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
path: root/src
diff options
context:
space:
mode:
authorUnderground78 <underground78@users.sourceforge.net>2015-11-14 18:12:12 +0300
committerUnderground78 <underground78@users.sourceforge.net>2015-11-14 18:12:12 +0300
commitd911f14d5619d800819d6f4658e72236720b79af (patch)
tree62e98291589b13a60672bfa9f355df28442534df /src
parent846eff07c13899dd7d3bf38251886b5263d41213 (diff)
parentf5d92cef4639bbe461bfc923ce2294df969a6d69 (diff)
Merge branch 'release-1.7.10'1.7.10
Diffstat (limited to 'src')
-rw-r--r--src/DSUtil/DSUtil.cpp19
-rw-r--r--src/DSUtil/DSUtil.vcxproj1
-rw-r--r--src/DSUtil/DSUtil.vcxproj.filters3
-rw-r--r--src/DSUtil/MediaTypeEx.cpp24
-rw-r--r--src/DSUtil/MhookHelper.h (renamed from src/filters/renderer/MpcAudioRenderer/stdafx.cpp)56
-rw-r--r--src/DSUtil/SysVersion.cpp12
-rw-r--r--src/DSUtil/SysVersion.h4
-rw-r--r--src/DSUtil/WinAPIUtils.cpp33
-rw-r--r--src/SubPic/ISubPic.h6
-rw-r--r--src/SubPic/ISubRender.h45
-rw-r--r--src/SubPic/SubPicAllocatorPresenterImpl.cpp14
-rw-r--r--src/SubPic/SubPicAllocatorPresenterImpl.h5
-rw-r--r--src/SubPic/SubPicImpl.cpp19
-rw-r--r--src/SubPic/SubPicImpl.h5
-rw-r--r--src/SubPic/SubPicQueueImpl.cpp6
-rw-r--r--src/Subtitles/ColorConvTable.cpp2
-rw-r--r--src/Subtitles/DVBSub.h2
-rw-r--r--src/Subtitles/PGSSub.cpp4
-rw-r--r--src/Subtitles/PGSSub.h2
-rw-r--r--src/Subtitles/RTS.cpp49
-rw-r--r--src/Subtitles/RTS.h8
-rw-r--r--src/Subtitles/Rasterizer.cpp114
-rw-r--r--src/Subtitles/Rasterizer.h4
-rw-r--r--src/Subtitles/STS.cpp101
-rw-r--r--src/Subtitles/STS.h4
-rw-r--r--src/Subtitles/SubtitleHelpers.cpp14
-rw-r--r--src/Subtitles/USFSubtitles.cpp40
-rw-r--r--src/Subtitles/VobSubFile.cpp8
-rw-r--r--src/filters/Filters.h3
-rw-r--r--src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp22
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitter.cpp14
-rw-r--r--src/filters/reader/CDXAReader/CDXAReader.cpp6
-rw-r--r--src/filters/renderer/MpcAudioRenderer/IMpcAudioRendererFilter.h34
-rw-r--r--src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.cpp1319
-rw-r--r--src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.def5
-rw-r--r--src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.h161
-rw-r--r--src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.vcxproj259
-rw-r--r--src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.vcxproj.filters58
-rw-r--r--src/filters/renderer/MpcAudioRenderer/MpcAudioRendererSettingsWnd.cpp141
-rw-r--r--src/filters/renderer/MpcAudioRenderer/MpcAudioRendererSettingsWnd.h61
-rw-r--r--src/filters/renderer/MpcAudioRenderer/resource.h19
-rw-r--r--src/filters/renderer/MpcAudioRenderer/stdafx.h34
-rw-r--r--src/filters/renderer/VideoRenderers/AsyncCallback.h71
-rw-r--r--src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp80
-rw-r--r--src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h4
-rw-r--r--src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp7
-rw-r--r--src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp212
-rw-r--r--src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.h24
-rw-r--r--src/filters/renderer/VideoRenderers/FocusThread.cpp31
-rw-r--r--src/filters/renderer/VideoRenderers/FocusThread.h9
-rw-r--r--src/filters/renderer/VideoRenderers/IPinHook.cpp67
-rw-r--r--src/filters/renderer/VideoRenderers/IPinHook.h4
-rw-r--r--src/filters/renderer/VideoRenderers/RenderersSettings.cpp18
-rw-r--r--src/filters/renderer/VideoRenderers/RenderersSettings.h1
-rw-r--r--src/filters/renderer/VideoRenderers/SyncRenderer.cpp487
-rw-r--r--src/filters/renderer/VideoRenderers/SyncRenderer.h28
-rw-r--r--src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj1
-rw-r--r--src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj.filters3
-rw-r--r--src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp142
-rw-r--r--src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h96
-rw-r--r--src/filters/switcher/AudioSwitcher/AudioSwitcher.cpp4
-rw-r--r--src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp10
-rw-r--r--src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp42
-rw-r--r--src/mpc-hc/AboutDlg.cpp4
-rw-r--r--src/mpc-hc/AppSettings.cpp383
-rw-r--r--src/mpc-hc/AppSettings.h29
-rw-r--r--src/mpc-hc/CrashReporter.cpp73
-rw-r--r--src/mpc-hc/CrashReporter.h3
-rw-r--r--src/mpc-hc/CrashReporterDialog.cpp155
-rw-r--r--src/mpc-hc/CrashReporterDialog.h88
-rw-r--r--src/mpc-hc/CrashReporterDialog/CrashReporterDialog.cpp186
-rw-r--r--src/mpc-hc/CrashReporterDialog/CrashReporterDialog.def3
-rw-r--r--src/mpc-hc/CrashReporterDialog/CrashReporterDialog.h53
-rw-r--r--src/mpc-hc/CrashReporterDialog/CrashReporterDialog.rc (renamed from src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.rc)213
-rw-r--r--src/mpc-hc/CrashReporterDialog/CrashReporterDialog.vcxproj83
-rw-r--r--src/mpc-hc/CrashReporterDialog/CrashReporterDialog.vcxproj.filters37
-rw-r--r--src/mpc-hc/DebugShadersDlg.cpp14
-rw-r--r--src/mpc-hc/DpiHelper.cpp66
-rw-r--r--src/mpc-hc/DpiHelper.h46
-rw-r--r--src/mpc-hc/DropTarget.cpp12
-rw-r--r--src/mpc-hc/DropTarget.h22
-rw-r--r--src/mpc-hc/EventDispatcher.h3
-rw-r--r--src/mpc-hc/FGFilter.cpp121
-rw-r--r--src/mpc-hc/FGFilter.h2
-rw-r--r--src/mpc-hc/FGFilterLAV.cpp50
-rw-r--r--src/mpc-hc/FGFilterLAV.h6
-rw-r--r--src/mpc-hc/FGManager.cpp62
-rw-r--r--src/mpc-hc/FGManagerBDA.cpp2
-rw-r--r--src/mpc-hc/FakeFilterMapper2.cpp62
-rw-r--r--src/mpc-hc/FavoriteOrganizeDlg.cpp6
-rw-r--r--src/mpc-hc/FilterEnum.h3
-rw-r--r--src/mpc-hc/FloatEdit.cpp19
-rw-r--r--src/mpc-hc/FullscreenWnd.cpp43
-rw-r--r--src/mpc-hc/FullscreenWnd.h19
-rw-r--r--src/mpc-hc/GoToDlg.cpp26
-rw-r--r--src/mpc-hc/InternalFiltersConfig.h9
-rw-r--r--src/mpc-hc/Logger.h1
-rw-r--r--src/mpc-hc/MainFrm.cpp1262
-rw-r--r--src/mpc-hc/MainFrm.h36
-rw-r--r--src/mpc-hc/MainFrmControls.cpp22
-rw-r--r--src/mpc-hc/MediaPositionList.h4
-rw-r--r--src/mpc-hc/MouseTouch.cpp16
-rw-r--r--src/mpc-hc/MouseTouch.h71
-rw-r--r--src/mpc-hc/OpenDlg.cpp4
-rw-r--r--src/mpc-hc/PPageAudioRenderer.cpp233
-rw-r--r--src/mpc-hc/PPageAudioRenderer.h61
-rw-r--r--src/mpc-hc/PPageAudioSwitcher.cpp29
-rw-r--r--src/mpc-hc/PPageExternalFilters.cpp174
-rw-r--r--src/mpc-hc/PPageExternalFilters.h10
-rw-r--r--src/mpc-hc/PPageFileMediaInfo.cpp2
-rw-r--r--src/mpc-hc/PPageFormats.cpp5
-rw-r--r--src/mpc-hc/PPageFullscreen.cpp4
-rw-r--r--src/mpc-hc/PPageInternalFilters.cpp94
-rw-r--r--src/mpc-hc/PPageInternalFilters.h7
-rw-r--r--src/mpc-hc/PPageOutput.cpp125
-rw-r--r--src/mpc-hc/PPageOutput.h10
-rw-r--r--src/mpc-hc/PPagePlayback.cpp15
-rw-r--r--src/mpc-hc/PPagePlayback.h2
-rw-r--r--src/mpc-hc/PPageSheet.cpp2
-rw-r--r--src/mpc-hc/PPageSheet.h7
-rw-r--r--src/mpc-hc/PPageTweaks.cpp14
-rw-r--r--src/mpc-hc/PPageTweaks.h4
-rw-r--r--src/mpc-hc/PPageWebServer.cpp32
-rw-r--r--src/mpc-hc/PPageWebServer.h6
-rw-r--r--src/mpc-hc/PlayerCaptureDialog.cpp31
-rw-r--r--src/mpc-hc/PlayerInfoBar.cpp26
-rw-r--r--src/mpc-hc/PlayerInfoBar.h3
-rw-r--r--src/mpc-hc/PlayerPlaylistBar.cpp130
-rw-r--r--src/mpc-hc/PlayerPlaylistBar.h10
-rw-r--r--src/mpc-hc/PlayerSeekBar.cpp27
-rw-r--r--src/mpc-hc/PlayerSeekBar.h6
-rw-r--r--src/mpc-hc/PlayerStatusBar.cpp54
-rw-r--r--src/mpc-hc/PlayerStatusBar.h7
-rw-r--r--src/mpc-hc/PlayerSubresyncBar.cpp56
-rw-r--r--src/mpc-hc/PlayerSubresyncBar.h11
-rw-r--r--src/mpc-hc/PlayerToolBar.cpp2
-rw-r--r--src/mpc-hc/Playlist.cpp4
-rw-r--r--src/mpc-hc/QuicktimeGraph.cpp16
-rw-r--r--src/mpc-hc/RealMediaGraph.cpp6
-rw-r--r--src/mpc-hc/SettingsDefines.h15
-rw-r--r--src/mpc-hc/StatusLabel.cpp21
-rw-r--r--src/mpc-hc/StatusLabel.h7
-rw-r--r--src/mpc-hc/SubtitleDlDlg.cpp76
-rw-r--r--src/mpc-hc/SubtitleDlDlg.h16
-rw-r--r--src/mpc-hc/Translations.cpp3
-rw-r--r--src/mpc-hc/VMROSD.cpp6
-rw-r--r--src/mpc-hc/VersionInfo.cpp9
-rw-r--r--src/mpc-hc/VersionInfo.h1
-rw-r--r--src/mpc-hc/VolumeCtrl.cpp15
-rw-r--r--src/mpc-hc/VolumeCtrl.h3
-rw-r--r--src/mpc-hc/WebClientSocket.cpp45
-rw-r--r--src/mpc-hc/WebServer.cpp4
-rw-r--r--src/mpc-hc/mpc-hc.rc243
-rw-r--r--src/mpc-hc/mpc-hc.vcxproj114
-rw-r--r--src/mpc-hc/mpc-hc.vcxproj.filters14
-rw-r--r--src/mpc-hc/mpcresources/BuildAll.vcxproj167
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ar.dialogs.po113
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ar.menus.po26
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ar.strings.po208
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.be.dialogs.po80
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.be.strings.po184
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.bn.dialogs.po97
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.bn.menus.po314
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.bn.strings.po206
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ca.dialogs.po132
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ca.menus.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ca.strings.po208
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.cs.dialogs.po96
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.cs.menus.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.cs.strings.po178
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.da.dialogs.po98
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.da.menus.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.da.strings.po198
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.de.dialogs.po124
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.de.menus.po12
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.de.strings.po442
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.dialogs.pot80
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.el.dialogs.po116
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.el.menus.po10
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.el.strings.po191
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.dialogs.po94
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.menus.po8
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.strings.po198
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.es.dialogs.po116
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.es.menus.po15
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.es.strings.po310
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.eu.dialogs.po94
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.eu.menus.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.eu.strings.po194
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.fi.dialogs.po84
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.fi.strings.po182
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.fr.dialogs.po95
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.fr.menus.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.fr.strings.po178
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.gl.dialogs.po118
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.gl.menus.po92
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.gl.strings.po302
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.he.dialogs.po84
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.he.strings.po182
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.hr.dialogs.po94
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.hr.menus.po28
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.hr.strings.po406
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.hu.dialogs.po94
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.hu.menus.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.hu.strings.po190
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.hy.dialogs.po248
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.hy.menus.po30
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.hy.strings.po440
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.id.dialogs.po1752
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.id.menus.po703
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.id.strings.po3610
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.ar.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.be.strings.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.bn.strings.po16
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.ca.strings.po16
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.cs.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.da.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.de.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.el.strings.po19
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.en_GB.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.es.strings.po12
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.eu.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.fi.strings.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.fr.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.gl.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.he.strings.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.hr.strings.po12
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.hu.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.hy.strings.po20
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.id.strings.po81
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.it.strings.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.ja.strings.po20
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.ko.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.lt.strings.po79
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.ms_MY.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.nl.strings.po23
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.pa.strings.po78
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.pl.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.pt_BR.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.ro.strings.po17
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.ru.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.sk.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.sl.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.sr.strings.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.strings.pot8
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.sv.strings.po12
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.th_TH.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.tr.strings.po20
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.tt.strings.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.uk.strings.po14
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.vi.strings.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.zh_CN.strings.po19
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.installer.zh_TW.strings.po21
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.it.dialogs.po84
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.it.strings.po186
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ja.dialogs.po124
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ja.menus.po8
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ja.strings.po288
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ko.dialogs.po92
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ko.menus.po20
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ko.strings.po192
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.lt.dialogs.po1747
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.lt.menus.po700
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.lt.strings.po3606
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.dialogs.po94
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.menus.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.strings.po194
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.nl.dialogs.po97
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.nl.menus.po131
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.nl.strings.po240
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.pa.dialogs.po1746
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.pa.menus.po698
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.pa.strings.po3602
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.pl.dialogs.po97
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.pl.menus.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.pl.strings.po191
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.dialogs.po100
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.menus.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.strings.po196
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ro.dialogs.po96
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ro.menus.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ro.strings.po186
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ru.dialogs.po99
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ru.menus.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.ru.strings.po185
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.sk.dialogs.po94
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.sk.menus.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.sk.strings.po194
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.sl.dialogs.po94
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.sl.menus.po4
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.sl.strings.po188
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.sr.dialogs.po84
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.sr.strings.po182
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.strings.pot164
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.sv.dialogs.po108
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.sv.menus.po44
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.sv.strings.po244
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.dialogs.po94
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.menus.po16
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.strings.po198
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.tr.dialogs.po106
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.tr.menus.po16
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.tr.strings.po207
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.tt.dialogs.po84
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.tt.strings.po182
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.uk.dialogs.po93
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.uk.menus.po16
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.uk.strings.po198
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.vi.dialogs.po98
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.vi.menus.po12
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.vi.strings.po224
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.dialogs.po149
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.menus.po25
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.strings.po311
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.dialogs.po155
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.menus.po203
-rw-r--r--src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.strings.po343
-rw-r--r--src/mpc-hc/mpcresources/SyncTranslations.vcxproj35
-rw-r--r--src/mpc-hc/mpcresources/cfg/mpc-hc.id.cfg8
-rw-r--r--src/mpc-hc/mpcresources/cfg/mpc-hc.lt.cfg8
-rw-r--r--src/mpc-hc/mpcresources/cfg/mpc-hc.pa.cfg9
-rwxr-xr-xsrc/mpc-hc/mpcresources/common_python.bat6
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.ar.rcbin352116 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.be.rcbin363356 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.bn.rcbin379274 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.ca.rcbin376618 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.cs.rcbin366544 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.da.rcbin365168 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.de.rcbin371504 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.el.rcbin380828 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.en_GB.rcbin358392 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.es.rcbin378732 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.eu.rcbin369430 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.fi.rcbin365096 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.fr.rcbin385318 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.gl.rcbin376058 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.he.rcbin352332 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.hr.rcbin367184 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.hu.rcbin372844 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.hy.rcbin363228 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.it.rcbin369332 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.ja.rcbin329204 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.ko.rcbin332064 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.ms_MY.rcbin364448 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.nl.rcbin365094 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.pl.rcbin377742 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.pt_BR.rcbin372614 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.ro.rcbin377886 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.ru.rcbin368296 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.sk.rcbin372144 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.sl.rcbin367824 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.sr.rcbin368670 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.sv.rcbin364374 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.th_TH.rcbin355198 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.tr.rcbin364754 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.tt.rcbin366106 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.uk.rcbin370534 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.vi.rcbin362092 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.zh_CN.rcbin312360 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpc-hc.zh_TW.rcbin317560 -> 0 bytes
-rw-r--r--src/mpc-hc/mpcresources/mpcresources.vcxproj36
-rw-r--r--src/mpc-hc/mpcresources/mpcresources.vcxproj.filters9
-rwxr-xr-xsrc/mpc-hc/mpcresources/sync.bat15
-rw-r--r--src/mpc-hc/mpcresources/sync.py6
-rw-r--r--src/mpc-hc/mplayerc.cpp51
-rw-r--r--src/mpc-hc/mplayerc.h23
-rw-r--r--src/mpc-hc/res/mpc-hc.exe.manifest.conf2
-rw-r--r--src/mpc-hc/res/web/default.css23
-rw-r--r--src/mpc-hc/res/web/player.html4
-rw-r--r--src/mpc-hc/resource.h29
-rw-r--r--src/thirdparty/DoctorDump/CrashRpt.h80
-rwxr-xr-xsrc/thirdparty/LAVFilters/build_ffmpeg.sh1
m---------src/thirdparty/LAVFilters/src0
-rw-r--r--src/thirdparty/LCDUI/LCDStreamingText.h1
-rw-r--r--src/thirdparty/MediaInfo/License.html80
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_7z.cpp78
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_7z.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Ace.cpp79
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Ace.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Bzip2.cpp78
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Bzip2.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Elf.cpp234
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Elf.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Gzip.cpp84
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Gzip.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Iso9660.cpp109
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Iso9660.h44
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Mz.cpp165
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Mz.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Rar.cpp322
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Rar.h67
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Tar.cpp96
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Tar.h38
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Zip.cpp477
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Archive/File_Zip.h59
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac.cpp768
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac.h371
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio.cpp1432
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio.h2837
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.cpp753
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.h715
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr_Ps.cpp97
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr_Ps.h136
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_Main.cpp1143
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_Others.cpp459
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ac3.cpp2491
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ac3.h157
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Adpcm.cpp76
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Adpcm.h42
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Als.cpp144
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Als.h54
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amr.cpp262
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amr.h64
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amv.cpp46
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amv.h38
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ape.cpp210
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ape.h54
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Au.cpp176
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Au.h39
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Caf.cpp288
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Caf.h55
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Celt.cpp151
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Celt.h51
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_ChannelGrouping.cpp389
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_ChannelGrouping.h133
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_DolbyE.cpp969
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_DolbyE.h72
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Dts.cpp1407
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Dts.h108
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_ExtendedModule.cpp107
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_ExtendedModule.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Flac.cpp252
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Flac.h83
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_ImpulseTracker.cpp127
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_ImpulseTracker.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_La.cpp147
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_La.h55
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Midi.cpp46
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Midi.h38
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Module.cpp103
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Module.h42
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpc.cpp213
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpc.h50
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_MpcSv8.cpp246
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_MpcSv8.h65
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpega.cpp1658
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpega.h113
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_OpenMG.cpp233
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_OpenMG.h50
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Opus.cpp187
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Opus.h51
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm.cpp429
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm.h66
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_M2ts.cpp184
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_M2ts.h50
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_Vob.cpp221
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_Vob.h50
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ps2Audio.cpp122
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ps2Audio.h39
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Rkau.cpp144
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Rkau.h55
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_ScreamTracker3.cpp125
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_ScreamTracker3.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0302.cpp307
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0302.h58
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0331.cpp227
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0331.h52
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0337.cpp1324
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0337.h88
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Speex.cpp154
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Speex.h49
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tak.cpp303
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tak.h66
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tta.cpp134
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tta.h53
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_TwinVQ.cpp203
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_TwinVQ.h59
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Vorbis.cpp250
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Vorbis.h43
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Wvpk.cpp723
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Audio/File_Wvpk.h85
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate_MpegTs.cpp481
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate_MpegTs.h143
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Base.cpp40
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Base.h36
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Writer.cpp156
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Writer.h65
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Export/Export_EbuCore.cpp1726
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Export/Export_EbuCore.h40
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Export/Export_Mpeg7.cpp1554
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Export/Export_Mpeg7.h35
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore.cpp343
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore.h35
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore2.cpp584
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore2.h35
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Export/Export_reVTMD.cpp9
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Export/Export_reVTMD.h1
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File_Dummy.cpp313
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File_Dummy.h49
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File_Other.cpp209
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File_Other.h40
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File_Unknown.cpp53
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File_Unknown.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__Analyse_Automatic.h1525
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__Analyze.cpp3841
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__Analyze.h1523
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Buffer.cpp2538
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Buffer_MinimizeSize.cpp1741
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__Analyze_MinimizeSize.h1348
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Streams.cpp2679
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Streams_Finish.cpp1155
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__Base.cpp214
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__Base.h120
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__Duplicate.cpp89
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__Duplicate.h48
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__MultipleParsing.cpp849
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/File__MultipleParsing.h54
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_ArriRaw.cpp143
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_ArriRaw.h57
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Bmp.cpp264
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Bmp.h46
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Bpg.cpp152
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Bpg.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Dds.cpp181
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Dds.h66
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Dpx.cpp851
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Dpx.h83
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Exr.cpp338
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Exr.h77
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Gif.cpp105
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Gif.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Ico.cpp149
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Ico.h65
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Jpeg.cpp1178
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Jpeg.h173
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Pcx.cpp136
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Pcx.h44
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Png.cpp310
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Png.h70
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Psd.cpp117
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Psd.h44
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Rle.cpp75
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Rle.h44
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Tga.cpp306
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Tga.h69
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Tiff.cpp565
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Image/File_Tiff.h70
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo.cpp239
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo.h252
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfoList.cpp246
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfoList.h226
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfoList_Internal.cpp468
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfoList_Internal.h80
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config.cpp2438
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config.h351
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_Automatic.cpp6010
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_MediaInfo.cpp2733
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_MediaInfo.h539
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_PerPackage.cpp135
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_PerPackage.h88
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Const.h132
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Events.h758
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Events_Internal.h119
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_File.cpp1136
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Inform.cpp698
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Internal.cpp1393
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Internal.h185
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Internal_Const.h137
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Aaf.cpp656
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Aaf.h164
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ancillary.cpp1024
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ancillary.h107
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Bdmv.cpp1636
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Bdmv.h83
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Cdxa.cpp309
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Cdxa.h62
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DashMpd.cpp709
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DashMpd.h61
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpAm.cpp298
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpAm.h65
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpCpl.cpp353
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpCpl.h63
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpPkl.cpp265
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpPkl.h84
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dpg.cpp190
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dpg.h61
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DvDif.cpp1853
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DvDif.h351
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DvDif_Analysis.cpp1616
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dvdv.cpp1579
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dvdv.h117
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dxw.cpp207
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dxw.h58
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Flv.cpp1710
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Flv.h116
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf.cpp1664
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf.h177
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf_TimeCode.cpp353
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf_TimeCode.h61
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_HdsF4m.cpp160
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_HdsF4m.h61
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Hls.cpp237
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Hls.h58
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi.cpp946
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi.h99
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi_Creation.cpp565
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi_Creation.h125
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ism.cpp198
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ism.h58
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ivf.cpp132
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ivf.h45
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Lxf.cpp1860
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Lxf.h163
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mk.cpp3582
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mk.h346
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4.cpp2144
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4.h528
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_Descriptors.cpp1001
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_Descriptors.h134
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_Elements.cpp7246
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_TimeCode.cpp108
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_TimeCode.h47
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegPs.cpp4863
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegPs.h306
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegTs.cpp3375
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegTs.h167
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegTs_Duplicate.cpp348
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Descriptors.cpp3466
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Descriptors.h858
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Psi.cpp2633
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Psi.h169
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mxf.cpp15522
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mxf.h1214
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Nut.cpp289
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Nut.h48
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg.cpp393
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg.h98
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg_SubElement.cpp900
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg_SubElement.h92
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_P2_Clip.cpp466
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_P2_Clip.h58
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Pmp.cpp137
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Pmp.h44
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ptx.cpp640
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ptx.h61
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Riff.cpp1029
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Riff.h333
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Riff_Elements.cpp3786
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Rm.cpp805
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Rm.h68
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_SequenceInfo.cpp245
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_SequenceInfo.h58
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Skm.cpp188
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Skm.h72
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Swf.cpp694
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Swf.h119
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Umf.cpp240
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Umf.h51
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Wm.cpp256
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Wm.h174
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Wm_Elements.cpp1823
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Xdcam_Clip.cpp162
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Xdcam_Clip.h39
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper.cpp1945
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper.h113
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Common.h74
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Resource.cpp93
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Resource.h61
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence.cpp130
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence.h86
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence_Common.h71
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/PreComp.cpp15
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/PreComp.h28
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_Directory.cpp231
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_Directory.h57
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_File.cpp799
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_File.h86
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Reader/Reader__Base.h45
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libcurl.cpp863
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libcurl.h52
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libcurl_Include.h975
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libmms.cpp162
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libmms.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Setup.h863
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_ApeTag.cpp201
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_ApeTag.h49
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3.cpp130
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3.h38
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3v2.cpp1416
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3v2.h237
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3.cpp86
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3.h45
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3v2.cpp224
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3v2.h62
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_PropertyList.cpp148
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_PropertyList.h38
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_VorbisCom.cpp344
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_VorbisCom.h64
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_Xmp.cpp118
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File_Xmp.h38
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File__Tags.cpp655
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Tag/File__Tags.h97
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_AribStdB24B37.cpp1483
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_AribStdB24B37.h174
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Cdp.cpp598
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Cdp.h102
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Cmml.cpp111
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Cmml.h43
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_DtvccTransport.cpp384
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_DtvccTransport.h83
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_DvbSubtitle.cpp468
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_DvbSubtitle.h105
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia608.cpp1102
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia608.h143
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia708.cpp1418
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia708.h182
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Kate.cpp147
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Kate.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_N19.cpp440
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_N19.h59
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_OtherText.cpp182
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_OtherText.h37
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Pdf.cpp683
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Pdf.h117
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Pgs.cpp64
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Pgs.h41
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Scc.cpp275
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Scc.h60
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Scte20.cpp278
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Scte20.h82
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Sdp.cpp258
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Sdp.h71
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_SubRip.cpp256
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_SubRip.h61
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Teletext.cpp619
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Teletext.h105
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_TimedText.cpp110
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_TimedText.h48
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Ttml.cpp256
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Text/File_Ttml.h61
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/TimeCode.cpp229
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/TimeCode.h99
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_AfdBarData.cpp355
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_AfdBarData.h91
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Aic.cpp112
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Aic.h47
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Avc.cpp3951
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Avc.h571
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Avc_Duplicate.cpp263
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_AvsV.cpp827
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_AvsV.h111
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Canopus.cpp179
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Canopus.h46
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Dirac.cpp889
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Dirac.h103
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Ffv1.cpp491
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Ffv1.h109
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Flic.cpp137
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Flic.h38
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Fraps.cpp138
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Fraps.h50
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_H263.cpp421
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_H263.h72
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Hevc.cpp2746
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Hevc.h451
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_HuffYuv.cpp309
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_HuffYuv.h53
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Lagarith.cpp93
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Lagarith.h45
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpeg4v.cpp1864
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpeg4v.h193
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpegv.cpp4093
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpegv.h364
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_ProRes.cpp246
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_ProRes.h45
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Theora.cpp134
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Theora.h43
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc1.cpp1222
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc1.h162
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc3.cpp708
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc3.h83
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Vp8.cpp114
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Vp8.h53
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Y4m.cpp229
-rw-r--r--src/thirdparty/MediaInfo/MediaInfo/Video/File_Y4m.h51
-rw-r--r--src/thirdparty/MediaInfo/MediaInfoLib.vcxproj830
-rw-r--r--src/thirdparty/MediaInfo/MediaInfoLib.vcxproj.filters822
-rw-r--r--src/thirdparty/MediaInfo/ThirdParty/base64/base64.h158
-rw-r--r--src/thirdparty/MediaInfo/ThirdParty/md5/md5.c253
-rw-r--r--src/thirdparty/MediaInfo/ThirdParty/md5/md5.h21
-rw-r--r--src/thirdparty/MediaInfo/ThirdParty/tinyxml2/tinyxml2.cpp2212
-rw-r--r--src/thirdparty/MediaInfo/ThirdParty/tinyxml2/tinyxml2.h2076
m---------src/thirdparty/MediaInfo/library0
-rw-r--r--src/thirdparty/RARFileSource/RARFileSource.vcxproj288
-rw-r--r--src/thirdparty/SoundTouch/SoundTouch.vcxproj80
-rw-r--r--src/thirdparty/SoundTouch/include/BPMDetect.h164
-rw-r--r--src/thirdparty/SoundTouch/include/FIFOSampleBuffer.h184
-rw-r--r--src/thirdparty/SoundTouch/include/FIFOSamplePipe.h234
-rw-r--r--src/thirdparty/SoundTouch/include/STTypes.h189
-rw-r--r--src/thirdparty/SoundTouch/include/SoundTouch.h277
m---------src/thirdparty/SoundTouch/soundtouch0
-rw-r--r--src/thirdparty/SoundTouch/source/AAFilter.cpp236
-rw-r--r--src/thirdparty/SoundTouch/source/AAFilter.h100
-rw-r--r--src/thirdparty/SoundTouch/source/BPMDetect.cpp371
-rw-r--r--src/thirdparty/SoundTouch/source/FIFOSampleBuffer.cpp274
-rw-r--r--src/thirdparty/SoundTouch/source/FIRFilter.cpp328
-rw-r--r--src/thirdparty/SoundTouch/source/FIRFilter.h146
-rw-r--r--src/thirdparty/SoundTouch/source/InterpolateCubic.cpp200
-rw-r--r--src/thirdparty/SoundTouch/source/InterpolateCubic.h67
-rw-r--r--src/thirdparty/SoundTouch/source/InterpolateLinear.cpp299
-rw-r--r--src/thirdparty/SoundTouch/source/InterpolateLinear.h92
-rw-r--r--src/thirdparty/SoundTouch/source/InterpolateShannon.cpp186
-rw-r--r--src/thirdparty/SoundTouch/source/InterpolateShannon.h72
-rw-r--r--src/thirdparty/SoundTouch/source/PeakFinder.cpp286
-rw-r--r--src/thirdparty/SoundTouch/source/PeakFinder.h97
-rw-r--r--src/thirdparty/SoundTouch/source/RateTransposer.cpp302
-rw-r--r--src/thirdparty/SoundTouch/source/RateTransposer.h179
-rw-r--r--src/thirdparty/SoundTouch/source/SoundTouch.cpp504
-rw-r--r--src/thirdparty/SoundTouch/source/SoundTouch.vcxproj136
-rw-r--r--src/thirdparty/SoundTouch/source/SoundTouch.vcxproj.filters104
-rw-r--r--src/thirdparty/SoundTouch/source/TDStretch.cpp964
-rw-r--r--src/thirdparty/SoundTouch/source/TDStretch.h272
-rw-r--r--src/thirdparty/SoundTouch/source/cpu_detect.h62
-rw-r--r--src/thirdparty/SoundTouch/source/cpu_detect_x86.cpp138
-rw-r--r--src/thirdparty/SoundTouch/source/mmx_optimized.cpp385
-rw-r--r--src/thirdparty/SoundTouch/source/sse_optimized.cpp372
-rw-r--r--src/thirdparty/ZenLib/ZenLib.vcxproj118
-rw-r--r--src/thirdparty/ZenLib/ZenLib.vcxproj.filters108
-rw-r--r--src/thirdparty/ZenLib/ZenLib/BitStream.h352
-rw-r--r--src/thirdparty/ZenLib/ZenLib/BitStream_Fast.h420
-rw-r--r--src/thirdparty/ZenLib/ZenLib/BitStream_LE.h133
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Conf.cpp43
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Conf.h350
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Conf_Internal.h24
-rw-r--r--src/thirdparty/ZenLib/ZenLib/CriticalSection.cpp187
-rw-r--r--src/thirdparty/ZenLib/ZenLib/CriticalSection.h70
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Dir.cpp533
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Dir.h74
-rw-r--r--src/thirdparty/ZenLib/ZenLib/File.cpp1067
-rw-r--r--src/thirdparty/ZenLib/ZenLib/File.h98
-rw-r--r--src/thirdparty/ZenLib/ZenLib/FileName.cpp216
-rw-r--r--src/thirdparty/ZenLib/ZenLib/FileName.h66
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Handler.cpp53
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Handler.h72
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Request.cpp63
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Request.h56
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Cookies.cpp104
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Cookies.h73
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Handler.cpp54
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Handler.h69
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Request.cpp245
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Request.h63
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Utils.cpp241
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Utils.h68
-rw-r--r--src/thirdparty/ZenLib/ZenLib/HTTP_Client.cpp123
-rw-r--r--src/thirdparty/ZenLib/ZenLib/HTTP_Client.h49
-rw-r--r--src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClient.c3646
-rw-r--r--src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClient.h306
-rw-r--r--src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientAuth.c664
-rw-r--r--src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientAuth.h89
-rw-r--r--src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientCommon.h120
-rw-r--r--src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientString.c422
-rw-r--r--src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientString.h23
-rw-r--r--src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientWrapper.c348
-rw-r--r--src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientWrapper.h111
-rw-r--r--src/thirdparty/ZenLib/ZenLib/InfoMap.cpp159
-rw-r--r--src/thirdparty/ZenLib/ZenLib/InfoMap.h57
-rw-r--r--src/thirdparty/ZenLib/ZenLib/MemoryDebug.cpp186
-rw-r--r--src/thirdparty/ZenLib/ZenLib/MemoryDebug.h115
-rw-r--r--src/thirdparty/ZenLib/ZenLib/MemoryUtils.h262
-rw-r--r--src/thirdparty/ZenLib/ZenLib/OS_Utils.cpp183
-rw-r--r--src/thirdparty/ZenLib/ZenLib/OS_Utils.h37
-rw-r--r--src/thirdparty/ZenLib/ZenLib/PreComp.cpp9
-rw-r--r--src/thirdparty/ZenLib/ZenLib/PreComp.h34
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Thread.cpp637
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Thread.h91
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Trace.h64
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Translation.cpp151
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Translation.h59
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Utils.cpp1024
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Utils.h305
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Ztring.cpp2411
-rw-r--r--src/thirdparty/ZenLib/ZenLib/Ztring.h369
-rw-r--r--src/thirdparty/ZenLib/ZenLib/ZtringList.cpp357
-rw-r--r--src/thirdparty/ZenLib/ZenLib/ZtringList.h89
-rw-r--r--src/thirdparty/ZenLib/ZenLib/ZtringListList.cpp582
-rw-r--r--src/thirdparty/ZenLib/ZenLib/ZtringListList.h132
-rw-r--r--src/thirdparty/ZenLib/ZenLib/ZtringListListF.cpp370
-rw-r--r--src/thirdparty/ZenLib/ZenLib/ZtringListListF.h77
-rw-r--r--src/thirdparty/ZenLib/ZenLib/int128s.cpp408
-rw-r--r--src/thirdparty/ZenLib/ZenLib/int128s.h195
-rw-r--r--src/thirdparty/ZenLib/ZenLib/int128u.cpp390
-rw-r--r--src/thirdparty/ZenLib/ZenLib/int128u.h186
m---------src/thirdparty/ZenLib/library0
-rw-r--r--src/thirdparty/bs2b/bs2b.vcxproj58
m---------src/thirdparty/bs2b/libbs2b0
-rw-r--r--src/thirdparty/lcms2/lcms2.vcxproj1
-rw-r--r--src/thirdparty/lcms2/lcms2.vcxproj.filters3
m---------src/thirdparty/lcms2/library0
m---------src/thirdparty/sanear/sanear0
-rw-r--r--src/thirdparty/sanear/sanear-platform.props4
-rw-r--r--src/thirdparty/sanear/sanear.props9
m---------src/thirdparty/soxr/libsoxr0
-rw-r--r--src/thirdparty/soxr/soxr-config.h13
-rw-r--r--src/thirdparty/soxr/soxr.vcxproj69
-rw-r--r--src/thirdparty/soxr/soxr.vcxproj.filters53
-rw-r--r--src/thirdparty/versions.txt10
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler.vcxproj59
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/AUTHORS1
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/COPYING674
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/INSTALL31
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/README45
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/apps/Makefile73
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/apps/audiofile.cc270
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/apps/audiofile.h119
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/apps/dither.cc126
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/apps/dither.h58
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/apps/zresample.180
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/apps/zresample.cc272
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/apps/zretune.173
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/apps/zretune.cc257
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/docs/filt1.pngbin0 -> 9528 bytes
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/docs/filt2.pngbin0 -> 3117 bytes
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/docs/inpdist.pngbin0 -> 14940 bytes
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/docs/resampler.html574
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/docs/src-1kHz.pngbin0 -> 34429 bytes
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/docs/zita-1kHz.pngbin0 -> 34459 bytes
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/docs/zitadocs.css18
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/libs/Makefile68
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/libs/resampler-table.cc161
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/libs/resampler.cc263
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/libs/vresampler.cc269
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/libs/zita-resampler/resampler-table.h86
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/libs/zita-resampler/resampler.h76
-rw-r--r--src/thirdparty/zita-resampler/zita-resampler/libs/zita-resampler/vresampler.h83
935 files changed, 36504 insertions, 246357 deletions
diff --git a/src/DSUtil/DSUtil.cpp b/src/DSUtil/DSUtil.cpp
index c92276354..3283c5d61 100644
--- a/src/DSUtil/DSUtil.cpp
+++ b/src/DSUtil/DSUtil.cpp
@@ -152,8 +152,13 @@ bool IsAudioWaveRenderer(IBaseFilter* pBF)
memcpy(&clsid, &GUID_NULL, sizeof(clsid));
pBF->GetClassID(&clsid);
- return (clsid == CLSID_DSoundRender || clsid == CLSID_AudioRender || clsid == CLSID_ReClock
- || clsid == __uuidof(CNullAudioRenderer) || clsid == __uuidof(CNullUAudioRenderer));
+ return clsid == CLSID_DSoundRender ||
+ clsid == CLSID_AudioRender ||
+ clsid == CLSID_ReClock ||
+ clsid == __uuidof(CNullAudioRenderer) ||
+ clsid == __uuidof(CNullUAudioRenderer) ||
+ clsid == CLSID_SANEAR_INTERNAL ||
+ clsid == CLSID_SANEAR;
}
IBaseFilter* GetUpStreamFilter(IBaseFilter* pBF, IPin* pInputPin)
@@ -914,7 +919,7 @@ void memsetd(void* dst, unsigned int c, size_t nbytes)
{
size_t n = nbytes / 4;
-#ifndef _WIN64
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
if (!(g_cpuid.m_flags & g_cpuid.sse2)) { // No SSE2
__stosd((unsigned long*)dst, c, n);
return;
@@ -1157,13 +1162,13 @@ IBaseFilter* AppendFilter(IPin* pPin, IMoniker* pMoniker, IGraphBuilder* pGB)
break;
}
- BeginEnumPins(pBF, pEP, pPinTo) {
+ BeginEnumPins(pBF, pEP, pPinTo2) {
PIN_DIRECTION dir2;
- if (FAILED(pPinTo->QueryDirection(&dir2)) || dir2 != PINDIR_INPUT) {
+ if (FAILED(pPinTo2->QueryDirection(&dir2)) || dir2 != PINDIR_INPUT) {
continue;
}
- if (SUCCEEDED(pGB->ConnectDirect(pPin, pPinTo, nullptr))) {
+ if (SUCCEEDED(pGB->ConnectDirect(pPin, pPinTo2, nullptr))) {
return pBF;
}
}
@@ -2416,7 +2421,7 @@ REFERENCE_TIME StringToReftime(LPCTSTR strVal)
int lMillisec = 0;
if (_stscanf_s(strVal, _T("%02d:%02d:%02d,%03d"), &lHour, &lMinute, &lSecond, &lMillisec) == 4) {
- rt = ((((lHour * 24) + lMinute) * 60 + lSecond) * MILLISECONDS + lMillisec) * (UNITS / MILLISECONDS);
+ rt = ((((lHour * 60) + lMinute) * 60 + lSecond) * MILLISECONDS + lMillisec) * (UNITS / MILLISECONDS);
}
return rt;
diff --git a/src/DSUtil/DSUtil.vcxproj b/src/DSUtil/DSUtil.vcxproj
index c145ebfd3..030207e3a 100644
--- a/src/DSUtil/DSUtil.vcxproj
+++ b/src/DSUtil/DSUtil.vcxproj
@@ -143,6 +143,7 @@
<ClInclude Include="HdmvClipInfo.h" />
<ClInclude Include="MediaTypeEx.h" />
<ClInclude Include="MediaTypes.h" />
+ <ClInclude Include="MhookHelper.h" />
<ClInclude Include="Mpeg2Def.h" />
<ClInclude Include="NullRenderers.h" />
<ClInclude Include="PathUtils.h" />
diff --git a/src/DSUtil/DSUtil.vcxproj.filters b/src/DSUtil/DSUtil.vcxproj.filters
index 56b6610c1..71e5c5c11 100644
--- a/src/DSUtil/DSUtil.vcxproj.filters
+++ b/src/DSUtil/DSUtil.vcxproj.filters
@@ -136,5 +136,8 @@
<ClInclude Include="ArrayUtils.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="MhookHelper.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/src/DSUtil/MediaTypeEx.cpp b/src/DSUtil/MediaTypeEx.cpp
index 6fa348df7..36fd7df39 100644
--- a/src/DSUtil/MediaTypeEx.cpp
+++ b/src/DSUtil/MediaTypeEx.cpp
@@ -631,36 +631,36 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl)
if (wfe.wFormatTag == WAVE_FORMAT_EXTENSIBLE && wfe.cbSize == sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)) {
fmtsize = sizeof(WAVEFORMATEXTENSIBLE);
- WAVEFORMATEXTENSIBLE& wfe = *(WAVEFORMATEXTENSIBLE*)pbFormat;
+ WAVEFORMATEXTENSIBLE& wfextensible = *(WAVEFORMATEXTENSIBLE*)pbFormat;
sl.AddTail(_T("WAVEFORMATEXTENSIBLE:"));
- if (wfe.Format.wBitsPerSample != 0) {
- str.Format(_T("wValidBitsPerSample: %u"), wfe.Samples.wValidBitsPerSample);
+ if (wfextensible.Format.wBitsPerSample != 0) {
+ str.Format(_T("wValidBitsPerSample: %u"), wfextensible.Samples.wValidBitsPerSample);
} else {
- str.Format(_T("wSamplesPerBlock: %u"), wfe.Samples.wSamplesPerBlock);
+ str.Format(_T("wSamplesPerBlock: %u"), wfextensible.Samples.wSamplesPerBlock);
}
sl.AddTail(str);
- str.Format(_T("dwChannelMask: 0x%08x"), wfe.dwChannelMask);
+ str.Format(_T("dwChannelMask: 0x%08x"), wfextensible.dwChannelMask);
sl.AddTail(str);
- str.Format(_T("SubFormat: %s"), CStringFromGUID(wfe.SubFormat));
+ str.Format(_T("SubFormat: %s"), CStringFromGUID(wfextensible.SubFormat));
sl.AddTail(str);
sl.AddTail(_T(""));
} else if (wfe.wFormatTag == WAVE_FORMAT_DOLBY_AC3 && wfe.cbSize == sizeof(DOLBYAC3WAVEFORMAT) - sizeof(WAVEFORMATEX)) {
fmtsize = sizeof(DOLBYAC3WAVEFORMAT);
- DOLBYAC3WAVEFORMAT& wfe = *(DOLBYAC3WAVEFORMAT*)pbFormat;
+ DOLBYAC3WAVEFORMAT& dawf = *(DOLBYAC3WAVEFORMAT*)pbFormat;
sl.AddTail(_T("DOLBYAC3WAVEFORMAT:"));
- str.Format(_T("bBigEndian: %u"), wfe.bBigEndian);
+ str.Format(_T("bBigEndian: %u"), dawf.bBigEndian);
sl.AddTail(str);
- str.Format(_T("bsid: %u"), wfe.bsid);
+ str.Format(_T("bsid: %u"), dawf.bsid);
sl.AddTail(str);
- str.Format(_T("lfeon: %u"), wfe.lfeon);
+ str.Format(_T("lfeon: %u"), dawf.lfeon);
sl.AddTail(str);
- str.Format(_T("copyrightb: %u"), wfe.copyrightb);
+ str.Format(_T("copyrightb: %u"), dawf.copyrightb);
sl.AddTail(str);
- str.Format(_T("nAuxBitsCode: %u"), wfe.nAuxBitsCode);
+ str.Format(_T("nAuxBitsCode: %u"), dawf.nAuxBitsCode);
sl.AddTail(str);
sl.AddTail(_T(""));
diff --git a/src/filters/renderer/MpcAudioRenderer/stdafx.cpp b/src/DSUtil/MhookHelper.h
index 42728ce2e..239d1b082 100644
--- a/src/filters/renderer/MpcAudioRenderer/stdafx.cpp
+++ b/src/DSUtil/MhookHelper.h
@@ -1,21 +1,35 @@
-/*
- * (C) 2009-2012 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "stdafx.h"
+/*
+ * (C) 2015 see Authors.txt
+ *
+ * This file is part of MPC-HC.
+ *
+ * MPC-HC 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.
+ *
+ * MPC-HC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include "mhook/mhook-lib/mhook.h"
+
+template <typename T>
+inline BOOL Mhook_SetHookEx(T** ppSystemFunction, PVOID pHookFunction)
+{
+ return Mhook_SetHook(reinterpret_cast<PVOID*>(ppSystemFunction), pHookFunction);
+}
+
+template <typename T>
+inline BOOL Mhook_UnhookEx(T** ppHookedFunction)
+{
+ return Mhook_Unhook(reinterpret_cast<PVOID*>(ppHookedFunction));
+}
diff --git a/src/DSUtil/SysVersion.cpp b/src/DSUtil/SysVersion.cpp
index a1c2bf29c..6db223293 100644
--- a/src/DSUtil/SysVersion.cpp
+++ b/src/DSUtil/SysVersion.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2012-2014 see Authors.txt
+ * (C) 2012-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -90,6 +90,16 @@ bool SysVersion::Is8OrLater()
return (GetVersion() >= 0x0602);
}
+bool SysVersion::Is81OrLater()
+{
+ return (GetVersion() >= 0x0603);
+}
+
+bool SysVersion::Is10OrLater()
+{
+ return (GetVersion() >= 0x0A00);
+}
+
bool SysVersion::Is64Bit()
{
const bool bIs64Bit = InitIs64Bit();
diff --git a/src/DSUtil/SysVersion.h b/src/DSUtil/SysVersion.h
index efdc28a10..8669abe07 100644
--- a/src/DSUtil/SysVersion.h
+++ b/src/DSUtil/SysVersion.h
@@ -1,5 +1,5 @@
/*
- * (C) 2012-2014 see Authors.txt
+ * (C) 2012-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -34,6 +34,8 @@ namespace SysVersion
bool Is7OrLater();
bool Is8();
bool Is8OrLater();
+ bool Is81OrLater();
+ bool Is10OrLater();
bool Is64Bit();
};
diff --git a/src/DSUtil/WinAPIUtils.cpp b/src/DSUtil/WinAPIUtils.cpp
index d16658acb..f5de3c0d8 100644
--- a/src/DSUtil/WinAPIUtils.cpp
+++ b/src/DSUtil/WinAPIUtils.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2011-2014 see Authors.txt
+ * (C) 2011-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -206,30 +206,33 @@ int CALLBACK EnumFontFamExProc(ENUMLOGFONTEX* /*lpelfe*/, NEWTEXTMETRICEX* /*lpn
return TRUE;
}
-void GetMessageFont(LOGFONT* lf)
+namespace
{
- ZeroMemory(lf, sizeof(LOGFONT));
- NONCLIENTMETRICS ncm;
- ncm.cbSize = sizeof(NONCLIENTMETRICS);
- if (!SysVersion::IsVistaOrLater()) {
- ncm.cbSize -= sizeof(ncm.iPaddedBorderWidth);
+ void GetNonClientMetrics(NONCLIENTMETRICS* ncm)
+ {
+ ZeroMemory(ncm, sizeof(NONCLIENTMETRICS));
+ ncm->cbSize = sizeof(NONCLIENTMETRICS);
+ if (!SysVersion::IsVistaOrLater()) {
+ ncm->cbSize -= sizeof(ncm->iPaddedBorderWidth);
+ }
+ VERIFY(SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm->cbSize, ncm, 0));
}
+}
- SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0);
+void GetMessageFont(LOGFONT* lf)
+{
+ NONCLIENTMETRICS ncm;
+ GetNonClientMetrics(&ncm);
*lf = ncm.lfMessageFont;
+ ASSERT(lf->lfHeight);
}
void GetStatusFont(LOGFONT* lf)
{
- ZeroMemory(lf, sizeof(LOGFONT));
NONCLIENTMETRICS ncm;
- ncm.cbSize = sizeof(NONCLIENTMETRICS);
- if (!SysVersion::IsVistaOrLater()) {
- ncm.cbSize -= sizeof(ncm.iPaddedBorderWidth);
- }
-
- SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0);
+ GetNonClientMetrics(&ncm);
*lf = ncm.lfStatusFont;
+ ASSERT(lf->lfHeight);
}
bool IsFontInstalled(LPCTSTR lpszFont)
diff --git a/src/SubPic/ISubPic.h b/src/SubPic/ISubPic.h
index 11766d37f..0238ea5b6 100644
--- a/src/SubPic/ISubPic.h
+++ b/src/SubPic/ISubPic.h
@@ -59,7 +59,7 @@ enum RelativeTo {
// ISubPic
//
-interface __declspec(uuid("449E11F3-52D1-4a27-AA61-E2733AC92CC0"))
+interface __declspec(uuid("DA3A5B51-958C-4C28-BF66-68D7947577A2"))
ISubPic :
public IUnknown {
static const REFERENCE_TIME INVALID_TIME = -1;
@@ -85,7 +85,9 @@ public IUnknown {
STDMETHOD(Unlock)(RECT* pDirtyRect /*[in]*/) PURE;
STDMETHOD(AlphaBlt)(RECT * pSrc, RECT * pDst, SubPicDesc* pTarget = nullptr /*[in]*/) PURE;
- STDMETHOD(GetSourceAndDest)(RECT rcWindow /*[in]*/, RECT rcVideo /*[in]*/, RECT* pRcSource /*[out]*/, RECT* pRcDest /*[out]*/) const PURE;
+ STDMETHOD(GetSourceAndDest)(RECT rcWindow /*[in]*/, RECT rcVideo /*[in]*/,
+ RECT* pRcSource /*[out]*/, RECT* pRcDest /*[out]*/,
+ const double videoStretchFactor = 1.0 /*[in]*/) const PURE;
STDMETHOD(SetVirtualTextureSize)(const SIZE pSize, const POINT pTopLeft) PURE;
STDMETHOD(GetRelativeTo)(RelativeTo* pRelativeTo /*[out]*/) const PURE;
STDMETHOD(SetRelativeTo)(RelativeTo relativeTo /*[in]*/) PURE;
diff --git a/src/SubPic/ISubRender.h b/src/SubPic/ISubRender.h
index ad71f59e2..f4266875e 100644
--- a/src/SubPic/ISubRender.h
+++ b/src/SubPic/ISubRender.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -21,32 +21,41 @@
#pragma once
-#include <d3d9.h>
+#include <ObjBase.h>
+#include <strmif.h>
-interface __declspec(uuid("CD6D2AA5-20D3-4ebe-A8A9-34D3B00CC253"))
-ISubRenderCallback :
-public IUnknown {
+interface IDirect3DDevice9;
+
+DECLARE_INTERFACE_IID_(ISubRenderCallback, IUnknown, "CD6D2AA5-20D3-4ebe-A8A9-34D3B00CC253")
+{
// NULL means release current device, textures and other resources
- STDMETHOD(SetDevice)(IDirect3DDevice9 * dev) PURE;
+ STDMETHOD(SetDevice)(IDirect3DDevice9* dev) PURE;
// destination video rectangle, will be inside (0, 0)-(width, height)
// width,height is the size of the entire output window
STDMETHOD(Render)(REFERENCE_TIME rtStart,
- int left, int top, int bottom, int right,
- int width, int height) PURE;
+ int left, int top, int right, int bottom,
+ int width, int height) PURE;
};
-interface __declspec(uuid("E602585E-C05A-4828-AC69-AF92997F2E0C"))
-ISubRenderCallback2 :
-public ISubRenderCallback {
+
+DECLARE_INTERFACE_IID_(ISubRenderCallback2, ISubRenderCallback, "E602585E-C05A-4828-AC69-AF92997F2E0C")
+{
STDMETHOD(RenderEx)(REFERENCE_TIME rtStart, REFERENCE_TIME rtStop,
- REFERENCE_TIME AvgTimePerFrame,
- int left, int top, int right, int bottom,
- int width, int height) PURE;
+ REFERENCE_TIME avgTimePerFrame,
+ int left, int top, int right, int bottom,
+ int width, int height) PURE;
+};
+
+DECLARE_INTERFACE_IID_(ISubRenderCallback3, ISubRenderCallback2, "BAC4273A-3EAD-47F5-9710-8488E52AC618")
+{
+ STDMETHOD(RenderEx2)(REFERENCE_TIME rtStart, REFERENCE_TIME rtStop,
+ REFERENCE_TIME avgTimePerFrame, RECT croppedVideoRect,
+ RECT originalVideoRect, RECT viewportRect,
+ const double videoStretchFactor = 1.0) PURE;
};
-interface __declspec(uuid("9CC7F9F7-3ED1-493c-AF65-527EA1D9947F"))
-ISubRender :
-public IUnknown {
- STDMETHOD(SetCallback)(ISubRenderCallback * cb) PURE;
+DECLARE_INTERFACE_IID_(ISubRender, IUnknown, "9CC7F9F7-3ED1-493c-AF65-527EA1D9947F")
+{
+ STDMETHOD(SetCallback)(ISubRenderCallback* cb) PURE;
};
diff --git a/src/SubPic/SubPicAllocatorPresenterImpl.cpp b/src/SubPic/SubPicAllocatorPresenterImpl.cpp
index 80cd05170..636d7f08a 100644
--- a/src/SubPic/SubPicAllocatorPresenterImpl.cpp
+++ b/src/SubPic/SubPicAllocatorPresenterImpl.cpp
@@ -117,12 +117,15 @@ void CSubPicAllocatorPresenterImpl::InitMaxSubtitleTextureSize(int maxSize, CSiz
}
}
-void CSubPicAllocatorPresenterImpl::AlphaBltSubPic(const CRect& windowRect, const CRect& videoRect, SubPicDesc* pTarget)
+void CSubPicAllocatorPresenterImpl::AlphaBltSubPic(const CRect& windowRect,
+ const CRect& videoRect,
+ SubPicDesc* pTarget /*= nullptr*/,
+ const double videoStretchFactor /*= 1.0*/)
{
CComPtr<ISubPic> pSubPic;
if (m_pSubPicQueue->LookupSubPic(m_rtNow, !IsRendering(), pSubPic)) {
CRect rcSource, rcDest;
- if (SUCCEEDED(pSubPic->GetSourceAndDest(windowRect, videoRect, rcSource, rcDest))) {
+ if (SUCCEEDED(pSubPic->GetSourceAndDest(windowRect, videoRect, rcSource, rcDest, videoStretchFactor))) {
pSubPic->AlphaBlt(rcSource, rcDest, pTarget);
}
}
@@ -168,9 +171,12 @@ STDMETHODIMP_(void) CSubPicAllocatorPresenterImpl::SetPosition(RECT w, RECT v)
m_windowRect = w;
- bool bVideoRectChanged = !!(m_videoRect != v);
+ CRect videoRect(v);
+ videoRect.OffsetRect(-m_windowRect.TopLeft());
- m_videoRect = v;
+ bool bVideoRectChanged = !!(m_videoRect != videoRect);
+
+ m_videoRect = videoRect;
if (bWindowSizeChanged || bVideoRectChanged) {
if (m_pAllocator) {
diff --git a/src/SubPic/SubPicAllocatorPresenterImpl.h b/src/SubPic/SubPicAllocatorPresenterImpl.h
index 5b2e5a2d4..2a9fa3cf1 100644
--- a/src/SubPic/SubPicAllocatorPresenterImpl.h
+++ b/src/SubPic/SubPicAllocatorPresenterImpl.h
@@ -66,7 +66,10 @@ protected:
SubtitleTextureLimit m_SubtitleTextureLimit;
void InitMaxSubtitleTextureSize(int maxSize, CSize desktopSize);
- void AlphaBltSubPic(const CRect& windowRect, const CRect& videoRect, SubPicDesc* pTarget = nullptr);
+ void AlphaBltSubPic(const CRect& windowRect,
+ const CRect& videoRect,
+ SubPicDesc* pTarget = nullptr,
+ const double videoStretchFactor = 1.0);
XForm m_xform;
void Transform(CRect r, Vector v[4]);
diff --git a/src/SubPic/SubPicImpl.cpp b/src/SubPic/SubPicImpl.cpp
index 625283a7a..bc06cf3ac 100644
--- a/src/SubPic/SubPicImpl.cpp
+++ b/src/SubPic/SubPicImpl.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -118,7 +118,9 @@ STDMETHODIMP CSubPicImpl::GetDirtyRect(RECT* pDirtyRect) const
return S_OK;
}
-STDMETHODIMP CSubPicImpl::GetSourceAndDest(RECT rcWindow, RECT rcVideo, RECT* pRcSource, RECT* pRcDest) const
+STDMETHODIMP CSubPicImpl::GetSourceAndDest(RECT rcWindow, RECT rcVideo,
+ RECT* pRcSource, RECT* pRcDest,
+ const double videoStretchFactor /*= 1.0*/) const
{
CheckPointer(pRcSource, E_POINTER);
CheckPointer(pRcDest, E_POINTER);
@@ -131,7 +133,11 @@ STDMETHODIMP CSubPicImpl::GetSourceAndDest(RECT rcWindow, RECT rcVideo, RECT* pR
// are often anamorphic and thus break the auto-fit logic
if (m_relativeTo == BEST_FIT && m_virtualTextureSize.cx > 720) {
double scaleFactor = 1.0;
- CSize szVideo = CRect(rcVideo).Size();
+ CRect videoRect(rcVideo);
+ LONG stretch = lround(videoRect.Width() * (1.0 - videoStretchFactor) / 2.0);
+ videoRect.left += stretch;
+ videoRect.right -= stretch;
+ CSize szVideo = videoRect.Size();
double subtitleAR = double(m_virtualTextureSize.cx) / m_virtualTextureSize.cy;
double videoAR = double(szVideo.cx) / szVideo.cy;
@@ -148,7 +154,7 @@ STDMETHODIMP CSubPicImpl::GetSourceAndDest(RECT rcWindow, RECT rcVideo, RECT* pR
}
scaleX = scaleY = scaleFactor;
- offset += CRect(rcVideo).TopLeft();
+ offset += videoRect.TopLeft();
} else {
CRect rcTarget = (m_relativeTo == WINDOW) ? rcWindow : rcVideo;
CSize szTarget = rcTarget.Size();
@@ -166,6 +172,11 @@ STDMETHODIMP CSubPicImpl::GetSourceAndDest(RECT rcWindow, RECT rcVideo, RECT* pR
lround(rcTemp.right * scaleX),
lround(rcTemp.bottom * scaleY));
rcTemp.OffsetRect(offset);
+
+ LONG stretch = lround(rcTemp.Width() * (1.0 - 1.0 / videoStretchFactor) / 2.0);
+ rcTemp.left += stretch;
+ rcTemp.right -= stretch;
+
*pRcDest = rcTemp;
return S_OK;
diff --git a/src/SubPic/SubPicImpl.h b/src/SubPic/SubPicImpl.h
index 18c388c1e..7d17243f1 100644
--- a/src/SubPic/SubPicImpl.h
+++ b/src/SubPic/SubPicImpl.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -96,7 +96,8 @@ public:
STDMETHODIMP AlphaBlt(RECT* pSrc, RECT* pDst, SubPicDesc* pTarget) PURE;
STDMETHODIMP SetVirtualTextureSize(const SIZE pSize, const POINT pTopLeft);
- STDMETHODIMP GetSourceAndDest(RECT rcWindow, RECT rcVideo, RECT* pRcSource, RECT* pRcDest) const;
+ STDMETHODIMP GetSourceAndDest(RECT rcWindow, RECT rcVideo, RECT* pRcSource,
+ RECT* pRcDest, const double videoStretchFactor = 1.0) const;
STDMETHODIMP GetRelativeTo(RelativeTo* pRelativeTo) const;
STDMETHODIMP SetRelativeTo(RelativeTo relativeTo);
diff --git a/src/SubPic/SubPicQueueImpl.cpp b/src/SubPic/SubPicQueueImpl.cpp
index f5d7abc22..87d880554 100644
--- a/src/SubPic/SubPicQueueImpl.cpp
+++ b/src/SubPic/SubPicQueueImpl.cpp
@@ -223,7 +223,7 @@ STDMETHODIMP CSubPicQueue::SetTime(REFERENCE_TIME rtNow)
STDMETHODIMP CSubPicQueue::Invalidate(REFERENCE_TIME rtInvalidate /*= -1*/)
{
- std::unique_lock<std::mutex> lock(m_mutexQueue);
+ std::unique_lock<std::mutex> lockQueue(m_mutexQueue);
#if SUBPIC_TRACE_LEVEL > 0
TRACE(_T("Invalidate: %f\n"), double(rtInvalidate) / 10000000.0);
@@ -234,7 +234,7 @@ STDMETHODIMP CSubPicQueue::Invalidate(REFERENCE_TIME rtInvalidate /*= -1*/)
m_rtNowLast = LONGLONG_ERROR;
{
- std::lock_guard<std::mutex> lock(m_mutexSubpic);
+ std::lock_guard<std::mutex> lockSubpic(m_mutexSubpic);
if (m_pSubPic && m_pSubPic->GetStop() > rtInvalidate) {
m_pSubPic.Release();
}
@@ -256,7 +256,7 @@ STDMETHODIMP CSubPicQueue::Invalidate(REFERENCE_TIME rtInvalidate /*= -1*/)
m_rtNow = rtInvalidate;
}
- lock.unlock();
+ lockQueue.unlock();
m_condQueueFull.notify_one();
m_runQueueEvent.Set();
diff --git a/src/Subtitles/ColorConvTable.cpp b/src/Subtitles/ColorConvTable.cpp
index 092d91e17..245fafdac 100644
--- a/src/Subtitles/ColorConvTable.cpp
+++ b/src/Subtitles/ColorConvTable.cpp
@@ -723,7 +723,6 @@ DWORD ColorConvTable::A8Y8U8V8_To_ARGB_PC_BT709(int a8, int y8, int u8, int v8)
DWORD ColorConvTable::A8Y8U8V8_PC_To_TV(int a8, int y8, int u8, int v8)
{
- const int FRACTION_SCALE = 1 << 16;
const int YUV_MIN = 16;
const int cy = int(219.0 / 255 * FRACTION_SCALE + 0.5);
const int cuv = int(224.0 / 255 * FRACTION_SCALE + 0.5);
@@ -735,7 +734,6 @@ DWORD ColorConvTable::A8Y8U8V8_PC_To_TV(int a8, int y8, int u8, int v8)
DWORD ColorConvTable::A8Y8U8V8_TV_To_PC(int a8, int y8, int u8, int v8)
{
- const int FRACTION_SCALE = 1 << 16;
const int YUV_MIN = 16;
const int cy = int(255 / 219.0 * FRACTION_SCALE + 0.5);
const int cuv = int(255 / 224.0 * FRACTION_SCALE + 0.5);
diff --git a/src/Subtitles/DVBSub.h b/src/Subtitles/DVBSub.h
index e2be34050..a393c06b2 100644
--- a/src/Subtitles/DVBSub.h
+++ b/src/Subtitles/DVBSub.h
@@ -75,7 +75,7 @@ private:
struct DVB_CLUT {
BYTE id = 0;
BYTE version_number = 0;
- BYTE size = 0;
+ WORD size = 0;
std::array<HDMV_PALETTE, 256> palette;
diff --git a/src/Subtitles/PGSSub.cpp b/src/Subtitles/PGSSub.cpp
index 3a13e0fee..d2abfd0f2 100644
--- a/src/Subtitles/PGSSub.cpp
+++ b/src/Subtitles/PGSSub.cpp
@@ -364,9 +364,9 @@ void CPGSSub::ParsePalette(CGolombBuffer* pGBuffer, size_t nSize) // #497
CLUT.version_number = pGBuffer->ReadByte();
ASSERT((nSize - 2) % sizeof(HDMV_PALETTE) == 0);
- CLUT.size = BYTE((nSize - 2) / sizeof(HDMV_PALETTE));
+ CLUT.size = WORD((nSize - 2) / sizeof(HDMV_PALETTE));
- for (int i = 0; i < CLUT.size; i++) {
+ for (WORD i = 0; i < CLUT.size; i++) {
CLUT.palette[i].entry_id = pGBuffer->ReadByte();
CLUT.palette[i].Y = pGBuffer->ReadByte();
diff --git a/src/Subtitles/PGSSub.h b/src/Subtitles/PGSSub.h
index ad651caad..d459048ef 100644
--- a/src/Subtitles/PGSSub.h
+++ b/src/Subtitles/PGSSub.h
@@ -84,7 +84,7 @@ private:
struct HDMV_CLUT {
BYTE id = 0;
BYTE version_number = 0;
- BYTE size = 0;
+ WORD size = 0;
std::array<HDMV_PALETTE, 256> palette;
diff --git a/src/Subtitles/RTS.cpp b/src/Subtitles/RTS.cpp
index 934c89b2e..ecce8ec72 100644
--- a/src/Subtitles/RTS.cpp
+++ b/src/Subtitles/RTS.cpp
@@ -40,7 +40,7 @@ static long revcolor(long c)
// CMyFont
-CMyFont::CMyFont(STSStyle& style)
+CMyFont::CMyFont(const STSStyle& style)
{
LOGFONT lf;
ZeroMemory(&lf, sizeof(lf));
@@ -66,7 +66,7 @@ CMyFont::CMyFont(STSStyle& style)
// CWord
-CWord::CWord(STSStyle& style, CStringW str, int ktype, int kstart, int kend, double scalex, double scaley,
+CWord::CWord(const STSStyle& style, CStringW str, int ktype, int kstart, int kend, double scalex, double scaley,
RenderingCaches& renderingCaches)
: m_fDrawn(false)
, m_p(INT_MAX, INT_MAX)
@@ -187,10 +187,13 @@ void CWord::Paint(const CPoint& p, const CPoint& org)
void CWord::Transform(CPoint org)
{
- if (m_bUseSSE2) { // SSE code
- Transform_SSE2(org);
- } else { // C-code
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
+ if (!m_bUseSSE2) {
Transform_C(org);
+ } else
+#endif
+ {
+ Transform_SSE2(org);
}
}
@@ -419,7 +422,7 @@ void CWord::Transform_SSE2(const CPoint& org)
// CText
-CText::CText(STSStyle& style, CStringW str, int ktype, int kstart, int kend, double scalex, double scaley,
+CText::CText(const STSStyle& style, CStringW str, int ktype, int kstart, int kend, double scalex, double scaley,
RenderingCaches& renderingCaches)
: CWord(style, str, ktype, kstart, kend, scalex, scaley, renderingCaches)
{
@@ -530,7 +533,7 @@ bool CText::CreatePath()
// CPolygon
-CPolygon::CPolygon(STSStyle& style, CStringW str, int ktype, int kstart, int kend, double scalex, double scaley, int baseline,
+CPolygon::CPolygon(const STSStyle& style, CStringW str, int ktype, int kstart, int kend, double scalex, double scaley, int baseline,
RenderingCaches& renderingCaches)
: CWord(style, str, ktype, kstart, kend, scalex, scaley, renderingCaches)
, m_baseline(baseline)
@@ -1968,8 +1971,8 @@ bool CRenderedTextSubtitle::ParseSSATag(SSATagsList& tagsList, const CStringW& s
tag.paramsInt.Add(wcstol(tag.params[0], nullptr, 10));
tag.params.RemoveAt(0);
} else if (nParams == 4) {
- for (size_t i = 0; i < nParams; i++) {
- tag.paramsInt.Add(wcstol(tag.params[i], nullptr, 10));
+ for (size_t n = 0; n < nParams; n++) {
+ tag.paramsInt.Add(wcstol(tag.params[n], nullptr, 10));
}
tag.params.RemoveAll();
}
@@ -1978,8 +1981,8 @@ bool CRenderedTextSubtitle::ParseSSATag(SSATagsList& tagsList, const CStringW& s
case SSA_fade: {
size_t nParams = tag.params.GetCount();
if (nParams == 7 || nParams == 2) {
- for (size_t i = 0; i < nParams; i++) {
- tag.paramsInt.Add(wcstol(tag.params[i], nullptr, 10));
+ for (size_t n = 0; n < nParams; n++) {
+ tag.paramsInt.Add(wcstol(tag.params[n], nullptr, 10));
}
tag.params.RemoveAll();
}
@@ -1988,11 +1991,11 @@ bool CRenderedTextSubtitle::ParseSSATag(SSATagsList& tagsList, const CStringW& s
case SSA_move: {
size_t nParams = tag.params.GetCount();
if (nParams == 4 || nParams == 6) {
- for (size_t i = 0; i < 4; i++) {
- tag.paramsReal.Add(wcstod(tag.params[i], nullptr));
+ for (size_t n = 0; n < 4; n++) {
+ tag.paramsReal.Add(wcstod(tag.params[n], nullptr));
}
- for (size_t i = 4; i < nParams; i++) {
- tag.paramsInt.Add(wcstol(tag.params[i], nullptr, 10));
+ for (size_t n = 4; n < nParams; n++) {
+ tag.paramsInt.Add(wcstol(tag.params[n], nullptr, 10));
}
tag.params.RemoveAll();
}
@@ -2002,8 +2005,8 @@ bool CRenderedTextSubtitle::ParseSSATag(SSATagsList& tagsList, const CStringW& s
case SSA_pos: {
size_t nParams = tag.params.GetCount();
if (nParams == 2) {
- for (size_t i = 0; i < nParams; i++) {
- tag.paramsReal.Add(wcstod(tag.params[i], nullptr));
+ for (size_t n = 0; n < nParams; n++) {
+ tag.paramsReal.Add(wcstod(tag.params[n], nullptr));
}
tag.params.RemoveAll();
}
@@ -2921,10 +2924,10 @@ STDMETHODIMP CRenderedTextSubtitle::Render(SubPicDesc& spd, REFERENCE_TIME rt, d
Init(CSize(spd.w, spd.h), spd.vidrect);
}
- int t = (int)(rt / 10000);
+ int time = (int)(rt / 10000);
int segment;
- const STSSegment* stss = SearchSubs(t, fps, &segment);
+ const STSSegment* stss = SearchSubs(time, fps, &segment);
if (!stss) {
return S_FALSE;
}
@@ -2938,7 +2941,7 @@ STDMETHODIMP CRenderedTextSubtitle::Render(SubPicDesc& spd, REFERENCE_TIME rt, d
m_subtitleCache.GetNextAssoc(pos, entry, pSub);
STSEntry& stse = GetAt(entry);
- if (stse.end < t) {
+ if (stse.end < time) {
delete pSub;
m_subtitleCache.RemoveKey(entry);
}
@@ -2966,7 +2969,7 @@ STDMETHODIMP CRenderedTextSubtitle::Render(SubPicDesc& spd, REFERENCE_TIME rt, d
{
int start = TranslateStart(entry, fps);
- m_time = t - start;
+ m_time = time - start;
m_delay = TranslateEnd(entry, fps) - start;
}
@@ -3003,9 +3006,7 @@ STDMETHODIMP CRenderedTextSubtitle::Render(SubPicDesc& spd, REFERENCE_TIME rt, d
int t2 = s->m_effects[k]->t[1];
if (t2 < t1) {
- int t = t1;
- t1 = t2;
- t2 = t;
+ std::swap(t1, t2);
}
if (t1 <= 0 && t2 <= 0) {
diff --git a/src/Subtitles/RTS.h b/src/Subtitles/RTS.h
index b2660d458..0e29b97d2 100644
--- a/src/Subtitles/RTS.h
+++ b/src/Subtitles/RTS.h
@@ -66,7 +66,7 @@ class CMyFont : public CFont
public:
int m_ascent, m_descent;
- CMyFont(STSStyle& style);
+ CMyFont(const STSStyle& style);
};
struct CTextDims {
@@ -107,7 +107,7 @@ public:
int m_width, m_ascent, m_descent;
// str[0] = 0 -> m_fLineBreak = true (in this case we only need and use the height of m_font from the whole class)
- CWord(STSStyle& style, CStringW str, int ktype, int kstart, int kend, double scalex, double scaley,
+ CWord(const STSStyle& style, CStringW str, int ktype, int kstart, int kend, double scalex, double scaley,
RenderingCaches& renderingCaches);
virtual ~CWord();
@@ -125,7 +125,7 @@ protected:
virtual bool CreatePath();
public:
- CText(STSStyle& style, CStringW str, int ktype, int kstart, int kend, double scalex, double scaley,
+ CText(const STSStyle& style, CStringW str, int ktype, int kstart, int kend, double scalex, double scaley,
RenderingCaches& renderingCaches);
virtual CWord* Copy();
@@ -145,7 +145,7 @@ protected:
virtual bool CreatePath();
public:
- CPolygon(STSStyle& style, CStringW str, int ktype, int kstart, int kend, double scalex, double scaley, int baseline,
+ CPolygon(const STSStyle& style, CStringW str, int ktype, int kstart, int kend, double scalex, double scaley, int baseline,
RenderingCaches& renderingCaches);
CPolygon(CPolygon&); // can't use a const reference because we need to use CAtlArray::Copy which expects a non-const reference
virtual ~CPolygon();
diff --git a/src/Subtitles/Rasterizer.cpp b/src/Subtitles/Rasterizer.cpp
index e61eb61b1..dc28ce7c2 100644
--- a/src/Subtitles/Rasterizer.cpp
+++ b/src/Subtitles/Rasterizer.cpp
@@ -29,14 +29,13 @@
#include "SeparableFilter.h"
// Statics constants for use by alpha_blend_sse2
-static __m128i low_mask = _mm_set1_epi16(0xFF);
-static __m128i red_mask = _mm_set1_epi32(0xFF);
-static __m128i green_mask = _mm_set1_epi32(0xFF00);
-static __m128i blue_mask = _mm_set1_epi32(0xFF0000);
-static __m128i alpha_bit_mask = _mm_set1_epi32(0xFF000000);
-static __m128i one = _mm_set1_epi16(1);
-static __m128i inv_one = _mm_set1_epi16(0x100);
-static __m128i zero = _mm_setzero_si128();
+static const __m128i low_mask = _mm_set1_epi16(0xFF);
+static const __m128i red_mask = _mm_set1_epi32(0xFF);
+static const __m128i green_mask = _mm_set1_epi32(0xFF00);
+static const __m128i blue_mask = _mm_set1_epi32(0xFF0000);
+static const __m128i alpha_bit_mask = _mm_set1_epi32(0xFF000000);
+static const __m128i one = _mm_set1_epi16(1);
+static const __m128i inv_one = _mm_set1_epi16(0x100);
int Rasterizer::getOverlayWidth()
{
@@ -53,9 +52,11 @@ Rasterizer::Rasterizer()
, mEdgeNext(0)
, mpScanBuffer(0)
{
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
int cpuInfo[4] = { -1 };
__cpuid(cpuInfo, 1);
m_bUseSSE2 = !!(cpuInfo[3] & (1 << 26));
+#endif
}
Rasterizer::~Rasterizer()
@@ -894,16 +895,19 @@ bool Rasterizer::Rasterize(int xsub, int ysub, int fBlur, double fGaussianBlur)
byte* src = m_pOutlineData->mWideOutline.empty() ? m_pOverlayData->mpOverlayBufferBody : m_pOverlayData->mpOverlayBufferBorder;
- if (m_bUseSSE2) {
- SeparableFilterX_SSE2(src, tmp, m_pOverlayData->mOverlayWidth, m_pOverlayData->mOverlayHeight, pitch,
- filter.kernel, filter.width, filter.divisor);
- SeparableFilterY_SSE2(tmp, src, m_pOverlayData->mOverlayWidth, m_pOverlayData->mOverlayHeight, pitch,
- filter.kernel, filter.width, filter.divisor);
- } else {
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
+ if (!m_bUseSSE2) {
SeparableFilterX<1>(src, tmp, m_pOverlayData->mOverlayWidth, m_pOverlayData->mOverlayHeight, pitch,
filter.kernel, filter.width, filter.divisor);
SeparableFilterY<1>(tmp, src, m_pOverlayData->mOverlayWidth, m_pOverlayData->mOverlayHeight, pitch,
filter.kernel, filter.width, filter.divisor);
+ } else
+#endif
+ {
+ SeparableFilterX_SSE2(src, tmp, m_pOverlayData->mOverlayWidth, m_pOverlayData->mOverlayHeight, pitch,
+ filter.kernel, filter.width, filter.divisor);
+ SeparableFilterY_SSE2(tmp, src, m_pOverlayData->mOverlayWidth, m_pOverlayData->mOverlayHeight, pitch,
+ filter.kernel, filter.width, filter.divisor);
}
_aligned_free(tmp);
@@ -972,6 +976,7 @@ static __forceinline void pixmix2(DWORD* dst, DWORD color, DWORD shapealpha, DWO
// Alpha blend 8 pixels at once. This is just pixmix_sse2, but done in a more vectorized manner.
static __forceinline void alpha_blend_sse2(DWORD* dst, DWORD original_color, BYTE* s, int wt)
{
+ __m128i zero = _mm_setzero_si128();
__m128i srcR = _mm_set1_epi32(original_color & 0xFF);
__m128i srcG = _mm_set1_epi32((original_color & 0xFF00) >> 8);
__m128i srcB = _mm_set1_epi32((original_color & 0xFF0000) >> 16);
@@ -1592,18 +1597,24 @@ CRect Rasterizer::Draw(SubPicDesc& spd, CRect& clipRect, byte* pAlphaMask, int x
if (switchpts[1] == DWORD_MAX) {
// fBody is true if we're rendering a fill or a shadow.
if (fBody) {
- if (m_bUseSSE2) {
- Draw_noAlpha_spFF_Body_sse2(rnfo);
- } else {
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
+ if (!m_bUseSSE2) {
Draw_noAlpha_spFF_Body_0(rnfo);
+ } else
+#endif
+ {
+ Draw_noAlpha_spFF_Body_sse2(rnfo);
}
}
// Not painting body, ie. painting border without fill in it
else {
- if (m_bUseSSE2) {
- Draw_noAlpha_spFF_noBody_sse2(rnfo);
- } else {
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
+ if (!m_bUseSSE2) {
Draw_noAlpha_spFF_noBody_0(rnfo);
+ } else
+#endif
+ {
+ Draw_noAlpha_spFF_noBody_sse2(rnfo);
}
}
}
@@ -1613,18 +1624,24 @@ CRect Rasterizer::Draw(SubPicDesc& spd, CRect& clipRect, byte* pAlphaMask, int x
//const long *sw = switchpts;
if (fBody) {
- if (m_bUseSSE2) {
- Draw_noAlpha_sp_Body_sse2(rnfo);
- } else {
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
+ if (!m_bUseSSE2) {
Draw_noAlpha_sp_Body_0(rnfo);
+ } else
+#endif
+ {
+ Draw_noAlpha_sp_Body_sse2(rnfo);
}
}
// Not body
else {
- if (m_bUseSSE2) {
- Draw_noAlpha_sp_noBody_sse2(rnfo);
- } else {
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
+ if (!m_bUseSSE2) {
Draw_noAlpha_sp_noBody_0(rnfo);
+ } else
+#endif
+ {
+ Draw_noAlpha_sp_noBody_sse2(rnfo);
}
}
}
@@ -1633,32 +1650,44 @@ CRect Rasterizer::Draw(SubPicDesc& spd, CRect& clipRect, byte* pAlphaMask, int x
else {
if (switchpts[1] == DWORD_MAX) {
if (fBody) {
- if (m_bUseSSE2) {
- Draw_Alpha_spFF_Body_sse2(rnfo);
- } else {
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
+ if (!m_bUseSSE2) {
Draw_Alpha_spFF_Body_0(rnfo);
+ } else
+#endif
+ {
+ Draw_Alpha_spFF_Body_sse2(rnfo);
}
} else {
- if (m_bUseSSE2) {
- Draw_Alpha_spFF_noBody_sse2(rnfo);
- } else {
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
+ if (!m_bUseSSE2) {
Draw_Alpha_spFF_noBody_0(rnfo);
+ } else
+#endif
+ {
+ Draw_Alpha_spFF_noBody_sse2(rnfo);
}
}
} else {
//const long *sw = switchpts;
if (fBody) {
- if (m_bUseSSE2) {
- Draw_Alpha_sp_Body_sse2(rnfo);
- } else {
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
+ if (!m_bUseSSE2) {
Draw_Alpha_sp_Body_0(rnfo);
+ } else
+#endif
+ {
+ Draw_Alpha_sp_Body_sse2(rnfo);
}
} else {
- if (m_bUseSSE2) {
- Draw_Alpha_sp_noBody_sse2(rnfo);
- } else {
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
+ if (!m_bUseSSE2) {
Draw_Alpha_sp_noBody_0(rnfo);
+ } else
+#endif
+ {
+ Draw_Alpha_sp_noBody_sse2(rnfo);
}
}
}
@@ -1679,10 +1708,13 @@ void Rasterizer::FillSolidRect(SubPicDesc& spd, int x, int y, int nWidth, int nH
for (int wy = y; wy < y + nHeight; wy++) {
DWORD* dst = (DWORD*)((BYTE*)spd.bits + spd.pitch * wy) + x;
for (int wt = 0; wt < nWidth; ++wt) {
- if (m_bUseSSE2) {
- pixmix_sse2(&dst[wt], lColor, 0x40); // 0x40 because >> 6 in pixmix (to preserve tranparency)
- } else {
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
+ if (!m_bUseSSE2) {
pixmix(&dst[wt], lColor, 0x40);
+ } else
+#endif
+ {
+ pixmix_sse2(&dst[wt], lColor, 0x40); // 0x40 because >> 6 in pixmix (to preserve tranparency)
}
}
}
diff --git a/src/Subtitles/Rasterizer.h b/src/Subtitles/Rasterizer.h
index 975c35f11..f653fa0c4 100644
--- a/src/Subtitles/Rasterizer.h
+++ b/src/Subtitles/Rasterizer.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -173,7 +173,9 @@ protected:
BYTE* mpPathTypes;
POINT* mpPathPoints;
int mPathPoints;
+#if defined(_M_IX86_FP) && _M_IX86_FP < 2
bool m_bUseSSE2;
+#endif
private:
enum {
diff --git a/src/Subtitles/STS.cpp b/src/Subtitles/STS.cpp
index 8ec947531..701a51535 100644
--- a/src/Subtitles/STS.cpp
+++ b/src/Subtitles/STS.cpp
@@ -464,58 +464,67 @@ static CStringW SubRipper2SSA(CStringW str, int CharSet)
static bool OpenSubRipper(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet)
{
- CStringW buff;
+ CStringW buff, start, end;
while (file->ReadString(buff)) {
FastTrim(buff);
if (buff.IsEmpty()) {
continue;
}
- WCHAR sep;
int num = 0; // This one isn't really used just assigned a new value
- int hh1, mm1, ss1, ms1, hh2, mm2, ss2, ms2;
- WCHAR msStr1[5] = {0}, msStr2[5] = {0};
- int c = swscanf_s(buff, L"%d%c%d%c%d%4[^-] --> %d%c%d%c%d%4s\n",
- &hh1, &sep, 1, &mm1, &sep, 1, &ss1, msStr1, _countof(msStr1),
- &hh2, &sep, 1, &mm2, &sep, 1, &ss2, msStr2, _countof(msStr2));
- if (c == 1) { // numbering
- num = hh1;
- } else if (c >= 11) { // time info
- // Parse ms if present
- if (2 != swscanf_s(msStr1, L"%c%d", &sep, 1, &ms1)) {
- ms1 = 0;
- }
- if (2 != swscanf_s(msStr2, L"%c%d", &sep, 1, &ms2)) {
- ms2 = 0;
- }
+ WCHAR wc;
+ int c = swscanf_s(buff, L"%d%c", &num, &wc, 1);
+
+ if (c == 2) { // c == 1 would be numbering, c == 2 might be timecodes
+ int len = buff.GetLength();
+ c = swscanf_s(buff, L"%s --> %s", start.GetBuffer(len), len, end.GetBuffer(len), len);
+ start.ReleaseBuffer();
+ end.ReleaseBuffer();
+
+ auto readTimeCode = [](LPCWSTR str, int& hh, int& mm, int& ss, int& ms) {
+ WCHAR sep;
+ int c = swscanf_s(str, L"%d%c%d%c%d%c%d",
+ &hh, &sep, 1, &mm, &sep, 1, &ss, &sep, 1, &ms);
+ // Check if ms was present
+ if (c == 5) {
+ ms = 0;
+ }
+ return (c == 5 || c == 7);
+ };
- CStringW str, tmp;
+ int hh1, mm1, ss1, ms1, hh2, mm2, ss2, ms2;
- bool fFoundEmpty = false;
+ if (c == 2
+ && readTimeCode(start, hh1, mm1, ss1, ms1)
+ && readTimeCode(end, hh2, mm2, ss2, ms2)) {
+ CStringW str, tmp;
- while (file->ReadString(tmp)) {
- FastTrim(tmp);
- if (tmp.IsEmpty()) {
- fFoundEmpty = true;
- }
+ bool bFoundEmpty = false;
- int num2;
- WCHAR wc;
- if (swscanf_s(tmp, L"%d%c", &num2, &wc, 1) == 1 && fFoundEmpty) {
- num = num2;
- break;
+ while (file->ReadString(tmp)) {
+ FastTrim(tmp);
+ if (tmp.IsEmpty()) {
+ bFoundEmpty = true;
+ }
+
+ int num2;
+ if (swscanf_s(tmp, L"%d%c", &num2, &wc, 1) == 1 && bFoundEmpty) {
+ num = num2;
+ break;
+ }
+
+ str += tmp + '\n';
}
- str += tmp + '\n';
+ ret.Add(SubRipper2SSA(str, CharSet),
+ file->IsUnicode(),
+ (((hh1 * 60 + mm1) * 60) + ss1) * 1000 + ms1,
+ (((hh2 * 60 + mm2) * 60) + ss2) * 1000 + ms2);
+ } else {
+ return false;
}
-
- ret.Add(
- SubRipper2SSA(str, CharSet),
- file->IsUnicode(),
- (((hh1 * 60 + mm1) * 60) + ss1) * 1000 + ms1,
- (((hh2 * 60 + mm2) * 60) + ss2) * 1000 + ms2);
- } else if (c != EOF) { // might be another format
+ } else if (c != 1) { // might be another format
return false;
}
}
@@ -619,8 +628,8 @@ static bool OpenSubViewer(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet
WCHAR sep;
int hh1, mm1, ss1, hs1, hh2, mm2, ss2, hs2;
int c = swscanf_s(buff, L"%d:%d:%d%c%d,%d:%d:%d%c%d\n",
- &hh1, &mm1, &ss1, &sep, sizeof(WCHAR),
- &hs1, &hh2, &mm2, &ss2, &sep, sizeof(WCHAR), &hs2);
+ &hh1, &mm1, &ss1, &sep, 1,
+ &hs1, &hh2, &mm2, &ss2, &sep, 1, &hs2);
if (c == 10) {
CStringW str;
@@ -2423,7 +2432,7 @@ bool CSimpleTextSubtitle::GetStyle(CString styleName, STSStyle& stss)
int CSimpleTextSubtitle::GetCharSet(int i)
{
const STSStyle* stss = GetStyle(i);
- return stss->charSet;
+ return stss ? stss->charSet : DEFAULT_CHARSET;
}
bool CSimpleTextSubtitle::IsEntryUnicode(int i)
@@ -2753,17 +2762,15 @@ bool CSimpleTextSubtitle::SaveAs(CString fn, Subtitle::SubType type,
if (type == Subtitle::ASS && m_fScaledBAS) {
str += _T("ScaledBorderAndShadow: Yes\n");
}
- str += _T("PlayResX: %d\n");
- str += _T("PlayResY: %d\n");
+ str.AppendFormat(_T("PlayResX: %d\n"), m_dstScreenSize.cx);
+ str.AppendFormat(_T("PlayResY: %d\n"), m_dstScreenSize.cy);
str += _T("Timer: 100.0000\n");
str += _T("\n");
str += (type == Subtitle::SSA)
? _T("[V4 Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding\n")
: _T("[V4+ Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding\n");
- CString str2;
- str2.Format(str, m_dstScreenSize.cx, m_dstScreenSize.cy);
- f.WriteString(str2);
+ f.WriteString(str);
str = (type == Subtitle::SSA)
? _T("Style: %s,%s,%d,&H%06x,&H%06x,&H%06x,&H%06x,%d,%d,%d,%.2f,%.2f,%d,%d,%d,%d,%d,%d\n")
@@ -3030,7 +3037,7 @@ STSStyle& STSStyle::operator = (LOGFONT& lf)
return *this;
}
-LOGFONTA& operator <<= (LOGFONTA& lfa, STSStyle& s)
+LOGFONTA& operator <<= (LOGFONTA& lfa, const STSStyle& s)
{
lfa.lfCharSet = (BYTE)s.charSet;
strncpy_s(lfa.lfFaceName, LF_FACESIZE, CStringA(s.fontName), _TRUNCATE);
@@ -3044,7 +3051,7 @@ LOGFONTA& operator <<= (LOGFONTA& lfa, STSStyle& s)
return lfa;
}
-LOGFONTW& operator <<= (LOGFONTW& lfw, STSStyle& s)
+LOGFONTW& operator <<= (LOGFONTW& lfw, const STSStyle& s)
{
lfw.lfCharSet = (BYTE)s.charSet;
wcsncpy_s(lfw.lfFaceName, LF_FACESIZE, CStringW(s.fontName), _TRUNCATE);
diff --git a/src/Subtitles/STS.h b/src/Subtitles/STS.h
index 5803f9d88..b927b7052 100644
--- a/src/Subtitles/STS.h
+++ b/src/Subtitles/STS.h
@@ -72,8 +72,8 @@ public:
STSStyle& operator = (LOGFONT& lf);
- friend LOGFONTA& operator <<= (LOGFONTA& lfa, STSStyle& s);
- friend LOGFONTW& operator <<= (LOGFONTW& lfw, STSStyle& s);
+ friend LOGFONTA& operator <<= (LOGFONTA& lfa, const STSStyle& s);
+ friend LOGFONTW& operator <<= (LOGFONTW& lfw, const STSStyle& s);
friend CString& operator <<= (CString& style, const STSStyle& s);
friend STSStyle& operator <<= (STSStyle& s, const CString& style);
diff --git a/src/Subtitles/SubtitleHelpers.cpp b/src/Subtitles/SubtitleHelpers.cpp
index 8dcea6ad3..c44567675 100644
--- a/src/Subtitles/SubtitleHelpers.cpp
+++ b/src/Subtitles/SubtitleHelpers.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -109,12 +109,12 @@ void Subtitle::GetSubFileNames(CString fn, const CAtlArray<CString>& paths, CAtl
HANDLE hFile = FindFirstFile(path + title + _T("*"), &wfd);
if (hFile != INVALID_HANDLE_VALUE) {
do {
- CString fn = path + wfd.cFileName;
+ CString fn2 = path + wfd.cFileName;
if (std::regex_match(&wfd.cFileName[titleLength], reSub)) {
- subs.AddTail(fn);
+ subs.AddTail(fn2);
} else if (std::regex_match(&wfd.cFileName[titleLength], reVid)) {
// Convert to lower-case and cut the extension for easier matching
- vids.AddTail(fn.Left(fn.ReverseFind(_T('.'))).MakeLower());
+ vids.AddTail(fn2.Left(fn2.ReverseFind(_T('.'))).MakeLower());
}
} while (FindNextFile(hFile, &wfd));
@@ -123,8 +123,8 @@ void Subtitle::GetSubFileNames(CString fn, const CAtlArray<CString>& paths, CAtl
POSITION posSub = subs.GetHeadPosition();
while (posSub) {
- CString& fn = subs.GetNext(posSub);
- CString fnlower = fn;
+ CString& fn2 = subs.GetNext(posSub);
+ CString fnlower = fn2;
fnlower.MakeLower();
// Check if there is an exact match for another video file
@@ -139,7 +139,7 @@ void Subtitle::GetSubFileNames(CString fn, const CAtlArray<CString>& paths, CAtl
if (!bMatchAnotherVid) {
SubFile f;
- f.fn = fn;
+ f.fn = fn2;
ret.Add(f);
}
}
diff --git a/src/Subtitles/USFSubtitles.cpp b/src/Subtitles/USFSubtitles.cpp
index 737dad5e0..dedd644c1 100644
--- a/src/Subtitles/USFSubtitles.cpp
+++ b/src/Subtitles/USFSubtitles.cpp
@@ -458,9 +458,9 @@ bool CUSFSubtitles::ParseUSFSubtitles(CComPtr<IXMLDOMNode> pNode)
// metadata
BeginEnumChildren(pNode, pChild) {
- DeclareNameAndValue(pChild, name, val);
+ DeclareNameAndValue(pChild, childName, childVal);
- if (name == L"metadata") {
+ if (childName == L"metadata") {
ParseMetadata(pChild, metadata);
}
}
@@ -469,13 +469,13 @@ bool CUSFSubtitles::ParseUSFSubtitles(CComPtr<IXMLDOMNode> pNode)
// styles
BeginEnumChildren(pNode, pChild) {
- DeclareNameAndValue(pChild, name, val);
+ DeclareNameAndValue(pChild, childName, childVal);
- if (name == L"styles") {
+ if (childName == L"styles") {
BeginEnumChildren(pChild, pGrandChild) { // :)
- DeclareNameAndValue(pGrandChild, name, val);
+ DeclareNameAndValue(pGrandChild, grandChildName, grandChildVal);
- if (name == L"style") {
+ if (grandChildName == L"style") {
CAutoPtr<style_t> s(DEBUG_NEW style_t);
if (s) {
ParseStyle(pGrandChild, s);
@@ -491,13 +491,13 @@ bool CUSFSubtitles::ParseUSFSubtitles(CComPtr<IXMLDOMNode> pNode)
// effects
BeginEnumChildren(pNode, pChild) {
- DeclareNameAndValue(pChild, name, val);
+ DeclareNameAndValue(pChild, childName, childVal);
- if (name == L"effects") {
+ if (childName == L"effects") {
BeginEnumChildren(pChild, pGrandChild) { // :)
- DeclareNameAndValue(pGrandChild, name, val);
+ DeclareNameAndValue(pGrandChild, grandChildName, grandChildVal);
- if (name == L"effect") {
+ if (grandChildName == L"effect") {
CAutoPtr<effect_t> e(DEBUG_NEW effect_t);
if (e) {
ParseEffect(pGrandChild, e);
@@ -513,13 +513,13 @@ bool CUSFSubtitles::ParseUSFSubtitles(CComPtr<IXMLDOMNode> pNode)
// subtitles
BeginEnumChildren(pNode, pChild) {
- DeclareNameAndValue(pChild, name, val);
+ DeclareNameAndValue(pChild, childName, childVal);
- if (name == L"subtitles") {
+ if (childName == L"subtitles") {
BeginEnumChildren(pChild, pGrandChild) { // :)
- DeclareNameAndValue(pGrandChild, name, val);
+ DeclareNameAndValue(pGrandChild, grandChildName, grandChildVal);
- if (name == L"subtitle") {
+ if (grandChildName == L"subtitle") {
CStringW sstart = GetAttrib(L"start", pGrandChild);
CStringW sstop = GetAttrib(L"stop", pGrandChild);
CStringW sduration = GetAttrib(L"duration", pGrandChild);
@@ -563,13 +563,13 @@ void CUSFSubtitles::ParseMetadata(CComPtr<IXMLDOMNode> pNode, metadata_t& m)
m.comment = GetText(pNode);
} else if (name == L"author") {
BeginEnumChildren(pNode, pChild) {
- DeclareNameAndValue(pChild, name, val);
+ DeclareNameAndValue(pChild, childName, childVal);
- if (name == L"name") {
+ if (childName == L"name") {
m.author.name = GetText(pChild);
- } else if (name == L"email") {
+ } else if (childName == L"email") {
m.author.email = GetText(pChild);
- } else if (name == L"url") {
+ } else if (childName == L"url") {
m.author.url = GetText(pChild);
}
}
@@ -646,9 +646,9 @@ void CUSFSubtitles::ParseEffect(CComPtr<IXMLDOMNode> pNode, effect_t* e)
e->name = GetAttrib(L"name", pNode);
} else if (name == L"keyframes") {
BeginEnumChildren(pNode, pChild) {
- DeclareNameAndValue(pChild, name, val);
+ DeclareNameAndValue(pChild, childName, childVal);
- if (name == L"keyframe") {
+ if (childName == L"keyframe") {
CAutoPtr<keyframe_t> k(DEBUG_NEW keyframe_t);
if (k) {
ParseKeyframe(pChild, k);
diff --git a/src/Subtitles/VobSubFile.cpp b/src/Subtitles/VobSubFile.cpp
index 1c0983ced..6567cb137 100644
--- a/src/Subtitles/VobSubFile.cpp
+++ b/src/Subtitles/VobSubFile.cpp
@@ -598,6 +598,8 @@ bool CVobSubFile::ReadIdx(CString fn, int& ver)
}
m_nLang = (iLang < 0 && size_t(iLang) >= m_langs.size()) ? SIZE_T_ERROR : size_t(iLang);
} else if (entry == _T("palette")) {
+ // The assert guarantees that the shortcut we use will work as expected
+ static_assert(sizeof(RGBQUAD) == 4, "Packing error");
if (_stscanf_s(str, _T("%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x"),
&m_orgpal[0], &m_orgpal[1], &m_orgpal[2], &m_orgpal[3],
&m_orgpal[4], &m_orgpal[5], &m_orgpal[6], &m_orgpal[7],
@@ -1940,7 +1942,7 @@ bool CVobSubFile::SaveScenarist(CString fn, int delay)
BITMAPINFOHEADER ihdr = {
sizeof(BITMAPINFOHEADER),
720, m_size.cy - 2, 1, 4, 0,
- 360 * (m_size.cy - 2),
+ DWORD(360 * (m_size.cy - 2)),
0, 0,
16, 4
};
@@ -2176,7 +2178,7 @@ bool CVobSubFile::SaveMaestro(CString fn, int delay)
BITMAPINFOHEADER ihdr = {
sizeof(BITMAPINFOHEADER),
720, m_size.cy - 2, 1, 4, 0,
- 360 * (m_size.cy - 2),
+ DWORD(360 * (m_size.cy - 2)),
0, 0,
16, 4
};
@@ -2400,7 +2402,7 @@ void CVobSubStream::Open(CString name, BYTE* pData, int len)
m_alignver = ver == _T("TOP") ? 0 : ver == _T("CENTER") ? 1 : /*ver == _T("BOTTOM") ? 2 :*/ 2;
}
} else if (key == _T("fade in/out")) {
- _stscanf_s(value, _T("%d%, %d%"), &m_fadein, &m_fadeout);
+ _stscanf_s(value, _T("%d, %d"), &m_fadein, &m_fadeout);
} else if (key == _T("time offset")) {
m_toff = _tcstol(value, nullptr, 10);
} else if (key == _T("forced subs")) {
diff --git a/src/filters/Filters.h b/src/filters/Filters.h
index 2ca0a5d13..a41b41be8 100644
--- a/src/filters/Filters.h
+++ b/src/filters/Filters.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2014 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -29,7 +29,6 @@
#include "reader/CDDAReader/CDDAReader.h"
#include "reader/CDXAReader/CDXAReader.h"
#include "reader/VTSReader/VTSReader.h"
-#include "renderer/MpcAudioRenderer/MpcAudioRenderer.h"
#include "renderer/SyncClock/SyncClock.h"
#include "source/SubtitleSource/SubtitleSource.h"
#include "switcher/AudioSwitcher/AudioSwitcher.h"
diff --git a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp
index c5be29d31..c9c2de091 100644
--- a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp
+++ b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp
@@ -546,12 +546,12 @@ DWORD CMatroskaMuxerFilter::ThreadProc()
if (!fTracksWritten) {
CNode<Track> Tracks;
CAutoPtr<Track> pT(DEBUG_NEW Track());
- POSITION pos = pActivePins.GetHeadPosition();
+ pos = pActivePins.GetHeadPosition();
for (int i = 1; pos; i++) {
- CMatroskaMuxerInputPin* pPin = pActivePins.GetNext(pos);
+ CMatroskaMuxerInputPin* pActivePin = pActivePins.GetNext(pos);
CAutoPtr<TrackEntry> pTE(DEBUG_NEW TrackEntry());
- *pTE = *pPin->GetTrackEntry();
+ *pTE = *pActivePin->GetTrackEntry();
if (TrackNumber == 0 && pTE->TrackType == TrackEntry::TypeVideo) {
TrackNumber = pTE->TrackNumber;
}
@@ -1228,7 +1228,7 @@ STDMETHODIMP CMatroskaMuxerInputPin::Receive(IMediaSample* pSample)
return hr;
}
- long len = pSample->GetActualDataLength();
+ long inputLen = pSample->GetActualDataLength();
REFERENCE_TIME rtStart = -1, rtStop = -1;
hr = pSample->GetTime(&rtStart, &rtStop);
@@ -1245,15 +1245,15 @@ STDMETHODIMP CMatroskaMuxerInputPin::Receive(IMediaSample* pSample)
TRACE(_T("Received (%u): %I64d-%I64d (c=%d, co=%dms), len=%ld, d%d p%d s%d\n"),
(static_cast<CMatroskaMuxerFilter*>(m_pFilter))->GetTrackNumber(this),
rtStart, rtStop, (int)((rtStart / 10000) / MAXCLUSTERTIME), (int)((rtStart / 10000) % MAXCLUSTERTIME),
- len,
+ inputLen,
pSample->IsDiscontinuity() == S_OK ? 1 : 0,
pSample->IsPreroll() == S_OK ? 1 : 0,
pSample->IsSyncPoint() == S_OK ? 1 : 0);
if (m_mt.subtype == MEDIASUBTYPE_Vorbis && m_pVorbisHdrs.GetCount() < 3) {
CAutoPtr<CBinary> data(DEBUG_NEW CBinary(0));
- data->SetCount(len);
- memcpy(data->GetData(), pData, len);
+ data->SetCount(inputLen);
+ memcpy(data->GetData(), pData, inputLen);
m_pVorbisHdrs.Add(data);
if (m_pVorbisHdrs.GetCount() == 3) {
@@ -1270,8 +1270,8 @@ STDMETHODIMP CMatroskaMuxerInputPin::Receive(IMediaSample* pSample)
*dst++ = 2;
for (size_t i = 0; i < 2; i++) {
- for (INT_PTR len = m_pVorbisHdrs[i]->GetCount(); len >= 0; len -= 255) {
- *dst++ = (BYTE)std::min<INT_PTR>(len, 255);
+ for (INT_PTR len2 = m_pVorbisHdrs[i]->GetCount(); len2 >= 0; len2 -= 255) {
+ *dst++ = (BYTE)std::min<INT_PTR>(len2, 255);
}
}
@@ -1315,8 +1315,8 @@ STDMETHODIMP CMatroskaMuxerInputPin::Receive(IMediaSample* pSample)
}
CAutoPtr<CBinary> data(DEBUG_NEW CBinary(0));
- data->SetCount(len);
- memcpy(data->GetData(), pData, len);
+ data->SetCount(inputLen);
+ memcpy(data->GetData(), pData, inputLen);
b->Block.BlockData.AddTail(data);
CAutoLock cAutoLock2(&m_csQueue);
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.cpp b/src/filters/parser/BaseSplitter/BaseSplitter.cpp
index a16b45bd4..2e29e37c1 100644
--- a/src/filters/parser/BaseSplitter/BaseSplitter.cpp
+++ b/src/filters/parser/BaseSplitter/BaseSplitter.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -1095,9 +1095,9 @@ bool CBaseSplitterFilter::IsAnyPinDrying()
// if (m_priority != THREAD_PRIORITY_ABOVE_NORMAL && (count < MINPACKETS/3 || size < MINPACKETSIZE/3))
if (m_priority != THREAD_PRIORITY_BELOW_NORMAL && (count < MINPACKETS / 3 || size < MINPACKETSIZE / 3)) {
// SetThreadPriority(m_hThread, m_priority = THREAD_PRIORITY_ABOVE_NORMAL);
- POSITION pos = m_pOutputs.GetHeadPosition();
- while (pos) {
- m_pOutputs.GetNext(pos)->SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
+ POSITION pos2 = m_pOutputs.GetHeadPosition();
+ while (pos2) {
+ m_pOutputs.GetNext(pos2)->SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
}
m_priority = THREAD_PRIORITY_BELOW_NORMAL;
}
@@ -1109,9 +1109,9 @@ bool CBaseSplitterFilter::IsAnyPinDrying()
if (m_priority != THREAD_PRIORITY_NORMAL && (totalcount > m_QueueMaxPackets * 2 / 3 || totalsize > MAXPACKETSIZE * 2 / 3)) {
// SetThreadPriority(m_hThread, m_priority = THREAD_PRIORITY_NORMAL);
- POSITION pos = m_pOutputs.GetHeadPosition();
- while (pos) {
- m_pOutputs.GetNext(pos)->SetThreadPriority(THREAD_PRIORITY_NORMAL);
+ POSITION pos2 = m_pOutputs.GetHeadPosition();
+ while (pos2) {
+ m_pOutputs.GetNext(pos2)->SetThreadPriority(THREAD_PRIORITY_NORMAL);
}
m_priority = THREAD_PRIORITY_NORMAL;
}
diff --git a/src/filters/reader/CDXAReader/CDXAReader.cpp b/src/filters/reader/CDXAReader/CDXAReader.cpp
index b27bc189f..9d111ab9c 100644
--- a/src/filters/reader/CDXAReader/CDXAReader.cpp
+++ b/src/filters/reader/CDXAReader/CDXAReader.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -475,8 +475,8 @@ bool CCDXAStream::LookForMediaSubType()
_stprintf_s(number, _countof(number), _T("%d"), j);
TCHAR pattern[256 + 1];
- ULONG len = 256;
- if (ERROR_SUCCESS != subkey.QueryStringValue(number, pattern, &len)) {
+ ULONG lenValue = 256;
+ if (ERROR_SUCCESS != subkey.QueryStringValue(number, pattern, &lenValue)) {
break;
}
diff --git a/src/filters/renderer/MpcAudioRenderer/IMpcAudioRendererFilter.h b/src/filters/renderer/MpcAudioRenderer/IMpcAudioRendererFilter.h
deleted file mode 100644
index a9e33ebf5..000000000
--- a/src/filters/renderer/MpcAudioRenderer/IMpcAudioRendererFilter.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * (C) 2010-2013 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#pragma once
-
-interface __declspec(uuid("495D2C66-D430-439b-9DEE-40F9B7929BBA"))
-IMpcAudioRendererFilter :
-public IUnknown {
- STDMETHOD(Apply()) PURE;
-
- STDMETHOD(SetWasapiMode(BOOL nValue)) PURE;
- STDMETHOD_(BOOL, GetWasapiMode()) PURE;
- STDMETHOD(SetMuteFastForward(BOOL nValue)) PURE;
- STDMETHOD_(BOOL, GetMuteFastForward()) PURE;
- STDMETHOD(SetSoundDevice(CString nValue)) PURE;
- STDMETHOD_(CString, GetSoundDevice()) PURE;
-};
diff --git a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.cpp b/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.cpp
deleted file mode 100644
index 6d7498e21..000000000
--- a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.cpp
+++ /dev/null
@@ -1,1319 +0,0 @@
-/*
- * (C) 2009-2014 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "stdafx.h"
-
-#ifdef STANDALONE_FILTER
-#include <InitGuid.h>
-#endif
-#include "moreuuids.h"
-#include "../../../DSUtil/DSUtil.h"
-#include <ks.h>
-#include <ksmedia.h>
-
-#include "MpcAudioRenderer.h"
-
-
-#ifdef STANDALONE_FILTER
-
-const AMOVIESETUP_MEDIATYPE sudPinTypesIn[] = {
- {&GUID_NULL},
-};
-
-const AMOVIESETUP_PIN sudpPins[] = {
- {L"Input", FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
-};
-
-const AMOVIESETUP_FILTER sudFilter[] = {
- {&__uuidof(CMpcAudioRenderer), MpcAudioRendererName, 0x40000001, _countof(sudpPins), sudpPins, CLSID_AudioRendererCategory},
-};
-
-CFactoryTemplate g_Templates[] = {
- {sudFilter[0].strName, &__uuidof(CMpcAudioRenderer), CreateInstance<CMpcAudioRenderer>, nullptr, &sudFilter[0]},
- {L"CMpcAudioRendererPropertyPage", &__uuidof(CMpcAudioRendererSettingsWnd), CreateInstance<CInternalPropertyPageTempl<CMpcAudioRendererSettingsWnd>>},
-};
-
-int g_cTemplates = _countof(g_Templates);
-
-STDAPI DllRegisterServer()
-{
- return AMovieDllRegisterServer2(TRUE);
-}
-
-STDAPI DllUnregisterServer()
-{
- return AMovieDllRegisterServer2(FALSE);
-}
-
-#include "../../FilterApp.h"
-
-CFilterApp theApp;
-
-#endif
-
-static GUID lpSoundGUID = {0xdef00000, 0x9c6d, 0x47ed, {0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03}}; //DSDEVID_DefaultPlayback from dsound.h
-
-bool CALLBACK DSEnumProc2(LPGUID lpGUID,
- LPCTSTR lpszDesc,
- LPCTSTR lpszDrvName,
- LPVOID lpContext)
-{
- CString* pStr = (CString*)lpContext;
- ASSERT(pStr);
- CString strGUID = *pStr;
-
- if (lpGUID != nullptr) { // nullptr only for "Primary Sound Driver".
- if (strGUID == lpszDesc) {
- memcpy((void*)&lpSoundGUID, lpGUID, sizeof(GUID));
- }
- }
-
- return TRUE;
-}
-
-CMpcAudioRenderer::CMpcAudioRenderer(LPUNKNOWN punk, HRESULT* phr)
- : CBaseRenderer(__uuidof(this), MpcAudioRendererName, punk, phr)
- , m_pDS(nullptr)
- , m_pDSBuffer(nullptr)
- , m_dwDSWriteOff(0)
- , m_pWaveFileFormat(nullptr)
- , m_nDSBufSize(0)
- , m_pReferenceClock(nullptr)
- , m_dRate(1.0)
- , m_lVolume(DSBVOLUME_MIN)
- , m_pSoundTouch(nullptr)
- , m_useWASAPI(true)
- , m_bMuteFastForward(false)
- , m_pMMDevice(nullptr)
- , m_pAudioClient(nullptr)
- , m_pRenderClient(nullptr)
- , m_nFramesInBuffer(0)
- , m_hnsPeriod(0)
- , m_hnsActualDuration(0)
- , m_hTask(nullptr)
- , m_bufferSize(0)
- , m_isAudioClientStarted(false)
- , m_lastBufferTime(0)
- , m_pfAvSetMmThreadCharacteristicsW(nullptr)
- , m_pfAvRevertMmThreadCharacteristics(nullptr)
-{
-#ifdef STANDALONE_FILTER
- CRegKey key;
- ULONG len;
-
- if (ERROR_SUCCESS == key.Open(HKEY_CURRENT_USER, _T("Software\\MPC-HC\\Filters\\MPC-HC Audio Renderer"), KEY_READ)) {
- DWORD dw;
- TCHAR buff[256];
- if (ERROR_SUCCESS == key.QueryDWORDValue(_T("UseWasapi"), dw)) {
- m_useWASAPI = !!dw;
- }
- if (ERROR_SUCCESS == key.QueryDWORDValue(_T("MuteFastForward"), dw)) {
- m_bMuteFastForward = !!dw;
- }
- len = _countof(buff);
- ZeroMemory(buff, sizeof(buff));
- if (ERROR_SUCCESS == key.QueryStringValue(_T("SoundDevice"), buff, &len)) {
- m_csSound_Device = CString(buff);
- }
- }
-#else
- m_useWASAPI = !!AfxGetApp()->GetProfileInt(_T("Filters\\MPC-HC Audio Renderer"), _T("UseWasapi"), m_useWASAPI);
- m_bMuteFastForward = !!AfxGetApp()->GetProfileInt(_T("Filters\\MPC-HC Audio Renderer"), _T("MuteFastForward"), m_bMuteFastForward);
- m_csSound_Device = AfxGetApp()->GetProfileString(_T("Filters\\MPC-HC Audio Renderer"), _T("SoundDevice"));
-#endif
- m_useWASAPIAfterRestart = m_useWASAPI;
-
-
- // Load Vista+ specific DLLs
- m_hLibAVRT = LoadLibrary(L"avrt.dll");
- if (m_hLibAVRT != nullptr) {
- m_pfAvSetMmThreadCharacteristicsW = (PTR_AvSetMmThreadCharacteristicsW) GetProcAddress(m_hLibAVRT, "AvSetMmThreadCharacteristicsW");
- m_pfAvRevertMmThreadCharacteristics = (PTR_AvRevertMmThreadCharacteristics) GetProcAddress(m_hLibAVRT, "AvRevertMmThreadCharacteristics");
- } else {
- m_useWASAPI = false; // WASAPI is not available below Vista
- }
-
- TRACE(_T("CMpcAudioRenderer constructor\n"));
- if (!m_useWASAPI) {
- DirectSoundEnumerate((LPDSENUMCALLBACK)DSEnumProc2, (void*)&m_csSound_Device);
- m_pSoundTouch = DEBUG_NEW soundtouch::SoundTouch();
- *phr = DirectSoundCreate8(&lpSoundGUID, &m_pDS, nullptr);
- }
-}
-
-CMpcAudioRenderer::~CMpcAudioRenderer()
-{
- Stop();
-
- SAFE_DELETE(m_pSoundTouch);
- SAFE_RELEASE(m_pDSBuffer);
- SAFE_RELEASE(m_pDS);
-
- SAFE_RELEASE(m_pRenderClient);
- SAFE_RELEASE(m_pAudioClient);
- SAFE_RELEASE(m_pMMDevice);
-
- if (m_pReferenceClock) {
- SetSyncSource(nullptr);
- SAFE_RELEASE(m_pReferenceClock);
- }
-
- if (m_pWaveFileFormat) {
- BYTE* p = (BYTE*)m_pWaveFileFormat;
- SAFE_DELETE_ARRAY(p);
- }
-
- if (m_hTask != nullptr && m_pfAvRevertMmThreadCharacteristics != nullptr) {
- m_pfAvRevertMmThreadCharacteristics(m_hTask);
- }
-
- if (m_hLibAVRT) {
- FreeLibrary(m_hLibAVRT);
- }
-}
-
-HRESULT CMpcAudioRenderer::CheckInputType(const CMediaType* pmt)
-{
- return CheckMediaType(pmt);
-}
-
-HRESULT CMpcAudioRenderer::CheckMediaType(const CMediaType* pmt)
-{
- HRESULT hr = S_OK;
- if (pmt == nullptr) {
- return E_INVALIDARG;
- }
- TRACE(_T("CMpcAudioRenderer::CheckMediaType\n"));
- WAVEFORMATEX* pwfx = (WAVEFORMATEX*) pmt->Format();
-
- if (pwfx == nullptr) {
- return VFW_E_TYPE_NOT_ACCEPTED;
- }
-
- if ((pmt->majortype != MEDIATYPE_Audio) ||
- (pmt->formattype != FORMAT_WaveFormatEx)) {
- TRACE(_T("CMpcAudioRenderer::CheckMediaType Not supported\n"));
- return VFW_E_TYPE_NOT_ACCEPTED;
- }
-
- if (m_useWASAPI) {
- hr = CheckAudioClient((WAVEFORMATEX*)nullptr);
- if (FAILED(hr)) {
- TRACE(_T("CMpcAudioRenderer::CheckMediaType Error on check audio client\n"));
- return hr;
- }
- if (!m_pAudioClient) {
- TRACE(_T("CMpcAudioRenderer::CheckMediaType Error, audio client not loaded\n"));
- return VFW_E_CANNOT_CONNECT;
- }
-
- if (m_pAudioClient->IsFormatSupported(AUDCLNT_SHAREMODE_EXCLUSIVE, pwfx, nullptr) != S_OK) {
- TRACE(_T("CMpcAudioRenderer::CheckMediaType WASAPI client refused the format\n"));
- return VFW_E_TYPE_NOT_ACCEPTED;
- }
- TRACE(_T("CMpcAudioRenderer::CheckMediaType WASAPI client accepted the format\n"));
- } else if (pwfx->wFormatTag != WAVE_FORMAT_PCM) {
- return VFW_E_TYPE_NOT_ACCEPTED;
- }
- return S_OK;
-}
-
-void CMpcAudioRenderer::OnReceiveFirstSample(IMediaSample* pMediaSample)
-{
- if (!m_useWASAPI) {
- ClearBuffer();
- }
-}
-
-BOOL CMpcAudioRenderer::ScheduleSample(IMediaSample* pMediaSample)
-{
- REFERENCE_TIME StartSample;
- REFERENCE_TIME EndSample;
-
- // Is someone pulling our leg
- if (pMediaSample == nullptr) {
- return FALSE;
- }
-
- // Get the next sample due up for rendering. If there aren't any ready
- // then GetNextSampleTimes returns an error. If there is one to be done
- // then it succeeds and yields the sample times. If it is due now then
- // it returns S_OK other if it's to be done when due it returns S_FALSE
- HRESULT hr = GetSampleTimes(pMediaSample, &StartSample, &EndSample);
- if (FAILED(hr)) {
- return FALSE;
- }
-
- // If we don't have a reference clock then we cannot set up the advise
- // time so we simply set the event indicating an image to render. This
- // will cause us to run flat out without any timing or synchronization
- if (hr == S_OK) {
- EXECUTE_ASSERT(SetEvent((HANDLE) m_RenderEvent));
- return TRUE;
- }
-
- if (m_dRate <= 1.1) {
- ASSERT(m_dwAdvise == 0);
- ASSERT(m_pClock);
- WaitForSingleObject((HANDLE)m_RenderEvent, 0);
-
- hr = m_pClock->AdviseTime((REFERENCE_TIME) m_tStart, StartSample, (HEVENT)(HANDLE) m_RenderEvent, &m_dwAdvise);
- if (SUCCEEDED(hr)) {
- return TRUE;
- }
- } else {
- DoRenderSample(pMediaSample);
- }
-
- // We could not schedule the next sample for rendering despite the fact
- // we have a valid sample here. This is a fair indication that either
- // the system clock is wrong or the time stamp for the sample is duff
- ASSERT(m_dwAdvise == 0);
-
- return FALSE;
-}
-
-HRESULT CMpcAudioRenderer::DoRenderSample(IMediaSample* pMediaSample)
-{
- if (m_useWASAPI) {
- return DoRenderSampleWasapi(pMediaSample);
- } else {
- return DoRenderSampleDirectSound(pMediaSample);
- }
-}
-
-STDMETHODIMP CMpcAudioRenderer::NonDelegatingQueryInterface(REFIID riid, void** ppv)
-{
- if (riid == IID_IReferenceClock) {
- return GetReferenceClockInterface(riid, ppv);
- } else if (riid == IID_IDispatch) {
- return GetInterface(static_cast<IDispatch*>(this), ppv);
- } else if (riid == IID_IBasicAudio) {
- return GetInterface(static_cast<IBasicAudio*>(this), ppv);
- } else if (riid == __uuidof(ISpecifyPropertyPages)) {
- return GetInterface(static_cast<ISpecifyPropertyPages*>(this), ppv);
- } else if (riid == __uuidof(ISpecifyPropertyPages2)) {
- return GetInterface(static_cast<ISpecifyPropertyPages2*>(this), ppv);
- } else if (riid == __uuidof(IMpcAudioRendererFilter)) {
- return GetInterface(static_cast<IMpcAudioRendererFilter*>(this), ppv);
- }
-
- return CBaseRenderer::NonDelegatingQueryInterface(riid, ppv);
-}
-
-HRESULT CMpcAudioRenderer::SetMediaType(const CMediaType* pmt)
-{
- CheckPointer(pmt, E_POINTER);
- TRACE(_T("CMpcAudioRenderer::SetMediaType\n"));
-
- if (m_useWASAPI) {
- // New media type set but render client already initialized => reset it
- if (m_pRenderClient != nullptr) {
- WAVEFORMATEX* pNewWf = (WAVEFORMATEX*) pmt->Format();
- TRACE(_T("CMpcAudioRenderer::SetMediaType Render client already initialized. Reinitialization...\n"));
- if (FAILED(CheckAudioClient(pNewWf))) {
- TRACE(_T("CMpcAudioRenderer::SetMediaType Error on check audio client\n"));
- return E_FAIL;
- }
- }
- }
-
- if (m_pWaveFileFormat) {
- BYTE* p = (BYTE*)m_pWaveFileFormat;
- SAFE_DELETE_ARRAY(p);
- }
- m_pWaveFileFormat = nullptr;
-
- WAVEFORMATEX* pwf = (WAVEFORMATEX*) pmt->Format();
- if (pwf != nullptr) {
- int size = sizeof(WAVEFORMATEX) + pwf->cbSize;
-
- m_pWaveFileFormat = (WAVEFORMATEX*)DEBUG_NEW BYTE[size];
- if (!m_pWaveFileFormat) {
- return E_OUTOFMEMORY;
- }
-
- memcpy(m_pWaveFileFormat, pwf, size);
-
-
- if (!m_useWASAPI && m_pSoundTouch && (pwf->nChannels <= 2)) {
- m_pSoundTouch->setSampleRate(pwf->nSamplesPerSec);
- m_pSoundTouch->setChannels(pwf->nChannels);
- m_pSoundTouch->setTempoChange(0);
- m_pSoundTouch->setPitchSemiTones(0);
- }
- }
-
- return CBaseRenderer::SetMediaType(pmt);
-}
-
-HRESULT CMpcAudioRenderer::CompleteConnect(IPin* pReceivePin)
-{
- HRESULT hr = S_OK;
- TRACE(_T("CMpcAudioRenderer::CompleteConnect\n"));
-
- if (!m_useWASAPI && !m_pDS) {
- return E_FAIL;
- }
-
- if (SUCCEEDED(hr)) {
- hr = CBaseRenderer::CompleteConnect(pReceivePin);
- }
- if (SUCCEEDED(hr)) {
- hr = InitCoopLevel();
- }
-
- if (!m_useWASAPI) {
- if (SUCCEEDED(hr)) {
- hr = CreateDSBuffer();
- }
- }
- if (SUCCEEDED(hr)) {
- TRACE(_T("CMpcAudioRenderer::CompleteConnect Success\n"));
- }
- return hr;
-}
-
-STDMETHODIMP CMpcAudioRenderer::Run(REFERENCE_TIME tStart)
-{
- HRESULT hr;
-
- if (m_State == State_Running) {
- return NOERROR;
- }
-
- if (m_useWASAPI) {
- hr = CheckAudioClient(m_pWaveFileFormat);
- if (FAILED(hr)) {
- TRACE(_T("CMpcAudioRenderer::Run Error on check audio client\n"));
- return hr;
- }
- // Rather start the client at the last moment when the buffer is fed
- /*hr = pAudioClient->Start();
- if (FAILED (hr))
- {
- TRACE(_T("CMpcAudioRenderer::Run Start error"));
- return hr;
- }*/
- } else {
- if (m_pDSBuffer &&
- m_pPosition &&
- m_pWaveFileFormat &&
- SUCCEEDED(m_pPosition->GetRate(&m_dRate))) {
- if (m_dRate < 1.0) {
- hr = m_pDSBuffer->SetFrequency((long)(m_pWaveFileFormat->nSamplesPerSec * m_dRate));
- if (FAILED(hr)) {
- return hr;
- }
- } else {
- hr = m_pDSBuffer->SetFrequency((long)m_pWaveFileFormat->nSamplesPerSec);
- m_pSoundTouch->setRateChange((float)(m_dRate - 1.0) * 100);
-
- if (m_bMuteFastForward) {
- if (m_dRate == 1.0) {
- m_pDSBuffer->SetVolume(m_lVolume);
- } else {
- m_pDSBuffer->SetVolume(DSBVOLUME_MIN);
- }
- }
- }
- }
-
- ClearBuffer();
- }
- hr = CBaseRenderer::Run(tStart);
-
- return hr;
-}
-
-STDMETHODIMP CMpcAudioRenderer::Stop()
-{
- if (m_pDSBuffer) {
- m_pDSBuffer->Stop();
- }
- m_isAudioClientStarted = false;
-
- return CBaseRenderer::Stop();
-};
-
-STDMETHODIMP CMpcAudioRenderer::Pause()
-{
- if (m_pDSBuffer) {
- m_pDSBuffer->Stop();
- }
- if (m_pAudioClient && m_isAudioClientStarted) {
- m_pAudioClient->Stop();
- }
- m_isAudioClientStarted = false;
-
- return CBaseRenderer::Pause();
-};
-
-// === IDispatch
-STDMETHODIMP CMpcAudioRenderer::GetTypeInfoCount(UINT* pctinfo)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CMpcAudioRenderer::GetTypeInfo(UINT itinfo, LCID lcid, ITypeInfo** pptinfo)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CMpcAudioRenderer::GetIDsOfNames(REFIID riid, OLECHAR** rgszNames, UINT cNames, LCID lcid, DISPID* rgdispid)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CMpcAudioRenderer::Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult, EXCEPINFO* pexcepinfo, UINT* puArgErr)
-{
- return E_NOTIMPL;
-}
-
-// === IBasicAudio
-STDMETHODIMP CMpcAudioRenderer::put_Volume(long lVolume)
-{
- m_lVolume = lVolume;
- if (!m_useWASAPI && m_pDSBuffer) {
- return m_pDSBuffer->SetVolume(lVolume);
- }
-
- return S_OK;
-}
-
-STDMETHODIMP CMpcAudioRenderer::get_Volume(long* plVolume)
-{
- if (!m_useWASAPI && m_pDSBuffer) {
- return m_pDSBuffer->GetVolume(plVolume);
- }
-
- return S_OK;
-}
-
-STDMETHODIMP CMpcAudioRenderer::put_Balance(long lBalance)
-{
- if (!m_useWASAPI && m_pDSBuffer) {
- return m_pDSBuffer->SetPan(lBalance);
- }
-
- return S_OK;
-}
-
-STDMETHODIMP CMpcAudioRenderer::get_Balance(long* plBalance)
-{
- if (!m_useWASAPI && m_pDSBuffer) {
- return m_pDSBuffer->GetPan(plBalance);
- }
-
- return S_OK;
-}
-
-// === ISpecifyPropertyPages2
-STDMETHODIMP CMpcAudioRenderer::GetPages(CAUUID* pPages)
-{
- CheckPointer(pPages, E_POINTER);
-
- HRESULT hr = S_OK;
-
- pPages->cElems = 1;
- pPages->pElems = (GUID*)CoTaskMemAlloc(sizeof(GUID) * pPages->cElems);
- if (pPages->pElems != nullptr) {
- pPages->pElems[0] = __uuidof(CMpcAudioRendererSettingsWnd);
- } else {
- hr = E_OUTOFMEMORY;
- }
-
- return hr;
-}
-
-STDMETHODIMP CMpcAudioRenderer::CreatePage(const GUID& guid, IPropertyPage** ppPage)
-{
- CheckPointer(ppPage, E_POINTER);
-
- if (*ppPage != nullptr) {
- return E_INVALIDARG;
- }
-
- HRESULT hr;
-
- if (guid == __uuidof(CMpcAudioRendererSettingsWnd)) {
- (*ppPage = DEBUG_NEW CInternalPropertyPageTempl<CMpcAudioRendererSettingsWnd>(nullptr, &hr))->AddRef();
- }
-
- return *ppPage ? S_OK : E_FAIL;
-}
-
-// === IMpcAudioRendererFilter
-STDMETHODIMP CMpcAudioRenderer::Apply()
-{
-#ifdef STANDALONE_FILTER
- CRegKey key;
- if (ERROR_SUCCESS == key.Create(HKEY_CURRENT_USER, _T("Software\\MPC-HC\\Filters\\MPC-HC Audio Renderer"))) {
- key.SetDWORDValue(_T("UseWasapi"), m_useWASAPIAfterRestart);
- key.SetDWORDValue(_T("MuteFastForward"), m_bMuteFastForward);
- key.SetStringValue(_T("SoundDevice"), m_csSound_Device);
- }
-#else
- AfxGetApp()->WriteProfileInt(_T("Filters\\MPC-HC Audio Renderer"), _T("UseWasapi"), m_useWASAPI);
- AfxGetApp()->WriteProfileInt(_T("Filters\\MPC-HC Audio Renderer"), _T("MuteFastForward"), m_bMuteFastForward);
- AfxGetApp()->WriteProfileString(_T("Filters\\MPC-HC Audio Renderer"), _T("SoundDevice"), m_csSound_Device);
-#endif
-
- return S_OK;
-}
-
-STDMETHODIMP CMpcAudioRenderer::SetWasapiMode(BOOL nValue)
-{
- CAutoLock cAutoLock(&m_csProps);
- m_useWASAPIAfterRestart = !!nValue;
- return S_OK;
-}
-STDMETHODIMP_(BOOL) CMpcAudioRenderer::GetWasapiMode()
-{
- CAutoLock cAutoLock(&m_csProps);
- return m_useWASAPIAfterRestart;
-}
-
-STDMETHODIMP CMpcAudioRenderer::SetMuteFastForward(BOOL nValue)
-{
- CAutoLock cAutoLock(&m_csProps);
- m_bMuteFastForward = !!nValue;
- return S_OK;
-}
-STDMETHODIMP_(BOOL) CMpcAudioRenderer::GetMuteFastForward()
-{
- CAutoLock cAutoLock(&m_csProps);
- return m_bMuteFastForward;
-}
-
-STDMETHODIMP CMpcAudioRenderer::SetSoundDevice(CString nValue)
-{
- CAutoLock cAutoLock(&m_csProps);
- m_csSound_Device = nValue;
- return S_OK;
-}
-STDMETHODIMP_(CString) CMpcAudioRenderer::GetSoundDevice()
-{
- CAutoLock cAutoLock(&m_csProps);
- return m_csSound_Device;
-}
-
-HRESULT CMpcAudioRenderer::GetReferenceClockInterface(REFIID riid, void** ppv)
-{
- HRESULT hr = S_OK;
-
- if (m_pReferenceClock) {
- return m_pReferenceClock->NonDelegatingQueryInterface(riid, ppv);
- }
-
- m_pReferenceClock = DEBUG_NEW CBaseReferenceClock(NAME("MPC-HC Audio Clock"), nullptr, &hr);
- if (!m_pReferenceClock) {
- return E_OUTOFMEMORY;
- }
-
- m_pReferenceClock->AddRef();
-
- hr = SetSyncSource(m_pReferenceClock);
- if (FAILED(hr)) {
- SetSyncSource(nullptr);
- return hr;
- }
-
- return GetReferenceClockInterface(riid, ppv);
-}
-
-HRESULT CMpcAudioRenderer::EndOfStream()
-{
- if (m_pDSBuffer) {
- m_pDSBuffer->Stop();
- }
-#if !FILEWRITER
- if (m_pAudioClient && m_isAudioClientStarted) {
- m_pAudioClient->Stop();
- }
-#endif
- m_isAudioClientStarted = false;
-
- return CBaseRenderer::EndOfStream();
-}
-
-#pragma region DirectSound
-
-HRESULT CMpcAudioRenderer::CreateDSBuffer()
-{
- CheckPointer(m_pWaveFileFormat, E_POINTER);
-
- HRESULT hr = S_OK;
- LPDIRECTSOUNDBUFFER pDSBPrimary = nullptr;
- DSBUFFERDESC dsbd;
- DSBUFFERDESC cDSBufferDesc;
- DSBCAPS bufferCaps;
- DWORD dwDSBufSize = m_pWaveFileFormat->nAvgBytesPerSec * 4;
-
- ZeroMemory(&bufferCaps, sizeof(bufferCaps));
- ZeroMemory(&dsbd, sizeof(DSBUFFERDESC));
-
- dsbd.dwSize = sizeof(DSBUFFERDESC);
- dsbd.dwFlags = DSBCAPS_PRIMARYBUFFER;
- dsbd.dwBufferBytes = 0;
- dsbd.lpwfxFormat = nullptr;
- if (SUCCEEDED(hr = m_pDS->CreateSoundBuffer(&dsbd, &pDSBPrimary, nullptr))) {
- hr = pDSBPrimary->SetFormat(m_pWaveFileFormat);
- ASSERT(SUCCEEDED(hr));
- SAFE_RELEASE(pDSBPrimary);
- }
-
-
- SAFE_RELEASE(m_pDSBuffer);
- cDSBufferDesc.dwSize = sizeof(DSBUFFERDESC);
- cDSBufferDesc.dwFlags = DSBCAPS_GLOBALFOCUS | DSBCAPS_GETCURRENTPOSITION2 |
- DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY;
- cDSBufferDesc.dwBufferBytes = dwDSBufSize;
- cDSBufferDesc.dwReserved = 0;
- cDSBufferDesc.lpwfxFormat = m_pWaveFileFormat;
- cDSBufferDesc.guid3DAlgorithm = GUID_NULL;
-
- hr = m_pDS->CreateSoundBuffer(&cDSBufferDesc, &m_pDSBuffer, nullptr);
-
- m_nDSBufSize = 0;
- if (SUCCEEDED(hr)) {
- bufferCaps.dwSize = sizeof(bufferCaps);
- hr = m_pDSBuffer->GetCaps(&bufferCaps);
- }
- if (SUCCEEDED(hr)) {
- m_nDSBufSize = bufferCaps.dwBufferBytes;
- hr = ClearBuffer();
- m_pDSBuffer->SetFrequency((long)(m_pWaveFileFormat->nSamplesPerSec * m_dRate));
- }
-
- return hr;
-}
-
-HRESULT CMpcAudioRenderer::ClearBuffer()
-{
- HRESULT hr = S_FALSE;
- void* pDSLockedBuffer = nullptr;
- DWORD dwDSLockedSize = 0;
-
- if (m_pDSBuffer) {
- m_dwDSWriteOff = 0;
- m_pDSBuffer->SetCurrentPosition(0);
-
- hr = m_pDSBuffer->Lock(0, 0, &pDSLockedBuffer, &dwDSLockedSize, nullptr, nullptr, DSBLOCK_ENTIREBUFFER);
- if (SUCCEEDED(hr)) {
- ZeroMemory(pDSLockedBuffer, dwDSLockedSize);
- hr = m_pDSBuffer->Unlock(pDSLockedBuffer, dwDSLockedSize, nullptr, 0);
- }
- }
-
- return hr;
-}
-
-HRESULT CMpcAudioRenderer::InitCoopLevel()
-{
- HRESULT hr;
- IVideoWindow* pVideoWindow = nullptr;
- HWND hWnd = nullptr;
-
- hr = m_pGraph->QueryInterface(IID_PPV_ARGS(&pVideoWindow));
- if (SUCCEEDED(hr)) {
- pVideoWindow->get_Owner((OAHWND*)&hWnd);
- SAFE_RELEASE(pVideoWindow);
- }
- if (!hWnd) {
- hWnd = GetTopWindow(nullptr);
- }
-
- ASSERT(hWnd != nullptr);
- if (!m_useWASAPI) {
- hr = m_pDS->SetCooperativeLevel(hWnd, DSSCL_PRIORITY);
- } else if (m_hTask == nullptr) {
- // Ask MMCSS to temporarily boost the thread priority
- // to reduce glitches while the low-latency stream plays.
- DWORD taskIndex = 0;
-
- if (m_pfAvSetMmThreadCharacteristicsW) {
- m_hTask = m_pfAvSetMmThreadCharacteristicsW(_T("Pro Audio"), &taskIndex);
- TRACE(_T("CMpcAudioRenderer::InitCoopLevel Putting thread in higher priority for WASAPI mode (lowest latency)\n"));
- hr = GetLastError();
- if (m_hTask == nullptr) {
- return hr;
- }
- }
- }
-
- return hr;
-}
-
-HRESULT CMpcAudioRenderer::DoRenderSampleDirectSound(IMediaSample* pMediaSample)
-{
- HRESULT hr;
- DWORD dwStatus = 0;
- const long lSize = pMediaSample->GetActualDataLength();
- DWORD dwPlayCursor = 0;
- DWORD dwWriteCursor = 0;
-
- hr = m_pDSBuffer->GetStatus(&dwStatus);
-
- if (SUCCEEDED(hr) && (dwStatus & DSBSTATUS_BUFFERLOST)) {
- hr = m_pDSBuffer->Restore();
- }
-
- if ((SUCCEEDED(hr)) && ((dwStatus & DSBSTATUS_PLAYING) != DSBSTATUS_PLAYING)) {
- hr = m_pDSBuffer->Play(0, 0, DSBPLAY_LOOPING);
- ASSERT(SUCCEEDED(hr));
- }
-
- if (SUCCEEDED(hr)) {
- hr = m_pDSBuffer->GetCurrentPosition(&dwPlayCursor, &dwWriteCursor);
- }
-
- if (SUCCEEDED(hr)) {
- if (((dwPlayCursor < dwWriteCursor) &&
- (
- ((m_dwDSWriteOff >= dwPlayCursor) && (m_dwDSWriteOff <= dwWriteCursor))
- ||
- ((m_dwDSWriteOff < dwPlayCursor) && (m_dwDSWriteOff + lSize >= dwPlayCursor))
- )
- )
- ||
- ((dwWriteCursor < dwPlayCursor) &&
- (
- (m_dwDSWriteOff >= dwPlayCursor) || (m_dwDSWriteOff < dwWriteCursor)
- ))) {
- m_dwDSWriteOff = dwWriteCursor;
- }
-
- if (m_dwDSWriteOff >= (DWORD)m_nDSBufSize) {
- m_dwDSWriteOff = 0;
- }
- }
-
- if (SUCCEEDED(hr)) {
- hr = WriteSampleToDSBuffer(pMediaSample, nullptr);
- }
-
- return hr;
-}
-
-HRESULT CMpcAudioRenderer::WriteSampleToDSBuffer(IMediaSample* pMediaSample, bool* looped)
-{
- CheckPointer(m_pDSBuffer, E_POINTER);
-
- REFERENCE_TIME rtStart = 0;
- REFERENCE_TIME rtStop = 0;
- HRESULT hr;
- bool loop = false;
- void* pDSLockedBuffers[2] = { nullptr, nullptr };
- DWORD dwDSLockedSize[2] = { 0, 0 };
- BYTE* pMediaBuffer = nullptr;
- long lSize = pMediaSample->GetActualDataLength();
-
- hr = pMediaSample->GetPointer(&pMediaBuffer);
-
- if (m_dRate > 1.0) {
- int nBytePerSample = m_pWaveFileFormat->nChannels * (m_pWaveFileFormat->wBitsPerSample / 8);
- m_pSoundTouch->putSamples((const short*)pMediaBuffer, lSize / nBytePerSample);
- lSize = m_pSoundTouch->receiveSamples((short*)pMediaBuffer, lSize / nBytePerSample) * nBytePerSample;
- }
-
- pMediaSample->GetTime(&rtStart, &rtStop);
-
- if (rtStart < 0) {
- DWORD dwPercent = (DWORD)((-rtStart * 100) / (rtStop - rtStart));
- DWORD dwRemove = (lSize * dwPercent / 100);
-
- dwRemove = (dwRemove / m_pWaveFileFormat->nBlockAlign) * m_pWaveFileFormat->nBlockAlign;
- pMediaBuffer += dwRemove;
- lSize -= dwRemove;
- }
-
- if (SUCCEEDED(hr)) {
- hr = m_pDSBuffer->Lock(m_dwDSWriteOff, lSize, &pDSLockedBuffers[0], &dwDSLockedSize[0], &pDSLockedBuffers[1], &dwDSLockedSize[1], 0);
- }
- if (SUCCEEDED(hr)) {
- if (pDSLockedBuffers [0] != nullptr) {
- memcpy(pDSLockedBuffers[0], pMediaBuffer, dwDSLockedSize[0]);
- m_dwDSWriteOff += dwDSLockedSize[0];
- }
-
- if (pDSLockedBuffers [1] != nullptr) {
- memcpy(pDSLockedBuffers[1], &pMediaBuffer[dwDSLockedSize[0]], dwDSLockedSize[1]);
- m_dwDSWriteOff = dwDSLockedSize[1];
- loop = true;
- }
-
- hr = m_pDSBuffer->Unlock(pDSLockedBuffers[0], dwDSLockedSize[0], pDSLockedBuffers[1], dwDSLockedSize[1]);
- ASSERT(dwDSLockedSize [0] + dwDSLockedSize [1] == (DWORD)lSize);
- }
-
- if (SUCCEEDED(hr) && looped) {
- *looped = loop;
- }
-
- return hr;
-}
-
-#pragma endregion
-
-#pragma region WASAPI
-
-HRESULT CMpcAudioRenderer::DoRenderSampleWasapi(IMediaSample* pMediaSample)
-{
- HRESULT hr = S_OK;
- REFERENCE_TIME rtStart = 0;
- REFERENCE_TIME rtStop = 0;
- BYTE* pMediaBuffer = nullptr;
- BYTE* pInputBufferPointer = nullptr;
- BYTE* pInputBufferEnd = nullptr;
- BYTE* pData;
- m_bufferSize = pMediaSample->GetActualDataLength();
- const long lSize = m_bufferSize;
- pMediaSample->GetTime(&rtStart, &rtStop);
-
- AM_MEDIA_TYPE* pmt;
- if (SUCCEEDED(pMediaSample->GetMediaType(&pmt)) && pmt != nullptr) {
- CMediaType mt(*pmt);
- if ((WAVEFORMATEXTENSIBLE*)mt.Format() != nullptr) {
- hr = CheckAudioClient(&(((WAVEFORMATEXTENSIBLE*)mt.Format())->Format));
- } else {
- hr = CheckAudioClient((WAVEFORMATEX*)mt.Format());
- }
- if (FAILED(hr)) {
- TRACE(_T("CMpcAudioRenderer::DoRenderSampleWasapi Error while checking audio client with input media type\n"));
- return hr;
- }
- DeleteMediaType(pmt);
- pmt = nullptr;
- }
-
- // Initialization
- hr = pMediaSample->GetPointer(&pMediaBuffer);
- if (FAILED(hr)) {
- return hr;
- }
-
- pInputBufferPointer = &pMediaBuffer[0];
- pInputBufferEnd = &pMediaBuffer[0] + lSize;
-
- WORD frameSize = m_pWaveFileFormat->nBlockAlign;
-
-
- // Sleep for half the buffer duration since last buffer feed
- DWORD currentTime = GetTickCount();
- if (m_lastBufferTime != 0 && m_hnsActualDuration != 0 && m_lastBufferTime < currentTime && (currentTime - m_lastBufferTime) < m_hnsActualDuration) {
- m_hnsActualDuration = m_hnsActualDuration - (currentTime - m_lastBufferTime);
- Sleep((DWORD)m_hnsActualDuration);
- }
-
- // Each loop fills one of the two buffers.
- while (pInputBufferPointer < pInputBufferEnd) {
- UINT32 numFramesPadding = 0;
- m_pAudioClient->GetCurrentPadding(&numFramesPadding);
- UINT32 numFramesAvailable = m_nFramesInBuffer - numFramesPadding;
-
- UINT32 nAvailableBytes = numFramesAvailable * frameSize;
- UINT32 nBytesToWrite = nAvailableBytes;
- // More room than enough in the output buffer
- if (pInputBufferPointer + nAvailableBytes > pInputBufferEnd) {
- nBytesToWrite = (UINT32)(pInputBufferEnd - pInputBufferPointer);
- numFramesAvailable = (UINT32)((float)nBytesToWrite / frameSize);
- }
-
- // Grab the next empty buffer from the audio device.
- hr = m_pRenderClient->GetBuffer(numFramesAvailable, &pData);
- if (FAILED(hr)) {
- TRACE(_T("CMpcAudioRenderer::DoRenderSampleWasapi GetBuffer failed with size %ld : (error %lx)\n"), m_nFramesInBuffer, hr);
- return hr;
- }
-
- // Load the buffer with data from the audio source.
- if (pData != nullptr) {
-
- memcpy(&pData[0], pInputBufferPointer, nBytesToWrite);
- pInputBufferPointer += nBytesToWrite;
- } else {
- TRACE(_T("CMpcAudioRenderer::DoRenderSampleWasapi Output buffer is nullptr\n"));
- }
-
- hr = m_pRenderClient->ReleaseBuffer(numFramesAvailable, 0); // no flags
- if (FAILED(hr)) {
- TRACE(_T("CMpcAudioRenderer::DoRenderSampleWasapi ReleaseBuffer failed with size %ld (error %lx)\n"), m_nFramesInBuffer, hr);
- return hr;
- }
-
- if (!m_isAudioClientStarted) {
- TRACE(_T("CMpcAudioRenderer::DoRenderSampleWasapi Starting audio client\n"));
- m_pAudioClient->Start();
- m_isAudioClientStarted = true;
- }
-
- if (pInputBufferPointer >= pInputBufferEnd) {
- m_lastBufferTime = GetTickCount();
- // This is the duration of the filled buffer
- m_hnsActualDuration = (REFERENCE_TIME)REFTIMES_PER_SEC * numFramesAvailable / m_pWaveFileFormat->nSamplesPerSec;
- // Sleep time is half this duration
- m_hnsActualDuration = (DWORD)(m_hnsActualDuration / REFTIMES_PER_MILLISEC / 2);
- break;
- }
-
- // Buffer not completely filled, sleep for half buffer capacity duration
- m_hnsActualDuration = (REFERENCE_TIME)REFTIMES_PER_SEC * m_nFramesInBuffer / m_pWaveFileFormat->nSamplesPerSec;
- // Sleep time is half this duration
- m_hnsActualDuration = (DWORD)(m_hnsActualDuration / REFTIMES_PER_MILLISEC / 2);
- Sleep((DWORD)m_hnsActualDuration);
- }
- return hr;
-}
-#pragma endregion
-
-HRESULT CMpcAudioRenderer::CheckAudioClient(WAVEFORMATEX* pWaveFormatEx)
-{
- HRESULT hr = S_OK;
- CAutoLock cAutoLock(&m_csCheck);
- TRACE(_T("CMpcAudioRenderer::CheckAudioClient\n"));
- if (!m_pMMDevice) {
- hr = GetAudioDevice(&m_pMMDevice);
- }
-
- // If no WAVEFORMATEX structure provided and client already exists, return it
- if (m_pAudioClient && !pWaveFormatEx) {
- return hr;
- }
-
- // Just create the audio client if no WAVEFORMATEX provided
- if (!m_pAudioClient && !pWaveFormatEx) {
- if (SUCCEEDED(hr)) {
- hr = CreateAudioClient(m_pMMDevice, &m_pAudioClient);
- }
- return hr;
- }
-
- // If we reach that point, m_pAudioClient should have been initialized
- ASSERT(m_pAudioClient);
- CheckPointer(m_pAudioClient, E_POINTER);
-
- // Compare the existing WAVEFORMATEX with the one provided
- WAVEFORMATEX* pNewWaveFormatEx = nullptr;
- if (CheckFormatChanged(pWaveFormatEx, &pNewWaveFormatEx)) {
- // Format has changed, audio client has to be reinitialized
- TRACE(_T("CMpcAudioRenderer::CheckAudioClient Format changed, reinitialize the audio client\n"));
- if (m_pWaveFileFormat) {
- BYTE* p = (BYTE*)m_pWaveFileFormat;
- SAFE_DELETE_ARRAY(p);
- }
- m_pWaveFileFormat = pNewWaveFormatEx;
- hr = m_pAudioClient->IsFormatSupported(AUDCLNT_SHAREMODE_EXCLUSIVE, pWaveFormatEx, nullptr);
- if (SUCCEEDED(hr)) {
- if (m_isAudioClientStarted) {
- m_pAudioClient->Stop();
- m_isAudioClientStarted = false;
- }
- SAFE_RELEASE(m_pRenderClient);
- SAFE_RELEASE(m_pAudioClient);
-
- hr = CreateAudioClient(m_pMMDevice, &m_pAudioClient);
- } else {
- TRACE(_T("CMpcAudioRenderer::CheckAudioClient New format not supported, accept it anyway\n"));
- return S_OK;
- }
- } else if (!m_pRenderClient) {
- TRACE(_T("CMpcAudioRenderer::CheckAudioClient First initialization of the audio renderer\n"));
- } else {
- return hr;
- }
-
- SAFE_RELEASE(m_pRenderClient);
- if (SUCCEEDED(hr)) {
- hr = InitAudioClient(pWaveFormatEx, m_pAudioClient, &m_pRenderClient);
- }
- return hr;
-}
-
-HRESULT CMpcAudioRenderer::GetAvailableAudioDevices(IMMDeviceCollection** ppMMDevices)
-{
- HRESULT hr;
-
- CComPtr<IMMDeviceEnumerator> enumerator;
- TRACE(_T("CMpcAudioRenderer::GetAvailableAudioDevices\n"));
- hr = enumerator.CoCreateInstance(__uuidof(MMDeviceEnumerator));
-
- if (FAILED(hr)) {
- TRACE(_T("CMpcAudioRenderer::GetAvailableAudioDevices - failed to get MMDeviceEnumerator\n"));
- return S_FALSE;
- }
-
- //IMMDevice* pEndpoint = nullptr;
- //IPropertyStore* pProps = nullptr;
- //LPWSTR pwszID = nullptr;
-
- enumerator->EnumAudioEndpoints(eRender, DEVICE_STATE_ACTIVE, ppMMDevices);
- UINT count = 0;
- hr = (*ppMMDevices)->GetCount(&count);
- return hr;
-}
-
-HRESULT CMpcAudioRenderer::GetAudioDevice(IMMDevice** ppMMDevice)
-{
- TRACE(_T("CMpcAudioRenderer::GetAudioDevice\n"));
-
- CComPtr<IMMDeviceEnumerator> enumerator;
- IMMDeviceCollection* devices = nullptr;
- IPropertyStore* pProps = nullptr;
- HRESULT hr = enumerator.CoCreateInstance(__uuidof(MMDeviceEnumerator));
-
- if (hr != S_OK) {
- TRACE(_T("CMpcAudioRenderer::GetAudioDevice - failed to create MMDeviceEnumerator!\n"));
- return hr;
- }
-
- TRACE(_T("CMpcAudioRenderer::GetAudioDevice - Target end point: %s\n"), m_csSound_Device);
-
- if (GetAvailableAudioDevices(&devices) == S_OK && devices) {
- UINT count = 0;
- hr = devices->GetCount(&count);
- if (hr != S_OK) {
- TRACE(_T("CMpcAudioRenderer::GetAudioDevice - devices->GetCount failed: (0x%08x)\n"), hr);
- return hr;
- }
-
- for (ULONG i = 0 ; i < count ; i++) {
- LPWSTR pwszID = nullptr;
- IMMDevice* endpoint = nullptr;
- hr = devices->Item(i, &endpoint);
- if (hr == S_OK) {
- hr = endpoint->GetId(&pwszID);
- if (hr == S_OK) {
- if (endpoint->OpenPropertyStore(STGM_READ, &pProps) == S_OK) {
-
- PROPVARIANT varName;
- PropVariantInit(&varName);
-
- // Found the configured audio endpoint
- if ((pProps->GetValue(PKEY_Device_FriendlyName, &varName) == S_OK) && (m_csSound_Device == varName.pwszVal)) {
- TRACE(_T("CMpcAudioRenderer::GetAudioDevice - devices->GetId OK, num: (%u), pwszVal: %s, pwszID: %s\n"), i, varName.pwszVal, pwszID);
- enumerator->GetDevice(pwszID, ppMMDevice);
- SAFE_RELEASE(devices);
- *(ppMMDevice) = endpoint;
- CoTaskMemFree(pwszID);
- pwszID = nullptr;
- PropVariantClear(&varName);
- SAFE_RELEASE(pProps);
- return S_OK;
- } else {
- PropVariantClear(&varName);
- SAFE_RELEASE(pProps);
- SAFE_RELEASE(endpoint);
- CoTaskMemFree(pwszID);
- pwszID = nullptr;
- }
- }
- } else {
- TRACE(_T("CMpcAudioRenderer::GetAudioDevice - devices->GetId failed: (0x%08x)\n"), hr);
- }
- } else {
- TRACE(_T("CMpcAudioRenderer::GetAudioDevice - devices->Item failed: (0x%08x)\n"), hr);
- }
-
- CoTaskMemFree(pwszID);
- pwszID = nullptr;
- }
- }
-
- TRACE(_T("CMpcAudioRenderer::GetAudioDevice - Unable to find selected audio device, using the default end point!\n"));
- hr = enumerator->GetDefaultAudioEndpoint(eRender, eConsole, ppMMDevice);
-
- SAFE_RELEASE(devices);
-
- return hr;
-}
-
-bool CMpcAudioRenderer::CheckFormatChanged(const WAVEFORMATEX* pWaveFormatEx, WAVEFORMATEX** ppNewWaveFormatEx)
-{
- bool formatChanged = false;
- if (m_pWaveFileFormat == nullptr) {
- formatChanged = true;
- } else if (pWaveFormatEx->wFormatTag != m_pWaveFileFormat->wFormatTag
- || pWaveFormatEx->nChannels != m_pWaveFileFormat->nChannels
- || pWaveFormatEx->wBitsPerSample != m_pWaveFileFormat->wBitsPerSample) { // TODO : improve the checks
- formatChanged = true;
- }
-
-
- if (!formatChanged) {
- return false;
- }
-
- int size = sizeof(WAVEFORMATEX) + pWaveFormatEx->cbSize; // Always true, even for WAVEFORMATEXTENSIBLE and WAVEFORMATEXTENSIBLE_IEC61937
- *ppNewWaveFormatEx = (WAVEFORMATEX*)DEBUG_NEW BYTE[size];
- if (!*ppNewWaveFormatEx) {
- return false;
- }
- memcpy(*ppNewWaveFormatEx, pWaveFormatEx, size);
- return true;
-}
-
-HRESULT CMpcAudioRenderer::GetBufferSize(WAVEFORMATEX* pWaveFormatEx, REFERENCE_TIME* pHnsBufferPeriod)
-{
- if (pWaveFormatEx == nullptr) {
- return S_OK;
- }
- if (pWaveFormatEx->cbSize < 22) { //WAVEFORMATEX
- return S_OK;
- }
-
- WAVEFORMATEXTENSIBLE* wfext = (WAVEFORMATEXTENSIBLE*)pWaveFormatEx;
-
- if (m_bufferSize == 0)
- if (wfext->SubFormat == KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_MLP) {
- m_bufferSize = 61440;
- } else if (wfext->SubFormat == KSDATAFORMAT_SUBTYPE_IEC61937_DTS_HD) {
- m_bufferSize = 32768;
- } else if (wfext->SubFormat == KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL_PLUS) {
- m_bufferSize = 24576;
- } else if (wfext->Format.wFormatTag == WAVE_FORMAT_DOLBY_AC3_SPDIF) {
- m_bufferSize = 6144;
- } else {
- return S_OK;
- }
-
- const double dBitrate = (double)pWaveFormatEx->nChannels * pWaveFormatEx->wBitsPerSample * pWaveFormatEx->nSamplesPerSec;
- *pHnsBufferPeriod = REFERENCE_TIME(m_bufferSize * 10000000i64 * 8 / dBitrate);
-
- TRACE(_T("CMpcAudioRenderer::GetBufferSize set a %I64d period for a %ld buffer size\n"), *pHnsBufferPeriod, m_bufferSize);
-
- return S_OK;
-}
-
-HRESULT CMpcAudioRenderer::InitAudioClient(WAVEFORMATEX* pWaveFormatEx, IAudioClient* pAudioClient, IAudioRenderClient** ppRenderClient)
-{
- TRACE(_T("CMpcAudioRenderer::InitAudioClient\n"));
-
- ASSERT(pAudioClient && ppRenderClient);
- CheckPointer(pAudioClient, E_POINTER);
- CheckPointer(ppRenderClient, E_POINTER);
-
- HRESULT hr;
- // Initialize the stream to play at the minimum latency.
- //if (SUCCEEDED (hr)) hr = pAudioClient->GetDevicePeriod(nullptr, &hnsPeriod);
- m_hnsPeriod = 500000; //50 ms is the best according to James @Slysoft
-
- hr = pAudioClient->IsFormatSupported(AUDCLNT_SHAREMODE_EXCLUSIVE, pWaveFormatEx, nullptr);
- if (FAILED(hr)) {
- TRACE(_T("CMpcAudioRenderer::InitAudioClient not supported (0x%08x)\n"), hr);
- } else {
- TRACE(_T("CMpcAudioRenderer::InitAudioClient format supported\n"));
- }
-
- GetBufferSize(pWaveFormatEx, &m_hnsPeriod);
-
- if (SUCCEEDED(hr)) {
- hr = pAudioClient->Initialize(AUDCLNT_SHAREMODE_EXCLUSIVE, 0/*AUDCLNT_STREAMFLAGS_EVENTCALLBACK*/,
- m_hnsPeriod, m_hnsPeriod, pWaveFormatEx, nullptr);
- }
- if (FAILED(hr) && hr != AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED) {
- TRACE(_T("CMpcAudioRenderer::InitAudioClient failed (0x%08x)\n"), hr);
- return hr;
- }
-
- if (AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED == hr) {
- // if the buffer size was not aligned, need to do the alignment dance
- TRACE(_T("CMpcAudioRenderer::InitAudioClient Buffer size not aligned. Realigning\n"));
-
- // get the buffer size, which will be aligned
- hr = pAudioClient->GetBufferSize(&m_nFramesInBuffer);
-
- // throw away this IAudioClient
- SAFE_RELEASE(pAudioClient);
-
- // calculate the new aligned periodicity
- m_hnsPeriod = // hns =
- (REFERENCE_TIME)(
- 10000.0 * // (hns / ms) *
- 1000 * // (ms / s) *
- m_nFramesInBuffer / // frames /
- pWaveFormatEx->nSamplesPerSec // (frames / s)
- + 0.5 // rounding
- );
-
- if (SUCCEEDED(hr)) {
- hr = CreateAudioClient(m_pMMDevice, &pAudioClient);
- }
- TRACE(_T("CMpcAudioRenderer::InitAudioClient Trying again with periodicity of %I64u hundred-nanoseconds, or %u frames.\n"), m_hnsPeriod, m_nFramesInBuffer);
- if (SUCCEEDED(hr)) {
- hr = pAudioClient->Initialize(AUDCLNT_SHAREMODE_EXCLUSIVE, 0/*AUDCLNT_STREAMFLAGS_EVENTCALLBACK*/,
- m_hnsPeriod, m_hnsPeriod, pWaveFormatEx, nullptr);
- }
- if (FAILED(hr)) {
- TRACE(_T("CMpcAudioRenderer::InitAudioClient Failed to reinitialize the audio client\n"));
- return hr;
- }
- } // if (AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED == hr)
-
- // get the buffer size, which is aligned
- if (SUCCEEDED(hr)) {
- hr = pAudioClient->GetBufferSize(&m_nFramesInBuffer);
- }
-
- // calculate the new period
- if (SUCCEEDED(hr)) {
- hr = pAudioClient->GetService(IID_PPV_ARGS(ppRenderClient));
- }
-
- if (FAILED(hr)) {
- TRACE(_T("CMpcAudioRenderer::InitAudioClient service initialization failed (0x%08x)\n"), hr);
- } else {
- TRACE(_T("CMpcAudioRenderer::InitAudioClient service initialization success\n"));
- }
-
- return hr;
-}
-
-HRESULT CMpcAudioRenderer::CreateAudioClient(IMMDevice* pMMDevice, IAudioClient** ppAudioClient)
-{
- HRESULT hr = S_OK;
- m_hnsPeriod = 0;
-
- TRACE(_T("CMpcAudioRenderer::CreateAudioClient\n"));
-
- ASSERT(ppAudioClient);
- CheckPointer(ppAudioClient, E_POINTER);
-
- if (*ppAudioClient) {
- if (m_isAudioClientStarted) {
- (*ppAudioClient)->Stop();
- }
- SAFE_RELEASE(*ppAudioClient);
- m_isAudioClientStarted = false;
- }
-
- if (!pMMDevice) {
- TRACE(_T("CMpcAudioRenderer::CreateAudioClient failed, device not loaded\n"));
- return E_FAIL;
- }
-
- hr = pMMDevice->Activate(__uuidof(IAudioClient), CLSCTX_ALL, nullptr, reinterpret_cast<void**>(ppAudioClient));
- if (FAILED(hr)) {
- TRACE(_T("CMpcAudioRenderer::CreateAudioClient activation failed (0x%08x)\n"), hr);
- } else {
- TRACE(_T("CMpcAudioRenderer::CreateAudioClient success\n"));
- }
- return hr;
-}
diff --git a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.def b/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.def
deleted file mode 100644
index 6492e5cd6..000000000
--- a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.def
+++ /dev/null
@@ -1,5 +0,0 @@
-EXPORTS
- DllCanUnloadNow PRIVATE
- DllGetClassObject PRIVATE
- DllRegisterServer PRIVATE
- DllUnregisterServer PRIVATE
diff --git a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.h b/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.h
deleted file mode 100644
index b71c03537..000000000
--- a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * (C) 2009-2014 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#pragma once
-
-#include "BaseClasses/streams.h"
-#include <dsound.h>
-
-#include <MMReg.h> //must be before other WASAPI headers
-#include <strsafe.h>
-#include <mmdeviceapi.h>
-#include <avrt.h>
-#include <audioclient.h>
-#include <endpointvolume.h>
-#include <FunctionDiscoveryKeys_devpkey.h>
-
-#include "MpcAudioRendererSettingsWnd.h"
-#include "SoundTouch/include/SoundTouch.h"
-
-#define MpcAudioRendererName L"MPC-HC Audio Renderer"
-
-// REFERENCE_TIME time units per second and per millisecond
-#define REFTIMES_PER_SEC 10000000.0
-#define REFTIMES_PER_MILLISEC 10000.0
-
-// if you get a compilation error on AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED,
-// uncomment the #define below
-#define AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED AUDCLNT_ERR(0x019)
-
-class __declspec(uuid("601D2A2B-9CDE-40bd-8650-0485E3522727"))
- CMpcAudioRenderer : public CBaseRenderer
- , public IBasicAudio
- , public ISpecifyPropertyPages2
- , public IMpcAudioRendererFilter
-{
-public:
- CMpcAudioRenderer(LPUNKNOWN punk, HRESULT* phr);
- virtual ~CMpcAudioRenderer();
-
- static const AMOVIESETUP_FILTER sudASFilter;
-
- HRESULT CheckInputType(const CMediaType* mtIn);
- virtual HRESULT CheckMediaType(const CMediaType* pmt);
- virtual HRESULT DoRenderSample(IMediaSample* pMediaSample);
- virtual void OnReceiveFirstSample(IMediaSample* pMediaSample);
- BOOL ScheduleSample(IMediaSample* pMediaSample);
- virtual HRESULT SetMediaType(const CMediaType* pmt);
- virtual HRESULT CompleteConnect(IPin* pReceivePin);
-
- HRESULT EndOfStream();
-
-
- DECLARE_IUNKNOWN
-
- STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
-
- // === IMediaFilter
- STDMETHOD(Run)(REFERENCE_TIME tStart);
- STDMETHOD(Stop)();
- STDMETHOD(Pause)();
-
- // === IDispatch (pour IBasicAudio)
- STDMETHOD(GetTypeInfoCount)(UINT* pctinfo);
- STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo** pptinfo);
- STDMETHOD(GetIDsOfNames)(REFIID riid, OLECHAR** rgszNames, UINT cNames, LCID lcid, DISPID* rgdispid);
- STDMETHOD(Invoke)(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult, EXCEPINFO* pexcepinfo, UINT* puArgErr);
-
- // === IBasicAudio
- STDMETHOD(put_Volume)(long lVolume);
- STDMETHOD(get_Volume)(long* plVolume);
- STDMETHOD(put_Balance)(long lBalance);
- STDMETHOD(get_Balance)(long* plBalance);
-
- // === ISpecifyPropertyPages2
- STDMETHODIMP GetPages(CAUUID* pPages);
- STDMETHODIMP CreatePage(const GUID& guid, IPropertyPage** ppPage);
-
- // === IMpcAudioRendererFilter
- STDMETHODIMP Apply();
- STDMETHODIMP SetWasapiMode(BOOL nValue);
- STDMETHODIMP_(BOOL) GetWasapiMode();
- STDMETHODIMP SetMuteFastForward(BOOL nValue);
- STDMETHODIMP_(BOOL) GetMuteFastForward();
- STDMETHODIMP SetSoundDevice(CString nValue);
- STDMETHODIMP_(CString) GetSoundDevice();
-
- // CMpcAudioRenderer
-private:
-
- HRESULT DoRenderSampleDirectSound(IMediaSample* pMediaSample);
-
- HRESULT InitCoopLevel();
- HRESULT ClearBuffer();
- HRESULT CreateDSBuffer();
- HRESULT GetReferenceClockInterface(REFIID riid, void** ppv);
- HRESULT WriteSampleToDSBuffer(IMediaSample* pMediaSample, bool* looped);
-
- LPDIRECTSOUND8 m_pDS;
- LPDIRECTSOUNDBUFFER m_pDSBuffer;
- DWORD m_dwDSWriteOff;
- WAVEFORMATEX* m_pWaveFileFormat;
- int m_nDSBufSize;
- CBaseReferenceClock* m_pReferenceClock;
- double m_dRate;
- long m_lVolume;
- soundtouch::SoundTouch* m_pSoundTouch;
- CCritSec m_csProps;
-
- // CMpcAudioRenderer WASAPI methods
- HRESULT GetAvailableAudioDevices(IMMDeviceCollection** ppMMDevices);
- HRESULT GetAudioDevice(IMMDevice** ppMMDevice);
- HRESULT CreateAudioClient(IMMDevice* pMMDevice, IAudioClient** ppAudioClient);
- HRESULT InitAudioClient(WAVEFORMATEX* pWaveFormatEx, IAudioClient* pAudioClient, IAudioRenderClient** ppRenderClient);
- HRESULT CheckAudioClient(WAVEFORMATEX* pWaveFormatEx);
- bool CheckFormatChanged(const WAVEFORMATEX* pWaveFormatEx, WAVEFORMATEX** ppNewWaveFormatEx);
- HRESULT DoRenderSampleWasapi(IMediaSample* pMediaSample);
- HRESULT GetBufferSize(WAVEFORMATEX* pWaveFormatEx, REFERENCE_TIME* pHnsBufferPeriod);
-
-
- // WASAPI variables
- bool m_useWASAPI;
- bool m_useWASAPIAfterRestart;
- bool m_bMuteFastForward;
- CString m_csSound_Device;
- IMMDevice* m_pMMDevice;
- IAudioClient* m_pAudioClient;
- IAudioRenderClient* m_pRenderClient;
- UINT32 m_nFramesInBuffer;
- REFERENCE_TIME m_hnsPeriod, m_hnsActualDuration;
- HANDLE m_hTask;
- CCritSec m_csCheck;
- UINT32 m_bufferSize;
- bool m_isAudioClientStarted;
- DWORD m_lastBufferTime;
-
- // avrt.dll (Vista or greater)
- typedef HANDLE(__stdcall* PTR_AvSetMmThreadCharacteristicsW)(LPCWSTR TaskName, LPDWORD TaskIndex);
- typedef BOOL (__stdcall* PTR_AvRevertMmThreadCharacteristics)(HANDLE AvrtHandle);
-
- HMODULE m_hLibAVRT;
- PTR_AvSetMmThreadCharacteristicsW m_pfAvSetMmThreadCharacteristicsW;
- PTR_AvRevertMmThreadCharacteristics m_pfAvRevertMmThreadCharacteristics;
-
-};
diff --git a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.vcxproj b/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.vcxproj
deleted file mode 100644
index d14f4d2f9..000000000
--- a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.vcxproj
+++ /dev/null
@@ -1,259 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug Filter|Win32">
- <Configuration>Debug Filter</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug Filter|x64">
- <Configuration>Debug Filter</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Filter|Win32">
- <Configuration>Release Filter</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Filter|x64">
- <Configuration>Release Filter</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{D0620EF4-1313-40D5-9069-A82F6FE26994}</ProjectGuid>
- <RootNamespace>MpcAudioRenderer</RootNamespace>
- <Keyword>MFCProj</Keyword>
- <ProjectName>MpcAudioRenderer</ProjectName>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>dsound.lib;Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>MpcAudioRenderer.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>dsound.lib;Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>MpcAudioRenderer.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>dsound.lib;Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>MpcAudioRenderer.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>dsound.lib;Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>MpcAudioRenderer.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Lib>
- <AdditionalDependencies>dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Lib>
- <AdditionalDependencies>dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Lib>
- <AdditionalDependencies>dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Lib>
- <AdditionalDependencies>dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\FilterApp.cpp" />
- <ClCompile Include="MpcAudioRenderer.cpp" />
- <ClCompile Include="MpcAudioRendererSettingsWnd.cpp" />
- <ClCompile Include="stdafx.cpp">
- <PrecompiledHeader>Create</PrecompiledHeader>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="MpcAudioRenderer.def" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="IMpcAudioRendererFilter.h" />
- <ClInclude Include="MpcAudioRenderer.h" />
- <ClInclude Include="MpcAudioRendererSettingsWnd.h" />
- <ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
- </ClInclude>
- <ClInclude Include="stdafx.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="MpcAudioRenderer.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
- </ResourceCompile>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\DSUtil\DSUtil.vcxproj">
- <Project>{fc70988b-1ae5-4381-866d-4f405e28ac42}</Project>
- </ProjectReference>
- <ProjectReference Include="..\..\..\thirdparty\SoundTouch\source\SoundTouch.vcxproj">
- <Project>{68a5dd20-7057-448b-8fe0-b6ac8d205509}</Project>
- </ProjectReference>
- <ProjectReference Include="..\..\..\thirdparty\BaseClasses\BaseClasses.vcxproj">
- <Project>{e8a3f6fa-ae1c-4c8e-a0b6-9c8480324eaa}</Project>
- </ProjectReference>
- <ProjectReference Include="..\..\..\thirdparty\VirtualDub\Kasumi\Kasumi.vcxproj">
- <Project>{0d252872-7542-4232-8d02-53f9182aee15}</Project>
- </ProjectReference>
- <ProjectReference Include="..\..\..\thirdparty\VirtualDub\system\system.vcxproj">
- <Project>{c2082189-3ecb-4079-91fa-89d3c8a305c0}</Project>
- </ProjectReference>
- <ProjectReference Include="..\..\Filters.vcxproj">
- <Project>{273b3149-3192-4b75-a791-470320b90812}</Project>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.vcxproj.filters b/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.vcxproj.filters
deleted file mode 100644
index 02f8239d5..000000000
--- a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.vcxproj.filters
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{9788c006-0809-4532-aa20-b51ed992525a}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{4d561854-929b-492e-9fba-c2cebb7cc3d4}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{addff0d6-0d94-4e4c-b5ea-b7d5b330fd45}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\FilterApp.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="MpcAudioRenderer.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="MpcAudioRendererSettingsWnd.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="MpcAudioRenderer.def">
- <Filter>Source Files</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="MpcAudioRenderer.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="stdafx.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="IMpcAudioRendererFilter.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="MpcAudioRendererSettingsWnd.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="MpcAudioRenderer.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererSettingsWnd.cpp b/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererSettingsWnd.cpp
deleted file mode 100644
index 4b925fe97..000000000
--- a/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererSettingsWnd.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * (C) 2010-2014 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "stdafx.h"
-#include "resource.h"
-#include "MpcAudioRendererSettingsWnd.h"
-#include "../../../DSUtil/DSUtil.h"
-
-#include "../../../mpc-hc/InternalFiltersConfig.h"
-
-
-CMpcAudioRendererSettingsWnd::CMpcAudioRendererSettingsWnd()
-{
-}
-
-bool CMpcAudioRendererSettingsWnd::OnConnect(const CInterfaceList<IUnknown, &IID_IUnknown>& pUnks)
-{
- ASSERT(!m_pMAR);
-
- m_pMAR.Release();
-
- POSITION pos = pUnks.GetHeadPosition();
- while (pos && !(m_pMAR = pUnks.GetNext(pos))) {
- ;
- }
-
- if (!m_pMAR) {
- return false;
- }
-
- return true;
-}
-
-void CMpcAudioRendererSettingsWnd::OnDisconnect()
-{
- m_pMAR.Release();
-}
-
-bool CALLBACK DSEnumProc(LPGUID lpGUID,
- LPCTSTR lpszDesc,
- LPCTSTR lpszDrvName,
- LPVOID lpContext)
-{
- CComboBox* pCombo = (CComboBox*)lpContext;
- ASSERT(pCombo);
- LPGUID lpTemp = nullptr;
-
- if (lpGUID != nullptr) { // nullptr only for "Primary Sound Driver".
- if ((lpTemp = (LPGUID)malloc(sizeof(GUID))) == nullptr) {
- return TRUE;
- }
- memcpy(lpTemp, lpGUID, sizeof(GUID));
- }
- pCombo->AddString(lpszDesc);
- free(lpTemp);
- return TRUE;
-}
-
-bool CMpcAudioRendererSettingsWnd::OnActivate()
-{
- ASSERT(IPP_FONTSIZE == 13);
- DWORD dwStyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP;
- CPoint p(10, 10);
-
- m_cbWasapiMode.Create(ResStr(IDS_ARS_WASAPI_MODE), dwStyle | BS_AUTOCHECKBOX | BS_LEFTTEXT, CRect(p, CSize(IPP_SCALE(320), m_fontheight)), this, IDC_PP_WASAPI_MODE);
-
- p.y += IPP_SCALE(20);
- m_cbMuteFastForward.Create(ResStr(IDS_ARS_MUTE_FAST_FORWARD), dwStyle | BS_AUTOCHECKBOX | BS_LEFTTEXT, CRect(p, CSize(IPP_SCALE(320), m_fontheight)), this, IDC_PP_MUTE_FAST_FORWARD);
-
- p.y += IPP_SCALE(25);
- m_txtSoundDevice.Create(ResStr(IDS_ARS_SOUND_DEVICE), WS_VISIBLE | WS_CHILD, CRect(p, CSize(IPP_SCALE(115), m_fontheight)), this, (UINT)IDC_STATIC);
- m_cbSoundDevice.Create(dwStyle | CBS_DROPDOWNLIST | WS_VSCROLL, CRect(p + CPoint(IPP_SCALE(120), -4), CSize(IPP_SCALE(200), 200)), this, IDC_PP_SOUND_DEVICE);
-
- SetClassLongPtr(GetDlgItem(IDC_PP_SOUND_DEVICE)->m_hWnd, GCLP_HCURSOR, (LONG_PTR)AfxGetApp()->LoadStandardCursor(IDC_HAND));
-
- DirectSoundEnumerate((LPDSENUMCALLBACK)DSEnumProc, (void*)&m_cbSoundDevice);
-
- if (m_cbSoundDevice.GetCount() > 0) {
- int idx = m_cbSoundDevice.FindString(0, m_pMAR->GetSoundDevice());
- if (idx < 0) {
- m_cbSoundDevice.SetCurSel(0);
- } else {
- m_cbSoundDevice.SetCurSel(m_cbSoundDevice.FindString(0, m_pMAR->GetSoundDevice()));
- }
- }
-
- m_cbWasapiMode.SetCheck(m_pMAR->GetWasapiMode());
- m_cbMuteFastForward.SetCheck(m_pMAR->GetMuteFastForward());
-
- for (CWnd* pWnd = GetWindow(GW_CHILD); pWnd; pWnd = pWnd->GetNextWindow()) {
- pWnd->SetFont(&m_font, FALSE);
- }
-
- CorrectComboListWidth(m_cbSoundDevice);
-
- return true;
-}
-
-void CMpcAudioRendererSettingsWnd::OnDeactivate()
-{
-}
-
-bool CMpcAudioRendererSettingsWnd::OnApply()
-{
- OnDeactivate();
-
- if (m_pMAR) {
- m_pMAR->SetWasapiMode(m_cbWasapiMode.GetCheck());
- m_pMAR->SetMuteFastForward(m_cbMuteFastForward.GetCheck());
- CString str;
- int idx = m_cbSoundDevice.GetCurSel();
- if (!(idx < 0)) {
- m_cbSoundDevice.GetLBText(idx, str);
- m_pMAR->SetSoundDevice(str);
- }
- m_pMAR->Apply();
- }
-
- return true;
-}
-
-
-BEGIN_MESSAGE_MAP(CMpcAudioRendererSettingsWnd, CInternalPropertyPageWnd)
-END_MESSAGE_MAP()
diff --git a/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererSettingsWnd.h b/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererSettingsWnd.h
deleted file mode 100644
index 54491b922..000000000
--- a/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererSettingsWnd.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * (C) 2010-2012 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#pragma once
-
-#include "../../InternalPropertyPage.h"
-#include "IMpcAudioRendererFilter.h"
-#include <afxcmn.h>
-
-class __declspec(uuid("1E53BA32-3BCC-4dff-9342-34E46BE3F5A5"))
- CMpcAudioRendererSettingsWnd : public CInternalPropertyPageWnd
-{
-private:
- CComQIPtr<IMpcAudioRendererFilter> m_pMAR;
-
- CStatic m_txtWasapiMode;
- CButton m_cbWasapiMode;
- CButton m_cbMuteFastForward;
-
- CStatic m_txtSoundDevice;
- CComboBox m_cbSoundDevice;
-
- enum {
- IDC_PP_WASAPI_MODE = 10000,
- IDC_PP_MUTE_FAST_FORWARD,
- IDC_PP_SOUND_DEVICE
- };
-
-public:
- CMpcAudioRendererSettingsWnd();
-
- bool OnConnect(const CInterfaceList<IUnknown, &IID_IUnknown>& pUnks);
- void OnDisconnect();
- bool OnActivate();
- void OnDeactivate();
- bool OnApply();
-
- HRESULT GetAvailableAudioDevices();
-
- static LPCTSTR GetWindowTitle() { return _T("Settings"); }
- static CSize GetWindowSize() { return CSize(340, 82); }
-
- DECLARE_MESSAGE_MAP()
-};
diff --git a/src/filters/renderer/MpcAudioRenderer/resource.h b/src/filters/renderer/MpcAudioRenderer/resource.h
deleted file mode 100644
index e813a13b9..000000000
--- a/src/filters/renderer/MpcAudioRenderer/resource.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by MpcAudioRenderer.rc
-//
-#define IDS_FILTER_SETTINGS_CAPTION 7000
-#define IDS_ARS_WASAPI_MODE 7100
-#define IDS_ARS_MUTE_FAST_FORWARD 7101
-#define IDS_ARS_SOUND_DEVICE 7102
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 103
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1001
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/src/filters/renderer/MpcAudioRenderer/stdafx.h b/src/filters/renderer/MpcAudioRenderer/stdafx.h
deleted file mode 100644
index 7c436e070..000000000
--- a/src/filters/renderer/MpcAudioRenderer/stdafx.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * (C) 2009-2013 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#pragma once
-
-#include "../../../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
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-
-#include <afx.h>
-#include <afxwin.h> // MFC core and standard components
-
-#include "BaseClasses/streams.h"
-#include <dvdmedia.h>
-#include <dsound.h>
diff --git a/src/filters/renderer/VideoRenderers/AsyncCallback.h b/src/filters/renderer/VideoRenderers/AsyncCallback.h
new file mode 100644
index 000000000..d49645582
--- /dev/null
+++ b/src/filters/renderer/VideoRenderers/AsyncCallback.h
@@ -0,0 +1,71 @@
+/*
+* (C) 2015 see Authors.txt
+*
+* This file is part of MPC-HC.
+*
+* MPC-HC 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.
+*
+* MPC-HC is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+#pragma once
+
+#include <mfobjects.h>
+
+// T: Type of the parent object
+template <class T>
+class AsyncCallback : public IMFAsyncCallback
+{
+public:
+ typedef HRESULT(T::*InvokeFn)(IMFAsyncResult* pAsyncResult);
+
+ AsyncCallback(T* pParent, InvokeFn fn) : m_pParent(pParent), m_pInvokeFn(fn) {}
+ virtual ~AsyncCallback() = default;
+
+ // IUnknown
+ STDMETHODIMP QueryInterface(REFIID iid, void** ppv) override {
+ if (!ppv) {
+ return E_POINTER;
+ }
+ if (iid == __uuidof(IUnknown)) {
+ *ppv = static_cast<IUnknown*>(static_cast<IMFAsyncCallback*>(this));
+ } else if (iid == __uuidof(IMFAsyncCallback)) {
+ *ppv = static_cast<IMFAsyncCallback*>(this);
+ } else {
+ *ppv = nullptr;
+ return E_NOINTERFACE;
+ }
+ AddRef();
+ return S_OK;
+ }
+
+ STDMETHODIMP_(ULONG) AddRef() override {
+ return m_pParent->AddRef();
+ }
+
+ STDMETHODIMP_(ULONG) Release() override {
+ return m_pParent->Release();
+ }
+
+ // IMFAsyncCallback
+ STDMETHODIMP GetParameters(DWORD*, DWORD*) override {
+ return E_NOTIMPL;
+ }
+
+ STDMETHODIMP Invoke(IMFAsyncResult* pAsyncResult) override {
+ return (m_pParent->*m_pInvokeFn)(pAsyncResult);
+ }
+
+ T* m_pParent;
+ InvokeFn m_pInvokeFn;
+};
diff --git a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp
index 46e650176..b49a0364b 100644
--- a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp
+++ b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp
@@ -144,6 +144,7 @@ CDX9AllocatorPresenter::CDX9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRES
, m_LastFrameDuration(0)
, m_LastSampleTime(0)
, m_FocusThread(nullptr)
+ , m_hFocusWindow(nullptr)
{
ZeroMemory(&m_VMR9AlphaBitmap, sizeof(m_VMR9AlphaBitmap));
@@ -623,8 +624,11 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
m_bCompositionEnabled = !!bCompositionEnabled;
m_bAlternativeVSync = r.m_AdvRendSets.bVMR9AlterativeVSync;
- // detect FP textures support
- rd->m_bFP16Support = SUCCEEDED(m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, D3DUSAGE_QUERY_FILTER, D3DRTYPE_VOLUMETEXTURE, D3DFMT_A32B32G32R32F));
+ // detect FP16 textures support
+ rd->m_bFP16Support = SUCCEEDED(m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, D3DUSAGE_QUERY_FILTER, D3DRTYPE_VOLUMETEXTURE, D3DFMT_A16B16G16R16F));
+
+ // detect FP32 textures support
+ rd->m_bFP32Support = SUCCEEDED(m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, D3DUSAGE_QUERY_FILTER, D3DRTYPE_VOLUMETEXTURE, D3DFMT_A32B32G32R32F));
// detect 10-bit textures support
rd->m_b10bitSupport = SUCCEEDED(m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, D3DUSAGE_QUERY_FILTER, D3DRTYPE_TEXTURE, D3DFMT_A2R10G10B10));
@@ -635,7 +639,7 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
// set settings that depend on hardware feature support
m_bForceInputHighColorResolution = r.m_AdvRendSets.bEVRForceInputHighColorResolution && m_bIsEVR && rd->m_b10bitSupport;
m_bHighColorResolution = r.m_AdvRendSets.bEVRHighColorResolution && m_bIsEVR && rd->m_b10bitSupport && bHighColorSupport;
- m_bFullFloatingPointProcessing = r.m_AdvRendSets.bVMR9FullFloatingPointProcessing && rd->m_bFP16Support;
+ m_bFullFloatingPointProcessing = r.m_AdvRendSets.bVMR9FullFloatingPointProcessing && rd->m_bFP32Support;
m_bHalfFloatingPointProcessing = r.m_AdvRendSets.bVMR9HalfFloatingPointProcessing && rd->m_bFP16Support && !m_bFullFloatingPointProcessing;
// set color formats
@@ -678,6 +682,10 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
m_FocusThread = (CFocusThread*)AfxBeginThread(RUNTIME_CLASS(CFocusThread), 0, 0, 0);
}
+ HWND hFocusWindow = m_FocusThread->GetFocusWindow();
+ bTryToReset &= m_hFocusWindow == hFocusWindow;
+ m_hFocusWindow = hFocusWindow;
+
if (m_pD3DEx) {
m_pD3DEx->GetAdapterDisplayModeEx(m_CurrentAdapter, &DisplayMode, nullptr);
@@ -687,16 +695,13 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
pp.BackBufferWidth = m_ScreenSize.cx;
pp.BackBufferHeight = m_ScreenSize.cy;
- if (bTryToReset) {
- if (!m_pD3DDevEx || FAILED(hr = m_pD3DDevEx->ResetEx(&pp, &DisplayMode))) {
- bTryToReset = false;
- m_pD3DDev = nullptr;
- m_pD3DDevEx = nullptr;
- }
- }
+ bTryToReset = bTryToReset && m_pD3DDevEx && SUCCEEDED(hr = m_pD3DDevEx->ResetEx(&pp, &DisplayMode));
+
if (!bTryToReset) {
+ m_pD3DDev = nullptr;
+ m_pD3DDevEx = nullptr;
hr = m_pD3DEx->CreateDeviceEx(
- m_CurrentAdapter, D3DDEVTYPE_HAL, m_FocusThread->GetFocusWindow(),
+ m_CurrentAdapter, D3DDEVTYPE_HAL, m_hFocusWindow,
GetVertexProcessing() | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED | D3DCREATE_ENABLE_PRESENTSTATS | D3DCREATE_NOWINDOWCHANGES, //D3DCREATE_MANAGED
&pp, &DisplayMode, &m_pD3DDevEx);
}
@@ -722,7 +727,7 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
pp.BackBufferHeight = m_ScreenSize.cy;
hr = m_pD3D->CreateDevice(
- m_CurrentAdapter, D3DDEVTYPE_HAL, m_FocusThread->GetFocusWindow(),
+ m_CurrentAdapter, D3DDEVTYPE_HAL, m_hFocusWindow,
GetVertexProcessing() | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED | D3DCREATE_NOWINDOWCHANGES, //D3DCREATE_MANAGED
&pp, &m_pD3DDev);
m_DisplayType = d3ddm.Format;
@@ -744,6 +749,9 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
pp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
}
+ bTryToReset &= m_hFocusWindow == m_hWnd;
+ m_hFocusWindow = m_hWnd;
+
if (m_pD3DEx) {
m_pD3DEx->GetAdapterDisplayModeEx(m_CurrentAdapter, &DisplayMode, nullptr);
m_ScreenSize.SetSize(DisplayMode.Width, DisplayMode.Height);
@@ -751,18 +759,15 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
pp.BackBufferWidth = szDesktopSize.cx;
pp.BackBufferHeight = szDesktopSize.cy;
- if (bTryToReset) {
- if (!m_pD3DDevEx || FAILED(hr = m_pD3DDevEx->ResetEx(&pp, nullptr))) {
- bTryToReset = false;
- m_pD3DDev = nullptr;
- m_pD3DDevEx = nullptr;
- }
- }
+ bTryToReset = bTryToReset && m_pD3DDevEx && SUCCEEDED(hr = m_pD3DDevEx->ResetEx(&pp, nullptr));
+
if (!bTryToReset) {
+ m_pD3DDev = nullptr;
+ m_pD3DDevEx = nullptr;
// We can get 0x8876086a here when switching from two displays to one display using Win + P (Windows 7)
// Cause: We might not reinitialize dx correctly during the switch
hr = m_pD3DEx->CreateDeviceEx(
- m_CurrentAdapter, D3DDEVTYPE_HAL, m_hWnd,
+ m_CurrentAdapter, D3DDEVTYPE_HAL, m_hFocusWindow,
GetVertexProcessing() | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED | D3DCREATE_ENABLE_PRESENTSTATS, //D3DCREATE_MANAGED
&pp, nullptr, &m_pD3DDevEx);
}
@@ -784,7 +789,7 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
pp.BackBufferHeight = szDesktopSize.cy;
hr = m_pD3D->CreateDevice(
- m_CurrentAdapter, D3DDEVTYPE_HAL, m_hWnd,
+ m_CurrentAdapter, D3DDEVTYPE_HAL, m_hFocusWindow,
GetVertexProcessing() | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED, //D3DCREATE_MANAGED
&pp, &m_pD3DDev);
m_DisplayType = d3ddm.Format;
@@ -1127,7 +1132,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int& _RasterStart, int _RasterSi
if (!GetVBlank(ScanLine, InVBlank, _bMeasure)) {
break;
}
- int ScanLineDiff = long(ScanLine) - _RasterStart;
+ ScanLineDiff = long(ScanLine) - _RasterStart;
if (ScanLineDiff > m_ScreenSize.cy / 2) {
ScanLineDiff -= m_ScreenSize.cy;
} else if (ScanLineDiff < -m_ScreenSize.cy / 2) {
@@ -1189,7 +1194,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int& _RasterStart, int _RasterSi
if (!GetVBlank(ScanLine, InVBlank, _bMeasure)) {
break;
}
- int ScanLineDiff = long(ScanLine) - _RasterStart;
+ ScanLineDiff = long(ScanLine) - _RasterStart;
if (ScanLineDiff > m_ScreenSize.cy / 2) {
ScanLineDiff -= m_ScreenSize.cy;
} else if (ScanLineDiff < -m_ScreenSize.cy / 2) {
@@ -1203,7 +1208,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int& _RasterStart, int _RasterSi
bWaited = true;
- int ScanLineDiffLock = long(ScanLine) - D3DDevLockStart;
+ ScanLineDiffLock = long(ScanLine) - D3DDevLockStart;
if (ScanLineDiffLock > m_ScreenSize.cy / 2) {
ScanLineDiffLock -= m_ScreenSize.cy;
} else if (ScanLineDiffLock < -m_ScreenSize.cy / 2) {
@@ -1220,7 +1225,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int& _RasterStart, int _RasterSi
LastLineDiffLock = ScanLineDiffLock;
- int ScanLineDiffSleep = long(ScanLine) - NoSleepStart;
+ ScanLineDiffSleep = long(ScanLine) - NoSleepStart;
if (ScanLineDiffSleep > m_ScreenSize.cy / 2) {
ScanLineDiffSleep -= m_ScreenSize.cy;
} else if (ScanLineDiffSleep < -m_ScreenSize.cy / 2) {
@@ -1456,19 +1461,18 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool bAll)
bool bDoVSyncInPresent = (!bCompositionEnabled && !m_bAlternativeVSync) || !r.m_AdvRendSets.bVMR9VSync;
- CComPtr<IDirect3DQuery9> pEventQuery;
-
- m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQuery);
- if (pEventQuery) {
- pEventQuery->Issue(D3DISSUE_END);
+ CComPtr<IDirect3DQuery9> pEventQueryFlushBeforeVSync;
+ m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQueryFlushBeforeVSync);
+ if (pEventQueryFlushBeforeVSync) {
+ pEventQueryFlushBeforeVSync->Issue(D3DISSUE_END);
}
- if (r.m_AdvRendSets.bVMRFlushGPUBeforeVSync && pEventQuery) {
+ if (r.m_AdvRendSets.bVMRFlushGPUBeforeVSync && pEventQueryFlushBeforeVSync) {
LONGLONG llPerf = rd->GetPerfCounter();
BOOL Data;
//Sleep(5);
LONGLONG FlushStartTime = rd->GetPerfCounter();
- while (S_FALSE == pEventQuery->GetData(&Data, sizeof(Data), D3DGETDATA_FLUSH)) {
+ while (S_FALSE == pEventQueryFlushBeforeVSync->GetData(&Data, sizeof(Data), D3DGETDATA_FLUSH)) {
if (!r.m_AdvRendSets.bVMRFlushGPUWait) {
break;
}
@@ -1511,8 +1515,8 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool bAll)
// Create a query object
{
- CComPtr<IDirect3DQuery9> pEventQuery;
- m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQuery);
+ CComPtr<IDirect3DQuery9> pEventQueryFlushAfterVSync;
+ m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQueryFlushAfterVSync);
LONGLONG llPerf = rd->GetPerfCounter();
CRect presentationSrcRect(rDstPri), presentationDestRect(m_windowRect);
@@ -1533,15 +1537,15 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool bAll)
}
}
// Issue an End event
- if (pEventQuery) {
- pEventQuery->Issue(D3DISSUE_END);
+ if (pEventQueryFlushAfterVSync) {
+ pEventQueryFlushAfterVSync->Issue(D3DISSUE_END);
}
BOOL Data;
- if (r.m_AdvRendSets.bVMRFlushGPUAfterPresent && pEventQuery) {
+ if (r.m_AdvRendSets.bVMRFlushGPUAfterPresent && pEventQueryFlushAfterVSync) {
LONGLONG FlushStartTime = rd->GetPerfCounter();
- while (S_FALSE == pEventQuery->GetData(&Data, sizeof(Data), D3DGETDATA_FLUSH)) {
+ while (S_FALSE == pEventQueryFlushAfterVSync->GetData(&Data, sizeof(Data), D3DGETDATA_FLUSH)) {
if (!r.m_AdvRendSets.bVMRFlushGPUWait) {
break;
}
diff --git a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h
index 6dd983bd9..a7eefc80e 100644
--- a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h
+++ b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -288,6 +288,8 @@ namespace DSObjects
CString m_Decoder;
CFocusThread* m_FocusThread;
+ HWND m_hFocusWindow;
+
public:
CDX9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRESULT& hr, bool bIsEVR, CString& _Error);
~CDX9AllocatorPresenter();
diff --git a/src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp b/src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp
index 4f4704c6d..c350d92df 100644
--- a/src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp
+++ b/src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp
@@ -25,6 +25,9 @@
#include "Dither.h"
#include "DX9RenderingEngine.h"
+// UUID for vorpX hack
+static const IID IID_D3D9VorpVideoCaptureTexture = { 0x8a49d79, 0x8646, 0x4867, { 0xb9, 0x34, 0x13, 0x12, 0xe4, 0x4b, 0x23, 0xdb } };
+
#pragma pack(push, 1)
template<int texcoords>
struct MYD3DVERTEX {
@@ -435,6 +438,10 @@ HRESULT CDX9RenderingEngine::RenderVideoDrawPath(IDirect3DSurface9* pRenderTarge
pVideoTexture = m_pTemporaryVideoTextures[src];
}
+ // Hack to send the pre-resize video texture to vorpX.
+ void* pVorpTex = pVideoTexture; // Prevent the pointer being overwritten.
+ m_pD3DDev->QueryInterface(IID_D3D9VorpVideoCaptureTexture, (void**)&pVorpTex);
+
// Resize the frame
Vector dst[4];
Transform(destRect, dst);
diff --git a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp
index b391bd4b3..1842bd5d2 100644
--- a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp
+++ b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp
@@ -41,6 +41,8 @@ enum EVR_STATS_MSG {
MSG_MIXEROUT
};
+// Guid to tag IMFSample with a group id
+static const GUID GUID_GROUP_ID = { 0x309e32cc, 0x9b23, 0x4c6c, { 0x86, 0x63, 0xcd, 0xd9, 0xad, 0x49, 0x7f, 0x8a } };
// Guid to tag IMFSample with DirectX surface index
static const GUID GUID_SURFACE_INDEX = { 0x30c8e9f6, 0x415, 0x4b81, { 0xa3, 0x15, 0x1, 0xa, 0xc6, 0xa9, 0xda, 0x19 } };
@@ -89,8 +91,7 @@ CEVRAllocatorPresenter::CEVRAllocatorPresenter(HWND hWnd, bool bFullscreen, HRES
, m_hGetMixerThread(nullptr)
, m_hVSyncThread(nullptr)
, m_nRenderState(Shutdown)
- , m_pCurrentDisplaydSample(nullptr)
- , m_bWaitingSample(false)
+ , m_nCurrentGroupId(0)
, m_bLastSampleOffsetValid(false)
, m_LastScheduledSampleTime(-1)
, m_LastScheduledSampleTimeFP(-1)
@@ -103,6 +104,7 @@ CEVRAllocatorPresenter::CEVRAllocatorPresenter(HWND hWnd, bool bFullscreen, HRES
, m_nStepCount(0)
, m_bSignaledStarvation(false)
, m_StarvationClock(0)
+ , m_SampleFreeCallback(this, &CEVRAllocatorPresenter::OnSampleFree)
, fnDXVA2CreateDirect3DDeviceManager9("dxva2.dll", "DXVA2CreateDirect3DDeviceManager9")
, fnMFCreateDXSurfaceBuffer("evr.dll", "MFCreateDXSurfaceBuffer")
, fnMFCreateVideoSampleFromSurface("evr.dll", "MFCreateVideoSampleFromSurface")
@@ -311,6 +313,22 @@ STDMETHODIMP_(bool) CEVRAllocatorPresenter::Paint(bool bAll)
return __super::Paint(bAll);
}
+STDMETHODIMP_(bool) CEVRAllocatorPresenter::Paint(IMFSample* pMFSample)
+{
+ CAutoLock lock(&m_RenderLock);
+
+ m_pCurrentlyDisplayedSample = pMFSample;
+ pMFSample->GetUINT32(GUID_SURFACE_INDEX, (UINT32*)&m_nCurSurface);
+
+ auto sampleHasCurrentGroupId = [this](IMFSample * pSample) {
+ UINT32 nGroupId;
+ return (SUCCEEDED(pSample->GetUINT32(GUID_GROUP_ID, &nGroupId)) && nGroupId == m_nCurrentGroupId);
+ };
+ ASSERT(sampleHasCurrentGroupId(pMFSample));
+
+ return Paint(true);
+}
+
STDMETHODIMP CEVRAllocatorPresenter::NonDelegatingQueryInterface(REFIID riid, void** ppv)
{
HRESULT hr;
@@ -350,6 +368,9 @@ STDMETHODIMP CEVRAllocatorPresenter::NonDelegatingQueryInterface(REFIID riid, vo
// IMFClockStateSink
STDMETHODIMP CEVRAllocatorPresenter::OnClockStart(MFTIME hnsSystemTime, LONGLONG llClockStartOffset)
{
+ HRESULT hr;
+ CHECK_HR(CheckShutdown());
+
m_nRenderState = Started;
TRACE_EVR("EVR: OnClockStart hnsSystemTime = %I64d, llClockStartOffset = %I64d\n", hnsSystemTime, llClockStartOffset);
@@ -361,6 +382,9 @@ STDMETHODIMP CEVRAllocatorPresenter::OnClockStart(MFTIME hnsSystemTime, LONGLONG
STDMETHODIMP CEVRAllocatorPresenter::OnClockStop(MFTIME hnsSystemTime)
{
+ HRESULT hr;
+ CHECK_HR(CheckShutdown());
+
TRACE_EVR("EVR: OnClockStop hnsSystemTime = %I64d\n", hnsSystemTime);
m_nRenderState = Stopped;
@@ -371,6 +395,9 @@ STDMETHODIMP CEVRAllocatorPresenter::OnClockStop(MFTIME hnsSystemTime)
STDMETHODIMP CEVRAllocatorPresenter::OnClockPause(MFTIME hnsSystemTime)
{
+ HRESULT hr;
+ CHECK_HR(CheckShutdown());
+
TRACE_EVR("EVR: OnClockPause hnsSystemTime = %I64d\n", hnsSystemTime);
if (!m_bSignaledStarvation) {
m_nRenderState = Paused;
@@ -382,6 +409,9 @@ STDMETHODIMP CEVRAllocatorPresenter::OnClockPause(MFTIME hnsSystemTime)
STDMETHODIMP CEVRAllocatorPresenter::OnClockRestart(MFTIME hnsSystemTime)
{
+ HRESULT hr;
+ CHECK_HR(CheckShutdown());
+
m_nRenderState = Started;
m_ModeratedTimeLast = -1;
@@ -559,6 +589,7 @@ void CEVRAllocatorPresenter::CompleteFrameStep(bool bCancel)
STDMETHODIMP CEVRAllocatorPresenter::ProcessMessage(MFVP_MESSAGE_TYPE eMessage, ULONG_PTR ulParam)
{
HRESULT hr = S_OK;
+ CHECK_HR(CheckShutdown());
switch (eMessage) {
case MFVP_MESSAGE_BEGINSTREAMING: // The EVR switched from stopped to paused. The presenter should allocate resources
@@ -752,11 +783,27 @@ HRESULT CEVRAllocatorPresenter::CreateOptimalOutputType(IMFMediaType* pMixerProp
HRESULT CEVRAllocatorPresenter::SetMediaType(IMFMediaType* pType)
{
- HRESULT hr;
+ HRESULT hr = S_OK;
AM_MEDIA_TYPE* pAMMedia = nullptr;
CString strTemp, strTemp1;
- CheckPointer(pType, E_POINTER);
+ CHECK_HR(CheckShutdown());
+
+ if (!pType) {
+ // Release
+ RemoveAllSamples();
+ DeleteSurfaces();
+ CAutoLock lock(&m_MediaTypeLock);
+ m_pMediaType = nullptr;
+ return hr;
+ }
+
+ DWORD dwFlags = 0;
+ if (m_pMediaType && m_pMediaType->IsEqual(pType, &dwFlags) == S_OK) {
+ // Nothing to do
+ return hr;
+ }
+
CHECK_HR(pType->GetRepresentation(FORMAT_VideoInfo2, (void**)&pAMMedia));
hr = InitializeDevice(pType);
@@ -1053,17 +1100,22 @@ bool CEVRAllocatorPresenter::GetImageFromMixer()
bool bDoneSomething = false;
+ auto sampleHasCurrentGroupId = [this](IMFSample * pSample) {
+ UINT32 nGroupId;
+ return (SUCCEEDED(pSample->GetUINT32(GUID_GROUP_ID, &nGroupId)) && nGroupId == m_nCurrentGroupId);
+ };
+
while (SUCCEEDED(hr)) {
CComPtr<IMFSample> pSample;
if (FAILED(GetFreeSample(&pSample))) {
- m_bWaitingSample = true;
break;
}
ZeroMemory(&dataBuffer, sizeof(dataBuffer));
dataBuffer.pSample = pSample;
pSample->GetUINT32(GUID_SURFACE_INDEX, &dwSurface);
+ ASSERT(sampleHasCurrentGroupId(pSample));
{
llClockBefore = GetRenderersData()->GetPerfCounter();
@@ -1072,7 +1124,8 @@ bool CEVRAllocatorPresenter::GetImageFromMixer()
}
if (hr == MF_E_TRANSFORM_NEED_MORE_INPUT) {
- MoveToFreeList(pSample, false);
+ AddToFreeList(pSample, false);
+ pSample = nullptr; // The sample should not be used after being queued
// Important: Release any events returned from the ProcessOutput method.
SAFE_RELEASE(dataBuffer.pEvents);
break;
@@ -1105,8 +1158,13 @@ bool CEVRAllocatorPresenter::GetImageFromMixer()
TRACE_EVR("EVR: Get from Mixer : %u (%I64d) (%I64d)\n", dwSurface, nsSampleTime, m_rtTimePerFrame ? nsSampleTime / m_rtTimePerFrame : 0);
- MoveToScheduledList(pSample, false);
- bDoneSomething = true;
+ if (SUCCEEDED(TrackSample(pSample))) {
+ AddToScheduledList(pSample, false);
+ pSample = nullptr; // The sample should not be used after being queued
+ bDoneSomething = true;
+ } else {
+ ASSERT(FALSE);
+ }
// Important: Release any events returned from the ProcessOutput method.
SAFE_RELEASE(dataBuffer.pEvents);
@@ -1472,9 +1530,11 @@ STDMETHODIMP CEVRAllocatorPresenter::InitializeDevice(IMFMediaType* pMediaType)
hr = fnMFCreateVideoSampleFromSurface(m_pVideoSurface[i], &pMFSample);
if (SUCCEEDED(hr)) {
+ pMFSample->SetUINT32(GUID_GROUP_ID, m_nCurrentGroupId);
pMFSample->SetUINT32(GUID_SURFACE_INDEX, i);
CAutoLock sampleQueueLock(&m_SampleQueueLock);
m_FreeSamples.AddTail(pMFSample);
+ pMFSample = nullptr; // The sample should not be used after being queued
}
ASSERT(SUCCEEDED(hr));
}
@@ -1499,14 +1559,6 @@ DWORD WINAPI CEVRAllocatorPresenter::PresentThread(LPVOID lpParam)
return 0;
}
-void CEVRAllocatorPresenter::CheckWaitingSampleFromMixer()
-{
- if (m_bWaitingSample) {
- m_bWaitingSample = false;
- //GetImageFromMixer(); // Do this in processing thread instead
- }
-}
-
bool ExtractInterlaced(const AM_MEDIA_TYPE* pmt)
{
if (pmt->formattype == FORMAT_VideoInfo) {
@@ -1787,7 +1839,9 @@ LONGLONG CEVRAllocatorPresenter::GetClockTime(LONGLONG PerformanceCounter)
void CEVRAllocatorPresenter::OnVBlankFinished(bool bAll, LONGLONG PerformanceCounter)
{
- if (!m_pCurrentDisplaydSample || !m_OrderedPaint || !bAll) {
+ // This function is meant to be called only from the rendering function
+ // so with the ownership on m_RenderLock.
+ if (!m_pCurrentlyDisplayedSample || !m_OrderedPaint || !bAll) {
return;
}
@@ -1806,14 +1860,14 @@ void CEVRAllocatorPresenter::OnVBlankFinished(bool bAll, LONGLONG PerformanceCou
llClockTime = m_StarvationClock;
}
- if (SUCCEEDED(m_pCurrentDisplaydSample->GetSampleDuration(&SampleDuration))) {
+ if (SUCCEEDED(m_pCurrentlyDisplayedSample->GetSampleDuration(&SampleDuration))) {
// Some filters return invalid values, ignore them
if (SampleDuration > MIN_FRAME_TIME) {
TimePerFrame = SampleDuration;
}
}
- if (FAILED(m_pCurrentDisplaydSample->GetSampleTime(&nsSampleTime))) {
+ if (FAILED(m_pCurrentlyDisplayedSample->GetSampleTime(&nsSampleTime))) {
nsSampleTime = llClockTime;
}
@@ -1845,7 +1899,6 @@ void CEVRAllocatorPresenter::OnVBlankFinished(bool bAll, LONGLONG PerformanceCou
m_fSyncOffsetAvr = MeanOffset;
m_bSyncStatsAvailable = true;
m_fSyncOffsetStdDev = StdDev;
-
}
}
@@ -1866,9 +1919,11 @@ STDMETHODIMP_(bool) CEVRAllocatorPresenter::ResetDevice()
HRESULT hr = fnMFCreateVideoSampleFromSurface(m_pVideoSurface[i], &pMFSample);
if (SUCCEEDED(hr)) {
+ pMFSample->SetUINT32(GUID_GROUP_ID, m_nCurrentGroupId);
pMFSample->SetUINT32(GUID_SURFACE_INDEX, i);
CAutoLock sampleQueueLock(&m_SampleQueueLock);
m_FreeSamples.AddTail(pMFSample);
+ pMFSample = nullptr; // The sample should not be used after being queued
}
ASSERT(SUCCEEDED(hr));
}
@@ -1939,6 +1994,17 @@ void CEVRAllocatorPresenter::RenderThread()
timeGetDevCaps(&tc, sizeof(TIMECAPS));
DWORD dwResolution = std::min(std::max(tc.wPeriodMin, 0u), tc.wPeriodMax);
VERIFY(timeBeginPeriod(dwResolution) == 0);
+
+ auto checkPendingMediaFinished = [this]() {
+ if (m_bPendingMediaFinished) {
+ CAutoLock lock(&m_SampleQueueLock);
+ if (m_ScheduledSamples.IsEmpty()) {
+ m_bPendingMediaFinished = false;
+ m_pSink->Notify(EC_COMPLETE, 0, 0);
+ }
+ }
+ };
+
const CRenderersSettings& r = GetRenderersSettings();
int NextSleepTime = 1;
@@ -1993,12 +2059,12 @@ void CEVRAllocatorPresenter::RenderThread()
//if (WaitForMultipleObjects (_countof(hEvtsBuff), hEvtsBuff, FALSE, INFINITE) == WAIT_OBJECT_0+2)
{
CComPtr<IMFSample> pMFSample;
- LONGLONG llPerf = GetRenderersData()->GetPerfCounter();
- UNREFERENCED_PARAMETER(llPerf);
+ //LONGLONG llPerf2 = GetRenderersData()->GetPerfCounter();
+ //UNREFERENCED_PARAMETER(llPerf2);
int nSamplesLeft = 0;
if (SUCCEEDED(GetScheduledSample(&pMFSample, nSamplesLeft))) {
- //pMFSample->GetUINT32 (GUID_SURFACE_INDEX, (UINT32*)&m_nCurSurface);
- m_pCurrentDisplaydSample = pMFSample;
+ //UINT32 nSurface;
+ //pMFSample->GetUINT32(GUID_SURFACE_INDEX, (UINT32*)&nSurface);
bool bValidSampleTime = true;
HRESULT hrGetSampleTime = pMFSample->GetSampleTime(&nsSampleTime);
@@ -2014,7 +2080,7 @@ void CEVRAllocatorPresenter::RenderThread()
bValidSampleDuration = false;
}
- //TRACE_EVR ("EVR: RenderThread ==>> Presenting surface %d (%I64d)\n", m_nCurSurface, nsSampleTime);
+ //TRACE_EVR("EVR: RenderThread ==>> Presenting surface %d (%I64d)\n", nSurface, nsSampleTime);
bool bStepForward = false;
@@ -2026,14 +2092,13 @@ void CEVRAllocatorPresenter::RenderThread()
m_nStepCount = 0;
/*
} else if (m_nStepCount > 0) {
- pMFSample->GetUINT32(GUID_SURFACE_INDEX, (UINT32 *)&m_nCurSurface);
++m_OrderedPaint;
if (!g_bExternalSubtitleTime) {
__super::SetTime (g_tSegmentStart + nsSampleTime);
}
- Paint(true);
+ Paint(pMFSample);
m_nDroppedUpdate = 0;
- CompleteFrameStep (false);
+ CompleteFrameStep(false);
bStepForward = true;
*/
} else if (m_nRenderState == Started) {
@@ -2049,18 +2114,13 @@ void CEVRAllocatorPresenter::RenderThread()
if (!bValidSampleTime) {
// Just play as fast as possible
bStepForward = true;
- pMFSample->GetUINT32(GUID_SURFACE_INDEX, (UINT32*)&m_nCurSurface);
++m_OrderedPaint;
if (!g_bExternalSubtitleTime) {
__super::SetTime(g_tSegmentStart + nsSampleTime);
}
- Paint(true);
+ Paint(pMFSample);
} else {
LONGLONG TimePerFrame = (LONGLONG)(GetFrameTime() * 10000000.0);
- LONGLONG DrawTime = m_PaintTime * 9 / 10 - 20000; // 2 ms offset (= m_PaintTime * 0.9 - 20000)
- //if (!r.bVMR9VSync)
- DrawTime = 0;
-
LONGLONG SyncOffset = 0;
LONGLONG VSyncTime = 0;
LONGLONG TimeToNextVSync = -1;
@@ -2168,7 +2228,6 @@ void CEVRAllocatorPresenter::RenderThread()
TRACE_EVR("EVR: Normalframe\n");
m_nDroppedUpdate = 0;
bStepForward = true;
- pMFSample->GetUINT32(GUID_SURFACE_INDEX, (UINT32*)&m_nCurSurface);
m_LastFrameDuration = nsSampleTime - m_LastSampleTime;
m_LastSampleTime = nsSampleTime;
m_LastPredictedSync = VSyncOffset0;
@@ -2182,7 +2241,7 @@ void CEVRAllocatorPresenter::RenderThread()
if (!g_bExternalSubtitleTime) {
__super::SetTime(g_tSegmentStart + nsSampleTime);
}
- Paint(true);
+ Paint(pMFSample);
NextSleepTime = 0;
m_pcFramesDrawn++;
@@ -2249,18 +2308,17 @@ void CEVRAllocatorPresenter::RenderThread()
if (!g_bExternalSubtitleTime) {
__super::SetTime(g_tSegmentStart + nsSampleTime);
}
- Paint(false);
+ Paint(pMFSample);
}
NextSleepTime = int(SampleDuration / 10000 - 2);
}
- m_pCurrentDisplaydSample = nullptr;
if (bStepForward) {
- MoveToFreeList(pMFSample, true);
- CheckWaitingSampleFromMixer();
m_MaxSampleDuration = std::max(SampleDuration, m_MaxSampleDuration);
+ checkPendingMediaFinished();
} else {
- MoveToScheduledList(pMFSample, true);
+ AddToScheduledList(pMFSample, true);
+ pMFSample = nullptr; // The sample should not be used after being queued
}
bForcePaint = false;
@@ -2269,8 +2327,9 @@ void CEVRAllocatorPresenter::RenderThread()
m_pSink->Notify(EC_STARVATION, 0, 0);
m_bSignaledStarvation = true;
}
+ } else {
+ checkPendingMediaFinished();
}
- //GetImageFromMixer();
}
//else
//{
@@ -2485,6 +2544,8 @@ void CEVRAllocatorPresenter::RemoveAllSamples()
m_LastScheduledSampleTime = -1;
m_LastScheduledUncorrectedSampleTime = -1;
m_nUsedBuffer = 0;
+ // Increment the group id to make sure old samples will really be deleted
+ m_nCurrentGroupId++;
}
HRESULT CEVRAllocatorPresenter::GetFreeSample(IMFSample** ppSample)
@@ -2492,7 +2553,7 @@ HRESULT CEVRAllocatorPresenter::GetFreeSample(IMFSample** ppSample)
CAutoLock lock(&m_SampleQueueLock);
HRESULT hr = S_OK;
- if (m_FreeSamples.GetCount() > 1) { // <= Cannot use first free buffer (can be currently displayed)
+ if (!m_FreeSamples.IsEmpty()) {
m_nUsedBuffer++;
*ppSample = m_FreeSamples.RemoveHead().Detach();
} else {
@@ -2502,15 +2563,15 @@ HRESULT CEVRAllocatorPresenter::GetFreeSample(IMFSample** ppSample)
return hr;
}
-HRESULT CEVRAllocatorPresenter::GetScheduledSample(IMFSample** ppSample, int& _Count)
+HRESULT CEVRAllocatorPresenter::GetScheduledSample(IMFSample** ppSample, int& count)
{
CAutoLock lock(&m_SampleQueueLock);
HRESULT hr = S_OK;
- _Count = (int)m_ScheduledSamples.GetCount();
- if (_Count > 0) {
+ count = (int)m_ScheduledSamples.GetCount();
+ if (count > 0) {
*ppSample = m_ScheduledSamples.RemoveHead().Detach();
- --_Count;
+ --count;
} else {
hr = MF_E_SAMPLEALLOCATOR_EMPTY;
}
@@ -2518,15 +2579,11 @@ HRESULT CEVRAllocatorPresenter::GetScheduledSample(IMFSample** ppSample, int& _C
return hr;
}
-void CEVRAllocatorPresenter::MoveToFreeList(IMFSample* pSample, bool bTail)
+void CEVRAllocatorPresenter::AddToFreeList(IMFSample* pSample, bool bTail)
{
CAutoLock lock(&m_SampleQueueLock);
m_nUsedBuffer--;
- if (m_bPendingMediaFinished && m_nUsedBuffer == 0) {
- m_bPendingMediaFinished = false;
- m_pSink->Notify(EC_COMPLETE, 0, 0);
- }
if (bTail) {
m_FreeSamples.AddTail(pSample);
} else {
@@ -2534,11 +2591,11 @@ void CEVRAllocatorPresenter::MoveToFreeList(IMFSample* pSample, bool bTail)
}
}
-void CEVRAllocatorPresenter::MoveToScheduledList(IMFSample* pSample, bool _bSorted)
+void CEVRAllocatorPresenter::AddToScheduledList(IMFSample* pSample, bool bSorted)
{
+ CAutoLock lock(&m_SampleQueueLock);
- if (_bSorted) {
- CAutoLock lock(&m_SampleQueueLock);
+ if (bSorted) {
// Insert sorted
/*POSITION Iterator = m_ScheduledSamples.GetHeadPosition();
@@ -2560,9 +2617,6 @@ void CEVRAllocatorPresenter::MoveToScheduledList(IMFSample* pSample, bool _bSort
m_ScheduledSamples.AddHead(pSample);
} else {
-
- CAutoLock lock(&m_SampleQueueLock);
-
const CRenderersSettings& r = GetRenderersSettings();
double ForceFPS = 0.0;
//double ForceFPS = 59.94;
@@ -2594,7 +2648,7 @@ void CEVRAllocatorPresenter::MoveToScheduledList(IMFSample* pSample, bool _bSort
}
if (Diff < m_rtTimePerFrame * 8 && m_rtTimePerFrame && Diff2 < m_rtTimePerFrame * 8) { // Detect seeking
int iPos = (m_DetectedFrameTimePos++) % 60;
- LONGLONG Diff = Time - PrevTime;
+ Diff = Time - PrevTime;
if (PrevTime == -1) {
Diff = 0;
}
@@ -2762,7 +2816,6 @@ void CEVRAllocatorPresenter::MoveToScheduledList(IMFSample* pSample, bool _bSort
m_LastScheduledSampleTime = Time;
m_ScheduledSamples.AddTail(pSample);
-
}
}
@@ -2770,21 +2823,40 @@ void CEVRAllocatorPresenter::FlushSamples()
{
CAutoLock lock(this);
CAutoLock lock2(&m_SampleQueueLock);
+ CAutoLock lock3(&m_RenderLock);
+
+ m_pCurrentlyDisplayedSample = nullptr;
+ m_ScheduledSamples.RemoveAll();
- FlushSamplesInternal();
+ m_LastSampleOffset = 0;
+ m_bLastSampleOffsetValid = false;
+ m_bSignaledStarvation = false;
m_LastScheduledSampleTime = -1;
}
-void CEVRAllocatorPresenter::FlushSamplesInternal()
+HRESULT CEVRAllocatorPresenter::TrackSample(IMFSample* pSample)
{
- while (!m_ScheduledSamples.IsEmpty()) {
- CComPtr<IMFSample> pMFSample;
-
- pMFSample = m_ScheduledSamples.RemoveHead();
- MoveToFreeList(pMFSample, true);
+ HRESULT hr = E_FAIL;
+ if (CComQIPtr<IMFTrackedSample> pTracked = pSample) {
+ hr = pTracked->SetAllocator(&m_SampleFreeCallback, nullptr);
}
+ return hr;
+}
- m_LastSampleOffset = 0;
- m_bLastSampleOffsetValid = false;
- m_bSignaledStarvation = false;
+HRESULT CEVRAllocatorPresenter::OnSampleFree(IMFAsyncResult* pResult)
+{
+ CComPtr<IUnknown> pObject;
+ HRESULT hr = pResult->GetObject(&pObject);
+ if (SUCCEEDED(hr)) {
+ if (CComQIPtr<IMFSample> pSample = pObject) {
+ // Ignore the sample if it is from an old group
+ UINT32 nGroupId;
+ CAutoLock sampleQueueLock(&m_SampleQueueLock);
+ if (SUCCEEDED(pSample->GetUINT32(GUID_GROUP_ID, &nGroupId)) && nGroupId == m_nCurrentGroupId) {
+ AddToFreeList(pSample, true);
+ pSample = nullptr; // The sample should not be used after being queued
+ }
+ }
+ }
+ return hr;
}
diff --git a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.h b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.h
index 292b7a4e1..cbb8f22d9 100644
--- a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.h
+++ b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.h
@@ -24,6 +24,7 @@
#include <mfapi.h> // API Media Foundation
#include <evr9.h>
#include "../../../DSUtil/WinapiFunc.h"
+#include "AsyncCallback.h"
namespace DSObjects
{
@@ -144,6 +145,7 @@ namespace DSObjects
STDMETHODIMP GetVideoService(HANDLE hDevice, REFIID riid, void** ppService);
protected:
+ STDMETHODIMP_(bool) Paint(IMFSample* pMFSample);
void OnResetDevice();
virtual void OnVBlankFinished(bool bAll, LONGLONG PerformanceCounter);
@@ -193,10 +195,10 @@ namespace DSObjects
CCritSec m_ImageProcessingLock;
CCritSec m_MediaTypeLock;
- CInterfaceList<IMFSample, &IID_IMFSample> m_FreeSamples;
- CInterfaceList<IMFSample, &IID_IMFSample> m_ScheduledSamples;
- IMFSample* m_pCurrentDisplaydSample;
- bool m_bWaitingSample;
+ UINT32 m_nCurrentGroupId;
+ CInterfaceList<IMFSample> m_FreeSamples;
+ CInterfaceList<IMFSample> m_ScheduledSamples;
+ CComPtr<IMFSample> m_pCurrentlyDisplayedSample;
bool m_bLastSampleOffsetValid;
LONGLONG m_LastScheduledSampleTime;
double m_LastScheduledSampleTimeFP;
@@ -232,17 +234,21 @@ namespace DSObjects
void StopWorkerThreads();
HRESULT CheckShutdown() const;
void CompleteFrameStep(bool bCancel);
- void CheckWaitingSampleFromMixer();
static DWORD WINAPI VSyncThreadStatic(LPVOID lpParam);
void VSyncThread();
void RemoveAllSamples();
HRESULT GetFreeSample(IMFSample** ppSample);
- HRESULT GetScheduledSample(IMFSample** ppSample, int& _Count);
- void MoveToFreeList(IMFSample* pSample, bool bTail);
- void MoveToScheduledList(IMFSample* pSample, bool _bSorted);
+ HRESULT GetScheduledSample(IMFSample** ppSample, int& count);
+ void AddToFreeList(IMFSample* pSample, bool bTail);
+ void AddToScheduledList(IMFSample* pSample, bool bSorted);
void FlushSamples();
- void FlushSamplesInternal();
+
+ HRESULT TrackSample(IMFSample* pSample);
+
+ // Callback when a video sample is released.
+ HRESULT OnSampleFree(IMFAsyncResult* pResult);
+ AsyncCallback<CEVRAllocatorPresenter> m_SampleFreeCallback;
// === Media type negotiation functions
HRESULT RenegotiateMediaType();
diff --git a/src/filters/renderer/VideoRenderers/FocusThread.cpp b/src/filters/renderer/VideoRenderers/FocusThread.cpp
index 73620ea98..c71365d5f 100644
--- a/src/filters/renderer/VideoRenderers/FocusThread.cpp
+++ b/src/filters/renderer/VideoRenderers/FocusThread.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -39,18 +39,18 @@ CFocusThread::CFocusThread()
: m_hWnd(nullptr)
, m_hEvtInit(nullptr)
{
- WNDCLASS wndclass;
-
- wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_NOCLOSE;
- wndclass.lpfnWndProc = FocusWndProc;
- wndclass.cbClsExtra = 0;
- wndclass.cbWndExtra = 0;
- wndclass.hInstance = nullptr;
- wndclass.hIcon = nullptr;
- wndclass.hCursor = nullptr;
- wndclass.hbrBackground = nullptr;
- wndclass.lpszMenuName = nullptr;
- wndclass.lpszClassName = _T("D3DFocusClass");
+ WNDCLASS wndclass {
+ CS_HREDRAW | CS_VREDRAW | CS_NOCLOSE,
+ FocusWndProc,
+ 0,
+ 0,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ _T("D3DFocusClass")
+ };
if (!RegisterClass(&wndclass)) {
TRACE("Registering focus window failed");
@@ -82,6 +82,11 @@ int CFocusThread::ExitInstance()
if (m_hWnd) {
DestroyWindow(m_hWnd);
m_hWnd = nullptr;
+
+ CWnd* pMainWnd = AfxGetApp()->GetMainWnd();
+ if (pMainWnd) {
+ pMainWnd->SetActiveWindow();
+ }
}
return __super::ExitInstance();
}
diff --git a/src/filters/renderer/VideoRenderers/FocusThread.h b/src/filters/renderer/VideoRenderers/FocusThread.h
index 7d4d9f837..17701f088 100644
--- a/src/filters/renderer/VideoRenderers/FocusThread.h
+++ b/src/filters/renderer/VideoRenderers/FocusThread.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -32,13 +32,16 @@ private:
HANDLE m_hEvtInit;
protected:
- CFocusThread(void); // protected constructor used by dynamic creation
- ~CFocusThread(void);
+ CFocusThread(); // protected constructor used by dynamic creation
+ ~CFocusThread();
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
HWND GetFocusWindow();
+
+protected:
+ afx_msg void OnDestroy();
};
diff --git a/src/filters/renderer/VideoRenderers/IPinHook.cpp b/src/filters/renderer/VideoRenderers/IPinHook.cpp
index e445a0e5b..2e85648a9 100644
--- a/src/filters/renderer/VideoRenderers/IPinHook.cpp
+++ b/src/filters/renderer/VideoRenderers/IPinHook.cpp
@@ -29,6 +29,8 @@
#include "IPinHook.h"
#include "AllocatorCommon.h"
+#include "../../../mpc-hc/FGFilterLAV.h"
+
#define DXVA_LOGFILE_A 0 // set to 1 for logging DXVA data to a file
#define LOG_BITSTREAM 0 // set to 1 for logging DXVA bitstream data to a file
#define LOG_MATRIX 0 // set to 1 for logging DXVA matrix data to a file
@@ -47,7 +49,7 @@ GUID g_guidDXVADecoder = GUID_NULL;
int g_nDXVAVersion = 0;
IPinCVtbl* g_pPinCVtbl = nullptr;
-IPinCVtbl* g_pPinCVtblVideoDriverWorkAround = nullptr;
+IPinCVtbl* g_pPinCVtbl10BitWorkAround = nullptr;
IMemInputPinCVtbl* g_pMemInputPinCVtbl = nullptr;
struct D3DFORMAT_TYPE {
@@ -153,12 +155,15 @@ static HRESULT(STDMETHODCALLTYPE* ReceiveConnectionOrg)(IPinC* This, /* [in] */
static HRESULT STDMETHODCALLTYPE ReceiveConnectionMine(IPinC* This, /* [in] */ IPinC* pConnector, /* [in] */ const AM_MEDIA_TYPE* pmt)
{
- // Force the renderer to always reject the P010 and P016 pixel formats
+ // Force-reject P010 and P016 pixel formats due to Microsoft bug ...
if (pmt && (pmt->subtype == MEDIASUBTYPE_P010 || pmt->subtype == MEDIASUBTYPE_P016)) {
- return VFW_E_TYPE_NOT_ACCEPTED;
- } else {
- return ReceiveConnectionOrg(This, pConnector, pmt);
+ // ... but allow LAV Video Decoder to do that itself in order to support 10bit DXVA.
+ if (GetCLSID((IPin*)pConnector) != GUID_LAVVideo) {
+ return VFW_E_TYPE_NOT_ACCEPTED;
+ }
}
+
+ return ReceiveConnectionOrg(This, pConnector, pmt);
}
@@ -184,26 +189,20 @@ static HRESULT STDMETHODCALLTYPE ReceiveMine(IMemInputPinC* This, IMediaSample*
return ReceiveMineI(This, pSample);
}
-void HookWorkAroundVideoDriversBug(IBaseFilter* pBF)
+void HookWorkAround10BitBug(IBaseFilter* pBF)
{
- // Work-around a bug in some video drivers: some drivers mistakenly
- // accepts P010 and P016 pixel formats as input for VMR/EVR renderers
- // so use the pin hook to add our own level of verification.
-#if MPC_VERSION_MAJOR > 1 || MPC_VERSION_MINOR > 7 || MPC_VERSION_PATCH > 9
-#pragma message("WARNING: Check if this bug is fixed in currently distributed drivers")
-#endif
-
if (CComPtr<IPin> pPin = GetFirstPin(pBF)) {
IPinC* pPinC = (IPinC*)(IPin*)pPin;
DWORD flOldProtect = 0;
- if (VirtualProtect(pPinC->lpVtbl, sizeof(IPinCVtbl), PAGE_WRITECOPY, &flOldProtect)) {
+ if (VirtualProtect(pPinC->lpVtbl, sizeof(IPinCVtbl), PAGE_EXECUTE_WRITECOPY, &flOldProtect)) {
if (ReceiveConnectionOrg == nullptr) {
ReceiveConnectionOrg = pPinC->lpVtbl->ReceiveConnection;
}
pPinC->lpVtbl->ReceiveConnection = ReceiveConnectionMine;
+ FlushInstructionCache(GetCurrentProcess(), pPinC->lpVtbl, sizeof(IPinCVtbl));
VirtualProtect(pPinC->lpVtbl, sizeof(IPinCVtbl), flOldProtect, &flOldProtect);
- g_pPinCVtblVideoDriverWorkAround = pPinC->lpVtbl;
+ g_pPinCVtbl10BitWorkAround = pPinC->lpVtbl;
} else {
TRACE(_T("HookWorkAroundVideoDriversBug: Could not hook the VTable"));
ASSERT(FALSE);
@@ -211,18 +210,19 @@ void HookWorkAroundVideoDriversBug(IBaseFilter* pBF)
}
}
-void UnhookWorkAroundVideoDriversBug()
+void UnhookWorkAround10BitBug()
{
// Unhook previous VTable
- if (g_pPinCVtblVideoDriverWorkAround) {
+ if (g_pPinCVtbl10BitWorkAround) {
DWORD flOldProtect = 0;
- if (VirtualProtect(g_pPinCVtblVideoDriverWorkAround, sizeof(IPinCVtbl), PAGE_WRITECOPY, &flOldProtect)) {
- if (g_pPinCVtblVideoDriverWorkAround->ReceiveConnection == ReceiveConnectionMine) {
- g_pPinCVtblVideoDriverWorkAround->ReceiveConnection = ReceiveConnectionOrg;
+ if (VirtualProtect(g_pPinCVtbl10BitWorkAround, sizeof(IPinCVtbl), PAGE_EXECUTE_WRITECOPY, &flOldProtect)) {
+ if (g_pPinCVtbl10BitWorkAround->ReceiveConnection == ReceiveConnectionMine) {
+ g_pPinCVtbl10BitWorkAround->ReceiveConnection = ReceiveConnectionOrg;
}
ReceiveConnectionOrg = nullptr;
- VirtualProtect(g_pPinCVtblVideoDriverWorkAround, sizeof(IPinCVtbl), flOldProtect, &flOldProtect);
- g_pPinCVtblVideoDriverWorkAround = nullptr;
+ FlushInstructionCache(GetCurrentProcess(), g_pPinCVtbl10BitWorkAround, sizeof(IPinCVtbl));
+ VirtualProtect(g_pPinCVtbl10BitWorkAround, sizeof(IPinCVtbl), flOldProtect, &flOldProtect);
+ g_pPinCVtbl10BitWorkAround = nullptr;
} else {
TRACE(_T("UnhookWorkAroundVideoDriversBug: Could not unhook previous VTable"));
ASSERT(FALSE);
@@ -236,10 +236,11 @@ void UnhookNewSegmentAndReceive()
// Unhook previous VTables
if (g_pPinCVtbl) {
- if (VirtualProtect(g_pPinCVtbl, sizeof(IPinCVtbl), PAGE_WRITECOPY, &flOldProtect)) {
+ if (VirtualProtect(g_pPinCVtbl, sizeof(IPinCVtbl), PAGE_EXECUTE_WRITECOPY, &flOldProtect)) {
if (g_pPinCVtbl->NewSegment == NewSegmentMine) {
g_pPinCVtbl->NewSegment = NewSegmentOrg;
}
+ FlushInstructionCache(GetCurrentProcess(), g_pPinCVtbl, sizeof(IPinCVtbl));
VirtualProtect(g_pPinCVtbl, sizeof(IPinCVtbl), flOldProtect, &flOldProtect);
g_pPinCVtbl = nullptr;
NewSegmentOrg = nullptr;
@@ -250,10 +251,11 @@ void UnhookNewSegmentAndReceive()
}
if (g_pMemInputPinCVtbl) {
- if (VirtualProtect(g_pMemInputPinCVtbl, sizeof(IMemInputPinCVtbl), PAGE_WRITECOPY, &flOldProtect)) {
+ if (VirtualProtect(g_pMemInputPinCVtbl, sizeof(IMemInputPinCVtbl), PAGE_EXECUTE_WRITECOPY, &flOldProtect)) {
if (g_pMemInputPinCVtbl->Receive == ReceiveMine) {
g_pMemInputPinCVtbl->Receive = ReceiveOrg;
}
+ FlushInstructionCache(GetCurrentProcess(), g_pMemInputPinCVtbl, sizeof(IMemInputPinCVtbl));
VirtualProtect(g_pMemInputPinCVtbl, sizeof(IMemInputPinCVtbl), flOldProtect, &flOldProtect);
g_pMemInputPinCVtbl = nullptr;
ReceiveOrg = nullptr;
@@ -278,11 +280,12 @@ bool HookNewSegmentAndReceive(IPinC* pPinC, IMemInputPinC* pMemInputPinC)
DWORD flOldProtect = 0;
if (!g_pPinCVtbl) {
- if (VirtualProtect(pPinC->lpVtbl, sizeof(IPinCVtbl), PAGE_WRITECOPY, &flOldProtect)) {
+ if (VirtualProtect(pPinC->lpVtbl, sizeof(IPinCVtbl), PAGE_EXECUTE_WRITECOPY, &flOldProtect)) {
if (NewSegmentOrg == nullptr) {
NewSegmentOrg = pPinC->lpVtbl->NewSegment;
}
pPinC->lpVtbl->NewSegment = NewSegmentMine; // Function sets global variable(s)
+ FlushInstructionCache(GetCurrentProcess(), pPinC->lpVtbl, sizeof(IPinCVtbl));
VirtualProtect(pPinC->lpVtbl, sizeof(IPinCVtbl), flOldProtect, &flOldProtect);
g_pPinCVtbl = pPinC->lpVtbl;
} else {
@@ -292,11 +295,12 @@ bool HookNewSegmentAndReceive(IPinC* pPinC, IMemInputPinC* pMemInputPinC)
}
if (!g_pMemInputPinCVtbl) {
- if (VirtualProtect(pMemInputPinC->lpVtbl, sizeof(IMemInputPinCVtbl), PAGE_WRITECOPY, &flOldProtect)) {
+ if (VirtualProtect(pMemInputPinC->lpVtbl, sizeof(IMemInputPinCVtbl), PAGE_EXECUTE_WRITECOPY, &flOldProtect)) {
if (ReceiveOrg == nullptr) {
ReceiveOrg = pMemInputPinC->lpVtbl->Receive;
}
pMemInputPinC->lpVtbl->Receive = ReceiveMine; // Function sets global variable(s)
+ FlushInstructionCache(GetCurrentProcess(), pMemInputPinC->lpVtbl, sizeof(IMemInputPinCVtbl));
VirtualProtect(pMemInputPinC->lpVtbl, sizeof(IMemInputPinCVtbl), flOldProtect, &flOldProtect);
g_pMemInputPinCVtbl = pMemInputPinC->lpVtbl;
} else {
@@ -1052,7 +1056,7 @@ void HookAMVideoAccelerator(IAMVideoAcceleratorC* pAMVideoAcceleratorC)
g_nDXVAVersion = 0;
DWORD flOldProtect = 0;
- if (VirtualProtect(pAMVideoAcceleratorC->lpVtbl, sizeof(IAMVideoAcceleratorC), PAGE_WRITECOPY, &flOldProtect)) {
+ if (VirtualProtect(pAMVideoAcceleratorC->lpVtbl, sizeof(IAMVideoAcceleratorCVtbl), PAGE_EXECUTE_WRITECOPY, &flOldProtect)) {
#ifdef _DEBUG
if (GetVideoAcceleratorGUIDsOrg == nullptr) {
@@ -1110,7 +1114,8 @@ void HookAMVideoAccelerator(IAMVideoAcceleratorC* pAMVideoAcceleratorC)
pAMVideoAcceleratorC->lpVtbl->DisplayFrame = DisplayFrameMine;
#endif
- VirtualProtect(pAMVideoAcceleratorC->lpVtbl, sizeof(IAMVideoAcceleratorC), PAGE_EXECUTE, &flOldProtect);
+ FlushInstructionCache(GetCurrentProcess(), pAMVideoAcceleratorC->lpVtbl, sizeof(IAMVideoAcceleratorCVtbl));
+ VirtualProtect(pAMVideoAcceleratorC->lpVtbl, sizeof(IAMVideoAcceleratorCVtbl), flOldProtect, &flOldProtect);
} else {
TRACE(_T("HookAMVideoAccelerator: Could not hook the VTable"));
ASSERT(FALSE);
@@ -1559,7 +1564,7 @@ void HookDirectXVideoDecoderService(void* pIDirectXVideoDecoderService)
// Unhook previous VTable
if (g_pIDirectXVideoDecoderServiceCVtbl) {
- if (VirtualProtect(g_pIDirectXVideoDecoderServiceCVtbl, sizeof(IDirectXVideoDecoderServiceCVtbl), PAGE_WRITECOPY, &flOldProtect)) {
+ if (VirtualProtect(g_pIDirectXVideoDecoderServiceCVtbl, sizeof(IDirectXVideoDecoderServiceCVtbl), PAGE_EXECUTE_WRITECOPY, &flOldProtect)) {
if (g_pIDirectXVideoDecoderServiceCVtbl->CreateVideoDecoder == CreateVideoDecoderMine) {
g_pIDirectXVideoDecoderServiceCVtbl->CreateVideoDecoder = CreateVideoDecoderOrg;
}
@@ -1574,6 +1579,7 @@ void HookDirectXVideoDecoderService(void* pIDirectXVideoDecoderService)
//}
#endif
+ FlushInstructionCache(GetCurrentProcess(), g_pIDirectXVideoDecoderServiceCVtbl, sizeof(IDirectXVideoDecoderServiceCVtbl));
VirtualProtect(g_pIDirectXVideoDecoderServiceCVtbl, sizeof(IDirectXVideoDecoderServiceCVtbl), flOldProtect, &flOldProtect);
g_pIDirectXVideoDecoderServiceCVtbl = nullptr;
@@ -1597,7 +1603,7 @@ void HookDirectXVideoDecoderService(void* pIDirectXVideoDecoderService)
#endif
if (!g_pIDirectXVideoDecoderServiceCVtbl && pIDirectXVideoDecoderService) {
- if (VirtualProtect(pIDirectXVideoDecoderServiceC->lpVtbl, sizeof(IDirectXVideoDecoderServiceCVtbl), PAGE_WRITECOPY, &flOldProtect)) {
+ if (VirtualProtect(pIDirectXVideoDecoderServiceC->lpVtbl, sizeof(IDirectXVideoDecoderServiceCVtbl), PAGE_EXECUTE_WRITECOPY, &flOldProtect)) {
CreateVideoDecoderOrg = pIDirectXVideoDecoderServiceC->lpVtbl->CreateVideoDecoder;
pIDirectXVideoDecoderServiceC->lpVtbl->CreateVideoDecoder = CreateVideoDecoderMine;
@@ -1610,6 +1616,7 @@ void HookDirectXVideoDecoderService(void* pIDirectXVideoDecoderService)
//pIDirectXVideoDecoderServiceC->lpVtbl->GetDecoderDeviceGuids = GetDecoderDeviceGuidsMine;
#endif
+ FlushInstructionCache(GetCurrentProcess(), pIDirectXVideoDecoderServiceC->lpVtbl, sizeof(IDirectXVideoDecoderServiceCVtbl));
VirtualProtect(pIDirectXVideoDecoderServiceC->lpVtbl, sizeof(IDirectXVideoDecoderServiceCVtbl), flOldProtect, &flOldProtect);
g_pIDirectXVideoDecoderServiceCVtbl = pIDirectXVideoDecoderServiceC->lpVtbl;
diff --git a/src/filters/renderer/VideoRenderers/IPinHook.h b/src/filters/renderer/VideoRenderers/IPinHook.h
index adb5f8d83..7425224a9 100644
--- a/src/filters/renderer/VideoRenderers/IPinHook.h
+++ b/src/filters/renderer/VideoRenderers/IPinHook.h
@@ -76,8 +76,8 @@ extern bool HookNewSegmentAndReceive(IPinC* pPinC, IMemInputPinC* pMemInputPin);
extern void UnhookNewSegmentAndReceive();
extern REFERENCE_TIME g_tSegmentStart, g_tSampleStart, g_rtTimePerFrame;
-extern void HookWorkAroundVideoDriversBug(IBaseFilter* pBF);
-extern void UnhookWorkAroundVideoDriversBug();
+extern void HookWorkAround10BitBug(IBaseFilter* pBF);
+extern void UnhookWorkAround10BitBug();
//
diff --git a/src/filters/renderer/VideoRenderers/RenderersSettings.cpp b/src/filters/renderer/VideoRenderers/RenderersSettings.cpp
index 3f04ec596..461eb5175 100644
--- a/src/filters/renderer/VideoRenderers/RenderersSettings.cpp
+++ b/src/filters/renderer/VideoRenderers/RenderersSettings.cpp
@@ -98,16 +98,16 @@ void CRenderersSettings::CAdvRendererSettings::SetOptimal()
// CRenderersData construction
CRenderersData::CRenderersData()
+ : m_hD3DX9Dll(nullptr)
+ , m_nDXSdkRelease(0)
+ , m_bTearingTest(false)
+ , m_iDisplayStats(0)
+ , m_bResetStats(false)
+ // Don't disable hardware features before initializing a renderer
+ , m_bFP16Support(true)
+ , m_bFP32Support(true)
+ , m_b10bitSupport(true)
{
- m_bTearingTest = false;
- m_iDisplayStats = 0;
- m_bResetStats = false;
- m_hD3DX9Dll = nullptr;
- m_nDXSdkRelease = 0;
-
- // Don't disable hardware features before initializing a renderer
- m_bFP16Support = true;
- m_b10bitSupport = true;
QueryPerformanceFrequency(&llPerfFrequency);
}
diff --git a/src/filters/renderer/VideoRenderers/RenderersSettings.h b/src/filters/renderer/VideoRenderers/RenderersSettings.h
index 2e57c929a..9f658cba4 100644
--- a/src/filters/renderer/VideoRenderers/RenderersSettings.h
+++ b/src/filters/renderer/VideoRenderers/RenderersSettings.h
@@ -145,6 +145,7 @@ public:
// Hardware feature support
bool m_bFP16Support;
+ bool m_bFP32Support;
bool m_b10bitSupport;
CString m_strDXVAInfo;
diff --git a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
index e4c13b406..ecb328db6 100644
--- a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
+++ b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
@@ -56,84 +56,85 @@ extern bool LoadResource(UINT resid, CStringA& str, LPCTSTR restype);
CBaseAP::CBaseAP(HWND hWnd, bool bFullscreen, HRESULT& hr, CString& _Error)
: CSubPicAllocatorPresenterImpl(hWnd, hr, &_Error)
- , m_ScreenSize(0, 0)
+ , m_hDWMAPI(nullptr)
+ , m_pDwmIsCompositionEnabled(nullptr)
+ , m_pDwmEnableComposition(nullptr)
+ , m_hD3D9(nullptr)
+ , m_pDirect3DCreate9Ex(nullptr)
+ , m_pOuterEVR(nullptr)
+ , m_SurfaceType(D3DFMT_UNKNOWN)
+ , m_BackbufferType(D3DFMT_UNKNOWN)
+ , m_DisplayType(D3DFMT_UNKNOWN)
+ , m_filter(D3DTEXF_NONE)
+ , m_LastAdapterCheck(0)
+ , m_CurrentAdapter(UINT_ERROR)
, m_bicubicA(0)
, m_nTearingPos(0)
, m_VMR9AlphaBitmapWidthBytes()
+ , m_pD3DXLoadSurfaceFromMemory(nullptr)
+ , m_pD3DXCreateLine(nullptr)
+ , m_pD3DXCreateFont(nullptr)
+ , m_pD3DXCreateSprite(nullptr)
, m_nDXSurface(1)
, m_nVMR9Surfaces(0)
, m_iVMR9Surface(0)
, m_nCurSurface(0)
- , m_bSnapToVSync(false)
- , m_rtTimePerFrame(0)
- , m_bInterlaced(false)
, m_nUsedBuffer(0)
- , m_TextScale(1.0)
- , m_dMainThreadId(0)
- , m_bNeedCheckSample(true)
- , m_bIsFullscreen(bFullscreen)
- , m_uSyncGlitches(0)
- , m_pGenlock(nullptr)
- , m_lAudioLag(0)
- , m_lAudioLagMin(10000)
- , m_lAudioLagMax(-10000)
- , m_pAudioStats(nullptr)
- , m_nNextJitter(0)
- , m_nNextSyncOffset(0)
- , m_llLastSyncTime(LONGLONG_ERROR)
+ , m_lNextSampleWait(1)
+ , m_bSnapToVSync(false)
+ , m_uScanLineEnteringPaint(0)
+ , m_llEstVBlankTime(0)
, m_fAvrFps(0.0)
, m_fJitterStdDev(0.0)
- , m_fSyncOffsetStdDev(0.0)
+ , m_fJitterMean(0)
, m_fSyncOffsetAvr(0.0)
- , m_llHysteresis(0)
- , m_dD3DRefreshCycle(0)
+ , m_fSyncOffsetStdDev(0.0)
+ , m_bHighColorResolution(false)
+ , m_bCompositionEnabled(false)
+ , m_bDesktopCompositionDisabled(false)
+ , m_bIsFullscreen(bFullscreen)
+ , m_bNeedCheckSample(true)
+ , m_dMainThreadId(0)
+ , m_ScreenSize(0, 0)
, m_dDetectedScanlineTime(0.0)
+ , m_dD3DRefreshCycle(0)
, m_dEstRefreshCycle(0.0)
, m_dFrameCycle(0.0)
, m_dOptimumDisplayCycle(0.0)
, m_dCycleDifference(1.0)
- , m_llEstVBlankTime(0)
- , m_LastAdapterCheck(0)
- , m_CurrentAdapter(UINT_ERROR)
- , m_FocusThread(nullptr)
- , m_lNextSampleWait(1)
- , m_MinJitter(MAXLONG64)
- , m_MaxJitter(MINLONG64)
- , m_MinSyncOffset(MAXLONG64)
- , m_MaxSyncOffset(MINLONG64)
, m_pcFramesDropped(0)
, m_pcFramesDuplicated(0)
, m_pcFramesDrawn(0)
- , m_uScanLineEnteringPaint(0)
+ , m_nNextJitter(0)
+ , m_nNextSyncOffset(0)
, m_JitterStdDev(0)
- , m_fJitterMean(0)
- , m_bHighColorResolution(false)
- , m_bCompositionEnabled(false)
- , m_bDesktopCompositionDisabled(false)
+ , m_llLastSyncTime(LONGLONG_ERROR)
+ , m_MaxJitter(MINLONG64)
+ , m_MinJitter(MAXLONG64)
+ , m_MaxSyncOffset(MINLONG64)
+ , m_MinSyncOffset(MAXLONG64)
+ , m_uSyncGlitches(0)
, m_llSampleTime(0)
, m_llLastSampleTime(0)
+ , m_llHysteresis(0)
, m_lShiftToNearest(0)
, m_lShiftToNearestPrev(0)
, m_bVideoSlowerThanDisplay(0)
+ , m_rtTimePerFrame(0)
+ , m_bInterlaced(false)
+ , m_TextScale(1.0)
+ , m_pGenlock(nullptr)
+ , m_pAudioStats(nullptr)
+ , m_lAudioLag(0)
+ , m_lAudioLagMin(10000)
+ , m_lAudioLagMax(-10000)
, m_lAudioSlaveMode(0)
- , m_pD3DXLoadSurfaceFromMemory(nullptr)
- , m_pD3DXCreateLine(nullptr)
- , m_pD3DXCreateFont(nullptr)
- , m_pD3DXCreateSprite(nullptr)
- , m_pDwmIsCompositionEnabled(nullptr)
- , m_pDwmEnableComposition(nullptr)
- , m_pDirect3DCreate9Ex(nullptr)
- , m_hDWMAPI(nullptr)
- , m_hD3D9(nullptr)
- , m_pOuterEVR(nullptr)
- , m_SurfaceType(D3DFMT_UNKNOWN)
- , m_BackbufferType(D3DFMT_UNKNOWN)
- , m_DisplayType(D3DFMT_UNKNOWN)
- , m_filter(D3DTEXF_NONE)
+ , m_FocusThread(nullptr)
+ , m_hFocusWindow(nullptr)
{
ZeroMemory(&m_VMR9AlphaBitmap, sizeof(m_VMR9AlphaBitmap));
ZeroMemory(&m_caps, sizeof(m_caps));
- ZeroMemory(&pp, sizeof(pp));
+ ZeroMemory(&m_pp, sizeof(m_pp));
if (FAILED(hr)) {
_Error += _T("ISubPicAllocatorPresenterImpl failed\n");
@@ -485,17 +486,17 @@ HRESULT CBaseAP::CreateDXDevice(CString& _Error)
}
m_bCompositionEnabled = bCompositionEnabled != 0;
- ZeroMemory(&pp, sizeof(pp));
+ ZeroMemory(&m_pp, sizeof(m_pp));
if (m_bIsFullscreen) { // Exclusive mode fullscreen
- pp.Windowed = FALSE;
- pp.BackBufferWidth = d3ddm.Width;
- pp.BackBufferHeight = d3ddm.Height;
- pp.hDeviceWindow = m_hWnd;
+ m_pp.Windowed = FALSE;
+ m_pp.BackBufferWidth = d3ddm.Width;
+ m_pp.BackBufferHeight = d3ddm.Height;
+ m_pp.hDeviceWindow = m_hWnd;
TRACE(_T("Wnd in CreateDXDevice: %p\n"), m_hWnd);
- pp.BackBufferCount = 3;
- pp.SwapEffect = D3DSWAPEFFECT_DISCARD;
- pp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
- pp.Flags = D3DPRESENTFLAG_VIDEO;
+ m_pp.BackBufferCount = 3;
+ m_pp.SwapEffect = D3DSWAPEFFECT_DISCARD;
+ m_pp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
+ m_pp.Flags = D3DPRESENTFLAG_VIDEO;
m_bHighColorResolution = r.m_AdvRendSets.bEVRHighColorResolution;
if (m_bHighColorResolution) {
if (FAILED(m_pD3D->CheckDeviceType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, d3ddm.Format, D3DFMT_A2R10G10B10, false))) {
@@ -505,67 +506,67 @@ HRESULT CBaseAP::CreateDXDevice(CString& _Error)
}
if (m_bHighColorResolution) {
- pp.BackBufferFormat = D3DFMT_A2R10G10B10;
+ m_pp.BackBufferFormat = D3DFMT_A2R10G10B10;
} else {
- pp.BackBufferFormat = d3ddm.Format;
+ m_pp.BackBufferFormat = d3ddm.Format;
}
if (!m_FocusThread) {
m_FocusThread = (CFocusThread*)AfxBeginThread(RUNTIME_CLASS(CFocusThread), 0, 0, 0);
}
+ HWND hFocusWindow = m_FocusThread->GetFocusWindow();
+ bTryToReset &= m_hFocusWindow == hFocusWindow;
+ m_hFocusWindow = hFocusWindow;
+
if (m_pD3DEx) {
D3DDISPLAYMODEEX DisplayMode;
ZeroMemory(&DisplayMode, sizeof(DisplayMode));
DisplayMode.Size = sizeof(DisplayMode);
m_pD3DEx->GetAdapterDisplayModeEx(m_CurrentAdapter, &DisplayMode, nullptr);
- DisplayMode.Format = pp.BackBufferFormat;
- pp.FullScreen_RefreshRateInHz = DisplayMode.RefreshRate;
+ DisplayMode.Format = m_pp.BackBufferFormat;
+ m_pp.FullScreen_RefreshRateInHz = DisplayMode.RefreshRate;
+
+ bTryToReset = bTryToReset && m_pD3DDevEx && SUCCEEDED(hr = m_pD3DDevEx->ResetEx(&m_pp, &DisplayMode));
- if (bTryToReset) {
- if (!m_pD3DDevEx || FAILED(hr = m_pD3DDevEx->ResetEx(&pp, &DisplayMode))) {
- bTryToReset = false;
- m_pD3DDev = nullptr;
- m_pD3DDevEx = nullptr;
- }
- }
if (!bTryToReset) {
+ m_pD3DDev = nullptr;
+ m_pD3DDevEx = nullptr;
hr = m_pD3DEx->CreateDeviceEx(m_CurrentAdapter, D3DDEVTYPE_HAL, m_FocusThread->GetFocusWindow(),
D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED | D3DCREATE_ENABLE_PRESENTSTATS | D3DCREATE_NOWINDOWCHANGES,
- &pp, &DisplayMode, &m_pD3DDevEx);
+ &m_pp, &DisplayMode, &m_pD3DDevEx);
}
if (m_pD3DDevEx) {
m_pD3DDev = m_pD3DDevEx;
- m_BackbufferType = pp.BackBufferFormat;
+ m_BackbufferType = m_pp.BackBufferFormat;
m_DisplayType = DisplayMode.Format;
}
} else {
- if (bTryToReset) {
- if (!m_pD3DDev || FAILED(hr = m_pD3DDev->Reset(&pp))) {
- bTryToReset = false;
- }
- }
+ bTryToReset = bTryToReset && m_pD3DDev && SUCCEEDED(hr = m_pD3DDev->Reset(&m_pp));
+
if (!bTryToReset) {
+ m_pD3DDev = nullptr;
+ m_pD3DDevEx = nullptr;
hr = m_pD3D->CreateDevice(m_CurrentAdapter, D3DDEVTYPE_HAL, m_FocusThread->GetFocusWindow(),
D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED | D3DCREATE_NOWINDOWCHANGES,
- &pp, &m_pD3DDev);
+ &m_pp, &m_pD3DDev);
}
TRACE(_T("Created full-screen device\n"));
if (m_pD3DDev) {
- m_BackbufferType = pp.BackBufferFormat;
+ m_BackbufferType = m_pp.BackBufferFormat;
m_DisplayType = d3ddm.Format;
}
}
} else { // Windowed
- pp.Windowed = TRUE;
- pp.hDeviceWindow = m_hWnd;
- pp.SwapEffect = D3DSWAPEFFECT_COPY;
- pp.Flags = D3DPRESENTFLAG_VIDEO;
- pp.BackBufferCount = 1;
- pp.BackBufferWidth = szDesktopSize.cx;
- pp.BackBufferHeight = szDesktopSize.cy;
+ m_pp.Windowed = TRUE;
+ m_pp.hDeviceWindow = m_hWnd;
+ m_pp.SwapEffect = D3DSWAPEFFECT_COPY;
+ m_pp.Flags = D3DPRESENTFLAG_VIDEO;
+ m_pp.BackBufferCount = 1;
+ m_pp.BackBufferWidth = szDesktopSize.cx;
+ m_pp.BackBufferHeight = szDesktopSize.cy;
m_BackbufferType = d3ddm.Format;
m_DisplayType = d3ddm.Format;
m_bHighColorResolution = r.m_AdvRendSets.bEVRHighColorResolution;
@@ -578,26 +579,27 @@ HRESULT CBaseAP::CreateDXDevice(CString& _Error)
if (m_bHighColorResolution) {
m_BackbufferType = D3DFMT_A2R10G10B10;
- pp.BackBufferFormat = D3DFMT_A2R10G10B10;
+ m_pp.BackBufferFormat = D3DFMT_A2R10G10B10;
}
if (bCompositionEnabled) {
// Desktop composition presents the whole desktop
- pp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
+ m_pp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
} else {
- pp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
+ m_pp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
}
+
+ bTryToReset &= m_hFocusWindow == m_hWnd;
+ m_hFocusWindow = m_hWnd;
+
if (m_pD3DEx) {
- if (bTryToReset) {
- if (!m_pD3DDevEx || FAILED(hr = m_pD3DDevEx->ResetEx(&pp, nullptr))) {
- bTryToReset = false;
- m_pD3DDev = nullptr;
- m_pD3DDevEx = nullptr;
- }
- }
+ bTryToReset = bTryToReset && m_pD3DDevEx && SUCCEEDED(hr = m_pD3DDevEx->ResetEx(&m_pp, nullptr));
+
if (!bTryToReset) {
- hr = m_pD3DEx->CreateDeviceEx(m_CurrentAdapter, D3DDEVTYPE_HAL, m_hWnd,
+ m_pD3DDev = nullptr;
+ m_pD3DDevEx = nullptr;
+ hr = m_pD3DEx->CreateDeviceEx(m_CurrentAdapter, D3DDEVTYPE_HAL, m_hFocusWindow,
D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED | D3DCREATE_ENABLE_PRESENTSTATS,
- &pp, nullptr, &m_pD3DDevEx);
+ &m_pp, nullptr, &m_pD3DDevEx);
}
if (m_pD3DDevEx) {
@@ -605,14 +607,14 @@ HRESULT CBaseAP::CreateDXDevice(CString& _Error)
}
} else {
if (bTryToReset) {
- if (!m_pD3DDev || FAILED(hr = m_pD3DDev->Reset(&pp))) {
+ if (!m_pD3DDev || FAILED(hr = m_pD3DDev->Reset(&m_pp))) {
bTryToReset = false;
}
}
if (!bTryToReset) {
- hr = m_pD3D->CreateDevice(m_CurrentAdapter, D3DDEVTYPE_HAL, m_hWnd,
+ hr = m_pD3D->CreateDevice(m_CurrentAdapter, D3DDEVTYPE_HAL, m_hFocusWindow,
D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED,
- &pp, &m_pD3DDev);
+ &m_pp, &m_pD3DDev);
}
TRACE(_T("Created windowed device\n"));
}
@@ -625,7 +627,7 @@ HRESULT CBaseAP::CreateDXDevice(CString& _Error)
}
if (hr == D3DERR_DEVICENOTRESET) {
TRACE(_T("D3DERR_DEVICENOTRESET\n"));
- hr = m_pD3DDev->Reset(&pp);
+ hr = m_pD3DDev->Reset(&m_pp);
}
if (m_pD3DDevEx) {
@@ -783,8 +785,7 @@ HRESULT CBaseAP::ResetDXDevice(CString& _Error)
m_pGenlock->SetDisplayResolution(d3ddm.Width, d3ddm.Height);
CSize szDesktopSize(GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN));
- D3DPRESENT_PARAMETERS pp;
- ZeroMemory(&pp, sizeof(pp));
+ ZeroMemory(&m_pp, sizeof(m_pp));
BOOL bCompositionEnabled = false;
if (m_pDwmIsCompositionEnabled) {
@@ -794,14 +795,14 @@ HRESULT CBaseAP::ResetDXDevice(CString& _Error)
m_bHighColorResolution = r.m_AdvRendSets.bEVRHighColorResolution;
if (m_bIsFullscreen) { // Exclusive mode fullscreen
- pp.BackBufferWidth = d3ddm.Width;
- pp.BackBufferHeight = d3ddm.Height;
+ m_pp.BackBufferWidth = d3ddm.Width;
+ m_pp.BackBufferHeight = d3ddm.Height;
if (m_bHighColorResolution) {
- pp.BackBufferFormat = D3DFMT_A2R10G10B10;
+ m_pp.BackBufferFormat = D3DFMT_A2R10G10B10;
} else {
- pp.BackBufferFormat = d3ddm.Format;
+ m_pp.BackBufferFormat = d3ddm.Format;
}
- if (FAILED(m_pD3DEx->CheckDeviceType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, pp.BackBufferFormat, pp.BackBufferFormat, false))) {
+ if (FAILED(m_pD3DEx->CheckDeviceType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, m_pp.BackBufferFormat, m_pp.BackBufferFormat, false))) {
_Error += L"10 bit RGB is not supported by this graphics device in exclusive mode fullscreen.\n";
return hr;
}
@@ -811,14 +812,14 @@ HRESULT CBaseAP::ResetDXDevice(CString& _Error)
DisplayMode.Size = sizeof(DisplayMode);
if (m_pD3DDevEx) {
m_pD3DEx->GetAdapterDisplayModeEx(GetAdapter(m_pD3DEx, m_hWnd), &DisplayMode, nullptr);
- DisplayMode.Format = pp.BackBufferFormat;
- pp.FullScreen_RefreshRateInHz = DisplayMode.RefreshRate;
- if (FAILED(m_pD3DDevEx->Reset(&pp))) {
+ DisplayMode.Format = m_pp.BackBufferFormat;
+ m_pp.FullScreen_RefreshRateInHz = DisplayMode.RefreshRate;
+ if (FAILED(m_pD3DDevEx->Reset(&m_pp))) {
_Error += GetWindowsErrorMessage(hr, m_hD3D9);
return hr;
}
} else if (m_pD3DDev) {
- if (FAILED(m_pD3DDev->Reset(&pp))) {
+ if (FAILED(m_pD3DDev->Reset(&m_pp))) {
_Error += GetWindowsErrorMessage(hr, m_hD3D9);
return hr;
}
@@ -826,33 +827,33 @@ HRESULT CBaseAP::ResetDXDevice(CString& _Error)
_Error += L"No device.\n";
return hr;
}
- m_BackbufferType = pp.BackBufferFormat;
+ m_BackbufferType = m_pp.BackBufferFormat;
m_DisplayType = d3ddm.Format;
} else { // Windowed
- pp.BackBufferWidth = szDesktopSize.cx;
- pp.BackBufferHeight = szDesktopSize.cy;
+ m_pp.BackBufferWidth = szDesktopSize.cx;
+ m_pp.BackBufferHeight = szDesktopSize.cy;
m_BackbufferType = d3ddm.Format;
m_DisplayType = d3ddm.Format;
if (m_bHighColorResolution) {
m_BackbufferType = D3DFMT_A2R10G10B10;
- pp.BackBufferFormat = D3DFMT_A2R10G10B10;
+ m_pp.BackBufferFormat = D3DFMT_A2R10G10B10;
}
- if (FAILED(m_pD3DEx->CheckDeviceType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, pp.BackBufferFormat, pp.BackBufferFormat, false))) {
+ if (FAILED(m_pD3DEx->CheckDeviceType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, m_pp.BackBufferFormat, m_pp.BackBufferFormat, false))) {
_Error += L"10 bit RGB is not supported by this graphics device in windowed mode.\n";
return hr;
}
if (bCompositionEnabled) {
// Desktop composition presents the whole desktop
- pp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
+ m_pp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
} else {
- pp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
+ m_pp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
}
if (m_pD3DDevEx)
- if (FAILED(m_pD3DDevEx->Reset(&pp))) {
+ if (FAILED(m_pD3DDevEx->Reset(&m_pp))) {
_Error += GetWindowsErrorMessage(hr, m_hD3D9);
return hr;
} else if (m_pD3DDev)
- if (FAILED(m_pD3DDevEx->Reset(&pp))) {
+ if (FAILED(m_pD3DDevEx->Reset(&m_pp))) {
_Error += GetWindowsErrorMessage(hr, m_hD3D9);
return hr;
} else {
@@ -1719,7 +1720,7 @@ STDMETHODIMP_(bool) CBaseAP::Paint(bool bAll)
hr = m_pD3DDev->SetPixelShaderConstantF(0, (float*)fConstData, _countof(fConstData));
- int src = 1, dst = 0;
+ int srcTexture = 1, dstTexture = 0;
POSITION pos = m_pPixelShadersScreenSpace.GetHeadPosition();
while (pos) {
@@ -1727,7 +1728,7 @@ STDMETHODIMP_(bool) CBaseAP::Paint(bool bAll)
m_pD3DDev->SetRenderTarget(0, pBackBuffer);
} else {
CComPtr<IDirect3DSurface9> pRT;
- hr = m_pScreenSizeTemporaryTexture[dst]->GetSurfaceLevel(0, &pRT);
+ hr = m_pScreenSizeTemporaryTexture[dstTexture]->GetSurfaceLevel(0, &pRT);
m_pD3DDev->SetRenderTarget(0, pRT);
}
@@ -1736,9 +1737,9 @@ STDMETHODIMP_(bool) CBaseAP::Paint(bool bAll)
Shader.Compile(m_pPSC);
}
hr = m_pD3DDev->SetPixelShader(Shader.m_pPixelShader);
- TextureCopy(m_pScreenSizeTemporaryTexture[src]);
+ TextureCopy(m_pScreenSizeTemporaryTexture[srcTexture]);
- std::swap(src, dst);
+ std::swap(srcTexture, dstTexture);
}
hr = m_pD3DDev->SetPixelShader(nullptr);
@@ -2404,28 +2405,29 @@ STDMETHODIMP CBaseAP::SetPixelShader2(LPCSTR pSrcData, LPCSTR pTarget, bool bScr
CSyncAP::CSyncAP(HWND hWnd, bool bFullscreen, HRESULT& hr, CString& _Error)
: CBaseAP(hWnd, bFullscreen, hr, _Error)
- , m_nResetToken(0)
- , m_hRenderThread(nullptr)
- , m_hMixerThread(nullptr)
- , m_hEvtFlush(nullptr)
+ , m_LastClockState(MFCLOCK_STATE_INVALID)
+ , m_dwVideoAspectRatioMode(MFVideoARMode_PreservePicture)
+ , m_dwVideoRenderPrefs((MFVideoRenderPrefs)0)
+ , m_BorderColor(RGB(0, 0, 0))
, m_hEvtQuit(nullptr)
- , m_hEvtSkip(nullptr)
, m_bEvtQuit(0)
+ , m_hEvtFlush(nullptr)
, m_bEvtFlush(0)
- , m_nRenderState(Shutdown)
- , m_bStepping(false)
+ , m_hEvtSkip(nullptr)
+ , m_bEvtSkip(false)
, m_bUseInternalTimer(false)
, m_LastSetOutputRange(-1)
, m_bPendingRenegotiate(false)
, m_bPendingMediaFinished(false)
- , m_pCurrentDisplaydSample(nullptr)
- , m_nStepCount(0)
- , m_dwVideoAspectRatioMode(MFVideoARMode_PreservePicture)
- , m_dwVideoRenderPrefs((MFVideoRenderPrefs)0)
- , m_BorderColor(RGB(0, 0, 0))
, m_bPrerolled(false)
- , m_LastClockState(MFCLOCK_STATE_INVALID)
- , m_bEvtSkip(false)
+ , m_hRenderThread(nullptr)
+ , m_hMixerThread(nullptr)
+ , m_nRenderState(Shutdown)
+ , m_bStepping(false)
+ , m_nCurrentGroupId(0)
+ , m_nResetToken(0)
+ , m_nStepCount(0)
+ , m_SampleFreeCallback(this, &CSyncAP::OnSampleFree)
, fnDXVA2CreateDirect3DDeviceManager9("dxva2.dll", "DXVA2CreateDirect3DDeviceManager9")
, fnMFCreateDXSurfaceBuffer("evr.dll", "MFCreateDXSurfaceBuffer")
, fnMFCreateVideoSampleFromSurface("evr.dll", "MFCreateVideoSampleFromSurface")
@@ -2612,6 +2614,20 @@ STDMETHODIMP_(bool) CSyncAP::Paint(bool bAll)
return __super::Paint(bAll);
}
+STDMETHODIMP_(bool) CSyncAP::Paint(IMFSample* pMFSample)
+{
+ m_pCurrentlyDisplayedSample = pMFSample;
+ pMFSample->GetUINT32(GUID_SURFACE_INDEX, (UINT32*)&m_nCurSurface);
+
+ auto sampleHasCurrentGroupId = [this](IMFSample * pSample) {
+ UINT32 nGroupId;
+ return (SUCCEEDED(pSample->GetUINT32(GUID_GROUP_ID, &nGroupId)) && nGroupId == m_nCurrentGroupId);
+ };
+ ASSERT(sampleHasCurrentGroupId(pMFSample));
+
+ return Paint(true);
+}
+
STDMETHODIMP CSyncAP::NonDelegatingQueryInterface(REFIID riid, void** ppv)
{
HRESULT hr;
@@ -2651,24 +2667,32 @@ STDMETHODIMP CSyncAP::NonDelegatingQueryInterface(REFIID riid, void** ppv)
// IMFClockStateSink
STDMETHODIMP CSyncAP::OnClockStart(MFTIME hnsSystemTime, LONGLONG llClockStartOffset)
{
+ HRESULT hr;
+ CHECK_HR(CheckShutdown());
m_nRenderState = Started;
return S_OK;
}
STDMETHODIMP CSyncAP::OnClockStop(MFTIME hnsSystemTime)
{
+ HRESULT hr;
+ CHECK_HR(CheckShutdown());
m_nRenderState = Stopped;
return S_OK;
}
STDMETHODIMP CSyncAP::OnClockPause(MFTIME hnsSystemTime)
{
+ HRESULT hr;
+ CHECK_HR(CheckShutdown());
m_nRenderState = Paused;
return S_OK;
}
STDMETHODIMP CSyncAP::OnClockRestart(MFTIME hnsSystemTime)
{
+ HRESULT hr;
+ CHECK_HR(CheckShutdown());
m_nRenderState = Started;
return S_OK;
}
@@ -2838,6 +2862,7 @@ void CSyncAP::CompleteFrameStep(bool bCancel)
STDMETHODIMP CSyncAP::ProcessMessage(MFVP_MESSAGE_TYPE eMessage, ULONG_PTR ulParam)
{
HRESULT hr = S_OK;
+ CHECK_HR(CheckShutdown());
switch (eMessage) {
case MFVP_MESSAGE_BEGINSTREAMING:
@@ -2998,11 +3023,27 @@ HRESULT CSyncAP::CreateOptimalOutputType(IMFMediaType* pMixerProposedType, IMFMe
HRESULT CSyncAP::SetMediaType(IMFMediaType* pType)
{
- HRESULT hr;
+ HRESULT hr = S_OK;
AM_MEDIA_TYPE* pAMMedia = nullptr;
CString strTemp;
- CheckPointer(pType, E_POINTER);
+ CHECK_HR(CheckShutdown());
+
+ if (pType == nullptr) {
+ // Release
+ RemoveAllSamples();
+ DeleteSurfaces();
+ CAutoLock lock(this);
+ m_pMediaType = nullptr;
+ return hr;
+ }
+
+ DWORD dwFlags = 0;
+ if (m_pMediaType && m_pMediaType->IsEqual(pType, &dwFlags) == S_OK) {
+ // Nothing to do
+ return hr;
+ }
+
CHECK_HR(pType->GetRepresentation(FORMAT_VideoInfo2, (void**)&pAMMedia));
hr = InitializeDevice(pAMMedia);
@@ -3158,9 +3199,13 @@ bool CSyncAP::GetSampleFromMixer()
UINT dwSurface;
bool newSample = false;
+ auto sampleHasCurrentGroupId = [this](IMFSample * pSample) {
+ UINT32 nGroupId;
+ return (SUCCEEDED(pSample->GetUINT32(GUID_GROUP_ID, &nGroupId)) && nGroupId == m_nCurrentGroupId);
+ };
+
while (SUCCEEDED(hr)) { // Get as many frames as there are and that we have samples for
CComPtr<IMFSample> pSample;
- CComPtr<IMFSample> pNewSample;
if (FAILED(GetFreeSample(&pSample))) { // All samples are taken for the moment. Better luck next time
break;
}
@@ -3168,6 +3213,8 @@ bool CSyncAP::GetSampleFromMixer()
ZeroMemory(&dataBuffer, sizeof(dataBuffer));
dataBuffer.pSample = pSample;
pSample->GetUINT32(GUID_SURFACE_INDEX, &dwSurface);
+ ASSERT(sampleHasCurrentGroupId(pSample));
+
{
llClockBefore = GetRenderersData()->GetPerfCounter();
hr = m_pMixer->ProcessOutput(0 , 1, &dataBuffer, &dwStatus);
@@ -3175,11 +3222,13 @@ bool CSyncAP::GetSampleFromMixer()
}
if (hr == MF_E_TRANSFORM_NEED_MORE_INPUT) { // There are no samples left in the mixer
- MoveToFreeList(pSample, false);
+ AddToFreeList(pSample, false);
+ pSample = nullptr; // The sample should not be used after being queued
// Important: Release any events returned from the ProcessOutput method.
SAFE_RELEASE(dataBuffer.pEvents);
break;
}
+
if (m_pSink) {
llMixerLatency = llClockAfter - llClockBefore;
m_pSink->Notify(EC_PROCESSING_LATENCY, (LONG_PTR)&llMixerLatency, 0);
@@ -3201,7 +3250,14 @@ bool CSyncAP::GetSampleFromMixer()
m_pD3DDev->ColorFill(m_pVideoSurface[dwSurface], &rcTearing, D3DCOLOR_ARGB(255, 255, 0, 0));
m_nTearingPos = (m_nTearingPos + 7) % m_nativeVideoSize.cx;
}
- MoveToScheduledList(pSample, false); // Schedule, then go back to see if there is more where that came from
+
+ if (SUCCEEDED(TrackSample(pSample))) {
+ AddToScheduledList(pSample, false); // Schedule, then go back to see if there is more where that came from
+ pSample = nullptr; // The sample should not be used after being queued
+ } else {
+ ASSERT(FALSE);
+ }
+
// Important: Release any events returned from the ProcessOutput method.
SAFE_RELEASE(dataBuffer.pEvents);
}
@@ -3535,9 +3591,11 @@ STDMETHODIMP CSyncAP::InitializeDevice(AM_MEDIA_TYPE* pMediaType)
CComPtr<IMFSample> pMFSample;
hr = fnMFCreateVideoSampleFromSurface(m_pVideoSurface[i], &pMFSample);
if (SUCCEEDED(hr)) {
+ pMFSample->SetUINT32(GUID_GROUP_ID, m_nCurrentGroupId);
pMFSample->SetUINT32(GUID_SURFACE_INDEX, i);
CAutoLock sampleQueueLock(&m_SampleQueueLock);
m_FreeSamples.AddTail(pMFSample);
+ pMFSample = nullptr; // The sample should not be used after being queued
}
ASSERT(SUCCEEDED(hr));
}
@@ -3615,7 +3673,7 @@ void CSyncAP::RenderThread()
HANDLE hEvts[] = {m_hEvtQuit, m_hEvtFlush, m_hEvtSkip};
bool bQuit = false;
TIMECAPS tc;
- CComPtr<IMFSample>pNewSample = nullptr; // The sample next in line to be presented
+ CComPtr<IMFSample> pNewSample; // The sample next in line to be presented
// Tell Multimedia Class Scheduler we are doing threaded playback (increase priority)
HANDLE hAvrt = 0;
@@ -3631,7 +3689,16 @@ void CSyncAP::RenderThread()
timeGetDevCaps(&tc, sizeof(TIMECAPS));
DWORD dwResolution = std::min(std::max(tc.wPeriodMin, 0u), tc.wPeriodMax);
VERIFY(timeBeginPeriod(dwResolution) == 0);
- pNewSample = nullptr;
+
+ auto checkPendingMediaFinished = [this]() {
+ if (m_bPendingMediaFinished) {
+ CAutoLock lock(&m_SampleQueueLock);
+ if (m_ScheduledSamples.IsEmpty()) {
+ m_bPendingMediaFinished = false;
+ m_pSink->Notify(EC_COMPLETE, 0, 0);
+ }
+ }
+ };
while (!bQuit) {
m_lNextSampleWait = 1; // Default value for running this loop
@@ -3652,7 +3719,7 @@ void CSyncAP::RenderThread()
m_lNextSampleWait = 0; // Present immediately
} else if (SUCCEEDED(pNewSample->GetSampleTime(&m_llSampleTime))) { // Get zero-based sample due time
if (m_llLastSampleTime == m_llSampleTime) { // In the rare case there are duplicate frames in the movie. There really shouldn't be but it happens.
- MoveToFreeList(pNewSample, true);
+ checkPendingMediaFinished();
pNewSample = nullptr;
m_lNextSampleWait = 0;
} else {
@@ -3729,6 +3796,8 @@ void CSyncAP::RenderThread()
}
}
} // if got new sample
+ } else {
+ checkPendingMediaFinished();
}
}
// Wait for the next presentation time (m_lNextSampleWait) or some other event.
@@ -3739,9 +3808,7 @@ void CSyncAP::RenderThread()
break;
case WAIT_OBJECT_0 + 1: // Flush
- if (pNewSample) {
- MoveToFreeList(pNewSample, true);
- }
+ checkPendingMediaFinished();
pNewSample = nullptr;
FlushSamples();
m_bEvtFlush = false;
@@ -3761,9 +3828,7 @@ void CSyncAP::RenderThread()
case WAIT_TIMEOUT: // Time to show the sample or something
if (m_LastSetOutputRange != -1 && m_LastSetOutputRange != r.m_AdvRendSets.iEVROutputRange || m_bPendingRenegotiate) {
- if (pNewSample) {
- MoveToFreeList(pNewSample, true);
- }
+ checkPendingMediaFinished();
pNewSample = nullptr;
FlushSamples();
RenegotiateMediaType();
@@ -3771,9 +3836,7 @@ void CSyncAP::RenderThread()
}
if (m_bPendingResetDevice) {
- if (pNewSample) {
- MoveToFreeList(pNewSample, true);
- }
+ checkPendingMediaFinished();
pNewSample = nullptr;
SendResetRequest();
} else if (m_nStepCount < 0) {
@@ -3781,34 +3844,26 @@ void CSyncAP::RenderThread()
m_pcFramesDropped++;
stepForward = true;
} else if (pNewSample && (m_nStepCount > 0)) {
- pNewSample->GetUINT32(GUID_SURFACE_INDEX, (UINT32*)&m_nCurSurface);
- if (!g_bExternalSubtitleTime) {
- __super::SetTime(g_tSegmentStart + m_llSampleTime);
- }
- Paint(true);
+ Paint(pNewSample);
CompleteFrameStep(false);
m_pcFramesDrawn++;
stepForward = true;
} else if (pNewSample && !m_bStepping) { // When a stepped frame is shown, a new one is fetched that we don't want to show here while stepping
- pNewSample->GetUINT32(GUID_SURFACE_INDEX, (UINT32*)&m_nCurSurface);
if (!g_bExternalSubtitleTime) {
__super::SetTime(g_tSegmentStart + m_llSampleTime);
}
- Paint(true);
+ Paint(pNewSample);
m_pcFramesDrawn++;
stepForward = true;
}
break;
} // switch
- if (pNewSample && stepForward) {
- MoveToFreeList(pNewSample, true);
+ if (stepForward) {
+ checkPendingMediaFinished();
pNewSample = nullptr;
}
} // while
- if (pNewSample) {
- MoveToFreeList(pNewSample, true);
- pNewSample = nullptr;
- }
+ pNewSample = nullptr;
timeEndPeriod(dwResolution);
if (fnAvRevertMmThreadCharacteristics) {
fnAvRevertMmThreadCharacteristics(hAvrt);
@@ -3829,9 +3884,11 @@ STDMETHODIMP_(bool) CSyncAP::ResetDevice()
CComPtr<IMFSample> pMFSample;
HRESULT hr = fnMFCreateVideoSampleFromSurface(m_pVideoSurface[i], &pMFSample);
if (SUCCEEDED(hr)) {
+ pMFSample->SetUINT32(GUID_GROUP_ID, m_nCurrentGroupId);
pMFSample->SetUINT32(GUID_SURFACE_INDEX, i);
CAutoLock sampleQueueLock(&m_SampleQueueLock);
m_FreeSamples.AddTail(pMFSample);
+ pMFSample = nullptr; // The sample should not be used after being queued
}
ASSERT(SUCCEEDED(hr));
}
@@ -3860,6 +3917,8 @@ void CSyncAP::RemoveAllSamples()
m_ScheduledSamples.RemoveAll();
m_FreeSamples.RemoveAll();
m_nUsedBuffer = 0;
+ // Increment the group id to make sure old samples will really be deleted
+ m_nCurrentGroupId++;
}
HRESULT CSyncAP::GetFreeSample(IMFSample** ppSample)
@@ -3867,7 +3926,7 @@ HRESULT CSyncAP::GetFreeSample(IMFSample** ppSample)
CAutoLock lock(&m_SampleQueueLock);
HRESULT hr = S_OK;
- if (m_FreeSamples.GetCount() > 1) { // Cannot use first free buffer (can be currently displayed)
+ if (!m_FreeSamples.IsEmpty()) {
m_nUsedBuffer++;
*ppSample = m_FreeSamples.RemoveHead().Detach();
} else {
@@ -3877,15 +3936,15 @@ HRESULT CSyncAP::GetFreeSample(IMFSample** ppSample)
return hr;
}
-HRESULT CSyncAP::GetScheduledSample(IMFSample** ppSample, int& _Count)
+HRESULT CSyncAP::GetScheduledSample(IMFSample** ppSample, int& count)
{
CAutoLock lock(&m_SampleQueueLock);
HRESULT hr = S_OK;
- _Count = (int)m_ScheduledSamples.GetCount();
- if (_Count > 0) {
+ count = (int)m_ScheduledSamples.GetCount();
+ if (count > 0) {
*ppSample = m_ScheduledSamples.RemoveHead().Detach();
- --_Count;
+ --count;
} else {
hr = MF_E_SAMPLEALLOCATOR_EMPTY;
}
@@ -3893,15 +3952,11 @@ HRESULT CSyncAP::GetScheduledSample(IMFSample** ppSample, int& _Count)
return hr;
}
-void CSyncAP::MoveToFreeList(IMFSample* pSample, bool bTail)
+void CSyncAP::AddToFreeList(IMFSample* pSample, bool bTail)
{
CAutoLock lock(&m_SampleQueueLock);
m_nUsedBuffer--;
- if (m_bPendingMediaFinished && m_nUsedBuffer == 0) {
- m_bPendingMediaFinished = false;
- m_pSink->Notify(EC_COMPLETE, 0, 0);
- }
if (bTail) {
m_FreeSamples.AddTail(pSample);
} else {
@@ -3909,11 +3964,11 @@ void CSyncAP::MoveToFreeList(IMFSample* pSample, bool bTail)
}
}
-void CSyncAP::MoveToScheduledList(IMFSample* pSample, bool _bSorted)
+void CSyncAP::AddToScheduledList(IMFSample* pSample, bool bSorted)
{
CAutoLock lock(&m_SampleQueueLock);
- if (_bSorted) {
+ if (bSorted) {
m_ScheduledSamples.AddHead(pSample);
} else {
m_ScheduledSamples.AddTail(pSample);
@@ -3924,17 +3979,37 @@ void CSyncAP::FlushSamples()
{
CAutoLock lock(this);
CAutoLock lock2(&m_SampleQueueLock);
- FlushSamplesInternal();
+
+ m_bPrerolled = false;
+ m_pCurrentlyDisplayedSample = nullptr;
+ m_ScheduledSamples.RemoveAll();
}
-void CSyncAP::FlushSamplesInternal()
+HRESULT CSyncAP::TrackSample(IMFSample* pSample)
{
- m_bPrerolled = false;
- while (!m_ScheduledSamples.IsEmpty()) {
- CComPtr<IMFSample> pMFSample;
- pMFSample = m_ScheduledSamples.RemoveHead();
- MoveToFreeList(pMFSample, true);
+ HRESULT hr = E_FAIL;
+ if (CComQIPtr<IMFTrackedSample> pTracked = pSample) {
+ hr = pTracked->SetAllocator(&m_SampleFreeCallback, nullptr);
+ }
+ return hr;
+}
+
+HRESULT CSyncAP::OnSampleFree(IMFAsyncResult* pResult)
+{
+ CComPtr<IUnknown> pObject;
+ HRESULT hr = pResult->GetObject(&pObject);
+ if (SUCCEEDED(hr)) {
+ if (CComQIPtr<IMFSample> pSample = pObject) {
+ // Ignore the sample if it is from an old group
+ UINT32 nGroupId;
+ CAutoLock sampleQueueLock(&m_SampleQueueLock);
+ if (SUCCEEDED(pSample->GetUINT32(GUID_GROUP_ID, &nGroupId)) && nGroupId == m_nCurrentGroupId) {
+ AddToFreeList(pSample, true);
+ pSample = nullptr; // The sample should not be used after being queued
+ }
+ }
}
+ return hr;
}
HRESULT CSyncAP::AdviseSyncClock(ISyncClock* sC)
@@ -4172,30 +4247,20 @@ STDMETHODIMP CSyncRenderer::NonDelegatingQueryInterface(REFIID riid, void** ppv)
}
CGenlock::CGenlock(double target, double limit, int lineD, int colD, double clockD, UINT mon)
- : targetSyncOffset(target) // Target sync offset, typically around 10 ms
- , controlLimit(limit) // How much sync offset is allowed to drift from target sync offset before control kicks in
- , lineDelta(lineD) // Number of rows used in display frequency adjustment, typically 1 (one)
- , columnDelta(colD) // Number of columns used in display frequency adjustment, typically 1 - 2
- , cycleDelta(clockD) // Delta used in clock speed adjustment. In fractions of 1.0. Typically around 0.001
- , monitor(mon) // The monitor to be adjusted if the display refresh rate is the controlled parameter
- , lowSyncOffset(target - limit)
- , highSyncOffset(target + limit)
- , adjDelta(0)
+ : powerstripTimingExists(false)
+ , liveSource(false)
+ , adjDelta(0) // Number of rows used in display frequency adjustment, typically 1 (one)
+ , lineDelta(lineD) // Number of columns used in display frequency adjustment, typically 1 - 2
+ , columnDelta(colD) // Delta used in clock speed adjustment. In fractions of 1.0. Typically around 0.001
+ , cycleDelta(clockD) // The monitor to be adjusted if the display refresh rate is the controlled parameter
, displayAdjustmentsMade(0)
, clockAdjustmentsMade(0)
- , displayFreqCruise(0.0)
- , displayFreqFaster(0.0)
- , displayFreqSlower(0.0)
- , curDisplayFreq(0.0)
- , psWnd(nullptr)
- , liveSource(false)
- , powerstripTimingExists(false)
- , syncOffsetFifo(64)
- , frameCycleFifo(4)
, totalLines(0)
, totalColumns(0)
, visibleLines(0)
, visibleColumns(0)
+ , syncOffsetFifo(64)
+ , frameCycleFifo(4)
, minSyncOffset(DBL_MAX)
, maxSyncOffset(DBL_MIN)
, syncOffsetAvg(0.0)
@@ -4203,8 +4268,18 @@ CGenlock::CGenlock(double target, double limit, int lineD, int colD, double cloc
, maxFrameCycle(DBL_MIN)
, frameCycleAvg(0.0)
, pixelClock(0)
+ , displayFreqCruise(0.0)
+ , displayFreqSlower(0.0)
+ , displayFreqFaster(0.0)
+ , curDisplayFreq(0.0)
+ , controlLimit(limit) // How much sync offset is allowed to drift from target sync offset before control kicks in
+ , monitor(mon)
+ , psWnd(nullptr)
, displayTiming()
, displayTimingSave()
+ , lowSyncOffset(target - limit)
+ , targetSyncOffset(target) // Target sync offset, typically around 10 ms
+ , highSyncOffset(target + limit)
{
ZeroMemory(faster, MAX_LOADSTRING);
ZeroMemory(cruise, MAX_LOADSTRING);
diff --git a/src/filters/renderer/VideoRenderers/SyncRenderer.h b/src/filters/renderer/VideoRenderers/SyncRenderer.h
index 7455e0e0c..f10fcc8fb 100644
--- a/src/filters/renderer/VideoRenderers/SyncRenderer.h
+++ b/src/filters/renderer/VideoRenderers/SyncRenderer.h
@@ -30,6 +30,7 @@
#define VMRBITMAP_UPDATE 0x80000000
#define MAX_PICTURE_SLOTS (60 + 2) // Last 2 for pixels shader!
#define NB_JITTER 126
+#include "AsyncCallback.h"
extern bool g_bNoDuration; // Defined in MainFrm.cpp
extern bool g_bExternalSubtitleTime;
@@ -68,6 +69,8 @@ class CFocusThread;
#define PIXELCLOCK 8
#define UNKNOWN 9
+// Guid to tag IMFSample with a group id
+static const GUID GUID_GROUP_ID = { 0x309e32cc, 0x9b23, 0x4c6c, { 0x86, 0x63, 0xcd, 0xd9, 0xad, 0x49, 0x7f, 0x8a } };
// Guid to tag IMFSample with DirectX surface index
static const GUID GUID_SURFACE_INDEX = { 0x30c8e9f6, 0x415, 0x4b81, { 0xa3, 0x15, 0x1, 0xa, 0xc6, 0xa9, 0xda, 0x19 } };
@@ -154,7 +157,7 @@ namespace GothSync
D3DFORMAT m_DisplayType;
D3DTEXTUREFILTERTYPE m_filter;
D3DCAPS9 m_caps;
- D3DPRESENT_PARAMETERS pp;
+ D3DPRESENT_PARAMETERS m_pp;
bool SettingsNeedResetDevice();
void SendResetRequest();
@@ -315,6 +318,8 @@ namespace GothSync
bool ExtractInterlaced(const AM_MEDIA_TYPE* pmt);
CFocusThread* m_FocusThread;
+ HWND m_hFocusWindow;
+
public:
CBaseAP(HWND hWnd, bool bFullscreen, HRESULT& hr, CString& _Error);
~CBaseAP();
@@ -446,6 +451,7 @@ namespace GothSync
STDMETHODIMP GetD3DFullscreen(bool* pfEnabled);
protected:
+ STDMETHODIMP_(bool) Paint(IMFSample* pMFSample);
void OnResetDevice();
MFCLOCK_STATE m_LastClockState;
@@ -487,9 +493,10 @@ namespace GothSync
CCritSec m_SampleQueueLock;
CCritSec m_ImageProcessingLock;
- CInterfaceList<IMFSample, &IID_IMFSample> m_FreeSamples;
- CInterfaceList<IMFSample, &IID_IMFSample> m_ScheduledSamples;
- IMFSample* m_pCurrentDisplaydSample;
+ UINT32 m_nCurrentGroupId;
+ CInterfaceList<IMFSample> m_FreeSamples;
+ CInterfaceList<IMFSample> m_ScheduledSamples;
+ CComPtr<IMFSample> m_pCurrentlyDisplayedSample;
UINT m_nResetToken;
int m_nStepCount;
@@ -508,11 +515,16 @@ namespace GothSync
STDMETHODIMP AdviseSyncClock(ISyncClock* sC);
HRESULT BeginStreaming();
HRESULT GetFreeSample(IMFSample** ppSample);
- HRESULT GetScheduledSample(IMFSample** ppSample, int& _Count);
- void MoveToFreeList(IMFSample* pSample, bool bTail);
- void MoveToScheduledList(IMFSample* pSample, bool _bSorted);
+ HRESULT GetScheduledSample(IMFSample** ppSample, int& count);
+ void AddToFreeList(IMFSample* pSample, bool bTail);
+ void AddToScheduledList(IMFSample* pSample, bool bSorted);
void FlushSamples();
- void FlushSamplesInternal();
+
+ HRESULT TrackSample(IMFSample* pSample);
+
+ // Callback when a video sample is released.
+ HRESULT OnSampleFree(IMFAsyncResult* pResult);
+ AsyncCallback<CSyncAP> m_SampleFreeCallback;
LONGLONG GetMediaTypeMerit(IMFMediaType* pMediaType);
HRESULT RenegotiateMediaType();
diff --git a/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj b/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj
index c709d4564..0c6973d05 100644
--- a/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj
+++ b/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj
@@ -138,6 +138,7 @@
<ItemGroup>
<ClInclude Include="AllocatorCommon.h" />
<ClInclude Include="AllocatorCommon7.h" />
+ <ClInclude Include="AsyncCallback.h" />
<ClInclude Include="D3DFont.h" />
<ClInclude Include="Dither.h" />
<ClInclude Include="DX7AllocatorPresenter.h" />
diff --git a/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj.filters b/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj.filters
index 9a21a9b7d..2c606a773 100644
--- a/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj.filters
+++ b/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj.filters
@@ -169,5 +169,8 @@
<ClInclude Include="FocusThread.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="AsyncCallback.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp
index 3faf3784d..04eef572b 100644
--- a/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp
+++ b/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp
@@ -28,19 +28,10 @@
using namespace DSObjects;
-#define ShaderStage_PreScale 0
-#define ShaderStage_PostScale 1
-
extern bool g_bExternalSubtitleTime;
-//
-// CmadVRAllocatorPresenter
-//
-
CmadVRAllocatorPresenter::CmadVRAllocatorPresenter(HWND hWnd, HRESULT& hr, CString& _Error)
: CSubPicAllocatorPresenterImpl(hWnd, hr, &_Error)
- , m_ScreenSize(0, 0)
- , m_bIsFullscreen(false)
{
if (FAILED(hr)) {
_Error += L"ISubPicAllocatorPresenterImpl failed\n";
@@ -52,41 +43,28 @@ CmadVRAllocatorPresenter::CmadVRAllocatorPresenter(HWND hWnd, HRESULT& hr, CStri
CmadVRAllocatorPresenter::~CmadVRAllocatorPresenter()
{
- if (m_pSRCB) {
- // nasty, but we have to let it know about our death somehow
- ((CSubRenderCallback*)(ISubRenderCallback2*)m_pSRCB)->SetDXRAP(nullptr);
- }
-
// the order is important here
m_pSubPicQueue = nullptr;
m_pAllocator = nullptr;
- m_pDXR = nullptr;
+ m_pMVR = nullptr;
}
STDMETHODIMP CmadVRAllocatorPresenter::NonDelegatingQueryInterface(REFIID riid, void** ppv)
{
- /*
- if (riid == __uuidof(IVideoWindow))
- return GetInterface((IVideoWindow*)this, ppv);
- if (riid == __uuidof(IBasicVideo))
- return GetInterface((IBasicVideo*)this, ppv);
- if (riid == __uuidof(IBasicVideo2))
- return GetInterface((IBasicVideo2*)this, ppv);
- */
- /*
- if (riid == __uuidof(IVMRWindowlessControl))
- return GetInterface((IVMRWindowlessControl*)this, ppv);
- */
-
- if (riid != IID_IUnknown && m_pDXR) {
- if (SUCCEEDED(m_pDXR->QueryInterface(riid, ppv))) {
+ if (riid != IID_IUnknown && m_pMVR) {
+ if (SUCCEEDED(m_pMVR->QueryInterface(riid, ppv))) {
return S_OK;
}
}
- return __super::NonDelegatingQueryInterface(riid, ppv);
+ return QI(ISubRenderCallback)
+ QI(ISubRenderCallback2)
+ QI(ISubRenderCallback3)
+ __super::NonDelegatingQueryInterface(riid, ppv);
}
+// ISubRenderCallback
+
HRESULT CmadVRAllocatorPresenter::SetDevice(IDirect3DDevice9* pD3DDev)
{
if (!pD3DDev) {
@@ -96,8 +74,14 @@ HRESULT CmadVRAllocatorPresenter::SetDevice(IDirect3DDevice9* pD3DDev)
return S_OK;
}
+ CSize screenSize;
+ MONITORINFO mi = { sizeof(MONITORINFO) };
+ if (GetMonitorInfo(MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONEAREST), &mi)) {
+ screenSize.SetSize(mi.rcMonitor.right - mi.rcMonitor.left, mi.rcMonitor.bottom - mi.rcMonitor.top);
+ }
+
const CRenderersSettings& r = GetRenderersSettings();
- InitMaxSubtitleTextureSize(r.subPicQueueSettings.nMaxRes, m_ScreenSize);
+ InitMaxSubtitleTextureSize(r.subPicQueueSettings.nMaxRes, screenSize);
if (m_pAllocator) {
m_pAllocator->ChangeDevice(pD3DDev);
@@ -122,21 +106,27 @@ HRESULT CmadVRAllocatorPresenter::SetDevice(IDirect3DDevice9* pD3DDev)
return hr;
}
-HRESULT CmadVRAllocatorPresenter::Render(
- REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, REFERENCE_TIME atpf,
- int left, int top, int right, int bottom, int width, int height)
+// ISubRenderCallback3
+
+HRESULT CmadVRAllocatorPresenter::RenderEx2(REFERENCE_TIME rtStart,
+ REFERENCE_TIME /*rtStop*/,
+ REFERENCE_TIME atpf,
+ RECT croppedVideoRect,
+ RECT /*originalVideoRect*/,
+ RECT viewportRect,
+ const double videoStretchFactor)
{
- CRect wndRect(0, 0, width, height);
- CRect videoRect(left, top, right, bottom);
- __super::SetPosition(wndRect, videoRect); // needed? should be already set by the player
+ CheckPointer(m_pSubPicQueue, E_UNEXPECTED);
+
+ __super::SetPosition(viewportRect, croppedVideoRect);
if (!g_bExternalSubtitleTime) {
SetTime(rtStart);
}
- if (atpf > 0 && m_pSubPicQueue) {
+ if (atpf > 0) {
m_fps = 10000000.0 / atpf;
m_pSubPicQueue->SetFPS(m_fps);
}
- AlphaBltSubPic(wndRect, videoRect);
+ AlphaBltSubPic(viewportRect, croppedVideoRect, nullptr, videoStretchFactor);
return S_OK;
}
@@ -145,46 +135,29 @@ HRESULT CmadVRAllocatorPresenter::Render(
STDMETHODIMP CmadVRAllocatorPresenter::CreateRenderer(IUnknown** ppRenderer)
{
CheckPointer(ppRenderer, E_POINTER);
+ ASSERT(!m_pMVR);
- if (m_pDXR) {
- return E_UNEXPECTED;
- }
- m_pDXR.CoCreateInstance(CLSID_madVR, GetOwner());
- if (!m_pDXR) {
- return E_FAIL;
- }
+ HRESULT hr = S_FALSE;
- CComQIPtr<ISubRender> pSR = m_pDXR;
- if (!pSR) {
- m_pDXR = nullptr;
- return E_FAIL;
- }
+ CHECK_HR(m_pMVR.CoCreateInstance(CLSID_madVR, GetOwner()));
- m_pSRCB = DEBUG_NEW CSubRenderCallback(this);
- if (FAILED(pSR->SetCallback(m_pSRCB))) {
- m_pDXR = nullptr;
- return E_FAIL;
+ if (CComQIPtr<ISubRender> pSR = m_pMVR) {
+ VERIFY(SUCCEEDED(pSR->SetCallback(this)));
}
(*ppRenderer = (IUnknown*)(INonDelegatingUnknown*)(this))->AddRef();
- MONITORINFO mi;
- mi.cbSize = sizeof(MONITORINFO);
- if (GetMonitorInfo(MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONEAREST), &mi)) {
- m_ScreenSize.SetSize(mi.rcMonitor.right - mi.rcMonitor.left, mi.rcMonitor.bottom - mi.rcMonitor.top);
- }
-
return S_OK;
}
STDMETHODIMP_(void) CmadVRAllocatorPresenter::SetPosition(RECT w, RECT v)
{
- if (CComQIPtr<IBasicVideo> pBV = m_pDXR) {
+ if (CComQIPtr<IBasicVideo> pBV = m_pMVR) {
pBV->SetDefaultSourcePosition();
pBV->SetDestinationPosition(v.left, v.top, v.right - v.left, v.bottom - v.top);
}
- if (CComQIPtr<IVideoWindow> pVW = m_pDXR) {
+ if (CComQIPtr<IVideoWindow> pVW = m_pMVR) {
pVW->SetWindowPosition(w.left, w.top, w.right - w.left, w.bottom - w.top);
}
@@ -193,14 +166,14 @@ STDMETHODIMP_(void) CmadVRAllocatorPresenter::SetPosition(RECT w, RECT v)
STDMETHODIMP_(SIZE) CmadVRAllocatorPresenter::GetVideoSize(bool bCorrectAR) const
{
- SIZE size = {0, 0};
+ CSize size;
if (!bCorrectAR) {
- if (CComQIPtr<IBasicVideo> pBV = m_pDXR) {
+ if (CComQIPtr<IBasicVideo> pBV = m_pMVR) {
pBV->GetVideoSize(&size.cx, &size.cy);
}
} else {
- if (CComQIPtr<IBasicVideo2> pBV2 = m_pDXR) {
+ if (CComQIPtr<IBasicVideo2> pBV2 = m_pMVR) {
pBV2->GetPreferredAspectRatio(&size.cx, &size.cy);
}
}
@@ -208,42 +181,47 @@ STDMETHODIMP_(SIZE) CmadVRAllocatorPresenter::GetVideoSize(bool bCorrectAR) cons
return size;
}
-STDMETHODIMP_(bool) CmadVRAllocatorPresenter::Paint(bool bAll)
+STDMETHODIMP_(bool) CmadVRAllocatorPresenter::Paint(bool /*bAll*/)
{
- return false; // TODO
+ if (CComQIPtr<IMadVRCommand> pMVRC = m_pMVR) {
+ return SUCCEEDED(pMVRC->SendCommand("redraw"));
+ }
+ return false;
}
STDMETHODIMP CmadVRAllocatorPresenter::GetDIB(BYTE* lpDib, DWORD* size)
{
HRESULT hr = E_NOTIMPL;
- if (CComQIPtr<IBasicVideo> pBV = m_pDXR) {
+ if (CComQIPtr<IBasicVideo> pBV = m_pMVR) {
hr = pBV->GetCurrentImage((long*)size, (long*)lpDib);
}
return hr;
}
-STDMETHODIMP CmadVRAllocatorPresenter::SetPixelShader(LPCSTR pSrcData, LPCSTR pTarget)
+STDMETHODIMP CmadVRAllocatorPresenter::SetPixelShader2(LPCSTR pSrcData, LPCSTR pTarget, bool bScreenSpace)
{
HRESULT hr = E_NOTIMPL;
- if (CComQIPtr<IMadVRExternalPixelShaders> pEPS = m_pDXR) {
+
+ if (CComQIPtr<IMadVRExternalPixelShaders> pMVREPS = m_pMVR) {
if (!pSrcData && !pTarget) {
- hr = pEPS->ClearPixelShaders(false);
+ hr = pMVREPS->ClearPixelShaders(bScreenSpace ? ShaderStage_PostScale : ShaderStage_PreScale);
} else {
- hr = pEPS->AddPixelShader(pSrcData, pTarget, ShaderStage_PreScale, nullptr);
+ hr = pMVREPS->AddPixelShader(pSrcData, pTarget, bScreenSpace ? ShaderStage_PostScale : ShaderStage_PreScale, nullptr);
}
}
+
return hr;
}
-STDMETHODIMP CmadVRAllocatorPresenter::SetPixelShader2(LPCSTR pSrcData, LPCSTR pTarget, bool bScreenSpace)
+// ISubPicAllocatorPresenter2
+
+STDMETHODIMP_(bool) CmadVRAllocatorPresenter::IsRendering()
{
- HRESULT hr = E_NOTIMPL;
- if (CComQIPtr<IMadVRExternalPixelShaders> pEPS = m_pDXR) {
- if (!pSrcData && !pTarget) {
- hr = pEPS->ClearPixelShaders(bScreenSpace);
- } else {
- hr = pEPS->AddPixelShader(pSrcData, pTarget, bScreenSpace ? ShaderStage_PostScale : ShaderStage_PreScale, nullptr);
+ if (CComQIPtr<IMadVRInfo> pMVRI = m_pMVR) {
+ int playbackState;
+ if (SUCCEEDED(pMVRI->GetInt("playbackState", &playbackState))) {
+ return playbackState == State_Running;
}
}
- return hr;
+ return false;
}
diff --git a/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h b/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h
index 2bbf45e06..443f9fbf9 100644
--- a/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h
+++ b/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h
@@ -25,81 +25,49 @@
namespace DSObjects
{
- class CmadVRAllocatorPresenter
- : public CSubPicAllocatorPresenterImpl
+ class CmadVRAllocatorPresenter : public CSubPicAllocatorPresenterImpl, ISubRenderCallback3
{
- class CSubRenderCallback : public CUnknown, public ISubRenderCallback2, public CCritSec
- {
- CmadVRAllocatorPresenter* m_pDXRAP;
-
- public:
- CSubRenderCallback(CmadVRAllocatorPresenter* pDXRAP)
- : CUnknown(_T("CSubRender"), nullptr)
- , m_pDXRAP(pDXRAP) {
- }
-
- DECLARE_IUNKNOWN
- STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv) {
- return
- QI(ISubRenderCallback)
- QI(ISubRenderCallback2)
- __super::NonDelegatingQueryInterface(riid, ppv);
- }
-
- void SetDXRAP(CmadVRAllocatorPresenter* pDXRAP) {
- CAutoLock cAutoLock(this);
- m_pDXRAP = pDXRAP;
- }
-
- // ISubRenderCallback
-
- STDMETHODIMP SetDevice(IDirect3DDevice9* pD3DDev) {
- CAutoLock cAutoLock(this);
- return m_pDXRAP ? m_pDXRAP->SetDevice(pD3DDev) : E_UNEXPECTED;
- }
-
- STDMETHODIMP Render(REFERENCE_TIME rtStart, int left, int top, int right, int bottom, int width, int height) {
- CAutoLock cAutoLock(this);
- return m_pDXRAP ? m_pDXRAP->Render(rtStart, 0, 0, left, top, right, bottom, width, height) : E_UNEXPECTED;
- }
-
- // ISubRendererCallback2
-
- STDMETHODIMP RenderEx(REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, REFERENCE_TIME AvgTimePerFrame, int left, int top, int right, int bottom, int width, int height) {
- CAutoLock cAutoLock(this);
- return m_pDXRAP ? m_pDXRAP->Render(rtStart, rtStop, AvgTimePerFrame, left, top, right, bottom, width, height) : E_UNEXPECTED;
- }
- };
-
- CComPtr<IUnknown> m_pDXR;
- CComPtr<ISubRenderCallback2> m_pSRCB;
- CSize m_ScreenSize;
- bool m_bIsFullscreen;
+ CComPtr<IUnknown> m_pMVR;
public:
CmadVRAllocatorPresenter(HWND hWnd, HRESULT& hr, CString& _Error);
virtual ~CmadVRAllocatorPresenter();
DECLARE_IUNKNOWN
- STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
+ STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv) override;
- HRESULT SetDevice(IDirect3DDevice9* pD3DDev);
- HRESULT Render(
- REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, REFERENCE_TIME atpf,
- int left, int top, int bottom, int right, int width, int height);
+ // ISubRenderCallback
+ STDMETHODIMP SetDevice(IDirect3DDevice9* pD3DDev) override;
+ STDMETHODIMP Render(REFERENCE_TIME rtStart, int left, int top, int right,
+ int bottom, int width, int height) override {
+ return RenderEx(rtStart, 0, 0, left, top, right, bottom, width, height);
+ };
+
+ // ISubRenderCallback2
+ STDMETHODIMP RenderEx(REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, REFERENCE_TIME atpf,
+ int left, int top, int right, int bottom, int width, int height) override {
+ return RenderEx2(rtStart, rtStop, atpf, { left, top, right, bottom },
+ { left, top, right, bottom }, { 0, 0, width, height });
+ };
+
+ // ISubRenderCallback3
+ STDMETHODIMP RenderEx2(REFERENCE_TIME rtStart, REFERENCE_TIME rtStop,
+ REFERENCE_TIME atpf, RECT croppedVideoRect,
+ RECT originalVideoRect, RECT viewportRect,
+ const double videoStretchFactor = 1.0) override;
// ISubPicAllocatorPresenter
- STDMETHODIMP CreateRenderer(IUnknown** ppRenderer);
- STDMETHODIMP_(void) SetPosition(RECT w, RECT v);
- STDMETHODIMP_(SIZE) GetVideoSize(bool bCorrectAR = true) const;
- STDMETHODIMP_(bool) Paint(bool bAll);
- STDMETHODIMP GetDIB(BYTE* lpDib, DWORD* size);
- STDMETHODIMP SetPixelShader(LPCSTR pSrcData, LPCSTR pTarget);
- STDMETHODIMP SetPixelShader2(LPCSTR pSrcData, LPCSTR pTarget, bool bScreenSpace);
+ STDMETHODIMP CreateRenderer(IUnknown** ppRenderer) override;
+ STDMETHODIMP_(void) SetPosition(RECT w, RECT v) override;
+ STDMETHODIMP_(SIZE) GetVideoSize(bool bCorrectAR = true) const override;
+ STDMETHODIMP_(bool) Paint(bool bAll) override;
+ STDMETHODIMP GetDIB(BYTE* lpDib, DWORD* size) override;
+ STDMETHODIMP SetPixelShader(LPCSTR pSrcData, LPCSTR pTarget) override {
+ return SetPixelShader2(pSrcData, pTarget, false);
+ };
+ STDMETHODIMP SetPixelShader2(LPCSTR pSrcData, LPCSTR pTarget, bool bScreenSpace) override;
// ISubPicAllocatorPresenter2
- STDMETHODIMP_(bool) IsRendering() {
- return false; // For testing
- }
+ STDMETHODIMP_(bool) IsRendering() override;
};
}
diff --git a/src/filters/switcher/AudioSwitcher/AudioSwitcher.cpp b/src/filters/switcher/AudioSwitcher/AudioSwitcher.cpp
index 8df7df63a..8e6dd1c27 100644
--- a/src/filters/switcher/AudioSwitcher/AudioSwitcher.cpp
+++ b/src/filters/switcher/AudioSwitcher/AudioSwitcher.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -504,7 +504,7 @@ CMediaType CAudioSwitcherFilter::CreateNewOutputMediaType(CMediaType mt, long& c
DWORD mask = DWORD((__int64(1) << wfe->nChannels) - 1);
for (int i = 0; i < AS_MAX_CHANNELS; i++) {
if (m_pSpeakerToChannelMap[wfe->nChannels - 1][i]&mask) {
- ChMap cm = {1 << i, m_pSpeakerToChannelMap[wfe->nChannels - 1][i]};
+ ChMap cm = {1u << i, m_pSpeakerToChannelMap[wfe->nChannels - 1][i]};
m_chs[wfe->nChannels - 1].Add(cm);
}
}
diff --git a/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp b/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp
index 03dc69479..a267f45c2 100644
--- a/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp
+++ b/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -1301,12 +1301,12 @@ HRESULT CStreamSwitcherFilter::CompleteConnect(PIN_DIRECTION dir, CBasePin* pPin
name.Format(L"Channel %ld", ++m_PinVersion);
HRESULT hr = S_OK;
- CStreamSwitcherInputPin* pPin = DEBUG_NEW CStreamSwitcherInputPin(this, &hr, name);
- if (!pPin || FAILED(hr)) {
- delete pPin;
+ CStreamSwitcherInputPin* pInputPin = DEBUG_NEW CStreamSwitcherInputPin(this, &hr, name);
+ if (!pInputPin || FAILED(hr)) {
+ delete pInputPin;
return E_FAIL;
}
- m_pInputs.AddTail(pPin);
+ m_pInputs.AddTail(pInputPin);
}
}
diff --git a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp
index 7bd077e9e..513199edd 100644
--- a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp
+++ b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -144,34 +144,34 @@ HRESULT CAVI2AC3Filter::Transform(IMediaSample* pSample, IMediaSample* pOutSampl
int curlen = std::min(len - pos, 2013l);
pos += 2013;
- CComPtr<IMediaSample> pOutSample;
- hr = InitializeOutputSample(pSample, &pOutSample);
+ CComPtr<IMediaSample> pNewOutSample;
+ hr = InitializeOutputSample(pSample, &pNewOutSample);
if (fDiscontinuity) {
if (fHasTime) {
rtStop = rtStart + (rtStop - rtStart) * curlen / len;
- pOutSample->SetTime(&rtStart, &rtStop);
+ pNewOutSample->SetTime(&rtStart, &rtStop);
}
fDiscontinuity = false;
} else {
- pOutSample->SetTime(nullptr, nullptr);
- pOutSample->SetDiscontinuity(FALSE);
+ pNewOutSample->SetTime(nullptr, nullptr);
+ pNewOutSample->SetDiscontinuity(FALSE);
}
- BYTE* pOut = nullptr;
- if (FAILED(hr = pOutSample->GetPointer(&pOut))) {
+ BYTE* pNewOut = nullptr;
+ if (FAILED(hr = pNewOutSample->GetPointer(&pNewOut))) {
return hr;
}
- BYTE* pOutOrg = pOut;
+ BYTE* pNewOutOrg = pNewOut;
- long size = pOutSample->GetSize();
+ long newSize = pNewOutSample->GetSize();
const GUID* majortype = &m_pOutput->CurrentMediaType().majortype;
const GUID* subtype = &m_pOutput->CurrentMediaType().subtype;
if (*majortype == MEDIATYPE_DVD_ENCRYPTED_PACK) {
- if (size < curlen + 32 + 3) {
+ if (newSize < curlen + 32 + 3) {
return E_FAIL;
}
@@ -181,14 +181,14 @@ HRESULT CAVI2AC3Filter::Transform(IMediaSample* pSample, IMediaSample* pOutSampl
0x01, 0x89, 0xC3, 0xF8, // mux rate (1260000 bytes/sec, 22bits), marker (2bits), reserved (~0, 5bits), stuffing (0, 3bits)
};
- memcpy(pOut, &PESHeader, sizeof(PESHeader));
- pOut += sizeof(PESHeader);
+ memcpy(pNewOut, &PESHeader, sizeof(PESHeader));
+ pNewOut += sizeof(PESHeader);
majortype = &MEDIATYPE_MPEG2_PES;
}
if (*majortype == MEDIATYPE_MPEG2_PES) {
- if (size < curlen + 20 + 3) {
+ if (newSize < curlen + 20 + 3) {
return E_FAIL;
}
@@ -232,24 +232,24 @@ HRESULT CAVI2AC3Filter::Transform(IMediaSample* pSample, IMediaSample* pOutSampl
}
}
- memcpy(pOut, &Private1Header, sizeof(Private1Header));
- pOut += sizeof(Private1Header);
+ memcpy(pNewOut, &Private1Header, sizeof(Private1Header));
+ pNewOut += sizeof(Private1Header);
majortype = &MEDIATYPE_Audio;
}
if (*majortype == MEDIATYPE_Audio) {
- if (size < curlen) {
+ if (newSize < curlen) {
return E_FAIL;
}
- memcpy(pOut, pIn, curlen);
+ memcpy(pNewOut, pIn, curlen);
pIn += curlen;
- pOut += curlen;
+ pNewOut += curlen;
}
- pOutSample->SetActualDataLength(long(pOut - pOutOrg));
+ pNewOutSample->SetActualDataLength(long(pNewOut - pNewOutOrg));
- m_pOutput->Deliver(pOutSample);
+ m_pOutput->Deliver(pNewOutSample);
}
return S_FALSE;
diff --git a/src/mpc-hc/AboutDlg.cpp b/src/mpc-hc/AboutDlg.cpp
index e6bb01994..cd0ad8f99 100644
--- a/src/mpc-hc/AboutDlg.cpp
+++ b/src/mpc-hc/AboutDlg.cpp
@@ -95,7 +95,9 @@ BOOL CAboutDlg::OnInitDialog()
#endif
#elif defined(_MSC_VER)
#if (_MSC_VER == 1800) // 2013
-#if (_MSC_FULL_VER == 180031101)
+#if (_MSC_FULL_VER == 180040629)
+ m_MPCCompiler = _T("MSVC 2013 Update 5");
+#elif (_MSC_FULL_VER == 180031101)
m_MPCCompiler = _T("MSVC 2013 Update 4");
#elif (_MSC_FULL_VER == 180030723)
m_MPCCompiler = _T("MSVC 2013 Update 3");
diff --git a/src/mpc-hc/AppSettings.cpp b/src/mpc-hc/AppSettings.cpp
index 75107c565..627964d71 100644
--- a/src/mpc-hc/AppSettings.cpp
+++ b/src/mpc-hc/AppSettings.cpp
@@ -25,7 +25,6 @@
#include "FGFilter.h"
#include "FileAssoc.h"
#include "CrashReporter.h"
-#include "CrashReporterDialog.h"
#include "VersionInfo.h"
#include "SysVersion.h"
#include "WinAPIUtils.h"
@@ -34,112 +33,19 @@
#include "UpdateChecker.h"
#include "moreuuids.h"
#include <mvrInterfaces.h>
-
+#include "../thirdparty/sanear/sanear/src/Factory.h"
#pragma warning(push)
#pragma warning(disable: 4351) // new behavior: elements of array 'array' will be default initialized
CAppSettings::CAppSettings()
: bInitialized(false)
- , hAccel(nullptr)
- , nCmdlnWebServerPort(-1)
- , fShowDebugInfo(false)
- , hMasterWnd(nullptr)
, nCLSwitches(0)
- , iMonitor(0)
- , fMute(false)
- , fPreventMinimize(false)
- , fUseWin7TaskBar(true)
- , fUseSearchInFolder(false)
- , fUseTimeTooltip(true)
- , nTimeTooltipPosition(TIME_TOOLTIP_ABOVE_SEEKBAR)
- , nOSDSize(0)
- , nSpeakerChannels(2)
- , fRemainingTime(false)
- , bHighPrecisionTimer(false)
- , nUpdaterAutoCheck(-1)
- , nUpdaterDelay(7)
- , fBDAUseOffset(false)
- , iBDABandwidth(8)
- , iBDAOffset(166)
- , iBDAScanFreqStart(474000)
- , iBDAScanFreqEnd(858000)
- , fBDAIgnoreEncryptedChannels(false)
- , nDVBLastChannel(INT_ERROR)
- , nDVBStopFilterGraph(DVB_STOP_FG_WHEN_SWITCHING)
- , nDVBRebuildFilterGraph(DVB_REBUILD_FG_WHEN_SWITCHING)
- , fEnableAudioSwitcher(true)
- , fAudioNormalize(false)
- , fAudioNormalizeRecover(true)
- , nAudioBoost(0)
- , fDownSampleTo441(false)
- , fAudioTimeShift(false)
- , iAudioTimeShift(0)
- , fCustomChannelMapping(false)
- , fOverridePlacement(false)
- , nHorPos(50)
- , nVerPos(90)
- , bSubtitleARCompensation(true)
- , nSubDelayStep(500)
- , fPrioritizeExternalSubtitles(true)
- , fDisableInternalSubtitles(true)
- , bPreferDefaultForcedSubtitles(true)
- , nJumpDistS(DEFAULT_JUMPDISTANCE_1)
- , nJumpDistM(DEFAULT_JUMPDISTANCE_2)
- , nJumpDistL(DEFAULT_JUMPDISTANCE_3)
- , bFastSeek(true)
- , eFastSeekMethod(FASTSEEK_NEAREST_KEYFRAME)
- , fShowChapters(true)
- , fLCDSupport(false)
- , iBrightness(0)
- , iContrast(0)
- , iHue(0)
- , iSaturation(0)
- , eCaptionMenuMode(MODE_SHOWCAPTIONMENU)
- , fHideNavigation(false)
- , nCS(CS_SEEKBAR | CS_TOOLBAR | CS_STATUSBAR)
- , language(LANGID(-1))
- , fEnableSubtitles(true)
- , fUseDefaultSubtitlesStyle(false)
- , iDefaultVideoSize(DVS_FROMINSIDE)
- , fKeepAspectRatio(true)
- , fCompMonDeskARDiff(false)
- , iOnTop(0)
- , bFavRememberPos(true)
- , bFavRelativeDrive(false)
- , iThumbRows(4)
- , iThumbCols(4)
- , iThumbWidth(1024)
- , bSubSaveExternalStyleFile(false)
- , bShufflePlaylistItems(false)
- , bHidePlaylistFullScreen(false)
- , nLastWindowType(SIZE_RESTORED)
- , nLastUsedPage(0)
- , fLastFullScreen(false)
- , fIntRealMedia(false)
- , fEnableEDLEditor(false)
- , bNotifySkype(false)
- , nAudioMaxNormFactor(400)
- , bAllowOverridingExternalSplitterChoice(false)
- , iAnalogCountry(1)
- , iDefaultCaptureDevice(0)
- , fExitFullScreenAtTheEnd(true)
- , fLaunchfullscreen(false)
- , fD3DFullscreen(false)
- , iDSVideoRendererType(VIDRNDT_DS_DEFAULT)
- , iRMVideoRendererType(VIDRNDT_RM_DEFAULT)
- , iQTVideoRendererType(VIDRNDT_QT_DEFAULT)
- , fClosedCaptions(false)
- , idMenuLang(0)
- , idAudioLang(0)
- , idSubtitlesLang(0)
- , nVolumeStep(5)
- , nSpeedStep(0)
- , eAfterPlayback(AfterPlayback::DO_NOTHING)
- , fUseDVDPath(false)
, rtShift(0)
, rtStart(0)
, lDVDTitle(0)
, lDVDChapter(0)
+ , iMonitor(0)
+ , fShowDebugInfo(false)
, iAdminOption(0)
, fAllowMultipleInst(false)
, fTrayIcon(false)
@@ -167,6 +73,7 @@ CAppSettings::CAppSettings()
, dZoomX(1.0)
, dZoomY(1.0)
, fAssociatedWithIcons(true)
+ , hAccel(nullptr)
, fWinLirc(false)
, fUIce(false)
, fGlobalMedia(true)
@@ -174,10 +81,13 @@ CAppSettings::CAppSettings()
, fLogoExternal(false)
, fEnableWebServer(false)
, nWebServerPort(13579)
+ , nCmdlnWebServerPort(-1)
, fWebServerUseCompression(true)
, fWebServerLocalhostOnly(false)
+ , bWebUIEnablePreview(false)
, fWebServerPrintDebugInfo(false)
, nVolume(100)
+ , fMute(false)
, nBalance(0)
, nLoops(1)
, fLoopForever(false)
@@ -187,21 +97,112 @@ CAppSettings::CAppSettings()
, fEnableWorkerThreadForOpening(true)
, fReportFailedPins(true)
, fAutoloadAudio(true)
- , fAutoloadSubtitles(true)
, fBlockVSFilter(true)
- , pSpeakerToChannelMap()
- , TraFilters()
- , SrcFilters()
+ , nVolumeStep(5)
+ , nSpeedStep(0)
+ , eAfterPlayback(AfterPlayback::DO_NOTHING)
+ , fUseDVDPath(false)
+ , idMenuLang(0)
+ , idAudioLang(0)
+ , idSubtitlesLang(0)
+ , fClosedCaptions(false)
+ , iDSVideoRendererType(VIDRNDT_DS_DEFAULT)
+ , iRMVideoRendererType(VIDRNDT_RM_DEFAULT)
+ , iQTVideoRendererType(VIDRNDT_QT_DEFAULT)
+ , fD3DFullscreen(false)
+ , fLaunchfullscreen(false)
, bHideFullscreenControls(true)
, eHideFullscreenControlsPolicy(HideFullscreenControlsPolicy::SHOW_WHEN_HOVERED)
, uHideFullscreenControlsDelay(0)
, bHideFullscreenDockedPanels(true)
- , bHideWindowedControls(false)
+ , fExitFullScreenAtTheEnd(true)
+ , iDefaultCaptureDevice(0)
+ , iAnalogCountry(1)
+ , iBDAScanFreqStart(474000)
+ , iBDAScanFreqEnd(858000)
+ , iBDABandwidth(8)
+ , fBDAUseOffset(false)
+ , iBDAOffset(166)
+ , fBDAIgnoreEncryptedChannels(false)
+ , nDVBLastChannel(INT_ERROR)
+ , nDVBRebuildFilterGraph(DVB_REBUILD_FG_WHEN_SWITCHING)
+ , nDVBStopFilterGraph(DVB_STOP_FG_WHEN_SWITCHING)
+ , SrcFilters()
+ , TraFilters()
+ , fEnableAudioSwitcher(true)
+ , fAudioNormalize(false)
+ , nAudioMaxNormFactor(400)
+ , fAudioNormalizeRecover(true)
+ , nAudioBoost(0)
+ , fDownSampleTo441(false)
+ , fAudioTimeShift(false)
+ , iAudioTimeShift(0)
+ , fCustomChannelMapping(false)
+ , nSpeakerChannels(2)
+ , pSpeakerToChannelMap()
+ , fOverridePlacement(false)
+ , nHorPos(50)
+ , nVerPos(90)
+ , bSubtitleARCompensation(true)
+ , nSubDelayStep(500)
+ , bPreferDefaultForcedSubtitles(true)
+ , fPrioritizeExternalSubtitles(true)
+ , fDisableInternalSubtitles(true)
+ , bAllowOverridingExternalSplitterChoice(false)
+ , nJumpDistS(DEFAULT_JUMPDISTANCE_1)
+ , nJumpDistM(DEFAULT_JUMPDISTANCE_2)
+ , nJumpDistL(DEFAULT_JUMPDISTANCE_3)
+ , bFastSeek(true)
+ , eFastSeekMethod(FASTSEEK_NEAREST_KEYFRAME)
+ , fShowChapters(true)
+ , bNotifySkype(false)
+ , fPreventMinimize(false)
+ , bUseEnhancedTaskBar(true)
+ , fLCDSupport(false)
+ , fUseSearchInFolder(false)
+ , fUseTimeTooltip(true)
+ , nTimeTooltipPosition(TIME_TOOLTIP_ABOVE_SEEKBAR)
+ , nOSDSize(0)
, bHideWindowedMousePointer(true)
+ , iBrightness(0)
+ , iContrast(0)
+ , iHue(0)
+ , iSaturation(0)
+ , nUpdaterAutoCheck(-1)
+ , nUpdaterDelay(7)
+ , eCaptionMenuMode(MODE_SHOWCAPTIONMENU)
+ , fHideNavigation(false)
+ , nCS(CS_SEEKBAR | CS_TOOLBAR | CS_STATUSBAR)
+ , language(LANGID(-1))
+ , fEnableSubtitles(true)
+ , fUseDefaultSubtitlesStyle(false)
+ , iDefaultVideoSize(DVS_FROMINSIDE)
+ , fKeepAspectRatio(true)
+ , fCompMonDeskARDiff(false)
+ , iOnTop(0)
+ , bFavRememberPos(true)
+ , bFavRelativeDrive(false)
+ , iThumbRows(4)
+ , iThumbCols(4)
+ , iThumbWidth(1024)
+ , bSubSaveExternalStyleFile(false)
+ , bShufflePlaylistItems(false)
+ , bHidePlaylistFullScreen(false)
+ , nLastWindowType(SIZE_RESTORED)
+ , nLastUsedPage(0)
+ , fRemainingTime(false)
+ , bHighPrecisionTimer(false)
+ , fLastFullScreen(false)
+ , fIntRealMedia(false)
+ , fEnableEDLEditor(false)
+ , hMasterWnd(nullptr)
+ , bHideWindowedControls(false)
, nJpegQuality(90)
, bEnableCoverArt(true)
, nCoverArtSizeLimit(600)
, bEnableLogging(false)
+ , iLAVGPUDevice(DWORD_MAX)
+ , eSubtitleRenderer(SubtitleRenderer::INTERNAL)
{
// Internal source filter
#if INTERNAL_SOURCEFILTER_CDDA
@@ -336,6 +337,9 @@ CAppSettings::CAppSettings()
#if INTERNAL_DECODER_AMR
TraFiltersKeys[TRA_AMR] = FilterKey(_T("TRA_AMR"), true);
#endif
+#if INTERNAL_DECODER_OPUS
+ TraFiltersKeys[TRA_OPUS] = FilterKey(_T("TRA_OPUS"), true);
+#endif
#if INTERNAL_DECODER_PCM
TraFiltersKeys[TRA_PCM] = FilterKey(_T("TRA_PCM"), true);
#endif
@@ -401,6 +405,8 @@ CAppSettings::CAppSettings()
#endif
ZeroMemory(&DVDPosition, sizeof(DVDPosition));
+
+ ENSURE(SUCCEEDED(SaneAudioRenderer::Factory::CreateSettings(&sanear)));
}
#pragma warning(pop)
@@ -548,10 +554,6 @@ void CAppSettings::CreateCommands()
wmcmds.AddTail({ID_STREAM_SUB_ONOFF, 'W', FVIRTKEY | FNOINVERT, IDS_MPLAYERC_85});
wmcmds.AddTail({ID_SUBTITLES_SUBITEM_START + 2, 0, FVIRTKEY | FNOINVERT, IDS_MPLAYERC_86});
wmcmds.AddTail({ID_FILE_ISDB_DOWNLOAD, 'D', FVIRTKEY | FNOINVERT, IDS_DOWNLOAD_SUBS});
- wmcmds.AddTail({ID_OGM_AUDIO_NEXT, 0, FVIRTKEY | FNOINVERT, IDS_MPLAYERC_87});
- wmcmds.AddTail({ID_OGM_AUDIO_PREV, 0, FVIRTKEY | FNOINVERT, IDS_MPLAYERC_88});
- wmcmds.AddTail({ID_OGM_SUB_NEXT, 0, FVIRTKEY | FNOINVERT, IDS_MPLAYERC_89});
- wmcmds.AddTail({ID_OGM_SUB_PREV, 0, FVIRTKEY | FNOINVERT, IDS_MPLAYERC_90});
wmcmds.AddTail({ID_DVD_ANGLE_NEXT, 0, FVIRTKEY | FNOINVERT, IDS_MPLAYERC_91});
wmcmds.AddTail({ID_DVD_ANGLE_PREV, 0, FVIRTKEY | FNOINVERT, IDS_MPLAYERC_92});
wmcmds.AddTail({ID_DVD_AUDIO_NEXT, 0, FVIRTKEY | FNOINVERT, IDS_MPLAYERC_93});
@@ -614,19 +616,69 @@ bool CAppSettings::IsD3DFullscreen() const
}
}
-bool CAppSettings::IsISRAvailable() const
+bool CAppSettings::IsISRAutoLoadEnabled() const
{
- return (iDSVideoRendererType == VIDRNDT_DS_VMR7RENDERLESS ||
- iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS ||
- iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
- iDSVideoRendererType == VIDRNDT_DS_DXR ||
- iDSVideoRendererType == VIDRNDT_DS_SYNC ||
- iDSVideoRendererType == VIDRNDT_DS_MADVR);
+ return eSubtitleRenderer == SubtitleRenderer::INTERNAL &&
+ IsSubtitleRendererSupported(eSubtitleRenderer, iDSVideoRendererType);
}
-bool CAppSettings::IsISRAutoLoadEnabled() const
+CAppSettings::SubtitleRenderer CAppSettings::GetSubtitleRenderer() const
{
- return fAutoloadSubtitles && IsISRAvailable();
+ if (IsSubtitleRendererSupported(SubtitleRenderer::INTERNAL, iDSVideoRendererType) ||
+ IsSubtitleRendererSupported(SubtitleRenderer::XY_SUB_FILTER, iDSVideoRendererType)) {
+ return eSubtitleRenderer;
+ }
+ return SubtitleRenderer::VS_FILTER;
+}
+
+bool CAppSettings::IsSubtitleRendererRegistered(SubtitleRenderer eSubtitleRenderer)
+{
+ switch (eSubtitleRenderer) {
+ case SubtitleRenderer::INTERNAL:
+ return true;
+ case SubtitleRenderer::VS_FILTER:
+ return IsCLSIDRegistered(CLSID_VSFilter);
+ case SubtitleRenderer::XY_SUB_FILTER:
+ return IsCLSIDRegistered(CLSID_XySubFilter);
+ default:
+ ASSERT(FALSE);
+ return false;
+ }
+}
+
+bool CAppSettings::IsSubtitleRendererSupported(SubtitleRenderer eSubtitleRenderer, int videoRenderer)
+{
+ switch (eSubtitleRenderer) {
+ case SubtitleRenderer::INTERNAL:
+ switch (videoRenderer) {
+ case VIDRNDT_DS_VMR7RENDERLESS:
+ case VIDRNDT_DS_VMR9RENDERLESS:
+ case VIDRNDT_DS_EVR_CUSTOM:
+ case VIDRNDT_DS_DXR:
+ case VIDRNDT_DS_SYNC:
+ case VIDRNDT_DS_MADVR:
+ return true;
+ }
+ break;
+
+ case SubtitleRenderer::VS_FILTER:
+ return true;
+
+ case SubtitleRenderer::XY_SUB_FILTER:
+ switch (videoRenderer) {
+ case VIDRNDT_DS_VMR9RENDERLESS:
+ case VIDRNDT_DS_EVR_CUSTOM:
+ case VIDRNDT_DS_SYNC:
+ case VIDRNDT_DS_MADVR:
+ return true;
+ }
+ break;
+
+ default:
+ ASSERT(FALSE);
+ }
+
+ return false;
}
bool CAppSettings::IsVideoRendererAvailable(int iVideoRendererType)
@@ -742,7 +794,6 @@ void CAppSettings::SaveSettings()
pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_AUDIORENDERERTYPE, CString(strAudioRendererDisplayName));
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_AUTOLOADAUDIO, fAutoloadAudio);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_AUTOLOADSUBTITLES, fAutoloadSubtitles);
pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_SUBTITLESLANGORDER, CString(strSubtitlesLanguageOrder));
pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_AUDIOSLANGORDER, CString(strAudiosLanguageOrder));
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_BLOCKVSFILTER, fBlockVSFilter);
@@ -786,7 +837,7 @@ void CAppSettings::SaveSettings()
pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_FULLSCREENMONITOR, CString(strFullScreenMonitor));
// Prevent Minimize when in Fullscreen mode on non default monitor
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_PREVENT_MINIMIZE, fPreventMinimize);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_WIN7TASKBAR, fUseWin7TaskBar);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ENHANCED_TASKBAR, bUseEnhancedTaskBar);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SEARCH_IN_FOLDER, fUseSearchInFolder);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_USE_TIME_TOOLTIP, fUseTimeTooltip);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_TIME_TOOLTIP_POSITION, nTimeTooltipPosition);
@@ -920,9 +971,10 @@ void CAppSettings::SaveSettings()
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEWEBSERVER, fEnableWebServer);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERPORT, nWebServerPort);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERPRINTDEBUGINFO, fWebServerPrintDebugInfo);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERUSECOMPRESSION, fWebServerUseCompression);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERLOCALHOSTONLY, fWebServerLocalhostOnly);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_WEBUI_ENABLE_PREVIEW, bWebUIEnablePreview);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERPRINTDEBUGINFO, fWebServerPrintDebugInfo);
pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_WEBROOT, strWebRoot);
pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_WEBDEFINDEX, strWebDefIndex);
pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_WEBSERVERCGI, strWebServerCGI);
@@ -978,6 +1030,33 @@ void CAppSettings::SaveSettings()
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_LOGGING, bEnableLogging);
+ VERIFY(pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SUBTITLE_RENDERER,
+ static_cast<int>(eSubtitleRenderer)));
+
+ {
+ CComHeapPtr<WCHAR> pDeviceId;
+ BOOL bExclusive;
+ UINT32 uBufferDuration;
+ if (SUCCEEDED(sanear->GetOuputDevice(&pDeviceId, &bExclusive, &uBufferDuration))) {
+ pApp->WriteProfileString(IDS_R_SANEAR, IDS_RS_SANEAR_DEVICE_ID, pDeviceId);
+ pApp->WriteProfileInt(IDS_R_SANEAR, IDS_RS_SANEAR_DEVICE_EXCLUSIVE, bExclusive);
+ pApp->WriteProfileInt(IDS_R_SANEAR, IDS_RS_SANEAR_DEVICE_BUFFER, uBufferDuration);
+ }
+
+ BOOL bAllowBitstreaming;
+ sanear->GetAllowBitstreaming(&bAllowBitstreaming);
+ pApp->WriteProfileInt(IDS_R_SANEAR, IDS_RS_SANEAR_ALLOW_BITSTREAMING, bAllowBitstreaming);
+
+ BOOL bCrossfeedEnabled;
+ sanear->GetCrossfeedEnabled(&bCrossfeedEnabled);
+ pApp->WriteProfileInt(IDS_R_SANEAR, IDS_RS_SANEAR_CROSSFEED_ENABLED, bCrossfeedEnabled);
+
+ UINT32 uCutoffFrequency, uCrossfeedLevel;
+ sanear->GetCrossfeedSettings(&uCutoffFrequency, &uCrossfeedLevel);
+ pApp->WriteProfileInt(IDS_R_SANEAR, IDS_RS_SANEAR_CROSSFEED_CUTOFF_FREQ, uCutoffFrequency);
+ pApp->WriteProfileInt(IDS_R_SANEAR, IDS_RS_SANEAR_CROSSFEED_LEVEL, uCrossfeedLevel);
+ }
+
pApp->FlushProfile();
}
@@ -1208,13 +1287,9 @@ void CAppSettings::LoadSettings()
language = 0;
}
}
-#ifndef DEBUG
- if (language) {
- auto pCrashReporterUIThread = CCrashReporterUIThread::GetInstance();
- pCrashReporterUIThread->WaitThreadReady();
- pCrashReporterUIThread->GetCrashDialog().LoadTranslatableResources();
+ if (language && CrashReporter::IsEnabled()) {
+ CrashReporter::Enable(Translations::GetLanguageResourceByLocaleID(language).dllPath);
}
-#endif
CreateCommands();
@@ -1241,7 +1316,6 @@ void CAppSettings::LoadSettings()
strAudioRendererDisplayName = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_AUDIORENDERERTYPE);
fAutoloadAudio = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUTOLOADAUDIO, TRUE);
- fAutoloadSubtitles = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUTOLOADSUBTITLES, TRUE);
strSubtitlesLanguageOrder = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_SUBTITLESLANGORDER);
strAudiosLanguageOrder = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_AUDIOSLANGORDER);
fBlockVSFilter = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_BLOCKVSFILTER, TRUE);
@@ -1269,7 +1343,7 @@ void CAppSettings::LoadSettings()
strFullScreenMonitor = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_FULLSCREENMONITOR);
// Prevent Minimize when in fullscreen mode on non default monitor
fPreventMinimize = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_PREVENT_MINIMIZE, FALSE);
- fUseWin7TaskBar = SysVersion::Is7OrLater() ? !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_WIN7TASKBAR, TRUE) : FALSE;
+ bUseEnhancedTaskBar = SysVersion::Is7OrLater() ? !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ENHANCED_TASKBAR, TRUE) : FALSE;
fUseSearchInFolder = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SEARCH_IN_FOLDER, TRUE);
fUseTimeTooltip = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_USE_TIME_TOOLTIP, TRUE);
nTimeTooltipPosition = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_TIME_TOOLTIP_POSITION, TIME_TOOLTIP_ABOVE_SEEKBAR);
@@ -1543,9 +1617,10 @@ void CAppSettings::LoadSettings()
fEnableWebServer = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEWEBSERVER, FALSE);
nWebServerPort = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERPORT, 13579);
- fWebServerPrintDebugInfo = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERPRINTDEBUGINFO, FALSE);
fWebServerUseCompression = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERUSECOMPRESSION, TRUE);
fWebServerLocalhostOnly = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERLOCALHOSTONLY, FALSE);
+ bWebUIEnablePreview = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_WEBUI_ENABLE_PREVIEW, FALSE);
+ fWebServerPrintDebugInfo = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERPRINTDEBUGINFO, FALSE);
strWebRoot = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_WEBROOT, _T("*./webroot"));
strWebDefIndex = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_WEBDEFINDEX, _T("index.html;index.php"));
strWebServerCGI = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_WEBSERVERCGI);
@@ -1557,9 +1632,9 @@ void CAppSettings::LoadSettings()
// if (!SHGetSpecialFolderPath(nullptr, MyPictures.GetBufferSetLength(MAX_PATH), CSIDL_MYPICTURES, TRUE)) MyPictures.Empty();
// else MyPictures.ReleaseBuffer();
if (ERROR_SUCCESS == key.Open(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"), KEY_READ)) {
- ULONG len = MAX_PATH;
- if (ERROR_SUCCESS == key.QueryStringValue(_T("My Pictures"), MyPictures.GetBuffer(MAX_PATH), &len)) {
- MyPictures.ReleaseBufferSetLength(len);
+ ULONG lenValue = MAX_PATH;
+ if (ERROR_SUCCESS == key.QueryStringValue(_T("My Pictures"), MyPictures.GetBuffer(MAX_PATH), &lenValue)) {
+ MyPictures.ReleaseBufferSetLength(lenValue);
} else {
MyPictures.Empty();
}
@@ -1691,10 +1766,27 @@ void CAppSettings::LoadSettings()
bEnableLogging = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_LOGGING, FALSE);
+ eSubtitleRenderer = static_cast<SubtitleRenderer>(pApp->GetProfileInt(IDS_R_SETTINGS,
+ IDS_RS_SUBTITLE_RENDERER, static_cast<int>(SubtitleRenderer::INTERNAL)));
+
if (fLaunchfullscreen) {
nCLSwitches |= CLSW_FULLSCREEN;
}
+ sanear->SetOuputDevice(pApp->GetProfileString(IDS_R_SANEAR, IDS_RS_SANEAR_DEVICE_ID),
+ pApp->GetProfileInt(IDS_R_SANEAR, IDS_RS_SANEAR_DEVICE_EXCLUSIVE, FALSE),
+ pApp->GetProfileInt(IDS_R_SANEAR, IDS_RS_SANEAR_DEVICE_BUFFER,
+ SaneAudioRenderer::ISettings::OUTPUT_DEVICE_BUFFER_DEFAULT_MS));
+
+ sanear->SetAllowBitstreaming(pApp->GetProfileInt(IDS_R_SANEAR, IDS_RS_SANEAR_ALLOW_BITSTREAMING, TRUE));
+
+ sanear->SetCrossfeedEnabled(pApp->GetProfileInt(IDS_R_SANEAR, IDS_RS_SANEAR_CROSSFEED_ENABLED, FALSE));
+
+ sanear->SetCrossfeedSettings(pApp->GetProfileInt(IDS_R_SANEAR, IDS_RS_SANEAR_CROSSFEED_CUTOFF_FREQ,
+ SaneAudioRenderer::ISettings::CROSSFEED_CUTOFF_FREQ_CMOY),
+ pApp->GetProfileInt(IDS_R_SANEAR, IDS_RS_SANEAR_CROSSFEED_LEVEL,
+ SaneAudioRenderer::ISettings::CROSSFEED_LEVEL_CMOY));
+
bInitialized = true;
}
@@ -2041,6 +2133,8 @@ void CAppSettings::ParseCommandLine(CAtlList<CString>& cmdln)
nCLSwitches |= CLSW_MONITOROFF;
} else if (sw == _T("playnext")) {
nCLSwitches |= CLSW_PLAYNEXT;
+ } else if (sw == _T("hwgpu")) {
+ iLAVGPUDevice = _tcstol(cmdln.GetNext(pos), nullptr, 10);
} else {
nCLSwitches |= CLSW_HELP | CLSW_UNRECOGNIZEDSWITCH;
}
@@ -2240,18 +2334,18 @@ void CAppSettings::UpdateSettings()
// so that all incremental updates are applied.
switch (version) {
case 0: {
- UINT nAudioBoost = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOBOOST, -1);
- if (nAudioBoost == UINT(-1)) {
+ UINT nAudioBoostTmp = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOBOOST, -1);
+ if (nAudioBoostTmp == UINT(-1)) {
double dAudioBoost_dB = _tstof(pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_AUDIOBOOST, _T("0")));
if (dAudioBoost_dB < 0 || dAudioBoost_dB > 10) {
dAudioBoost_dB = 0;
}
- nAudioBoost = UINT(100 * pow(10.0, dAudioBoost_dB / 20.0) + 0.5) - 100;
+ nAudioBoostTmp = UINT(100 * pow(10.0, dAudioBoost_dB / 20.0) + 0.5) - 100;
}
- if (nAudioBoost > 300) { // Max boost is 300%
- nAudioBoost = 300;
+ if (nAudioBoostTmp > 300) { // Max boost is 300%
+ nAudioBoostTmp = 300;
}
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOBOOST, nAudioBoost);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOBOOST, nAudioBoostTmp);
ConvertOldExternalFiltersList();
}
@@ -2413,6 +2507,23 @@ void CAppSettings::UpdateSettings()
copyInt(IDS_R_INTERNAL_FILTERS, _T("SRC_DTSAC3"), IDS_R_INTERNAL_FILTERS, _T("SRC_DTS"));
copyInt(IDS_R_INTERNAL_FILTERS, _T("SRC_DTSAC3"), IDS_R_INTERNAL_FILTERS, _T("SRC_AC3"));
// no break
+ case 6: {
+ SubtitleRenderer subrenderer = SubtitleRenderer::INTERNAL;
+ if (!pApp->GetProfileInt(IDS_R_SETTINGS, _T("AutoloadSubtitles"), TRUE)) {
+ if (IsSubtitleRendererRegistered(SubtitleRenderer::VS_FILTER)) {
+ subrenderer = SubtitleRenderer::VS_FILTER;
+ }
+ if (IsSubtitleRendererRegistered(SubtitleRenderer::XY_SUB_FILTER)) {
+ int renderer = SysVersion::IsVistaOrLater() ? (IsVideoRendererAvailable(VIDRNDT_DS_EVR_CUSTOM) ? VIDRNDT_DS_EVR_CUSTOM : VIDRNDT_DS_VMR9RENDERLESS) : VIDRNDT_DS_VMR7RENDERLESS;
+ renderer = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_DSVIDEORENDERERTYPE, renderer);
+ if (IsSubtitleRendererSupported(SubtitleRenderer::XY_SUB_FILTER, renderer)) {
+ subrenderer = SubtitleRenderer::XY_SUB_FILTER;
+ }
+ }
+ }
+ VERIFY(pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SUBTITLE_RENDERER, static_cast<int>(subrenderer)));
+ }
+ // no break
default:
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_R_VERSION, APPSETTINGS_VERSION);
}
diff --git a/src/mpc-hc/AppSettings.h b/src/mpc-hc/AppSettings.h
index 70184f9b3..0b4f1012a 100644
--- a/src/mpc-hc/AppSettings.h
+++ b/src/mpc-hc/AppSettings.h
@@ -32,6 +32,7 @@
#include "Shaders.h"
#include "FileAssoc.h"
#include "FakeFilterMapper2.h"
+#include "../thirdparty/sanear/sanear/src/Interfaces.h"
#include <afxadv.h>
#include <afxsock.h>
@@ -139,7 +140,7 @@ enum MCE_RAW_INPUT {
#define AUDRNDT_NULL_COMP _T("Null Audio Renderer (Any)")
#define AUDRNDT_NULL_UNCOMP _T("Null Audio Renderer (Uncompressed)")
-#define AUDRNDT_MPC _T("MPC-HC Audio Renderer")
+#define AUDRNDT_INTERNAL _T("Internal Audio Renderer")
#define DEFAULT_SUBTITLE_PATHS _T(".;.\\subtitles;.\\subs")
#define DEFAULT_JUMPDISTANCE_1 1000
@@ -368,7 +369,7 @@ public:
CUIceClient();
};
-#define APPSETTINGS_VERSION 6
+#define APPSETTINGS_VERSION 7
class CAppSettings
{
@@ -465,6 +466,7 @@ public:
int nCmdlnWebServerPort;
bool fWebServerUseCompression;
bool fWebServerLocalhostOnly;
+ bool bWebUIEnablePreview;
bool fWebServerPrintDebugInfo;
CString strWebRoot, strWebDefIndex;
CString strWebServerCGI;
@@ -483,7 +485,6 @@ public:
bool fEnableWorkerThreadForOpening;
bool fReportFailedPins;
bool fAutoloadAudio;
- bool fAutoloadSubtitles;
bool fBlockVSFilter;
UINT nVolumeStep;
UINT nSpeedStep;
@@ -594,7 +595,7 @@ public:
bool fShowChapters;
bool bNotifySkype;
bool fPreventMinimize;
- bool fUseWin7TaskBar;
+ bool bUseEnhancedTaskBar;
bool fLCDSupport;
bool fUseSearchInFolder;
bool fUseTimeTooltip;
@@ -674,12 +675,28 @@ public:
bool IsD3DFullscreen() const;
CString SelectedAudioRenderer() const;
bool IsISRAutoLoadEnabled() const;
- bool IsISRAvailable() const;
bool IsInitialized() const;
static bool IsVideoRendererAvailable(int iVideoRendererType);
CFileAssoc fileAssoc;
+ CComPtr<SaneAudioRenderer::ISettings> sanear;
+
+ DWORD iLAVGPUDevice;
+
+ enum class SubtitleRenderer {
+ INTERNAL,
+ VS_FILTER,
+ XY_SUB_FILTER,
+ };
+
+ SubtitleRenderer GetSubtitleRenderer() const;
+ void SetSubtitleRenderer(SubtitleRenderer renderer) { eSubtitleRenderer = renderer; }
+
+ static bool IsSubtitleRendererRegistered(SubtitleRenderer eSubtitleRenderer);
+
+ static bool IsSubtitleRendererSupported(SubtitleRenderer eSubtitleRenderer, int videoRenderer);
+
private:
struct FilterKey {
CString name;
@@ -713,6 +730,8 @@ private:
void UpdateRenderersData(bool fSave);
friend void CRenderersSettings::UpdateData(bool bSave);
+ SubtitleRenderer eSubtitleRenderer;
+
public:
CAppSettings();
CAppSettings(const CAppSettings&) = delete;
diff --git a/src/mpc-hc/CrashReporter.cpp b/src/mpc-hc/CrashReporter.cpp
index e4b62e1fd..322c39e74 100644
--- a/src/mpc-hc/CrashReporter.cpp
+++ b/src/mpc-hc/CrashReporter.cpp
@@ -22,10 +22,11 @@
#include "CrashReporter.h"
#ifndef _DEBUG
#include <DbgHelp.h>
-#include "CrashReporterDialog.h"
#include "VersionInfo.h"
#include "mpc-hc_config.h"
#include "DoctorDump/CrashRpt.h"
+#include "mplayerc.h"
+#include "translations.h"
using namespace crash_rpt;
@@ -41,10 +42,10 @@ namespace CrashReporter
}
#endif
-void CrashReporter::Enable()
+void CrashReporter::Enable(LPCTSTR langDll /*= nullptr*/)
{
#ifndef _DEBUG
- static crash_rpt::ApplicationInfo appInfo = {
+ crash_rpt::ApplicationInfo appInfo = {
sizeof(appInfo),
"31c48823-ce52-401b-8425-888388161757",
"mpc-hc",
@@ -76,7 +77,15 @@ void CrashReporter::Enable()
MiniDumpIgnoreInaccessibleMemory
);
- static crash_rpt::HandlerSettings handlerSettings = {
+ crash_rpt::custom_data_collection::Settings dataCollectionSettings = {
+ sizeof(dataCollectionSettings),
+ _T("CrashReporter\\CrashReporterDialog.dll"), // Path of the DLL
+ "CreateCrashDialog", // Function name
+ (LPBYTE)langDll, // No user-defined data
+ langDll ? DWORD(_tcslen(langDll) + 1)* sizeof(TCHAR) : 0 // Size of user-defined data
+ };
+
+ crash_rpt::HandlerSettings handlerSettings = {
sizeof(handlerSettings),
FALSE, // Don't keep the dumps
FALSE, // Don't open the problem page in the browser
@@ -89,59 +98,35 @@ void CrashReporter::Enable()
nullptr, // Default path for SendRpt
nullptr, // Default path for DbgHelp
CrashProcessingCallback, // Callback function
- nullptr // No user defined parameter for the callback function
+ nullptr, // No user defined parameter for the callback function
+ &dataCollectionSettings // Use our custom dialog
};
- if (!g_crashReporter.IsCrashHandlingEnabled()) {
- g_bEnabled = g_crashReporter.InitCrashRpt(&appInfo, &handlerSettings);
- // Ensure the crash reporter UI thread is running
- VERIFY(CCrashReporterUIThread::GetInstance() != nullptr);
- } else {
- g_bEnabled = true;
- }
+ g_bEnabled = g_crashReporter.InitCrashRpt(&appInfo, &handlerSettings);
#endif
-};
+}
void CrashReporter::Disable()
{
#ifndef _DEBUG
g_bEnabled = false;
#endif
-};
+}
+
+bool CrashReporter::IsEnabled()
+{
+#ifndef _DEBUG
+ return g_bEnabled;
+#else
+ return false;
+#endif
+}
#ifndef _DEBUG
CrashProcessingCallbackResult CALLBACK CrashReporter::CrashProcessingCallback(CrashProcessingCallbackStage stage,
ExceptionInfo* pExceptionInfo,
LPVOID pUserData)
{
- if (!g_bEnabled) {
- return SkipSendReportReturnDefaultResult;
- }
-
- // All variables are allocated statically to reduce allocations after crashing
- if (stage == BeforeSendReport) {
- // We need to make sure the message pump is ready
- static CCrashReporterUIThread* pCrashReporterUIThread = CCrashReporterUIThread::GetInstance();
- pCrashReporterUIThread->WaitThreadReady();
- // before actually showing the dialog
- static CCrashReporterDialog& crashDlg = pCrashReporterUIThread->GetCrashDialog();
- crashDlg.ShowWindow(SW_SHOWNORMAL);
- crashDlg.SetWindowPos(&CWnd::wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
- crashDlg.SetForegroundWindow();
-
- static CString email, description;
- if (crashDlg.WaitForUserInput(email, description)) {
- if (!email.IsEmpty()) {
- g_crashReporter.AddUserInfoToReport(L"email", email);
- }
- if (!description.IsEmpty()) {
- g_crashReporter.AddUserInfoToReport(L"description", description);
- }
- }
- crashDlg.SignalDataRead();
- WaitForSingleObject(CCrashReporterUIThread::GetInstance()->m_hThread, INFINITE);
- }
-
- return DoDefaultActions;
-};
+ return g_bEnabled ? DoDefaultActions : SkipSendReportReturnDefaultResult;
+}
#endif
diff --git a/src/mpc-hc/CrashReporter.h b/src/mpc-hc/CrashReporter.h
index ed54b9720..796a07fb5 100644
--- a/src/mpc-hc/CrashReporter.h
+++ b/src/mpc-hc/CrashReporter.h
@@ -22,6 +22,7 @@
namespace CrashReporter
{
- void Enable();
+ void Enable(LPCTSTR langDll = nullptr);
void Disable();
+ bool IsEnabled();
};
diff --git a/src/mpc-hc/CrashReporterDialog.cpp b/src/mpc-hc/CrashReporterDialog.cpp
deleted file mode 100644
index bba5c2626..000000000
--- a/src/mpc-hc/CrashReporterDialog.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * (C) 2015 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "stdafx.h"
-#include "CrashReporterDialog.h"
-#include "resource.h"
-#include "mplayerc.h"
-#include "DSUtil.h"
-
-CCrashReporterDialog::CCrashReporterDialog()
- : CDialog()
-{
- // Listen for language changes
- EventRouter::EventSelection receives;
- receives.insert(MpcEvent::CHANGING_UI_LANGUAGE);
- GetEventd().Connect(m_eventc, receives, std::bind(&CCrashReporterDialog::EventCallback, this, std::placeholders::_1));
-}
-
-BOOL CCrashReporterDialog::Create()
-{
- // Try to preallocate memory for the result strings
- m_email.Preallocate(128);
- m_description.Preallocate(4096);
-
- BOOL res = __super::Create(IDD, CWnd::GetDesktopWindow());
-
- // Because we set LR_SHARED, there is no need to explicitly destroy the icon
- VERIFY(SetIcon((HICON)LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_MAINFRAME), IMAGE_ICON, 48, 48, LR_SHARED), true) == nullptr);
-
- return res;
-}
-
-BOOL CCrashReporterDialog::OnInitDialog()
-{
- __super::OnInitDialog();
- return FALSE; // return FALSE so that the dialog does not steal focus
-}
-
-void CCrashReporterDialog::LoadTranslatableResources()
-{
- // Load the template in a temporary dialog and get the strings from there.
- // We don't use MFC to avoid side effects caused by creating another dialog.
- HWND hDlg = ::CreateDialog(AfxGetResourceHandle(), MAKEINTRESOURCE(IDD), nullptr, nullptr);
- if (hDlg) {
- auto setTextFromDlg = [&](int nID) {
- CWnd* pItem = CWnd::FromHandle(::GetDlgItem(hDlg, nID));
- if (pItem && IsWindow(pItem->m_hWnd)) {
- CString text;
- pItem->GetWindowText(text);
- if (!text.IsEmpty()) {
- GetDlgItem(nID)->SetWindowText(text);
- }
- }
- };
-
- setTextFromDlg(IDC_STATIC1);
- setTextFromDlg(IDC_STATIC2);
- setTextFromDlg(IDC_STATIC3);
- setTextFromDlg(IDC_STATIC4);
- setTextFromDlg(IDOK);
-
- ::DestroyWindow(hDlg);
- }
-}
-
-void CCrashReporterDialog::EventCallback(MpcEvent ev)
-{
- switch (ev) {
- case MpcEvent::CHANGING_UI_LANGUAGE:
- LoadTranslatableResources();
- break;
- default:
- ASSERT(FALSE);
- }
-}
-
-bool CCrashReporterDialog::WaitForUserInput(CString& email, CString& description)
-{
- m_eventDataAvailable.Wait();
-
- if (m_bHasData) {
- email = m_email;
- description = m_description;
- }
-
- return m_bHasData;
-}
-
-void CCrashReporterDialog::OnQuit()
-{
- if (m_bHasData) {
- GetDlgItem(IDC_EDIT1)->GetWindowText(m_email);
- GetDlgItem(IDC_EDIT2)->GetWindowText(m_description);
- }
- m_eventDataAvailable.Set();
- m_eventDataRead.Wait();
- DestroyWindow();
-}
-
-BEGIN_MESSAGE_MAP(CCrashReporterDialog, CDialog)
-END_MESSAGE_MAP()
-
-IMPLEMENT_DYNCREATE(CCrashReporterUIThread, CWinThread)
-
-CCrashReporterUIThread::CCrashReporterUIThread()
- : CWinThread()
- , m_bThreadReady(false)
- , m_eventThreadReady(TRUE)
-{}
-
-BOOL CCrashReporterUIThread::InitInstance()
-{
- __super::InitInstance();
-
- SetThreadName(DWORD(-1), "Crash Reporter UI Thread");
-
- m_dlg.Create();
- m_pMainWnd = &m_dlg;
- return TRUE;
-}
-
-int CCrashReporterUIThread::ExitInstance()
-{
- m_dlg.DestroyWindow();
- return __super::ExitInstance();
-}
-
-BOOL CCrashReporterUIThread::OnIdle(LONG lCount)
-{
- if (!m_bThreadReady) {
- m_bThreadReady = true;
- m_eventThreadReady.Set();
- }
- return __super::OnIdle(lCount);
-}
-
-BEGIN_MESSAGE_MAP(CCrashReporterUIThread, CWinThread)
-END_MESSAGE_MAP()
diff --git a/src/mpc-hc/CrashReporterDialog.h b/src/mpc-hc/CrashReporterDialog.h
deleted file mode 100644
index ff7638872..000000000
--- a/src/mpc-hc/CrashReporterDialog.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * (C) 2015 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#pragma once
-
-#include <afxwin.h>
-#include "BaseClasses/wxutil.h"
-#include "resource.h"
-
-class CCrashReporterDialog : public CDialog
-{
-private:
- CAMEvent m_eventDataAvailable, m_eventDataRead;
- bool m_bHasData = false;
- CString m_email, m_description;
-
- EventClient m_eventc;
-
-public:
- CCrashReporterDialog();
-
- BOOL Create();
- BOOL OnInitDialog() override;
- void LoadTranslatableResources();
-
- bool WaitForUserInput(CString& email, CString& description);
- void SignalDataRead() { m_eventDataRead.Set(); };
-
- // Dialog Data
- enum { IDD = IDD_CRASH_REPORTER };
-
-protected:
- DECLARE_MESSAGE_MAP()
-
- virtual void OnOK() { m_bHasData = true; OnQuit(); };
- virtual void OnCancel() { m_bHasData = false; OnQuit(); };
-
-private:
- void EventCallback(MpcEvent ev);
- void OnQuit();
-};
-
-class CCrashReporterUIThread : public CWinThread
-{
-private:
- CAMEvent m_eventThreadReady;
- bool m_bThreadReady;
- CCrashReporterDialog m_dlg;
-
- DECLARE_DYNCREATE(CCrashReporterUIThread)
-
-protected:
- CCrashReporterUIThread();
-
-public:
- static CCrashReporterUIThread* GetInstance() {
- static CCrashReporterUIThread* pUIThread = (CCrashReporterUIThread*)AfxBeginThread(RUNTIME_CLASS(CCrashReporterUIThread));
- return pUIThread;
- };
-
- virtual BOOL InitInstance();
- virtual int ExitInstance();
-
- virtual BOOL OnIdle(LONG lCount);
-
- void WaitThreadReady() { m_eventThreadReady.Wait(); };
-
- CCrashReporterDialog& GetCrashDialog() { return m_dlg; };
-
- DECLARE_MESSAGE_MAP()
-};
diff --git a/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.cpp b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.cpp
new file mode 100644
index 000000000..8f38f28f8
--- /dev/null
+++ b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.cpp
@@ -0,0 +1,186 @@
+/*
+* (C) 2015 see Authors.txt
+*
+* This file is part of MPC-HC.
+*
+* MPC-HC 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.
+*
+* MPC-HC is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+#include "CrashReporterDialog.h"
+
+#include "DoctorDump/CrashRpt.h"
+#include "../resource.h"
+#include <Psapi.h>
+#include <sstream>
+
+
+using namespace crash_rpt::custom_data_collection;
+
+Result CALLBACK CreateCrashDialog(const ExceptionInfo& exceptionInfo, IDataBag* dataBag)
+{
+ Result res = Result::CancelUpload;
+
+ TCHAR exePath[MAX_PATH];
+ if (!GetModuleFileNameEx(exceptionInfo.Process, nullptr, exePath, _countof(exePath))) {
+#ifdef _WIN64
+ _tcscpy_s(exePath, _T("..\\mpc-hc64.exe"));
+#else
+ _tcscpy_s(exePath, _T("..\\mpc-hc.exe"));
+#endif
+ }
+
+ CCrashReporterDialog dlg(exePath, (LPCTSTR)exceptionInfo.UserData);
+
+ if (dlg.DoModal() != IDCANCEL && dlg.GetSendCrashReport()) {
+ res = Result::DoUpload;
+ if (LPCTSTR email = dlg.GetEmail()) {
+ dataBag->AddUserInfoToReport(L"email", email);
+ }
+ if (LPCTSTR description = dlg.GetDescription()) {
+ dataBag->AddUserInfoToReport(L"description", description);
+ }
+ }
+
+ return res;
+}
+
+CCrashReporterDialog::CCrashReporterDialog(LPCTSTR exePath, LPCTSTR langDll /*= nullptr*/)
+ : m_exePath(exePath)
+{
+ m_hModuleExe = LoadLibrary(exePath);
+
+ if (langDll) {
+ std::wostringstream langDllPath;
+ langDllPath << _T("..\\") << langDll;
+ m_hModuleRes = LoadLibrary(langDllPath.str().c_str());
+ }
+}
+
+CCrashReporterDialog::~CCrashReporterDialog()
+{
+ FreeLibrary(m_hModuleExe);
+ FreeLibrary(m_hModuleRes);
+}
+
+INT_PTR CCrashReporterDialog::DoModal()
+{
+ return DialogBoxParam(m_hModuleRes ? m_hModuleRes : m_hModuleExe, MAKEINTRESOURCE(IDD_CRASH_REPORTER),
+ GetDesktopWindow(), DialogProc, (LPARAM)this);
+}
+
+INT_PTR CALLBACK CCrashReporterDialog::DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ INT_PTR res = FALSE;
+
+ switch (uMsg) {
+ case WM_INITDIALOG: {
+ // Attach the window handle to the object
+ CCrashReporterDialog* dlg = (CCrashReporterDialog*)lParam;
+ dlg->m_hWnd = hwndDlg;
+ SetWindowLongPtr(hwndDlg, DWLP_USER, lParam);
+ dlg->OnInitDialog();
+ res = TRUE;
+ }
+ break;
+ case WM_COMMAND: {
+ CCrashReporterDialog* dlg = (CCrashReporterDialog*)GetWindowLongPtr(hwndDlg, DWLP_USER);
+
+ switch (LOWORD(wParam)) {
+ case IDC_CHECK1:
+ if (HIWORD(wParam) == BN_CLICKED) {
+ dlg->OnCheckBoxClicked();
+ }
+ break;
+ case IDC_BUTTON1: // Restart
+ ShellExecute(nullptr, _T("open"), dlg->m_exePath.c_str(), nullptr, nullptr, SW_SHOWNORMAL);
+ // No break
+ case IDC_BUTTON2: // Quit
+ dlg->OnOK();
+ // No break
+ case IDCANCEL: // Escape
+ EndDialog(hwndDlg, wParam);
+ res = TRUE;
+ break;
+ }
+ }
+ break;
+ }
+
+ return res;
+}
+
+void CCrashReporterDialog::OnInitDialog()
+{
+ // Set the icon
+ HICON hIcon = (HICON)LoadImage(m_hModuleExe, MAKEINTRESOURCE(IDR_MAINFRAME), IMAGE_ICON,
+ GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED);
+ if (hIcon) { // Since LR_SHARED is used, there is no need to explicitly destroy the icon
+ SendMessage(m_hWnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
+ }
+
+ // Center the dialog window
+ RECT rcDlg;
+ GetWindowRect(m_hWnd, &rcDlg);
+ MONITORINFO monitorInfo;
+ monitorInfo.cbSize = sizeof(monitorInfo);
+ GetMonitorInfo(MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONEAREST), &monitorInfo);
+ SIZE offset;
+ offset.cx = ((monitorInfo.rcWork.right - monitorInfo.rcWork.left) - (rcDlg.right - rcDlg.left)) / 2;
+ offset.cy = ((monitorInfo.rcWork.bottom - monitorInfo.rcWork.top) - (rcDlg.bottom - rcDlg.top)) / 2;
+ SetWindowPos(m_hWnd, nullptr,
+ monitorInfo.rcWork.left + offset.cx, monitorInfo.rcWork.top + offset.cy,
+ 0, 0,
+ SWP_NOSIZE | SWP_NOZORDER);
+
+ // Check "send a bug report" by default
+ SendDlgItemMessage(m_hWnd, IDC_CHECK1, BM_SETCHECK, BST_CHECKED, 0);
+}
+
+void CCrashReporterDialog::OnOK()
+{
+ auto getText = [this](int nID, std::vector<TCHAR>& str) {
+ HWND hwndField = GetDlgItem(m_hWnd, nID);
+ if (hwndField) {
+ int nLenght = GetWindowTextLength(hwndField);
+ if (nLenght > 0) {
+ nLenght++; // Account for the null char
+ str.resize(nLenght);
+ if (!GetWindowText(hwndField, str.data(), nLenght)) {
+ str[0] = _T('\0');
+ }
+ }
+ }
+ return str;
+ };
+
+ m_bSendCrashReport = (SendDlgItemMessage(m_hWnd, IDC_CHECK1, BM_GETCHECK, 0, 0) == BST_CHECKED);
+ getText(IDC_EDIT1, m_email);
+ getText(IDC_EDIT2, m_description);
+}
+
+void CCrashReporterDialog::OnCheckBoxClicked()
+{
+ auto enableDlgItem = [this](int nID, bool bEnable) {
+ EnableWindow(GetDlgItem(m_hWnd, nID), bEnable);
+ };
+
+ bool bEnable = (SendDlgItemMessage(m_hWnd, IDC_CHECK1, BM_GETCHECK, 0, 0) == BST_CHECKED);
+ enableDlgItem(IDC_STATIC1, bEnable);
+ enableDlgItem(IDC_STATIC2, bEnable);
+ enableDlgItem(IDC_EDIT1, bEnable);
+ enableDlgItem(IDC_STATIC3, bEnable);
+ enableDlgItem(IDC_STATIC4, bEnable);
+ enableDlgItem(IDC_EDIT2, bEnable);
+}
diff --git a/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.def b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.def
new file mode 100644
index 000000000..dfba52c86
--- /dev/null
+++ b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.def
@@ -0,0 +1,3 @@
+LIBRARY "CrashReporterDialog"
+EXPORTS
+ CreateCrashDialog
diff --git a/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.h b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.h
new file mode 100644
index 000000000..0c7c7f103
--- /dev/null
+++ b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.h
@@ -0,0 +1,53 @@
+/*
+* (C) 2015 see Authors.txt
+*
+* This file is part of MPC-HC.
+*
+* MPC-HC 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.
+*
+* MPC-HC is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+#include <Windows.h>
+#include <tchar.h>
+#include <string>
+#include <vector>
+
+
+class CCrashReporterDialog
+{
+private:
+ HWND m_hWnd = nullptr;
+ std::wstring m_exePath;
+ HMODULE m_hModuleExe = nullptr;
+ HMODULE m_hModuleRes = nullptr;
+ bool m_bSendCrashReport = true;
+ std::vector<TCHAR> m_email;
+ std::vector<TCHAR> m_description;
+
+ static INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+ void OnInitDialog();
+ void OnOK();
+ void OnCheckBoxClicked();
+
+public:
+ CCrashReporterDialog(LPCTSTR exePath, LPCTSTR langDll = nullptr);
+ ~CCrashReporterDialog();
+
+ INT_PTR DoModal();
+
+ bool GetSendCrashReport() const { return m_bSendCrashReport; };
+ LPCTSTR GetEmail() const { return m_email.data(); };
+ LPCTSTR GetDescription() const { return m_description.data(); };
+};
diff --git a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.rc b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.rc
index 78030895a..0d54f566b 100644
--- a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.rc
+++ b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.rc
@@ -1,110 +1,103 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-#include "version.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (United States) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-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\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION MPC_VERSION_NUM
- PRODUCTVERSION MPC_VERSION_NUM
- FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-#ifdef _DEBUG
- FILEFLAGS VS_FF_DEBUG
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS VOS_NT_WINDOWS32
- FILETYPE VFT_DLL
- FILESUBTYPE VFT2_UNKNOWN
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "Comments", MPC_VERSION_COMMENTS
- VALUE "CompanyName", MPC_COMP_NAME_STR
- VALUE "FileDescription", "Audio Renderer, based on SoundTouch"
- VALUE "FileVersion", MPC_VERSION_STR_FULL
- VALUE "InternalName", "MpcAudioRenderer Filter"
- VALUE "LegalCopyright", MPC_COPYRIGHT_STR
- VALUE "OriginalFilename", "MpcAudioRenderer.ax"
- VALUE "ProductName", "MpcAudioRenderer Filter"
- VALUE "ProductVersion", MPC_VERSION_STR_FULL
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
-
-STRINGTABLE
-BEGIN
- IDS_FILTER_SETTINGS_CAPTION "Settings"
- IDS_ARS_WASAPI_MODE "Use WASAPI (restart playback)"
- IDS_ARS_MUTE_FAST_FORWARD "Mute on fast forward"
- IDS_ARS_SOUND_DEVICE "Sound Device:"
-END
-
-#endif // English (United States) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+// Microsoft Visual C++ generated resource script.
+//
+#include "CrashReporterDialog.h"
+#include "version.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "CrashReporterDialog.h\0"
+ "version.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION MPC_VERSION_NUM
+ PRODUCTVERSION MPC_VERSION_NUM
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", "MPC-HC Crash Reporter Dialog helper DLL"
+ VALUE "CompanyName", MPC_COMP_NAME_STR
+ VALUE "FileDescription", "MPC-HC Crash Reporter Dialog helper DLL"
+ VALUE "FileVersion", MPC_VERSION_STR
+ VALUE "InternalName", "CrashReporterDialog"
+ VALUE "LegalCopyright", MPC_COPYRIGHT_STR
+ VALUE "OriginalFilename", "CrashReporterDialog.dll"
+ VALUE "ProductName", "MPC-HC Crash Reporter Dialog helper DLL"
+ VALUE "ProductVersion", MPC_VERSION_STR
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (United States) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.vcxproj b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.vcxproj
new file mode 100644
index 000000000..ae54a3f50
--- /dev/null
+++ b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.vcxproj
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Release Lite|Win32">
+ <Configuration>Release Lite</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Lite|x64">
+ <Configuration>Release Lite</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{5DB958DD-8B25-45EF-8072-3356CAF8CCD7}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>CrashReporterDialog</RootNamespace>
+ <ProjectName>CrashReporterDialog</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <Import Project="..\..\platform.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\common.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)bin\mpc-hc_x86\CrashReporter\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lite|Win32'">
+ <OutDir>$(SolutionDir)bin\mpc-hc_x86 Lite\CrashReporter\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>$(SolutionDir)bin\mpc-hc_x64\CrashReporter\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lite|x64'">
+ <OutDir>$(SolutionDir)bin\mpc-hc_x64 Lite\CrashReporter\</OutDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <AdditionalIncludeDirectories>..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <NoEntryPoint>false</NoEntryPoint>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ModuleDefinitionFile>CrashReporterDialog.def</ModuleDefinitionFile>
+ <AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="CrashReporterDialog.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="CrashReporterDialog.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="CrashReporterDialog.def" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="CrashReporterDialog.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.vcxproj.filters b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.vcxproj.filters
new file mode 100644
index 000000000..f87263b49
--- /dev/null
+++ b/src/mpc-hc/CrashReporterDialog/CrashReporterDialog.vcxproj.filters
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{ee8489ea-968c-44c9-ae3a-35eb518513d2}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="CrashReporterDialog.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="CrashReporterDialog.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="CrashReporterDialog.def">
+ <Filter>Source Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="CrashReporterDialog.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/mpc-hc/DebugShadersDlg.cpp b/src/mpc-hc/DebugShadersDlg.cpp
index 3adb9007a..7086eb04d 100644
--- a/src/mpc-hc/DebugShadersDlg.cpp
+++ b/src/mpc-hc/DebugShadersDlg.cpp
@@ -249,16 +249,16 @@ void CDebugShadersDlg::OnRecompileShader()
profile = "ps_2_0";
break;
}
- CString disasm, msg;
+ CString disasm, compilerMsg;
if (SUCCEEDED(m_Compiler.CompileShaderFromFile(shader.filePath, "main", profile,
- D3DXSHADER_DEBUG, nullptr, &disasm, &msg))) {
- if (!msg.IsEmpty()) {
- msg += _T("\n");
+ D3DXSHADER_DEBUG, nullptr, &disasm, &compilerMsg))) {
+ if (!compilerMsg.IsEmpty()) {
+ compilerMsg += _T("\n");
}
- msg += disasm;
+ compilerMsg += disasm;
}
- msg.Replace(_T("\n"), _T("\r\n"));
- m_DebugInfo.SetWindowText(msg);
+ compilerMsg.Replace(_T("\n"), _T("\r\n"));
+ m_DebugInfo.SetWindowText(compilerMsg);
} else {
m_DebugInfo.SetWindowText(_T("File not found"));
}
diff --git a/src/mpc-hc/DpiHelper.cpp b/src/mpc-hc/DpiHelper.cpp
new file mode 100644
index 000000000..04397208b
--- /dev/null
+++ b/src/mpc-hc/DpiHelper.cpp
@@ -0,0 +1,66 @@
+/*
+ * (C) 2015 see Authors.txt
+ *
+ * This file is part of MPC-HC.
+ *
+ * MPC-HC 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.
+ *
+ * MPC-HC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "stdafx.h"
+#include "DpiHelper.h"
+
+#include "WinapiFunc.h"
+
+namespace
+{
+ typedef enum MONITOR_DPI_TYPE {
+ MDT_EFFECTIVE_DPI = 0,
+ MDT_ANGULAR_DPI = 1,
+ MDT_RAW_DPI = 2,
+ MDT_DEFAULT = MDT_EFFECTIVE_DPI
+ } MONITOR_DPI_TYPE;
+
+ HRESULT WINAPI GetDpiForMonitor(HMONITOR hmonitor, MONITOR_DPI_TYPE dpiType, UINT* dpiX, UINT* dpiY);
+}
+
+DpiHelper::DpiHelper()
+{
+ HDC hDC = ::GetDC(nullptr);
+ m_sdpix = GetDeviceCaps(hDC, LOGPIXELSX);
+ m_sdpiy = GetDeviceCaps(hDC, LOGPIXELSY);
+ ::ReleaseDC(nullptr, hDC);
+ m_dpix = m_sdpix;
+ m_dpiy = m_sdpiy;
+}
+
+void DpiHelper::Override(HWND hWindow)
+{
+ const WinapiFunc<decltype(GetDpiForMonitor)>
+ fnGetDpiForMonitor = { "Shcore.dll", "GetDpiForMonitor" };
+
+ if (fnGetDpiForMonitor) {
+ if (fnGetDpiForMonitor(MonitorFromWindow(hWindow, MONITOR_DEFAULTTONULL),
+ MDT_EFFECTIVE_DPI, (UINT*)&m_dpix, (UINT*)&m_dpiy) != S_OK) {
+ m_dpix = m_sdpix;
+ m_dpiy = m_sdpiy;
+ }
+ }
+}
+
+void DpiHelper::Override(int dpix, int dpiy)
+{
+ m_dpix = dpix;
+ m_dpiy = dpiy;
+}
diff --git a/src/mpc-hc/DpiHelper.h b/src/mpc-hc/DpiHelper.h
new file mode 100644
index 000000000..66000183f
--- /dev/null
+++ b/src/mpc-hc/DpiHelper.h
@@ -0,0 +1,46 @@
+/*
+ * (C) 2015 see Authors.txt
+ *
+ * This file is part of MPC-HC.
+ *
+ * MPC-HC 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.
+ *
+ * MPC-HC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+class DpiHelper final
+{
+public:
+
+ DpiHelper();
+
+ void Override(HWND hWindow);
+ void Override(int dpix, int dpiy);
+
+ inline int ScaleFloorX(int x) const { return x * m_dpix / 96; }
+ inline int ScaleFloorY(int y) const { return y * m_dpiy / 96; }
+ inline int ScaleX(int x) const { return MulDiv(x, m_dpix, 96); }
+ inline int ScaleY(int y) const { return MulDiv(y, m_dpiy, 96); }
+ inline int TransposeScaledX(int x) const { return MulDiv(x, m_dpiy, m_dpix); }
+ inline int TransposeScaledY(int y) const { return MulDiv(y, m_dpix, m_dpiy); }
+
+ inline int ScaleSystemToOverrideX(int x) const { return MulDiv(x, m_dpix, m_sdpix); }
+ inline int ScaleSystemToOverrideY(int y) const { return MulDiv(y, m_dpiy, m_sdpiy); }
+
+private:
+
+ int m_dpix, m_dpiy;
+ int m_sdpix, m_sdpiy;
+};
diff --git a/src/mpc-hc/DropTarget.cpp b/src/mpc-hc/DropTarget.cpp
index e70b79238..aae9c4613 100644
--- a/src/mpc-hc/DropTarget.cpp
+++ b/src/mpc-hc/DropTarget.cpp
@@ -67,7 +67,7 @@ BOOL CDropTarget::OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dro
if (auto pClient = dynamic_cast<CDropClient*>(pWnd)) {
if (pDataObject->IsDataAvailable(CF_HDROP)) {
if (HGLOBAL hGlobal = pDataObject->GetGlobalData(CF_HDROP)) {
- if (HDROP hDrop = (HDROP)GlobalLock(hGlobal)) {
+ if (HDROP hDrop = static_cast<HDROP>(GlobalLock(hGlobal))) {
UINT nFiles = ::DragQueryFile(hDrop, UINT_MAX, nullptr, 0);
for (UINT iFile = 0; iFile < nFiles; iFile++) {
CString fn;
@@ -83,11 +83,10 @@ BOOL CDropTarget::OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dro
} else if (pDataObject->IsDataAvailable(CF_URL)) {
FORMATETC fmt = { CF_URL, nullptr, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
if (HGLOBAL hGlobal = pDataObject->GetGlobalData(CF_URL, &fmt)) {
- LPCSTR pText = (LPCSTR)GlobalLock(hGlobal);
+ LPCSTR pText = static_cast<LPCSTR>(GlobalLock(hGlobal));
if (AfxIsValidString(pText)) {
- CAtlList<CString> sl;
- sl.AddTail(pText);
- pClient->OnDropFiles(sl, dropEffect);
+ slFiles.AddTail(pText);
+ pClient->OnDropFiles(slFiles, dropEffect);
GlobalUnlock(hGlobal);
bResult = TRUE;
}
@@ -121,6 +120,3 @@ DROPEFFECT CDropTarget::OnDragScroll(CWnd* pWnd, DWORD dwKeyState, CPoint point)
{
return DROPEFFECT_NONE;
}
-
-BEGIN_MESSAGE_MAP(CDropTarget, COleDropTarget)
-END_MESSAGE_MAP()
diff --git a/src/mpc-hc/DropTarget.h b/src/mpc-hc/DropTarget.h
index 8df0680ed..aaead03a8 100644
--- a/src/mpc-hc/DropTarget.h
+++ b/src/mpc-hc/DropTarget.h
@@ -23,6 +23,7 @@
#include <afxole.h>
+#define DROPEFFECT_APPEND 16
struct CDropClient {
virtual void OnDropFiles(CAtlList<CString>& slFiles, DROPEFFECT dropEffect) PURE;
@@ -31,21 +32,18 @@ struct CDropClient {
class CDropTarget : public COleDropTarget
{
+ const CLIPFORMAT CF_URL = static_cast<CLIPFORMAT>(RegisterClipboardFormat(_T("UniformResourceLocator")));
+ CComPtr<IDropTargetHelper> m_pDropHelper;
+
public:
CDropTarget();
virtual ~CDropTarget() = default;
-private:
- const CLIPFORMAT CF_URL = (CLIPFORMAT)RegisterClipboardFormat(_T("UniformResourceLocator"));
- CComPtr<IDropTargetHelper> m_pDropHelper;
-
protected:
- DECLARE_MESSAGE_MAP()
-
- DROPEFFECT OnDragEnter(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
- DROPEFFECT OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
- BOOL OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point);
- DROPEFFECT OnDropEx(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropDefault, DROPEFFECT dropList, CPoint point);
- void OnDragLeave(CWnd* pWnd);
- DROPEFFECT OnDragScroll(CWnd* pWnd, DWORD dwKeyState, CPoint point);
+ DROPEFFECT OnDragEnter(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point) override;
+ DROPEFFECT OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point) override;
+ BOOL OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point) override;
+ DROPEFFECT OnDropEx(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropDefault, DROPEFFECT dropList, CPoint point) override;
+ void OnDragLeave(CWnd* pWnd) override;
+ DROPEFFECT OnDragScroll(CWnd* pWnd, DWORD dwKeyState, CPoint point) override;
};
diff --git a/src/mpc-hc/EventDispatcher.h b/src/mpc-hc/EventDispatcher.h
index 5f2ddeaca..f321497e6 100644
--- a/src/mpc-hc/EventDispatcher.h
+++ b/src/mpc-hc/EventDispatcher.h
@@ -44,7 +44,8 @@ enum class MpcEvent {
SYSTEM_MENU_POPUP_INITIALIZED,
SYSTEM_MENU_POPUP_UNINITIALIZED,
CHANGING_UI_LANGUAGE,
- STREAM_POS_UPDATE_REQUEST
+ STREAM_POS_UPDATE_REQUEST,
+ DPI_CHANGED,
};
class EventClient;
diff --git a/src/mpc-hc/FGFilter.cpp b/src/mpc-hc/FGFilter.cpp
index 9b5f3d705..b907747f4 100644
--- a/src/mpc-hc/FGFilter.cpp
+++ b/src/mpc-hc/FGFilter.cpp
@@ -204,9 +204,10 @@ CFGFilterRegistry::CFGFilterRegistry(const CLSID& clsid, UINT64 merit)
DWORD len = _countof(buff);
for (DWORD i = 0; ERROR_SUCCESS == catkey.EnumKey(i, buff, &len, &ft); i++, len = _countof(buff)) {
if (ERROR_SUCCESS == key.Open(catkey, buff, KEY_READ)) {
- TCHAR clsid[256];
- len = _countof(clsid);
- if (ERROR_SUCCESS == key.QueryStringValue(_T("CLSID"), clsid, &len) && GUIDFromCString(clsid) == m_clsid) {
+ TCHAR clsidString[256];
+ len = _countof(clsidString);
+ if (ERROR_SUCCESS == key.QueryStringValue(_T("CLSID"), clsidString, &len)
+ && GUIDFromCString(clsidString) == m_clsid) {
break;
}
@@ -365,7 +366,7 @@ void CFGFilterRegistry::ExtractFilterData(BYTE* p, UINT len)
p += 12;
while (nTypes-- > 0) {
ChkLen(1)
- BYTE n = *p - 0x30;
+ n = *p - 0x30;
p++;
UNREFERENCED_PARAMETER(n);
@@ -376,7 +377,7 @@ void CFGFilterRegistry::ExtractFilterData(BYTE* p, UINT len)
UNREFERENCED_PARAMETER(ty);
ChkLen(5)
- BYTE x33 = *p;
+ x33 = *p;
p++;
ASSERT(x33 == 0x33);
UNREFERENCED_PARAMETER(x33);
@@ -427,15 +428,15 @@ HRESULT CFGFilterFile::Create(IBaseFilter** ppBF, CInterfaceList<IUnknown, &IID_
CFGFilterVideoRenderer::CFGFilterVideoRenderer(HWND hWnd, const CLSID& clsid, CStringW name, UINT64 merit)
: CFGFilter(clsid, name, merit)
, m_hWnd(hWnd)
- , m_bHasVideoDriverWorkAround(false)
+ , m_bHas10BitWorkAround(false)
{
AddType(MEDIATYPE_Video, MEDIASUBTYPE_NULL);
}
CFGFilterVideoRenderer::~CFGFilterVideoRenderer()
{
- if (m_bHasVideoDriverWorkAround) {
- UnhookWorkAroundVideoDriversBug();
+ if (m_bHas10BitWorkAround) {
+ UnhookWorkAround10BitBug();
}
}
@@ -444,64 +445,76 @@ HRESULT CFGFilterVideoRenderer::Create(IBaseFilter** ppBF, CInterfaceList<IUnkno
TRACE(_T("--> CFGFilterVideoRenderer::Create on thread: %lu\n"), GetCurrentThreadId());
CheckPointer(ppBF, E_POINTER);
- HRESULT hr = S_OK;
-
+ HRESULT hr;
CComPtr<ISubPicAllocatorPresenter> pCAP;
- if (m_clsid == CLSID_VMR7AllocatorPresenter
- || m_clsid == CLSID_VMR9AllocatorPresenter
- || m_clsid == CLSID_DXRAllocatorPresenter
- || m_clsid == CLSID_madVRAllocatorPresenter
- || m_clsid == CLSID_EVRAllocatorPresenter
- || m_clsid == CLSID_SyncAllocatorPresenter) {
- bool bFullscreen = (AfxGetApp()->m_pMainWnd != nullptr) && (((CMainFrame*)AfxGetApp()->m_pMainWnd)->IsD3DFullScreenMode());
- if (SUCCEEDED(CreateAP7(m_clsid, m_hWnd, &pCAP))
- || SUCCEEDED(CreateAP9(m_clsid, m_hWnd, bFullscreen, &pCAP))
- || SUCCEEDED(CreateEVR(m_clsid, m_hWnd, bFullscreen, &pCAP))
- || SUCCEEDED(CreateSyncRenderer(m_clsid, m_hWnd, bFullscreen, &pCAP))) {
- CComPtr<IUnknown> pRenderer;
- if (SUCCEEDED(hr = pCAP->CreateRenderer(&pRenderer))) {
- *ppBF = CComQIPtr<IBaseFilter>(pRenderer).Detach();
- pUnks.AddTail(pCAP);
- if (CComQIPtr<ISubPicAllocatorPresenter2> pCAP2 = pCAP) {
- pUnks.AddTail(pCAP2);
- }
- // madVR supports calling IVideoWindow::put_Owner before the pins are connected
- if (m_clsid == CLSID_madVRAllocatorPresenter) {
- if (CComQIPtr<IMadVRSubclassReplacement> pMVRSR = pCAP) {
- VERIFY(SUCCEEDED(pMVRSR->DisableSubclassing()));
- }
- if (CComQIPtr<IVideoWindow> pVW = pCAP) {
- pVW->put_Owner((OAHWND)m_hWnd);
- }
- }
- }
+ auto isD3DFullScreenMode = []() {
+ auto pMainFrame = dynamic_cast<const CMainFrame*>(AfxGetApp()->m_pMainWnd);
+ ASSERT(pMainFrame);
+ return pMainFrame && pMainFrame->IsD3DFullScreenMode();
+ };
+
+ if (m_clsid == CLSID_EVRAllocatorPresenter) {
+ CheckNoLog(CreateEVR(m_clsid, m_hWnd, isD3DFullScreenMode(), &pCAP));
+ } else if (m_clsid == CLSID_SyncAllocatorPresenter) {
+ CheckNoLog(CreateSyncRenderer(m_clsid, m_hWnd, isD3DFullScreenMode(), &pCAP));
+ } else if (m_clsid == CLSID_madVRAllocatorPresenter) {
+ CheckNoLog(CreateAP9(m_clsid, m_hWnd, isD3DFullScreenMode(), &pCAP));
+
+ if (CComQIPtr<IMadVRSubclassReplacement> pMVRSR = pCAP) {
+ VERIFY(SUCCEEDED(pMVRSR->DisableSubclassing()));
+ }
+ // madVR supports calling IVideoWindow::put_Owner before the pins are connected
+ if (CComQIPtr<IVideoWindow> pVW = pCAP) {
+ VERIFY(SUCCEEDED(pVW->put_Owner((OAHWND)m_hWnd)));
}
+ } else if (m_clsid == CLSID_VMR9AllocatorPresenter || m_clsid == CLSID_DXRAllocatorPresenter) {
+ CheckNoLog(CreateAP9(m_clsid, m_hWnd, isD3DFullScreenMode(), &pCAP));
+ } else if (m_clsid == CLSID_VMR7AllocatorPresenter) {
+ CheckNoLog(CreateAP7(m_clsid, m_hWnd, &pCAP));
} else {
CComPtr<IBaseFilter> pBF;
- if (SUCCEEDED(pBF.CoCreateInstance(m_clsid))) {
- if (m_clsid == CLSID_EnhancedVideoRenderer) {
- CComQIPtr<IEVRFilterConfig> pConfig = pBF;
- pConfig->SetNumberOfStreams(3);
- }
+ CheckNoLog(pBF.CoCreateInstance(m_clsid));
- BeginEnumPins(pBF, pEP, pPin) {
- if (CComQIPtr<IMixerPinConfig, &IID_IMixerPinConfig> pMPC = pPin) {
- pUnks.AddTail(pMPC);
- break;
+ if (m_clsid == CLSID_EnhancedVideoRenderer) {
+ CComQIPtr<IEVRFilterConfig> pConfig = pBF;
+ pConfig->SetNumberOfStreams(3);
+
+ if (CComQIPtr<IMFGetService> pMFGS = pBF) {
+ CComPtr<IMFVideoDisplayControl> pMFVDC;
+ if (SUCCEEDED(pMFGS->GetService(MR_VIDEO_RENDER_SERVICE, IID_PPV_ARGS(&pMFVDC)))) {
+ pMFVDC->SetVideoWindow(m_hWnd);
}
}
- EndEnumPins;
+ }
- *ppBF = pBF.Detach();
+ BeginEnumPins(pBF, pEP, pPin) {
+ if (CComQIPtr<IMixerPinConfig, &IID_IMixerPinConfig> pMPC = pPin) {
+ pUnks.AddTail(pMPC);
+ break;
+ }
}
+ EndEnumPins;
+
+ *ppBF = pBF.Detach();
}
- if (!*ppBF) {
- hr = E_FAIL;
- } else if (m_clsid != CLSID_madVRAllocatorPresenter) {
- HookWorkAroundVideoDriversBug(*ppBF);
- m_bHasVideoDriverWorkAround = true;
+ if (pCAP) {
+ CComPtr<IUnknown> pRenderer;
+ CheckNoLog(pCAP->CreateRenderer(&pRenderer));
+
+ *ppBF = CComQIPtr<IBaseFilter>(pRenderer).Detach();
+ pUnks.AddTail(pCAP);
+ if (CComQIPtr<ISubPicAllocatorPresenter2> pCAP2 = pCAP) {
+ pUnks.AddTail(pCAP2);
+ }
+ }
+
+ CheckPointer(*ppBF, E_FAIL);
+
+ if (m_clsid != CLSID_madVRAllocatorPresenter) {
+ HookWorkAround10BitBug(*ppBF);
+ m_bHas10BitWorkAround = true;
}
return hr;
diff --git a/src/mpc-hc/FGFilter.h b/src/mpc-hc/FGFilter.h
index abec238fc..a0c035bab 100644
--- a/src/mpc-hc/FGFilter.h
+++ b/src/mpc-hc/FGFilter.h
@@ -124,7 +124,7 @@ class CFGFilterVideoRenderer : public CFGFilter
{
protected:
HWND m_hWnd;
- bool m_bHasVideoDriverWorkAround;
+ bool m_bHas10BitWorkAround;
public:
CFGFilterVideoRenderer(HWND hWnd, const CLSID& clsid, CStringW name = L"", UINT64 merit = MERIT64_DO_USE);
diff --git a/src/mpc-hc/FGFilterLAV.cpp b/src/mpc-hc/FGFilterLAV.cpp
index d5cd8cc20..7301e95c2 100644
--- a/src/mpc-hc/FGFilterLAV.cpp
+++ b/src/mpc-hc/FGFilterLAV.cpp
@@ -34,7 +34,7 @@
#include "../filters/PinInfoWnd.h"
#define LAV_FILTERS_VERSION_MAJOR 0
-#define LAV_FILTERS_VERSION_MINOR 62
+#define LAV_FILTERS_VERSION_MINOR 66
#define LAV_FILTERS_VERSION_REVISION 0
#define LAV_FILTERS_VERSION_COMMIT_NUM 0
#define LAV_FILTERS_VERSION ((QWORD)LAV_FILTERS_VERSION_MAJOR << 48 | (QWORD)LAV_FILTERS_VERSION_MINOR << 32 | (QWORD)LAV_FILTERS_VERSION_REVISION << 16 | LAV_FILTERS_VERSION_COMMIT_NUM)
@@ -231,14 +231,14 @@ HRESULT CFGFilterLAV::PropertyPageCallback(IBaseFilter* pBF)
if (settings.GetSettings(pLAVFSettings)) { // Get current settings from LAVSplitter
settings.SaveSettings(); // Save them to the registry/ini
}
- } else if (CComQIPtr<ILAVVideoSettings> pLAVFSettings = pBF) {
+ } else if (CComQIPtr<ILAVVideoSettings> pLAVVideoSettings = pBF) {
CFGFilterLAVVideo::Settings settings;
- if (settings.GetSettings(pLAVFSettings)) { // Get current settings from LAVVideo
+ if (settings.GetSettings(pLAVVideoSettings)) { // Get current settings from LAVVideo
settings.SaveSettings(); // Save them to the registry/ini
}
- } else if (CComQIPtr<ILAVAudioSettings> pLAVFSettings = pBF) {
+ } else if (CComQIPtr<ILAVAudioSettings> pLAVAudioSettings = pBF) {
CFGFilterLAVAudio::Settings settings;
- if (settings.GetSettings(pLAVFSettings)) { // Get current settings from LAVAudio
+ if (settings.GetSettings(pLAVAudioSettings)) { // Get current settings from LAVAudio
settings.SaveSettings(); // Save them to the registry/ini
}
}
@@ -356,7 +356,9 @@ void CFGFilterLAVSplitterBase::Settings::LoadSettings()
bImpairedAudio = pApp->GetProfileInt(IDS_R_INTERNAL_LAVSPLITTER, _T("ImpairedAudio"), bImpairedAudio);
- dwQueueMaxSize = pApp->GetProfileInt(IDS_R_INTERNAL_LAVSPLITTER, _T("QueueMaxSize"), dwQueueMaxSize);
+ dwQueueMaxMemSize = pApp->GetProfileInt(IDS_R_INTERNAL_LAVSPLITTER, _T("QueueMaxSize"), dwQueueMaxMemSize);
+
+ dwQueueMaxPackets = pApp->GetProfileInt(IDS_R_INTERNAL_LAVSPLITTER, _T("QueueMaxPackets"), dwQueueMaxPackets);
dwNetworkAnalysisDuration = pApp->GetProfileInt(IDS_R_INTERNAL_LAVSPLITTER, _T("NetworkAnalysisDuration"), dwNetworkAnalysisDuration);
}
@@ -390,7 +392,9 @@ void CFGFilterLAVSplitterBase::Settings::SaveSettings()
pApp->WriteProfileInt(IDS_R_INTERNAL_LAVSPLITTER, _T("ImpairedAudio"), bImpairedAudio);
- pApp->WriteProfileInt(IDS_R_INTERNAL_LAVSPLITTER, _T("QueueMaxSize"), dwQueueMaxSize);
+ pApp->WriteProfileInt(IDS_R_INTERNAL_LAVSPLITTER, _T("QueueMaxSize"), dwQueueMaxMemSize);
+
+ pApp->WriteProfileInt(IDS_R_INTERNAL_LAVSPLITTER, _T("QueueMaxPackets"), dwQueueMaxPackets);
pApp->WriteProfileInt(IDS_R_INTERNAL_LAVSPLITTER, _T("NetworkAnalysisDuration"), dwNetworkAnalysisDuration);
}
@@ -441,7 +445,9 @@ bool CFGFilterLAVSplitterBase::Settings::GetSettings(CComQIPtr<ILAVFSettings> pL
bPreferHighQualityAudio = pLAVFSettings->GetPreferHighQualityAudioStreams();
- dwQueueMaxSize = pLAVFSettings->GetMaxQueueMemSize();
+ dwQueueMaxMemSize = pLAVFSettings->GetMaxQueueMemSize();
+
+ dwQueueMaxPackets = pLAVFSettings->GetMaxQueueSize();
dwNetworkAnalysisDuration = pLAVFSettings->GetNetworkStreamAnalysisDuration();
@@ -478,7 +484,9 @@ bool CFGFilterLAVSplitterBase::Settings::SetSettings(CComQIPtr<ILAVFSettings> pL
pLAVFSettings->SetPreferHighQualityAudioStreams(bPreferHighQualityAudio);
- pLAVFSettings->SetMaxQueueMemSize(dwQueueMaxSize);
+ pLAVFSettings->SetMaxQueueMemSize(dwQueueMaxMemSize);
+
+ pLAVFSettings->SetMaxQueueSize(dwQueueMaxPackets);
pLAVFSettings->SetNetworkStreamAnalysisDuration(dwNetworkAnalysisDuration);
@@ -556,12 +564,12 @@ void CFGFilterLAVVideo::ShowPropertyPages(CWnd* pParendWnd)
LPCTSTR CFGFilterLAVVideo::GetUserFriendlyDecoderName(const CString& decoderName)
{
static std::pair<LPCTSTR, LPCTSTR> userFriendlyDecoderNames[] = {
- make_pair(_T("avcodec"), _T("FFmpeg")),
- make_pair(_T("dxva2n"), _T("DXVA2 Native")),
- make_pair(_T("dxva2cb"), _T("DXVA2 Copy-back")),
- make_pair(_T("dxva2cb direct"), _T("DXVA2 Copy-back (Direct)")),
- make_pair(_T("cuvid"), _T("NVIDIA CUVID")),
- make_pair(_T("quicksync"), _T("Intel QuickSync"))
+ std::make_pair(_T("avcodec"), _T("FFmpeg")),
+ std::make_pair(_T("dxva2n"), _T("DXVA2 Native")),
+ std::make_pair(_T("dxva2cb"), _T("DXVA2 Copy-back")),
+ std::make_pair(_T("dxva2cb direct"), _T("DXVA2 Copy-back (Direct)")),
+ std::make_pair(_T("cuvid"), _T("NVIDIA CUVID")),
+ std::make_pair(_T("quicksync"), _T("Intel QuickSync"))
};
for (int i = 0; i < _countof(userFriendlyDecoderNames); i++) {
@@ -801,6 +809,10 @@ bool CFGFilterLAVVideo::Settings::SetSettings(CComQIPtr<ILAVVideoSettings> pLAVF
pLAVFSettingsMPCHCCustom->SetPropertyPageCallback(PropertyPageCallback);
}
+ if (AfxGetAppSettings().iLAVGPUDevice != DWORD_MAX) {
+ pLAVFSettings->SetGPUDeviceIndex(AfxGetAppSettings().iLAVGPUDevice);
+ }
+
return true;
}
@@ -879,6 +891,8 @@ void CFGFilterLAVAudio::Settings::LoadSettings()
bOutputStandardLayout = pApp->GetProfileInt(IDS_R_INTERNAL_LAVAUDIO, _T("OutputStandardLayout"), bOutputStandardLayout);
+ bOutput51Legacy = pApp->GetProfileInt(IDS_R_INTERNAL_LAVAUDIO, _T("Output51Legacy"), bOutput51Legacy);
+
bMixingEnabled = pApp->GetProfileInt(IDS_R_INTERNAL_LAVAUDIO, _T("Mixing"), bMixingEnabled);
dwMixingLayout = pApp->GetProfileInt(IDS_R_INTERNAL_LAVAUDIO, _T("MixingLayout"), dwMixingLayout);
@@ -931,6 +945,8 @@ void CFGFilterLAVAudio::Settings::SaveSettings()
pApp->WriteProfileInt(IDS_R_INTERNAL_LAVAUDIO, _T("OutputStandardLayout"), bOutputStandardLayout);
+ pApp->WriteProfileInt(IDS_R_INTERNAL_LAVAUDIO, _T("Output51Legacy"), bOutput51Legacy);
+
pApp->WriteProfileInt(IDS_R_INTERNAL_LAVAUDIO, _T("Mixing"), bMixingEnabled);
pApp->WriteProfileInt(IDS_R_INTERNAL_LAVAUDIO, _T("MixingLayout"), dwMixingLayout);
@@ -982,6 +998,8 @@ bool CFGFilterLAVAudio::Settings::GetSettings(CComQIPtr<ILAVAudioSettings> pLAVF
bOutputStandardLayout = pLAVFSettings->GetOutputStandardLayout();
+ bOutput51Legacy = pLAVFSettings->GetOutput51LegacyLayout();
+
bMixingEnabled = pLAVFSettings->GetMixingEnabled();
dwMixingLayout = pLAVFSettings->GetMixingLayout();
@@ -1027,6 +1045,8 @@ bool CFGFilterLAVAudio::Settings::SetSettings(CComQIPtr<ILAVAudioSettings> pLAVF
pLAVFSettings->SetOutputStandardLayout(bOutputStandardLayout);
+ pLAVFSettings->SetOutput51LegacyLayout(bOutput51Legacy);
+
pLAVFSettings->SetMixingEnabled(bMixingEnabled);
pLAVFSettings->SetMixingLayout(dwMixingLayout);
diff --git a/src/mpc-hc/FGFilterLAV.h b/src/mpc-hc/FGFilterLAV.h
index dd5a708de..c6b312950 100644
--- a/src/mpc-hc/FGFilterLAV.h
+++ b/src/mpc-hc/FGFilterLAV.h
@@ -1,5 +1,5 @@
/*
- * (C) 2013-2014 see Authors.txt
+ * (C) 2013-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -115,7 +115,8 @@ public:
BOOL bStreamSwitchRemoveAudio;
BOOL bImpairedAudio;
BOOL bPreferHighQualityAudio;
- DWORD dwQueueMaxSize;
+ DWORD dwQueueMaxPackets;
+ DWORD dwQueueMaxMemSize;
DWORD dwNetworkAnalysisDuration;
void LoadSettings();
@@ -204,6 +205,7 @@ public:
BOOL bExpandMono;
BOOL bExpand61;
BOOL bOutputStandardLayout;
+ BOOL bOutput51Legacy;
BOOL bAllowRawSPDIF;
BOOL bSampleFormats[SampleFormat_NB];
BOOL bSampleConvertDither;
diff --git a/src/mpc-hc/FGManager.cpp b/src/mpc-hc/FGManager.cpp
index 91fa9a60e..9086332e6 100644
--- a/src/mpc-hc/FGManager.cpp
+++ b/src/mpc-hc/FGManager.cpp
@@ -42,6 +42,7 @@
#include "IPinHook.h"
#include "moreuuids.h"
#include <mvrInterfaces.h>
+#include "../thirdparty/sanear/sanear/src/Factory.h"
//
// CFGManager
@@ -346,7 +347,7 @@ HRESULT CFGManager::EnumSourceFilters(LPCWSTR lpcwstrFileName, CFGFilterList& fl
CRegKey key;
if (ERROR_SUCCESS == key.Open(HKEY_CLASSES_ROOT, _T("Media Type\\Extensions\\") + CString(ext), KEY_READ)) {
- ULONG len = _countof(buff);
+ len = _countof(buff);
ZeroMemory(buff, sizeof(buff));
LONG ret = key.QueryStringValue(_T("Source Filter"), buff, &len); // QueryStringValue can return ERROR_INVALID_DATA on bogus strings (radlight mpc v1003, fixed in v1004)
if (ERROR_SUCCESS == ret || ERROR_INVALID_DATA == ret && GUIDFromCString(buff) != GUID_NULL) {
@@ -425,7 +426,7 @@ HRESULT CFGManager::AddSourceFilter(CFGFilter* pFGF, LPCWSTR lpcwstrFileName, LP
}
// doh :P
- BeginEnumMediaTypes(GetFirstPin(pBF, PINDIR_OUTPUT), pEMT, pmt) {
+ BeginEnumMediaTypes(GetFirstPin(pBF, PINDIR_OUTPUT), pEMT, pmt2) {
static const GUID guid1 =
{ 0x640999A0, 0xA946, 0x11D0, { 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } };
static const GUID guid2 =
@@ -433,7 +434,7 @@ HRESULT CFGManager::AddSourceFilter(CFGFilter* pFGF, LPCWSTR lpcwstrFileName, LP
static const GUID guid3 =
{ 0xD51BD5AE, 0x7548, 0x11CF, { 0xA5, 0x20, 0x00, 0x80, 0xC7, 0x7E, 0xF5, 0x8A } };
- if (pmt->subtype == guid1 || pmt->subtype == guid2 || pmt->subtype == guid3) {
+ if (pmt2->subtype == guid1 || pmt2->subtype == guid2 || pmt2->subtype == guid3) {
RemoveFilter(pBF);
pFGF = DEBUG_NEW CFGFilterRegistry(CLSID_NetShowSource);
hr = AddSourceFilter(pFGF, lpcwstrFileName, lpcwstrFilterName, ppBF);
@@ -441,7 +442,7 @@ HRESULT CFGManager::AddSourceFilter(CFGFilter* pFGF, LPCWSTR lpcwstrFileName, LP
return hr;
}
}
- EndEnumMediaTypes(pmt);
+ EndEnumMediaTypes(pmt2);
*ppBF = pBF.Detach();
@@ -790,9 +791,9 @@ HRESULT CFGManager::Connect(IPin* pPinOut, IPin* pPinIn, bool bContinueRender)
// maybe the application should do this...
- POSITION pos = pUnks.GetHeadPosition();
- while (pos) {
- if (CComQIPtr<IMixerPinConfig, &IID_IMixerPinConfig> pMPC = pUnks.GetNext(pos)) {
+ POSITION posInterface = pUnks.GetHeadPosition();
+ while (posInterface) {
+ if (CComQIPtr<IMixerPinConfig, &IID_IMixerPinConfig> pMPC = pUnks.GetNext(posInterface)) {
pMPC->SetAspectRatioMode(AM_ARMODE_STRETCHED);
}
}
@@ -1231,7 +1232,7 @@ STDMETHODIMP CFGManager::NukeDownstream(IUnknown* pUnk)
CComPtr<IPin> pPinTo;
if (S_OK == IsPinDirection(pPin, PINDIR_OUTPUT)
&& SUCCEEDED(pPin->ConnectedTo(&pPinTo)) && pPinTo) {
- if (CComPtr<IBaseFilter> pBF = GetFilterFromPin(pPinTo)) {
+ if (pBF = GetFilterFromPin(pPinTo)) {
if (GetCLSID(pBF) == CLSID_EnhancedVideoRenderer) {
// GetFilterFromPin() returns pointer to the Base EVR,
// but we need to remove Outer EVR from the graph.
@@ -1878,6 +1879,11 @@ CFGManagerCustom::CFGManagerCustom(LPCTSTR pName, LPUNKNOWN pUnk)
pFGF->AddType(MEDIATYPE_Audio, MEDIASUBTYPE_ALS);
#endif
+#if INTERNAL_DECODER_OPUS
+ pFGF = tra[TRA_OPUS] ? pFGLAVAudio : pFGLAVAudioLM;
+ pFGF->AddType(MEDIATYPE_Audio, MEDIASUBTYPE_OPUS);
+#endif
+
#if INTERNAL_DECODER_PCM
pFGF = tra[TRA_PCM] ? pFGLAVAudio : pFGLAVAudioLM;
pFGF->AddType(MEDIATYPE_Audio, MEDIASUBTYPE_PCM);
@@ -2193,14 +2199,24 @@ CFGManagerCustom::CFGManagerCustom(LPCTSTR pName, LPUNKNOWN pUnk)
// mainconcept color space converter
m_transform.AddTail(DEBUG_NEW CFGFilterRegistry(GUIDFromCString(_T("{272D77A0-A852-4851-ADA4-9091FEAD4C86}")), MERIT64_DO_NOT_USE));
- // VSFilter blocking routines
- if (s.fBlockVSFilter && s.IsISRAutoLoadEnabled()) {
- // Prevent VSFilter from connecting while the ISR is active
- m_transform.AddTail(DEBUG_NEW CFGFilterRegistry(CLSID_VSFilter, MERIT64_DO_NOT_USE));
- // Prevent XySubFilter from connecting while the ISR is active
- m_transform.AddTail(DEBUG_NEW CFGFilterRegistry(CLSID_XySubFilter, MERIT64_DO_NOT_USE));
- // Prevent XySubFilter's loader from connecting while the ISR is active
- m_transform.AddTail(DEBUG_NEW CFGFilterRegistry(CLSID_XySubFilter_AutoLoader, MERIT64_DO_NOT_USE));
+ if (s.fBlockVSFilter) {
+ switch (s.GetSubtitleRenderer()) {
+ case CAppSettings::SubtitleRenderer::INTERNAL:
+ m_transform.AddTail(DEBUG_NEW CFGFilterRegistry(CLSID_VSFilter, MERIT64_DO_NOT_USE));
+ m_transform.AddTail(DEBUG_NEW CFGFilterRegistry(CLSID_XySubFilter, MERIT64_DO_NOT_USE));
+ m_transform.AddTail(DEBUG_NEW CFGFilterRegistry(CLSID_XySubFilter_AutoLoader, MERIT64_DO_NOT_USE));
+ break;
+ case CAppSettings::SubtitleRenderer::VS_FILTER:
+ m_transform.AddTail(DEBUG_NEW CFGFilterRegistry(CLSID_XySubFilter, MERIT64_DO_NOT_USE));
+ m_transform.AddTail(DEBUG_NEW CFGFilterRegistry(CLSID_XySubFilter_AutoLoader, MERIT64_DO_NOT_USE));
+ break;
+ case CAppSettings::SubtitleRenderer::XY_SUB_FILTER:
+ m_transform.AddTail(DEBUG_NEW CFGFilterRegistry(CLSID_VSFilter, MERIT64_DO_NOT_USE));
+ break;
+ default:
+ ASSERT(FALSE);
+ break;
+ }
}
// Blacklist Accusoft PICVideo M-JPEG Codec 2.1 since causes a DEP crash
@@ -2229,7 +2245,7 @@ CFGManagerCustom::CFGManagerCustom(LPCTSTR pName, LPUNKNOWN pUnk)
merit += merit_low++;
- CFGFilter* pFGF = nullptr;
+ pFGF = nullptr;
if (fo->type == FilterOverride::REGISTERED) {
pFGF = DEBUG_NEW CFGFilterRegistry(fo->dispname, merit);
@@ -2428,8 +2444,16 @@ CFGManagerPlayer::CFGManagerPlayer(LPCTSTR pName, LPUNKNOWN pUnk, HWND hWnd)
pFGF = DEBUG_NEW CFGFilterInternal<CNullUAudioRenderer>(AUDRNDT_NULL_UNCOMP, MERIT64_ABOVE_DSHOW + 2);
pFGF->AddType(MEDIATYPE_Audio, MEDIASUBTYPE_NULL);
m_transform.AddTail(pFGF);
- } else if (SelAudioRenderer == AUDRNDT_MPC) {
- pFGF = DEBUG_NEW CFGFilterInternal<CMpcAudioRenderer>(AUDRNDT_MPC, MERIT64_ABOVE_DSHOW + 2);
+ } else if (SelAudioRenderer == AUDRNDT_INTERNAL) {
+ struct SaneAudioRendererFilter : CFGFilter {
+ SaneAudioRendererFilter(CStringW name, UINT64 merit) :
+ CFGFilter(SaneAudioRenderer::Factory::GetFilterGuid(), name, merit) {}
+
+ HRESULT Create(IBaseFilter** ppBF, CInterfaceList<IUnknown, &IID_IUnknown>&) override {
+ return SaneAudioRenderer::Factory::CreateFilter(AfxGetAppSettings().sanear, ppBF);
+ }
+ };
+ pFGF = DEBUG_NEW SaneAudioRendererFilter(AUDRNDT_INTERNAL, m_armerit + 0x99);
pFGF->AddType(MEDIATYPE_Audio, MEDIASUBTYPE_NULL);
m_transform.AddTail(pFGF);
} else if (!SelAudioRenderer.IsEmpty()) {
diff --git a/src/mpc-hc/FGManagerBDA.cpp b/src/mpc-hc/FGManagerBDA.cpp
index cbb84cf2e..da97f4a71 100644
--- a/src/mpc-hc/FGManagerBDA.cpp
+++ b/src/mpc-hc/FGManagerBDA.cpp
@@ -458,7 +458,7 @@ HRESULT CFGManagerBDA::ConnectFilters(IBaseFilter* pOutFilter, IBaseFilter* pInF
BeginEnumPins(pOutFilter, pEP, pOutPin) {
if (S_OK == IsPinDirection(pOutPin, PINDIR_OUTPUT)
&& S_OK != IsPinConnected(pOutPin)) {
- BeginEnumPins(pInFilter, pEP, pInPin) {
+ BeginEnumPins(pInFilter, pEP2, pInPin) {
if (S_OK == IsPinDirection(pInPin, PINDIR_INPUT)
&& S_OK != IsPinConnected(pInPin)) {
hr = this->ConnectDirect(pOutPin, pInPin, nullptr);
diff --git a/src/mpc-hc/FakeFilterMapper2.cpp b/src/mpc-hc/FakeFilterMapper2.cpp
index 0513262a4..3acc7a1f1 100644
--- a/src/mpc-hc/FakeFilterMapper2.cpp
+++ b/src/mpc-hc/FakeFilterMapper2.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -25,7 +25,7 @@
#include "DSUtil.h"
#include <InitGuid.h>
-#include "mhook/mhook-lib/mhook.h"
+#include "MhookHelper.h"
HRESULT(__stdcall* Real_CoCreateInstance)(CONST IID& a0,
@@ -535,35 +535,35 @@ void CFilterMapper2::Init()
{
if (!s_bInitialized) {
// In case of error, we don't report the failure immediately since the hooks might not be needed
- s_bInitialized = Mhook_SetHook(&(PVOID&)Real_CoCreateInstance, (PVOID)Mine_CoCreateInstance)
- && Mhook_SetHook(&(PVOID&)Real_RegCloseKey, (PVOID)Mine_RegCloseKey)
- && Mhook_SetHook(&(PVOID&)Real_RegFlushKey, (PVOID)Mine_RegFlushKey)
- && Mhook_SetHook(&(PVOID&)Real_RegCreateKeyA, (PVOID)Mine_RegCreateKeyA)
- && Mhook_SetHook(&(PVOID&)Real_RegCreateKeyW, (PVOID)Mine_RegCreateKeyW)
- && Mhook_SetHook(&(PVOID&)Real_RegCreateKeyExA, (PVOID)Mine_RegCreateKeyExA)
- && Mhook_SetHook(&(PVOID&)Real_RegCreateKeyExW, (PVOID)Mine_RegCreateKeyExW)
- && Mhook_SetHook(&(PVOID&)Real_RegDeleteKeyA, (PVOID)Mine_RegDeleteKeyA)
- && Mhook_SetHook(&(PVOID&)Real_RegDeleteKeyW, (PVOID)Mine_RegDeleteKeyW)
- && Mhook_SetHook(&(PVOID&)Real_RegDeleteValueA, (PVOID)Mine_RegDeleteValueA)
- && Mhook_SetHook(&(PVOID&)Real_RegDeleteValueW, (PVOID)Mine_RegDeleteValueW)
- && Mhook_SetHook(&(PVOID&)Real_RegEnumKeyExA, (PVOID)Mine_RegEnumKeyExA)
- && Mhook_SetHook(&(PVOID&)Real_RegEnumKeyExW, (PVOID)Mine_RegEnumKeyExW)
- && Mhook_SetHook(&(PVOID&)Real_RegEnumValueA, (PVOID)Mine_RegEnumValueA)
- && Mhook_SetHook(&(PVOID&)Real_RegEnumValueW, (PVOID)Mine_RegEnumValueW)
- && Mhook_SetHook(&(PVOID&)Real_RegOpenKeyA, (PVOID)Mine_RegOpenKeyA)
- && Mhook_SetHook(&(PVOID&)Real_RegOpenKeyW, (PVOID)Mine_RegOpenKeyW)
- && Mhook_SetHook(&(PVOID&)Real_RegOpenKeyExA, (PVOID)Mine_RegOpenKeyExA)
- && Mhook_SetHook(&(PVOID&)Real_RegOpenKeyExW, (PVOID)Mine_RegOpenKeyExW)
- && Mhook_SetHook(&(PVOID&)Real_RegQueryInfoKeyA, (PVOID)Mine_RegQueryInfoKeyA)
- && Mhook_SetHook(&(PVOID&)Real_RegQueryInfoKeyW, (PVOID)Mine_RegQueryInfoKeyW)
- && Mhook_SetHook(&(PVOID&)Real_RegQueryValueA, (PVOID)Mine_RegQueryValueA)
- && Mhook_SetHook(&(PVOID&)Real_RegQueryValueW, (PVOID)Mine_RegQueryValueW)
- && Mhook_SetHook(&(PVOID&)Real_RegQueryValueExA, (PVOID)Mine_RegQueryValueExA)
- && Mhook_SetHook(&(PVOID&)Real_RegQueryValueExW, (PVOID)Mine_RegQueryValueExW)
- && Mhook_SetHook(&(PVOID&)Real_RegSetValueA, (PVOID)Mine_RegSetValueA)
- && Mhook_SetHook(&(PVOID&)Real_RegSetValueW, (PVOID)Mine_RegSetValueW)
- && Mhook_SetHook(&(PVOID&)Real_RegSetValueExA, (PVOID)Mine_RegSetValueExA)
- && Mhook_SetHook(&(PVOID&)Real_RegSetValueExW, (PVOID)Mine_RegSetValueExW);
+ s_bInitialized = Mhook_SetHookEx(&Real_CoCreateInstance, Mine_CoCreateInstance)
+ && Mhook_SetHookEx(&Real_RegCloseKey, Mine_RegCloseKey)
+ && Mhook_SetHookEx(&Real_RegFlushKey, Mine_RegFlushKey)
+ && Mhook_SetHookEx(&Real_RegCreateKeyA, Mine_RegCreateKeyA)
+ && Mhook_SetHookEx(&Real_RegCreateKeyW, Mine_RegCreateKeyW)
+ && Mhook_SetHookEx(&Real_RegCreateKeyExA, Mine_RegCreateKeyExA)
+ && Mhook_SetHookEx(&Real_RegCreateKeyExW, Mine_RegCreateKeyExW)
+ && Mhook_SetHookEx(&Real_RegDeleteKeyA, Mine_RegDeleteKeyA)
+ && Mhook_SetHookEx(&Real_RegDeleteKeyW, Mine_RegDeleteKeyW)
+ && Mhook_SetHookEx(&Real_RegDeleteValueA, Mine_RegDeleteValueA)
+ && Mhook_SetHookEx(&Real_RegDeleteValueW, Mine_RegDeleteValueW)
+ && Mhook_SetHookEx(&Real_RegEnumKeyExA, Mine_RegEnumKeyExA)
+ && Mhook_SetHookEx(&Real_RegEnumKeyExW, Mine_RegEnumKeyExW)
+ && Mhook_SetHookEx(&Real_RegEnumValueA, Mine_RegEnumValueA)
+ && Mhook_SetHookEx(&Real_RegEnumValueW, Mine_RegEnumValueW)
+ && Mhook_SetHookEx(&Real_RegOpenKeyA, Mine_RegOpenKeyA)
+ && Mhook_SetHookEx(&Real_RegOpenKeyW, Mine_RegOpenKeyW)
+ && Mhook_SetHookEx(&Real_RegOpenKeyExA, Mine_RegOpenKeyExA)
+ && Mhook_SetHookEx(&Real_RegOpenKeyExW, Mine_RegOpenKeyExW)
+ && Mhook_SetHookEx(&Real_RegQueryInfoKeyA, Mine_RegQueryInfoKeyA)
+ && Mhook_SetHookEx(&Real_RegQueryInfoKeyW, Mine_RegQueryInfoKeyW)
+ && Mhook_SetHookEx(&Real_RegQueryValueA, Mine_RegQueryValueA)
+ && Mhook_SetHookEx(&Real_RegQueryValueW, Mine_RegQueryValueW)
+ && Mhook_SetHookEx(&Real_RegQueryValueExA, Mine_RegQueryValueExA)
+ && Mhook_SetHookEx(&Real_RegQueryValueExW, Mine_RegQueryValueExW)
+ && Mhook_SetHookEx(&Real_RegSetValueA, Mine_RegSetValueA)
+ && Mhook_SetHookEx(&Real_RegSetValueW, Mine_RegSetValueW)
+ && Mhook_SetHookEx(&Real_RegSetValueExA, Mine_RegSetValueExA)
+ && Mhook_SetHookEx(&Real_RegSetValueExW, Mine_RegSetValueExW);
}
}
diff --git a/src/mpc-hc/FavoriteOrganizeDlg.cpp b/src/mpc-hc/FavoriteOrganizeDlg.cpp
index 1da9156c0..65abb618c 100644
--- a/src/mpc-hc/FavoriteOrganizeDlg.cpp
+++ b/src/mpc-hc/FavoriteOrganizeDlg.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -90,7 +90,7 @@ void CFavoriteOrganizeDlg::UpdateColumnsSizes()
m_list.GetClientRect(r);
m_list.SetColumnWidth(0, LVSCW_AUTOSIZE);
m_list.SetColumnWidth(1, LVSCW_AUTOSIZE);
- m_list.SetColumnWidth(1, max(m_list.GetColumnWidth(1), r.Width() - m_list.GetColumnWidth(0)));
+ m_list.SetColumnWidth(1, std::max(m_list.GetColumnWidth(1), r.Width() - m_list.GetColumnWidth(0)));
}
void CFavoriteOrganizeDlg::DoDataExchange(CDataExchange* pDX)
@@ -312,7 +312,7 @@ void CFavoriteOrganizeDlg::OnDeleteBnClicked()
m_list.DeleteItem(nItem);
}
- nItem = min(nItem, m_list.GetItemCount() - 1);
+ nItem = std::min(nItem, m_list.GetItemCount() - 1);
m_list.SetItemState(nItem, LVIS_SELECTED, LVIS_SELECTED);
}
diff --git a/src/mpc-hc/FilterEnum.h b/src/mpc-hc/FilterEnum.h
index bbd6b1a89..921d6e204 100644
--- a/src/mpc-hc/FilterEnum.h
+++ b/src/mpc-hc/FilterEnum.h
@@ -165,6 +165,9 @@ enum DECODER {
#if INTERNAL_DECODER_AMR
TRA_AMR,
#endif
+#if INTERNAL_DECODER_OPUS
+ TRA_OPUS,
+#endif
#if INTERNAL_DECODER_PCM
TRA_PCM,
#endif
diff --git a/src/mpc-hc/FloatEdit.cpp b/src/mpc-hc/FloatEdit.cpp
index e428a1688..a95021700 100644
--- a/src/mpc-hc/FloatEdit.cpp
+++ b/src/mpc-hc/FloatEdit.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -91,21 +91,18 @@ void CIntEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
return;
}
- CString str;
- GetWindowText(str);
-
- if (nChar == '-' && !str.IsEmpty() && str[0] == '-') {
- return;
- }
-
int nStartChar, nEndChar;
GetSel(nStartChar, nEndChar);
- if (nChar == '\b' && nStartChar <= 0) {
- return;
+ if (nChar == '-' && nEndChar == 0) {
+ CString str;
+ GetWindowText(str);
+ if (!str.IsEmpty() && str[0] == '-') {
+ return;
+ }
}
- if (nChar == '-' && (nStartChar != 0 || nEndChar != 0)) {
+ if (nChar == '-' && nStartChar != 0) {
return;
}
diff --git a/src/mpc-hc/FullscreenWnd.cpp b/src/mpc-hc/FullscreenWnd.cpp
index 389b48533..3dd17a7e4 100644
--- a/src/mpc-hc/FullscreenWnd.cpp
+++ b/src/mpc-hc/FullscreenWnd.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -24,20 +24,16 @@
#include "FullscreenWnd.h"
#include "MainFrm.h"
-IMPLEMENT_DYNAMIC(CFullscreenWnd, CWnd)
+IMPLEMENT_DYNAMIC(CFullscreenWnd, CMouseWnd)
CFullscreenWnd::CFullscreenWnd(CMainFrame* pMainFrame)
: CMouseWnd(pMainFrame, true)
, m_pMainFrame(pMainFrame)
{
}
-CFullscreenWnd::~CFullscreenWnd()
+bool CFullscreenWnd::IsWindow() const
{
-}
-
-bool CFullscreenWnd::IsWindow()
-{
- return (m_hWnd != nullptr);
+ return !!m_hWnd;
}
BOOL CFullscreenWnd::PreTranslateMessage(MSG* pMsg)
@@ -48,27 +44,44 @@ BOOL CFullscreenWnd::PreTranslateMessage(MSG* pMsg)
m_pMainFrame->PostMessage(pMsg->message, pMsg->wParam, pMsg->lParam);
return TRUE;
}
- return CWnd::PreTranslateMessage(pMsg);
+
+ return __super::PreTranslateMessage(pMsg);
}
BOOL CFullscreenWnd::PreCreateWindow(CREATESTRUCT& cs)
{
- if (!CWnd::PreCreateWindow(cs)) {
- return FALSE;
- }
-
cs.style &= ~WS_BORDER;
- cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS,
+ cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_NOCLOSE,
::LoadCursor(nullptr, IDC_ARROW), HBRUSH(COLOR_WINDOW + 1), nullptr);
- return TRUE;
+ return __super::PreCreateWindow(cs);
+}
+
+LRESULT CFullscreenWnd::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
+{
+ if (message == WM_NCACTIVATE) {
+ return 0;
+ }
+
+ return __super::WindowProc(message, wParam, lParam);
}
BEGIN_MESSAGE_MAP(CFullscreenWnd, CMouseWnd)
ON_WM_ERASEBKGND()
+ ON_WM_DESTROY()
END_MESSAGE_MAP()
BOOL CFullscreenWnd::OnEraseBkgnd(CDC* pDC)
{
return FALSE;
}
+
+void CFullscreenWnd::OnDestroy()
+{
+ __super::OnDestroy();
+
+ CWnd* pMainWnd = AfxGetApp()->GetMainWnd();
+ if (pMainWnd) {
+ pMainWnd->SetActiveWindow();
+ }
+}
diff --git a/src/mpc-hc/FullscreenWnd.h b/src/mpc-hc/FullscreenWnd.h
index e775a1db0..3ea3440df 100644
--- a/src/mpc-hc/FullscreenWnd.h
+++ b/src/mpc-hc/FullscreenWnd.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -25,22 +25,23 @@
class CMainFrame;
-class CFullscreenWnd : public CMouseWnd
+class CFullscreenWnd final : public CMouseWnd
{
DECLARE_DYNAMIC(CFullscreenWnd)
- CMainFrame* m_pMainFrame;
+ explicit CFullscreenWnd(CMainFrame* pMainFrame);
+ bool IsWindow() const;
-public:
- CFullscreenWnd(CMainFrame* pMainFrame);
- virtual ~CFullscreenWnd();
- bool IsWindow();
+private:
+ CMainFrame* m_pMainFrame;
protected:
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- virtual BOOL PreTranslateMessage(MSG* pMsg);
+ BOOL PreCreateWindow(CREATESTRUCT& cs) override;
+ BOOL PreTranslateMessage(MSG* pMsg) override;
+ LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam) override;
DECLARE_MESSAGE_MAP()
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
+ afx_msg void OnDestroy();
};
diff --git a/src/mpc-hc/GoToDlg.cpp b/src/mpc-hc/GoToDlg.cpp
index ecf670d66..7d7b88f9b 100644
--- a/src/mpc-hc/GoToDlg.cpp
+++ b/src/mpc-hc/GoToDlg.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -125,16 +125,14 @@ void CGoToDlg::OnParseTimeCode()
AfxGetApp()->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_GOTO_LAST_USED, TYPE_TIME);
- // The hh and mm are declared volatile to work around a compiler bug with ICL 13.
- // It prevents the compiler to optimize out those variables from the computation.
- volatile unsigned int hh = 0;
- volatile unsigned int mm = 0;
+ unsigned int hh = 0;
+ unsigned int mm = 0;
float ss = 0.0f;
- wchar_t c[2]; // unnecessary character
+ WCHAR c; // extra character to ensure the end of string was reached
- if (((swscanf_s(m_timestr, L"%f%1s", &ss, c, _countof(c)) == 1) // ss[.ms]
- || (swscanf_s(m_timestr, L"%u:%f%1s", &mm, &ss, c, _countof(c)) == 2 && ss < 60.0f) // mm:ss[.ms]
- || (swscanf_s(m_timestr, L"%u:%u:%f%1s", &hh, &mm, &ss, c, _countof(c)) == 3 && mm < 60 && ss < 60.0f)) // hh:mm:ss[.ms]
+ if (((swscanf_s(m_timestr, L"%f%c", &ss, &c, 1) == 1) // ss[.ms]
+ || (swscanf_s(m_timestr, L"%u:%f%c", &mm, &ss, &c, 1) == 2 && ss < 60.0f) // mm:ss[.ms]
+ || (swscanf_s(m_timestr, L"%u:%u:%f%c", &hh, &mm, &ss, &c, 1) == 3 && mm < 60 && ss < 60.0f)) // hh:mm:ss[.ms]
&& ss >= 0.0f) {
int time = (int)(1000.0f * ((hh * 60 + mm) * 60 + ss) + 0.5f);
@@ -154,17 +152,17 @@ void CGoToDlg::OnParseFrameCode()
unsigned int frame;
float fps;
- wchar_t c1[2]; // delimiter character
- wchar_t c2[2]; // unnecessary character
+ WCHAR c1; // delimiter character
+ WCHAR c2; // extra character to ensure the end of string was reached
- int result = swscanf_s(m_framestr, L"%u%1s%f%1s", &frame, c1, _countof(c1), &fps, c2, _countof(c2));
+ int result = swscanf_s(m_framestr, L"%u%c%f%c", &frame, &c1, 1, &fps, &c2, 1);
if (result == 1) {
m_time = (REFERENCE_TIME)ceil(10000000.0 * frame / m_fps);
OnOK();
- } else if (result == 3 && c1[0] == L',') {
+ } else if (result == 3 && c1 == L',') {
m_time = (REFERENCE_TIME)ceil(10000000.0 * frame / fps);
OnOK();
- } else if (result == 0 || c1[0] != L',') {
+ } else if (result == 0 || c1 != L',') {
AfxMessageBox(IDS_GOTO_ERROR_PARSING_TEXT, MB_ICONEXCLAMATION | MB_OK, 0);
} else {
AfxMessageBox(IDS_GOTO_ERROR_PARSING_FPS, MB_ICONEXCLAMATION | MB_OK, 0);
diff --git a/src/mpc-hc/InternalFiltersConfig.h b/src/mpc-hc/InternalFiltersConfig.h
index d5878e22d..fb0f8499f 100644
--- a/src/mpc-hc/InternalFiltersConfig.h
+++ b/src/mpc-hc/InternalFiltersConfig.h
@@ -58,7 +58,10 @@
#define INTERNAL_SOURCEFILTER_RTSP INTERNAL_FILTERS_ENABLED
#define INTERNAL_SOURCEFILTER_MMS INTERNAL_FILTERS_ENABLED
#define INTERNAL_SOURCEFILTER_RTMP INTERNAL_FILTERS_ENABLED
-#define INTERNAL_SOURCEFILTER_AVI2AC3 INTERNAL_FILTERS_ENABLED
+// This filter is broken (wrong timestamps after seeking, maybe more).
+// Additionally, it's not present on "Internal Filters" configuration page.
+// Disabling it for now to see if anyone needs it.
+//#define INTERNAL_SOURCEFILTER_AVI2AC3 INTERNAL_FILTERS_ENABLED
#define INTERNAL_SOURCEFILTER_RFS INTERNAL_FILTERS_ENABLED
// Internal audio decoders
@@ -77,6 +80,7 @@
#define INTERNAL_DECODER_AMR INTERNAL_FILTERS_ENABLED
#define INTERNAL_DECODER_ADPCM INTERNAL_FILTERS_ENABLED
#define INTERNAL_DECODER_FLAC INTERNAL_FILTERS_ENABLED
+#define INTERNAL_DECODER_OPUS INTERNAL_FILTERS_ENABLED
// Internal video decoders
#define INTERNAL_DECODER_MPEG1 INTERNAL_FILTERS_ENABLED
@@ -116,7 +120,8 @@
#define HAS_AUDIO_DECODERS \
(INTERNAL_DECODER_LPCM || INTERNAL_DECODER_PS2AUDIO || INTERNAL_DECODER_REALAUDIO || INTERNAL_DECODER_PCM || INTERNAL_DECODER_AC3 || \
INTERNAL_DECODER_AAC || INTERNAL_DECODER_ALAC || INTERNAL_DECODER_ALS || INTERNAL_DECODER_DTS || INTERNAL_DECODER_MPEGAUDIO || \
- INTERNAL_DECODER_VORBIS || INTERNAL_DECODER_NELLYMOSER || INTERNAL_DECODER_AMR || INTERNAL_DECODER_ADPCM || INTERNAL_DECODER_FLAC)
+ INTERNAL_DECODER_VORBIS || INTERNAL_DECODER_NELLYMOSER || INTERNAL_DECODER_AMR || INTERNAL_DECODER_ADPCM || INTERNAL_DECODER_FLAC || \
+ INTERNAL_DECODER_OPUS)
#define HAS_VIDEO_DECODERS \
(INTERNAL_DECODER_MPEG1 || INTERNAL_DECODER_MPEG2 || INTERNAL_DECODER_REALVIDEO || INTERNAL_DECODER_H264 || INTERNAL_DECODER_HEVC || INTERNAL_DECODER_VC1 || \
diff --git a/src/mpc-hc/Logger.h b/src/mpc-hc/Logger.h
index 6855733e3..3eb09c823 100644
--- a/src/mpc-hc/Logger.h
+++ b/src/mpc-hc/Logger.h
@@ -22,6 +22,7 @@
#include <mutex>
#include <sys/timeb.h>
+#include "AppSettings.h"
#include "mplayerc.h"
enum class LogTargets {
diff --git a/src/mpc-hc/MainFrm.cpp b/src/mpc-hc/MainFrm.cpp
index 86fcf7d71..22fe1f5b8 100644
--- a/src/mpc-hc/MainFrm.cpp
+++ b/src/mpc-hc/MainFrm.cpp
@@ -56,6 +56,8 @@
#include "UpdateChecker.h"
#include "UpdateCheckerDlg.h"
#include "WinapiFunc.h"
+#include "CrashReporter.h"
+#include "Translations.h"
#include "../DeCSS/VobFile.h"
@@ -104,6 +106,8 @@
#include <mvrInterfaces.h>
#include <SubRenderIntf.h>
+#include <strsafe.h>
+
template<typename T>
bool NEARLY_EQ(T a, T b, T tol)
{
@@ -128,7 +132,7 @@ static UINT s_uTBBC = RegisterWindowMessage(_T("TaskbarButtonCreated"));
#include "MediaInfo/MediaInfo.h"
using namespace MediaInfoLib;
#else
-#include "MediaInfoDLL.h"
+#include "MediaInfoDLL/MediaInfoDLL.h"
using namespace MediaInfoDLL;
#endif
@@ -187,6 +191,8 @@ BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_MESSAGE_VOID(WM_DISPLAYCHANGE, OnDisplayChange)
ON_WM_WINDOWPOSCHANGING()
+ ON_MESSAGE(0x02E0, OnDpiChanged)
+
ON_WM_SYSCOMMAND()
ON_WM_ACTIVATEAPP()
ON_MESSAGE(WM_APPCOMMAND, OnAppCommand)
@@ -229,8 +235,6 @@ BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_COMMAND_RANGE(ID_STREAM_AUDIO_NEXT, ID_STREAM_AUDIO_PREV, OnStreamAudio)
ON_COMMAND_RANGE(ID_STREAM_SUB_NEXT, ID_STREAM_SUB_PREV, OnStreamSub)
ON_COMMAND(ID_STREAM_SUB_ONOFF, OnStreamSubOnOff)
- ON_COMMAND_RANGE(ID_OGM_AUDIO_NEXT, ID_OGM_AUDIO_PREV, OnOgmAudio)
- ON_COMMAND_RANGE(ID_OGM_SUB_NEXT, ID_OGM_SUB_PREV, OnOgmSub)
ON_COMMAND_RANGE(ID_DVD_ANGLE_NEXT, ID_DVD_ANGLE_PREV, OnDvdAngle)
ON_COMMAND_RANGE(ID_DVD_AUDIO_NEXT, ID_DVD_AUDIO_PREV, OnDvdAudio)
ON_COMMAND_RANGE(ID_DVD_SUB_NEXT, ID_DVD_SUB_PREV, OnDvdSub)
@@ -677,6 +681,9 @@ void CMainFrame::EventCallback(MpcEvent ev)
break;
case MpcEvent::CHANGING_UI_LANGUAGE:
UpdateUILanguage();
+ if (CrashReporter::IsEnabled()) {
+ CrashReporter::Enable(Translations::GetLanguageResourceByLocaleID(s.language).dllPath);
+ }
break;
case MpcEvent::STREAM_POS_UPDATE_REQUEST:
OnTimer(TIMER_STREAMPOSPOLLER);
@@ -693,18 +700,42 @@ void CMainFrame::EventCallback(MpcEvent ev)
CMainFrame::CMainFrame()
: m_timer32Hz(this, TIMER_32HZ, 32)
, m_timerOneTime(this, TIMER_ONETIME_START, TIMER_ONETIME_END - TIMER_ONETIME_START + 1)
- , m_eMediaLoadState(MLS::CLOSED)
- , m_iPlaybackMode(PM_NONE)
- , m_bFirstPlay(false)
+ , m_bUsingDXVA(false)
+ , m_posFirstExtSub(nullptr)
+ , m_bDelaySetOutputRect(false)
+ , m_nJumpToSubMenusCount(0)
+ , m_nLoops(0)
+ , m_nLastSkipDirection(0)
+ , m_fCustomGraph(false)
+ , m_fRealMediaGraph(false)
+ , m_fShockwaveGraph(false)
+ , m_fQuicktimeGraph(false)
+ , m_fFrameSteppingActive(false)
+ , m_nStepForwardCount(0)
+ , m_rtStepForwardStart(0)
+ , m_nVolumeBeforeFrameStepping(0)
+ , m_fEndOfStream(false)
+ , m_bRememberFilePos(false)
, m_dwLastRun(0)
- , m_dSpeedRate(1.0)
+ , m_bBuffering(false)
+ , m_fLiveWM(false)
, m_rtDurationOverride(-1)
+ , m_iPlaybackMode(PM_NONE)
+ , m_lCurrentChapter(0)
+ , m_lChapterStartTime(0xFFFFFFFF)
+ , m_eMediaLoadState(MLS::CLOSED)
, m_fFullScreen(false)
, m_fFirstFSAfterLaunchOnFS(false)
+ , m_fStartInD3DFullscreen(false)
, m_pLastBar(nullptr)
- , m_nLoops(0)
- , m_nLastSkipDirection(0)
- , m_posFirstExtSub(nullptr)
+ , m_bFirstPlay(false)
+ , m_bOpeningInAutochangedMonitorMode(false)
+ , m_bPausedForAutochangeMonitorMode(false)
+ , m_fAudioOnly(true)
+ , m_LastWindow_HM(nullptr)
+ , m_iDVDDomain(DVD_DOMAIN_Stop)
+ , m_iDVDTitle(0)
+ , m_dSpeedRate(1.0)
, m_ZoomX(1)
, m_ZoomY(1)
, m_PosX(0.5)
@@ -712,70 +743,45 @@ CMainFrame::CMainFrame()
, m_AngleX(0)
, m_AngleY(0)
, m_AngleZ(0)
- , m_fCustomGraph(false)
- , m_fRealMediaGraph(false)
- , m_fShockwaveGraph(false)
- , m_fQuicktimeGraph(false)
- , m_fFrameSteppingActive(false)
- , m_fEndOfStream(false)
- , m_fCapturing(false)
- , m_fLiveWM(false)
- , m_fOpeningAborted(false)
- , m_bBuffering(false)
- , m_bUsingDXVA(false)
- , m_bTrayIcon(false)
- , m_pFullscreenWnd(nullptr)
- , m_pVideoWnd(nullptr)
- , m_bOSDDisplayTime(false)
- , m_nCurSubtitle(-1)
- , m_lSubtitleShift(0)
- , m_nStepForwardCount(0)
- , m_rtStepForwardStart(0)
- , m_lCurrentChapter(0)
- , m_lChapterStartTime(0xFFFFFFFF)
, m_pGraphThread(nullptr)
, m_bOpenedThroughThread(false)
, m_evOpenPrivateFinished(FALSE, TRUE)
, m_evClosePrivateFinished(FALSE, TRUE)
- , m_pActiveContextMenu(nullptr)
- , m_pActiveSystemMenu(nullptr)
+ , m_fOpeningAborted(false)
, m_bWasSnapped(false)
- , m_bIsBDPlay(false)
- , m_bLockedZoomVideoWindow(false)
- , m_nLockedZoomVideoWindow(0)
- , m_fStartInD3DFullscreen(false)
- , m_bRememberFilePos(false)
- , m_wndView(this)
- , m_bShowingFloatingMenubar(false)
+ , m_bTrayIcon(false)
+ , m_fCapturing(false)
, m_controls(this)
+ , m_wndView(this)
, m_wndSeekBar(this)
, m_wndToolBar(this)
- , m_wndNavigationBar(this)
- , m_OSD(this)
- , m_bDelaySetOutputRect(false)
- , m_bOpeningInAutochangedMonitorMode(false)
- , m_bPausedForAutochangeMonitorMode(false)
- , m_wndPlaylistBar(this)
- , m_wndCaptureBar(this)
, m_wndInfoBar(this)
, m_wndStatsBar(this)
, m_wndStatusBar(this)
- , m_bAltDownClean(false)
- , m_nJumpToSubMenusCount(0)
- , m_nVolumeBeforeFrameStepping(0)
- , m_fAudioOnly(true)
- , m_LastWindow_HM(nullptr)
- , m_iDVDDomain(DVD_DOMAIN_Stop)
- , m_iDVDTitle(0)
+ , m_wndPlaylistBar(this)
+ , m_wndSubresyncBar(this)
+ , m_wndCaptureBar(this)
+ , m_wndNavigationBar(this)
+ , m_pVideoWnd(nullptr)
+ , m_pFullscreenWnd(nullptr)
+ , m_OSD(this)
+ , m_bOSDDisplayTime(false)
+ , m_nCurSubtitle(-1)
+ , m_lSubtitleShift(0)
, m_rtCurSubPos(0)
, m_bScanDlgOpened(false)
, m_bStopTunerScan(false)
+ , m_bLockedZoomVideoWindow(false)
+ , m_nLockedZoomVideoWindow(0)
+ , m_pActiveContextMenu(nullptr)
+ , m_pActiveSystemMenu(nullptr)
+ , m_bAltDownClean(false)
+ , m_bShowingFloatingMenubar(false)
, m_bAllowWindowZoom(false)
, m_dLastVideoScaleFactor(0)
- , m_nLastVideoWidth(0)
, m_bExtOnTop(false)
+ , m_bIsBDPlay(false)
{
- m_Lcd.SetVolumeRange(0, 100);
// Don't let CFrameWnd handle automatically the state of the menu items.
// This means that menu items without handlers won't be automatically
// disabled but it avoids some unwanted cases where programmatically
@@ -804,6 +810,7 @@ CMainFrame::CMainFrame()
fires.insert(MpcEvent::CONTEXT_MENU_POPUP_UNINITIALIZED);
fires.insert(MpcEvent::SYSTEM_MENU_POPUP_INITIALIZED);
fires.insert(MpcEvent::SYSTEM_MENU_POPUP_UNINITIALIZED);
+ fires.insert(MpcEvent::DPI_CHANGED);
GetEventd().Connect(m_eventc, receives, std::bind(&CMainFrame::EventCallback, this, std::placeholders::_1), fires);
}
@@ -817,6 +824,10 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
return -1;
}
+ if (SysVersion::Is81OrLater()) {
+ m_dpi.Override(m_hWnd);
+ }
+
const WinapiFunc<decltype(ChangeWindowMessageFilterEx)>
fnChangeWindowMessageFilterEx = { "user32.dll", "ChangeWindowMessageFilterEx" };
@@ -917,6 +928,9 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
ShowTrayIcon(s.fTrayIcon);
+ m_Lcd.SetVolumeRange(0, 100);
+ m_Lcd.SetVolume(std::max(1, s.nVolume));
+
m_pGraphThread = (CGraphThread*)AfxBeginThread(RUNTIME_CLASS(CGraphThread));
if (m_pGraphThread) {
@@ -1140,7 +1154,7 @@ BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
}
}
- if ((m_dwMenuBarVisibility & AFX_MBV_DISPLAYONF10) && pMsg->message == WM_SYSKEYUP && pMsg->wParam == VK_F10 &&
+ if ((m_dwMenuBarVisibility & AFX_MBV_DISPLAYONFOCUS) && pMsg->message == WM_SYSKEYUP && pMsg->wParam == VK_F10 &&
m_dwMenuBarState == AFX_MBS_VISIBLE) {
// mfc doesn't hide menubar on f10, but we want to
VERIFY(SetMenuBarState(AFX_MBS_HIDDEN));
@@ -1240,54 +1254,45 @@ BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO*
void CMainFrame::OnGetMinMaxInfo(MINMAXINFO* lpMMI)
{
auto setLarger = [](long & a, long b) {
- a = max(a, b);
+ a = std::max(a, b);
};
const long saneSize = 110;
+ const bool bMenuVisible = GetMenuBarVisibility() == AFX_MBV_KEEPVISIBLE || m_bShowingFloatingMenubar;
- {
- // Begin with docked controls
- lpMMI->ptMinTrackSize = CPoint(m_controls.GetDockZonesMinSize(saneSize));
- }
+ // Begin with docked controls
+ lpMMI->ptMinTrackSize = CPoint(m_controls.GetDockZonesMinSize(saneSize));
- if (GetMenuBarVisibility() == AFX_MBV_KEEPVISIBLE || m_bShowingFloatingMenubar) {
- // Add menubar height
- lpMMI->ptMinTrackSize.y += GetSystemMetrics(SM_CYMENU);
+ if (bMenuVisible) {
// Ensure that menubar will fit horizontally
MENUBARINFO mbi = { sizeof(mbi) };
- ::GetMenuBarInfo(m_hWnd, OBJID_MENU, 0, &mbi);
+ GetMenuBarInfo(OBJID_MENU, 0, &mbi);
long x = GetSystemMetrics(SM_CYMENU) / 2; // free space after menu
CRect rect;
- for (int i = 0; ::GetMenuItemRect(m_hWnd, mbi.hMenu, i, &rect); i++) {
+ for (int i = 0; GetMenuItemRect(m_hWnd, mbi.hMenu, i, &rect); i++) {
x += rect.Width();
}
setLarger(lpMMI->ptMinTrackSize.x, x);
}
- if (IsWindow(m_wndToolBar.m_hWnd) && m_controls.ControlChecked(CMainFrameControls::Toolbar::CONTROLS)) {
+ if (IsWindow(m_wndToolBar) && m_controls.ControlChecked(CMainFrameControls::Toolbar::CONTROLS)) {
// Ensure that Controls toolbar will fit
setLarger(lpMMI->ptMinTrackSize.x, m_wndToolBar.GetMinWidth());
}
- {
- // Add window frame
- DWORD style = GetStyle();
- if (style & WS_CAPTION) {
- lpMMI->ptMinTrackSize.y += GetSystemMetrics(SM_CYCAPTION);
- }
- if (style & WS_THICKFRAME) {
- lpMMI->ptMinTrackSize.x += GetSystemMetrics(SM_CXSIZEFRAME) * 2;
- lpMMI->ptMinTrackSize.y += GetSystemMetrics(SM_CYSIZEFRAME) * 2;
- if (!(style & WS_CAPTION)) {
- lpMMI->ptMinTrackSize.x -= GetSystemMetrics(SM_CXBORDER) * 2;
- lpMMI->ptMinTrackSize.y -= GetSystemMetrics(SM_CYBORDER) * 2;
- }
- }
- }
+ // Ensure that window decorations will fit
+ CRect decorationsRect;
+ VERIFY(AdjustWindowRectEx(decorationsRect, GetWindowStyle(m_hWnd), bMenuVisible, GetWindowExStyle(m_hWnd)));
+ lpMMI->ptMinTrackSize.x += decorationsRect.Width();
+ lpMMI->ptMinTrackSize.y += decorationsRect.Height();
// Final fence
- setLarger(lpMMI->ptMinTrackSize.x, 16);
- setLarger(lpMMI->ptMinTrackSize.y, 16);
+ setLarger(lpMMI->ptMinTrackSize.x, GetSystemMetrics(SM_CXMIN));
+ setLarger(lpMMI->ptMinTrackSize.y, GetSystemMetrics(SM_CYMIN));
+
+ lpMMI->ptMaxTrackSize.x = GetSystemMetrics(SM_CXVIRTUALSCREEN) + decorationsRect.Width();
+ lpMMI->ptMaxTrackSize.y = GetSystemMetrics(SM_CYVIRTUALSCREEN)
+ + ((GetStyle() & WS_THICKFRAME) ? GetSystemMetrics(SM_CYSIZEFRAME) : 0);
}
void CMainFrame::OnMove(int x, int y)
@@ -1340,6 +1345,9 @@ void CMainFrame::OnMoving(UINT fwSide, LPRECT pRect)
CRect areaRect;
CMonitors::GetNearestMonitor(this).GetWorkAreaRect(areaRect);
+ if (SysVersion::Is10OrLater()) {
+ areaRect.InflateRect(GetInvisibleBorderSize());
+ }
bool bSnapping = false;
@@ -1551,6 +1559,15 @@ void CMainFrame::OnWindowPosChanging(WINDOWPOS* lpwndpos)
__super::OnWindowPosChanging(lpwndpos);
}
+LRESULT CMainFrame::OnDpiChanged(WPARAM wParam, LPARAM lParam)
+{
+ m_dpi.Override(LOWORD(wParam), HIWORD(wParam));
+ m_eventc.FireEvent(MpcEvent::DPI_CHANGED);
+ MoveWindow(reinterpret_cast<RECT*>(lParam));
+ RecalcLayout();
+ return 0;
+}
+
void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam)
{
// Only stop screensaver if video playing; allow for audio only
@@ -2013,7 +2030,7 @@ void CMainFrame::OnTimer(UINT_PTR nIDEvent)
CString lang;
if (AATR.Language) {
int len = GetLocaleInfo(AATR.Language, LOCALE_SENGLANGUAGE, lang.GetBuffer(64), 64);
- lang.ReleaseBufferSetLength(max(len - 1, 0));
+ lang.ReleaseBufferSetLength(std::max(len - 1, 0));
} else {
lang.Format(IDS_AG_UNKNOWN, ulCurrent + 1);
}
@@ -2065,7 +2082,7 @@ void CMainFrame::OnTimer(UINT_PTR nIDEvent)
&& SUCCEEDED(m_pDVDI->GetSubpictureAttributes(ulCurrent, &SATR))) {
CString lang;
int len = GetLocaleInfo(SATR.Language, LOCALE_SENGLANGUAGE, lang.GetBuffer(64), 64);
- lang.ReleaseBufferSetLength(max(len - 1, 0));
+ lang.ReleaseBufferSetLength(std::max(len - 1, 0));
switch (SATR.LanguageExtension) {
case DVD_SP_EXT_NotSpecified:
@@ -2631,24 +2648,9 @@ LRESULT CMainFrame::OnGraphNotify(WPARAM wParam, LPARAM lParam)
case EC_VIDEO_SIZE_CHANGED: {
CSize size((DWORD)evParam1);
TRACE(_T("\t%ldx%ld\n"), size.cx, size.cy);
-
const bool bWasAudioOnly = m_fAudioOnly;
m_fAudioOnly = (size.cx <= 0 || size.cy <= 0);
-
- if (GetLoadState() == MLS::LOADED &&
- ((s.fRememberZoomLevel && (s.fLimitWindowProportions || m_bAllowWindowZoom)) || m_fAudioOnly || bWasAudioOnly) &&
- !(m_fFullScreen || IsD3DFullScreenMode() || IsZoomed() || IsIconic() || IsAeroSnapped())) {
- CSize videoSize;
- if (!m_fAudioOnly && !m_bAllowWindowZoom) {
- videoSize = GetVideoSize();
- }
- if (videoSize.cx) {
- ZoomVideoWindow(m_dLastVideoScaleFactor * m_nLastVideoWidth / videoSize.cx);
- } else {
- ZoomVideoWindow();
- }
- }
- MoveVideoWindow();
+ OnVideoSizeChanged(bWasAudioOnly);
}
break;
case EC_LENGTH_CHANGED: {
@@ -2945,8 +2947,6 @@ void CMainFrame::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu)
//pPopupMenu->ModifyMenu(i, MF_BYPOSITION|MF_STRING, nID, str);
// this works fine
- MENUITEMINFO mii;
- mii.cbSize = sizeof(mii);
mii.fMask = MIIM_STRING;
mii.dwTypeData = (LPTSTR)(LPCTSTR)str;
VERIFY(pPopupMenu->SetMenuItemInfo(i, &mii, TRUE));
@@ -3082,7 +3082,7 @@ void CMainFrame::OnUpdatePlayerStatus(CCmdUI* pCmdUI)
{
if (GetLoadState() == MLS::LOADING) {
m_wndStatusBar.SetStatusMessage(ResStr(IDS_CONTROLS_OPENING));
- if (AfxGetAppSettings().fUseWin7TaskBar && m_pTaskbarList) {
+ if (AfxGetAppSettings().bUseEnhancedTaskBar && m_pTaskbarList) {
m_pTaskbarList->SetProgressState(m_hWnd, TBPF_INDETERMINATE);
}
} else if (GetLoadState() == MLS::LOADED) {
@@ -3195,7 +3195,7 @@ void CMainFrame::OnUpdatePlayerStatus(CCmdUI* pCmdUI)
m_wndStatusBar.SetStatusMessage(UI_Text);
} else if (GetLoadState() == MLS::CLOSING) {
m_wndStatusBar.SetStatusMessage(ResStr(IDS_CONTROLS_CLOSING));
- if (AfxGetAppSettings().fUseWin7TaskBar && m_pTaskbarList) {
+ if (AfxGetAppSettings().bUseEnhancedTaskBar && m_pTaskbarList) {
m_pTaskbarList->SetProgressState(m_hWnd, TBPF_INDETERMINATE);
}
} else {
@@ -3518,41 +3518,24 @@ void CMainFrame::OnStreamAudio(UINT nID)
DWORD cStreams = 0;
if (pSS && SUCCEEDED(pSS->Count(&cStreams)) && cStreams > 1) {
for (DWORD i = 0; i < cStreams; i++) {
- AM_MEDIA_TYPE* pmt = nullptr;
DWORD dwFlags = 0;
LCID lcid = 0;
DWORD dwGroup = 0;
- WCHAR* pszName = nullptr;
- if (FAILED(pSS->Info(i, &pmt, &dwFlags, &lcid, &dwGroup, &pszName, nullptr, nullptr))) {
+ CComHeapPtr<WCHAR> pszName;
+ if (FAILED(pSS->Info(i, nullptr, &dwFlags, &lcid, &dwGroup, &pszName, nullptr, nullptr))) {
return;
}
-
- if (pmt) {
- DeleteMediaType(pmt);
- }
- if (pszName) {
- CoTaskMemFree(pszName);
- }
-
if (dwFlags & (AMSTREAMSELECTINFO_ENABLED | AMSTREAMSELECTINFO_EXCLUSIVE)) {
long stream_index = (i + (nID == 0 ? 1 : cStreams - 1)) % cStreams;
pSS->Enable(stream_index, AMSTREAMSELECTENABLE_ENABLE);
- if (SUCCEEDED(pSS->Info(stream_index, &pmt, &dwFlags, &lcid, &dwGroup, &pszName, nullptr, nullptr))) {
- CString strMessage;
- strMessage.Format(IDS_AUDIO_STREAM, pszName);
- m_OSD.DisplayMessage(OSD_TOPLEFT, strMessage);
- if (pmt) {
- DeleteMediaType(pmt);
- }
- if (pszName) {
- CoTaskMemFree(pszName);
- }
+ if (SUCCEEDED(pSS->Info(stream_index, nullptr, &dwFlags, &lcid, &dwGroup, &pszName, nullptr, nullptr))) {
+ m_OSD.DisplayMessage(OSD_TOPLEFT, GetStreamOSDString(CString(pszName), lcid, 1));
}
break;
}
}
} else if (GetPlaybackMode() == PM_FILE) {
- SendMessage(WM_COMMAND, ID_OGM_AUDIO_NEXT + nID);
+ OnStreamSelect(nID == 0, 1);
} else if (GetPlaybackMode() == PM_DVD) {
SendMessage(WM_COMMAND, ID_DVD_AUDIO_NEXT + nID);
}
@@ -3570,7 +3553,7 @@ void CMainFrame::OnStreamSub(UINT nID)
SetSubtitle(nID == 0 ? 1 : -1, true, true);
SetFocus();
} else if (GetPlaybackMode() == PM_FILE) {
- SendMessage(WM_COMMAND, ID_OGM_SUB_NEXT + nID);
+ OnStreamSelect(nID == 0, 2);
} else if (GetPlaybackMode() == PM_DVD) {
SendMessage(WM_COMMAND, ID_DVD_SUB_NEXT + nID);
}
@@ -3590,159 +3573,6 @@ void CMainFrame::OnStreamSubOnOff()
}
}
-void CMainFrame::OnOgmAudio(UINT nID)
-{
- nID -= ID_OGM_AUDIO_NEXT;
-
- if (GetLoadState() != MLS::LOADED) {
- return;
- }
-
- CComQIPtr<IAMStreamSelect> pSS = FindSourceSelectableFilter();
- if (!pSS) {
- return;
- }
-
- CAtlArray<int> snds;
-
- DWORD cStreams = 0;
- if (SUCCEEDED(pSS->Count(&cStreams)) && cStreams > 1) {
- INT_PTR iSel = -1;
- for (int i = 0; i < (int)cStreams; i++) {
- AM_MEDIA_TYPE* pmt = nullptr;
- DWORD dwFlags = 0;
- LCID lcid = 0;
- DWORD dwGroup = 0;
- WCHAR* pszName = nullptr;
- if (FAILED(pSS->Info(i, &pmt, &dwFlags, &lcid, &dwGroup, &pszName, nullptr, nullptr))) {
- return;
- }
-
- if (dwGroup == 1) {
- if (dwFlags & (AMSTREAMSELECTINFO_ENABLED | AMSTREAMSELECTINFO_EXCLUSIVE)) {
- iSel = snds.GetCount();
- }
- snds.Add(i);
- }
-
- if (pmt) {
- DeleteMediaType(pmt);
- }
- if (pszName) {
- CoTaskMemFree(pszName);
- }
-
- }
-
- size_t cnt = snds.GetCount();
- if (cnt > 1 && iSel >= 0) {
- int nNewStream = snds[(iSel + (nID == 0 ? 1 : cnt - 1)) % cnt];
- pSS->Enable(nNewStream, AMSTREAMSELECTENABLE_ENABLE);
-
- AM_MEDIA_TYPE* pmt = nullptr;
- DWORD dwFlags = 0;
- LCID lcid = 0;
- DWORD dwGroup = 0;
- WCHAR* pszName = nullptr;
-
- if (SUCCEEDED(pSS->Info(nNewStream, &pmt, &dwFlags, &lcid, &dwGroup, &pszName, nullptr, nullptr))) {
- CString strMessage;
- CString audio_stream = pszName;
- int k = audio_stream.Find(_T("Audio - "));
- if (k >= 0) {
- audio_stream = audio_stream.Right(audio_stream.GetLength() - k - 8);
- }
- strMessage.Format(IDS_AUDIO_STREAM, audio_stream);
- m_OSD.DisplayMessage(OSD_TOPLEFT, strMessage);
-
- if (pmt) {
- DeleteMediaType(pmt);
- }
- if (pszName) {
- CoTaskMemFree(pszName);
- }
- }
- }
- }
-}
-
-void CMainFrame::OnOgmSub(UINT nID)
-{
- nID -= ID_OGM_SUB_NEXT;
-
- if (GetLoadState() != MLS::LOADED) {
- return;
- }
-
- CComQIPtr<IAMStreamSelect> pSS = FindSourceSelectableFilter();
- if (!pSS) {
- return;
- }
-
- CArray<int> subs;
-
- DWORD cStreams = 0;
- if (SUCCEEDED(pSS->Count(&cStreams)) && cStreams > 1) {
- INT_PTR iSel = -1;
- for (int i = 0; i < (int)cStreams; i++) {
- AM_MEDIA_TYPE* pmt = nullptr;
- DWORD dwFlags = 0;
- LCID lcid = 0;
- DWORD dwGroup = 0;
- WCHAR* pszName = nullptr;
- if (FAILED(pSS->Info(i, &pmt, &dwFlags, &lcid, &dwGroup, &pszName, nullptr, nullptr))) {
- return;
- }
-
- if (dwGroup == 2) {
- if (dwFlags & (AMSTREAMSELECTINFO_ENABLED | AMSTREAMSELECTINFO_EXCLUSIVE)) {
- iSel = subs.GetCount();
- }
- subs.Add(i);
- }
-
- if (pmt) {
- DeleteMediaType(pmt);
- }
- if (pszName) {
- CoTaskMemFree(pszName);
- }
-
- }
-
- INT_PTR cnt = subs.GetCount();
- if (cnt > 1 && iSel >= 0) {
- int nNewStream = subs[(iSel + (nID == 0 ? 1 : cnt - 1)) % cnt];
- pSS->Enable(nNewStream, AMSTREAMSELECTENABLE_ENABLE);
-
- AM_MEDIA_TYPE* pmt = nullptr;
- DWORD dwFlags = 0;
- LCID lcid = 0;
- DWORD dwGroup = 0;
- WCHAR* pszName = nullptr;
- if (SUCCEEDED(pSS->Info(nNewStream, &pmt, &dwFlags, &lcid, &dwGroup, &pszName, nullptr, nullptr))) {
- CString lang;
- CString strMessage;
- if (lcid == 0) {
- lang = pszName;
- } else {
- int len = GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, lang.GetBuffer(64), 64);
- lang.ReleaseBufferSetLength(max(len - 1, 0));
- }
-
- strMessage.Format(IDS_SUBTITLE_STREAM, lang);
- m_OSD.DisplayMessage(OSD_TOPLEFT, strMessage);
- if (pmt) {
- DeleteMediaType(pmt);
- }
- if (pszName) {
- CoTaskMemFree(pszName);
- }
- }
- }
- }
-}
-
void CMainFrame::OnDvdAngle(UINT nID)
{
if (GetLoadState() != MLS::LOADED) {
@@ -3787,7 +3617,7 @@ void CMainFrame::OnDvdAudio(UINT nID)
CString strMessage;
if (AATR.Language) {
int len = GetLocaleInfo(AATR.Language, LOCALE_SENGLANGUAGE, lang.GetBuffer(64), 64);
- lang.ReleaseBufferSetLength(max(len - 1, 0));
+ lang.ReleaseBufferSetLength(std::max(len - 1, 0));
} else {
lang.Format(IDS_AG_UNKNOWN, nNextStream + 1);
}
@@ -3846,7 +3676,7 @@ void CMainFrame::OnDvdSub(UINT nID)
CString lang;
CString strMessage;
int len = GetLocaleInfo(SATR.Language, LOCALE_SENGLANGUAGE, lang.GetBuffer(64), 64);
- lang.ReleaseBufferSetLength(max(len - 1, 0));
+ lang.ReleaseBufferSetLength(std::max(len - 1, 0));
lang += FAILED(hr) ? _T(" [") + ResStr(IDS_AG_ERROR) + _T("] ") : _T("");
strMessage.Format(IDS_SUBTITLE_STREAM, lang);
m_OSD.DisplayMessage(OSD_TOPLEFT, strMessage);
@@ -4330,7 +4160,8 @@ DROPEFFECT CMainFrame::OnDropAccept(COleDataObject* pDataObject, DWORD dwKeyStat
ClientToScreen(&point);
if (CMouse::CursorOnRootWindow(point, *this)) {
UpdateControlState(UPDATE_CONTROLS_VISIBILITY);
- return (dwKeyState & MK_CONTROL) ? DROPEFFECT_COPY : DROPEFFECT_MOVE;
+ return (dwKeyState & MK_CONTROL) ? (DROPEFFECT_COPY | DROPEFFECT_APPEND)
+ : (DROPEFFECT_MOVE | DROPEFFECT_LINK | DROPEFFECT_COPY);
}
return DROPEFFECT_NONE;
@@ -4382,7 +4213,7 @@ void CMainFrame::OnDropFiles(CAtlList<CString>& slFiles, DROPEFFECT dropEffect)
}
SendStatusMessage(filenames + ResStr(IDS_SUB_LOADED_SUCCESS), 3000);
} else {
- if (dropEffect & DROPEFFECT_COPY) {
+ if (dropEffect & DROPEFFECT_APPEND) {
m_wndPlaylistBar.Append(slFiles, true);
} else {
m_wndPlaylistBar.Open(slFiles, true);
@@ -4591,21 +4422,21 @@ void CMainFrame::SaveDIB(LPCTSTR fn, BYTE* pData, long size)
Gdiplus::Bitmap* bm = new Gdiplus::Bitmap(w, h, dstpitch, PixelFormat24bppRGB, p);
- UINT num; // number of image encoders
- UINT size; // size, in bytes, of the image encoder array
+ UINT num; // number of image encoders
+ UINT arraySize; // size, in bytes, of the image encoder array
// How many encoders are there?
// How big (in bytes) is the array of all ImageCodecInfo objects?
- Gdiplus::GetImageEncodersSize(&num, &size);
+ Gdiplus::GetImageEncodersSize(&num, &arraySize);
// Create a buffer large enough to hold the array of ImageCodecInfo
// objects that will be returned by GetImageEncoders.
- Gdiplus::ImageCodecInfo* pImageCodecInfo = (Gdiplus::ImageCodecInfo*)DEBUG_NEW BYTE[size];
+ Gdiplus::ImageCodecInfo* pImageCodecInfo = (Gdiplus::ImageCodecInfo*)DEBUG_NEW BYTE[arraySize];
// GetImageEncoders creates an array of ImageCodecInfo objects
// and copies that array into a previously allocated buffer.
// The third argument, imageCodecInfos, is a pointer to that buffer.
- Gdiplus::GetImageEncoders(num, size, pImageCodecInfo);
+ Gdiplus::GetImageEncoders(num, arraySize, pImageCodecInfo);
Gdiplus::EncoderParameters* pEncoderParameters = nullptr;
@@ -4720,12 +4551,12 @@ void CMainFrame::SaveThumbnails(LPCTSTR fn)
const CAppSettings& s = AfxGetAppSettings();
- int cols = max(1, min(10, s.iThumbCols));
- int rows = max(1, min(20, s.iThumbRows));
+ int cols = std::max(1, std::min(10, s.iThumbCols));
+ int rows = std::max(1, std::min(20, s.iThumbRows));
const int margin = 5;
const int infoheight = 70;
- int width = max(256, min(2560, s.iThumbWidth));
+ int width = std::max(256, std::min(2560, s.iThumbWidth));
int height = width * szVideoARCorrected.cy / szVideoARCorrected.cx * rows / cols + infoheight;
int dibsize = sizeof(BITMAPINFOHEADER) + width * height * 4;
@@ -5225,13 +5056,14 @@ void CMainFrame::OnFileSavesubtitle()
return;
}
- CPath suggestedFileName(GetFileName());
- suggestedFileName.RemoveExtension(); // exclude the extension, it will be auto-completed
+ // exclude the extension, it will be auto-completed
+ CString suggestedFileName(PathUtils::FileName(GetFileName()));
// Try to detect the directory of the current playlist item, and prepend it if it's valid
CPath path(m_wndPlaylistBar.GetCurFileName());
- if (path.RemoveFileSpec() && path.IsDirectory() && path.Append(suggestedFileName)) {
- suggestedFileName = path;
+ if (path.RemoveFileSpec() && path.IsDirectory()) {
+ path.AddBackslash();
+ suggestedFileName = CString(path) + suggestedFileName;
}
if (clsid == __uuidof(CVobSubFile)) {
@@ -5344,7 +5176,6 @@ void CMainFrame::OnFileISDBDownload()
dlg.DoModal();
} catch (CInternetException* ie) {
ie->Delete();
- return;
}
}
@@ -5714,7 +5545,7 @@ void CMainFrame::OnUpdateViewFullFloatingPointProcessing(CCmdUI* pCmdUI)
bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS
|| s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM)
&& r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D)
- && rd.m_bFP16Support;
+ && rd.m_bFP32Support;
pCmdUI->Enable(supported);
pCmdUI->SetCheck(r.m_AdvRendSets.bVMR9FullFloatingPointProcessing);
@@ -6245,42 +6076,39 @@ void CMainFrame::SetCaptionState(MpcCaptionState eState)
DWORD dwMenuFlags = GetMenuBarVisibility();
CRect windowRect;
- GetWindowRect(&windowRect);
- const int base = MpcCaptionState::MODE_COUNT;
const bool bZoomed = !!IsZoomed();
+
+ if (!bZoomed) {
+ GetWindowRect(&windowRect);
+ CRect decorationsRect;
+ VERIFY(AdjustWindowRectEx(decorationsRect, GetWindowStyle(m_hWnd), dwMenuFlags == AFX_MBV_KEEPVISIBLE, GetWindowExStyle(m_hWnd)));
+ windowRect.bottom -= decorationsRect.bottom;
+ windowRect.right -= decorationsRect.right;
+ windowRect.top -= decorationsRect.top;
+ windowRect.left -= decorationsRect.left;
+ }
+
+ const int base = MpcCaptionState::MODE_COUNT;
for (int i = eOldState; i != eState; i = (i + 1) % base) {
switch (static_cast<MpcCaptionState>(i)) {
case MpcCaptionState::MODE_BORDERLESS:
dwMenuFlags = AFX_MBV_KEEPVISIBLE;
dwAdd |= (WS_CAPTION | WS_THICKFRAME);
dwRemove &= ~(WS_CAPTION | WS_THICKFRAME);
- windowRect.InflateRect(GetSystemMetrics(SM_CXSIZEFRAME), GetSystemMetrics(SM_CYSIZEFRAME));
- if (!bZoomed) {
- windowRect.bottom += GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYMENU);
- }
break;
case MpcCaptionState::MODE_SHOWCAPTIONMENU:
- dwMenuFlags = AFX_MBV_DISPLAYONFOCUS | AFX_MBV_DISPLAYONF10;
- if (!bZoomed) {
- windowRect.bottom -= GetSystemMetrics(SM_CYMENU);
- }
+ dwMenuFlags = AFX_MBV_DISPLAYONFOCUS;
break;
case MpcCaptionState::MODE_HIDEMENU:
- dwMenuFlags = AFX_MBV_DISPLAYONFOCUS | AFX_MBV_DISPLAYONF10;
+ dwMenuFlags = AFX_MBV_DISPLAYONFOCUS;
dwAdd &= ~WS_CAPTION;
dwRemove |= WS_CAPTION;
- windowRect.DeflateRect(GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
- if (!bZoomed) {
- windowRect.bottom -= GetSystemMetrics(SM_CYCAPTION);
- }
break;
case MpcCaptionState::MODE_FRAMEONLY:
- dwMenuFlags = AFX_MBV_DISPLAYONFOCUS | AFX_MBV_DISPLAYONF10;
+ dwMenuFlags = AFX_MBV_DISPLAYONFOCUS;
dwAdd &= ~WS_THICKFRAME;
dwRemove |= WS_THICKFRAME;
- windowRect.DeflateRect(GetSystemMetrics(SM_CXSIZEFRAME) - GetSystemMetrics(SM_CXBORDER),
- GetSystemMetrics(SM_CYSIZEFRAME) - GetSystemMetrics(SM_CYBORDER));
break;
default:
ASSERT(FALSE);
@@ -6288,12 +6116,17 @@ void CMainFrame::SetCaptionState(MpcCaptionState eState)
}
UINT uFlags = SWP_NOZORDER;
- if (dwRemove || dwAdd) {
+ if (dwRemove != dwAdd) {
uFlags |= SWP_FRAMECHANGED;
+ VERIFY(SetWindowLong(m_hWnd, GWL_STYLE, (GetWindowLong(m_hWnd, GWL_STYLE) | dwAdd) & ~dwRemove));
}
SetMenuBarVisibility(dwMenuFlags);
- VERIFY(SetWindowLong(m_hWnd, GWL_STYLE, (GetWindowLong(m_hWnd, GWL_STYLE) | dwAdd) & ~dwRemove));
+ if (bZoomed) {
+ CMonitors::GetNearestMonitor(this).GetWorkAreaRect(windowRect);
+ } else {
+ VERIFY(AdjustWindowRectEx(windowRect, GetWindowStyle(m_hWnd), dwMenuFlags == AFX_MBV_KEEPVISIBLE, GetWindowExStyle(m_hWnd)));
+ }
VERIFY(SetWindowPos(nullptr, windowRect.left, windowRect.top, windowRect.Width(), windowRect.Height(), uFlags));
}
@@ -6623,7 +6456,7 @@ void CMainFrame::OnViewKeepaspectratio()
CAppSettings& s = AfxGetAppSettings();
s.fKeepAspectRatio = !s.fKeepAspectRatio;
- MoveVideoWindow();
+ OnVideoSizeChanged();
}
void CMainFrame::OnUpdateViewKeepaspectratio(CCmdUI* pCmdUI)
@@ -6637,14 +6470,19 @@ void CMainFrame::OnViewCompMonDeskARDiff()
CAppSettings& s = AfxGetAppSettings();
s.fCompMonDeskARDiff = !s.fCompMonDeskARDiff;
- MoveVideoWindow();
+ OnVideoSizeChanged();
}
void CMainFrame::OnUpdateViewCompMonDeskARDiff(CCmdUI* pCmdUI)
{
const CAppSettings& s = AfxGetAppSettings();
- pCmdUI->Enable(GetLoadState() == MLS::LOADED && !m_fAudioOnly && s.iDSVideoRendererType != VIDRNDT_DS_EVR);
+ pCmdUI->Enable(GetLoadState() == MLS::LOADED
+ && !m_fAudioOnly
+ && s.iDSVideoRendererType != VIDRNDT_DS_EVR
+ // This doesn't work with madVR due to the fact that it positions video itself.
+ // And it has exactly the same option built in.
+ && s.iDSVideoRendererType != VIDRNDT_DS_MADVR);
pCmdUI->SetCheck(s.fCompMonDeskARDiff);
}
@@ -6662,6 +6500,9 @@ void CMainFrame::OnViewPanNScan(UINT nID)
m_ZoomX = m_ZoomY = 1.0;
m_PosX = m_PosY = 0.5;
m_AngleX = m_AngleY = m_AngleZ = 0;
+ if (m_pMVRC) {
+ m_pMVRC->SendCommandInt("rotate", 0);
+ }
break;
case ID_VIEW_INCSIZE:
x = y = 1;
@@ -6727,15 +6568,15 @@ void CMainFrame::OnViewPanNScan(UINT nID)
}
if (dx < 0 && m_PosX > 0) {
- m_PosX = max(m_PosX - 0.005 * m_ZoomX, 0.0);
+ m_PosX = std::max(m_PosX - 0.005 * m_ZoomX, 0.0);
} else if (dx > 0 && m_PosX < 1) {
- m_PosX = min(m_PosX + 0.005 * m_ZoomX, 1.0);
+ m_PosX = std::min(m_PosX + 0.005 * m_ZoomX, 1.0);
}
if (dy < 0 && m_PosY > 0) {
- m_PosY = max(m_PosY - 0.005 * m_ZoomY, 0.0);
+ m_PosY = std::max(m_PosY - 0.005 * m_ZoomY, 0.0);
} else if (dy > 0 && m_PosY < 1) {
- m_PosY = min(m_PosY + 0.005 * m_ZoomY, 1.0);
+ m_PosY = std::min(m_PosY + 0.005 * m_ZoomY, 1.0);
}
MoveVideoWindow(true);
@@ -6804,10 +6645,10 @@ void CMainFrame::OnViewPanNScanPresets(UINT nID)
return;
}
- m_PosX = min(max(m_PosX, 0.0), 1.0);
- m_PosY = min(max(m_PosY, 0.0), 1.0);
- m_ZoomX = min(max(m_ZoomX, 0.2), 3.0);
- m_ZoomY = min(max(m_ZoomY, 0.2), 3.0);
+ m_PosX = std::min(std::max(m_PosX, 0.0), 1.0);
+ m_PosY = std::min(std::max(m_PosY, 0.0), 1.0);
+ m_ZoomX = std::min(std::max(m_ZoomX, 0.2), 3.0);
+ m_ZoomY = std::min(std::max(m_ZoomY, 0.2), 3.0);
MoveVideoWindow(true);
}
@@ -6821,34 +6662,68 @@ void CMainFrame::OnUpdateViewPanNScanPresets(CCmdUI* pCmdUI)
void CMainFrame::OnViewRotate(UINT nID)
{
- if (!m_pCAP) {
- return;
- }
+ HRESULT hr = E_NOTIMPL;
- switch (nID) {
- case ID_PANSCAN_ROTATEXP:
- m_AngleX += 2;
- break;
- case ID_PANSCAN_ROTATEXM:
- m_AngleX -= 2;
- break;
- case ID_PANSCAN_ROTATEYP:
- m_AngleY += 2;
- break;
- case ID_PANSCAN_ROTATEYM:
- m_AngleY -= 2;
- break;
- case ID_PANSCAN_ROTATEZP:
- m_AngleZ += 2;
- break;
- case ID_PANSCAN_ROTATEZM:
- m_AngleZ -= 2;
- break;
- default:
+ if (m_pMVRC && m_pMVRI) {
+ int rotation;
+ if (FAILED(m_pMVRI->GetInt("rotation", &rotation))) {
return;
+ }
+
+ switch (nID) {
+ case ID_PANSCAN_ROTATEZP:
+ rotation += 270;
+ break;
+ case ID_PANSCAN_ROTATEZM:
+ rotation += 90;
+ break;
+ default:
+ return;
+ }
+ rotation %= 360;
+ ASSERT(rotation >= 0);
+
+ if (SUCCEEDED(hr = m_pMVRC->SendCommandInt("rotate", rotation))) {
+ m_AngleZ = (360 - rotation) % 360;
+ }
+ } else if (m_pCAP) {
+ switch (nID) {
+ case ID_PANSCAN_ROTATEXP:
+ m_AngleX += 2;
+ break;
+ case ID_PANSCAN_ROTATEXM:
+ m_AngleX += 360 - 2;
+ break;
+ case ID_PANSCAN_ROTATEYP:
+ m_AngleY += 2;
+ break;
+ case ID_PANSCAN_ROTATEYM:
+ m_AngleY += 360 - 2;
+ break;
+ case ID_PANSCAN_ROTATEZP:
+ m_AngleZ += 2;
+ break;
+ case ID_PANSCAN_ROTATEZM:
+ m_AngleZ += 360 - 2;
+ break;
+ default:
+ return;
+ }
+ m_AngleX %= 360;
+ m_AngleY %= 360;
+ m_AngleZ %= 360;
+
+ hr = m_pCAP->SetVideoAngle(Vector(Vector::DegToRad(m_AngleX), Vector::DegToRad(m_AngleY), Vector::DegToRad(m_AngleZ)));
+ }
+
+ if (FAILED(hr)) {
+ m_AngleX = m_AngleY = m_AngleZ = 0;
+ return;
}
- m_pCAP->SetVideoAngle(Vector(Vector::DegToRad(m_AngleX), Vector::DegToRad(m_AngleY), Vector::DegToRad(m_AngleZ)));
+ ASSERT(m_AngleX >= 0 && m_AngleX < 360);
+ ASSERT(m_AngleY >= 0 && m_AngleY < 360);
+ ASSERT(m_AngleZ >= 0 && m_AngleZ < 360);
CString info;
info.Format(_T("x: %d, y: %d, z: %d"), m_AngleX, m_AngleY, m_AngleZ);
@@ -6857,7 +6732,7 @@ void CMainFrame::OnViewRotate(UINT nID)
void CMainFrame::OnUpdateViewRotate(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(GetLoadState() == MLS::LOADED && !m_fAudioOnly && m_pCAP);
+ pCmdUI->Enable(GetLoadState() == MLS::LOADED && !m_fAudioOnly && (m_pCAP || (m_pMVRC && m_pMVRI)));
}
// FIXME
@@ -6878,7 +6753,7 @@ void CMainFrame::OnViewAspectRatio(UINT nID)
m_OSD.DisplayMessage(OSD_TOPLEFT, info, 3000);
- MoveVideoWindow();
+ OnVideoSizeChanged();
}
void CMainFrame::OnUpdateViewAspectRatio(CCmdUI* pCmdUI)
@@ -7015,7 +6890,7 @@ void CMainFrame::OnPlayPlay()
if (GetPlaybackMode() == PM_FILE) {
if (!m_LastOpenBDPath.IsEmpty()) {
- strOSD = strPlay + _T(" BD");
+ strOSD = ResStr(IDS_PLAY_BD);
} else {
strOSD = GetFileName();
if (!strOSD.IsEmpty()) {
@@ -7025,7 +6900,7 @@ void CMainFrame::OnPlayPlay()
}
}
} else if (GetPlaybackMode() == PM_DVD) {
- strOSD = strPlay + _T(" DVD");
+ strOSD = ResStr(IDS_PLAY_DVD);
}
}
@@ -7739,14 +7614,14 @@ void CMainFrame::OnPlayFilters(UINT nID)
if (settings.GetSettings(pLAVFSettings)) { // Get current settings from LAVSplitter
settings.SaveSettings(); // Save them to the registry/ini
}
- } else if (CComQIPtr<ILAVVideoSettings> pLAVFSettings = pBF) {
+ } else if (CComQIPtr<ILAVVideoSettings> pLAVVideoSettings = pBF) {
CFGFilterLAVVideo::Settings settings;
- if (settings.GetSettings(pLAVFSettings)) { // Get current settings from LAVVideo
+ if (settings.GetSettings(pLAVVideoSettings)) { // Get current settings from LAVVideo
settings.SaveSettings(); // Save them to the registry/ini
}
- } else if (CComQIPtr<ILAVAudioSettings> pLAVFSettings = pBF) {
+ } else if (CComQIPtr<ILAVAudioSettings> pLAVAudioSettings = pBF) {
CFGFilterLAVAudio::Settings settings;
- if (settings.GetSettings(pLAVFSettings)) { // Get current settings from LAVAudio
+ if (settings.GetSettings(pLAVAudioSettings)) { // Get current settings from LAVAudio
settings.SaveSettings(); // Save them to the registry/ini
}
}
@@ -8725,8 +8600,8 @@ public:
// ISequentialStream
STDMETHODIMP Read(void* pv, ULONG cb, ULONG* pcbRead) {
- size_t cbRead = min(m_data.GetCount() - m_pos, size_t(cb));
- cbRead = max(cbRead, size_t(0));
+ size_t cbRead = std::min(m_data.GetCount() - m_pos, size_t(cb));
+ cbRead = std::max(cbRead, size_t(0));
if (cbRead) {
memcpy(pv, &m_data[m_pos], cbRead);
}
@@ -8831,12 +8706,11 @@ void CMainFrame::AddFavorite(bool fDisplayMessage, bool fShowDialog)
args.AddTail(name);
// RememberPos
- CString pos(_T("0"));
+ CString posStr = _T("0");
if (s.bFavRememberPos) {
- pos.Format(_T("%I64d"), GetPos());
+ posStr.Format(_T("%I64d"), GetPos());
}
-
- args.AddTail(pos);
+ args.AddTail(posStr);
// RelativeDrive
CString relativeDrive;
@@ -9013,7 +8887,7 @@ void CMainFrame::PlayFavoriteFile(CString fav)
args.RemoveHeadNoReturn(); // desc / name
_stscanf_s(args.RemoveHead(), _T("%I64d"), &rtStart); // pos
_stscanf_s(args.RemoveHead(), _T("%d"), &bRelativeDrive); // relative drive
- rtStart = max(rtStart, 0ll);
+ rtStart = std::max(rtStart, 0ll);
// NOTE: This is just for the favorites but we could add a global settings that does this always when on. Could be useful when using removable devices.
// All you have to do then is plug in your 500 gb drive, full with movies and/or music, start MPC-HC (from the 500 gb drive) with a preloaded playlist and press play.
@@ -9177,7 +9051,7 @@ void CMainFrame::SetDefaultWindowRect(int iMonitor)
} else if (s.eCaptionMenuMode == MODE_BORDERLESS) {
ModifyStyle(WS_CAPTION | WS_THICKFRAME, 0, SWP_NOZORDER);
}
- SetMenuBarVisibility(AFX_MBV_DISPLAYONFOCUS | AFX_MBV_DISPLAYONF10);
+ SetMenuBarVisibility(AFX_MBV_DISPLAYONFOCUS);
SetWindowPos(nullptr, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
}
@@ -9193,8 +9067,8 @@ void CMainFrame::SetDefaultWindowRect(int iMonitor)
GetClientRect(&clientRect);
CSize logoSize = m_wndView.GetLogoSize();
- logoSize.cx = max<LONG>(logoSize.cx, MIN_LOGO_WIDTH);
- logoSize.cy = max<LONG>(logoSize.cy, MIN_LOGO_HEIGHT);
+ logoSize.cx = std::max<LONG>(logoSize.cx, MIN_LOGO_WIDTH);
+ logoSize.cy = std::max<LONG>(logoSize.cy, MIN_LOGO_HEIGHT);
unsigned uTop, uLeft, uRight, uBottom;
m_controls.GetDockZones(uTop, uLeft, uRight, uBottom);
@@ -9203,27 +9077,28 @@ void CMainFrame::SetDefaultWindowRect(int iMonitor)
windowSize.cy = windowRect.Height() - clientRect.Height() + logoSize.cy + uTop + uBottom;
}
+ CMonitors monitors;
+ CMonitor monitor;
+ if (iMonitor > 0 && iMonitor <= monitors.GetCount()) {
+ monitor = monitors.GetMonitor(iMonitor - 1);
+ } else {
+ monitor = CMonitors::GetNearestMonitor(this);
+ }
+
bool bRestoredWindowPosition = false;
if (s.fRememberWindowPos) {
CRect windowRect(rcLastWindowPos.TopLeft(), windowSize);
- if (CMonitors::IsOnScreen(windowRect)) {
+ if ((!iMonitor && CMonitors::IsOnScreen(windowRect))
+ || (iMonitor && monitor.IsOnMonitor(windowRect))) {
MoveWindow(windowRect);
bRestoredWindowPosition = true;
}
}
if (!bRestoredWindowPosition) {
- CMonitors monitors;
- CMonitor monitor;
- if (iMonitor > 0 && iMonitor <= monitors.GetCount()) {
- monitor = monitors.GetMonitor(--iMonitor);
- } else {
- monitor = CMonitors::GetNearestMonitor(this);
- }
-
MINMAXINFO mmi;
OnGetMinMaxInfo(&mmi);
- CRect windowRect(0, 0, max(windowSize.cx, mmi.ptMinTrackSize.x), max(windowSize.cy, mmi.ptMinTrackSize.y));
+ CRect windowRect(0, 0, std::max(windowSize.cx, mmi.ptMinTrackSize.x), std::max(windowSize.cy, mmi.ptMinTrackSize.y));
monitor.CenterRectToMonitor(windowRect, TRUE);
SetWindowPos(nullptr, windowRect.left, windowRect.top, windowSize.cx, windowSize.cy, SWP_NOZORDER | SWP_NOACTIVATE);
}
@@ -9276,8 +9151,8 @@ void CMainFrame::RestoreDefaultWindowRect()
GetClientRect(&clientRect);
CSize logoSize = m_wndView.GetLogoSize();
- logoSize.cx = max<LONG>(logoSize.cx, MIN_LOGO_WIDTH);
- logoSize.cy = max<LONG>(logoSize.cy, MIN_LOGO_HEIGHT);
+ logoSize.cx = std::max<LONG>(logoSize.cx, MIN_LOGO_WIDTH);
+ logoSize.cy = std::max<LONG>(logoSize.cy, MIN_LOGO_HEIGHT);
unsigned uTop, uLeft, uRight, uBottom;
m_controls.GetDockZones(uTop, uLeft, uRight, uBottom);
@@ -9295,6 +9170,30 @@ void CMainFrame::RestoreDefaultWindowRect()
}
}
+CRect CMainFrame::GetInvisibleBorderSize() const
+{
+ CRect invisibleBorders;
+
+ if (SysVersion::Is10OrLater()) {
+ static const WinapiFunc<decltype(DwmGetWindowAttribute)>
+ fnDwmGetWindowAttribute = { "Dwmapi.dll", "DwmGetWindowAttribute" };
+
+ if (fnDwmGetWindowAttribute) {
+ if (SUCCEEDED(fnDwmGetWindowAttribute(GetSafeHwnd(), DWMWA_EXTENDED_FRAME_BOUNDS, &invisibleBorders, sizeof(RECT)))) {
+ CRect windowRect;
+ GetWindowRect(windowRect);
+
+ invisibleBorders.TopLeft() = invisibleBorders.TopLeft() - windowRect.TopLeft();
+ invisibleBorders.BottomRight() = windowRect.BottomRight() - invisibleBorders.BottomRight();
+ } else {
+ ASSERT(false);
+ }
+ }
+ }
+
+ return invisibleBorders;
+}
+
OAFilterState CMainFrame::GetMediaState() const
{
OAFilterState ret = -1;
@@ -9313,53 +9212,66 @@ CSize CMainFrame::GetVideoSize() const
{
const CAppSettings& s = AfxGetAppSettings();
- bool fKeepAspectRatio = s.fKeepAspectRatio;
- bool fCompMonDeskARDiff = s.fCompMonDeskARDiff;
-
- CSize ret(0, 0);
+ CSize ret;
if (GetLoadState() != MLS::LOADED || m_fAudioOnly) {
return ret;
}
- CSize wh(0, 0), arxy(0, 0);
+ CSize videoSize, preferedAR;
if (m_pCAP) {
- wh = m_pCAP->GetVideoSize(false);
- arxy = m_pCAP->GetVideoSize(fKeepAspectRatio);
+ videoSize = m_pCAP->GetVideoSize(false);
+ preferedAR = m_pCAP->GetVideoSize(s.fKeepAspectRatio);
} else if (m_pMFVDC) {
- m_pMFVDC->GetNativeVideoSize(&wh, &arxy); // TODO : check AR !!
+ m_pMFVDC->GetNativeVideoSize(&videoSize, &preferedAR); // TODO : check AR !!
} else {
- m_pBV->GetVideoSize(&wh.cx, &wh.cy);
+ m_pBV->GetVideoSize(&videoSize.cx, &videoSize.cy);
long arx = 0, ary = 0;
CComQIPtr<IBasicVideo2> pBV2 = m_pBV;
// FIXME: It can hang here, for few seconds (CPU goes to 100%), after the window have been moving over to another screen,
// due to GetPreferredAspectRatio, if it happens before CAudioSwitcherFilter::DeliverEndFlush, it seems.
if (pBV2 && SUCCEEDED(pBV2->GetPreferredAspectRatio(&arx, &ary)) && arx > 0 && ary > 0) {
- arxy.SetSize(arx, ary);
+ preferedAR.SetSize(arx, ary);
}
}
- if (wh.cx <= 0 || wh.cy <= 0) {
+ if (videoSize.cx <= 0 || videoSize.cy <= 0) {
return ret;
}
- // with the overlay mixer IBasicVideo2 won't tell the new AR when changed dynamically
+ CSize overrideAR = s.sizeAspectRatio;
DVD_VideoAttributes VATR;
- if (GetPlaybackMode() == PM_DVD && SUCCEEDED(m_pDVDI->GetCurrentVideoAttributes(&VATR))) {
- arxy.SetSize(VATR.ulAspectX, VATR.ulAspectY);
+ // with the overlay mixer IBasicVideo2 won't tell the new AR when changed dynamically
+ if ((!overrideAR.cx || !overrideAR.cy) && GetPlaybackMode() == PM_DVD && SUCCEEDED(m_pDVDI->GetCurrentVideoAttributes(&VATR))) {
+ overrideAR.SetSize(VATR.ulAspectX, VATR.ulAspectY);
}
- const CSize& ar = s.sizeAspectRatio;
- if (ar.cx && ar.cy) {
- arxy = ar;
+ if (s.fKeepAspectRatio) {
+ if (overrideAR.cx > 0 && overrideAR.cy > 0) {
+ if (m_pMVRC && SUCCEEDED(m_pMVRC->SendCommandDouble("setArOverride", double(overrideAR.cx) / overrideAR.cy))) {
+ ret = m_pCAP->GetVideoSize(false);
+ } else {
+ ret = CSize(MulDiv(videoSize.cy, overrideAR.cx, overrideAR.cy), videoSize.cy);
+ }
+ } else {
+ if (m_pMVRC && SUCCEEDED(m_pMVRC->SendCommandDouble("setArOverride", 0.0))) {
+ ret = m_pCAP->GetVideoSize(false);
+ } else {
+ ret = CSize(MulDiv(videoSize.cy, preferedAR.cx, preferedAR.cy), videoSize.cy);
+ }
+ }
+ } else {
+ if (m_pMVRC && SUCCEEDED(m_pMVRC->SendCommandDouble("setArOverride", 0.0))) {
+ ret = m_pCAP->GetVideoSize(false);
+ } else {
+ ret = videoSize;
+ }
}
- ret = (!fKeepAspectRatio || arxy.cx <= 0 || arxy.cy <= 0)
- ? wh
- : CSize(MulDiv(wh.cy, arxy.cx, arxy.cy), wh.cy);
-
- if (fCompMonDeskARDiff)
+ if (s.fCompMonDeskARDiff
+ && s.iDSVideoRendererType != VIDRNDT_DS_EVR
+ && s.iDSVideoRendererType != VIDRNDT_DS_MADVR)
if (HDC hDC = ::GetDC(nullptr)) {
int _HORZSIZE = GetDeviceCaps(hDC, HORZSIZE);
int _VERTSIZE = GetDeviceCaps(hDC, VERTSIZE);
@@ -9443,7 +9355,7 @@ void CMainFrame::ToggleFullscreen(bool fToNearest, bool fSwitchScreenResWhenHasT
} else {
GetDesktopWindow()->GetWindowRect(&r);
}
- SetMenuBarVisibility(AFX_MBV_DISPLAYONFOCUS | AFX_MBV_DISPLAYONF10);
+ SetMenuBarVisibility(AFX_MBV_DISPLAYONFOCUS);
} else {
m_eventc.FireEvent(MpcEvent::SWITCHING_FROM_FULLSCREEN);
@@ -9494,12 +9406,9 @@ void CMainFrame::ToggleFullscreen(bool fToNearest, bool fSwitchScreenResWhenHasT
if (s.fRememberWindowSize || s.fRememberWindowPos) {
r = s.rcLastWindowPos;
if (!s.fRememberWindowPos) {
- hm = MonitorFromPoint(CPoint(0, 0), MONITOR_DEFAULTTOPRIMARY);
- GetMonitorInfo(hm, &mi);
- CRect m_r = mi.rcMonitor;
- int left = m_r.left + (m_r.Width() - r.Width()) / 2;
- int top = m_r.top + (m_r.Height() - r.Height()) / 2;
- r = CRect(left, top, left + r.Width(), top + r.Height());
+ CMonitor mon;
+ mon.Attach(m_LastWindow_HM);
+ mon.CenterRectToMonitor(r, TRUE);
}
if (!s.fRememberWindowSize) {
CSize vsize = GetVideoSize();
@@ -9541,7 +9450,7 @@ void CMainFrame::ToggleFullscreen(bool fToNearest, bool fSwitchScreenResWhenHasT
if (!m_fFullScreen) {
SetMenuBarVisibility(s.eCaptionMenuMode == MODE_SHOWCAPTIONMENU ?
- AFX_MBV_KEEPVISIBLE : AFX_MBV_DISPLAYONFOCUS | AFX_MBV_DISPLAYONF10);
+ AFX_MBV_KEEPVISIBLE : AFX_MBV_DISPLAYONFOCUS);
}
UpdateControlState(UPDATE_CONTROLS_VISIBILITY);
@@ -9576,6 +9485,7 @@ void CMainFrame::ToggleD3DFullscreen(bool fSwitchScreenResWhenHasTo)
if (bIsFullscreen) {
// Turn off D3D Fullscreen
m_OSD.EnableShowSeekBar(false);
+ m_OSD.EnableShowMessage(false);
pD3DFS->SetD3DFullscreen(false);
// Assign the windowed video frame and pass it to the relevant classes.
@@ -9593,9 +9503,13 @@ void CMainFrame::ToggleD3DFullscreen(bool fSwitchScreenResWhenHasTo)
// Destroy the D3D Fullscreen window and zoom the windowed video frame
m_pFullscreenWnd->DestroyWindow();
- ZoomVideoWindow();
-
- MoveVideoWindow();
+ m_OSD.EnableShowMessage(true);
+ if (m_fFirstFSAfterLaunchOnFS) {
+ ZoomVideoWindow();
+ m_fFirstFSAfterLaunchOnFS = false;
+ } else {
+ MoveVideoWindow();
+ }
} else {
// Set the fullscreen display mode
if (s.autoChangeFSMode.bEnabled && fSwitchScreenResWhenHasTo) {
@@ -9735,7 +9649,7 @@ void CMainFrame::AutoChangeMonitorMode()
void CMainFrame::MoveVideoWindow(bool fShowStats/* = false*/, bool bSetStoppedVideoRect/* = false*/)
{
m_dLastVideoScaleFactor = 0;
- m_nLastVideoWidth = 0;
+ m_lastVideoSize.SetSize(0, 0);
if (!m_bDelaySetOutputRect && GetLoadState() == MLS::LOADED && !m_fAudioOnly && IsWindowVisible()) {
CRect windowRect(0, 0, 0, 0);
@@ -9760,7 +9674,7 @@ void CMainFrame::MoveVideoWindow(bool fShowStats/* = false*/, bool bSetStoppedVi
windowRect.bottom += m_controls.GetVisibleToolbarsHeight();
}
- int nCompensateForMenubar = m_bShowingFloatingMenubar ? GetSystemMetrics(SM_CYMENU) : 0;
+ int nCompensateForMenubar = m_bShowingFloatingMenubar && !IsD3DFullScreenMode() ? GetSystemMetrics(SM_CYMENU) : 0;
windowRect.bottom += nCompensateForMenubar;
OAFilterState fs = GetMediaState();
@@ -9769,24 +9683,23 @@ void CMainFrame::MoveVideoWindow(bool fShowStats/* = false*/, bool bSetStoppedVi
m_dLastVideoScaleFactor = std::min((double)windowRect.Size().cx / szVideo.cx,
(double)windowRect.Size().cy / szVideo.cy);
- m_nLastVideoWidth = szVideo.cx;
+ m_lastVideoSize = szVideo;
const double dVideoAR = double(szVideo.cx) / szVideo.cy;
- dvstype iDefaultVideoSize = static_cast<dvstype>(AfxGetAppSettings().iDefaultVideoSize);
+ // because we don't have a way to get .swf size reliably,
+ // other modes don't make sense
+ const dvstype iDefaultVideoSize = m_fShockwaveGraph ? DVS_STRETCH :
+ static_cast<dvstype>(AfxGetAppSettings().iDefaultVideoSize);
- if (m_fShockwaveGraph) {
- // because we don't have a way to get .swf size reliably,
- // other modes don't make sense
- iDefaultVideoSize = DVS_STRETCH;
- }
-
- double dWRWidth = windowRect.Width();
- double dWRHeight = windowRect.Height();
+ const double dWRWidth = windowRect.Width();
+ const double dWRHeight = windowRect.Height();
double dVRWidth = dWRHeight * dVideoAR;
double dVRHeight;
+ double madVRZoomFactor = 1.0;
+
switch (iDefaultVideoSize) {
case DVS_HALF:
dVRWidth = szVideo.cx * 0.5;
@@ -9809,7 +9722,7 @@ void CMainFrame::MoveVideoWindow(bool fShowStats/* = false*/, bool bSetStoppedVi
// Fallback to "Touch Window From Inside" if settings were corrupted.
case DVS_FROMINSIDE:
case DVS_FROMOUTSIDE:
- if ((windowRect.Width() < dVRWidth) != (iDefaultVideoSize == DVS_FROMOUTSIDE)) {
+ if ((dWRWidth < dVRWidth) != (iDefaultVideoSize == DVS_FROMOUTSIDE)) {
dVRWidth = dWRWidth;
dVRHeight = dVRWidth / dVideoAR;
} else {
@@ -9818,11 +9731,11 @@ void CMainFrame::MoveVideoWindow(bool fShowStats/* = false*/, bool bSetStoppedVi
break;
case DVS_ZOOM1:
case DVS_ZOOM2: {
- double minw = dWRWidth < dVRWidth ? dWRWidth : dVRWidth;
- double maxw = dWRWidth > dVRWidth ? dWRWidth : dVRWidth;
-
double scale = iDefaultVideoSize == DVS_ZOOM1 ? 1.0 / 3.0 : 2.0 / 3.0;
- dVRWidth = minw + (maxw - minw) * scale;
+ double minw = std::min(dWRWidth, dVRWidth);
+ double zoomValue = (std::max(dWRWidth, dVRWidth) - minw) * scale;
+ madVRZoomFactor = (minw + zoomValue) / minw;
+ dVRWidth = minw + zoomValue;
dVRHeight = dVRWidth / dVideoAR;
break;
}
@@ -9843,11 +9756,32 @@ void CMainFrame::MoveVideoWindow(bool fShowStats/* = false*/, bool bSetStoppedVi
ASSERT(videoRect.Width() == lround(dScaledVRWidth));
ASSERT(videoRect.Height() == lround(dScaledVRHeight));
+ if (m_pMVRC) {
+ static const std::map<const dvstype, const LPWSTR> madVRModesMap = {
+ { DVS_HALF, L"50%" },
+ { DVS_NORMAL, L"100%" },
+ { DVS_DOUBLE, L"200%" },
+ { DVS_STRETCH, L"stretch" },
+ { DVS_FROMINSIDE, L"touchInside" },
+ { DVS_FROMOUTSIDE, L"touchOutside" },
+ { DVS_ZOOM1, L"touchInside" },
+ { DVS_ZOOM2, L"touchInside" }
+ };
+
+ m_pMVRC->SendCommandString("setZoomMode", madVRModesMap.at(iDefaultVideoSize));
+ m_pMVRC->SendCommandDouble("setZoomFactorX", madVRZoomFactor * m_ZoomX);
+ m_pMVRC->SendCommandDouble("setZoomFactorY", madVRZoomFactor * m_ZoomY);
+ m_pMVRC->SendCommandDouble("setZoomOffsetX", 2 * m_PosX - 1.0);
+ m_pMVRC->SendCommandDouble("setZoomOffsetY", 2 * m_PosY - 1.0);
+ }
+
if (fShowStats) {
CString info;
info.Format(_T("Pos %.3f %.3f, Zoom %.3f %.3f, AR %.3f"), m_PosX, m_PosY, m_ZoomX, m_ZoomY, double(videoRect.Width()) / videoRect.Height());
SendStatusMessage(info, 3000);
}
+ } else if (m_pMVRC) {
+ m_pMVRC->SendCommandString("setZoomMode", L"autoDetect");
}
windowRect.top -= nCompensateForMenubar;
@@ -9858,11 +9792,10 @@ void CMainFrame::MoveVideoWindow(bool fShowStats/* = false*/, bool bSetStoppedVi
Vector v(Vector::DegToRad(m_AngleX), Vector::DegToRad(m_AngleY), Vector::DegToRad(m_AngleZ));
m_pCAP->SetVideoAngle(v);
UpdateSubAspectRatioCompensation();
- } else {
- HRESULT hr;
- hr = m_pBV->SetDefaultSourcePosition();
- hr = m_pBV->SetDestinationPosition(videoRect.left, videoRect.top, videoRect.Width(), videoRect.Height());
- hr = m_pVW->SetWindowPosition(windowRect.left, windowRect.top, windowRect.Width(), windowRect.Height());
+ } else {
+ m_pBV->SetDefaultSourcePosition();
+ m_pBV->SetDestinationPosition(videoRect.left, videoRect.top, videoRect.Width(), videoRect.Height());
+ m_pVW->SetWindowPosition(windowRect.left, windowRect.top, windowRect.Width(), windowRect.Height());
if (m_pMFVDC) {
m_pMFVDC->SetVideoPosition(nullptr, &windowRect);
@@ -9966,6 +9899,12 @@ CSize CMainFrame::GetZoomWindowSize(double dScale)
CMonitors::GetNearestMonitor(this).GetWorkAreaRect(workRect);
if (workRect.Width() && workRect.Height()) {
+ // account for invisible borders on Windows 10 by allowing
+ // the window to go out of screen a bit
+ if (SysVersion::Is10OrLater()) {
+ workRect.InflateRect(GetInvisibleBorderSize());
+ }
+
// don't go larger than the current monitor working area and prevent black bars in this case
CSize videoSpaceSize = workRect.Size() - controlsSize - decorationsRect.Size();
@@ -10008,23 +9947,31 @@ CRect CMainFrame::GetZoomWindowRect(const CSize& size)
MONITORINFO mi = { sizeof(mi) };
if (GetMonitorInfo(MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONEAREST), &mi)) {
+ CRect rcWork = mi.rcWork;
+ // account for invisible borders on Windows 10 by allowing
+ // the window to go out of screen a bit
+ if (SysVersion::Is10OrLater()) {
+ rcWork.InflateRect(GetInvisibleBorderSize());
+ }
+
CSize windowSize(size);
// don't go larger than the current monitor working area
- windowSize.cx = std::min<long>(windowSize.cx, (mi.rcWork.right - mi.rcWork.left));
- windowSize.cy = std::min<long>(windowSize.cy, (mi.rcWork.bottom - mi.rcWork.top));
+ windowSize.cx = std::min<long>(windowSize.cx, rcWork.Width());
+ windowSize.cy = std::min<long>(windowSize.cy, rcWork.Height());
- // retain snapping and center the window if we don't remember its position
- if (m_bWasSnapped && ret.left == mi.rcWork.left) {
+ // retain snapping or try not to be move the center of the window
+ // if we don't remember its position
+ if (m_bWasSnapped && ret.left == rcWork.left) {
// do nothing
- } else if (m_bWasSnapped && ret.right == mi.rcWork.right) {
+ } else if (m_bWasSnapped && ret.right == rcWork.right) {
ret.left = ret.right - windowSize.cx;
} else if (!s.fRememberWindowPos) {
ret.left += (ret.right - ret.left) / 2 - windowSize.cx / 2;
}
- if (m_bWasSnapped && ret.top == mi.rcWork.top) {
+ if (m_bWasSnapped && ret.top == rcWork.top) {
// do nothing
- } else if (m_bWasSnapped && ret.bottom == mi.rcWork.bottom) {
+ } else if (m_bWasSnapped && ret.bottom == rcWork.bottom) {
ret.top = ret.bottom - windowSize.cy;
} else if (!s.fRememberWindowPos) {
ret.top += (ret.bottom - ret.top) / 2 - windowSize.cy / 2;
@@ -10034,17 +9981,17 @@ CRect CMainFrame::GetZoomWindowRect(const CSize& size)
ret.bottom = ret.top + windowSize.cy;
// don't go beyond the current monitor working area
- if (ret.right > mi.rcWork.right) {
- ret.OffsetRect(mi.rcWork.right - ret.right, 0);
+ if (ret.right > rcWork.right) {
+ ret.OffsetRect(rcWork.right - ret.right, 0);
}
- if (ret.left < mi.rcWork.left) {
- ret.OffsetRect(mi.rcWork.left - ret.left, 0);
+ if (ret.left < rcWork.left) {
+ ret.OffsetRect(rcWork.left - ret.left, 0);
}
- if (ret.bottom > mi.rcWork.bottom) {
- ret.OffsetRect(0, mi.rcWork.bottom - ret.bottom);
+ if (ret.bottom > rcWork.bottom) {
+ ret.OffsetRect(0, rcWork.bottom - ret.bottom);
}
- if (ret.top < mi.rcWork.top) {
- ret.OffsetRect(0, mi.rcWork.top - ret.top);
+ if (ret.top < rcWork.top) {
+ ret.OffsetRect(0, rcWork.top - ret.top);
}
} else {
ASSERT(FALSE);
@@ -10125,6 +10072,15 @@ double CMainFrame::GetZoomAutoFitScale(bool bLargerOnly)
decorationsSize.cx += 2 * ::GetSystemMetrics(SM_CXSIZEFRAME);
// horizontal borders
decorationsSize.cy += 2 * ::GetSystemMetrics(SM_CYSIZEFRAME);
+
+ // account for invisible borders on Windows 10
+ if (SysVersion::Is10OrLater()) {
+ RECT invisibleBorders = GetInvisibleBorderSize();
+
+ decorationsSize.cx -= (invisibleBorders.left + invisibleBorders.right);
+ decorationsSize.cy -= (invisibleBorders.top + invisibleBorders.bottom);
+ }
+
if (!(style & WS_CAPTION)) {
decorationsSize.cx -= 2;
decorationsSize.cy -= 2;
@@ -10153,7 +10109,7 @@ double CMainFrame::GetZoomAutoFitScale(bool bLargerOnly)
double sx = ((double)width * s.nAutoFitFactor / 100 - decorationsSize.cx) / arxy.cx;
double sy = ((double)height * s.nAutoFitFactor / 100 - decorationsSize.cy) / arxy.cy;
- sx = min(sx, sy);
+ sx = std::min(sx, sy);
// Take movie aspect ratio into consideration
// The scaling is computed so that the height is an integer value
sy = floor(arxy.cy * floor(arxy.cx * sx + 0.5) / arxy.cx + 0.5) / arxy.cy;
@@ -10294,10 +10250,10 @@ void CMainFrame::OpenCreateGraphObject(OpenMediaData* pOMD)
const CAppSettings& s = AfxGetAppSettings();
- if (OpenFileData* p = dynamic_cast<OpenFileData*>(pOMD)) {
- engine_t engine = s.m_Formats.GetEngine(p->fns.GetHead());
+ if (auto pOpenFileData = dynamic_cast<OpenFileData*>(pOMD)) {
+ engine_t engine = s.m_Formats.GetEngine(pOpenFileData->fns.GetHead());
- CStringA ct = GetContentType(p->fns.GetHead());
+ CStringA ct = GetContentType(pOpenFileData->fns.GetHead());
if (ct == "video/x-ms-asf") {
// TODO: put something here to make the windows media source filter load later
@@ -10372,9 +10328,9 @@ void CMainFrame::OpenCreateGraphObject(OpenMediaData* pOMD)
if (!m_fCustomGraph) {
m_pGB = DEBUG_NEW CFGManagerPlayer(_T("CFGManagerPlayer"), nullptr, m_pVideoWnd->m_hWnd);
}
- } else if (OpenDVDData* p = dynamic_cast<OpenDVDData*>(pOMD)) {
+ } else if (auto pOpenDVDData = dynamic_cast<OpenDVDData*>(pOMD)) {
m_pGB = DEBUG_NEW CFGManagerDVD(_T("CFGManagerDVD"), nullptr, m_pVideoWnd->m_hWnd);
- } else if (OpenDeviceData* p = dynamic_cast<OpenDeviceData*>(pOMD)) {
+ } else if (auto pOpenDeviceData = dynamic_cast<OpenDeviceData*>(pOMD)) {
if (s.iDefaultCaptureDevice == 1) {
m_pGB = DEBUG_NEW CFGManagerBDA(_T("CFGManagerBDA"), nullptr, m_pVideoWnd->m_hWnd);
} else {
@@ -10681,10 +10637,8 @@ void CMainFrame::SetupChapters()
int h, m, s, ms;
WCHAR wc;
- if (7 != swscanf_s(CStringW(var), L"%d%c%d%c%d%c%d", &h,
- &wc, sizeof(WCHAR), &m,
- &wc, sizeof(WCHAR), &s,
- &wc, sizeof(WCHAR), &ms)) {
+ if (7 != swscanf_s(CStringW(var), L"%d%c%d%c%d%c%d",
+ &h, &wc, 1, &m, &wc, 1, &s, &wc, 1, &ms)) {
break;
}
@@ -10831,7 +10785,7 @@ HRESULT CMainFrame::OpenBDAGraph()
HRESULT hr = m_pGB->RenderFile(L"", L"");
if (SUCCEEDED(hr)) {
SetPlaybackMode(PM_DIGITAL_CAPTURE);
- m_pDVBState = make_unique<DVBState>();
+ m_pDVBState = std::make_unique<DVBState>();
}
return hr;
}
@@ -11279,7 +11233,7 @@ void CMainFrame::UpdateChapterInInfoBar()
CComBSTR bstr;
long currentChap = m_pCB->ChapLookup(&rtNow, &bstr);
if (bstr.Length()) {
- chapter.Format(_T("%s (%ld/%lu)"), bstr.m_str, max(0l, currentChap + 1l), dwChapCount);
+ chapter.Format(_T("%s (%ld/%lu)"), bstr.m_str, std::max(0l, currentChap + 1l), dwChapCount);
} else {
chapter.Format(_T("%ld/%lu"), currentChap + 1, dwChapCount);
}
@@ -11591,8 +11545,7 @@ int CMainFrame::SetupSubtitleStreams()
{
const CAppSettings& s = AfxGetAppSettings();
- size_t cStreams = m_pSubStreams.GetCount();
- if (cStreams > 0) {
+ if (!m_pSubStreams.IsEmpty()) {
bool externalPriority = false;
CAtlArray<CString> langs;
int tPos = 0;
@@ -11792,8 +11745,10 @@ bool CMainFrame::OpenMediaPrivate(CAutoPtr<OpenMediaData> pOMD)
m_pGB->FindInterface(IID_PPV_ARGS(&m_pVMRMC), TRUE);
m_pGB->FindInterface(IID_PPV_ARGS(&pVMB), TRUE);
m_pGB->FindInterface(IID_PPV_ARGS(&pMFVMB), TRUE);
- m_pMVRSR = m_pCAP;
+ m_pMVRC = m_pCAP;
+ m_pMVRI = m_pCAP;
m_pMVRS = m_pCAP;
+ m_pMVRSR = m_pCAP;
pMVTO = m_pCAP;
if (s.fShowOSD || s.fShowDebugInfo) { // Force OSD on when the debug switch is used
@@ -11947,7 +11902,10 @@ void CMainFrame::CloseMediaPrivate()
m_bBuffering = false;
m_rtDurationOverride = -1;
m_bUsingDXVA = false;
- m_pDVBState = nullptr;
+ if (m_pDVBState) {
+ m_pDVBState->Join();
+ m_pDVBState = nullptr;
+ }
m_pCB.Release();
SetSubtitle(SubtitleInput(nullptr));
@@ -11959,8 +11917,10 @@ void CMainFrame::CloseMediaPrivate()
// IMPORTANT: IVMRSurfaceAllocatorNotify/IVMRSurfaceAllocatorNotify9 has to be released before the VMR/VMR9, otherwise it will crash in Release()
m_OSD.Stop();
- m_pMVRS.Release();
m_pMVRSR.Release();
+ m_pMVRS.Release();
+ m_pMVRC.Release();
+ m_pMVRI.Release();
m_pCAP2.Release();
m_pCAP.Release();
m_pVMRWC.Release();
@@ -12491,7 +12451,7 @@ void CMainFrame::SetupAudioSubMenu()
CString str;
if (Language) {
int len = GetLocaleInfo(Language, LOCALE_SENGLANGUAGE, str.GetBuffer(256), 256);
- str.ReleaseBufferSetLength(max(len - 1, 0));
+ str.ReleaseBufferSetLength(std::max(len - 1, 0));
} else {
str.Format(IDS_AG_UNKNOWN, i + 1);
}
@@ -12610,7 +12570,7 @@ void CMainFrame::SetupSubtitlesSubMenu()
CString str;
if (Language) {
int len = GetLocaleInfo(Language, LOCALE_SENGLANGUAGE, str.GetBuffer(256), 256);
- str.ReleaseBufferSetLength(max(len - 1, 0));
+ str.ReleaseBufferSetLength(std::max(len - 1, 0));
} else {
str.Format(IDS_AG_UNKNOWN, i + 1);
}
@@ -12724,7 +12684,7 @@ void CMainFrame::SetupSubtitlesSubMenu()
} else {
if (lcid != 0) {
int len = GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, str.GetBuffer(64), 64);
- str.ReleaseBufferSetLength(max(len - 1, 0));
+ str.ReleaseBufferSetLength(std::max(len - 1, 0));
}
CString lcstr = CString(str).MakeLower();
@@ -13023,151 +12983,201 @@ void CMainFrame::SetupJumpToSubMenus(CMenu* parentMenu /*= nullptr*/, int iInser
}
}
-IBaseFilter* CMainFrame::FindSourceSelectableFilter()
+void CMainFrame::SetupNavStreamSelectSubMenu(CMenu& subMenu, UINT id, DWORD dwSelGroup)
{
- // splitters for video files (MPEG files with only audio track is very rare)
- IBaseFilter* pSF = FindFilter(CLSID_MPCMpegSplitter, m_pGB);
- if (!pSF) {
- pSF = FindFilter(CLSID_MPCMpegSplitterSource, m_pGB);
- }
- // universal splitters
- if (!pSF) {
- pSF = FindFilter(CLSID_OggSplitter, m_pGB);
- }
- if (!pSF) {
- pSF = FindFilter(L"{171252A0-8820-4AFE-9DF8-5C92B2D66B04}", m_pGB); // LAV Splitter
- }
- if (!pSF) {
- pSF = FindFilter(L"{B98D13E7-55DB-4385-A33D-09FD1BA26338}", m_pGB); // LAV Splitter Source
- }
- if (!pSF) {
- pSF = FindFilter(L"{55DA30FC-F16B-49fc-BAA5-AE59FC65F82D}", m_pGB); // Haali Media Source
- }
- if (!pSF) {
- pSF = FindFilter(L"{564FD788-86C9-4444-971E-CC4A243DA150}", m_pGB); // Haali Media Splitter with previous file source (like rarfilesource)
- }
- if (!pSF) {
- pSF = FindFilter(L"{529A00DB-0C43-4f5b-8EF2-05004CBE0C6F}", m_pGB); // AV Splitter
- }
- if (!pSF) {
- pSF = FindFilter(L"{D8980E15-E1F6-4916-A10F-D7EB4E9E10B8}", m_pGB); // AV Source
- }
+ CComQIPtr<IAMStreamSelect> pSS;
+ bool bAddSeparator = false;
- return pSF;
-}
+ BeginEnumFilters(m_pGB, pEF, pBF) {
+ if (GetCLSID(pBF) == __uuidof(CAudioSwitcherFilter) || GetCLSID(pBF) == CLSID_MorganStreamSwitcher) {
+ continue;
+ }
-void CMainFrame::SetupNavStreamSelectSubMenu(CMenu& subMenu, UINT id, DWORD dwSelGroup)
-{
- CComQIPtr<IAMStreamSelect> pSS = FindSourceSelectableFilter();
- if (!pSS) {
- pSS = m_pGB;
- }
- if (!pSS) {
- return;
- }
+ if (!(pSS = pBF)) {
+ continue;
+ }
- DWORD cStreams;
- if (FAILED(pSS->Count(&cStreams))) {
- return;
- }
+ DWORD cStreams;
+ if (FAILED(pSS->Count(&cStreams))) {
+ continue;
+ }
- DWORD dwPrevGroup = DWORD_MAX;
+ bool bAdded = false;
+ for (DWORD i = 0; i < cStreams; i++) {
+ DWORD dwFlags, dwGroup;
+ LCID lcid;
+ CComHeapPtr<WCHAR> pszName;
- for (int i = 0, j = cStreams; i < j; i++) {
- DWORD dwFlags, dwGroup;
- LCID lcid;
- WCHAR* pszName = nullptr;
+ if (FAILED(pSS->Info(i, nullptr, &dwFlags, &lcid, &dwGroup, &pszName, nullptr, nullptr))
+ || !pszName) {
+ continue;
+ }
- if (FAILED(pSS->Info(i, nullptr, &dwFlags, &lcid, &dwGroup, &pszName, nullptr, nullptr))
- || !pszName) {
- continue;
+ if (dwGroup != dwSelGroup) {
+ continue;
+ }
+
+ CString str;
+ CString lcname(pszName);
+ lcname.MakeLower();
+
+ if (lcname.Find(_T(" off")) >= 0) {
+ str.LoadString(IDS_AG_DISABLED);
+ } else {
+ if (lcid && lcid != LCID(-1)) {
+ int len = GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, str.GetBuffer(64), 64);
+ str.ReleaseBufferSetLength(std::max(len - 1, 0));
+ }
+
+ CString lcstr(str);
+ lcstr.MakeLower();
+
+ if (str.IsEmpty() || lcname.Find(lcstr) >= 0) {
+ str = pszName;
+ } else if (wcslen(pszName)) {
+ str = CString(pszName) + _T(" (") + str + _T(")");
+ }
+ }
+
+ UINT flags = MF_BYCOMMAND | MF_STRING | MF_ENABLED;
+ if (dwFlags) {
+ flags |= MF_CHECKED;
+ }
+
+ if (bAddSeparator) {
+ VERIFY(subMenu.AppendMenu(MF_SEPARATOR));
+ bAddSeparator = false;
+ }
+ bAdded = true;
+
+ str.Replace(_T("&"), _T("&&"));
+ VERIFY(subMenu.AppendMenu(flags, id++, str));
}
+ bAddSeparator = bAdded;
+ }
+ EndEnumFilters
+}
- CString name(pszName);
- CString lcname = CString(name).MakeLower();
+void CMainFrame::OnNavStreamSelectSubMenu(UINT id, DWORD dwSelGroup)
+{
+ CComQIPtr<IAMStreamSelect> pSS;
- if (pszName) {
- CoTaskMemFree(pszName);
+ BeginEnumFilters(m_pGB, pEF, pBF) {
+ if (GetCLSID(pBF) == __uuidof(CAudioSwitcherFilter) || GetCLSID(pBF) == CLSID_MorganStreamSwitcher) {
+ continue;
}
- if (dwGroup != dwSelGroup) {
+ if (!(pSS = pBF)) {
continue;
}
- if (dwPrevGroup != -1 && dwPrevGroup != dwGroup) {
- VERIFY(subMenu.AppendMenu(MF_SEPARATOR));
+ DWORD cStreams;
+ if (FAILED(pSS->Count(&cStreams))) {
+ return;
}
- dwPrevGroup = dwGroup;
- CString str;
+ for (int i = 0, j = cStreams; i < j; i++) {
+ DWORD dwFlags, dwGroup;
+ LCID lcid;
+ CComHeapPtr<WCHAR> pszName;
- if (lcname.Find(_T(" off")) >= 0) {
- str.LoadString(IDS_AG_DISABLED);
- } else {
- if (lcid != 0) {
- int len = GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, str.GetBuffer(64), 64);
- str.ReleaseBufferSetLength(max(len - 1, 0));
+ if (FAILED(pSS->Info(i, nullptr, &dwFlags, &lcid, &dwGroup, &pszName, nullptr, nullptr))
+ || !pszName) {
+ continue;
}
- CString lcstr = CString(str).MakeLower();
+ if (dwGroup != dwSelGroup) {
+ continue;
+ }
- if (str.IsEmpty() || lcname.Find(lcstr) >= 0) {
- str = name;
- } else if (!name.IsEmpty()) {
- str = CString(name) + _T(" (") + str + _T(")");
+ if (id == 0) {
+ pSS->Enable(i, AMSTREAMSELECTENABLE_ENABLE);
+ break;
}
- }
- UINT flags = MF_BYCOMMAND | MF_STRING | MF_ENABLED;
- if (dwFlags) {
- flags |= MF_CHECKED;
+ id--;
}
-
- str.Replace(_T("&"), _T("&&"));
- VERIFY(subMenu.AppendMenu(flags, id++, str));
}
+ EndEnumFilters
}
-void CMainFrame::OnNavStreamSelectSubMenu(UINT id, DWORD dwSelGroup)
+void CMainFrame::OnStreamSelect(bool bForward, DWORD dwSelGroup)
{
- CComQIPtr<IAMStreamSelect> pSS = FindSourceSelectableFilter();
- if (!pSS) {
- pSS = m_pGB;
- }
- if (!pSS) {
- return;
- }
-
- DWORD cStreams;
- if (FAILED(pSS->Count(&cStreams))) {
- return;
- }
+ ASSERT(dwSelGroup == 1 || dwSelGroup == 2);
+ CComQIPtr<IAMStreamSelect> pSS;
- for (int i = 0, j = cStreams; i < j; i++) {
- DWORD dwFlags, dwGroup;
- LCID lcid;
- WCHAR* pszName = nullptr;
-
- if (FAILED(pSS->Info(i, nullptr, &dwFlags, &lcid, &dwGroup, &pszName, nullptr, nullptr))
- || !pszName) {
+ BeginEnumFilters(m_pGB, pEF, pBF) {
+ if (GetCLSID(pBF) == __uuidof(CAudioSwitcherFilter) || GetCLSID(pBF) == CLSID_MorganStreamSwitcher) {
continue;
}
- if (pszName) {
- CoTaskMemFree(pszName);
+ if (!(pSS = pBF)) {
+ continue;
}
- if (dwGroup != dwSelGroup) {
+ DWORD cStreams;
+ if (FAILED(pSS->Count(&cStreams))) {
continue;
}
- if (id == 0) {
- pSS->Enable(i, AMSTREAMSELECTENABLE_ENABLE);
+ std::vector<std::tuple<DWORD, LCID, CString>> streams;
+ size_t currentSel = SIZE_MAX;
+ for (DWORD i = 0; i < cStreams; i++) {
+ DWORD dwFlags, dwGroup;
+ LCID lcid;
+ CComHeapPtr<WCHAR> pszName;
+
+ if (FAILED(pSS->Info(i, nullptr, &dwFlags, &lcid, &dwGroup, &pszName, nullptr, nullptr))
+ || !pszName) {
+ continue;
+ }
+
+ if (dwGroup != dwSelGroup) {
+ continue;
+ }
+
+ if (dwFlags) {
+ currentSel = streams.size();
+ }
+ streams.emplace_back(i, lcid, CString(pszName));
+ }
+
+ size_t count = streams.size();
+ if (count && currentSel != SIZE_MAX) {
+ size_t requested = (bForward ? currentSel + 1 : currentSel - 1) % count;
+ DWORD id;
+ LCID lcid;
+ CString name;
+ std::tie(id, lcid, name) = streams.at(requested);
+ pSS->Enable(id, AMSTREAMSELECTENABLE_ENABLE);
+ m_OSD.DisplayMessage(OSD_TOPLEFT, GetStreamOSDString(name, lcid, dwSelGroup));
break;
}
+ }
+ EndEnumFilters
+}
- id--;
+CString CMainFrame::GetStreamOSDString(CString name, LCID lcid, DWORD dwSelGroup)
+{
+ CString sLcid;
+ if (lcid && lcid != LCID(-1)) {
+ int len = GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, sLcid.GetBuffer(64), 64);
+ sLcid.ReleaseBufferSetLength(std::max(len - 1, 0));
+ }
+ if (!sLcid.IsEmpty() && CString(name).MakeLower().Find(CString(sLcid).MakeLower()) < 0) {
+ name += _T(" (") + sLcid + _T(")");
}
+ CString strMessage;
+ if (dwSelGroup == 1) {
+ int n = 0;
+ if (name.Find(_T("A:")) == 0) { n = 2; }
+ strMessage.Format(IDS_AUDIO_STREAM, name.Mid(n).Trim());
+ } else if (dwSelGroup == 2) {
+ int n = 0;
+ if (name.Find(_T("S:")) == 0) { n = 2; }
+ strMessage.Format(IDS_SUBTITLE_STREAM, name.Mid(n).Trim());
+ }
+ return strMessage;
}
void CMainFrame::SetupRecentFilesSubMenu()
@@ -13214,14 +13224,14 @@ void CMainFrame::SetupFavoritesSubMenu()
UINT nLastGroupStart = subMenu.GetMenuItemCount();
UINT id = ID_FAVORITES_FILE_START;
- CAtlList<CString> sl;
- AfxGetAppSettings().GetFav(FAV_FILE, sl);
- POSITION pos = sl.GetHeadPosition();
+ CAtlList<CString> favs;
+ AfxGetAppSettings().GetFav(FAV_FILE, favs);
+ POSITION pos = favs.GetHeadPosition();
while (pos) {
UINT flags = MF_BYCOMMAND | MF_STRING | MF_ENABLED;
- CString f_str = sl.GetNext(pos);
+ CString f_str = favs.GetNext(pos);
f_str.Replace(_T("&"), _T("&&"));
f_str.Replace(_T("\t"), _T(" "));
@@ -13270,13 +13280,13 @@ void CMainFrame::SetupFavoritesSubMenu()
nLastGroupStart = subMenu.GetMenuItemCount();
id = ID_FAVORITES_DVD_START;
- s.GetFav(FAV_DVD, sl);
- pos = sl.GetHeadPosition();
+ s.GetFav(FAV_DVD, favs);
+ pos = favs.GetHeadPosition();
while (pos) {
UINT flags = MF_BYCOMMAND | MF_STRING | MF_ENABLED;
- CString str = sl.GetNext(pos);
+ CString str = favs.GetNext(pos);
str.Replace(_T("&"), _T("&&"));
CAtlList<CString> sl;
@@ -13303,13 +13313,13 @@ void CMainFrame::SetupFavoritesSubMenu()
id = ID_FAVORITES_DEVICE_START;
- s.GetFav(FAV_DEVICE, sl);
+ s.GetFav(FAV_DEVICE, favs);
- pos = sl.GetHeadPosition();
+ pos = favs.GetHeadPosition();
while (pos) {
UINT flags = MF_BYCOMMAND | MF_STRING | MF_ENABLED;
- CString str = sl.GetNext(pos);
+ CString str = favs.GetNext(pos);
str.Replace(_T("&"), _T("&&"));
CAtlList<CString> sl;
@@ -13519,12 +13529,11 @@ bool CMainFrame::SetSubtitle(int i, bool bIsOffset /*= false*/, bool bDisplayMes
bool success = false;
if (pSubInput) {
- WCHAR* pName = nullptr;
+ CComHeapPtr<WCHAR> pName;
if (CComQIPtr<IAMStreamSelect> pSSF = pSubInput->pSourceFilter) {
DWORD dwFlags;
if (FAILED(pSSF->Info(i, nullptr, &dwFlags, nullptr, nullptr, &pName, nullptr, nullptr))) {
dwFlags = 0;
- pName = nullptr;
}
// Enable the track only if it isn't already the only selected track in the group
if (!(dwFlags & AMSTREAMSELECTINFO_EXCLUSIVE)) {
@@ -13541,15 +13550,9 @@ bool CMainFrame::SetSubtitle(int i, bool bIsOffset /*= false*/, bool bDisplayMes
if (bDisplayMessage) {
if (pName || SUCCEEDED(pSubInput->pSubStream->GetStreamInfo(0, &pName, nullptr))) {
- CString strMessage;
- strMessage.Format(IDS_SUBTITLE_STREAM, pName);
- m_OSD.DisplayMessage(OSD_TOPLEFT, strMessage);
+ m_OSD.DisplayMessage(OSD_TOPLEFT, GetStreamOSDString(CString(pName), LCID(-1), 2));
}
}
- if (pName) {
- CoTaskMemFree(pName);
- }
-
success = true;
}
@@ -14518,12 +14521,6 @@ void CMainFrame::OpenMedia(CAutoPtr<OpenMediaData> pOMD)
}
m_bIsBDPlay = false;
- // activate auto-fit logic upon exiting fullscreen if
- // we are opening new media in fullscreen mode
- if (m_fFullScreen && s.fRememberZoomLevel) {
- m_fFirstFSAfterLaunchOnFS = true;
- }
-
// no need to try releasing external objects while playing
KillTimer(TIMER_UNLOAD_UNUSED_EXTERNAL_OBJECTS);
@@ -14543,6 +14540,12 @@ void CMainFrame::OpenMedia(CAutoPtr<OpenMediaData> pOMD)
m_pVideoWnd = &m_wndView;
}
+ // activate auto-fit logic upon exiting fullscreen if
+ // we are opening new media in fullscreen mode
+ if ((m_fFullScreen || IsD3DFullScreenMode()) && s.fRememberZoomLevel) {
+ m_fFirstFSAfterLaunchOnFS = true;
+ }
+
// don't set video renderer output rect until the window is repositioned
m_bDelaySetOutputRect = true;
@@ -14550,12 +14553,12 @@ void CMainFrame::OpenMedia(CAutoPtr<OpenMediaData> pOMD)
if (pFileData) {
CString filename = m_wndPlaylistBar.GetCurFileName();
CString ext = filename.Mid(filename.ReverseFind('.') + 1);
- m_wndStatusBar.SetStatusTypeIcon(LoadIcon(ext, true));
+ m_wndStatusBar.SetMediaType(ext);
} else if (pDVDData) {
- m_wndStatusBar.SetStatusTypeIcon(LoadIcon(_T(".ifo"), true));
+ m_wndStatusBar.SetMediaType(".ifo");
} else {
// TODO: Create icons for pDeviceData
- m_wndStatusBar.SetStatusTypeIcon(LoadIcon(_T(".unknown"), true));
+ m_wndStatusBar.SetMediaType(".unknown");
}
// initiate graph creation, OpenMediaPrivate() will call OnFilePostOpenmedia()
@@ -14798,7 +14801,7 @@ void CMainFrame::UpdateCurrentChannelInfo(bool bShowOSD /*= true*/, bool bShowIn
infoData.hr = pTun->UpdatePSI(pChannel, infoData.NowNext);
infoData.bShowOSD = bShowOSD;
infoData.bShowInfoBar = bShowInfoBar;
- if (!m_pDVBState->bAbortInfo)
+ if (m_pDVBState && !m_pDVBState->bAbortInfo)
{
PostMessage(WM_DVB_EIT_DATA_READY);
}
@@ -14962,7 +14965,7 @@ bool CMainFrame::CreateFullScreenWindow()
monitor.GetMonitorRect(monitorRect);
return !!m_pFullscreenWnd->CreateEx(WS_EX_TOPMOST | WS_EX_TOOLWINDOW, _T(""), ResStr(IDS_MAINFRM_136),
- WS_POPUP | WS_VISIBLE, monitorRect, this, 0);
+ WS_POPUP | WS_VISIBLE, monitorRect, nullptr, 0);
}
bool CMainFrame::IsD3DFullScreenMode() const
@@ -15029,19 +15032,19 @@ void CMainFrame::SetColorControl(DWORD flags, int& brightness, int& contrast, in
COLORPROPERTY_RANGE* cr;
if (flags & ProcAmp_Brightness) {
cr = pApp->GetColorControl(ProcAmp_Brightness);
- brightness = min(max(brightness, cr->MinValue), cr->MaxValue);
+ brightness = std::min(std::max(brightness, cr->MinValue), cr->MaxValue);
}
if (flags & ProcAmp_Contrast) {
cr = pApp->GetColorControl(ProcAmp_Contrast);
- contrast = min(max(contrast, cr->MinValue), cr->MaxValue);
+ contrast = std::min(std::max(contrast, cr->MinValue), cr->MaxValue);
}
if (flags & ProcAmp_Hue) {
cr = pApp->GetColorControl(ProcAmp_Hue);
- hue = min(max(hue, cr->MinValue), cr->MaxValue);
+ hue = std::min(std::max(hue, cr->MinValue), cr->MaxValue);
}
if (flags & ProcAmp_Saturation) {
cr = pApp->GetColorControl(ProcAmp_Saturation);
- saturation = min(max(saturation, cr->MinValue), cr->MaxValue);
+ saturation = std::min(std::max(saturation, cr->MinValue), cr->MaxValue);
}
if (m_pVMRMC) {
@@ -15794,7 +15797,7 @@ void CMainFrame::OnFileOpendirectory()
HRESULT CMainFrame::CreateThumbnailToolbar()
{
- if (!AfxGetAppSettings().fUseWin7TaskBar || !SysVersion::Is7OrLater()) {
+ if (!AfxGetAppSettings().bUseEnhancedTaskBar || !SysVersion::Is7OrLater()) {
return E_FAIL;
}
@@ -15909,7 +15912,7 @@ HRESULT CMainFrame::UpdateThumbarButton(MPC_PLAYSTATE iPlayState)
const CAppSettings& s = AfxGetAppSettings();
- if (!s.fUseWin7TaskBar) {
+ if (!s.bUseEnhancedTaskBar) {
m_pTaskbarList->SetOverlayIcon(m_hWnd, nullptr, L"");
m_pTaskbarList->SetProgressState(m_hWnd, TBPF_NOPROGRESS);
@@ -16014,7 +16017,7 @@ HRESULT CMainFrame::UpdateThumbnailClip()
r.OffsetRect(0, GetSystemMetrics(SM_CYMENU));
}
- if (!s.fUseWin7TaskBar || (GetLoadState() != MLS::LOADED) || m_fFullScreen || IsD3DFullScreenMode() || r.Width() <= 0 || r.Height() <= 0) {
+ if (!s.bUseEnhancedTaskBar || (GetLoadState() != MLS::LOADED) || m_fFullScreen || IsD3DFullScreenMode() || r.Width() <= 0 || r.Height() <= 0) {
return m_pTaskbarList->SetThumbnailClip(m_hWnd, nullptr);
}
@@ -16562,7 +16565,6 @@ void CMainFrame::UpdateDXVAStatus()
}
}
GetRenderersData()->m_strDXVAInfo = DXVAInfo;
- return;
}
bool CMainFrame::GetDecoderType(CString& type) const
@@ -16613,7 +16615,7 @@ void CMainFrame::UpdateSubAspectRatioCompensation()
{
const CAppSettings& s = AfxGetAppSettings();
if (auto pRTS = dynamic_cast<CRenderedTextSubtitle*>((ISubStream*)m_pCurrentSubInput.pSubStream)) {
- CAutoLock cAutoLock(&m_csSubtitleManagementLock);
+ CAutoLock autoLockSubtitleManagement(&m_csSubtitleManagementLock);
bool bInvalidate = false;
double dPARCompensation = 1.0;
@@ -16637,7 +16639,7 @@ void CMainFrame::UpdateSubAspectRatioCompensation()
pRTS->m_ePARCompensationType = CSimpleTextSubtitle::EPARCompensationType::EPCTAccurateSize_ISR;
if (pRTS->m_dPARCompensation != dPARCompensation) {
- CAutoLock cAutoLock(&m_csSubLock);
+ CAutoLock autoLock(&m_csSubLock);
bInvalidate = true;
pRTS->m_dPARCompensation = dPARCompensation;
pRTS->Deinit();
@@ -16702,3 +16704,23 @@ REFTIME CMainFrame::GetAvgTimePerFrame() const
return refAvgTimePerFrame;
}
+
+void CMainFrame::OnVideoSizeChanged(const bool bWasAudioOnly /*= false*/)
+{
+ const auto& s = AfxGetAppSettings();
+ if (GetLoadState() == MLS::LOADED &&
+ ((s.fRememberZoomLevel && (s.fLimitWindowProportions || m_bAllowWindowZoom)) || m_fAudioOnly || bWasAudioOnly) &&
+ !(m_fFullScreen || IsD3DFullScreenMode() || IsZoomed() || IsIconic() || IsAeroSnapped())) {
+ CSize videoSize;
+ if (!m_fAudioOnly && !m_bAllowWindowZoom) {
+ videoSize = GetVideoSize();
+ }
+ if (videoSize.cx && videoSize.cy) {
+ ZoomVideoWindow(m_dLastVideoScaleFactor * std::sqrt((static_cast<double>(m_lastVideoSize.cx) * m_lastVideoSize.cy)
+ / (static_cast<double>(videoSize.cx) * videoSize.cy)));
+ } else {
+ ZoomVideoWindow();
+ }
+ }
+ MoveVideoWindow();
+}
diff --git a/src/mpc-hc/MainFrm.h b/src/mpc-hc/MainFrm.h
index 4cb5618cf..653463938 100644
--- a/src/mpc-hc/MainFrm.h
+++ b/src/mpc-hc/MainFrm.h
@@ -71,6 +71,7 @@
#include "sizecbar/scbarg.h"
#include "DSMPropertyBag.h"
#include "SkypeMoodMsgHandler.h"
+#include "DpiHelper.h"
#include <memory>
#include <future>
@@ -153,13 +154,18 @@ struct SubtitleInput {
: pSubStream(pSubStream), pSourceFilter(pSourceFilter) {};
};
-interface ISubClock;
-interface IMadVRSubclassReplacement;
+interface IMadVRCommand;
interface IMadVRSettings;
+interface IMadVRSubclassReplacement;
+interface IMadVRInfo;
+interface ISubClock;
class CMainFrame : public CFrameWnd, public CDropClient
{
public:
+
+ DpiHelper m_dpi;
+
enum class Timer32HzSubscriber {
TOOLBARS_HIDER,
CURSOR_HIDER,
@@ -184,6 +190,8 @@ private:
EventClient m_eventc;
void EventCallback(MpcEvent ev);
+ CMainFrameMouseHook m_mouseHook;
+
enum {
TIMER_STREAMPOSPOLLER = 1,
TIMER_STREAMPOSPOLLER2,
@@ -234,8 +242,10 @@ private:
CComPtr<ISubPicAllocatorPresenter> m_pCAP;
CComPtr<ISubPicAllocatorPresenter2> m_pCAP2;
- CComPtr<IMadVRSubclassReplacement> m_pMVRSR;
CComPtr<IMadVRSettings> m_pMVRS;
+ CComPtr<IMadVRSubclassReplacement> m_pMVRSR;
+ CComPtr<IMadVRCommand> m_pMVRC;
+ CComPtr<IMadVRInfo> m_pMVRI;
CComQIPtr<IDvdControl2> m_pDVDC;
CComQIPtr<IDvdInfo2> m_pDVDI;
@@ -281,6 +291,7 @@ private:
void SetDefaultWindowRect(int iMonitor = 0);
void SetDefaultFullscreenState();
void RestoreDefaultWindowRect();
+ CRect GetInvisibleBorderSize() const;
CSize GetZoomWindowSize(double dScale);
CRect GetZoomWindowRect(const CSize& size);
void ZoomVideoWindow(double dScale = ZOOM_DEFAULT_LEVEL);
@@ -302,9 +313,10 @@ private:
void SetupShadersSubMenu();
void SetupRecentFilesSubMenu();
- IBaseFilter* FindSourceSelectableFilter();
void SetupNavStreamSelectSubMenu(CMenu& subMenu, UINT id, DWORD dwSelGroup);
void OnNavStreamSelectSubMenu(UINT id, DWORD dwSelGroup);
+ void OnStreamSelect(bool forward, DWORD dwSelGroup);
+ static CString GetStreamOSDString(CString name, LCID lcid, DWORD dwSelGroup);
CMenu m_mainPopupMenu, m_popupMenu;
CMenu m_openCDsMenu;
@@ -387,6 +399,7 @@ private:
MLS m_eMediaLoadState;
REFTIME GetAvgTimePerFrame() const;
+ void OnVideoSizeChanged(const bool bWasAudioOnly = false);
CDropTarget m_dropTarget;
void OnDropFiles(CAtlList<CString>& slFiles, DROPEFFECT dropEffect) override;
@@ -604,6 +617,13 @@ public:
bAbortInfo = true;
}
+ void Join() {
+ if (infoData.valid()) {
+ bAbortInfo = true;
+ infoData.wait();
+ }
+ }
+
~DVBState() {
bAbortInfo = true;
}
@@ -671,6 +691,8 @@ public:
afx_msg void OnDisplayChange();
afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
+ LRESULT OnDpiChanged(WPARAM wParam, LPARAM lParam);
+
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnActivateApp(BOOL bActive, DWORD dwThreadID);
afx_msg LRESULT OnAppCommand(WPARAM wParam, LPARAM lParam);
@@ -714,8 +736,6 @@ public:
afx_msg void OnStreamAudio(UINT nID);
afx_msg void OnStreamSub(UINT nID);
afx_msg void OnStreamSubOnOff();
- afx_msg void OnOgmAudio(UINT nID);
- afx_msg void OnOgmSub(UINT nID);
afx_msg void OnDvdAngle(UINT nID);
afx_msg void OnDvdAudio(UINT nID);
afx_msg void OnDvdSub(UINT nID);
@@ -1065,7 +1085,7 @@ protected:
bool m_bAllowWindowZoom;
double m_dLastVideoScaleFactor;
- int m_nLastVideoWidth;
+ CSize m_lastVideoSize;
bool m_bExtOnTop; // 'true' if the "on top" flag was set by an external tool
@@ -1094,6 +1114,4 @@ public:
bool OpenBD(CString Path);
bool GetDecoderType(CString& type) const;
-
- DPI m_dpi;
};
diff --git a/src/mpc-hc/MainFrmControls.cpp b/src/mpc-hc/MainFrmControls.cpp
index d9588e9c2..f0f1e31b8 100644
--- a/src/mpc-hc/MainFrmControls.cpp
+++ b/src/mpc-hc/MainFrmControls.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2013-2014 see Authors.txt
+ * (C) 2013-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -244,7 +244,7 @@ CSize CMainFrameControls::GetDockZonesMinSize(unsigned uSaneFallback)
auto pBar = static_cast<CPlayerBar*>(pDock->m_arrBars[i]);
if (!pBar && !bNewRow) {
bNewRow = true;
- maxRowSize = max(maxRowSize, rowSize);
+ maxRowSize = std::max(maxRowSize, rowSize);
rowSize = 0;
}
if (pBar) {
@@ -272,8 +272,8 @@ CSize CMainFrameControls::GetDockZonesMinSize(unsigned uSaneFallback)
const CSize sizeBottom(m_panelZones.find(DOCK_BOTTOM) != std::end(m_panelZones) ? calcDock(DOCK_BOTTOM) : 0);
CSize ret;
- ret.cx = max(sizeLeft.cx + sizeRight.cx, max(sizeTop.cx, sizeBottom.cx));
- ret.cy = sizeTop.cy + sizeBottom.cy + max(sizeLeft.cy, sizeRight.cy);
+ ret.cx = std::max(sizeLeft.cx + sizeRight.cx, std::max(sizeTop.cx, sizeBottom.cx));
+ ret.cy = sizeTop.cy + sizeBottom.cy + std::max(sizeLeft.cy, sizeRight.cy);
const unsigned uToolbars = GetToolbarsHeight();
if (uToolbars) {
ret.cx = std::max(ret.cx, saneX);
@@ -397,17 +397,21 @@ void CMainFrameControls::UpdateToolbarsVisibility()
if (bOnWindow) {
unsigned uTop, uLeft, uRight, uBottom;
GetDockZones(uTop, uLeft, uRight, uBottom, bEnumedPanelZones ? false : (bEnumedPanelZones = true));
- unsigned uExclSeekbarHeight = 0;
+ CRect clientRect;
+ m_pMainFrame->GetClientRect(clientRect);
+ CRect exclSeekbarRect;
if (bExclSeekbar) {
- uExclSeekbarHeight = 56; // TODO: query this through IMadVRInfo
+ if (!m_pMainFrame->m_pMVRI
+ || FAILED(m_pMainFrame->m_pMVRI->GetRect("seekbarRect", exclSeekbarRect))) {
+ exclSeekbarRect = clientRect;
+ exclSeekbarRect.top = 56;
+ }
uBottom = 0;
}
if (!bCanHideDockedPanels) {
uTop = uLeft = uRight = 0;
}
- CRect clientRect;
- m_pMainFrame->GetClientRect(clientRect);
- const bool bHoveringExclSeekbar = (bExclSeekbar && clientPoint.y + (int)uExclSeekbarHeight >= clientRect.Height());
+ const bool bHoveringExclSeekbar = (bExclSeekbar && exclSeekbarRect.PtInRect(clientPoint));
ret = true;
if (clientRect.PtInRect(clientPoint)) {
if (ePolicy == CAppSettings::HideFullscreenControlsPolicy::SHOW_WHEN_CURSOR_MOVED) {
diff --git a/src/mpc-hc/MediaPositionList.h b/src/mpc-hc/MediaPositionList.h
index fdceec9e2..b08d0de73 100644
--- a/src/mpc-hc/MediaPositionList.h
+++ b/src/mpc-hc/MediaPositionList.h
@@ -1,5 +1,5 @@
/*
- * (C) 2012-2014 see Authors.txt
+ * (C) 2012-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -45,7 +45,7 @@ public:
, m_nMaxSize(nMaxSize)
{};
- int GetMaxSize() const { m_nMaxSize; };
+ int GetMaxSize() const { return m_nMaxSize; };
void SetMaxSize(int nMaxSize) {
ENSURE_ARG(nMaxSize >= 0);
diff --git a/src/mpc-hc/MouseTouch.cpp b/src/mpc-hc/MouseTouch.cpp
index 1bb216088..9812dda23 100644
--- a/src/mpc-hc/MouseTouch.cpp
+++ b/src/mpc-hc/MouseTouch.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2013-2014 see Authors.txt
+ * (C) 2013-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -634,3 +634,17 @@ void CMouseWnd::OnDestroy()
CMouse::InternalOnDestroy();
CWnd::OnDestroy();
}
+
+std::unordered_set<const CWnd*> CMainFrameMouseHook::GetRoots()
+{
+ std::unordered_set<const CWnd*> ret;
+ const CMainFrame* pMainFrame = AfxGetMainFrame();
+ ASSERT(pMainFrame);
+ if (pMainFrame) {
+ ret.emplace(pMainFrame);
+ if (pMainFrame->IsD3DFullScreenMode()) {
+ ret.emplace(pMainFrame->m_pFullscreenWnd);
+ }
+ }
+ return ret;
+}
diff --git a/src/mpc-hc/MouseTouch.h b/src/mpc-hc/MouseTouch.h
index 0651330ec..806bc2b82 100644
--- a/src/mpc-hc/MouseTouch.h
+++ b/src/mpc-hc/MouseTouch.h
@@ -21,8 +21,10 @@
#pragma once
#include <map>
+#include <unordered_set>
#include "EventDispatcher.h"
+#include "SysVersion.h"
// TODO: handle touch gestures
@@ -164,3 +166,72 @@ private:
return m_bD3DFS ? TABLET_DISABLE_PRESSANDHOLD : 0;
}
};
+
+template <class T>
+class CMouseWheelHook
+{
+ HHOOK m_hHook = NULL;
+
+ static LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam) {
+ if (nCode == HC_ACTION && wParam == WM_MOUSEWHEEL) {
+ const auto& msex = *reinterpret_cast<MOUSEHOOKSTRUCTEX*>(lParam);
+ if (const CWnd* pFocus = CWnd::FromHandlePermanent(msex.hwnd)) {
+ if (const CWnd* pFocusRoot = pFocus->GetAncestor(GA_ROOT)) {
+ // only intercept messages to focused windows that have white-listed root windows
+ if (T::GetRoots().count(pFocusRoot)) {
+ if (const CWnd* pUnder = CWnd::WindowFromPoint(msex.pt)) {
+ if (pFocusRoot == pUnder->GetAncestor(GA_ROOT) &&
+ GetCurrentThreadId() == GetWindowThreadProcessId(pUnder->m_hWnd, nullptr)) {
+ MSG msg = {
+ NULL,
+ static_cast<UINT>(wParam),
+ CMouse::GetMouseFlags() | msex.mouseData,
+ MAKELPARAM(msex.pt.x, msex.pt.y),
+ GetMessageTime(),
+ msex.pt
+ };
+
+ for (const CWnd* pTarget : { pUnder, pFocusRoot }) {
+ msg.hwnd = pTarget->m_hWnd;
+ if (!msg.hwnd) {
+ ASSERT(FALSE);
+ continue;
+ }
+
+ // walk through pre-translate
+ if (CWnd::WalkPreTranslateTree(pFocusRoot->m_hWnd, &msg)) {
+ // the message shouldn't be dispatched
+ continue;
+ }
+
+ if (DispatchMessage(&msg)) {
+ return TRUE;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return CallNextHookEx(nullptr, nCode, wParam, lParam);
+ }
+
+public:
+ CMouseWheelHook() {
+ if (SysVersion::Is10OrLater()) {
+ m_hHook = SetWindowsHookEx(WH_MOUSE, MouseProc, nullptr, GetCurrentThreadId());
+ ASSERT(m_hHook);
+ }
+ }
+
+ virtual ~CMouseWheelHook() {
+ if (m_hHook) {
+ VERIFY(UnhookWindowsHookEx(m_hHook));
+ }
+ }
+};
+
+struct CMainFrameMouseHook : CMouseWheelHook<CMainFrameMouseHook> {
+ static std::unordered_set<const CWnd*> GetRoots();
+};
diff --git a/src/mpc-hc/OpenDlg.cpp b/src/mpc-hc/OpenDlg.cpp
index 22c0e5d70..fe8eadbde 100644
--- a/src/mpc-hc/OpenDlg.cpp
+++ b/src/mpc-hc/OpenDlg.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -32,8 +32,8 @@
//IMPLEMENT_DYNAMIC(COpenDlg, CResizableDialog)
COpenDlg::COpenDlg(CWnd* pParent /*=nullptr*/)
: CResizableDialog(COpenDlg::IDD, pParent)
- , m_bMultipleFiles(false)
, m_bAppendToPlaylist(FALSE)
+ , m_bMultipleFiles(false)
{
}
diff --git a/src/mpc-hc/PPageAudioRenderer.cpp b/src/mpc-hc/PPageAudioRenderer.cpp
new file mode 100644
index 000000000..a65839897
--- /dev/null
+++ b/src/mpc-hc/PPageAudioRenderer.cpp
@@ -0,0 +1,233 @@
+/*
+ * (C) 2015 see Authors.txt
+ *
+ * This file is part of MPC-HC.
+ *
+ * MPC-HC 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.
+ *
+ * MPC-HC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "stdafx.h"
+#include "PPageAudioRenderer.h"
+
+#include "mplayerc.h"
+#include "VersionInfo.h"
+
+#include <FunctionDiscoveryKeys_devpkey.h>
+#include <Mmdeviceapi.h>
+
+namespace
+{
+ std::vector<std::pair<CString, CString>> GetDevices()
+ {
+ std::vector<std::pair<CString, CString>> ret;
+
+ CComPtr<IMMDeviceEnumerator> enumerator;
+ CComPtr<IMMDeviceCollection> collection;
+ UINT count = 0;
+
+ if (SUCCEEDED(enumerator.CoCreateInstance(__uuidof(MMDeviceEnumerator), nullptr, CLSCTX_INPROC_SERVER)) &&
+ SUCCEEDED(enumerator->EnumAudioEndpoints(eRender, DEVICE_STATE_ACTIVE | DEVICE_STATE_UNPLUGGED, &collection)) &&
+ SUCCEEDED(collection->GetCount(&count))) {
+
+ for (UINT i = 0; i < count; i++) {
+ CComPtr<IMMDevice> device;
+ CComHeapPtr<WCHAR> id;
+ CComPtr<IPropertyStore> devicePropertyStore;
+ PROPVARIANT friendlyName;
+ PropVariantInit(&friendlyName);
+
+ if (SUCCEEDED(collection->Item(i, &device)) &&
+ SUCCEEDED(device->GetId(&id)) &&
+ SUCCEEDED(device->OpenPropertyStore(STGM_READ, &devicePropertyStore)) &&
+ SUCCEEDED(devicePropertyStore->GetValue(PKEY_Device_FriendlyName, &friendlyName))) {
+
+ ret.emplace_back(friendlyName.pwszVal, static_cast<LPWSTR>(id));
+ PropVariantClear(&friendlyName);
+ }
+ }
+ }
+
+ return ret;
+ }
+}
+
+CPPageAudioRenderer::CPPageAudioRenderer()
+ : CPPageBase(IDD, VersionInfo::IsLite() ? IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND : IDD_PPAGEAUDIORENDERER)
+ , m_bExclusiveMode(FALSE)
+ , m_bAllowBitstreaming(TRUE)
+ , m_bCrossfeedEnabled(FALSE)
+{
+}
+
+void CPPageAudioRenderer::DoDataExchange(CDataExchange* pDX)
+{
+ __super::DoDataExchange(pDX);
+ DDX_Check(pDX, IDC_CHECK1, m_bExclusiveMode);
+ DDX_Check(pDX, IDC_CHECK2, m_bAllowBitstreaming);
+ DDX_Check(pDX, IDC_CHECK3, m_bCrossfeedEnabled);
+ DDX_Control(pDX, IDC_COMBO1, m_combo1);
+ DDX_Control(pDX, IDC_SLIDER1, m_slider1);
+ DDX_Control(pDX, IDC_SLIDER2, m_slider2);
+}
+
+BEGIN_MESSAGE_MAP(CPPageAudioRenderer, CPPageBase)
+ ON_WM_HSCROLL()
+ ON_UPDATE_COMMAND_UI(IDC_CHECK2, OnUpdateAllowBitstreamingCheckbox)
+ ON_UPDATE_COMMAND_UI(IDC_BUTTON1, OnUpdateCrossfeedGroup)
+ ON_BN_CLICKED(IDC_BUTTON1, OnCMoyButton)
+ ON_UPDATE_COMMAND_UI(IDC_BUTTON2, OnUpdateCrossfeedGroup)
+ ON_BN_CLICKED(IDC_BUTTON2, OnJMeierButton)
+ ON_UPDATE_COMMAND_UI(IDC_STATIC1, OnUpdateCrossfeedGroup)
+ ON_UPDATE_COMMAND_UI(IDC_SLIDER1, OnUpdateCrossfeedGroup)
+ ON_UPDATE_COMMAND_UI(IDC_STATIC2, OnUpdateCrossfeedCutoffLabel)
+ ON_UPDATE_COMMAND_UI(IDC_STATIC3, OnUpdateCrossfeedGroup)
+ ON_UPDATE_COMMAND_UI(IDC_SLIDER2, OnUpdateCrossfeedGroup)
+ ON_UPDATE_COMMAND_UI(IDC_STATIC4, OnUpdateCrossfeedLevelLabel)
+END_MESSAGE_MAP()
+
+BOOL CPPageAudioRenderer::OnInitDialog()
+{
+ __super::OnInitDialog();
+
+ const auto& s = AfxGetAppSettings();
+
+ CString defaultString;
+ defaultString.LoadString(IDS_PPAGE_OUTPUT_SYS_DEF);
+ m_combo1.AddString(defaultString);
+ m_deviceIds.emplace_back();
+ m_combo1.SetItemData(0, 0);
+
+ for (const auto& device : GetDevices()) {
+ int idx = m_combo1.AddString(device.first);
+ if (idx >= 0) {
+ m_deviceIds.emplace_back(device.second);
+ m_combo1.SetItemData(idx, m_deviceIds.size() - 1);
+ }
+ }
+
+ CComHeapPtr<WCHAR> pDeviceId;
+ if (SUCCEEDED(s.sanear->GetOuputDevice(&pDeviceId, &m_bExclusiveMode, nullptr))) {
+ if (!pDeviceId || pDeviceId[0] == '\0') {
+ m_combo1.SetCurSel(0);
+ } else {
+ for (size_t i = 0; i < m_deviceIds.size(); i++) {
+ if (m_deviceIds[i] == pDeviceId) {
+ for (int j = 0; j < m_combo1.GetCount(); j++) {
+ if (m_combo1.GetItemData(j) == i) {
+ m_combo1.SetCurSel(j);
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ s.sanear->GetAllowBitstreaming(&m_bAllowBitstreaming);
+ s.sanear->GetCrossfeedEnabled(&m_bCrossfeedEnabled);
+
+ m_slider1.SetRangeMin(SaneAudioRenderer::ISettings::CROSSFEED_CUTOFF_FREQ_MIN);
+ m_slider1.SetRangeMax(SaneAudioRenderer::ISettings::CROSSFEED_CUTOFF_FREQ_MAX);
+ m_slider2.SetRangeMin(SaneAudioRenderer::ISettings::CROSSFEED_LEVEL_MIN);
+ m_slider2.SetRangeMax(SaneAudioRenderer::ISettings::CROSSFEED_LEVEL_MAX);
+
+ UINT32 crossfeedCuttoffFrequency;
+ UINT32 crossfeedLevel;
+ s.sanear->GetCrossfeedSettings(&crossfeedCuttoffFrequency, &crossfeedLevel);
+ m_slider1.SetPos(crossfeedCuttoffFrequency);
+ m_slider2.SetPos(crossfeedLevel);
+
+ UpdateData(FALSE);
+
+ return TRUE;
+}
+
+BOOL CPPageAudioRenderer::OnApply()
+{
+ if (!UpdateData(TRUE)) {
+ return FALSE;
+ }
+
+ const auto& s = AfxGetAppSettings();
+
+ CString deviceId;
+ DWORD_PTR idx = m_combo1.GetItemData(m_combo1.GetCurSel());
+ if (idx != CB_ERR) {
+ deviceId = m_deviceIds[idx];
+ }
+
+ UINT32 buffer;
+ s.sanear->GetOuputDevice(nullptr, nullptr, &buffer);
+ s.sanear->SetOuputDevice(deviceId, m_bExclusiveMode, buffer);
+
+ s.sanear->SetAllowBitstreaming(m_bAllowBitstreaming);
+ s.sanear->SetCrossfeedSettings(m_slider1.GetPos(), m_slider2.GetPos());
+ s.sanear->SetCrossfeedEnabled(m_bCrossfeedEnabled);
+
+ return __super::OnApply();
+}
+
+void CPPageAudioRenderer::OnCancel()
+{
+ __super::OnCancel();
+}
+
+void CPPageAudioRenderer::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
+{
+ if (pScrollBar && (*pScrollBar == m_slider1 || *pScrollBar == m_slider2)) {
+ SetModified(TRUE);
+ }
+}
+
+void CPPageAudioRenderer::OnCMoyButton()
+{
+ m_slider1.SetPos(SaneAudioRenderer::ISettings::CROSSFEED_CUTOFF_FREQ_CMOY);
+ m_slider2.SetPos(SaneAudioRenderer::ISettings::CROSSFEED_LEVEL_CMOY);
+ SetModified(TRUE);
+}
+
+void CPPageAudioRenderer::OnJMeierButton()
+{
+ m_slider1.SetPos(SaneAudioRenderer::ISettings::CROSSFEED_CUTOFF_FREQ_JMEIER);
+ m_slider2.SetPos(SaneAudioRenderer::ISettings::CROSSFEED_LEVEL_JMEIER);
+ SetModified(TRUE);
+}
+
+void CPPageAudioRenderer::OnUpdateAllowBitstreamingCheckbox(CCmdUI* pCmdUI)
+{
+ pCmdUI->Enable(IsDlgButtonChecked(IDC_CHECK1));
+}
+
+void CPPageAudioRenderer::OnUpdateCrossfeedGroup(CCmdUI* pCmdUI)
+{
+ pCmdUI->Enable(IsDlgButtonChecked(IDC_CHECK3));
+}
+
+void CPPageAudioRenderer::OnUpdateCrossfeedCutoffLabel(CCmdUI* pCmdUI)
+{
+ OnUpdateCrossfeedGroup(pCmdUI);
+ CString label;
+ label.Format(_T("%d Hz"), m_slider1.GetPos());
+ pCmdUI->SetText(label);
+}
+
+void CPPageAudioRenderer::OnUpdateCrossfeedLevelLabel(CCmdUI* pCmdUI)
+{
+ OnUpdateCrossfeedGroup(pCmdUI);
+ int pos = m_slider2.GetPos();
+ CString label;
+ label.Format(_T("%d.%d dB"), pos / 10, pos % 10);
+ pCmdUI->SetText(label);
+}
diff --git a/src/mpc-hc/PPageAudioRenderer.h b/src/mpc-hc/PPageAudioRenderer.h
new file mode 100644
index 000000000..1af686901
--- /dev/null
+++ b/src/mpc-hc/PPageAudioRenderer.h
@@ -0,0 +1,61 @@
+/*
+ * (C) 2015 see Authors.txt
+ *
+ * This file is part of MPC-HC.
+ *
+ * MPC-HC 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.
+ *
+ * MPC-HC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include "PPageBase.h"
+
+class CPPageAudioRenderer : public CPPageBase
+{
+public:
+
+ CPPageAudioRenderer();
+
+ enum { IDD = IDD_PPAGEAUDIORENDERER };
+
+protected:
+
+ void DoDataExchange(CDataExchange* pDX) override;
+ BOOL OnInitDialog() override;
+ BOOL OnApply() override;
+ void OnCancel() override;
+
+ void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
+
+ void OnCMoyButton();
+ void OnJMeierButton();
+
+ void OnUpdateAllowBitstreamingCheckbox(CCmdUI* pCmdUI);
+ void OnUpdateCrossfeedGroup(CCmdUI* pCmdUI);
+ void OnUpdateCrossfeedCutoffLabel(CCmdUI* pCmdUI);
+ void OnUpdateCrossfeedLevelLabel(CCmdUI* pCmdUI);
+
+ DECLARE_MESSAGE_MAP()
+
+ std::vector<CString> m_deviceIds;
+
+ BOOL m_bExclusiveMode;
+ BOOL m_bAllowBitstreaming;
+ BOOL m_bCrossfeedEnabled;
+
+ CComboBox m_combo1;
+ CSliderCtrl m_slider1;
+ CSliderCtrl m_slider2;
+};
diff --git a/src/mpc-hc/PPageAudioSwitcher.cpp b/src/mpc-hc/PPageAudioSwitcher.cpp
index 6ecb5048d..08fa25dfe 100644
--- a/src/mpc-hc/PPageAudioSwitcher.cpp
+++ b/src/mpc-hc/PPageAudioSwitcher.cpp
@@ -173,7 +173,8 @@ BOOL CPPageAudioSwitcher::OnInitDialog()
// m_list.SetColumnWidth(i, m_list.GetColumnWidth(i)*8/10);
}
- m_tooltip.Create(GetDlgItem(IDC_SLIDER1));
+ EnableToolTips(TRUE);
+ m_tooltip.Create(this);
m_tooltip.Activate(TRUE);
CorrectComboBoxHeaderWidth(GetDlgItem(IDC_CHECK5));
@@ -377,19 +378,27 @@ BOOL CPPageAudioSwitcher::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResu
nID = ::GetDlgCtrlID((HWND)nID);
}
- if (nID != IDC_SLIDER1) {
- return FALSE;
- }
-
- static CString strTipText; // static string
+ bool bRet = false;
- strTipText.Format(ResStr(IDS_BOOST), m_AudioBoostCtrl.GetPos());
+ static CString strTipText;
- pTTT->lpszText = (LPWSTR)(LPCWSTR)strTipText;
+ switch (nID) {
+ case IDC_SLIDER1:
+ strTipText.Format(ResStr(IDS_BOOST), m_AudioBoostCtrl.GetPos());
+ bRet = true;
+ break;
+ case IDC_EDIT2:
+ case IDC_SPIN2:
+ strTipText.LoadStringW(IDS_TIME_SHIFT_TOOLTIP);
+ bRet = true;
+ break;
+ }
- *pResult = 0;
+ if (bRet) {
+ pTTT->lpszText = (LPWSTR)(LPCWSTR)strTipText;
+ }
- return TRUE; // message was handled
+ return bRet;
}
void CPPageAudioSwitcher::OnCancel()
diff --git a/src/mpc-hc/PPageExternalFilters.cpp b/src/mpc-hc/PPageExternalFilters.cpp
index f2f2d7df5..a03cc016e 100644
--- a/src/mpc-hc/PPageExternalFilters.cpp
+++ b/src/mpc-hc/PPageExternalFilters.cpp
@@ -33,36 +33,35 @@
#include "moreuuids.h"
-IMPLEMENT_DYNAMIC(CPPageExternalFiltersListBox, CCheckListBox)
+IMPLEMENT_DYNAMIC(CPPageExternalFiltersListBox, CListCtrl)
CPPageExternalFiltersListBox::CPPageExternalFiltersListBox()
- : CCheckListBox()
{
}
void CPPageExternalFiltersListBox::PreSubclassWindow()
{
__super::PreSubclassWindow();
+ GetToolTips()->Activate(FALSE);
EnableToolTips(TRUE);
}
INT_PTR CPPageExternalFiltersListBox::OnToolHitTest(CPoint point, TOOLINFO* pTI) const
{
- BOOL out = FALSE;
- UINT item = ItemFromPoint(point, out);
- if (out) {
+ int item = HitTest(point);
+ if (item < 0) {
return -1;
}
pTI->uFlags |= TTF_ALWAYSTIP;
pTI->hwnd = m_hWnd;
- pTI->uId = item;
- VERIFY(GetItemRect(item, &pTI->rect) != LB_ERR);
+ pTI->uId = (UINT)item;
+ VERIFY(GetItemRect(item, &pTI->rect, LVIR_BOUNDS));
pTI->lpszText = LPSTR_TEXTCALLBACK;
return pTI->uId;
}
-BEGIN_MESSAGE_MAP(CPPageExternalFiltersListBox, CCheckListBox)
+BEGIN_MESSAGE_MAP(CPPageExternalFiltersListBox, CListCtrl)
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify)
END_MESSAGE_MAP()
@@ -100,52 +99,74 @@ void CPPageExternalFilters::DoDataExchange(CDataExchange* pDX)
DDX_Control(pDX, IDC_TREE1, m_tree);
}
-void CPPageExternalFilters::StepUp(CCheckListBox& list)
+void CPPageExternalFilters::Exchange(CListCtrl& list, int i, int j)
{
- int i = list.GetCurSel();
- if (i < 1) {
+ CString text = list.GetItemText(i, 0);
+ DWORD_PTR data = list.GetItemData(i);
+ int check = list.GetCheck(i);
+ bool selected = !!list.GetItemState(i, LVIS_SELECTED);
+
+ list.SetItemText(i, 0, list.GetItemText(j, 0));
+ list.SetItemData(i, list.GetItemData(j));
+ list.SetCheck(i, list.GetCheck(j));
+ list.SetItemState(i, LVIS_SELECTED, list.GetItemState(j, LVIS_SELECTED));
+
+ list.SetItemText(j, 0, text);
+ list.SetItemData(j, data);
+ list.SetCheck(j, check);
+ list.SetItemState(j, LVIS_SELECTED, selected ? LVIS_SELECTED : 0);
+
+ int mark = list.GetSelectionMark();
+ if (mark == i) {
+ list.SetSelectionMark(j);
+ } else if (mark == j) {
+ list.SetSelectionMark(i);
+ }
+}
+
+void CPPageExternalFilters::StepUp(CListCtrl& list)
+{
+ POSITION pos = list.GetFirstSelectedItemPosition();
+
+ if (!pos) {
return;
}
- CString str;
- list.GetText(i, str);
- DWORD_PTR dwItemData = list.GetItemData(i);
- int nCheck = list.GetCheck(i);
- list.DeleteString(i);
- i--;
- list.InsertString(i, str);
- list.SetItemData(i, dwItemData);
- list.SetCheck(i, nCheck);
- list.SetCurSel(i);
+ int i = list.GetNextSelectedItem(pos);
+
+ ASSERT(i > 0);
+
+ Exchange(list, i, i - 1);
SetModified();
}
-void CPPageExternalFilters::StepDown(CCheckListBox& list)
+void CPPageExternalFilters::StepDown(CListCtrl& list)
{
- int i = list.GetCurSel();
- if (i < 0 || i >= list.GetCount() - 1) {
+ POSITION pos = list.GetFirstSelectedItemPosition();
+
+ if (!pos) {
return;
}
- CString str;
- list.GetText(i, str);
- DWORD_PTR dwItemData = list.GetItemData(i);
- int nCheck = list.GetCheck(i);
- list.DeleteString(i);
- i++;
- list.InsertString(i, str);
- list.SetItemData(i, dwItemData);
- list.SetCheck(i, nCheck);
- list.SetCurSel(i);
+ int i = list.GetNextSelectedItem(pos);
+
+ ASSERT(i + 1 < list.GetItemCount());
+
+ Exchange(list, i, i + 1);
SetModified();
}
FilterOverride* CPPageExternalFilters::GetCurFilter()
{
- int i = m_filters.GetCurSel();
- return i >= 0 ? (FilterOverride*)m_pFilters.GetAt((POSITION)m_filters.GetItemDataPtr(i)) : (FilterOverride*)nullptr;
+ POSITION pos = m_filters.GetFirstSelectedItemPosition();
+
+ if (!pos) {
+ return nullptr;
+ }
+
+ return m_pFilters.GetAt((POSITION)m_filters.GetItemData(m_filters.GetNextSelectedItem(pos)));
}
void CPPageExternalFilters::SetupMajorTypes(CAtlArray<GUID>& guids)
@@ -312,14 +333,13 @@ BEGIN_MESSAGE_MAP(CPPageExternalFilters, CPPageBase)
ON_BN_CLICKED(IDC_BUTTON2, OnRemoveFilter)
ON_BN_CLICKED(IDC_BUTTON3, OnMoveFilterUp)
ON_BN_CLICKED(IDC_BUTTON4, OnMoveFilterDown)
- ON_LBN_DBLCLK(IDC_LIST1, OnDoubleClickFilter)
+ ON_NOTIFY(NM_DBLCLK, IDC_LIST1, OnDoubleClickFilter)
ON_WM_VKEYTOITEM()
ON_BN_CLICKED(IDC_BUTTON5, OnAddMajorType)
ON_BN_CLICKED(IDC_BUTTON6, OnAddSubType)
ON_BN_CLICKED(IDC_BUTTON7, OnDeleteType)
ON_BN_CLICKED(IDC_BUTTON8, OnResetTypes)
- ON_LBN_SELCHANGE(IDC_LIST1, OnFilterSelectionChange)
- ON_CLBN_CHKCHANGE(IDC_LIST1, OnFilterCheckChange)
+ ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST1, OnFilterChanged)
ON_BN_CLICKED(IDC_RADIO1, OnClickedMeritRadioButton)
ON_BN_CLICKED(IDC_RADIO2, OnClickedMeritRadioButton)
ON_BN_CLICKED(IDC_RADIO3, OnClickedMeritRadioButton)
@@ -337,6 +357,9 @@ BOOL CPPageExternalFilters::OnInitDialog()
{
__super::OnInitDialog();
+ m_filters.InsertColumn(0, _T(""));
+ m_filters.SetExtendedStyle(m_filters.GetExtendedStyle() | LVS_EX_CHECKBOXES | LVS_EX_DOUBLEBUFFER);
+
m_dropTarget.Register(this);
const CAppSettings& s = AfxGetAppSettings();
@@ -364,11 +387,13 @@ BOOL CPPageExternalFilters::OnInitDialog()
}
}
- int i = m_filters.AddString(name);
+ int i = m_filters.InsertItem(m_filters.GetItemCount(), name);
m_filters.SetCheck(i, f->fDisabled ? 0 : 1);
- m_filters.SetItemDataPtr(i, m_pFilters.AddTail(f));
+ m_filters.SetItemData(i, reinterpret_cast<DWORD_PTR>(m_pFilters.AddTail(f)));
}
+ m_filters.SetColumnWidth(0, LVSCW_AUTOSIZE);
+
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
@@ -389,7 +414,7 @@ BOOL CPPageExternalFilters::OnApply()
s.m_filters.RemoveAll();
- for (int i = 0; i < m_filters.GetCount(); i++) {
+ for (int i = 0; i < m_filters.GetItemCount(); i++) {
if (POSITION pos = (POSITION)m_filters.GetItemData(i)) {
CAutoPtr<FilterOverride> f(DEBUG_NEW FilterOverride(m_pFilters.GetAt(pos)));
f->fDisabled = !m_filters.GetCheck(i);
@@ -413,12 +438,14 @@ void CPPageExternalFilters::OnUpdateFilter(CCmdUI* pCmdUI)
void CPPageExternalFilters::OnUpdateFilterUp(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(m_filters.GetCurSel() > 0);
+ POSITION pos = m_filters.GetFirstSelectedItemPosition();
+ pCmdUI->Enable(pos && m_filters.GetNextSelectedItem(pos) > 0);
}
void CPPageExternalFilters::OnUpdateFilterDown(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(m_filters.GetCurSel() >= 0 && m_filters.GetCurSel() < m_filters.GetCount() - 1);
+ POSITION pos = m_filters.GetFirstSelectedItemPosition();
+ pCmdUI->Enable(pos && m_filters.GetNextSelectedItem(pos) < m_filters.GetItemCount() - 1);
}
void CPPageExternalFilters::OnUpdateFilterMerit(CCmdUI* pCmdUI)
@@ -454,15 +481,18 @@ void CPPageExternalFilters::OnAddRegistered()
}
}
- int i = m_filters.AddString(name);
- m_filters.SetItemDataPtr(i, m_pFilters.AddTail(p));
+ int i = m_filters.InsertItem(m_filters.GetItemCount(), name);
+ m_filters.SetItemData(i, reinterpret_cast<DWORD_PTR>(m_pFilters.AddTail(p)));
m_filters.SetCheck(i, 1);
if (dlg.m_filters.IsEmpty()) {
- m_filters.SetCurSel(i);
+ m_filters.SetItemState(i, LVIS_SELECTED, LVIS_SELECTED);
+ m_filters.SetSelectionMark(i);
OnFilterSelectionChange();
}
+ m_filters.SetColumnWidth(0, LVSCW_AUTOSIZE);
+
SetModified();
}
}
@@ -471,14 +501,17 @@ void CPPageExternalFilters::OnAddRegistered()
void CPPageExternalFilters::OnRemoveFilter()
{
- int i = m_filters.GetCurSel();
- m_pFilters.RemoveAt((POSITION)m_filters.GetItemDataPtr(i));
- m_filters.DeleteString(i);
+ POSITION pos = m_filters.GetFirstSelectedItemPosition();
+ ASSERT(pos);
+ int i = m_filters.GetNextSelectedItem(pos);
+ m_pFilters.RemoveAt((POSITION)m_filters.GetItemData(i));
+ m_filters.DeleteItem(i);
- if (i >= m_filters.GetCount()) {
+ if (i >= m_filters.GetItemCount()) {
i--;
}
- m_filters.SetCurSel(i);
+ m_filters.SetItemState(i, LVIS_SELECTED, LVIS_SELECTED);
+ m_filters.SetSelectionMark(i);
OnFilterSelectionChange();
SetModified();
@@ -494,8 +527,11 @@ void CPPageExternalFilters::OnMoveFilterDown()
StepDown(m_filters);
}
-void CPPageExternalFilters::OnDoubleClickFilter()
+void CPPageExternalFilters::OnDoubleClickFilter(NMHDR* pNMHDR, LRESULT* pResult)
{
+ ASSERT(pNMHDR);
+ ASSERT(pResult);
+
if (FilterOverride* f = GetCurFilter()) {
CComPtr<IBaseFilter> pBF;
CString name;
@@ -523,6 +559,8 @@ void CPPageExternalFilters::OnDoubleClickFilter()
}
}
}
+
+ *pResult = 0;
}
int CPPageExternalFilters::OnVKeyToItem(UINT nKey, CListBox* pListBox, UINT nIndex)
@@ -695,6 +733,25 @@ void CPPageExternalFilters::OnResetTypes()
}
}
+void CPPageExternalFilters::OnFilterChanged(NMHDR* pNMHDR, LRESULT* pResult)
+{
+ ASSERT(pNMHDR);
+ ASSERT(pResult);
+
+ auto pNMLV = reinterpret_cast<NMLISTVIEW*>(pNMHDR);
+
+ if (pNMLV->lParam && (pNMLV->uChanged & LVIF_STATE)) {
+ if (pNMLV->uNewState & LVIS_SELECTED) {
+ OnFilterSelectionChange();
+ }
+ if (pNMLV->uNewState & LVIS_STATEIMAGEMASK) {
+ OnFilterCheckChange();
+ }
+ }
+
+ *pResult = 0;
+}
+
void CPPageExternalFilters::OnFilterSelectionChange()
{
if (FilterOverride* f = GetCurFilter()) {
@@ -847,15 +904,18 @@ void CPPageExternalFilters::OnDropFiles(CAtlList<CString>& slFiles, DROPEFFECT)
while (!fm2.m_filters.IsEmpty()) {
if (FilterOverride* f = fm2.m_filters.RemoveHead()) {
CAutoPtr<FilterOverride> p(f);
- int i = m_filters.AddString(f->name);
- m_filters.SetItemDataPtr(i, m_pFilters.AddTail(p));
+ int i = m_filters.InsertItem(m_filters.GetItemCount(), f->name);
+ m_filters.SetItemData(i, reinterpret_cast<DWORD_PTR>(m_pFilters.AddTail(p)));
m_filters.SetCheck(i, 1);
if (fm2.m_filters.IsEmpty()) {
- m_filters.SetCurSel(i);
+ m_filters.SetItemState(i, LVIS_SELECTED, LVIS_SELECTED);
+ m_filters.SetSelectionMark(i);
OnFilterSelectionChange();
}
+ m_filters.SetColumnWidth(0, LVSCW_AUTOSIZE);
+
SetModified();
}
}
@@ -867,7 +927,7 @@ BOOL CPPageExternalFilters::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pRe
TOOLTIPTEXT* pTTT = (TOOLTIPTEXT*)pNMHDR;
int nIndex = (int)pNMHDR->idFrom;
- if (0 <= nIndex && nIndex < m_filters.GetCount()) {
+ if (0 <= nIndex && nIndex < m_filters.GetItemCount()) {
if (POSITION pos = (POSITION)m_filters.GetItemData(nIndex)) {
CAutoPtr<FilterOverride>& f = m_pFilters.GetAt(pos);
diff --git a/src/mpc-hc/PPageExternalFilters.h b/src/mpc-hc/PPageExternalFilters.h
index da61e6954..adf392ad2 100644
--- a/src/mpc-hc/PPageExternalFilters.h
+++ b/src/mpc-hc/PPageExternalFilters.h
@@ -27,7 +27,7 @@
#include "DropTarget.h"
-class CPPageExternalFiltersListBox : public CCheckListBox
+class CPPageExternalFiltersListBox : public CListCtrl
{
DECLARE_DYNAMIC(CPPageExternalFiltersListBox)
@@ -70,8 +70,9 @@ private:
void OnDropFiles(CAtlList<CString>& slFiles, DROPEFFECT) override;
DROPEFFECT OnDropAccept(COleDataObject*, DWORD, CPoint) override;
- void StepUp(CCheckListBox& list);
- void StepDown(CCheckListBox& list);
+ void Exchange(CListCtrl& list, int i, int j);
+ void StepUp(CListCtrl& list);
+ void StepDown(CListCtrl& list);
FilterOverride* GetCurFilter();
@@ -95,12 +96,13 @@ protected:
afx_msg void OnRemoveFilter();
afx_msg void OnMoveFilterUp();
afx_msg void OnMoveFilterDown();
- afx_msg void OnDoubleClickFilter();
+ void OnDoubleClickFilter(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg int OnVKeyToItem(UINT nKey, CListBox* pListBox, UINT nIndex);
afx_msg void OnAddMajorType();
afx_msg void OnAddSubType();
afx_msg void OnDeleteType();
afx_msg void OnResetTypes();
+ void OnFilterChanged(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnFilterSelectionChange();
afx_msg void OnFilterCheckChange();
afx_msg void OnClickedMeritRadioButton();
diff --git a/src/mpc-hc/PPageFileMediaInfo.cpp b/src/mpc-hc/PPageFileMediaInfo.cpp
index 4459b9e69..fc47b6cb5 100644
--- a/src/mpc-hc/PPageFileMediaInfo.cpp
+++ b/src/mpc-hc/PPageFileMediaInfo.cpp
@@ -32,7 +32,7 @@
using namespace MediaInfoLib;
#define MediaInfo_int64u ZenLib::int64u
#else
-#include "MediaInfoDLL.h"
+#include "MediaInfoDLL/MediaInfoDLL.h"
using namespace MediaInfoDLL;
#endif
diff --git a/src/mpc-hc/PPageFormats.cpp b/src/mpc-hc/PPageFormats.cpp
index 19183a2bd..0fdeccb03 100644
--- a/src/mpc-hc/PPageFormats.cpp
+++ b/src/mpc-hc/PPageFormats.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -29,6 +29,7 @@
#include <string>
#include <atlimage.h>
+#include "DpiHelper.h"
// CPPageFormats dialog
@@ -269,7 +270,7 @@ BOOL CPPageFormats::OnInitDialog()
GetDlgItem(nID)->MoveWindow(r);
};
- const int dy = DPI().ScaleY(-5);
+ const int dy = DpiHelper().ScaleY(-5); // TODO: use the helper from parent dialog
offsetControlBottomRight(IDC_STATIC2, 0, dy);
offsetControlBottomRight(IDC_LIST1, 0, dy);
diff --git a/src/mpc-hc/PPageFullscreen.cpp b/src/mpc-hc/PPageFullscreen.cpp
index 4b68f305d..0a795ee0d 100644
--- a/src/mpc-hc/PPageFullscreen.cpp
+++ b/src/mpc-hc/PPageFullscreen.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -470,7 +470,7 @@ void CPPageFullscreen::OnRemove()
// Remove the item
VERIFY(m_list.DeleteItem(nItem));
// Select the next one
- nItem = min(nItem, m_list.GetItemCount() - 1);
+ nItem = std::min(nItem, m_list.GetItemCount() - 1);
m_list.SetSelectionMark(nItem);
VERIFY(m_list.SetItemState(nItem, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED));
m_list.SetFocus();
diff --git a/src/mpc-hc/PPageInternalFilters.cpp b/src/mpc-hc/PPageInternalFilters.cpp
index efd7d75bb..e8b75af8f 100644
--- a/src/mpc-hc/PPageInternalFilters.cpp
+++ b/src/mpc-hc/PPageInternalFilters.cpp
@@ -26,10 +26,9 @@
#include "../filters/Filters.h"
#include "InternalFiltersConfig.h"
-IMPLEMENT_DYNAMIC(CPPageInternalFiltersListBox, CCheckListBox)
+IMPLEMENT_DYNAMIC(CPPageInternalFiltersListBox, CListCtrl)
CPPageInternalFiltersListBox::CPPageInternalFiltersListBox(int n, const CArray<filter_t>& filters)
- : CCheckListBox()
- , m_filters(filters)
+ : m_filters(filters)
, m_n(n)
{
for (int i = 0; i < FILTER_TYPE_NB; i++) {
@@ -40,19 +39,19 @@ CPPageInternalFiltersListBox::CPPageInternalFiltersListBox(int n, const CArray<f
void CPPageInternalFiltersListBox::PreSubclassWindow()
{
__super::PreSubclassWindow();
+ GetToolTips()->Activate(FALSE);
EnableToolTips(TRUE);
}
INT_PTR CPPageInternalFiltersListBox::OnToolHitTest(CPoint point, TOOLINFO* pTI) const
{
- BOOL b = FALSE;
- int row = ItemFromPoint(point, b);
+ int row = HitTest(point);
if (row < 0) {
return -1;
}
CRect r;
- GetItemRect(row, r);
+ GetItemRect(row, r, LVIR_BOUNDS);
pTI->rect = r;
pTI->hwnd = m_hWnd;
pTI->uId = (UINT)row;
@@ -62,7 +61,7 @@ INT_PTR CPPageInternalFiltersListBox::OnToolHitTest(CPoint point, TOOLINFO* pTI)
return pTI->uId;
}
-BEGIN_MESSAGE_MAP(CPPageInternalFiltersListBox, CCheckListBox)
+BEGIN_MESSAGE_MAP(CPPageInternalFiltersListBox, CListCtrl)
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify)
ON_WM_CONTEXTMENU()
END_MESSAGE_MAP()
@@ -71,7 +70,7 @@ BOOL CPPageInternalFiltersListBox::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESU
{
TOOLTIPTEXT* pTTT = (TOOLTIPTEXT*)pNMHDR;
- filter_t* f = (filter_t*)GetItemDataPtr(static_cast<int>(pNMHDR->idFrom));
+ filter_t* f = (filter_t*)GetItemData(static_cast<int>(pNMHDR->idFrom));
if (f->nHintID == 0) {
return FALSE;
}
@@ -89,9 +88,9 @@ BOOL CPPageInternalFiltersListBox::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESU
int CPPageInternalFiltersListBox::AddFilter(filter_t* filter, bool checked)
{
- int index = AddString(filter->label);
+ int index = InsertItem(GetItemCount(), filter->label);
// SetItemDataPtr must be called before SetCheck
- SetItemDataPtr(index, filter);
+ SetItemData(index, reinterpret_cast<DWORD_PTR>(filter));
SetCheck(index, checked);
return index;
@@ -103,8 +102,8 @@ void CPPageInternalFiltersListBox::UpdateCheckState()
m_nbFiltersPerType[i] = m_nbChecked[i] = 0;
}
- for (int i = 0; i < GetCount(); i++) {
- filter_t* filter = (filter_t*) GetItemDataPtr(i);
+ for (int i = 0; i < GetItemCount(); i++) {
+ filter_t* filter = (filter_t*) GetItemData(i);
m_nbFiltersPerType[filter->type]++;
@@ -116,30 +115,20 @@ void CPPageInternalFiltersListBox::UpdateCheckState()
void CPPageInternalFiltersListBox::OnContextMenu(CWnd* pWnd, CPoint point)
{
- BOOL bOutside;
-
if (point.x == -1 && point.y == -1) {
// The context menu was triggered using the keyboard,
// get the coordinates of the currently selected item.
- int iSel = GetCurSel();
- CRect r;
- if (GetItemRect(iSel, &r) != LB_ERR) {
- point.SetPoint(r.left, r.bottom);
- } else {
- point.SetPoint(0, 0);
+ POSITION pos = GetFirstSelectedItemPosition();
+ if (pos) {
+ CRect r;
+ if (GetItemRect(GetNextSelectedItem(pos), &r, LVIR_BOUNDS)) {
+ point.SetPoint(r.left, r.bottom);
+ } else {
+ point.SetPoint(0, 0);
+ }
}
- bOutside = iSel == LB_ERR;
} else {
ScreenToClient(&point);
- ItemFromPoint(point, bOutside);
- }
-
- // Check that we really inside the list
- if (bOutside) {
- // Trigger the default behavior
- ClientToScreen(&point);
- __super::OnContextMenu(pWnd, point);
- return;
}
CMenu m;
@@ -260,10 +249,8 @@ void CPPageInternalFilters::DoDataExchange(CDataExchange* pDX)
}
BEGIN_MESSAGE_MAP(CPPageInternalFilters, CPPageBase)
- ON_LBN_SELCHANGE(IDC_LIST1, OnSelChange)
- ON_LBN_SELCHANGE(IDC_LIST2, OnSelChange)
- ON_CLBN_CHKCHANGE(IDC_LIST1, OnCheckBoxChange)
- ON_CLBN_CHKCHANGE(IDC_LIST2, OnCheckBoxChange)
+ ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST1, OnItemChanged)
+ ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST2, OnItemChanged)
ON_BN_CLICKED(IDC_SPLITTER_CONF, OnBnClickedSplitterConf)
ON_BN_CLICKED(IDC_VIDEO_DEC_CONF, OnBnClickedVideoDecConf)
ON_BN_CLICKED(IDC_AUDIO_DEC_CONF, OnBnClickedAudioDecConf)
@@ -277,6 +264,12 @@ BOOL CPPageInternalFilters::OnInitDialog()
const CAppSettings& s = AfxGetAppSettings();
+ m_listSrc.InsertColumn(0, _T(""));
+ m_listTra.InsertColumn(0, _T(""));
+
+ m_listSrc.SetExtendedStyle(m_listSrc.GetExtendedStyle() | LVS_EX_CHECKBOXES | LVS_EX_DOUBLEBUFFER);
+ m_listTra.SetExtendedStyle(m_listTra.GetExtendedStyle() | LVS_EX_CHECKBOXES | LVS_EX_DOUBLEBUFFER);
+
InitFiltersList();
for (int i = 0; i < m_filters.GetCount(); i++) {
@@ -306,6 +299,9 @@ BOOL CPPageInternalFilters::OnInitDialog()
m_listSrc.UpdateCheckState();
m_listTra.UpdateCheckState();
+ m_listSrc.SetColumnWidth(0, LVSCW_AUTOSIZE);
+ m_listTra.SetColumnWidth(0, LVSCW_AUTOSIZE);
+
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
@@ -403,7 +399,7 @@ void CPPageInternalFilters::InitFiltersList()
#endif
#if INTERNAL_SOURCEFILTER_WTV
if (bLAVSplitterIsAvailable) {
- m_filters.Add(filter_t(_T("WTV"), SOURCE_FILTER, SRC_WTV, IDS_INTERNAL_LAVF_WMV));
+ m_filters.Add(filter_t(_T("WTV"), SOURCE_FILTER, SRC_WTV, IDS_INTERNAL_LAVF));
}
#endif
#if INTERNAL_SOURCEFILTER_OGG
@@ -505,6 +501,11 @@ void CPPageInternalFilters::InitFiltersList()
m_filters.Add(filter_t(_T("AMR"), AUDIO_DECODER, TRA_AMR, IDS_INTERNAL_LAVF));
}
#endif
+#if INTERNAL_DECODER_OPUS
+ if (bLAVAudioIsAvailable) {
+ m_filters.Add(filter_t(_T("Opus"), AUDIO_DECODER, TRA_OPUS, IDS_INTERNAL_LAVF));
+ }
+#endif
#if INTERNAL_DECODER_REALAUDIO
if (bLAVAudioIsAvailable) {
m_filters.Add(filter_t(_T("RealAudio"), AUDIO_DECODER, TRA_RA, IDS_INTERNAL_LAVF));
@@ -645,8 +646,8 @@ BOOL CPPageInternalFilters::OnApply()
CPPageInternalFiltersListBox* list = &m_listSrc;
for (int l = 0; l < 2; l++) {
- for (int i = 0; i < list->GetCount(); i++) {
- filter_t* f = (filter_t*) list->GetItemDataPtr(i);
+ for (int i = 0; i < list->GetItemCount(); i++) {
+ filter_t* f = (filter_t*) list->GetItemData(i);
switch (f->type) {
case SOURCE_FILTER:
@@ -664,17 +665,20 @@ BOOL CPPageInternalFilters::OnApply()
return __super::OnApply();
}
-void CPPageInternalFilters::OnSelChange()
+void CPPageInternalFilters::OnItemChanged(NMHDR* pNMHDR, LRESULT* pResult)
{
- // We only catch the message so that the page is not marked as modified.
-}
+ ASSERT(pNMHDR);
+ ASSERT(pResult);
-void CPPageInternalFilters::OnCheckBoxChange()
-{
- m_listSrc.UpdateCheckState();
- m_listTra.UpdateCheckState();
+ auto pNMLV = reinterpret_cast<NMLISTVIEW*>(pNMHDR);
+
+ if (pNMLV->lParam && (pNMLV->uChanged & LVIF_STATE) && (pNMLV->uNewState & LVIS_STATEIMAGEMASK)) {
+ m_listSrc.UpdateCheckState();
+ m_listTra.UpdateCheckState();
+ SetModified();
+ }
- SetModified();
+ *pResult = 0;
}
void CPPageInternalFilters::OnBnClickedSplitterConf()
diff --git a/src/mpc-hc/PPageInternalFilters.h b/src/mpc-hc/PPageInternalFilters.h
index eae4b827b..05fc7b1f0 100644
--- a/src/mpc-hc/PPageInternalFilters.h
+++ b/src/mpc-hc/PPageInternalFilters.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -46,7 +46,7 @@ struct filter_t {
};
};
-class CPPageInternalFiltersListBox : public CCheckListBox
+class CPPageInternalFiltersListBox : public CListCtrl
{
DECLARE_DYNAMIC(CPPageInternalFiltersListBox)
@@ -100,8 +100,7 @@ protected:
DECLARE_MESSAGE_MAP()
- afx_msg void OnSelChange();
- afx_msg void OnCheckBoxChange();
+ void OnItemChanged(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnBnClickedSplitterConf();
afx_msg void OnBnClickedVideoDecConf();
afx_msg void OnBnClickedAudioDecConf();
diff --git a/src/mpc-hc/PPageOutput.cpp b/src/mpc-hc/PPageOutput.cpp
index 631a19c16..b187610ec 100644
--- a/src/mpc-hc/PPageOutput.cpp
+++ b/src/mpc-hc/PPageOutput.cpp
@@ -39,6 +39,7 @@ CPPageOutput::CPPageOutput()
, m_iQTVideoRendererType(VIDRNDT_QT_DEFAULT)
, m_iAPSurfaceUsage(0)
, m_iAudioRendererType(0)
+ , m_lastSubrenderer{false, CAppSettings::SubtitleRenderer::INTERNAL}
, m_iDX9Resizer(0)
, m_fVMR9MixerMode(FALSE)
, m_fVMR9MixerYUV(FALSE)
@@ -64,6 +65,7 @@ void CPPageOutput::DoDataExchange(CDataExchange* pDX)
DDX_Control(pDX, IDC_RMRND_COMBO, m_iRMVideoRendererTypeCtrl);
DDX_Control(pDX, IDC_QTRND_COMBO, m_iQTVideoRendererTypeCtrl);
DDX_Control(pDX, IDC_AUDRND_COMBO, m_iAudioRendererTypeCtrl);
+ DDX_Control(pDX, IDC_COMBO1, m_SubtitleRendererCtrl);
DDX_Control(pDX, IDC_D3D9DEVICE_COMBO, m_iD3D9RenderDeviceCtrl);
DDX_Control(pDX, IDC_DX_SURFACE, m_APSurfaceUsageCtrl);
DDX_Control(pDX, IDC_DX9RESIZER_COMBO, m_DX9ResizerCtrl);
@@ -96,6 +98,7 @@ BEGIN_MESSAGE_MAP(CPPageOutput, CPPageBase)
ON_CBN_SELCHANGE(IDC_VIDRND_COMBO, &CPPageOutput::OnDSRendererChange)
ON_CBN_SELCHANGE(IDC_RMRND_COMBO, &CPPageOutput::OnRMRendererChange)
ON_CBN_SELCHANGE(IDC_QTRND_COMBO, &CPPageOutput::OnQTRendererChange)
+ ON_CBN_SELCHANGE(IDC_COMBO1, &CPPageOutput::OnSubtitleRendererChange)
ON_CBN_SELCHANGE(IDC_DX_SURFACE, &CPPageOutput::OnSurfaceChange)
ON_BN_CLICKED(IDC_D3D9DEVICE, OnD3D9DeviceCheck)
ON_BN_CLICKED(IDC_FULLSCREEN_MONITOR_CHECK, OnFullscreenCheck)
@@ -205,11 +208,13 @@ BOOL CPPageOutput::OnInitDialog()
m_iAudioRendererType = m_iAudioRendererTypeCtrl.GetCount() - 1;
}
- Cbstr.Format(_T("%d: %s"), i++, ResStr(IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND));
- m_AudioRendererDisplayNames.Add(AUDRNDT_MPC);
- m_iAudioRendererTypeCtrl.AddString(Cbstr);
- if (s.strAudioRendererDisplayName == AUDRNDT_MPC && m_iAudioRendererType == 0) {
- m_iAudioRendererType = m_iAudioRendererTypeCtrl.GetCount() - 1;
+ if (SysVersion::IsVistaOrLater()) {
+ Cbstr.Format(_T("%d: %s"), i++, ResStr(IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND));
+ m_AudioRendererDisplayNames.Add(AUDRNDT_INTERNAL);
+ m_iAudioRendererTypeCtrl.AddString(Cbstr);
+ if (s.strAudioRendererDisplayName == AUDRNDT_INTERNAL && m_iAudioRendererType == 0) {
+ m_iAudioRendererType = m_iAudioRendererTypeCtrl.GetCount() - 1;
+ }
}
CorrectComboListWidth(m_iAudioRendererTypeCtrl);
@@ -217,6 +222,8 @@ BOOL CPPageOutput::OnInitDialog()
m_iAudioRendererTypeCtrl.Invalidate();
m_iAudioRendererTypeCtrl.UpdateWindow();
+ UpdateSubtitleRendererList();
+
IDirect3D9* pD3D = Direct3DCreate9(D3D_SDK_VERSION);
if (pD3D) {
TCHAR strGUID[50];
@@ -441,6 +448,13 @@ BOOL CPPageOutput::OnApply()
s.strAudioRendererDisplayName = m_AudioRendererDisplayNames[m_iAudioRendererType];
s.fD3DFullscreen = m_fD3DFullscreen ? true : false;
+ if (m_SubtitleRendererCtrl.IsWindowEnabled()) {
+ auto subrenderer = static_cast<CAppSettings::SubtitleRenderer>(m_SubtitleRendererCtrl.GetItemData(m_SubtitleRendererCtrl.GetCurSel()));
+ m_lastSubrenderer.first = true;
+ m_lastSubrenderer.second = subrenderer;
+ s.SetSubtitleRenderer(subrenderer);
+ }
+
r.fResetDevice = !!m_fResetDevice;
if (m_iEvrBuffers.IsEmpty() || _stscanf_s(m_iEvrBuffers, _T("%d"), &r.iEvrBuffers) != 1) {
@@ -479,7 +493,7 @@ void CPPageOutput::OnSurfaceChange()
m_iDSRotationSupport.SetIcon(m_tick);
} else if (m_iDSVideoRendererType == VIDRNDT_DS_MADVR) {
m_iDSShaderSupport.SetIcon(m_tick);
- m_iDSRotationSupport.SetIcon(m_cross);
+ m_iDSRotationSupport.SetIcon(m_tick);
} else {
m_iDSShaderSupport.SetIcon(m_cross);
m_iDSRotationSupport.SetIcon(m_cross);
@@ -510,13 +524,11 @@ void CPPageOutput::OnDSRendererChange()
GetDlgItem(IDC_D3D9DEVICE_COMBO)->EnableWindow(FALSE);
m_iDSDXVASupport.SetRedraw(FALSE);
- m_iDSSubtitleSupport.SetRedraw(FALSE);
m_iDSSaveImageSupport.SetRedraw(FALSE);
m_iDSShaderSupport.SetRedraw(FALSE);
m_iDSRotationSupport.SetRedraw(FALSE);
m_iDSDXVASupport.SetIcon(m_cross);
- m_iDSSubtitleSupport.SetIcon(m_cross);
m_iDSSaveImageSupport.SetIcon(m_cross);
m_iDSShaderSupport.SetIcon(m_cross);
m_iDSRotationSupport.SetIcon(m_cross);
@@ -563,7 +575,6 @@ void CPPageOutput::OnDSRendererChange()
if (!SysVersion::IsVistaOrLater()) {
m_iDSDXVASupport.SetIcon(m_tick);
}
- m_iDSSubtitleSupport.SetIcon(m_tick);
m_iDSSaveImageSupport.SetIcon(m_tick);
m_wndToolTip.UpdateTipText(ResStr(IDC_DSVMR7REN), GetDlgItem(IDC_VIDRND_COMBO));
break;
@@ -583,7 +594,6 @@ void CPPageOutput::OnDSRendererChange()
m_iDSShaderSupport.SetIcon(m_tick);
m_iDSRotationSupport.SetIcon(m_tick);
}
- m_iDSSubtitleSupport.SetIcon(m_tick);
m_iDSSaveImageSupport.SetIcon(m_tick);
m_wndToolTip.UpdateTipText(ResStr(IDC_DSVMR9REN), GetDlgItem(IDC_VIDRND_COMBO));
@@ -606,7 +616,6 @@ void CPPageOutput::OnDSRendererChange()
if (SysVersion::IsVistaOrLater()) {
m_iDSDXVASupport.SetIcon(m_tick);
}
- m_iDSSubtitleSupport.SetIcon(m_tick);
m_iDSSaveImageSupport.SetIcon(m_tick);
m_iDSShaderSupport.SetIcon(m_tick);
m_iDSRotationSupport.SetIcon(m_tick);
@@ -624,7 +633,6 @@ void CPPageOutput::OnDSRendererChange()
((CComboBox*)GetDlgItem(IDC_DX_SURFACE))->SetCurSel(2);
m_iDSDXVASupport.SetIcon(m_tick);
- m_iDSSubtitleSupport.SetIcon(m_tick);
m_iDSSaveImageSupport.SetIcon(m_tick);
m_iDSShaderSupport.SetIcon(m_tick);
m_iDSRotationSupport.SetIcon(m_tick);
@@ -634,13 +642,12 @@ void CPPageOutput::OnDSRendererChange()
((CComboBox*)GetDlgItem(IDC_DX_SURFACE))->SetCurSel(2);
m_iDSDXVASupport.SetIcon(m_tick);
- m_iDSSubtitleSupport.SetIcon(m_tick);
m_iDSSaveImageSupport.SetIcon(m_tick);
m_iDSShaderSupport.SetIcon(m_tick);
+ m_iDSRotationSupport.SetIcon(m_tick);
m_wndToolTip.UpdateTipText(ResStr(IDC_DSMADVR), GetDlgItem(IDC_VIDRND_COMBO));
break;
case VIDRNDT_DS_DXR:
- m_iDSSubtitleSupport.SetIcon(m_tick);
m_iDSSaveImageSupport.SetIcon(m_tick);
m_wndToolTip.UpdateTipText(ResStr(IDC_DSDXR), GetDlgItem(IDC_VIDRND_COMBO));
break;
@@ -649,9 +656,6 @@ void CPPageOutput::OnDSRendererChange()
m_iDSDXVASupport.SetRedraw(TRUE);
m_iDSDXVASupport.Invalidate();
m_iDSDXVASupport.UpdateWindow();
- m_iDSSubtitleSupport.SetRedraw(TRUE);
- m_iDSSubtitleSupport.Invalidate();
- m_iDSSubtitleSupport.UpdateWindow();
m_iDSSaveImageSupport.SetRedraw(TRUE);
m_iDSSaveImageSupport.Invalidate();
m_iDSSaveImageSupport.UpdateWindow();
@@ -662,6 +666,8 @@ void CPPageOutput::OnDSRendererChange()
m_iDSRotationSupport.Invalidate();
m_iDSRotationSupport.UpdateWindow();
+ UpdateSubtitleRendererList();
+ UpdateSubtitleSupport();
SetModified();
}
@@ -672,24 +678,22 @@ void CPPageOutput::OnRMRendererChange()
switch (m_iRMVideoRendererType) {
case VIDRNDT_RM_DEFAULT:
m_iRMSaveImageSupport.SetIcon(m_cross);
- m_iRMSubtitleSupport.SetIcon(m_cross);
m_wndToolTip.UpdateTipText(ResStr(IDC_RMSYSDEF), GetDlgItem(IDC_RMRND_COMBO));
break;
case VIDRNDT_RM_DX7:
m_iRMSaveImageSupport.SetIcon(m_tick);
- m_iRMSubtitleSupport.SetIcon(m_tick);
m_wndToolTip.UpdateTipText(ResStr(IDC_RMDX7), GetDlgItem(IDC_RMRND_COMBO));
break;
case VIDRNDT_RM_DX9:
m_iRMSaveImageSupport.SetIcon(m_tick);
- m_iRMSubtitleSupport.SetIcon(m_tick);
m_wndToolTip.UpdateTipText(ResStr(IDC_RMDX9), GetDlgItem(IDC_RMRND_COMBO));
break;
}
+ UpdateSubtitleSupport();
SetModified();
}
@@ -700,27 +704,35 @@ void CPPageOutput::OnQTRendererChange()
switch (m_iQTVideoRendererType) {
case VIDRNDT_QT_DEFAULT:
m_iQTSaveImageSupport.SetIcon(m_cross);
- m_iQTSubtitleSupport.SetIcon(m_cross);
m_wndToolTip.UpdateTipText(ResStr(IDC_QTSYSDEF), GetDlgItem(IDC_QTRND_COMBO));
break;
case VIDRNDT_QT_DX7:
m_iQTSaveImageSupport.SetIcon(m_tick);
- m_iQTSubtitleSupport.SetIcon(m_tick);
m_wndToolTip.UpdateTipText(ResStr(IDC_QTDX7), GetDlgItem(IDC_QTRND_COMBO));
break;
case VIDRNDT_QT_DX9:
m_iQTSaveImageSupport.SetIcon(m_tick);
- m_iQTSubtitleSupport.SetIcon(m_tick);
m_wndToolTip.UpdateTipText(ResStr(IDC_QTDX9), GetDlgItem(IDC_QTRND_COMBO));
break;
}
+ UpdateSubtitleSupport();
SetModified();
}
+void CPPageOutput::OnSubtitleRendererChange()
+{
+ UpdateData();
+ UpdateSubtitleSupport();
+ SetModified();
+
+ m_lastSubrenderer.first = true;
+ m_lastSubrenderer.second = static_cast<CAppSettings::SubtitleRenderer>(m_SubtitleRendererCtrl.GetItemData(m_SubtitleRendererCtrl.GetCurSel()));
+}
+
void CPPageOutput::OnFullscreenCheck()
{
UpdateData();
@@ -733,6 +745,73 @@ void CPPageOutput::OnFullscreenCheck()
}
}
+void CPPageOutput::UpdateSubtitleSupport()
+{
+ auto subrenderer = static_cast<CAppSettings::SubtitleRenderer>(m_SubtitleRendererCtrl.GetItemData(m_SubtitleRendererCtrl.GetCurSel()));
+
+ bool supported = (m_iDSVideoRendererType != VIDRNDT_DS_NULL_COMP &&
+ m_iDSVideoRendererType != VIDRNDT_DS_NULL_UNCOMP &&
+ CAppSettings::IsSubtitleRendererRegistered(subrenderer) &&
+ CAppSettings::IsSubtitleRendererSupported(subrenderer, m_iDSVideoRendererType));
+
+ m_iDSSubtitleSupport.SetIcon(supported ? m_tick : m_cross);
+
+ m_iQTSubtitleSupport.SetIcon((m_iQTVideoRendererType != VIDRNDT_QT_DEFAULT && subrenderer == CAppSettings::SubtitleRenderer::INTERNAL) ? m_tick : m_cross);
+ m_iRMSubtitleSupport.SetIcon((m_iRMVideoRendererType != VIDRNDT_RM_DEFAULT && subrenderer == CAppSettings::SubtitleRenderer::INTERNAL) ? m_tick : m_cross);
+}
+
+void CPPageOutput::UpdateSubtitleRendererList()
+{
+ const auto& s = AfxGetAppSettings();
+
+ auto addSubtitleRenderer = [&](CAppSettings::SubtitleRenderer nID) {
+ if (!CAppSettings::IsSubtitleRendererSupported(nID, m_iDSVideoRendererType)) {
+ return;
+ }
+
+ CString sName;
+ switch (nID) {
+ case CAppSettings::SubtitleRenderer::INTERNAL:
+ sName = ResStr(IDS_SUBTITLE_RENDERER_INTERNAL);
+ break;
+ case CAppSettings::SubtitleRenderer::VS_FILTER:
+ sName = ResStr(IDS_SUBTITLE_RENDERER_VS_FILTER);
+ break;
+ case CAppSettings::SubtitleRenderer::XY_SUB_FILTER:
+ sName = ResStr(IDS_SUBTITLE_RENDERER_XY_SUB_FILTER);
+ break;
+ default:
+ ASSERT(FALSE);
+ break;
+ }
+
+ if (!CAppSettings::IsSubtitleRendererRegistered(nID)) {
+ sName.AppendFormat(_T(" %s"), ResStr(IDS_PPAGE_OUTPUT_UNAVAILABLE));
+ }
+
+ m_SubtitleRendererCtrl.SetItemData(m_SubtitleRendererCtrl.AddString(sName), static_cast<int>(nID));
+ };
+
+ m_SubtitleRendererCtrl.SetRedraw(FALSE);
+ while (m_SubtitleRendererCtrl.DeleteString(0) != CB_ERR);
+ addSubtitleRenderer(CAppSettings::SubtitleRenderer::INTERNAL);
+ addSubtitleRenderer(CAppSettings::SubtitleRenderer::VS_FILTER);
+ addSubtitleRenderer(CAppSettings::SubtitleRenderer::XY_SUB_FILTER);
+ m_SubtitleRendererCtrl.SetCurSel(0);
+ auto subrenderer = m_lastSubrenderer.first ? m_lastSubrenderer.second : s.GetSubtitleRenderer();
+ for (int j = 0; j < m_SubtitleRendererCtrl.GetCount(); ++j) {
+ if ((UINT)subrenderer == m_SubtitleRendererCtrl.GetItemData(j)) {
+ m_SubtitleRendererCtrl.SetCurSel(j);
+ break;
+ }
+ }
+ m_SubtitleRendererCtrl.EnableWindow(m_SubtitleRendererCtrl.GetCount() > 1);
+ CorrectComboListWidth(m_SubtitleRendererCtrl);
+ m_SubtitleRendererCtrl.SetRedraw(TRUE);
+ m_SubtitleRendererCtrl.Invalidate();
+ m_SubtitleRendererCtrl.UpdateWindow();
+}
+
void CPPageOutput::OnD3D9DeviceCheck()
{
UpdateData();
diff --git a/src/mpc-hc/PPageOutput.h b/src/mpc-hc/PPageOutput.h
index fffb2fef6..2e8bc1e6e 100644
--- a/src/mpc-hc/PPageOutput.h
+++ b/src/mpc-hc/PPageOutput.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2012, 2014 see Authors.txt
+ * (C) 2006-2012, 2014-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -40,6 +40,7 @@ private:
CComboBox m_iDSVideoRendererTypeCtrl;
CComboBox m_iAudioRendererTypeCtrl;
+ CComboBox m_SubtitleRendererCtrl;
CComboBox m_iRMVideoRendererTypeCtrl;
CComboBox m_iQTVideoRendererTypeCtrl;
CComboBox m_iD3D9RenderDeviceCtrl;
@@ -56,6 +57,11 @@ private:
CStatic m_iRMSaveImageSupport;
CStatic m_iQTSubtitleSupport;
CStatic m_iQTSaveImageSupport;
+
+ void UpdateSubtitleSupport();
+
+ void UpdateSubtitleRendererList();
+
public:
CPPageOutput();
virtual ~CPPageOutput();
@@ -67,6 +73,7 @@ public:
int m_iQTVideoRendererType;
int m_iAPSurfaceUsage;
int m_iAudioRendererType;
+ std::pair<bool, CAppSettings::SubtitleRenderer> m_lastSubrenderer;
int m_iDX9Resizer;
BOOL m_fVMR9MixerMode;
BOOL m_fVMR9MixerYUV;
@@ -92,6 +99,7 @@ public:
afx_msg void OnDSRendererChange();
afx_msg void OnRMRendererChange();
afx_msg void OnQTRendererChange();
+ afx_msg void OnSubtitleRendererChange();
afx_msg void OnFullscreenCheck();
afx_msg void OnD3D9DeviceCheck();
};
diff --git a/src/mpc-hc/PPagePlayback.cpp b/src/mpc-hc/PPagePlayback.cpp
index f872b5999..dc81b1222 100644
--- a/src/mpc-hc/PPagePlayback.cpp
+++ b/src/mpc-hc/PPagePlayback.cpp
@@ -44,7 +44,6 @@ CPPagePlayback::CPPagePlayback()
, m_iRememberZoomLevel(FALSE)
, m_nAutoFitFactor(75)
, m_fAutoloadAudio(FALSE)
- , m_fAutoloadSubtitles(FALSE)
, m_fEnableWorkerThreadForOpening(FALSE)
, m_fReportFailedPins(FALSE)
, m_fAllowOverridingExternalSplitterChoice(FALSE)
@@ -71,7 +70,6 @@ void CPPagePlayback::DoDataExchange(CDataExchange* pDX)
DDX_CBIndex(pDX, IDC_COMBO1, m_iZoomLevel);
DDX_Check(pDX, IDC_CHECK5, m_iRememberZoomLevel);
DDX_Check(pDX, IDC_CHECK2, m_fAutoloadAudio);
- DDX_Check(pDX, IDC_CHECK3, m_fAutoloadSubtitles);
DDX_Check(pDX, IDC_CHECK7, m_fEnableWorkerThreadForOpening);
DDX_Check(pDX, IDC_CHECK6, m_fReportFailedPins);
DDX_Text(pDX, IDC_EDIT2, m_subtitlesLanguageOrder);
@@ -92,8 +90,6 @@ BEGIN_MESSAGE_MAP(CPPagePlayback, CPPageBase)
ON_UPDATE_COMMAND_UI(IDC_COMBO1, OnUpdateAutoZoomCombo)
ON_UPDATE_COMMAND_UI(IDC_COMBO2, OnUpdateAfterPlayback)
ON_UPDATE_COMMAND_UI(IDC_SPEEDSTEP_SPIN, OnUpdateSpeedStep)
- ON_UPDATE_COMMAND_UI(IDC_CHECK3, OnUpdateISREnabled)
-
ON_STN_DBLCLK(IDC_STATIC_BALANCE, OnBalanceTextDblClk)
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify)
END_MESSAGE_MAP()
@@ -129,7 +125,6 @@ BOOL CPPagePlayback::OnInitDialog()
m_AutoFitFactorCtrl.SetPos32(m_nAutoFitFactor);
m_AutoFitFactorCtrl.SetRange32(25, 100);
m_fAutoloadAudio = s.fAutoloadAudio;
- m_fAutoloadSubtitles = s.fAutoloadSubtitles;
m_fEnableWorkerThreadForOpening = s.fEnableWorkerThreadForOpening;
m_fReportFailedPins = s.fReportFailedPins;
m_subtitlesLanguageOrder = s.strSubtitlesLanguageOrder;
@@ -176,16 +171,15 @@ BOOL CPPagePlayback::OnApply()
s.nVolume = m_oldVolume = m_nVolume;
s.nBalance = m_nBalance;
- s.nVolumeStep = min(max(m_nVolumeStep, 1), 100);
+ s.nVolumeStep = std::min(std::max(m_nVolumeStep, 1), 100);
s.nSpeedStep = m_nSpeedStep;
s.fLoopForever = !!m_iLoopForever;
s.nLoops = m_nLoops;
s.eAfterPlayback = static_cast<CAppSettings::AfterPlayback>(m_iAfterPlayback);
s.iZoomLevel = m_iZoomLevel;
s.fRememberZoomLevel = !!m_iRememberZoomLevel;
- s.nAutoFitFactor = m_nAutoFitFactor = min(max(m_nAutoFitFactor, 25), 100);
+ s.nAutoFitFactor = m_nAutoFitFactor = std::min(std::max(m_nAutoFitFactor, 25), 100);
s.fAutoloadAudio = !!m_fAutoloadAudio;
- s.fAutoloadSubtitles = !!m_fAutoloadSubtitles;
s.fEnableWorkerThreadForOpening = !!m_fEnableWorkerThreadForOpening;
s.fReportFailedPins = !!m_fReportFailedPins;
s.strSubtitlesLanguageOrder = m_subtitlesLanguageOrder;
@@ -235,11 +229,6 @@ void CPPagePlayback::OnUpdateAfterPlayback(CCmdUI* pCmdUI)
pCmdUI->Enable(!IsDlgButtonChecked(IDC_RADIO2));
}
-void CPPagePlayback::OnUpdateISREnabled(CCmdUI* pCmdUI)
-{
- pCmdUI->Enable(AfxGetAppSettings().IsISRAvailable());
-}
-
void CPPagePlayback::OnUpdateSpeedStep(CCmdUI* pCmdUI)
{
// if there is an error retrieving the position, assume the speedstep is set to auto
diff --git a/src/mpc-hc/PPagePlayback.h b/src/mpc-hc/PPagePlayback.h
index 450d7b8e9..5d3462be0 100644
--- a/src/mpc-hc/PPagePlayback.h
+++ b/src/mpc-hc/PPagePlayback.h
@@ -54,7 +54,6 @@ public:
int m_nAutoFitFactor;
CSpinButtonCtrl m_AutoFitFactorCtrl;
BOOL m_fAutoloadAudio;
- BOOL m_fAutoloadSubtitles;
BOOL m_fEnableWorkerThreadForOpening;
BOOL m_fReportFailedPins;
CString m_subtitlesLanguageOrder;
@@ -80,7 +79,6 @@ public:
afx_msg void OnUpdateLoopNum(CCmdUI* pCmdUI);
afx_msg void OnUpdateAutoZoomCombo(CCmdUI* pCmdUI);
afx_msg void OnUpdateAfterPlayback(CCmdUI* pCmdUI);
- afx_msg void OnUpdateISREnabled(CCmdUI* pCmdUI);
afx_msg void OnUpdateSpeedStep(CCmdUI* pCmdUI);
afx_msg void OnBalanceTextDblClk();
diff --git a/src/mpc-hc/PPageSheet.cpp b/src/mpc-hc/PPageSheet.cpp
index 7a861b7dc..78a0ebbfc 100644
--- a/src/mpc-hc/PPageSheet.cpp
+++ b/src/mpc-hc/PPageSheet.cpp
@@ -23,6 +23,7 @@
#include "mplayerc.h"
#include "PPageSheet.h"
#include "SettingsDefines.h"
+#include "SysVersion.h"
// CPPageSheet
@@ -55,6 +56,7 @@ CPPageSheet::CPPageSheet(LPCTSTR pszCaption, IFilterGraph* pFG, CWnd* pParentWnd
AddPage(&m_internalfilters);
#endif
AddPage(&m_audioswitcher);
+ if (SysVersion::IsVistaOrLater()) { AddPage(&m_audiorenderer); }
AddPage(&m_externalfilters);
AddPage(&m_subtitles);
AddPage(&m_substyle);
diff --git a/src/mpc-hc/PPageSheet.h b/src/mpc-hc/PPageSheet.h
index cc784f9c7..83ef49870 100644
--- a/src/mpc-hc/PPageSheet.h
+++ b/src/mpc-hc/PPageSheet.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -34,6 +34,7 @@
#include "PPageWebServer.h"
#include "PPageInternalFilters.h"
#include "PPageAudioSwitcher.h"
+#include "PPageAudioRenderer.h"
#include "PPageExternalFilters.h"
#include "PPageSubtitles.h"
#include "PPageSubStyle.h"
@@ -44,6 +45,7 @@
#include "PPageShaders.h"
#include "PPageAdvanced.h"
#include "TreePropSheet/TreePropSheet.h"
+#include "DpiHelper.h"
// CTreePropSheetTreeCtrl
@@ -93,6 +95,7 @@ private:
CPPageInternalFilters m_internalfilters;
#endif
CPPageAudioSwitcher m_audioswitcher;
+ CPPageAudioRenderer m_audiorenderer;
CPPageExternalFilters m_externalfilters;
CPPageSubtitles m_subtitles;
CPPageSubStyle m_substyle;
@@ -113,7 +116,7 @@ public:
void LockPage() { m_bLockPage = true; };
protected:
- DPI m_dpi;
+ DpiHelper m_dpi;
virtual BOOL OnInitDialog();
diff --git a/src/mpc-hc/PPageTweaks.cpp b/src/mpc-hc/PPageTweaks.cpp
index 1f18dfc51..0533b3486 100644
--- a/src/mpc-hc/PPageTweaks.cpp
+++ b/src/mpc-hc/PPageTweaks.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -36,7 +36,7 @@ CPPageTweaks::CPPageTweaks()
, m_nJumpDistL(0)
, m_fNotifySkype(TRUE)
, m_fPreventMinimize(FALSE)
- , m_fUseWin7TaskBar(TRUE)
+ , m_bUseEnhancedTaskBar(TRUE)
, m_fUseSearchInFolder(FALSE)
, m_fUseTimeTooltip(TRUE)
, m_bHideWindowedMousePointer(TRUE)
@@ -59,7 +59,7 @@ void CPPageTweaks::DoDataExchange(CDataExchange* pDX)
DDX_Text(pDX, IDC_EDIT3, m_nJumpDistL);
DDX_Check(pDX, IDC_CHECK4, m_fNotifySkype);
DDX_Check(pDX, IDC_CHECK6, m_fPreventMinimize);
- DDX_Check(pDX, IDC_CHECK_WIN7, m_fUseWin7TaskBar);
+ DDX_Check(pDX, IDC_CHECK_ENHANCED_TASKBAR, m_bUseEnhancedTaskBar);
DDX_Check(pDX, IDC_CHECK7, m_fUseSearchInFolder);
DDX_Check(pDX, IDC_CHECK8, m_fUseTimeTooltip);
DDX_Control(pDX, IDC_COMBO3, m_TimeTooltipPosition);
@@ -96,9 +96,9 @@ BOOL CPPageTweaks::OnInitDialog()
m_fPreventMinimize = s.fPreventMinimize;
- m_fUseWin7TaskBar = s.fUseWin7TaskBar;
+ m_bUseEnhancedTaskBar = s.bUseEnhancedTaskBar;
if (!SysVersion::Is7OrLater()) {
- GetDlgItem(IDC_CHECK_WIN7)->EnableWindow(FALSE);
+ GetDlgItem(IDC_CHECK_ENHANCED_TASKBAR)->EnableWindow(FALSE);
}
m_fUseSearchInFolder = s.fUseSearchInFolder;
@@ -173,7 +173,7 @@ BOOL CPPageTweaks::OnApply()
s.bNotifySkype = !!m_fNotifySkype;
s.fPreventMinimize = !!m_fPreventMinimize;
- s.fUseWin7TaskBar = !!m_fUseWin7TaskBar;
+ s.bUseEnhancedTaskBar = !!m_bUseEnhancedTaskBar;
s.fUseSearchInFolder = !!m_fUseSearchInFolder;
s.fUseTimeTooltip = !!m_fUseTimeTooltip;
s.nTimeTooltipPosition = m_TimeTooltipPosition.GetCurSel();
@@ -190,7 +190,7 @@ BOOL CPPageTweaks::OnApply()
s.fLCDSupport = !!m_fLCDSupport;
CMainFrame* pFrame = ((CMainFrame*)GetParentFrame());
- if (m_fUseWin7TaskBar) {
+ if (m_bUseEnhancedTaskBar) {
pFrame->CreateThumbnailToolbar();
}
pFrame->UpdateThumbarButton();
diff --git a/src/mpc-hc/PPageTweaks.h b/src/mpc-hc/PPageTweaks.h
index 67e95cf7b..2dc5ce254 100644
--- a/src/mpc-hc/PPageTweaks.h
+++ b/src/mpc-hc/PPageTweaks.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -42,7 +42,7 @@ public:
BOOL m_fNotifySkype;
BOOL m_fPreventMinimize;
- BOOL m_fUseWin7TaskBar;
+ BOOL m_bUseEnhancedTaskBar;
BOOL m_fUseSearchInFolder;
BOOL m_fUseTimeTooltip;
BOOL m_bHideWindowedMousePointer;
diff --git a/src/mpc-hc/PPageWebServer.cpp b/src/mpc-hc/PPageWebServer.cpp
index 8be560c34..97dd62dfb 100644
--- a/src/mpc-hc/PPageWebServer.cpp
+++ b/src/mpc-hc/PPageWebServer.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -36,9 +36,10 @@ CPPageWebServer::CPPageWebServer()
, m_fEnableWebServer(FALSE)
, m_nWebServerPort(0)
, m_launch(_T("http://localhost:13579/"))
- , m_fWebServerPrintDebugInfo(FALSE)
, m_fWebServerUseCompression(FALSE)
, m_fWebServerLocalhostOnly(FALSE)
+ , m_bWebUIEnablePreview(FALSE)
+ , m_fWebServerPrintDebugInfo(FALSE)
, m_fWebRoot(FALSE)
{
}
@@ -53,12 +54,14 @@ void CPPageWebServer::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_CHECK1, m_fEnableWebServer);
DDX_Text(pDX, IDC_EDIT1, m_nWebServerPort);
DDX_Control(pDX, IDC_EDIT1, m_nWebServerPortCtrl);
+ DDV_MinMaxInt(pDX, m_nWebServerPort, 1, 65535);
DDX_Control(pDX, IDC_STATIC1, m_launch);
- DDX_Check(pDX, IDC_CHECK2, m_fWebServerPrintDebugInfo);
DDX_Check(pDX, IDC_CHECK3, m_fWebServerUseCompression);
+ DDX_Check(pDX, IDC_CHECK5, m_fWebServerLocalhostOnly);
+ DDX_Check(pDX, IDC_CHECK6, m_bWebUIEnablePreview);
+ DDX_Check(pDX, IDC_CHECK2, m_fWebServerPrintDebugInfo);
DDX_Check(pDX, IDC_CHECK4, m_fWebRoot);
DDX_Text(pDX, IDC_EDIT2, m_WebRoot);
- DDX_Check(pDX, IDC_CHECK5, m_fWebServerLocalhostOnly);
DDX_Text(pDX, IDC_EDIT3, m_WebServerCGI);
DDX_Text(pDX, IDC_EDIT9, m_WebDefIndex);
}
@@ -87,9 +90,10 @@ BOOL CPPageWebServer::OnInitDialog()
m_fEnableWebServer = s.fEnableWebServer;
m_nWebServerPort = s.nWebServerPort;
- m_fWebServerPrintDebugInfo = s.fWebServerPrintDebugInfo;
- m_fWebServerLocalhostOnly = s.fWebServerLocalhostOnly;
m_fWebServerUseCompression = s.fWebServerUseCompression;
+ m_fWebServerLocalhostOnly = s.fWebServerLocalhostOnly;
+ m_bWebUIEnablePreview = s.bWebUIEnablePreview;
+ m_fWebServerPrintDebugInfo = s.fWebServerPrintDebugInfo;
m_fWebRoot = s.strWebRoot.Find('*') < 0;
m_WebRoot = s.strWebRoot;
m_WebRoot.TrimLeft(_T('*'));
@@ -122,9 +126,10 @@ BOOL CPPageWebServer::OnApply()
s.fEnableWebServer = !!m_fEnableWebServer;
s.nWebServerPort = m_nWebServerPort;
- s.fWebServerPrintDebugInfo = !!m_fWebServerPrintDebugInfo;
- s.fWebServerLocalhostOnly = !!m_fWebServerLocalhostOnly;
s.fWebServerUseCompression = !!m_fWebServerUseCompression;
+ s.fWebServerLocalhostOnly = !!m_fWebServerLocalhostOnly;
+ s.bWebUIEnablePreview = !!m_bWebUIEnablePreview;
+ s.fWebServerPrintDebugInfo = !!m_fWebServerPrintDebugInfo;
s.strWebRoot = NewWebRoot;
s.strWebDefIndex = m_WebDefIndex;
s.strWebServerCGI = m_WebServerCGI;
@@ -220,6 +225,7 @@ BEGIN_MESSAGE_MAP(CPPageWebServer, CPPageBase)
ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
ON_BN_CLICKED(IDC_BUTTON2, OnBnClickedButton2)
ON_UPDATE_COMMAND_UI(IDC_BUTTON1, OnUpdateButton2)
+ ON_BN_CLICKED(IDC_CHECK6, OnEnablePreviewChecked)
END_MESSAGE_MAP()
@@ -264,3 +270,13 @@ void CPPageWebServer::OnUpdateButton2(CCmdUI* pCmdUI)
{
pCmdUI->Enable(GetDlgItem(IDC_EDIT2)->GetWindowTextLength() > 0);
}
+
+void CPPageWebServer::OnEnablePreviewChecked()
+{
+ if (IsDlgButtonChecked(IDC_CHECK6)
+ && (MessageBox(ResStr(IDS_WEBUI_PREVIEW_WARNING), nullptr, MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2) == IDNO)) {
+ CheckDlgButton(IDC_CHECK6, BST_UNCHECKED);
+ } else {
+ SetModified();
+ }
+}
diff --git a/src/mpc-hc/PPageWebServer.h b/src/mpc-hc/PPageWebServer.h
index 565f070ce..93e4aee60 100644
--- a/src/mpc-hc/PPageWebServer.h
+++ b/src/mpc-hc/PPageWebServer.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2012 see Authors.txt
+ * (C) 2006-2012, 2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -47,9 +47,10 @@ public:
int m_nWebServerPort;
CIntEdit m_nWebServerPortCtrl;
CStaticLink m_launch;
- BOOL m_fWebServerPrintDebugInfo;
BOOL m_fWebServerUseCompression;
BOOL m_fWebServerLocalhostOnly;
+ BOOL m_fWebServerPrintDebugInfo;
+ BOOL m_bWebUIEnablePreview;
BOOL m_fWebRoot;
CString m_WebRoot;
CString m_WebServerCGI;
@@ -68,4 +69,5 @@ public:
afx_msg void OnBnClickedButton1();
afx_msg void OnBnClickedButton2();
afx_msg void OnUpdateButton2(CCmdUI* pCmdUI);
+ afx_msg void OnEnablePreviewChecked();
};
diff --git a/src/mpc-hc/PlayerCaptureDialog.cpp b/src/mpc-hc/PlayerCaptureDialog.cpp
index d606b507f..84556c275 100644
--- a/src/mpc-hc/PlayerCaptureDialog.cpp
+++ b/src/mpc-hc/PlayerCaptureDialog.cpp
@@ -294,9 +294,9 @@ static void SetupMediaTypes(IAMStreamConfig* pAMSC, CFormatArray<T>& tfa, CCombo
vih2->dwPictAspectRatioX = 4;
vih2->dwPictAspectRatioY = 3;
- AM_MEDIA_TYPE* pmt = (AM_MEDIA_TYPE*)CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
- CopyMediaType(pmt, &mtCap);
- tfa.AddFormat(pmt, pcaps, sizeof(*pcaps));
+ AM_MEDIA_TYPE* pmt2 = (AM_MEDIA_TYPE*)CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
+ CopyMediaType(pmt2, &mtCap);
+ tfa.AddFormat(pmt2, pcaps, sizeof(*pcaps));
}
} else if (mtCap.formattype == FORMAT_VideoInfo2) {
VIDEOINFOHEADER2* vih2 = (VIDEOINFOHEADER2*)mtCap.pbFormat;
@@ -338,12 +338,12 @@ static void SetupMediaTypes(IAMStreamConfig* pAMSC, CFormatArray<T>& tfa, CCombo
}
CFormat<T>* pf = nullptr;
- CFormatElem<T>* pfe = nullptr;
+ CFormatElem<T>* pfeCurrent = nullptr;
if (!pcurmt) {
pf = tfa[0];
- pfe = pf->GetAt(0);
- } else if (!tfa.FindFormat(pcurmt, nullptr, &pf, &pfe) && !tfa.FindFormat(pcurmt, &pf)) {
+ pfeCurrent = pf->GetAt(0);
+ } else if (!tfa.FindFormat(pcurmt, nullptr, &pf, &pfeCurrent) && !tfa.FindFormat(pcurmt, &pf)) {
if (pcurmt) {
DeleteMediaType(pcurmt);
}
@@ -360,7 +360,7 @@ static void SetupMediaTypes(IAMStreamConfig* pAMSC, CFormatArray<T>& tfa, CCombo
if (iType < 0 && type.GetCount()) {
type.SetCurSel(0);
}
- int iDim = dim.SetCurSel(dim.FindStringExact(0, tfa.MakeDimensionName(pfe)));
+ int iDim = dim.SetCurSel(dim.FindStringExact(0, tfa.MakeDimensionName(pfeCurrent)));
// if (iDim < 0 && dim.GetCount()) dim.SetCurSel(iDim = 0);
CorrectComboListWidth(type);
@@ -1072,7 +1072,6 @@ void CPlayerCaptureDialog::UpdateVideoControls()
if (m_vidinput.GetCount() > 0) {
m_vidinput.EnableWindow(TRUE);
- long OutputPinCount, InputPinCount;
if (SUCCEEDED(m_pAMXB->get_PinCounts(&OutputPinCount, &InputPinCount))) {
for (int i = 0; i < OutputPinCount; i++) {
long InputPinIndex;
@@ -1612,18 +1611,18 @@ void CPlayerCaptureDialog::OnRecord()
if (m_fSepAudio && m_fAudOutput && m_pAudMux && !audfn.IsEmpty()) {
audfn += _T("wav");
- CComQIPtr<IFileSinkFilter2> pFSF = m_pAudMux;
- if (pFSF) {
+ CComQIPtr<IFileSinkFilter2> pFSFAudioMux = m_pAudMux;
+ if (pFSFAudioMux) {
m_pAudDst = m_pAudMux;
} else {
m_pAudDst = nullptr;
m_pAudDst.CoCreateInstance(CLSID_FileWriter);
- pFSF = m_pAudDst;
+ pFSFAudioMux = m_pAudDst;
}
- if (!pFSF
- || FAILED(pFSF->SetFileName(CStringW(audfn), nullptr))
- || FAILED(pFSF->SetMode(AM_FILE_OVERWRITE))) {
+ if (!pFSFAudioMux
+ || FAILED(pFSFAudioMux->SetFileName(CStringW(audfn), nullptr))
+ || FAILED(pFSFAudioMux->SetMode(AM_FILE_OVERWRITE))) {
MessageBox(ResStr(IDS_CAPTURE_ERROR_AUD_OUT_FILE), ResStr(IDS_CAPTURE_ERROR), MB_ICONERROR | MB_OK);
return;
}
@@ -1661,13 +1660,13 @@ void CPlayerCaptureDialog::OnRecord()
void CPlayerCaptureDialog::OnChangeVideoBuffers()
{
UpdateData();
- AfxGetApp()->WriteProfileInt(IDS_R_CAPTURE, _T("VidBuffers"), max(m_nVidBuffers, 0));
+ AfxGetApp()->WriteProfileInt(IDS_R_CAPTURE, _T("VidBuffers"), std::max(m_nVidBuffers, 0));
}
void CPlayerCaptureDialog::OnChangeAudioBuffers()
{
UpdateData();
- AfxGetApp()->WriteProfileInt(IDS_R_CAPTURE, _T("AudBuffers"), max(m_nAudBuffers, 0));
+ AfxGetApp()->WriteProfileInt(IDS_R_CAPTURE, _T("AudBuffers"), std::max(m_nAudBuffers, 0));
}
void CPlayerCaptureDialog::OnTimer(UINT_PTR nIDEvent)
diff --git a/src/mpc-hc/PlayerInfoBar.cpp b/src/mpc-hc/PlayerInfoBar.cpp
index 91e2ad410..250d7a727 100644
--- a/src/mpc-hc/PlayerInfoBar.cpp
+++ b/src/mpc-hc/PlayerInfoBar.cpp
@@ -31,6 +31,9 @@ IMPLEMENT_DYNAMIC(CPlayerInfoBar, CDialogBar)
CPlayerInfoBar::CPlayerInfoBar(CMainFrame* pMainFrame)
: m_pMainFrame(pMainFrame)
{
+ GetEventd().Connect(m_eventc, {
+ MpcEvent::DPI_CHANGED,
+ }, std::bind(&CPlayerInfoBar::EventCallback, this, std::placeholders::_1));
}
CPlayerInfoBar::~CPlayerInfoBar()
@@ -57,11 +60,11 @@ bool CPlayerInfoBar::SetLine(CString label, CString info)
}
}
- CAutoPtr<CStatusLabel> l(DEBUG_NEW CStatusLabel(true, false));
+ CAutoPtr<CStatusLabel> l(DEBUG_NEW CStatusLabel(m_pMainFrame->m_dpi, true, false));
l->Create(label, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | SS_OWNERDRAW, CRect(0, 0, 0, 0), this);
m_label.Add(l);
- CAutoPtr<CStatusLabel> i(DEBUG_NEW CStatusLabel(false, true));
+ CAutoPtr<CStatusLabel> i(DEBUG_NEW CStatusLabel(m_pMainFrame->m_dpi, false, true));
i->Create(info, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | SS_OWNERDRAW | SS_NOTIFY, CRect(0, 0, 0, 0), this);
m_tooltip.AddTool(i, info);
m_info.Add(i);
@@ -145,6 +148,23 @@ CSize CPlayerInfoBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz)
return r.Size();
}
+void CPlayerInfoBar::EventCallback(MpcEvent ev)
+{
+ switch (ev) {
+ case MpcEvent::DPI_CHANGED:
+ for (size_t i = 0; i < m_label.GetCount(); i++) {
+ m_label[i]->ScaleFont(m_pMainFrame->m_dpi);
+ }
+ for (size_t i = 0; i < m_info.GetCount(); i++) {
+ m_info[i]->ScaleFont(m_pMainFrame->m_dpi);
+ }
+ break;
+
+ default:
+ ASSERT(FALSE);
+ }
+}
+
void CPlayerInfoBar::Relayout()
{
CRect r;
@@ -158,7 +178,7 @@ void CPlayerInfoBar::Relayout()
CDC* pDC = m_label[i]->GetDC();
CString str;
m_label[i]->GetWindowText(str);
- w = max<int>(w, pDC->GetTextExtent(str).cx);
+ w = std::max<int>(w, pDC->GetTextExtent(str).cx);
m_label[i]->ReleaseDC(pDC);
}
diff --git a/src/mpc-hc/PlayerInfoBar.h b/src/mpc-hc/PlayerInfoBar.h
index dfeac5ee0..781f5071c 100644
--- a/src/mpc-hc/PlayerInfoBar.h
+++ b/src/mpc-hc/PlayerInfoBar.h
@@ -40,6 +40,9 @@ private:
CToolTipCtrl m_tooltip;
+ EventClient m_eventc;
+ void EventCallback(MpcEvent ev);
+
void Relayout();
public:
diff --git a/src/mpc-hc/PlayerPlaylistBar.cpp b/src/mpc-hc/PlayerPlaylistBar.cpp
index 3df894fd1..faf960e80 100644
--- a/src/mpc-hc/PlayerPlaylistBar.cpp
+++ b/src/mpc-hc/PlayerPlaylistBar.cpp
@@ -37,14 +37,17 @@ IMPLEMENT_DYNAMIC(CPlayerPlaylistBar, CPlayerBar)
CPlayerPlaylistBar::CPlayerPlaylistBar(CMainFrame* pMainFrame)
: m_pMainFrame(pMainFrame)
, m_list(0)
- , m_pl(AfxGetAppSettings().bShufflePlaylistItems)
, m_nTimeColWidth(0)
, m_pDragImage(nullptr)
, m_bDragging(FALSE)
, m_nDragIndex(0)
, m_nDropIndex(0)
, m_bHiddenDueToFullscreen(false)
+ , m_pl(AfxGetAppSettings().bShufflePlaylistItems)
{
+ GetEventd().Connect(m_eventc, {
+ MpcEvent::DPI_CHANGED,
+ }, std::bind(&CPlayerPlaylistBar::EventCallback, this, std::placeholders::_1));
}
CPlayerPlaylistBar::~CPlayerPlaylistBar()
@@ -69,14 +72,11 @@ BOOL CPlayerPlaylistBar::Create(CWnd* pParentWnd, UINT defDockBarID)
m_list.SetExtendedStyle(m_list.GetExtendedStyle() | LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER);
// The column titles don't have to be translated since they aren't displayed anyway
- m_list.InsertColumn(COL_NAME, _T("Name"), LVCFMT_LEFT, 380);
+ m_list.InsertColumn(COL_NAME, _T("Name"), LVCFMT_LEFT);
- CDC* pDC = m_list.GetDC();
- CFont* old = pDC->SelectObject(GetFont());
- m_nTimeColWidth = pDC->GetTextExtent(_T("000:00:00")).cx + 5;
- pDC->SelectObject(old);
- m_list.ReleaseDC(pDC);
- m_list.InsertColumn(COL_TIME, _T("Time"), LVCFMT_RIGHT, m_nTimeColWidth);
+ m_list.InsertColumn(COL_TIME, _T("Time"), LVCFMT_RIGHT);
+
+ ScaleFont();
m_fakeImageList.Create(1, 16, ILC_COLOR4, 10, 10);
m_list.SetImageList(&m_fakeImageList, LVSIL_SMALL);
@@ -204,7 +204,7 @@ static bool SearchFiles(CString mask, CAtlList<CString>& sl)
}
{
- CString dir = mask.Left(max(mask.ReverseFind('\\'), mask.ReverseFind('/')) + 1);
+ CString dir = mask.Left(std::max(mask.ReverseFind('\\'), mask.ReverseFind('/')) + 1);
WIN32_FIND_DATA fd;
HANDLE h = FindFirstFile(mask, &fd);
@@ -318,11 +318,6 @@ void CPlayerPlaylistBar::ParsePlayList(CAtlList<CString>& fns, CAtlList<CString>
AddItem(fns, subs);
}
-static int s_int_comp(const void* i1, const void* i2)
-{
- return (int)i1 - (int)i2;
-}
-
static CString CombinePath(CPath p, CString fn)
{
if (fn.Find(':') >= 0 || fn.Find(_T("\\")) == 0) {
@@ -355,7 +350,7 @@ bool CPlayerPlaylistBar::ParseMPCPlayList(CString fn)
{
CString str;
CAtlMap<int, CPlaylistItem> pli;
- CAtlArray<int> idx;
+ std::vector<int> idx;
CWebTextFile f(CTextFile::UTF8);
if (!f.Open(fn) || !f.ReadString(str) || str != _T("MPCPLAYLIST")) {
@@ -382,7 +377,7 @@ bool CPlayerPlaylistBar::ParseMPCPlayList(CString fn)
if (key == _T("type")) {
pli[i].m_type = (CPlaylistItem::type_t)_ttol(value);
- idx.Add(i);
+ idx.push_back(i);
} else if (key == _T("label")) {
pli[i].m_label = value;
} else if (key == _T("filename")) {
@@ -413,9 +408,9 @@ bool CPlayerPlaylistBar::ParseMPCPlayList(CString fn)
}
}
- qsort(idx.GetData(), idx.GetCount(), sizeof(int), s_int_comp);
- for (size_t i = 0; i < idx.GetCount(); i++) {
- m_pl.AddTail(pli[idx[i]]);
+ std::sort(idx.begin(), idx.end());
+ for (int i : idx) {
+ m_pl.AddTail(pli[i]);
}
return !pli.IsEmpty();
@@ -905,6 +900,7 @@ BEGIN_MESSAGE_MAP(CPlayerPlaylistBar, CPlayerBar)
ON_NOTIFY(LVN_KEYDOWN, IDC_PLAYLIST, OnLvnKeyDown)
ON_NOTIFY(NM_DBLCLK, IDC_PLAYLIST, OnNMDblclkList)
//ON_NOTIFY(NM_CUSTOMDRAW, IDC_PLAYLIST, OnCustomdrawList)
+ ON_WM_MEASUREITEM()
ON_WM_DRAWITEM()
ON_COMMAND_EX(ID_PLAY_PLAY, OnPlayPlay)
ON_NOTIFY(LVN_BEGINDRAG, IDC_PLAYLIST, OnBeginDrag)
@@ -920,6 +916,38 @@ BEGIN_MESSAGE_MAP(CPlayerPlaylistBar, CPlayerBar)
END_MESSAGE_MAP()
+void CPlayerPlaylistBar::ScaleFont()
+{
+ LOGFONT lf;
+ GetMessageFont(&lf);
+ lf.lfHeight = m_pMainFrame->m_dpi.ScaleSystemToOverrideY(lf.lfHeight);
+
+ m_font.DeleteObject();
+ if (m_font.CreateFontIndirect(&lf)) {
+ m_list.SetFont(&m_font);
+ }
+
+ CDC* pDC = m_list.GetDC();
+ CFont* old = pDC->SelectObject(m_list.GetFont());
+ m_nTimeColWidth = pDC->GetTextExtent(_T("000:00:00")).cx + m_pMainFrame->m_dpi.ScaleX(5);
+ pDC->SelectObject(old);
+ m_list.ReleaseDC(pDC);
+ m_list.SetColumnWidth(COL_TIME, m_nTimeColWidth);
+}
+
+void CPlayerPlaylistBar::EventCallback(MpcEvent ev)
+{
+ switch (ev) {
+ case MpcEvent::DPI_CHANGED:
+ ScaleFont();
+ ResizeListColumn();
+ break;
+
+ default:
+ ASSERT(FALSE);
+ }
+}
+
// CPlayerPlaylistBar message handlers
void CPlayerPlaylistBar::ResizeListColumn()
@@ -982,7 +1010,7 @@ void CPlayerPlaylistBar::OnLvnKeyDown(NMHDR* pNMHDR, LRESULT* pResult)
m_list.SetItemState(-1, 0, LVIS_SELECTED);
m_list.SetItemState(
- max(min(items.GetTail(), m_list.GetItemCount() - 1), 0),
+ std::max(std::min(items.GetTail(), m_list.GetItemCount() - 1), 0),
LVIS_SELECTED, LVIS_SELECTED);
ResizeListColumn();
@@ -1021,6 +1049,16 @@ void CPlayerPlaylistBar::OnNMDblclkList(NMHDR* pNMHDR, LRESULT* pResult)
*pResult = 0;
}
+
+void CPlayerPlaylistBar::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
+{
+ __super::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
+ if (m_itemHeight == 0) {
+ m_itemHeight = lpMeasureItemStruct->itemHeight;
+ }
+ lpMeasureItemStruct->itemHeight = m_pMainFrame->m_dpi.ScaleSystemToOverrideY(m_itemHeight);
+}
+
/*
void CPlayerPlaylistBar::OnCustomdrawList(NMHDR* pNMHDR, LRESULT* pResult)
{
@@ -1345,12 +1383,12 @@ BOOL CPlayerPlaylistBar::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResul
return TRUE; // message was handled
}
-void CPlayerPlaylistBar::OnContextMenu(CWnd* /*pWnd*/, CPoint p)
+void CPlayerPlaylistBar::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
{
LVHITTESTINFO lvhti;
bool bOnItem;
- if (p.x == -1 && p.y == -1) {
+ if (point.x == -1 && point.y == -1) {
lvhti.iItem = m_list.GetSelectionMark();
if (lvhti.iItem == -1 && m_pl.GetCount() == 1) {
@@ -1359,14 +1397,14 @@ void CPlayerPlaylistBar::OnContextMenu(CWnd* /*pWnd*/, CPoint p)
CRect r;
if (!!m_list.GetItemRect(lvhti.iItem, r, LVIR_BOUNDS)) {
- p.SetPoint(r.left, r.bottom);
+ point.SetPoint(r.left, r.bottom);
} else {
- p.SetPoint(0, 0);
+ point.SetPoint(0, 0);
}
- m_list.ClientToScreen(&p);
+ m_list.ClientToScreen(&point);
bOnItem = lvhti.iItem != -1;
} else {
- lvhti.pt = p;
+ lvhti.pt = point;
m_list.ScreenToClient(&lvhti.pt);
m_list.SubItemHitTest(&lvhti);
bOnItem = lvhti.iItem >= 0 && !!(lvhti.flags & LVHT_ONITEM);
@@ -1426,7 +1464,7 @@ void CPlayerPlaylistBar::OnContextMenu(CWnd* /*pWnd*/, CPoint p)
m.AppendMenu(MF_SEPARATOR);
m.AppendMenu(MF_STRING | MF_ENABLED | (s.bHidePlaylistFullScreen ? MF_CHECKED : MF_UNCHECKED), M_HIDEFULLSCREEN, ResStr(IDS_PLAYLIST_HIDEFS));
- int nID = (int)m.TrackPopupMenu(TPM_LEFTBUTTON | TPM_RETURNCMD, p.x, p.y, this);
+ int nID = (int)m.TrackPopupMenu(TPM_LEFTBUTTON | TPM_RETURNCMD, point.x, point.y, this);
switch (nID) {
case M_OPEN:
m_pl.SetPos(pos);
@@ -1504,15 +1542,15 @@ void CPlayerPlaylistBar::OnContextMenu(CWnd* /*pWnd*/, CPoint p)
std::set<CString, CStringUtils::LogicalLess> fileList;
{
// convert to stl
- POSITION pos = fileListAtl.GetHeadPosition();
- while (pos) {
- fileList.emplace_hint(fileList.end(), fileListAtl.GetNext(pos));
+ POSITION pos2 = fileListAtl.GetHeadPosition();
+ while (pos2) {
+ fileList.emplace_hint(fileList.end(), fileListAtl.GetNext(pos2));
}
// deduplicate
- pos = m_pl.GetHeadPosition();
- while (pos) {
- const CPlaylistItem& pli = m_pl.GetNext(pos);
+ pos2 = m_pl.GetHeadPosition();
+ while (pos2) {
+ const CPlaylistItem& pli = m_pl.GetNext(pos2);
POSITION subpos = pli.m_fns.GetHeadPosition();
while (subpos) {
fileList.erase(pli.m_fns.GetNext(subpos));
@@ -1622,26 +1660,26 @@ void CPlayerPlaylistBar::OnContextMenu(CWnd* /*pWnd*/, CPoint p)
if (pli.m_type != CPlaylistItem::file) {
fRemovePath = false;
} else {
- POSITION pos;
+ POSITION pos2;
- pos = pli.m_fns.GetHeadPosition();
- while (pos && fRemovePath) {
- CString fn = pli.m_fns.GetNext(pos);
+ pos2 = pli.m_fns.GetHeadPosition();
+ while (pos2 && fRemovePath) {
+ CString fn = pli.m_fns.GetNext(pos2);
- CPath p(fn);
- p.RemoveFileSpec();
- if (base != (LPCTSTR)p) {
+ CPath fnPath(fn);
+ fnPath.RemoveFileSpec();
+ if (base != (LPCTSTR)fnPath) {
fRemovePath = false;
}
}
- pos = pli.m_subs.GetHeadPosition();
- while (pos && fRemovePath) {
- CString fn = pli.m_subs.GetNext(pos);
+ pos2 = pli.m_subs.GetHeadPosition();
+ while (pos2 && fRemovePath) {
+ CString fn = pli.m_subs.GetNext(pos2);
- CPath p(fn);
- p.RemoveFileSpec();
- if (base != (LPCTSTR)p) {
+ CPath fnPath(fn);
+ fnPath.RemoveFileSpec();
+ if (base != (LPCTSTR)fnPath) {
fRemovePath = false;
}
}
diff --git a/src/mpc-hc/PlayerPlaylistBar.h b/src/mpc-hc/PlayerPlaylistBar.h
index 310ce9f36..0cdd804ad 100644
--- a/src/mpc-hc/PlayerPlaylistBar.h
+++ b/src/mpc-hc/PlayerPlaylistBar.h
@@ -41,9 +41,16 @@ private:
CMainFrame* m_pMainFrame;
+ CFont m_font;
+ void ScaleFont();
+
CImageList m_fakeImageList;
CPlayerListCtrl m_list;
+ int m_itemHeight = 0;
+ EventClient m_eventc;
+ void EventCallback(MpcEvent ev);
+
int m_nTimeColWidth;
void ResizeListColumn();
@@ -139,6 +146,7 @@ public:
afx_msg void OnNMDblclkList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnLvnKeydownList(NMHDR* pNMHDR, LRESULT* pResult);
// afx_msg void OnCustomdrawList(NMHDR* pNMHDR, LRESULT* pResult);
+ void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
afx_msg BOOL OnPlayPlay(UINT nID);
afx_msg void OnBeginDrag(NMHDR* pNMHDR, LRESULT* pResult);
@@ -146,7 +154,7 @@ public:
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg BOOL OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnTimer(UINT_PTR nIDEvent);
- afx_msg void OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/);
+ afx_msg void OnContextMenu(CWnd* /*pWnd*/, CPoint point);
afx_msg void OnLvnEndlabeleditList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnXButtonDown(UINT nFlags, UINT nButton, CPoint point);
afx_msg void OnXButtonUp(UINT nFlags, UINT nButton, CPoint point);
diff --git a/src/mpc-hc/PlayerSeekBar.cpp b/src/mpc-hc/PlayerSeekBar.cpp
index 9a57246ca..de421dcc6 100644
--- a/src/mpc-hc/PlayerSeekBar.cpp
+++ b/src/mpc-hc/PlayerSeekBar.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -46,6 +46,10 @@ CPlayerSeekBar::CPlayerSeekBar(CMainFrame* pMainFrame)
{
ZeroMemory(&m_ti, sizeof(m_ti));
m_ti.cbSize = sizeof(m_ti);
+
+ GetEventd().Connect(m_eventc, {
+ MpcEvent::DPI_CHANGED,
+ }, std::bind(&CPlayerSeekBar::EventCallback, this, std::placeholders::_1));
}
CPlayerSeekBar::~CPlayerSeekBar()
@@ -76,6 +80,19 @@ BOOL CPlayerSeekBar::Create(CWnd* pParentWnd)
return TRUE;
}
+void CPlayerSeekBar::EventCallback(MpcEvent ev)
+{
+ switch (ev) {
+ case MpcEvent::DPI_CHANGED:
+ m_pEnabledThumb = nullptr;
+ m_pDisabledThumb = nullptr;
+ break;
+
+ default:
+ ASSERT(FALSE);
+ }
+}
+
BOOL CPlayerSeekBar::PreCreateWindow(CREATESTRUCT& cs)
{
if (!__super::PreCreateWindow(cs)) {
@@ -117,7 +134,7 @@ void CPlayerSeekBar::SyncVideoToThumb()
long CPlayerSeekBar::ChannelPointFromPosition(REFERENCE_TIME rtPos) const
{
- rtPos = min(m_rtStop, max(m_rtStart, rtPos));
+ rtPos = std::min(m_rtStop, std::max(m_rtStart, rtPos));
long ret = 0;
auto w = GetChannelRect().Width();
if (m_bHasDuration) {
@@ -153,8 +170,8 @@ void CPlayerSeekBar::SyncThumbToVideo(REFERENCE_TIME rtPos)
bSetTaskbar = true;
InvalidateRect(newThumbRect | m_lastThumbRect);
}
- if (bSetTaskbar && AfxGetAppSettings().fUseWin7TaskBar && m_pMainFrame->m_pTaskbarList) {
- VERIFY(S_OK == m_pMainFrame->m_pTaskbarList->SetProgressValue(m_pMainFrame->m_hWnd, max(m_rtPos, 1ll), m_rtStop));
+ if (bSetTaskbar && AfxGetAppSettings().bUseEnhancedTaskBar && m_pMainFrame->m_pTaskbarList) {
+ VERIFY(S_OK == m_pMainFrame->m_pTaskbarList->SetProgressValue(m_pMainFrame->m_hWnd, std::max(m_rtPos, 1ll), m_rtStop));
}
}
}
@@ -295,7 +312,7 @@ void CPlayerSeekBar::UpdateToolTipPosition()
point.x += m_pMainFrame->m_dpi.ScaleX(10);
point.y += m_pMainFrame->m_dpi.ScaleY(20);
}
- point.x = max(0l, min(point.x, windowRect.Width() - bubbleSize.cx));
+ point.x = std::max(0l, std::min(point.x, windowRect.Width() - bubbleSize.cx));
ClientToScreen(&point);
m_tooltip.SendMessage(TTM_TRACKPOSITION, 0, MAKELPARAM(point.x, point.y));
diff --git a/src/mpc-hc/PlayerSeekBar.h b/src/mpc-hc/PlayerSeekBar.h
index 7cb14bf64..16d859911 100644
--- a/src/mpc-hc/PlayerSeekBar.h
+++ b/src/mpc-hc/PlayerSeekBar.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -21,6 +21,7 @@
#pragma once
+#include "EventDispatcher.h"
#include "DSMPropertyBag.h"
#include <memory>
@@ -48,6 +49,9 @@ private:
HCURSOR m_cursor;
bool m_bDraggingThumb;
+ EventClient m_eventc;
+ void EventCallback(MpcEvent ev);
+
CToolTipCtrl m_tooltip;
enum { TOOLTIP_HIDDEN, TOOLTIP_TRIGGERED, TOOLTIP_VISIBLE } m_tooltipState;
TOOLINFO m_ti;
diff --git a/src/mpc-hc/PlayerStatusBar.cpp b/src/mpc-hc/PlayerStatusBar.cpp
index 9975df0db..3f4404980 100644
--- a/src/mpc-hc/PlayerStatusBar.cpp
+++ b/src/mpc-hc/PlayerStatusBar.cpp
@@ -25,22 +25,23 @@
#include "MainFrm.h"
#include "DSUtil.h"
-
// CPlayerStatusBar
IMPLEMENT_DYNAMIC(CPlayerStatusBar, CDialogBar)
CPlayerStatusBar::CPlayerStatusBar(CMainFrame* pMainFrame)
: m_pMainFrame(pMainFrame)
- , m_status(false, true)
- , m_time(true, false)
+ , m_status(pMainFrame->m_dpi, false, true)
+ , m_time(pMainFrame->m_dpi, true, false)
, m_bmid(0)
, m_hIcon(0)
, m_time_rect(-1, -1, -1, -1)
{
EventRouter::EventSelection fires;
fires.insert(MpcEvent::STREAM_POS_UPDATE_REQUEST);
- GetEventd().Connect(m_eventc, fires);
+ EventRouter::EventSelection receives;
+ receives.insert(MpcEvent::DPI_CHANGED);
+ GetEventd().Connect(m_eventc, receives, std::bind(&CPlayerStatusBar::EventCallback, this, std::placeholders::_1), fires);
}
CPlayerStatusBar::~CPlayerStatusBar()
@@ -83,6 +84,7 @@ CSize CPlayerStatusBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz)
{
CSize ret = __super::CalcFixedLayout(bStretch, bHorz);
ret.cy = std::max<long>(ret.cy, 24);
+ ret.cy = m_pMainFrame->m_dpi.ScaleSystemToOverrideY(ret.cy);
return ret;
}
@@ -113,6 +115,20 @@ int CPlayerStatusBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
return 0;
}
+void CPlayerStatusBar::EventCallback(MpcEvent ev)
+{
+ switch (ev) {
+ case MpcEvent::DPI_CHANGED:
+ m_status.ScaleFont(m_pMainFrame->m_dpi);
+ m_time.ScaleFont(m_pMainFrame->m_dpi);
+ SetMediaTypeIcon();
+ break;
+
+ default:
+ ASSERT(FALSE);
+ }
+}
+
void CPlayerStatusBar::Relayout()
{
BITMAP bm {};
@@ -170,7 +186,8 @@ void CPlayerStatusBar::Clear()
{
m_status.SetWindowText(_T(""));
m_time.SetWindowText(_T(""));
- SetStatusTypeIcon(nullptr);
+ m_typeExt.Empty();
+ SetMediaTypeIcon();
SetStatusBitmap(0);
}
@@ -195,18 +212,12 @@ void CPlayerStatusBar::SetStatusBitmap(UINT id)
Relayout();
}
-void CPlayerStatusBar::SetStatusTypeIcon(HICON hIcon)
+void CPlayerStatusBar::SetMediaType(CString ext)
{
- if (m_hIcon == hIcon) {
- return;
- }
-
- if (m_hIcon) {
- DestroyIcon(m_hIcon);
+ if (ext != m_typeExt) {
+ m_typeExt = ext;
+ SetMediaTypeIcon();
}
- m_type.SetIcon(m_hIcon = hIcon);
-
- Relayout();
}
CString CPlayerStatusBar::GetStatusMessage() const
@@ -338,6 +349,19 @@ END_MESSAGE_MAP()
// CPlayerStatusBar message handlers
+void CPlayerStatusBar::SetMediaTypeIcon()
+{
+ if (m_hIcon) {
+ DestroyIcon(m_hIcon);
+ }
+
+ m_hIcon = m_typeExt.IsEmpty() ? NULL : LoadIcon(m_typeExt, true, &m_pMainFrame->m_dpi);
+
+ m_type.SetIcon(m_hIcon);
+
+ Relayout();
+}
+
BOOL CPlayerStatusBar::OnEraseBkgnd(CDC* pDC)
{
return TRUE;
diff --git a/src/mpc-hc/PlayerStatusBar.h b/src/mpc-hc/PlayerStatusBar.h
index 4be42a201..55750b59c 100644
--- a/src/mpc-hc/PlayerStatusBar.h
+++ b/src/mpc-hc/PlayerStatusBar.h
@@ -38,6 +38,7 @@ private:
CStatusLabel m_status, m_time;
CBitmap m_bm;
UINT m_bmid;
+ CString m_typeExt;
HICON m_hIcon;
CRect m_time_rect;
@@ -46,6 +47,7 @@ private:
CToolTipCtrl m_tooltip;
EventClient m_eventc;
+ void EventCallback(MpcEvent ev);
void Relayout();
@@ -56,7 +58,7 @@ public:
void Clear();
void SetStatusBitmap(UINT id);
- void SetStatusTypeIcon(HICON hIcon);
+ void SetMediaType(CString ext);
void SetStatusMessage(CString str);
void SetStatusTimer(CString str);
void SetStatusTimer(REFERENCE_TIME rtNow, REFERENCE_TIME rtDur, bool fHighPrecision,
@@ -77,6 +79,9 @@ public:
DECLARE_MESSAGE_MAP()
protected:
+
+ void SetMediaTypeIcon();
+
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnPaint();
afx_msg void OnSize(UINT nType, int cx, int cy);
diff --git a/src/mpc-hc/PlayerSubresyncBar.cpp b/src/mpc-hc/PlayerSubresyncBar.cpp
index 37967e61e..52f18d5c7 100644
--- a/src/mpc-hc/PlayerSubresyncBar.cpp
+++ b/src/mpc-hc/PlayerSubresyncBar.cpp
@@ -23,18 +23,23 @@
#include "mplayerc.h"
#include "MainFrm.h"
#include "PlayerSubresyncBar.h"
+#include "WinAPIUtils.h"
// CPlayerSubresyncBar
IMPLEMENT_DYNAMIC(CPlayerSubresyncBar, CPlayerBar)
-CPlayerSubresyncBar::CPlayerSubresyncBar()
+CPlayerSubresyncBar::CPlayerSubresyncBar(CMainFrame* pMainFrame)
: m_pSubLock(nullptr)
+ , m_pMainFrame(pMainFrame)
, m_fps(0.0)
, m_lastSegment(-1)
, m_rt(0)
, m_mode(NONE)
{
+ GetEventd().Connect(m_eventc, {
+ MpcEvent::DPI_CHANGED,
+ }, std::bind(&CPlayerSubresyncBar::EventCallback, this, std::placeholders::_1));
}
CPlayerSubresyncBar::~CPlayerSubresyncBar()
@@ -54,6 +59,8 @@ BOOL CPlayerSubresyncBar::Create(CWnd* pParentWnd, UINT defDockBarID, CCritSec*
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP | LVS_REPORT | LVS_OWNERDATA /*|LVS_SHOWSELALWAYS*/ | LVS_AUTOARRANGE | LVS_NOSORTHEADER,
CRect(0, 0, 100, 100), this, IDC_SUBRESYNCLIST);
+ ScaleFont();
+
m_list.SetExtendedStyle(m_list.GetExtendedStyle() | LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER);
m_strYes = m_strYesMenu = ResStr(IDS_SUBRESYNC_YES);
@@ -327,6 +334,31 @@ void CPlayerSubresyncBar::SaveSubtitle()
}
}
+void CPlayerSubresyncBar::ScaleFont()
+{
+ LOGFONT lf;
+ GetMessageFont(&lf);
+ lf.lfHeight = m_pMainFrame->m_dpi.ScaleSystemToOverrideY(lf.lfHeight);
+
+ m_font.DeleteObject();
+ if (m_font.CreateFontIndirect(&lf)) {
+ m_list.SetFont(&m_font);
+ }
+}
+
+void CPlayerSubresyncBar::EventCallback(MpcEvent ev)
+{
+ switch (ev) {
+ case MpcEvent::DPI_CHANGED:
+ ScaleFont();
+ m_list.SetWindowPos(nullptr, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
+ break;
+
+ default:
+ ASSERT(FALSE);
+ }
+}
+
void CPlayerSubresyncBar::UpdatePreview()
{
if (m_mode == VOBSUB || m_mode == TEXTSUB) {
@@ -536,6 +568,7 @@ bool CPlayerSubresyncBar::ModEnd(int iItem, int t, bool bReset)
}
BEGIN_MESSAGE_MAP(CPlayerSubresyncBar, CPlayerBar)
+ ON_WM_MEASUREITEM()
ON_WM_SIZE()
ON_NOTIFY(LVN_GETDISPINFO, IDC_SUBRESYNCLIST, OnGetDisplayInfo)
ON_NOTIFY(LVN_BEGINLABELEDIT, IDC_SUBRESYNCLIST, OnBeginlabeleditList)
@@ -860,7 +893,7 @@ void CPlayerSubresyncBar::OnRclickList(NMHDR* pNMHDR, LRESULT* pResult)
EFFECTFIRST, EFFECTLAST = EFFECTFIRST + 1000
};
- CStringArray styles;
+ CStringArray stylesNames;
CStringArray actors;
CStringArray effects;
@@ -904,7 +937,7 @@ void CPlayerSubresyncBar::OnRclickList(NMHDR* pNMHDR, LRESULT* pResult)
CString key;
STSStyle* val;
m_sts.m_styles.GetNextAssoc(pos, key, val);
- styles.Add(key);
+ stylesNames.Add(key);
m.AppendMenu(MF_STRING | MF_ENABLED, id++, key);
}
@@ -1091,7 +1124,7 @@ void CPlayerSubresyncBar::OnRclickList(NMHDR* pNMHDR, LRESULT* pResult)
break;
default:
if (STYLEFIRST <= id && id <= STYLELAST) {
- CString s = styles[id - STYLEFIRST];
+ CString s = stylesNames[id - STYLEFIRST];
if (m_sts[iItem].style != s) {
m_sts[iItem].style = s;
bNeedsUpdate = true;
@@ -1103,11 +1136,11 @@ void CPlayerSubresyncBar::OnRclickList(NMHDR* pNMHDR, LRESULT* pResult)
STSStyle* stss = m_sts.GetStyle(iItem);
int iSelPage = 0;
- POSITION pos = m_sts.m_styles.GetStartPosition();
- for (int i = 0; pos; i++) {
+ POSITION posStyles = m_sts.m_styles.GetStartPosition();
+ for (int i = 0; posStyles; i++) {
CString key;
STSStyle* val;
- m_sts.m_styles.GetNextAssoc(pos, key, val);
+ m_sts.m_styles.GetNextAssoc(posStyles, key, val);
CAutoPtr<CPPageSubStyle> page(DEBUG_NEW CPPageSubStyle());
page->InitStyle(key, *val);
@@ -1371,6 +1404,15 @@ bool CPlayerSubresyncBar::HandleShortCuts(const MSG* pMsg)
return bHandled;
}
+void CPlayerSubresyncBar::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
+{
+ __super::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
+ if (m_itemHeight == 0) {
+ m_itemHeight = lpMeasureItemStruct->itemHeight;
+ }
+ lpMeasureItemStruct->itemHeight = m_pMainFrame->m_dpi.ScaleSystemToOverrideY(m_itemHeight);
+}
+
int CPlayerSubresyncBar::FindNearestSub(REFERENCE_TIME& rtPos, bool bForward)
{
if (m_subtimes.empty()) {
diff --git a/src/mpc-hc/PlayerSubresyncBar.h b/src/mpc-hc/PlayerSubresyncBar.h
index 1b6cf35da..331456de0 100644
--- a/src/mpc-hc/PlayerSubresyncBar.h
+++ b/src/mpc-hc/PlayerSubresyncBar.h
@@ -24,6 +24,7 @@
#include <afxcview.h>
#include <vector>
#include <map>
+#include "EventDispatcher.h"
#include "PlayerBar.h"
#include "PlayerListCtrl.h"
#include "../Subtitles/RTS.h"
@@ -42,7 +43,14 @@ private:
CPlayerListCtrl m_list;
+ CMainFrame* m_pMainFrame;
+
CFont m_font;
+ void ScaleFont();
+
+ int m_itemHeight = 0;
+ EventClient m_eventc;
+ void EventCallback(MpcEvent ev);
CCritSec* m_pSubLock;
CComPtr<ISubStream> m_pSubStream;
@@ -123,7 +131,7 @@ private:
void OnGetDisplayInfoVobSub(LV_ITEM* pItem);
public:
- CPlayerSubresyncBar();
+ CPlayerSubresyncBar(CMainFrame* pMainFrame);
virtual ~CPlayerSubresyncBar();
BOOL Create(CWnd* pParentWnd, UINT defDockBarID, CCritSec* pSubLock);
@@ -150,6 +158,7 @@ protected:
DECLARE_MESSAGE_MAP()
+ void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnGetDisplayInfo(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnBeginlabeleditList(NMHDR* pNMHDR, LRESULT* pResult);
diff --git a/src/mpc-hc/PlayerToolBar.cpp b/src/mpc-hc/PlayerToolBar.cpp
index 6d8dd31f0..af75f9499 100644
--- a/src/mpc-hc/PlayerToolBar.cpp
+++ b/src/mpc-hc/PlayerToolBar.cpp
@@ -195,7 +195,7 @@ int CPlayerToolBar::GetVolume() const
if (IsMuted() || volume <= 0) {
volume = -10000;
} else {
- volume = min((int)(4000 * log10(volume / 100.0f)), 0); // 4000=2.0*100*20, where 2.0 is a special factor
+ volume = std::min((int)(4000 * log10(volume / 100.0f)), 0); // 4000=2.0*100*20, where 2.0 is a special factor
}
return volume;
diff --git a/src/mpc-hc/Playlist.cpp b/src/mpc-hc/Playlist.cpp
index fa22b3e6d..d15453ed1 100644
--- a/src/mpc-hc/Playlist.cpp
+++ b/src/mpc-hc/Playlist.cpp
@@ -246,8 +246,8 @@ bool CPlaylist::RemoveAll()
bool CPlaylist::RemoveAt(POSITION pos)
{
if (pos) {
- // Update the shuffled list
- if (m_bShuffle) {
+ // Update the shuffled list only if there is no pending reshuffle
+ if (m_bShuffle && m_nShuffledListSize == GetCount()) {
const CPlaylistItem& pli = GetAt(pos);
if (pos == m_posHeadShuffle) {
m_posHeadShuffle = pli.m_posNextShuffle;
diff --git a/src/mpc-hc/QuicktimeGraph.cpp b/src/mpc-hc/QuicktimeGraph.cpp
index 976c60a9e..f9a0a6f6f 100644
--- a/src/mpc-hc/QuicktimeGraph.cpp
+++ b/src/mpc-hc/QuicktimeGraph.cpp
@@ -139,21 +139,27 @@ STDMETHODIMP CQuicktimeGraph::RenderFile(LPCWSTR lpcwstrFile, LPCWSTR lpcwstrPla
STDMETHODIMP CQuicktimeGraph::Run()
{
m_wndDestFrame.Run();
- m_pQTAP->SetIsRendering(true);
+ if (m_pQTAP) {
+ m_pQTAP->SetIsRendering(true);
+ }
return S_OK;
}
STDMETHODIMP CQuicktimeGraph::Pause()
{
m_wndDestFrame.Pause();
- m_pQTAP->SetIsRendering(false);
+ if (m_pQTAP) {
+ m_pQTAP->SetIsRendering(false);
+ }
return S_OK;
}
STDMETHODIMP CQuicktimeGraph::Stop()
{
m_wndDestFrame.Stop();
- m_pQTAP->SetIsRendering(false);
+ if (m_pQTAP) {
+ m_pQTAP->SetIsRendering(false);
+ }
return S_OK;
}
@@ -299,7 +305,7 @@ STDMETHODIMP CQuicktimeGraph::put_Volume(long lVolume)
{
if (m_wndDestFrame.theMovie) {
short volume = (lVolume <= -10000) ? 0 : short(pow(10.0, lVolume / 4000.0) * 256);
- volume = max<short>(min<short>(volume, 256), 0);
+ volume = std::max<short>(std::min<short>(volume, 256), 0);
SetMovieVolume(m_wndDestFrame.theMovie, volume);
return S_OK;
}
@@ -314,7 +320,7 @@ STDMETHODIMP CQuicktimeGraph::get_Volume(long* plVolume)
if (m_wndDestFrame.theMovie) {
*plVolume = (long)GetMovieVolume(m_wndDestFrame.theMovie); // [?..256]
if (*plVolume > 0) {
- *plVolume = min(long(4000 * log10(*plVolume / 256.0f)), 0l);
+ *plVolume = std::min(long(4000 * log10(*plVolume / 256.0f)), 0l);
} else {
*plVolume = -10000;
}
diff --git a/src/mpc-hc/RealMediaGraph.cpp b/src/mpc-hc/RealMediaGraph.cpp
index 253848cf8..e2552b646 100644
--- a/src/mpc-hc/RealMediaGraph.cpp
+++ b/src/mpc-hc/RealMediaGraph.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -829,7 +829,7 @@ STDMETHODIMP CRealMediaGraph::put_Volume(long lVolume)
}
UINT16 volume = (lVolume <= -10000) ? 0 : UINT16(pow(10.0, lVolume / 4000.0) * 100);
- volume = max<UINT16>(min<UINT16>(volume, 100u), 0u);
+ volume = std::max<UINT16>(std::min<UINT16>(volume, 100u), 0u);
return PNR_OK == m_pRMP->m_pVolume->SetVolume(volume) ? S_OK : E_FAIL;
}
@@ -844,7 +844,7 @@ STDMETHODIMP CRealMediaGraph::get_Volume(long* plVolume)
*plVolume = (long)m_pRMP->m_pVolume->GetVolume(); // [?..100]
if (*plVolume > 0) {
- *plVolume = min(long(4000 * log10(*plVolume / 100.0f)), 0l);
+ *plVolume = std::min(long(4000 * log10(*plVolume / 100.0f)), 0l);
} else {
*plVolume = -10000;
}
diff --git a/src/mpc-hc/SettingsDefines.h b/src/mpc-hc/SettingsDefines.h
index 51d35b9a3..4285a83c0 100644
--- a/src/mpc-hc/SettingsDefines.h
+++ b/src/mpc-hc/SettingsDefines.h
@@ -141,7 +141,6 @@
#define IDS_RS_ENABLEWORKERTHREADFOROPENING _T("EnableWorkerThreadForOpening")
#define IDS_RS_PNSPRESETS _T("PnSPresets")
#define IDS_RS_AUTOLOADAUDIO _T("AutoloadAudio")
-#define IDS_RS_AUTOLOADSUBTITLES _T("AutoloadSubtitles")
#define IDS_RS_SUBTITLESLANGORDER _T("SubtitlesLanguageOrder")
#define IDS_RS_AUDIOSLANGORDER _T("AudiosLanguageOrder")
#define IDS_RS_BLOCKVSFILTER _T("BlockVSFilter")
@@ -179,6 +178,7 @@
#define IDS_RS_ONTOP _T("OnTop")
#define IDS_RS_WEBSERVERPRINTDEBUGINFO _T("WebServerPrintDebugIfo")
#define IDS_RS_WEBSERVERUSECOMPRESSION _T("WebServerUseCompression")
+#define IDS_RS_WEBUI_ENABLE_PREVIEW _T("WebUIEnablePreview")
#define IDS_RS_SNAPSHOTPATH _T("SnapshotPath")
#define IDS_RS_PRIORITY _T("Priority")
#define IDS_RS_SNAPSHOTEXT _T("SnapshotExt")
@@ -199,7 +199,7 @@
#define IDS_RS_ENABLEEDLEDITOR _T("EnableEDLEditor")
#define IDS_RS_FULLSCREENMONITOR _T("FullScreenMonitor")
#define IDS_RS_PREVENT_MINIMIZE _T("PreventMinimize")
-#define IDS_RS_WIN7TASKBAR _T("UseWin7TaskBar")
+#define IDS_RS_ENHANCED_TASKBAR _T("UseWin7TaskBar")
#define IDS_RS_SEARCH_IN_FOLDER _T("UseSearchInFolder")
#define IDS_RS_USE_TIME_TOOLTIP _T("UseTimeTooltip")
#define IDS_RS_TIME_TOOLTIP_POSITION _T("TimeTooltipPosition")
@@ -295,3 +295,14 @@
#define IDS_RS_COVER_ART _T("EnableCoverArt")
#define IDS_RS_COVER_ART_SIZE_LIMIT _T("CoverArtSizeLimit")
#define IDS_RS_LOGGING _T("EnableLogging")
+
+#define IDS_RS_SUBTITLE_RENDERER _T("SubtitleRenderer")
+
+#define IDS_R_SANEAR IDS_R_INTERNAL_FILTERS _T("\\Audio Renderer")
+#define IDS_RS_SANEAR_DEVICE_ID _T("DeviceId")
+#define IDS_RS_SANEAR_DEVICE_EXCLUSIVE _T("DeviceExclusive")
+#define IDS_RS_SANEAR_DEVICE_BUFFER _T("DeviceBufferDuration")
+#define IDS_RS_SANEAR_ALLOW_BITSTREAMING _T("AllowBitstreaming")
+#define IDS_RS_SANEAR_CROSSFEED_ENABLED _T("CrossfeedEnabled")
+#define IDS_RS_SANEAR_CROSSFEED_CUTOFF_FREQ _T("CrossfeedCutoffFrequency")
+#define IDS_RS_SANEAR_CROSSFEED_LEVEL _T("CrossfeedLevel")
diff --git a/src/mpc-hc/StatusLabel.cpp b/src/mpc-hc/StatusLabel.cpp
index 6d067031e..d1691364a 100644
--- a/src/mpc-hc/StatusLabel.cpp
+++ b/src/mpc-hc/StatusLabel.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -29,14 +29,25 @@
// CStatusLabel
IMPLEMENT_DYNAMIC(CStatusLabel, CStatic)
-CStatusLabel::CStatusLabel(bool fRightAlign, bool fAddEllipses)
+CStatusLabel::CStatusLabel(const DpiHelper& dpiHelper, bool fRightAlign, bool fAddEllipses)
: m_fRightAlign(fRightAlign)
, m_fAddEllipses(fAddEllipses)
{
- m_font.m_hObject = nullptr;
+ ScaleFont(dpiHelper);
+}
+
+CStatusLabel::~CStatusLabel()
+{
+}
+
+void CStatusLabel::ScaleFont(const DpiHelper& dpiHelper)
+{
+ m_font.DeleteObject();
+
if (SysVersion::IsVistaOrLater()) {
LOGFONT lf;
GetStatusFont(&lf);
+ lf.lfHeight = dpiHelper.ScaleSystemToOverrideY(lf.lfHeight);
VERIFY(m_font.CreateFontIndirect(&lf));
} else {
HDC hdc = ::GetDC(nullptr);
@@ -48,10 +59,6 @@ CStatusLabel::CStatusLabel(bool fRightAlign, bool fAddEllipses)
}
}
-CStatusLabel::~CStatusLabel()
-{
-}
-
BEGIN_MESSAGE_MAP(CStatusLabel, CStatic)
ON_WM_ERASEBKGND()
END_MESSAGE_MAP()
diff --git a/src/mpc-hc/StatusLabel.h b/src/mpc-hc/StatusLabel.h
index dc84e3364..53ede26bb 100644
--- a/src/mpc-hc/StatusLabel.h
+++ b/src/mpc-hc/StatusLabel.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2012 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -21,6 +21,8 @@
#pragma once
+#include "DpiHelper.h"
+
// CStatusLabel
class CStatusLabel : public CStatic
@@ -32,9 +34,10 @@ private:
CFont m_font;
public:
- CStatusLabel(bool fRightAlign, bool fAddEllipses);
+ CStatusLabel(const DpiHelper& dpiHelper, bool fRightAlign, bool fAddEllipses);
virtual ~CStatusLabel();
+ void ScaleFont(const DpiHelper& dpiHelper);
CFont& GetFont() { return m_font; }
void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
diff --git a/src/mpc-hc/SubtitleDlDlg.cpp b/src/mpc-hc/SubtitleDlDlg.cpp
index 9e7c8e17e..456cc82e3 100644
--- a/src/mpc-hc/SubtitleDlDlg.cpp
+++ b/src/mpc-hc/SubtitleDlDlg.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -31,11 +31,11 @@
CSubtitleDlDlg::CSubtitleDlDlg(CWnd* pParent, const CStringA& url, const CString& filename)
: CResizableDialog(CSubtitleDlDlg::IDD, pParent)
- , m_ps(nullptr, 0, TRUE)
- , m_defps(nullptr, filename)
+ , m_ps(&m_list, 0, TRUE)
+ , m_defps(&m_list, filename)
, m_pTA(nullptr)
, m_url(url)
- , m_fReplaceSubs(false)
+ , m_bReplaceSubs(false)
, m_status()
{
}
@@ -54,16 +54,13 @@ void CSubtitleDlDlg::DoDataExchange(CDataExchange* pDX)
size_t CSubtitleDlDlg::StrMatch(LPCTSTR a, LPCTSTR b)
{
size_t count = 0;
- size_t alen = _tcslen(a);
- size_t blen = _tcslen(b);
- for (size_t i = 0; i < alen && i < blen; i++) {
- if (_totlower(a[i]) != _totlower(b[i])) {
+ for (; *a && *b; a++, b++, count++) {
+ if (_totlower(*a) != _totlower(*b)) {
break;
- } else {
- count++;
}
}
+
return count;
}
@@ -77,7 +74,7 @@ CString CSubtitleDlDlg::LangCodeToName(LPCSTR code)
CString name = ISO6392ToLanguage(code);
if (!name.IsEmpty()) {
- // workaround for ISO6392ToLanguage function behaivior
+ // workaround for ISO6392ToLanguage function behavior
// for unknown language code it returns the code parameter back
if (code != name) {
return name;
@@ -113,18 +110,19 @@ CString CSubtitleDlDlg::LangCodeToName(LPCSTR code)
int CALLBACK CSubtitleDlDlg::DefSortCompare(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
{
PDEFPARAMSORT defps = reinterpret_cast<PDEFPARAMSORT>(lParamSort);
- TCHAR left[MAX_PATH] = _T("");
- TCHAR right[MAX_PATH] = _T("");
+ int nLeft = (int)lParam1, nRight = (int)lParam2;
// sort by language first
- ListView_GetItemText(defps->m_hWnd, lParam1, COL_LANGUAGE, left, sizeof(left));
- ListView_GetItemText(defps->m_hWnd, lParam2, COL_LANGUAGE, right, sizeof(right));
+ ISDb::subtitle* lSub = (ISDb::subtitle*)defps->m_list->GetItemData(nLeft);
+ ISDb::subtitle* rSub = (ISDb::subtitle*)defps->m_list->GetItemData(nRight);
+ CString left = defps->m_list->GetItemText(nLeft, COL_LANGUAGE);
+ CString right = defps->m_list->GetItemText(nRight, COL_LANGUAGE);
// user-provided sort order
int lpos, rpos;
- if (!defps->m_langPos.Lookup(left, lpos)) {
+ if (!defps->m_langPos.Lookup(CString(lSub->iso639_2), lpos) && !defps->m_langPos.Lookup(left, lpos)) {
lpos = INT_MAX;
}
- if (!defps->m_langPos.Lookup(right, rpos)) {
+ if (!defps->m_langPos.Lookup(CString(rSub->iso639_2), rpos) && !defps->m_langPos.Lookup(right, rpos)) {
rpos = INT_MAX;
}
if (lpos < rpos) {
@@ -140,8 +138,8 @@ int CALLBACK CSubtitleDlDlg::DefSortCompare(LPARAM lParam1, LPARAM lParam2, LPAR
}
// sort by filename
- ListView_GetItemText(defps->m_hWnd, lParam1, COL_FILENAME, left, sizeof(left));
- ListView_GetItemText(defps->m_hWnd, lParam2, COL_FILENAME, right, sizeof(right));
+ left = defps->m_list->GetItemText(nLeft, COL_FILENAME);
+ right = defps->m_list->GetItemText(nRight, COL_FILENAME);
size_t lmatch = StrMatch(defps->m_filename, left);
size_t rmatch = StrMatch(defps->m_filename, right);
@@ -153,8 +151,8 @@ int CALLBACK CSubtitleDlDlg::DefSortCompare(LPARAM lParam1, LPARAM lParam2, LPAR
}
// prefer shorter names
- size_t llen = _tcslen(left);
- size_t rlen = _tcslen(right);
+ int llen = left.GetLength();
+ int rlen = right.GetLength();
if (llen < rlen) {
return -1;
} else if (llen > rlen) {
@@ -180,8 +178,7 @@ void CSubtitleDlDlg::LoadList()
}
// sort by language and filename
- m_defps.m_hWnd = m_list.GetSafeHwnd();
- ListView_SortItemsEx(m_list.GetSafeHwnd(), DefSortCompare, &m_defps);
+ m_list.SortItemsEx(DefSortCompare, (DWORD_PTR)&m_defps);
m_list.SetRedraw(TRUE);
m_list.Invalidate();
@@ -202,7 +199,7 @@ bool CSubtitleDlDlg::Parse()
while (pos) {
str = sl.GetNext(pos);
- CStringA param = str.Left(max(0, str.Find('=')));
+ CStringA param = str.Left(std::max(0, str.Find('=')));
CStringA value = str.Mid(str.Find('=') + 1);
if (param == "ticket") {
@@ -292,16 +289,11 @@ UINT CSubtitleDlDlg::RunThread(LPVOID pParam)
int CALLBACK CSubtitleDlDlg::SortCompare(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
{
PPARAMSORT ps = reinterpret_cast<PPARAMSORT>(lParamSort);
- TCHAR left[MAX_PATH] = _T(""), right[MAX_PATH] = _T("");
- ListView_GetItemText(ps->m_hWnd, lParam1, ps->m_colIndex, left, sizeof(left));
- ListView_GetItemText(ps->m_hWnd, lParam2, ps->m_colIndex, right, sizeof(right));
+ CString left = ps->m_list->GetItemText((int)lParam1, ps->m_colIndex);
+ CString right = ps->m_list->GetItemText((int)lParam2, ps->m_colIndex);
- if (ps->m_ascending) {
- return _tcscmp(left, right);
- } else {
- return _tcscmp(right, left);
- }
+ return ps->m_ascending ? left.Compare(right) : right.Compare(left);
}
BOOL CSubtitleDlDlg::OnInitDialog()
@@ -361,14 +353,17 @@ BOOL CSubtitleDlDlg::OnInitDialog()
int tPos = 0;
CString langCode = order.Tokenize(_T(",; "), tPos);
while (tPos != -1) {
+ int pos;
+ CString langCodeISO6391 = ISO6392To6391(CStringA(langCode));
+ if (!langCodeISO6391.IsEmpty() && !m_defps.m_langPos.Lookup(langCodeISO6391, pos)) {
+ m_defps.m_langPos[langCodeISO6391] = listPos;
+ }
CString langName = LangCodeToName(CStringA(langCode));
- if (!langName.IsEmpty()) {
- int pos;
- if (!m_defps.m_langPos.Lookup(langName, pos)) {
- m_defps.m_langPos[langName] = listPos++;
- }
+ if (!langName.IsEmpty() && !m_defps.m_langPos.Lookup(langName, pos)) {
+ m_defps.m_langPos[langName] = listPos;
}
langCode = order.Tokenize(_T(",; "), tPos);
+ listPos++;
}
// start new worker thread to download the list of subtitles
@@ -403,11 +398,11 @@ void CSubtitleDlDlg::OnOK()
}
}
- m_fReplaceSubs = IsDlgButtonChecked(IDC_CHECK1) == BST_CHECKED;
+ m_bReplaceSubs = IsDlgButtonChecked(IDC_CHECK1) == BST_CHECKED;
CMainFrame* pMF = static_cast<CMainFrame*>(GetParentFrame());
- if (m_fReplaceSubs) {
+ if (m_bReplaceSubs) {
pMF->m_pSubStreams.RemoveAll();
}
@@ -482,10 +477,9 @@ void CSubtitleDlDlg::OnColumnClick(NMHDR* pNMHDR, LRESULT* pResult)
m_ps.m_ascending = true;
}
m_ps.m_colIndex = phdr->iItem;
- m_ps.m_hWnd = m_list.GetSafeHwnd();
SetRedraw(FALSE);
- ListView_SortItemsEx(m_list.GetSafeHwnd(), SortCompare, &m_ps);
+ m_list.SortItemsEx(SortCompare, (DWORD_PTR)&m_ps);
SetRedraw(TRUE);
m_list.Invalidate();
m_list.UpdateWindow();
diff --git a/src/mpc-hc/SubtitleDlDlg.h b/src/mpc-hc/SubtitleDlDlg.h
index d1c1ca7b6..487046ce7 100644
--- a/src/mpc-hc/SubtitleDlDlg.h
+++ b/src/mpc-hc/SubtitleDlDlg.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -51,23 +51,23 @@ private:
typedef THREADSTRUCT* PTHREADSTRUCT;
struct PARAMSORT {
- PARAMSORT(HWND hWnd, int colIndex, bool ascending) :
- m_hWnd(hWnd),
+ PARAMSORT(CListCtrl* list, int colIndex, bool ascending) :
+ m_list(list),
m_colIndex(colIndex),
m_ascending(ascending)
{}
- HWND m_hWnd;
+ CListCtrl* const m_list;
int m_colIndex;
bool m_ascending;
};
typedef PARAMSORT* PPARAMSORT;
struct DEFPARAMSORT {
- DEFPARAMSORT(HWND hWnd, CString filename) :
- m_hWnd(hWnd),
+ DEFPARAMSORT(CListCtrl* list, CString filename) :
+ m_list(list),
m_filename(filename)
{}
- HWND m_hWnd;
+ CListCtrl* const m_list;
CString m_filename;
CMap <CString, LPCTSTR, int, int> m_langPos;
};
@@ -86,7 +86,7 @@ private:
CArray<isdb_movie_parsed> m_parsed_movies;
CString m_url;
- bool m_fReplaceSubs;
+ bool m_bReplaceSubs;
CListCtrl m_list;
CList<ISDb::subtitle> m_selsubs;
diff --git a/src/mpc-hc/Translations.cpp b/src/mpc-hc/Translations.cpp
index bbe498f19..98ff139b0 100644
--- a/src/mpc-hc/Translations.cpp
+++ b/src/mpc-hc/Translations.cpp
@@ -46,12 +46,15 @@ static const std::vector<Translations::LanguageResource> languageResources = {
{ 1032, _T("Greek"), _T("Lang\\mpcresources.el.dll") },
{ 1037, _T("Hebrew"), _T("Lang\\mpcresources.he.dll") },
{ 1038, _T("Hungarian"), _T("Lang\\mpcresources.hu.dll") },
+ { 1057, _T("Indonesian"), _T("Lang\\mpcresources.id.dll") },
{ 1040, _T("Italian"), _T("Lang\\mpcresources.it.dll") },
{ 1041, _T("Japanese"), _T("Lang\\mpcresources.ja.dll") },
{ 1042, _T("Korean"), _T("Lang\\mpcresources.ko.dll") },
+ { 1063, _T("Lithuanian"), _T("Lang\\mpcresources.lt.dll") },
{ 1086, _T("Malay"), _T("Lang\\mpcresources.ms_MY.dll") },
{ 1045, _T("Polish"), _T("Lang\\mpcresources.pl.dll") },
{ 1046, _T("Portuguese (Brazil)"), _T("Lang\\mpcresources.pt_BR.dll") },
+ { 1094, _T("Punjabi"), _T("Lang\\mpcresources.pa.dll") },
{ 1048, _T("Romanian"), _T("Lang\\mpcresources.ro.dll") },
{ 1049, _T("Russian"), _T("Lang\\mpcresources.ru.dll") },
{ 3098, _T("Serbian"), _T("Lang\\mpcresources.sr.dll") },
diff --git a/src/mpc-hc/VMROSD.cpp b/src/mpc-hc/VMROSD.cpp
index d2ebdb21d..918a45a49 100644
--- a/src/mpc-hc/VMROSD.cpp
+++ b/src/mpc-hc/VMROSD.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -363,8 +363,8 @@ void CVMROSD::Invalidate()
void CVMROSD::UpdateSeekBarPos(CPoint point)
{
m_llSeekPos = (point.x - m_rectBar.left) * (m_llSeekMax - m_llSeekMin) / (m_rectBar.Width() - SLIDER_CURSOR_WIDTH);
- m_llSeekPos = max(m_llSeekPos, m_llSeekMin);
- m_llSeekPos = min(m_llSeekPos, m_llSeekMax);
+ m_llSeekPos = std::max(m_llSeekPos, m_llSeekMin);
+ m_llSeekPos = std::min(m_llSeekPos, m_llSeekMax);
if (AfxGetAppSettings().bFastSeek ^ (GetKeyState(VK_SHIFT) < 0)) {
m_llSeekPos = m_pMainFrame->GetClosestKeyFrame(m_llSeekPos);
diff --git a/src/mpc-hc/VersionInfo.cpp b/src/mpc-hc/VersionInfo.cpp
index b5f332b8e..02200e6cd 100644
--- a/src/mpc-hc/VersionInfo.cpp
+++ b/src/mpc-hc/VersionInfo.cpp
@@ -49,6 +49,15 @@ bool VersionInfo::Is64Bit()
#endif
}
+bool VersionInfo::IsLite()
+{
+#ifdef MPCHC_LITE
+ return true;
+#else
+ return false;
+#endif
+}
+
CString VersionInfo::GetVersionString()
{
return MPC_VERSION_STR;
diff --git a/src/mpc-hc/VersionInfo.h b/src/mpc-hc/VersionInfo.h
index 116cb7491..691c200c9 100644
--- a/src/mpc-hc/VersionInfo.h
+++ b/src/mpc-hc/VersionInfo.h
@@ -25,6 +25,7 @@ namespace VersionInfo
bool IsNightly();
CString GetNightlyWord();
bool Is64Bit();
+ bool IsLite();
CString GetVersionString();
CString GetFullVersionString();
CString GetBuildDateString();
diff --git a/src/mpc-hc/VolumeCtrl.cpp b/src/mpc-hc/VolumeCtrl.cpp
index bd41188ed..f2365c4e4 100644
--- a/src/mpc-hc/VolumeCtrl.cpp
+++ b/src/mpc-hc/VolumeCtrl.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -79,6 +79,7 @@ BEGIN_MESSAGE_MAP(CVolumeCtrl, CSliderCtrl)
ON_WM_HSCROLL_REFLECT()
ON_WM_SETCURSOR()
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify)
+ ON_WM_MOUSEWHEEL()
END_MESSAGE_MAP()
// CVolumeCtrl message handlers
@@ -210,3 +211,15 @@ BOOL CVolumeCtrl::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult)
return TRUE;
}
+
+BOOL CVolumeCtrl::OnMouseWheel(UINT nFlags, short zDelta, CPoint point)
+{
+ if (zDelta > 0) {
+ IncreaseVolume();
+ } else if (zDelta < 0) {
+ DecreaseVolume();
+ } else {
+ return FALSE;
+ }
+ return TRUE;
+}
diff --git a/src/mpc-hc/VolumeCtrl.h b/src/mpc-hc/VolumeCtrl.h
index 7584d4404..e8230bc0d 100644
--- a/src/mpc-hc/VolumeCtrl.h
+++ b/src/mpc-hc/VolumeCtrl.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2012 see Authors.txt
+ * (C) 2006-2012, 2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -49,4 +49,5 @@ public:
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnSetFocus(CWnd* pOldWnd);
afx_msg void HScroll(UINT nSBCode, UINT nPos);
+ afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint point);
};
diff --git a/src/mpc-hc/WebClientSocket.cpp b/src/mpc-hc/WebClientSocket.cpp
index d5c6a6718..fa0480fcf 100644
--- a/src/mpc-hc/WebClientSocket.cpp
+++ b/src/mpc-hc/WebClientSocket.cpp
@@ -100,10 +100,10 @@ void CWebClientSocket::HandleRequest()
{
// remember new cookies
- CStringA value;
- if (m_hdrlines.Lookup("cookie", value)) {
+ CStringA cookie;
+ if (m_hdrlines.Lookup("cookie", cookie)) {
CAtlList<CStringA> sl;
- Explode(value, sl, ';');
+ Explode(cookie, sl, ';');
POSITION pos = sl.GetHeadPosition();
while (pos) {
CAtlList<CStringA> sl2;
@@ -190,16 +190,16 @@ void CWebClientSocket::HandleRequest()
reshdr += "Set-Cookie: " + key + "=" + TToA(value);
POSITION pos2 = m_cookieattribs.GetStartPosition();
while (pos2) {
- cookie_attribs value;
- m_cookieattribs.GetNextAssoc(pos2, key, value);
- if (!value.path.IsEmpty()) {
- reshdr += "; path=" + value.path;
+ cookie_attribs attribs;
+ m_cookieattribs.GetNextAssoc(pos2, key, attribs);
+ if (!attribs.path.IsEmpty()) {
+ reshdr += "; path=" + attribs.path;
}
- if (!value.expire.IsEmpty()) {
- reshdr += "; expire=" + value.expire;
+ if (!attribs.expire.IsEmpty()) {
+ reshdr += "; expire=" + attribs.expire;
}
- if (!value.domain.IsEmpty()) {
- reshdr += "; domain=" + value.domain;
+ if (!attribs.domain.IsEmpty()) {
+ reshdr += "; domain=" + attribs.domain;
}
}
reshdr += "\r\n";
@@ -324,7 +324,7 @@ void CWebClientSocket::OnReceive(int nErrorCode)
}
headerEnd += 4;
- m_buffLen = max(int(m_buff + m_buffLen - headerEnd), 0);
+ m_buffLen = std::max(int(m_buff + m_buffLen - headerEnd), 0);
if (m_buffLen > 0) {
memcpy(m_buff, headerEnd, m_buffLen + 1);
if (m_buffLen >= m_dataLen) {
@@ -398,7 +398,7 @@ bool CWebClientSocket::OnCommand(CStringA& hdr, CStringA& body, CStringA& mime)
}
} else if (arg == CMD_SETVOLUME && m_request.Lookup("volume", arg)) {
int volume = _tcstol(arg, nullptr, 10);
- m_pMainFrame->m_wndToolBar.Volume = min(max(volume, 0), 100);
+ m_pMainFrame->m_wndToolBar.Volume = std::min(std::max(volume, 0), 100);
m_pMainFrame->OnPlayVolume(0);
}
}
@@ -490,7 +490,7 @@ bool CWebClientSocket::OnBrowser(CStringA& hdr, CStringA& body, CStringA& mime)
*(DWORD*)p = (DWORD)cmdln.GetCount();
p += sizeof(DWORD);
- POSITION pos = cmdln.GetHeadPosition();
+ pos = cmdln.GetHeadPosition();
while (pos) {
CString& str = cmdln.GetNext(pos);
len = (str.GetLength() + 1) * sizeof(TCHAR);
@@ -800,6 +800,12 @@ bool CWebClientSocket::OnError404(CStringA& hdr, CStringA& body, CStringA& mime)
bool CWebClientSocket::OnPlayer(CStringA& hdr, CStringA& body, CStringA& mime)
{
m_pWebServer->LoadPage(IDR_HTML_PLAYER, body, AToT(m_path));
+ if (AfxGetAppSettings().bWebUIEnablePreview) {
+ body.Replace("[preview]",
+ "<img src=\"snapshot.jpg\" id=\"snapshot\" alt=\"snapshot\" onload=\"onLoadSnapshot()\" onabort=\"onAbortErrorSnapshot()\" onerror=\"onAbortErrorSnapshot()\">");
+ } else {
+ body.Replace("[preview]", UTF8(ResStr(IDS_WEBUI_DISABLED_PREVIEW_MSG)));
+ }
return true;
}
@@ -807,11 +813,14 @@ bool CWebClientSocket::OnSnapshotJpeg(CStringA& hdr, CStringA& body, CStringA& m
{
// TODO: add quality control and return logo when nothing is loaded
- bool fRet = false;
+ bool bRet = false;
BYTE* pData = nullptr;
long size = 0;
- if (m_pMainFrame->GetDIB(&pData, size, true)) {
+ if (!AfxGetAppSettings().bWebUIEnablePreview) {
+ hdr = "HTTP/1.0 403 Forbidden\r\n";
+ bRet = true;
+ } else if (m_pMainFrame->GetDIB(&pData, size, true)) {
PBITMAPINFO bi = reinterpret_cast<PBITMAPINFO>(pData);
PBITMAPINFOHEADER bih = &bi->bmiHeader;
@@ -863,11 +872,11 @@ bool CWebClientSocket::OnSnapshotJpeg(CStringA& hdr, CStringA& body, CStringA& m
"Pragma: no-cache\r\n";
body = CStringA((char*)ba.GetData(), (int)ba.GetCount());
mime = "image/jpeg";
- fRet = true;
+ bRet = true;
}
}
- return fRet;
+ return bRet;
}
bool CWebClientSocket::OnViewRes(CStringA& hdr, CStringA& body, CStringA& mime)
diff --git a/src/mpc-hc/WebServer.cpp b/src/mpc-hc/WebServer.cpp
index 9cd51e007..1464f37cb 100644
--- a/src/mpc-hc/WebServer.cpp
+++ b/src/mpc-hc/WebServer.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -671,7 +671,7 @@ bool CWebServer::CallCGI(CWebClientSocket* pClient, CStringA& hdr, CStringA& bod
int i = 0, len = pClient->m_data.GetLength();
for (; i < len; i += dwWritten) {
- if (!WriteFile(hChildStdinWrDup, (LPCSTR)pClient->m_data + i, min(len - i, BUFFSIZE), &dwWritten, nullptr)) {
+ if (!WriteFile(hChildStdinWrDup, (LPCSTR)pClient->m_data + i, std::min(len - i, BUFFSIZE), &dwWritten, nullptr)) {
break;
}
}
diff --git a/src/mpc-hc/mpc-hc.rc b/src/mpc-hc/mpc-hc.rc
index 60f4d10a5..66cfe7ce8 100644
--- a/src/mpc-hc/mpc-hc.rc
+++ b/src/mpc-hc/mpc-hc.rc
@@ -319,7 +319,6 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,185,276,8
CONTROL "Report pins which fail to render",IDC_CHECK6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,197,276,8
CONTROL "Auto-load audio files",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,209,276,8
- CONTROL "Use the built-in subtitle renderer",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,221,276,8
GROUPBOX "Control",IDC_STATIC,5,55,126,46
LTEXT "Volume step:",IDC_STATIC,11,67,68,8
EDITTEXT IDC_VOLUMESTEP,81,64,35,14,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER
@@ -421,7 +420,8 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,78,286,8
CONTROL "Prevent minimizing the player when in fullscreen on a non default monitor",IDC_CHECK6,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,90,290,8
- CONTROL "Use Windows 7 Taskbar features",IDC_CHECK_WIN7,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,102,286,8
+ CONTROL "Use enhanced taskbar features",IDC_CHECK_ENHANCED_TASKBAR,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,102,286,8
CONTROL "Open previous/next file in folder on ""Skip back/forward"" when there is only one item in playlist",IDC_CHECK7,
"Button",BS_AUTOCHECKBOX | BS_VCENTER | BS_MULTILINE | WS_TABSTOP,5,125,290,18
CONTROL "Show time tooltip:",IDC_CHECK8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,149,135,8
@@ -439,7 +439,7 @@ IDD_PPAGEEXTERNALFILTERS DIALOGEX 0, 0, 296, 241
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- LISTBOX IDC_LIST1,5,5,208,128,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_WANTKEYBOARDINPUT | WS_VSCROLL | WS_TABSTOP
+ CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,5,5,208,128
PUSHBUTTON "Add Filter...",IDC_BUTTON1,221,5,70,14
PUSHBUTTON "Remove",IDC_BUTTON2,221,21,70,14
CONTROL "Prefer",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | WS_GROUP,221,39,70,8
@@ -732,9 +732,9 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "If you would like to use the stand-alone versions of these filters or another replacement, disable them here.",IDC_STATIC,5,5,285,18
GROUPBOX "Source Filters",IDC_STATIC,5,24,141,186
- LISTBOX IDC_LIST1,10,36,131,168,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+ CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,10,36,131,168
GROUPBOX "Transform Filters",IDC_STATIC,150,24,141,186
- LISTBOX IDC_LIST2,155,36,131,168,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+ CONTROL "",IDC_LIST2,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,155,36,131,168
GROUPBOX "Internal LAV Filters settings",IDC_STATIC,5,212,286,28
PUSHBUTTON "Splitter",IDC_SPLITTER_CONF,10,222,86,14
PUSHBUTTON "Video decoder",IDC_VIDEO_DEC_CONF,105,222,86,14
@@ -760,46 +760,47 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
GROUPBOX "DirectShow Video",IDC_STATIC,5,5,285,43
COMBOBOX IDC_VIDRND_COMBO,10,16,276,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- GROUPBOX "RealMedia Video",IDC_STATIC,5,52,139,40
- COMBOBOX IDC_RMRND_COMBO,10,62,131,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- GROUPBOX "QuickTime Video",IDC_STATIC,151,52,139,40
- COMBOBOX IDC_QTRND_COMBO,155,62,131,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- GROUPBOX "Audio Renderer",IDC_STATIC,5,96,285,30
- COMBOBOX IDC_AUDRND_COMBO,10,108,276,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- GROUPBOX "VMR-7/VMR-9 (renderless) and EVR (CP) settings",IDC_STATIC,5,131,285,91
- RTEXT "Surface:",IDC_STATIC,118,164,60,8
- COMBOBOX IDC_DX_SURFACE,181,161,105,49,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- RTEXT "Resizer:",IDC_STATIC,118,180,60,8
- COMBOBOX IDC_DX9RESIZER_COMBO,181,179,105,49,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "Select D3D9 Render Device",IDC_D3D9DEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,144,137,10
- COMBOBOX IDC_D3D9DEVICE_COMBO,147,143,139,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "RealMedia Video",IDC_STATIC,5,49,139,40
+ COMBOBOX IDC_RMRND_COMBO,10,59,131,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "QuickTime Video",IDC_STATIC,151,49,139,40
+ COMBOBOX IDC_QTRND_COMBO,155,59,131,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "Audio Renderer",IDC_STATIC,5,90,285,30
+ COMBOBOX IDC_AUDRND_COMBO,10,102,276,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "VMR-7/VMR-9 (renderless) and EVR (CP) settings",IDC_STATIC,5,153,285,83
+ RTEXT "Surface:",IDC_STATIC,118,184,60,8
+ COMBOBOX IDC_DX_SURFACE,181,181,105,49,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Resizer:",IDC_STATIC,118,200,60,8
+ COMBOBOX IDC_DX9RESIZER_COMBO,181,197,105,49,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Select D3D9 Render Device",IDC_D3D9DEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,166,137,10
+ COMBOBOX IDC_D3D9DEVICE_COMBO,147,165,139,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Reinitialize when changing display",IDC_RESETDEVICE,
- "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,10,204,171,10
- CONTROL "D3D Fullscreen",IDC_FULLSCREEN_MONITOR_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,192,171,10
- CONTROL "Alternative VSync",IDC_DSVMR9ALTERNATIVEVSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,180,108,10
- CONTROL "VMR-9 Mixer Mode",IDC_DSVMR9LOADMIXER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,156,108,10
- CONTROL "YUV Mixing",IDC_DSVMR9YUVMIXER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,168,108,10
- RTEXT "EVR Buffers:",IDC_EVR_BUFFERS_TXT,168,199,81,8
- COMBOBOX IDC_EVR_BUFFERS,252,196,34,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,10,221,171,10
+ CONTROL "D3D Fullscreen",IDC_FULLSCREEN_MONITOR_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,210,171,10
+ CONTROL "Alternative VSync",IDC_DSVMR9ALTERNATIVEVSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,199,108,10
+ CONTROL "VMR-9 Mixer Mode",IDC_DSVMR9LOADMIXER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,177,108,10
+ CONTROL "YUV Mixing",IDC_DSVMR9YUVMIXER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,188,108,10
+ RTEXT "EVR Buffers:",IDC_EVR_BUFFERS_TXT,168,216,81,8
+ COMBOBOX IDC_EVR_BUFFERS,252,213,34,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "DXVA",IDC_STATIC,24,34,30,8
- ICON "",IDC_VIDRND_DXVA_SUPPORT,10,33,21,20
- LTEXT "Subtitles *",IDC_STATIC,69,34,45,8
- ICON "",IDC_VIDRND_SUBTITLE_SUPPORT,54,33,21,20
+ ICON "",IDC_VIDRND_DXVA_SUPPORT,10,33,20,20
+ LTEXT "Subtitles",IDC_STATIC,69,34,45,8
+ ICON "",IDC_VIDRND_SUBTITLE_SUPPORT,54,33,20,20
LTEXT "Screenshot",IDC_STATIC,129,34,45,8
- ICON "",IDC_VIDRND_SAVEIMAGE_SUPPORT,114,33,21,20
+ ICON "",IDC_VIDRND_SAVEIMAGE_SUPPORT,114,33,20,20
LTEXT "Shaders",IDC_STATIC,189,34,35,8
- ICON "",IDC_VIDRND_SHADER_SUPPORT,174,33,21,20
+ ICON "",IDC_VIDRND_SHADER_SUPPORT,174,33,20,20
LTEXT "Rotation",IDC_STATIC,240,34,45,8
- ICON "",IDC_VIDRND_ROTATION_SUPPORT,225,33,21,20
- LTEXT "Subtitles *",IDC_STATIC,24,79,50,8
- ICON "",IDC_RMRND_SUBTITLE_SUPPORT,10,78,21,20
- LTEXT "Screenshot",IDC_STATIC,88,79,50,8
- ICON "",IDC_RMRND_SAVEIMAGE_SUPPORT,74,78,21,20
- LTEXT "Subtitles *",IDC_STATIC,170,79,50,8
- ICON "",IDC_QTRND_SUBTITLE_SUPPORT,155,78,21,20
- LTEXT "Screenshot",IDC_STATIC,235,79,50,8
- ICON "",IDC_QTRND_SAVEIMAGE_SUPPORT,221,78,21,20
- LTEXT "* External filters (such as VSFilter) can display subtitles on all renderers.",IDC_STATIC,10,224,276,16
+ ICON "",IDC_VIDRND_ROTATION_SUPPORT,225,33,20,20
+ LTEXT "Subtitles",IDC_STATIC,24,76,50,8
+ ICON "",IDC_RMRND_SUBTITLE_SUPPORT,10,75,20,20
+ LTEXT "Screenshot",IDC_STATIC,88,76,50,8
+ ICON "",IDC_RMRND_SAVEIMAGE_SUPPORT,74,75,20,20
+ LTEXT "Subtitles",IDC_STATIC,170,76,50,8
+ ICON "",IDC_QTRND_SUBTITLE_SUPPORT,155,75,20,20
+ LTEXT "Screenshot",IDC_STATIC,235,76,50,8
+ ICON "",IDC_QTRND_SAVEIMAGE_SUPPORT,221,75,20,20
+ GROUPBOX "Subtitle Renderer",IDC_STATIC,5,121,285,30
+ COMBOBOX IDC_COMBO1,10,133,276,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
END
IDD_PPAGEWEBSERVER DIALOGEX 0, 0, 296, 241
@@ -812,16 +813,17 @@ BEGIN
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,5,22,284,1
CONTROL "Enable compression",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,26,285,8
CONTROL "Allow access from localhost only",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,38,285,8
- CONTROL "Print debug information",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,50,285,8
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,5,62,284,1
- CONTROL "Serve pages from:",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,66,285,8
- EDITTEXT IDC_EDIT2,15,78,167,14,ES_AUTOHSCROLL
- PUSHBUTTON "Browse...",IDC_BUTTON1,186,78,50,14
- PUSHBUTTON "Deploy...",IDC_BUTTON2,240,78,50,14
- LTEXT "Default page:",IDC_STATIC,5,96,285,8
- EDITTEXT IDC_EDIT9,15,108,275,14,ES_AUTOHSCROLL
- LTEXT "CGI handlers: (.ext1=path1;.ext2=path2;...)",IDC_STATIC,5,126,285,8
- EDITTEXT IDC_EDIT3,15,138,275,14,ES_AUTOHSCROLL
+ CONTROL "Enable preview",IDC_CHECK6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,50,285,8
+ CONTROL "Print debug information",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,62,284,8
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,5,74,284,1
+ CONTROL "Serve pages from:",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,78,285,8
+ EDITTEXT IDC_EDIT2,15,90,167,14,ES_AUTOHSCROLL
+ PUSHBUTTON "Browse...",IDC_BUTTON1,186,90,50,14
+ PUSHBUTTON "Deploy...",IDC_BUTTON2,240,90,50,14
+ LTEXT "Default page:",IDC_STATIC,5,108,285,8
+ EDITTEXT IDC_EDIT9,15,120,275,14,ES_AUTOHSCROLL
+ LTEXT "CGI handlers: (.ext1=path1;.ext2=path2;...)",IDC_STATIC,5,138,285,8
+ EDITTEXT IDC_EDIT3,15,150,275,14,ES_AUTOHSCROLL
END
IDD_SUBTITLEDL_DLG DIALOGEX 0, 0, 500, 200
@@ -1085,6 +1087,30 @@ BEGIN
PUSHBUTTON "Default",IDC_BUTTON1,232,218,54,13
END
+IDD_PPAGEAUDIORENDERER DIALOGEX 0, 0, 296, 241
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ GROUPBOX "Device",IDC_STATIC,7,7,282,54
+ COMBOBOX IDC_COMBO1,20,20,262,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Exclusive mode",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,40,41,105,10
+ CONTROL "Allow bitstreaming",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,41,125,10
+ GROUPBOX "Options",IDC_STATIC,7,67,282,69
+ GROUPBOX "",IDC_STATIC,13,76,269,52
+ CONTROL "Enable stereo crossfeed (for headphones)",IDC_CHECK3,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,86,260,10
+ PUSHBUTTON "C. Moy",IDC_BUTTON1,20,103,54,14
+ PUSHBUTTON "J. Meier",IDC_BUTTON2,79,103,56,14
+ LTEXT "Cut-off:",IDC_STATIC1,157,97,47,8,0,WS_EX_RIGHT
+ CONTROL "",IDC_SLIDER1,"msctls_trackbar32",TBS_NOTICKS | WS_TABSTOP,208,96,42,12
+ LTEXT "",IDC_STATIC2,250,97,30,8
+ LTEXT "Level:",IDC_STATIC3,157,113,47,8,0,WS_EX_RIGHT
+ CONTROL "",IDC_SLIDER2,"msctls_trackbar32",TBS_NOTICKS | WS_TABSTOP,208,111,42,12
+ LTEXT "",IDC_STATIC4,250,113,30,8
+ GROUPBOX "Note",IDC_STATIC,7,141,282,48
+ LTEXT "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content.",IDC_STATIC,20,152,262,33
+END
+
IDD_SAVEIMAGEDIALOGTEMPL DIALOGEX 0, 0, 304, 20
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -1106,16 +1132,21 @@ END
IDD_CRASH_REPORTER DIALOGEX 0, 0, 300, 240
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_TOPMOST
CAPTION "Crash reporter"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- LTEXT "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want.",IDC_STATIC1,5,5,290,35
- LTEXT "Email:",IDC_STATIC2,5,45,290,8
- EDITTEXT IDC_EDIT1,5,57,290,13,ES_AUTOHSCROLL
- LTEXT "Your email address is optional and will only be used if the developers need to contact you for more information.",IDC_STATIC3,5,72,290,16
- LTEXT "Problem description (use English only):",IDC_STATIC4,5,92,290,8
- EDITTEXT IDC_EDIT2,5,105,290,112,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
- DEFPUSHBUTTON "OK",IDOK,245,220,50,14
+ LTEXT "We are sorry, it seems MPC-HC just crashed. :(",IDC_STATIC,5,5,290,8
+ CONTROL "Send a bug report to help us diagnose and fix the problem.",IDC_CHECK1,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,19,290,8
+ GROUPBOX "Optional information",IDC_STATIC1,5,33,290,182
+ LTEXT "Email:",IDC_STATIC2,10,45,280,8
+ EDITTEXT IDC_EDIT1,10,57,280,13,ES_AUTOHSCROLL
+ LTEXT "Your email address is optional and will only be used if the developers need to contact you for more information.",IDC_STATIC3,10,71,280,16
+ LTEXT "Problem description (use English only):",IDC_STATIC4,10,93,280,8
+ EDITTEXT IDC_EDIT2,10,105,280,104,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
+ DEFPUSHBUTTON "Restart MPC-HC",IDC_BUTTON1,45,220,120,14
+ PUSHBUTTON "Quit MPC-HC",IDC_BUTTON2,175,220,120,14
END
@@ -1285,6 +1316,24 @@ BEGIN
HORZGUIDE, 231
END
+ IDD_PPAGEAUDIORENDERER, DIALOG
+ BEGIN
+ VERTGUIDE, 7
+ VERTGUIDE, 13
+ VERTGUIDE, 20
+ VERTGUIDE, 154
+ VERTGUIDE, 157
+ VERTGUIDE, 204
+ VERTGUIDE, 208
+ VERTGUIDE, 250
+ VERTGUIDE, 280
+ VERTGUIDE, 282
+ VERTGUIDE, 289
+ HORZGUIDE, 46
+ HORZGUIDE, 67
+ HORZGUIDE, 136
+ END
+
IDD_CMD_LINE_HELP, DIALOG
BEGIN
LEFTMARGIN, 7
@@ -2237,8 +2286,8 @@ BEGIN
IDS_SUBRESYNC_CLN_EFFECT "Effect"
IDS_PLAYLIST_CAPTION "Playlist"
IDS_PPAGE_FS_CLN_ON_OFF "On/Off"
- IDS_PPAGE_FS_CLN_FROM_FPS "From FPS"
- IDS_PPAGE_FS_CLN_TO_FPS "To FPS"
+ IDS_PPAGE_FS_CLN_FROM_FPS "From (FPS)"
+ IDS_PPAGE_FS_CLN_TO_FPS "To (FPS)"
IDS_PPAGE_FS_CLN_DISPLAY_MODE "Display mode (Hz)"
IDS_PPAGE_FS_DEFAULT "Default"
IDS_PPAGE_FS_OTHER "Other"
@@ -2291,6 +2340,17 @@ END
STRINGTABLE
BEGIN
+ IDD_FILEPROPRES "Resources"
+ IDD_PPAGEMISC "Miscellaneous"
+ IDD_FILEMEDIAINFO "MediaInfo"
+ IDD_PPAGECAPTURE "Playback::Capture"
+ IDD_PPAGESYNC "Playback::Sync Renderer Settings"
+ IDD_PPAGEFULLSCREEN "Playback::Fullscreen"
+ IDD_PPAGEAUDIORENDERER "Internal Filters::Audio Renderer"
+END
+
+STRINGTABLE
+BEGIN
IDS_AUDIOSWITCHER "Audio Switcher"
IDS_ICONS_REASSOC_DLG_TITLE "New version of the icon library"
IDS_ICONS_REASSOC_DLG_INSTR "Do you want to reassociate the icons?"
@@ -2323,16 +2383,6 @@ END
STRINGTABLE
BEGIN
- IDD_FILEPROPRES "Resources"
- IDD_PPAGEMISC "Miscellaneous"
- IDD_FILEMEDIAINFO "MediaInfo"
- IDD_PPAGECAPTURE "Playback::Capture"
- IDD_PPAGESYNC "Playback::Sync Renderer Settings"
- IDD_PPAGEFULLSCREEN "Playback::Fullscreen"
-END
-
-STRINGTABLE
-BEGIN
IDD_FILEPROPDETAILS "Details"
IDD_FILEPROPCLIP "Clip"
END
@@ -2368,14 +2418,7 @@ END
STRINGTABLE
BEGIN
- IDC_AUDRND_COMBO "MPC Audio Renderer is broken, do not use."
-END
-
-STRINGTABLE
-BEGIN
IDS_PPAGE_OUTPUT_SYNC "Sync Renderer"
- IDS_MPC_BUG_REPORT_TITLE "MPC-HC - Reporting a bug"
- IDS_MPC_BUG_REPORT "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
IDS_PPAGE_OUTPUT_SURF_OFFSCREEN "Regular offscreen plain surface"
IDS_PPAGE_OUTPUT_SURF_2D "2D surfaces"
IDS_PPAGE_OUTPUT_SURF_3D "3D surfaces (recommended)"
@@ -2393,7 +2436,7 @@ END
STRINGTABLE
BEGIN
- IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND "MPC-HC Audio Renderer"
+ IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND "Internal Audio Renderer"
IDS_EMB_RESOURCES_VIEWER_NAME "Name"
IDS_EMB_RESOURCES_VIEWER_TYPE "MIME Type"
IDS_EMB_RESOURCES_VIEWER_INFO
@@ -2659,6 +2702,13 @@ BEGIN
IDS_TIMER_HIGH_PRECISION "High precision"
IDS_AFTERPLAYBACK_REWIND "After Playback: Rewind current file"
IDS_AFTERPLAYBACK_CLOSE "After Playback: Close"
+ IDS_FRAME_INIT_FAILED "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+ IDS_TIME_SHIFT_TOOLTIP "Enter a positive value if the audio is early, a negative value if it is late."
+ IDS_WEBUI_DISABLED_PREVIEW_MSG
+ "Preview is currently disabled. You can enable it in MPC-HC's options."
+ IDS_WEBUI_PREVIEW_WARNING
+ "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+ IDS_SUBTITLE_RENDERER_INTERNAL "Internal Subtitle Renderer"
END
STRINGTABLE
@@ -2755,6 +2805,8 @@ BEGIN
IDS_MPLAYERC_103 "Shift Subtitle Right"
IDS_AG_SEEKSET "Jump to Beginning"
IDS_OSD_SHOW_FILENAME "OSD: Show File Name"
+ IDS_PLAY_DVD "Play DVD"
+ IDS_PLAY_BD "Play BD"
END
STRINGTABLE
@@ -2846,26 +2898,22 @@ BEGIN
IDS_MPLAYERC_78 "Player Menu (full)"
IDS_AG_FILTERS_MENU "Filters Menu"
IDS_AG_OPTIONS "Options"
- IDS_AG_NEXT_AUDIO "Next Audio"
- IDS_AG_PREV_AUDIO "Prev Audio"
+ IDS_AG_NEXT_AUDIO "Next Audio Track"
+ IDS_AG_PREV_AUDIO "Prev Audio Track"
END
STRINGTABLE
BEGIN
- IDS_AG_NEXT_SUBTITLE "Next Subtitle"
- IDS_AG_PREV_SUBTITLE "Prev Subtitle"
+ IDS_AG_NEXT_SUBTITLE "Next Subtitle Track"
+ IDS_AG_PREV_SUBTITLE "Prev Subtitle Track"
IDS_MPLAYERC_85 "On/Off Subtitle"
IDS_MPLAYERC_86 "Reload Subtitles"
- IDS_MPLAYERC_87 "Next Audio (OGM)"
- IDS_MPLAYERC_88 "Prev Audio (OGM)"
- IDS_MPLAYERC_89 "Next Subtitle (OGM)"
- IDS_MPLAYERC_90 "Prev Subtitle (OGM)"
IDS_MPLAYERC_91 "Next Angle (DVD)"
IDS_MPLAYERC_92 "Prev Angle (DVD)"
- IDS_MPLAYERC_93 "Next Audio (DVD)"
- IDS_MPLAYERC_94 "Prev Audio (DVD)"
- IDS_MPLAYERC_95 "Next Subtitle (DVD)"
- IDS_MPLAYERC_96 "Prev Subtitle (DVD)"
+ IDS_MPLAYERC_93 "Next Audio Track (DVD)"
+ IDS_MPLAYERC_94 "Prev Audio Track (DVD)"
+ IDS_MPLAYERC_95 "Next Subtitle Track (DVD)"
+ IDS_MPLAYERC_96 "Prev Subtitle Track (DVD)"
IDS_MPLAYERC_97 "On/Off Subtitle (DVD)"
IDS_OSD_DISPLAY_CURRENT_TIME "OSD: Display Current Time"
END
@@ -3002,8 +3050,6 @@ BEGIN
IDS_BOOST_OSD "Boost: +%u%%"
IDS_BALANCE_OSD "Balance: %s"
IDS_FULLSCREENMONITOR_CURRENT "Current"
- IDS_MPC_CRASH "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file ""%s"" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
- IDS_MPC_MINIDUMP_FAIL "Failed to create dump file to ""%s"" (error %u)"
IDS_MAINFRM_DIR_TITLE "Select Directory"
IDS_MAINFRM_DIR_CHECK "Include subdirectories"
IDS_AG_PAUSE "Pause"
@@ -3059,7 +3105,7 @@ BEGIN
IDS_VOLUME_BOOST_DEC "Volume boost decrease"
IDS_VOLUME_BOOST_MIN "Volume boost Min"
IDS_VOLUME_BOOST_MAX "Volume boost Max"
- IDS_USAGE "Usage: mpc-hc.exe ""pathname"" [switches]\n\n""pathname""\tThe main file or directory to be loaded (wildcards\n\t\tallowed, ""-"" denotes standard input)\n/dub ""dubname""\tLoad an additional audio file\n/dubdelay ""file""\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains ""...DELAY XXms..."")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub ""subname""\tLoad an additional subtitle file\n/filter ""filtername""\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, ""pathname"" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t""pathname"" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd ""pathname"" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at ""ms"" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see ""Output"" settings)\n/shaderpreset ""Pr""\tStart using ""Pr"" shader preset\n/pns ""name""\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave ""hWnd""\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+ IDS_USAGE "Usage: mpc-hc.exe ""pathname"" [switches]\n\n""pathname""\tThe main file or directory to be loaded (wildcards\n\t\tallowed, ""-"" denotes standard input)\n/dub ""dubname""\tLoad an additional audio file\n/dubdelay ""file""\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains ""...DELAY XXms..."")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub ""subname""\tLoad an additional subtitle file\n/filter ""filtername""\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, ""pathname"" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t""pathname"" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd ""pathname"" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at ""ms"" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see ""Output"" settings)\n/shaderpreset ""Pr""\tStart using ""Pr"" shader preset\n/pns ""name""\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave ""hWnd""\tUse MPC-HC as slave\n/hwgpu ""index""\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
IDS_UNKNOWN_SWITCH "Unrecognized switch(es) found in command line string: \n\n"
END
@@ -3246,13 +3292,6 @@ END
STRINGTABLE
BEGIN
- IDS_ARS_WASAPI_MODE "Use WASAPI (restart playback)"
- IDS_ARS_MUTE_FAST_FORWARD "Mute on fast forward"
- IDS_ARS_SOUND_DEVICE "Sound Device:"
-END
-
-STRINGTABLE
-BEGIN
IDS_OSD_RS_VSYNC_ON "VSync: On"
IDS_OSD_RS_VSYNC_OFF "VSync: Off"
IDS_OSD_RS_ACCURATE_VSYNC_ON "Accurate VSync: On"
@@ -3451,6 +3490,12 @@ BEGIN
IDS_FILTER_SETTINGS_CAPTION "Settings"
END
+STRINGTABLE
+BEGIN
+ IDS_SUBTITLE_RENDERER_VS_FILTER "VSFilter / DirectVobSub"
+ IDS_SUBTITLE_RENDERER_XY_SUB_FILTER "XySubFilter"
+END
+
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/src/mpc-hc/mpc-hc.vcxproj b/src/mpc-hc/mpc-hc.vcxproj
index 6786bbddb..e03f68c3c 100644
--- a/src/mpc-hc/mpc-hc.vcxproj
+++ b/src/mpc-hc/mpc-hc.vcxproj
@@ -133,11 +133,8 @@
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release Lite|x64'">$(ProjectName)64</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <PreBuildEvent>
- <Command>..\..\update_version.bat</Command>
- </PreBuildEvent>
<ClCompile>
- <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;..\thirdparty\MediaInfo;..\thirdparty\ZenLib;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;..\thirdparty\MediaInfo\library\Source;..\thirdparty\ZenLib\library\Source;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -151,21 +148,19 @@
</Link>
<Manifest>
<AdditionalManifestFiles>$(ProjectDir)res\mpc-hc.exe.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
+ <EnableDpiAwareness>false</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lite|Win32'">
- <PreBuildEvent>
- <Command>..\..\update_version.bat</Command>
- </PreBuildEvent>
<ClCompile>
- <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;..\thirdparty\MediaInfo\library\Source;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>MPCHC_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>AudioSwitcher.lib;BaseClasses.lib;BaseMuxer.lib;BufferFilter.lib;CmdUI.lib;DeCSS.lib;DSMMuxer.lib;DSUtil.lib;MathLibFix.lib;Filters.lib;kasumi.lib;LCDUI.lib;lcms2.lib;MatroskaMuxer.lib;MpcAudioRenderer.lib;ResizableLib.lib;sizecbar.lib;SoundTouch.lib;StreamDriveThru.lib;SubPic.lib;Subtitles.lib;SubtitleSource.lib;SyncClock.lib;system.lib;TreePropSheet.lib;unrar.lib;VideoRenderers.lib;WavDest.lib;zlib.lib;UxTheme.lib;delayimp.lib;dsound.lib;dxguid.lib;GdiPlus.lib;Psapi.lib;QTMLClient.lib;SetupAPI.lib;Vfw32.lib;Winmm.lib;d3d9.lib;mhook.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>AudioSwitcher.lib;BaseClasses.lib;BaseMuxer.lib;BufferFilter.lib;CmdUI.lib;DeCSS.lib;DSMMuxer.lib;DSUtil.lib;MathLibFix.lib;Filters.lib;kasumi.lib;LCDUI.lib;lcms2.lib;MatroskaMuxer.lib;ResizableLib.lib;sizecbar.lib;StreamDriveThru.lib;SubPic.lib;Subtitles.lib;SubtitleSource.lib;SyncClock.lib;system.lib;TreePropSheet.lib;unrar.lib;VideoRenderers.lib;WavDest.lib;zlib.lib;UxTheme.lib;delayimp.lib;dsound.lib;dxguid.lib;GdiPlus.lib;Psapi.lib;QTMLClient.lib;SetupAPI.lib;Vfw32.lib;Winmm.lib;d3d9.lib;mhook.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)bin\lib\Debug_$(Platform);$(SolutionDir)lib;$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<DelayLoadDLLs>d3d9.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<SupportUnloadOfDelayLoadedDLL>true</SupportUnloadOfDelayLoadedDLL>
@@ -176,14 +171,12 @@
</ProjectReference>
<Manifest>
<AdditionalManifestFiles>$(ProjectDir)res\mpc-hc.exe.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
+ <EnableDpiAwareness>false</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <PreBuildEvent>
- <Command>..\..\update_version.bat</Command>
- </PreBuildEvent>
<ClCompile>
- <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;..\thirdparty\MediaInfo;..\thirdparty\ZenLib;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;..\thirdparty\MediaInfo\library\Source;..\thirdparty\ZenLib\library\Source;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -196,21 +189,19 @@
</Link>
<Manifest>
<AdditionalManifestFiles>$(ProjectDir)res\mpc-hc.exe.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
+ <EnableDpiAwareness>false</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lite|x64'">
- <PreBuildEvent>
- <Command>..\..\update_version.bat</Command>
- </PreBuildEvent>
<ClCompile>
- <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;..\thirdparty\MediaInfo\library\Source;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>MPCHC_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>AudioSwitcher.lib;BaseClasses.lib;BaseMuxer.lib;BufferFilter.lib;CmdUI.lib;DeCSS.lib;DSMMuxer.lib;DSUtil.lib;MathLibFix.lib;Filters.lib;kasumi.lib;LCDUI.lib;lcms2.lib;MatroskaMuxer.lib;MpcAudioRenderer.lib;ResizableLib.lib;sizecbar.lib;SoundTouch.lib;StreamDriveThru.lib;SubPic.lib;Subtitles.lib;SubtitleSource.lib;SyncClock.lib;system.lib;TreePropSheet.lib;unrar.lib;VideoRenderers.lib;WavDest.lib;zlib.lib;UxTheme.lib;delayimp.lib;dsound.lib;dxguid.lib;GdiPlus.lib;Psapi.lib;SetupAPI.lib;strmiids.lib;Uuid.Lib;Version.lib;Vfw32.lib;Winmm.lib;d3d9.lib;mhook.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>AudioSwitcher.lib;BaseClasses.lib;BaseMuxer.lib;BufferFilter.lib;CmdUI.lib;DeCSS.lib;DSMMuxer.lib;DSUtil.lib;MathLibFix.lib;Filters.lib;kasumi.lib;LCDUI.lib;lcms2.lib;MatroskaMuxer.lib;ResizableLib.lib;sizecbar.lib;StreamDriveThru.lib;SubPic.lib;Subtitles.lib;SubtitleSource.lib;SyncClock.lib;system.lib;TreePropSheet.lib;unrar.lib;VideoRenderers.lib;WavDest.lib;zlib.lib;UxTheme.lib;delayimp.lib;dsound.lib;dxguid.lib;GdiPlus.lib;Psapi.lib;SetupAPI.lib;strmiids.lib;Uuid.Lib;Version.lib;Vfw32.lib;Winmm.lib;d3d9.lib;mhook.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)bin\lib\Debug_$(Platform);$(SolutionDir)lib64;$(DXSDK_DIR)Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<DelayLoadDLLs>d3d9.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<SupportUnloadOfDelayLoadedDLL>true</SupportUnloadOfDelayLoadedDLL>
@@ -220,14 +211,12 @@
</ProjectReference>
<Manifest>
<AdditionalManifestFiles>$(ProjectDir)res\mpc-hc.exe.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
+ <EnableDpiAwareness>false</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PreBuildEvent>
- <Command>..\..\update_version.bat</Command>
- </PreBuildEvent>
<ClCompile>
- <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;..\thirdparty\MediaInfo;..\thirdparty\ZenLib;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;..\thirdparty\MediaInfo\library\Source;..\thirdparty\ZenLib\library\Source;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -240,21 +229,19 @@
</Link>
<Manifest>
<AdditionalManifestFiles>$(ProjectDir)res\mpc-hc.exe.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
+ <EnableDpiAwareness>false</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lite|Win32'">
- <PreBuildEvent>
- <Command>..\..\update_version.bat</Command>
- </PreBuildEvent>
<ClCompile>
- <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;..\thirdparty\MediaInfo\library\Source;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>MPCHC_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>AudioSwitcher.lib;BaseClasses.lib;BaseMuxer.lib;BufferFilter.lib;CmdUI.lib;DeCSS.lib;DSMMuxer.lib;DSUtil.lib;MathLibFix.lib;Filters.lib;kasumi.lib;LCDUI.lib;lcms2.lib;MatroskaMuxer.lib;MpcAudioRenderer.lib;ResizableLib.lib;sizecbar.lib;SoundTouch.lib;StreamDriveThru.lib;SubPic.lib;Subtitles.lib;SubtitleSource.lib;SyncClock.lib;system.lib;TreePropSheet.lib;unrar.lib;VideoRenderers.lib;WavDest.lib;zlib.lib;UxTheme.lib;delayimp.lib;dsound.lib;dxguid.lib;GdiPlus.lib;Psapi.lib;QTMLClient.lib;SetupAPI.lib;Vfw32.lib;Winmm.lib;d3d9.lib;mhook.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>AudioSwitcher.lib;BaseClasses.lib;BaseMuxer.lib;BufferFilter.lib;CmdUI.lib;DeCSS.lib;DSMMuxer.lib;DSUtil.lib;MathLibFix.lib;Filters.lib;kasumi.lib;LCDUI.lib;lcms2.lib;MatroskaMuxer.lib;ResizableLib.lib;sizecbar.lib;StreamDriveThru.lib;SubPic.lib;Subtitles.lib;SubtitleSource.lib;SyncClock.lib;system.lib;TreePropSheet.lib;unrar.lib;VideoRenderers.lib;WavDest.lib;zlib.lib;UxTheme.lib;delayimp.lib;dsound.lib;dxguid.lib;GdiPlus.lib;Psapi.lib;QTMLClient.lib;SetupAPI.lib;Vfw32.lib;Winmm.lib;d3d9.lib;mhook.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)bin\lib\Release_$(Platform);$(SolutionDir)lib;$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<DelayLoadDLLs>d3d9.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<SupportUnloadOfDelayLoadedDLL>true</SupportUnloadOfDelayLoadedDLL>
@@ -264,14 +251,12 @@
</ProjectReference>
<Manifest>
<AdditionalManifestFiles>$(ProjectDir)res\mpc-hc.exe.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
+ <EnableDpiAwareness>false</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <PreBuildEvent>
- <Command>..\..\update_version.bat</Command>
- </PreBuildEvent>
<ClCompile>
- <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;..\thirdparty\MediaInfo;..\thirdparty\ZenLib;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;..\thirdparty\MediaInfo\library\Source;..\thirdparty\ZenLib\library\Source;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -284,21 +269,19 @@
</Link>
<Manifest>
<AdditionalManifestFiles>$(ProjectDir)res\mpc-hc.exe.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
+ <EnableDpiAwareness>false</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lite|x64'">
- <PreBuildEvent>
- <Command>..\..\update_version.bat</Command>
- </PreBuildEvent>
<ClCompile>
- <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\include;..\DSUtil;..\filters\renderer\VideoRenderers;..\thirdparty;..\thirdparty\MediaInfo\library\Source;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>MPCHC_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>AudioSwitcher.lib;BaseClasses.lib;BaseMuxer.lib;BufferFilter.lib;CmdUI.lib;DeCSS.lib;DSMMuxer.lib;DSUtil.lib;MathLibFix.lib;Filters.lib;kasumi.lib;LCDUI.lib;lcms2.lib;MatroskaMuxer.lib;MpcAudioRenderer.lib;ResizableLib.lib;sizecbar.lib;SoundTouch.lib;StreamDriveThru.lib;SubPic.lib;Subtitles.lib;SubtitleSource.lib;SyncClock.lib;system.lib;TreePropSheet.lib;unrar.lib;VideoRenderers.lib;WavDest.lib;zlib.lib;UxTheme.lib;delayimp.lib;dsound.lib;dxguid.lib;GdiPlus.lib;Psapi.lib;SetupAPI.lib;strmiids.lib;Uuid.Lib;Version.lib;Vfw32.lib;Winmm.lib;d3d9.lib;mhook.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>AudioSwitcher.lib;BaseClasses.lib;BaseMuxer.lib;BufferFilter.lib;CmdUI.lib;DeCSS.lib;DSMMuxer.lib;DSUtil.lib;MathLibFix.lib;Filters.lib;kasumi.lib;LCDUI.lib;lcms2.lib;MatroskaMuxer.lib;ResizableLib.lib;sizecbar.lib;StreamDriveThru.lib;SubPic.lib;Subtitles.lib;SubtitleSource.lib;SyncClock.lib;system.lib;TreePropSheet.lib;unrar.lib;VideoRenderers.lib;WavDest.lib;zlib.lib;UxTheme.lib;delayimp.lib;dsound.lib;dxguid.lib;GdiPlus.lib;Psapi.lib;SetupAPI.lib;strmiids.lib;Uuid.Lib;Version.lib;Vfw32.lib;Winmm.lib;d3d9.lib;mhook.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)bin\lib\Release_$(Platform);$(SolutionDir)lib64;$(DXSDK_DIR)Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<DelayLoadDLLs>d3d9.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<SupportUnloadOfDelayLoadedDLL>true</SupportUnloadOfDelayLoadedDLL>
@@ -308,6 +291,7 @@
</ProjectReference>
<Manifest>
<AdditionalManifestFiles>$(ProjectDir)res\mpc-hc.exe.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
+ <EnableDpiAwareness>false</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
@@ -322,10 +306,10 @@
<ClCompile Include="ComPropertySheet.cpp" />
<ClCompile Include="CoverArt.cpp" />
<ClCompile Include="CrashReporter.cpp" />
- <ClCompile Include="CrashReporterDialog.cpp" />
<ClCompile Include="CShockwaveFlash.cpp" />
<ClCompile Include="DebugShadersDlg.cpp" />
<ClCompile Include="DeinterlacerFilter.cpp" />
+ <ClCompile Include="DpiHelper.cpp" />
<ClCompile Include="DVBChannel.cpp" />
<ClCompile Include="EditListEditor.cpp" />
<ClCompile Include="EditWithButton.cpp" />
@@ -378,6 +362,7 @@
<ClCompile Include="PnSPresetsDlg.cpp" />
<ClCompile Include="PPageAccelTbl.cpp" />
<ClCompile Include="PPageAdvanced.cpp" />
+ <ClCompile Include="PPageAudioRenderer.cpp" />
<ClCompile Include="PPageAudioSwitcher.cpp" />
<ClCompile Include="PPageBase.cpp" />
<ClCompile Include="PPageCapture.cpp" />
@@ -451,10 +436,10 @@
<ClInclude Include="ComPropertySheet.h" />
<ClInclude Include="CoverArt.h" />
<ClInclude Include="CrashReporter.h" />
- <ClInclude Include="CrashReporterDialog.h" />
<ClInclude Include="CShockwaveFlash.h" />
<ClInclude Include="DebugShadersDlg.h" />
<ClInclude Include="DeinterlacerFilter.h" />
+ <ClInclude Include="DpiHelper.h" />
<ClInclude Include="DVBChannel.h" />
<ClInclude Include="EditListEditor.h" />
<ClInclude Include="EditWithButton.h" />
@@ -512,6 +497,7 @@
<ClInclude Include="PnSPresetsDlg.h" />
<ClInclude Include="PPageAccelTbl.h" />
<ClInclude Include="PPageAdvanced.h" />
+ <ClInclude Include="PPageAudioRenderer.h" />
<ClInclude Include="PPageAudioSwitcher.h" />
<ClInclude Include="PPageBase.h" />
<ClInclude Include="PPageCapture.h" />
@@ -729,9 +715,6 @@
<ProjectReference Include="..\filters\reader\VTSReader\VTSReader.vcxproj">
<Project>{664e726b-eeee-403a-ac15-345d9c9e1375}</Project>
</ProjectReference>
- <ProjectReference Include="..\filters\renderer\MpcAudioRenderer\MpcAudioRenderer.vcxproj">
- <Project>{d0620ef4-1313-40d5-9069-a82f6fe26994}</Project>
- </ProjectReference>
<ProjectReference Include="..\filters\renderer\SyncClock\SyncClock.vcxproj">
<Project>{0b63409d-674d-47f8-a84e-87dbb7783189}</Project>
</ProjectReference>
@@ -765,6 +748,14 @@
<ProjectReference Include="..\thirdparty\DoctorDump\DoctorDump.vcxproj">
<Project>{beceaff9-cdca-45ec-a1cf-658fa51818e6}</Project>
</ProjectReference>
+ <ProjectReference Include="..\thirdparty\bs2b\bs2b.vcxproj">
+ <Project>{0fd9bf8f-2397-4e23-b41e-e4624f35d646}</Project>
+ <Private>false</Private>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+ </ProjectReference>
<ProjectReference Include="..\thirdparty\LAVFilters\LAVFilters.vcxproj">
<Project>{ed257874-e12e-4143-af0a-0676da3bb18c}</Project>
</ProjectReference>
@@ -780,8 +771,29 @@
<ProjectReference Include="..\thirdparty\RARFileSource\RARFileSource.vcxproj">
<Project>{2b7f22d7-1750-47c5-8709-1a3688b62499}</Project>
</ProjectReference>
- <ProjectReference Include="..\thirdparty\SoundTouch\source\SoundTouch.vcxproj">
- <Project>{68a5dd20-7057-448b-8fe0-b6ac8d205509}</Project>
+ <ProjectReference Include="..\thirdparty\sanear\sanear\sanear.vcxproj">
+ <Project>{bb2b61af-734a-4dad-9326-07f4f9ea088f}</Project>
+ <Private>false</Private>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+ </ProjectReference>
+ <ProjectReference Include="..\thirdparty\SoundTouch\SoundTouch.vcxproj">
+ <Project>{4c7a1953-cbc4-42d5-a12f-bb512c64b547}</Project>
+ <Private>false</Private>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+ </ProjectReference>
+ <ProjectReference Include="..\thirdparty\soxr\soxr.vcxproj">
+ <Project>{7cbde5a1-9cbb-4139-93f5-09d8dba4427f}</Project>
+ <Private>false</Private>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\thirdparty\unrar\unrar.vcxproj">
<Project>{da8461c4-7683-4360-9372-2a9e0f1795c2}</Project>
@@ -795,6 +807,14 @@
<ProjectReference Include="..\thirdparty\ZenLib\ZenLib.vcxproj">
<Project>{0da1da7d-f393-4e7c-a7ce-cb5c6a67bc94}</Project>
</ProjectReference>
+ <ProjectReference Include="..\thirdparty\zita-resampler\zita-resampler.vcxproj">
+ <Project>{f3d02050-f39a-4103-8343-09285359a495}</Project>
+ <Private>false</Private>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+ </ProjectReference>
<ProjectReference Include="..\thirdparty\zlib\zlib.vcxproj">
<Project>{2fcd4b66-9cf9-4c8f-bc70-37cd20002d49}</Project>
</ProjectReference>
@@ -813,6 +833,14 @@
<ProjectReference Include="..\thirdparty\TreePropSheet\TreePropSheet.vcxproj">
<Project>{ab494732-ef6d-44d0-bcf8-80ff04858d10}</Project>
</ProjectReference>
+ <ProjectReference Include="CrashReporterDialog\CrashReporterDialog.vcxproj">
+ <Project>{5db958dd-8b25-45ef-8072-3356caf8ccd7}</Project>
+ <Private>false</Private>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <LinkLibraryDependencies>false</LinkLibraryDependencies>
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Image Include="res\check_all.bmp" />
diff --git a/src/mpc-hc/mpc-hc.vcxproj.filters b/src/mpc-hc/mpc-hc.vcxproj.filters
index 063c0f1d7..86f9aa04d 100644
--- a/src/mpc-hc/mpc-hc.vcxproj.filters
+++ b/src/mpc-hc/mpc-hc.vcxproj.filters
@@ -440,8 +440,11 @@
<ClCompile Include="CrashReporter.cpp">
<Filter>Crash Reporter</Filter>
</ClCompile>
- <ClCompile Include="CrashReporterDialog.cpp">
- <Filter>Crash Reporter</Filter>
+ <ClCompile Include="PPageAudioRenderer.cpp">
+ <Filter>Property Dialogs\Player Options\Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="DpiHelper.cpp">
+ <Filter>Helpers</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
@@ -825,8 +828,11 @@
<ClInclude Include="CrashReporter.h">
<Filter>Crash Reporter</Filter>
</ClInclude>
- <ClInclude Include="CrashReporterDialog.h">
- <Filter>Crash Reporter</Filter>
+ <ClInclude Include="PPageAudioRenderer.h">
+ <Filter>Property Dialogs\Player Options\Pages</Filter>
+ </ClInclude>
+ <ClInclude Include="DpiHelper.h">
+ <Filter>Helpers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
diff --git a/src/mpc-hc/mpcresources/BuildAll.vcxproj b/src/mpc-hc/mpcresources/BuildAll.vcxproj
new file mode 100644
index 000000000..2f2aaa117
--- /dev/null
+++ b/src/mpc-hc/mpcresources/BuildAll.vcxproj
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{F0D412BF-C98E-48C7-A032-607AE043B0F7}</ProjectGuid>
+ <RootNamespace>BuildAll</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <Import Project="..\..\platform.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\common.props" />
+ </ImportGroup>
+ <ItemGroup>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Arabic</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Armenian</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Basque</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Belarusian</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Bengali</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Catalan</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Chinese Simplified</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Chinese Traditional</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Croatian</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Czech</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Danish</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Dutch</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release English (British)</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Finnish</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release French</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Galician</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release German</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Greek</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Hebrew</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Hungarian</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Indonesian</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Italian</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Japanese</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Korean</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Lithuanian</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Malay</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Polish</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Portuguese (Brazil)</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Polish</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Punjabi</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Romanian</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Russian</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Serbian</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Slovak</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Slovenian</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Spanish</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Swedish</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Tatar</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Thai</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Turkish</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Ukrainian</AdditionalProperties>
+ </ProjectToBuild>
+ <ProjectToBuild Include="mpcresources.vcxproj">
+ <AdditionalProperties>Configuration=Release Vietnamese</AdditionalProperties>
+ </ProjectToBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="SyncTranslations.vcxproj">
+ <Project>{904017f7-ee7a-49b6-a000-0d2fe5d5809a}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <Target Name="Build">
+ <MSBuild Projects="@(ProjectToBuild)" Targets="Build" BuildInParallel="true" />
+ </Target>
+ <Target Name="Rebuild">
+ <MSBuild Projects="@(ProjectToBuild)" Targets="Rebuild" BuildInParallel="true" />
+ </Target>
+ <Target Name="Clean">
+ <MSBuild Projects="@(ProjectToBuild)" Targets="Clean" BuildInParallel="true" />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ar.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ar.dialogs.po
index 0f9b43c5b..ab01547de 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ar.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ar.dialogs.po
@@ -1,21 +1,22 @@
# MPC-HC - Strings extracted from dialogs
-# Copyright (C) 2002 - 2015 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Abubakr Mohammed <bcs2610@hotmail.com>, 2014
-# Ahmad Abd-Elghany <tolpa1@gmail.com>, 2013-2014
+# Ahmad Abd-Elghany <tolpa1@gmail.com>, 2013-2015
# Abubakr Mohammed <bcs2610@hotmail.com>, 2014
# manxx55 <w6txz2@gmail.com>, 2014
+# Omar Anwar <omaraglan91@yahoo.com>, 2015
# Tariq <tariq-mz@hotmail.com>, 2014
# Tariq <tariq-mz@hotmail.com>, 2014
-# manxx55 <w6txz2@gmail.com>, 2014
+# manxx55 <w6txz2@gmail.com>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-09-19 20:08:04+0000\n"
-"PO-Revision-Date: 2014-12-04 17:52+0000\n"
-"Last-Translator: manxx55 <w6txz2@gmail.com>\n"
-"Language-Team: Arabic (http://www.transifex.com/projects/p/mpc-hc/language/ar/)\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-08-08 06:55+0000\n"
+"Last-Translator: Omar Anwar <omaraglan91@yahoo.com>\n"
+"Language-Team: Arabic (http://www.transifex.com/mpc-hc/mpc-hc/language/ar/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -478,10 +479,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "تحميل ملÙات الصوت تلقائياً"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "renderer إستعمل الترجمة الداخلية لـ"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "التحكم"
@@ -682,9 +679,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "منع تصغير المشغل عندما يكون ÙÙŠ الشاشة الكاملة على غير الضبط الأÙتراضي"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "إستعمال مميزّات شريط المهام لويندوز 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1175,8 +1172,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "الترجمات *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1191,8 +1188,8 @@ msgid "Rotation"
msgstr "التدوير"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "المرشحات الخارجية مثل (Vsfilter) يمكن أن تعرض الترجمة على كلّ العوارض *"
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1210,6 +1207,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "السماح بالوصول من المضي٠المحلي Ùقط"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "تمكين المعانيه"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "طباعة معلومات التصحيح"
@@ -1284,7 +1285,7 @@ msgstr "تمكين الÙحص التلقائي للتحديثات"
msgctxt "IDD_PPAGEMISC_IDC_STATIC5"
msgid "Check every:"
-msgstr ""
+msgstr "اÙحص كل:"
msgctxt "IDD_PPAGEMISC_IDC_STATIC6"
msgid "day(s)"
@@ -1658,6 +1659,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "الأÙتراضي"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "جهاز"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "وضع خاص"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "تمكين التدÙÙ‚"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "اعدادات"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "تمكين التغذيه عبر موحة الاستريو(من اجل سماعات الرأس)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "قطع:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "مستوى:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "ملحوظه"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "لتقليل التشويه ÙÙ‰ الصوت،من المÙضل ان تبقى صوت المشغل ÙÙ‰ حدود 85% \nعندما يتم تشغيل صوت صاخب-محتوى مرمز."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "دقة الصورة:"
@@ -1672,25 +1717,37 @@ msgstr "حسناً"
msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
-msgstr ""
+msgstr "إرسال انهيار"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "نحن اسÙون، يبدو ان المشغل قد تعطل. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "ارسل تقرير عن العله لمساعدتنا Ùحص المشكله وايجاد الحل."
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr ""
+msgid "Optional information"
+msgstr "معلومات اختياريه."
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
-msgstr ""
+msgstr "الإيميل:"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC3"
msgid "Your email address is optional and will only be used if the developers need to contact you for more information."
-msgstr ""
+msgstr "وضع عنوان بريدك الإلكتروني هو اختياري، سو٠يستخدم Ùقط للإتصال بك من قبل المطورين للمزيد من المعلومات."
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
-msgstr ""
+msgstr "وص٠المشكلة (استخدام اللغة الإنجليزية Ùقط):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "اعاده تشغيل المشغل."
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "اغلق المشغل"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ar.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ar.menus.po
index befe53f7d..04a666a5c 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ar.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ar.menus.po
@@ -1,18 +1,18 @@
# MPC-HC - Strings extracted from menus
-# Copyright (C) 2002 - 2015 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Ahmad Abd-Elghany <tolpa1@gmail.com>, 2013-2014
# Abubakr Mohammed <bcs2610@hotmail.com>, 2014
# Tariq <tariq-mz@hotmail.com>, 2014
-# manxx55 <w6txz2@gmail.com>, 2014
+# manxx55 <w6txz2@gmail.com>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-10-25 18:58:24+0000\n"
-"PO-Revision-Date: 2014-12-01 22:49+0000\n"
-"Last-Translator: Underground78\n"
-"Language-Team: Arabic (http://www.transifex.com/projects/p/mpc-hc/language/ar/)\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-07-01 20:37+0000\n"
+"Last-Translator: manxx55 <w6txz2@gmail.com>\n"
+"Language-Team: Arabic (http://www.transifex.com/mpc-hc/mpc-hc/language/ar/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -201,15 +201,15 @@ msgstr "اختبار التمزق"
msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
msgid "&Display Statistics"
-msgstr ""
+msgstr "&عرض الأحصائيات"
msgctxt "ID_VIEW_OSD_DISPLAY_TIME"
msgid "Display Current T&ime"
-msgstr ""
+msgstr "عرض الوقت &الحالي"
msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
msgid "Show &File Name"
-msgstr ""
+msgstr "عرض اسم &الملÙ"
msgctxt "POPUP"
msgid "&Output Range"
@@ -561,15 +561,15 @@ msgstr "المظللات"
msgctxt "ID_AUDIOS"
msgid "&Audio Track"
-msgstr ""
+msgstr "&مسار الصوت"
msgctxt "ID_SUBTITLES"
msgid "Su&btitle Track"
-msgstr ""
+msgstr "&مسار الترجمة"
msgctxt "ID_VIDEO_STREAMS"
msgid "&Video Track"
-msgstr ""
+msgstr "&مسار الÙيديو"
msgctxt "POPUP"
msgid "&Volume"
@@ -593,7 +593,7 @@ msgstr "بعد التشغيل"
msgctxt "ID_AFTERPLAYBACK_DONOTHING"
msgid "Do no&thing"
-msgstr ""
+msgstr "&لا تÙعل شيء"
msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
msgid "Play &next file in the folder"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ar.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ar.strings.po
index 24109261f..5c80c44db 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ar.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ar.strings.po
@@ -1,5 +1,5 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2015 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Abubakr Mohammed <bcs2610@hotmail.com>, 2014
@@ -8,14 +8,14 @@
# nour nader <thenino2013@gmail.com>, 2014
# Tariq <tariq-mz@hotmail.com>, 2014
# Tariq <tariq-mz@hotmail.com>, 2014
-# manxx55 <w6txz2@gmail.com>, 2014
+# manxx55 <w6txz2@gmail.com>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-10-30 22:04:38+0000\n"
-"PO-Revision-Date: 2014-12-04 17:52+0000\n"
-"Last-Translator: manxx55 <w6txz2@gmail.com>\n"
-"Language-Team: Arabic (http://www.transifex.com/projects/p/mpc-hc/language/ar/)\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-08-08 06:46+0000\n"
+"Last-Translator: Underground78\n"
+"Language-Team: Arabic (http://www.transifex.com/mpc-hc/mpc-hc/language/ar/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -331,11 +331,11 @@ msgid "On/Off"
msgstr "تشغيل/إيقاÙ"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr "من إطار ÙÙŠ الثانية"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr "إلى إطار ÙÙŠ الثانية"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -470,6 +470,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "إعادة تشغيل::الظلال"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "المصادر"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "المتنوعة"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "معلومات الملÙ"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "التشغيل::الملتقط"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "تشغيل::مزامنة الأعدادات"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "تشغيل::وضع ملء الشاشة"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "المرشحات الداخلية :: عارض الصوت"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "محولات الصوت"
@@ -562,30 +590,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "الترجمة::قاعدة البيانات"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "المصادر"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "المتنوعة"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "معلومات الملÙ"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "التشغيل::الملتقط"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "تشغيل::مزامنة الأعدادات"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "تشغيل::وضع ملء الشاشة"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "التÙاصيل"
@@ -678,22 +682,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "سطح الÙيديو سيخصّص كسطح واقعي منتظم."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "عارض MPC الصوتي منهار، لا تستعمله."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "تزامن العارض"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - تقديم تقرير خطأ"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "إنهار MPC-HC ولكن هذه النسخة جمعت بدون تصحيح للمعلومات. \nإذا تريد أن ترسل هذا الخطأ، يجب أن تجرب نسخة رسمية أولاً.\n\nهل تريد زيارة صÙحة التحميل الآن؟"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "السطح البسيط الواقعي المنتظم"
@@ -746,9 +738,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Ùارغة (غير مضغوط)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "عارض MPC-HC الصوتي"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "عارض الصوت الداخلي"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1380,22 +1372,42 @@ msgstr "AR %d:%d"
msgctxt "IDS_PPAGEADVANCED_LOGGER"
msgid "Enables logging to file (requires restart)"
-msgstr ""
+msgstr "تمكين تسجيل الدخول لمل٠(يتطلب إعادة تشغيل)"
msgctxt "IDS_TIMER_REMAINING_TIME"
msgid "Remaining time"
-msgstr ""
+msgstr "الوقت المتبقي"
msgctxt "IDS_TIMER_HIGH_PRECISION"
msgid "High precision"
-msgstr ""
+msgstr "دقة عالية"
msgctxt "IDS_AFTERPLAYBACK_REWIND"
msgid "After Playback: Rewind current file"
-msgstr ""
+msgstr "بعد نهاية التشغيل: إعادة المل٠الحالي"
msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
+msgstr "بعد نهاية التشغيل: إغلاق"
+
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "إذا كنت تواجهة مشكلة أثناء تهيئة MPC-HC. بمساعدتكم نحن قد نكون قادرين على إصلاح المشكلة. \n\nهل تريد الإبلاغ عن ذلك؟"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "أدخل قيمة موجبة إذا كان الصوت سابق، وقيمة سالبة إذا كان متأخر."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
msgstr ""
msgctxt "IDS_AG_OPEN_DEVICE"
@@ -1552,7 +1564,7 @@ msgstr "تم Ø­Ùظ المصغرات"
msgctxt "IDS_MENU_VIDEO_STREAM"
msgid "&Video Track"
-msgstr ""
+msgstr "&مسار الÙيديو"
msgctxt "IDS_MENU_VIDEO_ANGLE"
msgid "Video Ang&le"
@@ -1680,15 +1692,23 @@ msgstr "القÙز إلى البداية"
msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
-msgstr ""
+msgstr "OSD: عرض اسم الملÙ"
+
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "تشغيل DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "تشغيل BD"
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
-msgstr ""
+msgstr "OSD: عرض احصائيات الناقل"
msgctxt "IDS_OSD_RESET_RENDERER_STATS"
msgid "OSD: Reset Renderer Statistics"
-msgstr ""
+msgstr "OSD: إعادة تعيين احصائيات الناقل"
msgctxt "IDD_PPAGESUBMISC"
msgid "Subtitles::Misc"
@@ -1948,11 +1968,11 @@ msgstr "Ù…Ùتاح الرئيس"
msgctxt "IDS_MPLAYERC_77"
msgid "Player Menu"
-msgstr ""
+msgstr "قائمة المشغل"
msgctxt "IDS_MPLAYERC_78"
msgid "Player Menu (full)"
-msgstr ""
+msgstr "قائمة المشغل (وضع كامل الشاشة)"
msgctxt "IDS_AG_FILTERS_MENU"
msgid "Filters Menu"
@@ -1963,19 +1983,19 @@ msgid "Options"
msgstr "الخيارات"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
+msgid "Next Audio Track"
msgstr "الصوت التالي"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
+msgid "Prev Audio Track"
msgstr "الصوت السابق"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
+msgid "Next Subtitle Track"
msgstr "الترجمة التالية"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
+msgid "Prev Subtitle Track"
msgstr "الترجمة السابقة"
msgctxt "IDS_MPLAYERC_85"
@@ -1986,22 +2006,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "إعادة تحميل الترجمة"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "الصوت التالي (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "الصوت السابق (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "الترجمة التالية (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "الترجمة السابقة (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "الزاوية التالية (DVD)"
@@ -2011,19 +2015,19 @@ msgid "Prev Angle (DVD)"
msgstr "الزاوية السابقة (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
+msgid "Next Audio Track (DVD)"
msgstr "الصوت التالي (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "الصوت السابق (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "الصوت السابق (OGM)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "الترجمة التالية (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "الترجمة التالية (OGM)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
+msgid "Prev Subtitle Track (DVD)"
msgstr "الترجمة السابقة (DVD)"
msgctxt "IDS_MPLAYERC_97"
@@ -2032,7 +2036,7 @@ msgstr "تشغيل/إيقا٠الترجمة (DVD)"
msgctxt "IDS_OSD_DISPLAY_CURRENT_TIME"
msgid "OSD: Display Current Time"
-msgstr ""
+msgstr "OSD: عرض الوقت الحالي"
msgctxt "IDS_PPAGEWEBSERVER_0"
msgid "Select the directory"
@@ -2390,14 +2394,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "حالي"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "تم إنهاء MPC-HC بشكل غير متوقع. لمساعدتنا ÙÙŠ حل هذه المشكلة، الرجاء ارسال هذا المل٠\"%s\" الى متتبع الأخطاء.\n\nهل تريد Ùتح المجلد الذي يحتوي على مل٠التÙريغ المصغر وزيارة متتبع الأخطاء الآن؟"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Ùشل ÙÙŠ إنشاء مل٠التÙريغ الى \"%s\" ( خطأ %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "حدد المجلد"
@@ -2571,8 +2567,8 @@ msgid "Volume boost Max"
msgstr "أقصى تعزيز للصوت"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "طريقة الاستعمال: mpc-hc.exe \"pathname\" [المÙاتيح]\n\n\"pathname\"\tالمل٠الرئيسي او المجلد الذي سيتم تحميله (حر٠بدل\n\t\tمسموح, \"-\" يدل على المدخل القياسي)\n/dub \"dubname\"\tتحميل مل٠صوت إضاÙÙŠ\n/dubdelay \"file\"\tتحميل مل٠صوت إضاÙÙŠ مزاح بـ XXms (إذا كان\n\t\tالمل٠يحتوي على \"...DELAY XXms...\")\n/d3dfs\t\tبدء التصيير ÙÙŠ وضع ملء الشاشة D3D\n/sub \"subname\"\tتحميل مل٠ترجمة إضاÙÙŠ\n/filter \"filtername\"\tتحميل Ùلاتر DirectShow من مكتبة الروابط\n\t\tالديناميكية (أحر٠البدل مسموحة)\n/dvd\t\tتشغيل ÙÙŠ وضع DVD, \"pathname\" تعني الـDVD\n\t\tالمجلد (اختياري)\n/dvdpos T#C\tبدء التشغيل ÙÙŠ العنوان T, Ùصل C\n/dvdpos T#hh:mm\tبدء التشغيل ÙÙŠ العنوان T, موقع hh:mm:ss\n/cd\t\tتحميل كل مسارات audio cd أو (s)vcd,\n\t\t\"pathname\" يعني مسار محرك الأقراص (اختياري)\n/device\t\tÙتح جهاز الÙيديو الاÙتراضي\n/open\t\tاÙتح الملÙØŒ لا تبدأ التشغيل تلقائيا\n/play\t\tبدء تشغيل المل٠عند بدء\n\t\tالمشغل\n/close\t\tإغلاق المشغل بعد نهاية العرض (يعمل Ùقط عند\n\t\tاستعماله مع /play)\n/shutdown\tإيقا٠تشغيل نظام التشغيل بعد العرض\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tالبدء ÙÙŠ وضع ملء الشاشة\n/minimized\tالبدء ÙÙŠ الوضع المصغر\n/new\t\tاستخدام مثيل جديد من المشغل\n/add\t\tإضاÙØ© \"pathname\" إلى قائمة التشغيل، يمكن دمجه\n\t\tمع /open Ùˆ /play\n/randomize\tRandomize the playlist\n/regvid\t\tإنشاء اقترانات الملÙات لملÙات الÙيديو\n/regaud\t\tإنشاء اقترانات الملÙات لملÙات الصوت\n/regpl\t\tإنشاء اقترانات الملÙات لملÙات قائمة التشغيل\n/regall\t\tإنشاء اقترانات الملÙات لجميع الملÙات المدعومة\n/unregall\t\tإزالة جميع اقترانات الملÙات\n/start ms\t\tبدء العرض عند \"ms\" (= ميلي ثانية)\n/startpos hh:mm:ss\tبدء العرض عند موضع hh:mm:ss\n/fixedsize w,h\tتعيين حجم ناÙذة ثابت\n/monitor N\tبدء المشغل على الشاشة NØŒ حيث N تبدأ من 1\n/audiorenderer N\tالبدء باستعمال مصيير الصوت NØŒ حيث N تبدأ من 1\n\t\t( راجع اعدادات \"المخرجات\" )\n/shaderpreset \"Pr\"\tالبدء باستعمال الاعدادات المسبقة \"Pr\" للمظلل\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tاستعادة الإعدادات الاÙتراضية\n/help /h /?\tعرض التعليمات حول Ù…Ùاتيح سطر الأوامر\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "طريقة الاستعمال: mpc-hc.exe \"pathname\" [المÙاتيح]\n\n\"pathname\"\tالمل٠الرئيسي او المجلد الذي سيتم تحميله (حر٠بدل\n\t\tمسموح, \"-\" يدل على المدخل القياسي)\n/dub \"dubname\"\tتحميل مل٠صوت إضاÙÙŠ\n/dubdelay \"file\"\tتحميل مل٠صوت إضاÙÙŠ مزاح بـ XXms (إذا كان\n\t\tالمل٠يحتوي على \"...DELAY XXms...\")\n/d3dfs\t\tبدء التصيير ÙÙŠ وضع ملء الشاشة D3D\n/sub \"subname\"\tتحميل مل٠ترجمة إضاÙÙŠ\n/filter \"filtername\"\tتحميل Ùلاتر DirectShow من مكتبة الروابط\n\t\tالديناميكية (أحر٠البدل مسموحة)\n/dvd\t\tتشغيل ÙÙŠ وضع DVD, \"pathname\" تعني الـDVD\n\t\tالمجلد (اختياري)\n/dvdpos T#C\tبدء التشغيل ÙÙŠ العنوان T, Ùصل C\n/dvdpos T#hh:mm\tبدء التشغيل ÙÙŠ العنوان T, موقع hh:mm:ss\n/cd\t\tتحميل كل مسارات audio cd أو (s)vcd,\n\t\t\"pathname\" يعني مسار محرك الأقراص (اختياري)\n/device\t\tÙتح جهاز الÙيديو الاÙتراضي\n/open\t\tاÙتح الملÙØŒ لا تبدأ التشغيل تلقائيا\n/play\t\tبدء تشغيل المل٠عند بدء\n\t\tالمشغل\n/close\t\tإغلاق المشغل بعد نهاية العرض (يعمل Ùقط عند\n\t\tاستعماله مع /play)\n/shutdown\tإيقا٠تشغيل نظام التشغيل بعد العرض\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tالبدء ÙÙŠ وضع ملء الشاشة\n/minimized\tالبدء ÙÙŠ الوضع المصغر\n/new\t\tاستخدام مثيل جديد من المشغل\n/add\t\tإضاÙØ© \"pathname\" إلى قائمة التشغيل، يمكن دمجه\n\t\tمع /open Ùˆ /play\n/randomize\tRandomize the playlist\n/regvid\t\tإنشاء اقترانات الملÙات لملÙات الÙيديو\n/regaud\t\tإنشاء اقترانات الملÙات لملÙات الصوت\n/regpl\t\tإنشاء اقترانات الملÙات لملÙات قائمة التشغيل\n/regall\t\tإنشاء اقترانات الملÙات لجميع الملÙات المدعومة\n/unregall\t\tإزالة جميع اقترانات الملÙات\n/start ms\t\tبدء العرض عند \"ms\" (= ميلي ثانية)\n/startpos hh:mm:ss\tبدء العرض عند موضع hh:mm:ss\n/fixedsize w,h\tتعيين حجم ناÙذة ثابت\n/monitor N\tبدء المشغل على الشاشة NØŒ حيث N تبدأ من 1\n/audiorenderer N\tالبدء باستعمال مصيير الصوت NØŒ حيث N تبدأ من 1\n\t\t( راجع اعدادات \"المخرجات\" )\n/shaderpreset \"Pr\"\tالبدء باستعمال الاعدادات المسبقة \"Pr\" للمظلل\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tاستعادة الإعدادات الاÙتراضية\n/help /h /?\tعرض التعليمات حول Ù…Ùاتيح سطر الأوامر\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -2928,7 +2924,7 @@ msgstr "أصوات أخرى"
msgctxt "IDS_MFMT_AC3"
msgid "AC-3"
-msgstr ""
+msgstr "AC-3"
msgctxt "IDS_MFMT_AIFF"
msgid "AIFF"
@@ -2956,7 +2952,7 @@ msgstr "Opus كودك صوت"
msgctxt "IDS_MFMT_DTS"
msgid "DTS/DTS-HD"
-msgstr ""
+msgstr "DTS/DTS-HD"
msgctxt "IDS_MFMT_AMR"
msgid "AMR"
@@ -3046,18 +3042,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "نسبة الطول للعرض"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "استعمل WASAPI (يحتاج إعادة تشغيل)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "صامت ÙÙŠ التقديم السريع"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "جهاز الصوت:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: يعمل"
@@ -3614,3 +3598,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "الضبط"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.be.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.be.dialogs.po
index 3077e374c..2e9afc6ab 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.be.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.be.dialogs.po
@@ -471,10 +471,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Ðўтазагрузка гуку"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr ""
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr ""
@@ -675,9 +671,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Ðе згортваць акно на дадатковым дыÑплеі Ñž поўнаÑкранным Ñ€Ñжыме"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "ВыкарыÑтоўваць магчымаÑці таÑкбара Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1168,7 +1164,7 @@ msgid "DXVA"
msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
+msgid "Subtitles"
msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
@@ -1184,7 +1180,7 @@ msgid "Rotation"
msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
+msgid "Subtitle Renderer"
msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
@@ -1203,6 +1199,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Дазволіць доÑтуп толькі з лакальнага кампутара"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr ""
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Выводзіць адладкавую інфармацыю"
@@ -1651,6 +1651,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Стандартна"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr ""
@@ -1667,8 +1711,16 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr ""
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
+msgid "Optional information"
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
@@ -1683,7 +1735,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr ""
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
msgstr ""
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.be.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.be.strings.po
index b47b6852b..28a9d2417 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.be.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.be.strings.po
@@ -325,12 +325,12 @@ msgid "On/Off"
msgstr "Укл/Ðдкл"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Ðд FPS"
+msgid "From (FPS)"
+msgstr "Ðд (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "Да FPS"
+msgid "To (FPS)"
+msgstr "Да (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -464,6 +464,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Прайграванне::Shaders"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "РÑÑурÑÑ‹"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Рознае"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr ""
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Прайграванне::Захоп"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Прайграванне::Sync Renderer Settings"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Прайграванне::Поўны Ñкран"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Ðудыёпераключальнік"
@@ -556,30 +584,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Субтытры::База"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "РÑÑурÑÑ‹"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Рознае"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr ""
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Прайграванне::Захоп"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Прайграванне::Sync Renderer Settings"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Прайграванне::Поўны Ñкран"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "ПадрабÑзна"
@@ -672,22 +676,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "ÐŸÐ°Ð²ÐµÑ€Ñ…Ð½Ñ Ð´Ð»Ñ Ð²Ñ–Ð´Ñа вылучаецца Ñк Ð·Ð²Ñ‹Ñ‡Ð°Ð¹Ð½Ð°Ñ Ð¿Ð°Ð²ÐµÑ€Ñ…Ð½Ñ Ð¿Ð°-за Ñкранам."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr ""
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr ""
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr ""
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr ""
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr ""
@@ -740,8 +732,8 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr ""
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
msgstr ""
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
@@ -1392,6 +1384,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr ""
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr ""
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Ðдкрыць прыладу"
@@ -1676,6 +1688,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr ""
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr ""
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr ""
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr ""
@@ -1957,20 +1977,20 @@ msgid "Options"
msgstr "Опцыі"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "ÐаÑтупнае аўдыё"
+msgid "Next Audio Track"
+msgstr ""
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "ПапÑÑ€ÑднÑе аўдыё"
+msgid "Prev Audio Track"
+msgstr ""
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "ÐаÑÑ‚ÑƒÐ¿Ð½Ñ‹Ñ Ñубтытры"
+msgid "Next Subtitle Track"
+msgstr ""
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "ПапÑÑ€ÑÐ´Ð½Ñ–Ñ Ñубтытры"
+msgid "Prev Subtitle Track"
+msgstr ""
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1980,22 +2000,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Перазагрузіць Ñубтытры"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "ÐаÑтупнае аўдыё (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "ПапÑÑ€ÑднÑе аўдыё (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "ÐаÑÑ‚ÑƒÐ¿Ð½Ñ‹Ñ Ñубтытры (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "ПапÑÑ€ÑÐ´Ð½Ñ–Ñ Ñубтытры (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "ÐаÑтупны вугал (DVD)"
@@ -2005,20 +2009,20 @@ msgid "Prev Angle (DVD)"
msgstr "ПапÑÑ€Ñдні вугал (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "ÐаÑтупнае аўдыё (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "ПапÑÑ€ÑднÑе аўдыё (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "ÐаÑÑ‚ÑƒÐ¿Ð½Ñ‹Ñ Ñубтытры (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "ПапÑÑ€ÑÐ´Ð½Ñ–Ñ Ñубтытры (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2384,14 +2388,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "БÑгучы"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr ""
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Памылка пры ÑтварÑнні dump файла '%s' (памылка %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "ÐбÑрыце Ñ‚Ñчку"
@@ -2565,8 +2561,8 @@ msgid "Volume boost Max"
msgstr "Узмацненне гучнаÑці - Max"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "ВыкарыÑтанне: mpc-hc.exe \"шлÑÑ…\" [перамыкачы]\n\n\"шлÑÑ…\"\tФайл або каталог Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÑ– (Ð´Ð°Ð·Ð²Ð¾Ð»ÐµÐ½Ñ‹Ñ Ð¼Ð°Ñкі, \"-\" denotes standard input)\n/dub \"dubname\"\tЗагрузiць дадатковы гукавы файл\n/dubdelay \"file\"\tЗагрузiць дадатковы гукавы файл Ñа зрушÑннем XXмÑ\n(калі файл утрымлівае \"...DELAY XXms...\")\n/d3dfs\t\tСтартаваць у поўнаÑкранным D3D Ñ€Ñжыме\n/sub \"subname\"\tЗагрузiць Ð´Ð°Ð´Ð°Ñ‚ÐºÐ¾Ð²Ñ‹Ñ Ñубтытры\n/filter \"filtername\"\tЗагрузiць фільтры DirectShow з бібліÑÑ‚Ñкі (Ð´Ð°Ð·Ð²Ð¾Ð»ÐµÐ½Ñ‹Ñ Ð¼Ð°Ñкі)\n/dvd\t\tЗапуÑк у Ñ€Ñжыме DVD \"шлÑÑ…\" азначае каталог з DVD (апцыÑнальна)\n/cd\t\tЗагрузіць уÑе дарожкі Audio CD або (S)VCD \"шлÑÑ…\" азначае шлÑÑ… да кружÑлкі (апцыÑнальна)\n/device\t\tOpen the default video device\n/open\t\tТолькi адкрыць файл\n/play\t\tПачынаць прайграванне адразу паÑÐ»Ñ Ð·Ð°Ð¿ÑƒÑку\n/close\t\tЗакрыць па канчатку Ð¿Ñ€Ð°Ð¹Ð³Ñ€Ð°Ð²Ð°Ð½Ð½Ñ (працуе толькі з перамыкачом /play)\n/shutdown\tВыключыць кампутар па канчатку прайграваннÑ\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tЗапуÑк у поўнаÑкранным Ñ€Ñжыме\n/minimized\tЗапуÑк у згорнутым выглÑдзе\n/new\t\tВыкарÑтаць новую копію прайгравальніка\n/add\t\tДадаць \"шлÑÑ…\" у плÑйліÑÑ‚ можна ÑумеÑна з /open Ñ– /play\n/randomize\tRandomize the playlist\n/regvid\t\tРÑгіÑтраваць відÑафарматы\n/regaud\t\tРÑгіÑтраваць аўдыёфарматы\n/unregvid\t\tРазрÑгіÑтраваць відÑафарматы\n/unregaud\tРазрÑгіÑтраваць аўдыёфарматы\n/start ms\t\tПрайграваць з пазіцыі \"ms\" (= міліÑекунды)\n/fixedsize wh\tУÑталÑваць фікÑаваны памер акна\n/monitor N\tЗапуÑкацца на маніторы N дзе N адлічваецца з 1\n/audiorenderer N\tВыкарыÑтаць аўдыёрÑндÑÑ€ N, дзе N адлічваецца з 1\n\t\t(глÑдзіце налады \"Вывад\")\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tПаказвае гÑтую даведку\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "ВыкарыÑтанне: mpc-hc.exe \"шлÑÑ…\" [перамыкачы]\n\n\"шлÑÑ…\"\tФайл або каталог Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÑ– (Ð´Ð°Ð·Ð²Ð¾Ð»ÐµÐ½Ñ‹Ñ Ð¼Ð°Ñкі, \"-\" denotes standard input)\n/dub \"dubname\"\tЗагрузiць дадатковы гукавы файл\n/dubdelay \"file\"\tЗагрузiць дадатковы гукавы файл Ñа зрушÑннем XXмÑ\n(калі файл утрымлівае \"...DELAY XXms...\")\n/d3dfs\t\tСтартаваць у поўнаÑкранным D3D Ñ€Ñжыме\n/sub \"subname\"\tЗагрузiць Ð´Ð°Ð´Ð°Ñ‚ÐºÐ¾Ð²Ñ‹Ñ Ñубтытры\n/filter \"filtername\"\tЗагрузiць фільтры DirectShow з бібліÑÑ‚Ñкі (Ð´Ð°Ð·Ð²Ð¾Ð»ÐµÐ½Ñ‹Ñ Ð¼Ð°Ñкі)\n/dvd\t\tЗапуÑк у Ñ€Ñжыме DVD \"шлÑÑ…\" азначае каталог з DVD (апцыÑнальна)\n/cd\t\tЗагрузіць уÑе дарожкі Audio CD або (S)VCD \"шлÑÑ…\" азначае шлÑÑ… да кружÑлкі (апцыÑнальна)\n/device\t\tOpen the default video device\n/open\t\tТолькi адкрыць файл\n/play\t\tПачынаць прайграванне адразу паÑÐ»Ñ Ð·Ð°Ð¿ÑƒÑку\n/close\t\tЗакрыць па канчатку Ð¿Ñ€Ð°Ð¹Ð³Ñ€Ð°Ð²Ð°Ð½Ð½Ñ (працуе толькі з перамыкачом /play)\n/shutdown\tВыключыць кампутар па канчатку прайграваннÑ\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tЗапуÑк у поўнаÑкранным Ñ€Ñжыме\n/minimized\tЗапуÑк у згорнутым выглÑдзе\n/new\t\tВыкарÑтаць новую копію прайгравальніка\n/add\t\tДадаць \"шлÑÑ…\" у плÑйліÑÑ‚ можна ÑумеÑна з /open Ñ– /play\n/randomize\tRandomize the playlist\n/regvid\t\tРÑгіÑтраваць відÑафарматы\n/regaud\t\tРÑгіÑтраваць аўдыёфарматы\n/unregvid\t\tРазрÑгіÑтраваць відÑафарматы\n/unregaud\tРазрÑгіÑтраваць аўдыёфарматы\n/start ms\t\tПрайграваць з пазіцыі \"ms\" (= міліÑекунды)\n/fixedsize wh\tУÑталÑваць фікÑаваны памер акна\n/monitor N\tЗапуÑкацца на маніторы N дзе N адлічваецца з 1\n/audiorenderer N\tВыкарыÑтаць аўдыёрÑндÑÑ€ N, дзе N адлічваецца з 1\n\t\t(глÑдзіце налады \"Вывад\")\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tПаказвае гÑтую даведку\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3040,18 +3036,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Прапорцыі"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "ВыкарыÑтаць WASAPI (перазапуÑкае прайграванне)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Ðдкл. гук пры паÑкораным прайграванні"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Прыл. гуку:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: Укл"
@@ -3608,3 +3592,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr ""
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.bn.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.bn.dialogs.po
index 4ca937d62..08717fb7b 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.bn.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.bn.dialogs.po
@@ -3,15 +3,16 @@
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Mehedi Hussain, 2014
+# Mehedi Hussain, 2014
# mehzad, 2014
# Tapu Afrad (তপৠআফà§à¦°à¦¾à¦¦) <tapu_afrad@hotmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-03-16 18:09:30+0000\n"
-"PO-Revision-Date: 2015-04-12 14:10+0000\n"
-"Last-Translator: Mehedi Hussain\n"
-"Language-Team: Bengali (http://www.transifex.com/projects/p/mpc-hc/language/bn/)\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-08-06 16:46+0000\n"
+"Last-Translator: Underground78\n"
+"Language-Team: Bengali (http://www.transifex.com/mpc-hc/mpc-hc/language/bn/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -474,10 +475,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿà¦­à¦¾à¦¬à§‡ অডিও ফাইল লোড"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "বিলà§à¦Ÿ-ইন সাবটাইটেল রেনডারার বà§à¦¯à¦¬à¦¹à¦¾à¦°"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "কনà§à¦Ÿà§à¦°à§‹à¦²"
@@ -678,9 +675,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "ডিফলà§à¦Ÿ নয় à¦à¦®à¦¨ মনিটরে ফà§à¦²à¦¸à§à¦•à§à¦°à§€à¦¨ জà§à§œà§‡ অবসà§à¦¥à¦¾à¦¨à¦•à¦¾à¦²à§‡ পà§à¦²à§‡à§Ÿà¦¾à¦°à§‡à¦° মিনিমাইজ করণ পà§à¦°à¦¤à¦¿à¦°à§‹à¦§ "
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Windows 7à¦à¦° বৈশিষà§à¦Ÿà§à¦¯à¦®à§‚লক টাসà§à¦•à¦¬à¦¾à¦° বà§à¦¯à¦¬à¦¹à¦¾à¦°"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1171,8 +1168,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "সাবটাইটেল *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1187,8 +1184,8 @@ msgid "Rotation"
msgstr "ঘূরà§à¦£à¦¨"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* বাহিরসà§à¦¥ ফিলà§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ (যেমন VSFilter) সকল রেনডারেই সাবটাইটেল পà§à¦°à¦¦à¦°à§à¦¶à¦¨ করতে পারে।"
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1206,6 +1203,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "শà§à¦§à§à¦®à¦¾à¦¤à§à¦° সà§à¦¥à¦¾à¦¨à§€à§Ÿà¦¹à§‹à¦¸à§à¦Ÿ থেকে অà§à¦¯à¦¾à¦•à¦¸à§‡à¦¸ সমরà§à¦¥à¦¨"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr ""
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "ডিবাগ তথà§à¦¯à¦¾à¦¦à¦¿ মà§à¦¦à§à¦°à¦£"
@@ -1654,6 +1655,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "ডিফলà§à¦Ÿ"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEGà¦à¦° বৈশিষà§à¦Ÿà§à¦¯à¦—à§à¦£:"
@@ -1668,25 +1713,37 @@ msgstr "ঠিক আছে"
msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
+msgstr "আকসà§à¦®à¦¿à¦• বনà§à¦§ হওয়ার পà§à¦°à¦¤à¦¿à¦¬à§‡à¦¦à¦¨"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
+msgid "Optional information"
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
-msgstr ""
+msgstr "ইমেইল:"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC3"
msgid "Your email address is optional and will only be used if the developers need to contact you for more information."
-msgstr ""
+msgstr "আপনার ইমেইল ঠিকানা দেয়া বাধà§à¦¯à¦¤à¦¾à¦®à§‚লক নয় à¦à¦¬à¦‚ শà§à¦§à§à¦®à¦¾à¦¤à§à¦° বà§à¦¯à¦¬à¦¹à¦¾à¦° করা হবে যদি ডেভলপারদের আরো তথà§à¦¯à¦¾à¦¦à¦¿à¦° জনà§à¦¯ আপনার সাথে যোগাযোগের পà§à¦°à§Ÿà§‹à¦œà¦¨ পরে।"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
+msgstr "সমসà§à¦¯à¦¾à¦° বৃতà§à¦¤à¦¾à¦¨à§à¦¤ (শà§à¦§à§à¦®à¦¾à¦¤à§à¦° ইংরেজি ভাষা বà§à¦¯à¦¬à¦¹à¦¾à¦° করà§à¦¨):"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
msgstr ""
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
msgstr ""
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.bn.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.bn.menus.po
index 4e1b66b64..0618b6c86 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.bn.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.bn.menus.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-04-06 16:31:55+0000\n"
-"PO-Revision-Date: 2015-04-12 14:14+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-06-04 20:34+0000\n"
"Last-Translator: Mehedi Hussain\n"
-"Language-Team: Bengali (http://www.transifex.com/projects/p/mpc-hc/language/bn/)\n"
+"Language-Team: Bengali (http://www.transifex.com/mpc-hc/mpc-hc/language/bn/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -18,15 +18,15 @@ msgstr ""
msgctxt "POPUP"
msgid "&File"
-msgstr "ফাইল(&F)"
+msgstr "ফাইল (&F)"
msgctxt "ID_FILE_OPENQUICK"
msgid "&Quick Open File..."
-msgstr "দà§à¦°à§à¦¤ ফাইল খà§à¦²à¦¿...(&Q)"
+msgstr "দà§à¦°à§à¦¤ ফাইল খà§à¦²à¦¿... (&Q)"
msgctxt "ID_FILE_OPENMEDIA"
msgid "&Open File..."
-msgstr "ফাইল খà§à¦²à¦¿...(&O)"
+msgstr "ফাইল খà§à¦²à¦¿... (&O)"
msgctxt "ID_FILE_OPENDVDBD"
msgid "Open &DVD/BD..."
@@ -34,219 +34,219 @@ msgstr "&DVD/BD খà§à¦²à¦¿..."
msgctxt "ID_FILE_OPENDEVICE"
msgid "Open De&vice..."
-msgstr "ডিভাইস খà§à¦²à¦¿...(&V)"
+msgstr "ডিভাইস খà§à¦²à¦¿... (&V)"
msgctxt "ID_FILE_OPENDIRECTORY"
msgid "Open Dir&ectory..."
-msgstr "ডাইরেকà§à¦Ÿà¦°à¦¿ খà§à¦²à¦¿...(&E)"
+msgstr "ডাইরেকà§à¦Ÿà¦°à¦¿ খà§à¦²à¦¿... (&E)"
msgctxt "ID_FILE_OPENDISC"
msgid "O&pen Disc"
-msgstr "ডিসà§à¦• খà§à¦²à¦¿(&P)"
+msgstr "ডিসà§à¦• খà§à¦²à¦¿ (&P)"
msgctxt "ID_RECENT_FILES"
msgid "Recent &Files"
-msgstr "সামà§à¦ªà§à¦°à¦¤à¦¿à¦• ফাইলসমূহ(&F)"
+msgstr "সামà§à¦ªà§à¦°à¦¤à¦¿à¦• ফাইলসমূহ (&F)"
msgctxt "ID_FILE_CLOSE_AND_RESTORE"
msgid "&Close"
-msgstr "চালনা বনà§à¦§ করি(&C)"
+msgstr "চালনা বনà§à¦§ করি (&C)"
msgctxt "ID_FILE_SAVE_COPY"
msgid "&Save a Copy..."
-msgstr "পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿ সেইভ করি...(&S)"
+msgstr "পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿ সেইভ করি... (&S)"
msgctxt "ID_FILE_SAVE_IMAGE"
msgid "Save &Image..."
-msgstr "ছবি সেইভ করি...(&I)"
+msgstr "ছবি সেইভ করি... (&I)"
msgctxt "ID_FILE_SAVE_THUMBNAILS"
msgid "Save &Thumbnails..."
-msgstr "থামà§à¦¬à§â€Œà¦¨à§‡à¦‡à¦²à¦¸à¦®à§‚হ সেইভ করি...(&T)"
+msgstr "থামà§à¦¬à§â€Œà¦¨à§‡à¦‡à¦²à¦¸à¦®à§‚হ সেইভ করি... (&T)"
msgctxt "ID_FILE_LOAD_SUBTITLE"
msgid "&Load Subtitle..."
-msgstr "সাবটাইটেল লোড করি...(&L)"
+msgstr "সাবটাইটেল লোড করি... (&L)"
msgctxt "ID_FILE_SAVE_SUBTITLE"
msgid "Save S&ubtitle..."
-msgstr "সাবটাইটেল সেইভ করি...(&U)"
+msgstr "সাবটাইটেল সেইভ করি... (&U)"
msgctxt "POPUP"
msgid "Subtitle Data&base"
-msgstr "সাবটাইটেল ডেটাবেস(&B)"
+msgstr "সাবটাইটেল ডেটাবেস (&B)"
msgctxt "ID_FILE_ISDB_SEARCH"
msgid "&Search..."
-msgstr "অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করি...(&S)"
+msgstr "অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করি... (&S)"
msgctxt "ID_FILE_ISDB_UPLOAD"
msgid "&Upload..."
-msgstr "আপলোড করি...(&U)"
+msgstr "আপলোড করি... (&U)"
msgctxt "ID_FILE_ISDB_DOWNLOAD"
msgid "&Download..."
-msgstr "ডাউনলোড করি...(&D)"
+msgstr "ডাউনলোড করি... (&D)"
msgctxt "ID_FILE_PROPERTIES"
msgid "P&roperties"
-msgstr "পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿à¦¸(&R)"
+msgstr "পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿à¦¸ (&R)"
msgctxt "ID_FILE_EXIT"
msgid "E&xit"
-msgstr "পà§à¦°à§‹à¦—à§à¦°à¦¾à¦® বনà§à¦§ করি(&X)"
+msgstr "পà§à¦°à§‹à¦—à§à¦°à¦¾à¦® বনà§à¦§ করি (&X)"
msgctxt "POPUP"
msgid "&View"
-msgstr "পà§à¦°à¦¦à¦°à§à¦¶à¦¨à§€(&V)"
+msgstr "পà§à¦°à¦¦à¦°à§à¦¶à¦¨à§€ (&V)"
msgctxt "ID_VIEW_CAPTIONMENU"
msgid "Caption&&Menu"
-msgstr "কà§à¦¯à¦¾à¦ªà¦¶à¦¨ আর মেনà§à¦¯à§(&M)"
+msgstr "কà§à¦¯à¦¾à¦ªà¦¶à¦¨ আর মেনà§à¦¯à§ (&M)"
msgctxt "ID_VIEW_SEEKER"
msgid "See&k Bar"
-msgstr "সীক বার(&K)"
+msgstr "সীক বার (&K)"
msgctxt "ID_VIEW_CONTROLS"
msgid "&Controls"
-msgstr "কনà§à¦Ÿà§à¦°à§‹à¦²à¦¸à¦®à§‚হ(&C)"
+msgstr "কনà§à¦Ÿà§à¦°à§‹à¦²à¦¸à¦®à§‚হ (&C)"
msgctxt "ID_VIEW_INFORMATION"
msgid "&Information"
-msgstr "তথà§à¦¯à¦¾à¦¦à¦¿(&I)"
+msgstr "তথà§à¦¯à¦¾à¦¦à¦¿ (&I)"
msgctxt "ID_VIEW_STATISTICS"
msgid "&Statistics"
-msgstr "পরিসংখà§à¦¯à¦¾à¦¨(&S)"
+msgstr "পরিসংখà§à¦¯à¦¾à¦¨ (&S)"
msgctxt "ID_VIEW_STATUS"
msgid "St&atus"
-msgstr "অবসà§à¦¥à¦¿à¦¤à¦¿(&A)"
+msgstr "অবসà§à¦¥à¦¿à¦¤à¦¿ (&A)"
msgctxt "ID_VIEW_SUBRESYNC"
msgid "Su&bresync"
-msgstr "সাবটাইটেল পà§à¦¨à¦ƒSyncকরণ(&B)"
+msgstr "সাবটাইটেল পà§à¦¨à¦ƒSyncকরণ (&B)"
msgctxt "ID_VIEW_PLAYLIST"
msgid "Pla&ylist"
-msgstr "পà§à¦²à§‡à¦²à¦¿à¦¸à§à¦Ÿ(&Y)"
+msgstr "পà§à¦²à§‡à¦²à¦¿à¦¸à§à¦Ÿ (&Y)"
msgctxt "ID_VIEW_CAPTURE"
msgid "Captu&re"
-msgstr "কà§à¦¯à¦¾à¦ªà¦šà¦¾à¦°(&R)"
+msgstr "কà§à¦¯à¦¾à¦ªà¦šà¦¾à¦° (&R)"
msgctxt "ID_VIEW_NAVIGATION"
msgid "Na&vigation"
-msgstr "নà§à¦¯à¦¾à¦­à¦¿à¦—েশন(&V)"
+msgstr "নà§à¦¯à¦¾à¦­à¦¿à¦—েশন (&V)"
msgctxt "ID_VIEW_DEBUGSHADERS"
msgid "&Debug Shaders"
-msgstr "শেইডারসমূহ ডিবাগকরণ(&D)"
+msgstr "শেইডারসমূহ ডিবাগকরণ (&D)"
msgctxt "POPUP"
msgid "&Presets..."
-msgstr "পà§à¦°à¦¿à¦¸à§‡à¦Ÿà¦¸à¦®à§à¦¹...(&P)"
+msgstr "পà§à¦°à¦¿à¦¸à§‡à¦Ÿà¦¸à¦®à§à¦¹... (&P)"
msgctxt "ID_VIEW_PRESETS_MINIMAL"
msgid "&Minimal"
-msgstr "নà§à¦¯à§‚নতম(&M)"
+msgstr "নà§à¦¯à§‚নতম (&M)"
msgctxt "ID_VIEW_PRESETS_COMPACT"
msgid "&Compact"
-msgstr "ঘনবিনà§à¦¯à¦¸à§à¦¤(&C)"
+msgstr "ঘনবিনà§à¦¯à¦¸à§à¦¤ (&C)"
msgctxt "ID_VIEW_PRESETS_NORMAL"
msgid "&Normal"
-msgstr "সাধারণ(&N)"
+msgstr "সাধারণ (&N)"
msgctxt "ID_VIEW_FULLSCREEN"
msgid "F&ull Screen"
-msgstr "ফà§à¦²à¦¸à§à¦•à§à¦°à§€à¦¨(&U)"
+msgstr "ফà§à¦²à¦¸à§à¦•à§à¦°à§€à¦¨ (&U)"
msgctxt "POPUP"
msgid "&Zoom"
-msgstr "জূম(&Z)"
+msgstr "জূম (&Z)"
msgctxt "ID_VIEW_ZOOM_50"
msgid "&50%"
-msgstr "৫০%(&5)"
+msgstr "৫০% (&5)"
msgctxt "ID_VIEW_ZOOM_100"
msgid "&100%"
-msgstr "১০০%(&1)"
+msgstr "১০০% (&1)"
msgctxt "ID_VIEW_ZOOM_200"
msgid "&200%"
-msgstr "২০০%(&2)"
+msgstr "২০০% (&2)"
msgctxt "ID_VIEW_ZOOM_AUTOFIT"
msgid "Auto &Fit"
-msgstr "সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿ পরিবà§à¦¯à¦¾à¦ªà§à¦¤à¦¿(&F)"
+msgstr "সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿ পরিবà§à¦¯à¦¾à¦ªà§à¦¤à¦¿ (&F)"
msgctxt "ID_VIEW_ZOOM_AUTOFIT_LARGER"
msgid "Auto Fit (&Larger Only)"
-msgstr "সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿ পরিবà§à¦¯à¦¾à¦ªà§à¦¤à¦¿(শà§à¦§à§ বড়ো)(&L)"
+msgstr "সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿ পরিবà§à¦¯à¦¾à¦ªà§à¦¤à¦¿(শà§à¦§à§ বড়ো) (&L)"
msgctxt "POPUP"
msgid "R&enderer Settings"
-msgstr "রেনডারার সেটিংসমূহ(&E)"
+msgstr "রেনডারার সেটিংসমূহ (&E)"
msgctxt "ID_VIEW_TEARING_TEST"
msgid "&Tearing Test"
-msgstr "সà§à¦•à§à¦°à§€à¦¨ ছিà¦à§œà§‡ যাওয়া পরীকà§à¦·à¦¾(&T)"
+msgstr "সà§à¦•à§à¦°à§€à¦¨ ছিà¦à§œà§‡ যাওয়া পরীকà§à¦·à¦¾ (&T)"
msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
msgid "&Display Statistics"
-msgstr ""
+msgstr "বৃতà§à¦¤à¦¾à¦¨à§à¦¤ পà§à¦°à¦¦à¦°à§à¦¶à¦¨ (&D)"
msgctxt "ID_VIEW_OSD_DISPLAY_TIME"
msgid "Display Current T&ime"
-msgstr ""
+msgstr "চলতি সময় পà§à¦°à¦¦à¦°à§à¦¶à¦¨ (&I)"
msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
msgid "Show &File Name"
-msgstr ""
+msgstr "ফাইলের নাম পà§à¦°à¦¦à¦°à§à¦¶à¦¨ (&F)"
msgctxt "POPUP"
msgid "&Output Range"
-msgstr "আউটপà§à¦Ÿ সীমা(&O)"
+msgstr "আউটপà§à¦Ÿ সীমা (&O)"
msgctxt "ID_VIEW_EVROUTPUTRANGE_0_255"
msgid "&0 - 255"
-msgstr "০-২৫৫(&0)"
+msgstr "০-২৫৫ (&0)"
msgctxt "ID_VIEW_EVROUTPUTRANGE_16_235"
msgid "&16 - 235"
-msgstr "১৬-২৩৫(&1)"
+msgstr "১৬-২৩৫ (&1)"
msgctxt "POPUP"
msgid "&Presentation"
-msgstr "উপসà§à¦¥à¦¾à¦ªà¦¨à¦¾(&P)"
+msgstr "উপসà§à¦¥à¦¾à¦ªà¦¨à¦¾ (&P)"
msgctxt "ID_VIEW_D3DFULLSCREEN"
msgid "D3D Fullscreen &Mode"
-msgstr "D3D ফà§à¦²à¦¸à§à¦•à§à¦°à§€à¦¨ মà§à¦¡(&M)"
+msgstr "D3D ফà§à¦²à¦¸à§à¦•à§à¦°à§€à¦¨ মà§à¦¡ (&M)"
msgctxt "ID_VIEW_FULLSCREENGUISUPPORT"
msgid "D3D Fullscreen &GUI Support"
-msgstr "D3D ফà§à¦²à¦¸à§à¦•à§à¦°à§€à¦¨ GUI সমরà§à¦¥à¦¨(&G)"
+msgstr "D3D ফà§à¦²à¦¸à§à¦•à§à¦°à§€à¦¨ GUI সমরà§à¦¥à¦¨ (&G)"
msgctxt "ID_VIEW_HIGHCOLORRESOLUTION"
msgid "10-bit &RGB Output"
-msgstr "১০-বিট RGB আউটপà§à¦Ÿ(&R)"
+msgstr "১০-বিট RGB আউটপà§à¦Ÿ (&R)"
msgctxt "ID_VIEW_FORCEINPUTHIGHCOLORRESOLUTION"
msgid "Force 10-bit RGB &Input"
-msgstr "জোরপূরà§à¦¬à¦• ১০-বিট RGB ইনপà§à¦Ÿ(&I)"
+msgstr "জোরপূরà§à¦¬à¦• ১০-বিট RGB ইনপà§à¦Ÿ (&I)"
msgctxt "ID_VIEW_FULLFLOATINGPOINTPROCESSING"
msgid "&Full Floating Point Processing"
-msgstr "সমà§à¦ªà§‚রà§à¦£ ফà§à¦²à§Œà¦Ÿà¦¿à¦‚ পয়েনà§à¦Ÿ পà§à¦°à¦•à§à¦°à¦¿à§Ÿà¦¾à¦•à¦°à¦£(&F)"
+msgstr "সমà§à¦ªà§‚রà§à¦£ ফà§à¦²à§Œà¦Ÿà¦¿à¦‚ পয়েনà§à¦Ÿ পà§à¦°à¦•à§à¦°à¦¿à§Ÿà¦¾à¦•à¦°à¦£ (&F)"
msgctxt "ID_VIEW_HALFFLOATINGPOINTPROCESSING"
msgid "&Half Floating Point Processing"
-msgstr "অরà§à¦§à§‡à¦• ফà§à¦²à§Œà¦Ÿà¦¿à¦‚ পয়েনà§à¦Ÿ পà§à¦°à¦•à§à¦°à¦¿à§Ÿà¦¾à¦•à¦°à¦£(&H)"
+msgstr "অরà§à¦§à§‡à¦• ফà§à¦²à§Œà¦Ÿà¦¿à¦‚ পয়েনà§à¦Ÿ পà§à¦°à¦•à§à¦°à¦¿à§Ÿà¦¾à¦•à¦°à¦£ (&H)"
msgctxt "ID_VIEW_DISABLEDESKTOPCOMPOSITION"
msgid "Disable desktop composition (&Aero)"
@@ -254,23 +254,23 @@ msgstr "ডেসà§à¦•à¦Ÿà¦ªà§‡à¦° উপাদান নিষà§à¦•à§à¦°à¦¿à
msgctxt "ID_VIEW_ENABLEFRAMETIMECORRECTION"
msgid "Enable Frame Time &Correction"
-msgstr "ফà§à¦°à§‡à¦®à§‡à¦° সময় সংশোধন সকà§à¦°à¦¿à§Ÿà¦•à¦°à¦£(&C)"
+msgstr "ফà§à¦°à§‡à¦®à§‡à¦° সময় সংশোধন সকà§à¦°à¦¿à§Ÿà¦•à¦°à¦£ (&C)"
msgctxt "POPUP"
msgid "&Color Management"
-msgstr "রং বà§à¦¯à¦¬à¦¸à§à¦¥à¦¾à¦ªà¦¨à¦¾(&C)"
+msgstr "রং বà§à¦¯à¦¬à¦¸à§à¦¥à¦¾à¦ªà¦¨à¦¾ (&C)"
msgctxt "ID_VIEW_CM_ENABLE"
msgid "&Enable"
-msgstr "সকà§à¦°à¦¿à§Ÿ করি(&E)"
+msgstr "সকà§à¦°à¦¿à§Ÿ করি (&E)"
msgctxt "POPUP"
msgid "&Input Type"
-msgstr "ইনপà§à¦Ÿà§‡à¦° ধরন(&I)"
+msgstr "ইনপà§à¦Ÿà§‡à¦° ধরন (&I)"
msgctxt "ID_VIEW_CM_INPUT_AUTO"
msgid "&Auto-Detect"
-msgstr "সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿ-সনাকà§à¦¤à¦•à¦°à¦£(&A)"
+msgstr "সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿ-সনাকà§à¦¤à¦•à¦°à¦£ (&A)"
msgctxt "ID_VIEW_CM_INPUT_HDTV"
msgid "&HDTV"
@@ -286,39 +286,39 @@ msgstr "SDTV &PAL"
msgctxt "POPUP"
msgid "Ambient &Light"
-msgstr "পরিবেষà§à¦Ÿà¦¿à¦¤ উজà§à¦œà§à¦¬à¦²à¦¤à¦¾(&L)"
+msgstr "পরিবেষà§à¦Ÿà¦¿à¦¤ উজà§à¦œà§à¦¬à¦²à¦¤à¦¾ (&L)"
msgctxt "ID_VIEW_CM_AMBIENTLIGHT_BRIGHT"
msgid "&Bright (2.2 Gamma)"
-msgstr "উজà§à¦œà§à¦¬à¦² (২.২ গামা)(&B)"
+msgstr "উজà§à¦œà§à¦¬à¦² (২.২ গামা) (&B)"
msgctxt "ID_VIEW_CM_AMBIENTLIGHT_DIM"
msgid "&Dim (2.35 Gamma)"
-msgstr "অনà§à¦œà§à¦œà§à¦¬à¦² (২.৩৫ গামা)(&D)"
+msgstr "অনà§à¦œà§à¦œà§à¦¬à¦² (২.৩৫ গামা) (&D)"
msgctxt "ID_VIEW_CM_AMBIENTLIGHT_DARK"
msgid "D&ark (2.4 Gamma)"
-msgstr "অনà§à¦§à¦•à¦¾à¦° (২.৪ গামা)(&A)"
+msgstr "অনà§à¦§à¦•à¦¾à¦° (২.৪ গামা) (&A)"
msgctxt "POPUP"
msgid "&Rendering Intent"
-msgstr "রেনডারিং লকà§à¦·à§à¦¯(&R)"
+msgstr "রেনডারিং লকà§à¦·à§à¦¯ (&R)"
msgctxt "ID_VIEW_CM_INTENT_PERCEPTUAL"
msgid "&Perceptual"
-msgstr "দরà§à¦¶à¦¨à¦¯à§‹à¦—à§à¦¯(&P)"
+msgstr "দরà§à¦¶à¦¨à¦¯à§‹à¦—à§à¦¯ (&P)"
msgctxt "ID_VIEW_CM_INTENT_RELATIVECOLORIMETRIC"
msgid "&Relative Colorimetric"
-msgstr "আপেকà§à¦·à¦¿à¦• কালারিমেটà§à¦°à¦¿à¦•(&R)"
+msgstr "আপেকà§à¦·à¦¿à¦• কালারিমেটà§à¦°à¦¿à¦• (&R)"
msgctxt "ID_VIEW_CM_INTENT_SATURATION"
msgid "&Saturation"
-msgstr "পরিপৃকà§à¦¤(&S)"
+msgstr "পরিপৃকà§à¦¤ (&S)"
msgctxt "ID_VIEW_CM_INTENT_ABSOLUTECOLORIMETRIC"
msgid "&Absolute Colorimetric"
-msgstr "পরম কালারিমেটà§à¦°à¦¿à¦•(&A)"
+msgstr "পরম কালারিমেটà§à¦°à¦¿à¦• (&A)"
msgctxt "POPUP"
msgid "&VSync"
@@ -330,19 +330,19 @@ msgstr "&VSync"
msgctxt "ID_VIEW_VSYNCACCURATE"
msgid "&Accurate VSync"
-msgstr "নিখà§à¦à¦¤ VSync(&A)"
+msgstr "নিখà§à¦à¦¤ VSync (&A)"
msgctxt "ID_VIEW_ALTERNATIVEVSYNC"
msgid "A&lternative VSync"
-msgstr "বিকলà§à¦ª VSync(&L)"
+msgstr "বিকলà§à¦ª VSync (&L)"
msgctxt "ID_VIEW_VSYNCOFFSET_DECREASE"
msgid "&Decrease VSync Offset"
-msgstr "VSync অফসেট হà§à¦°à¦¾à¦¸ করি(&D)"
+msgstr "VSync অফসেট হà§à¦°à¦¾à¦¸ করি (&D)"
msgctxt "ID_VIEW_VSYNCOFFSET_INCREASE"
msgid "&Increase VSync Offset"
-msgstr "VSync অফসেট বৃদà§à¦§à¦¿ করি(&I)"
+msgstr "VSync অফসেট বৃদà§à¦§à¦¿ করি (&I)"
msgctxt "POPUP"
msgid "&GPU Control"
@@ -350,51 +350,51 @@ msgstr "&GPU নিয়নà§à¦¤à§à¦°à¦£"
msgctxt "ID_VIEW_FLUSHGPU_BEFOREVSYNC"
msgid "Flush GPU &before VSync"
-msgstr "VSyncà¦à¦° আগে GPU ফà§à¦²à¦¾à¦¶ করণ(&B)"
+msgstr "VSyncà¦à¦° আগে GPU ফà§à¦²à¦¾à¦¶ করণ (&B)"
msgctxt "ID_VIEW_FLUSHGPU_AFTERPRESENT"
msgid "Flush GPU &after Present"
-msgstr "উপসà§à¦¥à¦¾à¦ªà¦¨à§‡à¦° পরে GPU ফà§à¦²à¦¾à¦¶ করণ(&A)"
+msgstr "উপসà§à¦¥à¦¾à¦ªà¦¨à§‡à¦° পরে GPU ফà§à¦²à¦¾à¦¶ করণ (&A)"
msgctxt "ID_VIEW_FLUSHGPU_WAIT"
msgid "&Wait for flushes"
-msgstr "ফà§à¦²à¦¾à¦¶à¦¸à¦®à§‚হের জনà§à¦¯ অপেকà§à¦·à¦¾à¦•à¦°à¦£(&W)"
+msgstr "ফà§à¦²à¦¾à¦¶à¦¸à¦®à§‚হের জনà§à¦¯ অপেকà§à¦·à¦¾à¦•à¦°à¦£ (&W)"
msgctxt "POPUP"
msgid "R&eset"
-msgstr "পà§à¦¨à¦°à§à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸ করণ(&E)"
+msgstr "পà§à¦¨à¦°à§à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸ করণ (&E)"
msgctxt "ID_VIEW_RESET_DEFAULT"
msgid "Reset to &default renderer settings"
-msgstr "ডিফলà§à¦Ÿ রেনডারার সেটিংসমূহে পà§à¦¨à¦°à§à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸(&D)"
+msgstr "ডিফলà§à¦Ÿ রেনডারার সেটিংসমূহে পà§à¦¨à¦°à§à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸ (&D)"
msgctxt "ID_VIEW_RESET_OPTIMAL"
msgid "Reset to &optimal renderer settings"
-msgstr "সরà§à¦¬à§‹à¦¤à§à¦¤à¦® রেনডারার সেটিংসমূহে পà§à¦¨à¦°à§à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸(&O)"
+msgstr "সরà§à¦¬à§‹à¦¤à§à¦¤à¦® রেনডারার সেটিংসমূহে পà§à¦¨à¦°à§à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸ (&O)"
msgctxt "POPUP"
msgid "Video &Frame"
-msgstr "ভিডিও ফà§à¦°à§‡à¦®(&F)"
+msgstr "ভিডিও ফà§à¦°à§‡à¦® (&F)"
msgctxt "ID_VIEW_VF_HALF"
msgid "&Half Size"
-msgstr "অরà§à¦§à§‡à¦• সাইজ(&H)"
+msgstr "অরà§à¦§à§‡à¦• সাইজ (&H)"
msgctxt "ID_VIEW_VF_NORMAL"
msgid "&Normal Size"
-msgstr "সà§à¦¬à¦¾à¦­à¦¾à¦¬à¦¿à¦• সাইজ(&N)"
+msgstr "সà§à¦¬à¦¾à¦­à¦¾à¦¬à¦¿à¦• সাইজ (&N)"
msgctxt "ID_VIEW_VF_DOUBLE"
msgid "&Double Size"
-msgstr "দà§à¦¬à¦¿à¦—à§à¦£ সাইজ(&D)"
+msgstr "দà§à¦¬à¦¿à¦—à§à¦£ সাইজ (&D)"
msgctxt "ID_VIEW_VF_STRETCH"
msgid "&Stretch To Window"
-msgstr "উইনà§à¦¡à§‹ পরà§à¦¯à¦¨à§à¦¤ বিসà§à¦¤à§ƒà¦¤à¦¿(&S)"
+msgstr "উইনà§à¦¡à§‹ পরà§à¦¯à¦¨à§à¦¤ বিসà§à¦¤à§ƒà¦¤à¦¿ (&S)"
msgctxt "ID_VIEW_VF_FROMINSIDE"
msgid "Touch Window From &Inside"
-msgstr "উইনà§à¦¡à§‹à¦° ভিতরে বিসà§à¦¤à¦¾à¦°à¦£(&I)"
+msgstr "উইনà§à¦¡à§‹à¦° ভিতরে বিসà§à¦¤à¦¾à¦°à¦£ (&I)"
msgctxt "ID_VIEW_VF_ZOOM1"
msgid "Zoom &1"
@@ -406,19 +406,19 @@ msgstr "জূম &2"
msgctxt "ID_VIEW_VF_FROMOUTSIDE"
msgid "Touch Window From &Outside"
-msgstr "উইনà§à¦¡à§‹à¦° বাইরে বিসà§à¦¤à¦¾à¦°à¦£(&O)"
+msgstr "উইনà§à¦¡à§‹à¦° বাইরে বিসà§à¦¤à¦¾à¦°à¦£ (&O)"
msgctxt "ID_VIEW_VF_KEEPASPECTRATIO"
msgid "&Keep Aspect Ratio"
-msgstr "অà§à¦¯à¦¾à¦¸à¦ªà§‡à¦•à§à¦Ÿ রেশিও রকà§à¦·à¦¾à¦•à¦°à¦£(&K)"
+msgstr "অà§à¦¯à¦¾à¦¸à¦ªà§‡à¦•à§à¦Ÿ রেশিও রকà§à¦·à¦¾à¦•à¦°à¦£ (&K)"
msgctxt "POPUP"
msgid "Override &Aspect Ratio"
-msgstr "অà§à¦¯à¦¾à¦¸à¦ªà§‡à¦•à§à¦Ÿ রেশিও ওভাররাইড করণ(&A)"
+msgstr "অà§à¦¯à¦¾à¦¸à¦ªà§‡à¦•à§à¦Ÿ রেশিও ওভাররাইড করণ (&A)"
msgctxt "ID_ASPECTRATIO_SOURCE"
msgid "&Default"
-msgstr "ডিফলà§à¦Ÿ(&D)"
+msgstr "ডিফলà§à¦Ÿ (&D)"
msgctxt "ID_ASPECTRATIO_4_3"
msgid "&4:3"
@@ -442,155 +442,155 @@ msgstr "1&85:100"
msgctxt "ID_VIEW_VF_COMPMONDESKARDIFF"
msgid "&Correct Monitor/Desktop AR Diff"
-msgstr "মনিটর/ডেসà§à¦•à¦Ÿà¦ª AR বৈসাদৃশà§à¦¯ ঠিককরণ(&C)"
+msgstr "মনিটর/ডেসà§à¦•à¦Ÿà¦ª AR বৈসাদৃশà§à¦¯ ঠিককরণ (&C)"
msgctxt "POPUP"
msgid "Pa&n&&Scan"
-msgstr "পà§à¦¯à¦¾à¦¨à¦…à§à¦¯à¦¾à¦¨à§à¦¡à¦¸à§à¦•à§à¦¯à¦¾à¦¨(&N)"
+msgstr "পà§à¦¯à¦¾à¦¨à¦…à§à¦¯à¦¾à¦¨à§à¦¡à¦¸à§à¦•à§à¦¯à¦¾à¦¨ (&N)"
msgctxt "ID_VIEW_INCSIZE"
msgid "&Increase Size"
-msgstr "সাইজ বৃদà§à¦§à¦¿ করি(&I)"
+msgstr "সাইজ বৃদà§à¦§à¦¿ করি (&I)"
msgctxt "ID_VIEW_DECSIZE"
msgid "&Decrease Size"
-msgstr "সাইজ হà§à¦°à¦¾à¦¸ করি(&D)"
+msgstr "সাইজ হà§à¦°à¦¾à¦¸ করি (&D)"
msgctxt "ID_VIEW_INCWIDTH"
msgid "I&ncrease Width"
-msgstr "পà§à¦°à¦¸à§à¦¥ বৃদà§à¦§à¦¿ করি(&N)"
+msgstr "পà§à¦°à¦¸à§à¦¥ বৃদà§à¦§à¦¿ করি (&N)"
msgctxt "ID_VIEW_DECWIDTH"
msgid "D&ecrease Width"
-msgstr "পà§à¦°à¦¸à§à¦¥ হà§à¦°à¦¾à¦¸ করি(&E)"
+msgstr "পà§à¦°à¦¸à§à¦¥ হà§à¦°à¦¾à¦¸ করি (&E)"
msgctxt "ID_VIEW_INCHEIGHT"
msgid "In&crease Height"
-msgstr "উচà§à¦šà¦¤à¦¾ বৃদà§à¦§à¦¿ করি(&C)"
+msgstr "উচà§à¦šà¦¤à¦¾ বৃদà§à¦§à¦¿ করি (&C)"
msgctxt "ID_VIEW_DECHEIGHT"
msgid "Decre&ase Height"
-msgstr "উচà§à¦šà¦¤à¦¾ হà§à¦°à¦¾à¦¸ করি(&A)"
+msgstr "উচà§à¦šà¦¤à¦¾ হà§à¦°à¦¾à¦¸ করি (&A)"
msgctxt "ID_PANSCAN_MOVERIGHT"
msgid "Move &Right"
-msgstr "ডানে সরাই(&R)"
+msgstr "ডানে সরাই (&R)"
msgctxt "ID_PANSCAN_MOVELEFT"
msgid "Move &Left"
-msgstr "বামে সরাই(&L)"
+msgstr "বামে সরাই (&L)"
msgctxt "ID_PANSCAN_MOVEUP"
msgid "Move &Up"
-msgstr "উপরে সরাই(&U)"
+msgstr "উপরে সরাই (&U)"
msgctxt "ID_PANSCAN_MOVEDOWN"
msgid "Move &Down"
-msgstr "নিচে সরাই(&D)"
+msgstr "নিচে সরাই (&D)"
msgctxt "ID_PANSCAN_CENTER"
msgid "Cen&ter"
-msgstr "কেনà§à¦¦à§à¦°à§‡ সরাই(&T)"
+msgstr "কেনà§à¦¦à§à¦°à§‡ সরাই (&T)"
msgctxt "ID_VIEW_RESET"
msgid "Re&set"
-msgstr "পà§à¦¨à¦°à§à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸ করি(&S)"
+msgstr "পà§à¦¨à¦°à§à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸ করি (&S)"
msgctxt "POPUP"
msgid "On &Top"
-msgstr "উপরে অবসà§à¦¥à¦¾à¦¨(&T)"
+msgstr "উপরে অবসà§à¦¥à¦¾à¦¨ (&T)"
msgctxt "ID_ONTOP_DEFAULT"
msgid "&Default"
-msgstr "ডিফলà§à¦Ÿ(&D)"
+msgstr "ডিফলà§à¦Ÿ (&D)"
msgctxt "ID_ONTOP_ALWAYS"
msgid "&Always"
-msgstr "সবসময়(&A)"
+msgstr "সবসময় (&A)"
msgctxt "ID_ONTOP_WHILEPLAYING"
msgid "While &Playing"
-msgstr "পà§à¦²à§‡ করার সময়(&P)"
+msgstr "পà§à¦²à§‡ করার সময় (&P)"
msgctxt "ID_ONTOP_WHILEPLAYINGVIDEO"
msgid "While Playing &Video"
-msgstr "ভিডিও পà§à¦²à§‡ করার সময়(&V)"
+msgstr "ভিডিও পà§à¦²à§‡ করার সময় (&V)"
msgctxt "ID_VIEW_OPTIONS"
msgid "&Options..."
-msgstr "অপশনসমূহ...(&O)"
+msgstr "অপশনসমূহ... (&O)"
msgctxt "POPUP"
msgid "&Play"
-msgstr "পà§à¦²à§‡(&P)"
+msgstr "পà§à¦²à§‡ (&P)"
msgctxt "ID_PLAY_PLAYPAUSE"
msgid "&Play/Pause"
-msgstr "পà§à¦²à§‡/প'জ করি(&P)"
+msgstr "পà§à¦²à§‡/প'জ করি (&P)"
msgctxt "ID_PLAY_STOP"
msgid "&Stop"
-msgstr "বনà§à¦§ করি(&S)"
+msgstr "বনà§à¦§ করি (&S)"
msgctxt "ID_PLAY_FRAMESTEP"
msgid "F&rame Step"
-msgstr "ফà§à¦°à§‡à¦®à§‡à¦° পদকà§à¦·à§‡à¦ª(&R)"
+msgstr "ফà§à¦°à§‡à¦®à§‡à¦° পদকà§à¦·à§‡à¦ª (&R)"
msgctxt "ID_PLAY_DECRATE"
msgid "&Decrease Rate"
-msgstr "গতি হà§à¦°à¦¾à¦¸ করি(&D)"
+msgstr "গতি হà§à¦°à¦¾à¦¸ করি (&D)"
msgctxt "ID_PLAY_INCRATE"
msgid "&Increase Rate"
-msgstr "গতি বৃদà§à¦§à¦¿ করি(&I)"
+msgstr "গতি বৃদà§à¦§à¦¿ করি (&I)"
msgctxt "ID_PLAY_RESETRATE"
msgid "R&eset Rate"
-msgstr "গতি পà§à¦¨à¦°à§à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸ করি(&E)"
+msgstr "গতি পà§à¦¨à¦°à§à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸ করি (&E)"
msgctxt "ID_FILTERS"
msgid "&Filters"
-msgstr "ফিলà§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ(&F)"
+msgstr "ফিলà§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ (&F)"
msgctxt "ID_SHADERS"
msgid "S&haders"
-msgstr "শেইডারসমূহ(&H)"
+msgstr "শেইডারসমূহ (&H)"
msgctxt "ID_AUDIOS"
msgid "&Audio Track"
-msgstr "অডিও টà§à¦°à§à¦¯à¦¾à¦•(&A)"
+msgstr "অডিও টà§à¦°à§à¦¯à¦¾à¦• (&A)"
msgctxt "ID_SUBTITLES"
msgid "Su&btitle Track"
-msgstr "সাবটাইটেল টà§à¦°à§à¦¯à¦¾à¦•(&B)"
+msgstr "সাবটাইটেল টà§à¦°à§à¦¯à¦¾à¦• (&B)"
msgctxt "ID_VIDEO_STREAMS"
msgid "&Video Track"
-msgstr "ভিডিও টà§à¦°à§à¦¯à¦¾à¦•(&V)"
+msgstr "ভিডিও টà§à¦°à§à¦¯à¦¾à¦• (&V)"
msgctxt "POPUP"
msgid "&Volume"
-msgstr "ভলিউম(&V)"
+msgstr "ভলিউম (&V)"
msgctxt "ID_VOLUME_UP"
msgid "&Up"
-msgstr "বাড়াই(&U)"
+msgstr "বাড়াই (&U)"
msgctxt "ID_VOLUME_DOWN"
msgid "&Down"
-msgstr "কমাই(&D)"
+msgstr "কমাই (&D)"
msgctxt "ID_VOLUME_MUTE"
msgid "&Mute"
-msgstr "নিঃশবà§à¦¦ করি(&M)"
+msgstr "নিঃশবà§à¦¦ করি (&M)"
msgctxt "POPUP"
msgid "Af&ter Playback"
-msgstr "পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦•à§‡à¦° পরে(&T)"
+msgstr "পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦•à§‡à¦° পরে (&T)"
msgctxt "ID_AFTERPLAYBACK_DONOTHING"
msgid "Do no&thing"
-msgstr ""
+msgstr "কোন কিছৠকরি না (&T)"
msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
msgid "Play &next file in the folder"
@@ -598,101 +598,101 @@ msgstr "ফোলà§à¦¡à¦¾à¦°à§‡à¦° পরবরà§à¦¤à§€ ফাইলটি প
msgctxt "ID_AFTERPLAYBACK_MONITOROFF"
msgid "Turn off the &monitor"
-msgstr "মনিটর বনà§à¦§ করি(&M)"
+msgstr "মনিটর বনà§à¦§ করি (&M)"
msgctxt "ID_AFTERPLAYBACK_EXIT"
msgid "&Exit"
-msgstr "পà§à¦°à§‹à¦—à§à¦°à¦¾à¦® বনà§à¦§ করি(&E)"
+msgstr "পà§à¦°à§‹à¦—à§à¦°à¦¾à¦® বনà§à¦§ করি (&E)"
msgctxt "ID_AFTERPLAYBACK_STANDBY"
msgid "&Stand By"
-msgstr "কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦° সà§à¦²à¦¿à¦ª করি(&S)"
+msgstr "কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦° সà§à¦²à¦¿à¦ª করি (&S)"
msgctxt "ID_AFTERPLAYBACK_HIBERNATE"
msgid "&Hibernate"
-msgstr "কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦° হাইবারনেট করি(&H)"
+msgstr "কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦° হাইবারনেট করি (&H)"
msgctxt "ID_AFTERPLAYBACK_SHUTDOWN"
msgid "Shut&down"
-msgstr "কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦° শাটডাউন করি(&D)"
+msgstr "কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦° শাটডাউন করি (&D)"
msgctxt "ID_AFTERPLAYBACK_LOGOFF"
msgid "Log &Off"
-msgstr "কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦° লগ অফ করি(&O)"
+msgstr "কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦° লগ অফ করি (&O)"
msgctxt "ID_AFTERPLAYBACK_LOCK"
msgid "&Lock"
-msgstr "কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦° লক করি(&L)"
+msgstr "কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦° লক করি (&L)"
msgctxt "POPUP"
msgid "&Navigate"
-msgstr "নà§à¦¯à¦¾à¦­à¦¿à¦—েট(&N)"
+msgstr "নà§à¦¯à¦¾à¦­à¦¿à¦—েট (&N)"
msgctxt "ID_NAVIGATE_SKIPBACK"
msgid "&Previous"
-msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€(&P)"
+msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ (&P)"
msgctxt "ID_NAVIGATE_SKIPFORWARD"
msgid "&Next"
-msgstr "পরবরà§à¦¤à§€(&N)"
+msgstr "পরবরà§à¦¤à§€ (&N)"
msgctxt "ID_NAVIGATE_GOTO"
msgid "&Go To..."
-msgstr "নিরà§à¦¦à¦¿à¦·à§à¦Ÿ সময়/ফà§à¦°à§‡à¦®à§‡ যাই...(&G)"
+msgstr "নিরà§à¦¦à¦¿à¦·à§à¦Ÿ সময়/ফà§à¦°à§‡à¦®à§‡ যাই... (&G)"
msgctxt "ID_NAVIGATE_TITLEMENU"
msgid "&Title Menu"
-msgstr "টাইটেল মেনà§à¦¯à§(&T)"
+msgstr "টাইটেল মেনà§à¦¯à§ (&T)"
msgctxt "ID_NAVIGATE_ROOTMENU"
msgid "&Root Menu"
-msgstr "মূল মেনà§à¦¯à§(&R)"
+msgstr "মূল মেনà§à¦¯à§ (&R)"
msgctxt "ID_NAVIGATE_SUBPICTUREMENU"
msgid "&Subtitle Menu"
-msgstr "সাবটাইটেল মেনà§à¦¯à§(&S)"
+msgstr "সাবটাইটেল মেনà§à¦¯à§ (&S)"
msgctxt "ID_NAVIGATE_AUDIOMENU"
msgid "&Audio Menu"
-msgstr "অডিও মেনà§à¦¯à§(&A)"
+msgstr "অডিও মেনà§à¦¯à§ (&A)"
msgctxt "ID_NAVIGATE_ANGLEMENU"
msgid "An&gle Menu"
-msgstr "কà§à¦¯à¦¾à¦®à§‡à¦°à¦¾ অà§à¦¯à¦¾à¦™à§à¦—েল মেনà§à¦¯à§(&G)"
+msgstr "কà§à¦¯à¦¾à¦®à§‡à¦°à¦¾ অà§à¦¯à¦¾à¦™à§à¦—েল মেনà§à¦¯à§ (&G)"
msgctxt "ID_NAVIGATE_CHAPTERMENU"
msgid "&Chapter Menu"
-msgstr "পরিচà§à¦›à§‡à¦¦ মেনà§à¦¯à§(&C)"
+msgstr "পরিচà§à¦›à§‡à¦¦ মেনà§à¦¯à§ (&C)"
msgctxt "ID_FAVORITES"
msgid "F&avorites"
-msgstr "পছনà§à¦¦à¦¤à¦¾à¦²à¦¿à¦•à¦¾(&A)"
+msgstr "পছনà§à¦¦à¦¤à¦¾à¦²à¦¿à¦•à¦¾ (&A)"
msgctxt "POPUP"
msgid "&Help"
-msgstr "সাহাযà§à¦¯(&H)"
+msgstr "সহায়িকা (&H)"
msgctxt "ID_HELP_HOMEPAGE"
msgid "&Home Page"
-msgstr "হোম পেইজ(&H)"
+msgstr "হোম পেইজ (&H)"
msgctxt "ID_HELP_CHECKFORUPDATE"
msgid "Check for &updates"
-msgstr "হালনাগাদ অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করি(&U)"
+msgstr "হালনাগাদ অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করি (&U)"
msgctxt "ID_HELP_SHOWCOMMANDLINESWITCHES"
msgid "&Command Line Switches"
-msgstr "কমানà§à¦¡ লাইনের নিরà§à¦¦à§‡à¦¶à¦¨à¦¾à¦¸à¦®à§‚হ(&C)"
+msgstr "কমানà§à¦¡ লাইনের নিরà§à¦¦à§‡à¦¶à¦¨à¦¾à¦¸à¦®à§‚হ (&C)"
msgctxt "ID_HELP_TOOLBARIMAGES"
msgid "Download &Toolbar Images"
-msgstr "টà§à¦²à¦¬à¦¾à¦°à§‡à¦° ছবি ডাউনলোড করি(&T)"
+msgstr "টà§à¦²à¦¬à¦¾à¦°à§‡à¦° ছবি ডাউনলোড করি (&T)"
msgctxt "ID_HELP_DONATE"
msgid "&Donate"
-msgstr "আরà§à¦¥à¦¸à¦¹à¦¾à§Ÿà¦¤à¦¾(&D)"
+msgstr "আরà§à¦¥à¦¸à¦¹à¦¾à§Ÿà¦¤à¦¾ (&D)"
msgctxt "ID_HELP_ABOUT"
msgid "&About..."
-msgstr "MPC-HC বিষয়ক...(&A)"
+msgstr "MPC-HC বিষয়ক... (&A)"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.bn.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.bn.strings.po
index a29e1944a..f0d14dade 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.bn.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.bn.strings.po
@@ -3,14 +3,16 @@
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Mehedi Hussain, 2014
+# Mehedi Hussain, 2014
+# Mehedi Hussain, 2015
# mehzad, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-04-09 21:29:25+0000\n"
-"PO-Revision-Date: 2015-04-12 14:14+0000\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-09-10 11:01+0000\n"
"Last-Translator: Mehedi Hussain\n"
-"Language-Team: Bengali (http://www.transifex.com/projects/p/mpc-hc/language/bn/)\n"
+"Language-Team: Bengali (http://www.transifex.com/mpc-hc/mpc-hc/language/bn/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -326,11 +328,11 @@ msgid "On/Off"
msgstr "চালà§/বনà§à¦§"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr "FPS থেকে"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr "FPSà¦à¦° দিকে"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -465,6 +467,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦•::শেইডারসমূহ"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "উৎসসমূহ"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "বিবিধ"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "মিডিয়া ইনà§â€Œà¦«à§‹"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦•::কà§à¦¯à¦¾à¦ªà¦šà¦¾à¦°"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦•::Sync Renderer সেটিংসমূহ"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦•::ফà§à¦²à¦¸à§à¦•à§à¦°à§€à¦¨"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "আভà§à¦¯à¦¨à§à¦¤à¦°à§€à¦£ ফিলà§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ::অডিও রেনডারার"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "অডিও পরিবরà§à¦¤à¦¨à¦•à¦¾à¦°à§€"
@@ -557,30 +587,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "সাবটাইটেল::ডেটাবেস"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "উৎসসমূহ"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "বিবিধ"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "মিডিয়া ইনà§â€Œà¦«à§‹"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦•::কà§à¦¯à¦¾à¦ªà¦šà¦¾à¦°"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦•::Sync Renderer সেটিংসমূহ"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦•::ফà§à¦²à¦¸à§à¦•à§à¦°à§€à¦¨"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "বিসà§à¦¤à¦¾à¦°à¦¿à¦¤"
@@ -673,22 +679,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "ভিডিও উপরিতলটি à¦à¦•à¦Ÿà¦¿ সাধারণ বাইরেরসà§à¦•à§à¦°à§€à¦¨ উপরিতল হিসেবে নিরà§à¦¦à§‡à¦¶à¦¿à¦¤ হবে।"
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC অডিও রেনডারারটি অকেজো হয়ে পরেছে, à¦à¦Ÿà¦¾ বà§à¦¯à¦¬à¦¹à¦¾à¦° করবেন না।"
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - যানà§à¦¤à§à¦°à¦¿à¦•-তà§à¦°à§à¦Ÿà¦¿(বাগ) বিষয়ক পà§à¦°à¦¤à¦¿à¦¬à§‡à¦¦à¦¨ পেশ করা হচà§à¦›à§‡"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC à¦à¦‡à¦®à¦¾à¦¤à§à¦° চালনা বনà§à¦§ হয়ে গেল কিনà§à¦¤à§ à¦à¦‡ নিরà§à¦®à¦¾à¦£à¦Ÿà¦¿ ডিবাগ তথà§à¦¯à¦¾à¦¦à¦¿ ছাড়া সঙà§à¦•à¦²à¦¨ করা হয়েছে।\nআপনি যদি à¦à¦‡ যানà§à¦¤à§à¦°à¦¿à¦•-তà§à¦°à§à¦Ÿà¦¿à¦Ÿà¦¿ সমà§à¦ªà¦°à§à¦•à§‡ পà§à¦°à¦¤à¦¿à¦¬à§‡à¦¦à¦¨ পেশ করতে চান, তাহলে পà§à¦°à¦¥à¦®à§‡ à¦à¦•à¦Ÿà¦¿ আনà§à¦·à§à¦ à¦¾à¦¨à¦¿à¦• নিরà§à¦®à¦¾à¦£ চেষà§à¦Ÿà¦¾ করে দেখà§à¦¨à¥¤\n\nআপনি কি à¦à¦–নই ডাউনলোড ওয়েবপেইজটিতে যেতে চান? "
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "সাধারণ বাইরেরসà§à¦•à§à¦°à§€à¦¨ মসৃণ উপরিতল"
@@ -703,7 +697,7 @@ msgstr "তà§à¦°à¦¿à¦®à¦¾à¦¤à§à¦°à¦¿à¦• উপরিতলসমূহ (পর
msgctxt "IDS_PPAGE_OUTPUT_RESIZE_NN"
msgid "Nearest neighbor"
-msgstr "সবচেয়ে নিকটবরà§à¦¤à§€ পà§à¦°à¦¤à¦¿à¦¬à§‡à¦¶à§€"
+msgstr "সবচেয়ে নিকটবরà§à¦¤à§€ সাইজপরিবরà§à¦¤à¦¨"
msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BILIN"
msgid "Bilinear"
@@ -741,9 +735,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (uncompressed)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "আভà§à¦¯à¦¨à§à¦¤à¦°à§€à¦£ অডিও রেনডারার"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1379,18 +1373,38 @@ msgstr "ফাইলে নিবনà§à¦§à¦¨ করা সকà§à¦°à¦¿à§Ÿà¦•à¦°
msgctxt "IDS_TIMER_REMAINING_TIME"
msgid "Remaining time"
-msgstr ""
+msgstr "অবশিষà§à¦Ÿ সময়"
msgctxt "IDS_TIMER_HIGH_PRECISION"
msgid "High precision"
-msgstr ""
+msgstr "নিখà§à¦à¦¤à¦­à¦¾à¦¬à§‡"
msgctxt "IDS_AFTERPLAYBACK_REWIND"
msgid "After Playback: Rewind current file"
-msgstr ""
+msgstr "পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦•à§‡à¦° পরে: চলতি ফাইলটি পà§à¦¨à¦°à¦¾à§Ÿ চালনা"
msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
+msgstr "পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦•à§‡à¦° পরে: বনà§à¦§ করি"
+
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "ইনিশিয়ালাইজেশন পà§à¦°à¦•à§à¦°à¦¿à§Ÿà¦¾ চলার সময় MPC-HC à¦à¦•à¦Ÿà¦¿ সমসà§à¦¯à¦¾à¦° মà§à¦–োমà§à¦–ি হয়েছে। আপনার সহযোগিতার মাধà§à¦¯à¦®à§‡ বিষয়টি আমরা সমাধান করলেও করতে পারি।\n\nআপনি কি à¦à¦‡ বিষয়ে পà§à¦°à¦¤à¦¿à¦¬à§‡à¦¦à¦¨ পেশ করতে চান?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "অডিও আগে আসলে à¦à¦•à¦Ÿà¦¿ ধনাতà§à¦®à¦• মান পà§à¦°à¦¬à§‡à¦¶ করান, পরে আসলে à¦à¦•à¦Ÿà¦¿ ঋণাতà§à¦®à¦• মান পà§à¦°à¦¬à§‡à¦¶ করান।"
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "à¦à¦‡ মà§à¦¹à§‚রà§à¦¤à§‡ পà§à¦°à¦¾à¦•à¦¦à¦°à§à¦¶à¦¨ নিষà§à¦•à§à¦°à¦¿à§Ÿ অবসà§à¦¥à¦¾à§Ÿ রয়েছে। আপনি সেটি MPC-HCà¦à¦° অপশনসমূহ থেকে সকà§à¦°à¦¿à§Ÿ করতে পারেন।"
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
msgstr ""
msgctxt "IDS_AG_OPEN_DEVICE"
@@ -1675,15 +1689,23 @@ msgstr "শà§à¦°à§à¦¤à§‡ লাফিয়ে যাই"
msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
-msgstr ""
+msgstr "OSD: ফাইলের নাম পà§à¦°à¦¦à¦°à§à¦¶à¦¨"
+
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "DVD চালনা করি"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "BD চালনা করি"
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
-msgstr ""
+msgstr "OSD: রেনডারারের বৃতà§à¦¤à¦¾à¦¨à§à¦¤ পà§à¦°à¦¦à¦°à§à¦¶à¦¨"
msgctxt "IDS_OSD_RESET_RENDERER_STATS"
msgid "OSD: Reset Renderer Statistics"
-msgstr ""
+msgstr "OSD: রেনডারারের পরিসংখà§à¦¯à¦¾à¦¨ পà§à¦¨à¦°à§à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸à¦•à¦°à¦£"
msgctxt "IDD_PPAGESUBMISC"
msgid "Subtitles::Misc"
@@ -1958,20 +1980,20 @@ msgid "Options"
msgstr "অপশনসমূহ"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "পরবরà§à¦¤à§€ অডিও"
+msgid "Next Audio Track"
+msgstr "পরবরà§à¦¤à§€ অডিও টà§à¦°à§à¦¯à¦¾à¦•"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ অডিও"
+msgid "Prev Audio Track"
+msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ অডিও টà§à¦°à§à¦¯à¦¾à¦•"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "পরবরà§à¦¤à§€ সাবটাইটেল"
+msgid "Next Subtitle Track"
+msgstr "পরবরà§à¦¤à§€ সাবটাইটেল টà§à¦°à§à¦¯à¦¾à¦•"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ সাবটাইটেল"
+msgid "Prev Subtitle Track"
+msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ সাবটাইটেল টà§à¦°à§à¦¯à¦¾à¦•"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1981,22 +2003,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "সাবটাইটেল পà§à¦¨à¦°à¦¾à§Ÿ লোড করি"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "পরবরà§à¦¤à§€ অডিও (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ অডিও (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "পরবরà§à¦¤à§€ সাবটাইটেল (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ সাবটাইটেল (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "পরবরà§à¦¤à§€ কà§à¦¯à¦¾à¦®à§‡à¦°à¦¾ অà§à¦¯à¦¾à¦™à§à¦—েল (DVD)"
@@ -2006,20 +2012,20 @@ msgid "Prev Angle (DVD)"
msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ কà§à¦¯à¦¾à¦®à§‡à¦°à¦¾ অà§à¦¯à¦¾à¦™à§à¦—েল (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "পরবরà§à¦¤à§€ অডিও (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "পরবরà§à¦¤à§€ অডিও টà§à¦°à§à¦¯à¦¾à¦• (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ অডিও (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ অডিও টà§à¦°à§à¦¯à¦¾à¦• (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "পরবরà§à¦¤à§€ সাবটাইটেল (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "পরবরà§à¦¤à§€ সাবটাইটেল টà§à¦°à§à¦¯à¦¾à¦• (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ সাবটাইটেল (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ সাবটাইটেল টà§à¦°à§à¦¯à¦¾à¦• (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2027,7 +2033,7 @@ msgstr "সাবটাইটেল চালà§/বনà§à¦§ করি (DVD)"
msgctxt "IDS_OSD_DISPLAY_CURRENT_TIME"
msgid "OSD: Display Current Time"
-msgstr ""
+msgstr "OSD: চলতি সময় পà§à¦°à¦¦à¦°à§à¦¶à¦¨"
msgctxt "IDS_PPAGEWEBSERVER_0"
msgid "Select the directory"
@@ -2385,14 +2391,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "চলতি"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC অপà§à¦°à¦¤à§à¦¯à¦¾à¦¶à¦¿à¦¤à¦­à¦¾à¦¬à§‡ বনà§à¦§ হয়ে গেয়ে ছিল। à¦à¦‡ সমসà§à¦¯à¦¾à¦Ÿà¦¿ সমাধানে আমাদের সাহাযà§à¦¯ করতে চাইলে, অনà§à¦—à§à¦°à¦¹à¦ªà§‚রà§à¦¬à¦• à¦à¦‡ ফাইলটি \"%s\" আমাদের বাগ টà§à¦°à§à¦¯à¦¾à¦•à¦¾à¦°à¦ পাঠিয়ে দিন।\n\nআপনি কি à¦à¦‡ মà§à¦¹à§‚রà§à¦¤à§‡à¦‡ মিনিডামà§à¦ª ধারণকারী ফোলà§à¦¡à¦¾à¦°à¦Ÿà¦¿ খà§à¦²à¦¤à§‡ চান à¦à¦¬à¦‚ বাগ টà§à¦°à§à¦¯à¦¾à¦•à¦¾à¦°à¦à¦° ওয়েবপেইজটিতে যেতে চান?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "\"%s\" ঠডামà§à¦ª ফাইল তৈরি করতে বà§à¦¯à¦°à§à¦¥ হয়েছে (সমসà§à¦¯à¦¾ %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "ডাইরেকà§à¦Ÿà¦°à¦¿ নিরà§à¦§à¦¾à¦°à¦£"
@@ -2566,8 +2564,8 @@ msgid "Volume boost Max"
msgstr "ভলিউমের উনà§à¦¨à¦¤à¦¿à¦¸à¦¾à¦§à¦¨ সরà§à¦¬à§‹à¦šà§à¦š"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "বà§à¦¯à¦¬à¦¹à¦¾à¦°à¦¬à¦¿à¦§à¦¿: mpc-hc.exe \"pathname\" [নিরà§à¦¦à§‡à¦¶à¦¨à¦¾à¦¸à¦®à§‚হ]\n\n\"pathname\"\\tযে মূল ফাইল বা ডিরেকà§à¦Ÿà¦°à¦¿ লোড করা হবে (ওয়াইলà§à¦¡à¦•à¦¾à¦°à§à¦¡ কà§à¦¯à¦¾à¦°à§‡à¦•à§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ\n\\t\\tবà§à¦¯à¦¬à¦¹à¦¾à¦° করা যাবে, সাধারণ ইনপà§à¦Ÿà¦Ÿà¦¿ \"-\" চিহà§à¦¨ দà§à¦¬à¦¾à¦°à¦¾ সূচিত করà§à¦¨)\n/dub \"dubname\"\\tঅতিরিকà§à¦¤ অডিও ফাইল লোড করণ\n/dubdelay \"file\"\\tঅতিরিকà§à¦¤ অডিও ফাইল XXms সময়ের সà§à¦¥à¦¾à¦¨à¦¾à¦¨à§à¦¤à¦° করে লোড করণ\n\\t\\t(যদি ফাইলটিতে \"...DELAY XXms...\" থেকে থাকে)\n/d3dfs\\t\\tD3D ফà§à¦²à¦¸à§à¦•à§à¦°à§€à¦¨ মà§à¦¡à§‡ রেনডার করা শà§à¦°à§ করণ\n/sub \"subname\"\\tঅতিরিকà§à¦¤ সাবটাইটেল ফাইল লোড করণ\n/filter \"filtername\"\\tডাইনামিক লিঙà§à¦• লাইবà§à¦°à§‡à¦°à¦¿ থেকে DirectShow ফিলà§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ লোড\n\\t\\tকরণ (ওয়াইলà§à¦¡à¦•à¦¾à¦°à§à¦¡ কà§à¦¯à¦¾à¦°à§‡à¦•à§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ বà§à¦¯à¦¬à¦¹à¦¾à¦° করা যাবে)\n/dvd\\t\\tDVD মà§à¦¡à§‡ চালনা করণ, \"pathname\" হবে dvd ফোলà§à¦¡à¦¾à¦°à¦Ÿà¦¿ (à¦à¦šà§à¦›à¦¿à¦•)\n/dvdpos T#C\\tটাইটেল T à¦à¦° পরিচà§à¦›à§‡à¦¦ C থেকে পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শà§à¦°à§ করণ\n/dvdpos T#hh:mm\\tটাইটেল T à¦à¦° অবসà§à¦¥à¦¾à¦¨à¦•à¦¾à¦² hh:mm:ss থেকে পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শà§à¦°à§ করণ\n/cd\\t\\tcd বা (s)vcd à¦à¦° সকল টà§à¦°à§à¦¯à¦¾à¦•à¦¸à¦®à§‚হ লোড করণ, \"pathname\" হবে ডà§à¦°à¦¾à¦‡à¦­à§‡à¦°\n\\t\\tঠিকানাটি (à¦à¦šà§à¦›à¦¿à¦•)\n/device\\t\\tডিফলà§à¦Ÿ ভিডিও ডিভাইসটি চালনা করণ\n/open\\t\\tফাইলটি চালনা করণ, সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿà¦­à¦¾à¦¬à§‡ পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শà§à¦°à§ করবে না\n/play\\t\\tপà§à¦²à§‡à§Ÿà¦¾à¦°à¦Ÿà¦¿ চালনার সাথে সাথেই ফাইলটি পà§à¦²à§‡ করা শà§à¦°à§ করণ\n/close\\t\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে পà§à¦²à§‡à§Ÿà¦¾à¦°à¦Ÿà¦¿ বনà§à¦§ করণ (শà§à¦§à§à¦®à¦¾à¦¤à§à¦° কাজ করবে যখন /play\n\\t\\tনিরà§à¦¦à§‡à¦¶à¦¨à¦¾à¦Ÿà¦¿à¦° সাথে বà§à¦¯à¦¬à¦¹à¦¾à¦° করা হবে)\n/shutdown\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে অপারেটিং সিসà§à¦Ÿà§‡à¦®à¦Ÿà¦¿ শাটডাউন করণ\n/standby\\t\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে অপারেটিং সিসà§à¦Ÿà§‡à¦®à¦Ÿà¦¿ সà§à¦²à¦¿à¦ª করণ\n/hibernate\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে অপারেটিং সিসà§à¦Ÿà§‡à¦®à¦Ÿà¦¿ হাইবারনেট করণ\n/logoff\\t\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে অপারেটিং সিসà§à¦Ÿà§‡à¦®à¦Ÿà¦¿ লগ অফ করণ\n/lock\\t\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦°à¦Ÿà¦¿ লক করণ\n/monitoroff\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে মনিটর বনà§à¦§ করণ\n/playnext\\t\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে ফোলà§à¦¡à¦¾à¦°à§‡à¦° পরবরà§à¦¤à§€ ফাইলটি চালনা করণ\n/fullscreen\\tফà§à¦²-সà§à¦•à§à¦°à§€à¦¨ মà§à¦¡à§‡ চালনা করণ\n/minimized\\tমিনিমাইজডà§â€Œ মà§à¦¡à§‡ চালনা করণ\n/new\\t\\tনতà§à¦¨ আরেকটি পà§à¦²à§‡à§Ÿà¦¾à¦° বà§à¦¯à¦¬à¦¹à¦¾à¦°\n/add\\t\\t\"pathname\" পà§à¦²à§‡à¦²à¦¿à¦¸à§à¦Ÿà§‡ যোগ করণ, /open আর /play à¦à¦° সাথে à¦à¦•à¦¤à§à¦°à§‡\n\\t\\tবà§à¦¯à¦¬à¦¹à¦¾à¦° করা যাবে\n/randomize\\tপà§à¦²à§‡à¦²à¦¿à¦¸à§à¦Ÿà¦Ÿà¦¿ à¦à¦²à§‹à¦®à§‡à¦²à§‹à¦­à¦¾à¦¬à§‡ সাজান\n/regvid\\t\\tভিডিও ফাইলসমূহের সাথে সমà§à¦ªà§ƒà¦•à§à¦¤à¦¤à¦¾ সà§à¦¥à¦¾à¦ªà¦¨\n/regaud\\t\\tঅডিও ফাইলসমূহের সাথে সমà§à¦ªà§ƒà¦•à§à¦¤à¦¤à¦¾ সà§à¦¥à¦¾à¦ªà¦¨\n/regpl\\t\\tপà§à¦²à§‡à¦²à¦¿à¦¸à§à¦Ÿ ফাইলসমূহের সাথে সমà§à¦ªà§ƒà¦•à§à¦¤à¦¤à¦¾ সà§à¦¥à¦¾à¦ªà¦¨\n/regall\\t\\tসমরà§à¦¥à¦¨ করে à¦à¦®à¦¨ সকল ফাইলসমূহের সাথে সমà§à¦ªà§ƒà¦•à§à¦¤à¦¤à¦¾ সà§à¦¥à¦¾à¦ªà¦¨\n/unregall\\t\\tসকল ফাইলসমূহের সাথে সমà§à¦ªà§ƒà¦•à§à¦¤à¦¤à¦¾ অপসারণ\n/start ms\\t\\t\"ms\" (= মিলিসেকেনà§à¦¡) থেকে পà§à¦²à§‡ শà§à¦°à§ করণ\n/startpos hh:mm:ss\\thh:mm:ss অবসà§à¦¥à¦¾à¦¨à¦•à¦¾à¦² থেকে পà§à¦²à§‡ শà§à¦°à§ করণ\n/fixedsize w,h\\tউইনà§à¦¡à§‹à¦° সাইজ নিরà§à¦¦à¦¿à¦·à§à¦Ÿà¦•à¦°à¦£Set a fixed window size\n/monitor N\\tমনিটর Nঠপà§à¦²à§‡à§Ÿà¦¾à¦° চালনা করণ, যেখানে Nà¦à¦° মান ১ থেকে শà§à¦°à§ হয়\n/audiorenderer N\\tঅডিও রেনডারার N বà§à¦¯à¦¬à¦¹à¦¾à¦° শà§à¦°à§ করণ, যেখানে Nà¦à¦° মান ১\n\\t\\tথেকে শà§à¦°à§ হয় (বিসà§à¦¤à¦¾à¦°à¦¿à¦¤ দেখà§à¦¨ \"আউটপà§à¦Ÿ\" সেটিংসমূহে)\n/shaderpreset \"Pr\"\\t\"Pr\" শেইডার পà§à¦°à¦¿à¦¸à§‡à¦Ÿ বà§à¦¯à¦¬à¦¹à¦¾à¦° শà§à¦°à§ করণ\n/pns \"name\"\\tবà§à¦¯à¦¬à¦¹à¦¾à¦° করার জনà§à¦¯à§‡ পà§à¦¯à¦¾à¦¨à¦…à§à¦¯à¦¾à¦¨à§à¦¡à¦¸à§à¦•à§à¦¯à¦¾à¦¨ পà§à¦°à¦¿à¦¸à§‡à¦Ÿà§‡à¦° নাম নিরà§à¦¦à§‡à¦¶à¦¿à¦¤ করণ\n/iconsassoc\\tফাইলের ধরনের আইকন সমূহ পà§à¦¨à¦°à¦¾à§Ÿ সমà§à¦ªà§ƒà¦•à§à¦¤ করণ\n/nofocus\\t\\tMPC-HCকে বà§à¦¯à¦¾à¦•à¦—à§à¦°à¦¾à¦‰à¦¨à§à¦¡à§‡ চালনা করণ\n/webport N\\tনিরà§à¦¦à§‡à¦¶à¦¿à¦¤ পোরà§à¦Ÿà§‡ ওয়েব ইনà§à¦Ÿà¦¾à¦°à¦«à§‡à¦¸ চালনা করণ\n/debug\\t\\tOSDতে ডিবাগ তথà§à¦¯à¦¾à¦¦à¦¿ পà§à¦°à¦¦à¦°à§à¦¶à¦¨\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\\tMPC-HCকে সà§à¦²à§‡à¦‡à¦­ হিসেবে বà§à¦¯à¦¬à¦¹à¦¾à¦°\n/reset\\t\\tডিফলà§à¦Ÿ সেটিংসমূহে পূরà§à¦¬à¦¾à¦¬à¦¸à§à¦¥à¦¾à§Ÿ পরিবরà§à¦¤à¦¨\n/help /h /?\\tকমানà§à¦¡ লাইনের নিরà§à¦¦à§‡à¦¶à¦¨à¦¾à¦¸à¦®à§‚হ সমà§à¦ªà¦°à§à¦•à§‡ সহায়িকা পà§à¦°à¦¦à¦°à§à¦¶à¦¨\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "বà§à¦¯à¦¬à¦¹à¦¾à¦°à¦¬à¦¿à¦§à¦¿: mpc-hc.exe \"pathname\" [নিরà§à¦¦à§‡à¦¶à¦¨à¦¾à¦¸à¦®à§‚হ]\n\n\"pathname\"\\tযে মূল ফাইল বা ডিরেকà§à¦Ÿà¦°à¦¿ লোড করা হবে (ওয়াইলà§à¦¡à¦•à¦¾à¦°à§à¦¡ কà§à¦¯à¦¾à¦°à§‡à¦•à§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ\n\\t\\tবà§à¦¯à¦¬à¦¹à¦¾à¦° করা যাবে, সাধারণ ইনপà§à¦Ÿà¦Ÿà¦¿ \"-\" চিহà§à¦¨ দà§à¦¬à¦¾à¦°à¦¾ সূচিত করà§à¦¨)\n/dub \"dubname\"\\tঅতিরিকà§à¦¤ অডিও ফাইল লোড করণ\n/dubdelay \"file\"\\tঅতিরিকà§à¦¤ অডিও ফাইল XXms সময়ের সà§à¦¥à¦¾à¦¨à¦¾à¦¨à§à¦¤à¦° করে লোড করণ\n\\t\\t(যদি ফাইলটিতে \"...DELAY XXms...\" থেকে থাকে)\n/d3dfs\\t\\tD3D ফà§à¦²à¦¸à§à¦•à§à¦°à§€à¦¨ মà§à¦¡à§‡ রেনডার করা শà§à¦°à§ করণ\n/sub \"subname\"\\tঅতিরিকà§à¦¤ সাবটাইটেল ফাইল লোড করণ\n/filter \"filtername\"\\tডাইনামিক লিঙà§à¦• লাইবà§à¦°à§‡à¦°à¦¿ থেকে DirectShow ফিলà§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ লোড\n\\t\\tকরণ (ওয়াইলà§à¦¡à¦•à¦¾à¦°à§à¦¡ কà§à¦¯à¦¾à¦°à§‡à¦•à§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ বà§à¦¯à¦¬à¦¹à¦¾à¦° করা যাবে)\n/dvd\\t\\tDVD মà§à¦¡à§‡ চালনা করণ, \"pathname\" হবে dvd ফোলà§à¦¡à¦¾à¦°à¦Ÿà¦¿ (à¦à¦šà§à¦›à¦¿à¦•)\n/dvdpos T#C\\tটাইটেল T à¦à¦° পরিচà§à¦›à§‡à¦¦ C থেকে পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শà§à¦°à§ করণ\n/dvdpos T#hh:mm\\tটাইটেল T à¦à¦° অবসà§à¦¥à¦¾à¦¨à¦•à¦¾à¦² hh:mm:ss থেকে পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শà§à¦°à§ করণ\n/cd\\t\\tcd বা (s)vcd à¦à¦° সকল টà§à¦°à§à¦¯à¦¾à¦•à¦¸à¦®à§‚হ লোড করণ, \"pathname\" হবে ডà§à¦°à¦¾à¦‡à¦­à§‡à¦°\n\\t\\tঠিকানাটি (à¦à¦šà§à¦›à¦¿à¦•)\n/device\\t\\tডিফলà§à¦Ÿ ভিডিও ডিভাইসটি চালনা করণ\n/open\\t\\tফাইলটি চালনা করণ, সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿà¦­à¦¾à¦¬à§‡ পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শà§à¦°à§ করবে না\n/play\\t\\tপà§à¦²à§‡à§Ÿà¦¾à¦°à¦Ÿà¦¿ চালনার সাথে সাথেই ফাইলটি পà§à¦²à§‡ করা শà§à¦°à§ করণ\n/close\\t\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে পà§à¦²à§‡à§Ÿà¦¾à¦°à¦Ÿà¦¿ বনà§à¦§ করণ (শà§à¦§à§à¦®à¦¾à¦¤à§à¦° কাজ করবে যখন /play\n\\t\\tনিরà§à¦¦à§‡à¦¶à¦¨à¦¾à¦Ÿà¦¿à¦° সাথে বà§à¦¯à¦¬à¦¹à¦¾à¦° করা হবে)\n/shutdown\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে অপারেটিং সিসà§à¦Ÿà§‡à¦®à¦Ÿà¦¿ শাটডাউন করণ\n/standby\\t\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে অপারেটিং সিসà§à¦Ÿà§‡à¦®à¦Ÿà¦¿ সà§à¦²à¦¿à¦ª করণ\n/hibernate\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে অপারেটিং সিসà§à¦Ÿà§‡à¦®à¦Ÿà¦¿ হাইবারনেট করণ\n/logoff\\t\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে অপারেটিং সিসà§à¦Ÿà§‡à¦®à¦Ÿà¦¿ লগ অফ করণ\n/lock\\t\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦°à¦Ÿà¦¿ লক করণ\n/monitoroff\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে মনিটর বনà§à¦§ করণ\n/playnext\\t\\tপà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• শেষে ফোলà§à¦¡à¦¾à¦°à§‡à¦° পরবরà§à¦¤à§€ ফাইলটি চালনা করণ\n/fullscreen\\tফà§à¦²-সà§à¦•à§à¦°à§€à¦¨ মà§à¦¡à§‡ চালনা করণ\n/minimized\\tমিনিমাইজডà§â€Œ মà§à¦¡à§‡ চালনা করণ\n/new\\t\\tনতà§à¦¨ আরেকটি পà§à¦²à§‡à§Ÿà¦¾à¦° বà§à¦¯à¦¬à¦¹à¦¾à¦°\n/add\\t\\t\"pathname\" পà§à¦²à§‡à¦²à¦¿à¦¸à§à¦Ÿà§‡ যোগ করণ, /open আর /play à¦à¦° সাথে à¦à¦•à¦¤à§à¦°à§‡\n\\t\\tবà§à¦¯à¦¬à¦¹à¦¾à¦° করা যাবে\n/randomize\\tপà§à¦²à§‡à¦²à¦¿à¦¸à§à¦Ÿà¦Ÿà¦¿ à¦à¦²à§‹à¦®à§‡à¦²à§‹à¦­à¦¾à¦¬à§‡ সাজান\n/regvid\\t\\tভিডিও ফাইলসমূহের সাথে সমà§à¦ªà§ƒà¦•à§à¦¤à¦¤à¦¾ সà§à¦¥à¦¾à¦ªà¦¨\n/regaud\\t\\tঅডিও ফাইলসমূহের সাথে সমà§à¦ªà§ƒà¦•à§à¦¤à¦¤à¦¾ সà§à¦¥à¦¾à¦ªà¦¨\n/regpl\\t\\tপà§à¦²à§‡à¦²à¦¿à¦¸à§à¦Ÿ ফাইলসমূহের সাথে সমà§à¦ªà§ƒà¦•à§à¦¤à¦¤à¦¾ সà§à¦¥à¦¾à¦ªà¦¨\n/regall\\t\\tসমরà§à¦¥à¦¨ করে à¦à¦®à¦¨ সকল ফাইলসমূহের সাথে সমà§à¦ªà§ƒà¦•à§à¦¤à¦¤à¦¾ সà§à¦¥à¦¾à¦ªà¦¨\n/unregall\\t\\tসকল ফাইলসমূহের সাথে সমà§à¦ªà§ƒà¦•à§à¦¤à¦¤à¦¾ অপসারণ\n/start ms\\t\\t\"ms\" (= মিলিসেকেনà§à¦¡) থেকে পà§à¦²à§‡ শà§à¦°à§ করণ\n/startpos hh:mm:ss\\thh:mm:ss অবসà§à¦¥à¦¾à¦¨à¦•à¦¾à¦² থেকে পà§à¦²à§‡ শà§à¦°à§ করণ\n/fixedsize w,h\\tউইনà§à¦¡à§‹à¦° সাইজ নিরà§à¦¦à¦¿à¦·à§à¦Ÿà¦•à¦°à¦£Set a fixed window size\n/monitor N\\tমনিটর Nঠপà§à¦²à§‡à§Ÿà¦¾à¦° চালনা করণ, যেখানে Nà¦à¦° মান ১ থেকে শà§à¦°à§ হয়\n/audiorenderer N\\tঅডিও রেনডারার N বà§à¦¯à¦¬à¦¹à¦¾à¦° শà§à¦°à§ করণ, যেখানে Nà¦à¦° মান ১\n\\t\\tথেকে শà§à¦°à§ হয় (বিসà§à¦¤à¦¾à¦°à¦¿à¦¤ দেখà§à¦¨ \"আউটপà§à¦Ÿ\" সেটিংসমূহে)\n/shaderpreset \"Pr\"\\t\"Pr\" শেইডার পà§à¦°à¦¿à¦¸à§‡à¦Ÿ বà§à¦¯à¦¬à¦¹à¦¾à¦° শà§à¦°à§ করণ\n/pns \"name\"\\tবà§à¦¯à¦¬à¦¹à¦¾à¦° করার জনà§à¦¯à§‡ পà§à¦¯à¦¾à¦¨à¦…à§à¦¯à¦¾à¦¨à§à¦¡à¦¸à§à¦•à§à¦¯à¦¾à¦¨ পà§à¦°à¦¿à¦¸à§‡à¦Ÿà§‡à¦° নাম নিরà§à¦¦à§‡à¦¶à¦¿à¦¤ করণ\n/iconsassoc\\tফাইলের ধরনের আইকন সমূহ পà§à¦¨à¦°à¦¾à§Ÿ সমà§à¦ªà§ƒà¦•à§à¦¤ করণ\n/nofocus\\t\\tMPC-HCকে বà§à¦¯à¦¾à¦•à¦—à§à¦°à¦¾à¦‰à¦¨à§à¦¡à§‡ চালনা করণ\n/webport N\\tনিরà§à¦¦à§‡à¦¶à¦¿à¦¤ পোরà§à¦Ÿà§‡ ওয়েব ইনà§à¦Ÿà¦¾à¦°à¦«à§‡à¦¸ চালনা করণ\n/debug\\t\\tOSDতে ডিবাগ তথà§à¦¯à¦¾à¦¦à¦¿ পà§à¦°à¦¦à¦°à§à¦¶à¦¨\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\\tMPC-HCকে সà§à¦²à§‡à¦‡à¦­ হিসেবে বà§à¦¯à¦¬à¦¹à¦¾à¦°\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\\t\\tডিফলà§à¦Ÿ সেটিংসমূহে পূরà§à¦¬à¦¾à¦¬à¦¸à§à¦¥à¦¾à§Ÿ পরিবরà§à¦¤à¦¨\n/help /h /?\\tকমানà§à¦¡ লাইনের নিরà§à¦¦à§‡à¦¶à¦¨à¦¾à¦¸à¦®à§‚হ সমà§à¦ªà¦°à§à¦•à§‡ সহায়িকা পà§à¦°à¦¦à¦°à§à¦¶à¦¨\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3041,18 +3039,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "অà§à¦¯à¦¾à¦¸à¦ªà§‡à¦•à§à¦Ÿ রেশিও"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "WASAPI বà§à¦¯à¦¬à¦¹à¦¾à¦° (বনà§à¦§ করে পà§à¦¨à¦°à¦¾à§Ÿ পà§à¦²à§‡à¦¬à§à¦¯à¦¾à¦• করà§à¦¨)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "নিঃশবà§à¦¦à§‡ দà§à¦°à§à¦¤ সামনে অগà§à¦°à¦¸à¦°"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "শবà§à¦¦à§‡à¦° ডিভাইস:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: চালৠকরা হল"
@@ -3609,3 +3595,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "সেটিংসমূহ"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ca.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ca.dialogs.po
index c0067cb55..6650fcb93 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ca.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ca.dialogs.po
@@ -10,10 +10,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-31 14:58+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-11-12 12:01+0000\n"
"Last-Translator: papu <papu@openmailbox.org>\n"
-"Language-Team: Catalan (http://www.transifex.com/projects/p/mpc-hc/language/ca/)\n"
+"Language-Team: Catalan (http://www.transifex.com/mpc-hc/mpc-hc/language/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -198,7 +198,7 @@ msgstr "Copyright © 2002-2015 Vegeu el fitxer Authors.txt"
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "This program is freeware and released under the GNU General Public License."
-msgstr "Aquet programa és gratuït i distribuït sota la Llicència Pública General de GNU."
+msgstr "Aquest programa és gratuït i distribuït sota la Llicència Pública General de GNU."
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "English translation made by MPC-HC Team"
@@ -290,7 +290,7 @@ msgstr "Mostra OSD (cal que inicialitzeu)"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK4"
msgid "Limit window proportions on resize"
-msgstr "Limita les proporcions de la finestra al canviar tamany"
+msgstr "Bloca les proporcions de la finestra de vídeo"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK12"
msgid "Snap to desktop edges"
@@ -378,7 +378,7 @@ msgstr "Ajustos addicionals"
msgctxt "IDD_PPAGEDVD_IDC_CHECK2"
msgid "Allow closed captions in \"Line 21 Decoder\""
-msgstr "Permetre subtítols amb \"Line 21 Decoder\""
+msgstr "Permet subtítols amb \"Line 21 Decoder\""
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Audio"
@@ -418,7 +418,7 @@ msgstr "Reprodueix"
msgctxt "IDD_PPAGEPLAYBACK_IDC_RADIO2"
msgid "Repeat forever"
-msgstr "Repetir per sempre"
+msgstr "Repeteix indefinidament"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC1"
msgid "time(s)"
@@ -474,11 +474,7 @@ msgstr "Reporta els conectors que no volen funcionar"
msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
-msgstr "Carga automàtica d'àudio"
-
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Usa el processador de subtítols incorporat"
+msgstr "Carga automàticament l'àudio"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
@@ -538,19 +534,19 @@ msgstr "Resolució màxima de la textura:"
msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_NO_SUB_ANIM"
msgid "Never animate the subtitles"
-msgstr "Mai permetre animacions als subtítols"
+msgstr "Mai permetre animació als subtítols"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC5"
msgid "Render at"
-msgstr ""
+msgstr "Renderitza en el"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC6"
msgid "% of the animation"
-msgstr ""
+msgstr "% de la animació"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC7"
msgid "Animate at"
-msgstr "Animació al"
+msgstr "Anima en el"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC8"
msgid "% of the video frame rate"
@@ -622,7 +618,7 @@ msgstr "DirectShow"
msgctxt "IDD_PPAGEFORMATS_IDC_CHECK5"
msgid "Check file extension first"
-msgstr "Comprova primer l’extensió del fitxer"
+msgstr "Segons l'extensió del fitxer"
msgctxt "IDD_PPAGEFORMATS_IDC_STATIC"
msgid "Explorer Context Menu"
@@ -680,9 +676,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Evita de MINIMITZAR quan s'està en pantalla completa al monitor secundari"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Usa les característiques de la barra de tasques del Win7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Usa les característiques de la barra de tasques millorada"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -738,7 +734,7 @@ msgstr "Afegeix un Tipus..."
msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON6"
msgid "Add Sub Type..."
-msgstr "Afegeix el Subtipus..."
+msgstr "Afegeix un Subtipus..."
msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON7"
msgid "Delete"
@@ -746,7 +742,7 @@ msgstr "Suprimeix"
msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON8"
msgid "Reset List"
-msgstr "Inicialitzar Llista"
+msgstr "Inicialitza la Llista"
msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
msgid "Type:"
@@ -1042,7 +1038,7 @@ msgstr "Sota"
msgctxt "IDD_PPAGESUBSTYLE_IDC_CHECK_RELATIVETO"
msgid "Position subtitles relative to the video frame"
-msgstr "Posició subtítols relativa a la imatge"
+msgstr "Posició dels subtítols relativa a la imatge"
msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
msgid "Colors && Transparency"
@@ -1074,7 +1070,7 @@ msgstr "Vincula els canals alfa"
msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
msgid "If you would like to use the stand-alone versions of these filters or another replacement, disable them here."
-msgstr "Si prefereix utilitzar les versions independents d'aquets filtres o algún altre reemplaçament, desactivi'ls aquí."
+msgstr "Si preferiu utilitzar les versions independents d'aquets filtres o algún altre reemplaçament, desactiveu-los aquí."
msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
msgid "Source Filters"
@@ -1146,7 +1142,7 @@ msgstr "Selecciona el dispositiu de D3D9"
msgctxt "IDD_PPAGEOUTPUT_IDC_RESETDEVICE"
msgid "Reinitialize when changing display"
-msgstr "Restablir quant canviï la pantalla"
+msgstr "Restableix quant canviï la pantalla"
msgctxt "IDD_PPAGEOUTPUT_IDC_FULLSCREEN_MONITOR_CHECK"
msgid "D3D Fullscreen"
@@ -1173,8 +1169,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Subtítols *"
+msgid "Subtitles"
+msgstr "Subtítols"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1189,8 +1185,8 @@ msgid "Rotation"
msgstr "Gir"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Els filtres externs (com VSFilter) poden mostrar subtítols en tots els renderitzadors."
+msgid "Subtitle Renderer"
+msgstr "Renderitzador de Subtítols"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1208,6 +1204,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Permet l'accés només des del host local"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Activa la vista prèvia"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Imprimeix la informació de depuració"
@@ -1398,11 +1398,11 @@ msgstr "Ajust de la commutació de Canals"
msgctxt "IDD_PPAGECAPTURE_IDC_PPAGECAPTURE_ST11"
msgid "Rebuild filter graph"
-msgstr "Recontruir el \"filter graph\""
+msgstr "Recontrueix el \"filter graph\""
msgctxt "IDD_PPAGECAPTURE_IDC_PPAGECAPTURE_ST12"
msgid "Stop filter graph"
-msgstr "Aturar el \"filtre graph\""
+msgstr "Atura el \"filtre graph\""
msgctxt "IDD_PPAGESYNC_IDC_SYNCVIDEO"
msgid "Sync video to display"
@@ -1610,11 +1610,11 @@ msgstr "Suprimeix"
msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
msgid "Active pre-resize shaders"
-msgstr "Activa el pre-redimenionament dels shaders"
+msgstr "Activa el pre-redimenionament dels P.S"
msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
msgid "Active post-resize shaders"
-msgstr "Activa el post-redimensionament dels shaders"
+msgstr "Activa el post-redimensionament dels P.S"
msgctxt "IDD_DEBUGSHADERS_DLG_CAPTION"
msgid "Debug Shaders"
@@ -1656,6 +1656,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Per Defecte"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Dispositiu"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Mode Exclusiu"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Pemet el bitstreaming"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Opcions"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Habilita el crossfeed a l'estèreo (pels auriculars)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Tallar:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Nivell:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Nota"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Per minimitzar la distorsió de l'àudio, es recomana mantenir el volum del reproductor al voltant del 85% durant la reproducció de contingut codificat amb pèrdua de volum elevat."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "Qualitat JPEG:"
@@ -1672,9 +1716,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Informe de Fallades"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Ho sentim, sembla MPC-HC ha fallat. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Envia un informe d'error per ajudar a diagnosticar i solucionar el problema."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Ho sentim molt sembla que el MPC-HC ha fallat. :(\nPer ajudar-nos a diagnosticar i solucionar el problema, s'enviarà un informe d'error. Pot proporcionar informació addicional si ho desitja."
+msgid "Optional information"
+msgstr "informació opcional"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1688,7 +1740,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Descripció del problema( useu només l'Anglès):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "D’acord"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Reinicia el MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Surt del MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ca.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ca.menus.po
index 97eba6567..bfb08f9b8 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ca.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ca.menus.po
@@ -10,10 +10,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
"PO-Revision-Date: 2015-05-26 21:50+0000\n"
"Last-Translator: papu <papu@openmailbox.org>\n"
-"Language-Team: Catalan (http://www.transifex.com/projects/p/mpc-hc/language/ca/)\n"
+"Language-Team: Catalan (http://www.transifex.com/mpc-hc/mpc-hc/language/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ca.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ca.strings.po
index 664fc1660..b52dc5db8 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ca.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ca.strings.po
@@ -11,10 +11,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-31 14:58+0000\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-12 12:09+0000\n"
"Last-Translator: papu <papu@openmailbox.org>\n"
-"Language-Team: Catalan (http://www.transifex.com/projects/p/mpc-hc/language/ca/)\n"
+"Language-Team: Catalan (http://www.transifex.com/mpc-hc/mpc-hc/language/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -330,12 +330,12 @@ msgid "On/Off"
msgstr "Activat/Desactivat"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Des de FPS"
+msgid "From (FPS)"
+msgstr "Des de (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "Cap a FPS"
+msgid "To (FPS)"
+msgstr "Cap a (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -469,6 +469,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Reproducció::Shaders"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Recursos"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Miscel·lània"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Reproducció::Captura"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Reproducció::Sync Renderer Settings"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Reproducció::Pantalla completa"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Filtres Interns::Renderitzador d'Àudio"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Canvia Àudio"
@@ -561,30 +589,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Subtítols::Base de Dades"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Recursos"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Miscel·lània"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Reproducció::Captura"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Reproducció::Sync Renderer Settings"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Reproducció::Pantalla completa"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Detalls"
@@ -599,7 +603,7 @@ msgstr "Filtre renderitzat predeterminat per DirectShow. Altres l'utilitzarant q
msgctxt "IDC_DSOLD"
msgid "This is the default renderer of Windows 9x/me/2k. Depending on the visibility of the video window and your video card's abilities, it will switch between GDI, DirectDraw, Overlay rendering modes dynamically."
-msgstr "Aquet es el renderitzador predeterminat per Windows 9x/Me/2K. Depenent de la visibilidat de la finestra de vídeo i de les capacitats de la teva tarjeta gràfica, escollirà dinàmicament entre els renders GDI, DirectDraw, i Overlay."
+msgstr "Aquest és el renderitzador predeterminat per Windows 9x/Me/2K. Depenent de la visibilidat de la finestra de vídeo i de les capacitats de la teva tarjeta gràfica, escollirà dinàmicament entre els renders GDI, DirectDraw o Overlay."
msgctxt "IDC_DSOVERLAYMIXER"
msgid "Always renders in overlay. Generally only YUV formats are allowed, but they are presented directly without any color conversion to RGB. This is the fastest rendering method of all and the only where you can be sure about fullscreen video mirroring to tv-out activating."
@@ -677,22 +681,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "La superfície del vídeo serà asignada com una de regular en una zona fora de la pantalla."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "L'Àudio Renderer del MPC està trencat, no l'utilitzi.."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Comunicació d'errors"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC acaba d'estavellar-se, però aquesta versió va ser compilada sense informatio depuració.\nPer reportar aquest error, primer has d'usar una versio oficial.\n\nVols visitar la pàgina de descàrrega ara?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Superfícies \"offscreen\" clàssiques"
@@ -745,9 +737,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (sense comprimir)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Renderitzador d'Audio Intern"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -859,7 +851,7 @@ msgstr "En augmentar el nombre de subimatges de la memòria intermèdia s'hauria
msgctxt "IDC_BUTTON_EXT_SET"
msgid "After clicking this button, the checked state of the format group will reflect the actual file association for MPC-HC. A newly added extension will usually make it grayed, so don't forget to check it again before closing this dialog!"
-msgstr "Després de fer clic aquet botó, l'estat de comprobació del format del grup reflexarà las associacions del fitxer actual pel MPC. Una extensión recent agregada es motrarà en gris, no oblidis de maracar-la de nou abans de tencar aquet cuadre de diàleg"
+msgstr "Després de fer clic aquest botó, l'estat de comprobació del format del grup reflexarà las associacions del fitxer actual pel MPC. Una extensión recent agregada es motrarà en gris, no oblideu de maracar-la de nou abans de tencar aquet cuadre de diàleg"
msgctxt "IDC_CHECK_ALLOW_DROPPING_SUBPIC"
msgid "Disabling this option will prevent the subtitles from blinking but it may cause the video renderer to skip some video frames."
@@ -1397,6 +1389,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Després de la Reproducció:Tanca"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC ha trobat un problema durant la inicialització. Amb la seva ajuda podem ser capaços de solucionar el problema.\n\nVols informar d'aquest problema?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Introdueix un valor positiu o negatiu segons l'àudio s'escolti retrasat o avançat respecta a la imatge."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "La vista prèvia està actualment deshabilitada. Pots habilitar-la en les opcions de l'MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Aquesta opció es pot utilitzar per a una vista prèvia dels arxius multimèdia des d' una ubicació remota. Utilitza-ho només en un xarxa privada segura.\n\nSegur que voleu activar aquesta opció?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Renderitzador de Subtítols Intern"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Obre un dispositiu"
@@ -1643,7 +1655,7 @@ msgstr "Següent"
msgctxt "IDS_AG_PREVIOUS"
msgid "Previous"
-msgstr "Anterior"
+msgstr "Previ"
msgctxt "IDS_AG_NEXT_FILE"
msgid "Next File"
@@ -1651,7 +1663,7 @@ msgstr "Fitxer següent"
msgctxt "IDS_AG_PREVIOUS_FILE"
msgid "Previous File"
-msgstr "Fitxer Anterior"
+msgstr "Fitxer Previ"
msgctxt "IDS_MPLAYERC_99"
msgid "Toggle Direct3D fullscreen"
@@ -1681,6 +1693,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Mostra el Nom del Fixer"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Reprodueix el DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Reprodueix el BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: Visualitza les Estadístiques del Renderitzador"
@@ -1962,20 +1982,20 @@ msgid "Options"
msgstr "Opcions"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Àudio Següent"
+msgid "Next Audio Track"
+msgstr "Pista d'Àudio Següent"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Àudio Previ"
+msgid "Prev Audio Track"
+msgstr " Pista d'Àudio Prèvia"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Subtítol Següent"
+msgid "Next Subtitle Track"
+msgstr "Pista de Subtítols Següent "
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Subtítol Previ"
+msgid "Prev Subtitle Track"
+msgstr "Pista de Subtítols Prèvia"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1985,22 +2005,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Recargar Subtítols"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Àudio Següent (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Àudio Previ (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Subtítol Següent (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Subtítol Previ (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Angle Següent (DVD)"
@@ -2010,20 +2014,20 @@ msgid "Prev Angle (DVD)"
msgstr "Angle Previ (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Àudio Següent (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Pista d'Àudio Següent (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Àudio Previ (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Pista d'Àudio Prèvia (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Subtítol Següent (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Pista de Subtítols Següent (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Subtítol Previ (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "Pista de Subtítols Prèvia (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2187,7 +2191,7 @@ msgstr "DVD: Disc i Decodificador de Regions Incompatibles"
msgctxt "IDS_D3DFS_WARNING"
msgid "This option is designed to avoid tearing. However, it will also prevent MPC-HC from displaying the context menu and any dialog box during playback.\n\nDo you really want to activate this option?"
-msgstr "Aquesta opció és per eliminar el pipelleig, però evita que MPC-HC mostri el menú contextual i caixes de diàleg mentre reprodueix.\n\nEstas segur vols activar aquesta opció?"
+msgstr "Aquesta opció està dissenyada per eliminar el pipelleig, no obstant això, també evitarà al MPC-HC de mostrar el menú de context i qualsevol quadre de diàleg durant la reproducció.\n\n\nSegur que voleu activar aquesta opció?"
msgctxt "IDS_MAINFRM_139"
msgid "Sub delay: %ld ms"
@@ -2389,14 +2393,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Actual"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC ha acabat inesperadament. Per ajudar-nos a solucionar aquest problema, si us plau, envieu aquest fitxer \"%s\" al nostre bug tracker.\n\nVoleu ara obrir la carpeta que conté el fitxer \"minidump\" i visitar el \"bug tracker\" per informar de l'error?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Ha fallat la creació del fitxer de volcat a '%s' (error %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Trieu una carpeta"
@@ -2570,8 +2566,8 @@ msgid "Volume boost Max"
msgstr "Guany de volum màxim"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "NO TRADUÃT! - Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\nallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tfile contains \"...DELAY XXms...\")\n/d3dfs\t\tstart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary. (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playing\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tRegister Vídeo formats\n/regaud\t\tRegister audio formats\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tUnregister Vídeo formats\n/start ms\t\tStart playing at \"ms\" (= milliseambds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet fixed window size\n/monitor N\tStart on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tMostra l' ajuda de la línea de comandaments\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "NO TRADUÃT! - Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\nallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tfile contains \"...DELAY XXms...\")\n/d3dfs\t\tstart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary. (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playing\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tRegister Vídeo formats\n/regaud\t\tRegister audio formats\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tUnregister Vídeo formats\n/start ms\t\tStart playing at \"ms\" (= milliseambds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet fixed window size\n/monitor N\tStart on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tMostra l' ajuda de la línea de comandaments\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -2667,7 +2663,7 @@ msgstr "Subtítols no cargats o renderitzador no soportat."
msgctxt "IDS_LOGO_AUTHOR"
msgid "Author unknown. Contact us if you made this logo!"
-msgstr "Autor desconegut contacte'm si vas fer aquet logotipus!"
+msgstr "Autor desconegut. Contacteu-me si vau fer aquest logotipus!"
msgctxt "IDS_NO_MORE_MEDIA"
msgid "No more media in the current folder."
@@ -2755,11 +2751,11 @@ msgstr "Dalt Darrere Dreta"
msgctxt "IDS_TIME_TOOLTIP_ABOVE"
msgid "Above seek bar"
-msgstr "Per sobra la barra de cerca"
+msgstr "Per sobra de la barra de cerca"
msgctxt "IDS_TIME_TOOLTIP_BELOW"
msgid "Below seek bar"
-msgstr "Per sota la barra de cerca"
+msgstr "Per sota de la barra de cerca"
msgctxt "IDS_VIDEO_STREAM"
msgid "Video: %s"
@@ -3045,18 +3041,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Relació d’aspecte"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Usa el mode WASAPI (rependre la reproducció)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Mutis amb l'avanç ràpid"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Dispositiu de so:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "Vsync: Activat"
@@ -3613,3 +3597,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Paràmetres"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.cs.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.cs.dialogs.po
index e44e253f6..87d23fadb 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.cs.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.cs.dialogs.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-18 14:24+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-20 14:56+0000\n"
"Last-Translator: khagaroth\n"
-"Language-Team: Czech (http://www.transifex.com/projects/p/mpc-hc/language/cs/)\n"
+"Language-Team: Czech (http://www.transifex.com/mpc-hc/mpc-hc/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -472,10 +472,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Automaticky naÄíst zvukové stopy"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Použít vestavÄ›ný zobrazovaÄ titulků"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Ovládání"
@@ -676,9 +672,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Zabránit minimalizaci z Fullscreen při běhu na nevýchozím monitoru"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Aktivovat funkce pro panel úloh Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Použít pokroÄilé funkce pro panel úloh"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1122,7 +1118,7 @@ msgstr "QuickTime video"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Audio Renderer"
-msgstr "DirectShow audio"
+msgstr "Syntezátor zvuku"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "VMR-7/VMR-9 (renderless) and EVR (CP) settings"
@@ -1169,8 +1165,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Titulky *"
+msgid "Subtitles"
+msgstr "Titulky"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1185,8 +1181,8 @@ msgid "Rotation"
msgstr "NatáÄení obr."
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Externí filtry (např. VSFilter) mohou titulky zobrazovat na všech rendererech."
+msgid "Subtitle Renderer"
+msgstr "ZobrazovaÄ titulků"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1204,6 +1200,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Povolit pouze lokální přístup"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Povolit náhled"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Vkládat do stránek ladicí informace"
@@ -1652,6 +1652,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Výchozí"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Zařízení"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Výhradní režim"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Povolit bitstreaming"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Možnosti"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Povolit stereo crossfeed (pro sluchátka)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Mez:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Úroveň:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Poznámka"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Pro minimalizování zkreslení zvuku je doporuÄeno pÅ™i pÅ™ehrávání hlasitého ztrátovÄ› kódovaného obsahu nastavit hlasitost nižší než 85%."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "Kvalita JPEG:"
@@ -1668,9 +1712,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Oznámení chyby"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Omlouváme se, zdá se, že MPC-HC právě selhal. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Pomozte nám diagnostikovat a opravit tento problém zasláním hlášení o chybě."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Omlouváme se, zdá se že doÅ¡lo k selhání MPC-HC :(\n\nPro usnadnÄ›ní odhalení a opravy chyby bude zasláno hlášení o chybÄ›. Pokud chcete, můžete pÅ™ed odesláním poskytnou dodateÄné informace."
+msgid "Optional information"
+msgstr "Doplňující informace"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1684,7 +1736,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Popis problému (použijte angliÄtinu):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Restartovat MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "UkonÄit MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.cs.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.cs.menus.po
index 985ffb0fb..4a1a46972 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.cs.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.cs.menus.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
"PO-Revision-Date: 2015-05-27 15:31+0000\n"
"Last-Translator: khagaroth\n"
-"Language-Team: Czech (http://www.transifex.com/projects/p/mpc-hc/language/cs/)\n"
+"Language-Team: Czech (http://www.transifex.com/mpc-hc/mpc-hc/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.cs.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.cs.strings.po
index 6e7cba2b1..f34b5e9f8 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.cs.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.cs.strings.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-27 15:31+0000\n"
-"Last-Translator: khagaroth\n"
-"Language-Team: Czech (http://www.transifex.com/projects/p/mpc-hc/language/cs/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Czech (http://www.transifex.com/mpc-hc/mpc-hc/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -326,12 +326,12 @@ msgid "On/Off"
msgstr "Zap/Vyp"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Od FPS"
+msgid "From (FPS)"
+msgstr "Od (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "Do FPS"
+msgid "To (FPS)"
+msgstr "Do (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -465,6 +465,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Přehrávání::Shadery"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Zdroje"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Ostatní"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Přehrávání::Záznam"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Přehrávání::Sync renderer"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Přehrávání::Na celou obrazovku"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Interní filtry::Audio Renderer"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Audio switcher"
@@ -557,30 +585,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Titulky::Databáze"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Zdroje"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Ostatní"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Přehrávání::Záznam"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Přehrávání::Sync renderer"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Přehrávání::Na celou obrazovku"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Podrobnosti"
@@ -673,22 +677,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Plocha videa bude vymezena jako běžná mimoobrazovková plocha."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Audio Renderer není funkÄní, nepoužívejte ho."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - nahlášení chyby"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "V programu MPC-HC došlo k chybě, vámi použitá verze byla bohužel zkompilována bez informací potřebných pro ladění.\nPokud chcete chybu nahlásit, zkuste napřed použít oficiální verzi programu.\n\nChcete otevřít stránku pro stažení programu?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Běžný mimoobrazovkový povrch"
@@ -741,9 +733,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (nekomprimované)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Vestavěný syntezátor zvuku"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1393,6 +1385,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Po přehrání: Zavřít"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "Během inicializace došlo k chybě. S vaší pomocí by se nám mohlo podařit tuto chybu opravit.\n\nChcete tuto chybu nahlásit?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Pokud se zvuk pÅ™edchází, zadejte kladnou hodnotu, pokud se zpožÄuje, tak zápornou."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Náhled je zakázán. Můžete ho povolit v možnostech MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Tato volba umožňuje náhled souborů ze vzdáleného umístÄ›ní. Použijte ji pouze na řádnÄ› zabezpeÄené privátní síti.\n\nOpravdu chcete tuto volbu povolit?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "VestavÄ›ný zobrazovaÄ titulků"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Otevřít zařízení"
@@ -1677,6 +1689,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Zobrazit název souboru"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Přehrát DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Přehrát BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: Zobrazit statistiku rendereru"
@@ -1958,19 +1978,19 @@ msgid "Options"
msgstr "Možnosti"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
+msgid "Next Audio Track"
msgstr "Další zvuková stopa"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
+msgid "Prev Audio Track"
msgstr "Předchozí zvuková stopa"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
+msgid "Next Subtitle Track"
msgstr "Další titulky"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
+msgid "Prev Subtitle Track"
msgstr "Předchozí titulky"
msgctxt "IDS_MPLAYERC_85"
@@ -1981,22 +2001,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Znovu naÄíst titulky"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Další zvuková stopa (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Předchozí zvuková stopa (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Další titulky (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Předchozí titulky (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Další úhel pohledu (DVD)"
@@ -2006,19 +2010,19 @@ msgid "Prev Angle (DVD)"
msgstr "Předchozí úhel pohledu (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
+msgid "Next Audio Track (DVD)"
msgstr "Další zvuková stopa (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
+msgid "Prev Audio Track (DVD)"
msgstr "Předchozí zvuková stopa (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
+msgid "Next Subtitle Track (DVD)"
msgstr "Další titulky (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
+msgid "Prev Subtitle Track (DVD)"
msgstr "Předchozí titulky (DVD)"
msgctxt "IDS_MPLAYERC_97"
@@ -2385,14 +2389,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Aktuální"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC byl neoÄekávanÄ› ukonÄen. Pokud nám chcete pomoci tento problém odstranit, nahrajte prosím soubor '%s' na náš bugtracker.\n\nChcete otevřít adresář s tímto souborem a pÅ™ejít na stránku bugtrackeru?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Nepodařilo se vytvořit soubor výpisu paměti „%s“ (chyba %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Vyberte adresář"
@@ -2566,8 +2562,8 @@ msgid "Volume boost Max"
msgstr "Zesílení - maximální"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Použití: mpc-hc.exe \"cesta\" [parametry]\n\n\"cesta\"\t\tSoubor nebo adresář, který má být otevÅ™en\n\t\t(povoleny masky, \"-\" oznaÄuje standardní vstup)\n/dub \"soubor\"\tNaÄte soubor se zvukovou stopou\n/dubdelay \"soubor\"\tNaÄte soubor se zvukovou stopou posunutou\n\t\to XXms (pokud název souboru obsahuje\n\t\t\"...DELAY XXms...\")\n/d3dfs\t\tSpustí vykreslování v D3D fullscreen režimu\n/sub \"soubor\"\tNaÄte soubor s titulky\n/filter \"soubor\"\tNaÄte DirectShow filtr (*.ax nebo *.dll, povoleny\n\t\tmasky)\n/dvd\t\tSpustí MPC-HC v DVD režimu, volitelný parametr\n\t\t\"cesta\" urÄuje DVD adresář\n/dvdpos T#K\tSpustí pÅ™ehrávání titulu T, kapitoly K\n/dvdpos T#hh:mm\tSpustí pÅ™ehrávání titulu T, pozice hh:mm:ss\n/cd\t\tNaÄte vÅ¡echny stopy AudioCD/(S)VCD, volitelný\n\t\tparametr \"cesta\" udává písmeno CD mechaniky\n/device\t\tOtevÅ™e výchozí video zařízení\n/open\t\tNaÄte soubor, ale nespustí pÅ™ehrávání\n/play\t\tNaÄte soubor a pÅ™ehraje ho\n/close\t\tPo ukonÄení pÅ™ehrávání zavÅ™e pÅ™ehrávaÄ (funkÄní\n\t\tjen v kombinaci s /play)\n/shutdown\tPo ukonÄení pÅ™ehrávání vypne poÄítaÄ\n/standby\t\tPo pÅ™ehrání pÅ™epne systém do úsporného režimu\n/hibernate\tPo pÅ™ehrání pÅ™epne systém do režimu hibernace\n/logoff\t\tPo pÅ™ehrání odhlásí aktuálnÄ› pÅ™ihlášeného uživatele\n/lock\t\tPo pÅ™ehrání uzamkne aktivní uživatelský úÄet\n/monitoroff\tPo pÅ™ehrání vypne obrazovku\n/playnext\t\tPo pÅ™ehrání otevÅ™e další soubor v adresáři\n/fullscreen\tSpustí pÅ™ehrávaÄ v režimu na celou obrazovku\n/minimized\tSpustí pÅ™ehrávaÄ minimalizovaný\n/new\t\tOtevÅ™e novou instanci MPC-HC\n/add\t\tPÅ™idá \"cestu\" do playlistu, může být kombinován\n\t\ts /open a /play\n/randomize⇥NáhodnÄ› seÅ™adí seznam stop\n/regvid\t\tNastaví MPC-HC jako výchozí pÅ™ehrávaÄ pro\n\t\tpodporované video formáty\n/regaud\t\tNastaví MPC-HC jako výchozí pÅ™ehrávaÄ pro\n\t\tpodporované zvukové formáty\n/regpl\t\tNastaví MPC-HC jako výchozí pÅ™ehrávaÄ pro\n\t\tpodporované seznamy stop\n/regall\t\tNastaví MPC-HC jako výchozí pÅ™ehrávaÄ pro\n\t\tvÅ¡echny podporované formáty\n/unregall\t\tZruší asociaci MPC-HC se vÅ¡emi formáty\n\t\t(vÄetnÄ› playlistů)\n/start ms\t\tSpustí pÅ™ehrávání od zadané pozice\n\t\t(ms = milisekundy)\n/startpos hh:mm:ss\tSpustí pÅ™ehrávání od pozice hh:mm:ss\n/fixedsize w,h\tSpustí pÅ™ehrávaÄ se zadanou velikostí okna\n/monitor N\tSpustí pÅ™ehrávání na monitoru N, kde N\n\t\tzaÄíná od 1\n/audiorenderer N\tPoužije audiorenderer N, kde N zaÄíná od 1\n\t\t(viz nastavení \"Výstup\")\n/shaderpreset \"PÅ™\"\tPoužije pÅ™edvolbu shaderů \"PÅ™\"\n/pns \"název\"\tPoužije pÅ™edvolbu Pan&Scan urÄitého názvu\n/iconsassoc\tZnovu pÅ™iÅ™adí ikony formátů souborů\n/nofocus\t\tSpustí MPC-HC v pozadí\n/webport N\tSpustí webové rozhraní na zadaném portu\n/debug\t\tZobrazí ladicí informace v OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tPoužije MPC-HC jako podřízený proces\n/reset\t\tObnoví výchozí nastavení\n/help /h /?\tZobrazí tento dialog\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Použití: mpc-hc.exe \"cesta\" [parametry]\n\n\"cesta\"\t\tSoubor nebo adresář, který má být otevÅ™en\n\t\t(povoleny masky, \"-\" oznaÄuje standardní vstup)\n/dub \"soubor\"\tNaÄte soubor se zvukovou stopou\n/dubdelay \"soubor\"\tNaÄte soubor se zvukovou stopou posunutou\n\t\to XXms (pokud název souboru obsahuje\n\t\t\"...DELAY XXms...\")\n/d3dfs\t\tSpustí vykreslování v D3D fullscreen režimu\n/sub \"soubor\"\tNaÄte soubor s titulky\n/filter \"soubor\"\tNaÄte DirectShow filtr (*.ax nebo *.dll, povoleny\n\t\tmasky)\n/dvd\t\tSpustí MPC-HC v DVD režimu, volitelný parametr\n\t\t\"cesta\" urÄuje DVD adresář\n/dvdpos T#K\tSpustí pÅ™ehrávání titulu T, kapitoly K\n/dvdpos T#hh:mm\tSpustí pÅ™ehrávání titulu T, pozice hh:mm:ss\n/cd\t\tNaÄte vÅ¡echny stopy AudioCD/(S)VCD, volitelný\n\t\tparametr \"cesta\" udává písmeno CD mechaniky\n/device\t\tOtevÅ™e výchozí video zařízení\n/open\t\tNaÄte soubor, ale nespustí pÅ™ehrávání\n/play\t\tNaÄte soubor a pÅ™ehraje ho\n/close\t\tPo ukonÄení pÅ™ehrávání zavÅ™e pÅ™ehrávaÄ (funkÄní\n\t\tjen v kombinaci s /play)\n/shutdown\tPo ukonÄení pÅ™ehrávání vypne poÄítaÄ\n/standby\t\tPo pÅ™ehrání pÅ™epne systém do úsporného režimu\n/hibernate\tPo pÅ™ehrání pÅ™epne systém do režimu hibernace\n/logoff\t\tPo pÅ™ehrání odhlásí aktuálnÄ› pÅ™ihlášeného uživatele\n/lock\t\tPo pÅ™ehrání uzamkne aktivní uživatelský úÄet\n/monitoroff\tPo pÅ™ehrání vypne obrazovku\n/playnext\t\tPo pÅ™ehrání otevÅ™e další soubor v adresáři\n/fullscreen\tSpustí pÅ™ehrávaÄ v režimu na celou obrazovku\n/minimized\tSpustí pÅ™ehrávaÄ minimalizovaný\n/new\t\tOtevÅ™e novou instanci MPC-HC\n/add\t\tPÅ™idá \"cestu\" do playlistu, může být kombinován\n\t\ts /open a /play\n/randomize⇥NáhodnÄ› seÅ™adí seznam stop\n/regvid\t\tNastaví MPC-HC jako výchozí pÅ™ehrávaÄ pro\n\t\tpodporované video formáty\n/regaud\t\tNastaví MPC-HC jako výchozí pÅ™ehrávaÄ pro\n\t\tpodporované zvukové formáty\n/regpl\t\tNastaví MPC-HC jako výchozí pÅ™ehrávaÄ pro\n\t\tpodporované seznamy stop\n/regall\t\tNastaví MPC-HC jako výchozí pÅ™ehrávaÄ pro\n\t\tvÅ¡echny podporované formáty\n/unregall\t\tZruší asociaci MPC-HC se vÅ¡emi formáty\n\t\t(vÄetnÄ› playlistů)\n/start ms\t\tSpustí pÅ™ehrávání od zadané pozice\n\t\t(ms = milisekundy)\n/startpos hh:mm:ss\tSpustí pÅ™ehrávání od pozice hh:mm:ss\n/fixedsize w,h\tSpustí pÅ™ehrávaÄ se zadanou velikostí okna\n/monitor N\tSpustí pÅ™ehrávání na monitoru N, kde N\n\t\tzaÄíná od 1\n/audiorenderer N\tPoužije audiorenderer N, kde N zaÄíná od 1\n\t\t(viz nastavení \"Výstup\")\n/shaderpreset \"PÅ™\"\tPoužije pÅ™edvolbu shaderů \"PÅ™\"\n/pns \"název\"\tPoužije pÅ™edvolbu Pan&Scan urÄitého názvu\n/iconsassoc\tZnovu pÅ™iÅ™adí ikony formátů souborů\n/nofocus\t\tSpustí MPC-HC v pozadí\n/webport N\tSpustí webové rozhraní na zadaném portu\n/debug\t\tZobrazí ladicí informace v OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tPoužije MPC-HC jako podřízený proces\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tObnoví výchozí nastavení\n/help /h /?\tZobrazí tento dialog\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3041,18 +3037,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Poměr stran"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Použit WASAPI (znovu spustit přehrávání)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Ztlumit bÄ›hem pÅ™etáÄení"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Zvukové zařízení:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: Zapnuto"
@@ -3609,3 +3593,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Nastavení"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.da.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.da.dialogs.po
index 39ab70fc2..e90402656 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.da.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.da.dialogs.po
@@ -11,10 +11,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-20 01:31+0000\n"
+"POT-Creation-Date: 2015-09-08 19:47:48+0000\n"
+"PO-Revision-Date: 2015-09-25 20:18+0000\n"
"Last-Translator: scootergrisen\n"
-"Language-Team: Danish (http://www.transifex.com/projects/p/mpc-hc/language/da/)\n"
+"Language-Team: Danish (http://www.transifex.com/mpc-hc/mpc-hc/language/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -477,10 +477,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Automatisk indlæsning af lydfiler"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Brug den indbyggede undertekst-renderer"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Styring"
@@ -681,9 +677,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Forhindre minimering af afspilleren i fuldskærm-tilstand på en ikke-standard monitor"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Brug Windows 7 proceslinje funktioner"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Anvend forbedret proceslinjefunktioner"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1174,8 +1170,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Undertekster *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1190,8 +1186,8 @@ msgid "Rotation"
msgstr "Rotation"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Eksterne filtre (såsom VSFilter) kan vise undertekster på alle renderere."
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1209,6 +1205,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Tillad kun adgang fra localhost"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Aktivér forhåndsvisning"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Vis fejlfindingsoplysninger"
@@ -1283,7 +1283,7 @@ msgstr "Aktivér automatisk søgning efter opdatering"
msgctxt "IDD_PPAGEMISC_IDC_STATIC5"
msgid "Check every:"
-msgstr "Kontrollér hver:"
+msgstr "Tjek hver:"
msgctxt "IDD_PPAGEMISC_IDC_STATIC6"
msgid "day(s)"
@@ -1559,7 +1559,7 @@ msgstr "Test"
msgctxt "IDD_UPDATE_DIALOG_CAPTION"
msgid "Update Checker"
-msgstr "Søgning efter opdatering"
+msgstr "Søgning efter opdateringer"
msgctxt "IDD_UPDATE_DIALOG_IDC_UPDATE_DL_BUTTON"
msgid "&Download now"
@@ -1657,6 +1657,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Standard"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Enhed"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Eksklusiv-tilstand"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Tillad bitstreaming"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Indstillinger"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Aktivér stereo-crossfeed (til hovedtelefoner)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Cut-off:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Niveau:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Bemærk/Bemærkning"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "For at minimerer lydforvrængning, anbefales det at holde afspillerens lydstyrke omkring 85%, når der afspilles højt lossy-encoded indhold."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG kvalitet:"
@@ -1673,9 +1717,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Fejlrapportering"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Vi beklager, men det ser ud til at MPC-HC er holdt op med at virke. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Send en fejlrapport for at hjælpe os med at diagnostisere problemet."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Vi beklager, men MPC-HC er holdt op med at virke. :(\n\nFor at hjælpe os med at diagnostisere problemet, vil en fejlrapport blive sendt. Du kan tilføje yderligere oplysninger hvis du vil."
+msgid "Optional information"
+msgstr "Valgfrie informationer"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1689,7 +1741,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Beskrivelse af problemet (skriv kun på engelsk):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Genstart MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Afslut MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.da.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.da.menus.po
index 0bca2596c..b2793560d 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.da.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.da.menus.po
@@ -8,10 +8,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
"PO-Revision-Date: 2015-05-30 21:10+0000\n"
"Last-Translator: scootergrisen\n"
-"Language-Team: Danish (http://www.transifex.com/projects/p/mpc-hc/language/da/)\n"
+"Language-Team: Danish (http://www.transifex.com/mpc-hc/mpc-hc/language/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.da.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.da.strings.po
index af6d82a0b..4e69ffb54 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.da.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.da.strings.po
@@ -8,10 +8,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-30 21:10+0000\n"
-"Last-Translator: scootergrisen\n"
-"Language-Team: Danish (http://www.transifex.com/projects/p/mpc-hc/language/da/)\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-09-24 20:31+0000\n"
+"Last-Translator: Underground78\n"
+"Language-Team: Danish (http://www.transifex.com/mpc-hc/mpc-hc/language/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -327,12 +327,12 @@ msgid "On/Off"
msgstr "Til/Fra"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Fra FPS"
+msgid "From (FPS)"
+msgstr "Fra (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "Til FPS"
+msgid "To (FPS)"
+msgstr "Til (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -466,6 +466,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Afspilning::Shadere"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Ressourcer"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Diverse"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "Medieinfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Afspilning::Indspil"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Afspilning::Sync Rendererindstillinger"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Afspilning::Fuldskærm"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Interne filtre::Lyd-renderer"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Lyd-omskifter"
@@ -558,30 +586,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Undertekster::Database"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Ressourcer"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Diverse"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "Medieinfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Afspilning::Indspil"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Afspilning::Sync Rendererindstillinger"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Afspilning::Fuldskærm"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Detaljer"
@@ -674,22 +678,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Video-overflade vil blive allokeret som en almindelig overflade uden for skærmbilledet."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Audio Renderer er i stykker, undlad at benytte den."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Rapportér en bug"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC er lige gået ned, men denne build blev kompileret uden fejlfindingsoplysninger.\nHvis du vil rapportere denne fejl, skal du først prøve en officielle build.\n\nVil du besøge download-siden nu?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Almindelig simpel overflade uden for skærmbilledet"
@@ -742,9 +734,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (uncompressed)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Intern lyd-renderer"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1394,6 +1386,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Efter afspilning: Luk"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC støttet på et problem under initialisering. Med din hjælp, kan vi muligvis rette problemet.\n\nVil du rapporterer det? "
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Indtast en positiv værdi hvis lyden er for tidlig, en negativ værdi hvis den er forsinket."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Forhåndsvisning er deaktiveret. Du kan aktiverer det i MPC-HC's indstillinger."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Denne indstilling kan bruges til at forhåndsvise mediefiler fra fjern-placeringer. Brug det kun på et ordentligt sikret, privat netværk.\n\nVil du virkelig aktiverer denne indstilling?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr ""
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Ã…bn enhed"
@@ -1678,6 +1690,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Vis filnavn"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Afspil DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Afspil BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: Vis rendererstatistik"
@@ -1696,7 +1716,7 @@ msgstr "Skjul &kanter"
msgctxt "IDS_VIEW_FRAMEONLY"
msgid "Fra&me Only"
-msgstr "Kun ra&mme"
+msgstr "&Kun billede"
msgctxt "IDS_VIEW_CAPTIONMENU"
msgid "Sho&w Caption&&Menu"
@@ -1959,20 +1979,20 @@ msgid "Options"
msgstr "Indstillinger"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Næste lyd"
+msgid "Next Audio Track"
+msgstr "Næste lydspor"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Forrige lyd"
+msgid "Prev Audio Track"
+msgstr "Forrige lydspor"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Næste undertekst"
+msgid "Next Subtitle Track"
+msgstr "Næste undertekstspor"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Forrige undertekst"
+msgid "Prev Subtitle Track"
+msgstr "Forrige undertekstspor"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1982,22 +2002,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Genindlæs undertekster"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Næste lyd (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Forrige lyd (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Næste undertekst (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Forrige undertekst (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Næste vinkel (DVD)"
@@ -2007,20 +2011,20 @@ msgid "Prev Angle (DVD)"
msgstr "Forrige vinkel (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Næste lyd (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Næste lydspor (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Forrige lyd (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Forrige lydspor (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Næste undertekst (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Næste undertekstspor (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Forrige undertekst (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "Forrige undertekstspor (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2386,14 +2390,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Aktuel"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC lukkede uventet. Send venligst denne fil \"%s\" til vores bug-sporing, for at hjælpe os med at rette dette problem.\n\nØnsker du at åbne mappen med minidump-filen og besøge bug-sporeren nu?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Forsøg på at oprette dump-fil til \"%s\" mislykkedes (fejl %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Vælg mappe"
@@ -2567,8 +2563,8 @@ msgid "Volume boost Max"
msgstr "Lydstyrke forstærk maksimum"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Anvendelse: mpc-hc.exe \"stinavn\" [parametre]\n\n\"stinavn\"\t\tHovedfilen eller mappen der skal indlæses\n\t\t(jokertegn er tilladt, \"-\" vælger standardinput)\n/dub \"dubnavn\"\tIndlæser en ekstra lydfil\n/dubdelay \"fil\"\tIndlæser en ekstra lydfil forskudt med XXms (hvis\n\t\tfilen indeholder \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering i D3D fuldskærm-tilstand\n/sub \"filnavn\"\tIndlæser en ekstra undertekstfil\n/filter \"filternavn\"\tIndlæser DirectShow-filtre fra et dynamisk linket\n\t\tbibliotek (jokertegn er tilladt)\n/dvd\t\tKør i DVD-tilstand, \"stinavn\" betyder\n\t\tDVD-mappen (valgfri)\n/dvdpos T#C\tStart afspilning ved titel T, kapitel C\n/dvdpos T#hh:mm\tStart afspilning ved titel T, tidspunkt hh:mm:ss\n/cd\t\tIndlæs alle spor fra en lyd-CD eller (S)VCD,\n\t\t\"stinavn\" betyder drevstien (valgfri)\n/device\t\tÅbn standard videoenheden\n/open\t\tÅbn filen, start ikke afspilning automatisk\n/play\t\tStart afspilning af filen så snart afspilleren er\n\t\tstartet\n/close\t\tLuk afspilleren når afspilning er slut (virker kun når\n\t\t/play bruges)\n/shutdown\tLuk styresystem når afspilning er slut\n/standby\t\tSæt styresystem i slumre når afspilning er slut\n/hibernate\tSæt styresystem i dvale når afspilning er slut\n/logoff\t\tLog af når afspilning er slut\n/lock\t\tLås arbejdsstation når afspilning er slut\n/monitoroff\tSluk skærmen når afspilning er slut\n/playnext\t\tÅbn næste fil i mappen når afspilning er slut\n/fullscreen\tStart i fuldskærm\n/minimized\tStart minimeret\n/new\t\tÅbn en ny forekomst af afspilleren\n/add\t\tTilføj \"stinavn\" til spilleliste, kan kombineres\n\t\tmed /open og /play\n/randomize\tTilfældig rækkefølge i spilleliste\n/regvid\t\tOpret filtilknytninger til videofiler\n/regaud\t\tOpret filtilknytninger til lydfiler\n/regpl\t\tOpret filtilknytninger til spillelistefiler\n/regall\t\tOpret filtilknytninger til alle understøttede filtyper\n/unregall\t\tFjern alle filtilknytninger\n/start ms\t\tStart afspilning ved \"ms\" (= millisekunder)\n/startpos\t\thh:mm:ss\tStart afspilning ved tidspunkt hh:mm:ss\n/fixedsize w,h\tBrug fast vinduesstørrelse\n/monitor N\tStart afspilning på skærm N, hvor N starter fra 1\n/audiorenderer N\tStart med lyd-rendereren N, hvor N starter fra 1\n\t\t(se \"Output\" indstillinger)\n/shaderpreset \"Pr\"\tStart med \"Pr\" shader forudindstilling\n/pns \"navn\"\tVælg panorering og scanning forudindstilling\n/iconsassoc\tTilknyt format-ikoner igen\n/nofocus\t\tÅbn MPC-HC i baggrunden\n/webport N\tStart webgrænsefladen på den valgte port\n/debug\t\tVis fejlfindingsoplysninger i OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tBrug MPC-HC som slave\n/reset\t\tGendan standardindstillinger\n/help /h /?\tVis hjælp til kommandolinjeparametre\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Anvendelse: mpc-hc.exe \"stinavn\" [parametre]\n\n\"stinavn\"\t\tHovedfilen eller mappen der skal indlæses\n\t\t(jokertegn er tilladt, \"-\" vælger standardinput)\n/dub \"dubnavn\"\tIndlæser en ekstra lydfil\n/dubdelay \"fil\"\tIndlæser en ekstra lydfil forskudt med XXms (hvis\n\t\tfilen indeholder \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering i D3D fuldskærm-tilstand\n/sub \"filnavn\"\tIndlæser en ekstra undertekstfil\n/filter \"filternavn\"\tIndlæser DirectShow-filtre fra et dynamisk linket\n\t\tbibliotek (jokertegn er tilladt)\n/dvd\t\tKør i DVD-tilstand, \"stinavn\" betyder\n\t\tDVD-mappen (valgfri)\n/dvdpos T#C\tStart afspilning ved titel T, kapitel C\n/dvdpos T#hh:mm\tStart afspilning ved titel T, tidspunkt hh:mm:ss\n/cd\t\tIndlæs alle spor fra en lyd-CD eller (S)VCD,\n\t\t\"stinavn\" betyder drevstien (valgfri)\n/device\t\tÅbn standard videoenheden\n/open\t\tÅbn filen, start ikke afspilning automatisk\n/play\t\tStart afspilning af filen så snart afspilleren er\n\t\tstartet\n/close\t\tLuk afspilleren når afspilning er slut (virker kun når\n\t\t/play bruges)\n/shutdown\tLuk styresystem når afspilning er slut\n/standby\t\tSæt styresystem i slumre når afspilning er slut\n/hibernate\tSæt styresystem i dvale når afspilning er slut\n/logoff\t\tLog af når afspilning er slut\n/lock\t\tLås arbejdsstation når afspilning er slut\n/monitoroff\tSluk skærmen når afspilning er slut\n/playnext\t\tÅbn næste fil i mappen når afspilning er slut\n/fullscreen\tStart i fuldskærm\n/minimized\tStart minimeret\n/new\t\tÅbn en ny forekomst af afspilleren\n/add\t\tTilføj \"stinavn\" til spilleliste, kan kombineres\n\t\tmed /open og /play\n/randomize\tTilfældig rækkefølge i spilleliste\n/regvid\t\tOpret filtilknytninger til videofiler\n/regaud\t\tOpret filtilknytninger til lydfiler\n/regpl\t\tOpret filtilknytninger til spillelistefiler\n/regall\t\tOpret filtilknytninger til alle understøttede filtyper\n/unregall\t\tFjern alle filtilknytninger\n/start ms\t\tStart afspilning ved \"ms\" (= millisekunder)\n/startpos\t\thh:mm:ss\tStart afspilning ved tidspunkt hh:mm:ss\n/fixedsize w,h\tBrug fast vinduesstørrelse\n/monitor N\tStart afspilning på skærm N, hvor N starter fra 1\n/audiorenderer N\tStart med lyd-rendereren N, hvor N starter fra 1\n\t\t(se \"Output\" indstillinger)\n/shaderpreset \"Pr\"\tStart med \"Pr\" shader forudindstilling\n/pns \"navn\"\tVælg panorering og scanning forudindstilling\n/iconsassoc\tTilknyt format-ikoner igen\n/nofocus\t\tÅbn MPC-HC i baggrunden\n/webport N\tStart webgrænsefladen på den valgte port\n/debug\t\tVis fejlfindingsoplysninger i OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tBrug MPC-HC som slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tGendan standardindstillinger\n/help /h /?\tVis hjælp til kommandolinjeparametre\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3042,18 +3038,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Højde-bredde-forhold"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Brug WASAPI (genstart afspilning)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Mute ved hurtig afspilning"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Lydenhed:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "Lodret synkronisering: Til"
@@ -3292,7 +3276,7 @@ msgstr "MPC-HC v%s er nu tilgængelig. Du bruger v%s.\n\nØnsker du at besøge M
msgctxt "IDS_UPDATE_ERROR"
msgid "Update server not found.\n\nPlease check your internet connection or try again later."
-msgstr "Opdateringsserver ikke fundet.\n\nKontroller din internetforbindelse eller prøv igen senere."
+msgstr "Opdateringsserveren blev ikke fundet.\n\nTjek din internetforbindelse eller prøv igen senere."
msgctxt "IDS_UPDATE_CLOSE"
msgid "&Close"
@@ -3610,3 +3594,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Indstillinger"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.de.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.de.dialogs.po
index 39a9ea593..67ebd2b03 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.de.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.de.dialogs.po
@@ -11,10 +11,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-27 18:10+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-20 17:47+0000\n"
"Last-Translator: Luan <luanmail@gmx.net>\n"
-"Language-Team: German (http://www.transifex.com/projects/p/mpc-hc/language/de/)\n"
+"Language-Team: German (http://www.transifex.com/mpc-hc/mpc-hc/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -307,7 +307,7 @@ msgstr "Disc-Wiedergabe deaktivieren"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK9"
msgid "Process priority above normal"
-msgstr "Prozesspriorität höher als \"normal\""
+msgstr "Prozesspriorität höher als normal"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK14"
msgid "Enable cover-art support"
@@ -379,7 +379,7 @@ msgstr "Weitere Einstellungen"
msgctxt "IDD_PPAGEDVD_IDC_CHECK2"
msgid "Allow closed captions in \"Line 21 Decoder\""
-msgstr "Untertitel im Line 21 Decoder erlauben"
+msgstr "Erweiterte Untertitel über Line 21 Decoder ausgeben"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Audio"
@@ -431,7 +431,7 @@ msgstr "Nach Wiedergabe"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Output"
-msgstr "Standard-Ansicht"
+msgstr "Fensteransicht"
msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK5"
msgid "Auto-zoom:"
@@ -439,7 +439,7 @@ msgstr "Zoom verwenden:"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC2"
msgid "Auto fit factor:"
-msgstr "Faktor für Auto-Zoom:"
+msgstr "In Desktop einpassen mit:"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC3"
msgid "%"
@@ -477,10 +477,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Audiodateien automatisch laden"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Internen Untertitel-Renderer verwenden"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Steuerungskontrolle"
@@ -575,7 +571,7 @@ msgstr "Hinweis"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "If you override and enable full-screen antialiasing somewhere at your videocard's settings, subtitles aren't going to look any better but it will surely eat your CPU."
-msgstr "Wird hier \"Untertitelposition anpassen\" zusammen mit Vollbild-Antialiasing in den Einstellungen der Grafikkarte aktiviert, bleibt die Bildqualität unverändert. Dabei steigt die CPU-Auslastung aber deutlich an."
+msgstr "Wird Vollbild-Antialiasing in den Einstellungen der Grafikkarte aktiviert, bleibt die Darstellungsqualität der Untertitel unverändert. Auch kann die CPU-Auslastung deutlich ansteigen."
msgctxt "IDD_PPAGEFORMATS_IDC_STATIC2"
msgid "File extensions"
@@ -681,9 +677,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Minimieren des Fensters auf sekundärem Anzeigegerät bei Vollbild verhindern"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Windows-Taskbarfunktionen verwenden (ab Windows 7)"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Erweiterte Taskleistenfunktionen verwenden"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -883,7 +879,7 @@ msgstr "Zoom: 0.2 -> 3.0"
msgctxt "IDD_PPAGEACCELTBL_IDC_CHECK2"
msgid "Global Media Keys"
-msgstr "Tasten global abfragen"
+msgstr "Multimedia-Tasten global abfragen"
msgctxt "IDD_PPAGEACCELTBL_IDC_BUTTON1"
msgid "Select All"
@@ -891,7 +887,7 @@ msgstr "&Alle auswählen"
msgctxt "IDD_PPAGEACCELTBL_IDC_BUTTON2"
msgid "Reset Selected"
-msgstr "&Befehl zurücksetzen"
+msgstr "&Eintrag zurücksetzen"
msgctxt "IDD_MEDIATYPES_DLG_CAPTION"
msgid "Warning"
@@ -1174,8 +1170,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Untertitel *"
+msgid "Subtitles"
+msgstr "Untertitel"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1190,8 +1186,8 @@ msgid "Rotation"
msgstr "Rotation"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Externe Filter (z.B. VSFilter) können Untertitel mit allen Renderern darstellen."
+msgid "Subtitle Renderer"
+msgstr "Untertitel-Renderer"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1209,6 +1205,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Nur lokalen Zugriff erlauben"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Medienvorschau aktivieren"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Debug-Information ausgeben"
@@ -1251,7 +1251,7 @@ msgstr "&Speichern..."
msgctxt "IDD_PPAGEMISC_IDC_STATIC"
msgid "Color controls (for VMR-9, EVR and madVR)"
-msgstr "Farbeinstellungen für VMR-9, EVR und madVR"
+msgstr "Farbsteuerung für VMR-9, EVR und madVR"
msgctxt "IDD_PPAGEMISC_IDC_STATIC"
msgid "Brightness"
@@ -1283,7 +1283,7 @@ msgstr "Automatische Update-Prüfung aktivieren"
msgctxt "IDD_PPAGEMISC_IDC_STATIC5"
msgid "Check every:"
-msgstr "Tagesintervall:"
+msgstr "Tage zwischen den Prüfungen:"
msgctxt "IDD_PPAGEMISC_IDC_STATIC6"
msgid "day(s)"
@@ -1295,15 +1295,15 @@ msgstr "Programm-Einstellungen verwalten"
msgctxt "IDD_PPAGEMISC_IDC_RESET_SETTINGS"
msgid "Reset"
-msgstr "&Zurücksetzen..."
+msgstr "&Zurücksetzen"
msgctxt "IDD_PPAGEMISC_IDC_EXPORT_SETTINGS"
msgid "Export"
-msgstr "S&ichern..."
+msgstr "&Exportieren..."
msgctxt "IDD_PPAGEMISC_IDC_EXPORT_KEYS"
msgid "Export keys"
-msgstr "&Tastenbefehle sichern..."
+msgstr "&Tasten exportieren..."
msgctxt "IDD_TUNER_SCAN_CAPTION"
msgid "Tuner scan"
@@ -1611,11 +1611,11 @@ msgstr "L&öschen"
msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
msgid "Active pre-resize shaders"
-msgstr "Aktive Pre-Resize-Shader"
+msgstr "Aktive Shader für Pre-Resize"
msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
msgid "Active post-resize shaders"
-msgstr "Aktive Post-Resize-Shader"
+msgstr "Aktive Shader für Post-Resize"
msgctxt "IDD_DEBUGSHADERS_DLG_CAPTION"
msgid "Debug Shaders"
@@ -1657,6 +1657,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Standard"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Audio-Gerät"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Exklusiver Modus"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Bitstreaming erlauben"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Weitere Einstellungen"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Crossfeed für Kopfhörer aktivieren"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "Chu Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "Jan Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Grenze:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Pegel:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Hinweis"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Bei Wiedergabe lauter verlustbehaftet encodierter Audioinhalte können hörbare Tonstörungen auftreten. Um diese möglichst zu vermeiden, sollte die Lautstärke maximal rund 85 % betragen."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG-Qualität:"
@@ -1673,13 +1717,21 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Fehlerberichterstattung"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Der MPC-HC wurde leider unerwartet beendet."
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Zur Diagnose des Problems einen Fehlerbericht senden"
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "MPC-HC leider unerwartet beendet. Zur näheren Bestimmung und Lösung des Problems wurde ein Fehlerbericht zum Versand vorbereitet. Dazu sind weitere Angaben möglich."
+msgid "Optional information"
+msgstr "Optionale Angaben"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
-msgstr "E-Mail:"
+msgstr "E-Mail-Adresse:"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC3"
msgid "Your email address is optional and will only be used if the developers need to contact you for more information."
@@ -1689,7 +1741,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Problembeschreibung (englisch):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "&Neu starten"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "&Beenden"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.de.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.de.menus.po
index eee50760c..cbd822dd0 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.de.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.de.menus.po
@@ -10,10 +10,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
-"PO-Revision-Date: 2015-05-30 10:40+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-07-17 23:38+0000\n"
"Last-Translator: Luan <luanmail@gmx.net>\n"
-"Language-Team: German (http://www.transifex.com/projects/p/mpc-hc/language/de/)\n"
+"Language-Team: German (http://www.transifex.com/mpc-hc/mpc-hc/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -186,11 +186,11 @@ msgstr "&200 %"
msgctxt "ID_VIEW_ZOOM_AUTOFIT"
msgid "Auto &Fit"
-msgstr "Auto-&Anpassung"
+msgstr "&Eingepasst"
msgctxt "ID_VIEW_ZOOM_AUTOFIT_LARGER"
msgid "Auto Fit (&Larger Only)"
-msgstr "Auto-&Verkleinerung"
+msgstr "&Nur verkleinert"
msgctxt "POPUP"
msgid "R&enderer Settings"
@@ -586,7 +586,7 @@ msgstr "&Verringern"
msgctxt "ID_VOLUME_MUTE"
msgid "&Mute"
-msgstr "&Stummschaltung"
+msgstr "&Ton aus"
msgctxt "POPUP"
msgid "Af&ter Playback"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.de.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.de.strings.po
index b4e2722c3..bf0813e15 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.de.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.de.strings.po
@@ -13,10 +13,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-30 10:40+0000\n"
-"Last-Translator: Luan <luanmail@gmx.net>\n"
-"Language-Team: German (http://www.transifex.com/projects/p/mpc-hc/language/de/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: German (http://www.transifex.com/mpc-hc/mpc-hc/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -189,11 +189,11 @@ msgstr "GB/s"
msgctxt "IDS_FILE_FAV_ADDED"
msgid "File added to favorites"
-msgstr "Datei zu Favoriten hinzugefügt."
+msgstr "Datei zu Favoriten hinzugefügt"
msgctxt "IDS_DVD_FAV_ADDED"
msgid "DVD added to favorites"
-msgstr "DVD zu Favoriten hinzugefügt."
+msgstr "DVD zu Favoriten hinzugefügt"
msgctxt "IDS_CAPTURE_SETTINGS"
msgid "Capture Settings"
@@ -245,11 +245,11 @@ msgstr "Schriftart"
msgctxt "IDS_DVD_NAV_SOME_PINS_ERROR"
msgid "Failed to render some of the pins of the DVD Navigator filter"
-msgstr "Rendering einiger DVD-Navigator-Filter-Pins fehlgeschlagen"
+msgstr "Kann einige DVD-Navigator-Filter-Pins nicht rendern"
msgctxt "IDS_DVD_INTERFACES_ERROR"
msgid "Failed to query the needed interfaces for DVD playback"
-msgstr "Interface-Abfrage für DVD-Wiedergabe fehlgeschlagen"
+msgstr "Kann DVD-Wiedergabe-Interface nicht abfragen"
msgctxt "IDS_CAPTURE_LIVE"
msgid "Live"
@@ -269,7 +269,7 @@ msgstr "Kann Aufnahmegerät nicht öffnen"
msgctxt "IDS_INVALID_PARAMS_ERROR"
msgid "Can't open, invalid input parameters"
-msgstr "Öffnen fehlgeschlagen, unzulässige Eingabeparameter"
+msgstr "Ungültiger Eingabeparameter"
msgctxt "IDS_EDIT_LIST_EDITOR"
msgid "Edit List Editor"
@@ -277,11 +277,11 @@ msgstr "List-Editor bearbeiten"
msgctxt "IDS_GOTO_ERROR_INVALID_TIME"
msgid "The entered time is greater than the file duration."
-msgstr "Die angegebene Position überschreitet die Laufzeit der Mediendatei."
+msgstr "Der angegebene Zeitpunkt ist ungültig. Die vorgegebene Laufzeit kann nicht überschritten werden."
msgctxt "IDS_MISSING_ICONS_LIB"
msgid "The icons library \"mpciconlib.dll\" is missing.\nThe player's default icon will be used for file associations.\nPlease, reinstall MPC-HC to get \"mpciconlib.dll\"."
-msgstr "Icon-Bibliothek \"mpciconlib.dll\" nicht gefunden. Bitte den MPC-HC neu installieren, um die Darstellung der Dateizuordnung wiederherzustellen."
+msgstr "Die Icon-Bibliotheksdatei \"mpciconlib.dll\" konnte nicht gefunden werden. Bitte den MPC-HC neu installieren, um die Darstellung der Dateizuordnung wiederherzustellen."
msgctxt "IDS_SUBDL_DLG_FILENAME_COL"
msgid "File"
@@ -329,14 +329,14 @@ msgstr "Wiedergabeliste"
msgctxt "IDS_PPAGE_FS_CLN_ON_OFF"
msgid "On/Off"
-msgstr "Ein/Aus"
+msgstr "Priorität"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr "Von (fps)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr "Bis (fps)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -357,15 +357,15 @@ msgstr "System-Standard"
msgctxt "IDS_GRAPH_INTERFACES_ERROR"
msgid "Failed to query the needed interfaces for playback"
-msgstr "Interface-Abfrage für Wiedergabe fehlgeschlagen"
+msgstr "Kann Wiedergabe-Interface nicht abfragen"
msgctxt "IDS_GRAPH_TARGET_WND_ERROR"
msgid "Could not set target window for graph notification"
-msgstr "Kann Zielfenster für Filtergraph-Benachrichtigung nicht einrichten"
+msgstr "Kann Fenster für Filtergraph-Benachrichtigung nicht einrichten"
msgctxt "IDS_DVD_NAV_ALL_PINS_ERROR"
msgid "Failed to render all pins of the DVD Navigator filter"
-msgstr "Rendering aller DVD-Navigator-Filter-Pins fehlgeschlagen"
+msgstr "Kann keine DVD-Navigator-Filter-Pins rendern"
msgctxt "IDS_PLAYLIST_OPEN"
msgid "&Open"
@@ -471,9 +471,37 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Wiedergabe::Shader"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Ressourcen"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Verschiedenes"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Wiedergabe::Erfassung"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Wiedergabe::Sync-Renderer"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Wiedergabe::Vollbild"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Interne Filter::Audio-Renderer"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
-msgstr "Audio-Switcher"
+msgstr "Audio Switcher"
msgctxt "IDS_ICONS_REASSOC_DLG_TITLE"
msgid "New version of the icon library"
@@ -481,7 +509,7 @@ msgstr "Neue Version der Icon-Bibliothek"
msgctxt "IDS_ICONS_REASSOC_DLG_INSTR"
msgid "Do you want to reassociate the icons?"
-msgstr "Icons neu zuordnen?"
+msgstr "Icons wirklich neu zuordnen?"
msgctxt "IDS_ICONS_REASSOC_DLG_CONTENT"
msgid "This will fix the icons being incorrectly displayed after an update of the icon library.\nThe file associations will not be modified, only the corresponding icons will be refreshed."
@@ -563,30 +591,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Untertitel::Datenbank"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Ressourcen"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Verschiedenes"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Wiedergabe::Erfassung"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Wiedergabe::Sync Renderer"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Wiedergabe::Vollbild"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Details"
@@ -679,21 +683,9 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Die Video-Oberfläche ist eine gleichmäßige Offscreen-Oberfläche."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "Stellt die verschiedenen Audio-Renderer bereit. Bitte den MPC-HC Audio Renderer vorerst nicht verwenden."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
-msgstr "Sync Renderer (EVR-CP)"
-
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "Fehler melden"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC unerwartet beendet. Zur Meldung des Problems bitte eine offizielle Version mit Debug-Information verwenden.\n\nDiese Programmversion jetzt herunterladen?"
+msgstr "Sync-Renderer (EVR-CP)"
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
@@ -737,7 +729,7 @@ msgstr "* nicht verfügbar *"
msgctxt "IDS_PPAGE_OUTPUT_UNAVAILABLEMSG"
msgid "The selected renderer is not installed."
-msgstr "Ausgewählter Renderer nicht installiert."
+msgstr "Der gewählte Renderer ist nicht verfügbar."
msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_COMP"
msgid "Null (anything)"
@@ -747,9 +739,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null Audio Device (uncompressed)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Interner Audio-Renderer"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -761,7 +753,7 @@ msgstr "MIME-Typ"
msgctxt "IDS_EMB_RESOURCES_VIEWER_INFO"
msgid "In order to view an embedded resource in your browser you have to enable the web interface.\n\nUse the \"Save As\" button if you only want to save the information."
-msgstr "Zur Anzeige eingebetteter Ressourcen im Browser muss das Web-Interface aktiviert werden. Um nur die Information zu speichern, bitte den Button \"Speichern unter\" verwenden."
+msgstr "Zur Darstellung eingebetteter Ressourcen bitte das Web-Interface aktivieren. Um nur die Informationen zu speichern, bitte den Button \"Speichern unter\" verwenden."
msgctxt "IDS_DOWNLOAD_SUBS"
msgid "Download subtitles"
@@ -777,11 +769,11 @@ msgstr "Auto"
msgctxt "IDS_EXPORT_SETTINGS_NO_KEYS"
msgid "There are no customized keys to export."
-msgstr "Keine benutzerdefinierten Tastenbefehle verfügbar."
+msgstr "Keine benutzerdefinierten Tasten verfügbar."
msgctxt "IDS_RFS_NO_FILES"
msgid "No media files found in the archive"
-msgstr "Keine Mediendatei im Archiv gefunden"
+msgstr "Kann keine Mediendatei im Archiv finden"
msgctxt "IDS_RFS_COMPRESSED"
msgid "Compressed files are not supported"
@@ -793,7 +785,7 @@ msgstr "Verschlüsselte Archive werden nicht unterstützt"
msgctxt "IDS_RFS_MISSING_VOLS"
msgid "Couldn't find all archive volumes"
-msgstr "Archiv-Volumen unvollständig"
+msgstr "Kann Archiv-Volumen nicht finden"
msgctxt "IDC_TEXTURESURF2D"
msgid "Video surface will be allocated as a texture but still the 2d functions will be used to copy and stretch it onto the backbuffer. Requires a video card which can allocate 32-bit, RGBA, non-power-of-two sized textures and at least in the resolution of the video."
@@ -1173,23 +1165,23 @@ msgstr "DVD/BD öffnen"
msgctxt "IDS_MAINFRM_POST_SHADERS_FAILED"
msgid "Failed to set post-resize shaders"
-msgstr "Shader-Einrichtung für Post-Resize fehlgeschlagen"
+msgstr "Kann Shader für Post-Resize nicht einrichten"
msgctxt "IDS_MAINFRM_BOTH_SHADERS_FAILED"
msgid "Failed to set both pre-resize and post-resize shaders"
-msgstr "Shader-Einrichtung für Pre-Resize und Post-Resize fehlgeschlagen"
+msgstr "Kann Shader für Pre-Resize und Post-Resize nicht einrichten"
msgctxt "IDS_DEBUGSHADERS_FIRSTRUN_MSG"
msgid "Shaders are recompiled automatically when the corresponding files are modified."
-msgstr "Shader werden bei Änderung der zugehörigen Dateien automatisch neu kompiliert."
+msgstr "Shader werden bei Änderung zugehöriger Dateien automatisch neu kompiliert."
msgctxt "IDS_SHADER_DLL_ERR_0"
msgid "Cannot load %s, pixel shaders will not work."
-msgstr "Kann %s nicht laden, Shader bleiben inaktiv"
+msgstr "Kann %s nicht laden, Shader inaktiv"
msgctxt "IDS_SHADER_DLL_ERR_1"
msgid "Cannot find necessary function entry points in %s, pixel shaders will not work."
-msgstr "Kann Funktionseinsprünge in %s nicht finden, Shader bleiben inaktiv"
+msgstr "Kann Funktionseinsprünge in %s nicht finden, Shader inaktiv"
msgctxt "IDS_OSD_SHADERS_PRESET"
msgid "Shader preset: %s"
@@ -1293,11 +1285,11 @@ msgstr "Bestimmt die Maximalanzahl gespeicherter Einträge der zuletzt geöffnet
msgctxt "IDS_PPAGEADVANCED_FILE_POS_LONGER"
msgid "Remember file position only for files longer than N minutes."
-msgstr "Merkt sich die Wiedergabeposition nur für Dateien länger als N Minuten."
+msgstr "Beschränkt das Merken der Datei-Wiedergabeposition auf Dateien mit einer Laufzeit länger als N Minuten."
msgctxt "IDS_PPAGEADVANCED_FILE_POS_AUDIO"
msgid "Remember file position also for audio files."
-msgstr "Merkt sich die Wiedergabeposition auch bei Audiodateien."
+msgstr "Sieht das Merken der Datei-Wiedergabeposition auch für Audiodateien vor."
msgctxt "IDS_AFTER_PLAYBACK_DO_NOTHING"
msgid "Do Nothing"
@@ -1399,6 +1391,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Nach Wiedergabe: Medien schließen"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "Ein Initialisierungsfehler ist aufgetreten. Das geladene Videobild ist ungültig.\n\nDiesen Fehler jetzt melden?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Positive Werte erlauben eine spätere, negative Werte eine frühere Audiowiedergabe."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Medienvorschau nicht verfügbar, kann aber aktiviert werden"
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Mit dieser Option kann die Vorschau einer Mediendatei von einem Remote-Standort aus eingesehen werden. Deshalb bitte nur in einem gut gesicherten privaten Netzwerk verwenden.\n\nMedienvorschau wirklich aktivieren?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Interner Untertitel-Renderer"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Gerät öffnen"
@@ -1417,7 +1429,7 @@ msgstr "Bild schnell speichern"
msgctxt "IDS_OSD_IMAGE_SAVED"
msgid "Image saved successfully"
-msgstr "Bild erfolgreich gespeichert."
+msgstr "Bild gespeichert"
msgctxt "IDS_AG_LOAD_SUBTITLE"
msgid "Load Subtitle"
@@ -1509,7 +1521,7 @@ msgstr "Mit näherem Keyframe"
msgctxt "IDS_HOOKS_FAILED"
msgid "MPC-HC encountered a problem during initialization. DVD playback may not work correctly. This might be caused by some incompatibilities with certain security tools.\n\nDo you want to report this issue?"
-msgstr "Initialisierungsfehler aufgetreten. Möglicherweise arbeitet die DVD-Wiedergabe nicht korrekt. Dies kann ein Hinweis auf Inkompatibilität mit bestimmten Sicherheitsprogrammen sein.\n\nDiesen Fehler jetzt melden?"
+msgstr "Ein Initialisierungsfehler ist aufgetreten. Möglicherweise arbeitet die DVD-Wiedergabe nicht korrekt. Dies kann ein Hinweis auf Inkompatibilität mit bestimmten Sicherheitsprogrammen sein.\n\nDiesen Fehler jetzt melden?"
msgctxt "IDS_PPAGEFULLSCREEN_SHOWNEVER"
msgid "Never show"
@@ -1525,7 +1537,7 @@ msgstr "Steuerleiste unter dem Mauszeiger ausblenden nach"
msgctxt "IDS_MAINFRM_PRE_SHADERS_FAILED"
msgid "Failed to set pre-resize shaders"
-msgstr "Shader-Einrichtung für Pre-Resize fehlgeschlagen"
+msgstr "Kann Shader für Pre-Resize nicht einrichten"
msgctxt "IDS_OSD_RS_FT_CORRECTION_ON"
msgid "Frame Time Correction: On"
@@ -1549,7 +1561,7 @@ msgstr "Tempo: %.2lfx"
msgctxt "IDS_OSD_THUMBS_SAVED"
msgid "Thumbnails saved successfully"
-msgstr "Miniaturansichten erfolgreich gespeichert."
+msgstr "Miniaturansichten gespeichert"
msgctxt "IDS_MENU_VIDEO_STREAM"
msgid "&Video Track"
@@ -1565,27 +1577,27 @@ msgstr "Programm-Einstellungen zurücksetzen"
msgctxt "IDS_RESET_SETTINGS_WARNING"
msgid "Are you sure you want to restore MPC-HC to its default settings?\nBe warned that ALL your current settings will be lost!"
-msgstr "Alle aktuellen Einstellungen gehen verloren!\n\nEinstellungen wirklich auf Standard-Einstellungen zurücksetzen?"
+msgstr "Alle aktuellen Einstellungen gehen verloren!\n\nProgramm-Einstellungen wirklich vollständig zurücksetzen?"
msgctxt "IDS_RESET_SETTINGS_MUTEX"
msgid "Please close all instances of MPC-HC so that the default settings can be restored."
-msgstr "Standard-Einstellungen konnten nicht wiederhergestellt werden. Bitte alle Programminstanzen schließen."
+msgstr "Einstellungen konnten nicht zurückgesetzt werden. Bitte alle Programminstanzen schließen."
msgctxt "IDS_EXPORT_SETTINGS"
msgid "Export settings"
-msgstr "Programm-Einstellungen sichern"
+msgstr "Programm-Einstellungen exportieren"
msgctxt "IDS_EXPORT_SETTINGS_WARNING"
msgid "Some changes have not been saved yet.\nDo you want to save them before exporting?"
-msgstr "Bisher nicht gespeicherte Einstellungen vor der Sicherung übernehmen?"
+msgstr "Nicht übernommene Einstellungen zuvor speichern?"
msgctxt "IDS_EXPORT_SETTINGS_SUCCESS"
msgid "The settings have been successfully exported."
-msgstr "Einstellungen erfolgreich gesichert."
+msgstr "Einstellungen wurden erfolgreich exportiert."
msgctxt "IDS_EXPORT_SETTINGS_FAILED"
msgid "The export failed! This can happen when you don't have the correct rights."
-msgstr "Sicherung fehlgeschlagen! Möglicherweise fehlen die dafür nötigen Zugriffsrechte."
+msgstr "Einstellungen konnten nicht exportiert werden. Möglicherweise fehlen die dafür nötigen Zugriffsrechte."
msgctxt "IDS_BDA_ERROR"
msgid "BDA Error"
@@ -1683,6 +1695,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "Namensanzeige"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "DVD-Wiedergabe"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "BD-Wiedergabe"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "Anzeigestatistik (ein/aus)"
@@ -1737,7 +1757,7 @@ msgstr "Vollbild ohne Auflösungsänderung (ein/aus)"
msgctxt "IDS_AG_ZOOM_AUTO_FIT"
msgid "Zoom Auto Fit"
-msgstr "Zoom: Auto-Anpassung"
+msgstr "Zoom: Eingepasst"
msgctxt "IDS_AG_VIDFRM_HALF"
msgid "VidFrm Half"
@@ -1789,7 +1809,7 @@ msgstr "Analysiere..."
msgctxt "IDS_SUBDL_DLG_NOT_FOUND"
msgid "No subtitles found."
-msgstr "Keinen Untertitel gefunden"
+msgstr "Keine Untertitel gefunden"
msgctxt "IDS_SUBDL_DLG_SUBS_AVAIL"
msgid "%d subtitle(s) available."
@@ -1813,19 +1833,19 @@ msgstr "200 %"
msgctxt "IDS_ZOOM_AUTOFIT"
msgid "Auto Fit"
-msgstr "Auto-Anpassung"
+msgstr "Eingepasst"
msgctxt "IDS_ZOOM_AUTOFIT_LARGER"
msgid "Auto Fit (Larger Only)"
-msgstr "Auto-Verkleinerung"
+msgstr "Nur verkleinert"
msgctxt "IDS_AG_ZOOM_AUTO_FIT_LARGER"
msgid "Zoom Auto Fit (Larger Only)"
-msgstr "Zoom: Auto-Verkleinerung"
+msgstr "Zoom: Nur verkleinert"
msgctxt "IDS_OSD_ZOOM_AUTO_LARGER"
msgid "Zoom: Auto (Larger Only)"
-msgstr "Zoom: Auto-Verkleinerung"
+msgstr "Zoom: Nur verkleinert"
msgctxt "IDS_TOOLTIP_EXPLORE_TO_FILE"
msgid "Double click to open file location"
@@ -1889,7 +1909,7 @@ msgstr "Lautstärke verringern"
msgctxt "IDS_AG_VOLUME_MUTE"
msgid "Volume Mute"
-msgstr "Stummschaltung (ein/aus)"
+msgstr "Ton (ein/aus)"
msgctxt "IDS_MPLAYERC_63"
msgid "DVD Title Menu"
@@ -1964,19 +1984,19 @@ msgid "Options"
msgstr "Optionen"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
+msgid "Next Audio Track"
msgstr "Audiospur vor"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
+msgid "Prev Audio Track"
msgstr "Audiospur zurück"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
+msgid "Next Subtitle Track"
msgstr "Untertitelspur vor"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
+msgid "Prev Subtitle Track"
msgstr "Untertitelspur zurück"
msgctxt "IDS_MPLAYERC_85"
@@ -1987,22 +2007,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Untertitel neu laden"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "OGM: Audiospur vor"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "OGM: Audiospur zurück"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "OGM: Untertitelspur vor"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "OGM: Untertitelspur zurück"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "DVD: Blickwinkel vor"
@@ -2012,19 +2016,19 @@ msgid "Prev Angle (DVD)"
msgstr "DVD: Blickwinkel zurück"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
+msgid "Next Audio Track (DVD)"
msgstr "DVD: Audiospur vor"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
+msgid "Prev Audio Track (DVD)"
msgstr "DVD: Audiospur zurück"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
+msgid "Next Subtitle Track (DVD)"
msgstr "DVD: Untertitelspur vor"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
+msgid "Prev Subtitle Track (DVD)"
msgstr "DVD: Untertitelspur zurück"
msgctxt "IDS_MPLAYERC_97"
@@ -2097,7 +2101,7 @@ msgstr "Untertitel gespeichert"
msgctxt "IDS_MAINFRM_4"
msgid "Cannot save subtitles"
-msgstr "Untertitel konnten nicht gespeichert werden"
+msgstr "Kann Untertitel nicht speichern"
msgctxt "IDS_AG_FRAMERATE"
msgid "Frame rate"
@@ -2165,11 +2169,11 @@ msgstr "DVD: Kopierschutz-Problem"
msgctxt "IDS_MAINFRM_18"
msgid "DVD: Invalid DVD 1.x Disc"
-msgstr "DVD: Unzulässige DVD 1.x"
+msgstr "DVD: Ungültige DVD 1.x"
msgctxt "IDS_MAINFRM_19"
msgid "DVD: Invalid Disc Region"
-msgstr "DVD: Unzulässiger Disc-Regionalcode"
+msgstr "DVD: Ungültiger Disc-Regionalcode"
msgctxt "IDS_MAINFRM_20"
msgid "DVD: Low Parental Level"
@@ -2189,7 +2193,7 @@ msgstr "DVD: Regionalcode-Konflikt zwischen Disc und Decoder"
msgctxt "IDS_D3DFS_WARNING"
msgid "This option is designed to avoid tearing. However, it will also prevent MPC-HC from displaying the context menu and any dialog box during playback.\n\nDo you really want to activate this option?"
-msgstr "Der Direct3D-Vollbildmodus dient dazu, Tearing-Effekte während der Videowiedergabe zu vermeiden. Allerdings werden dabei keine Dialoge und Menüs angezeigt.\n\nDiese Option wirklich aktivieren?"
+msgstr "Mit dieser Option können störende Tearing-Effekte während der Videowiedergabe vermieden werden. Allerdings werden dabei keine Dialogboxen und Menüs angezeigt.\n\nDirect3D-Vollbildmodus aktivieren?"
msgctxt "IDS_MAINFRM_139"
msgid "Sub delay: %ld ms"
@@ -2217,11 +2221,11 @@ msgstr "Bildbreite"
msgctxt "IDS_PPSDB_URLCORRECT"
msgid "The URL appears to be correct!"
-msgstr "URL erfolgreich getestet."
+msgstr "Die angegebene URL ist gültig."
msgctxt "IDS_PPSDB_PROTOCOLERR"
msgid "Protocol version mismatch, please upgrade your player or choose a different address!"
-msgstr "Protokollversionen stimmen nicht überein. Bitte den Player aktualisieren oder eine alternative Adresse verwenden."
+msgstr "Protokollversionen stimmen nicht überein. Nach Möglichkeit bitte eine neuere Programmversion oder eine alternative Adresse verwenden."
msgctxt "IDS_AG_ASPECT_RATIO"
msgid "Aspect Ratio"
@@ -2269,7 +2273,7 @@ msgstr "DVD/BD öffnen"
msgctxt "IDS_SUB_LOADED_SUCCESS"
msgid " loaded successfully"
-msgstr " erfolgreich geladen"
+msgstr " geladen"
msgctxt "IDS_ALL_FILES_FILTER"
msgid "All files (*.*)|*.*||"
@@ -2277,11 +2281,11 @@ msgstr "Alle Dateien (*.*)|*.*||"
msgctxt "IDS_GETDIB_FAILED"
msgid "GetDIB failed, hr = %08x"
-msgstr "GetDIB fehlgeschlagen, hr = %08x."
+msgstr "GetDIB ist fehlgeschlagen, hr = %08x."
msgctxt "IDS_GETCURRENTIMAGE_FAILED"
msgid "GetCurrentImage failed, hr = %08x"
-msgstr "GetCurrentImage fehlgeschlagen, hr = %08x."
+msgstr "GetCurrentImage ist fehlgeschlagen, hr = %08x."
msgctxt "IDS_SCREENSHOT_ERROR"
msgid "Cannot create file"
@@ -2289,19 +2293,19 @@ msgstr "Datei konnte nicht erstellt werden."
msgctxt "IDS_THUMBNAILS_NO_DURATION"
msgid "Cannot create thumbnails for files with no duration"
-msgstr "Miniaturansichten können für Dateien ohne Laufzeit nicht erstellt werden."
+msgstr "Das vorgegebene Bildformat ist ungültig. Miniaturansichten können für Dateien ohne Laufzeit nicht erstellt werden."
msgctxt "IDS_THUMBNAILS_NO_FRAME_SIZE"
msgid "Failed to get video frame size"
-msgstr "Erkennung der Videobildgröße fehlgeschlagen."
+msgstr "Videobildgröße konnte nicht erkannt werden."
msgctxt "IDS_OUT_OF_MEMORY"
msgid "Out of memory, go buy some more!"
-msgstr "Zu wenig Arbeitsspeicher verfügbar!"
+msgstr "Zu wenig Arbeitsspeicher verfügbar."
msgctxt "IDS_THUMBNAILS_INVALID_FORMAT"
msgid "Invalid image format, cannot create thumbnails out of %d bpp dibs."
-msgstr "Bildformat unzulässig. Miniaturansichten können aus geräteunabhängigem Bitmap mit %d bpp nicht erstellt werden."
+msgstr "Das vorgegebene Bildformat ist ungültig. Miniaturansichten können aus geräteunabhängigem Bitmap mit %d bpp nicht erstellt werden."
msgctxt "IDS_THUMBNAILS_INFO_FILESIZE"
msgid "File Size: %s (%s bytes)\\N"
@@ -2313,7 +2317,7 @@ msgstr "{\\an7\\1c&H000000&\\fs16\\b0\\bord0\\shad0}Dateiname: %s\\N%sAuflösung
msgctxt "IDS_THUMBNAIL_TOO_SMALL"
msgid "The thumbnails would be too small, impossible to create the file.\n\nTry lowering the number of thumbnails or increasing the total size."
-msgstr "Miniaturansichten können in dieser geringen Größe nicht erstellt werden. Bitte die Anzahl der Miniaturansichten verringern oder deren Gesamtgröße erhöhen."
+msgstr "Das vorgegebene Bildformat ist ungültig. Miniaturansichten können in dieser geringen Größe nicht erstellt werden. Bitte die Anzahl der Miniaturansichten verringern oder deren Gesamtgröße erhöhen."
msgctxt "IDS_CANNOT_LOAD_SUB"
msgid "To load subtitles you have to change the video renderer type and reopen the file.\n- DirectShow: VMR-7/VMR-9 (renderless), EVR (CP), Sync, madVR or Haali\n- RealMedia: Special renderer for RealMedia, or open it through DirectShow\n- QuickTime: DX7 or DX9 renderer for QuickTime\n- ShockWave: n/a"
@@ -2345,31 +2349,31 @@ msgstr "Zu wenig Arbeitsspeicher verfügbar"
msgctxt "IDS_MAINFRM_77"
msgid "Error: Adobe Flash Player for Internet Explorer is required"
-msgstr "Adobe Flash Player für Internet Explorer wird benötigt."
+msgstr "Kann Adobe Flash Player für Internet Explorer nicht finden"
msgctxt "IDS_MAINFRM_78"
msgid "QuickTime not yet supported for X64 (apple library not available)"
-msgstr "QuickTime wird in 64-Bit-Umgebung nicht unterstützt."
+msgstr "QuickTime kann mit 64-Bit nicht ausgeführt werden"
msgctxt "IDS_MAINFRM_80"
msgid "Failed to create the filter graph object"
-msgstr "Erstellung des Filtergraph-Objekts fehlgeschlagen"
+msgstr "Kann Filtergraph-Objekt nicht erstellen"
msgctxt "IDS_MAINFRM_81"
msgid "Invalid argument"
-msgstr "Argument unzulässig"
+msgstr "Ungültiges Argument"
msgctxt "IDS_MAINFRM_82"
msgid "Opening aborted"
-msgstr "Öffnen abgebrochen"
+msgstr "Abbruch"
msgctxt "IDS_MAINFRM_83"
msgid "Failed to render the file"
-msgstr "Datei-Rendering fehlgeschlagen"
+msgstr "Kann Datei nicht verarbeiten"
msgctxt "IDS_PPSDB_BADURL"
msgid "Bad URL, could not locate subtitle database there!"
-msgstr "URL ungültig. Verbindung zur Untertiteldatenbank konnte nicht hergestellt werden."
+msgstr "Die angegebene URL ist ungültig. Die Verbindung zur Untertiteldatenbank konnte nicht hergestellt werden."
msgctxt "IDS_AG_CHAPTER2"
msgid "Chapter: "
@@ -2391,14 +2395,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Aktueller Monitor"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC unerwartet beendet. Zur Lösung des Problems bitte die Datei \"%s\" an den Bugtracker senden.\n\nDateiordner jetzt öffnen und den Bugtracker aufrufen?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Erstellung der Minidump-Datei \"%s\" fehlgeschlagen. (Fehler %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Verzeichnis öffnen"
@@ -2425,7 +2421,7 @@ msgstr "Ansicht: Steuerelemente (ein/aus)"
msgctxt "IDS_MAINFRM_84"
msgid "Invalid file name"
-msgstr "Dateiname unzulässig"
+msgstr "Ungültiger Dateiname"
msgctxt "IDS_MAINFRM_86"
msgid "Cannot connect the filters"
@@ -2433,27 +2429,27 @@ msgstr "Kann Filter nicht verbinden"
msgctxt "IDS_MAINFRM_87"
msgid "Cannot load any source filter"
-msgstr "Kann Quellen-Filter nicht laden"
+msgstr "Kann keine Quellen-Filter laden"
msgctxt "IDS_MAINFRM_88"
msgid "Cannot render the file"
-msgstr "Kann Datei nicht rendern"
+msgstr "Kann Datei nicht verarbeiten"
msgctxt "IDS_MAINFRM_89"
msgid "Invalid file format"
-msgstr "Dateiformat unzulässig"
+msgstr "Ungültiges Dateiformat"
msgctxt "IDS_MAINFRM_90"
msgid "File not found"
-msgstr "Datei nicht gefunden"
+msgstr "Kann Datei nicht finden"
msgctxt "IDS_MAINFRM_91"
msgid "Unknown file type"
-msgstr "Dateityp unbekannt"
+msgstr "Ungültiger Dateityp"
msgctxt "IDS_MAINFRM_92"
msgid "Unsupported stream"
-msgstr "Stream wird nicht unterstützt"
+msgstr "Ungültiger Stream"
msgctxt "IDS_MAINFRM_93"
msgid "Cannot find DVD directory"
@@ -2465,7 +2461,7 @@ msgstr "Kann DVD-Navigator-Filter nicht erstellen"
msgctxt "IDS_AG_FAILED"
msgid "Failed"
-msgstr "Fehlgeschlagen"
+msgstr "Fehler"
msgctxt "IDS_MAINFRM_96"
msgid "Can't create video capture filter"
@@ -2473,7 +2469,7 @@ msgstr "Kann Videoaufnahme-Filter nicht erstellen"
msgctxt "IDS_MAINFRM_98"
msgid "No capture filters"
-msgstr "Kein Aufnahme-Filter verfügbar"
+msgstr "Kann keine Aufnahme-Filter laden"
msgctxt "IDS_MAINFRM_99"
msgid "Can't create capture graph builder object"
@@ -2481,7 +2477,7 @@ msgstr "Kann Aufnahmegraph-Builder-Objekt nicht erstellen"
msgctxt "IDS_MAINFRM_108"
msgid "Couldn't open any device"
-msgstr "Kann kein Gerät öffnen"
+msgstr "Kann Gerät nicht öffnen"
msgctxt "IDS_AG_SOUND"
msgid "Sound"
@@ -2489,11 +2485,11 @@ msgstr "Audio"
msgctxt "IDS_MAINFRM_114"
msgid "%s was not found, please insert media containing this file."
-msgstr "%s nicht gefunden. Bitte zugehöriges Medium verfügbar machen."
+msgstr "Kann %s nicht finden"
msgctxt "IDS_AG_ABORTED"
msgid "Aborted"
-msgstr "Abgebrochen"
+msgstr "Abbruch"
msgctxt "IDS_MAINFRM_116"
msgid "&Properties..."
@@ -2505,11 +2501,11 @@ msgstr " (Pin-)Eigenschaften..."
msgctxt "IDS_AG_UNKNOWN_STREAM"
msgid "Unknown Stream"
-msgstr "Stream unbekannt"
+msgstr "Unbekannter Stream"
msgctxt "IDS_AG_UNKNOWN"
msgid "Unknown %u"
-msgstr "%u unbekannt"
+msgstr "Unbekannt %u"
msgctxt "IDS_AG_VSYNC"
msgid "VSync"
@@ -2549,7 +2545,7 @@ msgstr "Direct3D-Vollbildmodus"
msgctxt "IDS_MAINFRM_137"
msgid "Unknown format"
-msgstr "Format unbekannt"
+msgstr "Unbekanntes Format"
msgctxt "IDS_MAINFRM_138"
msgid "Sub shift: %ld ms"
@@ -2572,12 +2568,12 @@ msgid "Volume boost Max"
msgstr "Tonverstärkung: +300 % (max)"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Aufruf: mpc-hc.exe \"Pfadname\" [Optionen]\n\n\"Pfadname\"\tGibt Mediendatei oder Verzeichnis an\n\t\t(Wildcards sind möglich, Standardeingabe kann\n\t\tals \"-\" angegeben werden).\n/dub \"Datei\"\tÖffnet zusätzliche Audiodatei.\n/dubdelay \"Datei\"\tÖffnet zusätzliche Audiodatei, deren Wiedergabe\n\t\tum X ms versetzt wird (Dateiname muss\n\t\t\"DELAY Xms\" enthalten).\n/d3dfs\t\tStartet Player im Direct3D-Vollbildmodus.\n/sub \"Datei\"\tÖffnet zusätzliche Untertiteldatei.\n/filter \"F\"\t\tLädt DirectShow-Filter \"F\" aus Laufzeitbibliothek\n\t\t(Wildcards sind möglich).\n/dvd\t\tStartet Player im DVD-Modus (DVD-Verzeichnis\n\t\tkann als \"Pfadname\" angegeben werden).\n/dvdpos T#C\tStartet DVD-Wiedergabe bei Titel T, Kapitel C.\n/dvdpos T#P\tStartet DVD-Wiedergabe bei Titel T, Position P\n\t\t(hh:mm:ss).\n/cd\t\tÖffnet Audio-CD oder (S)VCD (Laufwerk kann\n\t\tals \"Pfadname\" angegeben werden).\n/device\t\tÖffnet Gerät.\n/open\t\tÖffnet Mediendatei und pausiert Wiedergabe.\n/play\t\tÖffnet Mediendatei und startet Wiedergabe.\n/close\t\tBeendet Player (nach Wiedergabe) (in\n\t\tKombination mit \"/play\").\n/shutdown\tFährt Computer herunter (nach Wiedergabe).\n/standby\t\tSpart Energie (nach Wiedergabe).\n/hibernate\tWechselt in Ruhezustand (nach Wiedergabe).\n/logoff\t\tMeldet Benutzer ab (nach Wiedergabe).\n/lock\t\tSperrt Computer (nach Wiedergabe).\n/monitoroff\tSchaltet Bildschirm aus (nach Wiedergabe).\n/playnext\t\tÖffnet nächste Ordnerdatei (nach Wiedergabe).\n/fullscreen\tStartet Player im Vollbild.\n/minimized\tStartet Player minimiert.\n/new\t\tÖffnet Mediendatei mit neuem Player.\n/add\t\tFügt \"Pfadname\" zur Wiedergabeliste hinzu\n\t\t(in Kombination mit \"/open\" oder \"/play\").\n/randomize\tSortiert Wiedergabeliste nach Zufall.\n/regvid\t\tRegistriert alle Videoformate.\n/regaud\t\tRegistriert alle Audioformate.\n/regpl\t\tRegistriert alle Wiedergabelisten.\n/regall\t\tRegistriert alle Medienformate.\n/unregall\t\tDeregistriert alle Medienformate.\n/start X\t\tStartet Wiedergabe bei X ms.\n/startpos P\tStartet Wiedergabe bei Position P (hh:mm:ss).\n/fixedsize W,H\tFixiert Fenstergröße bei Breite W und Höhe H.\n/monitor N\tStartet Player auf Monitor N (wobei N > 0).\n/audiorenderer N\tLädt Audio-Renderer N (wobei N > 0, siehe\n\t\tAusgabe-Optionen).\n/shaderpreset \"P\"\tLädt Shader-Profil \"P\".\n/pns \"P\"\t\tLädt Pan&Scan-Profil \"P\".\n/iconsassoc\tOrdnet Format-Icons neu zu.\n/nofocus\t\tStartet Player im Hintergrund.\n/webport N\tVerwendet Web-Interface mit Portnummer N.\n/debug\t\tZeigt Debug-Information im OSD an.\n/nocrashreporter\tDeaktiviert Fehlerberichterstattung.\n/slave \"T\"\t\tÖffnet Mediendatei mit gestartetem Player,\n\t\tversehen mit Fenstertitel \"T\".\n/reset\t\tSetzt alle Programm-Einstellungen zurück.\n/help /h /?\tZeigt diese Hilfe an.\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Aufruf: mpc-hc.exe \"Pfadname\" [Optionen]\n\n\"Pfadname\"\tGibt Mediendatei oder Verzeichnis an\n\t\t(Wildcards sind möglich, Standardeingabe kann\n\t\tals \"-\" angegeben werden).\n/dub \"Datei\"\tÖffnet zusätzliche Audiodatei.\n/dubdelay \"Datei\"\tÖffnet zusätzliche Audiodatei, deren Wiedergabe\n\t\tum X ms versetzt wird (Dateiname muss\n\t\t\"DELAY Xms\" enthalten).\n/d3dfs\t\tStartet Player im Direct3D-Vollbildmodus.\n/sub \"Datei\"\tÖffnet zusätzliche Untertiteldatei.\n/filter \"F\"\t\tLädt DirectShow-Filter \"F\" aus Laufzeitbibliothek\n\t\t(Wildcards sind möglich).\n/dvd\t\tStartet Player im DVD-Modus (DVD-Verzeichnis\n\t\tkann als \"Pfadname\" angegeben werden).\n/dvdpos T#C\tStartet DVD-Wiedergabe bei Titel T, Kapitel C.\n/dvdpos T#P\tStartet DVD-Wiedergabe bei Titel T, Position P\n\t\t(hh:mm:ss).\n/cd\t\tÖffnet Audio-CD oder (S)VCD (Laufwerk kann\n\t\tals \"Pfadname\" angegeben werden).\n/device\t\tÖffnet Gerät.\n/open\t\tÖffnet Mediendatei und pausiert Wiedergabe.\n/play\t\tÖffnet Mediendatei und startet Wiedergabe.\n/close\t\tBeendet Player (nach Wiedergabe) (in\n\t\tKombination mit \"/play\").\n/shutdown\tFährt Computer herunter (nach Wiedergabe).\n/standby\t\tSpart Energie (nach Wiedergabe).\n/hibernate\tWechselt in Ruhezustand (nach Wiedergabe).\n/logoff\t\tMeldet Benutzer ab (nach Wiedergabe).\n/lock\t\tSperrt Computer (nach Wiedergabe).\n/monitoroff\tSchaltet Bildschirm aus (nach Wiedergabe).\n/playnext\t\tÖffnet nächste Ordnerdatei (nach Wiedergabe).\n/fullscreen\tStartet Player im Vollbild.\n/minimized\tStartet Player minimiert.\n/new\t\tÖffnet Mediendatei mit neuem Player.\n/add\t\tFügt \"Pfadname\" zur Wiedergabeliste hinzu\n\t\t(in Kombination mit \"/open\" oder \"/play\").\n/randomize\tSortiert Wiedergabeliste nach Zufall.\n/regvid\t\tRegistriert alle Videoformate.\n/regaud\t\tRegistriert alle Audioformate.\n/regpl\t\tRegistriert alle Wiedergabelisten.\n/regall\t\tRegistriert alle Medienformate.\n/unregall\t\tDeregistriert alle Medienformate.\n/start X\t\tStartet Wiedergabe bei X ms.\n/startpos P\tStartet Wiedergabe bei Position P (hh:mm:ss).\n/fixedsize W,H\tFixiert Fenstergröße bei Breite W und Höhe H.\n/monitor N\tStartet Player auf Monitor N (wobei N > 0).\n/audiorenderer N\tLädt Audio-Renderer N (wobei N > 0, siehe\n\t\tAusgabe-Optionen).\n/shaderpreset \"P\"\tLädt Shader-Profil \"P\".\n/pns \"P\"\t\tLädt Pan&Scan-Profil \"P\".\n/iconsassoc\tOrdnet Format-Icons neu zu.\n/nofocus\t\tStartet Player im Hintergrund.\n/webport N\tStartet Web-Interface mit Portnummer N.\n/debug\t\tZeigt Debug-Information im OSD an.\n/nocrashreporter\tDeaktiviert Fehlerberichterstattung.\n/slave \"T\"\t\tÖffnet Mediendatei mit gestartetem Player,\n\t\tversehen mit Fenstertitel \"T\".\n/hwgpu \"I\"\tVerwendet GPU-Index \"I\" für Hardware-Decoding,\n\t\tnur für CUVID und DXVA2 (copy-back) verfügbar\n/reset\t\tSetzt alle Programm-Einstellungen zurück.\n/help /h /?\tZeigt diese Hilfe an.\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
-msgstr "Unbekannte Option in der Befehlszeile:\n\n"
+msgstr "Unbekannte Option in der Befehlszeile:\n"
msgctxt "IDS_AG_TOGGLE_INFO"
msgid "Toggle Information"
@@ -2665,7 +2661,7 @@ msgstr "Frequenzbereich scannen"
msgctxt "IDS_SUBTITLES_ERROR"
msgid "Subtitles are not loaded or unsupported renderer."
-msgstr "Untertitel nicht geladen oder werden vom Renderer nicht unterstützt."
+msgstr "Kann Untertitel nicht laden oder mit Renderer darstellen"
msgctxt "IDS_LOGO_AUTHOR"
msgid "Author unknown. Contact us if you made this logo!"
@@ -2673,15 +2669,15 @@ msgstr "Autor unbekannt. Als Verfasser bitte melden!"
msgctxt "IDS_NO_MORE_MEDIA"
msgid "No more media in the current folder."
-msgstr "Keine weitere Ordnerdatei verfügbar."
+msgstr "Keine weitere Ordnerdatei verfügbar"
msgctxt "IDS_FIRST_IN_FOLDER"
msgid "The first file of the folder is already loaded."
-msgstr "Erste Ordnerdatei bereits geöffnet."
+msgstr "Erste Ordnerdatei bereits erreicht"
msgctxt "IDS_LAST_IN_FOLDER"
msgid "The last file of the folder is already loaded."
-msgstr "Letzte Ordnerdatei bereits geöffnet."
+msgstr "Letzte Ordnerdatei bereits erreicht"
msgctxt "IDS_FRONT_LEFT"
msgid "Front Left"
@@ -3047,18 +3043,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Seitenverhältnis"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "WASAPI verwenden (Wiedergabe neu starten)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Stummschaltung bei schnellem Vorlauf"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Soundgerät:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: Ein"
@@ -3205,19 +3189,19 @@ msgstr "Alternativer VSync: Aus"
msgctxt "IDS_OSD_RS_RESET_DEFAULT"
msgid "Renderer settings reset to default"
-msgstr "Standard-Einstellungen für Video-Renderer geladen."
+msgstr "Standard-Einstellungen für Video-Renderer geladen"
msgctxt "IDS_OSD_RS_RESET_OPTIMAL"
msgid "Renderer settings reset to optimal"
-msgstr "Optimierte Einstellungen für Video-Renderer geladen."
+msgstr "Optimierte Einstellungen für Video-Renderer geladen"
msgctxt "IDS_OSD_RS_D3D_FS_GUI_SUPP_ON"
msgid "D3D Fullscreen GUI Support: On"
-msgstr "GUI-Unterstützung bei Direct3D-Vollbildmodus: Ein"
+msgstr "GUI-Unterstützung für Direct3D-Vollbildmodus: Ein"
msgctxt "IDS_OSD_RS_D3D_FS_GUI_SUPP_OFF"
msgid "D3D Fullscreen GUI Support: Off"
-msgstr "GUI-Unterstützung bei Direct3D-Vollbildmodus: Aus"
+msgstr "GUI-Unterstützung für Direct3D-Vollbildmodus: Aus"
msgctxt "IDS_OSD_RS_10BIT_RBG_OUT_ON"
msgid "10-bit RGB Output: On"
@@ -3253,39 +3237,39 @@ msgstr "Gleitkommaverarbeitung mit halber Genauigkeit: Aus"
msgctxt "IDS_BRIGHTNESS_DEC"
msgid "Brightness decrease"
-msgstr "Helligkeit verringern"
+msgstr "Farbsteuerung: Helligkeit verringern"
msgctxt "IDS_CONTRAST_INC"
msgid "Contrast increase"
-msgstr "Kontrast erhöhen"
+msgstr "Farbsteuerung: Kontrast erhöhen"
msgctxt "IDS_CONTRAST_DEC"
msgid "Contrast decrease"
-msgstr "Kontrast verringern"
+msgstr "Farbsteuerung: Kontrast verringern"
msgctxt "IDS_HUE_INC"
msgid "Hue increase"
-msgstr "Farbton erhöhen"
+msgstr "Farbsteuerung: Farbton erhöhen"
msgctxt "IDS_HUE_DEC"
msgid "Hue decrease"
-msgstr "Farbton verringern"
+msgstr "Farbsteuerung: Farbton verringern"
msgctxt "IDS_SATURATION_INC"
msgid "Saturation increase"
-msgstr "Sättigung erhöhen"
+msgstr "Farbsteuerung: Sättigung erhöhen"
msgctxt "IDS_SATURATION_DEC"
msgid "Saturation decrease"
-msgstr "Sättigung verringern"
+msgstr "Farbsteuerung: Sättigung verringern"
msgctxt "IDS_RESET_COLOR"
msgid "Reset color settings"
-msgstr "Farbeinstellungen zurücksetzen"
+msgstr "Farbsteuerung: Zurücksetzen"
msgctxt "IDS_USING_LATEST_STABLE"
msgid "\nYou are already using the latest stable version."
-msgstr "\nAktuelle stabile Version wird bereits verwendet."
+msgstr "\nKeine neuere stabile Version verfügbar."
msgctxt "IDS_USING_NEWER_VERSION"
msgid "Your current version is v%s.\n\nThe latest stable version is v%s."
@@ -3293,11 +3277,11 @@ msgstr "Vorliegende Version:\t%s\n\nAktuelle stabile Version:\t%s"
msgctxt "IDS_NEW_UPDATE_AVAILABLE"
msgid "MPC-HC v%s is now available. You are using v%s.\n\nDo you want to visit MPC-HC's website to download it?"
-msgstr "MPC-HC %s ist verfügbar. Zurzeit wird noch Version %s verwendet.\n\nAktuelle Version jetzt herunterladen?"
+msgstr "Der MPC-HC %s ist verfügbar. Zurzeit wird noch Version %s verwendet.\n\nAktuelle Version jetzt herunterladen?"
msgctxt "IDS_UPDATE_ERROR"
msgid "Update server not found.\n\nPlease check your internet connection or try again later."
-msgstr "Update-Server nicht erreichbar. Bitte die Internetverbindung prüfen oder später erneut versuchen."
+msgstr "Update-Server ist nicht erreichbar. Bitte die Internetverbindung prüfen oder später erneut versuchen."
msgctxt "IDS_UPDATE_CLOSE"
msgid "&Close"
@@ -3309,7 +3293,7 @@ msgstr "Zoom: %.0lf %%"
msgctxt "IDS_OSD_ZOOM_AUTO"
msgid "Zoom: Auto"
-msgstr "Zoom: Auto-Anpassung"
+msgstr "Zoom: Eingepasst"
msgctxt "IDS_CUSTOM_CHANNEL_MAPPING"
msgid "Toggle custom channel mapping"
@@ -3373,63 +3357,63 @@ msgstr "MB/s"
msgctxt "IDS_BDA_ERROR_CREATE_TUNER"
msgid "Could not create the tuner."
-msgstr "Tuner konnte nicht erstellt werden."
+msgstr "Kann Tuner nicht erstellen"
msgctxt "IDS_BDA_ERROR_CREATE_RECEIVER"
msgid "Could not create the receiver."
-msgstr "Receiver konnte nicht erstellt werden."
+msgstr "Kann Receiver nicht erstellen"
msgctxt "IDS_BDA_ERROR_CONNECT_NW_TUNER"
msgid "Could not connect the network and the tuner."
-msgstr "Netzwerk und Tuner konnten nicht verbunden werden."
+msgstr "Kann Netzwerk und Tuner nicht verbinden"
msgctxt "IDS_BDA_ERROR_CONNECT_TUNER_REC"
msgid "Could not connect the tuner and the receiver."
-msgstr "Tuner und Receiver konnten nicht verbunden werden."
+msgstr "Kann Tuner und Receiver nicht verbinden"
msgctxt "IDS_BDA_ERROR_CONNECT_TUNER"
msgid "Could not connect the tuner."
-msgstr "Tuner konnte nicht verbunden werden."
+msgstr "Kann Tuner nicht verbinden"
msgctxt "IDS_BDA_ERROR_DEMULTIPLEXER"
msgid "Could not create the demultiplexer."
-msgstr "Demultiplexer konnte nicht erstellt werden."
+msgstr "Kann Demultiplexer nicht erstellen"
msgctxt "IDS_GOTO_ERROR_PARSING_TIME"
msgid "Error parsing the entered time!"
-msgstr "Parser-Fehler bei angegebener Zeit."
+msgstr "Der angegebene Zeitpunkt ist ungültig."
msgctxt "IDS_GOTO_ERROR_PARSING_TEXT"
msgid "Error parsing the entered text!"
-msgstr "Parser-Fehler bei angegebenem Text."
+msgstr "Das angegebene Videobild ist ungültig."
msgctxt "IDS_GOTO_ERROR_PARSING_FPS"
msgid "Error parsing the entered frame rate!"
-msgstr "Parser-Fehler bei angegebener Bildrate."
+msgstr "Die angegebene Bildrate ist ungültig."
msgctxt "IDS_FRAME_STEP_ERROR_RENDERER"
msgid "Cannot frame-step, try a different video renderer."
-msgstr "Einzelbildschaltung nicht möglich. Bitte einen anderen Video-Renderer verwenden."
+msgstr "Einzelbildschaltung ist nicht möglich. Bitte einen geeigneten Video-Renderer wählen und die Mediendatei erneut öffnen."
msgctxt "IDS_SCREENSHOT_ERROR_REAL"
msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the default video renderer for RealMedia.\nSelect one of the DirectX renderers for RealMedia in MPC-HC's output options and reopen the file."
-msgstr "Die Funktionen \"Bild speichern\" und \"Miniaturansichten speichern\" können mit dem Standard-Renderer von RealMedia nicht verwendet werden. Bitte einen VMR-Renderer für RealMedia-Video in den Ausgabe-Optionen wählen und die Mediendatei erneut öffnen."
+msgstr "Die Funktionen \"Bild speichern\" und \"Miniaturansichten speichern\" können mit dem Standard-Renderer von RealMedia nicht verwendet werden. Für RealMedia-Video bitte einen VMR-Renderer wählen und die Mediendatei erneut öffnen."
msgctxt "IDS_SCREENSHOT_ERROR_QT"
msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the default video renderer for QuickTime.\nSelect one of the DirectX renderers for QuickTime in MPC-HC's output options and reopen the file."
-msgstr "Die Funktionen \"Bild speichern\" und \"Miniaturansichten speichern\" können mit dem Standard-Renderer von QuickTime nicht verwendet werden. Bitte einen VMR-Renderer für QuickTime-Video in den Ausgabe-Optionen wählen und die Mediendatei erneut öffnen."
+msgstr "Die Funktionen \"Bild speichern\" und \"Miniaturansichten speichern\" können mit dem Standard-Renderer von QuickTime nicht verwendet werden. Für QuickTime-Video bitte einen VMR-Renderer wählen und die Mediendatei erneut öffnen."
msgctxt "IDS_SCREENSHOT_ERROR_SHOCKWAVE"
msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work for Shockwave files."
-msgstr "Die Funktionen \"Bild speichern\" und \"Miniaturansichten speichern\" können mit Shockwave-Dateien nicht verwendet werden."
+msgstr "Die Funktionen \"Bild speichern\" und \"Miniaturansichten speichern\" können mit Shockwave-Dateien generell nicht verwendet werden."
msgctxt "IDS_SCREENSHOT_ERROR_OVERLAY"
msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the Overlay Mixer video renderer.\nChange the video renderer in MPC's output options and reopen the file."
-msgstr "Die Funktionen \"Bild speichern\" und \"Miniaturansichten speichern\" können mit dem Overlay-Mixer nicht verwendet werden. Bitte einen geeigneten Video-Renderer in den Ausgabe-Optionen wählen und die Mediendatei erneut öffnen."
+msgstr "Die Funktionen \"Bild speichern\" und \"Miniaturansichten speichern\" können mit dem Overlay-Mixer nicht verwendet werden. Bitte einen geeigneten Video-Renderer wählen und die Mediendatei erneut öffnen."
msgctxt "IDS_SUBDL_DLG_CONNECT_ERROR"
msgid "Cannot connect to the online subtitles database."
-msgstr "Kann Verbindung zur Untertiteldatenbank nicht herstellen"
+msgstr "Kann Untertiteldatenbank nicht finden"
msgctxt "IDS_MB_SHOW_EDL_EDITOR"
msgid "Do you want to activate the EDL editor?"
@@ -3437,67 +3421,67 @@ msgstr "EDL-Editor aktivieren?"
msgctxt "IDS_CAPTURE_ERROR"
msgid "Capture Error"
-msgstr "Aufnahmefehler!"
+msgstr "Ein Aufnahmefehler ist aufgetreten."
msgctxt "IDS_CAPTURE_ERROR_VIDEO"
msgid "video"
-msgstr "Videofehler!"
+msgstr "Ein Videofehler ist aufgetreten."
msgctxt "IDS_CAPTURE_ERROR_AUDIO"
msgid "audio"
-msgstr "Audiofehler!"
+msgstr "Ein Audiofehler ist aufgetreten."
msgctxt "IDS_CAPTURE_ERROR_ADD_BUFFER"
msgid "Can't add the %s buffer filter to the graph."
-msgstr "Puffer-Filter %s konnte zum Filtergraphen nicht hinzugefügt werden."
+msgstr "Kann Puffer-Filter %s zum Filtergraphen nicht hinzufügen"
msgctxt "IDS_CAPTURE_ERROR_CONNECT_BUFF"
msgid "Can't connect the %s buffer filter to the graph."
-msgstr "Puffer-Filter %s konnte mit Filtergraphen nicht verbunden werden."
+msgstr "Kann Puffer-Filter %s mit Filtergraphen nicht verbinden"
msgctxt "IDS_CAPTURE_ERROR_ADD_ENCODER"
msgid "Can't add the %s encoder filter to the graph."
-msgstr "Encoder-Filter %s konnte zum Filtergraphen nicht hinzugefügt werden."
+msgstr "Kann Encoder-Filter %s zum Filtergraphen nicht hinzufügen"
msgctxt "IDS_CAPTURE_ERROR_CONNECT_ENC"
msgid "Can't connect the %s encoder filter to the graph."
-msgstr "Encoder-Filter %s konnte mit Filtergraphen nicht verbunden werden."
+msgstr "Kann Encoder-Filter %s mit Filtergraphen nicht verbinden"
msgctxt "IDS_CAPTURE_ERROR_COMPRESSION"
msgid "Can't set the compression format on the %s encoder filter."
-msgstr "Kompressionsformat konnte auf Encoder-Filter %s nicht angewandt werden."
+msgstr "Kann Kompressionsformat mit Encoder-Filter %s nicht einrichten"
msgctxt "IDS_CAPTURE_ERROR_MULTIPLEXER"
msgid "Can't connect the %s stream to the multiplexer filter."
-msgstr "Stream %s konnte mit Multiplexer-Filter nicht verbunden werden."
+msgstr "Kann Stream %s mit Multiplexer-Filter nicht verbinden"
msgctxt "IDS_CAPTURE_ERROR_VID_CAPT_PIN"
msgid "No video capture pin was found."
-msgstr "Keinen Videoaufnahme-Pin gefunden."
+msgstr "Kann keine Videoaufnahme-Pins rendern"
msgctxt "IDS_CAPTURE_ERROR_AUD_CAPT_PIN"
msgid "No audio capture pin was found."
-msgstr "Keinen Audioaufnahme-Pin gefunden."
+msgstr "Kann keine Audioaufnahme-Pins rendern"
msgctxt "IDS_CAPTURE_ERROR_OUT_FILE"
msgid "Error initializing the output file."
-msgstr "Initialisierung der Ausgabedatei fehlgeschlagen."
+msgstr "Ausgabedatei konnte nicht initialisiert werden."
msgctxt "IDS_CAPTURE_ERROR_AUD_OUT_FILE"
msgid "Error initializing the audio output file."
-msgstr "Initialisierung der Audio-Ausgabedatei fehlgeschlagen."
+msgstr "Audio-Ausgabedatei konnte nicht initialisiert werden."
msgctxt "IDS_SUBRESYNC_TIME_FORMAT"
msgid "The correct time format is [-]hh:mm:ss.ms (e.g. 01:23:45.678)."
-msgstr "Gültiges Zeitformat: [-]hh:mm:ss.ms (bspw. 01:23:45.678)"
+msgstr "Gültiges Zeitformat: [-]hh:mm:ss.ms"
msgctxt "IDS_EXTERNAL_FILTERS_ERROR_MT"
msgid "This type is already in the list!"
-msgstr "Typ in der Liste bereits vermerkt."
+msgstr "Der gewählte Typ wird bereits verwendet."
msgctxt "IDS_WEBSERVER_ERROR_TEST"
msgid "You need to apply the new settings before testing them."
-msgstr "Bitte bisher nicht gespeicherte Einstellungen zuvor übernehmen."
+msgstr "Bitte nicht gespeicherte Einstellungen zuvor übernehmen."
msgctxt "IDS_AFTERPLAYBACK_EXIT"
msgid "After Playback: Exit"
@@ -3553,15 +3537,15 @@ msgstr "Sättigung: %s"
msgctxt "IDS_OSD_RESET_COLOR"
msgid "Color settings restored"
-msgstr "Farbeinstellungen zurückgesetzt."
+msgstr "Standard-Einstellungen für Farbsteuerung geladen"
msgctxt "IDS_OSD_NO_COLORCONTROL"
msgid "Color control is not supported"
-msgstr "Farbeinstellungen werden nicht unterstützt."
+msgstr "Farbsteuerung nicht verfügbar"
msgctxt "IDS_BRIGHTNESS_INC"
msgid "Brightness increase"
-msgstr "Helligkeit erhöhen"
+msgstr "Farbsteuerung: Helligkeit erhöhen"
msgctxt "IDS_LANG_PREF_EXAMPLE"
msgid "Enter your preferred languages here.\nFor example, type: \"eng jap swe\""
@@ -3615,3 +3599,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Einstellungen"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.dialogs.pot b/src/mpc-hc/mpcresources/PO/mpc-hc.dialogs.pot
index 4202fab67..5536ce1fe 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.dialogs.pot
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.dialogs.pot
@@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -469,10 +469,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr ""
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr ""
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr ""
@@ -673,8 +669,8 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr ""
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
@@ -1166,7 +1162,7 @@ msgid "DXVA"
msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
+msgid "Subtitles"
msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
@@ -1182,7 +1178,7 @@ msgid "Rotation"
msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
+msgid "Subtitle Renderer"
msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
@@ -1201,6 +1197,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr ""
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr ""
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr ""
@@ -1649,6 +1649,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr ""
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr ""
@@ -1665,8 +1709,16 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr ""
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
+msgid "Optional information"
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
@@ -1681,7 +1733,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr ""
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
msgstr ""
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.el.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.el.dialogs.po
index 4aa2a4d25..11a6b8654 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.el.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.el.dialogs.po
@@ -2,15 +2,17 @@
# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
-# geogeo.gr <admin@geogeo.gr>, 2013-2015
+# geogeo.gr <geogeo.gr@gmail.com>, 2013-2015
# firespin <dartworldgr@hotmail.com>, 2014
+# geogeo.gr <geogeo.gr@gmail.com>, 2015
+# Lampros Zouloumis <onebrand@hotmail.gr>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-31 14:42+0000\n"
-"Last-Translator: geogeo.gr <admin@geogeo.gr>\n"
-"Language-Team: Greek (http://www.transifex.com/projects/p/mpc-hc/language/el/)\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-11-09 17:06+0000\n"
+"Last-Translator: geogeo.gr <geogeo.gr@gmail.com>\n"
+"Language-Team: Greek (http://www.transifex.com/mpc-hc/mpc-hc/language/el/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -267,7 +269,7 @@ msgstr "Μόνο το όνομα αÏχείου"
msgctxt "IDD_PPAGEPLAYER_IDC_RADIO5"
msgid "Don't prefix anything"
-msgstr "ΧωÏίς καμία επισÏναψη"
+msgstr "ΧωÏίς κάποιο Ï€Ïόθεμα"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK13"
msgid "Replace file name with title"
@@ -295,7 +297,7 @@ msgstr "ΠÏοσκόλληση στα άκÏα της οθόνης"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK8"
msgid "Store settings in .ini file"
-msgstr "ΚαταχώÏηση Ïυθμίσεων στο αÏχείο .ini"
+msgstr "Αποθήκευση Ïυθμίσεων στο αÏχείο .ini"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK10"
msgid "Disable \"Open Disc\" menu"
@@ -473,10 +475,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Αυτόματη φόÏτωση αÏχείων ήχου"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "ΧÏήση της ενσωματωμένης απόδοσης υποτίτλων"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Έλεγχος"
@@ -515,7 +513,7 @@ msgstr "%"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "Delay step"
-msgstr "ΚαθυστέÏηση βήματος"
+msgstr "Βήμα καθυστέÏησης"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "ms"
@@ -635,7 +633,7 @@ msgstr "ΑÏχείο(α)"
msgctxt "IDD_PPAGEFORMATS_IDC_STATIC1"
msgid "Autoplay"
-msgstr "Αυτόματη αναπαÏαγωγή (XP μόνο)"
+msgstr "Αυτόματη αναπαÏαγωγή"
msgctxt "IDD_PPAGEFORMATS_IDC_CHECK1"
msgid "Video"
@@ -677,9 +675,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "ΑποτÏοπή ελαχιστοποίησης στην Ï€Ïοβολή πλήÏους οθόνης σε μη Ï€Ïοεπιλεγμένη οθόνη"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "ΧÏήση χαÏακτηÏιστικών ΓÏαμμής εÏγασίας των Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "ΧÏήση βελτιωμένων δυνατοτήτων γÏαμμής εÏγασιών"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -879,7 +877,7 @@ msgstr "Μεγέθυνση: 0.2->3.0"
msgctxt "IDD_PPAGEACCELTBL_IDC_CHECK2"
msgid "Global Media Keys"
-msgstr "Διεθνή πλήκτÏα πολυμέσων"
+msgstr "Καθολικά πλήκτÏα πολυμέσων"
msgctxt "IDD_PPAGEACCELTBL_IDC_BUTTON1"
msgid "Select All"
@@ -935,7 +933,7 @@ msgstr "Αποθήκευση Ï€ÏοσαÏμοσμένου στυλ"
msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
-msgstr "JPEG ποιότητα:"
+msgstr "Ποιότητα JPEG:"
msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
msgid "Thumbnails:"
@@ -1170,8 +1168,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Υπότιτλοι *"
+msgid "Subtitles"
+msgstr "Υπότιτλοι"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1186,8 +1184,8 @@ msgid "Rotation"
msgstr "ΠεÏιστÏοφή"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* ΕξωτεÏικά φίλτÏα (όπως το VSFilter) μποÏοÏν να εμφανίσουν υπότιτλους σε όλα τα Ï€ÏογÏάμματα απόδοσης."
+msgid "Subtitle Renderer"
+msgstr "Απόδοση υποτίτλων"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1205,6 +1203,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "ΕπιτÏέπεται η Ï€Ïόσβαση μόνο από τοπικό υπολογιστή"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "ΕνεÏγοποίηση Ï€Ïοεπισκόπησης"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "ΕκτÏπωση πληÏοφοÏιών ÎµÎ½Ï„Î¿Ï€Î¹ÏƒÎ¼Î¿Ï ÏƒÏ†Î±Î»Î¼Î¬Ï„Ï‰Î½"
@@ -1551,7 +1553,7 @@ msgstr "Βασική διεÏθυνση URL της βάσης δεδομένων
msgctxt "IDD_PPAGESUBMISC_IDC_BUTTON2"
msgid "Test"
-msgstr "Έλεγχος"
+msgstr "Δοκιμή"
msgctxt "IDD_UPDATE_DIALOG_CAPTION"
msgid "Update Checker"
@@ -1653,9 +1655,53 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "ΠÏοεπιλογή"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Συσκευή"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Αποκλειστική λειτουÏγία"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "ΕπιτÏέπεται κωδικ/μένη μεταφοÏά δεδομένων"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Επιλογές"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "ΕνεÏγοποίηση μείξης στέÏεο (για ακουστικά)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Αποκοπή:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Στάθμη:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Σημείωση"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Για ελαχιστοποίηση της παÏαμόÏφωσης του ήχου, συνιστάται η διατήÏηση της έντασης αναπαÏαγωγής πεÏίπου στο 85%, όταν αναπαÏάγεται δυνατά πεÏιεχόμενο κωδικοποιημένο με απώλειες."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
-msgstr "JPEG ποιότητα:"
+msgstr "Ποιότητα JPEG:"
msgctxt "IDD_CMD_LINE_HELP_CAPTION"
msgid "Command line help"
@@ -1669,9 +1715,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "ΑναφοÏά κατάÏÏευσης"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "ΛυποÏμαστε. Φαίνεται ότι το MPC-HC μόλις κατέÏÏευσε. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Στείλτε μια αναφοÏά σφάλματος για να μας βοηθήσετε να διαγνώσουμε και να διοÏθώσουμε το Ï€Ïόβλημα."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "ΛυποÏμαστε, φαίνεται πως το MPC-HC μόλις κατέÏÏευσε. :(\n\nΓια να μας βοηθήσετε να διαγνώσουμε και να διοÏθώσουμε το Ï€Ïόβλημα, θα σταλεί μια αναφοÏά σφάλματος. ΜποÏείτε, εάν θέλετε, να παÏέχετε Ï€Ïόσθετες πληÏοφοÏίες."
+msgid "Optional information"
+msgstr "ΠÏοαιÏετικές πληÏοφοÏίες"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1685,7 +1739,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "ΠεÏιγÏαφή Ï€Ïοβλήματος (μόνο στα Αγγλικά):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "Εντάξει"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Επανεκκίνηση του MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Έξοδος του MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.el.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.el.menus.po
index 5180d066d..76a1e7cd2 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.el.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.el.menus.po
@@ -2,16 +2,16 @@
# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
-# geogeo.gr <admin@geogeo.gr>, 2014-2015
+# geogeo.gr <geogeo.gr@gmail.com>, 2014-2015
# firespin <dartworldgr@hotmail.com>, 2014
# kasper93, 2013
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
-"PO-Revision-Date: 2015-05-31 14:42+0000\n"
-"Last-Translator: geogeo.gr <admin@geogeo.gr>\n"
-"Language-Team: Greek (http://www.transifex.com/projects/p/mpc-hc/language/el/)\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-10-05 10:12+0000\n"
+"Last-Translator: geogeo.gr <geogeo.gr@gmail.com>\n"
+"Language-Team: Greek (http://www.transifex.com/mpc-hc/mpc-hc/language/el/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.el.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.el.strings.po
index b7a455655..c5f12740f 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.el.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.el.strings.po
@@ -2,15 +2,16 @@
# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
-# geogeo.gr <admin@geogeo.gr>, 2013-2015
-# firespin <dartworldgr@hotmail.com>, 2014
+# geogeo.gr <geogeo.gr@gmail.com>, 2013-2015
+# firespin <dartworldgr@hotmail.com>, 2014-2015
+# geogeo.gr <geogeo.gr@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-31 05:30+0000\n"
-"Last-Translator: geogeo.gr <admin@geogeo.gr>\n"
-"Language-Team: Greek (http://www.transifex.com/projects/p/mpc-hc/language/el/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Greek (http://www.transifex.com/mpc-hc/mpc-hc/language/el/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -326,12 +327,12 @@ msgid "On/Off"
msgstr "Îαι/Όχι"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Από FPS"
+msgid "From (FPS)"
+msgstr "Από (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "έως FPS"
+msgid "To (FPS)"
+msgstr "έως (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -465,6 +466,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "ΑναπαÏαγωγή::Σκιάσεις"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "ΠόÏοι"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "ΔιάφοÏα"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "ΠληÏοφοÏίες"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "ΑναπαÏαγωγή::ΚαταγÏαφή"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "ΑναπαÏαγωγή::Ρυθμίσεις συγχÏ. απόδοσης"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "ΑναπαÏαγωγή::Μεγιστοποιημένη Ï€Ïοβολή"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "ΕσωτεÏικά φίλτÏα::Απόδοση Ήχου"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Επιλογέας ήχου"
@@ -557,30 +586,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Υπότιτλοι::Βάση δεδομένων"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "ΠόÏοι"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "ΔιάφοÏα"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "ΠληÏοφοÏίες"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "ΑναπαÏαγωγή::ΚαταγÏαφή"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "ΑναπαÏαγωγή::Ρυθμίσεις συγχÏ. απόδοσης"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "ΑναπαÏαγωγή::Μεγιστοποιημένη Ï€Ïοβολή"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "ΛεπτομέÏειες"
@@ -673,22 +678,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Η επιφάνεια του βίντεο θα διατεθεί ως μια κανονική εκτός οθόνης επιφάνεια."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "Η απόδοση ήχου MPC είναι κατεστÏαμμένη. Μη την χÏησιμοποιείτε."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Απόδοση συγχÏονισμοÏ"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - ΑναφοÏά σφάλματος"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "Το MPC-HC μόλις κατέÏÏευσε αλλά αυτή η έκδοση καταÏτίστηκε χωÏίς πληÏοφοÏίες αποσφαλμάτωσης.\nΕάν θέλετε να αναφέÏετε αυτό το σφάλμα, θα Ï€Ïέπει Ï€Ïώτα να Ï€Ïοσπαθήσετε με μια επίσημη έκδοση.\n\nΘέλετε να επισκεφθείτε τη σελίδα λήψης Ï„ÏŽÏα;"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Κανονική απλή επίπεδη επιφάνεια"
@@ -741,9 +734,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Ψευδής (ασυμπίεστο)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "Απόδοση ήχου του MPC-HC"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "ΕσωτεÏική Απόδοση Ήχου"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1393,6 +1386,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Μετά την αναπαÏαγωγή: Κλείσιμο"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "Το MPC-HC αντιμετώπισε ένα Ï€Ïόβλημα κατά τη διάÏκεια της Ï€Ïοετοιμασίας. Με τη βοήθειά σας, μποÏεί να είμαστε σε θέση να διοÏθώσουμε το ζήτημα.\n\nΘέλετε να αναφέÏετε αυτό το ζήτημα;"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Εισάγετε μια θετική τιμή εάν ο ήχος είναι Ï€ÏόωÏος ή μια αÏνητική τιμή εάν καθυστεÏεί."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Η Ï€Ïοεπισκόπηση είναι Ï€ÏοσωÏινά απενεÏγοποιημένη. ΜποÏείτε να την ενεÏγοποιήσετε από τις επιλογές του MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Αυτή η επιλογή μποÏεί να χÏησιμοποιηθεί για την Ï€Ïοεπισκόπηση αÏχείων πολυμέσων από απομακÏυσμένη τοποθεσία. ΧÏησιμοποιήστε την μόνο σε καλά ασφαλισμένο ιδιωτικό δίκτυο.\n\nΘέλετε σίγουÏα να ενεÏγοποιήσετε αυτή την επιλογή;"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "ΕσωτεÏική απόδοση υποτίτλων"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Άνοιγμα συσκευής"
@@ -1677,6 +1690,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Εμφάνιση ονόματος αÏχείου"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "ΑναπαÏαγωγή DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "ΑναπαÏαγωγή BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: ΠÏοβολή Στατιστικών Απόδοσης"
@@ -1958,20 +1979,20 @@ msgid "Options"
msgstr "Επιλογές"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
+msgid "Next Audio Track"
msgstr "Επόμενο κομμάτι ήχου"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
+msgid "Prev Audio Track"
msgstr "ΠÏοηγοÏμενο κομμάτι ήχου"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Επόμενος υπότιτλος"
+msgid "Next Subtitle Track"
+msgstr "Επόμενο κομμάτι υπότιτλου"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "ΠÏοηγοÏμενος υπότιτλος"
+msgid "Prev Subtitle Track"
+msgstr "ΠÏοηγοÏμενο κομμάτι υπότιτλου"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1981,22 +2002,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "ΕπαναφόÏτωση υποτίτλων"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Επόμενο κομμάτι ήχου (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "ΠÏοηγοÏμενο κομμάτι ήχου (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Επόμενος υπότιτλος (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "ΠÏοηγοÏμενος υπότιτλος (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Επόμενη γωνία (DVD)"
@@ -2006,20 +2011,20 @@ msgid "Prev Angle (DVD)"
msgstr "ΠÏοηγοÏμενη γωνία (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
+msgid "Next Audio Track (DVD)"
msgstr "Επόμενο κομμάτι ήχου (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
+msgid "Prev Audio Track (DVD)"
msgstr "ΠÏοηγοÏμενο κομμάτι ήχου (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Επόμενος υπότιτλος (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Επόμενο κομμάτι υπότιτλου (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "ΠÏοηγοÏμενος υπότιτλος (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "ΠÏοηγοÏμενο κομμάτι υπότιτλου (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2385,14 +2390,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "ΤÏέχουσα"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "Το MPC-HC τεÏματίστηκε απÏοσδόκητα. Για να βοηθήσετε να διοÏθωθεί αυτό το Ï€Ïόβλημα, παÏακαλοÏμε να στείλετε το αÏχείο \"%s\" στην κονσόλα παÏακολοÏθησης σφαλμάτων μας.\n\nΘέλετε να ανοίξετε το φάκελο που πεÏιέχει το αÏχείο ένδειξης σφαλμάτων και να επισκεφθείτε την κονσόλα παÏακολοÏθησης σφαλμάτων Ï„ÏŽÏα;"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Απέτυχε η δημιουÏγία αÏχείου ένδειξης σφαλμάτων σε \"%s\" (σφάλμα %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Επιλέξτε κατάλογο"
@@ -2566,8 +2563,8 @@ msgid "Volume boost Max"
msgstr "Μέγιστη ώθηση έντασης"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "ΧÏήση: mpc-hc.exe \"κατάλογος\" [παÏάμετÏοι]\n\n\"κατάλογος\"\tΤο κÏÏιο αÏχείο ή ο κατάλογος που θα φοÏτωθεί\n\t\t(επιτÏέπονται τα Î¼Ï€Î±Î»Î±Î½Ï„Î­Ï \"-\" υποδηλώνει τυπική είσοδο)\n/dub \"αÏχείο ήχου\"\tΦόÏτωση ενός Ï€Ïόσθετου αÏχείου ήχου\n/dubdelay \"αÏχείο\"\tΦόÏτωση ενός Ï€Ïόσθετου αÏχείου ήχου μετατοπισμένο με XXms\n\t\t(εάν το αÏχείο πεÏιέχει \"...DELAY XXms...\")\n/d3dfs\t\tΕκκίνηση απόδοσης σε λειτουÏγία D3D πλήÏους οθόνης\n/sub \"όνομα υπότιτλων\"\tΦόÏτωση ενός Ï€Ïόσθετου αÏχείου υποτίτλων\n/filter \"όνομα φίλτÏου\"\tΦόÏτωση φίλτÏων DirectShow από ένα dll\n\t\t(επιτÏέπονται τα μπαλαντέÏ)\n/dvd\t\tΕκτέλεση σε λειτουÏγία DVD. Ως \"κατάλογος\" εννοείται\n\t\tο φάκελος του DVD (Ï€ÏοαιÏετικά)\n/dvdpos T#C\tΈναÏξη αναπαÏαγωγής στον τίτλο T, κεφάλαιο C\n/dvdpos T#hh:mm\tΈναÏξη αναπαÏαγωγής στον τίτλο T, θέση hh:mm:ss\n/cd\t\tΦόÏτωση όλων των κομματιών από ένα CD ή (S)VCD.\n\t\tΩς \"κατάλογος\" εννοείται της συσκευής οδήγησης (Ï€ÏοαιÏετικά)\n/device\t\tΆνοιγμα της Ï€Ïοεπιλεγμένης συσκευής βίντεο\n/open\t\tΆνοιγμα του αÏχείου χωÏίς αυτόματη έναÏξη αναπαÏαγωγής\n/play\t\tΈναÏξη αναπαÏαγωγής του αÏχείου με την εκκίνηση του\n\t\tÏ€ÏογÏάμματος αναπαÏαγωγής\n/close\t\tΚλείσιμο του Ï€ÏογÏάμματος μετά την αναπαÏαγωγή\n\t\t(δουλεÏει μόνο όταν χÏησιμοποιείται με το /play)\n/shutdown\tΤεÏματισμός του συστήματος μετά την αναπαÏαγωγή\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tΈκκίνηση σε λειτουÏγία πλήÏους οθόνης\n/minimized\tΈκκίνηση σε ελαχιστοποιημένη λειτουÏγία\n/new\t\tΕκκινεί μια νέα παÏουσία του MPC-HC\n/add\t\tΠÏοσθήκη του \"κατάλογος\" στη λίστα αναπαÏαγωγής.\n\t\tΜποÏεί να συνδυαστεί με /open και /play\n/randomize\tRandomize the playlist\n/regvid\t\tΔημιουÏγεί συσχετίσεις για αÏχεία βίντεο\n/regaud\t\tΔημιουÏγεί συσχετίσεις για αÏχεία ήχου\n/regpl\t\tΔημιουÏγεί συσχετίσεις για αÏχεία λίστας αναπαÏαγωγής\n/regall\t\tΔημιουÏγεί συσχετίσεις αÏχείων\n\t\tγια όλους τους υποστηÏιζόμενους Ï„Ïπους αÏχείων\n/unregall\t\tΚαταÏγεί όλες τις συσχετίσεις αÏχείων\n/start ms\t\tΈναÏξη αναπαÏαγωγής στα \"ms\" (= χιλιοστά δευτεÏολέπτου)\n/startpos hh:mm:ss\tΈναÏξη αναπαÏαγωγής στη θέση hh:mm:ss\n/fixedsize w,h\tΟÏίζει το μέγεθος ενός σταθεÏÎ¿Ï Ï€Î±ÏαθÏÏου\n/monitor N\tΕκκίνηση του MPC-HC στην οθόνη N (όπου το N ξεκινά από 1)\n/audiorenderer N\tΈναÏξη απόδοσης ήχου με χÏήση του N (όπου το N ξεκινά από 1)\n\t\t(βλέπε Ïυθμίσεις \"Έξοδος\")\n/shaderpreset \"Pr\"\tΈναÏξη με χÏήση της Ï€ÏοÏÏθμισης σκίασης \"Pr\"\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tΕπαναφοÏά Ï€Ïοεπιλεγμένων Ïυθμίσεων\n/help /h /?\tΕμφάνιση βοήθειας σχετικά με τις παÏαμέτÏους της γÏαμμής εντολών\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "ΧÏήση: mpc-hc.exe \"κατάλογος\" [παÏάμετÏοι]\n\n\"κατάλογος\"\tΤο κÏÏιο αÏχείο ή ο κατάλογος που θα φοÏτωθεί\n\t\t(επιτÏέπονται τα Î¼Ï€Î±Î»Î±Î½Ï„Î­Ï \"-\" υποδηλώνει τυπική είσοδο)\n/dub \"αÏχείο ήχου\"\tΦόÏτωση ενός Ï€Ïόσθετου αÏχείου ήχου\n/dubdelay \"αÏχείο\"\tΦόÏτωση ενός Ï€Ïόσθετου αÏχείου ήχου μετατοπισμένο με XXms\n\t\t(εάν το αÏχείο πεÏιέχει \"...DELAY XXms...\")\n/d3dfs\t\tΕκκίνηση απόδοσης σε λειτουÏγία D3D πλήÏους οθόνης\n/sub \"όνομα υπότιτλων\"\tΦόÏτωση ενός Ï€Ïόσθετου αÏχείου υποτίτλων\n/filter \"όνομα φίλτÏου\"\tΦόÏτωση φίλτÏων DirectShow από ένα dll\n\t\t(επιτÏέπονται τα μπαλαντέÏ)\n/dvd\t\tΕκτέλεση σε λειτουÏγία DVD. Ως \"κατάλογος\" εννοείται\n\t\tο φάκελος του DVD (Ï€ÏοαιÏετικά)\n/dvdpos T#C\tΈναÏξη αναπαÏαγωγής στον τίτλο T, κεφάλαιο C\n/dvdpos T#hh:mm\tΈναÏξη αναπαÏαγωγής στον τίτλο T, θέση hh:mm:ss\n/cd\t\tΦόÏτωση όλων των κομματιών από ένα CD ή (S)VCD\n\t\tΩς \"κατάλογος\" εννοείται της συσκευής οδήγησης (Ï€ÏοαιÏετικά)\n/device\t\tΆνοιγμα της Ï€Ïοεπιλεγμένης συσκευής βίντεο\n/open\t\tΆνοιγμα του αÏχείου χωÏίς αυτόματη έναÏξη αναπαÏαγωγής\n/play\t\tΈναÏξη αναπαÏαγωγής του αÏχείου με την εκκίνηση του\n\t\tÏ€ÏογÏάμματος αναπαÏαγωγής\n/close\t\tΚλείσιμο του Ï€ÏογÏάμματος μετά την αναπαÏαγωγή\n\t\t(δουλεÏει μόνο όταν χÏησιμοποιείται με το /play)\n/shutdown\tΤεÏματισμός του συστήματος μετά την αναπαÏαγωγή\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tΈκκίνηση σε λειτουÏγία πλήÏους οθόνης\n/minimized\tΈκκίνηση σε ελαχιστοποιημένη λειτουÏγία\n/new\t\tΕκκινεί μια νέα παÏουσία του MPC-HC\n/add\t\tΠÏοσθήκη του \"κατάλογος\" στη λίστα αναπαÏαγωγής\n\t\tΜποÏεί να συνδυαστεί με /open και /play\n/randomize\tRandomize the playlist\n/regvid\t\tΔημιουÏγεί συσχετίσεις για αÏχεία βίντεο\n/regaud\t\tΔημιουÏγεί συσχετίσεις για αÏχεία ήχου\n/regpl\t\tΔημιουÏγεί συσχετίσεις για αÏχεία λίστας αναπαÏαγωγής\n/regall\t\tΔημιουÏγεί συσχετίσεις αÏχείων\n\t\tγια όλους τους υποστηÏιζόμενους Ï„Ïπους αÏχείων\n/unregall\t\tΚαταÏγεί όλες τις συσχετίσεις αÏχείων\n/start ms\t\tΈναÏξη αναπαÏαγωγής στα \"ms\" (= χιλιοστά δευτεÏολέπτου)\n/startpos hh:mm:ss\tΈναÏξη αναπαÏαγωγής στη θέση hh:mm:ss\n/fixedsize w,h\tΟÏίζει το μέγεθος ενός σταθεÏÎ¿Ï Ï€Î±ÏαθÏÏου\n/monitor N\tΕκκίνηση του MPC-HC στην οθόνη N (όπου το N ξεκινά από 1)\n/audiorenderer N\tΈναÏξη απόδοσης ήχου με χÏήση του N (όπου το N ξεκινά από 1)\n\t\t(βλέπε Ïυθμίσεις \"Έξοδος\")\n/shaderpreset \"Pr\"\tΈναÏξη με χÏήση της Ï€ÏοÏÏθμισης σκίασης \"Pr\"\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tΕπαναφοÏά Ï€Ïοεπιλεγμένων Ïυθμίσεων\n/help /h /?\tΕμφάνιση βοήθειας σχετικά με τις παÏαμέτÏους της γÏαμμής εντολών\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3041,18 +3038,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Αναλογίες εικόνας"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "ΧÏήση WASAPI (επανεκκίνηση αναπαÏαγωγής)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Σίγαση στη γÏήγοÏη αναπαÏαγωγή"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Συσκευή ήχου:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "ΚατακόÏυφος συγχÏονισμός (VSync): Îαι"
@@ -3609,3 +3594,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Ρυθμίσεις"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.dialogs.po
index 38dd93634..ddf1ed2b1 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.dialogs.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-18 11:24+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-28 01:53+0000\n"
"Last-Translator: Sir_Burpalot <doctor.z01db3rg@gmail.com>\n"
-"Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/mpc-hc/language/en_GB/)\n"
+"Language-Team: English (United Kingdom) (http://www.transifex.com/mpc-hc/mpc-hc/language/en_GB/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -473,10 +473,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Auto-load audio files"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Use the built-in subtitle renderer"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Control"
@@ -677,9 +673,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Prevent minimising the player when in fullscreen on a non default monitor"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Use Windows 7 Taskbar features"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Use enhanced taskbar features"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1170,8 +1166,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Subtitles *"
+msgid "Subtitles"
+msgstr "Subtitles"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1186,8 +1182,8 @@ msgid "Rotation"
msgstr "Rotation"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* External filters (such as VSFilter) can display subtitles on all renderers."
+msgid "Subtitle Renderer"
+msgstr "Subtitle Renderer"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1205,6 +1201,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Allow access from localhost only"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Enable preview"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Print debug information"
@@ -1653,6 +1653,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Default"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Device"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Exclusive mode"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Allow bitstreaming"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Options"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Enable stereo crossfeed (for headphones)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Cut-off:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Level:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Note"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "To minimise audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG quality:"
@@ -1669,9 +1713,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Crash reporter"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "We are sorry, it seems MPC-HC just crashed. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Send a bug report to help us diagnose and fix the problem."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
+msgid "Optional information"
+msgstr "Optional information"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1685,7 +1737,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Problem description (use English only):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Restart MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Quit MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.menus.po
index 98c545ce3..991936de1 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.menus.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-15 16:53:42+0000\n"
-"PO-Revision-Date: 2015-05-18 11:24+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-05-31 23:00+0000\n"
"Last-Translator: Sir_Burpalot <doctor.z01db3rg@gmail.com>\n"
-"Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/mpc-hc/language/en_GB/)\n"
+"Language-Team: English (United Kingdom) (http://www.transifex.com/mpc-hc/mpc-hc/language/en_GB/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -590,7 +590,7 @@ msgstr "Af&ter Playback"
msgctxt "ID_AFTERPLAYBACK_DONOTHING"
msgid "Do no&thing"
-msgstr ""
+msgstr "Do no&thing"
msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
msgid "Play &next file in the folder"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.strings.po
index a22311d45..17a381625 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.en_GB.strings.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-15 16:53:42+0000\n"
-"PO-Revision-Date: 2015-05-18 11:24+0000\n"
-"Last-Translator: Sir_Burpalot <doctor.z01db3rg@gmail.com>\n"
-"Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/mpc-hc/language/en_GB/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: English (United Kingdom) (http://www.transifex.com/mpc-hc/mpc-hc/language/en_GB/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -325,12 +325,12 @@ msgid "On/Off"
msgstr "On/Off"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "From FPS"
+msgid "From (FPS)"
+msgstr "From (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "To FPS"
+msgid "To (FPS)"
+msgstr "To (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -464,6 +464,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Playback::Shaders"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Resources"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Miscellaneous"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Playback::Capture"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Playback::Sync Renderer Settings"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Playback::Fullscreen"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Internal Filters::Audio Renderer"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Audio Switcher"
@@ -556,30 +584,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Subtitles::Database"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Resources"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Miscellaneous"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Playback::Capture"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Playback::Sync Renderer Settings"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Playback::Fullscreen"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Details"
@@ -672,22 +676,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Video surface will be allocated as a regular offscreen surface."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Audio Renderer is broken, do not use."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Reporting a bug"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Regular offscreen plain surface"
@@ -740,9 +732,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (uncompressed)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Internal Audio Renderer"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1386,11 +1378,31 @@ msgstr "High precision"
msgctxt "IDS_AFTERPLAYBACK_REWIND"
msgid "After Playback: Rewind current file"
-msgstr ""
+msgstr "After Playback: Rewind current file"
msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
-msgstr ""
+msgstr "After Playback: Close"
+
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC encountered a problem during initialisation. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Enter a positive value if the audio is early, a negative value if it is late."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Preview is currently disabled. You can enable it in MPC-HC's options."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Internal Subtitle Renderer"
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
@@ -1676,6 +1688,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Show File Name"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Play DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Play BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: Display Renderer Statistics"
@@ -1957,20 +1977,20 @@ msgid "Options"
msgstr "Options"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Next Audio"
+msgid "Next Audio Track"
+msgstr "Next Audio Track"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Prev Audio"
+msgid "Prev Audio Track"
+msgstr "Prev Audio Track"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Next Subtitle"
+msgid "Next Subtitle Track"
+msgstr "Next Subtitle Track"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Prev Subtitle"
+msgid "Prev Subtitle Track"
+msgstr "Prev Subtitle Track"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1980,22 +2000,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Reload Subtitles"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Next Audio (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Prev Audio (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Next Subtitle (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Prev Subtitle (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Next Angle (DVD)"
@@ -2005,20 +2009,20 @@ msgid "Prev Angle (DVD)"
msgstr "Prev Angle (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Next Audio (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Next Audio Track (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Prev Audio (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Prev Audio Track (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Next Subtitle (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Next Subtitle Track (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Prev Subtitle (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "Prev Subtitle Track (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2384,14 +2388,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Current"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Failed to create dump file to \"%s\" (error %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Select Directory"
@@ -2565,8 +2561,8 @@ msgid "Volume boost Max"
msgstr "Volume boost Max"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimised mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomise the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimised mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomise the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3040,18 +3036,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Aspect Ratio"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Use WASAPI (restart playback)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Mute on fast forward"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Sound Device:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: On"
@@ -3608,3 +3592,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Settings"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.es.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.es.dialogs.po
index 809683149..2c3eef12e 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.es.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.es.dialogs.po
@@ -12,10 +12,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-17 23:41+0000\n"
-"Last-Translator: strel\n"
-"Language-Team: Spanish (http://www.transifex.com/projects/p/mpc-hc/language/es/)\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-20 13:22+0000\n"
+"Last-Translator: Adolfo Jayme Barrientos\n"
+"Language-Team: Spanish (http://www.transifex.com/mpc-hc/mpc-hc/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -188,7 +188,7 @@ msgstr "Cancelar"
msgctxt "IDD_OPEN_DLG_IDC_CHECK1"
msgid "Add to playlist without opening"
-msgstr "Agregar a la lista de reproducción sin abrir"
+msgstr "Añadir a la lista de reproducción sin abrir"
msgctxt "IDD_ABOUTBOX_CAPTION"
msgid "About"
@@ -204,7 +204,7 @@ msgstr "Este programa es gratuito y está publicado bajo la Licencia Pública Ge
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "English translation made by MPC-HC Team"
-msgstr "Traducción: SquallMX, XPC, Fitoschido."
+msgstr "Traducción: Adolfo, Strel y otros."
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "Build information"
@@ -252,7 +252,7 @@ msgstr "Usar el mismo reproductor para cada archivo multimedia"
msgctxt "IDD_PPAGEPLAYER_IDC_RADIO2"
msgid "Open a new player for each media file played"
-msgstr "Abrir un reproductor nuevo para cada archivo multimedia"
+msgstr "Abrir un reproductor nuevo por cada archivo multimedia"
msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
msgid "Language"
@@ -308,7 +308,7 @@ msgstr "Desactivar el menú «Abrir disco»"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK9"
msgid "Process priority above normal"
-msgstr "Mayor prioridad para el proceso"
+msgstr "Incrementar prioridad del proceso"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK14"
msgid "Enable cover-art support"
@@ -320,7 +320,7 @@ msgstr "Historial"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK1"
msgid "Keep history of recently opened files"
-msgstr "Mantener historial de los archivos abiertos"
+msgstr "Mantener historial de archivos abiertos recientemente"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK2"
msgid "Remember last playlist"
@@ -348,7 +348,7 @@ msgstr "Recordar el último reencuadramiento"
msgctxt "IDD_PPAGEDVD_IDC_STATIC"
msgid "\"Open DVD/BD\" behavior"
-msgstr "Comportamiento «Abrir DVD/BD»"
+msgstr "Comportamiento de «Abrir DVD/BD»"
msgctxt "IDD_PPAGEDVD_IDC_RADIO1"
msgid "Prompt for location"
@@ -376,7 +376,7 @@ msgstr "Subtítulos"
msgctxt "IDD_PPAGEDVD_IDC_STATIC"
msgid "Additional settings"
-msgstr "Ajustes adicionales"
+msgstr "Configuración adicional"
msgctxt "IDD_PPAGEDVD_IDC_CHECK2"
msgid "Allow closed captions in \"Line 21 Decoder\""
@@ -436,7 +436,7 @@ msgstr "Salida"
msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK5"
msgid "Auto-zoom:"
-msgstr "Ampliación automática:"
+msgstr "Escala automática:"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC2"
msgid "Auto fit factor:"
@@ -478,10 +478,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Cargar archivos de audio automáticamente"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Usar renderizador de subtítulos incorporado"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Control"
@@ -682,9 +678,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Evitar minimizar el reproductor en modo a pantalla completa al usar otro monitor"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Utilizar funciones de la barra de tareas de Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Usar características mejoradas de barra de tareas"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -880,7 +876,7 @@ msgstr "Posición: 0.0 -> 1.0"
msgctxt "IDD_PNSPRESET_DLG_IDC_STATIC"
msgid "Zoom: 0.2 -> 3.0"
-msgstr "Escala: 0.2 -> 3.0"
+msgstr "Escala: 0.2 → 3.0"
msgctxt "IDD_PPAGEACCELTBL_IDC_CHECK2"
msgid "Global Media Keys"
@@ -1175,8 +1171,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Subtítulos *"
+msgid "Subtitles"
+msgstr "Subtítulos"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1191,8 +1187,8 @@ msgid "Rotation"
msgstr "Giro"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Los filtros externos (como VSFilter) pueden mostrar subtítulos en cualquier renderizador."
+msgid "Subtitle Renderer"
+msgstr "Motor de visualización de subtítulos"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1210,6 +1206,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Permitir acceso solo desde el equipo local"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Activar previsualización"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Mostrar información de depuración"
@@ -1620,7 +1620,7 @@ msgstr "Shaders de postredimensión activos"
msgctxt "IDD_DEBUGSHADERS_DLG_CAPTION"
msgid "Debug Shaders"
-msgstr "Sombreadores de depuración"
+msgstr "Depurar sombreadores"
msgctxt "IDD_DEBUGSHADERS_DLG_IDC_STATIC"
msgid "Debug Information"
@@ -1658,6 +1658,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Original"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Dispositivo"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Modo exclusivo"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Permitir flujo de bits"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Opciones"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Activar mezcla de canales estéreo (para auriculares)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Corte:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Nivel:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Nota"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Para minimizar la distorsión del sonido, se recomienda mantener el volumen del reproductor en torno al 85 % al reproducir contenido ruidoso codificado con pérdidas."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "Calidad de JPEG:"
@@ -1674,9 +1718,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Informe de fallo"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Lo sentimos, parece que MPC-HC se ha caído :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Envíe un informe del fallo para ayudarnos a diagnosticar y reparar el problema"
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Lo sentimos, parece que MPC-HC acaba de caerse. :(\n\nPara ayudarnos a diagnosticar y reparar el problema, se enviará un informe de fallo. Puede proporcionar información adicional si quiere."
+msgid "Optional information"
+msgstr "Información opcional"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1690,7 +1742,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Descripción del problema (use sólo inglés):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "Aceptar"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Reiniciar MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Salir de MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.es.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.es.menus.po
index 75aa68f32..d46e96376 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.es.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.es.menus.po
@@ -3,6 +3,7 @@
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Adolfo Jayme Barrientos, 2014
+# Adolfo Jayme Barrientos, 2015
# Adolfo Jayme Barrientos, 2014
# JellyFrog, 2013
# squallmx <squallmx@users.sourceforge.net>, 2014
@@ -10,10 +11,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
-"PO-Revision-Date: 2015-05-27 15:15+0000\n"
-"Last-Translator: strel\n"
-"Language-Team: Spanish (http://www.transifex.com/projects/p/mpc-hc/language/es/)\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-09-30 03:58+0000\n"
+"Last-Translator: Adolfo Jayme Barrientos\n"
+"Language-Team: Spanish (http://www.transifex.com/mpc-hc/mpc-hc/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -146,7 +147,7 @@ msgstr "Na&vegación"
msgctxt "ID_VIEW_DEBUGSHADERS"
msgid "&Debug Shaders"
-msgstr "&Depurar Shaders"
+msgstr "&Depurar sombreadores"
msgctxt "POPUP"
msgid "&Presets..."
@@ -170,7 +171,7 @@ msgstr "&Pantalla completa"
msgctxt "POPUP"
msgid "&Zoom"
-msgstr "&Ampliación"
+msgstr "&Escala"
msgctxt "ID_VIEW_ZOOM_50"
msgid "&50%"
@@ -558,7 +559,7 @@ msgstr "&Filtros"
msgctxt "ID_SHADERS"
msgid "S&haders"
-msgstr "S&haders"
+msgstr "&Sombreadores"
msgctxt "ID_AUDIOS"
msgid "&Audio Track"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.es.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.es.strings.po
index ceb14c28a..2324acfc3 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.es.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.es.strings.po
@@ -15,10 +15,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-27 15:15+0000\n"
-"Last-Translator: strel\n"
-"Language-Team: Spanish (http://www.transifex.com/projects/p/mpc-hc/language/es/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-10 11:31+0000\n"
+"Last-Translator: Adolfo Jayme Barrientos\n"
+"Language-Team: Spanish (http://www.transifex.com/mpc-hc/mpc-hc/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -199,7 +199,7 @@ msgstr "DVD añadido a favoritos"
msgctxt "IDS_CAPTURE_SETTINGS"
msgid "Capture Settings"
-msgstr "Configuraciones de captura"
+msgstr "Configuración de captura"
msgctxt "IDS_NAVIGATION_BAR"
msgid "Navigation Bar"
@@ -271,7 +271,7 @@ msgstr "No se pudo abrir el dispositivo de captura."
msgctxt "IDS_INVALID_PARAMS_ERROR"
msgid "Can't open, invalid input parameters"
-msgstr "No se puede abrir, parámetros de entrada inválidos"
+msgstr "No se puede abrir: los parámetros de entrada no son válidos"
msgctxt "IDS_EDIT_LIST_EDITOR"
msgid "Edit List Editor"
@@ -334,12 +334,12 @@ msgid "On/Off"
msgstr "Activado/desactivado"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "De FPS"
+msgid "From (FPS)"
+msgstr "De (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "A FPS"
+msgid "To (FPS)"
+msgstr "A (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -347,7 +347,7 @@ msgstr "Modo de visualización (Hz)"
msgctxt "IDS_PPAGE_FS_DEFAULT"
msgid "Default"
-msgstr "Original"
+msgstr "Predeterminado"
msgctxt "IDS_PPAGE_FS_OTHER"
msgid "Other"
@@ -473,6 +473,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Reproducción::Sombras"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Recursos"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Varias"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Reproducción::Captura"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Reproducción::Config. de Sync Renderer"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Reproducción::Pantalla completa"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Filtros internos::Renderizador de audio"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Conmutador de audio"
@@ -565,30 +593,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Subtítulos::Base de datos"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Recursos"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Misceláneos"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Reproducción::Captura"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Reproducción::Config. de Sync Renderer"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Reproducción::Pantalla completa"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Detalles"
@@ -607,7 +611,7 @@ msgstr "Este es el renderizador predeterminado para Windows 9x/Me/2K. Dependiend
msgctxt "IDC_DSOVERLAYMIXER"
msgid "Always renders in overlay. Generally only YUV formats are allowed, but they are presented directly without any color conversion to RGB. This is the fastest rendering method of all and the only where you can be sure about fullscreen video mirroring to tv-out activating."
-msgstr "Siempre renderiza en Overlay. Generalmente solo se permiten los formatos YUV, pero se presentan directamente sin ninguna conversión de color a RGB. Este es el modo de renderizado más rápido y el único donde puedes estar seguro sobre el espejo a pantalla completa cuando activas la salida de TV."
+msgstr ""
msgctxt "IDC_DSVMR7WIN"
msgid "The default renderer of Windows XP. Very stable and just a little slower than the Overlay mixer. Uses DirectDraw and runs in Overlay when it can."
@@ -681,22 +685,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "La superficie de video será distribuida como una superficie regular fuera de pantalla."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "El renderizador de audio MPC está dañado. Evite su uso."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Renderizador de sincronización"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC: informe de error"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC acaba de fallar pero esta versión fue compilada sin información de trazas.\nSi deseas reportar el fallo, deberías primero probar con una compilación oficial.\n\n¿Deseas visitar la página de descargas ahora?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Superficie fuera de pantallas convencionales"
@@ -749,9 +741,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Nulo (sin compresión)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "Renderizador de audio MPC-HC"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Renderizador interno de audio"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -771,7 +763,7 @@ msgstr "Descargar subtítulos"
msgctxt "IDS_SUBFILE_DELAY"
msgid "Delay (ms):"
-msgstr "Retraso (ms)"
+msgstr "Retardo (ms):"
msgctxt "IDS_SPEEDSTEP_AUTO"
msgid "Auto"
@@ -795,7 +787,7 @@ msgstr "No se admiten los archivos cifrados"
msgctxt "IDS_RFS_MISSING_VOLS"
msgid "Couldn't find all archive volumes"
-msgstr "No se pudieron encontrar todos los pedazos del comprimido"
+msgstr "No se encontraron todas las partes del archivador"
msgctxt "IDC_TEXTURESURF2D"
msgid "Video surface will be allocated as a texture but still the 2d functions will be used to copy and stretch it onto the backbuffer. Requires a video card which can allocate 32-bit, RGBA, non-power-of-two sized textures and at least in the resolution of the video."
@@ -875,7 +867,7 @@ msgstr "Reproducir\nReproducir"
msgctxt "ID_PLAY_PAUSE"
msgid "Pause\nPause"
-msgstr "Pausa\nPausa"
+msgstr "Pausar\nPausar"
msgctxt "ID_PLAY_STOP"
msgid "Stop\nStop"
@@ -975,7 +967,7 @@ msgstr "Cerrando..."
msgctxt "IDS_CONTROLS_PLAYING"
msgid "Playing"
-msgstr "Reproduciendo"
+msgstr "En reproducción"
msgctxt "IDS_CONTROLS_PAUSED"
msgid "Paused"
@@ -991,7 +983,7 @@ msgstr "&Vaciar la lista"
msgctxt "IDS_RECENT_FILES_QUESTION"
msgid "Are you sure that you want to delete recent files list?"
-msgstr "¿Está seguro de que quiere vaciar la lista de archivos recientes?"
+msgstr "¿Confirma que quiere vaciar la lista de archivos recientes?"
msgctxt "IDS_AG_EDL_SAVE"
msgid "EDL save"
@@ -1043,11 +1035,11 @@ msgstr "Escalar a 16:9 TV,%.3f,%.3f,%.3f,%.3f"
msgctxt "IDS_SCALE_WIDESCREEN"
msgid "Zoom To Widescreen,%.3f,%.3f,%.3f,%.3f"
-msgstr "Zoom a Widescreen,%.3f,%.3f,%.3f,%.3f"
+msgstr "Escalar a pantalla ancha,%.3f,%.3f,%.3f,%.3f"
msgctxt "IDS_SCALE_ULTRAWIDE"
msgid "Zoom To Ultra-Widescreen,%.3f,%.3f,%.3f,%.3f"
-msgstr "Zoom a Ultra-Widescreen,%.3f,%.3f,%.3f,%.3f"
+msgstr "Escalar a pantalla ultraancha,%.3f,%.3f,%.3f,%.3f"
msgctxt "IDS_PLAYLIST_HIDEFS"
msgid "Hide on Fullscreen"
@@ -1231,11 +1223,11 @@ msgstr "D +%d %%"
msgctxt "IDS_VOLUME"
msgid "%d%%"
-msgstr "%d%%"
+msgstr "%d %%"
msgctxt "IDS_BOOST"
msgid "+%d%%"
-msgstr "+%d%%"
+msgstr "+%d %%"
msgctxt "IDS_PLAYLIST_ADDFOLDER"
msgid "Add containing folder"
@@ -1367,7 +1359,7 @@ msgstr "Eliminar todos"
msgctxt "IDS_REMOVE_CHANNELS_QUESTION"
msgid "Are you sure you want to remove all channels from the list?"
-msgstr "¿Está seguro de que quiere eliminar todos los canales de la lista?"
+msgstr "¿Confirma que quiere eliminar todos los canales de la lista?"
msgctxt "IDS_MEDIAINFO_NO_INFO_AVAILABLE"
msgid "No information available"
@@ -1395,11 +1387,31 @@ msgstr "Alta precisión "
msgctxt "IDS_AFTERPLAYBACK_REWIND"
msgid "After Playback: Rewind current file"
-msgstr "Tras la reproducción: Rebobinar el archivo actual"
+msgstr "Tras la reproducción: rebobinar el archivo actual"
msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
-msgstr "Tras la reproducción: Cerrar"
+msgstr "Tras la reproducción: cerrar"
+
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "Se produjo un problema al inicializar MPC-HC. Con su ayuda es posible que podamos corregir el problema.\n\n¿Quiere informarnos del fallo?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Proporcione un valor positivo si el audio va adelantado o uno negativo si va retrasado."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "La previsualización actualmente está desactivada. Puede activarla en las opciones de MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Esta opción puede usarse para previsualizar archivos audiovisuales desde una ubicación remota. Úselo solo sobre una red privada adecuadamente asegurada.\n\n¿De verdad quiere activar esta opción?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Motor interno de visualización de subtítulos"
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
@@ -1487,11 +1499,11 @@ msgstr "Artes/cultura"
msgctxt "IDS_CONTENT_SOCIAL_POLITICAL_ECO"
msgid "Social/Political issues/Economics"
-msgstr "Sociales/asuntos políticos/economía"
+msgstr "Asuntos sociales/políticos/economía"
msgctxt "IDS_CONTENT_LEISURE"
msgid "Leisure hobbies"
-msgstr "Aficiones de ocio"
+msgstr "Aficiones"
msgctxt "IDS_FILE_RECYCLE"
msgid "Move to Recycle Bin"
@@ -1563,11 +1575,11 @@ msgstr "Ãngu&lo del vídeo"
msgctxt "IDS_RESET_SETTINGS"
msgid "Reset settings"
-msgstr "Restaurar preferencias"
+msgstr "Restablecer configuración"
msgctxt "IDS_RESET_SETTINGS_WARNING"
msgid "Are you sure you want to restore MPC-HC to its default settings?\nBe warned that ALL your current settings will be lost!"
-msgstr "¿Estás seguro que deseas restaurar MPC-HC a sus configuraciones predefinidas?\n¡Estás advertido de que TODAS tus configuraciones actuales se perderán!"
+msgstr "¿Confirma que quiere restaurar la configuración predeterminada de MPC-HC?\nSe perderán TODOS sus ajustes."
msgctxt "IDS_RESET_SETTINGS_MUTEX"
msgid "Please close all instances of MPC-HC so that the default settings can be restored."
@@ -1659,7 +1671,7 @@ msgstr "Archivo anterior"
msgctxt "IDS_MPLAYERC_99"
msgid "Toggle Direct3D fullscreen"
-msgstr "Interruptor de Direct3D en Pantalla Completa"
+msgstr "Conmutar Direct3D a pantalla completa"
msgctxt "IDS_MPLAYERC_100"
msgid "Goto Prev Subtitle"
@@ -1671,11 +1683,11 @@ msgstr "Ir al subtítulo siguiente"
msgctxt "IDS_MPLAYERC_102"
msgid "Shift Subtitle Left"
-msgstr "Mover Sub a la Izquierda"
+msgstr "Desplazar subtítulo a la izquierda"
msgctxt "IDS_MPLAYERC_103"
msgid "Shift Subtitle Right"
-msgstr "Mover Sub a la Derecha"
+msgstr "Desplazar subtítulo a la derecha"
msgctxt "IDS_AG_SEEKSET"
msgid "Jump to Beginning"
@@ -1685,6 +1697,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "Sobreimpresión: Mostrar nombre del archivo"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Reproducir DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Reproducir BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "Sobreimpresión: Mostrar estadísticas del renderizador"
@@ -1695,11 +1715,11 @@ msgstr "Sobreimpresión: Restablecer estadísticas del renderizador"
msgctxt "IDD_PPAGESUBMISC"
msgid "Subtitles::Misc"
-msgstr "Subtítulos::Misc"
+msgstr "Subtítulos::Varias"
msgctxt "IDS_VIEW_BORDERLESS"
msgid "Hide &borders"
-msgstr "Hide borders"
+msgstr "Ocultar los &bordes"
msgctxt "IDS_VIEW_FRAMEONLY"
msgid "Fra&me Only"
@@ -1707,11 +1727,11 @@ msgstr "Solo el cuadro"
msgctxt "IDS_VIEW_CAPTIONMENU"
msgid "Sho&w Caption&&Menu"
-msgstr "Show Caption&&Menu"
+msgstr "Mostrar &leyenda y menú"
msgctxt "IDS_VIEW_HIDEMENU"
msgid "Hide &Menu"
-msgstr "Hide Menu"
+msgstr "Ocultar el &menú"
msgctxt "IDD_PPAGEADVANCED"
msgid "Advanced"
@@ -1739,7 +1759,7 @@ msgstr "Pantalla completa (sin cambio de res.)"
msgctxt "IDS_AG_ZOOM_AUTO_FIT"
msgid "Zoom Auto Fit"
-msgstr "Autoajustar ampliación"
+msgstr "Ajuste automático"
msgctxt "IDS_AG_VIDFRM_HALF"
msgid "VidFrm Half"
@@ -1799,7 +1819,7 @@ msgstr "%d subtítulos disponibles."
msgctxt "IDS_UPDATE_CONFIG_AUTO_CHECK"
msgid "Do you want to check periodically for MPC-HC updates?\n\nThis feature can be disabled later from the Miscellaneous options page."
-msgstr "¿Quiere que MPC-HC busque actualizaciones automáticamente?\n\nPuede desactivar esta función en la página Miscelánea de las opciones."
+msgstr "¿Quiere que MPC-HC busque actualizaciones automáticamente?\n\nPuede desactivar esta función en la página «Varias» de las opciones."
msgctxt "IDS_ZOOM_50"
msgid "50%"
@@ -1823,11 +1843,11 @@ msgstr "Ajuste automático (si es mayor)"
msgctxt "IDS_AG_ZOOM_AUTO_FIT_LARGER"
msgid "Zoom Auto Fit (Larger Only)"
-msgstr "Ampliación: ajuste automático (si es mayor)"
+msgstr "Ajuste automático (si es mayor)"
msgctxt "IDS_OSD_ZOOM_AUTO_LARGER"
msgid "Zoom: Auto (Larger Only)"
-msgstr "Ampliación: automática (si es mayor)"
+msgstr "Escala: automática (si es mayor)"
msgctxt "IDS_TOOLTIP_EXPLORE_TO_FILE"
msgid "Double click to open file location"
@@ -1966,20 +1986,20 @@ msgid "Options"
msgstr "Opciones"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Audio siguiente"
+msgid "Next Audio Track"
+msgstr "Pista de audio siguiente"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Audio anterior"
+msgid "Prev Audio Track"
+msgstr "Pista de audio anterior"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Subtítulos siguientes"
+msgid "Next Subtitle Track"
+msgstr "Pista de subtítulos siguiente"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Subtítulos anteriores"
+msgid "Prev Subtitle Track"
+msgstr "Pista de subtítulos anterior"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1989,22 +2009,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Recargar subtítulos"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Audio siguiente (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Audio anterior (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Subtítulos siguientes (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Subtítulos anteriores (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Ãngulo siguiente (DVD)"
@@ -2014,20 +2018,20 @@ msgid "Prev Angle (DVD)"
msgstr "Ãngulo anterior (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Audio siguiente (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Pista de audio siguiente (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Audio anterior (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Pista de audio anterior (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Subtítulos siguientes (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Pista de subtítulos siguiente (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Subtítulos anteriores (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "Pista de subtítulos anterior (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2071,7 +2075,7 @@ msgstr "No"
msgctxt "IDS_DVB_CHANNEL_START_SCAN"
msgid "Start"
-msgstr "Inicio"
+msgstr "Iniciar"
msgctxt "IDS_DVB_CHANNEL_STOP_SCAN"
msgid "Stop"
@@ -2191,7 +2195,7 @@ msgstr "DVD: las regiones del disco y el decodificador no son compatibles"
msgctxt "IDS_D3DFS_WARNING"
msgid "This option is designed to avoid tearing. However, it will also prevent MPC-HC from displaying the context menu and any dialog box during playback.\n\nDo you really want to activate this option?"
-msgstr "Esta opción está diseñada para evitar el efecto de desgarre («tearing»). Sin embargo, evitará que se muestren el menú contextual y las ventanas durante la reproducción.\n\n¿Está seguro de que quiere activar esta opción?"
+msgstr "Esta opción está diseñada para evitar el efecto de desgarre («tearing»). Sin embargo, evitará que se muestren el menú contextual y las ventanas durante la reproducción.\n\n¿Confirma que quiere activar esta opción?"
msgctxt "IDS_MAINFRM_139"
msgid "Sub delay: %ld ms"
@@ -2383,7 +2387,7 @@ msgstr "Vol.: %d %%"
msgctxt "IDS_BOOST_OSD"
msgid "Boost: +%u%%"
-msgstr "Amplificación: +%u%%"
+msgstr "Amplificación: +%u %%"
msgctxt "IDS_BALANCE_OSD"
msgid "Balance: %s"
@@ -2393,14 +2397,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Actual"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC se cerró inesperadamente. Para ayudarnos a corregir el problema, envíe el archivo «%s» a nuestro rastreador de errores.\n\n¿Quiere abrir la carpeta que contiene el archivo y visitar el rastreador de errores ahora?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Falló la creación del archivo de volcado en «%s» (error %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Elija la carpeta"
@@ -2491,7 +2487,7 @@ msgstr "Sonido"
msgctxt "IDS_MAINFRM_114"
msgid "%s was not found, please insert media containing this file."
-msgstr "No se encontro %s, por favor inserte el medio que contiene al archivo."
+msgstr "No se encontró «%s». Inserte el soporte que contiene este archivo."
msgctxt "IDS_AG_ABORTED"
msgid "Aborted"
@@ -2499,7 +2495,7 @@ msgstr "Interrumpido"
msgctxt "IDS_MAINFRM_116"
msgid "&Properties..."
-msgstr "&Propiedades..."
+msgstr "&Propiedades…"
msgctxt "IDS_MAINFRM_117"
msgid " (pin) properties..."
@@ -2574,8 +2570,8 @@ msgid "Volume boost Max"
msgstr "Aumento de Volumen Maximo"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Uso: mpc-hc.exe \"ruta\" [parámetros]\n\n\"ruta\"\tEl archivo o directorio principal a cargar (comodines\n\t\tpermitidos, \"-\" denota entrada estandar)\n/dub \"nombredeaudiodedoblaje\"\tCarga un archivo de audio adicional\n/dubdelay \"fichero\"\tCarga un archivo de audio adicional desplazado XXms (si\n\t\tel fichero contiene \"...DELAY XXms...\")\n/d3dfs\t\tInicia el renderizado en modo D3D a pantalla completa\n/sub \"nombredesubtítulo\"\tCarga un archivo de subtítulos adicional\n/filter \"nombredefiltro\"\tCarga filtros DirectShow desde una (.dll) biblioteca de vínculos\n\t\tdinámicos (comodines permitidos)\n/dvd\t\tEjecuta en modo DVD, \"ruta\" significa la carpeta de\n\t\tDVD (opcional)\n/dvdpos T#C\tInicia la reproducción en el título T, capítulo C\n/dvdpos T#hh:mm\tInicia la reproducción en el título T, posición hh:mm:ss\n/cd\t\tCarga todas las pistas de un CD de audio o S(VCD),\n\t\t\"ruta\" significa la ruta de la unidad (opcional)\n/device\t\tAbre el dispositivo de vídeo predeterminado\n/open\t\tAbre el archivo, no inicia automáticamente la reproducción\n/play\t\tComienza a reproducir el archivo tan pronto como el reproductor se\n\t\tcargue\n/close\t\tCierra el reproductor tras la reproducción (sólo funciona cuando\n\t\tse usa con /play)\n/shutdown\tCierra el sistema operativo tras la reproducción\n/standby\t\tPone el sistema operativo en modo suspensión tras la reproducción\n/hibernate\tHiberna el sistema operativo tras la reproducción\n/logoff\t\tCierra sesión del sistema tras la reproducción\n/lock\t\tBloquea el equipo tras la reproducción\n/monitoroff\tApaga el monitor tras la reproducción\n/playnext\t\tAbre el siguiente archivo en la carpeta tras la reproducción\n/fullscreen\tSe inicia en modo pantalla-completa\n/minimized\tSe inicia en modo minimizado\n/new\t\tUsa una nueva instancia del reproductor\n/add\t\tAñade la \"ruta\" a la lista de reproducción, puede combinarse\n\t\tcon /open y /play\n/randomize\tAleatoriza la lista de reproducción\n/regvid\t\tCrea asociaciones de archivo para archivos de vídeo\n/regaud\t\tCrea asociaciones de archivo para archivos de audio\n/regpl\t\tCrea asociaciones de archivo para archivos de tipo lista de reproducción\n/regall\t\tCrea asociaciones de archivo para todos los tipos de archivo soportados\n/unregall\t\tElimina todas las asociaciones de archivo\n/start ms\t\tSe inicia reproduciendo desde \"ms\" (= milisegundos)\n/startpos hh:mm:ss\tSe inicia reproduciendo desde la posición hh:mm:ss\n/fixedsize w,h\tEstablece un tamaño fijo de ventana\n/monitor N\tInicia el reproductor en el monitor N, donde N comienza a contar desde 1\n/audiorenderer N\tSe inicia usando el renderizador de audio N, donde N comienza a contar desde 1\n\t\t(vea las configuraciones de \"Salida\")\n/shaderpreset \"Pr\"\tSe inicia usando los preajustes \"Pr\" del sombreador\n/pns \"name\"\tEspecifica el nombre de la preconfiguración Pan&Scan (cambio del encuadre) a usar\n/iconsassoc\tReasocia los iconos de formatos\n/nofocus\t\tAbre MPC-HC en segundo plano\n/webport N\tInicia la interfaz web en el puerto especificado\n/debug\t\tMuestra información de depuración sobreimpresionada\n/nocrashreporter\tDeshabilita el informe de fallo\n/slave \"hWnd\"\tUsa MPC-HC como esclavo\n/reset\t\tRestablece las configuraciones por defecto\n/help /h /?\tMuestra la ayuda de parámetros de línea de comandos\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Uso: mpc-hc.exe \"ruta\" [parámetros]\n\n\"ruta\"\tEl archivo o directorio principal a cargar (comodines\n\t\tpermitidos, \"-\" denota entrada estandar)\n/dub \"nombredeaudiodedoblaje\"\tCarga un archivo de audio adicional\n/dubdelay \"fichero\"\tCarga un archivo de audio adicional desplazado XXms (si\n\t\tel fichero contiene \"...DELAY XXms...\")\n/d3dfs\t\tInicia el renderizado en modo D3D a pantalla completa\n/sub \"nombredesubtítulo\"\tCarga un archivo de subtítulos adicional\n/filter \"nombredefiltro\"\tCarga filtros DirectShow desde una (.dll) biblioteca de vínculos\n\t\tdinámicos (comodines permitidos)\n/dvd\t\tEjecuta en modo DVD, \"ruta\" significa la carpeta de\n\t\tDVD (opcional)\n/dvdpos T#C\tInicia la reproducción en el título T, capítulo C\n/dvdpos T#hh:mm\tInicia la reproducción en el título T, posición hh:mm:ss\n/cd\t\tCarga todas las pistas de un CD de audio o S(VCD),\n\t\t\"ruta\" significa la ruta de la unidad (opcional)\n/device\t\tAbre el dispositivo de vídeo predeterminado\n/open\t\tAbre el archivo, no inicia automáticamente la reproducción\n/play\t\tComienza a reproducir el archivo tan pronto como el reproductor se\n\t\tcargue\n/close\t\tCierra el reproductor tras la reproducción (sólo funciona cuando\n\t\tse usa con /play)\n/shutdown\tCierra el sistema operativo tras la reproducción\n/standby\t\tPone el sistema operativo en modo suspensión tras la reproducción\n/hibernate\tHiberna el sistema operativo tras la reproducción\n/logoff\t\tCierra sesión del sistema tras la reproducción\n/lock\t\tBloquea el equipo tras la reproducción\n/monitoroff\tApaga el monitor tras la reproducción\n/playnext\t\tAbre el siguiente archivo en la carpeta tras la reproducción\n/fullscreen\tSe inicia en modo pantalla-completa\n/minimized\tSe inicia en modo minimizado\n/new\t\tUsa una nueva instancia del reproductor\n/add\t\tAñade la \"ruta\" a la lista de reproducción, puede combinarse\n\t\tcon /open y /play\n/randomize\tAleatoriza la lista de reproducción\n/regvid\t\tCrea asociaciones de archivo para archivos de vídeo\n/regaud\t\tCrea asociaciones de archivo para archivos de audio\n/regpl\t\tCrea asociaciones de archivo para archivos de tipo lista de reproducción\n/regall\t\tCrea asociaciones de archivo para todos los tipos de archivo soportados\n/unregall\t\tElimina todas las asociaciones de archivo\n/start ms\t\tSe inicia reproduciendo desde \"ms\" (= milisegundos)\n/startpos hh:mm:ss\tSe inicia reproduciendo desde la posición hh:mm:ss\n/fixedsize w,h\tEstablece un tamaño fijo de ventana\n/monitor N\tInicia el reproductor en el monitor N, donde N comienza a contar desde 1\n/audiorenderer N\tSe inicia usando el renderizador de audio N, donde N comienza a contar desde 1\n\t\t(vea las configuraciones de \"Salida\")\n/shaderpreset \"Pr\"\tSe inicia usando los preajustes \"Pr\" del sombreador\n/pns \"name\"\tEspecifica el nombre de la preconfiguración Pan&Scan (cambio del encuadre) a usar\n/iconsassoc\tReasocia los iconos de formatos\n/nofocus\t\tAbre MPC-HC en segundo plano\n/webport N\tInicia la interfaz web en el puerto especificado\n/debug\t\tMuestra información de depuración sobreimpresionada\n/nocrashreporter\tDeshabilita el informe de fallo\n/slave \"hWnd\"\tUsa MPC-HC como esclavo\n/hwgpu \"index\"\tAjusta el índice de la GPU usado para decodificación por hardware\n\t\tSólo disponible para CUVID y DXVA2 (copy-back)\n/reset\t\tRestablece las configuraciones por defecto\n/help /h /?\tMuestra la ayuda de parámetros de línea de comandos\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -2583,27 +2579,27 @@ msgstr "Se encontraron opciones no reconocidas en la orden ejecutada: \n\n"
msgctxt "IDS_AG_TOGGLE_INFO"
msgid "Toggle Information"
-msgstr "Alternar Información"
+msgstr "Mostrar/ocultar información"
msgctxt "IDS_AG_TOGGLE_STATS"
msgid "Toggle Statistics"
-msgstr "Alternar Estadísticas"
+msgstr "Mostrar/ocultar estadísticas"
msgctxt "IDS_AG_TOGGLE_STATUS"
msgid "Toggle Status"
-msgstr "Alternar Estado"
+msgstr "Mostrar/ocultar estado"
msgctxt "IDS_AG_TOGGLE_SUBRESYNC"
msgid "Toggle Subresync Bar"
-msgstr "Alternar Barra de Subresync"
+msgstr "Mostrar/ocultar barra de Subresync"
msgctxt "IDS_AG_TOGGLE_PLAYLIST"
msgid "Toggle Playlist Bar"
-msgstr "Alternar Barra de Lista de Reproducción"
+msgstr "Mostrar/ocultar barra de lista"
msgctxt "IDS_AG_TOGGLE_CAPTURE"
msgid "Toggle Capture Bar"
-msgstr "Alternar Barra de Captura"
+msgstr "Mostrar/ocultar barra de captura"
msgctxt "IDS_AG_TOGGLE_DEBUGSHADERS"
msgid "Toggle Debug Shaders"
@@ -2611,15 +2607,15 @@ msgstr "Conmutar sombras de depuración"
msgctxt "IDS_AG_ZOOM_50"
msgid "Zoom 50%"
-msgstr "Escala al 50 %"
+msgstr "Escalar al 50 %"
msgctxt "IDS_AG_ZOOM_100"
msgid "Zoom 100%"
-msgstr "Escala al 100 %"
+msgstr "Escalar al 100 %"
msgctxt "IDS_AG_ZOOM_200"
msgid "Zoom 200%"
-msgstr "Escala al 200 %"
+msgstr "Escalar al 200 %"
msgctxt "IDS_AG_NEXT_AR_PRESET"
msgid "Next AR Preset"
@@ -2775,7 +2771,7 @@ msgstr "Aplicar"
msgctxt "IDS_CLEAR"
msgid "Clear"
-msgstr "Limpiar"
+msgstr "Vaciar"
msgctxt "IDS_CANCEL"
msgid "Cancel"
@@ -2791,7 +2787,7 @@ msgstr "Píxeles:"
msgctxt "IDS_TEXTFILE_ENC"
msgid "Encoding:"
-msgstr "Codificando:"
+msgstr "Codificación:"
msgctxt "IDS_DISABLE_ALL_FILTERS"
msgid "&Disable all filters"
@@ -2899,7 +2895,7 @@ msgstr "Real Script"
msgctxt "IDS_MFMT_WMV"
msgid "Windows Media Video"
-msgstr "Windows Media Video"
+msgstr "Vídeo de Windows Media"
msgctxt "IDS_MFMT_BINK"
msgid "Smacker/Bink Video"
@@ -2967,7 +2963,7 @@ msgstr "AMR"
msgctxt "IDS_MFMT_APE"
msgid "Monkey's Audio"
-msgstr "Audio de Monkey’s"
+msgstr "Monkey’s Audio"
msgctxt "IDS_MFMT_AU"
msgid "AU/SND"
@@ -3049,18 +3045,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Relación de aspecto"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Usar WASAPI (reiniciar reproducción)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Silenciar en avance rápido"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Dispositivo de sonido:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: Encendido"
@@ -3307,11 +3291,11 @@ msgstr "&Cerrar"
msgctxt "IDS_OSD_ZOOM"
msgid "Zoom: %.0lf%%"
-msgstr "Ampliación: %.0lf %%"
+msgstr "Escala: %.0lf %%"
msgctxt "IDS_OSD_ZOOM_AUTO"
msgid "Zoom: Auto"
-msgstr "Ampliación: automática"
+msgstr "Escala: automática"
msgctxt "IDS_CUSTOM_CHANNEL_MAPPING"
msgid "Toggle custom channel mapping"
@@ -3503,27 +3487,27 @@ msgstr "Necesita aplicar la configuración nueva antes de probarla."
msgctxt "IDS_AFTERPLAYBACK_EXIT"
msgid "After Playback: Exit"
-msgstr "Después de la reproducción: salir"
+msgstr "Tras la reproducción: salir"
msgctxt "IDS_AFTERPLAYBACK_STANDBY"
msgid "After Playback: Stand By"
-msgstr "Después de la reproducción: suspender"
+msgstr "Tras la reproducción: suspender"
msgctxt "IDS_AFTERPLAYBACK_HIBERNATE"
msgid "After Playback: Hibernate"
-msgstr "Después de la reproducción: hibernar"
+msgstr "Tras la reproducción: hibernar"
msgctxt "IDS_AFTERPLAYBACK_SHUTDOWN"
msgid "After Playback: Shutdown"
-msgstr "Después de la reproducción: apagar"
+msgstr "Tras la reproducción: apagar"
msgctxt "IDS_AFTERPLAYBACK_LOGOFF"
msgid "After Playback: Log Off"
-msgstr "Después de la reproducción: cerrar la sesión"
+msgstr "Tras la reproducción: cerrar la sesión"
msgctxt "IDS_AFTERPLAYBACK_LOCK"
msgid "After Playback: Lock"
-msgstr "Después de la reproducción: bloquear"
+msgstr "Tras la reproducción: bloquear"
msgctxt "IDS_AFTERPLAYBACK_MONITOROFF"
msgid "After Playback: Turn off the monitor"
@@ -3611,9 +3595,17 @@ msgstr "Asociar solo con formatos de audio"
msgctxt "IDC_CLEAR_ALL_ASSOCIATIONS"
msgid "Clear all associations"
-msgstr "Limpiar todas las asociaciones"
+msgstr "Borrar todas las asociaciones"
msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Configuración"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.eu.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.eu.dialogs.po
index 5e3f830db..f39c9dabf 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.eu.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.eu.dialogs.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-18 18:34+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-20 13:37+0000\n"
"Last-Translator: Xabier Aramendi <azpidatziak@gmail.com>\n"
-"Language-Team: Basque (http://www.transifex.com/projects/p/mpc-hc/language/eu/)\n"
+"Language-Team: Basque (http://www.transifex.com/mpc-hc/mpc-hc/language/eu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -472,10 +472,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Berez-gertatu audio agiriak"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Erabili barne-eraikitako azpidatzi aurkezlea"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Agintea"
@@ -676,9 +672,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Saihestu TXIKIENTZEA Ikusleiho-osoa berezko monitorea ez denean"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Erabili Windows 7 Eginkizun-barra ezaugarriak"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Erabili eginkizun-barra hobetua ezaugarriak"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1169,8 +1165,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Azpidatziak *"
+msgid "Subtitles"
+msgstr "Azpidatziak"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1185,8 +1181,8 @@ msgid "Rotation"
msgstr "Itzulikapena"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Kanpoko iragazkiek (VSFilter bezalakoak) azpidatziak aurkezle guztietan erakutsi ditzakete."
+msgid "Subtitle Renderer"
+msgstr "Azpidatzi Aurkezlea"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1204,6 +1200,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Ahalbidetu sarbidea tokiko-hostalaritik bakarrik"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Gaitu aurreikuspena"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Irarkitu garbiketa argibideak"
@@ -1652,6 +1652,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Berezkoa"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Gailua"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Modu esklusiboa"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Ahalbidetu bitjarioa"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Aukerak"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Ahalbidetu estereo zehar-elikadura (entzungailuentzat)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Ebaketa:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Maila:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Oharra"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Soinuaren zakartzea gutxientzeko, gomendagarria da irakurgailuaren bolumena %85 inguruan edukitzea galera-kodeaketa edukiak ozen irakurtzerakoan."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG ontasuna:"
@@ -1668,9 +1712,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Matxura jakinarazpena"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Sentitzen dugu, dirudienez MPC-HC kraskatu egin da. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Bidali akats jakinarazpen bat arazoa ezagutzen eta zuzentzen laguntzeko."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Sentitzen dugu, MPC-HC matxuratu egin dela dirudi. :(\n\nArazoa ezagutzen eta zuzentzen laguntzeko, akats jakinarazpen bat bidaliko da. Argibide gehiagarriak eman ditzakezu nahi baduzu."
+msgid "Optional information"
+msgstr "Aukerazko argibideak"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1684,7 +1736,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Arazoaren azalpena (erabili Ingelera bakarrik):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "Ongi"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Berrabiarazi MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Utzi MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.eu.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.eu.menus.po
index 635e93c73..3e1332691 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.eu.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.eu.menus.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
"PO-Revision-Date: 2015-05-30 21:32+0000\n"
"Last-Translator: Xabier Aramendi <azpidatziak@gmail.com>\n"
-"Language-Team: Basque (http://www.transifex.com/projects/p/mpc-hc/language/eu/)\n"
+"Language-Team: Basque (http://www.transifex.com/mpc-hc/mpc-hc/language/eu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.eu.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.eu.strings.po
index 3d5926cee..7759a12fa 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.eu.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.eu.strings.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-30 21:32+0000\n"
-"Last-Translator: Xabier Aramendi <azpidatziak@gmail.com>\n"
-"Language-Team: Basque (http://www.transifex.com/projects/p/mpc-hc/language/eu/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Basque (http://www.transifex.com/mpc-hc/mpc-hc/language/eu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -325,12 +325,12 @@ msgid "On/Off"
msgstr "Eraginda/Etenda"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "fs-kotik "
+msgid "From (FPS)"
+msgstr "Hemendik (FS-ko)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "fs-kora"
+msgid "To (FPS)"
+msgstr "Hona (FS-ko)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -464,6 +464,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Irakurketa::Itzalak"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Baliabideak"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Askotarikoa"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "Multimedia Argibideak"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Irakurketa::Harpena"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Irakurketa::Aldib. Aurkezle Ezarpenak"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Irakurketa::Ikusleiho-osoa"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Barneko Iragazkiak::Audio Aurkezlea"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Audio Aldagailua"
@@ -556,30 +584,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Azpidatziak::Datubasea"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Baliabideak"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Askotarikoa"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "Multimedia Argibideak"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Irakurketa::Harpena"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Irakurketa::Aldib. Aurkezle Ezarpenak"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Irakurketa::Ikusleiho-osoa"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Xehetasunak"
@@ -672,22 +676,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Bideo azalera ikusleiho-kanpoko azalera arrunt bat bezala izendatuko da."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Audio Aurkezlea hautsita dago, ez erabili."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Aldb Aurkezlea"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Akats jakinarazpena"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC matxuratu eginda baina eraiketa hau garbiketa argibide gabe bildatakoa da.\nAkats hau jakinaraztea nahi baduzu, lehenik saiatu eraiketa ofizial batekin.\n\nNahi duzu jeisketa orrialdea orain ikustea?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Ikusleiho-kanpoko gainazal lau arrunta"
@@ -740,9 +732,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (konprimitugabea)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Aurkezlea"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Barneko Audio Aurkezlea"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1392,6 +1384,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Irakurri Ondoren: Itxi"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC-k arazo bat aurkitu du abiarazpenean. Zure laguntzarekin arazoa zuzentzeko gai izan gaitezke.\n\nJakinaraztea nahi duzu?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Sartu balio positibo bat audioa aurreratua badago, balio negaitboa atzeratua badago."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Aurreikuspena orain ezgaituta dago. MPC-HC-ren aukeratan gaitu dezakezu."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Aukera hau multimedia agiriak hurruneko kokaleku batetik ikusteko erabili daiteke. Erabili segurtasun egokia duen sare pribatu batean bakarrik.\n\nEgitan nahi duzu aukera hau gaitzea?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Barneko Azpidatzi Aurkezlea"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Ireki Gailua"
@@ -1676,6 +1688,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "IGE: Erakutsi Agiri Izena"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Irakurri DVD-a"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Irakurri BD-a"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "IGE: Erakutsi Aurkezle Estatistikak"
@@ -1957,20 +1977,20 @@ msgid "Options"
msgstr "Aukerak"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Hurrengo Audioa"
+msgid "Next Audio Track"
+msgstr "Hurrengo Audio Bidea"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Aurreko Audioa"
+msgid "Prev Audio Track"
+msgstr "Aurreko Audio Bidea"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Hurrengo Azpidatzia"
+msgid "Next Subtitle Track"
+msgstr "Hurrengo Azpidatzi Bidea"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Aurreko Azpidatzia"
+msgid "Prev Subtitle Track"
+msgstr "Aurreko Azpidatzi Bidea"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1980,22 +2000,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Birgertatu Azpidatzia"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Hurrengo Audioa (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Aurreko Audioa (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Hurrengo Azpidatzia (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Aurreko Azpidatzia (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Hurrengo Angelua (DVD)"
@@ -2005,20 +2009,20 @@ msgid "Prev Angle (DVD)"
msgstr "Aurreko Angelua (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Hurrengo Audioa (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Hurrengo Audio Bidea (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Aurreko Audioa (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Aurreko Audio Bidea (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Hurrengo Azpidatzia (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Hurrengo Azpidatzi Bidea (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Aurreko Azpidatzia (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "Aurreko Azpidatzi Bidea (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2384,14 +2388,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Oraingoa"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC-k ustekabean amaitu du. Arazo hau zuzentzen laguntzeko, mesedez bidali '%s' agiri hau gure akats aztarnariari.\n\nNahi duzu minidump agiria duen agiritegia ireki eta gure akats aztarnaria orain ikustea?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Hutsegitea hondakin agiria sortzerakoan \"%s\"-ra (akatsa %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Hautatu Zuzenbidea"
@@ -2565,8 +2561,8 @@ msgid "Volume boost Max"
msgstr "Bolumen bultzada Gehiena"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Erabilpena: mpc-hc.exe \"helburu-izena\" [aldagailuak]\n\n\"pathname\"\tGertatzeko agiri edo zuzenbide nagusia\n\t\t(ordezhizkiak ahal dira, \"-\"-k sarrera estandarra adierazten du)\n/dub \"dubname\"\tGertatu audio agiri gehigarri bat\n/dubdelay \"file\"\tGertatu audio agiri gehigarri bat XXsm aldatuta\n\t\t(baldin agiriak baditu \"...ATZERAPENA XXsM...\")\n/d3dfs\t\tHasi aurkezpena D3D ikusleiho-osoko moduan\n/sub \"subname\"\tGertatu azpidatzi agiri gehigarri bat\n/filter \"filtername\"\tGertatu DirectShow iragazkiak lotura dinamiko\n\t\tliburutegi batetik (ordezhizkiak ahal dira)\n/dvd\t\tEkin dvd moduan, \"helburu-izena\" esanahi du\n\t\tdvd agiritegia (aukerazkoa)\n/dvdpos T#C\tHasi irakurketa I izenburuan, A atalean\n/dvdpos T#hh:mm\tHasi irakurketa I izenburuan, kokapena oo:mn:sg\n/cd\t\tGertatu cd edo (s)vcd audio bide guztiak,\n\t\t\"helburu-izena\" esanahi du gidagailu helburua\n\t\t(aukerazkoa)\n/device\t\tIreki berezko bideo gailua\n/open\t\tIreki agiria, ez hasi irakurketa berezgaitasunez\n/play\t\tHasi agiriaren irakurketa irakurgailua abiaraziz\n\t\tbezain laister\n/close\t\tItxi irakurgailua irakurketaren ondoren\n\t\t(bakarrik lan egiten du /irakurri erabiltzen denean)\n/shutdown\tItzali sistema eragilea irakurketaren ondoren\n/standby\t\tJarri sistema eragilea egonean irakurketaren ondoren\n/hibernate\tNeguratu sistema eragilea irakurketaren ondoren\n/logoff\t\tAmaitu saioa irakurketaren ondoren\n/lock\t\tBlokeatu langunea irakurketaren ondoren\n/monitoroff\tItzali monitorea irakurketaren ondoren\n/playnext\t\tIreki agiritegiko hurrengo agiria irakurketaren ondoren\n/fullscreen\tHasi ikusleiho-osoko moduan\n/minimized\tHasi txikien moduan\n/new\t\tErabili irakurgailuaren eskabide berri bat\n/add\t\tGehitu \"helburu-izena\" irakur-zerrendara,\n\t\tnahastu daiteke /ireki eta /irakurrirekin\n/randomize\tRandomize the playlist\n/regvid\t\tSortu agiri elkarketak bideo agirientzat\n/regaud\t\tSortu agiri elkarketak audio agirientzat\n/regpl\t\tSortu agiri elkarketak irakur-zerrendentzat\n/regall\t\tSortu agiri elkarketak sostengatutako\n\t\tagiri mota guztientzat\n/unregall\t\tKendu agiri elkarketa guztiak\n/start ms\t\tHasi irakurketa \"sm\" (= segundumilaenetan)\n/startpos hh:mm:ss\tHasi irakurketa kokapen honetan oo:mn:sg\n/fixedsize w,h\tEzarri zuzendutako leiho neurria\n/monitor N\tHasi irakurketa N monitorean,\n\t\tnon N hasten den 1-etik\n/audiorenderer N\tHasi N audio-aurkezlea erabiliz,\n\t\tnon N hasten den 1-etik (ikusi \"Irteera\" ezarpenak)\n/shaderpreset \"Pr\"\tHasi \"Pr\" itzal aurrezarpena erabiliz\n/pns \"name\"\tAdierazi erabiltzeko Pan-Scan aurrezarpen izena\n/iconsassoc\tBerrelkartu heuskarri ikurrak\n/nofocus\t\tIreki MPC-HC barrenean\n/webport N\tHasi web interfazea adierazitako atakan\n/debug\t\tErakutsi garbiketa argibideak IGE-n\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tErabili MPC-HC esklabu bezala\n/reset\t\tBerrezarri berezko ezarpenak\n/help /h /?\tErakutsi komando lerro aldaketa laguntza\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Erabilpena: mpc-hc.exe \"helburu-izena\" [aldagailuak]\n\n\"pathname\"\tGertatzeko agiri edo zuzenbide nagusia\n\t\t(ordezhizkiak ahal dira, \"-\"-k sarrera estandarra adierazten du)\n/dub \"dubname\"\tGertatu audio agiri gehigarri bat\n/dubdelay \"file\"\tGertatu audio agiri gehigarri bat XXsm aldatuta\n\t\t(baldin agiriak baditu \"...ATZERAPENA XXsM...\")\n/d3dfs\t\tHasi aurkezpena D3D ikusleiho-osoko moduan\n/sub \"subname\"\tGertatu azpidatzi agiri gehigarri bat\n/filter \"filtername\"\tGertatu DirectShow iragazkiak lotura dinamiko\n\t\tliburutegi batetik (ordezhizkiak ahal dira)\n/dvd\t\tEkin dvd moduan, \"helburu-izena\" esanahi du\n\t\tdvd agiritegia (aukerazkoa)\n/dvdpos T#C\tHasi irakurketa I izenburuan, A atalean\n/dvdpos T#hh:mm\tHasi irakurketa I izenburuan, kokapena oo:mn:sg\n/cd\t\tGertatu cd edo (s)vcd audio bide guztiak,\n\t\t\"helburu-izena\" esanahi du gidagailu helburua\n\t\t(aukerazkoa)\n/device\t\tIreki berezko bideo gailua\n/open\t\tIreki agiria, ez hasi irakurketa berezgaitasunez\n/play\t\tHasi agiriaren irakurketa irakurgailua abiaraziz\n\t\tbezain laister\n/close\t\tItxi irakurgailua irakurketaren ondoren\n\t\t(bakarrik lan egiten du /irakurri erabiltzen denean)\n/shutdown\tItzali sistema eragilea irakurketaren ondoren\n/standby\t\tJarri sistema eragilea egonean irakurketaren ondoren\n/hibernate\tNeguratu sistema eragilea irakurketaren ondoren\n/logoff\t\tAmaitu saioa irakurketaren ondoren\n/lock\t\tBlokeatu langunea irakurketaren ondoren\n/monitoroff\tItzali monitorea irakurketaren ondoren\n/playnext\t\tIreki agiritegiko hurrengo agiria irakurketaren ondoren\n/fullscreen\tHasi ikusleiho-osoko moduan\n/minimized\tHasi txikien moduan\n/new\t\tErabili irakurgailuaren eskabide berri bat\n/add\t\tGehitu \"helburu-izena\" irakur-zerrendara,\n\t\tnahastu daiteke /ireki eta /irakurrirekin\n/randomize\tRandomize the playlist\n/regvid\t\tSortu agiri elkarketak bideo agirientzat\n/regaud\t\tSortu agiri elkarketak audio agirientzat\n/regpl\t\tSortu agiri elkarketak irakur-zerrendentzat\n/regall\t\tSortu agiri elkarketak sostengatutako\n\t\tagiri mota guztientzat\n/unregall\t\tKendu agiri elkarketa guztiak\n/start ms\t\tHasi irakurketa \"sm\" (= segundumilaenetan)\n/startpos hh:mm:ss\tHasi irakurketa kokapen honetan oo:mn:sg\n/fixedsize w,h\tEzarri zuzendutako leiho neurria\n/monitor N\tHasi irakurketa N monitorean,\n\t\tnon N hasten den 1-etik\n/audiorenderer N\tHasi N audio-aurkezlea erabiliz,\n\t\tnon N hasten den 1-etik (ikusi \"Irteera\" ezarpenak)\n/shaderpreset \"Pr\"\tHasi \"Pr\" itzal aurrezarpena erabiliz\n/pns \"name\"\tAdierazi erabiltzeko Pan-Scan aurrezarpen izena\n/iconsassoc\tBerrelkartu heuskarri ikurrak\n/nofocus\t\tIreki MPC-HC barrenean\n/webport N\tHasi web interfazea adierazitako atakan\n/debug\t\tErakutsi garbiketa argibideak IGE-n\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tErabili MPC-HC esklabu bezala\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tBerrezarri berezko ezarpenak\n/help /h /?\tErakutsi komando lerro aldaketa laguntza\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3040,18 +3036,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Ikuspegi Maila"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Erabili WASAPI (Berrabiarazi irakurketa)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Mututu aurrera azkarrean"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Soinu Gailua:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "ZAldb: Eraginda"
@@ -3608,3 +3592,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Ezarpenak"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.fi.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.fi.dialogs.po
index c1059b5dc..1620ac187 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.fi.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.fi.dialogs.po
@@ -474,10 +474,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Lataa automaattisesti äänitiedostot"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Käytä sisäistä tekstitysrenderöintiä"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Valvonta"
@@ -678,9 +674,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Estä kokoruututilassa soittimen pienentäminen muulla kuin oletusnäytöllä"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Käytä Windows 7 tehtäväpalkkiominaisuuksia"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1171,8 +1167,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Tekstitykset *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1187,8 +1183,8 @@ msgid "Rotation"
msgstr "Kääntö"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Ulkoiset suotimet (kuten VSFilter) voivan näyttää tekstitykset kaikilla renderöijillä."
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1206,6 +1202,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Salli saanto vain paikallisesti"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr ""
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Tulosta virheenkorjaustiedot"
@@ -1654,6 +1654,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Oletus"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG -laatu"
@@ -1670,8 +1714,16 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr ""
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
+msgid "Optional information"
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
@@ -1686,7 +1738,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr ""
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
msgstr ""
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.fi.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.fi.strings.po
index d8830151d..355d92ff9 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.fi.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.fi.strings.po
@@ -326,11 +326,11 @@ msgid "On/Off"
msgstr "Päällä/pois"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr "Kehysnopeudesta"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr "kehysnopeuteen"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -465,6 +465,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Toisto::Varjostimet"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Resurssit"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Sekalaista"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "Median tiedot"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Toisto::Kaappaus"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Toisto::Sync -muuntimen asetukset"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Toisto::Kokonäyttö"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Audiovaihtaja"
@@ -557,30 +585,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Tekstitykset::Tietokanta"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Resurssit"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Sekalaista"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "Median tiedot"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Toisto::Kaappaus"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Toisto::Sync -muuntimen asetukset"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Toisto::Kokonäyttö"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Yksityiskohdat"
@@ -673,22 +677,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Videopinta sijoitetaan kuten tavallinen kuvaruudun ulkopuolinen pinta."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC-audiomuuntimessa on vikaa, älä käytä."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Synkronointimuunnin"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Virheen raportointi"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC kaatui äsken, mutta tässä versiossa ei ole virheenkorjaustietoja.\nJos haluat raportoida tämän virheen kannattaisi ensin kokeilla virallista versiota.\n\nHaluatko vierailla nyt lataussivulla?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Tavallinen näytön ulkopuolinen taso"
@@ -741,9 +733,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Ei mitään (pakkaamaton)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audiomuunnin"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr ""
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1393,6 +1385,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr ""
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr ""
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Avaa laite"
@@ -1677,6 +1689,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr ""
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr ""
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr ""
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr ""
@@ -1958,20 +1978,20 @@ msgid "Options"
msgstr "Vaihtoehdot"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Seuraava audio"
+msgid "Next Audio Track"
+msgstr ""
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Edellinen audio"
+msgid "Prev Audio Track"
+msgstr ""
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Seuraava tekstitys"
+msgid "Next Subtitle Track"
+msgstr ""
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Edellinen tekstitys"
+msgid "Prev Subtitle Track"
+msgstr ""
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1981,22 +2001,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Lataa tekstitykset uudelleen"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Seuraava audio (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Edellinen audio (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Seuraava tekstitys (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Edellinen tekstitys (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Seuraava kulma (DVD)"
@@ -2006,20 +2010,20 @@ msgid "Prev Angle (DVD)"
msgstr "Edellinen kulma (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Seuraava audio (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Edellinen audio (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Seuraava tekstitys (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Edellinen tekstitys (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2385,14 +2389,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Nykyinen"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC pysähtyi odottamatta. Auttaaksesi meitä korjaamaan ongelman, ole hyvä ja lähetä tiedosto \"%s\" virhehakuumme.\n\nHaluatko avata minidump-tiedoston sisältävän kansion ja käydä nyt virheen etsinnässä?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Dump-tiedoston luonti kohteeseen \"%s\" epäonnistui (virhe %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Valitse hakemisto"
@@ -2566,8 +2562,8 @@ msgid "Volume boost Max"
msgstr "Äänenvoimakkuuden vahvistus Max."
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Käyttö: mpc-hc.exe \"pathname\" [switsit]\n\n\"pathname\"\tLadattava tiedosto tai hakemisto\n\t\t(villit kortit sallittu, \"-\" tarkoittaa oletussyöttöä)\n/dub \"dubname\"\tLataa lisäaudiotiedoston\n/dubdelay \"file\"\tLataa XX ms viivästetyn lisäaudiotiedoston\n\t\t(jos tiedosto sisältää \"...DELAY XXms...\")\n/d3dfs\t\tAloittaa muunnon D3D kokoruututilassa\n/sub \"subname\"\tLataa lisätekstitystiedoston\n/filter \"filtername\"\tLataa -suotimet dynaamisesta linkkikirjastosta\n\t\t(villit kortit sallittu)\n/dvd\t\tToimii DVD-tilassa, \"pathname\" tarkoittaa\n\t\tkansiota (valinnainen)\n/dvdpos T#C\tAlkaa toiston nimikkeestä T,\n\t\tkappaleesta C\n/dvdpos T#hh:mm\tAlkaa toiston nimikkeestä T,\n\t\tsijainnista hh:mm:ss\n/cd\t\tLataa kaikki audio-CD:n tai (s)vcd:n raidat\n\t\t\"pathname\" tarkoittaa aseman polkua (valinnainen)\n/device\t\tAvaa oletusvideolaitteen\n/open\t\tAvaa tiedoston, ei aloita toistoa automaattisesti\n/play\t\tAloittaa toiston heti kun soitin on käynnistetty\n/close\t\tSulkee soittimen toiston jälkeen (toimii vain \n\t\tyhdessä /play:n kanssa)\n/shutdown\tSulkee käyttöjärjestelmän toiston jälkeen\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tKäynnistys kokonäyttö-tilassa\n/minimized\tKäynnistys minimitilassa\n/new\t\tKäyttää toista soittimen instanssia\n/add\t\tLisää \"pathname\" toistolistaan, voidaan\n\t\tkäyttää yhdessä /open ja /play kanssa\n/randomize\tRandomize the playlist\n/regvid\t\tLuo tiedostokytkennän videotietostoille \n/regaud\t\tLuo tiedostokytkennän audiotietostoille\n/regpl\t\tLuo tiedostokytkennän soittoluettelotiedostoille\n/regall\t\tLuo tiedostokytkennän kaikille tuetuille tiedostotyypeille\n/unregall\t\tPoistaa kaikki tiedostokytkennät\n/start ms\t\tAloittaa toiston kohdasta \"ms\" (= millisekuntia)\n/startpos hh:mm:ss\tAloittaa toiston kohdasta hh:mm:ss\n/fixedsize w,h\tAsettaa kiinteän ikkunakoon\n/monitor N\tKäynnistää soittimen näyttö N:llä, \n\t\tjossa N aloittaa 1:stä\n/audiorenderer N\tKäynnistää käyttäen audiomuunnin\n\t\tN:ää, jossa N alkaa 1:stä (katso \"Output\"-asetukset)\n/shaderpreset \"Pr\"\tKäynnistä käyttäen \"Pr\" varjostin-asetuksia\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tPalauttaa oletusasetukset\n/help /h /?\tNäyttää komentorivin svitsien ohjeen\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Käyttö: mpc-hc.exe \"pathname\" [switsit]\n\n\"pathname\"\tLadattava tiedosto tai hakemisto\n\t\t(villit kortit sallittu, \"-\" tarkoittaa oletussyöttöä)\n/dub \"dubname\"\tLataa lisäaudiotiedoston\n/dubdelay \"file\"\tLataa XX ms viivästetyn lisäaudiotiedoston\n\t\t(jos tiedosto sisältää \"...DELAY XXms...\")\n/d3dfs\t\tAloittaa muunnon D3D kokoruututilassa\n/sub \"subname\"\tLataa lisätekstitystiedoston\n/filter \"filtername\"\tLataa -suotimet dynaamisesta linkkikirjastosta\n\t\t(villit kortit sallittu)\n/dvd\t\tToimii DVD-tilassa, \"pathname\" tarkoittaa\n\t\tkansiota (valinnainen)\n/dvdpos T#C\tAlkaa toiston nimikkeestä T,\n\t\tkappaleesta C\n/dvdpos T#hh:mm\tAlkaa toiston nimikkeestä T,\n\t\tsijainnista hh:mm:ss\n/cd\t\tLataa kaikki audio-CD:n tai (s)vcd:n raidat\n\t\t\"pathname\" tarkoittaa aseman polkua (valinnainen)\n/device\t\tAvaa oletusvideolaitteen\n/open\t\tAvaa tiedoston, ei aloita toistoa automaattisesti\n/play\t\tAloittaa toiston heti kun soitin on käynnistetty\n/close\t\tSulkee soittimen toiston jälkeen (toimii vain \n\t\tyhdessä /play:n kanssa)\n/shutdown\tSulkee käyttöjärjestelmän toiston jälkeen\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tKäynnistys kokonäyttö-tilassa\n/minimized\tKäynnistys minimitilassa\n/new\t\tKäyttää toista soittimen instanssia\n/add\t\tLisää \"pathname\" toistolistaan, voidaan\n\t\tkäyttää yhdessä /open ja /play kanssa\n/randomize\tRandomize the playlist\n/regvid\t\tLuo tiedostokytkennän videotietostoille \n/regaud\t\tLuo tiedostokytkennän audiotietostoille\n/regpl\t\tLuo tiedostokytkennän soittoluettelotiedostoille\n/regall\t\tLuo tiedostokytkennän kaikille tuetuille tiedostotyypeille\n/unregall\t\tPoistaa kaikki tiedostokytkennät\n/start ms\t\tAloittaa toiston kohdasta \"ms\" (= millisekuntia)\n/startpos hh:mm:ss\tAloittaa toiston kohdasta hh:mm:ss\n/fixedsize w,h\tAsettaa kiinteän ikkunakoon\n/monitor N\tKäynnistää soittimen näyttö N:llä, \n\t\tjossa N aloittaa 1:stä\n/audiorenderer N\tKäynnistää käyttäen audiomuunnin\n\t\tN:ää, jossa N alkaa 1:stä (katso \"Output\"-asetukset)\n/shaderpreset \"Pr\"\tKäynnistä käyttäen \"Pr\" varjostin-asetuksia\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tPalauttaa oletusasetukset\n/help /h /?\tNäyttää komentorivin svitsien ohjeen\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3041,18 +3037,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Kuvasuhde"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Käytä WASAPIa (käynnistä toisto uudelleen)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Vaienna pikakelauksessa eteen"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Äänilaite:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: Päällä"
@@ -3609,3 +3593,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Asetukset"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.fr.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.fr.dialogs.po
index a782edc17..e975672aa 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.fr.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.fr.dialogs.po
@@ -2,14 +2,15 @@
# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
+# Jean van Kasteel <vankasteelj@gmail.com>, 2015
# Underground78, 2013-2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-18 19:16+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-20 12:17+0000\n"
"Last-Translator: Underground78\n"
-"Language-Team: French (http://www.transifex.com/projects/p/mpc-hc/language/fr/)\n"
+"Language-Team: French (http://www.transifex.com/mpc-hc/mpc-hc/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -472,10 +473,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Charger automatiquement les fichiers audio externes"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Utiliser le moteur de sous-titres intégré"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Contrôles"
@@ -676,9 +673,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Ne pas réduire MPC-HC en mode plein écran sur un moniteur secondaire"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Utilisation des fonctionnalités de la barre des tâches de Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Utiliser les fonctionnalités avancées de la barre des tâches"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1169,8 +1166,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Sous-titres *"
+msgid "Subtitles"
+msgstr "Sous-titres"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1185,8 +1182,8 @@ msgid "Rotation"
msgstr "Rotation"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Les filtres externes (VSFilter par exemple) peuvent afficher les sous-titres pour tous les moteurs de rendu."
+msgid "Subtitle Renderer"
+msgstr "Moteur de rendu des sous-titres"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1204,6 +1201,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Autoriser l'accès local uniquement"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Activer la prévisualisation"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Imprimer les informations de débogage"
@@ -1652,6 +1653,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Par défaut"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Périphérique"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Mode exclusif"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Autoriser le bitstreaming"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Options"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Activer l'intercommunication stéréo (pour casques audio)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Coupure :"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Niveau :"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Remarque"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Pour minimiser la distorsion, il est recommandé de régler le volume audio du lecteur autour de 85% lors de la lecture de contenu encodé avec perte possédant un volume sonore élevé."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "Qualité JPEG :"
@@ -1668,9 +1713,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Rapporteur de plantage"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Désolé, il semblerait que MPC-HC vienne de planter. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Envoyer un rapport de bug pour nous aider à diagnostiquer et à corriger le problème."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Désolé, il semblerait que MPC-HC vienne de planter. :(\n\nPour nous aider à diagnostiquer et à corriger le problème, un rapport de bug va être envoyé. Vous pouvez fournir des informations complémentaires si vous le souhaitez."
+msgid "Optional information"
+msgstr "Informations optionnelles"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1684,7 +1737,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Description du problème (obligatoirement en anglais) :"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Redémarrer MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Quitter MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.fr.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.fr.menus.po
index c423e5765..36b71cf82 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.fr.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.fr.menus.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
"PO-Revision-Date: 2015-05-27 17:11+0000\n"
"Last-Translator: Underground78\n"
-"Language-Team: French (http://www.transifex.com/projects/p/mpc-hc/language/fr/)\n"
+"Language-Team: French (http://www.transifex.com/mpc-hc/mpc-hc/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.fr.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.fr.strings.po
index ac1a319aa..a14ff785b 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.fr.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.fr.strings.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-27 17:11+0000\n"
-"Last-Translator: Underground78\n"
-"Language-Team: French (http://www.transifex.com/projects/p/mpc-hc/language/fr/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: French (http://www.transifex.com/mpc-hc/mpc-hc/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -325,12 +325,12 @@ msgid "On/Off"
msgstr "Activé"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "IPS d'origine"
+msgid "From (FPS)"
+msgstr "De (IPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "IPS cible"
+msgid "To (FPS)"
+msgstr "A (IPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -464,6 +464,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Lecture::Effets"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Ressources embarquées"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Divers"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Lecture::Capture"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Lecture::Paramètres Sync Renderer"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Lecture::Plein écran"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Filtres internes::Moteur de rendu audio"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Sélecteur audio"
@@ -556,30 +584,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Sous-titres::Base de données"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Ressources embarquées"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Divers"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Lecture::Capture"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Lecture::Paramètres Sync Renderer"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Lecture::Plein écran"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Détails"
@@ -672,22 +676,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "La surface vidéo sera allouée comme une surface hors-écran classique."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "Le moteur de rendu audio MPC Audio n'est pas finalisé, il n'est pas conseillé de l'utiliser."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Moteur de rendu Sync"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Signaler un bug"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC vient de planter mais cet exécutable a été compilé sans les informations de débogage.\nSi vous souhaitez signaler ce bug, vous devriez en premier lieu tester un exécutable officiel.\n\nSouhaitez-vous visiter la page de téléchargement maintenant ?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Surfaces hors-écran classiques"
@@ -740,9 +732,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Pas de rendu vidéo (formats non compressés)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "Moteur de rendu audio de MPC-HC"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Moteur de rendu audio interne"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1392,6 +1384,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "En fin de lecture : Fermer le fichier"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC a rencontré un problème pendant son initialisation. Avec votre aide nous pouvons peut-être le corriger.\n\nSouhaitez-vous signaler ce problème ?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Entrez une valeur positive si le son est en avance sur l'image, une valeur négative s'il est en retard."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "La prévisualisation est actuellement désactivée. Vous pouvez l'activer dans les options de MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Cette option peut être utilisée pour prévisualiser des fichiers multimédias à distance. Elle doit être utilisée uniquement sur un réseau privé correctement sécurisé."
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Moteur de rendu des sous-titres interne"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Ouvrir un périphérique"
@@ -1676,6 +1688,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD : Afficher le nom de fichier"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Lecture DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Lecture Blu-ray"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD : Afficher les statistiques du moteur de rendu"
@@ -1957,19 +1977,19 @@ msgid "Options"
msgstr "Options"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
+msgid "Next Audio Track"
msgstr "Piste audio suivante"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
+msgid "Prev Audio Track"
msgstr "Piste audio précédente"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
+msgid "Next Subtitle Track"
msgstr "Piste de sous-titre suivante"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
+msgid "Prev Subtitle Track"
msgstr "Piste de sous-titre précédente"
msgctxt "IDS_MPLAYERC_85"
@@ -1980,22 +2000,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Recharger les sous-titres"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Piste audio suivante (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Piste audio précédente (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Piste de sous-titre suivante (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Piste de sous-titre précédente (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Angle suivant (DVD)"
@@ -2005,19 +2009,19 @@ msgid "Prev Angle (DVD)"
msgstr "Angle précédent (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
+msgid "Next Audio Track (DVD)"
msgstr "Piste audio suivante (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
+msgid "Prev Audio Track (DVD)"
msgstr "Piste audio précédente (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
+msgid "Next Subtitle Track (DVD)"
msgstr "Piste de sous-titre suivante (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
+msgid "Prev Subtitle Track (DVD)"
msgstr "Piste de sous-titre précédente (DVD)"
msgctxt "IDS_MPLAYERC_97"
@@ -2384,14 +2388,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Actuel"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC vient de s'arrêter inopinément. Pour nous aider à corriger ce problème, veuillez envoyer le ficher \"%s\" sur notre gestionnaire de bugs.\n\nSouhaitez-vous ouvrir le dossier contenant le fichier \"minidump\" et visiter le gestionnaire de bugs ?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Impossible de créer le minidump \"%s\" (erreur %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Sélectionnez un répertoire"
@@ -2565,8 +2561,8 @@ msgid "Volume boost Max"
msgstr "Amplification du volume maximale"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Utilisation : mpc-hc.exe \"chemin du fichier\" [options]\n\n\"chemin du fichier\"\tFichier principal ou répertoire à charger (jokers\n\t\tautorisés, \"-\" désigne l'entrée standard)\n/dub \"fichier audio\"\tCharge un fichier audio supplémentaire\n/dubdelay \"fichier\"\tCharge un fichier audio avec décalage de XXms (si\n\t\tle nom contient \"...DELAY XXms...\")\n/d3dfs\t\tLance l'affichage en mode plein écran D3D (réduit le\n\t\t\"tearing\")\n/sub \"fichier ST\"\tCharge un fichier de sous-titres\n/filter \"nom\"\tCharge un filtre DirectShow à partir d'une DLL\n\t\t(jokers autorisés)\n/dvd\t\tDémarre en mode DVD (il est possible de fournir le\n\t\tnom du répertoire)\n/dvdpos T#C\tDémarre la lecture du titre T, à partir du chapitre C\n/dvdpos T#hh:mm\tDémarre la lecture du titre T, à partir de la position hh:mm:ss\n/cd\t\tCharge toutes les pistes d'un CD audio ou d'un (S)Vcd\n/device\t\tOuvre le périphérique vidéo par défaut\n/open\t\tOuvre le fichier et met MPC-HC en pause\n/play\t\tOuvre le fichier et commence la lecture\n/close\t\tQuitte automatiquement après la lecture\n/shutdown\tÉteint la machine après la lecture\n/standby\t\tMet la machine en veille après la lecture\n/hibernate\tMet la machine en veille prolongée après la lecture\n/logoff\t\tDéconnecte la session après la lecture\n/lock\t\tVerrouille la session après la lecture\n/monitoroff\tÉteint l'écran après la lecture\n/playnext\t\tOuvre le fichier suivant dans le répertoire après la lecture\n/fullscreen\tDémarre en plein écran\n/minimized\tDémarre en mode minimisé\n/new\t\tDémarre une nouvelle instance de MPC-HC\n/add\t\tAjoute un fichier à la playlist\n/randomize\tTrie aléatoirement la liste de lecture\n/regvid\t\tAssocie les formats vidéo à MPC-HC\n/regaud\t\tAssocie les formats audio à MPC-HC\n/regpl\t\tAssocie les listes de lecture à MPC-HC\n/regall\t\tAssocie tous les fichiers supportés à MPC-HC\n/unregall\t\tSupprime l'association des fichiers à MPC-HC\n/start ms\t\tDémarre la lecture à \"ms\" (millisecondes)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize L,H\tFixe la taille de la fenêtre vidéo à LxH\n/monitor N\tDémarre MPC-HC sur l'écran N (N à partir de 1)\n/audiorenderer N\tUtiliser le moteur de rendu audio N, où N commence à partir de 1\n\t\t(cf. \"Sortie audio\" dans les options)\n/shaderpreset \"Pr\"\tUtiliser la présélection d'effets vidéo \"Pr\"\n/pns \"nom\"\tSpécifie la présélection \"Pan & Scan\" à utiliser\n/iconsassoc\tRéassocie les icônes spécifiques aux formats\n/nofocus\t\tDémarre MPC-HC en arrière-plan\n/webport N\tDémarre l'interface web sur le port spécifié\n/debug\t\tAffiche des informations de débogage via l'OSD\n/nocrashreporter\tDésactive le rapporteur de plantage\n/slave \"hWnd\"\tDémarre MPC-HC en mode \"esclave\"\n/reset\t\tRestaure les paramètres par défaut\n/help /h /?\tAffiche l'aide pour les options de la ligne de commande\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Utilisation : mpc-hc.exe \"chemin du fichier\" [options]\n\n\"chemin du fichier\"\tFichier principal ou répertoire à charger (jokers\n\t\tautorisés, \"-\" désigne l'entrée standard)\n/dub \"fichier audio\"\tCharge un fichier audio supplémentaire\n/dubdelay \"fichier\"\tCharge un fichier audio avec décalage de XXms (si\n\t\tle nom contient \"...DELAY XXms...\")\n/d3dfs\t\tLance l'affichage en mode plein écran D3D (réduit le\n\t\t\"tearing\")\n/sub \"fichier ST\"\tCharge un fichier de sous-titres\n/filter \"nom\"\tCharge un filtre DirectShow à partir d'une DLL\n\t\t(jokers autorisés)\n/dvd\t\tDémarre en mode DVD (il est possible de fournir le\n\t\tnom du répertoire)\n/dvdpos T#C\tDémarre la lecture du titre T, à partir du chapitre C\n/dvdpos T#hh:mm\tDémarre la lecture du titre T, à partir de la position hh:mm:ss\n/cd\t\tCharge toutes les pistes d'un CD audio ou d'un (S)Vcd\n/device\t\tOuvre le périphérique vidéo par défaut\n/open\t\tOuvre le fichier et met MPC-HC en pause\n/play\t\tOuvre le fichier et commence la lecture\n/close\t\tQuitte automatiquement après la lecture\n/shutdown\tÉteint la machine après la lecture\n/standby\t\tMet la machine en veille après la lecture\n/hibernate\tMet la machine en veille prolongée après la lecture\n/logoff\t\tDéconnecte la session après la lecture\n/lock\t\tVerrouille la session après la lecture\n/monitoroff\tÉteint l'écran après la lecture\n/playnext\t\tOuvre le fichier suivant dans le répertoire après la lecture\n/fullscreen\tDémarre en plein écran\n/minimized\tDémarre en mode minimisé\n/new\t\tDémarre une nouvelle instance de MPC-HC\n/add\t\tAjoute un fichier à la playlist\n/randomize\tTrie aléatoirement la liste de lecture\n/regvid\t\tAssocie les formats vidéo à MPC-HC\n/regaud\t\tAssocie les formats audio à MPC-HC\n/regpl\t\tAssocie les listes de lecture à MPC-HC\n/regall\t\tAssocie tous les fichiers supportés à MPC-HC\n/unregall\t\tSupprime l'association des fichiers à MPC-HC\n/start ms\t\tDémarre la lecture à \"ms\" (millisecondes)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize L,H\tFixe la taille de la fenêtre vidéo à LxH\n/monitor N\tDémarre MPC-HC sur l'écran N (N à partir de 1)\n/audiorenderer N\tUtiliser le moteur de rendu audio N, où N commence à partir de 1\n\t\t(cf. \"Sortie audio\" dans les options)\n/shaderpreset \"Pr\"\tUtiliser la présélection d'effets vidéo \"Pr\"\n/pns \"nom\"\tSpécifie la présélection \"Pan & Scan\" à utiliser\n/iconsassoc\tRéassocie les icônes spécifiques aux formats\n/nofocus\t\tDémarre MPC-HC en arrière-plan\n/webport N\tDémarre l'interface web sur le port spécifié\n/debug\t\tAffiche des informations de débogage via l'OSD\n/nocrashreporter\tDésactive le rapporteur de plantage\n/slave \"hWnd\"\tDémarre MPC-HC en mode \"esclave\"\n/hwgpu \"N\"\tFixe le numéro du GPU utilisé pour le décodage matériel\n\t\tDisponible uniquement pour CUVID et DXVA2 (copy-back)\n/reset\t\tRestaure les paramètres par défaut\n/help /h /?\tAffiche l'aide pour les options de la ligne de commande\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3040,18 +3036,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Ratio d'aspect"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Utiliser WASAPI (nécessite de relancer la lecture)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Couper le son lors des avances rapides"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Périphérique audio :"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "Synchronisation verticale : Activée"
@@ -3608,3 +3592,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Paramètres"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.gl.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.gl.dialogs.po
index 1403a21e8..96d168f78 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.gl.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.gl.dialogs.po
@@ -3,14 +3,14 @@
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Rubén <feiticeiro2010@hotmail.es>, 2014-2015
-# Toño Calo <enfeitizador@gmail.com>, 2014
+# Toño Calo <enfeitizador@gmail.com>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-27 14:16+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-11-02 14:17+0000\n"
"Last-Translator: Rubén <feiticeiro2010@hotmail.es>\n"
-"Language-Team: Galician (http://www.transifex.com/projects/p/mpc-hc/language/gl/)\n"
+"Language-Team: Galician (http://www.transifex.com/mpc-hc/mpc-hc/language/gl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -47,19 +47,19 @@ msgstr "Saída"
msgctxt "IDD_CAPTURE_DLG_IDC_CHECK1"
msgid "Record Video"
-msgstr "Gravar Vídeo"
+msgstr "Gravar vídeo"
msgctxt "IDD_CAPTURE_DLG_IDC_CHECK2"
msgid "Preview"
-msgstr "Vista Previa"
+msgstr "Vista previa"
msgctxt "IDD_CAPTURE_DLG_IDC_CHECK3"
msgid "Record Audio"
-msgstr "Gravar Audio"
+msgstr "Gravar audio"
msgctxt "IDD_CAPTURE_DLG_IDC_CHECK4"
msgid "Preview"
-msgstr "Vista Previa"
+msgstr "Vista previa"
msgctxt "IDD_CAPTURE_DLG_IDC_STATIC"
msgid "V/A Buffers:"
@@ -187,7 +187,7 @@ msgstr "Engadir á lista de reprodución sen abrir"
msgctxt "IDD_ABOUTBOX_CAPTION"
msgid "About"
-msgstr "Acerca De"
+msgstr "Acerca de"
msgctxt "IDD_ABOUTBOX_IDC_AUTHORS_LINK"
msgid "Copyright © 2002-2015 see Authors.txt"
@@ -199,7 +199,7 @@ msgstr "Este programa é de balde e foi lanzado baixo a Licenza Publica Xeral GN
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "English translation made by MPC-HC Team"
-msgstr "Traducido ao Galego por anxo_cruel"
+msgstr "Tradución ao galego: anxo_cruel, enfeitizador"
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "Build information"
@@ -473,10 +473,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Auto-carga de audio"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Usar o procesador de subtítulos incorporado"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Control"
@@ -603,7 +599,7 @@ msgstr "Establecer como programa pre&definido"
msgctxt "IDD_PPAGEFORMATS_IDC_STATIC"
msgid "Real-Time Streaming Protocol handler (for rtsp://... URLs)"
-msgstr "Xestor do Protocolo de Transmisións en Tempo Real (para rtsp://... URLs)"
+msgstr "Xestor do protocolo de Transmisións en tempo real (para rtsp://... URLs)"
msgctxt "IDD_PPAGEFORMATS_IDC_RADIO1"
msgid "RealMedia"
@@ -677,9 +673,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Previr MINIMIZAR en pantalla completa ao utilizar un monitor diferente ao por defecto"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Utilizar características da barra de tarefas de Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Usar características melloradas da barra de tarefas"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -787,7 +783,7 @@ msgstr "Ubicación:"
msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
msgid "Description:"
-msgstr "Descripción:"
+msgstr "Descrición:"
msgctxt "IDD_FAVADD_CAPTION"
msgid "Add Favorite"
@@ -1147,7 +1143,7 @@ msgstr "Reinicializar ao cambiar pantalla"
msgctxt "IDD_PPAGEOUTPUT_IDC_FULLSCREEN_MONITOR_CHECK"
msgid "D3D Fullscreen"
-msgstr "D3D en Pantalla completa"
+msgstr "D3D en pantalla completa"
msgctxt "IDD_PPAGEOUTPUT_IDC_DSVMR9ALTERNATIVEVSYNC"
msgid "Alternative VSync"
@@ -1170,8 +1166,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Subtítulos *"
+msgid "Subtitles"
+msgstr "Subtítulos"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1186,8 +1182,8 @@ msgid "Rotation"
msgstr "Rotación"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Filtros externos (Como o VSFilter) poden amosar subtítulos en todos os renderizadores"
+msgid "Subtitle Renderer"
+msgstr "Renderizador de subtítulos"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1205,6 +1201,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Permitir o acceso soamente dende o host local"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Habilitar previsualización"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Imprimir información de depuración"
@@ -1243,7 +1243,7 @@ msgstr "Substitue os subtítulos cargados actualmente"
msgctxt "IDD_FILEPROPRES_IDC_BUTTON1"
msgid "Save As..."
-msgstr "Gardar Como..."
+msgstr "Gardar como..."
msgctxt "IDD_PPAGEMISC_IDC_STATIC"
msgid "Color controls (for VMR-9, EVR and madVR)"
@@ -1475,7 +1475,7 @@ msgstr "Saír da pantalla completa ao rematar"
msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC"
msgid "Fullscreen monitor"
-msgstr "Monitor da Pantalla Completa"
+msgstr "Monitor da pantalla completa"
msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK2"
msgid "Use autochange fullscreen monitor mode"
@@ -1653,6 +1653,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Predefinido"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Dispositivo"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Modo exclusivo"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Permitir fluxo de bits"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Opcións"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Habilitar mestura das canles estereo (para auriculares)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Corte"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Nivel:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Nota"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Para minimizar a distorsión do son, recomendase manter o volume do reprodutor en torno ao 85 % ao reproducir contido ruidoso codificado con perdas."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "Calidade de JPEG:"
@@ -1669,9 +1713,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Informe de fallo"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Sentimolo, semella que MPC-HC acaba de caer :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Envíe un informe do erro para axudarnos a diagnosticar e reparar o problema"
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Sentimolo, semella que MPC-HC acaba de caer. :(\n\nPara axudarnos a diagnosticar e reparar o problema, enviarase un informe de fallo. Pode proporcionar información adicional se quere."
+msgid "Optional information"
+msgstr "Información opcional"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1685,7 +1737,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Descrición do problema (usa só o inglés):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "De acordo"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Reiniciar MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Saír de MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.gl.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.gl.menus.po
index 0375c619b..496bdf39c 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.gl.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.gl.menus.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
-"PO-Revision-Date: 2015-05-27 14:15+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-06-17 05:54+0000\n"
"Last-Translator: Rubén <feiticeiro2010@hotmail.es>\n"
-"Language-Team: Galician (http://www.transifex.com/projects/p/mpc-hc/language/gl/)\n"
+"Language-Team: Galician (http://www.transifex.com/mpc-hc/mpc-hc/language/gl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -23,7 +23,7 @@ msgstr "&Ficheiro"
msgctxt "ID_FILE_OPENQUICK"
msgid "&Quick Open File..."
-msgstr "Abrir Ficheiro &Rápido"
+msgstr "Abrir ficheiro &rápido"
msgctxt "ID_FILE_OPENMEDIA"
msgid "&Open File..."
@@ -39,7 +39,7 @@ msgstr "Abrir dispositi&vo..."
msgctxt "ID_FILE_OPENDIRECTORY"
msgid "Open Dir&ectory..."
-msgstr "Abrir Dir&ectorio..."
+msgstr "Abrir dir&ectorio..."
msgctxt "ID_FILE_OPENDISC"
msgid "O&pen Disc"
@@ -55,7 +55,7 @@ msgstr "Pe&char"
msgctxt "ID_FILE_SAVE_COPY"
msgid "&Save a Copy..."
-msgstr "&Gardar unha Copia..."
+msgstr "&Gardar unha copia..."
msgctxt "ID_FILE_SAVE_IMAGE"
msgid "Save &Image..."
@@ -71,7 +71,7 @@ msgstr "Cargar subtítu&lo..."
msgctxt "ID_FILE_SAVE_SUBTITLE"
msgid "Save S&ubtitle..."
-msgstr "Gardar s&ubtitulo..."
+msgstr "Gardar s&ubtítulo..."
msgctxt "POPUP"
msgid "Subtitle Data&base"
@@ -103,11 +103,11 @@ msgstr "&Ver"
msgctxt "ID_VIEW_CAPTIONMENU"
msgid "Caption&&Menu"
-msgstr "Letras &e Menú"
+msgstr "Letras &e menú"
msgctxt "ID_VIEW_SEEKER"
msgid "See&k Bar"
-msgstr "Barra de &Progreso"
+msgstr "Barra de &progreso"
msgctxt "ID_VIEW_CONTROLS"
msgid "&Controls"
@@ -131,7 +131,7 @@ msgstr "&Resincronización dos subtítulos"
msgctxt "ID_VIEW_PLAYLIST"
msgid "Pla&ylist"
-msgstr "&Lista de Reprodución"
+msgstr "&Lista de reprodución"
msgctxt "ID_VIEW_CAPTURE"
msgid "Captu&re"
@@ -163,7 +163,7 @@ msgstr "&Normal"
msgctxt "ID_VIEW_FULLSCREEN"
msgid "F&ull Screen"
-msgstr "P&antalla Completa"
+msgstr "P&antalla completa"
msgctxt "POPUP"
msgid "&Zoom"
@@ -195,7 +195,7 @@ msgstr "Axustes de proc&esador"
msgctxt "ID_VIEW_TEARING_TEST"
msgid "&Tearing Test"
-msgstr "Proba de &Parpadeo"
+msgstr "Proba de &parpadeo"
msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
msgid "&Display Statistics"
@@ -259,7 +259,7 @@ msgstr "Activar Corrección de Tempos en Cadros"
msgctxt "POPUP"
msgid "&Color Management"
-msgstr "&Xestión de Cores"
+msgstr "&Xestión de cores"
msgctxt "ID_VIEW_CM_ENABLE"
msgid "&Enable"
@@ -323,11 +323,11 @@ msgstr "&Colorimétrico Absoluto"
msgctxt "POPUP"
msgid "&VSync"
-msgstr "&VSync (Sincronia Vertical)"
+msgstr "&VSync (Sincronia vertical)"
msgctxt "ID_VIEW_VSYNC"
msgid "&VSync"
-msgstr "&VSync (Sincronia Vertical)"
+msgstr "&VSync (Sincronia vertical) "
msgctxt "ID_VIEW_VSYNCACCURATE"
msgid "&Accurate VSync"
@@ -359,7 +359,7 @@ msgstr "&Baleirar GPU despois da presente"
msgctxt "ID_VIEW_FLUSHGPU_WAIT"
msgid "&Wait for flushes"
-msgstr "&Agardar por Baleirados"
+msgstr "&Agardar por baleirados"
msgctxt "POPUP"
msgid "R&eset"
@@ -375,27 +375,27 @@ msgstr "Reinicializar axustes opti&mos do renderizador"
msgctxt "POPUP"
msgid "Video &Frame"
-msgstr "&Cadro de Video"
+msgstr "&Cadro de vídeo"
msgctxt "ID_VIEW_VF_HALF"
msgid "&Half Size"
-msgstr "A &Metade do Tamaño"
+msgstr "A &metade do tamaño"
msgctxt "ID_VIEW_VF_NORMAL"
msgid "&Normal Size"
-msgstr "O Tamaño &Orixinal"
+msgstr "O Tamaño &orixinal"
msgctxt "ID_VIEW_VF_DOUBLE"
msgid "&Double Size"
-msgstr "O &Dobre do Tamaño"
+msgstr "O &dobre do tamaño"
msgctxt "ID_VIEW_VF_STRETCH"
msgid "&Stretch To Window"
-msgstr "&Axustar á Xanela"
+msgstr "&Axustar á xanela"
msgctxt "ID_VIEW_VF_FROMINSIDE"
msgid "Touch Window From &Inside"
-msgstr "Tocar Xanela dende A&fora"
+msgstr "Tocar xanela dende a&fora"
msgctxt "ID_VIEW_VF_ZOOM1"
msgid "Zoom &1"
@@ -407,15 +407,15 @@ msgstr "Zoom &2"
msgctxt "ID_VIEW_VF_FROMOUTSIDE"
msgid "Touch Window From &Outside"
-msgstr "Tocar Xanela dende Ad&entro"
+msgstr "Tocar xanela dende ad&entro"
msgctxt "ID_VIEW_VF_KEEPASPECTRATIO"
msgid "&Keep Aspect Ratio"
-msgstr "Ma&nter Relación de Aspecto"
+msgstr "Ma&nter relación de aspecto"
msgctxt "POPUP"
msgid "Override &Aspect Ratio"
-msgstr "Forzar Relación de Aspecto Especifica"
+msgstr "Forzar relación de aspecto especifica"
msgctxt "ID_ASPECTRATIO_SOURCE"
msgid "&Default"
@@ -443,7 +443,7 @@ msgstr "1&85:100"
msgctxt "ID_VIEW_VF_COMPMONDESKARDIFF"
msgid "&Correct Monitor/Desktop AR Diff"
-msgstr "&Corrixir Diferenza de RP Entre Monitor/Escritorio"
+msgstr "&Corrixir diferenza de RP entre monitor/escritorio"
msgctxt "POPUP"
msgid "Pa&n&&Scan"
@@ -459,27 +459,27 @@ msgstr "&Diminuír tamaño"
msgctxt "ID_VIEW_INCWIDTH"
msgid "I&ncrease Width"
-msgstr "I&ncrementar Ancho"
+msgstr "I&ncrementar ancho"
msgctxt "ID_VIEW_DECWIDTH"
msgid "D&ecrease Width"
-msgstr "D&isminuir Ancho"
+msgstr "D&isminuir ancho"
msgctxt "ID_VIEW_INCHEIGHT"
msgid "In&crease Height"
-msgstr "In&crementar Altura"
+msgstr "In&crementar altura"
msgctxt "ID_VIEW_DECHEIGHT"
msgid "Decre&ase Height"
-msgstr "Dismi&nuir Altura"
+msgstr "Dismi&nuir altura"
msgctxt "ID_PANSCAN_MOVERIGHT"
msgid "Move &Right"
-msgstr "Mover á &Dereita"
+msgstr "Mover á &dereita"
msgctxt "ID_PANSCAN_MOVELEFT"
msgid "Move &Left"
-msgstr "Mover á &Esquerda"
+msgstr "Mover á &esquerda"
msgctxt "ID_PANSCAN_MOVEUP"
msgid "Move &Up"
@@ -499,7 +499,7 @@ msgstr "Re&iniciar"
msgctxt "POPUP"
msgid "On &Top"
-msgstr "Sempre &Visible"
+msgstr "Sempre &visible"
msgctxt "ID_ONTOP_DEFAULT"
msgid "&Default"
@@ -511,11 +511,11 @@ msgstr "&Activado"
msgctxt "ID_ONTOP_WHILEPLAYING"
msgid "While &Playing"
-msgstr "Activado ao &Reproducir"
+msgstr "Activado ao &reproducir"
msgctxt "ID_ONTOP_WHILEPLAYINGVIDEO"
msgid "While Playing &Video"
-msgstr "Durante a reprodución do &Vídeo"
+msgstr "Durante a reprodución do &vídeo"
msgctxt "ID_VIEW_OPTIONS"
msgid "&Options..."
@@ -535,7 +535,7 @@ msgstr "&Deter"
msgctxt "ID_PLAY_FRAMESTEP"
msgid "F&rame Step"
-msgstr "Avanzar un &Cadro"
+msgstr "Avanzar un &cadro"
msgctxt "ID_PLAY_DECRATE"
msgid "&Decrease Rate"
@@ -587,7 +587,7 @@ msgstr "&Silencio"
msgctxt "POPUP"
msgid "Af&ter Playback"
-msgstr "De&spois da Reprodución"
+msgstr "De&spois da reprodución"
msgctxt "ID_AFTERPLAYBACK_DONOTHING"
msgid "Do no&thing"
@@ -619,7 +619,7 @@ msgstr "&Apagar"
msgctxt "ID_AFTERPLAYBACK_LOGOFF"
msgid "Log &Off"
-msgstr "Pechar &Sesión"
+msgstr "Pechar &sesión"
msgctxt "ID_AFTERPLAYBACK_LOCK"
msgid "&Lock"
@@ -643,27 +643,27 @@ msgstr "&Ir a..."
msgctxt "ID_NAVIGATE_TITLEMENU"
msgid "&Title Menu"
-msgstr "Menú do &Titulo"
+msgstr "Menú do &título"
msgctxt "ID_NAVIGATE_ROOTMENU"
msgid "&Root Menu"
-msgstr "Menú &Raíz"
+msgstr "Menú &raíz"
msgctxt "ID_NAVIGATE_SUBPICTUREMENU"
msgid "&Subtitle Menu"
-msgstr "Menú dos &Subtítulos"
+msgstr "Menú dos &subtítulos"
msgctxt "ID_NAVIGATE_AUDIOMENU"
msgid "&Audio Menu"
-msgstr "Menú do &Audio"
+msgstr "Menú do &audio"
msgctxt "ID_NAVIGATE_ANGLEMENU"
msgid "An&gle Menu"
-msgstr "Menú de Ãn&gulos"
+msgstr "Menú de án&gulos"
msgctxt "ID_NAVIGATE_CHAPTERMENU"
msgid "&Chapter Menu"
-msgstr "Menú de &Capítulos"
+msgstr "Menú de &capítulos"
msgctxt "ID_FAVORITES"
msgid "F&avorites"
@@ -683,7 +683,7 @@ msgstr "Verificar &actualizacións"
msgctxt "ID_HELP_SHOWCOMMANDLINESWITCHES"
msgid "&Command Line Switches"
-msgstr "Opcións da L&iña de Comando"
+msgstr "Opcións da l&iña de comando"
msgctxt "ID_HELP_TOOLBARIMAGES"
msgid "Download &Toolbar Images"
@@ -695,5 +695,5 @@ msgstr "D&oazón"
msgctxt "ID_HELP_ABOUT"
msgid "&About..."
-msgstr "&Acerca De..."
+msgstr "&Acerca de..."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.gl.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.gl.strings.po
index 412841cb9..abf1b2b96 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.gl.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.gl.strings.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-27 14:16+0000\n"
-"Last-Translator: Rubén <feiticeiro2010@hotmail.es>\n"
-"Language-Team: Galician (http://www.transifex.com/projects/p/mpc-hc/language/gl/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Galician (http://www.transifex.com/mpc-hc/mpc-hc/language/gl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -195,11 +195,11 @@ msgstr "Configuracións de captura"
msgctxt "IDS_NAVIGATION_BAR"
msgid "Navigation Bar"
-msgstr "Barra de Navegación"
+msgstr "Barra de navegación"
msgctxt "IDS_SUBRESYNC_CAPTION"
msgid "Subresync"
-msgstr "Resincronizar Subtítulos"
+msgstr "Resincronizar subtítulos"
msgctxt "IDS_SUBRESYNC_CLN_TIME"
msgid "Time"
@@ -326,12 +326,12 @@ msgid "On/Off"
msgstr "Encendido/Apagado"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "De FPS"
+msgid "From (FPS)"
+msgstr "De (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "A FPS"
+msgid "To (FPS)"
+msgstr "A (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -383,7 +383,7 @@ msgstr "&Copiar ao portapapeis"
msgctxt "IDS_PLAYLIST_SAVEAS"
msgid "&Save As..."
-msgstr "&Gardar Como..."
+msgstr "&Gardar como..."
msgctxt "IDS_PLAYLIST_SORTBYLABEL"
msgid "Sort by &label"
@@ -465,6 +465,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Reprodución::Sombras"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Recursos"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Misceláneos"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Reprodución::Captura"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Reprodución::Axustes do renderizador de sincronización"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Reprodución::Pantalla completa"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Filtros internos::Renderizador de audio"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Cambia Audio"
@@ -557,30 +585,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Subtítulos::Base de Datos"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Recursos"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Misceláneos"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Reprodución::Captura"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Reprodución::Axustes do Renderizador de Sincronización"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Reprodución::Pantalla completa"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Detalles"
@@ -673,22 +677,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "A superficie do vídeo será distribuida como unha superficie regular fora da pantalla."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "O renderizador de audio MPC está roto, non o utilices."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Renderizador de sincronización"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Reportando erro"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC acaba de fallar , pero esta versión foi compilada sen información de depuración.\nSe desexas reportar o erro, deberías primeiro probar cunha compilación oficial.\n\nDesexas visitar a páxina de descargas agora?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Superficie fora de pantallas convencionais"
@@ -741,9 +733,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Nulo (sen compresión)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "Renderizador de audio MPC-HC"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Renderizador interno de audio"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -979,7 +971,7 @@ msgstr "EDL Novo Clip"
msgctxt "IDS_RECENT_FILES_CLEAR"
msgid "&Clear list"
-msgstr "&Lista Borrada"
+msgstr "&Lista borrada"
msgctxt "IDS_RECENT_FILES_QUESTION"
msgid "Are you sure that you want to delete recent files list?"
@@ -991,7 +983,7 @@ msgstr "Gardado de EDL"
msgctxt "IDS_AG_ENABLEFRAMETIMECORRECTION"
msgid "Enable Frame Time Correction"
-msgstr "Activar Correción de Tempos en Cadros"
+msgstr "Activar correción de tempos en cadros"
msgctxt "IDS_AG_TOGGLE_EDITLISTEDITOR"
msgid "Toggle EDL window"
@@ -1043,7 +1035,7 @@ msgstr "Zoom a Ultra-Widescreen,%.3f,%.3f,%.3f,%.3f"
msgctxt "IDS_PLAYLIST_HIDEFS"
msgid "Hide on Fullscreen"
-msgstr "Agochar en Pantalla Completa"
+msgstr "Agochar en pantalla completa"
msgctxt "IDS_CONTROLS_STOPPED"
msgid "Stopped"
@@ -1103,7 +1095,7 @@ msgstr "Clasificación"
msgctxt "IDS_INFOBAR_DESCRIPTION"
msgid "Description"
-msgstr "Descripción"
+msgstr "Descrición"
msgctxt "IDS_INFOBAR_DOMAIN"
msgid "Domain"
@@ -1393,13 +1385,33 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Tras a reprodución: Pechar"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "Produciuse un problema ao inicializar MPC-HC. Coa súa axuda é posible que poidamos corrixir o problema.\n\nQuere informarnos do erro?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Proporcione un valor positivo se o audio vai adiantado ou un negativo se vai atrasado."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "A previsualización actualmente está deshabilitada. Pode habilitala nas opcións de MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Esta opción pode usarse para previsualizar ficheiros audiovisuais dende unha ubicación remota. Úseo só sobre unha rede privada adecuadamente asegurada.\n\nDe verdade quere habilitar esta opción?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Renderizador interno de subtítulos"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
-msgstr "Abrir Dispositivo"
+msgstr "Abrir dispositivo"
msgctxt "IDS_AG_SAVE_AS"
msgid "Save As"
-msgstr "Gardar Como"
+msgstr "Gardar como"
msgctxt "IDS_AG_SAVE_IMAGE"
msgid "Save Image"
@@ -1407,7 +1419,7 @@ msgstr "Gardar Imaxe"
msgctxt "IDS_MPLAYERC_6"
msgid "Save Image (auto)"
-msgstr "Gardar Imaxe (Automático)"
+msgstr "Gardar Imaxe (automático)"
msgctxt "IDS_OSD_IMAGE_SAVED"
msgid "Image saved successfully"
@@ -1419,7 +1431,7 @@ msgstr "Cargar Subtítulo"
msgctxt "IDS_AG_SAVE_SUBTITLE"
msgid "Save Subtitle"
-msgstr "Gardar Subtítulo"
+msgstr "Gardar subtítulo"
msgctxt "IDS_AG_PROPERTIES"
msgid "Properties"
@@ -1651,7 +1663,7 @@ msgstr "Ficheiro Anterior"
msgctxt "IDS_MPLAYERC_99"
msgid "Toggle Direct3D fullscreen"
-msgstr "Interruptor de Direct3D en Pantalla Completa"
+msgstr "Interruptor de Direct3D en pantalla completa"
msgctxt "IDS_MPLAYERC_100"
msgid "Goto Prev Subtitle"
@@ -1663,11 +1675,11 @@ msgstr "Ir a Sub Seguinte"
msgctxt "IDS_MPLAYERC_102"
msgid "Shift Subtitle Left"
-msgstr "Mover Sub á Esquerda"
+msgstr "Mover sub á esquerda"
msgctxt "IDS_MPLAYERC_103"
msgid "Shift Subtitle Right"
-msgstr "Mover Sub á Dereita"
+msgstr "Mover sub á dereita"
msgctxt "IDS_AG_SEEKSET"
msgid "Jump to Beginning"
@@ -1677,6 +1689,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "Sobreimpresión: Amosar nome do ficheiro"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Reproducir DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Reproducir BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "Sobreimpresión: Amosar estadísticas do renderizador"
@@ -1699,7 +1719,7 @@ msgstr "Cadro soamente"
msgctxt "IDS_VIEW_CAPTIONMENU"
msgid "Sho&w Caption&&Menu"
-msgstr "Amosar Menú &&Subtítulos"
+msgstr "Amosar menú &&subtítulos"
msgctxt "IDS_VIEW_HIDEMENU"
msgid "Hide &Menu"
@@ -1731,7 +1751,7 @@ msgstr "Pantalla completa (sen cambio de resolución)"
msgctxt "IDS_AG_ZOOM_AUTO_FIT"
msgid "Zoom Auto Fit"
-msgstr "Zoom Auto Axustar"
+msgstr "Zoom Auto axustar"
msgctxt "IDS_AG_VIDFRM_HALF"
msgid "VidFrm Half"
@@ -1747,7 +1767,7 @@ msgstr "VidFrm Dobre"
msgctxt "IDS_AG_ALWAYS_ON_TOP"
msgid "Always On Top"
-msgstr "Sempre Visible"
+msgstr "Sempre visible"
msgctxt "IDS_AG_PNS_INC_SIZE"
msgid "PnS Inc Size"
@@ -1755,11 +1775,11 @@ msgstr "PnS Inc Tamaño"
msgctxt "IDS_AG_PNS_INC_WIDTH"
msgid "PnS Inc Width"
-msgstr "PnS Inc Ancho"
+msgstr "PnS Inc ancho"
msgctxt "IDS_MPLAYERC_47"
msgid "PnS Inc Height"
-msgstr "PnS Inc Altura"
+msgstr "PnS Inc altura"
msgctxt "IDS_AG_PNS_DEC_SIZE"
msgid "PnS Dec Size"
@@ -1767,11 +1787,11 @@ msgstr "PnS Dec Tamaño"
msgctxt "IDS_AG_PNS_DEC_WIDTH"
msgid "PnS Dec Width"
-msgstr "PnS Dec Ancho"
+msgstr "PnS Dis ancho"
msgctxt "IDS_MPLAYERC_50"
msgid "PnS Dec Height"
-msgstr "PnS Inc Altura"
+msgstr "PnS Dis altura"
msgctxt "IDS_SUBDL_DLG_DOWNLOADING"
msgid "Downloading subtitle(s), please wait."
@@ -1863,7 +1883,7 @@ msgstr "PnS Arriba/Esquerda"
msgctxt "IDS_AG_PNS_UPRIGHT"
msgid "PnS Up/Right"
-msgstr "PnS Up/Dereita"
+msgstr "PnS Arriba/Dereita"
msgctxt "IDS_AG_PNS_DOWNLEFT"
msgid "PnS Down/Left"
@@ -1887,55 +1907,55 @@ msgstr "Silenciar"
msgctxt "IDS_MPLAYERC_63"
msgid "DVD Title Menu"
-msgstr "Menú de Titulos do DVD"
+msgstr "Menú de títulos do DVD"
msgctxt "IDS_AG_DVD_ROOT_MENU"
msgid "DVD Root Menu"
-msgstr "Menú Raíz do DVD"
+msgstr "Menú raíz do DVD"
msgctxt "IDS_MPLAYERC_65"
msgid "DVD Subtitle Menu"
-msgstr "Menú de Subtítulos do DVD"
+msgstr "Menú de subtítulos do DVD"
msgctxt "IDS_MPLAYERC_66"
msgid "DVD Audio Menu"
-msgstr "Menú de Audio do DVD"
+msgstr "Menú de audio do DVD"
msgctxt "IDS_MPLAYERC_67"
msgid "DVD Angle Menu"
-msgstr "Menú de Ãngulo do DVD"
+msgstr "Menú de ángulo do DVD"
msgctxt "IDS_MPLAYERC_68"
msgid "DVD Chapter Menu"
-msgstr "Menú de Capítulos do DVD"
+msgstr "Menú de capítulos do DVD"
msgctxt "IDS_AG_DVD_MENU_LEFT"
msgid "DVD Menu Left"
-msgstr "DVD Menú Esquerda"
+msgstr "DVD Menú esquerda"
msgctxt "IDS_MPLAYERC_70"
msgid "DVD Menu Right"
-msgstr "DVD Menú Dereita"
+msgstr "DVD Menú dereita"
msgctxt "IDS_AG_DVD_MENU_UP"
msgid "DVD Menu Up"
-msgstr "DVD Menú Arriba"
+msgstr "DVD Menú arriba"
msgctxt "IDS_AG_DVD_MENU_DOWN"
msgid "DVD Menu Down"
-msgstr "DVD Menú Abaixo"
+msgstr "DVD Menú abaixo"
msgctxt "IDS_MPLAYERC_73"
msgid "DVD Menu Activate"
-msgstr "DVD Menú Activar"
+msgstr "DVD Menú activar"
msgctxt "IDS_AG_DVD_MENU_BACK"
msgid "DVD Menu Back"
-msgstr "DVD Menú Voltar"
+msgstr "DVD Menú voltar"
msgctxt "IDS_MPLAYERC_75"
msgid "DVD Menu Leave"
-msgstr "DVD Menú Deixar"
+msgstr "DVD Menú deixar"
msgctxt "IDS_AG_BOSS_KEY"
msgid "Boss key"
@@ -1951,27 +1971,27 @@ msgstr "Menú do reprodutor (completo)"
msgctxt "IDS_AG_FILTERS_MENU"
msgid "Filters Menu"
-msgstr "Menú de Filtros"
+msgstr "Menú de filtros"
msgctxt "IDS_AG_OPTIONS"
msgid "Options"
msgstr "Opcións"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Audio Seguinte"
+msgid "Next Audio Track"
+msgstr "Pista de audio seguinte"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Audio Previo"
+msgid "Prev Audio Track"
+msgstr "Pista de audio anterior"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Subtítulo Seguinte"
+msgid "Next Subtitle Track"
+msgstr "Pista de subtítulos seguinte"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Subtítulo Previo"
+msgid "Prev Subtitle Track"
+msgstr "Pista de subtítulos anterior"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1981,22 +2001,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Recargar Subtítulos"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Audio Seguinte (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Audio Previo (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Subtítulo Seguinte (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Subtítulo Previo (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Ãngulo seguinte (DVD)"
@@ -2006,20 +2010,20 @@ msgid "Prev Angle (DVD)"
msgstr "Ãngulo previo (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Audio Seguinte (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Pista de audio seguinte (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Audio Previo (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Pista de audio anterior (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Subtítulo Seguinte (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Pista de subtítulos seguinte (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Subtítulo Previo (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "Pista de subtítulos anterior (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2175,11 +2179,11 @@ msgstr "DVD: Fallo por Macrovision"
msgctxt "IDS_MAINFRM_22"
msgid "DVD: Incompatible System And Decoder Regions"
-msgstr "DVD: Sistema e Decodificador de Rexións Incompatibles"
+msgstr "DVD: Sistema e decodificador de rexións incompatibles"
msgctxt "IDS_MAINFRM_23"
msgid "DVD: Incompatible Disc And Decoder Regions"
-msgstr "DVD: Disco e Decodificador de Rexións Incompatibles"
+msgstr "DVD: Disco e decodificador de rexións incompatibles"
msgctxt "IDS_D3DFS_WARNING"
msgid "This option is designed to avoid tearing. However, it will also prevent MPC-HC from displaying the context menu and any dialog box during playback.\n\nDo you really want to activate this option?"
@@ -2219,7 +2223,7 @@ msgstr "Versión do protocolo non compatible, actualiza o teu reprodutor ou esco
msgctxt "IDS_AG_ASPECT_RATIO"
msgid "Aspect Ratio"
-msgstr "Relación de Aspecto"
+msgstr "Relación de aspecto"
msgctxt "IDS_MAINFRM_37"
msgid ", Total: %ld, Dropped: %ld"
@@ -2319,11 +2323,11 @@ msgstr "Ficheiros de subtìtulos"
msgctxt "IDS_MAINFRM_68"
msgid "Aspect Ratio: %ld:%ld"
-msgstr "Relación de Aspecto: %ld:%ld"
+msgstr "Relación de aspecto: %ld:%ld"
msgctxt "IDS_MAINFRM_69"
msgid "Aspect Ratio: Default"
-msgstr "Relación de Aspecto: Orixinal"
+msgstr "Relación de aspecto: Orixinal"
msgctxt "IDS_MAINFRM_70"
msgid "Audio delay: %I64d ms"
@@ -2385,14 +2389,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Actual"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC rematou inesperadamente. Para axudarnos a arranxar o problema, por favor, envía este ficheiro \"%s\" ao noso rastrexador de fallos.\n\nDesexas abrir o cartafol que conten o ficheiro e visitar o rastrexador de fallos agora?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Fallou a creación do ficheiro de volcado a \"%s\" (erro %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Seleccione Directorio"
@@ -2407,7 +2403,7 @@ msgstr "Pausa"
msgctxt "IDS_AG_TOGGLE_CAPTION"
msgid "Toggle Caption&Menu"
-msgstr "Amosar Menú de &Captura"
+msgstr "Amosar menú de &captura"
msgctxt "IDS_AG_TOGGLE_SEEKER"
msgid "Toggle Seek Bar"
@@ -2499,7 +2495,7 @@ msgstr " propiedades (do pin)..."
msgctxt "IDS_AG_UNKNOWN_STREAM"
msgid "Unknown Stream"
-msgstr "Pista Descoñecida"
+msgstr "Pista descoñecida"
msgctxt "IDS_AG_UNKNOWN"
msgid "Unknown %u"
@@ -2507,15 +2503,15 @@ msgstr "%u Descoñecida"
msgctxt "IDS_AG_VSYNC"
msgid "VSync"
-msgstr "VSync (Sincronia Vertical)"
+msgstr "VSync (Sincronia vertical)"
msgctxt "IDS_MAINFRM_121"
msgid " (Director Comments 1)"
-msgstr " (Comentario do Director N° 1)"
+msgstr " (Comentarios do director 1)"
msgctxt "IDS_MAINFRM_122"
msgid " (Director Comments 2)"
-msgstr " (Comentario do Director N° 2)"
+msgstr " (Comentarios do director 2)"
msgctxt "IDS_DVD_SUBTITLES_ENABLE"
msgid "Enable DVD subtitles"
@@ -2539,7 +2535,7 @@ msgstr "Diminuír desprazamento VSync"
msgctxt "IDS_MAINFRM_136"
msgid "MPC-HC D3D Fullscreen"
-msgstr "Pantalla Completa MPC-HC D3D"
+msgstr "Pantalla completa MPC-HC D3D"
msgctxt "IDS_MAINFRM_137"
msgid "Unknown format"
@@ -2566,8 +2562,8 @@ msgid "Volume boost Max"
msgstr "Aumento de Volume Maximo"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Uso: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tO ficheiro principal ou directorio vaise cargar (wildcards\n\t\tpermitidos, \"-\" denotes standard input)\n/dub \"dubname\"\tCargar un ficheiro de audio adicional\n/dubdelay \"file\"\tCargar un ficheiro de Audio adicional alterado con XXms (se\n\t\to ficheiro contén \"...DELAY XXms...\")\n/d3dfs\t\tIniciar renderizamento en D3D modo pantalla completa\n/sub \"subname\"\tCargar un ficheiro de subtítulos adicional\n/filter \"filtername\"\tCargar filtros DirectShow dunha ligazón dinámica\n\t\t (wildcards allowed)\n/dvd\t\tExecutar en modo DVD, \"pathname\" significa o cartafol\n\t\tdo dvd (opcional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tCargar todas as pistas dun CD de Audio ou (s)vcd,\n\t\t\"pathname\" significa a ruta do drive (opcional)\n/device\t\tOpen the default video device\n/open\t\tAbrir o ficheiro, non inicia automaticamente a reprodución\n/play\t\tInicia a reprodución do ficheiro cando o reprodutor este\n\t\taberto\n/close\t\tPecha o programa despois da reprodución (Só funciona cando é\n\t\tusado con /play)\n/shutdown\tDesliza o sistema operacional despois da reprodución\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tInicia en modo pantalla completa\n/minimized\tInicia en modo minimizado\n/new\t\tUsa o programa nunha nova estancia\n/add\t\tadiciona \"pathname\" á lista de reprodución, pode ser combinada\n\t\tcon /open e con /play\n/randomize\tRandomize the playlist\n/regvid\t\tRexistra formatos de vídeo\n/regaud\t\tRexistra formatos de Audio\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tFacer rexistro de todos os formatos de vídeo\n/start ms\t\tInicia a reprodución en \"ms\" (= millisegundos)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tAxusta tamaño fixo da xanela\n/monitor N\tInicia monitoramento N, onde N inicia en 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestaura as configuracións por defecto \n/help /h /?\tAmosa axuda sobre as opcións da liña de comandos\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Uso: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tO ficheiro principal ou directorio vaise cargar (wildcards\n\t\tpermitidos, \"-\" denotes standard input)\n/dub \"dubname\"\tCargar un ficheiro de audio adicional\n/dubdelay \"file\"\tCargar un ficheiro de Audio adicional alterado con XXms (se\n\t\to ficheiro contén \"...DELAY XXms...\")\n/d3dfs\t\tIniciar renderizamento en D3D modo pantalla completa\n/sub \"subname\"\tCargar un ficheiro de subtítulos adicional\n/filter \"filtername\"\tCargar filtros DirectShow dunha ligazón dinámica\n\t\t (wildcards allowed)\n/dvd\t\tExecutar en modo DVD, \"pathname\" significa o cartafol\n\t\tdo dvd (opcional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tCargar todas as pistas dun CD de Audio ou (s)vcd,\n\t\t\"pathname\" significa a ruta do drive (opcional)\n/device\t\tOpen the default video device\n/open\t\tAbrir o ficheiro, non inicia automaticamente a reprodución\n/play\t\tInicia a reprodución do ficheiro cando o reprodutor este\n\t\taberto\n/close\t\tPecha o programa despois da reprodución (Só funciona cando é\n\t\tusado con /play)\n/shutdown\tDesliza o sistema operacional despois da reprodución\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tInicia en modo pantalla completa\n/minimized\tInicia en modo minimizado\n/new\t\tUsa o programa nunha nova estancia\n/add\t\tadiciona \"pathname\" á lista de reprodución, pode ser combinada\n\t\tcon /open e con /play\n/randomize\tRandomize the playlist\n/regvid\t\tRexistra formatos de vídeo\n/regaud\t\tRexistra formatos de Audio\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tFacer rexistro de todos os formatos de vídeo\n/start ms\t\tInicia a reprodución en \"ms\" (= millisegundos)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tAxusta tamaño fixo da xanela\n/monitor N\tInicia monitoramento N, onde N inicia en 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestaura as configuracións por defecto \n/help /h /?\tAmosa axuda sobre as opcións da liña de comandos\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -2587,15 +2583,15 @@ msgstr "Amosar Estado"
msgctxt "IDS_AG_TOGGLE_SUBRESYNC"
msgid "Toggle Subresync Bar"
-msgstr "Amosar Barra de Resincronizar Subtítulos"
+msgstr "Amosar barra de resincronizar subtítulos"
msgctxt "IDS_AG_TOGGLE_PLAYLIST"
msgid "Toggle Playlist Bar"
-msgstr "Amosar Barra da Lista de Reprodución"
+msgstr "Amosar barra da lista de reprodución"
msgctxt "IDS_AG_TOGGLE_CAPTURE"
msgid "Toggle Capture Bar"
-msgstr "Amosar Barra de Captura"
+msgstr "Amosar barra de captura"
msgctxt "IDS_AG_TOGGLE_DEBUGSHADERS"
msgid "Toggle Debug Shaders"
@@ -2807,7 +2803,7 @@ msgstr "Inhabilitar todos os decodificadores de vídeo"
msgctxt "IDS_STRETCH_TO_WINDOW"
msgid "Stretch To Window"
-msgstr "Axustar á Xanela"
+msgstr "Axustar á xanela"
msgctxt "IDS_TOUCH_WINDOW_FROM_INSIDE"
msgid "Touch Window From Inside"
@@ -3039,19 +3035,7 @@ msgstr "Resolución"
msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
-msgstr "Relación de Aspecto"
-
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Usar WASAPI (reiniciar reprodución)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Silenciar no adianto rápido"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Dispositivo de son:"
+msgstr "Relación de aspecto"
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
@@ -3175,11 +3159,11 @@ msgstr "Agardar polo baleiramento da GPU: Apagado"
msgctxt "IDS_OSD_RS_D3D_FULLSCREEN_ON"
msgid "D3D Fullscreen: On"
-msgstr "D3D en Pantalla completa: Encendido"
+msgstr "D3D en pantalla completa: Encendido"
msgctxt "IDS_OSD_RS_D3D_FULLSCREEN_OFF"
msgid "D3D Fullscreen: Off"
-msgstr "D3D en Pantalla completa: Apagado"
+msgstr "D3D en pantalla completa: Apagado"
msgctxt "IDS_OSD_RS_NO_DESKTOP_COMP_ON"
msgid "Disable desktop composition: On"
@@ -3609,3 +3593,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Axustes"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.he.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.he.dialogs.po
index 74dabe471..c414d89ba 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.he.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.he.dialogs.po
@@ -473,10 +473,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "טען ×וטומטית קבצי ×ודיו"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr ""
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "שליטה"
@@ -677,9 +673,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "×—×¡×•× ×”×§×˜× ×ª החלון ×›×שר מנגן במסך ×ž×œ× ×¢×œ מסך ש×ינו ברירת המחדל"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "×פשר שליטה ותצוגה מתקדמת בשורת המשימות של Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1170,8 +1166,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "כתוביות *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1186,8 +1182,8 @@ msgid "Rotation"
msgstr "סיבוב"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* ×¤×™×œ×˜×¨×™× ×—×™×¦×•× ×™×™× (כמו VSFilter) ×ž×¡×•×’×œ×™× ×œ×”×¦×™×’ כתוביות בכל מציגי הויד×ו."
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1205,6 +1201,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "×פשר גישה מהמחשב הנוכחי בלבד"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr ""
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "הדפס מידע לניפוי ב××’×™×"
@@ -1653,6 +1653,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "ברירת מחדל"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr ""
@@ -1669,8 +1713,16 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr ""
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
+msgid "Optional information"
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
@@ -1685,7 +1737,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr ""
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
msgstr ""
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.he.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.he.strings.po
index 79c202fdd..88e87a775 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.he.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.he.strings.po
@@ -326,11 +326,11 @@ msgid "On/Off"
msgstr "פועל/כבוי"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr "×ž×¤×¨×™×™×ž×™× ×‘×©× ×™×™×”"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr "×œ×¤×¨×™×™×ž×™× ×‘×©× ×™×™×”"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -465,6 +465,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "ניגון::Shaders"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "מש×בי×"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "שונות"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "מידע-מדיה"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "ניגון::לכידה"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "ניגון::Sync Renderer Settings"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "ניגון::מסך מל×"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "מחליף זרמי השמע"
@@ -557,30 +585,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "כתוביות::מסד נתוני×"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "מש×בי×"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "שונות"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "מידע-מדיה"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "ניגון::לכידה"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "ניגון::Sync Renderer Settings"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "ניגון::מסך מל×"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "פרטי×"
@@ -673,22 +677,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "משטח הויד×ו יוקצה כמשטח רגיל מחוץ למסך."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr ""
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "מציג מסונכרן"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - דיווח על ב××’"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr ""
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr ""
@@ -741,9 +733,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "ריק (×œ× ×ž×›×•×•×¥)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "מוסר ×”×ודיו של MPC-HC"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr ""
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1393,6 +1385,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr ""
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr ""
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "פתח התקן"
@@ -1677,6 +1689,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr ""
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr ""
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr ""
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr ""
@@ -1958,20 +1978,20 @@ msgid "Options"
msgstr "הגדרות"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "×–×¨× ×”×©×ž×¢ הב×"
+msgid "Next Audio Track"
+msgstr ""
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "×–×¨× ×”×©×ž×¢ הקוד×"
+msgid "Prev Audio Track"
+msgstr ""
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "הכתוביות הב×ות"
+msgid "Next Subtitle Track"
+msgstr ""
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "הכתוביות הקודמות"
+msgid "Prev Subtitle Track"
+msgstr ""
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1981,22 +2001,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "טען מחדש כתוביות"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "×–×¨× ×©×ž×¢ ×”×‘× (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "×–×¨× ×©×ž×¢ ×”×§×•×“× (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "הכתוביות הב×ות (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "הכתוביות הקודמות (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "הזווית הב××” (די.וי.די)"
@@ -2006,20 +2010,20 @@ msgid "Prev Angle (DVD)"
msgstr "הזווית הקודמת (די.וי.די)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "×–×¨× ×”×©×ž×¢ ×”×‘× (די.וי.די)"
+msgid "Next Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "×–×¨× ×”×©×ž×¢ ×”×§×•×“× (די.וי.די)"
+msgid "Prev Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "הכתוביות הב×ות (די.וי.די)"
+msgid "Next Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "הכתוביות הקודמות (די.וי.די)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2385,14 +2389,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "נוכחי"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr ""
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "×œ× ×ž×¦×œ×™×— ליצור קובץ הטלה ב-'%s' (שגי××” %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "בחר תיקיה"
@@ -2566,8 +2562,8 @@ msgid "Volume boost Max"
msgstr "המרצת עוצמת שמע מקסימלית"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tfile contains \"...DELAY XXms...\")\n/d3dfs\t\tstart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playing\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched.\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet fixed window size\n/monitor N\tStart on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tfile contains \"...DELAY XXms...\")\n/d3dfs\t\tstart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playing\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched.\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet fixed window size\n/monitor N\tStart on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3041,18 +3037,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "יחס גובה-רוחב"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "השתמש ב-WASAPI (הפעל ניגון מחדש)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "השתקה בקפיצה מהירה קדימה"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "התקן שמע:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "סנכרון ×× ×›×™: מופעל"
@@ -3609,3 +3593,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "הגדרות"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.hr.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.hr.dialogs.po
index 1afe50e2a..8cd864a23 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.hr.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.hr.dialogs.po
@@ -10,10 +10,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-30 21:50+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-21 10:26+0000\n"
"Last-Translator: streger <stjepan.treger@gmail.com>\n"
-"Language-Team: Croatian (http://www.transifex.com/projects/p/mpc-hc/language/hr/)\n"
+"Language-Team: Croatian (http://www.transifex.com/mpc-hc/mpc-hc/language/hr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -476,10 +476,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Automatski uÄitaj audio datoteke"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Koristi ugrađeni render za titlove"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Kontrole"
@@ -680,9 +676,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "SprijeÄi minimiziranje playera kada zauzima cijeli ekran na sekundarnom monitoru"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Koristi znaÄajke Windows 7 programske trake"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Koristi napredne funkcije programske trake"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1173,8 +1169,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Titlovi *"
+msgid "Subtitles"
+msgstr "Titlovi"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1189,8 +1185,8 @@ msgid "Rotation"
msgstr "Rotacija"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Eksterni filtri (poput VSFilter) mogu prikazati titlove na svim renderima."
+msgid "Subtitle Renderer"
+msgstr "PrikazivaÄ titlova"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1208,6 +1204,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Dozvoli pristup samo s lokalnog hosta"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Omogući pregled"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Prikaži informacije o neispravnostima"
@@ -1656,6 +1656,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Zadan"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Uređaj"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Ekskluzivni naÄin"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Dopusti tok bitova"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Postavke"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Omogući stereo crossfeed (za slušalice)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Odrezano:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Nivo:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Bilješka"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Kako bi smanjili zvuÄnu distorziju, preporuÄljivo je držati glasnoću izvoÄ‘aÄa oko 85% kada se izvodi glasni, kodirani sadržaj sa gubitkom kvalitete."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG kvaliteta:"
@@ -1672,9 +1716,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Prijava greške"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "IspriÄavamo se, izgleda da se MPC-HC upravo sruÅ¡io. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Pošaljite prijavu problema kako bi nam pomogli u dijagnozi i ispravljanju istog."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Izgleda se MPC-HC sruÅ¡io, ispriÄavamo se na tome. :(\n\nOpis bug-a će biti poslan da bi nam pomogao dijagnosticirati i popraviti greÅ¡ku. Ako želite, možete dodati viÅ¡e informacija u opis."
+msgid "Optional information"
+msgstr "Dodatne informacije"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1688,7 +1740,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Opis problema (koristite samo engleski):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "U redu"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Ponovo pokreni MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Zatvori MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.hr.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.hr.menus.po
index 9a5c24cda..cf2259b46 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.hr.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.hr.menus.po
@@ -8,10 +8,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
-"PO-Revision-Date: 2015-05-30 21:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-11-10 15:00+0000\n"
"Last-Translator: streger <stjepan.treger@gmail.com>\n"
-"Language-Team: Croatian (http://www.transifex.com/projects/p/mpc-hc/language/hr/)\n"
+"Language-Team: Croatian (http://www.transifex.com/mpc-hc/mpc-hc/language/hr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -40,7 +40,7 @@ msgstr "Otvori &uređaj..."
msgctxt "ID_FILE_OPENDIRECTORY"
msgid "Open Dir&ectory..."
-msgstr "Otvori &direktorij..."
+msgstr "Otvori dir&ektorij..."
msgctxt "ID_FILE_OPENDISC"
msgid "O&pen Disc"
@@ -60,11 +60,11 @@ msgstr "&Spremi kao kopiju..."
msgctxt "ID_FILE_SAVE_IMAGE"
msgid "Save &Image..."
-msgstr "Spremi &sliku..."
+msgstr "Spremi sli&ku..."
msgctxt "ID_FILE_SAVE_THUMBNAILS"
msgid "Save &Thumbnails..."
-msgstr "Spremi &sliÄice..."
+msgstr "Spremi sliÄi&ce..."
msgctxt "ID_FILE_LOAD_SUBTITLE"
msgid "&Load Subtitle..."
@@ -88,15 +88,15 @@ msgstr "&Pošalji..."
msgctxt "ID_FILE_ISDB_DOWNLOAD"
msgid "&Download..."
-msgstr "&Preuzmi..."
+msgstr "P&reuzmi..."
msgctxt "ID_FILE_PROPERTIES"
msgid "P&roperties"
-msgstr "S&vojstva"
+msgstr "Svo&jstva"
msgctxt "ID_FILE_EXIT"
msgid "E&xit"
-msgstr "I&zlaz"
+msgstr "&Izlaz"
msgctxt "POPUP"
msgid "&View"
@@ -564,7 +564,7 @@ msgstr "&Audio zapis"
msgctxt "ID_SUBTITLES"
msgid "Su&btitle Track"
-msgstr "Zap&is podnapisa"
+msgstr "Zapis &titlova"
msgctxt "ID_VIDEO_STREAMS"
msgid "&Video Track"
@@ -676,15 +676,15 @@ msgstr "&Pomoć"
msgctxt "ID_HELP_HOMEPAGE"
msgid "&Home Page"
-msgstr "&PoÄetna stranica"
+msgstr "PoÄe&tna stranica"
msgctxt "ID_HELP_CHECKFORUPDATE"
msgid "Check for &updates"
-msgstr "Provjeri &ažuriranja"
+msgstr "Provjeri až&uriranja"
msgctxt "ID_HELP_SHOWCOMMANDLINESWITCHES"
msgid "&Command Line Switches"
-msgstr "&Naredbe komandne linije"
+msgstr "Naredbe &komandne linije"
msgctxt "ID_HELP_TOOLBARIMAGES"
msgid "Download &Toolbar Images"
@@ -696,5 +696,5 @@ msgstr "&Doniraj"
msgctxt "ID_HELP_ABOUT"
msgid "&About..."
-msgstr "&O programu..."
+msgstr "O progr&amu..."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.hr.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.hr.strings.po
index 315adbe0d..5eca2f9b7 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.hr.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.hr.strings.po
@@ -11,10 +11,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-30 21:41+0000\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-10 16:30+0000\n"
"Last-Translator: streger <stjepan.treger@gmail.com>\n"
-"Language-Team: Croatian (http://www.transifex.com/projects/p/mpc-hc/language/hr/)\n"
+"Language-Team: Croatian (http://www.transifex.com/mpc-hc/mpc-hc/language/hr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -31,7 +31,7 @@ msgstr "Video"
msgctxt "IDS_INFOBAR_AUDIO"
msgid "Audio"
-msgstr "Audio"
+msgstr "Zvuk"
msgctxt "IDS_INFOBAR_SUBTITLES"
msgid "Subtitles"
@@ -47,7 +47,7 @@ msgstr "Dovršavanje..."
msgctxt "IDS_AUTOPLAY_PLAYVIDEO"
msgid "Play Video"
-msgstr "Pokreni Video"
+msgstr "Pokreni video"
msgctxt "IDS_AUTOPLAY_PLAYMUSIC"
msgid "Play Music"
@@ -55,11 +55,11 @@ msgstr "Pokreni glazbu"
msgctxt "IDS_AUTOPLAY_PLAYAUDIOCD"
msgid "Play Audio CD"
-msgstr "Pokreni Audio CD"
+msgstr "Pokreni zvukovni CD"
msgctxt "IDS_AUTOPLAY_PLAYDVDMOVIE"
msgid "Play DVD Movie"
-msgstr "Pokreni DVD Film"
+msgstr "Pokreni DVD film"
msgctxt "IDS_PROPSHEET_PROPERTIES"
msgid "Properties"
@@ -67,7 +67,7 @@ msgstr "Svojstva"
msgctxt "IDS_SUBTITLES_DEFAULT_STYLE"
msgid "&Default Style"
-msgstr "&Standardni stil"
+msgstr "Stan&dardni stil"
msgctxt "IDS_FAVFILES"
msgid "Files"
@@ -243,11 +243,11 @@ msgstr "Font"
msgctxt "IDS_DVD_NAV_SOME_PINS_ERROR"
msgid "Failed to render some of the pins of the DVD Navigator filter"
-msgstr "Nije uspjelo renderiranje nekih pinova DVD-Navigacijskog filtra."
+msgstr "Nije uspjelo renderiranje nekih pinova DVD-navigacijskog filtra."
msgctxt "IDS_DVD_INTERFACES_ERROR"
msgid "Failed to query the needed interfaces for DVD playback"
-msgstr "BezuspjeÅ¡no pronalaženje potrebnih suÄelja koji omogućuju izvoÄ‘enje DVDa"
+msgstr "BezuspjeÅ¡no pronalaženje potrebnih suÄelja koji omogućuju izvoÄ‘enje DVD-a"
msgctxt "IDS_CAPTURE_LIVE"
msgid "Live"
@@ -323,19 +323,19 @@ msgstr "Efekt"
msgctxt "IDS_PLAYLIST_CAPTION"
msgid "Playlist"
-msgstr "Playlista"
+msgstr "Lista izvođenja"
msgctxt "IDS_PPAGE_FS_CLN_ON_OFF"
msgid "On/Off"
msgstr "Uklj./Isklj."
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Od FPS"
+msgid "From (FPS)"
+msgstr "Od (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "Do FPS"
+msgid "To (FPS)"
+msgstr "Do (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -459,7 +459,7 @@ msgstr "Optimizacije"
msgctxt "IDD_PPAGEAUDIOSWITCHER"
msgid "Internal Filters::Audio Switcher"
-msgstr "Interni filtri::Audio Switcher"
+msgstr "Interni filtri::Zvukovni prebacivaÄ"
msgctxt "IDD_PPAGEEXTERNALFILTERS"
msgid "External Filters"
@@ -469,9 +469,37 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Reprodukcija::Shaderi"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Izvori"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Razne postavke"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Reprodukcija::Uhvati"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Reprodukcija::Postavke sinkronizacijskog rendera"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Reprodukcija::Cijeli ekran"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Interni filtri::Renderer zvuka"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
-msgstr "Audio switcher"
+msgstr "Zvukovni prebacivaÄ"
msgctxt "IDS_ICONS_REASSOC_DLG_TITLE"
msgid "New version of the icon library"
@@ -495,11 +523,11 @@ msgstr "Overlay Mixer Renderer"
msgctxt "IDS_PPAGE_OUTPUT_VMR7WINDOWED"
msgid "Video Mixing Renderer 7 (windowed)"
-msgstr "Video Mixing Renderer 7 (windowed)"
+msgstr "Video Mixing Renderer 7 (u prozoru)"
msgctxt "IDS_PPAGE_OUTPUT_VMR9WINDOWED"
msgid "Video Mixing Renderer 9 (windowed)"
-msgstr "Video Mixing Renderer 9 (windowed)"
+msgstr "Video Mixing Renderer 9 (u prozoru)"
msgctxt "IDS_PPAGE_OUTPUT_VMR7RENDERLESS"
msgid "Video Mixing Renderer 7 (renderless)"
@@ -511,11 +539,11 @@ msgstr "Video Mixing Renderer 9 (renderless)"
msgctxt "IDS_PPAGE_OUTPUT_EVR"
msgid "Enhanced Video Renderer"
-msgstr "Enhanced Video Renderer"
+msgstr "Poboljšani video renderer"
msgctxt "IDS_PPAGE_OUTPUT_EVR_CUSTOM"
msgid "Enhanced Video Renderer (custom presenter)"
-msgstr "Enhanced Video Renderer (custom presenter)"
+msgstr "PoboljÅ¡ani video renderer (prilagoÄ‘eni prikazivaÄ)"
msgctxt "IDS_PPAGE_OUTPUT_DXR"
msgid "Haali Video Renderer"
@@ -523,11 +551,11 @@ msgstr "Haali Video Renderer"
msgctxt "IDS_PPAGE_OUTPUT_NULL_COMP"
msgid "Null (anything)"
-msgstr "Null (anything)"
+msgstr "Null (nešto)"
msgctxt "IDS_PPAGE_OUTPUT_NULL_UNCOMP"
msgid "Null (uncompressed)"
-msgstr "Null (uncompressed)"
+msgstr "Null (nekomprimirano)"
msgctxt "IDS_PPAGE_OUTPUT_MADVR"
msgid "madVR"
@@ -561,41 +589,17 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Titlovi::Baza podataka"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Izvori"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Razne postavke"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Reprodukcija::Uhvati"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Reprodukcija::Postavke sinkronizacijskog rendera"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Reprodukcija::Fullscreen"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Detalji"
msgctxt "IDD_FILEPROPCLIP"
msgid "Clip"
-msgstr "Clip"
+msgstr "IsjeÄak"
msgctxt "IDC_DSSYSDEF"
msgid "Default video renderer filter for DirectShow. Others will fall back to this one when they can't be loaded for some reason. On Windown XP this is the same as VMR-7 (windowed)."
-msgstr "Zadani video render filtri za DirectShow. Ostali video renderi, ako se ne mogu uÄitati, će biti postavljeni na ovaj. Na Windows XP je ovo ekvivalent VMR-7 (windowed)."
+msgstr "Zadani video render filtri za DirectShow. Ostali video renderi, ako se ne mogu uÄitati, će biti postavljeni na ovaj. Na Windows XP je ovo ekvivalent VMR-7 (u prozoru)."
msgctxt "IDC_DSOLD"
msgid "This is the default renderer of Windows 9x/me/2k. Depending on the visibility of the video window and your video card's abilities, it will switch between GDI, DirectDraw, Overlay rendering modes dynamically."
@@ -603,7 +607,7 @@ msgstr "Zadani renderer za Windows 9x/ME/2k. Ovisno o vidljivosti video prozora
msgctxt "IDC_DSOVERLAYMIXER"
msgid "Always renders in overlay. Generally only YUV formats are allowed, but they are presented directly without any color conversion to RGB. This is the fastest rendering method of all and the only where you can be sure about fullscreen video mirroring to tv-out activating."
-msgstr "Uvijek prikazuje u gornjem sloju. Općenito samo YUV formati su dozvoljeni ali su prikazani direktno bez konverzije boje u RGB. Ovo je najbrža metoda prikazivanja od svih i jedina kojom možete biti sigurni da je prikaz na cijelom ekranu zrcaljen sa aktiviranje tv-izlaza."
+msgstr "Uvijek prikazuje u gornjem sloju. Općenito samo su YUV formati dozvoljeni ali su prikazani direktno bez konverzije boje u RGB. Ovo je najbrža metoda prikazivanja od svih i jedina kojom možete biti sigurni da je prikaz na cijelom ekranu zrcaljen sa aktiviranje tv-izlaza."
msgctxt "IDC_DSVMR7WIN"
msgid "The default renderer of Windows XP. Very stable and just a little slower than the Overlay mixer. Uses DirectDraw and runs in Overlay when it can."
@@ -631,7 +635,7 @@ msgstr "Spaja se na bilo medijski tip sliÄan videu i Å¡alje dolazeće uzorke ni
msgctxt "IDC_DSNULL_UNCOMP"
msgid "Same as the normal Null renderer, but this will only connect to uncompressed types."
-msgstr "Isti kao normalni Null prikazivaÄ ali ovaj se samo spaja na nekompresirane tipove."
+msgstr "Isti kao normalni Null prikazivaÄ ali ovaj se samo spaja na nekomprimirane vrste."
msgctxt "IDC_DSEVR"
msgid "Only available on Vista or later or on XP with at least .NET Framework 3.5 installed."
@@ -677,57 +681,45 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Video površina će biti dodijeljena kao normalna površina van ekrana."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC audio pogon je nevaljan, nemojte ga koristiti."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync prikazivaÄ"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - prijavljuje bug"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC se srusio. Ova verzija nema mogucnost automatskog slanja informacija.\nAko zelite prijavit ovaj bug, prvo iskusajte sluzbenu verziju.\n\nZelite li posjetiti stranicu za download?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
-msgstr "regularna cista povrsina"
+msgstr "Regularna Äista povrÅ¡ina izvan ekrana"
msgctxt "IDS_PPAGE_OUTPUT_SURF_2D"
msgid "2D surfaces"
-msgstr "2D povrsina"
+msgstr "2D površine"
msgctxt "IDS_PPAGE_OUTPUT_SURF_3D"
msgid "3D surfaces (recommended)"
-msgstr "3D povrsine (preporuceno)"
+msgstr "3D povrÅ¡ine (preporuÄeno)"
msgctxt "IDS_PPAGE_OUTPUT_RESIZE_NN"
msgid "Nearest neighbor"
-msgstr "Najblizi susjed"
+msgstr "Najbliži susjed"
msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BILIN"
msgid "Bilinear"
-msgstr "Dvije linije"
+msgstr "Bilinearno "
msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BIL_PS"
msgid "Bilinear (PS 2.0)"
-msgstr "Dvije linije (PS 2,0)"
+msgstr "Bilinearno (PS 2,0)"
msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BICUB1"
msgid "Bicubic A=-0.60 (PS 2.0)"
-msgstr "Bicubic A= 0,6 (PS 2,0)"
+msgstr "BikubiÄno A=-0.60 (PS 2.0)"
msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BICUB2"
msgid "Bicubic A=-0.75 (PS 2.0)"
-msgstr "Bicubic A=-0.75 (PS 2.0)"
+msgstr "BikubiÄno A=-0.75 (PS 2.0)"
msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BICUB3"
msgid "Bicubic A=-1.00 (PS 2.0)"
-msgstr "Bicubic A=-1.00 (PS 2.0)"
+msgstr "BikubiÄno A=-1.00 (PS 2.0)"
msgctxt "IDS_PPAGE_OUTPUT_UNAVAILABLE"
msgid "**unavailable**"
@@ -745,17 +737,17 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (uncompressed)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC audio pogon"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Interni renderer zvuka"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
-msgstr "Ime"
+msgstr "Naziv"
msgctxt "IDS_EMB_RESOURCES_VIEWER_TYPE"
msgid "MIME Type"
-msgstr "MIME Type"
+msgstr "MIME tip"
msgctxt "IDS_EMB_RESOURCES_VIEWER_INFO"
msgid "In order to view an embedded resource in your browser you have to enable the web interface.\n\nUse the \"Save As\" button if you only want to save the information."
@@ -783,7 +775,7 @@ msgstr "Nema medijskih datoteka u arhivi"
msgctxt "IDS_RFS_COMPRESSED"
msgid "Compressed files are not supported"
-msgstr "Kompresirane datoteke nisu podržane"
+msgstr "Komprimirane datoteke nisu podržane"
msgctxt "IDS_RFS_ENCRYPTED"
msgid "Encrypted files are not supported"
@@ -875,7 +867,7 @@ msgstr "Pauza\nPauza"
msgctxt "ID_PLAY_STOP"
msgid "Stop\nStop"
-msgstr "Stop\nStop"
+msgstr "Zaustavi\nZaustavi"
msgctxt "ID_PLAY_FRAMESTEP"
msgid "Step\nStep"
@@ -891,15 +883,15 @@ msgstr "Povećaj brzinu\nPovećaj brzinu"
msgctxt "ID_VOLUME_MUTE"
msgid "Mute"
-msgstr "Tišina"
+msgstr "IskljuÄi zvuk"
msgctxt "ID_VOLUME_MUTE_OFF"
msgid "Unmute"
-msgstr "Ukljući zvuk"
+msgstr "UkljuÄi zvuk"
msgctxt "ID_VOLUME_MUTE_DISABLED"
msgid "No audio"
-msgstr "Nema zvuka"
+msgstr "Bez zvuka"
msgctxt "ID_NAVIGATE_SKIPBACK"
msgid "Skip back\nSkip back"
@@ -915,11 +907,11 @@ msgstr "&Original"
msgctxt "IDS_SUBRESYNC_CURRENT"
msgid "&Current"
-msgstr "&Current"
+msgstr "&Trenutno"
msgctxt "IDS_SUBRESYNC_EDIT"
msgid "&Edit"
-msgstr "&Edit"
+msgstr "Ur&edi"
msgctxt "IDS_SUBRESYNC_YES"
msgid "&Yes"
@@ -947,15 +939,15 @@ msgstr "Odaberi &shadere..."
msgctxt "IDS_SHADERS_DEBUG"
msgid "&Debug Shaders..."
-msgstr "Ispravi grešku sha&dera..."
+msgstr "Pronađi grešku sha&dera..."
msgctxt "IDS_FAVORITES_ADD"
msgid "&Add to Favorites..."
-msgstr "Dod&aj u omiljene..."
+msgstr "Dod&aj u omiljeno..."
msgctxt "IDS_FAVORITES_ORGANIZE"
msgid "&Organize Favorites..."
-msgstr "&Organiziraj omiljene..."
+msgstr "&Organiziraj omiljeno..."
msgctxt "IDS_PLAYLIST_SHUFFLE"
msgid "Shuffle"
@@ -967,23 +959,23 @@ msgstr "Otvori lokaciju datoteke"
msgctxt "IDS_CONTROLS_CLOSING"
msgid "Closing..."
-msgstr "Zatvaram..."
+msgstr "Zatvaranje..."
msgctxt "IDS_CONTROLS_PLAYING"
msgid "Playing"
-msgstr "Pokrećem"
+msgstr "Pokretanje"
msgctxt "IDS_CONTROLS_PAUSED"
msgid "Paused"
-msgstr "Pauziram"
+msgstr "Pauzirano"
msgctxt "IDS_AG_EDL_NEW_CLIP"
msgid "EDL new clip"
-msgstr "EDL novi klip"
+msgstr "EDL novi isjeÄak"
msgctxt "IDS_RECENT_FILES_CLEAR"
msgid "&Clear list"
-msgstr "&OÄisti listu"
+msgstr "OÄi&sti listu"
msgctxt "IDS_RECENT_FILES_QUESTION"
msgid "Are you sure that you want to delete recent files list?"
@@ -1003,11 +995,11 @@ msgstr "Namjestiti EDL prozor"
msgctxt "IDS_AG_EDL_IN"
msgid "EDL set In"
-msgstr "EDL namješten Na"
+msgstr "EDL namješten na"
msgctxt "IDS_AG_EDL_OUT"
msgid "EDL set Out"
-msgstr "EDL namješten Iz"
+msgstr "EDL namješten iz"
msgctxt "IDS_AG_PNS_ROTATEX_M"
msgid "PnS Rotate X-"
@@ -1055,7 +1047,7 @@ msgstr "Zaustavljeno"
msgctxt "IDS_CONTROLS_BUFFERING"
msgid "Buffering... (%d%%)"
-msgstr "UÄitava... (%d%%)"
+msgstr "UÄitavanje... (%d%%)"
msgctxt "IDS_CONTROLS_CAPTURING"
msgid "Capturing..."
@@ -1063,7 +1055,7 @@ msgstr "Snimanje..."
msgctxt "IDS_CONTROLS_OPENING"
msgid "Opening..."
-msgstr "Otvaram..."
+msgstr "Otvaranje..."
msgctxt "IDS_CONTROLS_CLOSED"
msgid "Closed"
@@ -1071,7 +1063,7 @@ msgstr "Zatvaranje"
msgctxt "IDS_SUBTITLES_OPTIONS"
msgid "&Options..."
-msgstr "Opcije"
+msgstr "&Opcije..."
msgctxt "IDS_SUBTITLES_STYLES"
msgid "&Styles..."
@@ -1083,7 +1075,7 @@ msgstr "Ponovno pok&reni"
msgctxt "IDS_SUBTITLES_ENABLE"
msgid "&Enable"
-msgstr "Omogući"
+msgstr "&Omogući"
msgctxt "IDS_PANSCAN_EDIT"
msgid "&Edit..."
@@ -1123,7 +1115,7 @@ msgstr "Ništa"
msgctxt "IDS_AG_COMMAND"
msgid "Command"
-msgstr "Komanda"
+msgstr "Naredba"
msgctxt "IDS_AG_KEY"
msgid "Key"
@@ -1151,7 +1143,7 @@ msgstr "Sve datoteke (*.*)|*.*|"
msgctxt "IDS_AG_AUDIOFILES"
msgid "Audio files (all types)"
-msgstr "Audio datoteke (sve datoteke)"
+msgstr "Zvukovne datoteke (sve vrste)"
msgctxt "IDS_AG_NOT_KNOWN"
msgid "Not known"
@@ -1179,15 +1171,15 @@ msgstr "Post- i pre-size-shaderi se ne mogu postaviti"
msgctxt "IDS_DEBUGSHADERS_FIRSTRUN_MSG"
msgid "Shaders are recompiled automatically when the corresponding files are modified."
-msgstr "Shaderi se iznova kompajliraju kada se odgovarajuće datoteke promijene"
+msgstr "Shaderi se iznova kompajliraju kada se odgovarajuće datoteke promijene."
msgctxt "IDS_SHADER_DLL_ERR_0"
msgid "Cannot load %s, pixel shaders will not work."
-msgstr "Ne može se uÄitati %s, piksel shaderi neće raditi."
+msgstr "Nemoguće uÄitati %s, piksel shaderi neće raditi."
msgctxt "IDS_SHADER_DLL_ERR_1"
msgid "Cannot find necessary function entry points in %s, pixel shaders will not work."
-msgstr "Ne može se pronaći odgovarajuća ulazna toÄka funkcije u %s, piksel shaderi neće raditi."
+msgstr "Nemoguće pronaći odgovarajuća ulazna toÄka funkcije u %s, piksel shaderi neće raditi."
msgctxt "IDS_OSD_SHADERS_PRESET"
msgid "Shader preset: %s"
@@ -1203,7 +1195,7 @@ msgstr "Prethodni shader profil"
msgctxt "IDS_STRING_COLON"
msgid "%s:"
-msgstr "%s"
+msgstr "%s:"
msgctxt "IDS_RECORD_START"
msgid "Record"
@@ -1211,7 +1203,7 @@ msgstr "Snimi"
msgctxt "IDS_RECORD_STOP"
msgid "Stop"
-msgstr "stani"
+msgstr "Zaustavi"
msgctxt "IDS_BALANCE"
msgid "L = R"
@@ -1255,7 +1247,7 @@ msgstr "&Kopiraj filtere u međuspremnik"
msgctxt "IDS_CREDENTIALS_SERVER"
msgid "Enter server credentials"
-msgstr "Unesite postavke server"
+msgstr "Unesite postavke servera"
msgctxt "IDS_CREDENTIALS_CONNECT"
msgid "Enter your credentials to connect"
@@ -1271,7 +1263,7 @@ msgstr "Edukacijske/Znanstvene/StruÄne teme"
msgctxt "IDS_PPAGEADVANCED_HIDE_WINDOWED"
msgid "Hides controls and panels also in windowed mode."
-msgstr "Sakrije upravljaÄke elemente i dodatne prozore i u windowed modu."
+msgstr "Skriva upravljaÄke elemente i dodatne panele u naÄinu prozora."
msgctxt "IDS_PPAGEADVANCED_BLOCK_VSFILTER"
msgid "Prevent external subtitle renderer to be loaded when internal is in use."
@@ -1279,11 +1271,11 @@ msgstr "SprijeÄi uÄitavanje eksternih titlova ako se koriste interni."
msgctxt "IDS_PPAGEADVANCED_COL_NAME"
msgid "Name"
-msgstr "Ime"
+msgstr "Naziv"
msgctxt "IDS_PPAGEADVANCED_COL_VALUE"
msgid "Value"
-msgstr "Vriejdnost"
+msgstr "Vrijednost"
msgctxt "IDS_PPAGEADVANCED_RECENT_FILES_NUMBER"
msgid "Maximum number of files shown in the \"Recent files\" menu and for which the position is potentially saved."
@@ -1295,7 +1287,7 @@ msgstr "Zapamti poziciju reprodukcije ukoliko je datoteka duža od N minuta.."
msgctxt "IDS_PPAGEADVANCED_FILE_POS_AUDIO"
msgid "Remember file position also for audio files."
-msgstr "Zapamti poziciju reprodukcije za audio datoteke."
+msgstr "Zapamti poziciju reprodukcije za zvukovnu datoteke."
msgctxt "IDS_AFTER_PLAYBACK_DO_NOTHING"
msgid "Do Nothing"
@@ -1335,7 +1327,7 @@ msgstr "Maksimalna veliÄina (NxNpx) naslovnice pokrenute u naÄinu samo za zvuk
msgctxt "IDS_SUBTITLE_DELAY_STEP_TOOLTIP"
msgid "The subtitle delay will be decreased/increased by this value each time the corresponding hotkeys are used (%s/%s)."
-msgstr "Podnaslovi će biti povećani/umanjeni s ovom vrijednošću prilikom svakog pritiskanja određenih tipki koje su podešene (%s/%s)."
+msgstr "Titlovi će biti povećani/umanjeni s ovom vrijednošću prilikom svakog pritiskanja određenih tipki koje su namještene (%s/%s)."
msgctxt "IDS_HOTKEY_NOT_DEFINED"
msgid "<not defined>"
@@ -1397,6 +1389,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Nakon reprodukcije: Zatvori"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC je naišao na problem tokom inicijalizacije. Sa vašom pomoći mogli bi popraviti taj problem.\n\nŽelite li ga prijaviti?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Unesite pozitivnu vrijednost ako zvuk rani i negativnu vrijednost ako kasni."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Pregled je trenutno onemogućen. Možete ga omogućiti u MPC-HC-ovim postavkama."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Ova postavka može se koristiti za pregled medijskih datoteka iz udaljenih lokacija. Koristite ju samo na pravilno osiguranim privatnim mrežama.\n\nŽelite li zaista omogućiti ovu postavku?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Unutarnji prikazivaÄ titlova"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Otvori uređaj"
@@ -1443,7 +1455,7 @@ msgstr "Pokreni"
msgctxt "IDS_AG_STOP"
msgid "Stop"
-msgstr "stani"
+msgstr "Zaustavi"
msgctxt "IDS_AG_FRAMESTEP"
msgid "Frame-step"
@@ -1455,7 +1467,7 @@ msgstr "Korak slike nazad"
msgctxt "IDS_AG_GO_TO"
msgid "Go To"
-msgstr "Idi na..."
+msgstr "Idi na"
msgctxt "IDS_AG_INCREASE_RATE"
msgid "Increase Rate"
@@ -1599,11 +1611,11 @@ msgstr "Vrati brzinu na poÄetnu"
msgctxt "IDS_MPLAYERC_21"
msgid "Audio Delay +10 ms"
-msgstr "Audio kašnjenje +10 ms"
+msgstr "ZvuÄno kaÅ¡njenje +10 ms"
msgctxt "IDS_MPLAYERC_22"
msgid "Audio Delay -10 ms"
-msgstr "Audio kašnjenje -10 ms"
+msgstr "ZvuÄno kaÅ¡njenje -10 ms"
msgctxt "IDS_MPLAYERC_23"
msgid "Jump Forward (small)"
@@ -1639,7 +1651,7 @@ msgstr "SkoÄi nazad (obilježeni trenutak)"
msgctxt "IDS_AG_NEXT"
msgid "Next"
-msgstr "Idući"
+msgstr "Slijedeće"
msgctxt "IDS_AG_PREVIOUS"
msgid "Previous"
@@ -1647,7 +1659,7 @@ msgstr "Prethodno"
msgctxt "IDS_AG_NEXT_FILE"
msgid "Next File"
-msgstr "Iduća datoteka"
+msgstr "Slijedeća datoteka"
msgctxt "IDS_AG_PREVIOUS_FILE"
msgid "Previous File"
@@ -1681,6 +1693,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Prikaži ime datoteke"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Reproduciraj DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Reproduciraj BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: Prikaži statistike renderera"
@@ -1695,19 +1715,19 @@ msgstr "Titlovi::Razno"
msgctxt "IDS_VIEW_BORDERLESS"
msgid "Hide &borders"
-msgstr "Sakrij &rubove"
+msgstr "Sakrij ru&bove"
msgctxt "IDS_VIEW_FRAMEONLY"
msgid "Fra&me Only"
-msgstr "Samo okvir"
+msgstr "Sa&mo okvir"
msgctxt "IDS_VIEW_CAPTIONMENU"
msgid "Sho&w Caption&&Menu"
-msgstr "P&rikazati natpis&&izbornik"
+msgstr "Prika&zati natpis&&izbornik"
msgctxt "IDS_VIEW_HIDEMENU"
msgid "Hide &Menu"
-msgstr "Sakrij &izbornik"
+msgstr "Sakrij izbor&nik"
msgctxt "IDD_PPAGEADVANCED"
msgid "Advanced"
@@ -1751,7 +1771,7 @@ msgstr "VidFrm dupla"
msgctxt "IDS_AG_ALWAYS_ON_TOP"
msgid "Always On Top"
-msgstr "uvijek na vrhu"
+msgstr "Uvijek na vrhu"
msgctxt "IDS_AG_PNS_INC_SIZE"
msgid "PnS Inc Size"
@@ -1779,7 +1799,7 @@ msgstr "PnS smanji visinu"
msgctxt "IDS_SUBDL_DLG_DOWNLOADING"
msgid "Downloading subtitle(s), please wait."
-msgstr "Preuzimam titlove, molim priÄekajte"
+msgstr "Preuzimanje titlova, molim priÄekajte"
msgctxt "IDS_SUBDL_DLG_PARSING"
msgid "Parsing list..."
@@ -1787,7 +1807,7 @@ msgstr "Lista raÅ¡Älambe..."
msgctxt "IDS_SUBDL_DLG_NOT_FOUND"
msgid "No subtitles found."
-msgstr "Titlovi nisu pronađeni"
+msgstr "Titlovi nisu pronađeni."
msgctxt "IDS_SUBDL_DLG_SUBS_AVAIL"
msgid "%d subtitle(s) available."
@@ -1879,15 +1899,15 @@ msgstr "PnS dolje/desno"
msgctxt "IDS_AG_VOLUME_UP"
msgid "Volume Up"
-msgstr "pojacaj"
+msgstr "PojaÄaj"
msgctxt "IDS_AG_VOLUME_DOWN"
msgid "Volume Down"
-msgstr "smanji zvuk"
+msgstr "Stišaj zvuk"
msgctxt "IDS_AG_VOLUME_MUTE"
msgid "Volume Mute"
-msgstr "Mute zvuk"
+msgstr "IskljuÄen zvuk"
msgctxt "IDS_MPLAYERC_63"
msgid "DVD Title Menu"
@@ -1903,7 +1923,7 @@ msgstr "DVD izbornik titlova"
msgctxt "IDS_MPLAYERC_66"
msgid "DVD Audio Menu"
-msgstr "DVD audio izbornik"
+msgstr "DVD zvuÄni izbornik"
msgctxt "IDS_MPLAYERC_67"
msgid "DVD Angle Menu"
@@ -1911,39 +1931,39 @@ msgstr "DVD izbornik kuteva kamere"
msgctxt "IDS_MPLAYERC_68"
msgid "DVD Chapter Menu"
-msgstr "DVD Menu poglavlja"
+msgstr "DVD izbornik poglavlja"
msgctxt "IDS_AG_DVD_MENU_LEFT"
msgid "DVD Menu Left"
-msgstr "DVD Menu lijevo"
+msgstr "DVD izbornik lijevo"
msgctxt "IDS_MPLAYERC_70"
msgid "DVD Menu Right"
-msgstr "DVD Menu desno"
+msgstr "DVD izbornik desno"
msgctxt "IDS_AG_DVD_MENU_UP"
msgid "DVD Menu Up"
-msgstr "DVD menu gore"
+msgstr "DVD izbornik gore"
msgctxt "IDS_AG_DVD_MENU_DOWN"
msgid "DVD Menu Down"
-msgstr "DVD menu dolje"
+msgstr "DVD izbornik dolje"
msgctxt "IDS_MPLAYERC_73"
msgid "DVD Menu Activate"
-msgstr "Aktiviraj DVD menu"
+msgstr "Aktiviraj DVD izbornik"
msgctxt "IDS_AG_DVD_MENU_BACK"
msgid "DVD Menu Back"
-msgstr "DVD menu nazad"
+msgstr "DVD izbornik nazad"
msgctxt "IDS_MPLAYERC_75"
msgid "DVD Menu Leave"
-msgstr "Napusti DVD-izbornik"
+msgstr "Napusti DVD izbornik"
msgctxt "IDS_AG_BOSS_KEY"
msgid "Boss key"
-msgstr "Glavna tipka"
+msgstr "Tipka za skrivanje"
msgctxt "IDS_MPLAYERC_77"
msgid "Player Menu"
@@ -1962,20 +1982,20 @@ msgid "Options"
msgstr "Opcije"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Slijedeći audio"
+msgid "Next Audio Track"
+msgstr "Sljedeća zvuÄna traka"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Prethodni audio"
+msgid "Prev Audio Track"
+msgstr "ProÅ¡la zvuÄna traka"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Idući titl"
+msgid "Next Subtitle Track"
+msgstr "Sljedeća titl traka"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Prethodni titl"
+msgid "Prev Subtitle Track"
+msgstr "Prošla titl traka"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1985,22 +2005,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Ponovno uÄitaj titlove"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Slijedeći audio (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Prethodni audio (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Idući titl (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Prethodni titl (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Idući kut (DVD)"
@@ -2010,20 +2014,20 @@ msgid "Prev Angle (DVD)"
msgstr "Prethodni kut (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Idući audio (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Sljedeća zvuÄna traka (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Prethodni audio (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "ProÅ¡la zvuÄna traka (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Idući titl (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Sljedeća titl traka (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Prethodni titl (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "Prošla titl traka (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2047,7 +2051,7 @@ msgstr "N"
msgctxt "IDS_DVB_CHANNEL_NAME"
msgid "Name"
-msgstr "Ime"
+msgstr "Naziv"
msgctxt "IDS_DVB_CHANNEL_FREQUENCY"
msgid "Frequency"
@@ -2091,7 +2095,7 @@ msgstr "Fokus izgubljen od: %s - %s"
msgctxt "IDS_AG_SUBTITLES_SAVED"
msgid "Subtitles saved"
-msgstr "Titlovi saÄuvani"
+msgstr "Titlovi spremljeni"
msgctxt "IDS_MAINFRM_4"
msgid "Cannot save subtitles"
@@ -2115,15 +2119,15 @@ msgstr "Baferi"
msgctxt "IDS_MAINFRM_9"
msgid "Volume: %02lu/%02lu, Title: %02lu/%02lu, Chapter: %02lu/%02lu"
-msgstr "Svezak: %02lu/%02lu, Naslov: %02lu/%02lu, Poglavlje: %02lu/%02lu."
+msgstr "Svezak: %02lu/%02lu, Naslov: %02lu/%02lu, Poglavlje: %02lu/%02lu"
msgctxt "IDS_MAINFRM_10"
msgid "Angle: %02lu/%02lu, %lux%lu %lu Hz %lu:%lu"
-msgstr "Kut: %02lu/%02lu, %lux%lu %luHz %lu:%lu"
+msgstr "Kut: %02lu/%02lu, %lux%lu %lu Hz %lu:%lu"
msgctxt "IDS_MAINFRM_11"
msgid "%s, %s %u Hz %d bits %d %s"
-msgstr "%s, %s %uHz %dbits %d %s."
+msgstr "%s, %s %u Hz %dbits %d %s."
msgctxt "IDS_ADD_TO_PLAYLIST"
msgid "Add to MPC-HC Playlist"
@@ -2135,7 +2139,7 @@ msgstr "Otvori sa MPC-HC"
msgctxt "IDS_CANNOT_CHANGE_FORMAT"
msgid "MPC-HC has not enough privileges to change files formats associations. Please click on the \"Run as administrator\" button."
-msgstr "MPC-HC nema dovoljno privilegija da bi promijenio asocijacije formata. Molimo pritisnite na botun \"Pokreni kao administrator\"."
+msgstr "MPC-HC nema dovoljno privilegija da bi promijenio asocijacije formata. Molimo kliknite \"Pokreni kao administrator\"."
msgctxt "IDS_APP_DESCRIPTION"
msgid "MPC-HC is an extremely light-weight, open source media player for Windows. It supports all common video and audio file formats available for playback. We are 100% spyware free, there are no advertisements or toolbars."
@@ -2231,7 +2235,7 @@ msgstr ", Ukupno: %ld, Ispušteno: %ld"
msgctxt "IDS_MAINFRM_38"
msgid ", Size: %I64d KB"
-msgstr ", VeliÄina: %I64dKB"
+msgstr ", VeliÄina: %I64d KB"
msgctxt "IDS_MAINFRM_39"
msgid ", Size: %I64d MB"
@@ -2239,7 +2243,7 @@ msgstr ", VeliÄina: %I64d MB"
msgctxt "IDS_MAINFRM_40"
msgid ", Free: %I64d KB"
-msgstr ", Slobodno %I64KB"
+msgstr ", Slobodno %I64 KB"
msgctxt "IDS_MAINFRM_41"
msgid ", Free: %I64d MB"
@@ -2267,7 +2271,7 @@ msgstr "Odaberite putanju za DVD/BD:"
msgctxt "IDS_SUB_LOADED_SUCCESS"
msgid " loaded successfully"
-msgstr "UspjeÅ¡no uÄitano"
+msgstr "uspjeÅ¡no uÄitano"
msgctxt "IDS_ALL_FILES_FILTER"
msgid "All files (*.*)|*.*||"
@@ -2303,7 +2307,7 @@ msgstr "Neispravan format slike, ne mogu se kreirati sliÄice s %d bpp dibs."
msgctxt "IDS_THUMBNAILS_INFO_FILESIZE"
msgid "File Size: %s (%s bytes)\\N"
-msgstr "VeliÄina datoteke: %s (%s bytes)\\N"
+msgstr "VeliÄina datoteke: %s (%s bajta)\\N"
msgctxt "IDS_THUMBNAILS_INFO_HEADER"
msgid "{\\an7\\1c&H000000&\\fs16\\b0\\bord0\\shad0}File Name: %s\\N%sResolution: %dx%d %s\\NDuration: %02d:%02d:%02d"
@@ -2331,7 +2335,7 @@ msgstr "Omjer: Zadano"
msgctxt "IDS_MAINFRM_70"
msgid "Audio delay: %I64d ms"
-msgstr "Kašnjenje audia: %I64dms"
+msgstr "Kašnjenje zvuka: %I64d ms"
msgctxt "IDS_AG_CHAPTER"
msgid "Chapter %d"
@@ -2367,36 +2371,28 @@ msgstr "Greška pri renderiranju datoteke"
msgctxt "IDS_PPSDB_BADURL"
msgid "Bad URL, could not locate subtitle database there!"
-msgstr "Nevaljali URL - ne mogu locirati titlove"
+msgstr "Nevaljali URL - nemoguće locirati data-bazu titlove!"
msgctxt "IDS_AG_CHAPTER2"
msgid "Chapter: "
-msgstr "Poglavlje"
+msgstr "Poglavlje:"
msgctxt "IDS_VOLUME_OSD"
msgid "Vol: %d%%"
-msgstr "Vol: %d%%."
+msgstr "Zvuk: %d%%."
msgctxt "IDS_BOOST_OSD"
msgid "Boost: +%u%%"
-msgstr "PojaÄanje: +%u%%."
+msgstr "PojaÄanje: +%u%%"
msgctxt "IDS_BALANCE_OSD"
msgid "Balance: %s"
-msgstr "Balans: %s."
+msgstr "Balans: %s"
msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Trenutni"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC se neoÄekivano ugasio. Da bi nam pomogli popraviti ovu greÅ¡ku, molimo Vas da nam poÅ¡aljete datoteku %s na naÅ¡ bug tracker.\n\nJe li želite sada otvoriti mjesto minidump datoteke i posjetiti bug tracker?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Greška pri kreiranju dump datoteke u %s (error %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Odaberi mapu"
@@ -2570,8 +2566,8 @@ msgid "Volume boost Max"
msgstr "PojaÄanje glasnoće max"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "KoriÅ¡tenje: mpc-hc.exe \"putanja\" [prekidaÄi]\n\n\"putanja\"⇥Glavna datoteka ili mapa za pokrenuti(zamjenski znakovi\n⇥⇥dopuÅ¡teni, \"-\" oznaÄava standardni ulaz)\n/dub \"naziv sinkronizacije\"⇥Pokrenuti dodatnu zvuÄnu datoteku\n/dubdelay \"datoteka\"⇥Pokrenuti dodatnu audio datoteku pomaknutu\n⇥⇥ za XXms (ako datoteka sadrži \"...POMAK XXms...\")\n/d3dfs⇥⇥ZapoÄni izvoÄ‘enje u D3D naÄinu punog ekrana\n/sub \"naziv titla\"⇥Pokreni dodatnu titl datoteku\n/filter \"naziv filtera\"⇥Pokreni DirectShow filtere iz knjižnice\n⇥⇥dinamiÄkog linka (zamjenski znakovi dopuÅ¡teni)\n/dvd⇥⇥Pokreni u dvd naÄinu, \"putanja\" znaÄi dvd\n⇥⇥mapa (opcionalno)\n/dvdpos T#C⇥ZapoÄeti reprodukciju na nazivu T, poglavlju C\n/dvdpos T#hh:mm⇥ZapoÄeti reprodukciju na nazivu T, pozicija hh:mm:ss\n/cd⇥⇥Pokreni sve trake zvuÄnog cd ili (s)vcd,\n⇥⇥\"putanja\" znaÄi ureÄ‘aja (opcionalno)\n/device⇥⇥Otvori zadani video ureÄ‘aj\n/open⇥⇥Otvori datoteku bez automatskog pokretanja reprodukcije\n/play⇥⇥ZapoÄeti reprodukciju datoteke Äim je izvoÄ‘aÄ\n⇥⇥pokrenut\n/close⇥⇥Zatvori izvoÄ‘aÄ nakon reprodukcije (radi samo kad\n⇥⇥se koristi sa /play)\n/shutdown⇥Ugasi operativni sustav nakon reprodukcije\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen⇥ZapoÄeti u naÄinu punog ekrana\n/minimized⇥ZapoÄeti u minimaliziranom naÄinu\n/new⇥⇥Koristiti novu instancu izvoÄ‘aÄa\n/add⇥⇥Dodati \"putanju\" u listu izvoÄ‘enja, može biti kombinirano\n⇥⇥sa /open i /play\n/randomize\tRandomize the playlist\n/regvid⇥⇥Stvoriti povezanost nastavaka za video datoteke\n/regaud⇥⇥Stvoriti povezanost nastavaka za zvuÄne datoteke\n/regpl⇥⇥Stvoriti povezanost nastavaka za datoteke lista izvoÄ‘enja\n/regall⇥⇥Stvoriti povezanost nastavaka za sve podržane datoteke\n/unregall⇥⇥Maknuti sve povezanosti datoteÄnih nastavaka\n/start ms⇥⇥ZapoÄeti reprodukciju u \"ms\" (= milisekundi)\n/startpos hh:mm:ss⇥ZapoÄeti reprodukciju na poziciji hh:mm:ss\n/fixedsize w,h⇥Namjestiti fiksiranu veliÄinu prozora\n/monitor N⇥ZapoÄeti izvoÄ‘aÄ na ekranu N, gdje N poÄinje od 1\n/audiorenderer N⇥ZapoÄeti zvuÄni izvoÄ‘aÄ N, gdje N poÄinje od 1\n⇥⇥(pogledati \"Izlaz\" postavke)\n/shaderpreset \"Pr\"⇥ZapoÄeti koristiti \"Pr\" shader postavku\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset⇥⇥Vratiti zadane postavke\n/help /h /?⇥Prikazati pomoć prekidaÄa komandne linije\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "KoriÅ¡tenje: mpc-hc.exe \"putanja\" [prekidaÄi]\n\n\"putanja\"⇥Glavna datoteka ili mapa za pokrenuti(zamjenski znakovi\n⇥⇥dopuÅ¡teni, \"-\" oznaÄava standardni ulaz)\n/dub \"naziv sinkronizacije\"⇥Pokrenuti dodatnu zvuÄnu datoteku\n/dubdelay \"datoteka\"⇥Pokrenuti dodatnu audio datoteku pomaknutu\n⇥⇥ za XXms (ako datoteka sadrži \"...POMAK XXms...\")\n/d3dfs⇥⇥ZapoÄni izvoÄ‘enje u D3D naÄinu punog ekrana\n/sub \"naziv titla\"⇥Pokreni dodatnu titl datoteku\n/filter \"naziv filtera\"⇥Pokreni DirectShow filtere iz knjižnice\n⇥⇥dinamiÄkog linka (zamjenski znakovi dopuÅ¡teni)\n/dvd⇥⇥Pokreni u dvd naÄinu, \"putanja\" znaÄi dvd\n⇥⇥mapa (opcionalno)\n/dvdpos T#C⇥ZapoÄeti reprodukciju na nazivu T, poglavlju C\n/dvdpos T#hh:mm⇥ZapoÄeti reprodukciju na nazivu T, pozicija hh:mm:ss\n/cd⇥⇥Pokreni sve trake zvuÄnog cd ili (s)vcd,\n⇥⇥\"putanja\" znaÄi ureÄ‘aja (opcionalno)\n/device⇥⇥Otvori zadani video ureÄ‘aj\n/open⇥⇥Otvori datoteku bez automatskog pokretanja reprodukcije\n/play⇥⇥ZapoÄeti reprodukciju datoteke Äim je izvoÄ‘aÄ\n⇥⇥pokrenut\n/close⇥⇥Zatvori izvoÄ‘aÄ nakon reprodukcije (radi samo kad\n⇥⇥se koristi sa /play)\n/shutdown⇥Ugasi operativni sustav nakon reprodukcije\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen⇥ZapoÄeti u naÄinu punog ekrana\n/minimized⇥ZapoÄeti u minimaliziranom naÄinu\n/new⇥⇥Koristiti novu instancu izvoÄ‘aÄa\n/add⇥⇥Dodati \"putanju\" u listu izvoÄ‘enja, može biti kombinirano\n⇥⇥sa /open i /play\n/randomize\tRandomize the playlist\n/regvid⇥⇥Stvoriti povezanost nastavaka za video datoteke\n/regaud⇥⇥Stvoriti povezanost nastavaka za zvuÄne datoteke\n/regpl⇥⇥Stvoriti povezanost nastavaka za datoteke lista izvoÄ‘enja\n/regall⇥⇥Stvoriti povezanost nastavaka za sve podržane datoteke\n/unregall⇥⇥Maknuti sve povezanosti datoteÄnih nastavaka\n/start ms⇥⇥ZapoÄeti reprodukciju u \"ms\" (= milisekundi)\n/startpos hh:mm:ss⇥ZapoÄeti reprodukciju na poziciji hh:mm:ss\n/fixedsize w,h⇥Namjestiti fiksiranu veliÄinu prozora\n/monitor N⇥ZapoÄeti izvoÄ‘aÄ na ekranu N, gdje N poÄinje od 1\n/audiorenderer N⇥ZapoÄeti zvuÄni izvoÄ‘aÄ N, gdje N poÄinje od 1\n⇥⇥(pogledati \"Izlaz\" postavke)\n/shaderpreset \"Pr\"⇥ZapoÄeti koristiti \"Pr\" shader postavku\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset⇥⇥Vratiti zadane postavke\n/help /h /?⇥Prikazati pomoć prekidaÄa komandne linije\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3045,18 +3041,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Aspect ratio"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Korist WASAPI (restartiraj reprodukciju)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Stišati na brzom pomicanju"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "ZvuÄni ureÄ‘aj:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: Uklj."
@@ -3613,3 +3597,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Postavke"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.hu.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.hu.dialogs.po
index 0a7429106..65f12ab50 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.hu.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.hu.dialogs.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-30 18:50+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-11-04 17:52+0000\n"
"Last-Translator: Máté <lang.mate@gmail.com>\n"
-"Language-Team: Hungarian (http://www.transifex.com/projects/p/mpc-hc/language/hu/)\n"
+"Language-Team: Hungarian (http://www.transifex.com/mpc-hc/mpc-hc/language/hu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -472,10 +472,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Audiófájlok auto betöltése"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Beépített feliratrenderelő használata"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Vezérlés"
@@ -676,9 +672,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "KIS MÉRET tiltása ha nem az Alapértelmezett monitoron van a Teljes képernyő"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Windows 7 Tálcafunkciók használata"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Modern tálca funkciók használata"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1169,7 +1165,7 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
+msgid "Subtitles"
msgstr "Feliratok"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
@@ -1185,8 +1181,8 @@ msgid "Rotation"
msgstr "Forgatás"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Külső szűrők (például a VSFilter) minden renderelőn meg tudják jeleníteni a feliratokat."
+msgid "Subtitle Renderer"
+msgstr "Felirat renderelő"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1204,6 +1200,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Hozzáférés engedélyezése csak localhost számára"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Előnézet engedélyezése"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Hibakeresési információ (debug info) megjelenítése"
@@ -1246,7 +1246,7 @@ msgstr "Mentés másként..."
msgctxt "IDD_PPAGEMISC_IDC_STATIC"
msgid "Color controls (for VMR-9, EVR and madVR)"
-msgstr "Színbeállítások (VMR-9, EVR és madVR rendererhez)"
+msgstr "Színbeállítások (VMR-9, EVR és madVR renderelőhöz)"
msgctxt "IDD_PPAGEMISC_IDC_STATIC"
msgid "Brightness"
@@ -1652,6 +1652,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Alapértelmezés"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Eszköz"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Exkluzív mód"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Bitstreaming engedélyezése"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Beállítások"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Sztereó crossfeed engedélyezése (fejhallgatókhoz)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Szint:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Megjegyzés"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG minőség:"
@@ -1668,9 +1712,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Összeomlás jelentő"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Sajnáljuk, úgy tűnik, hogy az MPC-HC összeomlott. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Hibajelentés küldése a hiba felderítéséhez és kijavításához."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Sajnáljuk, úgy tűnik, hogy az MPC-HC összeomlott. :(\n\nHogy segítsen kideríteni és kijavítani a hibát, egy hibajelentés el lesz küldve. Megadhat további információkat is."
+msgid "Optional information"
+msgstr "Opcionális információk"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1684,7 +1736,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Probléma leírása (angolul):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "MPC-HC újraindítása"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "MPC-HC bezárása"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.hu.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.hu.menus.po
index 84d2dff9b..93278f9d3 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.hu.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.hu.menus.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
"PO-Revision-Date: 2015-05-27 15:16+0000\n"
"Last-Translator: Máté <lang.mate@gmail.com>\n"
-"Language-Team: Hungarian (http://www.transifex.com/projects/p/mpc-hc/language/hu/)\n"
+"Language-Team: Hungarian (http://www.transifex.com/mpc-hc/mpc-hc/language/hu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.hu.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.hu.strings.po
index 8fb033690..1cc4de46f 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.hu.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.hu.strings.po
@@ -2,15 +2,15 @@
# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
-# Fridrich Losonszki <losonszki@gmail.com>, 2015
+# Fridrich Losonszki, 2015
# Máté <lang.mate@gmail.com>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-30 19:00+0000\n"
-"Last-Translator: Máté <lang.mate@gmail.com>\n"
-"Language-Team: Hungarian (http://www.transifex.com/projects/p/mpc-hc/language/hu/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Hungarian (http://www.transifex.com/mpc-hc/mpc-hc/language/hu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -151,7 +151,7 @@ msgstr "Csak különböző videótípusok váltásakor (alapértelmezett)"
msgctxt "IDS_PPAGE_CAPTURE_SFG2"
msgid "Always (may be required by some devices)"
-msgstr ""
+msgstr "Mindig (szükséges lehet néhány eszközhöz)"
msgctxt "IDS_INFOBAR_PARENTAL_RATING"
msgid "Parental rating"
@@ -326,11 +326,11 @@ msgid "On/Off"
msgstr "Be/Ki"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr "FPS-től"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr "FPS-ig"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -465,6 +465,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Lejátszás::Ãrnyékolók"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Erőforrások"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Egyéb beállítások"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "Média Infó"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Lejátszás::Rögzítés"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Lejátszás::Sync Renderer beállítások"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Lejátszás::Teljes Képernyő"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Belső szűrők::Audió renderelő"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Audió-váltó"
@@ -557,30 +585,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Feliratok::Adatbázis"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Erőforrások"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Egyéb beállítások"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "Média Infó"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Lejátszás::Rögzítés"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Lejátszás::Sync Renderer Beállítások"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Lejátszás::Teljes Képernyő"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Jellemzők"
@@ -673,22 +677,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "A videó-felület normál képernyőn-kívüli (offscreen) felületként lesz lefoglalva."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "Az MPC Audio Renderer hibás, ne használja."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Hibajelentés"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr ""
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr ""
@@ -741,9 +733,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (uncompressed)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Belső audió renderelő"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1393,6 +1385,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Lejátszás után: Bezárás"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Belső felirat renderelő"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Eszköz megnyitása"
@@ -1677,6 +1689,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Fájlnév megjelenítése"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "DVD lejátszása"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "BD lejátszása"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: Renderelő statisztika megjelenítése"
@@ -1958,19 +1978,19 @@ msgid "Options"
msgstr "Beállítások"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Következő audió"
+msgid "Next Audio Track"
+msgstr "Következő hangsáv"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Előző audió"
+msgid "Prev Audio Track"
+msgstr "Előző hangsáv"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
+msgid "Next Subtitle Track"
msgstr "Következő felirat"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
+msgid "Prev Subtitle Track"
msgstr "Előző felirat"
msgctxt "IDS_MPLAYERC_85"
@@ -1981,22 +2001,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Feliratok újratöltése"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Következő audió (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Előző audió (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Következő felirat (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Előző felirat (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Következő látószög (DVD)"
@@ -2006,19 +2010,19 @@ msgid "Prev Angle (DVD)"
msgstr "Előző látószög (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Következő audió (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Következő hangsáv (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Előző audió (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Előző hangsáv (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
+msgid "Next Subtitle Track (DVD)"
msgstr "Következő felirat (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
+msgid "Prev Subtitle Track (DVD)"
msgstr "Előző felirat (DVD)"
msgctxt "IDS_MPLAYERC_97"
@@ -2385,14 +2389,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Aktuális"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr ""
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "A memóriakiíratás (dump) fájl nem hozható létre az adott helyen: '%s' (hiba %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Mappa kiválasztása"
@@ -2566,8 +2562,8 @@ msgid "Volume boost Max"
msgstr "Hangerő erősítés Max"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Használat: mpc-hc.exe \"pathname\" [kapcsolók]\n\n\"pathname\"\tA fÅ‘ betöltendÅ‘ fájl vagy mappa helye (spec. helyettesítÅ‘ karakterek \n\t\tengedélyezve, \"-\" denotes standard input)\n/dub \"dubname\"\tBetölt egy külön audió fájlt\n/dubdelay \"file\"\tBetölt egy külön audió fájlt XX ms-al eltolva (ha a\n\t\tfájl tartalmaz \"...DELAY XXms...\")\n/d3dfs\t\tlejátszó indítása D3D teljes képernyÅ‘s módban\n/sub \"subname\"\tBetölt egy külön felirat fájlt\n/filter \"filtername\"\tDirectShow szűrÅ‘ket tölt be egy dynamic link\n\t\tlibrary-ból (spec. helyettesítÅ‘ karakterek tengedélyezve)\n/dvd\t\tDVD módban való futtatás, a \"pathname\" a dvd \n\t\tmappáját jelenti (opcionális)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tBetölti egy audió CD vagy egy (s)vcd összes műsorszámát, a\n\t\t\"pathname\" a meghajtó betűjelét jelenti (opcionális)\n/device\t\tOpen the default video device\n/open\t\tMegnyitja a fájlt, de nem kezdi el automatikusan eljátszani\n/play\t\tKezdje el lejátszani a fájlt, amint a lejátszó\n\t\telindul\n/close\t\tZárja be a lejátszót a műsör befejezÅ‘dése után (csak a /play kapcsolóval\n\t\tegyütt használható)\n/shutdown\tÃllítsa le a rendszert a műsor lejátszásának befejezÅ‘dése után\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tIndítás teljes képernyÅ‘s módban\n/minimized\tMinimalizált formában való indítás\n/new\t\tA lejátszó egy új példányának használata\n/add\t\tA \"pathname\" hozzáadása a lejátszási listához, összekombinálható \n\t\taz /open és /play kapcsolóval\n/randomize\tRandomize the playlist\n/regvid\t\tVideó formátumok beregisztrálása\n/regaud\t\tAudió formátumok beregisztrálása\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tVideó formátumok beregisztráltságának megszüntetése\n/start ms\t\tX \"ms\" (= ezredmásodperc) után induljon a lejátszás\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tFix ablakméret beállítása\n/monitor N\tIndítás az N. monitoron, ahol N egytÅ‘l indul\n/audiorenderer N\tN. audió átalakító használata, ahol N egytÅ‘l indul\n\t\t(lásd \"Kimenet\" beállítások)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tMegmutatja a parancssori kapcsolókról szóló súgót\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Használat: mpc-hc.exe \"pathname\" [kapcsolók]\n\n\"pathname\"\tA fÅ‘ betöltendÅ‘ fájl vagy mappa helye (spec. helyettesítÅ‘ karakterek \n\t\tengedélyezve, \"-\" denotes standard input)\n/dub \"dubname\"\tBetölt egy külön audió fájlt\n/dubdelay \"file\"\tBetölt egy külön audió fájlt XX ms-al eltolva (ha a\n\t\tfájl tartalmaz \"...DELAY XXms...\")\n/d3dfs\t\tlejátszó indítása D3D teljes képernyÅ‘s módban\n/sub \"subname\"\tBetölt egy külön felirat fájlt\n/filter \"filtername\"\tDirectShow szűrÅ‘ket tölt be egy dynamic link\n\t\tlibrary-ból (spec. helyettesítÅ‘ karakterek tengedélyezve)\n/dvd\t\tDVD módban való futtatás, a \"pathname\" a dvd \n\t\tmappáját jelenti (opcionális)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tBetölti egy audió CD vagy egy (s)vcd összes műsorszámát, a\n\t\t\"pathname\" a meghajtó betűjelét jelenti (opcionális)\n/device\t\tOpen the default video device\n/open\t\tMegnyitja a fájlt, de nem kezdi el automatikusan eljátszani\n/play\t\tKezdje el lejátszani a fájlt, amint a lejátszó\n\t\telindul\n/close\t\tZárja be a lejátszót a műsör befejezÅ‘dése után (csak a /play kapcsolóval\n\t\tegyütt használható)\n/shutdown\tÃllítsa le a rendszert a műsor lejátszásának befejezÅ‘dése után\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tIndítás teljes képernyÅ‘s módban\n/minimized\tMinimalizált formában való indítás\n/new\t\tA lejátszó egy új példányának használata\n/add\t\tA \"pathname\" hozzáadása a lejátszási listához, összekombinálható \n\t\taz /open és /play kapcsolóval\n/randomize\tRandomize the playlist\n/regvid\t\tVideó formátumok beregisztrálása\n/regaud\t\tAudió formátumok beregisztrálása\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tVideó formátumok beregisztráltságának megszüntetése\n/start ms\t\tX \"ms\" (= ezredmásodperc) után induljon a lejátszás\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tFix ablakméret beállítása\n/monitor N\tIndítás az N. monitoron, ahol N egytÅ‘l indul\n/audiorenderer N\tN. audió átalakító használata, ahol N egytÅ‘l indul\n\t\t(lásd \"Kimenet\" beállítások)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tMegmutatja a parancssori kapcsolókról szóló súgót\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3041,18 +3037,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Képméretarány"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "WASAPI használata (lejátszás újraindítása szükséges)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Elnémítás előretekeréskor"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Hang eszköz:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "Függőleges szinkronizáció: Bekapcsolva"
@@ -3475,11 +3459,11 @@ msgstr ""
msgctxt "IDS_CAPTURE_ERROR_OUT_FILE"
msgid "Error initializing the output file."
-msgstr ""
+msgstr "Hiba a kimeneti fájl inicializálása közben."
msgctxt "IDS_CAPTURE_ERROR_AUD_OUT_FILE"
msgid "Error initializing the audio output file."
-msgstr ""
+msgstr "Hiba a kimeneti audió fájl inicializálása közben."
msgctxt "IDS_SUBRESYNC_TIME_FORMAT"
msgid "The correct time format is [-]hh:mm:ss.ms (e.g. 01:23:45.678)."
@@ -3609,3 +3593,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Beállítások"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.hy.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.hy.dialogs.po
index da7d7dd3d..11eff3e8d 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.hy.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.hy.dialogs.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from dialogs
-# Copyright (C) 2002 - 2015 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
-# Hrant Ohanyan <h.ohanyan@haysoft.org>, 2014
+# Hrant Ohanyan <h.ohanyan@haysoft.org>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-09-19 20:08:04+0000\n"
-"PO-Revision-Date: 2014-10-20 10:21+0000\n"
-"Last-Translator: Underground78\n"
-"Language-Team: Armenian (http://www.transifex.com/projects/p/mpc-hc/language/hy/)\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-20 09:33+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Armenian (http://www.transifex.com/mpc-hc/mpc-hc/language/hy/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -26,7 +26,7 @@ msgstr "Ô¼Ô±ÕŽ"
msgctxt "IDD_SELECTMEDIATYPE_IDCANCEL"
msgid "Cancel"
-msgstr "Õ„Õ¥Ö€ÕªÕ¥Õ¬"
+msgstr "Õ‰Õ¥Õ²Õ¡Ö€Õ¯Õ¥Õ¬"
msgctxt "IDD_CAPTURE_DLG_IDC_STATIC1"
msgid "Video"
@@ -206,7 +206,7 @@ msgstr "Ô¿Õ¡Õ¼Õ¸Ö‚ÖÕ´Õ¡Õ¶ Õ¿Õ¥Õ²Õ¥Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨"
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "Version:"
-msgstr "ÕÕ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¨."
+msgstr "ÕÕ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯."
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "Compiler:"
@@ -222,7 +222,7 @@ msgstr "Ô¿Õ¡Õ¼Õ¸Ö‚ÖÕ´Õ¡Õ¶ Õ¡Õ´Õ½Õ¡Õ©Õ«Õ¾Õ¨."
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "Operating system"
-msgstr "Õ•ÕºÕ¥Ö€Õ¡ÖÕ«Õ¸Õ¶ Õ°Õ¡Õ´Õ¡Õ¯Õ¡Ö€Õ£Õ¨"
+msgstr "Õ•ÕºÕ¥Ö€Õ¡ÖÕ«Õ¸Õ¶ Õ°Õ¡Õ´Õ¡Õ¯Õ¡Ö€Õ£"
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "Name:"
@@ -306,7 +306,7 @@ msgstr "Ô³Õ¸Ö€Õ®Õ¸Õ²Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ¢Õ¡Ö€Õ±Ö€ Õ¡Õ¼Õ¡Õ»Õ¶Õ¡ÕµÕ¶Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK14"
msgid "Enable cover-art support"
-msgstr ""
+msgstr "Õ„Õ«Õ¡ÖÕ¶Õ¥Õ¬ cover-art-Õ« Õ¡Õ»Õ¡Õ¯ÖÕ¸Ö‚Õ´"
msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
msgid "History"
@@ -386,11 +386,11 @@ msgstr "Ô²Õ¡Ö€Õ±Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Min"
-msgstr ""
+msgstr "Õ†Õ¾Õ¦."
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Max"
-msgstr ""
+msgstr "Ô±Õ¼Õ¾."
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC_BALANCE"
msgid "Balance"
@@ -398,11 +398,11 @@ msgstr "Ô²Õ¡Õ¬Õ¡Õ¶Õ½Õ¨"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "L"
-msgstr ""
+msgstr "L"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "R"
-msgstr ""
+msgstr "R"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Playback"
@@ -422,7 +422,7 @@ msgstr "Õ¡Õ¶Õ£Õ¡Õ´"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "After Playback"
-msgstr ""
+msgstr "Õ†Õ¾Õ¡Õ£Õ¡Ö€Õ¯Õ¸Ö‚Õ´Õ«Ö Õ°Õ¥Õ¿Õ¸"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Output"
@@ -472,10 +472,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "ÕÕ¡ÕµÕ¶Õ« Ö†Õ¡ÕµÕ¬Õ¥Ö€Õ« Õ«Õ¶Ö„Õ¶Õ¡Õ¢Õ¡ÖÕ¸Ö‚Õ´"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr ""
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Ô¿Õ¡Õ¼Õ¡Õ¾Õ¡Ö€Õ¸Ö‚Õ´"
@@ -514,7 +510,7 @@ msgstr "%"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "Delay step"
-msgstr ""
+msgstr "ÕˆÖ‚Õ·Õ¡ÖÕ´Õ¡Õ¶ Ö„Õ¡ÕµÕ¬"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "ms"
@@ -534,35 +530,35 @@ msgstr "Ô±Ö€Õ¿Õ¡ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ´Õ¡Õ¶ Õ´Õ¡Ö„Õ½Õ«Õ´Õ¡Õ¬ Õ¨Õ¶Õ¤Õ¬Õ¡ÕµÕ¶Õ¸Ö‚Õ´Õ¨."
msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_NO_SUB_ANIM"
msgid "Never animate the subtitles"
-msgstr ""
+msgstr "ÔµÖ€Õ¢Õ¥Ö„ Õ¹Õ·Õ¡Ö€ÕªÕ¸Ö‚Õ¶Õ¡ÖÕ¶Õ¥Õ¬ Õ¿Õ¸Õ²Õ¡Õ£Ö€Õ¥Ö€Õ¨"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC5"
msgid "Render at"
-msgstr ""
+msgstr "Õ†ÕµÕ¸Ö‚Õ©Õ¡Õ¾Õ¸Ö€Õ¥Õ¬"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC6"
msgid "% of the animation"
-msgstr ""
+msgstr "% Õ·Õ¡Ö€ÕªÕ¸Ö‚Õ¶Õ¡ÖÕ¸Ö‚Õ´"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC7"
msgid "Animate at"
-msgstr ""
+msgstr "Õ‡Õ¡Ö€ÕªÕ¸Ö‚Õ¶Õ¡ÖÕ¶Õ¥Õ¬"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC8"
msgid "% of the video frame rate"
-msgstr ""
+msgstr "% Õ¿Õ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©Õ« Ô¿Õ¡Õ¤Ö€Õ¥Ö€Õ« Õ°Õ¡Õ³Õ¡Õ­Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨"
msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_ALLOW_DROPPING_SUBPIC"
msgid "Allow dropping some subpictures if the queue is running late"
-msgstr ""
+msgstr "Ô¹Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¥Õ¬ ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ¶Õ¥Ö€Õ« Õ¸Ö€Õ¸Õ· Õ´Õ¡Õ½Õ¥Ö€Õ« Õ£ÖÕ¸Ö‚Õ´Õ¨, Õ¥Õ©Õ¥ Õ°Õ¥Ö€Õ©Õ¨ Õ¸Ö‚Õ·Õ¡Õ¶Õ¸Ö‚Õ´ Õ§"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "Renderer Layout"
-msgstr ""
+msgstr "Õ†ÕµÕ¸Ö‚Õ©Õ¡Õ¾Õ¸Ö€Õ«Õ¹Õ« Õ¤Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶"
msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_SUB_AR_COMPENSATION"
msgid "Apply aspect ratio compensation for anamorphic videos"
-msgstr ""
+msgstr "Ô¿Õ«Ö€Õ¡Õ¼Õ¥Õ¬ Õ¯Õ¸Õ²Õ´Õ¥Ö€Õ« Õ°Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶ ÖƒÕ¸Õ­Õ°Õ¡Õ¿Õ¸Ö‚ÖÕ¸Ö‚Õ´Õ¨ Õ¡Õ¶Õ¡Õ´Õ¸Ö€Ö†Õ«Õ¯ Õ¿Õ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©Õ¥Ö€Õ« Õ°Õ¡Õ´Õ¡Ö€"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "Warning"
@@ -590,15 +586,15 @@ msgstr "Ô±Õ½Õ¸ÖÕ«Õ¡ÖÕ¸Ö‚Õ´Õ¶Õ¥Ö€"
msgctxt "IDD_PPAGEFORMATS_IDC_CHECK8"
msgid "Use the format-specific icons"
-msgstr ""
+msgstr "Õ•Õ£Õ¿. Õ±Ö‡Õ¡Õ¹Õ¡ÖƒÕ« Õ¸Ö‚Ö€Õ¸Ö‚ÕµÕ¶ ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ¡Õ¯Õ¶Õ¥Ö€"
msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON1"
msgid "Run as &administrator"
-msgstr ""
+msgstr "Õ„Õ¥Õ¯Õ¶Õ¡Ö€Õ¯Õ¥Õ¬ Õ¸Ö€ÕºÕ¥Õ½ &Õ¡Õ¤Õ´Õ«Õ¶"
msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON7"
msgid "Set as &default program"
-msgstr ""
+msgstr "Õ†Õ·Õ¥Õ¬ Õ¸Ö€ÕºÕ¥Õ½ &Õ°Õ«Õ´Õ¶Õ¡Õ¯Õ¡Õ¶ Õ®Ö€Õ¡Õ£Õ«Ö€"
msgctxt "IDD_PPAGEFORMATS_IDC_STATIC"
msgid "Real-Time Streaming Protocol handler (for rtsp://... URLs)"
@@ -676,9 +672,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Õ‰ÖƒÕ¸Ö„Ö€Õ¡ÖÕ¶Õ¥Õ¬ ÕºÕ¡Õ¿Õ¸Ö‚Õ°Õ¡Õ¶Õ¨Õ Ô±Õ´Õ¢Õ¸Õ²Õ» Õ§Õ¯Ö€Õ¡Õ¶Õ¸Õ¾ Õ¸Õ¹ Õ°Õ«Õ´Õ¶Õ¡Õ¯Õ¡Õ¶ Õ´Õ¸Õ¶Õ«Õ¿Õ¸Ö€Õ« Õ¾Ö€Õ¡ Õ¾Õ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¥Õ¬Õ«Õ½Ö‰"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Õ•Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ Windows 7-Õ« Õ¡Õ¼Õ¡Õ»Õ¡Õ¤Ö€Õ¡Õ¶Ö„Õ« Õ¾Õ¡Õ°Õ¡Õ¶Õ¡Õ¯Õ« Õ°Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€Õ¨"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -698,7 +694,7 @@ msgstr "Õ„Õ«Õ¡ÖÕ¶Õ¥Õ¬ Logitech LCD-Õ« Õ¡Õ»Õ¡Õ¯ÖÕ¸Ö‚Õ´Õ¨ (ÖƒÕ¸Ö€Õ±Õ¡Ö€Õ¯Õ¾Õ¸Ö‚Õ
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK3"
msgid "Auto-hide the mouse pointer during playback in windowed mode"
-msgstr ""
+msgstr "Ô»Õ¶Ö„Õ¶Õ¡Õ©Õ¡Ö„ÖÕ¶Õ¥Õ¬ Õ´Õ¯Õ¶Õ«Õ¯Õ« Õ¶Õ·Õ¸Ö€Õ¤Õ¨ Õ¶Õ¾Õ¡Õ£Õ¡Ö€Õ¯Õ¥Õ¬Õ«Õ½ ÕºÕ¡Õ¿Õ¸Ö‚Õ°Õ¡Õ¶Õ« Õ¯Õ¥Ö€ÕºÕ¸Ö‚Õ´"
msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON1"
msgid "Add Filter..."
@@ -714,7 +710,7 @@ msgstr "Õ†Õ¡Õ­Õ¡ÕºÕ¡Õ¿Õ¾Õ¥Õ¬"
msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_RADIO2"
msgid "Block"
-msgstr "Ô¿Õ¸Õ²ÖƒÕ¥Õ¬"
+msgstr "Ô¿Õ¡ÕºÕ¡Õ¶Õ¥Õ¬"
msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_RADIO3"
msgid "Set merit:"
@@ -730,11 +726,11 @@ msgstr "ÕŽÕ¡Ö€"
msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON5"
msgid "Add Media Type..."
-msgstr "Õ†Õ¸Ö€ Õ¿Õ¥Õ½Õ¡Õ¯..."
+msgstr "Ô±Õ¾Õ¥Õ¬Õ¡ÖÕ¶Õ¥Õ¬ Õ´Õ¥Õ¤Õ«Õ¡ÕµÕ« Õ¿Õ¥Õ½Õ¡Õ¯..."
msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON6"
msgid "Add Sub Type..."
-msgstr "Õ†Õ¸Ö€ Õ¿Õ¸Õ²Õ¡Õ£Õ«Ö€..."
+msgstr "Ô±Õ¾Õ¥Õ¬Õ¡ÖÕ¶Õ¥Õ¬ Õ¿Õ¸Õ²Õ¡Õ£Ö€Õ« Õ¿Õ¥Õ½Õ¡Õ¯.."
msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON7"
msgid "Delete"
@@ -742,23 +738,23 @@ msgstr "Õ‹Õ¶Õ»Õ¥Õ¬"
msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON8"
msgid "Reset List"
-msgstr "ÔµÕ¿Õ¡Ö€Õ¯Õ¥Õ¬"
+msgstr "ÕŽÕ¥Ö€Õ¡Õ¯Õ¡ÕµÕ¥Õ¬ ÖÕ¡Õ¶Õ¯Õ¨"
msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
msgid "Type:"
-msgstr "ÕÕ¥Õ½Õ¡Õ¯Õ¨."
+msgstr "ÕÕ¥Õ½Õ¡Õ¯."
msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
msgid "Size:"
-msgstr "Ô¾Õ¡Õ¾Õ¡Õ¬Õ¨."
+msgstr "Õ‰Õ¡Öƒ."
msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
msgid "Media length:"
-msgstr "ÕÖ‡Õ¸Õ²Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨."
+msgstr "ÕÖ‡Õ¸Õ²Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶."
msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
msgid "Video size:"
-msgstr "Õ‰Õ¡ÖƒÕ¨."
+msgstr "ÕÕ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©Õ« Õ¹Õ¡Öƒ."
msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
msgid "Created:"
@@ -802,7 +798,7 @@ msgstr "Õ€Õ«Õ·Õ¥Õ¬ Õ¤Õ«Ö€Ö„Õ¨"
msgctxt "IDD_FAVADD_IDCANCEL"
msgid "Cancel"
-msgstr "Õ„Õ¥Ö€ÕªÕ¥Õ¬"
+msgstr "Õ‰Õ¥Õ²Õ¡Ö€Õ¯Õ¥Õ¬"
msgctxt "IDD_FAVADD_IDOK"
msgid "OK"
@@ -810,7 +806,7 @@ msgstr "Ô¼Ô±ÕŽ"
msgctxt "IDD_FAVADD_IDC_CHECK2"
msgid "Relative drive"
-msgstr "Õ€Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¾Õ¡Õ® Õ½Õ¯Õ¡Õ¾Õ¡Õ¼Õ¡Õ¯Õ«Õ¶"
+msgstr "Õ€Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¡Õ¯Õ¡Õ¶ Õ½Õ¯Õ¡Õ¾Õ¡Õ¼Õ¡Õ¯Õ«Õ¶"
msgctxt "IDD_FAVORGANIZE_CAPTION"
msgid "Organize Favorites"
@@ -862,7 +858,7 @@ msgstr "&ÕÕ¥Õ²Õ¡Õ¯Õ¡ÕµÕ¥Õ¬"
msgctxt "IDD_PNSPRESET_DLG_IDCANCEL"
msgid "&Cancel"
-msgstr "&Õ„Õ¥Ö€ÕªÕ¥Õ¬"
+msgstr "&Õ‰Õ¥Õ²Õ¡Ö€Õ¯Õ¥Õ¬"
msgctxt "IDD_PNSPRESET_DLG_IDOK"
msgid "&Save"
@@ -886,7 +882,7 @@ msgstr "Ô¸Õ¶Õ¿Ö€Õ¥Õ¬ Õ¢Õ¸Õ¬Õ¸Ö€Õ¨"
msgctxt "IDD_PPAGEACCELTBL_IDC_BUTTON2"
msgid "Reset Selected"
-msgstr "ÔµÕ¿Õ¡Ö€Õ¯Õ¥Õ¬ Õ¨Õ¶Õ¿Ö€Õ¸Ö‚Õ´Õ¨"
+msgstr "ÕŽÕ¥Ö€Õ¡Õ¯Õ¡ÕµÕ¥Õ¬ Õ¨Õ¶Õ¿Ö€Õ¾Õ¡Õ®Õ¨"
msgctxt "IDD_MEDIATYPES_DLG_CAPTION"
msgid "Warning"
@@ -930,11 +926,11 @@ msgstr "Õ´Õ¾"
msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_CHECK1"
msgid "Save custom style"
-msgstr ""
+msgstr "ÕŠÕ¡Õ°ÕºÕ¡Õ¶Õ¥Õ¬ Õ°Õ¡Ö€Õ´Õ¡Ö€Õ¥ÖÕ¾Õ¡Õ® Õ¸Õ³Õ¨"
msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
-msgstr ""
+msgstr "JPEG-Õ« Õ¸Ö€Õ¡Õ¯."
msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
msgid "Thumbnails:"
@@ -970,35 +966,35 @@ msgstr "Ô¼Ô±ÕŽ"
msgctxt "IDD_ADDREGFILTER_IDCANCEL"
msgid "Cancel"
-msgstr "Õ„Õ¥Ö€ÕªÕ¥Õ¬"
+msgstr "Õ‰Õ¥Õ²Õ¡Ö€Õ¯Õ¥Õ¬"
msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
msgid "Font"
-msgstr "ÕÕ¡Õ¼Õ¡Õ¿Õ¥Õ½Õ¡Õ¯Õ¨"
+msgstr "ÕÕ¡Õ¼Õ¡Õ¿Õ¥Õ½Õ¡Õ¯"
msgctxt "IDD_PPAGESUBSTYLE_IDC_BUTTON1"
msgid "Font"
-msgstr "ÕÕ¡Õ¼Õ¡Õ¿Õ¥Õ½Õ¡Õ¯Õ¨"
+msgstr "ÕÕ¡Õ¼Õ¡Õ¿Õ¥Õ½Õ¡Õ¯"
msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
msgid "Spacing"
-msgstr "Ô´Õ¡Õ¤Õ¡Ö€"
+msgstr "Ô²Õ¡ÖÕ¡Õ¿"
msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
msgid "Angle (z,°)"
-msgstr "Անկյունը (z,°)"
+msgstr "Անկյուն (z,°)"
msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
msgid "Scale (x,%)"
-msgstr "Ô±Õ¶Õ¯ÕµÕ¸Ö‚Õ¶Õ¨ (x,%)"
+msgstr "Ô±Õ¶Õ¯ÕµÕ¸Ö‚Õ¶ (x,%)"
msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
msgid "Scale (y,%)"
-msgstr "Ô±Õ¶Õ¯ÕµÕ¸Ö‚Õ¶Õ¨ (y,%)"
+msgstr "Ô±Õ¶Õ¯ÕµÕ¸Ö‚Õ¶ (y,%)"
msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
msgid "Border Style"
-msgstr "Õ‡Ö€Õ»Õ¡Õ¶Õ¡Õ¯Õ« Õ±Ö‡Õ¨"
+msgstr "Õ‡Ö€Õ»Õ¡Õ¶Õ¡Õ¯Õ« Õ±Ö‡"
msgctxt "IDD_PPAGESUBSTYLE_IDC_RADIO1"
msgid "Outline"
@@ -1082,19 +1078,19 @@ msgstr "Ô±ÕºÕ¡Õ¯Õ¸Õ¤Õ¡Õ¾Õ¸Ö€Õ«Õ¹Õ¶Õ¥Ö€"
msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
msgid "Internal LAV Filters settings"
-msgstr ""
+msgstr "Õ†Õ¥Ö€Ö„Õ«Õ¶ LAV Õ¦Õ¿Õ«Õ¹Õ¶Õ¥Ö€Õ« Õ¯Õ¡Ö€Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¶Õ¥Ö€"
msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_SPLITTER_CONF"
msgid "Splitter"
-msgstr ""
+msgstr "ÕÖ€Õ¸Õ°Õ«Õ¹"
msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_VIDEO_DEC_CONF"
msgid "Video decoder"
-msgstr ""
+msgstr "ÕÕ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©Õ« Õ¡ÕºÕ¡Õ¯Õ¸Õ¤Õ¡Õ¾Õ¸Ö€Õ«Õ¹"
msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_AUDIO_DEC_CONF"
msgid "Audio decoder"
-msgstr ""
+msgstr "ÕÕ¡ÕµÕ¶Õ¡Õ¶ÕµÕ¸Ö‚Õ©Õ« Õ¡ÕºÕ¡Õ¯Õ¸Õ¤Õ¡Õ¾Õ¸Ö€Õ«Õ¹"
msgctxt "IDD_PPAGELOGO_IDC_RADIO1"
msgid "Internal:"
@@ -1169,8 +1165,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "ÕÕ¸Õ²Õ¡Õ£Ö€Õ¥Ö€Õ¨ *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1185,8 +1181,8 @@ msgid "Rotation"
msgstr "Õ‡Ö€Õ»Õ¥Õ¬"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Ô±Ö€Õ¿Õ¡Ö„Õ«Õ¶ Õ¦Õ¿Õ«Õ¹Õ¶Õ¥Ö€(Õ«Õ¶Õ¹ÕºÕ¥Õ½ Ö…Ö€Õ«Õ¶Õ¡Õ¯Õ VSFilter) Õ¯Õ¡Ö€Õ¸Õ² Õ§ ÖÕ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ¿Õ¸Õ²Õ¡Õ£Ö€Õ¥Ö€Õ¨ Õ¢Õ¸Õ¬Õ¸Ö€ Õ¼Õ¥Õ¶Õ¤Õ¥Ö€Õ¶Õ¥Ö€Õ¸Ö‚Õ´:"
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1204,6 +1200,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Ô¹Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¥Õ¬ Õ´Õ¸Ö‚Õ¿Ö„Õ¨ Õ´Õ«Õ¡ÕµÕ¶ Õ°Õ¡Õ´Õ¡Õ¯Õ¡Ö€Õ£Õ¹Õ«Ö"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr ""
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Ô±Ö€Õ¿Õ¡Õ®Õ¥Õ¬ Õ¿Õ¥Õ²Õ¥Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨"
@@ -1266,7 +1266,7 @@ msgstr "Ô½Õ¿Õ¡ÕµÕ¶Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨"
msgctxt "IDD_PPAGEMISC_IDC_RESET"
msgid "Reset"
-msgstr "ÔµÕ¿Õ¡Ö€Õ¯Õ¥Õ¬"
+msgstr "ÕŽÕ¥Ö€Õ¡Õ¯Õ¡ÕµÕ¥Õ¬"
msgctxt "IDD_PPAGEMISC_IDC_STATIC"
msgid "Update check"
@@ -1278,7 +1278,7 @@ msgstr "Õ„Õ«Õ¡ÖÕ¶Õ¥Õ¬ Õ©Õ¡Ö€Õ´Õ¡ÖÕ¸Ö‚Õ´Õ¶Õ¥Ö€Õ« Õ½Õ¿Õ¸Ö‚Õ£Õ¸Ö‚Õ´Õ¨"
msgctxt "IDD_PPAGEMISC_IDC_STATIC5"
msgid "Check every:"
-msgstr ""
+msgstr "ÕÕ¿Õ¸Ö‚Õ£Õ¥Õ¬ ÕµÕ¸Ö‚Ö€Ö„.Õ"
msgctxt "IDD_PPAGEMISC_IDC_STATIC6"
msgid "day(s)"
@@ -1290,7 +1290,7 @@ msgstr "Ô¿Õ¡Ö€Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ« Õ¯Õ¡Õ¼Õ¡Õ¾Õ¡Ö€Õ¸Ö‚Õ´"
msgctxt "IDD_PPAGEMISC_IDC_RESET_SETTINGS"
msgid "Reset"
-msgstr "ÔµÕ¿Õ¡Ö€Õ¯Õ¥Õ¬"
+msgstr "ÕŽÕ¥Ö€Õ¡Õ¯Õ¡ÕµÕ¥Õ¬"
msgctxt "IDD_PPAGEMISC_IDC_EXPORT_SETTINGS"
msgid "Export"
@@ -1310,7 +1310,7 @@ msgstr "ÕÕ¯Õ½Õ¥Õ¬"
msgctxt "IDD_TUNER_SCAN_IDCANCEL"
msgid "Cancel"
-msgstr "Õ„Õ¥Ö€ÕªÕ¥Õ¬"
+msgstr "Õ‰Õ¥Õ²Õ¡Ö€Õ¯Õ¥Õ¬"
msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
msgid "Freq. Start"
@@ -1334,7 +1334,7 @@ msgstr "ÕŠÕ¡Õ°ÕºÕ¡Õ¶Õ¥Õ¬"
msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
msgid "S"
-msgstr ""
+msgstr "S"
msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
msgid "Q"
@@ -1458,7 +1458,7 @@ msgstr "Ô²Õ¡ÖÕ¥Õ¬ Ö†Õ¡ÕµÕ¬Õ¥Ö€Õ¨ Õ¡Õ´Õ¢Õ¸Õ²Õ» Õ§Õ¯Ö€Õ¡Õ¶Õ¸Õ¾"
msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK4"
msgid "Hide controls in fullscreen"
-msgstr ""
+msgstr "Ô¹Õ¡Ö„ÖÕ¶Õ¥Õ¬ Õ¯Õ¡Õ¼Õ¡Õ¾Õ¡Ö€Õ¸Ö‚Õ´Õ¨ Ô¼Õ«Õ¡Õ§Õ¯Ö€Õ¡Õ¶ Õ¥Õ²Õ¡Õ¶Õ¡Õ¯Õ¸Ö‚Õ´"
msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC1"
msgid "ms"
@@ -1466,7 +1466,7 @@ msgstr "Õ´Õ¾"
msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK6"
msgid "Hide docked panels"
-msgstr ""
+msgstr "Ô¹Õ¡Ö„ÖÕ¶Õ¥Õ¬ Õ°Õ¡Ö€Õ¡Õ¯ÖÕ¾Õ¡Õ® Õ¾Õ¡Õ°Õ¡Õ¶Õ¡Õ¯Õ¶Õ¥Ö€Õ¨"
msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK5"
msgid "Exit fullscreen at the end of playback"
@@ -1506,7 +1506,7 @@ msgstr "ÕŽÕ¥Ö€Õ¡Õ¯Õ¡Õ¶Õ£Õ¶Õ¥Õ¬ Õ¹Õ¡ÖƒÕ¨Õ Õ®Ö€Õ¡Õ£Õ«Ö€Õ¨ ÖƒÕ¡Õ¯Õ¥Õ¬Õ«Õ½"
msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC"
msgid "Delay"
-msgstr ""
+msgstr "ÕˆÖ‚Õ·Õ¡ÖÕ¸Ö‚Õ´"
msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC2"
msgid "s"
@@ -1570,11 +1570,11 @@ msgstr "&Ô±Õ¶Õ¿Õ¥Õ½Õ¥Õ¬ Õ©Õ¡Ö€Õ´Õ¡ÖÕ¸Ö‚Õ´Õ¨"
msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
msgid "Shaders contain special effects which can be added to the video rendering process."
-msgstr ""
+msgstr "Õ‡Õ¥ÕµÕ¤Õ¥Ö€Õ¶Õ¥Ö€Õ¨ ÕºÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ¸Ö‚Õ´ Õ¥Õ¶ Õ°Õ¡Õ¿Õ¸Ö‚Õ¯ Õ§Ö†Õ¥Õ¯Õ¿Õ¶Õ¥Ö€, Õ¸Ö€Õ¸Õ¶Ö„ Õ¯Õ¡Ö€Õ¸Õ² Õ¥Õ¶ Õ¡Õ¾Õ¥Õ¬Õ¡ÖÕ¾Õ¥Õ¬ Õ¿Õ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©Õ« Õ¶ÕµÕ¸Ö‚Õ©Õ¡Õ¾Õ¸Ö€Õ´Õ¡Õ¶Õ¨"
msgctxt "IDD_PPAGESHADERS_IDC_BUTTON12"
msgid "Add shader file"
-msgstr ""
+msgstr "Ô±Õ¾Õ¥Õ¬Õ¡ÖÕ¶Õ¥Õ¬ Õ·Õ¥ÕµÕ¤Õ¥Ö€Õ« Ö†Õ¡ÕµÕ¬"
msgctxt "IDD_PPAGESHADERS_IDC_BUTTON13"
msgid "Remove"
@@ -1582,19 +1582,19 @@ msgstr "Õ‹Õ¶Õ»Õ¥Õ¬"
msgctxt "IDD_PPAGESHADERS_IDC_BUTTON1"
msgid "Add to pre-resize"
-msgstr ""
+msgstr "Ô±Õ¾Õ¥Õ¬Õ¡ÖÕ¶Õ¥Õ¬ Õ¶Õ¡Õ­Õ¡Õ¹Õ¡ÖƒÕ¡ÖƒÕ¸Õ­Õ¸Ö‚Õ´"
msgctxt "IDD_PPAGESHADERS_IDC_BUTTON2"
msgid "Add to post-resize"
-msgstr ""
+msgstr "Ô±Õ¾Õ¥Õ¬Õ¡ÖÕ¶Õ¥Õ¬ Õ°Õ¥Õ¿Õ¹Õ¡ÖƒÕ¡ÖƒÕ¸Õ­Õ¸Ö‚Õ´"
msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
msgid "Shader presets"
-msgstr ""
+msgstr "Õ‡Õ¥ÕµÕ¤Õ¥Ö€Õ¶Õ¥Ö€Õ« Õ¶Õ¡Õ­Õ¡Õ¯Õ¡ÕµÕ¸Ö‚Õ´Õ¶Õ¥Ö€"
msgctxt "IDD_PPAGESHADERS_IDC_BUTTON3"
msgid "Load"
-msgstr ""
+msgstr "Ô²Õ¥Õ¼Õ¶Õ¥Õ¬"
msgctxt "IDD_PPAGESHADERS_IDC_BUTTON4"
msgid "Save"
@@ -1606,19 +1606,19 @@ msgstr "Õ‹Õ¶Õ»Õ¥Õ¬"
msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
msgid "Active pre-resize shaders"
-msgstr ""
+msgstr "Ô±Õ¯Õ¿Õ«Õ¾ Õ¶Õ¡Õ­Õ¡Õ¹Õ¡ÖƒÕ¡ÖƒÕ¸Õ­Õ¾Õ¡Õ® Õ·Õ¥ÕµÕ¤Õ¥Ö€Õ¶Õ¥Ö€"
msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
msgid "Active post-resize shaders"
-msgstr ""
+msgstr "Ô±Õ¯Õ¿Õ«Õ¾ Õ°Õ¥Õ¿Õ¹Õ¡ÖƒÕ¡ÖƒÕ¸Õ­Õ¾Õ¡Õ® Õ·Õ¥ÕµÕ¤Õ¥Ö€Õ¶Õ¥Ö€"
msgctxt "IDD_DEBUGSHADERS_DLG_CAPTION"
msgid "Debug Shaders"
-msgstr ""
+msgstr "ÕŽÖ€Õ«ÕºÕ¡Õ¦Õ¥Ö€Õ®Õ´Õ¡Õ¶ Õ·Õ¥ÕµÕ¤Õ¥Ö€Õ¶Õ¥Ö€"
msgctxt "IDD_DEBUGSHADERS_DLG_IDC_STATIC"
msgid "Debug Information"
-msgstr ""
+msgstr "ÕŽÖ€Õ«ÕºÕ¡Õ¦Õ¥Ö€Õ®Õ´Õ¡Õ¶ Õ¿Õ¥Õ²Õ¥Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶"
msgctxt "IDD_DEBUGSHADERS_DLG_IDC_RADIO1"
msgid "PS 2.0"
@@ -1638,27 +1638,71 @@ msgstr "PS 3.0"
msgctxt "IDD_PPAGEADVANCED_IDC_STATIC"
msgid "Advanced Settings, do not edit unless you know what you are doing."
-msgstr ""
+msgstr "Ô¸Õ¶Õ¤Õ¬Õ¡ÕµÕ¶Õ¾Õ¡Õ® Õ¯Õ¡Ö€Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¶Õ¥Ö€, Õ´Õ« Õ­Õ´Õ¢Õ¡Õ£Ö€Õ¥Ö„, Õ¥Õ©Õ¥ Õ¹Õ£Õ«Õ¿Õ¥Ö„, Õ©Õ¥ Õ«Õ¶Õ¹ Õ¥Ö„ Õ¡Õ¶Õ¸Ö‚Õ´:"
msgctxt "IDD_PPAGEADVANCED_IDC_RADIO1"
msgid "True"
-msgstr ""
+msgstr "ÕƒÕ«Õ·Õ¿"
msgctxt "IDD_PPAGEADVANCED_IDC_RADIO2"
msgid "False"
-msgstr ""
+msgstr "Ô¿Õ¥Õ²Õ®"
msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Ô¾Ö€Õ¡Õ£Ö€Õ¡ÕµÕ«Õ¶"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "ÕÕ¡Ö€Ö„"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Ô¸Õ¶Õ¿Ö€Õ¡Õ¶Ö„Õ¶Õ¥Ö€"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Õ„Õ¡Õ¯Õ¡Ö€Õ¤Õ¡Õ¯"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
-msgstr ""
+msgstr "JPEG-Õ« Õ¸Ö€Õ¡Õ¯."
msgctxt "IDD_CMD_LINE_HELP_CAPTION"
msgid "Command line help"
-msgstr ""
+msgstr "Õ€Ö€Õ¡Õ´Õ¡Õ¶Õ« Õ¿Õ¸Õ²Õ« Ö…Õ£Õ¶Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶"
msgctxt "IDD_CMD_LINE_HELP_IDOK"
msgid "OK"
@@ -1666,25 +1710,37 @@ msgstr "Ô¼Ô±ÕŽ"
msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
+msgstr "ÕŽÕ©Õ¡Ö€Õ« Õ¦Õ¥Õ¯Õ¸Ö‚ÕµÖ"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "ÕˆÖ‚Õ²Õ¡Ö€Õ¯Õ¥Ö„ Õ´Õ¥Õ¦ Õ­Õ¶Õ¤Ö€Õ« Õ´Õ¡Õ½Õ«Õ¶ Õ¦Õ¥Õ¯Õ¸Ö‚ÕµÖÕ Õ¡ÕµÕ¶ Õ¸Ö‚Õ²Õ²Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€:"
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr ""
+msgid "Optional information"
+msgstr "Ô¼Ö€Õ¡ÖÕ¸Ö‚ÖÕ«Õ¹"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
-msgstr ""
+msgstr "Ô·Õ¬. ÖƒÕ¸Õ½Õ¿."
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC3"
msgid "Your email address is optional and will only be used if the developers need to contact you for more information."
-msgstr ""
+msgstr "Ô·Õ¬. ÖƒÕ¸Õ½Õ¿Õ« Õ°Õ¡Õ½ÖÕ¥Õ¶ Õ¬Ö€Õ¡ÖÕ¸Ö‚ÖÕ«Õ¹ Õ§ Ö‡ Õ¯Ö…Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¾Õ« Õ´Õ«Õ¡ÕµÕ¶ ÕÕ¥Õ¦ ÕºÕ¡Õ¿Õ¡Õ½Õ­Õ¡Õ¶Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€:"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
-msgstr ""
+msgstr "Ô½Õ¶Õ¤Ö€Õ« Õ¶Õ¯Õ¡Ö€Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶ (Õ´Õ«Õ¡ÕµÕ¶ Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶Õ¸Õ¾)."
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "ÕŽÕ¥Ö€Õ¡Õ£Õ¸Ö€Õ®Õ¡Ö€Õ¯Õ¥Õ¬ MPC-HC-Õ¨"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Õ“Õ¡Õ¯Õ¥Õ¬ MPC-HC-Õ¨"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.hy.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.hy.menus.po
index 1714f423b..f3c065c00 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.hy.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.hy.menus.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from menus
-# Copyright (C) 2002 - 2015 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
-# Hrant Ohanyan <h.ohanyan@haysoft.org>, 2014
+# Hrant Ohanyan <h.ohanyan@haysoft.org>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-08-19 21:10:25+0000\n"
-"PO-Revision-Date: 2014-08-20 10:01+0000\n"
-"Last-Translator: JellyFrog\n"
-"Language-Team: Armenian (http://www.transifex.com/projects/p/mpc-hc/language/hy/)\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-09-24 20:13+0000\n"
+"Last-Translator: Underground78\n"
+"Language-Team: Armenian (http://www.transifex.com/mpc-hc/mpc-hc/language/hy/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -198,15 +198,15 @@ msgstr "&ÕÖ€Õ¨Õ¶Õ©Õ¡Ö Õ©Õ¥Õ½Õ¿"
msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
msgid "&Display Statistics"
-msgstr ""
+msgstr "&Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ¾Õ«Õ³Õ¡Õ¯Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨"
msgctxt "ID_VIEW_OSD_DISPLAY_TIME"
msgid "Display Current T&ime"
-msgstr ""
+msgstr "Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ¨Õ¶Õ©Õ¡ÖÕ«Õ¯ Õª&Õ¡Õ´Õ¡Õ¶Õ¡Õ¯Õ¨"
msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
msgid "Show &File Name"
-msgstr ""
+msgstr "Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ &Ö†Õ¡ÕµÕ¬Õ« Õ¡Õ¶Õ¸Ö‚Õ¶Õ¨"
msgctxt "POPUP"
msgid "&Output Range"
@@ -558,15 +558,15 @@ msgstr "Õ‡&Õ¥ÕµÕ¤Õ¥Ö€Õ¶Õ¥Ö€"
msgctxt "ID_AUDIOS"
msgid "&Audio Track"
-msgstr ""
+msgstr "&ÕÕ¡ÕµÕ¶Õ¡ÕµÕ«Õ¶ Õ·Õ¡Õ¾Õ«Õ²"
msgctxt "ID_SUBTITLES"
msgid "Su&btitle Track"
-msgstr ""
+msgstr "ÕÕ¸Õ²&Õ¡Õ£Ö€Õ« Õ·Õ¡Õ¾Õ«Õ²"
msgctxt "ID_VIDEO_STREAMS"
msgid "&Video Track"
-msgstr ""
+msgstr "&ÕÕ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©"
msgctxt "POPUP"
msgid "&Volume"
@@ -590,15 +590,15 @@ msgstr "ÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´Õ¨ Õ¡Õ¾Õ¡Ö€Õ¿Õ¥Õ¬Õ«Õ½"
msgctxt "ID_AFTERPLAYBACK_DONOTHING"
msgid "Do no&thing"
-msgstr ""
+msgstr "ÕˆÕ¹Õ«Õ¶Õ¹ Õ¹Õ¡Õ¶Õ¥&Õ¬"
msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
msgid "Play &next file in the folder"
-msgstr ""
+msgstr "Ô½Õ¡Õ²Õ¡Ö€Õ¯Õ¥Õ¬ &Õ©Õ²Õ©Õ¡ÕºÕ¡Õ¶Õ¡Õ¯Õ« Õ°Õ¡Õ»Õ¸Ö€Õ¤ Ö†Õ¡ÕµÕ¬Õ¨"
msgctxt "ID_AFTERPLAYBACK_MONITOROFF"
msgid "Turn off the &monitor"
-msgstr ""
+msgstr "Ô±Õ¶Õ»Õ¡Õ¿Õ¥Õ¬ &Õ¤Õ«Õ¿Õ¡Õ¦Õ¶Õ¶Õ¸Ö‚Õ´Õ¨"
msgctxt "ID_AFTERPLAYBACK_EXIT"
msgid "&Exit"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.hy.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.hy.strings.po
index a82a6c293..5fd0d1be8 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.hy.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.hy.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2015 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
-# Hrant Ohanyan <h.ohanyan@haysoft.org>, 2014
+# Hrant Ohanyan <h.ohanyan@haysoft.org>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-10-19 22:15:16+0000\n"
-"PO-Revision-Date: 2014-10-20 10:21+0000\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
"Last-Translator: JellyFrog\n"
-"Language-Team: Armenian (http://www.transifex.com/projects/p/mpc-hc/language/hy/)\n"
+"Language-Team: Armenian (http://www.transifex.com/mpc-hc/mpc-hc/language/hy/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -18,11 +18,11 @@ msgstr ""
msgctxt "IDS_INFOBAR_LOCATION"
msgid "Location"
-msgstr "ÕÕ¥Õ²Õ¨"
+msgstr "ÕÕ¥Õ²Õ¡Õ¤Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶"
msgctxt "IDS_INFOBAR_VIDEO"
msgid "Video"
-msgstr "ÕÕ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©Õ¨"
+msgstr "ÕÕ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©"
msgctxt "IDS_INFOBAR_AUDIO"
msgid "Audio"
@@ -30,11 +30,11 @@ msgstr "ÕÕ¡ÕµÕ¶Õ¨"
msgctxt "IDS_INFOBAR_SUBTITLES"
msgid "Subtitles"
-msgstr "ÕÕ¸Õ²Õ¡Õ£Õ«Ö€Õ¨"
+msgstr "ÕÕ¸Õ²Õ¡Õ£Õ«Ö€"
msgctxt "IDS_INFOBAR_CHAPTER"
msgid "Chapter"
-msgstr "Ô³Õ¬Õ¸Ö‚Õ­Õ¨"
+msgstr "Ô³Õ¬Õ¸Ö‚Õ­"
msgctxt "IDS_CONTROLS_COMPLETING"
msgid "Completing..."
@@ -42,19 +42,19 @@ msgstr "Ô±Õ´Õ¢Õ¸Õ²Õ»Õ¡ÖÕ¾Õ¸Ö‚Õ´ Õ§..."
msgctxt "IDS_AUTOPLAY_PLAYVIDEO"
msgid "Play Video"
-msgstr "ÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¥Õ¬ Õ¿Õ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©"
+msgstr "Ô½Õ¡Õ²Õ¡Ö€Õ¯Õ¥Õ¬ Õ¿Õ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©"
msgctxt "IDS_AUTOPLAY_PLAYMUSIC"
msgid "Play Music"
-msgstr "Õ†Õ¾Õ¡Õ£Õ¡Ö€Õ¯Õ¥Õ¬ Õ¥Ö€Õ¡ÕªÕ·Õ¿Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶"
+msgstr "Ô½Õ¡Õ²Õ¡Ö€Õ¯Õ¥Õ¬ Õ¥Ö€Õ¡ÕªÕ·Õ¿Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶"
msgctxt "IDS_AUTOPLAY_PLAYAUDIOCD"
msgid "Play Audio CD"
-msgstr "Õ†Õ¾Õ¡Õ£Õ¡Ö€Õ¯Õ¥Õ¬ Audio CD"
+msgstr "Ô½Õ¡Õ²Õ¡Ö€Õ¯Õ¥Õ¬ Audio CD"
msgctxt "IDS_AUTOPLAY_PLAYDVDMOVIE"
msgid "Play DVD Movie"
-msgstr "ÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¥Õ¬ DVD Õ–Õ«Õ¬Õ´"
+msgstr "Ô½Õ¡Õ²Õ¡Ö€Õ¯Õ¥Õ¬ DVD Õ–Õ«Õ¬Õ´"
msgctxt "IDS_PROPSHEET_PROPERTIES"
msgid "Properties"
@@ -74,7 +74,7 @@ msgstr "DVD-Õ¶Õ¥Ö€"
msgctxt "IDS_INFOBAR_CHANNEL"
msgid "Channel"
-msgstr "Ô±Õ¬Õ«Ö„Õ¨"
+msgstr "Ô±Õ¬Õ«Ö„"
msgctxt "IDS_INFOBAR_TIME"
msgid "Time"
@@ -90,7 +90,7 @@ msgstr "Õ´Õ«Õ». %d Õ´Õ¾, Õ¡Õ¶Õ». %d Õ´Õ¾"
msgctxt "IDS_STATSBAR_JITTER"
msgid "Jitter"
-msgstr "Õ‹Õ«Õ©Õ¥Ö€Õ¨"
+msgstr "Õ‹Õ«Õ©Õ¥Ö€"
msgctxt "IDS_STATSBAR_BITRATE"
msgid "Bitrate"
@@ -102,7 +102,7 @@ msgstr "(Õ´Õ«Õ»./Õ¨Õ¶Õ©.)"
msgctxt "IDS_STATSBAR_SIGNAL"
msgid "Signal"
-msgstr "Ô±Õ¦Õ¤Õ¡Õ¶Õ·Õ¡Õ¶Õ¨"
+msgstr "Ô±Õ¦Õ¤Õ¡Õ¶Õ·Õ¡Õ¶"
msgctxt "IDS_STATSBAR_SIGNAL_FORMAT"
msgid "Strength: %d dB, Quality: %ld%%"
@@ -166,7 +166,7 @@ msgstr "Õ‰Õ¸Ö‚Õ¶Õ« Õ¾Õ¡Ö€Õ¯Õ¡Õ¶Õ«Õ·"
msgctxt "IDS_INFOBAR_CONTENT"
msgid "Content"
-msgstr "Ô²Õ¸Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨"
+msgstr "Ô²Õ¸Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶"
msgctxt "IDS_CONTENT_MOVIE_DRAMA"
msgid "Movie/Drama"
@@ -174,7 +174,7 @@ msgstr "Õ–Õ«Õ¬Õ´/Ô´Ö€Õ¡Õ´Õ¡"
msgctxt "IDS_CONTENT_NEWS_CURRENTAFFAIRS"
msgid "News/Current affairs"
-msgstr "Õ†Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ô¸Õ¶Õ©Õ¡ÖÕ«Õ¯ Õ£Õ¸Ö€Õ®Õ¥Ö€s"
+msgstr "Õ†Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€/Ô¸Õ¶Õ©Õ¡ÖÕ«Õ¯ Õ£Õ¸Ö€Õ®Õ¥Ö€"
msgctxt "IDS_SPEED_UNIT_G"
msgid "GB/s"
@@ -198,11 +198,11 @@ msgstr "ÕˆÖ‚Õ²Õ²Õ¸Ö€Õ¤Õ´Õ¡Õ¶ Õ¾Õ¡Õ°Õ¡Õ¶Õ¡Õ¯Õ¨"
msgctxt "IDS_SUBRESYNC_CAPTION"
msgid "Subresync"
-msgstr ""
+msgstr "Subresync"
msgctxt "IDS_SUBRESYNC_CLN_TIME"
msgid "Time"
-msgstr "ÔºÕ¡Õ´Õ¡Õ¶Õ¡Õ¯Õ¨"
+msgstr "ÔºÕ¡Õ´Õ¡Õ¶Õ¡Õ¯"
msgctxt "IDS_SUBRESYNC_CLN_END"
msgid "End"
@@ -210,11 +210,11 @@ msgstr "ÕŽÕ¥Ö€Õ»"
msgctxt "IDS_SUBRESYNC_CLN_PREVIEW"
msgid "Preview"
-msgstr "Ô´Õ«Õ¿Õ¸Ö‚Õ´"
+msgstr "Õ†Õ¡Õ­Õ¡Õ¤Õ«Õ¿Õ¸Ö‚Õ´"
msgctxt "IDS_SUBRESYNC_CLN_VOB_ID"
msgid "Vob ID"
-msgstr ""
+msgstr "Vob ID"
msgctxt "IDS_SUBRESYNC_CLN_CELL_ID"
msgid "Cell ID"
@@ -226,15 +226,15 @@ msgstr "Õ€Õ¡Ö€Õ¯Õ¡Õ¤Õ«Ö€"
msgctxt "IDS_SUBRESYNC_CLN_TEXT"
msgid "Text"
-msgstr "ÕÕ¥Ö„Õ½Õ¿Õ¨"
+msgstr "ÕÕ¥Ö„Õ½Õ¿"
msgctxt "IDS_SUBRESYNC_CLN_STYLE"
msgid "Style"
-msgstr "ÕˆÕ³Õ¨"
+msgstr "ÕˆÕ³"
msgctxt "IDS_SUBRESYNC_CLN_FONT"
msgid "Font"
-msgstr "ÕÕ¡Õ¼Õ¨"
+msgstr "ÕÕ¡Õ¼Õ¡Õ¿Õ¥Õ½Õ¡Õ¯"
msgctxt "IDS_DVD_NAV_SOME_PINS_ERROR"
msgid "Failed to render some of the pins of the DVD Navigator filter"
@@ -278,7 +278,7 @@ msgstr "ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ¶Õ¥Ö€Õ« Õ·Õ¿Õ¥Õ´Õ¡Ö€Õ¡Õ¶Õ¨Õ \"mpciconlib.dll\", Õ¢Õ¡ÖÕ¡Õ¯
msgctxt "IDS_SUBDL_DLG_FILENAME_COL"
msgid "File"
-msgstr "Õ–Õ¡ÕµÕ¬Õ¨"
+msgstr "Õ–Õ¡ÕµÕ¬"
msgctxt "IDS_SUBDL_DLG_LANGUAGE_COL"
msgid "Language"
@@ -286,11 +286,11 @@ msgstr "Ô¼Õ¥Õ¦Õ¸Ö‚Õ¶"
msgctxt "IDS_SUBDL_DLG_FORMAT_COL"
msgid "Format"
-msgstr "ÕÕ¥Õ½Õ¡Õ¯Õ¨"
+msgstr "ÕÕ¥Õ½Õ¡Õ¯"
msgctxt "IDS_SUBDL_DLG_DISC_COL"
msgid "Disc"
-msgstr "Ô½Õ¿Õ¡Õ½Õ¯Õ¡Õ¾Õ¡Õ¼Õ¡Õ¯Õ¨"
+msgstr "Ô½Õ¿Õ¡Õ½Õ¯Õ¡Õ¾Õ¡Õ¼Õ¡Õ¯"
msgctxt "IDS_SUBDL_DLG_TITLES_COL"
msgid "Title(s)"
@@ -298,7 +298,7 @@ msgstr "ÕŽÕ¥Ö€Õ¶Õ¡Õ£Õ«Ö€Õ¨"
msgctxt "IDS_SUBRESYNC_CLN_CHARSET"
msgid "CharSet"
-msgstr "Ô¿Õ¸Õ¤Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¨"
+msgstr "Ô¿Õ¸Õ¤Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´"
msgctxt "IDS_SUBRESYNC_CLN_UNICODE"
msgid "Unicode"
@@ -306,30 +306,30 @@ msgstr "Õ…Õ¸Ö‚Õ¶Õ«Ö„Õ¸Õ¤"
msgctxt "IDS_SUBRESYNC_CLN_LAYER"
msgid "Layer"
-msgstr "Õ‡Õ¥Ö€Õ¿Õ¨"
+msgstr "Õ‡Õ¥Ö€Õ¿"
msgctxt "IDS_SUBRESYNC_CLN_ACTOR"
msgid "Actor"
-msgstr "Ô´Õ¥Ö€Õ¡Õ½Õ¡Õ¶Õ¨"
+msgstr "Ô´Õ¥Ö€Õ¡Õ½Õ¡Õ¶"
msgctxt "IDS_SUBRESYNC_CLN_EFFECT"
msgid "Effect"
-msgstr "Ô·Ö†Õ¥Õ¯Õ¿Õ¨"
+msgstr "Ô·Ö†Õ¥Õ¯Õ¿"
msgctxt "IDS_PLAYLIST_CAPTION"
msgid "Playlist"
-msgstr "Ô½Õ¡Õ²Õ¡ÖÕ¡Õ¶Õ¯Õ¨"
+msgstr "Ô½Õ¡Õ²Õ¡ÖÕ¡Õ¶Õ¯"
msgctxt "IDS_PPAGE_FS_CLN_ON_OFF"
msgid "On/Off"
msgstr "Õ„Õ«Õ¡Ö./Ô±Õ¶Õ»."
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr "Fps-Õ«Ö"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr "Fps-Õ«Ö"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -350,7 +350,7 @@ msgstr "Õ€Õ¡Õ´Õ¡Õ¯Õ¡Ö€Õ£Õ¡ÕµÕ«Õ¶"
msgctxt "IDS_GRAPH_INTERFACES_ERROR"
msgid "Failed to query the needed interfaces for playback"
-msgstr "Õ‰Õ°Õ¡Õ»Õ¸Õ²Õ¾Õ¥Ö Õ½Õ¿Õ¡Õ¶Õ¡Õ¬ ÕºÕ¡Õ°Õ¡Õ¶Õ»Õ¾Õ¸Õ² Õ¾Õ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ´Õ¡Õ¶ Õ°Õ¥Ö€Õ©Õ¡Õ¯Õ¡Õ¶Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨"
+msgstr "Õ‰Õ°Õ¡Õ»Õ¸Õ²Õ¾Õ¥Ö Õ½Õ¿Õ¡Õ¶Õ¡Õ¬ ÕºÕ¡Õ°Õ¡Õ¶Õ»Õ¾Õ¸Õ² Õ¶Õ¾Õ¡Õ£Õ¡Ö€Õ¯Õ´Õ¡Õ¶ Õ°Õ¥Ö€Õ©Õ¡Õ¯Õ¡Õ¶Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨"
msgctxt "IDS_GRAPH_TARGET_WND_ERROR"
msgid "Could not set target window for graph notification"
@@ -464,6 +464,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "ÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´::Õ‡Õ¥ÕµÕ¤Õ¥Ö€Õ¶Õ¥Ö€"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Ռեսուրսներ"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "ÕÕ¡Ö€Õ¢Õ¥Ö€"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "ÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´::Õ¿Õ¥Õ½Õ¡Õ£Ö€Õ¸Ö‚Õ´"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "ÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´::Sync Renderer-Õ« Õ¯Õ¡Ö€Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¶Õ¥Ö€"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "ÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´::Ô±Õ´Õ¢Õ¸Õ²Õ» Õ§Õ¯Ö€Õ¡Õ¶Õ¸Õ¾"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "ÕÕ¡ÕµÕ¶Õ« Õ¡Õ¶Õ»Õ¡Õ¿Õ«Õ¹"
@@ -490,43 +518,43 @@ msgstr ""
msgctxt "IDS_PPAGE_OUTPUT_VMR7WINDOWED"
msgid "Video Mixing Renderer 7 (windowed)"
-msgstr ""
+msgstr "Video Mixing Renderer 7 (windowed)"
msgctxt "IDS_PPAGE_OUTPUT_VMR9WINDOWED"
msgid "Video Mixing Renderer 9 (windowed)"
-msgstr ""
+msgstr "Video Mixing Renderer 9 (windowed)"
msgctxt "IDS_PPAGE_OUTPUT_VMR7RENDERLESS"
msgid "Video Mixing Renderer 7 (renderless)"
-msgstr ""
+msgstr "Video Mixing Renderer 7 (renderless)"
msgctxt "IDS_PPAGE_OUTPUT_VMR9RENDERLESS"
msgid "Video Mixing Renderer 9 (renderless)"
-msgstr ""
+msgstr "Video Mixing Renderer 9 (renderless)"
msgctxt "IDS_PPAGE_OUTPUT_EVR"
msgid "Enhanced Video Renderer"
-msgstr ""
+msgstr "Enhanced Video Renderer"
msgctxt "IDS_PPAGE_OUTPUT_EVR_CUSTOM"
msgid "Enhanced Video Renderer (custom presenter)"
-msgstr ""
+msgstr "Enhanced Video Renderer (custom presenter)"
msgctxt "IDS_PPAGE_OUTPUT_DXR"
msgid "Haali Video Renderer"
-msgstr ""
+msgstr "Haali Video Renderer"
msgctxt "IDS_PPAGE_OUTPUT_NULL_COMP"
msgid "Null (anything)"
-msgstr ""
+msgstr "Null (ÖÕ¡Õ¶Õ¯Õ¡ÖÕ¡Õ®)"
msgctxt "IDS_PPAGE_OUTPUT_NULL_UNCOMP"
msgid "Null (uncompressed)"
-msgstr ""
+msgstr "Null (Õ¹Õ½Õ¥Õ²Õ´Õ¡Õ®)"
msgctxt "IDS_PPAGE_OUTPUT_MADVR"
msgid "madVR"
-msgstr ""
+msgstr "madVR"
msgctxt "IDD_PPAGEACCELTBL"
msgid "Player::Keys"
@@ -556,30 +584,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "ÕÕ¸Õ²Õ¡Õ£Ö€Õ¥Ö€Õ¨::Ô²Õ¡Õ¦Õ¡Õ¶"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Ռեսուրսներ"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "ÕÕ¡Ö€Õ¢Õ¥Ö€"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr ""
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "ÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´::Õ¿Õ¥Õ½Õ¡Õ£Ö€Õ¸Ö‚Õ´"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "ÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´::Sync Renderer-Õ« Õ¯Õ¡Ö€Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¶Õ¥Ö€"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "ÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´::Ô±Õ´Õ¢Õ¸Õ²Õ» Õ§Õ¯Ö€Õ¡Õ¶Õ¸Õ¾"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Õ„Õ¡Õ¶Ö€Õ¡Õ´Õ¡Õ½Õ¶"
@@ -672,22 +676,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "ÕÕ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©Õ« Õ´Õ¡Õ¯Õ¥Ö€Õ¥Õ½Õ¨ Õ¡Õ¼Õ¡Õ¶Õ±Õ¶Õ¡ÖÕ¾Õ¸Ö‚Õ´ Õ§ Õ¸Ö€ÕºÕ¥Õ½ Õ§Õ¯Ö€Õ¡Õ¶Õ«Ö Õ¤Õ¸Ö‚Ö€Õ½Ö‰"
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC-Õ« Õ±Õ¡ÕµÕ¶Õ« Õ¼Õ¥Õ¶Õ¤Õ¥Ö€Õ¥Ö€Õ¨ Õ¾Õ¶Õ¡Õ½Õ¾Õ¡Õ® Õ§ Ö‡ Õ¹Õ« Ö…Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¾Õ¸Ö‚Õ´:"
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "ÕÕ«Õ¶Ö„Õ« Õ¼Õ¥Õ¶Õ¤Õ¥Ö€Õ¥Ö€Õ¨"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr ""
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC-Õ¨ Õ­Õ¡ÖƒÕ¡Õ¶Õ¾Õ¥Ö, Õ¢Õ¡ÕµÖ Õ¡ÕµÕ½ Õ¯Õ´Õ·Õ¡Õ¯Õ¸Ö‚Õ´Õ¨ Õ°Õ¡Õ¾Õ¡Ö„Õ¾Õ¥Õ¬ Õ§ Õ¡Õ¼Õ¡Õ¶Ö Õ½Õ­Õ¡Õ¬Õ¶Õ¥Ö€Õ« Õ¸Ö‚Õ²Õ²Õ´Õ¡Õ¶ Õ¿Õ¥Õ²Õ¥Õ¯Õ¸Ö‚Õ©ÕµÕ¡Õ¶:\nÔµÕ©Õ¥ ÖÕ¡Õ¶Õ¯Õ¡Õ¶Õ¸Ö‚Õ´ Õ¥Ö„ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¥Õ¬ Õ­Õ¶Õ¤Ö€Õ« Õ´Õ¡Õ½Õ«Õ¶, Õ¶Õ¡Õ­ ÖƒÕ¸Ö€Õ±Õ¥Ö„ ÕºÕ¡Õ·Õ¿Õ¸Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¨:\n\nÔ²Õ¡ÖÕ¥ÕžÕ¬ Õ¶Õ¥Ö€Õ¢Õ¥Õ¼Õ¶Õ¥Õ¬Õ¸Ö‚ Õ§Õ»Õ¨:"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "ÕÕ¸Õ¾Õ¸Ö€Õ¡Õ¯Õ¡Õ¶ Õ´Õ¡Õ¯Õ¥Ö€Õ¥Õ½ Õ§Õ¯Ö€Õ¡Õ¶Õ«Ö Õ¤Õ¸Ö‚Ö€Õ½"
@@ -734,14 +726,14 @@ msgstr "Ô¸Õ¶Õ¿Ö€Õ¾Õ¡Õ® Õ¼Õ¥Õ¶Õ¤Õ¥Ö€Õ¥Ö€Õ¨ Õ¿Õ¥Õ²Õ¡Õ¤Ö€Õ¾Õ¡Õ® Õ¹Õ§:"
msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_COMP"
msgid "Null (anything)"
-msgstr ""
+msgstr "Null (ÖÕ¡Õ¶Õ¯Õ¡ÖÕ¡Õ®)"
msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
-msgstr ""
+msgstr "Null (Õ¹Õ½Õ¥Õ²Õ´Õ¡Õ®)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
msgstr ""
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
@@ -1198,7 +1190,7 @@ msgstr ""
msgctxt "IDS_STRING_COLON"
msgid "%s:"
-msgstr ""
+msgstr "%s:"
msgctxt "IDS_RECORD_START"
msgid "Record"
@@ -1230,35 +1222,35 @@ msgstr "+%d%%"
msgctxt "IDS_PLAYLIST_ADDFOLDER"
msgid "Add containing folder"
-msgstr ""
+msgstr "Ô±Õ¾Õ¥Õ¬Õ¡ÖÕ¶Õ¥Õ¬ ÕºÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ¸Õ² Õ©Õ²Õ©Õ¡ÕºÕ¡Õ¶Õ¡Õ¯"
msgctxt "IDS_HW_INDICATOR"
msgid "[H/W]"
-msgstr ""
+msgstr "[H/W]"
msgctxt "IDS_TOOLTIP_SOFTWARE_DECODING"
msgid "Software Decoding"
-msgstr ""
+msgstr "Ô¾Ö€Õ¡Õ£Ö€Õ¡ÕµÕ«Õ¶ Õ¡ÕºÕ¡Õ¯Õ¸Õ¤Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´"
msgctxt "IDS_STATSBAR_PLAYBACK_RATE"
msgid "Playback rate"
-msgstr ""
+msgstr "Õ†Õ¾Õ¡Õ£Õ¡Ö€Õ¯Õ´Õ¡Õ¶ Õ¾Õ¡Ö€Õ¯Õ¡Õ¶Õ«Õ·"
msgctxt "IDS_FILTERS_COPY_TO_CLIPBOARD"
msgid "&Copy filters list to clipboard"
-msgstr ""
+msgstr "&ÕŠÕ¡Õ¿Õ³Õ¥Õ¶Õ¥Õ¬ Õ¦Õ¿Õ«Õ¹Õ¶Õ¥Ö€Õ« ÖÕ¡Õ¶Õ¯Õ¨ Õ´Õ¥Õ¯Õ¸Ö‚Õ½Õ¡Õ·Ö€Õ»Õ¸Ö‚ÕµÕ©"
msgctxt "IDS_CREDENTIALS_SERVER"
msgid "Enter server credentials"
-msgstr ""
+msgstr "Õ„Õ¸Ö‚Õ¿Ö„Õ¡Õ£Ö€Õ¥Õ¬ Õ½ÕºÕ¡:Õ½Õ¡Ö€Õ¯Õ«Õ¹Õ« Õ°Õ¡Õ¾Õ¡Õ¿Õ¡Ö€Õ´Õ¡Õ£Ö€Õ¥Ö€Õ¨"
msgctxt "IDS_CREDENTIALS_CONNECT"
msgid "Enter your credentials to connect"
-msgstr ""
+msgstr "Õ„Õ¸Ö‚Õ¿Ö„Õ¡Õ£Ö€Õ¥Ö„ ÕÕ¥Ö€ Õ°Õ¡Õ¾Õ¡Õ¿Õ¡Ö€Õ´Õ¡Õ£Ö€Õ¥Ö€Õ¨Õ Õ¯Õ¡ÕºÕ¡Õ¯ÖÕ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€"
msgctxt "IDS_SUB_SAVE_EXTERNAL_STYLE_FILE"
msgid "Save custom style"
-msgstr ""
+msgstr "ÕŠÕ¡Õ°ÕºÕ¡Õ¶Õ¥Õ¬ Õ°Õ¡Ö€Õ´Õ¡Ö€Õ¥ÖÕ¾Õ¡Õ® Õ¸Õ³Õ¨"
msgctxt "IDS_CONTENT_EDUCATION_SCIENCE"
msgid "Education/Science/Factual topics"
@@ -1392,6 +1384,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr ""
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr ""
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Ô²Õ¡ÖÕ¥Õ¬ Õ½Õ¡Ö€Ö„Õ¨"
@@ -1506,7 +1518,7 @@ msgstr ""
msgctxt "IDS_PPAGEFULLSCREEN_SHOWNEVER"
msgid "Never show"
-msgstr ""
+msgstr "ÔµÖ€Õ¢Õ¥Ö„ Õ¹ÖÕ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬"
msgctxt "IDS_PPAGEFULLSCREEN_SHOWMOVED"
msgid "Show when moving the cursor, hide after:"
@@ -1546,7 +1558,7 @@ msgstr "Õ„Õ¡Õ¶Ö€Õ¡ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ¶Õ¥Ö€Õ¨ Õ°Õ¡Õ»Õ¸Õ²Õ¸Ö‚Õ©ÕµÕ¡Õ´Õ¢ ÕºÕ¡Õ°ÕºÕ¡Õ¶Õ¾Õ¥
msgctxt "IDS_MENU_VIDEO_STREAM"
msgid "&Video Track"
-msgstr ""
+msgstr "&ÕÕ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©"
msgctxt "IDS_MENU_VIDEO_ANGLE"
msgid "Video Ang&le"
@@ -1670,12 +1682,20 @@ msgstr "Õ‡Õ¡Ö€ÕªÕ¥Õ¬ Õ¿Õ¸Õ²Õ¡Õ£Ö€Õ¥Ö€Õ¨ Õ¡Õ»"
msgctxt "IDS_AG_SEEKSET"
msgid "Jump to Beginning"
-msgstr ""
+msgstr "Ô±Õ¶ÖÕ¶Õ¥Õ¬ Õ½Õ¯Õ¦Õ¢Õ«Õ¶"
msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr ""
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr ""
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr ""
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr ""
@@ -1706,7 +1726,7 @@ msgstr "Ô¹Õ¡Ö„ÖÕ¶Õ¥Õ¬ Õ¨Õ¶Õ¿Ö€Õ¡ÖÕ¡Õ¶Õ¯Õ¨"
msgctxt "IDD_PPAGEADVANCED"
msgid "Advanced"
-msgstr ""
+msgstr "Ô¸Õ¶Õ¤Õ¬Õ¡ÕµÕ¶Õ¾Õ¡Õ®"
msgctxt "IDS_AG_VIEW_MINIMAL"
msgid "View Minimal"
@@ -1794,7 +1814,7 @@ msgstr "ÕŠÕ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¢Õ¡Ö€ Õ½Õ¿Õ¸Ö‚Õ£Õ¥ÕžÕ¬ MPC-HC-Õ« Õ©Õ¡Ö€Õ´Õ¡ÖÕ¸Ö‚Õ´Õ¶Õ¥Ö€
msgctxt "IDS_ZOOM_50"
msgid "50%"
-msgstr ""
+msgstr "50%"
msgctxt "IDS_ZOOM_100"
msgid "100%"
@@ -1802,7 +1822,7 @@ msgstr "100%"
msgctxt "IDS_ZOOM_200"
msgid "200%"
-msgstr ""
+msgstr "200%"
msgctxt "IDS_ZOOM_AUTOFIT"
msgid "Auto Fit"
@@ -1957,20 +1977,20 @@ msgid "Options"
msgstr "Ô¸Õ¶Õ¿Ö€Õ¡Õ¶Ö„Õ¶Õ¥Ö€"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Õ€Õ¡Õ»Õ¸Ö€Õ¤ Õ±Õ¡ÕµÕ¶Õ¡ÕµÕ«Õ¶ Ö†Õ¡ÕµÕ¬Õ¨"
+msgid "Next Audio Track"
+msgstr ""
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Õ†Õ¡Õ­Õ¸Ö€Õ¤ Õ±Õ¡ÕµÕ¶Õ¨"
+msgid "Prev Audio Track"
+msgstr ""
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Õ€Õ¡Õ»Õ¸Ö€Õ¤ Õ¿Õ¸Õ²Õ¡Õ£Õ«Ö€Õ¨"
+msgid "Next Subtitle Track"
+msgstr ""
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Õ†Õ¡Õ­Õ¸Ö€Õ¤ Õ¿Õ¥Õ²Õ¡Õ£Õ«Ö€Õ¨"
+msgid "Prev Subtitle Track"
+msgstr ""
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1980,22 +2000,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "ÕŽÕ¥Ö€Õ¡Õ¢Õ¡ÖÕ¥Õ¬ Õ¿Õ¸Õ²Õ¡Õ£Ö€Õ¥Ö€Õ¨"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Õ€Õ¡Õ»Õ¸Ö€Õ¤ Õ±Õ¡ÕµÕ¶Õ¨ (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Õ†Õ¡Õ­Õ¸Ö€Õ¤ Õ±Õ¡ÕµÕ¶Õ¨ (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Õ€Õ¡Õ»Õ¸Ö€Õ¤ Õ¿Õ¸Õ²Õ¡Õ£Ö€Õ¥Ö€Õ¨ (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Õ†Õ¡Õ­Õ¸Ö€Õ¤ Õ¿Õ¸Õ²Õ¡Õ£Ö€Õ¥Ö€Õ¨ (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Õ€Õ¡Õ»Õ¸Ö€Õ¤ Õ¡Õ¶Õ¯ÕµÕ¸Ö‚Õ¶Õ¨ (DVD)"
@@ -2005,20 +2009,20 @@ msgid "Prev Angle (DVD)"
msgstr "Õ†Õ¡Õ­Õ¸Ö€Õ¤ Õ¡Õ¶Õ¯ÕµÕ¸Ö‚Õ¶Õ¨ (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Õ€Õ¡Õ»Õ¸Ö€Õ¤ Õ±Õ¡ÕµÕ¶Õ¨ (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Õ†Õ¡Õ­Õ¸Ö€Õ¤ Õ±Õ¡ÕµÕ¶Õ¨ (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Õ€Õ¡Õ»Õ¸Ö€Õ¤ Õ¿Õ¸Õ²Õ¡Õ£Ö€Õ¥Ö€Õ¨ (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Õ†Õ¡Õ­Õ¸Ö€Õ¤ Õ¿Õ¸Õ²Õ¡Õ£Ö€Õ¥Ö€Õ¨ (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2038,7 +2042,7 @@ msgstr "Ô±Ö€Õ¡Õ£ Õ¡Õ¾Õ¥Õ¬Õ¡ÖÕ¶Õ¥Õ¬ Õ¨Õ¶Õ¿Ö€ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ«Õ¶"
msgctxt "IDS_DVB_CHANNEL_NUMBER"
msgid "N"
-msgstr ""
+msgstr "N"
msgctxt "IDS_DVB_CHANNEL_NAME"
msgid "Name"
@@ -2118,7 +2122,7 @@ msgstr "Ô±Õ¶Õ¯ÕµÕ¸Ö‚Õ¶Õ¨. %02lu/%02lu, %lux%lu %luHz %lu:%lu"
msgctxt "IDS_MAINFRM_11"
msgid "%s, %s %u Hz %d bits %d %s"
-msgstr ""
+msgstr "%s, %s %u Hz %d bits %d %s"
msgctxt "IDS_ADD_TO_PLAYLIST"
msgid "Add to MPC-HC Playlist"
@@ -2358,7 +2362,7 @@ msgstr "Ô²Õ¡ÖÕ¸Ö‚Õ´Õ¨ Õ¨Õ¶Õ¤Õ°Õ¡Õ¿Õ¾Õ¡Õ® Õ§"
msgctxt "IDS_MAINFRM_83"
msgid "Failed to render the file"
-msgstr "Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ§ Õ¾Õ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¥Õ¬"
+msgstr "Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ§ Õ¶Õ¾Õ¡Õ£Õ¡Ö€Õ¯Õ¥Õ¬"
msgctxt "IDS_PPSDB_BADURL"
msgid "Bad URL, could not locate subtitle database there!"
@@ -2384,14 +2388,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Ô³Õ¸Ö€Õ®Õ¸Õ²Õ¨"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC-Õ¶ Õ¡Õ¶Õ½ÕºÕ¡Õ½Õ¥Õ¬Õ« ÖƒÕ¡Õ¯Õ¾Õ¥ÖÖ‰ Ô±ÕµÕ½ Õ­Õ¶Õ¤Õ«Ö€Õ¨ Õ¬Õ¸Ö‚Õ®Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€ Õ¸Ö‚Õ²Õ¡Ö€Õ¯Õ¥Ö„ \"%s\" Ö†Õ¡ÕµÕ¬Õ¨ Õ½Õ­Õ¡Õ¬Õ¶Õ¥Ö€Õ« Õ·Õ¿Õ¥Õ´Õ¡Ö€Õ¡Õ¶Ö‰\n\nÔ²Õ¡ÖÕ¥ÕžÕ¬ Õ½Õ­Õ¡Õ¬Õ« Ö†Õ¡ÕµÕ¬Õ¨ ÕºÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ¸Õ² Õ©Õ²Õ©Õ¡ÕºÕ¡Õ¶Õ¡Õ¯Õ¨ Ö‡ Õ¡ÕµÖÕ¥Õ¬Õ¥ÕžÕ¬ Õ½Õ­Õ¡Õ¬Õ¶Õ¥Ö€Õ« Õ·Õ¿Õ¥Õ´Õ¡Ö€Õ¡Õ¶ Õ°Õ¥Õ¶Ö Õ°Õ«Õ´Õ¡Ö‰"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "ÕÕ­Õ¡Õ¬Õ '%s' dump Ö†Õ¡ÕµÕ¬Õ¨ Õ½Õ¿Õ¥Õ²Õ®Õ¥Õ¬Õ«Õ½ (Õ½Õ­Õ¡Õ¬ %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Ô¸Õ¶Õ¿Ö€Õ¥Ö„ Õ©Õ²Õ©Õ¡ÕºÕ¡Õ¶Õ¡Õ¯Õ¨"
@@ -2430,7 +2426,7 @@ msgstr "Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ§ Õ¢Õ¡ÖÕ¥Õ¬ Ö†Õ«Õ¬Õ¿Ö€"
msgctxt "IDS_MAINFRM_88"
msgid "Cannot render the file"
-msgstr "Õ–Õ¡ÕµÕ¬Õ¨ Õ°Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ§ Õ¾Õ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¥Õ¬"
+msgstr "Õ–Õ¡ÕµÕ¬Õ¨ Õ°Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ§ Õ¶Õ¾Õ¡Õ£Õ¡Ö€Õ¯Õ¥Õ¬"
msgctxt "IDS_MAINFRM_89"
msgid "Invalid file format"
@@ -2506,7 +2502,7 @@ msgstr "Ô±Õ¶Õ°Õ¡ÕµÕ¿ %u"
msgctxt "IDS_AG_VSYNC"
msgid "VSync"
-msgstr ""
+msgstr "VSync"
msgctxt "IDS_MAINFRM_121"
msgid " (Director Comments 1)"
@@ -2518,7 +2514,7 @@ msgstr " (Ռեժիսորի մեկնաբանություններ 2)"
msgctxt "IDS_DVD_SUBTITLES_ENABLE"
msgid "Enable DVD subtitles"
-msgstr ""
+msgstr "Õ„Õ«Õ¡ÖÕ¶Õ¥Õ¬ DVD Õ¿Õ¸Õ²Õ¡Õ£Ö€Õ¥Ö€Õ¨"
msgctxt "IDS_AG_ANGLE"
msgid "Angle %u"
@@ -2565,8 +2561,8 @@ msgid "Volume boost Max"
msgstr "ÕÕ¡ÕµÕ¶Õ¨Õ Max"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Õ•Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¾Õ¸Ö‚Õ´ Õ§. mpc-hc.exe \"Õ³Õ¡Õ¶Õ¡ÕºÕ¡Ö€Õ°Õ¨\" [ÖƒÕ¸Õ­Õ¡Õ¶ÖÕ«Õ¹Õ¶Õ¥Ö€]\n\n\"Õ³Õ¡Õ¶Õ¡ÕºÕ¡Ö€Õ°Õ¨\"\tÕ¢Õ¥Õ¼Õ¶Õ´Õ¡Õ¶ Ö†Õ¡ÕµÕ¬Õ¨ Õ¯Õ¡Õ´ Õ©Õ²Õ©Õ¡ÕºÕ¡Õ¶Õ¡Õ¯Õ¨Ö‰ \n/dub \"dubname\"\tÔ²Õ¡ÖÕ¥Õ¬ Õ¬Ö€Õ¡ÖÕ¸Ö‚ÖÕ«Õ¹ Õ±Õ¡ÕµÕ¶Õ¡ÕµÕ«Õ¶ Ö†Õ¡ÕµÕ¬\n/dubdelay \"file\"\tÔ²Õ¡ÖÕ¥Õ¬ Õ¬Ö€Õ¡ÖÕ¸Ö‚ÖÕ«Õ¹ Õ±Õ¡ÕµÕ¶Õ¡ÕµÕ«Õ¶ Ö†Õ¡ÕµÕ¬Õ XXÕ´Õ¾\n\t\t(Õ¥Õ©Õ¥ Ö†Õ¡ÕµÕ¬Õ¨ Õ¸Ö‚Õ¶Õ« \"...DELAY XXms...\")Ö‰\n/d3dfs\t\tÕÕ¯Õ½Õ¥Õ¬ Ô±Õ´Õ¢Õ¸Õ²Õ» Õ§Õ¯Ö€Õ¡Õ¶Õ¸Õ¾Õ D3D Õ¥Õ²Õ¡Õ¶Õ¡Õ¯Õ¸Õ¾Ö‰\n/sub \"subname\"\tÔ²Õ¡ÖÕ¥Õ¬ Õ¬Ö€Õ¡ÖÕ¸Ö‚ÖÕ«Õ¹ Õ¿Õ¸Õ²Õ¡Õ£Ö€Õ¥Ö€Ö‰\n/filter \"filtername\"\tÔ²Õ¡ÖÕ¥Õ¬ DirectShow Ö†Õ«Õ¬Õ¿Ö€Õ¥Ö€ Õ£Ö€Õ¡Õ¤Õ¡Ö€Õ¡Õ¶Õ«ÖÖ‰\n/dvd\t\tÔ²Õ¡ÖÕ¥Õ¬ DVD Õ¥Õ²Õ¡Õ¶Õ¡Õ¯Õ¸Õ¾, \"Õ³Õ¡Õ¶Õ¡ÕºÕ¡Ö€Õ°Õ¨\" Õ¶Õ·Õ¡Õ¶Õ¡Õ¯Õ¸Ö‚Õ´ Õ§ DVD-Õ« Õ©Õ²Õ©Õ¡ÕºÕ¡Õ¶Õ¡Õ¯Õ¨Ö‰\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tÔ²Õ¥Õ¼Õ¶Õ¥Õ¬ Audio CD--Õ« Õ¢Õ¸Õ¬Õ¸Ö€ Ö†Õ¡ÕµÕ¬Õ¥Ö€Õ¨ Õ¯Õ¡Õ´ (S)VCD, \"Õ³Õ¡Õ¶Õ¡ÕºÕ¡Ö€Õ°Õ¨\" Õ¶Õ·Õ¡Õ¶Õ¡Õ¯Õ¸Ö‚Õ´ Õ§ ÕºÕ¶Õ¡Õ¯Õ« Õ³Õ¡Õ¶Õ¡ÕºÕ¡Ö€Õ°Õ¨Ö‰\n/device\t\tOpen the default video device\n/open\t\tÕ„Õ«Õ¡ÕµÕ¶ Ô²Õ¡ÖÕ¥Õ¬ Õ–Õ¡ÕµÕ¬Õ¨Ö‰\n/play\t\tÕÕ¯Õ½Õ¥Õ¬ ÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´Õ¨Õ Õ¡Õ¶Õ´Õ«Õ»Õ¡ÕºÕ¥Õ½ Õ¢Õ¡ÖÕ¥Õ¬Õ«Õ½Ö‰\n/close\t\tÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´Õ¨ Õ¡Õ¾Õ¡Ö€Õ¿Õ¥Õ¬Õ¸Ö‚Ö Õ°Õ¥Õ¿Õ¸ ÖƒÕ¡Õ¯Õ¥Õ¬ (Õ¡Õ·Õ­Õ¡Õ¿Õ¸Ö‚Õ´ Õ§ Õ´Õ«Õ¡ÕµÕ¶ /play ÖƒÕ¸Õ­Õ¡Õ¶ÖÕ«Õ¹Õ« Õ°Õ¥Õ¿)Ö‰\n/shutdown\tÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´Õ¨ Õ¡Õ¾Õ¡Ö€Õ¿Õ¥Õ¬Õ¸Ö‚Ö Õ°Õ¥Õ¿Õ¸ Õ¡Õ¶Õ»Õ¡Õ¿Õ¥Õ¬ Õ°Õ¡Õ´Õ¡Õ¯Õ¡Ö€Õ£Õ«Õ¹Õ¨Ö‰\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tÔ²Õ¡ÖÕ¥Õ¬ Ô±Õ´Õ¢Õ¸Õ²Õ» Õ§Õ¯Ö€Õ¡Õ¶Õ¸Õ¾ Õ¥Õ²Õ¡Õ¶Õ¡Õ¯Õ¸Õ¾Ö‰\n/minimized\tÔ²Õ¡ÖÕ¥Õ¬Õ Õ§Õ¯Ö€Õ¡Õ¶Õ« Õ¶Õ¥Ö€Ö„Ö‡Õ¸Ö‚Õ´ Õ¾Õ«Õ³Õ¡Õ¯Õ¸Ö‚Õ´Ö‰\n/new\t\tÕ•Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ Õ¾Õ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ«Õ¹Õ« Õ¶Õ¸Ö€ Ö…Ö€Õ«Õ¶Õ¡Õ¯Ö‰\n/add\t\tÔ±Õ¾Õ¥Õ¬Õ¡ÖÕ¶Õ¥Õ¬ \"Õ³Õ¡Õ¶Õ¡ÕºÕ¡Ö€Õ°Õ¨\" Õ­Õ¡Õ²Õ¡ÖÕ¡Õ¶Õ¯Õ¸Ö‚Õ´, Õ¯Õ¡Ö€Õ¥Õ¬Õ« Õ§ /open Ö‡ /play-Õ« Õ°Õ¥Õ¿ Õ°Õ¡Õ´Õ¡Õ¿Õ¥Õ²Ö‰\n/randomize\tRandomize the playlist\n/regvid\t\tÔ³Ö€Õ¡Õ¶ÖÕ¥Õ¬ Õ¿Õ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©Õ« Õ¿Õ¥Õ½Õ¡Õ¯Õ¶Õ¥Ö€Õ¨Ö‰\n/regaud\t\tÔ³Ö€Õ¡Õ¶ÖÕ¥Õ¬ Õ±Õ¡ÕµÕ¶Õ¡ÕµÕ«Õ¶ Õ¿Õ¥Õ½Õ¡Õ¯Õ¶Õ¥Ö€Õ¨Ö‰\n/regpl\t\tÕÕ¿Õ¥Õ²Õ®Õ¥Õ¬ Ö†Õ¡ÕµÕ¬Õ¥Ö€Õ« Õ¡Õ½Õ¸ÖÕ«Õ¡ÖÕ¸Ö‚Õ´Õ¶Õ¥Ö€ Õ­Õ¡Õ²Õ¡ÖÕ¡Õ¶Õ¯Õ« Ö†Õ¡ÕµÕ¬Õ¥Ö€Õ« Õ°Õ¡Õ´Õ¡Ö€\n/regall\t\tÕÕ¿Õ¥Õ²Õ®Õ¥Õ¬ Ö†Õ¡ÕµÕ¬Õ¥Ö€Õ« Õ¡Õ½Õ¸ÖÕ«Õ¡ÖÕ¸Ö‚Õ´Õ¶Õ¥Ö€ Ö†Õ¡ÕµÕ¬Õ¥Ö€Õ« Õ¢Õ¸Õ¬Õ¸Ö€ Õ¡Õ»Õ¡Õ¯ÖÕ¾Õ¸Õ² Õ¿Õ¥Õ½Õ¡Õ¯Õ¶Õ¥Ö€Õ« Õ°Õ¡Õ´Õ¡Ö€s\n/unregall\t\tÕ€Õ¥Õ¿Õ£Ö€Õ¡Õ¶ÖÕ¥Õ¬ Õ¢Õ¸Õ¬Õ¸Ö€Õ¨Ö‰\n/start ms\t\tÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¥Õ¬ \"ms\" Õ¤Õ«Ö€Ö„Õ«Ö (= Õ´Õ«Õ¬Õ«Õ¾Õ¡ÕµÖ€Õ¯ÕµÕ¡Õ¶Õ¶Õ¥Ö€)Ö‰\n/startpos hh:mm:ss\tÕÕ¯Õ½Õ¥Õ¬ Õ¾Õ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´Õ¨Õ hh:mm:ss\n/fixedsize w,h\tÕ€Õ¡Õ½Õ¿Õ¡Õ¿Õ¥Õ¬ ÕºÕ¡Õ¿Õ¸Ö‚Õ°Õ¡Õ¶Õ« Ö†Õ«Õ¯Õ½Õ¾Õ¡Õ® Õ¹Õ¡ÖƒÖ‰\n/monitor N\tÔ²Õ¡ÖÕ¾Õ¸Ö‚Õ´ Õ§ N Õ´Õ¸Õ¶Õ«Õ¿Õ¸Ö€Õ« Õ¾Ö€Õ¡, Õ¸Ö€Õ¿Õ¥Õ² N-Õ¨ Õ°Õ¡Õ·Õ¾Õ¾Õ¸Ö‚Õ´ Õ§ 1-Õ«ÖÖ‰\n/audiorenderer N\tÕ•Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ N ÖÕ¸Ö‚ÖÕ¡Õ¤Ö€Õ«Õ¹Õ¨, Õ¸Ö€Õ¿Õ¥Õ² N-Õ¨ Õ°Õ¡Õ·Õ¾Õ¾Õ¸Ö‚Õ´ Õ§ 1-Õ«Ö\n\t\t(Õ¶Õ¡ÕµÕ¥Ö„ \"Ô±Ö€Õ¿Õ¡Õ®Õ´Õ¡Õ¶\" Õ¯Õ¡Ö€Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¨)Ö‰\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tÕŽÕ¥Ö€Õ¡Õ¯Õ¡Õ¶Õ£Õ¶Õ¥Õ¬ Õ°Õ«Õ´Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¯Õ¡Ö€Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¨\n/help /h /?\tÕ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ°Õ¸Ö‚Õ·Õ¸Ö‚Õ´\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Õ•Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¾Õ¸Ö‚Õ´ Õ§. mpc-hc.exe \"Õ³Õ¡Õ¶Õ¡ÕºÕ¡Ö€Õ°Õ¨\" [ÖƒÕ¸Õ­Õ¡Õ¶ÖÕ«Õ¹Õ¶Õ¥Ö€]\n\n\"Õ³Õ¡Õ¶Õ¡ÕºÕ¡Ö€Õ°Õ¨\"\tÕ¢Õ¥Õ¼Õ¶Õ¥Õ¬Õ¸Ö‚ Ö†Õ¡ÕµÕ¬Õ¨ Õ¯Õ¡Õ´ Õ©Õ²Õ©Õ¡ÕºÕ¡Õ¶Õ¡Õ¯Õ¨Ö‰ \n/dub \"dubname\"\tÔ²Õ¡ÖÕ¥Õ¬ Õ¬Ö€Õ¡ÖÕ¸Ö‚ÖÕ«Õ¹ Õ±Õ¡ÕµÕ¶Õ¡ÕµÕ«Õ¶ Ö†Õ¡ÕµÕ¬\n/dubdelay \"file\"\tÔ²Õ¡ÖÕ¥Õ¬ Õ¬Ö€Õ¡ÖÕ¸Ö‚ÖÕ«Õ¹ Õ±Õ¡ÕµÕ¶Õ¡ÕµÕ«Õ¶ Ö†Õ¡ÕµÕ¬Õ XXÕ´Õ¾\n\t\t(Õ¥Õ©Õ¥ Ö†Õ¡ÕµÕ¬Õ¨ Õ¸Ö‚Õ¶Õ« \"...DELAY XXms...\")Ö‰\n/d3dfs\t\tÕÕ¯Õ½Õ¥Õ¬ Ô±Õ´Õ¢Õ¸Õ²Õ» Õ§Õ¯Ö€Õ¡Õ¶Õ¸Õ¾Õ D3D Õ¥Õ²Õ¡Õ¶Õ¡Õ¯Õ¸Õ¾Ö‰\n/sub \"subname\"\tÔ²Õ¡ÖÕ¥Õ¬ Õ¬Ö€Õ¡ÖÕ¸Ö‚ÖÕ«Õ¹ Õ¿Õ¸Õ²Õ¡Õ£Ö€Õ¥Ö€Ö‰\n/filter \"filtername\"\tÔ²Õ¡ÖÕ¥Õ¬ DirectShow Ö†Õ«Õ¬Õ¿Ö€Õ¥Ö€ Õ£Ö€Õ¡Õ¤Õ¡Ö€Õ¡Õ¶Õ«ÖÖ‰\n/dvd\t\tÔ²Õ¡ÖÕ¥Õ¬ DVD Õ¥Õ²Õ¡Õ¶Õ¡Õ¯Õ¸Õ¾, \"Õ³Õ¡Õ¶Õ¡ÕºÕ¡Ö€Õ°Õ¨\" Õ¶Õ·Õ¡Õ¶Õ¡Õ¯Õ¸Ö‚Õ´ Õ§ DVD-Õ« Õ©Õ²Õ©Õ¡ÕºÕ¡Õ¶Õ¡Õ¯Õ¨Ö‰\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tÔ²Õ¥Õ¼Õ¶Õ¥Õ¬ Audio CD--Õ« Õ¢Õ¸Õ¬Õ¸Ö€ Ö†Õ¡ÕµÕ¬Õ¥Ö€Õ¨ Õ¯Õ¡Õ´ (S)VCD, \"Õ³Õ¡Õ¶Õ¡ÕºÕ¡Ö€Õ°Õ¨\" Õ¶Õ·Õ¡Õ¶Õ¡Õ¯Õ¸Ö‚Õ´ Õ§ ÕºÕ¶Õ¡Õ¯Õ« Õ³Õ¡Õ¶Õ¡ÕºÕ¡Ö€Õ°Õ¨Ö‰\n/device\t\tOpen the default video device\n/open\t\tÕ„Õ«Õ¡ÕµÕ¶ Ô²Õ¡ÖÕ¥Õ¬ Õ–Õ¡ÕµÕ¬Õ¨Ö‰\n/play\t\tÕÕ¯Õ½Õ¥Õ¬ ÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´Õ¨Õ Õ¡Õ¶Õ´Õ«Õ»Õ¡ÕºÕ¥Õ½ Õ¢Õ¡ÖÕ¥Õ¬Õ«Õ½Ö‰\n/close\t\tÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´Õ¨ Õ¡Õ¾Õ¡Ö€Õ¿Õ¥Õ¬Õ¸Ö‚Ö Õ°Õ¥Õ¿Õ¸ ÖƒÕ¡Õ¯Õ¥Õ¬ (Õ¡Õ·Õ­Õ¡Õ¿Õ¸Ö‚Õ´ Õ§ Õ´Õ«Õ¡ÕµÕ¶ /play ÖƒÕ¸Õ­Õ¡Õ¶ÖÕ«Õ¹Õ« Õ°Õ¥Õ¿)Ö‰\n/shutdown\tÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´Õ¨ Õ¡Õ¾Õ¡Ö€Õ¿Õ¥Õ¬Õ¸Ö‚Ö Õ°Õ¥Õ¿Õ¸ Õ¡Õ¶Õ»Õ¡Õ¿Õ¥Õ¬ Õ°Õ¡Õ´Õ¡Õ¯Õ¡Ö€Õ£Õ«Õ¹Õ¨Ö‰\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tÔ²Õ¡ÖÕ¥Õ¬ Ô±Õ´Õ¢Õ¸Õ²Õ» Õ§Õ¯Ö€Õ¡Õ¶Õ¸Õ¾ Õ¥Õ²Õ¡Õ¶Õ¡Õ¯Õ¸Õ¾Ö‰\n/minimized\tÔ²Õ¡ÖÕ¥Õ¬Õ Õ§Õ¯Ö€Õ¡Õ¶Õ« Õ¶Õ¥Ö€Ö„Ö‡Õ¸Ö‚Õ´ Õ¾Õ«Õ³Õ¡Õ¯Õ¸Ö‚Õ´Ö‰\n/new\t\tÕ•Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ Õ¾Õ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ«Õ¹Õ« Õ¶Õ¸Ö€ Ö…Ö€Õ«Õ¶Õ¡Õ¯Ö‰\n/add\t\tÔ±Õ¾Õ¥Õ¬Õ¡ÖÕ¶Õ¥Õ¬ \"Õ³Õ¡Õ¶Õ¡ÕºÕ¡Ö€Õ°Õ¨\" Õ­Õ¡Õ²Õ¡ÖÕ¡Õ¶Õ¯Õ¸Ö‚Õ´, Õ¯Õ¡Ö€Õ¥Õ¬Õ« Õ§ /open Ö‡ /play-Õ« Õ°Õ¥Õ¿ Õ°Õ¡Õ´Õ¡Õ¿Õ¥Õ²Ö‰\n/randomize\tRandomize the playlist\n/regvid\t\tÔ³Ö€Õ¡Õ¶ÖÕ¥Õ¬ Õ¿Õ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©Õ« Õ¿Õ¥Õ½Õ¡Õ¯Õ¶Õ¥Ö€Õ¨Ö‰\n/regaud\t\tÔ³Ö€Õ¡Õ¶ÖÕ¥Õ¬ Õ±Õ¡ÕµÕ¶Õ¡ÕµÕ«Õ¶ Õ¿Õ¥Õ½Õ¡Õ¯Õ¶Õ¥Ö€Õ¨Ö‰\n/regpl\t\tÕÕ¿Õ¥Õ²Õ®Õ¥Õ¬ Ö†Õ¡ÕµÕ¬Õ¥Ö€Õ« Õ¡Õ½Õ¸ÖÕ«Õ¡ÖÕ¸Ö‚Õ´Õ¶Õ¥Ö€ Õ­Õ¡Õ²Õ¡ÖÕ¡Õ¶Õ¯Õ« Ö†Õ¡ÕµÕ¬Õ¥Ö€Õ« Õ°Õ¡Õ´Õ¡Ö€\n/regall\t\tÕÕ¿Õ¥Õ²Õ®Õ¥Õ¬ Ö†Õ¡ÕµÕ¬Õ¥Ö€Õ« Õ¡Õ½Õ¸ÖÕ«Õ¡ÖÕ¸Ö‚Õ´Õ¶Õ¥Ö€ Ö†Õ¡ÕµÕ¬Õ¥Ö€Õ« Õ¢Õ¸Õ¬Õ¸Ö€ Õ¡Õ»Õ¡Õ¯ÖÕ¾Õ¸Õ² Õ¿Õ¥Õ½Õ¡Õ¯Õ¶Õ¥Ö€Õ« Õ°Õ¡Õ´Õ¡Ö€s\n/unregall\t\tÕ€Õ¥Õ¿Õ£Ö€Õ¡Õ¶ÖÕ¥Õ¬ Õ¢Õ¸Õ¬Õ¸Ö€Õ¨Ö‰\n/start ms\t\tÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¥Õ¬ \"ms\" Õ¤Õ«Ö€Ö„Õ«Ö (= Õ´Õ«Õ¬Õ«Õ¾Õ¡ÕµÖ€Õ¯ÕµÕ¡Õ¶Õ¶Õ¥Ö€)Ö‰\n/startpos hh:mm:ss\tÕÕ¯Õ½Õ¥Õ¬ Õ¾Õ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´Õ¨Õ hh:mm:ss\n/fixedsize w,h\tÕ€Õ¡Õ½Õ¿Õ¡Õ¿Õ¥Õ¬ ÕºÕ¡Õ¿Õ¸Ö‚Õ°Õ¡Õ¶Õ« Ö†Õ«Õ¯Õ½Õ¾Õ¡Õ® Õ¹Õ¡ÖƒÖ‰\n/monitor N\tÔ²Õ¡ÖÕ¾Õ¸Ö‚Õ´ Õ§ N Õ´Õ¸Õ¶Õ«Õ¿Õ¸Ö€Õ« Õ¾Ö€Õ¡, Õ¸Ö€Õ¿Õ¥Õ² N-Õ¨ Õ°Õ¡Õ·Õ¾Õ¾Õ¸Ö‚Õ´ Õ§ 1-Õ«ÖÖ‰\n/audiorenderer N\tÕ•Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ N ÖÕ¸Ö‚ÖÕ¡Õ¤Ö€Õ«Õ¹Õ¨, Õ¸Ö€Õ¿Õ¥Õ² N-Õ¨ Õ°Õ¡Õ·Õ¾Õ¾Õ¸Ö‚Õ´ Õ§ 1-Õ«Ö\n\t\t(Õ¶Õ¡ÕµÕ¥Ö„ \"Ô±Ö€Õ¿Õ¡Õ®Õ´Õ¡Õ¶\" Õ¯Õ¡Ö€Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¨)Ö‰\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tÕŽÕ¥Ö€Õ¡Õ¯Õ¡Õ¶Õ£Õ¶Õ¥Õ¬ Õ°Õ«Õ´Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¯Õ¡Ö€Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¨\n/help /h /?\tÕ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ°Õ¸Ö‚Õ·Õ¸Ö‚Õ´\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -2834,79 +2830,79 @@ msgstr "ÕŽÕ¥Ö€Õ¡Õ¢Õ¡ÖÕ¥Õ¬ Ö†Õ¡ÕµÕ¬Õ¨"
msgctxt "IDS_MFMT_AVI"
msgid "AVI"
-msgstr ""
+msgstr "AVI"
msgctxt "IDS_MFMT_MPEG"
msgid "MPEG"
-msgstr ""
+msgstr "MPEG"
msgctxt "IDS_MFMT_MPEGTS"
msgid "MPEG-TS"
-msgstr ""
+msgstr "MPEG-TS"
msgctxt "IDS_MFMT_DVDVIDEO"
msgid "DVD-Video"
-msgstr ""
+msgstr "DVD Õ¿Õ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©"
msgctxt "IDS_MFMT_MKV"
msgid "Matroska"
-msgstr ""
+msgstr "Matroska"
msgctxt "IDS_MFMT_WEBM"
msgid "WebM"
-msgstr ""
+msgstr "WebM"
msgctxt "IDS_MFMT_MP4"
msgid "MP4"
-msgstr ""
+msgstr "MP4"
msgctxt "IDS_MFMT_MOV"
msgid "QuickTime Movie"
-msgstr ""
+msgstr "QuickTime Movie"
msgctxt "IDS_MFMT_3GP"
msgid "3GP"
-msgstr ""
+msgstr "3GP"
msgctxt "IDS_MFMT_3G2"
msgid "3G2"
-msgstr ""
+msgstr "3G2"
msgctxt "IDS_MFMT_FLV"
msgid "Flash Video"
-msgstr ""
+msgstr "Flash Video"
msgctxt "IDS_MFMT_OGM"
msgid "Ogg Media"
-msgstr ""
+msgstr "Ogg Media"
msgctxt "IDS_MFMT_RM"
msgid "Real Media"
-msgstr ""
+msgstr "Real Media"
msgctxt "IDS_MFMT_RT"
msgid "Real Script"
-msgstr ""
+msgstr "Real Script"
msgctxt "IDS_MFMT_WMV"
msgid "Windows Media Video"
-msgstr ""
+msgstr "Windows Media Video"
msgctxt "IDS_MFMT_BINK"
msgid "Smacker/Bink Video"
-msgstr ""
+msgstr "Smacker/Bink Video"
msgctxt "IDS_MFMT_FLIC"
msgid "FLIC Animation"
-msgstr ""
+msgstr "FLIC Animation"
msgctxt "IDS_MFMT_DSM"
msgid "DirectShow Media"
-msgstr ""
+msgstr "DirectShow Media"
msgctxt "IDS_MFMT_IVF"
msgid "Indeo Video Format"
-msgstr ""
+msgstr "Indeo Video Format"
msgctxt "IDS_MFMT_OTHER"
msgid "Other"
@@ -2914,107 +2910,107 @@ msgstr "Ô±ÕµÕ¬"
msgctxt "IDS_MFMT_SWF"
msgid "Shockwave Flash"
-msgstr ""
+msgstr "Shockwave Flash"
msgctxt "IDS_MFMT_OTHER_AUDIO"
msgid "Other Audio"
-msgstr ""
+msgstr "Ô±ÕµÕ¬ Õ±Õ¡ÕµÕ¶Õ¡Õ¶ÕµÕ¸Ö‚Õ©"
msgctxt "IDS_MFMT_AC3"
msgid "AC-3"
-msgstr ""
+msgstr "AC-3"
msgctxt "IDS_MFMT_AIFF"
msgid "AIFF"
-msgstr ""
+msgstr "AIFF"
msgctxt "IDS_MFMT_ALAC"
msgid "Apple Lossless"
-msgstr ""
+msgstr "Apple Lossless"
msgctxt "IDS_MFMT_WAV"
msgid "WAV"
-msgstr ""
+msgstr "WAV"
msgctxt "IDS_MFMT_WMA"
msgid "Windows Media Audio"
-msgstr ""
+msgstr "Windows Media Audio"
msgctxt "IDS_MFMT_WV"
msgid "WavPack"
-msgstr ""
+msgstr "WavPack"
msgctxt "IDS_MFMT_OPUS"
msgid "Opus Audio Codec"
-msgstr ""
+msgstr "Opus Audio Codec"
msgctxt "IDS_MFMT_DTS"
msgid "DTS/DTS-HD"
-msgstr ""
+msgstr "DTS/DTS-HD"
msgctxt "IDS_MFMT_AMR"
msgid "AMR"
-msgstr ""
+msgstr "AMR"
msgctxt "IDS_MFMT_APE"
msgid "Monkey's Audio"
-msgstr ""
+msgstr "Monkey's Audio"
msgctxt "IDS_MFMT_AU"
msgid "AU/SND"
-msgstr ""
+msgstr "AU/SND"
msgctxt "IDS_MFMT_CDA"
msgid "Audio CD track"
-msgstr ""
+msgstr "Audio CD track"
msgctxt "IDS_MFMT_FLAC"
msgid "FLAC"
-msgstr ""
+msgstr "FLAC"
msgctxt "IDS_MFMT_M4A"
msgid "MPEG-4 Audio"
-msgstr ""
+msgstr "MPEG-4 Audio"
msgctxt "IDS_MFMT_MIDI"
msgid "MIDI"
-msgstr ""
+msgstr "MIDI"
msgctxt "IDS_MFMT_MKA"
msgid "Matroska audio"
-msgstr ""
+msgstr "Matroska audio"
msgctxt "IDS_MFMT_MP3"
msgid "MP3"
-msgstr ""
+msgstr "MP3"
msgctxt "IDS_MFMT_MPA"
msgid "MPEG audio"
-msgstr ""
+msgstr "MPEG audio"
msgctxt "IDS_MFMT_MPC"
msgid "Musepack"
-msgstr ""
+msgstr "Musepack"
msgctxt "IDS_MFMT_OFR"
msgid "OptimFROG"
-msgstr ""
+msgstr "OptimFROG"
msgctxt "IDS_MFMT_OGG"
msgid "Ogg Vorbis"
-msgstr ""
+msgstr "Ogg Vorbis"
msgctxt "IDS_MFMT_RA"
msgid "Real Audio"
-msgstr ""
+msgstr "Real Audio"
msgctxt "IDS_MFMT_TAK"
msgid "TAK"
-msgstr ""
+msgstr "TAK"
msgctxt "IDS_MFMT_TTA"
msgid "True Audio"
-msgstr ""
+msgstr "True Audio"
msgctxt "IDS_MFMT_PLS"
msgid "Playlist"
@@ -3022,15 +3018,15 @@ msgstr "Ô½Õ¡Õ²Õ¡ÖÕ¡Õ¶Õ¯"
msgctxt "IDS_MFMT_BDPLS"
msgid "Blu-ray playlist"
-msgstr ""
+msgstr "Blu-ray Õ­Õ¡Õ²Õ¡ÖÕ¡Õ¶Õ¯"
msgctxt "IDS_MFMT_RAR"
msgid "RAR Archive"
-msgstr ""
+msgstr "RAR Õ¡Ö€Õ­Õ«Õ¾"
msgctxt "IDS_DVB_CHANNEL_FPS"
msgid "FPS"
-msgstr ""
+msgstr "FPS"
msgctxt "IDS_DVB_CHANNEL_RESOLUTION"
msgid "Resolution"
@@ -3040,18 +3036,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Õ€Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¡Õ¯ÖÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Õ•Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ WASAPI (Õ¾Õ¥Ö€Õ¡Õ´Õ¥Õ¯Õ¶Õ¡Ö€Õ¯Õ¥Õ¬ Õ¾Õ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¸Ö‚Õ´Õ¨)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Ô±Õ¶Õ±Õ¡ÕµÕ¶Õ Õ¡Õ¼Õ¡Õ» Õ¿Õ¡Õ¬Õ«Õ½"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "ÕÕ¡ÕµÕ¶Õ« Õ½Õ¡Ö€Ö„Õ¨."
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync. Õ„Õ«Õ¡Ö"
@@ -3258,11 +3242,11 @@ msgstr "Ô¿Õ¸Õ¶Õ¿Ö€Õ¡Õ½Õ¿Õ« ÖƒÕ¸Ö„Ö€Õ¡ÖÕ¸Ö‚Õ´"
msgctxt "IDS_HUE_INC"
msgid "Hue increase"
-msgstr ""
+msgstr "Hue increase"
msgctxt "IDS_HUE_DEC"
msgid "Hue decrease"
-msgstr ""
+msgstr "Hue decrease"
msgctxt "IDS_SATURATION_INC"
msgid "Saturation increase"
@@ -3342,7 +3326,7 @@ msgstr "Õ‡Ö€Õ»Õ¡Õ¶Õ« Õ±Õ¡ÕµÕ¶Õ¨. Ô±Õ¶Õ»."
msgctxt "IDS_SIZE_UNIT_BYTES"
msgid "bytes"
-msgstr ""
+msgstr "Õ¢Õ¡ÕµÕ©"
msgctxt "IDS_SIZE_UNIT_K"
msgid "KB"
@@ -3518,15 +3502,15 @@ msgstr "ÕŽÕ¥Ö€Õ¡Ö€Õ¿Õ¡Õ¤Ö€Õ¥Õ¬Õ¸Ö‚Ö Õ°Õ¥Õ¿Õ¸. Ô¿Õ¸Õ²ÖƒÕ¥Õ¬"
msgctxt "IDS_AFTERPLAYBACK_MONITOROFF"
msgid "After Playback: Turn off the monitor"
-msgstr ""
+msgstr "Õ†Õ¾Õ¡Õ£Õ¡Ö€Õ¯Õ¥Õ¬Õ¸Ö‚Ö Õ°Õ¥Õ¿Õ¸. Õ¡Õ¶Õ»Õ¡Õ¿Õ¥Õ¬ Õ´Õ¸Õ¶Õ«Õ¿Õ¸Ö€Õ¨"
msgctxt "IDS_AFTERPLAYBACK_PLAYNEXT"
msgid "After Playback: Play next file in the folder"
-msgstr ""
+msgstr "Õ†Õ¾Õ¡Õ£Õ¡Ö€Õ¯Õ¥Õ¬Õ¸Ö‚Ö Õ°Õ¥Õ¿Õ¸. Õ­Õ¡Õ²Õ¡Ö€Õ¯Õ¥Õ¬ Õ©Õ²Õ©Õ¡ÕºÕ¡Õ¶Õ¡Õ¯Õ« Õ°Õ¡Õ»Õ¸Ö€Õ¤ Ö†Õ¡ÕµÕ¬Õ¨"
msgctxt "IDS_AFTERPLAYBACK_DONOTHING"
msgid "After Playback: Do nothing"
-msgstr ""
+msgstr "Õ†Õ¾Õ¡Õ£Õ¡Ö€Õ¯Õ¥Õ¬Õ¸Ö‚Ö Õ°Õ¥Õ¿Õ¸. Õ¸Õ¹Õ«Õ¶Õ¹ Õ¹Õ¡Õ¶Õ¥Õ¬"
msgctxt "IDS_OSD_BRIGHTNESS"
msgid "Brightness: %s"
@@ -3566,23 +3550,23 @@ msgstr ""
msgctxt "IDS_NAVIGATE_BD_PLAYLISTS"
msgid "&Blu-Ray playlists"
-msgstr ""
+msgstr "&Blu-Ray Õ­Õ¡Õ²Õ¡ÖÕ¡Õ¶Õ¯Õ¥Ö€"
msgctxt "IDS_NAVIGATE_PLAYLIST"
msgid "&Playlist"
-msgstr ""
+msgstr "&Ô½Õ¡Õ²Õ¡ÖÕ¡Õ¶Õ¯"
msgctxt "IDS_NAVIGATE_CHAPTERS"
msgid "&Chapters"
-msgstr ""
+msgstr "&Ô³Õ¬Õ¸Ö‚Õ­Õ¶Õ¥Ö€"
msgctxt "IDS_NAVIGATE_TITLES"
msgid "&Titles"
-msgstr ""
+msgstr "&Ô³Õ¬Õ­Õ¡Õ£Ö€Õ¥Ö€"
msgctxt "IDS_NAVIGATE_CHANNELS"
msgid "&Channels"
-msgstr ""
+msgstr "&Ô±Õ¬Õ«Ö„Õ¶Õ¥Ö€"
msgctxt "IDC_FASTSEEK_CHECK"
msgid "If \"latest keyframe\" is selected, seek to the first keyframe before the actual seek point.\nIf \"nearest keyframe\" is selected, seek to the first keyframe before or after the seek point depending on which is the closest."
@@ -3590,21 +3574,29 @@ msgstr ""
msgctxt "IDC_ASSOCIATE_ALL_FORMATS"
msgid "Associate with all formats"
-msgstr ""
+msgstr "Ô±Õ½Õ¸ÖÕ«Õ¡ÖÕ¶Õ¥Õ¬ Õ¢Õ¸Õ¬Õ¸Ö€Õ¨"
msgctxt "IDC_ASSOCIATE_VIDEO_FORMATS"
msgid "Associate with video formats only"
-msgstr ""
+msgstr "Ô±Õ½Õ¸ÖÕ«Õ¡ÖÕ¶Õ¥Õ¬ Õ´Õ«Õ¡ÕµÕ¶ Õ¿Õ¥Õ½Õ¡Õ¶ÕµÕ¸Ö‚Õ©Õ¥Ö€Õ¨"
msgctxt "IDC_ASSOCIATE_AUDIO_FORMATS"
msgid "Associate with audio formats only"
-msgstr ""
+msgstr "Ô±Õ½Õ¸ÖÕ«Õ¡ÖÕ¶Õ¥Õ¬ Õ´Õ«Õ¡ÕµÕ¶ Õ±Õ¡ÕµÕ¶Õ¡Õ¶ÕµÕ¸Ö‚Õ©Õ¥Ö€Õ¨"
msgctxt "IDC_CLEAR_ALL_ASSOCIATIONS"
msgid "Clear all associations"
-msgstr ""
+msgstr "Õ„Õ¡Ö„Ö€Õ¥Õ¬ Õ¢Õ¸Õ¬Õ¸Ö€ Õ¡Õ½Õ¸ÖÕ«Õ¡ÖÕ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¨"
msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Ô¿Õ¡Ö€Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¶Õ¥Ö€"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.id.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.id.dialogs.po
new file mode 100644
index 000000000..3383e4082
--- /dev/null
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.id.dialogs.po
@@ -0,0 +1,1752 @@
+# MPC-HC - Strings extracted from dialogs
+# Copyright (C) 2002 - 2013 see Authors.txt
+# This file is distributed under the same license as the MPC-HC package.
+# Translators:
+# Andy Martino <thegamers788@gmail.com>, 2015
+# Dwi Cahyono <dwexz_cie@yahoo.com>, 2015
+# Hatta.z, 2014
+# yoga.mardia <made.yoga12@gmail.com>, 2014
+# Reza Septyan .R. <ainofuyuumI@outlook.com>, 2014
+# zk <zamani.karmana@gmail.com>, 2015
+# zk <zamani.karmana@gmail.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: MPC-HC\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-11-14 14:30+0000\n"
+"Last-Translator: Dwi Cahyono <dwexz_cie@yahoo.com>\n"
+"Language-Team: Indonesian (http://www.transifex.com/mpc-hc/mpc-hc/language/id/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: id\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+msgctxt "IDD_SELECTMEDIATYPE_CAPTION"
+msgid "Select Media Type"
+msgstr "Pilih Jenis Media"
+
+msgctxt "IDD_SELECTMEDIATYPE_IDOK"
+msgid "OK"
+msgstr "OK"
+
+msgctxt "IDD_SELECTMEDIATYPE_IDCANCEL"
+msgid "Cancel"
+msgstr "Batal"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_STATIC1"
+msgid "Video"
+msgstr "Video"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_BUTTON1"
+msgid "Set"
+msgstr "Tetapkan"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_STATIC"
+msgid "Audio"
+msgstr "Audio"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_STATIC"
+msgid "Output"
+msgstr "Keluaran"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK1"
+msgid "Record Video"
+msgstr "Rekam Video"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK2"
+msgid "Preview"
+msgstr "Pratinjau"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK3"
+msgid "Record Audio"
+msgstr "Rekam Audio"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK4"
+msgid "Preview"
+msgstr "Pratinjau"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_STATIC"
+msgid "V/A Buffers:"
+msgstr "Bufer V/A:"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK5"
+msgid "Audio to wav"
+msgstr "Audio ke wav"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_BUTTON2"
+msgid "Record"
+msgstr "Rekam"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK2"
+msgid "Enable built-in audio switcher filter (requires restart)"
+msgstr "Fungsikan penyaring pengubah suara bawaan (wajib memulai ulang)"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK5"
+msgid "Normalize"
+msgstr "Normalkan"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC4"
+msgid "Max amplification:"
+msgstr "Amplifikasi Maks:"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC5"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK6"
+msgid "Regain volume"
+msgstr "Perkeras volume"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC6"
+msgid "Boost:"
+msgstr "Galak:"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK3"
+msgid "Down-sample to 44100 Hz"
+msgstr "Turunkan sampel ke 44100 Hz"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK4"
+msgid "Audio time shift (ms):"
+msgstr "Waktu perpindahan audio (ms):"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK1"
+msgid "Enable custom channel mapping"
+msgstr "Fungsikan pemetaan saluran khusus"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC1"
+msgid "Speaker configuration for"
+msgstr "Konfigurasi pengeras suara untuk"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC2"
+msgid "input channels:"
+msgstr "saluran masukan:"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC3"
+msgid "Hold shift for immediate changes when clicking something"
+msgstr "Tahan shift untuk perubahan langsung ketika mengklik sesuatu"
+
+msgctxt "IDD_GOTO_DLG_CAPTION"
+msgid "Go To..."
+msgstr "Ke..."
+
+msgctxt "IDD_GOTO_DLG_IDC_STATIC"
+msgid "Enter a timecode using the format [hh:]mm:ss.ms to jump to a specified time. You do not need to enter the separators explicitly."
+msgstr "Masukkan kode waktu menggunakan format [hh:]mm:ss.ms untuk melompat ke waktu yang ditentukan. Anda tidak perlu memasukkan karakter pemisah secara eksplisit."
+
+msgctxt "IDD_GOTO_DLG_IDC_STATIC"
+msgid "Time"
+msgstr "Waktu"
+
+msgctxt "IDD_GOTO_DLG_IDC_OK1"
+msgid "Go!"
+msgstr "Jalankan!"
+
+msgctxt "IDD_GOTO_DLG_IDC_STATIC"
+msgid "Enter two numbers to jump to a specified frame, the first is the frame number, the second is the frame rate."
+msgstr "Masukkan dua angka untuk melompat ke frame tertentu, yang pertama adalah nomor frame, yang kedua adalah laju frame."
+
+msgctxt "IDD_GOTO_DLG_IDC_STATIC"
+msgid "Frame"
+msgstr "Frame"
+
+msgctxt "IDD_GOTO_DLG_IDC_OK2"
+msgid "Go!"
+msgstr "Jalankan!"
+
+msgctxt "IDD_OPEN_DLG_CAPTION"
+msgid "Open"
+msgstr "Buka"
+
+msgctxt "IDD_OPEN_DLG_IDC_STATIC"
+msgid "Type the address of a movie or audio file (on the Internet or your computer) and the player will open it for you."
+msgstr "Ketik alamat berkas film atau audio (di Internet atau komputer anda) dan pemutar akan membukanya untuk anda."
+
+msgctxt "IDD_OPEN_DLG_IDC_STATIC"
+msgid "Open:"
+msgstr "Buka:"
+
+msgctxt "IDD_OPEN_DLG_IDC_BUTTON1"
+msgid "Browse..."
+msgstr "Jelajah..."
+
+msgctxt "IDD_OPEN_DLG_IDC_STATIC1"
+msgid "Dub:"
+msgstr "Dub:"
+
+msgctxt "IDD_OPEN_DLG_IDC_BUTTON2"
+msgid "Browse..."
+msgstr "Jelajah..."
+
+msgctxt "IDD_OPEN_DLG_IDOK"
+msgid "OK"
+msgstr "OK"
+
+msgctxt "IDD_OPEN_DLG_IDCANCEL"
+msgid "Cancel"
+msgstr "Batal"
+
+msgctxt "IDD_OPEN_DLG_IDC_CHECK1"
+msgid "Add to playlist without opening"
+msgstr "Tambahkan ke daftar putar tanpa membuka"
+
+msgctxt "IDD_ABOUTBOX_CAPTION"
+msgid "About"
+msgstr "Tentang"
+
+msgctxt "IDD_ABOUTBOX_IDC_AUTHORS_LINK"
+msgid "Copyright © 2002-2015 see Authors.txt"
+msgstr "Hak Cipta 2002-2015 lihat Authors.txt"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "This program is freeware and released under the GNU General Public License."
+msgstr "Program ini adalah perangkat lunak gratis dan dirilis di bawah Lisensi Publik Umum GNU."
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "English translation made by MPC-HC Team"
+msgstr "Terjemahan Bahasa Inggris dibuat oleh Tim MPC-HC"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Build information"
+msgstr "Informasi versi"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Version:"
+msgstr "Versi:"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Compiler:"
+msgstr "Pengompilasi:"
+
+msgctxt "IDD_ABOUTBOX_IDC_LAVFILTERS_VERSION"
+msgid "Not used"
+msgstr "Tidak digunakan"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Build date:"
+msgstr "Tanggal pembuatan:"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Operating system"
+msgstr "Sistem operasi"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Name:"
+msgstr "Nama:"
+
+msgctxt "IDD_ABOUTBOX_IDC_BUTTON1"
+msgid "Copy to clipboard"
+msgstr "Salin ke papan klip"
+
+msgctxt "IDD_ABOUTBOX_IDOK"
+msgid "OK"
+msgstr "OK"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "Open options"
+msgstr "Buka opsi"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO1"
+msgid "Use the same player for each media file"
+msgstr "Gunakan pemutar yang sama untuk setiap berkas media"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO2"
+msgid "Open a new player for each media file played"
+msgstr "Buka pemutar baru untuk setiap berkas media yang diputar"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "Language"
+msgstr "Bahasa"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "Title bar"
+msgstr "Bilah judul"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO3"
+msgid "Display full path"
+msgstr "Tampilkan jalur penuh"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO4"
+msgid "File name only"
+msgstr "Hanya nama berkas"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO5"
+msgid "Don't prefix anything"
+msgstr "Jangan prefiks apapun"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK13"
+msgid "Replace file name with title"
+msgstr "Ganti nama berkas dengan judul"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "Other"
+msgstr "Lainnya"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK3"
+msgid "Tray icon"
+msgstr "Ikon baki"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_SHOW_OSD"
+msgid "Show OSD (requires restart)"
+msgstr "Tampilkan OSD (wajib memulai ulang)"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK4"
+msgid "Limit window proportions on resize"
+msgstr "Batasi proporsi jendela saat mengubah ukuran"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK12"
+msgid "Snap to desktop edges"
+msgstr "Lengket ke tepi destop"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK8"
+msgid "Store settings in .ini file"
+msgstr "Simpan pengaturan ke berkas .ini"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK10"
+msgid "Disable \"Open Disc\" menu"
+msgstr "Nonfungsikan menu \"Buka Cakram\""
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK9"
+msgid "Process priority above normal"
+msgstr "Prioritas proses di atas normal"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK14"
+msgid "Enable cover-art support"
+msgstr "Fungsikan dukungan kover album"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "History"
+msgstr "Riwayat"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK1"
+msgid "Keep history of recently opened files"
+msgstr "Simpan riwayat berkas yang baru dibuka"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK2"
+msgid "Remember last playlist"
+msgstr "Ingat daftar putar terakhir"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_FILE_POS"
+msgid "Remember File position"
+msgstr "Ingat posisi Berkas"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_DVD_POS"
+msgid "Remember DVD position"
+msgstr "Ingat posisi DVD"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK6"
+msgid "Remember last window position"
+msgstr "Ingat posisi jendela terakhir"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK7"
+msgid "Remember last window size"
+msgstr "Ingat ukuran jendela terakhir"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK11"
+msgid "Remember last Pan-n-Scan Zoom"
+msgstr "Ingat Zum Pan-n-Scan terakhir"
+
+msgctxt "IDD_PPAGEDVD_IDC_STATIC"
+msgid "\"Open DVD/BD\" behavior"
+msgstr "Perilaku \"Buka DVD/BD\""
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO1"
+msgid "Prompt for location"
+msgstr "Tanyakan untuk lokasi"
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO2"
+msgid "Always open the default location:"
+msgstr "Selalu buka lokasi bawaan:"
+
+msgctxt "IDD_PPAGEDVD_IDC_STATIC"
+msgid "Preferred language for DVD Navigator and the external OGM Splitter"
+msgstr "Bahasa yang diinginkan untuk Navigator DVD dan Splitter OGM eksternal"
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO3"
+msgid "Menu"
+msgstr "Menu"
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO4"
+msgid "Audio"
+msgstr "Audio"
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO5"
+msgid "Subtitles"
+msgstr "Subtitel"
+
+msgctxt "IDD_PPAGEDVD_IDC_STATIC"
+msgid "Additional settings"
+msgstr "Pengaturan tambahan"
+
+msgctxt "IDD_PPAGEDVD_IDC_CHECK2"
+msgid "Allow closed captions in \"Line 21 Decoder\""
+msgstr "Izinkan takarir saling tindih di \"Dekoder Line 21\""
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Audio"
+msgstr "Audio"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Volume"
+msgstr "Volume"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Min"
+msgstr "Min"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Max"
+msgstr "Maks"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC_BALANCE"
+msgid "Balance"
+msgstr "Seimbang"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "L"
+msgstr "L"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "R"
+msgstr "R"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Playback"
+msgstr "Pemutaran"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_RADIO1"
+msgid "Play"
+msgstr "Putar"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_RADIO2"
+msgid "Repeat forever"
+msgstr "Ulangi selamanya"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC1"
+msgid "time(s)"
+msgstr "waktu"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "After Playback"
+msgstr "Setelah Pemutaran"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Output"
+msgstr "Keluaran"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK5"
+msgid "Auto-zoom:"
+msgstr "Oto-zum:"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC2"
+msgid "Auto fit factor:"
+msgstr "Faktor oto suai:"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC3"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Default track preference"
+msgstr "Preferensi trek bawaan"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Subtitles:"
+msgstr "Subtitel:"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Audio:"
+msgstr "Audio:"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK4"
+msgid "Allow overriding external splitter choice"
+msgstr "Izinkan menimpa pilihan splitter eksternal"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Open settings"
+msgstr "Buka pengaturan"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK7"
+msgid "Use worker thread to construct the filter graph"
+msgstr "Gunakan worker thread untuk membangun grafik filter"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK6"
+msgid "Report pins which fail to render"
+msgstr "Laporkan pin yang gagal merender"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
+msgid "Auto-load audio files"
+msgstr "Oto-muat berkas audio"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Control"
+msgstr "Pengendali"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Volume step:"
+msgstr "Tahapan volume:"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Speed step:"
+msgstr "Tahapan kecepatan:"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK3"
+msgid "Override placement"
+msgstr "Menimpa penempatan"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC1"
+msgid "Horizontal:"
+msgstr "Horisontal:"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC2"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC3"
+msgid "Vertical:"
+msgstr "Vertikal:"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC4"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Delay step"
+msgstr "Tahap tundaan"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "ms"
+msgstr "md"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Texture settings (open the video again to see the changes)"
+msgstr "Pengaturan tekstur (buka kembali video untuk melihat perubahan)"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Sub pictures to buffer:"
+msgstr "Bufer sub gambar:"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Maximum texture resolution:"
+msgstr "Resolusi tekstur maksimum:"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_NO_SUB_ANIM"
+msgid "Never animate the subtitles"
+msgstr "Jangan pernah animasikan subtitel"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC5"
+msgid "Render at"
+msgstr "Render pada"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC6"
+msgid "% of the animation"
+msgstr "% dari animasi"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC7"
+msgid "Animate at"
+msgstr "Animasi pada"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC8"
+msgid "% of the video frame rate"
+msgstr "% dari laju frame video"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_ALLOW_DROPPING_SUBPIC"
+msgid "Allow dropping some subpictures if the queue is running late"
+msgstr "Izinkan membuang beberapa sub gambar jika antrean berjalan terlambat"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Renderer Layout"
+msgstr "Tata Letak Perender"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_SUB_AR_COMPENSATION"
+msgid "Apply aspect ratio compensation for anamorphic videos"
+msgstr "Terapkan kompensasi nisbah bidang untuk video anamorfik"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Warning"
+msgstr "Peringatan"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "If you override and enable full-screen antialiasing somewhere at your videocard's settings, subtitles aren't going to look any better but it will surely eat your CPU."
+msgstr "Jika anda menimpa dan memfungsikan anti-alias layar penuh pada pengaturan kartu video anda, subtitel tidak akan nampak lebih baik tetapi pastinya akan meningkatkan kinerja CPU anda."
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC2"
+msgid "File extensions"
+msgstr "Ekstensi berkas"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON2"
+msgid "Default"
+msgstr "Bawaan"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON_EXT_SET"
+msgid "Set"
+msgstr "Tetapkan"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC3"
+msgid "Association"
+msgstr "Asosiasi"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK8"
+msgid "Use the format-specific icons"
+msgstr "Gunakan ikon berformat spesifik"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON1"
+msgid "Run as &administrator"
+msgstr "Jalankan sebagai &administrator"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON7"
+msgid "Set as &default program"
+msgstr "Tetapkan sebagai program &baku"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC"
+msgid "Real-Time Streaming Protocol handler (for rtsp://... URLs)"
+msgstr "Penangan Protokol Real-Time Streaming (untuk URL rtsp://...)"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_RADIO1"
+msgid "RealMedia"
+msgstr "RealMedia"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_RADIO2"
+msgid "QuickTime"
+msgstr "QuickTime"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_RADIO3"
+msgid "DirectShow"
+msgstr "DirectShow"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK5"
+msgid "Check file extension first"
+msgstr "Periksa dulu berkas ekstensi"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC"
+msgid "Explorer Context Menu"
+msgstr "Menu Konteks Explorer"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK6"
+msgid "Directory"
+msgstr "Direktori"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK7"
+msgid "File(s)"
+msgstr "Berkas"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC1"
+msgid "Autoplay"
+msgstr "Otoputar"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK1"
+msgid "Video"
+msgstr "Video"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK2"
+msgid "Music"
+msgstr "Musik"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK4"
+msgid "DVD"
+msgstr "DVD"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK3"
+msgid "Audio CD"
+msgstr "CD Audio"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_STATIC"
+msgid "Jump distances (small, medium, large in ms)"
+msgstr "Jarak lompatan (kecil, menengah, besar dalam ms)"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_BUTTON1"
+msgid "Default"
+msgstr "Bawaan"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_FASTSEEK_CHECK"
+msgid "Fast seek (on keyframe)"
+msgstr "Jangkau cepat (pada keyframe)"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK2"
+msgid "Show chapter marks in seek bar"
+msgstr "Tampilkan tanda bab pada bilah jangkau"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK4"
+msgid "Display \"Now Playing\" information in Skype's mood message"
+msgstr "Tampilkan informasi \"Diputar Sekarang\" dalam pesan mood Skype"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
+msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
+msgstr "Cegah meminimalkan pemutar ketika dalam mode layar penuh pada monitor bukan baku"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Gunakan fitur bilah tugas ditingkatkan"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
+msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
+msgstr "Buka berkas sebelum/selanjutnya di dalam folder pada \"Lewati mundur/maju\" ketika hanya ada satu item di dalam daftar putar"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK8"
+msgid "Show time tooltip:"
+msgstr "Gunakan tip alat waktu:"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_STATIC"
+msgid "OSD font:"
+msgstr "Fon OSD:"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_LCD"
+msgid "Enable Logitech LCD support (experimental)"
+msgstr "Fungsikan dukungan LCD Logitech (eksperimental)"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK3"
+msgid "Auto-hide the mouse pointer during playback in windowed mode"
+msgstr "Oto-sembunyi penunjuk tetikus sepanjang pemutaran di mode windowed"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON1"
+msgid "Add Filter..."
+msgstr "Tambah Filter..."
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON2"
+msgid "Remove"
+msgstr "Buang"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_RADIO1"
+msgid "Prefer"
+msgstr "DIutamakan"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_RADIO2"
+msgid "Block"
+msgstr "Blok"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_RADIO3"
+msgid "Set merit:"
+msgstr "Tetapkan merit:"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON3"
+msgid "Up"
+msgstr "Naik"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON4"
+msgid "Down"
+msgstr "Turun"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON5"
+msgid "Add Media Type..."
+msgstr "Tambah Jenis Media..."
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON6"
+msgid "Add Sub Type..."
+msgstr "Tambah Jenis Subtitel..."
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON7"
+msgid "Delete"
+msgstr "Hapus"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON8"
+msgid "Reset List"
+msgstr "Setel Ulang Daftar"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Type:"
+msgstr "Jenis:"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Size:"
+msgstr "Ukuran:"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Media length:"
+msgstr "Panjang media:"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Video size:"
+msgstr "Ukuran video:"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Created:"
+msgstr "Dibuat:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Clip:"
+msgstr "Klip:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Author:"
+msgstr "Penulis:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Copyright:"
+msgstr "Hak cipta:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Rating:"
+msgstr "Penilaian:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Location:"
+msgstr "Lokasi:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Description:"
+msgstr "Deskripsi:"
+
+msgctxt "IDD_FAVADD_CAPTION"
+msgid "Add Favorite"
+msgstr "Tambah favorit"
+
+msgctxt "IDD_FAVADD_IDC_STATIC"
+msgid "Choose a name for your shortcut:"
+msgstr "Pilih nama untuk pintasan anda:"
+
+msgctxt "IDD_FAVADD_IDC_CHECK1"
+msgid "Remember position"
+msgstr "Ingat posisi"
+
+msgctxt "IDD_FAVADD_IDCANCEL"
+msgid "Cancel"
+msgstr "Batal"
+
+msgctxt "IDD_FAVADD_IDOK"
+msgid "OK"
+msgstr "OK"
+
+msgctxt "IDD_FAVADD_IDC_CHECK2"
+msgid "Relative drive"
+msgstr "Penggerak relatif"
+
+msgctxt "IDD_FAVORGANIZE_CAPTION"
+msgid "Organize Favorites"
+msgstr "Kelola Favorit"
+
+msgctxt "IDD_FAVORGANIZE_IDC_BUTTON1"
+msgid "Rename"
+msgstr "Ubah Nama"
+
+msgctxt "IDD_FAVORGANIZE_IDC_BUTTON3"
+msgid "Move Up"
+msgstr "Pindah ke Atas"
+
+msgctxt "IDD_FAVORGANIZE_IDC_BUTTON4"
+msgid "Move Down"
+msgstr "Pindah ke Bawah"
+
+msgctxt "IDD_FAVORGANIZE_IDC_BUTTON2"
+msgid "Delete"
+msgstr "Hapus"
+
+msgctxt "IDD_FAVORGANIZE_IDOK"
+msgid "OK"
+msgstr "OK"
+
+msgctxt "IDD_PNSPRESET_DLG_CAPTION"
+msgid "Pan&Scan Presets"
+msgstr "Prasetel Pan&Scan"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON2"
+msgid "New"
+msgstr "Baru"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON3"
+msgid "Delete"
+msgstr "Hapus"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON4"
+msgid "Up"
+msgstr "Naik"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON5"
+msgid "Down"
+msgstr "Turun"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON1"
+msgid "&Set"
+msgstr "&Setel"
+
+msgctxt "IDD_PNSPRESET_DLG_IDCANCEL"
+msgid "&Cancel"
+msgstr "&Batal"
+
+msgctxt "IDD_PNSPRESET_DLG_IDOK"
+msgid "&Save"
+msgstr "&Simpan"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_STATIC"
+msgid "Pos: 0.0 -> 1.0"
+msgstr "Posisi: 0.0 -> 1.0"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_STATIC"
+msgid "Zoom: 0.2 -> 3.0"
+msgstr "Zum: 0.2 -> 3.0"
+
+msgctxt "IDD_PPAGEACCELTBL_IDC_CHECK2"
+msgid "Global Media Keys"
+msgstr "Tombol Media Global"
+
+msgctxt "IDD_PPAGEACCELTBL_IDC_BUTTON1"
+msgid "Select All"
+msgstr "Pilih Semua"
+
+msgctxt "IDD_PPAGEACCELTBL_IDC_BUTTON2"
+msgid "Reset Selected"
+msgstr "Setel Ulang Pilihan"
+
+msgctxt "IDD_MEDIATYPES_DLG_CAPTION"
+msgid "Warning"
+msgstr "Peringatan"
+
+msgctxt "IDD_MEDIATYPES_DLG_IDC_STATIC1"
+msgid "MPC-HC could not render some of the pins in the graph, you may not have the needed codecs or filters installed on the system."
+msgstr "MPC-HC tidak bisa merender beberapa pin pada grafik, anda mungkin tidak memiliki kodek atau filter yang diperlukan terpasang pada sistem."
+
+msgctxt "IDD_MEDIATYPES_DLG_IDC_STATIC2"
+msgid "The following pin(s) failed to find a connectable filter:"
+msgstr "Pin berikut gagal untuk menemukan filter yang dapat sambung:"
+
+msgctxt "IDD_MEDIATYPES_DLG_IDOK"
+msgid "Close"
+msgstr "Tutup"
+
+msgctxt "IDD_SAVE_DLG_CAPTION"
+msgid "Saving..."
+msgstr "Menyimpan..."
+
+msgctxt "IDD_SAVE_DLG_IDCANCEL"
+msgid "Cancel"
+msgstr "Batal"
+
+msgctxt "IDD_SAVETEXTFILEDIALOGTEMPL_IDC_STATIC1"
+msgid "Encoding:"
+msgstr "Encoding:"
+
+msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_STATIC1"
+msgid "Encoding:"
+msgstr "Encoding:"
+
+msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_STATIC"
+msgid "Delay:"
+msgstr "Tundaan:"
+
+msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_STATIC"
+msgid "ms"
+msgstr "ms"
+
+msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_CHECK1"
+msgid "Save custom style"
+msgstr "Simpan gaya ubahsuai"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "JPEG quality:"
+msgstr "Kualitas JPEG:"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "Thumbnails:"
+msgstr "Gambar mini:"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "rows"
+msgstr "baris"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "columns"
+msgstr "kolom"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "Image width:"
+msgstr "Lebar gambar:"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "pixels"
+msgstr "piksel"
+
+msgctxt "IDD_ADDREGFILTER_CAPTION"
+msgid "Select Filter"
+msgstr "Pilih Filter"
+
+msgctxt "IDD_ADDREGFILTER_IDC_BUTTON1"
+msgid "Browse..."
+msgstr "Ramban..."
+
+msgctxt "IDD_ADDREGFILTER_IDOK"
+msgid "OK"
+msgstr "OK"
+
+msgctxt "IDD_ADDREGFILTER_IDCANCEL"
+msgid "Cancel"
+msgstr "Batal"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Font"
+msgstr "Fon"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_BUTTON1"
+msgid "Font"
+msgstr "Fon"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Spacing"
+msgstr "Spasi"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Angle (z,°)"
+msgstr "Sudut (z, °)"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Scale (x,%)"
+msgstr "Skala (x,%)"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Scale (y,%)"
+msgstr "Skala (y,%)"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Border Style"
+msgstr "Gaya Tepi"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_RADIO1"
+msgid "Outline"
+msgstr "Garis luar"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_RADIO2"
+msgid "Opaque box"
+msgstr "Kotak legap"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Width"
+msgstr "Lebar"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Shadow"
+msgstr "Bayang"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Screen Alignment && Margins"
+msgstr "Perataan Layar && Jarak"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Left"
+msgstr "Kiri"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Right"
+msgstr "Kanan"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Top"
+msgstr "Atas"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Bottom"
+msgstr "Bawah"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_CHECK_RELATIVETO"
+msgid "Position subtitles relative to the video frame"
+msgstr "Posisi subtitel relatif pada gambar video"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Colors && Transparency"
+msgstr "Warna && Transparansi"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "0%"
+msgstr "0%"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "100%"
+msgstr "100%"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Primary"
+msgstr "Utama"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Secondary"
+msgstr "Sekunder"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Outline"
+msgstr "Kerangka"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_CHECK1"
+msgid "Link alpha channels"
+msgstr "Tautan saluran alfa"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
+msgid "If you would like to use the stand-alone versions of these filters or another replacement, disable them here."
+msgstr "Jika anda ingin menggunakan versi mandiri dari filter ini atau pengganti yang lain, nonfungsikan filter tersebut di sini."
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
+msgid "Source Filters"
+msgstr "Sumber Filter"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
+msgid "Transform Filters"
+msgstr "Filter Transformasi"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
+msgid "Internal LAV Filters settings"
+msgstr "Pengaturan Internal LAV Filters"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_SPLITTER_CONF"
+msgid "Splitter"
+msgstr "Splitter"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_VIDEO_DEC_CONF"
+msgid "Video decoder"
+msgstr "Dekoder video"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_AUDIO_DEC_CONF"
+msgid "Audio decoder"
+msgstr "Dekoder audio"
+
+msgctxt "IDD_PPAGELOGO_IDC_RADIO1"
+msgid "Internal:"
+msgstr "Internal:"
+
+msgctxt "IDD_PPAGELOGO_IDC_RADIO2"
+msgid "External:"
+msgstr "Eksternal:"
+
+msgctxt "IDD_PPAGELOGO_IDC_BUTTON2"
+msgid "Browse..."
+msgstr "Ramban..."
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "DirectShow Video"
+msgstr "Video DirectShow"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "RealMedia Video"
+msgstr "Video RealMedia"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "QuickTime Video"
+msgstr "Video QuickTime"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Audio Renderer"
+msgstr "Perender Audio"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "VMR-7/VMR-9 (renderless) and EVR (CP) settings"
+msgstr "Pengaturan VMR-7/VMR-9 (renderless) dan EVR (CP)"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Surface:"
+msgstr "Permukaan:"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Resizer:"
+msgstr "Pengubah Ukuran:"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_D3D9DEVICE"
+msgid "Select D3D9 Render Device"
+msgstr "Pilih Perangkat Render D3D9"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_RESETDEVICE"
+msgid "Reinitialize when changing display"
+msgstr "Inisialisasi ulang ketika mengubah layar"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_FULLSCREEN_MONITOR_CHECK"
+msgid "D3D Fullscreen"
+msgstr "Layar Penuh D3D"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_DSVMR9ALTERNATIVEVSYNC"
+msgid "Alternative VSync"
+msgstr "VSync Alternatif"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_DSVMR9LOADMIXER"
+msgid "VMR-9 Mixer Mode"
+msgstr "Mode Pengadon VMR-9"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_DSVMR9YUVMIXER"
+msgid "YUV Mixing"
+msgstr "YUV Mixing"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_EVR_BUFFERS_TXT"
+msgid "EVR Buffers:"
+msgstr "Bufer EVR:"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "DXVA"
+msgstr "DXVA"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Subtitles"
+msgstr "Subtitel"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Screenshot"
+msgstr "Cuplikan layar"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Shaders"
+msgstr "Shader"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Rotation"
+msgstr "Rotasi"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Subtitle Renderer"
+msgstr "Perender Subtitel"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
+msgid "Listen on port:"
+msgstr "Dengarkan di port:"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_STATIC1"
+msgid "Launch in web browser..."
+msgstr "Luncurkan di peramban web..."
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK3"
+msgid "Enable compression"
+msgstr "Fungsikan kompresi"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
+msgid "Allow access from localhost only"
+msgstr "Izinkan akses hanya dari localhost saja"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Fungsikan pratinjau"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
+msgid "Print debug information"
+msgstr "Cetak informasi awakutu"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK4"
+msgid "Serve pages from:"
+msgstr "Layani halaman dari:"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_BUTTON1"
+msgid "Browse..."
+msgstr "Ramban..."
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_BUTTON2"
+msgid "Deploy..."
+msgstr "Terapkan..."
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_STATIC"
+msgid "Default page:"
+msgstr "Halaman baku:"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_STATIC"
+msgid "CGI handlers: (.ext1=path1;.ext2=path2;...)"
+msgstr "Penangan CGI: (.ext1=path1;.ext2=path2;...)"
+
+msgctxt "IDD_SUBTITLEDL_DLG_CAPTION"
+msgid "Subtitles available online"
+msgstr "Subtitel tersedia secara daring"
+
+msgctxt "IDD_SUBTITLEDL_DLG_IDOK"
+msgid "Download && Open"
+msgstr "Unduh && Buka"
+
+msgctxt "IDD_SUBTITLEDL_DLG_IDC_CHECK1"
+msgid "Replace currently loaded subtitles"
+msgstr "Ganti subtitel yang sedang dimuat"
+
+msgctxt "IDD_FILEPROPRES_IDC_BUTTON1"
+msgid "Save As..."
+msgstr "Simpan Sebagai..."
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Color controls (for VMR-9, EVR and madVR)"
+msgstr "Pengendali warna (untuk VMR-9, EVR dan madVR)"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Brightness"
+msgstr "Kecerahan"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Contrast"
+msgstr "Kontras"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Hue"
+msgstr "Rona"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Saturation"
+msgstr "Kejenuhan"
+
+msgctxt "IDD_PPAGEMISC_IDC_RESET"
+msgid "Reset"
+msgstr "Setel Ulang"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Update check"
+msgstr "Perika pemutakhiran"
+
+msgctxt "IDD_PPAGEMISC_IDC_CHECK1"
+msgid "Enable automatic update check"
+msgstr "Fungsikan pemeriksaan pemutakhiran otomatis"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC5"
+msgid "Check every:"
+msgstr "Periksa setiap:"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC6"
+msgid "day(s)"
+msgstr "hari"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Settings management"
+msgstr "Pengelolaan pengaturan"
+
+msgctxt "IDD_PPAGEMISC_IDC_RESET_SETTINGS"
+msgid "Reset"
+msgstr "Setel Ulang"
+
+msgctxt "IDD_PPAGEMISC_IDC_EXPORT_SETTINGS"
+msgid "Export"
+msgstr "Ekspor"
+
+msgctxt "IDD_PPAGEMISC_IDC_EXPORT_KEYS"
+msgid "Export keys"
+msgstr "Ekspor kunci"
+
+msgctxt "IDD_TUNER_SCAN_CAPTION"
+msgid "Tuner scan"
+msgstr "Pindaian pelaras"
+
+msgctxt "IDD_TUNER_SCAN_ID_START"
+msgid "Start"
+msgstr "Awal"
+
+msgctxt "IDD_TUNER_SCAN_IDCANCEL"
+msgid "Cancel"
+msgstr "Batal"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "Freq. Start"
+msgstr "Frek. Awal"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "Bandwidth"
+msgstr "Lebar gelombang"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "Freq. End"
+msgstr "Frek. Akhir"
+
+msgctxt "IDD_TUNER_SCAN_IDC_CHECK_IGNORE_ENCRYPTED"
+msgid "Ignore encrypted channels"
+msgstr "Abaikan saluran yang terenkripsi"
+
+msgctxt "IDD_TUNER_SCAN_ID_SAVE"
+msgid "Save"
+msgstr "Simpan"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "S"
+msgstr "S"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "Q"
+msgstr "Q"
+
+msgctxt "IDD_TUNER_SCAN_IDC_CHECK_OFFSET"
+msgid "Use an offset"
+msgstr "Gunakan ofset"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC"
+msgid "Default Device"
+msgstr "Perangkat Bawaan"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_RADIO1"
+msgid "Analog"
+msgstr "Analog"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_RADIO2"
+msgid "Digital"
+msgstr "Digital"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC"
+msgid "Analog settings"
+msgstr "Pengaturan analog"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC1"
+msgid "Video"
+msgstr "Video"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC2"
+msgid "Audio"
+msgstr "Audio"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC3"
+msgid "Country"
+msgstr "Negara"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC"
+msgid "Digital settings (BDA)"
+msgstr "Pengaturan digital (BDA)"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC4"
+msgid "Network Provider"
+msgstr "Penyedia Jaringan"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC5"
+msgid "Tuner"
+msgstr "Penala"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC6"
+msgid "Receiver"
+msgstr "Penerima"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_PPAGECAPTURE_ST10"
+msgid "Channel switching approach:"
+msgstr "Pendekatan pengalihan saluran:"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_PPAGECAPTURE_ST11"
+msgid "Rebuild filter graph"
+msgstr "Buat ulang grafik filter"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_PPAGECAPTURE_ST12"
+msgid "Stop filter graph"
+msgstr "Hentikan grafik filter"
+
+msgctxt "IDD_PPAGESYNC_IDC_SYNCVIDEO"
+msgid "Sync video to display"
+msgstr "Laras video ke tampilan"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC1"
+msgid "Frequency adjustment:"
+msgstr "Penyesuaian frekuensi:"
+
+msgctxt "IDD_PPAGESYNC_IDC_SYNCDISPLAY"
+msgid "Sync display to video"
+msgstr "Laras tampilan ke video"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC2"
+msgid "Frequency adjustment:"
+msgstr "Penyesuaian frekuensi:"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC3"
+msgid "lines"
+msgstr "baris"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC4"
+msgid "columns"
+msgstr "kolom"
+
+msgctxt "IDD_PPAGESYNC_IDC_SYNCNEAREST"
+msgid "Present at nearest VSync"
+msgstr "Sajikan pada VSync terdekat"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC5"
+msgid "Target sync offset:"
+msgstr "Ofset target laras:"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC6"
+msgid "ms"
+msgstr "ms"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC7"
+msgid "Control limits:"
+msgstr "Batas kendali:"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC8"
+msgid "+/-"
+msgstr "+/-"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC9"
+msgid "ms"
+msgstr "ms"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC10"
+msgid "Changes take effect after the playback has been closed and restarted."
+msgstr "Perubahan terdampak setelah pemutaran ditutup dan dimulai ulang."
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK1"
+msgid "Launch files in fullscreen"
+msgstr "Luncurkan berkas di layar penuh"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK4"
+msgid "Hide controls in fullscreen"
+msgstr "Sembunyikan pengendali di layar penuh"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC1"
+msgid "ms"
+msgstr "ms"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK6"
+msgid "Hide docked panels"
+msgstr "Sembunyikan panel tersemat"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK5"
+msgid "Exit fullscreen at the end of playback"
+msgstr "Keluar dari layar penuh diakhir pemutaran"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC"
+msgid "Fullscreen monitor"
+msgstr "Monitor layar penuh"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK2"
+msgid "Use autochange fullscreen monitor mode"
+msgstr "Gunakan oto-ubah mode monitor layar penuh"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_BUTTON1"
+msgid "Add"
+msgstr "Tambah"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_BUTTON2"
+msgid "Del"
+msgstr "Hapus"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_BUTTON3"
+msgid "Up"
+msgstr "Atas"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_BUTTON4"
+msgid "Down"
+msgstr "Turun"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK3"
+msgid "Apply default monitor mode on fullscreen exit"
+msgstr "Terapkan mode monitor bawaan saat keluar dari layar penuh"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_RESTORERESCHECK"
+msgid "Restore resolution on program exit"
+msgstr "Kembalikan resolusi saat keluar dari program"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC"
+msgid "Delay"
+msgstr "Jeda"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC2"
+msgid "s"
+msgstr "s"
+
+msgctxt "IDD_NAVIGATION_DLG_IDC_NAVIGATION_INFO"
+msgid "Info"
+msgstr "Info"
+
+msgctxt "IDD_NAVIGATION_DLG_IDC_NAVIGATION_SCAN"
+msgid "Scan"
+msgstr "Pindai"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_CHECK1"
+msgid "Prefer forced and/or default subtitles tracks"
+msgstr "Lebih memilih trek subtitel yang dipaksakan dan/atau subtitel bawaan"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_CHECK2"
+msgid "Prefer external subtitles over embedded subtitles"
+msgstr "Lebih memilih subtitel eksternal daripada subtitel tertanam"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_CHECK3"
+msgid "Ignore embedded subtitles"
+msgstr "Abaikan subtitel tertanam"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_STATIC"
+msgid "Autoload paths"
+msgstr "Otomuat jalur"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_BUTTON1"
+msgid "Reset"
+msgstr "Setel Ulang"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_STATIC"
+msgid "Online database"
+msgstr "Basis Data Daring"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_STATIC"
+msgid "Base URL of the online subtitle database:"
+msgstr "URL dari basis data subtitel daring:"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_BUTTON2"
+msgid "Test"
+msgstr "Uji Coba"
+
+msgctxt "IDD_UPDATE_DIALOG_CAPTION"
+msgid "Update Checker"
+msgstr "Pemeriksa Pemutakhiran"
+
+msgctxt "IDD_UPDATE_DIALOG_IDC_UPDATE_DL_BUTTON"
+msgid "&Download now"
+msgstr "Un&duh sekarang"
+
+msgctxt "IDD_UPDATE_DIALOG_IDC_UPDATE_LATER_BUTTON"
+msgid "Remind me &later"
+msgstr "Ingatkan saya &lagi"
+
+msgctxt "IDD_UPDATE_DIALOG_IDC_UPDATE_IGNORE_BUTTON"
+msgid "&Ignore this update"
+msgstr "Aba&ikan pemutakhiran ini"
+
+msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
+msgid "Shaders contain special effects which can be added to the video rendering process."
+msgstr "Shader mengandung efek spesial yang dapat ditambahkan ke proses perenderan video."
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON12"
+msgid "Add shader file"
+msgstr "Tambah berkas shader"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON13"
+msgid "Remove"
+msgstr "Buang"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON1"
+msgid "Add to pre-resize"
+msgstr "Tambah ke pra-ubah ukuran"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON2"
+msgid "Add to post-resize"
+msgstr "Tambah ke paska ubah ukuran"
+
+msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
+msgid "Shader presets"
+msgstr "Prasetel Shader"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON3"
+msgid "Load"
+msgstr "Muat"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON4"
+msgid "Save"
+msgstr "Simpan"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON5"
+msgid "Delete"
+msgstr "Hapus"
+
+msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
+msgid "Active pre-resize shaders"
+msgstr "Aktifkan shader pra ubah ukuran"
+
+msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
+msgid "Active post-resize shaders"
+msgstr "Atifkan shader paska ubah ukuran"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_CAPTION"
+msgid "Debug Shaders"
+msgstr "Awakutu Shader"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_STATIC"
+msgid "Debug Information"
+msgstr "Infomasi Awakutu"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_RADIO1"
+msgid "PS 2.0"
+msgstr "PS 2.0"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_RADIO2"
+msgid "PS 2.0b"
+msgstr "PS 2.0b"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_RADIO3"
+msgid "PS 2.0a"
+msgstr "PS 2.0a"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_RADIO4"
+msgid "PS 3.0"
+msgstr "PS 3.0"
+
+msgctxt "IDD_PPAGEADVANCED_IDC_STATIC"
+msgid "Advanced Settings, do not edit unless you know what you are doing."
+msgstr "Pengaturan Tingkat Lanjut, jangan sunting kecuali anda tahu apa yang anda lakukan."
+
+msgctxt "IDD_PPAGEADVANCED_IDC_RADIO1"
+msgid "True"
+msgstr "Benar"
+
+msgctxt "IDD_PPAGEADVANCED_IDC_RADIO2"
+msgid "False"
+msgstr "Salah"
+
+msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
+msgid "Default"
+msgstr "Bawaan"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Perangkat"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Mode eksklusif"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Izinkan bitstreaming"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Opsi"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Fungsikan stereo bersilangan (untuk fon kepala)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Matikan"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Level:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Catatan"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Untuk meminimalkan distorsi audio, direkomendasikan untuk tetap menjaga volume pemutar Anda sekitar 85% ketika memutar konten yang berisik."
+
+msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
+msgid "JPEG quality:"
+msgstr "Kualitas JPEG:"
+
+msgctxt "IDD_CMD_LINE_HELP_CAPTION"
+msgid "Command line help"
+msgstr "Bantuan perintah baris"
+
+msgctxt "IDD_CMD_LINE_HELP_IDOK"
+msgid "OK"
+msgstr "OK"
+
+msgctxt "IDD_CRASH_REPORTER_CAPTION"
+msgid "Crash reporter"
+msgstr "Pelapor tumbukan"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Mohon maaf, sepertinya MPC-HC telah bertumbuk :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Kirim laporan kutu agar kami dapat mendiagnosa dan memperbaiki masalahnya."
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
+msgid "Optional information"
+msgstr "Informasi opsional"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
+msgid "Email:"
+msgstr "Surel:"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC3"
+msgid "Your email address is optional and will only be used if the developers need to contact you for more information."
+msgstr "Alamat surel anda opsional dan hanya akan digunakan jika pengembang perlu untuk menghubungi anda untuk informasi lebih lanjut."
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
+msgid "Problem description (use English only):"
+msgstr "Deskripsi masalah (hanya gunakan Bahasa Inggris):"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Mulai Ulang MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Keluar MPC-HC"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.id.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.id.menus.po
new file mode 100644
index 000000000..1e3a3ab7b
--- /dev/null
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.id.menus.po
@@ -0,0 +1,703 @@
+# MPC-HC - Strings extracted from menus
+# Copyright (C) 2002 - 2013 see Authors.txt
+# This file is distributed under the same license as the MPC-HC package.
+# Translators:
+# Hatta.z, 2014
+# Muhammad Wahyu Dwinash <Dwinash@gmail.com>, 2014
+# Reza Septyan .R. <ainofuyuumI@outlook.com>, 2014
+# rizqiromadhon <rizqi-romadhon@outlook.com>, 2014
+# zk <zamani.karmana@gmail.com>, 2015
+# zk <zamani.karmana@gmail.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: MPC-HC\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-09-20 11:16+0000\n"
+"Last-Translator: zk <zamani.karmana@gmail.com>\n"
+"Language-Team: Indonesian (http://www.transifex.com/mpc-hc/mpc-hc/language/id/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: id\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+msgctxt "POPUP"
+msgid "&File"
+msgstr "&Berkas"
+
+msgctxt "ID_FILE_OPENQUICK"
+msgid "&Quick Open File..."
+msgstr "Buka Berkas &Cepat..."
+
+msgctxt "ID_FILE_OPENMEDIA"
+msgid "&Open File..."
+msgstr "B&uka Berkas..."
+
+msgctxt "ID_FILE_OPENDVDBD"
+msgid "Open &DVD/BD..."
+msgstr "Buka &DVD/BD"
+
+msgctxt "ID_FILE_OPENDEVICE"
+msgid "Open De&vice..."
+msgstr "Buka &Perangkat..."
+
+msgctxt "ID_FILE_OPENDIRECTORY"
+msgid "Open Dir&ectory..."
+msgstr "Buka Dir&ektori..."
+
+msgctxt "ID_FILE_OPENDISC"
+msgid "O&pen Disc"
+msgstr "Buka Cakra&m"
+
+msgctxt "ID_RECENT_FILES"
+msgid "Recent &Files"
+msgstr "Berkas Ba&ru-baru Ini"
+
+msgctxt "ID_FILE_CLOSE_AND_RESTORE"
+msgid "&Close"
+msgstr "&Tutup"
+
+msgctxt "ID_FILE_SAVE_COPY"
+msgid "&Save a Copy..."
+msgstr "&Simpan Salinan..."
+
+msgctxt "ID_FILE_SAVE_IMAGE"
+msgid "Save &Image..."
+msgstr "S&impan Gambar..."
+
+msgctxt "ID_FILE_SAVE_THUMBNAILS"
+msgid "Save &Thumbnails..."
+msgstr "Simpan Mi&niatur Gambar..."
+
+msgctxt "ID_FILE_LOAD_SUBTITLE"
+msgid "&Load Subtitle..."
+msgstr "Muat Subtite&l..."
+
+msgctxt "ID_FILE_SAVE_SUBTITLE"
+msgid "Save S&ubtitle..."
+msgstr "Simpan S&ubtitel..."
+
+msgctxt "POPUP"
+msgid "Subtitle Data&base"
+msgstr "B&asis Data Subtitel"
+
+msgctxt "ID_FILE_ISDB_SEARCH"
+msgid "&Search..."
+msgstr "&Cari..."
+
+msgctxt "ID_FILE_ISDB_UPLOAD"
+msgid "&Upload..."
+msgstr "&Unggah..."
+
+msgctxt "ID_FILE_ISDB_DOWNLOAD"
+msgid "&Download..."
+msgstr "Un&duh..."
+
+msgctxt "ID_FILE_PROPERTIES"
+msgid "P&roperties"
+msgstr "Pr&operti"
+
+msgctxt "ID_FILE_EXIT"
+msgid "E&xit"
+msgstr "&Keluar"
+
+msgctxt "POPUP"
+msgid "&View"
+msgstr "&Tilik"
+
+msgctxt "ID_VIEW_CAPTIONMENU"
+msgid "Caption&&Menu"
+msgstr "Takarir & &Menu"
+
+msgctxt "ID_VIEW_SEEKER"
+msgid "See&k Bar"
+msgstr "Bilah Jang&kau"
+
+msgctxt "ID_VIEW_CONTROLS"
+msgid "&Controls"
+msgstr "&Pengendali"
+
+msgctxt "ID_VIEW_INFORMATION"
+msgid "&Information"
+msgstr "&Informasi"
+
+msgctxt "ID_VIEW_STATISTICS"
+msgid "&Statistics"
+msgstr "&Statistik"
+
+msgctxt "ID_VIEW_STATUS"
+msgid "St&atus"
+msgstr "St&atus"
+
+msgctxt "ID_VIEW_SUBRESYNC"
+msgid "Su&bresync"
+msgstr "Su&bresync"
+
+msgctxt "ID_VIEW_PLAYLIST"
+msgid "Pla&ylist"
+msgstr "Da&ftar Putar"
+
+msgctxt "ID_VIEW_CAPTURE"
+msgid "Captu&re"
+msgstr "Tan&gkapan"
+
+msgctxt "ID_VIEW_NAVIGATION"
+msgid "Na&vigation"
+msgstr "Na&vigasi"
+
+msgctxt "ID_VIEW_DEBUGSHADERS"
+msgid "&Debug Shaders"
+msgstr "Awakutu Sha&ders"
+
+msgctxt "POPUP"
+msgid "&Presets..."
+msgstr "&Prasetel..."
+
+msgctxt "ID_VIEW_PRESETS_MINIMAL"
+msgid "&Minimal"
+msgstr "&Minimal"
+
+msgctxt "ID_VIEW_PRESETS_COMPACT"
+msgid "&Compact"
+msgstr "&Ringkas"
+
+msgctxt "ID_VIEW_PRESETS_NORMAL"
+msgid "&Normal"
+msgstr "&Normal"
+
+msgctxt "ID_VIEW_FULLSCREEN"
+msgid "F&ull Screen"
+msgstr "Layar Pen&uh"
+
+msgctxt "POPUP"
+msgid "&Zoom"
+msgstr "&Zum"
+
+msgctxt "ID_VIEW_ZOOM_50"
+msgid "&50%"
+msgstr "&50%"
+
+msgctxt "ID_VIEW_ZOOM_100"
+msgid "&100%"
+msgstr "&100%"
+
+msgctxt "ID_VIEW_ZOOM_200"
+msgid "&200%"
+msgstr "&200%"
+
+msgctxt "ID_VIEW_ZOOM_AUTOFIT"
+msgid "Auto &Fit"
+msgstr "Oto &Suai"
+
+msgctxt "ID_VIEW_ZOOM_AUTOFIT_LARGER"
+msgid "Auto Fit (&Larger Only)"
+msgstr "Oto Suai (&Lebih Besar Saja)"
+
+msgctxt "POPUP"
+msgid "R&enderer Settings"
+msgstr "Pengaturan Per&ender"
+
+msgctxt "ID_VIEW_TEARING_TEST"
+msgid "&Tearing Test"
+msgstr "Uji &Tearing"
+
+msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
+msgid "&Display Statistics"
+msgstr "Statistik &Tampilan"
+
+msgctxt "ID_VIEW_OSD_DISPLAY_TIME"
+msgid "Display Current T&ime"
+msgstr "Tampilkan Waktu Saat &Ini"
+
+msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
+msgid "Show &File Name"
+msgstr "Tampilkan Nama &Berkas"
+
+msgctxt "POPUP"
+msgid "&Output Range"
+msgstr "Rentang &Keluaran"
+
+msgctxt "ID_VIEW_EVROUTPUTRANGE_0_255"
+msgid "&0 - 255"
+msgstr "&0 - 255"
+
+msgctxt "ID_VIEW_EVROUTPUTRANGE_16_235"
+msgid "&16 - 235"
+msgstr "&16 - 235"
+
+msgctxt "POPUP"
+msgid "&Presentation"
+msgstr "&Presentasi"
+
+msgctxt "ID_VIEW_D3DFULLSCREEN"
+msgid "D3D Fullscreen &Mode"
+msgstr "&Mode Layar Penuh D3D"
+
+msgctxt "ID_VIEW_FULLSCREENGUISUPPORT"
+msgid "D3D Fullscreen &GUI Support"
+msgstr "Dukungan &GUI Layar Penuh D3D"
+
+msgctxt "ID_VIEW_HIGHCOLORRESOLUTION"
+msgid "10-bit &RGB Output"
+msgstr "Keluaran 10-bit &RGB"
+
+msgctxt "ID_VIEW_FORCEINPUTHIGHCOLORRESOLUTION"
+msgid "Force 10-bit RGB &Input"
+msgstr "Paksa Masukkan 10-b&it RGB"
+
+msgctxt "ID_VIEW_FULLFLOATINGPOINTPROCESSING"
+msgid "&Full Floating Point Processing"
+msgstr "Pemrosesan &Full Floating Point"
+
+msgctxt "ID_VIEW_HALFFLOATINGPOINTPROCESSING"
+msgid "&Half Floating Point Processing"
+msgstr "Pemrosesan &Half Floating Point"
+
+msgctxt "ID_VIEW_DISABLEDESKTOPCOMPOSITION"
+msgid "Disable desktop composition (&Aero)"
+msgstr "Nonfungsikan komposisi destop (&Aero)"
+
+msgctxt "ID_VIEW_ENABLEFRAMETIMECORRECTION"
+msgid "Enable Frame Time &Correction"
+msgstr "Fungsikan &Koreksi Waktu Frame"
+
+msgctxt "POPUP"
+msgid "&Color Management"
+msgstr "Pengelolaan &Warna "
+
+msgctxt "ID_VIEW_CM_ENABLE"
+msgid "&Enable"
+msgstr "&Fungsikan"
+
+msgctxt "POPUP"
+msgid "&Input Type"
+msgstr "Jen&is Masukan"
+
+msgctxt "ID_VIEW_CM_INPUT_AUTO"
+msgid "&Auto-Detect"
+msgstr "&Auto-Deteksi"
+
+msgctxt "ID_VIEW_CM_INPUT_HDTV"
+msgid "&HDTV"
+msgstr "&HDTV"
+
+msgctxt "ID_VIEW_CM_INPUT_SDTV_NTSC"
+msgid "SDTV &NTSC"
+msgstr "SDTV &NTSC"
+
+msgctxt "ID_VIEW_CM_INPUT_SDTV_PAL"
+msgid "SDTV &PAL"
+msgstr "SDTV &PAL"
+
+msgctxt "POPUP"
+msgid "Ambient &Light"
+msgstr "Cahaya Ambient"
+
+msgctxt "ID_VIEW_CM_AMBIENTLIGHT_BRIGHT"
+msgid "&Bright (2.2 Gamma)"
+msgstr "&Terang (2.2 Gamma)"
+
+msgctxt "ID_VIEW_CM_AMBIENTLIGHT_DIM"
+msgid "&Dim (2.35 Gamma)"
+msgstr "&Redup (2.35 Gamma)"
+
+msgctxt "ID_VIEW_CM_AMBIENTLIGHT_DARK"
+msgid "D&ark (2.4 Gamma)"
+msgstr "Gel&ap (2.4 Gamma)"
+
+msgctxt "POPUP"
+msgid "&Rendering Intent"
+msgstr "Tujuan &Render"
+
+msgctxt "ID_VIEW_CM_INTENT_PERCEPTUAL"
+msgid "&Perceptual"
+msgstr "&Perceptual"
+
+msgctxt "ID_VIEW_CM_INTENT_RELATIVECOLORIMETRIC"
+msgid "&Relative Colorimetric"
+msgstr "Metrik Warna &Relatif"
+
+msgctxt "ID_VIEW_CM_INTENT_SATURATION"
+msgid "&Saturation"
+msgstr "&Kejenuhan"
+
+msgctxt "ID_VIEW_CM_INTENT_ABSOLUTECOLORIMETRIC"
+msgid "&Absolute Colorimetric"
+msgstr "Metrik Warna &Absolut"
+
+msgctxt "POPUP"
+msgid "&VSync"
+msgstr "&VSync"
+
+msgctxt "ID_VIEW_VSYNC"
+msgid "&VSync"
+msgstr "&VSync"
+
+msgctxt "ID_VIEW_VSYNCACCURATE"
+msgid "&Accurate VSync"
+msgstr "VSync &Akurat"
+
+msgctxt "ID_VIEW_ALTERNATIVEVSYNC"
+msgid "A&lternative VSync"
+msgstr "VSync A&lternatif"
+
+msgctxt "ID_VIEW_VSYNCOFFSET_DECREASE"
+msgid "&Decrease VSync Offset"
+msgstr "&Turunkan Ofset VSync"
+
+msgctxt "ID_VIEW_VSYNCOFFSET_INCREASE"
+msgid "&Increase VSync Offset"
+msgstr "Na&ikkan Ofset Vsync"
+
+msgctxt "POPUP"
+msgid "&GPU Control"
+msgstr "Pengendali &GPU"
+
+msgctxt "ID_VIEW_FLUSHGPU_BEFOREVSYNC"
+msgid "Flush GPU &before VSync"
+msgstr "Bilas GPU se&belum VSync"
+
+msgctxt "ID_VIEW_FLUSHGPU_AFTERPRESENT"
+msgid "Flush GPU &after Present"
+msgstr "Bilas GPU setel&ah Present"
+
+msgctxt "ID_VIEW_FLUSHGPU_WAIT"
+msgid "&Wait for flushes"
+msgstr "&Tunggu membilas"
+
+msgctxt "POPUP"
+msgid "R&eset"
+msgstr "S&etel Ulang"
+
+msgctxt "ID_VIEW_RESET_DEFAULT"
+msgid "Reset to &default renderer settings"
+msgstr "Kembalikan ke pengaturan peren&der bawaan"
+
+msgctxt "ID_VIEW_RESET_OPTIMAL"
+msgid "Reset to &optimal renderer settings"
+msgstr "Kembalikan ke pengaturan perender &optimal"
+
+msgctxt "POPUP"
+msgid "Video &Frame"
+msgstr "&Frame Video"
+
+msgctxt "ID_VIEW_VF_HALF"
+msgid "&Half Size"
+msgstr "Ukuran Setenga&h"
+
+msgctxt "ID_VIEW_VF_NORMAL"
+msgid "&Normal Size"
+msgstr "Ukuran &Normal"
+
+msgctxt "ID_VIEW_VF_DOUBLE"
+msgid "&Double Size"
+msgstr "Ukuran Gan&da"
+
+msgctxt "ID_VIEW_VF_STRETCH"
+msgid "&Stretch To Window"
+msgstr "&Lebarkan ke Jendela"
+
+msgctxt "ID_VIEW_VF_FROMINSIDE"
+msgid "Touch Window From &Inside"
+msgstr "Sentuh Jendela Dar&i Dalam"
+
+msgctxt "ID_VIEW_VF_ZOOM1"
+msgid "Zoom &1"
+msgstr "Zum &1"
+
+msgctxt "ID_VIEW_VF_ZOOM2"
+msgid "Zoom &2"
+msgstr "Zum &2"
+
+msgctxt "ID_VIEW_VF_FROMOUTSIDE"
+msgid "Touch Window From &Outside"
+msgstr "Sentuh Jendela Dari L&uar"
+
+msgctxt "ID_VIEW_VF_KEEPASPECTRATIO"
+msgid "&Keep Aspect Ratio"
+msgstr "&Jaga Nisbah Bidang"
+
+msgctxt "POPUP"
+msgid "Override &Aspect Ratio"
+msgstr "Timpa Nisb&ah Bidang"
+
+msgctxt "ID_ASPECTRATIO_SOURCE"
+msgid "&Default"
+msgstr "&Bawaan"
+
+msgctxt "ID_ASPECTRATIO_4_3"
+msgid "&4:3"
+msgstr "&4:3"
+
+msgctxt "ID_ASPECTRATIO_5_4"
+msgid "&5:4"
+msgstr "&5:4"
+
+msgctxt "ID_ASPECTRATIO_16_9"
+msgid "&16:9"
+msgstr "&16:9"
+
+msgctxt "ID_ASPECTRATIO_235_100"
+msgid "&235:100"
+msgstr "&235:100"
+
+msgctxt "ID_ASPECTRATIO_185_100"
+msgid "1&85:100"
+msgstr "1&85:100"
+
+msgctxt "ID_VIEW_VF_COMPMONDESKARDIFF"
+msgid "&Correct Monitor/Desktop AR Diff"
+msgstr "&Koreksi Beda AR Monitor/Destop"
+
+msgctxt "POPUP"
+msgid "Pa&n&&Scan"
+msgstr "Pa&n & &Pindai"
+
+msgctxt "ID_VIEW_INCSIZE"
+msgid "&Increase Size"
+msgstr "Per&besar Ukuran"
+
+msgctxt "ID_VIEW_DECSIZE"
+msgid "&Decrease Size"
+msgstr "Per&kecil Ukuran"
+
+msgctxt "ID_VIEW_INCWIDTH"
+msgid "I&ncrease Width"
+msgstr "Pe&rbesar Lebar"
+
+msgctxt "ID_VIEW_DECWIDTH"
+msgid "D&ecrease Width"
+msgstr "P&erkecil Lebar"
+
+msgctxt "ID_VIEW_INCHEIGHT"
+msgid "In&crease Height"
+msgstr "Tam&bahkan Tinggi"
+
+msgctxt "ID_VIEW_DECHEIGHT"
+msgid "Decre&ase Height"
+msgstr "Kur&angi Tinggi"
+
+msgctxt "ID_PANSCAN_MOVERIGHT"
+msgid "Move &Right"
+msgstr "Pindah ke &Kanan"
+
+msgctxt "ID_PANSCAN_MOVELEFT"
+msgid "Move &Left"
+msgstr "Pindak ke &Kiri"
+
+msgctxt "ID_PANSCAN_MOVEUP"
+msgid "Move &Up"
+msgstr "Pindah ke &Atas"
+
+msgctxt "ID_PANSCAN_MOVEDOWN"
+msgid "Move &Down"
+msgstr "Pindah ke &Bawah"
+
+msgctxt "ID_PANSCAN_CENTER"
+msgid "Cen&ter"
+msgstr "Pusa&t"
+
+msgctxt "ID_VIEW_RESET"
+msgid "Re&set"
+msgstr "&Setel Ulang"
+
+msgctxt "POPUP"
+msgid "On &Top"
+msgstr "Di A&tas"
+
+msgctxt "ID_ONTOP_DEFAULT"
+msgid "&Default"
+msgstr "&Bawaan"
+
+msgctxt "ID_ONTOP_ALWAYS"
+msgid "&Always"
+msgstr "Sel&alu"
+
+msgctxt "ID_ONTOP_WHILEPLAYING"
+msgid "While &Playing"
+msgstr "Ketika &Memutar"
+
+msgctxt "ID_ONTOP_WHILEPLAYINGVIDEO"
+msgid "While Playing &Video"
+msgstr "Ketika Memutar &Video"
+
+msgctxt "ID_VIEW_OPTIONS"
+msgid "&Options..."
+msgstr "&Opsi..."
+
+msgctxt "POPUP"
+msgid "&Play"
+msgstr "&Putar"
+
+msgctxt "ID_PLAY_PLAYPAUSE"
+msgid "&Play/Pause"
+msgstr "&Putar/Jeda"
+
+msgctxt "ID_PLAY_STOP"
+msgid "&Stop"
+msgstr "&Hentikan"
+
+msgctxt "ID_PLAY_FRAMESTEP"
+msgid "F&rame Step"
+msgstr "Tahap F&rame"
+
+msgctxt "ID_PLAY_DECRATE"
+msgid "&Decrease Rate"
+msgstr "&Turunkan Laju"
+
+msgctxt "ID_PLAY_INCRATE"
+msgid "&Increase Rate"
+msgstr "&Naikkan Laju"
+
+msgctxt "ID_PLAY_RESETRATE"
+msgid "R&eset Rate"
+msgstr "S&etel Ulang Laju"
+
+msgctxt "ID_FILTERS"
+msgid "&Filters"
+msgstr "&Filter"
+
+msgctxt "ID_SHADERS"
+msgid "S&haders"
+msgstr "S&hader"
+
+msgctxt "ID_AUDIOS"
+msgid "&Audio Track"
+msgstr "Trek &Audio"
+
+msgctxt "ID_SUBTITLES"
+msgid "Su&btitle Track"
+msgstr "Trek Su&btitel"
+
+msgctxt "ID_VIDEO_STREAMS"
+msgid "&Video Track"
+msgstr "Trek &Video"
+
+msgctxt "POPUP"
+msgid "&Volume"
+msgstr "&Volume"
+
+msgctxt "ID_VOLUME_UP"
+msgid "&Up"
+msgstr "&Naik"
+
+msgctxt "ID_VOLUME_DOWN"
+msgid "&Down"
+msgstr "&Turun"
+
+msgctxt "ID_VOLUME_MUTE"
+msgid "&Mute"
+msgstr "&Diam"
+
+msgctxt "POPUP"
+msgid "Af&ter Playback"
+msgstr "Se&telah Pemutaran"
+
+msgctxt "ID_AFTERPLAYBACK_DONOTHING"
+msgid "Do no&thing"
+msgstr "&Tidak melakukan apa-apa"
+
+msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
+msgid "Play &next file in the folder"
+msgstr "Putar berkas sela&njutnya di dalam folder"
+
+msgctxt "ID_AFTERPLAYBACK_MONITOROFF"
+msgid "Turn off the &monitor"
+msgstr "&Matikan Layar"
+
+msgctxt "ID_AFTERPLAYBACK_EXIT"
+msgid "&Exit"
+msgstr "&Keluar"
+
+msgctxt "ID_AFTERPLAYBACK_STANDBY"
+msgid "&Stand By"
+msgstr "&Siaga"
+
+msgctxt "ID_AFTERPLAYBACK_HIBERNATE"
+msgid "&Hibernate"
+msgstr "&Hibernasi"
+
+msgctxt "ID_AFTERPLAYBACK_SHUTDOWN"
+msgid "Shut&down"
+msgstr "Ma&tikan"
+
+msgctxt "ID_AFTERPLAYBACK_LOGOFF"
+msgid "Log &Off"
+msgstr "Kel&uar"
+
+msgctxt "ID_AFTERPLAYBACK_LOCK"
+msgid "&Lock"
+msgstr "&Kunci"
+
+msgctxt "POPUP"
+msgid "&Navigate"
+msgstr "&Navigasi"
+
+msgctxt "ID_NAVIGATE_SKIPBACK"
+msgid "&Previous"
+msgstr "&Sebelumnya"
+
+msgctxt "ID_NAVIGATE_SKIPFORWARD"
+msgid "&Next"
+msgstr "Sela&njutnya"
+
+msgctxt "ID_NAVIGATE_GOTO"
+msgid "&Go To..."
+msgstr "Per&gi Ke..."
+
+msgctxt "ID_NAVIGATE_TITLEMENU"
+msgid "&Title Menu"
+msgstr "Menu &Judul"
+
+msgctxt "ID_NAVIGATE_ROOTMENU"
+msgid "&Root Menu"
+msgstr "Menu Aka&r"
+
+msgctxt "ID_NAVIGATE_SUBPICTUREMENU"
+msgid "&Subtitle Menu"
+msgstr "Menu &Subtitel"
+
+msgctxt "ID_NAVIGATE_AUDIOMENU"
+msgid "&Audio Menu"
+msgstr "Menu &Audio"
+
+msgctxt "ID_NAVIGATE_ANGLEMENU"
+msgid "An&gle Menu"
+msgstr "Menu Su&dut"
+
+msgctxt "ID_NAVIGATE_CHAPTERMENU"
+msgid "&Chapter Menu"
+msgstr "Menu &Bab"
+
+msgctxt "ID_FAVORITES"
+msgid "F&avorites"
+msgstr "&Favorit"
+
+msgctxt "POPUP"
+msgid "&Help"
+msgstr "B&antuan"
+
+msgctxt "ID_HELP_HOMEPAGE"
+msgid "&Home Page"
+msgstr "Halaman &Beranda"
+
+msgctxt "ID_HELP_CHECKFORUPDATE"
+msgid "Check for &updates"
+msgstr "Periksa Pe&mutakhiran"
+
+msgctxt "ID_HELP_SHOWCOMMANDLINESWITCHES"
+msgid "&Command Line Switches"
+msgstr "Pengganti &Perintah Baris"
+
+msgctxt "ID_HELP_TOOLBARIMAGES"
+msgid "Download &Toolbar Images"
+msgstr "Unduh Gambar Bilah &Alat"
+
+msgctxt "ID_HELP_DONATE"
+msgid "&Donate"
+msgstr "&Donasi"
+
+msgctxt "ID_HELP_ABOUT"
+msgid "&About..."
+msgstr "&Tentang"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.id.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.id.strings.po
new file mode 100644
index 000000000..891e38609
--- /dev/null
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.id.strings.po
@@ -0,0 +1,3610 @@
+# MPC-HC - Strings extracted from string tables
+# Copyright (C) 2002 - 2013 see Authors.txt
+# This file is distributed under the same license as the MPC-HC package.
+# Translators:
+# Asep Suparman <asep.suparman@outlook.com>, 2014
+# Bahasa Fansub <joshua.siagian.hidden1234@gmail.com>, 2014
+# DyarPerdana <hysteria27@gmail.com>, 2014
+# yoga.mardia <made.yoga12@gmail.com>, 2014
+# Mulia Arifandi Nasution, 2014
+# Reza Septyan .R. <ainofuyuumI@outlook.com>, 2014
+# rizqiromadhon <rizqi-romadhon@outlook.com>, 2014
+# zk <zamani.karmana@gmail.com>, 2015
+# zk <zamani.karmana@gmail.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: MPC-HC\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Indonesian (http://www.transifex.com/mpc-hc/mpc-hc/language/id/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: id\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+msgctxt "IDS_INFOBAR_LOCATION"
+msgid "Location"
+msgstr "Lokasi"
+
+msgctxt "IDS_INFOBAR_VIDEO"
+msgid "Video"
+msgstr "Video"
+
+msgctxt "IDS_INFOBAR_AUDIO"
+msgid "Audio"
+msgstr "Audio"
+
+msgctxt "IDS_INFOBAR_SUBTITLES"
+msgid "Subtitles"
+msgstr "Subtitel"
+
+msgctxt "IDS_INFOBAR_CHAPTER"
+msgid "Chapter"
+msgstr "Bab"
+
+msgctxt "IDS_CONTROLS_COMPLETING"
+msgid "Completing..."
+msgstr "Menyelesaikan..."
+
+msgctxt "IDS_AUTOPLAY_PLAYVIDEO"
+msgid "Play Video"
+msgstr "Putar Video"
+
+msgctxt "IDS_AUTOPLAY_PLAYMUSIC"
+msgid "Play Music"
+msgstr "Putar Musik"
+
+msgctxt "IDS_AUTOPLAY_PLAYAUDIOCD"
+msgid "Play Audio CD"
+msgstr "Putar CD Audio"
+
+msgctxt "IDS_AUTOPLAY_PLAYDVDMOVIE"
+msgid "Play DVD Movie"
+msgstr "Putar DVD Film"
+
+msgctxt "IDS_PROPSHEET_PROPERTIES"
+msgid "Properties"
+msgstr "Properti"
+
+msgctxt "IDS_SUBTITLES_DEFAULT_STYLE"
+msgid "&Default Style"
+msgstr "Gaya Ba&waan"
+
+msgctxt "IDS_FAVFILES"
+msgid "Files"
+msgstr "Berkas"
+
+msgctxt "IDS_FAVDVDS"
+msgid "DVDs"
+msgstr "DVD"
+
+msgctxt "IDS_INFOBAR_CHANNEL"
+msgid "Channel"
+msgstr "Saluran"
+
+msgctxt "IDS_INFOBAR_TIME"
+msgid "Time"
+msgstr "Waktu"
+
+msgctxt "IDS_STATSBAR_SYNC_OFFSET"
+msgid "Sync Offset"
+msgstr "Ofset Laras"
+
+msgctxt "IDS_STATSBAR_SYNC_OFFSET_FORMAT"
+msgid "avg: %d ms, dev: %d ms"
+msgstr "rerata: %d ms, simpangan: %d ms"
+
+msgctxt "IDS_STATSBAR_JITTER"
+msgid "Jitter"
+msgstr "Jitter"
+
+msgctxt "IDS_STATSBAR_BITRATE"
+msgid "Bitrate"
+msgstr "Laju Bit"
+
+msgctxt "IDS_STATSBAR_BITRATE_AVG_CUR"
+msgid "(avg/cur)"
+msgstr "(rerata/saat-ini)"
+
+msgctxt "IDS_STATSBAR_SIGNAL"
+msgid "Signal"
+msgstr "Sinyal"
+
+msgctxt "IDS_STATSBAR_SIGNAL_FORMAT"
+msgid "Strength: %d dB, Quality: %ld%%"
+msgstr "Kekuatan: %d dB, Kualitas: %ld%%"
+
+msgctxt "IDS_SUBTITLES_STYLES_CAPTION"
+msgid "Styles"
+msgstr "Gaya"
+
+msgctxt "IDS_TEXT_SUB_RENDERING_TARGET"
+msgid "If the rendering target is left undefined, SSA/ASS subtitles will be rendered relative to the video frame while all other text subtitles will be rendered relative to the window."
+msgstr "Jika target render tidak ditentukan, subtitel SSA/ASS akan dirender relatif pada gambar video sedangkan teks subtitel lainnya akan dirender relatif pada jendela aplikasi."
+
+msgctxt "IDS_PPAGE_CAPTURE_FG0"
+msgid "Never (fastest approach)"
+msgstr "Tidak Pernah (pendekatan tercepat)"
+
+msgctxt "IDS_PPAGE_CAPTURE_FG1"
+msgid "Only when switching different video types (default)"
+msgstr "Hanya ketika mengganti jenis video yang berbeda (bawaan)"
+
+msgctxt "IDS_PPAGE_CAPTURE_FG2"
+msgid "Always (slowest option)"
+msgstr "Selalu (pilihan terlambat)"
+
+msgctxt "IDS_PPAGE_CAPTURE_FGDESC0"
+msgid "Not supported by some devices. Two video decoders always present in the filter graph."
+msgstr "Tidak didukung oleh sebagaian perangkat. Dua dekoder video selalu tersedia di grafik filter."
+
+msgctxt "IDS_PPAGE_CAPTURE_FGDESC1"
+msgid "Fast except when switching between different video streams. Only one video decoder present in the filter graph."
+msgstr "Cepat kecuali ketika berpindah antara saluran video yang berbeda. Hanya satu dekoder video tersedia di grafik filter."
+
+msgctxt "IDS_PPAGE_CAPTURE_FGDESC2"
+msgid "Not recommended. Only for testing purposes."
+msgstr "Tidak direkomendasikan. Hanya untuk uji coba."
+
+msgctxt "IDS_PPAGE_CAPTURE_SFG0"
+msgid "Never if possible (fastest, but not supported by most filters)"
+msgstr "Tidak pernah jika mungkin (tercepat, tetapi tidak didukung oleh kebanyakan filter)"
+
+msgctxt "IDS_PPAGE_CAPTURE_SFG1"
+msgid "Only when switching different video types (default)"
+msgstr "Hanya ketika mengganti jenis video yang berbeda (bawaan)"
+
+msgctxt "IDS_PPAGE_CAPTURE_SFG2"
+msgid "Always (may be required by some devices)"
+msgstr "Selalu (mungkin dibutuhkan oleh beberapa perangkat)"
+
+msgctxt "IDS_INFOBAR_PARENTAL_RATING"
+msgid "Parental rating"
+msgstr "Peringkat orang tua"
+
+msgctxt "IDS_PARENTAL_RATING"
+msgid "%d+"
+msgstr "%d+"
+
+msgctxt "IDS_NO_PARENTAL_RATING"
+msgid "Not rated"
+msgstr "Belum dinilai"
+
+msgctxt "IDS_INFOBAR_CONTENT"
+msgid "Content"
+msgstr "Konten"
+
+msgctxt "IDS_CONTENT_MOVIE_DRAMA"
+msgid "Movie/Drama"
+msgstr "Film/Drama"
+
+msgctxt "IDS_CONTENT_NEWS_CURRENTAFFAIRS"
+msgid "News/Current affairs"
+msgstr "Berita/Peristiwa terkini"
+
+msgctxt "IDS_SPEED_UNIT_G"
+msgid "GB/s"
+msgstr "GB/s"
+
+msgctxt "IDS_FILE_FAV_ADDED"
+msgid "File added to favorites"
+msgstr "Berkas ditambahkan ke favorit"
+
+msgctxt "IDS_DVD_FAV_ADDED"
+msgid "DVD added to favorites"
+msgstr "DVD ditambahkan ke favorit"
+
+msgctxt "IDS_CAPTURE_SETTINGS"
+msgid "Capture Settings"
+msgstr "Pengaturan Tangkapan"
+
+msgctxt "IDS_NAVIGATION_BAR"
+msgid "Navigation Bar"
+msgstr "Bilah Navigasi"
+
+msgctxt "IDS_SUBRESYNC_CAPTION"
+msgid "Subresync"
+msgstr "Subresync"
+
+msgctxt "IDS_SUBRESYNC_CLN_TIME"
+msgid "Time"
+msgstr "Waktu"
+
+msgctxt "IDS_SUBRESYNC_CLN_END"
+msgid "End"
+msgstr "Akhir"
+
+msgctxt "IDS_SUBRESYNC_CLN_PREVIEW"
+msgid "Preview"
+msgstr "Pratinjau"
+
+msgctxt "IDS_SUBRESYNC_CLN_VOB_ID"
+msgid "Vob ID"
+msgstr "ID Vob"
+
+msgctxt "IDS_SUBRESYNC_CLN_CELL_ID"
+msgid "Cell ID"
+msgstr "ID Cell"
+
+msgctxt "IDS_SUBRESYNC_CLN_FORCED"
+msgid "Forced"
+msgstr "Paksa"
+
+msgctxt "IDS_SUBRESYNC_CLN_TEXT"
+msgid "Text"
+msgstr "Teks"
+
+msgctxt "IDS_SUBRESYNC_CLN_STYLE"
+msgid "Style"
+msgstr "Gaya"
+
+msgctxt "IDS_SUBRESYNC_CLN_FONT"
+msgid "Font"
+msgstr "Fon"
+
+msgctxt "IDS_DVD_NAV_SOME_PINS_ERROR"
+msgid "Failed to render some of the pins of the DVD Navigator filter"
+msgstr "Gagal untuk merender beberapa pin dari filter Navigator DVD"
+
+msgctxt "IDS_DVD_INTERFACES_ERROR"
+msgid "Failed to query the needed interfaces for DVD playback"
+msgstr "Gagal untuk menyediakan antarmuka yang diperlukan untuk pemutaran DVD"
+
+msgctxt "IDS_CAPTURE_LIVE"
+msgid "Live"
+msgstr "Langsung"
+
+msgctxt "IDS_CAPTURE_ERROR_VID_FILTER"
+msgid "Can't add video capture filter to the graph"
+msgstr "Tidak bisa menambahkan filter tangkapan video ke grafik"
+
+msgctxt "IDS_CAPTURE_ERROR_AUD_FILTER"
+msgid "Can't add audio capture filter to the graph"
+msgstr "Tidak bisa menambahkan filter tangkapan suara ke grafik"
+
+msgctxt "IDS_CAPTURE_ERROR_DEVICE"
+msgid "Could not open capture device."
+msgstr "Tidak bisa membuka perangkat penangkap."
+
+msgctxt "IDS_INVALID_PARAMS_ERROR"
+msgid "Can't open, invalid input parameters"
+msgstr "Tidak bisa membuka, parameter masukan tidak valid"
+
+msgctxt "IDS_EDIT_LIST_EDITOR"
+msgid "Edit List Editor"
+msgstr "Sunting Penyunting Daftar"
+
+msgctxt "IDS_GOTO_ERROR_INVALID_TIME"
+msgid "The entered time is greater than the file duration."
+msgstr "Waktu yang dimasukan lebih besar daripada durasi berkas"
+
+msgctxt "IDS_MISSING_ICONS_LIB"
+msgid "The icons library \"mpciconlib.dll\" is missing.\nThe player's default icon will be used for file associations.\nPlease, reinstall MPC-HC to get \"mpciconlib.dll\"."
+msgstr "Pustaka Ikon \"mpciconlib.dll\" hilang.\nIkon bawaan pemutar akan digunakan untuk asosiasi berkas.\nMohon, pasang ulang MPC-HC untuk mendapatkan \"mpciconlib.dll\"."
+
+msgctxt "IDS_SUBDL_DLG_FILENAME_COL"
+msgid "File"
+msgstr "Berkas"
+
+msgctxt "IDS_SUBDL_DLG_LANGUAGE_COL"
+msgid "Language"
+msgstr "Bahasa"
+
+msgctxt "IDS_SUBDL_DLG_FORMAT_COL"
+msgid "Format"
+msgstr "Format"
+
+msgctxt "IDS_SUBDL_DLG_DISC_COL"
+msgid "Disc"
+msgstr "Cakram"
+
+msgctxt "IDS_SUBDL_DLG_TITLES_COL"
+msgid "Title(s)"
+msgstr "Judul"
+
+msgctxt "IDS_SUBRESYNC_CLN_CHARSET"
+msgid "CharSet"
+msgstr "CharSet"
+
+msgctxt "IDS_SUBRESYNC_CLN_UNICODE"
+msgid "Unicode"
+msgstr "Unicode"
+
+msgctxt "IDS_SUBRESYNC_CLN_LAYER"
+msgid "Layer"
+msgstr "Lapisan"
+
+msgctxt "IDS_SUBRESYNC_CLN_ACTOR"
+msgid "Actor"
+msgstr "Aktor"
+
+msgctxt "IDS_SUBRESYNC_CLN_EFFECT"
+msgid "Effect"
+msgstr "Efek"
+
+msgctxt "IDS_PLAYLIST_CAPTION"
+msgid "Playlist"
+msgstr "Daftar Putar"
+
+msgctxt "IDS_PPAGE_FS_CLN_ON_OFF"
+msgid "On/Off"
+msgstr "Nyala/Mati"
+
+msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
+msgid "From (FPS)"
+msgstr "Dari (FPS)"
+
+msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
+msgid "To (FPS)"
+msgstr "Ke (FPS)"
+
+msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
+msgid "Display mode (Hz)"
+msgstr "Mode tampilan (Hz)"
+
+msgctxt "IDS_PPAGE_FS_DEFAULT"
+msgid "Default"
+msgstr "Bawaan"
+
+msgctxt "IDS_PPAGE_FS_OTHER"
+msgid "Other"
+msgstr "Lainnya"
+
+msgctxt "IDS_PPAGE_OUTPUT_SYS_DEF"
+msgid "System Default"
+msgstr "Bawaan Sistem"
+
+msgctxt "IDS_GRAPH_INTERFACES_ERROR"
+msgid "Failed to query the needed interfaces for playback"
+msgstr "Gagal untuk menyediakan antarmuka yang diperlukan untuk pemutaran"
+
+msgctxt "IDS_GRAPH_TARGET_WND_ERROR"
+msgid "Could not set target window for graph notification"
+msgstr "Tidak bisa menetapkan target jendela untuk notifikasi grafik"
+
+msgctxt "IDS_DVD_NAV_ALL_PINS_ERROR"
+msgid "Failed to render all pins of the DVD Navigator filter"
+msgstr "Gagal merender semua pin filter Navigator DVD"
+
+msgctxt "IDS_PLAYLIST_OPEN"
+msgid "&Open"
+msgstr "&Buka"
+
+msgctxt "IDS_PLAYLIST_ADD"
+msgid "A&dd"
+msgstr "Ta&mbah"
+
+msgctxt "IDS_PLAYLIST_REMOVE"
+msgid "&Remove"
+msgstr "&Buang"
+
+msgctxt "IDS_PLAYLIST_CLEAR"
+msgid "C&lear"
+msgstr "Ber&sihkan"
+
+msgctxt "IDS_PLAYLIST_COPYTOCLIPBOARD"
+msgid "&Copy to clipboard"
+msgstr "&Salin ke papan klip"
+
+msgctxt "IDS_PLAYLIST_SAVEAS"
+msgid "&Save As..."
+msgstr "&Simpan Sebagai..."
+
+msgctxt "IDS_PLAYLIST_SORTBYLABEL"
+msgid "Sort by &label"
+msgstr "Urutkan menurut &label"
+
+msgctxt "IDS_PLAYLIST_SORTBYPATH"
+msgid "Sort by &path"
+msgstr "Urutkan menurut &jalur"
+
+msgctxt "IDS_PLAYLIST_RANDOMIZE"
+msgid "R&andomize"
+msgstr "&Acak"
+
+msgctxt "IDS_PLAYLIST_RESTORE"
+msgid "R&estore"
+msgstr "K&embalikan"
+
+msgctxt "IDS_SUBRESYNC_SEPARATOR"
+msgid "&Separator"
+msgstr "Pemi&sah"
+
+msgctxt "IDS_SUBRESYNC_DELETE"
+msgid "&Delete"
+msgstr "&Hapus"
+
+msgctxt "IDS_SUBRESYNC_DUPLICATE"
+msgid "D&uplicate"
+msgstr "D&uplikat"
+
+msgctxt "IDS_SUBRESYNC_RESET"
+msgid "&Reset"
+msgstr "&Setel Ulang"
+
+msgctxt "IDS_MPLAYERC_104"
+msgid "Subtitle Delay -"
+msgstr "Tundaan Subtitel -"
+
+msgctxt "IDS_MPLAYERC_105"
+msgid "Subtitle Delay +"
+msgstr "Tundaan Subtitel +"
+
+msgctxt "IDS_FILE_SAVE_THUMBNAILS"
+msgid "Save thumbnails"
+msgstr "Simpan gambar mini"
+
+msgctxt "IDD_PPAGEPLAYBACK"
+msgid "Playback"
+msgstr "Pemutaran"
+
+msgctxt "IDD_PPAGEPLAYER"
+msgid "Player"
+msgstr "Pemutar"
+
+msgctxt "IDD_PPAGEDVD"
+msgid "Playback::DVD/OGM"
+msgstr "Pemutaran::DVD/OGM"
+
+msgctxt "IDD_PPAGESUBTITLES"
+msgid "Subtitles"
+msgstr "Subtitel"
+
+msgctxt "IDD_PPAGEFORMATS"
+msgid "Player::Formats"
+msgstr "Pemutar::Format"
+
+msgctxt "IDD_PPAGETWEAKS"
+msgid "Tweaks"
+msgstr "Rekayasa"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER"
+msgid "Internal Filters::Audio Switcher"
+msgstr "Filter Internal::Pengubah Audio"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS"
+msgid "External Filters"
+msgstr "Filter External"
+
+msgctxt "IDD_PPAGESHADERS"
+msgid "Playback::Shaders"
+msgstr "Pemutaran::Shader"
+
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Sumberdaya"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Bermacam-lainnya"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "InfoMedia"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Pemutaran::Tangkapan"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Pemutaran::Perender Laras"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Pemutaran::Layar Penuh"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Filter Internal::Perender Audio"
+
+msgctxt "IDS_AUDIOSWITCHER"
+msgid "Audio Switcher"
+msgstr "Pengubah Audio"
+
+msgctxt "IDS_ICONS_REASSOC_DLG_TITLE"
+msgid "New version of the icon library"
+msgstr "Versi baru dari pustaka ikon"
+
+msgctxt "IDS_ICONS_REASSOC_DLG_INSTR"
+msgid "Do you want to reassociate the icons?"
+msgstr "Apakah anda ingin mengasosiasi ulang ikon?"
+
+msgctxt "IDS_ICONS_REASSOC_DLG_CONTENT"
+msgid "This will fix the icons being incorrectly displayed after an update of the icon library.\nThe file associations will not be modified, only the corresponding icons will be refreshed."
+msgstr "Ini akan memperbaiki ikon yang tidak ditampilkan dengan benar setelah pemutakhiran pustaka ikon.\nBerkas asosiasi tidak akan dimodifikasi, hanya berkas yang bermasalah yang akan di perbarui."
+
+msgctxt "IDS_PPAGE_OUTPUT_OLDRENDERER"
+msgid "Old Video Renderer"
+msgstr "Perender Video Lama"
+
+msgctxt "IDS_PPAGE_OUTPUT_OVERLAYMIXER"
+msgid "Overlay Mixer Renderer"
+msgstr "Perender Pengadon Lapisan"
+
+msgctxt "IDS_PPAGE_OUTPUT_VMR7WINDOWED"
+msgid "Video Mixing Renderer 7 (windowed)"
+msgstr "Video Mixing Renderer 7 (windowed)"
+
+msgctxt "IDS_PPAGE_OUTPUT_VMR9WINDOWED"
+msgid "Video Mixing Renderer 9 (windowed)"
+msgstr "Video Mixing Renderer 9 (windowed)"
+
+msgctxt "IDS_PPAGE_OUTPUT_VMR7RENDERLESS"
+msgid "Video Mixing Renderer 7 (renderless)"
+msgstr "Video Mixing Renderer 7 (renderless)"
+
+msgctxt "IDS_PPAGE_OUTPUT_VMR9RENDERLESS"
+msgid "Video Mixing Renderer 9 (renderless)"
+msgstr "Video Mixing Renderer 9 (renderless)"
+
+msgctxt "IDS_PPAGE_OUTPUT_EVR"
+msgid "Enhanced Video Renderer"
+msgstr "Perender Video Dipertingkat"
+
+msgctxt "IDS_PPAGE_OUTPUT_EVR_CUSTOM"
+msgid "Enhanced Video Renderer (custom presenter)"
+msgstr "Perender Video Dipertingkat (penyaji ubahsuai)"
+
+msgctxt "IDS_PPAGE_OUTPUT_DXR"
+msgid "Haali Video Renderer"
+msgstr "Perender Video Haali"
+
+msgctxt "IDS_PPAGE_OUTPUT_NULL_COMP"
+msgid "Null (anything)"
+msgstr "Nihil (semua)"
+
+msgctxt "IDS_PPAGE_OUTPUT_NULL_UNCOMP"
+msgid "Null (uncompressed)"
+msgstr "Nihil (tidak dikompresi)"
+
+msgctxt "IDS_PPAGE_OUTPUT_MADVR"
+msgid "madVR"
+msgstr "madVR"
+
+msgctxt "IDD_PPAGEACCELTBL"
+msgid "Player::Keys"
+msgstr "Pemutar::Kunci"
+
+msgctxt "IDD_PPAGESUBSTYLE"
+msgid "Subtitles::Default Style"
+msgstr "Subtitel::Gaya Bawaan"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS"
+msgid "Internal Filters"
+msgstr "Filter Internal"
+
+msgctxt "IDD_PPAGELOGO"
+msgid "Player::Logo"
+msgstr "Pemutar::Logo"
+
+msgctxt "IDD_PPAGEOUTPUT"
+msgid "Playback::Output"
+msgstr "Pemutaran::Keluaran"
+
+msgctxt "IDD_PPAGEWEBSERVER"
+msgid "Player::Web Interface"
+msgstr "Pemutar::Antarmuka Web"
+
+msgctxt "IDD_PPAGESUBDB"
+msgid "Subtitles::Database"
+msgstr "Subtitel::Basis Data"
+
+msgctxt "IDD_FILEPROPDETAILS"
+msgid "Details"
+msgstr "Detail"
+
+msgctxt "IDD_FILEPROPCLIP"
+msgid "Clip"
+msgstr "Klip"
+
+msgctxt "IDC_DSSYSDEF"
+msgid "Default video renderer filter for DirectShow. Others will fall back to this one when they can't be loaded for some reason. On Windown XP this is the same as VMR-7 (windowed)."
+msgstr "Filter perender video bawaan untuk DirectShow. Yang lainnya akan kembali ke berikut ini ketika mereka dengan alasan tertentu tidak bisa dimuat. Pada Windows XP ini sama dengan VMR-7 (windowed)."
+
+msgctxt "IDC_DSOLD"
+msgid "This is the default renderer of Windows 9x/me/2k. Depending on the visibility of the video window and your video card's abilities, it will switch between GDI, DirectDraw, Overlay rendering modes dynamically."
+msgstr "Ini perender bawaan dari Windows 9x/me/2k. Tergantung dari keterlihatan jendela video dan kemampuan kartu video anda, perender akan beralih antara mode render GDI, DirectDraw, Overlay secara otomatis."
+
+msgctxt "IDC_DSOVERLAYMIXER"
+msgid "Always renders in overlay. Generally only YUV formats are allowed, but they are presented directly without any color conversion to RGB. This is the fastest rendering method of all and the only where you can be sure about fullscreen video mirroring to tv-out activating."
+msgstr "Selalu render dalam overlay. Umumnya hanya format YUV yang diizinkan, tetapi mereka disajikan secara langsung tanpa konversi warna ke RGB. Ini metode render yang tercepat dari semuanya dan satu-satunya yang anda bisa yakin tentang pengaktifan pencerminan video layar penuh ke tv-out."
+
+msgctxt "IDC_DSVMR7WIN"
+msgid "The default renderer of Windows XP. Very stable and just a little slower than the Overlay mixer. Uses DirectDraw and runs in Overlay when it can."
+msgstr "Perender bawaan Windows XP. Sangat stabil dan sedikit lebih lambat daripada pengadon Overlay. Menggunakan DirectDraw dan berjalan dalam Overlay jika memungkinkan."
+
+msgctxt "IDC_DSVMR9WIN"
+msgid "Only available if you have DirectX 9 installed. Has the same abilities as VMR-7 (windowed), but it will never use Overlay rendering and because of this it may be a little slower than VMR-7 (windowed)."
+msgstr "Hanya tersedia jika anda memiliki DirectX 9 terpasang. Memiliki kemampuan yang sama seperti VMR-7 (windowed) tetapi tidak pernah menggunakan render Overlay dan oleh karena itu mungkin sedikit lebih lambat dari VMR-7 (windowed)."
+
+msgctxt "IDC_DSVMR7REN"
+msgid "Same as the VMR-7 (windowed), but with the Allocator-Presenter plugin of MPC-HC for subtitling. Overlay video mirroring WILL NOT work. \"True Color\" desktop color space recommended."
+msgstr "Sama seperti VMR-7 (windowed), tetapi dengan pengaya Allocator-Presenter dari MPC-HC untuk subtitel. Pencerminan video overlay TIDAK AKAN bekerja. Warna destop \"True Color\" direkomendasikan."
+
+msgctxt "IDC_DSVMR9REN"
+msgid "Same as the VMR-9 (windowed), but with the Allocator-Presenter plugin of MPC-HC for subtitling. Overlay video mirroring MIGHT work. \"True Color\" desktop color space recommended. Recommended for Windows XP."
+msgstr "Sama seperti VMR-9 (windowed), tetapi dengan Allocator-Presenter plugin dari MPC-HC untuk subtitel. Pencerminan video overlay MUNGKIN bekerja. Warna destop \"True Color\" direkomendasikan. Direkomendasikan untuk Windows XP."
+
+msgctxt "IDC_DSDXR"
+msgid "Same as the VMR-9 (renderless), but uses a true two-pass bicubic resizer."
+msgstr "Sama seperti VMR-9 (renderless), tetapi menggunakan pengubah ukuran bicubic dua-laluan sebenarnya."
+
+msgctxt "IDC_DSNULL_COMP"
+msgid "Connects to any video-like media type and will send the incoming samples to nowhere. Use it when you don't need the video display and want to save the CPU from working unnecessarily."
+msgstr "Sambung ke segala jenis media serupa video dan akan mengirim sampel masuk tidak ke manapun. Gunakan ketika anda tidak memerlukan tampilan video dan ingin menghemat kinerja CPU."
+
+msgctxt "IDC_DSNULL_UNCOMP"
+msgid "Same as the normal Null renderer, but this will only connect to uncompressed types."
+msgstr "Sama seperti perender Nihil normal, tetapi ini hanya akan menyambung ke jenis yang tidak terkompresi."
+
+msgctxt "IDC_DSEVR"
+msgid "Only available on Vista or later or on XP with at least .NET Framework 3.5 installed."
+msgstr "Hanya tersedia pada Vista atau lebih baru atau pada XP dengan paling tidak .NET Framework 3.5 terpasang."
+
+msgctxt "IDC_DSEVR_CUSTOM"
+msgid "Same as the EVR, but with the Allocator-Presenter of MPC-HC for subtitling and postprocessing. Recommended for Windows Vista or later."
+msgstr "Sama seperti EVR, tetapi dengan Allocator-Presenter dari MPC-HC untuk subtitel dan paskapemrosesan. Direkomendasikan untuk Windows Vista atau yang lebih baru."
+
+msgctxt "IDC_DSMADVR"
+msgid "High-quality renderer, requires a GPU that supports D3D9 or later."
+msgstr "Perender kualitas tinggi, membutuhkan GPU yang mendukung D3D9 atau lebih baru."
+
+msgctxt "IDC_DSSYNC"
+msgid "Same as the EVR (CP), but offers several options to synchronize the video frame rate with the display refresh rate to eliminate skipped or duplicated video frames."
+msgstr "Sama seperti EVR (CP), tetapi menawarkan beberapa opsi untuk menyelaraskan laju frame video dengan laju penyegaran tampilan untuk menghilangkan lompatan atau frame video terduplikasi."
+
+msgctxt "IDC_RMSYSDEF"
+msgid "Real's own renderer. SMIL scripts will work, but interaction not likely. Uses DirectDraw and runs in Overlay when it can."
+msgstr "Perender RealMedia. Skrip SMIL akan bekerja, tetapi tanpa interaksi. Menggunakan DirectDraw dan berjalan dalam Overlay jika memungkinkan."
+
+msgctxt "IDC_RMDX7"
+msgid "The output of Real's engine rendered by the DX7-based Allocator-Presenter of VMR-7 (renderless)."
+msgstr "Keluaran dari mesin RealMedia yang dirender oleh Allocator-Presenter berbasis DX7 dari VMR-7 (renderless)."
+
+msgctxt "IDC_RMDX9"
+msgid "The output of Real's engine rendered by the DX9-based Allocator-Presenter of VMR-9 (renderless)."
+msgstr "Keluaran dari mesin RealMedia yang dirender oleh Allocator-Presenter berbasis DX9 dari VMR-9 (renderless)."
+
+msgctxt "IDC_QTSYSDEF"
+msgid "QuickTime's own renderer. Gets a little slow when its video area is resized or partially covered by another window. When Overlay is not available it likes to fall back to GDI."
+msgstr "Perender QuickTime. Dapat menjadi sedikit pelan ketika area video berubah ukuran atau sebagian tertutup jendela lainnya. Ketika Overlay tidak tersedia kemungkinan akan kembali ke GDI."
+
+msgctxt "IDC_QTDX7"
+msgid "The output of QuickTime's engine rendered by the DX7-based Allocator-Presenter of VMR-7 (renderless)."
+msgstr "Keluaran mesin QuickTime yang dirender oleh Allocator-Presenter berbasis DX7 dari VMR-7 (renderless)."
+
+msgctxt "IDC_QTDX9"
+msgid "The output of QuickTime's engine rendered by the DX9-based Allocator-Presenter of VMR-9 (renderless)."
+msgstr "Kaluaran mesin QuickTime yang dirender oleh Allocator-Presenter berbasis DX9 dari VMR-9 (renderless)."
+
+msgctxt "IDC_REGULARSURF"
+msgid "Video surface will be allocated as a regular offscreen surface."
+msgstr "Permukaan video akan dialokasikan seperti permukaan offscreen pada umumnya."
+
+msgctxt "IDS_PPAGE_OUTPUT_SYNC"
+msgid "Sync Renderer"
+msgstr "Perender Laras"
+
+msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
+msgid "Regular offscreen plain surface"
+msgstr "Permukaan datar offscreen reguler"
+
+msgctxt "IDS_PPAGE_OUTPUT_SURF_2D"
+msgid "2D surfaces"
+msgstr "Permukaan 2D"
+
+msgctxt "IDS_PPAGE_OUTPUT_SURF_3D"
+msgid "3D surfaces (recommended)"
+msgstr "Permukaan 3D (direkomendasikan)"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZE_NN"
+msgid "Nearest neighbor"
+msgstr "Tetangga terdekat"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BILIN"
+msgid "Bilinear"
+msgstr "Bilinear"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BIL_PS"
+msgid "Bilinear (PS 2.0)"
+msgstr "Bilinear (PS 2.0)"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BICUB1"
+msgid "Bicubic A=-0.60 (PS 2.0)"
+msgstr "Bicubic A=-0.60 (PS 2.0)"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BICUB2"
+msgid "Bicubic A=-0.75 (PS 2.0)"
+msgstr "Bicubic A=-0.75 (PS 2.0)"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BICUB3"
+msgid "Bicubic A=-1.00 (PS 2.0)"
+msgstr "Bicubic A=-1.00 (PS 2.0)"
+
+msgctxt "IDS_PPAGE_OUTPUT_UNAVAILABLE"
+msgid "**unavailable**"
+msgstr "**tidak tersedia**"
+
+msgctxt "IDS_PPAGE_OUTPUT_UNAVAILABLEMSG"
+msgid "The selected renderer is not installed."
+msgstr "Perender yang dipilih tidak terpasang."
+
+msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_COMP"
+msgid "Null (anything)"
+msgstr "Nihil (semua)"
+
+msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
+msgid "Null (uncompressed)"
+msgstr "Nihil (tidak dikompresi)"
+
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Perender Audio Internal"
+
+msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
+msgid "Name"
+msgstr "Nama"
+
+msgctxt "IDS_EMB_RESOURCES_VIEWER_TYPE"
+msgid "MIME Type"
+msgstr "Jenis MIME"
+
+msgctxt "IDS_EMB_RESOURCES_VIEWER_INFO"
+msgid "In order to view an embedded resource in your browser you have to enable the web interface.\n\nUse the \"Save As\" button if you only want to save the information."
+msgstr "Dalam rangka melihat sumber daya tertanam dalam peramban anda, anda harus memfungsikan antarmuka web.\n\nGunakan tombol \"Simpan Sebagai\" jika anda hanya ingin menyimpan informasinya."
+
+msgctxt "IDS_DOWNLOAD_SUBS"
+msgid "Download subtitles"
+msgstr "Unduh subtitel"
+
+msgctxt "IDS_SUBFILE_DELAY"
+msgid "Delay (ms):"
+msgstr "Tundaan (ms):"
+
+msgctxt "IDS_SPEEDSTEP_AUTO"
+msgid "Auto"
+msgstr "Auto"
+
+msgctxt "IDS_EXPORT_SETTINGS_NO_KEYS"
+msgid "There are no customized keys to export."
+msgstr "Tidak ada kunci tersesuai untuk diekspor."
+
+msgctxt "IDS_RFS_NO_FILES"
+msgid "No media files found in the archive"
+msgstr "Tidak ada berkas media ditemukan di dalam arsip"
+
+msgctxt "IDS_RFS_COMPRESSED"
+msgid "Compressed files are not supported"
+msgstr "Berkas yang dimampatkan tidak didukung"
+
+msgctxt "IDS_RFS_ENCRYPTED"
+msgid "Encrypted files are not supported"
+msgstr "Berkas yang dienkripsi tidak didukung"
+
+msgctxt "IDS_RFS_MISSING_VOLS"
+msgid "Couldn't find all archive volumes"
+msgstr "Tidak bisa menemukan semua volume arsip"
+
+msgctxt "IDC_TEXTURESURF2D"
+msgid "Video surface will be allocated as a texture but still the 2d functions will be used to copy and stretch it onto the backbuffer. Requires a video card which can allocate 32-bit, RGBA, non-power-of-two sized textures and at least in the resolution of the video."
+msgstr "Permukaan video akan dialokasikan sebagai tekstur tetapi fungsi 2d masih akan digunakan untuk menyalin dan meregangkannya pada backbuffer. Membutuhkan kartu video yang dapat mengalokasikan 32-bit, RGBA, tekstur ukuran non-power-of-two dan paling tidak di dalam resolusi video tesebut."
+
+msgctxt "IDC_TEXTURESURF3D"
+msgid "Video surface will be allocated as a texture and drawn as two triangles in 3d. Antialiasing turned on at the display settings may have a bad effect on the rendering speed."
+msgstr "Permukaan video akan dialokasikan sebagai tekstur dan digambar sebagai dua segitiga dalam 3d. Antialias yang difungsikan pada pengaturan tampilan mungkin memiliki efek buruk pada kecepatan perenderan."
+
+msgctxt "IDC_DX9RESIZER_COMBO"
+msgid "If there is no Pixel Shader 2.0 support, simple bilinear is used automatically."
+msgstr "Jika tidak ada dukungan Pixel Shader 2.0, simple bilinear akan otomatis digunakan."
+
+msgctxt "IDC_DSVMR9LOADMIXER"
+msgid "Puts VMR-9 (renderless) into mixer mode, this means most of the controls on its property page will work and it will use a separate worker thread to renderer frames."
+msgstr "Atur VMR-9 (renderless) ke dalam mode pengadon, ini artinya sebagian besar pengendali pada halaman propertinya akan bekerja dan akan menggunakan worker thread terpisah untuk merender frame."
+
+msgctxt "IDC_DSVMR9YUVMIXER"
+msgid "Improves performance at the cost of some compatibility of the renderer."
+msgstr "Meningkatkan kinerja tetapi berakibat pada beberapa kompatibilitas perender."
+
+msgctxt "IDC_FULLSCREEN_MONITOR_CHECK"
+msgid "Reduces tearing but prevents the toolbar from being shown."
+msgstr "Mengurangi tearing tetapi menghalangi kenampakan bilah alat."
+
+msgctxt "IDC_DSVMR9ALTERNATIVEVSYNC"
+msgid "Reduces tearing by bypassing the default VSync built into D3D."
+msgstr "Mengurangi tearing dengan melewati seluruhnya VSync bawaan dalam D3D."
+
+msgctxt "IDS_SRC_VTS"
+msgid "Open VTS_xx_0.ifo to load VTS_xx_x.vob files in one piece"
+msgstr "Buka VTS_xx_0.ifo untuk memuat berkas VTS_xx_x.vob dalam satu bagian"
+
+msgctxt "IDS_SRC_RFS"
+msgid "Based on RARFileSource, doesn't support compressed files"
+msgstr "Berbasis RARFileSource, tidak mendukung berkas yang dimampatkan"
+
+msgctxt "IDS_INTERNAL_LAVF"
+msgid "Uses LAV Filters"
+msgstr "Gunakan LAV Filters"
+
+msgctxt "IDS_INTERNAL_LAVF_WMV"
+msgid "Uses LAV Filters. Disabled by default since Microsoft filters are usually more stable for those formats.\nIf you choose to use the internal filters, enable them for both source and decoding to have a better playback experience."
+msgstr "Menggunakan LAV Filters. Dinonfungsikan secara bawaan karena filter Microsoft biasanya lebih stabil untuk format tersebut.\nJika anda memilih untuk menggunakan filter internal, fungsikan filter baik untuk sumber dan pengawakodean untuk mendapatkan pengalaman pemutaran yang lebih baik."
+
+msgctxt "IDS_AG_TOGGLE_NAVIGATION"
+msgid "Toggle Navigation Bar"
+msgstr "Jungkit Bilah Navigasi"
+
+msgctxt "IDS_AG_VSYNCACCURATE"
+msgid "Accurate VSync"
+msgstr "VSync Akurat"
+
+msgctxt "IDC_CHECK_RELATIVETO"
+msgid "If the rendering target is left undefined, it will be inherited from the default style."
+msgstr "Jika target render tidak ditetapkan, hal tersebut akan diturunkan dari gaya bawaan."
+
+msgctxt "IDC_CHECK_NO_SUB_ANIM"
+msgid "Disallow subtitle animation. Enabling this option will lower CPU usage. You can use it if you experience flashing subtitles."
+msgstr "Nonfungsikan animasi subtitel. Mengaktifkan opsi ini kan memperkecil penggunaan CPU. Anda dapat menggunakan ini jika anda mengalami subtitel yang berkejap."
+
+msgctxt "IDC_SUBPIC_TO_BUFFER"
+msgid "Increasing the number of buffered subpictures should in general improve the rendering performance at the cost of a higher video RAM usage on the GPU."
+msgstr "Menambah jumlah bufer sub gambar seharusnya secara umum menambah kinerja render yang juga berakibat pada meningkatnya penggunaan RAM video pada GPU."
+
+msgctxt "IDC_BUTTON_EXT_SET"
+msgid "After clicking this button, the checked state of the format group will reflect the actual file association for MPC-HC. A newly added extension will usually make it grayed, so don't forget to check it again before closing this dialog!"
+msgstr "Setelah mengklik tombol ini, keadaan tercentang dari grup format akan merefleksikan asosiasi berkas yang sesungguhnya untuk MPC-HC. Ekstensi yang baru ditambahkan biasanya nonaktif, jadi jangan lupa untuk memeriksanya lagi sebelum menutup dialog ini!"
+
+msgctxt "IDC_CHECK_ALLOW_DROPPING_SUBPIC"
+msgid "Disabling this option will prevent the subtitles from blinking but it may cause the video renderer to skip some video frames."
+msgstr "Menonaktifkan opsi ini akan mencegah subtitel berkedip tetapi mungkin dapat menyebabkan perender video melompati beberapa frame video."
+
+msgctxt "ID_PLAY_PLAY"
+msgid "Play\nPlay"
+msgstr "Putar\nPutar"
+
+msgctxt "ID_PLAY_PAUSE"
+msgid "Pause\nPause"
+msgstr "Jeda\nJeda"
+
+msgctxt "ID_PLAY_STOP"
+msgid "Stop\nStop"
+msgstr "Hentikan\nHentikan"
+
+msgctxt "ID_PLAY_FRAMESTEP"
+msgid "Step\nStep"
+msgstr "Tahap\nTahap"
+
+msgctxt "ID_PLAY_DECRATE"
+msgid "Decrease speed\nDecrease speed"
+msgstr "Kurangi kecepatan\nKurangi kecepatan"
+
+msgctxt "ID_PLAY_INCRATE"
+msgid "Increase speed\nIncrease speed"
+msgstr "Tambah kecepatan\nTambah kecepatan"
+
+msgctxt "ID_VOLUME_MUTE"
+msgid "Mute"
+msgstr "Diam"
+
+msgctxt "ID_VOLUME_MUTE_OFF"
+msgid "Unmute"
+msgstr "Bunyi"
+
+msgctxt "ID_VOLUME_MUTE_DISABLED"
+msgid "No audio"
+msgstr "Tidak ada audio"
+
+msgctxt "ID_NAVIGATE_SKIPBACK"
+msgid "Skip back\nSkip back"
+msgstr "Lewati mundur\nLewati mundur"
+
+msgctxt "ID_NAVIGATE_SKIPFORWARD"
+msgid "Skip forward\nSkip forward"
+msgstr "Lewati maju\nLewati maju"
+
+msgctxt "IDS_SUBRESYNC_ORIGINAL"
+msgid "&Original"
+msgstr "&Orisinal"
+
+msgctxt "IDS_SUBRESYNC_CURRENT"
+msgid "&Current"
+msgstr "&Saat ini"
+
+msgctxt "IDS_SUBRESYNC_EDIT"
+msgid "&Edit"
+msgstr "&Sunting"
+
+msgctxt "IDS_SUBRESYNC_YES"
+msgid "&Yes"
+msgstr "&Ya"
+
+msgctxt "IDS_SUBRESYNC_NO"
+msgid "&No"
+msgstr "&Tidak"
+
+msgctxt "IDS_SUBRESYNC_DECREASE"
+msgid "&Decrease"
+msgstr "&Turunkan"
+
+msgctxt "IDS_SUBRESYNC_INCREASE"
+msgid "&Increase"
+msgstr "Na&ikkan"
+
+msgctxt "IDS_OPTIONS_CAPTION"
+msgid "Options"
+msgstr "Opsi"
+
+msgctxt "IDS_SHADERS_SELECT"
+msgid "&Select Shaders..."
+msgstr "Pilih &Shader..."
+
+msgctxt "IDS_SHADERS_DEBUG"
+msgid "&Debug Shaders..."
+msgstr "Awakutu Sha&der..."
+
+msgctxt "IDS_FAVORITES_ADD"
+msgid "&Add to Favorites..."
+msgstr "T&ambah ke Favorit..."
+
+msgctxt "IDS_FAVORITES_ORGANIZE"
+msgid "&Organize Favorites..."
+msgstr "Kel&ola Favorit..."
+
+msgctxt "IDS_PLAYLIST_SHUFFLE"
+msgid "Shuffle"
+msgstr "Karau"
+
+msgctxt "IDS_PLAYLIST_SHOWFOLDER"
+msgid "Open file location"
+msgstr "Buka lokasi berkas"
+
+msgctxt "IDS_CONTROLS_CLOSING"
+msgid "Closing..."
+msgstr "Menutup..."
+
+msgctxt "IDS_CONTROLS_PLAYING"
+msgid "Playing"
+msgstr "Memutar"
+
+msgctxt "IDS_CONTROLS_PAUSED"
+msgid "Paused"
+msgstr "Dijeda"
+
+msgctxt "IDS_AG_EDL_NEW_CLIP"
+msgid "EDL new clip"
+msgstr "Klip baru EDL"
+
+msgctxt "IDS_RECENT_FILES_CLEAR"
+msgid "&Clear list"
+msgstr "&Bersihkan daftar"
+
+msgctxt "IDS_RECENT_FILES_QUESTION"
+msgid "Are you sure that you want to delete recent files list?"
+msgstr "Apakah anda yakin ingin menghapus daftar berkas baru-baru ini?"
+
+msgctxt "IDS_AG_EDL_SAVE"
+msgid "EDL save"
+msgstr "Simpan EDL"
+
+msgctxt "IDS_AG_ENABLEFRAMETIMECORRECTION"
+msgid "Enable Frame Time Correction"
+msgstr "Fungsikan Koreksi Waktu Frame"
+
+msgctxt "IDS_AG_TOGGLE_EDITLISTEDITOR"
+msgid "Toggle EDL window"
+msgstr "Jungkit jendela EDL"
+
+msgctxt "IDS_AG_EDL_IN"
+msgid "EDL set In"
+msgstr "Masukan set EDL"
+
+msgctxt "IDS_AG_EDL_OUT"
+msgid "EDL set Out"
+msgstr "Keluaran set EDL"
+
+msgctxt "IDS_AG_PNS_ROTATEX_M"
+msgid "PnS Rotate X-"
+msgstr "PnS Putar X-"
+
+msgctxt "IDS_AG_PNS_ROTATEY_P"
+msgid "PnS Rotate Y+"
+msgstr "PnS Putar Y+"
+
+msgctxt "IDS_AG_PNS_ROTATEY_M"
+msgid "PnS Rotate Y-"
+msgstr "PnS Putar Y-"
+
+msgctxt "IDS_AG_PNS_ROTATEZ_P"
+msgid "PnS Rotate Z+"
+msgstr "PnS Putar Z+"
+
+msgctxt "IDS_AG_PNS_ROTATEZ_M"
+msgid "PnS Rotate Z-"
+msgstr "PnS Putar Z-"
+
+msgctxt "IDS_AG_TEARING_TEST"
+msgid "Tearing Test"
+msgstr "Uji Tearing"
+
+msgctxt "IDS_SCALE_16_9"
+msgid "Scale to 16:9 TV,%.3f,%.3f,%.3f,%.3f"
+msgstr "Skala ke 16:9 TV,%.3f,%.3f,%.3f,%.3f"
+
+msgctxt "IDS_SCALE_WIDESCREEN"
+msgid "Zoom To Widescreen,%.3f,%.3f,%.3f,%.3f"
+msgstr "Zum ke Layar Lebar,%.3f,%.3f,%.3f,%.3f"
+
+msgctxt "IDS_SCALE_ULTRAWIDE"
+msgid "Zoom To Ultra-Widescreen,%.3f,%.3f,%.3f,%.3f"
+msgstr "Zum ke Layar Ultra Lebar,%.3f,%.3f,%.3f,%.3f"
+
+msgctxt "IDS_PLAYLIST_HIDEFS"
+msgid "Hide on Fullscreen"
+msgstr "Sembunyikan pada Layar Penuh"
+
+msgctxt "IDS_CONTROLS_STOPPED"
+msgid "Stopped"
+msgstr "Terhenti"
+
+msgctxt "IDS_CONTROLS_BUFFERING"
+msgid "Buffering... (%d%%)"
+msgstr "Membufer... (%d%%)"
+
+msgctxt "IDS_CONTROLS_CAPTURING"
+msgid "Capturing..."
+msgstr "Menangkap..."
+
+msgctxt "IDS_CONTROLS_OPENING"
+msgid "Opening..."
+msgstr "Membuka..."
+
+msgctxt "IDS_CONTROLS_CLOSED"
+msgid "Closed"
+msgstr "Tertutup"
+
+msgctxt "IDS_SUBTITLES_OPTIONS"
+msgid "&Options..."
+msgstr "&Opsi..."
+
+msgctxt "IDS_SUBTITLES_STYLES"
+msgid "&Styles..."
+msgstr "&Gaya..."
+
+msgctxt "IDS_SUBTITLES_RELOAD"
+msgid "&Reload"
+msgstr "&Muat Ulang"
+
+msgctxt "IDS_SUBTITLES_ENABLE"
+msgid "&Enable"
+msgstr "&Fungsikan"
+
+msgctxt "IDS_PANSCAN_EDIT"
+msgid "&Edit..."
+msgstr "&Sunting..."
+
+msgctxt "IDS_INFOBAR_TITLE"
+msgid "Title"
+msgstr "Judul"
+
+msgctxt "IDS_INFOBAR_AUTHOR"
+msgid "Author"
+msgstr "Pembuat"
+
+msgctxt "IDS_INFOBAR_COPYRIGHT"
+msgid "Copyright"
+msgstr "Hak Cipta"
+
+msgctxt "IDS_INFOBAR_RATING"
+msgid "Rating"
+msgstr "Penilaian"
+
+msgctxt "IDS_INFOBAR_DESCRIPTION"
+msgid "Description"
+msgstr "Deskripsi"
+
+msgctxt "IDS_INFOBAR_DOMAIN"
+msgid "Domain"
+msgstr "Domain"
+
+msgctxt "IDS_AG_CLOSE"
+msgid "Close"
+msgstr "Tutup"
+
+msgctxt "IDS_AG_NONE"
+msgid "None"
+msgstr "Nihil"
+
+msgctxt "IDS_AG_COMMAND"
+msgid "Command"
+msgstr "Perintah"
+
+msgctxt "IDS_AG_KEY"
+msgid "Key"
+msgstr "Kunci"
+
+msgctxt "IDS_AG_MOUSE"
+msgid "Mouse Windowed"
+msgstr ""
+
+msgctxt "IDS_AG_MOUSE_FS"
+msgid "Mouse Fullscreen"
+msgstr "Tetikus Layar Penuh"
+
+msgctxt "IDS_AG_APP_COMMAND"
+msgid "App Command"
+msgstr "Perintah Apl"
+
+msgctxt "IDS_AG_MEDIAFILES"
+msgid "Media files (all types)"
+msgstr "Berkas media (semua jenis)"
+
+msgctxt "IDS_AG_ALLFILES"
+msgid "All files (*.*)|*.*|"
+msgstr "Semua berkas (*.*)|*.*|"
+
+msgctxt "IDS_AG_AUDIOFILES"
+msgid "Audio files (all types)"
+msgstr "Berkas audio (semua jenis)"
+
+msgctxt "IDS_AG_NOT_KNOWN"
+msgid "Not known"
+msgstr "Tidak dikenal"
+
+msgctxt "IDS_MPLAYERC_0"
+msgid "Quick Open File"
+msgstr "Buka Berkas Cepat"
+
+msgctxt "IDS_AG_OPEN_FILE"
+msgid "Open File"
+msgstr "Buka Berkas"
+
+msgctxt "IDS_AG_OPEN_DVD"
+msgid "Open DVD/BD"
+msgstr "Buka DVD/BD"
+
+msgctxt "IDS_MAINFRM_POST_SHADERS_FAILED"
+msgid "Failed to set post-resize shaders"
+msgstr "Gagal menetapkan shader paska ubah ukuran"
+
+msgctxt "IDS_MAINFRM_BOTH_SHADERS_FAILED"
+msgid "Failed to set both pre-resize and post-resize shaders"
+msgstr "Gagal menetapkan shader baik pra dan paska ubah ukuran"
+
+msgctxt "IDS_DEBUGSHADERS_FIRSTRUN_MSG"
+msgid "Shaders are recompiled automatically when the corresponding files are modified."
+msgstr "Shader akan dikompilasikan ulang secara otomatis ketika berkas terkait dimodifikasi."
+
+msgctxt "IDS_SHADER_DLL_ERR_0"
+msgid "Cannot load %s, pixel shaders will not work."
+msgstr "Tidak bisa memuat %s, shader piksel tidak akan bekerja."
+
+msgctxt "IDS_SHADER_DLL_ERR_1"
+msgid "Cannot find necessary function entry points in %s, pixel shaders will not work."
+msgstr "Tidak bisa menemukan titik masuk fungsi yang diperlukan dalam %s, shader piksel tidak akan bekerja."
+
+msgctxt "IDS_OSD_SHADERS_PRESET"
+msgid "Shader preset: %s"
+msgstr "Prasetel shader: %s"
+
+msgctxt "IDS_AG_SHADERS_PRESET_NEXT"
+msgid "Next Shader Preset"
+msgstr "Prasetel Shader Selanjutnya"
+
+msgctxt "IDS_AG_SHADERS_PRESET_PREV"
+msgid "Prev Shader Preset"
+msgstr "Prasetel Shader Sebelumnya"
+
+msgctxt "IDS_STRING_COLON"
+msgid "%s:"
+msgstr "%s:"
+
+msgctxt "IDS_RECORD_START"
+msgid "Record"
+msgstr "Rekam"
+
+msgctxt "IDS_RECORD_STOP"
+msgid "Stop"
+msgstr "Hentikan"
+
+msgctxt "IDS_BALANCE"
+msgid "L = R"
+msgstr "L = R"
+
+msgctxt "IDS_BALANCE_L"
+msgid "L +%d%%"
+msgstr "L +%d%%"
+
+msgctxt "IDS_BALANCE_R"
+msgid "R +%d%%"
+msgstr "R +%d%%"
+
+msgctxt "IDS_VOLUME"
+msgid "%d%%"
+msgstr "%d%%"
+
+msgctxt "IDS_BOOST"
+msgid "+%d%%"
+msgstr "+%d%%"
+
+msgctxt "IDS_PLAYLIST_ADDFOLDER"
+msgid "Add containing folder"
+msgstr "Tambah folder bermuatan"
+
+msgctxt "IDS_HW_INDICATOR"
+msgid "[H/W]"
+msgstr "[H/W]"
+
+msgctxt "IDS_TOOLTIP_SOFTWARE_DECODING"
+msgid "Software Decoding"
+msgstr "Pengawakodean Perangkat Lunak"
+
+msgctxt "IDS_STATSBAR_PLAYBACK_RATE"
+msgid "Playback rate"
+msgstr "Laju pemutaran"
+
+msgctxt "IDS_FILTERS_COPY_TO_CLIPBOARD"
+msgid "&Copy filters list to clipboard"
+msgstr "&Salin daftar filter ke papan klip"
+
+msgctxt "IDS_CREDENTIALS_SERVER"
+msgid "Enter server credentials"
+msgstr "Masukkan kredensial server"
+
+msgctxt "IDS_CREDENTIALS_CONNECT"
+msgid "Enter your credentials to connect"
+msgstr "Masukkan kredensial anda untuk menyambung"
+
+msgctxt "IDS_SUB_SAVE_EXTERNAL_STYLE_FILE"
+msgid "Save custom style"
+msgstr "Simpan gaya ubahsuai"
+
+msgctxt "IDS_CONTENT_EDUCATION_SCIENCE"
+msgid "Education/Science/Factual topics"
+msgstr "Topik Edukasi/Sains/Fakta"
+
+msgctxt "IDS_PPAGEADVANCED_HIDE_WINDOWED"
+msgid "Hides controls and panels also in windowed mode."
+msgstr "Sembunyikan pengendali dan juga panel dalam mode windowed."
+
+msgctxt "IDS_PPAGEADVANCED_BLOCK_VSFILTER"
+msgid "Prevent external subtitle renderer to be loaded when internal is in use."
+msgstr "Cegah perender subtitel eksternal dimuat ketika perender internal sedang digunakan."
+
+msgctxt "IDS_PPAGEADVANCED_COL_NAME"
+msgid "Name"
+msgstr "Nama"
+
+msgctxt "IDS_PPAGEADVANCED_COL_VALUE"
+msgid "Value"
+msgstr "Nilai"
+
+msgctxt "IDS_PPAGEADVANCED_RECENT_FILES_NUMBER"
+msgid "Maximum number of files shown in the \"Recent files\" menu and for which the position is potentially saved."
+msgstr "Jumlah maksimum berkas ditampilkan di menu \"Berkas baru-baru ini\" dan untuk yang posisinya secara potensial tersimpan."
+
+msgctxt "IDS_PPAGEADVANCED_FILE_POS_LONGER"
+msgid "Remember file position only for files longer than N minutes."
+msgstr "Ingat posisi berkas hanya untuk berkas yang lebih panjang dari N menit."
+
+msgctxt "IDS_PPAGEADVANCED_FILE_POS_AUDIO"
+msgid "Remember file position also for audio files."
+msgstr "Ingat posisi berkas juga untuk berkas audio."
+
+msgctxt "IDS_AFTER_PLAYBACK_DO_NOTHING"
+msgid "Do Nothing"
+msgstr "Tidak Melakukan Apa-apa"
+
+msgctxt "IDS_AFTER_PLAYBACK_PLAY_NEXT"
+msgid "Play next file in the folder"
+msgstr "Putar berkas selanjutnya di dalam folder"
+
+msgctxt "IDS_AFTER_PLAYBACK_REWIND"
+msgid "Rewind current file"
+msgstr "Mundurkan berkas saat ini"
+
+msgctxt "IDS_AFTER_PLAYBACK_CLOSE"
+msgid "Close"
+msgstr "Tutup"
+
+msgctxt "IDS_AFTER_PLAYBACK_EXIT"
+msgid "Exit"
+msgstr "Keluar"
+
+msgctxt "IDS_AFTER_PLAYBACK_MONITOROFF"
+msgid "Turn off the monitor"
+msgstr "Matikan monitor"
+
+msgctxt "IDS_IMAGE_JPEG_QUALITY"
+msgid "JPEG Image"
+msgstr "Gambar JPEG"
+
+msgctxt "IDS_IMAGE_QUALITY"
+msgid "Quality (%):"
+msgstr "Kualitas (%):"
+
+msgctxt "IDS_PPAGEADVANCED_COVER_SIZE_LIMIT"
+msgid "Maximum size (NxNpx) of a cover-art loaded in the audio only mode."
+msgstr "Ukuran Maksimum (NxNpx) sampul album yang dimuat dalam mode audio saja."
+
+msgctxt "IDS_SUBTITLE_DELAY_STEP_TOOLTIP"
+msgid "The subtitle delay will be decreased/increased by this value each time the corresponding hotkeys are used (%s/%s)."
+msgstr "Tundaan subtitel akan diturunkan/dinaikkan berdasarkan nilai ini setiap kali kombinasi tombol pintasan cepat digunakan (%s/%s)."
+
+msgctxt "IDS_HOTKEY_NOT_DEFINED"
+msgid "<not defined>"
+msgstr "<not defined>"
+
+msgctxt "IDS_NAVIGATION_WATCH"
+msgid "Watch"
+msgstr "Tonton"
+
+msgctxt "IDS_NAVIGATION_MOVE_UP"
+msgid "Move Up"
+msgstr "Pindah ke Atas"
+
+msgctxt "IDS_NAVIGATION_MOVE_DOWN"
+msgid "Move Down"
+msgstr "Pindah ke Bawah"
+
+msgctxt "IDS_NAVIGATION_SORT"
+msgid "Sort by LCN"
+msgstr "Urutkan menurut LCN"
+
+msgctxt "IDS_NAVIGATION_REMOVE_ALL"
+msgid "Remove all"
+msgstr "Hapus semua"
+
+msgctxt "IDS_REMOVE_CHANNELS_QUESTION"
+msgid "Are you sure you want to remove all channels from the list?"
+msgstr "Apakah anda yakin akan menghapus semua saluran dari daftar?"
+
+msgctxt "IDS_MEDIAINFO_NO_INFO_AVAILABLE"
+msgid "No information available"
+msgstr "Informasi tidak tersedia"
+
+msgctxt "IDS_MEDIAINFO_ANALYSIS_IN_PROGRESS"
+msgid "Please wait, analysis in progress..."
+msgstr "Mohon tunggu, analisa sedang diproses..."
+
+msgctxt "IDS_ASPECT_RATIO_FMT"
+msgid "AR %d:%d"
+msgstr "AR %d:%d"
+
+msgctxt "IDS_PPAGEADVANCED_LOGGER"
+msgid "Enables logging to file (requires restart)"
+msgstr "Fungsikan pencatatan log ke berkas (wajib memulai ulang)"
+
+msgctxt "IDS_TIMER_REMAINING_TIME"
+msgid "Remaining time"
+msgstr "Waktu tersisa"
+
+msgctxt "IDS_TIMER_HIGH_PRECISION"
+msgid "High precision"
+msgstr "Presisi tinggi"
+
+msgctxt "IDS_AFTERPLAYBACK_REWIND"
+msgid "After Playback: Rewind current file"
+msgstr "Setelah Pemutaran: Mundurkan berkas saat ini"
+
+msgctxt "IDS_AFTERPLAYBACK_CLOSE"
+msgid "After Playback: Close"
+msgstr "Setelah Pemutaran: Tutup"
+
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC menemukan masalah saat inisialisasi. Dengan bantuan anda kami mungkin bisa memperbaiki masalah ini.\n\nApakah anda ingin melaporkannya?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Masukkan nilai positif jika audio terlalu cepat, negatif jika terlambat."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Pratinjau dinonfungsikan. Anda bisa memfungsikannya di opsi MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Opsi ini bisa digunakan untuk pratinjau berkas media dari lokasi yang jauh. Hanya gunakan pada jaringan privat yang benar-benar aman.\n\nApakah Anda benar-benar ingin memfungsikan opsi ini?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Perender Subtitel Internal"
+
+msgctxt "IDS_AG_OPEN_DEVICE"
+msgid "Open Device"
+msgstr "Buka Perangkat"
+
+msgctxt "IDS_AG_SAVE_AS"
+msgid "Save As"
+msgstr "Simpan Sebagai"
+
+msgctxt "IDS_AG_SAVE_IMAGE"
+msgid "Save Image"
+msgstr "Simpan Gambar"
+
+msgctxt "IDS_MPLAYERC_6"
+msgid "Save Image (auto)"
+msgstr "Simpan Gambar (auto)"
+
+msgctxt "IDS_OSD_IMAGE_SAVED"
+msgid "Image saved successfully"
+msgstr "Gambar berhasil disimpan"
+
+msgctxt "IDS_AG_LOAD_SUBTITLE"
+msgid "Load Subtitle"
+msgstr "Muat Subtitel"
+
+msgctxt "IDS_AG_SAVE_SUBTITLE"
+msgid "Save Subtitle"
+msgstr "Simpan Subtitel"
+
+msgctxt "IDS_AG_PROPERTIES"
+msgid "Properties"
+msgstr "Properti"
+
+msgctxt "IDS_AG_EXIT"
+msgid "Exit"
+msgstr "Keluar"
+
+msgctxt "IDS_AG_PLAYPAUSE"
+msgid "Play/Pause"
+msgstr "Putar/Jeda"
+
+msgctxt "IDS_AG_PLAY"
+msgid "Play"
+msgstr "Putar"
+
+msgctxt "IDS_AG_STOP"
+msgid "Stop"
+msgstr "Hentikan"
+
+msgctxt "IDS_AG_FRAMESTEP"
+msgid "Frame-step"
+msgstr "Tahap-frame"
+
+msgctxt "IDS_MPLAYERC_16"
+msgid "Frame-step back"
+msgstr "Tahap-frame mundur"
+
+msgctxt "IDS_AG_GO_TO"
+msgid "Go To"
+msgstr "Pergi Ke"
+
+msgctxt "IDS_AG_INCREASE_RATE"
+msgid "Increase Rate"
+msgstr "Naikkan Laju"
+
+msgctxt "IDS_CONTENT_SHOW_GAMESHOW"
+msgid "Show/Game show"
+msgstr "Acara/Acara permainan"
+
+msgctxt "IDS_CONTENT_SPORTS"
+msgid "Sports"
+msgstr "Olahraga"
+
+msgctxt "IDS_CONTENT_CHILDREN_YOUTH_PROG"
+msgid "Children's/Youth programmes"
+msgstr "Program Anak/Remaja"
+
+msgctxt "IDS_CONTENT_MUSIC_BALLET_DANCE"
+msgid "Music/Ballet/Dance"
+msgstr "Musik/Balet/Tarian"
+
+msgctxt "IDS_CONTENT_MUSIC_ART_CULTURE"
+msgid "Arts/Culture"
+msgstr "Seni/Budaya"
+
+msgctxt "IDS_CONTENT_SOCIAL_POLITICAL_ECO"
+msgid "Social/Political issues/Economics"
+msgstr "Sosial/Politik/Ekonomi"
+
+msgctxt "IDS_CONTENT_LEISURE"
+msgid "Leisure hobbies"
+msgstr "Hobi"
+
+msgctxt "IDS_FILE_RECYCLE"
+msgid "Move to Recycle Bin"
+msgstr "Pindahkan ke Keranjang Sampah"
+
+msgctxt "IDS_AG_SAVE_COPY"
+msgid "Save a Copy"
+msgstr "Simpan Salinan"
+
+msgctxt "IDS_FASTSEEK_LATEST"
+msgid "Latest keyframe"
+msgstr "Keyframe terakhir"
+
+msgctxt "IDS_FASTSEEK_NEAREST"
+msgid "Nearest keyframe"
+msgstr "Keyframe terdekat"
+
+msgctxt "IDS_HOOKS_FAILED"
+msgid "MPC-HC encountered a problem during initialization. DVD playback may not work correctly. This might be caused by some incompatibilities with certain security tools.\n\nDo you want to report this issue?"
+msgstr "MPC-HC menemukan masalah saat inisialisasi. Pemutaran DVD tidak akan bekerja dengan benar. Ini mungkin disebabkan oleh beberapa inkompatibilitas dengan perkakas keamanan tertentu.\n\nApakah anda ingin melaporkan masalah ini?"
+
+msgctxt "IDS_PPAGEFULLSCREEN_SHOWNEVER"
+msgid "Never show"
+msgstr "Jangan pernah tampilkan"
+
+msgctxt "IDS_PPAGEFULLSCREEN_SHOWMOVED"
+msgid "Show when moving the cursor, hide after:"
+msgstr "Tampilkan saat mengerakkan kursor, sembuyikan setelah:"
+
+msgctxt "IDS_PPAGEFULLSCREEN_SHOHHOVERED"
+msgid "Show when hovering control, hide after:"
+msgstr "Tampilkan saat ambang di atas pengendali, sembunyikan setelah:"
+
+msgctxt "IDS_MAINFRM_PRE_SHADERS_FAILED"
+msgid "Failed to set pre-resize shaders"
+msgstr "Gagal menetapkan shader pra ubah ukuran"
+
+msgctxt "IDS_OSD_RS_FT_CORRECTION_ON"
+msgid "Frame Time Correction: On"
+msgstr "Koreksi Waktu Frame: Nyala"
+
+msgctxt "IDS_OSD_RS_FT_CORRECTION_OFF"
+msgid "Frame Time Correction: Off"
+msgstr "Koreksi Waktu Frame: Mati"
+
+msgctxt "IDS_OSD_RS_TARGET_VSYNC_OFFSET"
+msgid "Target VSync Offset: %.1f"
+msgstr "Ofset Target VSync: %.1f"
+
+msgctxt "IDS_OSD_RS_VSYNC_OFFSET"
+msgid "VSync Offset: %d"
+msgstr "Ofset VSync: %d"
+
+msgctxt "IDS_OSD_SPEED"
+msgid "Speed: %.2lfx"
+msgstr "Kecepatan: %.2lfx"
+
+msgctxt "IDS_OSD_THUMBS_SAVED"
+msgid "Thumbnails saved successfully"
+msgstr "Gambar mini berhasil disimpan"
+
+msgctxt "IDS_MENU_VIDEO_STREAM"
+msgid "&Video Track"
+msgstr "Trek &Video"
+
+msgctxt "IDS_MENU_VIDEO_ANGLE"
+msgid "Video Ang&le"
+msgstr "Su&dut Video"
+
+msgctxt "IDS_RESET_SETTINGS"
+msgid "Reset settings"
+msgstr "Setel ulang pengaturan"
+
+msgctxt "IDS_RESET_SETTINGS_WARNING"
+msgid "Are you sure you want to restore MPC-HC to its default settings?\nBe warned that ALL your current settings will be lost!"
+msgstr "Apakah anda yakin ingin memulihkan pengaturan MPC-HC ke nilai bawaan?\nMohon perhatian bahwa SEMUA pengaturan anda saat ini akan hilang!"
+
+msgctxt "IDS_RESET_SETTINGS_MUTEX"
+msgid "Please close all instances of MPC-HC so that the default settings can be restored."
+msgstr "Mohon tutup semua unit MPC-HC sehingga pengaturan bawaan dapat dipulihkan."
+
+msgctxt "IDS_EXPORT_SETTINGS"
+msgid "Export settings"
+msgstr "Ekspor pengaturan"
+
+msgctxt "IDS_EXPORT_SETTINGS_WARNING"
+msgid "Some changes have not been saved yet.\nDo you want to save them before exporting?"
+msgstr "Beberapa perubahan belum tersimpan.\nApakah anda ingin meyimpannya sebelum mengekspornya?"
+
+msgctxt "IDS_EXPORT_SETTINGS_SUCCESS"
+msgid "The settings have been successfully exported."
+msgstr "Pengaturan telah berhasil diekspor."
+
+msgctxt "IDS_EXPORT_SETTINGS_FAILED"
+msgid "The export failed! This can happen when you don't have the correct rights."
+msgstr "Ekspor gagal! Hal ini bisa terjadi jika anda tidak memiliki hak yang benar."
+
+msgctxt "IDS_BDA_ERROR"
+msgid "BDA Error"
+msgstr "Galat BDA"
+
+msgctxt "IDS_AG_DECREASE_RATE"
+msgid "Decrease Rate"
+msgstr "Turunkan Laju"
+
+msgctxt "IDS_AG_RESET_RATE"
+msgid "Reset Rate"
+msgstr "Setel Ulang Laju"
+
+msgctxt "IDS_MPLAYERC_21"
+msgid "Audio Delay +10 ms"
+msgstr "Tundaan Audio +10ms"
+
+msgctxt "IDS_MPLAYERC_22"
+msgid "Audio Delay -10 ms"
+msgstr "Tundaan Audio -10ms"
+
+msgctxt "IDS_MPLAYERC_23"
+msgid "Jump Forward (small)"
+msgstr "Lompat Maju (kecil)"
+
+msgctxt "IDS_MPLAYERC_24"
+msgid "Jump Backward (small)"
+msgstr "Lompat Mundur (kecil)"
+
+msgctxt "IDS_MPLAYERC_25"
+msgid "Jump Forward (medium)"
+msgstr "Lompat Maju (medium)"
+
+msgctxt "IDS_MPLAYERC_26"
+msgid "Jump Backward (medium)"
+msgstr "Lompat Mundur (medium)"
+
+msgctxt "IDS_MPLAYERC_27"
+msgid "Jump Forward (large)"
+msgstr "Lompat Maju (besar)"
+
+msgctxt "IDS_MPLAYERC_28"
+msgid "Jump Backward (large)"
+msgstr "Lompat Mundur (besar)"
+
+msgctxt "IDS_MPLAYERC_29"
+msgid "Jump Forward (keyframe)"
+msgstr "Lompat Maju (keyframe)"
+
+msgctxt "IDS_MPLAYERC_30"
+msgid "Jump Backward (keyframe)"
+msgstr "Lompat Mundur (keyframe)"
+
+msgctxt "IDS_AG_NEXT"
+msgid "Next"
+msgstr "Selanjutnya"
+
+msgctxt "IDS_AG_PREVIOUS"
+msgid "Previous"
+msgstr "Sebelumnya"
+
+msgctxt "IDS_AG_NEXT_FILE"
+msgid "Next File"
+msgstr "Berkas Selanjutnya"
+
+msgctxt "IDS_AG_PREVIOUS_FILE"
+msgid "Previous File"
+msgstr "Berkas Sebelumnya"
+
+msgctxt "IDS_MPLAYERC_99"
+msgid "Toggle Direct3D fullscreen"
+msgstr "Jungkit layar penuh Direct3D"
+
+msgctxt "IDS_MPLAYERC_100"
+msgid "Goto Prev Subtitle"
+msgstr "Ke Subtitel Sebelumnya"
+
+msgctxt "IDS_MPLAYERC_101"
+msgid "Goto Next Subtitle"
+msgstr "Ke Subtitel Selanjutnya"
+
+msgctxt "IDS_MPLAYERC_102"
+msgid "Shift Subtitle Left"
+msgstr "Geser Subtitel ke Kiri"
+
+msgctxt "IDS_MPLAYERC_103"
+msgid "Shift Subtitle Right"
+msgstr "Geser Subtitel ke Kanan"
+
+msgctxt "IDS_AG_SEEKSET"
+msgid "Jump to Beginning"
+msgstr "Lompat ke Awal"
+
+msgctxt "IDS_OSD_SHOW_FILENAME"
+msgid "OSD: Show File Name"
+msgstr "OSD: Tampilkan Nama Berkas"
+
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Putar DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Putar BD"
+
+msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
+msgid "OSD: Display Renderer Statistics"
+msgstr "OSD: Tampilkan Statistik Perender"
+
+msgctxt "IDS_OSD_RESET_RENDERER_STATS"
+msgid "OSD: Reset Renderer Statistics"
+msgstr "OSD: Setel Ulang Statistik Perender"
+
+msgctxt "IDD_PPAGESUBMISC"
+msgid "Subtitles::Misc"
+msgstr "Subtitel::Lainnya"
+
+msgctxt "IDS_VIEW_BORDERLESS"
+msgid "Hide &borders"
+msgstr "Sembunyikan &batas"
+
+msgctxt "IDS_VIEW_FRAMEONLY"
+msgid "Fra&me Only"
+msgstr "Hanya Fra&me"
+
+msgctxt "IDS_VIEW_CAPTIONMENU"
+msgid "Sho&w Caption&&Menu"
+msgstr "Tam&pilkan Takarir & &Menu"
+
+msgctxt "IDS_VIEW_HIDEMENU"
+msgid "Hide &Menu"
+msgstr "Sembunyikan &Menu"
+
+msgctxt "IDD_PPAGEADVANCED"
+msgid "Advanced"
+msgstr "Tingkat Lanjut"
+
+msgctxt "IDS_AG_VIEW_MINIMAL"
+msgid "View Minimal"
+msgstr "Tilikan Minimal"
+
+msgctxt "IDS_AG_VIEW_COMPACT"
+msgid "View Compact"
+msgstr "Tilikan Ringkas"
+
+msgctxt "IDS_AG_VIEW_NORMAL"
+msgid "View Normal"
+msgstr "Tilikan Normal"
+
+msgctxt "IDS_AG_FULLSCREEN"
+msgid "Fullscreen"
+msgstr "Layar Penuh"
+
+msgctxt "IDS_MPLAYERC_39"
+msgid "Fullscreen (w/o res.change)"
+msgstr "Layar Penuh (tanpa ubah resolusi)"
+
+msgctxt "IDS_AG_ZOOM_AUTO_FIT"
+msgid "Zoom Auto Fit"
+msgstr "Zum Oto Suai"
+
+msgctxt "IDS_AG_VIDFRM_HALF"
+msgid "VidFrm Half"
+msgstr "VidFrm Setengah"
+
+msgctxt "IDS_AG_VIDFRM_NORMAL"
+msgid "VidFrm Normal"
+msgstr "VidFrm Normal"
+
+msgctxt "IDS_AG_VIDFRM_DOUBLE"
+msgid "VidFrm Double"
+msgstr "VidFrm Ganda"
+
+msgctxt "IDS_AG_ALWAYS_ON_TOP"
+msgid "Always On Top"
+msgstr "Selalu di Puncak"
+
+msgctxt "IDS_AG_PNS_INC_SIZE"
+msgid "PnS Inc Size"
+msgstr "PnS Tmbh Ukuran"
+
+msgctxt "IDS_AG_PNS_INC_WIDTH"
+msgid "PnS Inc Width"
+msgstr "PnS Tmbh Lebar"
+
+msgctxt "IDS_MPLAYERC_47"
+msgid "PnS Inc Height"
+msgstr "PnS Tmbh Tinggi"
+
+msgctxt "IDS_AG_PNS_DEC_SIZE"
+msgid "PnS Dec Size"
+msgstr "PnS Krngi Ukuran"
+
+msgctxt "IDS_AG_PNS_DEC_WIDTH"
+msgid "PnS Dec Width"
+msgstr "PnS Krngi Lebar"
+
+msgctxt "IDS_MPLAYERC_50"
+msgid "PnS Dec Height"
+msgstr "PnS Krngi Tinggi"
+
+msgctxt "IDS_SUBDL_DLG_DOWNLOADING"
+msgid "Downloading subtitle(s), please wait."
+msgstr "Mengunduh subtitel, mohon tunggu."
+
+msgctxt "IDS_SUBDL_DLG_PARSING"
+msgid "Parsing list..."
+msgstr "Mengurai daftar..."
+
+msgctxt "IDS_SUBDL_DLG_NOT_FOUND"
+msgid "No subtitles found."
+msgstr "Tidak ada subtitel yang ditemukan."
+
+msgctxt "IDS_SUBDL_DLG_SUBS_AVAIL"
+msgid "%d subtitle(s) available."
+msgstr "%d subtitel tersedia."
+
+msgctxt "IDS_UPDATE_CONFIG_AUTO_CHECK"
+msgid "Do you want to check periodically for MPC-HC updates?\n\nThis feature can be disabled later from the Miscellaneous options page."
+msgstr "Apakah anda ingin memeriksa secara berkala pemutakhiran MPC-HC?\n\nFitur ini dapat dinonfungsikan nanti dari halaman opsi Bermacam-lainnya."
+
+msgctxt "IDS_ZOOM_50"
+msgid "50%"
+msgstr "50%"
+
+msgctxt "IDS_ZOOM_100"
+msgid "100%"
+msgstr "100%"
+
+msgctxt "IDS_ZOOM_200"
+msgid "200%"
+msgstr "200%"
+
+msgctxt "IDS_ZOOM_AUTOFIT"
+msgid "Auto Fit"
+msgstr "Oto Suai"
+
+msgctxt "IDS_ZOOM_AUTOFIT_LARGER"
+msgid "Auto Fit (Larger Only)"
+msgstr "Oto Suai (Lebih Besar Saja)"
+
+msgctxt "IDS_AG_ZOOM_AUTO_FIT_LARGER"
+msgid "Zoom Auto Fit (Larger Only)"
+msgstr "Zum Oto Suai (Lebih Besar Saja)"
+
+msgctxt "IDS_OSD_ZOOM_AUTO_LARGER"
+msgid "Zoom: Auto (Larger Only)"
+msgstr "Zum: Auto (Lebih Besar Saja)"
+
+msgctxt "IDS_TOOLTIP_EXPLORE_TO_FILE"
+msgid "Double click to open file location"
+msgstr "Klik ganda untuk membuka lokasi berkas"
+
+msgctxt "IDS_TOOLTIP_REMAINING_TIME"
+msgid "Toggle between elapsed and remaining time"
+msgstr "Jungkit antara waktu berjalan dan tersisa"
+
+msgctxt "IDS_UPDATE_DELAY_ERROR_TITLE"
+msgid "Invalid delay"
+msgstr "Tundaan tidak valid"
+
+msgctxt "IDS_UPDATE_DELAY_ERROR_MSG"
+msgid "Please enter a number between 1 and 365."
+msgstr "Mohon masukkan angka antara 1 dan 365."
+
+msgctxt "IDS_AG_PNS_CENTER"
+msgid "PnS Center"
+msgstr "PnS Tengah"
+
+msgctxt "IDS_AG_PNS_LEFT"
+msgid "PnS Left"
+msgstr "PnS Kiri"
+
+msgctxt "IDS_AG_PNS_RIGHT"
+msgid "PnS Right"
+msgstr "PnS Kanan"
+
+msgctxt "IDS_AG_PNS_UP"
+msgid "PnS Up"
+msgstr "PnS Naik"
+
+msgctxt "IDS_AG_PNS_DOWN"
+msgid "PnS Down"
+msgstr "PnS Turun"
+
+msgctxt "IDS_AG_PNS_UPLEFT"
+msgid "PnS Up/Left"
+msgstr "PnS Naik/Kiri"
+
+msgctxt "IDS_AG_PNS_UPRIGHT"
+msgid "PnS Up/Right"
+msgstr "PnS Naik/Kanan"
+
+msgctxt "IDS_AG_PNS_DOWNLEFT"
+msgid "PnS Down/Left"
+msgstr "PnS Turun/Kiri"
+
+msgctxt "IDS_MPLAYERC_59"
+msgid "PnS Down/Right"
+msgstr "PnS Turun/Kanan"
+
+msgctxt "IDS_AG_VOLUME_UP"
+msgid "Volume Up"
+msgstr "Volume Naik"
+
+msgctxt "IDS_AG_VOLUME_DOWN"
+msgid "Volume Down"
+msgstr "Volume Turun"
+
+msgctxt "IDS_AG_VOLUME_MUTE"
+msgid "Volume Mute"
+msgstr "Volume Bisu"
+
+msgctxt "IDS_MPLAYERC_63"
+msgid "DVD Title Menu"
+msgstr "Menu Judul DVD"
+
+msgctxt "IDS_AG_DVD_ROOT_MENU"
+msgid "DVD Root Menu"
+msgstr "Menu Akar DVD"
+
+msgctxt "IDS_MPLAYERC_65"
+msgid "DVD Subtitle Menu"
+msgstr "Menu Subtitel DVD"
+
+msgctxt "IDS_MPLAYERC_66"
+msgid "DVD Audio Menu"
+msgstr "Menu Audio DVD"
+
+msgctxt "IDS_MPLAYERC_67"
+msgid "DVD Angle Menu"
+msgstr "Menu Sudut DVD"
+
+msgctxt "IDS_MPLAYERC_68"
+msgid "DVD Chapter Menu"
+msgstr "Menu Bab DVD"
+
+msgctxt "IDS_AG_DVD_MENU_LEFT"
+msgid "DVD Menu Left"
+msgstr "Menu DVD Kiri"
+
+msgctxt "IDS_MPLAYERC_70"
+msgid "DVD Menu Right"
+msgstr "Menu DVD Kanan"
+
+msgctxt "IDS_AG_DVD_MENU_UP"
+msgid "DVD Menu Up"
+msgstr "Menu DVD Naik"
+
+msgctxt "IDS_AG_DVD_MENU_DOWN"
+msgid "DVD Menu Down"
+msgstr "Menu DVD Turun"
+
+msgctxt "IDS_MPLAYERC_73"
+msgid "DVD Menu Activate"
+msgstr "Menu DVD Aktifkan"
+
+msgctxt "IDS_AG_DVD_MENU_BACK"
+msgid "DVD Menu Back"
+msgstr "Menu DVD Kembali"
+
+msgctxt "IDS_MPLAYERC_75"
+msgid "DVD Menu Leave"
+msgstr "Menu DVD Pergi"
+
+msgctxt "IDS_AG_BOSS_KEY"
+msgid "Boss key"
+msgstr "Tombol Bos"
+
+msgctxt "IDS_MPLAYERC_77"
+msgid "Player Menu"
+msgstr "Menu Pemutar"
+
+msgctxt "IDS_MPLAYERC_78"
+msgid "Player Menu (full)"
+msgstr "Menu Pemutar (penuh)"
+
+msgctxt "IDS_AG_FILTERS_MENU"
+msgid "Filters Menu"
+msgstr "Menu Filter"
+
+msgctxt "IDS_AG_OPTIONS"
+msgid "Options"
+msgstr "Opsi"
+
+msgctxt "IDS_AG_NEXT_AUDIO"
+msgid "Next Audio Track"
+msgstr "Trek Audio Selanjutnya"
+
+msgctxt "IDS_AG_PREV_AUDIO"
+msgid "Prev Audio Track"
+msgstr "Trek Audio Sebelumnya"
+
+msgctxt "IDS_AG_NEXT_SUBTITLE"
+msgid "Next Subtitle Track"
+msgstr "Trek Subtitel Selanjutnya"
+
+msgctxt "IDS_AG_PREV_SUBTITLE"
+msgid "Prev Subtitle Track"
+msgstr "Trek Subtitel Sebelumnya"
+
+msgctxt "IDS_MPLAYERC_85"
+msgid "On/Off Subtitle"
+msgstr "Subtitel Nyala/Mati"
+
+msgctxt "IDS_MPLAYERC_86"
+msgid "Reload Subtitles"
+msgstr "Muat Ulang Subtitel"
+
+msgctxt "IDS_MPLAYERC_91"
+msgid "Next Angle (DVD)"
+msgstr "Sudut Selanjutnya (DVD)"
+
+msgctxt "IDS_MPLAYERC_92"
+msgid "Prev Angle (DVD)"
+msgstr "Sudut Sebelumnya (DVD)"
+
+msgctxt "IDS_MPLAYERC_93"
+msgid "Next Audio Track (DVD)"
+msgstr "Trek Audio Selanjutnya (DVD)"
+
+msgctxt "IDS_MPLAYERC_94"
+msgid "Prev Audio Track (DVD)"
+msgstr "Trek Audio Sebelumnya (DVD)"
+
+msgctxt "IDS_MPLAYERC_95"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Trek Subtitel Selanjutnya (DVD)"
+
+msgctxt "IDS_MPLAYERC_96"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "Trek Subtitel Sebelumnya (DVD)"
+
+msgctxt "IDS_MPLAYERC_97"
+msgid "On/Off Subtitle (DVD)"
+msgstr "Subtitel Nyala/Mati (DVD)"
+
+msgctxt "IDS_OSD_DISPLAY_CURRENT_TIME"
+msgid "OSD: Display Current Time"
+msgstr "OSD: Tampilkan Waktu Saat Ini"
+
+msgctxt "IDS_PPAGEWEBSERVER_0"
+msgid "Select the directory"
+msgstr "Pilih direktori"
+
+msgctxt "IDS_FAVORITES_QUICKADDFAVORITE"
+msgid "Quick add favorite"
+msgstr "Tambah cepat favorit"
+
+msgctxt "IDS_DVB_CHANNEL_NUMBER"
+msgid "N"
+msgstr "N"
+
+msgctxt "IDS_DVB_CHANNEL_NAME"
+msgid "Name"
+msgstr "Nama"
+
+msgctxt "IDS_DVB_CHANNEL_FREQUENCY"
+msgid "Frequency"
+msgstr "Frekuensi"
+
+msgctxt "IDS_DVB_CHANNEL_ENCRYPTION"
+msgid "Encrypted"
+msgstr "Terenkripsi"
+
+msgctxt "IDS_DVB_CHANNEL_ENCRYPTED"
+msgid "Yes"
+msgstr "Ya"
+
+msgctxt "IDS_DVB_CHANNEL_NOT_ENCRYPTED"
+msgid "No"
+msgstr "Tidak"
+
+msgctxt "IDS_DVB_CHANNEL_START_SCAN"
+msgid "Start"
+msgstr "Awal"
+
+msgctxt "IDS_DVB_CHANNEL_STOP_SCAN"
+msgid "Stop"
+msgstr "Hentikan"
+
+msgctxt "IDS_DVB_TVNAV_SEERADIO"
+msgid "Radio stations"
+msgstr "Stasiun radio"
+
+msgctxt "IDS_DVB_TVNAV_SEETV"
+msgid "TV stations"
+msgstr "Stasiun TV"
+
+msgctxt "IDS_DVB_CHANNEL_FORMAT"
+msgid "Format"
+msgstr "Format"
+
+msgctxt "IDS_MAINFRM_2"
+msgid "Focus lost to: %s - %s"
+msgstr "Fokus hilang ke: %s - %s"
+
+msgctxt "IDS_AG_SUBTITLES_SAVED"
+msgid "Subtitles saved"
+msgstr "Subtitel tersimpan"
+
+msgctxt "IDS_MAINFRM_4"
+msgid "Cannot save subtitles"
+msgstr "Tidak bisa menyimpan subtitel"
+
+msgctxt "IDS_AG_FRAMERATE"
+msgid "Frame rate"
+msgstr "Laju frame"
+
+msgctxt "IDS_MAINFRM_6"
+msgid "drawn: %d, dropped: %d"
+msgstr "tergambar: %d, terbuang: %d"
+
+msgctxt "IDS_AG_FRAMES"
+msgid "Frames"
+msgstr "Frame"
+
+msgctxt "IDS_AG_BUFFERS"
+msgid "Buffers"
+msgstr "Bufer"
+
+msgctxt "IDS_MAINFRM_9"
+msgid "Volume: %02lu/%02lu, Title: %02lu/%02lu, Chapter: %02lu/%02lu"
+msgstr "Volume: %02lu/%02lu, Judul: %02lu/%02lu, Bab: %02lu/%02lu"
+
+msgctxt "IDS_MAINFRM_10"
+msgid "Angle: %02lu/%02lu, %lux%lu %lu Hz %lu:%lu"
+msgstr "Sudut: %02lu/%02lu, %lux%lu %lu Hz %lu:%lu"
+
+msgctxt "IDS_MAINFRM_11"
+msgid "%s, %s %u Hz %d bits %d %s"
+msgstr "%s, %s %u Hz %d bits %d %s"
+
+msgctxt "IDS_ADD_TO_PLAYLIST"
+msgid "Add to MPC-HC Playlist"
+msgstr "Tambah ke Daftar Putar MPC-HC"
+
+msgctxt "IDS_OPEN_WITH_MPC"
+msgid "Play with MPC-HC"
+msgstr "Putar dengan MPC-HC"
+
+msgctxt "IDS_CANNOT_CHANGE_FORMAT"
+msgid "MPC-HC has not enough privileges to change files formats associations. Please click on the \"Run as administrator\" button."
+msgstr "MPC-HC tidak memiliki cukup hak untuk mengubah asosiasi format berkas. Mohon klik pada tombol \"Jalankan sebagai administrator\"."
+
+msgctxt "IDS_APP_DESCRIPTION"
+msgid "MPC-HC is an extremely light-weight, open source media player for Windows. It supports all common video and audio file formats available for playback. We are 100% spyware free, there are no advertisements or toolbars."
+msgstr "MPC-HC pemutar media sumber terbuka dan sangat ringan untuk Windows. Mendukung semua format berkas video dan audio yang umum. Kami 100% bebas dari perangkat mata-mata, tidak ada iklan atau bilah alat berbahaya."
+
+msgctxt "IDS_MAINFRM_12"
+msgid "channel"
+msgstr "saluran"
+
+msgctxt "IDS_MAINFRM_13"
+msgid "channels"
+msgstr "saluran"
+
+msgctxt "IDS_AG_TITLE"
+msgid "Title %u"
+msgstr "Judul %u"
+
+msgctxt "IDS_MAINFRM_16"
+msgid "DVD: Unexpected error"
+msgstr "DVD: Galat tidak terduga"
+
+msgctxt "IDS_MAINFRM_17"
+msgid "DVD: Copy-Protect Fail"
+msgstr "DVD: Perlindungan Penyalinan Gagal"
+
+msgctxt "IDS_MAINFRM_18"
+msgid "DVD: Invalid DVD 1.x Disc"
+msgstr "DVD: Cakram DVD 1.x Tidak Valid"
+
+msgctxt "IDS_MAINFRM_19"
+msgid "DVD: Invalid Disc Region"
+msgstr "DVD: Wilayah Cakram Tidak Valid"
+
+msgctxt "IDS_MAINFRM_20"
+msgid "DVD: Low Parental Level"
+msgstr "DVD: Level Parental Rendah"
+
+msgctxt "IDS_MAINFRM_21"
+msgid "DVD: Macrovision Fail"
+msgstr "DVD: Macrovision Gagal"
+
+msgctxt "IDS_MAINFRM_22"
+msgid "DVD: Incompatible System And Decoder Regions"
+msgstr "DVD: Wilayah Dekoder dan Sistem Tidak Kompatibel"
+
+msgctxt "IDS_MAINFRM_23"
+msgid "DVD: Incompatible Disc And Decoder Regions"
+msgstr "DVD: Wilayah Dekoder dan Cakram Tidak Kompatibel"
+
+msgctxt "IDS_D3DFS_WARNING"
+msgid "This option is designed to avoid tearing. However, it will also prevent MPC-HC from displaying the context menu and any dialog box during playback.\n\nDo you really want to activate this option?"
+msgstr "Opsi ini didesain untuk menghindari tearing. Namun, ini juga mencegah MPC-HC menampilkan menu konteks dan kotak dialog lainnya selama pemutaran.\n\nApakah anda benar-benar ingin mengaktifkan opsi ini?"
+
+msgctxt "IDS_MAINFRM_139"
+msgid "Sub delay: %ld ms"
+msgstr "Tundaan sub: %ld ms"
+
+msgctxt "IDS_AG_TITLE2"
+msgid "Title: %02d/%02d"
+msgstr "Judul: %02d/%02d"
+
+msgctxt "IDS_REALVIDEO_INCOMPATIBLE"
+msgid "Filename contains unsupported characters (use only A-Z, 0-9)"
+msgstr "Nama berkas mengandung karakter yang tidak didukung (gunakan A-Z, 0-9)"
+
+msgctxt "IDS_THUMB_ROWNUMBER"
+msgid "Rows:"
+msgstr "Baris:"
+
+msgctxt "IDS_THUMB_COLNUMBER"
+msgid "Columns:"
+msgstr "Kolom:"
+
+msgctxt "IDS_THUMB_IMAGE_WIDTH"
+msgid "Image width"
+msgstr "Lebar gambar"
+
+msgctxt "IDS_PPSDB_URLCORRECT"
+msgid "The URL appears to be correct!"
+msgstr "URL sepertinya benar!"
+
+msgctxt "IDS_PPSDB_PROTOCOLERR"
+msgid "Protocol version mismatch, please upgrade your player or choose a different address!"
+msgstr "Versi protokol tidak sesuai, mohon mutakhirkan pemutar anda atau pilih alamat yang berbeda!"
+
+msgctxt "IDS_AG_ASPECT_RATIO"
+msgid "Aspect Ratio"
+msgstr "Nisbah Bidang"
+
+msgctxt "IDS_MAINFRM_37"
+msgid ", Total: %ld, Dropped: %ld"
+msgstr ", Total: %ld, Terbuang: %ld"
+
+msgctxt "IDS_MAINFRM_38"
+msgid ", Size: %I64d KB"
+msgstr ", Ukuran: %I64d KB"
+
+msgctxt "IDS_MAINFRM_39"
+msgid ", Size: %I64d MB"
+msgstr ", Ukuran: %I64d MB"
+
+msgctxt "IDS_MAINFRM_40"
+msgid ", Free: %I64d KB"
+msgstr ", Bebas: %I64d KB"
+
+msgctxt "IDS_MAINFRM_41"
+msgid ", Free: %I64d MB"
+msgstr ", Bebas: %I64d MB"
+
+msgctxt "IDS_MAINFRM_42"
+msgid ", Free V/A Buffers: %03d/%03d"
+msgstr ", Bufer V/A Bebas: %03d/%03d"
+
+msgctxt "IDS_AG_ERROR"
+msgid "Error"
+msgstr "Galat"
+
+msgctxt "IDS_SUBTITLE_STREAM_OFF"
+msgid "Subtitle: off"
+msgstr "Subtitel: mati"
+
+msgctxt "IDS_SUBTITLE_STREAM"
+msgid "Subtitle: %s"
+msgstr "Subtitel: %s"
+
+msgctxt "IDS_MAINFRM_46"
+msgid "Select the path for the DVD/BD:"
+msgstr "Pilih jalur untuk DVD/BD:"
+
+msgctxt "IDS_SUB_LOADED_SUCCESS"
+msgid " loaded successfully"
+msgstr " berhasil dimuat"
+
+msgctxt "IDS_ALL_FILES_FILTER"
+msgid "All files (*.*)|*.*||"
+msgstr "Semua berkas (*.*)|*.*||"
+
+msgctxt "IDS_GETDIB_FAILED"
+msgid "GetDIB failed, hr = %08x"
+msgstr "GetDIB gagal, hr = %08x"
+
+msgctxt "IDS_GETCURRENTIMAGE_FAILED"
+msgid "GetCurrentImage failed, hr = %08x"
+msgstr "GetCurrentImage gagal, hr = %08x"
+
+msgctxt "IDS_SCREENSHOT_ERROR"
+msgid "Cannot create file"
+msgstr "Tidak bisa membuat berkas"
+
+msgctxt "IDS_THUMBNAILS_NO_DURATION"
+msgid "Cannot create thumbnails for files with no duration"
+msgstr "Tidak bisa membuat gambar mini untuk berkas tanpa durasi"
+
+msgctxt "IDS_THUMBNAILS_NO_FRAME_SIZE"
+msgid "Failed to get video frame size"
+msgstr "Gagal mendapatkan ukuran frame video"
+
+msgctxt "IDS_OUT_OF_MEMORY"
+msgid "Out of memory, go buy some more!"
+msgstr "Memori tidak cukup!"
+
+msgctxt "IDS_THUMBNAILS_INVALID_FORMAT"
+msgid "Invalid image format, cannot create thumbnails out of %d bpp dibs."
+msgstr "Format gambar tidak valid, tidak bisa membuat gambar mini dari %d bpp dibs."
+
+msgctxt "IDS_THUMBNAILS_INFO_FILESIZE"
+msgid "File Size: %s (%s bytes)\\N"
+msgstr "Ukuran Berkas: %s (%s byte)\\N"
+
+msgctxt "IDS_THUMBNAILS_INFO_HEADER"
+msgid "{\\an7\\1c&H000000&\\fs16\\b0\\bord0\\shad0}File Name: %s\\N%sResolution: %dx%d %s\\NDuration: %02d:%02d:%02d"
+msgstr "{\\an7\\1c&H000000&\\fs16\\b0\\bord0\\shad0}Nama Berkas: %s\\N%sResolusi: %dx%d %s\\NDurasi: %02d:%02d:%02d"
+
+msgctxt "IDS_THUMBNAIL_TOO_SMALL"
+msgid "The thumbnails would be too small, impossible to create the file.\n\nTry lowering the number of thumbnails or increasing the total size."
+msgstr "Gambar mini akan menjadi terlalu kecil, tidak mungkin membuat berkas tersebut.\n\nCoba untuk mengurangi jumlah gambar mini atau menambah ukuran total."
+
+msgctxt "IDS_CANNOT_LOAD_SUB"
+msgid "To load subtitles you have to change the video renderer type and reopen the file.\n- DirectShow: VMR-7/VMR-9 (renderless), EVR (CP), Sync, madVR or Haali\n- RealMedia: Special renderer for RealMedia, or open it through DirectShow\n- QuickTime: DX7 or DX9 renderer for QuickTime\n- ShockWave: n/a"
+msgstr "Untuk memuat subtitel anda harus mengubah jenis perender video dan membuka ulang berkas.\n- DirectShow: VMR-7/VMR-9 (nirrender), EVR (CP), Sync, madVR atau Haali\n- RealMedia: Perender spesial untuk RealMedia, atau buka melalui DirectShow\n- QuickTime: Perender DX7 atau DX9 untuk QuickTime\n- ShockWave: t/a"
+
+msgctxt "IDS_SUBTITLE_FILES_FILTER"
+msgid "Subtitle files"
+msgstr "Berkas subtitel"
+
+msgctxt "IDS_MAINFRM_68"
+msgid "Aspect Ratio: %ld:%ld"
+msgstr "Nisbah Bidang: %ld:%ld"
+
+msgctxt "IDS_MAINFRM_69"
+msgid "Aspect Ratio: Default"
+msgstr "Nisbah Bidang: Bawaan"
+
+msgctxt "IDS_MAINFRM_70"
+msgid "Audio delay: %I64d ms"
+msgstr "Tundaan audio: %I64d ms"
+
+msgctxt "IDS_AG_CHAPTER"
+msgid "Chapter %d"
+msgstr "Bab %d"
+
+msgctxt "IDS_AG_OUT_OF_MEMORY"
+msgid "Out of memory"
+msgstr "Memori tidak cukup"
+
+msgctxt "IDS_MAINFRM_77"
+msgid "Error: Adobe Flash Player for Internet Explorer is required"
+msgstr "Galat: Membutuhkan Adobe Flash Player untuk Internet Explorer"
+
+msgctxt "IDS_MAINFRM_78"
+msgid "QuickTime not yet supported for X64 (apple library not available)"
+msgstr "QuickTime belum didukung untuk X64 (pustaka apple tidak tersedia)"
+
+msgctxt "IDS_MAINFRM_80"
+msgid "Failed to create the filter graph object"
+msgstr "Gagal membuat obyek grafik filter"
+
+msgctxt "IDS_MAINFRM_81"
+msgid "Invalid argument"
+msgstr "Argumen tidak valid"
+
+msgctxt "IDS_MAINFRM_82"
+msgid "Opening aborted"
+msgstr "Pembukaan dibatalkan"
+
+msgctxt "IDS_MAINFRM_83"
+msgid "Failed to render the file"
+msgstr "Gagal merender berkas"
+
+msgctxt "IDS_PPSDB_BADURL"
+msgid "Bad URL, could not locate subtitle database there!"
+msgstr "URL buruk, tidak bisa menemukan basis data subtitel!"
+
+msgctxt "IDS_AG_CHAPTER2"
+msgid "Chapter: "
+msgstr "Bab:"
+
+msgctxt "IDS_VOLUME_OSD"
+msgid "Vol: %d%%"
+msgstr "Vol: %d%%"
+
+msgctxt "IDS_BOOST_OSD"
+msgid "Boost: +%u%%"
+msgstr "Galak: +%u%%"
+
+msgctxt "IDS_BALANCE_OSD"
+msgid "Balance: %s"
+msgstr "Seimbang: %s"
+
+msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
+msgid "Current"
+msgstr "Saat Ini"
+
+msgctxt "IDS_MAINFRM_DIR_TITLE"
+msgid "Select Directory"
+msgstr "Pilih Direktori"
+
+msgctxt "IDS_MAINFRM_DIR_CHECK"
+msgid "Include subdirectories"
+msgstr "Termasuk subdirektori"
+
+msgctxt "IDS_AG_PAUSE"
+msgid "Pause"
+msgstr "Jeda"
+
+msgctxt "IDS_AG_TOGGLE_CAPTION"
+msgid "Toggle Caption&Menu"
+msgstr "Jungkit Takarir & Menu"
+
+msgctxt "IDS_AG_TOGGLE_SEEKER"
+msgid "Toggle Seek Bar"
+msgstr "Jungkit Bilah Jangkau"
+
+msgctxt "IDS_AG_TOGGLE_CONTROLS"
+msgid "Toggle Controls"
+msgstr "Jungkit Pengendali"
+
+msgctxt "IDS_MAINFRM_84"
+msgid "Invalid file name"
+msgstr "Nama berkas tidak valid"
+
+msgctxt "IDS_MAINFRM_86"
+msgid "Cannot connect the filters"
+msgstr "Tidak bisa menyambungkan filter"
+
+msgctxt "IDS_MAINFRM_87"
+msgid "Cannot load any source filter"
+msgstr "Tidak bisa memuat filter sumber apapun"
+
+msgctxt "IDS_MAINFRM_88"
+msgid "Cannot render the file"
+msgstr "Tidak bisa merender berkas"
+
+msgctxt "IDS_MAINFRM_89"
+msgid "Invalid file format"
+msgstr "Format berkas tidak valid"
+
+msgctxt "IDS_MAINFRM_90"
+msgid "File not found"
+msgstr "Berkas tidak ditemukan"
+
+msgctxt "IDS_MAINFRM_91"
+msgid "Unknown file type"
+msgstr "Jenis berkas tidak dikenal"
+
+msgctxt "IDS_MAINFRM_92"
+msgid "Unsupported stream"
+msgstr "Strim tidak didukung"
+
+msgctxt "IDS_MAINFRM_93"
+msgid "Cannot find DVD directory"
+msgstr "Tidak bisa menemukan direktori DVD"
+
+msgctxt "IDS_MAINFRM_94"
+msgid "Can't create the DVD Navigator filter"
+msgstr "Tidak bisa membuat filter Navigator DVD"
+
+msgctxt "IDS_AG_FAILED"
+msgid "Failed"
+msgstr "Gagal"
+
+msgctxt "IDS_MAINFRM_96"
+msgid "Can't create video capture filter"
+msgstr "Tidak bisa membuat filter tangkapan video"
+
+msgctxt "IDS_MAINFRM_98"
+msgid "No capture filters"
+msgstr "Tidak ada filter tangkapan"
+
+msgctxt "IDS_MAINFRM_99"
+msgid "Can't create capture graph builder object"
+msgstr "Tidak bisa membuat obyek pembangun grafik tangkapan"
+
+msgctxt "IDS_MAINFRM_108"
+msgid "Couldn't open any device"
+msgstr "Tidak bisa membuka perangkat apapun"
+
+msgctxt "IDS_AG_SOUND"
+msgid "Sound"
+msgstr "Suara"
+
+msgctxt "IDS_MAINFRM_114"
+msgid "%s was not found, please insert media containing this file."
+msgstr "%s tidak ditemukan, mohon masukka media yang memuat berkas ini."
+
+msgctxt "IDS_AG_ABORTED"
+msgid "Aborted"
+msgstr "Dibatalkan"
+
+msgctxt "IDS_MAINFRM_116"
+msgid "&Properties..."
+msgstr "&Properti..."
+
+msgctxt "IDS_MAINFRM_117"
+msgid " (pin) properties..."
+msgstr " (pin) properti..."
+
+msgctxt "IDS_AG_UNKNOWN_STREAM"
+msgid "Unknown Stream"
+msgstr "Strim Tidak Dikenal"
+
+msgctxt "IDS_AG_UNKNOWN"
+msgid "Unknown %u"
+msgstr "%u Tidak Dikenal"
+
+msgctxt "IDS_AG_VSYNC"
+msgid "VSync"
+msgstr "VSync"
+
+msgctxt "IDS_MAINFRM_121"
+msgid " (Director Comments 1)"
+msgstr " (Komentar Director 1)"
+
+msgctxt "IDS_MAINFRM_122"
+msgid " (Director Comments 2)"
+msgstr " (Komentar Director 2)"
+
+msgctxt "IDS_DVD_SUBTITLES_ENABLE"
+msgid "Enable DVD subtitles"
+msgstr "Fungsikan subtitel DVD"
+
+msgctxt "IDS_AG_ANGLE"
+msgid "Angle %u"
+msgstr "Sudut %u"
+
+msgctxt "IDS_AG_VSYNCOFFSET_INCREASE"
+msgid "Increase VSync Offset"
+msgstr "Naikkan Ofset VSync"
+
+msgctxt "IDS_AG_DISABLED"
+msgid "Disabled"
+msgstr "Nonfungsi"
+
+msgctxt "IDS_AG_VSYNCOFFSET_DECREASE"
+msgid "Decrease VSync Offset"
+msgstr "Turunkan Ofset VSync"
+
+msgctxt "IDS_MAINFRM_136"
+msgid "MPC-HC D3D Fullscreen"
+msgstr "Layar Penuh D3D MPC-HC"
+
+msgctxt "IDS_MAINFRM_137"
+msgid "Unknown format"
+msgstr "Format tidak dikenal"
+
+msgctxt "IDS_MAINFRM_138"
+msgid "Sub shift: %ld ms"
+msgstr "Geser sub: %ld ms"
+
+msgctxt "IDS_VOLUME_BOOST_INC"
+msgid "Volume boost increase"
+msgstr "Penggalak volume dinaikkan"
+
+msgctxt "IDS_VOLUME_BOOST_DEC"
+msgid "Volume boost decrease"
+msgstr "Penggalak volume diturunkan"
+
+msgctxt "IDS_VOLUME_BOOST_MIN"
+msgid "Volume boost Min"
+msgstr "Penggalak volume Min"
+
+msgctxt "IDS_VOLUME_BOOST_MAX"
+msgid "Volume boost Max"
+msgstr "Penggalak volume Maks"
+
+msgctxt "IDS_USAGE"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Penggunaan: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tBerkas atau direktori utama yang akan dimuat (wildcard\n\t\tdiperbolehkan, \"-\" menandakan masukan standar)\n/dub \"dubname\"\tMuat berkas audio tambahan\n/dubdelay \"file\"\tMuat berkas audio tambahan dengan tundaan XXms (jika\n\t\tberkas mengandung \"...DELAY XXms...\")\n/d3dfs\t\tMulai merender dalam mode layar penuh D3D\n/sub \"subname\"\tMuat berkas subtitel tambahan\n/filter \"filtername\"\tMuat filter DirectShow dari pustaka tautan\n\t\tdinamis (wildcard diperbolehkan)\n/dvd\t\tBerjalan dalam mode dvd, \"pathname\" berarti folder\n\t\tdvd (opsional)\n/dvdpos T#C\tMulai pemutaran pada judul T, babak C\n/dvdpos T#hh:mm\tMulai pemutaran pada judul T, posisi hh:mm:ss\n/cd\t\tMuat semua trek cd audio atau (s)vcd,\n\t\t\"pathname\" berarti jalur penggerak (opsional)\n/device\t\tBuka perangkat video bawaan\n/open\t\tBuka berkas, jangan otomatis memulai pemutaran\n/play\t\tMulai memutar berkas segera setelah pemutar\n\t\tdiluncurkan\n/close\t\tTutup pemutar setelah pemutaran (hanya bekerja saat\n\t\tdigunakan dengan /play)\n/shutdown\tMatikan sistem operasi setelah pemutaran\n/standby\t\tSistem operasi dalam mode standby mode setelah pemutaran\n/hibernate\tHibernasi sistem operasi setelah pemutaran\n/logoff\t\tKeluar setelah pemutaran\n/lock\t\tKunci setelah pemutaran\n/monitoroff\tMatikan monitor setelah pemutaran\n/playnext\t\tBuka berkas berikutnya dalam folder setelah pemutaran\n/fullscreen\tMulai dalam mode layar penuh\n/minimized\tMulai dalam mode diminimalkan\n/new\t\tGunakan pemutar baru\n/add\t\tTambahkan \"pathname\" ke daftar putar, bisa dikombinasikan\n\t\tdengan /open dan /play\n/randomize\tAcak daftar putar\n/regvid\t\tTerapkan asosiasi berkas untuk berkas video\n/regaud\t\tTerapkan asosiasi berkas untuk berkas audio\n/regpl\t\tTerapkan asosiasi berkas untuk berkas daftar putar\n/regall\t\tTerapkan asosiasi berkas untuk semua berkas yang didukung\n/unregall\t\tBuang semua asosiasi berkas\n/start ms\t\tMulai memutar pada \"ms\" (= milidetik)\n/startpos hh:mm:ss\tMulai memutar pada posisi hh:mm:ss\n/fixedsize w,h\tTetapkan ukuran tetap jendela\n/monitor N\tJalankan pemutar pada monitor N, dan N dimulai dari 1\n/audiorenderer N\tJalankan dengan perender audio N, dan N dimulai dari 1\n\t\t(lihat pengaturan \"Keluaran\")\n/shaderpreset \"Pr\"\tJalankan menggunakan prasetel shader \"Pr\"\n/pns \"name\"\tTetapkan nama prasetel Pan&Scan untuk digunakan\n/iconsassoc\tAsosiasi ulang format ikon\n/nofocus\t\tBuka MPC-HC di latar belakang\n/webport N\tJalankan antarmuka web pada port yang ditetapkan\n/debug\t\tTampilkan informasi awakutu di OSD\n/nocrashreporter\tNonfungsikan pelapor tumbukan\n/slave \"hWnd\"\tGunakan MPC-HC sebagai slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tKembalikan ke pengaturan bawaan\n/help /h /?\tTampilkan bantuan tentang parameter perintah baris\n"
+
+msgctxt "IDS_UNKNOWN_SWITCH"
+msgid "Unrecognized switch(es) found in command line string: \n\n"
+msgstr "Alihan tidak dikenal ditemukan dalam untaian perintah baris:\n\n"
+
+msgctxt "IDS_AG_TOGGLE_INFO"
+msgid "Toggle Information"
+msgstr "Jungkit Informasi"
+
+msgctxt "IDS_AG_TOGGLE_STATS"
+msgid "Toggle Statistics"
+msgstr "Jungkit Statistik"
+
+msgctxt "IDS_AG_TOGGLE_STATUS"
+msgid "Toggle Status"
+msgstr "Jungkit Status"
+
+msgctxt "IDS_AG_TOGGLE_SUBRESYNC"
+msgid "Toggle Subresync Bar"
+msgstr "Jungkit Bilah Subresync"
+
+msgctxt "IDS_AG_TOGGLE_PLAYLIST"
+msgid "Toggle Playlist Bar"
+msgstr "Jungkit Bilah Daftar Putar"
+
+msgctxt "IDS_AG_TOGGLE_CAPTURE"
+msgid "Toggle Capture Bar"
+msgstr "Jungkit Bilah Tangkapan"
+
+msgctxt "IDS_AG_TOGGLE_DEBUGSHADERS"
+msgid "Toggle Debug Shaders"
+msgstr "Jungkit Shader Awakutu"
+
+msgctxt "IDS_AG_ZOOM_50"
+msgid "Zoom 50%"
+msgstr "Zum 50%"
+
+msgctxt "IDS_AG_ZOOM_100"
+msgid "Zoom 100%"
+msgstr "Zum 100%"
+
+msgctxt "IDS_AG_ZOOM_200"
+msgid "Zoom 200%"
+msgstr "Zum 200%"
+
+msgctxt "IDS_AG_NEXT_AR_PRESET"
+msgid "Next AR Preset"
+msgstr "Prasetel AR Selanjutnya"
+
+msgctxt "IDS_AG_VIDFRM_STRETCH"
+msgid "VidFrm Stretch"
+msgstr "VidFrm Regang"
+
+msgctxt "IDS_AG_VIDFRM_INSIDE"
+msgid "VidFrm Inside"
+msgstr "VidFrm Dalam"
+
+msgctxt "IDS_AG_VIDFRM_OUTSIDE"
+msgid "VidFrm Outside"
+msgstr "VidFrm Luar"
+
+msgctxt "IDS_AG_PNS_RESET"
+msgid "PnS Reset"
+msgstr "PnS Setel Ulang"
+
+msgctxt "IDS_AG_PNS_ROTATEX_P"
+msgid "PnS Rotate X+"
+msgstr "PnS Putar X+"
+
+msgctxt "IDS_AG_VIDFRM_ZOOM1"
+msgid "VidFrm Zoom 1"
+msgstr "VidFrm Zum 1"
+
+msgctxt "IDS_AG_VIDFRM_ZOOM2"
+msgid "VidFrm Zoom 2"
+msgstr "VidFrm Zum 2"
+
+msgctxt "IDS_AG_VIDFRM_SWITCHZOOM"
+msgid "VidFrm Switch Zoom"
+msgstr "VidFrm Zum Alihan"
+
+msgctxt "IDS_ENABLE_ALL_FILTERS"
+msgid "&Enable all filters"
+msgstr "&Fungsikan semua filter"
+
+msgctxt "IDS_NAVIGATE_TUNERSCAN"
+msgid "Tuner scan"
+msgstr "Pindaian pelaras"
+
+msgctxt "IDS_SUBTITLES_ERROR"
+msgid "Subtitles are not loaded or unsupported renderer."
+msgstr "Subtitel tidak dimuat atau perender tidak didukung."
+
+msgctxt "IDS_LOGO_AUTHOR"
+msgid "Author unknown. Contact us if you made this logo!"
+msgstr "Pengembang tidak dikenal. Hubungi kami jika anda membuat logo ini!"
+
+msgctxt "IDS_NO_MORE_MEDIA"
+msgid "No more media in the current folder."
+msgstr "Tidak ada media tersisa di dalam folder saat ini."
+
+msgctxt "IDS_FIRST_IN_FOLDER"
+msgid "The first file of the folder is already loaded."
+msgstr "Berkas pertama dalam folder sudah dimuat."
+
+msgctxt "IDS_LAST_IN_FOLDER"
+msgid "The last file of the folder is already loaded."
+msgstr "Berkas terakhir dalam folder sudah dimuat."
+
+msgctxt "IDS_FRONT_LEFT"
+msgid "Front Left"
+msgstr "Depan Kiri"
+
+msgctxt "IDS_FRONT_RIGHT"
+msgid "Front Right"
+msgstr "Depan Kanan"
+
+msgctxt "IDS_FRONT_CENTER"
+msgid "Front Center"
+msgstr "Depan Tengah"
+
+msgctxt "IDS_LOW_FREQUENCY"
+msgid "Low Frequency"
+msgstr "Frekuensi Rendah"
+
+msgctxt "IDS_BACK_LEFT"
+msgid "Back Left"
+msgstr "Belakang Kiri"
+
+msgctxt "IDS_BACK_RIGHT"
+msgid "Back Right"
+msgstr "Belakang Kanan"
+
+msgctxt "IDS_FRONT_LEFT_OF_CENTER"
+msgid "Front Left of Center"
+msgstr "Depan Kiri dari Tengah"
+
+msgctxt "IDS_FRONT_RIGHT_OF_CENTER"
+msgid "Front Right of Center"
+msgstr "Depan Kanan dari Tengah"
+
+msgctxt "IDS_BACK_CENTER"
+msgid "Back Center"
+msgstr "Belakang Tengah"
+
+msgctxt "IDS_SIDE_LEFT"
+msgid "Side Left"
+msgstr "Sisi Kiri"
+
+msgctxt "IDS_SIDE_RIGHT"
+msgid "Side Right"
+msgstr "Sisi Kanan"
+
+msgctxt "IDS_TOP_CENTER"
+msgid "Top Center"
+msgstr "Atas Tengah"
+
+msgctxt "IDS_TOP_FRONT_LEFT"
+msgid "Top Front Left"
+msgstr "Atas Depan Kiri"
+
+msgctxt "IDS_TOP_FRONT_CENTER"
+msgid "Top Front Center"
+msgstr "Atas Depan Tengah"
+
+msgctxt "IDS_TOP_FRONT_RIGHT"
+msgid "Top Front Right"
+msgstr "Atas Depan Kanan"
+
+msgctxt "IDS_TOP_BACK_LEFT"
+msgid "Top Back Left"
+msgstr "Atas Belakang Kiri"
+
+msgctxt "IDS_TOP_BACK_CENTER"
+msgid "Top Back Center"
+msgstr "Atas Belakang Tengah"
+
+msgctxt "IDS_TOP_BACK_RIGHT"
+msgid "Top Back Right"
+msgstr "Atas Belakang Kanan"
+
+msgctxt "IDS_TIME_TOOLTIP_ABOVE"
+msgid "Above seek bar"
+msgstr "Di atas bilah jangkau"
+
+msgctxt "IDS_TIME_TOOLTIP_BELOW"
+msgid "Below seek bar"
+msgstr "Di bawah bilah jangkau"
+
+msgctxt "IDS_VIDEO_STREAM"
+msgid "Video: %s"
+msgstr "Video: %s"
+
+msgctxt "IDS_APPLY"
+msgid "Apply"
+msgstr "Terapkan"
+
+msgctxt "IDS_CLEAR"
+msgid "Clear"
+msgstr "Bersihkan"
+
+msgctxt "IDS_CANCEL"
+msgid "Cancel"
+msgstr "Batal"
+
+msgctxt "IDS_THUMB_THUMBNAILS"
+msgid "Layout"
+msgstr "Tata Letak"
+
+msgctxt "IDS_THUMB_PIXELS"
+msgid "Pixels:"
+msgstr "Piksel:"
+
+msgctxt "IDS_TEXTFILE_ENC"
+msgid "Encoding:"
+msgstr "Pengenkodean:"
+
+msgctxt "IDS_DISABLE_ALL_FILTERS"
+msgid "&Disable all filters"
+msgstr "&Nonfungsikan semua filter"
+
+msgctxt "IDS_ENABLE_AUDIO_FILTERS"
+msgid "Enable all audio decoders"
+msgstr "Fungsikan semua dekoder audio"
+
+msgctxt "IDS_DISABLE_AUDIO_FILTERS"
+msgid "Disable all audio decoders"
+msgstr "Nonfungsikan semua dekoder audio"
+
+msgctxt "IDS_ENABLE_VIDEO_FILTERS"
+msgid "Enable all video decoders"
+msgstr "Fungsikan semua dekoder video"
+
+msgctxt "IDS_DISABLE_VIDEO_FILTERS"
+msgid "Disable all video decoders"
+msgstr "Nonfungsikan semua dekoder video"
+
+msgctxt "IDS_STRETCH_TO_WINDOW"
+msgid "Stretch To Window"
+msgstr "Lebarkan ke Jendela"
+
+msgctxt "IDS_TOUCH_WINDOW_FROM_INSIDE"
+msgid "Touch Window From Inside"
+msgstr "Sentuh Jendela Dari Dalam"
+
+msgctxt "IDS_ZOOM1"
+msgid "Zoom 1"
+msgstr "Zum 1"
+
+msgctxt "IDS_ZOOM2"
+msgid "Zoom 2"
+msgstr "Zum 2"
+
+msgctxt "IDS_TOUCH_WINDOW_FROM_OUTSIDE"
+msgid "Touch Window From Outside"
+msgstr "Sentuh Jendela Dari Luar"
+
+msgctxt "IDS_AUDIO_STREAM"
+msgid "Audio: %s"
+msgstr "Audio: %s"
+
+msgctxt "IDS_AG_REOPEN"
+msgid "Reopen File"
+msgstr "Buka Ulang Berkas"
+
+msgctxt "IDS_MFMT_AVI"
+msgid "AVI"
+msgstr "AVI"
+
+msgctxt "IDS_MFMT_MPEG"
+msgid "MPEG"
+msgstr "MPEG"
+
+msgctxt "IDS_MFMT_MPEGTS"
+msgid "MPEG-TS"
+msgstr "MPEG-TS"
+
+msgctxt "IDS_MFMT_DVDVIDEO"
+msgid "DVD-Video"
+msgstr "DVD-Video"
+
+msgctxt "IDS_MFMT_MKV"
+msgid "Matroska"
+msgstr "Matroska"
+
+msgctxt "IDS_MFMT_WEBM"
+msgid "WebM"
+msgstr "WebM"
+
+msgctxt "IDS_MFMT_MP4"
+msgid "MP4"
+msgstr "MP4"
+
+msgctxt "IDS_MFMT_MOV"
+msgid "QuickTime Movie"
+msgstr "QuickTime"
+
+msgctxt "IDS_MFMT_3GP"
+msgid "3GP"
+msgstr "3GP"
+
+msgctxt "IDS_MFMT_3G2"
+msgid "3G2"
+msgstr "3G2"
+
+msgctxt "IDS_MFMT_FLV"
+msgid "Flash Video"
+msgstr "Flash Video"
+
+msgctxt "IDS_MFMT_OGM"
+msgid "Ogg Media"
+msgstr "Ogg Media"
+
+msgctxt "IDS_MFMT_RM"
+msgid "Real Media"
+msgstr "Real Media"
+
+msgctxt "IDS_MFMT_RT"
+msgid "Real Script"
+msgstr "Real Script"
+
+msgctxt "IDS_MFMT_WMV"
+msgid "Windows Media Video"
+msgstr "Windows Media Video"
+
+msgctxt "IDS_MFMT_BINK"
+msgid "Smacker/Bink Video"
+msgstr "Video Smacker/Bink"
+
+msgctxt "IDS_MFMT_FLIC"
+msgid "FLIC Animation"
+msgstr "Animasi FLIC"
+
+msgctxt "IDS_MFMT_DSM"
+msgid "DirectShow Media"
+msgstr "DirectShow Media"
+
+msgctxt "IDS_MFMT_IVF"
+msgid "Indeo Video Format"
+msgstr "Indeo Video Format"
+
+msgctxt "IDS_MFMT_OTHER"
+msgid "Other"
+msgstr "Lainnya"
+
+msgctxt "IDS_MFMT_SWF"
+msgid "Shockwave Flash"
+msgstr "Shockwave Flash"
+
+msgctxt "IDS_MFMT_OTHER_AUDIO"
+msgid "Other Audio"
+msgstr "Audio Lainnya"
+
+msgctxt "IDS_MFMT_AC3"
+msgid "AC-3"
+msgstr "AC-3"
+
+msgctxt "IDS_MFMT_AIFF"
+msgid "AIFF"
+msgstr "AIFF"
+
+msgctxt "IDS_MFMT_ALAC"
+msgid "Apple Lossless"
+msgstr "Apple Lossless"
+
+msgctxt "IDS_MFMT_WAV"
+msgid "WAV"
+msgstr "WAV"
+
+msgctxt "IDS_MFMT_WMA"
+msgid "Windows Media Audio"
+msgstr "Windows Media Audio"
+
+msgctxt "IDS_MFMT_WV"
+msgid "WavPack"
+msgstr "WavPack"
+
+msgctxt "IDS_MFMT_OPUS"
+msgid "Opus Audio Codec"
+msgstr "Opus Audio Codec"
+
+msgctxt "IDS_MFMT_DTS"
+msgid "DTS/DTS-HD"
+msgstr "DTS/DTS-HD"
+
+msgctxt "IDS_MFMT_AMR"
+msgid "AMR"
+msgstr "AMR"
+
+msgctxt "IDS_MFMT_APE"
+msgid "Monkey's Audio"
+msgstr "Monkey's Audio"
+
+msgctxt "IDS_MFMT_AU"
+msgid "AU/SND"
+msgstr "AU/SND"
+
+msgctxt "IDS_MFMT_CDA"
+msgid "Audio CD track"
+msgstr "Trek CD Audio"
+
+msgctxt "IDS_MFMT_FLAC"
+msgid "FLAC"
+msgstr "FLAC"
+
+msgctxt "IDS_MFMT_M4A"
+msgid "MPEG-4 Audio"
+msgstr "MPEG-4 Audio"
+
+msgctxt "IDS_MFMT_MIDI"
+msgid "MIDI"
+msgstr "MIDI"
+
+msgctxt "IDS_MFMT_MKA"
+msgid "Matroska audio"
+msgstr "Matroska audio"
+
+msgctxt "IDS_MFMT_MP3"
+msgid "MP3"
+msgstr "MP3"
+
+msgctxt "IDS_MFMT_MPA"
+msgid "MPEG audio"
+msgstr "MPEG audio"
+
+msgctxt "IDS_MFMT_MPC"
+msgid "Musepack"
+msgstr "Musepack"
+
+msgctxt "IDS_MFMT_OFR"
+msgid "OptimFROG"
+msgstr "OptimFROG"
+
+msgctxt "IDS_MFMT_OGG"
+msgid "Ogg Vorbis"
+msgstr "Ogg Vorbis"
+
+msgctxt "IDS_MFMT_RA"
+msgid "Real Audio"
+msgstr "Real Audio"
+
+msgctxt "IDS_MFMT_TAK"
+msgid "TAK"
+msgstr "TAK"
+
+msgctxt "IDS_MFMT_TTA"
+msgid "True Audio"
+msgstr "True Audio"
+
+msgctxt "IDS_MFMT_PLS"
+msgid "Playlist"
+msgstr "Daftar Putar"
+
+msgctxt "IDS_MFMT_BDPLS"
+msgid "Blu-ray playlist"
+msgstr "Daftar putar blu-ray"
+
+msgctxt "IDS_MFMT_RAR"
+msgid "RAR Archive"
+msgstr "Arsip RAR"
+
+msgctxt "IDS_DVB_CHANNEL_FPS"
+msgid "FPS"
+msgstr "FPS"
+
+msgctxt "IDS_DVB_CHANNEL_RESOLUTION"
+msgid "Resolution"
+msgstr "Resolusi"
+
+msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
+msgid "Aspect Ratio"
+msgstr "Nisbah Bidang"
+
+msgctxt "IDS_OSD_RS_VSYNC_ON"
+msgid "VSync: On"
+msgstr "VSync: Nyala"
+
+msgctxt "IDS_OSD_RS_VSYNC_OFF"
+msgid "VSync: Off"
+msgstr "VSync: Mati"
+
+msgctxt "IDS_OSD_RS_ACCURATE_VSYNC_ON"
+msgid "Accurate VSync: On"
+msgstr "VSync Akurat: Nyala"
+
+msgctxt "IDS_OSD_RS_ACCURATE_VSYNC_OFF"
+msgid "Accurate VSync: Off"
+msgstr "VSync Akurat: Mati"
+
+msgctxt "IDS_OSD_RS_SYNC_TO_DISPLAY_ON"
+msgid "Synchronize Video to Display: On"
+msgstr "Selaraskan Video ke Tampilan: Nyala"
+
+msgctxt "IDS_OSD_RS_SYNC_TO_DISPLAY_OFF"
+msgid "Synchronize Video to Display: Off"
+msgstr "Selaraskan Video ke Tampilan: Mati"
+
+msgctxt "IDS_OSD_RS_SYNC_TO_VIDEO_ON"
+msgid "Synchronize Display to Video: On"
+msgstr "Selaraskan Tampilan ke Video: Nyala"
+
+msgctxt "IDS_OSD_RS_SYNC_TO_VIDEO_OFF"
+msgid "Synchronize Display to Video: Off"
+msgstr "Selaraskan Tampilan ke Video: Mati"
+
+msgctxt "IDS_OSD_RS_PRESENT_NEAREST_ON"
+msgid "Present at Nearest VSync: On"
+msgstr "Sajikan pada VSync Terdekat: Nyala"
+
+msgctxt "IDS_OSD_RS_PRESENT_NEAREST_OFF"
+msgid "Present at Nearest VSync: Off"
+msgstr "Sajikan pada VSync Terdekat: Mati"
+
+msgctxt "IDS_OSD_RS_COLOR_MANAGEMENT_ON"
+msgid "Color Management: On"
+msgstr "Pengelolaan Warna: Nyala"
+
+msgctxt "IDS_OSD_RS_COLOR_MANAGEMENT_OFF"
+msgid "Color Management: Off"
+msgstr "Pengelolaan Warna: Mati"
+
+msgctxt "IDS_OSD_RS_INPUT_TYPE_AUTO"
+msgid "Input Type: Auto-Detect"
+msgstr "Jenis Masukan: Oto-Deteksi"
+
+msgctxt "IDS_OSD_RS_INPUT_TYPE_HDTV"
+msgid "Input Type: HDTV"
+msgstr "Jenis Masukan: HDTV"
+
+msgctxt "IDS_OSD_RS_INPUT_TYPE_SD_NTSC"
+msgid "Input Type: SDTV NTSC"
+msgstr "Jenis Masukan: SDTV NTSC"
+
+msgctxt "IDS_OSD_RS_INPUT_TYPE_SD_PAL"
+msgid "Input Type: SDTV PAL"
+msgstr "Jenis Masukan: SDTV PAL"
+
+msgctxt "IDS_OSD_RS_AMBIENT_LIGHT_BRIGHT"
+msgid "Ambient Light: Bright (2.2 Gamma)"
+msgstr "Cahaya Ambien: Terang (2.2 Gamma)"
+
+msgctxt "IDS_OSD_RS_AMBIENT_LIGHT_DIM"
+msgid "Ambient Light: Dim (2.35 Gamma)"
+msgstr "Cahaya Ambien: Redup (2.35 Gamma)"
+
+msgctxt "IDS_OSD_RS_AMBIENT_LIGHT_DARK"
+msgid "Ambient Light: Dark (2.4 Gamma)"
+msgstr "Cahaya Ambien: Gelap (2.4 Gamma)"
+
+msgctxt "IDS_OSD_RS_REND_INTENT_PERCEPT"
+msgid "Rendering Intent: Perceptual"
+msgstr "Minat Perenderan: Perseptual"
+
+msgctxt "IDS_OSD_RS_REND_INTENT_RELATIVE"
+msgid "Rendering Intent: Relative Colorimetric"
+msgstr "Minat Perenderan: MetrikWarna Relatif"
+
+msgctxt "IDS_OSD_RS_REND_INTENT_SATUR"
+msgid "Rendering Intent: Saturation"
+msgstr "Minat Perenderan: Kejenuhan"
+
+msgctxt "IDS_OSD_RS_REND_INTENT_ABSOLUTE"
+msgid "Rendering Intent: Absolute Colorimetric"
+msgstr "Minat Perenderan: MetrikWarna Absolut"
+
+msgctxt "IDS_OSD_RS_OUTPUT_RANGE"
+msgid "Output Range: %s"
+msgstr "Rentang Keluaran: %s"
+
+msgctxt "IDS_OSD_RS_FLUSH_BEF_VSYNC_ON"
+msgid "Flush GPU before VSync: On"
+msgstr "Bilas GPU sebelum VSync: Nyala"
+
+msgctxt "IDS_OSD_RS_FLUSH_BEF_VSYNC_OFF"
+msgid "Flush GPU before VSync: Off"
+msgstr "Bilas GPU sebelum VSync: Mati"
+
+msgctxt "IDS_OSD_RS_FLUSH_AFT_PRES_ON"
+msgid "Flush GPU after Present: On"
+msgstr "Bilas GPU setelah Present: Nyala"
+
+msgctxt "IDS_OSD_RS_FLUSH_AFT_PRES_OFF"
+msgid "Flush GPU after Present: Off"
+msgstr "Bilas GPU setelah Present: Mati"
+
+msgctxt "IDS_OSD_RS_WAIT_ON"
+msgid "Wait for GPU Flush: On"
+msgstr "Menunggu Bilas GPU: Nyala"
+
+msgctxt "IDS_OSD_RS_WAIT_OFF"
+msgid "Wait for GPU Flush: Off"
+msgstr "Menunggu Bilas GPU: Mati"
+
+msgctxt "IDS_OSD_RS_D3D_FULLSCREEN_ON"
+msgid "D3D Fullscreen: On"
+msgstr "Layar Penuh D3D: Nyala"
+
+msgctxt "IDS_OSD_RS_D3D_FULLSCREEN_OFF"
+msgid "D3D Fullscreen: Off"
+msgstr "Layar Penuh D3D: Mati"
+
+msgctxt "IDS_OSD_RS_NO_DESKTOP_COMP_ON"
+msgid "Disable desktop composition: On"
+msgstr "Nonfungsikan komposisi destop: Nyala"
+
+msgctxt "IDS_OSD_RS_NO_DESKTOP_COMP_OFF"
+msgid "Disable desktop composition: Off"
+msgstr "Nonfungsikan komposisi destop: Mati"
+
+msgctxt "IDS_OSD_RS_ALT_VSYNC_ON"
+msgid "Alternative VSync: On"
+msgstr "VSync Alternatif: Nyala"
+
+msgctxt "IDS_OSD_RS_ALT_VSYNC_OFF"
+msgid "Alternative VSync: Off"
+msgstr "VSync Alternatif: Mati"
+
+msgctxt "IDS_OSD_RS_RESET_DEFAULT"
+msgid "Renderer settings reset to default"
+msgstr "Pengaturan perender disetel ulang ke bawaan"
+
+msgctxt "IDS_OSD_RS_RESET_OPTIMAL"
+msgid "Renderer settings reset to optimal"
+msgstr "Pengaturan perender disetel ulang ke optimal"
+
+msgctxt "IDS_OSD_RS_D3D_FS_GUI_SUPP_ON"
+msgid "D3D Fullscreen GUI Support: On"
+msgstr "Dukungan GUI Layar Penuh D3D: Nyala"
+
+msgctxt "IDS_OSD_RS_D3D_FS_GUI_SUPP_OFF"
+msgid "D3D Fullscreen GUI Support: Off"
+msgstr "Dukungan GUI Layar Penuh D3D: Mati"
+
+msgctxt "IDS_OSD_RS_10BIT_RBG_OUT_ON"
+msgid "10-bit RGB Output: On"
+msgstr "Keluaran 10-bit RGB: Nyala"
+
+msgctxt "IDS_OSD_RS_10BIT_RBG_OUT_OFF"
+msgid "10-bit RGB Output: Off"
+msgstr "Keluaran 10-bit RGB: Mati"
+
+msgctxt "IDS_OSD_RS_10BIT_RBG_IN_ON"
+msgid "Force 10-bit RGB Input: On"
+msgstr "Paksa Masukkan 10-bit RGB: Nyala"
+
+msgctxt "IDS_OSD_RS_10BIT_RBG_IN_OFF"
+msgid "Force 10-bit RGB Input: Off"
+msgstr "Paksa Masukkan 10-bit RGB: Mati"
+
+msgctxt "IDS_OSD_RS_FULL_FP_PROCESS_ON"
+msgid "Full Floating Point Processing: On"
+msgstr "Pemrosesan Full Floating Point: Nyala"
+
+msgctxt "IDS_OSD_RS_FULL_FP_PROCESS_OFF"
+msgid "Full Floating Point Processing: Off"
+msgstr "Pemrosesan Full Floating Point: Mati"
+
+msgctxt "IDS_OSD_RS_HALF_FP_PROCESS_ON"
+msgid "Half Floating Point Processing: On"
+msgstr "Pemrosesan Half Floating Point: Nyala"
+
+msgctxt "IDS_OSD_RS_HALF_FP_PROCESS_OFF"
+msgid "Half Floating Point Processing: Off"
+msgstr "Pemrosesan Half Floating Point: Mati"
+
+msgctxt "IDS_BRIGHTNESS_DEC"
+msgid "Brightness decrease"
+msgstr "Kecerahan turun"
+
+msgctxt "IDS_CONTRAST_INC"
+msgid "Contrast increase"
+msgstr "Kontras naik"
+
+msgctxt "IDS_CONTRAST_DEC"
+msgid "Contrast decrease"
+msgstr "Kontras turun"
+
+msgctxt "IDS_HUE_INC"
+msgid "Hue increase"
+msgstr "Rona naik"
+
+msgctxt "IDS_HUE_DEC"
+msgid "Hue decrease"
+msgstr "Rona turun"
+
+msgctxt "IDS_SATURATION_INC"
+msgid "Saturation increase"
+msgstr "Kejenuhan naik"
+
+msgctxt "IDS_SATURATION_DEC"
+msgid "Saturation decrease"
+msgstr "Kejenuhan turun"
+
+msgctxt "IDS_RESET_COLOR"
+msgid "Reset color settings"
+msgstr "Setel ulang pengaturan warna"
+
+msgctxt "IDS_USING_LATEST_STABLE"
+msgid "\nYou are already using the latest stable version."
+msgstr "\nAnda sudah menggunakan versi stabil terbaru."
+
+msgctxt "IDS_USING_NEWER_VERSION"
+msgid "Your current version is v%s.\n\nThe latest stable version is v%s."
+msgstr "Versi anda saat ini adalah v%s.\n\nVersi stabil terakhir adalah v%s."
+
+msgctxt "IDS_NEW_UPDATE_AVAILABLE"
+msgid "MPC-HC v%s is now available. You are using v%s.\n\nDo you want to visit MPC-HC's website to download it?"
+msgstr "MPC-HC v%s tersedia. Anda menggunakan v%s.\n\nApakah anda ingin mengunjungi situs web MPC-HC untuk mengunduhnya?"
+
+msgctxt "IDS_UPDATE_ERROR"
+msgid "Update server not found.\n\nPlease check your internet connection or try again later."
+msgstr "Server pemutakhiran tidak ditemukan.\n\nMohon periksa sambungan internet anda atau coba lagi nanti."
+
+msgctxt "IDS_UPDATE_CLOSE"
+msgid "&Close"
+msgstr "&Tutup"
+
+msgctxt "IDS_OSD_ZOOM"
+msgid "Zoom: %.0lf%%"
+msgstr "Zum: %.0lf%%"
+
+msgctxt "IDS_OSD_ZOOM_AUTO"
+msgid "Zoom: Auto"
+msgstr "Zum: Auto"
+
+msgctxt "IDS_CUSTOM_CHANNEL_MAPPING"
+msgid "Toggle custom channel mapping"
+msgstr "Jungkit pemetaan saluran khusus"
+
+msgctxt "IDS_OSD_CUSTOM_CH_MAPPING_ON"
+msgid "Custom channel mapping: On"
+msgstr "Pemetaan saluran khusus: Nyala"
+
+msgctxt "IDS_OSD_CUSTOM_CH_MAPPING_OFF"
+msgid "Custom channel mapping: Off"
+msgstr "Pemetaan saluran khusus: Mati"
+
+msgctxt "IDS_NORMALIZE"
+msgid "Toggle normalization"
+msgstr "Jungkit normalisasi"
+
+msgctxt "IDS_OSD_NORMALIZE_ON"
+msgid "Normalization: On"
+msgstr "Normalisasi: Nyala"
+
+msgctxt "IDS_OSD_NORMALIZE_OFF"
+msgid "Normalization: Off"
+msgstr "Normalisasi: Mati"
+
+msgctxt "IDS_REGAIN_VOLUME"
+msgid "Toggle regain volume"
+msgstr "Jungkit pengerasan volume"
+
+msgctxt "IDS_OSD_REGAIN_VOLUME_ON"
+msgid "Regain volume: On"
+msgstr "Pengerasan volume: Nyala"
+
+msgctxt "IDS_OSD_REGAIN_VOLUME_OFF"
+msgid "Regain volume: Off"
+msgstr "Pengerasan volume: Mati"
+
+msgctxt "IDS_SIZE_UNIT_BYTES"
+msgid "bytes"
+msgstr "byte"
+
+msgctxt "IDS_SIZE_UNIT_K"
+msgid "KB"
+msgstr "KB"
+
+msgctxt "IDS_SIZE_UNIT_M"
+msgid "MB"
+msgstr "MB"
+
+msgctxt "IDS_SIZE_UNIT_G"
+msgid "GB"
+msgstr "GB"
+
+msgctxt "IDS_SPEED_UNIT_K"
+msgid "KB/s"
+msgstr "KB/s"
+
+msgctxt "IDS_SPEED_UNIT_M"
+msgid "MB/s"
+msgstr "MB/s"
+
+msgctxt "IDS_BDA_ERROR_CREATE_TUNER"
+msgid "Could not create the tuner."
+msgstr "Tidak bisa membuat pelaras."
+
+msgctxt "IDS_BDA_ERROR_CREATE_RECEIVER"
+msgid "Could not create the receiver."
+msgstr "Tidak bisa membuat penerima."
+
+msgctxt "IDS_BDA_ERROR_CONNECT_NW_TUNER"
+msgid "Could not connect the network and the tuner."
+msgstr "Tidak bisa menyambungkan jaringan dan pelaras."
+
+msgctxt "IDS_BDA_ERROR_CONNECT_TUNER_REC"
+msgid "Could not connect the tuner and the receiver."
+msgstr "Tidak bisa menyambungkan pelaras dan penerima."
+
+msgctxt "IDS_BDA_ERROR_CONNECT_TUNER"
+msgid "Could not connect the tuner."
+msgstr "Tidak bisa menyambungkan pelaras."
+
+msgctxt "IDS_BDA_ERROR_DEMULTIPLEXER"
+msgid "Could not create the demultiplexer."
+msgstr "Tidak bisa membuat awamultiplekser."
+
+msgctxt "IDS_GOTO_ERROR_PARSING_TIME"
+msgid "Error parsing the entered time!"
+msgstr "Galat mengurai waktu yang dimasukkan!"
+
+msgctxt "IDS_GOTO_ERROR_PARSING_TEXT"
+msgid "Error parsing the entered text!"
+msgstr "Galat mengurai teks yang dimasukkan!"
+
+msgctxt "IDS_GOTO_ERROR_PARSING_FPS"
+msgid "Error parsing the entered frame rate!"
+msgstr "Galat mengurai laju frame yang dimasukkan!"
+
+msgctxt "IDS_FRAME_STEP_ERROR_RENDERER"
+msgid "Cannot frame-step, try a different video renderer."
+msgstr "Tidak bisa menuntun frame, coba perender video yang berbeda."
+
+msgctxt "IDS_SCREENSHOT_ERROR_REAL"
+msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the default video renderer for RealMedia.\nSelect one of the DirectX renderers for RealMedia in MPC-HC's output options and reopen the file."
+msgstr "Fungsi \"Simpan Gambar\" dan \"Simpan Gambar Mini\" tidak bisa digunakan dengan perender video bawaan untuk RealMedia.\n\nPilih satu dari perender DirectX untuk RealMedia di dalam opsi keluaran MPC-HC dan buka ulang berkasnya."
+
+msgctxt "IDS_SCREENSHOT_ERROR_QT"
+msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the default video renderer for QuickTime.\nSelect one of the DirectX renderers for QuickTime in MPC-HC's output options and reopen the file."
+msgstr "Fungsi \"Simpan Gambar\" dan \"Simpan Gambar Mini\" tidak bisa digunakan dengan perender video bawaan untuk QuickTime.\n\nPilih satu dari perender DirectX untuk QuickTime di dalam opsi keluaran MPC-HC dan buka ulang berkasnya."
+
+msgctxt "IDS_SCREENSHOT_ERROR_SHOCKWAVE"
+msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work for Shockwave files."
+msgstr "Fungsi \"Simpan Gambar\" dan \"Simpan Gambar Mini\" tidak bisa digunakan untuk berkas Shockwave."
+
+msgctxt "IDS_SCREENSHOT_ERROR_OVERLAY"
+msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the Overlay Mixer video renderer.\nChange the video renderer in MPC's output options and reopen the file."
+msgstr "Fungsi \"Simpan Gambar\" dan \"Simpan Gambar Mini\" tidak bisa digunakan dengan perender video Pengadon Overlay.\n\nUbah perender video di dalam opsi keluaran MPC-HC dan buka ulang berkasnya."
+
+msgctxt "IDS_SUBDL_DLG_CONNECT_ERROR"
+msgid "Cannot connect to the online subtitles database."
+msgstr "Tidak bisa menyambung ke basis data subtitel daring."
+
+msgctxt "IDS_MB_SHOW_EDL_EDITOR"
+msgid "Do you want to activate the EDL editor?"
+msgstr "Apakah anda ingin mengaktifkan penyunting EDL?"
+
+msgctxt "IDS_CAPTURE_ERROR"
+msgid "Capture Error"
+msgstr "Tangkapan Galat"
+
+msgctxt "IDS_CAPTURE_ERROR_VIDEO"
+msgid "video"
+msgstr "video"
+
+msgctxt "IDS_CAPTURE_ERROR_AUDIO"
+msgid "audio"
+msgstr "audio"
+
+msgctxt "IDS_CAPTURE_ERROR_ADD_BUFFER"
+msgid "Can't add the %s buffer filter to the graph."
+msgstr "Tidak bisa menambahkan filter bufer %s ke grafik."
+
+msgctxt "IDS_CAPTURE_ERROR_CONNECT_BUFF"
+msgid "Can't connect the %s buffer filter to the graph."
+msgstr "Tidak bisa menyambung filter bufer %s ke grafik."
+
+msgctxt "IDS_CAPTURE_ERROR_ADD_ENCODER"
+msgid "Can't add the %s encoder filter to the graph."
+msgstr "Tidak bisa menambahkan filter pengenkode %s ke grafik."
+
+msgctxt "IDS_CAPTURE_ERROR_CONNECT_ENC"
+msgid "Can't connect the %s encoder filter to the graph."
+msgstr "Tidak bisa menyambung filter pengenkode %s ke grafik."
+
+msgctxt "IDS_CAPTURE_ERROR_COMPRESSION"
+msgid "Can't set the compression format on the %s encoder filter."
+msgstr "Tidak bisa menetapkan format kompresi pada filter pengenkode %s."
+
+msgctxt "IDS_CAPTURE_ERROR_MULTIPLEXER"
+msgid "Can't connect the %s stream to the multiplexer filter."
+msgstr "Tidak bisa menyambung strim %s ke filter multiplekser."
+
+msgctxt "IDS_CAPTURE_ERROR_VID_CAPT_PIN"
+msgid "No video capture pin was found."
+msgstr "Tidak ada pin tangkapan video yang ditemukan."
+
+msgctxt "IDS_CAPTURE_ERROR_AUD_CAPT_PIN"
+msgid "No audio capture pin was found."
+msgstr "Tidak ada pin tangkapan audio yang ditemukan."
+
+msgctxt "IDS_CAPTURE_ERROR_OUT_FILE"
+msgid "Error initializing the output file."
+msgstr "Galat menginisialisasi berkas keluaran."
+
+msgctxt "IDS_CAPTURE_ERROR_AUD_OUT_FILE"
+msgid "Error initializing the audio output file."
+msgstr "Galat menginisialisasi berkas keluaran audio."
+
+msgctxt "IDS_SUBRESYNC_TIME_FORMAT"
+msgid "The correct time format is [-]hh:mm:ss.ms (e.g. 01:23:45.678)."
+msgstr "Format waktu yang benar adalah [-]hh:mm:ss.ms (e.g. 01:23:45.678)."
+
+msgctxt "IDS_EXTERNAL_FILTERS_ERROR_MT"
+msgid "This type is already in the list!"
+msgstr "Jenis ini sudah ada di dalam daftar!"
+
+msgctxt "IDS_WEBSERVER_ERROR_TEST"
+msgid "You need to apply the new settings before testing them."
+msgstr "Anda perlu menerapkan pengaturan baru sebelum mengujinya."
+
+msgctxt "IDS_AFTERPLAYBACK_EXIT"
+msgid "After Playback: Exit"
+msgstr "Setelah Pemutaran: Keluar"
+
+msgctxt "IDS_AFTERPLAYBACK_STANDBY"
+msgid "After Playback: Stand By"
+msgstr "Setelah Pemutaran: Siaga"
+
+msgctxt "IDS_AFTERPLAYBACK_HIBERNATE"
+msgid "After Playback: Hibernate"
+msgstr "Setelah Pemutaran: Hibernasi"
+
+msgctxt "IDS_AFTERPLAYBACK_SHUTDOWN"
+msgid "After Playback: Shutdown"
+msgstr "Setelah Pemutaran: Matikan"
+
+msgctxt "IDS_AFTERPLAYBACK_LOGOFF"
+msgid "After Playback: Log Off"
+msgstr "Setelah Pemutaran: Keluar"
+
+msgctxt "IDS_AFTERPLAYBACK_LOCK"
+msgid "After Playback: Lock"
+msgstr "Setelah Pemutaran: Kunci"
+
+msgctxt "IDS_AFTERPLAYBACK_MONITOROFF"
+msgid "After Playback: Turn off the monitor"
+msgstr "Setelah Pemutaran: Matikan monitor"
+
+msgctxt "IDS_AFTERPLAYBACK_PLAYNEXT"
+msgid "After Playback: Play next file in the folder"
+msgstr "Setelah Pemutaran: Putar berkas selanjutnya di dalam folder"
+
+msgctxt "IDS_AFTERPLAYBACK_DONOTHING"
+msgid "After Playback: Do nothing"
+msgstr "Setelah Pemutaran: Tidak melakukan apa-apa"
+
+msgctxt "IDS_OSD_BRIGHTNESS"
+msgid "Brightness: %s"
+msgstr "Kecerahan: %s"
+
+msgctxt "IDS_OSD_CONTRAST"
+msgid "Contrast: %s"
+msgstr "Kontras: %s"
+
+msgctxt "IDS_OSD_HUE"
+msgid "Hue: %s°"
+msgstr "Rona: %s°"
+
+msgctxt "IDS_OSD_SATURATION"
+msgid "Saturation: %s"
+msgstr "Kejenuhan: %s"
+
+msgctxt "IDS_OSD_RESET_COLOR"
+msgid "Color settings restored"
+msgstr "Pengaturan warna dipulihkan"
+
+msgctxt "IDS_OSD_NO_COLORCONTROL"
+msgid "Color control is not supported"
+msgstr "Pengendali warna tidak didukung"
+
+msgctxt "IDS_BRIGHTNESS_INC"
+msgid "Brightness increase"
+msgstr "Kecerahan naik"
+
+msgctxt "IDS_LANG_PREF_EXAMPLE"
+msgid "Enter your preferred languages here.\nFor example, type: \"eng jap swe\""
+msgstr "Masukkan bahasa pilihan anda disini.\nSebagai contoh, ketik: \"eng jap swe\""
+
+msgctxt "IDS_OVERRIDE_EXT_SPLITTER_CHOICE"
+msgid "External splitters can have their own language preference options thus MPC-HC default behavior is not to change their initial choice.\nEnable this option if you want MPC-HC to control external splitters."
+msgstr "Spliter eksternal bisa memiliki preferensi pilihan bahasa mereka sendiri dan perilaku bawaan MPC-HC adalah tidak mengubah pilihan awal mereka.\nFungsikan opsi ini jika anda ingin MPC-HC mengontrol splter eksternal."
+
+msgctxt "IDS_NAVIGATE_BD_PLAYLISTS"
+msgid "&Blu-Ray playlists"
+msgstr "Daftar putar &Blu-Ray"
+
+msgctxt "IDS_NAVIGATE_PLAYLIST"
+msgid "&Playlist"
+msgstr "Daftar &Putar"
+
+msgctxt "IDS_NAVIGATE_CHAPTERS"
+msgid "&Chapters"
+msgstr "&Bab"
+
+msgctxt "IDS_NAVIGATE_TITLES"
+msgid "&Titles"
+msgstr "&Judul"
+
+msgctxt "IDS_NAVIGATE_CHANNELS"
+msgid "&Channels"
+msgstr "&Saluran"
+
+msgctxt "IDC_FASTSEEK_CHECK"
+msgid "If \"latest keyframe\" is selected, seek to the first keyframe before the actual seek point.\nIf \"nearest keyframe\" is selected, seek to the first keyframe before or after the seek point depending on which is the closest."
+msgstr "Jika \"keyframe terakhir\" dipilih, jangkau ke keyframe pertama sebelum titik jangkau yang sebenarnya.\nJika \"keyframe terdekat\" dipilih, jangkau ke keyframe pertama sebelum atau sesudah titik jangkau tergantung pada mana yang terdekat."
+
+msgctxt "IDC_ASSOCIATE_ALL_FORMATS"
+msgid "Associate with all formats"
+msgstr "Asosiasi dengan semua format"
+
+msgctxt "IDC_ASSOCIATE_VIDEO_FORMATS"
+msgid "Associate with video formats only"
+msgstr "Asosiasi dengan format video saja"
+
+msgctxt "IDC_ASSOCIATE_AUDIO_FORMATS"
+msgid "Associate with audio formats only"
+msgstr "Asosiasi dengan format audio saja"
+
+msgctxt "IDC_CLEAR_ALL_ASSOCIATIONS"
+msgid "Clear all associations"
+msgstr "Hilangkan semua asosiasi"
+
+msgctxt "IDS_FILTER_SETTINGS_CAPTION"
+msgid "Settings"
+msgstr "Pengaturan"
+
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ar.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ar.strings.po
index 550256bbf..6ba77f8a2 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ar.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ar.strings.po
@@ -1,5 +1,5 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Ahmad Abd-Elghany <tolpa1@gmail.com>, 2014
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-18 09:41+0000\n"
-"Last-Translator: Ahmad Abd-Elghany <tolpa1@gmail.com>\n"
-"Language-Team: Arabic (http://www.transifex.com/projects/p/mpc-hc/language/ar/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Arabic (http://www.transifex.com/mpc-hc/mpc-hc/language/ar/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -37,10 +37,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "هل تريد حذ٠إعدادات ضبظ البرنامج؟ \n\nإذا كنت تنوي تثبيت البرنامج مرة أخرى، Ùلا يلزمك حذÙها."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "مل٠تثبيت البرنامج يعمل حالياً!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "هذه النسخة من البرنامج تتطلب معالج يدعم خاصية SSE.\n\nمعالج جهازك لايحمل هذه المتطلبات."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.be.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.be.strings.po
index 8d0d4201d..2303bf223 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.be.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.be.strings.po
@@ -35,10 +35,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Ці хочаце такÑама выдаліць налады MPC-HC?\n\nКалі вы збіраецеÑÑ Ð·Ð½Ð¾Ñž уÑталÑваць MPC-HC, тады Ñ–Ñ… можна пакінуць."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "Праграма ÑžÑталÑÐ²Ð°Ð½Ð½Ñ MPC-HC ужо працуе!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "ГÑÑ‚Ð°Ñ Ð±ÑƒÐ´Ð¾Ð²Ð° MPC-HC вымагае працÑÑар, здольны выконваць інÑтрукцыі SSE.\n\nВаш працÑÑар гÑтага не ўмее."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.bn.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.bn.strings.po
index b5857f52a..5f035b02a 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.bn.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.bn.strings.po
@@ -1,17 +1,19 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Mehedi Hussain, 2014
+# Mehedi Hussain, 2014
# mehzad, 2014
# Underground78, 2014
+# Underground78, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2015-04-12 14:10+0000\n"
-"Last-Translator: Mehedi Hussain\n"
-"Language-Team: Bengali (http://www.transifex.com/projects/p/mpc-hc/language/bn/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Bengali (http://www.transifex.com/mpc-hc/mpc-hc/language/bn/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -38,10 +40,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "আপনি কি MPC-HCà¦à¦° সেটিংসমূহও মà§à¦›à§‡ ফেলতে চান?\n\nআপনার যদি পà§à¦¨à¦°à¦¾à§Ÿ MPC-HC ইনসà§à¦Ÿà¦² করার পরিকলà§à¦ªà¦¨à¦¾ থাকে, তাহলে à¦à¦¸à¦¬ মà§à¦›à§‡ ফেলতে হবে না।"
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HCà¦à¦° সেটআপ পà§à¦°à¦•à§à¦°à¦¿à§Ÿà¦¾ ইতিমধà§à¦¯à§‡ চলমান রয়েছে!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "MPC-HCà¦à¦° à¦à¦‡ নিরà§à¦®à¦¾à¦£à¦Ÿà¦¿à¦° জনà§à¦¯ SSE à¦à¦•à§à¦¸à¦Ÿà§‡à¦¨à¦¶à¦¨ সমরà§à¦¥à¦¨ করে à¦à¦®à¦¨ à¦à¦•à¦Ÿà¦¿ CPUর পà§à¦°à¦¯à¦¼à§‹à¦œà¦¨à¥¤\n\nআপনার CPUর সেই করà§à¦®à¦•à§à¦·à¦®à¦¤à¦¾ নেই।"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ca.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ca.strings.po
index fac1d735d..1e9aa7229 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ca.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ca.strings.po
@@ -1,5 +1,5 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Adolfo Jayme Barrientos, 2014
@@ -9,10 +9,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2015-04-23 13:02+0000\n"
-"Last-Translator: papu <papu@openmailbox.org>\n"
-"Language-Team: Catalan (http://www.transifex.com/projects/p/mpc-hc/language/ca/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Catalan (http://www.transifex.com/mpc-hc/mpc-hc/language/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -39,10 +39,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Voleu suprimir les preferències del MPC-HC?\n\nSi planegeu instal·lar-ho un altre cop no cal eliminar-les."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "La instal·lació del MPC-HC ja s’està executant."
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Aquesta versió de MPC-HC necessita una CPU amb suport d'extensions SSE.\n\nLa teva CPU no cumpleix aquestes característiques."
@@ -81,5 +77,5 @@ msgstr "Instal·lació personalitzada"
msgctxt "CustomMessages_ViewChangelog"
msgid "View Changelog"
-msgstr "Veure registre de canvis"
+msgstr "Veure el Registre de canvis"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.cs.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.cs.strings.po
index 9674580e2..5ecdb3b54 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.cs.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.cs.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# khagaroth, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-17 16:30+0000\n"
-"Last-Translator: khagaroth\n"
-"Language-Team: Czech (http://www.transifex.com/projects/p/mpc-hc/language/cs/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Czech (http://www.transifex.com/mpc-hc/mpc-hc/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Chcete smazat také nastavení MPC-HC?\n\nPokud plánujete MPC-HC znovu nainstalovat, mazat je nemusíte."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "InstalaÄní program MPC-HC je již spuÅ¡tÄ›n!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Toto sestavení MPC-HC vyžaduje procesor s podporou rozšíření SSE.\n\nVáš procesor tato rozšíření nepodporuje."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.da.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.da.strings.po
index 73b3f50e5..f1a036148 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.da.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.da.strings.po
@@ -1,5 +1,5 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Jatyrael <cbf_x@hotmail.com>, 2014
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2015-03-20 21:34+0000\n"
-"Last-Translator: scootergrisen\n"
-"Language-Team: Danish (http://www.transifex.com/projects/p/mpc-hc/language/da/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Danish (http://www.transifex.com/mpc-hc/mpc-hc/language/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -37,10 +37,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Vil du også slette MPC-HC indstillinger?\n\nHvis du har tænkt dig at installere MPC-HC igen, så behøves du ikke slette dem."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC installation kører allerede!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Denne version af MPC-HC kræver en CPU der understøtter SSE-udvidelsen.\n\nDin CPU understøtter det ikke."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.de.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.de.strings.po
index 0bbdb6cf2..36598ad87 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.de.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.de.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Gaugg_Markus, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-08-27 11:57+0000\n"
-"Last-Translator: Gaugg_Markus\n"
-"Language-Team: German (http://www.transifex.com/projects/p/mpc-hc/language/de/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: German (http://www.transifex.com/mpc-hc/mpc-hc/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Wollen Sie auch die Programmeinstellungen löschen?\n\nWenn Sie den MPC-HC wieder installieren möchten, dann müssen Sie diese nicht unbedingt löschen."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC Setup wird bereits ausgeführt!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Dieses MPC-HC-Build benötigt einen Prozessor mit SSE-Unterstützung.\n\nIhr Prozessor besitzt nicht diese Eigenschaft."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.el.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.el.strings.po
index 213363722..9eec2f8fc 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.el.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.el.strings.po
@@ -1,16 +1,17 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
-# geogeo.gr <admin@geogeo.gr>, 2013-2014
+# geogeo.gr <geogeo.gr@gmail.com>, 2013-2014
# firespin <dartworldgr@hotmail.com>, 2014
+# geogeo.gr <geogeo.gr@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-08 15:01+0000\n"
-"Last-Translator: firespin <dartworldgr@hotmail.com>\n"
-"Language-Team: Greek (http://www.transifex.com/projects/p/mpc-hc/language/el/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-10-20 10:53+0000\n"
+"Last-Translator: geogeo.gr <geogeo.gr@gmail.com>\n"
+"Language-Team: Greek (http://www.transifex.com/mpc-hc/mpc-hc/language/el/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -37,10 +38,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Θέλετε να διαγÏάψετε τις Ïυθμίσεις του MPC-HC;\n\nΑν σκοπεÏετε να εγκαταστήσετε το MPC-HC ξανά, τότε δεν χÏειάζεται να τις διαγÏάψετε."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "Η εγκατάσταση του MPC-HC εκτελείται ήδη!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Αυτή η έκδοση του MPC-HC απαιτεί επεξεÏγαστή με υποστήÏιξη SSE.\n\nΟ επεξεÏγαστής σας δεν έχει αυτές τις δυνατότητες."
@@ -79,5 +76,5 @@ msgstr "ΠÏοσαÏμοσμένη εγκατάσταση"
msgctxt "CustomMessages_ViewChangelog"
msgid "View Changelog"
-msgstr "Εμφάνιση λίστας αλλαγών"
+msgstr "Εμφάνιση μητÏώου αλλαγών"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.en_GB.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.en_GB.strings.po
index acb895d95..17f01cb09 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.en_GB.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.en_GB.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Sir_Burpalot <doctor.z01db3rg@gmail.com>, 2013-2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-23 11:51+0000\n"
-"Last-Translator: Sir_Burpalot <doctor.z01db3rg@gmail.com>\n"
-"Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/mpc-hc/language/en_GB/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: English (United Kingdom) (http://www.transifex.com/mpc-hc/mpc-hc/language/en_GB/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC setup is already running!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.es.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.es.strings.po
index a5bccf13d..56f612770 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.es.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.es.strings.po
@@ -1,5 +1,5 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Adolfo Jayme Barrientos, 2014
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-10-05 19:20+0000\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-09-25 05:51+0000\n"
"Last-Translator: Adolfo Jayme Barrientos\n"
-"Language-Team: Spanish (http://www.transifex.com/projects/p/mpc-hc/language/es/)\n"
+"Language-Team: Spanish (http://www.transifex.com/mpc-hc/mpc-hc/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -37,10 +37,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "¿Quiere eliminar también las preferencias de MPC-HC?\n\nSi planea instalar de nuevo MPC-HC no necesita eliminarlas."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "La instalación de MPC-HC ya está en ejecución."
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Esta versión de MPC-HC requiere una CPU compatible con extensiones SSE.\n\nSu CPU carece de esta característica."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.eu.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.eu.strings.po
index 5e4f6538e..dadce20a5 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.eu.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.eu.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Xabier Aramendi <azpidatziak@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-07 17:12+0000\n"
-"Last-Translator: Xabier Aramendi <azpidatziak@gmail.com>\n"
-"Language-Team: Basque (http://www.transifex.com/projects/p/mpc-hc/language/eu/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Basque (http://www.transifex.com/mpc-hc/mpc-hc/language/eu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "MPC-HC ezarpenak kentzea ere nahi dituzu?\n\nMPC-HC berriro ezartzeko asmoa baduzu ez dituzu ezabatu behar."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC ezarpena jadanik ekinean dago!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "MPC-HC eraiketa honek SSE hedapen sostengua duen CPU bat behar du.\n\nZure CPU-ak ez ditu gaitasun hauek."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.fi.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.fi.strings.po
index 47760d032..2175c6d07 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.fi.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.fi.strings.po
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Haluatko poistaa myöskin MPC-HC:n asetukset?\n\nJos aiot asentaa MPC-HC:n uudelleen, niitä ei tarvitse poistaa."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC:n asennus on jo käynnissä!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "MPC-HC:n tämä versio edellyttää CPU:lta SSE-laajennusten tukea.\n\nProsessorissasi ei ole niitä ominaisuuksia."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.fr.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.fr.strings.po
index 30f5f8286..953aa167f 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.fr.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.fr.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Underground78, 2013-2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-09 08:31+0000\n"
-"Last-Translator: Underground78\n"
-"Language-Team: French (http://www.transifex.com/projects/p/mpc-hc/language/fr/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: French (http://www.transifex.com/mpc-hc/mpc-hc/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Souhaitez-vous également supprimer les paramètres de MPC-HC ?\n\nSi vous prévoyez de réinstaller MPC-HC, il est conseillé de ne pas les supprimer."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "L'installation de MPC-HC est déjà en cours d'exécution !"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Cette version de MPC-HC nécessite un CPU avec support des instructions SSE.\n\nVotre processeur ne supporte pas cette fonctionnalité."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.gl.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.gl.strings.po
index eec82368f..d4dbf6843 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.gl.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.gl.strings.po
@@ -1,5 +1,5 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Rubén <feiticeiro2010@hotmail.es>, 2014
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2015-02-28 21:20+0000\n"
-"Last-Translator: Toño Calo <enfeitizador@gmail.com>\n"
-"Language-Team: Galician (http://www.transifex.com/projects/p/mpc-hc/language/gl/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Galician (http://www.transifex.com/mpc-hc/mpc-hc/language/gl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -37,10 +37,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Ques eliminar tamén os axustes de MPC-HC?\n\nSe pensas instalar MPC-HC de novo entón non o tes que eliminalos."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "O instalador de MPC-HC xa está a ser executado!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Esta versión de MPC-HC require unha CPU con soporte para a extensión SSE .\n\nA súa CPU non ten estas capacidades."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.he.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.he.strings.po
index be6f86272..78fdda2be 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.he.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.he.strings.po
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "×”×× ×‘×¨×¦×•× ×š ×’× ×œ×ž×—×•×§ ×ת ההגדרות של MPC-HC?\n\n×× ×תה מתכנן להתקין ×ת MPC-HC בשנית, ×ינך חייב להסירן."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "ההתקנה של MPC-HC כבר רצה!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "גרסה זו של MPC-HC דורשת מעבד ×¢× ×ª×ž×™×›×” בהרחבת SSE.\n\nהמעבד שברשותך ×ינו תומך בכך."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.hr.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.hr.strings.po
index 1e9a52bcd..62475c05c 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.hr.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.hr.strings.po
@@ -1,5 +1,5 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# schop <aprcel00@fesb.hr>, 2014
@@ -8,10 +8,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2015-05-29 21:00+0000\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-10-21 10:02+0000\n"
"Last-Translator: streger <stjepan.treger@gmail.com>\n"
-"Language-Team: Croatian (http://www.transifex.com/projects/p/mpc-hc/language/hr/)\n"
+"Language-Team: Croatian (http://www.transifex.com/mpc-hc/mpc-hc/language/hr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -38,10 +38,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Želite li obrisati postavke od MPC-HC?\n\nAko planirate ponovno instalirati MPC-HC, ne morate ih brisati."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC instalacija je već pokrenuta!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Ova verzija MPC-HC zahtijeva procesor sa SSE podrškom.\n\nVaš procesor nema te mogućnosti."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.hu.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.hu.strings.po
index f711c2b45..bdf067bed 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.hu.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.hu.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Máté <lang.mate@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-12-10 10:11+0000\n"
-"Last-Translator: Máté <lang.mate@gmail.com>\n"
-"Language-Team: Hungarian (http://www.transifex.com/projects/p/mpc-hc/language/hu/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Hungarian (http://www.transifex.com/mpc-hc/mpc-hc/language/hu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Az MPC-HC beállításokat is törölni szeretné?\n\nHa azt tervezi, hogy újratelepíti az MPC-HC-t, akkor nem kell törölnie őket."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "Az MPC-HC telepítő már fut!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Az MPC-HC jelen változatához SSE támogatással bíró CPU-ra van szüksége.\n\nAz ön CPU-ja nem rendelkezik ilyen támogatással."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.hy.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.hy.strings.po
index 8e4ad2747..3432d7a2c 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.hy.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.hy.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Hrant Ohanyan <h.ohanyan@haysoft.org>, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-07 08:49+0000\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
"Last-Translator: JellyFrog\n"
-"Language-Team: Armenian (http://www.transifex.com/projects/p/mpc-hc/language/hy/)\n"
+"Language-Team: Armenian (http://www.transifex.com/mpc-hc/mpc-hc/language/hy/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Õ‹Õ¶Õ»Õ¥ÕžÕ¬ MPC-HC-Õ« Õ¯Õ¡Ö€Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¨Ö‰\n\nÔµÕ©Õ¥ Õ¶Õ¡Õ­Õ¡Õ¿Õ¥Õ½Õ¸Ö‚Õ´ Õ¥Ö„ Õ¾Õ¥Ö€Õ¡Õ¿Õ¥Õ²Õ¡Õ¤Ö€Õ¥Õ¬ MPC-HC, Õ¡ÕºÕ¡ ÕºÕ¥Õ¿Ö„ Õ§ Õ¹Õ§ Õ¤Ö€Õ¡Õ¶Ö„ Õ»Õ¶Õ»Õ¥Õ¬Ö‰."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC-Õ« Õ¿Õ¥Õ²Õ¡Õ¯Õ¡ÕµÕ«Õ¹Õ¨ Õ¡Ö€Õ¤Õ¥Õ¶ Õ¢Õ¡ÖÕ¾Õ¡Õ® Õ§!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "MPC-HC-Õ« Õ¡ÕµÕ½ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¨ ÕºÕ¡Õ°Õ¡Õ¶Õ»Õ¸Ö‚Õ´ Õ§ CPUÕ SSE-Õ« Õ¡Õ»Õ¡Õ¯ÖÕ´Õ¡Õ´Õ¢Ö‰\n\nÕÕ¥Ö€ CPU-Õ¶ Õ¡ÕµÕ¶ Õ¹Õ« Õ¡Õ»Õ¡Õ¯ÖÕ¸Ö‚Õ´Ö‰"
@@ -50,7 +46,7 @@ msgstr "MPC-HC-Õ« Õ¡ÕµÕ½ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¨ ÕºÕ¡Õ°Õ¡Õ¶Õ»Õ¸Ö‚Õ´ Õ§ CPUÕ SSE2-Õ«
msgctxt "CustomMessages_run_DownloadToolbarImages"
msgid "Visit our Wiki page to download toolbar images"
-msgstr ""
+msgstr "Ô±ÕµÖÕ¥Õ¬Õ¥Ö„ Õ´Õ¥Ö€ Wiki Õ§Õ»Õ¨Õ Õ¶Õ¥Ö€Õ¢Õ¥Õ¼Õ¶Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€ Õ£Õ¸Ö€Õ®Õ«Ö„Õ¡Õ£Õ¸Õ¿Õ¸Ö‚ ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ¶Õ¥Ö€"
msgctxt "CustomMessages_tsk_AllUsers"
msgid "For all users"
@@ -58,7 +54,7 @@ msgstr "Ô²Õ¸Õ¬Õ¸Ö€Õ« Õ°Õ¡Õ´Õ¡Ö€"
msgctxt "CustomMessages_tsk_CurrentUser"
msgid "For the current user only"
-msgstr "Õ„Õ«Õ¡ÕµÕ¶ Õ±Õ¥Õ¦ Õ°Õ¡Õ´Õ¡Ö€"
+msgstr "Õ„Õ«Õ¡ÕµÕ¶ Õ¨Õ¶Õ©Õ¡ÖÕ«Õ¯ Ö…Õ£Õ¿Õ¾Õ¸Õ²Õ« Õ°Õ¡Õ´Õ¡Ö€"
msgctxt "CustomMessages_tsk_Other"
msgid "Other tasks:"
@@ -66,11 +62,11 @@ msgstr "Ô¼Ö€Õ¡ÖÕ¸Ö‚ÖÕ«Õ¹."
msgctxt "CustomMessages_tsk_ResetSettings"
msgid "Reset settings"
-msgstr "ÔµÕ¿Õ¡Ö€Õ¯Õ¥Õ¬ Õ¯Õ¡Ö€Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¨"
+msgstr "ÕŽÕ¥Ö€Õ¡Õ¯Õ¡ÕµÕ¥Õ¬ Õ¯Õ¡Ö€Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¨"
msgctxt "CustomMessages_types_DefaultInstallation"
msgid "Default installation"
-msgstr "ÕÕ¥Õ²Õ¡Õ¤Ö€Õ¥Õ¬ Õ¨Õ½Õ¿ Õ®Ö€Õ¡Õ£Ö€Õ¡ÕµÕ«Õ¶Õ«"
+msgstr "ÕÕ¥Õ²Õ¡Õ¤Ö€Õ¥Õ¬ Õ¨Õ½Õ¿ Õ¬Õ¼Õ¥Õ¬ÕµÕ¡ÕµÕ¶"
msgctxt "CustomMessages_types_CustomInstallation"
msgid "Custom installation"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.id.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.id.strings.po
new file mode 100644
index 000000000..4165817d4
--- /dev/null
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.id.strings.po
@@ -0,0 +1,81 @@
+# MPC-HC - Strings extracted from string tables
+# Copyright (C) 2002 - 2013 see Authors.txt
+# This file is distributed under the same license as the MPC-HC package.
+# Translators:
+# Hatta.z, 2014
+# yoga.mardia <made.yoga12@gmail.com>, 2014
+# Reza Septyan .R. <ainofuyuumI@outlook.com>, 2014
+# zk <zamani.karmana@gmail.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: MPC-HC\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-08-02 13:18+0000\n"
+"Last-Translator: zk <zamani.karmana@gmail.com>\n"
+"Language-Team: Indonesian (http://www.transifex.com/mpc-hc/mpc-hc/language/id/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: id\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+msgctxt "Messages_WelcomeLabel2"
+msgid "This will install [name] on your computer.\n\nIt is recommended that you close all other applications before continuing."
+msgstr "Ini akan memasang [name] di komputer Anda.\n\nSangat disarankan untuk menutup semua aplikasi lain sebelum melanjutkan."
+
+msgctxt "Messages_WinVersionTooLowError"
+msgid "[name] requires Windows XP Service Pack 3 or newer to run."
+msgstr "[name] membutuhkan Windows XP Service Pack 3 atau yang lebih baru agar bisa dijalankan."
+
+msgctxt "CustomMessages_comp_mpciconlib"
+msgid "Icon Library"
+msgstr "Pustaka Ikon"
+
+msgctxt "CustomMessages_comp_mpcresources"
+msgid "Translations"
+msgstr "Terjemahan"
+
+msgctxt "CustomMessages_msg_DeleteSettings"
+msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
+msgstr "Apakah Anda juga ingin menghapus pengaturan MPC-HC?\n\nJika Anda berencana untuk memasang MPC-HC lagi maka Anda tidak perlu menghapusnya."
+
+msgctxt "CustomMessages_msg_simd_sse"
+msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
+msgstr "Versi MPC-HC ini membutuhkan CPU dengan dukungan ekstensi SSE.\n\nCPU Anda tidak memiliki kemampuan tersebut."
+
+msgctxt "CustomMessages_msg_simd_sse2"
+msgid "This build of MPC-HC requires a CPU with SSE2 extension support.\n\nYour CPU does not have those capabilities."
+msgstr "Versi MPC-HC ini membutuhkan CPU dengan dukungan ekstensi SSE2.\n\nCPU Anda tidak memiliki kemampuan tersebut."
+
+msgctxt "CustomMessages_run_DownloadToolbarImages"
+msgid "Visit our Wiki page to download toolbar images"
+msgstr "Kunjungi halaman Wiki kami untuk mengunduh gambar bilah alat"
+
+msgctxt "CustomMessages_tsk_AllUsers"
+msgid "For all users"
+msgstr "Untuk semua pengguna"
+
+msgctxt "CustomMessages_tsk_CurrentUser"
+msgid "For the current user only"
+msgstr "Hanya untuk pengguna ini saja"
+
+msgctxt "CustomMessages_tsk_Other"
+msgid "Other tasks:"
+msgstr "Tugas lain:"
+
+msgctxt "CustomMessages_tsk_ResetSettings"
+msgid "Reset settings"
+msgstr "Setel ulang pengaturan"
+
+msgctxt "CustomMessages_types_DefaultInstallation"
+msgid "Default installation"
+msgstr "Pemasangan bawaan"
+
+msgctxt "CustomMessages_types_CustomInstallation"
+msgid "Custom installation"
+msgstr "Pemasangan ubahsuai"
+
+msgctxt "CustomMessages_ViewChangelog"
+msgid "View Changelog"
+msgstr "Lihat Catatan Perubahan"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.it.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.it.strings.po
index 800e2e8df..332cd01f9 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.it.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.it.strings.po
@@ -37,10 +37,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Vuoi eliminare anche le impostazioni di MPC-HC?\n\nSe pensi di reinstallare MPC-HC in seguito non dovresti eliminarle."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "L'installazione di MPC-HC è già in corso!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Questa build di MPC-HC richiede una CPU con il supporto alle estensioni SSE.\n\nLa tua CPU non dispone di questa caratteristica."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ja.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ja.strings.po
index 87e3286b6..8f323c902 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ja.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ja.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# ever_green, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2015-03-21 23:10+0000\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-09-26 22:46+0000\n"
"Last-Translator: ever_green\n"
-"Language-Team: Japanese (http://www.transifex.com/projects/p/mpc-hc/language/ja/)\n"
+"Language-Team: Japanese (http://www.transifex.com/mpc-hc/mpc-hc/language/ja/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -18,7 +18,7 @@ msgstr ""
msgctxt "Messages_WelcomeLabel2"
msgid "This will install [name] on your computer.\n\nIt is recommended that you close all other applications before continuing."
-msgstr "ã“ã®ãƒ—ログラムã¯ã‚ãªãŸã®ã‚³ãƒ³ãƒ”ュータ上㫠[name] をインストールã—ã¾ã™ã€‚\n\nセットアップを続行ã™ã‚‹å‰ã«ä»–ã®ã™ã¹ã¦ã®ã‚¢ãƒ—リケーションを閉ã˜ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚"
+msgstr "ã“ã®ãƒ—ログラムã¯ã”使用ã®ã‚³ãƒ³ãƒ”ュータ上㫠[name] をインストールã—ã¾ã™ã€‚\n\nセットアップを続行ã™ã‚‹å‰ã«ä»–ã®ã™ã¹ã¦ã®ã‚¢ãƒ—リケーションを閉ã˜ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚"
msgctxt "Messages_WinVersionTooLowError"
msgid "[name] requires Windows XP Service Pack 3 or newer to run."
@@ -36,21 +36,17 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "MPC-HC ã®è¨­å®šã‚’削除ã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹ï¼Ÿ\n\nMPC-HC ã‚’å†åº¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹å ´åˆã€è¨­å®šã‚’削除ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。"
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC ã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã¯æ—¢ã«å®Ÿè¡Œã•ã‚Œã¦ã„ã¾ã™ï¼"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
-msgstr "ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® MPC-HC ã«ã¯ CPU ã® SSE 拡張サãƒãƒ¼ãƒˆãŒå¿…è¦ã§ã™ã€‚\n\nãŠä½¿ã„ã® CPU ã¯ã“れらã®æ©Ÿèƒ½ã‚’満ãŸã—ã¦ã„ã¾ã›ã‚“。"
+msgstr "ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® MPC-HC ã«ã¯ CPU ã® SSE 拡張サãƒãƒ¼ãƒˆãŒå¿…è¦ã§ã™ã€‚\n\nã”使用㮠CPU ã¯ã“れらã®æ©Ÿèƒ½ã‚’満ãŸã—ã¦ã„ã¾ã›ã‚“。"
msgctxt "CustomMessages_msg_simd_sse2"
msgid "This build of MPC-HC requires a CPU with SSE2 extension support.\n\nYour CPU does not have those capabilities."
-msgstr "ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® MPC-HC ã«ã¯ CPU ã® SSE2 拡張サãƒãƒ¼ãƒˆãŒå¿…è¦ã§ã™ã€‚\n\nãŠä½¿ã„ã® CPU ã¯ã“れらã®æ©Ÿèƒ½ã‚’満ãŸã—ã¦ã„ã¾ã›ã‚“。"
+msgstr "ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® MPC-HC ã«ã¯ CPU ã® SSE2 拡張サãƒãƒ¼ãƒˆãŒå¿…è¦ã§ã™ã€‚\n\nã”使用㮠CPU ã¯ã“れらã®æ©Ÿèƒ½ã‚’満ãŸã—ã¦ã„ã¾ã›ã‚“。"
msgctxt "CustomMessages_run_DownloadToolbarImages"
msgid "Visit our Wiki page to download toolbar images"
-msgstr "Wiki ページã«ç§»å‹•ã—ã¦ãƒ„ールãƒãƒ¼ã®ç”»åƒã‚’ダウンロードã™ã‚‹"
+msgstr "Wiki ページã«ç§»å‹•ã—ã¦ãƒ„ール ãƒãƒ¼ã®ç”»åƒã‚’ダウンロードã™ã‚‹"
msgctxt "CustomMessages_tsk_AllUsers"
msgid "For all users"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ko.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ko.strings.po
index 8749b9e9d..8236e76a2 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ko.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ko.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Level ASMer <zx132435@naver.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-12-01 23:04+0000\n"
-"Last-Translator: Underground78\n"
-"Language-Team: Korean (http://www.transifex.com/projects/p/mpc-hc/language/ko/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Korean (http://www.transifex.com/mpc-hc/mpc-hc/language/ko/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "MPC-HC ì˜ ì„¤ì •ë„ ì‚­ì œ 하시겠습니까?\n\nMPC-HC 를 다시 설치할 계íšì´ë¼ë©´ ì„¤ì •ë“¤ì„ ì‚­ì œí•  필요가 없습니다."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC 설치 í”„ë¡œê·¸ëž¨ì´ ì´ë¯¸ 실행 중입니다!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "ì´ ë²„ì „ì˜ MPC-HC 는 SSE ê¸°ìˆ ì„ ì§€ì›í•˜ëŠ” CPUê°€ 필요합니다.\n\nì´ ì»´í“¨í„°ì˜ CPU는 ì´ ê¸°ìˆ ì„ ì§€ì›í•˜ì§€ì•ŠìŠµë‹ˆë‹¤."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.lt.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.lt.strings.po
new file mode 100644
index 000000000..6e5ef092c
--- /dev/null
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.lt.strings.po
@@ -0,0 +1,79 @@
+# MPC-HC - Strings extracted from string tables
+# Copyright (C) 2002 - 2013 see Authors.txt
+# This file is distributed under the same license as the MPC-HC package.
+# Translators:
+# linasmi <linasmi@mail.ru>, 2014-2015
+# Linas Tamašauskas, 2014
+msgid ""
+msgstr ""
+"Project-Id-Version: MPC-HC\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-09-11 09:07+0000\n"
+"Last-Translator: linasmi <linasmi@mail.ru>\n"
+"Language-Team: Lithuanian (http://www.transifex.com/mpc-hc/mpc-hc/language/lt/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: lt\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+msgctxt "Messages_WelcomeLabel2"
+msgid "This will install [name] on your computer.\n\nIt is recommended that you close all other applications before continuing."
+msgstr "Ši programa įdiegs [name] į jūsų kompiuterį.\n\nRekomenduojama išjungti visas kitas programas, prieš pradedant diegimą."
+
+msgctxt "Messages_WinVersionTooLowError"
+msgid "[name] requires Windows XP Service Pack 3 or newer to run."
+msgstr "[name] veikimui reikalingas Windows XP su 3-Äiu pakeitimų paketu arba naujesne versija."
+
+msgctxt "CustomMessages_comp_mpciconlib"
+msgid "Icon Library"
+msgstr "Piktogramų biblioteka"
+
+msgctxt "CustomMessages_comp_mpcresources"
+msgid "Translations"
+msgstr "Vertimai"
+
+msgctxt "CustomMessages_msg_DeleteSettings"
+msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
+msgstr "Ar norite taip pat ištrinti MPC-HC nuostatas?\n\nJei planuojate vėl diegti MPC-HC, tada jų trinti nebūtina."
+
+msgctxt "CustomMessages_msg_simd_sse"
+msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
+msgstr "Šiai MPC-HC versijai reikalingas centrinis procesorius su SSE plėtinio palaikymu.\n\nJūsų procesorius neturi šių galimybių."
+
+msgctxt "CustomMessages_msg_simd_sse2"
+msgid "This build of MPC-HC requires a CPU with SSE2 extension support.\n\nYour CPU does not have those capabilities."
+msgstr "Šiai MPC-HC versijai reikalingas centrinis CPU su SSE2 plėtinio palaikymu.\n\nJūsų procesorius neturi šių galimybių."
+
+msgctxt "CustomMessages_run_DownloadToolbarImages"
+msgid "Visit our Wiki page to download toolbar images"
+msgstr "Aplankykite mūsų Wiki puslapį įrankių juostos paveikslėliams atsisiųsti"
+
+msgctxt "CustomMessages_tsk_AllUsers"
+msgid "For all users"
+msgstr "Visiems naudotojams"
+
+msgctxt "CustomMessages_tsk_CurrentUser"
+msgid "For the current user only"
+msgstr "Dabartiniam naudotojui"
+
+msgctxt "CustomMessages_tsk_Other"
+msgid "Other tasks:"
+msgstr "Kitos užduotys:"
+
+msgctxt "CustomMessages_tsk_ResetSettings"
+msgid "Reset settings"
+msgstr "Atstatyti nustatymus"
+
+msgctxt "CustomMessages_types_DefaultInstallation"
+msgid "Default installation"
+msgstr "Numatytasis diegimas"
+
+msgctxt "CustomMessages_types_CustomInstallation"
+msgid "Custom installation"
+msgstr "Pasirinktinis diegimas"
+
+msgctxt "CustomMessages_ViewChangelog"
+msgid "View Changelog"
+msgstr "PeržiÅ«rÄ—ti pokyÄių žurnalÄ…"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ms_MY.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ms_MY.strings.po
index 5882f3e9b..934f10f74 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ms_MY.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ms_MY.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# abuyop <abuyop@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-20 04:30+0000\n"
-"Last-Translator: abuyop <abuyop@gmail.com>\n"
-"Language-Team: Malay (Malaysia) (http://www.transifex.com/projects/p/mpc-hc/language/ms_MY/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Malay (Malaysia) (http://www.transifex.com/mpc-hc/mpc-hc/language/ms_MY/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Anda mahu padam tetapan MPC-HC?\n\nJika anda bercadang untuk memasang MPC-HC lagi, maka anda tidak perlu memadamnya."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "Persediaan MPC-HC sedia dijalankan!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Binaan MPC-HC ini memerlukan CPU dengan sokongan sambungan SSE.\n\nCPU anda tidak mempunyai keupayaan tersebut."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.nl.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.nl.strings.po
index ee76ab80c..c5a4b5edc 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.nl.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.nl.strings.po
@@ -4,13 +4,14 @@
# Translators:
# Devrim, 2014
# DennisW, 2014
+# Marco Brohet <therbom@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-10-31 08:50+0000\n"
-"Last-Translator: DennisW\n"
-"Language-Team: Dutch (http://www.transifex.com/projects/p/mpc-hc/language/nl/)\n"
+"PO-Revision-Date: 2015-07-14 19:23+0000\n"
+"Last-Translator: Marco Brohet <therbom@gmail.com>\n"
+"Language-Team: Dutch (http://www.transifex.com/p/mpc-hc/language/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -37,21 +38,17 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Wilt u ook de instellingen van MPC-HC verwijderen?\n\nAls u van plan bent MPC-HC opnieuw te gaan installeren is dit niet nodig."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC installatie is al gestart!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
-msgstr "Deze versie van MPC-HC heeft een processor nodig die SSE ondersteunt.\n\nUw processor ondersteund dit niet."
+msgstr "Deze versie van MPC-HC heeft een processor nodig die SSE ondersteunt.\n\nUw processor ondersteunt dit niet."
msgctxt "CustomMessages_msg_simd_sse2"
msgid "This build of MPC-HC requires a CPU with SSE2 extension support.\n\nYour CPU does not have those capabilities."
-msgstr "Deze versie van MPC-HC heeft een processor nodig die SSE2 ondersteunt.\n\nUw processor ondersteund dit niet."
+msgstr "Deze versie van MPC-HC heeft een processor nodig die SSE2 ondersteunt.\n\nUw processor ondersteunt dit niet."
msgctxt "CustomMessages_run_DownloadToolbarImages"
msgid "Visit our Wiki page to download toolbar images"
-msgstr "Bezoek onze Wiki pagina om de werkbalk afbeeldingen te downloaden"
+msgstr "Bezoek onze wiki om de werkbalkafbeeldingen te downloaden"
msgctxt "CustomMessages_tsk_AllUsers"
msgid "For all users"
@@ -59,7 +56,7 @@ msgstr "Voor alle gebruikers"
msgctxt "CustomMessages_tsk_CurrentUser"
msgid "For the current user only"
-msgstr "Allen voor de huidige gebruiker"
+msgstr "Alleen voor de huidige gebruiker"
msgctxt "CustomMessages_tsk_Other"
msgid "Other tasks:"
@@ -71,7 +68,7 @@ msgstr "Instellingen resetten"
msgctxt "CustomMessages_types_DefaultInstallation"
msgid "Default installation"
-msgstr "Standaard installatie"
+msgstr "Standaardinstallatie"
msgctxt "CustomMessages_types_CustomInstallation"
msgid "Custom installation"
@@ -79,5 +76,5 @@ msgstr "Aangepaste installatie"
msgctxt "CustomMessages_ViewChangelog"
msgid "View Changelog"
-msgstr "Bekijk Wijzigingsoverzicht"
+msgstr "Wijzigingsoverzicht bekijken"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.pa.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.pa.strings.po
new file mode 100644
index 000000000..c030c0f41
--- /dev/null
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.pa.strings.po
@@ -0,0 +1,78 @@
+# MPC-HC - Strings extracted from string tables
+# Copyright (C) 2002 - 2013 see Authors.txt
+# This file is distributed under the same license as the MPC-HC package.
+# Translators:
+# A S Alam <apreet.alam@gmail.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: MPC-HC\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Panjabi (Punjabi) (http://www.transifex.com/mpc-hc/mpc-hc/language/pa/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pa\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "Messages_WelcomeLabel2"
+msgid "This will install [name] on your computer.\n\nIt is recommended that you close all other applications before continuing."
+msgstr "ਇਹ ਤà©à¨¹à¨¾à¨¡à©‡ ਕੰਪਿਊਟਰ ਉੱਤੇ [name] ਇੰਸਟਾਲ ਕਰੇਗਾ।\n\nਜਾਰੀ ਰੱਖਣ ਤੋਂ ਪਹਿਲਾਂ ਤà©à¨¹à¨¾à¨¨à©‚à©° ਸਭ ਪਰੋਗਰਾਮ ਬੰਦ ਕਰਨ ਦੀ ਸਲਾਹ ਦਿੱਤੀ ਜਾਂਦੀ ਹੈ।"
+
+msgctxt "Messages_WinVersionTooLowError"
+msgid "[name] requires Windows XP Service Pack 3 or newer to run."
+msgstr ""
+
+msgctxt "CustomMessages_comp_mpciconlib"
+msgid "Icon Library"
+msgstr "ਆਈਕਾਨ ਲਾਇਬਰੇਰੀ"
+
+msgctxt "CustomMessages_comp_mpcresources"
+msgid "Translations"
+msgstr "ਅਨà©à¨µà¨¾à¨¦"
+
+msgctxt "CustomMessages_msg_DeleteSettings"
+msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
+msgstr "ਕੀ ਤà©à¨¸à©€à¨‚ MPC-HC ਸੈਟਿੰਗਾਂ ਨੂੰ ਹਟਾਉਣਾ ਚਾਹà©à©°à¨¦à©‡ ਹੋ?\n\nਜੇ ਤà©à¨¸à©€à¨‚ MPC-HC ਨੂੰ ਵਾਪਿਸ ਇੰਸਟਾਲ ਕਰਨ ਬਾਰੇ ਸੋਚਦੇ ਹੋ ਤਾਂ ਤà©à¨¹à¨¾à¨¨à©‚à©° ਉਹਨਾਂ ਨੂੰ ਹਟਾਉਣਾ ਨਹੀਂ ਚਾਹੀਦਾ ਹੈ।"
+
+msgctxt "CustomMessages_msg_simd_sse"
+msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
+msgstr ""
+
+msgctxt "CustomMessages_msg_simd_sse2"
+msgid "This build of MPC-HC requires a CPU with SSE2 extension support.\n\nYour CPU does not have those capabilities."
+msgstr ""
+
+msgctxt "CustomMessages_run_DownloadToolbarImages"
+msgid "Visit our Wiki page to download toolbar images"
+msgstr "ਟੂਲਬਾਰ ਚਿੱਤਰ ਡਾਊਨਲੋਡ ਕਰਨ ਲਈ ਸਾਡੇ ਵਿਕੀ ਸਫ਼ੇ ਨੂੰ ਖੋਲà©à¨¹à©‹"
+
+msgctxt "CustomMessages_tsk_AllUsers"
+msgid "For all users"
+msgstr "ਸਭ ਵਰਤੋਂਕਾਰਾਂ ਲਈ"
+
+msgctxt "CustomMessages_tsk_CurrentUser"
+msgid "For the current user only"
+msgstr "ਕੇਵਲ ਮੌਜੂਦਾ ਵਰਤੋਂਕਾਰ ਲਈ ਹੀ"
+
+msgctxt "CustomMessages_tsk_Other"
+msgid "Other tasks:"
+msgstr "ਹੋਰ ਟਾਸਕ:"
+
+msgctxt "CustomMessages_tsk_ResetSettings"
+msgid "Reset settings"
+msgstr "ਸੈਟਿੰਗਾਂ ਮà©à©œ-ਸੈਟ ਕਰੋ"
+
+msgctxt "CustomMessages_types_DefaultInstallation"
+msgid "Default installation"
+msgstr "ਡਿਫਾਲਟ ਇੰਸਟਾਲੇਸ਼ਨ"
+
+msgctxt "CustomMessages_types_CustomInstallation"
+msgid "Custom installation"
+msgstr "ਕਸਟਮ ਇੰਸਟਾਲੇਸ਼ਨ"
+
+msgctxt "CustomMessages_ViewChangelog"
+msgid "View Changelog"
+msgstr "ਚੇਜ਼ਲਾਗ ਦੇਖੋ"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.pl.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.pl.strings.po
index b1621925d..c6ae01d7a 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.pl.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.pl.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# kasper93, 2013-2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-10 06:31+0000\n"
-"Last-Translator: kasper93\n"
-"Language-Team: Polish (http://www.transifex.com/projects/p/mpc-hc/language/pl/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Polish (http://www.transifex.com/mpc-hc/mpc-hc/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Czy chcesz usunąć ustawienia MPC-HC?\n\nJeśli planujesz ponownie zainstalować MPC-HC, nie musisz ich usuwać."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "Instalator MPC-HC jest już uruchomiony!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Ta kompilacja MPC-HC wymaga procesora z obsługą zestawu instrukcji SSE.\n\nTwój procesor ich nie obsługuje."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.pt_BR.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.pt_BR.strings.po
index 8465312da..405c9722b 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.pt_BR.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.pt_BR.strings.po
@@ -1,5 +1,5 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Alex Luís Silva <alex.mooca@hotmail.com>, 2014
@@ -8,10 +8,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-24 06:20+0000\n"
-"Last-Translator: Alex Luís Silva <alex.mooca@hotmail.com>\n"
-"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/mpc-hc/language/pt_BR/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/mpc-hc/mpc-hc/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -38,10 +38,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Gostaria de excluir as configurações do MPC-HC?\n\nSe planeja instalar o MPC-HC novamente, você não precisa excluí-las."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "A instalação do MPC-HC ja está sendo executada!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Esta versão do MPC-HC necessita uma CPU com suporte a extensões SSE.\n\nSua CPU não tem esse suporte."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ro.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ro.strings.po
index 16c2ffcb2..6c4ae2c03 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ro.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ro.strings.po
@@ -1,15 +1,16 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Daniel <danny34ever@yahoo.com>, 2014-2015
+# lordkag <lord.kagula@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2015-05-31 16:51+0000\n"
-"Last-Translator: Daniel <danny34ever@yahoo.com>\n"
-"Language-Team: Romanian (http://www.transifex.com/projects/p/mpc-hc/language/ro/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-08-01 13:50+0000\n"
+"Last-Translator: lordkag <lord.kagula@gmail.com>\n"
+"Language-Team: Romanian (http://www.transifex.com/mpc-hc/mpc-hc/language/ro/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -18,7 +19,7 @@ msgstr ""
msgctxt "Messages_WelcomeLabel2"
msgid "This will install [name] on your computer.\n\nIt is recommended that you close all other applications before continuing."
-msgstr "Se va instala [name] pe calculatorul dumneavoastră.\n\nEste recomandat să închideţi toate celelalte aplicații înainte de a continua."
+msgstr "Se va instala [name] pe calculatorul dumneavoastră.\n\nEste recomandat să închideți toate celelalte aplicații înainte de a continua."
msgctxt "Messages_WinVersionTooLowError"
msgid "[name] requires Windows XP Service Pack 3 or newer to run."
@@ -36,10 +37,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Doriţi de asemenea să ştergeţi setările MPC-HC?\n\nDacă doriţi a reinstala MPC-HC, atunci nu este necesar să le ştergeţi."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "Instalatorul MPC-HC rulează deja!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Această versiune de MPC-HC necesită un procesor cu suport pentru extensii SSE.\n\nProcesorul dumneavoastră nu are aceste capacităţi."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ru.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ru.strings.po
index 79948abe3..9ec823faa 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ru.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.ru.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# stryaponoff <stryaponoff@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-14 12:51+0000\n"
-"Last-Translator: stryaponoff <stryaponoff@gmail.com>\n"
-"Language-Team: Russian (http://www.transifex.com/projects/p/mpc-hc/language/ru/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Russian (http://www.transifex.com/mpc-hc/mpc-hc/language/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Удалить также наÑтроенные параметры MPC-HC?\n\nЕÑли запланирована переуÑтановка MPC-HC, Ñти параметры не нужно удалÑÑ‚ÑŒ."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "Программа уÑтановки MPC-HC уже запущена!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Ð”Ð»Ñ Ñтой Ñборки MPC-HC требуетÑÑ Ð¿Ñ€Ð¾Ñ†ÐµÑÑор Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ¾Ð¹ SSE-инÑтрукций.\n\nÐ’ данном процеÑÑоре они не поддерживаютÑÑ."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sk.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sk.strings.po
index 023309189..9ed464394 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sk.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sk.strings.po
@@ -1,5 +1,5 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Marián Hikaník <podnety@mojepreklady.net>, 2013
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-07 10:11+0000\n"
-"Last-Translator: Marián Hikaník <podnety@mojepreklady.net>\n"
-"Language-Team: Slovak (http://www.transifex.com/projects/p/mpc-hc/language/sk/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Slovak (http://www.transifex.com/mpc-hc/mpc-hc/language/sk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -37,10 +37,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Chcete vymazať aj nastavenia programu MPC-HC?\n\nAk plánujete opätovnú inštaláciu programu MPC-HC, tak nie je potrebné ich vymazávať."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "Inštalácia programu MPC-HC je už spustená!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Toto zostavenie MPC-HC vyžaduje procesor s podporou inštrukcií SSE.\n\nVáš procesor ich nepodporuje."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sl.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sl.strings.po
index 7d63fbe8f..6a97a406b 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sl.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sl.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# fubuzz <knedlc@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-09-02 13:51+0000\n"
-"Last-Translator: fubuzz <knedlc@gmail.com>\n"
-"Language-Team: Slovenian (http://www.transifex.com/projects/p/mpc-hc/language/sl/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Slovenian (http://www.transifex.com/mpc-hc/mpc-hc/language/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Želite izbrisati nastavitve MPC-HC?\n\nČe nameravate spet namestiti MPC-HC, potem vam jih ni potrebno izbrisati."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "Namestitev MPC-HC je že zagnana!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Ta razliÄica MPC-HC zahteva procesor s podporo SSE razÅ¡iritvam.\n\nVaÅ¡ procesor nima teh zmožnosti."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sr.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sr.strings.po
index 264b632ca..a781f5719 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sr.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sr.strings.po
@@ -37,10 +37,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Желите ли да обришете и поÑтавке MPC-HC-а?\n\nÐе морате их бриÑати ако планирате поново да инÑталирате MPC-HC."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "ИнÑталација MPC-HC-а је већ покренута!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Ова верзија MPC-HC-а захтева процеÑор Ñа подршком за SSE проширења.\n\nВаш процеÑор нема те могућноÑти."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.strings.pot b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.strings.pot
index cdf64a504..d2f0cbaf5 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.strings.pot
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.strings.pot
@@ -1,10 +1,10 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -33,10 +33,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr ""
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr ""
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr ""
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sv.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sv.strings.po
index b1de5876a..1d54d0f0d 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sv.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.sv.strings.po
@@ -1,5 +1,5 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# JellyFrog, 2013-2014
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-12-02 00:15+0000\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
"Last-Translator: JellyFrog\n"
-"Language-Team: Swedish (http://www.transifex.com/projects/p/mpc-hc/language/sv/)\n"
+"Language-Team: Swedish (http://www.transifex.com/mpc-hc/mpc-hc/language/sv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -37,10 +37,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Vill du också ta bort inställningarna för MPC-HC?\n\nOm du planerar att installera MPC-HC igen så behöver du inte ta bort dem."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "Installation av MPC-HC pågår redan!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Denna version av MPC-HC kräver en processor med stöd för SSE.\n\nDin processor saknar detta stöd."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.th_TH.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.th_TH.strings.po
index 4bb16cb30..e137d76ad 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.th_TH.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.th_TH.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# M. Somsak, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-09-01 04:50+0000\n"
-"Last-Translator: M. Somsak\n"
-"Language-Team: Thai (Thailand) (http://www.transifex.com/projects/p/mpc-hc/language/th_TH/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Thai (Thailand) (http://www.transifex.com/mpc-hc/mpc-hc/language/th_TH/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "คุณต้องà¸à¸²à¸£à¸¥à¸šà¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่า MPC-HC ด้วยหรือไม่?\n\nหาà¸à¸„ุณวางà¹à¸œà¸™à¸ˆà¸°à¸•à¸´à¸”ตั้ง MPC-HC อีà¸à¸„รั้ง คุณไม่จำเป็นต้องลบมันออà¸"
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "à¸à¸²à¸£à¸•à¸´à¸”ตั้ง MPC-HC à¸à¸³à¸¥à¸±à¸‡à¸”ำเนินà¸à¸²à¸£à¸­à¸¢à¸¹à¹ˆ!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "MPC-HC รุ่นนี้ ต้องà¸à¸²à¸£ CPU ที่สนับสนุนส่วนเสริม SSE\n\nCPU ของคุณไม่มีความสามารถนั้น"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.tr.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.tr.strings.po
index 9b27ca9c5..5c61afe4d 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.tr.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.tr.strings.po
@@ -1,16 +1,16 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
-# Sinan H., 2014
+# Sinan H., 2014-2015
# Sinan H., 2013
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-20 12:41+0000\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-31 06:16+0000\n"
"Last-Translator: Sinan H.\n"
-"Language-Team: Turkish (http://www.transifex.com/projects/p/mpc-hc/language/tr/)\n"
+"Language-Team: Turkish (http://www.transifex.com/mpc-hc/mpc-hc/language/tr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -23,7 +23,7 @@ msgstr "[name] medya oynatıcısı programı bilgisayarınıza kurulacaktır.\n\
msgctxt "Messages_WinVersionTooLowError"
msgid "[name] requires Windows XP Service Pack 3 or newer to run."
-msgstr "[name] kurulumu, Windows XP Servis Paketi 3 veya daha yenisi ile çalışabilir."
+msgstr "[name] kurulumu, ancak Windows XP Servis Paketi 3 veya daha yenisi ile çalışabilir."
msgctxt "CustomMessages_comp_mpciconlib"
msgid "Icon Library"
@@ -37,17 +37,13 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "MPC-HC ayarlarını da silmek istiyor musunuz?\n\nMPC-HC 'yi tekrar yüklemeyi planlıyorsanız, bu ayarları silmemenizi öneririz."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC kurulumu zaten çalışıyor!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
-msgstr "Bu MPC-HC sürümü, SSE eklentisi destekleyen bir işlemci gerektirmektedir.\n\nİşlemciniz bu özelliği desteklemiyor."
+msgstr "Bu MPC-HC sürümü, SSE eklentisi destekleyen bir işlemci gerektirmektedir.\n\nİşlemciniz malesef bu özelliği desteklemiyor."
msgctxt "CustomMessages_msg_simd_sse2"
msgid "This build of MPC-HC requires a CPU with SSE2 extension support.\n\nYour CPU does not have those capabilities."
-msgstr "Bu MPC-HC sürümü, SSE2 eklentisi destekleyen bir işlemci gerektirmektedir.\n\nİşlemciniz bu özelliği desteklemiyor."
+msgstr "Bu MPC-HC sürümü, SSE2 eklentisi destekleyen bir işlemci gerektirmektedir.\n\nİşlemciniz malesef bu özelliği desteklemiyor."
msgctxt "CustomMessages_run_DownloadToolbarImages"
msgid "Visit our Wiki page to download toolbar images"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.tt.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.tt.strings.po
index 2c81800ef..e1b82531c 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.tt.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.tt.strings.po
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Шулай ук көйләнгән MPC-HC шартларын да бетерергәме?\n\nӘгәр ниÑтләнгән киредән MPC-HC урнаштыру булÑа, бу шартларны бетерергә кирәк түгел."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC урнаштыру программаÑÑ‹ инде кабызылган!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Бу MPC-HC бөрмәÑе өчен SSE-кагыйдәләрен кулланган процеÑÑор кирәк.\n\nӘлеге процеÑÑорда алар кулланылмый."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.uk.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.uk.strings.po
index fbb178b38..c9989dace 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.uk.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.uk.strings.po
@@ -1,15 +1,15 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# arestarh1986 <arestarh@ukr.net>, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-18 10:01+0000\n"
-"Last-Translator: arestarh1986 <arestarh@ukr.net>\n"
-"Language-Team: Ukrainian (http://www.transifex.com/projects/p/mpc-hc/language/uk/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Ukrainian (http://www.transifex.com/mpc-hc/mpc-hc/language/uk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +36,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Чи хочете ви видалити Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ MPC-HC?\n\nЯкщо ви плануєте проÑто повторно вÑтановити MPC-HC, то вам не потрібно Ñ—Ñ… видалÑти."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ MPC-HC вже запущено!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Ð”Ð»Ñ Ð²Ð¸ÐºÐ¾Ñ€Ð¸ÑÑ‚Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¾Ñ— верÑÑ–Ñ— MPC-HC необхідно, щоб ваш процеÑор підтримував SSE розширеннÑ.\n\nÐле ваш процеÑор не підтримує Ñ—Ñ…."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.vi.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.vi.strings.po
index b6c598ac1..43519687e 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.vi.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.vi.strings.po
@@ -37,10 +37,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "Bạn cũng muốn xóa các thiết lập của MPC-HC?\n\nNếu bạn dự định cài đặt lại MPC-HC thì bạn không cần phải xóa chúng."
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC đang được cài đặt!"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "Phiên bản MPC-HC này yêu cầu CPU có hỗ trợ phần mở rộng SSE.\n\nCPU của bạn không đáp ứng được yêu cầu này."
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.zh_CN.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.zh_CN.strings.po
index de1131ec0..dc62026dd 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.zh_CN.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.zh_CN.strings.po
@@ -1,15 +1,16 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
+# Dean Lee <xslidian@gmail.com>, 2015
# Ming Chen <yzonline@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-18 10:23+0000\n"
-"Last-Translator: Ming Chen <yzonline@gmail.com>\n"
-"Language-Team: Chinese (China) (http://www.transifex.com/projects/p/mpc-hc/language/zh_CN/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-07-24 08:44+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Chinese (China) (http://www.transifex.com/mpc-hc/mpc-hc/language/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -36,10 +37,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "是å¦åŒæ—¶åˆ é™¤ MPC-HC 设置?\n\n如果您打算å†æ¬¡å®‰è£… MPC-HC 则ä¸å¿…删除。"
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "MPC-HC 安装程åºå·²åœ¨è¿è¡Œä¸­ï¼"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "æ­¤ MPC-HC 编译版本è¦æ±‚ CPU æ”¯æŒ SSE 指令集。\n\n您的 CPU ä¸å…·å¤‡è¯¥èƒ½åŠ›ã€‚"
@@ -70,11 +67,11 @@ msgstr "é‡ç½®è®¾ç½®"
msgctxt "CustomMessages_types_DefaultInstallation"
msgid "Default installation"
-msgstr "默认安装"
+msgstr "默认安装方案"
msgctxt "CustomMessages_types_CustomInstallation"
msgid "Custom installation"
-msgstr "自定义安装"
+msgstr "自定义安装方案"
msgctxt "CustomMessages_ViewChangelog"
msgid "View Changelog"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.zh_TW.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.zh_TW.strings.po
index 7c5b5281e..70caa7e7f 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.installer.zh_TW.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.installer.zh_TW.strings.po
@@ -1,15 +1,18 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2014 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
+# 洪嘉鴻 <jerry9030@gmail.com>, 2015
+# Ken <ken670128@yahoo.com.tw>, 2015
# Peter Chen <petercpg@gmail.com>, 2014
+# 洪嘉鴻 <jerry9030@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-06-17 15:23:34+0000\n"
-"PO-Revision-Date: 2014-07-07 08:49+0000\n"
-"Last-Translator: JellyFrog\n"
-"Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/mpc-hc/language/zh_TW/)\n"
+"POT-Creation-Date: 2015-07-20 20:29:41+0000\n"
+"PO-Revision-Date: 2015-08-11 02:59+0000\n"
+"Last-Translator: 洪嘉鴻 <jerry9030@gmail.com>\n"
+"Language-Team: Chinese (Taiwan) (http://www.transifex.com/mpc-hc/mpc-hc/language/zh_TW/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -18,7 +21,7 @@ msgstr ""
msgctxt "Messages_WelcomeLabel2"
msgid "This will install [name] on your computer.\n\nIt is recommended that you close all other applications before continuing."
-msgstr "é€™å°‡æœƒå®‰è£ [name] 在你的電腦中。\n\n建議您關閉所有其它應用程åºå¾Œå†ç¹¼çºŒã€‚"
+msgstr "é€™å°‡æœƒå®‰è£ [name] 在您的電腦中。\n\n建議您關閉所有其它應用程å¼å¾Œå†ç¹¼çºŒã€‚"
msgctxt "Messages_WinVersionTooLowError"
msgid "[name] requires Windows XP Service Pack 3 or newer to run."
@@ -36,10 +39,6 @@ msgctxt "CustomMessages_msg_DeleteSettings"
msgid "Do you also want to delete MPC-HC settings?\n\nIf you plan on installing MPC-HC again then you do not have to delete them."
msgstr "您是å¦ä¹Ÿè¦åˆªé™¤ MPC-HC 設定?\n\n如果您打算å†æ¬¡å®‰è£ MPC-HC 則無需刪除。"
-msgctxt "CustomMessages_msg_SetupIsRunningWarning"
-msgid "MPC-HC setup is already running!"
-msgstr "已在執行 MPC-HC 安è£ç¨‹å¼ï¼"
-
msgctxt "CustomMessages_msg_simd_sse"
msgid "This build of MPC-HC requires a CPU with SSE extension support.\n\nYour CPU does not have those capabilities."
msgstr "此版的 MPC-HC 需è¦æœ‰æ”¯æ´ SSE 延伸指令集的 CPU。\n\n您的 CPU 並未相容這些功能。"
@@ -50,7 +49,7 @@ msgstr "此版的 MPC-HC é ˆè¦æœ‰æ”¯æ´ SSE2 延伸指令集的 CPU。\n\n您çš
msgctxt "CustomMessages_run_DownloadToolbarImages"
msgid "Visit our Wiki page to download toolbar images"
-msgstr ""
+msgstr "åƒè§€æˆ‘們的 Wiki é é¢ä»¥ä¸‹è¼‰å·¥å…·åˆ—圖示"
msgctxt "CustomMessages_tsk_AllUsers"
msgid "For all users"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.it.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.it.dialogs.po
index acd7a2559..663054bd1 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.it.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.it.dialogs.po
@@ -474,10 +474,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Auto-carica i file audio"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Usa il visualizzatore di sottotitoli integrato"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Controllo"
@@ -678,9 +674,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Disattiva minimizzazione con schermo intero su schermo non predefinito"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Utilizza le caratteristiche della Taskbar di Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1171,8 +1167,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Sottotitoli *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1187,8 +1183,8 @@ msgid "Rotation"
msgstr "Rotazione"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Filtri esterni (come VSFilter) possono visualizzare sottotitoli su ogni render."
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1206,6 +1202,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Consenti accesso solo da localhost"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr ""
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Stampa informazioni di debug"
@@ -1654,6 +1654,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Predefinito"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "Qualità JPEG:"
@@ -1670,8 +1714,16 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr ""
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
+msgid "Optional information"
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
@@ -1686,7 +1738,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr ""
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
msgstr ""
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.it.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.it.strings.po
index e2b7a53ad..f84b970a4 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.it.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.it.strings.po
@@ -327,12 +327,12 @@ msgid "On/Off"
msgstr "On/Off"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Dal FPS"
+msgid "From (FPS)"
+msgstr "Dal (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "Al FPS"
+msgid "To (FPS)"
+msgstr "Al (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -466,6 +466,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Riproduzione::Shaders"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Risorse"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Varie"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "InfoMedia"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Riproduzione::Cattura"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Riproduzione::Sync Renderer Settings"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Riproduzione::Schermo intero"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Switcher Audio"
@@ -558,30 +586,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Sottotitoli::Database"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Risorse"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Varie"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "InfoMedia"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Riproduzione::Cattura"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Riproduzione::Sync Renderer Settings"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Riproduzione::Schermo intero"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Dettagli"
@@ -674,22 +678,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "La superficie video sarà allocata come una superficie regolare su schermo."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "il Render Audio MPC non funziona, non usare."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Render Sync"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Segnala un bug"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC è crashato ma questa versione è stata compilata senza le informazioni di debug.\nSe vuoi segnalare questo bug, dovresti prima provare una versione ufficiale.\n\nVuoi visitare adesso la pagina di download?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Superfice piana offscreen regolare"
@@ -742,9 +734,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Nullo (non compresso)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "Render Audio MPC-HC"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr ""
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1394,6 +1386,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr ""
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr ""
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Apri periferica"
@@ -1678,6 +1690,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr ""
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr ""
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr ""
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr ""
@@ -1959,20 +1979,20 @@ msgid "Options"
msgstr "Opzioni"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Audio Succ"
+msgid "Next Audio Track"
+msgstr ""
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Audio Prec"
+msgid "Prev Audio Track"
+msgstr ""
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Sottotitoli Succ"
+msgid "Next Subtitle Track"
+msgstr ""
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Sottotitoli Prec"
+msgid "Prev Subtitle Track"
+msgstr ""
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1982,22 +2002,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Ricarica sottotitoli"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Audio Succ (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Audio Prec (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Sottotitoli Succ (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Sottotitoli Prec (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Angolo Succ (DVD)"
@@ -2007,20 +2011,20 @@ msgid "Prev Angle (DVD)"
msgstr "Angolo Prec (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Audio Succ (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Audio Prec (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Sottotitoli Succ (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Sottotitoli Prec (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2386,14 +2390,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Corrente"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC si è chiuso inaspettatamente. Per aiutarci a sistemare il problema, invia questo file \"%s\" al nostro bug tracker.\n\nVuoi aprire la cartella contenente il minidump e visitare ora il bug tracker?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Impossibile creare il file di dump in '%s' (errore %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Seleziona cartella"
@@ -2567,8 +2563,8 @@ msgid "Volume boost Max"
msgstr "Amplificazione volume: massimo"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Utilizzo: mpc-hc.exe \"percorso\" [opzioni]\n\n\"percorso\"\tIl file o cartella principale da caricare\n\t\t(wildcards ammesse, \"-\" denotes standard input)\n/dub \"nomedub\"\tCarica un file audio aggiuntivo\n/dubdelay \"file\"\tCarica un file audio aggiuntivo con ritardo\n\t\tdi XXms (se il file contiene \"...DELAY XXms...\")\n/d3dfs\t\tInizia il rendering in modalità D3D a schermo intero\n/sub \"subname\"\tCarica un file di sottotitoli aggiuntivo\n/filter \"nomefiltro\"\tCarica i filtri DirectShow da una DLL\n\t\t(wildcards ammesse)\n/dvd\t\tAvvia in modalità dvd, \"percorso\" indica la\n\t\tcartella del dvd (opzionale)\n/dvdpos T#C\tInizia riproduzione al titolo T, capitolo C\n/dvdpos T#hh:mm\tInizia riproduzione al titolo T,\n\t\tposizione hh:mm:ss\n/cd\t\tCarica tutte le tracce di un cd audio o (s)vcd;\n\t\t\"percorso\" indica il percorso del drive (opzionale)\n/device\t\tOpen the default video device\n/open\t\tApre il file, senza iniziare la riproduzione\n/play\t\tInizia la riproduzione del file non appena il\n\t\tlettore viene aperto\n/close\t\tChiudi il lettore dopo la riproduzione\n\t\t(funziona solo insieme a /play)\n/shutdown\tSpegni il computer dopo la riproduzione\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tAvvia a schermo intero\n/minimized\tAvvia minimizzato\n/new\t\tUsa una nuova istanza del lettore\n/add\t\tAggiunge \"percorso\" alla playlist, può essere\n\t\tin combinazione con /open e /play\n/randomize\tRandomize the playlist\n/regvid\t\tRegistra i formati video\n/regaud\t\tRegistra i formati audio\n/regpl\t\tCrea le associazioni dei file di tipo playlist\n/regall\t\tCrea le associazioni dei file per tutti i formati\n\t\tsupportati\n/unregall\t\tRimuove tutte le associazioni dei file\n/start ms\t\tInizia la riproduzione a \"ms\" (= millisecondi)\n/startpos hh:mm:ss\tInizia la riproduzione alla posizione hh:mm:ss\n/fixedsize w,h\tImposta la dimensione fissa della finestra\n/monitor N\tAvvia nello schermo N, dove N inizia da 1\n/audiorenderer N\tAvvia con renderer audio N, dove N inizia da 1\n\t\t(vedi impostazioni di \"Output\")\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRipristina le impostazioni predefinite\n/help /h /?\tVisualizza l'aiuto sulle opzioni a riga di comando\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Utilizzo: mpc-hc.exe \"percorso\" [opzioni]\n\n\"percorso\"\tIl file o cartella principale da caricare\n\t\t(wildcards ammesse, \"-\" denotes standard input)\n/dub \"nomedub\"\tCarica un file audio aggiuntivo\n/dubdelay \"file\"\tCarica un file audio aggiuntivo con ritardo\n\t\tdi XXms (se il file contiene \"...DELAY XXms...\")\n/d3dfs\t\tInizia il rendering in modalità D3D a schermo intero\n/sub \"subname\"\tCarica un file di sottotitoli aggiuntivo\n/filter \"nomefiltro\"\tCarica i filtri DirectShow da una DLL\n\t\t(wildcards ammesse)\n/dvd\t\tAvvia in modalità dvd, \"percorso\" indica la\n\t\tcartella del dvd (opzionale)\n/dvdpos T#C\tInizia riproduzione al titolo T, capitolo C\n/dvdpos T#hh:mm\tInizia riproduzione al titolo T,\n\t\tposizione hh:mm:ss\n/cd\t\tCarica tutte le tracce di un cd audio o (s)vcd;\n\t\t\"percorso\" indica il percorso del drive (opzionale)\n/device\t\tOpen the default video device\n/open\t\tApre il file, senza iniziare la riproduzione\n/play\t\tInizia la riproduzione del file non appena il\n\t\tlettore viene aperto\n/close\t\tChiudi il lettore dopo la riproduzione\n\t\t(funziona solo insieme a /play)\n/shutdown\tSpegni il computer dopo la riproduzione\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tAvvia a schermo intero\n/minimized\tAvvia minimizzato\n/new\t\tUsa una nuova istanza del lettore\n/add\t\tAggiunge \"percorso\" alla playlist, può essere\n\t\tin combinazione con /open e /play\n/randomize\tRandomize the playlist\n/regvid\t\tRegistra i formati video\n/regaud\t\tRegistra i formati audio\n/regpl\t\tCrea le associazioni dei file di tipo playlist\n/regall\t\tCrea le associazioni dei file per tutti i formati\n\t\tsupportati\n/unregall\t\tRimuove tutte le associazioni dei file\n/start ms\t\tInizia la riproduzione a \"ms\" (= millisecondi)\n/startpos hh:mm:ss\tInizia la riproduzione alla posizione hh:mm:ss\n/fixedsize w,h\tImposta la dimensione fissa della finestra\n/monitor N\tAvvia nello schermo N, dove N inizia da 1\n/audiorenderer N\tAvvia con renderer audio N, dove N inizia da 1\n\t\t(vedi impostazioni di \"Output\")\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRipristina le impostazioni predefinite\n/help /h /?\tVisualizza l'aiuto sulle opzioni a riga di comando\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3042,18 +3038,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Proporzioni"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Usa WASAPI (richiede riavvio riproduzione)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Muto nell'avanti veloce"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Dispositivo audio:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: On"
@@ -3610,3 +3594,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Impostazioni"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ja.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ja.dialogs.po
index 496a2e497..137d03a2b 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ja.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ja.dialogs.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-23 10:20+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-21 10:43+0000\n"
"Last-Translator: ever_green\n"
-"Language-Team: Japanese (http://www.transifex.com/projects/p/mpc-hc/language/ja/)\n"
+"Language-Team: Japanese (http://www.transifex.com/mpc-hc/mpc-hc/language/ja/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -66,7 +66,7 @@ msgstr "V/A ãƒãƒƒãƒ•ã‚¡:"
msgctxt "IDD_CAPTURE_DLG_IDC_CHECK5"
msgid "Audio to wav"
-msgstr "音声: wav"
+msgstr "音声: WAV å½¢å¼"
msgctxt "IDD_CAPTURE_DLG_IDC_BUTTON2"
msgid "Record"
@@ -126,7 +126,7 @@ msgstr "指定ä½ç½®ã«ç§»å‹•..."
msgctxt "IDD_GOTO_DLG_IDC_STATIC"
msgid "Enter a timecode using the format [hh:]mm:ss.ms to jump to a specified time. You do not need to enter the separators explicitly."
-msgstr "指定ã—ãŸæ™‚é–“ã«ã‚¸ãƒ£ãƒ³ãƒ—ã™ã‚‹ã«ã¯ [hh:]mm:ss.ms ã®å½¢å¼ã‚’使用ã—ã¦ã‚¿ã‚¤ãƒ ã‚³ãƒ¼ãƒ‰ã‚’入力ã—ã¦ãã ã•ã„。区切り文字を入力ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。"
+msgstr "指定ã—ãŸæ™‚é–“ã«ã‚¸ãƒ£ãƒ³ãƒ—ã™ã‚‹ã«ã¯ [hh:]mm:ss.ms ã®å½¢å¼ã‚’使用ã—ã¦ã‚¿ã‚¤ãƒ ã‚³ãƒ¼ãƒ‰ã‚’入力ã—ã¦ãã ã•ã„。区切り記å·ã‚’入力ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。"
msgctxt "IDD_GOTO_DLG_IDC_STATIC"
msgid "Time"
@@ -354,7 +354,7 @@ msgstr "常ã«æ—¢å®šã®å ´æ‰€ã‚’é–‹ã:"
msgctxt "IDD_PPAGEDVD_IDC_STATIC"
msgid "Preferred language for DVD Navigator and the external OGM Splitter"
-msgstr "DVD ナビゲータã¨å¤–部 OGM スプリッタã§ã®å„ªå…ˆè¨€èªž"
+msgstr "DVD ナビゲータãŠã‚ˆã³å¤–部 OGM スプリッタã§ã®å„ªå…ˆè¨€èªž"
msgctxt "IDD_PPAGEDVD_IDC_RADIO3"
msgid "Menu"
@@ -472,10 +472,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "オーディオ ファイルを自動ã§èª­ã¿è¾¼ã‚€"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "内蔵ã®å­—幕レンダラを使用ã™ã‚‹"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "コントロール"
@@ -554,7 +550,7 @@ msgstr "% ã§ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³åŒ–ã™ã‚‹"
msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_ALLOW_DROPPING_SUBPIC"
msgid "Allow dropping some subpictures if the queue is running late"
-msgstr "キューãŒé…ã‚Œã¦å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚µãƒ–ピクãƒãƒ£ã®è„±è½ã‚’許å¯ã™ã‚‹"
+msgstr "キューãŒé…ã‚Œã¦å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚µãƒ–ピクãƒãƒ£ã®æ¬ è½ã‚’許å¯ã™ã‚‹"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "Renderer Layout"
@@ -574,7 +570,7 @@ msgstr "字幕ã®é…置を強制的ã«æŒ‡å®šã—ã€ãƒ“デオカードã®è¨­å®šã§
msgctxt "IDD_PPAGEFORMATS_IDC_STATIC2"
msgid "File extensions"
-msgstr "æ‹¡å¼µå­"
+msgstr "ファイル拡張å­"
msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON2"
msgid "Default"
@@ -618,7 +614,7 @@ msgstr "DirectShow"
msgctxt "IDD_PPAGEFORMATS_IDC_CHECK5"
msgid "Check file extension first"
-msgstr "最åˆã«æ‹¡å¼µå­ã‚’判別ã™ã‚‹"
+msgstr "最åˆã«ãƒ•ã‚¡ã‚¤ãƒ«æ‹¡å¼µå­ã‚’判別ã™ã‚‹"
msgctxt "IDD_PPAGEFORMATS_IDC_STATIC"
msgid "Explorer Context Menu"
@@ -676,9 +672,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "既定ã®ãƒ¢ãƒ‹ã‚¿ä»¥å¤–ã§å…¨ç”»é¢è¡¨ç¤ºã—ã¦ã„ã‚‹å ´åˆã€ãƒ—レーヤーを最å°åŒ–ã§ããªã„よã†ã«ã™ã‚‹"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Windows 7 ã®ã‚¿ã‚¹ã‚¯ãƒãƒ¼ã®æ©Ÿèƒ½ã‚’使用ã™ã‚‹"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "タスク ãƒãƒ¼ã®æ‹¡å¼µæ©Ÿèƒ½ã‚’使用ã™ã‚‹"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -930,7 +926,7 @@ msgstr "ミリ秒"
msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_CHECK1"
msgid "Save custom style"
-msgstr "ユーザー設定ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚’ä¿å­˜"
+msgstr "カスタム スタイルをä¿å­˜ã™ã‚‹"
msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
@@ -990,15 +986,15 @@ msgstr "角度 (z,°)"
msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
msgid "Scale (x,%)"
-msgstr "サイズ (x,%)"
+msgstr "スケール (x,%)"
msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
msgid "Scale (y,%)"
-msgstr "サイズ (y,%)"
+msgstr "スケール (y,%)"
msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
msgid "Border Style"
-msgstr "境界ã®ã‚¹ã‚¿ã‚¤ãƒ«"
+msgstr "境界線ã®ã‚¹ã‚¿ã‚¤ãƒ«"
msgctxt "IDD_PPAGESUBSTYLE_IDC_RADIO1"
msgid "Outline"
@@ -1010,7 +1006,7 @@ msgstr "ä¸é€æ˜Žãªå››è§’"
msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
msgid "Width"
-msgstr "境界ã®å¹…"
+msgstr "太ã•"
msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
msgid "Shadow"
@@ -1070,7 +1066,7 @@ msgstr "アルファ ãƒãƒ£ãƒ³ãƒãƒ«ã‚’連動ã•ã›ã‚‹"
msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
msgid "If you would like to use the stand-alone versions of these filters or another replacement, disable them here."
-msgstr "スタンドアロン版や代替フィルタを使用ã™ã‚‹å ´åˆã€è©²å½“ã™ã‚‹ç®‡æ‰€ã‚’無効ã«ã—ã¦ãã ã•ã„。"
+msgstr "スタンドアロン版や代替フィルタを使用ã—ãŸã„å ´åˆã€ã“ã“ã§è©²å½“ã™ã‚‹ç®‡æ‰€ã‚’無効ã«ã—ã¦ãã ã•ã„。"
msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
msgid "Source Filters"
@@ -1126,7 +1122,7 @@ msgstr "オーディオ レンダラ"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "VMR-7/VMR-9 (renderless) and EVR (CP) settings"
-msgstr "VMR-7/VMR-9 (レンダーレス) 㨠EVR (カスタム プレゼンタ) ã®è¨­å®š"
+msgstr "VMR-7/VMR-9 (レンダーレス) ãŠã‚ˆã³ EVR (カスタム プレゼンタ) ã®è¨­å®š"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Surface:"
@@ -1169,8 +1165,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "字幕 *"
+msgid "Subtitles"
+msgstr "字幕"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1185,8 +1181,8 @@ msgid "Rotation"
msgstr "回転"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* 外部フィルタ (例ãˆã° VSFilter) ã¯ã€ã™ã¹ã¦ã®ãƒ¬ãƒ³ãƒ€ãƒ©ã«å­—幕を表示ã§ãã¾ã™ã€‚"
+msgid "Subtitle Renderer"
+msgstr "字幕レンダラ"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1204,6 +1200,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "ローカルホストã‹ã‚‰ã®æŽ¥ç¶šã®ã¿ã‚’許å¯ã™ã‚‹"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "プレビューを有効ã«ã™ã‚‹"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "デãƒãƒƒã‚°æƒ…報を表示ã™ã‚‹"
@@ -1274,7 +1274,7 @@ msgstr "æ›´æ–°ã®ç¢ºèª"
msgctxt "IDD_PPAGEMISC_IDC_CHECK1"
msgid "Enable automatic update check"
-msgstr "æ›´æ–°ã®è‡ªå‹•ç¢ºèªã‚’有効ã«ã™ã‚‹"
+msgstr "更新を自動的ã«ç¢ºèªã™ã‚‹"
msgctxt "IDD_PPAGEMISC_IDC_STATIC5"
msgid "Check every:"
@@ -1530,7 +1530,7 @@ msgstr "埋ã‚è¾¼ã¾ã‚ŒãŸå­—幕ã§ã¯ãªã外部字幕を優先ã™ã‚‹"
msgctxt "IDD_PPAGESUBMISC_IDC_CHECK3"
msgid "Ignore embedded subtitles"
-msgstr "埋ã‚è¾¼ã¾ã‚ŒãŸå­—幕を読ã¿è¾¼ã¾ãªã„"
+msgstr "埋ã‚è¾¼ã¾ã‚ŒãŸå­—幕を無視ã™ã‚‹"
msgctxt "IDD_PPAGESUBMISC_IDC_STATIC"
msgid "Autoload paths"
@@ -1652,6 +1652,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "既定"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "デãƒã‚¤ã‚¹"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "排他モード"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "ビットストリーミングを許å¯ã™ã‚‹"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "オプション"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "ステレオ クロスフィードを有効ã«ã™ã‚‹ (ヘッドフォン用)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "カットオフ:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "レベル:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "注æ„"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "音声ã®æ­ªã¿ã‚’最å°é™ã«æŠ‘ãˆã‚‹ãŸã‚ã«ã€å¤§éŸ³é‡ã®éžå¯é€†ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚ŒãŸã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã‚’å†ç”Ÿã™ã‚‹å ´åˆã€ãƒ—レーヤーã®éŸ³é‡ã‚’ç´„ 85% ã«ç¶­æŒã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚"
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG ã®å“質:"
@@ -1668,9 +1712,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "クラッシュ レãƒãƒ¼ãƒˆ"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "申ã—訳ã‚ã‚Šã¾ã›ã‚“。 MPC-HC ãŒã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã—ãŸã€‚"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "å•é¡Œã®è¨ºæ–­ã¨ä¿®æ­£ã«å½¹ç«‹ã¦ã‚‹ãŸã‚ã«ãƒã‚° レãƒãƒ¼ãƒˆã‚’é€ä¿¡ã™ã‚‹ã€‚"
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "申ã—訳ã”ã–ã„ã¾ã›ã‚“ãŒã€ MPC-HC ãŒã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã—ãŸã€‚\n\nã“ã®å•é¡Œã‚’診断ã—ã€è§£æ±ºã—ã‚„ã™ãã™ã‚‹ãŸã‚ã«ã€ãƒã‚° レãƒãƒ¼ãƒˆãŒé€ä¿¡ã•ã‚Œã¾ã™ã€‚å¿…è¦ã«å¿œã˜ã¦ã€è¿½åŠ æƒ…報をæä¾›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"
+msgid "Optional information"
+msgstr "オプションã®æƒ…å ±"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1684,7 +1736,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "å•é¡Œã®è©³ç´° (英語ã®ã¿ã‚’使用ã—ã¦ãã ã•ã„):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "MPC-HC ã‚’å†èµ·å‹•"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "MPC-HC を終了"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ja.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ja.menus.po
index 5e3a97788..50e2b7772 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ja.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ja.menus.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
-"PO-Revision-Date: 2015-05-28 13:50+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-09-26 22:46+0000\n"
"Last-Translator: ever_green\n"
-"Language-Team: Japanese (http://www.transifex.com/projects/p/mpc-hc/language/ja/)\n"
+"Language-Team: Japanese (http://www.transifex.com/mpc-hc/mpc-hc/language/ja/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -686,7 +686,7 @@ msgstr "コマンド ライン スイッãƒ(&C)"
msgctxt "ID_HELP_TOOLBARIMAGES"
msgid "Download &Toolbar Images"
-msgstr "ツールãƒãƒ¼ã®ç”»åƒã‚’ダウンロード(&T)"
+msgstr "ツール ãƒãƒ¼ã®ç”»åƒã‚’ダウンロード(&T)"
msgctxt "ID_HELP_DONATE"
msgid "&Donate"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ja.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ja.strings.po
index d0d85338b..73969edf3 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ja.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ja.strings.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-28 13:50+0000\n"
-"Last-Translator: ever_green\n"
-"Language-Team: Japanese (http://www.transifex.com/projects/p/mpc-hc/language/ja/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Japanese (http://www.transifex.com/mpc-hc/mpc-hc/language/ja/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -86,7 +86,7 @@ msgstr "åŒæœŸã‚ªãƒ•ã‚»ãƒƒãƒˆ"
msgctxt "IDS_STATSBAR_SYNC_OFFSET_FORMAT"
msgid "avg: %d ms, dev: %d ms"
-msgstr "å¹³å‡: %d ミリ秒, åå·®: %d ミリ秒"
+msgstr "å¹³å‡: %d ms, åå·®: %d ms"
msgctxt "IDS_STATSBAR_JITTER"
msgid "Jitter"
@@ -114,7 +114,7 @@ msgstr "スタイル"
msgctxt "IDS_TEXT_SUB_RENDERING_TARGET"
msgid "If the rendering target is left undefined, SSA/ASS subtitles will be rendered relative to the video frame while all other text subtitles will be rendered relative to the window."
-msgstr "レンダリング ターゲットãŒå®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã€SSA/ ASS 字幕ã¯ã€ãƒ“デオ フレームã«å¯¾ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ãŒã€ãã®ä»–ã™ã¹ã¦ã®ãƒ†ã‚­ã‚¹ãƒˆå­—幕ã¯ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«å¯¾ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚"
+msgstr "レンダリング ターゲットãŒå®šç¾©ã•ã‚Œã¦ã„ãªã„å ´åˆã€SSA/ASS 字幕ã¯ã€ãƒ“デオ フレームã«å¯¾ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ãŒã€ãã®ä»–ã™ã¹ã¦ã®ãƒ†ã‚­ã‚¹ãƒˆå­—幕ã¯ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«å¯¾ã—ã¦è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚"
msgctxt "IDS_PPAGE_CAPTURE_FG0"
msgid "Never (fastest approach)"
@@ -242,7 +242,7 @@ msgstr "DVD ナビゲータ フィルタã®ä¸€éƒ¨ã®ãƒ”ンを表示ã§ãã¾ã›ã
msgctxt "IDS_DVD_INTERFACES_ERROR"
msgid "Failed to query the needed interfaces for DVD playback"
-msgstr "DVD ã®å†ç”Ÿã«å¿…è¦ãªã‚¤ãƒ³ã‚¿ãƒ•ã‚§ãƒ¼ã‚¹ã®å•åˆã›ãŒã§ãã¾ã›ã‚“ã§ã—ãŸ"
+msgstr "DVD ã®å†ç”Ÿã«å¿…è¦ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ã‚¤ã‚¹ã®å•åˆã›ãŒã§ãã¾ã›ã‚“ã§ã—ãŸ"
msgctxt "IDS_CAPTURE_LIVE"
msgid "Live"
@@ -325,12 +325,12 @@ msgid "On/Off"
msgstr "オン/オフ"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "FPS ã‹ã‚‰"
+msgid "From (FPS)"
+msgstr "(FPS) ã‹ã‚‰"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "FPS ã¸"
+msgid "To (FPS)"
+msgstr "(FPS) ã¾ã§"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -350,7 +350,7 @@ msgstr "システムã®æ—¢å®š"
msgctxt "IDS_GRAPH_INTERFACES_ERROR"
msgid "Failed to query the needed interfaces for playback"
-msgstr "å†ç”Ÿã«å¿…è¦ãªã‚¤ãƒ³ã‚¿ãƒ•ã‚§ãƒ¼ã‚¹ã®å•åˆã›ãŒã§ãã¾ã›ã‚“ã§ã—ãŸ"
+msgstr "å†ç”Ÿã«å¿…è¦ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ã‚¤ã‚¹ã®å•åˆã›ãŒã§ãã¾ã›ã‚“ã§ã—ãŸ"
msgctxt "IDS_GRAPH_TARGET_WND_ERROR"
msgid "Could not set target window for graph notification"
@@ -464,6 +464,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "å†ç”Ÿ::シェーダ"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "リソース"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "ãã®ä»–"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "メディア情報"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "å†ç”Ÿ::キャプãƒãƒ£"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "å†ç”Ÿ::åŒæœŸãƒ¬ãƒ³ãƒ€ãƒ©ã®è¨­å®š"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "å†ç”Ÿ::全画é¢è¡¨ç¤º"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "内部フィルタ::オーディオ レンダラ"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "音声切り替ãˆ"
@@ -518,11 +546,11 @@ msgstr "Haali Video Renderer"
msgctxt "IDS_PPAGE_OUTPUT_NULL_COMP"
msgid "Null (anything)"
-msgstr "無効 (ã™ã¹ã¦)"
+msgstr "Null (ã™ã¹ã¦)"
msgctxt "IDS_PPAGE_OUTPUT_NULL_UNCOMP"
msgid "Null (uncompressed)"
-msgstr "無効 (éžåœ§ç¸®)"
+msgstr "Null (éžåœ§ç¸®)"
msgctxt "IDS_PPAGE_OUTPUT_MADVR"
msgid "madVR"
@@ -556,30 +584,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "字幕::データベース"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "リソース"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "ãã®ä»–"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "メディア情報"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "å†ç”Ÿ::キャプãƒãƒ£"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "å†ç”Ÿ::åŒæœŸãƒ¬ãƒ³ãƒ€ãƒ©ã®è¨­å®š"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "å†ç”Ÿ::全画é¢è¡¨ç¤º"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "詳細"
@@ -610,11 +614,11 @@ msgstr "DirectX 9 ãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹å ´åˆã«ã®ã¿ä½¿ç”¨ã§ã
msgctxt "IDC_DSVMR7REN"
msgid "Same as the VMR-7 (windowed), but with the Allocator-Presenter plugin of MPC-HC for subtitling. Overlay video mirroring WILL NOT work. \"True Color\" desktop color space recommended."
-msgstr "VMR-7 (ウィンドウ) ã¨åŒã˜ã§ã™ãŒã€å­—幕用㮠MPC-HC ã®ã‚¢ãƒ­ã‚±ãƒ¼ã‚¿ プレゼンタ プラグインを備ãˆã¦ã„ã¾ã™ã€‚オーãƒãƒ¼ãƒ¬ã‚¤ã®ãƒ“デオ ミラーリングã¯å‹•ä½œã—ã¾ã›ã‚“。デスクトップã®è‰²æ•°ã‚’ 「True Color〠ã«ã™ã‚‹äº‹ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚"
+msgstr "VMR-7 (ウィンドウ) ã¨åŒã˜ã§ã™ãŒã€å­—幕用㮠MPC-HC ã®ã‚¢ãƒ­ã‚±ãƒ¼ã‚¿ プレゼンタ プラグインを備ãˆã¦ã„ã¾ã™ã€‚オーãƒãƒ¼ãƒ¬ã‚¤ã®ãƒ“デオ ミラーリングã¯å‹•ä½œã—ã¾ã›ã‚“。デスクトップã®è‰²æ•°ã‚’ 「True Color〠ã«ã™ã‚‹äº‹ã‚’推奨ã—ã¾ã™ã€‚"
msgctxt "IDC_DSVMR9REN"
msgid "Same as the VMR-9 (windowed), but with the Allocator-Presenter plugin of MPC-HC for subtitling. Overlay video mirroring MIGHT work. \"True Color\" desktop color space recommended. Recommended for Windows XP."
-msgstr "VMR-9 (ウィンドウ) ã¨åŒã˜ã§ã™ãŒã€å­—幕用㮠MPC-HC ã®ã‚¢ãƒ­ã‚±ãƒ¼ã‚¿ プレゼンタ プラグインを備ãˆã¦ã„ã¾ã™ã€‚オーãƒãƒ¼ãƒ¬ã‚¤ã®ãƒ“デオ ミラーリングã¯å‹•ä½œã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚デスクトップã®è‰²æ•°ã‚’ 「True Color〠ã«ã™ã‚‹äº‹ãŒæŽ¨å¥¨ã•ã‚Œã¾ã™ã€‚Windows XP を推奨ã—ã¾ã™ã€‚"
+msgstr "VMR-9 (ウィンドウ) ã¨åŒã˜ã§ã™ãŒã€å­—幕用㮠MPC-HC ã®ã‚¢ãƒ­ã‚±ãƒ¼ã‚¿ プレゼンタ プラグインを備ãˆã¦ã„ã¾ã™ã€‚オーãƒãƒ¼ãƒ¬ã‚¤ã®ãƒ“デオ ミラーリングã¯å‹•ä½œã™ã‚‹ã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚デスクトップã®è‰²æ•°ã‚’ 「True Color〠ã«ã™ã‚‹äº‹ã‚’推奨ã—ã¾ã™ã€‚Windows XP ã§æŽ¨å¥¨ã—ã¾ã™ã€‚"
msgctxt "IDC_DSDXR"
msgid "Same as the VMR-9 (renderless), but uses a true two-pass bicubic resizer."
@@ -626,7 +630,7 @@ msgstr "ã©ã‚“ãªå‹•ç”»ã®ã‚ˆã†ãªãƒ¡ãƒ‡ã‚£ã‚¢ タイプã«ã‚‚接続ã—ã€å…¥åŠ
msgctxt "IDC_DSNULL_UNCOMP"
msgid "Same as the normal Null renderer, but this will only connect to uncompressed types."
-msgstr "無効 (ã™ã¹ã¦) ã¨åŒã˜ã§ã™ãŒã€ã“ã¡ã‚‰ã¯éžåœ§ç¸®ã‚¿ã‚¤ãƒ—ã«ã®ã¿æŽ¥ç¶šã—ã¾ã™ã€‚"
+msgstr "標準㮠Null レンダラã¨åŒã˜ã§ã™ãŒã€ã“ã‚Œã¯éžåœ§ç¸®ã‚¿ã‚¤ãƒ—ã«ã®ã¿æŽ¥ç¶šã—ã¾ã™ã€‚"
msgctxt "IDC_DSEVR"
msgid "Only available on Vista or later or on XP with at least .NET Framework 3.5 installed."
@@ -634,7 +638,7 @@ msgstr "Vista 以é™ã§ã€ã¾ãŸã¯å°‘ãªãã¨ã‚‚ .NET Framework 3.5 をインã
msgctxt "IDC_DSEVR_CUSTOM"
msgid "Same as the EVR, but with the Allocator-Presenter of MPC-HC for subtitling and postprocessing. Recommended for Windows Vista or later."
-msgstr "EVR ã¨åŒã˜ã§ã™ãŒã€å­—幕ãŠã‚ˆã³å¾Œå‡¦ç†ç”¨ã® MPC-HC ã®ã‚¢ãƒ­ã‚±ãƒ¼ã‚¿ プレゼンタを備ãˆã¦ã„ã¾ã™ã€‚Windows Vista 以é™ã‚’推奨ã—ã¾ã™ã€‚"
+msgstr "EVR ã¨åŒã˜ã§ã™ãŒã€å­—幕ãŠã‚ˆã³ãƒã‚¹ãƒˆãƒ—ロセッシング用㮠MPC-HC ã®ã‚¢ãƒ­ã‚±ãƒ¼ã‚¿ プレゼンタを備ãˆã¦ã„ã¾ã™ã€‚Windows Vista 以é™ã§æŽ¨å¥¨ã—ã¾ã™ã€‚"
msgctxt "IDC_DSMADVR"
msgid "High-quality renderer, requires a GPU that supports D3D9 or later."
@@ -672,22 +676,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "ビデオ サーフェスを通常ã®ã‚ªãƒ•ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ サーフェスã¨ã—ã¦å‰²ã‚Šå½“ã¦ã¾ã™ã€‚"
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Audio Renderer ã¯å£Šã‚Œã¦ã„ã¾ã™ã€‚使用ã—ãªã„ã§ãã ã•ã„。"
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "åŒæœŸãƒ¬ãƒ³ãƒ€ãƒ©"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - ãƒã‚°ã‚’報告"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC ã¯äºˆæœŸã›ãšã«çµ‚了ã—ã¾ã—ãŸãŒã€ã“ã®ãƒ“ルドã¯ãƒ‡ãƒãƒƒã‚°æƒ…å ±ãªã—ã§ã‚³ãƒ³ãƒ‘イルã•ã‚Œã¦ã„ã¾ã™ã€‚\nã“ã®ãƒã‚°ã‚’報告ã™ã‚‹ã«ã¯ã€æœ€åˆã«å…¬å¼ãƒ“ルドを試ã—ã¦ã¿ã‚‹ã¹ãã§ã™ã€‚\n\n今ã™ãダウンロード ページã«ç§»å‹•ã—ã¾ã™ã‹ï¼Ÿ"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "通常ã®ã‚ªãƒ•ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ プレーン サーフェス"
@@ -734,15 +726,15 @@ msgstr "é¸æŠžã•ã‚ŒãŸãƒ¬ãƒ³ãƒ€ãƒ©ã¯ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã¾ã›ã‚“。
msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_COMP"
msgid "Null (anything)"
-msgstr "無効 (ã™ã¹ã¦)"
+msgstr "Null (ã™ã¹ã¦)"
msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
-msgstr "無効 (éžåœ§ç¸®)"
+msgstr "Null (éžåœ§ç¸®)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "内部オーディオ レンダラ"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -754,7 +746,7 @@ msgstr "MIME タイプ"
msgctxt "IDS_EMB_RESOURCES_VIEWER_INFO"
msgid "In order to view an embedded resource in your browser you have to enable the web interface.\n\nUse the \"Save As\" button if you only want to save the information."
-msgstr "ãŠä½¿ã„ã®ãƒ–ラウザã«åŸ‹ã‚è¾¼ã¾ã‚ŒãŸãƒªã‚½ãƒ¼ã‚¹ã‚’表示ã™ã‚‹ãŸã‚ã«ã¯ã€ã‚¦ã‚§ãƒ– インターフェイスを有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚\n\n情報ã®ã¿ã‚’ä¿å­˜ã—ãŸã„å ´åˆã€ 「åå‰ã‚’付ã‘ã¦ä¿å­˜ã€ ボタンを使用ã—ã¾ã™ã€‚"
+msgstr "ã”使用ã®ãƒ–ラウザã«åŸ‹ã‚è¾¼ã¾ã‚ŒãŸãƒªã‚½ãƒ¼ã‚¹ã‚’表示ã™ã‚‹ãŸã‚ã«ã¯ã€ã‚¦ã‚§ãƒ– インターフェイスを有効ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚\n\n情報ã®ã¿ã‚’ä¿å­˜ã—ãŸã„å ´åˆã€ 「åå‰ã‚’付ã‘ã¦ä¿å­˜ã€ ボタンを使用ã—ã¾ã™ã€‚"
msgctxt "IDS_DOWNLOAD_SUBS"
msgid "Download subtitles"
@@ -798,7 +790,7 @@ msgstr "ビデオ サーフェスをテクスãƒãƒ£ã¨ã—ã¦å‰²ã‚Šå½“ã¦ã€3D ã
msgctxt "IDC_DX9RESIZER_COMBO"
msgid "If there is no Pixel Shader 2.0 support, simple bilinear is used automatically."
-msgstr "ピクセル シェーダ 2.0 をサãƒãƒ¼ãƒˆã—ã¦ã„ãªã„å ´åˆã€è‡ªå‹•ã§å˜ç´”ãªç·šå½¢è£œé–“ãŒä½¿ç”¨ã•ã‚Œã¾ã™ã€‚"
+msgstr "ピクセル シェーダ 2.0 をサãƒãƒ¼ãƒˆã—ã¦ã„ãªã„å ´åˆã€å˜ç´”ãªç·šå½¢è£œé–“ãŒè‡ªå‹•çš„ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚"
msgctxt "IDC_DSVMR9LOADMIXER"
msgid "Puts VMR-9 (renderless) into mixer mode, this means most of the controls on its property page will work and it will use a separate worker thread to renderer frames."
@@ -810,7 +802,7 @@ msgstr "レンダラã®äº’æ›æ€§ã‚’犠牲ã«ã—ã¦ãƒ‘フォーマンスをå‘上
msgctxt "IDC_FULLSCREEN_MONITOR_CHECK"
msgid "Reduces tearing but prevents the toolbar from being shown."
-msgstr "テアリングを減らã—ã¾ã™ãŒã€ãƒ„ールãƒãƒ¼ãŒè¡¨ç¤ºã•ã‚Œãªããªã‚Šã¾ã™ã€‚"
+msgstr "テアリングを減らã—ã¾ã™ãŒã€ãƒ„ール ãƒãƒ¼ãŒè¡¨ç¤ºã•ã‚Œãªããªã‚Šã¾ã™ã€‚"
msgctxt "IDC_DSVMR9ALTERNATIVEVSYNC"
msgid "Reduces tearing by bypassing the default VSync built into D3D."
@@ -830,7 +822,7 @@ msgstr "LAV Filters を使用ã—ã¾ã™"
msgctxt "IDS_INTERNAL_LAVF_WMV"
msgid "Uses LAV Filters. Disabled by default since Microsoft filters are usually more stable for those formats.\nIf you choose to use the internal filters, enable them for both source and decoding to have a better playback experience."
-msgstr "LAV Filters を使用ã—ã¾ã™ã€‚マイクロソフトã®ãƒ•ã‚£ãƒ«ã‚¿ãŒã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«å½¢å¼ã«ã¯ã‚ˆã‚Šå®‰å®šã—ã¦ã„ã‚‹ã®ã§ã€æ—¢å®šã§ç„¡åŠ¹ã«ãªã‚Šã¾ã—ãŸã€‚\n内部フィルタを使用ã™ã‚‹å ´åˆã€ã‚ˆã‚Šè‰¯ã„å†ç”Ÿç’°å¢ƒã‚’å¾—ã‚‹ãŸã‚ã«ã‚½ãƒ¼ã‚¹ãŠã‚ˆã³ãƒ‡ã‚³ãƒ¼ãƒ‰ã§ã“れらを有効ã«ã—ã¦ãã ã•ã„。"
+msgstr "LAV Filters を使用ã—ã¾ã™ã€‚マイクロソフトã®ãƒ•ã‚£ãƒ«ã‚¿ãŒã“れらã®å½¢å¼ã«ã¯ã‚ˆã‚Šå®‰å®šã—ã¦ã„ã‚‹ã®ã§ã€æ—¢å®šã§ç„¡åŠ¹ã«ãªã‚Šã¾ã—ãŸã€‚\n内部フィルタを使用ã™ã‚‹å ´åˆã€ã‚ˆã‚Šè‰¯ã„å†ç”Ÿç’°å¢ƒã‚’å¾—ã‚‹ãŸã‚ã«ã‚½ãƒ¼ã‚¹ãŠã‚ˆã³ãƒ‡ã‚³ãƒ¼ãƒ‰ã§ã“れらを有効ã«ã—ã¦ãã ã•ã„。"
msgctxt "IDS_AG_TOGGLE_NAVIGATION"
msgid "Toggle Navigation Bar"
@@ -1030,7 +1022,7 @@ msgstr "テアリング テスト"
msgctxt "IDS_SCALE_16_9"
msgid "Scale to 16:9 TV,%.3f,%.3f,%.3f,%.3f"
-msgstr "16:9 ç”»é¢ã«åˆã‚ã›ã‚‹,%.3f,%.3f,%.3f,%.3f"
+msgstr "16:9 TV ç”»é¢ã«åˆã‚ã›ã‚‹,%.3f,%.3f,%.3f,%.3f"
msgctxt "IDS_SCALE_WIDESCREEN"
msgid "Zoom To Widescreen,%.3f,%.3f,%.3f,%.3f"
@@ -1170,11 +1162,11 @@ msgstr "サイズ変更後ã®ã‚·ã‚§ãƒ¼ãƒ€ã‚’設定ã§ãã¾ã›ã‚“ã§ã—ãŸ"
msgctxt "IDS_MAINFRM_BOTH_SHADERS_FAILED"
msgid "Failed to set both pre-resize and post-resize shaders"
-msgstr "サイズ変更å‰ã¨ã‚µã‚¤ã‚ºå¤‰æ›´å¾Œã®ã‚·ã‚§ãƒ¼ãƒ€ã‚’設定ã§ãã¾ã›ã‚“ã§ã—ãŸ"
+msgstr "サイズ変更å‰ãŠã‚ˆã³ã‚µã‚¤ã‚ºå¤‰æ›´å¾Œã®ã‚·ã‚§ãƒ¼ãƒ€ã‚’設定ã§ãã¾ã›ã‚“ã§ã—ãŸ"
msgctxt "IDS_DEBUGSHADERS_FIRSTRUN_MSG"
msgid "Shaders are recompiled automatically when the corresponding files are modified."
-msgstr "対応ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆã€ã‚·ã‚§ãƒ¼ãƒ€ã¯è‡ªå‹•ã§å†ã‚³ãƒ³ãƒ‘イルã•ã‚Œã¾ã™ã€‚"
+msgstr "対応ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ãŒå¤‰æ›´ã•ã‚ŒãŸå ´åˆã€ã‚·ã‚§ãƒ¼ãƒ€ã¯è‡ªå‹•çš„ã«å†ã‚³ãƒ³ãƒ‘イルã•ã‚Œã¾ã™ã€‚"
msgctxt "IDS_SHADER_DLL_ERR_0"
msgid "Cannot load %s, pixel shaders will not work."
@@ -1230,7 +1222,7 @@ msgstr "+%d%%"
msgctxt "IDS_PLAYLIST_ADDFOLDER"
msgid "Add containing folder"
-msgstr "ファイルãŒå­˜åœ¨ã™ã‚‹ãƒ•ã‚©ãƒ«ãƒ€ã‚’追加"
+msgstr "ã“ã®ã‚¢ã‚¤ãƒ†ãƒ ã®ãƒ•ã‚©ãƒ«ãƒ€ã‚’追加"
msgctxt "IDS_HW_INDICATOR"
msgid "[H/W]"
@@ -1258,7 +1250,7 @@ msgstr "接続ã™ã‚‹ãŸã‚ã«è³‡æ ¼æƒ…報を入力ã—ã¦ãã ã•ã„"
msgctxt "IDS_SUB_SAVE_EXTERNAL_STYLE_FILE"
msgid "Save custom style"
-msgstr "ユーザー設定ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚’ä¿å­˜"
+msgstr "カスタム スタイルをä¿å­˜ã™ã‚‹"
msgctxt "IDS_CONTENT_EDUCATION_SCIENCE"
msgid "Education/Science/Factual topics"
@@ -1266,11 +1258,11 @@ msgstr "教育/科学/事実"
msgctxt "IDS_PPAGEADVANCED_HIDE_WINDOWED"
msgid "Hides controls and panels also in windowed mode."
-msgstr "ウィンドウ モードã§ã‚‚コントロールやパãƒãƒ«ã‚’éš ã—ã¾ã™ã€‚"
+msgstr "ウィンドウ モードã§ã‚‚コントロールãŠã‚ˆã³ãƒ‘ãƒãƒ«ã‚’éš ã—ã¾ã™ã€‚"
msgctxt "IDS_PPAGEADVANCED_BLOCK_VSFILTER"
msgid "Prevent external subtitle renderer to be loaded when internal is in use."
-msgstr "内蔵ã®å­—幕レンダラを使用ã—ã¦ã„ã‚‹å ´åˆã€å¤–部ã®å­—幕レンダラを読ã¿è¾¼ã¾ãªã„よã†ã«ã—ã¾ã™ã€‚"
+msgstr "内部字幕レンダラを使用ã—ã¦ã„ã‚‹å ´åˆã€å¤–部字幕レンダラを読ã¿è¾¼ã¾ãªã„よã†ã«ã—ã¾ã™ã€‚"
msgctxt "IDS_PPAGEADVANCED_COL_NAME"
msgid "Name"
@@ -1282,7 +1274,7 @@ msgstr "値"
msgctxt "IDS_PPAGEADVANCED_RECENT_FILES_NUMBER"
msgid "Maximum number of files shown in the \"Recent files\" menu and for which the position is potentially saved."
-msgstr "「最近使ã£ãŸãƒ•ã‚¡ã‚¤ãƒ«ã€ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«è¡¨ç¤ºã•ã‚Œã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€å¤§æ•°ã§ã€å†ç”Ÿä½ç½®ãŒä¿å­˜ã§ãるファイルã®æœ€å¤§æ•°ã§ã™ã€‚"
+msgstr "「最近使ã£ãŸãƒ•ã‚¡ã‚¤ãƒ«ã€ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«è¡¨ç¤ºã•ã‚Œã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ãŠã‚ˆã³å†ç”Ÿä½ç½®ãŒä¿å­˜ã§ãるファイルã®æœ€å¤§æ•°ã§ã™ã€‚"
msgctxt "IDS_PPAGEADVANCED_FILE_POS_LONGER"
msgid "Remember file position only for files longer than N minutes."
@@ -1330,7 +1322,7 @@ msgstr "オーディオ専用モードã§èª­ã¿è¾¼ã¾ã‚ŒãŸã‚«ãƒãƒ¼ã‚¢ãƒ¼ãƒˆã®
msgctxt "IDS_SUBTITLE_DELAY_STEP_TOOLTIP"
msgid "The subtitle delay will be decreased/increased by this value each time the corresponding hotkeys are used (%s/%s)."
-msgstr "字幕ã®é…延ãŒã“ã®å€¤ã§ã€å¯¾å¿œã™ã‚‹ãƒ›ãƒƒãƒˆã‚­ãƒ¼ (%s/%s) ãŒä½¿ç”¨ã•ã‚Œã‚‹ãŸã³ã«æ¸›å°‘/増加ã•ã‚Œã¾ã™ã€‚"
+msgstr "字幕ã®é…延ã¯ã€å¯¾å¿œã™ã‚‹ãƒ›ãƒƒãƒˆã‚­ãƒ¼ (%s/%s) ãŒä½¿ç”¨ã•ã‚Œã‚‹ãŸã³ã«ã€ã“ã®å€¤ã§æ¸›å°‘/増加ã—ã¾ã™ã€‚"
msgctxt "IDS_HOTKEY_NOT_DEFINED"
msgid "<not defined>"
@@ -1374,7 +1366,7 @@ msgstr "縦横比 %d:%d"
msgctxt "IDS_PPAGEADVANCED_LOGGER"
msgid "Enables logging to file (requires restart)"
-msgstr "ファイルã¸ã®ãƒ­ã‚°è¨˜éŒ²ã‚’有効ã«ã—ã¾ã™ (å†èµ·å‹•ãŒå¿…è¦)"
+msgstr "ファイルã¸ã®ãƒ­ã‚°è¨˜éŒ²ã‚’有効ã«ã—ã¾ã™ã€‚ (å†èµ·å‹•ãŒå¿…è¦)"
msgctxt "IDS_TIMER_REMAINING_TIME"
msgid "Remaining time"
@@ -1392,6 +1384,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "å†ç”Ÿçµ‚了後: é–‰ã˜ã‚‹"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC ã®åˆæœŸåŒ–中ã«å•é¡ŒãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ã‚ãªãŸã®ã”å”力ã«ã‚ˆã£ã¦å•é¡Œã‚’解決ã§ãã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。\n\nå•é¡Œã‚’報告ã—ã¾ã™ã‹ï¼Ÿ"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "映åƒã‚ˆã‚Šã‚‚音声ãŒæ—©ãå†ç”Ÿã•ã‚Œã‚‹å ´åˆã¯æ­£ã®å€¤ã‚’ã€é…ãå†ç”Ÿã•ã‚Œã‚‹å ´åˆã¯è² ã®å€¤ã‚’入力ã—ã¦ãã ã•ã„。"
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "プレビューã¯ç¾åœ¨ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚MPC-HC ã®ã‚ªãƒ—ションã§æœ‰åŠ¹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "ã“ã®ã‚ªãƒ—ションã¯é›¢ã‚ŒãŸå ´æ‰€ã‹ã‚‰ãƒ¡ãƒ‡ã‚£ã‚¢ ファイルをプレビューã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚é©åˆ‡ã«ä¿è­·ã•ã‚ŒãŸãƒ—ライベート ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ä¸Šã§ã®ã¿ä½¿ç”¨ã—ã¦ãã ã•ã„。\n\n本当ã«ã“ã®ã‚ªãƒ—ションを有効ã«ã—ã¾ã™ã‹ï¼Ÿ"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "内部字幕レンダラ"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "デãƒã‚¤ã‚¹ã‚’é–‹ã"
@@ -1676,6 +1688,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: ファイルåを表示"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "DVD ã®å†ç”Ÿ"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "BD ã®å†ç”Ÿ"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: レンダラ統計情報を表示"
@@ -1957,20 +1977,20 @@ msgid "Options"
msgstr "オプション"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "次ã®éŸ³å£°"
+msgid "Next Audio Track"
+msgstr "次ã®éŸ³å£°ãƒˆãƒ©ãƒƒã‚¯"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "å‰ã®éŸ³å£°"
+msgid "Prev Audio Track"
+msgstr "å‰ã®éŸ³å£°ãƒˆãƒ©ãƒƒã‚¯"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "次ã®å­—幕"
+msgid "Next Subtitle Track"
+msgstr "次ã®å­—幕トラック"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "å‰ã®å­—幕"
+msgid "Prev Subtitle Track"
+msgstr "å‰ã®å­—幕トラック"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1980,22 +2000,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "字幕ã®å†èª­ã¿è¾¼ã¿"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "次ã®éŸ³å£° (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "å‰ã®éŸ³å£° (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "次ã®å­—幕 (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "å‰ã®å­—幕 (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "次ã®ã‚¢ãƒ³ã‚°ãƒ« (DVD)"
@@ -2005,20 +2009,20 @@ msgid "Prev Angle (DVD)"
msgstr "å‰ã®ã‚¢ãƒ³ã‚°ãƒ« (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "次ã®éŸ³å£° (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "次ã®éŸ³å£°ãƒˆãƒ©ãƒƒã‚¯ (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "å‰ã®éŸ³å£° (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "å‰ã®éŸ³å£°ãƒˆãƒ©ãƒƒã‚¯ (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "次ã®å­—幕 (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "次ã®å­—幕トラック (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "å‰ã®å­—幕 (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "å‰ã®å­—幕トラック (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2098,7 +2102,7 @@ msgstr "フレーム レート"
msgctxt "IDS_MAINFRM_6"
msgid "drawn: %d, dropped: %d"
-msgstr "å†ç”Ÿ: %d, 破棄: %d"
+msgstr "å†ç”Ÿ: %d, 欠è½: %d"
msgctxt "IDS_AG_FRAMES"
msgid "Frames"
@@ -2134,7 +2138,7 @@ msgstr "MPC-HC ã¯ãƒ•ã‚¡ã‚¤ãƒ«å½¢å¼ã®é–¢é€£ä»˜ã‘を変更ã™ã‚‹å分ãªæ¨©é™
msgctxt "IDS_APP_DESCRIPTION"
msgid "MPC-HC is an extremely light-weight, open source media player for Windows. It supports all common video and audio file formats available for playback. We are 100% spyware free, there are no advertisements or toolbars."
-msgstr "MPC-HC ã¯éžå¸¸ã«è»½é‡ãª Windows 用オープン ソースã®ãƒ¡ãƒ‡ã‚£ã‚¢ プレーヤーã§ã™ã€‚å†ç”Ÿã«ä½¿ç”¨ã•ã‚Œã‚‹ä¸€èˆ¬çš„ãªã™ã¹ã¦ã®ãƒ“デオãŠã‚ˆã³ã‚ªãƒ¼ãƒ‡ã‚£ã‚ª ファイル形å¼ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ç§ãŸã¡ã¯ 100ï¼… スパイウェアをå«ã¾ãšã€åºƒå‘Šã‚„ツールãƒãƒ¼ã‚‚ã‚ã‚Šã¾ã›ã‚“。"
+msgstr "MPC-HC ã¯éžå¸¸ã«è»½é‡ãª Windows 用オープン ソースã®ãƒ¡ãƒ‡ã‚£ã‚¢ プレーヤーã§ã™ã€‚å†ç”Ÿã«ä½¿ç”¨ã•ã‚Œã‚‹ä¸€èˆ¬çš„ãªã™ã¹ã¦ã®ãƒ“デオãŠã‚ˆã³ã‚ªãƒ¼ãƒ‡ã‚£ã‚ª ファイル形å¼ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ç§ãŸã¡ã¯ 100ï¼… スパイウェアをå«ã¾ãšã€åºƒå‘Šã‚„ツール ãƒãƒ¼ã‚‚ã‚ã‚Šã¾ã›ã‚“。"
msgctxt "IDS_MAINFRM_12"
msgid "channel"
@@ -2182,7 +2186,7 @@ msgstr "DVD: ディスクã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã¨ãƒ‡ã‚³ãƒ¼ãƒ€ã®ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã®ä
msgctxt "IDS_D3DFS_WARNING"
msgid "This option is designed to avoid tearing. However, it will also prevent MPC-HC from displaying the context menu and any dialog box during playback.\n\nDo you really want to activate this option?"
-msgstr "ã“ã®ã‚ªãƒ—ションã¯ãƒ†ã‚¢ãƒªãƒ³ã‚°ã‚’除去ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ãŒã€å†ç”Ÿä¸­ã«ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ メニューã¨ãƒ€ã‚¤ã‚¢ãƒ­ã‚° ボックスを表示ã§ããªããªã‚Šã¾ã™ã€‚\n\n本当ã«ã“ã®ã‚ªãƒ—ションを有効ã«ã—ã¾ã™ã‹ï¼Ÿ"
+msgstr "ã“ã®ã‚ªãƒ—ションã¯ãƒ†ã‚¢ãƒªãƒ³ã‚°ã‚’除去ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•ã‚Œã¦ã„ã¾ã™ãŒã€å†ç”Ÿä¸­ã«ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ メニューãŠã‚ˆã³ãƒ€ã‚¤ã‚¢ãƒ­ã‚° ボックスãŒè¡¨ç¤ºã§ããªããªã‚Šã¾ã™ã€‚\n\n本当ã«ã“ã®ã‚ªãƒ—ションを有効ã«ã—ã¾ã™ã‹ï¼Ÿ"
msgctxt "IDS_MAINFRM_139"
msgid "Sub delay: %ld ms"
@@ -2222,7 +2226,7 @@ msgstr "縦横比"
msgctxt "IDS_MAINFRM_37"
msgid ", Total: %ld, Dropped: %ld"
-msgstr ", åˆè¨ˆ: %ld, 破棄: %ld"
+msgstr ", åˆè¨ˆ: %ld, 欠è½: %ld"
msgctxt "IDS_MAINFRM_38"
msgid ", Size: %I64d KB"
@@ -2310,7 +2314,7 @@ msgstr "サムãƒã‚¤ãƒ«ãŒå°ã•ã™ãŽã¦ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã§ãã¾ã›ã‚“
msgctxt "IDS_CANNOT_LOAD_SUB"
msgid "To load subtitles you have to change the video renderer type and reopen the file.\n- DirectShow: VMR-7/VMR-9 (renderless), EVR (CP), Sync, madVR or Haali\n- RealMedia: Special renderer for RealMedia, or open it through DirectShow\n- QuickTime: DX7 or DX9 renderer for QuickTime\n- ShockWave: n/a"
-msgstr "字幕を読ã¿è¾¼ã‚€ãŸã‚ã«ã¯ãƒ“デオ レンダラを変更ã—ファイルを​​å†åº¦é–‹ãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚\n- DirectShow: VMR-7/VMR-9 (レンダーレス)ã€EVR (カスタム プレゼンタ)ã€åŒæœŸã€madVRã€Haali\n- RealMedia: RealMedia 用ã®ç‰¹åˆ¥ãªãƒ¬ãƒ³ãƒ€ãƒ©ã¾ãŸã¯ DirectShow を用ã„ã¦é–‹ã\n- QuickTime: QuickTime 用㮠DirectX 7 ã¾ãŸã¯ DirectX 9 レンダラ\n- ShockWave: n/a"
+msgstr "字幕を読ã¿è¾¼ã‚€ãŸã‚ã«ã¯ãƒ“デオ レンダラを変更ã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†â€‹â€‹åº¦é–‹ãå¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚\n- DirectShow: VMR-7/VMR-9 (レンダーレス)ã€EVR (カスタム プレゼンタ)ã€åŒæœŸã€madVRã€Haali\n- RealMedia: RealMedia 用ã®ç‰¹åˆ¥ãªãƒ¬ãƒ³ãƒ€ãƒ©ã¾ãŸã¯ DirectShow を用ã„ã¦é–‹ã\n- QuickTime: QuickTime 用㮠DirectX 7 ã¾ãŸã¯ DirectX 9 レンダラ\n- ShockWave: n/a"
msgctxt "IDS_SUBTITLE_FILES_FILTER"
msgid "Subtitle files"
@@ -2384,14 +2388,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "ç¾åœ¨ã®ãƒ¢ãƒ‹ã‚¿"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC ã¯äºˆæœŸã›ãšã«çµ‚了ã—ã¾ã—ãŸã€‚ã“ã®å•é¡Œã‚’解決ã—ã‚„ã™ãã™ã‚‹ãŸã‚ã«ã€ç§ãŸã¡ã®ãƒã‚° トラッカーã«ã“ã®ãƒ•ã‚¡ã‚¤ãƒ« \"%s\" ã‚’é€ä¿¡ã—ã¦ãã ã•ã„。\n\n今ã™ãミニダンプ ファイルをå«ã‚€ãƒ•ã‚©ãƒ«ãƒ€ã‚’é–‹ãã€ãƒã‚° トラッカーã«ç§»å‹•ã—ã¾ã™ã‹ï¼Ÿ"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "\"%s\" ã®ãƒ€ãƒ³ãƒ— ファイルを作æˆã§ãã¾ã›ã‚“ã§ã—㟠(エラー %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "ディレクトリをé¸æŠžã—ã¦ãã ã•ã„"
@@ -2565,12 +2561,12 @@ msgid "Volume boost Max"
msgstr "音é‡ã®ãƒ–ースト 最大"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "使用方法: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\t最åˆã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ãƒ•ã‚©ãƒ«ãƒ€ãŒèª­ã¿è¾¼ã¾ã‚Œã‚‹ (ワイルドカードã®ä½¿ç”¨å¯, \"-\" ãŒæ¨™æº–入力を表ã™)\n/dub \"dubname\"\t追加ã®ã‚ªãƒ¼ãƒ‡ã‚£ã‚ª ファイルを読ã¿è¾¼ã‚€\n/dubdelay \"file\"\t追加ã®ã‚ªãƒ¼ãƒ‡ã‚£ã‚ª ファイルを XXms シフトã—ã¦èª­ã¿è¾¼ã‚€ (ファイル㌠\"...DELAY XXms...\" ã‚’å«ã‚€å ´åˆ)\n/d3dfs\t\tDirect3D フルスクリーン モードã§èµ·å‹•ã™ã‚‹\n/sub \"subname\"\t追加ã®å­—幕ファイルを読ã¿è¾¼ã‚€\n/filter \"filtername\"\tDLL ã‹ã‚‰ DirectShow フィルタを読ã¿è¾¼ã‚€ (ワイルドカードã®ä½¿ç”¨å¯)\n/dvd\t\tDVD モードã§èµ·å‹•ã™ã‚‹, \"pathname\" 㯠DVD フォルダを表㙠(çœç•¥å¯èƒ½)\n/dvdpos T#C\tタイトル T ã®ãƒãƒ£ãƒ—ター C ã‹ã‚‰å†ç”Ÿã‚’開始ã™ã‚‹\n/dvdpos T#hh:mm\tタイトル T ã® hh:mm:ss ã®ä½ç½®ã‹ã‚‰å†ç”Ÿã‚’開始ã™ã‚‹\n/cd\t\t音楽 CD ã¾ãŸã¯ (S)VCD ã®å…¨ãƒˆãƒ©ãƒƒã‚¯ã‚’読ã¿è¾¼ã‚€, \"pathname\" ã¯ãƒ‰ãƒ©ã‚¤ãƒ– パスを指定ã™ã‚‹ (çœç•¥å¯èƒ½)\n/device\t\t既定ã®ãƒ“デオ デãƒã‚¤ã‚¹ã‚’é–‹ã\n/open\t\t自動ã§å†ç”Ÿã‚’開始ã›ãšã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é–‹ã\n/play\t\tプレーヤーã®èµ·å‹•ã¨åŒæ™‚ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†ç”Ÿã™ã‚‹\n/close\t\tå†ç”Ÿçµ‚了後ã«ãƒ—レーヤーを終了ã™ã‚‹ (/play ã®ä½¿ç”¨æ™‚ã®ã¿æœ‰åŠ¹)\n/shutdown \tå†ç”Ÿçµ‚了後㫠OS をシャットダウンã™ã‚‹\n/standby\t\tå†ç”Ÿçµ‚了後㫠OS をスタンãƒã‚¤ モードã«ã™ã‚‹\n/hibernate\t\tå†ç”Ÿçµ‚了後㫠OS を休止状態ã«ã™ã‚‹\n/logoff\t\tå†ç”Ÿçµ‚了後ã«ãƒ­ã‚°ã‚ªãƒ•ã™ã‚‹\n/lock\t\tå†ç”Ÿçµ‚了後ã«ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’ロックã™ã‚‹\n/monitoroff\tå†ç”Ÿçµ‚了後ã«ãƒ¢ãƒ‹ã‚¿ã®é›»æºã‚’切る\n/playnext\t\tå†ç”Ÿçµ‚了後ã«ãƒ•ã‚©ãƒ«ãƒ€å†…ã®æ¬¡ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é–‹ã\n/fullscreen\t全画é¢è¡¨ç¤ºãƒ¢ãƒ¼ãƒ‰ã§èµ·å‹•ã™ã‚‹\n/minimized\t最å°åŒ–モードã§èµ·å‹•ã™ã‚‹\n/new\t\tæ–°ã—ã„プレーヤーを起動ã™ã‚‹\n/add\t\t\"pathname\" ã‚’å†ç”Ÿãƒªã‚¹ãƒˆã«è¿½åŠ ã™ã‚‹, /open ãŠã‚ˆã³ /play ã¨åŒæ™‚ã«ä½¿ç”¨ã§ãã‚‹\n/randomize\tå†ç”Ÿãƒªã‚¹ãƒˆã‚’ランダム化ã™ã‚‹\n/regvid\t\tビデオ ファイルã«é–¢é€£ä»˜ã‘ã‚‹\n/regaud\t\tオーディオ ファイルã«é–¢é€£ä»˜ã‘ã‚‹\n/regpl\t\tå†ç”Ÿãƒªã‚¹ãƒˆ ファイルã«é–¢é€£ä»˜ã‘ã‚‹\n/regall\t\tサãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ç¨®é¡žã«é–¢é€£ä»˜ã‘ã‚‹\n/unregall\t\tã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®é–¢é€£ä»˜ã‘を解除ã™ã‚‹\n/start ms\t\t\"ms\" (ミリ秒) ã®ä½ç½®ã‹ã‚‰å†ç”Ÿã‚’開始ã™ã‚‹\n/startpos hh:mm:ss\thh:mm:ss ã®ä½ç½®ã‹ã‚‰å†ç”Ÿã‚’開始ã™ã‚‹\n/fixedsize w,h\tウィンドウ サイズを固定ã™ã‚‹\n/monitor N\tN 番目 (N 㯠1 ã‹ã‚‰å§‹ã¾ã‚‹) ã®ãƒ¢ãƒ‹ã‚¿ã§èµ·å‹•ã™ã‚‹\n/audiorenderer N\tN 番目 (N 㯠1 ã‹ã‚‰å§‹ã¾ã‚‹) ã®ã‚ªãƒ¼ãƒ‡ã‚£ã‚ª レンダラを使用ã™ã‚‹\n\t\t(\"出力\" 設定をå‚ç…§)\n/shaderpreset \"Pr\"\t\"Pr\" シェーダ プリセットを使用ã™ã‚‹\n/pns \"name\"\t使用ã™ã‚‹ãƒ‘ン&スキャンã®ãƒ—リセットåを指定ã™ã‚‹\n/iconsassoc\tファイル形å¼ã®ã‚¢ã‚¤ã‚³ãƒ³ã‚’å†åº¦é–¢é€£ä»˜ã‘ã‚‹\n/nofocus\t\tãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ MPC-HC ã‚’é–‹ã\n/webport N\t指定ã—ãŸãƒãƒ¼ãƒˆä¸Šã§ã‚¦ã‚§ãƒ– インターフェイスを開始ã™ã‚‹\n/debug\t\tOSD ã§ãƒ‡ãƒãƒƒã‚°æƒ…報を表示ã™ã‚‹\n/nocrashreporter\tクラッシュ レãƒãƒ¼ãƒˆã‚’無効ã«ã™ã‚‹\n/slave \"hWnd\"\tスレーブã¨ã—㦠MPC-HC を使用ã™ã‚‹\n/reset\t\t既定ã®è¨­å®šã‚’復元ã™ã‚‹\n/help /h /?\tコマンド ライン スイッãƒã®ãƒ˜ãƒ«ãƒ—を表示ã™ã‚‹\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "使用方法: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\t最åˆã®ãƒ•ã‚¡ã‚¤ãƒ«ã‹ãƒ•ã‚©ãƒ«ãƒ€ãŒèª­ã¿è¾¼ã¾ã‚Œã‚‹\n\t\t(ワイルドカードã®ä½¿ç”¨å¯, \"-\" ãŒæ¨™æº–入力を表ã™)\n/dub \"dubname\"\t追加ã®ã‚ªãƒ¼ãƒ‡ã‚£ã‚ª ファイルを読ã¿è¾¼ã‚€\n/dubdelay \"file\"\t追加ã®ã‚ªãƒ¼ãƒ‡ã‚£ã‚ª ファイルを XXms シフトã—ã¦èª­ã¿è¾¼ã‚€\n\t\t(ファイル㌠\"...DELAY XXms...\" ã‚’å«ã‚€å ´åˆ)\n/d3dfs\t\tDirect3D フルスクリーン モードã§èµ·å‹•ã™ã‚‹\n/sub \"subname\"\t追加ã®å­—幕ファイルを読ã¿è¾¼ã‚€\n/filter \"filtername\"\tDLL ã‹ã‚‰ DirectShow フィルタを読ã¿è¾¼ã‚€ (ワイルドカードã®ä½¿ç”¨å¯)\n/dvd\t\tDVD モードã§èµ·å‹•ã™ã‚‹\n\t\t\"pathname\" 㯠DVD フォルダを表㙠(çœç•¥å¯èƒ½)\n/dvdpos T#C\tタイトル T ã®ãƒãƒ£ãƒ—ター C ã‹ã‚‰å†ç”Ÿã‚’開始ã™ã‚‹\n/dvdpos T#hh:mm\tタイトル T ã® hh:mm:ss ã®ä½ç½®ã‹ã‚‰å†ç”Ÿã‚’開始ã™ã‚‹\n/cd\t\t音楽 CD ã¾ãŸã¯ (S)VCD ã®å…¨ãƒˆãƒ©ãƒƒã‚¯ã‚’読ã¿è¾¼ã‚€\n\t\t\"pathname\" ã¯ãƒ‰ãƒ©ã‚¤ãƒ– パスを指定ã™ã‚‹ (çœç•¥å¯èƒ½)\n/device\t\t既定ã®ãƒ“デオ デãƒã‚¤ã‚¹ã‚’é–‹ã\n/open\t\t自動的ã«å†ç”Ÿã‚’開始ã›ãšã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é–‹ã\n/play\t\tプレーヤーã®èµ·å‹•ã¨åŒæ™‚ã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†ç”Ÿã™ã‚‹\n/close\t\tå†ç”Ÿçµ‚了後ã«ãƒ—レーヤーを終了ã™ã‚‹ (/play ã®ä½¿ç”¨æ™‚ã®ã¿æœ‰åŠ¹)\n/shutdown \tå†ç”Ÿçµ‚了後㫠OS をシャットダウンã™ã‚‹\n/standby\t\tå†ç”Ÿçµ‚了後㫠OS をスタンãƒã‚¤ モードã«ã™ã‚‹\n/hibernate\t\tå†ç”Ÿçµ‚了後㫠OS を休止状態ã«ã™ã‚‹\n/logoff\t\tå†ç”Ÿçµ‚了後ã«ãƒ­ã‚°ã‚ªãƒ•ã™ã‚‹\n/lock\t\tå†ç”Ÿçµ‚了後ã«ãƒ¯ãƒ¼ã‚¯ã‚¹ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’ロックã™ã‚‹\n/monitoroff\tå†ç”Ÿçµ‚了後ã«ãƒ¢ãƒ‹ã‚¿ã®é›»æºã‚’切る\n/playnext\t\tå†ç”Ÿçµ‚了後ã«ãƒ•ã‚©ãƒ«ãƒ€å†…ã®æ¬¡ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é–‹ã\n/fullscreen\t全画é¢è¡¨ç¤ºãƒ¢ãƒ¼ãƒ‰ã§èµ·å‹•ã™ã‚‹\n/minimized\t最å°åŒ–モードã§èµ·å‹•ã™ã‚‹\n/new\t\tæ–°ã—ã„プレーヤーを起動ã™ã‚‹\n/add\t\t\"pathname\" ã‚’å†ç”Ÿãƒªã‚¹ãƒˆã«è¿½åŠ ã™ã‚‹\n\t\t/open ãŠã‚ˆã³ /play ã¨åŒæ™‚ã«ä½¿ç”¨ã§ãã‚‹\n/randomize\tå†ç”Ÿãƒªã‚¹ãƒˆã‚’ランダム化ã™ã‚‹\n/regvid\t\tビデオ ファイルã«é–¢é€£ä»˜ã‘ã‚‹\n/regaud\t\tオーディオ ファイルã«é–¢é€£ä»˜ã‘ã‚‹\n/regpl\t\tå†ç”Ÿãƒªã‚¹ãƒˆ ファイルã«é–¢é€£ä»˜ã‘ã‚‹\n/regall\t\tサãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®ç¨®é¡žã«é–¢é€£ä»˜ã‘ã‚‹\n/unregall\t\tã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®é–¢é€£ä»˜ã‘を解除ã™ã‚‹\n/start ms\t\t\"ms\" (ミリ秒) ã®ä½ç½®ã‹ã‚‰å†ç”Ÿã‚’開始ã™ã‚‹\n/startpos hh:mm:ss\thh:mm:ss ã®ä½ç½®ã‹ã‚‰å†ç”Ÿã‚’開始ã™ã‚‹\n/fixedsize w,h\tウィンドウ サイズを固定ã™ã‚‹\n/monitor N\tN 番目 (N 㯠1 ã‹ã‚‰å§‹ã¾ã‚‹) ã®ãƒ¢ãƒ‹ã‚¿ã§èµ·å‹•ã™ã‚‹\n/audiorenderer N\tN 番目 (N 㯠1 ã‹ã‚‰å§‹ã¾ã‚‹) ã®ã‚ªãƒ¼ãƒ‡ã‚£ã‚ª レンダラを使用ã™ã‚‹\n\t\t(\"出力\" 設定をå‚ç…§)\n/shaderpreset \"Pr\"\t\"Pr\" シェーダ プリセットを使用ã™ã‚‹\n/pns \"name\"\t使用ã™ã‚‹ãƒ‘ン&スキャンã®ãƒ—リセットåを指定ã™ã‚‹\n/iconsassoc\tファイル形å¼ã®ã‚¢ã‚¤ã‚³ãƒ³ã‚’å†åº¦é–¢é€£ä»˜ã‘ã‚‹\n/nofocus\t\tãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ã§ MPC-HC ã‚’é–‹ã\n/webport N\t指定ã—ãŸãƒãƒ¼ãƒˆä¸Šã§ã‚¦ã‚§ãƒ– インターフェイスを開始ã™ã‚‹\n/debug\t\tOSD ã§ãƒ‡ãƒãƒƒã‚°æƒ…報を表示ã™ã‚‹\n/nocrashreporter\tクラッシュ レãƒãƒ¼ãƒˆã‚’無効ã«ã™ã‚‹\n/slave \"hWnd\"\tスレーブã¨ã—㦠MPC-HC を使用ã™ã‚‹\n/hwgpu \"index\"\tãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ デコーディングã«ä½¿ç”¨ã•ã‚Œã‚‹ GPU ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’設定ã™ã‚‹\n\t\tCUVID ãŠã‚ˆã³ DXVA2 (copy-back) ã§ã®ã¿ä½¿ç”¨ã§ãã‚‹\n/reset\t\t既定ã®è¨­å®šã‚’復元ã™ã‚‹\n/help /h /?\tコマンド ライン スイッãƒã®ãƒ˜ãƒ«ãƒ—を表示ã™ã‚‹\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
-msgstr "コマンドライン文字列ã«ä¸æ˜Žãªã‚¹ã‚¤ãƒƒãƒãŒè¦‹ã¤ã‹ã‚Šã¾ã—ãŸ: \n\n"
+msgstr "コマンド ライン文字列ã«èªè­˜ã§ããªã„スイッãƒãŒè¦‹ã¤ã‹ã‚Šã¾ã—ãŸ: \n\n"
msgctxt "IDS_AG_TOGGLE_INFO"
msgid "Toggle Information"
@@ -2662,7 +2658,7 @@ msgstr "字幕ãŒèª­ã¿è¾¼ã¾ã‚Œã¦ã„ãªã„ã‹ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ãªã„レ
msgctxt "IDS_LOGO_AUTHOR"
msgid "Author unknown. Contact us if you made this logo!"
-msgstr "作者ä¸æ˜Žã§ã™ã€‚ã“ã®ãƒ­ã‚´ã‚’作æˆã•ã‚ŒãŸæ–¹ã¯ãŠçŸ¥ã‚‰ã›ãã ã•ã„ï¼"
+msgstr "ä¸æ˜Žãªä½œæˆè€…ã§ã™ã€‚ã“ã®ãƒ­ã‚´ã‚’作æˆã•ã‚ŒãŸæ–¹ã¯ãŠçŸ¥ã‚‰ã›ãã ã•ã„ï¼"
msgctxt "IDS_NO_MORE_MEDIA"
msgid "No more media in the current folder."
@@ -2670,11 +2666,11 @@ msgstr "ç¾åœ¨ã®ãƒ•ã‚©ãƒ«ãƒ€ã«ã¯ã‚‚ã†ãƒ¡ãƒ‡ã‚£ã‚¢ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚Šã¾ã›
msgctxt "IDS_FIRST_IN_FOLDER"
msgid "The first file of the folder is already loaded."
-msgstr "フォルダã®æœ€åˆã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒã€ã™ã§ã«èª­ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™ã€‚"
+msgstr "フォルダ内ã®æœ€åˆã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒã€ã™ã§ã«èª­ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™ã€‚"
msgctxt "IDS_LAST_IN_FOLDER"
msgid "The last file of the folder is already loaded."
-msgstr "フォルダã®æœ€å¾Œã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒã€ã™ã§ã«èª­ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™ã€‚"
+msgstr "フォルダ内ã®æœ€å¾Œã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒã€ã™ã§ã«èª­ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™ã€‚"
msgctxt "IDS_FRONT_LEFT"
msgid "Front Left"
@@ -2750,11 +2746,11 @@ msgstr "トップ リア å³"
msgctxt "IDS_TIME_TOOLTIP_ABOVE"
msgid "Above seek bar"
-msgstr "シーク ãƒãƒ¼ã‚ˆã‚Šä¸Šã«"
+msgstr "シーク ãƒãƒ¼ã®ä¸Šã«"
msgctxt "IDS_TIME_TOOLTIP_BELOW"
msgid "Below seek bar"
-msgstr "シーク ãƒãƒ¼ã‚ˆã‚Šä¸‹ã«"
+msgstr "シーク ãƒãƒ¼ã®ä¸‹ã«"
msgctxt "IDS_VIDEO_STREAM"
msgid "Video: %s"
@@ -2790,19 +2786,19 @@ msgstr "ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ«ã‚¿ã‚’無効ã«ã™ã‚‹(&D)"
msgctxt "IDS_ENABLE_AUDIO_FILTERS"
msgid "Enable all audio decoders"
-msgstr "ã™ã¹ã¦ã®ã‚ªãƒ¼ãƒ‡ã‚£ã‚ª フィルタを有効ã«ã™ã‚‹"
+msgstr "ã™ã¹ã¦ã®ã‚ªãƒ¼ãƒ‡ã‚£ã‚ª デコーダを有効ã«ã™ã‚‹"
msgctxt "IDS_DISABLE_AUDIO_FILTERS"
msgid "Disable all audio decoders"
-msgstr "ã™ã¹ã¦ã®ã‚ªãƒ¼ãƒ‡ã‚£ã‚ª フィルタを無効ã«ã™ã‚‹"
+msgstr "ã™ã¹ã¦ã®ã‚ªãƒ¼ãƒ‡ã‚£ã‚ª デコーダを無効ã«ã™ã‚‹"
msgctxt "IDS_ENABLE_VIDEO_FILTERS"
msgid "Enable all video decoders"
-msgstr "ã™ã¹ã¦ã®ãƒ“デオ フィルタを有効ã«ã™ã‚‹"
+msgstr "ã™ã¹ã¦ã®ãƒ“デオ デコーダを有効ã«ã™ã‚‹"
msgctxt "IDS_DISABLE_VIDEO_FILTERS"
msgid "Disable all video decoders"
-msgstr "ã™ã¹ã¦ã®ãƒ“デオ フィルタを無効ã«ã™ã‚‹"
+msgstr "ã™ã¹ã¦ã®ãƒ“デオ デコーダを無効ã«ã™ã‚‹"
msgctxt "IDS_STRETCH_TO_WINDOW"
msgid "Stretch To Window"
@@ -3040,18 +3036,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "縦横比"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "WASAPI を使用ã™ã‚‹ (å†ç”Ÿã‚’å†é–‹ã™ã‚‹)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "æ—©é€ã‚Šã§ãƒŸãƒ¥ãƒ¼ãƒˆ"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "サウンド デãƒã‚¤ã‚¹:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "åž‚ç›´åŒæœŸ: オン"
@@ -3278,7 +3262,7 @@ msgstr "カラー設定をリセット"
msgctxt "IDS_USING_LATEST_STABLE"
msgid "\nYou are already using the latest stable version."
-msgstr "\nã‚ãªãŸã¯æ—¢ã«æœ€æ–°ã®å®‰å®šãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ã¦ã„ã¾ã™ã€‚"
+msgstr "\næ—¢ã«æœ€æ–°ã®å®‰å®šãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’使用ã—ã¦ã„ã¾ã™ã€‚"
msgctxt "IDS_USING_NEWER_VERSION"
msgid "Your current version is v%s.\n\nThe latest stable version is v%s."
@@ -3406,19 +3390,19 @@ msgstr "コマé€ã‚Šã§ãã¾ã›ã‚“。別ã®ãƒ“デオ レンダラを試ã—ã¦ã
msgctxt "IDS_SCREENSHOT_ERROR_REAL"
msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the default video renderer for RealMedia.\nSelect one of the DirectX renderers for RealMedia in MPC-HC's output options and reopen the file."
-msgstr "「画åƒã‚’ä¿å­˜ã€ 㨠「サムãƒã‚¤ãƒ«ã‚’ä¿å­˜ã€ ã®æ©Ÿèƒ½ã¯ã€RealMedia 用ã®æ¨™æº–ビデオ レンダラã§ã¯å‹•ä½œã—ã¾ã›ã‚“。\nMPC-HC ã®å‡ºåŠ›ã‚ªãƒ—ションã§ã€RealMedia 用㮠DirectX レンダラã®ã„ãšã‚Œã‹ã‚’é¸æŠžã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†åº¦é–‹ã„ã¦ãã ã•ã„。"
+msgstr "「画åƒã‚’ä¿å­˜ã€ ãŠã‚ˆã³ 「サムãƒã‚¤ãƒ«ã‚’ä¿å­˜ã€ ã®æ©Ÿèƒ½ã¯ã€RealMedia 用ã®æ¨™æº–ビデオ レンダラã§ã¯å‹•ä½œã—ã¾ã›ã‚“。\nMPC-HC ã®å‡ºåŠ›ã‚ªãƒ—ションã§ã€RealMedia 用㮠DirectX レンダラã®ã„ãšã‚Œã‹ã‚’é¸æŠžã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†åº¦é–‹ã„ã¦ãã ã•ã„。"
msgctxt "IDS_SCREENSHOT_ERROR_QT"
msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the default video renderer for QuickTime.\nSelect one of the DirectX renderers for QuickTime in MPC-HC's output options and reopen the file."
-msgstr "「画åƒã‚’ä¿å­˜ã€ 㨠「サムãƒã‚¤ãƒ«ã‚’ä¿å­˜ã€ ã®æ©Ÿèƒ½ã¯ã€QuickTime 用ã®æ¨™æº–ビデオ レンダラã§ã¯å‹•ä½œã—ã¾ã›ã‚“。\nMPC-HC ã®å‡ºåŠ›ã‚ªãƒ—ションã§ã€QuickTime 用㮠DirectX レンダラã®ã„ãšã‚Œã‹ã‚’é¸æŠžã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†åº¦é–‹ã„ã¦ãã ã•ã„。"
+msgstr "「画åƒã‚’ä¿å­˜ã€ ãŠã‚ˆã³ 「サムãƒã‚¤ãƒ«ã‚’ä¿å­˜ã€ ã®æ©Ÿèƒ½ã¯ã€QuickTime 用ã®æ¨™æº–ビデオ レンダラã§ã¯å‹•ä½œã—ã¾ã›ã‚“。\nMPC-HC ã®å‡ºåŠ›ã‚ªãƒ—ションã§ã€QuickTime 用㮠DirectX レンダラã®ã„ãšã‚Œã‹ã‚’é¸æŠžã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†åº¦é–‹ã„ã¦ãã ã•ã„。"
msgctxt "IDS_SCREENSHOT_ERROR_SHOCKWAVE"
msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work for Shockwave files."
-msgstr "「画åƒã‚’ä¿å­˜ã€ 㨠「サムãƒã‚¤ãƒ«ã‚’ä¿å­˜ã€ ã®æ©Ÿèƒ½ã¯ã€Shockwave ファイルã«å¯¾ã—ã¦å‹•ä½œã—ã¾ã›ã‚“。"
+msgstr "「画åƒã‚’ä¿å­˜ã€ ãŠã‚ˆã³ 「サムãƒã‚¤ãƒ«ã‚’ä¿å­˜ã€ ã®æ©Ÿèƒ½ã¯ã€Shockwave ファイルã«å¯¾ã—ã¦å‹•ä½œã—ã¾ã›ã‚“。"
msgctxt "IDS_SCREENSHOT_ERROR_OVERLAY"
msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the Overlay Mixer video renderer.\nChange the video renderer in MPC's output options and reopen the file."
-msgstr "「画åƒã‚’ä¿å­˜ã€ 㨠「サムãƒã‚¤ãƒ«ã‚’ä¿å­˜ã€ ã®æ©Ÿèƒ½ã¯ã€ã‚ªãƒ¼ãƒãƒ¼ãƒ¬ã‚¤ ミキサ ビデオ レンダラã§ã¯å‹•ä½œã—ã¾ã›ã‚“。\nMPC-HC ã®å‡ºåŠ›ã‚ªãƒ—ションã§ãƒ“デオレンダラを変更ã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†åº¦é–‹ã„ã¦ãã ã•ã„。"
+msgstr "「画åƒã‚’ä¿å­˜ã€ ãŠã‚ˆã³ 「サムãƒã‚¤ãƒ«ã‚’ä¿å­˜ã€ ã®æ©Ÿèƒ½ã¯ã€ã‚ªãƒ¼ãƒãƒ¼ãƒ¬ã‚¤ ミキサ ビデオ レンダラã§ã¯å‹•ä½œã—ã¾ã›ã‚“。\nMPC-HC ã®å‡ºåŠ›ã‚ªãƒ—ションã§ãƒ“デオレンダラを変更ã—ã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å†åº¦é–‹ã„ã¦ãã ã•ã„。"
msgctxt "IDS_SUBDL_DLG_CONNECT_ERROR"
msgid "Cannot connect to the online subtitles database."
@@ -3586,7 +3570,7 @@ msgstr "ãƒãƒ£ãƒ³ãƒãƒ«(&C)"
msgctxt "IDC_FASTSEEK_CHECK"
msgid "If \"latest keyframe\" is selected, seek to the first keyframe before the actual seek point.\nIf \"nearest keyframe\" is selected, seek to the first keyframe before or after the seek point depending on which is the closest."
-msgstr "「直å‰ã®ã‚­ãƒ¼ãƒ•ãƒ¬ãƒ¼ãƒ ã€ã‚’é¸æŠžã™ã‚‹ã¨ã€å®Ÿéš›ã®ã‚·ãƒ¼ã‚¯ ãƒã‚¤ãƒ³ãƒˆã‚ˆã‚Šå‰ã«ã‚る最åˆã®ã‚­ãƒ¼ãƒ•ãƒ¬ãƒ¼ãƒ ã‚’シークã—ã¾ã™ã€‚\n「最も近ã„キーフレームã€ã‚’é¸æŠžã™ã‚‹ã¨ã€å®Ÿéš›ã®ã‚·ãƒ¼ã‚¯ ãƒã‚¤ãƒ³ãƒˆã«ã©ã¡ã‚‰ãŒæœ€ã‚‚è¿‘ã„ã‹ã«ã‚ˆã£ã¦å‰ã¾ãŸã¯å¾Œã«ã‚る最åˆã®ã‚­ãƒ¼ãƒ•ãƒ¬ãƒ¼ãƒ ã‚’シークã—ã¾ã™ã€‚"
+msgstr "「直å‰ã®ã‚­ãƒ¼ãƒ•ãƒ¬ãƒ¼ãƒ ã€ã‚’é¸æŠžã—ãŸå ´åˆã€å®Ÿéš›ã®ã‚·ãƒ¼ã‚¯ ãƒã‚¤ãƒ³ãƒˆã‚ˆã‚Šå‰ã«ã‚る最åˆã®ã‚­ãƒ¼ãƒ•ãƒ¬ãƒ¼ãƒ ã‚’シークã—ã¾ã™ã€‚\n「最も近ã„キーフレームã€ã‚’é¸æŠžã—ãŸå ´åˆã€å®Ÿéš›ã®ã‚·ãƒ¼ã‚¯ ãƒã‚¤ãƒ³ãƒˆã«ã©ã¡ã‚‰ãŒæœ€ã‚‚è¿‘ã„ã‹ã«ã‚ˆã£ã¦å‰ã¾ãŸã¯å¾Œã«ã‚る最åˆã®ã‚­ãƒ¼ãƒ•ãƒ¬ãƒ¼ãƒ ã‚’シークã—ã¾ã™ã€‚"
msgctxt "IDC_ASSOCIATE_ALL_FORMATS"
msgid "Associate with all formats"
@@ -3608,3 +3592,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "設定"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ko.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ko.dialogs.po
index 946838756..df656e8f9 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ko.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ko.dialogs.po
@@ -1,5 +1,5 @@
# MPC-HC - Strings extracted from dialogs
-# Copyright (C) 2002 - 2015 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Level ASMer <zx132435@naver.com>, 2014-2015
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-09-19 20:08:04+0000\n"
-"PO-Revision-Date: 2015-01-30 04:00+0000\n"
-"Last-Translator: Level ASMer <zx132435@naver.com>\n"
-"Language-Team: Korean (http://www.transifex.com/projects/p/mpc-hc/language/ko/)\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-08-06 16:46+0000\n"
+"Last-Translator: Underground78\n"
+"Language-Team: Korean (http://www.transifex.com/mpc-hc/mpc-hc/language/ko/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -473,10 +473,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "오디오파ì¼ì„ ìžë™ìœ¼ë¡œ 열기"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr ""
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "컨트롤"
@@ -677,9 +673,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "전체화면시 최소화 예방 (기본 모니터가 ì—†ì„ì‹œ)"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Windows 7 작업표시줄기능 사용(작업표시줄ì—ì„œ 컨트롤가능)"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1170,8 +1166,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "ìžë§‰ *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1186,7 +1182,7 @@ msgid "Rotation"
msgstr "회전"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
+msgid "Subtitle Renderer"
msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
@@ -1205,6 +1201,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "로컬호스트로만 ì ‘ì†í—ˆìš©"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr ""
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "디버그 ì •ë³´ ì¸ì‡„"
@@ -1653,6 +1653,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "기본값"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG 품질:"
@@ -1669,8 +1713,16 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr ""
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
+msgid "Optional information"
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
@@ -1685,7 +1737,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr ""
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
msgstr ""
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ko.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ko.menus.po
index 059209e75..7e2cba90e 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ko.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ko.menus.po
@@ -1,16 +1,16 @@
# MPC-HC - Strings extracted from menus
-# Copyright (C) 2002 - 2015 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
-# Level ASMer <zx132435@naver.com>, 2014
+# Level ASMer <zx132435@naver.com>, 2014-2015
# limeburst <me@limeburst.net>, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-10-25 18:58:24+0000\n"
-"PO-Revision-Date: 2014-11-02 09:01+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-09-20 03:35+0000\n"
"Last-Translator: Level ASMer <zx132435@naver.com>\n"
-"Language-Team: Korean (http://www.transifex.com/projects/p/mpc-hc/language/ko/)\n"
+"Language-Team: Korean (http://www.transifex.com/mpc-hc/mpc-hc/language/ko/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -207,7 +207,7 @@ msgstr ""
msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
msgid "Show &File Name"
-msgstr ""
+msgstr "íŒŒì¼ ì´ë¦„ 보기"
msgctxt "POPUP"
msgid "&Output Range"
@@ -559,15 +559,15 @@ msgstr "ì…°ì´ë”(&H)"
msgctxt "ID_AUDIOS"
msgid "&Audio Track"
-msgstr ""
+msgstr "오디오 트랙"
msgctxt "ID_SUBTITLES"
msgid "Su&btitle Track"
-msgstr ""
+msgstr "ìžë§‰ 트랙"
msgctxt "ID_VIDEO_STREAMS"
msgid "&Video Track"
-msgstr ""
+msgstr "비디오 트랙"
msgctxt "POPUP"
msgid "&Volume"
@@ -591,7 +591,7 @@ msgstr "재ìƒì´ ë나면"
msgctxt "ID_AFTERPLAYBACK_DONOTHING"
msgid "Do no&thing"
-msgstr ""
+msgstr "아무 ê²ƒë„ í•˜ì§€ 않기"
msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
msgid "Play &next file in the folder"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ko.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ko.strings.po
index 9aceae15a..55c920cf4 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ko.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ko.strings.po
@@ -1,5 +1,5 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2015 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Level ASMer <zx132435@naver.com>, 2014
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-10-30 22:04:38+0000\n"
-"PO-Revision-Date: 2014-12-02 20:13+0000\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-09-20 03:35+0000\n"
"Last-Translator: Underground78\n"
-"Language-Team: Korean (http://www.transifex.com/projects/p/mpc-hc/language/ko/)\n"
+"Language-Team: Korean (http://www.transifex.com/mpc-hc/mpc-hc/language/ko/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -326,11 +326,11 @@ msgid "On/Off"
msgstr "켬/ë”"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr ""
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr ""
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -465,6 +465,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "재ìƒ::Shaders"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "리소스"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "기타"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "미디어 정보"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "재ìƒ::캡ì³ìž¥ì¹˜"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "재ìƒ::Sync Renderer Settings"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "재ìƒ::전체화면"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "오디오 스위처"
@@ -557,30 +585,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "ìžë§‰::ë°ì´í„°ë² ì´ìŠ¤"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "리소스"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "기타"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "미디어 정보"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "재ìƒ::캡ì³ìž¥ì¹˜"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "재ìƒ::Sync Renderer Settings"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "재ìƒ::전체화면"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "ìžì„¸ížˆ"
@@ -673,22 +677,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "재ìƒí•˜ëŠ” 비디오 í‘œë©´ì„ í‘œì¤€ 오프스í¬ë¦°ìœ¼ë¡œ 위치시킵니다."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC 오디오 ë Œë”러가 깨졌으므로 사용하지 마십시오."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "ì‹±í¬ ë Œë”러"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - 버그 신고"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr ""
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr ""
@@ -741,9 +733,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (무압축)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC 오디오 ë Œë”러"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr ""
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1393,6 +1385,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr ""
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr ""
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "장치 열기"
@@ -1547,7 +1559,7 @@ msgstr "ì¸ë„¤ì¼ì´ 성공ì ìœ¼ë¡œ 저장ë˜ì—ˆìŠµë‹ˆë‹¤."
msgctxt "IDS_MENU_VIDEO_STREAM"
msgid "&Video Track"
-msgstr ""
+msgstr "비디오 트랙"
msgctxt "IDS_MENU_VIDEO_ANGLE"
msgid "Video Ang&le"
@@ -1677,6 +1689,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr ""
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr ""
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr ""
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr ""
@@ -1958,20 +1978,20 @@ msgid "Options"
msgstr "옵션"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "ë‹¤ìŒ ì˜¤ë””ì˜¤"
+msgid "Next Audio Track"
+msgstr ""
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "ì´ì „ 오디오"
+msgid "Prev Audio Track"
+msgstr ""
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "ë‹¤ìŒ ìžë§‰"
+msgid "Next Subtitle Track"
+msgstr ""
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "ì´ì „ ìžë§‰"
+msgid "Prev Subtitle Track"
+msgstr ""
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1981,22 +2001,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "ìžë§‰ 다시 로드"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "ë‹¤ìŒ ì˜¤ë””ì˜¤ (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "ì´ì „ 오디오 (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "ë‹¤ìŒ ìžë§‰ (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "ì´ì „ ìžë§‰ (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "ë‹¤ìŒ ì•µê¸€ (DVD)"
@@ -2006,20 +2010,20 @@ msgid "Prev Angle (DVD)"
msgstr "ì´ì „ 앵글 (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "ë‹¤ìŒ ì˜¤ë””ì˜¤ (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "ì´ì „ 오디오 (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "ë‹¤ìŒ ìžë§‰ (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "ì´ì „ ìžë§‰ (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2385,14 +2389,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "현재"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr ""
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "ë¤í”„파ì¼ì„ ë§Œë“œëŠ”ë° ì‹¤íŒ¨ '%s' (error %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "í´ë” ì„ íƒ"
@@ -2566,8 +2562,8 @@ msgid "Volume boost Max"
msgstr "볼륨 부스트 최대"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "사용법: mpc-hc.exe \"경로ì´ë¦„\" [스위치]\n\n\"경로ì´ë¦„\"\t로드할 파ì¼ì´ë‚˜ 디렉토리. (와ì¼ë“œì¹´ë“œ\n\t\t사용가능, \"-\" denotes standard input)\n/dub \"ë”빙파ì¼\"\t추가ì ì¸ 오디오 파ì¼\n/dubdelay \"파ì¼\"\tXXms 딜레ì´ëœ 추가ì ì¸ 오디오 íŒŒì¼ (\n\t\t파ì¼ì´ 다ìŒì„ í¬í•¨ \"...DELAY XXms...\")\n/d3dfs\t\tD3D 전체화면모드ì—ì„œ ë Œë”ë§\n/sub \"ìžë§‰íŒŒì¼\"\t추가ì ì¸ ìžë§‰íŒŒì¼\n/filter \"필터파ì¼\"\tDLL파ì¼ì—ì„œ 다ì´ë ‰íŠ¸ì‡¼ 필터를 로드함 (와ì¼ë“œì¹´ë“œì‚¬ìš©ê°€ëŠ¥)\n/dvd\t\tdvd재ìƒëª¨ë“œ, \"경로ì´ë¦„\" ì„ ì§€ì •í–ˆì„ ê²½ìš°, DVD í´ë”를 ì˜ë§ˆí•¨ (옵션)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\t오디오CD ë˜ëŠ” (S)VCDì˜ ëª¨ë“  íŠ¸ëž™ì„ ë¡œë“œí•¨,\n\t\t\"경로ì´ë¦„\" ì„ ì§€ì •í–ˆì„ ê²½ìš° ë“œë¼ì´ë¸Œë¥¼ ì˜ë¯¸í•¨ (옵션)\n/device\t\tOpen the default video device\n/open\t\t파ì¼ì„ ì—´ê³  재ìƒì„ 시작하지는 ì•ŠìŒ\n/play\t\t파ì¼ì„ ì—´ê³  재ìƒì„ 시작함\n/close\t\t재ìƒì´ ë나면 플레ì´ì–´ 종료 (/play 스위치를 ê°™ì´ ì¨ì•¼í•¨)\n/shutdown\t재ìƒì´ ë나면 시스템 종료\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\t전체화면모드로 재ìƒì‹œìž‘\n/minimized\t최소화모드로 재ìƒì‹œìž‘\n/new\t\t플레ì´ì–´ ì°½ì„ í•˜ë‚˜ ë” ìƒì„±\n/add\t\t재ìƒëª©ë¡ì— 지정한 \"경로ì´ë¦„\"ì„ ì¶”ê°€,\n\t\t/open ê³¼ /play 스위치와 ê°™ì´ ì‚¬ìš©ê°€ëŠ¥\n/randomize\tRandomize the playlist\n/regvid\t\t비디오 íŒŒì¼ í™•ìž¥ëª…ì„ MPC-HCë¡œ ì—°ê²°\n/regaud\t\t오디오 íŒŒì¼ í™•ìž¥ëª…ì„ MPC-HCë¡œ ì—°ê²°\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tMPC-HCë¡œ ì—°ê²°í–ˆë˜ í™•ìž¥ëª… í•´ì œ\n/start ms\t\t지정한 \"ms\" (= 밀리초)위치ì—ì„œ 재ìƒì‹œìž‘\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\t지정한 가로(w), 세로(h) í¬ê¸°ë¡œ ê³ ì •\n/monitor N\tN번 모니터ì—ì„œ 시작(Nì€ 1ì´ìƒì´ì–´ì•¼í•¨)\n/audiorenderer N\t오디오렌ë”러 N 번(1부터 시작)ì„ ì‚¬ìš©í•´ì„œ 시작\n\t\t(\"출력\" ì„¤ì •ì„ ì°¸ê³ í•˜ì„¸ìš”)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\t명령입력 스위치 ì˜µì…˜ì„ ì¶œë ¥\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "사용법: mpc-hc.exe \"경로ì´ë¦„\" [스위치]\n\n\"경로ì´ë¦„\"\t로드할 파ì¼ì´ë‚˜ 디렉토리. (와ì¼ë“œì¹´ë“œ\n\t\t사용가능, \"-\" denotes standard input)\n/dub \"ë”빙파ì¼\"\t추가ì ì¸ 오디오 파ì¼\n/dubdelay \"파ì¼\"\tXXms 딜레ì´ëœ 추가ì ì¸ 오디오 íŒŒì¼ (\n\t\t파ì¼ì´ 다ìŒì„ í¬í•¨ \"...DELAY XXms...\")\n/d3dfs\t\tD3D 전체화면모드ì—ì„œ ë Œë”ë§\n/sub \"ìžë§‰íŒŒì¼\"\t추가ì ì¸ ìžë§‰íŒŒì¼\n/filter \"필터파ì¼\"\tDLL파ì¼ì—ì„œ 다ì´ë ‰íŠ¸ì‡¼ 필터를 로드함 (와ì¼ë“œì¹´ë“œì‚¬ìš©ê°€ëŠ¥)\n/dvd\t\tdvd재ìƒëª¨ë“œ, \"경로ì´ë¦„\" ì„ ì§€ì •í–ˆì„ ê²½ìš°, DVD í´ë”를 ì˜ë§ˆí•¨ (옵션)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\t오디오CD ë˜ëŠ” (S)VCDì˜ ëª¨ë“  íŠ¸ëž™ì„ ë¡œë“œí•¨,\n\t\t\"경로ì´ë¦„\" ì„ ì§€ì •í–ˆì„ ê²½ìš° ë“œë¼ì´ë¸Œë¥¼ ì˜ë¯¸í•¨ (옵션)\n/device\t\tOpen the default video device\n/open\t\t파ì¼ì„ ì—´ê³  재ìƒì„ 시작하지는 ì•ŠìŒ\n/play\t\t파ì¼ì„ ì—´ê³  재ìƒì„ 시작함\n/close\t\t재ìƒì´ ë나면 플레ì´ì–´ 종료 (/play 스위치를 ê°™ì´ ì¨ì•¼í•¨)\n/shutdown\t재ìƒì´ ë나면 시스템 종료\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\t전체화면모드로 재ìƒì‹œìž‘\n/minimized\t최소화모드로 재ìƒì‹œìž‘\n/new\t\t플레ì´ì–´ ì°½ì„ í•˜ë‚˜ ë” ìƒì„±\n/add\t\t재ìƒëª©ë¡ì— 지정한 \"경로ì´ë¦„\"ì„ ì¶”ê°€,\n\t\t/open ê³¼ /play 스위치와 ê°™ì´ ì‚¬ìš©ê°€ëŠ¥\n/randomize\tRandomize the playlist\n/regvid\t\t비디오 íŒŒì¼ í™•ìž¥ëª…ì„ MPC-HCë¡œ ì—°ê²°\n/regaud\t\t오디오 íŒŒì¼ í™•ìž¥ëª…ì„ MPC-HCë¡œ ì—°ê²°\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tMPC-HCë¡œ ì—°ê²°í–ˆë˜ í™•ìž¥ëª… í•´ì œ\n/start ms\t\t지정한 \"ms\" (= 밀리초)위치ì—ì„œ 재ìƒì‹œìž‘\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\t지정한 가로(w), 세로(h) í¬ê¸°ë¡œ ê³ ì •\n/monitor N\tN번 모니터ì—ì„œ 시작(Nì€ 1ì´ìƒì´ì–´ì•¼í•¨)\n/audiorenderer N\t오디오렌ë”러 N 번(1부터 시작)ì„ ì‚¬ìš©í•´ì„œ 시작\n\t\t(\"출력\" ì„¤ì •ì„ ì°¸ê³ í•˜ì„¸ìš”)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\t명령입력 스위치 ì˜µì…˜ì„ ì¶œë ¥\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3041,18 +3037,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "화면비율"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "WASAPI 사용 (ìž¬ìƒ ë‹¤ì‹œì‹œìž‘)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "빠른 íƒìƒ‰ì‹œ ìŒì†Œê±°"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "사운드 장치:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: 켜ì§"
@@ -3609,3 +3593,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "설정"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.lt.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.lt.dialogs.po
new file mode 100644
index 000000000..259b1239f
--- /dev/null
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.lt.dialogs.po
@@ -0,0 +1,1747 @@
+# MPC-HC - Strings extracted from dialogs
+# Copyright (C) 2002 - 2013 see Authors.txt
+# This file is distributed under the same license as the MPC-HC package.
+# Translators:
+# linasmi <linasmi@mail.ru>, 2014-2015
+# Linas Tamašauskas, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: MPC-HC\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-11-06 12:02+0000\n"
+"Last-Translator: linasmi <linasmi@mail.ru>\n"
+"Language-Team: Lithuanian (http://www.transifex.com/mpc-hc/mpc-hc/language/lt/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: lt\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+msgctxt "IDD_SELECTMEDIATYPE_CAPTION"
+msgid "Select Media Type"
+msgstr "Pasirinkite tipÄ…"
+
+msgctxt "IDD_SELECTMEDIATYPE_IDOK"
+msgid "OK"
+msgstr "Gerai"
+
+msgctxt "IDD_SELECTMEDIATYPE_IDCANCEL"
+msgid "Cancel"
+msgstr "AÅ¡aukti"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_STATIC1"
+msgid "Video"
+msgstr "Vaizdas"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_BUTTON1"
+msgid "Set"
+msgstr "Nustatyti"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_STATIC"
+msgid "Audio"
+msgstr "Garsas"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_STATIC"
+msgid "Output"
+msgstr "IÅ¡vestis"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK1"
+msgid "Record Video"
+msgstr "Įrašyti vaizdą"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK2"
+msgid "Preview"
+msgstr "Peržiūra"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK3"
+msgid "Record Audio"
+msgstr "Įrašyti garsą"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK4"
+msgid "Preview"
+msgstr "Peržiūra"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_STATIC"
+msgid "V/A Buffers:"
+msgstr "V/A Buferiai:"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK5"
+msgid "Audio to wav"
+msgstr "Garso takelis į wav"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_BUTTON2"
+msgid "Record"
+msgstr "Įrašas"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK2"
+msgid "Enable built-in audio switcher filter (requires restart)"
+msgstr "Įjungti įtaisytą garso takelių perjungiklį (reikalingas paleidimas iš naujo)"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK5"
+msgid "Normalize"
+msgstr "Normalizuoti"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC4"
+msgid "Max amplification:"
+msgstr "Maksimalus stiprinimas:"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC5"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK6"
+msgid "Regain volume"
+msgstr "Atstatyti garsÄ…"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC6"
+msgid "Boost:"
+msgstr "Stiprinimas:"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK3"
+msgid "Down-sample to 44100 Hz"
+msgstr "Transformuoti į 44100 Hz"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK4"
+msgid "Audio time shift (ms):"
+msgstr "Garso poslinkis (ms):"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK1"
+msgid "Enable custom channel mapping"
+msgstr "Įjungti vartotojo kanalų skirstymą"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC1"
+msgid "Speaker configuration for"
+msgstr "Garsiakalbių nustatymas"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC2"
+msgid "input channels:"
+msgstr "įeinantiems kanalams:"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC3"
+msgid "Hold shift for immediate changes when clicking something"
+msgstr "Laikykite nuspaustą shift pakeitimams panaudoti iš karto paspaudus"
+
+msgctxt "IDD_GOTO_DLG_CAPTION"
+msgid "Go To..."
+msgstr "Eiti į..."
+
+msgctxt "IDD_GOTO_DLG_IDC_STATIC"
+msgid "Enter a timecode using the format [hh:]mm:ss.ms to jump to a specified time. You do not need to enter the separators explicitly."
+msgstr "Įveskite laiką formatu [vv:]mm:ss.ms, kad pereiti prie nurodyto laiko."
+
+msgctxt "IDD_GOTO_DLG_IDC_STATIC"
+msgid "Time"
+msgstr "Laikas"
+
+msgctxt "IDD_GOTO_DLG_IDC_OK1"
+msgid "Go!"
+msgstr "Pirmyn!"
+
+msgctxt "IDD_GOTO_DLG_IDC_STATIC"
+msgid "Enter two numbers to jump to a specified frame, the first is the frame number, the second is the frame rate."
+msgstr "Ä®raÅ¡ykite du skaiÄius perÄ—jimui prie nurodyto kadro: pirmas - kadro numeris, antras - kadrų skaiÄius į sekundÄ™."
+
+msgctxt "IDD_GOTO_DLG_IDC_STATIC"
+msgid "Frame"
+msgstr "Kadras"
+
+msgctxt "IDD_GOTO_DLG_IDC_OK2"
+msgid "Go!"
+msgstr "Pirmyn!"
+
+msgctxt "IDD_OPEN_DLG_CAPTION"
+msgid "Open"
+msgstr "Atverti"
+
+msgctxt "IDD_OPEN_DLG_IDC_STATIC"
+msgid "Type the address of a movie or audio file (on the Internet or your computer) and the player will open it for you."
+msgstr "Ä®raÅ¡ykite garso ar vaizdo failo (esanÄio jÅ«sų kompiuteryje arba internete) adresÄ… ir grotuvas atidarys kÅ«rinį jums."
+
+msgctxt "IDD_OPEN_DLG_IDC_STATIC"
+msgid "Open:"
+msgstr "Atverti:"
+
+msgctxt "IDD_OPEN_DLG_IDC_BUTTON1"
+msgid "Browse..."
+msgstr "Naršyti..."
+
+msgctxt "IDD_OPEN_DLG_IDC_STATIC1"
+msgid "Dub:"
+msgstr "Dubliažas:"
+
+msgctxt "IDD_OPEN_DLG_IDC_BUTTON2"
+msgid "Browse..."
+msgstr "Naršyti..."
+
+msgctxt "IDD_OPEN_DLG_IDOK"
+msgid "OK"
+msgstr "Gerai"
+
+msgctxt "IDD_OPEN_DLG_IDCANCEL"
+msgid "Cancel"
+msgstr "AÅ¡aukti"
+
+msgctxt "IDD_OPEN_DLG_IDC_CHECK1"
+msgid "Add to playlist without opening"
+msgstr "Pridėti į grojaraštį neatidarant"
+
+msgctxt "IDD_ABOUTBOX_CAPTION"
+msgid "About"
+msgstr "Apie"
+
+msgctxt "IDD_ABOUTBOX_IDC_AUTHORS_LINK"
+msgid "Copyright © 2002-2015 see Authors.txt"
+msgstr "Autorinės teisės © 2002-2015 skaitykite Authors.txt"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "This program is freeware and released under the GNU General Public License."
+msgstr "Å i programa yra nemokama ir platinama pagal licencijÄ… GNU General Public License."
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "English translation made by MPC-HC Team"
+msgstr "Vertė: Linasmi Linas Tamašauskas, Martynas Kybartas, Ramūnas."
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Build information"
+msgstr "SÄ…rankos informacija"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Version:"
+msgstr "Versija:"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Compiler:"
+msgstr "Kompiliatorius"
+
+msgctxt "IDD_ABOUTBOX_IDC_LAVFILTERS_VERSION"
+msgid "Not used"
+msgstr "Nenaudojama"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Build date:"
+msgstr "SÄ…rankos data:"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Operating system"
+msgstr "OperacinÄ— sistema"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Name:"
+msgstr "Vardas:"
+
+msgctxt "IDD_ABOUTBOX_IDC_BUTTON1"
+msgid "Copy to clipboard"
+msgstr "Kopijuoti į iškarpinę"
+
+msgctxt "IDD_ABOUTBOX_IDOK"
+msgid "OK"
+msgstr "Gerai"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "Open options"
+msgstr "Atidaryti nustatymus"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO1"
+msgid "Use the same player for each media file"
+msgstr "Tas pats grotuvas kiekvienam failui"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO2"
+msgid "Open a new player for each media file played"
+msgstr "Kiekvienam failui atverti naujÄ… grotuvÄ…"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "Language"
+msgstr "Kalba"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "Title bar"
+msgstr "Pavadinimo juostoje"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO3"
+msgid "Display full path"
+msgstr "Rodyti pilnÄ… keliÄ…"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO4"
+msgid "File name only"
+msgstr "Tik failo vardÄ…"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO5"
+msgid "Don't prefix anything"
+msgstr "Nieko nerodyti"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK13"
+msgid "Replace file name with title"
+msgstr "Failo vardÄ… pakeisti pavadinimu"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "Other"
+msgstr "Kita"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK3"
+msgid "Tray icon"
+msgstr "UžduoÄių juostos piktograma"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_SHOW_OSD"
+msgid "Show OSD (requires restart)"
+msgstr "Rodyti OSD (reikalingas paleidimas iš naujo)"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK4"
+msgid "Limit window proportions on resize"
+msgstr "Lango kraštinių proporcijos pagal kadrą"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK12"
+msgid "Snap to desktop edges"
+msgstr "Prilipti prie ekrano kraštinių"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK8"
+msgid "Store settings in .ini file"
+msgstr "IÅ¡saugoti nustatymus .ini faile"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK10"
+msgid "Disable \"Open Disc\" menu"
+msgstr "Išjungti „Atidaryti diską“ meniu"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK9"
+msgid "Process priority above normal"
+msgstr "Padidintas proceso prioritetas"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK14"
+msgid "Enable cover-art support"
+msgstr "Įjungti viršelio palaikymą"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "History"
+msgstr "Žurnalas"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK1"
+msgid "Keep history of recently opened files"
+msgstr "Išsaugoti atidarytų failų istoriją"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK2"
+msgid "Remember last playlist"
+msgstr "Įsiminti paskutinį grojimo sąrašą"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_FILE_POS"
+msgid "Remember File position"
+msgstr "Įsiminti Failo poziciją"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_DVD_POS"
+msgid "Remember DVD position"
+msgstr "Įsiminti DVD poziciją"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK6"
+msgid "Remember last window position"
+msgstr "Įsiminti paskutinę lango poziciją"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK7"
+msgid "Remember last window size"
+msgstr "Įsiminti paskutinį lango dydį"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK11"
+msgid "Remember last Pan-n-Scan Zoom"
+msgstr "Įsiminti paskutinį Pan-n-Scan mastelį"
+
+msgctxt "IDD_PPAGEDVD_IDC_STATIC"
+msgid "\"Open DVD/BD\" behavior"
+msgstr "„Atverti DVD/BD“ komandos elgesys"
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO1"
+msgid "Prompt for location"
+msgstr "Pasirinkti aplankÄ…"
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO2"
+msgid "Always open the default location:"
+msgstr "Visuomet atverti pagal nutylÄ—jimÄ…:"
+
+msgctxt "IDD_PPAGEDVD_IDC_STATIC"
+msgid "Preferred language for DVD Navigator and the external OGM Splitter"
+msgstr "Teikti pirmenybÄ™ DVD navigatoriaus ir OGM spliterio kalbai"
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO3"
+msgid "Menu"
+msgstr "Meniu"
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO4"
+msgid "Audio"
+msgstr "Garsas"
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO5"
+msgid "Subtitles"
+msgstr "Subtitrai"
+
+msgctxt "IDD_PPAGEDVD_IDC_STATIC"
+msgid "Additional settings"
+msgstr "Papildomi nustatymai"
+
+msgctxt "IDD_PPAGEDVD_IDC_CHECK2"
+msgid "Allow closed captions in \"Line 21 Decoder\""
+msgstr "Leisti subtitrus neprigirdintiems 'Line 21 Decoder'"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Audio"
+msgstr "Garsas"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Volume"
+msgstr "Garsumas"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Min"
+msgstr "Tyliau"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Max"
+msgstr "Garsiau"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC_BALANCE"
+msgid "Balance"
+msgstr "Balansas"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "L"
+msgstr "K"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "R"
+msgstr "D"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Playback"
+msgstr "Įrašo peržiūra"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_RADIO1"
+msgid "Play"
+msgstr "Groti"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_RADIO2"
+msgid "Repeat forever"
+msgstr "Visada kartoti"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC1"
+msgid "time(s)"
+msgstr "kartus(ų)"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "After Playback"
+msgstr "Baigus groti"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Output"
+msgstr "IÅ¡vestis"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK5"
+msgid "Auto-zoom:"
+msgstr "Automastelis"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC2"
+msgid "Auto fit factor:"
+msgstr "Įrašyti į:"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC3"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Default track preference"
+msgstr "Takelių pasirinkimo prioritetas"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Subtitles:"
+msgstr "Subtitrai:"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Audio:"
+msgstr "Garsas:"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK4"
+msgid "Allow overriding external splitter choice"
+msgstr "Leisti išorinių spliterių pasirinkimo perskirstymą"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Open settings"
+msgstr "Atidaryti nustatymus"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK7"
+msgid "Use worker thread to construct the filter graph"
+msgstr "Darbinis srautas filtrų grandinei sukurti"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK6"
+msgid "Report pins which fail to render"
+msgstr "Ataskaita apie srautų renderingo klaidas"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
+msgid "Auto-load audio files"
+msgstr "Automatinis garso failų įkėlimas"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Control"
+msgstr "Valdymas"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Volume step:"
+msgstr "Garso žingsnis:"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Speed step:"
+msgstr "GreiÄio žingsnis:"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK3"
+msgid "Override placement"
+msgstr "Pakeisti padėtį"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC1"
+msgid "Horizontal:"
+msgstr "Horizontaliai:"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC2"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC3"
+msgid "Vertical:"
+msgstr "Vertikaliai:"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC4"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Delay step"
+msgstr "Užlaikymo žingsnis"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "ms"
+msgstr "ms"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Texture settings (open the video again to see the changes)"
+msgstr "Tekstūros nustatymas (atidarykite vaizdą iš naujo, kad pamatytumėte pakeitimus)"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Sub pictures to buffer:"
+msgstr "Fragmentų kiekis buferyje:"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Maximum texture resolution:"
+msgstr "Maksimalus tekstūros dydis:"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_NO_SUB_ANIM"
+msgid "Never animate the subtitles"
+msgstr "Niekada neanimuoti subtitrų"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC5"
+msgid "Render at"
+msgstr "Vaizduoti"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC6"
+msgid "% of the animation"
+msgstr "% animacijos"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC7"
+msgid "Animate at"
+msgstr "Animuoti"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC8"
+msgid "% of the video frame rate"
+msgstr "% vaizdo kadro"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_ALLOW_DROPPING_SUBPIC"
+msgid "Allow dropping some subpictures if the queue is running late"
+msgstr "Įjungti kai kurių kadrų išmetimą vėluojant."
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Renderer Layout"
+msgstr "Renderio išdėstymas"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_SUB_AR_COMPENSATION"
+msgid "Apply aspect ratio compensation for anamorphic videos"
+msgstr "Kompensuoti anamorfinio vaizdo kraštinių santykį"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Warning"
+msgstr "Įspėjimas"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "If you override and enable full-screen antialiasing somewhere at your videocard's settings, subtitles aren't going to look any better but it will surely eat your CPU."
+msgstr "Jei jūs pakeisite padėtį ir įjungsite pilnaekranį išlyginimą vaizdo plokštės nustatymuose, subtitrai neatrodys geriau, bet papildomai eikvos procesorių."
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC2"
+msgid "File extensions"
+msgstr "Failų išplėtimai"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON2"
+msgid "Default"
+msgstr "Numatyta"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON_EXT_SET"
+msgid "Set"
+msgstr "Nustatyti"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC3"
+msgid "Association"
+msgstr "Susiejimas"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK8"
+msgid "Use the format-specific icons"
+msgstr "Naudoti specialias piktogramas"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON1"
+msgid "Run as &administrator"
+msgstr "Paleisti &administratoriaus teisÄ—mis"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON7"
+msgid "Set as &default program"
+msgstr "Nustatyti programÄ… kaip pagrin&dinÄ™"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC"
+msgid "Real-Time Streaming Protocol handler (for rtsp://... URLs)"
+msgstr "Atidaryti Real-Time Streaming Protocol (rtsp://...)"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_RADIO1"
+msgid "RealMedia"
+msgstr "RealMedia"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_RADIO2"
+msgid "QuickTime"
+msgstr "QuickTime"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_RADIO3"
+msgid "DirectShow"
+msgstr "DirectShow"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK5"
+msgid "Check file extension first"
+msgstr "Pirmiau žiūrėti failo išplėtimą"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC"
+msgid "Explorer Context Menu"
+msgstr "Naršyklės kontekstinis meniu"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK6"
+msgid "Directory"
+msgstr "Aplankas"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK7"
+msgid "File(s)"
+msgstr "Failas(ai)"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC1"
+msgid "Autoplay"
+msgstr "Automatinis paleidimas"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK1"
+msgid "Video"
+msgstr "Vaizdas"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK2"
+msgid "Music"
+msgstr "Muzika"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK4"
+msgid "DVD"
+msgstr "DVD"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK3"
+msgid "Audio CD"
+msgstr "Audio CD"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_STATIC"
+msgid "Jump distances (small, medium, large in ms)"
+msgstr "PerÄ—jimo atstumai (trumpas, vidutinis, ilgas) ms"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_BUTTON1"
+msgid "Default"
+msgstr "Numatyta"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_FASTSEEK_CHECK"
+msgid "Fast seek (on keyframe)"
+msgstr "Greita prasuka (pagal raktinius kadrus)"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK2"
+msgid "Show chapter marks in seek bar"
+msgstr "Rodyti skyrių žymes prasukos juostoje"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK4"
+msgid "Display \"Now Playing\" information in Skype's mood message"
+msgstr "Rodyti „Dabar groja“ Skype programoje (būsenos nustatymas)"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
+msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
+msgstr "Neminimizuoti lango papildomame monitoriuje pilnaekranÄ—je veiksenoje"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Naudoti patobulintas užduoÄių juostos funkcijas"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
+msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
+msgstr "Atverti sekantį/ankstesnį failą aplanke su „Pirmyn/Atgal“, kai grojaraštyje tik vienas įrašas"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK8"
+msgid "Show time tooltip:"
+msgstr "Rodyti laikÄ…:"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_STATIC"
+msgid "OSD font:"
+msgstr "OSD Å¡riftas:"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_LCD"
+msgid "Enable Logitech LCD support (experimental)"
+msgstr "Įjungti Logitech LCD palaikymą (eksperimentinis)"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK3"
+msgid "Auto-hide the mouse pointer during playback in windowed mode"
+msgstr "Automatiškai slėpti pelės žymeklį grojant lange"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON1"
+msgid "Add Filter..."
+msgstr "PridÄ—ti FiltrÄ…..."
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON2"
+msgid "Remove"
+msgstr "Pašalinti"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_RADIO1"
+msgid "Prefer"
+msgstr "Teikti pirmenybÄ™"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_RADIO2"
+msgid "Block"
+msgstr "Blokuoti"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_RADIO3"
+msgid "Set merit:"
+msgstr "Reikšmingumas:"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON3"
+msgid "Up"
+msgstr "AukÅ¡Äiau"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON4"
+msgid "Down"
+msgstr "Žemiau"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON5"
+msgid "Add Media Type..."
+msgstr "Naujas tipas..."
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON6"
+msgid "Add Sub Type..."
+msgstr "Naujas subtipas"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON7"
+msgid "Delete"
+msgstr "Å alinti"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON8"
+msgid "Reset List"
+msgstr "Išvalyti sąrašą"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Type:"
+msgstr "Tipas:"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Size:"
+msgstr "Dydis:"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Media length:"
+msgstr "TrukmÄ—:"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Video size:"
+msgstr "Kadro dydis:"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Created:"
+msgstr "Sukurta:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Clip:"
+msgstr "Pavadinimas"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Author:"
+msgstr "Autorius:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Copyright:"
+msgstr "AutorinÄ—s teisÄ—s:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Rating:"
+msgstr "Reitingas:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Location:"
+msgstr "Vieta:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Description:"
+msgstr "Aprašymas:"
+
+msgctxt "IDD_FAVADD_CAPTION"
+msgid "Add Favorite"
+msgstr "Pridėti į parankinius"
+
+msgctxt "IDD_FAVADD_IDC_STATIC"
+msgid "Choose a name for your shortcut:"
+msgstr "Pasirinkite vardÄ… savo nuorodai:"
+
+msgctxt "IDD_FAVADD_IDC_CHECK1"
+msgid "Remember position"
+msgstr "Įsiminti poziciją"
+
+msgctxt "IDD_FAVADD_IDCANCEL"
+msgid "Cancel"
+msgstr "AÅ¡aukti"
+
+msgctxt "IDD_FAVADD_IDOK"
+msgid "OK"
+msgstr "Gerai"
+
+msgctxt "IDD_FAVADD_IDC_CHECK2"
+msgid "Relative drive"
+msgstr "Santykinai disko"
+
+msgctxt "IDD_FAVORGANIZE_CAPTION"
+msgid "Organize Favorites"
+msgstr "Parankiniai"
+
+msgctxt "IDD_FAVORGANIZE_IDC_BUTTON1"
+msgid "Rename"
+msgstr "Pervardyti"
+
+msgctxt "IDD_FAVORGANIZE_IDC_BUTTON3"
+msgid "Move Up"
+msgstr "Kelti Aukštyn"
+
+msgctxt "IDD_FAVORGANIZE_IDC_BUTTON4"
+msgid "Move Down"
+msgstr "Kelti Žemyn"
+
+msgctxt "IDD_FAVORGANIZE_IDC_BUTTON2"
+msgid "Delete"
+msgstr "Å alinti"
+
+msgctxt "IDD_FAVORGANIZE_IDOK"
+msgid "OK"
+msgstr "Gerai"
+
+msgctxt "IDD_PNSPRESET_DLG_CAPTION"
+msgid "Pan&Scan Presets"
+msgstr "Dydžio ir padėties priešnustatymai"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON2"
+msgid "New"
+msgstr "Naujas"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON3"
+msgid "Delete"
+msgstr "Å alinti"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON4"
+msgid "Up"
+msgstr "AukÅ¡Äiau"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON5"
+msgid "Down"
+msgstr "Žemiau"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON1"
+msgid "&Set"
+msgstr "Nu&statyti"
+
+msgctxt "IDD_PNSPRESET_DLG_IDCANCEL"
+msgid "&Cancel"
+msgstr "At&Å¡aukti"
+
+msgctxt "IDD_PNSPRESET_DLG_IDOK"
+msgid "&Save"
+msgstr "&Saugoti"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_STATIC"
+msgid "Pos: 0.0 -> 1.0"
+msgstr "Pozicija: 0.0 -> 1.0"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_STATIC"
+msgid "Zoom: 0.2 -> 3.0"
+msgstr "Mastelis: 0.2 -> 3.0"
+
+msgctxt "IDD_PPAGEACCELTBL_IDC_CHECK2"
+msgid "Global Media Keys"
+msgstr "Globalūs multimediniai klavišai"
+
+msgctxt "IDD_PPAGEACCELTBL_IDC_BUTTON1"
+msgid "Select All"
+msgstr "Žymėti viską"
+
+msgctxt "IDD_PPAGEACCELTBL_IDC_BUTTON2"
+msgid "Reset Selected"
+msgstr "Atkurti pasirinktÄ…"
+
+msgctxt "IDD_MEDIATYPES_DLG_CAPTION"
+msgid "Warning"
+msgstr "Įspėjimas"
+
+msgctxt "IDD_MEDIATYPES_DLG_IDC_STATIC1"
+msgid "MPC-HC could not render some of the pins in the graph, you may not have the needed codecs or filters installed on the system."
+msgstr "MPC-HC negali groti kai kurių srautų, galbūt, pas jus nėra įdiegtas reikalingas kodekas arba filtras."
+
+msgctxt "IDD_MEDIATYPES_DLG_IDC_STATIC2"
+msgid "The following pin(s) failed to find a connectable filter:"
+msgstr "Å iems srautams nerastas tinkamas filtras:"
+
+msgctxt "IDD_MEDIATYPES_DLG_IDOK"
+msgid "Close"
+msgstr "Užverti"
+
+msgctxt "IDD_SAVE_DLG_CAPTION"
+msgid "Saving..."
+msgstr "Saugojama..."
+
+msgctxt "IDD_SAVE_DLG_IDCANCEL"
+msgid "Cancel"
+msgstr "AÅ¡aukti"
+
+msgctxt "IDD_SAVETEXTFILEDIALOGTEMPL_IDC_STATIC1"
+msgid "Encoding:"
+msgstr "KoduotÄ—:"
+
+msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_STATIC1"
+msgid "Encoding:"
+msgstr "Kodavimas:"
+
+msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_STATIC"
+msgid "Delay:"
+msgstr "Delsa:"
+
+msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_STATIC"
+msgid "ms"
+msgstr "ms"
+
+msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_CHECK1"
+msgid "Save custom style"
+msgstr "Išsaugoti vartotojo stilių"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "JPEG quality:"
+msgstr "JPEG kokybÄ—:"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "Thumbnails:"
+msgstr "Miniatiūros:"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "rows"
+msgstr "eiluÄių"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "columns"
+msgstr "stulpelių"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "Image width:"
+msgstr "Vaizdo plotis:"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "pixels"
+msgstr "taškų"
+
+msgctxt "IDD_ADDREGFILTER_CAPTION"
+msgid "Select Filter"
+msgstr "Pasirinkti filtrÄ…"
+
+msgctxt "IDD_ADDREGFILTER_IDC_BUTTON1"
+msgid "Browse..."
+msgstr "Naršyti..."
+
+msgctxt "IDD_ADDREGFILTER_IDOK"
+msgid "OK"
+msgstr "Gerai"
+
+msgctxt "IDD_ADDREGFILTER_IDCANCEL"
+msgid "Cancel"
+msgstr "AÅ¡aukti"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Font"
+msgstr "Å riftas"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_BUTTON1"
+msgid "Font"
+msgstr "Å riftas"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Spacing"
+msgstr "Intervalas"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Angle (z,°)"
+msgstr "Kampas (z,°)"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Scale (x,%)"
+msgstr "Mastelis (x,%)"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Scale (y,%)"
+msgstr "Mastelis (y,%)"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Border Style"
+msgstr "Kraštinės stilius"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_RADIO1"
+msgid "Outline"
+msgstr "Kontūras"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_RADIO2"
+msgid "Opaque box"
+msgstr "Užpildas"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Width"
+msgstr "Plotis"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Shadow"
+msgstr "Šešėlis"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Screen Alignment && Margins"
+msgstr "Išlyginimas ir įtraukos"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Left"
+msgstr "KairÄ—je"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Right"
+msgstr "Dešinėje"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Top"
+msgstr "Viršuje"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Bottom"
+msgstr "ApaÄioje"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_CHECK_RELATIVETO"
+msgid "Position subtitles relative to the video frame"
+msgstr "Rodyti subtitrus atitinkamai kadro"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Colors && Transparency"
+msgstr "Spalvos ir skaidrumas"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "0%"
+msgstr "0%"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "100%"
+msgstr "100%"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Primary"
+msgstr "Pirminis"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Secondary"
+msgstr "Antrinis"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Outline"
+msgstr "Kontūras"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_CHECK1"
+msgid "Link alpha channels"
+msgstr "Susieti alfa kanalus"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
+msgid "If you would like to use the stand-alone versions of these filters or another replacement, disable them here."
+msgstr "Jei jÅ«s norite naudoti atskirÄ… Å¡ių filtrų versijÄ… ar kitÄ… pakaitalÄ…, iÅ¡junkite juos Äia."
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
+msgid "Source Filters"
+msgstr "Šaltinių filtrai"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
+msgid "Transform Filters"
+msgstr "Dekoderiai"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
+msgid "Internal LAV Filters settings"
+msgstr "Vidiniai LAV Filters nustatymai"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_SPLITTER_CONF"
+msgid "Splitter"
+msgstr "Spliteris"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_VIDEO_DEC_CONF"
+msgid "Video decoder"
+msgstr "Vaizdo dekoderis"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_AUDIO_DEC_CONF"
+msgid "Audio decoder"
+msgstr "Garso dekoderis"
+
+msgctxt "IDD_PPAGELOGO_IDC_RADIO1"
+msgid "Internal:"
+msgstr "Vidinis:"
+
+msgctxt "IDD_PPAGELOGO_IDC_RADIO2"
+msgid "External:"
+msgstr "IÅ¡orinis:"
+
+msgctxt "IDD_PPAGELOGO_IDC_BUTTON2"
+msgid "Browse..."
+msgstr "Naršyti..."
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "DirectShow Video"
+msgstr "DirectShow Video"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "RealMedia Video"
+msgstr "RealMedia Video"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "QuickTime Video"
+msgstr "QuickTime Video"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Audio Renderer"
+msgstr "Garso renderis"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "VMR-7/VMR-9 (renderless) and EVR (CP) settings"
+msgstr "VMR-7/VMR-9 (renderless) ir EVR (CP) nustatymai"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Surface:"
+msgstr "Paviršius:"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Resizer:"
+msgstr "Interpoliacija:"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_D3D9DEVICE"
+msgid "Select D3D9 Render Device"
+msgstr "Pasirinkti D3D9 vaizdavimo įrenginį"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_RESETDEVICE"
+msgid "Reinitialize when changing display"
+msgstr "Inicializuoti iš naujo pakeitus monitorių"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_FULLSCREEN_MONITOR_CHECK"
+msgid "D3D Fullscreen"
+msgstr "Pilnaekranis D3D"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_DSVMR9ALTERNATIVEVSYNC"
+msgid "Alternative VSync"
+msgstr "Alternatyvi VSync"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_DSVMR9LOADMIXER"
+msgid "VMR-9 Mixer Mode"
+msgstr "VMR-9 mikserio režimas"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_DSVMR9YUVMIXER"
+msgid "YUV Mixing"
+msgstr "YUV Miksavimas"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_EVR_BUFFERS_TXT"
+msgid "EVR Buffers:"
+msgstr "EVR Buferiai:"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "DXVA"
+msgstr "DXVA"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Subtitles"
+msgstr "Subtitrai"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Screenshot"
+msgstr "Ekrano nuortrauka"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Shaders"
+msgstr "Tamsinimai"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Rotation"
+msgstr "Pasukimas"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Subtitle Renderer"
+msgstr "Subtitrų renderis"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
+msgid "Listen on port:"
+msgstr "Klausyti prievadÄ…:"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_STATIC1"
+msgid "Launch in web browser..."
+msgstr "Paleisti interneto naršyklėje"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK3"
+msgid "Enable compression"
+msgstr "Įgalinti glaudinimą"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
+msgid "Allow access from localhost only"
+msgstr "Leisti tik lokaliÄ…jÄ… prieigÄ…"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Įjungti peržiūrą"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
+msgid "Print debug information"
+msgstr "Derinimo informacijos išvedimas"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK4"
+msgid "Serve pages from:"
+msgstr "Imti puslapius iš:"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_BUTTON1"
+msgid "Browse..."
+msgstr "Naršyti..."
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_BUTTON2"
+msgid "Deploy..."
+msgstr "Dislokuoti..."
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_STATIC"
+msgid "Default page:"
+msgstr "Numatytasis puslapis:"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_STATIC"
+msgid "CGI handlers: (.ext1=path1;.ext2=path2;...)"
+msgstr "CGI valdikliai: (.ext1=path1;.ext2=path2;...)"
+
+msgctxt "IDD_SUBTITLEDL_DLG_CAPTION"
+msgid "Subtitles available online"
+msgstr "Pasiekiami subtitrai internete"
+
+msgctxt "IDD_SUBTITLEDL_DLG_IDOK"
+msgid "Download && Open"
+msgstr "Atsiųsti ir atverti"
+
+msgctxt "IDD_SUBTITLEDL_DLG_IDC_CHECK1"
+msgid "Replace currently loaded subtitles"
+msgstr "Pakeisti jau įkeltus subtitrus"
+
+msgctxt "IDD_FILEPROPRES_IDC_BUTTON1"
+msgid "Save As..."
+msgstr "IÅ¡saugoti Kaip..."
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Color controls (for VMR-9, EVR and madVR)"
+msgstr "Spalvų valdymas (VMR-9, EVR, madVR)"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Brightness"
+msgstr "Å viesumas"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Contrast"
+msgstr "Kontrastas"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Hue"
+msgstr "Atspalvis"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Saturation"
+msgstr "Sodrumas"
+
+msgctxt "IDD_PPAGEMISC_IDC_RESET"
+msgid "Reset"
+msgstr "Atstatyti"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Update check"
+msgstr "Atnaujinimų tikrinimas"
+
+msgctxt "IDD_PPAGEMISC_IDC_CHECK1"
+msgid "Enable automatic update check"
+msgstr "Įjungti atnaujinimų automatinį tikrinimą"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC5"
+msgid "Check every:"
+msgstr "Tikrinti kas:"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC6"
+msgid "day(s)"
+msgstr "dienas (-ų)"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Settings management"
+msgstr "Nuostatų valdymas"
+
+msgctxt "IDD_PPAGEMISC_IDC_RESET_SETTINGS"
+msgid "Reset"
+msgstr "Atstatyti numatytuosius"
+
+msgctxt "IDD_PPAGEMISC_IDC_EXPORT_SETTINGS"
+msgid "Export"
+msgstr "Eksportuoti"
+
+msgctxt "IDD_PPAGEMISC_IDC_EXPORT_KEYS"
+msgid "Export keys"
+msgstr "Eksportuoti klavišus"
+
+msgctxt "IDD_TUNER_SCAN_CAPTION"
+msgid "Tuner scan"
+msgstr "Tiunerio skenavimas"
+
+msgctxt "IDD_TUNER_SCAN_ID_START"
+msgid "Start"
+msgstr "PradÄ—ti"
+
+msgctxt "IDD_TUNER_SCAN_IDCANCEL"
+msgid "Cancel"
+msgstr "AÅ¡aukti"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "Freq. Start"
+msgstr "Pradinis dažnis"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "Bandwidth"
+msgstr "Dažnių juosta"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "Freq. End"
+msgstr "Galutinis dažnis"
+
+msgctxt "IDD_TUNER_SCAN_IDC_CHECK_IGNORE_ENCRYPTED"
+msgid "Ignore encrypted channels"
+msgstr "Ignoruoti užšifruotus kanalus"
+
+msgctxt "IDD_TUNER_SCAN_ID_SAVE"
+msgid "Save"
+msgstr "IÅ¡saugoti"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "S"
+msgstr "S"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "Q"
+msgstr "Q"
+
+msgctxt "IDD_TUNER_SCAN_IDC_CHECK_OFFSET"
+msgid "Use an offset"
+msgstr "Naudoti poslinkį"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC"
+msgid "Default Device"
+msgstr "Numatytasis įrenginys"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_RADIO1"
+msgid "Analog"
+msgstr "Analoginis"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_RADIO2"
+msgid "Digital"
+msgstr "Skaitmeninis"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC"
+msgid "Analog settings"
+msgstr "Analoginis įrenginys"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC1"
+msgid "Video"
+msgstr "Vaizdas"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC2"
+msgid "Audio"
+msgstr "Garsas"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC3"
+msgid "Country"
+msgstr "Å alis"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC"
+msgid "Digital settings (BDA)"
+msgstr "Skaitmeninio kanalo nustatymai (BDA)"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC4"
+msgid "Network Provider"
+msgstr "Tinklo tiekÄ—jas"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC5"
+msgid "Tuner"
+msgstr "Tiuneris"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC6"
+msgid "Receiver"
+msgstr "Imtuvas"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_PPAGECAPTURE_ST10"
+msgid "Channel switching approach:"
+msgstr "Kanalų perjungimo būdas:"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_PPAGECAPTURE_ST11"
+msgid "Rebuild filter graph"
+msgstr "Perstatyti grafÄ…"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_PPAGECAPTURE_ST12"
+msgid "Stop filter graph"
+msgstr "Sustabdyti grafÄ…"
+
+msgctxt "IDD_PPAGESYNC_IDC_SYNCVIDEO"
+msgid "Sync video to display"
+msgstr "Sinchronizuoti vaizdÄ… su displÄ—jumi"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC1"
+msgid "Frequency adjustment:"
+msgstr "Dažnio korekcija:"
+
+msgctxt "IDD_PPAGESYNC_IDC_SYNCDISPLAY"
+msgid "Sync display to video"
+msgstr "Sinchronizuoti displėjų su vaizdu"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC2"
+msgid "Frequency adjustment:"
+msgstr "Dažnio korekcija:"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC3"
+msgid "lines"
+msgstr "linijų"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC4"
+msgid "columns"
+msgstr "stulpelių"
+
+msgctxt "IDD_PPAGESYNC_IDC_SYNCNEAREST"
+msgid "Present at nearest VSync"
+msgstr "Pateikti su artimiausiu vsync"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC5"
+msgid "Target sync offset:"
+msgstr "Tikslinis sinchronizacijos poslinkis:"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC6"
+msgid "ms"
+msgstr "ms"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC7"
+msgid "Control limits:"
+msgstr "Valdymo limitai:"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC8"
+msgid "+/-"
+msgstr "+/-"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC9"
+msgid "ms"
+msgstr "ms"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC10"
+msgid "Changes take effect after the playback has been closed and restarted."
+msgstr "Pakeitimai įsigalios sustabdžius ir paleidus iš naujo grojimą"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK1"
+msgid "Launch files in fullscreen"
+msgstr "Paleisti failus pilnaekranÄ—je veiksenoje"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK4"
+msgid "Hide controls in fullscreen"
+msgstr "SlÄ—pti valdymo elementus pilno ekrano veiksenoje"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC1"
+msgid "ms"
+msgstr "ms"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK6"
+msgid "Hide docked panels"
+msgstr "Slėpti užtvirtintas juostas"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK5"
+msgid "Exit fullscreen at the end of playback"
+msgstr "Baigus groti išeiti iš pilnaekranės veiksenos"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC"
+msgid "Fullscreen monitor"
+msgstr "Monitorius pilnaekranei veiksenai"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK2"
+msgid "Use autochange fullscreen monitor mode"
+msgstr "Perjungti monitoriaus režimą pilnaekranėje veiksenoje"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_BUTTON1"
+msgid "Add"
+msgstr "PridÄ—ti"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_BUTTON2"
+msgid "Del"
+msgstr "Pašalinti"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_BUTTON3"
+msgid "Up"
+msgstr "Aukštyn"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_BUTTON4"
+msgid "Down"
+msgstr "Žemyn"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK3"
+msgid "Apply default monitor mode on fullscreen exit"
+msgstr "Pereinant iš pilnaekranės veiksenos panaudoti režimą „pagal nutylėjimą“"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_RESTORERESCHECK"
+msgid "Restore resolution on program exit"
+msgstr "Atstatyti skiriamąją gebą išeinant iš programos"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC"
+msgid "Delay"
+msgstr "Delsa"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC2"
+msgid "s"
+msgstr "s"
+
+msgctxt "IDD_NAVIGATION_DLG_IDC_NAVIGATION_INFO"
+msgid "Info"
+msgstr "Informacija"
+
+msgctxt "IDD_NAVIGATION_DLG_IDC_NAVIGATION_SCAN"
+msgid "Scan"
+msgstr "Skenuoti"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_CHECK1"
+msgid "Prefer forced and/or default subtitles tracks"
+msgstr "Teikti pirmenybÄ™ forsuotiems ir subtitrams pagal nutylÄ—jimÄ…"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_CHECK2"
+msgid "Prefer external subtitles over embedded subtitles"
+msgstr "Visada naudoti išorinius subtitrus kaip pagrindinius"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_CHECK3"
+msgid "Ignore embedded subtitles"
+msgstr "Nenaudoti integruotų subtitrų"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_STATIC"
+msgid "Autoload paths"
+msgstr "Kelias išoriniams subtitrams"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_BUTTON1"
+msgid "Reset"
+msgstr "Atstatyti"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_STATIC"
+msgid "Online database"
+msgstr "Duomenų bazė internete"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_STATIC"
+msgid "Base URL of the online subtitle database:"
+msgstr "Subtitrų duomenų bazės URL:"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_BUTTON2"
+msgid "Test"
+msgstr "Testas"
+
+msgctxt "IDD_UPDATE_DIALOG_CAPTION"
+msgid "Update Checker"
+msgstr "Tikrinti naujinimus"
+
+msgctxt "IDD_UPDATE_DIALOG_IDC_UPDATE_DL_BUTTON"
+msgid "&Download now"
+msgstr "Atsisiųsti &dabar"
+
+msgctxt "IDD_UPDATE_DIALOG_IDC_UPDATE_LATER_BUTTON"
+msgid "Remind me &later"
+msgstr "Priminti vÄ—&liau"
+
+msgctxt "IDD_UPDATE_DIALOG_IDC_UPDATE_IGNORE_BUTTON"
+msgid "&Ignore this update"
+msgstr "&Ignoruoti šį naujinimą"
+
+msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
+msgid "Shaders contain special effects which can be added to the video rendering process."
+msgstr "Tamsinimai turi specialius efektus, kuriuos galima įdėti atvaizdavimo metu."
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON12"
+msgid "Add shader file"
+msgstr "PridÄ—ti tamsinimo failÄ…"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON13"
+msgid "Remove"
+msgstr "Pašalinti"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON1"
+msgid "Add to pre-resize"
+msgstr "PridÄ—ti prie pre-resize"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON2"
+msgid "Add to post-resize"
+msgstr "PridÄ—ti prie post-resize"
+
+msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
+msgid "Shader presets"
+msgstr "Tamsinimo priešnustatymai"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON3"
+msgid "Load"
+msgstr "Įkelti"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON4"
+msgid "Save"
+msgstr "IÅ¡saugoti"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON5"
+msgid "Delete"
+msgstr "Å alinti"
+
+msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
+msgid "Active pre-resize shaders"
+msgstr "Aktyvūs pre-resize šeideriai"
+
+msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
+msgid "Active post-resize shaders"
+msgstr "Aktyvūs post-resize šeideriai"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_CAPTION"
+msgid "Debug Shaders"
+msgstr "Tamsinimų derinimas"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_STATIC"
+msgid "Debug Information"
+msgstr "Derinimo informacija"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_RADIO1"
+msgid "PS 2.0"
+msgstr "PS 2.0"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_RADIO2"
+msgid "PS 2.0b"
+msgstr "PS 2.0b"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_RADIO3"
+msgid "PS 2.0a"
+msgstr "PS 2.0a"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_RADIO4"
+msgid "PS 3.0"
+msgstr "PS 3.0"
+
+msgctxt "IDD_PPAGEADVANCED_IDC_STATIC"
+msgid "Advanced Settings, do not edit unless you know what you are doing."
+msgstr "Papildomi nustatymai. Prieš keisdami juos įsitikinkite, jog žinote ką darote. "
+
+msgctxt "IDD_PPAGEADVANCED_IDC_RADIO1"
+msgid "True"
+msgstr "Tiesa"
+
+msgctxt "IDD_PPAGEADVANCED_IDC_RADIO2"
+msgid "False"
+msgstr "Netiesa"
+
+msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
+msgid "Default"
+msgstr "Numatyta"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Įrenginys"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Monopolinis režimas"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Leisti srautinį"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Nustatymai"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Įjungti stereo žiedavimą (ausinėms)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Nukirpimas:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Lygis:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Žymė"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Norint maksimaliai sumažinti garso iškraipymus, rekomenduojama laikyti garsumo lygį apie 85 % grojant garsų kūrinį suglaudintą su nuostoliais."
+
+msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
+msgid "JPEG quality:"
+msgstr "JPEG kokybÄ—:"
+
+msgctxt "IDD_CMD_LINE_HELP_CAPTION"
+msgid "Command line help"
+msgstr "Komandinės eilutės žinynas"
+
+msgctxt "IDD_CMD_LINE_HELP_IDOK"
+msgid "OK"
+msgstr "Gerai"
+
+msgctxt "IDD_CRASH_REPORTER_CAPTION"
+msgid "Crash reporter"
+msgstr "Lūžio ataskaita"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Apgailestaujame, taÄiau, matomai, MPC-HC nulūžo. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Atsiųskite mums klaidos ataskaitą, kad padėtumėte mums nustatyti ir ištaisyti problemą."
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
+msgid "Optional information"
+msgstr "Papildoma informacija"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
+msgid "Email:"
+msgstr "Elektroninis paštas:"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC3"
+msgid "Your email address is optional and will only be used if the developers need to contact you for more information."
+msgstr "Elektroninio paÅ¡to adresas nÄ—ra bÅ«tinas, taÄiau jis gali bÅ«ti panaudotas susisiekti kÅ«rÄ—jams su jumis dÄ—l papildomos informacijos."
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
+msgid "Problem description (use English only):"
+msgstr "Problemos aprašymas (tik anglų kalba)"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Paleisti iš naujo MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Išeiti iš MPC-HC"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.lt.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.lt.menus.po
new file mode 100644
index 000000000..7679e4939
--- /dev/null
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.lt.menus.po
@@ -0,0 +1,700 @@
+# MPC-HC - Strings extracted from menus
+# Copyright (C) 2002 - 2013 see Authors.txt
+# This file is distributed under the same license as the MPC-HC package.
+# Translators:
+# linasmi <linasmi@mail.ru>, 2015
+# Linas Tamašauskas, 2014-2015
+# Martynas Kybartas <maky@super.lt>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: MPC-HC\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-09-11 11:11+0000\n"
+"Last-Translator: linasmi <linasmi@mail.ru>\n"
+"Language-Team: Lithuanian (http://www.transifex.com/mpc-hc/mpc-hc/language/lt/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: lt\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+msgctxt "POPUP"
+msgid "&File"
+msgstr "&Failas"
+
+msgctxt "ID_FILE_OPENQUICK"
+msgid "&Quick Open File..."
+msgstr "&Greitai atverti failÄ…..."
+
+msgctxt "ID_FILE_OPENMEDIA"
+msgid "&Open File..."
+msgstr "&Atverti failÄ…..."
+
+msgctxt "ID_FILE_OPENDVDBD"
+msgid "Open &DVD/BD..."
+msgstr "Atverti D&VD/BD..."
+
+msgctxt "ID_FILE_OPENDEVICE"
+msgid "Open De&vice..."
+msgstr "Atverti į&renginį"
+
+msgctxt "ID_FILE_OPENDIRECTORY"
+msgid "Open Dir&ectory..."
+msgstr "Atverti &katalogÄ…"
+
+msgctxt "ID_FILE_OPENDISC"
+msgid "O&pen Disc"
+msgstr "Atverti &diskÄ…"
+
+msgctxt "ID_RECENT_FILES"
+msgid "Recent &Files"
+msgstr "&Paskiausiai naudoti failai"
+
+msgctxt "ID_FILE_CLOSE_AND_RESTORE"
+msgid "&Close"
+msgstr "&Uždaryti"
+
+msgctxt "ID_FILE_SAVE_COPY"
+msgid "&Save a Copy..."
+msgstr "Įrašyti k&opiją"
+
+msgctxt "ID_FILE_SAVE_IMAGE"
+msgid "Save &Image..."
+msgstr "Įrašyti at&vaizdą"
+
+msgctxt "ID_FILE_SAVE_THUMBNAILS"
+msgid "Save &Thumbnails..."
+msgstr "Įrašyti &miniatiūras"
+
+msgctxt "ID_FILE_LOAD_SUBTITLE"
+msgid "&Load Subtitle..."
+msgstr "Įkelti &subtitrus..."
+
+msgctxt "ID_FILE_SAVE_SUBTITLE"
+msgid "Save S&ubtitle..."
+msgstr "Įrašyti s&ubtitrus..."
+
+msgctxt "POPUP"
+msgid "Subtitle Data&base"
+msgstr "Subtitrų d&uomenų bazė"
+
+msgctxt "ID_FILE_ISDB_SEARCH"
+msgid "&Search..."
+msgstr "&Ieškoti..."
+
+msgctxt "ID_FILE_ISDB_UPLOAD"
+msgid "&Upload..."
+msgstr "Įk&elti..."
+
+msgctxt "ID_FILE_ISDB_DOWNLOAD"
+msgid "&Download..."
+msgstr "At&sisiųsti"
+
+msgctxt "ID_FILE_PROPERTIES"
+msgid "P&roperties"
+msgstr "Sa&vybÄ—s"
+
+msgctxt "ID_FILE_EXIT"
+msgid "E&xit"
+msgstr "&Baigti"
+
+msgctxt "POPUP"
+msgid "&View"
+msgstr "&Rodymas"
+
+msgctxt "ID_VIEW_CAPTIONMENU"
+msgid "Caption&&Menu"
+msgstr "Įrašų&&meniu"
+
+msgctxt "ID_VIEW_SEEKER"
+msgid "See&k Bar"
+msgstr "Slan&kjuostÄ—"
+
+msgctxt "ID_VIEW_CONTROLS"
+msgid "&Controls"
+msgstr "&Valdymo mygtukai"
+
+msgctxt "ID_VIEW_INFORMATION"
+msgid "&Information"
+msgstr "&Informacija"
+
+msgctxt "ID_VIEW_STATISTICS"
+msgid "&Statistics"
+msgstr "&Statistika"
+
+msgctxt "ID_VIEW_STATUS"
+msgid "St&atus"
+msgstr "&BÅ«senos juosta"
+
+msgctxt "ID_VIEW_SUBRESYNC"
+msgid "Su&bresync"
+msgstr "Subtitrų sin&chronizavimas"
+
+msgctxt "ID_VIEW_PLAYLIST"
+msgid "Pla&ylist"
+msgstr "&Grojaraštis"
+
+msgctxt "ID_VIEW_CAPTURE"
+msgid "Captu&re"
+msgstr "Už&fiksuoti"
+
+msgctxt "ID_VIEW_NAVIGATION"
+msgid "Na&vigation"
+msgstr "Na&vigacija"
+
+msgctxt "ID_VIEW_DEBUGSHADERS"
+msgid "&Debug Shaders"
+msgstr "Tamsinimų &derinimas"
+
+msgctxt "POPUP"
+msgid "&Presets..."
+msgstr "&SÄ…sajos parinktys..."
+
+msgctxt "ID_VIEW_PRESETS_MINIMAL"
+msgid "&Minimal"
+msgstr "&Minimalus"
+
+msgctxt "ID_VIEW_PRESETS_COMPACT"
+msgid "&Compact"
+msgstr "&Kompaktiškas"
+
+msgctxt "ID_VIEW_PRESETS_NORMAL"
+msgid "&Normal"
+msgstr "&Normalus"
+
+msgctxt "ID_VIEW_FULLSCREEN"
+msgid "F&ull Screen"
+msgstr "Pilno &ekrano veiksena"
+
+msgctxt "POPUP"
+msgid "&Zoom"
+msgstr "&Mastelis"
+
+msgctxt "ID_VIEW_ZOOM_50"
+msgid "&50%"
+msgstr "&50%"
+
+msgctxt "ID_VIEW_ZOOM_100"
+msgid "&100%"
+msgstr "&100%"
+
+msgctxt "ID_VIEW_ZOOM_200"
+msgid "&200%"
+msgstr "&200%"
+
+msgctxt "ID_VIEW_ZOOM_AUTOFIT"
+msgid "Auto &Fit"
+msgstr "&Automatinis pritaikymas"
+
+msgctxt "ID_VIEW_ZOOM_AUTOFIT_LARGER"
+msgid "Auto Fit (&Larger Only)"
+msgstr "Automatinis pritaikymas (tik &didesniems)"
+
+msgctxt "POPUP"
+msgid "R&enderer Settings"
+msgstr "At&vaizdavimo nuostatos"
+
+msgctxt "ID_VIEW_TEARING_TEST"
+msgid "&Tearing Test"
+msgstr "&TrÅ«kÄiojimo testas"
+
+msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
+msgid "&Display Statistics"
+msgstr "&Rodyti statistikÄ…"
+
+msgctxt "ID_VIEW_OSD_DISPLAY_TIME"
+msgid "Display Current T&ime"
+msgstr "Rodyti esamÄ… l&aikÄ…"
+
+msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
+msgid "Show &File Name"
+msgstr "Rodyti &failo vardÄ…"
+
+msgctxt "POPUP"
+msgid "&Output Range"
+msgstr "IÅ¡vesties &diapazonas"
+
+msgctxt "ID_VIEW_EVROUTPUTRANGE_0_255"
+msgid "&0 - 255"
+msgstr "&0 - 255"
+
+msgctxt "ID_VIEW_EVROUTPUTRANGE_16_235"
+msgid "&16 - 235"
+msgstr "&16 - 235"
+
+msgctxt "POPUP"
+msgid "&Presentation"
+msgstr "&Pateikimas"
+
+msgctxt "ID_VIEW_D3DFULLSCREEN"
+msgid "D3D Fullscreen &Mode"
+msgstr "D3D &pilno ekrano veiksena"
+
+msgctxt "ID_VIEW_FULLSCREENGUISUPPORT"
+msgid "D3D Fullscreen &GUI Support"
+msgstr "D3D pilno ekrano &GUI palaikymas"
+
+msgctxt "ID_VIEW_HIGHCOLORRESOLUTION"
+msgid "10-bit &RGB Output"
+msgstr "10-bitų &RGB išvestis"
+
+msgctxt "ID_VIEW_FORCEINPUTHIGHCOLORRESOLUTION"
+msgid "Force 10-bit RGB &Input"
+msgstr "Priverstinė 10-bitų RGB į&vestis"
+
+msgctxt "ID_VIEW_FULLFLOATINGPOINTPROCESSING"
+msgid "&Full Floating Point Processing"
+msgstr "&Pilnas slankiojo kablelio vyksmas"
+
+msgctxt "ID_VIEW_HALFFLOATINGPOINTPROCESSING"
+msgid "&Half Floating Point Processing"
+msgstr "&PusÄ— slankiojo kablelio vyksmo"
+
+msgctxt "ID_VIEW_DISABLEDESKTOPCOMPOSITION"
+msgid "Disable desktop composition (&Aero)"
+msgstr "IÅ¡jungti darbalaukio komponavimÄ… (&Aero)"
+
+msgctxt "ID_VIEW_ENABLEFRAMETIMECORRECTION"
+msgid "Enable Frame Time &Correction"
+msgstr "Įgalinti kadro &laiko korekciją"
+
+msgctxt "POPUP"
+msgid "&Color Management"
+msgstr "&Spalvų valdymas"
+
+msgctxt "ID_VIEW_CM_ENABLE"
+msgid "&Enable"
+msgstr "Ä®&galinti"
+
+msgctxt "POPUP"
+msgid "&Input Type"
+msgstr "Ä®&vesties tipas"
+
+msgctxt "ID_VIEW_CM_INPUT_AUTO"
+msgid "&Auto-Detect"
+msgstr "&Automatinis aptikimas"
+
+msgctxt "ID_VIEW_CM_INPUT_HDTV"
+msgid "&HDTV"
+msgstr "&HDTV"
+
+msgctxt "ID_VIEW_CM_INPUT_SDTV_NTSC"
+msgid "SDTV &NTSC"
+msgstr "SDTV &NTSC"
+
+msgctxt "ID_VIEW_CM_INPUT_SDTV_PAL"
+msgid "SDTV &PAL"
+msgstr "SDTV &PAL"
+
+msgctxt "POPUP"
+msgid "Ambient &Light"
+msgstr "&Aplinkos apšvietimas"
+
+msgctxt "ID_VIEW_CM_AMBIENTLIGHT_BRIGHT"
+msgid "&Bright (2.2 Gamma)"
+msgstr "Å &viesus (2.2 Gama)"
+
+msgctxt "ID_VIEW_CM_AMBIENTLIGHT_DIM"
+msgid "&Dim (2.35 Gamma)"
+msgstr "&Pritemdytas (2.35 Gama)"
+
+msgctxt "ID_VIEW_CM_AMBIENTLIGHT_DARK"
+msgid "D&ark (2.4 Gamma)"
+msgstr "&Tamsus (2.4 Gama)"
+
+msgctxt "POPUP"
+msgid "&Rendering Intent"
+msgstr "&Atvaizdavimo būdas"
+
+msgctxt "ID_VIEW_CM_INTENT_PERCEPTUAL"
+msgid "&Perceptual"
+msgstr "&Suvokiaminis"
+
+msgctxt "ID_VIEW_CM_INTENT_RELATIVECOLORIMETRIC"
+msgid "&Relative Colorimetric"
+msgstr "&Santykinis kolorimetrinis"
+
+msgctxt "ID_VIEW_CM_INTENT_SATURATION"
+msgid "&Saturation"
+msgstr "&Sodrumas"
+
+msgctxt "ID_VIEW_CM_INTENT_ABSOLUTECOLORIMETRIC"
+msgid "&Absolute Colorimetric"
+msgstr "&Absoliutus kolorimetrinis"
+
+msgctxt "POPUP"
+msgid "&VSync"
+msgstr "&Vertikali sinchronizacija"
+
+msgctxt "ID_VIEW_VSYNC"
+msgid "&VSync"
+msgstr "&Vertikali sinchronizacija"
+
+msgctxt "ID_VIEW_VSYNCACCURATE"
+msgid "&Accurate VSync"
+msgstr "&Tiksli vert. sinchr."
+
+msgctxt "ID_VIEW_ALTERNATIVEVSYNC"
+msgid "A&lternative VSync"
+msgstr "&Alternatyvi vert. sinchr."
+
+msgctxt "ID_VIEW_VSYNCOFFSET_DECREASE"
+msgid "&Decrease VSync Offset"
+msgstr "&Sumažinti vert. sinchr. atsvarą"
+
+msgctxt "ID_VIEW_VSYNCOFFSET_INCREASE"
+msgid "&Increase VSync Offset"
+msgstr "&Padidinti vert. sinchr. atsvarÄ…"
+
+msgctxt "POPUP"
+msgid "&GPU Control"
+msgstr "&Grafinio procesoriaus kontrolÄ—"
+
+msgctxt "ID_VIEW_FLUSHGPU_BEFOREVSYNC"
+msgid "Flush GPU &before VSync"
+msgstr "Išvalyti atmintį prieš vert. sinchr."
+
+msgctxt "ID_VIEW_FLUSHGPU_AFTERPRESENT"
+msgid "Flush GPU &after Present"
+msgstr "Išvalyti atmintį po vert. sinchr."
+
+msgctxt "ID_VIEW_FLUSHGPU_WAIT"
+msgid "&Wait for flushes"
+msgstr "Laukti atminties valymų"
+
+msgctxt "POPUP"
+msgid "R&eset"
+msgstr "Atstatyti"
+
+msgctxt "ID_VIEW_RESET_DEFAULT"
+msgid "Reset to &default renderer settings"
+msgstr "Atstatyti numatytuosius atvaizdavimo nustatymus"
+
+msgctxt "ID_VIEW_RESET_OPTIMAL"
+msgid "Reset to &optimal renderer settings"
+msgstr "Nustatyti optimalius atvaizdavimo nustatymus"
+
+msgctxt "POPUP"
+msgid "Video &Frame"
+msgstr "Vaizdo &kadras"
+
+msgctxt "ID_VIEW_VF_HALF"
+msgid "&Half Size"
+msgstr "&Pusinis dydis"
+
+msgctxt "ID_VIEW_VF_NORMAL"
+msgid "&Normal Size"
+msgstr "&Normalus dydis"
+
+msgctxt "ID_VIEW_VF_DOUBLE"
+msgid "&Double Size"
+msgstr "&Dvigubas dydis"
+
+msgctxt "ID_VIEW_VF_STRETCH"
+msgid "&Stretch To Window"
+msgstr "&IÅ¡temptas pagal langÄ…"
+
+msgctxt "ID_VIEW_VF_FROMINSIDE"
+msgid "Touch Window From &Inside"
+msgstr "Ä®&terptas lango viduje"
+
+msgctxt "ID_VIEW_VF_ZOOM1"
+msgid "Zoom &1"
+msgstr "Mastelis &1"
+
+msgctxt "ID_VIEW_VF_ZOOM2"
+msgid "Zoom &2"
+msgstr "Mastelis &2"
+
+msgctxt "ID_VIEW_VF_FROMOUTSIDE"
+msgid "Touch Window From &Outside"
+msgstr "&Apkarpytas pagal langÄ…"
+
+msgctxt "ID_VIEW_VF_KEEPASPECTRATIO"
+msgid "&Keep Aspect Ratio"
+msgstr "Iš&laikyti kraštinių santykį"
+
+msgctxt "POPUP"
+msgid "Override &Aspect Ratio"
+msgstr "&Pakeisti proporcijÄ…"
+
+msgctxt "ID_ASPECTRATIO_SOURCE"
+msgid "&Default"
+msgstr "&Numatytoji"
+
+msgctxt "ID_ASPECTRATIO_4_3"
+msgid "&4:3"
+msgstr "&4:3"
+
+msgctxt "ID_ASPECTRATIO_5_4"
+msgid "&5:4"
+msgstr "&5:4"
+
+msgctxt "ID_ASPECTRATIO_16_9"
+msgid "&16:9"
+msgstr "&16:9"
+
+msgctxt "ID_ASPECTRATIO_235_100"
+msgid "&235:100"
+msgstr "&235:100"
+
+msgctxt "ID_ASPECTRATIO_185_100"
+msgid "1&85:100"
+msgstr "1&85:100"
+
+msgctxt "ID_VIEW_VF_COMPMONDESKARDIFF"
+msgid "&Correct Monitor/Desktop AR Diff"
+msgstr "&Taisyti monitoriaus / darbalaukio kraštinių santykio skirtumą"
+
+msgctxt "POPUP"
+msgid "Pa&n&&Scan"
+msgstr "PadÄ—tis ir dydis"
+
+msgctxt "ID_VIEW_INCSIZE"
+msgid "&Increase Size"
+msgstr "Pa&didinti"
+
+msgctxt "ID_VIEW_DECSIZE"
+msgid "&Decrease Size"
+msgstr "Su&mažinti"
+
+msgctxt "ID_VIEW_INCWIDTH"
+msgid "I&ncrease Width"
+msgstr "IÅ¡&tempti"
+
+msgctxt "ID_VIEW_DECWIDTH"
+msgid "D&ecrease Width"
+msgstr "Su&traukti"
+
+msgctxt "ID_VIEW_INCHEIGHT"
+msgid "In&crease Height"
+msgstr "IÅ¡&plÄ—sti"
+
+msgctxt "ID_VIEW_DECHEIGHT"
+msgid "Decre&ase Height"
+msgstr "Su&spausti"
+
+msgctxt "ID_PANSCAN_MOVERIGHT"
+msgid "Move &Right"
+msgstr "Pastumti dešinėn"
+
+msgctxt "ID_PANSCAN_MOVELEFT"
+msgid "Move &Left"
+msgstr "Pastumti kairÄ—n"
+
+msgctxt "ID_PANSCAN_MOVEUP"
+msgid "Move &Up"
+msgstr "Pastumti aukštyn"
+
+msgctxt "ID_PANSCAN_MOVEDOWN"
+msgid "Move &Down"
+msgstr "Pastumti žemyn"
+
+msgctxt "ID_PANSCAN_CENTER"
+msgid "Cen&ter"
+msgstr "Centruoti"
+
+msgctxt "ID_VIEW_RESET"
+msgid "Re&set"
+msgstr "Atstatyti"
+
+msgctxt "POPUP"
+msgid "On &Top"
+msgstr "Viršuje"
+
+msgctxt "ID_ONTOP_DEFAULT"
+msgid "&Default"
+msgstr "&Numatyta"
+
+msgctxt "ID_ONTOP_ALWAYS"
+msgid "&Always"
+msgstr "Visada"
+
+msgctxt "ID_ONTOP_WHILEPLAYING"
+msgid "While &Playing"
+msgstr "&Grojant"
+
+msgctxt "ID_ONTOP_WHILEPLAYINGVIDEO"
+msgid "While Playing &Video"
+msgstr "Grojant &vaizdo įrašus;"
+
+msgctxt "ID_VIEW_OPTIONS"
+msgid "&Options..."
+msgstr "&Nustatymai..."
+
+msgctxt "POPUP"
+msgid "&Play"
+msgstr "&Groti"
+
+msgctxt "ID_PLAY_PLAYPAUSE"
+msgid "&Play/Pause"
+msgstr "Groti/&PauzÄ—"
+
+msgctxt "ID_PLAY_STOP"
+msgid "&Stop"
+msgstr "&Stabdyti"
+
+msgctxt "ID_PLAY_FRAMESTEP"
+msgid "F&rame Step"
+msgstr "&Kadro žingsnis"
+
+msgctxt "ID_PLAY_DECRATE"
+msgid "&Decrease Rate"
+msgstr "Su&lÄ—tinti"
+
+msgctxt "ID_PLAY_INCRATE"
+msgid "&Increase Rate"
+msgstr "Pa&greitinti"
+
+msgctxt "ID_PLAY_RESETRATE"
+msgid "R&eset Rate"
+msgstr "&Atstatyti greitį"
+
+msgctxt "ID_FILTERS"
+msgid "&Filters"
+msgstr "&Filtrai"
+
+msgctxt "ID_SHADERS"
+msgid "S&haders"
+msgstr "T&amsinimai"
+
+msgctxt "ID_AUDIOS"
+msgid "&Audio Track"
+msgstr "&Garso takelis"
+
+msgctxt "ID_SUBTITLES"
+msgid "Su&btitle Track"
+msgstr "Su&btitrai"
+
+msgctxt "ID_VIDEO_STREAMS"
+msgid "&Video Track"
+msgstr "&Vaizdo takelis"
+
+msgctxt "POPUP"
+msgid "&Volume"
+msgstr "Ga&rsumas"
+
+msgctxt "ID_VOLUME_UP"
+msgid "&Up"
+msgstr "Pa&garsinti"
+
+msgctxt "ID_VOLUME_DOWN"
+msgid "&Down"
+msgstr "Pa&tylinti"
+
+msgctxt "ID_VOLUME_MUTE"
+msgid "&Mute"
+msgstr "&Nutildyti"
+
+msgctxt "POPUP"
+msgid "Af&ter Playback"
+msgstr "P&o grojimo"
+
+msgctxt "ID_AFTERPLAYBACK_DONOTHING"
+msgid "Do no&thing"
+msgstr "Nieko ne&daryti"
+
+msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
+msgid "Play &next file in the folder"
+msgstr "Groti &kitÄ… aplanko failÄ…"
+
+msgctxt "ID_AFTERPLAYBACK_MONITOROFF"
+msgid "Turn off the &monitor"
+msgstr "Išjungti &monitorių"
+
+msgctxt "ID_AFTERPLAYBACK_EXIT"
+msgid "&Exit"
+msgstr "&Uždaryti"
+
+msgctxt "ID_AFTERPLAYBACK_STANDBY"
+msgid "&Stand By"
+msgstr "&Pristabdyti"
+
+msgctxt "ID_AFTERPLAYBACK_HIBERNATE"
+msgid "&Hibernate"
+msgstr "&Užmigdyti"
+
+msgctxt "ID_AFTERPLAYBACK_SHUTDOWN"
+msgid "Shut&down"
+msgstr "&IÅ¡jungti"
+
+msgctxt "ID_AFTERPLAYBACK_LOGOFF"
+msgid "Log &Off"
+msgstr "&IÅ¡siregistruoti"
+
+msgctxt "ID_AFTERPLAYBACK_LOCK"
+msgid "&Lock"
+msgstr "Už&rakinti"
+
+msgctxt "POPUP"
+msgid "&Navigate"
+msgstr "&Valdyti"
+
+msgctxt "ID_NAVIGATE_SKIPBACK"
+msgid "&Previous"
+msgstr "&Ankstesnis"
+
+msgctxt "ID_NAVIGATE_SKIPFORWARD"
+msgid "&Next"
+msgstr "&Sekantis"
+
+msgctxt "ID_NAVIGATE_GOTO"
+msgid "&Go To..."
+msgstr "Š&okti į laiką..."
+
+msgctxt "ID_NAVIGATE_TITLEMENU"
+msgid "&Title Menu"
+msgstr "&Titulinis meniu"
+
+msgctxt "ID_NAVIGATE_ROOTMENU"
+msgid "&Root Menu"
+msgstr "&Pagrindinis meniu"
+
+msgctxt "ID_NAVIGATE_SUBPICTUREMENU"
+msgid "&Subtitle Menu"
+msgstr "Su&btitrų meniu"
+
+msgctxt "ID_NAVIGATE_AUDIOMENU"
+msgid "&Audio Menu"
+msgstr "&Garso meniu"
+
+msgctxt "ID_NAVIGATE_ANGLEMENU"
+msgid "An&gle Menu"
+msgstr "&Kampinis meniu"
+
+msgctxt "ID_NAVIGATE_CHAPTERMENU"
+msgid "&Chapter Menu"
+msgstr "&Skyriaus meniu"
+
+msgctxt "ID_FAVORITES"
+msgid "F&avorites"
+msgstr "&Parankiniai"
+
+msgctxt "POPUP"
+msgid "&Help"
+msgstr "&Pagalba"
+
+msgctxt "ID_HELP_HOMEPAGE"
+msgid "&Home Page"
+msgstr "&Namų puslapis"
+
+msgctxt "ID_HELP_CHECKFORUPDATE"
+msgid "Check for &updates"
+msgstr "&Tikrinti ar yra atnaujinimų"
+
+msgctxt "ID_HELP_SHOWCOMMANDLINESWITCHES"
+msgid "&Command Line Switches"
+msgstr "&KomandinÄ—s eilutÄ—s parametrai"
+
+msgctxt "ID_HELP_TOOLBARIMAGES"
+msgid "Download &Toolbar Images"
+msgstr "Atsisiųsti &įrankių juostos paveikslėlius"
+
+msgctxt "ID_HELP_DONATE"
+msgid "&Donate"
+msgstr "&Paremti"
+
+msgctxt "ID_HELP_ABOUT"
+msgid "&About..."
+msgstr "&Apie..."
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.lt.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.lt.strings.po
new file mode 100644
index 000000000..04577f66e
--- /dev/null
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.lt.strings.po
@@ -0,0 +1,3606 @@
+# MPC-HC - Strings extracted from string tables
+# Copyright (C) 2002 - 2013 see Authors.txt
+# This file is distributed under the same license as the MPC-HC package.
+# Translators:
+# linasmi <linasmi@mail.ru>, 2014-2015
+# Linas Tamašauskas, 2014
+# Linas Tamašauskas, 2014-2015
+# Martynas Kybartas <maky@super.lt>, 2014
+# Underground78, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: MPC-HC\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Lithuanian (http://www.transifex.com/mpc-hc/mpc-hc/language/lt/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: lt\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+msgctxt "IDS_INFOBAR_LOCATION"
+msgid "Location"
+msgstr "Vieta"
+
+msgctxt "IDS_INFOBAR_VIDEO"
+msgid "Video"
+msgstr "Vaizdas"
+
+msgctxt "IDS_INFOBAR_AUDIO"
+msgid "Audio"
+msgstr "Garsas"
+
+msgctxt "IDS_INFOBAR_SUBTITLES"
+msgid "Subtitles"
+msgstr "Subtitrai"
+
+msgctxt "IDS_INFOBAR_CHAPTER"
+msgid "Chapter"
+msgstr "Skyrius"
+
+msgctxt "IDS_CONTROLS_COMPLETING"
+msgid "Completing..."
+msgstr "Užbaigimas..."
+
+msgctxt "IDS_AUTOPLAY_PLAYVIDEO"
+msgid "Play Video"
+msgstr "Groti vaizdo kūrinį"
+
+msgctxt "IDS_AUTOPLAY_PLAYMUSIC"
+msgid "Play Music"
+msgstr "Groti garso kūrinį"
+
+msgctxt "IDS_AUTOPLAY_PLAYAUDIOCD"
+msgid "Play Audio CD"
+msgstr "Groti audio CD"
+
+msgctxt "IDS_AUTOPLAY_PLAYDVDMOVIE"
+msgid "Play DVD Movie"
+msgstr "Groti DVD filmÄ…"
+
+msgctxt "IDS_PROPSHEET_PROPERTIES"
+msgid "Properties"
+msgstr "YpatybÄ—s"
+
+msgctxt "IDS_SUBTITLES_DEFAULT_STYLE"
+msgid "&Default Style"
+msgstr "&Numatytasis stilius"
+
+msgctxt "IDS_FAVFILES"
+msgid "Files"
+msgstr "Failai"
+
+msgctxt "IDS_FAVDVDS"
+msgid "DVDs"
+msgstr "DVD"
+
+msgctxt "IDS_INFOBAR_CHANNEL"
+msgid "Channel"
+msgstr "Kanalas"
+
+msgctxt "IDS_INFOBAR_TIME"
+msgid "Time"
+msgstr "Laikas"
+
+msgctxt "IDS_STATSBAR_SYNC_OFFSET"
+msgid "Sync Offset"
+msgstr "Sinchronizacijos poslinkis"
+
+msgctxt "IDS_STATSBAR_SYNC_OFFSET_FORMAT"
+msgid "avg: %d ms, dev: %d ms"
+msgstr "vid: %d ms, nuk: %d ms"
+
+msgctxt "IDS_STATSBAR_JITTER"
+msgid "Jitter"
+msgstr "Vibracija"
+
+msgctxt "IDS_STATSBAR_BITRATE"
+msgid "Bitrate"
+msgstr "Bitų sparta"
+
+msgctxt "IDS_STATSBAR_BITRATE_AVG_CUR"
+msgid "(avg/cur)"
+msgstr "(vid/dab)"
+
+msgctxt "IDS_STATSBAR_SIGNAL"
+msgid "Signal"
+msgstr "Signalas"
+
+msgctxt "IDS_STATSBAR_SIGNAL_FORMAT"
+msgid "Strength: %d dB, Quality: %ld%%"
+msgstr "Stiprumas: %d dB, KokybÄ—: %ld%%"
+
+msgctxt "IDS_SUBTITLES_STYLES_CAPTION"
+msgid "Styles"
+msgstr "Stiliai"
+
+msgctxt "IDS_TEXT_SUB_RENDERING_TARGET"
+msgid "If the rendering target is left undefined, SSA/ASS subtitles will be rendered relative to the video frame while all other text subtitles will be rendered relative to the window."
+msgstr "Jei atvaizdavimo tikslas liko neapibrėžtas, SPV/ASS subtitrai bus vaizduojami atitinkamai su vaizdo kadru, o visi kiti tekstiniai subtitrai bus vaizduojami atitinkamai su langu."
+
+msgctxt "IDS_PPAGE_CAPTURE_FG0"
+msgid "Never (fastest approach)"
+msgstr "Niekada (greiÄiausiai)"
+
+msgctxt "IDS_PPAGE_CAPTURE_FG1"
+msgid "Only when switching different video types (default)"
+msgstr "Tik kai perjungiamos skirtingos vaizdo kūrinių rūšys (numatyta)"
+
+msgctxt "IDS_PPAGE_CAPTURE_FG2"
+msgid "Always (slowest option)"
+msgstr "Visada (lÄ—Äiausiai)"
+
+msgctxt "IDS_PPAGE_CAPTURE_FGDESC0"
+msgid "Not supported by some devices. Two video decoders always present in the filter graph."
+msgstr "Nepalaikomas kai kurių įrenginių. Du vaizdo dekoderiai visada pateikiami filtrų skyriuje."
+
+msgctxt "IDS_PPAGE_CAPTURE_FGDESC1"
+msgid "Fast except when switching between different video streams. Only one video decoder present in the filter graph."
+msgstr "Greitas, išskyrus atvejus, kai persijungiama tarp skirtingų vaizdo srautų. Tik vienas vaizdo dekoderis pateikiamas filtrų skyriuje."
+
+msgctxt "IDS_PPAGE_CAPTURE_FGDESC2"
+msgid "Not recommended. Only for testing purposes."
+msgstr "Nerekomenduojama. Tik testavimui."
+
+msgctxt "IDS_PPAGE_CAPTURE_SFG0"
+msgid "Never if possible (fastest, but not supported by most filters)"
+msgstr "Nenaudoti, jei įmanoma (greiÄiausias, bet nepalaikomas daugelio filtrų)"
+
+msgctxt "IDS_PPAGE_CAPTURE_SFG1"
+msgid "Only when switching different video types (default)"
+msgstr "Tik kai perjungiamos skirtingos vaizdo kūrinių rūšys (numatyta)"
+
+msgctxt "IDS_PPAGE_CAPTURE_SFG2"
+msgid "Always (may be required by some devices)"
+msgstr "Visada (gali būti reikalaujama kai kurių įrenginių)"
+
+msgctxt "IDS_INFOBAR_PARENTAL_RATING"
+msgid "Parental rating"
+msgstr "NepilnameÄių apsauga"
+
+msgctxt "IDS_PARENTAL_RATING"
+msgid "%d+"
+msgstr "%d+"
+
+msgctxt "IDS_NO_PARENTAL_RATING"
+msgid "Not rated"
+msgstr "Neįvertinta"
+
+msgctxt "IDS_INFOBAR_CONTENT"
+msgid "Content"
+msgstr "Turinys"
+
+msgctxt "IDS_CONTENT_MOVIE_DRAMA"
+msgid "Movie/Drama"
+msgstr "Filmas/Drama"
+
+msgctxt "IDS_CONTENT_NEWS_CURRENTAFFAIRS"
+msgid "News/Current affairs"
+msgstr "Naujienos/Aktualijos"
+
+msgctxt "IDS_SPEED_UNIT_G"
+msgid "GB/s"
+msgstr "GB/s"
+
+msgctxt "IDS_FILE_FAV_ADDED"
+msgid "File added to favorites"
+msgstr "Failas pridėtas prie parankinių"
+
+msgctxt "IDS_DVD_FAV_ADDED"
+msgid "DVD added to favorites"
+msgstr "DVD pridėtas prie parankinių"
+
+msgctxt "IDS_CAPTURE_SETTINGS"
+msgid "Capture Settings"
+msgstr "Įrašymo nustatymai"
+
+msgctxt "IDS_NAVIGATION_BAR"
+msgid "Navigation Bar"
+msgstr "Valdymo juosta"
+
+msgctxt "IDS_SUBRESYNC_CAPTION"
+msgid "Subresync"
+msgstr "Subtitrų sinchronizacija"
+
+msgctxt "IDS_SUBRESYNC_CLN_TIME"
+msgid "Time"
+msgstr "Laikas"
+
+msgctxt "IDS_SUBRESYNC_CLN_END"
+msgid "End"
+msgstr "Pabaiga"
+
+msgctxt "IDS_SUBRESYNC_CLN_PREVIEW"
+msgid "Preview"
+msgstr "Peržiūra"
+
+msgctxt "IDS_SUBRESYNC_CLN_VOB_ID"
+msgid "Vob ID"
+msgstr "Vob ID"
+
+msgctxt "IDS_SUBRESYNC_CLN_CELL_ID"
+msgid "Cell ID"
+msgstr "Cell ID"
+
+msgctxt "IDS_SUBRESYNC_CLN_FORCED"
+msgid "Forced"
+msgstr "Priverstinai"
+
+msgctxt "IDS_SUBRESYNC_CLN_TEXT"
+msgid "Text"
+msgstr "Tekstas"
+
+msgctxt "IDS_SUBRESYNC_CLN_STYLE"
+msgid "Style"
+msgstr "Stilius"
+
+msgctxt "IDS_SUBRESYNC_CLN_FONT"
+msgid "Font"
+msgstr "Å riftas"
+
+msgctxt "IDS_DVD_NAV_SOME_PINS_ERROR"
+msgid "Failed to render some of the pins of the DVD Navigator filter"
+msgstr "Nepavyko apdoroti kai kurių DVD Navigator filtrų pinų"
+
+msgctxt "IDS_DVD_INTERFACES_ERROR"
+msgid "Failed to query the needed interfaces for DVD playback"
+msgstr "Nepavyko užklausti reikiamų sąsajų DVD grojimui"
+
+msgctxt "IDS_CAPTURE_LIVE"
+msgid "Live"
+msgstr "Tiesiogiai"
+
+msgctxt "IDS_CAPTURE_ERROR_VID_FILTER"
+msgid "Can't add video capture filter to the graph"
+msgstr "Neįmanoma pridėti įrašymo vaizdo filtro grafui"
+
+msgctxt "IDS_CAPTURE_ERROR_AUD_FILTER"
+msgid "Can't add audio capture filter to the graph"
+msgstr "Neįmanoma pridėti įrašymo garso filtro grafui"
+
+msgctxt "IDS_CAPTURE_ERROR_DEVICE"
+msgid "Could not open capture device."
+msgstr "Neįmanoma atverti įrašymo įrenginio"
+
+msgctxt "IDS_INVALID_PARAMS_ERROR"
+msgid "Can't open, invalid input parameters"
+msgstr "Neįmanoma įjungti, neteisingi įvesties parametrai"
+
+msgctxt "IDS_EDIT_LIST_EDITOR"
+msgid "Edit List Editor"
+msgstr "Redaguoti sąrašų redaktorių"
+
+msgctxt "IDS_GOTO_ERROR_INVALID_TIME"
+msgid "The entered time is greater than the file duration."
+msgstr "Įvestas laikas didesnis už kūrinio trukmę"
+
+msgctxt "IDS_MISSING_ICONS_LIB"
+msgid "The icons library \"mpciconlib.dll\" is missing.\nThe player's default icon will be used for file associations.\nPlease, reinstall MPC-HC to get \"mpciconlib.dll\"."
+msgstr "Nerasta „mpciconlib.dll“ piktogramų biblioteka.\nFailų susiejimams bus panaudota numatytoji grotuvo piktograma.\nPrašome įdiegti iš naujo MPC-HC, kad gautumėte „mpciconlib.dll“."
+
+msgctxt "IDS_SUBDL_DLG_FILENAME_COL"
+msgid "File"
+msgstr "Failas"
+
+msgctxt "IDS_SUBDL_DLG_LANGUAGE_COL"
+msgid "Language"
+msgstr "Kalba"
+
+msgctxt "IDS_SUBDL_DLG_FORMAT_COL"
+msgid "Format"
+msgstr "Formatas"
+
+msgctxt "IDS_SUBDL_DLG_DISC_COL"
+msgid "Disc"
+msgstr "Diskas"
+
+msgctxt "IDS_SUBDL_DLG_TITLES_COL"
+msgid "Title(s)"
+msgstr "Pavadinimas (-ai)"
+
+msgctxt "IDS_SUBRESYNC_CLN_CHARSET"
+msgid "CharSet"
+msgstr "Schemos"
+
+msgctxt "IDS_SUBRESYNC_CLN_UNICODE"
+msgid "Unicode"
+msgstr "Unikodas"
+
+msgctxt "IDS_SUBRESYNC_CLN_LAYER"
+msgid "Layer"
+msgstr "Sluoksnis"
+
+msgctxt "IDS_SUBRESYNC_CLN_ACTOR"
+msgid "Actor"
+msgstr "Aktorius"
+
+msgctxt "IDS_SUBRESYNC_CLN_EFFECT"
+msgid "Effect"
+msgstr "Efektas"
+
+msgctxt "IDS_PLAYLIST_CAPTION"
+msgid "Playlist"
+msgstr "Grojaraštis"
+
+msgctxt "IDS_PPAGE_FS_CLN_ON_OFF"
+msgid "On/Off"
+msgstr "Įj./išj."
+
+msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
+msgid "From (FPS)"
+msgstr "IÅ¡ (KPS)"
+
+msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
+msgid "To (FPS)"
+msgstr "Ä® (KPS)"
+
+msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
+msgid "Display mode (Hz)"
+msgstr "Vaizdavimo režimas (Hz)"
+
+msgctxt "IDS_PPAGE_FS_DEFAULT"
+msgid "Default"
+msgstr "Numatyta"
+
+msgctxt "IDS_PPAGE_FS_OTHER"
+msgid "Other"
+msgstr "Kiti"
+
+msgctxt "IDS_PPAGE_OUTPUT_SYS_DEF"
+msgid "System Default"
+msgstr "Sistemos numatyta"
+
+msgctxt "IDS_GRAPH_INTERFACES_ERROR"
+msgid "Failed to query the needed interfaces for playback"
+msgstr "Nepavyko užklausti reikiamų sąsajų grojimui"
+
+msgctxt "IDS_GRAPH_TARGET_WND_ERROR"
+msgid "Could not set target window for graph notification"
+msgstr "Nepavyko sukurti lango grafo rodymui"
+
+msgctxt "IDS_DVD_NAV_ALL_PINS_ERROR"
+msgid "Failed to render all pins of the DVD Navigator filter"
+msgstr "Nepavyko apdoroti visų DVD Navigator filtro pinų"
+
+msgctxt "IDS_PLAYLIST_OPEN"
+msgid "&Open"
+msgstr "&Atverti"
+
+msgctxt "IDS_PLAYLIST_ADD"
+msgid "A&dd"
+msgstr "&PridÄ—ti"
+
+msgctxt "IDS_PLAYLIST_REMOVE"
+msgid "&Remove"
+msgstr "Paša&linti"
+
+msgctxt "IDS_PLAYLIST_CLEAR"
+msgid "C&lear"
+msgstr "&IÅ¡valyti"
+
+msgctxt "IDS_PLAYLIST_COPYTOCLIPBOARD"
+msgid "&Copy to clipboard"
+msgstr "K&opijuoti į iškarpinę"
+
+msgctxt "IDS_PLAYLIST_SAVEAS"
+msgid "&Save As..."
+msgstr "IÅ¡sa&ugoti kaip..."
+
+msgctxt "IDS_PLAYLIST_SORTBYLABEL"
+msgid "Sort by &label"
+msgstr "Rikiuoti pagal &pavadinimÄ…"
+
+msgctxt "IDS_PLAYLIST_SORTBYPATH"
+msgid "Sort by &path"
+msgstr "Rikiuoti pagal &keliÄ…"
+
+msgctxt "IDS_PLAYLIST_RANDOMIZE"
+msgid "R&andomize"
+msgstr "&Maišyti"
+
+msgctxt "IDS_PLAYLIST_RESTORE"
+msgid "R&estore"
+msgstr "A&tkurti"
+
+msgctxt "IDS_SUBRESYNC_SEPARATOR"
+msgid "&Separator"
+msgstr "&Skirtukas"
+
+msgctxt "IDS_SUBRESYNC_DELETE"
+msgid "&Delete"
+msgstr "Å ali&nti"
+
+msgctxt "IDS_SUBRESYNC_DUPLICATE"
+msgid "D&uplicate"
+msgstr "D&ubliuoti"
+
+msgctxt "IDS_SUBRESYNC_RESET"
+msgid "&Reset"
+msgstr "Pra&diniai nustatymai"
+
+msgctxt "IDS_MPLAYERC_104"
+msgid "Subtitle Delay -"
+msgstr "Subtitrų delsa -"
+
+msgctxt "IDS_MPLAYERC_105"
+msgid "Subtitle Delay +"
+msgstr "Subtitrų delsa +"
+
+msgctxt "IDS_FILE_SAVE_THUMBNAILS"
+msgid "Save thumbnails"
+msgstr "Išsaugoti miniatiūras"
+
+msgctxt "IDD_PPAGEPLAYBACK"
+msgid "Playback"
+msgstr "Įrašo peržiūra"
+
+msgctxt "IDD_PPAGEPLAYER"
+msgid "Player"
+msgstr "Grotuvas"
+
+msgctxt "IDD_PPAGEDVD"
+msgid "Playback::DVD/OGM"
+msgstr "Įrašo peržiūra::DVD/OGM"
+
+msgctxt "IDD_PPAGESUBTITLES"
+msgid "Subtitles"
+msgstr "Subtitrai"
+
+msgctxt "IDD_PPAGEFORMATS"
+msgid "Player::Formats"
+msgstr "Grotuvas::Formatai"
+
+msgctxt "IDD_PPAGETWEAKS"
+msgid "Tweaks"
+msgstr "Papildomai"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER"
+msgid "Internal Filters::Audio Switcher"
+msgstr "Vidiniai filtrai::Garso perjungiklis"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS"
+msgid "External Filters"
+msgstr "IÅ¡oriniai fitrai"
+
+msgctxt "IDD_PPAGESHADERS"
+msgid "Playback::Shaders"
+msgstr "Įrašo peržiūra::Tamsinimai"
+
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Resursai"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Įvairūs"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "KÅ«rinio informacija"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Įrašo peržiūra::Įrašymas"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Įrašo peržiūra::Sync atvaizdavimo nustatymai"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Įrašo peržiūra::Pilnas ekranas"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Vidiniai filtrai::Garso pateikimas"
+
+msgctxt "IDS_AUDIOSWITCHER"
+msgid "Audio Switcher"
+msgstr "Garso jungiklis"
+
+msgctxt "IDS_ICONS_REASSOC_DLG_TITLE"
+msgid "New version of the icon library"
+msgstr "Nauja paveikslėlių bibliotekos versija"
+
+msgctxt "IDS_ICONS_REASSOC_DLG_INSTR"
+msgid "Do you want to reassociate the icons?"
+msgstr "Ar norite iš naujo susieti piktogramas?"
+
+msgctxt "IDS_ICONS_REASSOC_DLG_CONTENT"
+msgid "This will fix the icons being incorrectly displayed after an update of the icon library.\nThe file associations will not be modified, only the corresponding icons will be refreshed."
+msgstr "Tai ištaisys neteisingai po bibliotekos atnaujinimo vaizduojamas piktogramas.\nFailų susiejimai nebus pakeisti, tik atnaujintos atitinkamos piktogramos."
+
+msgctxt "IDS_PPAGE_OUTPUT_OLDRENDERER"
+msgid "Old Video Renderer"
+msgstr "Pasenusi vaizdo vaizdavimo priemonÄ—"
+
+msgctxt "IDS_PPAGE_OUTPUT_OVERLAYMIXER"
+msgid "Overlay Mixer Renderer"
+msgstr "Overlay Mixer Renderer"
+
+msgctxt "IDS_PPAGE_OUTPUT_VMR7WINDOWED"
+msgid "Video Mixing Renderer 7 (windowed)"
+msgstr "Video Mixing Renderer 7 (lange)"
+
+msgctxt "IDS_PPAGE_OUTPUT_VMR9WINDOWED"
+msgid "Video Mixing Renderer 9 (windowed)"
+msgstr "Video Mixing Renderer 9 (lange)"
+
+msgctxt "IDS_PPAGE_OUTPUT_VMR7RENDERLESS"
+msgid "Video Mixing Renderer 7 (renderless)"
+msgstr "Video Mixing Renderer 7 (lange)"
+
+msgctxt "IDS_PPAGE_OUTPUT_VMR9RENDERLESS"
+msgid "Video Mixing Renderer 9 (renderless)"
+msgstr "Video Mixing Renderer 9 (lange)"
+
+msgctxt "IDS_PPAGE_OUTPUT_EVR"
+msgid "Enhanced Video Renderer"
+msgstr "IÅ¡plÄ—stinis vaizdo renderis"
+
+msgctxt "IDS_PPAGE_OUTPUT_EVR_CUSTOM"
+msgid "Enhanced Video Renderer (custom presenter)"
+msgstr "Å¡plÄ—stinis vaizdo renderis (savas presenter)"
+
+msgctxt "IDS_PPAGE_OUTPUT_DXR"
+msgid "Haali Video Renderer"
+msgstr "Haali Video Renderer"
+
+msgctxt "IDS_PPAGE_OUTPUT_NULL_COMP"
+msgid "Null (anything)"
+msgstr "Null (viskas)"
+
+msgctxt "IDS_PPAGE_OUTPUT_NULL_UNCOMP"
+msgid "Null (uncompressed)"
+msgstr "Null (be glaudinimo)"
+
+msgctxt "IDS_PPAGE_OUTPUT_MADVR"
+msgid "madVR"
+msgstr "madVR"
+
+msgctxt "IDD_PPAGEACCELTBL"
+msgid "Player::Keys"
+msgstr "Grotuvas::Greitieji klavišai"
+
+msgctxt "IDD_PPAGESUBSTYLE"
+msgid "Subtitles::Default Style"
+msgstr "Subtitrai::Numatytas stilius"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS"
+msgid "Internal Filters"
+msgstr "Vidiniai filtrai"
+
+msgctxt "IDD_PPAGELOGO"
+msgid "Player::Logo"
+msgstr "Grotuvas::Logotipas"
+
+msgctxt "IDD_PPAGEOUTPUT"
+msgid "Playback::Output"
+msgstr "Įrašo peržiūra::Išvestis"
+
+msgctxt "IDD_PPAGEWEBSERVER"
+msgid "Player::Web Interface"
+msgstr "Grotuvas::Web SÄ…saja"
+
+msgctxt "IDD_PPAGESUBDB"
+msgid "Subtitles::Database"
+msgstr "Subtirai::Duomenų bazė"
+
+msgctxt "IDD_FILEPROPDETAILS"
+msgid "Details"
+msgstr "DetalÄ—s"
+
+msgctxt "IDD_FILEPROPCLIP"
+msgid "Clip"
+msgstr "Klipas"
+
+msgctxt "IDC_DSSYSDEF"
+msgid "Default video renderer filter for DirectShow. Others will fall back to this one when they can't be loaded for some reason. On Windown XP this is the same as VMR-7 (windowed)."
+msgstr "Numatytas vaizdo rodymas DirectShow pagal nutylėjimą. Šis režimas įsijungia tais atvejais, kai kiti negali būti įkelti. Windows XP analogiškas VMR-7 (windowed)."
+
+msgctxt "IDC_DSOLD"
+msgid "This is the default renderer of Windows 9x/me/2k. Depending on the visibility of the video window and your video card's abilities, it will switch between GDI, DirectDraw, Overlay rendering modes dynamically."
+msgstr "Numatytas vaizdo rodymas Windows 9x/me/2k. Priklausomai nuo vaizdo lango matomumo ir vaizdo plokštės galimybių, režimas dinamiškai persijungia tarp GDI, DirectDraw ir Overlay metodų."
+
+msgctxt "IDC_DSOVERLAYMIXER"
+msgid "Always renders in overlay. Generally only YUV formats are allowed, but they are presented directly without any color conversion to RGB. This is the fastest rendering method of all and the only where you can be sure about fullscreen video mirroring to tv-out activating."
+msgstr "Renderingas visuomet vyksta overlay režime. Ä®prastai pasiekiami tik YUV formatai, bet jie pateikiami tiesiogiai, be vertimo į RGB. Tai greiÄiausias metodas ir tik Äia Å¡imtu procentų veikia „veidrodinė“ vaizdo iÅ¡vestis (į TV-OUT)."
+
+msgctxt "IDC_DSVMR7WIN"
+msgid "The default renderer of Windows XP. Very stable and just a little slower than the Overlay mixer. Uses DirectDraw and runs in Overlay when it can."
+msgstr "Numatytasis vaizdo renderis Windows XP. Labai stabilus ir tik šiek tiek lėtesnis už Overlay mixer metodą. Naudoja DirectDraw ir,esant galimybei, pasileidžia overlėjuje."
+
+msgctxt "IDC_DSVMR9WIN"
+msgid "Only available if you have DirectX 9 installed. Has the same abilities as VMR-7 (windowed), but it will never use Overlay rendering and because of this it may be a little slower than VMR-7 (windowed)."
+msgstr "Pasiekiamas tik su įdiegtu DirectX 9. GalimybÄ—s analogiÅ¡kos VMR-7 (windowed), taÄiau niekad nenaudoja overlÄ—jaus, o todÄ—l gali bÅ«ti Å¡iek tiek lÄ—tesnis už VMR-7 (windowed)"
+
+msgctxt "IDC_DSVMR7REN"
+msgid "Same as the VMR-7 (windowed), but with the Allocator-Presenter plugin of MPC-HC for subtitling. Overlay video mirroring WILL NOT work. \"True Color\" desktop color space recommended."
+msgstr "Tas pats, kaip ir VMR-7 (windowed), bet su pluginu MPC-HC Allocator-Presenter titrams vaizduoti. \"Veidrodinis\" vaizdas overlėjuje NEVEIKS. Spalvų gylį rekomenduojama nustatyti \"True Color\"."
+
+msgctxt "IDC_DSVMR9REN"
+msgid "Same as the VMR-9 (windowed), but with the Allocator-Presenter plugin of MPC-HC for subtitling. Overlay video mirroring MIGHT work. \"True Color\" desktop color space recommended. Recommended for Windows XP."
+msgstr "Tas pats, kaip ir VMR-9 (windowed), bet su pluginu MPC-HC Allocator-Presenter titrams vaizduoti. \"Veidrodinis\" vaizdas overlėjuje GALI veikti. Rekomenduojamas spalvų gylis. Rekomenduojama Windows XP."
+
+msgctxt "IDC_DSDXR"
+msgid "Same as the VMR-9 (renderless), but uses a true two-pass bicubic resizer."
+msgstr "Tas pats, kaip ir VMR-9 (renderless), bet naudoja praėjimų tikrą dviejų eigų Bicubic resizer."
+
+msgctxt "IDC_DSNULL_COMP"
+msgid "Connects to any video-like media type and will send the incoming samples to nowhere. Use it when you don't need the video display and want to save the CPU from working unnecessarily."
+msgstr "Prisijungia prie bet kurio vaizdo duomenų tipo ir iÅ¡siunÄia įeinanÄius kadrus į niekur. Režimas gali praversti tausoti procesoriaus resursus tuo atveju, kai reikalingas tik garsas."
+
+msgctxt "IDC_DSNULL_UNCOMP"
+msgid "Same as the normal Null renderer, but this will only connect to uncompressed types."
+msgstr "Tas pats, kaip ir normalus Null-renderis, bet prisijungia tik prie nespaustų duomenų tipų."
+
+msgctxt "IDC_DSEVR"
+msgid "Only available on Vista or later or on XP with at least .NET Framework 3.5 installed."
+msgstr "Pasiekiama tik su Vista ar naujesne, galima ir su XP su įdiegtu .NET Framework 3.5."
+
+msgctxt "IDC_DSEVR_CUSTOM"
+msgid "Same as the EVR, but with the Allocator-Presenter of MPC-HC for subtitling and postprocessing. Recommended for Windows Vista or later."
+msgstr "Tas pats, kaip ir EVR, bet naudoja Allocator-Presenter subtitrams ir apdorojimui. Rekomenduojama Windows Vista ar naujesnÄ—ms."
+
+msgctxt "IDC_DSMADVR"
+msgid "High-quality renderer, requires a GPU that supports D3D9 or later."
+msgstr "AukÅ¡tos kokybÄ—s renderis, reikalaujantis D3D9 palaikanÄios vaizdo plokÅ¡tÄ—s ar naujesnÄ—s."
+
+msgctxt "IDC_DSSYNC"
+msgid "Same as the EVR (CP), but offers several options to synchronize the video frame rate with the display refresh rate to eliminate skipped or duplicated video frames."
+msgstr "Tas pats, kaip ir EVR (CP), bet turi papildomų priemonių sinchronizuoti kadrų dažnį su ekrano naujinimo dažniu."
+
+msgctxt "IDC_RMSYSDEF"
+msgid "Real's own renderer. SMIL scripts will work, but interaction not likely. Uses DirectDraw and runs in Overlay when it can."
+msgstr "Savas Real renderis. SMIL skriptai veiks, taÄiau be interaktyvumo. Naudoja DirectDraw ir, pagal galimybÄ™, pasileidžia overlÄ—juje."
+
+msgctxt "IDC_RMDX7"
+msgid "The output of Real's engine rendered by the DX7-based Allocator-Presenter of VMR-7 (renderless)."
+msgstr "Real išvestis apdorojama su DX7 Allocator-Presenter VMR-7 (renderless)."
+
+msgctxt "IDC_RMDX9"
+msgid "The output of Real's engine rendered by the DX9-based Allocator-Presenter of VMR-9 (renderless)."
+msgstr "Real išvestis apdorojama su DX97 Allocator-Presenter VMR-9 (renderless)."
+
+msgctxt "IDC_QTSYSDEF"
+msgid "QuickTime's own renderer. Gets a little slow when its video area is resized or partially covered by another window. When Overlay is not available it likes to fall back to GDI."
+msgstr "Savas QuickTime renderis. SulÄ—tÄ—ja keiÄiant vaizdo kadro dydį arba jei langÄ… dalinai uždengia kitas. Jei overlÄ—jus nepasiekiamas, grįžta prie GDI metodo."
+
+msgctxt "IDC_QTDX7"
+msgid "The output of QuickTime's engine rendered by the DX7-based Allocator-Presenter of VMR-7 (renderless)."
+msgstr "QuickTime išvestis apdorojama su DX7 Allocator-Presenter VMR-7 (renderless)."
+
+msgctxt "IDC_QTDX9"
+msgid "The output of QuickTime's engine rendered by the DX9-based Allocator-Presenter of VMR-9 (renderless)."
+msgstr "QuickTime išvestis apdorojama su DX9 Allocator-Presenter VMR-9 (renderless)."
+
+msgctxt "IDC_REGULARSURF"
+msgid "Video surface will be allocated as a regular offscreen surface."
+msgstr "Paviršius vaizdui išskiriamas kaip įprastas paviršius ne ekrane."
+
+msgctxt "IDS_PPAGE_OUTPUT_SYNC"
+msgid "Sync Renderer"
+msgstr "Sync Renderer"
+
+msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
+msgid "Regular offscreen plain surface"
+msgstr "Įprastas paviršius ne ekrane"
+
+msgctxt "IDS_PPAGE_OUTPUT_SURF_2D"
+msgid "2D surfaces"
+msgstr "2D paviršiai"
+
+msgctxt "IDS_PPAGE_OUTPUT_SURF_3D"
+msgid "3D surfaces (recommended)"
+msgstr "3D paviršiai (rekomenduojama)"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZE_NN"
+msgid "Nearest neighbor"
+msgstr "Artimiausias kaimynas"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BILIN"
+msgid "Bilinear"
+msgstr "Bilinear"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BIL_PS"
+msgid "Bilinear (PS 2.0)"
+msgstr "Bilinear (PS 2.0)"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BICUB1"
+msgid "Bicubic A=-0.60 (PS 2.0)"
+msgstr "Bicubic A=-0.60 (PS 2.0)"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BICUB2"
+msgid "Bicubic A=-0.75 (PS 2.0)"
+msgstr "Bicubic A=-0.75 (PS 2.0)"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BICUB3"
+msgid "Bicubic A=-1.00 (PS 2.0)"
+msgstr "Bicubic A=-1.00 (PS 2.0)"
+
+msgctxt "IDS_PPAGE_OUTPUT_UNAVAILABLE"
+msgid "**unavailable**"
+msgstr "**neprieinama**"
+
+msgctxt "IDS_PPAGE_OUTPUT_UNAVAILABLEMSG"
+msgid "The selected renderer is not installed."
+msgstr "Pasirinktas renderis nėra įdiegtas."
+
+msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_COMP"
+msgid "Null (anything)"
+msgstr "Null (viskas)"
+
+msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
+msgid "Null (uncompressed)"
+msgstr "Null (be glaudinimo)"
+
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Vidinis garso renderis"
+
+msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
+msgid "Name"
+msgstr "Vardas"
+
+msgctxt "IDS_EMB_RESOURCES_VIEWER_TYPE"
+msgid "MIME Type"
+msgstr "MIME tipas"
+
+msgctxt "IDS_EMB_RESOURCES_VIEWER_INFO"
+msgid "In order to view an embedded resource in your browser you have to enable the web interface.\n\nUse the \"Save As\" button if you only want to save the information."
+msgstr "Norint peržiūrėti įmontuotą resursą jūsų naršyklėje, būtina įjungti Web sąsają.\n\n Jei jūs norite tik išsaugoti informaciją, spragtelėkite mygtuką \"Išsaugoti kaip\"."
+
+msgctxt "IDS_DOWNLOAD_SUBS"
+msgid "Download subtitles"
+msgstr "Atsisiųsti subtitrus"
+
+msgctxt "IDS_SUBFILE_DELAY"
+msgid "Delay (ms):"
+msgstr "Delsa (ms):"
+
+msgctxt "IDS_SPEEDSTEP_AUTO"
+msgid "Auto"
+msgstr "Automatiškai"
+
+msgctxt "IDS_EXPORT_SETTINGS_NO_KEYS"
+msgid "There are no customized keys to export."
+msgstr "Nėra nustatyta jokių klavišų eksportui."
+
+msgctxt "IDS_RFS_NO_FILES"
+msgid "No media files found in the archive"
+msgstr "Archyve nerasta media failų."
+
+msgctxt "IDS_RFS_COMPRESSED"
+msgid "Compressed files are not supported"
+msgstr "Suglaudinti failai nepalaikomi."
+
+msgctxt "IDS_RFS_ENCRYPTED"
+msgid "Encrypted files are not supported"
+msgstr "Užšifruoti failai nepalaikomi"
+
+msgctxt "IDS_RFS_MISSING_VOLS"
+msgid "Couldn't find all archive volumes"
+msgstr "Negaliu rasti visų archyvo tomų"
+
+msgctxt "IDC_TEXTURESURF2D"
+msgid "Video surface will be allocated as a texture but still the 2d functions will be used to copy and stretch it onto the backbuffer. Requires a video card which can allocate 32-bit, RGBA, non-power-of-two sized textures and at least in the resolution of the video."
+msgstr "Paviršius vaizdui išskiriamas kaip tekstūra, bet kopijavimui ir vaizdo ištempimui į buferį naudojamos 2D funkcijos Reikalinga vaizdo plokštė, kuri gali skirti 32bit RGBA tekstūras su rėmeliais ne 2-kartinių, bent vaizdo geboje."
+
+msgctxt "IDC_TEXTURESURF3D"
+msgid "Video surface will be allocated as a texture and drawn as two triangles in 3d. Antialiasing turned on at the display settings may have a bad effect on the rendering speed."
+msgstr "Paviršius vaizdui išskiriamas kaip tekstūra ir piešiamas kaip du trikampiai 3D. Glodinimo (Antialiasing) įjungimas vaizdo plokštės nustatymuose gali žymiai sulėtinti renderinimo greitį."
+
+msgctxt "IDC_DX9RESIZER_COMBO"
+msgid "If there is no Pixel Shader 2.0 support, simple bilinear is used automatically."
+msgstr "Jei nėra palaikoma pikselinių tamsinimų 2,0 versija, automatiškai bus naudojamas paprastas bilinijinis metodas."
+
+msgctxt "IDC_DSVMR9LOADMIXER"
+msgid "Puts VMR-9 (renderless) into mixer mode, this means most of the controls on its property page will work and it will use a separate worker thread to renderer frames."
+msgstr "Perkelia VMR-9 (renderless) režimą į mikšerio režimą, tai reiškia, jog daugumas valdymo elementų savybių puslapyje veiks ir naudos atskirą darbinį srautą kadrų apdorojimui."
+
+msgctxt "IDC_DSVMR9YUVMIXER"
+msgid "Improves performance at the cost of some compatibility of the renderer."
+msgstr "Padidina našumą, bet gali būti problemų su suderinamumu."
+
+msgctxt "IDC_FULLSCREEN_MONITOR_CHECK"
+msgid "Reduces tearing but prevents the toolbar from being shown."
+msgstr "Sumažina plyšius, bet nerodo valdymo skydo."
+
+msgctxt "IDC_DSVMR9ALTERNATIVEVSYNC"
+msgid "Reduces tearing by bypassing the default VSync built into D3D."
+msgstr "Sumažina plyšius, veikia apeinant VSync įterpta D3D."
+
+msgctxt "IDS_SRC_VTS"
+msgid "Open VTS_xx_0.ifo to load VTS_xx_x.vob files in one piece"
+msgstr "Atverti VTS_xx_0.ifo, jog būtų įkeliami VTS_xx_x.vob failai kaip viena dalis"
+
+msgctxt "IDS_SRC_RFS"
+msgid "Based on RARFileSource, doesn't support compressed files"
+msgstr "Grįstas RARFileSource, nepalaiko suglaudintų failų"
+
+msgctxt "IDS_INTERNAL_LAVF"
+msgid "Uses LAV Filters"
+msgstr "Naudoja LAV filtrus"
+
+msgctxt "IDS_INTERNAL_LAVF_WMV"
+msgid "Uses LAV Filters. Disabled by default since Microsoft filters are usually more stable for those formats.\nIf you choose to use the internal filters, enable them for both source and decoding to have a better playback experience."
+msgstr "Naudoja LAV filtrus. Išjungta, nes paprastai šių formatų „Microsoft“ filtrai yra stabilesni.\nJei pasirinksite naudoti vidinius filtrus, įgalinkite juos šaltiniui ir dekodavimui, kad pasiektumėte geresnę failų atkūrimo kokybę."
+
+msgctxt "IDS_AG_TOGGLE_NAVIGATION"
+msgid "Toggle Navigation Bar"
+msgstr "Įj./Išj. navigacijos juostą"
+
+msgctxt "IDS_AG_VSYNCACCURATE"
+msgid "Accurate VSync"
+msgstr "Tikslus VSync"
+
+msgctxt "IDC_CHECK_RELATIVETO"
+msgid "If the rendering target is left undefined, it will be inherited from the default style."
+msgstr "Jei vaizdavimo tikslas nenustatytas, tai jis bus paimtas iš numatytojo stiliaus."
+
+msgctxt "IDC_CHECK_NO_SUB_ANIM"
+msgid "Disallow subtitle animation. Enabling this option will lower CPU usage. You can use it if you experience flashing subtitles."
+msgstr "Išjungti subtitrų animaciją. Įjungus šį pasirinkimą sulėtinamas CPU darbas."
+
+msgctxt "IDC_SUBPIC_TO_BUFFER"
+msgid "Increasing the number of buffered subpictures should in general improve the rendering performance at the cost of a higher video RAM usage on the GPU."
+msgstr "Buferinių fragmentų kiekio vaizdavimas įprastai padidina renderinimo greitį dėl GPU vaizdo atminties didesnio naudojimo."
+
+msgctxt "IDC_BUTTON_EXT_SET"
+msgid "After clicking this button, the checked state of the format group will reflect the actual file association for MPC-HC. A newly added extension will usually make it grayed, so don't forget to check it again before closing this dialog!"
+msgstr "Spragtelėjus šį mygtuką, pasirinkta formatų grupės būsena vaizduos realius failų susiejumus su MPC-HC. Pridėti išplėtimai įprastai nustato būseną į „pilką“ būseną, todėl nepamirškite pažymėti juos vėl prieš uždarant dialogą!"
+
+msgctxt "IDC_CHECK_ALLOW_DROPPING_SUBPIC"
+msgid "Disabling this option will prevent the subtitles from blinking but it may cause the video renderer to skip some video frames."
+msgstr "IÅ¡jungus Å¡iÄ… funkcijÄ… bus iÅ¡vengta subtitrų mirgÄ—jimÄ…, taÄiau dÄ—l to gali bÅ«ti praleidžiami kai kurie vaizdo kadrai vaizduojant."
+
+msgctxt "ID_PLAY_PLAY"
+msgid "Play\nPlay"
+msgstr "Groti\nGroti"
+
+msgctxt "ID_PLAY_PAUSE"
+msgid "Pause\nPause"
+msgstr "PauzÄ—\nPauzÄ—"
+
+msgctxt "ID_PLAY_STOP"
+msgid "Stop\nStop"
+msgstr "Stop\nStop"
+
+msgctxt "ID_PLAY_FRAMESTEP"
+msgid "Step\nStep"
+msgstr "Žingsnis\nŽingsnis"
+
+msgctxt "ID_PLAY_DECRATE"
+msgid "Decrease speed\nDecrease speed"
+msgstr "SulÄ—tinti\nSulÄ—tinti"
+
+msgctxt "ID_PLAY_INCRATE"
+msgid "Increase speed\nIncrease speed"
+msgstr "Pagreitinti\nPagreitinti"
+
+msgctxt "ID_VOLUME_MUTE"
+msgid "Mute"
+msgstr "Nutildyti"
+
+msgctxt "ID_VOLUME_MUTE_OFF"
+msgid "Unmute"
+msgstr "Įjungti garsą"
+
+msgctxt "ID_VOLUME_MUTE_DISABLED"
+msgid "No audio"
+msgstr "Be garso"
+
+msgctxt "ID_NAVIGATE_SKIPBACK"
+msgid "Skip back\nSkip back"
+msgstr "Peršokti atgal"
+
+msgctxt "ID_NAVIGATE_SKIPFORWARD"
+msgid "Skip forward\nSkip forward"
+msgstr "Peršokti pirmyn"
+
+msgctxt "IDS_SUBRESYNC_ORIGINAL"
+msgid "&Original"
+msgstr "&Originalas"
+
+msgctxt "IDS_SUBRESYNC_CURRENT"
+msgid "&Current"
+msgstr "&Dabartinis"
+
+msgctxt "IDS_SUBRESYNC_EDIT"
+msgid "&Edit"
+msgstr "&Taisa"
+
+msgctxt "IDS_SUBRESYNC_YES"
+msgid "&Yes"
+msgstr "&Taip"
+
+msgctxt "IDS_SUBRESYNC_NO"
+msgid "&No"
+msgstr "&Ne"
+
+msgctxt "IDS_SUBRESYNC_DECREASE"
+msgid "&Decrease"
+msgstr "&Sumažinti"
+
+msgctxt "IDS_SUBRESYNC_INCREASE"
+msgid "&Increase"
+msgstr "&Padidinti"
+
+msgctxt "IDS_OPTIONS_CAPTION"
+msgid "Options"
+msgstr "Nustatymai"
+
+msgctxt "IDS_SHADERS_SELECT"
+msgid "&Select Shaders..."
+msgstr "Pa&sirinkite tamsinimus"
+
+msgctxt "IDS_SHADERS_DEBUG"
+msgid "&Debug Shaders..."
+msgstr "&Derinti tamsinimus"
+
+msgctxt "IDS_FAVORITES_ADD"
+msgid "&Add to Favorites..."
+msgstr "Pridėti į p&arankinius..."
+
+msgctxt "IDS_FAVORITES_ORGANIZE"
+msgid "&Organize Favorites..."
+msgstr "Tva&rkyti parankinius"
+
+msgctxt "IDS_PLAYLIST_SHUFFLE"
+msgid "Shuffle"
+msgstr "Maišyti"
+
+msgctxt "IDS_PLAYLIST_SHOWFOLDER"
+msgid "Open file location"
+msgstr "Atidaryti failo vietÄ…"
+
+msgctxt "IDS_CONTROLS_CLOSING"
+msgid "Closing..."
+msgstr "Uždaroma..."
+
+msgctxt "IDS_CONTROLS_PLAYING"
+msgid "Playing"
+msgstr "Grojama"
+
+msgctxt "IDS_CONTROLS_PAUSED"
+msgid "Paused"
+msgstr "PauzÄ—"
+
+msgctxt "IDS_AG_EDL_NEW_CLIP"
+msgid "EDL new clip"
+msgstr "Naujas EDL klipas"
+
+msgctxt "IDS_RECENT_FILES_CLEAR"
+msgid "&Clear list"
+msgstr "%Išvalyti sąrašą"
+
+msgctxt "IDS_RECENT_FILES_QUESTION"
+msgid "Are you sure that you want to delete recent files list?"
+msgstr "Ar jūs tikrai norite išvalyti nesenai atidarytų failų sąrašą?"
+
+msgctxt "IDS_AG_EDL_SAVE"
+msgid "EDL save"
+msgstr "EDL saugoti"
+
+msgctxt "IDS_AG_ENABLEFRAMETIMECORRECTION"
+msgid "Enable Frame Time Correction"
+msgstr "Įjungti kadro laiko koregavimą"
+
+msgctxt "IDS_AG_TOGGLE_EDITLISTEDITOR"
+msgid "Toggle EDL window"
+msgstr "Įj./Išj. EDL langą"
+
+msgctxt "IDS_AG_EDL_IN"
+msgid "EDL set In"
+msgstr "Nustatyti EDL į vidų"
+
+msgctxt "IDS_AG_EDL_OUT"
+msgid "EDL set Out"
+msgstr "Nustatyti EDL į išorę"
+
+msgctxt "IDS_AG_PNS_ROTATEX_M"
+msgid "PnS Rotate X-"
+msgstr "Pasukti kadrÄ… X-"
+
+msgctxt "IDS_AG_PNS_ROTATEY_P"
+msgid "PnS Rotate Y+"
+msgstr "Pasukti kadrÄ… Y+"
+
+msgctxt "IDS_AG_PNS_ROTATEY_M"
+msgid "PnS Rotate Y-"
+msgstr "Pasukti kadrÄ… Y-"
+
+msgctxt "IDS_AG_PNS_ROTATEZ_P"
+msgid "PnS Rotate Z+"
+msgstr "Pasukti kadrÄ… Z+"
+
+msgctxt "IDS_AG_PNS_ROTATEZ_M"
+msgid "PnS Rotate Z-"
+msgstr "Pasukti kadrÄ… Z-"
+
+msgctxt "IDS_AG_TEARING_TEST"
+msgid "Tearing Test"
+msgstr "DrebÄ—jimo testas"
+
+msgctxt "IDS_SCALE_16_9"
+msgid "Scale to 16:9 TV,%.3f,%.3f,%.3f,%.3f"
+msgstr "Nustatyti proporcijas 16:9 TV,%.3f,%.3f,%.3f,%.3f"
+
+msgctxt "IDS_SCALE_WIDESCREEN"
+msgid "Zoom To Widescreen,%.3f,%.3f,%.3f,%.3f"
+msgstr "Didinti Widescreen,%.3f,%.3f,%.3f,%.3f"
+
+msgctxt "IDS_SCALE_ULTRAWIDE"
+msgid "Zoom To Ultra-Widescreen,%.3f,%.3f,%.3f,%.3f"
+msgstr "Didinti Ultra-Widescreen,%.3f,%.3f,%.3f,%.3f"
+
+msgctxt "IDS_PLAYLIST_HIDEFS"
+msgid "Hide on Fullscreen"
+msgstr "Slėpti pilno ekrano režime"
+
+msgctxt "IDS_CONTROLS_STOPPED"
+msgid "Stopped"
+msgstr "Sustabdyta"
+
+msgctxt "IDS_CONTROLS_BUFFERING"
+msgid "Buffering... (%d%%)"
+msgstr "Kaupiama... (%d%%)"
+
+msgctxt "IDS_CONTROLS_CAPTURING"
+msgid "Capturing..."
+msgstr "Įrašoma..."
+
+msgctxt "IDS_CONTROLS_OPENING"
+msgid "Opening..."
+msgstr "Atveriama..."
+
+msgctxt "IDS_CONTROLS_CLOSED"
+msgid "Closed"
+msgstr "Užverta"
+
+msgctxt "IDS_SUBTITLES_OPTIONS"
+msgid "&Options..."
+msgstr "&Nustatymai..."
+
+msgctxt "IDS_SUBTITLES_STYLES"
+msgid "&Styles..."
+msgstr "&Stiliai..."
+
+msgctxt "IDS_SUBTITLES_RELOAD"
+msgid "&Reload"
+msgstr "&Įkelti iš naujo"
+
+msgctxt "IDS_SUBTITLES_ENABLE"
+msgid "&Enable"
+msgstr "Ä®&galinti"
+
+msgctxt "IDS_PANSCAN_EDIT"
+msgid "&Edit..."
+msgstr "R&edaguoti..."
+
+msgctxt "IDS_INFOBAR_TITLE"
+msgid "Title"
+msgstr "Pavadinimas"
+
+msgctxt "IDS_INFOBAR_AUTHOR"
+msgid "Author"
+msgstr "Autorius"
+
+msgctxt "IDS_INFOBAR_COPYRIGHT"
+msgid "Copyright"
+msgstr "AutorinÄ—s teisÄ—s"
+
+msgctxt "IDS_INFOBAR_RATING"
+msgid "Rating"
+msgstr "Įvertinimas"
+
+msgctxt "IDS_INFOBAR_DESCRIPTION"
+msgid "Description"
+msgstr "Aprašymas"
+
+msgctxt "IDS_INFOBAR_DOMAIN"
+msgid "Domain"
+msgstr "Domenas"
+
+msgctxt "IDS_AG_CLOSE"
+msgid "Close"
+msgstr "Užverti"
+
+msgctxt "IDS_AG_NONE"
+msgid "None"
+msgstr "Joks"
+
+msgctxt "IDS_AG_COMMAND"
+msgid "Command"
+msgstr "Komanda"
+
+msgctxt "IDS_AG_KEY"
+msgid "Key"
+msgstr "Spartusis klavišas"
+
+msgctxt "IDS_AG_MOUSE"
+msgid "Mouse Windowed"
+msgstr "Pelė lango režime"
+
+msgctxt "IDS_AG_MOUSE_FS"
+msgid "Mouse Fullscreen"
+msgstr "Pelė pilno ekrano režime"
+
+msgctxt "IDS_AG_APP_COMMAND"
+msgid "App Command"
+msgstr "Programos komanda"
+
+msgctxt "IDS_AG_MEDIAFILES"
+msgid "Media files (all types)"
+msgstr "Vaizdo failai (visi tipai)"
+
+msgctxt "IDS_AG_ALLFILES"
+msgid "All files (*.*)|*.*|"
+msgstr "Visi failai (*.*)|*.*"
+
+msgctxt "IDS_AG_AUDIOFILES"
+msgid "Audio files (all types)"
+msgstr "Garso failai (visi tipai)"
+
+msgctxt "IDS_AG_NOT_KNOWN"
+msgid "Not known"
+msgstr "Nežinomas"
+
+msgctxt "IDS_MPLAYERC_0"
+msgid "Quick Open File"
+msgstr "Atverti failÄ… greitai"
+
+msgctxt "IDS_AG_OPEN_FILE"
+msgid "Open File"
+msgstr "Atverti failÄ…"
+
+msgctxt "IDS_AG_OPEN_DVD"
+msgid "Open DVD/BD"
+msgstr "Atverti DVD/BD"
+
+msgctxt "IDS_MAINFRM_POST_SHADERS_FAILED"
+msgid "Failed to set post-resize shaders"
+msgstr "Nepavyko nustatyti post-resize tamsinimų"
+
+msgctxt "IDS_MAINFRM_BOTH_SHADERS_FAILED"
+msgid "Failed to set both pre-resize and post-resize shaders"
+msgstr "Nepavyko nustatyti pre-resize ir post-resize tamsinimų"
+
+msgctxt "IDS_DEBUGSHADERS_FIRSTRUN_MSG"
+msgid "Shaders are recompiled automatically when the corresponding files are modified."
+msgstr "Tamsinimai bus sukompiliuoti automatiškai pakeitus atitinkamus failus."
+
+msgctxt "IDS_SHADER_DLL_ERR_0"
+msgid "Cannot load %s, pixel shaders will not work."
+msgstr "Neįmanoma įkelti %s, pikseliniai tamsinimai neveiks."
+
+msgctxt "IDS_SHADER_DLL_ERR_1"
+msgid "Cannot find necessary function entry points in %s, pixel shaders will not work."
+msgstr "Nerasti %s būtinos funkcijos įėjimo taško, pikseliniai tamsinimai neveiks."
+
+msgctxt "IDS_OSD_SHADERS_PRESET"
+msgid "Shader preset: %s"
+msgstr "Tamsinimo priešnustatymas: %s"
+
+msgctxt "IDS_AG_SHADERS_PRESET_NEXT"
+msgid "Next Shader Preset"
+msgstr "Kitas tamsinimo priešnustatymas"
+
+msgctxt "IDS_AG_SHADERS_PRESET_PREV"
+msgid "Prev Shader Preset"
+msgstr "Ankstesnis tamsinimo priešnustatymas"
+
+msgctxt "IDS_STRING_COLON"
+msgid "%s:"
+msgstr "%s:"
+
+msgctxt "IDS_RECORD_START"
+msgid "Record"
+msgstr "Įrašas"
+
+msgctxt "IDS_RECORD_STOP"
+msgid "Stop"
+msgstr "Stop"
+
+msgctxt "IDS_BALANCE"
+msgid "L = R"
+msgstr "K = D"
+
+msgctxt "IDS_BALANCE_L"
+msgid "L +%d%%"
+msgstr "K +%d%%"
+
+msgctxt "IDS_BALANCE_R"
+msgid "R +%d%%"
+msgstr "D +%d%%"
+
+msgctxt "IDS_VOLUME"
+msgid "%d%%"
+msgstr "%d%%"
+
+msgctxt "IDS_BOOST"
+msgid "+%d%%"
+msgstr "+%d%%"
+
+msgctxt "IDS_PLAYLIST_ADDFOLDER"
+msgid "Add containing folder"
+msgstr "PridÄ—ti aplankÄ… su turiniu"
+
+msgctxt "IDS_HW_INDICATOR"
+msgid "[H/W]"
+msgstr "[H/W]"
+
+msgctxt "IDS_TOOLTIP_SOFTWARE_DECODING"
+msgid "Software Decoding"
+msgstr "Programinis iškodavimas"
+
+msgctxt "IDS_STATSBAR_PLAYBACK_RATE"
+msgid "Playback rate"
+msgstr "Grojimo greitis"
+
+msgctxt "IDS_FILTERS_COPY_TO_CLIPBOARD"
+msgid "&Copy filters list to clipboard"
+msgstr "&Kopijuoti filtrų sąrašą į buferį"
+
+msgctxt "IDS_CREDENTIALS_SERVER"
+msgid "Enter server credentials"
+msgstr "Įveskite serverio kredencialus."
+
+msgctxt "IDS_CREDENTIALS_CONNECT"
+msgid "Enter your credentials to connect"
+msgstr "Įveskite savo kredencialus prisijungimui"
+
+msgctxt "IDS_SUB_SAVE_EXTERNAL_STYLE_FILE"
+msgid "Save custom style"
+msgstr "Išsaugoti vartotojo stilių"
+
+msgctxt "IDS_CONTENT_EDUCATION_SCIENCE"
+msgid "Education/Science/Factual topics"
+msgstr "Å vietimas/Mokslas/Faktai"
+
+msgctxt "IDS_PPAGEADVANCED_HIDE_WINDOWED"
+msgid "Hides controls and panels also in windowed mode."
+msgstr "SlÄ—pti valdymo ir juostos elementus taip pat ir lango veiksenoje."
+
+msgctxt "IDS_PPAGEADVANCED_BLOCK_VSFILTER"
+msgid "Prevent external subtitle renderer to be loaded when internal is in use."
+msgstr "Išvengti išorinio subtitrų renderio naudojimo, kai naudojamas vidinis."
+
+msgctxt "IDS_PPAGEADVANCED_COL_NAME"
+msgid "Name"
+msgstr "Pavadinimas"
+
+msgctxt "IDS_PPAGEADVANCED_COL_VALUE"
+msgid "Value"
+msgstr "Reikšmė"
+
+msgctxt "IDS_PPAGEADVANCED_RECENT_FILES_NUMBER"
+msgid "Maximum number of files shown in the \"Recent files\" menu and for which the position is potentially saved."
+msgstr "Maksimalus rodomų meniu „Peržiūrėta“ failų kiekis ir kokioje pozicijoje išsaugota."
+
+msgctxt "IDS_PPAGEADVANCED_FILE_POS_LONGER"
+msgid "Remember file position only for files longer than N minutes."
+msgstr "Atsiminti failų padėtį tik kūriniams ilgesniems nei N minutės."
+
+msgctxt "IDS_PPAGEADVANCED_FILE_POS_AUDIO"
+msgid "Remember file position also for audio files."
+msgstr "Įsiminti failų padėtį ir garso failams."
+
+msgctxt "IDS_AFTER_PLAYBACK_DO_NOTHING"
+msgid "Do Nothing"
+msgstr "Nieko nedaryti"
+
+msgctxt "IDS_AFTER_PLAYBACK_PLAY_NEXT"
+msgid "Play next file in the folder"
+msgstr "Groti kitÄ… aplanko failÄ…"
+
+msgctxt "IDS_AFTER_PLAYBACK_REWIND"
+msgid "Rewind current file"
+msgstr "Persukti einamąjį failą"
+
+msgctxt "IDS_AFTER_PLAYBACK_CLOSE"
+msgid "Close"
+msgstr "Užverti"
+
+msgctxt "IDS_AFTER_PLAYBACK_EXIT"
+msgid "Exit"
+msgstr "IÅ¡eiti"
+
+msgctxt "IDS_AFTER_PLAYBACK_MONITOROFF"
+msgid "Turn off the monitor"
+msgstr "Išjungti monitorių"
+
+msgctxt "IDS_IMAGE_JPEG_QUALITY"
+msgid "JPEG Image"
+msgstr "JPEG paveikslÄ—lis"
+
+msgctxt "IDS_IMAGE_QUALITY"
+msgid "Quality (%):"
+msgstr "KokybÄ— (%):"
+
+msgctxt "IDS_PPAGEADVANCED_COVER_SIZE_LIMIT"
+msgid "Maximum size (NxNpx) of a cover-art loaded in the audio only mode."
+msgstr "Maksimalų viršelio dydį (NxNpx) įkelti tik garso režime."
+
+msgctxt "IDS_SUBTITLE_DELAY_STEP_TOOLTIP"
+msgid "The subtitle delay will be decreased/increased by this value each time the corresponding hotkeys are used (%s/%s)."
+msgstr "Subtitrų delsa mažės/didės su šia reikšme kas kart spragtelint karštuosius klavišus (%s/%s)."
+
+msgctxt "IDS_HOTKEY_NOT_DEFINED"
+msgid "<not defined>"
+msgstr "<neapibrėžta>"
+
+msgctxt "IDS_NAVIGATION_WATCH"
+msgid "Watch"
+msgstr "Žiūrėti"
+
+msgctxt "IDS_NAVIGATION_MOVE_UP"
+msgid "Move Up"
+msgstr "Kelti Aukštyn"
+
+msgctxt "IDS_NAVIGATION_MOVE_DOWN"
+msgid "Move Down"
+msgstr "Kelti Žemyn"
+
+msgctxt "IDS_NAVIGATION_SORT"
+msgid "Sort by LCN"
+msgstr "Rikuoti pagal LCN"
+
+msgctxt "IDS_NAVIGATION_REMOVE_ALL"
+msgid "Remove all"
+msgstr "Pašalinti viską"
+
+msgctxt "IDS_REMOVE_CHANNELS_QUESTION"
+msgid "Are you sure you want to remove all channels from the list?"
+msgstr "Ar jūs tikrai norite pašalinti visus kanalus iš sąrašo?"
+
+msgctxt "IDS_MEDIAINFO_NO_INFO_AVAILABLE"
+msgid "No information available"
+msgstr "NÄ—ra informacijos"
+
+msgctxt "IDS_MEDIAINFO_ANALYSIS_IN_PROGRESS"
+msgid "Please wait, analysis in progress..."
+msgstr "Prašome palaukti, vykdoma analizė"
+
+msgctxt "IDS_ASPECT_RATIO_FMT"
+msgid "AR %d:%d"
+msgstr "Kraštinių santykis %d:%d"
+
+msgctxt "IDS_PPAGEADVANCED_LOGGER"
+msgid "Enables logging to file (requires restart)"
+msgstr "Įjungti žurnalo įrašą į failą (reikalingas paleidimas iš naujo)"
+
+msgctxt "IDS_TIMER_REMAINING_TIME"
+msgid "Remaining time"
+msgstr "Liko laiko"
+
+msgctxt "IDS_TIMER_HIGH_PRECISION"
+msgid "High precision"
+msgstr "Didelis tikslumas"
+
+msgctxt "IDS_AFTERPLAYBACK_REWIND"
+msgid "After Playback: Rewind current file"
+msgstr "Baigus groti: persukti einamÄ… failÄ…"
+
+msgctxt "IDS_AFTERPLAYBACK_CLOSE"
+msgid "After Playback: Close"
+msgstr "Baigus groti: Uždaryti"
+
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "Inicializacijos metu MPC-HC susidūrė su problema. Su jūsų pagalba mes galime ištaisyti problemą.\n\nAr jūs norite pranešti apie ją?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Įveskite teigiamą reikšmę, jei garsas per anksti, neigiamą reikšmę, jei per vėlai."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Išankstinė peržiūra šiuo metu išjungta. Jūs galite ją įjungti MPC-HC nustatymuose."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Å i funkcija gali bÅ«ti naudojama multimedijos failų peržiÅ«rai ir nuotolinÄ—s vietos. Naudokite jÄ… tik saugiame privaÄiame tinkle. \n\nAr jÅ«s tikrai norite įjungti Å¡iÄ… funkcijÄ…?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Vidinis subtitrų renderis"
+
+msgctxt "IDS_AG_OPEN_DEVICE"
+msgid "Open Device"
+msgstr "Atverti įrenginį"
+
+msgctxt "IDS_AG_SAVE_AS"
+msgid "Save As"
+msgstr "IÅ¡saugoti kaip"
+
+msgctxt "IDS_AG_SAVE_IMAGE"
+msgid "Save Image"
+msgstr "IÅ¡saugoti nuotraukÄ…"
+
+msgctxt "IDS_MPLAYERC_6"
+msgid "Save Image (auto)"
+msgstr "Išsaugoti nuotrauką (automatiškai)"
+
+msgctxt "IDS_OSD_IMAGE_SAVED"
+msgid "Image saved successfully"
+msgstr "Nuotrauka sėkmingai išsaugota"
+
+msgctxt "IDS_AG_LOAD_SUBTITLE"
+msgid "Load Subtitle"
+msgstr "Įkelti subtitrus"
+
+msgctxt "IDS_AG_SAVE_SUBTITLE"
+msgid "Save Subtitle"
+msgstr "IÅ¡saugoti subtitrus"
+
+msgctxt "IDS_AG_PROPERTIES"
+msgid "Properties"
+msgstr "YpatybÄ—s"
+
+msgctxt "IDS_AG_EXIT"
+msgid "Exit"
+msgstr "IÅ¡eiti"
+
+msgctxt "IDS_AG_PLAYPAUSE"
+msgid "Play/Pause"
+msgstr "Groti/PauzÄ—"
+
+msgctxt "IDS_AG_PLAY"
+msgid "Play"
+msgstr "Groti"
+
+msgctxt "IDS_AG_STOP"
+msgid "Stop"
+msgstr "Sustabdyti"
+
+msgctxt "IDS_AG_FRAMESTEP"
+msgid "Frame-step"
+msgstr "Žingsnis pirmyn"
+
+msgctxt "IDS_MPLAYERC_16"
+msgid "Frame-step back"
+msgstr "Žingsnis atgal"
+
+msgctxt "IDS_AG_GO_TO"
+msgid "Go To"
+msgstr "Eiti į"
+
+msgctxt "IDS_AG_INCREASE_RATE"
+msgid "Increase Rate"
+msgstr "Pagreitinti"
+
+msgctxt "IDS_CONTENT_SHOW_GAMESHOW"
+msgid "Show/Game show"
+msgstr "Laidos/Žaidimai"
+
+msgctxt "IDS_CONTENT_SPORTS"
+msgid "Sports"
+msgstr "Sportas"
+
+msgctxt "IDS_CONTENT_CHILDREN_YOUTH_PROG"
+msgid "Children's/Youth programmes"
+msgstr "Vaikams/Jaunimui"
+
+msgctxt "IDS_CONTENT_MUSIC_BALLET_DANCE"
+msgid "Music/Ballet/Dance"
+msgstr "Muzika/Baletas/Å okiai"
+
+msgctxt "IDS_CONTENT_MUSIC_ART_CULTURE"
+msgid "Arts/Culture"
+msgstr "Menas/Kultūra"
+
+msgctxt "IDS_CONTENT_SOCIAL_POLITICAL_ECO"
+msgid "Social/Political issues/Economics"
+msgstr "Politika/Ekonomika/VisuomeninÄ—s laidos"
+
+msgctxt "IDS_CONTENT_LEISURE"
+msgid "Leisure hobbies"
+msgstr "Laisvalaikio pomÄ—giai"
+
+msgctxt "IDS_FILE_RECYCLE"
+msgid "Move to Recycle Bin"
+msgstr "Perkelti į šiukšlinę"
+
+msgctxt "IDS_AG_SAVE_COPY"
+msgid "Save a Copy"
+msgstr "IÅ¡saugoti kopijÄ…"
+
+msgctxt "IDS_FASTSEEK_LATEST"
+msgid "Latest keyframe"
+msgstr "Paskutinis raktinis kadras"
+
+msgctxt "IDS_FASTSEEK_NEAREST"
+msgid "Nearest keyframe"
+msgstr "Artimiausias raktinis kadras"
+
+msgctxt "IDS_HOOKS_FAILED"
+msgid "MPC-HC encountered a problem during initialization. DVD playback may not work correctly. This might be caused by some incompatibilities with certain security tools.\n\nDo you want to report this issue?"
+msgstr "Inicializiacijos metu MPC-HC susidūrė su problema. DVD negali teisingai veikti. Tai gali sukelti saugumo įrankių nesuderinamumas.\n\nAr jūs norite pranešti apie šią problemą?"
+
+msgctxt "IDS_PPAGEFULLSCREEN_SHOWNEVER"
+msgid "Never show"
+msgstr "Niekada nerodyti"
+
+msgctxt "IDS_PPAGEFULLSCREEN_SHOWMOVED"
+msgid "Show when moving the cursor, hide after:"
+msgstr "Rodyti, kai judinamas žymeklis, slėpti po:"
+
+msgctxt "IDS_PPAGEFULLSCREEN_SHOHHOVERED"
+msgid "Show when hovering control, hide after:"
+msgstr "Rodyti užvedus pelės rodyklę ant elemento, slėpti po:"
+
+msgctxt "IDS_MAINFRM_PRE_SHADERS_FAILED"
+msgid "Failed to set pre-resize shaders"
+msgstr "Nepavyko nustatyti pre-resize tamsinimų"
+
+msgctxt "IDS_OSD_RS_FT_CORRECTION_ON"
+msgid "Frame Time Correction: On"
+msgstr "Kadrų laiko taisa: Įj."
+
+msgctxt "IDS_OSD_RS_FT_CORRECTION_OFF"
+msgid "Frame Time Correction: Off"
+msgstr "Kadrų laiko taisa: Išj."
+
+msgctxt "IDS_OSD_RS_TARGET_VSYNC_OFFSET"
+msgid "Target VSync Offset: %.1f"
+msgstr "Tikslinis sinchronizacijos poslinkis: %.1f"
+
+msgctxt "IDS_OSD_RS_VSYNC_OFFSET"
+msgid "VSync Offset: %d"
+msgstr "VSync Poslinkis: %d"
+
+msgctxt "IDS_OSD_SPEED"
+msgid "Speed: %.2lfx"
+msgstr "Greitis: %.2lfx"
+
+msgctxt "IDS_OSD_THUMBS_SAVED"
+msgid "Thumbnails saved successfully"
+msgstr "Miniatiūros sėkmingai išsaugotos"
+
+msgctxt "IDS_MENU_VIDEO_STREAM"
+msgid "&Video Track"
+msgstr "&Vaizdo takelis"
+
+msgctxt "IDS_MENU_VIDEO_ANGLE"
+msgid "Video Ang&le"
+msgstr "Vaizdo &kampas"
+
+msgctxt "IDS_RESET_SETTINGS"
+msgid "Reset settings"
+msgstr "Atstatyti nustatymus"
+
+msgctxt "IDS_RESET_SETTINGS_WARNING"
+msgid "Are you sure you want to restore MPC-HC to its default settings?\nBe warned that ALL your current settings will be lost!"
+msgstr "Ar esate tikri, kad norite grąžinti MPC-HC numatytuosius nustatymus?\nĮspėjame, kad VISI jūsų dabartiniai nustatymai bus prarasti!"
+
+msgctxt "IDS_RESET_SETTINGS_MUTEX"
+msgid "Please close all instances of MPC-HC so that the default settings can be restored."
+msgstr "Prašom uždarykite visas MPC-HC kopijas pakeitimams įsigalioti."
+
+msgctxt "IDS_EXPORT_SETTINGS"
+msgid "Export settings"
+msgstr "Eksportuoti nustatymus"
+
+msgctxt "IDS_EXPORT_SETTINGS_WARNING"
+msgid "Some changes have not been saved yet.\nDo you want to save them before exporting?"
+msgstr "Kai kurie pakeitimai dar neišsaugoti.\nAr jūs norite išsaugoti juos prieš eksportuodami?"
+
+msgctxt "IDS_EXPORT_SETTINGS_SUCCESS"
+msgid "The settings have been successfully exported."
+msgstr "Nustatymai sÄ—kmingai eksportuoti."
+
+msgctxt "IDS_EXPORT_SETTINGS_FAILED"
+msgid "The export failed! This can happen when you don't have the correct rights."
+msgstr "Eksportavimas nepavyko! Tai galėjo nutikti, jog jūs neturite reikiamų teisių."
+
+msgctxt "IDS_BDA_ERROR"
+msgid "BDA Error"
+msgstr "BDA klaida"
+
+msgctxt "IDS_AG_DECREASE_RATE"
+msgid "Decrease Rate"
+msgstr "SulÄ—tinti"
+
+msgctxt "IDS_AG_RESET_RATE"
+msgid "Reset Rate"
+msgstr "Atkurti greitį"
+
+msgctxt "IDS_MPLAYERC_21"
+msgid "Audio Delay +10 ms"
+msgstr "Garso delsa +10 ms"
+
+msgctxt "IDS_MPLAYERC_22"
+msgid "Audio Delay -10 ms"
+msgstr "Garso delsa -10 ms"
+
+msgctxt "IDS_MPLAYERC_23"
+msgid "Jump Forward (small)"
+msgstr "Šuolis pirmyn (mažas)"
+
+msgctxt "IDS_MPLAYERC_24"
+msgid "Jump Backward (small)"
+msgstr "Šuolis atgal (mažas)"
+
+msgctxt "IDS_MPLAYERC_25"
+msgid "Jump Forward (medium)"
+msgstr "Å uolis pirmyn (vidutinis)"
+
+msgctxt "IDS_MPLAYERC_26"
+msgid "Jump Backward (medium)"
+msgstr "Å uolis atgal (vidutinis)"
+
+msgctxt "IDS_MPLAYERC_27"
+msgid "Jump Forward (large)"
+msgstr "Å uolis pirmyn (didelis)"
+
+msgctxt "IDS_MPLAYERC_28"
+msgid "Jump Backward (large)"
+msgstr "Å uolis atgal (didelis)"
+
+msgctxt "IDS_MPLAYERC_29"
+msgid "Jump Forward (keyframe)"
+msgstr "Å uolis pirmyn (pagrindinis kadras)"
+
+msgctxt "IDS_MPLAYERC_30"
+msgid "Jump Backward (keyframe)"
+msgstr "Å uolis atgal (pagrindinis kadras)"
+
+msgctxt "IDS_AG_NEXT"
+msgid "Next"
+msgstr "Kitas"
+
+msgctxt "IDS_AG_PREVIOUS"
+msgid "Previous"
+msgstr "Ankstesnis"
+
+msgctxt "IDS_AG_NEXT_FILE"
+msgid "Next File"
+msgstr "Kitas failas"
+
+msgctxt "IDS_AG_PREVIOUS_FILE"
+msgid "Previous File"
+msgstr "Ankstesnis failas"
+
+msgctxt "IDS_MPLAYERC_99"
+msgid "Toggle Direct3D fullscreen"
+msgstr "Perjungti Direct3D pilno ekrano veiksena"
+
+msgctxt "IDS_MPLAYERC_100"
+msgid "Goto Prev Subtitle"
+msgstr "Ankstesni subtitrai"
+
+msgctxt "IDS_MPLAYERC_101"
+msgid "Goto Next Subtitle"
+msgstr "Kiti subtitrai"
+
+msgctxt "IDS_MPLAYERC_102"
+msgid "Shift Subtitle Left"
+msgstr "Paslinkti subtitrus kairÄ—n"
+
+msgctxt "IDS_MPLAYERC_103"
+msgid "Shift Subtitle Right"
+msgstr "Paslinkti subtitrus dešinėn"
+
+msgctxt "IDS_AG_SEEKSET"
+msgid "Jump to Beginning"
+msgstr "Groti nuo pradžių"
+
+msgctxt "IDS_OSD_SHOW_FILENAME"
+msgid "OSD: Show File Name"
+msgstr "OSD: Rodyti failo vardÄ…"
+
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Groti DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Groti BD"
+
+msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
+msgid "OSD: Display Renderer Statistics"
+msgstr "OSD: Rodyti renderio statistikÄ…"
+
+msgctxt "IDS_OSD_RESET_RENDERER_STATS"
+msgid "OSD: Reset Renderer Statistics"
+msgstr "OSD: Atstatyti renderio statistikÄ…"
+
+msgctxt "IDD_PPAGESUBMISC"
+msgid "Subtitles::Misc"
+msgstr "Subtitrai::Įvairūs"
+
+msgctxt "IDS_VIEW_BORDERLESS"
+msgid "Hide &borders"
+msgstr "Slėpti &kraštines"
+
+msgctxt "IDS_VIEW_FRAMEONLY"
+msgid "Fra&me Only"
+msgstr "Tik vaizdo ka&dras"
+
+msgctxt "IDS_VIEW_CAPTIONMENU"
+msgid "Sho&w Caption&&Menu"
+msgstr "Rodyti antraštę ir meniu"
+
+msgctxt "IDS_VIEW_HIDEMENU"
+msgid "Hide &Menu"
+msgstr "SlÄ—pti &Meniu"
+
+msgctxt "IDD_PPAGEADVANCED"
+msgid "Advanced"
+msgstr "Papildomai"
+
+msgctxt "IDS_AG_VIEW_MINIMAL"
+msgid "View Minimal"
+msgstr "Vaizdas minimalus"
+
+msgctxt "IDS_AG_VIEW_COMPACT"
+msgid "View Compact"
+msgstr "Vaizdas kompaktiškas"
+
+msgctxt "IDS_AG_VIEW_NORMAL"
+msgid "View Normal"
+msgstr "Vaizdas normalus"
+
+msgctxt "IDS_AG_FULLSCREEN"
+msgid "Fullscreen"
+msgstr "PilnaekranÄ— veiksena"
+
+msgctxt "IDS_MPLAYERC_39"
+msgid "Fullscreen (w/o res.change)"
+msgstr "Viso ekrano režimas (be skir. gebos pakeitimo)"
+
+msgctxt "IDS_AG_ZOOM_AUTO_FIT"
+msgid "Zoom Auto Fit"
+msgstr "Mastelio savaiminis prisitaikymas"
+
+msgctxt "IDS_AG_VIDFRM_HALF"
+msgid "VidFrm Half"
+msgstr "PusÄ— vaizdo kardo"
+
+msgctxt "IDS_AG_VIDFRM_NORMAL"
+msgid "VidFrm Normal"
+msgstr "Normalus vaizdo kadras"
+
+msgctxt "IDS_AG_VIDFRM_DOUBLE"
+msgid "VidFrm Double"
+msgstr "Dvigubas vaizdo kadras"
+
+msgctxt "IDS_AG_ALWAYS_ON_TOP"
+msgid "Always On Top"
+msgstr "Visada viršuje"
+
+msgctxt "IDS_AG_PNS_INC_SIZE"
+msgid "PnS Inc Size"
+msgstr "Padidinti kadro dydį"
+
+msgctxt "IDS_AG_PNS_INC_WIDTH"
+msgid "PnS Inc Width"
+msgstr "Padidinti kadro plotį"
+
+msgctxt "IDS_MPLAYERC_47"
+msgid "PnS Inc Height"
+msgstr "Padidinti kadro aukštį"
+
+msgctxt "IDS_AG_PNS_DEC_SIZE"
+msgid "PnS Dec Size"
+msgstr "Sumažinti kadro dydį"
+
+msgctxt "IDS_AG_PNS_DEC_WIDTH"
+msgid "PnS Dec Width"
+msgstr "Sumažinti kadro plotį"
+
+msgctxt "IDS_MPLAYERC_50"
+msgid "PnS Dec Height"
+msgstr "Sumažinti kadro aukštį"
+
+msgctxt "IDS_SUBDL_DLG_DOWNLOADING"
+msgid "Downloading subtitle(s), please wait."
+msgstr "Subtitras(-ai) atsiunÄiami, praÅ¡ome palaukti."
+
+msgctxt "IDS_SUBDL_DLG_PARSING"
+msgid "Parsing list..."
+msgstr "Sąrašas nagrinėjamas..."
+
+msgctxt "IDS_SUBDL_DLG_NOT_FOUND"
+msgid "No subtitles found."
+msgstr "Subtitrai nerasti."
+
+msgctxt "IDS_SUBDL_DLG_SUBS_AVAIL"
+msgid "%d subtitle(s) available."
+msgstr "%d galimi(ų) subtitrai(ų)."
+
+msgctxt "IDS_UPDATE_CONFIG_AUTO_CHECK"
+msgid "Do you want to check periodically for MPC-HC updates?\n\nThis feature can be disabled later from the Miscellaneous options page."
+msgstr "Ar norite įgalinti periodišką MPC-HC atnaujinimų ieškojimą?\n\nŠią savybę vėliau galima išjungti nustatymų puslapyje „Įvairūs“."
+
+msgctxt "IDS_ZOOM_50"
+msgid "50%"
+msgstr "50%"
+
+msgctxt "IDS_ZOOM_100"
+msgid "100%"
+msgstr "100%"
+
+msgctxt "IDS_ZOOM_200"
+msgid "200%"
+msgstr "200%"
+
+msgctxt "IDS_ZOOM_AUTOFIT"
+msgid "Auto Fit"
+msgstr "Savaiminis prisitaikymas"
+
+msgctxt "IDS_ZOOM_AUTOFIT_LARGER"
+msgid "Auto Fit (Larger Only)"
+msgstr "Savaiminis prisitaikymas (tik didesniam)"
+
+msgctxt "IDS_AG_ZOOM_AUTO_FIT_LARGER"
+msgid "Zoom Auto Fit (Larger Only)"
+msgstr "Mastelio savaiminis prisitaikymas (tik didesniam)"
+
+msgctxt "IDS_OSD_ZOOM_AUTO_LARGER"
+msgid "Zoom: Auto (Larger Only)"
+msgstr "Mastelis: Savaiminis (tik didesniam)"
+
+msgctxt "IDS_TOOLTIP_EXPLORE_TO_FILE"
+msgid "Double click to open file location"
+msgstr "Dvigubas spragtelÄ—jimas failo vietos atvÄ—rimui"
+
+msgctxt "IDS_TOOLTIP_REMAINING_TIME"
+msgid "Toggle between elapsed and remaining time"
+msgstr "Perjungti tarp praÄ—jusio ir likusio laiko"
+
+msgctxt "IDS_UPDATE_DELAY_ERROR_TITLE"
+msgid "Invalid delay"
+msgstr "Klaidinga delsa"
+
+msgctxt "IDS_UPDATE_DELAY_ERROR_MSG"
+msgid "Please enter a number between 1 and 365."
+msgstr "PraÅ¡ome įvesti skaiÄių tarp 1 ir 365."
+
+msgctxt "IDS_AG_PNS_CENTER"
+msgid "PnS Center"
+msgstr "Kadras centre"
+
+msgctxt "IDS_AG_PNS_LEFT"
+msgid "PnS Left"
+msgstr "Kadras kairÄ—n"
+
+msgctxt "IDS_AG_PNS_RIGHT"
+msgid "PnS Right"
+msgstr "Kadras dešinėn"
+
+msgctxt "IDS_AG_PNS_UP"
+msgid "PnS Up"
+msgstr "Kadras viršun"
+
+msgctxt "IDS_AG_PNS_DOWN"
+msgid "PnS Down"
+msgstr "Kadras apaÄion"
+
+msgctxt "IDS_AG_PNS_UPLEFT"
+msgid "PnS Up/Left"
+msgstr "Kadras viršun/kairėn"
+
+msgctxt "IDS_AG_PNS_UPRIGHT"
+msgid "PnS Up/Right"
+msgstr "Kadras viršun/dešinėn"
+
+msgctxt "IDS_AG_PNS_DOWNLEFT"
+msgid "PnS Down/Left"
+msgstr "Kadras apaÄion/kairÄ—n"
+
+msgctxt "IDS_MPLAYERC_59"
+msgid "PnS Down/Right"
+msgstr "Kadras apaÄion/deÅ¡inÄ—n"
+
+msgctxt "IDS_AG_VOLUME_UP"
+msgid "Volume Up"
+msgstr "Pagarsinti"
+
+msgctxt "IDS_AG_VOLUME_DOWN"
+msgid "Volume Down"
+msgstr "Patylinti"
+
+msgctxt "IDS_AG_VOLUME_MUTE"
+msgid "Volume Mute"
+msgstr "Nutildyti"
+
+msgctxt "IDS_MPLAYERC_63"
+msgid "DVD Title Menu"
+msgstr "DVD pagrindinis meniu"
+
+msgctxt "IDS_AG_DVD_ROOT_MENU"
+msgid "DVD Root Menu"
+msgstr "DVD antrinis meniu"
+
+msgctxt "IDS_MPLAYERC_65"
+msgid "DVD Subtitle Menu"
+msgstr "DVD subtitrų meniu"
+
+msgctxt "IDS_MPLAYERC_66"
+msgid "DVD Audio Menu"
+msgstr "DVD garso meniu"
+
+msgctxt "IDS_MPLAYERC_67"
+msgid "DVD Angle Menu"
+msgstr "DVD kampo meniu"
+
+msgctxt "IDS_MPLAYERC_68"
+msgid "DVD Chapter Menu"
+msgstr "DVD skyrių meniu"
+
+msgctxt "IDS_AG_DVD_MENU_LEFT"
+msgid "DVD Menu Left"
+msgstr "DVD meniu kairÄ—n"
+
+msgctxt "IDS_MPLAYERC_70"
+msgid "DVD Menu Right"
+msgstr "DVD meniu dešinėn"
+
+msgctxt "IDS_AG_DVD_MENU_UP"
+msgid "DVD Menu Up"
+msgstr "DVD meniu aukštyn"
+
+msgctxt "IDS_AG_DVD_MENU_DOWN"
+msgid "DVD Menu Down"
+msgstr "DVD meniu žemyn"
+
+msgctxt "IDS_MPLAYERC_73"
+msgid "DVD Menu Activate"
+msgstr "DVD meniu aktyvuoti"
+
+msgctxt "IDS_AG_DVD_MENU_BACK"
+msgid "DVD Menu Back"
+msgstr "DVD meniu atgal"
+
+msgctxt "IDS_MPLAYERC_75"
+msgid "DVD Menu Leave"
+msgstr "DVD meniu išeiti"
+
+msgctxt "IDS_AG_BOSS_KEY"
+msgid "Boss key"
+msgstr "Pagrindinis klavišas"
+
+msgctxt "IDS_MPLAYERC_77"
+msgid "Player Menu"
+msgstr "Grotuvo meniu"
+
+msgctxt "IDS_MPLAYERC_78"
+msgid "Player Menu (full)"
+msgstr "Grotuvo meniu (pilnas)"
+
+msgctxt "IDS_AG_FILTERS_MENU"
+msgid "Filters Menu"
+msgstr "Filtrų meniu"
+
+msgctxt "IDS_AG_OPTIONS"
+msgid "Options"
+msgstr "Nustatymai"
+
+msgctxt "IDS_AG_NEXT_AUDIO"
+msgid "Next Audio Track"
+msgstr "Sekantis garso takelis"
+
+msgctxt "IDS_AG_PREV_AUDIO"
+msgid "Prev Audio Track"
+msgstr "Ankstesnis garso takelis"
+
+msgctxt "IDS_AG_NEXT_SUBTITLE"
+msgid "Next Subtitle Track"
+msgstr "Sekantys subtitrai"
+
+msgctxt "IDS_AG_PREV_SUBTITLE"
+msgid "Prev Subtitle Track"
+msgstr "Ankstesni subtitrai"
+
+msgctxt "IDS_MPLAYERC_85"
+msgid "On/Off Subtitle"
+msgstr "Įj./išj. subtitrus"
+
+msgctxt "IDS_MPLAYERC_86"
+msgid "Reload Subtitles"
+msgstr "Perkrauti subtitrus"
+
+msgctxt "IDS_MPLAYERC_91"
+msgid "Next Angle (DVD)"
+msgstr "Kitas kampas (DVD)"
+
+msgctxt "IDS_MPLAYERC_92"
+msgid "Prev Angle (DVD)"
+msgstr "Ankstesnis kampas (DVD)"
+
+msgctxt "IDS_MPLAYERC_93"
+msgid "Next Audio Track (DVD)"
+msgstr "Sekantis garso takelis (DVD)"
+
+msgctxt "IDS_MPLAYERC_94"
+msgid "Prev Audio Track (DVD)"
+msgstr "Ankstesnis garso takelis (DVD)"
+
+msgctxt "IDS_MPLAYERC_95"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Sekantys subtitrai (DVD)"
+
+msgctxt "IDS_MPLAYERC_96"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "Ankstesni subtitrai (DVD)"
+
+msgctxt "IDS_MPLAYERC_97"
+msgid "On/Off Subtitle (DVD)"
+msgstr "Įj./išj. subtitrus (DVD)"
+
+msgctxt "IDS_OSD_DISPLAY_CURRENT_TIME"
+msgid "OSD: Display Current Time"
+msgstr "OSD: Dabartinio laiko rodymas"
+
+msgctxt "IDS_PPAGEWEBSERVER_0"
+msgid "Select the directory"
+msgstr "Pasirinkti vietÄ…"
+
+msgctxt "IDS_FAVORITES_QUICKADDFAVORITE"
+msgid "Quick add favorite"
+msgstr "Greitai pridėti prie mėgstamiausių"
+
+msgctxt "IDS_DVB_CHANNEL_NUMBER"
+msgid "N"
+msgstr "N"
+
+msgctxt "IDS_DVB_CHANNEL_NAME"
+msgid "Name"
+msgstr "Pavadinimas"
+
+msgctxt "IDS_DVB_CHANNEL_FREQUENCY"
+msgid "Frequency"
+msgstr "Dažnis"
+
+msgctxt "IDS_DVB_CHANNEL_ENCRYPTION"
+msgid "Encrypted"
+msgstr "Užšifruota"
+
+msgctxt "IDS_DVB_CHANNEL_ENCRYPTED"
+msgid "Yes"
+msgstr "Taip"
+
+msgctxt "IDS_DVB_CHANNEL_NOT_ENCRYPTED"
+msgid "No"
+msgstr "Ne"
+
+msgctxt "IDS_DVB_CHANNEL_START_SCAN"
+msgid "Start"
+msgstr "PradÄ—ti"
+
+msgctxt "IDS_DVB_CHANNEL_STOP_SCAN"
+msgid "Stop"
+msgstr "Stabdyti"
+
+msgctxt "IDS_DVB_TVNAV_SEERADIO"
+msgid "Radio stations"
+msgstr "Radijo stotys"
+
+msgctxt "IDS_DVB_TVNAV_SEETV"
+msgid "TV stations"
+msgstr "TV stotys"
+
+msgctxt "IDS_DVB_CHANNEL_FORMAT"
+msgid "Format"
+msgstr "Formatas"
+
+msgctxt "IDS_MAINFRM_2"
+msgid "Focus lost to: %s - %s"
+msgstr "Židinys perėjo į: %s - %s"
+
+msgctxt "IDS_AG_SUBTITLES_SAVED"
+msgid "Subtitles saved"
+msgstr "Subtitrai išsaugoti"
+
+msgctxt "IDS_MAINFRM_4"
+msgid "Cannot save subtitles"
+msgstr "Neįmanoma išsaugoti subtitrų"
+
+msgctxt "IDS_AG_FRAMERATE"
+msgid "Frame rate"
+msgstr "Kadrų dažnis"
+
+msgctxt "IDS_MAINFRM_6"
+msgid "drawn: %d, dropped: %d"
+msgstr "įrašyta: %d, pamesta: %d"
+
+msgctxt "IDS_AG_FRAMES"
+msgid "Frames"
+msgstr "Kadrai"
+
+msgctxt "IDS_AG_BUFFERS"
+msgid "Buffers"
+msgstr "Buferiai"
+
+msgctxt "IDS_MAINFRM_9"
+msgid "Volume: %02lu/%02lu, Title: %02lu/%02lu, Chapter: %02lu/%02lu"
+msgstr "Skirsnis: %02lu/%02lu, Pavadinimas: %02lu/%02lu, Skyrius: %02lu/%02lu"
+
+msgctxt "IDS_MAINFRM_10"
+msgid "Angle: %02lu/%02lu, %lux%lu %lu Hz %lu:%lu"
+msgstr "Kampas: %02lu/%02lu, %lux%lu %lu Hz %lu:%lu"
+
+msgctxt "IDS_MAINFRM_11"
+msgid "%s, %s %u Hz %d bits %d %s"
+msgstr "%s, %s %u Hz %d bitai %d %s"
+
+msgctxt "IDS_ADD_TO_PLAYLIST"
+msgid "Add to MPC-HC Playlist"
+msgstr "Įtraukti į MPC-HC grojaraštį"
+
+msgctxt "IDS_OPEN_WITH_MPC"
+msgid "Play with MPC-HC"
+msgstr "Groti su MPC-HC"
+
+msgctxt "IDS_CANNOT_CHANGE_FORMAT"
+msgid "MPC-HC has not enough privileges to change files formats associations. Please click on the \"Run as administrator\" button."
+msgstr "MPC-HC neturi pakankamai privilegijų pakeisti formatų susiejimą. Prašom spragtelėkite „Paleisti administratoriaus teisėmis“ mygtuką."
+
+msgctxt "IDS_APP_DESCRIPTION"
+msgid "MPC-HC is an extremely light-weight, open source media player for Windows. It supports all common video and audio file formats available for playback. We are 100% spyware free, there are no advertisements or toolbars."
+msgstr "MPC-HC - tai nepaprastai lengvas, su atviru išeities kodu media grotuvas Windows. Jis palaiko visus populiarius vaizdo ir garso failų formatus, pasiekiamus grojimui. Mes garantuojame 100% laisvę nuo šnipinėjimo programų, reklamų ar įrankių juostų."
+
+msgctxt "IDS_MAINFRM_12"
+msgid "channel"
+msgstr "kanalas"
+
+msgctxt "IDS_MAINFRM_13"
+msgid "channels"
+msgstr "kanalai"
+
+msgctxt "IDS_AG_TITLE"
+msgid "Title %u"
+msgstr "Pavadinimas %u"
+
+msgctxt "IDS_MAINFRM_16"
+msgid "DVD: Unexpected error"
+msgstr "DVD: NetikÄ—ta klaida"
+
+msgctxt "IDS_MAINFRM_17"
+msgid "DVD: Copy-Protect Fail"
+msgstr "DVD: Problema su apsauga nuo kopijavimo"
+
+msgctxt "IDS_MAINFRM_18"
+msgid "DVD: Invalid DVD 1.x Disc"
+msgstr "DVD: Netinkamas DVD 1.x"
+
+msgctxt "IDS_MAINFRM_19"
+msgid "DVD: Invalid Disc Region"
+msgstr "DVD: Netinkamas disko regionas"
+
+msgctxt "IDS_MAINFRM_20"
+msgid "DVD: Low Parental Level"
+msgstr "DVD: Žema nepilnameÄių apsauga"
+
+msgctxt "IDS_MAINFRM_21"
+msgid "DVD: Macrovision Fail"
+msgstr "DVD: Problema su Macrovision"
+
+msgctxt "IDS_MAINFRM_22"
+msgid "DVD: Incompatible System And Decoder Regions"
+msgstr "DVD: Nesuderinami sistemos ir dekoderio regionai"
+
+msgctxt "IDS_MAINFRM_23"
+msgid "DVD: Incompatible Disc And Decoder Regions"
+msgstr "DVD: Nesuderinami disko ir dekoderio regionai"
+
+msgctxt "IDS_D3DFS_WARNING"
+msgid "This option is designed to avoid tearing. However, it will also prevent MPC-HC from displaying the context menu and any dialog box during playback.\n\nDo you really want to activate this option?"
+msgstr "Å i funkcija skirta paÅ¡alinti drebÄ—jimÄ…, taÄiau jÄ… įjungus trukdomas kontekstinio meniu ir dialogų vaizdavimas.\n\nAr jÅ«s tikrai norite aktyvuoti jÄ…?"
+
+msgctxt "IDS_MAINFRM_139"
+msgid "Sub delay: %ld ms"
+msgstr "Subtitrų delsa: %ld ms"
+
+msgctxt "IDS_AG_TITLE2"
+msgid "Title: %02d/%02d"
+msgstr "Pavadinimas: %02d/%02d"
+
+msgctxt "IDS_REALVIDEO_INCOMPATIBLE"
+msgid "Filename contains unsupported characters (use only A-Z, 0-9)"
+msgstr "Failo pavadinime yra nepalaikomi simboliai (naudokite A-Z, 0-9)"
+
+msgctxt "IDS_THUMB_ROWNUMBER"
+msgid "Rows:"
+msgstr "EilutÄ—s:"
+
+msgctxt "IDS_THUMB_COLNUMBER"
+msgid "Columns:"
+msgstr "Stulpeliai:"
+
+msgctxt "IDS_THUMB_IMAGE_WIDTH"
+msgid "Image width"
+msgstr "Plotis"
+
+msgctxt "IDS_PPSDB_URLCORRECT"
+msgid "The URL appears to be correct!"
+msgstr "Įvestas teisingas URL!"
+
+msgctxt "IDS_PPSDB_PROTOCOLERR"
+msgid "Protocol version mismatch, please upgrade your player or choose a different address!"
+msgstr "Neatitinka protokolo versija, prašome atnaujinti grotuvą arba pasirinkite kitą adresą!"
+
+msgctxt "IDS_AG_ASPECT_RATIO"
+msgid "Aspect Ratio"
+msgstr "Proporcijos"
+
+msgctxt "IDS_MAINFRM_37"
+msgid ", Total: %ld, Dropped: %ld"
+msgstr ", Viso: %ld, Pamesta: %ld"
+
+msgctxt "IDS_MAINFRM_38"
+msgid ", Size: %I64d KB"
+msgstr ", Dydis: %I64d KB"
+
+msgctxt "IDS_MAINFRM_39"
+msgid ", Size: %I64d MB"
+msgstr ", Dydis: %I64d MB"
+
+msgctxt "IDS_MAINFRM_40"
+msgid ", Free: %I64d KB"
+msgstr ", Laisva: %I64d KB"
+
+msgctxt "IDS_MAINFRM_41"
+msgid ", Free: %I64d MB"
+msgstr ", Laisva: %I64d MB"
+
+msgctxt "IDS_MAINFRM_42"
+msgid ", Free V/A Buffers: %03d/%03d"
+msgstr ", Laisvi V/A Buferiai: %03d/%03d"
+
+msgctxt "IDS_AG_ERROR"
+msgid "Error"
+msgstr "Klaida"
+
+msgctxt "IDS_SUBTITLE_STREAM_OFF"
+msgid "Subtitle: off"
+msgstr "Subtitrai: išjungti"
+
+msgctxt "IDS_SUBTITLE_STREAM"
+msgid "Subtitle: %s"
+msgstr "Subtitrai: %s"
+
+msgctxt "IDS_MAINFRM_46"
+msgid "Select the path for the DVD/BD:"
+msgstr "Įveskite kelią DVD/BD:"
+
+msgctxt "IDS_SUB_LOADED_SUCCESS"
+msgid " loaded successfully"
+msgstr "įkelta pilnai"
+
+msgctxt "IDS_ALL_FILES_FILTER"
+msgid "All files (*.*)|*.*||"
+msgstr "Visi failai (*.*)|*.*||"
+
+msgctxt "IDS_GETDIB_FAILED"
+msgid "GetDIB failed, hr = %08x"
+msgstr "Problema su GetDIB, hr = %08x"
+
+msgctxt "IDS_GETCURRENTIMAGE_FAILED"
+msgid "GetCurrentImage failed, hr = %08x"
+msgstr "Problema su GetCurrentImage, hr = %08x"
+
+msgctxt "IDS_SCREENSHOT_ERROR"
+msgid "Cannot create file"
+msgstr "Neįmanoma sukurti failo"
+
+msgctxt "IDS_THUMBNAILS_NO_DURATION"
+msgid "Cannot create thumbnails for files with no duration"
+msgstr "Neįmanoma sukurti miniatiūros failams, neturintiems trukmės"
+
+msgctxt "IDS_THUMBNAILS_NO_FRAME_SIZE"
+msgid "Failed to get video frame size"
+msgstr "Nepavyko gauti vaizdo kadro dydžio"
+
+msgctxt "IDS_OUT_OF_MEMORY"
+msgid "Out of memory, go buy some more!"
+msgstr "Nepakanka atminties, nusipirkite dar!"
+
+msgctxt "IDS_THUMBNAILS_INVALID_FORMAT"
+msgid "Invalid image format, cannot create thumbnails out of %d bpp dibs."
+msgstr "Neteisingas paveikslo formatas, neįmanoma sukurti miniatiūros iš bitmapų %d bpp."
+
+msgctxt "IDS_THUMBNAILS_INFO_FILESIZE"
+msgid "File Size: %s (%s bytes)\\N"
+msgstr "Failo dydis: %s (%s baitų)\\N"
+
+msgctxt "IDS_THUMBNAILS_INFO_HEADER"
+msgid "{\\an7\\1c&H000000&\\fs16\\b0\\bord0\\shad0}File Name: %s\\N%sResolution: %dx%d %s\\NDuration: %02d:%02d:%02d"
+msgstr "{\\an7\\1c&H000000&\\fs16\\b0\\bord0\\shad0}Failo vardas: %s\\N%sSkiriamoji geba: %dx%d %s\\NTrukmÄ—: %02d:%02d:%02d"
+
+msgctxt "IDS_THUMBNAIL_TOO_SMALL"
+msgid "The thumbnails would be too small, impossible to create the file.\n\nTry lowering the number of thumbnails or increasing the total size."
+msgstr "Neįmanoma sukurti failo su tokiomis mažomis miniatiūromis.\n\nPamėginkite sumažinti miniatiūrų kiekį arba padidinti bendrą dydį."
+
+msgctxt "IDS_CANNOT_LOAD_SUB"
+msgid "To load subtitles you have to change the video renderer type and reopen the file.\n- DirectShow: VMR-7/VMR-9 (renderless), EVR (CP), Sync, madVR or Haali\n- RealMedia: Special renderer for RealMedia, or open it through DirectShow\n- QuickTime: DX7 or DX9 renderer for QuickTime\n- ShockWave: n/a"
+msgstr "Subtitrams įkelti būtina pakeisti renderio tipą ir įkelti failą iš naujo.\n - DirectShow: VMR-7/VMR-9 (renderless), EVR (CP), Sync arba madVR\n - RealMedia: specialus renderis RealMedia, arba atidarykite per DirectShow\n - QuickTime: DX7 arba DX9 renderis QuickTime\n - ShockWave: nepalaikomas"
+
+msgctxt "IDS_SUBTITLE_FILES_FILTER"
+msgid "Subtitle files"
+msgstr "Subtitrų failai"
+
+msgctxt "IDS_MAINFRM_68"
+msgid "Aspect Ratio: %ld:%ld"
+msgstr "Proporcijos: %ld:%ld"
+
+msgctxt "IDS_MAINFRM_69"
+msgid "Aspect Ratio: Default"
+msgstr "Proporcijos: pagal nutylÄ—jimÄ…"
+
+msgctxt "IDS_MAINFRM_70"
+msgid "Audio delay: %I64d ms"
+msgstr "Garso uždelsimas: %I64d ms"
+
+msgctxt "IDS_AG_CHAPTER"
+msgid "Chapter %d"
+msgstr "Skyrius %d"
+
+msgctxt "IDS_AG_OUT_OF_MEMORY"
+msgid "Out of memory"
+msgstr "Nepakanka atminties"
+
+msgctxt "IDS_MAINFRM_77"
+msgid "Error: Adobe Flash Player for Internet Explorer is required"
+msgstr "Klaida: Internet Explorer reikalingas Adobe Flash Player"
+
+msgctxt "IDS_MAINFRM_78"
+msgid "QuickTime not yet supported for X64 (apple library not available)"
+msgstr "QuickTime dar nepalaikomas X64 (nÄ—ra apple bibliotekos)"
+
+msgctxt "IDS_MAINFRM_80"
+msgid "Failed to create the filter graph object"
+msgstr "Nepavyksta sukurti filtro grafÄ…"
+
+msgctxt "IDS_MAINFRM_81"
+msgid "Invalid argument"
+msgstr "Neteisingas argumentas"
+
+msgctxt "IDS_MAINFRM_82"
+msgid "Opening aborted"
+msgstr "Atidarymas nutrauktas"
+
+msgctxt "IDS_MAINFRM_83"
+msgid "Failed to render the file"
+msgstr "Nepavyko renderinti failo"
+
+msgctxt "IDS_PPSDB_BADURL"
+msgid "Bad URL, could not locate subtitle database there!"
+msgstr "Neteisinga URL, neįmanoma surasti ten duomenų bazės!"
+
+msgctxt "IDS_AG_CHAPTER2"
+msgid "Chapter: "
+msgstr "Skyrius:"
+
+msgctxt "IDS_VOLUME_OSD"
+msgid "Vol: %d%%"
+msgstr "Garsumas: %d%%"
+
+msgctxt "IDS_BOOST_OSD"
+msgid "Boost: +%u%%"
+msgstr "Stiprinimas: +%u%%"
+
+msgctxt "IDS_BALANCE_OSD"
+msgid "Balance: %s"
+msgstr "Balansas: %s"
+
+msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
+msgid "Current"
+msgstr "Dabartinis"
+
+msgctxt "IDS_MAINFRM_DIR_TITLE"
+msgid "Select Directory"
+msgstr "RinkitÄ—s aplankÄ…"
+
+msgctxt "IDS_MAINFRM_DIR_CHECK"
+msgid "Include subdirectories"
+msgstr "Su subaplankais"
+
+msgctxt "IDS_AG_PAUSE"
+msgid "Pause"
+msgstr "PauzÄ—"
+
+msgctxt "IDS_AG_TOGGLE_CAPTION"
+msgid "Toggle Caption&Menu"
+msgstr "Įj./Išj. antraštę ir meniu"
+
+msgctxt "IDS_AG_TOGGLE_SEEKER"
+msgid "Toggle Seek Bar"
+msgstr "Įj./Išj. slankjuostę"
+
+msgctxt "IDS_AG_TOGGLE_CONTROLS"
+msgid "Toggle Controls"
+msgstr "Įj./Išj. valdiklius"
+
+msgctxt "IDS_MAINFRM_84"
+msgid "Invalid file name"
+msgstr "Neteisingas failo vardas"
+
+msgctxt "IDS_MAINFRM_86"
+msgid "Cannot connect the filters"
+msgstr "Negaliu prijungti filtrų"
+
+msgctxt "IDS_MAINFRM_87"
+msgid "Cannot load any source filter"
+msgstr "Negaliu įkelti jokio šaltinio filtro"
+
+msgctxt "IDS_MAINFRM_88"
+msgid "Cannot render the file"
+msgstr "Negaliu renderinti failo"
+
+msgctxt "IDS_MAINFRM_89"
+msgid "Invalid file format"
+msgstr "Neteisingas failo formatas"
+
+msgctxt "IDS_MAINFRM_90"
+msgid "File not found"
+msgstr "Failas nerastas"
+
+msgctxt "IDS_MAINFRM_91"
+msgid "Unknown file type"
+msgstr "Nežinomas failo tipas"
+
+msgctxt "IDS_MAINFRM_92"
+msgid "Unsupported stream"
+msgstr "Nepalaikomas srautas"
+
+msgctxt "IDS_MAINFRM_93"
+msgid "Cannot find DVD directory"
+msgstr "Nerastas DVD aplankas"
+
+msgctxt "IDS_MAINFRM_94"
+msgid "Can't create the DVD Navigator filter"
+msgstr "Negaliu sukurti DVD Navigator filtro"
+
+msgctxt "IDS_AG_FAILED"
+msgid "Failed"
+msgstr "Nepavyko"
+
+msgctxt "IDS_MAINFRM_96"
+msgid "Can't create video capture filter"
+msgstr "Negaliu sukurti vaizdo įrašymo filtro"
+
+msgctxt "IDS_MAINFRM_98"
+msgid "No capture filters"
+msgstr "Nėra įrašų filtrų"
+
+msgctxt "IDS_MAINFRM_99"
+msgid "Can't create capture graph builder object"
+msgstr "Negaliu sukurti objekto vaizdo įrašymo grafo statytojui"
+
+msgctxt "IDS_MAINFRM_108"
+msgid "Couldn't open any device"
+msgstr "Negaliu atidaryti jokio įrenginio"
+
+msgctxt "IDS_AG_SOUND"
+msgid "Sound"
+msgstr "Garsas"
+
+msgctxt "IDS_MAINFRM_114"
+msgid "%s was not found, please insert media containing this file."
+msgstr "%s nerasta, prašo įdėti kaupiklį su šiuo failu."
+
+msgctxt "IDS_AG_ABORTED"
+msgid "Aborted"
+msgstr "Nutraukta"
+
+msgctxt "IDS_MAINFRM_116"
+msgid "&Properties..."
+msgstr "Y&patybÄ—s"
+
+msgctxt "IDS_MAINFRM_117"
+msgid " (pin) properties..."
+msgstr " (pin) ypatybÄ—s..."
+
+msgctxt "IDS_AG_UNKNOWN_STREAM"
+msgid "Unknown Stream"
+msgstr "Nežinomas srautas"
+
+msgctxt "IDS_AG_UNKNOWN"
+msgid "Unknown %u"
+msgstr "Nežinomas %u"
+
+msgctxt "IDS_AG_VSYNC"
+msgid "VSync"
+msgstr "VSync"
+
+msgctxt "IDS_MAINFRM_121"
+msgid " (Director Comments 1)"
+msgstr " (Režisieriaus komentarai 1)"
+
+msgctxt "IDS_MAINFRM_122"
+msgid " (Director Comments 2)"
+msgstr " (Režisieriaus komentarai 2)"
+
+msgctxt "IDS_DVD_SUBTITLES_ENABLE"
+msgid "Enable DVD subtitles"
+msgstr "Įjungti DVD subtitrus"
+
+msgctxt "IDS_AG_ANGLE"
+msgid "Angle %u"
+msgstr "Kampas %u"
+
+msgctxt "IDS_AG_VSYNCOFFSET_INCREASE"
+msgid "Increase VSync Offset"
+msgstr "Padidinti VSync poslinkį"
+
+msgctxt "IDS_AG_DISABLED"
+msgid "Disabled"
+msgstr "IÅ¡jungta"
+
+msgctxt "IDS_AG_VSYNCOFFSET_DECREASE"
+msgid "Decrease VSync Offset"
+msgstr "Sumažinti VSync poslinkį"
+
+msgctxt "IDS_MAINFRM_136"
+msgid "MPC-HC D3D Fullscreen"
+msgstr "MPC-HC Pilnaekranis D3D"
+
+msgctxt "IDS_MAINFRM_137"
+msgid "Unknown format"
+msgstr "Nežinomas formatas"
+
+msgctxt "IDS_MAINFRM_138"
+msgid "Sub shift: %ld ms"
+msgstr "Subtitrų poslinkis: %ld ms"
+
+msgctxt "IDS_VOLUME_BOOST_INC"
+msgid "Volume boost increase"
+msgstr "Garso stiprinimas padidinti"
+
+msgctxt "IDS_VOLUME_BOOST_DEC"
+msgid "Volume boost decrease"
+msgstr "Garso stiprinimas sumažinti"
+
+msgctxt "IDS_VOLUME_BOOST_MIN"
+msgid "Volume boost Min"
+msgstr "Garso stiprinimas Min"
+
+msgctxt "IDS_VOLUME_BOOST_MAX"
+msgid "Volume boost Max"
+msgstr "Garso stiprinimas Max"
+
+msgctxt "IDS_USAGE"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Naudojimas: mpc-hc.exe „kelias“ [perjungikliai]\n\n„kelias“\tFailas ar aplankas įkÄ—limui (leidžiamos\n\t\tkaukÄ—s, \"-\" denotes standard input)\n/dub \"dubname\"\tÄ®kelti papildomÄ… garso failÄ…\n/dubdelay \"file\"\tÄ®kelti papildomÄ… garso failÄ… su XXms poslinkiu (jei\n\t\tfaile yra \"...DELAY XXms...\")\n/d3dfs\t\tPradÄ—ti pilnaekraniu D3D režimu\n/sub \"subname\"\tÄ®kelti papildomÄ… subtitrų failÄ…\n/filter \"filtername\"\tÄ®kelti DirectShow filtrus iÅ¡ dinaminÄ—s\n\t\tbibliotekos (leidžiamos kaukÄ—s)\n/dvd\t\tPaleisti DVD režime, „kelias“ reiÅ¡kia dvd\n\t\taplankÄ…r (pasirinktinai)\n/dvdpos T#C\tPradÄ—ti groti nuo title T, chapter C\n/dvdpos T#hh:mm\tPradÄ—ti groti nuo title T, pozicijos hh:mm:ss\n/cd\t\tÄ®kelti visus audio cd arba (s)vcd takelius,\n\t\t„kelias“ reiÅ¡kia keliÄ… į diskÄ… (pasirinktinai)\n/device\t\tAtidaryti numatytÄ…jį vaizdo įrenginį\n/open\t\tAtidaryti failÄ…, nepradÄ—ti automatiÅ¡kai groti\n/play\t\tPradÄ—ti groti iÅ¡kart paleidus\n\t\tgrotuvÄ…\n/close\t\tBaigus groti uždaryti grotuvÄ… (veikia tik\n\t\tnaudojant su /play)\n/shutdown\tBaigus groti Å¡jungti kompiuterį\n/standby\t\tBaigus groti perjungti sistemÄ… į laukimo režimÄ…\n/hibernate\tBaigus groti užmigdyti kompiuterį\n/logoff\t\tBaigus groti iÅ¡siregistruoti\n/lock\t\tBaigus groti užrakinti kompiuterį\n/monitoroff\tBaigus groti iÅ¡jungti monitorių\n/playnext\t\tBaigus groti atidaryti kitÄ… aplanko failÄ…\n/fullscreen\tPaleisti pilnaekrane veiksena\n/minimized\tPaleisti minimizuotoje veiksenoje\n/new\t\tNaudoti naujÄ… grotuvo kopijÄ…\n/add\t\tPridÄ—ti „kelią“ į grojaraÅ¡tį, galima kombinuoti\n\t\tsu /open ir /play\n/randomize\tRandomize the playlist\n/regvid\t\tSusieti su vaizdo failais\n/regaud\t\tSusieti su garso failais\n/regpl\t\tSusieti su grojaraÅ¡Äio failais\n/regall\t\tSusieti su visais palaikomais failais\n/unregall\t\tPaÅ¡alinti visus failų susiejimus\n/start ms\t\tPradÄ—ti groti nuo \"ms\" (= milisekundÄ—s)\n/startpos hh:mm:ss\tPradÄ—ti groti nuo pozicijos hh:mm:ss\n/fixedsize w,h\tNustatyti fiksuotÄ… lango dydį\n/monitor N\tPaleisti grotuvÄ… monitoriuje N, kur N skaiÄiuojama nuo 1\n/audiorenderer N\tNaudoti garso renderį N, kur N skaiÄiuojama nuo 1\n\t\t(žiÅ«rÄ—kite „IÅ¡vestis“ nustatymuose)\n/shaderpreset \"Pr\"\tNaudoti \"Pr\" tamsinimo prieÅ¡nustatymus\n/pns \"name\"\tNurodyti Pan&Scan prieÅ¡nustatymo vardÄ… naudojimui\n/iconsassoc\tSusieti piktogramų formatÄ… iÅ¡ naujo\n/nofocus\t\tAtidaryti MPC-HC fone\n/webport N\tPaleisti web sÄ…sajÄ… per nurodytÄ… prievadÄ…\n/debug\t\tRodyti derinimo informacijÄ… OSD\n/nocrashreporter\tIÅ¡jungti lūžių praneÅ¡imus\n/slave \"hWnd\"\tNaudoti MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tAtstatyti nustatymus pagal nutylÄ—jimÄ…\n/help /h /?\tRoditi pagalbÄ… apie komandinÄ—s eilutÄ—s perjungiklius\n"
+
+msgctxt "IDS_UNKNOWN_SWITCH"
+msgid "Unrecognized switch(es) found in command line string: \n\n"
+msgstr "Komandinėje eilutėje rasti neatpažinti perjungikliai: \n\n"
+
+msgctxt "IDS_AG_TOGGLE_INFO"
+msgid "Toggle Information"
+msgstr "Įj./Išj. informaciją"
+
+msgctxt "IDS_AG_TOGGLE_STATS"
+msgid "Toggle Statistics"
+msgstr "Įj./Išj. statistiką"
+
+msgctxt "IDS_AG_TOGGLE_STATUS"
+msgid "Toggle Status"
+msgstr "Įj./Išj. būseną"
+
+msgctxt "IDS_AG_TOGGLE_SUBRESYNC"
+msgid "Toggle Subresync Bar"
+msgstr "Įj./Išj. subtitrų sinchronizacijos langą"
+
+msgctxt "IDS_AG_TOGGLE_PLAYLIST"
+msgid "Toggle Playlist Bar"
+msgstr "Įj./Išj. grojaraštį"
+
+msgctxt "IDS_AG_TOGGLE_CAPTURE"
+msgid "Toggle Capture Bar"
+msgstr "Įj./Išj. įrašymo langą"
+
+msgctxt "IDS_AG_TOGGLE_DEBUGSHADERS"
+msgid "Toggle Debug Shaders"
+msgstr "Įj./Išj. derinimo tamsinimus"
+
+msgctxt "IDS_AG_ZOOM_50"
+msgid "Zoom 50%"
+msgstr "Mastelis 50%"
+
+msgctxt "IDS_AG_ZOOM_100"
+msgid "Zoom 100%"
+msgstr "Mastelis 100%"
+
+msgctxt "IDS_AG_ZOOM_200"
+msgid "Zoom 200%"
+msgstr "Mastelis 200%"
+
+msgctxt "IDS_AG_NEXT_AR_PRESET"
+msgid "Next AR Preset"
+msgstr "Sekantis proporcijų priešnustatymas"
+
+msgctxt "IDS_AG_VIDFRM_STRETCH"
+msgid "VidFrm Stretch"
+msgstr "Vaizdo kadras. Išplėsti iki ekrano dydžio"
+
+msgctxt "IDS_AG_VIDFRM_INSIDE"
+msgid "VidFrm Inside"
+msgstr "Vaizdo kadras. Įrašyti į ekrano dydį"
+
+msgctxt "IDS_AG_VIDFRM_OUTSIDE"
+msgid "VidFrm Outside"
+msgstr "Vaizdo kadras. Užpildyti ekraną ir apkirpti kadrą"
+
+msgctxt "IDS_AG_PNS_RESET"
+msgid "PnS Reset"
+msgstr "Atstatyti kadro padÄ—ties nustatymus"
+
+msgctxt "IDS_AG_PNS_ROTATEX_P"
+msgid "PnS Rotate X+"
+msgstr "Pasukti kadrÄ… pagal X+"
+
+msgctxt "IDS_AG_VIDFRM_ZOOM1"
+msgid "VidFrm Zoom 1"
+msgstr "Vaizdo kadras Zoom 1"
+
+msgctxt "IDS_AG_VIDFRM_ZOOM2"
+msgid "VidFrm Zoom 2"
+msgstr "Vaizdo kadras Zoom 2"
+
+msgctxt "IDS_AG_VIDFRM_SWITCHZOOM"
+msgid "VidFrm Switch Zoom"
+msgstr "Vaizdo kadras. Pakeisti mastelį"
+
+msgctxt "IDS_ENABLE_ALL_FILTERS"
+msgid "&Enable all filters"
+msgstr "&Įgalinti visus filtrus"
+
+msgctxt "IDS_NAVIGATE_TUNERSCAN"
+msgid "Tuner scan"
+msgstr "Imtuvo skenavimas"
+
+msgctxt "IDS_SUBTITLES_ERROR"
+msgid "Subtitles are not loaded or unsupported renderer."
+msgstr "Subtitrai neįkelti arba nepalaikomas renderis."
+
+msgctxt "IDS_LOGO_AUTHOR"
+msgid "Author unknown. Contact us if you made this logo!"
+msgstr "Nežinomas autorius. Susisiekite su mumis, jei tai jūsų logotipas."
+
+msgctxt "IDS_NO_MORE_MEDIA"
+msgid "No more media in the current folder."
+msgstr "Einamajame aplanke daugiau nėra media failų."
+
+msgctxt "IDS_FIRST_IN_FOLDER"
+msgid "The first file of the folder is already loaded."
+msgstr "Pirmas failas aplanke jau įkeltas."
+
+msgctxt "IDS_LAST_IN_FOLDER"
+msgid "The last file of the folder is already loaded."
+msgstr "Įkeltas paskutinis aplanke esantis failas."
+
+msgctxt "IDS_FRONT_LEFT"
+msgid "Front Left"
+msgstr "Priekinis kairys"
+
+msgctxt "IDS_FRONT_RIGHT"
+msgid "Front Right"
+msgstr "Priekinis dešinys"
+
+msgctxt "IDS_FRONT_CENTER"
+msgid "Front Center"
+msgstr "Priekinis centrinis"
+
+msgctxt "IDS_LOW_FREQUENCY"
+msgid "Low Frequency"
+msgstr "Žemų dažnių garsiakalbis"
+
+msgctxt "IDS_BACK_LEFT"
+msgid "Back Left"
+msgstr "Galinis kairys"
+
+msgctxt "IDS_BACK_RIGHT"
+msgid "Back Right"
+msgstr "Galinis dešinys"
+
+msgctxt "IDS_FRONT_LEFT_OF_CENTER"
+msgid "Front Left of Center"
+msgstr "Priekinis kairys centras"
+
+msgctxt "IDS_FRONT_RIGHT_OF_CENTER"
+msgid "Front Right of Center"
+msgstr "Priekinis dešinys centras"
+
+msgctxt "IDS_BACK_CENTER"
+msgid "Back Center"
+msgstr "Galinis centras"
+
+msgctxt "IDS_SIDE_LEFT"
+msgid "Side Left"
+msgstr "KairÄ— pusÄ—"
+
+msgctxt "IDS_SIDE_RIGHT"
+msgid "Side Right"
+msgstr "Dešinė pusė"
+
+msgctxt "IDS_TOP_CENTER"
+msgid "Top Center"
+msgstr "Viršutinis centras"
+
+msgctxt "IDS_TOP_FRONT_LEFT"
+msgid "Top Front Left"
+msgstr "Viršutinis kairys centras"
+
+msgctxt "IDS_TOP_FRONT_CENTER"
+msgid "Top Front Center"
+msgstr "Viršutinis priekinis centras"
+
+msgctxt "IDS_TOP_FRONT_RIGHT"
+msgid "Top Front Right"
+msgstr "Viršutinis priekinis dešinys"
+
+msgctxt "IDS_TOP_BACK_LEFT"
+msgid "Top Back Left"
+msgstr "Viršutinis kairys galas"
+
+msgctxt "IDS_TOP_BACK_CENTER"
+msgid "Top Back Center"
+msgstr "Viršutinis galo centras"
+
+msgctxt "IDS_TOP_BACK_RIGHT"
+msgid "Top Back Right"
+msgstr "Viršutinis dešinys galas"
+
+msgctxt "IDS_TIME_TOOLTIP_ABOVE"
+msgid "Above seek bar"
+msgstr "Virš slankjuostės"
+
+msgctxt "IDS_TIME_TOOLTIP_BELOW"
+msgid "Below seek bar"
+msgstr "Po slankjuoste"
+
+msgctxt "IDS_VIDEO_STREAM"
+msgid "Video: %s"
+msgstr "Vaizdas: %s"
+
+msgctxt "IDS_APPLY"
+msgid "Apply"
+msgstr "Panaudoti"
+
+msgctxt "IDS_CLEAR"
+msgid "Clear"
+msgstr "IÅ¡valyti"
+
+msgctxt "IDS_CANCEL"
+msgid "Cancel"
+msgstr "AÅ¡aukti"
+
+msgctxt "IDS_THUMB_THUMBNAILS"
+msgid "Layout"
+msgstr "IÅ¡dÄ—stymas"
+
+msgctxt "IDS_THUMB_PIXELS"
+msgid "Pixels:"
+msgstr "Taškų:"
+
+msgctxt "IDS_TEXTFILE_ENC"
+msgid "Encoding:"
+msgstr "KoduotÄ—:"
+
+msgctxt "IDS_DISABLE_ALL_FILTERS"
+msgid "&Disable all filters"
+msgstr "IÅ¡junti &visus filtrus"
+
+msgctxt "IDS_ENABLE_AUDIO_FILTERS"
+msgid "Enable all audio decoders"
+msgstr "Įjungti visus garso dekoderius"
+
+msgctxt "IDS_DISABLE_AUDIO_FILTERS"
+msgid "Disable all audio decoders"
+msgstr "IÅ¡jungti visus garso dekoderius"
+
+msgctxt "IDS_ENABLE_VIDEO_FILTERS"
+msgid "Enable all video decoders"
+msgstr "Įjungti visus vaizdo dekoderius"
+
+msgctxt "IDS_DISABLE_VIDEO_FILTERS"
+msgid "Disable all video decoders"
+msgstr "IÅ¡jungti visus vaizdo dekoderius"
+
+msgctxt "IDS_STRETCH_TO_WINDOW"
+msgid "Stretch To Window"
+msgstr "Išplėsti iki ekrano dydžio"
+
+msgctxt "IDS_TOUCH_WINDOW_FROM_INSIDE"
+msgid "Touch Window From Inside"
+msgstr "Įrašyti į ekrano dydį"
+
+msgctxt "IDS_ZOOM1"
+msgid "Zoom 1"
+msgstr "Mastelis 1"
+
+msgctxt "IDS_ZOOM2"
+msgid "Zoom 2"
+msgstr "Mastelis 2"
+
+msgctxt "IDS_TOUCH_WINDOW_FROM_OUTSIDE"
+msgid "Touch Window From Outside"
+msgstr "Užpildyti ekraną ir apkirpti kadrą"
+
+msgctxt "IDS_AUDIO_STREAM"
+msgid "Audio: %s"
+msgstr "Garsas: %s"
+
+msgctxt "IDS_AG_REOPEN"
+msgid "Reopen File"
+msgstr "Atidaryti failą iš naujo"
+
+msgctxt "IDS_MFMT_AVI"
+msgid "AVI"
+msgstr "AVI"
+
+msgctxt "IDS_MFMT_MPEG"
+msgid "MPEG"
+msgstr "MPEG"
+
+msgctxt "IDS_MFMT_MPEGTS"
+msgid "MPEG-TS"
+msgstr "MPEG-TS"
+
+msgctxt "IDS_MFMT_DVDVIDEO"
+msgid "DVD-Video"
+msgstr "DVD-Video"
+
+msgctxt "IDS_MFMT_MKV"
+msgid "Matroska"
+msgstr "Matroska"
+
+msgctxt "IDS_MFMT_WEBM"
+msgid "WebM"
+msgstr "WebM"
+
+msgctxt "IDS_MFMT_MP4"
+msgid "MP4"
+msgstr "MP4"
+
+msgctxt "IDS_MFMT_MOV"
+msgid "QuickTime Movie"
+msgstr "QuickTime filmas"
+
+msgctxt "IDS_MFMT_3GP"
+msgid "3GP"
+msgstr "3GP"
+
+msgctxt "IDS_MFMT_3G2"
+msgid "3G2"
+msgstr "3G2"
+
+msgctxt "IDS_MFMT_FLV"
+msgid "Flash Video"
+msgstr "Flash Video"
+
+msgctxt "IDS_MFMT_OGM"
+msgid "Ogg Media"
+msgstr "Ogg Media"
+
+msgctxt "IDS_MFMT_RM"
+msgid "Real Media"
+msgstr "Real Media"
+
+msgctxt "IDS_MFMT_RT"
+msgid "Real Script"
+msgstr "Real Script"
+
+msgctxt "IDS_MFMT_WMV"
+msgid "Windows Media Video"
+msgstr "Windows Media Video"
+
+msgctxt "IDS_MFMT_BINK"
+msgid "Smacker/Bink Video"
+msgstr "Smacker/Bink Video"
+
+msgctxt "IDS_MFMT_FLIC"
+msgid "FLIC Animation"
+msgstr "FLIC Animation"
+
+msgctxt "IDS_MFMT_DSM"
+msgid "DirectShow Media"
+msgstr "DirectShow Media"
+
+msgctxt "IDS_MFMT_IVF"
+msgid "Indeo Video Format"
+msgstr "Indeo Video Format"
+
+msgctxt "IDS_MFMT_OTHER"
+msgid "Other"
+msgstr "Kiti"
+
+msgctxt "IDS_MFMT_SWF"
+msgid "Shockwave Flash"
+msgstr "Shockwave Flash"
+
+msgctxt "IDS_MFMT_OTHER_AUDIO"
+msgid "Other Audio"
+msgstr "Kiti Audio"
+
+msgctxt "IDS_MFMT_AC3"
+msgid "AC-3"
+msgstr "AC-3"
+
+msgctxt "IDS_MFMT_AIFF"
+msgid "AIFF"
+msgstr "AIFF"
+
+msgctxt "IDS_MFMT_ALAC"
+msgid "Apple Lossless"
+msgstr "Apple Lossless"
+
+msgctxt "IDS_MFMT_WAV"
+msgid "WAV"
+msgstr "WAV"
+
+msgctxt "IDS_MFMT_WMA"
+msgid "Windows Media Audio"
+msgstr "Windows Media Audio"
+
+msgctxt "IDS_MFMT_WV"
+msgid "WavPack"
+msgstr "WavPack"
+
+msgctxt "IDS_MFMT_OPUS"
+msgid "Opus Audio Codec"
+msgstr "Opus Audio Codec"
+
+msgctxt "IDS_MFMT_DTS"
+msgid "DTS/DTS-HD"
+msgstr "DTS/DTS-HD"
+
+msgctxt "IDS_MFMT_AMR"
+msgid "AMR"
+msgstr "AMR"
+
+msgctxt "IDS_MFMT_APE"
+msgid "Monkey's Audio"
+msgstr "Monkey's Audio"
+
+msgctxt "IDS_MFMT_AU"
+msgid "AU/SND"
+msgstr "AU/SND"
+
+msgctxt "IDS_MFMT_CDA"
+msgid "Audio CD track"
+msgstr "Audio CD takelis"
+
+msgctxt "IDS_MFMT_FLAC"
+msgid "FLAC"
+msgstr "FLAC"
+
+msgctxt "IDS_MFMT_M4A"
+msgid "MPEG-4 Audio"
+msgstr "MPEG-4 Audio"
+
+msgctxt "IDS_MFMT_MIDI"
+msgid "MIDI"
+msgstr "MIDI"
+
+msgctxt "IDS_MFMT_MKA"
+msgid "Matroska audio"
+msgstr "Matroska audio"
+
+msgctxt "IDS_MFMT_MP3"
+msgid "MP3"
+msgstr "MP3"
+
+msgctxt "IDS_MFMT_MPA"
+msgid "MPEG audio"
+msgstr "MPEG audio"
+
+msgctxt "IDS_MFMT_MPC"
+msgid "Musepack"
+msgstr "Musepack"
+
+msgctxt "IDS_MFMT_OFR"
+msgid "OptimFROG"
+msgstr "OptimFROG"
+
+msgctxt "IDS_MFMT_OGG"
+msgid "Ogg Vorbis"
+msgstr "Ogg Vorbis"
+
+msgctxt "IDS_MFMT_RA"
+msgid "Real Audio"
+msgstr "Real Audio"
+
+msgctxt "IDS_MFMT_TAK"
+msgid "TAK"
+msgstr "TAK"
+
+msgctxt "IDS_MFMT_TTA"
+msgid "True Audio"
+msgstr "True Audio"
+
+msgctxt "IDS_MFMT_PLS"
+msgid "Playlist"
+msgstr "Grojaraštis"
+
+msgctxt "IDS_MFMT_BDPLS"
+msgid "Blu-ray playlist"
+msgstr "Blu-ray grojaraštis"
+
+msgctxt "IDS_MFMT_RAR"
+msgid "RAR Archive"
+msgstr "RAR Archyvas"
+
+msgctxt "IDS_DVB_CHANNEL_FPS"
+msgid "FPS"
+msgstr "KPS"
+
+msgctxt "IDS_DVB_CHANNEL_RESOLUTION"
+msgid "Resolution"
+msgstr "Skiriamoji geba"
+
+msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
+msgid "Aspect Ratio"
+msgstr "Proporcijos"
+
+msgctxt "IDS_OSD_RS_VSYNC_ON"
+msgid "VSync: On"
+msgstr "VSync: Įj."
+
+msgctxt "IDS_OSD_RS_VSYNC_OFF"
+msgid "VSync: Off"
+msgstr "VSync: IÅ¡j."
+
+msgctxt "IDS_OSD_RS_ACCURATE_VSYNC_ON"
+msgid "Accurate VSync: On"
+msgstr "Tikslus VSync: Įj."
+
+msgctxt "IDS_OSD_RS_ACCURATE_VSYNC_OFF"
+msgid "Accurate VSync: Off"
+msgstr "Tikslus VSync: IÅ¡j."
+
+msgctxt "IDS_OSD_RS_SYNC_TO_DISPLAY_ON"
+msgid "Synchronize Video to Display: On"
+msgstr "Sinchronizuoti vaizdą su displėjumi: Įj."
+
+msgctxt "IDS_OSD_RS_SYNC_TO_DISPLAY_OFF"
+msgid "Synchronize Video to Display: Off"
+msgstr "Sinchronizuoti vaizdÄ… su displÄ—jumi: IÅ¡j."
+
+msgctxt "IDS_OSD_RS_SYNC_TO_VIDEO_ON"
+msgid "Synchronize Display to Video: On"
+msgstr "Sinchronizuoti displėjų su vaizdu: Įj."
+
+msgctxt "IDS_OSD_RS_SYNC_TO_VIDEO_OFF"
+msgid "Synchronize Display to Video: Off"
+msgstr "Sinchronizuoti displėjų su vaizdu: Išj."
+
+msgctxt "IDS_OSD_RS_PRESENT_NEAREST_ON"
+msgid "Present at Nearest VSync: On"
+msgstr "Teikti su artimiausiu VSync: Įj."
+
+msgctxt "IDS_OSD_RS_PRESENT_NEAREST_OFF"
+msgid "Present at Nearest VSync: Off"
+msgstr "Teikti su artimiausiu VSync: IÅ¡j."
+
+msgctxt "IDS_OSD_RS_COLOR_MANAGEMENT_ON"
+msgid "Color Management: On"
+msgstr "Spalvų valdymas: Įj."
+
+msgctxt "IDS_OSD_RS_COLOR_MANAGEMENT_OFF"
+msgid "Color Management: Off"
+msgstr "Spalvų valdymas: Išj."
+
+msgctxt "IDS_OSD_RS_INPUT_TYPE_AUTO"
+msgid "Input Type: Auto-Detect"
+msgstr "Įėjimo tipas: Nustatyti automatiškai"
+
+msgctxt "IDS_OSD_RS_INPUT_TYPE_HDTV"
+msgid "Input Type: HDTV"
+msgstr "Įėjimo tipas: HDTV"
+
+msgctxt "IDS_OSD_RS_INPUT_TYPE_SD_NTSC"
+msgid "Input Type: SDTV NTSC"
+msgstr "Įėjimo tipas: SDTV NTSC"
+
+msgctxt "IDS_OSD_RS_INPUT_TYPE_SD_PAL"
+msgid "Input Type: SDTV PAL"
+msgstr "Įėjimo tipas: SDTV PAL"
+
+msgctxt "IDS_OSD_RS_AMBIENT_LIGHT_BRIGHT"
+msgid "Ambient Light: Bright (2.2 Gamma)"
+msgstr "Supanti šviesa: Ryški (2.2 Gama)"
+
+msgctxt "IDS_OSD_RS_AMBIENT_LIGHT_DIM"
+msgid "Ambient Light: Dim (2.35 Gamma)"
+msgstr "Supanti Å¡viesa: Blanki (2.35 Gama)"
+
+msgctxt "IDS_OSD_RS_AMBIENT_LIGHT_DARK"
+msgid "Ambient Light: Dark (2.4 Gamma)"
+msgstr "Supanti Å¡viesa: Tamsi (2.4 Gama)"
+
+msgctxt "IDS_OSD_RS_REND_INTENT_PERCEPT"
+msgid "Rendering Intent: Perceptual"
+msgstr "Vaizdavimo metodas: Suvokimas"
+
+msgctxt "IDS_OSD_RS_REND_INTENT_RELATIVE"
+msgid "Rendering Intent: Relative Colorimetric"
+msgstr "Vaizdavimo metodas: Santykinis kolorimetrinis"
+
+msgctxt "IDS_OSD_RS_REND_INTENT_SATUR"
+msgid "Rendering Intent: Saturation"
+msgstr "Vaizdavimo metodas: Sodrumas"
+
+msgctxt "IDS_OSD_RS_REND_INTENT_ABSOLUTE"
+msgid "Rendering Intent: Absolute Colorimetric"
+msgstr "Vaizdavimo metodas: Absoliutus kolorimetrinis"
+
+msgctxt "IDS_OSD_RS_OUTPUT_RANGE"
+msgid "Output Range: %s"
+msgstr "IÅ¡Ä—jimo diapazonas: %s"
+
+msgctxt "IDS_OSD_RS_FLUSH_BEF_VSYNC_ON"
+msgid "Flush GPU before VSync: On"
+msgstr "Užpildyti GPU prieš VSync: Įj."
+
+msgctxt "IDS_OSD_RS_FLUSH_BEF_VSYNC_OFF"
+msgid "Flush GPU before VSync: Off"
+msgstr "Užpildyti GPU prieš VSync: Išj."
+
+msgctxt "IDS_OSD_RS_FLUSH_AFT_PRES_ON"
+msgid "Flush GPU after Present: On"
+msgstr "Užpildyti GPU po teikimo: Įj."
+
+msgctxt "IDS_OSD_RS_FLUSH_AFT_PRES_OFF"
+msgid "Flush GPU after Present: Off"
+msgstr "Užpildyti GPU po teikimo: Išj."
+
+msgctxt "IDS_OSD_RS_WAIT_ON"
+msgid "Wait for GPU Flush: On"
+msgstr "Laukti GPU užpildymo: Įj."
+
+msgctxt "IDS_OSD_RS_WAIT_OFF"
+msgid "Wait for GPU Flush: Off"
+msgstr "Laukti GPU užpildymo: Išj."
+
+msgctxt "IDS_OSD_RS_D3D_FULLSCREEN_ON"
+msgid "D3D Fullscreen: On"
+msgstr "D3D pilnas ekranas: Įjungta"
+
+msgctxt "IDS_OSD_RS_D3D_FULLSCREEN_OFF"
+msgid "D3D Fullscreen: Off"
+msgstr "D3D pilnas ekranas: IÅ¡jungta"
+
+msgctxt "IDS_OSD_RS_NO_DESKTOP_COMP_ON"
+msgid "Disable desktop composition: On"
+msgstr "Darbalaukio efektai: Įj."
+
+msgctxt "IDS_OSD_RS_NO_DESKTOP_COMP_OFF"
+msgid "Disable desktop composition: Off"
+msgstr "Darbalaukio efektai: IÅ¡j."
+
+msgctxt "IDS_OSD_RS_ALT_VSYNC_ON"
+msgid "Alternative VSync: On"
+msgstr "Alternatyvi VSync: Įj."
+
+msgctxt "IDS_OSD_RS_ALT_VSYNC_OFF"
+msgid "Alternative VSync: Off"
+msgstr "Alternatyvi VSync: IÅ¡j.."
+
+msgctxt "IDS_OSD_RS_RESET_DEFAULT"
+msgid "Renderer settings reset to default"
+msgstr "Renderio nustatymai pagal nutylÄ—jimÄ…"
+
+msgctxt "IDS_OSD_RS_RESET_OPTIMAL"
+msgid "Renderer settings reset to optimal"
+msgstr "Renderio optimalūs nustatymai"
+
+msgctxt "IDS_OSD_RS_D3D_FS_GUI_SUPP_ON"
+msgid "D3D Fullscreen GUI Support: On"
+msgstr "Pilnaekranis D3D su GUI palaikymu: įjungta"
+
+msgctxt "IDS_OSD_RS_D3D_FS_GUI_SUPP_OFF"
+msgid "D3D Fullscreen GUI Support: Off"
+msgstr "Pilnaekranis D3D su GUI palaikymu: išjungta"
+
+msgctxt "IDS_OSD_RS_10BIT_RBG_OUT_ON"
+msgid "10-bit RGB Output: On"
+msgstr "10-bitų RGB išėjimas: Įj."
+
+msgctxt "IDS_OSD_RS_10BIT_RBG_OUT_OFF"
+msgid "10-bit RGB Output: Off"
+msgstr "10-bitų RGB išėjimas: Išj."
+
+msgctxt "IDS_OSD_RS_10BIT_RBG_IN_ON"
+msgid "Force 10-bit RGB Input: On"
+msgstr "Forsuotas 10-bitų RGB įėjimas: įjungtas"
+
+msgctxt "IDS_OSD_RS_10BIT_RBG_IN_OFF"
+msgid "Force 10-bit RGB Input: Off"
+msgstr "Forsuotas 10-bitų RGB įėjimas: išjungtas"
+
+msgctxt "IDS_OSD_RS_FULL_FP_PROCESS_ON"
+msgid "Full Floating Point Processing: On"
+msgstr "TikslÅ«s skaiÄiavimai su slankiuoju kableliu: Ä®j."
+
+msgctxt "IDS_OSD_RS_FULL_FP_PROCESS_OFF"
+msgid "Full Floating Point Processing: Off"
+msgstr "TikslÅ«s skaiÄiavimai su slankiuoju kableliu: IÅ¡j."
+
+msgctxt "IDS_OSD_RS_HALF_FP_PROCESS_ON"
+msgid "Half Floating Point Processing: On"
+msgstr "Greiti skaiÄiavimai su slankiuoju kableliu: Ä®j."
+
+msgctxt "IDS_OSD_RS_HALF_FP_PROCESS_OFF"
+msgid "Half Floating Point Processing: Off"
+msgstr "Greiti skaiÄiavimai su slankiuoju kableliu: IÅ¡j."
+
+msgctxt "IDS_BRIGHTNESS_DEC"
+msgid "Brightness decrease"
+msgstr "Patamsinti"
+
+msgctxt "IDS_CONTRAST_INC"
+msgid "Contrast increase"
+msgstr "Padidinti kontrastÄ…"
+
+msgctxt "IDS_CONTRAST_DEC"
+msgid "Contrast decrease"
+msgstr "Sumažinti kontrastą"
+
+msgctxt "IDS_HUE_INC"
+msgid "Hue increase"
+msgstr "Padidinti spalvos tonÄ…"
+
+msgctxt "IDS_HUE_DEC"
+msgid "Hue decrease"
+msgstr "Sumažinti spalvos toną"
+
+msgctxt "IDS_SATURATION_INC"
+msgid "Saturation increase"
+msgstr "Padidinti sodrumÄ…"
+
+msgctxt "IDS_SATURATION_DEC"
+msgid "Saturation decrease"
+msgstr "Sumažinti sodrumą"
+
+msgctxt "IDS_RESET_COLOR"
+msgid "Reset color settings"
+msgstr "Atstatyti spalvos nustatymÄ…"
+
+msgctxt "IDS_USING_LATEST_STABLE"
+msgid "\nYou are already using the latest stable version."
+msgstr "\nJÅ«s jau naudojate naujausiÄ… stabiliÄ… versijÄ…."
+
+msgctxt "IDS_USING_NEWER_VERSION"
+msgid "Your current version is v%s.\n\nThe latest stable version is v%s."
+msgstr "Jūsų dabartinė versija v%s.\n\nNaujausia stabili versija yra v%s."
+
+msgctxt "IDS_NEW_UPDATE_AVAILABLE"
+msgid "MPC-HC v%s is now available. You are using v%s.\n\nDo you want to visit MPC-HC's website to download it?"
+msgstr "MPC-HC v%s yra pasiekiama. Jūs naudojate v%s.\n\nAr norite atverti MPC-HC puslapį ir atsisiųsti ją?"
+
+msgctxt "IDS_UPDATE_ERROR"
+msgid "Update server not found.\n\nPlease check your internet connection or try again later."
+msgstr "Naujinimo serveris nerastas.\n\nPrašom patikrinkite savo interneto ryšį arba pamėginkite vėliau."
+
+msgctxt "IDS_UPDATE_CLOSE"
+msgid "&Close"
+msgstr "&Uždaryti"
+
+msgctxt "IDS_OSD_ZOOM"
+msgid "Zoom: %.0lf%%"
+msgstr "Mastelis: %.0lf%%"
+
+msgctxt "IDS_OSD_ZOOM_AUTO"
+msgid "Zoom: Auto"
+msgstr "Mastelis: Automatiškai"
+
+msgctxt "IDS_CUSTOM_CHANNEL_MAPPING"
+msgid "Toggle custom channel mapping"
+msgstr "Įj./Išj. vartotojo kanalų skirstymą"
+
+msgctxt "IDS_OSD_CUSTOM_CH_MAPPING_ON"
+msgid "Custom channel mapping: On"
+msgstr "Vartotojo kanalų skirstymas: Įj."
+
+msgctxt "IDS_OSD_CUSTOM_CH_MAPPING_OFF"
+msgid "Custom channel mapping: Off"
+msgstr "Vartotojo kanalų skirstymas: Išj."
+
+msgctxt "IDS_NORMALIZE"
+msgid "Toggle normalization"
+msgstr "Įj./Išj. normalizavimą"
+
+msgctxt "IDS_OSD_NORMALIZE_ON"
+msgid "Normalization: On"
+msgstr "Normalizacija: Įj."
+
+msgctxt "IDS_OSD_NORMALIZE_OFF"
+msgid "Normalization: Off"
+msgstr "Normalizacija: IÅ¡j."
+
+msgctxt "IDS_REGAIN_VOLUME"
+msgid "Toggle regain volume"
+msgstr "Įj./Išj. garsumo atstatymą"
+
+msgctxt "IDS_OSD_REGAIN_VOLUME_ON"
+msgid "Regain volume: On"
+msgstr "Garso atstatymas: Įj."
+
+msgctxt "IDS_OSD_REGAIN_VOLUME_OFF"
+msgid "Regain volume: Off"
+msgstr "Garso atstatymas: IÅ¡j."
+
+msgctxt "IDS_SIZE_UNIT_BYTES"
+msgid "bytes"
+msgstr "baitų"
+
+msgctxt "IDS_SIZE_UNIT_K"
+msgid "KB"
+msgstr "KB"
+
+msgctxt "IDS_SIZE_UNIT_M"
+msgid "MB"
+msgstr "MB"
+
+msgctxt "IDS_SIZE_UNIT_G"
+msgid "GB"
+msgstr "GB"
+
+msgctxt "IDS_SPEED_UNIT_K"
+msgid "KB/s"
+msgstr "KB/s"
+
+msgctxt "IDS_SPEED_UNIT_M"
+msgid "MB/s"
+msgstr "MB/s"
+
+msgctxt "IDS_BDA_ERROR_CREATE_TUNER"
+msgid "Could not create the tuner."
+msgstr "Neįmanoma sukurti tiunerio."
+
+msgctxt "IDS_BDA_ERROR_CREATE_RECEIVER"
+msgid "Could not create the receiver."
+msgstr "Neįmanoma sukurti imtuvo."
+
+msgctxt "IDS_BDA_ERROR_CONNECT_NW_TUNER"
+msgid "Could not connect the network and the tuner."
+msgstr "Neįmanoma prisijungti prie tinklo ir tiunerio."
+
+msgctxt "IDS_BDA_ERROR_CONNECT_TUNER_REC"
+msgid "Could not connect the tuner and the receiver."
+msgstr "Neįmanoma prisijungti prie tiunerio ir imtuvo."
+
+msgctxt "IDS_BDA_ERROR_CONNECT_TUNER"
+msgid "Could not connect the tuner."
+msgstr "Neįmanoma prisijungti prie tiunerio."
+
+msgctxt "IDS_BDA_ERROR_DEMULTIPLEXER"
+msgid "Could not create the demultiplexer."
+msgstr "Neįmanoma sukurti demultiplekserio."
+
+msgctxt "IDS_GOTO_ERROR_PARSING_TIME"
+msgid "Error parsing the entered time!"
+msgstr "Nekorektiškai įrašytas laikas."
+
+msgctxt "IDS_GOTO_ERROR_PARSING_TEXT"
+msgid "Error parsing the entered text!"
+msgstr "Nekorektiškai įrašytas tekstas."
+
+msgctxt "IDS_GOTO_ERROR_PARSING_FPS"
+msgid "Error parsing the entered frame rate!"
+msgstr "Nekorektiškai įrašytas kadrų per sekundę greitis."
+
+msgctxt "IDS_FRAME_STEP_ERROR_RENDERER"
+msgid "Cannot frame-step, try a different video renderer."
+msgstr "Peržiūra po vieną kadrą negalima, pamėginkite kitą vaizdo renderį."
+
+msgctxt "IDS_SCREENSHOT_ERROR_REAL"
+msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the default video renderer for RealMedia.\nSelect one of the DirectX renderers for RealMedia in MPC-HC's output options and reopen the file."
+msgstr "Funkcijos „Išsaugoti paveikslėlį“ ir „Išsaugoti miniatiūras“ neveikia su sisteminiu renderiu, skirtu RealMedia.\nPasirinkite vieną iš DirectX renderių, skirtų RealMedia ir atidarykite failą iš naujo."
+
+msgctxt "IDS_SCREENSHOT_ERROR_QT"
+msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the default video renderer for QuickTime.\nSelect one of the DirectX renderers for QuickTime in MPC-HC's output options and reopen the file."
+msgstr "Funkcijos „Išsaugoti paveikslėlį“ ir „Išsaugoti miniatiūras“ neveikia su sisteminiu renderiu, skirtu QuickTime.\n Pasirinkite vieną iš DirectX renderių, skirtų QuickTime ir atidarykite failą iš naujo."
+
+msgctxt "IDS_SCREENSHOT_ERROR_SHOCKWAVE"
+msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work for Shockwave files."
+msgstr "Funkcijos „Išsaugoti paveikslėlį“ ir „Išsaugoti miniatiūras“ neveikia su Shockwave failais."
+
+msgctxt "IDS_SCREENSHOT_ERROR_OVERLAY"
+msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the Overlay Mixer video renderer.\nChange the video renderer in MPC's output options and reopen the file."
+msgstr "Funkcijos „Išsaugoti paveikslėlį“ ir „Išsaugoti miniatiūras“ neveikia su Overlay Mixer vaizdo renderiu.\nPakeiskite vaizdo renderį MPC iššvesties nustatymuose ir atidarykite failą iš naujo."
+
+msgctxt "IDS_SUBDL_DLG_CONNECT_ERROR"
+msgid "Cannot connect to the online subtitles database."
+msgstr "Neįmanoma prisijungti prie internetinės subtitrų duomenų bazės."
+
+msgctxt "IDS_MB_SHOW_EDL_EDITOR"
+msgid "Do you want to activate the EDL editor?"
+msgstr "Ar jūs norite aktyvuoti EDL redaktorių?"
+
+msgctxt "IDS_CAPTURE_ERROR"
+msgid "Capture Error"
+msgstr "Įrašymo klaida"
+
+msgctxt "IDS_CAPTURE_ERROR_VIDEO"
+msgid "video"
+msgstr "vaizdas"
+
+msgctxt "IDS_CAPTURE_ERROR_AUDIO"
+msgid "audio"
+msgstr "garsas"
+
+msgctxt "IDS_CAPTURE_ERROR_ADD_BUFFER"
+msgid "Can't add the %s buffer filter to the graph."
+msgstr "Negalima pridėti %s bufferio filtrą į grafiką."
+
+msgctxt "IDS_CAPTURE_ERROR_CONNECT_BUFF"
+msgid "Can't connect the %s buffer filter to the graph."
+msgstr "Negalima prijungti %s bufferio filtrą į grafiką."
+
+msgctxt "IDS_CAPTURE_ERROR_ADD_ENCODER"
+msgid "Can't add the %s encoder filter to the graph."
+msgstr "Neįmanoma pridėti filtrą-enkoderį %s į grafą."
+
+msgctxt "IDS_CAPTURE_ERROR_CONNECT_ENC"
+msgid "Can't connect the %s encoder filter to the graph."
+msgstr "Neįmanoma prijungti filtro-enkoderio %s prie grafo."
+
+msgctxt "IDS_CAPTURE_ERROR_COMPRESSION"
+msgid "Can't set the compression format on the %s encoder filter."
+msgstr "Nepavyksta nustatyti suglaudinimo formatÄ… filtrui-enkoderiui %s."
+
+msgctxt "IDS_CAPTURE_ERROR_MULTIPLEXER"
+msgid "Can't connect the %s stream to the multiplexer filter."
+msgstr "Neįmanoma prijungti srauto %s filtrui-multiplekseriui."
+
+msgctxt "IDS_CAPTURE_ERROR_VID_CAPT_PIN"
+msgid "No video capture pin was found."
+msgstr "Nerastas vaizdo įrašymo pinas."
+
+msgctxt "IDS_CAPTURE_ERROR_AUD_CAPT_PIN"
+msgid "No audio capture pin was found."
+msgstr "Nerastas garso įrašymo pinas."
+
+msgctxt "IDS_CAPTURE_ERROR_OUT_FILE"
+msgid "Error initializing the output file."
+msgstr "Klaida inicializuojant išvesties failą."
+
+msgctxt "IDS_CAPTURE_ERROR_AUD_OUT_FILE"
+msgid "Error initializing the audio output file."
+msgstr "Klaida inicializuojant garso išvesties failą."
+
+msgctxt "IDS_SUBRESYNC_TIME_FORMAT"
+msgid "The correct time format is [-]hh:mm:ss.ms (e.g. 01:23:45.678)."
+msgstr "Teisingas laiko formatas yra [-]hh:mm:ss.ms (pvz., 01:23:45.678)."
+
+msgctxt "IDS_EXTERNAL_FILTERS_ERROR_MT"
+msgid "This type is already in the list!"
+msgstr "Šis tipas jau yra sąraše!"
+
+msgctxt "IDS_WEBSERVER_ERROR_TEST"
+msgid "You need to apply the new settings before testing them."
+msgstr "Jūs turite panaudoti naujus nustatymus prieš jiems įsigaliojant"
+
+msgctxt "IDS_AFTERPLAYBACK_EXIT"
+msgid "After Playback: Exit"
+msgstr "Baigus groti: Uždaryti grotuvą"
+
+msgctxt "IDS_AFTERPLAYBACK_STANDBY"
+msgid "After Playback: Stand By"
+msgstr "Baigus groti: Perjungti į laukimo režimą"
+
+msgctxt "IDS_AFTERPLAYBACK_HIBERNATE"
+msgid "After Playback: Hibernate"
+msgstr "Baigus groti: Pereiti į miego režimą"
+
+msgctxt "IDS_AFTERPLAYBACK_SHUTDOWN"
+msgid "After Playback: Shutdown"
+msgstr "Baigus groti: Išjungti kompiuterį"
+
+msgctxt "IDS_AFTERPLAYBACK_LOGOFF"
+msgid "After Playback: Log Off"
+msgstr "Baigus groti: IÅ¡siregistruoti"
+
+msgctxt "IDS_AFTERPLAYBACK_LOCK"
+msgid "After Playback: Lock"
+msgstr "Baigus groti: Užrakinti kompiuterį"
+
+msgctxt "IDS_AFTERPLAYBACK_MONITOROFF"
+msgid "After Playback: Turn off the monitor"
+msgstr "Baigus groti: Išjungti monitorių"
+
+msgctxt "IDS_AFTERPLAYBACK_PLAYNEXT"
+msgid "After Playback: Play next file in the folder"
+msgstr "Baigus groti: Groti sekantį failą aplanke"
+
+msgctxt "IDS_AFTERPLAYBACK_DONOTHING"
+msgid "After Playback: Do nothing"
+msgstr "Baigus groti: Nieko nedaryti"
+
+msgctxt "IDS_OSD_BRIGHTNESS"
+msgid "Brightness: %s"
+msgstr "Å viesumas: %s"
+
+msgctxt "IDS_OSD_CONTRAST"
+msgid "Contrast: %s"
+msgstr "Kontrastas: %s"
+
+msgctxt "IDS_OSD_HUE"
+msgid "Hue: %s°"
+msgstr "Atspalvis: %s°"
+
+msgctxt "IDS_OSD_SATURATION"
+msgid "Saturation: %s"
+msgstr "Sodrumas: %s"
+
+msgctxt "IDS_OSD_RESET_COLOR"
+msgid "Color settings restored"
+msgstr "Spalvų nustatymai atstatyti"
+
+msgctxt "IDS_OSD_NO_COLORCONTROL"
+msgid "Color control is not supported"
+msgstr "Spalvų valdymas nepalaikomas"
+
+msgctxt "IDS_BRIGHTNESS_INC"
+msgid "Brightness increase"
+msgstr "Pašviesinti"
+
+msgctxt "IDS_LANG_PREF_EXAMPLE"
+msgid "Enter your preferred languages here.\nFor example, type: \"eng jap swe\""
+msgstr "Ä®veskite savo pageidaujamas kalbas Äia.\nPavyzdžiui, įraÅ¡ykite \"lit rus eng\""
+
+msgctxt "IDS_OVERRIDE_EXT_SPLITTER_CHOICE"
+msgid "External splitters can have their own language preference options thus MPC-HC default behavior is not to change their initial choice.\nEnable this option if you want MPC-HC to control external splitters."
+msgstr "Išoriniai spliteriai gali turėti savus kalbų nustatymus, todėl MPC-HC elgesys pagal nutylėjimą nepakeis jų pradinio pasirinkimo.\nĮjunkite šią funkciją, jei jūs norite, jog MPC-HC valdytų išorinius spliterius."
+
+msgctxt "IDS_NAVIGATE_BD_PLAYLISTS"
+msgid "&Blu-Ray playlists"
+msgstr "&Blu-Ray grojaraštis"
+
+msgctxt "IDS_NAVIGATE_PLAYLIST"
+msgid "&Playlist"
+msgstr "&Grojaraštis"
+
+msgctxt "IDS_NAVIGATE_CHAPTERS"
+msgid "&Chapters"
+msgstr "&Skyriai"
+
+msgctxt "IDS_NAVIGATE_TITLES"
+msgid "&Titles"
+msgstr "&Pavadinimai"
+
+msgctxt "IDS_NAVIGATE_CHANNELS"
+msgid "&Channels"
+msgstr "&Kanalai"
+
+msgctxt "IDC_FASTSEEK_CHECK"
+msgid "If \"latest keyframe\" is selected, seek to the first keyframe before the actual seek point.\nIf \"nearest keyframe\" is selected, seek to the first keyframe before or after the seek point depending on which is the closest."
+msgstr "Jei pasirinktas \"paskutinis raktinis kadras\", tai ieÅ¡komas pirmas raktinis kadras prieÅ¡ paieÅ¡kos taÅ¡kÄ….\n Jei pasirinktas \"artimiausias raktinis kadras\", tai ieÅ¡komas raktinis kadras prieÅ¡ ir po paieÅ¡kos taÅ¡ko kuris yra arÄiausiai."
+
+msgctxt "IDC_ASSOCIATE_ALL_FORMATS"
+msgid "Associate with all formats"
+msgstr "Susieti su visais formatais"
+
+msgctxt "IDC_ASSOCIATE_VIDEO_FORMATS"
+msgid "Associate with video formats only"
+msgstr "Susieti tik su vaizdo formatais"
+
+msgctxt "IDC_ASSOCIATE_AUDIO_FORMATS"
+msgid "Associate with audio formats only"
+msgstr "Susieti tik su garso formatais"
+
+msgctxt "IDC_CLEAR_ALL_ASSOCIATIONS"
+msgid "Clear all associations"
+msgstr "IÅ¡valyti visus susiejimus"
+
+msgctxt "IDS_FILTER_SETTINGS_CAPTION"
+msgid "Settings"
+msgstr "Nustatymai"
+
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.dialogs.po
index dfdf6f061..89c64d0e6 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.dialogs.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-27 03:10+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-24 14:35+0000\n"
"Last-Translator: abuyop <abuyop@gmail.com>\n"
-"Language-Team: Malay (Malaysia) (http://www.transifex.com/projects/p/mpc-hc/language/ms_MY/)\n"
+"Language-Team: Malay (Malaysia) (http://www.transifex.com/mpc-hc/mpc-hc/language/ms_MY/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -472,10 +472,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Muat-sendiri fail audio"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Guna penerap sarikata terbina-dalam"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Kawalan"
@@ -676,9 +672,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Halang pemain diminimumkan bila berskrin penuh pada monitor bukan-lalai"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Guna fitur Palang Tugas Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Guna fitur palang tugas dipertingkatkan"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1169,8 +1165,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Sarikata *"
+msgid "Subtitles"
+msgstr "Sarikata"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1185,8 +1181,8 @@ msgid "Rotation"
msgstr "Putaran"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Penapis luaran (seperti VSFilter) dapat paparkan sarikata pada semua penerap."
+msgid "Subtitle Renderer"
+msgstr "Penerap Sarikata"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1204,6 +1200,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Benarkan capaian dari localhost sahaja"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Benarkan pratonton"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Cetak maklumat nyahpepijat"
@@ -1652,6 +1652,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Lalai"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Peranti"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Mod ekslusif"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Benarkan penstriman-bit"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Pilihan"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Benarkan suapan-silang stereo (untuk fon kepala)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Pangkas:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Aras:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Nota"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Untuk mengurangkan herotan audio, adalah disarankan volum pemain berada pada 85% ketika memainkan kandungan terenkod-hilang yang kuat."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "Kualiti JPEG:"
@@ -1668,9 +1712,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Pelapor kerosakan"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Kami mohon maaf, kelihatan MPC-HC mengalami kerosakan. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Hantar laporan pepijat untuk bantu kami mengdiagnos dan membaiki masalah."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Mohon maaf, kelihatan MPC-HC mengalami kerosakan. :(\n\nUntuk membantu kami membuat diagnosis dan membaiki masalah, satu laporan pepijat akan dihantar. Anda boleh masukkan maklumat tambahan jika mahu."
+msgid "Optional information"
+msgstr "Maklumat pilihan"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1684,7 +1736,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Keterangan masalah (guna bahasa Inggeris sahaja):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Mula semula MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Tutup MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.menus.po
index 37498c43c..ab86210bc 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.menus.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
"PO-Revision-Date: 2015-05-27 03:10+0000\n"
"Last-Translator: abuyop <abuyop@gmail.com>\n"
-"Language-Team: Malay (Malaysia) (http://www.transifex.com/projects/p/mpc-hc/language/ms_MY/)\n"
+"Language-Team: Malay (Malaysia) (http://www.transifex.com/mpc-hc/mpc-hc/language/ms_MY/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.strings.po
index 286066f3e..f4a369748 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ms_MY.strings.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-27 03:20+0000\n"
-"Last-Translator: abuyop <abuyop@gmail.com>\n"
-"Language-Team: Malay (Malaysia) (http://www.transifex.com/projects/p/mpc-hc/language/ms_MY/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Malay (Malaysia) (http://www.transifex.com/mpc-hc/mpc-hc/language/ms_MY/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -325,12 +325,12 @@ msgid "On/Off"
msgstr "Hidup/Mati"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Dari FPS"
+msgid "From (FPS)"
+msgstr "Dari (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "Ke FPS"
+msgid "To (FPS)"
+msgstr "Ke (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -464,6 +464,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Main Balik::Pelorek"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Sumber"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Pelbagai"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "Maklumat Media"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Main Balik::Tangkap"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Main Balik::Tetapan Segera Tetapan"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Main Balik::Skrin Penuh"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Penapis Dalaman::Penerap Audio"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Penukar Audio"
@@ -556,30 +584,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Sarikata::Pangkalan Data"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Sumber"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Pelbagai"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "Maklumat Media"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Main Balik::Tangkap"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Main Balik::Tetapan Segera Tetapan"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Main Balik::Skrin Penuh"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Terperinci"
@@ -672,22 +676,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Permukaan video akan diperuntuk sebagai permukaan luar-skrin biasa."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "Penerap Audio MPC telah rosak, jangan guna."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Penerap Segerak"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Melaporkan pepijat"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC mengalami kerosakan tetapi binaan ini telah dikompil tanpa maklumat\nnyahpepijat. Jika anda mahu lapor pepijat ini, anda patut cuba dahulu binaan rasmi.\n\nAnda mahu lawati laman muat turun sekarang?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Permukaan biasa luar-skrin biasa"
@@ -740,9 +732,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Nol (tak mampat)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "Penerap Audio MPC-HC"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Penerap Audio Dalaman"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1392,6 +1384,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Selepas Main Balik: Tutup"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC menghadapi masalah ketika pengawalan. Dengan bantuan anda kami dapat membaiki masalah tersebut.\n\nAnda mahu laporkannya?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Masukkan nilai positif jika audio terlalu awal, nilai negatif jika ia lewat."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Pratonton buat masa ini dilumpuhkan. Anda boleh benarkannya dalam pilihan MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Pilihan ini boleh digunakan untuk membuat pratonton pada fail media dari lokasi jauh. Guna ia hanya pada rangkaian persendirian yang selamat.\n\nAnda mahu benarkan pilihan ini?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Penerap Sarikata Dalaman"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Buka Peranti"
@@ -1676,6 +1688,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Tunjuk Nama Fail"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Main DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Main BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: Papar Statistik Penerap"
@@ -1957,20 +1977,20 @@ msgid "Options"
msgstr "Pilihan"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Audio Berikutnya"
+msgid "Next Audio Track"
+msgstr "Trek Audio Berikutnya"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Audio Terdahulu"
+msgid "Prev Audio Track"
+msgstr "Trek Audio Terdahulu"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Sarikata Berikutnya"
+msgid "Next Subtitle Track"
+msgstr "Trek Sarikata Berikutnya"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Sarikata Terdahulu"
+msgid "Prev Subtitle Track"
+msgstr "Trek Sarikata Terdahulu"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1980,22 +2000,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Muat Semula Sarikata"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Audio Berikutnya (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Audio Terdahulu (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Sarikata Berikutnya (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Sarikata Terdahulu (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Sudut Berikutnya (DVD)"
@@ -2005,20 +2009,20 @@ msgid "Prev Angle (DVD)"
msgstr "Sudut Terdahulu (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Audio Berikutnya (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Trek Audio Berikutnya (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Audio Terdahulu (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Trek Audio Terdahulu (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Sarikata Berikutnya (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Trek Sarikata Berikutnya (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Sarikata Terdahulu (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "Trek Sarikata Terdahulu (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2384,14 +2388,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Semasa"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC ditamatkan tanpa jangka. Untuk membantu kami mengatasi masalah ini, sila hantar fail \"%s\" ini ke penjejak pepijat kami.\n\nAnda mahu buka folder yang mengandungi fail longgok mini dan lawati penjejak pepeijat sekarang?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Gagal cipta fail longgok ke \"%s\" (ralat %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Pilih Direktori"
@@ -2565,8 +2561,8 @@ msgid "Volume boost Max"
msgstr "Galak volum Maks"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Penggunaan: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tFail atau direktori utama akan dimuatkan (kad liar\n\t\tdibenarkan, \"-\" melibatkan input piawai)\n/dub \"dubname\"\tMuat satu fail audio tambahan\n/dubdelay \"file\"\tMuat fail audio tambahan yang dianjak denga XXms (jika\n\t\tfail mengandungi \"...DELAY XXms...\")\n/d3dfs\t\tMula menerap dalam mod skrin penuh D3D\n/sub \"subname\"\tMuat fail sarikata tambahan\n/filter \"filtername\"\tMuat penapis DirectShow dari pustaka pautan dinamik\n\t\t(kad liar dibenarkan)\n/dvd\t\tJalan dalam mod dvd, \"pathname\" bermaksud folder dvd\n\t\t(pilihan)\n/dvdpos T#C\tMula main balik pada tajuk T, bab C\n/dvdpos T#hh:mm\tMula main balik pada tajuk T, kedudukan hh:mm:ss\n/cd\t\tMuat semua trek cd audio atau (s)vcd,\n\t\t\"pathname\" bermaksud laluan pemacu (pilihan)\n/device\t\tBuka peranti video lalai\n/open\t\tBuka fail, jangan mula main balik secara automatik\n/play\t\tMula memainkan fail sebaik sahaja pemain\n\t\tdilancarkan\n/close\t\tTutup pemain selepas main balik (hanya berfungsi\n\t\tbila digunakan dengan /play)\n/shutdown\tMatikan sistem pengoperasian selepas main balik\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tMula dalam mod skrin-penuh\n/minimized\tMula dalam mod diminimumkan\n/new\t\tGuna kejadian baharu pemain\n/add\t\tTambah \"pathname\" ke senarai main, boleh digabung\n\t\tdengan /open dan /play\n/randomize\tRandomize the playlist\n/regvid\t\tCipta perkaitan fail untuk fail video\n/regaud\t\tCipta perkaitan fail untuk fail audio\n/regpl\t\tCipta perkaitan fail untuk fail senarai main\n/regall\t\tCipta perkaitan fail untuk semua jenis fail disokong\n/unregall\t\tBuang semua perkaitan fail\n/start ms\t\tMula bermain pada \"ms\" (= milisaat)\n/startpos hh:mm:ss\tMula bermain pada kedudukan hh:mm:ss\n/fixedsize w,h\tTetakan saiz tetingkap tetap\n/monitor N\tMula pemain pada monitor N, dimana N bermula dari 1\n/audiorenderer N\tMula menggunakan penerap audio N, dimana N bermula dari 1\n\t\t(rujuk tetapan \"Output\")\n/shaderpreset \"Pr\"\tMula menggunakan praset pelorek \"Pr\"\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tPulih tetapan lalai\n/help /h /?\tTunjuk bantuan mengenai suis baris perintah\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Penggunaan: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tFail atau direktori utama akan dimuatkan (kad liar\n\t\tdibenarkan, \"-\" melibatkan input piawai)\n/dub \"dubname\"\tMuat satu fail audio tambahan\n/dubdelay \"file\"\tMuat fail audio tambahan yang dianjak denga XXms (jika\n\t\tfail mengandungi \"...DELAY XXms...\")\n/d3dfs\t\tMula menerap dalam mod skrin penuh D3D\n/sub \"subname\"\tMuat fail sarikata tambahan\n/filter \"filtername\"\tMuat penapis DirectShow dari pustaka pautan dinamik\n\t\t(kad liar dibenarkan)\n/dvd\t\tJalan dalam mod dvd, \"pathname\" bermaksud folder dvd\n\t\t(pilihan)\n/dvdpos T#C\tMula main balik pada tajuk T, bab C\n/dvdpos T#hh:mm\tMula main balik pada tajuk T, kedudukan hh:mm:ss\n/cd\t\tMuat semua trek cd audio atau (s)vcd,\n\t\t\"pathname\" bermaksud laluan pemacu (pilihan)\n/device\t\tBuka peranti video lalai\n/open\t\tBuka fail, jangan mula main balik secara automatik\n/play\t\tMula memainkan fail sebaik sahaja pemain\n\t\tdilancarkan\n/close\t\tTutup pemain selepas main balik (hanya berfungsi\n\t\tbila digunakan dengan /play)\n/shutdown\tMatikan sistem pengoperasian selepas main balik\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tMula dalam mod skrin-penuh\n/minimized\tMula dalam mod diminimumkan\n/new\t\tGuna kejadian baharu pemain\n/add\t\tTambah \"pathname\" ke senarai main, boleh digabung\n\t\tdengan /open dan /play\n/randomize\tRandomize the playlist\n/regvid\t\tCipta perkaitan fail untuk fail video\n/regaud\t\tCipta perkaitan fail untuk fail audio\n/regpl\t\tCipta perkaitan fail untuk fail senarai main\n/regall\t\tCipta perkaitan fail untuk semua jenis fail disokong\n/unregall\t\tBuang semua perkaitan fail\n/start ms\t\tMula bermain pada \"ms\" (= milisaat)\n/startpos hh:mm:ss\tMula bermain pada kedudukan hh:mm:ss\n/fixedsize w,h\tTetakan saiz tetingkap tetap\n/monitor N\tMula pemain pada monitor N, dimana N bermula dari 1\n/audiorenderer N\tMula menggunakan penerap audio N, dimana N bermula dari 1\n\t\t(rujuk tetapan \"Output\")\n/shaderpreset \"Pr\"\tMula menggunakan praset pelorek \"Pr\"\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tPulih tetapan lalai\n/help /h /?\tTunjuk bantuan mengenai suis baris perintah\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3040,18 +3036,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Nisbah Bidang"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Guna WASAPI (mula semula main balik)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Senyap bila dimaju pantas"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Peranti Bunyi:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: Hidup"
@@ -3608,3 +3592,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Tetapan"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.nl.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.nl.dialogs.po
index a7ee1e965..707eb8978 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.nl.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.nl.dialogs.po
@@ -2,6 +2,7 @@
# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
+# B512, 2015
# Dennis Gerritsen <frostflame@hotmail.com>, 2014
# Devrim, 2013-2015
# DennisW, 2014
@@ -9,10 +10,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-03-16 18:09:30+0000\n"
-"PO-Revision-Date: 2015-04-13 17:13+0000\n"
-"Last-Translator: Devrim\n"
-"Language-Team: Dutch (http://www.transifex.com/projects/p/mpc-hc/language/nl/)\n"
+"POT-Creation-Date: 2015-07-12 21:37:08+0000\n"
+"PO-Revision-Date: 2015-07-12 22:37+0000\n"
+"Last-Translator: Underground78\n"
+"Language-Team: Dutch (http://www.transifex.com/p/mpc-hc/language/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -475,10 +476,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Geluidsbestanden autom. laden"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Gebruik de ingebouwde ondertiteling renderer"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Bediening"
@@ -679,9 +676,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Verhinder minimalizeren bij volledig scherm op niet-standaard monitor"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Gebruik mogelijkheden van Windows 7 Taakbalk "
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1172,8 +1169,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Ondertitels *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1188,8 +1185,8 @@ msgid "Rotation"
msgstr "Rotatie"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Externe filters (zoals VSFilter) mogen ondertiteling weergeven op alle renderers."
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1207,6 +1204,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Geef alleen toegang via localhost"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr ""
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Print debug informatie"
@@ -1655,6 +1656,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Standaard"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG kwaliteit:"
@@ -1671,23 +1716,35 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr ""
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
+msgid "Optional information"
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
-msgstr ""
+msgstr "Email:"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC3"
msgid "Your email address is optional and will only be used if the developers need to contact you for more information."
-msgstr ""
+msgstr "Een e-mailadres is optioneel en zal enkel worden gebruikt als de ontwikkelaars contact met u moeten opnemen voor meer informatie."
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
+msgstr "Beschrijf het probleem (in het Engels)"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
msgstr ""
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
msgstr ""
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.nl.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.nl.menus.po
index 2ac8532d6..7e5ac84bd 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.nl.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.nl.menus.po
@@ -2,18 +2,21 @@
# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
+# B512, 2015
# Dennis Gerritsen <frostflame@hotmail.com>, 2014
# Devrim, 2013-2015
# DennisW, 2014
+# hendrickbert <hendrickbert@gmail.com>, 2015
# kasper93, 2013
+# Marco Brohet <therbom@gmail.com>, 2015
# rjongejan <ruben.jongejan@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-04-06 16:31:55+0000\n"
-"PO-Revision-Date: 2015-04-13 17:22+0000\n"
-"Last-Translator: Devrim\n"
-"Language-Team: Dutch (http://www.transifex.com/projects/p/mpc-hc/language/nl/)\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-07-14 19:38+0000\n"
+"Last-Translator: Marco Brohet <therbom@gmail.com>\n"
+"Language-Team: Dutch (http://www.transifex.com/p/mpc-hc/language/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -26,7 +29,7 @@ msgstr "&Bestand"
msgctxt "ID_FILE_OPENQUICK"
msgid "&Quick Open File..."
-msgstr "Snel &Bestand openen..."
+msgstr "Snel &bestand openen..."
msgctxt "ID_FILE_OPENMEDIA"
msgid "&Open File..."
@@ -50,7 +53,7 @@ msgstr "Schijf openen"
msgctxt "ID_RECENT_FILES"
msgid "Recent &Files"
-msgstr "&Recentelijke Bestanden"
+msgstr "&Recente bestanden"
msgctxt "ID_FILE_CLOSE_AND_RESTORE"
msgid "&Close"
@@ -78,7 +81,7 @@ msgstr "Ondertiteling op&slaan..."
msgctxt "POPUP"
msgid "Subtitle Data&base"
-msgstr "Ondertitelings Database"
+msgstr "Ondertitelingsdatabase"
msgctxt "ID_FILE_ISDB_SEARCH"
msgid "&Search..."
@@ -106,7 +109,7 @@ msgstr "Bee&ld"
msgctxt "ID_VIEW_CAPTIONMENU"
msgid "Caption&&Menu"
-msgstr "Titelbalk && Menu"
+msgstr "Titelbalk && menu"
msgctxt "ID_VIEW_SEEKER"
msgid "See&k Bar"
@@ -158,7 +161,7 @@ msgstr "&Minimum"
msgctxt "ID_VIEW_PRESETS_COMPACT"
msgid "&Compact"
-msgstr "&Compakt"
+msgstr "&Compact"
msgctxt "ID_VIEW_PRESETS_NORMAL"
msgid "&Normal"
@@ -166,7 +169,7 @@ msgstr "&Standaard"
msgctxt "ID_VIEW_FULLSCREEN"
msgid "F&ull Screen"
-msgstr "&Volledig Scherm"
+msgstr "&Volledig scherm"
msgctxt "POPUP"
msgid "&Zoom"
@@ -186,31 +189,31 @@ msgstr "&200%"
msgctxt "ID_VIEW_ZOOM_AUTOFIT"
msgid "Auto &Fit"
-msgstr "Autom. passend"
+msgstr "Auto-fit"
msgctxt "ID_VIEW_ZOOM_AUTOFIT_LARGER"
msgid "Auto Fit (&Larger Only)"
-msgstr "Auto Fit (Larger Only)"
+msgstr "Auto-fit (a&lleen groot)"
msgctxt "POPUP"
msgid "R&enderer Settings"
-msgstr "Renderer Instellingen"
+msgstr "Renderinstellingen"
msgctxt "ID_VIEW_TEARING_TEST"
msgid "&Tearing Test"
-msgstr "&Tearing Test"
+msgstr "&Tearingtest"
msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
msgid "&Display Statistics"
-msgstr ""
+msgstr "&Statistieken weergeven"
msgctxt "ID_VIEW_OSD_DISPLAY_TIME"
msgid "Display Current T&ime"
-msgstr ""
+msgstr "Hu&idige tijd weergeven"
msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
msgid "Show &File Name"
-msgstr ""
+msgstr "&Bestandsnaam weergeven"
msgctxt "POPUP"
msgid "&Output Range"
@@ -230,51 +233,51 @@ msgstr "Presentatie"
msgctxt "ID_VIEW_D3DFULLSCREEN"
msgid "D3D Fullscreen &Mode"
-msgstr "D3D Volledig Scherm"
+msgstr "D3D - volledig scherm"
msgctxt "ID_VIEW_FULLSCREENGUISUPPORT"
msgid "D3D Fullscreen &GUI Support"
-msgstr "D3D Volledig Scherm met GUI"
+msgstr "D3D - volledig scherm met GUI"
msgctxt "ID_VIEW_HIGHCOLORRESOLUTION"
msgid "10-bit &RGB Output"
-msgstr "10-bit RGB Output"
+msgstr "10-bits RGB-uitvoer"
msgctxt "ID_VIEW_FORCEINPUTHIGHCOLORRESOLUTION"
msgid "Force 10-bit RGB &Input"
-msgstr "Force 10-bit RGB Input"
+msgstr "10-bits RGB-&invoer forceren"
msgctxt "ID_VIEW_FULLFLOATINGPOINTPROCESSING"
msgid "&Full Floating Point Processing"
-msgstr "Full Floating Point Processing"
+msgstr "Volledige floating point-verwerking"
msgctxt "ID_VIEW_HALFFLOATINGPOINTPROCESSING"
msgid "&Half Floating Point Processing"
-msgstr "Half Floating Point Processing"
+msgstr "Halve floating point-verwerking"
msgctxt "ID_VIEW_DISABLEDESKTOPCOMPOSITION"
msgid "Disable desktop composition (&Aero)"
-msgstr "Deactiveer Aero tijdens afspelen"
+msgstr "Aero uitschekelen tijdens afspelen"
msgctxt "ID_VIEW_ENABLEFRAMETIMECORRECTION"
msgid "Enable Frame Time &Correction"
-msgstr "Activeer Frametime Correctie"
+msgstr "Frametijdcorrectie inschakelen"
msgctxt "POPUP"
msgid "&Color Management"
-msgstr "Color Management"
+msgstr "Kleurbeheer"
msgctxt "ID_VIEW_CM_ENABLE"
msgid "&Enable"
-msgstr "Activeren"
+msgstr "Inschakelen"
msgctxt "POPUP"
msgid "&Input Type"
-msgstr "Input Type"
+msgstr "Invoertype"
msgctxt "ID_VIEW_CM_INPUT_AUTO"
msgid "&Auto-Detect"
-msgstr "Auto-Detect"
+msgstr "Automatisch"
msgctxt "ID_VIEW_CM_INPUT_HDTV"
msgid "&HDTV"
@@ -282,11 +285,11 @@ msgstr "HDTV"
msgctxt "ID_VIEW_CM_INPUT_SDTV_NTSC"
msgid "SDTV &NTSC"
-msgstr "SDTV NTSC"
+msgstr "SDTV (NTSC)"
msgctxt "ID_VIEW_CM_INPUT_SDTV_PAL"
msgid "SDTV &PAL"
-msgstr "SDTV PAL"
+msgstr "SDTV (PAL)"
msgctxt "POPUP"
msgid "Ambient &Light"
@@ -318,7 +321,7 @@ msgstr "Relative Colorimetric"
msgctxt "ID_VIEW_CM_INTENT_SATURATION"
msgid "&Saturation"
-msgstr "Saturation"
+msgstr "Verzadiging"
msgctxt "ID_VIEW_CM_INTENT_ABSOLUTECOLORIMETRIC"
msgid "&Absolute Colorimetric"
@@ -330,11 +333,11 @@ msgstr "VSync"
msgctxt "ID_VIEW_VSYNC"
msgid "&VSync"
-msgstr "&Activeer VSync"
+msgstr "VSync &inschakelen"
msgctxt "ID_VIEW_VSYNCACCURATE"
msgid "&Accurate VSync"
-msgstr "Accurate VSync"
+msgstr "Precieze VSync"
msgctxt "ID_VIEW_ALTERNATIVEVSYNC"
msgid "A&lternative VSync"
@@ -342,15 +345,15 @@ msgstr "Alternatieve VSync"
msgctxt "ID_VIEW_VSYNCOFFSET_DECREASE"
msgid "&Decrease VSync Offset"
-msgstr "Verhoog VSync offset"
+msgstr "VSync-offset ver&lagen"
msgctxt "ID_VIEW_VSYNCOFFSET_INCREASE"
msgid "&Increase VSync Offset"
-msgstr "Verlaag VSync offset"
+msgstr "VSync-offset ver&hogen"
msgctxt "POPUP"
msgid "&GPU Control"
-msgstr "GPU Controle"
+msgstr "GPU-beheer"
msgctxt "ID_VIEW_FLUSHGPU_BEFOREVSYNC"
msgid "Flush GPU &before VSync"
@@ -358,23 +361,23 @@ msgstr "GPU legen voor VSync"
msgctxt "ID_VIEW_FLUSHGPU_AFTERPRESENT"
msgid "Flush GPU &after Present"
-msgstr "GPU legen na afspelen"
+msgstr "GPU wo na afspelen"
msgctxt "ID_VIEW_FLUSHGPU_WAIT"
msgid "&Wait for flushes"
-msgstr "Wacht tot GPU leeg"
+msgstr "Wacht tot GPU leeg is"
msgctxt "POPUP"
msgid "R&eset"
-msgstr "Reset"
+msgstr "Resetten"
msgctxt "ID_VIEW_RESET_DEFAULT"
msgid "Reset to &default renderer settings"
-msgstr "Instellingen van Renderer op &Standaard"
+msgstr "Standaardinstellingen renderer herstellen"
msgctxt "ID_VIEW_RESET_OPTIMAL"
msgid "Reset to &optimal renderer settings"
-msgstr "Instellingen van Renderer op &Optimaal"
+msgstr "Optimale renderinstellingen herstellen"
msgctxt "POPUP"
msgid "Video &Frame"
@@ -446,11 +449,11 @@ msgstr "185:100"
msgctxt "ID_VIEW_VF_COMPMONDESKARDIFF"
msgid "&Correct Monitor/Desktop AR Diff"
-msgstr "Scherm/Bureaublad AR-afwijking corrigeren"
+msgstr "AR-afwijking scherm/bureaublad corrigeren"
msgctxt "POPUP"
msgid "Pa&n&&Scan"
-msgstr "Pan && S&can"
+msgstr "Pan && s&can"
msgctxt "ID_VIEW_INCSIZE"
msgid "&Increase Size"
@@ -498,11 +501,11 @@ msgstr "&Centreren"
msgctxt "ID_VIEW_RESET"
msgid "Re&set"
-msgstr "Reset"
+msgstr "Resetten"
msgctxt "POPUP"
msgid "On &Top"
-msgstr "Op Voorgrond"
+msgstr "Op voorgrond"
msgctxt "ID_ONTOP_DEFAULT"
msgid "&Default"
@@ -530,7 +533,7 @@ msgstr "&Afspelen"
msgctxt "ID_PLAY_PLAYPAUSE"
msgid "&Play/Pause"
-msgstr "Afspelen/&Pauze"
+msgstr "Afspelen/&pauze"
msgctxt "ID_PLAY_STOP"
msgid "&Stop"
@@ -558,7 +561,7 @@ msgstr "&Filters"
msgctxt "ID_SHADERS"
msgid "S&haders"
-msgstr "Pixel S&hader"
+msgstr "Pixel s&hader"
msgctxt "ID_AUDIOS"
msgid "&Audio Track"
@@ -594,15 +597,15 @@ msgstr "&Na weergave"
msgctxt "ID_AFTERPLAYBACK_DONOTHING"
msgid "Do no&thing"
-msgstr ""
+msgstr "Niets doen"
msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
msgid "Play &next file in the folder"
-msgstr "Speel &volgend bestand af in map"
+msgstr "&Volgend bestand in map afspelen"
msgctxt "ID_AFTERPLAYBACK_MONITOROFF"
msgid "Turn off the &monitor"
-msgstr "Schakel de &monitor uit"
+msgstr "&Scherm uitschakelen"
msgctxt "ID_AFTERPLAYBACK_EXIT"
msgid "&Exit"
@@ -618,7 +621,7 @@ msgstr "Slaapstand"
msgctxt "ID_AFTERPLAYBACK_SHUTDOWN"
msgid "Shut&down"
-msgstr "Windows Afsluiten"
+msgstr "Windows afsluiten"
msgctxt "ID_AFTERPLAYBACK_LOGOFF"
msgid "Log &Off"
@@ -626,7 +629,7 @@ msgstr "Afmelden"
msgctxt "ID_AFTERPLAYBACK_LOCK"
msgid "&Lock"
-msgstr "Lock"
+msgstr "Vergrendelen"
msgctxt "POPUP"
msgid "&Navigate"
@@ -646,27 +649,27 @@ msgstr "&Ga naar..."
msgctxt "ID_NAVIGATE_TITLEMENU"
msgid "&Title Menu"
-msgstr "&Titel Menu"
+msgstr "&Titelmenu"
msgctxt "ID_NAVIGATE_ROOTMENU"
msgid "&Root Menu"
-msgstr "&Hoofd Menu"
+msgstr "&Hoofdmenu"
msgctxt "ID_NAVIGATE_SUBPICTUREMENU"
msgid "&Subtitle Menu"
-msgstr "Ondertitelings Menu"
+msgstr "Ondertitelingsmenu"
msgctxt "ID_NAVIGATE_AUDIOMENU"
msgid "&Audio Menu"
-msgstr "Audio Menu"
+msgstr "Audiomenu"
msgctxt "ID_NAVIGATE_ANGLEMENU"
msgid "An&gle Menu"
-msgstr "Camerahoek Menu"
+msgstr "Camerahoekmenu"
msgctxt "ID_NAVIGATE_CHAPTERMENU"
msgid "&Chapter Menu"
-msgstr "Hoofdstuk Menu"
+msgstr "Hoofdstukmenu"
msgctxt "ID_FAVORITES"
msgid "F&avorites"
@@ -682,21 +685,21 @@ msgstr "&Homepage"
msgctxt "ID_HELP_CHECKFORUPDATE"
msgid "Check for &updates"
-msgstr "Op updates &controleren"
+msgstr "Controleren op &updates"
msgctxt "ID_HELP_SHOWCOMMANDLINESWITCHES"
msgid "&Command Line Switches"
-msgstr "&Opdrachtprompt parameters"
+msgstr "&Opdrachtpromptparameters"
msgctxt "ID_HELP_TOOLBARIMAGES"
msgid "Download &Toolbar Images"
-msgstr "Download Toolbar Images"
+msgstr "&Werkbalkafbeeldingen downloaden"
msgctxt "ID_HELP_DONATE"
msgid "&Donate"
-msgstr "Doneer"
+msgstr "Doneren"
msgctxt "ID_HELP_ABOUT"
msgid "&About..."
-msgstr "&Info..."
+msgstr "&Over"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.nl.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.nl.strings.po
index c1a588eae..cc9dad767 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.nl.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.nl.strings.po
@@ -6,17 +6,19 @@
# Dennis Gerritsen <frostflame@hotmail.com>, 2014
# dragnadh <dragnadh@gmail.com>, 2015
# DennisW, 2014
+# hendrickbert <hendrickbert@gmail.com>, 2015
# B512, 2015
+# Marco Brohet <therbom@gmail.com>, 2015
# Peter Pul, 2015
# rjongejan <ruben.jongejan@gmail.com>, 2014
# Tom <tom@boksma.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-04-09 21:29:25+0000\n"
-"PO-Revision-Date: 2015-04-14 08:02+0000\n"
-"Last-Translator: Peter Pul\n"
-"Language-Team: Dutch (http://www.transifex.com/projects/p/mpc-hc/language/nl/)\n"
+"POT-Creation-Date: 2015-07-12 21:27:04+0000\n"
+"PO-Revision-Date: 2015-07-14 19:30+0000\n"
+"Last-Translator: Marco Brohet <therbom@gmail.com>\n"
+"Language-Team: Dutch (http://www.transifex.com/p/mpc-hc/language/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -332,12 +334,12 @@ msgid "On/Off"
msgstr "Aan/Uit"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Van FPS"
+msgid "From (FPS)"
+msgstr "Van (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "Tot FPS"
+msgid "To (FPS)"
+msgstr "Tot (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -471,6 +473,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Weergave::Shaders"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Bronnen"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Overige"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Weergave::Opname"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Weergave::Sync Renderer Settings"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Weergave::Volledig Scherm"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Audio-omschakelaar"
@@ -563,30 +593,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Ondertiteling::Database"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Bronnen"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Overige"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Weergave::Opname"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Weergave::Sync Renderer Settings"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Weergave::Volledig Scherm"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Details"
@@ -679,22 +685,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Video oppervlak is een normaal offscreen oppervlak."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Audio renderer is defect, niet gebruiken."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Raporteer een bug"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC is gecrasht, maar deze build is gecompileerd zonder debug informatie.\nAls U deze bug wilt rapporteren, raden we aan om eerst een officiële build te proberen.\n\nWilt U de download pagina nu bezoeken?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr ""
@@ -747,9 +741,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Ontbrekend (ongecomprimeerd)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr ""
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -817,11 +811,11 @@ msgstr "Verbeter prestatie ten koste van de compatibiliteit van de renderer."
msgctxt "IDC_FULLSCREEN_MONITOR_CHECK"
msgid "Reduces tearing but prevents the toolbar from being shown."
-msgstr ""
+msgstr "Verminderd scheuring maar blokkeert de werkbalk"
msgctxt "IDC_DSVMR9ALTERNATIVEVSYNC"
msgid "Reduces tearing by bypassing the default VSync built into D3D."
-msgstr ""
+msgstr "Verminderd scheuring door het omzeilen van de standaard VSync gebruikt in D3D."
msgctxt "IDS_SRC_VTS"
msgid "Open VTS_xx_0.ifo to load VTS_xx_x.vob files in one piece"
@@ -829,7 +823,7 @@ msgstr "Opent VTS_xx_0.ifo om VTS_xx_x.vob-bestanden in een geheel te laden"
msgctxt "IDS_SRC_RFS"
msgid "Based on RARFileSource, doesn't support compressed files"
-msgstr ""
+msgstr "Gebaseerd op RARFILESource, ondersteund geen gecompenseerde bestanden. "
msgctxt "IDS_INTERNAL_LAVF"
msgid "Uses LAV Filters"
@@ -1297,7 +1291,7 @@ msgstr ""
msgctxt "IDS_PPAGEADVANCED_FILE_POS_AUDIO"
msgid "Remember file position also for audio files."
-msgstr ""
+msgstr "Onthoud de bestand positie ook voor audio bestanden."
msgctxt "IDS_AFTER_PLAYBACK_DO_NOTHING"
msgid "Do Nothing"
@@ -1385,11 +1379,11 @@ msgstr ""
msgctxt "IDS_TIMER_REMAINING_TIME"
msgid "Remaining time"
-msgstr ""
+msgstr "Resterende Tijd"
msgctxt "IDS_TIMER_HIGH_PRECISION"
msgid "High precision"
-msgstr ""
+msgstr "Hoge precisie"
msgctxt "IDS_AFTERPLAYBACK_REWIND"
msgid "After Playback: Rewind current file"
@@ -1399,6 +1393,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr ""
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr ""
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Apparaat openen"
@@ -1473,7 +1487,7 @@ msgstr "Sport"
msgctxt "IDS_CONTENT_CHILDREN_YOUTH_PROG"
msgid "Children's/Youth programmes"
-msgstr ""
+msgstr "Kinder-/jeugdprogramma's"
msgctxt "IDS_CONTENT_MUSIC_BALLET_DANCE"
msgid "Music/Ballet/Dance"
@@ -1489,7 +1503,7 @@ msgstr "Sociaal/Politiek/Economie"
msgctxt "IDS_CONTENT_LEISURE"
msgid "Leisure hobbies"
-msgstr ""
+msgstr "Ontspanningshobby's"
msgctxt "IDS_FILE_RECYCLE"
msgid "Move to Recycle Bin"
@@ -1683,13 +1697,21 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr ""
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "DVD afspelen"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "BD afspelen"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
-msgstr ""
+msgstr "OSD: renderstatistieken weergeven"
msgctxt "IDS_OSD_RESET_RENDERER_STATS"
msgid "OSD: Reset Renderer Statistics"
-msgstr ""
+msgstr "OSD: renderstatistieken resetten"
msgctxt "IDD_PPAGESUBMISC"
msgid "Subtitles::Misc"
@@ -1785,7 +1807,7 @@ msgstr "Ondertiteling downloaden, even geduld."
msgctxt "IDS_SUBDL_DLG_PARSING"
msgid "Parsing list..."
-msgstr ""
+msgstr "Lijst verwerken..."
msgctxt "IDS_SUBDL_DLG_NOT_FOUND"
msgid "No subtitles found."
@@ -1797,7 +1819,7 @@ msgstr "%d ondertitel(s) beschikbaar."
msgctxt "IDS_UPDATE_CONFIG_AUTO_CHECK"
msgid "Do you want to check periodically for MPC-HC updates?\n\nThis feature can be disabled later from the Miscellaneous options page."
-msgstr ""
+msgstr "Wilt u automatisch controleren op updates voor MPC-HC?\n\nDit kan later worden uitgeschakeld in de opties bij "
msgctxt "IDS_ZOOM_50"
msgid "50%"
@@ -1949,11 +1971,11 @@ msgstr "Boss toets"
msgctxt "IDS_MPLAYERC_77"
msgid "Player Menu"
-msgstr ""
+msgstr "Speler Menu"
msgctxt "IDS_MPLAYERC_78"
msgid "Player Menu (full)"
-msgstr ""
+msgstr "Speler Menu (Volledig)"
msgctxt "IDS_AG_FILTERS_MENU"
msgid "Filters Menu"
@@ -1964,20 +1986,20 @@ msgid "Options"
msgstr "Opties"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Volgende Audio"
+msgid "Next Audio Track"
+msgstr "Volgend geluidsspoor"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Vorige Audio"
+msgid "Prev Audio Track"
+msgstr "Vorig geluidsspoor"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Volgende Ondertiteling"
+msgid "Next Subtitle Track"
+msgstr "Volgend ondertitelingsspoor"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Vorige Ondertiteling"
+msgid "Prev Subtitle Track"
+msgstr "Vorig ondertitelingsspoor"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1987,22 +2009,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Herlaad Ondertiteling"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Volgende Audio (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Vorige Audio (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Volgende Ondertiteling (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Vorige Ondertiteling (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Volgende Camerahoek (DVD)"
@@ -2012,20 +2018,20 @@ msgid "Prev Angle (DVD)"
msgstr "Vorige Camerahoek (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Volgende Audio (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Vorige Audio (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Volgende Ondertiteling (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Vorige Ondertiteling (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2317,7 +2323,7 @@ msgstr ""
msgctxt "IDS_CANNOT_LOAD_SUB"
msgid "To load subtitles you have to change the video renderer type and reopen the file.\n- DirectShow: VMR-7/VMR-9 (renderless), EVR (CP), Sync, madVR or Haali\n- RealMedia: Special renderer for RealMedia, or open it through DirectShow\n- QuickTime: DX7 or DX9 renderer for QuickTime\n- ShockWave: n/a"
-msgstr ""
+msgstr "Om de ondertiteling te laden verander de video render type en heropen het bestand.\n- DirectShow: VMR-7/VMR-9 (renderless), EVR (CP), Sync, madVR of Haali\n- RealMedia: Special renderer for RealMedia, of open het met DirectShow\n- QuickTime: DX7 or DX9 renderer for QuickTime\n- ShockWave: n/a"
msgctxt "IDS_SUBTITLE_FILES_FILTER"
msgid "Subtitle files"
@@ -2391,14 +2397,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Huidig"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr ""
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Dumpbestand '%s' kon niet gemaakt worden (fout %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Map kiezen"
@@ -2525,7 +2523,7 @@ msgstr " (Regisseur Commentaar 2)"
msgctxt "IDS_DVD_SUBTITLES_ENABLE"
msgid "Enable DVD subtitles"
-msgstr ""
+msgstr "DVD-ondertiteling inschakelen"
msgctxt "IDS_AG_ANGLE"
msgid "Angle %u"
@@ -2572,8 +2570,8 @@ msgid "Volume boost Max"
msgstr ""
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Gebruik: mpc-hc.exe \"padnaam\" [parameters]\n\n\"padnaam\"\tHet te laden bestand of map (wildcards\n\t\ttoegestaan, \"-\" denotes standard input)\n/dub \"dubnaam\"\tLaad nog een geluidsbestand\n/dubdelay \"best\"\tLaad nog een geluidsbestand met een\n\t\tverschuiving van XXms\n\t\t (als bestand \"..vertraging XXms..\" heeft)\n/d3dfs\t\tStart renderen in D3D Volledig Scherm modus\n/sub \"ondertitel\"\tLaad nog een ondertitelingsbestand\n/filter \"filternaam\"\tLaad DirectShow filters van een DLL\n\t\t(wildcards toegestaan)\n/dvd\t\tStart in DVD-modus, \"padnaam\" betekent de DVD\n\t\tmap (hoeft niet)\n/dvdpos T#H\tStart afspelen bij titel T, hoofdstuk H\n/dvdpos T#uu:mm\tStart afspelen bij titel T, positie uu:mm:ss\n/cd\t\tLaad alle nummers van een audio cd of (s)vcd\n\t\t\"padnaam\" betekent het stationspad (hoeft niet)\n/device\t\tOpen the default video device\n/open\t\tOpen het bestand zonder automatisch af te spelen\n/play\t\tDirect afspelen, wanneer de speler wordt geopend\n/close\t\tSluit de speler af na afspelen (werkt alleen samen \n\t\tmet /play)\n/shutdown\tWindows afsluiten na afspelen\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in Volldig Scherm modus\n/minimized\tStart geminimaliseerd\n/new\t\tEen nieuwe speler openen\n/add\t\tVoegt \"padnaam\" aan de afspeellijst toe\n\t\tKan gecombineerd worden met /open en /play\n/randomize\tRandomize the playlist\n/regvid\t\tMaak bestandskoppelingen voor videobestanden\n/regaud\t\tMaak bestandskoppelingen voor\n\t\tgeluidsbestanden\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tVerwijder alle bestandskoppelingen\n/start ms\t\tStart afspelen op \"ms\" (= milliseconden)\n/startpos uu:mm:ss\tStart afspelen op positie uu:mm:ss\n/fixedsize B,H\tZet venstergrootte op BxH\n/monitor N\tStart op schermmonitor N (N start bij 1)\n/audiorenderer N\tStart met audiorenderer N (N start bij 1)\n\t\t(zie \"Uitgangs\" instellingen)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tToon help over opdrachtprompt parameters\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Gebruik: mpc-hc.exe \"padnaam\" [parameters]\n\n\"padnaam\"\tHet te laden bestand of map (wildcards\n\t\ttoegestaan, \"-\" denotes standard input)\n/dub \"dubnaam\"\tLaad nog een geluidsbestand\n/dubdelay \"best\"\tLaad nog een geluidsbestand met een\n\t\tverschuiving van XXms\n\t\t (als bestand \"..vertraging XXms..\" heeft)\n/d3dfs\t\tStart renderen in D3D Volledig Scherm modus\n/sub \"ondertitel\"\tLaad nog een ondertitelingsbestand\n/filter \"filternaam\"\tLaad DirectShow filters van een DLL\n\t\t(wildcards toegestaan)\n/dvd\t\tStart in DVD-modus, \"padnaam\" betekent de DVD\n\t\tmap (hoeft niet)\n/dvdpos T#H\tStart afspelen bij titel T, hoofdstuk H\n/dvdpos T#uu:mm\tStart afspelen bij titel T, positie uu:mm:ss\n/cd\t\tLaad alle nummers van een audio cd of (s)vcd\n\t\t\"padnaam\" betekent het stationspad (hoeft niet)\n/device\t\tOpen the default video device\n/open\t\tOpen het bestand zonder automatisch af te spelen\n/play\t\tDirect afspelen, wanneer de speler wordt geopend\n/close\t\tSluit de speler af na afspelen (werkt alleen samen \n\t\tmet /play)\n/shutdown\tWindows afsluiten na afspelen\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in Volldig Scherm modus\n/minimized\tStart geminimaliseerd\n/new\t\tEen nieuwe speler openen\n/add\t\tVoegt \"padnaam\" aan de afspeellijst toe\n\t\tKan gecombineerd worden met /open en /play\n/randomize\tRandomize the playlist\n/regvid\t\tMaak bestandskoppelingen voor videobestanden\n/regaud\t\tMaak bestandskoppelingen voor\n\t\tgeluidsbestanden\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tVerwijder alle bestandskoppelingen\n/start ms\t\tStart afspelen op \"ms\" (= milliseconden)\n/startpos uu:mm:ss\tStart afspelen op positie uu:mm:ss\n/fixedsize B,H\tZet venstergrootte op BxH\n/monitor N\tStart op schermmonitor N (N start bij 1)\n/audiorenderer N\tStart met audiorenderer N (N start bij 1)\n\t\t(zie \"Uitgangs\" instellingen)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tToon help over opdrachtprompt parameters\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -2637,7 +2635,7 @@ msgstr "VidFrm Buiten"
msgctxt "IDS_AG_PNS_RESET"
msgid "PnS Reset"
-msgstr ""
+msgstr "PnS-reset"
msgctxt "IDS_AG_PNS_ROTATEX_P"
msgid "PnS Rotate X+"
@@ -2957,7 +2955,7 @@ msgstr "Opus Audio Codec"
msgctxt "IDS_MFMT_DTS"
msgid "DTS/DTS-HD"
-msgstr ""
+msgstr "DTS/DTS-HD"
msgctxt "IDS_MFMT_AMR"
msgid "AMR"
@@ -3047,18 +3045,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Beeldverhouding"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Gebruik WASAPI (herstart afspelen)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Demp bij vooruitspoelen"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Geluidsapparaat:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: Aan"
@@ -3433,11 +3419,11 @@ msgstr "Kan geen verbinding maken met de online ondertitel database."
msgctxt "IDS_MB_SHOW_EDL_EDITOR"
msgid "Do you want to activate the EDL editor?"
-msgstr ""
+msgstr "Wilt u de EDL-bewerker inschakelen?"
msgctxt "IDS_CAPTURE_ERROR"
msgid "Capture Error"
-msgstr ""
+msgstr "Opnamefout"
msgctxt "IDS_CAPTURE_ERROR_VIDEO"
msgid "video"
@@ -3565,11 +3551,11 @@ msgstr "Helderheid verhogen"
msgctxt "IDS_LANG_PREF_EXAMPLE"
msgid "Enter your preferred languages here.\nFor example, type: \"eng jap swe\""
-msgstr ""
+msgstr "Voer uw voorkeurstalen hier in.\nBijvoorbeeld: \"eng jap swe\""
msgctxt "IDS_OVERRIDE_EXT_SPLITTER_CHOICE"
msgid "External splitters can have their own language preference options thus MPC-HC default behavior is not to change their initial choice.\nEnable this option if you want MPC-HC to control external splitters."
-msgstr ""
+msgstr "Externe splitters kunnen eigen voorkeurstaalinstellingen hebben. MPC-HC verandert deze daarom standaard niet.\nU schakelt deze optie in als u MPC-HC de externe splitters wilt laten controleren."
msgctxt "IDS_NAVIGATE_BD_PLAYLISTS"
msgid "&Blu-Ray playlists"
@@ -3615,3 +3601,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Opties"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.pa.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.pa.dialogs.po
new file mode 100644
index 000000000..b16c3e110
--- /dev/null
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.pa.dialogs.po
@@ -0,0 +1,1746 @@
+# MPC-HC - Strings extracted from dialogs
+# Copyright (C) 2002 - 2013 see Authors.txt
+# This file is distributed under the same license as the MPC-HC package.
+# Translators:
+# A S Alam <apreet.alam@gmail.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: MPC-HC\n"
+"POT-Creation-Date: 2015-09-08 19:47:48+0000\n"
+"PO-Revision-Date: 2015-10-03 14:03+0000\n"
+"Last-Translator: A S Alam <apreet.alam@gmail.com>\n"
+"Language-Team: Panjabi (Punjabi) (http://www.transifex.com/mpc-hc/mpc-hc/language/pa/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pa\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "IDD_SELECTMEDIATYPE_CAPTION"
+msgid "Select Media Type"
+msgstr "ਮੀਡਿਆ ਕਿਸਮ ਚà©à¨£à©‹"
+
+msgctxt "IDD_SELECTMEDIATYPE_IDOK"
+msgid "OK"
+msgstr "ਠੀਕ ਹੈ"
+
+msgctxt "IDD_SELECTMEDIATYPE_IDCANCEL"
+msgid "Cancel"
+msgstr "ਰੱਦ ਕਰੋ"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_STATIC1"
+msgid "Video"
+msgstr "ਵਿਡੀਓ"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_BUTTON1"
+msgid "Set"
+msgstr "ਸੈਟ ਕਰੋ"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_STATIC"
+msgid "Audio"
+msgstr "ਆਡੀਓ"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_STATIC"
+msgid "Output"
+msgstr "ਆਉਟਪà©à©±à¨Ÿ"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK1"
+msgid "Record Video"
+msgstr "ਵਿਡੀਓ ਰਿਕਾਰਡ ਕਰੋ"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK2"
+msgid "Preview"
+msgstr "à¨à¨²à¨•"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK3"
+msgid "Record Audio"
+msgstr "ਆਡੀਓ ਰਿਕਾਰਡ ਕਰੋ"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK4"
+msgid "Preview"
+msgstr "à¨à¨²à¨•"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_STATIC"
+msgid "V/A Buffers:"
+msgstr "V/A ਬਫ਼ਰ:"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_CHECK5"
+msgid "Audio to wav"
+msgstr "ਆਡੀਓ ਤੋਂ ਵੇਵ"
+
+msgctxt "IDD_CAPTURE_DLG_IDC_BUTTON2"
+msgid "Record"
+msgstr "ਰਿਕਾਰਡ ਕਰੋ"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK2"
+msgid "Enable built-in audio switcher filter (requires restart)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK5"
+msgid "Normalize"
+msgstr "ਨਾਰਮਲਾਈਜ਼"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC4"
+msgid "Max amplification:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC5"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK6"
+msgid "Regain volume"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC6"
+msgid "Boost:"
+msgstr "ਬੂਸਟ:"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK3"
+msgid "Down-sample to 44100 Hz"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK4"
+msgid "Audio time shift (ms):"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK1"
+msgid "Enable custom channel mapping"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC1"
+msgid "Speaker configuration for"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC2"
+msgid "input channels:"
+msgstr "ਇਨਪà©à¨Ÿ ਚੈਨਲ:"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC3"
+msgid "Hold shift for immediate changes when clicking something"
+msgstr ""
+
+msgctxt "IDD_GOTO_DLG_CAPTION"
+msgid "Go To..."
+msgstr "...ਉੱਤੇ ਜਾਓ"
+
+msgctxt "IDD_GOTO_DLG_IDC_STATIC"
+msgid "Enter a timecode using the format [hh:]mm:ss.ms to jump to a specified time. You do not need to enter the separators explicitly."
+msgstr ""
+
+msgctxt "IDD_GOTO_DLG_IDC_STATIC"
+msgid "Time"
+msgstr "ਸਮਾਂ"
+
+msgctxt "IDD_GOTO_DLG_IDC_OK1"
+msgid "Go!"
+msgstr "ਜਾਓ!"
+
+msgctxt "IDD_GOTO_DLG_IDC_STATIC"
+msgid "Enter two numbers to jump to a specified frame, the first is the frame number, the second is the frame rate."
+msgstr ""
+
+msgctxt "IDD_GOTO_DLG_IDC_STATIC"
+msgid "Frame"
+msgstr "ਫਰੇਮ"
+
+msgctxt "IDD_GOTO_DLG_IDC_OK2"
+msgid "Go!"
+msgstr "ਜਾਓ!"
+
+msgctxt "IDD_OPEN_DLG_CAPTION"
+msgid "Open"
+msgstr "ਖੋਲà©à¨¹à©‹"
+
+msgctxt "IDD_OPEN_DLG_IDC_STATIC"
+msgid "Type the address of a movie or audio file (on the Internet or your computer) and the player will open it for you."
+msgstr ""
+
+msgctxt "IDD_OPEN_DLG_IDC_STATIC"
+msgid "Open:"
+msgstr "ਖੋਲà©à¨¹à©‹:"
+
+msgctxt "IDD_OPEN_DLG_IDC_BUTTON1"
+msgid "Browse..."
+msgstr "...à¨à¨²à¨•"
+
+msgctxt "IDD_OPEN_DLG_IDC_STATIC1"
+msgid "Dub:"
+msgstr "ਡੱਬ:"
+
+msgctxt "IDD_OPEN_DLG_IDC_BUTTON2"
+msgid "Browse..."
+msgstr "...à¨à¨²à¨•"
+
+msgctxt "IDD_OPEN_DLG_IDOK"
+msgid "OK"
+msgstr "ਠੀਕ ਹੈ"
+
+msgctxt "IDD_OPEN_DLG_IDCANCEL"
+msgid "Cancel"
+msgstr "ਰੱਦ ਕਰੋ"
+
+msgctxt "IDD_OPEN_DLG_IDC_CHECK1"
+msgid "Add to playlist without opening"
+msgstr ""
+
+msgctxt "IDD_ABOUTBOX_CAPTION"
+msgid "About"
+msgstr "ਇਸ ਬਾਰੇ"
+
+msgctxt "IDD_ABOUTBOX_IDC_AUTHORS_LINK"
+msgid "Copyright © 2002-2015 see Authors.txt"
+msgstr "Copyright © 2002-2015 Authors.txt ਦੇਖੋ"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "This program is freeware and released under the GNU General Public License."
+msgstr "ਇਹ ਮà©à¨«à¨¼à¨¤ ਪà©à¨°à©‹à¨—ਰਾਮ ਹੈ ਅਤੇ ਗਨੂਮ ਜਰਨਲ ਪਬਲਿਕ ਲਸੰਸ ਅਧੀਨ ਜਾਰੀ ਕੀਤਾ ਗਿਆ ਹੈ।"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "English translation made by MPC-HC Team"
+msgstr "ਅੰਗਰੇਜ਼ੀ ਅਨà©à¨µà¨¾à¨¦ MPC-HC ਟੀਮ ਵਲੋਂ ਕੀਤਾ ਗਿਆ"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Build information"
+msgstr "ਬਿਲਡ ਜਾਣਕਾਰੀ"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Version:"
+msgstr "ਵਰਜ਼ਨ:"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Compiler:"
+msgstr "ਕੰਪਾਇਲਰ:"
+
+msgctxt "IDD_ABOUTBOX_IDC_LAVFILTERS_VERSION"
+msgid "Not used"
+msgstr "ਨਹੀਂ ਵਰਤਿਆ"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Build date:"
+msgstr "ਬਿਲਡ ਮਿਤੀ:"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Operating system"
+msgstr "ਓਪਰੇਟਿੰਗ ਸਿਸਟਮ"
+
+msgctxt "IDD_ABOUTBOX_IDC_STATIC"
+msgid "Name:"
+msgstr "ਨਾਂ:"
+
+msgctxt "IDD_ABOUTBOX_IDC_BUTTON1"
+msgid "Copy to clipboard"
+msgstr "ਕਲਿੱਪਬੋਰਡ ਵਿੱਚ ਕਾਪੀ ਕਰੋ"
+
+msgctxt "IDD_ABOUTBOX_IDOK"
+msgid "OK"
+msgstr "ਠੀਕ ਹੈ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "Open options"
+msgstr "ਚੋਣਾਂ ਖੋਲà©à¨¹à©‹"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO1"
+msgid "Use the same player for each media file"
+msgstr "ਹਰੇਕ ਮੀਡਿਆ ਫਾਈਲ ਲਈ ਉਹੀ ਪਲੇਅਰ ਵਰਤੋਂ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO2"
+msgid "Open a new player for each media file played"
+msgstr ""
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "Language"
+msgstr "ਭਾਸ਼ਾ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "Title bar"
+msgstr "ਟਾਈਟਲ ਪੱਟੀ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO3"
+msgid "Display full path"
+msgstr "ਪੂਰਾ ਪਾਥ ਦਿਖਾਓ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO4"
+msgid "File name only"
+msgstr "ਕੇਵਲ ਫ਼ਾਈਲ ਨਾਂ ਹੀ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_RADIO5"
+msgid "Don't prefix anything"
+msgstr "ਕà©à¨ ਵੀ ਅੱਗੇ ਨਾ ਲਗਾਓ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK13"
+msgid "Replace file name with title"
+msgstr "ਫ਼ਾਈਲ ਨਾਂ ਨੂੰ ਟਾਈਟਲ ਨਾਲ ਬਦਲੋ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "Other"
+msgstr "ਹੋਰ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK3"
+msgid "Tray icon"
+msgstr "ਟਰੇ ਆਈਕਾਨ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_SHOW_OSD"
+msgid "Show OSD (requires restart)"
+msgstr "ਓà¨à¨¸à¨¡à©€ ਦਿਖਾਓ (ਮà©à©œ-ਚਾਲੂ ਕਰਨ ਦੀ ਲੋੜ ਹੈ)"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK4"
+msgid "Limit window proportions on resize"
+msgstr ""
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK12"
+msgid "Snap to desktop edges"
+msgstr "ਡੈਸਕਟਾਪ ਦੇ ਕੋਨਿਆਂ ਲਈ ਸਨੈਪ ਕਰੋ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK8"
+msgid "Store settings in .ini file"
+msgstr ""
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK10"
+msgid "Disable \"Open Disc\" menu"
+msgstr "\"ਡਿਸਕ ਖੋਲà©à¨¹à©‹\" ਮੀਨੂ ਅਸਮਰੱਥ ਕਰੋ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK9"
+msgid "Process priority above normal"
+msgstr ""
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK14"
+msgid "Enable cover-art support"
+msgstr ""
+
+msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
+msgid "History"
+msgstr "ਅਤੀਤ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK1"
+msgid "Keep history of recently opened files"
+msgstr "ਤਾਜ਼ਾ ਖੋਲà©à¨¹à©€à¨†à¨‚ ਫ਼ਾਈਲਾਂ ਦਾ ਅਤੀਤ ਰੱਖੋ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK2"
+msgid "Remember last playlist"
+msgstr "ਆਖਰੀ ਪਲੇਅਲਿਸਟ ਯਾਦ ਰੱਖੋ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_FILE_POS"
+msgid "Remember File position"
+msgstr "ਫ਼ਾਈਲ ਸਥਿਤੀ ਯਾਦ ਰੱਖੋ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_DVD_POS"
+msgid "Remember DVD position"
+msgstr "DVD ਸਥਿਤੀ ਯਾਦ ਰੱਖੋ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK6"
+msgid "Remember last window position"
+msgstr "ਆਖਰੀ ਵਿੰਡੋ ਸਥਿਤੀ ਯਾਦ ਰੱਖੋ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK7"
+msgid "Remember last window size"
+msgstr "ਆਖਰੀ ਵਿੰਡੋ ਆਕਾਰ ਯਾਦ ਰੱਖੋ"
+
+msgctxt "IDD_PPAGEPLAYER_IDC_CHECK11"
+msgid "Remember last Pan-n-Scan Zoom"
+msgstr ""
+
+msgctxt "IDD_PPAGEDVD_IDC_STATIC"
+msgid "\"Open DVD/BD\" behavior"
+msgstr ""
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO1"
+msgid "Prompt for location"
+msgstr "ਟਿਕਾਣੇ ਲਈ ਪà©à©±à¨›à©‹"
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO2"
+msgid "Always open the default location:"
+msgstr "ਹਮੇਸ਼ਾ ਮੂਲ ਟਿਕਾਣਾ ਖੋਲà©à¨¹à©‹:"
+
+msgctxt "IDD_PPAGEDVD_IDC_STATIC"
+msgid "Preferred language for DVD Navigator and the external OGM Splitter"
+msgstr ""
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO3"
+msgid "Menu"
+msgstr "ਮੀਨੂ"
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO4"
+msgid "Audio"
+msgstr "ਆਡੀਓ"
+
+msgctxt "IDD_PPAGEDVD_IDC_RADIO5"
+msgid "Subtitles"
+msgstr "ਸਬ-ਟਾਈਟਲ"
+
+msgctxt "IDD_PPAGEDVD_IDC_STATIC"
+msgid "Additional settings"
+msgstr "ਵਧੀਕ ਸੈਟਿੰਗਾਂ"
+
+msgctxt "IDD_PPAGEDVD_IDC_CHECK2"
+msgid "Allow closed captions in \"Line 21 Decoder\""
+msgstr ""
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Audio"
+msgstr "ਆਡੀਓ"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Volume"
+msgstr "ਵਾਲੀਅਮ"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Min"
+msgstr "ਘੱਟੋ-ਘੱਟ"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Max"
+msgstr "ਵੱਧੋ-ਵੱਧ"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC_BALANCE"
+msgid "Balance"
+msgstr "ਸੰਤà©à¨²à¨¨"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "L"
+msgstr "ਖੱ"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "R"
+msgstr "ਸੱ"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Playback"
+msgstr "ਚਲਾਓ"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_RADIO1"
+msgid "Play"
+msgstr "ਚਲਾਓ"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_RADIO2"
+msgid "Repeat forever"
+msgstr "ਹਮੇਸ਼ਾ ਦà©à¨¹à¨°à¨¾à¨“"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC1"
+msgid "time(s)"
+msgstr "ਵਾਰ"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "After Playback"
+msgstr "ਚਲਾਓ ਬਾਅਦ"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Output"
+msgstr "ਆਉਟਪà©à©±à¨Ÿ"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK5"
+msgid "Auto-zoom:"
+msgstr "ਆਟੋ-ਜ਼ੂਮ:"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC2"
+msgid "Auto fit factor:"
+msgstr ""
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC3"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Default track preference"
+msgstr ""
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Subtitles:"
+msgstr "ਸਬ-ਟਾਈਟਲ:"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Audio:"
+msgstr "ਆਡੀਓ:"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK4"
+msgid "Allow overriding external splitter choice"
+msgstr ""
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Open settings"
+msgstr "ਸੈਟਿੰਗਾਂ ਖੋਲà©à¨¹à©‹"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK7"
+msgid "Use worker thread to construct the filter graph"
+msgstr ""
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK6"
+msgid "Report pins which fail to render"
+msgstr ""
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
+msgid "Auto-load audio files"
+msgstr "ਆਡੀਓ ਫ਼ਾਈਲਾਂ ਆਟੋ-ਲੋਡ ਕਰੋ"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Control"
+msgstr "ਕੰਟਰੋਲ"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Volume step:"
+msgstr ""
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
+msgid "Speed step:"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK3"
+msgid "Override placement"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC1"
+msgid "Horizontal:"
+msgstr "ਲੇਟਵਾਂ:"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC2"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC3"
+msgid "Vertical:"
+msgstr "ਖੜà©à¨¹à¨µà¨¾à¨‚:"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC4"
+msgid "%"
+msgstr "%"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Delay step"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "ms"
+msgstr "ਮਿ.ਸ."
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Texture settings (open the video again to see the changes)"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Sub pictures to buffer:"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Maximum texture resolution:"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_NO_SUB_ANIM"
+msgid "Never animate the subtitles"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC5"
+msgid "Render at"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC6"
+msgid "% of the animation"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC7"
+msgid "Animate at"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC8"
+msgid "% of the video frame rate"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_ALLOW_DROPPING_SUBPIC"
+msgid "Allow dropping some subpictures if the queue is running late"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Renderer Layout"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_SUB_AR_COMPENSATION"
+msgid "Apply aspect ratio compensation for anamorphic videos"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "Warning"
+msgstr "ਚੇਤਾਵਨੀ"
+
+msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
+msgid "If you override and enable full-screen antialiasing somewhere at your videocard's settings, subtitles aren't going to look any better but it will surely eat your CPU."
+msgstr ""
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC2"
+msgid "File extensions"
+msgstr "ਫ਼ਾਈਲ ਇਕਸਟੈਨਸ਼ਨਾਂ"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON2"
+msgid "Default"
+msgstr "ਡਿਫਾਲਟ"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON_EXT_SET"
+msgid "Set"
+msgstr "ਸੈਟ ਕਰੋ"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC3"
+msgid "Association"
+msgstr "ਸੰਬੰਧ"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK8"
+msgid "Use the format-specific icons"
+msgstr "ਖਾਸ-ਫਾਰਮੈਟ ਆਈਕਾਨ ਵਰਤੋਂ"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON1"
+msgid "Run as &administrator"
+msgstr "ਪਰਸ਼ਾਸ਼ਕ ਵਜੋਂ ਚਲਾਓ(&a)"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON7"
+msgid "Set as &default program"
+msgstr "ਡਿਫਾਲਟ ਪਰੋਗਰਾਮ ਵਜੋਂ ਸੈਟ ਕਰੋ(&d)"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC"
+msgid "Real-Time Streaming Protocol handler (for rtsp://... URLs)"
+msgstr ""
+
+msgctxt "IDD_PPAGEFORMATS_IDC_RADIO1"
+msgid "RealMedia"
+msgstr "RealMedia"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_RADIO2"
+msgid "QuickTime"
+msgstr "QuickTime"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_RADIO3"
+msgid "DirectShow"
+msgstr "DirectShow"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK5"
+msgid "Check file extension first"
+msgstr ""
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC"
+msgid "Explorer Context Menu"
+msgstr ""
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK6"
+msgid "Directory"
+msgstr "ਡਾਇਰੈਕਟਰੀ"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK7"
+msgid "File(s)"
+msgstr "ਫ਼ਾਈਲਾਂ"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_STATIC1"
+msgid "Autoplay"
+msgstr "ਆਟੋ-ਪਲੇਅ"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK1"
+msgid "Video"
+msgstr "ਵਿਡੀਓ"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK2"
+msgid "Music"
+msgstr "ਸੰਗੀਤ"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK4"
+msgid "DVD"
+msgstr "ਡੀਵੀਡੀ"
+
+msgctxt "IDD_PPAGEFORMATS_IDC_CHECK3"
+msgid "Audio CD"
+msgstr "ਆਡੀਓ ਸੀਡੀ"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_STATIC"
+msgid "Jump distances (small, medium, large in ms)"
+msgstr ""
+
+msgctxt "IDD_PPAGETWEAKS_IDC_BUTTON1"
+msgid "Default"
+msgstr "ਡਿਫਾਲਟ"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_FASTSEEK_CHECK"
+msgid "Fast seek (on keyframe)"
+msgstr ""
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK2"
+msgid "Show chapter marks in seek bar"
+msgstr ""
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK4"
+msgid "Display \"Now Playing\" information in Skype's mood message"
+msgstr ""
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
+msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
+msgstr ""
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
+msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
+msgstr ""
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK8"
+msgid "Show time tooltip:"
+msgstr ""
+
+msgctxt "IDD_PPAGETWEAKS_IDC_STATIC"
+msgid "OSD font:"
+msgstr "OSD ਫ਼ੋਟ:"
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_LCD"
+msgid "Enable Logitech LCD support (experimental)"
+msgstr ""
+
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK3"
+msgid "Auto-hide the mouse pointer during playback in windowed mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON1"
+msgid "Add Filter..."
+msgstr "...ਫਿਲਟਰ ਜੋੜੋ"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON2"
+msgid "Remove"
+msgstr "ਹਟਾਓ"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_RADIO1"
+msgid "Prefer"
+msgstr "ਤਰਜੀਹ"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_RADIO2"
+msgid "Block"
+msgstr "ਪਾਬੰਦੀ"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_RADIO3"
+msgid "Set merit:"
+msgstr ""
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON3"
+msgid "Up"
+msgstr "ਉੱਤੇ"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON4"
+msgid "Down"
+msgstr "ਹੇਠਾਂ"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON5"
+msgid "Add Media Type..."
+msgstr "....ਮੀਡਿਆ ਕਿਸਮ ਜੋੜੋ"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON6"
+msgid "Add Sub Type..."
+msgstr ""
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON7"
+msgid "Delete"
+msgstr "ਹਟਾਓ"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS_IDC_BUTTON8"
+msgid "Reset List"
+msgstr "ਸੂਚੀ ਮà©à©œ-ਸੈਟ ਕਰੋ"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Type:"
+msgstr "ਕਿਸਮ:"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Size:"
+msgstr "ਆਕਾਰ:"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Media length:"
+msgstr "ਮੀਡਿਆ ਲੰਬਾਈ:"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Video size:"
+msgstr "ਵਿਡੀਓ ਆਕਾਰ:"
+
+msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
+msgid "Created:"
+msgstr "ਬਣਾਇਆ:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Clip:"
+msgstr "ਕਲਿੱਪ:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Author:"
+msgstr "ਲੇਖਕ:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Copyright:"
+msgstr "ਕਾਪੀਰਾਈਟ:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Rating:"
+msgstr "ਰੇਟਿੰਗ:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Location:"
+msgstr "ਟਿਕਾਣਾ:"
+
+msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
+msgid "Description:"
+msgstr "ਵੇਰਵਾ:"
+
+msgctxt "IDD_FAVADD_CAPTION"
+msgid "Add Favorite"
+msgstr "ਪਸੰਦ ਵਿੱਚ ਜੋੜੋ"
+
+msgctxt "IDD_FAVADD_IDC_STATIC"
+msgid "Choose a name for your shortcut:"
+msgstr ""
+
+msgctxt "IDD_FAVADD_IDC_CHECK1"
+msgid "Remember position"
+msgstr "ਸਥਿਤੀ ਯਾਦ ਰੱਖੋ"
+
+msgctxt "IDD_FAVADD_IDCANCEL"
+msgid "Cancel"
+msgstr "ਰੱਦ ਕਰੋ"
+
+msgctxt "IDD_FAVADD_IDOK"
+msgid "OK"
+msgstr "ਠੀਕ ਹੈ"
+
+msgctxt "IDD_FAVADD_IDC_CHECK2"
+msgid "Relative drive"
+msgstr "ਸੰਬੰਧਿਤ ਡਰਾਇਵ"
+
+msgctxt "IDD_FAVORGANIZE_CAPTION"
+msgid "Organize Favorites"
+msgstr "ਮਨਪਸੰਦ ਦਾ ਪਰਬੰਧ ਕਰੋ"
+
+msgctxt "IDD_FAVORGANIZE_IDC_BUTTON1"
+msgid "Rename"
+msgstr "ਨਾਂ ਬਦਲੋ"
+
+msgctxt "IDD_FAVORGANIZE_IDC_BUTTON3"
+msgid "Move Up"
+msgstr "ਉੱਤੇ ਭੇਜੋ"
+
+msgctxt "IDD_FAVORGANIZE_IDC_BUTTON4"
+msgid "Move Down"
+msgstr "ਹੇਠਾਂ ਭੇਜੋ"
+
+msgctxt "IDD_FAVORGANIZE_IDC_BUTTON2"
+msgid "Delete"
+msgstr "ਹਟਾਓ"
+
+msgctxt "IDD_FAVORGANIZE_IDOK"
+msgid "OK"
+msgstr "ਠੀਕ ਹੈ"
+
+msgctxt "IDD_PNSPRESET_DLG_CAPTION"
+msgid "Pan&Scan Presets"
+msgstr ""
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON2"
+msgid "New"
+msgstr "ਨਵਾਂ"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON3"
+msgid "Delete"
+msgstr "ਹਟਾਓ"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON4"
+msgid "Up"
+msgstr "ਉੱਤੇ"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON5"
+msgid "Down"
+msgstr "ਹੇਠਾਂ"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON1"
+msgid "&Set"
+msgstr "ਸੈੱਟ ਕਰੋ(&S)"
+
+msgctxt "IDD_PNSPRESET_DLG_IDCANCEL"
+msgid "&Cancel"
+msgstr "ਰੱਦ ਕਰੋ(&C)"
+
+msgctxt "IDD_PNSPRESET_DLG_IDOK"
+msgid "&Save"
+msgstr "ਸੰਭਾਲੋ(&S)"
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_STATIC"
+msgid "Pos: 0.0 -> 1.0"
+msgstr ""
+
+msgctxt "IDD_PNSPRESET_DLG_IDC_STATIC"
+msgid "Zoom: 0.2 -> 3.0"
+msgstr ""
+
+msgctxt "IDD_PPAGEACCELTBL_IDC_CHECK2"
+msgid "Global Media Keys"
+msgstr "ਗਲੋਬਲ ਮੀਡੀਆ ਸਵਿੱਚਾਂ"
+
+msgctxt "IDD_PPAGEACCELTBL_IDC_BUTTON1"
+msgid "Select All"
+msgstr "ਸਭ ਚà©à¨£à©‹"
+
+msgctxt "IDD_PPAGEACCELTBL_IDC_BUTTON2"
+msgid "Reset Selected"
+msgstr "ਚà©à¨£à©‡ ਮà©à©œ-ਸੈਟ ਕਰੋ"
+
+msgctxt "IDD_MEDIATYPES_DLG_CAPTION"
+msgid "Warning"
+msgstr "ਚੇਤਾਵਨੀ"
+
+msgctxt "IDD_MEDIATYPES_DLG_IDC_STATIC1"
+msgid "MPC-HC could not render some of the pins in the graph, you may not have the needed codecs or filters installed on the system."
+msgstr ""
+
+msgctxt "IDD_MEDIATYPES_DLG_IDC_STATIC2"
+msgid "The following pin(s) failed to find a connectable filter:"
+msgstr ""
+
+msgctxt "IDD_MEDIATYPES_DLG_IDOK"
+msgid "Close"
+msgstr "ਬੰਦ ਕਰੋ"
+
+msgctxt "IDD_SAVE_DLG_CAPTION"
+msgid "Saving..."
+msgstr "...ਸੰਭਾਲਿਆ ਜਾ ਰਿਹਾ ਹੈ"
+
+msgctxt "IDD_SAVE_DLG_IDCANCEL"
+msgid "Cancel"
+msgstr "ਰੱਦ ਕਰੋ"
+
+msgctxt "IDD_SAVETEXTFILEDIALOGTEMPL_IDC_STATIC1"
+msgid "Encoding:"
+msgstr "ਇੰਕੋਡਿੰਗ:"
+
+msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_STATIC1"
+msgid "Encoding:"
+msgstr "ਇੰਕੋਡਿੰਗ:"
+
+msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_STATIC"
+msgid "Delay:"
+msgstr "ਦੇਰੀ:"
+
+msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_STATIC"
+msgid "ms"
+msgstr "ਮਿ.ਸ."
+
+msgctxt "IDD_SAVESUBTITLESFILEDIALOGTEMPL_IDC_CHECK1"
+msgid "Save custom style"
+msgstr "ਕਸਟਮ ਸ਼ੈਲੀ ਸੰਭਾਲੋ"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "JPEG quality:"
+msgstr "JPEG ਕà©à¨†à¨²à¨Ÿà©€:"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "Thumbnails:"
+msgstr "ਥੰਮਨੇਲ:"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "rows"
+msgstr "ਕਤਾਰਾਂ"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "columns"
+msgstr "ਕਾਲਮ"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "Image width:"
+msgstr "ਚਿੱਤਰ ਚੌੜਾਈ:"
+
+msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
+msgid "pixels"
+msgstr "ਪਿਕਸਲ"
+
+msgctxt "IDD_ADDREGFILTER_CAPTION"
+msgid "Select Filter"
+msgstr "ਫਿਲਟਰ ਚà©à¨£à©‹"
+
+msgctxt "IDD_ADDREGFILTER_IDC_BUTTON1"
+msgid "Browse..."
+msgstr "...à¨à¨²à¨•"
+
+msgctxt "IDD_ADDREGFILTER_IDOK"
+msgid "OK"
+msgstr "ਠੀਕ ਹੈ"
+
+msgctxt "IDD_ADDREGFILTER_IDCANCEL"
+msgid "Cancel"
+msgstr "ਰੱਦ ਕਰੋ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Font"
+msgstr "ਫ਼ੋਂਟ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_BUTTON1"
+msgid "Font"
+msgstr "ਫ਼ੋਂਟ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Spacing"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Angle (z,°)"
+msgstr "ਕੋਣ (z,°)"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Scale (x,%)"
+msgstr "ਸਕੇਲ (x,%)"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Scale (y,%)"
+msgstr "ਸਕੇਲ (y,%)"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Border Style"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_RADIO1"
+msgid "Outline"
+msgstr "ਖਾਕਾ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_RADIO2"
+msgid "Opaque box"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Width"
+msgstr "ਚੌੜਾਈ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Shadow"
+msgstr "ਛਾਂ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Screen Alignment && Margins"
+msgstr "ਸਕਰੀਨ ਤਰਤੀਬ ਤੇ ਹਾਸ਼ੀਆ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Left"
+msgstr "ਖੱਬੇ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Right"
+msgstr "ਸੱਜੇ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Top"
+msgstr "ਉੱਤੇ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Bottom"
+msgstr "ਹੇਠਾਂ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_CHECK_RELATIVETO"
+msgid "Position subtitles relative to the video frame"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Colors && Transparency"
+msgstr "ਰੰਗ ਤੇ ਪਾਰਦਰਸ਼ਤਾ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "0%"
+msgstr "0%"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "100%"
+msgstr "100%"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Primary"
+msgstr "ਪà©à¨°à¨¾à¨‡à¨®à¨°à©€"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Secondary"
+msgstr "ਸੈਕੰਡਰੀ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_STATIC"
+msgid "Outline"
+msgstr "ਖਾਕਾ"
+
+msgctxt "IDD_PPAGESUBSTYLE_IDC_CHECK1"
+msgid "Link alpha channels"
+msgstr ""
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
+msgid "If you would like to use the stand-alone versions of these filters or another replacement, disable them here."
+msgstr ""
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
+msgid "Source Filters"
+msgstr "ਸਰੋਤ ਫਿਲਟਰ"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
+msgid "Transform Filters"
+msgstr ""
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
+msgid "Internal LAV Filters settings"
+msgstr ""
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_SPLITTER_CONF"
+msgid "Splitter"
+msgstr "ਸਪਲਿੱਟਰ"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_VIDEO_DEC_CONF"
+msgid "Video decoder"
+msgstr "ਵਿਡੀਓ ਡੀਕੋਡਰ"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_AUDIO_DEC_CONF"
+msgid "Audio decoder"
+msgstr "ਆਡੀਓ ਡਿਕੋਡਰ"
+
+msgctxt "IDD_PPAGELOGO_IDC_RADIO1"
+msgid "Internal:"
+msgstr "ਅੰਦਰੂਨੀ:"
+
+msgctxt "IDD_PPAGELOGO_IDC_RADIO2"
+msgid "External:"
+msgstr "ਬਾਹਰੀ:"
+
+msgctxt "IDD_PPAGELOGO_IDC_BUTTON2"
+msgid "Browse..."
+msgstr "...à¨à¨²à¨•"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "DirectShow Video"
+msgstr "DirectShow ਵਿਡੀਓ"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "RealMedia Video"
+msgstr "RealMedia ਵਿਡੀਓ"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "QuickTime Video"
+msgstr "QuickTime ਵਿਡੀਓ"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Audio Renderer"
+msgstr "ਆਡੀਓ ਰੈਂਡਰਰ"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "VMR-7/VMR-9 (renderless) and EVR (CP) settings"
+msgstr ""
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Surface:"
+msgstr "ਸਰਫੇਸ:"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Resizer:"
+msgstr ""
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_D3D9DEVICE"
+msgid "Select D3D9 Render Device"
+msgstr ""
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_RESETDEVICE"
+msgid "Reinitialize when changing display"
+msgstr ""
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_FULLSCREEN_MONITOR_CHECK"
+msgid "D3D Fullscreen"
+msgstr "D3D ਪੂਰੀ-ਸਕਰੀਨ"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_DSVMR9ALTERNATIVEVSYNC"
+msgid "Alternative VSync"
+msgstr ""
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_DSVMR9LOADMIXER"
+msgid "VMR-9 Mixer Mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_DSVMR9YUVMIXER"
+msgid "YUV Mixing"
+msgstr ""
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_EVR_BUFFERS_TXT"
+msgid "EVR Buffers:"
+msgstr ""
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "DXVA"
+msgstr "DXVA"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Subtitles"
+msgstr ""
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Screenshot"
+msgstr "ਸਕਰੀਨਸ਼ਾਟ"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Shaders"
+msgstr "ਸ਼ੇਡਰ"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Rotation"
+msgstr "ਘà©à©°à¨®à¨¾à¨‰à¨£à¨¾"
+
+msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
+msgid "Subtitle Renderer"
+msgstr ""
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
+msgid "Listen on port:"
+msgstr "ਪੋਰਟ ਉੱਤੇ ਸà©à¨£à©‹:"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_STATIC1"
+msgid "Launch in web browser..."
+msgstr "...ਵੈਬ ਬਰਾਊਜ਼ਰ ਵਿੱਚ ਖੋਲà©à¨¹à©‹"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK3"
+msgid "Enable compression"
+msgstr "ਕੰਪਰੈਸ਼ਨ ਸਮਰੱਥ ਕਰੋ"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
+msgid "Allow access from localhost only"
+msgstr "ਕੇਵਲ ਲੋਕਲਹੋਸਟ ਤੋਂ ਹੀ ਪਹà©à©°à¨š ਸਮਰੱਥ ਕਰੋ"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr ""
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
+msgid "Print debug information"
+msgstr "ਡੀਬੱਗ ਜਾਣਕਾਰੀ ਛਾਪੋ"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK4"
+msgid "Serve pages from:"
+msgstr "ਇਸ ਤੋਂ ਸਫ਼ੇ ਪੇਸ਼ ਕਰੋ:"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_BUTTON1"
+msgid "Browse..."
+msgstr "...à¨à¨²à¨•"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_BUTTON2"
+msgid "Deploy..."
+msgstr "...ਲਾਗੂ ਕਰੋ"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_STATIC"
+msgid "Default page:"
+msgstr "ਡਿਫਾਲਟ ਸਫ਼ਾ:"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_STATIC"
+msgid "CGI handlers: (.ext1=path1;.ext2=path2;...)"
+msgstr "CGI ਹੈਂਡਲਰ: (.ext1=path1;.ext2=path2;...)"
+
+msgctxt "IDD_SUBTITLEDL_DLG_CAPTION"
+msgid "Subtitles available online"
+msgstr "ਸਬ-ਟਾਈਟਲ ਆਨਲਾਈਨ ਮੌਜੂਦ ਹਨ"
+
+msgctxt "IDD_SUBTITLEDL_DLG_IDOK"
+msgid "Download && Open"
+msgstr "ਡਾਊਨਲੋਡ ਕਰੋ ਤੇ ਖੋਲà©à¨¹à©‹"
+
+msgctxt "IDD_SUBTITLEDL_DLG_IDC_CHECK1"
+msgid "Replace currently loaded subtitles"
+msgstr ""
+
+msgctxt "IDD_FILEPROPRES_IDC_BUTTON1"
+msgid "Save As..."
+msgstr "...ਇੰਠਸੰਭਾਲੋ"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Color controls (for VMR-9, EVR and madVR)"
+msgstr ""
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Brightness"
+msgstr "ਚਮਕ"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Contrast"
+msgstr "ਕਨਟਰਾਸਟ"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Hue"
+msgstr "ਰੰਗਤ"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Saturation"
+msgstr "ਸੰਤà©à¨°à¨¿à¨ªà¨¤à¨¾"
+
+msgctxt "IDD_PPAGEMISC_IDC_RESET"
+msgid "Reset"
+msgstr "ਮà©à©œ-ਸੈੱਟ ਕਰੋ"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Update check"
+msgstr "ਅੱਪਡੇਟ ਜਾਂਚ ਕਰੋ"
+
+msgctxt "IDD_PPAGEMISC_IDC_CHECK1"
+msgid "Enable automatic update check"
+msgstr "ਆਟੋਮੈਟਿਕ ਅੱਪਡੇਟ ਜਾਂਚ ਸਮਰੱਥ ਕਰੋ"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC5"
+msgid "Check every:"
+msgstr "ਜਾਂਚ ਕਰੋ ਹਰੇਕ:"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC6"
+msgid "day(s)"
+msgstr "ਦਿਨ"
+
+msgctxt "IDD_PPAGEMISC_IDC_STATIC"
+msgid "Settings management"
+msgstr "ਸੈਟਿੰਗ ਪਰਬੰਧ"
+
+msgctxt "IDD_PPAGEMISC_IDC_RESET_SETTINGS"
+msgid "Reset"
+msgstr "ਮà©à©œ-ਸੈੱਟ ਕਰੋ"
+
+msgctxt "IDD_PPAGEMISC_IDC_EXPORT_SETTINGS"
+msgid "Export"
+msgstr "ਦਰਾਮਦ"
+
+msgctxt "IDD_PPAGEMISC_IDC_EXPORT_KEYS"
+msgid "Export keys"
+msgstr "ਸਵਿੱਚਾਂ ਬਰਾਮਦ ਕਰੋ"
+
+msgctxt "IDD_TUNER_SCAN_CAPTION"
+msgid "Tuner scan"
+msgstr "ਟਿਊਨਰ ਜਾਂਚ"
+
+msgctxt "IDD_TUNER_SCAN_ID_START"
+msgid "Start"
+msgstr "ਸ਼à©à¨°à©‚"
+
+msgctxt "IDD_TUNER_SCAN_IDCANCEL"
+msgid "Cancel"
+msgstr "ਰੱਦ ਕਰੋ"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "Freq. Start"
+msgstr ""
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "Bandwidth"
+msgstr "ਬਰੈਂਡਵਿਡਥ"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "Freq. End"
+msgstr ""
+
+msgctxt "IDD_TUNER_SCAN_IDC_CHECK_IGNORE_ENCRYPTED"
+msgid "Ignore encrypted channels"
+msgstr ""
+
+msgctxt "IDD_TUNER_SCAN_ID_SAVE"
+msgid "Save"
+msgstr "ਸੰਭਾਲੋ"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "S"
+msgstr "S"
+
+msgctxt "IDD_TUNER_SCAN_IDC_STATIC"
+msgid "Q"
+msgstr "Q"
+
+msgctxt "IDD_TUNER_SCAN_IDC_CHECK_OFFSET"
+msgid "Use an offset"
+msgstr ""
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC"
+msgid "Default Device"
+msgstr "ਡਿਫਾਲਟ ਡਿਵਾਇਸ"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_RADIO1"
+msgid "Analog"
+msgstr "à¨à¨¨à¨¾à¨²à¨¾à¨—"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_RADIO2"
+msgid "Digital"
+msgstr "ਡਿਜ਼ੀਟਲ"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC"
+msgid "Analog settings"
+msgstr "à¨à¨¨à¨¾à¨²à¨¾à¨— ਸੈਟਿੰਗਾਂ"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC1"
+msgid "Video"
+msgstr "ਵਿਡੀਓ"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC2"
+msgid "Audio"
+msgstr "ਆਡੀਓ"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC3"
+msgid "Country"
+msgstr "ਦੇਸ਼"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC"
+msgid "Digital settings (BDA)"
+msgstr "ਡਿਜ਼ਿਟਲ ਸੈਟਿੰਗਾਂ (BDA)"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC4"
+msgid "Network Provider"
+msgstr "ਨੈਟਵਰਕ ਪਰਦਾਤਾ"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC5"
+msgid "Tuner"
+msgstr "ਟਿਊਨਰ"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_STATIC6"
+msgid "Receiver"
+msgstr "ਰਿਸੀਵਰ"
+
+msgctxt "IDD_PPAGECAPTURE_IDC_PPAGECAPTURE_ST10"
+msgid "Channel switching approach:"
+msgstr ""
+
+msgctxt "IDD_PPAGECAPTURE_IDC_PPAGECAPTURE_ST11"
+msgid "Rebuild filter graph"
+msgstr ""
+
+msgctxt "IDD_PPAGECAPTURE_IDC_PPAGECAPTURE_ST12"
+msgid "Stop filter graph"
+msgstr ""
+
+msgctxt "IDD_PPAGESYNC_IDC_SYNCVIDEO"
+msgid "Sync video to display"
+msgstr ""
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC1"
+msgid "Frequency adjustment:"
+msgstr ""
+
+msgctxt "IDD_PPAGESYNC_IDC_SYNCDISPLAY"
+msgid "Sync display to video"
+msgstr ""
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC2"
+msgid "Frequency adjustment:"
+msgstr ""
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC3"
+msgid "lines"
+msgstr "ਲਾਈਨਾਂ"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC4"
+msgid "columns"
+msgstr "ਕਾਲਮ"
+
+msgctxt "IDD_PPAGESYNC_IDC_SYNCNEAREST"
+msgid "Present at nearest VSync"
+msgstr ""
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC5"
+msgid "Target sync offset:"
+msgstr ""
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC6"
+msgid "ms"
+msgstr "ਮਿ.ਸ."
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC7"
+msgid "Control limits:"
+msgstr ""
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC8"
+msgid "+/-"
+msgstr "+/-"
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC9"
+msgid "ms"
+msgstr "ਮਿ.ਸ."
+
+msgctxt "IDD_PPAGESYNC_IDC_STATIC10"
+msgid "Changes take effect after the playback has been closed and restarted."
+msgstr ""
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK1"
+msgid "Launch files in fullscreen"
+msgstr "ਫ਼ਾਈਲਾਂ ਪੂਰੀ ਸਕਰੀਨ ਉੱਤੇ ਚਲਾਓ"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK4"
+msgid "Hide controls in fullscreen"
+msgstr "ਪੂਰੀ ਸਕਰੀਨ ਵਿੱਚ ਕੰਟਰੋਲ ਓਹਲੇ ਕਰੋ"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC1"
+msgid "ms"
+msgstr "ਮਿ.ਸ."
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK6"
+msgid "Hide docked panels"
+msgstr "ਡੌਕ ਕੀਤੇ ਪੈਨਲ ਓਹਲੇ ਕਰੋ"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK5"
+msgid "Exit fullscreen at the end of playback"
+msgstr "ਚਲਾਉਣਾ ਖਤਮ ਹੋਣ ਦੇ ਬਾਅਦ ਪੂਰੀ-ਸਕਰੀਨ ਨੂੰ ਛੱਡੋ"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC"
+msgid "Fullscreen monitor"
+msgstr "ਪੂਰੀ ਸਕਰੀਨ ਮਾਨੀਟਰ"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK2"
+msgid "Use autochange fullscreen monitor mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_BUTTON1"
+msgid "Add"
+msgstr "ਜੋੜੋ"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_BUTTON2"
+msgid "Del"
+msgstr "ਹਟਾਓ"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_BUTTON3"
+msgid "Up"
+msgstr "ਉੱਤੇ"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_BUTTON4"
+msgid "Down"
+msgstr "ਹੇਠਾਂ"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK3"
+msgid "Apply default monitor mode on fullscreen exit"
+msgstr ""
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_RESTORERESCHECK"
+msgid "Restore resolution on program exit"
+msgstr ""
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC"
+msgid "Delay"
+msgstr "ਦੇਰੀ"
+
+msgctxt "IDD_PPAGEFULLSCREEN_IDC_STATIC2"
+msgid "s"
+msgstr "ਸ"
+
+msgctxt "IDD_NAVIGATION_DLG_IDC_NAVIGATION_INFO"
+msgid "Info"
+msgstr "ਜਾਣਕਾਰੀ"
+
+msgctxt "IDD_NAVIGATION_DLG_IDC_NAVIGATION_SCAN"
+msgid "Scan"
+msgstr "ਸਕੈਨ ਕਰੋ"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_CHECK1"
+msgid "Prefer forced and/or default subtitles tracks"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBMISC_IDC_CHECK2"
+msgid "Prefer external subtitles over embedded subtitles"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBMISC_IDC_CHECK3"
+msgid "Ignore embedded subtitles"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBMISC_IDC_STATIC"
+msgid "Autoload paths"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBMISC_IDC_BUTTON1"
+msgid "Reset"
+msgstr "ਮà©à©œ-ਸੈੱਟ ਕਰੋ"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_STATIC"
+msgid "Online database"
+msgstr "ਆਡੀਓ ਡਾਟਾਬੇਸ"
+
+msgctxt "IDD_PPAGESUBMISC_IDC_STATIC"
+msgid "Base URL of the online subtitle database:"
+msgstr ""
+
+msgctxt "IDD_PPAGESUBMISC_IDC_BUTTON2"
+msgid "Test"
+msgstr "ਟੈਸਟ"
+
+msgctxt "IDD_UPDATE_DIALOG_CAPTION"
+msgid "Update Checker"
+msgstr "ਅੱਪਡੇਟ ਚੈਕਰ"
+
+msgctxt "IDD_UPDATE_DIALOG_IDC_UPDATE_DL_BUTTON"
+msgid "&Download now"
+msgstr "ਹà©à¨£à©‡ ਡਾਊਨਲੋਡ ਕਰੋ(&D)"
+
+msgctxt "IDD_UPDATE_DIALOG_IDC_UPDATE_LATER_BUTTON"
+msgid "Remind me &later"
+msgstr "ਮੈਨੂੰ ਬਾਅਦ ਵਿੱਚ ਯਾਦ ਕਰਵਾਉ(&l)"
+
+msgctxt "IDD_UPDATE_DIALOG_IDC_UPDATE_IGNORE_BUTTON"
+msgid "&Ignore this update"
+msgstr "ਇਹ ਅੱਪਡੇਟ ਅਣਡਿੱਠਾ ਕਰੋ(I)"
+
+msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
+msgid "Shaders contain special effects which can be added to the video rendering process."
+msgstr ""
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON12"
+msgid "Add shader file"
+msgstr ""
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON13"
+msgid "Remove"
+msgstr "ਹਟਾਓ"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON1"
+msgid "Add to pre-resize"
+msgstr ""
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON2"
+msgid "Add to post-resize"
+msgstr ""
+
+msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
+msgid "Shader presets"
+msgstr ""
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON3"
+msgid "Load"
+msgstr "ਲੋਡ ਕਰੋ"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON4"
+msgid "Save"
+msgstr "ਸੰਭਾਲੋ"
+
+msgctxt "IDD_PPAGESHADERS_IDC_BUTTON5"
+msgid "Delete"
+msgstr "ਹਟਾਓ"
+
+msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
+msgid "Active pre-resize shaders"
+msgstr ""
+
+msgctxt "IDD_PPAGESHADERS_IDC_STATIC"
+msgid "Active post-resize shaders"
+msgstr ""
+
+msgctxt "IDD_DEBUGSHADERS_DLG_CAPTION"
+msgid "Debug Shaders"
+msgstr ""
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_STATIC"
+msgid "Debug Information"
+msgstr "ਡੀਬੱਗ ਜਾਣਕਾਰੀ"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_RADIO1"
+msgid "PS 2.0"
+msgstr "PS 2.0"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_RADIO2"
+msgid "PS 2.0b"
+msgstr "PS 2.0b"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_RADIO3"
+msgid "PS 2.0a"
+msgstr "PS 2.0a"
+
+msgctxt "IDD_DEBUGSHADERS_DLG_IDC_RADIO4"
+msgid "PS 3.0"
+msgstr "PS 3.0"
+
+msgctxt "IDD_PPAGEADVANCED_IDC_STATIC"
+msgid "Advanced Settings, do not edit unless you know what you are doing."
+msgstr "ਤਕਨੀਕੀ ਸੈਟਿੰਗਾਂ, ਉਦੋਂ ਤੱਕ ਨਾ ਸੋਧੋ, ਜਦੋਂ ਤੱਕ ਕਿ ਤà©à¨¸à©€à¨‚ ਜਾਣਦੇ ਨਹੀਂ ਹੋ ਕਿ ਤà©à¨¸à©€à¨‚ ਕੀ ਕਰ ਰਹੇ ਹੋ।"
+
+msgctxt "IDD_PPAGEADVANCED_IDC_RADIO1"
+msgid "True"
+msgstr "ਸਹੀ"
+
+msgctxt "IDD_PPAGEADVANCED_IDC_RADIO2"
+msgid "False"
+msgstr "ਗਲਤ"
+
+msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
+msgid "Default"
+msgstr "ਡਿਫਾਲਟ"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "ਡਿਵਾਇਸ"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "ਚੋਣਾਂ"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "ਲੈਵਲ:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "ਨੋਟ"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
+msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
+msgid "JPEG quality:"
+msgstr "JPEG ਕà©à¨†à¨²à¨Ÿà©€:"
+
+msgctxt "IDD_CMD_LINE_HELP_CAPTION"
+msgid "Command line help"
+msgstr "ਕਮਾਂਡ ਲਾਈਨ ਮਦਦ"
+
+msgctxt "IDD_CMD_LINE_HELP_IDOK"
+msgid "OK"
+msgstr "ਠੀਕ ਹੈ"
+
+msgctxt "IDD_CRASH_REPORTER_CAPTION"
+msgid "Crash reporter"
+msgstr "ਕਰੈਸ਼ ਰਿਪੋਰਟਰ"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "ਸਾਨੂੰ ਅਫਸੋਸ ਹੈ ਕਿ MPC-HC ਕਰੈਸ਼ ਹੋ ਗਿਆ ਹੈ। :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
+msgid "Optional information"
+msgstr "ਚੋਣਵੀਂ ਜਾਣਕਾਰੀ"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
+msgid "Email:"
+msgstr "ਈਮੇਲ:"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC3"
+msgid "Your email address is optional and will only be used if the developers need to contact you for more information."
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
+msgid "Problem description (use English only):"
+msgstr "ਸਮੱਸਿਆ ਦਾ ਵੇਰਵਾ (ਕੇਵਲ ਅੰਗਰੇਜ਼ੀ ਵਿੱਚ):"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "MPC-HC ਮà©à©œ-ਚਾਲੂ ਕਰੋ"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "MPC-HC ਬੰਦ ਕਰੋ"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.pa.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.pa.menus.po
new file mode 100644
index 000000000..654ff1833
--- /dev/null
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.pa.menus.po
@@ -0,0 +1,698 @@
+# MPC-HC - Strings extracted from menus
+# Copyright (C) 2002 - 2013 see Authors.txt
+# This file is distributed under the same license as the MPC-HC package.
+# Translators:
+# A S Alam <apreet.alam@gmail.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: MPC-HC\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-06-07 15:02+0000\n"
+"Last-Translator: A S Alam <apreet.alam@gmail.com>\n"
+"Language-Team: Panjabi (Punjabi) (http://www.transifex.com/mpc-hc/mpc-hc/language/pa/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pa\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "POPUP"
+msgid "&File"
+msgstr "ਫਾਈਲ(&F)"
+
+msgctxt "ID_FILE_OPENQUICK"
+msgid "&Quick Open File..."
+msgstr "...ਤà©à¨°à©°à¨¤ ਫਾਈਲ ਖੋਲà©à¨¹à©‹(&Q)"
+
+msgctxt "ID_FILE_OPENMEDIA"
+msgid "&Open File..."
+msgstr "...ਫਾਈਲ ਖੋਲà©à¨¹à©‹(&O)"
+
+msgctxt "ID_FILE_OPENDVDBD"
+msgid "Open &DVD/BD..."
+msgstr "....&DVD/BD ਖੋਲà©à¨¹à©‹"
+
+msgctxt "ID_FILE_OPENDEVICE"
+msgid "Open De&vice..."
+msgstr "...ਡਿਵਾਇਸ ਖੋਲà©à¨¹à©‹(&v)"
+
+msgctxt "ID_FILE_OPENDIRECTORY"
+msgid "Open Dir&ectory..."
+msgstr "...ਡਾਇਰੈਕਟਰੀ ਖੋਲà©à¨¹à©‹(&e)"
+
+msgctxt "ID_FILE_OPENDISC"
+msgid "O&pen Disc"
+msgstr "ਡਿਸਕ ਖੋਲà©à¨¹à©‹(&p)"
+
+msgctxt "ID_RECENT_FILES"
+msgid "Recent &Files"
+msgstr "ਤਾਜ਼ਾ ਫਾਈਲਾਂ(&F)"
+
+msgctxt "ID_FILE_CLOSE_AND_RESTORE"
+msgid "&Close"
+msgstr "ਬੰਦ ਕਰੋ(&C)"
+
+msgctxt "ID_FILE_SAVE_COPY"
+msgid "&Save a Copy..."
+msgstr "...ਕਾਪੀ ਸੰਭਾਲੋ(&S)"
+
+msgctxt "ID_FILE_SAVE_IMAGE"
+msgid "Save &Image..."
+msgstr "...ਚਿੱਤਰ ਸੰਭਾਲੋ(&I)"
+
+msgctxt "ID_FILE_SAVE_THUMBNAILS"
+msgid "Save &Thumbnails..."
+msgstr "...ਥੰਮਨੇਲ ਸੰਭਾਲੋ(&T)"
+
+msgctxt "ID_FILE_LOAD_SUBTITLE"
+msgid "&Load Subtitle..."
+msgstr "...ਸਬਟਾਈਟਲ ਲੋਡ ਕਰੋ(&L)"
+
+msgctxt "ID_FILE_SAVE_SUBTITLE"
+msgid "Save S&ubtitle..."
+msgstr "...ਸਬਟਾਈਟਲ ਸੰਭਾਲੋ(&u)"
+
+msgctxt "POPUP"
+msgid "Subtitle Data&base"
+msgstr "ਸਬਟਾਈਟਲ ਡਾਟਾਬੇਸ(&b)"
+
+msgctxt "ID_FILE_ISDB_SEARCH"
+msgid "&Search..."
+msgstr "...ਖੋਜ(&S)"
+
+msgctxt "ID_FILE_ISDB_UPLOAD"
+msgid "&Upload..."
+msgstr "...ਅੱਪਲੋਡ ਕਰੋ(&U)"
+
+msgctxt "ID_FILE_ISDB_DOWNLOAD"
+msgid "&Download..."
+msgstr "...ਖੋਲà©à¨¹à©‹(&D)"
+
+msgctxt "ID_FILE_PROPERTIES"
+msgid "P&roperties"
+msgstr "ਵਿਸ਼ੇਸ਼ਤਾ(&r)"
+
+msgctxt "ID_FILE_EXIT"
+msgid "E&xit"
+msgstr "ਬਾਹਰ(&x)"
+
+msgctxt "POPUP"
+msgid "&View"
+msgstr "ਵੇਖੋ(&V)"
+
+msgctxt "ID_VIEW_CAPTIONMENU"
+msgid "Caption&&Menu"
+msgstr "ਸà©à¨°à¨–à©€ ਤੇ ਮੀਨੂ"
+
+msgctxt "ID_VIEW_SEEKER"
+msgid "See&k Bar"
+msgstr "ਸੀਕ ਬਾਰ(&k)"
+
+msgctxt "ID_VIEW_CONTROLS"
+msgid "&Controls"
+msgstr "ਕੰਟਰੋਲ(&C)"
+
+msgctxt "ID_VIEW_INFORMATION"
+msgid "&Information"
+msgstr "ਜਾਣਕਾਰੀ(&I)"
+
+msgctxt "ID_VIEW_STATISTICS"
+msgid "&Statistics"
+msgstr "ਅੰਕੜੇ(&S)"
+
+msgctxt "ID_VIEW_STATUS"
+msgid "St&atus"
+msgstr "ਸਥਿਤੀ(&a)"
+
+msgctxt "ID_VIEW_SUBRESYNC"
+msgid "Su&bresync"
+msgstr "ਸਬ-ਰੀਸਿੰਕ(&b)"
+
+msgctxt "ID_VIEW_PLAYLIST"
+msgid "Pla&ylist"
+msgstr "ਪਲੇਅਲਿਸਟ(&y)"
+
+msgctxt "ID_VIEW_CAPTURE"
+msgid "Captu&re"
+msgstr "ਕੈਪਚਰ(&r)"
+
+msgctxt "ID_VIEW_NAVIGATION"
+msgid "Na&vigation"
+msgstr "ਨੇਵੀਗੇਸ਼ਨ(&v)"
+
+msgctxt "ID_VIEW_DEBUGSHADERS"
+msgid "&Debug Shaders"
+msgstr "ਡੀਬੱਗਰ ਸ਼ੇਡਰ(&D)"
+
+msgctxt "POPUP"
+msgid "&Presets..."
+msgstr "...ਪà©à¨°à©€à¨¸à©ˆà¨Ÿ(&P)"
+
+msgctxt "ID_VIEW_PRESETS_MINIMAL"
+msgid "&Minimal"
+msgstr "ਘੱਟੋ-ਘੱਟ(&M)"
+
+msgctxt "ID_VIEW_PRESETS_COMPACT"
+msgid "&Compact"
+msgstr "ਨਿੰਮਾ(&C)"
+
+msgctxt "ID_VIEW_PRESETS_NORMAL"
+msgid "&Normal"
+msgstr "ਆਮ(&N)"
+
+msgctxt "ID_VIEW_FULLSCREEN"
+msgid "F&ull Screen"
+msgstr "ਪੂਰਾ ਸਕਰੀਨ(&u)"
+
+msgctxt "POPUP"
+msgid "&Zoom"
+msgstr "ਜ਼ੂਮ(&Z)"
+
+msgctxt "ID_VIEW_ZOOM_50"
+msgid "&50%"
+msgstr "&50%"
+
+msgctxt "ID_VIEW_ZOOM_100"
+msgid "&100%"
+msgstr "&100%"
+
+msgctxt "ID_VIEW_ZOOM_200"
+msgid "&200%"
+msgstr "&200%"
+
+msgctxt "ID_VIEW_ZOOM_AUTOFIT"
+msgid "Auto &Fit"
+msgstr "ਆਟੋ ਫਿੱਟ(&F)"
+
+msgctxt "ID_VIEW_ZOOM_AUTOFIT_LARGER"
+msgid "Auto Fit (&Larger Only)"
+msgstr "ਆਟੋ ਫਿੱਟ (ਕੇਵਲ ਵੱਡਾ)(&L)"
+
+msgctxt "POPUP"
+msgid "R&enderer Settings"
+msgstr "ਰੈਂਡਰਰ ਸੈਟਿੰਗਾਂ(&e)"
+
+msgctxt "ID_VIEW_TEARING_TEST"
+msgid "&Tearing Test"
+msgstr "ਟੀਅਰਿੰਗ ਟੈਸਟ(&T)"
+
+msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
+msgid "&Display Statistics"
+msgstr "ਡਿਸਪਲੇਅ ਸੈਟਿੰਗਾਂ(&D)"
+
+msgctxt "ID_VIEW_OSD_DISPLAY_TIME"
+msgid "Display Current T&ime"
+msgstr "ਮੌਜੂਦਾ ਸਮਾਂ ਦਿਖਾਉ(&i)"
+
+msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
+msgid "Show &File Name"
+msgstr "ਫਾਈਲ ਨਾਂ ਵੇਖਾਓ(&F)"
+
+msgctxt "POPUP"
+msgid "&Output Range"
+msgstr "ਆਉਟਪà©à©±à¨Ÿ ਰੇਜ਼(&O)"
+
+msgctxt "ID_VIEW_EVROUTPUTRANGE_0_255"
+msgid "&0 - 255"
+msgstr "&0 - 255"
+
+msgctxt "ID_VIEW_EVROUTPUTRANGE_16_235"
+msgid "&16 - 235"
+msgstr "&16 - 235"
+
+msgctxt "POPUP"
+msgid "&Presentation"
+msgstr "ਪਰਿਜੈਂਟੇਸ਼ਨ(&P)"
+
+msgctxt "ID_VIEW_D3DFULLSCREEN"
+msgid "D3D Fullscreen &Mode"
+msgstr "D3D ਪੂਰੀ-ਸਕਰੀਨ ਮੋਡ(&M)"
+
+msgctxt "ID_VIEW_FULLSCREENGUISUPPORT"
+msgid "D3D Fullscreen &GUI Support"
+msgstr "D3D ਪੂਰੀ-ਸਕਰੀਨ &GUI ਸਹਿਯੋਗ"
+
+msgctxt "ID_VIEW_HIGHCOLORRESOLUTION"
+msgid "10-bit &RGB Output"
+msgstr "10-ਬਿੱਟ &RGB ਆਉਟਪà©à©±à¨Ÿ"
+
+msgctxt "ID_VIEW_FORCEINPUTHIGHCOLORRESOLUTION"
+msgid "Force 10-bit RGB &Input"
+msgstr ""
+
+msgctxt "ID_VIEW_FULLFLOATINGPOINTPROCESSING"
+msgid "&Full Floating Point Processing"
+msgstr ""
+
+msgctxt "ID_VIEW_HALFFLOATINGPOINTPROCESSING"
+msgid "&Half Floating Point Processing"
+msgstr ""
+
+msgctxt "ID_VIEW_DISABLEDESKTOPCOMPOSITION"
+msgid "Disable desktop composition (&Aero)"
+msgstr "ਡੈਸਕਟਾਪ ਕੰਪੋਜ਼ਿਸ਼ਨ ਅਸਮਰੱਥ ਕਰੋ (à¨à¨°à©‹)(&A)"
+
+msgctxt "ID_VIEW_ENABLEFRAMETIMECORRECTION"
+msgid "Enable Frame Time &Correction"
+msgstr "ਫਰੇਮ ਸਮਾਂ ਸੋਧ ਸਮਰੱਥ ਕਰੋ(&C)"
+
+msgctxt "POPUP"
+msgid "&Color Management"
+msgstr "ਰੰਗ ਪਰਬੰਧ(&C)"
+
+msgctxt "ID_VIEW_CM_ENABLE"
+msgid "&Enable"
+msgstr "ਸਮਰੱਥ ਕਰੋ(&E)"
+
+msgctxt "POPUP"
+msgid "&Input Type"
+msgstr "ਇਨਪà©à¨Ÿ ਕਿਸਮ(&I)"
+
+msgctxt "ID_VIEW_CM_INPUT_AUTO"
+msgid "&Auto-Detect"
+msgstr "ਆਟੋ-ਖੋਜ(&A)"
+
+msgctxt "ID_VIEW_CM_INPUT_HDTV"
+msgid "&HDTV"
+msgstr "&HDTV"
+
+msgctxt "ID_VIEW_CM_INPUT_SDTV_NTSC"
+msgid "SDTV &NTSC"
+msgstr "SDTV &NTSC"
+
+msgctxt "ID_VIEW_CM_INPUT_SDTV_PAL"
+msgid "SDTV &PAL"
+msgstr "SDTV &PAL"
+
+msgctxt "POPUP"
+msgid "Ambient &Light"
+msgstr ""
+
+msgctxt "ID_VIEW_CM_AMBIENTLIGHT_BRIGHT"
+msgid "&Bright (2.2 Gamma)"
+msgstr "ਚਮਕ (2.2 ਗਾਮਾ)(&B)"
+
+msgctxt "ID_VIEW_CM_AMBIENTLIGHT_DIM"
+msgid "&Dim (2.35 Gamma)"
+msgstr "ਫਿੱਕਾ (2.35 ਗਾਮਾ)(&D)"
+
+msgctxt "ID_VIEW_CM_AMBIENTLIGHT_DARK"
+msgid "D&ark (2.4 Gamma)"
+msgstr "ਗੂੜà©à¨¹à¨¾ (2.4 ਗਾਮਾ)(&a)"
+
+msgctxt "POPUP"
+msgid "&Rendering Intent"
+msgstr ""
+
+msgctxt "ID_VIEW_CM_INTENT_PERCEPTUAL"
+msgid "&Perceptual"
+msgstr ""
+
+msgctxt "ID_VIEW_CM_INTENT_RELATIVECOLORIMETRIC"
+msgid "&Relative Colorimetric"
+msgstr ""
+
+msgctxt "ID_VIEW_CM_INTENT_SATURATION"
+msgid "&Saturation"
+msgstr "ਸੰਤà©à¨°à¨¿à¨ªà¨¤à¨¾(&S)"
+
+msgctxt "ID_VIEW_CM_INTENT_ABSOLUTECOLORIMETRIC"
+msgid "&Absolute Colorimetric"
+msgstr ""
+
+msgctxt "POPUP"
+msgid "&VSync"
+msgstr "&V-ਸਿੰਕ"
+
+msgctxt "ID_VIEW_VSYNC"
+msgid "&VSync"
+msgstr "&V-ਸਿੰਕ"
+
+msgctxt "ID_VIEW_VSYNCACCURATE"
+msgid "&Accurate VSync"
+msgstr ""
+
+msgctxt "ID_VIEW_ALTERNATIVEVSYNC"
+msgid "A&lternative VSync"
+msgstr ""
+
+msgctxt "ID_VIEW_VSYNCOFFSET_DECREASE"
+msgid "&Decrease VSync Offset"
+msgstr ""
+
+msgctxt "ID_VIEW_VSYNCOFFSET_INCREASE"
+msgid "&Increase VSync Offset"
+msgstr ""
+
+msgctxt "POPUP"
+msgid "&GPU Control"
+msgstr "&GPU ਕੰਟਰੋਲ"
+
+msgctxt "ID_VIEW_FLUSHGPU_BEFOREVSYNC"
+msgid "Flush GPU &before VSync"
+msgstr ""
+
+msgctxt "ID_VIEW_FLUSHGPU_AFTERPRESENT"
+msgid "Flush GPU &after Present"
+msgstr ""
+
+msgctxt "ID_VIEW_FLUSHGPU_WAIT"
+msgid "&Wait for flushes"
+msgstr ""
+
+msgctxt "POPUP"
+msgid "R&eset"
+msgstr "ਮà©à©œ-ਸੈਟ ਕਰੋ(&e)"
+
+msgctxt "ID_VIEW_RESET_DEFAULT"
+msgid "Reset to &default renderer settings"
+msgstr ""
+
+msgctxt "ID_VIEW_RESET_OPTIMAL"
+msgid "Reset to &optimal renderer settings"
+msgstr ""
+
+msgctxt "POPUP"
+msgid "Video &Frame"
+msgstr "ਵਿਡੀਓ ਫਰੇਮ(&F)"
+
+msgctxt "ID_VIEW_VF_HALF"
+msgid "&Half Size"
+msgstr "ਅੱਧਾ ਆਕਾਰ(&H)"
+
+msgctxt "ID_VIEW_VF_NORMAL"
+msgid "&Normal Size"
+msgstr "ਆਮ ਆਕਾਰ(&N)"
+
+msgctxt "ID_VIEW_VF_DOUBLE"
+msgid "&Double Size"
+msgstr "ਦà©à©±à¨—ਣਾ ਆਕਾਰ(&D)"
+
+msgctxt "ID_VIEW_VF_STRETCH"
+msgid "&Stretch To Window"
+msgstr "ਵਿੰਡੋ ਲਈ ਖਿੱਚੋ(&S)"
+
+msgctxt "ID_VIEW_VF_FROMINSIDE"
+msgid "Touch Window From &Inside"
+msgstr "ਪਾਸੇ ਤੋਂ ਵਿੰਡੋ ਨੂੰ ਟੱਚ ਕਰੋ(&I)"
+
+msgctxt "ID_VIEW_VF_ZOOM1"
+msgid "Zoom &1"
+msgstr "ਜ਼ੂਮ &1"
+
+msgctxt "ID_VIEW_VF_ZOOM2"
+msgid "Zoom &2"
+msgstr "ਜ਼ੂਮ &2"
+
+msgctxt "ID_VIEW_VF_FROMOUTSIDE"
+msgid "Touch Window From &Outside"
+msgstr "ਬਾਹਰ ਤੋਂ ਵਿੰਡੋ ਟੱਚ ਕਰੋ(&O)"
+
+msgctxt "ID_VIEW_VF_KEEPASPECTRATIO"
+msgid "&Keep Aspect Ratio"
+msgstr "ਆਕਾਰ ਅਨà©à¨ªà¨¾à¨¤ ਰੱਖੋ(&K)"
+
+msgctxt "POPUP"
+msgid "Override &Aspect Ratio"
+msgstr "ਆਕਾਰ ਅਨà©à¨ªà¨¾à¨¤ ਅਣਡਿੱਠਾ ਕਰੋ(&A)"
+
+msgctxt "ID_ASPECTRATIO_SOURCE"
+msgid "&Default"
+msgstr "ਡਿਫਾਲਟ(&D)"
+
+msgctxt "ID_ASPECTRATIO_4_3"
+msgid "&4:3"
+msgstr "&4:3"
+
+msgctxt "ID_ASPECTRATIO_5_4"
+msgid "&5:4"
+msgstr "&5:4"
+
+msgctxt "ID_ASPECTRATIO_16_9"
+msgid "&16:9"
+msgstr "&16:9"
+
+msgctxt "ID_ASPECTRATIO_235_100"
+msgid "&235:100"
+msgstr "&235:100"
+
+msgctxt "ID_ASPECTRATIO_185_100"
+msgid "1&85:100"
+msgstr "1&85:100"
+
+msgctxt "ID_VIEW_VF_COMPMONDESKARDIFF"
+msgid "&Correct Monitor/Desktop AR Diff"
+msgstr ""
+
+msgctxt "POPUP"
+msgid "Pa&n&&Scan"
+msgstr "ਪੈਨ ਤੇ ਆਕਾਰ(&n)"
+
+msgctxt "ID_VIEW_INCSIZE"
+msgid "&Increase Size"
+msgstr "ਆਕਾਰ ਵਧਾਓ(&I)"
+
+msgctxt "ID_VIEW_DECSIZE"
+msgid "&Decrease Size"
+msgstr "ਆਕਾਰ ਘਟਾਓ(&D)"
+
+msgctxt "ID_VIEW_INCWIDTH"
+msgid "I&ncrease Width"
+msgstr "ਚੌੜਾਈ ਵਧਾਓ(&n)"
+
+msgctxt "ID_VIEW_DECWIDTH"
+msgid "D&ecrease Width"
+msgstr "ਚੌੜਾਈ ਘਟਾਓ(&e)"
+
+msgctxt "ID_VIEW_INCHEIGHT"
+msgid "In&crease Height"
+msgstr "ਉਚਾਈ ਵਧਾਓ(&c)"
+
+msgctxt "ID_VIEW_DECHEIGHT"
+msgid "Decre&ase Height"
+msgstr "ਉਚਾਈ ਘਟਾਓ(&a)"
+
+msgctxt "ID_PANSCAN_MOVERIGHT"
+msgid "Move &Right"
+msgstr "ਸੱਜੇ ਪਾਸੇ ਖਿਸਕਾਓ(&R)"
+
+msgctxt "ID_PANSCAN_MOVELEFT"
+msgid "Move &Left"
+msgstr "ਖੱਬੇ ਪਾਸੇ ਖਿਸਕਾਓ(&L)"
+
+msgctxt "ID_PANSCAN_MOVEUP"
+msgid "Move &Up"
+msgstr "ਉੱਤੇ ਵੱਲ ਖਿਸਕਾਓ(&U)"
+
+msgctxt "ID_PANSCAN_MOVEDOWN"
+msgid "Move &Down"
+msgstr "ਹੇਠਾਂ ਵੱਲ ਖਿਸਕਾਓ(&D)"
+
+msgctxt "ID_PANSCAN_CENTER"
+msgid "Cen&ter"
+msgstr "ਸੈਂਟਰ(&t)"
+
+msgctxt "ID_VIEW_RESET"
+msgid "Re&set"
+msgstr "ਮà©à©œ-ਸੈੱਟ ਕਰੋ(&s)"
+
+msgctxt "POPUP"
+msgid "On &Top"
+msgstr "ਉੱਤੇ(&T)"
+
+msgctxt "ID_ONTOP_DEFAULT"
+msgid "&Default"
+msgstr "ਡਿਫਾਲਟ(&D)"
+
+msgctxt "ID_ONTOP_ALWAYS"
+msgid "&Always"
+msgstr "ਹਮੇਸ਼ਾ(&A)"
+
+msgctxt "ID_ONTOP_WHILEPLAYING"
+msgid "While &Playing"
+msgstr "ਚਲਾਉਣ ਦੇ ਦੌਰਾਨ(&P)"
+
+msgctxt "ID_ONTOP_WHILEPLAYINGVIDEO"
+msgid "While Playing &Video"
+msgstr "ਵਿਡੀਓ ਚਲਾਉਣ ਦੇ ਦੌਰਾਨ(&V)"
+
+msgctxt "ID_VIEW_OPTIONS"
+msgid "&Options..."
+msgstr "...ਚੋਣਾਂ(&O)"
+
+msgctxt "POPUP"
+msgid "&Play"
+msgstr "ਚਲਾਓ(&P)"
+
+msgctxt "ID_PLAY_PLAYPAUSE"
+msgid "&Play/Pause"
+msgstr "ਚਲਾਓ/ਰੋਕੋ(&P)"
+
+msgctxt "ID_PLAY_STOP"
+msgid "&Stop"
+msgstr "ਰੋਕੋ(&S)"
+
+msgctxt "ID_PLAY_FRAMESTEP"
+msgid "F&rame Step"
+msgstr "ਫਰੇਮ ਸਟੈਪ(&r)"
+
+msgctxt "ID_PLAY_DECRATE"
+msgid "&Decrease Rate"
+msgstr "ਦਰ ਘਟਾਓ(&D)"
+
+msgctxt "ID_PLAY_INCRATE"
+msgid "&Increase Rate"
+msgstr "ਦਰ ਵਧਾਓ(&I)"
+
+msgctxt "ID_PLAY_RESETRATE"
+msgid "R&eset Rate"
+msgstr "ਦਰ ਮà©à©œ-ਸੈਟ ਕਰੋ(&e)"
+
+msgctxt "ID_FILTERS"
+msgid "&Filters"
+msgstr "ਫਿਲਟਰ(&F)"
+
+msgctxt "ID_SHADERS"
+msgid "S&haders"
+msgstr "ਸ਼ੇਡ(&h)"
+
+msgctxt "ID_AUDIOS"
+msgid "&Audio Track"
+msgstr "ਆਡੀਓ ਟਰੈਕ(&A)"
+
+msgctxt "ID_SUBTITLES"
+msgid "Su&btitle Track"
+msgstr "ਸਬਟਾਈਟਲ ਟਰੈਕ(&b)"
+
+msgctxt "ID_VIDEO_STREAMS"
+msgid "&Video Track"
+msgstr "ਵਿਡੀਓ ਟਰੈਕ(&V)"
+
+msgctxt "POPUP"
+msgid "&Volume"
+msgstr "ਵਾਲੀਅਮ(&V)"
+
+msgctxt "ID_VOLUME_UP"
+msgid "&Up"
+msgstr "ਉੱਤੇ(&U)"
+
+msgctxt "ID_VOLUME_DOWN"
+msgid "&Down"
+msgstr "ਹੇਠਾਂ(&D)"
+
+msgctxt "ID_VOLUME_MUTE"
+msgid "&Mute"
+msgstr "ਚà©à©±à¨ª(&M)"
+
+msgctxt "POPUP"
+msgid "Af&ter Playback"
+msgstr "ਚਲਾਉਣ ਦੇ ਬਾਅਦ(&t)"
+
+msgctxt "ID_AFTERPLAYBACK_DONOTHING"
+msgid "Do no&thing"
+msgstr "ਕà©à¨ ਨਾ ਕਰੋ(&t)"
+
+msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
+msgid "Play &next file in the folder"
+msgstr "ਫੋਲਡਰ ਵਿੱਚ ਅਗਲੀ ਫਾਈਲ ਚਲਾਓ(&n)"
+
+msgctxt "ID_AFTERPLAYBACK_MONITOROFF"
+msgid "Turn off the &monitor"
+msgstr "ਮਾਨੀਟਰ ਬੰਦ ਕਰੋ(&m)"
+
+msgctxt "ID_AFTERPLAYBACK_EXIT"
+msgid "&Exit"
+msgstr "ਬਾਹਰ ਨਿਕਲੋ(&E)"
+
+msgctxt "ID_AFTERPLAYBACK_STANDBY"
+msgid "&Stand By"
+msgstr "ਸਟੈਂਡਬਾà¨(&S)"
+
+msgctxt "ID_AFTERPLAYBACK_HIBERNATE"
+msgid "&Hibernate"
+msgstr "ਹਾਈਬਰਨੇਟ(&H)"
+
+msgctxt "ID_AFTERPLAYBACK_SHUTDOWN"
+msgid "Shut&down"
+msgstr "ਬੰਦ ਕਰੋ(&d)"
+
+msgctxt "ID_AFTERPLAYBACK_LOGOFF"
+msgid "Log &Off"
+msgstr "ਲਾਗ ਆਫ਼(&O)"
+
+msgctxt "ID_AFTERPLAYBACK_LOCK"
+msgid "&Lock"
+msgstr "ਲਾਕ ਕਰੋ(&L)"
+
+msgctxt "POPUP"
+msgid "&Navigate"
+msgstr "ਨੇਵੀਗੇਸ਼ਨ(&N)"
+
+msgctxt "ID_NAVIGATE_SKIPBACK"
+msgid "&Previous"
+msgstr "ਪਿੱਛੇ(&P)"
+
+msgctxt "ID_NAVIGATE_SKIPFORWARD"
+msgid "&Next"
+msgstr "ਅੱਗੇ(&N)"
+
+msgctxt "ID_NAVIGATE_GOTO"
+msgid "&Go To..."
+msgstr "...ਉੱਤੇ ਜਾਓ(&G)"
+
+msgctxt "ID_NAVIGATE_TITLEMENU"
+msgid "&Title Menu"
+msgstr "ਟਾਈਟਲ ਮੀਨੂ(&T)"
+
+msgctxt "ID_NAVIGATE_ROOTMENU"
+msgid "&Root Menu"
+msgstr "ਰੂਟ ਮੀਨੂ(&R)"
+
+msgctxt "ID_NAVIGATE_SUBPICTUREMENU"
+msgid "&Subtitle Menu"
+msgstr "ਸਬ-ਟਾਈਟਲ ਮੀਨੂ(&S)"
+
+msgctxt "ID_NAVIGATE_AUDIOMENU"
+msgid "&Audio Menu"
+msgstr "ਆਡੀਓ ਮੀਨੂ(&A)"
+
+msgctxt "ID_NAVIGATE_ANGLEMENU"
+msgid "An&gle Menu"
+msgstr "à¨à¨‚ਗਲ ਮੀਨੂ(&g)"
+
+msgctxt "ID_NAVIGATE_CHAPTERMENU"
+msgid "&Chapter Menu"
+msgstr "ਚੈਪਟਰ ਮੀਨੂ(&C)"
+
+msgctxt "ID_FAVORITES"
+msgid "F&avorites"
+msgstr "ਮਨਪਸੰਦ(&a)"
+
+msgctxt "POPUP"
+msgid "&Help"
+msgstr "ਮਦਦ(&H)"
+
+msgctxt "ID_HELP_HOMEPAGE"
+msgid "&Home Page"
+msgstr "ਮà©à©±à¨– ਸਫ਼ਾ(&H)"
+
+msgctxt "ID_HELP_CHECKFORUPDATE"
+msgid "Check for &updates"
+msgstr "ਅੱਪਡੇਟ ਲਈ ਜਾਂਚ ਕਰੋ(&u)"
+
+msgctxt "ID_HELP_SHOWCOMMANDLINESWITCHES"
+msgid "&Command Line Switches"
+msgstr "ਕਮਾਂਡ ਲਾਈਨ ਸਵਿੱਚਾਂ(&C)"
+
+msgctxt "ID_HELP_TOOLBARIMAGES"
+msgid "Download &Toolbar Images"
+msgstr "ਟੂਲਬਾਰ ਚਿੱਤਰ ਡਾਊਨਲੋਡ ਕਰੋ(&T)"
+
+msgctxt "ID_HELP_DONATE"
+msgid "&Donate"
+msgstr "ਦਾਨ ਦਿਓ(&D)"
+
+msgctxt "ID_HELP_ABOUT"
+msgid "&About..."
+msgstr "...ਇਸ ਬਾਰੇ(&A)"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.pa.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.pa.strings.po
new file mode 100644
index 000000000..bc81b3d9c
--- /dev/null
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.pa.strings.po
@@ -0,0 +1,3602 @@
+# MPC-HC - Strings extracted from string tables
+# Copyright (C) 2002 - 2013 see Authors.txt
+# This file is distributed under the same license as the MPC-HC package.
+# Translators:
+# A S Alam <apreet.alam@gmail.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: MPC-HC\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-10-03 14:02+0000\n"
+"Last-Translator: Underground78\n"
+"Language-Team: Panjabi (Punjabi) (http://www.transifex.com/mpc-hc/mpc-hc/language/pa/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pa\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "IDS_INFOBAR_LOCATION"
+msgid "Location"
+msgstr "ਟਿਕਾਣਾ:"
+
+msgctxt "IDS_INFOBAR_VIDEO"
+msgid "Video"
+msgstr "ਵਿਡੀਓ"
+
+msgctxt "IDS_INFOBAR_AUDIO"
+msgid "Audio"
+msgstr "ਆਡੀਓ"
+
+msgctxt "IDS_INFOBAR_SUBTITLES"
+msgid "Subtitles"
+msgstr "ਸਬ-ਟਾਈਟਲ"
+
+msgctxt "IDS_INFOBAR_CHAPTER"
+msgid "Chapter"
+msgstr "ਚੈਪਟਰ"
+
+msgctxt "IDS_CONTROLS_COMPLETING"
+msgid "Completing..."
+msgstr "...ਪੂਰਾ ਕਰ ਰਿਹਾ ਹੈ"
+
+msgctxt "IDS_AUTOPLAY_PLAYVIDEO"
+msgid "Play Video"
+msgstr "ਵਿਡੀਓ ਚਲਾਓ"
+
+msgctxt "IDS_AUTOPLAY_PLAYMUSIC"
+msgid "Play Music"
+msgstr "ਸੰਗੀਤ ਚਲਾਓ"
+
+msgctxt "IDS_AUTOPLAY_PLAYAUDIOCD"
+msgid "Play Audio CD"
+msgstr "ਆਡੀਓ CD ਚਲਾਓ"
+
+msgctxt "IDS_AUTOPLAY_PLAYDVDMOVIE"
+msgid "Play DVD Movie"
+msgstr "DVD ਮੂਵੀ ਚਲਾਓ"
+
+msgctxt "IDS_PROPSHEET_PROPERTIES"
+msgid "Properties"
+msgstr "ਵਿਸ਼ੇਸ਼ਤਾ"
+
+msgctxt "IDS_SUBTITLES_DEFAULT_STYLE"
+msgid "&Default Style"
+msgstr "ਡਿਫਾਲਟ ਸ਼ੈਲੀ(&D)"
+
+msgctxt "IDS_FAVFILES"
+msgid "Files"
+msgstr "ਫ਼ਾਈਲਾਂ"
+
+msgctxt "IDS_FAVDVDS"
+msgid "DVDs"
+msgstr "DVD"
+
+msgctxt "IDS_INFOBAR_CHANNEL"
+msgid "Channel"
+msgstr "ਚੈਨਲ"
+
+msgctxt "IDS_INFOBAR_TIME"
+msgid "Time"
+msgstr "ਸਮਾਂ"
+
+msgctxt "IDS_STATSBAR_SYNC_OFFSET"
+msgid "Sync Offset"
+msgstr "ਸਿੰਕ ਆਫ਼ਸੈਟ"
+
+msgctxt "IDS_STATSBAR_SYNC_OFFSET_FORMAT"
+msgid "avg: %d ms, dev: %d ms"
+msgstr "ਔਸਤ: %d ms, ਡੇਵੀ.: %d ms"
+
+msgctxt "IDS_STATSBAR_JITTER"
+msgid "Jitter"
+msgstr "ਜਿੱਟਰ"
+
+msgctxt "IDS_STATSBAR_BITRATE"
+msgid "Bitrate"
+msgstr "ਬਿੱਟਰੇਟ"
+
+msgctxt "IDS_STATSBAR_BITRATE_AVG_CUR"
+msgid "(avg/cur)"
+msgstr "(ਔਸਤ/ਮੌਜੂਦ)"
+
+msgctxt "IDS_STATSBAR_SIGNAL"
+msgid "Signal"
+msgstr "ਸਿਗਨਲ"
+
+msgctxt "IDS_STATSBAR_SIGNAL_FORMAT"
+msgid "Strength: %d dB, Quality: %ld%%"
+msgstr "ਮਜ਼ਬੂਤੀ: %d dB, ਕà©à¨†à¨²à¨Ÿà©€: %ld%%"
+
+msgctxt "IDS_SUBTITLES_STYLES_CAPTION"
+msgid "Styles"
+msgstr "ਸ਼ੈਲੀਆਂ"
+
+msgctxt "IDS_TEXT_SUB_RENDERING_TARGET"
+msgid "If the rendering target is left undefined, SSA/ASS subtitles will be rendered relative to the video frame while all other text subtitles will be rendered relative to the window."
+msgstr ""
+
+msgctxt "IDS_PPAGE_CAPTURE_FG0"
+msgid "Never (fastest approach)"
+msgstr "ਕਦੇ ਨਹੀਂ (ਸਭ ਤੋਂ ਤੇਜ਼ ਢੰਗ)"
+
+msgctxt "IDS_PPAGE_CAPTURE_FG1"
+msgid "Only when switching different video types (default)"
+msgstr "ਕੇਵਲ ਵੱਖ-ਵੱਖ ਵਿਡੀਓ ਕਿਸਮਾਂ ਬਦਲਣ ਦੌਰਾਨ ਹੀ (ਡਿਫਾਲਟ)"
+
+msgctxt "IDS_PPAGE_CAPTURE_FG2"
+msgid "Always (slowest option)"
+msgstr "ਹਮੇਸ਼ਾ (ਸਭ ਤੋਂ ਹੌਲੀ ਚੋਣ)"
+
+msgctxt "IDS_PPAGE_CAPTURE_FGDESC0"
+msgid "Not supported by some devices. Two video decoders always present in the filter graph."
+msgstr "ਕà©à¨ ਜੰਤਰ ਸਹਾਇਕ ਨਹੀਂ ਹਨ। ਫਿਲਟਰ ਗਰਾਫ਼ ਵਿੱਚ ਦੋ ਵਿਡੀਓ ਡੀਕੋਡਰ ਹਮੇਸ਼ਾ ਮੌਜੂਦ ਹà©à©°à¨¦à©‡ ਹਨ।"
+
+msgctxt "IDS_PPAGE_CAPTURE_FGDESC1"
+msgid "Fast except when switching between different video streams. Only one video decoder present in the filter graph."
+msgstr ""
+
+msgctxt "IDS_PPAGE_CAPTURE_FGDESC2"
+msgid "Not recommended. Only for testing purposes."
+msgstr "ਸਿਫ਼ਾਰਸ਼ੀ ਨਹੀਂ ਹੈ। ਕੇਵਲ ਟੈਸਟ ਕਰਨ ਲਈ ਹੀ ਹੈ।"
+
+msgctxt "IDS_PPAGE_CAPTURE_SFG0"
+msgid "Never if possible (fastest, but not supported by most filters)"
+msgstr "ਜੇ ਸੰਭਵ ਹੋਵੇ ਤਾਂ ਕਦੇ ਨਹੀਂ (ਸਭ ਤੋਂ ਤੇਜ਼, ਪਰ ਬਹà©à¨¤à©‡ ਫਿਲਟਰਾਂ ਰਾਹੀਂ ਸਹਾਇਕ ਨਹੀਂ ਹੈ)"
+
+msgctxt "IDS_PPAGE_CAPTURE_SFG1"
+msgid "Only when switching different video types (default)"
+msgstr "ਕੇਵਲ ਵੱਖ-ਵੱਖ ਵਿਡੀਓ ਕਿਸਮਾਂ ਬਦਲਣ ਦੌਰਾਨ ਹੀ (ਡਿਫਾਲਟ)"
+
+msgctxt "IDS_PPAGE_CAPTURE_SFG2"
+msgid "Always (may be required by some devices)"
+msgstr "ਹਮੇਸ਼ਾ (ਕà©à¨ ਜੰਤਰਾਂ ਵਲੋਂ ਚਾਹੀਦਾ ਹੋ ਸਕਦਾ ਹੈ)"
+
+msgctxt "IDS_INFOBAR_PARENTAL_RATING"
+msgid "Parental rating"
+msgstr "ਮਾਪੇ ਰੇਟਿੰਗ"
+
+msgctxt "IDS_PARENTAL_RATING"
+msgid "%d+"
+msgstr "%d+"
+
+msgctxt "IDS_NO_PARENTAL_RATING"
+msgid "Not rated"
+msgstr "ਰੇਟ ਨਹੀਂ ਕੀਤਾ"
+
+msgctxt "IDS_INFOBAR_CONTENT"
+msgid "Content"
+msgstr "ਸਮੱਗਰੀ"
+
+msgctxt "IDS_CONTENT_MOVIE_DRAMA"
+msgid "Movie/Drama"
+msgstr "ਮੂਵੀ/ਡਰਾਮਾ"
+
+msgctxt "IDS_CONTENT_NEWS_CURRENTAFFAIRS"
+msgid "News/Current affairs"
+msgstr "ਖ਼ਬਰਾਂ/ਮੌਜੂਦਾ ਮਾਮਲੇ"
+
+msgctxt "IDS_SPEED_UNIT_G"
+msgid "GB/s"
+msgstr "GB/s"
+
+msgctxt "IDS_FILE_FAV_ADDED"
+msgid "File added to favorites"
+msgstr "ਫ਼ਾਈਲ ਮਨਪਸੰਦ ਵਿੱਚ ਜੋੜੀ ਗਈ"
+
+msgctxt "IDS_DVD_FAV_ADDED"
+msgid "DVD added to favorites"
+msgstr "DVD ਮਨਪਸੰਦ ਵਿੱਚ ਜੋੜੀ ਗਈ"
+
+msgctxt "IDS_CAPTURE_SETTINGS"
+msgid "Capture Settings"
+msgstr "ਕੈਪਚਰ ਸੈਟਿੰਗਾਂ"
+
+msgctxt "IDS_NAVIGATION_BAR"
+msgid "Navigation Bar"
+msgstr "ਨੇਵੀਗੇਸ਼ਨ ਪੱਟੀ"
+
+msgctxt "IDS_SUBRESYNC_CAPTION"
+msgid "Subresync"
+msgstr "ਸਬ-ਰੀਸਿੰਕ"
+
+msgctxt "IDS_SUBRESYNC_CLN_TIME"
+msgid "Time"
+msgstr "ਸਮਾਂ"
+
+msgctxt "IDS_SUBRESYNC_CLN_END"
+msgid "End"
+msgstr "ਅੰਤ"
+
+msgctxt "IDS_SUBRESYNC_CLN_PREVIEW"
+msgid "Preview"
+msgstr "à¨à¨²à¨•"
+
+msgctxt "IDS_SUBRESYNC_CLN_VOB_ID"
+msgid "Vob ID"
+msgstr "ਵੋਬ ID"
+
+msgctxt "IDS_SUBRESYNC_CLN_CELL_ID"
+msgid "Cell ID"
+msgstr "ਸੈਲ ID"
+
+msgctxt "IDS_SUBRESYNC_CLN_FORCED"
+msgid "Forced"
+msgstr "ਮਜ਼ਬੂਰ ਕੀਤਾ"
+
+msgctxt "IDS_SUBRESYNC_CLN_TEXT"
+msgid "Text"
+msgstr "ਟੈਕਸਟ"
+
+msgctxt "IDS_SUBRESYNC_CLN_STYLE"
+msgid "Style"
+msgstr "ਸ਼ੈਲੀ"
+
+msgctxt "IDS_SUBRESYNC_CLN_FONT"
+msgid "Font"
+msgstr "ਫ਼ੋਂਟ"
+
+msgctxt "IDS_DVD_NAV_SOME_PINS_ERROR"
+msgid "Failed to render some of the pins of the DVD Navigator filter"
+msgstr ""
+
+msgctxt "IDS_DVD_INTERFACES_ERROR"
+msgid "Failed to query the needed interfaces for DVD playback"
+msgstr ""
+
+msgctxt "IDS_CAPTURE_LIVE"
+msgid "Live"
+msgstr "ਲਾਈਵ"
+
+msgctxt "IDS_CAPTURE_ERROR_VID_FILTER"
+msgid "Can't add video capture filter to the graph"
+msgstr ""
+
+msgctxt "IDS_CAPTURE_ERROR_AUD_FILTER"
+msgid "Can't add audio capture filter to the graph"
+msgstr ""
+
+msgctxt "IDS_CAPTURE_ERROR_DEVICE"
+msgid "Could not open capture device."
+msgstr ""
+
+msgctxt "IDS_INVALID_PARAMS_ERROR"
+msgid "Can't open, invalid input parameters"
+msgstr ""
+
+msgctxt "IDS_EDIT_LIST_EDITOR"
+msgid "Edit List Editor"
+msgstr "ਲਿਸਟ à¨à¨¡à©€à¨Ÿà¨° ਸੋਧੋ"
+
+msgctxt "IDS_GOTO_ERROR_INVALID_TIME"
+msgid "The entered time is greater than the file duration."
+msgstr ""
+
+msgctxt "IDS_MISSING_ICONS_LIB"
+msgid "The icons library \"mpciconlib.dll\" is missing.\nThe player's default icon will be used for file associations.\nPlease, reinstall MPC-HC to get \"mpciconlib.dll\"."
+msgstr ""
+
+msgctxt "IDS_SUBDL_DLG_FILENAME_COL"
+msgid "File"
+msgstr "ਫ਼ਾਈਲ"
+
+msgctxt "IDS_SUBDL_DLG_LANGUAGE_COL"
+msgid "Language"
+msgstr "ਭਾਸ਼ਾ"
+
+msgctxt "IDS_SUBDL_DLG_FORMAT_COL"
+msgid "Format"
+msgstr "ਫਾਰਮੈਟ"
+
+msgctxt "IDS_SUBDL_DLG_DISC_COL"
+msgid "Disc"
+msgstr "ਡਿਸਕ"
+
+msgctxt "IDS_SUBDL_DLG_TITLES_COL"
+msgid "Title(s)"
+msgstr "ਟਾਈਟ"
+
+msgctxt "IDS_SUBRESYNC_CLN_CHARSET"
+msgid "CharSet"
+msgstr "ਅੱਖਰ-ਸਮੂਹ"
+
+msgctxt "IDS_SUBRESYNC_CLN_UNICODE"
+msgid "Unicode"
+msgstr "ਯੂਨੀਕੋਡ"
+
+msgctxt "IDS_SUBRESYNC_CLN_LAYER"
+msgid "Layer"
+msgstr "ਲੇਅਰ"
+
+msgctxt "IDS_SUBRESYNC_CLN_ACTOR"
+msgid "Actor"
+msgstr "à¨à¨•à¨Ÿà¨°"
+
+msgctxt "IDS_SUBRESYNC_CLN_EFFECT"
+msgid "Effect"
+msgstr "ਪਰਭਾਵ"
+
+msgctxt "IDS_PLAYLIST_CAPTION"
+msgid "Playlist"
+msgstr "ਪਲੇਅਲਿਸਟ"
+
+msgctxt "IDS_PPAGE_FS_CLN_ON_OFF"
+msgid "On/Off"
+msgstr "ਚਾਲੂ/ਬੰਦ"
+
+msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
+msgid "From (FPS)"
+msgstr ""
+
+msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
+msgid "To (FPS)"
+msgstr ""
+
+msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
+msgid "Display mode (Hz)"
+msgstr "ਡਿਸਪਲੇਅ ਮੋਡ (Hz)"
+
+msgctxt "IDS_PPAGE_FS_DEFAULT"
+msgid "Default"
+msgstr "ਡਿਫਾਲਟ"
+
+msgctxt "IDS_PPAGE_FS_OTHER"
+msgid "Other"
+msgstr "ਹੋਰ"
+
+msgctxt "IDS_PPAGE_OUTPUT_SYS_DEF"
+msgid "System Default"
+msgstr "ਸਿਸਟਮ ਡਿਫਾਲਟ"
+
+msgctxt "IDS_GRAPH_INTERFACES_ERROR"
+msgid "Failed to query the needed interfaces for playback"
+msgstr "ਚਲਾਓ ਲਈ ਲੋੜੀਂਦੇ ਇੰਟਰਫੇਸ ਨਾਲ ਕਿਊਰੀ ਕਰਨ ਲਈ ਫੇਲà©à¨¹ ਹੈ"
+
+msgctxt "IDS_GRAPH_TARGET_WND_ERROR"
+msgid "Could not set target window for graph notification"
+msgstr "ਗਰਾਫ਼ ਸੂਚਨਾ ਲਈ ਟਾਰਗੇਟ ਵਿੰਡੋ ਸੈਟ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕੀ"
+
+msgctxt "IDS_DVD_NAV_ALL_PINS_ERROR"
+msgid "Failed to render all pins of the DVD Navigator filter"
+msgstr "DVD ਨੇਵੀਗੇਟਰ ਫਿਲਟਰ ਦੇ ਸਭ ਪਿੰਨਾਂ ਨੂੰ ਰੈਂਡਰ ਕਰਨ ਲਈ ਫੇਲà©à¨¹ ਹੈ"
+
+msgctxt "IDS_PLAYLIST_OPEN"
+msgid "&Open"
+msgstr "ਖੋਲà©à¨¹à©‹(&O)"
+
+msgctxt "IDS_PLAYLIST_ADD"
+msgid "A&dd"
+msgstr "ਜੋੜੋ(&d)"
+
+msgctxt "IDS_PLAYLIST_REMOVE"
+msgid "&Remove"
+msgstr "ਹਟਾਓ(&R)"
+
+msgctxt "IDS_PLAYLIST_CLEAR"
+msgid "C&lear"
+msgstr "ਸਾਫ਼ ਕਰੋ(&l)"
+
+msgctxt "IDS_PLAYLIST_COPYTOCLIPBOARD"
+msgid "&Copy to clipboard"
+msgstr "ਕਲਿੱਪਬੋਰਡ ਵਿੱਚ ਕਾਪੀ ਕਰੋ(&C)"
+
+msgctxt "IDS_PLAYLIST_SAVEAS"
+msgid "&Save As..."
+msgstr "...ਇੰਠਸੰਭਾਲੋ(&S)"
+
+msgctxt "IDS_PLAYLIST_SORTBYLABEL"
+msgid "Sort by &label"
+msgstr "ਲੇਬਲ ਨਾਲ ਲੜੀਬੱਧ(&l)"
+
+msgctxt "IDS_PLAYLIST_SORTBYPATH"
+msgid "Sort by &path"
+msgstr "ਪਾਥ ਰਾਹੀਂ ਲੜੀਬੱਧ(&p)"
+
+msgctxt "IDS_PLAYLIST_RANDOMIZE"
+msgid "R&andomize"
+msgstr "ਰੈਂਡਮਾਈਜ਼(&a)"
+
+msgctxt "IDS_PLAYLIST_RESTORE"
+msgid "R&estore"
+msgstr "ਮà©à©œ-ਸਟੋਰ ਕਰੋ(&e)"
+
+msgctxt "IDS_SUBRESYNC_SEPARATOR"
+msgid "&Separator"
+msgstr "ਵੱਖਰੇਵਾਂ(&S)"
+
+msgctxt "IDS_SUBRESYNC_DELETE"
+msgid "&Delete"
+msgstr "ਹਟਾਓ(&D)"
+
+msgctxt "IDS_SUBRESYNC_DUPLICATE"
+msgid "D&uplicate"
+msgstr "ਡà©à¨ªà¨²à©€à¨•à©‡à¨Ÿ(&u)"
+
+msgctxt "IDS_SUBRESYNC_RESET"
+msgid "&Reset"
+msgstr "ਮà©à©œ-ਸੈੱਟ ਕਰੋ(&R)"
+
+msgctxt "IDS_MPLAYERC_104"
+msgid "Subtitle Delay -"
+msgstr "ਸਬ-ਟਾਈਟਲ ਦੇਰੀ -"
+
+msgctxt "IDS_MPLAYERC_105"
+msgid "Subtitle Delay +"
+msgstr "ਸਬ-ਟਾਈਟਲ ਦੇਰੀ +"
+
+msgctxt "IDS_FILE_SAVE_THUMBNAILS"
+msgid "Save thumbnails"
+msgstr "ਥੰਮਨੇਲ ਸੰਭਾਲੋ"
+
+msgctxt "IDD_PPAGEPLAYBACK"
+msgid "Playback"
+msgstr "ਚਲਾਓ"
+
+msgctxt "IDD_PPAGEPLAYER"
+msgid "Player"
+msgstr "ਪਲੇਅਰ"
+
+msgctxt "IDD_PPAGEDVD"
+msgid "Playback::DVD/OGM"
+msgstr "ਚਲਾਓ::DVD/OGM"
+
+msgctxt "IDD_PPAGESUBTITLES"
+msgid "Subtitles"
+msgstr "ਸਬ-ਟਾਈਟਲ"
+
+msgctxt "IDD_PPAGEFORMATS"
+msgid "Player::Formats"
+msgstr "ਚਲਾਓ::ਫਾਰਮੈਟ"
+
+msgctxt "IDD_PPAGETWEAKS"
+msgid "Tweaks"
+msgstr "ਟਵੀਕ"
+
+msgctxt "IDD_PPAGEAUDIOSWITCHER"
+msgid "Internal Filters::Audio Switcher"
+msgstr "ਅੰਦਰੂਨੀ ਫਿਲਟਰ::ਆਡੀਓ ਸਵਿੱਚਰ"
+
+msgctxt "IDD_PPAGEEXTERNALFILTERS"
+msgid "External Filters"
+msgstr "ਬਾਹਰੀ ਫਿਲਟਰ"
+
+msgctxt "IDD_PPAGESHADERS"
+msgid "Playback::Shaders"
+msgstr "ਚਲਾਓ::ਸ਼ੇਡਰ"
+
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "ਸਰੋਤ"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "ਫà©à¨Ÿà¨•à¨²"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "ਮੀਡੀਆ-ਜਾਣਕਾਰੀ"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "ਚਲਾਓ::ਕੈਪਚਰ"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "ਚਲਾਓ::ਸਿੰਕ ਰੈਂਡਰਰ ਸੈਟਿੰਗਾਂ"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "ਚਲਾਓ::ਪੂਰੀ ਸਕਰੀਨ"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
+msgctxt "IDS_AUDIOSWITCHER"
+msgid "Audio Switcher"
+msgstr "ਆਡੀਓ ਸਵਿੱਚਰ"
+
+msgctxt "IDS_ICONS_REASSOC_DLG_TITLE"
+msgid "New version of the icon library"
+msgstr "ਆਈਕਾਨ ਲਾਇਬਰੇਰੀ ਦਾ ਨਵਾਂ ਵਰਜ਼ਨ"
+
+msgctxt "IDS_ICONS_REASSOC_DLG_INSTR"
+msgid "Do you want to reassociate the icons?"
+msgstr "ਕੀ ਤà©à¨¸à©€à¨‚ ਆਈਕਾਨ ਨੂੰ ਮà©à©œ-ਸੰਬੰਧਿਤ ਕਰਨਾ ਚਾਹà©à©°à¨¦à©‡ ਹੋ?"
+
+msgctxt "IDS_ICONS_REASSOC_DLG_CONTENT"
+msgid "This will fix the icons being incorrectly displayed after an update of the icon library.\nThe file associations will not be modified, only the corresponding icons will be refreshed."
+msgstr ""
+
+msgctxt "IDS_PPAGE_OUTPUT_OLDRENDERER"
+msgid "Old Video Renderer"
+msgstr "ਪà©à¨°à¨¾à¨£à¨¾ ਵਿਡੀਓ ਰੈਂਡਰਰ"
+
+msgctxt "IDS_PPAGE_OUTPUT_OVERLAYMIXER"
+msgid "Overlay Mixer Renderer"
+msgstr "ਓਵਰਲੇਅ ਮਿਕਸਰ ਰੈਂਡਰਰ"
+
+msgctxt "IDS_PPAGE_OUTPUT_VMR7WINDOWED"
+msgid "Video Mixing Renderer 7 (windowed)"
+msgstr "ਵਿਡੀਓ ਮਿਕਿੰਗ ਰੈਂਡਰਰ 7 (ਵਿੰਡੋਡ)"
+
+msgctxt "IDS_PPAGE_OUTPUT_VMR9WINDOWED"
+msgid "Video Mixing Renderer 9 (windowed)"
+msgstr "ਵਿਡੀਓ ਮਿਕਸਿੰਗ ਰੈਂਡਰਰ 9 (ਵਿੰਡੋਡ)"
+
+msgctxt "IDS_PPAGE_OUTPUT_VMR7RENDERLESS"
+msgid "Video Mixing Renderer 7 (renderless)"
+msgstr "ਵਿਡੀਓ ਮਿਕਿੰਗ ਰੈਂਡਰਰ 7 (ਰੈਂਡਰ-ਬਗੈਰ)"
+
+msgctxt "IDS_PPAGE_OUTPUT_VMR9RENDERLESS"
+msgid "Video Mixing Renderer 9 (renderless)"
+msgstr "ਵਿਡੀਓ ਮਿਕਸਿੰਗ ਰੈਂਡਰਰ 9 (ਰੈਂਡਰ-ਬਗੈਰ)"
+
+msgctxt "IDS_PPAGE_OUTPUT_EVR"
+msgid "Enhanced Video Renderer"
+msgstr "ਸà©à¨§à¨¾à¨°à¨¿à¨† ਵਿਡੀਓ ਰੈਂਡਰਰ"
+
+msgctxt "IDS_PPAGE_OUTPUT_EVR_CUSTOM"
+msgid "Enhanced Video Renderer (custom presenter)"
+msgstr "ਸà©à¨§à¨¾à¨°à¨¿à¨† ਵਿਡੀਓ ਰੈਂਡਰਰ (ਕਸਟਮ ਪਰਿਸੈਂਟਰ)"
+
+msgctxt "IDS_PPAGE_OUTPUT_DXR"
+msgid "Haali Video Renderer"
+msgstr "ਹਾਲੀ ਵਿਡੀਓ ਰੈਂਡਰਰ"
+
+msgctxt "IDS_PPAGE_OUTPUT_NULL_COMP"
+msgid "Null (anything)"
+msgstr "ਨਲ (ਕà©à¨ ਵੀ)"
+
+msgctxt "IDS_PPAGE_OUTPUT_NULL_UNCOMP"
+msgid "Null (uncompressed)"
+msgstr "ਨਲ (ਬਿਨਾਂ-ਕੰਪੈਰਸ ਕੀਤਾ)"
+
+msgctxt "IDS_PPAGE_OUTPUT_MADVR"
+msgid "madVR"
+msgstr "madVR"
+
+msgctxt "IDD_PPAGEACCELTBL"
+msgid "Player::Keys"
+msgstr "ਪਲੇਅਰ::ਸਵਿੱਚਾਂ"
+
+msgctxt "IDD_PPAGESUBSTYLE"
+msgid "Subtitles::Default Style"
+msgstr "ਸਬ-ਟਾਈਟਲ::ਡਿਫਾਲਟ ਸ਼ੈਲੀ"
+
+msgctxt "IDD_PPAGEINTERNALFILTERS"
+msgid "Internal Filters"
+msgstr "ਅੰਦਰੂਨੀ ਫਿਲਟਰ"
+
+msgctxt "IDD_PPAGELOGO"
+msgid "Player::Logo"
+msgstr "ਪਲੇਅਰ::ਲੋਗੋ"
+
+msgctxt "IDD_PPAGEOUTPUT"
+msgid "Playback::Output"
+msgstr "ਚਲਾਓ::ਆਉਟਪà©à©±à¨Ÿ"
+
+msgctxt "IDD_PPAGEWEBSERVER"
+msgid "Player::Web Interface"
+msgstr "ਪਲੇਅਰ::ਵੈਬ ਇੰਟਰਫੇਸ"
+
+msgctxt "IDD_PPAGESUBDB"
+msgid "Subtitles::Database"
+msgstr "ਸਬ-ਟਾਈਟਲ::ਡਾਟਾਬੇਸ"
+
+msgctxt "IDD_FILEPROPDETAILS"
+msgid "Details"
+msgstr "ਵੇਰਵੇ"
+
+msgctxt "IDD_FILEPROPCLIP"
+msgid "Clip"
+msgstr "ਕਲਿੱਪ"
+
+msgctxt "IDC_DSSYSDEF"
+msgid "Default video renderer filter for DirectShow. Others will fall back to this one when they can't be loaded for some reason. On Windown XP this is the same as VMR-7 (windowed)."
+msgstr ""
+
+msgctxt "IDC_DSOLD"
+msgid "This is the default renderer of Windows 9x/me/2k. Depending on the visibility of the video window and your video card's abilities, it will switch between GDI, DirectDraw, Overlay rendering modes dynamically."
+msgstr ""
+
+msgctxt "IDC_DSOVERLAYMIXER"
+msgid "Always renders in overlay. Generally only YUV formats are allowed, but they are presented directly without any color conversion to RGB. This is the fastest rendering method of all and the only where you can be sure about fullscreen video mirroring to tv-out activating."
+msgstr ""
+
+msgctxt "IDC_DSVMR7WIN"
+msgid "The default renderer of Windows XP. Very stable and just a little slower than the Overlay mixer. Uses DirectDraw and runs in Overlay when it can."
+msgstr ""
+
+msgctxt "IDC_DSVMR9WIN"
+msgid "Only available if you have DirectX 9 installed. Has the same abilities as VMR-7 (windowed), but it will never use Overlay rendering and because of this it may be a little slower than VMR-7 (windowed)."
+msgstr ""
+
+msgctxt "IDC_DSVMR7REN"
+msgid "Same as the VMR-7 (windowed), but with the Allocator-Presenter plugin of MPC-HC for subtitling. Overlay video mirroring WILL NOT work. \"True Color\" desktop color space recommended."
+msgstr ""
+
+msgctxt "IDC_DSVMR9REN"
+msgid "Same as the VMR-9 (windowed), but with the Allocator-Presenter plugin of MPC-HC for subtitling. Overlay video mirroring MIGHT work. \"True Color\" desktop color space recommended. Recommended for Windows XP."
+msgstr ""
+
+msgctxt "IDC_DSDXR"
+msgid "Same as the VMR-9 (renderless), but uses a true two-pass bicubic resizer."
+msgstr ""
+
+msgctxt "IDC_DSNULL_COMP"
+msgid "Connects to any video-like media type and will send the incoming samples to nowhere. Use it when you don't need the video display and want to save the CPU from working unnecessarily."
+msgstr ""
+
+msgctxt "IDC_DSNULL_UNCOMP"
+msgid "Same as the normal Null renderer, but this will only connect to uncompressed types."
+msgstr ""
+
+msgctxt "IDC_DSEVR"
+msgid "Only available on Vista or later or on XP with at least .NET Framework 3.5 installed."
+msgstr ""
+
+msgctxt "IDC_DSEVR_CUSTOM"
+msgid "Same as the EVR, but with the Allocator-Presenter of MPC-HC for subtitling and postprocessing. Recommended for Windows Vista or later."
+msgstr ""
+
+msgctxt "IDC_DSMADVR"
+msgid "High-quality renderer, requires a GPU that supports D3D9 or later."
+msgstr ""
+
+msgctxt "IDC_DSSYNC"
+msgid "Same as the EVR (CP), but offers several options to synchronize the video frame rate with the display refresh rate to eliminate skipped or duplicated video frames."
+msgstr ""
+
+msgctxt "IDC_RMSYSDEF"
+msgid "Real's own renderer. SMIL scripts will work, but interaction not likely. Uses DirectDraw and runs in Overlay when it can."
+msgstr ""
+
+msgctxt "IDC_RMDX7"
+msgid "The output of Real's engine rendered by the DX7-based Allocator-Presenter of VMR-7 (renderless)."
+msgstr ""
+
+msgctxt "IDC_RMDX9"
+msgid "The output of Real's engine rendered by the DX9-based Allocator-Presenter of VMR-9 (renderless)."
+msgstr ""
+
+msgctxt "IDC_QTSYSDEF"
+msgid "QuickTime's own renderer. Gets a little slow when its video area is resized or partially covered by another window. When Overlay is not available it likes to fall back to GDI."
+msgstr ""
+
+msgctxt "IDC_QTDX7"
+msgid "The output of QuickTime's engine rendered by the DX7-based Allocator-Presenter of VMR-7 (renderless)."
+msgstr ""
+
+msgctxt "IDC_QTDX9"
+msgid "The output of QuickTime's engine rendered by the DX9-based Allocator-Presenter of VMR-9 (renderless)."
+msgstr ""
+
+msgctxt "IDC_REGULARSURF"
+msgid "Video surface will be allocated as a regular offscreen surface."
+msgstr ""
+
+msgctxt "IDS_PPAGE_OUTPUT_SYNC"
+msgid "Sync Renderer"
+msgstr "ਸਿੰਕ ਰੈਂਡਰਰ"
+
+msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
+msgid "Regular offscreen plain surface"
+msgstr "ਨਿਯਮਤ ਆਫਸਕਰੀਨ ਪਲੇਨ ਸਰਫੇਸ"
+
+msgctxt "IDS_PPAGE_OUTPUT_SURF_2D"
+msgid "2D surfaces"
+msgstr "2D ਸਰਫੇਸ"
+
+msgctxt "IDS_PPAGE_OUTPUT_SURF_3D"
+msgid "3D surfaces (recommended)"
+msgstr "3D ਸਰਫੇਸ (ਸਿਫਾਰਸ਼ੀ)"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZE_NN"
+msgid "Nearest neighbor"
+msgstr "ਸਭ ਤੋਂ ਨੇੜਲੇ ਗà©à¨†à¨‚ਢੀ"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BILIN"
+msgid "Bilinear"
+msgstr "ਬਾਈਲੀਨੀਅਰ"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BIL_PS"
+msgid "Bilinear (PS 2.0)"
+msgstr "ਬਾਈਲੀਨੀਅਰ (PS 2.0)"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BICUB1"
+msgid "Bicubic A=-0.60 (PS 2.0)"
+msgstr "ਬਾਈਕਿਊਬਕ A=-0.60 (PS 2.0)"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BICUB2"
+msgid "Bicubic A=-0.75 (PS 2.0)"
+msgstr "ਬਾਈਕਿਊਬਕ A=-0.75 (PS 2.0)"
+
+msgctxt "IDS_PPAGE_OUTPUT_RESIZER_BICUB3"
+msgid "Bicubic A=-1.00 (PS 2.0)"
+msgstr "ਬਾਈਕਿਊਬਕ A=-1.00 (PS 2.0)"
+
+msgctxt "IDS_PPAGE_OUTPUT_UNAVAILABLE"
+msgid "**unavailable**"
+msgstr "**ਨਾ-ਮੌਜੂਦ**"
+
+msgctxt "IDS_PPAGE_OUTPUT_UNAVAILABLEMSG"
+msgid "The selected renderer is not installed."
+msgstr "ਚà©à¨£à¨¿à¨† ਰੈਂਡਰਰ ਇੰਸਟਾਲ ਨਹੀਂ ਹੈ।"
+
+msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_COMP"
+msgid "Null (anything)"
+msgstr "ਨਲ (ਕà©à¨ ਵੀ)"
+
+msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
+msgid "Null (uncompressed)"
+msgstr "ਨਲ (ਬਿਨਾਂ-ਕੰਪੈਰਸ ਕੀਤਾ)"
+
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr ""
+
+msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
+msgid "Name"
+msgstr "ਨਾਂ"
+
+msgctxt "IDS_EMB_RESOURCES_VIEWER_TYPE"
+msgid "MIME Type"
+msgstr "MIME ਕਿਸਮ"
+
+msgctxt "IDS_EMB_RESOURCES_VIEWER_INFO"
+msgid "In order to view an embedded resource in your browser you have to enable the web interface.\n\nUse the \"Save As\" button if you only want to save the information."
+msgstr ""
+
+msgctxt "IDS_DOWNLOAD_SUBS"
+msgid "Download subtitles"
+msgstr "ਸਬ-ਟਾਈਟਲ ਡਾਊਨਲੋਡ ਕਰੋ"
+
+msgctxt "IDS_SUBFILE_DELAY"
+msgid "Delay (ms):"
+msgstr "ਦੇਰੀ (ਮਿਲੀਸਕਿੰਟ):"
+
+msgctxt "IDS_SPEEDSTEP_AUTO"
+msgid "Auto"
+msgstr "ਆਟੋ"
+
+msgctxt "IDS_EXPORT_SETTINGS_NO_KEYS"
+msgid "There are no customized keys to export."
+msgstr "ਬਰਾਮਦ ਕਰਨ ਲਈ ਕੋਈ ਕਸਟਮਾਈਜ਼ ਸਵਿੱਚਾਂ ਨਹੀਂ ਹਨ।"
+
+msgctxt "IDS_RFS_NO_FILES"
+msgid "No media files found in the archive"
+msgstr "ਅਕਾਇਵ ਵਿੱਚ ਕੋਈ ਮੀਡੀਆ ਫ਼ਾਈਲ ਨਹੀਂ ਲੱਭੀ"
+
+msgctxt "IDS_RFS_COMPRESSED"
+msgid "Compressed files are not supported"
+msgstr "ਕੰਪਰੈਸ ਕੀਤੀਆਂ ਫ਼ਾਈਲਾਂ ਸਹਾਇਕ ਨਹੀਂ ਹਨ"
+
+msgctxt "IDS_RFS_ENCRYPTED"
+msgid "Encrypted files are not supported"
+msgstr "ਇੰਕà©à¨°à¨¿à¨ªà¨Ÿ ਕੀਤੀਆਂ ਫ਼ਾਈਲਾਂ ਸਹਾਇਕ ਨਹੀਂ ਹਨ"
+
+msgctxt "IDS_RFS_MISSING_VOLS"
+msgid "Couldn't find all archive volumes"
+msgstr "ਸਭ ਅਕਾਇਵ ਵਾਲੀਅਮ ਲੱਭੇ ਨਹੀਂ ਜਾ ਸਕੇ"
+
+msgctxt "IDC_TEXTURESURF2D"
+msgid "Video surface will be allocated as a texture but still the 2d functions will be used to copy and stretch it onto the backbuffer. Requires a video card which can allocate 32-bit, RGBA, non-power-of-two sized textures and at least in the resolution of the video."
+msgstr ""
+
+msgctxt "IDC_TEXTURESURF3D"
+msgid "Video surface will be allocated as a texture and drawn as two triangles in 3d. Antialiasing turned on at the display settings may have a bad effect on the rendering speed."
+msgstr ""
+
+msgctxt "IDC_DX9RESIZER_COMBO"
+msgid "If there is no Pixel Shader 2.0 support, simple bilinear is used automatically."
+msgstr ""
+
+msgctxt "IDC_DSVMR9LOADMIXER"
+msgid "Puts VMR-9 (renderless) into mixer mode, this means most of the controls on its property page will work and it will use a separate worker thread to renderer frames."
+msgstr ""
+
+msgctxt "IDC_DSVMR9YUVMIXER"
+msgid "Improves performance at the cost of some compatibility of the renderer."
+msgstr ""
+
+msgctxt "IDC_FULLSCREEN_MONITOR_CHECK"
+msgid "Reduces tearing but prevents the toolbar from being shown."
+msgstr ""
+
+msgctxt "IDC_DSVMR9ALTERNATIVEVSYNC"
+msgid "Reduces tearing by bypassing the default VSync built into D3D."
+msgstr ""
+
+msgctxt "IDS_SRC_VTS"
+msgid "Open VTS_xx_0.ifo to load VTS_xx_x.vob files in one piece"
+msgstr ""
+
+msgctxt "IDS_SRC_RFS"
+msgid "Based on RARFileSource, doesn't support compressed files"
+msgstr ""
+
+msgctxt "IDS_INTERNAL_LAVF"
+msgid "Uses LAV Filters"
+msgstr ""
+
+msgctxt "IDS_INTERNAL_LAVF_WMV"
+msgid "Uses LAV Filters. Disabled by default since Microsoft filters are usually more stable for those formats.\nIf you choose to use the internal filters, enable them for both source and decoding to have a better playback experience."
+msgstr ""
+
+msgctxt "IDS_AG_TOGGLE_NAVIGATION"
+msgid "Toggle Navigation Bar"
+msgstr "ਨੇਵੀਗੇਸ਼ਨ ਪੱਟੀ ਬਦਲੋ"
+
+msgctxt "IDS_AG_VSYNCACCURATE"
+msgid "Accurate VSync"
+msgstr ""
+
+msgctxt "IDC_CHECK_RELATIVETO"
+msgid "If the rendering target is left undefined, it will be inherited from the default style."
+msgstr ""
+
+msgctxt "IDC_CHECK_NO_SUB_ANIM"
+msgid "Disallow subtitle animation. Enabling this option will lower CPU usage. You can use it if you experience flashing subtitles."
+msgstr ""
+
+msgctxt "IDC_SUBPIC_TO_BUFFER"
+msgid "Increasing the number of buffered subpictures should in general improve the rendering performance at the cost of a higher video RAM usage on the GPU."
+msgstr ""
+
+msgctxt "IDC_BUTTON_EXT_SET"
+msgid "After clicking this button, the checked state of the format group will reflect the actual file association for MPC-HC. A newly added extension will usually make it grayed, so don't forget to check it again before closing this dialog!"
+msgstr ""
+
+msgctxt "IDC_CHECK_ALLOW_DROPPING_SUBPIC"
+msgid "Disabling this option will prevent the subtitles from blinking but it may cause the video renderer to skip some video frames."
+msgstr ""
+
+msgctxt "ID_PLAY_PLAY"
+msgid "Play\nPlay"
+msgstr "ਚਲਾਓ\nਚਲਾਓ"
+
+msgctxt "ID_PLAY_PAUSE"
+msgid "Pause\nPause"
+msgstr "ਵਿਰਾਮ\nਵਿਰਾਮ"
+
+msgctxt "ID_PLAY_STOP"
+msgid "Stop\nStop"
+msgstr "ਰੋਕੋ\nਰੋਕੋ"
+
+msgctxt "ID_PLAY_FRAMESTEP"
+msgid "Step\nStep"
+msgstr "ਸਟੈਪ\nਸਟੈਪ"
+
+msgctxt "ID_PLAY_DECRATE"
+msgid "Decrease speed\nDecrease speed"
+msgstr "ਗਤੀ ਘਟਾਓ\nਗਤੀ ਘਟਾਓ"
+
+msgctxt "ID_PLAY_INCRATE"
+msgid "Increase speed\nIncrease speed"
+msgstr "ਗਤੀ ਵਧਾਓ\nਗਤੀ ਵਧਾਓ"
+
+msgctxt "ID_VOLUME_MUTE"
+msgid "Mute"
+msgstr "ਚà©à©±à¨ª"
+
+msgctxt "ID_VOLUME_MUTE_OFF"
+msgid "Unmute"
+msgstr "ਨਾ-ਚà©à©±à¨ª"
+
+msgctxt "ID_VOLUME_MUTE_DISABLED"
+msgid "No audio"
+msgstr "ਆਡੀਓ ਨਹੀਂ"
+
+msgctxt "ID_NAVIGATE_SKIPBACK"
+msgid "Skip back\nSkip back"
+msgstr "ਪਿੱਛੇ ਵੱਲ ਚੱਲੋ\nਪਿੱਛੇ ਵੱਲ ਚੱਲੋ"
+
+msgctxt "ID_NAVIGATE_SKIPFORWARD"
+msgid "Skip forward\nSkip forward"
+msgstr "ਅੱਗੇ ਵਿੱਚ ਚੱਲੋ\nਅੱਗੇ ਵਿੱਚ ਚੱਲੋ"
+
+msgctxt "IDS_SUBRESYNC_ORIGINAL"
+msgid "&Original"
+msgstr "ਅਸਲ(&O)"
+
+msgctxt "IDS_SUBRESYNC_CURRENT"
+msgid "&Current"
+msgstr "ਮੌਜੂਦਾ(&C)"
+
+msgctxt "IDS_SUBRESYNC_EDIT"
+msgid "&Edit"
+msgstr "ਸੋਧ(&E)"
+
+msgctxt "IDS_SUBRESYNC_YES"
+msgid "&Yes"
+msgstr "ਹਾਂ(&Y)"
+
+msgctxt "IDS_SUBRESYNC_NO"
+msgid "&No"
+msgstr "ਨਹੀਂ(&N)"
+
+msgctxt "IDS_SUBRESYNC_DECREASE"
+msgid "&Decrease"
+msgstr "ਘਟਾਓ(&D)"
+
+msgctxt "IDS_SUBRESYNC_INCREASE"
+msgid "&Increase"
+msgstr "ਵਧਾਓ(&I)"
+
+msgctxt "IDS_OPTIONS_CAPTION"
+msgid "Options"
+msgstr "ਚੋਣਾਂ"
+
+msgctxt "IDS_SHADERS_SELECT"
+msgid "&Select Shaders..."
+msgstr "...ਸ਼ੇਡਰ ਚà©à¨£à©‹(&S)"
+
+msgctxt "IDS_SHADERS_DEBUG"
+msgid "&Debug Shaders..."
+msgstr "...ਡੀਬੱਗ ਸ਼ੇਡਰ(&D)"
+
+msgctxt "IDS_FAVORITES_ADD"
+msgid "&Add to Favorites..."
+msgstr "...ਮਨਪਸੰਦ ਵਿੱਚ ਜੋੜੋ(&A)"
+
+msgctxt "IDS_FAVORITES_ORGANIZE"
+msgid "&Organize Favorites..."
+msgstr "...ਮਨਪਸੰਦ ਦਾ ਪਰਬੰਧ ਕਰੋ(&O)"
+
+msgctxt "IDS_PLAYLIST_SHUFFLE"
+msgid "Shuffle"
+msgstr "ਰਲਾਓ"
+
+msgctxt "IDS_PLAYLIST_SHOWFOLDER"
+msgid "Open file location"
+msgstr "ਫ਼ਾਈਲ ਟਿਕਾਣਾ ਖੋਲà©à¨¹à©‹"
+
+msgctxt "IDS_CONTROLS_CLOSING"
+msgid "Closing..."
+msgstr "...ਬੰਦ ਕਰ ਰਿਹਾ ਹੈ"
+
+msgctxt "IDS_CONTROLS_PLAYING"
+msgid "Playing"
+msgstr "ਚੱਲ ਰਿਹਾ ਹੈ"
+
+msgctxt "IDS_CONTROLS_PAUSED"
+msgid "Paused"
+msgstr "ਵਿਰਾਮ ਹੈ"
+
+msgctxt "IDS_AG_EDL_NEW_CLIP"
+msgid "EDL new clip"
+msgstr "EDL ਨਵੀਂ ਕਲਿੱਪ"
+
+msgctxt "IDS_RECENT_FILES_CLEAR"
+msgid "&Clear list"
+msgstr "ਲਿਸਟ ਸਾਫ਼ ਕਰੋ(&C)"
+
+msgctxt "IDS_RECENT_FILES_QUESTION"
+msgid "Are you sure that you want to delete recent files list?"
+msgstr "ਕੀ ਤà©à¨¸à©€à¨‚ ਤਾਜ਼ਾ ਫ਼ਾਈਲ ਸੂਚੀ ਹਟਾਉਣੀ ਚਾਹà©à©°à¨¦à©‡ ਹੋ?"
+
+msgctxt "IDS_AG_EDL_SAVE"
+msgid "EDL save"
+msgstr "EDL ਸੰਭਾਲੋ"
+
+msgctxt "IDS_AG_ENABLEFRAMETIMECORRECTION"
+msgid "Enable Frame Time Correction"
+msgstr "ਫਰੇਮ ਸਮਾਂ ਸੋਧ ਸਮਰੱਥ ਕਰੋ"
+
+msgctxt "IDS_AG_TOGGLE_EDITLISTEDITOR"
+msgid "Toggle EDL window"
+msgstr "EDL ਵਿੰਡੋ ਬਦਲੋ"
+
+msgctxt "IDS_AG_EDL_IN"
+msgid "EDL set In"
+msgstr "EDL ਸੈਟ ਇਨ"
+
+msgctxt "IDS_AG_EDL_OUT"
+msgid "EDL set Out"
+msgstr "EDL ਸੈਟ ਆਉਟ"
+
+msgctxt "IDS_AG_PNS_ROTATEX_M"
+msgid "PnS Rotate X-"
+msgstr "PnS ਘà©à©°à¨®à¨£ X-"
+
+msgctxt "IDS_AG_PNS_ROTATEY_P"
+msgid "PnS Rotate Y+"
+msgstr "PnS ਘà©à©°à¨®à¨£ Y+"
+
+msgctxt "IDS_AG_PNS_ROTATEY_M"
+msgid "PnS Rotate Y-"
+msgstr "PnS ਘà©à©°à¨®à¨£ Y-"
+
+msgctxt "IDS_AG_PNS_ROTATEZ_P"
+msgid "PnS Rotate Z+"
+msgstr "PnS ਘà©à©°à¨®à¨£ Z+"
+
+msgctxt "IDS_AG_PNS_ROTATEZ_M"
+msgid "PnS Rotate Z-"
+msgstr "PnS ਘà©à©°à¨®à¨£ Z-"
+
+msgctxt "IDS_AG_TEARING_TEST"
+msgid "Tearing Test"
+msgstr "ਟੀਅਰਿੰਗ ਟੈਸਟ"
+
+msgctxt "IDS_SCALE_16_9"
+msgid "Scale to 16:9 TV,%.3f,%.3f,%.3f,%.3f"
+msgstr "16:9 TV,%.3f,%.3f,%.3f,%.3f ਲਈ ਸਕੇਲ ਕਰੋ"
+
+msgctxt "IDS_SCALE_WIDESCREEN"
+msgid "Zoom To Widescreen,%.3f,%.3f,%.3f,%.3f"
+msgstr "ਵਾਈਡਸਕਰੀਨ ਲਈ ਜ਼ੂਮ ਕਰੋ,%.3f,%.3f,%.3f,%.3f"
+
+msgctxt "IDS_SCALE_ULTRAWIDE"
+msgid "Zoom To Ultra-Widescreen,%.3f,%.3f,%.3f,%.3f"
+msgstr "ਅਲਟਰਾ-ਵਾਈਡ-ਸਕਰੀਨ ਲਈ ਜ਼ੂਮ ਕਰੋ,%.3f,%.3f,%.3f,%.3f"
+
+msgctxt "IDS_PLAYLIST_HIDEFS"
+msgid "Hide on Fullscreen"
+msgstr "ਪੂਰੀ ਸਕਰੀਨ ਉੱਤੇ ਓਹਲੇ ਕਰੋ"
+
+msgctxt "IDS_CONTROLS_STOPPED"
+msgid "Stopped"
+msgstr "ਰੋਕਿਆ"
+
+msgctxt "IDS_CONTROLS_BUFFERING"
+msgid "Buffering... (%d%%)"
+msgstr "ਬਫ਼ਰ ਕਰ ਰਿਹਾ ਹੈ... (%d%%)"
+
+msgctxt "IDS_CONTROLS_CAPTURING"
+msgid "Capturing..."
+msgstr "...ਕੈਪਚਰ ਕਰ ਰਿਹਾ ਹੈ"
+
+msgctxt "IDS_CONTROLS_OPENING"
+msgid "Opening..."
+msgstr "...ਖੋਲà©à¨¹ ਰਿਹਾ ਹੈ"
+
+msgctxt "IDS_CONTROLS_CLOSED"
+msgid "Closed"
+msgstr "ਬੰਦ ਕੀਤਾ"
+
+msgctxt "IDS_SUBTITLES_OPTIONS"
+msgid "&Options..."
+msgstr "...ਚੋਣਾਂ(&O)"
+
+msgctxt "IDS_SUBTITLES_STYLES"
+msgid "&Styles..."
+msgstr "...ਸ਼ੈਲੀ(&S)"
+
+msgctxt "IDS_SUBTITLES_RELOAD"
+msgid "&Reload"
+msgstr "ਮà©à©œ-ਲੋਡ ਕਰੋ(&R)"
+
+msgctxt "IDS_SUBTITLES_ENABLE"
+msgid "&Enable"
+msgstr "ਸਮਰੱਥ ਕਰੋ(&E)"
+
+msgctxt "IDS_PANSCAN_EDIT"
+msgid "&Edit..."
+msgstr "...ਸੋਧ(&E)"
+
+msgctxt "IDS_INFOBAR_TITLE"
+msgid "Title"
+msgstr "ਟਾਈਟਲ"
+
+msgctxt "IDS_INFOBAR_AUTHOR"
+msgid "Author"
+msgstr "ਲੇਖਕ"
+
+msgctxt "IDS_INFOBAR_COPYRIGHT"
+msgid "Copyright"
+msgstr "ਕਾਪੀਰਾਈਟ"
+
+msgctxt "IDS_INFOBAR_RATING"
+msgid "Rating"
+msgstr "ਰੇਟਿੰਗ"
+
+msgctxt "IDS_INFOBAR_DESCRIPTION"
+msgid "Description"
+msgstr "ਵੇਰਵਾ"
+
+msgctxt "IDS_INFOBAR_DOMAIN"
+msgid "Domain"
+msgstr "ਡੋਮੇਨ"
+
+msgctxt "IDS_AG_CLOSE"
+msgid "Close"
+msgstr "ਬੰਦ ਕਰੋ"
+
+msgctxt "IDS_AG_NONE"
+msgid "None"
+msgstr "ਕੋਈ ਨਹੀਂ"
+
+msgctxt "IDS_AG_COMMAND"
+msgid "Command"
+msgstr "ਕਮਾਂਡ"
+
+msgctxt "IDS_AG_KEY"
+msgid "Key"
+msgstr "ਸਵਿੱਚ"
+
+msgctxt "IDS_AG_MOUSE"
+msgid "Mouse Windowed"
+msgstr "ਮਾਊਸ ਵਿੰਡੋਡ"
+
+msgctxt "IDS_AG_MOUSE_FS"
+msgid "Mouse Fullscreen"
+msgstr "ਮਾਊਸ ਪੂਰੀ ਸਕਰੀ"
+
+msgctxt "IDS_AG_APP_COMMAND"
+msgid "App Command"
+msgstr "à¨à¨ª ਕਮਾਂਡ"
+
+msgctxt "IDS_AG_MEDIAFILES"
+msgid "Media files (all types)"
+msgstr "ਮੀਡੀਆ ਫ਼ਾਈਲਾਂ (ਸਭ ਕਿਸਮਾਂ)"
+
+msgctxt "IDS_AG_ALLFILES"
+msgid "All files (*.*)|*.*|"
+msgstr "ਸਭ ਫ਼ਾਈਲਾਂ (*.*)|*.*|"
+
+msgctxt "IDS_AG_AUDIOFILES"
+msgid "Audio files (all types)"
+msgstr "ਆਡੀਓ ਫ਼ਾਈਲਾਂ (ਸਭ ਕਿਸਮਾਂ)"
+
+msgctxt "IDS_AG_NOT_KNOWN"
+msgid "Not known"
+msgstr "ਪਤਾ ਨਹੀਂ ਹੈ"
+
+msgctxt "IDS_MPLAYERC_0"
+msgid "Quick Open File"
+msgstr "ਤà©à¨°à©°à¨¤ ਫ਼ਾਈਲ ਖੋਲà©à¨¹à©‹"
+
+msgctxt "IDS_AG_OPEN_FILE"
+msgid "Open File"
+msgstr "ਫ਼ਾਈਲ ਖੋਲà©à¨¹à©‹"
+
+msgctxt "IDS_AG_OPEN_DVD"
+msgid "Open DVD/BD"
+msgstr "DVD/BD ਖੋਲà©à¨¹à©‹"
+
+msgctxt "IDS_MAINFRM_POST_SHADERS_FAILED"
+msgid "Failed to set post-resize shaders"
+msgstr "ਮà©à©œ-ਆਕਾਰ ਦੇ ਬਾਅਦ ਸ਼ੇਡਰ ਸੈਟ ਕਰਨ ਲਈ ਫੇਲà©à¨¹ ਹੈ"
+
+msgctxt "IDS_MAINFRM_BOTH_SHADERS_FAILED"
+msgid "Failed to set both pre-resize and post-resize shaders"
+msgstr ""
+
+msgctxt "IDS_DEBUGSHADERS_FIRSTRUN_MSG"
+msgid "Shaders are recompiled automatically when the corresponding files are modified."
+msgstr ""
+
+msgctxt "IDS_SHADER_DLL_ERR_0"
+msgid "Cannot load %s, pixel shaders will not work."
+msgstr ""
+
+msgctxt "IDS_SHADER_DLL_ERR_1"
+msgid "Cannot find necessary function entry points in %s, pixel shaders will not work."
+msgstr ""
+
+msgctxt "IDS_OSD_SHADERS_PRESET"
+msgid "Shader preset: %s"
+msgstr "ਸ਼ੇਡਰ ਪà©à¨°à©€à¨¸à©ˆà¨Ÿ: %s"
+
+msgctxt "IDS_AG_SHADERS_PRESET_NEXT"
+msgid "Next Shader Preset"
+msgstr "ਅਗਲਾ ਸ਼ੇਡਰ ਪà©à¨°à©€à¨¸à©ˆà¨Ÿ"
+
+msgctxt "IDS_AG_SHADERS_PRESET_PREV"
+msgid "Prev Shader Preset"
+msgstr "ਪਿਛਲੇ ਸ਼ੇਡਰ ਪà©à¨°à©€à¨¸à©ˆà¨Ÿ"
+
+msgctxt "IDS_STRING_COLON"
+msgid "%s:"
+msgstr "%s:"
+
+msgctxt "IDS_RECORD_START"
+msgid "Record"
+msgstr "ਰਿਕਾਰਡ ਕਰੋ"
+
+msgctxt "IDS_RECORD_STOP"
+msgid "Stop"
+msgstr "ਰੋਕੋ"
+
+msgctxt "IDS_BALANCE"
+msgid "L = R"
+msgstr "L = R"
+
+msgctxt "IDS_BALANCE_L"
+msgid "L +%d%%"
+msgstr "L +%d%%"
+
+msgctxt "IDS_BALANCE_R"
+msgid "R +%d%%"
+msgstr "R +%d%%"
+
+msgctxt "IDS_VOLUME"
+msgid "%d%%"
+msgstr "%d%%"
+
+msgctxt "IDS_BOOST"
+msgid "+%d%%"
+msgstr "+%d%%"
+
+msgctxt "IDS_PLAYLIST_ADDFOLDER"
+msgid "Add containing folder"
+msgstr "ਰੱਖਣ ਵਾਲਾ ਫੋਲਡਰ ਜੋੜੋ"
+
+msgctxt "IDS_HW_INDICATOR"
+msgid "[H/W]"
+msgstr "[H/W]"
+
+msgctxt "IDS_TOOLTIP_SOFTWARE_DECODING"
+msgid "Software Decoding"
+msgstr "ਸਾਫਟਵੇਅਰ ਡੀਕੋਡਿੰਗ"
+
+msgctxt "IDS_STATSBAR_PLAYBACK_RATE"
+msgid "Playback rate"
+msgstr "ਚਲਾਓ ਦਰ"
+
+msgctxt "IDS_FILTERS_COPY_TO_CLIPBOARD"
+msgid "&Copy filters list to clipboard"
+msgstr "ਫਿਲਟਰਾਂ ਨੂੰ ਕਲਿੱਪਬੋਰਡ ਵਿੱਚ ਕਾਪੀ ਕਰੋ(&C)"
+
+msgctxt "IDS_CREDENTIALS_SERVER"
+msgid "Enter server credentials"
+msgstr "ਸਰਵਰ ਸਨਦ ਦਿਓ"
+
+msgctxt "IDS_CREDENTIALS_CONNECT"
+msgid "Enter your credentials to connect"
+msgstr "ਕਨੈਕਟ ਕਰਨ ਲਈ ਆਪਣੀ ਸਨਦ ਦਿਓ"
+
+msgctxt "IDS_SUB_SAVE_EXTERNAL_STYLE_FILE"
+msgid "Save custom style"
+msgstr "ਕਸਟਮ ਸ਼ੈਲੀ ਸੰਭਾਲੋ"
+
+msgctxt "IDS_CONTENT_EDUCATION_SCIENCE"
+msgid "Education/Science/Factual topics"
+msgstr "ਸਿੱਖਿਆ/ਵਿਗਿਆਨ/ਯਥਾਰਥਕ ਵਿਸ਼ੇ"
+
+msgctxt "IDS_PPAGEADVANCED_HIDE_WINDOWED"
+msgid "Hides controls and panels also in windowed mode."
+msgstr "ਵਿੰਡੋ ਕਰਨ ਦੇ ਮੋਡ ਵਿੱਚ ਕੰਟਰੋਲ ਤੇ ਪੈਨਲ ਵੀ ਓਹਲੇ ਕਰੋ"
+
+msgctxt "IDS_PPAGEADVANCED_BLOCK_VSFILTER"
+msgid "Prevent external subtitle renderer to be loaded when internal is in use."
+msgstr ""
+
+msgctxt "IDS_PPAGEADVANCED_COL_NAME"
+msgid "Name"
+msgstr "ਨਾਂ"
+
+msgctxt "IDS_PPAGEADVANCED_COL_VALUE"
+msgid "Value"
+msgstr "ਮà©à©±à¨²"
+
+msgctxt "IDS_PPAGEADVANCED_RECENT_FILES_NUMBER"
+msgid "Maximum number of files shown in the \"Recent files\" menu and for which the position is potentially saved."
+msgstr "\"ਤਾਜ਼ਾ ਫ਼ਾਈਲਾਂ\" ਵਿੱਚ ਵਿਖਾਈਆਂ ਫ਼ਾਈਲਾਂ ਦੇ ਵੱਧ ਤੋਂ ਵੱਧ ਗਿਣਤੀ ਹੈ ਅਤੇ ਜਿਹਨਾਂ ਲਈ ਸੰਭਵ ਰੂਪ ਵਿੱਚ ਸਥਿਤੀ ਨੂੰ ਸੰਭਾਲਿਆ ਗਿਆ ਹੈ।"
+
+msgctxt "IDS_PPAGEADVANCED_FILE_POS_LONGER"
+msgid "Remember file position only for files longer than N minutes."
+msgstr "ਕੇਵਲ N ਮਿੰਟ ਤੋਂ ਲੰਮੀਆਂ ਫ਼ਾਈਲਾਂ ਵਾਸਤੇ ਹੀ ਫ਼ਾਈਲ ਸਥਿਤੀ ਨੂੰ ਯਾਦ ਰੱਖੋ।"
+
+msgctxt "IDS_PPAGEADVANCED_FILE_POS_AUDIO"
+msgid "Remember file position also for audio files."
+msgstr "ਆਡੀਓ ਫ਼ਾਈਲਾਂ ਲਈ ਵੀ ਫ਼ਾਈਲ ਸਥਿਤੀ ਯਾਦ ਰੱਖੋ।"
+
+msgctxt "IDS_AFTER_PLAYBACK_DO_NOTHING"
+msgid "Do Nothing"
+msgstr "ਕà©à¨ ਨਾ ਕਰੋ"
+
+msgctxt "IDS_AFTER_PLAYBACK_PLAY_NEXT"
+msgid "Play next file in the folder"
+msgstr "ਫੋਲਡਰ ਵਿੱਚ ਅਗਲੀ ਫ਼ਾਈਲ ਚਲਾਓ"
+
+msgctxt "IDS_AFTER_PLAYBACK_REWIND"
+msgid "Rewind current file"
+msgstr "ਮੌਜੂਦਾ ਫ਼ਾਇਲ ਨੂੰ ਵਾਪਿਸ ਪਿੱਛੇ ਕਰੋ"
+
+msgctxt "IDS_AFTER_PLAYBACK_CLOSE"
+msgid "Close"
+msgstr "ਬੰਦ ਕਰੋ"
+
+msgctxt "IDS_AFTER_PLAYBACK_EXIT"
+msgid "Exit"
+msgstr "ਬਾਹਰ ਨਿਕਲੋ"
+
+msgctxt "IDS_AFTER_PLAYBACK_MONITOROFF"
+msgid "Turn off the monitor"
+msgstr "ਮਾਨੀਟਰ ਬੰਦ ਕਰੋ"
+
+msgctxt "IDS_IMAGE_JPEG_QUALITY"
+msgid "JPEG Image"
+msgstr "JPEG ਚਿੱਤਰ"
+
+msgctxt "IDS_IMAGE_QUALITY"
+msgid "Quality (%):"
+msgstr "ਕà©à¨†à¨²à¨Ÿà©€ (%):"
+
+msgctxt "IDS_PPAGEADVANCED_COVER_SIZE_LIMIT"
+msgid "Maximum size (NxNpx) of a cover-art loaded in the audio only mode."
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_DELAY_STEP_TOOLTIP"
+msgid "The subtitle delay will be decreased/increased by this value each time the corresponding hotkeys are used (%s/%s)."
+msgstr ""
+
+msgctxt "IDS_HOTKEY_NOT_DEFINED"
+msgid "<not defined>"
+msgstr "<ਪਰਿਭਾਸ਼ਿਤ ਨਹੀਂ>"
+
+msgctxt "IDS_NAVIGATION_WATCH"
+msgid "Watch"
+msgstr "ਨਿਗਰਾਨੀ"
+
+msgctxt "IDS_NAVIGATION_MOVE_UP"
+msgid "Move Up"
+msgstr "ਉੱਤੇ ਭੇਜੋ"
+
+msgctxt "IDS_NAVIGATION_MOVE_DOWN"
+msgid "Move Down"
+msgstr "ਹੇਠਾਂ ਭੇਜੋ"
+
+msgctxt "IDS_NAVIGATION_SORT"
+msgid "Sort by LCN"
+msgstr "LCN ਰਾਹੀਂ ਲੜੀਬੱਧ"
+
+msgctxt "IDS_NAVIGATION_REMOVE_ALL"
+msgid "Remove all"
+msgstr "ਸਭ ਹਟਾਓ"
+
+msgctxt "IDS_REMOVE_CHANNELS_QUESTION"
+msgid "Are you sure you want to remove all channels from the list?"
+msgstr "ਕੀ ਤà©à¨¸à©€à¨‚ ਸੂਚੀ ਤੋਂ ਸਭ ਚੈਨਲਾਂ ਨੂੰ ਹਟਾਉਣਾ ਚਾਹà©à©°à¨¦à©‡ ਹੋ?"
+
+msgctxt "IDS_MEDIAINFO_NO_INFO_AVAILABLE"
+msgid "No information available"
+msgstr "ਕੋਈ ਜਾਣਕਾਰੀ ਮੌਜੂਦ ਨਹੀਂ ਹੈ"
+
+msgctxt "IDS_MEDIAINFO_ANALYSIS_IN_PROGRESS"
+msgid "Please wait, analysis in progress..."
+msgstr "...ਪੜਤਾਲ ਜਾਰੀ ਹੈ, ਉਡੀਕ ਕਰੋ ਜੀ"
+
+msgctxt "IDS_ASPECT_RATIO_FMT"
+msgid "AR %d:%d"
+msgstr "AR %d:%d"
+
+msgctxt "IDS_PPAGEADVANCED_LOGGER"
+msgid "Enables logging to file (requires restart)"
+msgstr "ਫ਼ਾਈਲ ਵਿੱਚ ਲਾਗ ਰੱਖਣ ਸਮਰੱਥ ਕਰੋ (ਮà©à©œ-ਚਾਲੂ ਕਰਨ ਦੀ ਲੋੜ ਹੈ)"
+
+msgctxt "IDS_TIMER_REMAINING_TIME"
+msgid "Remaining time"
+msgstr "ਬਾਕੀ ਰਹਿੰਦਾ ਸਮਾਂ"
+
+msgctxt "IDS_TIMER_HIGH_PRECISION"
+msgid "High precision"
+msgstr "ਉੱਚ ਸਹੀਪà©à¨£à¨¾"
+
+msgctxt "IDS_AFTERPLAYBACK_REWIND"
+msgid "After Playback: Rewind current file"
+msgstr "ਚਲਾਓ ਦੇ ਬਾਅਦ: ਮੌਜੂਦਾ ਫ਼ਾਇਲ ਨੂੰ ਵਾਪਿਸ ਪਿੱਛੇ ਕਰੋ"
+
+msgctxt "IDS_AFTERPLAYBACK_CLOSE"
+msgid "After Playback: Close"
+msgstr "ਚਲਾਓ ਦੇ ਬਾਅਦ: ਬੰਦ ਕਰੋ"
+
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr ""
+
+msgctxt "IDS_AG_OPEN_DEVICE"
+msgid "Open Device"
+msgstr "ਡਿਵਾਇਸ ਖੋਲà©à¨¹à©‹"
+
+msgctxt "IDS_AG_SAVE_AS"
+msgid "Save As"
+msgstr "ਇੰਠਸੰਭਾਲੋ"
+
+msgctxt "IDS_AG_SAVE_IMAGE"
+msgid "Save Image"
+msgstr "ਚਿੱਤਰ ਸੰਭਾਲੋ"
+
+msgctxt "IDS_MPLAYERC_6"
+msgid "Save Image (auto)"
+msgstr "ਚਿੱਤਰ ਸੰਭਾਲੋ (ਆਟੋ)"
+
+msgctxt "IDS_OSD_IMAGE_SAVED"
+msgid "Image saved successfully"
+msgstr "ਚਿੱਤਰ ਕਾਮਯਾਬੀ ਨਾਲ ਸੰਭਾਲਿਆ"
+
+msgctxt "IDS_AG_LOAD_SUBTITLE"
+msgid "Load Subtitle"
+msgstr "ਸਬ-ਟਾਈਟਲ ਲੋਡ ਕਰੋ"
+
+msgctxt "IDS_AG_SAVE_SUBTITLE"
+msgid "Save Subtitle"
+msgstr "ਸਬ-ਟਾਈਟਲ ਸੰਭਾਲੋ"
+
+msgctxt "IDS_AG_PROPERTIES"
+msgid "Properties"
+msgstr "ਵਿਸ਼ੇਸ਼ਤਾ"
+
+msgctxt "IDS_AG_EXIT"
+msgid "Exit"
+msgstr "ਬਾਹਰ ਨਿਕਲੋ"
+
+msgctxt "IDS_AG_PLAYPAUSE"
+msgid "Play/Pause"
+msgstr "ਚਲਾਓ/ਵਿਰਾਮ"
+
+msgctxt "IDS_AG_PLAY"
+msgid "Play"
+msgstr "ਚਲਾਓ"
+
+msgctxt "IDS_AG_STOP"
+msgid "Stop"
+msgstr "ਰੋਕੋ"
+
+msgctxt "IDS_AG_FRAMESTEP"
+msgid "Frame-step"
+msgstr "ਫਰੇਮ-ਸਟੈਪ"
+
+msgctxt "IDS_MPLAYERC_16"
+msgid "Frame-step back"
+msgstr "ਫਰੇਮ-ਸਟੈਪ ਪਿੱਛੇ"
+
+msgctxt "IDS_AG_GO_TO"
+msgid "Go To"
+msgstr "ਜਾਓ"
+
+msgctxt "IDS_AG_INCREASE_RATE"
+msgid "Increase Rate"
+msgstr "ਦਰ ਵਧਾਓ"
+
+msgctxt "IDS_CONTENT_SHOW_GAMESHOW"
+msgid "Show/Game show"
+msgstr "ਸ਼ੋਅ/ਗੇਮ ਸ਼ੋਅ"
+
+msgctxt "IDS_CONTENT_SPORTS"
+msgid "Sports"
+msgstr "ਖੇਡਾਂ"
+
+msgctxt "IDS_CONTENT_CHILDREN_YOUTH_PROG"
+msgid "Children's/Youth programmes"
+msgstr "ਬੱਚੇ/ਨੌਜਵਾਨਾਂ ਦੇ ਪà©à¨°à©‹à¨—ਰਾ"
+
+msgctxt "IDS_CONTENT_MUSIC_BALLET_DANCE"
+msgid "Music/Ballet/Dance"
+msgstr "ਸੰਗੀਤ/ਬੈਲੇ/ਡਾਂਸ"
+
+msgctxt "IDS_CONTENT_MUSIC_ART_CULTURE"
+msgid "Arts/Culture"
+msgstr "ਕਲਾ/ਸਭਿਆਚਾਰ"
+
+msgctxt "IDS_CONTENT_SOCIAL_POLITICAL_ECO"
+msgid "Social/Political issues/Economics"
+msgstr "ਸਮਾਜਿਕ/ਰਾਜਨੀਤੀ ਮਾਮਲੇ/ਅਰਥਚਾਰਾ"
+
+msgctxt "IDS_CONTENT_LEISURE"
+msgid "Leisure hobbies"
+msgstr ""
+
+msgctxt "IDS_FILE_RECYCLE"
+msgid "Move to Recycle Bin"
+msgstr "ਰੱਦੀ ਵਿੱਚ ਭੇਜੋ"
+
+msgctxt "IDS_AG_SAVE_COPY"
+msgid "Save a Copy"
+msgstr "ਕਾਪੀ ਸੰਭਾਲੋ"
+
+msgctxt "IDS_FASTSEEK_LATEST"
+msgid "Latest keyframe"
+msgstr "ਤਾਜ਼ਾ ਕੀ-ਫਰੇਮ"
+
+msgctxt "IDS_FASTSEEK_NEAREST"
+msgid "Nearest keyframe"
+msgstr "ਸਭ ਤੋਂ ਨੇੜਲਾ ਕੀ-ਫਰੇਮ"
+
+msgctxt "IDS_HOOKS_FAILED"
+msgid "MPC-HC encountered a problem during initialization. DVD playback may not work correctly. This might be caused by some incompatibilities with certain security tools.\n\nDo you want to report this issue?"
+msgstr ""
+
+msgctxt "IDS_PPAGEFULLSCREEN_SHOWNEVER"
+msgid "Never show"
+msgstr "ਕਦੇ ਨਾ ਦਿਖਾਓ"
+
+msgctxt "IDS_PPAGEFULLSCREEN_SHOWMOVED"
+msgid "Show when moving the cursor, hide after:"
+msgstr ""
+
+msgctxt "IDS_PPAGEFULLSCREEN_SHOHHOVERED"
+msgid "Show when hovering control, hide after:"
+msgstr ""
+
+msgctxt "IDS_MAINFRM_PRE_SHADERS_FAILED"
+msgid "Failed to set pre-resize shaders"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_FT_CORRECTION_ON"
+msgid "Frame Time Correction: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_FT_CORRECTION_OFF"
+msgid "Frame Time Correction: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_TARGET_VSYNC_OFFSET"
+msgid "Target VSync Offset: %.1f"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_VSYNC_OFFSET"
+msgid "VSync Offset: %d"
+msgstr ""
+
+msgctxt "IDS_OSD_SPEED"
+msgid "Speed: %.2lfx"
+msgstr "ਗਤੀ: %.2lfx"
+
+msgctxt "IDS_OSD_THUMBS_SAVED"
+msgid "Thumbnails saved successfully"
+msgstr "ਥੰਮਨੇਲ ਕਾਮਯਾਬੀ ਨਾਲ ਸੰਭਾਲਿਆ"
+
+msgctxt "IDS_MENU_VIDEO_STREAM"
+msgid "&Video Track"
+msgstr "ਵਿਡੀਓ ਟਰੈਕ(&V)"
+
+msgctxt "IDS_MENU_VIDEO_ANGLE"
+msgid "Video Ang&le"
+msgstr "ਵਿਡੀਓ ਕੋਣ(&l)"
+
+msgctxt "IDS_RESET_SETTINGS"
+msgid "Reset settings"
+msgstr "ਸੈਟਿੰਗਾਂ ਮà©à©œ-ਸੈਟ ਕਰੋ"
+
+msgctxt "IDS_RESET_SETTINGS_WARNING"
+msgid "Are you sure you want to restore MPC-HC to its default settings?\nBe warned that ALL your current settings will be lost!"
+msgstr "ਕੀ ਤà©à¨¸à©€à¨‚ MPC-HC ਨੂੰ ਇਸ ਦੀਆਂ ਮੂਲ ਸੈਟਿੰਗਾਂ ਨੂੰ ਮà©à©œ-ਸਟੋਰ ਕਰਨਾ ਚਾਹà©à©°à¨¦à©‡ ਹੋ?\nਸਾਵਧਾਨ ਕੀਤਾ ਜਾਂਦਾ ਹੈ ਕਿ ਤà©à¨¹à¨¾à¨¡à©€à¨†à¨‚ ਸਭ ਮੌਜੂਦਾ ਸੈਟਿੰਗਾਂ ਖਤਮ ਹੋ ਜਾਣਗੀਆਂ!"
+
+msgctxt "IDS_RESET_SETTINGS_MUTEX"
+msgid "Please close all instances of MPC-HC so that the default settings can be restored."
+msgstr "MPC-HC ਦੇ ਸਭ ਮੌਕਿਆਂ ਨੂੰ ਬੰਦ ਕਰੋ ਤਾਂ ਕਿ ਡਿਫਾਲਟ ਸੈਟਿੰਗਾਂ ਨੂੰ ਮà©à©œ-ਸਟੋਰ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ।"
+
+msgctxt "IDS_EXPORT_SETTINGS"
+msgid "Export settings"
+msgstr "ਸੈਟਿੰਗਾਂ ਬਰਾਮਦ ਕਰੋ"
+
+msgctxt "IDS_EXPORT_SETTINGS_WARNING"
+msgid "Some changes have not been saved yet.\nDo you want to save them before exporting?"
+msgstr "ਕà©à¨ ਤਬਦੀਲੀਆਂ ਹਾਲੇ ਸੰਭਾਲੀਆਂ ਨਹੀਂ ਗਈਆਂ ਹਨ।\nਕੀ ਤà©à¨¸à©€à¨‚ ਬਰਾਮਦ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ ਉਹਨਾਂ ਨੂੰ ਸੰਭਾਲਣਾ ਚਾਹà©à©°à¨¦à©‡ ਹੋ?"
+
+msgctxt "IDS_EXPORT_SETTINGS_SUCCESS"
+msgid "The settings have been successfully exported."
+msgstr "ਸੈਟਿੰਗਾਂ ਕਾਮਯਾਬੀ ਨਾਲ ਸੰਭਾਲੀਆਂ ਗਈਆਂ ਹਨ।"
+
+msgctxt "IDS_EXPORT_SETTINGS_FAILED"
+msgid "The export failed! This can happen when you don't have the correct rights."
+msgstr "ਬਰਾਮਦ ਕਰਨ ਲਈ ਫੇਲà©à¨¹! ਇਹ ਹੋ ਸਕਦਾ ਹੈ ਜੇ ਤà©à¨¹à¨¾à¨¡à©‡ ਕੋਲ ਠੀਕ ਅਧਿਕਾਰ ਨਹੀਂ ਹਨ।"
+
+msgctxt "IDS_BDA_ERROR"
+msgid "BDA Error"
+msgstr "BDA ਗਲਤੀ"
+
+msgctxt "IDS_AG_DECREASE_RATE"
+msgid "Decrease Rate"
+msgstr "ਦਰ ਘਟਾਓ"
+
+msgctxt "IDS_AG_RESET_RATE"
+msgid "Reset Rate"
+msgstr "ਪà©à¨°à©€-ਸੈਟ ਦਰ"
+
+msgctxt "IDS_MPLAYERC_21"
+msgid "Audio Delay +10 ms"
+msgstr "ਆਡੀਓ ਦੇਰੀ +10ms"
+
+msgctxt "IDS_MPLAYERC_22"
+msgid "Audio Delay -10 ms"
+msgstr "ਆਡੀਓ ਦੇਰੀ -10 ms"
+
+msgctxt "IDS_MPLAYERC_23"
+msgid "Jump Forward (small)"
+msgstr "ਅੱਗੇ ਜਾਓ (ਥੋੜà©à¨¹à¨¾)"
+
+msgctxt "IDS_MPLAYERC_24"
+msgid "Jump Backward (small)"
+msgstr "ਪਿੱਛੇ ਜਾਓ (ਥੋੜà©à¨¹à¨¾)"
+
+msgctxt "IDS_MPLAYERC_25"
+msgid "Jump Forward (medium)"
+msgstr "ਅੱਗੇ ਜਾਓ (ਮੱਧਮ)"
+
+msgctxt "IDS_MPLAYERC_26"
+msgid "Jump Backward (medium)"
+msgstr "ਪਿੱਛੇ ਜਾਓ (ਮੱਧਮ)"
+
+msgctxt "IDS_MPLAYERC_27"
+msgid "Jump Forward (large)"
+msgstr "ਅੱਗੇ ਜਾਓ (ਵੱਧ)"
+
+msgctxt "IDS_MPLAYERC_28"
+msgid "Jump Backward (large)"
+msgstr "ਪਿੱਛੇ ਜਾਓ (ਵੱਧ)"
+
+msgctxt "IDS_MPLAYERC_29"
+msgid "Jump Forward (keyframe)"
+msgstr "ਅੱਗੇ ਜਾਓ (ਕੀਫਰੇਮ)"
+
+msgctxt "IDS_MPLAYERC_30"
+msgid "Jump Backward (keyframe)"
+msgstr "ਪਿੱਛੇ ਜਾਓ (ਕੀਫਰੇਮ)"
+
+msgctxt "IDS_AG_NEXT"
+msgid "Next"
+msgstr "ਅੱਗੇ"
+
+msgctxt "IDS_AG_PREVIOUS"
+msgid "Previous"
+msgstr "ਪਿੱਛੇ"
+
+msgctxt "IDS_AG_NEXT_FILE"
+msgid "Next File"
+msgstr "ਅਗਲੀ ਫ਼ਾਈਲ"
+
+msgctxt "IDS_AG_PREVIOUS_FILE"
+msgid "Previous File"
+msgstr "ਪਿਛਲੀ ਫ਼ਾਈਲ"
+
+msgctxt "IDS_MPLAYERC_99"
+msgid "Toggle Direct3D fullscreen"
+msgstr "Direct3D ਪੂਰੀ-ਸਕਰੀਨ ਬਦਲੋ"
+
+msgctxt "IDS_MPLAYERC_100"
+msgid "Goto Prev Subtitle"
+msgstr "ਪਿਛਲੇ ਸਬਟਾਈਟਲ ਉੱਤੇ ਜਾਓ"
+
+msgctxt "IDS_MPLAYERC_101"
+msgid "Goto Next Subtitle"
+msgstr "ਅਗਲੇ ਸਬਟਾਈਟਲ ਉੱਤੇ ਜਾਓ"
+
+msgctxt "IDS_MPLAYERC_102"
+msgid "Shift Subtitle Left"
+msgstr ""
+
+msgctxt "IDS_MPLAYERC_103"
+msgid "Shift Subtitle Right"
+msgstr ""
+
+msgctxt "IDS_AG_SEEKSET"
+msgid "Jump to Beginning"
+msgstr "ਸ਼à©à¨°à©‚ ਉੱਤੇ ਜਾਓ"
+
+msgctxt "IDS_OSD_SHOW_FILENAME"
+msgid "OSD: Show File Name"
+msgstr "OSD: ਫ਼ਾਈਲ ਨਾਂ ਦਿਖਾਓ"
+
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr ""
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr ""
+
+msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
+msgid "OSD: Display Renderer Statistics"
+msgstr "OSD: ਰੈਂਡਰਰ ਅੰਕੜੇ ਦਿਖਾਓ"
+
+msgctxt "IDS_OSD_RESET_RENDERER_STATS"
+msgid "OSD: Reset Renderer Statistics"
+msgstr "OSD: ਰੈਂਡਰਰ ਅੰਕੜੇ ਮà©à©œ-ਸੈਟ ਕਰੋ"
+
+msgctxt "IDD_PPAGESUBMISC"
+msgid "Subtitles::Misc"
+msgstr "ਸਬ-ਟਾਈਟਲ::ਫà©à¨Ÿà¨•à¨²"
+
+msgctxt "IDS_VIEW_BORDERLESS"
+msgid "Hide &borders"
+msgstr "ਹਾਸ਼ੀਆ ਓਹਲੇ ਕਰੋ(&b)"
+
+msgctxt "IDS_VIEW_FRAMEONLY"
+msgid "Fra&me Only"
+msgstr "ਕੇਵਲ ਫਰੇਮ(&m)"
+
+msgctxt "IDS_VIEW_CAPTIONMENU"
+msgid "Sho&w Caption&&Menu"
+msgstr "ਸà©à¨°à¨–à©€ ਤੇ ਮੀਨੂ ਦਿਖਾਓ(&w)"
+
+msgctxt "IDS_VIEW_HIDEMENU"
+msgid "Hide &Menu"
+msgstr "ਮੀਨੂ ਓਹਲੇ ਕਰੋ(&M)"
+
+msgctxt "IDD_PPAGEADVANCED"
+msgid "Advanced"
+msgstr "ਤਕਨੀਕੀ"
+
+msgctxt "IDS_AG_VIEW_MINIMAL"
+msgid "View Minimal"
+msgstr "ਘੱਟੋ-ਘੱਟ ਦਿਖਾਓ"
+
+msgctxt "IDS_AG_VIEW_COMPACT"
+msgid "View Compact"
+msgstr "ਨਿੰਮਾ ਦਿਖਾਓ"
+
+msgctxt "IDS_AG_VIEW_NORMAL"
+msgid "View Normal"
+msgstr "ਆਮ ਦਿਖਾਓ"
+
+msgctxt "IDS_AG_FULLSCREEN"
+msgid "Fullscreen"
+msgstr "ਪੂਰੀ ਸਕਰੀਨ"
+
+msgctxt "IDS_MPLAYERC_39"
+msgid "Fullscreen (w/o res.change)"
+msgstr "ਪੂਰੀ ਸਕਰੀਨ (ਬਿਨਾਂ ਰੈਜ਼ੋ. ਬਦਲੇ)"
+
+msgctxt "IDS_AG_ZOOM_AUTO_FIT"
+msgid "Zoom Auto Fit"
+msgstr "ਜ਼ੂਮ ਆਟੋ ਫਿੱਟ)"
+
+msgctxt "IDS_AG_VIDFRM_HALF"
+msgid "VidFrm Half"
+msgstr ""
+
+msgctxt "IDS_AG_VIDFRM_NORMAL"
+msgid "VidFrm Normal"
+msgstr ""
+
+msgctxt "IDS_AG_VIDFRM_DOUBLE"
+msgid "VidFrm Double"
+msgstr ""
+
+msgctxt "IDS_AG_ALWAYS_ON_TOP"
+msgid "Always On Top"
+msgstr "ਹਮੇਸ਼ਾ ਸਭ ਤੋਂ ਉੱਤੇ ਰੱਖੋ"
+
+msgctxt "IDS_AG_PNS_INC_SIZE"
+msgid "PnS Inc Size"
+msgstr ""
+
+msgctxt "IDS_AG_PNS_INC_WIDTH"
+msgid "PnS Inc Width"
+msgstr ""
+
+msgctxt "IDS_MPLAYERC_47"
+msgid "PnS Inc Height"
+msgstr ""
+
+msgctxt "IDS_AG_PNS_DEC_SIZE"
+msgid "PnS Dec Size"
+msgstr ""
+
+msgctxt "IDS_AG_PNS_DEC_WIDTH"
+msgid "PnS Dec Width"
+msgstr ""
+
+msgctxt "IDS_MPLAYERC_50"
+msgid "PnS Dec Height"
+msgstr ""
+
+msgctxt "IDS_SUBDL_DLG_DOWNLOADING"
+msgid "Downloading subtitle(s), please wait."
+msgstr "ਸਬਟਾਈਤਲ ਡਾਊਨਲੋਡ ਕਰ ਰਿਹਾ ਹੈ, ਉਡੀਕੋ ਜੀ।"
+
+msgctxt "IDS_SUBDL_DLG_PARSING"
+msgid "Parsing list..."
+msgstr "...ਸੂਚੀ ਪਾਰਸ ਕਰ ਰਿਹਾ ਹੈ"
+
+msgctxt "IDS_SUBDL_DLG_NOT_FOUND"
+msgid "No subtitles found."
+msgstr "ਕੋਈ ਸਬ-ਟਾਈਟਲ ਨਹੀਂ ਲੱਭਿਆ"
+
+msgctxt "IDS_SUBDL_DLG_SUBS_AVAIL"
+msgid "%d subtitle(s) available."
+msgstr "%d ਸਬਟਾਈਟਲ ਮੌਜੂਦ ਹਨ।"
+
+msgctxt "IDS_UPDATE_CONFIG_AUTO_CHECK"
+msgid "Do you want to check periodically for MPC-HC updates?\n\nThis feature can be disabled later from the Miscellaneous options page."
+msgstr "ਕੀ ਤà©à¨¸à©€à¨‚ MPC-HC ਲਈ ਨਿਯਮਤ ਰੂਪ ਵਿੱਚ ਅੱਪਡੇਟ ਵਾਸਤੇ ਚੈਕ ਕਰਨਾ ਚਾਹà©à©°à¨¦à©‡ ਹੋ?\n\nਇਹ ਫੀਚਰ ਨੂੰ ਫà©à¨Ÿà¨•à¨² ਚੋਣ ਸਫ਼ੇ ਤੋਂ ਕਿਸੇ ਵੀ ਸਮੇਂ ਬੰਦ ਕਰ ਸਕਦੇ ਹੋ।"
+
+msgctxt "IDS_ZOOM_50"
+msgid "50%"
+msgstr "50%"
+
+msgctxt "IDS_ZOOM_100"
+msgid "100%"
+msgstr "100%"
+
+msgctxt "IDS_ZOOM_200"
+msgid "200%"
+msgstr "200%"
+
+msgctxt "IDS_ZOOM_AUTOFIT"
+msgid "Auto Fit"
+msgstr "ਆਟੋ ਫਿੱਟ"
+
+msgctxt "IDS_ZOOM_AUTOFIT_LARGER"
+msgid "Auto Fit (Larger Only)"
+msgstr "ਆਟੋ ਫਿੱਟ (ਕੇਵਲ ਵੱਡਾ)"
+
+msgctxt "IDS_AG_ZOOM_AUTO_FIT_LARGER"
+msgid "Zoom Auto Fit (Larger Only)"
+msgstr "ਆਟੋ ਫਿੱਟ ਲਈ ਜ਼ੂਮ ਕਰੋ (ਕੇਵਲ ਵੱਡਾ)(&L)"
+
+msgctxt "IDS_OSD_ZOOM_AUTO_LARGER"
+msgid "Zoom: Auto (Larger Only)"
+msgstr "ਜ਼ੂਮ: ਆਟੋ (ਕੇਵਲ ਵੱਡਾ)"
+
+msgctxt "IDS_TOOLTIP_EXPLORE_TO_FILE"
+msgid "Double click to open file location"
+msgstr "ਫ਼ਾਈਲ ਟਿਕਾਣਾ ਖੋਲà©à¨¹à¨£ ਲਈ ਦੋ ਵਾਰ ਕਲਿੱਕ ਕਰੋ"
+
+msgctxt "IDS_TOOLTIP_REMAINING_TIME"
+msgid "Toggle between elapsed and remaining time"
+msgstr "ਲੱਗੇ ਅਤੇ ਬਾਕੀ ਰਹਿੰਦੇ ਸਮੇਂ ਵਿੱਚ ਤਬਦੀਲ ਕਰੋ"
+
+msgctxt "IDS_UPDATE_DELAY_ERROR_TITLE"
+msgid "Invalid delay"
+msgstr "ਗਲਤ ਦੇਰੀ"
+
+msgctxt "IDS_UPDATE_DELAY_ERROR_MSG"
+msgid "Please enter a number between 1 and 365."
+msgstr "1 ਤੋਂ 365 ਦੇ ਵਿੱਚੋਂ ਇੱਕ ਨੰਬਰ ਦਿਉ।"
+
+msgctxt "IDS_AG_PNS_CENTER"
+msgid "PnS Center"
+msgstr ""
+
+msgctxt "IDS_AG_PNS_LEFT"
+msgid "PnS Left"
+msgstr ""
+
+msgctxt "IDS_AG_PNS_RIGHT"
+msgid "PnS Right"
+msgstr ""
+
+msgctxt "IDS_AG_PNS_UP"
+msgid "PnS Up"
+msgstr ""
+
+msgctxt "IDS_AG_PNS_DOWN"
+msgid "PnS Down"
+msgstr ""
+
+msgctxt "IDS_AG_PNS_UPLEFT"
+msgid "PnS Up/Left"
+msgstr ""
+
+msgctxt "IDS_AG_PNS_UPRIGHT"
+msgid "PnS Up/Right"
+msgstr ""
+
+msgctxt "IDS_AG_PNS_DOWNLEFT"
+msgid "PnS Down/Left"
+msgstr ""
+
+msgctxt "IDS_MPLAYERC_59"
+msgid "PnS Down/Right"
+msgstr ""
+
+msgctxt "IDS_AG_VOLUME_UP"
+msgid "Volume Up"
+msgstr "ਵਾਲੀਅਮ ਵਧਾਓ"
+
+msgctxt "IDS_AG_VOLUME_DOWN"
+msgid "Volume Down"
+msgstr "ਵਾਲੀਅਮ ਘਟਾਓ"
+
+msgctxt "IDS_AG_VOLUME_MUTE"
+msgid "Volume Mute"
+msgstr "ਵਾਲੀਅਮ ਚà©à©±à¨ª"
+
+msgctxt "IDS_MPLAYERC_63"
+msgid "DVD Title Menu"
+msgstr "DVD ਟਾਈਟਲ ਮੀਨੂ"
+
+msgctxt "IDS_AG_DVD_ROOT_MENU"
+msgid "DVD Root Menu"
+msgstr "DVD ਰੂਟ ਮੀਨੂ"
+
+msgctxt "IDS_MPLAYERC_65"
+msgid "DVD Subtitle Menu"
+msgstr "DVD ਸਬਟਾਈਟਲ ਮੀਨੂ"
+
+msgctxt "IDS_MPLAYERC_66"
+msgid "DVD Audio Menu"
+msgstr "DVD ਆਡੀਓ ਮੀਨੂ"
+
+msgctxt "IDS_MPLAYERC_67"
+msgid "DVD Angle Menu"
+msgstr "DVD ਕੋਣ ਮੀਨੂ"
+
+msgctxt "IDS_MPLAYERC_68"
+msgid "DVD Chapter Menu"
+msgstr "DVD ਚੈਪਟਰ ਮੀਨੂ"
+
+msgctxt "IDS_AG_DVD_MENU_LEFT"
+msgid "DVD Menu Left"
+msgstr "DVD ਮੀਨੂ ਖੱਬੇ"
+
+msgctxt "IDS_MPLAYERC_70"
+msgid "DVD Menu Right"
+msgstr "DVD ਮੀਨੂ ਸੱਜੇ"
+
+msgctxt "IDS_AG_DVD_MENU_UP"
+msgid "DVD Menu Up"
+msgstr "DVD ਮੀਨੂ ਉੱਤੇ"
+
+msgctxt "IDS_AG_DVD_MENU_DOWN"
+msgid "DVD Menu Down"
+msgstr "DVD ਮੀਨੂ ਹੇਠਾਂ"
+
+msgctxt "IDS_MPLAYERC_73"
+msgid "DVD Menu Activate"
+msgstr "DVD ਮੀਨੂ ਸਰਗਰਮ ਕਰੋ"
+
+msgctxt "IDS_AG_DVD_MENU_BACK"
+msgid "DVD Menu Back"
+msgstr "DVD ਮੀਨੂ ਪਿੱਛੇ"
+
+msgctxt "IDS_MPLAYERC_75"
+msgid "DVD Menu Leave"
+msgstr "DVD ਮੀਨੂ ਛੱਡੋ"
+
+msgctxt "IDS_AG_BOSS_KEY"
+msgid "Boss key"
+msgstr "ਬਾਸ ਸਵਿੱਚ"
+
+msgctxt "IDS_MPLAYERC_77"
+msgid "Player Menu"
+msgstr "ਪਲੇਅਰ ਮੀਨੂ"
+
+msgctxt "IDS_MPLAYERC_78"
+msgid "Player Menu (full)"
+msgstr "ਪਲੇਅਰ ਮੀਨੂ (ਪੂਰਾ)"
+
+msgctxt "IDS_AG_FILTERS_MENU"
+msgid "Filters Menu"
+msgstr "ਫਿਲਟਰ ਮੀਨੂ"
+
+msgctxt "IDS_AG_OPTIONS"
+msgid "Options"
+msgstr "ਚੋਣਾਂ"
+
+msgctxt "IDS_AG_NEXT_AUDIO"
+msgid "Next Audio Track"
+msgstr ""
+
+msgctxt "IDS_AG_PREV_AUDIO"
+msgid "Prev Audio Track"
+msgstr ""
+
+msgctxt "IDS_AG_NEXT_SUBTITLE"
+msgid "Next Subtitle Track"
+msgstr ""
+
+msgctxt "IDS_AG_PREV_SUBTITLE"
+msgid "Prev Subtitle Track"
+msgstr ""
+
+msgctxt "IDS_MPLAYERC_85"
+msgid "On/Off Subtitle"
+msgstr "ਸਬ-ਟਾਈਟਲ ਚਾਲੂ/ਬੰਦ ਕਰੋ"
+
+msgctxt "IDS_MPLAYERC_86"
+msgid "Reload Subtitles"
+msgstr "ਸਬ-ਟਾਈਟਲ ਮà©à©œ-ਲੋਡ ਕਰੋ"
+
+msgctxt "IDS_MPLAYERC_91"
+msgid "Next Angle (DVD)"
+msgstr "ਅਗਲਾ ਕੋਣ (DVD)"
+
+msgctxt "IDS_MPLAYERC_92"
+msgid "Prev Angle (DVD)"
+msgstr "ਪਿਛਲਾ ਕੋਣ (DVD)"
+
+msgctxt "IDS_MPLAYERC_93"
+msgid "Next Audio Track (DVD)"
+msgstr ""
+
+msgctxt "IDS_MPLAYERC_94"
+msgid "Prev Audio Track (DVD)"
+msgstr ""
+
+msgctxt "IDS_MPLAYERC_95"
+msgid "Next Subtitle Track (DVD)"
+msgstr ""
+
+msgctxt "IDS_MPLAYERC_96"
+msgid "Prev Subtitle Track (DVD)"
+msgstr ""
+
+msgctxt "IDS_MPLAYERC_97"
+msgid "On/Off Subtitle (DVD)"
+msgstr "ਸਬਟਾਈਟਲ ਚਾਲੂ/ਬੰਦ ਕਰੋ(DVD)"
+
+msgctxt "IDS_OSD_DISPLAY_CURRENT_TIME"
+msgid "OSD: Display Current Time"
+msgstr "OSD: ਮੌਜੂਦਾ ਸਮਾਂ ਦਿਖਾਓ"
+
+msgctxt "IDS_PPAGEWEBSERVER_0"
+msgid "Select the directory"
+msgstr "ਡਾਇਰੈਕਟਰੀ ਚà©à¨£à©‹"
+
+msgctxt "IDS_FAVORITES_QUICKADDFAVORITE"
+msgid "Quick add favorite"
+msgstr "ਤà©à¨°à©°à¨¤ ਮਨਪਸੰਦ ਵਿੱਚ ਜੋੜੋ"
+
+msgctxt "IDS_DVB_CHANNEL_NUMBER"
+msgid "N"
+msgstr "N"
+
+msgctxt "IDS_DVB_CHANNEL_NAME"
+msgid "Name"
+msgstr "ਨਾਂ"
+
+msgctxt "IDS_DVB_CHANNEL_FREQUENCY"
+msgid "Frequency"
+msgstr "ਫਰੀਕਿਊਂਸੀ"
+
+msgctxt "IDS_DVB_CHANNEL_ENCRYPTION"
+msgid "Encrypted"
+msgstr "ਇੰਕà©à¨°à¨¿à¨ªà¨Ÿ ਹੈ"
+
+msgctxt "IDS_DVB_CHANNEL_ENCRYPTED"
+msgid "Yes"
+msgstr "ਹਾਂ"
+
+msgctxt "IDS_DVB_CHANNEL_NOT_ENCRYPTED"
+msgid "No"
+msgstr "ਨਹੀਂ"
+
+msgctxt "IDS_DVB_CHANNEL_START_SCAN"
+msgid "Start"
+msgstr "ਸ਼à©à¨°à©‚"
+
+msgctxt "IDS_DVB_CHANNEL_STOP_SCAN"
+msgid "Stop"
+msgstr "ਰੋਕੋ"
+
+msgctxt "IDS_DVB_TVNAV_SEERADIO"
+msgid "Radio stations"
+msgstr "ਰੇਡੀਓ ਸਟੇਸ਼ਨ"
+
+msgctxt "IDS_DVB_TVNAV_SEETV"
+msgid "TV stations"
+msgstr "TV ਸਟੇਸ਼ਨ"
+
+msgctxt "IDS_DVB_CHANNEL_FORMAT"
+msgid "Format"
+msgstr "ਫਾਰਮੈਟ"
+
+msgctxt "IDS_MAINFRM_2"
+msgid "Focus lost to: %s - %s"
+msgstr "ਫੋਕਸ ਗà©à¨†à¨šà¨¾: %s - %s"
+
+msgctxt "IDS_AG_SUBTITLES_SAVED"
+msgid "Subtitles saved"
+msgstr "ਸਬ-ਟਾਈਟਲ ਸੰਭਾਲੇ"
+
+msgctxt "IDS_MAINFRM_4"
+msgid "Cannot save subtitles"
+msgstr "ਸਬਟਾਈਟਲ ਸੰਭਾਲੇ ਨਹੀਂ ਜਾ ਸਕਦੇ"
+
+msgctxt "IDS_AG_FRAMERATE"
+msgid "Frame rate"
+msgstr "ਫਰੇਮ ਦਰ"
+
+msgctxt "IDS_MAINFRM_6"
+msgid "drawn: %d, dropped: %d"
+msgstr ""
+
+msgctxt "IDS_AG_FRAMES"
+msgid "Frames"
+msgstr "ਫਰੇਮ"
+
+msgctxt "IDS_AG_BUFFERS"
+msgid "Buffers"
+msgstr "ਬਫ਼ਰ"
+
+msgctxt "IDS_MAINFRM_9"
+msgid "Volume: %02lu/%02lu, Title: %02lu/%02lu, Chapter: %02lu/%02lu"
+msgstr "ਵਾਲੀਅਮ: %02lu/%02lu, ਟਾਈਟਲ: %02lu/%02lu, ਚੈਪਟਰ: %02lu/%02lu"
+
+msgctxt "IDS_MAINFRM_10"
+msgid "Angle: %02lu/%02lu, %lux%lu %lu Hz %lu:%lu"
+msgstr "ਕੋਣ: %02lu/%02lu, %lux%lu %lu Hz %lu:%lu"
+
+msgctxt "IDS_MAINFRM_11"
+msgid "%s, %s %u Hz %d bits %d %s"
+msgstr "%s, %s %u Hz %d ਬਿੱਟ %d %s"
+
+msgctxt "IDS_ADD_TO_PLAYLIST"
+msgid "Add to MPC-HC Playlist"
+msgstr "MPC-HC ਪਲੇਅਲਿਸਟ ਵਿੱਚ ਜੋੜੋ"
+
+msgctxt "IDS_OPEN_WITH_MPC"
+msgid "Play with MPC-HC"
+msgstr "MPC-HC ਨਾਲ ਚਲਾਓ"
+
+msgctxt "IDS_CANNOT_CHANGE_FORMAT"
+msgid "MPC-HC has not enough privileges to change files formats associations. Please click on the \"Run as administrator\" button."
+msgstr ""
+
+msgctxt "IDS_APP_DESCRIPTION"
+msgid "MPC-HC is an extremely light-weight, open source media player for Windows. It supports all common video and audio file formats available for playback. We are 100% spyware free, there are no advertisements or toolbars."
+msgstr "MPC-HC ਵਿੰਡੋਜ਼ ਲਈ ਬਹà©à¨¤ ਹੀ ਹਲਕਾ, ਆਜ਼ਾਦ ਸਰੋਤ ਵਾਲਾ ਮੀਡੀਆ ਪਲੇਅਰ ਹੈ। ਇਹ ਚਲਾਉਣ ਵਾਲੇ ਸਭ ਆਮ ਵਿਡੀਓ ਤੇ ਆਡੀਓ ਫ਼ਾਈਲ ਫਾਰਮੈਟ ਲਈ ਸਹਾਇਕ ਹੈ। ਅਸੀਂ 100% ਸਪਾਈਵੇਅਰ ਮà©à¨•à¨¤ ਹੈ। ਕੋਈ ਵੀ ਇਸ਼ਤਿਹਾਰ ਜਾਂ ਟੂਲਬਾਰ ਨਹੀਂ ਹà©à©°à¨¦à©€ ਹੈ।"
+
+msgctxt "IDS_MAINFRM_12"
+msgid "channel"
+msgstr " ਚੈਨਲ"
+
+msgctxt "IDS_MAINFRM_13"
+msgid "channels"
+msgstr "ਚੈਨਲ"
+
+msgctxt "IDS_AG_TITLE"
+msgid "Title %u"
+msgstr "ਟਾਈਟਲ %u"
+
+msgctxt "IDS_MAINFRM_16"
+msgid "DVD: Unexpected error"
+msgstr "DVD: ਅਚਾਨਕ ਗਲਤੀ"
+
+msgctxt "IDS_MAINFRM_17"
+msgid "DVD: Copy-Protect Fail"
+msgstr "DVD: ਕਾਪੀ-ਸà©à¨°à©±à¨–ਿਆ ਫੇਲà©à¨¹ ਹੈ"
+
+msgctxt "IDS_MAINFRM_18"
+msgid "DVD: Invalid DVD 1.x Disc"
+msgstr ""
+
+msgctxt "IDS_MAINFRM_19"
+msgid "DVD: Invalid Disc Region"
+msgstr ""
+
+msgctxt "IDS_MAINFRM_20"
+msgid "DVD: Low Parental Level"
+msgstr ""
+
+msgctxt "IDS_MAINFRM_21"
+msgid "DVD: Macrovision Fail"
+msgstr ""
+
+msgctxt "IDS_MAINFRM_22"
+msgid "DVD: Incompatible System And Decoder Regions"
+msgstr ""
+
+msgctxt "IDS_MAINFRM_23"
+msgid "DVD: Incompatible Disc And Decoder Regions"
+msgstr ""
+
+msgctxt "IDS_D3DFS_WARNING"
+msgid "This option is designed to avoid tearing. However, it will also prevent MPC-HC from displaying the context menu and any dialog box during playback.\n\nDo you really want to activate this option?"
+msgstr ""
+
+msgctxt "IDS_MAINFRM_139"
+msgid "Sub delay: %ld ms"
+msgstr "ਸਬ ਦੇਰੀ: %ld ms"
+
+msgctxt "IDS_AG_TITLE2"
+msgid "Title: %02d/%02d"
+msgstr "ਦੇਰੀ: %02d/%02d"
+
+msgctxt "IDS_REALVIDEO_INCOMPATIBLE"
+msgid "Filename contains unsupported characters (use only A-Z, 0-9)"
+msgstr ""
+
+msgctxt "IDS_THUMB_ROWNUMBER"
+msgid "Rows:"
+msgstr "ਕਤਾਰਾਂ:"
+
+msgctxt "IDS_THUMB_COLNUMBER"
+msgid "Columns:"
+msgstr "ਕਾਲਮ:"
+
+msgctxt "IDS_THUMB_IMAGE_WIDTH"
+msgid "Image width"
+msgstr "ਚਿੱਤਰ ਚੌੜਾਈ"
+
+msgctxt "IDS_PPSDB_URLCORRECT"
+msgid "The URL appears to be correct!"
+msgstr "URL ਠੀਕ ਜਾਪਦਾ ਹੈ!"
+
+msgctxt "IDS_PPSDB_PROTOCOLERR"
+msgid "Protocol version mismatch, please upgrade your player or choose a different address!"
+msgstr "ਪਰੋਟੋਕਾਲ ਵਰਜ਼ਨ ਮਿਲਦਾ ਨਹੀਂ, ਆਪਣੇ ਪਲੇਅਰ ਨੂੰ ਅੱਪਗਰੇਡ ਕਰੋ ਜਾਂ ਵੱਖਰਾ à¨à¨¡à¨°à©ˆà¨¸ ਵਰਤੋਂ।"
+
+msgctxt "IDS_AG_ASPECT_RATIO"
+msgid "Aspect Ratio"
+msgstr "ਆਕਾਰ ਅਨà©à¨ªà¨¾à¨¤"
+
+msgctxt "IDS_MAINFRM_37"
+msgid ", Total: %ld, Dropped: %ld"
+msgstr ", ਕà©à©±à¨²: %ld, ਅਣਡਿੱਠੇ ਕੀਤੇ: %ld"
+
+msgctxt "IDS_MAINFRM_38"
+msgid ", Size: %I64d KB"
+msgstr ", ਆਕਾਰ: %I64d KB"
+
+msgctxt "IDS_MAINFRM_39"
+msgid ", Size: %I64d MB"
+msgstr ", ਆਕਾਰ: %I64d MB"
+
+msgctxt "IDS_MAINFRM_40"
+msgid ", Free: %I64d KB"
+msgstr ", ਖਾਲੀ: %I64d KB"
+
+msgctxt "IDS_MAINFRM_41"
+msgid ", Free: %I64d MB"
+msgstr ", ਖਾਲੀ: %I64d MB"
+
+msgctxt "IDS_MAINFRM_42"
+msgid ", Free V/A Buffers: %03d/%03d"
+msgstr ", ਖਾਲੀ V/A ਬਫ਼ਰ: %03d/%03d"
+
+msgctxt "IDS_AG_ERROR"
+msgid "Error"
+msgstr "ਗਲਤੀ"
+
+msgctxt "IDS_SUBTITLE_STREAM_OFF"
+msgid "Subtitle: off"
+msgstr "ਸਬਟਾਈਟਲ: ਬੰਦ"
+
+msgctxt "IDS_SUBTITLE_STREAM"
+msgid "Subtitle: %s"
+msgstr "ਸਬਟਾਈਟਲ: %s"
+
+msgctxt "IDS_MAINFRM_46"
+msgid "Select the path for the DVD/BD:"
+msgstr "DVD/BD ਲਈ ਪਾਥ ਚà©à¨£à©‹:"
+
+msgctxt "IDS_SUB_LOADED_SUCCESS"
+msgid " loaded successfully"
+msgstr "ਕਾਮਯਾਬੀ ਨਾਲ ਲੋਡ ਕੀਤਾ"
+
+msgctxt "IDS_ALL_FILES_FILTER"
+msgid "All files (*.*)|*.*||"
+msgstr "ਸਭ ਫ਼ਾਈਲਾਂ (*.*)|*.*||"
+
+msgctxt "IDS_GETDIB_FAILED"
+msgid "GetDIB failed, hr = %08x"
+msgstr ""
+
+msgctxt "IDS_GETCURRENTIMAGE_FAILED"
+msgid "GetCurrentImage failed, hr = %08x"
+msgstr ""
+
+msgctxt "IDS_SCREENSHOT_ERROR"
+msgid "Cannot create file"
+msgstr "ਫ਼ਾਈਲ ਬਣਾਈ ਨਹੀਂ ਜਾ ਸਕਦੀ"
+
+msgctxt "IDS_THUMBNAILS_NO_DURATION"
+msgid "Cannot create thumbnails for files with no duration"
+msgstr "ਬਿਨਾਂ ਅੰਤਰਾਲ ਨਾਲ ਫ਼ਾਈਲਾਂ ਵਾਸਤੇ ਥੰਮਨੇਲ ਬਣਾਠਨਹੀਂ ਜਾ ਸਕਦੇ"
+
+msgctxt "IDS_THUMBNAILS_NO_FRAME_SIZE"
+msgid "Failed to get video frame size"
+msgstr "ਵਿਡੀਓ ਫਰੇਮ ਆਕਾਰ ਲੈਣ ਲਈ ਫੇਲà©à¨¹ ਹੈ"
+
+msgctxt "IDS_OUT_OF_MEMORY"
+msgid "Out of memory, go buy some more!"
+msgstr "ਮੈਮੋਰੀ ਖਤਮ ਹੋਈ, ਕà©à¨ ਹੋਰ ਖਰੀਦੋ!"
+
+msgctxt "IDS_THUMBNAILS_INVALID_FORMAT"
+msgid "Invalid image format, cannot create thumbnails out of %d bpp dibs."
+msgstr ""
+
+msgctxt "IDS_THUMBNAILS_INFO_FILESIZE"
+msgid "File Size: %s (%s bytes)\\N"
+msgstr "ਫ਼ਾਈਲ ਆਕਾਰ: %s (%s ਬਾਈਟ)\\N"
+
+msgctxt "IDS_THUMBNAILS_INFO_HEADER"
+msgid "{\\an7\\1c&H000000&\\fs16\\b0\\bord0\\shad0}File Name: %s\\N%sResolution: %dx%d %s\\NDuration: %02d:%02d:%02d"
+msgstr "{\\an7\\1c&H000000&\\fs16\\b0\\bord0\\shad0}ਫ਼ਾਈਲ ਨਾਂ: %s\\N%sਰੋਜ਼ੂਲੇਸ਼ਨ: %dx%d %s\\Nਅੰਤਰਾਲ: %02d:%02d:%02d"
+
+msgctxt "IDS_THUMBNAIL_TOO_SMALL"
+msgid "The thumbnails would be too small, impossible to create the file.\n\nTry lowering the number of thumbnails or increasing the total size."
+msgstr ""
+
+msgctxt "IDS_CANNOT_LOAD_SUB"
+msgid "To load subtitles you have to change the video renderer type and reopen the file.\n- DirectShow: VMR-7/VMR-9 (renderless), EVR (CP), Sync, madVR or Haali\n- RealMedia: Special renderer for RealMedia, or open it through DirectShow\n- QuickTime: DX7 or DX9 renderer for QuickTime\n- ShockWave: n/a"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_FILES_FILTER"
+msgid "Subtitle files"
+msgstr "ਸਬਟਾਈਟਲ ਫ਼ਾਈਲਾਂ"
+
+msgctxt "IDS_MAINFRM_68"
+msgid "Aspect Ratio: %ld:%ld"
+msgstr "ਆਕਾਰ ਅਨà©à¨ªà¨¾à¨¤: %ld:%ld"
+
+msgctxt "IDS_MAINFRM_69"
+msgid "Aspect Ratio: Default"
+msgstr "ਆਕਾਰ ਅਨà©à¨ªà¨¾à¨¤: ਡਿਫਾਲਟ"
+
+msgctxt "IDS_MAINFRM_70"
+msgid "Audio delay: %I64d ms"
+msgstr "ਆਡੀਓ ਦੇਰੀ: %I64d ms"
+
+msgctxt "IDS_AG_CHAPTER"
+msgid "Chapter %d"
+msgstr "ਚੈਪਟਰ %d"
+
+msgctxt "IDS_AG_OUT_OF_MEMORY"
+msgid "Out of memory"
+msgstr "ਮੈਮੋਰੀ ਖਤਮ ਹੋਈ"
+
+msgctxt "IDS_MAINFRM_77"
+msgid "Error: Adobe Flash Player for Internet Explorer is required"
+msgstr ""
+
+msgctxt "IDS_MAINFRM_78"
+msgid "QuickTime not yet supported for X64 (apple library not available)"
+msgstr ""
+
+msgctxt "IDS_MAINFRM_80"
+msgid "Failed to create the filter graph object"
+msgstr ""
+
+msgctxt "IDS_MAINFRM_81"
+msgid "Invalid argument"
+msgstr ""
+
+msgctxt "IDS_MAINFRM_82"
+msgid "Opening aborted"
+msgstr "ਖੋਲà©à¨¹à¨£ ਨੂੰ ਅਧੂਰਾ ਛੱਡਿਆ"
+
+msgctxt "IDS_MAINFRM_83"
+msgid "Failed to render the file"
+msgstr "ਫ਼ਾਈਲ ਪੇਸ਼ ਕਰਨ ਲਈ ਫੇਲà©à¨¹ ਹੈ"
+
+msgctxt "IDS_PPSDB_BADURL"
+msgid "Bad URL, could not locate subtitle database there!"
+msgstr ""
+
+msgctxt "IDS_AG_CHAPTER2"
+msgid "Chapter: "
+msgstr "ਚੈਪਟਰ:"
+
+msgctxt "IDS_VOLUME_OSD"
+msgid "Vol: %d%%"
+msgstr "ਵਾਲੀ: %d%%"
+
+msgctxt "IDS_BOOST_OSD"
+msgid "Boost: +%u%%"
+msgstr "ਬੂਸਟ: +%u%%"
+
+msgctxt "IDS_BALANCE_OSD"
+msgid "Balance: %s"
+msgstr "ਸੰਤà©à¨²à¨¨: %s"
+
+msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
+msgid "Current"
+msgstr "ਮੌਜੂਦਾ"
+
+msgctxt "IDS_MAINFRM_DIR_TITLE"
+msgid "Select Directory"
+msgstr "ਡਾਇਰੈਕਟਰੀ ਚà©à¨£à©‹"
+
+msgctxt "IDS_MAINFRM_DIR_CHECK"
+msgid "Include subdirectories"
+msgstr "ਸਬ-ਡਾਇਰੈਕਟਰੀਆਂ ਸਮੇਤ"
+
+msgctxt "IDS_AG_PAUSE"
+msgid "Pause"
+msgstr "ਵਿਰਾਮ ਕਰੋ"
+
+msgctxt "IDS_AG_TOGGLE_CAPTION"
+msgid "Toggle Caption&Menu"
+msgstr "ਸà©à¨°à¨–à©€ ਮੀਨੂ ਬਦਲੋ(&M)"
+
+msgctxt "IDS_AG_TOGGLE_SEEKER"
+msgid "Toggle Seek Bar"
+msgstr "ਸੀਕ ਪੱਟੀ ਬਦਲੋ"
+
+msgctxt "IDS_AG_TOGGLE_CONTROLS"
+msgid "Toggle Controls"
+msgstr "ਕੰਟਰੋਲ ਬਦਲੋ"
+
+msgctxt "IDS_MAINFRM_84"
+msgid "Invalid file name"
+msgstr "ਗਲਤ ਫ਼ਾਈਲ ਨਾਂ"
+
+msgctxt "IDS_MAINFRM_86"
+msgid "Cannot connect the filters"
+msgstr "ਫਿਲਟਰਾਂ ਨਾਲ ਕਨੈਕਟ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ"
+
+msgctxt "IDS_MAINFRM_87"
+msgid "Cannot load any source filter"
+msgstr "ਕੋਈ ਸਰੋਤ ਫਿਲਟਰ ਲੋਡ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ"
+
+msgctxt "IDS_MAINFRM_88"
+msgid "Cannot render the file"
+msgstr "ਫ਼ਾਈਲ ਨੂੰ ਰੈਂਡਰ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ"
+
+msgctxt "IDS_MAINFRM_89"
+msgid "Invalid file format"
+msgstr "ਗਲਤ ਫ਼ਾਈਲ ਫਾਰਮੈਟ"
+
+msgctxt "IDS_MAINFRM_90"
+msgid "File not found"
+msgstr "ਫ਼ਾਈਲ ਨਹੀਂ ਲੱਭੀ"
+
+msgctxt "IDS_MAINFRM_91"
+msgid "Unknown file type"
+msgstr "ਅਣਜਾਣ ਫ਼ਾਈਲ ਕਿਸਮ"
+
+msgctxt "IDS_MAINFRM_92"
+msgid "Unsupported stream"
+msgstr "ਗ਼ੈਰ-ਸਹਾਇਕ ਸਟਰੀ"
+
+msgctxt "IDS_MAINFRM_93"
+msgid "Cannot find DVD directory"
+msgstr "DVD ਡਾਇਰੈਕਟਰੀ ਲੱਭੀ ਨਹੀਂ ਜਾ ਸਕਦੀ"
+
+msgctxt "IDS_MAINFRM_94"
+msgid "Can't create the DVD Navigator filter"
+msgstr "DVD ਨੇਵੀਗੇਟਰ ਫਿਲਟਰ ਬਣਾਇਆ ਨਹੀਂ ਜਾ ਸਕਦਾ"
+
+msgctxt "IDS_AG_FAILED"
+msgid "Failed"
+msgstr "ਫੇਲà©à¨¹ ਹੈ"
+
+msgctxt "IDS_MAINFRM_96"
+msgid "Can't create video capture filter"
+msgstr "ਵਿੀਡਓ ਕੈਪਚਰ ਫਿਲਟਰ ਬਣਾਇਆ ਨਹੀਂ ਜਾ ਸਕਦਾ"
+
+msgctxt "IDS_MAINFRM_98"
+msgid "No capture filters"
+msgstr "ਕੋਈ ਕੈਪਚਰ ਫਿਲਟਰ ਨਹੀਂ"
+
+msgctxt "IDS_MAINFRM_99"
+msgid "Can't create capture graph builder object"
+msgstr ""
+
+msgctxt "IDS_MAINFRM_108"
+msgid "Couldn't open any device"
+msgstr "ਕੋਈ ਡਿਵਾਇਸ ਖੋਲà©à¨¹à¨¿à¨† ਨਹੀਂ ਜਾ ਸਕਿਆ"
+
+msgctxt "IDS_AG_SOUND"
+msgid "Sound"
+msgstr "ਸਾਊਂਡ"
+
+msgctxt "IDS_MAINFRM_114"
+msgid "%s was not found, please insert media containing this file."
+msgstr "%s ਨਹੀਂ ਲੱਭੀ, ਇਹ ਫ਼ਾਈਲ ਰੱਖਣ ਵਾਲਾ ਮੀਡੀਆ ਪਾਉ।"
+
+msgctxt "IDS_AG_ABORTED"
+msgid "Aborted"
+msgstr "ਅਧੂਰਾ ਛੱਡਿਆ"
+
+msgctxt "IDS_MAINFRM_116"
+msgid "&Properties..."
+msgstr "...ਵਿਸ਼ੇਸ਼ਤਾ(&P)"
+
+msgctxt "IDS_MAINFRM_117"
+msgid " (pin) properties..."
+msgstr "...(ਪਿੰਨ) ਵਿਸ਼ੇਸ਼ਤਾ"
+
+msgctxt "IDS_AG_UNKNOWN_STREAM"
+msgid "Unknown Stream"
+msgstr "ਅਣਜਾਣ ਸਟਰੀ"
+
+msgctxt "IDS_AG_UNKNOWN"
+msgid "Unknown %u"
+msgstr "ਅਣਜਾਣ %u"
+
+msgctxt "IDS_AG_VSYNC"
+msgid "VSync"
+msgstr "V-ਸਿੰਕ"
+
+msgctxt "IDS_MAINFRM_121"
+msgid " (Director Comments 1)"
+msgstr "(ਡਾਇਰੈਕਟਰ ਟਿੱਪਣੀ 1)"
+
+msgctxt "IDS_MAINFRM_122"
+msgid " (Director Comments 2)"
+msgstr "(ਡਾਇਰੈਕਟਰ ਟਿੱਪਣੀ 2)"
+
+msgctxt "IDS_DVD_SUBTITLES_ENABLE"
+msgid "Enable DVD subtitles"
+msgstr "DVD ਸਬਟਾਈਟਲ ਸਮਰੱਥ ਕਰੋ"
+
+msgctxt "IDS_AG_ANGLE"
+msgid "Angle %u"
+msgstr "ਕੋਣ %u"
+
+msgctxt "IDS_AG_VSYNCOFFSET_INCREASE"
+msgid "Increase VSync Offset"
+msgstr ""
+
+msgctxt "IDS_AG_DISABLED"
+msgid "Disabled"
+msgstr "ਅਸਮਰੱਥ ਹੈ"
+
+msgctxt "IDS_AG_VSYNCOFFSET_DECREASE"
+msgid "Decrease VSync Offset"
+msgstr ""
+
+msgctxt "IDS_MAINFRM_136"
+msgid "MPC-HC D3D Fullscreen"
+msgstr "MPC-HC D3D ਪੂਰੀ-ਸਕਰੀਨ"
+
+msgctxt "IDS_MAINFRM_137"
+msgid "Unknown format"
+msgstr "ਅਣਜਾਣ ਫਾਰਮੈਟ"
+
+msgctxt "IDS_MAINFRM_138"
+msgid "Sub shift: %ld ms"
+msgstr ""
+
+msgctxt "IDS_VOLUME_BOOST_INC"
+msgid "Volume boost increase"
+msgstr ""
+
+msgctxt "IDS_VOLUME_BOOST_DEC"
+msgid "Volume boost decrease"
+msgstr ""
+
+msgctxt "IDS_VOLUME_BOOST_MIN"
+msgid "Volume boost Min"
+msgstr ""
+
+msgctxt "IDS_VOLUME_BOOST_MAX"
+msgid "Volume boost Max"
+msgstr ""
+
+msgctxt "IDS_USAGE"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr ""
+
+msgctxt "IDS_UNKNOWN_SWITCH"
+msgid "Unrecognized switch(es) found in command line string: \n\n"
+msgstr ""
+
+msgctxt "IDS_AG_TOGGLE_INFO"
+msgid "Toggle Information"
+msgstr "ਜਾਣਕਾਰੀ ਬਦਲੋ"
+
+msgctxt "IDS_AG_TOGGLE_STATS"
+msgid "Toggle Statistics"
+msgstr "ਅੰਕੜੇ ਬਦਲੋ"
+
+msgctxt "IDS_AG_TOGGLE_STATUS"
+msgid "Toggle Status"
+msgstr "ਸਥਿਤੀ ਬਦਲੋ"
+
+msgctxt "IDS_AG_TOGGLE_SUBRESYNC"
+msgid "Toggle Subresync Bar"
+msgstr ""
+
+msgctxt "IDS_AG_TOGGLE_PLAYLIST"
+msgid "Toggle Playlist Bar"
+msgstr "ਪਲੇਅਲਿਸਟ ਪੱਟੀ ਬਦਲੋ"
+
+msgctxt "IDS_AG_TOGGLE_CAPTURE"
+msgid "Toggle Capture Bar"
+msgstr "ਕੈਪਚਰ ਪੱਟੀ ਬਦਲੋ"
+
+msgctxt "IDS_AG_TOGGLE_DEBUGSHADERS"
+msgid "Toggle Debug Shaders"
+msgstr "ਡੀਬੱਗ ਸ਼ੇਡਰ ਬਦਲੋ"
+
+msgctxt "IDS_AG_ZOOM_50"
+msgid "Zoom 50%"
+msgstr "50% ਜ਼ੂਮ"
+
+msgctxt "IDS_AG_ZOOM_100"
+msgid "Zoom 100%"
+msgstr "100% ਜ਼ੂਮ"
+
+msgctxt "IDS_AG_ZOOM_200"
+msgid "Zoom 200%"
+msgstr "200% ਜ਼ੂਮ"
+
+msgctxt "IDS_AG_NEXT_AR_PRESET"
+msgid "Next AR Preset"
+msgstr ""
+
+msgctxt "IDS_AG_VIDFRM_STRETCH"
+msgid "VidFrm Stretch"
+msgstr ""
+
+msgctxt "IDS_AG_VIDFRM_INSIDE"
+msgid "VidFrm Inside"
+msgstr ""
+
+msgctxt "IDS_AG_VIDFRM_OUTSIDE"
+msgid "VidFrm Outside"
+msgstr ""
+
+msgctxt "IDS_AG_PNS_RESET"
+msgid "PnS Reset"
+msgstr ""
+
+msgctxt "IDS_AG_PNS_ROTATEX_P"
+msgid "PnS Rotate X+"
+msgstr ""
+
+msgctxt "IDS_AG_VIDFRM_ZOOM1"
+msgid "VidFrm Zoom 1"
+msgstr ""
+
+msgctxt "IDS_AG_VIDFRM_ZOOM2"
+msgid "VidFrm Zoom 2"
+msgstr ""
+
+msgctxt "IDS_AG_VIDFRM_SWITCHZOOM"
+msgid "VidFrm Switch Zoom"
+msgstr ""
+
+msgctxt "IDS_ENABLE_ALL_FILTERS"
+msgid "&Enable all filters"
+msgstr "ਸਭ ਫਿਲਟਰ ਸਮਰੱਥ ਕਰੋ(&E)"
+
+msgctxt "IDS_NAVIGATE_TUNERSCAN"
+msgid "Tuner scan"
+msgstr "ਟਿਊਨਰ ਜਾਂਚ"
+
+msgctxt "IDS_SUBTITLES_ERROR"
+msgid "Subtitles are not loaded or unsupported renderer."
+msgstr ""
+
+msgctxt "IDS_LOGO_AUTHOR"
+msgid "Author unknown. Contact us if you made this logo!"
+msgstr ""
+
+msgctxt "IDS_NO_MORE_MEDIA"
+msgid "No more media in the current folder."
+msgstr "ਮੌਜੂਦਾ ਫੋਲਡਰ ਵਿੱਚ ਕੋਈ ਹੋਰ ਮੀਡੀਆ ਨਹੀਂ ਹੈ।"
+
+msgctxt "IDS_FIRST_IN_FOLDER"
+msgid "The first file of the folder is already loaded."
+msgstr "ਫੋਲਡਰ ਦੀ ਪਹਿਲੀ ਫ਼ਾਈਲ ਪਹਿਲਾਂ ਹੀ ਲੋਡ ਹੈ।"
+
+msgctxt "IDS_LAST_IN_FOLDER"
+msgid "The last file of the folder is already loaded."
+msgstr "ਫੋਲਡਰ ਦੀ ਆਖਰੀ ਫ਼ਾਈਲ ਪਹਿਲਾਂ ਹੀ ਲੋਡ ਹੈ।"
+
+msgctxt "IDS_FRONT_LEFT"
+msgid "Front Left"
+msgstr "ਅੱਗੇ ਖੱਬਾ"
+
+msgctxt "IDS_FRONT_RIGHT"
+msgid "Front Right"
+msgstr "ਅੱਗੇ ਸੱਜਾ"
+
+msgctxt "IDS_FRONT_CENTER"
+msgid "Front Center"
+msgstr "ਅੱਗੇ ਸੈਂਟਰ"
+
+msgctxt "IDS_LOW_FREQUENCY"
+msgid "Low Frequency"
+msgstr "ਘੱਟ ਫਰੀਕਿਊਂਸੀ"
+
+msgctxt "IDS_BACK_LEFT"
+msgid "Back Left"
+msgstr "ਪਿੱਛੇ ਖੱਬੇ"
+
+msgctxt "IDS_BACK_RIGHT"
+msgid "Back Right"
+msgstr "ਪਿੱਛੇ ਸੱਜੇ"
+
+msgctxt "IDS_FRONT_LEFT_OF_CENTER"
+msgid "Front Left of Center"
+msgstr "ਸੈਂਟਰ ਦਾ ਅੱਗੇ ਖੱਬਾ"
+
+msgctxt "IDS_FRONT_RIGHT_OF_CENTER"
+msgid "Front Right of Center"
+msgstr "ਸੈਂਟਰ ਦਾ ਅੱਗੇ ਸੱਜਾ"
+
+msgctxt "IDS_BACK_CENTER"
+msgid "Back Center"
+msgstr "ਪਿੱਛੇ ਸੈਂਟਰ"
+
+msgctxt "IDS_SIDE_LEFT"
+msgid "Side Left"
+msgstr "ਪਾਸੇ ਖੱਬਾ"
+
+msgctxt "IDS_SIDE_RIGHT"
+msgid "Side Right"
+msgstr "ਪਾਸੇ ਸੱਜਾ"
+
+msgctxt "IDS_TOP_CENTER"
+msgid "Top Center"
+msgstr ""
+
+msgctxt "IDS_TOP_FRONT_LEFT"
+msgid "Top Front Left"
+msgstr ""
+
+msgctxt "IDS_TOP_FRONT_CENTER"
+msgid "Top Front Center"
+msgstr ""
+
+msgctxt "IDS_TOP_FRONT_RIGHT"
+msgid "Top Front Right"
+msgstr ""
+
+msgctxt "IDS_TOP_BACK_LEFT"
+msgid "Top Back Left"
+msgstr ""
+
+msgctxt "IDS_TOP_BACK_CENTER"
+msgid "Top Back Center"
+msgstr ""
+
+msgctxt "IDS_TOP_BACK_RIGHT"
+msgid "Top Back Right"
+msgstr ""
+
+msgctxt "IDS_TIME_TOOLTIP_ABOVE"
+msgid "Above seek bar"
+msgstr ""
+
+msgctxt "IDS_TIME_TOOLTIP_BELOW"
+msgid "Below seek bar"
+msgstr ""
+
+msgctxt "IDS_VIDEO_STREAM"
+msgid "Video: %s"
+msgstr "ਵਿਡੀਓ: %s"
+
+msgctxt "IDS_APPLY"
+msgid "Apply"
+msgstr "ਲਾਗੂ ਕਰੋ"
+
+msgctxt "IDS_CLEAR"
+msgid "Clear"
+msgstr "ਸਾਫ਼ ਕਰੋ"
+
+msgctxt "IDS_CANCEL"
+msgid "Cancel"
+msgstr "ਰੱਦ ਕਰੋ"
+
+msgctxt "IDS_THUMB_THUMBNAILS"
+msgid "Layout"
+msgstr "ਲੇਆਉਟ"
+
+msgctxt "IDS_THUMB_PIXELS"
+msgid "Pixels:"
+msgstr "ਪਿਕਸਲ:"
+
+msgctxt "IDS_TEXTFILE_ENC"
+msgid "Encoding:"
+msgstr "ਇੰਕੋਡਿੰਗ:"
+
+msgctxt "IDS_DISABLE_ALL_FILTERS"
+msgid "&Disable all filters"
+msgstr "ਸਭ ਫਿਲਟਰ ਅਸਮਰੱਥ ਕਰੋ(&D)"
+
+msgctxt "IDS_ENABLE_AUDIO_FILTERS"
+msgid "Enable all audio decoders"
+msgstr "ਸਭ ਆਡੀਓ ਡੀਕੋਡਰ ਸਮਰੱਥ ਕਰੋ"
+
+msgctxt "IDS_DISABLE_AUDIO_FILTERS"
+msgid "Disable all audio decoders"
+msgstr "ਸਭ ਆਡੀਓ ਡੀਕੋਡਰ ਅਸਮਰੱਥ ਕਰੋ"
+
+msgctxt "IDS_ENABLE_VIDEO_FILTERS"
+msgid "Enable all video decoders"
+msgstr "ਸਬ ਵਿਡੀਓ ਡੀਕੋਡਰ ਸਮਰੱਥ ਕਰੋ"
+
+msgctxt "IDS_DISABLE_VIDEO_FILTERS"
+msgid "Disable all video decoders"
+msgstr "ਸਭ ਵਿਡੀਓ ਡੀਕੋਡਰ ਅਸਮਰੱਥ ਕਰੋ"
+
+msgctxt "IDS_STRETCH_TO_WINDOW"
+msgid "Stretch To Window"
+msgstr "ਵਿੰਡੋ ਲਈ ਖਿੱਚੋ"
+
+msgctxt "IDS_TOUCH_WINDOW_FROM_INSIDE"
+msgid "Touch Window From Inside"
+msgstr "ਪਾਸੇ ਤੋਂ ਵਿੰਡੋ ਨੂੰ ਟੱਚ ਕਰੋ"
+
+msgctxt "IDS_ZOOM1"
+msgid "Zoom 1"
+msgstr "ਜ਼ੂਮ 1"
+
+msgctxt "IDS_ZOOM2"
+msgid "Zoom 2"
+msgstr "ਜ਼ੂਮ 2"
+
+msgctxt "IDS_TOUCH_WINDOW_FROM_OUTSIDE"
+msgid "Touch Window From Outside"
+msgstr "ਬਾਹਰ ਤੋਂ ਵਿੰਡੋ ਟੱਚ ਕਰੋ"
+
+msgctxt "IDS_AUDIO_STREAM"
+msgid "Audio: %s"
+msgstr "ਆਡੀਓ: %s"
+
+msgctxt "IDS_AG_REOPEN"
+msgid "Reopen File"
+msgstr "ਫ਼ਾਈਲ ਮà©à©œ-ਖੋਲà©à¨¹à©‹"
+
+msgctxt "IDS_MFMT_AVI"
+msgid "AVI"
+msgstr "AVI"
+
+msgctxt "IDS_MFMT_MPEG"
+msgid "MPEG"
+msgstr "MPEG"
+
+msgctxt "IDS_MFMT_MPEGTS"
+msgid "MPEG-TS"
+msgstr "MPEG-TS"
+
+msgctxt "IDS_MFMT_DVDVIDEO"
+msgid "DVD-Video"
+msgstr "DVD-ਵਿਡੀਓ"
+
+msgctxt "IDS_MFMT_MKV"
+msgid "Matroska"
+msgstr "Matroska"
+
+msgctxt "IDS_MFMT_WEBM"
+msgid "WebM"
+msgstr "WebM"
+
+msgctxt "IDS_MFMT_MP4"
+msgid "MP4"
+msgstr "MP4"
+
+msgctxt "IDS_MFMT_MOV"
+msgid "QuickTime Movie"
+msgstr "QuickTime ਮੂਵੀ"
+
+msgctxt "IDS_MFMT_3GP"
+msgid "3GP"
+msgstr "3GP"
+
+msgctxt "IDS_MFMT_3G2"
+msgid "3G2"
+msgstr "3G2"
+
+msgctxt "IDS_MFMT_FLV"
+msgid "Flash Video"
+msgstr "ਫਲੈਸ਼ ਵਿਡੀਓ"
+
+msgctxt "IDS_MFMT_OGM"
+msgid "Ogg Media"
+msgstr "Ogg ਮੀਡੀਆ"
+
+msgctxt "IDS_MFMT_RM"
+msgid "Real Media"
+msgstr "ਰੀਅਲ ਮੀਡੀਆ"
+
+msgctxt "IDS_MFMT_RT"
+msgid "Real Script"
+msgstr "ਰੀਅਲ ਸਕà©à¨°à¨¿à¨ªà¨Ÿ"
+
+msgctxt "IDS_MFMT_WMV"
+msgid "Windows Media Video"
+msgstr "ਵਿੰਡੋਜ਼ ਮੀਡੀਆ ਵਿਡੀਓ"
+
+msgctxt "IDS_MFMT_BINK"
+msgid "Smacker/Bink Video"
+msgstr "Smacker/Bink ਵਿਡੀਓ"
+
+msgctxt "IDS_MFMT_FLIC"
+msgid "FLIC Animation"
+msgstr "FLIC à¨à¨¨à©€à¨®à©‡à¨¶à¨¨"
+
+msgctxt "IDS_MFMT_DSM"
+msgid "DirectShow Media"
+msgstr "DirectShow ਮੀਡੀਆ"
+
+msgctxt "IDS_MFMT_IVF"
+msgid "Indeo Video Format"
+msgstr "Indeo ਵਿਡੀਓ ਫਾਰਮੈਟ"
+
+msgctxt "IDS_MFMT_OTHER"
+msgid "Other"
+msgstr "ਹੋਰ"
+
+msgctxt "IDS_MFMT_SWF"
+msgid "Shockwave Flash"
+msgstr "Shockwave ਫਲੈਸ਼"
+
+msgctxt "IDS_MFMT_OTHER_AUDIO"
+msgid "Other Audio"
+msgstr "ਹੋਰ ਆਡੀਓ"
+
+msgctxt "IDS_MFMT_AC3"
+msgid "AC-3"
+msgstr "AC-3"
+
+msgctxt "IDS_MFMT_AIFF"
+msgid "AIFF"
+msgstr "AIFF"
+
+msgctxt "IDS_MFMT_ALAC"
+msgid "Apple Lossless"
+msgstr "Apple ਲੂਜ਼ਲੈਸ"
+
+msgctxt "IDS_MFMT_WAV"
+msgid "WAV"
+msgstr "WAV"
+
+msgctxt "IDS_MFMT_WMA"
+msgid "Windows Media Audio"
+msgstr "ਵਿੰਡੋਜ਼ ਮੀਡੀਆ ਆਡੀਓ"
+
+msgctxt "IDS_MFMT_WV"
+msgid "WavPack"
+msgstr "ਵੇਵਪੈਕ"
+
+msgctxt "IDS_MFMT_OPUS"
+msgid "Opus Audio Codec"
+msgstr "Opus ਆਡੀਓ Codec"
+
+msgctxt "IDS_MFMT_DTS"
+msgid "DTS/DTS-HD"
+msgstr "DTS/DTS-HD"
+
+msgctxt "IDS_MFMT_AMR"
+msgid "AMR"
+msgstr "AMR"
+
+msgctxt "IDS_MFMT_APE"
+msgid "Monkey's Audio"
+msgstr ""
+
+msgctxt "IDS_MFMT_AU"
+msgid "AU/SND"
+msgstr "AU/SND"
+
+msgctxt "IDS_MFMT_CDA"
+msgid "Audio CD track"
+msgstr "ਆਡੀਓ CD ਟਰੈਕ"
+
+msgctxt "IDS_MFMT_FLAC"
+msgid "FLAC"
+msgstr "FLAC"
+
+msgctxt "IDS_MFMT_M4A"
+msgid "MPEG-4 Audio"
+msgstr "MPEG-4 ਆਡੀਓ"
+
+msgctxt "IDS_MFMT_MIDI"
+msgid "MIDI"
+msgstr "MIDI"
+
+msgctxt "IDS_MFMT_MKA"
+msgid "Matroska audio"
+msgstr "Matroska ਆਡੀਓ"
+
+msgctxt "IDS_MFMT_MP3"
+msgid "MP3"
+msgstr "MP3"
+
+msgctxt "IDS_MFMT_MPA"
+msgid "MPEG audio"
+msgstr "MPEG ਆਡੀਓ"
+
+msgctxt "IDS_MFMT_MPC"
+msgid "Musepack"
+msgstr "Musepack"
+
+msgctxt "IDS_MFMT_OFR"
+msgid "OptimFROG"
+msgstr "OptimFROG"
+
+msgctxt "IDS_MFMT_OGG"
+msgid "Ogg Vorbis"
+msgstr "Ogg Vorbis"
+
+msgctxt "IDS_MFMT_RA"
+msgid "Real Audio"
+msgstr "Real ਆਡੀਓ"
+
+msgctxt "IDS_MFMT_TAK"
+msgid "TAK"
+msgstr "TAK"
+
+msgctxt "IDS_MFMT_TTA"
+msgid "True Audio"
+msgstr "True ਆਡੀਓ"
+
+msgctxt "IDS_MFMT_PLS"
+msgid "Playlist"
+msgstr "ਪਲੇਅਲਿਸਟ"
+
+msgctxt "IDS_MFMT_BDPLS"
+msgid "Blu-ray playlist"
+msgstr "ਬਲੂ-ਰੇਅ ਪਲੇਅਲਿਸਟ"
+
+msgctxt "IDS_MFMT_RAR"
+msgid "RAR Archive"
+msgstr "RAR ਅਕਾਇਵ"
+
+msgctxt "IDS_DVB_CHANNEL_FPS"
+msgid "FPS"
+msgstr "FPS"
+
+msgctxt "IDS_DVB_CHANNEL_RESOLUTION"
+msgid "Resolution"
+msgstr "ਰੈਜ਼ੂਲੇਸ਼ਨ"
+
+msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
+msgid "Aspect Ratio"
+msgstr "ਆਕਾਰ ਅਨà©à¨ªà¨¾à¨¤"
+
+msgctxt "IDS_OSD_RS_VSYNC_ON"
+msgid "VSync: On"
+msgstr "V-ਸਿੰਕ: ਚਾਲੂ"
+
+msgctxt "IDS_OSD_RS_VSYNC_OFF"
+msgid "VSync: Off"
+msgstr "V-ਸਿੰਕ: ਬੰਦ"
+
+msgctxt "IDS_OSD_RS_ACCURATE_VSYNC_ON"
+msgid "Accurate VSync: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_ACCURATE_VSYNC_OFF"
+msgid "Accurate VSync: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_SYNC_TO_DISPLAY_ON"
+msgid "Synchronize Video to Display: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_SYNC_TO_DISPLAY_OFF"
+msgid "Synchronize Video to Display: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_SYNC_TO_VIDEO_ON"
+msgid "Synchronize Display to Video: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_SYNC_TO_VIDEO_OFF"
+msgid "Synchronize Display to Video: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_PRESENT_NEAREST_ON"
+msgid "Present at Nearest VSync: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_PRESENT_NEAREST_OFF"
+msgid "Present at Nearest VSync: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_COLOR_MANAGEMENT_ON"
+msgid "Color Management: On"
+msgstr "ਰੰਗ ਪਰਬੰਧ: ਚਾਲੂ"
+
+msgctxt "IDS_OSD_RS_COLOR_MANAGEMENT_OFF"
+msgid "Color Management: Off"
+msgstr "ਰੰਗ ਪਰਬੰਧ: ਬੰਦ"
+
+msgctxt "IDS_OSD_RS_INPUT_TYPE_AUTO"
+msgid "Input Type: Auto-Detect"
+msgstr "ਇਨਪà©à¨Ÿ ਕਿਸਮ: ਆਟੋ-ਖੋਜ"
+
+msgctxt "IDS_OSD_RS_INPUT_TYPE_HDTV"
+msgid "Input Type: HDTV"
+msgstr "ਇਨਪà©à¨Ÿ ਕਿਸਮ: HDTV"
+
+msgctxt "IDS_OSD_RS_INPUT_TYPE_SD_NTSC"
+msgid "Input Type: SDTV NTSC"
+msgstr "ਇਨਪà©à¨Ÿ ਕਿਸਮ: SDTV NTSC"
+
+msgctxt "IDS_OSD_RS_INPUT_TYPE_SD_PAL"
+msgid "Input Type: SDTV PAL"
+msgstr "ਇਨਪà©à¨Ÿ ਕਿਸਮ: SDTV PAL"
+
+msgctxt "IDS_OSD_RS_AMBIENT_LIGHT_BRIGHT"
+msgid "Ambient Light: Bright (2.2 Gamma)"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_AMBIENT_LIGHT_DIM"
+msgid "Ambient Light: Dim (2.35 Gamma)"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_AMBIENT_LIGHT_DARK"
+msgid "Ambient Light: Dark (2.4 Gamma)"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_REND_INTENT_PERCEPT"
+msgid "Rendering Intent: Perceptual"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_REND_INTENT_RELATIVE"
+msgid "Rendering Intent: Relative Colorimetric"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_REND_INTENT_SATUR"
+msgid "Rendering Intent: Saturation"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_REND_INTENT_ABSOLUTE"
+msgid "Rendering Intent: Absolute Colorimetric"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_OUTPUT_RANGE"
+msgid "Output Range: %s"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_FLUSH_BEF_VSYNC_ON"
+msgid "Flush GPU before VSync: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_FLUSH_BEF_VSYNC_OFF"
+msgid "Flush GPU before VSync: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_FLUSH_AFT_PRES_ON"
+msgid "Flush GPU after Present: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_FLUSH_AFT_PRES_OFF"
+msgid "Flush GPU after Present: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_WAIT_ON"
+msgid "Wait for GPU Flush: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_WAIT_OFF"
+msgid "Wait for GPU Flush: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_D3D_FULLSCREEN_ON"
+msgid "D3D Fullscreen: On"
+msgstr "D3D ਪੂਰੀ-ਸਕਰੀਨ: ਚਾਲੂ"
+
+msgctxt "IDS_OSD_RS_D3D_FULLSCREEN_OFF"
+msgid "D3D Fullscreen: Off"
+msgstr "D3D ਪੂਰੀ-ਸਕਰੀਨ: ਬੰਦ"
+
+msgctxt "IDS_OSD_RS_NO_DESKTOP_COMP_ON"
+msgid "Disable desktop composition: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_NO_DESKTOP_COMP_OFF"
+msgid "Disable desktop composition: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_ALT_VSYNC_ON"
+msgid "Alternative VSync: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_ALT_VSYNC_OFF"
+msgid "Alternative VSync: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_RESET_DEFAULT"
+msgid "Renderer settings reset to default"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_RESET_OPTIMAL"
+msgid "Renderer settings reset to optimal"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_D3D_FS_GUI_SUPP_ON"
+msgid "D3D Fullscreen GUI Support: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_D3D_FS_GUI_SUPP_OFF"
+msgid "D3D Fullscreen GUI Support: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_10BIT_RBG_OUT_ON"
+msgid "10-bit RGB Output: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_10BIT_RBG_OUT_OFF"
+msgid "10-bit RGB Output: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_10BIT_RBG_IN_ON"
+msgid "Force 10-bit RGB Input: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_10BIT_RBG_IN_OFF"
+msgid "Force 10-bit RGB Input: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_FULL_FP_PROCESS_ON"
+msgid "Full Floating Point Processing: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_FULL_FP_PROCESS_OFF"
+msgid "Full Floating Point Processing: Off"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_HALF_FP_PROCESS_ON"
+msgid "Half Floating Point Processing: On"
+msgstr ""
+
+msgctxt "IDS_OSD_RS_HALF_FP_PROCESS_OFF"
+msgid "Half Floating Point Processing: Off"
+msgstr ""
+
+msgctxt "IDS_BRIGHTNESS_DEC"
+msgid "Brightness decrease"
+msgstr "ਚਮਕ ਘਟਾਓ"
+
+msgctxt "IDS_CONTRAST_INC"
+msgid "Contrast increase"
+msgstr "ਕਨਟਰਾਸਟ ਵਧਾਓ"
+
+msgctxt "IDS_CONTRAST_DEC"
+msgid "Contrast decrease"
+msgstr "ਕਨਟਰਾਸਟ ਘਟਾਓ"
+
+msgctxt "IDS_HUE_INC"
+msgid "Hue increase"
+msgstr "ਰੰਗਤ ਵਧਾਓ"
+
+msgctxt "IDS_HUE_DEC"
+msgid "Hue decrease"
+msgstr "ਰੰਗਤ ਘਟਾਓ"
+
+msgctxt "IDS_SATURATION_INC"
+msgid "Saturation increase"
+msgstr "ਸੰਤà©à¨°à¨¿à¨ªà¨¤ ਵਧਾਓ"
+
+msgctxt "IDS_SATURATION_DEC"
+msgid "Saturation decrease"
+msgstr "ਸੰਤà©à¨°à¨¿à¨ªà¨¤à¨¾ ਘਟਾਓ"
+
+msgctxt "IDS_RESET_COLOR"
+msgid "Reset color settings"
+msgstr "ਰੰਗ ਸੈਟਿੰਗਾਂ ਮà©à©œ-ਸੈਟ ਕਰੋ"
+
+msgctxt "IDS_USING_LATEST_STABLE"
+msgid "\nYou are already using the latest stable version."
+msgstr "\nਤà©à¨¸à©€à¨‚ ਬਿਲਕà©à¨² ਨਵਾਂ ਸਟੇਬਲ ਵਰਜ਼ਨ ਵਰਤ ਰਹੇ ਹੋ।"
+
+msgctxt "IDS_USING_NEWER_VERSION"
+msgid "Your current version is v%s.\n\nThe latest stable version is v%s."
+msgstr "ਤà©à¨¹à¨¾à¨¡à©‡ ਕੋਲ ਇਸ ਵੇਲੇ v%s ਵਰਜ਼ਨ ਹੈ\n\nਬਿਲਕà©à¨² ਨਵਾਂ ਸਟੇਬਲ ਵਰਜ਼ਨ v%s ਹੈ।"
+
+msgctxt "IDS_NEW_UPDATE_AVAILABLE"
+msgid "MPC-HC v%s is now available. You are using v%s.\n\nDo you want to visit MPC-HC's website to download it?"
+msgstr "MPC-HC v%s ਹà©à¨£ ਮੌਜੂਦ ਹੈ। ਤà©à¨¸à©€à¨‚ v%s ਵਰਤ ਰਹੇ ਹੋ।\n\nਕੀ ਤà©à¨¸à©€à¨‚ ਇਸ ਨੂੰ ਡਾਊਨਲੋਡ ਕਰਨ ਵਾਸਤੇ MPC-HC ਦੀ ਵੈਬਸਾਈਟ ਖੋਲà©à¨¹à¨£à©€ ਚਾਹà©à©°à¨¦à©‡ ਹੋ?"
+
+msgctxt "IDS_UPDATE_ERROR"
+msgid "Update server not found.\n\nPlease check your internet connection or try again later."
+msgstr "ਅਪਡੇਟ ਸਰਵਰ ਨਹੀਂ ਲੱਭਿਆ।\n\nਆਪਣੇ ਇੰਟਰਨੈਟ ਦੀ ਜਾਂਚ ਕਰੋ ਜਾਂ ਬਾਅਦ ਵਿੱਚ ਕੋਸ਼ਿਸ਼ ਕਰਕੇ ਵੇਖੋ।"
+
+msgctxt "IDS_UPDATE_CLOSE"
+msgid "&Close"
+msgstr "ਬੰਦ ਕਰੋ(&C)"
+
+msgctxt "IDS_OSD_ZOOM"
+msgid "Zoom: %.0lf%%"
+msgstr "ਜ਼ੂਮ: %.0lf%%"
+
+msgctxt "IDS_OSD_ZOOM_AUTO"
+msgid "Zoom: Auto"
+msgstr "ਜ਼ੂਮ: ਆਟੋ"
+
+msgctxt "IDS_CUSTOM_CHANNEL_MAPPING"
+msgid "Toggle custom channel mapping"
+msgstr ""
+
+msgctxt "IDS_OSD_CUSTOM_CH_MAPPING_ON"
+msgid "Custom channel mapping: On"
+msgstr ""
+
+msgctxt "IDS_OSD_CUSTOM_CH_MAPPING_OFF"
+msgid "Custom channel mapping: Off"
+msgstr ""
+
+msgctxt "IDS_NORMALIZE"
+msgid "Toggle normalization"
+msgstr ""
+
+msgctxt "IDS_OSD_NORMALIZE_ON"
+msgid "Normalization: On"
+msgstr "ਨਾਰਮਲਾਈਜ਼: ਚਾਲੂ"
+
+msgctxt "IDS_OSD_NORMALIZE_OFF"
+msgid "Normalization: Off"
+msgstr "ਨਾਰਮਲਾਈਜ਼: ਬੰਦ"
+
+msgctxt "IDS_REGAIN_VOLUME"
+msgid "Toggle regain volume"
+msgstr ""
+
+msgctxt "IDS_OSD_REGAIN_VOLUME_ON"
+msgid "Regain volume: On"
+msgstr ""
+
+msgctxt "IDS_OSD_REGAIN_VOLUME_OFF"
+msgid "Regain volume: Off"
+msgstr ""
+
+msgctxt "IDS_SIZE_UNIT_BYTES"
+msgid "bytes"
+msgstr "ਬਾਈਟ"
+
+msgctxt "IDS_SIZE_UNIT_K"
+msgid "KB"
+msgstr "KB"
+
+msgctxt "IDS_SIZE_UNIT_M"
+msgid "MB"
+msgstr "MB"
+
+msgctxt "IDS_SIZE_UNIT_G"
+msgid "GB"
+msgstr "GB"
+
+msgctxt "IDS_SPEED_UNIT_K"
+msgid "KB/s"
+msgstr "KB/s"
+
+msgctxt "IDS_SPEED_UNIT_M"
+msgid "MB/s"
+msgstr "MB/s"
+
+msgctxt "IDS_BDA_ERROR_CREATE_TUNER"
+msgid "Could not create the tuner."
+msgstr "ਟਿਊਨਰ ਬਣਾਇਆ ਨਹੀਂ ਜਾ ਸਕਿਆ।"
+
+msgctxt "IDS_BDA_ERROR_CREATE_RECEIVER"
+msgid "Could not create the receiver."
+msgstr "ਰਿਸੀਵਰ ਬਣਾਇਆ ਨਹੀਂ ਜਾ ਸਕਿਆ।"
+
+msgctxt "IDS_BDA_ERROR_CONNECT_NW_TUNER"
+msgid "Could not connect the network and the tuner."
+msgstr "ਨੈਟਵਰਕ ਤੇ ਟਿਊਨਰ ਨਾਲ ਕਨੈਕਟ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ।"
+
+msgctxt "IDS_BDA_ERROR_CONNECT_TUNER_REC"
+msgid "Could not connect the tuner and the receiver."
+msgstr "ਟਿਊਨਰ ਤੇ ਰਿਸੀਵਰ ਕਨੈਕਟ ਨਹੀਂ ਕੀਤੇ ਜਾ ਸਕੇ।"
+
+msgctxt "IDS_BDA_ERROR_CONNECT_TUNER"
+msgid "Could not connect the tuner."
+msgstr ""
+
+msgctxt "IDS_BDA_ERROR_DEMULTIPLEXER"
+msgid "Could not create the demultiplexer."
+msgstr ""
+
+msgctxt "IDS_GOTO_ERROR_PARSING_TIME"
+msgid "Error parsing the entered time!"
+msgstr ""
+
+msgctxt "IDS_GOTO_ERROR_PARSING_TEXT"
+msgid "Error parsing the entered text!"
+msgstr ""
+
+msgctxt "IDS_GOTO_ERROR_PARSING_FPS"
+msgid "Error parsing the entered frame rate!"
+msgstr ""
+
+msgctxt "IDS_FRAME_STEP_ERROR_RENDERER"
+msgid "Cannot frame-step, try a different video renderer."
+msgstr ""
+
+msgctxt "IDS_SCREENSHOT_ERROR_REAL"
+msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the default video renderer for RealMedia.\nSelect one of the DirectX renderers for RealMedia in MPC-HC's output options and reopen the file."
+msgstr ""
+
+msgctxt "IDS_SCREENSHOT_ERROR_QT"
+msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the default video renderer for QuickTime.\nSelect one of the DirectX renderers for QuickTime in MPC-HC's output options and reopen the file."
+msgstr ""
+
+msgctxt "IDS_SCREENSHOT_ERROR_SHOCKWAVE"
+msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work for Shockwave files."
+msgstr ""
+
+msgctxt "IDS_SCREENSHOT_ERROR_OVERLAY"
+msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the Overlay Mixer video renderer.\nChange the video renderer in MPC's output options and reopen the file."
+msgstr ""
+
+msgctxt "IDS_SUBDL_DLG_CONNECT_ERROR"
+msgid "Cannot connect to the online subtitles database."
+msgstr ""
+
+msgctxt "IDS_MB_SHOW_EDL_EDITOR"
+msgid "Do you want to activate the EDL editor?"
+msgstr ""
+
+msgctxt "IDS_CAPTURE_ERROR"
+msgid "Capture Error"
+msgstr "ਕੈਪਚਰ ਗਲਤੀ"
+
+msgctxt "IDS_CAPTURE_ERROR_VIDEO"
+msgid "video"
+msgstr "ਵਿਡੀਓ"
+
+msgctxt "IDS_CAPTURE_ERROR_AUDIO"
+msgid "audio"
+msgstr "ਆਡੀਓ"
+
+msgctxt "IDS_CAPTURE_ERROR_ADD_BUFFER"
+msgid "Can't add the %s buffer filter to the graph."
+msgstr ""
+
+msgctxt "IDS_CAPTURE_ERROR_CONNECT_BUFF"
+msgid "Can't connect the %s buffer filter to the graph."
+msgstr ""
+
+msgctxt "IDS_CAPTURE_ERROR_ADD_ENCODER"
+msgid "Can't add the %s encoder filter to the graph."
+msgstr ""
+
+msgctxt "IDS_CAPTURE_ERROR_CONNECT_ENC"
+msgid "Can't connect the %s encoder filter to the graph."
+msgstr ""
+
+msgctxt "IDS_CAPTURE_ERROR_COMPRESSION"
+msgid "Can't set the compression format on the %s encoder filter."
+msgstr ""
+
+msgctxt "IDS_CAPTURE_ERROR_MULTIPLEXER"
+msgid "Can't connect the %s stream to the multiplexer filter."
+msgstr ""
+
+msgctxt "IDS_CAPTURE_ERROR_VID_CAPT_PIN"
+msgid "No video capture pin was found."
+msgstr ""
+
+msgctxt "IDS_CAPTURE_ERROR_AUD_CAPT_PIN"
+msgid "No audio capture pin was found."
+msgstr ""
+
+msgctxt "IDS_CAPTURE_ERROR_OUT_FILE"
+msgid "Error initializing the output file."
+msgstr ""
+
+msgctxt "IDS_CAPTURE_ERROR_AUD_OUT_FILE"
+msgid "Error initializing the audio output file."
+msgstr ""
+
+msgctxt "IDS_SUBRESYNC_TIME_FORMAT"
+msgid "The correct time format is [-]hh:mm:ss.ms (e.g. 01:23:45.678)."
+msgstr ""
+
+msgctxt "IDS_EXTERNAL_FILTERS_ERROR_MT"
+msgid "This type is already in the list!"
+msgstr ""
+
+msgctxt "IDS_WEBSERVER_ERROR_TEST"
+msgid "You need to apply the new settings before testing them."
+msgstr ""
+
+msgctxt "IDS_AFTERPLAYBACK_EXIT"
+msgid "After Playback: Exit"
+msgstr "ਚਲਾਓ ਦੇ ਬਾਅਦ: ਬਾਹਰ ਨਿਕਲੋ"
+
+msgctxt "IDS_AFTERPLAYBACK_STANDBY"
+msgid "After Playback: Stand By"
+msgstr "ਚਲਾਓ ਦੇ ਬਾਅਦ: ਸਟੈਂਡਬਾà¨"
+
+msgctxt "IDS_AFTERPLAYBACK_HIBERNATE"
+msgid "After Playback: Hibernate"
+msgstr "ਚਲਾਓ ਦੇ ਬਾਅਦ: ਹਾਈਬਰਨੇਟ"
+
+msgctxt "IDS_AFTERPLAYBACK_SHUTDOWN"
+msgid "After Playback: Shutdown"
+msgstr "ਚਲਾਓ ਦੇ ਬਾਅਦ: ਬੰਦ ਕਰੋ"
+
+msgctxt "IDS_AFTERPLAYBACK_LOGOFF"
+msgid "After Playback: Log Off"
+msgstr "ਚਲਾਓ ਦੇ ਬਾਅਦ: ਲਾਗ ਆਫ਼ ਕਰੋ"
+
+msgctxt "IDS_AFTERPLAYBACK_LOCK"
+msgid "After Playback: Lock"
+msgstr "ਚਲਾਉਣ ਦੇ ਬਾਅਦ: ਲਾਕ ਕਰੋ"
+
+msgctxt "IDS_AFTERPLAYBACK_MONITOROFF"
+msgid "After Playback: Turn off the monitor"
+msgstr "ਚਲਾਉਣ ਦੇ ਬਾਅਦ: ਮਾਨੀਟਰ ਬੰਦ ਕਰੋ"
+
+msgctxt "IDS_AFTERPLAYBACK_PLAYNEXT"
+msgid "After Playback: Play next file in the folder"
+msgstr "ਚਲਾਉਣ ਦੇ ਬਾਅਦ: ਫੋਲਡਰ ਵਿੱਚ ਅਗਲੀ ਫ਼ਾਈਲ ਚਲਾਓ"
+
+msgctxt "IDS_AFTERPLAYBACK_DONOTHING"
+msgid "After Playback: Do nothing"
+msgstr "ਚਲਾਉਣ ਦੇ ਬਾਅਦ: ਕà©à¨ ਨਾ ਕਰੋ"
+
+msgctxt "IDS_OSD_BRIGHTNESS"
+msgid "Brightness: %s"
+msgstr "ਚਮਕ: %s"
+
+msgctxt "IDS_OSD_CONTRAST"
+msgid "Contrast: %s"
+msgstr "ਕਨਟਰਾਸਟ: %s"
+
+msgctxt "IDS_OSD_HUE"
+msgid "Hue: %s°"
+msgstr "ਰੰਗਤ: %s°"
+
+msgctxt "IDS_OSD_SATURATION"
+msgid "Saturation: %s"
+msgstr "ਸੰਤà©à¨°à¨¿à¨ªà¨¤à¨¾: %s"
+
+msgctxt "IDS_OSD_RESET_COLOR"
+msgid "Color settings restored"
+msgstr "ਰੰਗ ਸੈਟਿੰਗਾਂ ਮà©à©œ-ਸਟੋਰ ਕੀਤੀਆਂ"
+
+msgctxt "IDS_OSD_NO_COLORCONTROL"
+msgid "Color control is not supported"
+msgstr "ਰੰਗ ਕੰਟਰੋਲ ਸਹਾਇਕ ਨਹੀਂ ਹਨ"
+
+msgctxt "IDS_BRIGHTNESS_INC"
+msgid "Brightness increase"
+msgstr "ਚਮਕ ਵਧਾਓ"
+
+msgctxt "IDS_LANG_PREF_EXAMPLE"
+msgid "Enter your preferred languages here.\nFor example, type: \"eng jap swe\""
+msgstr "ਆਪਣੀ ਪਸੰਦ ਦੀ ਭਾਸ਼ਾ ਇੱਥੇ ਦਿਉ।\nਉਦਾਹਰਨ ਲਈ ਲਿਖੋ: \"eng pan jap\""
+
+msgctxt "IDS_OVERRIDE_EXT_SPLITTER_CHOICE"
+msgid "External splitters can have their own language preference options thus MPC-HC default behavior is not to change their initial choice.\nEnable this option if you want MPC-HC to control external splitters."
+msgstr ""
+
+msgctxt "IDS_NAVIGATE_BD_PLAYLISTS"
+msgid "&Blu-Ray playlists"
+msgstr "ਬਲੂ-ਰੇਅ ਪਲੇਅਲਿਸਟ(&B)"
+
+msgctxt "IDS_NAVIGATE_PLAYLIST"
+msgid "&Playlist"
+msgstr "ਪਲੇਅਲਿਸਟ(&P)"
+
+msgctxt "IDS_NAVIGATE_CHAPTERS"
+msgid "&Chapters"
+msgstr "ਚੈਪਟਰ(&C)"
+
+msgctxt "IDS_NAVIGATE_TITLES"
+msgid "&Titles"
+msgstr "ਟਾਈਟਲ(&T)"
+
+msgctxt "IDS_NAVIGATE_CHANNELS"
+msgid "&Channels"
+msgstr "ਚੈਨਲ(&C)"
+
+msgctxt "IDC_FASTSEEK_CHECK"
+msgid "If \"latest keyframe\" is selected, seek to the first keyframe before the actual seek point.\nIf \"nearest keyframe\" is selected, seek to the first keyframe before or after the seek point depending on which is the closest."
+msgstr ""
+
+msgctxt "IDC_ASSOCIATE_ALL_FORMATS"
+msgid "Associate with all formats"
+msgstr "ਸਭ ਫਾਰਮੈਟਾਂ ਨਾਲ ਸੰਬੰਧਿਤ ਕਰੋ"
+
+msgctxt "IDC_ASSOCIATE_VIDEO_FORMATS"
+msgid "Associate with video formats only"
+msgstr "ਕੇਵਲ ਵਿਡੀਓ ਫਾਰਮੈਟਾਂ ਨਾਲ ਸੰਬੰਧਿਤ ਕਰੋ"
+
+msgctxt "IDC_ASSOCIATE_AUDIO_FORMATS"
+msgid "Associate with audio formats only"
+msgstr "ਕੇਵਲ ਆਡੀਓ ਫਾਰਮੈਟਾਂ ਨਾਲ ਹੀ ਸੰਬੰਧਿਤ ਕਰੋ"
+
+msgctxt "IDC_CLEAR_ALL_ASSOCIATIONS"
+msgid "Clear all associations"
+msgstr "ਸਭ ਸੰਬੰਧ ਸਾਫ਼ ਕਰੋ"
+
+msgctxt "IDS_FILTER_SETTINGS_CAPTION"
+msgid "Settings"
+msgstr "ਸੈਟਿੰਗਾਂ"
+
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.pl.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.pl.dialogs.po
index b61b0a1da..675d5117c 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.pl.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.pl.dialogs.po
@@ -3,14 +3,15 @@
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# kasper93, 2013-2015
-# M T <michtrz@gmail.com>, 2014
+# M T <michtrz@gmail.com>, 2014-2015
+# Rafał Urbanek <urbis92@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-30 21:41+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-24 11:33+0000\n"
"Last-Translator: kasper93\n"
-"Language-Team: Polish (http://www.transifex.com/projects/p/mpc-hc/language/pl/)\n"
+"Language-Team: Polish (http://www.transifex.com/mpc-hc/mpc-hc/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -473,10 +474,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Automatycznie wczytuj dodatkowe ścieżki dźwiękowe"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Używaj wbudowanego renderera napisów"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Kontrola"
@@ -677,9 +674,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Zapobiegaj minimalizacji w trybie pełnoekranowym na dodatkowych wyświetlaczach"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Korzystaj z możliwości paska zadań systemu Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Używaj rozszerzonych funkcji paska zadań"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1170,8 +1167,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Napisy *"
+msgid "Subtitles"
+msgstr "Napisy"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1186,8 +1183,8 @@ msgid "Rotation"
msgstr "Obracanie"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Zewnętrzne filtry (takie jak VSFilter) mogą wyświetlać napisy przy użyciu dowolnego renderera obrazu."
+msgid "Subtitle Renderer"
+msgstr "Renderer napisów"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1205,6 +1202,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Dostęp tylko z lokalnego komputera"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "WÅ‚Ä…cz podglÄ…d"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Wyświetlaj informację debugowania"
@@ -1653,6 +1654,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Domyślne"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "UrzÄ…dzenie"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Tryb wyłączny"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Zezwól na bitstreaming"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Opcje"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Włącz stereo crossfeed (dla słuchawek)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Odcięcie:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Poziom:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Porada"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "W celu zminimalizowania zniekształceń dźwięku, zalecane jest ustawienie głośności na poziomie około 85% podczas odtwarzania głośnych stratnie skompresowanych plików audio."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "Jakość JPEG:"
@@ -1669,9 +1714,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Zgłaszanie usterek"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Przepraszamy, wygląda na to, że MPC-HC się zepsuł. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Wyślij nam raport błędu, aby pomóc nam go zdiagnozować oraz naprawić."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Przepraszamy, wygląda na to, że MPC-HC przestał działać. :(\n\nW celu zdiagnozowania problemu przez nasz zespół, zostanie wysłany raport błędu. Możesz zamieścić dodatkowe informacje, jeżeli chcesz."
+msgid "Optional information"
+msgstr "Dodatkowe informacje"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1685,7 +1738,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Opis problemu (w języku angielskim):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Zrestartuj MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Zamknij MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.pl.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.pl.menus.po
index be3d7fb70..dec14fa27 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.pl.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.pl.menus.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
"PO-Revision-Date: 2015-05-30 21:32+0000\n"
"Last-Translator: kasper93\n"
-"Language-Team: Polish (http://www.transifex.com/projects/p/mpc-hc/language/pl/)\n"
+"Language-Team: Polish (http://www.transifex.com/mpc-hc/mpc-hc/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.pl.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.pl.strings.po
index f083e9aef..1b72358f6 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.pl.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.pl.strings.po
@@ -4,13 +4,14 @@
# Translators:
# kasper93, 2013-2015
# M T <michtrz@gmail.com>, 2013-2015
+# Rafał Urbanek <urbis92@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-31 13:59+0000\n"
-"Last-Translator: kasper93\n"
-"Language-Team: Polish (http://www.transifex.com/projects/p/mpc-hc/language/pl/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Polish (http://www.transifex.com/mpc-hc/mpc-hc/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -326,11 +327,11 @@ msgid "On/Off"
msgstr "Wł./Wył."
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr "Od kl./s"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr "Do kl./s"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -465,6 +466,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Odtwarzanie::Shadery"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Zasoby"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Różne"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Odtwarzanie::Przechwytywanie"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Odtwarzanie::Ustawienia Sync"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Odtwarzanie::Pełny ekran"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Filtry wewnętrzne::Renderer dźwięku"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Obróbka dźwięku"
@@ -557,30 +586,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Napisy::Baza napisów"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Zasoby"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Różne"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Odtwarzanie::Przechwytywanie"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Odtwarzanie::Ustawienia Sync"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Odtwarzanie::Pełny ekran"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Szczegóły"
@@ -673,22 +678,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Alokuje płaszczyznę wideo jako normalną powierzchnię ekranową."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Audio Renderer nie jest w pełni funkcjonalny, zaleca się nie używanie."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Zgłaszanie błędu"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "Program nieoczekiwanie zakończył pracę, niestety aktualnie używana wersja została skompilowana bez informacji potrzebnych do analizy błędu.\nJeżeli chcesz zgłosić ten błąd prosimy spróbować wywołać go używając oficjalnej wersji MPC-HC.\n\nChcesz odwiedzić stronę pobierania teraz?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Zwykła poza ekranowa płaska płaszczyzna"
@@ -741,9 +734,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (uncompressed)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Wbudowany renderer dźwięku"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1393,6 +1386,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Po zakończeniu odtwarzania: Zamknij plik"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC napotkał problem podczas ładowania. Z Twoją pomocą możliwe będzie naprawienie tego problemu.\n\nCzy chcesz zgłosić problem?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Wprowadź dodatnią wartość jeżeli dźwięk wyprzedza obraz lub ujemną gdy dźwięk nie nadąża za obrazem."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Podgląd jest obecnie wyłączony. Można włączyć go w opcjach MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Ta opcja może zostać użyta to zdalnego podglądu plików multimedialnych. Używaj jej tylko w prywatnej oraz zabezpieczonej sieci.\n\nCzy na pewno chcesz włączyć tę opcję?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Wbudowany renderer napisów"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Otwórz urządzenie"
@@ -1677,6 +1690,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Pokaż nazwę pliku"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Odtwarzanie DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Odtwarzanie BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: Wyświetlaj statystyki renderera"
@@ -1958,20 +1979,20 @@ msgid "Options"
msgstr "Ustawienia"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Następna ścieżka dźwiękowa"
+msgid "Next Audio Track"
+msgstr "Następna ścieżka Audio"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Poprzednia ścieżka dźwiękowa"
+msgid "Prev Audio Track"
+msgstr "Poprzednia ścieżka Audio"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Następne napisy"
+msgid "Next Subtitle Track"
+msgstr "Następna ścieżka napisów"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Poprzednie napisy"
+msgid "Prev Subtitle Track"
+msgstr "Poprzednia ścieżka napisów"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1981,22 +2002,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Wczytaj ponownie napisy"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "OGM: Następna ścieżka dźwiękowa"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "OGM: Poprzednia ścieżka dźwiękowa"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "OGM: Następne napisy"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "OGM: Poprzednie napisy"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "DVD: Następna kamera"
@@ -2006,20 +2011,20 @@ msgid "Prev Angle (DVD)"
msgstr "DVD: Poprzednia kamera"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "DVD: Następna ścieżka dźwiękowa"
+msgid "Next Audio Track (DVD)"
+msgstr "Następna ścieżka dźwiękowa (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "DVD: Poprzednia ścieżka dźwiękowa"
+msgid "Prev Audio Track (DVD)"
+msgstr "Poprzednia ścieżka dźwiękowa (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "DVD: Następne napisy"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Następna ścieżka napisów (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "DVD: Poprzednie napisy"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "Poprzednia ścieżka napisów (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2385,14 +2390,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Bieżący"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "Program nieoczekiwanie zakończył pracę. Aby pomóc naprawić ten problem, proszę wysłać plik „%s†na platformę zgłaszania błędów.\n\nChcesz otworzyć folder zawierający zrzut pamięci oraz odwiedzić teraz stronę, aby zgłosić błąd?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Nie udało się zapisać informacji o debugowaniu do pliku „%s†(błąd %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Proszę wybrać folder"
@@ -2566,8 +2563,8 @@ msgid "Volume boost Max"
msgstr "Maksymalne wzmocnienie głośności"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Użycie: mpc-hc.exe „ścieżka†[parametry]\n\n„ścieżkaâ€\t\tOkreÅ›la plik lub folder do otwarcia (symbole\n\t\twieloznaczne dozwolone, „-†oznacza\n\t\tstandardowe wejÅ›cie)\n/dub „plikâ€\tOtwiera dodatkowÄ… Å›cieżkÄ™ dźwiÄ™kowÄ…\n/dubdelay „plikâ€\tOtwiera dodatkowÄ… Å›cieżkÄ™ dźwiÄ™kowÄ… opóźnionÄ…\n\t\to XX ms jeÅ›li nazwa pliku zawiera ciÄ…g\n\t\t„DELAY XXmsâ€\n/d3dfs\t\tUruchamia odtwarzanie peÅ‚noekranowe w D3D\n/sub „plikâ€\tWczytuje dodatkowe napisy\n/filter „plikâ€\tWczytuje filtr DirectShow z biblioteki dll (symbole\n\t\twieloznaczne dozwolone)\n/dvd\t\tOtwiera pÅ‚ytÄ™ DVD, „ścieżka†wskazuje folder DVD\n\t\t(opcjonalnie)\n/dvdpos T#C\tUruchamia odtwarzanie tytuÅ‚u T, rozdziaÅ‚ C\n/dvdpos T#hh:mm\tUruchamia odtwarzanie tytuÅ‚u T, pozycja\n\t\thh:mm:ss\n/cd\t\tOtwiera wszystkie Å›cieżki CD-Audio lub (s)vcd\n\t\t„Ścieżka†wskazuje literÄ™ napÄ™du (opcjonalnie)\n/device\t\tOpen the default video device\n/open\t\tOtwiera plik, nie rozpoczyna odtwarzania\n/play\t\tRozpoczyna odtwarzanie po uruchomieniu\n\t\tprogramu\n/close\t\tKoÅ„czy program po zakoÅ„czeniu odtwarzania\n\t\t(dziaÅ‚a z parametrem /play)\n/shutdown\tZamyka system operacyjny po zakoÅ„czeniu\n\t\todtwarzania\n/standby\t\tWprowadza system w stan wstrzymania po zakoÅ„czeniu odtwarzania\n/hibernate\tWprowadza system w stan hibernacji po zakoÅ„czeniu odtwarzania\n/logoff\t\tWyglogowuje użytownika po zakoÅ„czeniu odtwarzania\n/lock\t\tBlokuje stacje roboczÄ… po zakoÅ„czeniu odtwarzania\n/monitoroff\tWyÅ‚Ä…cza monitor po zakoÅ„czeniu odtwarzania\n/playnext\t\tOtwiera nastÄ™pny plik w folderze po zakoÅ„czeniu odtwarzania\n/fullscreen\tUruchamia w trybie peÅ‚nego ekranu\n/minimized\tUruchamia zminimalizowany\n/new\t\tUruchamia nowe wystÄ…pienie programu\n/add\t\tDodaje „ścieżkę†do listy odtwarzania. Można\n\t\tÅ‚Ä…czyć z parametrami /open i /play\n/randomize\tMiesza listÄ™ odtwarzania\n/regvid\t\tRejestruje formaty wideo\n/regaud\t\tRejestruje formaty dźwiÄ™kowe\n/regpl\t\tRejestruje formaty list odtwarzania\n/regall\t\tRejestruje wszystkie obsÅ‚ugiwane formaty\n/unregall\t\tWyrejestrowuje wszystkie formaty\n/start ms\t\tRozpoczyna odtwarzanie od okreÅ›lonego\n\t\tpoÅ‚ożenia wyrażonego w ms\n/startpos hh:mm:ss\tRozpoczyna odtwarzanie od okreÅ›lonego\n\t\tpoÅ‚ożenia wyrażonego w gg:mm:ss\n/fixedsize x,y\tOkreÅ›la rozmiar okna programu\n/monitor N\tUruchamia na N-tym ekranie, gdzie numer\n\t\tpierwszego ekranu to 1\n/audiorenderer N\tRenderuje dźwiÄ™k za pomocÄ… sterownika N,\n\t\tgdzie numer pierwszego sterownika to 1\n\t\t(ustawienia „StrumieÅ„ wyjÅ›ciowyâ€)\n/shaderpreset \"Pr\"\tWybieranie konkretnego profilu shaderów\n/pns \"name\"\tWybieranie konkretnego profilu Pan&Scan\n/iconsassoc\tPrzypisz ponownie ikony do plików\n/nofocus\t\tOtwiera MPC-HC w tle\n/webport N\tUruchamia interfejs internetowy na okreÅ›lonym porcie\n/debug\t\tWyÅ›wietla informacje debugowania w OSD\n/nocrashreporter\tWyÅ‚Ä…cza raportowanie usterek\n/slave \"hWnd\"\tUżyj MPC-HC jako okno zależne\n/reset\t\tPrzywraca ustawienia domyÅ›lne\n/help /h /?\tWyÅ›wietla listÄ™ parametrów wiersza poleceÅ„\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Użycie: mpc-hc.exe „ścieżka†[parametry]\n\n„ścieżkaâ€\t\tOkreÅ›la plik lub folder do otwarcia (symbole\n\t\twieloznaczne dozwolone, „-†oznacza\n\t\tstandardowe wejÅ›cie)\n/dub „plikâ€\tOtwiera dodatkowÄ… Å›cieżkÄ™ dźwiÄ™kowÄ…\n/dubdelay „plikâ€\tOtwiera dodatkowÄ… Å›cieżkÄ™ dźwiÄ™kowÄ… opóźnionÄ…\n\t\to XX ms jeÅ›li nazwa pliku zawiera ciÄ…g\n\t\t„DELAY XXmsâ€\n/d3dfs\t\tUruchamia odtwarzanie peÅ‚noekranowe w D3D\n/sub „plikâ€\tWczytuje dodatkowe napisy\n/filter „plikâ€\tWczytuje filtr DirectShow z biblioteki dll (symbole\n\t\twieloznaczne dozwolone)\n/dvd\t\tOtwiera pÅ‚ytÄ™ DVD, „ścieżka†wskazuje folder DVD\n\t\t(opcjonalnie)\n/dvdpos T#C\tUruchamia odtwarzanie tytuÅ‚u T, rozdziaÅ‚ C\n/dvdpos T#hh:mm\tUruchamia odtwarzanie tytuÅ‚u T, pozycja\n\t\thh:mm:ss\n/cd\t\tOtwiera wszystkie Å›cieżki CD-Audio lub (s)vcd\n\t\t„Ścieżka†wskazuje literÄ™ napÄ™du (opcjonalnie)\n/device\t\tOpen the default video device\n/open\t\tOtwiera plik, nie rozpoczyna odtwarzania\n/play\t\tRozpoczyna odtwarzanie po uruchomieniu\n\t\tprogramu\n/close\t\tKoÅ„czy program po zakoÅ„czeniu odtwarzania\n\t\t(dziaÅ‚a z parametrem /play)\n/shutdown\tZamyka system operacyjny po zakoÅ„czeniu\n\t\todtwarzania\n/standby\t\tWprowadza system w stan wstrzymania po zakoÅ„czeniu odtwarzania\n/hibernate\tWprowadza system w stan hibernacji po zakoÅ„czeniu odtwarzania\n/logoff\t\tWyglogowuje użytownika po zakoÅ„czeniu odtwarzania\n/lock\t\tBlokuje stacje roboczÄ… po zakoÅ„czeniu odtwarzania\n/monitoroff\tWyÅ‚Ä…cza monitor po zakoÅ„czeniu odtwarzania\n/playnext\t\tOtwiera nastÄ™pny plik w folderze po zakoÅ„czeniu odtwarzania\n/fullscreen\tUruchamia w trybie peÅ‚nego ekranu\n/minimized\tUruchamia zminimalizowany\n/new\t\tUruchamia nowe wystÄ…pienie programu\n/add\t\tDodaje „ścieżkę†do listy odtwarzania. Można\n\t\tÅ‚Ä…czyć z parametrami /open i /play\n/randomize\tMiesza listÄ™ odtwarzania\n/regvid\t\tRejestruje formaty wideo\n/regaud\t\tRejestruje formaty dźwiÄ™kowe\n/regpl\t\tRejestruje formaty list odtwarzania\n/regall\t\tRejestruje wszystkie obsÅ‚ugiwane formaty\n/unregall\t\tWyrejestrowuje wszystkie formaty\n/start ms\t\tRozpoczyna odtwarzanie od okreÅ›lonego\n\t\tpoÅ‚ożenia wyrażonego w ms\n/startpos hh:mm:ss\tRozpoczyna odtwarzanie od okreÅ›lonego\n\t\tpoÅ‚ożenia wyrażonego w gg:mm:ss\n/fixedsize x,y\tOkreÅ›la rozmiar okna programu\n/monitor N\tUruchamia na N-tym ekranie, gdzie numer\n\t\tpierwszego ekranu to 1\n/audiorenderer N\tRenderuje dźwiÄ™k za pomocÄ… sterownika N,\n\t\tgdzie numer pierwszego sterownika to 1\n\t\t(ustawienia „StrumieÅ„ wyjÅ›ciowyâ€)\n/shaderpreset \"Pr\"\tWybieranie konkretnego profilu shaderów\n/pns \"name\"\tWybieranie konkretnego profilu Pan&Scan\n/iconsassoc\tPrzypisz ponownie ikony do plików\n/nofocus\t\tOtwiera MPC-HC w tle\n/webport N\tUruchamia interfejs internetowy na okreÅ›lonym porcie\n/debug\t\tWyÅ›wietla informacje debugowania w OSD\n/nocrashreporter\tWyÅ‚Ä…cza raportowanie usterek\n/slave \"hWnd\"\tUżyj MPC-HC jako okno zależne\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tPrzywraca ustawienia domyÅ›lne\n/help /h /?\tWyÅ›wietla listÄ™ parametrów wiersza poleceÅ„\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3041,18 +3038,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Proporcje"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Używaj WASAPI (reset odtwarzania)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Wycisz podczas przewijania"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Urządzenie dźwiękowe:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "Synchronizacja pionowa: włączona"
@@ -3609,3 +3594,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Ustawienia"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.dialogs.po
index f75abc422..70e45d75a 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.dialogs.po
@@ -4,6 +4,10 @@
# Translators:
# Alex Luís Silva <alex.mooca@hotmail.com>, 2014-2015
# Alex Luís Silva <alex.mooca@hotmail.com>, 2014
+# Charles Fernando da Silva <eu.charles@hotmail.com>, 2015
+# Edgar Peres <edgarvperes@gmail.com>, 2015
+# Erick Simões <erick.simoes@yahoo.com.br>, 2015
+# Gustavo Cegolini Togni <gustavotogni@gmail.com>, 2015
# Roger Filipe <lipe2000@outlook.com>, 2013-2014
# Luis Henrique <henriqlh@gmail.com>, 2014
# mvpetri <mvpetri@gmail.com>, 2014
@@ -12,10 +16,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-31 05:10+0000\n"
-"Last-Translator: Alex Luís Silva <alex.mooca@hotmail.com>\n"
-"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/mpc-hc/language/pt_BR/)\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-21 14:38+0000\n"
+"Last-Translator: Erick Simões <erick.simoes@yahoo.com.br>\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/mpc-hc/mpc-hc/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -478,10 +482,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Autocarregamento de áudio"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Use o renderizador interno de legendas"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Controle"
@@ -682,9 +682,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Evitar MINIMIZAR quando estiver em tela cheia ou em monitor não-padrão"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Usar os recursos do Windows 7 na barra de tarefas"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Usar recursos da barra de tarefas aprimorada"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1175,8 +1175,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Legendas *"
+msgid "Subtitles"
+msgstr "Legendas"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1191,8 +1191,8 @@ msgid "Rotation"
msgstr "Rotação"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Filtros externos (como o VSFilter) podem exibir legendas com todos os Video Renderers."
+msgid "Subtitle Renderer"
+msgstr "Renderizar Legendas"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1210,6 +1210,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Permitir acesso somente do host local"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Ativar pré-visualização"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Imprimir informações de depuração"
@@ -1658,6 +1662,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Padrão"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Dispositivo"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Modo exclusivo"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Permitir bitstreaming"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Opções"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Habilitar crossfeed estéreo (para fones de ouvido)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Corte:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Nível:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Aviso"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Para minimizar a distorção de áudio, é recomendado manter o volume do reprodutor em 85% ao reproduzir áudio comprimido com perda de dados."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "Qualidade JPEG:"
@@ -1674,9 +1722,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Relatório de falha"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Lamentamos, parece que o MPC-HC teve problemas. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Envie-nos um relatório de erros para ajudar-nos a diagnosticar e corrigir o problema."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Lamentamos, parece que o MPC-HC travou. :(\n\nPara nos ajudar a diagnosticar e corrigir o problema, um relatório de falha será enviado. Você pode fornecer informações adicionais se quiser."
+msgid "Optional information"
+msgstr "Informação Opcional"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1690,7 +1746,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Descrição do problema (usar somente Inglês):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Reiniciar o MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Sair do MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.menus.po
index d672146e5..59ab021c6 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.menus.po
@@ -8,10 +8,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
"PO-Revision-Date: 2015-05-31 05:00+0000\n"
"Last-Translator: Alex Luís Silva <alex.mooca@hotmail.com>\n"
-"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/mpc-hc/language/pt_BR/)\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/mpc-hc/mpc-hc/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.strings.po
index dd6f9d654..8e4e031fb 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.pt_BR.strings.po
@@ -5,19 +5,23 @@
# Alex Luís Silva <alex.mooca@hotmail.com>, 2014-2015
# Alex Luís Silva <alex.mooca@hotmail.com>, 2014
# brunoarmanelli <brunoarmanelli@me.com>, 2014
+# Charles Fernando da Silva <eu.charles@hotmail.com>, 2015
+# Edgar Peres <edgarvperes@gmail.com>, 2015
# Erick Simões <erick.simoes@yahoo.com.br>, 2014-2015
+# Gustavo Cegolini Togni <gustavotogni@gmail.com>, 2015
# Roger Filipe <lipe2000@outlook.com>, 2013-2014
# Luis Henrique <henriqlh@gmail.com>, 2014
+# Matheus Clemente <matheus.xb@gmail.com>, 2015
# mvpetri <mvpetri@gmail.com>, 2014
# Raphael Mendonça, 2014
# Underground78, 2014
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-31 05:00+0000\n"
-"Last-Translator: Alex Luís Silva <alex.mooca@hotmail.com>\n"
-"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/mpc-hc/language/pt_BR/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/mpc-hc/mpc-hc/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -333,11 +337,11 @@ msgid "On/Off"
msgstr "Sim/Não"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Do FPS"
+msgid "From (FPS)"
+msgstr "Do (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr "Para"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -472,6 +476,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Reprodução::Shaders"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Recursos"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Miscelânea"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Reprodução::Captura"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Reprodução::Ajuste de Sincronia do Process. vídeo"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Reprodução::Tela Cheia"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Filtros Internos::Renderizador de Ãudio"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Opções de Ãudio"
@@ -564,30 +596,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Legendas::Banco de Dados"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Recursos"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Miscelânea"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Reprodução::Captura"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Reprodução::Ajuste de Sincronia do Process. vídeo"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Reprodução::Tela Cheia"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Detalhes"
@@ -680,22 +688,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "A superfície de vídeo será alocada como uma superfície regular fora da tela."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Audio Renderer está danificado, não use."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Reportar um bug"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC travou mas esta compilação está sem informação de depuração.\nSe quiser reportar este bug, você deve primeiro instalar uma compilação oficial.\n\nGostaria de visitar a página de download agora?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Superfície plana fora da tela normal"
@@ -748,9 +744,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Nulo (sem compressão)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "Ãudio Renderer do MPC-HC"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Renderizador Interno de Ãudio"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1400,6 +1396,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Após a reprodução: Fechar"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC encontrou um problema durante sua inicialização. Com a sua ajuda talvez poderemos consertar este problema.\nVocê gostaria de reportá-lo?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Se o áudio estiver adiantado utilize um valor positivo, e se estiver atrasado utilize um valor negativo."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "A pré-visualização está desativada. Você pode ativá-la nas opções do MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Essa opção pode ser usada para visualizar arquivos a partir de um local remoto. Use apenas em uma rede privada devidamente protegida.\n\nQuer ativar essa opção?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Renderizador Interno de Legenda"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Abrir dispositivo"
@@ -1684,6 +1700,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Mostrar nome do arquivo"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Tocar DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Tocar Blu-Ray"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: Exibir estatísticas do renderizador"
@@ -1965,20 +1989,20 @@ msgid "Options"
msgstr "Opções"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Próximo áudio"
+msgid "Next Audio Track"
+msgstr "Próxima Faixa de Ãudio"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Ãudio anterior"
+msgid "Prev Audio Track"
+msgstr "Faixa de Ãudio Anterior"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Próxima legenda"
+msgid "Next Subtitle Track"
+msgstr "Próxima Faixa de Legenda"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Legenda anterior"
+msgid "Prev Subtitle Track"
+msgstr "Faixa de Legenda Anterior"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1988,22 +2012,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Recarregar legendas"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Próximo áudio (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Ãudio anterior (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Próxima legenda (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Legenda anterior (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Próximo ângulo (DVD)"
@@ -2013,20 +2021,20 @@ msgid "Prev Angle (DVD)"
msgstr "Ângulo anterior (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Próximo áudio (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Próxima Faixa de Ãudio (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Ãudio anterior (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Faixa de Ãudio Anterior (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Próxima legenda (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Próxima Faixa de Legenda (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Legenda anterior (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "Faixa de Legenda Anterior (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2392,14 +2400,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Atual"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC terminou de forma inesperada. Para nos ajudar corrigir esse problema, por favor envie o arquivo \"%s\" para o nosso bug tracker.\n\nDeseja fazer isso agora?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Falha ao criar arquivo de despejo '%s' (erro %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Selecione diretório"
@@ -2573,8 +2573,8 @@ msgid "Volume boost Max"
msgstr "Ganho de volume máximo"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Uso: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tO arquivo principal ou diretório a se carregar (wildcards\n\t\tpermitidos, \"-\" denotes standard input)\n/dub \"dubname\"\tCarregar um arquivo de áudio adicional\n/dubdelay \"file\"\tCarregar um arquivo de Ãudio adicional alterado com XXms (se\n\t\to arquivo contém \"...DELAY XXms...\")\n/d3dfs\t\tIniciar rendering em D3D modo tela cheia\n/sub \"subname\"\tCarregar um arquivo de legendas adicional\n/filter \"filtername\"\tCarregar filtros DirectShow de um link dinâmico\n\t\t (wildcards allowed)\n/dvd\t\tExecutar em modo DVD, \"pathname\" significa a pasta\n\t\tdo dvd (opcional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tCarregar todas as faixas de um CD de Ãudio ou (s)vcd,\n\t\t\"pathname\" significa o caminho do drive (opcional)\n/device\t\tOpen the default video device\n/open\t\tAbrir o arquivo, não inicia automaticamente a reprodução\n/play\t\tInicia a reprodução do arquivo assim que o tocado estiver\n\t\taberto\n/close\t\tFecha o programa após a reprodução (Só funciona quando\n\t\tusado com /play)\n/shutdown\tDesliga o sistema operacional após a reprodução\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tInicia em modo tela cheia\n/minimized\tInicia em modo minimizado\n/new\t\tUsa o programa em uma nova instância\n/add\t\tadiciona \"pathname\" a lista de reprodução, pode ser combinada\n\t\tcom /open e com /play\n/randomize\tRandomize the playlist\n/regvid\t\tRegistra formatos de vídeo\n/regaud\t\tRegistra formatos de Ãudio\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tTira o registro de todos os formatos de vídeo\n/start ms\t\tInicia a reprodução em \"ms\" (= millisegundos)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tAjusta tamanho fixo da janela\n/monitor N\tInicia monitoramento N, onde N inicia em 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestaura as configurações padrões\n/help /h /?\tMostra ajuda sobre as opções de linha de comandos\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Uso: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tO arquivo principal ou diretório a se carregar (wildcards\n\t\tpermitidos, \"-\" denotes standard input)\n/dub \"dubname\"\tCarregar um arquivo de áudio adicional\n/dubdelay \"file\"\tCarregar um arquivo de Ãudio adicional alterado com XXms (se\n\t\to arquivo contém \"...DELAY XXms...\")\n/d3dfs\t\tIniciar rendering em D3D modo tela cheia\n/sub \"subname\"\tCarregar um arquivo de legendas adicional\n/filter \"filtername\"\tCarregar filtros DirectShow de um link dinâmico\n\t\t (wildcards allowed)\n/dvd\t\tExecutar em modo DVD, \"pathname\" significa a pasta\n\t\tdo dvd (opcional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tCarregar todas as faixas de um CD de Ãudio ou (s)vcd,\n\t\t\"pathname\" significa o caminho do drive (opcional)\n/device\t\tOpen the default video device\n/open\t\tAbrir o arquivo, não inicia automaticamente a reprodução\n/play\t\tInicia a reprodução do arquivo assim que o tocado estiver\n\t\taberto\n/close\t\tFecha o programa após a reprodução (Só funciona quando\n\t\tusado com /play)\n/shutdown\tDesliga o sistema operacional após a reprodução\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tInicia em modo tela cheia\n/minimized\tInicia em modo minimizado\n/new\t\tUsa o programa em uma nova instância\n/add\t\tadiciona \"pathname\" a lista de reprodução, pode ser combinada\n\t\tcom /open e com /play\n/randomize\tRandomize the playlist\n/regvid\t\tRegistra formatos de vídeo\n/regaud\t\tRegistra formatos de Ãudio\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tTira o registro de todos os formatos de vídeo\n/start ms\t\tInicia a reprodução em \"ms\" (= millisegundos)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tAjusta tamanho fixo da janela\n/monitor N\tInicia monitoramento N, onde N inicia em 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestaura as configurações padrões\n/help /h /?\tMostra ajuda sobre as opções de linha de comandos\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3048,18 +3048,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Proporção de vídeo"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Usar WASAPI (reinicia reprodução)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Silencia no avanço rápido"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Dispositivo de áudio:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: Sim"
@@ -3616,3 +3604,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Ajustes"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ro.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ro.dialogs.po
index 4cf7e69e6..0139c5be4 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ro.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ro.dialogs.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-30 20:10+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-20 17:31+0000\n"
"Last-Translator: lordkag <lord.kagula@gmail.com>\n"
-"Language-Team: Romanian (http://www.transifex.com/projects/p/mpc-hc/language/ro/)\n"
+"Language-Team: Romanian (http://www.transifex.com/mpc-hc/mpc-hc/language/ro/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -473,10 +473,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Încarcă automat fișierele audio"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Folosește randorul de subtitrări integrat"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Control"
@@ -677,13 +673,13 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Împiedică minimizarea playerului din ecran complet pe un monitor care nu este implicit"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Folosește facilitățile barei de activități Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Folosește facilitățile barei de activități îmbunătățite"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
-msgstr "Deschide precedentul/următorul fişier din dosar la comenzile „Sari înapoi/înainte†când este un singur element în lista de redare"
+msgstr "Deschide precedentul/următorul fișier din dosar la comenzile „Sari înapoi/înainte†când este un singur element în lista de redare"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK8"
msgid "Show time tooltip:"
@@ -1170,8 +1166,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Subtitrări *"
+msgid "Subtitles"
+msgstr "Subtitrări"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1186,8 +1182,8 @@ msgid "Rotation"
msgstr "Rotaţie"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Filtrele externe (cum ar fi VSFilter) pot afişa subtitrări pe orice randor."
+msgid "Subtitle Renderer"
+msgstr "Randor subtitrări"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1205,6 +1201,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Permite accesul numai de pe acest calculator (rețeaua internă)"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Activează previzualizare"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Afișează informații de depanare"
@@ -1653,6 +1653,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Implicit"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Dispozitiv"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Mod exclusiv"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Permite flux de biți - bitstreaming"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Opțiuni"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Activează îmbinarea canalelor stereo (pentru căști)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "ÃŽntrerupere"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Nivel:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Notiță"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Pentru a minimiza distorsiunile audio, este recomandat să păstrați volumul playerului la cel mult 85% în timpul redării conținutului puternic ce a fost codat cu pierderi."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "Calitate JPEG:"
@@ -1669,9 +1713,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Raportor picări"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Ne pare rău, se pare că MPC-HC tocmai s-a prăbușit. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Trimiteți un raport de defecțiune pentru a ne ajuta să diagnosticăm și să rezolvăm problema."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Ne pare rău, se pare că MPC-HC a picat. :(\n\nPentru a ne ajuta să diagnosticăm și să reparăm problema, trebuie trimis un raport de defect. Puteți furniza informații adiționale dacă doriți."
+msgid "Optional information"
+msgstr "Informații opționale"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1685,7 +1737,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Descrierea problemei (folosiți doar limba engleză):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Repornește MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "ÃŽnchide MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ro.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ro.menus.po
index 48d03524c..66f5edc2f 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ro.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ro.menus.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
"PO-Revision-Date: 2015-05-30 19:50+0000\n"
"Last-Translator: lordkag <lord.kagula@gmail.com>\n"
-"Language-Team: Romanian (http://www.transifex.com/projects/p/mpc-hc/language/ro/)\n"
+"Language-Team: Romanian (http://www.transifex.com/mpc-hc/mpc-hc/language/ro/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ro.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ro.strings.po
index 56a417ad4..a22ac4de7 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ro.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ro.strings.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-31 17:21+0000\n"
-"Last-Translator: Daniel <danny34ever@yahoo.com>\n"
-"Language-Team: Romanian (http://www.transifex.com/projects/p/mpc-hc/language/ro/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Romanian (http://www.transifex.com/mpc-hc/mpc-hc/language/ro/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -326,12 +326,12 @@ msgid "On/Off"
msgstr "Pornit/Oprit"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "De la FPS"
+msgid "From (FPS)"
+msgstr "De la (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "La FPS"
+msgid "To (FPS)"
+msgstr "La (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -465,6 +465,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Redare::Shadere"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Resurse"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Diverse"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Redare::Captură"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Redare::Setările randorului Sync"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Redare::Ecran complet"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Filtre interne::Randor audio"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Comutator Audio"
@@ -557,30 +585,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Subtitrări::Bază de date"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Resurse"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Diverse"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Redare::Captură"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Redare::Setările randorului Sync"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Redare::Ecran complet"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Detalii"
@@ -673,22 +677,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Suprafața video va fi alocată ca o suprafață normală offscreen."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "Randorul Audio MPC este stricat, nu îl folosiţi."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Randor Sync"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Raportare o eroare"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC tocmai s-a închis neaşteptat, dar această versiune nu a fost compilată cu informaţii pentru depanare. \nDacă doriţi să raportaţi această eroare, ar trebui să încercaţi mai întâi o versiune oficială.\n\nDoriţi să vizitaţi pagina pentru descărcare acum?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Suprafaţă netedă offscreen obişnuită"
@@ -741,9 +733,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null - Fără randare video (formate necomprimate)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "Randor audio MPC-HC"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Randor audio intern"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1393,6 +1385,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "După redare: Închide"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC a întâmpinat o problemă în timpul inițializării. Cu ajutorul dumneavoastră ar fi posibil să rezolvăm această problemă.\n\nDoriți să o raportați?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Introduceți o valoare pozitivă dacă sunetul e înainte, o valoare negativă dacă e în urmă."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Previzualizarea este dezactivată momentan. Poate fi activată din opțiunile MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Această opțiune poate fi folosită pentru a previzualiza fișiere media de la distanță. Folosiți-o doar într-o rețea privată securizată corespunzător.\n\nSigur doriți să activați această opțiune?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Randor subtitrări intern"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Deschide dispozitiv"
@@ -1677,6 +1689,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Arată numele fișierului"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Redare DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Redare BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: Afișează statistici randor"
@@ -1958,19 +1978,19 @@ msgid "Options"
msgstr "Opțiuni"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Următorul audio"
+msgid "Next Audio Track"
+msgstr "Pista audio următoare"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Precedentul audio"
+msgid "Prev Audio Track"
+msgstr "Pista audio precedentă"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
+msgid "Next Subtitle Track"
msgstr "Subtitrarea următoare"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
+msgid "Prev Subtitle Track"
msgstr "Subtitrarea precedentă"
msgctxt "IDS_MPLAYERC_85"
@@ -1981,22 +2001,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Reîncarcă subtitrările"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Următorul audio (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Precedentul audio (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Subtitrarea următoare (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Subtitrarea precedentă (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Unghiul următor (DVD)"
@@ -2006,19 +2010,19 @@ msgid "Prev Angle (DVD)"
msgstr "Unghiul precedent (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Următorul audio (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Următoarea pistă audio (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Precedentul audio (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Precedenta pistă audio (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
+msgid "Next Subtitle Track (DVD)"
msgstr "Subtitrarea următoare (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
+msgid "Prev Subtitle Track (DVD)"
msgstr "Subtitrarea precedentă (DVD)"
msgctxt "IDS_MPLAYERC_97"
@@ -2385,14 +2389,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Curent"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC s-a închis neașteptat. Pentru a ne ajuta să rezolvăm această problemă, vă rugăm să trimiteți acest fișier „%s†către sistemul nostru de urmărire erori (bug tracker).\n\nDoriţi să deschideţi dosarul ce conţine fişierul de imagine memorie (minidump) şi să vizitaţi acum sistemul de urmărire erori?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Eșuare la crearea fișierului de depanare „%s†(eroare %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Selectare director"
@@ -2566,8 +2562,8 @@ msgid "Volume boost Max"
msgstr "Amplificare volum maximă"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Utilizare: mpc-hc.exe \"cale\" [comutatoare]\n\n\"cale\"\t\tFișierul principal sau directorul ce trebuie încărcat (metacaractere\n\t\tpermise, \"-\" indică intrare standard)\n/dub \"dublaj\"\tÎncarcă un fișier audio adițional\n/dubdelay \"fișier\"\tÎncarcă un fișier audio adițional decalat cu XXms (dacă\n\t\tfișierul conține \"...DELAY XXms...\")\n/d3dfs\t\tPornește randarea în mod ecran complet D3D\n/sub \"subtitrare\"\tÎncarcă o subtitrare adițională\n/filter \"filtru\"\tÎncarcă filtre DirectShow dintr-o librărie\n\t\tcu încărcare dinamică (metacaractere permise)\n/dvd\t\tRulează în mod DVD, \"cale\" înseamnă dosarul\n\t\tdvd-ului (opțional)\n/dvdpos T#C\tPornește redarea de la titlul T, capitolul C\n/dvdpos T#hh:mm\tPornește redarea de la titlul T, poziția hh:mm:ss\n/cd\t\tÎncarcă toate pistele unui CD audio sau (S)VCD,\n\t\t\"cale\" înseamnă calea unității (opțional)\n/device\t\tDeschide dispozitivul video implicit\n/open\t\tDeschide fișierul, nu porni redarea în mod automat\n/play\t\tÎncepe redarea fișierului imediat ce playerul este lansat\n/close\t\tÎnchide playerul după redare (funcționează doar când\n\t\teste folosit cu /play)\n/shutdown\tÎnchide sistemul după redare\n/standby\t\tIntră în repaus după redare\n/hibernate\tIntră în hibernare după redare\n/logoff\t\tÎnchide sesiunea după redare\n/lock\t\tBlochează desktopul după redare\n/monitoroff\tÎnchide monitorul după redare\n/playnext\t\tRedă următorul fișier din dosar după redare\n/fullscreen\tPornește în modul ecran complet\n/minimized\tPornește în modul minimizat\n/new\t\tFolosește o instanță nouă a playerului\n/add\t\tAdaugă \"cale\" la lista de redare, poate fi combinat\n\t\tcu /open și /play\n/randomize\tRedă lista aleatoriu\n/regvid\t\tCreează asocieri de fișiere pentru fișiere video\n/regaud\t\tCreează asocieri de fișiere pentru fișiere audio\n/regpl\t\tCreează asocieri de fișiere pentru fișiere listă de redare\n/regall\t\tCreează asocieri de fișiere pentru toate tipurile de fișiere suportate\n/unregall\t\tElimină toate asocierile de fișiere\n/start ms\t\tPornește redarea la \"ms\" (= milisecunde)\n/startpos hh:mm:ss\tPornește redarea la poziția hh:mm:ss\n/fixedsize L,l\tSetează o dimensiune fixă Lxl pentru fereastră\n/monitor N\tPornește redarea pe monitorul N, unde N începe de la 1\n/audiorenderer N\tPornește folosind randorul audio N, unde N începe de la 1\n\t\t(vedeți setările \"Ieșire\")\n/shaderpreset \"Pr\"\tPornește folosind setarea predefinită \"Pr\" pentru shader\n/pns \"nume\"\tSpecifică numele setării predefinite Pan&Scan ce va fi folosită\n/iconsassoc\tReasociază iconițele specifice formatelor\n/nofocus\t\tDeschide MPC-HC în fundal\n/webport N\tPornește interfața web pe portul specificat\n/debug\t\tArată informații de depanare în OSD\n/nocrashreporter\tDezactivează raportorul de defecte\n/slave \"hWnd\"\tFolosește MPC-HC în modul sclav sau dependent\n/reset\t\tRestaurează setări implicite\n/help /h /?\tArată ajutor pentru comutatoarele din linia de comandă\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Utilizare: mpc-hc.exe \"cale\" [comutatoare]\n\n\"cale\"\t\tFișierul principal sau directorul ce trebuie încărcat (metacaractere\n\t\tpermise, \"-\" indică intrare standard)\n/dub \"dublaj\"\tÎncarcă un fișier audio adițional\n/dubdelay \"fișier\"\tÎncarcă un fișier audio adițional decalat cu XXms (dacă\n\t\tfișierul conține \"...DELAY XXms...\")\n/d3dfs\t\tPornește randarea în mod ecran complet D3D\n/sub \"subtitrare\"\tÎncarcă o subtitrare adițională\n/filter \"filtru\"\tÎncarcă filtre DirectShow dintr-o librărie\n\t\tcu încărcare dinamică (metacaractere permise)\n/dvd\t\tRulează în mod DVD, \"cale\" înseamnă dosarul\n\t\tdvd-ului (opțional)\n/dvdpos T#C\tPornește redarea de la titlul T, capitolul C\n/dvdpos T#hh:mm\tPornește redarea de la titlul T, poziția hh:mm:ss\n/cd\t\tÎncarcă toate pistele unui CD audio sau (S)VCD,\n\t\t\"cale\" înseamnă calea unității (opțional)\n/device\t\tDeschide dispozitivul video implicit\n/open\t\tDeschide fișierul, nu porni redarea în mod automat\n/play\t\tÎncepe redarea fișierului imediat ce playerul este lansat\n/close\t\tÎnchide playerul după redare (funcționează doar când\n\t\teste folosit cu /play)\n/shutdown\tÎnchide sistemul după redare\n/standby\t\tIntră în repaus după redare\n/hibernate\tIntră în hibernare după redare\n/logoff\t\tÎnchide sesiunea după redare\n/lock\t\tBlochează desktopul după redare\n/monitoroff\tÎnchide monitorul după redare\n/playnext\t\tRedă următorul fișier din dosar după redare\n/fullscreen\tPornește în modul ecran complet\n/minimized\tPornește în modul minimizat\n/new\t\tFolosește o instanță nouă a playerului\n/add\t\tAdaugă \"cale\" la lista de redare, poate fi combinat\n\t\tcu /open și /play\n/randomize\tRedă lista aleatoriu\n/regvid\t\tCreează asocieri de fișiere pentru fișiere video\n/regaud\t\tCreează asocieri de fișiere pentru fișiere audio\n/regpl\t\tCreează asocieri de fișiere pentru fișiere listă de redare\n/regall\t\tCreează asocieri de fișiere pentru toate tipurile de fișiere suportate\n/unregall\t\tElimină toate asocierile de fișiere\n/start ms\t\tPornește redarea la \"ms\" (= milisecunde)\n/startpos hh:mm:ss\tPornește redarea la poziția hh:mm:ss\n/fixedsize L,l\tSetează o dimensiune fixă Lxl pentru fereastră\n/monitor N\tPornește redarea pe monitorul N, unde N începe de la 1\n/audiorenderer N\tPornește folosind randorul audio N, unde N începe de la 1\n\t\t(vedeți setările \"Ieșire\")\n/shaderpreset \"Pr\"\tPornește folosind setarea predefinită \"Pr\" pentru shader\n/pns \"nume\"\tSpecifică numele setării predefinite Pan&Scan ce va fi folosită\n/iconsassoc\tReasociază iconițele specifice formatelor\n/nofocus\t\tDeschide MPC-HC în fundal\n/webport N\tPornește interfața web pe portul specificat\n/debug\t\tArată informații de depanare în OSD\n/nocrashreporter\tDezactivează raportorul de defecte\n/slave \"hWnd\"\tFolosește MPC-HC în modul sclav sau dependent\n/hwgpu \"index\"\tSetează indexul plăcii grafice (GPU) ce va fi folosită pentru decodare hardware\n\t\tDisponibil doar pentru CUVID și DXVA2 (copy-back)\n/reset\t\tRestaurează setări implicite\n/help /h /?\tArată ajutor pentru comutatoarele din linia de comandă\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3041,18 +3037,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Raport de aspect"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Folosește WASAPI (necesită reponirea redării)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Tăcut la derulare rapidă înainte"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Dispozitiv de sunet:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: Activat"
@@ -3609,3 +3593,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Setări"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ru.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ru.dialogs.po
index 28501809c..db6e64ba6 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ru.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ru.dialogs.po
@@ -4,17 +4,20 @@
# Translators:
# Alexander Gorishnyak <kefir500@gmail.com>, 2014
# Arkady Shapkin <arkadiy_s@inbox.ru>, 2015
+# birkoff <birkoff.anarchist@gmail.com>, 2015
# Pavel Otchertsov <pavel.otchertsov@gmail.com>, 2015
# sayanvd <sayanvd@yandex.ru>, 2014-2015
# stryaponoff <stryaponoff@gmail.com>, 2014
# SmilyCarrot <twisted-transistor@yandex.ru>, 2014
+# Victor Bychek, 2015
+# Ð”ÐµÐ½Ð¸Ñ <denyspokhylenko@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-30 20:50+0000\n"
-"Last-Translator: sayanvd <sayanvd@yandex.ru>\n"
-"Language-Team: Russian (http://www.transifex.com/projects/p/mpc-hc/language/ru/)\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-24 11:16+0000\n"
+"Last-Translator: Victor Bychek\n"
+"Language-Team: Russian (http://www.transifex.com/mpc-hc/mpc-hc/language/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -477,10 +480,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Ðвтозагрузка аудио файлов"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "ИÑпользовать вÑтроенный рендерер Ñубтитров"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Регулировка"
@@ -681,9 +680,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Ðе Ñворачивать окно на дополнительном диÑплее в полноÑкранном режиме"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "ИÑпользовать возможноÑти таÑкбара Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "ИÑпользовать раÑширенные опции панели задач"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1174,8 +1173,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Субтитры *"
+msgid "Subtitles"
+msgstr "Субтитры"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1190,8 +1189,8 @@ msgid "Rotation"
msgstr "Поворот"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Внешние фильтры (например VSFilter) могут отображать Ñубтитры на вÑех рендерерах."
+msgid "Subtitle Renderer"
+msgstr "Обработчик Ñубтитров"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1209,6 +1208,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Разрешить доÑтуп только Ñ Ð»Ð¾ÐºÐ°Ð»ÑŒÐ½Ð¾Ð³Ð¾ компьютера"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Включить проÑмотр"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Выводить отладочную информацию"
@@ -1657,6 +1660,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "По умолчанию"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "УÑтройÑтво"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Монопольный режим"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Разрешить Потоковый"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "ÐаÑтройки"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Включить Ñтерео кольцевание (Ð´Ð»Ñ Ð½Ð°ÑƒÑˆÐ½Ð¸ÐºÐ¾Ð²)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "С. Мой"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "Дж Мейер"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "ОтÑечение:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Уровень:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Заметка"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Ð”Ð»Ñ ÑÐ¾ÐºÑ€Ð°Ñ‰ÐµÐ½Ð¸Ñ Ð´Ð¾ минимума звуковых иÑкажений рекомендуетÑÑ Ð´ÐµÑ€Ð¶Ð°Ñ‚ÑŒ уровень громкоÑти около 85% при проигрывании громкого Ñодержимого закодированного Ñ Ð¿Ð¾Ñ‚ÐµÑ€Ñми."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "КачеÑтво JPEG:"
@@ -1673,9 +1720,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Отчет о Ñбое"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Мы Ñожалеем, кажетÑÑ, в MPC-HC произошел Ñбой. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Отправить отчёт об ошибке, чтобы помочь нам диагноÑтировать и иÑправить проблему."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Сожалеем, но кажетÑÑ MPC-HC только что потерпел Ñбой. :(\n\nЧтобы помочь нам диагноÑтировать и уÑтранить проблему, будет отправлен отчет об ошибке. ЕÑли желаете, то Ð’Ñ‹ можете предоÑтавить дополнительную информацию."
+msgid "Optional information"
+msgstr "Ð”Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1689,7 +1744,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "ОпиÑание проблемы (только на английÑком):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "ПерезапуÑтить MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Выйти из MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ru.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ru.menus.po
index 4ac438838..c63913129 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ru.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ru.menus.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
"PO-Revision-Date: 2015-05-30 20:50+0000\n"
"Last-Translator: sayanvd <sayanvd@yandex.ru>\n"
-"Language-Team: Russian (http://www.transifex.com/projects/p/mpc-hc/language/ru/)\n"
+"Language-Team: Russian (http://www.transifex.com/mpc-hc/mpc-hc/language/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.ru.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.ru.strings.po
index 66946a863..d1e7fa514 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.ru.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.ru.strings.po
@@ -4,19 +4,22 @@
# Translators:
# Alexander Gorishnyak <kefir500@gmail.com>, 2014
# Arkady Shapkin <arkadiy_s@inbox.ru>, 2014
+# birkoff <birkoff.anarchist@gmail.com>, 2015
# Ilya, 2015
# Pavel Otchertsov <pavel.otchertsov@gmail.com>, 2015
# sayanvd <sayanvd@yandex.ru>, 2014-2015
# stryaponoff <stryaponoff@gmail.com>, 2014
# SmilyCarrot <twisted-transistor@yandex.ru>, 2014-2015
# Underground78, 2014
+# Victor Bychek, 2015
+# Ð”ÐµÐ½Ð¸Ñ <denyspokhylenko@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-30 20:50+0000\n"
-"Last-Translator: sayanvd <sayanvd@yandex.ru>\n"
-"Language-Team: Russian (http://www.transifex.com/projects/p/mpc-hc/language/ru/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Russian (http://www.transifex.com/mpc-hc/mpc-hc/language/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -332,11 +335,11 @@ msgid "On/Off"
msgstr "Вкл/Выкл"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr "От (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr "До (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -471,6 +474,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Проигрыватель::Шейдеры"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "РеÑурÑÑ‹"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Разное"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "ВоÑпроизведение::Захват"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "ВоÑпроизведение::Sync Renderer"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "ВоÑпроизведение::Полный Ñкран"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Ð’Ñтроенные фильтры::Ðудио-рендерер"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Ðудиопереключатель"
@@ -563,30 +594,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Субтитры::База"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "РеÑурÑÑ‹"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Разное"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "ВоÑпроизведение::Захват"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "ВоÑпроизведение::Sync Renderer"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "ВоÑпроизведение::Полный Ñкран"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Подробно"
@@ -679,22 +686,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "ПоверхноÑÑ‚ÑŒ Ð´Ð»Ñ Ð²Ð¸Ð´ÐµÐ¾ выделÑетÑÑ ÐºÐ°Ðº Ð¾Ð±Ñ‹Ñ‡Ð½Ð°Ñ Ð¿Ð¾Ð²ÐµÑ€Ñ…Ð½Ð¾ÑÑ‚ÑŒ вне Ñкрана."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Audio Renderer Ñломан, не иÑпользуйте его."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Сообщение об ошибке"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC упал, но Ñта Ñборка была Ñкомпилирована без отладочной информации.\nЕÑли вы хотите Ñообщить об Ñтой ошибке, Ñначала вы должны попробовать официальную Ñборку.\n\nÐ’Ñ‹ хотите открыть Ñтраницу загрузки?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "ÐžÐ±Ñ‹Ñ‡Ð½Ð°Ñ Ð¿Ð¾Ð²ÐµÑ€Ñ…Ð½Ð¾ÑÑ‚ÑŒ вне Ñкрана"
@@ -747,9 +742,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (без ÑжатиÑ)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC аудио рендерер"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Ð’Ñтроенный аудио-рендерер"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1399,6 +1394,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "По окончании воÑпроизведениÑ: закрыть"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC ÑтолкнулÑÑ Ñ Ð¿Ñ€Ð¾Ð±Ð»ÐµÐ¼Ð¾Ð¹ во Ð²Ñ€ÐµÐ¼Ñ Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ð¸. С вашей помощью мы можем иÑправить проблему.\n\nÐ’Ñ‹ хотите Ñообщить о ней?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Введите положительное значение, еÑли звук в начале, отрицательное значение, еÑли Ñто поздно."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Предварительный проÑмотр в наÑтоÑщее Ð²Ñ€ÐµÐ¼Ñ Ð¾Ñ‚ÐºÐ»ÑŽÑ‡ÐµÐ½Ð°. Ð’Ñ‹ можете включить его в наÑтройках MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Эта Ð¾Ð¿Ñ†Ð¸Ñ Ð¼Ð¾Ð¶ÐµÑ‚ быть иÑпользована Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñмотра мультимедийных файлов Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð½Ð¾Ð³Ð¾ меÑтоположениÑ. ИÑпользуйте его только на должным образом обеÑпеченных чаÑтной Ñети. Ð’Ñ‹ дейÑтвительно хотите включить Ñту опцию?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Внешний обработчик Ñубтитров"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Открыть уÑтройÑтво"
@@ -1683,6 +1698,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Показать Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Проиграть DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Проиграть BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: Показать ÑтатиÑтику рендера"
@@ -1964,19 +1987,19 @@ msgid "Options"
msgstr "Опции"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Следующее аудио"
+msgid "Next Audio Track"
+msgstr "Следующий трек"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Предыдущее аудио"
+msgid "Prev Audio Track"
+msgstr "Предыдущий трек"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
+msgid "Next Subtitle Track"
msgstr "Следующие Ñубтитры"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
+msgid "Prev Subtitle Track"
msgstr "Предыдущие Ñубтитры"
msgctxt "IDS_MPLAYERC_85"
@@ -1987,22 +2010,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Перезагрузить Ñубтитры"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Следующее аудио (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Предыдущее аудио (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Следующие Ñубтитры (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Предыдущие Ñубтитры (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Следующий угол (DVD)"
@@ -2012,19 +2019,19 @@ msgid "Prev Angle (DVD)"
msgstr "Предыдущий угол (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Следующее аудио (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Следующий трек (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Предыдущее аудио (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Предыдущий трек (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
+msgid "Next Subtitle Track (DVD)"
msgstr "Следующие Ñубтитры (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
+msgid "Prev Subtitle Track (DVD)"
msgstr "Предыдущие Ñубтитры (DVD)"
msgctxt "IDS_MPLAYERC_97"
@@ -2391,14 +2398,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Текущий"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "Работа MPC-HC прервана. Чтобы помочь нам в решении Ñтой проблемы, пожалуйÑта, отправьте файл '%s' на наш баг-трекер.\n\nХотите ли вы ÑÐµÐ¹Ñ‡Ð°Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚ÑŒ папку, Ñодержащую дамп-файл, и перейти на баг-трекер?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Ошибка при Ñоздании дамп-файла '%s' (ошибка %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Выберите папку"
@@ -2572,8 +2571,8 @@ msgid "Volume boost Max"
msgstr "УÑиление громкоÑти - Max"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "ИÑпользование: mpc-hc.exe \"путь\" [переключатели]\n\n\"путь\"\t\tФайл или каталог Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ (разрешены \n\t\tмаÑки, \"-\" denotes standard input)\n/dub \"dubname\"\tЗагрузить дополнительный звуковой файл\n/dubdelay \"file\"\tЗагрузить звуковой файл Ñо Ñмещением XXмÑ\n\t\t(еÑли файл Ñодержит \"...DELAY XXms...\")\n/d3dfs\t\tСтартовать в полноÑкранном D3D режиме\n/sub \"subname\"\tЗагрузить дополнительные Ñубтитры\n/filter \"filtername\"\tЗагрузить фильтры DirectShow из библиотеки\n\t\t(разрешены маÑки)\n/dvd\t\tЗапуÑк в режиме DVD, \"путь\" означает каталог\n\t\tÑ DVD (опционально)\n/dvdpos T#C\tÐачать воÑпроизведение Ñ title T, chapter C\n/dvdpos T#hh:mm\tÐачать воÑпроизведение Ñ title T, позиции\n\t\thh:mm:ss\n/cd\t\tЗагрузить вÑе дорожки Audio CD или (S)VCD,\n\t\t\"путь\" означает путь к диÑку (опционально)\n/device\t\tOpen the default video device\n/open\t\tТолько открыть файл\n/play\t\tÐачинать воÑпроизведение Ñразу поÑле запуÑка\n/close\t\tЗакрыть по окончании воÑпроизведениÑ\n\t\t(работает только Ñ ÐºÐ»ÑŽÑ‡ÐµÐ¼ /play)\n/shutdown\tВыключить компьютер по окончании\n\t\tвоÑпроизведениÑ\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tЗапуÑк в полноÑкранном режиме\n/minimized\tЗапуÑк в Ñвернутом виде\n/new\t\tИÑпользовать новую копию проигрывателÑ\n/add\t\tДобавить \"путь\" в плейлиÑÑ‚, можно ÑовмеÑтно\n\t\tÑ ÐºÐ»ÑŽÑ‡Ð°Ð¼Ð¸ /open и /play\n/randomize\tRandomize the playlist\n/regvid\t\tРегиÑтрировать видеоформаты\n/regaud\t\tРегиÑтрировать аудиоформаты\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tРазрегиÑтрировать вÑе форматы\n/start ms\t\tВоÑпроизводить Ñ Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¸ \"ms\"\n\t\t(миллиÑекунды)\n/startpos hh:mm:ss\tВоÑпроизводить Ñ Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¸ hh:mm:ss\n/fixedsize w,h\tУÑтановить фикÑированный размер окна\n/monitor N\tЗапуÑкатьÑÑ Ð½Ð° мониторе N, где N\n\t\tотÑчитываетÑÑ Ñ 1\n/audiorenderer N\tИÑпользовать аудиорендер N, где N\n\t\tотÑчитываетÑÑ Ñ 1 (Ñмотрите наÑтройки\n\t\t\"Вывод\")\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tВоÑтановить наÑтройки по умолчанию\n/help /h /?\tПоказывает Ñту Ñправку\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "ИÑпользование: mpc-hc.exe \"путь\" [переключатели]\n\n\"путь\"\t\tФайл или каталог Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ (разрешены \n\t\tмаÑки, \"-\" denotes standard input)\n/dub \"dubname\"\tЗагрузить дополнительный звуковой файл\n/dubdelay \"file\"\tЗагрузить звуковой файл Ñо Ñмещением XXмÑ\n\t\t(еÑли файл Ñодержит \"...DELAY XXms...\")\n/d3dfs\t\tСтартовать в полноÑкранном D3D режиме\n/sub \"subname\"\tЗагрузить дополнительные Ñубтитры\n/filter \"filtername\"\tЗагрузить фильтры DirectShow из библиотеки\n\t\t(разрешены маÑки)\n/dvd\t\tЗапуÑк в режиме DVD, \"путь\" означает каталог\n\t\tÑ DVD (опционально)\n/dvdpos T#C\tÐачать воÑпроизведение Ñ title T, chapter C\n/dvdpos T#hh:mm\tÐачать воÑпроизведение Ñ title T, позиции\n\t\thh:mm:ss\n/cd\t\tЗагрузить вÑе дорожки Audio CD или (S)VCD,\n\t\t\"путь\" означает путь к диÑку (опционально)\n/device\t\tOpen the default video device\n/open\t\tТолько открыть файл\n/play\t\tÐачинать воÑпроизведение Ñразу поÑле запуÑка\n/close\t\tЗакрыть по окончании воÑпроизведениÑ\n\t\t(работает только Ñ ÐºÐ»ÑŽÑ‡ÐµÐ¼ /play)\n/shutdown\tВыключить компьютер по окончании\n\t\tвоÑпроизведениÑ\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tЗапуÑк в полноÑкранном режиме\n/minimized\tЗапуÑк в Ñвернутом виде\n/new\t\tИÑпользовать новую копию проигрывателÑ\n/add\t\tДобавить \"путь\" в плейлиÑÑ‚, можно ÑовмеÑтно\n\t\tÑ ÐºÐ»ÑŽÑ‡Ð°Ð¼Ð¸ /open и /play\n/randomize\tRandomize the playlist\n/regvid\t\tРегиÑтрировать видеоформаты\n/regaud\t\tРегиÑтрировать аудиоформаты\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tРазрегиÑтрировать вÑе форматы\n/start ms\t\tВоÑпроизводить Ñ Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¸ \"ms\"\n\t\t(миллиÑекунды)\n/startpos hh:mm:ss\tВоÑпроизводить Ñ Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¸ hh:mm:ss\n/fixedsize w,h\tУÑтановить фикÑированный размер окна\n/monitor N\tЗапуÑкатьÑÑ Ð½Ð° мониторе N, где N\n\t\tотÑчитываетÑÑ Ñ 1\n/audiorenderer N\tИÑпользовать аудиорендер N, где N\n\t\tотÑчитываетÑÑ Ñ 1 (Ñмотрите наÑтройки\n\t\t\"Вывод\")\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tВоÑтановить наÑтройки по умолчанию\n/help /h /?\tПоказывает Ñту Ñправку\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3047,18 +3046,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Соотношение Ñторон"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "ИÑпользовать WASAPI (требуетÑÑ Ð¿ÐµÑ€ÐµÐ·Ð°Ð¿ÑƒÑк)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Отключить звук при быÑтрой перемотке"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Звуковое уÑтройÑтво:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: включен"
@@ -3615,3 +3602,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "ÐаÑтройки"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.sk.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.sk.dialogs.po
index 42895d371..76dfc7807 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.sk.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.sk.dialogs.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-18 10:52+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-21 21:47+0000\n"
"Last-Translator: Marián Hikaník <podnety@mojepreklady.net>\n"
-"Language-Team: Slovak (http://www.transifex.com/projects/p/mpc-hc/language/sk/)\n"
+"Language-Team: Slovak (http://www.transifex.com/mpc-hc/mpc-hc/language/sk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -473,10 +473,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Aut. naÄítanie zvuk. stôp"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Použiť zabudované vykresľovanie titulkov"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "OvládaÄ"
@@ -677,9 +673,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Zabrániť minimalizovaniu pri celoobrazovkovom režime na inom monitore"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Použiť vlastnosti panela úloh Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Použiť rozšírené vlastnosti panela úloh"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1170,8 +1166,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Titulky *"
+msgid "Subtitles"
+msgstr "Titulky"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1186,8 +1182,8 @@ msgid "Rotation"
msgstr "OtoÄenie"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Externé filtre (ako napr. VSFilter) dokážu zobrazovaÅ¥ titulky pri vÅ¡etkých vykresľovaÄoch."
+msgid "Subtitle Renderer"
+msgstr "VykresľovaÄ titulkov"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1205,6 +1201,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Povoliť prístup len z lokálnej stanice"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Zapnúť náhľad"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Informácie pre ladenie"
@@ -1653,6 +1653,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Predvolené"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Zariadenie"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Režim vyhradeného použitia"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Povoliť streamovanie bitov"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Nastavenia"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Zapnúť prelínanie kanálov sterea (pre slúchadlá)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "UkonÄenie:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Úroveň:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Poznámka"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Na minimalizovanie skreslenia zvuku sa odporúÄa udržiavaÅ¥ poÄas prehrávania obsahu so stratovou kompresiou hlasitosÅ¥ na 85 %."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "Kvalita JPEG:"
@@ -1669,9 +1713,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "OznamovaÄ zlyhaní"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "PrepáÄte, zdá sa, že doÅ¡lo k neoÄakávanému ukonÄeniu programu MPC-HC. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Ak nám chcete pomôcť s diagnostikou a riešením vzniknutého problému, pošlite nám záznam o chybe."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Ospravedlňujeme sa za nepríjemnosti, ale zdá sa, že program MPC-HC neoÄakávane zlyhal. :(\n\nAk nám chcete pomôcÅ¥ objasniÅ¥ a opraviÅ¥ vzniknutý problém, môžete nám odoslaÅ¥ záznam o chybe. Môžete pridaÅ¥ aj doplnkové informácie podľa svojho želania."
+msgid "Optional information"
+msgstr "Doplnková informácia"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1685,7 +1737,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Opis problému (len v angliÄtine):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Reštartovať MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "UkonÄiÅ¥ MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.sk.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.sk.menus.po
index 31e43a84d..e6dd73663 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.sk.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.sk.menus.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
"PO-Revision-Date: 2015-05-27 14:15+0000\n"
"Last-Translator: Marián Hikaník <podnety@mojepreklady.net>\n"
-"Language-Team: Slovak (http://www.transifex.com/projects/p/mpc-hc/language/sk/)\n"
+"Language-Team: Slovak (http://www.transifex.com/mpc-hc/mpc-hc/language/sk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.sk.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.sk.strings.po
index cc6a4ea91..863b1c12d 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.sk.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.sk.strings.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-27 14:15+0000\n"
-"Last-Translator: Marián Hikaník <podnety@mojepreklady.net>\n"
-"Language-Team: Slovak (http://www.transifex.com/projects/p/mpc-hc/language/sk/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Slovak (http://www.transifex.com/mpc-hc/mpc-hc/language/sk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -326,12 +326,12 @@ msgid "On/Off"
msgstr "Zap./Vyp."
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Od snímok/sek."
+msgid "From (FPS)"
+msgstr "Od (sním,/s)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "Do snímok/sek."
+msgid "To (FPS)"
+msgstr "Do (sním./s)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -465,6 +465,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Prehrávanie::Shadery"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Zdroje"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Rôzne"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Prehrávanie::Záznam"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Prehrávanie::Nastavenie vykresľovania a synchronizácie"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Prehrávanie::Režim na celú obrazovku"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Interné filtre::VykresľovaÄ zvuku"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "PrepínaÄ zvuku"
@@ -557,30 +585,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Titulky::Databáza"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Zdroje"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Rôzne"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Prehrávanie::Záznam"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Prehrávanie::Nastavenie vykresľovania a synchronizácie"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Prehrávanie::Režim na celú obrazovku"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Podrobnosti"
@@ -673,22 +677,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Plocha videa sa vymedzí ako bežná plocha mimo obrazovky."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "Vykresľovanie zvuku MPC je nefunkÄné, nepoužívajte ho."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Vykresľovanie so synchronizáciou"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Nahlásenie chyby"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC bol neoÄakávané ukonÄený, avÅ¡ak toto zostavenie bolo skompilované bez informácie pre ladenie.\nAk chcete nahlásiÅ¥ túto chybu, najskôr vyskúšajte oficiálne zostavenie programu.\n\nChcete navÅ¡tíviÅ¥ stránku pre stiahnutie programu?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Bežná plocha mimo obrazovky"
@@ -741,9 +733,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (nekomprimované)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "VykresľovaÄ zvuku MPC-HC"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Interný vykresľovaÄ zvuku"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1393,6 +1385,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Po prehratí: Uzatvoriť"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "Program MPC-HC zaznamenal problémy poÄas inicializácie. S vaÅ¡ou pomocou by sme možno boli schopní tieto problémy opraviÅ¥.\n\nChcete ohlásiÅ¥ vzniknuté problémy?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Ak je zvuk popredu, zadajte kladnú hodnotu, ak je oneskorený, zadajte zápornú hodnotu."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Náhľad je momentálne zablokovaný. Odblokovať ho môžete v nastaveniach programu MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Túto voľbu je možné použiÅ¥ na zobrazenie náhľadu médií zo vzdialeného umiestnenia. Používajte ju iba v riadne zabezpeÄenej súkromnej sieti.\n\nNaozaj chcete túto voľbu zapnúť?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Interný vykresľovaÄ titulkov"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "NaÄítaÅ¥ zo zariadenia"
@@ -1677,6 +1689,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Zobraziť názov súboru"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Prehrať DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Prehrať BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: ZobraziÅ¥ Å¡tatistiky vykresľovaÄa"
@@ -1958,20 +1978,20 @@ msgid "Options"
msgstr "Nastavenia"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Ďalší zvuk"
+msgid "Next Audio Track"
+msgstr "Ďalšia zvuková stopa"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Predchádzajúci zvuk"
+msgid "Prev Audio Track"
+msgstr "Predchádzajúca zvuková stopa"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Ďalší titulok"
+msgid "Next Subtitle Track"
+msgstr "Ďalšia stopa s titulkami"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Predchádzajúci titulok"
+msgid "Prev Subtitle Track"
+msgstr "Predchádzajúca stopa s titulkami"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1981,22 +2001,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "NaÄítaÅ¥ titulky znova"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Ďalší zvuk (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Predchádzajúci zvuk (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Ďalší titulok (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Predchádzajúci titulok (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Ďalší uhol (DVD)"
@@ -2006,20 +2010,20 @@ msgid "Prev Angle (DVD)"
msgstr "Prechádzajúci uhol (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Ďalší zvuk (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Ďalšia zvuková stopa (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Predchádzajúci zvuk (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Predchádzajúca zvuková stopa (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Ďalší titulok (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "Ďalšia stopa s titulkami (DVD);"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Predchádzajúci titulok (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "Predchádzajúca stopa s titulkami (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2385,14 +2389,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Aktuálne"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "Program MPC-HC bol neoÄakávane ukonÄený. Ak nám chcete pomôcÅ¥ vyrieÅ¡iÅ¥ tento problém, odoÅ¡lite prosím súbor \"%s\" do nášho systému pre nahlasovanie chýb.\n\nChcete otvoriÅ¥ prieÄinok obsahujúci súbor s výpisom pamäte a navÅ¡tíviÅ¥ systém pre nahlasovanie chýb?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Nepodarilo sa vytvoriť výpis pamäte v súbore \"%s\" (chyba %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "VybraÅ¥ prieÄinok"
@@ -2566,8 +2562,8 @@ msgid "Volume boost Max"
msgstr "Zvýraznenie hlasitosti Max"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Pouzitie: mpc-hc.exe \"cesta\" [prepinace]\n\n\"cesta\"\tHlavny subor alebo priecinok, ktoreho obsah sa nacita (zastupne znaky\n\t\tsu povolene, znakom \"-\" oznacite standardny vstup)\n/dub \"zvukova stopa\"\tNacitat dalsi zvukovy subor\n/dubdelay \"subor\"\t Nacitat dalsi zvukovy subor, oneskoreny o XX ms (ak\n\t\tsubor obsahuje \"...DELAY XXms...\")\n/d3dfs\t\tspustit vykreslovanie v rezime na celu obrazovku D3D\n/sub \"nazov titulkov\"\tNacitat dalsi subor s titulkami\n/filter \"nazov filtra\"\t Nacitat filtre DirectShow z dynamicky prepojenej\n\t\tkniznice (zastupne znaky su povolene)\n/dvd\t\tSpustit v rezime DVD, \"cesta\" oznacuje priecinok na\n\t\tDVD (volitelne)\n/dvdpos T#C\tSpustit prehravanie titulu T, kapitoly C\n/dvdpos T#hh:mm\tSpustit prehravanie titulu T, na pozicii hh:mm:ss\n/cd\t\tNacitat vsetky stopy zvukoveho CD alebo (S)VCD,\n\t\t\"cesta\" - cesta k jednotke (volitelne)\n/device\t\tOtvorit predvolene zariadenie pre video\n/open\t\tOtvorit subor, neprehrat automaticky\n/play\t\tSpustit prehravanie ihned po spusteni \n\t\tprehravaca\n/close\t\tZatvorit prehravac po prehrati (funguje len s prepinacom\n\t\t /play)\n/shutdown\tVypnut operacny system po prehrati\n/standby\t\tPrepnut operacny system do pohotovostneho rezimu pre prehrati\n/hibernate\tPrepnut operacny system do rezimu hibernacie po prehrati\n/logoff\t\tPo prehrati odhlasit\n/lock\t\tPo prehrati uzamknut pocitac\n/monitoroff\tPo prehrati vypnut monitor\n/playnext\t\tPo prehrati otvorit dalsi subor v priecinku\n/fullscreen\tSpustit v rezime na celu obrazovku\n/minimized\tSpustiť minimalizovane\n/new\t\tPouzit novu instanciu prehravaca\n/add\t\tPridat \"cestu\" k playlistu, parameter mozno kombinovat s prepinacmi\n\t\t /open a /play\n/randomize\tNahodne prehravanie v playliste\n/regvid\t\tVytvorit asociacie k suborom s videom\n/regaud\t\tVytvorit asociacie k suborom so zvukom\n/regpl\t\tVytvorit asociacie k suborom playlistov\n/regall\t\tVytvorit asociacie k vsetkym podporovanym suborom\n/unregall\t\tOdstranit vsetky asociacie k suborom\n/start ms\t\tSpustit prehravanie na pozicii v \"ms\" (= milisekundach)\n/startpos hh:mm:ss\tSpustit prehravanie na pozicii hh:mm:ss\n/fixedsize w,h\tNastavit fixnu sirku okna\n/monitor N\tSpustit prehravac na monitore N, pricom cislo N zacina na hodnote 1\n/audiorenderer N\tSpustit s pouzitim vykreslovaca zvuku N, pricom N sa zacina na hodnote 1\n\t\t(pozrite si nastavenia v casti \"Vystup\")\n/shaderpreset \"Pr\"\tSpustit s pouzitim prednastavenia shaderov \"Pr\"\n/pns \"name\"\tUrcit prednastavenia funkcie Pan&Scan ktore sa maju pouzit\n/iconsassoc\tZnovu asociovat ikony formatov\n/nofocus\t\tOtvorit program MPC-HC na pozadi\n/webport N\tSpustit webove rozhranie na specifikovanom porte\n/debug\t\tZobrazit informaciu pre ladenie v OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tPouzit MPC-HC ako druhotnu aplikaciu\n/reset\t\tObnovit predvolene nastavenia\n/help /h /?\tZobrazit pomocnika k prepinacom na prikazovom riadku\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Pouzitie: mpc-hc.exe \"cesta\" [prepinace]\n\n\"cesta\"\tHlavny subor alebo priecinok, ktory sa nacita (zastupne znaky\n\t\tsu povolene, znakom \"-\" oznacite standardny vstup)\n/dub \"zvukova stopa\"\tNacitat dalsi zvukovy subor\n/dubdelay \"subor\"\t Nacitat dalsi zvukovy subor, oneskoreny o XX ms (ak\n\t\tsubor obsahuje \"...DELAY XXms...\")\n/d3dfs\t\tspustit vykreslovanie v rezime na celu obrazovku D3D\n/sub \"nazov titulkov\"\tNacitat dalsi subor s titulkami\n/filter \"nazov filtra\"\t Nacitat filtre DirectShow z dynamicky prepojenej\n\t\tkniznice (zastupne znaky su povolene)\n/dvd\t\tSpustit v rezime DVD, \"cesta\" oznacuje priecinok na\n\t\tDVD (volitelne)\n/dvdpos T#C\tSpustit prehravanie titulu T, kapitoly C\n/dvdpos T#hh:mm\tSpustit prehravanie titulu T, na pozicii hh:mm:ss\n/cd\t\tNacitat vsetky stopy zvukoveho CD alebo (S)VCD,\n\t\t\"cesta\" - cesta k jednotke (volitelne)\n/device\t\tOtvorit predvolene zariadenie pre video\n/open\t\tOtvorit subor, neprehrat automaticky\n/play\t\tSpustit prehravanie ihned po spusteni \n\t\tprehravaca\n/close\t\tZatvorit prehravac po prehrati (funguje len s prepinacom\n\t\t /play)\n/shutdown\tVypnut operacny system po prehrati\n/standby\t\tPrepnut operacny system do pohotovostneho rezimu pre prehrati\n/hibernate\tPrepnut operacny system do rezimu hibernacie po prehrati\n/logoff\t\tPo prehrati odhlasit\n/lock\t\tPo prehrati uzamknut pocitac\n/monitoroff\tPo prehrati vypnut monitor\n/playnext\t\tPo prehrati otvorit dalsi subor v priecinku\n/fullscreen\tSpustit v rezime na celu obrazovku\n/minimized\tSpustiť minimalizovane\n/new\t\tPouzit novu instanciu prehravaca\n/add\t\tPridat \"cestu\" k playlistu, parameter mozno kombinovat s prepinacmi\n\t\t /open a /play\n/randomize\tNahodne prehravanie v playliste\n/regvid\t\tVytvorit asociacie k suborom s videom\n/regaud\t\tVytvorit asociacie k suborom so zvukom\n/regpl\t\tVytvorit asociacie k suborom playlistov\n/regall\t\tVytvorit asociacie k vsetkym podporovanym suborom\n/unregall\t\tOdstranit vsetky asociacie k suborom\n/start ms\t\tSpustit prehravanie na pozicii v \"ms\" (= milisekundach)\n/startpos hh:mm:ss\tSpustit prehravanie na pozicii hh:mm:ss\n/fixedsize w,h\tNastavit fixnu sirku okna\n/monitor N\tSpustit prehravac na monitore N, pricom cislo N zacina na hodnote 1\n/audiorenderer N\tSpustit s pouzitim vykreslovaca zvuku N, pricom N sa zacina na hodnote 1\n\t\t(pozrite si nastavenia v casti \"Vystup\")\n/shaderpreset \"Pr\"\tSpustit s pouzitim prednastavenia shaderov \"Pr\"\n/pns \"name\"\tUrcit prednastavenia funkcie Pan&Scan ktore sa maju pouzit\n/iconsassoc\tZnovu asociovat ikony formatov\n/nofocus\t\tOtvorit program MPC-HC na pozadi\n/webport N\tSpustit webove rozhranie na specifikovanom porte\n/debug\t\tZobrazit informaciu pre ladenie v OSD\n/nocrashreporter\tVypnut oznamovanie padov programu\n/slave \"hWnd\"\tPouzit MPC-HC ako druhotnu aplikaciu\n/hwgpu \"index\"\tNastavit index GPU pouzity pre HW dekodovanie\n\t\tDostupne len pre CUVID a DXVA2 (copy-back)\n/reset\t\tObnovit predvolene nastavenia\n/help /h /?\tZobrazit pomocnika k prepinacom na prikazovom riadku\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3041,18 +3037,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Stranový pomer"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Použiť WASAPI (reštartovať prehrávanie)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Stlmiť zvuk pri rýchlom prevíjaní vpred"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Zvuk. zariadenie:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: zapnutá"
@@ -3609,3 +3593,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Nastavenia"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter/DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.sl.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.sl.dialogs.po
index d19b5f171..2c861eedb 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.sl.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.sl.dialogs.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-31 14:58+0000\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-09-19 16:54+0000\n"
"Last-Translator: shvala <simon.hvala@hotmail.com>\n"
-"Language-Team: Slovenian (http://www.transifex.com/projects/p/mpc-hc/language/sl/)\n"
+"Language-Team: Slovenian (http://www.transifex.com/mpc-hc/mpc-hc/language/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -473,10 +473,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Samodejno naloži zvoÄne datoteke"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Uporabi vgrajeni izrisovalnik za podnapise"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Nadzor"
@@ -677,9 +673,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "PrepreÄi minimiziranje predvajalnika v celozaslon. naćinu na neprivzetem zaslonu"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Uporabi znaÄilnosti opravilne vrstice Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1170,8 +1166,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Podnapisi *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1186,8 +1182,8 @@ msgid "Rotation"
msgstr "Zasuk"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Zunanji filtri (kot je VSFilter) lahko prikažejo podnapise na vseh izrisovalnikih."
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1205,6 +1201,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Dovoli dostop samo iz localhost"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "OmogoÄi predogled"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "IzpiÅ¡i informacije za razhroÅ¡Äevanje"
@@ -1653,6 +1653,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Privzeto"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Naprava"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "IzkljuÄni naÄin"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Dovoli pretoÄnost "
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Možnosti"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "OmogoÄi stereo križanje (za sluÅ¡alke)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Odreži:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Nivo:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Opomba"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Za minimalno avdio popaÄenje je priporoÄljivo imeti glasnost okoli 85% pri predvajanju glasnih vsebin, ki so izgubno kodirane."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG kvaliteta:"
@@ -1669,9 +1713,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "PoroÄilo o prenehanju delovanja"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Se opraviÄujemo, izgleda da je se MPC-HC ravnokar sesul. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "PoÅ¡ljite poroÄilo o hroÅ¡Äu in nam pomagajte najti in odpraviti težavo."
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "Se opraviÄujemo, MPC-HC je oÄitno ravnokar prenehal delovati. :(\n\nV pomoÄ diagnosticiranju in odpravi težave bo poslano poroÄilo o hroÅ¡Äu, ki mu lahko pripiÅ¡ete dodatne informacije, Äe želite."
+msgid "Optional information"
+msgstr "Neobvezne informacije"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1685,7 +1737,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "Opis težave (uporabljaj samo angleÅ¡Äino):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "V redu"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Ponovni zagon MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Zapusti MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.sl.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.sl.menus.po
index f73824a23..6d97cfdbf 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.sl.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.sl.menus.po
@@ -8,10 +8,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
"PO-Revision-Date: 2015-05-31 14:58+0000\n"
"Last-Translator: shvala <simon.hvala@hotmail.com>\n"
-"Language-Team: Slovenian (http://www.transifex.com/projects/p/mpc-hc/language/sl/)\n"
+"Language-Team: Slovenian (http://www.transifex.com/mpc-hc/mpc-hc/language/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.sl.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.sl.strings.po
index 23ed7350a..71da3bf29 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.sl.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.sl.strings.po
@@ -8,10 +8,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-31 14:58+0000\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-09-19 17:07+0000\n"
"Last-Translator: shvala <simon.hvala@hotmail.com>\n"
-"Language-Team: Slovenian (http://www.transifex.com/projects/p/mpc-hc/language/sl/)\n"
+"Language-Team: Slovenian (http://www.transifex.com/mpc-hc/mpc-hc/language/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -327,12 +327,12 @@ msgid "On/Off"
msgstr "Vklj./Izklj."
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Od FPS"
+msgid "From (FPS)"
+msgstr "Od (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "Do FPS"
+msgid "To (FPS)"
+msgstr "Do (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -466,6 +466,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Predvajanje::SenÄilniki"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Viri"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Razno"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Predvajanje::Zajem"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Predvajanje::Nastavitve Sync izrisovalnika"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Predvajanje::Celozaslonsko"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Interni filtri: ZvoÄni predvajalnik"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "ZvoÄni preklopnik"
@@ -558,30 +586,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Podnapisi::Podat. zbirka"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Viri"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Razno"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Predvajanje::Zajem"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Predvajanje::Nastavitve Sync izrisovalnika"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Predvajanje::Celozaslonsko"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Podrobnosti"
@@ -674,22 +678,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Video površina bo dodeljena kot redna izvenzaslonska površina."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC zvoÄni izvajalnik je okvarjen, ne uporabljaj."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync izrisovalnik"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Prijava hroÅ¡Äa"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC se je ravnokar sesul, vendar je bila ta razliÄica prevedena brez informacij o razhroÅ¡Äevanju.\nÄŒe želite prijaviti ta hroÅ¡Ä, bi morali najprej poizkusiti uradno razliÄico.\n\nŽelite obiskati spletno stran s prenosi?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Veljavna enostavna površina izven zaslona"
@@ -742,9 +734,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "NiÄ (nestisnjeno)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Interni zvoÄni predvajalnik"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1394,6 +1386,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "Po predvajanju: Zapri"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC je naletel na težavo med inicializacijo. Z vaÅ¡o pomoÄjo bomo mogoÄe lahko uredili zadevo.\n\nŽelite poslati poroÄilo o težavi?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Vnesi pozitivno vrednost Äe zvok prehiteva, negativno vrednost Äe zamuja."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Predogled je trenutno izkljuÄen. Lahko ga vkljuÄite v nastavitvah MPC-HC."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Ta možnost se lahko uporabi za predogled predstavnostnih datotek z oddaljene lokacije. Uporabite ga samo v ustrezno zavarovanemu lokalnemu omrežju."
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr ""
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Odpri napravo"
@@ -1678,6 +1690,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: Prikaži ime datoteke"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Predvajaj DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Predvajaj BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: Prikaži statistiko izrisovalnika "
@@ -1959,20 +1979,20 @@ msgid "Options"
msgstr "Možnosti"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Naslednji zvoÄni zapis"
+msgid "Next Audio Track"
+msgstr "Naslednji zvoÄni posnetek"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Prejš. zvok"
+msgid "Prev Audio Track"
+msgstr "PrejÅ¡nji zvoÄni posnetek"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Naslednji podnapisi"
+msgid "Next Subtitle Track"
+msgstr "Naslednji podnapis"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Prejš. podnapis"
+msgid "Prev Subtitle Track"
+msgstr "Prejšnji podnapis"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1982,22 +2002,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Ponovno naloži podnapise"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Naslednji zvok (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Prejšnji zvok (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Naslednji podnapis (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Prejšnji podnapis (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Naslednji zorni kot (DVD)"
@@ -2007,19 +2011,19 @@ msgid "Prev Angle (DVD)"
msgstr "Prejšnji zorni kot (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Naslednji zvok (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Naslednji zvoÄni posnetek (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Prejšnji zvok (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "PrejÅ¡nji zvoÄni posnetek (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
+msgid "Next Subtitle Track (DVD)"
msgstr "Naslednji podnapis (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
+msgid "Prev Subtitle Track (DVD)"
msgstr "Prejšnji podnapis (DVD)"
msgctxt "IDS_MPLAYERC_97"
@@ -2386,14 +2390,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Trenutno"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC se je nepriÄakovano zaustavil. Za pomoÄ pri razreÅ¡itvi tega problema prosimo poÅ¡ljite datoteko \"%s\" naÅ¡emu sledilniku hroÅ¡Äev.\n\nŽelite zdaj odpreti imenik z minidump datoteko in obiskati sledilnik hroÅ¡Äev?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Neuspela izdelava dump datoteke v \"%s\" (napaka %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Izberi imenik"
@@ -2567,8 +2563,8 @@ msgid "Volume boost Max"
msgstr "OjaÄitev glasnosti maks"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Uporaba: mpc-hc.exe \"pot\" [stikala]\n\n\"pot\"\t\tGlavna datoteka ali imenik, ki naj bo naložen\n\t\t(nadomestni znaki dovoljeni)\n/dub \"ime\"\tNaloži dodatno zvoÄno datoteko\n/dubdelay \"ime\"\tNaloži dodatno zvoÄno datoteko zamaknjeno za XXms\n\t\t(Äe datoteka vsebuje \"...DELAY XXms...\")\n/d3dfs\t\tZaÄni izrisovanje v D3D celozaslonskem naÄinu\n/sub \"ime\"\tNaloži dodatno datoteko podnapisov\n/filter \"ime filtra\"\tNaloži DirectShow filtre iz dinamiÄno povezane\n\t\tknjižnice (nadomestni znaki dovoljeni)\n/dvd\t\tZaženi v dvd naÄinu, \"pot\" pomeni dvd\n\t\timenik (opcija)\n/dvdpos T#C\tZaÄni predvajanje z naslovom T, poglavje C\n/dvdpos T#hh:mm\tZaÄni predvajanje z naslovom T, pozicijo hh:mm:ss\n/cd\t\tNaloži vse zapise zvoÄnega CDja ali (s)vcd,\n\t\t\"ime datoteke\" pomeni pot pogona (opcija)\n/open\t\tOdpri datoteko, ne zaÄni samodejno predvajati\n/play\t\tZaÄni predvajati datoteko takoj ko se predvajalnik\n\t\tzažene\n/close\t\tZapri prevajalnik po predvajanju (deluje samo ko\n\t\tje uporabljen skupaj s /play)\n/shutdown\tZaustavi operacijski sistem po predvajanju\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tZaÄni v celozaslonskem naÄinu\n/minimized\tZaÄni minimirano\n/new\t\tUporabi novo inaÄico predvajalnika\n/add\t\tDodaj \"pot\" v seznam predvajanja, lahko je\n\t\tkombinirano z /open in /play\n/randomize\tRandomize the playlist\n/regvid\t\tUstvari povezave za video datoteke\n/regaud\t\tUstvari povezave za zvoÄne datoteke\n/regpl\t\tUstvari povezave za datoteke seznama predvajanja\n/regall\t\tustvari povezave za vse podprte vrste datotek\n/unregall\t\tOdstrani vse povezave datotek\n/start ms\t\tZaÄni predvajanje pri \"ms\" (= milisekund)\n/startpos hh:mm:ss\tZaÄni predvajanje pri poziciji hh:mm:ss\n/fixedsize w,h\tNastavi okno fiksne velikosti\n/monitor N\tZaÄni predvajalnik na zaslonu N, N se zaÄne z 1\n/audiorenderer N\tZaÄni uporabljati zvoÄni predvajalnik N, N se zaÄne z 1\n\t\t(glej nastavitve \"Izhod\")\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tPonastavi privzete nastavitve\n/help /h /?\tPrikaži pomoÄ glede stikal ukazne vrstice\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Uporaba: mpc-hc.exe \"pot\" [stikala]\n\n\"pot\"\t\tGlavna datoteka ali imenik, ki naj bo naložen\n\t\t(nadomestni znaki dovoljeni)\n/dub \"ime\"\tNaloži dodatno zvoÄno datoteko\n/dubdelay \"ime\"\tNaloži dodatno zvoÄno datoteko zamaknjeno za XXms\n\t\t(Äe datoteka vsebuje \"...DELAY XXms...\")\n/d3dfs\t\tZaÄni izrisovanje v D3D celozaslonskem naÄinu\n/sub \"ime\"\tNaloži dodatno datoteko podnapisov\n/filter \"ime filtra\"\tNaloži DirectShow filtre iz dinamiÄno povezane\n\t\tknjižnice (nadomestni znaki dovoljeni)\n/dvd\t\tZaženi v dvd naÄinu, \"pot\" pomeni dvd\n\t\timenik (opcija)\n/dvdpos T#C\tZaÄni predvajanje z naslovom T, poglavje C\n/dvdpos T#hh:mm\tZaÄni predvajanje z naslovom T, pozicijo hh:mm:ss\n/cd\t\tNaloži vse zapise zvoÄnega CDja ali (s)vcd,\n\t\t\"ime datoteke\" pomeni pot pogona (opcija)\n/open\t\tOdpri datoteko, ne zaÄni samodejno predvajati\n/play\t\tZaÄni predvajati datoteko takoj ko se predvajalnik\n\t\tzažene\n/close\t\tZapri prevajalnik po predvajanju (deluje samo ko\n\t\tje uporabljen skupaj s /play)\n/shutdown\tZaustavi operacijski sistem po predvajanju\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tZaÄni v celozaslonskem naÄinu\n/minimized\tZaÄni minimirano\n/new\t\tUporabi novo inaÄico predvajalnika\n/add\t\tDodaj \"pot\" v seznam predvajanja, lahko je\n\t\tkombinirano z /open in /play\n/randomize\tRandomize the playlist\n/regvid\t\tUstvari povezave za video datoteke\n/regaud\t\tUstvari povezave za zvoÄne datoteke\n/regpl\t\tUstvari povezave za datoteke seznama predvajanja\n/regall\t\tustvari povezave za vse podprte vrste datotek\n/unregall\t\tOdstrani vse povezave datotek\n/start ms\t\tZaÄni predvajanje pri \"ms\" (= milisekund)\n/startpos hh:mm:ss\tZaÄni predvajanje pri poziciji hh:mm:ss\n/fixedsize w,h\tNastavi okno fiksne velikosti\n/monitor N\tZaÄni predvajalnik na zaslonu N, N se zaÄne z 1\n/audiorenderer N\tZaÄni uporabljati zvoÄni predvajalnik N, N se zaÄne z 1\n\t\t(glej nastavitve \"Izhod\")\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tPonastavi privzete nastavitve\n/help /h /?\tPrikaži pomoÄ glede stikal ukazne vrstice\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3042,18 +3038,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Razmerje stranic"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Uporabi WASAPI (ponovno zaženi predvajanje)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Utišaj pri hitrem pomikanju naprej"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "ZvoÄna naprava:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: Vklj."
@@ -3610,3 +3594,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Nastavitve"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.sr.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.sr.dialogs.po
index 2546abe55..7f03891a9 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.sr.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.sr.dialogs.po
@@ -474,10 +474,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "ÐутоматÑки учитај аудио-датотеке"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "КориÑти уграђени рендерер титлова"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Управљање"
@@ -678,9 +674,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Спречи умањивање плејера у режиму целог екрана на Ñекундарном монитору"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Функције траке задатака из ОС Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1171,8 +1167,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Титлови *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1187,8 +1183,8 @@ msgid "Rotation"
msgstr "Ротација"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Спољни филтери (попут VSFilter-а) могу да прикажу титлове на Ñвим рендерерима."
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1206,6 +1202,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Дозволи приÑтуп Ñамо Ñа локалног хоÑта"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr ""
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Одштампај извод"
@@ -1654,6 +1654,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Подразумевано"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "Квалитет JPEG-а:"
@@ -1670,8 +1714,16 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr ""
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
+msgid "Optional information"
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
@@ -1686,7 +1738,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr ""
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
msgstr ""
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.sr.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.sr.strings.po
index 43064ed57..3d9750f3f 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.sr.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.sr.strings.po
@@ -327,11 +327,11 @@ msgid "On/Off"
msgstr "Укључено/иÑкључено"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr "Од (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr "До (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -466,6 +466,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Репродукција::Модули за Ñенчење"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "РеÑурÑи"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Разно"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Репродукција::Снимање"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Репродукција::Sync Renderer"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Репродукција::Цео екран"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Промена аудио-запиÑа"
@@ -558,30 +586,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Титлови::База"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "РеÑурÑи"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Разно"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Репродукција::Снимање"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Репродукција::Sync Renderer"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Репродукција::Цео екран"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Подаци"
@@ -674,22 +678,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Површина за видео ће бити додељена као обична површина ван екрана."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Audio Renderer је неиÑправан. Ðе кориÑтите га."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC – пријављивање грешке"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "Дошло је до пада MPC-HC-а. Ова верзија је издата без модула за отклањање грешака.\nÐко желите да пријавите ову грешку, инÑталирајте званичну верзију.\n\nЖелите ли да поÑетите Ñтраницу за преузимање програма?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Обична површина ван екрана"
@@ -742,9 +734,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (без компримирања)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr ""
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1394,6 +1386,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr ""
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr ""
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Отвори уређај"
@@ -1678,6 +1690,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr ""
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr ""
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr ""
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr ""
@@ -1959,20 +1979,20 @@ msgid "Options"
msgstr "Опције"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Следећи аудио"
+msgid "Next Audio Track"
+msgstr ""
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Претходни аудио"
+msgid "Prev Audio Track"
+msgstr ""
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Следећи титл"
+msgid "Next Subtitle Track"
+msgstr ""
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Претходни титл"
+msgid "Prev Subtitle Track"
+msgstr ""
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1982,22 +2002,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Поново учитај титл"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Следећи аудио (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Претходни аудио (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Следећи титл (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Претходни титл (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Следећи угао (DVD)"
@@ -2007,20 +2011,20 @@ msgid "Prev Angle (DVD)"
msgstr "Претходни угао (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Следећи аудио (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Претходни аудио (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Следећи титл (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Претходни титл (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2386,14 +2390,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "тренутни"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "Дошло је до неочекиваног пада. Да биÑте нам помогли да решимо проблем, пошаљите датотеку „%s“ на наш ÑиÑтем за праћење грешака.\n\nЖелите ли да отворите фаÑциклу која Ñадржи датотеку Ñа иÑпиÑом Ñтања меморије и поÑетите Ñајт?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Ðе могу да креирам датотеку иÑпиÑа Ñтања „%s“ (грешка %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Избор фаÑцикле"
@@ -2567,8 +2563,8 @@ msgid "Volume boost Max"
msgstr "МакÑимално појачање звука"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Употреба: mpc-hc.exe „pathname“ [прекидачи]\n\n„pathname“\tДатотека или фаÑцикла за отварање (дозвољени Ñу џокери; цртица (-) означава Ñтандардни улаз)\n/dub „dubname“\tУчитајте додатну аудио-датотеку\n/dubdelay „file“\tУчитајте додатну аудио-датотеку уз померање за XX Ð¼Ñ (ако датотека Ñадржи „…DELAY XXms…“)\n/d3dfs\t\tПокрени рендеровање у D3D режиму целог екрана\n/sub „subname“\tУчитајте додатну датотеку титла\n/filter „filtername“\tУчитајте филтере DirectShow-а из DLL-а (дозвољени Ñу џокери)\n/dvd\t\tПокрените у режиму DVD-а; „pathname“ означава фаÑциклу DVD-а (необавезно)\n/dvdpos T#C\tРепродукујте од наÑлова Ð, поглавља П\n/dvdpos T#hh:mm\tРепродукујте од наÑлова Ð, позиције hh:mm:ss\n/cd\t\tУчитајте Ñве запиÑе аудио CD-а или (S)VCD-а;\n\t\t„pathname“ означава путању погонÑке јединице (необавезно)\n/device\t\tОтворите подразумевани видео-уређај\n/open\t\tОтворите датотеку без покретања репродукције\n/play\t\tЗапочните репродукцију одмах по покретању плејера\n/close\t\tЗатворите плејер након репродукције (ради Ñамо у комбинацији Ñа „/play“)\n/shutdown\tИÑкључите рачунар након репродукције\n/standby\t\tПребаците рачунар у Ñтање приправноÑти након репродукције\n/hibernate\tПребаците рачунар у хибернацију након репродукције\n/logoff\t\tОдјавите Ñе након репродукције\n/lock\t\tЗакључајте рачунар након репродукције\n/monitoroff\tИÑкључите монитор након репродукције\n/playnext\t\tОтворите Ñледећу датотеку у фаÑцикли након репродукције\n/fullscreen\tЗапочните у режиму целог екрана\n/minimized\tЗапочните у режиму приказа у прозору\n/new\t\tОтворите нови примерак плејера\n/add\t\tДодајте „pathname“ у плеј-лиÑту; може да Ñе комбинује Ñа „/open“ и „/play“\n/randomize\tRandomize the playlist\n/regvid\t\tПовежите програм Ñа датотекама видео-запиÑа\n/regaud\t\tПовежите програм Ñа датотекама аудио-запиÑа\n/regpl\t\tПовежите програм Ñа датотекама плеј-лиÑти\n/regall\t\tПовежите програм Ñа Ñвим подржаним форматима\n/unregall\t\tУклоните повезаноÑÑ‚ Ñа Ñвим датотекама\n/start ms\t\tЗапочните репродукцију у милиÑекундама\n/startpos hh:mm:ss\tЗапочните репродукцију на позицији hh:mm:ss\n/fixedsize w,h\tПоÑтавите фикÑну величину прозора\n/monitor N\tПокрените плејер на монитору N, где је N – 1 па навише\n/audiorenderer N\tКориÑтите аудио-рендерер N, где је N – 1 па навише\n\t\t(погледајте излазне опције)\n/shaderpreset „Pr“\tКориÑтите шаблон „Pr“ модула за Ñенчење\n/pns „name“\tИзаберите име шаблона за размеру и положај кадра\n/iconsassoc\tПоново повежите иконе Ñа форматима\n/nofocus\t\tОтворите MPC-HC у позадини\n/webport N\tПокрените веб-Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÑ˜Ñ Ð½Ð° наведеном порту\n/debug\t\tПрикажите извод модула за отклањање грешака у OSD-у\n/nocrashreporter\tDisable the crash reporter\n/slave „hWnd“\tКориÑтите MPC-HC као роба\n/reset\t\tУÑпоÑтавите почетне вредноÑти\n/help /h /?\tПрикажите помоћ у вези Ñа прекидачима командне линије\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Употреба: mpc-hc.exe „pathname“ [прекидачи]\n\n„pathname“\tДатотека или фаÑцикла за отварање (дозвољени Ñу џокери; цртица (-) означава Ñтандардни улаз)\n/dub „dubname“\tУчитајте додатну аудио-датотеку\n/dubdelay „file“\tУчитајте додатну аудио-датотеку уз померање за XX Ð¼Ñ (ако датотека Ñадржи „…DELAY XXms…“)\n/d3dfs\t\tПокрени рендеровање у D3D режиму целог екрана\n/sub „subname“\tУчитајте додатну датотеку титла\n/filter „filtername“\tУчитајте филтере DirectShow-а из DLL-а (дозвољени Ñу џокери)\n/dvd\t\tПокрените у режиму DVD-а; „pathname“ означава фаÑциклу DVD-а (необавезно)\n/dvdpos T#C\tРепродукујте од наÑлова Ð, поглавља П\n/dvdpos T#hh:mm\tРепродукујте од наÑлова Ð, позиције hh:mm:ss\n/cd\t\tУчитајте Ñве запиÑе аудио CD-а или (S)VCD-а;\n\t\t„pathname“ означава путању погонÑке јединице (необавезно)\n/device\t\tОтворите подразумевани видео-уређај\n/open\t\tОтворите датотеку без покретања репродукције\n/play\t\tЗапочните репродукцију одмах по покретању плејера\n/close\t\tЗатворите плејер након репродукције (ради Ñамо у комбинацији Ñа „/play“)\n/shutdown\tИÑкључите рачунар након репродукције\n/standby\t\tПребаците рачунар у Ñтање приправноÑти након репродукције\n/hibernate\tПребаците рачунар у хибернацију након репродукције\n/logoff\t\tОдјавите Ñе након репродукције\n/lock\t\tЗакључајте рачунар након репродукције\n/monitoroff\tИÑкључите монитор након репродукције\n/playnext\t\tОтворите Ñледећу датотеку у фаÑцикли након репродукције\n/fullscreen\tЗапочните у режиму целог екрана\n/minimized\tЗапочните у режиму приказа у прозору\n/new\t\tОтворите нови примерак плејера\n/add\t\tДодајте „pathname“ у плеј-лиÑту; може да Ñе комбинује Ñа „/open“ и „/play“\n/randomize\tRandomize the playlist\n/regvid\t\tПовежите програм Ñа датотекама видео-запиÑа\n/regaud\t\tПовежите програм Ñа датотекама аудио-запиÑа\n/regpl\t\tПовежите програм Ñа датотекама плеј-лиÑти\n/regall\t\tПовежите програм Ñа Ñвим подржаним форматима\n/unregall\t\tУклоните повезаноÑÑ‚ Ñа Ñвим датотекама\n/start ms\t\tЗапочните репродукцију у милиÑекундама\n/startpos hh:mm:ss\tЗапочните репродукцију на позицији hh:mm:ss\n/fixedsize w,h\tПоÑтавите фикÑну величину прозора\n/monitor N\tПокрените плејер на монитору N, где је N – 1 па навише\n/audiorenderer N\tКориÑтите аудио-рендерер N, где је N – 1 па навише\n\t\t(погледајте излазне опције)\n/shaderpreset „Pr“\tКориÑтите шаблон „Pr“ модула за Ñенчење\n/pns „name“\tИзаберите име шаблона за размеру и положај кадра\n/iconsassoc\tПоново повежите иконе Ñа форматима\n/nofocus\t\tОтворите MPC-HC у позадини\n/webport N\tПокрените веб-Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÑ˜Ñ Ð½Ð° наведеном порту\n/debug\t\tПрикажите извод модула за отклањање грешака у OSD-у\n/nocrashreporter\tDisable the crash reporter\n/slave „hWnd“\tКориÑтите MPC-HC као роба\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tУÑпоÑтавите почетне вредноÑти\n/help /h /?\tПрикажите помоћ у вези Ñа прекидачима командне линије\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3042,18 +3038,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "ÐžÐ´Ð½Ð¾Ñ ÑˆÐ¸Ñ€Ð¸Ð½Ð°/виÑина"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "WASAPI (потребна поновна репродукција)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "ИÑкључи звук при премотавању"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Уређај за звук:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "Вертикална Ñинхронизација: укључено"
@@ -3610,3 +3594,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "ПоÑтавке"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.strings.pot b/src/mpc-hc/mpcresources/PO/mpc-hc.strings.pot
index c63729a3e..9d9de567d 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.strings.pot
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.strings.pot
@@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -322,11 +322,11 @@ msgid "On/Off"
msgstr ""
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr ""
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr ""
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -461,6 +461,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr ""
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr ""
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr ""
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr ""
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr ""
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr ""
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr ""
@@ -553,30 +581,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr ""
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr ""
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr ""
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr ""
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr ""
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr ""
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr ""
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr ""
@@ -669,22 +673,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr ""
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr ""
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr ""
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr ""
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr ""
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr ""
@@ -737,8 +729,8 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr ""
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
msgstr ""
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
@@ -1389,6 +1381,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr ""
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr ""
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr ""
@@ -1673,6 +1685,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr ""
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr ""
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr ""
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr ""
@@ -1954,19 +1974,19 @@ msgid "Options"
msgstr ""
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
+msgid "Next Audio Track"
msgstr ""
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
+msgid "Prev Audio Track"
msgstr ""
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
+msgid "Next Subtitle Track"
msgstr ""
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
+msgid "Prev Subtitle Track"
msgstr ""
msgctxt "IDS_MPLAYERC_85"
@@ -1977,22 +1997,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr ""
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr ""
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr ""
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr ""
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr ""
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr ""
@@ -2002,19 +2006,19 @@ msgid "Prev Angle (DVD)"
msgstr ""
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
+msgid "Next Audio Track (DVD)"
msgstr ""
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
+msgid "Prev Audio Track (DVD)"
msgstr ""
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
+msgid "Next Subtitle Track (DVD)"
msgstr ""
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
+msgid "Prev Subtitle Track (DVD)"
msgstr ""
msgctxt "IDS_MPLAYERC_97"
@@ -2381,14 +2385,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr ""
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr ""
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr ""
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr ""
@@ -2562,7 +2558,7 @@ msgid "Volume boost Max"
msgstr ""
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
msgstr ""
msgctxt "IDS_UNKNOWN_SWITCH"
@@ -3037,18 +3033,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr ""
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr ""
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr ""
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr ""
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr ""
@@ -3605,3 +3589,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr ""
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.sv.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.sv.dialogs.po
index 7d42cbbe5..9e4f3cfbd 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.sv.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.sv.dialogs.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-03-16 18:09:30+0000\n"
-"PO-Revision-Date: 2015-03-26 23:10+0000\n"
+"POT-Creation-Date: 2015-09-08 19:47:48+0000\n"
+"PO-Revision-Date: 2015-09-24 22:13+0000\n"
"Last-Translator: JellyFrog\n"
-"Language-Team: Swedish (http://www.transifex.com/projects/p/mpc-hc/language/sv/)\n"
+"Language-Team: Swedish (http://www.transifex.com/mpc-hc/mpc-hc/language/sv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -473,10 +473,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Läs in ljudfiler automatiskt"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Använd den inbyggda undertextrenderaren"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Kontroll"
@@ -677,9 +673,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Förhindra att minimera spelaren när helskärmsläget är aktiverat på en sekundär bildskärm"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Använd Windows 7 aktivitetsfältsfunktioner"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Använd utökade aktivitetsfältsfunktioner"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1151,7 +1147,7 @@ msgstr "D3D Helskärm"
msgctxt "IDD_PPAGEOUTPUT_IDC_DSVMR9ALTERNATIVEVSYNC"
msgid "Alternative VSync"
-msgstr "Alternativ vertikalsynk"
+msgstr "Alternativ VSync"
msgctxt "IDD_PPAGEOUTPUT_IDC_DSVMR9LOADMIXER"
msgid "VMR-9 Mixer Mode"
@@ -1170,8 +1166,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Undertexter*"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1186,8 +1182,8 @@ msgid "Rotation"
msgstr "Rotation"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Externa filter (så som VSFilter) kan visa undertexter oavsett renderare."
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1205,6 +1201,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Tillåt endast åtkomst från localhost"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Aktivera förhandsvisning"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Skriv ut felsökningsinformation"
@@ -1239,7 +1239,7 @@ msgstr "Ladda ner && Öppna"
msgctxt "IDD_SUBTITLEDL_DLG_IDC_CHECK1"
msgid "Replace currently loaded subtitles"
-msgstr "Ersätt nuvarande inladdade undertexter"
+msgstr "Ersätt aktuell inladdade undertexter"
msgctxt "IDD_FILEPROPRES_IDC_BUTTON1"
msgid "Save As..."
@@ -1427,7 +1427,7 @@ msgstr "kolumner"
msgctxt "IDD_PPAGESYNC_IDC_SYNCNEAREST"
msgid "Present at nearest VSync"
-msgstr "Visa vid närmaste vertikalsynk"
+msgstr "Visa vid närmaste VSync"
msgctxt "IDD_PPAGESYNC_IDC_STATIC5"
msgid "Target sync offset:"
@@ -1653,6 +1653,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Återställ"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Enhet"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Exklusivt läge"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Tillåt bitstreaming"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Inställningar"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Aktivera \"stereo crossfeed\" (för hörlurar)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Brytgräns:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Nivå:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Notera"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "För att minska ljudförvrängning är det rekommenderat att hålla volymen runt 85% när man spelar högt \"lossy-encoded\" material."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG-kvalitet:"
@@ -1667,25 +1711,37 @@ msgstr "OK"
msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
-msgstr ""
+msgstr "Skicka Felrapport"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Ursäkta, det verkar som MPC-HC just kraschade :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "Skicka en felrapport för att hjälpa oss felsöka och åtgärda problemet."
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr ""
+msgid "Optional information"
+msgstr "Valfri information"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
-msgstr ""
+msgstr "E-post:"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC3"
msgid "Your email address is optional and will only be used if the developers need to contact you for more information."
-msgstr ""
+msgstr "Din e-post är ej obligatorisk och kommer endast att användas om utvecklarna behöver kontakta dig för mer information."
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
-msgstr ""
+msgstr "Problembeskrivning (use English only):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "Starta om MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "Avsluta MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.sv.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.sv.menus.po
index 6f5b30730..1a05e9935 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.sv.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.sv.menus.po
@@ -1,5 +1,5 @@
# MPC-HC - Strings extracted from menus
-# Copyright (C) 2002 - 2015 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# kasper93, 2013
@@ -8,10 +8,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-10-25 18:58:24+0000\n"
-"PO-Revision-Date: 2015-03-26 23:21+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-06-04 16:05+0000\n"
"Last-Translator: JellyFrog\n"
-"Language-Team: Swedish (http://www.transifex.com/projects/p/mpc-hc/language/sv/)\n"
+"Language-Team: Swedish (http://www.transifex.com/mpc-hc/mpc-hc/language/sv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -200,15 +200,15 @@ msgstr "&Tearingtest"
msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
msgid "&Display Statistics"
-msgstr ""
+msgstr "&Visa Statistik"
msgctxt "ID_VIEW_OSD_DISPLAY_TIME"
msgid "Display Current T&ime"
-msgstr ""
+msgstr "Visa Aktuell tid"
msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
msgid "Show &File Name"
-msgstr ""
+msgstr "Visa &Filnamn"
msgctxt "POPUP"
msgid "&Output Range"
@@ -324,27 +324,27 @@ msgstr "&Absolut kolorimetri"
msgctxt "POPUP"
msgid "&VSync"
-msgstr "&Vertikalsynk"
+msgstr "&VSync"
msgctxt "ID_VIEW_VSYNC"
msgid "&VSync"
-msgstr "&Vertikalsynk"
+msgstr "&VSync"
msgctxt "ID_VIEW_VSYNCACCURATE"
msgid "&Accurate VSync"
-msgstr "&Exakt vertikalsynk"
+msgstr "&Exakt VSync"
msgctxt "ID_VIEW_ALTERNATIVEVSYNC"
msgid "A&lternative VSync"
-msgstr "&Alternativ vertikalsynk"
+msgstr "&Alternativ VSync"
msgctxt "ID_VIEW_VSYNCOFFSET_DECREASE"
msgid "&Decrease VSync Offset"
-msgstr "&Minska vertikalsynkförskjutningen"
+msgstr "&Minska VSync-förskjutningen"
msgctxt "ID_VIEW_VSYNCOFFSET_INCREASE"
msgid "&Increase VSync Offset"
-msgstr "&Öka vertikalsynkförskjutningen"
+msgstr "&Öka VSync-förskjutningen"
msgctxt "POPUP"
msgid "&GPU Control"
@@ -352,7 +352,7 @@ msgstr "GPU-kontroll"
msgctxt "ID_VIEW_FLUSHGPU_BEFOREVSYNC"
msgid "Flush GPU &before VSync"
-msgstr "Töm GPU &före vertikalsynk"
+msgstr "Töm GPU &före VSync"
msgctxt "ID_VIEW_FLUSHGPU_AFTERPRESENT"
msgid "Flush GPU &after Present"
@@ -476,19 +476,19 @@ msgstr "Minska Höjd"
msgctxt "ID_PANSCAN_MOVERIGHT"
msgid "Move &Right"
-msgstr "Flytta Höger"
+msgstr "Flytta till &Höger"
msgctxt "ID_PANSCAN_MOVELEFT"
msgid "Move &Left"
-msgstr "Flytta Vänster"
+msgstr "Flytta till &Vänster"
msgctxt "ID_PANSCAN_MOVEUP"
msgid "Move &Up"
-msgstr "Flytta Upp"
+msgstr "Flytta &upp"
msgctxt "ID_PANSCAN_MOVEDOWN"
msgid "Move &Down"
-msgstr "Flytta Ner"
+msgstr "Flytta &ned"
msgctxt "ID_PANSCAN_CENTER"
msgid "Cen&ter"
@@ -560,15 +560,15 @@ msgstr "S&haders"
msgctxt "ID_AUDIOS"
msgid "&Audio Track"
-msgstr ""
+msgstr "&Ljudspår"
msgctxt "ID_SUBTITLES"
msgid "Su&btitle Track"
-msgstr ""
+msgstr "&Undertextspår"
msgctxt "ID_VIDEO_STREAMS"
msgid "&Video Track"
-msgstr ""
+msgstr "&Videospår"
msgctxt "POPUP"
msgid "&Volume"
@@ -592,7 +592,7 @@ msgstr "Efter &Uppspelning"
msgctxt "ID_AFTERPLAYBACK_DONOTHING"
msgid "Do no&thing"
-msgstr ""
+msgstr "Gör Ingen&ting"
msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
msgid "Play &next file in the folder"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.sv.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.sv.strings.po
index e996727f7..aa6f3fa49 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.sv.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.sv.strings.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-03-26 22:39:02+0000\n"
-"PO-Revision-Date: 2015-03-27 09:08+0000\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-09-24 22:04+0000\n"
"Last-Translator: JellyFrog\n"
-"Language-Team: Swedish (http://www.transifex.com/projects/p/mpc-hc/language/sv/)\n"
+"Language-Team: Swedish (http://www.transifex.com/mpc-hc/mpc-hc/language/sv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -326,12 +326,12 @@ msgid "On/Off"
msgstr "Aktiverat"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Från FPS"
+msgid "From (FPS)"
+msgstr "Från (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "Till FPS"
+msgid "To (FPS)"
+msgstr "Till (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -465,6 +465,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Uppspelning::Shaders"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Resurser"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Diverse"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Uppspelning::Spela in"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Uppspelning::Sync Renderer-inställningar"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Uppspelning::Helskärm"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Interna Filter::Ljudrenderare"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Ljudomkopplare"
@@ -475,7 +503,7 @@ msgstr "Ny version av ikonbiblioteket"
msgctxt "IDS_ICONS_REASSOC_DLG_INSTR"
msgid "Do you want to reassociate the icons?"
-msgstr "Vill du återansluta ikonerna?"
+msgstr "Vill du omassociera ikonerna?"
msgctxt "IDS_ICONS_REASSOC_DLG_CONTENT"
msgid "This will fix the icons being incorrectly displayed after an update of the icon library.\nThe file associations will not be modified, only the corresponding icons will be refreshed."
@@ -557,30 +585,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Undertexter::Databas"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Resurser"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Diverse"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Uppspelning::Spela in"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Uppspelning::Sync Renderer-inställningar"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Uppspelning::Helskärm"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Detaljer"
@@ -673,22 +677,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Videoytan kommer att allokeras som en vanlig offscreen yta."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Audio Renderer är trasig, använd ej!"
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Rapportera en bugg"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC krashade precis, men den här versionen har kompilerats utan felsökningsverktyg.\nOm du vill rapportera det här programfelet bör du först och främst försöka med en officiell version.\n\nVill du besöka nedladdningsplatsen nu?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Vanlig offscreen plan yta"
@@ -741,9 +733,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (okomprimerat)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Audio Renderer"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Intern Ljudrenderare"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -815,7 +807,7 @@ msgstr "Reducerar \"tearing\" men förhindrar att verktygsfältet kan visas."
msgctxt "IDC_DSVMR9ALTERNATIVEVSYNC"
msgid "Reduces tearing by bypassing the default VSync built into D3D."
-msgstr "Reducerar \"tearing\" genom att kringgå standard-vertikalsynken inbyggt i D3D."
+msgstr "Reducerar \"tearing\" genom att kringgå standard-VSync inbyggt i D3D."
msgctxt "IDS_SRC_VTS"
msgid "Open VTS_xx_0.ifo to load VTS_xx_x.vob files in one piece"
@@ -839,7 +831,7 @@ msgstr "Växla Navigeringsfält"
msgctxt "IDS_AG_VSYNCACCURATE"
msgid "Accurate VSync"
-msgstr "Noggrann vertikalsynk"
+msgstr "Noggrann VSync"
msgctxt "IDC_CHECK_RELATIVETO"
msgid "If the rendering target is left undefined, it will be inherited from the default style."
@@ -911,7 +903,7 @@ msgstr "&Original"
msgctxt "IDS_SUBRESYNC_CURRENT"
msgid "&Current"
-msgstr "&Nuvarande"
+msgstr "&Aktuell"
msgctxt "IDS_SUBRESYNC_EDIT"
msgid "&Edit"
@@ -1303,7 +1295,7 @@ msgstr "Spela nästa fil i mappen"
msgctxt "IDS_AFTER_PLAYBACK_REWIND"
msgid "Rewind current file"
-msgstr "Spola tillbaka nuvarande fil"
+msgstr "Spola tillbaka aktuell fil"
msgctxt "IDS_AFTER_PLAYBACK_CLOSE"
msgid "Close"
@@ -1343,11 +1335,11 @@ msgstr "Kolla"
msgctxt "IDS_NAVIGATION_MOVE_UP"
msgid "Move Up"
-msgstr "Flytta Upp"
+msgstr "Flytta upp"
msgctxt "IDS_NAVIGATION_MOVE_DOWN"
msgid "Move Down"
-msgstr "Flytta Ner"
+msgstr "Flytta ned"
msgctxt "IDS_NAVIGATION_SORT"
msgid "Sort by LCN"
@@ -1375,22 +1367,42 @@ msgstr "Bildformat %d:%d"
msgctxt "IDS_PPAGEADVANCED_LOGGER"
msgid "Enables logging to file (requires restart)"
-msgstr ""
+msgstr "Aktiverar loggning till fil (omstart krävs)"
msgctxt "IDS_TIMER_REMAINING_TIME"
msgid "Remaining time"
-msgstr ""
+msgstr "Återstående tid"
msgctxt "IDS_TIMER_HIGH_PRECISION"
msgid "High precision"
-msgstr ""
+msgstr "Hög precision"
msgctxt "IDS_AFTERPLAYBACK_REWIND"
msgid "After Playback: Rewind current file"
-msgstr ""
+msgstr "Efter Uppspelning: Spola tillbaka aktuell fil"
msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
+msgstr "Efter Uppspelning: Stäng"
+
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC stötte på ett fel vid uppstart. Med din hjälp kan vi kanske lösa det.\n\nVill du rapportera felet?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Ange ett positivt värde om ljudet är för tidigt, negativt värde om det är för sent."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Förhandsvisningen är avstängd, du kan aktivera den i MPC-HCs inställningar"
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
msgstr ""
msgctxt "IDS_AG_OPEN_DEVICE"
@@ -1547,7 +1559,7 @@ msgstr "Miniatyrerna har sparats"
msgctxt "IDS_MENU_VIDEO_STREAM"
msgid "&Video Track"
-msgstr ""
+msgstr "&Videospår"
msgctxt "IDS_MENU_VIDEO_ANGLE"
msgid "Video Ang&le"
@@ -1559,7 +1571,7 @@ msgstr "Återställ inställningar"
msgctxt "IDS_RESET_SETTINGS_WARNING"
msgid "Are you sure you want to restore MPC-HC to its default settings?\nBe warned that ALL your current settings will be lost!"
-msgstr "Är du säker att du du vill återställa alla MPC-HC:s inställningar till standardvärden?\nVarning: ALLA nuvarande inställningar kommer försvinna! "
+msgstr "Är du säker att du du vill återställa alla MPC-HC:s inställningar till standardvärden?\nVarning: ALLA aktuella inställningar kommer försvinna! "
msgctxt "IDS_RESET_SETTINGS_MUTEX"
msgid "Please close all instances of MPC-HC so that the default settings can be restored."
@@ -1675,15 +1687,23 @@ msgstr "Hoppa till början"
msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
-msgstr ""
+msgstr "OSD: Visa Filnamn"
+
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "Spela DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "Spela Blu-ray"
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
-msgstr ""
+msgstr "OSD: Visa Renderar-statistik"
msgctxt "IDS_OSD_RESET_RENDERER_STATS"
msgid "OSD: Reset Renderer Statistics"
-msgstr ""
+msgstr "OSD: Återställ Renderar-statistik"
msgctxt "IDD_PPAGESUBMISC"
msgid "Subtitles::Misc"
@@ -1843,19 +1863,19 @@ msgstr "PnS Center"
msgctxt "IDS_AG_PNS_LEFT"
msgid "PnS Left"
-msgstr "PnS Vänster"
+msgstr "PnS vänster"
msgctxt "IDS_AG_PNS_RIGHT"
msgid "PnS Right"
-msgstr "PnS Höger"
+msgstr "PnS höger"
msgctxt "IDS_AG_PNS_UP"
msgid "PnS Up"
-msgstr "PnS Upp"
+msgstr "PnS upp"
msgctxt "IDS_AG_PNS_DOWN"
msgid "PnS Down"
-msgstr "PnS Ner"
+msgstr "PnS ned"
msgctxt "IDS_AG_PNS_UPLEFT"
msgid "PnS Up/Left"
@@ -1958,19 +1978,19 @@ msgid "Options"
msgstr "Inställningar"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Nästa Ljud"
+msgid "Next Audio Track"
+msgstr "Nästa Ljudspår"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Föregående Ljud"
+msgid "Prev Audio Track"
+msgstr "Föregående Ljudspår"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
+msgid "Next Subtitle Track"
msgstr "Nästa Undertext"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
+msgid "Prev Subtitle Track"
msgstr "Föregående Undertext"
msgctxt "IDS_MPLAYERC_85"
@@ -1981,22 +2001,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Ladda om Undertext"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Nästa Ljud (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Föregående Ljud (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Nästa Undertext (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Föregående Undertext (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Nästa Vinkel (DVD)"
@@ -2006,19 +2010,19 @@ msgid "Prev Angle (DVD)"
msgstr "Föregående Vinkel (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Nästa Ljud (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Nästa Ljudspår (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Föregående Ljud (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Föregående Ljudspår (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
+msgid "Next Subtitle Track (DVD)"
msgstr "Nästa Undertext (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
+msgid "Prev Subtitle Track (DVD)"
msgstr "Föregående Undertext (DVD)"
msgctxt "IDS_MPLAYERC_97"
@@ -2027,7 +2031,7 @@ msgstr "PÃ¥/Av Undertext (DVD)"
msgctxt "IDS_OSD_DISPLAY_CURRENT_TIME"
msgid "OSD: Display Current Time"
-msgstr ""
+msgstr "OSD: Visa Aktuell tid"
msgctxt "IDS_PPAGEWEBSERVER_0"
msgid "Select the directory"
@@ -2383,15 +2387,7 @@ msgstr "Balans: %s"
msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
-msgstr "Nuvarande"
-
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC avbröts oväntat. För att hjälpa oss fixa problemet, var vänlig skicka denna fil, \"%s\", till våran felrapportsdatabas.\n\nVill du öppna mappen med minidump-filen och besöka felrapportsdatabasen nu?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Misslyckade att skapa dump-fil i \"%s\" (fel %u)"
+msgstr "Aktuell"
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
@@ -2479,7 +2475,7 @@ msgstr "Kunde inte öppna någon enhet"
msgctxt "IDS_AG_SOUND"
msgid "Sound"
-msgstr "LJud"
+msgstr "Ljud"
msgctxt "IDS_MAINFRM_114"
msgid "%s was not found, please insert media containing this file."
@@ -2566,8 +2562,8 @@ msgid "Volume boost Max"
msgstr "Volym-boost Max"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Användning: mpc-hc.exe \"sökväg\" [växlar]\n\n\"sökväg\"\t\tHuvudfilen eller katalog för att ladda (jokertecken\n\t\tstödjs, \"-\" denotes standard input)\n/dub \"fil\"\t\tLägg till ytterligare en ljudfil\n/dubdelay \"fil\"\tLägg till ytterligare en ljudfil skiftat med XXms (om\n\t\tfilen innehåller \"...DELAY XXms...\")\n/d3dfs\t\tBörja rendering i D3D helskärmsläge\n/sub \"fil\"\t\tLägg till ytterligare en undertextfil\n/filter \"filternamn\"\tLadda DirectShow filter från ett dynamiskt länk\n\t\tbibliotek (jokertecken stödjs)\n/dvd\t\tKör i DVD-läge, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStarta uppspelningen vid titel T, kapitel C\n/dvdpos T#hh:mm\tStarta uppspelningen vid titel T, tid hh:mm:ss\n/cd\t\tLadda alla spår av en ljud-CD eller (S)VCD,\n\t\t\"pathname\" innebär att enhetssökväg (valfritt)\n/device\t\tOpen the default video device\n/open\t\tÖppna filen, börja inte spela automatiskt\n/play\t\tBörja spela filen så fort spelaren\n\t\tstartar\n/close\t\tStäng spelaren efter uppspelningen (fungerar bara när\n\t\tanvänds med /play)\n/shutdown\tStänga av operativsystemet efter uppspelningen\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStarta i fullskärmsläge\n/minimerad\tStarta i minimerat läge\n/ny\t\tAnvänd en ny instans av spelaren\n/add\t\tLägg till \"pathname\" i spelningslista, kan kombineras\n\t\tmed /open och /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tSkapa filassociationer för ljudfiler\n/regpl\t\tSkapa filassociationer för spelningslista\n/regall\t\tSkapa filassociationer för för alla filtyper som stödjs\n/unregall\t\tTa bort alla filassociationer \n/start ms\t\tBörja spela vid \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tBörja spela vid tid hh:mm:ss\n/fixedsize w,h\tSätt fast fönsterstorlek\n/monitor N\tStart på bildskärm N, där N börjar från 1\n/ljudrenderare N\tBörja användaljudrenderare N, där N börjar från 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tÅterställ standardinställningar\n/help /h /?\tVisa hjälp för kommandoradsväxlar\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Användning: mpc-hc.exe \"sökväg\" [växlar]\n\n\"sökväg\"\t\tHuvudfilen eller katalog för att ladda (jokertecken\n\t\tstödjs, \"-\" denotes standard input)\n/dub \"fil\"\t\tLägg till ytterligare en ljudfil\n/dubdelay \"fil\"\tLägg till ytterligare en ljudfil skiftat med XXms (om\n\t\tfilen innehåller \"...DELAY XXms...\")\n/d3dfs\t\tBörja rendering i D3D helskärmsläge\n/sub \"fil\"\t\tLägg till ytterligare en undertextfil\n/filter \"filternamn\"\tLadda DirectShow filter från ett dynamiskt länk\n\t\tbibliotek (jokertecken stödjs)\n/dvd\t\tKör i DVD-läge, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStarta uppspelningen vid titel T, kapitel C\n/dvdpos T#hh:mm\tStarta uppspelningen vid titel T, tid hh:mm:ss\n/cd\t\tLadda alla spår av en ljud-CD eller (S)VCD,\n\t\t\"pathname\" innebär att enhetssökväg (valfritt)\n/device\t\tOpen the default video device\n/open\t\tÖppna filen, börja inte spela automatiskt\n/play\t\tBörja spela filen så fort spelaren\n\t\tstartar\n/close\t\tStäng spelaren efter uppspelningen (fungerar bara när\n\t\tanvänds med /play)\n/shutdown\tStänga av operativsystemet efter uppspelningen\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStarta i fullskärmsläge\n/minimerad\tStarta i minimerat läge\n/ny\t\tAnvänd en ny instans av spelaren\n/add\t\tLägg till \"pathname\" i spelningslista, kan kombineras\n\t\tmed /open och /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tSkapa filassociationer för ljudfiler\n/regpl\t\tSkapa filassociationer för spelningslista\n/regall\t\tSkapa filassociationer för för alla filtyper som stödjs\n/unregall\t\tTa bort alla filassociationer \n/start ms\t\tBörja spela vid \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tBörja spela vid tid hh:mm:ss\n/fixedsize w,h\tSätt fast fönsterstorlek\n/monitor N\tStart på bildskärm N, där N börjar från 1\n/ljudrenderare N\tBörja användaljudrenderare N, där N börjar från 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tÅterställ standardinställningar\n/help /h /?\tVisa hjälp för kommandoradsväxlar\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -2923,7 +2919,7 @@ msgstr "Annat ljudformat"
msgctxt "IDS_MFMT_AC3"
msgid "AC-3"
-msgstr ""
+msgstr "AC-3"
msgctxt "IDS_MFMT_AIFF"
msgid "AIFF"
@@ -2951,7 +2947,7 @@ msgstr "Opus Audio Codec"
msgctxt "IDS_MFMT_DTS"
msgid "DTS/DTS-HD"
-msgstr ""
+msgstr "DTS/DTS-HD"
msgctxt "IDS_MFMT_AMR"
msgid "AMR"
@@ -3041,18 +3037,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Bildförhållande"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Använd WASAPI (starta om uppspelning)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Dämpa ljud vid snabbspolning"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Ljudenhet:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: PÃ¥"
@@ -3095,11 +3079,11 @@ msgstr "Visa vid närmaste VSync: Av"
msgctxt "IDS_OSD_RS_COLOR_MANAGEMENT_ON"
msgid "Color Management: On"
-msgstr "&Färghantering: På"
+msgstr "Färghantering: På"
msgctxt "IDS_OSD_RS_COLOR_MANAGEMENT_OFF"
msgid "Color Management: Off"
-msgstr "&Färghantering: Av"
+msgstr "Färghantering: Av"
msgctxt "IDS_OSD_RS_INPUT_TYPE_AUTO"
msgid "Input Type: Auto-Detect"
@@ -3283,7 +3267,7 @@ msgstr "\nDu använder redan den senaste stabila versionen."
msgctxt "IDS_USING_NEWER_VERSION"
msgid "Your current version is v%s.\n\nThe latest stable version is v%s."
-msgstr "Din nuvarande version är v%s.\n\nDen senaste stabila versionen är v%s."
+msgstr "Din aktuella version är v%s.\n\nDen senaste stabila versionen är v%s."
msgctxt "IDS_NEW_UPDATE_AVAILABLE"
msgid "MPC-HC v%s is now available. You are using v%s.\n\nDo you want to visit MPC-HC's website to download it?"
@@ -3527,7 +3511,7 @@ msgstr "Efter Uppspelning: Spela nästa fil i mappen"
msgctxt "IDS_AFTERPLAYBACK_DONOTHING"
msgid "After Playback: Do nothing"
-msgstr "Efter Uppspelning: Gör inget"
+msgstr "Efter Uppspelning: Gör ingenting"
msgctxt "IDS_OSD_BRIGHTNESS"
msgid "Brightness: %s"
@@ -3603,9 +3587,17 @@ msgstr "Associera enbart med ljudformat"
msgctxt "IDC_CLEAR_ALL_ASSOCIATIONS"
msgid "Clear all associations"
-msgstr "Rensa alla associeringar"
+msgstr "Radera alla associeringar"
msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Inställningar"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.dialogs.po
index 5dd84a716..f2faae8e7 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.dialogs.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-19 11:29+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-21 11:14+0000\n"
"Last-Translator: M. Somsak\n"
-"Language-Team: Thai (Thailand) (http://www.transifex.com/projects/p/mpc-hc/language/th_TH/)\n"
+"Language-Team: Thai (Thailand) (http://www.transifex.com/mpc-hc/mpc-hc/language/th_TH/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -473,10 +473,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "โหลดไฟล์เสียงอัตโนมัติ"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "ใช้ตัวà¹à¸›à¸¥à¸œà¸¥à¸¨à¸±à¸žà¸—์บรรยายที่มีมาให้"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "à¸à¸²à¸£à¸„วบคุม"
@@ -677,9 +673,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "ป้องà¸à¸±à¸™à¹„ม่ให้เครื่องเล่นย่อลง เมื่ออยู่ในà¹à¸šà¸šà¹€à¸•à¹‡à¸¡à¸ˆà¸­à¸šà¸™à¸ˆà¸­à¸ à¸²à¸žà¸—ี่ไม่ใช่จอตั้งต้น"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "ใช้คุณลัà¸à¸©à¸“ะ Windows 7 Taskbar"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "ใช้คุณลัà¸à¸©à¸“ะ taskbar ที่ดียิ่งขึ้น"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1170,8 +1166,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "ศัพท์บรรยาย *"
+msgid "Subtitles"
+msgstr "ศัพท์บรรยาย"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1186,8 +1182,8 @@ msgid "Rotation"
msgstr "à¸à¸²à¸£à¸«à¸¡à¸¸à¸™"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* ตัวà¸à¸£à¸­à¸‡à¸ à¸²à¸¢à¸™à¸­à¸ (เช่น VSFilter) สามารถà¹à¸ªà¸”งศัพท์บรรยายได้บนทุà¸à¸•à¸±à¸§à¹à¸›à¸¥à¸œà¸¥"
+msgid "Subtitle Renderer"
+msgstr "ตัวà¹à¸›à¸¥à¸œà¸¥à¸¨à¸±à¸žà¸—์บรรยาย"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1205,6 +1201,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "อนุà¸à¸²à¸•à¸à¸²à¸£à¹€à¸‚้าถึงจาà¸à¹‚ฮสต์ถิ่นเท่านั้น"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "ใช้งานà¸à¸²à¸£à¹à¸ªà¸”งตัวอย่าง"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "พิมพ์ข้อมูลดีบัà¸"
@@ -1653,6 +1653,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "ค่าตั้งต้น"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "อุปà¸à¸£à¸“์"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "โหมดเอà¸à¸ªà¸´à¸—ธิ์"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "อนุà¸à¸²à¸•à¸šà¸´à¸•à¸ªà¸•à¸£à¸µà¸¡"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "ตัวเลือà¸"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "ใช้งานà¸à¸²à¸£à¸„รอสฟีดสเตอริโอ (สำหรับหูฟัง)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "หมายเหตุ"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "เพื่อลดเสียงผิดเพี้ยนให้น้อยที่สุด ขอà¹à¸™à¸°à¸™à¸³à¹ƒà¸«à¹‰à¸„งความดังเครื่องเล่นไว้ที่ประมาณ 85% เมื่อเล่นเนื้อหาที่เข้ารหัสà¹à¸šà¸šà¹€à¸¥à¸²à¸”์ลอสซี่"
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "คุณภาพ JPEG:"
@@ -1669,9 +1713,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "รายงานข้อบà¸à¸žà¸£à¹ˆà¸­à¸‡"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "ขออภัยด้วย ดูเหมือน MPC-HC เพิ่งบà¸à¸žà¸£à¹ˆà¸­à¸‡à¹ƒà¸™à¸à¸²à¸£à¸—ำงาน :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "ส่งรายงานบั๊ภเพื่อช่วยเราวินิฉัยà¹à¸¥à¸°à¹à¸à¹‰à¸›à¸±à¸à¸«à¸²"
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "ขออภัย, ดูเหมือนว่า MPC-HC เà¸à¸´à¸”ข้อบà¸à¸žà¸£à¹ˆà¸­à¸‡ :(\n\nà¸à¸²à¸£à¸²à¸¢à¸‡à¸²à¸™à¸šà¸±à¹Šà¸à¸ˆà¸°à¸–ูà¸à¸ªà¹ˆà¸‡à¹€à¸žà¸·à¹ˆà¸­à¸Šà¹ˆà¸§à¸¢à¹€à¸£à¸²à¸§à¸´à¸™à¸´à¸ˆà¸‰à¸±à¸¢à¹à¸¥à¸°à¹à¸à¹‰à¹„ขปัà¸à¸«à¸² คุณสามารถให้ข้อมูลเพิ่มเติมได้ถ้าคุณต้องà¸à¸²à¸£"
+msgid "Optional information"
+msgstr "ข้อมูลตัวเลือà¸"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1685,7 +1737,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "บรรยายปัà¸à¸«à¸² (ใช้ภาษาอังà¸à¸¤à¸©à¹€à¸—่านั้น):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "ตà¸à¸¥à¸‡"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "เริ่ม MPC-HC ใหม่"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "ออà¸à¸ˆà¸²à¸ MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.menus.po
index 95d500816..09eb14634 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.menus.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-15 16:53:42+0000\n"
-"PO-Revision-Date: 2015-05-15 18:10+0000\n"
-"Last-Translator: Underground78\n"
-"Language-Team: Thai (Thailand) (http://www.transifex.com/projects/p/mpc-hc/language/th_TH/)\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-06-03 10:50+0000\n"
+"Last-Translator: M. Somsak\n"
+"Language-Team: Thai (Thailand) (http://www.transifex.com/mpc-hc/mpc-hc/language/th_TH/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -199,15 +199,15 @@ msgstr "ทดสอบà¸à¸²à¸£à¸‰à¸µà¸à¸‚อง&ภาพ"
msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
msgid "&Display Statistics"
-msgstr ""
+msgstr "à¹à¸ªà¸”ง&สถิติ"
msgctxt "ID_VIEW_OSD_DISPLAY_TIME"
msgid "Display Current T&ime"
-msgstr ""
+msgstr "à¹à¸ªà¸”งเ&วลาปัจจุบัน"
msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
msgid "Show &File Name"
-msgstr ""
+msgstr "à¹à¸ªà¸”ง&ชื่อไฟล์"
msgctxt "POPUP"
msgid "&Output Range"
@@ -591,7 +591,7 @@ msgstr "หลังเล่น&จบ"
msgctxt "ID_AFTERPLAYBACK_DONOTHING"
msgid "Do no&thing"
-msgstr ""
+msgstr "ไ&ม่ต้องทำอะไร"
msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
msgid "Play &next file in the folder"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.strings.po
index 4380b1cd4..d8347cc8e 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.th_TH.strings.po
@@ -8,10 +8,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-15 16:53:42+0000\n"
-"PO-Revision-Date: 2015-05-19 11:29+0000\n"
-"Last-Translator: M. Somsak\n"
-"Language-Team: Thai (Thailand) (http://www.transifex.com/projects/p/mpc-hc/language/th_TH/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Thai (Thailand) (http://www.transifex.com/mpc-hc/mpc-hc/language/th_TH/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -327,12 +327,12 @@ msgid "On/Off"
msgstr "เปิด/ปิด"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "จาภFPS"
+msgid "From (FPS)"
+msgstr "จาภ(FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "สู่ FPS"
+msgid "To (FPS)"
+msgstr "สู่ (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -466,6 +466,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "à¸à¸²à¸£à¹€à¸¥à¹ˆà¸™::เฉดเดอร์"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "ทรัพยาà¸à¸£"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "เบ็ดเตล็ด"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "ข้อมูลสื่อ"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "à¸à¸²à¸£à¹€à¸¥à¹ˆà¸™::จับข้อมูล"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "à¸à¸²à¸£à¹€à¸¥à¹ˆà¸™::à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าตัวà¹à¸›à¸¥à¸œà¸¥à¸‹à¸´à¸‡à¸„์"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "à¸à¸²à¸£à¹€à¸¥à¹ˆà¸™::เต็มจอ"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "ตัวà¸à¸£à¸­à¸‡à¸ à¸²à¸¢à¹ƒà¸™::ตัวà¹à¸›à¸¥à¸œà¸¥à¹€à¸ªà¸µà¸¢à¸‡"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "ตัวสลับเสียง"
@@ -558,30 +586,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "ศัพท์บรรยาย::à¸à¸²à¸™à¸‚้อมูล"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "ทรัพยาà¸à¸£"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "เบ็ดเตล็ด"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "ข้อมูลสื่อ"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "à¸à¸²à¸£à¹€à¸¥à¹ˆà¸™::จับข้อมูล"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "à¸à¸²à¸£à¹€à¸¥à¹ˆà¸™::à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าตัวà¹à¸›à¸¥à¸œà¸¥à¸‹à¸´à¸‡à¸„์"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "à¸à¸²à¸£à¹€à¸¥à¹ˆà¸™::เต็มจอ"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "รายละเอียด"
@@ -674,22 +678,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "ผิวหน้าวิดีโอจะถูà¸à¸ˆà¸±à¸”สรรเป็นผิวหน้า offscreen ปà¸à¸•à¸´"
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "ตัวà¹à¸›à¸¥à¸œà¸¥à¹€à¸ªà¸µà¸¢à¸‡ MPC เสียหาย, จงอย่าใช้"
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "ตัวà¹à¸›à¸¥à¸œà¸¥à¸‹à¸´à¸‡à¸„์"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - à¸à¸³à¸¥à¸±à¸‡à¸£à¸²à¸¢à¸‡à¸²à¸™à¸šà¸±à¸"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC เพิ่งเà¸à¸´à¸”ความบà¸à¸žà¸£à¹ˆà¸­à¸‡ à¹à¸•à¹ˆà¸£à¸¸à¹ˆà¸™à¸™à¸µà¹‰à¸–ูà¸à¸„อมไพล์โดยปราศจาà¸à¸‚้อมูลดีบัà¸\nถ้าคุณต้องà¸à¸²à¸£à¸£à¸²à¸¢à¸‡à¸²à¸™à¸›à¸±à¸à¸«à¸²à¸™à¸µà¹‰, คุณควรลองใช้รุ่นที่เป็นทางà¸à¸²à¸£à¸à¹ˆà¸­à¸™\n\nคุณต้องà¸à¸²à¸£à¹„ปที่หน้าดาวน์โหลดตอนนี้หรือไม่?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "ผิวหน้าธรรมดา offscreen ปà¸à¸•à¸´"
@@ -742,9 +734,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (ไม่มีบีบอัด)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "ตัวà¹à¸›à¸¥à¸œà¸¥à¹€à¸ªà¸µà¸¢à¸‡ MPC-HC"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "ตัวà¹à¸›à¸¥à¸œà¸¥à¹€à¸ªà¸µà¸¢à¸‡à¸ à¸²à¸¢à¹ƒà¸™"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1388,11 +1380,31 @@ msgstr "à¹à¸¡à¹ˆà¸™à¸¢à¸³à¸ªà¸¹à¸‡"
msgctxt "IDS_AFTERPLAYBACK_REWIND"
msgid "After Playback: Rewind current file"
-msgstr ""
+msgstr "หลังจาà¸à¹€à¸¥à¹ˆà¸™à¹€à¸ªà¸£à¹‡à¸ˆ: วนซ้ำไฟล์ปัจจุบัน"
msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
-msgstr ""
+msgstr "หลังจาà¸à¹€à¸¥à¹ˆà¸™à¹€à¸ªà¸£à¹‡à¸ˆ: ปิด"
+
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC ได้ประสบปัà¸à¸«à¸²à¸£à¸°à¸«à¸§à¹ˆà¸²à¸‡à¸à¸²à¸£à¹€à¸£à¸´à¹ˆà¸¡à¸•à¹‰à¸™ เราอาจà¹à¸à¹‰à¸›à¸±à¸à¸«à¸²à¸™à¸µà¹‰à¹„ด้ถ้าคุณช่วยเรา\n\nคุณต้องà¸à¸²à¸£à¸£à¸²à¸¢à¸‡à¸²à¸™à¸«à¸£à¸·à¸­à¹„ม่?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "ใส่ค่าบวà¸à¸–้าเสียงเริ่มเร็วà¸à¸§à¹ˆà¸²à¸ à¸²à¸ž หรือใส่ค่าติดลบหาà¸à¹€à¸ªà¸µà¸¢à¸‡à¸Šà¹‰à¸²à¸à¸§à¹ˆà¸²à¸ à¸²à¸ž"
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "à¸à¸²à¸£à¹à¸ªà¸”งตัวอย่างไม่ถูà¸à¹€à¸›à¸´à¸”ใช้งานในปัจจุบัน คุณสามารถเปิดใช้งานในตัวเลือà¸à¸‚อง MPC-HC"
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "ตัวเลือà¸à¸™à¸µà¹‰à¸ªà¸²à¸¡à¸²à¸£à¸–ใช้เพื่อà¹à¸ªà¸”งตัวอย่างไฟล์สื่อจาà¸à¸—ี่ตั้งระยะไà¸à¸¥ ใช้เฉพาะเมื่อเครือข่ายส่วนตัวได้รัà¸à¸©à¸²à¸„วามปลอดภัยไว้อย่างเหมาะสม\n\nคุณต้องà¸à¸²à¸£à¹€à¸›à¸´à¸”ใช้งานตัวเลือà¸à¸™à¸µà¹‰à¹ˆà¸«à¸£à¸·à¸­à¹„ม่?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "ตัวà¹à¸›à¸¥à¸œà¸¥à¸¨à¸±à¸žà¸—์บรรยายภายใน"
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
@@ -1678,6 +1690,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: à¹à¸ªà¸”งชื่อไฟล์"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "เล่นดีวีดี"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "เล่นบลูเรย์"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: à¹à¸ªà¸”งสถิติของตัวà¹à¸›à¸¥à¸œà¸¥"
@@ -1959,20 +1979,20 @@ msgid "Options"
msgstr "ตัวเลือà¸"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "เสียงถัดไป"
+msgid "Next Audio Track"
+msgstr "à¹à¸—ร็คเสียงถัดไป"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "เสียงà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²"
+msgid "Prev Audio Track"
+msgstr "à¹à¸—ร็คเสียงà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "ศัพท์บรรยายถัดไป"
+msgid "Next Subtitle Track"
+msgstr "à¹à¸—ร็คศัพท์บรรยายถัดไป"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "ศัพท์บรรยายà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²"
+msgid "Prev Subtitle Track"
+msgstr "à¹à¸—ร็คศัพท์บรรยายà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1982,22 +2002,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "โหลดศัพท์บรรยายอีà¸à¸„รั้ง"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "เสียงถัดไป (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "เสียงà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸² (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "ศัพท์บรรยายถัดไป (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "ศัพท์บรรยายà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸² (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "มุมà¸à¸¥à¹‰à¸­à¸‡à¸–ัดไป (DVD)"
@@ -2007,20 +2011,20 @@ msgid "Prev Angle (DVD)"
msgstr "มุมà¸à¸¥à¹‰à¸­à¸‡à¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸² (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "เสียงถัดไป (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "à¹à¸—ร็คเสียงถัดไป (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "เสียงà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸² (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "à¹à¸—ร็คเสียงà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸² (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "ศัพท์บรรยายถัดไป (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "à¹à¸—ร็คศัพท์บรรยายถัดไป (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "ศัพท์บรรยายà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸² (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "à¹à¸—ร็คศัพท์บรรยายà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸² (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2386,14 +2390,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "ปัจจุบัน"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC ได้จบà¸à¸²à¸£à¸—ำงานอย่างไม่พึงปรารถนา เพื่อช่วยเราà¹à¸à¹‰à¹„ขปัà¸à¸«à¸²à¸™à¸µà¹‰ โปรดส่งไฟล์นี้ \"%s\" ไปยังตัวติดตามบัà¸à¸‚องเรา\n\nคุณต้องà¸à¸²à¸£à¹€à¸›à¸´à¸”โฟลเดอร์ที่เà¸à¹‡à¸šà¹„ฟล์ minidump ไว้ à¹à¸¥à¸°à¹„ปยังตัวติดตามบัภเดี๋ยวนี้หรือไม่?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "ล้มเหลวในà¸à¸²à¸£à¸ªà¸£à¹‰à¸²à¸‡à¹„ฟล์ดัมพ์สู่ \"%s\" (ผิดพลาด %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "เลือà¸à¹€à¸ªà¹‰à¸™à¸—าง"
@@ -2567,8 +2563,8 @@ msgid "Volume boost Max"
msgstr "เสริมความดัง สูงสุด"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "วิธีใช้: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "วิธีใช้: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3042,18 +3038,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "อัตราส่วนภาพ"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "ใช้ WASAPI (เริ่มเล่นอีà¸à¸„รั้ง)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "เงียบเสียงเมื่อเดินหน้าอย่างเร็ว"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "อุปà¸à¸£à¸“์เสียง:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: เปิด"
@@ -3610,3 +3594,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่า"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.tr.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.tr.dialogs.po
index a15d7fae2..1b40bf55c 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.tr.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.tr.dialogs.po
@@ -9,10 +9,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-03-16 18:09:30+0000\n"
-"PO-Revision-Date: 2015-04-18 17:43+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-11-02 19:07+0000\n"
"Last-Translator: Sinan H.\n"
-"Language-Team: Turkish (http://www.transifex.com/projects/p/mpc-hc/language/tr/)\n"
+"Language-Team: Turkish (http://www.transifex.com/mpc-hc/mpc-hc/language/tr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -201,7 +201,7 @@ msgstr "Bu program ücretsiz olup Genel Kamusal GNU Lisansı altında sunulmakta
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "English translation made by MPC-HC Team"
-msgstr "bosluk - Dr. Sinan Hunerel tarafından Türkçeleştirilmiştir"
+msgstr "bosluk - Sinan Hunerel tarafından Türkçeleştirilmiştir"
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "Build information"
@@ -475,10 +475,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Ses dosyalarını otomatik olarak yükle"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Dahili alt yazı işleyicisini kullan"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Kontrol"
@@ -679,9 +675,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Varsayılan monitör dışında tam ekranda iken küçültmeye izin verme"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Windows 7 görev çubuğu özelliklerini kullan"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "Geliştirilmiş görev çubuğu özelliklerini kullan"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1073,7 +1069,7 @@ msgstr "Alfa kanallarını bağla"
msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
msgid "If you would like to use the stand-alone versions of these filters or another replacement, disable them here."
-msgstr "Eğer bu süzgeçlerin başka sürümlerini veya aynı işte görevli başka yapımlarını kullanmak istiyorsanız, onları buradan kapatınız."
+msgstr "Süzgeçlerin başka sürümlerini veya aynı işte görevli başka yapımlarını kullanmak istiyorsanız, aşağıdaki bölümden kapatıp açma işlemlerini gerçekleştirebilirsiniz."
msgctxt "IDD_PPAGEINTERNALFILTERS_IDC_STATIC"
msgid "Source Filters"
@@ -1172,8 +1168,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Alt yazılar*"
+msgid "Subtitles"
+msgstr "Alt Yazılar"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1188,8 +1184,8 @@ msgid "Rotation"
msgstr "Döndürme"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* VSFilter gibi harici süzgeçler alt yazıları tüm çeviricilerde gösterebilirler."
+msgid "Subtitle Renderer"
+msgstr "Alt Yazı İşleyicisi"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1207,6 +1203,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Sadece yerel aÄŸ eriÅŸimine izin ver"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Önizlemeyi aç"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Hata bilgisini yazdır"
@@ -1655,6 +1655,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Varsayılan"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "Aygıt"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "Ayrıcalıklı kip"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Bit akışına izin ver"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "Ayarlar"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "Stereo çapraz beslemeyi etkinleştir (kulaklık için)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "Kesme:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "Seviye:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "Not"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "Ses bozunumunu en aza indirmek için, kayıplı bir kodlama ile oluşturulan içeriği yürütürken sesi %85 seviyesinde tutmanız önerilir."
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG kalitesi:"
@@ -1669,25 +1713,37 @@ msgstr "Tamam"
msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
-msgstr ""
+msgstr "Çökme bildirimcisi"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "Özür dileriz, MPC-HC bilinmeyen bir hatadan dolayı kapatıldı. :("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "İnceleme ve sorun giderilmesi için hata raporunu gönderin."
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr ""
+msgid "Optional information"
+msgstr "İsteğe bağlı bilgi"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
-msgstr ""
+msgstr "E-posta:"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC3"
msgid "Your email address is optional and will only be used if the developers need to contact you for more information."
-msgstr ""
+msgstr "E-posta adresiniz isteğe bağlı olarak alınmaktadır ve sadece program geliştiricilerinin konuyla ilgili olarak size ulaşabilmeleri için istenmektedir."
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
-msgstr ""
+msgstr "Sorun açıklaması (lütfen sadece İngilizce bildiriniz):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "MPC-HC 'yi yeniden baÅŸlat"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "MPC-HC 'yi Kapat"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.tr.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.tr.menus.po
index d14683ac3..e8dbb4334 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.tr.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.tr.menus.po
@@ -10,10 +10,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-04-06 16:31:55+0000\n"
-"PO-Revision-Date: 2015-04-18 17:45+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-06-02 20:41+0000\n"
"Last-Translator: Sinan H.\n"
-"Language-Team: Turkish (http://www.transifex.com/projects/p/mpc-hc/language/tr/)\n"
+"Language-Team: Turkish (http://www.transifex.com/mpc-hc/mpc-hc/language/tr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -202,15 +202,15 @@ msgstr "&Kopukluk Testi"
msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
msgid "&Display Statistics"
-msgstr ""
+msgstr "&İstatistikleri Göster"
msgctxt "ID_VIEW_OSD_DISPLAY_TIME"
msgid "Display Current T&ime"
-msgstr ""
+msgstr "Geçerli Süreyi G&öster"
msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
msgid "Show &File Name"
-msgstr ""
+msgstr "Dosya &Adını Göster"
msgctxt "POPUP"
msgid "&Output Range"
@@ -594,7 +594,7 @@ msgstr "Oy&natmadan Sonra"
msgctxt "ID_AFTERPLAYBACK_DONOTHING"
msgid "Do no&thing"
-msgstr ""
+msgstr "Bir &Ä°ÅŸlem Yapma"
msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
msgid "Play &next file in the folder"
@@ -606,7 +606,7 @@ msgstr "E&kranı kapat"
msgctxt "ID_AFTERPLAYBACK_EXIT"
msgid "&Exit"
-msgstr "&Kapat "
+msgstr "&Çıkış"
msgctxt "ID_AFTERPLAYBACK_STANDBY"
msgid "&Stand By"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.tr.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.tr.strings.po
index c0c7ece01..c446d66b0 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.tr.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.tr.strings.po
@@ -3,15 +3,16 @@
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# Burak <burakgarci@gmail.com>, 2013
+# Mesut AktaÅŸ <mesuthan_42@hotmail.com>, 2015
# Sinan H., 2014-2015
# Sinan H., 2013
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-04-15 21:44:52+0000\n"
-"PO-Revision-Date: 2015-04-18 17:45+0000\n"
-"Last-Translator: Sinan H.\n"
-"Language-Team: Turkish (http://www.transifex.com/projects/p/mpc-hc/language/tr/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Turkish (http://www.transifex.com/mpc-hc/mpc-hc/language/tr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -327,12 +328,12 @@ msgid "On/Off"
msgstr "Aç/Kapat"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Ä°lk FPS"
+msgid "From (FPS)"
+msgstr "Ä°lk (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "Son FPS"
+msgid "To (FPS)"
+msgstr "Son (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -466,6 +467,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Yürütme::Tonlamalar"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Kaynaklar"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Çeşitli"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "Medya Bilgisi"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Yürütme::Yakalama"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Yürütme::Eşzamanlılık Ayarları"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Yürütme::Tam Ekran"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "Dahili Süzgeçler::Ses İşleyicisi"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Ses DeÄŸiÅŸtiricisi"
@@ -558,30 +587,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Alt Yazılar::Veritabanı"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Kaynaklar"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Çeşitli"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "Medya Bilgisi"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Yürütme::Yakalama"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Yürütme::Eşzamanlılık Ayarları"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Yürütme::Tam Ekran"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Ayrıntılar"
@@ -674,22 +679,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Video yüzeyi düzgün bir dış ekran olarak ayrılacaktır."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Ses İşleyicisi bozuk durumda, lütfen kullanmayınız."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "EÅŸzamanlama Ä°ÅŸleyicisi"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Bir hata oluÅŸtu"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC beklenmeyen bir şekilde sonlandırıldı, ancak bu sürümde hata ayrıştırma desteği bulunmamaktadır.\nBu hatayı bildirmek istiyorsanız, resmi bir sürüm kullanmanız gerekmekte.\n\ninnDirme sayfamızı ziyaret etmek ister misiniz?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Düzgün dış ekran yüzeyi"
@@ -742,9 +735,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Boş (sıkıştırılmadan)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC Ses Ä°ÅŸleyicisi"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "Dahili Ses Ä°ÅŸleyicisi"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1316,7 +1309,7 @@ msgstr "Çıkış"
msgctxt "IDS_AFTER_PLAYBACK_MONITOROFF"
msgid "Turn off the monitor"
-msgstr "Ekranı Kapat"
+msgstr "Ekranı kapat"
msgctxt "IDS_IMAGE_JPEG_QUALITY"
msgid "JPEG Image"
@@ -1388,11 +1381,31 @@ msgstr "Yüksek hassasiyet"
msgctxt "IDS_AFTERPLAYBACK_REWIND"
msgid "After Playback: Rewind current file"
-msgstr ""
+msgstr "Oynatmadan Sonra: Geçerli dosyayı tekrar oynat"
msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
-msgstr ""
+msgstr "Oynatmadan Sonra: Kapat"
+
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC açılırken bir hata ile karşılaştı. Neyseki değerli yardımlarınız ile bu hatayı gidermemiz mümkün olacaktır.\n\nBu durumu tarafımıza bildirmek istiyor musunuz?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "Ses erken geliyorsa artı, geç geliyorsa eksi bir değer giriniz."
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "Önizleme kapalı durumda. MPC-HC ayarları içinden açabilirsiniz."
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "Bu ayar medya dosyalarını her yerden önizleyebilmenizi sağlar. Uzak herkes erişebileceği için sadece güvenli bir ağda kullanmanız önerilir.\n\nBu özelliği kullanmak istediğinizden emin misiniz?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "Dahili Alt Yazı İşleyicisi"
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
@@ -1676,15 +1689,23 @@ msgstr "Başa dön"
msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
-msgstr ""
+msgstr "OSD: Dosya Adını Göster"
+
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "DVD Oynat"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "BD Oynat"
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
-msgstr ""
+msgstr "OSD: İşleyici İstatistiklerini Göster"
msgctxt "IDS_OSD_RESET_RENDERER_STATS"
msgid "OSD: Reset Renderer Statistics"
-msgstr ""
+msgstr "OSD : İşleyici İstatistiklerini Sıfırla"
msgctxt "IDD_PPAGESUBMISC"
msgid "Subtitles::Misc"
@@ -1696,7 +1717,7 @@ msgstr "Kenarları gizle"
msgctxt "IDS_VIEW_FRAMEONLY"
msgid "Fra&me Only"
-msgstr "Sadece çerçevede"
+msgstr "Sad&ece Çerçevede"
msgctxt "IDS_VIEW_CAPTIONMENU"
msgid "Sho&w Caption&&Menu"
@@ -1959,19 +1980,19 @@ msgid "Options"
msgstr "Ayarlar"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Sonraki Ses"
+msgid "Next Audio Track"
+msgstr "Sonraki Ses Parçası"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Önceki Ses"
+msgid "Prev Audio Track"
+msgstr "Önceki Ses Parçası"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
+msgid "Next Subtitle Track"
msgstr "Sonraki Alt Yazı"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
+msgid "Prev Subtitle Track"
msgstr "Önceki Alt Yazı"
msgctxt "IDS_MPLAYERC_85"
@@ -1982,22 +2003,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Alt Yazıları Tekrar Yükle"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Sonraki Ses (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Önceki Ses (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Sonraki Alt Yazı (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Önceki Alt Yazı (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Sonraki Açı (DVD)"
@@ -2007,19 +2012,19 @@ msgid "Prev Angle (DVD)"
msgstr "Önceki Açı (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Sonraki Ses (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "Sonraki Ses Parçası (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Önceki Ses (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "Önceki Ses Parçası (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
+msgid "Next Subtitle Track (DVD)"
msgstr "Sonraki Alt Yazı (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
+msgid "Prev Subtitle Track (DVD)"
msgstr "Önceki Alt Yazı (DVD)"
msgctxt "IDS_MPLAYERC_97"
@@ -2028,7 +2033,7 @@ msgstr "Alt Yazıyı Aç/Kapat (DVD)"
msgctxt "IDS_OSD_DISPLAY_CURRENT_TIME"
msgid "OSD: Display Current Time"
-msgstr ""
+msgstr "OSD : Geçerli Süreyi Göster"
msgctxt "IDS_PPAGEWEBSERVER_0"
msgid "Select the directory"
@@ -2386,14 +2391,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Geçerli"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC beklenmeyen bir şekilde sonlandırıldı. Bu sorunu giderebilmemiz için lütfen \"%s\" dosyasını hata izleyici adresimize gönderiniz.\n\nDöküm dosyasının kaydedildiği klasörü açıp, hata izleyicisi sayfamızı ziyaret etmek istiyor musunuz?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "%u hatası yüzünden \"%s\" döküm dosyası oluşturulamadı"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Lütfen bir konum seçiniz"
@@ -2567,8 +2564,8 @@ msgid "Volume boost Max"
msgstr "Ses yüksekliği en fazla"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Kullanım: mpc-hc.exe \"konum\" [anahtarlar]\n\n\"yol_adı\"\t\tYüklenecek dosya veya klasör (özel\n\t\tkarakterler desteklenir, \"-\" varsayılan girişi gösterir)\n/dub \"dublaj_adı\"\tHarici bir ses dosyası yüklemek için\n/dubdelay \"dosya\"\tXXms olarak atlanacak harici bir ses dosyası yüklemek\n için (eğer dosya \"...GECİKME_XXms...\" içeriyorsa)\n/d3dfs\t\tTam ekran D3D kipinde oynatmak için\n/sub \"alt_yazı\"\t Harici bir alt yazı kullanmak için\n/filter \"filtre_adı\" Değişken bir bağlantıdan DirectShow süzgeçlerini\n\t\tyüklemek için (karakterler desteklenir)\n/dvd\t\tDVD kipinde çalıştırmak için, \"konum\" DVD klasörünü\n gösterir (seçmeli)\n/dvdpos T#C\tOynatma T başlığının, C bölümünden başlar\n/dvdpos T#ss:dd\t Oynatma T başlığının, ss:dd:ss süresinden başlar\n/cd\t\tSes veya (s)vcd'den tüm parçaları yüklemek için,\n\t\t\"konum\" Sürücü yolunu gösterir (seçmeli)\n/device\t\tVarsayılan video aygıtını açar\n/open\t\tDosya açılır, ancak otomatik olarak oynatılmaz\n/play \t\tOynatıcı açılır açılmaz yürütme \n\t\tbaşlatılır\n/close \t\tYürütmeden sonra oynatıcı kapatılır (sadece /play komutuyla\n\t\t kullanılır)\n/shutdown\t Oynatmadan sonra bilgisayar kapatılır\n/standby\t\tOynatmadan sonra bilgisayar beklemeye alınır\n/hibernate\tOynatmadan sonra bilgisayar uykuya alınır\n/logoff\t\tOynatmadan sonra oturum kapatılır\n/lock\t\tOynatmadan sonra bilgisayar kilitlenir\n/monitoroff\tOynatmadan sonra ekran kapatılır\n/playnext\t\tOynatmadan sonra klasördeki sıradaki dosyayı yürüt\n/fullscreen \tTam ekran kipinde başlatılır\n/minimized \tSimge durumunda başlatılır\n/new \t\tYeni bir oynatıcı penceresi kullanılır\n/add \t\t\"konum\" oynatma listesine eklenir, bu komutlarla birlikte\n\t\tkullanılabilir: /open ve /play\n/randomize\tOynatma listesini rastgele yürütür\n/regvid\t\t Video biçimleri ilişkilendirilir\n/regaud \t\tSes biçimleri ilişkilendirilir\n/regpl\t\tOynatma listesi uygulamayla ilişkilendirilir\n/regall\t\tTüm dosya biçimleri uygulamayla ilişkilendirilir\n/unregall\t\tVideo biçimleri geri alınır\n/start ms \t\tOynatmaya \"ms\" (= mili saniye) sonra başlanılır\n/startpos ss:dd:ss \tOynatmaya ss:dd:ss süresinden başlanılır\n/fixedsize w,h\t Sabit pencere boyutu kullanılır\n/monitor N\tN monitöründe başlatılır; N, 1'den başlar\n/audiorenderer N \tSes çeviricisi N ile başlanılır; N, 1 ile başlar\n\t\t(\"Çıkış\" ayarlarına bakınız)\n/shaderpreset \"Pr\" \tKomut ile \"Pr\" tonlayıcı hazır ayarı kullanılır\n/pns \"name\"\tKullanılacak Süzme&Tarama varsayılanını ayarlar\n/iconsassoc\tSimgeleri yeniden ilişkilendirir\n/nofocus\t\tUygulamayı arka planda çalıştırır\n/webport N\tİnternet arayüzünü istenen bağlantı noktasında çalıştırır\n/debug\t\tHata ayıklamasını OSD olarak gösterir\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tProgramın ikincil olarak kullanılabilmesini sağlar\n/reset\t\t Varsayılan ayarlara geri dönülür\n/help /h /? \tKomut satırı anahtarları yardımı görüntülenir\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Kullanım: mpc-hc.exe \"konum\" [anahtarlar]\n\n\"yol_adı\"\t\tYüklenecek dosya veya klasör (özel\n\t\tkarakterler desteklenir, \"-\" varsayılan girişi gösterir)\n/dub \"dublaj_adı\"\tHarici bir ses dosyası yüklemek için seçilir\n/dubdelay \"dosya\"\tXXms olarak atlanacak harici bir ses dosyası yüklemek\n için (eğer dosya \"...GECİKME_XXms...\" içeriyorsa)\n/d3dfs\t\tTam ekran D3D kipinde oynatmak için kullanılır\n/sub \"alt_yazı\"\t Harici bir alt yazı kullanmak için seçilir\n/filter \"filtre_adı\" Değişken bir bağlantıdan DirectShow süzgeçlerini\n\t\tyüklemek için kullanılır (karakterler desteklenir)\n/dvd\t\tDVD kipinde çalıştırmak için, \"konum\" DVD klasörünü\n gösterir (seçmeli)\n/dvdpos T#C\tOynatma T başlığının, C bölümünden başlar\n/dvdpos T#hh:mm\t Oynatma T başlığının, hh:mm:ss süresinden başlar\n/cd\t\tSes veya (s)vcd'den tüm parçaları yüklemek için,\n\t\t\"konum\" Sürücü yolunu gösterir (seçmeli)\n/device\t\tVarsayılan video aygıtını açar\n/open\t\tDosya açılır, ancak otomatik olarak oynatılmaz\n/play \t\tOynatıcı açılır açılmaz yürütme \n\t\tbaşlatılır\n/close \t\tYürütmeden sonra oynatıcı kapatılır (sadece /play komutuyla\n\t\t kullanılır)\n/shutdown\tOynatmadan sonra bilgisayar kapatılır\n/standby\t\tOynatmadan sonra bilgisayar beklemeye alınır\n/hibernate\tOynatmadan sonra bilgisayar uykuya alınır\n/logoff\t\tOynatmadan sonra oturum kapatılır\n/lock\t\tOynatmadan sonra bilgisayar kilitlenir\n/monitoroff\tOynatmadan sonra ekran kapatılır\n/playnext\t\tOynatmadan sonra klasördeki sıradaki dosyayı yürüt\n/fullscreen \tTam ekran kipinde başlatılır\n/minimized \tSimge durumunda başlatılır\n/new \t\tYeni bir oynatıcı penceresi kullanılır\n/add \t\t\"konum\" oynatma listesine eklenir, bu komutlarla birlikte\n\t\tkullanılabilir: /open ve /play\n/randomize\tOynatma listesini rastgele yürütür\n/regvid\t\tVideo biçimleri ilişkilendirilir\n/regaud \t\tSes biçimleri ilişkilendirilir\n/regpl\t\tOynatma listesi uygulamayla ilişkilendirilir\n/regall\t\tTüm dosya biçimleri uygulamayla ilişkilendirilir\n/unregall\t\tVideo biçimleri geri alınır\n/start ms \t\tOynatmaya \"ms\" (= mili saniye) sonra başlanılır\n/startpos ss:dd:ss \tOynatmaya ss:dd:ss süresinden başlanılır\n/fixedsize w,h\tSabit pencere boyutu kullanılır\n/monitor N\tN monitöründe başlatılır; N, 1'den başlar\n/audiorenderer N \tSes çeviricisi N ile başlanılır; N, 1 ile başlar\n\t\t(\"Çıkış\" ayarlarına bakınız)\n/shaderpreset \"Pr\" \tKomut ile \"Pr\" tonlayıcı hazır ayarı kullanılır\n/pns \"name\"\tKullanılacak Süzme&Tarama varsayılanını ayarlar\n/iconsassoc\tSimgeleri yeniden ilişkilendirir\n/nofocus\t\tUygulamayı arka planda çalıştırır\n/webport N\tİnternet arayüzünü istenen bağlantı noktasında çalıştırır\n/debug\t\tHata ayıklamasını OSD olarak gösterir\n/nocrashreporter\tÇökme bildirimini kapatır\n/slave \"hWnd\"\tProgramın ikincil olarak kullanılabilmesini sağlar\n/hwgpu \"index\"\tDonanımsal çözücü olarak kullanılan GPU 'nun içeriğini ayarlar\n\t\tSadece CUVID ve DXVA2 için kullanılabilir (kopyalama)\n/reset\t\tVarsayılan ayarlara geri dönülür\n/help /h /? \tKomut satırı anahtarları yardımı görüntülenir\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3042,18 +3039,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Taraf Oranı"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "WASAPI kullan (yeniden başlatın)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "İleri alırken sesi kıs"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Ses Aygıtı:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "Eşzamanlama: Açık"
@@ -3496,7 +3481,7 @@ msgstr "Önce yeni ayarları uygulamanız gerekmektedir."
msgctxt "IDS_AFTERPLAYBACK_EXIT"
msgid "After Playback: Exit"
-msgstr "Oynatmadan Sonra: Kapat"
+msgstr "Oynatmadan Sonra: Çıkış"
msgctxt "IDS_AFTERPLAYBACK_STANDBY"
msgid "After Playback: Stand By"
@@ -3520,7 +3505,7 @@ msgstr "Oynatmadan Sonra: Kilitle"
msgctxt "IDS_AFTERPLAYBACK_MONITOROFF"
msgid "After Playback: Turn off the monitor"
-msgstr "Oynatmadan Sonra: Ekranı kapat"
+msgstr "Oynatmadan Sonra: Ekranı Kapat"
msgctxt "IDS_AFTERPLAYBACK_PLAYNEXT"
msgid "After Playback: Play next file in the folder"
@@ -3610,3 +3595,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Ayarlar"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.tt.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.tt.dialogs.po
index 2a276369d..0cc55533f 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.tt.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.tt.dialogs.po
@@ -474,10 +474,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Ðудио файлларны үзе йөкләү"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Кертелгән Ñубтитрлар рендерерын кулланырга"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Тәртипләү"
@@ -678,9 +674,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Ó¨Ñтәмә диÑплейда тулы Ñкран рәвешендә тәрәзәне төрмәÑкә"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Windows 7 аÑлыгы мөмкинлекләрен кулланырга 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1171,8 +1167,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Субтитрлар *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1187,8 +1183,8 @@ msgid "Rotation"
msgstr "Борылма"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Тышкы Ñөзгечләр (мәÑәлән VSFilter) Ñубтитрларны барлык рендерерларда күрÑәтә ала."
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1206,6 +1202,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Җирле Ñанактан гына керүне Ñ€Ó©Ñ…Ñәт итәргә"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr ""
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Көйләү мәгълүматын чыгарырга"
@@ -1654,6 +1654,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Килешү буенча"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr ""
@@ -1670,8 +1714,16 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr ""
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
+msgid "Optional information"
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
@@ -1686,7 +1738,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr ""
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
msgstr ""
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.tt.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.tt.strings.po
index d23367651..a27ebedde 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.tt.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.tt.strings.po
@@ -329,11 +329,11 @@ msgid "On/Off"
msgstr "Каб./Сүн."
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr "Башлап (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr "Кадәр (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -468,6 +468,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Уйнаткыч::Шейдерлар"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Чыганаклар"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Төрлеләр"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Уйнату::Эләктерү"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Уйнату::Sync Renderer"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Уйнату::Тулы Ñкран"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Ðудиокүчергеч"
@@ -560,30 +588,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Субтитрлар::Ðигез"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Чыганаклар"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Төрлеләр"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Уйнату::Эләктерү"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Уйнату::Sync Renderer"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Уйнату::Тулы Ñкран"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Тулырак"
@@ -676,22 +680,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "ПоверхноÑÑ‚ÑŒ Ð´Ð»Ñ Ð²Ð¸Ð´ÐµÐ¾ выделÑетÑÑ ÐºÐ°Ðº Ð¾Ð±Ñ‹Ñ‡Ð½Ð°Ñ Ð¿Ð¾Ð²ÐµÑ€Ñ…Ð½Ð¾ÑÑ‚ÑŒ вне Ñкрана."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Audio Renderer Ñломан, не иÑпользуйте его."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Хата турында хәбәр"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC упал, но Ñта Ñборка была Ñкомпилирована без отладочной информации.\nЕÑли вы хотите Ñообщить об Ñтой ошибке, Ñначала вы должны попробовать официальную Ñборку.\n\nÐ’Ñ‹ хотите открыть Ñтраницу загрузки?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Гади Ó©Ñлек Ñкраннан тыш"
@@ -744,9 +736,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (кыÑуÑыз)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC аудио рендерер"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr ""
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1396,6 +1388,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr ""
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr ""
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "Җиһазны ачарга..."
@@ -1680,6 +1692,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr ""
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr ""
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr ""
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr ""
@@ -1961,20 +1981,20 @@ msgid "Options"
msgstr "Рәвешләр"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "КиләÑе аудио"
+msgid "Next Audio Track"
+msgstr ""
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Ðлдагы аудио"
+msgid "Prev Audio Track"
+msgstr ""
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "КиләÑе Ñубтитрлар"
+msgid "Next Subtitle Track"
+msgstr ""
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Ðлдагы Ñубтитрлар"
+msgid "Prev Subtitle Track"
+msgstr ""
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1984,22 +2004,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Субтитрларны киредән йөкләргә"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "КиләÑе аудио (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Ðлдагы аудио (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "КиләÑе Ñубтитрлар (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Ðлдагы Ñубтитрлар (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "КиләÑе почмак (DVD)"
@@ -2009,20 +2013,20 @@ msgid "Prev Angle (DVD)"
msgstr "Ðлдагы почмак (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "КиләÑе аудио (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Ðлдагы аудио (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "КиләÑе Ñубтитрлар (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Ðлдагы Ñубтитрлар (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2388,14 +2392,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Хәзерге"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "Работа MPC-HC прервана. Чтобы помочь нам в решении Ñтой проблемы, пожалуйÑта, отправьте файл '%s' на наш баг-трекер.\n\nХотите ли вы ÑÐµÐ¹Ñ‡Ð°Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚ÑŒ папку, Ñодержащую дамп-файл, и перейти на баг-трекер?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Ошибка при Ñоздании дамп-файла '%s' (ошибка %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Папка Ñайлагыз"
@@ -2569,8 +2565,8 @@ msgid "Volume boost Max"
msgstr "Тавыш көчен арттыру - Max"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "ИÑпользование: mpc-hc.exe \"путь\" [переключатели]\n\n\"путь\"\t\tФайл или каталог Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ (разрешены \n\t\tмаÑки, \"-\" denotes standard input)\n/dub \"dubname\"\tЗагрузить дополнительный звуковой файл\n/dubdelay \"file\"\tЗагрузить звуковой файл Ñо Ñмещением XXмÑ\n\t\t(еÑли файл Ñодержит \"...DELAY XXms...\")\n/d3dfs\t\tСтартовать в полноÑкранном D3D режиме\n/sub \"subname\"\tЗагрузить дополнительные Ñубтитры\n/filter \"filtername\"\tЗагрузить фильтры DirectShow из библиотеки\n\t\t(разрешены маÑки)\n/dvd\t\tЗапуÑк в режиме DVD, \"путь\" означает каталог\n\t\tÑ DVD (опционально)\n/dvdpos T#C\tÐачать воÑпроизведение Ñ title T, chapter C\n/dvdpos T#hh:mm\tÐачать воÑпроизведение Ñ title T, позиции\n\t\thh:mm:ss\n/cd\t\tЗагрузить вÑе дорожки Audio CD или (S)VCD,\n\t\t\"путь\" означает путь к диÑку (опционально)\n/device\t\tOpen the default video device\n/open\t\tТолько открыть файл\n/play\t\tÐачинать воÑпроизведение Ñразу поÑле запуÑка\n/close\t\tЗакрыть по окончании воÑпроизведениÑ\n\t\t(работает только Ñ ÐºÐ»ÑŽÑ‡ÐµÐ¼ /play)\n/shutdown\tВыключить компьютер по окончании\n\t\tвоÑпроизведениÑ\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tЗапуÑк в полноÑкранном режиме\n/minimized\tЗапуÑк в Ñвернутом виде\n/new\t\tИÑпользовать новую копию проигрывателÑ\n/add\t\tДобавить \"путь\" в плейлиÑÑ‚, можно ÑовмеÑтно\n\t\tÑ ÐºÐ»ÑŽÑ‡Ð°Ð¼Ð¸ /open и /play\n/randomize\tRandomize the playlist\n/regvid\t\tРегиÑтрировать видеоформаты\n/regaud\t\tРегиÑтрировать аудиоформаты\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tРазрегиÑтрировать вÑе форматы\n/start ms\t\tВоÑпроизводить Ñ Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¸ \"ms\"\n\t\t(миллиÑекунды)\n/startpos hh:mm:ss\tВоÑпроизводить Ñ Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¸ hh:mm:ss\n/fixedsize w,h\tУÑтановить фикÑированный размер окна\n/monitor N\tЗапуÑкатьÑÑ Ð½Ð° мониторе N, где N\n\t\tотÑчитываетÑÑ Ñ 1\n/audiorenderer N\tИÑпользовать аудиорендер N, где N\n\t\tотÑчитываетÑÑ Ñ 1 (Ñмотрите наÑтройки\n\t\t\"Вывод\")\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tВоÑтановить наÑтройки по умолчанию\n/help /h /?\tПоказывает Ñту Ñправку\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "ИÑпользование: mpc-hc.exe \"путь\" [переключатели]\n\n\"путь\"\t\tФайл или каталог Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ (разрешены \n\t\tмаÑки, \"-\" denotes standard input)\n/dub \"dubname\"\tЗагрузить дополнительный звуковой файл\n/dubdelay \"file\"\tЗагрузить звуковой файл Ñо Ñмещением XXмÑ\n\t\t(еÑли файл Ñодержит \"...DELAY XXms...\")\n/d3dfs\t\tСтартовать в полноÑкранном D3D режиме\n/sub \"subname\"\tЗагрузить дополнительные Ñубтитры\n/filter \"filtername\"\tЗагрузить фильтры DirectShow из библиотеки\n\t\t(разрешены маÑки)\n/dvd\t\tЗапуÑк в режиме DVD, \"путь\" означает каталог\n\t\tÑ DVD (опционально)\n/dvdpos T#C\tÐачать воÑпроизведение Ñ title T, chapter C\n/dvdpos T#hh:mm\tÐачать воÑпроизведение Ñ title T, позиции\n\t\thh:mm:ss\n/cd\t\tЗагрузить вÑе дорожки Audio CD или (S)VCD,\n\t\t\"путь\" означает путь к диÑку (опционально)\n/device\t\tOpen the default video device\n/open\t\tТолько открыть файл\n/play\t\tÐачинать воÑпроизведение Ñразу поÑле запуÑка\n/close\t\tЗакрыть по окончании воÑпроизведениÑ\n\t\t(работает только Ñ ÐºÐ»ÑŽÑ‡ÐµÐ¼ /play)\n/shutdown\tВыключить компьютер по окончании\n\t\tвоÑпроизведениÑ\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tЗапуÑк в полноÑкранном режиме\n/minimized\tЗапуÑк в Ñвернутом виде\n/new\t\tИÑпользовать новую копию проигрывателÑ\n/add\t\tДобавить \"путь\" в плейлиÑÑ‚, можно ÑовмеÑтно\n\t\tÑ ÐºÐ»ÑŽÑ‡Ð°Ð¼Ð¸ /open и /play\n/randomize\tRandomize the playlist\n/regvid\t\tРегиÑтрировать видеоформаты\n/regaud\t\tРегиÑтрировать аудиоформаты\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tРазрегиÑтрировать вÑе форматы\n/start ms\t\tВоÑпроизводить Ñ Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¸ \"ms\"\n\t\t(миллиÑекунды)\n/startpos hh:mm:ss\tВоÑпроизводить Ñ Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¸ hh:mm:ss\n/fixedsize w,h\tУÑтановить фикÑированный размер окна\n/monitor N\tЗапуÑкатьÑÑ Ð½Ð° мониторе N, где N\n\t\tотÑчитываетÑÑ Ñ 1\n/audiorenderer N\tИÑпользовать аудиорендер N, где N\n\t\tотÑчитываетÑÑ Ñ 1 (Ñмотрите наÑтройки\n\t\t\"Вывод\")\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tВоÑтановить наÑтройки по умолчанию\n/help /h /?\tПоказывает Ñту Ñправку\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3044,18 +3040,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Яклар чагыштырмаÑÑ‹"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "ИÑпользовать WASAPI (требуетÑÑ Ð¿ÐµÑ€ÐµÐ·Ð°Ð¿ÑƒÑк)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Отключить звук при быÑтрой перемотке"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Тавыш җиһазы:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: кабызылган"
@@ -3612,3 +3596,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Көйләүләр"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.uk.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.uk.dialogs.po
index 15142d416..bc4504e02 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.uk.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.uk.dialogs.po
@@ -3,13 +3,14 @@
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# arestarh1986 <arestarh@ukr.net>, 2014-2015
+# Ð”ÐµÐ½Ð¸Ñ <denyspokhylenko@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-18 07:01+0000\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-09-05 08:50+0000\n"
"Last-Translator: arestarh1986 <arestarh@ukr.net>\n"
-"Language-Team: Ukrainian (http://www.transifex.com/projects/p/mpc-hc/language/uk/)\n"
+"Language-Team: Ukrainian (http://www.transifex.com/mpc-hc/mpc-hc/language/uk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -472,10 +473,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "ÐÐ²Ñ‚Ð¾Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ Ð·Ð²ÑƒÐºÑƒ"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "ВикориÑтовувати вбудований рендерер Ñубтитрів"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "РегулюваннÑ"
@@ -676,9 +673,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Заблокувати ЗГОРТÐÐÐЯ, Ñкщо повноекранний режим на іншому моніторі"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "ВикориÑтовувати оÑобливоÑÑ‚Ñ– панелі завдань Windows 7"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1169,8 +1166,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Субтитри *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1185,8 +1182,8 @@ msgid "Rotation"
msgstr "ОбертаннÑ"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Зовнішні фільтри (Ñк то VSFilter) допуÑкають показ Ñубтитрів Ð´Ð»Ñ Ð²ÑÑ–Ñ… рендерерів."
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1204,6 +1201,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Дозволити доÑтуп лише з локального комп'ютера"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "Ввімкнути поперед. переглÑд"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "Виводити відлагоджувальну інформацію"
@@ -1652,6 +1653,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Типово"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "ПриÑтрій"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "ЕкÑклюзивний режим"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "Дозволити Потоковий"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "ЯкіÑÑ‚ÑŒ JPEG:"
@@ -1668,8 +1713,16 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "Повідомити про падіннÑ"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr ""
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
+msgid "Optional information"
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
@@ -1684,7 +1737,11 @@ msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "ОпиÑÐ°Ð½Ð½Ñ Ð¿Ñ€Ð¾Ð±Ð»ÐµÐ¼Ð¸ (лише англійÑькою):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "ОК"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr ""
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.uk.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.uk.menus.po
index cd5bc5536..02ba381b2 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.uk.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.uk.menus.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-15 16:53:42+0000\n"
-"PO-Revision-Date: 2015-05-15 18:10+0000\n"
-"Last-Translator: Underground78\n"
-"Language-Team: Ukrainian (http://www.transifex.com/projects/p/mpc-hc/language/uk/)\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-06-02 09:11+0000\n"
+"Last-Translator: arestarh1986 <arestarh@ukr.net>\n"
+"Language-Team: Ukrainian (http://www.transifex.com/mpc-hc/mpc-hc/language/uk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -198,15 +198,15 @@ msgstr "&ТеÑÑ‚ дрижаннÑ"
msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
msgid "&Display Statistics"
-msgstr ""
+msgstr "&Показ ÑтатиÑтики"
msgctxt "ID_VIEW_OSD_DISPLAY_TIME"
msgid "Display Current T&ime"
-msgstr ""
+msgstr "Показ поточного чаÑу"
msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
msgid "Show &File Name"
-msgstr ""
+msgstr "Показ &назви файла"
msgctxt "POPUP"
msgid "&Output Range"
@@ -590,7 +590,7 @@ msgstr "Ðаприкінці"
msgctxt "ID_AFTERPLAYBACK_DONOTHING"
msgid "Do no&thing"
-msgstr ""
+msgstr "Ðічого не ро&бити"
msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
msgid "Play &next file in the folder"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.uk.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.uk.strings.po
index 38bfcac19..a5933ef00 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.uk.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.uk.strings.po
@@ -7,10 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-15 16:53:42+0000\n"
-"PO-Revision-Date: 2015-05-18 07:12+0000\n"
-"Last-Translator: arestarh1986 <arestarh@ukr.net>\n"
-"Language-Team: Ukrainian (http://www.transifex.com/projects/p/mpc-hc/language/uk/)\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-08-06 16:46+0000\n"
+"Last-Translator: Underground78\n"
+"Language-Team: Ukrainian (http://www.transifex.com/mpc-hc/mpc-hc/language/uk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -326,11 +326,11 @@ msgid "On/Off"
msgstr "Ввімк./Вимк."
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
+msgid "From (FPS)"
msgstr "Від (кадри/Ñ)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
+msgid "To (FPS)"
msgstr "До (кадри/Ñ)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
@@ -465,6 +465,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "ВідтвореннÑ::Шейдери"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "РеÑурÑи"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Різне"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "ВідтвореннÑ::ЗахопленнÑ"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "ВідтвореннÑ::ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Sync Renderer"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "ВідтвореннÑ::Повноекранний режим"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Ðудіоперемикач"
@@ -557,30 +585,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Субтитри::База"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "РеÑурÑи"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Різне"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "ВідтвореннÑ::ЗахопленнÑ"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "ВідтвореннÑ::ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Sync Renderer"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "ВідтвореннÑ::Повноекранний режим"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Детально"
@@ -673,22 +677,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "ÐŸÐ¾Ð²ÐµÑ€Ñ…Ð½Ñ Ð´Ð»Ñ Ð²Ñ–Ð´ÐµÐ¾ виділÑєтьÑÑ Ñк звичайна Ð¿Ð¾Ð²ÐµÑ€Ñ…Ð½Ñ Ð·Ð° межами екрану."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "Рендерер аудіо MPC Ñ” непрацюючим, не викориÑтовуйте його."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Sync Renderer"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - ÐŸÐ¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¾ помилку"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "Роботу MPC-HC неÑподівано перервано, але данна збірка була Ñкомпільована без підтримки відлагоджувальної інформації.\nЯкщо ви хочете повідомити про помилку, вам необхідно Ñпочатку завантажити офіційну збірку.\n\nВи хочете зараз відвідати Ñторінку Ð´Ð»Ñ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "ПроÑÑ‚Ñ– закадрові планарні поверхні"
@@ -741,9 +733,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (неÑтиÑнений)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "Ðудіорендерер MPC-HC"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr ""
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1387,10 +1379,30 @@ msgstr "ВиÑока точніÑÑ‚ÑŒ"
msgctxt "IDS_AFTERPLAYBACK_REWIND"
msgid "After Playback: Rewind current file"
-msgstr ""
+msgstr "Ðаприкінці відтвореннÑ: Перемотати файл на початок"
msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
+msgstr "Ðаприкінці відтвореннÑ: Закрити файл"
+
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
msgstr ""
msgctxt "IDS_AG_OPEN_DEVICE"
@@ -1675,15 +1687,23 @@ msgstr "Перейти на початок"
msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
+msgstr "OSD: Показ назви файла"
+
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr ""
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
msgstr ""
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
-msgstr ""
+msgstr "OSD: Показ ÑтатиÑтики рендерера"
msgctxt "IDS_OSD_RESET_RENDERER_STATS"
msgid "OSD: Reset Renderer Statistics"
-msgstr ""
+msgstr "OSD: Ð¡ÐºÐ¸Ð´Ð°Ð½Ð½Ñ ÑтатиÑтики рендерера"
msgctxt "IDD_PPAGESUBMISC"
msgid "Subtitles::Misc"
@@ -1958,20 +1978,20 @@ msgid "Options"
msgstr "Опції"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "ÐаÑтупне аудіо"
+msgid "Next Audio Track"
+msgstr ""
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Попереднє аудіо"
+msgid "Prev Audio Track"
+msgstr ""
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "ÐаÑтупні Ñубтитри"
+msgid "Next Subtitle Track"
+msgstr ""
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Попередні Ñубтитри"
+msgid "Prev Subtitle Track"
+msgstr ""
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1981,22 +2001,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Перечитати Ñубтитри"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "ÐаÑтупне аудіо (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Попереднє аудіо (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "ÐаÑтупні Ñубтитри (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Попередні Ñубтитри (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "ÐаÑтупний кут зору (DVD)"
@@ -2006,20 +2010,20 @@ msgid "Prev Angle (DVD)"
msgstr "Попередній кут зору (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "ÐаÑтупне аудіо (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Попереднє аудіо (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "ÐаÑтупні Ñубтитри (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Попередні Ñубтитри (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2027,7 +2031,7 @@ msgstr "Ввімк./Вимк. Ñубтитри (DVD)"
msgctxt "IDS_OSD_DISPLAY_CURRENT_TIME"
msgid "OSD: Display Current Time"
-msgstr ""
+msgstr "OSD: Показ поточного чаÑу"
msgctxt "IDS_PPAGEWEBSERVER_0"
msgid "Select the directory"
@@ -2385,14 +2389,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Поточний"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "Роботу MPC-HC неÑподівано перервано. Щоб допомогти нам виправити проблему, надішліть цей файл '%s' на наш трекер з розв'ÑÐ·Ð°Ð½Ð½Ñ Ð¿Ð¾Ð¼Ð¸Ð»Ð¾Ðº.\n\nВи хочете відкрити теку, що міÑтить файл мінідампу Ñ– відвідати трекер?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Ðеможливо Ñтворити файл-дамп \"%s\" (код помилки %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Оберіть теку"
@@ -2566,8 +2562,8 @@ msgid "Volume boost Max"
msgstr "ПідÑÐ¸Ð»ÐµÐ½Ð½Ñ - МакÑ."
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "ВикориÑтаннÑ: mpc-hc.exe \"шлÑÑ…\" [перемикачі]\n\n\"шлÑÑ…\"\tФайл або тека Ð´Ð»Ñ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ (дозволені маÑки, \"-\" перевизначають Ñтандартне введеннÑ)\n/dub \"dubname\"\tЗавантажити додатковий дублÑж\n/dubdelay \"file\"\tЗавантажити додатковий дублÑж з затримкою XXмÑ\n(Ñкщо ім'Ñ Ñ„Ð°Ð¹Ð»Ñƒ міÑтить \"...DELAY XXms...\")\n/d3dfs\t\tСтартувати в повноекранному D3D режимі\n/sub \"subname\"\tЗавантажити додаткові Ñубтитри\n/filter \"filtername\"\tЗавантажити фільтри DirectShow з бібліотеки (дозволені маÑки)\n/dvd\t\tЗапуÑк в режимі DVD, \"шлÑÑ…\" вказує на вміÑÑ‚ DVD (опціонально)\n/dvdpos T#C\tПочинати Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð· заголовку T, розділу C\n/dvdpos T#hh:mm\tПочинати Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð· заголовку T, позиції hh:mm:ss\n/cd\t\tЗавантажити вÑÑ– доріжки Audio CD або (S)VCD, \"шлÑÑ…\" вказує на вміÑÑ‚ диÑку (опціонально)\n/device\t\tВідкрити типовий приÑтрій Ð²Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð²Ñ–Ð´ÐµÐ¾\n/open\t\tЛише відкрити файл, не відтворювати\n/play\t\tПочинати Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ€Ð°Ð·Ñƒ піÑÐ»Ñ Ð·Ð°Ð¿ÑƒÑку\n/close\t\tЗакрити піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ (працює лише з /play)\n/shutdown\tВимкнути комп'ютер піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/standby\t\tПеревеÑти ÑиÑтему в режим Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ–ÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/hibernate\t\tПеревеÑти ÑиÑтему в режим Ñну піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/logoff\t\tЗавершити ÑÐµÐ°Ð½Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ кориÑтувача піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/lock\t\tЗаблокувати комп'ютер піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/monitoroff\tВимкнути монітор піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/playnext\t\tВідкрити наÑтупний файл в теці піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/fullscreen\t\tЗапуÑк в повноекранному режимі\n/minimized\tЗапуÑк в згорнутому виглÑді\n/new\t\tЗапуÑкати нову копію програвача\n/add\t\tДодати \"шлÑÑ…\" в ÑпиÑок відтвореннÑ, можна Ñпільно з /open та /play\n/randomize\tЗапуÑкати з перемішаними файлами у ÑпиÑку відтвореннÑ\n/regvid\t\tЗареєÑтрувати аÑоціації відеоформатів\n/regaud\t\tЗареєÑтрувати аÑоціації аудіоформатів\n/regpl\t\tЗареєÑтрувати аÑоціації Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ñ–Ð² ÑпиÑків відтвореннÑ\n/regall\t\tЗареєÑтрувати аÑоціації Ð´Ð»Ñ Ð²ÑÑ–Ñ… підтримуваних типів файлів\n/unregall\t\tВідмінити реєÑтрацію аÑоціацій відеоформатів\n/start ms\t\tВідтворювати починаючи з позиції \"ms\" (= міліÑекунди)\n/startpos hh:mm:ss\tПочинати Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð· позиції hh:mm:ss\n/fixedsize w,h\tÐ’Ñтановити фікÑований розмір вікна\n/monitor N\tЗапуÑтити на моніторі N, Ð½ÑƒÐ¼ÐµÑ€Ð°Ñ†Ñ–Ñ Ð· 1\n/audiorenderer N\tЗапуÑтити з аудіорендерером N, Ð½ÑƒÐ¼ÐµÑ€Ð°Ñ†Ñ–Ñ Ð· 1\n\t\t(див. \"Вивід\" в налаштуваннÑÑ…)\n/shaderpreset \"Pr\"\tЗапуÑтити з викориÑтаннÑм \"Pr\" Ð¿Ñ€Ð¾Ñ„Ñ–Ð»Ñ ÑˆÐµÐ¹Ð´ÐµÑ€Ñ–Ð²\n/pns \"name\"\tЗадати преÑет \"name\" Pan&Scan\n/iconsassoc\tПовторно аÑоціювати іконки форматів\n/nofocus\t\tВідкрити MPC-HC у фоні\n/webport N\tЗапуÑтити веб-Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð½Ð° вказаному порті\n/debug\t\tВідображати відлагоджувальну інформацію у OSD\n/nocrashreporter\tЗапуÑтити з вимкненим повідомленнÑм про падіннÑ\n/slave \"hWnd\"\tВикориÑтовувати MPC-HC іншим вікном з деÑкриптором \"hWnd\"\n/reset\t\tВідновити типові налаштуваннÑ\n/help /h /?\tПоказати цю довідку\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "ВикориÑтаннÑ: mpc-hc.exe \"шлÑÑ…\" [перемикачі]\n\n\"шлÑÑ…\"\tФайл або тека Ð´Ð»Ñ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ (дозволені маÑки, \"-\" перевизначають Ñтандартне введеннÑ)\n/dub \"dubname\"\tЗавантажити додатковий дублÑж\n/dubdelay \"file\"\tЗавантажити додатковий дублÑж з затримкою XXмÑ\n(Ñкщо ім'Ñ Ñ„Ð°Ð¹Ð»Ñƒ міÑтить \"...DELAY XXms...\")\n/d3dfs\t\tСтартувати в повноекранному D3D режимі\n/sub \"subname\"\tЗавантажити додаткові Ñубтитри\n/filter \"filtername\"\tЗавантажити фільтри DirectShow з бібліотеки (дозволені маÑки)\n/dvd\t\tЗапуÑк в режимі DVD, \"шлÑÑ…\" вказує на вміÑÑ‚ DVD (опціонально)\n/dvdpos T#C\tПочинати Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð· заголовку T, розділу C\n/dvdpos T#hh:mm\tПочинати Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð· заголовку T, позиції hh:mm:ss\n/cd\t\tЗавантажити вÑÑ– доріжки Audio CD або (S)VCD, \"шлÑÑ…\" вказує на вміÑÑ‚ диÑку (опціонально)\n/device\t\tВідкрити типовий приÑтрій Ð²Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð²Ñ–Ð´ÐµÐ¾\n/open\t\tЛише відкрити файл, не відтворювати\n/play\t\tПочинати Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ€Ð°Ð·Ñƒ піÑÐ»Ñ Ð·Ð°Ð¿ÑƒÑку\n/close\t\tЗакрити піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ (працює лише з /play)\n/shutdown\tВимкнути комп'ютер піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/standby\t\tПеревеÑти ÑиÑтему в режим Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ–ÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/hibernate\t\tПеревеÑти ÑиÑтему в режим Ñну піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/logoff\t\tЗавершити ÑÐµÐ°Ð½Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ кориÑтувача піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/lock\t\tЗаблокувати комп'ютер піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/monitoroff\tВимкнути монітор піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/playnext\t\tВідкрити наÑтупний файл в теці піÑÐ»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ\n/fullscreen\t\tЗапуÑк в повноекранному режимі\n/minimized\tЗапуÑк в згорнутому виглÑді\n/new\t\tЗапуÑкати нову копію програвача\n/add\t\tДодати \"шлÑÑ…\" в ÑпиÑок відтвореннÑ, можна Ñпільно з /open та /play\n/randomize\tЗапуÑкати з перемішаними файлами у ÑпиÑку відтвореннÑ\n/regvid\t\tЗареєÑтрувати аÑоціації відеоформатів\n/regaud\t\tЗареєÑтрувати аÑоціації аудіоформатів\n/regpl\t\tЗареєÑтрувати аÑоціації Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ñ–Ð² ÑпиÑків відтвореннÑ\n/regall\t\tЗареєÑтрувати аÑоціації Ð´Ð»Ñ Ð²ÑÑ–Ñ… підтримуваних типів файлів\n/unregall\t\tВідмінити реєÑтрацію аÑоціацій відеоформатів\n/start ms\t\tВідтворювати починаючи з позиції \"ms\" (= міліÑекунди)\n/startpos hh:mm:ss\tПочинати Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð· позиції hh:mm:ss\n/fixedsize w,h\tÐ’Ñтановити фікÑований розмір вікна\n/monitor N\tЗапуÑтити на моніторі N, Ð½ÑƒÐ¼ÐµÑ€Ð°Ñ†Ñ–Ñ Ð· 1\n/audiorenderer N\tЗапуÑтити з аудіорендерером N, Ð½ÑƒÐ¼ÐµÑ€Ð°Ñ†Ñ–Ñ Ð· 1\n\t\t(див. \"Вивід\" в налаштуваннÑÑ…)\n/shaderpreset \"Pr\"\tЗапуÑтити з викориÑтаннÑм \"Pr\" Ð¿Ñ€Ð¾Ñ„Ñ–Ð»Ñ ÑˆÐµÐ¹Ð´ÐµÑ€Ñ–Ð²\n/pns \"name\"\tЗадати преÑет \"name\" Pan&Scan\n/iconsassoc\tПовторно аÑоціювати іконки форматів\n/nofocus\t\tВідкрити MPC-HC у фоні\n/webport N\tЗапуÑтити веб-Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð½Ð° вказаному порті\n/debug\t\tВідображати відлагоджувальну інформацію у OSD\n/nocrashreporter\tЗапуÑтити з вимкненим повідомленнÑм про падіннÑ\n/slave \"hWnd\"\tВикориÑтовувати MPC-HC іншим вікном з деÑкриптором \"hWnd\"\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tВідновити типові налаштуваннÑ\n/help /h /?\tПоказати цю довідку\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -3041,18 +3037,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Співвіднош. Ñторін"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "ВикориÑтовувати WASAPI (необхідний перезапуÑк)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Вимикати звук при приÑкореному перемотуванні вперед"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "ПриÑтрій Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð·Ð²ÑƒÐºÑƒ:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: Ввімк."
@@ -3609,3 +3593,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "ÐалаштуваннÑ"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.vi.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.vi.dialogs.po
index 0a801ed4b..01de0fa1a 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.vi.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.vi.dialogs.po
@@ -7,9 +7,9 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-03-16 18:09:30+0000\n"
-"PO-Revision-Date: 2015-04-12 02:15+0000\n"
-"Last-Translator: Underground78\n"
+"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
+"PO-Revision-Date: 2015-06-05 09:38+0000\n"
+"Last-Translator: TRẦN ANH MINH <anhminhvks@yahoo.com>\n"
"Language-Team: Vietnamese (http://www.transifex.com/projects/p/mpc-hc/language/vi/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -119,7 +119,7 @@ msgstr "Ngõ vào:"
msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_STATIC3"
msgid "Hold shift for immediate changes when clicking something"
-msgstr "Giữ shift để thay đổi ngay lập tức khi nhấn một cái gì đó"
+msgstr "Giữ phím Shift để thay đổi ngay lập tức khi bạn nhấn một cái gì đó"
msgctxt "IDD_GOTO_DLG_CAPTION"
msgid "Go To..."
@@ -473,10 +473,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "Tự động nạp tệp âm thanh"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "Sử dụng bộ dựng phụ đỠcó sẵn"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "Äiá»u khiển"
@@ -571,7 +567,7 @@ msgstr "Cảnh báo"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "If you override and enable full-screen antialiasing somewhere at your videocard's settings, subtitles aren't going to look any better but it will surely eat your CPU."
-msgstr "Nếu bạn ghi đè lên và cho phép toàn màn hình chống răng cưa ở đâu đó ở các cài đặt của bo của bạn, phụ đỠsẽ không xem xét bất kỳ tốt hơn, nhưng nó chắc chắn sẽ ăn CPU của bạn."
+msgstr "Nếu bạn ghi đè và cho phép chống răng cưa toàn màn hình trong các thiết lập của cạc màn hình, phụ đỠkhông những không xem được tốt hơn, mà nó còn làm hao tốn CPU của bạn."
msgctxt "IDD_PPAGEFORMATS_IDC_STATIC2"
msgid "File extensions"
@@ -677,9 +673,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "Ngăn ngừa trình phát nhạc khi trong toàn màn hình trên một màn hình mặc định "
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "Sử dụng tính năng Windows 7 Taskbar"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -1170,8 +1166,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "Phụ đỠ*"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1186,8 +1182,8 @@ msgid "Rotation"
msgstr "Quay"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* Bá»™ lá»c bên ngoài (chẳng hạn nhÆ° VSFilter) có thể hiển thị phụ Ä‘á» trên tất cả các kết xuất đồ há»a."
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1205,6 +1201,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "Cho phép chỉ truy cập từ localhost"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr ""
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "In thông tin gỡ rối"
@@ -1653,6 +1653,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "Mặc định"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "Chất lượng JPEG"
@@ -1667,25 +1711,37 @@ msgstr "Äồng ý"
msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
+msgstr "Báo cáo lỗi"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr ""
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
+msgid "Optional information"
msgstr ""
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
-msgstr ""
+msgstr "Thư điện tử:"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC3"
msgid "Your email address is optional and will only be used if the developers need to contact you for more information."
-msgstr ""
+msgstr "Äịa chỉ thÆ° Ä‘iện tá»­ của bạn là má»™t tùy chá»n và sẽ chỉ được sá»­ dụng nếu các nhà phát triển cần phải liên lạc vá»›i bạn để biết thêm thông tin chi tiết."
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
+msgstr "Diễn tả vấn đỠgặp phải (chỉ dùng tiếng Anh):"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
msgstr ""
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
msgstr ""
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.vi.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.vi.menus.po
index 4a5f1462d..09982a5a9 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.vi.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.vi.menus.po
@@ -7,8 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-04-06 16:31:55+0000\n"
-"PO-Revision-Date: 2015-04-15 08:18+0000\n"
+"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
+"PO-Revision-Date: 2015-06-05 09:41+0000\n"
"Last-Translator: TRẦN ANH MINH <anhminhvks@yahoo.com>\n"
"Language-Team: Vietnamese (http://www.transifex.com/projects/p/mpc-hc/language/vi/)\n"
"MIME-Version: 1.0\n"
@@ -199,15 +199,15 @@ msgstr "&Kiểm tra nhiễu"
msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
msgid "&Display Statistics"
-msgstr ""
+msgstr "&Hiển thị thống kê"
msgctxt "ID_VIEW_OSD_DISPLAY_TIME"
msgid "Display Current T&ime"
-msgstr ""
+msgstr "&Hiển thị thá»i gian hiện tại"
msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
msgid "Show &File Name"
-msgstr ""
+msgstr "&Hiển thị tên tập tin"
msgctxt "POPUP"
msgid "&Output Range"
@@ -591,7 +591,7 @@ msgstr "&Sau khi phát"
msgctxt "ID_AFTERPLAYBACK_DONOTHING"
msgid "Do no&thing"
-msgstr ""
+msgstr "&Không làm gì cả"
msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
msgid "Play &next file in the folder"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.vi.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.vi.strings.po
index 843841d1b..f494edd74 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.vi.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.vi.strings.po
@@ -7,8 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-04-09 21:29:25+0000\n"
-"PO-Revision-Date: 2015-04-15 08:18+0000\n"
+"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
+"PO-Revision-Date: 2015-06-05 10:03+0000\n"
"Last-Translator: TRẦN ANH MINH <anhminhvks@yahoo.com>\n"
"Language-Team: Vietnamese (http://www.transifex.com/projects/p/mpc-hc/language/vi/)\n"
"MIME-Version: 1.0\n"
@@ -326,12 +326,12 @@ msgid "On/Off"
msgstr "Bật/Tắt"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "Từ FPS"
+msgid "From (FPS)"
+msgstr "Từ (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "Äến FPS"
+msgid "To (FPS)"
+msgstr "Äến (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -465,6 +465,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "Phát lại::Trình đổ bóng"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "Nguồn"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "Thông tin khác"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "Thông tin media"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "Phát lại::Bắt hình"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "Phát lại::Thiết lập đồng bộ render"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "Phát lại::Toàn màn hình"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "Trình chuyển âm thanh"
@@ -557,30 +585,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "Phụ Ä‘á»::CÆ¡ sở dữ liệu"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "Nguồn"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "Thông tin khác"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "Thông tin media"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "Phát lại::Bắt hình"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "Phát lại::Thiết lập đồng bộ render"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "Phát lại::Toàn màn hình"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "Chi tiết"
@@ -623,7 +627,7 @@ msgstr "Giống như VMR-9 (renderless), nhưng sử dụng một sự thật ha
msgctxt "IDC_DSNULL_COMP"
msgid "Connects to any video-like media type and will send the incoming samples to nowhere. Use it when you don't need the video display and want to save the CPU from working unnecessarily."
-msgstr "Kết nối vá»›i bất kỳ loại phÆ°Æ¡ng tiện truyá»n thông nhÆ° video và sẽ gá»­i mẫu đến tá»›i đâu cả. Sá»­ dụng nó khi bạn không cần màn hình hiển thị video và muốn tiết kiệm CPU làm việc không cần thiết."
+msgstr "Kết nối vá»›i bất kỳ loại phÆ°Æ¡ng tiện truyá»n thông nào và sẽ không gá»­i mẫu hình ảnh Ä‘i đâu cả. Sá»­ dụng Ä‘iá»u này khi bạn không cần hiển thị hình ảnh video và muốn tiết kiệm CPU từ những việc không cần thiết."
msgctxt "IDC_DSNULL_UNCOMP"
msgid "Same as the normal Null renderer, but this will only connect to uncompressed types."
@@ -673,22 +677,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "Bá» mặt video sẽ được phân bổ nhÆ° má»™t bá» mặt ngoài Ä‘á»i thÆ°á»ng."
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "Trình render âm thanh MPC bị há»ng, không sá»­ dụng."
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "Äồng bá»™ kết xuất"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - Báo cáo lỗi"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC đã há»ng nhÆ°ng xây dá»±ng này đã được biên soạn không có thông tin gỡ lá»—i.\nNếu bạn muốn báo cáo lá»—i này, trÆ°á»›c tiên bạn nên thá»­ má»™t bản dá»±ng tốt.\n\nBạn có muốn truy cập vào trang tải bây giá»?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "Offscreen thÆ°á»ng xuyên bá» mặt phẳng"
@@ -741,9 +733,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "Null (không nén)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "Trình render âm thanh MPC-HC"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr ""
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -1375,22 +1367,42 @@ msgstr "AR %d:%d"
msgctxt "IDS_PPAGEADVANCED_LOGGER"
msgid "Enables logging to file (requires restart)"
-msgstr "Cho phép đăng nhập vào tập tin (Yêu cầu khởi động lại)"
+msgstr "Cho phép đăng nhập vào tập tin (yêu cầu khởi động lại)"
msgctxt "IDS_TIMER_REMAINING_TIME"
msgid "Remaining time"
-msgstr ""
+msgstr "Thá»i gian còn lại"
msgctxt "IDS_TIMER_HIGH_PRECISION"
msgid "High precision"
-msgstr ""
+msgstr "Äá»™ chính xác cao"
msgctxt "IDS_AFTERPLAYBACK_REWIND"
msgid "After Playback: Rewind current file"
-msgstr ""
+msgstr "Sau khi phát xong: Tua lại tập tin hiện tại"
msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
+msgstr "Sau khi phát xong: Äóng"
+
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr ""
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
msgstr ""
msgctxt "IDS_AG_OPEN_DEVICE"
@@ -1443,11 +1455,11 @@ msgstr "Ngừng"
msgctxt "IDS_AG_FRAMESTEP"
msgid "Frame-step"
-msgstr "Khung"
+msgstr "Khung hình kế tiếp"
msgctxt "IDS_MPLAYERC_16"
msgid "Frame-step back"
-msgstr "Khung hình trở"
+msgstr "Khung hình trước"
msgctxt "IDS_AG_GO_TO"
msgid "Go To"
@@ -1675,15 +1687,23 @@ msgstr "Nhảy đến bắt đầu"
msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
+msgstr "MHHT: Hiển thị tên tập tin"
+
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr ""
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
msgstr ""
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
-msgstr ""
+msgstr "MHHT: Hiển thị thống kê bộ dựng hình"
msgctxt "IDS_OSD_RESET_RENDERER_STATS"
msgid "OSD: Reset Renderer Statistics"
-msgstr ""
+msgstr "MHHT: Thiết lập lại thống kê bộ dựng hình"
msgctxt "IDD_PPAGESUBMISC"
msgid "Subtitles::Misc"
@@ -1695,7 +1715,7 @@ msgstr "Ẩn &viá»n"
msgctxt "IDS_VIEW_FRAMEONLY"
msgid "Fra&me Only"
-msgstr "Chỉ khung"
+msgstr "Chỉ khung hình"
msgctxt "IDS_VIEW_CAPTIONMENU"
msgid "Sho&w Caption&&Menu"
@@ -1958,20 +1978,20 @@ msgid "Options"
msgstr "Tùy chá»n"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "Âm kế"
+msgid "Next Audio Track"
+msgstr ""
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "Âm trước"
+msgid "Prev Audio Track"
+msgstr ""
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "Phụ đỠkế"
+msgid "Next Subtitle Track"
+msgstr ""
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "Phụ đỠtrước"
+msgid "Prev Subtitle Track"
+msgstr ""
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1981,22 +2001,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "Nạp lại phụ Ä‘á»"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "Âm kế (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "Âm trước (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "Phụ đỠkế (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "Phụ đỠtrước (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "Góc kế (DVD)"
@@ -2006,20 +2010,20 @@ msgid "Prev Angle (DVD)"
msgstr "Góc trước (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "Âm kế (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "Âm trước (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "Phụ đỠkế (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "Phụ đỠtrước (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2027,7 +2031,7 @@ msgstr "Bật/Tắt phụ đỠ(DVD)"
msgctxt "IDS_OSD_DISPLAY_CURRENT_TIME"
msgid "OSD: Display Current Time"
-msgstr ""
+msgstr "MHHT: Hiển thị thá»i gian hiện tại"
msgctxt "IDS_PPAGEWEBSERVER_0"
msgid "Select the directory"
@@ -2339,7 +2343,7 @@ msgstr "Äầy bá»™ nhá»›"
msgctxt "IDS_MAINFRM_77"
msgid "Error: Adobe Flash Player for Internet Explorer is required"
-msgstr "Lỗi: Adobe Flash Player cho trình duyệt Internet Explorer là cần thiết"
+msgstr "Lỗi: Adobe Flash Player cho trình duyệt Internet Explorer được yêu cầu"
msgctxt "IDS_MAINFRM_78"
msgid "QuickTime not yet supported for X64 (apple library not available)"
@@ -2385,14 +2389,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "Hiện tại"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC chấm dứt Ä‘á»™t ngá»™t. Äể giúp chúng tôi khắc phục vấn Ä‘á» này, xin vui lòng gá»­i tập tin này \"%s\" vá» theo dõi lá»—i của chúng tôi.\n\nBạn có muốn mở thÆ° mục chứa các tập tin minidump và truy cập vào theo dõi lá»—i bây giá»?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "Lỗi khi tạo tập tin kết xuất vào \"%s\" (lỗi %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "Chá»n vị trí"
@@ -2411,7 +2407,7 @@ msgstr "Chuyển Nhãn&Menu"
msgctxt "IDS_AG_TOGGLE_SEEKER"
msgid "Toggle Seek Bar"
-msgstr "Chuyển đổi thanh dò"
+msgstr "Chuyển đổi thanh tìm kiếm"
msgctxt "IDS_AG_TOGGLE_CONTROLS"
msgid "Toggle Controls"
@@ -2566,8 +2562,8 @@ msgid "Volume boost Max"
msgstr "Khối lượng âm lớn nhất"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "Cách sá»­ dụng: mpc-hc.exe \"pathname\" [chuyển]\n\n\"pathname\"\tCác tập tin hoặc thÆ° mục chính được nạp (ký tá»± đại diện\n\t\tcho phép, \"-\" biểu thị đầu vào tiêu chuẩn)\n/dub \"dubname\"\tNạp má»™t tập tin âm thanh khác\n/dubdelay \"file\"\tNạp má»™t tập tin âm thanh thêm dịch chuyển XXms (nếu\n\t\ttệp chứa \"...Äá»™ trá»… XX giây...\")\n/d3dfs\t\tBắt đầu dá»±ng hình trong chế Ä‘á»™ toàn màn hình D3D\n/sub \"subname\"\tNạp má»™t file phụ Ä‘á» thêm\n/filter \"filtername\"\tBá»™ lá»c DirectShow tải từ má»™t liên thÆ° viện\n\t\tkết Ä‘á»™ng(ký tá»± đại diện)\n/dvd\t\tChạy chế Ä‘á»™ dvd, \"pathname\" nghÄ©a là thÆ° mục\n\t\tDVD(tùy chá»n)\n/dvdpos T#C\tBắt đầu phát lại tại tiêu Ä‘á» T, chÆ°Æ¡ng C\n/dvdpos T#hh:mm\tPhát lại tại tiêu Ä‘á» T, vị trí gg:pp:gg\n/cd\t\tTải tất cả các bài hát của má»™t Ä‘Ä©a CD âm thanh hoặc (s) VCD,\n\t\t\"pathname\" nghÄ©a là Ä‘Æ°á»ng dẫn cd(tùy chá»n)\n/device\t\tMở thiết bị video mặc định\n/open\t\tMở tập tin, không tá»± Ä‘á»™ng bắt đầu phát lại\n/play\t\tBắt đầu chÆ¡i các tập tin ngay sau trình phát nhạc\n\t\tđã chạy\n/close\t\tÄóng trình phát nhạc sau khi phát lại (chỉ hoạt Ä‘á»™ng khi\n\t\tdùng vá»›i /phát)\n/shutdown\tTắt máy tính, hệ Ä‘iá»u hành sau khi phát lại\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tBắt đầu trong chế Ä‘á»™ toàn màn hình\n/minimized\tBắt đầu trong chế Ä‘á»™ giảm thiểu\n/new\t\tSá»­ dụng má»™t trÆ°á»ng hợp má»›i của trình phát nhạc\n/add\t\tThêm\"pathname\" vào danh sách phát, sẽ kết hợp\n\t\tvá»›i/mở và/phát\n/randomize\tRandomize the playlist\n/regvid\t\tTạo ra các phần mở rá»™ng cho các tập tin video\n/regaud\t\tTạo ra các phần mở rá»™ng cho các tập tin âm thanh\n/regpl\t\tTạo ra các phần mở rá»™ng cho các tập tin danh sách phát\n/regall\t\tTạo ra các phần mở rá»™ng cho các tất cả các tập tin \n/unregall\t\tLoại bá» phần mở rá»™ng\n/start ms\t\tBắt đầu phát lúc \"mlg\" (= mili giây)\n/startpos hh:mm:ss\tPhát tại vị trí gg:pp:gg\n/fixedsize w,h\tThiết lập má»™t kích thÆ°á»›c cá»­a sổ cố định\n/monitor N\tBắt đầu chÆ¡i trên màn hình N, trong đó N bắt đầu từ 1\n/audiorenderer N\tBắt đầu sá»­ dụng trình âm N, trong đó N bắt đầu từ 1\n\t\t(xem thiết lập\"Ngõ ra\")\n/shaderpreset \"Pr\"\tBắt đầu sá»­ dụng \"Pr\" tạo bóng đặt trÆ°á»›c\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tKhôi phục cài đặt mặc định\n/help /h /?\tHiện giúp đỡ vá» chuyển dòng lệnh\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "Cách sá»­ dụng: mpc-hc.exe \"pathname\" [chuyển]\n\n\"pathname\"\tCác tập tin hoặc thÆ° mục chính được nạp (ký tá»± đại diện\n\t\tcho phép, \"-\" biểu thị đầu vào tiêu chuẩn)\n/dub \"dubname\"\tNạp má»™t tập tin âm thanh khác\n/dubdelay \"file\"\tNạp má»™t tập tin âm thanh thêm dịch chuyển XXms (nếu\n\t\ttệp chứa \"...Äá»™ trá»… XX giây...\")\n/d3dfs\t\tBắt đầu dá»±ng hình trong chế Ä‘á»™ toàn màn hình D3D\n/sub \"subname\"\tNạp má»™t file phụ Ä‘á» thêm\n/filter \"filtername\"\tBá»™ lá»c DirectShow tải từ má»™t liên thÆ° viện\n\t\tkết Ä‘á»™ng(ký tá»± đại diện)\n/dvd\t\tChạy chế Ä‘á»™ dvd, \"pathname\" nghÄ©a là thÆ° mục\n\t\tDVD(tùy chá»n)\n/dvdpos T#C\tBắt đầu phát lại tại tiêu Ä‘á» T, chÆ°Æ¡ng C\n/dvdpos T#hh:mm\tPhát lại tại tiêu Ä‘á» T, vị trí gg:pp:gg\n/cd\t\tTải tất cả các bài hát của má»™t Ä‘Ä©a CD âm thanh hoặc (s) VCD,\n\t\t\"pathname\" nghÄ©a là Ä‘Æ°á»ng dẫn cd(tùy chá»n)\n/device\t\tMở thiết bị video mặc định\n/open\t\tMở tập tin, không tá»± Ä‘á»™ng bắt đầu phát lại\n/play\t\tBắt đầu chÆ¡i các tập tin ngay sau trình phát nhạc\n\t\tđã chạy\n/close\t\tÄóng trình phát nhạc sau khi phát lại (chỉ hoạt Ä‘á»™ng khi\n\t\tdùng vá»›i /phát)\n/shutdown\tTắt máy tính, hệ Ä‘iá»u hành sau khi phát lại\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tBắt đầu trong chế Ä‘á»™ toàn màn hình\n/minimized\tBắt đầu trong chế Ä‘á»™ giảm thiểu\n/new\t\tSá»­ dụng má»™t trÆ°á»ng hợp má»›i của trình phát nhạc\n/add\t\tThêm\"pathname\" vào danh sách phát, sẽ kết hợp\n\t\tvá»›i/mở và/phát\n/randomize\tRandomize the playlist\n/regvid\t\tTạo ra các phần mở rá»™ng cho các tập tin video\n/regaud\t\tTạo ra các phần mở rá»™ng cho các tập tin âm thanh\n/regpl\t\tTạo ra các phần mở rá»™ng cho các tập tin danh sách phát\n/regall\t\tTạo ra các phần mở rá»™ng cho các tất cả các tập tin \n/unregall\t\tLoại bá» phần mở rá»™ng\n/start ms\t\tBắt đầu phát lúc \"mlg\" (= mili giây)\n/startpos hh:mm:ss\tPhát tại vị trí gg:pp:gg\n/fixedsize w,h\tThiết lập má»™t kích thÆ°á»›c cá»­a sổ cố định\n/monitor N\tBắt đầu chÆ¡i trên màn hình N, trong đó N bắt đầu từ 1\n/audiorenderer N\tBắt đầu sá»­ dụng trình âm N, trong đó N bắt đầu từ 1\n\t\t(xem thiết lập\"Ngõ ra\")\n/shaderpreset \"Pr\"\tBắt đầu sá»­ dụng \"Pr\" tạo bóng đặt trÆ°á»›c\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tKhôi phục cài đặt mặc định\n/help /h /?\tHiện giúp đỡ vá» chuyển dòng lệnh\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -2751,11 +2747,11 @@ msgstr "Äỉnh trÆ°á»›c phải"
msgctxt "IDS_TIME_TOOLTIP_ABOVE"
msgid "Above seek bar"
-msgstr "Trên thanh dò nhanh"
+msgstr "Phía trên thanh tìm kiếm"
msgctxt "IDS_TIME_TOOLTIP_BELOW"
msgid "Below seek bar"
-msgstr "Dưới thanh dò nhanh"
+msgstr "Phía dưới thanh tìm kiếm"
msgctxt "IDS_VIDEO_STREAM"
msgid "Video: %s"
@@ -3041,18 +3037,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "Tỉ lệ khung hình"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "Sử dụng WASAPI (phát lại khởi động lại)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "Im khi chạy nhan"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "Thiết bị âm thanh:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "VSync: Bật"
@@ -3403,7 +3387,7 @@ msgstr "Lỗi phân tích tỷ lệ khung hình vào!"
msgctxt "IDS_FRAME_STEP_ERROR_RENDERER"
msgid "Cannot frame-step, try a different video renderer."
-msgstr "Không có thể hình thành bước, hãy thử một dựng hình video khác nhau."
+msgstr "Không thể Ä‘á»c khung hình kế tiếp, hãy thá»­ má»™t bá»™ dá»±ng hình khác."
msgctxt "IDS_SCREENSHOT_ERROR_REAL"
msgid "The \"Save Image\" and \"Save Thumbnails\" functions do not work with the default video renderer for RealMedia.\nSelect one of the DirectX renderers for RealMedia in MPC-HC's output options and reopen the file."
@@ -3495,7 +3479,7 @@ msgstr "Bạn cần phải áp dụng các thiết lập má»›i trÆ°á»›c khi thá»
msgctxt "IDS_AFTERPLAYBACK_EXIT"
msgid "After Playback: Exit"
-msgstr "Sau khi xem lại: Thoát"
+msgstr "Sau khi phát xong: Thoát"
msgctxt "IDS_AFTERPLAYBACK_STANDBY"
msgid "After Playback: Stand By"
@@ -3609,3 +3593,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "Thiết lập"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.dialogs.po
index c00b74e02..bf092702c 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.dialogs.po
@@ -2,15 +2,16 @@
# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
-# bruce55 <bruce.luo+transifex@nyu.edu>, 2014
+# bruce55 <bruce.luo+transifex@nyu.edu>, 2014-2015
+# Dean Lee <xslidian@gmail.com>, 2015
# Ming Chen <yzonline@gmail.com>, 2013-2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-17 20:47:27+0000\n"
-"PO-Revision-Date: 2015-05-27 02:40+0000\n"
+"POT-Creation-Date: 2015-10-19 19:15:11+0000\n"
+"PO-Revision-Date: 2015-10-20 10:21+0000\n"
"Last-Translator: Ming Chen <yzonline@gmail.com>\n"
-"Language-Team: Chinese (China) (http://www.transifex.com/projects/p/mpc-hc/language/zh_CN/)\n"
+"Language-Team: Chinese (China) (http://www.transifex.com/mpc-hc/mpc-hc/language/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -99,7 +100,7 @@ msgstr "增益:"
msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK3"
msgid "Down-sample to 44100 Hz"
-msgstr "é™ä½Žé‡‡æ ·çŽ‡è‡³44100 Hz"
+msgstr "é™ä½Žé‡‡æ ·çŽ‡è‡³ 44100 Hz"
msgctxt "IDD_PPAGEAUDIOSWITCHER_IDC_CHECK4"
msgid "Audio time shift (ms):"
@@ -127,7 +128,7 @@ msgstr "转到..."
msgctxt "IDD_GOTO_DLG_IDC_STATIC"
msgid "Enter a timecode using the format [hh:]mm:ss.ms to jump to a specified time. You do not need to enter the separators explicitly."
-msgstr "请使用 [hh:]mm:ss.ms 为格å¼çš„时间代ç æ¥è·³è½¬åˆ°æŒ‡å®šçš„时间。您无需输入特定的分隔符。"
+msgstr "请输入 [hh:]mm:ss.ms æ ¼å¼çš„时间ç æ¥è·³è½¬åˆ°æŒ‡å®šä½ç½®ã€‚分隔符ä¸å¿…特别输入。"
msgctxt "IDD_GOTO_DLG_IDC_STATIC"
msgid "Time"
@@ -139,7 +140,7 @@ msgstr "跳转!"
msgctxt "IDD_GOTO_DLG_IDC_STATIC"
msgid "Enter two numbers to jump to a specified frame, the first is the frame number, the second is the frame rate."
-msgstr "请输入两个数字æ¥è·³è½¬åˆ°ä¸€ä¸ªæŒ‡å®šçš„帧,第一个数字是帧数,第二个数字是帧率。"
+msgstr "请输入两个数字æ¥è·³è½¬åˆ°ç‰¹å®šçš„帧,第一个数字是帧åºå·ï¼Œç¬¬äºŒä¸ªæ•°å­—是帧率。"
msgctxt "IDD_GOTO_DLG_IDC_STATIC"
msgid "Frame"
@@ -183,7 +184,7 @@ msgstr "å–消"
msgctxt "IDD_OPEN_DLG_IDC_CHECK1"
msgid "Add to playlist without opening"
-msgstr "添加到播放列表但ä¸è¦æ’­æ”¾"
+msgstr "添加到播放列表但ä¸è¦æ‰“å¼€"
msgctxt "IDD_ABOUTBOX_CAPTION"
msgid "About"
@@ -199,7 +200,7 @@ msgstr "此程åºæ˜¯éµå®ˆ GNU 通用公众授æƒåè®®å‘布的自由软件。"
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "English translation made by MPC-HC Team"
-msgstr "简体中文翻译由风影幻想和酷剑è²å¿ƒåˆ¶ä½œ"
+msgstr "简体中文翻译由Transifex上的志愿者维护"
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "Build information"
@@ -267,7 +268,7 @@ msgstr "仅文件å"
msgctxt "IDD_PPAGEPLAYER_IDC_RADIO5"
msgid "Don't prefix anything"
-msgstr "ä¸é™„加任何信æ¯"
+msgstr "ä¸é™„加任何å‰ç¼€ä¿¡æ¯"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK13"
msgid "Replace file name with title"
@@ -355,7 +356,7 @@ msgstr "总是打开默认的ä½ç½®:"
msgctxt "IDD_PPAGEDVD_IDC_STATIC"
msgid "Preferred language for DVD Navigator and the external OGM Splitter"
-msgstr "首选的 DVD 导航器和扩展 OGM 分离器语言"
+msgstr "DVD 导航器åŠå¤–部 OGM 分离器的首选语言"
msgctxt "IDD_PPAGEDVD_IDC_RADIO3"
msgid "Menu"
@@ -435,7 +436,7 @@ msgstr "自动缩放:"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC2"
msgid "Auto fit factor:"
-msgstr "自动适应因素:"
+msgstr "自动适应因数:"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC3"
msgid "%"
@@ -443,7 +444,7 @@ msgstr "%"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Default track preference"
-msgstr "默认轨é“优先"
+msgstr "默认轨é“å好"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Subtitles:"
@@ -467,16 +468,12 @@ msgstr "使用工作线程æ¥åˆ›å»ºæ»¤é•œå›¾åƒ"
msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK6"
msgid "Report pins which fail to render"
-msgstr "报告渲染失败的帧"
+msgstr "渲染失败时报告 pin"
msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "自动装载音频文件"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "使用内建的字幕渲染器"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "控制"
@@ -523,11 +520,11 @@ msgstr "毫秒"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "Texture settings (open the video again to see the changes)"
-msgstr "纹ç†è®¾ç½® (请é‡æ–°æ‰“开视频æ¥æŸ¥çœ‹æ›´æ”¹æ•ˆæžœ)"
+msgstr "纹ç†è®¾ç½® (请é‡æ–°æ‰“开视频æ¥æŸ¥çœ‹æ•ˆæžœ)"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "Sub pictures to buffer:"
-msgstr "å­ç”»é¢åˆ°ç¼“å­˜:"
+msgstr "缓冲å­ç”»é¢:"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "Maximum texture resolution:"
@@ -603,7 +600,7 @@ msgstr "设置为默认程åº(&D)"
msgctxt "IDD_PPAGEFORMATS_IDC_STATIC"
msgid "Real-Time Streaming Protocol handler (for rtsp://... URLs)"
-msgstr "实时æµå议头部 (适用于 rtsp://... URL)"
+msgstr "接管实时æµåè®® (å³ rtsp://... URL)"
msgctxt "IDD_PPAGEFORMATS_IDC_RADIO1"
msgid "RealMedia"
@@ -663,7 +660,7 @@ msgstr "默认"
msgctxt "IDD_PPAGETWEAKS_IDC_FASTSEEK_CHECK"
msgid "Fast seek (on keyframe)"
-msgstr "快速æœç´¢ (以关键帧)"
+msgstr "å¿«é€Ÿå®šä½ (按关键帧)"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK2"
msgid "Show chapter marks in seek bar"
@@ -677,9 +674,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "在éžé»˜è®¤æ˜¾ç¤ºå™¨ä¸Šå…¨å±æ—¶é˜²æ­¢æ’­æ”¾å™¨è¢«æœ€å°åŒ–"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "使用 Windows 7 任务æ åŠŸèƒ½"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr "使用增强任务æ åŠŸèƒ½"
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -751,7 +748,7 @@ msgstr "类型:"
msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
msgid "Size:"
-msgstr "容é‡:"
+msgstr "大å°:"
msgctxt "IDD_FILEPROPDETAILS_IDC_STATIC"
msgid "Media length:"
@@ -787,7 +784,7 @@ msgstr "ä½ç½®:"
msgctxt "IDD_FILEPROPCLIP_IDC_STATIC"
msgid "Description:"
-msgstr "注释:"
+msgstr "æè¿°:"
msgctxt "IDD_FAVADD_CAPTION"
msgid "Add Favorite"
@@ -839,7 +836,7 @@ msgstr "确定"
msgctxt "IDD_PNSPRESET_DLG_CAPTION"
msgid "Pan&Scan Presets"
-msgstr "全景和扫æ预设"
+msgstr "全景扫æ预设"
msgctxt "IDD_PNSPRESET_DLG_IDC_BUTTON2"
msgid "New"
@@ -895,7 +892,7 @@ msgstr "警告"
msgctxt "IDD_MEDIATYPES_DLG_IDC_STATIC1"
msgid "MPC-HC could not render some of the pins in the graph, you may not have the needed codecs or filters installed on the system."
-msgstr "MPC-HC 无法渲染图åƒä¸­çš„æŸäº›å¸§,您或许未在系统中安装所需的解ç å™¨æˆ–者分离器。"
+msgstr "MPC-HC 无法渲染图åƒä¸­çš„æŸäº› pin,您的系统中å¯èƒ½æ²¡æœ‰å®‰è£…所需的解ç å™¨æˆ–分离器。"
msgctxt "IDD_MEDIATYPES_DLG_IDC_STATIC2"
msgid "The following pin(s) failed to find a connectable filter:"
@@ -1143,7 +1140,7 @@ msgstr "选择 D3D9 渲染设备"
msgctxt "IDD_PPAGEOUTPUT_IDC_RESETDEVICE"
msgid "Reinitialize when changing display"
-msgstr "在更改显示时é‡æ–°åˆå§‹åŒ–"
+msgstr "在更改显示器时é‡æ–°åˆå§‹åŒ–"
msgctxt "IDD_PPAGEOUTPUT_IDC_FULLSCREEN_MONITOR_CHECK"
msgid "D3D Fullscreen"
@@ -1170,8 +1167,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "字幕 *"
+msgid "Subtitles"
+msgstr "字幕"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1186,8 +1183,8 @@ msgid "Rotation"
msgstr "旋转"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* 外部滤镜 (例如 VSFilter) å¯ä»¥åœ¨æ‰€æœ‰æ¸²æŸ“器下显示字幕。"
+msgid "Subtitle Renderer"
+msgstr "字幕渲染器"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1203,7 +1200,11 @@ msgstr "å¼€å¯åŽ‹ç¼©"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
-msgstr "ä»…å…许访问本地用户"
+msgstr "ä»…å…许从 localhost 访问"
+
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "å¯ç”¨é¢„览"
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
@@ -1219,7 +1220,7 @@ msgstr "æµè§ˆ..."
msgctxt "IDD_PPAGEWEBSERVER_IDC_BUTTON2"
msgid "Deploy..."
-msgstr "é…ç½®..."
+msgstr "部署..."
msgctxt "IDD_PPAGEWEBSERVER_IDC_STATIC"
msgid "Default page:"
@@ -1227,7 +1228,7 @@ msgstr "默认页:"
msgctxt "IDD_PPAGEWEBSERVER_IDC_STATIC"
msgid "CGI handlers: (.ext1=path1;.ext2=path2;...)"
-msgstr "CGI æ“作器: (.ext1=路径1; .ext2=路径2; ...)"
+msgstr "CGI 接管: (.扩展å1=路径1; .扩展å2=路径2; ...)"
msgctxt "IDD_SUBTITLEDL_DLG_CAPTION"
msgid "Subtitles available online"
@@ -1279,7 +1280,7 @@ msgstr "å¼€å¯è‡ªåŠ¨æ£€æµ‹æ›´æ–°"
msgctxt "IDD_PPAGEMISC_IDC_STATIC5"
msgid "Check every:"
-msgstr "æ¯æ¬¡æ£€æµ‹:"
+msgstr "检测间隔:"
msgctxt "IDD_PPAGEMISC_IDC_STATIC6"
msgid "day(s)"
@@ -1455,7 +1456,7 @@ msgstr "更改将在播放被关闭并é‡æ–°å¯åŠ¨åŽç”Ÿæ•ˆã€‚"
msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK1"
msgid "Launch files in fullscreen"
-msgstr "在全å±å¹•ä¸­å¯åŠ¨æ–‡ä»¶"
+msgstr "打开文件时全å±å¹•å¯åŠ¨"
msgctxt "IDD_PPAGEFULLSCREEN_IDC_CHECK4"
msgid "Hide controls in fullscreen"
@@ -1547,7 +1548,7 @@ msgstr "在线数æ®åº“"
msgctxt "IDD_PPAGESUBMISC_IDC_STATIC"
msgid "Base URL of the online subtitle database:"
-msgstr "在线字幕数æ®åº“的基础 URL:"
+msgstr "在线字幕数æ®åº“的基本 URL:"
msgctxt "IDD_PPAGESUBMISC_IDC_BUTTON2"
msgid "Test"
@@ -1653,6 +1654,50 @@ msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "默认"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "设备"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "独å æ¨¡å¼"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "å…许比特æµ"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "选项"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "å¯ç”¨äº¤å‰é¦ˆéŸ³ (耳机用)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr "C. Moy"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr "J. Meier"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr "截断:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "电平:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "注释"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr "为了尽å¯èƒ½å‡å°‘音频失真,推è在播放大音é‡æœ‰æŸç¼–ç å†…容的时候将播放器音é‡æŽ§åˆ¶åœ¨85%å·¦å³ã€‚"
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
msgstr "JPEG è´¨é‡:"
@@ -1669,9 +1714,17 @@ msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
msgstr "崩溃报告"
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "éžå¸¸æŠ±æ­‰ï¼ŒMPC-HC看起æ¥å´©æºƒäº†ã€‚:("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "上报错误报告æ¥å¸®åŠ©æˆ‘们诊断和修å¤é—®é¢˜"
+
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr "éžå¸¸æŠ±æ­‰ï¼ŒMPC-HC看起æ¥å´©æºƒäº†ã€‚ :(\n\n为了帮助我们诊断和修å¤é—®é¢˜ï¼Œç¨‹åºå°†ä¸ŠæŠ¥é”™è¯¯æŠ¥å‘Šã€‚您还å¯ä»¥æ供一些é¢å¤–çš„ä¿¡æ¯ã€‚"
+msgid "Optional information"
+msgstr "å¯é€‰ä¿¡æ¯"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
@@ -1679,13 +1732,17 @@ msgstr "邮箱:"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC3"
msgid "Your email address is optional and will only be used if the developers need to contact you for more information."
-msgstr "您也å¯ä»¥é€‰æ‹©ä¸æ供邮箱地å€ã€‚åªæœ‰åœ¨å¼€å‘人员需è¦è”系您获得更多信æ¯çš„时候æ‰ä¼šå‘您å‘é€é‚®ä»¶ã€‚"
+msgstr "您å¯ä»¥é€‰æ‹©ä¸å¡«å†™é‚®ç®±åœ°å€ã€‚åªæœ‰åœ¨å¼€å‘人员需è¦è”系您了解更多信æ¯çš„时候æ‰ä¼šå‘您å‘é€é‚®ä»¶ã€‚"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
msgstr "问题æè¿° (åªèƒ½ç”¨è‹±æ–‡æ’°å†™):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr "确定"
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "é‡æ–°å¯åŠ¨ MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "退出 MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.menus.po
index 154bb3f63..c8d88af32 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.menus.po
@@ -3,15 +3,16 @@
# This file is distributed under the same license as the MPC-HC package.
# Translators:
# bruce55 <bruce.luo+transifex@nyu.edu>, 2014
+# Dean Lee <xslidian@gmail.com>, 2015
# kasper93, 2013
# Ming Chen <yzonline@gmail.com>, 2013-2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-22 20:53:41+0000\n"
-"PO-Revision-Date: 2015-05-27 02:30+0000\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-07-20 08:01+0000\n"
"Last-Translator: Ming Chen <yzonline@gmail.com>\n"
-"Language-Team: Chinese (China) (http://www.transifex.com/projects/p/mpc-hc/language/zh_CN/)\n"
+"Language-Team: Chinese (China) (http://www.transifex.com/mpc-hc/mpc-hc/language/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -56,7 +57,7 @@ msgstr "关闭(&C)"
msgctxt "ID_FILE_SAVE_COPY"
msgid "&Save a Copy..."
-msgstr "ä¿å­˜ä¸ºä¸€ä¸ªå‰¯æœ¬(&S)..."
+msgstr "ä¿å­˜å‰¯æœ¬(&S)..."
msgctxt "ID_FILE_SAVE_IMAGE"
msgid "Save &Image..."
@@ -252,7 +253,7 @@ msgstr "åŠæµ®ç‚¹å¤„ç†(&H)"
msgctxt "ID_VIEW_DISABLEDESKTOPCOMPOSITION"
msgid "Disable desktop composition (&Aero)"
-msgstr "关闭桌é¢ç»„件 (&Aero)"
+msgstr "关闭桌é¢åˆæˆ (&Aero)"
msgctxt "ID_VIEW_ENABLEFRAMETIMECORRECTION"
msgid "Enable Frame Time &Correction"
@@ -516,7 +517,7 @@ msgstr "当播放时(&P)"
msgctxt "ID_ONTOP_WHILEPLAYINGVIDEO"
msgid "While Playing &Video"
-msgstr "在播放视频时(&V)..."
+msgstr "仅播放视频时(&V)"
msgctxt "ID_VIEW_OPTIONS"
msgid "&Options..."
@@ -560,15 +561,15 @@ msgstr "ç€è‰²å™¨(&H)"
msgctxt "ID_AUDIOS"
msgid "&Audio Track"
-msgstr "音频轨é“(&A)"
+msgstr "音频轨(&A)"
msgctxt "ID_SUBTITLES"
msgid "Su&btitle Track"
-msgstr "字幕轨é“(&B)"
+msgstr "字幕轨(&B)"
msgctxt "ID_VIDEO_STREAMS"
msgid "&Video Track"
-msgstr "视频轨é“(&V)"
+msgstr "视频轨(&V)"
msgctxt "POPUP"
msgid "&Volume"
@@ -576,11 +577,11 @@ msgstr "音é‡(&V)"
msgctxt "ID_VOLUME_UP"
msgid "&Up"
-msgstr "上å‡(&U)"
+msgstr "增高(&U)"
msgctxt "ID_VOLUME_DOWN"
msgid "&Down"
-msgstr "下é™(&D)"
+msgstr "é™ä½Ž(&D)"
msgctxt "ID_VOLUME_MUTE"
msgid "&Mute"
@@ -684,7 +685,7 @@ msgstr "检查更新(&U)"
msgctxt "ID_HELP_SHOWCOMMANDLINESWITCHES"
msgid "&Command Line Switches"
-msgstr "命令行开关符(&C)"
+msgstr "命令行选项(&C)"
msgctxt "ID_HELP_TOOLBARIMAGES"
msgid "Download &Toolbar Images"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.strings.po
index 9d9b0dea2..6906e7c95 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.zh_CN.strings.po
@@ -2,16 +2,17 @@
# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
-# bruce55 <bruce.luo+transifex@nyu.edu>, 2014
+# bruce55 <bruce.luo+transifex@nyu.edu>, 2014-2015
+# Dean Lee <xslidian@gmail.com>, 2015
# hkenneth <extremekeny@hotmail.com>, 2013
# Ming Chen <yzonline@gmail.com>, 2013-2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2015-05-21 13:30:54+0000\n"
-"PO-Revision-Date: 2015-05-27 02:40+0000\n"
-"Last-Translator: Ming Chen <yzonline@gmail.com>\n"
-"Language-Team: Chinese (China) (http://www.transifex.com/projects/p/mpc-hc/language/zh_CN/)\n"
+"POT-Creation-Date: 2015-10-25 00:51:15+0000\n"
+"PO-Revision-Date: 2015-11-08 09:31+0000\n"
+"Last-Translator: JellyFrog\n"
+"Language-Team: Chinese (China) (http://www.transifex.com/mpc-hc/mpc-hc/language/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -56,7 +57,7 @@ msgstr "播放音频 CD"
msgctxt "IDS_AUTOPLAY_PLAYDVDMOVIE"
msgid "Play DVD Movie"
-msgstr "播放 DVD 电影"
+msgstr "播放 DVD 影片"
msgctxt "IDS_PROPSHEET_PROPERTIES"
msgid "Properties"
@@ -136,7 +137,7 @@ msgstr "ä¸æ”¯æŒæŸäº›è®¾å¤‡ã€‚在滤镜图表中总是会出现两个视频解
msgctxt "IDS_PPAGE_CAPTURE_FGDESC1"
msgid "Fast except when switching between different video streams. Only one video decoder present in the filter graph."
-msgstr "在ä¸åŒè§†é¢‘æµä¹‹é—´åˆ‡æ¢çš„最快方å¼ã€‚åªä¼šåœ¨æ»¤é•œå›¾è¡¨ä¸­å‡ºçŽ°ä¸€ä¸ªè§†é¢‘解ç å™¨ã€‚"
+msgstr "在ä¸åŒè§†é¢‘æµä¹‹é—´åˆ‡æ¢ä»¥å¤–情况下的最快方å¼ã€‚åªä¼šåœ¨æ»¤é•œå›¾è¡¨ä¸­å‡ºçŽ°ä¸€ä¸ªè§†é¢‘解ç å™¨ã€‚"
msgctxt "IDS_PPAGE_CAPTURE_FGDESC2"
msgid "Not recommended. Only for testing purposes."
@@ -260,7 +261,7 @@ msgstr "无法添加音频æ•èŽ·æ»¤é•œåˆ°å›¾è¡¨ä¸­"
msgctxt "IDS_CAPTURE_ERROR_DEVICE"
msgid "Could not open capture device."
-msgstr "无法打开设备。"
+msgstr "无法打开æ•èŽ·è®¾å¤‡ã€‚"
msgctxt "IDS_INVALID_PARAMS_ERROR"
msgid "Can't open, invalid input parameters"
@@ -327,12 +328,12 @@ msgid "On/Off"
msgstr "å¼€/å…³"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "从 FPS"
+msgid "From (FPS)"
+msgstr "从 (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "到 FPS"
+msgid "To (FPS)"
+msgstr "到 (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -412,7 +413,7 @@ msgstr "删除(&D)"
msgctxt "IDS_SUBRESYNC_DUPLICATE"
msgid "D&uplicate"
-msgstr "é‡è¦†(&U)"
+msgstr "é‡å¤(&U)"
msgctxt "IDS_SUBRESYNC_RESET"
msgid "&Reset"
@@ -466,6 +467,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "回放::ç€è‰²å™¨"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "资æº"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "其它"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "MediaInfo"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "回放::采集"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "回放::åŒæ­¥æ¸²æŸ“器设置"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "回放::å…¨å±å¹•"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr "内部滤镜::音频渲染器"
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "音频切æ¢å™¨"
@@ -558,30 +587,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "字幕::æ•°æ®åº“"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "资æº"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "其它"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "回放::采集"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "回放::åŒæ­¥æ¸²æŸ“器设置"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "回放::å…¨å±å¹•"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "详细信æ¯"
@@ -624,7 +629,7 @@ msgstr "与 VMR-9 (未渲染) 相åŒ, 但是使用了一个真正的åŒä¸‰æ¬¡æˆ
msgctxt "IDC_DSNULL_COMP"
msgid "Connects to any video-like media type and will send the incoming samples to nowhere. Use it when you don't need the video display and want to save the CPU from working unnecessarily."
-msgstr "连接到任æ„视频文件类型并且会将进入的采样信æ¯ä¼ é€åˆ°ä»»æ„地方。当您ä¸éœ€è¦æ˜¾ç¤ºè§†é¢‘并希望节çœä¸å¿…è¦çš„ CPU 资æºæ—¶è¯·ä½¿ç”¨å®ƒã€‚"
+msgstr "连接到任æ„类视频文件类型,并将进入的采样信æ¯åžå™¬ã€‚当您ä¸éœ€è¦æ˜¾ç¤ºè§†é¢‘并希望节çœä¸å¿…è¦çš„ CPU 资æºæ—¶è¯·ä½¿ç”¨å®ƒã€‚"
msgctxt "IDC_DSNULL_UNCOMP"
msgid "Same as the normal Null renderer, but this will only connect to uncompressed types."
@@ -674,22 +679,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "视频层将被分é…为普通的离å±å±‚。"
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC 音频渲染器已æŸå, ä¸è¦ä½¿ç”¨ã€‚"
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "åŒæ­¥æ¸²æŸ“器"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - 报告一个 bug"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC å·²ç»å´©æºƒäº†ä½†æ˜¯æ­¤æž„建是被编译为无调试信æ¯çš„。\n如果您想报告此 bug, 您应该首先å°è¯•å®˜æ–¹æž„建的版本。\n\n您è¦ç«‹å³è®¿é—®ä¸‹è½½é¡µå—?"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "标准离å±è¡¨é¢"
@@ -742,9 +735,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "空 (未压缩)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC 音频渲染器"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr "内部音频渲染器"
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -808,7 +801,7 @@ msgstr "å°† VMR-9 (未渲染) 放置到混åˆå™¨æ¨¡å¼ä¸­,这将会使许多在å
msgctxt "IDC_DSVMR9YUVMIXER"
msgid "Improves performance at the cost of some compatibility of the renderer."
-msgstr "改进æŸäº›å…¼å®¹æ¸²æŸ“器的性能。"
+msgstr "æå‡æ€§èƒ½ï¼Œä»£ä»·æ˜¯é™ä½ŽæŸäº›æ¸²æŸ“器的兼容性。"
msgctxt "IDC_FULLSCREEN_MONITOR_CHECK"
msgid "Reduces tearing but prevents the toolbar from being shown."
@@ -820,7 +813,7 @@ msgstr "通过绕过内建于 D3D 中的垂直åŒæ­¥æ¥å‡å°‘撕裂现象。"
msgctxt "IDS_SRC_VTS"
msgid "Open VTS_xx_0.ifo to load VTS_xx_x.vob files in one piece"
-msgstr "打开 VTS_xx_0.ifo 以在åŒä¸€å¤„载入 VTS_xx_x.vob 文件"
+msgstr "打开 VTS_xx_0.ifo å¯åŒæ—¶åŠ è½½ VTS_xx_x.vob 文件"
msgctxt "IDS_SRC_RFS"
msgid "Based on RARFileSource, doesn't support compressed files"
@@ -956,7 +949,7 @@ msgstr "管ç†æ”¶è—夹(&O)..."
msgctxt "IDS_PLAYLIST_SHUFFLE"
msgid "Shuffle"
-msgstr "拖曳"
+msgstr "ä¹±åº"
msgctxt "IDS_PLAYLIST_SHOWFOLDER"
msgid "Open file location"
@@ -992,7 +985,7 @@ msgstr "EDL ä¿å­˜"
msgctxt "IDS_AG_ENABLEFRAMETIMECORRECTION"
msgid "Enable Frame Time Correction"
-msgstr "开始帧计时修正"
+msgstr "å¼€å¯å¸§è®¡æ—¶ä¿®æ­£"
msgctxt "IDS_AG_TOGGLE_EDITLISTEDITOR"
msgid "Toggle EDL window"
@@ -1000,11 +993,11 @@ msgstr "åˆ‡æ¢ EDL 窗å£"
msgctxt "IDS_AG_EDL_IN"
msgid "EDL set In"
-msgstr "EDL 装入"
+msgstr "EDL 输入"
msgctxt "IDS_AG_EDL_OUT"
msgid "EDL set Out"
-msgstr "EDL 开始"
+msgstr "EDL 输出"
msgctxt "IDS_AG_PNS_ROTATEX_M"
msgid "PnS Rotate X-"
@@ -1104,7 +1097,7 @@ msgstr "分级"
msgctxt "IDS_INFOBAR_DESCRIPTION"
msgid "Description"
-msgstr "注释"
+msgstr "æè¿°"
msgctxt "IDS_INFOBAR_DOMAIN"
msgid "Domain"
@@ -1128,11 +1121,11 @@ msgstr "按键"
msgctxt "IDS_AG_MOUSE"
msgid "Mouse Windowed"
-msgstr "鼠标窗å£åŒ–"
+msgstr "窗å£ä¸­çš„é¼ æ ‡"
msgctxt "IDS_AG_MOUSE_FS"
msgid "Mouse Fullscreen"
-msgstr "鼠标全å±"
+msgstr "å…¨å±çŠ¶æ€çš„é¼ æ ‡"
msgctxt "IDS_AG_APP_COMMAND"
msgid "App Command"
@@ -1232,7 +1225,7 @@ msgstr "+%d%%"
msgctxt "IDS_PLAYLIST_ADDFOLDER"
msgid "Add containing folder"
-msgstr "添加内容文件夹"
+msgstr "添加å­æ–‡ä»¶å¤¹"
msgctxt "IDS_HW_INDICATOR"
msgid "[H/W]"
@@ -1352,7 +1345,7 @@ msgstr "å‘下移动"
msgctxt "IDS_NAVIGATION_SORT"
msgid "Sort by LCN"
-msgstr "LCN æ­£åº"
+msgstr "按 LCN 排åº"
msgctxt "IDS_NAVIGATION_REMOVE_ALL"
msgid "Remove all"
@@ -1394,6 +1387,26 @@ msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
msgstr "回放结æŸåŽ: 关闭"
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr "MPC-HC在åˆå§‹åŒ–æ—¶é‡åˆ°é—®é¢˜ã€‚ 您或许å¯ä»¥å¸®æˆ‘们解决这个问题。\n\n您想报告问题报告å—?"
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr "如果音频æå‰ï¼Œè¾“入正数,如果音频延åŽï¼Œè¾“入负数。"
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "预览目å‰å¤„于ç¦ç”¨çŠ¶æ€ã€‚您å¯ä»¥åœ¨ MPC-HC 的选项é¢æ¿ä¸­å¯ç”¨ã€‚"
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr "该功能å¯ç”¨äºŽä»Žè¿œç¨‹ä½ç½®é¢„览媒体文件。请仅在确ä¿å®‰å…¨æ€§çš„ç§æœ‰ç½‘络中å¯ç”¨ã€‚\n\n您真的è¦å¯ç”¨è¯¥åŠŸèƒ½å—?"
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
+msgstr "内部字幕渲染器"
+
msgctxt "IDS_AG_OPEN_DEVICE"
msgid "Open Device"
msgstr "打开设备"
@@ -1492,19 +1505,19 @@ msgstr "移动到回收站"
msgctxt "IDS_AG_SAVE_COPY"
msgid "Save a Copy"
-msgstr "ä¿å­˜ä¸ºä¸€ä¸ªå‰¯æœ¬"
+msgstr "ä¿å­˜å‰¯æœ¬"
msgctxt "IDS_FASTSEEK_LATEST"
msgid "Latest keyframe"
-msgstr "最近的关键帧"
+msgstr "å‘å‰æœå¯»æœ€è¿‘关键帧"
msgctxt "IDS_FASTSEEK_NEAREST"
msgid "Nearest keyframe"
-msgstr "最接近的关键帧"
+msgstr "å‰åŽæœå¯»æœ€è¿‘关键帧"
msgctxt "IDS_HOOKS_FAILED"
msgid "MPC-HC encountered a problem during initialization. DVD playback may not work correctly. This might be caused by some incompatibilities with certain security tools.\n\nDo you want to report this issue?"
-msgstr "MPC-HC 在åˆå§‹åŒ–æ—¶é‡åˆ°äº†ä¸€ä¸ªé—®é¢˜ã€‚DVD 播放å¯èƒ½ä¸æ­£ç¡®ã€‚è¿™å¯èƒ½æ˜¯æŸäº›å®‰å…¨å·¥å…·å¯¼è‡´çš„ä¸å…¼å®¹ã€‚\n\n您è¦æŠ¥å‘Šæ­¤é—®é¢˜å—?"
+msgstr "MPC-HC 在åˆå§‹åŒ–æ—¶é‡åˆ°äº†ä¸€ä¸ªé—®é¢˜ã€‚DVD 播放å¯èƒ½ä¸æ­£å¸¸ã€‚è¿™å¯èƒ½æ˜¯æŸäº›å®‰å…¨å·¥å…·å¯¼è‡´çš„ä¸å…¼å®¹ã€‚\n\n您è¦æŠ¥å‘Šæ­¤é—®é¢˜å—?"
msgctxt "IDS_PPAGEFULLSCREEN_SHOWNEVER"
msgid "Never show"
@@ -1520,7 +1533,7 @@ msgstr "光标ç»è¿‡æŽ§åˆ¶æ åŒºåŸŸæ—¶æ˜¾ç¤º, éšè—在:"
msgctxt "IDS_MAINFRM_PRE_SHADERS_FAILED"
msgid "Failed to set pre-resize shaders"
-msgstr "设置é‡ç»˜å°ºå¯¸ç€è‰²å™¨å‰å¤±è´¥"
+msgstr "设置é‡ç»˜å°ºå¯¸å‰ç€è‰²å™¨å¤±è´¥"
msgctxt "IDS_OSD_RS_FT_CORRECTION_ON"
msgid "Frame Time Correction: On"
@@ -1548,7 +1561,7 @@ msgstr "æˆåŠŸä¿å­˜ç¼©ç•¥å›¾"
msgctxt "IDS_MENU_VIDEO_STREAM"
msgid "&Video Track"
-msgstr "视频轨é“(&V)"
+msgstr "视频轨(&V)"
msgctxt "IDS_MENU_VIDEO_ANGLE"
msgid "Video Ang&le"
@@ -1678,6 +1691,14 @@ msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
msgstr "OSD: 显示文件å"
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "播放 DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "播放 BD"
+
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
msgstr "OSD: 显示渲染器统计"
@@ -1959,20 +1980,20 @@ msgid "Options"
msgstr "选项"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "下一æ¡éŸ³è½¨"
+msgid "Next Audio Track"
+msgstr "下一æ¡éŸ³é¢‘轨"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "上一æ¡éŸ³è½¨"
+msgid "Prev Audio Track"
+msgstr "上一æ¡éŸ³é¢‘轨"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "下一个字幕"
+msgid "Next Subtitle Track"
+msgstr "下一个字幕轨"
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "上一个字幕"
+msgid "Prev Subtitle Track"
+msgstr "上一个字幕轨"
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1982,22 +2003,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "é‡æ–°è£…载字幕"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "下一æ¡éŸ³è½¨ (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "上一æ¡éŸ³è½¨ (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "下一个字幕 (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "上一个字幕 (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "下一视角 (DVD)"
@@ -2007,20 +2012,20 @@ msgid "Prev Angle (DVD)"
msgstr "上一视角 (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "下一音轨 (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "下一æ¡éŸ³é¢‘轨 (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "上一音轨 (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "上一æ¡éŸ³é¢‘轨 (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "下一个字幕 (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr "下一个字幕轨 (DVD)"
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "上一字幕 (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr "上一个字幕轨 (DVD)"
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2040,7 +2045,7 @@ msgstr "快速添加至收è—夹"
msgctxt "IDS_DVB_CHANNEL_NUMBER"
msgid "N"
-msgstr "ç¼–å·"
+msgstr "N"
msgctxt "IDS_DVB_CHANNEL_NAME"
msgid "Name"
@@ -2156,7 +2161,7 @@ msgstr "DVD: 未预料的错误"
msgctxt "IDS_MAINFRM_17"
msgid "DVD: Copy-Protect Fail"
-msgstr "DVD: å¤åˆ¶ä¿æŠ¤å¤±è´¥"
+msgstr "DVD: å—å¤åˆ¶ä¿æŠ¤é˜»æ­¢"
msgctxt "IDS_MAINFRM_18"
msgid "DVD: Invalid DVD 1.x Disc"
@@ -2164,7 +2169,7 @@ msgstr "DVD: 无效的 DVD 1.x 光盘"
msgctxt "IDS_MAINFRM_19"
msgid "DVD: Invalid Disc Region"
-msgstr "DVD: 无效的光盘区域"
+msgstr "DVD: 无效的光盘区ä½ç "
msgctxt "IDS_MAINFRM_20"
msgid "DVD: Low Parental Level"
@@ -2284,7 +2289,7 @@ msgstr "无法创建文件"
msgctxt "IDS_THUMBNAILS_NO_DURATION"
msgid "Cannot create thumbnails for files with no duration"
-msgstr "无法创建没有æŒç»­æ—¶é—´çš„缩略图文件"
+msgstr "无法为没有æŒç»­æ—¶é—´çš„文件创建缩略图"
msgctxt "IDS_THUMBNAILS_NO_FRAME_SIZE"
msgid "Failed to get video frame size"
@@ -2292,7 +2297,7 @@ msgstr "获å–视频画é¢å¤§å°å¤±è´¥"
msgctxt "IDS_OUT_OF_MEMORY"
msgid "Out of memory, go buy some more!"
-msgstr "内存溢出,赶快去买!"
+msgstr "内存ä¸è¶³ï¼Œå†ä¹°å‡ æ ¹å§!"
msgctxt "IDS_THUMBNAILS_INVALID_FORMAT"
msgid "Invalid image format, cannot create thumbnails out of %d bpp dibs."
@@ -2336,7 +2341,7 @@ msgstr "章节 %d"
msgctxt "IDS_AG_OUT_OF_MEMORY"
msgid "Out of memory"
-msgstr "内存溢出"
+msgstr "内存ä¸è¶³"
msgctxt "IDS_MAINFRM_77"
msgid "Error: Adobe Flash Player for Internet Explorer is required"
@@ -2364,7 +2369,7 @@ msgstr "渲染文件失败"
msgctxt "IDS_PPSDB_BADURL"
msgid "Bad URL, could not locate subtitle database there!"
-msgstr "错误的 URL,无法定ä½å­—幕数æ®åº“ï¼"
+msgstr "错误的 URL,无法在该ä½ç½®æ‰¾åˆ°å­—幕数æ®åº“ï¼"
msgctxt "IDS_AG_CHAPTER2"
msgid "Chapter: "
@@ -2386,14 +2391,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "当å‰"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC 已被异常终止。è¦å¸®åŠ©æˆ‘们修å¤æ­¤é—®é¢˜, 请将此文件 \"%s\" å‘é€è‡³æˆ‘们的 bug 跟踪器上。\n\n您是å¦è¦æ‰“å¼€å«æœ‰è¿·ä½ è½¬å‚¨æ–‡ä»¶çš„文件夹并访问 bug 跟踪器?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "创建转储文件到 \"%s\" 失败 (错误 %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "选择目录"
@@ -2480,7 +2477,7 @@ msgstr "无法打开任何设备"
msgctxt "IDS_AG_SOUND"
msgid "Sound"
-msgstr "音频"
+msgstr "声音"
msgctxt "IDS_MAINFRM_114"
msgid "%s was not found, please insert media containing this file."
@@ -2567,12 +2564,12 @@ msgid "Volume boost Max"
msgstr "最大音é‡æŽ¨è¿›"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "用法: mpc-hc.exe \"路径å\" [开关]\n\n\"路径å\"\t\t表示è¦è½½å…¥çš„主文件或目录 (å…许通é…符, \"-\" 表示标准输入)\n/dub \"é…音å\"\t载入一个附加的音频文件\n/dubdelay \t\"文件\"载入音频文件延迟 XXms (å¦‚æžœè¯¥æ–‡ä»¶åŒ…å« \"...延迟 XXms...\")\n/d3dfs\t\t在 D3D å…¨å±å¹•æ¨¡å¼å¼€å§‹æ¸²æŸ“\n/sub \"字幕å\"\t载入一个附加的字幕文件\n/filter \"滤镜å\"\t从一个动æ€é“¾æŽ¥åº“中载入 DirectShow 滤镜 (å…许通é…符)\n/dvd\t\tè¿è¡Œ DVD 模å¼, \"路径å\" 表示 dvd 文件夹 (å¯é€‰)\n/dvdpos T#C\t从标题 T, 章节 C 开始播放\n/dvdpos T#hh:mm\t从标题 T, ä½ç½® hh:mm:ss 开始播放\n/cd\t\t从一张音频 CD 或 (S)VCD 中载入所有音轨, \"路径å\" 表示驱动器路径 (å¯é€‰)\n/device\t\t打开默认的视频设备\n/open\t\t打开文件, ä¸è‡ªåŠ¨å¼€å§‹å›žæ”¾\n/play\t\t在播放器å¯åŠ¨åŽæ’­æ”¾æ–‡ä»¶\n/close\t\t回放结æŸåŽå…³é—­æ’­æ”¾å™¨ (仅能和 /play åŒæ—¶ä½¿ç”¨)\n/shutdown\t回放结æŸåŽå…³é—­æ“作系统\n/standby\t\t回放结æŸåŽå°†æ“作系统设置为待机模å¼\n/hibernate\t回放结æŸåŽä¼‘眠æ“作系统\n/logoff\t\t回放结æŸåŽæ³¨é”€\n/lock\t\t回放结æŸåŽé”定计算机\n/monitoroff\t回放结æŸåŽå…³é—­æ˜¾ç¤ºå™¨\n/playnext\t\t回放结æŸåŽæ‰“开文件夹中的下一个文件\n/fullscreen\t以全å±å¹•æ¨¡å¼å¯åŠ¨\n/minimized\t以最å°åŒ–模å¼å¯åŠ¨\n/new\t\tå¯åŠ¨ä¸€ä¸ªæ–°çš„播放器实例\n/add\t\t添加 \"路径å\" 到播放列表中,å¯ä»¥å’Œ /open 与 /play 组åˆä½¿ç”¨\n/randomize\téšæœºçš„播放列表\n/regvid\t\t为视频文件创建文件关è”\n/regaud\t\t为音频文件创建文件关è”\n/regpl\t\t为播放列表创建文件关è”\n/regall\t\t为所有支æŒçš„文件类型创建文件关è”\n/unregall\t\t移除所有文件关è”\n/start ms\t\t在 \"ms\" (= 毫秒) 处开始播放\n/startpos hh:mm:ss\t在ä½ç½® hh:mm:ss 开始播放\n/fixedsize w,h\t设置一个固定的窗å£å¤§å°\n/monitor N\t在显示器 N 上å¯åŠ¨, N 从 1 开始\n/audiorenderer N\t使用音频渲染器 N å¯åŠ¨, N 从 1 开始\n\t\t(请查阅 \"输出\" 设置)\n/shaderpreset \"Pr\"\t开始使用 \"Pr\" ç€è‰²å™¨é¢„设\n/pns \"name\"\t指定è¦ä½¿ç”¨çš„全景和扫æ预设å称\n/iconsassoc\té‡æ–°å…³è”æ ¼å¼å›¾æ ‡\n/nofocus\t\t在åŽå°æ‰“å¼€MPC-HC\n/webport N\t在指定端å£å¯åŠ¨web ç•Œé¢\n/debug\t\t显示调试信æ¯\n/nocrashreporter\t关闭崩溃报告\n/slave \"hWnd\"\t使用MPC-HC为从\n/reset\t\tæ¢å¤é»˜è®¤è®¾ç½®\n/help /h /?\t显示此命令行开关帮助对è¯æ¡†\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "用法: mpc-hc.exe \"路径å\" [开关]\n\n\"路径å\"\t\t表示è¦è½½å…¥çš„主文件或目录 (å…许通é…符, \"-\" 表示标准输入)\n/dub \"é…音å\"\t载入一个附加的音频文件\n/dubdelay \t\"文件\"载入音频文件延迟 XXms (å¦‚æžœè¯¥æ–‡ä»¶åŒ…å« \"...DELAY XXms...\")\n/d3dfs\t\t在 D3D å…¨å±å¹•æ¨¡å¼å¼€å§‹æ¸²æŸ“\n/sub \"字幕å\"\t载入一个附加的字幕文件\n/filter \"滤镜å\"\t从一个动æ€é“¾æŽ¥åº“中载入 DirectShow 滤镜 (å…许通é…符)\n/dvd\t\tè¿è¡Œ DVD 模å¼, \"路径å\" 表示 dvd 文件夹 (å¯é€‰)\n/dvdpos T#C\t从标题 T, 章节 C 开始播放\n/dvdpos T#hh:mm\t从标题 T, ä½ç½® hh:mm:ss 开始播放\n/cd\t\t从一张音频 CD 或 (S)VCD 中载入所有音轨, \"路径å\" 表示驱动器路径 (å¯é€‰)\n/device\t\t打开默认的视频设备\n/open\t\t打开文件, ä¸è‡ªåŠ¨å¼€å§‹å›žæ”¾\n/play\t\t在播放器å¯åŠ¨åŽæ’­æ”¾æ–‡ä»¶\n/close\t\t回放结æŸåŽå…³é—­æ’­æ”¾å™¨ (仅能和 /play åŒæ—¶ä½¿ç”¨)\n/shutdown\t回放结æŸåŽå…³é—­æ“作系统\n/standby\t\t回放结æŸåŽå°†æ“作系统设置为待机模å¼\n/hibernate\t回放结æŸåŽä¼‘眠æ“作系统\n/logoff\t\t回放结æŸåŽæ³¨é”€\n/lock\t\t回放结æŸåŽé”定计算机\n/monitoroff\t回放结æŸåŽå…³é—­æ˜¾ç¤ºå™¨\n/playnext\t\t回放结æŸåŽæ‰“开文件夹中的下一个文件\n/fullscreen\t以全å±å¹•æ¨¡å¼å¯åŠ¨\n/minimized\t以最å°åŒ–模å¼å¯åŠ¨\n/new\t\tå¯åŠ¨ä¸€ä¸ªæ–°çš„播放器实例\n/add\t\t添加 \"路径å\" 到播放列表中,å¯ä»¥å’Œ /open 与 /play 组åˆä½¿ç”¨\n/randomize\téšæœºçš„播放列表\n/regvid\t\t为视频文件创建文件关è”\n/regaud\t\t为音频文件创建文件关è”\n/regpl\t\t为播放列表创建文件关è”\n/regall\t\t为所有支æŒçš„文件类型创建文件关è”\n/unregall\t\t移除所有文件关è”\n/start ms\t\t在 \"ms\" (= 毫秒) 处开始播放\n/startpos hh:mm:ss\t在ä½ç½® hh:mm:ss 开始播放\n/fixedsize w,h\t设置一个固定的窗å£å¤§å°\n/monitor N\t在显示器 N 上å¯åŠ¨, N 从 1 开始\n/audiorenderer N\t使用音频渲染器 N å¯åŠ¨, N 从 1 开始\n\t\t(请查阅 \"输出\" 设置)\n/shaderpreset \"Pr\"\t开始使用 \"Pr\" ç€è‰²å™¨é¢„设\n/pns \"name\"\t指定è¦ä½¿ç”¨çš„全景和扫æ预设å称\n/iconsassoc\té‡æ–°å…³è”æ ¼å¼å›¾æ ‡\n/nofocus\t\t在åŽå°æ‰“å¼€ MPC-HC\n/webport N\t在指定端å£å¯åŠ¨ web ç•Œé¢\n/debug\t\t在 OSD 上显示调试信æ¯\n/nocrashreporter\t关闭崩溃报告\n/slave \"hWnd\"\t使用MPC-HC为从\n/hwgpu \"index\"\t设置硬件解ç ç”¨çš„GPUåž‹å·çš„索引\n\t\t仅适用于CUVIDå’ŒDXVA2(copy-back)\n/reset\t\tæ¢å¤é»˜è®¤è®¾ç½®\n/help /h /?\t显示此命令行开关帮助对è¯æ¡†\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
-msgstr "在命令行字串中å‘现未认è¯çš„开关符: \n\n"
+msgstr "在命令行字符串中å‘现无法识别的开关符: \n\n"
msgctxt "IDS_AG_TOGGLE_INFO"
msgid "Toggle Information"
@@ -2848,7 +2845,7 @@ msgstr "MPEG-TS"
msgctxt "IDS_MFMT_DVDVIDEO"
msgid "DVD-Video"
-msgstr "DVD-Video"
+msgstr "DVD-视频"
msgctxt "IDS_MFMT_MKV"
msgid "Matroska"
@@ -2864,7 +2861,7 @@ msgstr "MP4"
msgctxt "IDS_MFMT_MOV"
msgid "QuickTime Movie"
-msgstr "QuickTime Movie"
+msgstr "QuickTime 影片"
msgctxt "IDS_MFMT_3GP"
msgid "3GP"
@@ -2876,11 +2873,11 @@ msgstr "3G2"
msgctxt "IDS_MFMT_FLV"
msgid "Flash Video"
-msgstr "Flash Video"
+msgstr "Flash 视频"
msgctxt "IDS_MFMT_OGM"
msgid "Ogg Media"
-msgstr "Ogg Media"
+msgstr "Ogg 媒体"
msgctxt "IDS_MFMT_RM"
msgid "Real Media"
@@ -2888,31 +2885,31 @@ msgstr "Real Media"
msgctxt "IDS_MFMT_RT"
msgid "Real Script"
-msgstr "Real Script"
+msgstr "Real 脚本"
msgctxt "IDS_MFMT_WMV"
msgid "Windows Media Video"
-msgstr "Windows Media Video"
+msgstr "Windows Media 视频"
msgctxt "IDS_MFMT_BINK"
msgid "Smacker/Bink Video"
-msgstr "Smacker/Bink Video"
+msgstr "Smacker/Bink 视频"
msgctxt "IDS_MFMT_FLIC"
msgid "FLIC Animation"
-msgstr "FLIC Animation"
+msgstr "FLIC 动画"
msgctxt "IDS_MFMT_DSM"
msgid "DirectShow Media"
-msgstr "DirectShow Media"
+msgstr "DirectShow 媒体"
msgctxt "IDS_MFMT_IVF"
msgid "Indeo Video Format"
-msgstr "Indeo Video Format"
+msgstr "Indeo 视频格å¼"
msgctxt "IDS_MFMT_OTHER"
msgid "Other"
-msgstr "Other"
+msgstr "其他"
msgctxt "IDS_MFMT_SWF"
msgid "Shockwave Flash"
@@ -2920,7 +2917,7 @@ msgstr "Shockwave Flash"
msgctxt "IDS_MFMT_OTHER_AUDIO"
msgid "Other Audio"
-msgstr "Other Audio"
+msgstr "其他音频"
msgctxt "IDS_MFMT_AC3"
msgid "AC-3"
@@ -2940,7 +2937,7 @@ msgstr "WAV"
msgctxt "IDS_MFMT_WMA"
msgid "Windows Media Audio"
-msgstr "Windows Media Audio"
+msgstr "Windows Media 音频"
msgctxt "IDS_MFMT_WV"
msgid "WavPack"
@@ -2948,7 +2945,7 @@ msgstr "WavPack"
msgctxt "IDS_MFMT_OPUS"
msgid "Opus Audio Codec"
-msgstr "Opus Audio Codec"
+msgstr "Opus 音频编解ç å™¨"
msgctxt "IDS_MFMT_DTS"
msgid "DTS/DTS-HD"
@@ -2968,7 +2965,7 @@ msgstr "AU/SND"
msgctxt "IDS_MFMT_CDA"
msgid "Audio CD track"
-msgstr "Audio CD track"
+msgstr "音频 CD 轨é“"
msgctxt "IDS_MFMT_FLAC"
msgid "FLAC"
@@ -2976,7 +2973,7 @@ msgstr "FLAC"
msgctxt "IDS_MFMT_M4A"
msgid "MPEG-4 Audio"
-msgstr "MPEG-4 Audio"
+msgstr "MPEG-4 音频"
msgctxt "IDS_MFMT_MIDI"
msgid "MIDI"
@@ -2984,7 +2981,7 @@ msgstr "MIDI"
msgctxt "IDS_MFMT_MKA"
msgid "Matroska audio"
-msgstr "Matroska audio"
+msgstr "Matroska 音频"
msgctxt "IDS_MFMT_MP3"
msgid "MP3"
@@ -2992,7 +2989,7 @@ msgstr "MP3"
msgctxt "IDS_MFMT_MPA"
msgid "MPEG audio"
-msgstr "MPEG audio"
+msgstr "MPEG 音频"
msgctxt "IDS_MFMT_MPC"
msgid "Musepack"
@@ -3020,15 +3017,15 @@ msgstr "True Audio"
msgctxt "IDS_MFMT_PLS"
msgid "Playlist"
-msgstr "Playlist"
+msgstr "播放列表"
msgctxt "IDS_MFMT_BDPLS"
msgid "Blu-ray playlist"
-msgstr "Blu-ray playlist"
+msgstr "Blu-ray 播放列表"
msgctxt "IDS_MFMT_RAR"
msgid "RAR Archive"
-msgstr "RAR Archive"
+msgstr "RAR 压缩包"
msgctxt "IDS_DVB_CHANNEL_FPS"
msgid "FPS"
@@ -3042,18 +3039,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "高宽比"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "使用 WASAPI (需è¦é‡å¯æ’­æ”¾)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "在快进时é™éŸ³"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "声音设备:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "åž‚ç›´åŒæ­¥: å¼€"
@@ -3184,11 +3169,11 @@ msgstr "D3Då…¨å±å¹•: å…³"
msgctxt "IDS_OSD_RS_NO_DESKTOP_COMP_ON"
msgid "Disable desktop composition: On"
-msgstr "关闭桌é¢ç»„åˆ: å¼€"
+msgstr "关闭桌é¢åˆæˆ: å¼€"
msgctxt "IDS_OSD_RS_NO_DESKTOP_COMP_OFF"
msgid "Disable desktop composition: Off"
-msgstr "关闭桌é¢ç»„åˆ: å…³"
+msgstr "关闭桌é¢åˆæˆ: å…³"
msgctxt "IDS_OSD_RS_ALT_VSYNC_ON"
msgid "Alternative VSync: On"
@@ -3344,7 +3329,7 @@ msgstr "增益音é‡: å…³"
msgctxt "IDS_SIZE_UNIT_BYTES"
msgid "bytes"
-msgstr "bytes"
+msgstr "字节"
msgctxt "IDS_SIZE_UNIT_K"
msgid "KB"
@@ -3548,7 +3533,7 @@ msgstr "饱和度: %s"
msgctxt "IDS_OSD_RESET_COLOR"
msgid "Color settings restored"
-msgstr "å·²é‡ç½®é¢œè‰²è®¾ç½®"
+msgstr "å·²æ¢å¤é¢œè‰²è®¾ç½®"
msgctxt "IDS_OSD_NO_COLORCONTROL"
msgid "Color control is not supported"
@@ -3588,7 +3573,7 @@ msgstr "频é“(&C)"
msgctxt "IDC_FASTSEEK_CHECK"
msgid "If \"latest keyframe\" is selected, seek to the first keyframe before the actual seek point.\nIf \"nearest keyframe\" is selected, seek to the first keyframe before or after the seek point depending on which is the closest."
-msgstr "若选择 \"最近的关键帧\" , 在æœç´¢æ—¶ä¼šé€‰æ‹©å®žé™…æœç´¢æ—¶é—´ç‚¹å‰æœ€è¿‘的关键帧。\n若选择 \"最接近的关键帧\" , 在æœç´¢æ—¶ä¼šæ ¹æ®å‰åŽå…³é”®å¸§é€‰æ‹©æœ€è¿‘的。"
+msgstr "若选择 \"å‘å‰æœå¯»æœ€è¿‘关键帧\", 在æœç´¢æ—¶ä¼šé€‰æ‹©å®žé™…æœç´¢æ—¶é—´ç‚¹å‰æœ€è¿‘的关键帧。\n若选择 \"å‰åŽæœå¯»æœ€è¿‘关键帧\", 在æœç´¢æ—¶ä¼šæ ¹æ®å‰åŽå…³é”®å¸§é€‰æ‹©æœ€è¿‘的。"
msgctxt "IDC_ASSOCIATE_ALL_FORMATS"
msgid "Associate with all formats"
@@ -3610,3 +3595,11 @@ msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "设置"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr "VSFilter / DirectVobSub"
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr "XySubFilter"
+
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.dialogs.po b/src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.dialogs.po
index 01df343f8..dc3d6e51b 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.dialogs.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.dialogs.po
@@ -1,19 +1,22 @@
# MPC-HC - Strings extracted from dialogs
-# Copyright (C) 2002 - 2015 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
+# 洪嘉鴻 <jerry9030@gmail.com>, 2015
# Jeff Huang <s8321414@gmail.com>, 2014
# kenelin <kenelin@gmail.com>, 2013
+# Ken <ken670128@yahoo.com.tw>, 2015
# Peter Chen <petercpg@gmail.com>, 2014
# roytam1 <roytam@gmail.com>, 2014
# Zakk <zakk0610@gmail.com>, 2014
+# 洪嘉鴻 <jerry9030@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-09-19 20:08:04+0000\n"
-"PO-Revision-Date: 2014-10-20 10:21+0000\n"
-"Last-Translator: Underground78\n"
-"Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/mpc-hc/language/zh_TW/)\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-09-20 06:00+0000\n"
+"Last-Translator: 洪嘉鴻 <jerry9030@gmail.com>\n"
+"Language-Team: Chinese (Taiwan) (http://www.transifex.com/mpc-hc/mpc-hc/language/zh_TW/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -150,7 +153,7 @@ msgstr "影格:"
msgctxt "IDD_GOTO_DLG_IDC_OK2"
msgid "Go!"
-msgstr "å‰å¾€"
+msgstr "å‰å¾€!"
msgctxt "IDD_OPEN_DLG_CAPTION"
msgid "Open"
@@ -202,7 +205,7 @@ msgstr "本程å¼æ˜¯è‡ªç”±è»Ÿé«”, ä¸¦ä¾ GNU General Public License 發行。"
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "English translation made by MPC-HC Team"
-msgstr "譯者: Kene Lin"
+msgstr "譯者: Kene Linã€Chiahong Hong"
msgctxt "IDD_ABOUTBOX_IDC_STATIC"
msgid "Build information"
@@ -234,7 +237,7 @@ msgstr "å稱:"
msgctxt "IDD_ABOUTBOX_IDC_BUTTON1"
msgid "Copy to clipboard"
-msgstr "複製到剪貼æ¿"
+msgstr "複製到剪貼簿"
msgctxt "IDD_ABOUTBOX_IDOK"
msgid "OK"
@@ -310,7 +313,7 @@ msgstr "程å¼å„ªå…ˆæ¬Šèª¿æˆé«˜æ–¼ä¸€èˆ¬"
msgctxt "IDD_PPAGEPLAYER_IDC_CHECK14"
msgid "Enable cover-art support"
-msgstr ""
+msgstr "啟用專輯å°é¢æ”¯æ´"
msgctxt "IDD_PPAGEPLAYER_IDC_STATIC"
msgid "History"
@@ -426,7 +429,7 @@ msgstr "次"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "After Playback"
-msgstr ""
+msgstr "播放完後"
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Output"
@@ -476,10 +479,6 @@ msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK2"
msgid "Auto-load audio files"
msgstr "自動載入音訊檔案"
-msgctxt "IDD_PPAGEPLAYBACK_IDC_CHECK3"
-msgid "Use the built-in subtitle renderer"
-msgstr "使用內建的字幕渲染器"
-
msgctxt "IDD_PPAGEPLAYBACK_IDC_STATIC"
msgid "Control"
msgstr "控制"
@@ -518,7 +517,7 @@ msgstr "%"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "Delay step"
-msgstr ""
+msgstr "延é²é–“éš”"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "ms"
@@ -538,27 +537,27 @@ msgstr "最大æ質解æžåº¦:"
msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_NO_SUB_ANIM"
msgid "Never animate the subtitles"
-msgstr ""
+msgstr "æ°¸ä¸å‹•ç•«åŒ–字幕"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC5"
msgid "Render at"
-msgstr ""
+msgstr "繪製到"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC6"
msgid "% of the animation"
-msgstr ""
+msgstr "% çš„å‹•ç•«"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC7"
msgid "Animate at"
-msgstr ""
+msgstr "動畫化"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC8"
msgid "% of the video frame rate"
-msgstr ""
+msgstr "的視訊幀率"
msgctxt "IDD_PPAGESUBTITLES_IDC_CHECK_ALLOW_DROPPING_SUBPIC"
msgid "Allow dropping some subpictures if the queue is running late"
-msgstr ""
+msgstr "若佇列延é²æ™‚å…許丟棄一些å­ç•«é¢"
msgctxt "IDD_PPAGESUBTITLES_IDC_STATIC"
msgid "Renderer Layout"
@@ -594,15 +593,15 @@ msgstr "檔案關è¯"
msgctxt "IDD_PPAGEFORMATS_IDC_CHECK8"
msgid "Use the format-specific icons"
-msgstr ""
+msgstr "為ä¸åŒæ ¼å¼ä½¿ç”¨å°æ‡‰çš„圖示"
msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON1"
msgid "Run as &administrator"
-msgstr ""
+msgstr "以系統管ç†å“¡èº«åˆ†åŸ·è¡Œ (&a)"
msgctxt "IDD_PPAGEFORMATS_IDC_BUTTON7"
msgid "Set as &default program"
-msgstr ""
+msgstr "以é è¨­é—œè¯ç¨‹å¼ä¾†è¨­å®š (&d)"
msgctxt "IDD_PPAGEFORMATS_IDC_STATIC"
msgid "Real-Time Streaming Protocol handler (for rtsp://... URLs)"
@@ -680,9 +679,9 @@ msgctxt "IDD_PPAGETWEAKS_IDC_CHECK6"
msgid "Prevent minimizing the player when in fullscreen on a non default monitor"
msgstr "é¿å…在éžé è¨­é¡¯ç¤ºå™¨å…¨èž¢å¹•æ™‚最å°åŒ–"
-msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_WIN7"
-msgid "Use Windows 7 Taskbar features"
-msgstr "使用 Windows 7 工作列功能"
+msgctxt "IDD_PPAGETWEAKS_IDC_CHECK_ENHANCED_TASKBAR"
+msgid "Use enhanced taskbar features"
+msgstr ""
msgctxt "IDD_PPAGETWEAKS_IDC_CHECK7"
msgid "Open previous/next file in folder on \"Skip back/forward\" when there is only one item in playlist"
@@ -910,7 +909,7 @@ msgstr "關閉"
msgctxt "IDD_SAVE_DLG_CAPTION"
msgid "Saving..."
-msgstr "儲存..."
+msgstr "正在儲存..."
msgctxt "IDD_SAVE_DLG_IDCANCEL"
msgid "Cancel"
@@ -938,7 +937,7 @@ msgstr "ä¿å­˜è‡ªè¨‚樣å¼"
msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
-msgstr ""
+msgstr "JPEG å“質:"
msgctxt "IDD_SAVETHUMBSDIALOGTEMPL_IDC_STATIC"
msgid "Thumbnails:"
@@ -1173,8 +1172,8 @@ msgid "DXVA"
msgstr "DXVA"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "Subtitles *"
-msgstr "字幕 *"
+msgid "Subtitles"
+msgstr ""
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
msgid "Screenshot"
@@ -1189,8 +1188,8 @@ msgid "Rotation"
msgstr "旋轉"
msgctxt "IDD_PPAGEOUTPUT_IDC_STATIC"
-msgid "* External filters (such as VSFilter) can display subtitles on all renderers."
-msgstr "* 外部篩é¸å™¨ (例如 VSFilter) å¯ä»¥åœ¨ä»»ä½•ç¹ªè£½å™¨ä¸­é¡¯ç¤ºå­—幕。"
+msgid "Subtitle Renderer"
+msgstr ""
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK1"
msgid "Listen on port:"
@@ -1208,6 +1207,10 @@ msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK5"
msgid "Allow access from localhost only"
msgstr "åªå…許從本機存å–"
+msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK6"
+msgid "Enable preview"
+msgstr "啟用é è¦½"
+
msgctxt "IDD_PPAGEWEBSERVER_IDC_CHECK2"
msgid "Print debug information"
msgstr "列å°åµéŒ¯è³‡è¨Š"
@@ -1282,7 +1285,7 @@ msgstr "啟用自動更新檢查"
msgctxt "IDD_PPAGEMISC_IDC_STATIC5"
msgid "Check every:"
-msgstr ""
+msgstr "檢查頻率:"
msgctxt "IDD_PPAGEMISC_IDC_STATIC6"
msgid "day(s)"
@@ -1642,27 +1645,71 @@ msgstr "PS 3.0"
msgctxt "IDD_PPAGEADVANCED_IDC_STATIC"
msgid "Advanced Settings, do not edit unless you know what you are doing."
-msgstr ""
+msgstr "進階設定, 除éžæ‚¨å·²äº†è§£é …目的功能, å¦å‰‡è«‹ä¸è¦ç·¨è¼¯ä»»ä½•é …目。"
msgctxt "IDD_PPAGEADVANCED_IDC_RADIO1"
msgid "True"
-msgstr ""
+msgstr "啟用"
msgctxt "IDD_PPAGEADVANCED_IDC_RADIO2"
msgid "False"
-msgstr ""
+msgstr "åœç”¨"
msgctxt "IDD_PPAGEADVANCED_IDC_BUTTON1"
msgid "Default"
msgstr "é è¨­"
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Device"
+msgstr "è£ç½®"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK1"
+msgid "Exclusive mode"
+msgstr "ç¨ä½”模å¼"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK2"
+msgid "Allow bitstreaming"
+msgstr "å…許ä½å…ƒæµ"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Options"
+msgstr "é¸é …"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_CHECK3"
+msgid "Enable stereo crossfeed (for headphones)"
+msgstr "å•Ÿç”¨ç«‹é«”è² Crossfeed (é©ç”¨æ–¼è€³æ©Ÿ)"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON1"
+msgid "C. Moy"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_BUTTON2"
+msgid "J. Meier"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC1"
+msgid "Cut-off:"
+msgstr ""
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC3"
+msgid "Level:"
+msgstr "層級:"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "Note"
+msgstr "備註"
+
+msgctxt "IDD_PPAGEAUDIORENDERER_IDC_STATIC"
+msgid "To minimize audio distortion, it is recommended to keep player volume at around 85% when playing loud lossy-encoded content."
+msgstr ""
+
msgctxt "IDD_SAVEIMAGEDIALOGTEMPL_IDC_STATIC"
msgid "JPEG quality:"
-msgstr ""
+msgstr "JPEG å“質:"
msgctxt "IDD_CMD_LINE_HELP_CAPTION"
msgid "Command line help"
-msgstr ""
+msgstr "命令行說明"
msgctxt "IDD_CMD_LINE_HELP_IDOK"
msgid "OK"
@@ -1670,25 +1717,37 @@ msgstr "確èª"
msgctxt "IDD_CRASH_REPORTER_CAPTION"
msgid "Crash reporter"
-msgstr ""
+msgstr "崩潰回報"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_STATIC"
+msgid "We are sorry, it seems MPC-HC just crashed. :("
+msgstr "我們å分抱歉,MPC-HC 看來剛剛崩潰。:("
+
+msgctxt "IDD_CRASH_REPORTER_IDC_CHECK1"
+msgid "Send a bug report to help us diagnose and fix the problem."
+msgstr "傳é€éŒ¯èª¤å ±å‘Šä»¥å¹«åŠ©æˆ‘們診斷並修復此å•é¡Œã€‚"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC1"
-msgid "We are sorry, it seems MPC-HC just crashed. :(\n\nTo help us diagnose and fix the problem, a bug report will be sent. You can provide additional information if you want."
-msgstr ""
+msgid "Optional information"
+msgstr "é¸ç”¨è³‡è¨Š"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC2"
msgid "Email:"
-msgstr ""
+msgstr "é›»å­éƒµä»¶:"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC3"
msgid "Your email address is optional and will only be used if the developers need to contact you for more information."
-msgstr ""
+msgstr "您å¯ä»¥é¸æ“‡æ€§å¡«å¯«é›»å­éƒµä»¶åœ°å€, 然而åªæœ‰åœ¨é–‹ç™¼äººå“¡éœ€è¦è¯çµ¡æ‚¨ä»¥å–得更多資訊時, æ‰æœƒå‘您傳é€éƒµä»¶ã€‚"
msgctxt "IDD_CRASH_REPORTER_IDC_STATIC4"
msgid "Problem description (use English only):"
-msgstr ""
+msgstr "å•é¡Œæè¿° (請使用英文進行撰寫):"
-msgctxt "IDD_CRASH_REPORTER_IDOK"
-msgid "OK"
-msgstr ""
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON1"
+msgid "Restart MPC-HC"
+msgstr "é‡æ–°å•Ÿå‹• MPC-HC"
+
+msgctxt "IDD_CRASH_REPORTER_IDC_BUTTON2"
+msgid "Quit MPC-HC"
+msgstr "çµæŸ MPC-HC"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.menus.po b/src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.menus.po
index 049893722..d0aa456e9 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.menus.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.menus.po
@@ -1,16 +1,19 @@
# MPC-HC - Strings extracted from menus
-# Copyright (C) 2002 - 2015 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
+# 洪嘉鴻 <jerry9030@gmail.com>, 2015
# kenelin <kenelin@gmail.com>, 2013
+# Ken <ken670128@yahoo.com.tw>, 2015
# Peter Chen <petercpg@gmail.com>, 2014
+# 洪嘉鴻 <jerry9030@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-08-19 21:10:25+0000\n"
-"PO-Revision-Date: 2014-08-20 10:01+0000\n"
-"Last-Translator: JellyFrog\n"
-"Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/mpc-hc/language/zh_TW/)\n"
+"POT-Creation-Date: 2015-05-30 00:33:30+0000\n"
+"PO-Revision-Date: 2015-08-09 09:11+0000\n"
+"Last-Translator: 洪嘉鴻 <jerry9030@gmail.com>\n"
+"Language-Team: Chinese (Taiwan) (http://www.transifex.com/mpc-hc/mpc-hc/language/zh_TW/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -39,7 +42,7 @@ msgstr "é–‹å•Ÿè£ç½®(&V)..."
msgctxt "ID_FILE_OPENDIRECTORY"
msgid "Open Dir&ectory..."
-msgstr "開啟目錄..."
+msgstr "開啟目錄(&E)..."
msgctxt "ID_FILE_OPENDISC"
msgid "O&pen Disc"
@@ -47,7 +50,7 @@ msgstr "開啟光碟(&P)"
msgctxt "ID_RECENT_FILES"
msgid "Recent &Files"
-msgstr "最近的檔案"
+msgstr "最近的檔案(&F)"
msgctxt "ID_FILE_CLOSE_AND_RESTORE"
msgid "&Close"
@@ -95,7 +98,7 @@ msgstr "內容(&R)"
msgctxt "ID_FILE_EXIT"
msgid "E&xit"
-msgstr "離開(&X)"
+msgstr "çµæŸ(&X)"
msgctxt "POPUP"
msgid "&View"
@@ -103,15 +106,15 @@ msgstr "檢視(&V)"
msgctxt "ID_VIEW_CAPTIONMENU"
msgid "Caption&&Menu"
-msgstr "標題é¸å–®"
+msgstr "標題é¸å–®(&M)"
msgctxt "ID_VIEW_SEEKER"
msgid "See&k Bar"
-msgstr "æœå°‹åˆ—(&S)"
+msgstr "æœå°‹åˆ—(&K)"
msgctxt "ID_VIEW_CONTROLS"
msgid "&Controls"
-msgstr "控制項(&R)"
+msgstr "控制項(&C)"
msgctxt "ID_VIEW_INFORMATION"
msgid "&Information"
@@ -119,7 +122,7 @@ msgstr "資訊列(&I)"
msgctxt "ID_VIEW_STATISTICS"
msgid "&Statistics"
-msgstr "統計列(&T)"
+msgstr "統計列(&S)"
msgctxt "ID_VIEW_STATUS"
msgid "St&atus"
@@ -127,27 +130,27 @@ msgstr "狀態列(&A)"
msgctxt "ID_VIEW_SUBRESYNC"
msgid "Su&bresync"
-msgstr "字幕åŒæ­¥"
+msgstr "字幕åŒæ­¥(&B)"
msgctxt "ID_VIEW_PLAYLIST"
msgid "Pla&ylist"
-msgstr "播放清單"
+msgstr "播放清單(&Y)"
msgctxt "ID_VIEW_CAPTURE"
msgid "Captu&re"
-msgstr "æ“·å–"
+msgstr "æ“·å–(&R)"
msgctxt "ID_VIEW_NAVIGATION"
msgid "Na&vigation"
-msgstr "導覽"
+msgstr "導覽(&V)"
msgctxt "ID_VIEW_DEBUGSHADERS"
msgid "&Debug Shaders"
-msgstr "åµéŒ¯ Shader (&D)"
+msgstr "著色器 (Shader) åµéŒ¯(&D)"
msgctxt "POPUP"
msgid "&Presets..."
-msgstr "先期設定(&P)..."
+msgstr "å…ˆå‰è¨­å®š(&P)..."
msgctxt "ID_VIEW_PRESETS_MINIMAL"
msgid "&Minimal"
@@ -183,15 +186,15 @@ msgstr "200% (&2)"
msgctxt "ID_VIEW_ZOOM_AUTOFIT"
msgid "Auto &Fit"
-msgstr "自動調整"
+msgstr "自動調整(&F)"
msgctxt "ID_VIEW_ZOOM_AUTOFIT_LARGER"
msgid "Auto Fit (&Larger Only)"
-msgstr "自動調整 (僅é™è§£åƒåº¦éŽå¤§æ™‚)"
+msgstr "自動調整 (僅é™è§£åƒåº¦éŽå¤§æ™‚) (&L)"
msgctxt "POPUP"
msgid "R&enderer Settings"
-msgstr "繪製器設定"
+msgstr "繪製器設定(&E)"
msgctxt "ID_VIEW_TEARING_TEST"
msgid "&Tearing Test"
@@ -199,51 +202,51 @@ msgstr "抖動測試(&T)"
msgctxt "ID_VIEW_DISPLAY_RENDERER_STATS"
msgid "&Display Statistics"
-msgstr ""
+msgstr "顯示統計(&D)"
msgctxt "ID_VIEW_OSD_DISPLAY_TIME"
msgid "Display Current T&ime"
-msgstr ""
+msgstr "顯示目å‰æ™‚é–“(&I)"
msgctxt "ID_VIEW_OSD_SHOW_FILENAME"
msgid "Show &File Name"
-msgstr ""
+msgstr "顯示檔案å稱(&F)"
msgctxt "POPUP"
msgid "&Output Range"
-msgstr "輸出範åœ"
+msgstr "輸出範åœ(&O)"
msgctxt "ID_VIEW_EVROUTPUTRANGE_0_255"
msgid "&0 - 255"
-msgstr "0 - 255"
+msgstr "&0 - 255"
msgctxt "ID_VIEW_EVROUTPUTRANGE_16_235"
msgid "&16 - 235"
-msgstr "16 - 235"
+msgstr "&16 - 235"
msgctxt "POPUP"
msgid "&Presentation"
-msgstr "呈ç¾"
+msgstr "呈ç¾(&P)"
msgctxt "ID_VIEW_D3DFULLSCREEN"
msgid "D3D Fullscreen &Mode"
-msgstr "D3D 全螢幕模å¼"
+msgstr "D3D 全螢幕模å¼(&M)"
msgctxt "ID_VIEW_FULLSCREENGUISUPPORT"
msgid "D3D Fullscreen &GUI Support"
-msgstr "D3D 全螢幕 GUI 支æ´"
+msgstr "D3D 全螢幕 GUI 支æ´(&G)"
msgctxt "ID_VIEW_HIGHCOLORRESOLUTION"
msgid "10-bit &RGB Output"
-msgstr "10-bit RGB 輸出"
+msgstr "10ä½å…ƒ RGB 輸出(&R)"
msgctxt "ID_VIEW_FORCEINPUTHIGHCOLORRESOLUTION"
msgid "Force 10-bit RGB &Input"
-msgstr "強制 10-bit RGB 輸入"
+msgstr "強制 10ä½å…ƒ RGB 輸入(&I)"
msgctxt "ID_VIEW_FULLFLOATINGPOINTPROCESSING"
msgid "&Full Floating Point Processing"
-msgstr "全浮點處ç†"
+msgstr "全浮點處ç†(&F)"
msgctxt "ID_VIEW_HALFFLOATINGPOINTPROCESSING"
msgid "&Half Floating Point Processing"
@@ -251,79 +254,79 @@ msgstr "åŠæµ®é»žè™•ç†"
msgctxt "ID_VIEW_DISABLEDESKTOPCOMPOSITION"
msgid "Disable desktop composition (&Aero)"
-msgstr "åœç”¨æ¡Œé¢è½‰è­¯ (Aero)"
+msgstr "åœç”¨æ¡Œé¢ä½ˆæ™¯ (&Aero)"
msgctxt "ID_VIEW_ENABLEFRAMETIMECORRECTION"
msgid "Enable Frame Time &Correction"
-msgstr "啟用影格時間校正"
+msgstr "啟用影格時間校正(&C)"
msgctxt "POPUP"
msgid "&Color Management"
-msgstr "色彩管ç†"
+msgstr "色彩管ç†(&C)"
msgctxt "ID_VIEW_CM_ENABLE"
msgid "&Enable"
-msgstr "啟用"
+msgstr "啟用(&E)"
msgctxt "POPUP"
msgid "&Input Type"
-msgstr "輸入類型"
+msgstr "輸入類型(&I)"
msgctxt "ID_VIEW_CM_INPUT_AUTO"
msgid "&Auto-Detect"
-msgstr "自動åµæ¸¬"
+msgstr "自動åµæ¸¬(&A)"
msgctxt "ID_VIEW_CM_INPUT_HDTV"
msgid "&HDTV"
-msgstr "HDTV"
+msgstr "高畫質顯示器(&H)"
msgctxt "ID_VIEW_CM_INPUT_SDTV_NTSC"
msgid "SDTV &NTSC"
-msgstr "SDTV NTSC"
+msgstr "NTSC 標準畫質顯示器(&N)"
msgctxt "ID_VIEW_CM_INPUT_SDTV_PAL"
msgid "SDTV &PAL"
-msgstr "SDTV PAL"
+msgstr "PAL 標準畫質顯示器(&P)"
msgctxt "POPUP"
msgid "Ambient &Light"
-msgstr "環境光"
+msgstr "環境光(&L)"
msgctxt "ID_VIEW_CM_AMBIENTLIGHT_BRIGHT"
msgid "&Bright (2.2 Gamma)"
-msgstr "明亮 (2.2 Gamma)"
+msgstr "明亮 (2.2 Gamma) (&B)"
msgctxt "ID_VIEW_CM_AMBIENTLIGHT_DIM"
msgid "&Dim (2.35 Gamma)"
-msgstr "微暗 (2.35 Gamma)"
+msgstr "微暗 (2.35 Gamma) (&D)"
msgctxt "ID_VIEW_CM_AMBIENTLIGHT_DARK"
msgid "D&ark (2.4 Gamma)"
-msgstr "æš— (2.4 Gamma)"
+msgstr "æš— (2.4 Gamma) (&A)"
msgctxt "POPUP"
msgid "&Rendering Intent"
-msgstr "色彩å°æ‡‰æ–¹å¼"
+msgstr "色彩å°æ‡‰æ–¹å¼(&R)"
msgctxt "ID_VIEW_CM_INTENT_PERCEPTUAL"
msgid "&Perceptual"
-msgstr "知覺"
+msgstr "知覺(&P)"
msgctxt "ID_VIEW_CM_INTENT_RELATIVECOLORIMETRIC"
msgid "&Relative Colorimetric"
-msgstr "相å°è‰²åº¦"
+msgstr "相å°è‰²åº¦(&R)"
msgctxt "ID_VIEW_CM_INTENT_SATURATION"
msgid "&Saturation"
-msgstr "飽和度"
+msgstr "飽和度(&S)"
msgctxt "ID_VIEW_CM_INTENT_ABSOLUTECOLORIMETRIC"
msgid "&Absolute Colorimetric"
-msgstr "絕å°è‰²åº¦"
+msgstr "絕å°è‰²åº¦(&A)"
msgctxt "POPUP"
msgid "&VSync"
-msgstr "åž‚ç›´åŒæ­¥"
+msgstr "åž‚ç›´åŒæ­¥(&V)"
msgctxt "ID_VIEW_VSYNC"
msgid "&VSync"
@@ -331,11 +334,11 @@ msgstr "åž‚ç›´åŒæ­¥(&V)"
msgctxt "ID_VIEW_VSYNCACCURATE"
msgid "&Accurate VSync"
-msgstr "精確å¼åž‚ç›´åŒæ­¥"
+msgstr "精確å¼åž‚ç›´åŒæ­¥(&A)"
msgctxt "ID_VIEW_ALTERNATIVEVSYNC"
msgid "A&lternative VSync"
-msgstr "替代å¼åž‚ç›´åŒæ­¥"
+msgstr "替代å¼åž‚ç›´åŒæ­¥(&L)"
msgctxt "ID_VIEW_VSYNCOFFSET_DECREASE"
msgid "&Decrease VSync Offset"
@@ -347,31 +350,31 @@ msgstr "增加垂直åŒæ­¥å移é‡(&I)"
msgctxt "POPUP"
msgid "&GPU Control"
-msgstr "GPU 控制"
+msgstr "GPU 控制(&G)"
msgctxt "ID_VIEW_FLUSHGPU_BEFOREVSYNC"
msgid "Flush GPU &before VSync"
-msgstr "在垂直åŒæ­¥ä¹‹å‰æ¸…空 GPU"
+msgstr "在垂直åŒæ­¥ä¹‹å‰æ¸…空 GPU (&B)"
msgctxt "ID_VIEW_FLUSHGPU_AFTERPRESENT"
msgid "Flush GPU &after Present"
-msgstr "在呈ç¾ä¹‹å¾Œæ¸…空 GPU"
+msgstr "在呈ç¾ä¹‹å¾Œæ¸…空 GPU (&A)"
msgctxt "ID_VIEW_FLUSHGPU_WAIT"
msgid "&Wait for flushes"
-msgstr "等待清空"
+msgstr "等待清空(&W)"
msgctxt "POPUP"
msgid "R&eset"
-msgstr "é‡è¨­"
+msgstr "é‡è¨­(&E)"
msgctxt "ID_VIEW_RESET_DEFAULT"
msgid "Reset to &default renderer settings"
-msgstr "é‡è¨­ç‚ºé è¨­çš„繪製器設定"
+msgstr "é‡è¨­ç‚ºé è¨­çš„繪製器設定(Ë™&D)"
msgctxt "ID_VIEW_RESET_OPTIMAL"
msgid "Reset to &optimal renderer settings"
-msgstr "é‡è¨­ç‚ºæœ€ä½³çš„繪製器設定"
+msgstr "é‡è¨­ç‚ºæœ€ä½³çš„繪製器設定(&O)"
msgctxt "POPUP"
msgid "Video &Frame"
@@ -415,35 +418,35 @@ msgstr "維æŒé•·å¯¬æ¯”例(&K)"
msgctxt "POPUP"
msgid "Override &Aspect Ratio"
-msgstr "覆寫長寬比例"
+msgstr "覆寫長寬比例(&A)"
msgctxt "ID_ASPECTRATIO_SOURCE"
msgid "&Default"
-msgstr "é è¨­å€¼"
+msgstr "é è¨­å€¼(&D)"
msgctxt "ID_ASPECTRATIO_4_3"
msgid "&4:3"
-msgstr "4:3"
+msgstr "&4:3"
msgctxt "ID_ASPECTRATIO_5_4"
msgid "&5:4"
-msgstr "5:4"
+msgstr "&5:4"
msgctxt "ID_ASPECTRATIO_16_9"
msgid "&16:9"
-msgstr "16:9"
+msgstr "&16:9"
msgctxt "ID_ASPECTRATIO_235_100"
msgid "&235:100"
-msgstr "235:100"
+msgstr "&235:100"
msgctxt "ID_ASPECTRATIO_185_100"
msgid "1&85:100"
-msgstr "185:100"
+msgstr "1&85:100"
msgctxt "ID_VIEW_VF_COMPMONDESKARDIFF"
msgid "&Correct Monitor/Desktop AR Diff"
-msgstr "修正顯示器/æ¡Œé¢çš„長寬比例差異"
+msgstr "修正顯示器/æ¡Œé¢çš„長寬比例差異(&C)"
msgctxt "POPUP"
msgid "Pa&n&&Scan"
@@ -451,55 +454,55 @@ msgstr "平移掃æ(&C)"
msgctxt "ID_VIEW_INCSIZE"
msgid "&Increase Size"
-msgstr "增加大å°"
+msgstr "增加大å°(&I)"
msgctxt "ID_VIEW_DECSIZE"
msgid "&Decrease Size"
-msgstr "é™ä½Žå¤§å°"
+msgstr "é™ä½Žå¤§å°(&D)"
msgctxt "ID_VIEW_INCWIDTH"
msgid "I&ncrease Width"
-msgstr "增加寬度"
+msgstr "增加寬度(&N)"
msgctxt "ID_VIEW_DECWIDTH"
msgid "D&ecrease Width"
-msgstr "é™ä½Žå¯¬åº¦"
+msgstr "é™ä½Žå¯¬åº¦(&E)"
msgctxt "ID_VIEW_INCHEIGHT"
msgid "In&crease Height"
-msgstr "增加高度"
+msgstr "增加高度(&C)"
msgctxt "ID_VIEW_DECHEIGHT"
msgid "Decre&ase Height"
-msgstr "é™ä½Žé«˜åº¦"
+msgstr "é™ä½Žé«˜åº¦(&A)"
msgctxt "ID_PANSCAN_MOVERIGHT"
msgid "Move &Right"
-msgstr "å³ç§»"
+msgstr "å³ç§»(&R)"
msgctxt "ID_PANSCAN_MOVELEFT"
msgid "Move &Left"
-msgstr "左移"
+msgstr "左移(&L)"
msgctxt "ID_PANSCAN_MOVEUP"
msgid "Move &Up"
-msgstr "上移"
+msgstr "上移(&U)"
msgctxt "ID_PANSCAN_MOVEDOWN"
msgid "Move &Down"
-msgstr "下移"
+msgstr "下移(&D)"
msgctxt "ID_PANSCAN_CENTER"
msgid "Cen&ter"
-msgstr "置中"
+msgstr "置中(&T)"
msgctxt "ID_VIEW_RESET"
msgid "Re&set"
-msgstr "é‡è¨­"
+msgstr "é‡è¨­(&S)"
msgctxt "POPUP"
msgid "On &Top"
-msgstr "最上層顯示"
+msgstr "最上層顯示(&T)"
msgctxt "ID_ONTOP_DEFAULT"
msgid "&Default"
@@ -507,15 +510,15 @@ msgstr "é è¨­(&D)"
msgctxt "ID_ONTOP_ALWAYS"
msgid "&Always"
-msgstr "總是如此"
+msgstr "總是如此(&A)"
msgctxt "ID_ONTOP_WHILEPLAYING"
msgid "While &Playing"
-msgstr "當播放時"
+msgstr "當正在播放時(&P)"
msgctxt "ID_ONTOP_WHILEPLAYINGVIDEO"
msgid "While Playing &Video"
-msgstr "當播放影片時"
+msgstr "當播放影片時(&V)"
msgctxt "ID_VIEW_OPTIONS"
msgid "&Options..."
@@ -547,7 +550,7 @@ msgstr "增加頻率(&I)"
msgctxt "ID_PLAY_RESETRATE"
msgid "R&eset Rate"
-msgstr "é‡è¨­é »çŽ‡"
+msgstr "é‡è¨­é »çŽ‡(&E)"
msgctxt "ID_FILTERS"
msgid "&Filters"
@@ -555,19 +558,19 @@ msgstr "篩é¸å™¨(&F)"
msgctxt "ID_SHADERS"
msgid "S&haders"
-msgstr "Shaders (&H)"
+msgstr "著色器 (Shaders) (&H)"
msgctxt "ID_AUDIOS"
msgid "&Audio Track"
-msgstr ""
+msgstr "音訊軌é“(&A)"
msgctxt "ID_SUBTITLES"
msgid "Su&btitle Track"
-msgstr ""
+msgstr "字幕軌é“(&B)"
msgctxt "ID_VIDEO_STREAMS"
msgid "&Video Track"
-msgstr ""
+msgstr "視訊軌é“(&V)"
msgctxt "POPUP"
msgid "&Volume"
@@ -587,43 +590,43 @@ msgstr "éœéŸ³(&M)"
msgctxt "POPUP"
msgid "Af&ter Playback"
-msgstr "播放完後"
+msgstr "播放完後(&T)"
msgctxt "ID_AFTERPLAYBACK_DONOTHING"
msgid "Do no&thing"
-msgstr ""
+msgstr "什麼都ä¸åš(&T)"
msgctxt "ID_AFTERPLAYBACK_PLAYNEXT"
msgid "Play &next file in the folder"
-msgstr ""
+msgstr "播放此資料夾的下一個檔案(&N)"
msgctxt "ID_AFTERPLAYBACK_MONITOROFF"
msgid "Turn off the &monitor"
-msgstr ""
+msgstr "關閉螢幕(&M)"
msgctxt "ID_AFTERPLAYBACK_EXIT"
msgid "&Exit"
-msgstr "離開"
+msgstr "çµæŸ(&E)"
msgctxt "ID_AFTERPLAYBACK_STANDBY"
msgid "&Stand By"
-msgstr "待命"
+msgstr "待命(&S)"
msgctxt "ID_AFTERPLAYBACK_HIBERNATE"
msgid "&Hibernate"
-msgstr "休眠"
+msgstr "休眠(&H)"
msgctxt "ID_AFTERPLAYBACK_SHUTDOWN"
msgid "Shut&down"
-msgstr "關機"
+msgstr "關機(&D)"
msgctxt "ID_AFTERPLAYBACK_LOGOFF"
msgid "Log &Off"
-msgstr "登出"
+msgstr "登出(&O)"
msgctxt "ID_AFTERPLAYBACK_LOCK"
msgid "&Lock"
-msgstr "鎖定"
+msgstr "鎖定(&L)"
msgctxt "POPUP"
msgid "&Navigate"
diff --git a/src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.strings.po b/src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.strings.po
index 30cb78262..287961260 100644
--- a/src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.strings.po
+++ b/src/mpc-hc/mpcresources/PO/mpc-hc.zh_TW.strings.po
@@ -1,19 +1,22 @@
# MPC-HC - Strings extracted from string tables
-# Copyright (C) 2002 - 2015 see Authors.txt
+# Copyright (C) 2002 - 2013 see Authors.txt
# This file is distributed under the same license as the MPC-HC package.
# Translators:
+# 洪嘉鴻 <jerry9030@gmail.com>, 2015
# Jeff Huang <s8321414@gmail.com>, 2014
# kenelin <kenelin@gmail.com>, 2013
+# Ken <ken670128@yahoo.com.tw>, 2015
# Peter Chen <petercpg@gmail.com>, 2014
# roytam1 <roytam@gmail.com>, 2014
# Zakk <zakk0610@gmail.com>, 2014
+# 洪嘉鴻 <jerry9030@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: MPC-HC\n"
-"POT-Creation-Date: 2014-10-19 22:15:16+0000\n"
-"PO-Revision-Date: 2014-10-20 10:21+0000\n"
-"Last-Translator: JellyFrog\n"
-"Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/mpc-hc/language/zh_TW/)\n"
+"POT-Creation-Date: 2015-08-06 16:05:43+0000\n"
+"PO-Revision-Date: 2015-08-09 09:13+0000\n"
+"Last-Translator: 洪嘉鴻 <jerry9030@gmail.com>\n"
+"Language-Team: Chinese (Taiwan) (http://www.transifex.com/mpc-hc/mpc-hc/language/zh_TW/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -102,7 +105,7 @@ msgstr "ä½å…ƒçŽ‡"
msgctxt "IDS_STATSBAR_BITRATE_AVG_CUR"
msgid "(avg/cur)"
-msgstr "(å¹³å‡/ç¾æ™‚)"
+msgstr "(å¹³å‡/ç›®å‰)"
msgctxt "IDS_STATSBAR_SIGNAL"
msgid "Signal"
@@ -118,7 +121,7 @@ msgstr "樣å¼"
msgctxt "IDS_TEXT_SUB_RENDERING_TARGET"
msgid "If the rendering target is left undefined, SSA/ASS subtitles will be rendered relative to the video frame while all other text subtitles will be rendered relative to the window."
-msgstr ""
+msgstr "如果繪製目標未被定義, SSA/ASS 字幕會åƒè€ƒè¦–訊畫幀來繪製, 而其他文字字幕則會åƒè€ƒè¦–窗畫é¢ä¾†ç¹ªè£½ã€‚"
msgctxt "IDS_PPAGE_CAPTURE_FG0"
msgid "Never (fastest approach)"
@@ -134,7 +137,7 @@ msgstr "總是 (最慢的é¸é …)"
msgctxt "IDS_PPAGE_CAPTURE_FGDESC0"
msgid "Not supported by some devices. Two video decoders always present in the filter graph."
-msgstr "ä¸è¢«æŸäº›è¨­å‚™æ”¯æ´ã€‚在篩é¸å™¨åœ–中總會出ç¾å…©å€‹è¦–訊解碼器。"
+msgstr "ä¸è¢«æŸäº›è£ç½®æ”¯æ´ã€‚在篩é¸å™¨åœ–中總會出ç¾å…©å€‹è¦–訊解碼器。"
msgctxt "IDS_PPAGE_CAPTURE_FGDESC1"
msgid "Fast except when switching between different video streams. Only one video decoder present in the filter graph."
@@ -154,7 +157,7 @@ msgstr "僅在切æ›è‡³ä¸åŒçš„視訊類型時 (é è¨­)"
msgctxt "IDS_PPAGE_CAPTURE_SFG2"
msgid "Always (may be required by some devices)"
-msgstr "總是 (æŸäº›è¨­å‚™å¯èƒ½éœ€è¦)"
+msgstr "總是 (æŸäº›è£ç½®å¯èƒ½éœ€è¦)"
msgctxt "IDS_INFOBAR_PARENTAL_RATING"
msgid "Parental rating"
@@ -329,12 +332,12 @@ msgid "On/Off"
msgstr "開/關"
msgctxt "IDS_PPAGE_FS_CLN_FROM_FPS"
-msgid "From FPS"
-msgstr "ç”± FPS"
+msgid "From (FPS)"
+msgstr "ç”± (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_TO_FPS"
-msgid "To FPS"
-msgstr "至 FPS"
+msgid "To (FPS)"
+msgstr "至 (FPS)"
msgctxt "IDS_PPAGE_FS_CLN_DISPLAY_MODE"
msgid "Display mode (Hz)"
@@ -468,6 +471,34 @@ msgctxt "IDD_PPAGESHADERS"
msgid "Playback::Shaders"
msgstr "播放::Shaders"
+msgctxt "IDD_FILEPROPRES"
+msgid "Resources"
+msgstr "資æº"
+
+msgctxt "IDD_PPAGEMISC"
+msgid "Miscellaneous"
+msgstr "其它"
+
+msgctxt "IDD_FILEMEDIAINFO"
+msgid "MediaInfo"
+msgstr "媒體資訊"
+
+msgctxt "IDD_PPAGECAPTURE"
+msgid "Playback::Capture"
+msgstr "播放::æ“·å–"
+
+msgctxt "IDD_PPAGESYNC"
+msgid "Playback::Sync Renderer Settings"
+msgstr "播放::åŒæ­¥ç¹ªè£½å™¨è¨­å®š"
+
+msgctxt "IDD_PPAGEFULLSCREEN"
+msgid "Playback::Fullscreen"
+msgstr "播放::全螢幕"
+
+msgctxt "IDD_PPAGEAUDIORENDERER"
+msgid "Internal Filters::Audio Renderer"
+msgstr ""
+
msgctxt "IDS_AUDIOSWITCHER"
msgid "Audio Switcher"
msgstr "音訊切æ›å™¨"
@@ -478,7 +509,7 @@ msgstr "新版本的圖示庫"
msgctxt "IDS_ICONS_REASSOC_DLG_INSTR"
msgid "Do you want to reassociate the icons?"
-msgstr "ä½ è¦é‡æ–°é—œè¯åœ–示嗎?"
+msgstr "您è¦é‡æ–°é—œè¯åœ–示嗎?"
msgctxt "IDS_ICONS_REASSOC_DLG_CONTENT"
msgid "This will fix the icons being incorrectly displayed after an update of the icon library.\nThe file associations will not be modified, only the corresponding icons will be refreshed."
@@ -560,30 +591,6 @@ msgctxt "IDD_PPAGESUBDB"
msgid "Subtitles::Database"
msgstr "字幕::資料庫"
-msgctxt "IDD_FILEPROPRES"
-msgid "Resources"
-msgstr "資æº"
-
-msgctxt "IDD_PPAGEMISC"
-msgid "Miscellaneous"
-msgstr "其它"
-
-msgctxt "IDD_FILEMEDIAINFO"
-msgid "MediaInfo"
-msgstr "MediaInfo 媒體資訊"
-
-msgctxt "IDD_PPAGECAPTURE"
-msgid "Playback::Capture"
-msgstr "播放::æ“·å–"
-
-msgctxt "IDD_PPAGESYNC"
-msgid "Playback::Sync Renderer Settings"
-msgstr "播放::åŒæ­¥ç¹ªè£½å™¨è¨­å®š"
-
-msgctxt "IDD_PPAGEFULLSCREEN"
-msgid "Playback::Fullscreen"
-msgstr "播放::全螢幕"
-
msgctxt "IDD_FILEPROPDETAILS"
msgid "Details"
msgstr "詳細資訊"
@@ -602,7 +609,7 @@ msgstr "這是 Windows 9x/ME/2K çš„é è¨­ç¹ªè£½å™¨ã€‚ä¾æ“šè¦–訊視窗的å¯è¦‹
msgctxt "IDC_DSOVERLAYMIXER"
msgid "Always renders in overlay. Generally only YUV formats are allowed, but they are presented directly without any color conversion to RGB. This is the fastest rendering method of all and the only where you can be sure about fullscreen video mirroring to tv-out activating."
-msgstr "總是以覆疊模å¼ç¹ªè£½ã€‚一般說來åªå…許使用 YUV æ ¼å¼ï¼Œä½†é€™ä¸æœƒé€²è¡Œä»»ä½• RGB 色彩轉æ›è€Œç›´æŽ¥å‘ˆç¾ã€‚這是最快速的繪製方法,而且是你唯一能確ä¿ä»¥å…¨èž¢å¹•é¡å°„輸出到電視的方法。"
+msgstr "總是以覆疊模å¼ç¹ªè£½ã€‚一般說來åªå…許使用 YUV æ ¼å¼ï¼Œä½†é€™ä¸æœƒé€²è¡Œä»»ä½• RGB 色彩轉æ›è€Œç›´æŽ¥å‘ˆç¾ã€‚這是最快速的繪製方法,而且是您唯一能確ä¿ä»¥å…¨èž¢å¹•é¡å°„輸出到電視的方法。"
msgctxt "IDC_DSVMR7WIN"
msgid "The default renderer of Windows XP. Very stable and just a little slower than the Overlay mixer. Uses DirectDraw and runs in Overlay when it can."
@@ -626,7 +633,7 @@ msgstr "å’Œ VMR-9 (無轉æ›) 相åŒï¼Œä½†ä½¿ç”¨äº†çœŸæ­£çš„ two-pass bicubic ç¸
msgctxt "IDC_DSNULL_COMP"
msgid "Connects to any video-like media type and will send the incoming samples to nowhere. Use it when you don't need the video display and want to save the CPU from working unnecessarily."
-msgstr "連到任何視訊媒體類型,並且ä¸å‚³é€å‚³é€²ä¾†çš„å–樣資料。當你ä¸éœ€è¦ä»»ä½•è¦–訊顯示而åˆæƒ³ç¯€çœä¸å¿…è¦çš„ CPU 工作時å¯ä»¥ç”¨ã€‚"
+msgstr "連到任何視訊媒體類型,並且ä¸å‚³é€å‚³é€²ä¾†çš„å–樣資料。當您ä¸éœ€è¦ä»»ä½•è¦–訊顯示而åˆæƒ³ç¯€çœä¸å¿…è¦çš„ CPU 工作時å¯ä»¥ç”¨ã€‚"
msgctxt "IDC_DSNULL_UNCOMP"
msgid "Same as the normal Null renderer, but this will only connect to uncompressed types."
@@ -676,22 +683,10 @@ msgctxt "IDC_REGULARSURF"
msgid "Video surface will be allocated as a regular offscreen surface."
msgstr "螢幕繪圖é æœƒé…ç½®æˆä¸€èˆ¬å¹•å¾Œç¹ªåœ–é ã€‚"
-msgctxt "IDC_AUDRND_COMBO"
-msgid "MPC Audio Renderer is broken, do not use."
-msgstr "MPC Audio Renderer 是æ壞的,請ä¸è¦ä½¿ç”¨ã€‚"
-
msgctxt "IDS_PPAGE_OUTPUT_SYNC"
msgid "Sync Renderer"
msgstr "åŒæ­¥ç¹ªè£½å™¨"
-msgctxt "IDS_MPC_BUG_REPORT_TITLE"
-msgid "MPC-HC - Reporting a bug"
-msgstr "MPC-HC - 回報錯誤"
-
-msgctxt "IDS_MPC_BUG_REPORT"
-msgid "MPC-HC just crashed but this build was compiled without debug information.\nIf you want to report this bug, you should first try an official build.\n\nDo you want to visit the download page now?"
-msgstr "MPC-HC 未é æœŸçµ‚止但是這個版本並未編入除錯資訊。\n如果您想回報這個錯誤, 您需è¦å…ˆå˜—試使用官方版本。\n\n您è¦ç«‹å³å‰å¾€ä¸‹è¼‰é é¢å—Žï¼Ÿ"
-
msgctxt "IDS_PPAGE_OUTPUT_SURF_OFFSCREEN"
msgid "Regular offscreen plain surface"
msgstr "一般幕後繪圖é "
@@ -744,9 +739,9 @@ msgctxt "IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP"
msgid "Null (uncompressed)"
msgstr "ç„¡ (éžå£“縮)"
-msgctxt "IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND"
-msgid "MPC-HC Audio Renderer"
-msgstr "MPC-HC 音訊繪製器"
+msgctxt "IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND"
+msgid "Internal Audio Renderer"
+msgstr ""
msgctxt "IDS_EMB_RESOURCES_VIEWER_NAME"
msgid "Name"
@@ -846,15 +841,15 @@ msgstr "精確å¼åž‚ç›´åŒæ­¥"
msgctxt "IDC_CHECK_RELATIVETO"
msgid "If the rendering target is left undefined, it will be inherited from the default style."
-msgstr ""
+msgstr "若繪製目標未被定義, 將會使用é è¨­æ¨£å¼ä¾†ç¹ªè£½ã€‚"
msgctxt "IDC_CHECK_NO_SUB_ANIM"
msgid "Disallow subtitle animation. Enabling this option will lower CPU usage. You can use it if you experience flashing subtitles."
-msgstr ""
+msgstr "åœç”¨å­—幕動畫化。 啟用此é¸é …å¯ä»¥é™ä½Ž CPU 的使用資æºã€‚若你的字幕會閃çˆ, 您å¯ä»¥å•Ÿç”¨é€™å€‹é¸é …來解決。"
msgctxt "IDC_SUBPIC_TO_BUFFER"
msgid "Increasing the number of buffered subpictures should in general improve the rendering performance at the cost of a higher video RAM usage on the GPU."
-msgstr ""
+msgstr "增加緩è¡çš„å­ç•«é¢æ•¸ä¸€èˆ¬èƒ½æ”¹å–„繪製效能, 但是會增加 GPU 的顯示記憶體使用é‡ã€‚"
msgctxt "IDC_BUTTON_EXT_SET"
msgid "After clicking this button, the checked state of the format group will reflect the actual file association for MPC-HC. A newly added extension will usually make it grayed, so don't forget to check it again before closing this dialog!"
@@ -862,7 +857,7 @@ msgstr "按下此按鈕後, æ ¼å¼ç¾¤çµ„中有é¸å–的狀態會å映到 MPC-HC
msgctxt "IDC_CHECK_ALLOW_DROPPING_SUBPIC"
msgid "Disabling this option will prevent the subtitles from blinking but it may cause the video renderer to skip some video frames."
-msgstr ""
+msgstr "åœç”¨æ­¤é¸é …å°‡å¯ä»¥é˜²æ­¢å­—幕閃çˆ, 但是å¯èƒ½æœƒå°Žè‡´è¦–訊繪製器忽略掉一些視訊幀數幀。"
msgctxt "ID_PLAY_PLAY"
msgid "Play\nPlay"
@@ -942,11 +937,11 @@ msgstr "é¸é …"
msgctxt "IDS_SHADERS_SELECT"
msgid "&Select Shaders..."
-msgstr "é¸æ“‡ Shaders(&S)..."
+msgstr "é¸æ“‡è‘—色器 (Shaders) (&S)..."
msgctxt "IDS_SHADERS_DEBUG"
msgid "&Debug Shaders..."
-msgstr "åµéŒ¯ Shader... (&D)"
+msgstr "著色器 (Shader) åµéŒ¯(&D)... "
msgctxt "IDS_FAVORITES_ADD"
msgid "&Add to Favorites..."
@@ -982,7 +977,7 @@ msgstr "EDL 新影片"
msgctxt "IDS_RECENT_FILES_CLEAR"
msgid "&Clear list"
-msgstr "清除清單"
+msgstr "清除清單(&C)"
msgctxt "IDS_RECENT_FILES_QUESTION"
msgid "Are you sure that you want to delete recent files list?"
@@ -1086,7 +1081,7 @@ msgstr "啟用(&E)"
msgctxt "IDS_PANSCAN_EDIT"
msgid "&Edit..."
-msgstr "編輯..."
+msgstr "編輯(&E)..."
msgctxt "IDS_INFOBAR_TITLE"
msgid "Title"
@@ -1266,15 +1261,15 @@ msgstr "ä¿å­˜è‡ªè¨‚樣å¼"
msgctxt "IDS_CONTENT_EDUCATION_SCIENCE"
msgid "Education/Science/Factual topics"
-msgstr ""
+msgstr "教育/科學/事實話題"
msgctxt "IDS_PPAGEADVANCED_HIDE_WINDOWED"
msgid "Hides controls and panels also in windowed mode."
-msgstr ""
+msgstr "在視窗模å¼åŒæ¨£ä¹Ÿéš±è—控制項åŠé¢æ¿ã€‚"
msgctxt "IDS_PPAGEADVANCED_BLOCK_VSFILTER"
msgid "Prevent external subtitle renderer to be loaded when internal is in use."
-msgstr ""
+msgstr "當內部字幕繪製器使用時, 防止載入外部字幕繪製器。"
msgctxt "IDS_PPAGEADVANCED_COL_NAME"
msgid "Name"
@@ -1282,31 +1277,31 @@ msgstr "å稱"
msgctxt "IDS_PPAGEADVANCED_COL_VALUE"
msgid "Value"
-msgstr ""
+msgstr "數值"
msgctxt "IDS_PPAGEADVANCED_RECENT_FILES_NUMBER"
msgid "Maximum number of files shown in the \"Recent files\" menu and for which the position is potentially saved."
-msgstr ""
+msgstr "\"最近的檔案\"é¸å–®é …目中所能顯示的最大檔案數é‡åŠå¯è¢«å„²å­˜çš„ä½ç½®ã€‚"
msgctxt "IDS_PPAGEADVANCED_FILE_POS_LONGER"
msgid "Remember file position only for files longer than N minutes."
-msgstr ""
+msgstr "記ä½æª”案播放時間大於 N 分é˜çš„檔案ä½ç½®ã€‚"
msgctxt "IDS_PPAGEADVANCED_FILE_POS_AUDIO"
msgid "Remember file position also for audio files."
-msgstr ""
+msgstr "å°éŸ³è¨Šæª”案也記ä½æª”案ä½ç½®ã€‚"
msgctxt "IDS_AFTER_PLAYBACK_DO_NOTHING"
msgid "Do Nothing"
-msgstr ""
+msgstr "什麼都ä¸åš"
msgctxt "IDS_AFTER_PLAYBACK_PLAY_NEXT"
msgid "Play next file in the folder"
-msgstr ""
+msgstr "播放此資料夾的下一個檔案"
msgctxt "IDS_AFTER_PLAYBACK_REWIND"
msgid "Rewind current file"
-msgstr ""
+msgstr "倒帶目å‰æª”案"
msgctxt "IDS_AFTER_PLAYBACK_CLOSE"
msgid "Close"
@@ -1318,31 +1313,31 @@ msgstr "離開"
msgctxt "IDS_AFTER_PLAYBACK_MONITOROFF"
msgid "Turn off the monitor"
-msgstr ""
+msgstr "關閉螢幕"
msgctxt "IDS_IMAGE_JPEG_QUALITY"
msgid "JPEG Image"
-msgstr ""
+msgstr "JPEG å½±åƒ"
msgctxt "IDS_IMAGE_QUALITY"
msgid "Quality (%):"
-msgstr ""
+msgstr "å“質 (%):"
msgctxt "IDS_PPAGEADVANCED_COVER_SIZE_LIMIT"
msgid "Maximum size (NxNpx) of a cover-art loaded in the audio only mode."
-msgstr ""
+msgstr "音訊播放模å¼ä¸‹, 所載入專輯å°é¢çš„æœ€å¤§å°ºå‹ (NxNpx)。"
msgctxt "IDS_SUBTITLE_DELAY_STEP_TOOLTIP"
msgid "The subtitle delay will be decreased/increased by this value each time the corresponding hotkeys are used (%s/%s)."
-msgstr ""
+msgstr "按下字幕延é²å¿«é€Ÿéµæ™‚, 字幕延é²çš„時間將ä¾æ­¤æ•¸å€¼ä¾†æ¸›å°‘/增加 (%s/%s)。"
msgctxt "IDS_HOTKEY_NOT_DEFINED"
msgid "<not defined>"
-msgstr ""
+msgstr "<尚未定義>"
msgctxt "IDS_NAVIGATION_WATCH"
msgid "Watch"
-msgstr ""
+msgstr "觀看"
msgctxt "IDS_NAVIGATION_MOVE_UP"
msgid "Move Up"
@@ -1354,46 +1349,66 @@ msgstr "下移"
msgctxt "IDS_NAVIGATION_SORT"
msgid "Sort by LCN"
-msgstr ""
+msgstr "以 LCN 排åº"
msgctxt "IDS_NAVIGATION_REMOVE_ALL"
msgid "Remove all"
-msgstr ""
+msgstr "移除全部"
msgctxt "IDS_REMOVE_CHANNELS_QUESTION"
msgid "Are you sure you want to remove all channels from the list?"
-msgstr ""
+msgstr "您確定è¦ç§»é™¤æ­¤æ¸…單裡的所有頻é“?"
msgctxt "IDS_MEDIAINFO_NO_INFO_AVAILABLE"
msgid "No information available"
-msgstr ""
+msgstr "沒有å¯ç”¨çš„資訊"
msgctxt "IDS_MEDIAINFO_ANALYSIS_IN_PROGRESS"
msgid "Please wait, analysis in progress..."
-msgstr ""
+msgstr "請等待, 正在進行分æž..."
msgctxt "IDS_ASPECT_RATIO_FMT"
msgid "AR %d:%d"
-msgstr ""
+msgstr "長寬比例 %d:%d"
msgctxt "IDS_PPAGEADVANCED_LOGGER"
msgid "Enables logging to file (requires restart)"
-msgstr ""
+msgstr "啟用日誌記錄檔案 (需é‡æ–°å•Ÿå‹•)"
msgctxt "IDS_TIMER_REMAINING_TIME"
msgid "Remaining time"
-msgstr ""
+msgstr "剩餘時間"
msgctxt "IDS_TIMER_HIGH_PRECISION"
msgid "High precision"
-msgstr ""
+msgstr "高精確度"
msgctxt "IDS_AFTERPLAYBACK_REWIND"
msgid "After Playback: Rewind current file"
-msgstr ""
+msgstr "播放完後: 倒帶目å‰æª”案"
msgctxt "IDS_AFTERPLAYBACK_CLOSE"
msgid "After Playback: Close"
+msgstr "播放完後: 關閉"
+
+msgctxt "IDS_FRAME_INIT_FAILED"
+msgid "MPC-HC encountered a problem during initialization. With your help we might be able to fix the issue.\n\nDo you want to report it?"
+msgstr ""
+
+msgctxt "IDS_TIME_SHIFT_TOOLTIP"
+msgid "Enter a positive value if the audio is early, a negative value if it is late."
+msgstr ""
+
+msgctxt "IDS_WEBUI_DISABLED_PREVIEW_MSG"
+msgid "Preview is currently disabled. You can enable it in MPC-HC's options."
+msgstr "ç›®å‰å·²åœç”¨é è¦½åŠŸèƒ½ã€‚您å¯ä»¥æ–¼ MPC-HC çš„é¸é …中將其啟用。"
+
+msgctxt "IDS_WEBUI_PREVIEW_WARNING"
+msgid "This option can be used to preview media files from remote location. Use it only on a properly secured private network.\n\nDo you really want to enable this option?"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_INTERNAL"
+msgid "Internal Subtitle Renderer"
msgstr ""
msgctxt "IDS_AG_OPEN_DEVICE"
@@ -1506,7 +1521,7 @@ msgstr "最接近的關éµå¹€"
msgctxt "IDS_HOOKS_FAILED"
msgid "MPC-HC encountered a problem during initialization. DVD playback may not work correctly. This might be caused by some incompatibilities with certain security tools.\n\nDo you want to report this issue?"
-msgstr "MPC-HC 在åˆå§‹åŒ–時é‡åˆ°äº†ä¸€å€‹å•é¡Œã€‚DVD 播放å¯èƒ½æœƒä¸æ­£å¸¸ã€‚這å¯èƒ½èˆ‡æŸäº›å®‰å…¨å·¥å…·çš„ä¸å…¼å®¹æ€§æ‰€è‡´ã€‚\n\nä½ è¦å ±å‘Šé€™å€‹å•é¡Œå—Ž?"
+msgstr "MPC-HC 在åˆå§‹åŒ–時é‡åˆ°äº†ä¸€å€‹å•é¡Œã€‚DVD 播放å¯èƒ½æœƒä¸æ­£å¸¸ã€‚這å¯èƒ½èˆ‡æŸäº›å®‰å…¨å·¥å…·çš„ä¸ç›¸å®¹æ€§æ‰€è‡´ã€‚\n\n您è¦å›žå ±é€™å€‹å•é¡Œå—Ž?"
msgctxt "IDS_PPAGEFULLSCREEN_SHOWNEVER"
msgid "Never show"
@@ -1550,7 +1565,7 @@ msgstr "縮圖已æˆåŠŸå„²å­˜"
msgctxt "IDS_MENU_VIDEO_STREAM"
msgid "&Video Track"
-msgstr ""
+msgstr "視訊軌é“(&V)"
msgctxt "IDS_MENU_VIDEO_ANGLE"
msgid "Video Ang&le"
@@ -1574,7 +1589,7 @@ msgstr "匯出設定"
msgctxt "IDS_EXPORT_SETTINGS_WARNING"
msgid "Some changes have not been saved yet.\nDo you want to save them before exporting?"
-msgstr "有些設定尚未儲存。\nä½ è¦å…ˆå„²å­˜å®ƒå€‘後æ‰åŒ¯å‡ºå—Ž?"
+msgstr "有些設定尚未儲存。\n您è¦å…ˆå„²å­˜å®ƒå€‘後æ‰åŒ¯å‡ºå—Ž?"
msgctxt "IDS_EXPORT_SETTINGS_SUCCESS"
msgid "The settings have been successfully exported."
@@ -1582,7 +1597,7 @@ msgstr "設定已經æˆåŠŸåŒ¯å‡ºã€‚"
msgctxt "IDS_EXPORT_SETTINGS_FAILED"
msgid "The export failed! This can happen when you don't have the correct rights."
-msgstr "匯出失敗! 當你沒有正確的權é™æ™‚會出ç¾æ­¤æƒ…æ³ã€‚"
+msgstr "匯出失敗! 當您沒有正確的權é™æ™‚會出ç¾æ­¤æƒ…æ³ã€‚"
msgctxt "IDS_BDA_ERROR"
msgid "BDA Error"
@@ -1678,15 +1693,23 @@ msgstr "跳至起始點"
msgctxt "IDS_OSD_SHOW_FILENAME"
msgid "OSD: Show File Name"
-msgstr ""
+msgstr "OSD: 顯示檔案å稱"
+
+msgctxt "IDS_PLAY_DVD"
+msgid "Play DVD"
+msgstr "播放 DVD"
+
+msgctxt "IDS_PLAY_BD"
+msgid "Play BD"
+msgstr "播放 BD"
msgctxt "IDS_OSD_DISPLAY_RENDERER_STATS"
msgid "OSD: Display Renderer Statistics"
-msgstr ""
+msgstr "OSD: 顯示繪製器統計"
msgctxt "IDS_OSD_RESET_RENDERER_STATS"
msgid "OSD: Reset Renderer Statistics"
-msgstr ""
+msgstr "OSD: é‡ç½®ç¹ªè£½å™¨çµ±è¨ˆ"
msgctxt "IDD_PPAGESUBMISC"
msgid "Subtitles::Misc"
@@ -1694,11 +1717,11 @@ msgstr "字幕::其它"
msgctxt "IDS_VIEW_BORDERLESS"
msgid "Hide &borders"
-msgstr "éš±è—邊框"
+msgstr "éš±è—邊框(&B)"
msgctxt "IDS_VIEW_FRAMEONLY"
msgid "Fra&me Only"
-msgstr "僅影格"
+msgstr "僅影格(&M)"
msgctxt "IDS_VIEW_CAPTIONMENU"
msgid "Sho&w Caption&&Menu"
@@ -1706,11 +1729,11 @@ msgstr "顯示標題é¸å–®"
msgctxt "IDS_VIEW_HIDEMENU"
msgid "Hide &Menu"
-msgstr "éš±è—é¸å–®"
+msgstr "éš±è—é¸å–®(&M)"
msgctxt "IDD_PPAGEADVANCED"
msgid "Advanced"
-msgstr ""
+msgstr "進階"
msgctxt "IDS_AG_VIEW_MINIMAL"
msgid "View Minimal"
@@ -1946,11 +1969,11 @@ msgstr "è€é—†éµ"
msgctxt "IDS_MPLAYERC_77"
msgid "Player Menu"
-msgstr ""
+msgstr "播放器é¸å–®"
msgctxt "IDS_MPLAYERC_78"
msgid "Player Menu (full)"
-msgstr ""
+msgstr "播放器é¸å–® (完整)"
msgctxt "IDS_AG_FILTERS_MENU"
msgid "Filters Menu"
@@ -1961,20 +1984,20 @@ msgid "Options"
msgstr "é¸å–®"
msgctxt "IDS_AG_NEXT_AUDIO"
-msgid "Next Audio"
-msgstr "次一音訊"
+msgid "Next Audio Track"
+msgstr "下一段音軌"
msgctxt "IDS_AG_PREV_AUDIO"
-msgid "Prev Audio"
-msgstr "å‰ä¸€éŸ³è¨Š"
+msgid "Prev Audio Track"
+msgstr "上一段音軌"
msgctxt "IDS_AG_NEXT_SUBTITLE"
-msgid "Next Subtitle"
-msgstr "次一字幕"
+msgid "Next Subtitle Track"
+msgstr ""
msgctxt "IDS_AG_PREV_SUBTITLE"
-msgid "Prev Subtitle"
-msgstr "å‰ä¸€å­—幕"
+msgid "Prev Subtitle Track"
+msgstr ""
msgctxt "IDS_MPLAYERC_85"
msgid "On/Off Subtitle"
@@ -1984,22 +2007,6 @@ msgctxt "IDS_MPLAYERC_86"
msgid "Reload Subtitles"
msgstr "é‡æ–°è¼‰å…¥å­—幕"
-msgctxt "IDS_MPLAYERC_87"
-msgid "Next Audio (OGM)"
-msgstr "次一音訊 (OGM)"
-
-msgctxt "IDS_MPLAYERC_88"
-msgid "Prev Audio (OGM)"
-msgstr "å‰ä¸€éŸ³è¨Š (OGM)"
-
-msgctxt "IDS_MPLAYERC_89"
-msgid "Next Subtitle (OGM)"
-msgstr "次一字幕 (OGM)"
-
-msgctxt "IDS_MPLAYERC_90"
-msgid "Prev Subtitle (OGM)"
-msgstr "å‰ä¸€å­—幕 (OGM)"
-
msgctxt "IDS_MPLAYERC_91"
msgid "Next Angle (DVD)"
msgstr "次一角度 (DVD)"
@@ -2009,20 +2016,20 @@ msgid "Prev Angle (DVD)"
msgstr "å‰ä¸€è§’度 (DVD)"
msgctxt "IDS_MPLAYERC_93"
-msgid "Next Audio (DVD)"
-msgstr "次一音訊 (DVD)"
+msgid "Next Audio Track (DVD)"
+msgstr "下一段音軌 (DVD)"
msgctxt "IDS_MPLAYERC_94"
-msgid "Prev Audio (DVD)"
-msgstr "å‰ä¸€éŸ³è¨Š (DVD)"
+msgid "Prev Audio Track (DVD)"
+msgstr "上一段音軌 (DVD)"
msgctxt "IDS_MPLAYERC_95"
-msgid "Next Subtitle (DVD)"
-msgstr "次一字幕 (DVD)"
+msgid "Next Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_96"
-msgid "Prev Subtitle (DVD)"
-msgstr "å‰ä¸€å­—幕 (DVD)"
+msgid "Prev Subtitle Track (DVD)"
+msgstr ""
msgctxt "IDS_MPLAYERC_97"
msgid "On/Off Subtitle (DVD)"
@@ -2030,7 +2037,7 @@ msgstr "開啟/關閉字幕 (DVD)"
msgctxt "IDS_OSD_DISPLAY_CURRENT_TIME"
msgid "OSD: Display Current Time"
-msgstr ""
+msgstr "OSD: 顯示目å‰æ™‚é–“"
msgctxt "IDS_PPAGEWEBSERVER_0"
msgid "Select the directory"
@@ -2122,7 +2129,7 @@ msgstr "角度: %02lu/%02lu, %lux%lu %luHz %lu:%lu"
msgctxt "IDS_MAINFRM_11"
msgid "%s, %s %u Hz %d bits %d %s"
-msgstr ""
+msgstr "%s, %s %u Hz %d bits %d %s"
msgctxt "IDS_ADD_TO_PLAYLIST"
msgid "Add to MPC-HC Playlist"
@@ -2134,7 +2141,7 @@ msgstr "以 MPC-HC 播放"
msgctxt "IDS_CANNOT_CHANGE_FORMAT"
msgid "MPC-HC has not enough privileges to change files formats associations. Please click on the \"Run as administrator\" button."
-msgstr ""
+msgstr "MPC-HC 沒有足夠的權é™è®Šæ›´æª”案格å¼é—œè¯ã€‚請點擊 \"以系統管ç†å“¡èº«åˆ†åŸ·è¡Œ\" 按鈕å–得管ç†è€…權é™ã€‚"
msgctxt "IDS_APP_DESCRIPTION"
msgid "MPC-HC is an extremely light-weight, open source media player for Windows. It supports all common video and audio file formats available for playback. We are 100% spyware free, there are no advertisements or toolbars."
@@ -2318,7 +2325,7 @@ msgstr "è¦è¼‰å…¥å­—幕您必須變更視訊繪製器類型並é‡æ–°é–‹å•Ÿæª”案
msgctxt "IDS_SUBTITLE_FILES_FILTER"
msgid "Subtitle files"
-msgstr ""
+msgstr "字幕檔案"
msgctxt "IDS_MAINFRM_68"
msgid "Aspect Ratio: %ld:%ld"
@@ -2388,14 +2395,6 @@ msgctxt "IDS_FULLSCREENMONITOR_CURRENT"
msgid "Current"
msgstr "ç›®å‰çš„"
-msgctxt "IDS_MPC_CRASH"
-msgid "MPC-HC terminated unexpectedly. To help us fix this problem, please send this file \"%s\" to our bug tracker.\n\nDo you want to open the folder containing the minidump file and visit the bug tracker now?"
-msgstr "MPC-HC 未é æœŸçµ‚止。為了幫助我們修正這個å•é¡Œ, è«‹å‚³é€ '%s' 這個檔案到我們的 Bug Tracker。\n\n您è¦é–‹å•Ÿå…§å« minidump 傾å°æª”案的資料夾並立å³æ‹œè¨ª Bug Tracker?"
-
-msgctxt "IDS_MPC_MINIDUMP_FAIL"
-msgid "Failed to create dump file to \"%s\" (error %u)"
-msgstr "無法建立傾å°æª”案到 '%s' (錯誤 %u)"
-
msgctxt "IDS_MAINFRM_DIR_TITLE"
msgid "Select Directory"
msgstr "é¸æ“‡ç›®éŒ„"
@@ -2410,7 +2409,7 @@ msgstr "æš«åœ"
msgctxt "IDS_AG_TOGGLE_CAPTION"
msgid "Toggle Caption&Menu"
-msgstr "切æ›æ¨™é¡Œé¸å–®"
+msgstr "切æ›æ¨™é¡Œé¸å–®(&M)"
msgctxt "IDS_AG_TOGGLE_SEEKER"
msgid "Toggle Seek Bar"
@@ -2569,8 +2568,8 @@ msgid "Volume boost Max"
msgstr "最大音é‡å¢žå¹…"
msgctxt "IDS_USAGE"
-msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
-msgstr "用法: mpc-hc.exe \"路徑å稱\" [é¸é …]\n\n\"路徑å稱\"\tè¦è¼‰å…¥çš„主è¦æª”案或資料夾。(å¯ä½¿ç”¨è¬ç”¨å­—å…ƒ, \"-\" 表示標準輸入)\n/dub \"音æºå稱\"\t載入é¡å¤–的音訊檔案\n/dubdelay \"檔案\"\t以平移 XXms 的時間載入é¡å¤–的音訊檔案。\n\t\t(如果檔案å«æœ‰ \"...DELAY XXms...\")\n/d3dfs\t\t在 D3D 全螢幕模å¼å•Ÿå‹•ç¹ªè£½\n/sub \"字幕å稱\"\t載入é¡å¤–的字幕檔\n/filter \"篩é¸å™¨å\"\t從動態連çµå‡½å¼åº«è¼‰å…¥ DirectShow 篩é¸å™¨ã€‚\n\t\t(å…許è¬ç”¨å­—å…ƒ)\n/dvd\t\t執行 DVD 模å¼, \"路徑å稱\" 代表該 DVD 資料夾\n\t\t(é¸ç”¨)\n/dvdpos T#C\t從第 T 標題, 第 C 章節開始播放\n/dvdpos T#hh:mm\t從第 T 標題, 時間 hh:mm:ss 開始播放\n/cd\t\t載入音樂 CD 或是 (S)VCD 的所有音軌, \"路徑å稱\"\n\t\t表示光碟機路徑 (é¸ç”¨)\n/device\t\té–‹å•Ÿé è¨­è¦–訊設備\n/open\t\t開啟檔案, 但ä¸è‡ªå‹•æ’­æ”¾\n/play\t\t播放程å¼ä¸€å•Ÿå‹•å°±æ’­æ”¾æª”案\n/close\t\tæ’­æ”¾å®Œç•¢å¾Œå°±é—œé–‰æ’­æ”¾ç¨‹å¼ (æ­é… /play\n\t\t一起用æ‰æœ‰æ•ˆ)\n/shutdown\t播放完之後關閉作業系統\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\t以全螢幕模å¼å•Ÿå‹•\n/minimized\t以最å°åŒ–模å¼å•Ÿå‹•\n/new\t\t使用新的播放程å¼å¯¦é«”\n/add\t\t新增 \"路徑å稱\" 到播放清單, å¯èˆ‡ /open å’Œ /play\n\t\tåˆä½µä½¿ç”¨\n/randomize\tRandomize the playlist\n/regvid\t\t建立視訊格å¼æª”案關è¯\n/regaud\t\t建立音訊格å¼æª”案關è¯\n/regpl\t\t建立播放清單檔案關è¯\n/regall\t\t建立所有支æ´æ ¼å¼çš„檔案關è¯\n/unregall\t\t移除所有檔案關è¯\n/start ms\t\t從第 ms 毫秒開始播放\n/startpos hh:mm:ss\t從時間 hh:mm:ss 開始播放\n/fixedsize w,h\t設定固定的視窗大å°\n/monitor N\t在第 N 顯示器啟動, N 從 1 開始\n/audiorenderer N\t使用第 N 音訊譜製器啟動, N 從 1 開始\n\t\t(請見 \"輸出\" 設定)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/reset\t\t回復é è¨­è¨­å®š\n/help /h /?\t顯示命令列é¸é …的說明\n"
+msgid "Usage: mpc-hc.exe \"pathname\" [switches]\n\n\"pathname\"\tThe main file or directory to be loaded (wildcards\n\t\tallowed, \"-\" denotes standard input)\n/dub \"dubname\"\tLoad an additional audio file\n/dubdelay \"file\"\tLoad an additional audio file shifted with XXms (if\n\t\tthe file contains \"...DELAY XXms...\")\n/d3dfs\t\tStart rendering in D3D fullscreen mode\n/sub \"subname\"\tLoad an additional subtitle file\n/filter \"filtername\"\tLoad DirectShow filters from a dynamic link\n\t\tlibrary (wildcards allowed)\n/dvd\t\tRun in dvd mode, \"pathname\" means the dvd\n\t\tfolder (optional)\n/dvdpos T#C\tStart playback at title T, chapter C\n/dvdpos T#hh:mm\tStart playback at title T, position hh:mm:ss\n/cd\t\tLoad all the tracks of an audio cd or (s)vcd,\n\t\t\"pathname\" means the drive path (optional)\n/device\t\tOpen the default video device\n/open\t\tOpen the file, don't automatically start playback\n/play\t\tStart playing the file as soon the player is\n\t\tlaunched\n/close\t\tClose the player after playback (only works when\n\t\tused with /play)\n/shutdown\tShutdown the operating system after playback\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\tOpen next file in the folder after playback\n/fullscreen\tStart in full-screen mode\n/minimized\tStart in minimized mode\n/new\t\tUse a new instance of the player\n/add\t\tAdd \"pathname\" to playlist, can be combined\n\t\twith /open and /play\n/randomize\tRandomize the playlist\n/regvid\t\tCreate file associations for video files\n/regaud\t\tCreate file associations for audio files\n/regpl\t\tCreate file associations for playlist files\n/regall\t\tCreate file associations for all supported file types\n/unregall\t\tRemove all file associations\n/start ms\t\tStart playing at \"ms\" (= milliseconds)\n/startpos hh:mm:ss\tStart playing at position hh:mm:ss\n/fixedsize w,h\tSet a fixed window size\n/monitor N\tStart player on monitor N, where N starts from 1\n/audiorenderer N\tStart using audiorenderer N, where N starts from 1\n\t\t(see \"Output\" settings)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\tOpen MPC-HC in background\n/webport N\tStart web interface on specified port\n/debug\t\tShow debug information in OSD\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\tRestore default settings\n/help /h /?\tShow help about command line switches\n"
+msgstr "用法: mpc-hc.exe \"路徑å稱\" [é¸é …]\n\n\"路徑å稱\"\tè¦è¼‰å…¥çš„主è¦æª”案或資料夾。(å¯ä½¿ç”¨è¬ç”¨å­—å…ƒ, \"-\" 表示標準輸入)\n/dub \"音æºå稱\"\t載入é¡å¤–的音訊檔案\n/dubdelay \"檔案\"\t以平移 XXms 的時間載入é¡å¤–的音訊檔案。\n\t\t(如果檔案å«æœ‰ \"...DELAY XXms...\")\n/d3dfs\t\t在 D3D 全螢幕模å¼å•Ÿå‹•ç¹ªè£½\n/sub \"字幕å稱\"\t載入é¡å¤–的字幕檔\n/filter \"篩é¸å™¨å\"\t從動態連çµå‡½å¼åº«è¼‰å…¥ DirectShow 篩é¸å™¨ã€‚\n\t\t(å…許è¬ç”¨å­—å…ƒ)\n/dvd\t\t執行 DVD 模å¼, \"路徑å稱\" 代表該 DVD 資料夾\n\t\t(é¸ç”¨)\n/dvdpos T#C\t從第 T 標題, 第 C 章節開始播放\n/dvdpos T#hh:mm\t從第 T 標題, 時間 hh:mm:ss 開始播放\n/cd\t\t載入音樂 CD 或是 (S)VCD 的所有音軌, \"路徑å稱\"\n\t\t表示光碟機路徑 (é¸ç”¨)\n/device\t\té–‹å•Ÿé è¨­è¦–訊è£ç½®/open\t\t開啟檔案, 但ä¸è‡ªå‹•æ’­æ”¾\n/play\t\t播放程å¼ä¸€å•Ÿå‹•å°±æ’­æ”¾æª”案\n/close\t\tæ’­æ”¾å®Œç•¢å¾Œå°±é—œé–‰æ’­æ”¾ç¨‹å¼ (æ­é… /play\n\t\t一起用æ‰æœ‰æ•ˆ)\n/shutdown\t播放完之後關閉作業系統\n/standby\t\tPut the operating system in standby mode after playback\n/hibernate\tHibernate operating system after playback\n/logoff\t\tLog off after playback\n/lock\t\tLock workstation after playback\n/monitoroff\tTurn off the monitor after playback\n/playnext\t\t播放完後開啟資料夾的下個檔案\n/fullscreen\t以全螢幕模å¼å•Ÿå‹•\n/minimized\t以最å°åŒ–模å¼å•Ÿå‹•\n/new\t\t使用新的播放程å¼å¯¦é«”\n/add\t\t新增 \"路徑å稱\" 到播放清單, å¯èˆ‡ /open å’Œ /play\n\t\tåˆä½µä½¿ç”¨\n/randomize\tRandomize the playlist\n/regvid\t\t建立視訊格å¼æª”案關è¯\n/regaud\t\t建立音訊格å¼æª”案關è¯\n/regpl\t\t建立播放清單檔案關è¯\n/regall\t\t建立所有支æ´æ ¼å¼çš„檔案關è¯\n/unregall\t\t移除所有檔案關è¯\n/start ms\t\t從第 ms 毫秒開始播放\n/startpos hh:mm:ss\t從時間 hh:mm:ss 開始播放\n/fixedsize w,h\t設定固定的視窗大å°\n/monitor N\t在第 N 顯示器啟動, N 從 1 開始\n/audiorenderer N\t使用第 N 音訊譜製器啟動, N 從 1 開始\n\t\t(請見 \"輸出\" 設定)\n/shaderpreset \"Pr\"\tStart using \"Pr\" shader preset\n/pns \"name\"\tSpecify Pan&Scan preset name to use\n/iconsassoc\tReassociate format icons\n/nofocus\t\t於背景開啟 MPC-HC\n/webport N\tStart web interface on specified port\n/debug\t\t於視控調整功能 (OSD) 中顯示åµéŒ¯è³‡è¨Š\n/nocrashreporter\tDisable the crash reporter\n/slave \"hWnd\"\tUse MPC-HC as slave\n/hwgpu \"index\"\tSet the index of the GPU used for hardware decoding\n\t\tOnly available for CUVID and DXVA2 (copy-back)\n/reset\t\t回復é è¨­è¨­å®š\n/help /h /?\t顯示命令列é¸é …的說明\n"
msgctxt "IDS_UNKNOWN_SWITCH"
msgid "Unrecognized switch(es) found in command line string: \n\n"
@@ -2926,7 +2925,7 @@ msgstr "其他音訊"
msgctxt "IDS_MFMT_AC3"
msgid "AC-3"
-msgstr ""
+msgstr "AC-3"
msgctxt "IDS_MFMT_AIFF"
msgid "AIFF"
@@ -2954,7 +2953,7 @@ msgstr "Opus 音訊"
msgctxt "IDS_MFMT_DTS"
msgid "DTS/DTS-HD"
-msgstr ""
+msgstr "DTS/DTS-HD"
msgctxt "IDS_MFMT_AMR"
msgid "AMR"
@@ -3044,18 +3043,6 @@ msgctxt "IDS_DVB_CHANNEL_ASPECT_RATIO"
msgid "Aspect Ratio"
msgstr "長寬比"
-msgctxt "IDS_ARS_WASAPI_MODE"
-msgid "Use WASAPI (restart playback)"
-msgstr "使用 WASAPI (會é‡æ–°æ’­æ”¾)"
-
-msgctxt "IDS_ARS_MUTE_FAST_FORWARD"
-msgid "Mute on fast forward"
-msgstr "快轉時éœéŸ³"
-
-msgctxt "IDS_ARS_SOUND_DEVICE"
-msgid "Sound Device:"
-msgstr "è²éŸ³è£ç½®:"
-
msgctxt "IDS_OSD_RS_VSYNC_ON"
msgid "VSync: On"
msgstr "åž‚ç›´åŒæ­¥: é–‹å•Ÿ"
@@ -3346,7 +3333,7 @@ msgstr "回復音é‡: 關閉"
msgctxt "IDS_SIZE_UNIT_BYTES"
msgid "bytes"
-msgstr ""
+msgstr "ä½å…ƒçµ„"
msgctxt "IDS_SIZE_UNIT_K"
msgid "KB"
@@ -3522,15 +3509,15 @@ msgstr "播放完後: 鎖定"
msgctxt "IDS_AFTERPLAYBACK_MONITOROFF"
msgid "After Playback: Turn off the monitor"
-msgstr ""
+msgstr "播放完後: 關閉螢幕"
msgctxt "IDS_AFTERPLAYBACK_PLAYNEXT"
msgid "After Playback: Play next file in the folder"
-msgstr ""
+msgstr "播放完後: 播放此資料夾的下一個檔案"
msgctxt "IDS_AFTERPLAYBACK_DONOTHING"
msgid "After Playback: Do nothing"
-msgstr ""
+msgstr "播放完後: 什麼都ä¸åš"
msgctxt "IDS_OSD_BRIGHTNESS"
msgid "Brightness: %s"
@@ -3570,7 +3557,7 @@ msgstr "外部分離器å¯èƒ½æœ‰å®ƒå€‘自己的語言å好é¸é …所以 MPC-HC ç
msgctxt "IDS_NAVIGATE_BD_PLAYLISTS"
msgid "&Blu-Ray playlists"
-msgstr "&Blu-Ray 播放清單"
+msgstr "è—光播放清單(&B)"
msgctxt "IDS_NAVIGATE_PLAYLIST"
msgid "&Playlist"
@@ -3590,25 +3577,33 @@ msgstr "é »é“ (&C)"
msgctxt "IDC_FASTSEEK_CHECK"
msgid "If \"latest keyframe\" is selected, seek to the first keyframe before the actual seek point.\nIf \"nearest keyframe\" is selected, seek to the first keyframe before or after the seek point depending on which is the closest."
-msgstr ""
+msgstr "è‹¥é¸æ“‡ \"最近的關éµå¹€\", 在æœç´¢æ™‚會é¸æ“‡å¯¦éš›æœç´¢æ™‚間點å‰æœ€è¿‘çš„é—œéµå¹€ã€‚\nè‹¥é¸æ“‡ \"最接近的關éµå¹€\" , 在æœç´¢æ™‚會根據å‰å¾Œé—œéµå¹€é¸æ“‡æœ€è¿‘çš„é—œéµå¹€ã€‚"
msgctxt "IDC_ASSOCIATE_ALL_FORMATS"
msgid "Associate with all formats"
-msgstr ""
+msgstr "é—œè¯æ‰€æœ‰æ ¼å¼"
msgctxt "IDC_ASSOCIATE_VIDEO_FORMATS"
msgid "Associate with video formats only"
-msgstr ""
+msgstr "僅關è¯è¦–訊格å¼"
msgctxt "IDC_ASSOCIATE_AUDIO_FORMATS"
msgid "Associate with audio formats only"
-msgstr ""
+msgstr "僅關è¯éŸ³è¨Šæ ¼å¼"
msgctxt "IDC_CLEAR_ALL_ASSOCIATIONS"
msgid "Clear all associations"
-msgstr ""
+msgstr "清除所有檔案關è¯"
msgctxt "IDS_FILTER_SETTINGS_CAPTION"
msgid "Settings"
msgstr "設置"
+msgctxt "IDS_SUBTITLE_RENDERER_VS_FILTER"
+msgid "VSFilter / DirectVobSub"
+msgstr ""
+
+msgctxt "IDS_SUBTITLE_RENDERER_XY_SUB_FILTER"
+msgid "XySubFilter"
+msgstr ""
+
diff --git a/src/mpc-hc/mpcresources/SyncTranslations.vcxproj b/src/mpc-hc/mpcresources/SyncTranslations.vcxproj
new file mode 100644
index 000000000..acf78b577
--- /dev/null
+++ b/src/mpc-hc/mpcresources/SyncTranslations.vcxproj
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{904017F7-EE7A-49B6-A000-0D2FE5D5809A}</ProjectGuid>
+ <Keyword>MakeFileProj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <ConfigurationType>Makefile</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="..\..\platform.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\common.props" />
+ </ImportGroup>
+ <PropertyGroup>
+ <BaseIntermediateOutputPath>$(IntDir)</BaseIntermediateOutputPath>
+ <NMakeBuildCommandLine>sync.bat Silent</NMakeBuildCommandLine>
+ <NMakeCleanCommandLine>del *.rc 2> NUL</NMakeCleanCommandLine>
+ <NMakeReBuildCommandLine>sync.bat Silent</NMakeReBuildCommandLine>
+ <NMakePreprocessorDefinitions>WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+</Project> \ No newline at end of file
diff --git a/src/mpc-hc/mpcresources/cfg/mpc-hc.id.cfg b/src/mpc-hc/mpcresources/cfg/mpc-hc.id.cfg
new file mode 100644
index 000000000..f236ee1a1
--- /dev/null
+++ b/src/mpc-hc/mpcresources/cfg/mpc-hc.id.cfg
@@ -0,0 +1,8 @@
+[Info]
+langName: Indonesian
+LangShortName: id
+langDefine: LANG_INDONESIAN, SUBLANG_INDONESIAN_INDONESIA
+langDefineMFC: AFX_TARG_IND
+langID: 1057
+fileDesc: Indonesian language resource for MPC-HC
+font: FONT 8, "MS Shell Dlg", 400, 0, 0x1
diff --git a/src/mpc-hc/mpcresources/cfg/mpc-hc.lt.cfg b/src/mpc-hc/mpcresources/cfg/mpc-hc.lt.cfg
new file mode 100644
index 000000000..e7f1fa925
--- /dev/null
+++ b/src/mpc-hc/mpcresources/cfg/mpc-hc.lt.cfg
@@ -0,0 +1,8 @@
+[Info]
+langName: Lithuanian
+LangShortName: lt
+langDefine: LANG_LITHUANIAN, SUBLANG_DEFAULT
+langDefineMFC: AFX_TARG_LIT
+langID: 1063
+fileDesc: Lithuanian language resource for MPC-HC
+font: FONT 8, "MS Shell Dlg", 400, 0, 0x1
diff --git a/src/mpc-hc/mpcresources/cfg/mpc-hc.pa.cfg b/src/mpc-hc/mpcresources/cfg/mpc-hc.pa.cfg
new file mode 100644
index 000000000..24a75bb66
--- /dev/null
+++ b/src/mpc-hc/mpcresources/cfg/mpc-hc.pa.cfg
@@ -0,0 +1,9 @@
+[Info]
+langName: Punjabi
+LangShortName: pa
+langDefine: LANG_PUNJABI, SUBLANG_PUNJABI_INDIA
+langDefineMFC: AFX_TARG_PAN
+langID: 1094
+fileDesc: Punjabi language resource for MPC-HC
+font: FONT 8, "MS Shell Dlg", 400, 0, 0x1
+installerIsTranslated: False
diff --git a/src/mpc-hc/mpcresources/common_python.bat b/src/mpc-hc/mpcresources/common_python.bat
index 3e217787f..76c6cb1ab 100755
--- a/src/mpc-hc/mpcresources/common_python.bat
+++ b/src/mpc-hc/mpcresources/common_python.bat
@@ -40,10 +40,9 @@ IF NOT DEFINED PYTHON_PATH GOTO MissingVar
ECHO Backing up current translation files...
IF NOT EXIST backup MD backup
-COPY /Y ..\mpc-hc.rc backup
-COPY /Y *.rc backup
+XCOPY /I /D /Y /Q ..\mpc-hc.rc backup
IF NOT EXIST backup\PO MD backup\PO
-COPY /Y PO backup\PO
+XCOPY /I /D /Y /Q PO backup\PO
ECHO ----------------------
EXIT /B
@@ -58,5 +57,4 @@ EXIT /B
ECHO Not all build dependencies were found.
ECHO.
ECHO See "%ROOT_DIR%\docs\Compilation.txt" for more information.
-ENDLOCAL
EXIT /B 1
diff --git a/src/mpc-hc/mpcresources/mpc-hc.ar.rc b/src/mpc-hc/mpcresources/mpc-hc.ar.rc
deleted file mode 100644
index b784217a2..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.ar.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.be.rc b/src/mpc-hc/mpcresources/mpc-hc.be.rc
deleted file mode 100644
index 1663cd07f..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.be.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.bn.rc b/src/mpc-hc/mpcresources/mpc-hc.bn.rc
deleted file mode 100644
index 429415826..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.bn.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.ca.rc b/src/mpc-hc/mpcresources/mpc-hc.ca.rc
deleted file mode 100644
index de91acfba..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.ca.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.cs.rc b/src/mpc-hc/mpcresources/mpc-hc.cs.rc
deleted file mode 100644
index cf9979d0e..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.cs.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.da.rc b/src/mpc-hc/mpcresources/mpc-hc.da.rc
deleted file mode 100644
index 28fe991e5..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.da.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.de.rc b/src/mpc-hc/mpcresources/mpc-hc.de.rc
deleted file mode 100644
index 5bb07bd99..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.de.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.el.rc b/src/mpc-hc/mpcresources/mpc-hc.el.rc
deleted file mode 100644
index 1328e8cc1..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.el.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.en_GB.rc b/src/mpc-hc/mpcresources/mpc-hc.en_GB.rc
deleted file mode 100644
index 5aedb7d73..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.en_GB.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.es.rc b/src/mpc-hc/mpcresources/mpc-hc.es.rc
deleted file mode 100644
index 22b24e4f4..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.es.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.eu.rc b/src/mpc-hc/mpcresources/mpc-hc.eu.rc
deleted file mode 100644
index 6a7c5926d..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.eu.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.fi.rc b/src/mpc-hc/mpcresources/mpc-hc.fi.rc
deleted file mode 100644
index 7f7329add..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.fi.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.fr.rc b/src/mpc-hc/mpcresources/mpc-hc.fr.rc
deleted file mode 100644
index 84f5741ef..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.fr.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.gl.rc b/src/mpc-hc/mpcresources/mpc-hc.gl.rc
deleted file mode 100644
index 0b10ce4a4..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.gl.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.he.rc b/src/mpc-hc/mpcresources/mpc-hc.he.rc
deleted file mode 100644
index 99a94bbeb..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.he.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.hr.rc b/src/mpc-hc/mpcresources/mpc-hc.hr.rc
deleted file mode 100644
index 5e6604653..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.hr.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.hu.rc b/src/mpc-hc/mpcresources/mpc-hc.hu.rc
deleted file mode 100644
index 23b556caf..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.hu.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.hy.rc b/src/mpc-hc/mpcresources/mpc-hc.hy.rc
deleted file mode 100644
index 07a2550b2..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.hy.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.it.rc b/src/mpc-hc/mpcresources/mpc-hc.it.rc
deleted file mode 100644
index 463335351..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.it.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.ja.rc b/src/mpc-hc/mpcresources/mpc-hc.ja.rc
deleted file mode 100644
index e3d8b2899..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.ja.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.ko.rc b/src/mpc-hc/mpcresources/mpc-hc.ko.rc
deleted file mode 100644
index 46739b519..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.ko.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.ms_MY.rc b/src/mpc-hc/mpcresources/mpc-hc.ms_MY.rc
deleted file mode 100644
index c3a480b01..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.ms_MY.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.nl.rc b/src/mpc-hc/mpcresources/mpc-hc.nl.rc
deleted file mode 100644
index 61a2e8aad..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.nl.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.pl.rc b/src/mpc-hc/mpcresources/mpc-hc.pl.rc
deleted file mode 100644
index 4bf0caa11..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.pl.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.pt_BR.rc b/src/mpc-hc/mpcresources/mpc-hc.pt_BR.rc
deleted file mode 100644
index 41cc199a7..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.pt_BR.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.ro.rc b/src/mpc-hc/mpcresources/mpc-hc.ro.rc
deleted file mode 100644
index 1deafe996..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.ro.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.ru.rc b/src/mpc-hc/mpcresources/mpc-hc.ru.rc
deleted file mode 100644
index 4dd9be06c..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.ru.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.sk.rc b/src/mpc-hc/mpcresources/mpc-hc.sk.rc
deleted file mode 100644
index 22d4e925c..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.sk.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.sl.rc b/src/mpc-hc/mpcresources/mpc-hc.sl.rc
deleted file mode 100644
index 6b73e575b..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.sl.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.sr.rc b/src/mpc-hc/mpcresources/mpc-hc.sr.rc
deleted file mode 100644
index 0e72e633e..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.sr.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.sv.rc b/src/mpc-hc/mpcresources/mpc-hc.sv.rc
deleted file mode 100644
index a4420c7e5..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.sv.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.th_TH.rc b/src/mpc-hc/mpcresources/mpc-hc.th_TH.rc
deleted file mode 100644
index 848964cba..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.th_TH.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.tr.rc b/src/mpc-hc/mpcresources/mpc-hc.tr.rc
deleted file mode 100644
index aa75f1042..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.tr.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.tt.rc b/src/mpc-hc/mpcresources/mpc-hc.tt.rc
deleted file mode 100644
index db7fec5a8..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.tt.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.uk.rc b/src/mpc-hc/mpcresources/mpc-hc.uk.rc
deleted file mode 100644
index a0228afd8..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.uk.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.vi.rc b/src/mpc-hc/mpcresources/mpc-hc.vi.rc
deleted file mode 100644
index a5f1c919c..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.vi.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.zh_CN.rc b/src/mpc-hc/mpcresources/mpc-hc.zh_CN.rc
deleted file mode 100644
index d457d5a89..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.zh_CN.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpc-hc.zh_TW.rc b/src/mpc-hc/mpcresources/mpc-hc.zh_TW.rc
deleted file mode 100644
index 01359a6bf..000000000
--- a/src/mpc-hc/mpcresources/mpc-hc.zh_TW.rc
+++ /dev/null
Binary files differ
diff --git a/src/mpc-hc/mpcresources/mpcresources.vcxproj b/src/mpc-hc/mpcresources/mpcresources.vcxproj
index 18a20cf15..825fe9074 100644
--- a/src/mpc-hc/mpcresources/mpcresources.vcxproj
+++ b/src/mpc-hc/mpcresources/mpcresources.vcxproj
@@ -161,6 +161,14 @@
<Configuration>Release Hungarian</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release Indonesian|Win32">
+ <Configuration>Release Indonesian</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Indonesian|x64">
+ <Configuration>Release Indonesian</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release Italian|Win32">
<Configuration>Release Italian</Configuration>
<Platform>Win32</Platform>
@@ -185,6 +193,14 @@
<Configuration>Release Korean</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release Lithuanian|Win32">
+ <Configuration>Release Lithuanian</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Lithuanian|x64">
+ <Configuration>Release Lithuanian</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release Malay|Win32">
<Configuration>Release Malay</Configuration>
<Platform>Win32</Platform>
@@ -209,6 +225,14 @@
<Configuration>Release Portuguese (Brazil)</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release Punjabi|Win32">
+ <Configuration>Release Punjabi</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Punjabi|x64">
+ <Configuration>Release Punjabi</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release Romanian|Win32">
<Configuration>Release Romanian</Configuration>
<Platform>Win32</Platform>
@@ -350,12 +374,15 @@
<TargetName Condition="'$(Configuration)'=='Release Greek'">$(ProjectName).el</TargetName>
<TargetName Condition="'$(Configuration)'=='Release Hebrew'">$(ProjectName).he</TargetName>
<TargetName Condition="'$(Configuration)'=='Release Hungarian'">$(ProjectName).hu</TargetName>
+ <TargetName Condition="'$(Configuration)'=='Release Indonesian'">$(ProjectName).id</TargetName>
<TargetName Condition="'$(Configuration)'=='Release Italian'">$(ProjectName).it</TargetName>
<TargetName Condition="'$(Configuration)'=='Release Japanese'">$(ProjectName).ja</TargetName>
<TargetName Condition="'$(Configuration)'=='Release Korean'">$(ProjectName).ko</TargetName>
+ <TargetName Condition="'$(Configuration)'=='Release Lithuanian'">$(ProjectName).lt</TargetName>
<TargetName Condition="'$(Configuration)'=='Release Malay'">$(ProjectName).ms_MY</TargetName>
<TargetName Condition="'$(Configuration)'=='Release Polish'">$(ProjectName).pl</TargetName>
<TargetName Condition="'$(Configuration)'=='Release Portuguese (Brazil)'">$(ProjectName).pt_BR</TargetName>
+ <TargetName Condition="'$(Configuration)'=='Release Punjabi'">$(ProjectName).pa</TargetName>
<TargetName Condition="'$(Configuration)'=='Release Romanian'">$(ProjectName).ro</TargetName>
<TargetName Condition="'$(Configuration)'=='Release Russian'">$(ProjectName).ru</TargetName>
<TargetName Condition="'$(Configuration)'=='Release Serbian'">$(ProjectName).sr</TargetName>
@@ -435,6 +462,9 @@
<ResourceCompile Include="mpc-hc.hy.rc">
<ExcludedFromBuild Condition="'$(Configuration)'!='Release Armenian'">true</ExcludedFromBuild>
</ResourceCompile>
+ <ResourceCompile Include="mpc-hc.id.rc">
+ <ExcludedFromBuild Condition="'$(Configuration)'!='Release Indonesian'">true</ExcludedFromBuild>
+ </ResourceCompile>
<ResourceCompile Include="mpc-hc.it.rc">
<ExcludedFromBuild Condition="'$(Configuration)'!='Release Italian'">true</ExcludedFromBuild>
</ResourceCompile>
@@ -444,12 +474,18 @@
<ResourceCompile Include="mpc-hc.ko.rc">
<ExcludedFromBuild Condition="'$(Configuration)'!='Release Korean'">true</ExcludedFromBuild>
</ResourceCompile>
+ <ResourceCompile Include="mpc-hc.lt.rc">
+ <ExcludedFromBuild Condition="'$(Configuration)'!='Release Lithuanian'">true</ExcludedFromBuild>
+ </ResourceCompile>
<ResourceCompile Include="mpc-hc.ms_MY.rc">
<ExcludedFromBuild Condition="'$(Configuration)'!='Release Malay'">true</ExcludedFromBuild>
</ResourceCompile>
<ResourceCompile Include="mpc-hc.nl.rc">
<ExcludedFromBuild Condition="'$(Configuration)'!='Release Dutch'">true</ExcludedFromBuild>
</ResourceCompile>
+ <ResourceCompile Include="mpc-hc.pa.rc">
+ <ExcludedFromBuild Condition="'$(Configuration)'!='Release Punjabi'">true</ExcludedFromBuild>
+ </ResourceCompile>
<ResourceCompile Include="mpc-hc.pl.rc">
<ExcludedFromBuild Condition="'$(Configuration)'!='Release Polish'">true</ExcludedFromBuild>
</ResourceCompile>
diff --git a/src/mpc-hc/mpcresources/mpcresources.vcxproj.filters b/src/mpc-hc/mpcresources/mpcresources.vcxproj.filters
index 67ae4bf3f..5353d00c0 100644
--- a/src/mpc-hc/mpcresources/mpcresources.vcxproj.filters
+++ b/src/mpc-hc/mpcresources/mpcresources.vcxproj.filters
@@ -65,6 +65,9 @@
<ResourceCompile Include="mpc-hc.hy.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
+ <ResourceCompile Include="mpc-hc.id.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
<ResourceCompile Include="mpc-hc.it.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
@@ -74,12 +77,18 @@
<ResourceCompile Include="mpc-hc.ko.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
+ <ResourceCompile Include="mpc-hc.lt.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
<ResourceCompile Include="mpc-hc.ms_MY.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
<ResourceCompile Include="mpc-hc.nl.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
+ <ResourceCompile Include="mpc-hc.pa.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
<ResourceCompile Include="mpc-hc.pl.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
diff --git a/src/mpc-hc/mpcresources/sync.bat b/src/mpc-hc/mpcresources/sync.bat
index 5c18dd618..2b2aed558 100755
--- a/src/mpc-hc/mpcresources/sync.bat
+++ b/src/mpc-hc/mpcresources/sync.bat
@@ -20,12 +20,21 @@ REM along with this program. If not, see <http://www.gnu.org/licenses/>.
SETLOCAL
PUSHD %~dp0
+SET SILENT=%1
+
CALL "common_python.bat"
IF %ERRORLEVEL% NEQ 0 GOTO END
python.exe sync.py
:END
-PAUSE
-ENDLOCAL
-EXIT /B
+IF NOT DEFINED SILENT (
+ PAUSE
+)
+IF %ERRORLEVEL% NEQ 0 (
+ ENDLOCAL
+ EXIT /B 1
+) ELSE (
+ ENDLOCAL
+ EXIT /B
+)
diff --git a/src/mpc-hc/mpcresources/sync.py b/src/mpc-hc/mpcresources/sync.py
index ff292963a..de851e4a7 100644
--- a/src/mpc-hc/mpcresources/sync.py
+++ b/src/mpc-hc/mpcresources/sync.py
@@ -52,9 +52,9 @@ if __name__ == '__main__':
pool = Pool()
results = []
- for file in os.listdir('.'):
- if fnmatch.fnmatch(file, '*.rc'):
- results.append(pool.apply_async(processRC, [os.path.splitext(file)[0]]));
+ for file in os.listdir('PO'):
+ if fnmatch.fnmatch(file, 'mpc-hc.*.menus.po'):
+ results.append(pool.apply_async(processRC, [file[:-9]]));
pool.close()
diff --git a/src/mpc-hc/mplayerc.cpp b/src/mpc-hc/mplayerc.cpp
index fc6b2fa51..8c8e7bed6 100644
--- a/src/mpc-hc/mplayerc.cpp
+++ b/src/mpc-hc/mplayerc.cpp
@@ -37,7 +37,7 @@
#include "FileAssoc.h"
#include "UpdateChecker.h"
#include "winddk/ntddcdvd.h"
-#include "mhook/mhook-lib/mhook.h"
+#include "MhookHelper.h"
#include <afxsock.h>
#include <atlsync.h>
#include <atlutil.h>
@@ -51,7 +51,7 @@
#define HOOKS_BUGS_URL _T("https://trac.mpc-hc.org/ticket/3739")
-HICON LoadIcon(CString fn, bool bSmallIcon)
+HICON LoadIcon(CString fn, bool bSmallIcon, DpiHelper* pDpiHelper/* = nullptr*/)
{
if (fn.IsEmpty()) {
return nullptr;
@@ -65,6 +65,11 @@ HICON LoadIcon(CString fn, bool bSmallIcon)
CSize size(bSmallIcon ? GetSystemMetrics(SM_CXSMICON) : GetSystemMetrics(SM_CXICON),
bSmallIcon ? GetSystemMetrics(SM_CYSMICON) : GetSystemMetrics(SM_CYICON));
+ if (pDpiHelper) {
+ size.cx = pDpiHelper->ScaleSystemToOverrideX(size.cx);
+ size.cy = pDpiHelper->ScaleSystemToOverrideY(size.cy);
+ }
+
typedef HRESULT(WINAPI * LIWSD)(HINSTANCE, PCWSTR, int, int, HICON*);
auto loadIcon = [&size](PCWSTR pszName) {
LIWSD pLIWSD = (LIWSD)GetProcAddress(GetModuleHandle(_T("comctl32.dll")), "LoadIconWithScaleDown");
@@ -285,7 +290,7 @@ static bool FindRedir(const CString& fn, CString ct, CAtlList<CString>& fns, con
}
}
- CString dir = fn.Left(max(fn.ReverseFind('/'), fn.ReverseFind('\\')) + 1); // "ReverseFindOneOf"
+ CString dir = fn.Left(std::max(fn.ReverseFind('/'), fn.ReverseFind('\\')) + 1); // "ReverseFindOneOf"
for (const auto re : res) {
std::wcmatch mc;
@@ -596,7 +601,7 @@ void SetAudioRenderer(int AudioDevNo)
m_AudioRendererDisplayNames.Add(AUDRNDT_NULL_COMP);
m_AudioRendererDisplayNames.Add(AUDRNDT_NULL_UNCOMP);
- m_AudioRendererDisplayNames.Add(AUDRNDT_MPC);
+ m_AudioRendererDisplayNames.Add(AUDRNDT_INTERNAL);
i += 3;
if (AudioDevNo >= 1 && AudioDevNo <= i) {
AfxGetMyApp()->m_AudioRendererDisplayName_CL = m_AudioRendererDisplayNames[AudioDevNo - 1];
@@ -1467,7 +1472,7 @@ BOOL CMPlayerCApp::InitInstance()
// At this point only main thread should be present, mhook is custom-hacked accordingly
bool bHookingSuccessful = true;
- bHookingSuccessful &= !!Mhook_SetHook(&(PVOID&)Real_IsDebuggerPresent, (PVOID)Mine_IsDebuggerPresent);
+ bHookingSuccessful &= !!Mhook_SetHookEx(&Real_IsDebuggerPresent, Mine_IsDebuggerPresent);
m_hNTDLL = LoadLibrary(_T("ntdll.dll"));
#ifndef _DEBUG // Disable NtQueryInformationProcess in debug (prevent VS debugger to stop on crash address)
@@ -1475,13 +1480,13 @@ BOOL CMPlayerCApp::InitInstance()
Real_NtQueryInformationProcess = (decltype(Real_NtQueryInformationProcess))GetProcAddress(m_hNTDLL, "NtQueryInformationProcess");
if (Real_NtQueryInformationProcess) {
- bHookingSuccessful &= !!Mhook_SetHook(&(PVOID&)Real_NtQueryInformationProcess, (PVOID)Mine_NtQueryInformationProcess);
+ bHookingSuccessful &= !!Mhook_SetHookEx(&Real_NtQueryInformationProcess, Mine_NtQueryInformationProcess);
}
}
#endif
- bHookingSuccessful &= !!Mhook_SetHook(&(PVOID&)Real_CreateFileW, (PVOID)Mine_CreateFileW);
- bHookingSuccessful &= !!Mhook_SetHook(&(PVOID&)Real_DeviceIoControl, (PVOID)Mine_DeviceIoControl);
+ bHookingSuccessful &= !!Mhook_SetHookEx(&Real_CreateFileW, Mine_CreateFileW);
+ bHookingSuccessful &= !!Mhook_SetHookEx(&Real_DeviceIoControl, Mine_DeviceIoControl);
if (!bHookingSuccessful) {
if (AfxMessageBox(IDS_HOOKS_FAILED, MB_ICONWARNING | MB_YESNO, 0) == IDYES) {
@@ -1490,11 +1495,11 @@ BOOL CMPlayerCApp::InitInstance()
}
// If those hooks fail it's annoying but try to run anyway without reporting any error in release mode
- VERIFY(Mhook_SetHook(&(PVOID&)Real_ChangeDisplaySettingsExA, (PVOID)Mine_ChangeDisplaySettingsExA));
- VERIFY(Mhook_SetHook(&(PVOID&)Real_ChangeDisplaySettingsExW, (PVOID)Mine_ChangeDisplaySettingsExW));
- VERIFY(Mhook_SetHook(&(PVOID&)Real_CreateFileA, (PVOID)Mine_CreateFileA)); // The internal splitter uses the right share mode anyway so this is no big deal
- VERIFY(Mhook_SetHook(&(PVOID&)Real_LockWindowUpdate, (PVOID)Mine_LockWindowUpdate));
- VERIFY(Mhook_SetHook(&(PVOID&)Real_mixerSetControlDetails, (PVOID)Mine_mixerSetControlDetails));
+ VERIFY(Mhook_SetHookEx(&Real_ChangeDisplaySettingsExA, Mine_ChangeDisplaySettingsExA));
+ VERIFY(Mhook_SetHookEx(&Real_ChangeDisplaySettingsExW, Mine_ChangeDisplaySettingsExW));
+ VERIFY(Mhook_SetHookEx(&Real_CreateFileA, Mine_CreateFileA)); // The internal splitter uses the right share mode anyway so this is no big deal
+ VERIFY(Mhook_SetHookEx(&Real_LockWindowUpdate, Mine_LockWindowUpdate));
+ VERIFY(Mhook_SetHookEx(&Real_mixerSetControlDetails, Mine_mixerSetControlDetails));
CFilterMapper2::Init();
@@ -1744,7 +1749,9 @@ BOOL CMPlayerCApp::InitInstance()
CMainFrame* pFrame = DEBUG_NEW CMainFrame;
m_pMainWnd = pFrame;
if (!pFrame->LoadFrame(IDR_MAINFRAME, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, nullptr, nullptr)) {
- AfxMessageBox(_T("CMainFrame::LoadFrame failed!"));
+ if (MessageBox(nullptr, ResStr(IDS_FRAME_INIT_FAILED), m_pszAppName, MB_ICONERROR | MB_YESNO) == IDYES) {
+ ShellExecute(nullptr, _T("open"), TRAC_URL, nullptr, nullptr, SW_SHOWDEFAULT);
+ }
return FALSE;
}
pFrame->m_controls.LoadState();
@@ -2261,28 +2268,28 @@ void CMPlayerCApp::UpdateColorControlRange(bool isEVR)
m_ColorControl[0].MinValue = FixedToInt(m_EVRColorControl[0].MinValue);
m_ColorControl[0].MaxValue = FixedToInt(m_EVRColorControl[0].MaxValue);
m_ColorControl[0].DefaultValue = FixedToInt(m_EVRColorControl[0].DefaultValue);
- m_ColorControl[0].StepSize = max(1, FixedToInt(m_EVRColorControl[0].StepSize));
+ m_ColorControl[0].StepSize = std::max(1, FixedToInt(m_EVRColorControl[0].StepSize));
// Contrast
m_ColorControl[1].MinValue = FixedToInt(m_EVRColorControl[1].MinValue, 100) - 100;
m_ColorControl[1].MaxValue = FixedToInt(m_EVRColorControl[1].MaxValue, 100) - 100;
m_ColorControl[1].DefaultValue = FixedToInt(m_EVRColorControl[1].DefaultValue, 100) - 100;
- m_ColorControl[1].StepSize = max(1, FixedToInt(m_EVRColorControl[1].StepSize, 100));
+ m_ColorControl[1].StepSize = std::max(1, FixedToInt(m_EVRColorControl[1].StepSize, 100));
// Hue
m_ColorControl[2].MinValue = FixedToInt(m_EVRColorControl[2].MinValue);
m_ColorControl[2].MaxValue = FixedToInt(m_EVRColorControl[2].MaxValue);
m_ColorControl[2].DefaultValue = FixedToInt(m_EVRColorControl[2].DefaultValue);
- m_ColorControl[2].StepSize = max(1, FixedToInt(m_EVRColorControl[2].StepSize));
+ m_ColorControl[2].StepSize = std::max(1, FixedToInt(m_EVRColorControl[2].StepSize));
// Saturation
m_ColorControl[3].MinValue = FixedToInt(m_EVRColorControl[3].MinValue, 100) - 100;
m_ColorControl[3].MaxValue = FixedToInt(m_EVRColorControl[3].MaxValue, 100) - 100;
m_ColorControl[3].DefaultValue = FixedToInt(m_EVRColorControl[3].DefaultValue, 100) - 100;
- m_ColorControl[3].StepSize = max(1, FixedToInt(m_EVRColorControl[3].StepSize, 100));
+ m_ColorControl[3].StepSize = std::max(1, FixedToInt(m_EVRColorControl[3].StepSize, 100));
} else {
// Brightness
m_ColorControl[0].MinValue = (int)floor(m_VMR9ColorControl[0].MinValue + 0.5);
m_ColorControl[0].MaxValue = (int)floor(m_VMR9ColorControl[0].MaxValue + 0.5);
m_ColorControl[0].DefaultValue = (int)floor(m_VMR9ColorControl[0].DefaultValue + 0.5);
- m_ColorControl[0].StepSize = max(1, (int)(m_VMR9ColorControl[0].StepSize + 0.5));
+ m_ColorControl[0].StepSize = std::max(1, (int)(m_VMR9ColorControl[0].StepSize + 0.5));
// Contrast
/*if (m_VMR9ColorControl[1].MinValue == 0.0999908447265625) {
m_VMR9ColorControl[1].MinValue = 0.11; //fix NVIDIA bug
@@ -2293,17 +2300,17 @@ void CMPlayerCApp::UpdateColorControlRange(bool isEVR)
m_ColorControl[1].MinValue = (int)floor(m_VMR9ColorControl[1].MinValue * 100 + 0.5) - 100;
m_ColorControl[1].MaxValue = (int)floor(m_VMR9ColorControl[1].MaxValue * 100 + 0.5) - 100;
m_ColorControl[1].DefaultValue = (int)floor(m_VMR9ColorControl[1].DefaultValue * 100 + 0.5) - 100;
- m_ColorControl[1].StepSize = max(1, (int)(m_VMR9ColorControl[1].StepSize * 100 + 0.5));
+ m_ColorControl[1].StepSize = std::max(1, (int)(m_VMR9ColorControl[1].StepSize * 100 + 0.5));
// Hue
m_ColorControl[2].MinValue = (int)floor(m_VMR9ColorControl[2].MinValue + 0.5);
m_ColorControl[2].MaxValue = (int)floor(m_VMR9ColorControl[2].MaxValue + 0.5);
m_ColorControl[2].DefaultValue = (int)floor(m_VMR9ColorControl[2].DefaultValue + 0.5);
- m_ColorControl[2].StepSize = max(1, (int)(m_VMR9ColorControl[2].StepSize + 0.5));
+ m_ColorControl[2].StepSize = std::max(1, (int)(m_VMR9ColorControl[2].StepSize + 0.5));
// Saturation
m_ColorControl[3].MinValue = (int)floor(m_VMR9ColorControl[3].MinValue * 100 + 0.5) - 100;
m_ColorControl[3].MaxValue = (int)floor(m_VMR9ColorControl[3].MaxValue * 100 + 0.5) - 100;
m_ColorControl[3].DefaultValue = (int)floor(m_VMR9ColorControl[3].DefaultValue * 100 + 0.5) - 100;
- m_ColorControl[3].StepSize = max(1, (int)(m_VMR9ColorControl[3].StepSize * 100 + 0.5));
+ m_ColorControl[3].StepSize = std::max(1, (int)(m_VMR9ColorControl[3].StepSize * 100 + 0.5));
}
// Brightness
diff --git a/src/mpc-hc/mplayerc.h b/src/mpc-hc/mplayerc.h
index 4dbe6a304..a33191897 100644
--- a/src/mpc-hc/mplayerc.h
+++ b/src/mpc-hc/mplayerc.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -26,6 +26,7 @@
#endif
#include "EventDispatcher.h"
+#include "DpiHelper.h"
#include "RenderersSettings.h"
#include "resource.h"
@@ -43,7 +44,7 @@
// define the default logo we use
#define DEF_LOGO IDF_LOGO3
-extern HICON LoadIcon(CString fn, bool bSmallIcon);
+extern HICON LoadIcon(CString fn, bool bSmallIcon, DpiHelper* pDpiHelper = nullptr);
extern bool LoadType(CString fn, CString& type);
extern bool LoadResource(UINT resid, CStringA& str, LPCTSTR restype);
extern CStringA GetContentType(CString fn, CAtlList<CString>* redir = nullptr);
@@ -188,24 +189,6 @@ public:
afx_msg void OnHelpShowcommandlineswitches();
};
-class DPI final
-{
- int m_dpix, m_dpiy;
-public:
- DPI() {
- HDC hDC = ::GetDC(nullptr);
- m_dpix = GetDeviceCaps(hDC, LOGPIXELSX);
- m_dpiy = GetDeviceCaps(hDC, LOGPIXELSY);
- ::ReleaseDC(nullptr, hDC);
- }
- int ScaleFloorX(int x) { return x * m_dpix / 96; }
- int ScaleFloorY(int y) { return y * m_dpiy / 96; }
- int ScaleX(int x) { return MulDiv(x, m_dpix, 96); }
- int ScaleY(int y) { return MulDiv(y, m_dpiy, 96); }
- int TransposeScaledX(int x) { return MulDiv(x, m_dpiy, m_dpix); }
- int TransposeScaledY(int y) { return MulDiv(y, m_dpix, m_dpiy); }
-};
-
#define AfxGetAppSettings() (*static_cast<CMPlayerCApp*>(AfxGetApp())->m_s.get())
#define AfxGetMyApp() static_cast<CMPlayerCApp*>(AfxGetApp())
#define AfxGetMainFrame() dynamic_cast<CMainFrame*>(AfxGetMainWnd())
diff --git a/src/mpc-hc/res/mpc-hc.exe.manifest.conf b/src/mpc-hc/res/mpc-hc.exe.manifest.conf
index 7de320989..7ed89debd 100644
--- a/src/mpc-hc/res/mpc-hc.exe.manifest.conf
+++ b/src/mpc-hc/res/mpc-hc.exe.manifest.conf
@@ -37,7 +37,7 @@
</compatibility>
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
- <dpiAware>true</dpiAware>
+ <dpiAware>True/PM</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly> \ No newline at end of file
diff --git a/src/mpc-hc/res/web/default.css b/src/mpc-hc/res/web/default.css
index c923f6057..f61bd41b9 100644
--- a/src/mpc-hc/res/web/default.css
+++ b/src/mpc-hc/res/web/default.css
@@ -1,13 +1,16 @@
-/*! normalize.css v3.0.0 | MIT License | git.io/normalize */
+/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
+img,legend{border:0}
+legend,td,th{padding:0}
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
-article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}
+body{margin:0}
+article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}
audio,canvas,progress,video{display:inline-block;vertical-align:baseline}
audio:not([controls]){display:none;height:0}
[hidden],template{display:none}
-a{background:0 0}
+a{background-color:transparent}
a:active,a:hover{outline:0}
abbr[title]{border-bottom:1px dotted}
-b,strong{font-weight:700}
+b,optgroup,strong{font-weight:700}
dfn{font-style:italic}
h1{font-size:2em;margin:.67em 0}
mark{background:#ff0;color:#000}
@@ -15,11 +18,10 @@ small{font-size:80%}
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
sup{top:-.5em}
sub{bottom:-.25em}
-img{border:0}
svg:not(:root){overflow:hidden}
figure{margin:1em 40px}
-hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}
-pre{overflow:auto}
+hr{box-sizing:content-box;height:0}
+pre,textarea{overflow:auto}
code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}
button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}
button{overflow:visible}
@@ -30,13 +32,10 @@ button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
input{line-height:normal}
input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}
input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}
-input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}
+input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}
input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}
fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
-legend{border:0;padding:0}
-textarea{overflow:auto}
-optgroup{font-weight:700}
-/* END OF normalize.css 2.1.3 */
+/* END OF normalize.css 3.0.3 */
/* common */
diff --git a/src/mpc-hc/res/web/player.html b/src/mpc-hc/res/web/player.html
index 59aa35198..39f16ab83 100644
--- a/src/mpc-hc/res/web/player.html
+++ b/src/mpc-hc/res/web/player.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -49,7 +49,7 @@
</tr>
<tr>
<td id="video" onclick="onCommand(889)">
- <img src="snapshot.jpg" id="snapshot" alt="snapshot" onload="onLoadSnapshot()" onabort="onAbortErrorSnapshot()" onerror="onAbortErrorSnapshot()">
+ [preview]
</td>
</tr>
<tr>
diff --git a/src/mpc-hc/resource.h b/src/mpc-hc/resource.h
index 2160d0829..d34bb49a1 100644
--- a/src/mpc-hc/resource.h
+++ b/src/mpc-hc/resource.h
@@ -228,10 +228,6 @@
#define ID_STREAM_SUB_NEXT 954
#define ID_STREAM_SUB_PREV 955
#define ID_STREAM_SUB_ONOFF 956
-#define ID_OGM_AUDIO_NEXT 957
-#define ID_OGM_AUDIO_PREV 958
-#define ID_OGM_SUB_NEXT 959
-#define ID_OGM_SUB_PREV 960
#define ID_DVD_ANGLE_NEXT 961
#define ID_DVD_ANGLE_PREV 962
#define ID_DVD_AUDIO_NEXT 963
@@ -293,9 +289,6 @@
#define ID_NAVIGATE_JUMPTO_SUBITEM_END 4899
#define ID_VIEW_ZOOM_AUTOFIT_LARGER 4900
#define IDS_FILTER_SETTINGS_CAPTION 7000
-#define IDS_ARS_WASAPI_MODE 7100
-#define IDS_ARS_MUTE_FAST_FORWARD 7101
-#define IDS_ARS_SOUND_DEVICE 7102
#define IDD_OPEN_DLG 10000
#define IDD_MEDIATYPES_DLG 10002
#define IDD_SAVE_DLG 10004
@@ -340,6 +333,7 @@
#define IDD_PPAGESYNC 10055
#define IDD_PPAGEFULLSCREEN 10056
#define IDD_RFS_FILELIST_EXT 10057
+#define IDD_PPAGEAUDIORENDERER 10058
#define IDC_COMBO1 11000
#define IDC_COMBO2 11001
#define IDC_COMBO3 11002
@@ -792,10 +786,6 @@
#define IDS_AG_PREV_SUBTITLE 32961
#define IDS_MPLAYERC_85 32962
#define IDS_MPLAYERC_86 32963
-#define IDS_MPLAYERC_87 32964
-#define IDS_MPLAYERC_88 32965
-#define IDS_MPLAYERC_89 32966
-#define IDS_MPLAYERC_90 32967
#define IDS_MPLAYERC_91 32968
#define IDS_MPLAYERC_92 32969
#define IDS_MPLAYERC_93 32970
@@ -811,6 +801,8 @@
#define IDS_MPLAYERC_103 32980
#define IDS_AG_SEEKSET 32982
#define IDS_OSD_SHOW_FILENAME 32983
+#define IDS_PLAY_DVD 32984
+#define IDS_PLAY_BD 32985
#define IDS_PPAGEWEBSERVER_0 32996
#define IDS_MAINFRM_2 33014
#define IDS_AG_SUBTITLES_SAVED 33015
@@ -927,8 +919,6 @@
#define IDS_BOOST_OSD 33203
#define IDS_BALANCE_OSD 33204
#define IDS_FULLSCREENMONITOR_CURRENT 33205
-#define IDS_MPC_CRASH 33206
-#define IDS_MPC_MINIDUMP_FAIL 33207
#define ID_FILE_OPENDIRECTORY 33208
#define IDS_MAINFRM_DIR_TITLE 33209
#define IDS_MAINFRM_DIR_CHECK 33210
@@ -998,7 +988,7 @@
#define IDC_RESETDEVICE 33400
#define IDS_NAVIGATE_TUNERSCAN 33401
#define IDS_SUBTITLES_ERROR 33402
-#define IDC_CHECK_WIN7 33403
+#define IDC_CHECK_ENHANCED_TASKBAR 33403
#define ID_VIEW_SYNCHRONIZEVIDEO 33408
#define ID_VIEW_SYNCHRONIZEDISPLAY 33409
#define ID_VIEW_SYNCHRONIZENEAREST 33410
@@ -1345,8 +1335,6 @@
#define IDS_PPAGE_OUTPUT_NULL_UNCOMP 41422
#define IDS_PPAGE_OUTPUT_MADVR 41423
#define IDS_PPAGE_OUTPUT_SYNC 41424
-#define IDS_MPC_BUG_REPORT_TITLE 41425
-#define IDS_MPC_BUG_REPORT 41426
#define IDS_PPAGE_OUTPUT_SURF_OFFSCREEN 41427
#define IDS_PPAGE_OUTPUT_SURF_2D 41428
#define IDS_PPAGE_OUTPUT_SURF_3D 41429
@@ -1360,7 +1348,7 @@
#define IDS_PPAGE_OUTPUT_UNAVAILABLEMSG 41437
#define IDS_PPAGE_OUTPUT_AUD_NULL_COMP 41438
#define IDS_PPAGE_OUTPUT_AUD_NULL_UNCOMP 41439
-#define IDS_PPAGE_OUTPUT_AUD_MPC_HC_REND 41440
+#define IDS_PPAGE_OUTPUT_AUD_INTERNAL_REND 41440
#define IDS_EMB_RESOURCES_VIEWER_NAME 41441
#define IDS_EMB_RESOURCES_VIEWER_TYPE 41442
#define IDS_EMB_RESOURCES_VIEWER_INFO 41443
@@ -1473,6 +1461,13 @@
#define IDS_TIMER_HIGH_PRECISION 57432
#define IDS_AFTERPLAYBACK_REWIND 57433
#define IDS_AFTERPLAYBACK_CLOSE 57434
+#define IDS_FRAME_INIT_FAILED 57435
+#define IDS_TIME_SHIFT_TOOLTIP 57436
+#define IDS_WEBUI_DISABLED_PREVIEW_MSG 57437
+#define IDS_WEBUI_PREVIEW_WARNING 57438
+#define IDS_SUBTITLE_RENDERER_INTERNAL 57439
+#define IDS_SUBTITLE_RENDERER_VS_FILTER 57440
+#define IDS_SUBTITLE_RENDERER_XY_SUB_FILTER 57441
// Next default values for new objects
//
diff --git a/src/thirdparty/DoctorDump/CrashRpt.h b/src/thirdparty/DoctorDump/CrashRpt.h
index cb71f7c1c..7ef7630f9 100644
--- a/src/thirdparty/DoctorDump/CrashRpt.h
+++ b/src/thirdparty/DoctorDump/CrashRpt.h
@@ -97,6 +97,82 @@ typedef CrashProcessingCallbackResult (CALLBACK *PFNCRASHPROCESSINGCALLBACK)(
LPVOID userData //!< Pointer to user-defined data.
);
+
+namespace custom_data_collection {
+
+//! Result of custom data collection.
+enum Result
+{
+ ShowUploadConfirmDialog, //!< Proceed to upload confirm dialog stage.
+ DoUpload, //!< Skip upload confirm dialog and proceed to upload stage.
+ CancelUpload, //!< Cancel upload.
+};
+
+//! Information about the exception.
+struct ExceptionInfo
+{
+ DWORD ExceptionInfoSize; //!< Size of this structure. Should be set to sizeof(ExceptionInfo).
+ LPBYTE UserData; //!< Pointer to user-defined data buffer.
+ DWORD UserDataSize; //!< Size of userData buffer.
+ HANDLE Process; //!< Handle to the crashed process.
+ DWORD ProcessId; //!< Process ID of the crashed process.
+ LPVOID ExceptInfo; //!< Pointer to \b MINIDUMP_EXCEPTION_INFORMATION structure.
+ BOOL WasAssert; //!< Is it assert? (see \ref crash_rpt::CrashRpt::SkipDoctorDump_SendAssertionViolated).
+ LPCSTR DumpGroup; //!< Used-defined dump group (see \ref crash_rpt::CrashRpt::SkipDoctorDump_SendAssertionViolated).
+ int DumpID; //!< Dump ID of this crash in DrDump service.
+ int DumpGroupID; //!< DumpGroup ID of this crash in DrDump service.
+ int ProblemID; //!< Problem ID of this crash in DrDump service.
+};
+
+//! This interface used to add custom data to crash report.
+struct IDataBag
+{
+ //! You may add any file to crash report. This file will be read when crash appears and will be sent within the report.
+ //! Multiple files may be added. Filename of the file in the report may be changed to any name.
+ //! \return If the function succeeds, the return value is \b true.
+ virtual bool AddFileToReport(
+ LPCWSTR path, //!< [in] Path to the file, that will be added to the report.
+ LPCWSTR reportFileName /* = NULL */ //!< [in] Filename that will be used in report for this file. If parameter is \b NULL, original name from path will be used.
+ ) = 0;
+
+ //! Remove from report the file that was registered earlier to be sent within report.
+ //! \return If the function succeeds, the return value is \b true.
+ virtual bool RemoveFileFromReport(
+ LPCWSTR path //!< [in] Path to the file, that will be removed from the report.
+ ) = 0;
+
+ //! You may add any key/value pair to crash report.
+ //! \return If the function succeeds, the return value is \b true.
+ virtual bool AddUserInfoToReport(
+ LPCWSTR key, //!< [in] key string that will be added to the report.
+ LPCWSTR value //!< [in] value for the key.
+ ) = 0;
+
+ //! You may remove any key that was added previously to crash report by \a AddUserInfoToReport.
+ //! \return If the function succeeds, the return value is \b true.
+ virtual bool RemoveUserInfoFromReport(
+ LPCWSTR key //!< [in] key string that will be removed from the report.
+ ) = 0;
+};
+
+//! Client crash callback function prototype.
+typedef Result (CALLBACK *PFNCUSTOMDATACOLLECTIONCALLBACK)(
+ const ExceptionInfo& exceptionInfo, //!< Information about exception being processed.
+ IDataBag* dataBag //!< Interface for adding custom data to crash report.
+ );
+
+//! Contains data for optional custom data collection after the crash in context of sendrpt.exe process.
+struct Settings
+{
+ DWORD SettingsSize; //!< Size of this structure. Should be set to sizeof(CustomDataCollectionSettings).
+ LPCWSTR CollectionLibraryPath; //!< Path to dll where collection function exported from.
+ LPCSTR CollectionFunctionName; //!< Name of collection function exported from \ref CollectionLibraryPath. It should have \ref crash_rpt::custom_data_collection::PFNCUSTOMDATACOLLECTIONCALLBACK prototype.
+ LPBYTE UserData; //!< Pointer to user-defined data buffer.
+ DWORD UserDataSize; //!< Size of \ref UserData buffer.
+};
+
+}
+
//! Contains data that identifies your application.
struct ApplicationInfo
{
@@ -126,9 +202,11 @@ struct HandlerSettings
LPCWSTR LangFilePath; //!< To customize localization set this member to the path to the language file (including file name).
LPCWSTR SendRptPath; //!< Set this member to NULL to use default behavior when SendRpt is named sendrpt.exe and exist in same folder with crashrpt.dll. Set to filename if sendrpt.exe has another name but it is in same folder as crashrpt.dll. Set to full path in other cases.
LPCWSTR DbgHelpPath; //!< Set this member to NULL to use default behavior when DbgHelp is named dbghelp.dll and exist in same folder with crashrpt.dll. Set to filename if dbghelp.dll has another name but it is in same folder as crashrpt.dll. Set to full path in other cases.
- //!< \note You should use dbghelp.dll that distributed with crashrpt.dll and not the %SystemRoot%\System32\dbghelp.dll, because only that dll supports all required functionality. See <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms679294(v=vs.85).aspx">DbgHelp Versions</a> for more information.
+ //!< \note You should use dbghelp.dll that distributed with crashrpt.dll and not the %SystemRoot%\\System32\\dbghelp.dll, because only that dll supports all required functionality. See <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms679294(v=vs.85).aspx">DbgHelp Versions</a> for more information.
PFNCRASHPROCESSINGCALLBACK CrashProcessingCallback; //!< Callback function that will be called when crash reporting occurs. Set to NULL if no special processing needed.
LPVOID CrashProcessingCallbackUserData; //!< User defined parameter for CrashProcessingCallback. Optional.
+ custom_data_collection::Settings* CustomDataCollectionSettings;
+ //!< Contains data for optional custom data collection after the crash in context of sendrpt.exe process.
};
//! \brief To enable crash processing you should create an instance of this class.
diff --git a/src/thirdparty/LAVFilters/build_ffmpeg.sh b/src/thirdparty/LAVFilters/build_ffmpeg.sh
index 071e2e0bc..586efb74f 100755
--- a/src/thirdparty/LAVFilters/build_ffmpeg.sh
+++ b/src/thirdparty/LAVFilters/build_ffmpeg.sh
@@ -61,6 +61,7 @@ configure() {
--disable-static \
--enable-version3 \
--enable-w32threads \
+ --disable-demuxer=asf \
--disable-demuxer=matroska \
--disable-filters \
--enable-filter=yadif \
diff --git a/src/thirdparty/LAVFilters/src b/src/thirdparty/LAVFilters/src
-Subproject 79ba86d3acb1b53a50a8aae51d4670a8943e1e4
+Subproject 0745609aaa98fcbbe744b53296b9afe2d159d4d
diff --git a/src/thirdparty/LCDUI/LCDStreamingText.h b/src/thirdparty/LCDUI/LCDStreamingText.h
index beb3d10ca..d4c9880d7 100644
--- a/src/thirdparty/LCDUI/LCDStreamingText.h
+++ b/src/thirdparty/LCDUI/LCDStreamingText.h
@@ -27,7 +27,6 @@
#include "LCDText.h"
#include <string>
-using namespace std;
class CLCDStreamingText: public CLCDCollection
{
diff --git a/src/thirdparty/MediaInfo/License.html b/src/thirdparty/MediaInfo/License.html
deleted file mode 100644
index 85c5f7bee..000000000
--- a/src/thirdparty/MediaInfo/License.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
- <title>MediaInfo(Lib) License</title>
-</head>
-
-<body>
-<div>
- <h3 style="text-align: center">MediaInfo(Lib) License</h3>
- <p>
- Copyright (c) 2002-2015 <a href="mailto:Info@MediaArea.net">MediaArea.net SARL</a>. All rights reserved.
- </p>
- <p>
- Redistribution and use in source and binary forms, with or without modification,
- are permitted provided that the following conditions are met:
- </p>
- <ul>
- <li>Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.</li>
- <li>Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.</li>
- </ul>
- <p>
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &ldquo;AS IS&rdquo;
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- OF THE POSSIBILITY OF SUCH DAMAGE.
- </p>
-</div>
-
-<hr/>
-<div>
-<p>Alternate license for redistributions of the library in binary form:<br/>
-Redistributions in binary form must reproduce the following sentence (including the link to the website) in the documentation and/or other materials provided with the distribution.<br/>
-This product uses <a href="http://mediaarea.net/MediaInfo">MediaInfo</a> library, Copyright (c) 2002-2015 <a href="mailto:Info@MediaArea.net">MediaArea.net SARL</a>.</p>
-</div>
-
-<hr/>
-<div>
- <h3 style="text-align: center">Third party libraries</h3>
- <p>
- The software relies on third party libraries. Such libraries have their own license:
- </p>
- <ul>
- <li>C++ standard library: <a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01s02.html">libstdc++</a>,
- <a href="http://llvm.org/docs/DeveloperPolicy.html#license">libc++</a>,
- <a href="http://msdn.microsoft.com/en-us/library/vstudio/ms235299.aspx">Visual C++ library</a> or any other C++ standard library.
- </li>
- <li>Base classes library: ZenLib, (c) MediaArea.net SARL, zlib license.</li>
- <li>GUI (optional): <a href="http://qt-project.org/products/licensing">Qt</a>.</li>
- <li>GUI (optional): <a href="http://www.wxwidgets.org/about/newlicen.htm">WxWidgets</a>.</li>
- <li>XML parser (optional): <a href="http://www.grinninglizard.com/tinyxml2docs/index.html">TinyXML-2</a>.</li>
- <li>gzip decompression routine (optional): <a href="http://www.gzip.org/zlib/zlib_license.html">zlib</a>.</li>
- <li>FTP, FTPS, SFTP, HTTP, HTTPS (optional): <a href="http://curl.haxx.se/docs/copyright.html">libcurl</a>.</li>
- <li>AES (optional): <a href="http://brgladman.org/oldsite/AES/">AES routines from Brian Gladman</a>.</li>
- <li>MMS (optional): <a href="http://sourceforge.net/projects/libmms/">libmms</a>.</li>
- </ul>
-</div>
-
-<hr/>
-<div>
- <h3 style="text-align: center">Contributors</h3>
- <ul>
- <li>Jérôme Martinez (main developper)</li>
- <li>Lionel Duchateau (odd formats support)</li>
- <li>XhmikosR from MPC-HC Team (tests)</li>
- <li>FlylinkDC++ team (tests, crash corrections)</li>
- <li>Max Pozdeev (former native Mac GUI developper)</li>
- </ul>
-</div>
-
-</body>
-</html>
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_7z.cpp b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_7z.cpp
deleted file mode 100644
index e85e241fa..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_7z.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_7Z_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Archive/File_7z.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_7z::FileHeader_Begin()
-{
- // Minimum buffer size
- if (Buffer_Size<6)
- return false; // Must wait for more data
-
- // Testing
- if (Buffer[0]!=0x37 // "7z...."
- || Buffer[1]!=0x7A
- || Buffer[2]!=0xBC
- || Buffer[3]!=0xAF
- || Buffer[4]!=0x27
- || Buffer[5]!=0x1C)
- {
- Reject("7-Zip");
- return false;
- }
-
- // All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_7z::Read_Buffer_Continue()
-{
- Skip_B6( "Magic");
- Skip_XX(File_Size-6, "Data");
-
- FILLING_BEGIN();
- Accept("7-Zip");
-
- Fill(Stream_General, 0, General_Format, "7-Zip");
-
- Finish("7-Zip");
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_7Z_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_7z.h b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_7z.h
deleted file mode 100644
index e5df6c2dd..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_7z.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about 7z files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_7zH
-#define MediaInfo_File_7zH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_7z
-//***************************************************************************
-
-class File_7z : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Ace.cpp b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Ace.cpp
deleted file mode 100644
index 0acd7ac67..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Ace.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_ACE_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Archive/File_Ace.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Ace::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<7)
- return false; //Must wait for more data
-
- if (Buffer[0]!=0x2A //"**ACE**"
- || Buffer[1]!=0x2A
- || Buffer[2]!=0x41
- || Buffer[3]!=0x43
- || Buffer[4]!=0x45
- || Buffer[5]!=0x2A
- || Buffer[6]!=0x2A)
- {
- Reject("Ace");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ace::Read_Buffer_Continue()
-{
- //Parsing
- Skip_B7( "Magic");
- Skip_XX(File_Size-7, "Data");
-
- FILLING_BEGIN();
- Accept("Ace");
-
- Fill(Stream_General, 0, General_Format, "ACE");
-
- Finish("Ace");
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_ACE_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Ace.h b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Ace.h
deleted file mode 100644
index a1ea0cfd3..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Ace.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about ACE files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_AceH
-#define MediaInfo_File_AceH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Ace
-//***************************************************************************
-
-class File_Ace : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Bzip2.cpp b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Bzip2.cpp
deleted file mode 100644
index 0094c089a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Bzip2.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_BZIP2_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Archive/File_Bzip2.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Bzip2::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<2)
- return false; //Must wait for more data
-
- if (Buffer[0]!=0x42 //"BZ"
- || Buffer[1]!=0x5A)
- {
- Reject("Bzip2");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Bzip2::Read_Buffer_Continue()
-{
- //Parsing
- Skip_B7( "Magic");
- Skip_XX(File_Size-2, "Data");
-
- FILLING_BEGIN();
- Accept("Bzip2");
-
- Fill(Stream_General, 0, General_Format, "BZip2");
-
- Finish("Bzip2");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_BZIP2_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Bzip2.h b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Bzip2.h
deleted file mode 100644
index 829a8d632..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Bzip2.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Bzip2 files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Bzip2H
-#define MediaInfo_File_Bzip2H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Bzip2
-//***************************************************************************
-
-class File_Bzip2 : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Elf.cpp b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Elf.cpp
deleted file mode 100644
index c4e119005..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Elf.cpp
+++ /dev/null
@@ -1,234 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_ELF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Archive/File_Elf.h"
-#include "ZenLib/Utils.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Elf_osabi(int8u osabi)
-{
- switch (osabi)
- {
- case 0 : return "UNIX System V ABI";
- case 1 : return "HP-UX";
- case 2 : return "NetBSD";
- case 3 : return "Linux";
- case 6 : return "Sun Solaris";
- case 7 : return "IBM AIX";
- case 8 : return "SGI Irix";
- case 9 : return "FreeBSD";
- case 10 : return "Compaq TRU64 UNIX";
- case 11 : return "Novell Modesto";
- case 12 : return "OpenBSD";
- case 97 : return "ARM";
- case 255 : return "Standalone";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Elf_type(int16u type)
-{
- switch (type)
- {
- case 1 : return "Relocatable";
- case 2 : return "Executable";
- case 3 : return "Shared object";
- case 4 : return "Core";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Elf_machine(int16u machine)
-{
- switch (machine)
- {
- case 1 : return "AT&T WE 32100";
- case 2 : return "SUN SPARC";
- case 3 : return "Intel i386";
- case 4 : return "Motorola m68k";
- case 5 : return "Motorola m88k";
- case 7 : return "Intel i860";
- case 8 : return "MIPS R3000";
- case 9 : return "IBM System/370";
- case 10 : return "MIPS R3000";
-
- case 15 : return "HPPA";
- case 17 : return "Fujitsu VPP500";
- case 18 : return "Sun v8plus";
- case 19 : return "Intel i960";
- case 20 : return "PowerPC";
- case 21 : return "PowerPC 64-bit";
- case 22 : return "IBM S390";
-
- case 36 : return "NEC V800";
- case 37 : return "Fujitsu FR20";
- case 38 : return "TRW RH-32";
- case 39 : return "Motorola RCE";
- case 40 : return "ARM";
- case 41 : return "DEC Alpha";
- case 42 : return "Hitachi SH";
- case 43 : return "SPARC v9 64-bit";
- case 44 : return "Siemens Tricore";
- case 45 : return "Argonaut RISC Core";
- case 46 : return "Hitachi H8/300";
- case 47 : return "Hitachi H8/300H";
- case 48 : return "Hitachi H8S";
- case 49 : return "Hitachi H8/500";
- case 50 : return "Intel IA64";
- case 51 : return "Stanford MIPS-X";
- case 52 : return "Motorola Coldfire";
- case 53 : return "Motorola M68HC12";
- case 54 : return "Fujitsu MMA";
- case 55 : return "Siemens PCP";
- case 56 : return "Sony nCPU";
- case 57 : return "Denso NDR1";
- case 58 : return "Motorola Start*Core";
- case 59 : return "Toyota ME16";
- case 60 : return "STMicroelectronic ST100";
- case 61 : return "Advanced Logic Corp. Tinyj";
- case 62 : return "AMD x86-64";
- case 63 : return "Sony DSP";
-
- case 66 : return "Siemens FX66";
- case 67 : return "STMicroelectronics ST9+";
- case 68 : return "STmicroelectronics ST7";
- case 69 : return "Motorola MC68HC16";
- case 70 : return "Motorola MC68HC11";
- case 71 : return "Motorola MC68HC08";
- case 72 : return "Motorola MC68HC05";
- case 73 : return "Silicon Graphics SVx";
- case 74 : return "STMicroelectronics ST19";
- case 75 : return "DEC VAX";
- case 76 : return "Axis Communications 32-bit";
- case 77 : return "Infineon Technologies 32-bit";
- case 78 : return "Element 14 64-bit";
- case 79 : return "LSI Logic 16-bit";
- case 80 : return "Donald Knuth's educational 64-bit";
- case 81 : return "Harvard University machine-independent";
- case 82 : return "SiTera Prism";
- case 83 : return "Atmel AVR 8-bit";
- case 84 : return "Fujitsu FR30";
- case 85 : return "Mitsubishi D10V";
- case 86 : return "Mitsubishi D30V";
- case 87 : return "NEC v850";
- case 88 : return "Mitsubishi M32R";
- case 89 : return "Matsushita MN10300";
- case 90 : return "Matsushita MN10200";
- case 91 : return "picoJava";
- case 92 : return "OpenRISC 32-bit";
- case 93 : return "ARC Cores Tangent-A5";
- case 94 : return "Tensilica Xtensa";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Elf::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- if (Buffer[0]!=0x7F //".ELF"
- || Buffer[1]!=0x45
- || Buffer[2]!=0x4C
- || Buffer[3]!=0x46)
- {
- Reject("ELF");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Elf::Read_Buffer_Continue()
-{
- //Parsing
- int32u version4=(int32u)-1;
- int16u type=(int16u)-1, machine=(int16u)-1;
- int8u classs, data, version1, osabi, abiversion;
- Skip_C4( "magic");
- Get_L1 (classs, "class");
- Get_L1 (data, "data");
- Get_L1 (version1, "version");
- Get_L1 (osabi, "osabi"); Param_Info1(Elf_osabi(osabi));
- Get_L1 (abiversion, "abiversion");
- Skip_XX(7, "reserved");
- if (data==1) //LE
- {
- Get_L2 (type, "type"); Param_Info1(Elf_type(type));
- Get_L2 (machine, "machine"); Param_Info1(Elf_machine(machine));
- Get_L4 (version4, "version");
- }
- if (data==2) //BE
- {
- Get_B2 (type, "type"); Param_Info1(Elf_type(type));
- Get_B2 (machine, "machine"); Param_Info1(Elf_machine(machine));
- Get_B4 (version4, "version");
- }
- Skip_XX(Element_Size-Element_Offset, "Data");
-
- FILLING_BEGIN();
- if (version4!=(int32u)-1 && version1!=version4)
- {
- Reject("ELF");
- return;
- }
-
- Accept("ELF");
-
- Fill(Stream_General, 0, General_Format, "ELF");
- if (type!=(int16u)-1)
- Fill(Stream_General, 0, General_Format_Profile, Elf_type(type));
- if (machine!=(int16u)-1)
- Fill(Stream_General, 0, General_Format_Profile, Elf_machine(machine));
-
- //No need of more
- Finish("ELF");
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_ELF_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Elf.h b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Elf.h
deleted file mode 100644
index 5ef988370..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Elf.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about ELF files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_ElfH
-#define MediaInfo_File_ElfH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Elf
-//***************************************************************************
-
-class File_Elf : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Gzip.cpp b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Gzip.cpp
deleted file mode 100644
index 98e15e98f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Gzip.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_GZIP_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Archive/File_Gzip.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Gzip::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<2)
- return false; //Must wait for more data
-
- if (Buffer[0]!=0x1F
- || Buffer[1]!=0x8B)
- {
- Reject("Gzip");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Gzip::Read_Buffer_Continue()
-{
- //Parsing
- int8u CM;
- Skip_B2( "IDentification");
- Get_B1 (CM, "Compression Method");
- Skip_B1( "FLaGs");
- Skip_B4( "Modified TIME");
- Skip_XX(File_Size-10, "Data");
-
- FILLING_BEGIN();
- //Filling
- Accept("Gzip");
-
- Fill(Stream_General, 0, General_Format, "GZip");
- Fill(Stream_General, 0, General_Format_Profile, "deflate");
-
- Finish("Gzip");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_GZIP_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Gzip.h b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Gzip.h
deleted file mode 100644
index b4b106f9e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Gzip.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Gzip files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_GzipH
-#define MediaInfo_File_GzipH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Gzip
-//***************************************************************************
-
-class File_Gzip : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Iso9660.cpp b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Iso9660.cpp
deleted file mode 100644
index 7b5026989..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Iso9660.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_7Z_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Archive/File_Iso9660.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Iso9660::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<65536)
- return false; //Must wait for more data
-
- if (CC6(Buffer+32768)!=0x014344303031LL) //"Iso9660...."
- {
- Reject("ISO 9660");
- return false;
- }
-
- //All should be OK...
- Accept("ISO 9660");
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Iso9660::Read_Buffer_Continue()
-{
- Skip_XX(32768, "System Area");
- Primary_Volume_Descriptor();
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, General_Format, "ISO 9660");
-
- Finish("ISO 9660");
- FILLING_END();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Iso9660::Primary_Volume_Descriptor()
-{
- int32u Volume_Space_Size;
- Element_Begin1("Volume_Descriptor");
- Skip_B1("Volume Descriptor Type");
- Skip_Local(5,"Standard Identifier");
- Skip_B1("Volume Descriptor Version");
- Skip_B1("Unused field");
- Skip_Local(32,"System Identifier");
- Skip_Local(32,"Volume Identifier");
- Skip_XX(8,"Unused field");
- Get_D4(Volume_Space_Size, "Volume Space Size"); Param_Info2(Volume_Space_Size*(int64u)2048, " bytes");
- Skip_XX(32,"Unused field");
- Skip_B4("Volume Set Size");
- Skip_B4("Volume Sequence Number");
- Skip_B4("Logical Block Size");
- Skip_B8("Path Table Size");
- Skip_B4("Location of Occurrence of Type L Path Table");
- Skip_B4("Location of Optional Occurrence of Type L Path Table");
- Skip_B4("Location of Occurrence of Type M Path Table");
- Skip_B4("Location of Optional Occurrence of Type M Path Table");
- Skip_Local(34,"Directory Record for Root Directory");
- Skip_Local(128,"Volume Set Identifier");
- Skip_Local(128,"Publisher Identifier");
- Skip_Local(128,"Data Preparer Identifier");
- Skip_Local(128,"Application Identifier");
- Skip_Local(37,"Copyright File Identifier");
- Skip_Local(37,"Abstract File Identifier");
- Skip_Local(37,"Bibliographic File Identifier");
- Skip_XX(17,"Volume Creation Date and Time");
- Element_End0();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_7Z_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Iso9660.h b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Iso9660.h
deleted file mode 100644
index 8b5b0555a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Iso9660.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Iso9660 files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Iso9660H
-#define MediaInfo_File_Iso9660H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Iso9660
-//***************************************************************************
-
-class File_Iso9660 : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-
- //Elements
- void Primary_Volume_Descriptor();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Mz.cpp b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Mz.cpp
deleted file mode 100644
index 742373758..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Mz.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MZ_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Archive/File_Mz.h"
-#include "ZenLib/Utils.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Mz_Machine(int16u Machine)
-{
- switch (Machine)
- {
- case 0x014D : return "Intel i860";
- case 0x014C : return "Intel i386";
- case 0x0162 : return "MIPS R3000";
- case 0x0166 : return "MIPS R4000";
- case 0x0183 : return "DEC Alpha";
- case 0x0200 : return "Intel IA64";
- case 0x8664 : return "AMD x86-64";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Mz::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<2)
- return false; //Must wait for more data
-
- if (Buffer[0]!=0x4D //"MZ"
- || Buffer[1]!=0x5A)
- {
- Reject("MZ");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mz::Read_Buffer_Continue()
-{
- //Parsing
- int32u lfanew;
- Element_Begin1("MZ");
- Skip_C2( "magic");
- Skip_L2( "cblp");
- Skip_L2( "cp");
- Skip_L2( "crlc");
- Skip_L2( "cparhdr");
- Skip_L2( "minalloc");
- Skip_L2( "maxalloc");
- Skip_L2( "ss");
- Skip_L2( "sp");
- Skip_L2( "csum");
- Skip_L2( "ip");
- Skip_L2( "cs");
- Skip_L2( "lsarlc");
- Skip_L2( "ovno");
- Skip_L2( "res");
- Skip_L2( "res");
- Skip_L2( "res");
- Skip_L2( "res");
- Skip_L2( "oemid");
- Skip_L2( "oeminfo");
- Skip_L2( "res2");
- Skip_L2( "res2");
- Skip_L2( "res2");
- Skip_L2( "res2");
- Skip_L2( "res2");
- Skip_L2( "res2");
- Skip_L2( "res2");
- Skip_L2( "res2");
- Skip_L2( "res2");
- Skip_L2( "res2");
- Get_L4 (lfanew, "lfanew");
-
- //Computing
- if (lfanew>Element_Offset)
- {
- Skip_XX(lfanew-Element_Offset, "MZ data");
- Element_End0();
- }
- if (Element_Offset>lfanew)
- {
- Element_End0();
- Element_Offset=lfanew; //Multi usage off the first bytes
- }
-
- //Parsing
- int32u Signature, TimeDateStamp=0;
- int16u Machine=0, Characteristics=0;
- Peek_B4(Signature);
- if (Signature==0x50450000) //"PE"
- {
- Element_Begin1("PE");
- Skip_C4( "Header");
- Get_L2 (Machine, "Machine"); Param_Info1(Mz_Machine(Machine));
- Skip_L2( "NumberOfSections");
- Get_L4 (TimeDateStamp, "TimeDateStamp"); Param_Info1(Ztring().Date_From_Seconds_1970(TimeDateStamp));
- Skip_L4( "PointerToSymbolTable");
- Skip_L4( "NumberOfSymbols");
- Skip_L2( "SizeOfOptionalHeader");
- Get_L2 (Characteristics, "Characteristics");
- Element_End0();
- }
-
- FILLING_BEGIN();
- Accept("MZ");
-
- Fill(Stream_General, 0, General_Format, "MZ");
- if (Characteristics&0x2000)
- Fill(Stream_General, 0, General_Format_Profile, "DLL");
- else if (Characteristics&0x0002)
- Fill(Stream_General, 0, General_Format_Profile, "Executable");
- Fill(Stream_General, 0, General_Format_Profile, Mz_Machine(Machine));
- if (TimeDateStamp)
- Fill(Stream_General, 0, General_Encoded_Date, Ztring().Date_From_Seconds_1970(TimeDateStamp));
-
- //No more need data
- Finish("MZ");
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_MZ_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Mz.h b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Mz.h
deleted file mode 100644
index be344d6d7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Mz.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about MZ files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_MzH
-#define MediaInfo_File_MzH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Mz
-//***************************************************************************
-
-class File_Mz : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Rar.cpp b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Rar.cpp
deleted file mode 100644
index 1b198fe3a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Rar.cpp
+++ /dev/null
@@ -1,322 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_RAR_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Archive/File_Rar.h"
-#include "ZenLib/Utils.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-
-//---------------------------------------------------------------------------
-const char* Rar_host_os[6]=
-{
- "MS DOS",
- "OS/2",
- "Win32",
- "Unix",
- "Mac OS",
- "BeOS"
-};
-
-//---------------------------------------------------------------------------
-const char* Rar_packing_method[6]=
-{
- "storing",
- "fastest compression",
- "fast compression",
- "normal compression",
- "good compression",
- "best compression"
-};
-
-//---------------------------------------------------------------------------
-const char* Rar_HEADER_TYPE(int8u HEADER_TYPE)
-{
- switch(HEADER_TYPE)
- {
- case 0x72 : return "marker block";
- case 0x73 : return "archive header";
- case 0x74 : return "file header";
- case 0x75 : return "old style comment header";
- case 0x76 : return "old style authenticity information";
- case 0x77 : return "old style subblock";
- case 0x78 : return "old style recovery record";
- case 0x79 : return "old style authenticity informatio";
- case 0x7A : return "subblock";
- case 0x7B : return "end of file";
- default : return "";
- }
-};
-
-//---------------------------------------------------------------------------
-Ztring Rar_version_number(int8u byte)
-{
- //Version number is encoded as 10 * Major version + minor version.
- return Ztring::ToZtring(byte/10)+Ztring(".")+Ztring::ToZtring(byte%10);
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Rar::File_Rar()
-:File__Analyze()
-{
- //Configuration
- DataMustAlwaysBeComplete=false;
-}
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Rar::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<7)
- return false; //Must wait for more data
-
- if (Buffer[0]!=0x52 //"Rar!"
- || Buffer[1]!=0x61
- || Buffer[2]!=0x72
- || Buffer[3]!=0x21
- || Buffer[4]!=0x1A
- || Buffer[5]!=0x07
- || Buffer[6]!=0x00)
- {
- Reject("RAR");
- return false;
- }
-
- state=0;
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Rar::Header_Begin()
-{
- if (Element_Offset+7>Element_Size)
- return false; //Not enough data for header size
- int16u HEAD_SIZE=LittleEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset+5);
-
- if (Element_Offset+HEAD_SIZE>Element_Size)
- return false; //Not enough data for header
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Rar::Header_Parse()
-{
- //Config
- HIGH_PACK_SIZE=0;
- PACK_SIZE=0;
-
- //Parsing
- int16u HEAD_SIZE;
- Skip_L2( "HEAD_CRC"); //CRC of total block or block part
- Get_L1 (HEAD_TYPE, "HEAD_TYPE"); //Block type
- Get_L2 (HEAD_FLAGS, "HEAD_FLAGS");
- Header_Parse_Flags();
- Get_L2 (HEAD_SIZE, "HEAD_SIZE");
- Header_Parse_Content();
- Skip_XX(HEAD_SIZE-(size_t)Element_Offset, "REST OF HEADER");
-
- //Filling
- Header_Fill_Size(HEAD_SIZE+HIGH_PACK_SIZE*0x100000000LL+PACK_SIZE);
- Header_Fill_Code(HEAD_TYPE, Rar_HEADER_TYPE(HEAD_TYPE));
-}
-
-//---------------------------------------------------------------------------
-void File_Rar::Header_Parse_Flags()
-{
- switch (HEAD_TYPE)
- {
- case 0x73 : Header_Parse_Flags_73(); break;
- case 0x74 : Header_Parse_Flags_74(); break;
- default : Header_Parse_Flags_XX();
- }
-}
-
-//---------------------------------------------------------------------------
-// archive header
-void File_Rar::Header_Parse_Flags_73()
-{
- Skip_Flags(HEAD_FLAGS, 1, "Volume attribute (archive volume)");
- Skip_Flags(HEAD_FLAGS, 2, "Archive comment present");
- Skip_Flags(HEAD_FLAGS, 3, "Archive lock attribute");
- Skip_Flags(HEAD_FLAGS, 4, "Solid attribute (solid archive)");
- Skip_Flags(HEAD_FLAGS, 5, "New volume naming scheme"); // (\'volname.partN.rar\')
- Skip_Flags(HEAD_FLAGS, 6, "Authenticity information present");
- Skip_Flags(HEAD_FLAGS, 7, "Recovery record present");
- Skip_Flags(HEAD_FLAGS, 8, "Block headers are encrypted");
- Skip_Flags(HEAD_FLAGS, 9, "First volume (set only by RAR 3.0 and later)");
- Get_Flags (HEAD_FLAGS, 15, add_size, "ADD_SIZE present");
-}
-
-//---------------------------------------------------------------------------
-// file header
-void File_Rar::Header_Parse_Flags_74()
-{
- Skip_Flags(HEAD_FLAGS,0, "file continued from previous volume");
- Skip_Flags(HEAD_FLAGS,1, "file continued in next volume");
- Skip_Flags(HEAD_FLAGS,2, "file encrypted with password");
- Skip_Flags(HEAD_FLAGS,3, "file comment present");
- Skip_Flags(HEAD_FLAGS,4, "information from previous files is used"); // (solid flag)
- // bits 7 6 5 (for RAR 2.0 and later)
- // 0 0 0 - dictionary size 64 KB
- // 0 0 1 - dictionary size 128 KB
- // 0 1 0 - dictionary size 256 KB
- // 0 1 1 - dictionary size 512 KB
- // 1 0 0 - dictionary size 1024 KB
- // 1 0 1 - dictionary size 2048 KB
- // 1 1 0 - dictionary size 4096 KB
- // 1 1 1 - file is directory
- Get_Flags (HEAD_FLAGS, 8, high_fields, "HIGH_PACK_SIZE and HIGH_UNP_SIZE fields");
- Get_Flags (HEAD_FLAGS, 9, usual_or_utf8, "FILE_NAME contains usual and encoded unicode");
- Get_Flags (HEAD_FLAGS, 10, salt, "SALT present");
- Skip_Flags(HEAD_FLAGS, 11, "Version flag.");
- Get_Flags (HEAD_FLAGS, 12, exttime, "Extended time field present");
- Get_Flags (HEAD_FLAGS, 15, add_size, "ADD_SIZE present");
-}
-
-//---------------------------------------------------------------------------
-// Generic
-void File_Rar::Header_Parse_Flags_XX()
-{
- Get_Flags (HEAD_FLAGS, 15, add_size, "ADD_SIZE present");
-}
-
-//---------------------------------------------------------------------------
-void File_Rar::Header_Parse_Content()
-{
- switch (HEAD_TYPE)
- {
- case 0x73 : Header_Parse_Content_73(); break;
- case 0x74 : Header_Parse_Content_74(); break;
- default : Header_Parse_Content_XX(); break;
- }
-}
-
-//---------------------------------------------------------------------------
-// archive header
-void File_Rar::Header_Parse_Content_73()
-{
- Skip_L2( "RESERVED_1");
- Skip_L4( "RESERVED_2");
-}
-
-//---------------------------------------------------------------------------
-// file header
-void File_Rar::Header_Parse_Content_74()
-{
- int16u name_size;
- int8u HOST_OS, METHOD, UNP_VER;
- Get_L4 (PACK_SIZE, "PACK_SIZE"); //Compressed file size
- Skip_L4( "UNP_SIZE"); //Uncompressed file size
- Get_L1 (HOST_OS, "HOST_OS"); Param_Info1((HOST_OS<6?Rar_host_os[HOST_OS]:"Unknown"));
- Skip_L4( "FILE_CRC");
- Skip_L4( "FTIME"); //Date and time in standard MS DOS format
- Get_L1 (UNP_VER, "UNP_VER"); Param_Info1(Rar_version_number(UNP_VER)); //RAR version needed to extract file
- Get_L1 (METHOD, "METHOD"); Param_Info1(((METHOD>=0x30)&&(METHOD<0x36)?Rar_packing_method[METHOD-0x30]:"Unknown"));
- Get_L2 (name_size, "NAME_SIZE"); //File name size
- Skip_L4( "ATTR"); //File attributes
- if(high_fields)
- {
- Get_L4 (HIGH_PACK_SIZE, "HIGH_PACK_SIZE"); //High 4 bytes of 64 bit value of compressed file size.
- Skip_L4( "HIGH_UNP_SIZE"); //High 4 bytes of 64 bit value of uncompressed file size.
- }
- else
- HIGH_PACK_SIZE=0;
- if (usual_or_utf8)
- {
- //Must test the content before reading, looking fore zero byte
- if (Element_Offset+name_size>Element_Size)
- {
- Skip_XX(Element_Size-Element_Offset, "Error");
- return;
- }
- int64u ZeroPos=0;
- while (ZeroPos<name_size)
- {
- if (Buffer[Buffer_Offset+(size_t)(Element_Offset+ZeroPos)]==0)
- break; //Found
- ZeroPos++;
- }
-
- if (ZeroPos==name_size)
- Skip_UTF8(name_size, "FILE_NAME");
- else
- {
- Skip_Local(ZeroPos, "FILE_NAME"); //Up to ZeroPos
- Skip_L1( "Zero");
- Skip_UTF16L(name_size-(ZeroPos+1), "FILE_NAME"); //Spec is not precise, "Unicode" without encoding format (character size, endianess), because RAR is from Windows, we hope this is the format from Windows (UTF-16 Little Endian)
- }
- }
- else
- Skip_Local(name_size, "FILE_NAME");
-
- if (salt)
- Skip_L8( "SALT");
- //if(exttime)
- //Skip_XX("EXT_TIME"); //Which size?
-}
-
-//---------------------------------------------------------------------------
-// Generic
-void File_Rar::Header_Parse_Content_XX()
-{
- if (add_size)
- Get_L4 (PACK_SIZE, "ADD_SIZE"); //Additional data size
-}
-
-//---------------------------------------------------------------------------
-void File_Rar::Data_Parse()
-{
- switch (Element_Code)
- {
- case 0x72 : Accept("RAR"); Fill(Stream_General, 0, General_Format, "RAR"); break;
- default : ;
- }
-
- Skip_XX(Element_Size, "Data");
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_RAR_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Rar.h b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Rar.h
deleted file mode 100644
index 507d86922..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Rar.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about RAR files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_RarH
-#define MediaInfo_File_RarH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Rar
-//***************************************************************************
-
-class File_Rar : public File__Analyze
-{
-public :
- File_Rar();
-
-protected :
- int state;
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Per element
- bool Header_Begin();
- void Header_Parse();
- void Header_Parse_Flags();
- void Header_Parse_Flags_73();
- void Header_Parse_Flags_74();
- void Header_Parse_Flags_XX();
- void Header_Parse_Content();
- void Header_Parse_Content_73();
- void Header_Parse_Content_74();
- void Header_Parse_Content_XX();
- void Data_Parse();
-
- //Temp
- int8u HEAD_TYPE;
- int32u PACK_SIZE;
- int32u HIGH_PACK_SIZE;
- int16u HEAD_FLAGS;
- bool high_fields;
- bool usual_or_utf8;
- bool salt;
- bool exttime;
- bool add_size;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Tar.cpp b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Tar.cpp
deleted file mode 100644
index 077a07e57..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Tar.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_TAR_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Archive/File_Tar.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Tar::Read_Buffer_Continue()
-{
- if (File_Size<257)
- {
- Reject();
- return;
- }
- if (Buffer_Size<257)
- return; //Wait for more data
-
- //Parsing
- Ztring ChecksumO;
- Skip_Local(100, "File name");
- Skip_Local( 8, "File mode");
- Skip_Local( 8, "Owner's numeric user ID");
- Skip_Local( 12, "Group's numeric user ID");
- Skip_Local( 12, "File size in bytes");
- Skip_Local( 8, "Last modification time in numeric Unix time format");
- Get_Local ( 8, ChecksumO, "Checksum for header block");
- Skip_B1( "Link indicator (file type)");
- Skip_Local(100, "Name of linked file");
- Skip_XX(File_Size-257, "Data");
-
- FILLING_BEGIN();
- //Handling Checksum
- int32u Checksum=ChecksumO.To_int32u(8);
- int32u ChecksumU=0;
- int32u ChecksumS=0;
- for (size_t Pos=0; Pos<257; Pos++)
- {
- if (Pos==148)
- {
- ChecksumU+=32*8; //8 spaces
- ChecksumS+=32*8; //8 spaces
- Pos+=7; //Skiping Checksum
- }
- ChecksumU+=(int8u)Buffer[Pos];
- ChecksumS+=(int8s)Buffer[Pos];
- }
-
- if (ChecksumU!=Checksum && ChecksumS!=Checksum)
- {
- Reject("Tar");
- return;
- }
-
- //Filling
- Accept("Tar");
-
- Fill(Stream_General, 0, General_Format, "Tar");
-
- Reject("Tar");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_TAR_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Tar.h b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Tar.h
deleted file mode 100644
index 102b7cced..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Tar.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Tar files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_TarH
-#define MediaInfo_File_TarH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Tar
-//***************************************************************************
-
-class File_Tar : public File__Analyze
-{
-protected :
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Zip.cpp b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Zip.cpp
deleted file mode 100644
index 62c1b183b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Zip.cpp
+++ /dev/null
@@ -1,477 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_ZIP_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Archive/File_Zip.h"
-#include "ZenLib/Utils.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-
-//---------------------------------------------------------------------------
-const char* Zip_made_by[20]=
-{
- "MS-DOS and OS/2 (FAT / VFAT / FAT32 file systems)",
- "Amiga",
- "OpenVMS",
- "UNIX",
- "VM/CMS",
- "Atari ST",
- "OS/2 H.P.F.S.",
- "Macintosh",
- "Z-System",
- "CP/M",
- "Windows NTFS",
- "MVS (OS/390 - Z/OS)",
- "VSE",
- "Acorn Risc",
- "VFAT",
- "alternate MVS",
- "BeOS",
- "Tandem",
- "OS/400",
- "OS/X (Darwin)"
-};
-
-//---------------------------------------------------------------------------
-const char* Zip_compression_method[22]=
-{
- "stored (no compression)",
- "Shrunk",
- "Reduced with compression factor 1",
- "Reduced with compression factor 2",
- "Reduced with compression factor 3",
- "Reduced with compression factor 4",
- "Imploded",
- "Tokenizing compression algorithm",
- "Deflated",
- "Enhanced Deflating using Deflate64(tm)",
- "PKWARE Data Compression Library Imploding (old IBM TERSE)",
- "Reserved by PKWARE",
- "compressed using BZIP2 algorithm",
- "Reserved by PKWARE",
- "LZMA (EFS)",
- "Reserved by PKWARE",
- "Reserved by PKWARE",
- "Reserved by PKWARE",
- "File is compressed using IBM TERSE (new)",
- "IBM LZ77 z Architecture (PFS)",
- "WavPack compressed data", // 97
- "PPMd version I, Rev 1" // 98
-};
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Zip::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- if (Buffer[0]!=0x50 //"PK.."
- || Buffer[1]!=0x4B
- || Buffer[2]!=0x03
- || Buffer[3]!=0x04)
- {
- Reject("ZIP");
- return false;
- }
-
- //This is OK, ZIP detected
- Accept();
- Fill(Stream_General, 0, General_Format, "ZIP");
-
- //Init
- signature=0x00000000;
- local_file_Step=0;
- end_of_central_directory_IsParsed=false;
-
- //Jumping to the end of the file minus end_of_central_directory size (we hope there is no comment)
- GoTo(File_Size-22);
-
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Zip::Read_Buffer_Continue()
-{
- for (;;)
- {
- //Probing
- if (signature==0x00000000) //If not already tested (else an element is being parsed)
- {
- if (Element_Offset+4>Element_Size) //signature size
- return; //Not enough data
- signature=LittleEndian2int32u(Buffer+(size_t)Element_Offset);
- }
-
- //Parsing
- switch (signature)
- {
- case 0x04034b50 : if (!local_file())
- return; //Not enough data
- break;
- case 0x02014b50 : if (!central_directory())
- return; //Not enough data
- break;
- case 0x05054b50 : if (!digital_signature())
- return; //Not enough data
- break;
- case 0x06054b50 : if (!end_of_central_directory())
- return; //Not enough data
- break;
- case 0x08064b50 : if(!archive_extra_data_record())
- return;
- break;
- case 0x06064b50 : if(!Zip64_end_of_central_directory_record())
- return;
- break;
- case 0x07064b50 : if(!Zip64_end_of_central_directory_locator())
- return;
- break;
- default: Finish(); return; //Reject(); return; //Unknown value //Décommenter quand toutes les signatures sont implémentées
- }
-
- //Cleanup
- signature=0x00000000; //Reset, must probe again the signature (next element)
- }
-}
-
-//***************************************************************************
-// Files
-//***************************************************************************
-
-bool File_Zip::local_file()
-{
- switch(local_file_Step)
- {
- case 0 :
- if (!local_file_header())
- return false;
- local_file_Step=1; //local_file_header parsed
- break;
- case 1 :
- local_file_Step=2; //file_data is always parsed
- if (!file_data())
- return false;
- break;
- case 2:
- if (!data_descriptor())
- return false;
- local_file_Step=0; //data_descriptor is parsed, back to begin
- break;
- default: ; //Should never happen
- }
-
- return true;
-}
-
-bool File_Zip::archive_extra_data_record()
-{
- if (Element_Offset+8>Element_Size) //archive_extra_data_record
- return false; //Not enough data
-
- //Retrieving complete archive_extra_data_record size
- int32u extra_field_length=LittleEndian2int32u(Buffer+(size_t)Element_Offset+4);
-
- //Parsing
- Element_Begin1("archive_extra_data_record");
- Skip_C4("Archive extra data signature");
- Skip_L4("extra field length");
- Skip_XX(extra_field_length,"extra_field_data");
- Element_End0();
-
- return true;
-}
-
-bool File_Zip::digital_signature()
-{
- if (Element_Offset+6>Element_Size) //digital_signature
- return false; //Not enough data
-
- //Retrieving complete archive_extra_data_record size
- int16u size_of_data=LittleEndian2int16u(Buffer+(size_t)Element_Offset+4);
-
- //Parsing
- Element_Begin1("digital_signature");
- Skip_C4("Header signature");
- Skip_L2("size of data");
- Skip_XX(size_of_data,"signature data");
- Element_End0();
-
- return true;
-}
-
-bool File_Zip::local_file_header()
-{
- if (Element_Offset+30>Element_Size) //local_file_header up to extra_field_length included
- return false; //Not enough data
-
- //Retrieving complete local_file_header size
- int16u file_name_length=LittleEndian2int16u(Buffer+(size_t)Element_Offset+26);
- int16u extra_field_length=LittleEndian2int16u(Buffer+(size_t)Element_Offset+28);
- if (Element_Offset+30+file_name_length+extra_field_length>Element_Size) //local_file_header all included
- return false; //Not enough data
-
- //Parsing
- Element_Begin1("local_file_header");
- int16u general_purpose_bit_flag,compression_method;
- bool efs;
- Skip_C4("Local file header signature");
- Skip_L2("Version needed to extract");
- Get_L2 (general_purpose_bit_flag,"general purpose bit flag");
- Skip_Flags(general_purpose_bit_flag, 0, "encrypted file");
- Skip_Flags(general_purpose_bit_flag, 1, "8K sliding dictionary");
- Skip_Flags(general_purpose_bit_flag, 2, "3 Shannon-Fano trees");
- Get_Flags (general_purpose_bit_flag, 3, data_descriptor_set, "data descriptor");
- Skip_Flags(general_purpose_bit_flag, 4, "Reserved for use with method 8");
- Skip_Flags(general_purpose_bit_flag, 4, "file is compressed patched data");
- Skip_Flags(general_purpose_bit_flag, 4, "Strong encryption");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Currently unused");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Currently unused");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Currently unused");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Currently unused");
- Get_Flags (general_purpose_bit_flag, 11, efs, "Language encoding flag (EFS)");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Reserved by PKWARE for enhanced compression");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Reserved by PKWARE");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Reserved by PKWARE");
- Get_L2 (compression_method,"compression method");
- Param_Info1C((compression_method<20), Zip_compression_method[compression_method]);
- Param_Info1C((compression_method==97||compression_method==98), Zip_compression_method[compression_method-97+20]);
- Skip_L2("last mod file time");
- Skip_L2("last mod file date");
- Skip_L4("crc-32");
- Get_L4(compressed_size,"compressed size");
- Skip_L4("uncompressed size");
- Get_L2(file_name_length,"file name lenth");
- Get_L2(extra_field_length,"extra field length");
- if(efs) {
- Skip_UTF8(file_name_length,"file name");
- Skip_UTF8(extra_field_length,"extra field");
- } else {
- Skip_Local(file_name_length,"file name");
- Skip_Local(extra_field_length,"extra field");
- }
- Element_End0();
-
- FILLING_BEGIN();
- Accept("Zip");
- Fill(Stream_General, 0, General_Format, "ZIP");
- FILLING_END();
- return true;
-}
-
-bool File_Zip::file_data()
-{
- Element_Begin1("file_data");
- Skip_XX(compressed_size,"File_data");
- Element_End0();
-
- if (Element_Offset>Element_Size)
- {
- GoTo(File_Offset+Element_Offset);
- return false;
- }
- return true;
-
-}
-
-bool File_Zip::data_descriptor()
-{
- if(data_descriptor_set)
- {
- if (Element_Offset+12>Element_Size)
- return false; //Not enough data
-
- Element_Begin1("data_descriptor");
- Skip_L4("crc-32");
- Skip_L4("compressed size");
- Skip_L4("uncompressed size");
- Element_End0();
- }
- return true;
-}
-
-bool File_Zip::central_directory()
-{
- if (Element_Offset+46>Element_Size) //central_directory up to relative offset of local header included
- return false; //Not enough data
-
- //Retrieving complete local_file_header size
- int16u file_name_length=LittleEndian2int16u(Buffer+(size_t)Element_Offset+28);
- int16u extra_field_length=LittleEndian2int16u(Buffer+(size_t)Element_Offset+30);
- int16u file_comment_length=LittleEndian2int16u(Buffer+(size_t)Element_Offset+32);
- if (Element_Offset+46+file_name_length+extra_field_length+file_comment_length>Element_Size) //central_directory_structure all included
- return false; //Not enough data
-
- int16u general_purpose_bit_flag;
- bool efs;
- int16u version_made_by,compression_method;
-
- //Parsing
- Element_Begin1("Central directory");
- Skip_C4("central file header signature");
- Get_L2 (version_made_by,"version made by");Param_Info1((version_made_by>>8)>20?"unused":Zip_made_by[version_made_by>>8]);
- Skip_L2("version needed to extract");
- Get_L2 (general_purpose_bit_flag,"general purpose bit flag");
- Skip_Flags(general_purpose_bit_flag, 0, "encrypted file");
- Skip_Flags(general_purpose_bit_flag, 1, "8K sliding dictionary");
- Skip_Flags(general_purpose_bit_flag, 2, "3 Shannon-Fano trees");
- Skip_Flags(general_purpose_bit_flag, 3, "data descriptor");
- Skip_Flags(general_purpose_bit_flag, 4, "Reserved for use with method 8");
- Skip_Flags(general_purpose_bit_flag, 4, "file is compressed patched data");
- Skip_Flags(general_purpose_bit_flag, 4, "Strong encryption");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Currently unused");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Currently unused");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Currently unused");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Currently unused");
- Get_Flags (general_purpose_bit_flag, 11, efs, "Language encoding flag (EFS)");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Reserved by PKWARE for enhanced compression");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Reserved by PKWARE");
- //~ Skip_Flags(general_purpose_bit_flag, 4, "Reserved by PKWARE");
- Get_L2 (compression_method,"compression method");
- Param_Info1C((compression_method<20), Zip_compression_method[compression_method]);
- Param_Info1C((compression_method==97||compression_method==98), Zip_compression_method[compression_method-97+20]);
- Skip_L2("last mod file time");
- Skip_L2("last mod file date");
- Skip_L4("crc-32");
- Skip_L4("compressed size");
- Skip_L4("uncompressed size");
- Skip_L2("file name length");
- Skip_L2("extra field length");
- Skip_L2("file comment length");
- Skip_L2("disk number start");
- Skip_L2("internal file attributes");
- Skip_L4("external file attributes");
- Skip_L4("relative offset of local header");
- if(efs) {
- Skip_UTF8(file_name_length,"file name");
- Skip_UTF8(extra_field_length,"extra field");
- Skip_UTF8(file_comment_length,"file comment");
- } else {
- Skip_Local(file_name_length,"file name");
- Skip_Local(extra_field_length,"extra field");
- Skip_Local(file_comment_length,"file comment");
- }
- Element_End0();
-
- return true;
-}
-
-bool File_Zip::end_of_central_directory()
-{
- if (Element_Offset+22>Element_Size) //end_of_central_directory up to relative offset of .ZIP file comment length included
- return false; //Not enough data
-
- //Retrieving complete local_file_header size
- int16u zip_comment_length=LittleEndian2int16u(Buffer+(size_t)Element_Offset+20);
- if (Element_Offset+22+zip_comment_length>Element_Size) //end_of_central_directory all included
- return false; //Not enough data
-
- //Parsing
- int32u offset;
- Element_Begin1("End of central directory");
- Skip_C4( "end of central dir signature");
- Skip_L2( "number of this disk");
- Skip_L2( "number of the disk");// with the start of the central directory
- Skip_L2( "total number of entries on this disk");// in the central directory
- Skip_L2( "total number of entries");// in the central directory
- Skip_L4( "size of the central directory");
- Get_L4 (offset, "offset of start of central directory");// with respect to the starting disk number
- Skip_L2( "zip file comment length");
- Skip_XX(zip_comment_length, "zip file comment");
- Element_End0();
-
- //Going to first central directory (once)
- if (!end_of_central_directory_IsParsed)
- {
- end_of_central_directory_IsParsed=true;
- GoTo(offset);
- }
- return true;
-}
-
-bool File_Zip::Zip64_end_of_central_directory_record()
-{
- if (Element_Offset+12>Element_Size) //Zip64_end_of_central_directory_record
- return false; //Not enough data
-
- //Retrieving complete Zip64_end_of_central_directory_record size
- int64u size_of_Zip64_end_of_central_directory_record=LittleEndian2int64u(Buffer+(size_t)Element_Offset+4);
- if (Element_Offset+12+size_of_Zip64_end_of_central_directory_record>Element_Size) //end_of_central_directory all included
- return false; //Not enough data
-
- //Parsing
- //~ int32u offset;
- int16u version_made_by;
- Element_Begin1("Zip64 End of central directory record");
- Skip_C4( "Zip64 end of central dir signature");
- Skip_L8( "size of zip64 end of central directory record");
- Get_L2 (version_made_by, "version made by");
- Param_Info1((version_made_by>>8)>20?"unused":Zip_made_by[version_made_by>>8]);
- Skip_L2( "version needed to extract");
- Skip_L4( "number of this disk");
- Skip_L4( "number of the disk");// with the start of the central directory
- Skip_L8( "total number of entries on this disk");// in the central directory
- Skip_L8( "total number of entries");// in the central directory
- Skip_L8( "size of the central directory");
- Skip_L8( "offset of start of central directory"); // with respect to the starting disk number
- Skip_XX(size_of_Zip64_end_of_central_directory_record-44, "zip64 extensible data sector");
- Element_End0();
-
- return true;
-}
-
-bool File_Zip::Zip64_end_of_central_directory_locator()
-{
- if (Element_Offset+20>Element_Size) //Zip64_end_of_central_directory_locator
- return false; //Not enough data
-
- //Parsing
- Element_Begin1("Zip64 end of central directory locator");
- Skip_C4("zip64 end of central dir locator signature");
- Skip_L4("number of the disk");// with the start of the zip64 end of central directory
- Skip_L8("relative offset of the zip64 end of central directory record");
- Skip_L4("total number of disks");
- Element_End0();
-
- return true;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_ZIP_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Zip.h b/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Zip.h
deleted file mode 100644
index 673e49473..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Archive/File_Zip.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about ZIP files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_ZipH
-#define MediaInfo_File_ZipH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Zip
-//***************************************************************************
-
-class File_Zip : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-
- int32u compressed_size;
- bool data_descriptor_set;
- int32u signature;
- int8u local_file_Step;
- bool end_of_central_directory_IsParsed;
-
- bool local_file();
- bool local_file_header();
- bool file_data();
- bool data_descriptor();
- bool archive_extra_data_record();
- bool central_directory();
- bool digital_signature();
- bool end_of_central_directory();
- bool Zip64_end_of_central_directory_record();
- bool Zip64_end_of_central_directory_locator();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac.cpp
deleted file mode 100644
index 5d29f8613..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac.cpp
+++ /dev/null
@@ -1,768 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AAC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Aac.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Aac::File_Aac()
-:File__Analyze(), File__Tags_Helper()
-{
- //File__Tags_Helper
- Base=this;
-
- //Configuration
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
- PTS_DTS_Needed=true;
- IsRawStream=true;
-
- //In
- Frame_Count_Valid=MediaInfoLib::Config.ParseSpeed_Get()>=0.5?128:(MediaInfoLib::Config.ParseSpeed_Get()>=0.3?32:8);
- FrameIsAlwaysComplete=false;
- Mode=Mode_Unknown;
-
- audioObjectType=(int8u)-1;
- extensionAudioObjectType=(int8u)-1;
- channelConfiguration=(int8u)-1;
- frame_length=1024;
- sampling_frequency_index=(int8u)-1;
- sampling_frequency=(int32u)-1;
- extension_sampling_frequency_index=(int8u)-1;
- extension_sampling_frequency=(int32u)-1;
- aacSpectralDataResilienceFlag=false;
- aacSectionDataResilienceFlag=false;
- aacScalefactorDataResilienceFlag=false;
- FrameSize_Min=(int64u)-1;
- FrameSize_Max=0;
- adts_buffer_fullness_Is7FF=false;
- #if MEDIAINFO_ADVANCED
- aac_frame_length_Total=0;
- #endif //MEDIAINFO_ADVANCED
-
- //Temp - Main
- muxConfigPresent=true;
- audioMuxVersionA=false;
-
- //Temp - General Audio
- sbr=NULL;
- ps=NULL;
-
- //Temp
- CanFill=true;
-}
-
-//---------------------------------------------------------------------------
-File_Aac::~File_Aac()
-{
- delete sbr;
- delete ps;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::Streams_Accept()
-{
- switch (Mode)
- {
- case Mode_ADTS :
- if (!IsSub)
- TestContinuousFileNames();
- default : ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::Streams_Fill()
-{
- switch(Mode)
- {
- case Mode_LATM : Fill(Stream_General, 0, General_Format, "LATM"); if (IsSub) Fill(Stream_Audio, 0, Audio_MuxingMode, "LATM"); break;
- default : ;
- }
-
- for (std::map<std::string, Ztring>::iterator Info=Infos_General.begin(); Info!=Infos_General.end(); ++Info)
- Fill(Stream_General, 0, Info->first.c_str(), Info->second);
- File__Tags_Helper::Stream_Prepare(Stream_Audio);
- for (std::map<std::string, Ztring>::iterator Info=Infos.begin(); Info!=Infos.end(); ++Info)
- Fill(Stream_Audio, StreamPos_Last, Info->first.c_str(), Info->second);
-
- switch(Mode)
- {
- case Mode_ADTS : File__Tags_Helper::Streams_Fill(); break;
- default : ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::Streams_Update()
-{
- if (Frame_Count)
- {
- if (Mode==Mode_ADTS)
- Infos["BitRate_Mode"].From_Local(adts_buffer_fullness_Is7FF?"VBR":"CBR");
-
- #if MEDIAINFO_ADVANCED
- switch(Mode)
- {
- case Mode_ADTS :
- case Mode_LATM : if (Config->File_RiskyBitRateEstimation_Get() && !adts_buffer_fullness_Is7FF)
- {
- int64u BitRate=(sampling_frequency/1024);
- BitRate*=aac_frame_length_Total*8;
- BitRate/=Frame_Count;
-
- Fill(Stream_Audio, 0, Audio_BitRate, BitRate, 10, true);
- }
- break;
- default : ;
- }
- #endif //MEDIAINFO_ADVANCED
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::Streams_Finish()
-{
- switch(Mode)
- {
- case Mode_ADIF :
- case Mode_ADTS : File__Tags_Helper::Streams_Finish(); break;
- default : ;
- }
-
- if (FrameSize_Min!=(int32u)-1 && FrameSize_Max)
- {
- if (FrameSize_Max>FrameSize_Min*1.02)
- {
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "VBR", Unlimited, true, true);
- if (Config->ParseSpeed>=1.0)
- {
- Fill(Stream_Audio, 0, Audio_BitRate_Minimum, ((float64)FrameSize_Min)/1024*48000*8, 0);
- Fill(Stream_Audio, 0, Audio_BitRate_Maximum, ((float64)FrameSize_Max)/1024*48000*8, 0);
- }
- }
- else if (Config->ParseSpeed>=1.0)
- {
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
- }
- }
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Aac::FileHeader_Begin()
-{
- switch(Mode)
- {
- case Mode_AudioSpecificConfig :
- case Mode_ADIF :
- MustSynchronize=false; break;
- default : ; //Synchronization is requested, and this is the default
- }
-
- switch(Mode)
- {
- case Mode_Unknown :
- case Mode_ADIF :
- case Mode_ADTS :
- break;
- default : return true; //no file header test with other modes
- }
-
- //Tags
- if (!File__Tags_Helper::FileHeader_Begin())
- return false;
-
- //Testing
- if (Buffer_Size<4)
- return false;
- if (Buffer[0]==0x41 //"ADIF"
- && Buffer[1]==0x44
- && Buffer[2]==0x49
- && Buffer[3]==0x46)
- {
- Mode=Mode_ADIF;
- File__Tags_Helper::Accept("ADIF");
- MustSynchronize=false;
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::FileHeader_Parse()
-{
- switch (Mode)
- {
- case Mode_ADIF : FileHeader_Parse_ADIF(); break;
- default : ; //no file header test with other modes
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::FileHeader_Parse_ADIF()
-{
- adif_header();
- BS_Begin();
- raw_data_block();
- BS_End();
-
- FILLING_BEGIN();
- File__Tags_Helper::Finish();
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::Read_Buffer_Continue()
-{
- if (Element_Size==0)
- return;
-
- if (Frame_Count==0)
- PTS_Begin=FrameInfo.PTS;
-
- switch(Mode)
- {
- case Mode_AudioSpecificConfig : Read_Buffer_Continue_AudioSpecificConfig(); break;
- case Mode_raw_data_block : Read_Buffer_Continue_raw_data_block(); break;
- case Mode_ADIF :
- case Mode_ADTS : File__Tags_Helper::Read_Buffer_Continue(); break;
- default : ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::Read_Buffer_Continue_AudioSpecificConfig()
-{
- File__Analyze::Accept(); //We automaticly trust it
-
- BS_Begin();
- AudioSpecificConfig(0); //Up to the end of the block
- BS_End();
-
- Mode=Mode_raw_data_block; //Mode_AudioSpecificConfig only once
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::Read_Buffer_Continue_raw_data_block()
-{
- if (Frame_Count>Frame_Count_Valid)
- {
- Skip_XX(Element_Size, "Data");
- return; //Parsing completely only the 1st frame
- }
-
- BS_Begin();
- raw_data_block();
- BS_End();
- if (FrameIsAlwaysComplete && Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-
- FILLING_BEGIN();
- //Counting
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- Element_Info1(Ztring::ToZtring(Frame_Count));
-
- //Filling
- if (!Status[IsAccepted])
- File__Analyze::Accept();
- if (Frame_Count>=Frame_Count_Valid)
- {
- //No more need data
- if (Mode==Mode_LATM)
- File__Analyze::Accept();
- File__Analyze::Finish();
- }
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Aac::Synchronize()
-{
- switch (Mode)
- {
- case Mode_Unknown : if (Synchronize_LATM()) return true; Buffer_Offset=0; return Synchronize_ADTS();
- case Mode_ADTS : return Synchronize_ADTS();
- case Mode_LATM : return Synchronize_LATM();
- default : return true; //No synchro
- }
-}
-
-//---------------------------------------------------------------------------
-bool File_Aac::Synchronize_ADTS()
-{
- //Tags
- bool Tag_Found;
- if (!File__Tags_Helper::Synchronize(Tag_Found))
- return false;
- if (Tag_Found)
- return true;
-
- //Synchronizing
- while (Buffer_Offset+6<=Buffer_Size)
- {
- while (Buffer_Offset+6<=Buffer_Size && (Buffer[Buffer_Offset ]!=0xFF
- || (Buffer[Buffer_Offset+1]&0xF6)!=0xF0))
- Buffer_Offset++;
-
- if (Buffer_Offset+6<=Buffer_Size)//Testing if size is coherant
- {
- //Testing next start, to be sure
- int16u aac_frame_length=(CC3(Buffer+Buffer_Offset+3)>>5)&0x1FFF;
- if (IsSub && Buffer_Offset+aac_frame_length==Buffer_Size)
- break;
- if (File_Offset+Buffer_Offset+aac_frame_length!=File_Size-File_EndTagSize)
- {
- //Padding
- while (Buffer_Offset+aac_frame_length+2<=Buffer_Size && Buffer[Buffer_Offset+aac_frame_length]==0x00)
- aac_frame_length++;
-
- if (IsSub && Buffer_Offset+aac_frame_length==Buffer_Size)
- break; //while()
- if (Buffer_Offset+aac_frame_length+2>Buffer_Size)
- return false; //Need more data
-
- //Testing
- if (aac_frame_length<=7 || (CC2(Buffer+Buffer_Offset+aac_frame_length)&0xFFF6)!=0xFFF0)
- Buffer_Offset++;
- else
- {
- //Testing next start, to be sure
- if (Buffer_Offset+aac_frame_length+3+3>Buffer_Size)
- return false; //Need more data
- int16u aac_frame_length2=(CC3(Buffer+Buffer_Offset+aac_frame_length+3)>>5)&0x1FFF;
- if (File_Offset+Buffer_Offset+aac_frame_length+aac_frame_length2!=File_Size-File_EndTagSize)
- {
- //Padding
- while (Buffer_Offset+aac_frame_length+aac_frame_length2+2<=Buffer_Size && Buffer[Buffer_Offset+aac_frame_length+aac_frame_length2]==0x00)
- aac_frame_length2++;
-
- if (IsSub && Buffer_Offset+aac_frame_length+aac_frame_length2==Buffer_Size)
- break; //while()
- if (Buffer_Offset+aac_frame_length+aac_frame_length2+2>Buffer_Size)
- return false; //Need more data
-
- //Testing
- if (aac_frame_length2<=7 || (CC2(Buffer+Buffer_Offset+aac_frame_length+aac_frame_length2)&0xFFF6)!=0xFFF0)
- Buffer_Offset++;
- else
- {
- //Testing next start, to be sure
- if (Buffer_Offset+aac_frame_length+aac_frame_length2+3+3>Buffer_Size)
- return false; //Need more data
- int16u aac_frame_length3=(CC3(Buffer+Buffer_Offset+aac_frame_length+aac_frame_length2+3)>>5)&0x1FFF;
- if (File_Offset+Buffer_Offset+aac_frame_length+aac_frame_length2+aac_frame_length3!=File_Size-File_EndTagSize)
- {
- //Padding
- while (Buffer_Offset+aac_frame_length+aac_frame_length2+aac_frame_length3+2<=Buffer_Size && Buffer[Buffer_Offset+aac_frame_length+aac_frame_length2+aac_frame_length3]==0x00)
- aac_frame_length3++;
-
- if (IsSub && Buffer_Offset+aac_frame_length+aac_frame_length2+aac_frame_length3==Buffer_Size)
- break; //while()
- if (Buffer_Offset+aac_frame_length+aac_frame_length2+aac_frame_length3+2>Buffer_Size)
- return false; //Need more data
-
- //Testing
- if (aac_frame_length3<=7 || (CC2(Buffer+Buffer_Offset+aac_frame_length+aac_frame_length2+aac_frame_length3)&0xFFF6)!=0xFFF0)
- Buffer_Offset++;
- else
- break; //while()
- }
- else
- break; //while()
- }
- }
- else
- break; //while()
- }
- }
- else
- break; //while()
- }
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+6>Buffer_Size)
- {
- if (Buffer_Offset+5==Buffer_Size && (CC2(Buffer+Buffer_Offset)&0xFFF6)!=0xFFF0)
- Buffer_Offset++;
- if (Buffer_Offset+4==Buffer_Size && (CC2(Buffer+Buffer_Offset)&0xFFF6)!=0xFFF0)
- Buffer_Offset++;
- if (Buffer_Offset+3==Buffer_Size && (CC2(Buffer+Buffer_Offset)&0xFFF6)!=0xFFF0)
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && (CC2(Buffer+Buffer_Offset)&0xFFF6)!=0xFFF0)
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && CC1(Buffer+Buffer_Offset)!=0xFF)
- Buffer_Offset++;
- return false;
- }
-
- //Synched is OK
- Mode=Mode_ADTS;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Aac::Synchronize_LATM()
-{
- //Synchronizing
- while (Buffer_Offset+3<=Buffer_Size)
- {
- while (Buffer_Offset+3<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x56
- || (Buffer[Buffer_Offset+1]&0xE0)!=0xE0))
- Buffer_Offset++;
-
- if (Buffer_Offset+3<=Buffer_Size)//Testing if size is coherant
- {
- //Testing next start, to be sure
- int16u audioMuxLengthBytes=CC2(Buffer+Buffer_Offset+1)&0x1FFF;
- if (IsSub && Buffer_Offset+3+audioMuxLengthBytes==Buffer_Size)
- break;
- if (File_Offset+Buffer_Offset+3+audioMuxLengthBytes!=File_Size)
- {
- if (Buffer_Offset+3+audioMuxLengthBytes+3>Buffer_Size)
- return false; //Need more data
-
- //Testing
- if ((CC2(Buffer+Buffer_Offset+3+audioMuxLengthBytes)&0xFFE0)!=0x56E0)
- Buffer_Offset++;
- else
- {
- //Testing next start, to be sure
- int16u audioMuxLengthBytes2=CC2(Buffer+Buffer_Offset+3+audioMuxLengthBytes+1)&0x1FFF;
- if (File_Offset+Buffer_Offset+3+audioMuxLengthBytes+3+audioMuxLengthBytes2!=File_Size)
- {
- if (Buffer_Offset+3+audioMuxLengthBytes+3+audioMuxLengthBytes2+3>Buffer_Size)
- return false; //Need more data
-
- //Testing
- if ((CC2(Buffer+Buffer_Offset+3+audioMuxLengthBytes+3+audioMuxLengthBytes2)&0xFFE0)!=0x56E0)
- Buffer_Offset++;
- else
- break; //while()
- }
- else
- break; //while()
- }
- }
- else
- break; //while()
- }
- }
-
-
- //Synchronizing
- while (Buffer_Offset+2<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x56
- || (Buffer[Buffer_Offset+1]&0xE0)!=0xE0))
- Buffer_Offset++;
- if (Buffer_Offset+2>=Buffer_Size)
- return false;
-
- //Synched is OK
- Mode=Mode_LATM;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Aac::Synched_Test()
-{
- switch (Mode)
- {
- case Mode_ADTS : return Synched_Test_ADTS();
- case Mode_LATM : return Synched_Test_LATM();
- default : return true; //No synchro
- }
-}
-
-//---------------------------------------------------------------------------
-bool File_Aac::Synched_Test_ADTS()
-{
- //Tags
- if (!File__Tags_Helper::Synched_Test())
- return false;
-
- //Null padding
- while (Buffer_Offset+2<=Buffer_Size && Buffer[Buffer_Offset]==0x00)
- Buffer_Offset++;
-
- //Must have enough buffer for having header
- if (Buffer_Offset+2>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if ((CC2(Buffer+Buffer_Offset)&0xFFF6)!=0xFFF0)
- Synched=false;
-
- //We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Aac::Synched_Test_LATM()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+2>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if ((CC2(Buffer+Buffer_Offset)&0xFFE0)!=0x56E0)
- Synched=false;
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Demux
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-bool File_Aac::Demux_UnpacketizeContainer_Test()
-{
- switch (Mode)
- {
- case Mode_ADTS : return Demux_UnpacketizeContainer_Test_ADTS();
- case Mode_LATM : return Demux_UnpacketizeContainer_Test_LATM();
- default : return true; //No header
- }
-}
-bool File_Aac::Demux_UnpacketizeContainer_Test_ADTS()
-{
- int16u aac_frame_length=(BigEndian2int24u(Buffer+Buffer_Offset+3)>>5)&0x1FFF; //13 bits
- Demux_Offset=Buffer_Offset+aac_frame_length;
-
- if (Demux_Offset>Buffer_Size && File_Offset+Buffer_Size!=File_Size)
- return false; //No complete frame
-
- Demux_UnpacketizeContainer_Demux();
-
- return true;
-}
-bool File_Aac::Demux_UnpacketizeContainer_Test_LATM()
-{
- int16u audioMuxLengthBytes=BigEndian2int16u(Buffer+Buffer_Offset+1)&0x1FFF; //13 bits
- Demux_Offset=Buffer_Offset+3+audioMuxLengthBytes;
-
- if (Demux_Offset>Buffer_Size && File_Offset+Buffer_Size!=File_Size)
- return false; //No complete frame
-
- Demux_UnpacketizeContainer_Demux();
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Aac::Header_Begin()
-{
- switch (Mode)
- {
- case Mode_ADTS : return Header_Begin_ADTS();
- case Mode_LATM : return Header_Begin_LATM();
- default : return true; //No header
- }
-}
-
-//---------------------------------------------------------------------------
-bool File_Aac::Header_Begin_ADTS()
-{
- //There is no real header in ADTS, retrieving only the frame length
- if (Buffer_Offset+8>Buffer_Size) //size of adts_fixed_header + adts_variable_header
- return false;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Aac::Header_Begin_LATM()
-{
- if (Buffer_Offset+3>Buffer_Size) //fixed 24-bit header
- return false;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::Header_Parse()
-{
- switch (Mode)
- {
- case Mode_ADTS : Header_Parse_ADTS(); break;
- case Mode_LATM : Header_Parse_LATM(); break;
- default : ; //No header
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::Header_Parse_ADTS()
-{
- //There is no "header" in ADTS, retrieving only the frame length
- int16u aac_frame_length=(BigEndian2int24u(Buffer+Buffer_Offset+3)>>5)&0x1FFF; //13 bits
-
- //Filling
- Header_Fill_Size(aac_frame_length);
- Header_Fill_Code(0, "adts_frame");
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::Header_Parse_LATM()
-{
- int16u audioMuxLengthBytes;
- BS_Begin();
- Skip_S2(11, "syncword");
- Get_S2 (13, audioMuxLengthBytes, "audioMuxLengthBytes");
- BS_End();
-
- //Filling
- Header_Fill_Size(3+audioMuxLengthBytes);
- Header_Fill_Code(0, "LATM");
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::Data_Parse()
-{
- if (FrameSize_Min>Header_Size+Element_Size)
- FrameSize_Min=Header_Size+Element_Size;
- if (FrameSize_Max<Header_Size+Element_Size)
- FrameSize_Max=Header_Size+Element_Size;
-
- if (Frame_Count>Frame_Count_Valid)
- {
- Skip_XX(Element_Size, "Data");
- FrameInfo.DTS+=float64_int64s(((float64)frame_length)*1000000000/sampling_frequency);
- FrameInfo.PTS=FrameInfo.DTS;
- return; //Parsing completely only the 1st frame
- }
-
- switch (Mode)
- {
- case Mode_ADTS : Data_Parse_ADTS(); break;
- case Mode_LATM : Data_Parse_LATM(); break;
- default : ; //No header
- }
-
- FILLING_BEGIN();
- //Counting
- if (File_Offset+Buffer_Offset+Element_Size==File_Size)
- Frame_Count_Valid=Frame_Count; //Finish frames in case of there are less than Frame_Count_Valid frames
- if (CanFill)
- {
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- Element_Info1(Ztring::ToZtring(Frame_Count));
- }
-
- #if MEDIAINFO_ADVANCED
- switch(Mode)
- {
- case Mode_LATM :
- aac_frame_length_Total+=Element_Size;
- break;
- default : ;
- }
- #endif //MEDIAINFO_ADVANCED
-
- if (!Status[IsAccepted])
- File__Analyze::Accept();
-
- //Filling
- if (Frame_Count>=Frame_Count_Valid && Config->ParseSpeed<1.0)
- {
- //No more need data
- switch (Mode)
- {
- case Mode_ADTS :
- case Mode_LATM :
- if (!Status[IsFilled])
- {
- Fill();
- if (!IsSub)
- File__Tags_Helper::Finish();
- }
- break;
- default : ; //No header
- }
-
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::Data_Parse_ADTS()
-{
- //Parsing
- BS_Begin();
- adts_frame();
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::Data_Parse_LATM()
-{
- BS_Begin();
- AudioMuxElement();
- BS_End();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_AAC_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac.h
deleted file mode 100644
index 0756008cd..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac.h
+++ /dev/null
@@ -1,371 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about AAC files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_AacH
-#define MediaInfo_File_AacH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_MPEG4_YES
- #include "MediaInfo/Multiple/File_Mpeg4_Descriptors.h"
-#endif
-#include "MediaInfo/Tag/File__Tags.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Aac
-//***************************************************************************
-
-struct sbr_handler
-{
- //sbr_header
- int8u bs_amp_res[2];
- int8u bs_amp_res_FromHeader;
- int8u bs_start_freq;
- int8u bs_stop_freq;
- int8u bs_xover_band;
- int8u bs_freq_scale;
- int8u bs_alter_scale;
- int8u bs_noise_bands;
-
- //sbr_grid
- int8u bs_num_env[2];
- bool bs_freq_res[2][8];
- int8u bs_num_noise[2];
-
- //sbr_dtdf
- int8u bs_df_env[2][4];
- int8u bs_df_noise[2][2];
-
- //Computed values
- int8u num_noise_bands;
- int8u num_env_bands[2];
-};
-
-struct ps_handler
-{
- bool enable_iid;
- bool enable_icc;
- bool enable_ext;
- int8u iid_mode;
- int8u icc_mode;
-};
-
-typedef const int8s (*sbr_huffman)[2];
-
-class File_Aac : public File__Analyze, public File__Tags_Helper
-{
-public :
- //In
- int64u Frame_Count_Valid;
- bool FrameIsAlwaysComplete;
- enum mode
- {
- Mode_Unknown,
- Mode_AudioSpecificConfig,
- Mode_raw_data_block,
- Mode_ADIF,
- Mode_ADTS,
- Mode_LATM,
- };
- mode Mode;
- void AudioSpecificConfig_OutOfBand(int32u sampling_frequency, int8u audioObjectType=(int8u)-1, bool sbrData=false, bool psData=false, bool sbrPresentFlag=false, bool psPresentFlag=false);
-
- //Constructor/Destructor
- File_Aac();
- ~File_Aac();
-
-protected :
- //Streams management
- void Streams_Accept();
- void Streams_Fill();
- void Streams_Update();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
- void FileHeader_Parse_ADIF();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
- void Read_Buffer_Continue_AudioSpecificConfig();
- void Read_Buffer_Continue_raw_data_block();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synchronize_ADTS();
- bool Synchronize_LATM();
- bool Synched_Test();
- bool Synched_Test_ADTS();
- bool Synched_Test_LATM();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test();
- bool Demux_UnpacketizeContainer_Test_ADTS();
- bool Demux_UnpacketizeContainer_Test_LATM();
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Per element
- bool Header_Begin();
- bool Header_Begin_ADTS();
- bool Header_Begin_LATM();
- void Header_Parse();
- void Header_Parse_ADTS();
- void Header_Parse_LATM();
- void Data_Parse();
- void Data_Parse_ADTS();
- void Data_Parse_LATM();
-
- //***********************************************************************
- // Elements - Main
- //***********************************************************************
-
- //Elements - Interface to MPEG-4 container
- void AudioSpecificConfig (size_t End=(size_t)-1);
- void GetAudioObjectType (int8u &ObjectType, const char* Name);
-
- //Elements - Multiplex layer
- void EPMuxElement ();
- void AudioMuxElement ();
- void StreamMuxConfig ();
- int32u LatmGetValue ();
- void PayloadLengthInfo ();
- void PayloadMux ();
- bool muxConfigPresent;
-
- //Elements - Error protection
- void ErrorProtectionSpecificConfig ();
-
- //Elements - MPEG-2 AAC Audio_Data_Interchange_Format, ADIF
- void adif_header ();
-
- //Elements - Audio_Data_Transport_Stream frame, ADTS
- void adts_frame ();
- void adts_fixed_header ();
- void adts_variable_header ();
-
- //Temp
- int8u numSubFrames;
- int8u numProgram;
- int8u numLayer;
- int8u numChunk;
- bool audioMuxVersionA;
- int8u streamID[16][8];
- int8u progSIndx[128];
- int8u laySIndx[128];
- int8u progCIndx[128];
- int8u layCIndx[128];
- int8u frameLengthType[128];
- int16u frameLength[128];
- int32u MuxSlotLengthBytes[128];
- int32u otherDataLenBits;
- bool otherDataPresent;
- bool allStreamsSameTimeFraming;
- int8u audioObjectType;
- int8u extensionAudioObjectType;
- int8u channelConfiguration;
- int16u frame_length;
- int8u sampling_frequency_index;
- int32u sampling_frequency;
- int8u extension_sampling_frequency_index;
- int32u extension_sampling_frequency;
- bool aacScalefactorDataResilienceFlag;
- bool aacSectionDataResilienceFlag;
- bool aacSpectralDataResilienceFlag;
- int8u num_raw_data_blocks;
- bool protection_absent;
- int64u FrameSize_Min;
- int64u FrameSize_Max;
- bool adts_buffer_fullness_Is7FF;
- #if MEDIAINFO_ADVANCED
- int64u aac_frame_length_Total;
- #endif //MEDIAINFO_ADVANCED
-
- //***********************************************************************
- // Elements - Speech coding (HVXC)
- //***********************************************************************
-
- void HvxcSpecificConfig ();
- void HVXCconfig ();
- void ErrorResilientHvxcSpecificConfig ();
- void ErHVXCconfig ();
-
- //***********************************************************************
- // Elements - Speech Coding (CELP)
- //***********************************************************************
-
- void CelpSpecificConfig ();
- void CelpHeader ();
- void ErrorResilientCelpSpecificConfig ();
- void ER_SC_CelpHeader ();
-
- //***********************************************************************
- // Elements - General Audio (GA)
- //***********************************************************************
-
- //Elements - Decoder configuration
- void GASpecificConfig ();
- void program_config_element ();
-
- //Elements - GA bitstream
- void raw_data_block ();
- void single_channel_element ();
- void channel_pair_element ();
- void ics_info ();
- void pulse_data ();
- void coupling_channel_element ();
- void lfe_channel_element ();
- void data_stream_element ();
- void fill_element (int8u old_id);
- void gain_control_data ();
-
- //Elements - Subsidiary
- void individual_channel_stream (bool common_window, bool scale_flag);
- void section_data ();
- void scale_factor_data ();
- void tns_data ();
- void ltp_data ();
- void spectral_data ();
- void extension_payload (size_t End, int8u id_aac);
- void dynamic_range_info ();
- void sac_extension_data (size_t End);
-
- //Elements - SBR
- void sbr_extension_data (size_t End, int8u id_aac, bool crc_flag);
- void sbr_header ();
- void sbr_data (int8u id_aac);
- void sbr_single_channel_element ();
- void sbr_channel_pair_element ();
- void sbr_grid (bool ch);
- void sbr_dtdf (bool ch);
- void sbr_invf (bool ch);
- void sbr_envelope (bool ch, bool bs_coupling);
- void sbr_noise (bool ch, bool bs_coupling);
- void sbr_sinusoidal_coding (bool ch);
- int16u sbr_huff_dec (sbr_huffman Table, const char* Name);
-
- //Elements - SBR - PS
- void ps_data (size_t End);
-
- //Elements - Perceptual noise substitution (PNS)
- bool is_noise (size_t group, size_t sfb);
- int is_intensity (size_t group, size_t sfb);
-
- //Elements - Enhanced Low Delay Codec
- void ELDSpecificConfig ();
- void ld_sbr_header ();
-
- //Helpers
- void hcod (int8u sect_cb, const char* Name);
- void hcod_sf (const char* Name);
- void hcod_binary (int8u CodeBook, int8s* Values, int8u Values_Count);
- void hcod_2step (int8u CodeBook, int8s* Values, int8u Values_Count);
-
- //Temp - channel_pair_element
- bool common_window;
-
- //Temp - ics_info
- int8u window_sequence;
- int8u max_sfb;
- int8u scale_factor_grouping;
- int8u num_windows;
- int8u num_window_groups;
- int8u window_group_length [8];
- int16u sect_sfb_offset [8][1024];
- int16u swb_offset [64];
- int8u sfb_cb [8][64];
- int8u num_swb;
-
- //Temp - section_data
- int8u num_sec [8];
- int8u sect_cb [8][64];
- int16u sect_start [8][64];
- int16u sect_end [8][64];
-
- //Temp - ltp_data
- int16u ltp_lag;
-
- //Temp - SBR
- sbr_handler* sbr;
-
- //Temp - PS
- ps_handler* ps;
-
- //***********************************************************************
- // Elements - Structured Audio (SA)
- //***********************************************************************
-
- void StructuredAudioSpecificConfig ();
-
- //***********************************************************************
- // Elements - Text to Speech Interface (TTSI)
- //***********************************************************************
-
- void TTSSpecificConfig ();
-
- //***********************************************************************
- // Elements - Parametric Audio (HILN)
- //***********************************************************************
-
- void HILNconfig ();
- void HILNenexConfig ();
- void ParametricSpecificConfig ();
- void PARAconfig ();
-
- //***********************************************************************
- // Elements - Technical description of parametric coding for high quality audio
- //***********************************************************************
-
- void SSCSpecificConfig ();
-
- //***********************************************************************
- // Elements - MPEG-1/2 Audio
- //***********************************************************************
-
- void MPEG_1_2_SpecificConfig ();
-
- //***********************************************************************
- // Elements - Technical description of lossless coding of oversampled audio
- //***********************************************************************
-
- void DSTSpecificConfig ();
- //***********************************************************************
- // Elements - Audio Lossless
- //***********************************************************************
-
- void ALSSpecificConfig ();
-
- //***********************************************************************
- // Elements - Scalable lossless
- //***********************************************************************
-
- void SLSSpecificConfig ();
-
- //***********************************************************************
- // Temp
- //***********************************************************************
-
- std::map<std::string, Ztring> Infos_General;
- std::map<std::string, Ztring> Infos;
- bool CanFill;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio.cpp
deleted file mode 100644
index 067df04fb..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio.cpp
+++ /dev/null
@@ -1,1432 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AAC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Aac.h"
-#include "MediaInfo/Audio/File_Aac_GeneralAudio.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-extern const int32u Aac_sampling_frequency[];
-extern const char* Aac_audioObjectType(int8u audioObjectType);
-extern const char* Aac_Format_Profile(int8u ID);
-
-//---------------------------------------------------------------------------
-const char* Aac_id_syn_ele[8]=
-{
- "SCE - single_channel_element",
- "CPE - channel_pair_element",
- "CCE - coupling_channel_element",
- "LFE - lfe_channel_element",
- "DSE - data_stream_element",
- "PCE - program_config_element",
- "FIL - fill_element",
- "END - End"
-};
-
-//---------------------------------------------------------------------------
-const char* Aac_window_sequence[4]=
-{
- "ONLY_LONG_SEQUENCE",
- "LONG_START_SEQUENCE",
- "EIGHT_SHORT_SEQUENCE",
- "LONG_STOP_SEQUENCE"
-};
-
-//***************************************************************************
-// Elements - Decoder configuration
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::GASpecificConfig ()
-{
- //Parsing
- Element_Begin1("GASpecificConfig");
- bool frameLengthFlag, dependsOnCoreCoder, extensionFlag;
- Get_SB ( frameLengthFlag, "frameLengthFlag");
- frame_length=frameLengthFlag==0?1024:960; Param_Info2(frame_length, " bytes");
- Get_SB ( dependsOnCoreCoder, "dependsOnCoreCoder");
- if (dependsOnCoreCoder)
- Skip_S2(14, "coreCoderDelay");
- Get_SB ( extensionFlag, "extensionFlag");
- if (channelConfiguration==0)
- program_config_element();
- if (audioObjectType==06 || audioObjectType==20)
- Skip_S1(3, "layerNr");
- if (extensionFlag)
- {
- bool extensionFlag3;
- if (audioObjectType==22)
- {
- Skip_S1( 5, "numOfSubFrame");
- Skip_S2(11, "layer_length");
- }
- if (audioObjectType==17
- || audioObjectType==19
- || audioObjectType==20
- || audioObjectType==23)
- {
- Skip_SB( "aacSectionDataResilienceFlag");
- Skip_SB( "aacScalefactorDataResilienceFlag");
- Skip_SB( "aacSpectralDataResilienceFlag");
- }
- Get_SB ( extensionFlag3, "extensionFlag3");
- if (extensionFlag3)
- {
- Skip_BS(Data_BS_Remain(), "Not implemented");
- }
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::program_config_element()
-{
- Element_Begin1("program_config_element");
- Ztring comment_field_data;
- int8u Channels=0, Channels_Front=0, Channels_Side=0, Channels_Back=0, Channels_LFE=0;
- int8u num_front_channel_elements, num_side_channel_elements, num_back_channel_elements, num_lfe_channel_elements, num_assoc_data_elements, num_valid_cc_elements, comment_field_bytes;
- int8u audioObjectType_Temp, sampling_frequency_index_Temp;
- Skip_S1(4, "element_instance_tag");
- Get_S1 (2, audioObjectType_Temp, "object_type"); audioObjectType_Temp++; Param_Info1(Aac_audioObjectType(audioObjectType_Temp));
- Get_S1 (4, sampling_frequency_index_Temp, "sampling_frequency_index"); Param_Info1(Aac_sampling_frequency[sampling_frequency_index_Temp]);
- Get_S1 (4, num_front_channel_elements, "num_front_channel_elements");
- Get_S1 (4, num_side_channel_elements, "num_side_channel_elements");
- Get_S1 (4, num_back_channel_elements, "num_back_channel_elements");
- Get_S1 (2, num_lfe_channel_elements, "num_lfe_channel_elements");
- Get_S1 (3, num_assoc_data_elements, "num_assoc_data_elements");
- Get_S1 (4, num_valid_cc_elements, "num_valid_cc_elements");
- TEST_SB_SKIP( "mono_mixdown_present");
- Skip_S1(4, "mono_mixdown_element_number");
- TEST_SB_END();
- TEST_SB_SKIP( "stereo_mixdown_present");
- Skip_S1(4, "stereo_mixdown_element_number");
- TEST_SB_END();
- TEST_SB_SKIP( "matrix_mixdown_idx_present");
- Skip_S1(2, "matrix_mixdown_idx");
- Skip_SB( "pseudo_surround_enable");
- TEST_SB_END();
- bool front1_element_is_cpe=false;
- if (!num_side_channel_elements && num_back_channel_elements && num_back_channel_elements<3) // Hack: e.g. in case of 5.1,
- {
- num_side_channel_elements=num_back_channel_elements;
- num_back_channel_elements=0;
- }
- for (int8u Pos=0; Pos<num_front_channel_elements; Pos++)
- {
- Element_Begin1("front_element");
- bool front_element_is_cpe;
- Get_SB ( front_element_is_cpe, "front_element_is_cpe");
- Skip_S1(4, "front_element_tag_select");
- if (front_element_is_cpe)
- {
- Channels_Front+=2;
- Channels+=2;
- if (Pos==0)
- front1_element_is_cpe=true;
- }
- else
- {
- Channels_Front++;
- Channels++;
- }
- Element_End0();
- }
- for (int8u Pos=0; Pos<num_side_channel_elements; Pos++)
- {
- Element_Begin1("side_element");
- bool side_element_is_cpe;
- Get_SB ( side_element_is_cpe, "side_element_is_cpe");
- Skip_S1(4, "side_element_tag_select");
- if (side_element_is_cpe)
- {
- Channels_Side+=2;
- Channels+=2;
- }
- else
- {
- Channels_Side++;
- Channels++;
- }
- Element_End0();
- }
- for (int8u Pos=0; Pos<num_back_channel_elements; Pos++)
- {
- Element_Begin1("back_element");
- bool back_element_is_cpe;
- Get_SB ( back_element_is_cpe, "back_element_is_cpe");
- Skip_S1(4, "back_element_tag_select");
- if (back_element_is_cpe)
- {
- Channels_Back+=2;
- Channels+=2;
- }
- else
- {
- Channels_Back++;
- Channels++;
- }
- Element_End0();
- }
- for (int8u Pos=0; Pos<num_lfe_channel_elements; Pos++)
- {
- Element_Begin1("lfe_element");
- Skip_S1(4, "lfe_element_tag_select");
- Channels_LFE++;
- Channels++;
- Element_End0();
- }
- for (int8u Pos=0; Pos<num_assoc_data_elements; Pos++)
- {
- Element_Begin1("assoc_data_element");
- Skip_S1(4, "assoc_data_element_tag_select");
- Element_End0();
- }
- for (int8u Pos=0; Pos<num_valid_cc_elements; Pos++)
- {
- Element_Begin1("valid_cc_element");
- Skip_SB( "cc_element_is_ind_sw");
- Skip_S1(4, "valid_cc_element_tag_select");
- Element_End0();
- }
- BS_End(); //Byte align
- Get_B1 (comment_field_bytes, "comment_field_bytes");
- if (comment_field_bytes)
- Get_Local(comment_field_bytes, comment_field_data, "comment_field_data");
- BS_Begin(); //The stream needs continuity in the bitstream
- Element_End0();
-
- //Filling
- Ztring Channels_Positions, Channels_Positions2, ChannelLayout;
- switch (Channels_Front)
- {
- case 0 : break;
- case 1 : Channels_Positions+=__T("Front: C"); ChannelLayout+=__T("C "); break;
- case 2 : Channels_Positions+=__T("Front: L R"); ChannelLayout+=__T("L R "); break;
- case 3 : Channels_Positions+=__T("Front: L C R"); ChannelLayout+=num_front_channel_elements==2?(front1_element_is_cpe?__T("L R C "):__T("C L R ")):__T("? ? ? "); break;
- default : Channels_Positions+=__T("Front: "); Channels_Positions+=Ztring::ToZtring(Channels_Front); ChannelLayout+=__T("? "); //Which config?
- }
- switch (Channels_Side)
- {
- case 0 : break;
- case 1 : Channels_Positions+=__T(", Side: C"); ChannelLayout+=__T("Cs "); break;
- case 2 : Channels_Positions+=__T(", Side: L R"); ChannelLayout+=__T("Ls Rs "); break;
- case 3 : Channels_Positions+=__T(", Side: L C R"); ChannelLayout+=__T("? ? ? "); break;
- default : Channels_Positions+=__T(", Side: "); Channels_Positions+=Ztring::ToZtring(Channels_Side); ChannelLayout+=__T("? "); //Which config?
- }
- switch (Channels_Back)
- {
- case 0 : break;
- case 1 : Channels_Positions+=__T(", Back: C"); ChannelLayout+=__T("Cs "); break;
- case 2 : Channels_Positions+=__T(", Back: L R"); ChannelLayout+=__T("Rls Rrs "); break;
- case 3 : Channels_Positions+=__T(", Back: L C R"); ChannelLayout+=__T("Rls Cs Rrs "); break;
- default : Channels_Positions+=__T(", Back: "); Channels_Positions+=Ztring::ToZtring(Channels_Back); ChannelLayout+=__T("? "); //Which config?
- }
- switch (Channels_LFE)
- {
- case 0 : break;
- case 1 : Channels_Positions+=__T(", LFE"); ChannelLayout+=__T("LFE "); break;
- default : Channels_Positions+=__T(", LFE= "); Channels_Positions+=Ztring::ToZtring(Channels_LFE); ChannelLayout+=__T("? "); //Which config?
- }
- Channels_Positions2=Ztring::ToZtring(Channels_Front)+__T('/')
- +Ztring::ToZtring(Channels_Side)+__T('/')
- +Ztring::ToZtring(Channels_Back)
- +(Channels_LFE?__T(".1"):__T(""));
- if (!ChannelLayout.empty())
- ChannelLayout.resize(ChannelLayout.size()-1);
-
- FILLING_BEGIN();
- //Integrity test
- if (Aac_sampling_frequency[sampling_frequency_index_Temp]==0 || Channels>24) // TODO: full_2023548870.mp4 is buggy
- {
- Trusted_IsNot("sampling frequency / channels");
- Skip_BS(Data_BS_Remain(), "(Unknown frequency)");
- return;
- }
-
- if (audioObjectType==(int8u)-1)
- audioObjectType=audioObjectType_Temp;
- if (sampling_frequency_index==(int8u)-1)
- sampling_frequency_index=sampling_frequency_index_Temp;
-
- Infos_General["Comment"]=comment_field_data;
-
- Infos["Format"].From_Local("AAC");
- Infos["Format_Profile"].From_Local(Aac_Format_Profile(audioObjectType));
- Infos["Codec"].From_Local(Aac_audioObjectType(audioObjectType));
- Infos["SamplingRate"].From_Number(Aac_sampling_frequency[sampling_frequency_index]);
- Infos["Channel(s)"].From_Number(Channels);
- Infos["ChannelPositions"]=Channels_Positions;
- Infos["ChannelPositions/String2"]=Channels_Positions2;
- Infos["ChannelLayout"]=ChannelLayout;
-
- if (!Infos["Format_Settings_SBR"].empty())
- {
- Infos["Format_Profile"]=__T("HE-AAC");
- Ztring SamplingRate=Infos["SamplingRate"];
- Infos["SamplingRate"].From_Number((extension_sampling_frequency_index==(int8u)-1)?(sampling_frequency*2):extension_sampling_frequency, 10);
- if (MediaInfoLib::Config.LegacyStreamDisplay_Get())
- {
- Infos["Format_Profile"]+=__T(" / LC");
- Infos["SamplingRate"]+=__T(" / ")+SamplingRate;
- }
- Infos["Format_Settings_SBR"]=__T("Yes (Implicit)");
- Infos["Codec"]=Ztring().From_Local(Aac_audioObjectType(audioObjectType))+__T("-SBR");
- }
-
- if (!Infos["Format_Settings_PS"].empty())
- {
- Infos["Format_Profile"]=__T("HE-AACv2");
- Ztring Channels=Infos["Channel(s)"];
- Ztring ChannelPositions=Infos["ChannelPositions"];
- Ztring SamplingRate=Infos["SamplingRate"];
- Infos["Channel(s)"]=__T("2");
- Infos["ChannelPositions"]=__T("Front: L R");
- if (MediaInfoLib::Config.LegacyStreamDisplay_Get())
- {
- Infos["Format_Profile"]+=__T(" / HE-AAC / LC");
- Infos["Channel(s)"]+=__T(" / ")+Channels+__T(" / ")+Channels;
- Infos["ChannelPositions"]+=__T(" / ")+ChannelPositions+__T(" / ")+ChannelPositions;
- Infos["SamplingRate"]=Ztring().From_Number((extension_sampling_frequency_index==(int8u)-1)?(sampling_frequency*2):extension_sampling_frequency, 10)+__T(" / ")+SamplingRate;
- }
- Infos["Format_Settings_PS"]=__T("Yes (Implicit)");
- Ztring Codec=Retrieve(Stream_Audio, StreamPos_Last, Audio_Codec);
- Infos["Codec"]=Ztring().From_Local(Aac_audioObjectType(audioObjectType))+__T("-SBR-PS");
- }
- FILLING_END();
-}
-
-//***************************************************************************
-// Elements - GA bitstream
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::raw_data_block()
-{
- if (sampling_frequency_index>=13)
- {
- Trusted_IsNot("(Problem)");
- Skip_BS(Data_BS_Remain(), "(Problem)");
- return;
- }
-
- if (audioObjectType!=2)
- {
- Skip_BS(Data_BS_Remain(), "Data");
- return; //We test only AAC LC
- }
-
- //Parsing
- Element_Begin1("raw_data_block");
- int8u id_syn_ele=0, id_syn_ele_Previous;
- do
- {
- Element_Begin0();
- id_syn_ele_Previous=id_syn_ele;
- Get_S1 (3, id_syn_ele, "id_syn_ele"); Param_Info1(Aac_id_syn_ele[id_syn_ele]); Element_Name(Aac_id_syn_ele[id_syn_ele]);
- switch (id_syn_ele)
- {
- case 0x00 : single_channel_element(); break; //ID_SCE
- case 0x01 : channel_pair_element(); break; //ID_CPE
- case 0x02 : coupling_channel_element(); break; //ID_CCE
- case 0x03 : lfe_channel_element(); break; //ID_LFE
- case 0x04 : data_stream_element(); break; //ID_DSE
- case 0x05 : program_config_element(); break; //ID_PCE
- case 0x06 : fill_element(id_syn_ele_Previous); break; //ID_FIL
- case 0x07 : break; //ID_END
- default : ; //Can not happen
- }
- Element_End0();
- }
- while(Element_IsOK() && Data_BS_Remain() && id_syn_ele!=0x07); //ID_END
- if (Element_IsOK() && Data_BS_Remain()%8)
- Skip_S1(Data_BS_Remain()%8, "byte_alignment");
- Element_End0();
-
- if (sampling_frequency)
- {
- #if MEDIAINFO_TRACE
- if (FrameInfo.PTS!=(int64u)-1)
- Element_Info1(__T("PTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.PTS)/1000000)));
- if (FrameInfo.DTS!=(int64u)-1)
- Element_Info1(__T("DTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.DTS)/1000000)));
- #endif //MEDIAINFO_TRACE
- FrameInfo.DUR=float64_int64s(((float64)frame_length)*1000000000/sampling_frequency);
- FrameInfo.DTS+=FrameInfo.DUR;
- FrameInfo.PTS=FrameInfo.DTS;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::single_channel_element()
-{
- //Parsing
- Skip_S1 (4, "element_instance_tag");
- individual_channel_stream(false, false);
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::channel_pair_element()
-{
- //Parsing
- Skip_S1(4, "element_instance_tag");
- Get_SB (common_window, "common_window");
- if (common_window)
- {
- int8u ms_mask_present;
- ics_info();
- Get_S1(2, ms_mask_present, "ms_mask_present");
- if (ms_mask_present==1)
- {
- Element_Begin1("ms_mask");
- for (int8u g=0; g<num_window_groups; g++)
- {
- Element_Begin1("window");
- for (int8u sfb=0; sfb<max_sfb; sfb++)
- Skip_SB( "ms_used[g][sfb]");
- Element_End0();
- }
- Element_End0();
- }
- }
- individual_channel_stream(common_window, false);
- if (!Element_IsOK())
- return;
- individual_channel_stream(common_window, false);
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::ics_info()
-{
- //Parsing
- Element_Begin1("ics_info");
- Skip_SB( "ics_reserved_bit");
- Get_S1 (2, window_sequence, "window_sequence"); Param_Info1(Aac_window_sequence[window_sequence]);
- Skip_SB( "window_shape");
- if (window_sequence==2) //EIGHT_SHORT_SEQUENCE
- {
- Get_S1 (4, max_sfb, "max_sfb");
- Get_S1 (7, scale_factor_grouping, "scale_factor_grouping");
- }
- else
- {
- bool predictor_data_present;
- Get_S1 (6, max_sfb, "max_sfb");
- Get_SB ( predictor_data_present, "predictor_data_present");
- if (predictor_data_present)
- {
- if (audioObjectType==1) //AAC Main
- {
- bool predictor_reset;
- Get_SB (predictor_reset, "predictor_reset");
- if (predictor_reset)
- Skip_S1(5, "predictor_reset_group_number");
- int8u PRED_SFB_MAX=max_sfb;
- if (PRED_SFB_MAX>Aac_PRED_SFB_MAX[sampling_frequency_index])
- PRED_SFB_MAX=Aac_PRED_SFB_MAX[sampling_frequency_index];
- for (int8u sfb=0; sfb<PRED_SFB_MAX; sfb++)
- Skip_SB( "prediction_used[sfb]");
- }
- else
- {
- bool ltp_data_present;
- Get_SB (ltp_data_present, "ltp_data_present");
- if (ltp_data_present)
- ltp_data();
- if (common_window)
- {
- Get_SB (ltp_data_present, "ltp_data_present");
- if (ltp_data_present)
- ltp_data();
- }
- }
- }
- }
- Element_End0();
-
- //Calculation of windows
- switch (window_sequence)
- {
- case 0 : //ONLY_LONG_SEQUENCE
- case 1 : //LONG_START_SEQUENCE
- case 3 : //LONG_STOP_SEQUENCE
- num_windows=1;
- num_window_groups=1;
- window_group_length[0]=1;
- num_swb=Aac_swb_offset_long_window[sampling_frequency_index]->num_swb;
- for (int8u i=0; i<num_swb+1; i++)
- {
- if (Aac_swb_offset_long_window[sampling_frequency_index]->swb_offset[i]<frame_length)
- swb_offset[i]=Aac_swb_offset_long_window[sampling_frequency_index]->swb_offset[i];
- else
- swb_offset[i]=frame_length;
- sect_sfb_offset[0][i]=swb_offset[i];
- }
- break;
- case 2 : //EIGHT_SHORT_SEQUENCE
- num_windows=8;
- num_window_groups=1;
- window_group_length[0]=1;
- num_swb=Aac_swb_offset_short_window[sampling_frequency_index]->num_swb;
- for (int8u i=0; i<num_swb + 1; i++)
- swb_offset[i] = Aac_swb_offset_short_window[sampling_frequency_index]->swb_offset[i];
- swb_offset[num_swb] = frame_length/8;
- for (int8u i=0; i<num_windows-1; i++)
- {
- if (!(scale_factor_grouping&(1<<(6-i))))
- {
- num_window_groups++;
- window_group_length[num_window_groups-1]=1;
- }
- else
- window_group_length[num_window_groups-1]++;
- }
- for (int g = 0; g < num_window_groups; g++)
- {
- int8u sect_sfb = 0;
- int16u offset = 0;
- for (int8u i=0; i<num_swb; i++)
- {
- int16u width = Aac_swb_offset_short_window[sampling_frequency_index]->swb_offset[i+1] - Aac_swb_offset_short_window[sampling_frequency_index]->swb_offset[i];
- width *= window_group_length[g];
- sect_sfb_offset[g][sect_sfb++] = offset;
- offset += width;
- }
- sect_sfb_offset[g][sect_sfb] = offset;
- }
- break;
- default: ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::pulse_data()
-{
- //Parsing
- int8u number_pulse;
- Get_S1(2,number_pulse, "number_pulse");
- Skip_S1(6, "pulse_start_sfb");
- for (int i = 0; i < number_pulse+1; i++)
- {
- Skip_S1(5, "pulse_offset[i]");
- Skip_S1(4, "pulse_amp[i]");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::coupling_channel_element()
-{
- //Parsing
- int8u num_coupled_elements;
- bool ind_sw_cce_flag;
- Skip_S1(4, "element_instance_tag");
- Get_SB ( ind_sw_cce_flag, "ind_sw_cce_flag");
- Get_S1 (3, num_coupled_elements, "num_coupled_elements");
- size_t num_gain_element_lists=0;
- for (int8u c=0; c<num_coupled_elements+1; c++)
- {
- num_gain_element_lists++;
- bool cc_target_is_cpe;
- Get_SB ( cc_target_is_cpe, "cc_target_is_cpe[c]");
- Skip_S1(4, "cc_target_tag_select[c]");
- if (cc_target_is_cpe)
- {
- bool cc_l, cc_r;
- Get_SB (cc_l, "cc_l[c]");
- Get_SB (cc_r, "cc_r[c]");
- if (cc_l && cc_r)
- num_gain_element_lists++;
- }
- }
- Skip_SB( "cc_domain");
- Skip_SB( "gain_element_sign");
- Skip_S1(2, "gain_element_scale");
- individual_channel_stream(false, false);
- if (!Element_IsOK())
- return;
- bool cge;
- for (size_t c=1; c<num_gain_element_lists; c++)
- {
- if (ind_sw_cce_flag)
- cge = true;
- else
- Get_SB (cge, "common_gain_element_present[c]");
- if (cge)
- hcod_sf( "hcod_sf[common_gain_element[c]]");
- else
- {
- for (int g = 0; g < num_window_groups; g++)
- {
- for (int sfb=0; sfb<max_sfb; sfb++)
- {
- if (sfb_cb[g][sfb]) //Not ZERO_HCB
- hcod_sf( "hcod_sf[dpcm_gain_element[c][g][sfb]]");
- }
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::lfe_channel_element()
-{
- Skip_S1(4, "element_instance_tag");
- individual_channel_stream(false, false);
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::data_stream_element()
-{
- bool data_byte_align_flag;
- int16u cnt;
- int8u count;
- Skip_S1(4, "element_instance_tag");
- Get_SB ( data_byte_align_flag, "data_byte_align_flag");
- Get_S1 (8, count, "count");
- cnt=count;
- if (cnt==255)
- {
- Get_S1(8, count, "esc_count");
- cnt+=count;
- }
- if (data_byte_align_flag)
- {
- if (Data_BS_Remain()%8)
- Skip_S1(Data_BS_Remain()%8, "byte_alignment");
- }
- Element_Begin1("data_stream_byte[element_instance_tag]");
- for (int16u i=0; i<cnt; i++)
- Skip_S1(8, "[i]");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::fill_element(int8u id_syn_ele)
-{
- //Parsing
- int8u count;
- Get_S1 (4, count, "count");
- size_t cnt=count;
- if (count==15)
- {
- int8u esc_count;
- Get_S1 (8, esc_count, "esc_count");
- cnt+=esc_count-1;
- }
- if (cnt)
- {
- if (Data_BS_Remain()>=8*cnt)
- {
- size_t End=Data_BS_Remain()-8*cnt;
- extension_payload(End, id_syn_ele);
- }
- else
- Skip_BS(Data_BS_Remain(), "(Error)");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::gain_control_data()
-{
- int8u max_band, adjust_num, aloc_bits, aloc_bits0;
- int8u wd_max=0;
- switch(window_sequence)
- {
- case 0 : //ONLY_LONG_SEQUENCE
- wd_max = 1;
- aloc_bits0 = 5;
- aloc_bits = 5;
- break;
- case 1 : //LONG_START_SEQUENCE
- wd_max = 2;
- aloc_bits0 = 4;
- aloc_bits = 2;
- break;
- case 2 : //EIGHT_SHORT_SEQUENCE
- wd_max = 8;
- aloc_bits0 = 2;
- aloc_bits = 2;
- break;
- case 3 : //LONG_STOP_SEQUENCE
- wd_max = 2;
- aloc_bits0 = 4;
- aloc_bits = 5;
- break;
- default: return; //Never happens but makes compiler happy
- }
- Get_S1 (2, max_band, "max_band");
- for (int8u bd=1; bd<=max_band; bd++)
- {
- for (int8u wd=0; wd<wd_max; wd++)
- {
- Get_S1(3, adjust_num, "adjust_num[bd][wd]");
- for (int8u ad=0; ad<adjust_num; ad++)
- {
- Skip_S1(4, "alevcode[bd][wd][ad]");
- Skip_S1(wd==0?aloc_bits0:aloc_bits, "aloccode[bd][wd][ad]");
- }
- }
- }
-}
-
-//***************************************************************************
-// Elements - Subsidiary
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::individual_channel_stream (bool common_window, bool scale_flag)
-{
- Element_Begin1("individual_channel_stream");
- Skip_S1(8, "global_gain");
- if (!common_window && !scale_flag)
- ics_info();
- if (!Element_IsOK())
- {
- Element_End0();
- return;
- }
- section_data();
- if (!Element_IsOK())
- {
- Element_End0();
- return;
- }
- scale_factor_data();
- if (!Element_IsOK())
- {
- Element_End0();
- return;
- }
- if (!scale_flag)
- {
- bool pulse_data_present;
- Get_SB (pulse_data_present, "pulse_data_present");
- if (pulse_data_present)
- pulse_data ();
- bool tns_data_present;
- Get_SB(tns_data_present, "tns_data_present");
- if (tns_data_present)
- tns_data ();
- bool gain_control_data_present;
- Get_SB(gain_control_data_present, "gain_control_data_present");
- if (gain_control_data_present)
- gain_control_data ();
- }
- if (!aacSpectralDataResilienceFlag)
- spectral_data ();
- else
- {
- Skip_BS(Data_BS_Remain(), "Not implemented");
- //~ length_of_reordered_spectral_data;
- //~ length_of_longest_codeword;
- //~ reordered_spectral_data ();
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::section_data()
-{
- Element_Begin1("section_data");
- int8u sect_esc_val;
- if (window_sequence==2) //EIGHT_SHORT_SEQUENCE
- sect_esc_val=(1<<3)-1;
- else
- sect_esc_val=(1<<5)-1;
- for (int8u g=0; g<num_window_groups; g++)
- {
- if (num_window_groups>1)
- Element_Begin1("windows");
- int8u k=0;
- int8u i=0;
- while (k<max_sfb)
- {
- if (aacSectionDataResilienceFlag)
- Get_S1(5, sect_cb[g][i], "sect_cb[g][i]");
- else
- Get_S1(4, sect_cb[g][i], "sect_cb[g][i]");
- int8u sect_len=0;
- int8u sect_len_incr;
- if (!aacSectionDataResilienceFlag || sect_cb[g][i]<11 || (sect_cb[g][i]>11 && sect_cb[g][i]<16))
- {
- for (;;)
- {
- if (Data_BS_Remain()==0)
- {
- Trusted_IsNot("Size is wrong");
- if (num_window_groups>1)
- Element_End0();
- Element_End0();
- return; //Error
- }
- Get_S1 ((window_sequence==2?3:5), sect_len_incr, "sect_len_incr"); // (window_sequence == EIGHT_SHORT_SEQUENCE) => 3
- if (sect_len_incr!=sect_esc_val)
- break;
- sect_len+=sect_esc_val;
- }
- }
- else
- sect_len_incr=1;
- sect_len+=sect_len_incr;
- sect_start[g][i]=k;
- sect_end[g][i]=k+sect_len;
- for (int16u sfb=k; sfb<k+sect_len; sfb++)
- sfb_cb[g][sfb]=sect_cb[g][i];
- k+= sect_len;
- i++;
- if (i>64)
- {
- Trusted_IsNot("Increment is wrong");
- if (num_window_groups>1)
- Element_End0();
- Element_End0();
- return; //Error
- }
- }
- num_sec[g]=i;
- if (num_window_groups>1)
- Element_End0();
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::scale_factor_data()
-{
- Element_Begin1("scale_factor_data");
- if (!aacScalefactorDataResilienceFlag)
- {
- bool noise_pcm_flag=true;
- for (int g=0; g<num_window_groups; g++)
- {
- for (int8u sfb=0; sfb<max_sfb; sfb++)
- {
- if (sfb_cb[g][sfb]) //Not ZERO_HCB
- {
- if (is_intensity( g, sfb))
- hcod_sf( "hcod_sf[dpcm_is_position[g][sfb]]");
- else
- {
- if (is_noise(g, sfb))
- {
- if (noise_pcm_flag)
- {
- noise_pcm_flag = 0;
- Skip_S2(9, "dpcm_noise_nrg[g][sfb]");
- }
- else
- hcod_sf( "hcod_sf[dpcm_noise_nrg[g][sfb]]");
- }
- else
- hcod_sf( "hcod_sf[dpcm_sf[g][sfb]]");
- }
- }
- }
- }
- }
- else
- {
- //scale_factor_data - part not implemented
- Skip_BS(Data_BS_Remain(), "Not implemented");
- //~ intensity_used = 0;
- //~ noise_used = 0;
- //~ sf_concealment;
- //~ rev_global_gain;
- //~ length_of_rvlc_sf;
- //~ for ( g = 0; g < num_window_groups; g++ ) {
- //~ for ( sfb=0; sfb < max_sfb; sfb++ ) {
- //~ if ( sfb_cb[g][sfb] ) { //Not ZERO_HCB
- //~ if ( is_intensity ( g, sfb) ) {
- //~ intensity_used = 1;
- //~ rvlc_cod_sf[dpcm_is_position[g][sfb]];
- //~ } else {
- //~ if ( is_noise(g,sfb) ) {
- //~ if ( ! noise_used ) {
- //~ noise_used = 1;
- //~ dpcm_noise_nrg[g][sfb];
- //~ } else {
- //~ rvlc_cod_sf[dpcm_noise_nrg[g][sfb]];
- //~ }
- //~ } else {
- //~ rvlc_cod_sf[dpcm_sf[g][sfb]];
- //~ }
- //~ }
- //~ }
- //~ }
- //~ }
- //~ if ( intensity_used ) {
- //~ rvlc_cod_sf[dpcm_is_last_position];
- //~ }
- //~ noise_used = 0;
- //~ sf_escapes_present;
- //~ if ( sf_escapes_present ) {
- //~ length_of_rvlc_escapes;
- //~ for ( g = 0; g < num_window_groups; g++ ) {
- //~ for ( sfb = 0; sfb < max_sfb; sfb++ ) {
- //~ if ( sfb_cb[g][sfb]) { //Not ZERO_HCB
- //~ if ( is_intensity ( g, sfb ) && dpcm_is_position[g][sfb] == ESC_FLAG ) {
- //~ rvlc_esc_sf[dpcm_is_position[g][sfb]];
- //~ } else {
- //~ if ( is_noise ( g, sfb ) {
- //~ if ( ! noise_used ) {
- //~ noise_used = 1;
- //~ } else {
- //~ if (dpcm_noise_nrg[g][sfb] == ESC_FLAG ) {
- //~ rvlc_esc_sf[dpcm_noise_nrg[g][sfb]];
- //~ }
- //~ }
- //~ } else {
- //~ if (dpcm_sf[g][sfb] == ESC_FLAG ) {
- //~ rvlc_esc_sf[dpcm_sf[g][sfb]];
- //~ }
- //~ }
- //~ }
- //~ }
- //~ }
- //~ }
- //~ if ( intensity_used && dpcm_is_last_position == ESC_FLAG ) {
- //~ rvlc_esc_sf[dpcm_is_last_position];
- //~ }
- //~ }
- //~ if ( noise_used ) {
- //~ dpcm_noise_last_position;
- //~ }
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::tns_data()
-{
- int8u n_filt_bits=2;
- int8u length_bits=6;
- int8u order_bits=5;
-
- if (window_sequence==2) //EIGHT_SHORT_SEQUENCE
- {
- n_filt_bits=1;
- length_bits=4;
- order_bits=3;
- }
-
- for (int8u w=0; w<num_windows; w++)
- {
- int8u start_coef_bits, n_filt;
- Get_S1(n_filt_bits, n_filt, "n_filt[w]");
- if (n_filt)
- {
- bool coef_res;
- Get_SB (coef_res, "coef_res[w]");
- start_coef_bits=coef_res?4:3;
-
- for (int8u filt=0; filt<n_filt; filt++)
- {
- int8u order;
- Skip_S1(length_bits, "length[w][filt]");
- Get_S1 (order_bits, order, "order[w][filt]");
- if (order)
- {
- bool coef_compress;
- Skip_SB( "direction[w][filt]");
- Get_SB (coef_compress, "coef_compress[w][filt]");
- int8u coef_bits=start_coef_bits-(coef_compress?1:0);
- for (int8u i=0; i<order; i++)
- Skip_S1(coef_bits, "coef[w][filt][i]");
- }
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::ltp_data()
-{
- Element_Begin1("ltp_data");
- //int sfb;
- //bool ltp_lag_update;
- //if (AudioObjectType == ER_AAC_LD ) {
- //~ Get_SB(ltp_lag_update,"ltp_lag_update");
- //~ if ( ltp_lag_update ) {
- //~ Get_S2(10,ltp_lag,"ltp_lag");
- //~ } else {
- //~ //ltp_lag = ltp_prev_lag;
- //~ }
- //~ Skip_S1(3,"ltp_coef");
- //~ for (sfb = 0; sfb <(max_sfb<MAX_LTP_LONG_SFB?max_sfb:MAX_LTP_LONG_SFB);& sfb++ ) {
- //~ Skip_SB("ltp_long_used[sfb]");
- //~ }
- //} else {
- Get_S2(11,ltp_lag, "ltp_lag");
- Skip_S1(3, "ltp_coef");
- if(window_sequence!=2) //EIGHT_SHORT_SEQUENCE
- {
- for (int8u sfb=0; sfb<(max_sfb<40?max_sfb:40); sfb++ ) //MAX_LTP_LONG_SFB=40
- Skip_SB("ltp_long_used[sfb]");
- }
- //}
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::spectral_data()
-{
- Element_Begin1("spectral_data");
- for (int g = 0; g < num_window_groups; g++)
- {
- if (num_window_groups>1)
- Element_Begin1("windows");
- for (int8u i=0; i<num_sec[g]; i++)
- {
- switch (sect_cb[g][i])
- {
- case 0 : //ZERO_HCB
- case 13 : //NOISE_HCB
- case 14 : //INTENSITY_HCB2
- case 15 : //INTENSITY_HCB
- break;
- default :
- if (sect_end[g][i]>=num_swb+1)
- {
- Trusted_IsNot("(Problem)");
- Skip_BS(Data_BS_Remain(), "(Problem)");
- if (num_window_groups>1)
- Element_End0();
- Element_End0();
- return;
- }
- for (int16u k=sect_sfb_offset[g][sect_start[g][i]]; k<sect_sfb_offset[g][sect_end[g][i]]; k+=(sect_cb[g][i]<5?4:2))
- {
- hcod(sect_cb[g][i], "sect_cb");
- if (!Element_IsOK())
- {
- Skip_BS(Data_BS_Remain(), "(Problem)");
- if (num_window_groups>1)
- Element_End0();
- Element_End0();
- return;
- }
- }
- }
- }
- if (num_window_groups>1)
- Element_End0();
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::extension_payload(size_t End, int8u id_aac)
-{
- Element_Begin1("extension_payload");
- int8u extension_type;
- Get_S1 (4, extension_type, "extension_type");
- switch(extension_type)
- {
- case 11 : dynamic_range_info(); break; //EXT_DYNAMIC_RANGE
- case 12 : sac_extension_data(End); break; //EXT_SAC_DATA
- case 13 : sbr_extension_data(End, id_aac, 0); break; //EXT_SBR_DATA
- case 14 : sbr_extension_data(End, id_aac, 1); break; //EXT_SBR_DATA_CRC
- case 1 : //EXT_FILL_DATA
- Skip_S1(4, "fill_nibble"); Param_Info1("must be 0000");
- if (Data_BS_Remain()>End)
- {
- Element_Begin1("fill_byte");
- while (Data_BS_Remain()>End)
- Skip_S1(8, "fill_byte[i]"); Param_Info1("must be 10100101");
- Element_End0();
- }
- break;
- case 2 : //EXT_DATA_ELEMENT
- int8u data_element_version;
- Get_S1 (4,data_element_version, "data_element_version");
- switch(data_element_version)
- {
- case 0 : //ANC_DATA
- {
- int16u dataElementLength=0;
- int8u dataElementLengthPart;
- do
- {
- Get_S1 (8, dataElementLengthPart, "dataElementLengthPart");
- dataElementLength+=dataElementLengthPart;
- }
- while (dataElementLengthPart==255);
- Skip_BS(8*dataElementLength, "data_element_byte[i]");
- }
- break;
- default: ;
- }
- break;
- case 0 : //EXT_FILL
- default:
- Skip_BS(Data_BS_Remain()-End, "other_bits");
- }
-
- Element_End0();
- if (End<Data_BS_Remain())
- Skip_BS(Data_BS_Remain()-End, "padding");
- if (Data_BS_Remain()!=End)
- {
- Skip_BS(Data_BS_Remain(), "Wrong size");
- Trusted_IsNot("Wrong size");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::dynamic_range_info()
-{
- Element_Begin1("dynamic_range_info");
- int8u drc_num_bands=1;
- bool present;
- Get_SB (present, "pce_tag_present");
- if (present)
- {
- Skip_S1(4, "pce_ instance_tag");
- Skip_S1(4, "drc_tag_reserved_bits");
- }
- Skip_SB( "excluded_chns_present");
- Get_SB (present, "drc_bands_present");
- if (present)
- {
- int8u drc_band_incr;
- Get_S1 (4, drc_band_incr, "drc_band_incr");
- Skip_S1(4, "drc_interpolation_scheme");
- drc_num_bands+=drc_band_incr;
- for (int8u i=0; i<drc_num_bands; i++)
- {
- Skip_S1(8, "drc_band_top[i]");
- }
- }
- Get_SB (present, "prog_ref_level_present");
- if (present)
- {
- Skip_S1(7, "prog_ref_level");
- Skip_S1(1, "prog_ref_level_reserved_bits");
- }
- for (int8u i=0; i<drc_num_bands; i++)
- {
- Skip_S1(1, "dyn_rng_sgn[i]");
- Skip_S1(7, "dyn_rng_ctl[i]");
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::sac_extension_data(size_t End)
-{
- Element_Begin1("sac_extension_data");
- Skip_S1(2, "ancType");
- Skip_SB( "ancStart");
- Skip_SB( "ancStop");
- Element_Begin1("ancDataSegmentByte");
- while (Data_BS_Remain()>End)
- Skip_S1(8, "ancDataSegmentByte[i]");
- Element_End0();
- Element_End0();
-}
-
-//***************************************************************************
-// Elements - Perceptual noise substitution (PNS)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-int File_Aac::is_intensity(size_t group, size_t sfb)
-{
- switch (sfb_cb[group][sfb])
- {
- case 14 : return 1;
- case 15 : return -1;
- default : return 0;
- }
-}
-
-//---------------------------------------------------------------------------
-bool File_Aac::is_noise(size_t group, size_t sfb)
-{
- return (sfb_cb[group][sfb]==13);
-}
-//---------------------------------------------------------------------------
-void File_Aac::hcod_sf(const char* Name)
-{
- Element_Begin1(Name);
- int16u Pos=0;
-
- while (huffman_sf[Pos][1])
- {
- bool h;
- Get_SB (h, "huffman");
- Pos+=huffman_sf[Pos][h];
-
- if (Pos>240)
- {
- Skip_BS(Data_BS_Remain(), "Error");
- Element_End0();
- return;
- }
- }
- Element_Info1(huffman_sf[Pos][0]-60);
- Element_End0();
-
- return;
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::hcod_2step(int8u CodeBook, int8s* Values, int8u Values_Count)
-{
- int8u CodeWord;
- int8u ToRead=hcb_2step_Bytes[CodeBook];
- if ((size_t)ToRead>Data_BS_Remain())
- ToRead=(int8u)Data_BS_Remain(); //Read a maximum of remaining bytes
- Peek_S1(ToRead, CodeWord);
- int16u Offset=hcb_2step[CodeBook][CodeWord].Offset;
- int8u Extra=hcb_2step[CodeBook][CodeWord].Extra;
-
- if (Extra)
- {
- Skip_BS(hcb_2step_Bytes[CodeBook], "extra");
- int8u Offset_inc;
- Peek_S1(Extra, Offset_inc);
- Offset+=Offset_inc;
- if(hcb_table[CodeBook][Offset][0]-hcb_2step_Bytes[CodeBook])
- Skip_BS(hcb_table[CodeBook][Offset][0]-hcb_2step_Bytes[CodeBook],"extra");
- }
- else
- {
- Skip_BS(hcb_table[CodeBook][Offset][0], "bits");
- }
-
- if (Offset>=hcb_table_size[CodeBook])
- {
- Skip_BS(Data_BS_Remain(), "Error");
- return;
- }
-
- for (int8u Pos=0; Pos<Values_Count; Pos++)
- Values[Pos]=hcb_table[CodeBook][Offset][Pos+1];
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::hcod_binary(int8u CodeBook, int8s* Values, int8u Values_Count)
-{
- int16u Offset=0;
- while (!hcb_table[CodeBook][Offset][0])
- {
- bool b;
- Get_SB(b, "huffman binary");
- Offset+=hcb_table[CodeBook][Offset][1+(b?1:0)];
- }
-
- if (Offset>=hcb_table_size[CodeBook])
- {
- Skip_BS(Data_BS_Remain(), "Error");
- return;
- }
-
- for (int8u Pos=0; Pos<Values_Count; Pos++)
- Values[Pos]=hcb_table[CodeBook][Offset][Pos+1];
-}
-
-
-
-//***************************************************************************
-// Elements - Enhanced Low Delay Codec
-//***************************************************************************
-
-
-//---------------------------------------------------------------------------
-void File_Aac::ELDSpecificConfig ()
-{
- Element_Begin1("ELDSpecificConfig");
- Skip_SB("frameLengthFlag");
- Skip_SB("aacSectionDataResilienceFlag");
- Skip_SB("aacScalefactorDataResilienceFlag");
- Skip_SB("aacSpectralDataResilienceFlag");
-
- bool ldSbrPresentFlag;
- Get_SB(ldSbrPresentFlag,"ldSbrPresentFlag");
- if (ldSbrPresentFlag)
- {
- Skip_SB("ldSbrSamplingRate");
- Skip_SB("ldSbrCrcFlag");
- ld_sbr_header();
- }
-
- int8u eldExtType;
- for (;;)
- {
- Get_S1(4,eldExtType,"eldExtType");
- if (eldExtType == 0/*ELDEXT_TERM*/)
- break;
-
- int8u eldExtLen,eldExtLenAdd=0;
- int16u eldExtLenAddAdd;
- Get_S1(4,eldExtLen,"eldExtLen");
- int32u len = eldExtLen;
- if (eldExtLen == 15)
- {
- Get_S1(8,eldExtLenAdd,"eldExtLenAdd");
- len += eldExtLenAdd;
- }
- if (eldExtLenAdd==255)
- {
- Get_S2(16,eldExtLenAddAdd,"eldExtLenAddAdd");
- len += eldExtLenAdd;
- }
- //~ switch (eldExtType) {
- /* add future eld extension configs here */
- //~ default:
- for(int32u cnt=0; cnt<len; cnt++)
- Skip_S1(8,"other_byte");
- //~ break;
- //~ }
-
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::ld_sbr_header()
-{
- int8u numSbrHeader;
- switch (channelConfiguration)
- {
- case 1:
- case 2:
- numSbrHeader = 1;
- break;
- case 3:
- numSbrHeader = 2;
- break;
- case 4:
- case 5:
- case 6:
- numSbrHeader = 3;
- break;
- case 7:
- numSbrHeader = 4;
- break;
- default:
- numSbrHeader = 0;
- break;
- }
-
- for (int el=0; el<numSbrHeader; el++) {
- //~ sbr_header();
- Element_Begin1("not implemented");
- Element_End0();
- }
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::hcod(int8u sect_cb, const char* Name)
-{
- int8s Values[4];
-
- Element_Begin1(Name);
- switch (sect_cb)
- {
- case 1 :
- case 2 :
- case 4 : //4-values, 2-step method
- hcod_2step(sect_cb, Values, 4);
- break;
- case 3 : //4-values, binary search method
- hcod_binary(sect_cb, Values, 4);
- break;
- case 5 :
- case 7 :
- case 9 : //2-values, binary search method
- hcod_binary(sect_cb, Values, 2);
- break;
- case 6 :
- case 8 :
- case 10 :
- case 11 : //2-values, 2-step method
- hcod_2step(sect_cb, Values, 2);
- break;
- default: Trusted_IsNot("(Problem)");
- Element_End0();
- return;
- }
-
- switch (sect_cb)
- {
- case 1 :
- case 2 :
- case 5 :
- case 6 :
- break;
- default : //With sign
- for(int i=0; i<((sect_cb<5)?4:2); i++)
- if(Values[i])
- Skip_SB( "sign");
- }
-
- switch (sect_cb)
- {
- case 11 : //With hcod_esc
- for (int i=0; i<2; i++)
- if (Values[i]==16 || Values[i] == -16)
- {
- Element_Begin1("hcod_esc");
- bool Escape;
- int BitCount=3;
- do
- {
- BitCount++;
- Get_SB(Escape, "bit count");
- }
- while (Escape);
-
-
- Skip_BS(BitCount, "value");
- Element_End0();
-
- }
- break;
- default: ;
- }
-
- Element_End0();
-}
-
-
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_AAC_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio.h
deleted file mode 100644
index 66efff705..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio.h
+++ /dev/null
@@ -1,2837 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Aac_GeneralAudioH
-#define MediaInfo_File_Aac_GeneralAudioH
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Huffman tables
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Optimal huffman from:
-// "SELECTING AN OPTIMAL HUFFMAN DECODER FOR AAC"
-// VLADIMIR Z. MESAROVIC , RAGHUNATH RAO, MIROSLAV V. DOKIC, and SACHIN DEO
-// AES Convention Paper 5436
-
-//---------------------------------------------------------------------------
-//2-step 1st pass
-struct hcb_struct_1
-{
- int8u Offset;
- int8u Extra;
-};
-
-//2-step 2nd pass or binary
-typedef int8s hcb_struct[5]; //0=bits to read (2step) or more to read (binary), 1-4: data (1-2 in case of pairs)
-
-//---------------------------------------------------------------------------
-// Scalefactor Huffman Codebook
-static int8u huffman_sf[241][2]=
-{
- { 1, 2 },
- { 60, 0 },
- { 1, 2 },
- { 2, 3 },
- { 3, 4 },
- { 59, 0 },
- { 3, 4 },
- { 4, 5 },
- { 5, 6 },
- { 61, 0 },
- { 58, 0 },
- { 62, 0 },
- { 3, 4 },
- { 4, 5 },
- { 5, 6 },
- { 57, 0 },
- { 63, 0 },
- { 4, 5 },
- { 5, 6 },
- { 6, 7 },
- { 7, 8 },
- { 56, 0 },
- { 64, 0 },
- { 55, 0 },
- { 65, 0 },
- { 4, 5 },
- { 5, 6 },
- { 6, 7 },
- { 7, 8 },
- { 66, 0 },
- { 54, 0 },
- { 67, 0 },
- { 5, 6 },
- { 6, 7 },
- { 7, 8 },
- { 8, 9 },
- { 9, 10 },
- { 53, 0 },
- { 68, 0 },
- { 52, 0 },
- { 69, 0 },
- { 51, 0 },
- { 5, 6 },
- { 6, 7 },
- { 7, 8 },
- { 8, 9 },
- { 9, 10 },
- { 70, 0 },
- { 50, 0 },
- { 49, 0 },
- { 71, 0 },
- { 6, 7 },
- { 7, 8 },
- { 8, 9 },
- { 9, 10 },
- { 10, 11 },
- { 11, 12 },
- { 72, 0 },
- { 48, 0 },
- { 73, 0 },
- { 47, 0 },
- { 74, 0 },
- { 46, 0 },
- { 6, 7 },
- { 7, 8 },
- { 8, 9 },
- { 9, 10 },
- { 10, 11 },
- { 11, 12 },
- { 76, 0 },
- { 75, 0 },
- { 77, 0 },
- { 78, 0 },
- { 45, 0 },
- { 43, 0 },
- { 6, 7 },
- { 7, 8 },
- { 8, 9 },
- { 9, 10 },
- { 10, 11 },
- { 11, 12 },
- { 44, 0 },
- { 79, 0 },
- { 42, 0 },
- { 41, 0 },
- { 80, 0 },
- { 40, 0 },
- { 6, 7 },
- { 7, 8 },
- { 8, 9 },
- { 9, 10 },
- { 10, 11 },
- { 11, 12 },
- { 81, 0 },
- { 39, 0 },
- { 82, 0 },
- { 38, 0 },
- { 83, 0 },
- { 7, 8 },
- { 8, 9 },
- { 9, 10 },
- { 10, 11 },
- { 11, 12 },
- { 12, 13 },
- { 13, 14 },
- { 37, 0 },
- { 35, 0 },
- { 85, 0 },
- { 33, 0 },
- { 36, 0 },
- { 34, 0 },
- { 84, 0 },
- { 32, 0 },
- { 6, 7 },
- { 7, 8 },
- { 8, 9 },
- { 9, 10 },
- { 10, 11 },
- { 11, 12 },
- { 87, 0 },
- { 89, 0 },
- { 30, 0 },
- { 31, 0 },
- { 8, 9 },
- { 9, 10 },
- { 10, 11 },
- { 11, 12 },
- { 12, 13 },
- { 13, 14 },
- { 14, 15 },
- { 15, 16 },
- { 86, 0 },
- { 29, 0 },
- { 26, 0 },
- { 27, 0 },
- { 28, 0 },
- { 24, 0 },
- { 88, 0 },
- { 9, 10 },
- { 10, 11 },
- { 11, 12 },
- { 12, 13 },
- { 13, 14 },
- { 14, 15 },
- { 15, 16 },
- { 16, 17 },
- { 17, 18 },
- { 25, 0 },
- { 22, 0 },
- { 23, 0 },
- { 15, 16 },
- { 16, 17 },
- { 17, 18 },
- { 18, 19 },
- { 19, 20 },
- { 20, 21 },
- { 21, 22 },
- { 22, 23 },
- { 23, 24 },
- { 24, 25 },
- { 25, 26 },
- { 26, 27 },
- { 27, 28 },
- { 28, 29 },
- { 29, 30 },
- { 90, 0 },
- { 21, 0 },
- { 19, 0 },
- { 3, 0 },
- { 1, 0 },
- { 2, 0 },
- { 0, 0 },
- { 23, 24 },
- { 24, 25 },
- { 25, 26 },
- { 26, 27 },
- { 27, 28 },
- { 28, 29 },
- { 29, 30 },
- { 30, 31 },
- { 31, 32 },
- { 32, 33 },
- { 33, 34 },
- { 34, 35 },
- { 35, 36 },
- { 36, 37 },
- { 37, 38 },
- { 38, 39 },
- { 39, 40 },
- { 40, 41 },
- { 41, 42 },
- { 42, 43 },
- { 43, 44 },
- { 44, 45 },
- { 45, 46 },
- { 98, 0 },
- { 99, 0 },
- { 100, 0 },
- { 101, 0 },
- { 102, 0 },
- { 117, 0 },
- { 97, 0 },
- { 91, 0 },
- { 92, 0 },
- { 93, 0 },
- { 94, 0 },
- { 95, 0 },
- { 96, 0 },
- { 104, 0 },
- { 111, 0 },
- { 112, 0 },
- { 113, 0 },
- { 114, 0 },
- { 115, 0 },
- { 116, 0 },
- { 110, 0 },
- { 105, 0 },
- { 106, 0 },
- { 107, 0 },
- { 108, 0 },
- { 109, 0 },
- { 118, 0 },
- { 6, 0 },
- { 8, 0 },
- { 9, 0 },
- { 10, 0 },
- { 5, 0 },
- { 103, 0 },
- { 120, 0 },
- { 119, 0 },
- { 4, 0 },
- { 7, 0 },
- { 15, 0 },
- { 16, 0 },
- { 18, 0 },
- { 20, 0 },
- { 17, 0 },
- { 11, 0 },
- { 12, 0 },
- { 14, 0 },
- { 13, 0 }
-};
-
-//---------------------------------------------------------------------------
-// Spectrum Huffman Codebook 1
-static hcb_struct_1 huffman_01_1[32]=
-{
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 1, 0 },
- { 2, 0 },
- { 3, 0 },
- { 4, 0 },
- { 5, 0 },
- { 6, 0 },
- { 7, 0 },
- { 8, 0 },
- { 9, 2 },
- { 13, 2 },
- { 17, 2 },
- { 21, 2 },
- { 25, 2 },
- { 29, 2 },
- { 33, 4 },
- { 49, 6 }
-};
-
-static hcb_struct huffman_01[114]=
-{
- { 1, 0, 0, 0, 0 },
- { 5, 1, 0, 0, 0 },
- { 5, -1, 0, 0, 0 },
- { 5, 0, 0, 0, -1 },
- { 5, 0, 1, 0, 0 },
- { 5, 0, 0, 0, 1 },
- { 5, 0, 0, -1, 0 },
- { 5, 0, 0, 1, 0 },
- { 5, 0, -1, 0, 0 },
- { 7, 1, -1, 0, 0 },
- { 7, -1, 1, 0, 0 },
- { 7, 0, 0, -1, 1 },
- { 7, 0, 1, -1, 0 },
- { 7, 0, -1, 1, 0 },
- { 7, 0, 0, 1, -1 },
- { 7, 1, 1, 0, 0 },
- { 7, 0, 0, -1, -1 },
- { 7, -1, -1, 0, 0 },
- { 7, 0, -1, -1, 0 },
- { 7, 1, 0, -1, 0 },
- { 7, 0, 1, 0, -1 },
- { 7, -1, 0, 1, 0 },
- { 7, 0, 0, 1, 1 },
- { 7, 1, 0, 1, 0 },
- { 7, 0, -1, 0, 1 },
- { 7, 0, 1, 1, 0 },
- { 7, 0, 1, 0, 1 },
- { 7, -1, 0, -1, 0 },
- { 7, 1, 0, 0, 1 },
- { 7, -1, 0, 0, -1 },
- { 7, 1, 0, 0, -1 },
- { 7, -1, 0, 0, 1 },
- { 7, 0, -1, 0, -1 },
- { 9, 1, 1, -1, 0 },
- { 9, -1, 1, -1, 0 },
- { 9, 1, -1, 1, 0 },
- { 9, 0, 1, 1, -1 },
- { 9, 0, 1, -1, 1 },
- { 9, 0, -1, 1, 1 },
- { 9, 0, -1, 1, -1 },
- { 9, 1, -1, -1, 0 },
- { 9, 1, 0, -1, 1 },
- { 9, 0, 1, -1, -1 },
- { 9, -1, 1, 1, 0 },
- { 9, -1, 0, 1, -1 },
- { 9, -1, -1, 1, 0 },
- { 9, 0, -1, -1, 1 },
- { 9, 1, -1, 0, 1 },
- { 9, 1, -1, 0, -1 },
- { 9, -1, 1, 0, -1 },
- { 9, -1, 1, 0, -1 },
- { 9, -1, 1, 0, -1 },
- { 9, -1, 1, 0, -1 },
- { 9, -1, -1, -1, 0 },
- { 9, -1, -1, -1, 0 },
- { 9, -1, -1, -1, 0 },
- { 9, -1, -1, -1, 0 },
- { 9, 0, -1, -1, -1 },
- { 9, 0, -1, -1, -1 },
- { 9, 0, -1, -1, -1 },
- { 9, 0, -1, -1, -1 },
- { 9, 0, 1, 1, 1 },
- { 9, 0, 1, 1, 1 },
- { 9, 0, 1, 1, 1 },
- { 9, 0, 1, 1, 1 },
- { 9, 1, 0, 1, -1 },
- { 9, 1, 0, 1, -1 },
- { 9, 1, 0, 1, -1 },
- { 9, 1, 0, 1, -1 },
- { 9, 1, 1, 0, 1 },
- { 9, 1, 1, 0, 1 },
- { 9, 1, 1, 0, 1 },
- { 9, 1, 1, 0, 1 },
- { 9, -1, 1, 0, 1 },
- { 9, -1, 1, 0, 1 },
- { 9, -1, 1, 0, 1 },
- { 9, -1, 1, 0, 1 },
- { 9, 1, 1, 1, 0 },
- { 9, 1, 1, 1, 0 },
- { 9, 1, 1, 1, 0 },
- { 9, 1, 1, 1, 0 },
- { 10, -1, -1, 0, 1 },
- { 10, -1, -1, 0, 1 },
- { 10, -1, 0, -1, -1 },
- { 10, -1, 0, -1, -1 },
- { 10, 1, 1, 0, -1 },
- { 10, 1, 1, 0, -1 },
- { 10, 1, 0, -1, -1 },
- { 10, 1, 0, -1, -1 },
- { 10, -1, 0, -1, 1 },
- { 10, -1, 0, -1, 1 },
- { 10, -1, -1, 0, -1 },
- { 10, -1, -1, 0, -1 },
- { 10, -1, 0, 1, 1 },
- { 10, -1, 0, 1, 1 },
- { 10, 1, 0, 1, 1 },
- { 10, 1, 0, 1, 1 },
- { 11, 1, -1, 1, -1 },
- { 11, -1, 1, -1, 1 },
- { 11, -1, 1, 1, -1 },
- { 11, 1, -1, -1, 1 },
- { 11, 1, 1, 1, 1 },
- { 11, -1, -1, 1, 1 },
- { 11, 1, 1, -1, -1 },
- { 11, -1, -1, 1, -1 },
- { 11, -1, -1, -1, -1 },
- { 11, 1, 1, -1, 1 },
- { 11, 1, -1, 1, 1 },
- { 11, -1, 1, 1, 1 },
- { 11, -1, 1, -1, -1 },
- { 11, -1, -1, -1, 1 },
- { 11, 1, -1, -1, -1 },
- { 11, 1, 1, 1, -1 }
-};
-
-//---------------------------------------------------------------------------
-// Spectrum Huffman Codebook 2
-static hcb_struct_1 huffman_02_1[] =
-{
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 1, 0 },
- { 1, 0 },
- { 2, 0 },
- { 3, 0 },
- { 4, 0 },
- { 5, 0 },
- { 6, 0 },
- { 7, 0 },
- { 8, 0 },
- { 9, 1 },
- { 11, 1 },
- { 13, 1 },
- { 15, 1 },
- { 17, 1 },
- { 19, 1 },
- { 21, 1 },
- { 23, 1 },
- { 25, 1 },
- { 27, 1 },
- { 29, 1 },
- { 31, 1 },
- { 33, 2 },
- { 37, 2 },
- { 41, 2 },
- { 45, 3 },
- { 53, 3 },
- { 61, 3 },
- { 69, 4 }
-};
-
-static hcb_struct huffman_02[86]=
-{
- { 3, 0, 0, 0, 0 },
- { 4, 1, 0, 0, 0 },
- { 5, -1, 0, 0, 0 },
- { 5, 0, 0, 0, 1 },
- { 5, 0, 0, -1, 0 },
- { 5, 0, 0, 0, -1 },
- { 5, 0, -1, 0, 0 },
- { 5, 0, 0, 1, 0 },
- { 5, 0, 1, 0, 0 },
- { 6, 0, -1, 1, 0 },
- { 6, -1, 1, 0, 0 },
- { 6, 0, 1, -1, 0 },
- { 6, 0, 0, 1, -1 },
- { 6, 0, 1, 0, -1 },
- { 6, 0, 0, -1, 1 },
- { 6, -1, 0, 0, -1 },
- { 6, 1, -1, 0, 0 },
- { 6, 1, 0, -1, 0 },
- { 6, -1, -1, 0, 0 },
- { 6, 0, 0, -1, -1 },
- { 6, 1, 0, 1, 0 },
- { 6, 1, 0, 0, 1 },
- { 6, 0, -1, 0, 1 },
- { 6, -1, 0, 1, 0 },
- { 6, 0, 1, 0, 1 },
- { 6, 0, -1, -1, 0 },
- { 6, -1, 0, 0, 1 },
- { 6, 0, -1, 0, -1 },
- { 6, -1, 0, -1, 0 },
- { 6, 1, 1, 0, 0 },
- { 6, 0, 1, 1, 0 },
- { 6, 0, 0, 1, 1 },
- { 6, 1, 0, 0, -1 },
- { 7, 0, 1, -1, 1 },
- { 7, 1, 0, -1, 1 },
- { 7, -1, 1, -1, 0 },
- { 7, 0, -1, 1, -1 },
- { 7, 1, -1, 1, 0 },
- { 7, 1, 1, 0, -1 },
- { 7, 1, 0, 1, 1 },
- { 7, -1, 1, 1, 0 },
- { 7, 0, -1, -1, 1 },
- { 7, 1, 1, 1, 0 },
- { 7, -1, 0, 1, -1 },
- { 7, -1, -1, -1, 0 },
- { 7, -1, 0, -1, 1 },
- { 7, -1, 0, -1, 1 },
- { 7, 1, -1, -1, 0 },
- { 7, 1, -1, -1, 0 },
- { 7, 1, 1, -1, 0 },
- { 7, 1, 1, -1, 0 },
- { 8, 1, -1, 0, 1 },
- { 8, -1, 1, 0, -1 },
- { 8, -1, -1, 1, 0 },
- { 8, -1, 0, 1, 1 },
- { 8, -1, -1, 0, 1 },
- { 8, -1, -1, 0, -1 },
- { 8, 0, -1, -1, -1 },
- { 8, 1, 0, 1, -1 },
- { 8, 1, 0, -1, -1 },
- { 8, 0, 1, -1, -1 },
- { 8, 0, 1, 1, 1 },
- { 8, -1, 1, 0, 1 },
- { 8, -1, 0, -1, -1 },
- { 8, 0, 1, 1, -1 },
- { 8, 1, -1, 0, -1 },
- { 8, 0, -1, 1, 1 },
- { 8, 1, 1, 0, 1 },
- { 8, 1, -1, 1, -1 },
- { 8, -1, 1, -1, 1 },
- { 8, -1, 1, -1, 1 },
- { 9, 1, -1, -1, 1 },
- { 9, -1, -1, -1, -1 },
- { 9, -1, 1, 1, -1 },
- { 9, -1, 1, 1, 1 },
- { 9, 1, 1, 1, 1 },
- { 9, -1, -1, 1, -1 },
- { 9, 1, -1, 1, 1 },
- { 9, -1, 1, -1, -1 },
- { 9, -1, -1, 1, 1 },
- { 9, 1, 1, -1, -1 },
- { 9, 1, -1, -1, -1 },
- { 9, -1, -1, -1, 1 },
- { 9, 1, 1, -1, 1 },
- { 9, 1, 1, 1, -1 }
-};
-
-//---------------------------------------------------------------------------
-// Spectrum Huffman Codebook 2
-static hcb_struct huffman_03[161] =
-{
- { 0, 1, 2 },
- { 1, 0, 0 },
- { 0, 1, 2 },
- { 0, 2, 3 },
- { 0, 3, 4 },
- { 0, 4, 5 },
- { 0, 5, 6 },
- { 0, 6, 7 },
- { 0, 7, 8 },
- { 1, 1, 0 },
- { 1, 0, 0, 0, 1 },
- { 1, 0, 1, 0, 0 },
- { 1, 0, 0, 1, 0 },
- { 0, 4, 5 },
- { 0, 5, 6 },
- { 0, 6, 7 },
- { 0, 7, 8 },
- { 1, 1, 1 },
- { 1, 0, 0, 1, 1 },
- { 0, 6, 7 },
- { 0, 7, 8 },
- { 0, 8, 9 },
- { 0, 9, 10 },
- { 0, 10, 11 },
- { 0, 11, 12 },
- { 1, 0, 1, 1, 0 },
- { 1, 0, 1, 0, 1 },
- { 1, 1, 0, 1, 0 },
- { 1, 0, 1, 1, 1 },
- { 1, 1, 0, 0, 1 },
- { 1, 1, 1, 1, 0 },
- { 0, 6, 7 },
- { 0, 7, 8 },
- { 0, 8, 9 },
- { 0, 9, 10 },
- { 0, 10, 11 },
- { 0, 11, 12 },
- { 1, 1, 1, 1, 1 },
- { 1, 1, 0, 1, 1 },
- { 1, 1, 1, 0, 1 },
- { 0, 9, 10 },
- { 0, 10, 11 },
- { 0, 11, 12 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 0, 16, 17 },
- { 0, 17, 18 },
- { 1, 2, 0, 0, 0 },
- { 1, 0, 0, 0, 2 },
- { 1, 0, 0, 1, 2 },
- { 1, 2, 1, 0, 0 },
- { 1, 1, 2, 1, 0 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 0, 16, 17 },
- { 0, 17, 18 },
- { 0, 18, 19 },
- { 0, 19, 20 },
- { 0, 20, 21 },
- { 0, 21, 22 },
- { 0, 22, 23 },
- { 0, 23, 24 },
- { 0, 24, 25 },
- { 0, 25, 26 },
- { 1, 0, 0, 2, 1 },
- { 1, 0, 1, 2, 1 },
- { 1, 1, 2, 0, 0 },
- { 1, 0, 1, 1, 2 },
- { 1, 2, 1, 1, 0 },
- { 1, 0, 0, 2, 0 },
- { 1, 0, 2, 1, 0 },
- { 1, 0, 1, 2, 0 },
- { 1, 0, 2, 0, 0 },
- { 1, 0, 1, 0, 2 },
- { 1, 2, 0, 1, 0 },
- { 1, 1, 2, 1, 1 },
- { 1, 0, 2, 1, 1 },
- { 1, 1, 1, 2, 0 },
- { 1, 1, 1, 2, 1 },
- { 0, 11, 12 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 0, 16, 17 },
- { 0, 17, 18 },
- { 0, 18, 19 },
- { 0, 19, 20 },
- { 0, 20, 21 },
- { 0, 21, 22 },
- { 1, 1, 2, 0, 1 },
- { 1, 1, 0, 2, 0 },
- { 1, 1, 0, 2, 1 },
- { 1, 0, 2, 0, 1 },
- { 1, 2, 1, 1, 1 },
- { 1, 1, 1, 1, 2 },
- { 1, 2, 1, 0, 1 },
- { 1, 1, 0, 1, 2 },
- { 1, 0, 0, 2, 2 },
- { 1, 0, 1, 2, 2 },
- { 1, 2, 2, 1, 0 },
- { 1, 1, 2, 2, 0 },
- { 1, 1, 0, 0, 2 },
- { 1, 2, 0, 0, 1 },
- { 1, 0, 2, 2, 1 },
- { 0, 7, 8 },
- { 0, 8, 9 },
- { 0, 9, 10 },
- { 0, 10, 11 },
- { 0, 11, 12 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 1, 2, 2, 0, 0 },
- { 1, 1, 2, 2, 1 },
- { 1, 1, 1, 0, 2 },
- { 1, 2, 0, 1, 1 },
- { 1, 1, 1, 2, 2 },
- { 1, 2, 2, 1, 1 },
- { 1, 0, 2, 2, 0 },
- { 1, 0, 2, 1, 2 },
- { 0, 6, 7 },
- { 0, 7, 8 },
- { 0, 8, 9 },
- { 0, 9, 10 },
- { 0, 10, 11 },
- { 0, 11, 12 },
- { 1, 1, 0, 2, 2 },
- { 1, 2, 2, 0, 1 },
- { 1, 2, 1, 2, 0 },
- { 1, 2, 2, 2, 0 },
- { 1, 0, 2, 2, 2 },
- { 1, 2, 2, 2, 1 },
- { 1, 2, 1, 2, 1 },
- { 1, 1, 2, 1, 2 },
- { 1, 1, 2, 2, 2 },
- { 0, 3, 4 },
- { 0, 4, 5 },
- { 0, 5, 6 },
- { 1, 0, 2, 0, 2 },
- { 1, 2, 0, 2, 0 },
- { 1, 1, 2, 0, 2 },
- { 0, 3, 4 },
- { 0, 4, 5 },
- { 0, 5, 6 },
- { 1, 2, 0, 2, 1 },
- { 1, 2, 1, 1, 2 },
- { 1, 2, 1, 0, 2 },
- { 0, 3, 4 },
- { 0, 4, 5 },
- { 0, 5, 6 },
- { 1, 2, 2, 2, 2 },
- { 1, 2, 2, 1, 2 },
- { 1, 2, 1, 2, 2 },
- { 1, 2, 0, 1, 2 },
- { 1, 2, 0, 0, 2 },
- { 0, 1, 2 },
- { 1, 2, 2, 0, 2 },
- { 1, 2, 0, 2, 2 },
-};
-
-//---------------------------------------------------------------------------
-// Spectrum Huffman Codebook 4
-static hcb_struct_1 huffman_04_1[32]=
-{
- { 0, 0 },
- { 0, 0 },
- { 1, 0 },
- { 1, 0 },
- { 2, 0 },
- { 2, 0 },
- { 3, 0 },
- { 3, 0 },
- { 4, 0 },
- { 4, 0 },
- { 5, 0 },
- { 5, 0 },
- { 6, 0 },
- { 6, 0 },
- { 7, 0 },
- { 7, 0 },
- { 8, 0 },
- { 8, 0 },
- { 9, 0 },
- { 9, 0 },
- { 10, 0 },
- { 11, 0 },
- { 12, 0 },
- { 13, 0 },
- { 14, 0 },
- { 15, 0 },
- { 16, 2 },
- { 20, 2 },
- { 24, 3 },
- { 32, 3 },
- { 40, 4 },
- { 56, 7 }
-};
-
-static hcb_struct huffman_04[185]=
-{
- { 4, 1, 1, 1, 1 },
- { 4, 0, 1, 1, 1 },
- { 4, 1, 1, 0, 1 },
- { 4, 1, 1, 1, 0 },
- { 4, 1, 0, 1, 1 },
- { 4, 1, 0, 0, 0 },
- { 4, 1, 1, 0, 0 },
- { 4, 0, 0, 0, 0 },
- { 4, 0, 0, 1, 1 },
- { 4, 1, 0, 1, 0 },
- { 5, 1, 0, 0, 1 },
- { 5, 0, 1, 1, 0 },
- { 5, 0, 0, 0, 1 },
- { 5, 0, 1, 0, 1 },
- { 5, 0, 0, 1, 0 },
- { 5, 0, 1, 0, 0 },
- { 7, 2, 1, 1, 1 },
- { 7, 1, 1, 2, 1 },
- { 7, 1, 2, 1, 1 },
- { 7, 1, 1, 1, 2 },
- { 7, 2, 1, 1, 0 },
- { 7, 2, 1, 0, 1 },
- { 7, 1, 2, 1, 0 },
- { 7, 2, 0, 1, 1 },
- { 7, 0, 1, 2, 1 },
- { 7, 0, 1, 2, 1 },
- { 8, 0, 1, 1, 2 },
- { 8, 1, 1, 2, 0 },
- { 8, 0, 2, 1, 1 },
- { 8, 1, 0, 1, 2 },
- { 8, 1, 2, 0, 1 },
- { 8, 1, 1, 0, 2 },
- { 8, 1, 0, 2, 1 },
- { 8, 2, 1, 0, 0 },
- { 8, 2, 0, 1, 0 },
- { 8, 1, 2, 0, 0 },
- { 8, 2, 0, 0, 1 },
- { 8, 0, 1, 0, 2 },
- { 8, 0, 2, 1, 0 },
- { 8, 0, 0, 1, 2 },
- { 8, 0, 1, 2, 0 },
- { 8, 0, 1, 2, 0 },
- { 8, 0, 2, 0, 1 },
- { 8, 0, 2, 0, 1 },
- { 8, 1, 0, 0, 2 },
- { 8, 1, 0, 0, 2 },
- { 8, 0, 0, 2, 1 },
- { 8, 0, 0, 2, 1 },
- { 8, 1, 0, 2, 0 },
- { 8, 1, 0, 2, 0 },
- { 8, 2, 0, 0, 0 },
- { 8, 2, 0, 0, 0 },
- { 8, 0, 0, 0, 2 },
- { 8, 0, 0, 0, 2 },
- { 9, 0, 2, 0, 0 },
- { 9, 0, 0, 2, 0 },
- { 9, 1, 2, 2, 1 },
- { 9, 1, 2, 2, 1 },
- { 9, 1, 2, 2, 1 },
- { 9, 1, 2, 2, 1 },
- { 9, 1, 2, 2, 1 },
- { 9, 1, 2, 2, 1 },
- { 9, 1, 2, 2, 1 },
- { 9, 1, 2, 2, 1 },
- { 9, 2, 2, 1, 1 },
- { 9, 2, 2, 1, 1 },
- { 9, 2, 2, 1, 1 },
- { 9, 2, 2, 1, 1 },
- { 9, 2, 2, 1, 1 },
- { 9, 2, 2, 1, 1 },
- { 9, 2, 2, 1, 1 },
- { 9, 2, 2, 1, 1 },
- { 9, 2, 1, 2, 1 },
- { 9, 2, 1, 2, 1 },
- { 9, 2, 1, 2, 1 },
- { 9, 2, 1, 2, 1 },
- { 9, 2, 1, 2, 1 },
- { 9, 2, 1, 2, 1 },
- { 9, 2, 1, 2, 1 },
- { 9, 2, 1, 2, 1 },
- { 9, 1, 1, 2, 2 },
- { 9, 1, 1, 2, 2 },
- { 9, 1, 1, 2, 2 },
- { 9, 1, 1, 2, 2 },
- { 9, 1, 1, 2, 2 },
- { 9, 1, 1, 2, 2 },
- { 9, 1, 1, 2, 2 },
- { 9, 1, 1, 2, 2 },
- { 9, 1, 2, 1, 2 },
- { 9, 1, 2, 1, 2 },
- { 9, 1, 2, 1, 2 },
- { 9, 1, 2, 1, 2 },
- { 9, 1, 2, 1, 2 },
- { 9, 1, 2, 1, 2 },
- { 9, 1, 2, 1, 2 },
- { 9, 1, 2, 1, 2 },
- { 9, 2, 1, 1, 2 },
- { 9, 2, 1, 1, 2 },
- { 9, 2, 1, 1, 2 },
- { 9, 2, 1, 1, 2 },
- { 9, 2, 1, 1, 2 },
- { 9, 2, 1, 1, 2 },
- { 9, 2, 1, 1, 2 },
- { 9, 2, 1, 1, 2 },
- { 10, 1, 2, 2, 0 },
- { 10, 1, 2, 2, 0 },
- { 10, 1, 2, 2, 0 },
- { 10, 1, 2, 2, 0 },
- { 10, 2, 2, 1, 0 },
- { 10, 2, 2, 1, 0 },
- { 10, 2, 2, 1, 0 },
- { 10, 2, 2, 1, 0 },
- { 10, 2, 1, 2, 0 },
- { 10, 2, 1, 2, 0 },
- { 10, 2, 1, 2, 0 },
- { 10, 2, 1, 2, 0 },
- { 10, 0, 2, 2, 1 },
- { 10, 0, 2, 2, 1 },
- { 10, 0, 2, 2, 1 },
- { 10, 0, 2, 2, 1 },
- { 10, 0, 1, 2, 2 },
- { 10, 0, 1, 2, 2 },
- { 10, 0, 1, 2, 2 },
- { 10, 0, 1, 2, 2 },
- { 10, 2, 2, 0, 1 },
- { 10, 2, 2, 0, 1 },
- { 10, 2, 2, 0, 1 },
- { 10, 2, 2, 0, 1 },
- { 10, 0, 2, 1, 2 },
- { 10, 0, 2, 1, 2 },
- { 10, 0, 2, 1, 2 },
- { 10, 0, 2, 1, 2 },
- { 10, 2, 0, 2, 1 },
- { 10, 2, 0, 2, 1 },
- { 10, 2, 0, 2, 1 },
- { 10, 2, 0, 2, 1 },
- { 10, 1, 0, 2, 2 },
- { 10, 1, 0, 2, 2 },
- { 10, 1, 0, 2, 2 },
- { 10, 1, 0, 2, 2 },
- { 10, 2, 2, 2, 1 },
- { 10, 2, 2, 2, 1 },
- { 10, 2, 2, 2, 1 },
- { 10, 2, 2, 2, 1 },
- { 10, 1, 2, 0, 2 },
- { 10, 1, 2, 0, 2 },
- { 10, 1, 2, 0, 2 },
- { 10, 1, 2, 0, 2 },
- { 10, 2, 0, 1, 2 },
- { 10, 2, 0, 1, 2 },
- { 10, 2, 0, 1, 2 },
- { 10, 2, 0, 1, 2 },
- { 10, 2, 1, 0, 2 },
- { 10, 2, 1, 0, 2 },
- { 10, 2, 1, 0, 2 },
- { 10, 2, 1, 0, 2 },
- { 10, 1, 2, 2, 2 },
- { 10, 1, 2, 2, 2 },
- { 10, 1, 2, 2, 2 },
- { 10, 1, 2, 2, 2 },
- { 11, 2, 1, 2, 2 },
- { 11, 2, 1, 2, 2 },
- { 11, 2, 2, 1, 2 },
- { 11, 2, 2, 1, 2 },
- { 11, 0, 2, 2, 0 },
- { 11, 0, 2, 2, 0 },
- { 11, 2, 2, 0, 0 },
- { 11, 2, 2, 0, 0 },
- { 11, 0, 0, 2, 2 },
- { 11, 0, 0, 2, 2 },
- { 11, 2, 0, 2, 0 },
- { 11, 2, 0, 2, 0 },
- { 11, 0, 2, 0, 2 },
- { 11, 0, 2, 0, 2 },
- { 11, 2, 0, 0, 2 },
- { 11, 2, 0, 0, 2 },
- { 11, 2, 2, 2, 2 },
- { 11, 2, 2, 2, 2 },
- { 11, 0, 2, 2, 2 },
- { 11, 0, 2, 2, 2 },
- { 11, 2, 2, 2, 0 },
- { 11, 2, 2, 2, 0 },
- { 12, 2, 2, 0, 2 },
- { 12, 2, 0, 2, 2 },
-};
-
-//---------------------------------------------------------------------------
-// Spectrum Huffman Codebook 5
-static hcb_struct huffman_05[161]=
-{
- { 0, 1, 2 },
- { 1, 0, 0 },
- { 0, 1, 2 },
- { 0, 2, 3 },
- { 0, 3, 4 },
- { 0, 4, 5 },
- { 0, 5, 6 },
- { 0, 6, 7 },
- { 0, 7, 8 },
- { 1, -1, 0 },
- { 1, 1, 0 },
- { 1, 0, 1 },
- { 1, 0, -1 },
- { 0, 4, 5 },
- { 0, 5, 6 },
- { 0, 6, 7 },
- { 0, 7, 8 },
- { 1, 1, -1 },
- { 1, -1, 1 },
- { 1, -1, -1 },
- { 1, 1, 1 },
- { 0, 4, 5 },
- { 0, 5, 6 },
- { 0, 6, 7 },
- { 0, 7, 8 },
- { 0, 8, 9 },
- { 0, 9, 10 },
- { 0, 10, 11 },
- { 0, 11, 12 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 1, -2, 0 },
- { 1, 0, 2 },
- { 1, 2, 0 },
- { 1, 0, -2 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 0, 16, 17 },
- { 0, 17, 18 },
- { 0, 18, 19 },
- { 0, 19, 20 },
- { 0, 20, 21 },
- { 0, 21, 22 },
- { 0, 22, 23 },
- { 0, 23, 24 },
- { 1, -2, -1 },
- { 1, 2, 1 },
- { 1, -1, -2 },
- { 1, 1, 2 },
- { 1, -2, 1 },
- { 1, 2, -1 },
- { 1, -1, 2 },
- { 1, 1, -2 },
- { 1, -3, 0 },
- { 1, 3, 0 },
- { 1, 0, -3 },
- { 1, 0, 3 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 0, 16, 17 },
- { 0, 17, 18 },
- { 0, 18, 19 },
- { 0, 19, 20 },
- { 0, 20, 21 },
- { 0, 21, 22 },
- { 0, 22, 23 },
- { 0, 23, 24 },
- { 1, -3, -1 },
- { 1, 1, 3 },
- { 1, 3, 1 },
- { 1, -1, -3 },
- { 1, -3, 1 },
- { 1, 3, -1 },
- { 1, 1, -3 },
- { 1, -1, 3 },
- { 1, -2, 2 },
- { 1, 2, 2 },
- { 1, -2, -2 },
- { 1, 2, -2 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 0, 16, 17 },
- { 0, 17, 18 },
- { 0, 18, 19 },
- { 0, 19, 20 },
- { 0, 20, 21 },
- { 0, 21, 22 },
- { 0, 22, 23 },
- { 0, 23, 24 },
- { 1, -3, -2 },
- { 1, 3, -2 },
- { 1, -2, 3 },
- { 1, 2, -3 },
- { 1, 3, 2 },
- { 1, 2, 3 },
- { 1, -3, 2 },
- { 1, -2, -3 },
- { 1, 0, -4 },
- { 1, -4, 0 },
- { 1, 4, 1 },
- { 1, 4, 0 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 0, 16, 17 },
- { 0, 17, 18 },
- { 0, 18, 19 },
- { 0, 19, 20 },
- { 0, 20, 21 },
- { 0, 21, 22 },
- { 0, 22, 23 },
- { 0, 23, 24 },
- { 1, -4, -1 },
- { 1, 0, 4 },
- { 1, 4, -1 },
- { 1, -1, -4 },
- { 1, 1, 4 },
- { 1, -1, 4 },
- { 1, -4, 1 },
- { 1, 1, -4 },
- { 1, 3, -3 },
- { 1, -3, -3 },
- { 1, -3, 3 },
- { 1, -2, 4 },
- { 1, -4, -2 },
- { 1, 4, 2 },
- { 1, 2, -4 },
- { 1, 2, 4 },
- { 1, 3, 3 },
- { 1, -4, 2 },
- { 0, 6, 7 },
- { 0, 7, 8 },
- { 0, 8, 9 },
- { 0, 9, 10 },
- { 0, 10, 11 },
- { 0, 11, 12 },
- { 1, -2, -4 },
- { 1, 4, -2 },
- { 1, 3, -4 },
- { 1, -4, -3 },
- { 1, -4, 3 },
- { 1, 3, 4 },
- { 1, -3, 4 },
- { 1, 4, 3 },
- { 1, 4, -3 },
- { 1, -3, -4 },
- { 0, 2, 3 },
- { 0, 3, 4 },
- { 1, 4, -4 },
- { 1, -4, 4 },
- { 1, 4, 4 },
- { 1, -4, -4 }
-};
-
-//---------------------------------------------------------------------------
-// Spectrum Huffman Codebook 6
-static hcb_struct_1 huffman_06_1[32] = {
- { 0, 0 },
- { 0, 0 },
- { 1, 0 },
- { 1, 0 },
- { 2, 0 },
- { 2, 0 },
- { 3, 0 },
- { 3, 0 },
- { 4, 0 },
- { 4, 0 },
- { 5, 0 },
- { 5, 0 },
- { 6, 0 },
- { 6, 0 },
- { 7, 0 },
- { 7, 0 },
- { 8, 0 },
- { 8, 0 },
- { 9, 1 },
- { 11, 1 },
- { 13, 1 },
- { 15, 1 },
- { 17, 1 },
- { 19, 1 },
- { 21, 1 },
- { 23, 1 },
- { 25, 2 },
- { 29, 2 },
- { 33, 2 },
- { 37, 3 },
- { 45, 4 },
- { 61, 6 }
-};
-
-static hcb_struct huffman_06[126]=
-{
- { 4, 0, 0 },
- { 4, 1, 0 },
- { 4, 0, -1 },
- { 4, 0, 1 },
- { 4, -1, 0 },
- { 4, 1, 1 },
- { 4, -1, 1 },
- { 4, 1, -1 },
- { 4, -1, -1 },
- { 6, 2, -1 },
- { 6, 2, 1 },
- { 6, -2, 1 },
- { 6, -2, -1 },
- { 6, -2, 0 },
- { 6, -1, 2 },
- { 6, 2, 0 },
- { 6, 1, -2 },
- { 6, 1, 2 },
- { 6, 0, -2 },
- { 6, -1, -2 },
- { 6, 0, 2 },
- { 6, 2, -2 },
- { 6, -2, 2 },
- { 6, -2, -2 },
- { 6, 2, 2 },
- { 7, -3, 1 },
- { 7, 3, 1 },
- { 7, 3, -1 },
- { 7, -1, 3 },
- { 7, -3, -1 },
- { 7, 1, 3 },
- { 7, 1, -3 },
- { 7, -1, -3 },
- { 7, 3, 0 },
- { 7, -3, 0 },
- { 7, 0, -3 },
- { 7, 0, 3 },
- { 7, 3, 2 },
- { 7, 3, 2 },
- { 8, -3, -2 },
- { 8, -2, 3 },
- { 8, 2, 3 },
- { 8, 3, -2 },
- { 8, 2, -3 },
- { 8, -2, -3 },
- { 8, -3, 2 },
- { 8, -3, 2 },
- { 8, 3, 3 },
- { 8, 3, 3 },
- { 9, 3, -3 },
- { 9, -3, -3 },
- { 9, -3, 3 },
- { 9, 1, -4 },
- { 9, -1, -4 },
- { 9, 4, 1 },
- { 9, -4, 1 },
- { 9, -4, -1 },
- { 9, 1, 4 },
- { 9, 4, -1 },
- { 9, -1, 4 },
- { 9, 0, -4 },
- { 9, -4, 2 },
- { 9, -4, 2 },
- { 9, -4, 2 },
- { 9, -4, 2 },
- { 9, -4, -2 },
- { 9, -4, -2 },
- { 9, -4, -2 },
- { 9, -4, -2 },
- { 9, 2, 4 },
- { 9, 2, 4 },
- { 9, 2, 4 },
- { 9, 2, 4 },
- { 9, -2, -4 },
- { 9, -2, -4 },
- { 9, -2, -4 },
- { 9, -2, -4 },
- { 9, -4, 0 },
- { 9, -4, 0 },
- { 9, -4, 0 },
- { 9, -4, 0 },
- { 9, 4, 2 },
- { 9, 4, 2 },
- { 9, 4, 2 },
- { 9, 4, 2 },
- { 9, 4, -2 },
- { 9, 4, -2 },
- { 9, 4, -2 },
- { 9, 4, -2 },
- { 9, -2, 4 },
- { 9, -2, 4 },
- { 9, -2, 4 },
- { 9, -2, 4 },
- { 9, 4, 0 },
- { 9, 4, 0 },
- { 9, 4, 0 },
- { 9, 4, 0 },
- { 9, 2, -4 },
- { 9, 2, -4 },
- { 9, 2, -4 },
- { 9, 2, -4 },
- { 9, 0, 4 },
- { 9, 0, 4 },
- { 9, 0, 4 },
- { 9, 0, 4 },
- { 10, -3, -4 },
- { 10, -3, -4 },
- { 10, -3, 4 },
- { 10, -3, 4 },
- { 10, 3, -4 },
- { 10, 3, -4 },
- { 10, 4, -3 },
- { 10, 4, -3 },
- { 10, 3, 4 },
- { 10, 3, 4 },
- { 10, 4, 3 },
- { 10, 4, 3 },
- { 10, -4, 3 },
- { 10, -4, 3 },
- { 10, -4, -3 },
- { 10, -4, -3 },
- { 11, 4, 4 },
- { 11, -4, 4 },
- { 11, -4, -4 },
- { 11, 4, -4 }
-};
-
-//---------------------------------------------------------------------------
-// Spectrum Huffman Codebook 7
-static hcb_struct huffman_07[127] =
-{
- { 0, 1, 2 },
- { 1, 0, 0 },
- { 0, 1, 2 },
- { 0, 2, 3 },
- { 0, 3, 4 },
- { 1, 1, 0 },
- { 1, 0, 1 },
- { 0, 2, 3 },
- { 0, 3, 4 },
- { 1, 1, 1 },
- { 0, 3, 4 },
- { 0, 4, 5 },
- { 0, 5, 6 },
- { 0, 6, 7 },
- { 0, 7, 8 },
- { 0, 8, 9 },
- { 0, 9, 10 },
- { 0, 10, 11 },
- { 0, 11, 12 },
- { 1, 2, 1 },
- { 1, 1, 2 },
- { 1, 2, 0 },
- { 1, 0, 2 },
- { 0, 8, 9 },
- { 0, 9, 10 },
- { 0, 10, 11 },
- { 0, 11, 12 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 1, 3, 1 },
- { 1, 1, 3 },
- { 1, 2, 2 },
- { 1, 3, 0 },
- { 1, 0, 3 },
- { 0, 11, 12 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 0, 16, 17 },
- { 0, 17, 18 },
- { 0, 18, 19 },
- { 0, 19, 20 },
- { 0, 20, 21 },
- { 0, 21, 22 },
- { 1, 2, 3 },
- { 1, 3, 2 },
- { 1, 1, 4 },
- { 1, 4, 1 },
- { 1, 1, 5 },
- { 1, 5, 1 },
- { 1, 3, 3 },
- { 1, 2, 4 },
- { 1, 0, 4 },
- { 1, 4, 0 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 0, 16, 17 },
- { 0, 17, 18 },
- { 0, 18, 19 },
- { 0, 19, 20 },
- { 0, 20, 21 },
- { 0, 21, 22 },
- { 0, 22, 23 },
- { 0, 23, 24 },
- { 1, 4, 2 },
- { 1, 2, 5 },
- { 1, 5, 2 },
- { 1, 0, 5 },
- { 1, 6, 1 },
- { 1, 5, 0 },
- { 1, 1, 6 },
- { 1, 4, 3 },
- { 1, 3, 5 },
- { 1, 3, 4 },
- { 1, 5, 3 },
- { 1, 2, 6 },
- { 1, 6, 2 },
- { 1, 1, 7 },
- { 0, 10, 11 },
- { 0, 11, 12 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 0, 16, 17 },
- { 0, 17, 18 },
- { 0, 18, 19 },
- { 0, 19, 20 },
- { 1, 3, 6 },
- { 1, 0, 6 },
- { 1, 6, 0 },
- { 1, 4, 4 },
- { 1, 7, 1 },
- { 1, 4, 5 },
- { 1, 7, 2 },
- { 1, 5, 4 },
- { 1, 6, 3 },
- { 1, 2, 7 },
- { 1, 7, 3 },
- { 1, 6, 4 },
- { 1, 5, 5 },
- { 1, 4, 6 },
- { 1, 3, 7 },
- { 0, 5, 6 },
- { 0, 6, 7 },
- { 0, 7, 8 },
- { 0, 8, 9 },
- { 0, 9, 10 },
- { 1, 7, 0 },
- { 1, 0, 7 },
- { 1, 6, 5 },
- { 1, 5, 6 },
- { 1, 7, 4 },
- { 1, 4, 7 },
- { 1, 5, 7 },
- { 1, 7, 5 },
- { 0, 2, 3 },
- { 0, 3, 4 },
- { 1, 7, 6 },
- { 1, 6, 6 },
- { 1, 6, 7 },
- { 1, 7, 7 }
-};
-
-//---------------------------------------------------------------------------
-// Spectrum Huffman Codebook 8
-static hcb_struct_1 huffman_08_1[32]=
-{
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 1, 0 },
- { 1, 0 },
- { 2, 0 },
- { 2, 0 },
- { 3, 0 },
- { 3, 0 },
- { 4, 0 },
- { 4, 0 },
- { 5, 0 },
- { 5, 0 },
- { 6, 0 },
- { 7, 0 },
- { 8, 0 },
- { 9, 0 },
- { 10, 0 },
- { 11, 0 },
- { 12, 0 },
- { 13, 1 },
- { 15, 1 },
- { 17, 1 },
- { 19, 1 },
- { 21, 1 },
- { 23, 2 },
- { 27, 2 },
- { 31, 2 },
- { 35, 3 },
- { 43, 3 },
- { 51, 5 }
-};
-
-static hcb_struct huffman_08[83]=
-{
- { 3, 1, 1 },
- { 4, 2, 1 },
- { 4, 1, 0 },
- { 4, 1, 2 },
- { 4, 0, 1 },
- { 4, 2, 2 },
- { 5, 0, 0 },
- { 5, 2, 0 },
- { 5, 0, 2 },
- { 5, 3, 1 },
- { 5, 1, 3 },
- { 5, 3, 2 },
- { 5, 2, 3 },
- { 6, 3, 3 },
- { 6, 4, 1 },
- { 6, 1, 4 },
- { 6, 4, 2 },
- { 6, 2, 4 },
- { 6, 3, 0 },
- { 6, 0, 3 },
- { 6, 4, 3 },
- { 6, 3, 4 },
- { 6, 5, 2 },
- { 7, 5, 1 },
- { 7, 2, 5 },
- { 7, 1, 5 },
- { 7, 5, 3 },
- { 7, 3, 5 },
- { 7, 4, 4 },
- { 7, 5, 4 },
- { 7, 0, 4 },
- { 7, 4, 5 },
- { 7, 4, 0 },
- { 7, 2, 6 },
- { 7, 6, 2 },
- { 7, 6, 1 },
- { 7, 6, 1 },
- { 7, 1, 6 },
- { 7, 1, 6 },
- { 8, 3, 6 },
- { 8, 6, 3 },
- { 8, 5, 5 },
- { 8, 5, 0 },
- { 8, 6, 4 },
- { 8, 0, 5 },
- { 8, 4, 6 },
- { 8, 7, 1 },
- { 8, 7, 2 },
- { 8, 2, 7 },
- { 8, 6, 5 },
- { 8, 7, 3 },
- { 8, 1, 7 },
- { 8, 1, 7 },
- { 8, 1, 7 },
- { 8, 1, 7 },
- { 8, 5, 6 },
- { 8, 5, 6 },
- { 8, 5, 6 },
- { 8, 5, 6 },
- { 8, 3, 7 },
- { 8, 3, 7 },
- { 8, 3, 7 },
- { 8, 3, 7 },
- { 9, 6, 6 },
- { 9, 6, 6 },
- { 9, 7, 4 },
- { 9, 7, 4 },
- { 9, 6, 0 },
- { 9, 6, 0 },
- { 9, 4, 7 },
- { 9, 4, 7 },
- { 9, 0, 6 },
- { 9, 0, 6 },
- { 9, 7, 5 },
- { 9, 7, 5 },
- { 9, 7, 6 },
- { 9, 7, 6 },
- { 9, 6, 7 },
- { 9, 6, 7 },
- { 10, 5, 7 },
- { 10, 7, 0 },
- { 10, 0, 7 },
- { 10, 7, 7 }
-};
-
-//---------------------------------------------------------------------------
-// Spectrum Huffman Codebook 9
-static hcb_struct huffman_09[337]=
-{
- { 0, 1, 2 },
- { 1, 0, 0 },
- { 0, 1, 2 },
- { 0, 2, 3 },
- { 0, 3, 4 },
- { 1, 1, 0 },
- { 1, 0, 1 },
- { 0, 2, 3 },
- { 0, 3, 4 },
- { 1, 1, 1 },
- { 0, 3, 4 },
- { 0, 4, 5 },
- { 0, 5, 6 },
- { 0, 6, 7 },
- { 0, 7, 8 },
- { 0, 8, 9 },
- { 0, 9, 10 },
- { 0, 10, 11 },
- { 0, 11, 12 },
- { 1, 2, 1 },
- { 1, 1, 2 },
- { 1, 2, 0 },
- { 1, 0, 2 },
- { 0, 8, 9 },
- { 0, 9, 10 },
- { 0, 10, 11 },
- { 0, 11, 12 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 1, 3, 1 },
- { 1, 2, 2 },
- { 1, 1, 3 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 0, 16, 17 },
- { 0, 17, 18 },
- { 0, 18, 19 },
- { 0, 19, 20 },
- { 0, 20, 21 },
- { 0, 21, 22 },
- { 0, 22, 23 },
- { 0, 23, 24 },
- { 0, 24, 25 },
- { 0, 25, 26 },
- { 1, 3, 0 },
- { 1, 0, 3 },
- { 1, 2, 3 },
- { 1, 3, 2 },
- { 1, 1, 4 },
- { 1, 4, 1 },
- { 1, 2, 4 },
- { 1, 1, 5 },
- { 0, 18, 19 },
- { 0, 19, 20 },
- { 0, 20, 21 },
- { 0, 21, 22 },
- { 0, 22, 23 },
- { 0, 23, 24 },
- { 0, 24, 25 },
- { 0, 25, 26 },
- { 0, 26, 27 },
- { 0, 27, 28 },
- { 0, 28, 29 },
- { 0, 29, 30 },
- { 0, 30, 31 },
- { 0, 31, 32 },
- { 0, 32, 33 },
- { 0, 33, 34 },
- { 0, 34, 35 },
- { 0, 35, 36 },
- { 1, 4, 2 },
- { 1, 3, 3 },
- { 1, 0, 4 },
- { 1, 4, 0 },
- { 1, 5, 1 },
- { 1, 2, 5 },
- { 1, 1, 6 },
- { 1, 3, 4 },
- { 1, 5, 2 },
- { 1, 6, 1 },
- { 1, 4, 3 },
- { 0, 25, 26 },
- { 0, 26, 27 },
- { 0, 27, 28 },
- { 0, 28, 29 },
- { 0, 29, 30 },
- { 0, 30, 31 },
- { 0, 31, 32 },
- { 0, 32, 33 },
- { 0, 33, 34 },
- { 0, 34, 35 },
- { 0, 35, 36 },
- { 0, 36, 37 },
- { 0, 37, 38 },
- { 0, 38, 39 },
- { 0, 39, 40 },
- { 0, 40, 41 },
- { 0, 41, 42 },
- { 0, 42, 43 },
- { 0, 43, 44 },
- { 0, 44, 45 },
- { 0, 45, 46 },
- { 0, 46, 47 },
- { 0, 47, 48 },
- { 0, 48, 49 },
- { 0, 49, 50 },
- { 1, 0, 5 },
- { 1, 2, 6 },
- { 1, 5, 0 },
- { 1, 1, 7 },
- { 1, 3, 5 },
- { 1, 1, 8 },
- { 1, 8, 1 },
- { 1, 4, 4 },
- { 1, 5, 3 },
- { 1, 6, 2 },
- { 1, 7, 1 },
- { 1, 0, 6 },
- { 1, 8, 2 },
- { 1, 2, 8 },
- { 1, 3, 6 },
- { 1, 2, 7 },
- { 1, 4, 5 },
- { 1, 9, 1 },
- { 1, 1, 9 },
- { 1, 7, 2 },
- { 0, 30, 31 },
- { 0, 31, 32 },
- { 0, 32, 33 },
- { 0, 33, 34 },
- { 0, 34, 35 },
- { 0, 35, 36 },
- { 0, 36, 37 },
- { 0, 37, 38 },
- { 0, 38, 39 },
- { 0, 39, 40 },
- { 0, 40, 41 },
- { 0, 41, 42 },
- { 0, 42, 43 },
- { 0, 43, 44 },
- { 0, 44, 45 },
- { 0, 45, 46 },
- { 0, 46, 47 },
- { 0, 47, 48 },
- { 0, 48, 49 },
- { 0, 49, 50 },
- { 0, 50, 51 },
- { 0, 51, 52 },
- { 0, 52, 53 },
- { 0, 53, 54 },
- { 0, 54, 55 },
- { 0, 55, 56 },
- { 0, 56, 57 },
- { 0, 57, 58 },
- { 0, 58, 59 },
- { 0, 59, 60 },
- { 1, 6, 0 },
- { 1, 5, 4 },
- { 1, 6, 3 },
- { 1, 8, 3 },
- { 1, 0, 7 },
- { 1, 9, 2 },
- { 1, 3, 8 },
- { 1, 4, 6 },
- { 1, 3, 7 },
- { 1, 0, 8 },
- { 1, 10, 1 },
- { 1, 6, 4 },
- { 1, 2, 9 },
- { 1, 5, 5 },
- { 1, 8, 0 },
- { 1, 7, 0 },
- { 1, 7, 3 },
- { 1, 10, 2 },
- { 1, 9, 3 },
- { 1, 8, 4 },
- { 1, 1, 10 },
- { 1, 7, 4 },
- { 1, 6, 5 },
- { 1, 5, 6 },
- { 1, 4, 8 },
- { 1, 4, 7 },
- { 1, 3, 9 },
- { 1, 11, 1 },
- { 1, 5, 8 },
- { 1, 9, 0 },
- { 1, 8, 5 },
- { 0, 29, 30 },
- { 0, 30, 31 },
- { 0, 31, 32 },
- { 0, 32, 33 },
- { 0, 33, 34 },
- { 0, 34, 35 },
- { 0, 35, 36 },
- { 0, 36, 37 },
- { 0, 37, 38 },
- { 0, 38, 39 },
- { 0, 39, 40 },
- { 0, 40, 41 },
- { 0, 41, 42 },
- { 0, 42, 43 },
- { 0, 43, 44 },
- { 0, 44, 45 },
- { 0, 45, 46 },
- { 0, 46, 47 },
- { 0, 47, 48 },
- { 0, 48, 49 },
- { 0, 49, 50 },
- { 0, 50, 51 },
- { 0, 51, 52 },
- { 0, 52, 53 },
- { 0, 53, 54 },
- { 0, 54, 55 },
- { 0, 55, 56 },
- { 0, 56, 57 },
- { 0, 57, 58 },
- { 1, 10, 3 },
- { 1, 2, 10 },
- { 1, 0, 9 },
- { 1, 11, 2 },
- { 1, 9, 4 },
- { 1, 6, 6 },
- { 1, 12, 1 },
- { 1, 4, 9 },
- { 1, 8, 6 },
- { 1, 1, 11 },
- { 1, 9, 5 },
- { 1, 10, 4 },
- { 1, 5, 7 },
- { 1, 7, 5 },
- { 1, 2, 11 },
- { 1, 1, 12 },
- { 1, 12, 2 },
- { 1, 11, 3 },
- { 1, 3, 10 },
- { 1, 5, 9 },
- { 1, 6, 7 },
- { 1, 8, 7 },
- { 1, 11, 4 },
- { 1, 0, 10 },
- { 1, 7, 6 },
- { 1, 12, 3 },
- { 1, 10, 0 },
- { 1, 10, 5 },
- { 1, 4, 10 },
- { 1, 6, 8 },
- { 1, 2, 12 },
- { 1, 9, 6 },
- { 1, 9, 7 },
- { 1, 4, 11 },
- { 1, 11, 0 },
- { 1, 6, 9 },
- { 1, 3, 11 },
- { 1, 5, 10 },
- { 0, 20, 21 },
- { 0, 21, 22 },
- { 0, 22, 23 },
- { 0, 23, 24 },
- { 0, 24, 25 },
- { 0, 25, 26 },
- { 0, 26, 27 },
- { 0, 27, 28 },
- { 0, 28, 29 },
- { 0, 29, 30 },
- { 0, 30, 31 },
- { 0, 31, 32 },
- { 0, 32, 33 },
- { 0, 33, 34 },
- { 0, 34, 35 },
- { 0, 35, 36 },
- { 0, 36, 37 },
- { 0, 37, 38 },
- { 0, 38, 39 },
- { 0, 39, 40 },
- { 1, 8, 8 },
- { 1, 7, 8 },
- { 1, 12, 5 },
- { 1, 3, 12 },
- { 1, 11, 5 },
- { 1, 7, 7 },
- { 1, 12, 4 },
- { 1, 11, 6 },
- { 1, 10, 6 },
- { 1, 4, 12 },
- { 1, 7, 9 },
- { 1, 5, 11 },
- { 1, 0, 11 },
- { 1, 12, 6 },
- { 1, 6, 10 },
- { 1, 12, 0 },
- { 1, 10, 7 },
- { 1, 5, 12 },
- { 1, 7, 10 },
- { 1, 9, 8 },
- { 1, 0, 12 },
- { 1, 11, 7 },
- { 1, 8, 9 },
- { 1, 9, 9 },
- { 1, 10, 8 },
- { 1, 7, 11 },
- { 1, 12, 7 },
- { 1, 6, 11 },
- { 1, 8, 11 },
- { 1, 11, 8 },
- { 1, 7, 12 },
- { 1, 6, 12 },
- { 0, 8, 9 },
- { 0, 9, 10 },
- { 0, 10, 11 },
- { 0, 11, 12 },
- { 0, 12, 13 },
- { 0, 13, 14 },
- { 0, 14, 15 },
- { 0, 15, 16 },
- { 1, 8, 10 },
- { 1, 10, 9 },
- { 1, 8, 12 },
- { 1, 9, 10 },
- { 1, 9, 11 },
- { 1, 9, 12 },
- { 1, 10, 11 },
- { 1, 12, 9 },
- { 1, 10, 10 },
- { 1, 11, 9 },
- { 1, 12, 8 },
- { 1, 11, 10 },
- { 1, 12, 10 },
- { 1, 12, 11 },
- { 0, 2, 3 },
- { 0, 3, 4 },
- { 1, 10, 12 },
- { 1, 11, 11 },
- { 1, 11, 12 },
- { 1, 12, 12 }
-};
-
-//---------------------------------------------------------------------------
-// Spectrum Huffman Codebook 10
-static hcb_struct_1 huffman_10_1[64]=
-{
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 0, 0 },
- { 1, 0 },
- { 1, 0 },
- { 1, 0 },
- { 1, 0 },
- { 2, 0 },
- { 2, 0 },
- { 2, 0 },
- { 2, 0 },
- { 3, 0 },
- { 3, 0 },
- { 4, 0 },
- { 4, 0 },
- { 5, 0 },
- { 5, 0 },
- { 6, 0 },
- { 6, 0 },
- { 7, 0 },
- { 7, 0 },
- { 8, 0 },
- { 8, 0 },
- { 9, 0 },
- { 9, 0 },
- { 10, 0 },
- { 10, 0 },
- { 11, 0 },
- { 12, 0 },
- { 13, 0 },
- { 14, 0 },
- { 15, 0 },
- { 16, 0 },
- { 17, 0 },
- { 18, 0 },
- { 19, 0 },
- { 20, 0 },
- { 21, 0 },
- { 22, 0 },
- { 23, 0 },
- { 24, 0 },
- { 25, 1 },
- { 27, 1 },
- { 29, 1 },
- { 31, 1 },
- { 33, 1 },
- { 35, 1 },
- { 37, 1 },
- { 39, 1 },
- { 41, 2 },
- { 45, 2 },
- { 49, 2 },
- { 53, 2 },
- { 57, 2 },
- { 61, 2 },
- { 65, 3 },
- { 73, 3 },
- { 81, 3 },
- { 89, 3 },
- { 97, 4 },
- { 113, 4 },
- { 129, 4 },
- { 145, 6 }
-};
-
-static hcb_struct huffman_10[210]=
-{
- { 4, 1, 1 },
- { 4, 1, 2 },
- { 4, 2, 1 },
- { 5, 2, 2 },
- { 5, 1, 0 },
- { 5, 0, 1 },
- { 5, 1, 3 },
- { 5, 3, 2 },
- { 5, 3, 1 },
- { 5, 2, 3 },
- { 5, 3, 3 },
- { 6, 2, 0 },
- { 6, 0, 2 },
- { 6, 2, 4 },
- { 6, 4, 2 },
- { 6, 1, 4 },
- { 6, 4, 1 },
- { 6, 0, 0 },
- { 6, 4, 3 },
- { 6, 3, 4 },
- { 6, 3, 0 },
- { 6, 0, 3 },
- { 6, 4, 4 },
- { 6, 2, 5 },
- { 6, 5, 2 },
- { 7, 1, 5 },
- { 7, 5, 1 },
- { 7, 5, 3 },
- { 7, 3, 5 },
- { 7, 5, 4 },
- { 7, 4, 5 },
- { 7, 6, 2 },
- { 7, 2, 6 },
- { 7, 6, 3 },
- { 7, 4, 0 },
- { 7, 6, 1 },
- { 7, 0, 4 },
- { 7, 1, 6 },
- { 7, 3, 6 },
- { 7, 5, 5 },
- { 7, 6, 4 },
- { 7, 4, 6 },
- { 7, 4, 6 },
- { 8, 6, 5 },
- { 8, 7, 2 },
- { 8, 3, 7 },
- { 8, 2, 7 },
- { 8, 5, 6 },
- { 8, 8, 2 },
- { 8, 7, 3 },
- { 8, 5, 0 },
- { 8, 7, 1 },
- { 8, 0, 5 },
- { 8, 8, 1 },
- { 8, 1, 7 },
- { 8, 8, 3 },
- { 8, 7, 4 },
- { 8, 4, 7 },
- { 8, 2, 8 },
- { 8, 6, 6 },
- { 8, 7, 5 },
- { 8, 1, 8 },
- { 8, 3, 8 },
- { 8, 8, 4 },
- { 8, 4, 8 },
- { 8, 5, 7 },
- { 8, 5, 7 },
- { 8, 8, 5 },
- { 8, 8, 5 },
- { 8, 5, 8 },
- { 8, 5, 8 },
- { 9, 7, 6 },
- { 9, 6, 7 },
- { 9, 9, 2 },
- { 9, 6, 0 },
- { 9, 6, 8 },
- { 9, 9, 3 },
- { 9, 3, 9 },
- { 9, 9, 1 },
- { 9, 2, 9 },
- { 9, 0, 6 },
- { 9, 8, 6 },
- { 9, 9, 4 },
- { 9, 4, 9 },
- { 9, 10, 2 },
- { 9, 1, 9 },
- { 9, 7, 7 },
- { 9, 8, 7 },
- { 9, 9, 5 },
- { 9, 7, 8 },
- { 9, 10, 3 },
- { 9, 5, 9 },
- { 9, 10, 4 },
- { 9, 2, 10 },
- { 9, 10, 1 },
- { 9, 3, 10 },
- { 9, 9, 6 },
- { 9, 6, 9 },
- { 9, 6, 9 },
- { 9, 8, 0 },
- { 9, 8, 0 },
- { 9, 4, 10 },
- { 9, 4, 10 },
- { 9, 7, 0 },
- { 9, 7, 0 },
- { 9, 11, 2 },
- { 9, 11, 2 },
- { 10, 7, 9 },
- { 10, 11, 3 },
- { 10, 10, 6 },
- { 10, 1, 10 },
- { 10, 11, 1 },
- { 10, 9, 7 },
- { 10, 0, 7 },
- { 10, 8, 8 },
- { 10, 10, 5 },
- { 10, 3, 11 },
- { 10, 5, 10 },
- { 10, 8, 9 },
- { 10, 11, 5 },
- { 10, 0, 8 },
- { 10, 11, 4 },
- { 10, 2, 11 },
- { 10, 7, 10 },
- { 10, 6, 10 },
- { 10, 10, 7 },
- { 10, 4, 11 },
- { 10, 1, 11 },
- { 10, 12, 2 },
- { 10, 9, 8 },
- { 10, 12, 3 },
- { 10, 11, 6 },
- { 10, 5, 11 },
- { 10, 12, 4 },
- { 10, 11, 7 },
- { 10, 12, 5 },
- { 10, 3, 12 },
- { 10, 6, 11 },
- { 10, 9, 0 },
- { 10, 10, 8 },
- { 10, 10, 0 },
- { 10, 12, 1 },
- { 10, 0, 9 },
- { 10, 4, 12 },
- { 10, 9, 9 },
- { 10, 12, 6 },
- { 10, 12, 6 },
- { 10, 12, 6 },
- { 10, 12, 6 },
- { 10, 2, 12 },
- { 10, 2, 12 },
- { 10, 2, 12 },
- { 10, 2, 12 },
- { 10, 8, 10 },
- { 10, 8, 10 },
- { 10, 8, 10 },
- { 10, 8, 10 },
- { 11, 9, 10 },
- { 11, 9, 10 },
- { 11, 1, 12 },
- { 11, 1, 12 },
- { 11, 11, 8 },
- { 11, 11, 8 },
- { 11, 12, 7 },
- { 11, 12, 7 },
- { 11, 7, 11 },
- { 11, 7, 11 },
- { 11, 5, 12 },
- { 11, 5, 12 },
- { 11, 6, 12 },
- { 11, 6, 12 },
- { 11, 10, 9 },
- { 11, 10, 9 },
- { 11, 8, 11 },
- { 11, 8, 11 },
- { 11, 12, 8 },
- { 11, 12, 8 },
- { 11, 0, 10 },
- { 11, 0, 10 },
- { 11, 7, 12 },
- { 11, 7, 12 },
- { 11, 11, 0 },
- { 11, 11, 0 },
- { 11, 10, 10 },
- { 11, 10, 10 },
- { 11, 11, 9 },
- { 11, 11, 9 },
- { 11, 11, 10 },
- { 11, 11, 10 },
- { 11, 0, 11 },
- { 11, 0, 11 },
- { 11, 11, 11 },
- { 11, 11, 11 },
- { 11, 9, 11 },
- { 11, 9, 11 },
- { 11, 10, 11 },
- { 11, 10, 11 },
- { 11, 12, 0 },
- { 11, 12, 0 },
- { 11, 8, 12 },
- { 11, 8, 12 },
- { 12, 12, 9 },
- { 12, 10, 12 },
- { 12, 9, 12 },
- { 12, 11, 12 },
- { 12, 12, 11 },
- { 12, 0, 12 },
- { 12, 12, 10 },
- { 12, 12, 12 }
-};
-
-//---------------------------------------------------------------------------
-// Spectrum Huffman Codebook 11
-static hcb_struct_1 huffman_11_1[32]=
-{
- { 0, 0 },
- { 0, 0 },
- { 1, 0 },
- { 1, 0 },
- { 2, 0 },
- { 3, 0 },
- { 4, 0 },
- { 5, 0 },
- { 6, 0 },
- { 7, 0 },
- { 8, 1 },
- { 10, 1 },
- { 12, 1 },
- { 14, 2 },
- { 18, 2 },
- { 22, 2 },
- { 26, 2 },
- { 30, 3 },
- { 38, 3 },
- { 46, 3 },
- { 54, 3 },
- { 62, 3 },
- { 70, 3 },
- { 78, 3 },
- { 86, 4 },
- { 102, 4 },
- { 118, 4 },
- { 134, 4 },
- { 150, 5 },
- { 182, 5 },
- { 214, 5 },
- { 246, 7 }
-};
-
-static hcb_struct huffman_11[374]=
-{
- { 4, 0, 0 },
- { 4, 1, 1 },
- { 5, 16, 16 },
- { 5, 1, 0 },
- { 5, 0, 1 },
- { 5, 2, 1 },
- { 5, 1, 2 },
- { 5, 2, 2 },
- { 6, 1, 3 },
- { 6, 3, 1 },
- { 6, 3, 2 },
- { 6, 2, 0 },
- { 6, 2, 3 },
- { 6, 0, 2 },
- { 6, 3, 3 },
- { 6, 3, 3 },
- { 7, 4, 1 },
- { 7, 1, 4 },
- { 7, 4, 2 },
- { 7, 2, 4 },
- { 7, 4, 3 },
- { 7, 3, 4 },
- { 7, 3, 0 },
- { 7, 0, 3 },
- { 7, 5, 1 },
- { 7, 5, 2 },
- { 7, 2, 5 },
- { 7, 4, 4 },
- { 7, 1, 5 },
- { 7, 5, 3 },
- { 7, 3, 5 },
- { 7, 3, 5 },
- { 7, 5, 4 },
- { 7, 5, 4 },
- { 8, 4, 5 },
- { 8, 6, 2 },
- { 8, 2, 6 },
- { 8, 6, 1 },
- { 8, 6, 3 },
- { 8, 3, 6 },
- { 8, 1, 6 },
- { 8, 4, 16 },
- { 8, 3, 16 },
- { 8, 16, 5 },
- { 8, 16, 3 },
- { 8, 16, 4 },
- { 8, 6, 4 },
- { 8, 16, 6 },
- { 8, 4, 0 },
- { 8, 4, 6 },
- { 8, 0, 4 },
- { 8, 2, 16 },
- { 8, 5, 5 },
- { 8, 5, 16 },
- { 8, 16, 7 },
- { 8, 16, 2 },
- { 8, 16, 8 },
- { 8, 2, 7 },
- { 8, 7, 2 },
- { 8, 3, 7 },
- { 8, 6, 5 },
- { 8, 5, 6 },
- { 8, 6, 16 },
- { 8, 16, 10 },
- { 8, 7, 3 },
- { 8, 7, 1 },
- { 8, 16, 9 },
- { 8, 7, 16 },
- { 8, 1, 16 },
- { 8, 1, 7 },
- { 8, 4, 7 },
- { 8, 16, 11 },
- { 8, 7, 4 },
- { 8, 16, 12 },
- { 8, 8, 16 },
- { 8, 16, 1 },
- { 8, 6, 6 },
- { 8, 9, 16 },
- { 8, 2, 8 },
- { 8, 5, 7 },
- { 8, 10, 16 },
- { 8, 16, 13 },
- { 8, 8, 3 },
- { 8, 8, 2 },
- { 8, 3, 8 },
- { 8, 5, 0 },
- { 8, 16, 14 },
- { 8, 16, 14 },
- { 8, 11, 16 },
- { 8, 11, 16 },
- { 8, 7, 5 },
- { 8, 7, 5 },
- { 8, 4, 8 },
- { 8, 4, 8 },
- { 8, 6, 7 },
- { 8, 6, 7 },
- { 8, 7, 6 },
- { 8, 7, 6 },
- { 8, 0, 5 },
- { 8, 0, 5 },
- { 9, 8, 4 },
- { 9, 16, 15 },
- { 9, 12, 16 },
- { 9, 1, 8 },
- { 9, 8, 1 },
- { 9, 14, 16 },
- { 9, 5, 8 },
- { 9, 13, 16 },
- { 9, 3, 9 },
- { 9, 8, 5 },
- { 9, 7, 7 },
- { 9, 2, 9 },
- { 9, 8, 6 },
- { 9, 9, 2 },
- { 9, 9, 3 },
- { 9, 15, 16 },
- { 9, 4, 9 },
- { 9, 6, 8 },
- { 9, 6, 0 },
- { 9, 9, 4 },
- { 9, 5, 9 },
- { 9, 8, 7 },
- { 9, 7, 8 },
- { 9, 1, 9 },
- { 9, 10, 3 },
- { 9, 0, 6 },
- { 9, 10, 2 },
- { 9, 9, 1 },
- { 9, 9, 5 },
- { 9, 4, 10 },
- { 9, 2, 10 },
- { 9, 9, 6 },
- { 9, 3, 10 },
- { 9, 6, 9 },
- { 9, 10, 4 },
- { 9, 8, 8 },
- { 9, 10, 5 },
- { 9, 9, 7 },
- { 9, 11, 3 },
- { 9, 1, 10 },
- { 9, 7, 0 },
- { 9, 10, 6 },
- { 9, 7, 9 },
- { 9, 3, 11 },
- { 9, 5, 10 },
- { 9, 10, 1 },
- { 9, 4, 11 },
- { 9, 11, 2 },
- { 9, 13, 2 },
- { 9, 6, 10 },
- { 9, 13, 3 },
- { 9, 13, 3 },
- { 9, 2, 11 },
- { 9, 2, 11 },
- { 9, 16, 0 },
- { 9, 16, 0 },
- { 9, 5, 11 },
- { 9, 5, 11 },
- { 9, 11, 5 },
- { 9, 11, 5 },
- { 10, 11, 4 },
- { 10, 9, 8 },
- { 10, 7, 10 },
- { 10, 8, 9 },
- { 10, 0, 16 },
- { 10, 4, 13 },
- { 10, 0, 7 },
- { 10, 3, 13 },
- { 10, 11, 6 },
- { 10, 13, 1 },
- { 10, 13, 4 },
- { 10, 12, 3 },
- { 10, 2, 13 },
- { 10, 13, 5 },
- { 10, 8, 10 },
- { 10, 6, 11 },
- { 10, 10, 8 },
- { 10, 10, 7 },
- { 10, 14, 2 },
- { 10, 12, 4 },
- { 10, 1, 11 },
- { 10, 4, 12 },
- { 10, 11, 1 },
- { 10, 3, 12 },
- { 10, 1, 13 },
- { 10, 12, 2 },
- { 10, 7, 11 },
- { 10, 3, 14 },
- { 10, 5, 12 },
- { 10, 5, 13 },
- { 10, 14, 4 },
- { 10, 4, 14 },
- { 10, 11, 7 },
- { 10, 14, 3 },
- { 10, 12, 5 },
- { 10, 13, 6 },
- { 10, 12, 6 },
- { 10, 8, 0 },
- { 10, 11, 8 },
- { 10, 2, 12 },
- { 10, 9, 9 },
- { 10, 14, 5 },
- { 10, 6, 13 },
- { 10, 10, 10 },
- { 10, 15, 2 },
- { 10, 8, 11 },
- { 10, 9, 10 },
- { 10, 14, 6 },
- { 10, 10, 9 },
- { 10, 5, 14 },
- { 10, 11, 9 },
- { 10, 14, 1 },
- { 10, 2, 14 },
- { 10, 6, 12 },
- { 10, 1, 12 },
- { 10, 13, 8 },
- { 10, 0, 8 },
- { 10, 13, 7 },
- { 10, 7, 12 },
- { 10, 12, 7 },
- { 10, 7, 13 },
- { 10, 15, 3 },
- { 10, 12, 1 },
- { 10, 6, 14 },
- { 10, 2, 15 },
- { 10, 15, 5 },
- { 10, 15, 4 },
- { 10, 1, 14 },
- { 10, 9, 11 },
- { 10, 4, 15 },
- { 10, 14, 7 },
- { 10, 8, 13 },
- { 10, 13, 9 },
- { 10, 8, 12 },
- { 10, 5, 15 },
- { 10, 3, 15 },
- { 10, 10, 11 },
- { 10, 11, 10 },
- { 10, 12, 8 },
- { 10, 15, 6 },
- { 10, 15, 7 },
- { 10, 8, 14 },
- { 10, 15, 1 },
- { 10, 7, 14 },
- { 10, 9, 0 },
- { 10, 0, 9 },
- { 10, 9, 13 },
- { 10, 9, 13 },
- { 10, 9, 13 },
- { 10, 9, 13 },
- { 10, 9, 12 },
- { 10, 9, 12 },
- { 10, 9, 12 },
- { 10, 9, 12 },
- { 10, 12, 9 },
- { 10, 12, 9 },
- { 10, 12, 9 },
- { 10, 12, 9 },
- { 10, 14, 8 },
- { 10, 14, 8 },
- { 10, 14, 8 },
- { 10, 14, 8 },
- { 10, 10, 13 },
- { 10, 10, 13 },
- { 10, 10, 13 },
- { 10, 10, 13 },
- { 10, 14, 9 },
- { 10, 14, 9 },
- { 10, 14, 9 },
- { 10, 14, 9 },
- { 10, 12, 10 },
- { 10, 12, 10 },
- { 10, 12, 10 },
- { 10, 12, 10 },
- { 10, 6, 15 },
- { 10, 6, 15 },
- { 10, 6, 15 },
- { 10, 6, 15 },
- { 10, 7, 15 },
- { 10, 7, 15 },
- { 10, 7, 15 },
- { 10, 7, 15 },
- { 11, 9, 14 },
- { 11, 9, 14 },
- { 11, 15, 8 },
- { 11, 15, 8 },
- { 11, 11, 11 },
- { 11, 11, 11 },
- { 11, 11, 14 },
- { 11, 11, 14 },
- { 11, 1, 15 },
- { 11, 1, 15 },
- { 11, 10, 12 },
- { 11, 10, 12 },
- { 11, 10, 14 },
- { 11, 10, 14 },
- { 11, 13, 11 },
- { 11, 13, 11 },
- { 11, 13, 10 },
- { 11, 13, 10 },
- { 11, 11, 13 },
- { 11, 11, 13 },
- { 11, 11, 12 },
- { 11, 11, 12 },
- { 11, 8, 15 },
- { 11, 8, 15 },
- { 11, 14, 11 },
- { 11, 14, 11 },
- { 11, 13, 12 },
- { 11, 13, 12 },
- { 11, 12, 13 },
- { 11, 12, 13 },
- { 11, 15, 9 },
- { 11, 15, 9 },
- { 11, 14, 10 },
- { 11, 14, 10 },
- { 11, 10, 0 },
- { 11, 10, 0 },
- { 11, 12, 11 },
- { 11, 12, 11 },
- { 11, 9, 15 },
- { 11, 9, 15 },
- { 11, 0, 10 },
- { 11, 0, 10 },
- { 11, 12, 12 },
- { 11, 12, 12 },
- { 11, 11, 0 },
- { 11, 11, 0 },
- { 11, 12, 14 },
- { 11, 12, 14 },
- { 11, 10, 15 },
- { 11, 10, 15 },
- { 11, 13, 13 },
- { 11, 13, 13 },
- { 11, 0, 13 },
- { 11, 0, 13 },
- { 11, 14, 12 },
- { 11, 14, 12 },
- { 11, 15, 10 },
- { 11, 15, 10 },
- { 11, 15, 11 },
- { 11, 15, 11 },
- { 11, 11, 15 },
- { 11, 11, 15 },
- { 11, 14, 13 },
- { 11, 14, 13 },
- { 11, 13, 0 },
- { 11, 13, 0 },
- { 11, 0, 11 },
- { 11, 0, 11 },
- { 11, 13, 14 },
- { 11, 13, 14 },
- { 11, 15, 12 },
- { 11, 15, 12 },
- { 11, 15, 13 },
- { 11, 15, 13 },
- { 11, 12, 15 },
- { 11, 12, 15 },
- { 11, 14, 0 },
- { 11, 14, 0 },
- { 11, 14, 14 },
- { 11, 14, 14 },
- { 11, 13, 15 },
- { 11, 13, 15 },
- { 11, 12, 0 },
- { 11, 12, 0 },
- { 11, 14, 15 },
- { 11, 14, 15 },
- { 12, 0, 14 },
- { 12, 0, 12 },
- { 12, 15, 14 },
- { 12, 15, 0 },
- { 12, 0, 15 },
- { 12, 15, 15 },
-};
-
-//---------------------------------------------------------------------------
-const int8u hcb_2step_Bytes[]=
-{
- 0, 5, 5, 0, 5, 0, 5, 0, 5, 0, 6, 5
-};
-
-const hcb_struct_1* hcb_2step[]=
-{
- 0, huffman_01_1, huffman_02_1, 0, huffman_04_1, 0, huffman_06_1, 0, huffman_08_1, 0, huffman_10_1, huffman_11_1
-};
-
-//---------------------------------------------------------------------------
-const int16u hcb_table_size[]=
-{
- 0, 114, 86, 161, 185, 161, 126, 127, 83, 337, 210, 374
-};
-const hcb_struct* hcb_table[]=
-{
- 0, huffman_01, huffman_02, huffman_03, huffman_04, huffman_05, huffman_06, huffman_07, huffman_08, huffman_09, huffman_10, huffman_11
-};
-
-//***************************************************************************
-// PRED_SFB_MAX
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const int8u Aac_PRED_SFB_MAX[16]=
-{
- 33, 33, 38, 40, 40, 40, 41, 41, 37, 37, 37, 34, 64, 64, 64, 64
-};
-
-//***************************************************************************
-// swb offsets
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-struct Aac_swb_offset
-{
- int8u num_swb;
- int16u swb_offset[64];
-};
-
-//---------------------------------------------------------------------------
-const Aac_swb_offset Aac_swb_short_window_96[] =
-{
- {
- 12,
- {
- 0, 4, 8, 12, 16, 20, 24, 32, 40, 48,
- 64, 92, 128
- }
- }
-};
-
-const Aac_swb_offset Aac_swb_short_window_64[] =
-{
- {
- 12,
- {
- 0, 4, 8, 12, 16, 20, 24, 32, 40, 48,
- 64, 92, 128
- }
- }
-};
-
-const Aac_swb_offset Aac_swb_short_window_48[] =
-{
- {
- 14,
- {
- 0, 4, 8, 12, 16, 20, 28, 36, 44, 56,
- 68, 80, 96, 112, 128
- }
- }
-};
-
-const Aac_swb_offset Aac_swb_short_window_24[] =
-{
- {
- 15,
- {
- 0, 4, 8, 12, 16, 20, 24, 28, 36, 44,
- 52, 64, 76, 92, 108, 128
- }
- }
-};
-
-const Aac_swb_offset Aac_swb_short_window_16[] =
-{
- {
- 15,
- {
- 0, 4, 8, 12, 16, 20, 24, 28, 32, 40,
- 48, 60, 72, 88, 108, 128
- }
- }
-};
-
-const Aac_swb_offset Aac_swb_short_window_8[] =
-{
- {
- 15,
- {
- 0, 4, 8, 12, 16, 20, 24, 28, 36, 44,
- 52, 60, 72, 88, 108, 128
- }
- }
-};
-
-const Aac_swb_offset* Aac_swb_offset_short_window[13] =
-{
- Aac_swb_short_window_96, //96000
- Aac_swb_short_window_96, //88200
- Aac_swb_short_window_64, //64000
- Aac_swb_short_window_48, //48000
- Aac_swb_short_window_48, //44100
- Aac_swb_short_window_48, //32000
- Aac_swb_short_window_24, //24000
- Aac_swb_short_window_24, //22050
- Aac_swb_short_window_16, //16000
- Aac_swb_short_window_16, //12000
- Aac_swb_short_window_16, //11025
- Aac_swb_short_window_8, //8000
- Aac_swb_short_window_8 //7350
-};
-
-//---------------------------------------------------------------------------
-const Aac_swb_offset Aac_swb_long_window_96[]=
-{
- {
- 41,
- {
- 0, 4, 8, 12, 16, 20, 24, 28, 32, 36,
- 40, 44, 48, 52, 56, 64, 72, 80, 88, 96,
- 108, 120, 132, 144, 156, 172, 188, 212, 240, 276,
- 320, 384, 448, 512, 576, 640, 704, 768, 832, 896,
- 960, 1024
- }
- }
-};
-
-const Aac_swb_offset Aac_swb_long_window_64[]=
-{
- {
- 47,
- {
- 0, 4, 8, 12, 16, 20, 24, 28, 32, 36,
- 40, 44, 48, 52, 56, 64, 72, 80, 88, 100,
- 112, 124, 140, 156, 172, 192, 216, 240, 268, 304,
- 344, 384, 424, 464, 504, 544, 584, 624, 664, 704,
- 744, 784, 824, 864, 904, 944, 984, 1024
- }
- }
-};
-//---------------------------------------------------------------------------
-const Aac_swb_offset Aac_swb_long_window_48[]=
-{
- {
- 49,
- {
- 0, 4, 8, 12, 16, 20, 24, 28, 32, 36,
- 40, 48, 56, 64, 72, 80, 88, 96, 108, 120,
- 132, 144, 160, 176, 196, 216, 240, 264, 292, 320,
- 352, 384, 416, 448, 480, 512, 544, 576, 608, 640,
- 672, 704, 736, 768, 800, 832, 864, 896, 928, 1024
- }
- }
-};
-//---------------------------------------------------------------------------
-const Aac_swb_offset Aac_swb_long_window_32[]=
-{
- {
- 51,
- {
- 0, 4, 8, 12, 16, 20, 24, 28, 32, 36,
- 40, 48, 56, 64, 72, 80, 88, 96, 108, 120,
- 132, 144, 160, 176, 196, 216, 240, 264, 292, 320,
- 352, 384, 416, 448, 480, 512, 544, 576, 608, 640,
- 672, 704, 736, 768, 800, 832, 864, 896, 928, 960,
- 992, 1024
- }
- }
-};
-//---------------------------------------------------------------------------
-const Aac_swb_offset Aac_swb_long_window_24[]=
-{
- {
- 47,
- {
- 0, 4, 8, 12, 16, 20, 24, 28, 32, 36,
- 40, 44, 52, 60, 68, 76, 84, 92, 100, 108,
- 116, 124, 136, 148, 160, 172, 188, 204, 220, 240,
- 260, 284, 308, 336, 364, 396, 432, 468, 508, 552,
- 600, 652, 704, 768, 832, 896, 960, 1024
- }
- }
-};
-//---------------------------------------------------------------------------
-const Aac_swb_offset Aac_swb_long_window_16[]=
-{
- {
- 43,
- {
- 0, 8, 16, 24, 32, 40, 48, 56, 64, 72,
- 80, 88, 100, 112, 124, 136, 148, 160, 172, 184,
- 196, 212, 228, 244, 260, 280, 300, 320, 344, 368,
- 396, 424, 456, 492, 532, 572, 616, 664, 716, 772,
- 832, 896, 960, 1024
- }
- }
-};
-//---------------------------------------------------------------------------
-const Aac_swb_offset Aac_swb_long_window_8[]=
-{
- {
- 40,
- {
- 0, 12, 24, 36, 48, 60, 72, 84, 96, 108,
- 120, 132, 144, 156, 172, 188, 204, 220, 236, 252,
- 268, 288, 308, 328, 348, 372, 396, 420, 448, 476,
- 508, 544, 580, 620, 664, 712, 764, 820, 880, 944,
- 1024
- }
- }
-};
-
-//---------------------------------------------------------------------------
-const Aac_swb_offset* Aac_swb_offset_long_window[13]=
-{
- Aac_swb_long_window_96, //96000
- Aac_swb_long_window_96, //88200
- Aac_swb_long_window_64, //64000
- Aac_swb_long_window_48, //48000
- Aac_swb_long_window_48, //44100
- Aac_swb_long_window_32, //32000
- Aac_swb_long_window_24, //24000
- Aac_swb_long_window_24, //22050
- Aac_swb_long_window_16, //16000
- Aac_swb_long_window_16, //12000
- Aac_swb_long_window_16, //11025
- Aac_swb_long_window_8, //8000
- Aac_swb_long_window_8 //7350
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.cpp
deleted file mode 100644
index 8f275f278..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.cpp
+++ /dev/null
@@ -1,753 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AAC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Aac.h"
-#include "MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.h"
-#include <cmath>
-#include <algorithm>
-#include <cstring>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern const char* Aac_audioObjectType(int8u audioObjectType);
-
-//---------------------------------------------------------------------------
-int8u Aac_AudioSpecificConfig_sampling_frequency_index(const int32u sampling_frequency);
-
-//---------------------------------------------------------------------------
-// Master frequency band table
-// k0 = lower frequency boundary
-int8u Aac_k0_Compute(int8u bs_start_freq, int8u extension_sampling_frequency_index)
-{
- return Aac_k0_startMin[extension_sampling_frequency_index]+Aac_k0_offset[extension_sampling_frequency_index][bs_start_freq];
-}
-
-//---------------------------------------------------------------------------
-// Master frequency band table
-// k2 = upper frequency boundary
-int8u Aac_k2_Compute(int8u bs_stop_freq, int8u extension_sampling_frequency_index, int8u k0)
-{
- switch (bs_stop_freq)
- {
- case 14 : return (int8u)min(64, 2*k0);
- case 15 : return (int8u)min(64, 3*k0);
- default : ;
- }
-
- return (int8u)min(64, Aac_k2_stopMin[extension_sampling_frequency_index]+Aac_k2_offset[extension_sampling_frequency_index][bs_stop_freq]);
-}
-
-//---------------------------------------------------------------------------
-//Helper
-int8u Aac_bands_Compute(bool warp, int8u bands, int8u a0, int8u a1)
-{
- float div=(float)log(2.0);
- if (warp)
- div*=(float)1.3;
-
- return (int8u)(bands*log((float)a1/(float)a0)/div+0.5);
-}
-
-//---------------------------------------------------------------------------
-// Master frequency band table
-// Computing for bs_freq_scale = 0
-bool Aac_f_master_Compute_0(int8u &num_env_bands_Master, int8u* f_Master, sbr_handler *sbr, int8u k0, int8u k2)
-{
- int8u dk, numBands;
- if (sbr->bs_alter_scale)
- {
- dk=1;
- numBands=(((k2-k0+2)>>2)<<1);
- }
- else
- {
- dk=2;
- numBands=(((k2-k0)>>1)<<1);
- }
-
- int8u k2Achieved=k0+numBands*dk;
- int8s k2Diff=k2-k2Achieved;
- int8s vDk[64] = { 0 };
- for (int8u k=0; k<numBands; k++)
- vDk[k]=dk;
-
- if (k2Diff)
- {
- int8s incr;
- int8u k;
- if (k2Diff>0)
- {
- incr=-1;
- k=numBands-1;
- }
- else
- {
- incr=1;
- k=0;
- }
-
- while (k2Diff)
- {
- if (k >= 64)
- break;
- vDk[k]-=incr;
- k+=incr;
- k2Diff+=incr;
- }
- }
-
- f_Master[0]=k0;
- for (int8u k=1; k<=numBands; k++)
- f_Master[k]=f_Master[k-1]+vDk[k-1];
-
- num_env_bands_Master=numBands;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-// Master frequency band table
-// Computing for bs_freq_scale != 0
-int int8u_cmp(const void *a, const void *b)
-{
- return ((int8u)(*(int8u*)a - *(int8u*)b));
-}
-bool Aac_f_master_Compute(int8u &num_env_bands_Master, int8u* f_Master, sbr_handler *sbr, int8u k0, int8u k2)
-{
- int8u temp1[]={6, 5, 4 };
- int8u bands=temp1[sbr->bs_freq_scale-1];
-
- int8u twoRegions, k1;
- if ((float)k2/(float)k0>2.2449)
- {
- twoRegions=1;
- k1=2*k0;
- }
- else
- {
- twoRegions=0;
- k1=k2;
- }
-
- int8u numBands0=2*Aac_bands_Compute(false, bands, k0, k1);
- if (numBands0 == 0 || numBands0 >= 64)
- return false;
-
- int8u vDk0[64];
- int8u vk0[64];
- float Power=pow((float)k1/(float)k0, (float)1/(float)numBands0);
- float Power2=(float)k0;
- int8s Temp1=(int8s)(Power2+0.5);
- for (int8u k=0; k<=numBands0-1; k++)
- {
- int8s Temp0=Temp1;
- Power2*=Power;
- Temp1=(int8s)(Power2+0.5);
- vDk0[k]=Temp1-Temp0;
- }
- qsort(vDk0, numBands0, sizeof(int8u), int8u_cmp);
- vk0[0]=k0;
- for (int8u k=1; k<=numBands0; k++)
- {
- if (vDk0[k-1]==0)
- return false;
- vk0[k]=vk0[k-1]+vDk0[k-1];
- }
-
- if (!twoRegions)
- {
- for (int8u k=0; k<=numBands0; k++)
- f_Master[k]=vk0[k];
- num_env_bands_Master=numBands0;
- return true;
- }
-
- //With twoRegions
- int8u numBands1;
- int8u vDk1[64] = { 0 };
- int8u vk1[64];
- numBands1=2*Aac_bands_Compute(true, bands, k1, k2);
- if (numBands1 == 0 || numBands0 + numBands1 >= 64)
- return false;
-
- Power=(float)pow((float)k2/(float)k1, (float)1/(float)numBands1);
- Power2=(float)k1;
- Temp1=(int8s)(Power2+0.5);
- for (int8u k=0; k<=numBands1-1; k++)
- {
- int8s Temp0=Temp1;
- Power2*=Power;
- Temp1=(int8s)(Power2+0.5);
- vDk1[k]=Temp1-Temp0;
- }
-
- if (vDk1[0]<vDk0[numBands0-1])
- {
- qsort(vDk1, numBands1+1, sizeof(int8u), int8u_cmp);
- int8u change=vDk0[numBands0-1]-vDk1[0];
- vDk1[0]=vDk0[numBands0-1];
- vDk1[numBands1 - 1] = vDk1[numBands1 - 1] - change;
- }
-
- qsort(vDk1, numBands1, sizeof(int8u), int8u_cmp);
- vk1[0]=k1;
- for (int8u k=1; k<=numBands1; k++)
- {
- if (vDk1[k-1]==0)
- return false;
- vk1[k]=vk1[k-1]+vDk1[k-1];
- }
-
- num_env_bands_Master=numBands0+numBands1;
- for (int8u k=0; k<=numBands0; k++)
- f_Master[k]=vk0[k];
- for (int8u k=numBands0+1; k <=num_env_bands_Master; k++)
- f_Master[k]=vk1[k-numBands0];
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-// Derived frequency border tables
-bool Aac_bands_Compute(int8u &num_env_bands_Master, int8u* f_Master, sbr_handler *sbr, int8u k2)
-{
- sbr->num_env_bands[1]=num_env_bands_Master-sbr->bs_xover_band;
- sbr->num_env_bands[0]=(sbr->num_env_bands[1]>>1)+(sbr->num_env_bands[1]-((sbr->num_env_bands[1]>>1)<<1));
-
- if (f_Master[sbr->bs_xover_band]>32)
- return false;
-
- if (sbr->bs_noise_bands==0)
- sbr->num_noise_bands=1;
- else
- {
- sbr->num_noise_bands=Aac_bands_Compute(false, sbr->bs_noise_bands, f_Master[sbr->bs_xover_band], k2);
- if (sbr->num_noise_bands<1 || sbr->num_noise_bands>5)
- return false;
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool Aac_Sbr_Compute(sbr_handler *sbr, int8u extension_sampling_frequency_index)
-{
- if (extension_sampling_frequency_index>=9)
- return 0; //Not supported
- int8u k0=Aac_k0_Compute(sbr->bs_start_freq, extension_sampling_frequency_index);
- int8u k2=Aac_k2_Compute(sbr->bs_stop_freq, extension_sampling_frequency_index, k0);
- if (k2<=k0) return false;
- switch (extension_sampling_frequency_index)
- {
- case 0 :
- case 1 :
- case 2 :
- case 3 : if ((k2-k0)>32) return false; break;
- case 4 : if ((k2-k0)>35) return false; break;
- case 5 :
- case 6 :
- case 7 :
- case 8 : if ((k2-k0)>48) return false; break;
- default : ;
- }
-
- int8u num_env_bands_Master;
- int8u f_Master[64];
- if (sbr->bs_freq_scale==0)
- {
- if (!Aac_f_master_Compute_0(num_env_bands_Master, f_Master, sbr, k0, k2))
- return false;
- }
- else
- {
- if (!Aac_f_master_Compute(num_env_bands_Master, f_Master, sbr, k0, k2))
- return false;
- }
- if (num_env_bands_Master<=sbr->bs_xover_band)
- return false;
- if (!Aac_bands_Compute(num_env_bands_Master, f_Master, sbr, k2))
- return false;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-int16u File_Aac::sbr_huff_dec(sbr_huffman Table, const char* Name)
-{
- int8u bit;
- int16s index = 0;
-
- Element_Begin1(Name);
- while (index>=0)
- {
- Get_S1(1, bit, "bit");
- index=Table[index][bit];
- }
- Element_End0();
-
- return index+64;
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::sbr_extension_data(size_t End, int8u id_aac, bool crc_flag)
-{
- FILLING_BEGIN();
- if (Infos["Format_Settings_SBR"].empty())
- {
- Infos["Format_Profile"]=__T("HE-AAC");
- Ztring SamplingRate=Infos["SamplingRate"];
- if (SamplingRate.empty())
- SamplingRate.From_Number(sampling_frequency);
- Infos["SamplingRate"].From_Number((extension_sampling_frequency_index==(int8u)-1)?(sampling_frequency*2):extension_sampling_frequency, 10);
- if (MediaInfoLib::Config.LegacyStreamDisplay_Get())
- {
- Infos["Format_Profile"]+=__T(" / LC");
- Infos["SamplingRate"]+=__T(" / ")+SamplingRate;
- }
- Infos["Format_Settings_SBR"]=__T("Yes (Implicit)");
- Infos["Codec"]=Ztring().From_Local(Aac_audioObjectType(audioObjectType))+__T("-SBR");
-
- if (Frame_Count_Valid<32)
- Frame_Count_Valid=32; //We need to find the SBR header
- }
- FILLING_END();
-
- Element_Begin1("sbr_extension_data");
- bool bs_header_flag;
- if (crc_flag)
- Skip_S2(10, "bs_sbr_crc_bits");
- //~ if (sbr_layer != SBR_STEREO_ENHANCE)
- //~ {
- Get_SB(bs_header_flag, "bs_header_flag");
- if (bs_header_flag)
- {
- if (extension_sampling_frequency_index==(int8u)-1)
- {
- extension_sampling_frequency=sampling_frequency*2;
- extension_sampling_frequency_index=Aac_AudioSpecificConfig_sampling_frequency_index(extension_sampling_frequency);
- }
-
- delete sbr;
- sbr=new sbr_handler;
-
- sbr_header();
-
- if (!Aac_Sbr_Compute(sbr, extension_sampling_frequency_index))
- {
- delete sbr; sbr=NULL;
- }
- }
- //~ }
-
- //Parsing
- if (sbr) //only if a header is found
- {
- sbr->bs_amp_res[0]=sbr->bs_amp_res_FromHeader; //Set up with header data
- sbr->bs_amp_res[1]=sbr->bs_amp_res_FromHeader; //Set up with header data
- sbr_data(id_aac);
-
- FILLING_BEGIN();
- if (MediaInfoLib::Config.ParseSpeed_Get()<0.3)
- {
- Frame_Count_Valid=Frame_Count+1;
- if (Frame_Count<8)
- Frame_Count_Valid+=8-Frame_Count;
- }
- FILLING_END();
- }
- if (Data_BS_Remain()>End)
- Skip_BS(Data_BS_Remain()-End, "bs_fill_bits");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::sbr_header()
-{
- Element_Begin1("sbr_header");
- Get_S1 (1, sbr->bs_amp_res_FromHeader, "bs_amp_res");
- Get_S1 (4, sbr->bs_start_freq, "bs_start_freq");
- Get_S1 (4, sbr->bs_stop_freq, "bs_stop_freq");
- Get_S1 (3, sbr->bs_xover_band, "bs_xover_band");
- Skip_S1(2, "bs_reserved");
- bool bs_header_extra_1, bs_header_extra_2;
- Get_SB (bs_header_extra_1, "bs_header_extra_1");
- Get_SB (bs_header_extra_2, "bs_header_extra_2");
- if(bs_header_extra_1)
- {
- Get_S1 (2, sbr->bs_freq_scale, "bs_freq_scale");
- Get_S1 (1, sbr->bs_alter_scale, "bs_alter_scale");
- Get_S1 (2, sbr->bs_noise_bands, "bs_noise_bands");
- }
- else
- {
- sbr->bs_freq_scale=2;
- sbr->bs_alter_scale=1;
- sbr->bs_noise_bands=2;
- }
- if(bs_header_extra_2)
- {
- Skip_S1(2, "bs_limiter_bands");
- Skip_S1(2, "bs_limiter_gains");
- Skip_SB( "bs_interpol_freq");
- Skip_SB( "bs_smoothing_mode");
- }
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::sbr_data(int8u id_aac)
-{
- Element_Begin1("sbr_data");
- switch (id_aac)
- {
- case 0 : sbr_single_channel_element(); break; //ID_SCE
- case 1 : sbr_channel_pair_element(); break; //ID_CPE
- default : ;
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::sbr_single_channel_element()
-{
- Element_Begin1("sbr_single_channel_element");
- bool bs_data_extra, bs_add_harmonic_flag, bs_extended_data;
- int8u bs_extension_size, bs_esc_count, bs_extension_id;
- Get_SB (bs_data_extra, "bs_data_extra");
- if (bs_data_extra)
- {
- Skip_S1(4, "bs_reserved");
- }
- sbr_grid(0);
- sbr_dtdf(0);
- sbr_invf(0);
- sbr_envelope(0, 0);
- sbr_noise(0, 0);
- Get_SB (bs_add_harmonic_flag, "bs_add_harmonic_flag[0]");
- if (bs_add_harmonic_flag)
- sbr_sinusoidal_coding(0);
-
- Get_SB (bs_extended_data, "bs_extended_data[0]");
- if (bs_extended_data) {
- Get_S1 (4,bs_extension_size, "bs_extension_size");
- size_t cnt=bs_extension_size;
- if (cnt==15)
- {
- Get_S1 (8, bs_esc_count, "bs_esc_count");
- cnt+=bs_esc_count;
- }
-
- if (Data_BS_Remain()>=8*cnt)
- {
- size_t End=Data_BS_Remain()-8*cnt;
- while (Data_BS_Remain()>End+7)
- {
- Get_S1 (2,bs_extension_id, "bs_extension_id");
- switch (bs_extension_id)
- {
- case 2 : ps_data(End); break; //EXTENSION_ID_PS
- default: ;
- }
- }
- if (End<Data_BS_Remain())
- Skip_BS(Data_BS_Remain()-End, "bs_fill_bits");
- }
- else
- Skip_BS(Data_BS_Remain(), "(Error)");
-
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::sbr_grid(bool ch)
-{
- Element_Begin1("sbr_grid");
- int8u bs_frame_class, bs_num_rel_0, bs_num_rel_1, tmp;
- int ptr_bits;
- Get_S1(2, bs_frame_class, "bs_frame_class");
- switch (bs_frame_class)
- {
- case 0 : //FIXFIX
- Get_S1 (2, tmp, "tmp");
- sbr->bs_num_env[ch]=(int8u)pow(2.0, tmp);
- if (sbr->bs_num_env[ch]==1)
- sbr->bs_amp_res[ch]=0;
- Get_SB ( sbr->bs_freq_res[ch][0], "bs_freq_res[ch][0]");
- for (int8u env=1; env<sbr->bs_num_env[ch]; env++)
- sbr->bs_freq_res[ch][env]=sbr->bs_freq_res[ch][0];
- break;
- case 1 : //FIXVAR
- Skip_S1(2, "bs_var_bord_1[ch]");
- Get_S1 (2, bs_num_rel_1, "bs_num_rel_1[ch]");
- sbr->bs_num_env[ch]=bs_num_rel_1+1;
- for (int8u rel=0; rel<sbr->bs_num_env[ch]-1; rel++) {
- Skip_S1(2, "tmp");
- }
- ptr_bits=(int8u)ceil(log((double)sbr->bs_num_env[ch]+1)/log((double)2));
- Skip_BS(ptr_bits, "bs_pointer[ch]");
- Element_Begin1("bs_freq_res[ch]");
- for (int8u env=0; env<sbr->bs_num_env[ch]; env++)
- Get_SB (sbr->bs_freq_res[ch][sbr->bs_num_env[ch]-1-env], "bs_freq_res[ch][bs_num_env[ch]-1-env]");
- Element_End0();
- break;
- case 2 : //VARFIX
- Skip_S1(2, "bs_var_bord_0[ch]");
- Get_S1 (2,bs_num_rel_0, "bs_num_rel_0[ch]");
- sbr->bs_num_env[ch] = bs_num_rel_0 + 1;
- for (int8u rel=0; rel<sbr->bs_num_env[ch]-1; rel++)
- Skip_S1(2, "tmp");
- ptr_bits=(int8u)ceil(log((double)sbr->bs_num_env[ch]+1)/log((double)2));
- Skip_BS(ptr_bits, "bs_pointer[ch]");
- Element_Begin1("bs_freq_res[ch]");
- for (int8u env = 0; env < sbr->bs_num_env[ch]; env++)
- Get_SB (sbr->bs_freq_res[ch][env], "bs_freq_res[ch][env]");
- Element_End0();
- break;
- case 3 : //VARVAR
- Skip_S1(2, "bs_var_bord_0[ch]");
- Skip_S1(2, "bs_var_bord_1[ch]");
- Get_S1 (2,bs_num_rel_0, "bs_num_rel_0[ch]");
- Get_S1 (2,bs_num_rel_1, "bs_num_rel_1[ch]");
- sbr->bs_num_env[ch] = bs_num_rel_0 + bs_num_rel_1 + 1;
- for (int8u rel=0; rel<bs_num_rel_0; rel++)
- Skip_S1(2, "tmp");
- for (int8u rel=0; rel<bs_num_rel_1; rel++)
- Skip_S1(2, "tmp");
- ptr_bits=(int8u)ceil(log((double)(sbr->bs_num_env[ch]+1))/log((double)2));
- Skip_BS(ptr_bits, "bs_pointer[ch]");
- Element_Begin1("bs_freq_res[ch]");
- for (int8u env=0; env<sbr->bs_num_env[ch]; env++)
- Get_SB (sbr->bs_freq_res[ch][env], "bs_freq_res[ch][env]");
- Element_End0();
- break;
- }
- if (sbr->bs_num_env[ch]>1)
- sbr->bs_num_noise[ch]=2;
- else
- sbr->bs_num_noise[ch]=1;
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::sbr_channel_pair_element()
-{
- Element_Begin1("sbr_channel_pair_element");
- bool bs_data_extra,bs_coupling,bs_add_harmonic_flag,bs_extended_data;
- int8u bs_extension_size,bs_esc_count,bs_extension_id;
- Get_SB (bs_data_extra, "bs_data_extra");
- if (bs_data_extra) {
- Skip_S1(4, "bs_reserved");
- Skip_S1(4, "bs_reserved");
- }
-
- Get_SB (bs_coupling, "bs_coupling");
- sbr_grid(0);
- if (bs_coupling)
- {
- //Coupling
- sbr->bs_num_env [1]=sbr->bs_num_env [0];
- sbr->bs_num_noise [1]=sbr->bs_num_noise [0];
- for (int8u env=0; env<sbr->bs_num_env[0]; env++)
- sbr->bs_freq_res[1][env]=sbr->bs_freq_res[0][env];
- }
- else
- sbr_grid(1);
- sbr_dtdf(0);
- sbr_dtdf(1);
- sbr_invf(0);
- if (!bs_coupling)
- sbr_invf(1);
- sbr_envelope(0, bs_coupling);
- if (bs_coupling)
- {
- sbr_noise(0, bs_coupling);
- sbr_envelope(1, bs_coupling);
- }
- else
- {
- sbr_envelope(1, bs_coupling);
- sbr_noise(0, bs_coupling);
- }
- sbr_noise(1, bs_coupling);
- Get_SB (bs_add_harmonic_flag, "bs_add_harmonic_flag[0]");
- if (bs_add_harmonic_flag)
- sbr_sinusoidal_coding(0);
- Get_SB (bs_add_harmonic_flag, "bs_add_harmonic_flag[1]");
- if (bs_add_harmonic_flag)
- sbr_sinusoidal_coding(1);
-
- Get_SB (bs_extended_data, "bs_extended_data");
- if (bs_extended_data) {
- Get_S1(4,bs_extension_size, "bs_extension_size");
- size_t cnt = bs_extension_size;
- if (cnt == 15)
- {
- Get_S1(8,bs_esc_count, "bs_esc_count");
- cnt += bs_esc_count;
- }
- if (Data_BS_Remain()>=8*cnt)
- {
- size_t End=Data_BS_Remain()-8*cnt;
- while (Data_BS_Remain()>End+7)
- {
- Get_S1 (2,bs_extension_id, "bs_extension_id");
- switch (bs_extension_id)
- {
- case 2 : ps_data(End); break; //EXTENSION_ID_PS
- default: ;
- }
- }
- if (End<Data_BS_Remain())
- Skip_BS(Data_BS_Remain()-End, "bs_fill_bits");
- }
- else
- Skip_BS(Data_BS_Remain(), "(Error)");
-
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::sbr_dtdf(bool ch)
-{
- Element_Begin1("sbr_dtdf");
- for (int env=0; env<sbr->bs_num_env[ch]; env++)
- Get_S1 (1, sbr->bs_df_env[ch][env], "bs_df_env[ch][env]");
- for (int noise=0; noise<sbr->bs_num_noise[ch]; noise++)
- Get_S1 (1, sbr->bs_df_noise[ch][noise], "bs_df_noise[ch][noise]");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::sbr_invf(bool)
-{
- Element_Begin1("sbr_invf");
- for (int n = 0; n<sbr->num_noise_bands; n++ )
- Skip_S1(2, "bs_invf_mode[ch][n]");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::sbr_envelope(bool ch, bool bs_coupling)
-{
- sbr_huffman t_huff, f_huff;
- Element_Begin1("sbr_envelope");
- if (bs_coupling && ch)
- {
- if (sbr->bs_amp_res[ch])
- {
- t_huff = t_huffman_env_bal_3_0dB;
- f_huff = f_huffman_env_bal_3_0dB;
- }
- else
- {
- t_huff = t_huffman_env_bal_1_5dB;
- f_huff = f_huffman_env_bal_1_5dB;
- }
- }
- else
- {
- if (sbr->bs_amp_res[ch])
- {
- t_huff = t_huffman_env_3_0dB;
- f_huff = f_huffman_env_3_0dB;
- }
- else
- {
- t_huff = t_huffman_env_1_5dB;
- f_huff = f_huffman_env_1_5dB;
- }
- }
-
- for (int8u env=0; env<sbr->bs_num_env[ch]; env++)
- {
- if (sbr->bs_df_env[ch][env] == 0)
- {
- if (bs_coupling && ch)
- Skip_S1(sbr->bs_amp_res[ch]?5:6, "bs_env_start_value_balance");
- else
- Skip_S1(sbr->bs_amp_res[ch]?6:7, "bs_env_start_value_level");
- for (int8u band = 1; band < sbr->num_env_bands[sbr->bs_freq_res[ch][env]]; band++)
- sbr_huff_dec(f_huff, "bs_data_env[ch][env][band]");
- }
- else
- {
- for (int8u band = 0; band < sbr->num_env_bands[sbr->bs_freq_res[ch][env]]; band++)
- sbr_huff_dec(t_huff, "bs_data_env[ch][env][band]");
- }
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::sbr_noise(bool ch, bool bs_coupling)
-{
- sbr_huffman t_huff, f_huff;
- Element_Begin1("sbr_noise");
- if (bs_coupling && ch)
- {
- t_huff = t_huffman_noise_bal_3_0dB;
- f_huff = f_huffman_env_bal_3_0dB;
- }
- else
- {
- t_huff = t_huffman_noise_3_0dB;
- f_huff = f_huffman_env_3_0dB;
- }
-
- for (int noise=0; noise<sbr->bs_num_noise[ch]; noise++)
- {
- if (sbr->bs_df_noise[ch][noise] == 0)
- {
- Skip_S1(5, (bs_coupling && ch)?"bs_noise_start_value_balance":"bs_noise_start_value_level");
- for (int8u band=1; band<sbr->num_noise_bands; band++)
- sbr_huff_dec(f_huff, "bs_data_noise[ch][noise][band]");
- }
- else
- {
- for (int8u band = 0; band < sbr->num_noise_bands; band++)
- sbr_huff_dec(t_huff, "bs_data_noise[ch][noise][band]");
- }
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::sbr_sinusoidal_coding(bool)
-{
- Element_Begin1("sbr_sinusoidal_coding");
- for (int8u n=0; n<sbr->num_env_bands[1]; n++)
- Skip_SB( "bs_add_harmonic[ch][n]");
- Element_End0();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_AAC_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.h
deleted file mode 100644
index abd73fac8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.h
+++ /dev/null
@@ -1,715 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Aac_GeneralAudio_SbrH
-#define MediaInfo_File_Aac_GeneralAudio_SbrH
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-const int8s t_huffman_env_1_5dB[120][2]=
-{
- { 1, 2 },
- { -64, -65 },
- { 3, 4 },
- { -63, -66 },
- { 5, 6 },
- { -62, -67 },
- { 7, 8 },
- { -61, -68 },
- { 9, 10 },
- { -60, -69 },
- { 11, 12 },
- { -59, -70 },
- { 13, 14 },
- { -58, -71 },
- { 15, 16 },
- { -57, -72 },
- { 17, 18 },
- { -73, -56 },
- { 19, 21 },
- { -74, 20 },
- { -55, -75 },
- { 22, 26 },
- { 23, 24 },
- { -54, -76 },
- { -77, 25 },
- { -53, -78 },
- { 27, 34 },
- { 28, 29 },
- { -52, -79 },
- { 30, 31 },
- { -80, -51 },
- { 32, 33 },
- { -83, -82 },
- { -81, -50 },
- { 35, 57 },
- { 36, 40 },
- { 37, 38 },
- { -88, -84 },
- { -48, 39 },
- { -90, -85 },
- { 41, 46 },
- { 42, 43 },
- { -49, -87 },
- { 44, 45 },
- { -89, -86 },
- {-124, -123 },
- { 47, 50 },
- { 48, 49 },
- {-122, -121 },
- {-120, -119 },
- { 51, 54 },
- { 52, 53 },
- {-118, -117 },
- {-116, -115 },
- { 55, 56 },
- {-114, -113 },
- {-112, -111 },
- { 58, 89 },
- { 59, 74 },
- { 60, 67 },
- { 61, 64 },
- { 62, 63 },
- {-110, -109 },
- {-108, -107 },
- { 65, 66 },
- {-106, -105 },
- {-104, -103 },
- { 68, 71 },
- { 69, 70 },
- {-102, -101 },
- {-100, -99 },
- { 72, 73 },
- { -98, -97 },
- { -96, -95 },
- { 75, 82 },
- { 76, 79 },
- { 77, 78 },
- { -94, -93 },
- { -92, -91 },
- { 80, 81 },
- { -47, -46 },
- { -45, -44 },
- { 83, 86 },
- { 84, 85 },
- { -43, -42 },
- { -41, -40 },
- { 87, 88 },
- { -39, -38 },
- { -37, -36 },
- { 90, 105 },
- { 91, 98 },
- { 92, 95 },
- { 93, 94 },
- { -35, -34 },
- { -33, -32 },
- { 96, 97 },
- { -31, -30 },
- { -29, -28 },
- { 99, 102 },
- { 100, 101 },
- { -27, -26 },
- { -25, -24 },
- { 103, 104 },
- { -23, -22 },
- { -21, -20 },
- { 106, 113 },
- { 107, 110 },
- { 108, 109 },
- { -19, -18 },
- { -17, -16 },
- { 111, 112 },
- { -15, -14 },
- { -13, -12 },
- { 114, 117 },
- { 115, 116 },
- { -11, -10 },
- { -9, -8 },
- { 118, 119 },
- { -7, -6 },
- { -5, -4 }
-};
-
-const int8s f_huffman_env_1_5dB[120][2]=
-{
- { 1, 2 },
- { -64, -65 },
- { 3, 4 },
- { -63, -66 },
- { 5, 6 },
- { -67, -62 },
- { 7, 8 },
- { -68, -61 },
- { 9, 10 },
- { -69, -60 },
- { 11, 13 },
- { -70, 12 },
- { -59, -71 },
- { 14, 16 },
- { -58, 15 },
- { -72, -57 },
- { 17, 19 },
- { -73, 18 },
- { -56, -74 },
- { 20, 23 },
- { 21, 22 },
- { -55, -75 },
- { -54, -53 },
- { 24, 27 },
- { 25, 26 },
- { -76, -52 },
- { -77, -51 },
- { 28, 31 },
- { 29, 30 },
- { -50, -78 },
- { -79, -49 },
- { 32, 36 },
- { 33, 34 },
- { -48, -47 },
- { -80, 35 },
- { -81, -82 },
- { 37, 47 },
- { 38, 41 },
- { 39, 40 },
- { -83, -46 },
- { -45, -84 },
- { 42, 44 },
- { -85, 43 },
- { -44, -43 },
- { 45, 46 },
- { -88, -87 },
- { -86, -90 },
- { 48, 66 },
- { 49, 56 },
- { 50, 53 },
- { 51, 52 },
- { -92, -42 },
- { -41, -39 },
- { 54, 55 },
- {-105, -89 },
- { -38, -37 },
- { 57, 60 },
- { 58, 59 },
- { -94, -91 },
- { -40, -36 },
- { 61, 63 },
- { -20, 62 },
- {-115, -110 },
- { 64, 65 },
- {-108, -107 },
- {-101, -97 },
- { 67, 89 },
- { 68, 75 },
- { 69, 72 },
- { 70, 71 },
- { -95, -93 },
- { -34, -27 },
- { 73, 74 },
- { -22, -17 },
- { -16, -124 },
- { 76, 82 },
- { 77, 79 },
- {-123, 78 },
- {-122, -121 },
- { 80, 81 },
- {-120, -119 },
- {-118, -117 },
- { 83, 86 },
- { 84, 85 },
- {-116, -114 },
- {-113, -112 },
- { 87, 88 },
- {-111, -109 },
- {-106, -104 },
- { 90, 105 },
- { 91, 98 },
- { 92, 95 },
- { 93, 94 },
- {-103, -102 },
- {-100, -99 },
- { 96, 97 },
- { -98, -96 },
- { -35, -33 },
- { 99, 102 },
- { 100, 101 },
- { -32, -31 },
- { -30, -29 },
- { 103, 104 },
- { -28, -26 },
- { -25, -24 },
- { 106, 113 },
- { 107, 110 },
- { 108, 109 },
- { -23, -21 },
- { -19, -18 },
- { 111, 112 },
- { -15, -14 },
- { -13, -12 },
- { 114, 117 },
- { 115, 116 },
- { -11, -10 },
- { -9, -8 },
- { 118, 119 },
- { -7, -6 },
- { -5, -4 }
-};
-
-const int8s t_huffman_env_bal_1_5dB[48][2]=
-{
- { -64, 1 },
- { -63, 2 },
- { -65, 3 },
- { -62, 4 },
- { -66, 5 },
- { -61, 6 },
- { -67, 7 },
- { -60, 8 },
- { -68, 9 },
- { 10, 11 },
- { -69, -59 },
- { 12, 13 },
- { -70, -58 },
- { 14, 28 },
- { 15, 21 },
- { 16, 18 },
- { -57, 17 },
- { -71, -56 },
- { 19, 20 },
- { -88, -87 },
- { -86, -85 },
- { 22, 25 },
- { 23, 24 },
- { -84, -83 },
- { -82, -81 },
- { 26, 27 },
- { -80, -79 },
- { -78, -77 },
- { 29, 36 },
- { 30, 33 },
- { 31, 32 },
- { -76, -75 },
- { -74, -73 },
- { 34, 35 },
- { -72, -55 },
- { -54, -53 },
- { 37, 41 },
- { 38, 39 },
- { -52, -51 },
- { -50, 40 },
- { -49, -48 },
- { 42, 45 },
- { 43, 44 },
- { -47, -46 },
- { -45, -44 },
- { 46, 47 },
- { -43, -42 },
- { -41, -40 }
-};
-
-const int8s f_huffman_env_bal_1_5dB[48][2]=
-{
- { -64, 1 },
- { -65, 2 },
- { -63, 3 },
- { -66, 4 },
- { -62, 5 },
- { -61, 6 },
- { -67, 7 },
- { -68, 8 },
- { -60, 9 },
- { 10, 11 },
- { -69, -59 },
- { -70, 12 },
- { -58, 13 },
- { 14, 17 },
- { -71, 15 },
- { -57, 16 },
- { -56, -73 },
- { 18, 32 },
- { 19, 25 },
- { 20, 22 },
- { -72, 21 },
- { -88, -87 },
- { 23, 24 },
- { -86, -85 },
- { -84, -83 },
- { 26, 29 },
- { 27, 28 },
- { -82, -81 },
- { -80, -79 },
- { 30, 31 },
- { -78, -77 },
- { -76, -75 },
- { 33, 40 },
- { 34, 37 },
- { 35, 36 },
- { -74, -55 },
- { -54, -53 },
- { 38, 39 },
- { -52, -51 },
- { -50, -49 },
- { 41, 44 },
- { 42, 43 },
- { -48, -47 },
- { -46, -45 },
- { 45, 46 },
- { -44, -43 },
- { -42, 47 },
- { -41, -40 }
-};
-
-const int8s t_huffman_env_3_0dB[62][2]=
-{
- { -64, 1 },
- { -65, 2 },
- { -63, 3 },
- { -66, 4 },
- { -62, 5 },
- { -67, 6 },
- { -61, 7 },
- { -68, 8 },
- { -60, 9 },
- { 10, 11 },
- { -69, -59 },
- { 12, 14 },
- { -70, 13 },
- { -71, -58 },
- { 15, 18 },
- { 16, 17 },
- { -72, -57 },
- { -73, -74 },
- { 19, 22 },
- { -56, 20 },
- { -55, 21 },
- { -54, -77 },
- { 23, 31 },
- { 24, 25 },
- { -75, -76 },
- { 26, 27 },
- { -78, -53 },
- { 28, 29 },
- { -52, -95 },
- { -94, 30 },
- { -93, -92 },
- { 32, 47 },
- { 33, 40 },
- { 34, 37 },
- { 35, 36 },
- { -91, -90 },
- { -89, -88 },
- { 38, 39 },
- { -87, -86 },
- { -85, -84 },
- { 41, 44 },
- { 42, 43 },
- { -83, -82 },
- { -81, -80 },
- { 45, 46 },
- { -79, -51 },
- { -50, -49 },
- { 48, 55 },
- { 49, 52 },
- { 50, 51 },
- { -48, -47 },
- { -46, -45 },
- { 53, 54 },
- { -44, -43 },
- { -42, -41 },
- { 56, 59 },
- { 57, 58 },
- { -40, -39 },
- { -38, -37 },
- { 60, 61 },
- { -36, -35 },
- { -34, -33 }
-};
-
-const int8s f_huffman_env_3_0dB[62][2]=
-{
- { -64, 1 },
- { -65, 2 },
- { -63, 3 },
- { -66, 4 },
- { -62, 5 },
- { -67, 6 },
- { 7, 8 },
- { -61, -68 },
- { 9, 10 },
- { -60, -69 },
- { 11, 12 },
- { -59, -70 },
- { 13, 14 },
- { -58, -71 },
- { 15, 16 },
- { -57, -72 },
- { 17, 19 },
- { -56, 18 },
- { -55, -73 },
- { 20, 24 },
- { 21, 22 },
- { -74, -54 },
- { -53, 23 },
- { -75, -76 },
- { 25, 30 },
- { 26, 27 },
- { -52, -51 },
- { 28, 29 },
- { -77, -79 },
- { -50, -49 },
- { 31, 39 },
- { 32, 35 },
- { 33, 34 },
- { -78, -46 },
- { -82, -88 },
- { 36, 37 },
- { -83, -48 },
- { -47, 38 },
- { -86, -85 },
- { 40, 47 },
- { 41, 44 },
- { 42, 43 },
- { -80, -44 },
- { -43, -42 },
- { 45, 46 },
- { -39, -87 },
- { -84, -40 },
- { 48, 55 },
- { 49, 52 },
- { 50, 51 },
- { -95, -94 },
- { -93, -92 },
- { 53, 54 },
- { -91, -90 },
- { -89, -81 },
- { 56, 59 },
- { 57, 58 },
- { -45, -41 },
- { -38, -37 },
- { 60, 61 },
- { -36, -35 },
- { -34, -33 }
-};
-
-const int8s t_huffman_env_bal_3_0dB[24][2]=
-{
- { -64, 1 },
- { -63, 2 },
- { -65, 3 },
- { -66, 4 },
- { -62, 5 },
- { -61, 6 },
- { -67, 7 },
- { -68, 8 },
- { -60, 9 },
- { 10, 16 },
- { 11, 13 },
- { -69, 12 },
- { -76, -75 },
- { 14, 15 },
- { -74, -73 },
- { -72, -71 },
- { 17, 20 },
- { 18, 19 },
- { -70, -59 },
- { -58, -57 },
- { 21, 22 },
- { -56, -55 },
- { -54, 23 },
- { -53, -52 }
-};
-
-const int8s f_huffman_env_bal_3_0dB[24][2]=
-{
- { -64, 1 },
- { -65, 2 },
- { -63, 3 },
- { -66, 4 },
- { -62, 5 },
- { -61, 6 },
- { -67, 7 },
- { -68, 8 },
- { -60, 9 },
- { 10, 13 },
- { -69, 11 },
- { -59, 12 },
- { -58, -76 },
- { 14, 17 },
- { 15, 16 },
- { -75, -74 },
- { -73, -72 },
- { 18, 21 },
- { 19, 20 },
- { -71, -70 },
- { -57, -56 },
- { 22, 23 },
- { -55, -54 },
- { -53, -52 }
-};
-
-const int8s t_huffman_noise_3_0dB[62][2]=
-{
- { -64, 1 },
- { -63, 2 },
- { -65, 3 },
- { -66, 4 },
- { -62, 5 },
- { -67, 6 },
- { 7, 8 },
- { -61, -68 },
- { 9, 30 },
- { 10, 15 },
- { -60, 11 },
- { -69, 12 },
- { 13, 14 },
- { -59, -53 },
- { -95, -94 },
- { 16, 23 },
- { 17, 20 },
- { 18, 19 },
- { -93, -92 },
- { -91, -90 },
- { 21, 22 },
- { -89, -88 },
- { -87, -86 },
- { 24, 27 },
- { 25, 26 },
- { -85, -84 },
- { -83, -82 },
- { 28, 29 },
- { -81, -80 },
- { -79, -78 },
- { 31, 46 },
- { 32, 39 },
- { 33, 36 },
- { 34, 35 },
- { -77, -76 },
- { -75, -74 },
- { 37, 38 },
- { -73, -72 },
- { -71, -70 },
- { 40, 43 },
- { 41, 42 },
- { -58, -57 },
- { -56, -55 },
- { 44, 45 },
- { -54, -52 },
- { -51, -50 },
- { 47, 54 },
- { 48, 51 },
- { 49, 50 },
- { -49, -48 },
- { -47, -46 },
- { 52, 53 },
- { -45, -44 },
- { -43, -42 },
- { 55, 58 },
- { 56, 57 },
- { -41, -40 },
- { -39, -38 },
- { 59, 60 },
- { -37, -36 },
- { -35, 61 },
- { -34, -33 }
-};
-
-const int8s t_huffman_noise_bal_3_0dB[24][2]=
-{
- { -64, 1 },
- { -65, 2 },
- { -63, 3 },
- { 4, 9 },
- { -66, 5 },
- { -62, 6 },
- { 7, 8 },
- { -76, -75 },
- { -74, -73 },
- { 10, 17 },
- { 11, 14 },
- { 12, 13 },
- { -72, -71 },
- { -70, -69 },
- { 15, 16 },
- { -68, -67 },
- { -61, -60 },
- { 18, 21 },
- { 19, 20 },
- { -59, -58 },
- { -57, -56 },
- { 22, 23 },
- { -55, -54 },
- { -53, -52 }
-};
-
-//---------------------------------------------------------------------------
-// Master frequency band table
-// k0 = lower frequency boundary
-const int8s Aac_k0_offset_16[16]=
-{
- -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7,
-};
-const int8s Aac_k0_offset_22[16]=
-{
- -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13,
-};
-const int8s Aac_k0_offset_24[16]=
-{
- -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16,
-};
-const int8s Aac_k0_offset_32[16]=
-{
- -6, -4, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16,
-};
-const int8s Aac_k0_offset_64[16]=
-{
- -4, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 20,
-};
-const int8s Aac_k0_offset_96[16]=
-{
- -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 20, 24,
-};
-const int8s* Aac_k0_offset[9]=
-{
- Aac_k0_offset_96, //96000
- Aac_k0_offset_96, //88200
- Aac_k0_offset_64, //64000
- Aac_k0_offset_64, //48000
- Aac_k0_offset_64, //44100
- Aac_k0_offset_32, //32000
- Aac_k0_offset_24, //24000
- Aac_k0_offset_22, //22050
- Aac_k0_offset_16, //16000
-};
-const int8u Aac_k0_startMin[9]=
-{
- 7, 7, 10, 11, 12, 16, 16, 17, 24, //32, 35, 48, 0, 0, 0, 0,
-};
-
-//---------------------------------------------------------------------------
-// Master frequency band table
-// k2 = upper frequency boundary
-const int8u Aac_k2_stopMin[9]=
-{
- 13, 15, 20, 21, 23, 32, 32, 35, 48, //64, 70, 96, 0, 0, 0, 0,
-};
-const int8s Aac_k2_offset[9][14]=
-{
- { 0, 2, 4, 6, 8, 11, 14, 18, 22, 26, 31, 37, 44, 51 },
- { 0, 2, 4, 6, 8, 11, 14, 18, 22, 26, 31, 36, 42, 49 },
- { 0, 2, 4, 6, 8, 11, 14, 17, 21, 25, 29, 34, 39, 44 },
- { 0, 2, 4, 6, 8, 11, 14, 17, 20, 24, 28, 33, 38, 43 },
- { 0, 2, 4, 6, 8, 11, 14, 17, 20, 24, 28, 32, 36, 41 },
- { 0, 2, 4, 6, 8, 10, 12, 14, 17, 20, 23, 26, 29, 32 },
- { 0, 2, 4, 6, 8, 10, 12, 14, 17, 20, 23, 26, 29, 32 },
- { 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 20, 23, 26, 29 },
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16 },
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr_Ps.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr_Ps.cpp
deleted file mode 100644
index 0edff9ce7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr_Ps.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AAC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Aac.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern const char* Aac_audioObjectType(int8u audioObjectType);
-
-//---------------------------------------------------------------------------
-void File_Aac::ps_data(size_t End)
-{
- FILLING_BEGIN();
- if (Infos["Format_Settings_PS"].empty())
- {
- Infos["Format_Profile"]=__T("HE-AACv2");
- Ztring Channels=Infos["Channel(s)"];
- Ztring ChannelPositions=Infos["ChannelPositions"];
- Ztring SamplingRate=Infos["SamplingRate"];
- Infos["Channel(s)"]=__T("2");
- Infos["ChannelPositions"]=__T("Front: L R");
- if (MediaInfoLib::Config.LegacyStreamDisplay_Get())
- {
- Infos["Format_Profile"]+=__T(" / HE-AAC / LC");
- Infos["Channel(s)"]+=__T(" / ")+Channels+__T(" / ")+Channels;
- Infos["ChannelPositions"]+=__T(" / ")+ChannelPositions+__T(" / ")+ChannelPositions;
- Infos["SamplingRate"]=Ztring().From_Number((extension_sampling_frequency_index==(int8u)-1)?(sampling_frequency*2):extension_sampling_frequency, 10)+__T(" / ")+SamplingRate;
- }
- Infos["Format_Settings_PS"]=__T("Yes (Implicit)");
- Ztring Codec=Retrieve(Stream_Audio, StreamPos_Last, Audio_Codec);
- Infos["Codec"]=Ztring().From_Local(Aac_audioObjectType(audioObjectType))+__T("-SBR-PS");
- }
- FILLING_END();
-
- //Parsing
- Element_Begin1("ps_data");
- bool enable_ps_header;
- Get_SB(enable_ps_header, "enable_ps_header");
- if (enable_ps_header)
- {
- //Init
- delete ps; ps=new ps_handler();
-
- Get_SB(ps->enable_iid, "enable_iid");
- if (ps->enable_iid)
- {
- Get_S1 (3, ps->iid_mode, "iid_mode");
- }
- Get_SB(ps->enable_icc, "enable_icc");
- if (ps->enable_icc)
- {
- Get_S1 (3, ps->icc_mode, "icc_mode");
- }
- Get_SB(ps->enable_ext, "enable_ext");
- }
-
- if (ps==NULL)
- {
- if (Data_BS_Remain()>End)
- Skip_BS(Data_BS_Remain()-End, "(Waiting for header)");
- Element_End0();
- return;
- }
-
- //PS not yet parsed
- if (Data_BS_Remain()>End)
- Skip_BS(Data_BS_Remain()-End, "Data");
- Element_End0();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_AAC_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr_Ps.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr_Ps.h
deleted file mode 100644
index fcf61da18..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr_Ps.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Aac_GeneralAudio_Sbr_PsH
-#define MediaInfo_File_Aac_GeneralAudio_Sbr_PsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Aac.h"
-
-
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-typedef float complex_t[2];
-typedef complex_t qmf_t;
-#define MAX_PS_ENVELOPES 5
-#define NO_ALLPASS_LINKS 3
-
-struct hyb_info
-{
- int8u frame_len;
- int8u resolution20[3];
- int8u resolution34[5];
-
- qmf_t *work;
- qmf_t **buffer;
- qmf_t **temp;
-
- hyb_info(int8u numTimeSlotsRate);
- ~hyb_info();
-};
-
-struct ps_info
-{
- //ps_data
- bool enable_ps_header;
- bool enable_iid;
- bool enable_icc;
- bool enable_ext;
- int8u iid_mode;
- int8u nr_iid_par;
- int8u nr_ipdopd_par;
- int8u icc_mode;
- int8u nr_icc_par;
- bool frame_class;
- int8u num_env;
-
- int8u border_position[MAX_PS_ENVELOPES+1];
-
- int8u iid_dt[MAX_PS_ENVELOPES];
- int8u icc_dt[MAX_PS_ENVELOPES];
-
- int8u enable_ipdopd;
- int8u ipd_mode;
- int8u ipd_dt[MAX_PS_ENVELOPES];
- int8u opd_dt[MAX_PS_ENVELOPES];
-
- /* indices */
- int8s iid_index_prev[34];
- int8s icc_index_prev[34];
- int8s ipd_index_prev[17];
- int8s opd_index_prev[17];
- int8s iid_index[MAX_PS_ENVELOPES][34];
- int8s icc_index[MAX_PS_ENVELOPES][34];
- int8s ipd_index[MAX_PS_ENVELOPES][17];
- int8s opd_index[MAX_PS_ENVELOPES][17];
-
- int8s ipd_index_1[17];
- int8s opd_index_1[17];
- int8s ipd_index_2[17];
- int8s opd_index_2[17];
-
- /* ps data was correctly read */
- int8u ps_data_available;
-
- /* a header has been read */
- int8u header_read;
-
- /* hybrid filterbank parameters */
- hyb_info *hyb;
- int8u use34hybrid_bands;
- int8u numTimeSlotsRate;
-
- /**/
- int8u num_groups;
- int8u num_hybrid_groups;
- int8u nr_par_bands;
- int8u nr_allpass_bands;
- int8u decay_cutoff;
-
- int8u *group_border;
- int16u *map_group2bk;
-
- /* filter delay handling */
- int8u saved_delay;
- int8u delay_buf_index_ser[NO_ALLPASS_LINKS];
- int8u num_sample_delay_ser[NO_ALLPASS_LINKS];
- int8u delay_D[64];
- int8u delay_buf_index_delay[64];
-
- complex_t delay_Qmf[14][64]; /* 14 samples delay max, 64 QMF channels */
- complex_t delay_SubQmf[2][32]; /* 2 samples delay max (SubQmf is always allpass filtered) */
- complex_t delay_Qmf_ser[NO_ALLPASS_LINKS][5][64]; /* 5 samples delay max (table 8.34), 64 QMF channels */
- complex_t delay_SubQmf_ser[NO_ALLPASS_LINKS][5][32]; /* 5 samples delay max (table 8.34) */
-
- /* transients */
- float alpha_decay;
- float alpha_smooth;
-
- float P_PeakDecayNrg[34];
- float P_prev[34];
- float P_SmoothPeakDecayDiffNrg_prev[34];
-
- /* mixing and phase */
- complex_t h11_prev[50];
- complex_t h12_prev[50];
- complex_t h21_prev[50];
- complex_t h22_prev[50];
- int8u phase_hist;
- complex_t ipd_prev[20][2];
- complex_t opd_prev[20][2];
-
- ps_info(int8u sr_index, int8u numTimeSlotsRate);
- ~ps_info();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_Main.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_Main.cpp
deleted file mode 100644
index 46cca974e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_Main.cpp
+++ /dev/null
@@ -1,1143 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AAC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Aac.h"
-#if MEDIAINFO_ADVANCED
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#endif //MEDIAINFO_ADVANCED
-#include <cmath>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-extern const int32u Aac_sampling_frequency[13]=
-{96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050,
- 16000, 12000, 11025, 8000, 7350};
-
-//---------------------------------------------------------------------------
-const char* Aac_Adts_ID[]=
-{
- "MPEG-4",
- "MPEG-2",
-};
-
-//---------------------------------------------------------------------------
-const char* Aac_Format(int8u ID)
-{
- switch (ID)
- {
- case 1 :
- case 2 :
- case 3 :
- case 4 : return "AAC";
- case 5 : return "SBR";
- case 6 : return "AAC Scalable";
- case 7 : return "TwinVQ";
- case 8 : return "CELP";
- case 9 : return "HVXC";
- case 12 : return "TTSI";
- case 13 : return "Main synthetic";
- case 14 : return "Wavetable synthesis";
- case 15 : return "General MIDI";
- case 16 : return "Algorithmic Synthesis and Audio FX";
- case 17 :
- case 19 :
- case 20 : return "ER AAC";
- case 21 : return "ER TwinVQ";
- case 22 : return "ER BSAC";
- case 23 : return "ER AAC LD";
- case 24 : return "ER CELP";
- case 25 : return "ER HVXC";
- case 26 : return "ER HILN";
- case 27 : return "ER Parametric";
- case 28 : return "SSC";
- case 29 : return "ParametricStereo";
- case 32 : return "Layer-1";
- case 33 : return "Layer-2";
- case 34 : return "Layer-3";
- case 35 : return "DST";
- case 36 : return "ALS";
- case 37 :
- case 38 : return "SLS";
- case 39 : return "ER AAC ELD";
- case 40 : return "SMR Simple";
- case 41 : return "SMR Main";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Aac_Format_Profile(int8u ID)
-{
- switch (ID)
- {
- case 1 : return "Main";
- case 2 : return "LC";
- case 3 : return "SSR";
- case 4 : return "LTP";
- case 17 : return "LC";
- case 19 : return "LTP";
- case 37 : return "non-core";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Aac_audioObjectType(int8u audioObjectType)
-{
- switch (audioObjectType)
- {
- case 1 : return "AAC Main";
- case 2 : return "AAC LC";
- case 3 : return "AAC SSR";
- case 4 : return "AAC LTP";
- case 5 : return "SBR";
- case 6 : return "AAC Scalable";
- case 7 : return "TwinVQ";
- case 8 : return "CELP";
- case 9 : return "HVXC";
- case 12 : return "TTSI";
- case 13 : return "Main synthetic";
- case 14 : return "Wavetable synthesis";
- case 15 : return "General MIDI";
- case 16 : return "Algorithmic Synthesis and Audio FX";
- case 17 : return "ER AAC LC";
- case 19 : return "ER AAC LTP";
- case 20 : return "ER AAC Scalable";
- case 21 : return "ER TwinVQ";
- case 22 : return "ER BSAC";
- case 23 : return "ER AAC LD";
- case 24 : return "ER CELP";
- case 25 : return "ER HVXC";
- case 26 : return "ER HILN";
- case 27 : return "ER Parametric";
- case 28 : return "SSC";
- case 29 : return "PS";
- case 31 : return "(escape)";
- case 32 : return "Layer-1";
- case 33 : return "Layer-2";
- case 34 : return "Layer-3";
- case 35 : return "DST";
- case 36 : return "ALS";
- case 37 : return "SLS";
- case 38 : return "SLS non-core";
- case 39 : return "ER AAC ELD";
- case 40 : return "SMR Simple";
- case 41 : return "SMR Main";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const int8u Aac_Channels[]=
-{
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 8,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-const char* Aac_ChannelConfiguration[]=
-{
- "",
- "Front: C",
- "Front: L R",
- "Front: L C R",
- "Front: L C R, Side: C",
- "Front: L C R, Side: L R",
- "Front: L C R, Side: L R, LFE",
- "Front: L C R, Side: L R, Back: L R, LFE",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Aac_ChannelConfiguration2[]=
-{
- "",
- "1/0/0",
- "2/0/0",
- "3/0/0",
- "3/1/0",
- "3/2/0",
- "3/2/0.1",
- "3/2/2.1",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Aac_ChannelLayout[]=
-{
- "",
- "C",
- "L R",
- "C L R",
- "C L R Cs",
- "C L R Ls Rs",
- "C L R Ls Rs LFE",
- "C L R Ls Rs Lrs Rrs LFE",
-};
-
-int8u Aac_AudioSpecificConfig_sampling_frequency_index(const int32u sampling_frequency)
-{
- if (sampling_frequency>=92017) return 0;
- if (sampling_frequency>=75132) return 1;
- if (sampling_frequency>=55426) return 2;
- if (sampling_frequency>=46009) return 3;
- if (sampling_frequency>=37566) return 4;
- if (sampling_frequency>=27713) return 5;
- if (sampling_frequency>=23004) return 6;
- if (sampling_frequency>=18783) return 7;
- if (sampling_frequency>=13856) return 8;
- if (sampling_frequency>=11502) return 9;
- if (sampling_frequency>=9391) return 10;
- return 11;
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::AudioSpecificConfig (size_t End)
-{
- //Parsing
- bool sbrData=false, sbrPresentFlag=false, psData=false, psPresentFlag=false;
- Element_Begin1("AudioSpecificConfig");
- GetAudioObjectType(audioObjectType, "audioObjectType");
- Get_S1 (4, sampling_frequency_index, "samplingFrequencyIndex"); Param_Info1(Aac_sampling_frequency[sampling_frequency_index]);
- if (sampling_frequency_index==0xF)
- {
- Get_S3 (24, sampling_frequency, "samplingFrequency");
- sampling_frequency_index=Aac_AudioSpecificConfig_sampling_frequency_index(sampling_frequency);
- }
- else
- sampling_frequency=Aac_sampling_frequency[sampling_frequency_index];
- Get_S1 (4, channelConfiguration, "channelConfiguration"); Param_Info1(Aac_ChannelConfiguration[channelConfiguration]);
- if (audioObjectType==5 || audioObjectType==29)
- {
- extensionAudioObjectType=5;
- sbrPresentFlag=true;
- if (audioObjectType==29)
- psPresentFlag=true;
- Get_S1 (4, extension_sampling_frequency_index, "extensionSamplingFrequencyIndex"); Param_Info1(Aac_sampling_frequency[extension_sampling_frequency_index]);
- if (extension_sampling_frequency_index==0xF)
- {
- Get_S3 (24, extension_sampling_frequency, "extensionSamplingFrequency");
- sampling_frequency_index=Aac_AudioSpecificConfig_sampling_frequency_index(extension_sampling_frequency);
- }
- else
- extension_sampling_frequency=Aac_sampling_frequency[extension_sampling_frequency_index];
- GetAudioObjectType(audioObjectType, "audioObjectType");
- if (audioObjectType==22) //BSAC
- Skip_S1(4, "extensionChannelConfiguration");
- }
- else
- extensionAudioObjectType=0x00;
-
- switch (audioObjectType)
- {
- case 1:
- case 2:
- case 3:
- case 4:
- case 6:
- case 7:
- case 17:
- case 19:
- case 20:
- case 21:
- case 22:
- case 23:
- GASpecificConfig();
- break;
- case 8:
- CelpSpecificConfig();
- break;
- case 9:
- HvxcSpecificConfig();
- break;
- case 12:
- TTSSpecificConfig();
- break;
- //~ case 13:
- //~ case 14:
- //~ case 15:
- //~ case 16:
- //~ StructuredAudioSpecificConfig();
- //~ break;
- case 24:
- ErrorResilientCelpSpecificConfig();
- break;
- case 25:
- ErrorResilientHvxcSpecificConfig();
- break;
- case 26:
- case 27:
- ParametricSpecificConfig();
- break;
- case 28:
- SSCSpecificConfig();
- break;
- //~ case 30:
- //~ Skip_S1(1, "sacPayloadEmbedding");
- //~ SpatialSpecificConfig(); //ISO/IEC 23003-1
- //~ break;
- case 32:
- case 33:
- case 34:
- MPEG_1_2_SpecificConfig();
- break;
- case 35:
- DSTSpecificConfig();
- break;
- case 36:
- Skip_S1(5, "fillBits");
- ALSSpecificConfig();
- break;
- case 37:
- case 38:
- SLSSpecificConfig();
- break;
- case 39:
- ELDSpecificConfig();
- break;
- //~ case 40:
- //~ case 41:
- //~ SymbolicMusicSpecificConfig(); //ISO/IEC 14496-23
- //~ break;
- default:
- Element_Begin1("not implemented part");
- Skip_BS(Data_BS_Remain()-((End==(size_t)-1)?0:End), "(Not implemented)");
- Element_End0();
- FILLING_BEGIN()
- if (Mode==File_Aac::Mode_ADIF || Mode==File_Aac::Mode_ADTS)
- File__Tags_Helper::Finish();
- else if (Mode==Mode_AudioSpecificConfig)
- File__Analyze::Finish();
- Frame_Count=(size_t)-1; //Forcing not to parse following data anymore (if ParseSpeed==1)
- FILLING_END()
- return;
- }
-
- switch (audioObjectType)
- {
- case 17:
- case 19:
- case 20:
- case 21:
- case 22:
- case 23:
- case 24:
- case 25:
- case 26:
- case 27:
- case 39:
- int8u epConfig;
- Get_S1(2,epConfig, "epConfig");
- if ( epConfig == 2 || epConfig == 3 )
- ErrorProtectionSpecificConfig();
- if ( epConfig == 3 )
- {
- bool directMapping;
- Get_SB(directMapping, "directMapping");
- if ( ! directMapping )
- {
- Element_Begin1("not implemented part");
- Skip_BS(Data_BS_Remain()-((End==(size_t)-1)?0:End), "(Not implemented)");
- Element_End0();
- if (Mode==File_Aac::Mode_ADIF || Mode==File_Aac::Mode_ADTS)
- File__Tags_Helper::Finish();
- else
- {
- if (Mode==Mode_LATM)
- File__Analyze::Accept();
- File__Analyze::Finish();
- }
- Frame_Count=(size_t)-1; //Forcing not to parse following data anymore (if ParseSpeed==1)
- return;
- }
- }
- default : ;
- }
-
- if (extensionAudioObjectType!=5 && End!=(size_t)-1 && Data_BS_Remain()>=End+16)
- {
- int16u syncExtensionType;
- Get_S2(11,syncExtensionType, "syncExtensionType");
- if (syncExtensionType == 0x2b7)
- {
- sbrData=true;
- GetAudioObjectType(extensionAudioObjectType, "extensionAudioObjectType");
- if (extensionAudioObjectType==5 )
- {
- Get_SB(sbrPresentFlag, "sbrPresentFlag");
- if (sbrPresentFlag)
- {
- Get_S1 (4, extension_sampling_frequency_index, "extensionSamplingFrequencyIndex"); Param_Info1(Aac_sampling_frequency[extension_sampling_frequency_index]);
- if (extension_sampling_frequency_index==0xF)
- {
- Get_S3 (24, extension_sampling_frequency, "extensionSamplingFrequency");
- extension_sampling_frequency_index=Aac_AudioSpecificConfig_sampling_frequency_index(extension_sampling_frequency);
- }
- else
- extension_sampling_frequency=Aac_sampling_frequency[extension_sampling_frequency_index];
- if (End!=(size_t)-1 && Data_BS_Remain()>=End+12)
- {
- int16u syncExtensionType;
- Get_S2(11,syncExtensionType, "syncExtensionType");
- if (syncExtensionType == 0x548)
- {
- psData=true;
- Get_SB (psPresentFlag, "psPresentFlag");
- }
- }
- }
- }
- if ( extensionAudioObjectType == 22 )
- {
- Get_SB(sbrPresentFlag, "sbrPresentFlag");
- if (sbrPresentFlag)
- {
- Get_S1 (4, extension_sampling_frequency_index, "extensionSamplingFrequencyIndex"); Param_Info1(Aac_sampling_frequency[extension_sampling_frequency_index]);
- if (extension_sampling_frequency_index==0xF)
- {
- Get_S3 (24, extension_sampling_frequency, "extensionSamplingFrequency");
- extension_sampling_frequency_index=Aac_AudioSpecificConfig_sampling_frequency_index(extension_sampling_frequency);
- }
- else
- extension_sampling_frequency=Aac_sampling_frequency[extension_sampling_frequency_index];
- }
- Skip_S1(4, "extensionChannelConfiguration");
- }
- }
- }
- Element_End0();
- if (Data_BS_Remain()>End)
- {
- int8u LastByte=0xFF;
- if (Data_BS_Remain()-End<8)
- Peek_S1((int8u)(Data_BS_Remain()-End), LastByte);
- Skip_BS(Data_BS_Remain()-End, LastByte?"Unknown":"Padding");
- }
-
- FILLING_BEGIN();
- AudioSpecificConfig_OutOfBand (sampling_frequency, audioObjectType, sbrData, psData, sbrPresentFlag, psPresentFlag);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::AudioSpecificConfig_OutOfBand (int32u sampling_frequency_, int8u audioObjectType_, bool sbrData, bool psData, bool sbrPresentFlag, bool psPresentFlag)
-{
- if (sampling_frequency==(int32u)-1 && sampling_frequency_) //Only if not yet set
- {
- sampling_frequency=sampling_frequency_;
- sampling_frequency_index=Aac_AudioSpecificConfig_sampling_frequency_index(sampling_frequency);
- }
-
- if (audioObjectType_==(int8u)-1)
- {
- if (audioObjectType==(int8u)-1)
- return; //All data is not yet available
- if (Infos.find("Format_Settings_SBR")!=Infos.end())
- {
- sbrData=true;
- sbrPresentFlag=Infos["Format_Settings_SBR"].find(__T("Yes"))!=string::npos;
- }
- else
- {
- sbrData=false;
- sbrPresentFlag=false;
- }
- if (Infos.find("Format_Settings_PS")!=Infos.end())
- {
- psData=true;
- psPresentFlag=Infos["Format_Settings_PS"].find(__T("Yes"))!=string::npos;
- }
- else
- {
- psData=false;
- psPresentFlag=false;
- }
- }
- else
- audioObjectType=audioObjectType_;
-
- if (sampling_frequency)
- Infos["SamplingRate"].From_Number(sampling_frequency);
- Infos["Format"].From_Local(Aac_Format(audioObjectType));
- Infos["Format_Profile"].From_Local(Aac_Format_Profile(audioObjectType));
- Infos["Codec"].From_Local(Aac_audioObjectType(audioObjectType));
- if (channelConfiguration && channelConfiguration<8)
- {
- Infos["Channel(s)"].From_Number(Aac_Channels[channelConfiguration]);
- Infos["ChannelPositions"].From_Local(Aac_ChannelConfiguration[channelConfiguration]);
- Infos["ChannelPositions/String2"].From_Local(Aac_ChannelConfiguration2[channelConfiguration]);
- Infos["ChannelLayout"].From_Local(Aac_ChannelLayout[channelConfiguration]);
- }
-
- if (sbrPresentFlag || !Infos["Format_Settings_SBR"].empty())
- {
- Infos["Format_Profile"]=__T("HE-AAC");
- Ztring SamplingRate_Previous=Infos["SamplingRate"];
- int32u SamplingRate=(extension_sampling_frequency_index==(int8u)-1)?(sampling_frequency*2):extension_sampling_frequency;
- if (SamplingRate)
- {
- Infos["SamplingRate"].From_Number(SamplingRate, 10);
- if (MediaInfoLib::Config.LegacyStreamDisplay_Get())
- {
- Infos["Format_Profile"]+=__T(" / LC");
- Infos["SamplingRate"]+=__T(" / ")+SamplingRate_Previous;
- }
- }
- Infos["Format_Settings_SBR"]=__T("Yes (Implicit)");
- Infos["Codec"]=Ztring().From_Local(Aac_audioObjectType(audioObjectType))+__T("-SBR");
- }
- else if (sbrData)
- Infos["Format_Settings_SBR"]=__T("No (Explicit)");
-
- if (psPresentFlag || !Infos["Format_Settings_PS"].empty())
- {
- Infos["Format_Profile"]=__T("HE-AACv2");
- Ztring Channels=Infos["Channel(s)"];
- Ztring ChannelPositions=Infos["ChannelPositions"];
- Ztring SamplingRate_Previous=Infos["SamplingRate"];
- Infos["Channel(s)"]=__T("2");
- Infos["ChannelPositions"]=__T("Front: L R");
- if (MediaInfoLib::Config.LegacyStreamDisplay_Get())
- {
- Infos["Format_Profile"]+=__T(" / HE-AAC / LC");
- Infos["Channel(s)"]+=__T(" / ")+Channels+__T(" / ")+Channels;
- Infos["ChannelPositions"]+=__T(" / ")+ChannelPositions+__T(" / ")+ChannelPositions;
- int32u SamplingRate=(extension_sampling_frequency_index==(int8u)-1)?(sampling_frequency*2):extension_sampling_frequency;
- if (SamplingRate)
- Infos["SamplingRate"]=Ztring().From_Number(SamplingRate, 10)+__T(" / ")+SamplingRate_Previous;
- }
- Infos["Format_Settings_PS"]=__T("Yes (Implicit)");
- if (StreamPos_Last!=(size_t)-1)
- {
- Ztring Codec=Retrieve(Stream_Audio, StreamPos_Last, Audio_Codec);
- Infos["Codec"]=Ztring().From_Local(Aac_audioObjectType(audioObjectType))+__T("-SBR-PS");
- }
- }
- else if (psData)
- Infos["Format_Settings_PS"]=__T("No (Explicit)");
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::GetAudioObjectType(int8u &ObjectType, const char* Name)
-{
- Element_Begin1(Name);
- Get_S1(5, ObjectType, "audioObjectType");
- if (ObjectType==31)
- {
- Get_S1(6, ObjectType, "audioObjectTypeExt");
- ObjectType+=32;
- }
- Element_Info1(ObjectType); Element_Info1(Aac_Format_Profile(ObjectType));
- Element_End0();
-}
-
-//***************************************************************************
-// Elements - Multiplex layer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::AudioMuxElement()
-{
- Element_Begin1("AudioMuxElement");
- if (muxConfigPresent)
- {
- bool useSameStreamMux;
- Get_SB (useSameStreamMux, "useSameStreamMux");
- if (!useSameStreamMux)
- StreamMuxConfig();
- }
- if (sampling_frequency_index==(int8u)-1) //No previous config
- {
- CanFill=false;
- Skip_BS(Data_BS_Remain(), "(Waiting for configuration)");
- return;
- }
- if (audioMuxVersionA==0)
- {
- for (int8u i=0; i<=numSubFrames; i++)
- {
- PayloadLengthInfo();
- PayloadMux();
- }
- if (otherDataPresent)
- {
- for(int32u i=0; i<otherDataLenBits; i++)
- Skip_SB( "otherDataBit");
- }
- }
- else
- {
- Element_Begin1("(not implemented)");
- Skip_BS(Data_BS_Remain(), "(not implemented)");
- Element_End0();
- }
- if (Data_BS_Remain()%8)
- Skip_S1(Data_BS_Remain()%8, "byte_alignment");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::StreamMuxConfig()
-{
- Element_Begin1("StreamMuxConfig");
-
- bool audioMuxVersion;
- Get_SB (audioMuxVersion, "audioMuxVersion");
- if (audioMuxVersion)
- Get_SB (audioMuxVersionA, "audioMuxVersionA");
- else
- audioMuxVersionA=false;
-
- if (!audioMuxVersionA)
- {
- if (audioMuxVersion==1)
- {
- Element_Begin1("(not implemented)");
- Skip_BS(Data_BS_Remain(), "(not implemented)");
- Element_End0();
- //taraBufferFullness=LatmGetValue();
- }
-
- int8u streamCnt = 0;
- bool useSameConfig;
-
- Get_SB (allStreamsSameTimeFraming, "allStreamsSameTimeFraming");
- Get_S1 (6, numSubFrames, "numSubFrames");
- Get_S1 (4, numProgram, "numProgram");
-
- for (int8u prog=0; prog<=numProgram; prog++)
- {
- Get_S1(3,numLayer, "numLayer");
- for (int8u lay=0; lay<=numLayer; lay++)
- {
- progSIndx[streamCnt]=prog;
- laySIndx[streamCnt]=lay;
- streamID[prog][lay]=streamCnt++;
- if (prog==0 && lay==0)
- useSameConfig=0;
- else
- Get_SB(useSameConfig, "useSameConfig");
-
- if (!useSameConfig)
- {
- if (audioMuxVersion==0)
- AudioSpecificConfig();
- else
- {
- int ascLen=LatmGetValue();
- AudioSpecificConfig(Data_BS_Remain()-ascLen);
- }
- }
-
- Get_S1(3,frameLengthType[streamID[prog][lay]], "frameLengthType[streamID[prog][lay]]");
- switch(frameLengthType[streamID[prog][lay]])
- {
- case 0 :
- Skip_S1(8, "latmBufferFullness[streamID[prog][lay]]");
- if(!allStreamsSameTimeFraming)
- {
- Element_Begin1("(not implemented)");
- Skip_BS(Data_BS_Remain(), "(not implemented)");
- Element_End0();
- }
- //~ if ((!allStreamsSameTimeFraming) &&
- //~ (AudioObjectType[lay] == 6 || AudioObjectType[lay] == 20) &&
- //~ (AudioObjectType[lay-1] == 8 || AudioObjectType[lay-1] == 24))
- //~ {
- //~ Skip_S1(6, "coreFrameOffset");
- //~ }
- break;
- case 1 :
- Get_S2(9,frameLength[streamID[prog][lay]],"frameLength[streamID[prog][lay]]");
- break;
- case 3 :
- case 4 :
- case 5 :
- Skip_S1(6, "CELPframeLengthTableIndex[streamID[prog][lay]]");
- break;
- case 6 :
- case 7 :
- Skip_S1(1, "HVXCframeLengthTableIndex[streamID[prog][lay]]");
- break;
- default :
- Element_Begin1("(not implemented)");
- Skip_BS(Data_BS_Remain(), "(not implemented)");
- Element_End0();
- }
- }
- }
- bool crcCheckPresent;
- Get_SB (otherDataPresent, "otherDataPresent");
- if (otherDataPresent)
- {
- if (audioMuxVersion==1)
- otherDataLenBits=LatmGetValue();
- else
- {
- otherDataLenBits=0;
- bool otherDataLenEsc;
- do
- {
- int8u otherDataLenTmp;
- otherDataLenBits<<=8;
- Get_SB( otherDataLenEsc, "otherDataLenEsc");
- Get_S1(8, otherDataLenTmp, "otherDataLenTmp");
- otherDataLenBits+=otherDataLenTmp;
- }
- while (otherDataLenEsc);
- }
- }
- Get_SB(crcCheckPresent, "crcCheckPresent");
- if(crcCheckPresent)
- Skip_S1(8, "crcCheckSum");
- }
- else
- {
- Element_Begin1("(not implemented)");
- Skip_BS(Data_BS_Remain(), "(not implemented)");
- Element_End0();
- }
- Element_End0();
-
- FILLING_BEGIN();
- CanFill=true;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-int32u File_Aac::LatmGetValue()
-{
- Element_Begin1("LatmGetValue");
- int8u valueTmp, bytesForValue;
- Get_S1(2, bytesForValue, "bytesForValue");
- int32u value=0;
- for (int8u i=0; i<=bytesForValue; i++)
- {
- value<<=8;
- Get_S1(8, valueTmp, "valueTmp");
- value+=valueTmp;
- }
- Element_End0();
- return value;
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::PayloadLengthInfo()
-{
- Element_Begin1("PayloadLengthInfo");
- int8u tmp;
- if (allStreamsSameTimeFraming)
- {
- for (int8u prog=0; prog<=numProgram; prog++)
- {
- for (int8u lay=0; lay<=numLayer; lay++)
- {
- if (frameLengthType[streamID[prog][lay]]==0)
- {
- MuxSlotLengthBytes[streamID[prog][lay]]=0;
- do
- {
- Get_S1(8, tmp, "tmp");
- MuxSlotLengthBytes[streamID[prog][lay]]+=tmp;
- }
- while(tmp==255);
- }
- else if (frameLengthType[streamID[prog][lay]]==3
- || frameLengthType[streamID[prog][lay]]==5
- || frameLengthType[streamID[prog][lay]]==7)
- {
- Skip_S1(2, "MuxSlotLengthCoded[streamID[prog][lay]]");
- }
- }
- }
- }
- else
- {
- int8u streamIndx;
- int8u prog, lay;
- Get_S1(4, numChunk, "numChunk");
- for (int chunkCnt=0; chunkCnt<=numChunk; chunkCnt++)
- {
- Get_S1(4,streamIndx, "streamIndx");
- prog=progCIndx[chunkCnt]=progSIndx[streamIndx];
- lay=layCIndx[chunkCnt]=laySIndx[streamIndx];
- if (frameLengthType[streamID[prog][lay]]==0)
- {
- MuxSlotLengthBytes[streamID[prog][lay]]=0;
- do
- {
- Get_S1(8, tmp, "tmp");
- MuxSlotLengthBytes[streamID[prog][lay]]+=tmp;
- }
- while(tmp==255);
- Skip_SB( "AuEndFlag[streamID[prog][lay]]");
- }
- else if (frameLengthType[streamID[prog][lay]]==3
- || frameLengthType[streamID[prog][lay]]==5
- || frameLengthType[streamID[prog][lay]]==7)
- {
- Skip_S1(2, "MuxSlotLengthCoded[streamID[prog][lay]]");
- }
- }
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::PayloadMux()
-{
- Element_Begin1("PayloadMux");
- if (allStreamsSameTimeFraming)
- {
- for (int8u prog=0; prog<=numProgram; prog++)
- for (int8u lay=0; lay<=numLayer; lay++)
- {
- switch(frameLengthType[streamID[prog][lay]])
- {
- case 0 :
- if (CA_system_ID_MustSkipSlices)
- {
- //Encryption management
- Skip_BS(8*MuxSlotLengthBytes[streamID[prog][lay]], "Encrypted payload[streamID[prog][lay]]");
- Frame_Count_Valid=0;
- }
- else
- raw_data_block();
- break;
- case 1 :
- Skip_BS(8 * (frameLength[streamID[prog][lay]] + 20),"payload[streamID[prog][lay]]");
- break;
- default:
- Element_Begin1("(not implemented)");
- Skip_BS(Data_BS_Remain(), "(not implemented)");
- Element_End0();
- }
- }
- }
- else
- {
- for (int8u chunkCnt=0; chunkCnt<=numChunk; chunkCnt++)
- {
- int8u prog=progCIndx[chunkCnt];
- int8u lay=layCIndx[chunkCnt];
- switch(frameLengthType[streamID[prog][lay]])
- {
- case 0 :
- raw_data_block(); //Skip_BS(MuxSlotLengthBytes[streamID[prog][lay]], "payload[streamID[prog][lay]]");
- break;
- case 1 :
- Skip_BS(8*(frameLength[streamID[prog][lay]]+20), "payload[streamID[prog][lay]]");
- break;
- default:
- Element_Begin1("not implemented");
- Element_End0();
- }
- }
- }
- Element_End0();
-}
-
-//***************************************************************************
-// Elements - Error protection
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::ErrorProtectionSpecificConfig()
-{
- Element_Begin1("ErrorProtectionSpecificConfig");
- int8u number_of_predefined_set,number_of_concatenated_frame,interleave_type;
- Get_S1(8,number_of_predefined_set, "number_of_predefined_set");
- Get_S1(2,interleave_type, "interleave_type");
- Skip_S1(3, "bit_stuffing");
- Get_S1(3,number_of_concatenated_frame, "number_of_concatenated_frame");
- for (int8u i = 0; i < number_of_predefined_set; i++ )
- {
- int8u number_of_class;
- Get_S1(6,number_of_class, "number_of_class[i]");
- for (int8u j = 0; j < number_of_class; j++)
- {
- bool length_escape,fec_type,rate_escape,crclen_escape;
- Get_SB(length_escape, "length_escape[i][j]");
- Get_SB(rate_escape, "rate_escape[i][j]");
- Get_SB(crclen_escape, "crclen_escape[i][j]");
- if (number_of_concatenated_frame != 1)
- Skip_SB( "concatenate_flag[i][j]");
- Get_SB(fec_type, "fec_type[i][j]");
- if(!fec_type)
- Skip_SB( "termination_switch[i][j]");
- if (interleave_type == 2)
- Skip_S1(2, "interleave_switch[i][j]");
- Skip_SB( "class_optional");
- if (length_escape)
- {
- /* ESC */
- Skip_S1(4, "number_of_bits_for_length[i][j]");
- }
- else
- {
- Skip_S2(16, "class_length[i][j]");
- }
- if (!rate_escape)
- { /* not ESC */
- if(fec_type)
- {
- Skip_S1(7, "class_rate[i][j]");
- }
- else
- {
- Skip_S1(5, "class_rate[i][j]");
- }
- }
- if (!crclen_escape)
- {
- /* not ESC */
- Skip_S1(5, "class_crclen[i][j]");
- }
- }
- bool class_reordered_output;
- Get_SB(class_reordered_output, "class_reordered_output");
- if ( class_reordered_output )
- {
- for (int j = 0; j < number_of_class; j++ )
- {
- Skip_S1(6, "class_output_order[i][j]");
- }
- }
- }
- bool header_protection;
- Get_SB(header_protection, "header_protection");
- if (header_protection)
- {
- Skip_S1(5, "header_rate");
- Skip_S1(5, "header_crclen");
- }
- Element_End0();
-}
-
-//***************************************************************************
-// Elements - MPEG-2 AAC Audio_Data_Interchange_Format, ADIF
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::adif_header()
-{
- //Parsing
- int32u bitrate;
- int8u num_program_config_elements;
- bool bitstream_type;
- Skip_C4( "adif_id");
- BS_Begin();
- TEST_SB_SKIP( "copyright_id_present");
- Skip_S4(32, "copyright_id");
- Skip_S4(32, "copyright_id");
- Skip_S4( 8, "copyright_id");
- TEST_SB_END();
- Skip_SB( "original_copy");
- Skip_SB( "home");
- Get_SB ( bitstream_type, "bitstream_type"); Param_Info1(bitstream_type?"VBR":"CBR");
- Get_S3 (23, bitrate, "bitrate");
- Get_S1 ( 4, num_program_config_elements, "num_program_config_elements");
- if (!bitstream_type)
- Skip_S3(20, "adif_buffer_fullness");
- for (int8u Pos=0; Pos<num_program_config_elements+1; Pos++)
- program_config_element();
- BS_End();
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, General_Format, "ADIF", Unlimited, true, true);
- Fill(Stream_General, 0, General_HeaderSize, Element_Size);
- Fill(Stream_General, 0, General_OverallBitRate_Mode, bitstream_type?"VBR":"CBR");
-
- for (size_t StreamPos=0; StreamPos<Count_Get(Stream_Audio); StreamPos++)
- Fill(Stream_Audio, StreamPos, Audio_MuxingMode, "ADIF");
- if (num_program_config_elements==0) //Easy to fill only if 1 audio stream
- {
- Infos["BitRate_Mode"].From_Local(bitstream_type?"VBR":"CBR");
- if (bitrate>0)
- Infos[bitstream_type?"BitRate_Maximum":"BitRate"].From_Number(bitrate);
- }
-
- //No more need data
- File__Tags_Helper::Finish("ADIF");
- FILLING_END();
-}
-
-//***************************************************************************
-// Elements - Audio_Data_Transport_Stream frame, ADTS
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::adts_frame()
-{
- //Parsing
- adts_fixed_header();
- adts_variable_header();
-
- //Encryption management
- if (CA_system_ID_MustSkipSlices)
- {
- //Is not decodable
- BS_End();
- Skip_XX(Element_Size-Element_Offset, "Encrypted data");
- Frame_Count_Valid=0;
- return;
- }
-
- if (num_raw_data_blocks==0)
- {
- if (!protection_absent)
- {
- Element_Begin1("adts_error_check");
- Skip_S2(16, "crc_check");
- Element_End0();
- }
- raw_data_block();
- }
- else
- {
- Element_Begin1("adts_header_error_check");
- if (!protection_absent)
- for (int i=1; i<=num_raw_data_blocks; i++)
- Skip_S2(16, "raw_data_block_position(i)");
- Skip_S2(16, "crc_check");
- Element_End0();
-
- for(int i=0; i<=num_raw_data_blocks; i++)
- {
- raw_data_block();
- if (!protection_absent)
- {
- Element_Begin1("adts_raw_data_block_error_check");
- Skip_BS(16, "crc_check");
- Element_End0();
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::adts_fixed_header()
-{
- //Parsing
- bool id;
- Element_Begin1("adts_fixed_header");
- Skip_BS(12, "syncword");
- Get_SB ( id, "id"); Param_Info1(Aac_Adts_ID[id]);
- Skip_BS( 2, "layer");
- Get_SB ( protection_absent, "protection_absent");
- Get_S1 ( 2, audioObjectType, "profile_ObjectType"); audioObjectType++; Param_Info1(Aac_audioObjectType(audioObjectType));
- Get_S1 ( 4, sampling_frequency_index, "sampling_frequency_index"); Param_Info2(Aac_sampling_frequency[sampling_frequency_index], " Hz");
- sampling_frequency=Aac_sampling_frequency[sampling_frequency_index];
- Skip_SB( "private");
- Get_S1 ( 3, channelConfiguration, "channel_configuration");
- Skip_SB( "original");
- Skip_SB( "home");
- Element_End0();
-
- FILLING_BEGIN();
- if (Infos["Format"].empty())
- {
- Infos_General["Format"].From_Local("ADTS");
-
- Infos["Format"].From_Local("AAC");
- Infos["Format_Version"].From_Local(id?"Version 2":"Version 4");
- Infos["Format_Profile"].From_Local(Aac_Format_Profile(audioObjectType));
- Infos["Codec"].From_Local(Aac_audioObjectType(audioObjectType));
- if (Aac_sampling_frequency[sampling_frequency_index])
- Infos["SamplingRate"].From_Number(Aac_sampling_frequency[sampling_frequency_index]);
- Infos["Channel(s)"].From_Number(channelConfiguration);
- Infos["ChannelPositions"].From_Local(Aac_ChannelConfiguration[channelConfiguration]);
- Infos["ChannelPositions/String2"].From_Local(Aac_ChannelConfiguration2[channelConfiguration]);
- Infos["ChannelLayout"].From_Local(Aac_ChannelLayout[channelConfiguration]);
- if (IsSub)
- Infos["MuxingMode"].From_Local("ADTS");
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::adts_variable_header()
-{
- //Parsing
- int16u aac_frame_length, adts_buffer_fullness;
- Element_Begin1("adts_variable_header");
- Skip_SB( "copyright_id");
- Skip_SB( "copyright_id_start");
- Get_S2 (13, aac_frame_length, "aac_frame_length");
- Get_S2 (11, adts_buffer_fullness, "adts_buffer_fullness"); Param_Info1(adts_buffer_fullness==0x7FF?"VBR":"CBR");
- Get_S1 ( 2, num_raw_data_blocks, "num_raw_data_blocks");
- Element_End0();
-
- FILLING_BEGIN();
- if (adts_buffer_fullness==0x7FF)
- adts_buffer_fullness=true;
- #if MEDIAINFO_ADVANCED
- aac_frame_length_Total+=aac_frame_length;
- #endif //MEDIAINFO_ADVANCED
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_AAC_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_Others.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_Others.cpp
deleted file mode 100644
index f964d6319..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Aac_Others.cpp
+++ /dev/null
@@ -1,459 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AAC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Aac.h"
-#if defined(MEDIAINFO_RIFF_YES)
- #include "MediaInfo/Multiple/File_Riff.h"
-#endif
-#include <cmath>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Speech coding (HVXC)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::HvxcSpecificConfig()
-{
- Element_Begin1("HvxcSpecificConfig");
- bool isBaseLayer;
- Get_SB(isBaseLayer, "isBaseLayer");
- if (isBaseLayer)
- HVXCconfig();
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::HVXCconfig()
-{
- Element_Begin1("HVXCconfig");
- Skip_SB( "HVXCvarMode");
- Skip_S1(2, "HVXCrateMode");
- Skip_SB( "extensionFlag");
- //~ if (extensionFlag) {
- /*< to be defined in MPEG-4 Version 2 >*/
- //~ }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::ErrorResilientHvxcSpecificConfig() {
- Element_Begin1("ErrorResilientHvxcSpecificConfig");
- bool isBaseLayer;
- Get_SB(isBaseLayer,"isBaseLayer");
- if (isBaseLayer) {
- ErHVXCconfig();
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::ErHVXCconfig()
-{
- Element_Begin1("ErHVXCconfig");
- bool extensionFlag;
- Skip_SB( "HVXCvarMode");
- Skip_S1(2, "HVXCrateMode");
- Get_SB (extensionFlag, "extensionFlag");
-
- if (extensionFlag) {
- Skip_SB( "var_ScalableFlag");
- }
- Element_End0();
-}
-
-//***************************************************************************
-// Speech Coding (CELP)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::CelpSpecificConfig ()
-{
- Element_Begin1("CelpSpecificConfig");
- bool isBaseLayer;
- Get_SB(isBaseLayer, "isBaseLayer");
- if (isBaseLayer)
- {
- CelpHeader ();
- }
- else
- {
- bool isBWSLayer;
- Get_SB(isBWSLayer, "isBWSLayer");
- if (isBWSLayer)
- {
- //~ CelpBWSenhHeader ()
- //~ {
- Skip_S1(2, "BWS_configuration");
- //~ }
-
- }
- else
- {
- Skip_S1(2, "CELP-BRS-id");
- }
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::CelpHeader ()
-{
- Element_Begin1("CelpHeader");
- bool ExcitationMode;
- Get_SB(ExcitationMode, "ExcitationMode");
- Skip_SB( "SampleRateMode");
- Skip_SB( "FineRateControl");
- if (ExcitationMode == 1/*RPE*/)
- {
- Skip_S1(3, "RPE_Configuration");
- }
- if (ExcitationMode == 0/*MPE*/)
- {
- Skip_S1(5, "MPE_Configuration");
- Skip_S1(2, "NumEnhLayers");
- Skip_SB( "BandwidthScalabilityMode");
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::ErrorResilientCelpSpecificConfig ()
-{
- Element_Begin1("ErrorResilientCelpSpecificConfig");
- bool isBaseLayer;
- Get_SB(isBaseLayer, "isBaseLayer");
- if (isBaseLayer)
- {
- ER_SC_CelpHeader ();
- }
- else
- {
- bool isBWSLayer;
- Get_SB(isBWSLayer, "isBWSLayer");
- if (isBWSLayer)
- {
- //~ CelpBWSenhHeader ()
- //~ {
- Skip_S1(2, "BWS_configuration");
- //~ }
-
- }
- else
- {
- Skip_S1(2, "CELP-BRS-id");
- }
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::ER_SC_CelpHeader ()
-{
- Element_Begin1("ER_SC_CelpHeader");
- bool ExcitationMode;
- Get_SB(ExcitationMode, "ExcitationMode");
- Skip_SB( "SampleRateMode");
- Skip_SB( "FineRateControl");
- Skip_SB( "SilenceCompression");
-
- if (ExcitationMode == 1/*RPE*/) {
- Skip_S1(3, "RPE_Configuration");
- }
- if (ExcitationMode == 0/*MPE*/) {
- Skip_S1(5, "MPE_Configuration");
- Skip_S1(2, "NumEnhLayers");
- Skip_SB( "BandwidthScalabilityMode");
- }
- Element_End0();
-}
-
-//***************************************************************************
-// Structured Audio (SA)
-//***************************************************************************
-
-//***************************************************************************
-// Text to Speech Interface (TTSI)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::TTSSpecificConfig()
-{
- Element_Begin1("TTSSpecificConfig");
- //~ TTS_Sequence()
- //~ {
- Skip_S1(5, "TTS_Sequence_ID");
- Skip_BS(18, "Language_Code");
- Skip_SB( "Gender_Enable");
- Skip_SB( "Age_Enable");
- Skip_SB( "Speech_Rate_Enable");
- Skip_SB( "Prosody_Enable");
- Skip_SB( "Video_Enable");
- Skip_SB( "Lip_Shape_Enable");
- Skip_SB( "Trick_Mode_Enable");
- //~ }
- Element_End0();
-}
-
-//***************************************************************************
-// Parametric Audio (HILN)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::HILNconfig()
-{
- Element_Begin1("HILNconfig");
- Skip_SB( "HILNquantMode");
- Skip_S1(8, "HILNmaxNumLine");
- Skip_S1(4, "HILNsampleRateCode");
- Skip_S2(12, "HILNframeLength");
- Skip_S1(2, "HILNcontMode");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::HILNenexConfig()
-{
- Element_Begin1("HILNenexConfig");
- bool HILNenhaLayer;
- Get_SB(HILNenhaLayer, "HILNenhaLayer");
- if (HILNenhaLayer)
- Skip_S1(2, "HILNenhaQuantMode");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::ParametricSpecificConfig()
-{
- Element_Begin1("ParametricSpecificConfig");
- bool isBaseLayer;
- Get_SB(isBaseLayer, "isBaseLayer");
- if (isBaseLayer)
- PARAconfig();
- else
- HILNenexConfig();
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Aac::PARAconfig()
-{
- Element_Begin1("PARAconfig");
- int8u PARAmode;
- Get_S1(2,PARAmode, "PARAmode");
- if (PARAmode != 1)
- ErHVXCconfig();
- if (PARAmode != 0)
- HILNconfig();
- bool PARAextensionFlag;
- Get_SB(PARAextensionFlag, "PARAextensionFlag");
- if (PARAextensionFlag) {
- /* to be defined in MPEG-4 Phase 3 */
- }
- Element_End0();
-}
-
-//***************************************************************************
-// Technical description of parametric coding for high quality audio
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::SSCSpecificConfig ()
-{
- Element_Begin1("SSCSpecificConfig");
- Skip_S1(2,"decoder_level");
- Skip_S1(4,"update_rate");
- Skip_S1(2,"synthesis_method");
- if (channelConfiguration != 1)
- {
- int8u mode_ext;
- Get_S1(2,mode_ext,"mode_ext");
- if ((channelConfiguration == 2) && (mode_ext == 1))
- {
- /*reserved*/
- }
- }
- Element_End0();
-}
-
-//***************************************************************************
-// MPEG-1/2 Audio
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::MPEG_1_2_SpecificConfig()
-{
- Element_Begin1("MPEG_1_2_SpecificConfig");
- Skip_SB( "extension");
- Element_End0();
-}
-
-//***************************************************************************
-// Technical description of lossless coding of oversampled audio
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::DSTSpecificConfig()
-{
- Element_Begin1("DSTSpecificConfig");
- Skip_SB("DSDDST_Coded");
- Skip_S2(14,"N_Channels");
- Skip_SB("reserved");
- Element_End0();
-}
-
-//***************************************************************************
-// Audio Lossless
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::ALSSpecificConfig()
-{
- //Not in spec, but something weird in the example I have
- int32u Junk;
- while (Data_BS_Remain())
- {
- Peek_S4(32, Junk);
- if (Junk!=0x414C5300)
- {
- Skip_SB( "Unknown");
- }
- else
- break;
- }
- if (Data_BS_Remain()==0)
- return; //There is a problem
-
- Element_Begin1("ALSSpecificConfig");
- bool chan_config,chan_sort,crc_enabled,aux_data_enabled;
- int32u samp_freq, samples;
- int16u channels,frame_length;
- int8u ra_flag,random_access, file_type;
- Skip_BS(32,"als_id");
- Get_BS (32, samp_freq, "samp_freq");
- Get_BS (32, samples, "samples");
- Get_S2 (16, channels, "channels"); Param_Info2(channels+1, " channel(s)");
- Get_S1 (3, file_type, "file_type");
- Skip_S1(3,"resolution");
- Skip_SB("floating");
- Skip_SB("msb_first");
- Get_S2 (16,frame_length,"frame_length");
- Get_S1 (8,random_access,"random_access");
- Get_S1 (2,ra_flag,"ra_flag");
- Skip_SB("adapt_order");
- Skip_S1(2,"coef_table");
- Skip_SB("long_term_prediction");
- Skip_S2(10,"max_order");
- Skip_S1(2,"block_switching");
- Skip_SB("bgmc_mode");
- Skip_SB("sb_part");
- Skip_SB("joint_stereo");
- Skip_SB("mc_coding");
- Get_SB (chan_config,"chan_config");
- Get_SB (chan_sort,"chan_sort");
- Get_SB (crc_enabled,"crc_enabled");
- Skip_SB("RLSLMS");
- Skip_BS(5,"(reserved)");
- Get_SB (aux_data_enabled,"aux_data_enabled");
- if (chan_config)
- Skip_S2(16,"chan_config_info");
- if (chan_sort)
- {
- int16u ChBits=(int16u)ceil(log((double)(channels+1))/log((double)2));
- for (int8u c=0; c<=channels; c++)
- Skip_BS(ChBits, "chan_pos[c]");
- }
- if(Data_BS_Remain()%8)
- Skip_S1(Data_BS_Remain()%8, "byte_align");
- BS_End();
- int32u header_size,trailer_size;
- Get_B4(header_size, "header_size");
- Get_B4(trailer_size, "trailer_size");
- #ifdef MEDIAINFO_RIFF_YES
- if (file_type==1) //WAVE file
- {
- Element_Begin1("orig_header");
- File_Riff MI;
- Open_Buffer_Init(&MI);
- Open_Buffer_Continue(&MI, Buffer+Buffer_Offset+(size_t)Element_Offset, header_size);
- Element_Offset+=header_size;
- File__Analyze::Finish(&MI); //No merge of data, only for trace information, because this is the data about the decoded stream, not the encoded stream
- Element_End0();
- }
- else
- #endif //MEDIAINFO_RIFF_YES
- Skip_XX(header_size, "orig_header[]");
-
- Skip_XX(trailer_size, "orig_trailer[]");
- if (crc_enabled)
- Skip_B4( "crc");
- if ((ra_flag == 2) && (random_access > 0))
- for (int32u f=0; f<((samples-1)/(frame_length+1))+1; f++)
- Skip_B4( "ra_unit_size[f]");
- if (aux_data_enabled)
- {
- int32u aux_size;
- Get_B4(aux_size, "aux_size");
- Skip_XX(aux_size, "aux_data[]");
- }
- Element_End0();
- BS_Begin(); //To be in sync with other objectTypes
-
- FILLING_BEGIN();
- //Filling
- File__Analyze::Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, channels+1);
-
- //Forcing default confignuration (something weird in the example I have)
- channelConfiguration=0;
- sampling_frequency_index=(int8u)-1;
- sampling_frequency=samp_freq;
- FILLING_END();
-}
-
-//***************************************************************************
-// Scalable lossless
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aac::SLSSpecificConfig()
-{
- Element_Begin1("SLSSpecificConfig");
- Skip_S1(3,"pcmWordLength");
- Skip_SB("aac_core_present");
- Skip_SB("lle_main_stream");
- Skip_SB("reserved_bit");
- Skip_S1(3,"frameLength");
- if (!channelConfiguration)
- program_config_element();
- Element_End0();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_AAC_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ac3.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ac3.cpp
deleted file mode 100644
index 02c42ca80..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ac3.cpp
+++ /dev/null
@@ -1,2491 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos (Common)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AC3_YES) || defined(MEDIAINFO_DVDV_YES) || defined(MEDIAINFO_MPEGPS_YES) || defined(MEDIAINFO_MPEGTS_YES)
-//---------------------------------------------------------------------------
-
-#include "ZenLib/Conf.h"
-using namespace ZenLib;
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern const int32u AC3_SamplingRate[]=
-{ 48000, 44100, 32000, 0,};
-
-//---------------------------------------------------------------------------
-const char* AC3_Mode[]=
-{
- "CM (complete main)",
- "ME (music and effects)",
- "VI (visually impaired)",
- "HI (hearing impaired)",
- "D (dialogue)",
- "C (commentary)",
- "E (emergency)",
- "VO (voice over)",
-};
-
-//---------------------------------------------------------------------------
-const char* AC3_Surround[]=
-{
- "",
- "Not Dolby Surround encoded",
- "Dolby Surround encoded",
- "",
-};
-
-//---------------------------------------------------------------------------
-extern const int16u AC3_BitRate[]=
-{
-
- 32,
- 40,
- 48,
- 56,
- 64,
- 80,
- 96,
- 112,
- 128,
- 160,
- 192,
- 224,
- 256,
- 320,
- 384,
- 448,
- 512,
- 576,
- 640,
-};
-
-//---------------------------------------------------------------------------
-extern const int8u AC3_Channels[]=
-{2, 1, 2, 3, 3, 4, 4, 5};
-
-//---------------------------------------------------------------------------
-} //NameSpace
-
-//---------------------------------------------------------------------------
-#endif //...
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-//
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AC3_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Ac3.h"
-#include <vector>
-#include <cmath>
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
- #include "MediaInfo/MediaInfo_Events_Internal.h"
-#endif //MEDIAINFO_EVENTS
-#include "MediaInfo/MediaInfo_Internal.h"
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const int32u AC3_SamplingRate2[]=
-{ 24000, 22050, 16000, 0,};
-
-//---------------------------------------------------------------------------
-const char* AC3_ChannelPositions[]=
-{
- "Dual mono",
- "Front: C",
- "Front: L R",
- "Front: L C R",
- "Front: L R, Back: C",
- "Front: L C R, Back: C",
- "Front: L R, Side: L R",
- "Front: L C R, Side: L R",
-};
-
-//---------------------------------------------------------------------------
-const char* AC3_ChannelPositions2[]=
-{
- "1+1",
- "1/0/0",
- "2/0/0",
- "3/0/0",
- "2/1/0",
- "3/1/0",
- "2/2/0",
- "3/2/0",
-};
-
-//---------------------------------------------------------------------------
-const char* AC3_ChannelLayout_lfeoff[]=
-{
- "1+1",
- "C",
- "L R",
- "L C R",
- "L R S",
- "L C R Cs",
- "L R Ls Rs",
- "L C R Ls Rs",
-};
-
-//---------------------------------------------------------------------------
-const char* AC3_ChannelLayout_lfeon[]=
-{
- "1+1 LFE",
- "C LFE",
- "L R LFE",
- "L C R LFE",
- "L R S LFE",
- "L C R LFE Cs",
- "L R LFE Ls Rs",
- "L C R LFE Ls Rs",
-};
-
-//---------------------------------------------------------------------------
-int16u AC3_acmod2chanmap[]=
-{
- 0xA000,
- 0x4000,
- 0xA000,
- 0xE000,
- 0xA100,
- 0xE100,
- 0xB900,
- 0xF800,
-};
-
-//---------------------------------------------------------------------------
-Ztring AC3_chanmap_ChannelPositions (int16u chanmap)
-{
- Ztring Front;
- Ztring Side;
- Ztring Back;
- Ztring More;
-
- for (int8u Pos=0; Pos<16; Pos++)
- {
- if (chanmap&(1<<(15-Pos)))
- {
- switch (Pos)
- {
- case 0 : Front+=__T(" L"); break;
- case 1 : Front+=__T(" C"); break;
- case 2 : Front+=__T(" R"); break;
- case 3 : Side+=__T(" L"); break;
- case 4 : Side+=__T(" R"); break;
- case 5 : {
- bool HasR=false;
- if (Front.find(__T(" R"))!=string::npos)
- {
- Front.resize(Front.size()-2);
- HasR=true;
- }
- Front+=__T(" C C");
- if (HasR)
- Front+=__T(" R");
- }
- break;
- case 6 : Back+=__T(" L R"); break;
- case 7 : if (Back.empty())
- Back=__T(" C");
- else
- Back=__T(" L C R");
- break;
- case 15 : More+=__T(", LFE");
- break;
- default: ;
- }
- }
- }
-
- Ztring ToReturn;
- if (!Front.empty())
- {
- ToReturn+=__T("Front:")+Front;
- }
- if (!Side.empty())
- {
- if (!ToReturn.empty())
- ToReturn+=__T(", ");
- ToReturn+=__T("Side:")+Side;
- }
- if (!Back.empty())
- {
- if (!ToReturn.empty())
- ToReturn+=__T(", ");
- ToReturn+=__T("Back:")+Back;
- }
- ToReturn+=More;
-
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-int8u AC3_chanmap_Channels (int16u chanmap)
-{
- int8u Channels=0;
-
- for (int8u Pos=0; Pos<16; Pos++)
- {
- if (chanmap&(1<<(15-Pos)))
- {
- switch (Pos)
- {
- case 5 :
- case 6 :
- case 9 :
- case 10 :
- case 11 :
- Channels+=2; break;
- default:
- Channels++; break;
- }
- }
- }
-
- return Channels;
-}
-
-//---------------------------------------------------------------------------
-Ztring AC3_chanmap_ChannelLayout (int16u chanmap, const Ztring &ChannelLayout0)
-{
- Ztring ToReturn=ChannelLayout0;
-
- for (int8u Pos=0; Pos<16; Pos++)
- {
- if (chanmap&(1<<(15-Pos)))
- {
- switch (Pos)
- {
- case 5 : ToReturn+=__T(" Lc Rc"); break;
- case 6 : ToReturn+=__T(" Lrs Rrs"); break;
- case 7 : ToReturn+=__T(" Cs");
- default: ;
- }
- }
- }
-
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-const int16u AC3_FrameSize[27][4]=
-{
- { 128, 138, 192, 0},
- { 160, 174, 240, 0},
- { 192, 208, 288, 0},
- { 224, 242, 336, 0},
- { 256, 278, 384, 0},
- { 320, 348, 480, 0},
- { 384, 416, 576, 0},
- { 448, 486, 672, 0},
- { 512, 556, 768, 0},
- { 640, 696, 960, 0},
- { 768, 834, 1152, 0},
- { 896, 974, 1344, 0},
- {1024, 1114, 1536, 0},
- {1280, 1392, 1920, 0},
- {1536, 1670, 2304, 0},
- {1792, 1950, 2688, 0},
- {2048, 2228, 3072, 0},
- {2304, 2506, 3456, 0},
- {2560, 2786, 3840, 0},
- { 0, 0, 0, 0},
- { 0, 0, 0, 0},
- { 0, 0, 0, 0},
- { 0, 0, 0, 0},
- { 0, 0, 0, 0},
- { 0, 0, 0, 0},
- { 0, 0, 0, 0},
- { 768, 0, 0, 0},
-};
-
-//---------------------------------------------------------------------------
-int16u AC3_FrameSize_Get(int8u frmsizecod, int8u fscod)
-{
- bool Padding=(frmsizecod%2)?true:false;
- int16u frame_size_id=frmsizecod/2;
-
- if (frame_size_id>26 || fscod>3)
- return 0;
-
- int16u FrameSize=AC3_FrameSize[frame_size_id][fscod];
- if (fscod==1 && Padding)
- FrameSize+=2; // frame lengths are padded by 1 word (16 bits) at 44100 Hz
- return FrameSize;
-}
-
-//---------------------------------------------------------------------------
-// CRC_16_Table
-// A CRC is computed like this:
-// Init: int32u CRC_16 = 0x0000;
-// for each data byte do
-// CRC_16=(CRC_16<<8) ^ CRC_16_Table[(CRC_16>>8)^(data_byte)];
-int16u CRC_16_Table[256] =
-{
- 0x0000, 0x8005, 0x800f, 0x000a, 0x801b, 0x001e, 0x0014, 0x8011,
- 0x8033, 0x0036, 0x003c, 0x8039, 0x0028, 0x802d, 0x8027, 0x0022,
- 0x8063, 0x0066, 0x006c, 0x8069, 0x0078, 0x807d, 0x8077, 0x0072,
- 0x0050, 0x8055, 0x805f, 0x005a, 0x804b, 0x004e, 0x0044, 0x8041,
- 0x80c3, 0x00c6, 0x00cc, 0x80c9, 0x00d8, 0x80dd, 0x80d7, 0x00d2,
- 0x00f0, 0x80f5, 0x80ff, 0x00fa, 0x80eb, 0x00ee, 0x00e4, 0x80e1,
- 0x00a0, 0x80a5, 0x80af, 0x00aa, 0x80bb, 0x00be, 0x00b4, 0x80b1,
- 0x8093, 0x0096, 0x009c, 0x8099, 0x0088, 0x808d, 0x8087, 0x0082,
- 0x8183, 0x0186, 0x018c, 0x8189, 0x0198, 0x819d, 0x8197, 0x0192,
- 0x01b0, 0x81b5, 0x81bf, 0x01ba, 0x81ab, 0x01ae, 0x01a4, 0x81a1,
- 0x01e0, 0x81e5, 0x81ef, 0x01ea, 0x81fb, 0x01fe, 0x01f4, 0x81f1,
- 0x81d3, 0x01d6, 0x01dc, 0x81d9, 0x01c8, 0x81cd, 0x81c7, 0x01c2,
- 0x0140, 0x8145, 0x814f, 0x014a, 0x815b, 0x015e, 0x0154, 0x8151,
- 0x8173, 0x0176, 0x017c, 0x8179, 0x0168, 0x816d, 0x8167, 0x0162,
- 0x8123, 0x0126, 0x012c, 0x8129, 0x0138, 0x813d, 0x8137, 0x0132,
- 0x0110, 0x8115, 0x811f, 0x011a, 0x810b, 0x010e, 0x0104, 0x8101,
- 0x8303, 0x0306, 0x030c, 0x8309, 0x0318, 0x831d, 0x8317, 0x0312,
- 0x0330, 0x8335, 0x833f, 0x033a, 0x832b, 0x032e, 0x0324, 0x8321,
- 0x0360, 0x8365, 0x836f, 0x036a, 0x837b, 0x037e, 0x0374, 0x8371,
- 0x8353, 0x0356, 0x035c, 0x8359, 0x0348, 0x834d, 0x8347, 0x0342,
- 0x03c0, 0x83c5, 0x83cf, 0x03ca, 0x83db, 0x03de, 0x03d4, 0x83d1,
- 0x83f3, 0x03f6, 0x03fc, 0x83f9, 0x03e8, 0x83ed, 0x83e7, 0x03e2,
- 0x83a3, 0x03a6, 0x03ac, 0x83a9, 0x03b8, 0x83bd, 0x83b7, 0x03b2,
- 0x0390, 0x8395, 0x839f, 0x039a, 0x838b, 0x038e, 0x0384, 0x8381,
- 0x0280, 0x8285, 0x828f, 0x028a, 0x829b, 0x029e, 0x0294, 0x8291,
- 0x82b3, 0x02b6, 0x02bc, 0x82b9, 0x02a8, 0x82ad, 0x82a7, 0x02a2,
- 0x82e3, 0x02e6, 0x02ec, 0x82e9, 0x02f8, 0x82fd, 0x82f7, 0x02f2,
- 0x02d0, 0x82d5, 0x82df, 0x02da, 0x82cb, 0x02ce, 0x02c4, 0x82c1,
- 0x8243, 0x0246, 0x024c, 0x8249, 0x0258, 0x825d, 0x8257, 0x0252,
- 0x0270, 0x8275, 0x827f, 0x027a, 0x826b, 0x026e, 0x0264, 0x8261,
- 0x0220, 0x8225, 0x822f, 0x022a, 0x823b, 0x023e, 0x0234, 0x8231,
- 0x8213, 0x0216, 0x021c, 0x8219, 0x0208, 0x820d, 0x8207, 0x0202
-};
-
-int CRC16_Init(int16u *Table, int16u Polynomial)
-{
- for (size_t Pos=0; Pos<256; Pos++)
- {
- Table[Pos]=(int16u)Pos<<8;
-
- for(int8u bit=0; bit<8; bit++)
- {
- if (Table[Pos]&0x8000)
- Table[Pos]=(Table[Pos]<<1)^Polynomial;
- else
- Table[Pos]=Table[Pos]<<1;
- }
- }
- return 0;
-}
-
-//---------------------------------------------------------------------------
-const float64 AC3_dynrng[]=
-{
- 6.02,
- 12.04,
- 18.06,
- 24.08,
- -18.06,
- -12.04,
- - 6.02,
- 0.00,
-};
-
-//---------------------------------------------------------------------------
-const float64 AC3_compr[]=
-{
- 6.02,
- 12.04,
- 18.06,
- 24.08,
- 30.10,
- 36.12,
- 42.14,
- 48.16,
- -42.14,
- -36.12,
- -30.10,
- -24.08,
- -18.06,
- -12.04,
- - 6.02,
- 0.00,
-};
-
-//---------------------------------------------------------------------------
-const char* AC3_HD_StreamType(int8u StreamType)
-{
- switch (StreamType)
- {
- case 0xBA : return "TrueHD";
- case 0xBB : return "MLP";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-int32u AC3_HD_SamplingRate(int8u SamplingRate)
-{
- if (SamplingRate==0xF)
- return 0;
-
- return ((SamplingRate&8)?44100:48000)<<(SamplingRate&7) ;
-}
-
-//---------------------------------------------------------------------------
-static const int8u AC3_TrueHD_ChannelCountPerBit[13]=
-{
- 2, //LR
- 1, //C
- 1, //LFE
- 2, //LRs
- 2, //LRvh
- 2, //LRc
- 2, //LRrs
- 1, //Cs
- 1, //Ts
- 2, //LRsd
- 2, //LRw
- 1, //Cvh
- 1, //LFE2
-};
-
-//---------------------------------------------------------------------------
-int8u AC3_TrueHD_Channels(int16u ChannelsMap)
-{
- int8u Channels=0;
-
- for (int8u Pos=0; Pos<13; Pos++)
- Channels+=AC3_TrueHD_ChannelCountPerBit[Pos]*((ChannelsMap>>Pos)&0x1);
-
- return Channels;
-}
-
-//---------------------------------------------------------------------------
-std::string AC3_TrueHD_Channels_Positions(int16u ChannelsMap)
-{
- std::string Text;
- if ((ChannelsMap&0x0003)==0x0003)
- Text+="Front: L C R";
- else
- {
- if (ChannelsMap&0x0001)
- Text+="Front: C";
- if (ChannelsMap&0x0002)
- Text+="Front: L, R";
- }
-
- if (ChannelsMap&0x08)
- Text+=", Side: L R";
-
- if (ChannelsMap&0x80)
- Text+=", Back: C";
-
- if ((ChannelsMap&0x0810)==0x0810)
- Text+=", vh: L C R";
- else
- {
- if (ChannelsMap&0x0010)
- Text+=", vh: L R";
- if (ChannelsMap&0x0800)
- Text+=", vh: C";
- }
-
- if (ChannelsMap&0x0020)
- Text+=", c: L R";
- if (ChannelsMap&0x0040)
- Text+=", Back: L R";
- if (ChannelsMap&0x0100)
- Text+=", s: T";
- if (ChannelsMap&0x0200)
- Text+=", sd: L R";
- if (ChannelsMap&0x0400)
- Text+=", w: L R";
-
- if (ChannelsMap&0x0004)
- Text+=", LFE";
- if (ChannelsMap&0x1000)
- Text+=", LFE2";
-
- return Text;
-}
-
-//---------------------------------------------------------------------------
-Ztring AC3_TrueHD_Channels_Positions2(int16u ChannelsMap)
-{
- int8u Front=0, Surround=0, Rear=0, LFE=0;
-
- if (ChannelsMap&0x0001)
- Front++;
- if (ChannelsMap&0x0002)
- Front+=2;
-
- if (ChannelsMap&0x08)
- Surround+=2;
- if (ChannelsMap&0x80)
- Surround++;
-
- if (ChannelsMap&0x0010)
- Rear+=2; //vh
- if (ChannelsMap&0x0800)
- Rear++; //vh
-
-
- if (ChannelsMap&0x0020)
- Rear+=2; //c
- if (ChannelsMap&0x0040)
- Rear+=2; //rs
- if (ChannelsMap&0x0100)
- Rear+=2; //s
- if (ChannelsMap&0x0200)
- Rear+=2; //sd
- if (ChannelsMap&0x0400)
- Rear+=2; //w
-
- if (ChannelsMap&0x0004)
- LFE++;
- if (ChannelsMap&0x1000)
- LFE++;
-
- Ztring Text;
- Text+=Ztring::ToZtring(Front);
- Text+=__T('/')+Ztring::ToZtring(Surround);
- Text+=__T('/')+Ztring::ToZtring(Rear);
- Text+=__T('.')+Ztring::ToZtring(LFE);
- return Text;
-}
-
-//---------------------------------------------------------------------------
-static const int32u AC3_MLP_Channels[32]=
-{
- 1,
- 2,
- 3,
- 4,
- 3,
- 4,
- 5,
- 3,
- 4,
- 5,
- 4,
- 5,
- 6,
- 4,
- 5,
- 4,
- 5,
- 6,
- 5,
- 5,
- 6,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-static const int32u AC3_MLP_Resolution[16]=
-{
- 16,
- 20,
- 24,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Ac3::File_Ac3()
-:File__Analyze()
-{
- //Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Ac3;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=32*1024;
- Buffer_TotalBytes_Fill_Max=1024*1024;
- PTS_DTS_Needed=true;
- IsRawStream=true;
- Frame_Count_NotParsedIncluded=0;
-
- //In
- Frame_Count_Valid=MediaInfoLib::Config.ParseSpeed_Get()>=0.3?32:2;
- MustParse_dac3=false;
- MustParse_dec3=false;
- CalculateDelay=false;
-
- //Buffer
- Save_Buffer=NULL;
-
- //Temp
- Frame_Count_HD=0;
- fscod=0;
- fscod2=0;
- frmsizecod=0;
- bsid_Max=(int8u)-1;
- for (int8u Pos=0; Pos<8; Pos++)
- for (int8u Pos2=0; Pos2<9; Pos2++)
- {
- frmsizplus1_Max[Pos][Pos2]=0;
- acmod_Max[Pos][Pos2]=(int8u)-1;
- lfeon_Max[Pos][Pos2]=false;
- bsmod_Max[Pos][Pos2]=0;
- dsurmod_Max[Pos][Pos2]=0;
- chanmape_Max[Pos][Pos2]=false;
- chanmap_Max[Pos][Pos2]=0;
- }
- numblkscod=0;
- substreamid_Independant_Current=0;
- substreams_Count=0;
- dxc3_Parsed=false;
- HD_MajorSync_Parsed=false;
- Core_IsPresent=false;
- HD_IsPresent=false;
- dynrnge_Exists=false;
- TimeStamp_IsPresent=false;
- TimeStamp_IsParsing=false;
- TimeStamp_Parsed=false;
- TimeStamp_DropFrame_IsValid=false;
- BigEndian=true;
- IgnoreCrc_Done=false;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ac3::Streams_Fill()
-{
- if (HD_MajorSync_Parsed)
- {
- Stream_Prepare(Stream_Audio);
- if (HD_BitRate_Max)
- Fill(Stream_Audio, 0, Audio_BitRate_Maximum, (HD_BitRate_Max*AC3_HD_SamplingRate(HD_SamplingRate2)+8)>>4);
-
- if (HD_StreamType==0xBA) //TrueHD
- {
- Fill(Stream_General, 0, General_Format, "TrueHD");
- Fill(Stream_Audio, 0, Audio_Format, "TrueHD");
-
- Fill(Stream_Audio, 0, Audio_Codec, "TrueHD");
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "VBR");
- Fill(Stream_Audio, 0, Audio_SamplingRate, AC3_HD_SamplingRate(HD_SamplingRate1));
- Fill(Stream_Audio, 0, Audio_Channel_s_, AC3_TrueHD_Channels(HD_Channels2));
- Fill(Stream_Audio, 0, Audio_ChannelPositions, AC3_TrueHD_Channels_Positions(HD_Channels2));
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, AC3_TrueHD_Channels_Positions2(HD_Channels2));
- if (Core_IsPresent && !IsSub)
- Fill(Stream_Audio, 0, Audio_MuxingMode, "After core data");
- }
-
- if (HD_StreamType==0xBB) //TrueHD
- {
- Fill(Stream_General, 0, General_Format, "MLP");
- if (!Core_IsPresent)
- {
- Fill(Stream_Audio, 0, Audio_Format, "MLP");
- Fill(Stream_Audio, 0, Audio_Codec, "MLP");
- }
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "VBR");
- Fill(Stream_Audio, 0, Audio_SamplingRate, AC3_HD_SamplingRate(HD_SamplingRate2));
- if (HD_SamplingRate1!=HD_SamplingRate2)
- Fill(Stream_Audio, 0, Audio_SamplingRate, AC3_HD_SamplingRate(HD_SamplingRate2));
- Fill(Stream_Audio, 0, Audio_Channel_s_, AC3_MLP_Channels[HD_Channels1]);
- if (HD_Channels1!=HD_Channels2)
- Fill(Stream_Audio, 0, Audio_Channel_s_, AC3_MLP_Channels[HD_Channels1]);
- Fill(Stream_Audio, 0, Audio_BitDepth, AC3_MLP_Resolution[HD_Resolution2]);
- if (HD_Resolution1!=HD_Resolution2)
- Fill(Stream_Audio, 0, Audio_BitDepth, AC3_MLP_Resolution[HD_Resolution1]);
- }
- }
-
- //AC-3
- if (bsid_Max<=0x09)
- {
- if (Count_Get(Stream_Audio)==0)
- Stream_Prepare(Stream_Audio);
- Fill(Stream_General, 0, General_Format, "AC-3");
- Fill(Stream_Audio, 0, Audio_Format, "AC-3");
- Fill(Stream_Audio, 0, Audio_Codec, "AC3");
- Fill(Stream_Audio, 0, Audio_BitDepth, 16);
-
- int32u Divider=bsid_Max==9?2:1; // Unofficial hack for low sample rate (e.g. 22.05 kHz)
- if (Ztring::ToZtring(AC3_SamplingRate[fscod]/Divider)!=Retrieve(Stream_Audio, 0, Audio_SamplingRate))
- Fill(Stream_Audio, 0, Audio_SamplingRate, AC3_SamplingRate[fscod]/Divider);
- if (frmsizecod/2<19)
- {
- if (Frame_Count_HD)
- Fill(Stream_Audio, 0, Audio_BitRate, "Unknown");
- int32u BitRate=AC3_BitRate[frmsizecod/2]*1000;
- int32u Divider=bsid_Max==9?2:1; // Unofficial hack for low sample rate (e.g. 22.05 kHz)
- Fill(Stream_Audio, 0, Audio_BitRate, BitRate/Divider);
- if (CalculateDelay && Buffer_TotalBytes_FirstSynched>100 && BitRate>0)
- {
- Fill(Stream_Audio, 0, Audio_Delay, (float)Buffer_TotalBytes_FirstSynched*8*1000/BitRate, 0);
- Fill(Stream_Audio, 0, Audio_Delay_Source, "Stream");
- }
- }
-
- Fill(Stream_Audio, 0, Audio_Format_Settings_ModeExtension, AC3_Mode[bsmod_Max[0][0]]);
- if (acmod_Max[0][0]==0)
- Fill(Stream_Audio, 0, Audio_Format_Settings_Mode, "Dual Mono");
- if (acmod_Max[0][0]!=(int8u)-1)
- {
- int8u Channels=AC3_Channels[acmod_Max[0][0]];
- Ztring ChannelPositions; ChannelPositions.From_Local(AC3_ChannelPositions[acmod_Max[0][0]]);
- Ztring ChannelPositions2; ChannelPositions2.From_Local(AC3_ChannelPositions2[acmod_Max[0][0]]);
- Ztring ChannelLayout; ChannelLayout.From_Local(lfeon_Max[0][0]?AC3_ChannelLayout_lfeon[acmod_Max[0][0]]:AC3_ChannelLayout_lfeoff[acmod_Max[0][0]]);
- if (lfeon_Max[0][0])
- {
- Channels+=1;
- ChannelPositions+=__T(", LFE");
- ChannelPositions2+=__T(".1");
- }
- if (Ztring::ToZtring(Channels)!=Retrieve(Stream_Audio, 0, Audio_Channel_s_))
- Fill(Stream_Audio, 0, Audio_Channel_s_, Channels);
- if (ChannelPositions!=Retrieve(Stream_Audio, 0, Audio_ChannelPositions))
- Fill(Stream_Audio, 0, Audio_ChannelPositions, ChannelPositions);
- if (ChannelPositions2!=Retrieve(Stream_Audio, 0, Audio_ChannelPositions_String2))
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, ChannelPositions2);
- if (ChannelLayout!=Retrieve(Stream_Audio, 0, Audio_ChannelLayout))
- Fill(Stream_Audio, 0, Audio_ChannelLayout, ChannelLayout);
- }
- if (dsurmod_Max[0][0]==2)
- {
- Fill(Stream_Audio, 0, Audio_Format_Profile, "Dolby Digital");
- Fill(Stream_Audio, 0, Audio_Codec_Profile, "Dolby Digital");
- }
- if (__T("CBR")!=Retrieve(Stream_Audio, 0, Audio_BitRate_Mode))
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
- }
-
- //E-AC-3
- else if (bsid_Max<=0x10)
- {
- for (size_t Pos=0; Pos<8; Pos++)
- if (acmod_Max[Pos][0]!=(int8u)-1)
- {
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "E-AC-3");
- Fill(Stream_Audio, 0, Audio_Codec, "AC3+");
-
- if (acmod_Max[1][0]!=(int8u)-1)
- Fill(Stream_Audio, 0, Audio_ID, 1+Pos);
-
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
- int8u numblks=numblkscod==3?6:numblkscod+1;
- int32u frmsiz_Total=0;
- for (size_t Pos2=0; Pos2<8; Pos2++)
- frmsiz_Total+=frmsizplus1_Max[Pos][Pos2];
- if (numblks)
- {
- Fill(Stream_Audio, 0, Audio_BitRate, ((frmsiz_Total*2)*8*(750/((int32u)numblks)))/4);
- if (frmsizplus1_Max[Pos][1]) //If dependand substreams
- Fill(Stream_Audio, 0, Audio_BitRate, ((frmsizplus1_Max[Pos][0]*2)*8*(750/((int16u)numblks)))/4);
-
- }
-
- if (fscod!=2)
- Fill(Stream_Audio, 0, Audio_SamplingRate, AC3_SamplingRate[fscod]);
- else
- Fill(Stream_Audio, 0, Audio_SamplingRate, AC3_SamplingRate2[fscod2]);
-
- if (acmod_Max[Pos][1]!=(int8u)-1)
- {
- int16u chanmap_Final=0;
- for (int8u Pos2=0; Pos2<9; Pos2++)
- if (acmod_Max[Pos][Pos2]!=(int8u)-1)
- {
- if (chanmape_Max[Pos][Pos2])
- chanmap_Final|=chanmap_Max[Pos][Pos2];
- else
- {
- chanmap_Final|=AC3_acmod2chanmap[acmod_Max[Pos][Pos2]];
- if (lfeon_Max[Pos][Pos2])
- chanmap_Final|=1; // LFE position in chanmap is bit 0
- }
- }
-
- Fill(Stream_Audio, 0, Audio_Channel_s_, AC3_chanmap_Channels(chanmap_Final));
- Fill(Stream_Audio, 0, Audio_ChannelPositions, AC3_chanmap_ChannelPositions(chanmap_Final));
- Ztring ChannelLayout; ChannelLayout.From_Local(lfeon_Max[0][0]?AC3_ChannelLayout_lfeon[acmod_Max[0][0]]:AC3_ChannelLayout_lfeoff[acmod_Max[0][0]]);
- Fill(Stream_Audio, 0, Audio_ChannelLayout, AC3_chanmap_ChannelLayout(chanmap_Final, ChannelLayout));
- }
- if (acmod_Max[Pos][0]==0)
- {
- Fill(Stream_Audio, 0, Audio_Format_Profile, "Dual Mono");
- Fill(Stream_Audio, 0, Audio_Codec_Profile, "Dual Mono");
- }
- else if (acmod_Max[Pos][0]!=(int8u)-1)
- {
- int8u Channels=AC3_Channels[acmod_Max[Pos][0]];
- Ztring ChannelPositions; ChannelPositions.From_Local(AC3_ChannelPositions[acmod_Max[Pos][0]]);
- if (lfeon_Max[Pos][0])
- {
- Channels+=1;
- ChannelPositions+=__T(", LFE");
- }
- Fill(Stream_Audio, 0, Audio_Channel_s_, Channels);
- Fill(Stream_Audio, 0, Audio_ChannelPositions, ChannelPositions);
- Fill(Stream_Audio, 0, Audio_ChannelLayout, lfeon_Max[0][0]?AC3_ChannelLayout_lfeon[acmod_Max[0][0]]:AC3_ChannelLayout_lfeoff[acmod_Max[0][0]]);
- }
- }
- }
-
- if (HD_MajorSync_Parsed)
- {
- //Filling Maximum bitrate with the constant core bitrate for better coherancy
- ZtringList List;
- List.Separator_Set(0, __T(" / "));
- List.Write(Retrieve(Stream_Audio, 0, Audio_BitRate));
- if (List.size()>=2)
- Fill(Stream_Audio, 0, Audio_BitRate_Maximum, List[1]);
- }
-
- //Dolby Metadata
- if (Core_IsPresent)
- {
- //Endianess
- Fill(Stream_Audio, 0, Audio_Format_Settings_Endianness, BigEndian?"Big":"Little");
- Fill(Stream_Audio, 0, "bsid", bsid_Max);
-
- Fill(Stream_Audio, 0, "dialnorm", FirstFrame_Dolby.dialnorm==0?-31:-FirstFrame_Dolby.dialnorm);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dialnorm"), Info_Options)=__T("N NT");
- Fill(Stream_Audio, 0, "dialnorm/String", Ztring::ToZtring(FirstFrame_Dolby.dialnorm==0?-31:-FirstFrame_Dolby.dialnorm)+__T(" dB"));
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dialnorm/String"), Info_Options)=__T("N NT");
- if (FirstFrame_Dolby.compre)
- {
- float64 Value=AC3_compr[FirstFrame_Dolby.compr>>4]+20*std::log10(((float)(0x10+(FirstFrame_Dolby.compr&0x0F)))/32);
- Fill(Stream_Audio, 0, "compr", Value, 2);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("compr"), Info_Options)=__T("N NT");
- Fill(Stream_Audio, 0, "compr/String", Ztring::ToZtring(Value, 2)+__T(" dB"));
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("compr/String"), Info_Options)=__T("N NT");
- }
- if (FirstFrame_Dolby.dynrnge)
- {
- float64 Value;
- if (FirstFrame_Dolby.dynrng==0)
- Value=0; //Special case in the formula
- else
- Value=AC3_dynrng[FirstFrame_Dolby.dynrng>>5]+20*std::log10(((float)(0x20+(FirstFrame_Dolby.dynrng&0x1F)))/64);
- Fill(Stream_Audio, 0, "dynrng", Value, 2);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dynrng"), Info_Options)=__T("N NT");
- Fill(Stream_Audio, 0, "dynrng/String", Ztring::ToZtring(Value, 2)+__T(" dB"));
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dynrng/String"), Info_Options)=__T("N NT");
- }
-
- for (int8u Pos=0; Pos<8; Pos++)
- for (int8u Pos2=0; Pos2<9; Pos2++)
- {
- if (acmod_Max[Pos][Pos2]==(int8u)-1)
- break;
- if (acmod_Max[Pos][Pos2]!=(int8u)-1)
- {
- if (acmod_Max[Pos][Pos2]==2)
- {
- Fill(Stream_Audio, 0, "dsurmod", dsurmod_Max[Pos][Pos2]);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dsurmod"), Info_Options)=__T("N NT");
- Fill(Stream_Audio, 0, "dsurmod/String", AC3_Surround[dsurmod_Max[Pos][Pos2]]);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dsurmod/String"), Info_Options)=__T("N NT");
- }
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("bsid"), Info_Options)=__T("N NT");
- Fill(Stream_Audio, 0, "acmod", acmod_Max[Pos][Pos2]);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("acmod"), Info_Options)=__T("N NT");
- Fill(Stream_Audio, 0, "lfeon", (lfeon_Max[Pos][Pos2])?1:0);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("lfeon"), Info_Options)=__T("N NT");
- }
- }
- }
-
- //TimeStamp
- if (TimeStamp_IsPresent)
- {
- Fill(Stream_Audio, 0, Audio_Delay, TimeStamp_Content*1000, 0);
- Fill(Stream_Audio, 0, Audio_Delay_Source, "Stream");
- if (TimeStamp_DropFrame_IsValid)
- Fill(Stream_Audio, 0, Audio_Delay_Settings, TimeStamp_DropFrame_Content?"drop_frame_flag=1":"drop_frame_flag=0");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Ac3::Streams_Finish()
-{
- //Stats
- if (!dialnorms.empty())
- {
- int8u Minimum_Raw=1;
- int8u Maximum_Raw=31;
- float64 Sum_Intensity=0;
- int64u Count=0;
- for (int8u Pos=0; (size_t)Pos<dialnorms.size(); Pos++)
- if (dialnorms[Pos])
- {
- if (Minimum_Raw<(Pos==0?31:Pos))
- Minimum_Raw=(Pos==0?31:Pos);
- if (Maximum_Raw>(Pos==0?31:Pos))
- Maximum_Raw=(Pos==0?31:Pos);
- Sum_Intensity+=dialnorms[Pos]*pow(10, -((float64)Pos)/10);
- Count+=dialnorms[Pos];
- }
- if (Count)
- {
- float64 Average_dB = log10(Sum_Intensity / Count) * 10;
- Fill(Stream_Audio, 0, "dialnorm_Average", Average_dB, 0);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dialnorm_Average"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "dialnorm_Average/String", Ztring::ToZtring(Average_dB, 0) + __T(" dB"));
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dialnorm_Average/String"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "dialnorm_Minimum", -Minimum_Raw);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dialnorm_Minimum"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "dialnorm_Minimum/String", Ztring::ToZtring(-Minimum_Raw) + __T(" dB"));
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dialnorm_Minimum/String"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "dialnorm_Maximum", -Maximum_Raw);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dialnorm_Maximum"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "dialnorm_Maximum/String", Ztring::ToZtring(-Maximum_Raw) + __T(" dB"));
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dialnorm_Maximum/String"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "dialnorm_Count", Count);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dialnorm_Count"), Info_Options) = __T("N NT");
- }
- }
- if (!comprs.empty())
- {
- float64 Minimum_dB=47.89;
- float64 Maximum_dB=-48.16;
- float64 Sum_Intensity=0;
- int64u Count=0;
- for (size_t Pos=0; Pos<comprs.size(); Pos++)
- if (comprs[Pos])
- {
- float64 Value=AC3_compr[Pos>>4]+20*std::log10(((float)(0x10+(Pos&0x0F)))/32);
- if (Minimum_dB>Value)
- Minimum_dB=Value;
- if (Maximum_dB<Value)
- Maximum_dB=Value;
- Sum_Intensity+=comprs[Pos]*pow(10, Value/10);
- Count+=comprs[Pos];
- }
- if (Count)
- {
- float64 Average_dB = log10(Sum_Intensity / Count) * 10;
- Fill(Stream_Audio, 0, "compr_Average", Average_dB, 2);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("compr_Average"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "compr_Average/String", Ztring::ToZtring(Average_dB, 2) + __T(" dB"));
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("compr_Average/String"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "compr_Minimum", Minimum_dB, 2);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("compr_Minimum"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "compr_Minimum/String", Ztring::ToZtring(Minimum_dB, 2) + __T(" dB"));
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("compr_Minimum/String"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "compr_Maximum", Maximum_dB, 2);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("compr_Maximum"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "compr_Maximum/String", Ztring::ToZtring(Maximum_dB, 2) + __T(" dB"));
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("compr_Maximum/String"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "compr_Count", Count);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("compr_Count"), Info_Options) = __T("N NT");
- }
- }
- if (dynrnge_Exists && !dynrngs.empty())
- {
- float64 Minimum_dB=23.95;
- float64 Maximum_dB=-24.08;
- float64 Sum_Intensity=0;
- int64u Count=0;
- for (size_t Pos=0; Pos<dynrngs.size(); Pos++)
- if (dynrngs[Pos])
- {
- float64 Value;
- if (Pos==0)
- Value=0; //Special case in the formula
- else
- Value=AC3_dynrng[Pos>>5]+20*std::log10(((float)(0x20+(Pos&0x1F)))/64);
- if (Minimum_dB>Value)
- Minimum_dB=Value;
- if (Maximum_dB<Value)
- Maximum_dB=Value;
- Sum_Intensity+=dynrngs[Pos]*pow(10, Value/10);
- Count+=dynrngs[Pos];
- }
- if (Count)
- {
- float64 Average_dB = log10(Sum_Intensity / Count) * 10;
- Fill(Stream_Audio, 0, "dynrng_Average", Average_dB, 2);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dynrng_Average"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "dynrng_Average/String", Ztring::ToZtring(Average_dB, 2) + __T(" dB"));
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dynrng_Average/String"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "dynrng_Minimum", Minimum_dB, 2);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dynrng_Minimum"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "dynrng_Minimum/String", Ztring::ToZtring(Minimum_dB, 2) + __T(" dB"));
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dynrng_Minimum/String"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "dynrng_Maximum", Maximum_dB, 2);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dynrng_Maximum"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "dynrng_Maximum/String", Ztring::ToZtring(Maximum_dB, 2) + __T(" dB"));
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dynrng_Maximum/String"), Info_Options) = __T("N NT");
- Fill(Stream_Audio, 0, "dynrng_Count", Count);
- (*Stream_More)[Stream_Audio][0](Ztring().From_Local("dynrng_Count"), Info_Options) = __T("N NT");
- }
- }
-
- //Duration
- if (!IsSub)
- {
- int64u Frame_Count_ForDuration=0;
- if (MediaInfoLib::Config.ParseSpeed_Get()==1)
- {
- Frame_Count_ForDuration=Frame_Count; //We have the exact count of frames
- Fill(Stream_Audio, 0, Audio_StreamSize, File_Offset+Buffer_Offset+Element_Size-File_Offset_FirstSynched);
- }
- else if (bsid_Max<=9 && frmsizecods.size()==1 && fscods.size()==1 && Frame_Count_HD==0)
- {
- int16u Size=AC3_FrameSize_Get(frmsizecods.begin()->first, fscods.begin()->first);
- if (Size)
- {
- if (TimeStamp_IsPresent)
- Size+=16;
- Frame_Count_ForDuration=(File_Size-File_Offset_FirstSynched)/Size; //Only complete frames
- Fill(Stream_Audio, 0, Audio_StreamSize, Frame_Count_ForDuration*Size);
- }
- }
- if (Frame_Count_ForDuration)
- {
- Clear(Stream_Audio, 0, Audio_BitRate);
-
- //HD part
- if (Frame_Count_HD)
- {
- int32u HD_SamplingRate=AC3_HD_SamplingRate(HD_SamplingRate1);
- if (HD_SamplingRate)
- {
- int8u FrameDuration; //In samples
- if (HD_SamplingRate<44100)
- FrameDuration=0; //Unknown
- else if (HD_SamplingRate<=48000)
- FrameDuration=40;
- else if (HD_SamplingRate<=96000)
- FrameDuration=80;
- else if (HD_SamplingRate<=192000)
- FrameDuration=160;
- else
- FrameDuration=0; //Unknown
- if (FrameDuration)
- {
- int64u SamplingCount=Frame_Count_HD*FrameDuration;
- Fill(Stream_Audio, 0, Audio_Duration, SamplingCount/(((float64)HD_SamplingRate)/1000), 0);
- Fill(Stream_Audio, 0, Audio_SamplingCount, SamplingCount);
- Fill(Stream_Audio, 0, Audio_BitRate, (File_Size-File_Offset_FirstSynched)/(SamplingCount/(((float64)HD_SamplingRate)/1000))*8, 0);
- }
- Fill(Stream_Audio, 0, Audio_FrameCount, Frame_Count_HD);
- }
- }
- if (Core_IsPresent)
- {
- Fill(Stream_Audio, 0, Audio_FrameCount, Frame_Count_ForDuration);
- if (AC3_SamplingRate[fscod])
- {
- float64 FrameDuration;
- if (bsid_Max<=0x08)
- FrameDuration=32;
- else if (bsid_Max<=0x09)
- FrameDuration=16; // Unofficial hack for low sample rate (e.g. 22.05 kHz)
- else
- FrameDuration=0;
- if (FrameDuration)
- {
- FrameDuration*=((float64)48000)/AC3_SamplingRate[fscod]; //32 ms for 48 KHz, else proportional (34.83 for 44.1 KHz, 48 ms for 32 KHz)
- Fill(Stream_Audio, 0, Audio_SamplingCount, Frame_Count_ForDuration*1536);
- Fill(Stream_Audio, 0, Audio_Duration, Frame_Count_ForDuration*FrameDuration, 0);
- int32u BitRate=AC3_BitRate[frmsizecod/2]*1000;
- int32u Divider=bsid_Max==9?2:1; // Unofficial hack for low sample rate (e.g. 22.05 kHz)
- Fill(Stream_Audio, 0, Audio_BitRate, BitRate/Divider);
- }
- }
- }
- }
- }
- else if (FrameInfo.PTS!=(int64u)-1 && FrameInfo.PTS>PTS_Begin)
- {
- Fill(Stream_Audio, 0, Audio_Duration, float64_int64s(((float64)(FrameInfo.PTS-PTS_Begin))/1000000));
- float64 FrameDuration;
- if (bsid_Max<=0x08)
- FrameDuration=32;
- else if (bsid_Max<=0x09)
- FrameDuration=16; // Unofficial hack for low sample rate (e.g. 22.05 kHz)
- else if (bsid_Max>0x0A && bsid_Max<=0x10)
- FrameDuration=((float64)32)/6;
- else
- FrameDuration=0;
- if (FrameDuration)
- Fill(Stream_Audio, 0, Audio_FrameCount, float64_int64s(((float64)(FrameInfo.PTS-PTS_Begin))/1000000/FrameDuration));
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Ac3::Read_Buffer_Unsynched()
-{
- delete[] Save_Buffer; Save_Buffer=NULL;
-
- if (File_GoTo==0)
- Synched_Init();
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_Ac3::Read_Buffer_Seek (size_t Method, int64u Value, int64u /*ID*/)
-{
- GoTo(0);
- Open_Buffer_Unsynch();
- return 1;
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Ac3::FileHeader_Begin()
-{
- //Specific cases
- if (MustParse_dac3 || MustParse_dec3)
- return true;
-
- //Must have enough buffer for having header
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- //False positives detection: detect Matroska files, AC-3 parser is not smart enough
- if (!FileHeader_Begin_0x000001())
- {
- Finish("AC-3");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Ac3::Synchronize()
-{
- //Specific cases
- if (MustParse_dac3 || MustParse_dec3)
- return true;
-
- //Synchronizing
- while (Buffer_Offset+8<=Buffer_Size)
- {
- if (!FrameSynchPoint_Test())
- return false; //Need more data
- if (Synched)
- break;
- Buffer_Offset++;
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+8>Buffer_Size)
- {
- //We must keep more bytes in order to detect TimeStamp
- if (Frame_Count==0)
- {
- if (Buffer_Offset>=16)
- Buffer_Offset-=16;
- else
- Buffer_Offset=0;
- return false;
- }
-
- if (Buffer_Offset+7==Buffer_Size && CC3(Buffer+Buffer_Offset+4)!=0xF8726F && CC2(Buffer+Buffer_Offset)!=0x0B77 && CC2(Buffer+Buffer_Offset)!=0x770B)
- Buffer_Offset++;
- if (Buffer_Offset+6==Buffer_Size && CC2(Buffer+Buffer_Offset+4)!=0xF872 && CC2(Buffer+Buffer_Offset)!=0x0B77 && CC2(Buffer+Buffer_Offset)!=0x770B)
- Buffer_Offset++;
- if (Buffer_Offset+5==Buffer_Size && CC1(Buffer+Buffer_Offset+4)!=0xF8 && CC2(Buffer+Buffer_Offset)!=0x0B77 && CC2(Buffer+Buffer_Offset)!=0x770B)
- Buffer_Offset++;
- if (Buffer_Offset+4==Buffer_Size && CC2(Buffer+Buffer_Offset)!=0x0B77 && CC2(Buffer+Buffer_Offset)!=0x770B)
- Buffer_Offset++;
- if (Buffer_Offset+3==Buffer_Size && CC2(Buffer+Buffer_Offset)!=0x0B77 && CC2(Buffer+Buffer_Offset)!=0x770B)
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && CC2(Buffer+Buffer_Offset)!=0x0B77 && CC2(Buffer+Buffer_Offset)!=0x770B)
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && CC1(Buffer+Buffer_Offset)!=0x0B && CC1(Buffer+Buffer_Offset)!=0x77)
- Buffer_Offset++;
- return false;
- }
-
- //Testing if we have TimeStamp
- if (Buffer_Offset>=16)
- {
- if ( Buffer[Buffer_Offset-0x10+0x00]==0x01 //Magic value? Always 0x01
- && Buffer[Buffer_Offset-0x10+0x01]==0x10 //Size? Always 0x10
- && Buffer[Buffer_Offset-0x10+0x02]==0x00 //First byte of HH? Always 0x00
- && (Buffer[Buffer_Offset-0x10+0x03]>>4 )<0x6 //Second byte of HH? First 4 bits must be <0x6
- && (Buffer[Buffer_Offset-0x10+0x03]&0xF)<0xA //Second byte of HH? Second 4 bits must be <0xA
- && Buffer[Buffer_Offset-0x10+0x04]==0x00 //First byte of MM? Always 0x00
- && (Buffer[Buffer_Offset-0x10+0x05]>>4 )<0x6 //Second byte of MM? First 4 bits must be <0x6
- && (Buffer[Buffer_Offset-0x10+0x05]&0xF)<0xA //Second byte of MM? Second 4 bits must be <0xA
- && Buffer[Buffer_Offset-0x10+0x06]==0x00 //First byte of SS? Always 0x00
- && (Buffer[Buffer_Offset-0x10+0x07]>>4 )<0x6 //Second byte of SS? First 4 bits must be <0x6
- && (Buffer[Buffer_Offset-0x10+0x07]&0xF)<0xA //Second byte of SS? Second 4 bits must be <0xA
- && Buffer[Buffer_Offset-0x10+0x08]==0x00 //First byte of FF? Always 0x00
- && (Buffer[Buffer_Offset-0x10+0x09]>>4 )<0x4 //Second byte of FF? First 4 bits must be <0x4
- && (Buffer[Buffer_Offset-0x10+0x09]&0xF)<0xA //Second byte of FF? Second 4 bits must be <0xA
- && !(Buffer[Buffer_Offset-0x10+0x00]==0x00 //We want at least a byte not zero, in order to differentiate TimeStamp from padding
- && Buffer[Buffer_Offset-0x10+0x01]==0x00
- && Buffer[Buffer_Offset-0x10+0x0C]==0x00
- && Buffer[Buffer_Offset-0x10+0x0D]==0x00
- && Buffer[Buffer_Offset-0x10+0x0E]==0x00
- && Buffer[Buffer_Offset-0x10+0x0F]==0x00))
- {
- TimeStamp_IsPresent=true;
- Buffer_Offset-=16;
-
- if (Frame_Count_Valid<10000)
- Frame_Count_Valid=10000; //Setting it to 10000 in order to be able to have the drop frame for extreme stream (60 fps...)
- }
- }
-
- //Synched
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Ac3::Synched_Init()
-{
- //FrameInfo
- PTS_End=0;
- if (FrameInfo.DTS==(int64u)-1)
- FrameInfo.DTS=0; //No DTS in container
- if (FrameInfo.PTS==(int64u)-1)
- FrameInfo.PTS=0; //No PTS in container
- DTS_Begin=FrameInfo.DTS;
- DTS_End=FrameInfo.DTS;
- if (Frame_Count_NotParsedIncluded==(int64u)-1)
- Frame_Count_NotParsedIncluded=0; //No Frame_Count_NotParsedIncluded in the container
-}
-
-//---------------------------------------------------------------------------
-bool File_Ac3::Synched_Test()
-{
- //Specific cases
- if (MustParse_dac3 || MustParse_dec3)
- return true;
-
- //Must have enough buffer for having header
- if (Buffer_Offset+(TimeStamp_IsPresent?16:0)+6>Buffer_Size)
- return false;
-
- //TimeStamp
- if (TimeStamp_IsPresent && !TimeStamp_Parsed)
- {
- if (!( Buffer[Buffer_Offset+0x00]==0x01 //Magic value? Always 0x01
- && Buffer[Buffer_Offset+0x01]==0x10 //Size? Always 0x10
- && Buffer[Buffer_Offset+0x02]==0x00 //First byte of HH? Always 0x00
- && (Buffer[Buffer_Offset+0x03]>>4 )<0x6 //Second byte of HH? First 4 bits must be <0x6
- && (Buffer[Buffer_Offset+0x03]&0xF)<0xA //Second byte of HH? Second 4 bits must be <0xA
- && Buffer[Buffer_Offset+0x04]==0x00 //First byte of MM? Always 0x00
- && (Buffer[Buffer_Offset+0x05]>>4 )<0x6 //Second byte of MM? First 4 bits must be <0x6
- && (Buffer[Buffer_Offset+0x05]&0xF)<0xA //Second byte of MM? Second 4 bits must be <0xA
- && Buffer[Buffer_Offset+0x06]==0x00 //First byte of SS? Always 0x00
- && (Buffer[Buffer_Offset+0x07]>>4 )<0x6 //Second byte of SS? First 4 bits must be <0x6
- && (Buffer[Buffer_Offset+0x07]&0xF)<0xA //Second byte of SS? Second 4 bits must be <0xA
- && Buffer[Buffer_Offset+0x08]==0x00 //First byte of FF? Always 0x00
- && (Buffer[Buffer_Offset+0x09]>>4 )<0x4 //Second byte of FF? First 4 bits must be <0x4
- && (Buffer[Buffer_Offset+0x09]&0xF)<0xA)) //Second byte of FF? Second 4 bits must be <0xA
- TimeStamp_IsPresent=false;
- }
- if (TimeStamp_IsPresent && !TimeStamp_Parsed)
- Buffer_Offset+=16;
-
- //Quick test of synchro
- if (!FrameSynchPoint_Test())
- return false; //Need more data
- if (!Synched)
- return true;
-
- //TimeStamp
- if (TimeStamp_IsPresent && !TimeStamp_Parsed)
- {
- Buffer_Offset-=16;
- if (Synched)
- {
- TimeStamp_IsParsing=true;
- TimeStamp_Parsed=false;
- }
- else
- {
- TimeStamp_IsParsing=false;
- TimeStamp_Parsed=false;
- }
- }
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Demux
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-bool File_Ac3::Demux_UnpacketizeContainer_Test()
-{
- if (TimeStamp_IsPresent)
- Buffer_Offset+=16;
-
- if (!HD_IsPresent && Frame_Count==0 && Save_Buffer==NULL)
- {
- //Searching HD part
- size_t Buffer_Offset_Save=Buffer_Offset;
- Buffer_Offset++;
- Synched=false;
- while (Buffer_Offset+8<=Buffer_Size)
- {
- if (!FrameSynchPoint_Test())
- {
- Buffer_Offset=Buffer_Offset_Save;
- return false; //Need more data
- }
- if (Synched)
- break;
- Buffer_Offset++;
- }
- Buffer_Offset=Buffer_Offset_Save;
- if (!Synched)
- {
- Synched=true;
- if (TimeStamp_IsPresent)
- Buffer_Offset-=16;
- return false; //Need more data
- }
- }
-
- if (Save_Buffer)
- {
- Demux_TotalBytes-=Buffer_Offset;
- Demux_Offset-=Buffer_Offset;
- File_Offset+=Buffer_Offset;
- swap(Buffer, Save_Buffer);
- swap(Buffer_Offset, Save_Buffer_Offset);
- swap(Buffer_Size, Save_Buffer_Size);
- }
-
- if (Buffer[Buffer_Offset]==0x0B && Buffer[Buffer_Offset+1]==0x77)
- {
- int8u bsid=Buffer[Buffer_Offset+5]>>3;
- if (bsid<=0x08)
- FrameInfo.DUR=32000000;
- else if (bsid<=0x09)
- FrameInfo.DUR=16000000; // Unofficial hack for low sample rate (e.g. 22.05 kHz)
- else if (bsid>0x0A && bsid<=0x10)
- {
- numblkscod=(Buffer[Buffer_Offset+4]>>4)&0x3;
- int64u numblks=numblkscod==3?6:numblkscod+1;
- FrameInfo.DUR=32000000*numblks/6;
- }
-
- Demux_Offset=Buffer_Offset+Core_Size_Get();
-
- //Core part
- if (HD_IsPresent)
- {
- if (TimeStamp_IsPresent)
- Buffer_Offset-=16;
-
- if (Save_Buffer)
- {
- swap(Buffer, Save_Buffer);
- swap(Buffer_Offset, Save_Buffer_Offset);
- swap(Buffer_Size, Save_Buffer_Size);
- Demux_TotalBytes+=Buffer_Offset;
- Demux_Offset+=Buffer_Offset;
- File_Offset-=Buffer_Offset;
- }
-
- return true; //No AC-3 demux
- }
- }
- else
- {
- Demux_Offset=Buffer_Offset+HD_Size_Get();
- }
-
- if (Demux_Offset>Buffer_Size && File_Offset+Buffer_Size!=File_Size)
- {
- if (TimeStamp_IsPresent)
- Buffer_Offset-=16;
-
- if (Save_Buffer)
- {
- swap(Buffer, Save_Buffer);
- swap(Buffer_Offset, Save_Buffer_Offset);
- swap(Buffer_Size, Save_Buffer_Size);
- Demux_TotalBytes+=Buffer_Offset;
- Demux_Offset+=Buffer_Offset;
- File_Offset-=Buffer_Offset;
- }
-
- return false; //No complete frame
- }
-
- Demux_UnpacketizeContainer_Demux();
-
- if (Save_Buffer)
- {
- swap(Buffer, Save_Buffer);
- swap(Buffer_Offset, Save_Buffer_Offset);
- swap(Buffer_Size, Save_Buffer_Size);
- Demux_TotalBytes+=Buffer_Offset;
- Demux_Offset+=Buffer_Offset;
- File_Offset-=Buffer_Offset;
- }
-
- if (TimeStamp_IsPresent)
- Buffer_Offset-=16;
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ac3::Read_Buffer_Continue()
-{
- if (MustParse_dac3)
- {
- dac3();
- return;
- }
- if (MustParse_dec3)
- {
- dec3();
- return;
- }
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ac3::Header_Parse()
-{
- //TimeStamp
- if (TimeStamp_IsParsing)
- {
- Header_Fill_Size(16);
- Header_Fill_Code(2, "TimeStamp");
- return;
- }
- else
- TimeStamp_Parsed=false; //Currently, only one kind of intermediate element is detected (no TimeStamp and HD part together), and we don't know the precise specification of MLP nor TimeStamp, so we consider next eleemnt is TimeStamp
-
- if (Save_Buffer)
- {
- File_Offset+=Buffer_Offset;
- swap(Buffer, Save_Buffer);
- swap(Buffer_Offset, Save_Buffer_Offset);
- swap(Buffer_Size, Save_Buffer_Size);
- }
-
- //Filling
- if ((Buffer[Buffer_Offset]==0x0B && Buffer[Buffer_Offset+1]==0x77)
- || (Buffer[Buffer_Offset]==0x77 && Buffer[Buffer_Offset+1]==0x0B))
- {
- Header_Fill_Size(Core_Size_Get());
- Header_Fill_Code(0, "syncframe");
-
- //Little Endian management
- if (Save_Buffer)
- {
- swap(Buffer, Save_Buffer);
- swap(Buffer_Offset, Save_Buffer_Offset);
- swap(Buffer_Size, Save_Buffer_Size);
- File_Offset-=Buffer_Offset;
- }
-
- return;
- }
-
- //MLP or TrueHD specific
- int16u Size;
- BS_Begin();
- Skip_S1( 4, "CRC?");
- Get_S2 (12, Size, "Size");
- BS_End();
- Skip_B2( "Timestamp?");
-
- //Little Endian management
- if (Save_Buffer)
- {
- swap(Buffer, Save_Buffer);
- swap(Buffer_Offset, Save_Buffer_Offset);
- swap(Buffer_Size, Save_Buffer_Size);
- }
-
- //Filling
- if (Size<2)
- {
- Synched=false;
- Size=2;
- }
-
- Size*=2;
- Header_Fill_Size(Size);
- Header_Fill_Code(1, "HD");
-}
-
-//---------------------------------------------------------------------------
-void File_Ac3::Data_Parse()
-{
- if (Save_Buffer)
- {
- File_Offset+=Buffer_Offset;
- swap(Buffer, Save_Buffer);
- swap(Buffer_Offset, Save_Buffer_Offset);
- swap(Buffer_Size, Save_Buffer_Size);
- }
-
- //Parsing
- switch (Element_Code)
- {
- case 0 :
- Element_Info1C((FrameInfo.PTS!=(int64u)-1), __T("PTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.PTS)/1000000)));
- Element_Info1(Frame_Count);
- Core();
- break;
- case 1 :
- Element_Info1C((FrameInfo.PTS!=(int64u)-1), __T("PTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.PTS)/1000000)));
- Element_Info1(Frame_Count);
- HD();
- break;
- case 2 : TimeStamp(); break;
- default: ;
- }
-
- //Little Endian management
- if (Save_Buffer)
- {
- delete[] Buffer;
- Buffer=Save_Buffer; Save_Buffer=NULL;
- Buffer_Offset=Save_Buffer_Offset;
- Buffer_Size=Save_Buffer_Size;
- File_Offset-=Buffer_Offset;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Ac3::Core()
-{
- while (Element_Offset<Element_Size)
- {
- if (substreams_Count)
- {
- Element_Name("Block");
- Element_Begin1("syncframe");
- }
- Core_Frame();
- if (substreams_Count)
- Element_End0();
- }
-
- if (acmod_Max[0][0]==(int8u)-1)
- return; //Waiting for the first sync frame
-
- FILLING_BEGIN();
- //Counting
- if (Frame_Count==0)
- {
- Core_IsPresent=true;
- PTS_Begin=FrameInfo.PTS;
- }
- Frame_Count++;
- Frame_Count_InThisBlock++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- if (bsid<=0x08)
- FrameInfo.DUR=32000000;
- else if (bsid<=0x09)
- FrameInfo.DUR=16000000; // Unofficial hack for low sample rate (e.g. 22.05 kHz)
- else if (bsid>0x0A && bsid<=0x10)
- {
- int64u numblks = numblkscod == 3 ? 6 : numblkscod + 1;
- FrameInfo.DUR=32000000*numblks/6;
- }
- if (fscod && AC3_SamplingRate[fscod])
- {
- FrameInfo.DUR*=48000;
- FrameInfo.DUR/=AC3_SamplingRate[fscod];
- }
- if (fscod==3 && AC3_SamplingRate2[fscod2])
- {
- FrameInfo.DUR*=48000;
- FrameInfo.DUR/=AC3_SamplingRate2[fscod2];
- }
- if (FrameInfo.DTS!=(int64u)-1)
- FrameInfo.DTS+=FrameInfo.DUR;
- if (FrameInfo.PTS!=(int64u)-1)
- FrameInfo.PTS=FrameInfo.DTS;
-
- if (File_Offset+Buffer_Offset+Element_Size==File_Size)
- Frame_Count_Valid=Frame_Count; //Finish frames in case of there are less than Frame_Count_Valid frames
-
- //Filling
- if (!Status[IsAccepted])
- Accept("AC-3");
- if (!Status[IsFilled] && Frame_Count>=Frame_Count_Valid)
- {
- Fill("AC-3");
-
- //No more need data
- if (!IsSub && MediaInfoLib::Config.ParseSpeed_Get()<1)
- Finish("AC-3");
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Ac3::Core_Frame()
-{
- //Parsing
- int16u frmsiz=0, chanmap=0;
- int8u dialnorm=(int8u)-1, dialnorm2=(int8u)-1, compr=(int8u)-1, compr2=(int8u)-1, dynrng=(int8u)-1, dynrng2=(int8u)-1;
- int8u strmtyp=0, substreamid=0, acmod=0, bsmod=0, dsurmod=0;
- bool compre=false, compr2e=false, dynrnge=false, dynrng2e=false;
- bool lfeon=false, chanmape=false;
- if (bsid<=0x09)
- {
- Element_Begin1("synchinfo");
- Skip_B2( "syncword");
- Skip_B2( "crc1");
- BS_Begin();
- Get_S1 (2, fscod, "fscod - Sample Rate Code"); Param_Info2(AC3_SamplingRate[fscod], " Hz");
- Get_S1 (6, frmsizecod, "frmsizecod - Frame Size Code"); if (frmsizecod/2<19) {Param_Info2(AC3_BitRate[frmsizecod/2]*1000, " bps");}
- Element_End0();
- Element_Begin1("bsi");
- Get_S1 (5, bsid, "bsid - Bit Stream Identification");
- Get_S1 (3, bsmod, "bsmod - Bit Stream Mode"); Param_Info1(AC3_Mode[bsmod]);
- Get_S1 (3, acmod, "acmod - Audio Coding Mode"); Param_Info1(AC3_ChannelPositions[acmod]);
- if ((acmod&1) && acmod!=1) //central present
- Skip_S1(2, "cmixlev - Center Mix Level");
- if (acmod&4) //back present
- Skip_S1(2, "surmixlev - Surround Mix Level");
- if (acmod==2)
- Get_S1 (2, dsurmod, "dsurmod - Dolby Surround Mode"); Param_Info1(AC3_Surround[dsurmod]);
- Get_SB ( lfeon, "lfeon - Low Frequency Effects");
- Get_S1 (5, dialnorm, "dialnorm - Dialogue Normalization");
- Get_SB ( compre, "compre - Compression Gain Word Exists");
- if (compre)
- Get_S1 (8, compr, "compr - Compression Gain Word");
- TEST_SB_SKIP( "langcode - Language Code Exists");
- Skip_S1(8, "langcod - Language Code");
- TEST_SB_END();
- TEST_SB_SKIP( "audprodie - Audio Production Information Exists");
- Skip_S1(8, "mixlevel - Mixing Level");
- Skip_S1(2, "roomtyp - Room Type");
- TEST_SB_END();
- if (acmod==0) //1+1 mode
- {
- Get_S1 (5, dialnorm2, "dialnorm2 - Dialogue Normalization");
- Get_SB ( compr2e, "compr2e - Compression Gain Word Exists");
- if (compr2e)
- Get_S1 (8, compr2, "compr2 - Compression Gain Word");
- TEST_SB_SKIP( "langcod2e - Language Code Exists");
- Skip_S1(8, "langcod2 - Language Code");
- TEST_SB_END();
- TEST_SB_SKIP( "audprodi2e - Audio Production Information Exists");
- Skip_S1(8, "mixlevel2 - Mixing Level");
- Skip_S1(2, "roomtyp2 - Room Type");
- TEST_SB_END();
- }
- Skip_SB( "copyrightb - Copyright Bit");
- Skip_SB( "origbs - Original Bit Stream");
- TEST_SB_SKIP( "timecod1e");
- Skip_S1(14, "timecod1"); //Note: if timecod is used, change the bitstream parsing for bsid==0x06
- TEST_SB_END();
- TEST_SB_SKIP( "timecod2e");
- Skip_S1(14, "timecod2"); //Note: if timecod is used, change the bitstream parsing for bsid==0x06
- TEST_SB_END();
- TEST_SB_SKIP( "addbsie");
- int8u addbsil;
- Get_S1 (6, addbsil, "addbsil");
- for (int8u Pos=0; Pos<=addbsil; Pos++) //addbsil+1 bytes
- Skip_S1(8, "addbsi");
- TEST_SB_END();
- Element_End0();
- Element_Begin1("audblk");
- for (int8u Pos=0; Pos<AC3_Channels[acmod]; Pos++)
- Skip_SB( "blksw - Block Switch Flag");
- for (int8u Pos=0; Pos<AC3_Channels[acmod]; Pos++)
- Skip_SB( "dithflag - Dither Flag");
- Get_SB ( dynrnge, "dynrnge - Dynamic Range Gain Word Exists");
- if (dynrnge)
- Get_S1 (8, dynrng, "dynrng - Dynamic Range Gain Word");
- if (acmod==0) //1+1 mode
- {
- Get_SB ( dynrng2e, "dynrng2e - Dynamic Range Gain Word Exists");
- if (dynrng2e)
- Get_S1 (8, dynrng2, "dynrng2 - Dynamic Range Gain Word");
- }
- BS_End();
- Element_End0();
- Skip_XX(Element_Size-Element_Offset, "audblk(continue)+5*audblk+auxdata+errorcheck");
- }
- else if (bsid>0x0A && bsid<=0x10)
- {
- Element_Begin1("synchinfo");
- Skip_B2( "syncword");
- Element_End0();
- Element_Begin1("bsi");
- BS_Begin();
- size_t Bits_Begin=Data_BS_Remain();
- Get_S1 ( 2, strmtyp, "strmtyp");
- Get_S1 ( 3, substreamid, "substreamid");
- Get_S2 (11, frmsiz, "frmsiz");
- Get_S1 ( 2, fscod, "fscod"); Param_Info2(AC3_SamplingRate[fscod], " Hz");
- if (fscod==3)
- {
- Get_S1 ( 2, fscod2, "fscod2"); Param_Info2(AC3_SamplingRate2[fscod2], " Hz");
- numblkscod=3;
- }
- else
- Get_S1 ( 2, numblkscod, "numblkscod");
- Get_S1 (3, acmod, "acmod - Audio Coding Mode"); Param_Info1(AC3_ChannelPositions[acmod]);
- Get_SB ( lfeon, "lfeon - Low Frequency Effects");
- Get_S1 (5, bsid, "bsid - Bit Stream Identification");
- Get_S1 (5, dialnorm, "dialnorm");
- TEST_SB_GET(compre, "compre");
- Get_S1 (8, compr, "compr");
- TEST_SB_END();
- if (acmod==0) //1+1 mode
- {
- Get_S1 (5, dialnorm2, "dialnorm2");
- TEST_SB_GET(compr2e, "compr2e");
- Get_S1 (8, compr2, "compr2");
- TEST_SB_END();
- }
- if (strmtyp==1) //dependent stream
- {
- TEST_SB_GET (chanmape, "chanmape");
- Get_S2(16, chanmap, "chanmap"); Param_Info1(AC3_chanmap_ChannelPositions(chanmap));
- TEST_SB_END();
- }
- Element_End0();
- if (Data_BS_Remain()<17)
- {
- BS_End();
- Trusted_IsNot("Not enough data");
- }
- else
- {
- Element_Begin1("errorcheck");
- size_t BitsUpToEndOfFrame=(frmsiz*2)*8-(Bits_Begin-Data_BS_Remain());
- Skip_BS(BitsUpToEndOfFrame-17, "bsi(continue)+audfrm+x*audblk+auxdata+errorcheck");
- Skip_SB( "encinfo");
- BS_End();
- Skip_B2( "crc2");
- Element_End0();
- }
- }
-
- FILLING_BEGIN();
- if (bsid>0x10)
- return; //Not supported
-
- //Information
- if (strmtyp>1)
- strmtyp=0; //TODO: check a file with strmtyp==2
- if (strmtyp==0)
- substreamid_Independant_Current=substreamid;
- if (bsid_Max==(int8u)-1 || bsid>bsid_Max)
- bsid_Max=bsid;
-
- //Specific to first frame
- if (Frame_Count==0)
- {
- frmsizplus1_Max[substreamid_Independant_Current][strmtyp+substreamid]=frmsiz+1;
- acmod_Max[substreamid_Independant_Current][strmtyp+substreamid]=acmod;
- lfeon_Max[substreamid_Independant_Current][strmtyp+substreamid]=lfeon;
- bsmod_Max[substreamid_Independant_Current][strmtyp+substreamid]=bsmod;
- dsurmod_Max[substreamid_Independant_Current][strmtyp+substreamid]=dsurmod;
- chanmape_Max[substreamid_Independant_Current][strmtyp+substreamid]=chanmape;
- chanmap_Max[substreamid_Independant_Current][strmtyp+substreamid]=chanmap;
-
- FirstFrame_Dolby.dialnorm=dialnorm;
- if (compre)
- FirstFrame_Dolby.compr=compr;
- if (dynrnge)
- FirstFrame_Dolby.dynrng=dynrng;
- FirstFrame_Dolby.compre=compre;
- FirstFrame_Dolby.dynrnge=dynrnge;
- if (acmod==0) //1+1 mode
- {
- FirstFrame_Dolby2.dialnorm=dialnorm2;
- if (compr2e)
- FirstFrame_Dolby2.compr=compr2;
- if (dynrng2e)
- FirstFrame_Dolby2.dynrng=dynrng2;
- FirstFrame_Dolby2.compre=compr2e;
- FirstFrame_Dolby2.dynrnge=dynrng2e;
- }
- }
-
- //Stats
- if (dialnorms.empty())
- dialnorms.resize(32);
- dialnorms[dialnorm]++;
- if (compre)
- {
- if (comprs.empty())
- comprs.resize(256);
- comprs[compr]++;
- }
- if (dynrnge)
- {
- //Saving new value
- dynrnge_Exists=true;
- dynrng_Old=dynrng;
- }
- if (!dynrnge)
- dynrng=0;
- if (dynrngs.empty())
- dynrngs.resize(256);
- dynrngs[dynrng]++;
- if (acmod==0) //1+1 mode
- {
- if (dialnorm2s.empty())
- dialnorm2s.resize(32);
- dialnorm2s[dialnorm2]++;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Ac3::HD()
-{
- //Parsing
- int32u Synch;
- Peek_B3(Synch);
- if (Synch==0xF8726F)
- {
- if (Buffer_Offset+28>Buffer_Size)
- {
- Trusted_IsNot("Not enough data");
- return; //Need more data
- }
-
- //Testing
- /* Not working
- int16u CRC_16_Table_HD[256];
- CRC16_Init(CRC_16_Table_HD, 0x002D);
-
- int16u CRC_16=0x0000;
- const int8u* CRC_16_Buffer=Buffer+Buffer_Offset;
- while(CRC_16_Buffer<Buffer+Buffer_Offset+24)
- {
- CRC_16=(CRC_16<<8) ^ CRC_16_Table_HD[(CRC_16>>8)^(*CRC_16_Buffer)];
- CRC_16_Buffer++;
- }
- CRC_16^=LittleEndian2int16u(Buffer+Buffer_Offset+24);
- */
-
- Element_Begin1("MajorSync");
- Skip_B3( "Synch");
- Get_B1 (HD_StreamType, "Stream type"); Param_Info1(AC3_HD_StreamType(HD_StreamType));
-
- if (HD_StreamType==0xBA)
- {
- BS_Begin();
- Get_S1 ( 4, HD_SamplingRate1, "Sampling rate"); Param_Info2(AC3_HD_SamplingRate(HD_SamplingRate1), " Hz");
- Skip_S1( 8, "Unknown");
- Get_S1 ( 5, HD_Channels1, "Channels (1st substream)"); Param_Info1(AC3_TrueHD_Channels(HD_Channels1)); Param_Info1(Ztring().From_Local(AC3_TrueHD_Channels_Positions(HD_Channels1)));
- Skip_S1( 2, "Unknown");
- Get_S2 (13, HD_Channels2, "Channels (2nd substream)"); Param_Info1(AC3_TrueHD_Channels(HD_Channels2)); Param_Info1(Ztring().From_Local(AC3_TrueHD_Channels_Positions(HD_Channels2)));
- BS_End();
- HD_Resolution2=HD_Resolution1=24; //Not sure
- HD_SamplingRate2=HD_SamplingRate1;
- }
- else if (HD_StreamType==0xBB)
- {
- BS_Begin();
- Get_S1 ( 4, HD_Resolution1, "Resolution1"); Param_Info2(AC3_MLP_Resolution[HD_Resolution1], " bits");
- Get_S1 ( 4, HD_Resolution2, "Resolution2"); Param_Info2(AC3_MLP_Resolution[HD_Resolution2], " bits");
- Get_S1 ( 4, HD_SamplingRate1, "Sampling rate"); Param_Info2(AC3_HD_SamplingRate(HD_SamplingRate1), " Hz");
- Get_S1 ( 4, HD_SamplingRate2, "Sampling rate"); Param_Info2(AC3_HD_SamplingRate(HD_SamplingRate2), " Hz");
- Skip_S1(11, "Unknown");
- Get_S1 ( 5, HD_Channels1, "Channels"); Param_Info1(AC3_MLP_Channels[HD_Channels1]);
- BS_End();
- HD_Channels2=HD_Channels1;
- }
- else
- {
- Skip_XX(Element_Size-Element_Offset, "Data");
- return;
- }
-
- Skip_B6( "Unknown");
- BS_Begin();
- Get_SB ( HD_IsVBR, "Is VBR");
- Get_S2 (15, HD_BitRate_Max, "Maximum bitrate"); Param_Info2((HD_BitRate_Max*(AC3_HD_SamplingRate(HD_SamplingRate2)?AC3_HD_SamplingRate(HD_SamplingRate2):AC3_HD_SamplingRate(HD_SamplingRate1))+8)>>4, " bps");
- Get_S1 ( 4, HD_SubStreams_Count, "SubStreams_Count");
- Skip_S1( 4, "Unknown");
- BS_End();
- Skip_B1( "Unknown");
- Skip_B1( "Unknown");
- Skip_B1( "Unknown");
- Skip_B1( "Unknown");
- Skip_B1( "Unknown");
- Skip_B1( "Unknown");
- Skip_B1( "Unknown");
- Skip_B1( "Unknown");
- Skip_B1( "Unknown");
- Skip_B1( "Unknown");
- Skip_B1( "Unknown");
- Element_End0();
-
- FILLING_BEGIN();
- HD_MajorSync_Parsed=true;
-
- if (HD_SubStreams_Count==1 && HD_StreamType==0xBB) //MLP with only 1 stream
- {
- HD_Resolution2=HD_Resolution1;
- HD_SamplingRate2=HD_SamplingRate1;
- }
- FILLING_END();
- }
-
- /*
- if (HD_MajorSync_Parsed)
- {
- Element_Begin1("Sizes");
- std::vector<int16u> Sizes;
- for (int8u Pos=0; Pos<HD_SubStreams_Count; Pos++)
- {
- Element_Begin1("Size");
- int16u Size;
- bool HD_Unknown1_Present, HD_NoRestart, HD_ExtraParity;
- BS_Begin();
- Get_SB ( HD_Unknown1_Present, "Unknown present"); //Only TrueHD
- Get_SB ( HD_NoRestart, "No restart"); //Not present if MajorSync, present if no MajorSync
- Get_SB ( HD_ExtraParity, "Extra parity information");
- Skip_SB( "Unknown");
- Get_S2 (12, Size, "Size");
- BS_End();
- if (HD_Unknown1_Present)
- Skip_B2( "Unknown");
- Sizes.push_back(Size);
- Element_End0();
- }
- Element_End0();
-
- int64u Element_Offset_Begin=Element_Offset;
- for (int8u Pos=0; Pos<HD_SubStreams_Count; Pos++)
- {
- Element_Begin1("Block");
- bool DecodingParameterBlockPresent;
- BS_Begin();
- Get_SB (DecodingParameterBlockPresent, "Decoding parameter block is present");
- if (DecodingParameterBlockPresent)
- {
- TEST_SB_SKIP( "Restart header");
- int16u SyncWord;
- int8u max_matrix_channel;
- Get_S2(13, SyncWord, "SyncWord");
- if (SyncWord==0x18F5)
- {
- Skip_SB( "noise_type"); //Only for TrueHD
- Skip_S2(16, "Output timestamp");
- Skip_S1( 4, "min_channel");
- Skip_S1( 4, "max_channel");
- Get_S1 ( 4, max_matrix_channel, "max_matrix_channel");
- Skip_S1( 4, "noise_shift");
- Skip_S3(23, "noisegen_seed");
- Skip_S3(19, "unknown");
- Skip_SB( "data_check_present");
- Skip_S1( 8, "lossless_check");
- Skip_S2(16, "unknown");
- for (int8u matrix_channel=0; matrix_channel<max_matrix_channel; matrix_channel++)
- Skip_S1(6, "ch_assign");
- Skip_S1( 8, "checksum");
- }
- TEST_SB_END();
- }
- BS_End();
- Skip_XX(Element_Offset_Begin+Sizes[Pos]*2-Element_Offset, "Data");
- Element_End0();
- }
- }
- else
- Skip_XX(Element_Size-Element_Offset, "Waiting for MajorSync...");
- */
- Skip_XX(Element_Size-Element_Offset, "(Data)");
-
- FILLING_BEGIN_PRECISE();
- if (Frame_Count==0)
- PTS_Begin=FrameInfo.PTS;
- Frame_Count++;
- Frame_Count_InThisBlock++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- FrameInfo.DUR=833333;
- int64u HD_SamplingRate=AC3_HD_SamplingRate(HD_SamplingRate1);
- if (HD_SamplingRate && HD_SamplingRate!=48000)
- {
- FrameInfo.DUR*=48000;
- FrameInfo.DUR/=HD_SamplingRate;
- }
- if (FrameInfo.DTS!=(int64u)-1)
- FrameInfo.DTS+=FrameInfo.DUR;
- if (FrameInfo.PTS!=(int64u)-1)
- FrameInfo.PTS=FrameInfo.DTS;
-
- //Filling
- if (!Status[IsAccepted])
- {
- Accept("AC-3");
- if (Frame_Count_Valid<10000)
- Frame_Count_Valid*=32;
- }
- if (!Status[IsFilled] && !Core_IsPresent && Frame_Count>=Frame_Count_Valid)
- {
- Fill("AC-3");
-
- //No more need data
- if (!IsSub && MediaInfoLib::Config.ParseSpeed_Get()<1)
- Finish("AC-3");
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Ac3::TimeStamp()
-{
- //Parsing
- int8u H1, H2, M1, M2, S1, S2, F1, F2;
- Skip_B1( "Magic value");
- Skip_B1( "Size?");
- BS_Begin();
- Skip_S1(8, "H");
- Get_S1 (4, H1, "H");
- Get_S1( 4, H2, "H");
- Skip_S1(8, "M");
- Get_S1 (4, M1, "M");
- Get_S1( 4, M2, "M");
- Skip_S1(8, "S");
- Get_S1 (4, S1, "S");
- Get_S1( 4, S2, "S");
- Skip_S1(8, "F");
- Get_S1 (4, F1, "F");
- Get_S1( 4, F2, "F");
- BS_End();
- Skip_B2( "Unknown");
- Skip_B2( "Unknown");
- Skip_B2( "Unknown (fixed)");
-
- FILLING_BEGIN();
- float64 Temp=H1*10*60*60
- + H2 *60*60
- + M1 *10*60
- + M2 *60
- + S1 *10
- + S2
- + (F1*10+F2)/29.97; //No idea about where is the frame rate
- #ifdef MEDIAINFO_TRACE
- Element_Info1(Ztring::ToZtring(H1)+Ztring::ToZtring(H2)+__T(':')
- + Ztring::ToZtring(M1)+Ztring::ToZtring(M2)+__T(':')
- + Ztring::ToZtring(S1)+Ztring::ToZtring(S2)+__T(':')
- + Ztring::ToZtring(F1)+Ztring::ToZtring(F2));
- #endif //MEDIAINFO_TRACE
- if (Frame_Count==0)
- TimeStamp_Content=Temp;
- TimeStamp_IsParsing=false;
- TimeStamp_Parsed=true;
-
- if (!TimeStamp_DropFrame_IsValid && M2 && !S2 && !S1 && !F1)
- {
- //If drop frame configuration, frames 0 and 1 are dropped for every minutes except 00 10 20 30 40 50
- switch (F2)
- {
- case 0 :
- case 1 :
- TimeStamp_DropFrame_IsValid=true;
- TimeStamp_DropFrame_Content=false;
- break;
- case 2 :
- if (Frame_Count>=2)
- {
- TimeStamp_DropFrame_IsValid=true;
- TimeStamp_DropFrame_Content=true;
- }
- default: ;
- }
-
- if (TimeStamp_DropFrame_IsValid)
- Frame_Count_Valid=32; //Reset
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Ac3::dac3()
-{
- BS_Begin();
- Get_S1 (2, fscod, "fscod");
- Get_S1 (5, bsid, "bsid");
- Get_S1 (3, bsmod_Max[0][0], "bsmod");
- Get_S1 (3, acmod_Max[0][0], "acmod");
- Get_SB ( lfeon_Max[0][0], "lfeon");
- Get_S1 (5, frmsizecod, "bit_rate_code"); frmsizecod*=2;
- Skip_S1(5, "reserved");
- BS_End();
-
- MustParse_dac3=false;
- dxc3_Parsed=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Ac3::dec3()
-{
- //Parsing
- BS_Begin();
- int8u num_ind_sub;
- Skip_S2(13, "data_rate");
- Get_S1 ( 3, num_ind_sub, "num_ind_sub");
- for (int8u Pos=0; Pos<=num_ind_sub; Pos++)
- {
- Element_Begin1("independent substream");
- int8u num_dep_sub;
- Get_S1 (2, fscod, "fscod");
- Get_S1 (5, bsid, "bsid");
- Get_S1 (3, bsmod_Max[Pos][0], "bsmod");
- Get_S1 (3, acmod_Max[Pos][0], "acmod");
- Get_SB ( lfeon_Max[Pos][0], "lfeon");
- Skip_S1(3, "reserved");
- Get_S1 (4, num_dep_sub, "num_dep_sub");
- if (num_dep_sub>0)
- Skip_S2(9, "chan_loc");
- else
- Skip_SB( "reserved");
- Element_End0();
- }
- BS_End();
-
- MustParse_dec3=false;
- dxc3_Parsed=true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Ac3::FrameSynchPoint_Test()
-{
- if (Save_Buffer)
- return true; //Test already made by Synchronize()
-
- if (Buffer[Buffer_Offset ]==0x0B
- && Buffer[Buffer_Offset+1]==0x77) //AC-3
- {
- bsid=CC1(Buffer+Buffer_Offset+5)>>3;
- int16u Size=0;
- if (bsid<=0x09)
- {
- int8u fscod =(CC1(Buffer+Buffer_Offset+4)>>6)&0x03;
- int8u frmsizecod=(CC1(Buffer+Buffer_Offset+4) )&0x3F;
- Size=AC3_FrameSize_Get(frmsizecod, fscod);
- }
- else if (bsid>0x0A && bsid<=0x10)
- {
- int16u frmsiz=CC2(Buffer+Buffer_Offset+2)&0x07FF;
- Size=2+frmsiz*2;
- }
- if (Size>=6)
- {
- if (Buffer_Offset+Size>Buffer_Size)
- return false; //Need more data
- if (CRC_Compute(Size))
- {
- Synched=true;
- return true;
- }
- }
- }
-
- if (Buffer[Buffer_Offset+0]==0x77
- && Buffer[Buffer_Offset+1]==0x0B) //AC-3 LE
- {
- bsid=CC1(Buffer+Buffer_Offset+4)>>3;
- int16u Size=0;
- if (bsid<=0x09)
- {
- int8u fscod =(CC1(Buffer+Buffer_Offset+5)>>6)&0x03;
- int8u frmsizecod=(CC1(Buffer+Buffer_Offset+5) )&0x3F;
- Size=AC3_FrameSize_Get(frmsizecod, fscod);
- }
- else if (bsid>0x0A && bsid<=0x10)
- {
- int16u frmsiz=LittleEndian2int16u(Buffer+Buffer_Offset+2)&0x07FF;
- Size=2+frmsiz*2;
-
- //TODO: case with multiple substreams
- }
- if (Size>=6)
- {
- if (Buffer_Offset+Size>Buffer_Size)
- return false; //Need more data
-
- Save_Buffer=Buffer;
- Save_Buffer_Offset=Buffer_Offset;
- Save_Buffer_Size=Buffer_Size;
-
- //Exception handling
- try
- {
- int8u* Buffer_Little=new int8u[Size];
- for (size_t Pos=0; Pos+1<Size; Pos+=2)
- {
- Buffer_Little[Pos+1]=Save_Buffer[Buffer_Offset+Pos ];
- Buffer_Little[Pos ]=Save_Buffer[Buffer_Offset+Pos+1];
- }
- Buffer=Buffer_Little;
- Buffer_Offset=0;
- Buffer_Size=Size;
-
- Synched=CRC_Compute(Size);
-
- if (Synched)
- {
- BigEndian=false;
-
- swap(Buffer, Save_Buffer);
- swap(Buffer_Offset, Save_Buffer_Offset);
- swap(Buffer_Size, Save_Buffer_Size);
-
- return true;
- }
-
- delete[] Buffer_Little;
- }
- catch(...)
- {
- }
- Buffer=Save_Buffer; Save_Buffer=NULL;
- Buffer_Offset=Save_Buffer_Offset;
- Buffer_Size=Save_Buffer_Size;
- }
- }
-
- if (HD_MajorSync_Parsed
- || (Buffer[Buffer_Offset+4]==0xF8
- && Buffer[Buffer_Offset+5]==0x72
- && Buffer[Buffer_Offset+6]==0x6F
- && (Buffer[Buffer_Offset+7]&0xFE)==0xBA)) //TrueHD or MLP
- {
- HD_IsPresent=true;
- Synched=true;
- return true;
- }
-
- Synched=false;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Ac3::CRC_Compute(size_t Size)
-{
- //Config
- if (!IgnoreCrc_Done)
- {
- IgnoreCrc=Config->File_Ac3_IgnoreCrc_Get();
- IgnoreCrc_Done=true;
- }
- if (IgnoreCrc && !Status[IsAccepted]) //Else there are some wrong synchronizations
- {
- MediaInfo_Internal MI;
- Ztring ParseSpeed_Save=MI.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI.Option(__T("Demux_Get"), __T(""));
- MI.Option(__T("ParseSpeed"), __T("0"));
- MI.Option(__T("Demux"), Ztring());
- size_t MiOpenResult=MI.Open(File_Name);
- MI.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (MiOpenResult)
- {
- Ztring Format=MI.Get(Stream_General, 0, General_Format);
- if (Format!=__T("AC-3") && Format!=__T("E-AC-3"))
- IgnoreCrc=false;
- }
- else
- IgnoreCrc=false; // Problem
- }
- if (IgnoreCrc)
- return true;
-
- int16u CRC_16=0x0000;
- const int8u* CRC_16_Buffer=Buffer+Buffer_Offset+2; //After syncword
- const int8u* CRC_16_Buffer_5_8=Buffer+Buffer_Offset+(((Size>>2)+(Size>>4))<<1); //Magic formula to meet 5/8 frame size from Dolby
- const int8u* CRC_16_Buffer_EndMinus3=Buffer+Buffer_Offset+Size-3; //End of frame minus 3
- const int8u* CRC_16_Buffer_End=Buffer+Buffer_Offset+Size; //End of frame
- while(CRC_16_Buffer<CRC_16_Buffer_End)
- {
- CRC_16=(CRC_16<<8) ^ CRC_16_Table[(CRC_16>>8)^(*CRC_16_Buffer)];
-
- //CRC bytes inversion
- if (CRC_16_Buffer==CRC_16_Buffer_EndMinus3 && bsid<=0x09 && ((*CRC_16_Buffer)&0x01)) //CRC inversion bit
- {
- CRC_16_Buffer++;
- CRC_16=(CRC_16<<8) ^ CRC_16_Table[(CRC_16>>8)^((int8u)(~(*CRC_16_Buffer)))];
- CRC_16_Buffer++;
- CRC_16=(CRC_16<<8) ^ CRC_16_Table[(CRC_16>>8)^((int8u)(~(*CRC_16_Buffer)))];
- }
-
- CRC_16_Buffer++;
-
- //5/8 intermediate test
- if (CRC_16_Buffer==CRC_16_Buffer_5_8 && bsid<=0x09 && CRC_16!=0x0000)
- break;
- }
-
- return (CRC_16==0x0000);
-}
-
-//---------------------------------------------------------------------------
-size_t File_Ac3::Core_Size_Get()
-{
- int16u Size=1;
- bsid=(Buffer[(size_t)(Buffer_Offset+5)]&0xF8)>>3;
- if (bsid<=0x09)
- {
- fscod =(Buffer[(size_t)(Buffer_Offset+4)]&0xC0)>>6;
- frmsizecod= Buffer[(size_t)(Buffer_Offset+4)]&0x3F;
-
- //Filling
- fscods[fscod]++;
- frmsizecods[frmsizecod]++;
- Size=AC3_FrameSize_Get(frmsizecod, fscod);
- }
- else if (bsid>0x0A && bsid<=0x10)
- {
- int16u frmsiz =((int16u)(Buffer[(size_t)(Buffer_Offset+2)]&0x07)<<8)
- | ( Buffer[(size_t)(Buffer_Offset+3)] );
-
- //Filling
- Size=2+frmsiz*2;
-
- substreams_Count=0;
- int8u substreams_Count_Independant=0;
- int8u substreams_Count_Dependant=0;
- for (;;)
- {
- if (Buffer_Offset+Size+6>Buffer_Size)
- {
- if (!IsSub && !Save_Buffer)
- Element_WaitForMoreData();
- break;
- }
-
- int8u bsid=Buffer[Buffer_Offset+Size+5]>>3;
- if (bsid<=0x09 || bsid>0x10)
- break; //Not E-AC-3
-
- int8u substreamid=(Buffer[Buffer_Offset+Size+2]>>3)&0x07;
- if (substreamid!=substreams_Count_Independant)
- break; //Problem
- if (substreamid!=substreams_Count_Dependant)
- break; //Problem
-
- int8u strmtyp = Buffer[Buffer_Offset + Size + 2] >> 6;
- if (substreamid==0 && strmtyp==0)
- break; //Next block
-
- frmsiz =((int16u)(Buffer[(size_t)(Buffer_Offset+Size+2)]&0x07)<<8)
- | ( Buffer[(size_t)(Buffer_Offset+Size+3)] );
-
- //Filling
- Size+=2+frmsiz*2;
-
- if (strmtyp == 0)
- {
- substreams_Count_Independant++;
- substreams_Count_Dependant=0;
- }
- else
- substreams_Count_Dependant++;
- substreams_Count++;
- }
- }
-
- return Size;
-}
-
-//---------------------------------------------------------------------------
-size_t File_Ac3::HD_Size_Get()
-{
- size_t Size=BigEndian2int16u(Buffer+Buffer_Offset)&0x0FFF;
- Size*=2;
-
- return Size;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_AC3_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ac3.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ac3.h
deleted file mode 100644
index 4a5f28018..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ac3.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Ac3H
-#define MediaInfo_Ac3H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Ac3
-//***************************************************************************
-
-class File_Ac3 : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
- bool MustParse_dac3;
- bool MustParse_dec3;
- bool CalculateDelay;
-
- //Constructor/Destructor
- File_Ac3();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Synchro
- bool Synchronize();
- void Synched_Init();
- bool Synched_Test();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test();
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Global
- void Read_Buffer_Continue ();
- void Read_Buffer_Unsynched();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Core();
- void Core_Frame();
- void HD();
- void TimeStamp();
- void dac3();
- void dec3();
- bool FrameSynchPoint_Test();
- bool CRC_Compute(size_t Size);
- size_t Core_Size_Get();
- size_t HD_Size_Get();
-
- //Buffer
- const int8u* Save_Buffer;
- size_t Save_Buffer_Offset;
- size_t Save_Buffer_Size;
-
- //Temp
- struct dolby
- {
- int8u dialnorm;
- int8u compr;
- int8u dynrng; //This is only the first occurence of aufblk
- bool compre;
- bool dynrnge; //This is only the first occurence of aufblk
-
- dolby()
- :
- dialnorm(0),
- compr(0),
- dynrng(0),
- compre(false),
- dynrnge(false)
- {
- }
- };
- dolby FirstFrame_Dolby;
- dolby FirstFrame_Dolby2;
- std::vector<int64u> dialnorms;
- std::vector<int64u> dialnorm2s;
- std::vector<int64u> comprs;
- std::vector<int64u> compr2s;
- std::vector<int64u> dynrngs;
- std::vector<int64u> dynrng2s;
- std::map<int8u, int64u> fscods;
- std::map<int8u, int64u> frmsizecods;
- int64u Frame_Count_HD;
- int16u chanmap_Max[8][9];
- int16u frmsizplus1_Max[8][9];
- int16u HD_BitRate_Max;
- int16u HD_Channels2;
- int8u fscod;
- int8u fscod2;
- int8u frmsizecod;
- int8u bsid;
- int8u bsid_Max;
- int8u bsmod_Max[8][9];
- int8u acmod_Max[8][9];
- int8u dsurmod_Max[8][9];
- int8u numblkscod;
- int8u HD_StreamType;
- int8u HD_SubStreams_Count;
- int8u HD_SamplingRate1;
- int8u HD_SamplingRate2;
- int8u HD_Channels1;
- int8u HD_Resolution1;
- int8u HD_Resolution2;
- int8u dynrng_Old;
- int8u substreamid_Independant_Current;
- int8u substreams_Count;
- bool lfeon_Max[8][9];
- bool dxc3_Parsed;
- bool HD_MajorSync_Parsed;
- bool HD_NoRestart;
- bool HD_ExtraParity;
- bool HD_IsVBR;
- bool Core_IsPresent;
- bool HD_IsPresent;
- bool dynrnge_Exists;
- bool chanmape_Max[8][9];
- bool TimeStamp_IsPresent;
- bool TimeStamp_IsParsing;
- bool TimeStamp_Parsed;
- bool TimeStamp_DropFrame_IsValid;
- bool TimeStamp_DropFrame_Content;
- bool BigEndian;
- bool IgnoreCrc_Done;
- bool IgnoreCrc;
- float64 TimeStamp_Content;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Adpcm.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Adpcm.cpp
deleted file mode 100644
index 2e8611c0a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Adpcm.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_ADPCM_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Adpcm.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Adpcm::Read_Buffer_Continue()
-{
- //It is impossible to detect... Default is no detection, only filling
-
- //Filling
- Accept("ADPCM");
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_General, 0, Audio_Format, "ADPCM");
- Fill(Stream_General, 0, Audio_Codec, "ADPCM");
- Ztring Profile, Firm;
- if (Codec==__T("alaw")) {Profile=__T("A-Law");}
- else if (Codec==__T("ulaw")) {Profile=__T("U-Law");}
- else if (Codec==__T("ima4")) { Firm=__T("IMA");}
- else if (Codec==__T("6")) {Profile=__T("A-Law");}
- else if (Codec==__T("7")) {Profile=__T("U-Law");}
- else if (Codec==__T("102")) {Profile=__T("A-Law");}
- else if (Codec==__T("171")) {Profile=__T("U-Law"); Firm=__T("Unisys");}
- else if (Codec==__T("172")) {Profile=__T("A-Law"); Firm=__T("Unisys");}
-
- if (!Profile.empty())
- Fill(Stream_Audio, 0, Audio_Format_Profile, Profile);
- if (!Firm.empty())
- {
- Fill(Stream_Audio, 0, Audio_Format_Settings, Firm);
- Fill(Stream_Audio, 0, Audio_Format_Settings_Firm, Firm);
- Fill(Stream_Audio, 0, Audio_Codec_Settings, Firm);
- Fill(Stream_Audio, 0, Audio_Codec_Settings_Firm, Firm);
- }
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
-
- //No more need data
- Finish("ADPCM");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_ADPCM_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Adpcm.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Adpcm.h
deleted file mode 100644
index c111bcb34..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Adpcm.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about ADPCM files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_AdpcmH
-#define MediaInfo_File_AdpcmH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Adpcm
-//***************************************************************************
-
-class File_Adpcm : public File__Analyze
-{
-public :
- //In
- ZenLib::Ztring Codec;
-
-protected :
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Als.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Als.cpp
deleted file mode 100644
index 6a7809a27..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Als.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about MPEG-4 ALS files
-// http://www.nue.tu-berlin.de/forschung/projekte/lossless/mp4als.html
-// http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio_Lossless_Coding_%28ALS%29
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_ALS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Als.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Als::File_Als()
-:File__Analyze(), File__Tags_Helper()
-{
- //File__Tags_Helper
- Base=this;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Als::Streams_Finish()
-{
- //Filling
- int64u CompressedSize=File_Size-TagsSize;
- float32 CompressionRatio=((float32)UncompressedSize)/CompressedSize;
-
- Fill(Stream_Audio, 0, Audio_StreamSize, CompressedSize);
- Fill(Stream_Audio, 0, Audio_Compression_Ratio, CompressionRatio);
-
- File__Tags_Helper::Streams_Finish();
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Als::FileHeader_Begin()
-{
- if (!File__Tags_Helper::FileHeader_Begin())
- return false;
-
- //Synchro
- if (Buffer_Size<4)
- return false;
- if (Buffer[0]!=0x41 //"ALS\0"
- || Buffer[1]!=0x4C
- || Buffer[2]!=0x53
- || Buffer[3]!=0x00)
- {
- File__Tags_Helper::Reject("ALS");
- return false;
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Als::FileHeader_Parse()
-{
- //Parsing
- int32u SampleRate, Samples;
- int16u Channels;
- int8u BitsPerSample, FileType;
- Skip_C4( "signature");
- Get_B4 (SampleRate, "sample rate");
- Get_B4 (Samples, "samples");
- Get_B2 (Channels, "channels-1"); Param_Info2(Channels+1, " channel(s)");
- BS_Begin();
- Get_S1 (3, FileType, "file type"); // WAV, RIFF, AIFF
- Get_S1 (3, BitsPerSample, "bits per sample"); Param_Info2((BitsPerSample+1)*8, " bits");
- Skip_SB( "floating point");
- Skip_SB( "samples are big-endian");
- BS_End();
-
- FILLING_BEGIN();
- if (SampleRate==0)
- return;
- Duration=((int64u)Samples)*1000/SampleRate;
- if (Duration==0)
- return;
- UncompressedSize=((int64u)Samples)*Channels*(BitsPerSample+1/8);
- if (UncompressedSize==0)
- return;
-
- File__Tags_Helper::Accept("ALS");
-
- File__Tags_Helper::Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "ALS");
- Fill(Stream_Audio, 0, Audio_Codec, "ALS");
- Fill(Stream_Audio, 0, Audio_BitDepth, (BitsPerSample+1)*8);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Channels+1);
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, SampleRate);
- Fill(Stream_Audio, 0, Audio_Duration, Duration);
-
- //No more need data
- File__Tags_Helper::Finish("ALS");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_ALS_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Als.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Als.h
deleted file mode 100644
index a0d8440fb..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Als.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_AlsH
-#define MediaInfo_File_AlsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Als
-//***************************************************************************
-
-class File_Als : public File__Analyze, public File__Tags_Helper
-{
-public :
- //Constructor/Destructor
- File_Als();
-
-private :
- //Streams management
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Global
- void Read_Buffer_Continue() {File__Tags_Helper::Read_Buffer_Continue();}
-
- //Temp
- int64u Duration;
- int64u UncompressedSize;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amr.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amr.cpp
deleted file mode 100644
index c1e8ad552..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amr.cpp
+++ /dev/null
@@ -1,262 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AMR_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Amr.h"
-#include "ZenLib/Utils.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-int16u Amr_BitRate[]=
-{
- 5200,
- 5600,
- 6400,
- 7200,
- 8000,
- 8400,
- 10800,
- 12800,
- 3600,
- 3600,
- 3600,
- 3600,
- 0,
- 0,
- 0,
- 400,
-};
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Amr::File_Amr()
-:File__Analyze()
-{
- //Temp
- Header_Size=(int64u)-1;
- Frame_Number=0;
- FrameType=(int8u)-1;
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Amr::FileHeader_Begin()
-{
- if (!Codec.empty()) //Test of header only if it is a file --> The codec field is empty
- return true;
-
- //Testing
- if (Buffer_Size<5)
- return false; //Must wait for more data
- if (CC5(Buffer)!=0x2321414D52LL) //"#!AMR"
- {
- Reject("AMR");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Amr::Streams_Fill()
-{
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "AMR");
- Fill(Stream_Audio, 0, Audio_Codec, "AMR");
- if (!Codec.empty())
- {
- if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Codec, InfoCodecID_Profile)==__T("Narrow band"))
- IsWB=false;
- if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Codec, InfoCodecID_Profile)==__T("Wide band"))
- IsWB=true;
- Channels=1;
- }
- if (Channels==0)
- return; //No more info
-
- if (Header_Size!=(int64u)-1)
- Fill(Stream_General, 0, General_StreamSize, Header_Size);
- Fill(Stream_Audio, 0, Audio_Channel_s_, Channels);
- if (IsWB)
- {
- Fill(Stream_Audio, 0, Audio_Format_Profile, "Wide band");
- Fill(Stream_Audio, 0, Audio_Codec, "sawb", Unlimited, true, true);
- if (Codec.empty()) //If there is a container, trusting the container sampling rate
- Fill(Stream_Audio, 0, Audio_SamplingRate, 16000);
- Fill(Stream_Audio, 0, Audio_BitDepth, 14);
- //Fill(Stream_Audio, 0, Audio_InternetMediaType, "audio/AMR-WB", Unlimited, true, true);
- }
- else
- {
- Fill(Stream_Audio, 0, Audio_Format_Profile, "Narrow band");
- Fill(Stream_Audio, 0, Audio_Codec, "samr", Unlimited, true, true);
- if (Codec.empty()) //If there is a container, trusting the container sampling rate
- Fill(Stream_Audio, 0, Audio_SamplingRate, 8000);
- Fill(Stream_Audio, 0, Audio_BitDepth, 13);
- if (FrameType!=(int8u)-1 && Amr_BitRate[FrameType] && FrameTypes.size()==1)
- {
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
- Fill(Stream_Audio, 0, Audio_BitRate, Amr_BitRate[FrameType]);
- Fill(Stream_General, 0, General_OverallBitRate, Amr_BitRate[FrameType]);
- if (File_Size!=(int64u)-1)
- {
- Fill(Stream_Audio, 0, Audio_Duration, ((float32)(File_Size-Header_Size))*8*1000/Amr_BitRate[FrameType]);
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Amr::Streams_Finish()
-{
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Amr::FileHeader_Parse()
-{
- //From a container
- if (!Codec.empty())
- {
- Accept("AMR");
- Finish("AMR");
- return;
- }
-
- //Parsing
- int64u Signature;
- Skip_C5( "Signature (Common)");
- Peek_B8(Signature);
- if ((Signature&0xFF00000000000000LL)==0x0A00000000000000LL) //\n
- {
- IsWB=false;
- Channels=1;
- }
- else if ((Signature&0xFFFFFFFFFFFFFF00LL)==0x5F4D43312E300A00LL) //_MC1.0\n
- {
- IsWB=false;
- Channels=2; //Or more, see later
- }
- else if ((Signature&0xFFFFFF0000000000LL)==0x2D57420000000000LL) //-WB
- {
- Skip_C3( "Signature (WB)");
- IsWB=true;
-
- Peek_B8(Signature);
- if ((Signature&0xFF00000000000000LL)==0x0A00000000000000LL) //\n
- {
- Channels=1;
- }
- else if ((Signature&0xFFFFFFFFFFFFFF00LL)==0x5F4D43312E300A00LL) //_MC1.0\n
- {
- Channels=2; //Or more, see later
- }
- }
- else
- Channels=0;
- Skip_B1( "Signature (Carriage return)");
- /*
- if (Channels==2) //Mutli-channels
- {
- BS_Begin();
- Skip_S4(28, "Reserved");
- Get_S1 ( 4, Channels, "Channels");
- }
- */
- Header_Size=(int8u)Element_Offset;
-
-
- FILLING_BEGIN();
- Accept("AMR");
-
- if (Channels!=1 || IsWB)
- Finish("AMR");
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Amr::Header_Parse()
-{
- BS_Begin();
- Skip_SB( "Frame Following");
- Get_S1 ( 4, FrameType, "Frame Type");
- Skip_SB( "Frame Quality");
- Skip_SB( "Unknown");
- Skip_SB( "Unknown");
- BS_End();
-
- //Filling
- if (Amr_BitRate[FrameType]==0)
- {
- Finish("AMR");
- return;
- }
- Header_Fill_Size(Amr_BitRate[FrameType]/400);
- Header_Fill_Code(0, "frame");
-}
-
-//---------------------------------------------------------------------------
-void File_Amr::Data_Parse()
-{
- Element_Info1(Frame_Number);
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-
-
- FILLING_BEGIN();
- Frame_Number++;
- FrameTypes[FrameType]++;
- if (Frame_Number>=32)
- Finish("AMR");
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_AMR_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amr.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amr.h
deleted file mode 100644
index c29f270d7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amr.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Musepack files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_AmrH
-#define MediaInfo_File_AmrH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <map>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Amr
-//***************************************************************************
-
-class File_Amr : public File__Analyze
-{
-public :
- //In
- ZenLib::Ztring Codec;
-
-public :
- File_Amr();
-
-protected :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse ();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Temp
- size_t Frame_Number;
- std::map<int8u, size_t> FrameTypes;
- int64u Header_Size;
- int8u FrameType;
- int8u Channels;
- bool IsWB;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amv.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amv.cpp
deleted file mode 100644
index 30d7a41db..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amv.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AMV_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Amv.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Amv::Read_Buffer_Continue()
-{
- Reject("AMV");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_AMV_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amv.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amv.h
deleted file mode 100644
index 667bc35b3..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Amv.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about asian AMV files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_AmvH
-#define MediaInfo_File_AmvH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Amv
-//***************************************************************************
-
-class File_Amv : public File__Analyze
-{
-protected :
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ape.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ape.cpp
deleted file mode 100644
index 422bb636f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ape.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_APE_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Ape.h"
-using namespace std;
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-int32u Ape_SamplesPerFrame(int16u Version, int16u CompressionLevel)
-{
- if (Version>=3950)
- return 73728*4;
- else if (Version>=3900)
- return 73728;
- else if (Version>=3800 && CompressionLevel==4000)
- return 73728;
- else
- return 9216;
-}
-
-//---------------------------------------------------------------------------
-const char* Ape_Codec_Settings(int16u Setting)
-{
- switch (Setting)
- {
- case 1000 : return "Fast";
- case 2000 : return "Normal";
- case 3000 : return "High";
- case 4000 : return "Extra-high";
- case 5000 : return "Insane";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Ape::File_Ape()
-:File__Analyze(), File__Tags_Helper()
-{
- //File__Tags_Helper
- Base=this;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ape::Streams_Finish()
-{
- //Filling
- int64u CompressedSize=File_Size-TagsSize;
- float32 CompressionRatio=((float32)UncompressedSize)/CompressedSize;
- int64u BitRate=Duration?(CompressedSize*8*1000/Duration):0;
-
- Fill(Stream_Audio, 0, Audio_Compression_Ratio, CompressionRatio);
- Fill(Stream_Audio, 0, Audio_BitRate, BitRate);
-
- File__Tags_Helper::Streams_Finish();
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Ape::FileHeader_Begin()
-{
- if (!File__Tags_Helper::FileHeader_Begin())
- return false;
-
- //Testing
- if (Buffer_Size<Buffer_Offset+4)
- return false;
- if (Buffer[Buffer_Offset ]!=0x4D //"MAC "
- || Buffer[Buffer_Offset+1]!=0x41
- || Buffer[Buffer_Offset+2]!=0x43
- || Buffer[Buffer_Offset+3]!=0x20)
- {
- File__Tags_Helper::Reject("APE");
- return false;
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Ape::FileHeader_Parse()
-{
- //Parsing
- int32u SampleRate=0, TotalFrames=0, FinalFrameSamples=0, SamplesPerFrame=0, SeekElements;
- int16u Version, CompressionLevel=0, Flags=0, Channels=0, Resolution=0;
- Skip_C4( "Identifier");
- Get_L2 (Version, "Version");
- if (Version<3980) //<3.98
- {
- bool Resolution8=false, Resolution24=false, no_wav_header;
- Get_L2 (CompressionLevel, "CompressionLevel"); Param_Info1(Ape_Codec_Settings(CompressionLevel));
- Get_L2 (Flags, "FormatFlags");
- Get_Flags (Flags, 0, Resolution8, "8-bit");
- Skip_Flags(Flags, 1, "crc-32");
- Skip_Flags(Flags, 2, "peak_level");
- Get_Flags (Flags, 3, Resolution24, "24-bit");
- Skip_Flags(Flags, 4, "seek_elements");
- Get_Flags (Flags, 5, no_wav_header, "no_wav_header");
- if (Resolution8)
- Resolution=8;
- else if (Resolution24)
- Resolution=24;
- else
- Resolution=16;
- Get_L2 (Channels, "Channels");
- Get_L4 (SampleRate, "SampleRate");
- Skip_L4( "WavHeaderDataBytes");
- Skip_L4( "WavTerminatingBytes");
- Get_L4 (TotalFrames, "TotalFrames");
- Get_L4 (FinalFrameSamples, "FinalFrameSamples");
- SamplesPerFrame=Ape_SamplesPerFrame(Version, CompressionLevel);
- Skip_L4( "PeakLevel");
- Get_L4 (SeekElements, "SeekElements");
- if (!no_wav_header)
- Skip_XX(44, "RIFF header");
- Skip_XX(SeekElements*4, "Seek table");
- }
- else
- {
- Skip_L2( "Version_High");
- Skip_L4( "DescriptorBytes");
- Skip_L4( "HeaderBytes");
- Skip_L4( "SeekTableBytes");
- Skip_L4( "WavHeaderDataBytes");
- Skip_L4( "APEFrameDataBytes");
- Skip_L4( "APEFrameDataBytesHigh");
- Skip_L4( "WavTerminatingDataBytes");
- Skip_L16( "FileMD5");
- Get_L2 (CompressionLevel, "CompressionLevel"); Param_Info1(Ape_Codec_Settings(CompressionLevel));
- Get_L2 (Flags, "FormatFlags");
- Get_L4 (SamplesPerFrame, "BlocksPerFrame");
- Get_L4 (FinalFrameSamples, "FinalFrameBlocks");
- Get_L4 (TotalFrames, "TotalFrames");
- Get_L2 (Resolution, "BitsPerSample");
- Get_L2 (Channels, "Channels");
- Get_L4 (SampleRate, "SampleRate");
- }
-
- FILLING_BEGIN();
- //Coherancy
- int32u Samples=(TotalFrames-1)*SamplesPerFrame+FinalFrameSamples;
- if (Samples==0 || SampleRate==0 || Channels==0 || Resolution==0)
- {
- File__Tags_Helper::Reject("APE");
- return;
- }
-
- //Filling
- File__Tags_Helper::Accept("APE");
- File__Tags_Helper::Streams_Fill();
-
- Duration=((int64u)Samples)*1000/SampleRate;
- UncompressedSize=Samples*Channels*(Resolution/8);
-
- File__Tags_Helper::Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "Monkey's Audio");
- Fill(Stream_Audio, 0, Audio_Encoded_Library_Settings, Ape_Codec_Settings(CompressionLevel));
- Fill(Stream_Audio, 0, Audio_Codec, "APE");
- Fill(Stream_Audio, 0, Audio_BitDepth, Resolution);
- Fill(Stream_Audio, 0, Audio_Channel_s_, Channels);
- Fill(Stream_Audio, 0, Audio_SamplingRate, SampleRate);
- Fill(Stream_Audio, 0, Audio_Duration, Duration);
-
- //No more need data
- File__Tags_Helper::Finish("APE");
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_APE_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ape.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ape.h
deleted file mode 100644
index 4cfa61aa4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ape.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Ape files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_ApeH
-#define MediaInfo_File_ApeH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Ape
-//***************************************************************************
-
-class File_Ape : public File__Analyze, public File__Tags_Helper
-{
-public :
- //Constructor/Destructor
- File_Ape();
-
-private :
- //Streams management
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Global
- void Read_Buffer_Continue() {File__Tags_Helper::Read_Buffer_Continue();}
-
- //Temp
- int64u Duration;
- int64u UncompressedSize;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Au.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Au.cpp
deleted file mode 100644
index 60e8db8f0..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Au.cpp
+++ /dev/null
@@ -1,176 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Source: http://wiki.multimedia.cx/index.php?title=Au/snd
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AU_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Au.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Au_Format(int32u sample_format)
-{
- switch (sample_format)
- {
- case 1 : return "ADPCM";
- case 2 : return "PCM";
- case 3 : return "PCM";
- case 4 : return "PCM";
- case 5 : return "PCM";
- case 6 : return "PCM";
- case 7 : return "PCM";
- case 8 : return "fragmented sampled data";
- case 10 : return "DSP program";
- case 11 : return "PCM";
- case 12 : return "PCM";
- case 13 : return "PCM";
- case 14 : return "PCM";
- case 17 : return "ADPCM";
- case 18 : return "PCM";
- case 19 : return "PCM";
- case 20 : return "PCM";
- case 21 : return "Music Kit DSP commands";
- case 22 : return "Music Kit DSP samples";
- case 23 : return "ADPCM";
- case 24 : return "ADPCM";
- case 25 : return "ADPCM";
- case 26 : return "ADPCM";
- case 27 : return "ADPCM";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Au_sample_format(int32u sample_format)
-{
- switch (sample_format)
- {
- case 1 : return "8-bit mu-law";
- case 2 : return "8-bit signed linear";
- case 3 : return "16-bit signed linear";
- case 4 : return "24-bit signed linear";
- case 5 : return "32-bit signed linear";
- case 6 : return "floating-point";
- case 7 : return "double precision float";
- case 8 : return "fragmented sampled data";
- case 10 : return "DSP program";
- case 11 : return "8-bit fixed-point";
- case 12 : return "16-bit fixed-point";
- case 13 : return "24-bit fixed-point";
- case 14 : return "32-bit fixed-point";
- case 17 : return "mu-law squelch";
- case 18 : return "16-bit linear with emphasis";
- case 19 : return "16-bit linear with compression";
- case 20 : return "16-bit linear with emphasis and compression";
- case 21 : return "Music Kit DSP commands";
- case 22 : return "Music Kit DSP samples";
- case 23 : return "G.721 ADPCM";
- case 24 : return "G.722 ADPCM";
- case 25 : return "G.723 ADPCM";
- case 26 : return "5-bit G.723 ADPCM";
- case 27 : return "8-bit a-law";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Au::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- if (CC4(Buffer)!=0x2E736E64) //".snd"
- {
- Reject("AU");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Au::FileHeader_Parse()
-{
- //Parsing
- Ztring arbitrary;
- int32u data_start, data_size, sample_format, sample_rate, channels;
- Skip_B4( "Magic");
- Get_B4 (data_start, "data_start");
- Get_B4 (data_size, "data_size");
- Get_B4 (sample_format, "sample_format");
- Get_B4 (sample_rate, "sample_rate");
- Get_B4 (channels, "channels");
- if (data_start>24)
- Get_Local(data_start-24, arbitrary, "arbitrary data");
-
- FILLING_BEGIN();
- Accept("AU");
-
- Fill(Stream_General, 0, General_Format, "AU");
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, Au_Format(sample_format));
- Fill(Stream_Audio, 0, Audio_CodecID, Au_sample_format(sample_format));
- Fill(Stream_Audio, 0, Audio_Codec, Au_sample_format(sample_format));
- Fill(Stream_Audio, 0, Audio_Channel_s_, channels);
- Fill(Stream_Audio, 0, Audio_SamplingRate, sample_rate);
- if (File_Size!=(int64u)-1)
- data_size=(int32u)File_Size-data_start; //Priority for File size
- if (sample_rate && data_size!=0 && data_size!=0xFFFFFFFF)
- Fill(Stream_Audio, 0, Audio_Duration, ((int64u)data_size)*1000/sample_rate);
- Fill(Stream_Audio, 0, Audio_StreamSize, File_Size-Element_Offset);
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
- Fill(Stream_General, 0, General_Comment, arbitrary);
-
- //No more need data
- Finish("AU");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_AU_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Au.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Au.h
deleted file mode 100644
index 7488039c8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Au.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about AU files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_AuH
-#define MediaInfo_File_AuH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Au
-//***************************************************************************
-
-class File_Au : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Caf.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Caf.cpp
deleted file mode 100644
index ae1dac706..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Caf.cpp
+++ /dev/null
@@ -1,288 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_CAF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Caf.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-namespace Elements
-{
- const int64u data=0x64617461;
- const int64u desc=0x64657363;
- const int64u free=0x66726565;
- const int64u info=0x696E666F;
- const int64u kuki=0x6B756B69;
- const int64u pakt=0x70616B74;
- const int64u uuid=0x75756964;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Caf::File_Caf()
-:File__Analyze()
-{
- DataMustAlwaysBeComplete=false;
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Caf::FileHeader_Begin()
-{
- //Synchro
- if (3>Buffer_Size)
- return false;
- if (Buffer[0]!=0x63 //"caff"
- || Buffer[1]!=0x61
- || Buffer[2]!=0x66
- || Buffer[3]!=0x66)
- {
- Reject();
- return false;
- }
- if (8>Buffer_Size)
- return false;
-
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Caf::FileHeader_Parse()
-{
- //Parsing
- int16u FileVersion;
- Skip_C4( "FileType");
- Get_B2 (FileVersion, "FileVersion");
- Skip_B2( "FileFlags");
-
- FILLING_BEGIN();
- Accept();
- Fill(Stream_General, 0, General_Format, "CAF");
- Fill(Stream_General, 0, General_Format_Version, __T("Version ")+Ztring::ToZtring(FileVersion));
- Stream_Prepare(Stream_Audio);
-
- if (FileVersion!=1)
- Finish(); //Version 0 or 2+ are not supported
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Caf::Header_Parse()
-{
- //Parsing
- int64u ChunkSize;
- int32u ChunkType;
- Get_B4 (ChunkType, "ChunkType");
- Get_B8(ChunkSize, "ChunkSize");
-
- //Filling
- Header_Fill_Code2(ChunkType, Ztring().From_CC4(ChunkType));
- Header_Fill_Size(12+ChunkSize);
-}
-
-//---------------------------------------------------------------------------
-void File_Caf::Data_Parse()
-{
- if (Element_Code!=Elements::data && !Element_IsComplete_Get())
- {
- Element_WaitForMoreData();
- return;
- }
-
- #define ELEMENT_CASE(_NAME, _DETAIL) \
- case Elements::_NAME : Element_Name(_DETAIL); _NAME(); break;
-
- //Parsing
- switch (Element_Code)
- {
- ELEMENT_CASE(data, "Audio Data");
- ELEMENT_CASE(desc, "Audio Description");
- ELEMENT_CASE(free, "Free");
- ELEMENT_CASE(info, "Information");
- ELEMENT_CASE(kuki, "Magic Cookie");
- ELEMENT_CASE(pakt, "Packet Table");
- ELEMENT_CASE(uuid, "User-Defined Chunk");
- default :
- Skip_XX(Element_Size, "Data");
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Caf::data()
-{
- //Parsing
- Skip_XX(Element_Size, "Data");
-
- Fill(Stream_Audio, 0, Retrieve(Stream_Audio, 0, Audio_Source_Duration).empty()?Audio_StreamSize:Audio_Source_StreamSize, Element_Size);
-
- //TODO: put this code in the common section Streams_Finish_StreamOnly()
- int64u BitRate=Retrieve(Stream_Audio, 0, "BitRate").To_int64u();
- if (BitRate && Element_Size && Retrieve(Stream_Audio, 0, Audio_Source_Duration).empty() && Retrieve(Stream_Audio, 0, Audio_Duration).empty())
- Fill(Stream_Audio, 0, Audio_Duration, Element_Size*8*1000/BitRate);
-}
-
-//---------------------------------------------------------------------------
-void File_Caf::desc()
-{
- //Parsing
- float64 SampleRate;
- int32u FormatID, FormatFlags, BytesPerPacket, FramesPerPacket, ChannelsPerFrame, BitsPerChannel;
- Get_BF8(SampleRate, "SampleRate");
- Get_C4 (FormatID, "FormatID");
- Get_B4 (FormatFlags, "FormatFlags");
- Get_B4 (BytesPerPacket, "BytesPerPacket");
- Get_B4 (FramesPerPacket, "FramesPerPacket");
- Get_B4 (ChannelsPerFrame, "ChannelsPerFrame");
- Get_B4 (BitsPerChannel, "BitsPerChannel");
-
- FILLING_BEGIN();
- if (SampleRate)
- Fill(Stream_Audio, 0, Audio_SamplingRate, SampleRate);
- CodecID_Fill(Ztring().From_CC4(FormatID), Stream_Audio, 0, InfoCodecID_Format_Mpeg4);
- if (ChannelsPerFrame)
- Fill(Stream_Audio, 0, Audio_Channel_s_, ChannelsPerFrame);
- if (BitsPerChannel)
- Fill(Stream_Audio, 0, Audio_BitDepth, BitsPerChannel);
- if (BytesPerPacket && SampleRate && FramesPerPacket)
- Fill(Stream_Audio, 0, Audio_BitRate, SampleRate*BytesPerPacket*8/FramesPerPacket);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Caf::free()
-{
- //Parsing
- Skip_XX(Element_Size, "Junk");
-}
-
-//---------------------------------------------------------------------------
-void File_Caf::info()
-{
- if (Element_Size<4)
- return;
-
- //Parsing
- int32u NumEntries;
- Get_B4 (NumEntries, "NumEntries");
- ZtringList List;
- std::map<Ztring, Ztring> ListList;
- const int8u* Buffer_Max = Buffer+(size_t)(Buffer_Offset+Element_Size);
- while (Element_Offset<Element_Size)
- {
- const int8u* Buffer_Begin = Buffer+(size_t)(Buffer_Offset+Element_Offset);
- const int8u* Buffer_Middle = Buffer_Begin;
- while (Buffer_Middle<Buffer_Max && *Buffer_Middle)
- ++Buffer_Middle;
- const int8u* Buffer_End = Buffer_Middle + 1;
- while (Buffer_End<Buffer_Max && *Buffer_End)
- ++Buffer_End;
-
- Ztring Key, Value;
- Get_UTF8(Buffer_Middle-Buffer_Begin, Key, "Key");
- Skip_B1 ( "Zero");
- Get_UTF8(Buffer_End-(Buffer_Middle+1), Value, "Value");
- if (Buffer_End!=Buffer_Max)
- Skip_B1 ( "Zero");
-
- ListList[Key]=Value;
- }
-
- if (ListList.size()!=NumEntries)
- return;
-
- for (std::map<Ztring, Ztring>::iterator Item=ListList.begin(); Item!=ListList.end(); ++Item)
- Fill(Stream_General, 0, Item->first.To_UTF8().c_str(), Item->second);
-}
-
-//---------------------------------------------------------------------------
-void File_Caf::kuki()
-{
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Caf::pakt()
-{
- //Parsing
- int64u NumberPackets, NumberValidFrames;
- int32u PrimingFrames, RemainderFrames;
- Get_B8 (NumberPackets, "NumberPackets");
- Get_B8 (NumberValidFrames, "NumberValidFrames");
- Get_B4 (PrimingFrames, "PrimingFrames");
- Get_B4 (RemainderFrames, "RemainderFrames");
- Skip_XX(Element_Size-Element_Offset, "Packet sizes");
-
- FILLING_BEGIN();
- float64 SampleRate=Retrieve(Stream_Audio, 0, Audio_SamplingRate).To_float64();
- Fill(Stream_Audio, 0, Audio_FrameCount, NumberPackets);
- Fill(Stream_Audio, 0, Audio_Duration, NumberValidFrames/SampleRate*1000, 0);
- if (PrimingFrames && RemainderFrames)
- Fill(Stream_Audio, 0, Audio_Source_Duration, (PrimingFrames+NumberValidFrames+RemainderFrames)/SampleRate*1000, 0);
- Fill(Stream_Audio, 0, Audio_Delay, PrimingFrames/SampleRate*1000, 0);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Caf::uuid()
-{
- //Parsing
- Skip_UUID( "UUID");
- Skip_XX(Element_Size-Element_Offset, "Data");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_CAF_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Caf.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Caf.h
deleted file mode 100644
index 124f9aa33..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Caf.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Core Audio Format files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_CafH
-#define MediaInfo_File_CafH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Au
-//***************************************************************************
-
-class File_Caf : public File__Analyze
-{
-public :
- File_Caf();
-
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse ();
-
- //Buffer
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void data();
- void desc();
- void free();
- void info();
- void kuki();
- void pakt();
- void uuid();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Celt.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Celt.cpp
deleted file mode 100644
index 09a8d25de..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Celt.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-// Note : the buffer must be given in ONE call
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_CELT_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Celt.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Celt::File_Celt()
-:File__Analyze()
-{
- //Internal
- Identification_Done=false;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Celt::Header_Parse()
-{
- //Filling
- Header_Fill_Code(0, "CELT");
- Header_Fill_Size(Element_Size);
-}
-
-//---------------------------------------------------------------------------
-void File_Celt::Data_Parse()
-{
- //Parsing
- if (Identification_Done)
- Comment();
- else
- Identification();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Celt::Identification()
-{
- Element_Name("Identification");
-
- //Parsing
- Ztring celt_version;
- int32u Celt_version_id, sample_rate, nb_channels;
- Skip_Local(8, "celt_codec_id");
- Get_Local(20, celt_version, "celt_version");
- Get_L4 (Celt_version_id, "celt_version_id");
- Skip_L4( "header_size");
- Get_L4 (sample_rate, "rate");
- Get_L4 (nb_channels, "nb_channels");
- Skip_L4( "frame_size");
- Skip_L4( "overlap");
- Skip_L4( "bytes_per_packet");
- Skip_L4( "extra_headers");
-
- //Filling
- FILLING_BEGIN();
- Accept("CELT");
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "CELT");
- Fill(Stream_Audio, 0, Audio_Codec, "CELT");
-
- if (!celt_version.empty())
- {
- //Fill(Stream_Audio, 0, Audio_Encoded_Library, celt_version); //Need more info about hte different possibilities, in the meanwhile trusting more the comment part
- Fill(Stream_Audio, 0, Audio_SamplingRate, sample_rate);
- Fill(Stream_Audio, 0, Audio_Channel_s_, nb_channels);
- }
-
- FILLING_END();
-
- //Filling
- Identification_Done=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Celt::Comment()
-{
- Element_Name("Comment?");
-
- while (Element_Offset<Element_Size)
- {
- Ztring value;
- int32u size;
- Get_L4(size, "size");
- if (size)
- Get_Local(size, value, "value");
-
- //Filling
- if (value.find(__T("CELT "))!=std::string::npos)
- {
- Ztring Version=value.SubString(__T("CELT "), __T(" ("));
- Fill(Stream_Audio, 0, Audio_Encoded_Library, __T("CELT ")+Version);
- Fill(Stream_Audio, 0, Audio_Encoded_Library_Name, __T("CELT"));
- Fill(Stream_Audio, 0, Audio_Encoded_Library_Version, Version);
- }
- else if (!value.empty())
- Fill(Stream_Audio, 0, "Comment", value);
- }
-
- Finish("CELT");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_CELT_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Celt.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Celt.h
deleted file mode 100644
index bbefc2bea..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Celt.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about CELT files
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_CeltH
-#define MediaInfo_File_CeltH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Celt
-//***************************************************************************
-
-class File_Celt : public File__Analyze
-{
-public :
- File_Celt();
-
-private :
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Identification();
- void Comment();
-
- //Temp
- bool Identification_Done;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ChannelGrouping.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ChannelGrouping.cpp
deleted file mode 100644
index 4c79f4e24..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ChannelGrouping.cpp
+++ /dev/null
@@ -1,389 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_SMPTEST0337_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_ChannelGrouping.h"
-#if defined(MEDIAINFO_SMPTEST0337_YES)
- #include "MediaInfo/Audio/File_SmpteSt0337.h"
-#endif
-#if defined(MEDIAINFO_PCM_YES)
- #include "MediaInfo/Audio/File_Pcm.h"
-#endif
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-File_ChannelGrouping::File_ChannelGrouping()
-{
- //Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_ChannelGrouping;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- #endif //MEDIAINFO_DEMUX
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(0); //Container1
- #endif //MEDIAINFO_TRACE
- IsRawStream=true;
-
- //In
- BitDepth=0;
- SamplingRate=0;
- Endianness=0;
- Aligned=false;
- CanBePcm=false;
- Common=NULL;
- Channel_Pos=0;
- Channel_Total=1;
-}
-
-File_ChannelGrouping::~File_ChannelGrouping()
-{
- Common->Instances--;
-
- if (Common->Instances==0)
- {
- for (size_t Pos=0; Pos<Common->Channels.size(); Pos++)
- delete Common->Channels[Pos]; //Common->Channels[Pos]=NULL;
- delete Common; //Common=NULL;
- }
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_ChannelGrouping::Streams_Fill()
-{
- Fill(Stream_General, 0, General_Format, "ChannelGrouping");
-
- if (Channel_Pos!=Common->Channels.size()-1)
- return;
-
- if (Common->Parsers.size()!=1 && CanBePcm) // Last parser is PCM, impossible to detect with another method if htere is only one block
- {
- for (size_t Pos=0; Pos<Common->Parsers.size()-1; Pos++)
- delete Common->Parsers[Pos];
- Common->Parsers.erase(Common->Parsers.begin(), Common->Parsers.begin()+Common->Parsers.size()-1);
- Common->Parsers[0]->Accept();
- Common->Parsers[0]->Fill();
- }
-
- if (Common->Parsers.size()!=1)
- return;
-
- Fill(Common->Parsers[0]);
- Merge(*Common->Parsers[0]);
-}
-
-//---------------------------------------------------------------------------
-void File_ChannelGrouping::Streams_Finish()
-{
- if (Channel_Pos!=Common->Channels.size()-1 || Common->Parsers.size()!=1)
- return;
-
- Finish(Common->Parsers[0]);
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_ChannelGrouping::Read_Buffer_Init()
-{
- if (Common==NULL)
- {
- //Common
- Common=new common;
- Common->Channels.resize(Channel_Total);
- for (size_t Pos=0; Pos<Common->Channels.size(); Pos++)
- Common->Channels[Pos]=new common::channel;
- Element_Code=(int64u)-1;
-
- //SMPTE ST 337
- {
- File_SmpteSt0337* Parser=new File_SmpteSt0337;
- Parser->Container_Bits=BitDepth;
- Parser->Endianness=Endianness;
- Parser->Aligned=Aligned;
- Common->Parsers.push_back(Parser);
- }
-
- //PCM
- if (CanBePcm)
- {
- File_Pcm* Parser=new File_Pcm;
- Parser->BitDepth=BitDepth;
- Parser->Channels=Channel_Total;
- Parser->SamplingRate=SamplingRate;
- Parser->Endianness=Endianness;
- Common->Parsers.push_back(Parser);
- }
-
- //for all parsers
- for (size_t Pos=0; Pos<Common->Parsers.size(); Pos++)
- {
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Common->Parsers[Pos]->Demux_UnpacketizeContainer=true;
- Common->Parsers[Pos]->Demux_Level=2; //Container
- Demux_Level=4; //Intermediate
- }
- #endif //MEDIAINFO_DEMUX
- Open_Buffer_Init(Common->Parsers[Pos]);
- }
- }
- Common->Instances++;
- Common->Instances_Max++;
-}
-
-//---------------------------------------------------------------------------
-void File_ChannelGrouping::Read_Buffer_Continue()
-{
- //Verifying that all instances are still present
- if (Common->Instances!=Common->Instances_Max)
- {
- Reject();
- return;
- }
-
- //Handling of multiple frames in one block
- if (Buffer_Size==0)
- {
- Offsets_Stream.clear();
- Offsets_Buffer.clear();
- for (size_t Pos=0; Pos<Common->Parsers.size(); Pos++)
- Open_Buffer_Continue(Common->Parsers[Pos], Common->MergedChannel.Buffer+Common->MergedChannel.Buffer_Offset, 0, false);
- return;
- }
-
- //Demux
- #if MEDIAINFO_DEMUX
- Demux(Common->MergedChannel.Buffer+Common->MergedChannel.Buffer_Offset, Common->MergedChannel.Buffer_Size-Common->MergedChannel.Buffer_Offset, ContentType_MainStream);
- #endif //MEDIAINFO_EVENTS
-
- //Copying to Channel buffer
- if (Common->Channels[Channel_Pos]->Buffer_Size+Buffer_Size>Common->Channels[Channel_Pos]->Buffer_Size_Max)
- Common->Channels[Channel_Pos]->resize(Common->Channels[Channel_Pos]->Buffer_Size+Buffer_Size);
- memcpy(Common->Channels[Channel_Pos]->Buffer+Common->Channels[Channel_Pos]->Buffer_Size, Buffer, Buffer_Size);
- Common->Channels[Channel_Pos]->Buffer_Size+=Buffer_Size;
- Common->Channels[Channel_Pos]->Offsets_Stream.insert(Common->Channels[Channel_Pos]->Offsets_Stream.begin(), Offsets_Stream.begin(), Offsets_Stream.end());
- Offsets_Stream.clear();
- Common->Channels[Channel_Pos]->Offsets_Buffer.insert(Common->Channels[Channel_Pos]->Offsets_Buffer.begin(), Offsets_Buffer.begin(), Offsets_Buffer.end());
- Offsets_Buffer.clear();
- Skip_XX(Buffer_Size, "Channel grouping data");
- Common->Channel_Current++;
- if (Common->Channel_Current>=Channel_Total)
- Common->Channel_Current=0;
-
- //Copying to merged channel
- size_t Minimum=(size_t)-1;
- for (size_t Pos=0; Pos<Common->Channels.size(); Pos++)
- if (Minimum>Common->Channels[Pos]->Buffer_Size-Common->Channels[Pos]->Buffer_Offset)
- Minimum=Common->Channels[Pos]->Buffer_Size-Common->Channels[Pos]->Buffer_Offset;
- if (Minimum*8>=BitDepth)
- {
- for (size_t Pos=0; Pos<Common->Channels.size(); Pos++)
- {
- Common->MergedChannel.Offsets_Stream.insert(Common->MergedChannel.Offsets_Stream.end(), Common->Channels[Pos]->Offsets_Stream.begin(), Common->Channels[Pos]->Offsets_Stream.end());
- Common->Channels[Pos]->Offsets_Stream.clear();
- Common->MergedChannel.Offsets_Buffer.insert(Common->MergedChannel.Offsets_Buffer.end(), Common->Channels[Pos]->Offsets_Buffer.begin(), Common->Channels[Pos]->Offsets_Buffer.end());
- Common->Channels[Pos]->Offsets_Buffer.clear();
- }
-
- while (Minimum*8>=BitDepth)
- {
- switch (BitDepth)
- {
- case 16:
- // Source: 16XE / L3L2 L1L0 + R3R2 R1R0
- // Dest : 16XE / L3L2 L1L0 R3R2 R1R0
- for (size_t Pos=0; Pos<Common->Channels.size(); Pos++)
- {
- if (Common->MergedChannel.Buffer_Size+Minimum>Common->MergedChannel.Buffer_Size_Max)
- Common->MergedChannel.resize(Common->MergedChannel.Buffer_Size+Minimum);
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]= Common->Channels[Pos]->Buffer[Common->Channels[Pos]->Buffer_Offset++];
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]= Common->Channels[Pos]->Buffer[Common->Channels[Pos]->Buffer_Offset++];
- }
- Minimum-=2;
- break;
- case 20:
- // Source: 20BE / L4L3 L2L1 L0L4 L3L2 L1L0 + R4R3 R2R1 R0R4 R3R2 R1R0
- // Dest : 20BE / L4L3 L2L1 L0R4 R3R2 R1R0 L4L3 L2L1 L0R4 R2R1 R1R0
- if (Endianness=='B')
- for (size_t Pos=0; Pos+1<Common->Channels.size(); Pos+=2)
- {
- if (Common->MergedChannel.Buffer_Size+Minimum*2>Common->MergedChannel.Buffer_Size_Max)
- Common->MergedChannel.resize(Common->MergedChannel.Buffer_Size+Minimum*2);
- int8u* Channel1=Common->Channels[Pos]->Buffer+Common->Channels[Pos]->Buffer_Offset;
- int8u* Channel2=Common->Channels[Pos]->Buffer+Common->Channels[Pos]->Buffer_Offset;
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]= Channel1[0];
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]= Channel1[1];
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]=(Channel1[0]&0xF0) | (Channel2[0]>>4 );
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]=(Channel2[0]<<4 ) | (Channel2[1]>>4 );
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]=(Channel2[1]<<4 ) | (Channel2[2]>>4 );
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]=(Channel1[2]<<4 ) | (Channel1[3]>>4 );
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]=(Channel1[3]<<4 ) | (Channel1[4]>>4 );
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]=(Channel1[4]<<4 ) | (Channel2[2]&0x0F);
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]= Channel2[3];
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]= Channel2[4];
- Common->Channels[Pos]->Buffer_Offset+=5;
- Common->Channels[Pos+1]->Buffer_Offset+=5;
- }
- // Source: 20LE / L1L0 L3L2 L0L4 L2L1 L4L3 + R1R0 R3R2 R0R4 R2R1 R4R3
- // Dest : 20LE / L1L0 L3L2 R0L4 R2R1 R4R3 L1L0 L3L2 R0L4 R2R1 R4R3
- else
- for (size_t Pos=0; Pos+1<Common->Channels.size(); Pos+=2)
- {
- if (Common->MergedChannel.Buffer_Size+Minimum*2>Common->MergedChannel.Buffer_Size_Max)
- Common->MergedChannel.resize(Common->MergedChannel.Buffer_Size+Minimum*2);
- int8u* Channel1=Common->Channels[Pos]->Buffer+Common->Channels[Pos]->Buffer_Offset;
- int8u* Channel2=Common->Channels[Pos]->Buffer+Common->Channels[Pos]->Buffer_Offset;
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]= Channel1[0];
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]= Channel1[1];
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]=(Channel2[0]<<4 ) | (Channel1[2]&0x0F);
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]=(Channel2[1]<<4 ) | (Channel2[0]>>4 );
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]=(Channel2[2]<<4 ) | (Channel2[1]>>4 );
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]=(Channel1[3]<<4 ) | (Channel1[2]>>4 );
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]=(Channel1[4]<<4 ) | (Channel1[3]>>4 );
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]=(Channel2[2]&0xF0) | (Channel1[4]>>4 );
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]= Channel2[3];
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]= Channel2[4];
- Common->Channels[Pos]->Buffer_Offset+=5;
- Common->Channels[Pos+1]->Buffer_Offset+=5;
- }
- Minimum-=5; //2.5 twice
- break;
- case 24:
- // Source: 24XE / L5L4 L3L2 L1L0 + R5R4 R3R2 R1R0
- // Dest : 24XE / L5L4 L3L2 L1L0 R5R4 R3R2 R1R0
- for (size_t Pos=0; Pos<Common->Channels.size(); Pos++)
- {
- if (Common->MergedChannel.Buffer_Size+Minimum>Common->MergedChannel.Buffer_Size_Max)
- Common->MergedChannel.resize(Common->MergedChannel.Buffer_Size+Minimum);
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]= Common->Channels[Pos]->Buffer[Common->Channels[Pos]->Buffer_Offset++];
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]= Common->Channels[Pos]->Buffer[Common->Channels[Pos]->Buffer_Offset++];
- Common->MergedChannel.Buffer[Common->MergedChannel.Buffer_Size++]= Common->Channels[Pos]->Buffer[Common->Channels[Pos]->Buffer_Offset++];
- }
- Minimum-=3;
- break;
- default: ;
- // Not supported
- Reject();
- return;
- }
- }
- }
-
- if (Common->MergedChannel.Buffer_Size>Common->MergedChannel.Buffer_Offset)
- {
- for (size_t Pos=0; Pos<Common->Parsers.size(); Pos++)
- {
- if (FrameInfo_Next.DTS!=(int64u)-1)
- Common->Parsers[Pos]->FrameInfo=FrameInfo_Next; //AES3 parse has its own buffer management
- else if (FrameInfo.DTS!=(int64u)-1)
- {
- Common->Parsers[Pos]->FrameInfo=FrameInfo;
- FrameInfo=frame_info();
- }
- Common->Parsers[Pos]->Offsets_Stream.insert(Common->Parsers[Pos]->Offsets_Stream.end(), Common->MergedChannel.Offsets_Stream.begin(), Common->MergedChannel.Offsets_Stream.end());
- Common->Parsers[Pos]->Offsets_Buffer.insert(Common->Parsers[Pos]->Offsets_Buffer.end(), Common->MergedChannel.Offsets_Buffer.begin(), Common->MergedChannel.Offsets_Buffer.end());
- for (size_t Offsets_Pos_Temp=Common->Parsers[Pos]->Offsets_Buffer.size()-Common->MergedChannel.Offsets_Buffer.size(); Offsets_Pos_Temp<Common->Parsers[Pos]->Offsets_Buffer.size(); Offsets_Pos_Temp++)
- Common->Parsers[Pos]->Offsets_Buffer[Offsets_Pos_Temp]+=Common->Parsers[Pos]->Buffer_Size/Common->Channels.size();
- Open_Buffer_Continue(Common->Parsers[Pos], Common->MergedChannel.Buffer+Common->MergedChannel.Buffer_Offset, Common->MergedChannel.Buffer_Size-Common->MergedChannel.Buffer_Offset, false);
-
- //Multiple parsers
- if (Common->Parsers.size()>1)
- {
- if (!Common->Parsers[Pos]->Status[IsAccepted] && Common->Parsers[Pos]->Status[IsFinished])
- {
- delete *(Common->Parsers.begin()+Pos);
- Common->Parsers.erase(Common->Parsers.begin()+Pos);
- Pos--;
- }
- else if (Common->Parsers.size()>1 && Common->Parsers[Pos]->Status[IsAccepted])
- {
- File__Analyze* Parser=Common->Parsers[Pos];
- for (size_t Pos2=0; Pos2<Common->Parsers.size(); Pos2++)
- {
- if (Pos2!=Pos)
- delete *(Common->Parsers.begin()+Pos2);
- }
- Common->Parsers.clear();
- Common->Parsers.push_back(Parser);
- }
- }
- }
- Common->MergedChannel.Buffer_Offset=Common->MergedChannel.Buffer_Size;
- Common->MergedChannel.Offsets_Stream.clear();
- Common->MergedChannel.Offsets_Buffer.clear();
- }
- if (!Status[IsAccepted] && Common->Parsers.size()==1 && Common->Parsers[0]->Status[IsAccepted])
- Accept();
- if (!Status[IsFilled] && Common->Parsers.size()==1 && Common->Parsers[0]->Status[IsFilled])
- Fill();
- if (!Status[IsFinished] && Common->Parsers.size()==1 && Common->Parsers[0]->Status[IsFinished])
- Finish();
-
- //Optimize buffer
- for (size_t Pos=0; Pos<Common->Channels.size(); Pos++)
- Common->Channels[Pos]->optimize();
- Common->MergedChannel.optimize();
-}
-
-//---------------------------------------------------------------------------
-void File_ChannelGrouping::Read_Buffer_Unsynched()
-{
- for (size_t Pos=0; Pos<Common->Parsers.size(); Pos++)
- if (Common->Parsers[Pos])
- Common->Parsers[Pos]->Open_Buffer_Unsynch();
-
- Common->MergedChannel.Buffer_Offset=0;
- Common->MergedChannel.Buffer_Size=0;
- for (size_t Pos=0; Pos<Common->Channels.size(); Pos++)
- {
- Common->Channels[Pos]->Buffer_Offset=0;
- Common->Channels[Pos]->Buffer_Size=0;
- }
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_SMPTEST0337_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ChannelGrouping.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ChannelGrouping.h
deleted file mode 100644
index 920d3cf8c..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ChannelGrouping.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Some containers use mono stream for AES3 (Stereo) grouping
-// We need to group the 2-mono streams in one before sending
-// data to AES parser
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_ChannelGroupingH
-#define MediaInfo_File_ChannelGroupingH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <cstring>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_ChannelGrouping
-//***************************************************************************
-
-class File_ChannelGrouping : public File__Analyze
-{
-public :
- //In
- int8u BitDepth;
- int16u SamplingRate;
- int8u Endianness;
- bool Aligned;
- bool CanBePcm;
-
- struct common
- {
- struct channel
- {
- int8u* Buffer;
- size_t Buffer_Offset;
- size_t Buffer_Size;
- size_t Buffer_Size_Max;
- std::vector<int64u> Offsets_Stream;
- std::vector<int64u> Offsets_Buffer;
-
- channel()
- {
- Buffer=new int8u[32768];
- Buffer_Offset=0;
- Buffer_Size=0;
- Buffer_Size_Max=32768;
- }
-
- ~channel()
- {
- delete[] Buffer; //Buffer=NULL;
- }
-
- void resize(size_t NewSize)
- {
- if (NewSize<Buffer_Size_Max)
- return;
- int8u* Old=Buffer;
- if (NewSize<2*Buffer_Size_Max)
- Buffer_Size_Max*=2;
- else
- Buffer_Size_Max=NewSize;
- Buffer=new int8u[Buffer_Size_Max];
- std::memcpy(Buffer, Old, Buffer_Size);
- delete[] Old; //Old=NULL;
- }
-
- void optimize()
- {
- if (Buffer_Offset<Buffer_Size_Max/2)
- return;
- std::memcpy(Buffer, Buffer+Buffer_Offset, Buffer_Size-Buffer_Offset);
- Buffer_Size-=Buffer_Offset;
- Buffer_Offset=0;
- }
-
- };
- vector<channel*> Channels;
- channel MergedChannel;
- size_t Channel_Current;
- std::vector<File__Analyze*> Parsers;
- size_t Instances;
- size_t Instances_Max;
-
- common()
- {
- Channel_Current=0;
- Instances=0;
- Instances_Max=0;
- }
-
- ~common()
- {
- for (size_t Pos=0; Pos<Parsers.size(); Pos++)
- delete Parsers[Pos];
- }
- };
- int64u StreamID;
- common* Common;
- int8u Channel_Pos;
- int8u Channel_Total;
-
- //Constructor/Destructor
- File_ChannelGrouping();
- ~File_ChannelGrouping();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - Global
- void Read_Buffer_Init ();
- void Read_Buffer_Continue ();
- void Read_Buffer_Unsynched ();
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_DolbyE.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_DolbyE.cpp
deleted file mode 100644
index 5d56cedd5..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_DolbyE.cpp
+++ /dev/null
@@ -1,969 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Important note about Dolby E parser:
-// Open-Source version of MediaInfo has basic support of Dolby E,
-// created by reverse engineering by an anonymous third-party,
-// with the limitions due to reverse engineering: there is a risk
-// of wrong interpretation of the reverse engineeried bitstream.
-// If you want a safer Dolby E support, based on Dolby E specifications,
-// contact http://www.dolby.com/about/contact_us/contactus.aspx?goto=28
-// for a license before asking it in a specific (and not Open-Source) version
-// of MediaInfo.
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DOLBYE_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_DolbyE.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const int8u DolbyE_Programs[64]=
-{2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 8, 1, 2, 3, 3, 4, 5, 6, 1, 2, 3, 4, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-
-//---------------------------------------------------------------------------
-const int8u DolbyE_Channels[64]=
-{8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-
-//---------------------------------------------------------------------------
-const int8u DolbyE_Channels_PerProgram(int8u program_config, int8u program)
-{
- switch (program_config)
- {
- case 0 : switch (program)
- {
- case 0 : return 6;
- default : return 2;
- }
- case 1 : switch (program)
- {
- case 0 : return 6;
- default : return 1;
- }
- case 2 :
- case 18 : return 4;
- case 3 :
- case 12 : switch (program)
- {
- case 0 : return 4;
- default : return 2;
- }
- case 4 : switch (program)
- {
- case 0 : return 4;
- case 1 : return 2;
- default : return 1;
- }
- case 5 :
- case 13 : switch (program)
- {
- case 0 : return 4;
- default : return 1;
- }
- case 6 :
- case 14 :
- case 19 : return 2;
- case 7 : switch (program)
- {
- case 0 :
- case 1 :
- case 2 : return 2;
- default : return 1;
- }
- case 8 :
- case 15 : switch (program)
- {
- case 0 :
- case 1 : return 2;
- default : return 1;
- }
- case 9 :
- case 16 :
- case 20 : switch (program)
- {
- case 0 : return 2;
- default : return 1;
- }
- case 10 :
- case 17 :
- case 21 : return 1;
- case 11 : return 6;
- case 22 : return 8;
- case 23 : return 8;
- default : return 0;
- }
-};
-
-//---------------------------------------------------------------------------
-const char* DolbyE_ChannelPositions[64]=
-{
- "Front: L C R, Side: L R, LFE / Front: L R",
- "Front: L C R, Side: L R, LFE / Front: C / Front: C",
- "Front: L C R, LFE / Front: L C R, LFE",
- "Front: L C R, LFE / Front: L R / Front: L R",
- "Front: L C R, LFE / Front: L R / Front: C / Front: C",
- "Front: L C R, LFE / Front: C / Front: C / Front: C / Front: C",
- "Front: L R / Front: L R / Front: L R / Front: L R",
- "Front: L R / Front: L R / Front: L R / Front: C / Front: C",
- "Front: L R / Front: L R / Front: C / Front: C / Front: C / Front: C",
- "Front: L R / Front: C / Front: C / Front: C / Front: C / Front: C / Front: C",
- "Front: C / Front: C / Front: C / Front: C / Front: C / Front: C / Front: C / Front: C",
- "Front: L C R, Side: L R, LFE",
- "Front: L C R, LFE / Front: L R",
- "Front: L C R, LFE / Front: C / Front: C",
- "Front: L R / Front: L R / Front: L R",
- "Front: L R / Front: L R / Front: C / Front: C",
- "Front: L R / Front: C / Front: C / Front: C / Front: C",
- "Front: C / Front: C / Front: C / Front: C / Front: C / Front: C",
- "Front: L C R, LFE",
- "Front: L R / Front: L R",
- "Front: L R / Front: C / Front: C",
- "Front: C / Front: C / Front: C / Front: C",
- "Front: L C R, Side: L R, Rear: L R, LFE",
- "Front: L C C C R, Side: L R, LFE",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* DolbyE_ChannelPositions_PerProgram(int8u program_config, int8u program)
-{
- switch (program_config)
- {
- case 0 : switch (program)
- {
- case 0 : return "Front: L C R, Side: L R, LFE";
- default : return "Front: L R";
- }
- case 1 : switch (program)
- {
- case 0 : return "Front: L C R, Side: L R, LFE";
- default : return "Front: C";
- }
- case 2 :
- case 18 : return "Front: L C R, LFE";
- case 3 :
- case 12 : switch (program)
- {
- case 0 : return "Front: L C R, LFE";
- default : return "Front: L R";
- }
- case 4 : switch (program)
- {
- case 0 : return "Front: L C R, LFE";
- case 1 : return "Front: L R";
- default : return "Front: C";
- }
- case 5 :
- case 13 : switch (program)
- {
- case 0 : return "Front: L C R, LFE";
- default : return "Front: C";
- }
- case 6 :
- case 14 :
- case 19 : return "Front: L R";
- case 7 : switch (program)
- {
- case 0 :
- case 1 :
- case 2 : return "Front: L R";
- default : return "Front: C";
- }
- case 8 :
- case 15 : switch (program)
- {
- case 0 :
- case 1 : return "Front: L R";
- default : return "Front: C";
- }
- case 9 :
- case 16 :
- case 20 : switch (program)
- {
- case 0 : return "Front: L R";
- default : return "Front: C";
- }
- case 10 :
- case 17 :
- case 21 : return "Front: C";
- case 11 : return "Front: L C R, Side: L R, LFE";
- case 22 : return "Front: L C R, Side: L R, Rear: L R, LFE";
- case 23 : return "Front: L C C C R, Side: L R, LFE";
- default : return "";
- }
-};
-
-//---------------------------------------------------------------------------
-const char* DolbyE_ChannelPositions2[64]=
-{
- "3/2/0.1 / 2/0/0",
- "3/2/0.1 / 1/0/0 / 1/0/0",
- "3/0/0.1 / 3/0/0.1",
- "3/0/0.1 / 2/0/0 / 2/0/0",
- "3/0/0.1 / 2/0/0 / 1/0/0 / 1/0/0",
- "3/0/0.1 / 1/0/0 / 1/0/0 / 1/0/0 / 1/0/0",
- "2/0/0 / 2/0/0 / 2/0/0 / 2/0/0",
- "2/0/0 / 2/0/0 / 2/0/0 / 1/0/0 / 1/0/0",
- "2/0/0 / 2/0/0 / 1/0/0 / 1/0/0 / 1/0/0 / 1/0/0",
- "2/0/0 / 1/0/0 / 1/0/0 / 1/0/0 / 1/0/0 / 1/0/0 / 1/0/0",
- "1/0/0 / 1/0/0 / 1/0/0 / 1/0/0 / 1/0/0 / 1/0/0 / 1/0/0 / 1/0/0",
- "3/2/0.1",
- "3/0/0.1 / 2/0/0",
- "3/0/0.1 / 1/0/0 / 1/0/0",
- "2/0/0 / 2/0/0 / 2/0/0",
- "2/0/0 / 2/0/0 / 1/0/0 / 1/0/0",
- "2/0/0 / 1/0/0 / 1/0/0 / 1/0/0 / 1/0/0",
- "1/0/0 / 1/0/0 / 1/0/0 / 1/0/0 / 1/0/0 / 1/0/0",
- "3/0/0.1",
- "2/0/0 / 2/0/0",
- "2/0/0 / 1/0/0 / 1/0/0",
- "1/0/0 / 1/0/0 / 1/0/0 / 1/0/0",
- "3/2/2.1",
- "5/2/0.1",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* DolbyE_ChannelPositions2_PerProgram(int8u program_config, int8u program)
-{
- switch (program_config)
- {
- case 0 : switch (program)
- {
- case 0 : return "3/2/0.1";
- default : return "2/0/0";
- }
- case 1 : switch (program)
- {
- case 0 : return "3/2/0.1";
- default : return "1/0/0";
- }
- case 2 :
- case 18 : return "3/0/0.1";
- case 3 :
- case 12 : switch (program)
- {
- case 0 : return "3/0/0.1";
- default : return "2/0/0";
- }
- case 4 : switch (program)
- {
- case 0 : return "3/0/0.1";
- case 1 : return "2/0/0";
- default : return "1/0/0";
- }
- case 5 :
- case 13 : switch (program)
- {
- case 0 : return "3/0/0.1";
- default : return "1/0/0";
- }
- case 6 :
- case 14 :
- case 19 : return "Front: L R";
- case 7 : switch (program)
- {
- case 0 :
- case 1 :
- case 2 : return "2/0/0";
- default : return "1/0/0";
- }
- case 8 :
- case 15 : switch (program)
- {
- case 0 :
- case 1 : return "2/0/0";
- default : return "1/0/0";
- }
- case 9 :
- case 16 :
- case 20 : switch (program)
- {
- case 0 : return "2/0/0";
- default : return "1/0/0";
- }
- case 10 :
- case 17 :
- case 21 : return "1/0/0";
- case 11 : return "3/2/0.1";
- case 22 : return "3/2/2.1";
- case 23 : return "5/2/0.1";
- default : return "";
- }
-};
-
-extern const char* AC3_Surround[];
-
-//---------------------------------------------------------------------------
-const char* DolbyE_ChannelLayout_PerProgram(int8u ProgramConfiguration, int8u ProgramNumber)
-{
- switch (ProgramConfiguration)
- {
- case 0 : switch (ProgramNumber)
- {
- case 0 : return "L C Ls X R LFE Rs X";
- default : return "X X X L X X X R";
- }
- case 1 : switch (ProgramNumber)
- {
- case 0 : return "L C Ls X R LFE Rs X";
- case 1 : return "X X X C X X X X";
- default : return "X X X X X X X C";
- }
- case 2 : switch (ProgramNumber)
- {
- case 0 : return "L C X X R S X X";
- default : return "X X L C X X R S";
- }
- case 3 : switch (ProgramNumber)
- {
- case 0 : return "L C X X R S X X";
- case 1 : return "X X L X X X R X";
- default : return "X X X L X X X R";
- }
- case 4 : switch (ProgramNumber)
- {
- case 0 : return "L C X X R S X X";
- case 1 : return "X X L X X X R X";
- case 2 : return "X X X C X X X X";
- default : return "X X X X X X X C";
- }
- case 5 : switch (ProgramNumber)
- {
- case 0 : return "L C X X R S X X";
- case 1 : return "X X C X X X X X";
- case 2 : return "X X X X X X C X";
- case 3 : return "X X X C X X X X";
- default : return "X X X X X X X C";
- }
- case 6 : switch (ProgramNumber)
- {
- case 0 : return "L X X X R X X X";
- case 1 : return "X L X X X R X X";
- case 2 : return "X X L X X X R X";
- default : return "X X X L X X X R";
- }
- case 7 : switch (ProgramNumber)
- {
- case 0 : return "L X X X R X X X";
- case 1 : return "X L X X X R X X";
- case 2 : return "X X L X X X R X";
- case 3 : return "X X X C X X X X";
- default : return "X X X X X X X C";
- }
- case 8 : switch (ProgramNumber)
- {
- case 0 : return "L X X X R X X X";
- case 1 : return "X L X X X R X X";
- case 2 : return "X X C X X X X X";
- case 3 : return "X X X X X X C X";
- case 4 : return "X X X C X X X X";
- default : return "X X X X X X X C";
- }
- case 9 : switch (ProgramNumber)
- {
- case 0 : return "L X X X R X X X";
- case 1 : return "X C X X X X X X";
- case 2 : return "X X X X X C X X";
- case 3 : return "X X C X X X X X";
- case 4 : return "X X X X X X C X";
- case 5 : return "X X X C X X X X";
- default : return "X X X X X X X C";
- }
- case 10 : switch (ProgramNumber)
- {
- case 0 : return "C X X X X X X X";
- case 1 : return "X X X X C X X X";
- case 2 : return "X C X X X X X X";
- case 3 : return "X X X X X C X X";
- case 4 : return "X X C X X X X X";
- case 5 : return "X X X X X X C X";
- case 6 : return "X X X C X X X X";
- default : return "X X X X X X X C";
- }
- case 11 : return "L C Ls R LFE Rs";
- case 12 : switch (ProgramNumber)
- {
- case 0 : return "L C X R S X";
- default : return "X X L X X R";
- }
- case 13 : switch (ProgramNumber)
- {
- case 0 : return "L C X R S X";
- case 1 : return "X X C X X X";
- default : return "X X X X X C";
- }
- case 14 : switch (ProgramNumber)
- {
- case 0 : return "L X X R X X";
- case 1 : return "X L X X R X";
- default : return "X X L X X R";
- }
- case 15 : switch (ProgramNumber)
- {
- case 0 : return "L X X R X X";
- case 1 : return "X L X R X";
- case 2 : return "X X C X X X";
- default : return "X X X X X C";
- }
- case 16 : switch (ProgramNumber)
- {
- case 0 : return "L X X R X X";
- case 1 : return "X C X X X X";
- case 2 : return "X X X X C X";
- case 3 : return "X X C X X X";
- default : return "X X X X X C";
- }
- case 17 : switch (ProgramNumber)
- {
- case 0 : return "C X X X X X";
- case 1 : return "X X X C X X";
- case 2 : return "X C X X X X";
- case 3 : return "X X X X C X";
- case 4 : return "X X C X X X";
- default : return "X X X X X C";
- }
- case 18 : return "L C R S";
- case 19 : switch (ProgramNumber)
- {
- case 0 : return "L X R X";
- default : return "X L X R";
- }
- case 20 : switch (ProgramNumber)
- {
- case 0 : return "L X R X";
- case 1 : return "X C X X";
- default : return "X X X C";
- }
- case 21 : switch (ProgramNumber)
- {
- case 0 : return "C X X X";
- case 1 : return "X X C X";
- case 2 : return "X C X X";
- default : return "X X X C";
- }
- case 22 : return "L C Ls Lrs R LFE Rs Rrs";
- case 23 : return "L C Ls Lc R LFE Rs Rc";
- default : return "";
- }
-};
-
-extern const float32 Mpegv_frame_rate[16];
-
-const bool Mpegv_frame_rate_type[16]=
-{false, false, false, false, false, false, true, true, true, false, false, false, false, false, false, false};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_DolbyE::File_DolbyE()
-:File__Analyze()
-{
- //Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_DolbyE;
- #endif //MEDIAINFO_EVENTS
-
- //Configuration
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=32*1024;
-
- //In
- GuardBand_Before=0;
- GuardBand_After=0;
-
- //Temp
- SMPTE_time_code_StartTimecode=(int64u)-1;
- FrameInfo.DTS=0;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DolbyE::Streams_Fill()
-{
- Fill(Stream_General, 0, General_Format, "Dolby E");
- for (int8u program=0; program<DolbyE_Programs[ProgramConfiguration]; program++)
- {
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format, "Dolby E");
- if (DolbyE_Programs[ProgramConfiguration]>1)
- Fill(Stream_Audio, StreamPos_Last, Audio_ID, Count_Get(Stream_Audio));
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, DolbyE_Channels_PerProgram(ProgramConfiguration, program));
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelPositions, DolbyE_ChannelPositions_PerProgram(ProgramConfiguration, program));
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelPositions_String2, DolbyE_ChannelPositions2_PerProgram(ProgramConfiguration, program));
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelLayout, DolbyE_ChannelLayout_PerProgram(ProgramConfiguration, program));
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, 48000);
- Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, BitDepth);
- if (SMPTE_time_code_StartTimecode!=(int64u)-1)
- {
- Fill(StreamKind_Last, StreamPos_Last, Audio_Delay, SMPTE_time_code_StartTimecode);
- Fill(StreamKind_Last, StreamPos_Last, Audio_Delay_Source, "Stream");
- }
-
- Fill(Stream_Audio, StreamPos_Last, Audio_FrameRate, Mpegv_frame_rate[FrameRate]);
- if (FrameInfo.PTS!=(int64u)-1 && BitDepth)
- {
- float BitRate=(float)(96000*BitDepth);
-
- if (GuardBand_Before_Initial)
- {
- float GuardBand_Before_Initial_Duration=GuardBand_Before_Initial*8/BitRate;
- Fill(Stream_Audio, StreamPos_Last, "GuardBand_Before", GuardBand_Before_Initial_Duration, 9);
- Fill(Stream_Audio, StreamPos_Last, "GuardBand_Before/String", Ztring::ToZtring(GuardBand_Before_Initial_Duration*1000000, 0)+Ztring().From_UTF8(" \xC2xB5s")); //0xC2 0xB5 = micro sign
- (*Stream_More)[Stream_Audio][StreamPos_Last](Ztring().From_Local("GuardBand_Before"), Info_Options)=__T("N NT");
- (*Stream_More)[Stream_Audio][StreamPos_Last](Ztring().From_Local("GuardBand_Before/String"), Info_Options)=__T("N NT");
- }
- if (GuardBand_Before_Initial)
- {
- float GuardBand_After_Initial_Duration=GuardBand_After_Initial*8/BitRate;
- Fill(Stream_Audio, StreamPos_Last, "GuardBand_After", GuardBand_After_Initial_Duration, 9);
- Fill(Stream_Audio, StreamPos_Last, "GuardBand_After/String", Ztring::ToZtring(GuardBand_After_Initial_Duration*1000000, 0)+Ztring().From_UTF8(" \xC2xB5s")); //0xC2 0xB5 = micro sign
- (*Stream_More)[Stream_Audio][StreamPos_Last](Ztring().From_Local("GuardBand_After"), Info_Options)=__T("N NT");
- (*Stream_More)[Stream_Audio][StreamPos_Last](Ztring().From_Local("GuardBand_After/String"), Info_Options)=__T("N NT");
- }
- }
- }
- Fill(Stream_General, 0, General_OverallBitRate, Element_Size*8*Mpegv_frame_rate[FrameRate], 0);
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_DolbyE::Synchronize()
-{
- //Synchronizing
- while (Buffer_Offset+32<=Buffer_Size)
- {
- if ((CC2(Buffer+Buffer_Offset_Temp)&0xFFFE)==0x078E) //16-bit
- {
- BitDepth=16;
- ScrambledBitStream=(CC2(Buffer+Buffer_Offset)&0x0001)?true:false;
- break; //while()
- }
- if ((CC3(Buffer+Buffer_Offset)&0xFFFFE0)==0x0788E0) //20-bit
- {
- BitDepth=20;
- ScrambledBitStream=(CC3(Buffer+Buffer_Offset)&0x000010)?true:false;
- break; //while()
- }
- if ((CC3(Buffer+Buffer_Offset)&0xFFFFFE)==0x07888E) //24-bit
- {
- BitDepth=24;
- ScrambledBitStream=(CC3(Buffer+Buffer_Offset)&0x000001)?true:false;
- break; //while()
- }
- Buffer_Offset++;
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+8>Buffer_Size)
- return false;
-
- //Synched
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_DolbyE::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+32>Buffer_Size)
- return false;
-
- //Quick test of synchro
- switch (BitDepth)
- {
- case 16 : if ((CC2(Buffer+Buffer_Offset)&0xFFFE )!=0x078E ) {Synched=false; return true;} break;
- case 20 : if ((CC3(Buffer+Buffer_Offset)&0xFFFFE0)!=0x0788E0) {Synched=false; return true;} break;
- case 24 : if ((CC3(Buffer+Buffer_Offset)&0xFFFFFE)!=0x07888E) {Synched=false; return true;} break;
- default : ;
- }
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DolbyE::Header_Parse()
-{
- //Filling
- if (IsSub)
- Header_Fill_Size(Buffer_Size-Buffer_Offset);
- else
- {
- //Looking for synchro
- //Synchronizing
- Buffer_Offset_Temp=Buffer_Offset+3;
- if (BitDepth==16)
- while (Buffer_Offset_Temp+2<=Buffer_Size)
- {
- if ((CC2(Buffer+Buffer_Offset_Temp)&0xFFFE)==0x078E) //16-bit
- break; //while()
- Buffer_Offset_Temp++;
- }
- if (BitDepth==20)
- while (Buffer_Offset_Temp+3<=Buffer_Size)
- {
- if ((CC3(Buffer+Buffer_Offset_Temp)&0xFFFFE0)==0x0788E0) //20-bit
- break; //while()
- Buffer_Offset_Temp++;
- }
- if (BitDepth==24)
- while (Buffer_Offset_Temp+3<=Buffer_Size)
- {
- if ((CC3(Buffer+Buffer_Offset_Temp)&0xFFFFFE)==0x07888E) //24-bit
- break; //while()
- Buffer_Offset_Temp++;
- }
-
- if (Buffer_Offset_Temp+(BitDepth>16?3:2)>Buffer_Size)
- {
- if (File_Offset+Buffer_Size==File_Size)
- Buffer_Offset_Temp=Buffer_Size;
- else
- {
- Element_WaitForMoreData();
- return;
- }
- }
-
- Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
- }
- Header_Fill_Code(0, "Frame");
-}
-
-//---------------------------------------------------------------------------
-void File_DolbyE::Data_Parse()
-{
- //In case of scrambling
- const int8u* Save_Buffer=NULL;
- size_t Save_Buffer_Offset=0;
- int64u Save_File_Offset=0;
- if (ScrambledBitStream)
- {
- //We must change the buffer,
- Save_Buffer=Buffer;
- Save_Buffer_Offset=Buffer_Offset;
- Save_File_Offset=File_Offset;
- File_Offset+=Buffer_Offset;
- Buffer_Offset=0;
- Descrambled_Buffer=new int8u[(size_t)Element_Size];
- std::memcpy(Descrambled_Buffer, Save_Buffer+Save_Buffer_Offset, (size_t)Element_Size);
- Buffer=Descrambled_Buffer;
- }
-
- //Parsing
- BS_Begin();
- Block();
- BS_End();
-
- //In case of scrambling
- if (ScrambledBitStream)
- {
- delete[] Buffer; Buffer=Save_Buffer;
- Buffer_Offset=Save_Buffer_Offset;
- File_Offset=Save_File_Offset;
- }
-
- FILLING_BEGIN();
- if (!Status[IsAccepted])
- {
- Accept("Dolby E");
-
- //Guard band
- GuardBand_Before_Initial=GuardBand_Before;
- GuardBand_After_Initial=GuardBand_After;
- }
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- if (Mpegv_frame_rate[FrameRate])
- FrameInfo.DUR=float64_int64s(1000000000/Mpegv_frame_rate[FrameRate]);
- else
- FrameInfo.DUR=(int64u)-1;
- if (FrameInfo.DTS!=(int64u)-1)
- FrameInfo.PTS=FrameInfo.DTS+=FrameInfo.DUR;
- if (Frame_Count==1)
- {
- Finish("Dolby E");
- }
- FILLING_END();
- if (Frame_Count==0 && Buffer_TotalBytes>Buffer_TotalBytes_FirstSynched_Max)
- Reject("Dolby E");
-}
-
-//---------------------------------------------------------------------------
-void File_DolbyE::Block()
-{
- //Parsing
- Skip_S3(BitDepth, "Synchro");
- if (ScrambledBitStream)
- {
- //We must change the buffer
- switch (BitDepth)
- {
- case 16 :
- if (!Descramble_16bit())
- return;
- break;
- case 20 :
- if (!Descramble_20bit())
- return;
- break;
- case 24 :
- if (!Descramble_24bit())
- return;
- break;
- default : ;
- }
- }
- Skip_S2(14, "Unknown");
- Get_S1 ( 6, ProgramConfiguration, "Program configuration"); Param_Info1(DolbyE_ChannelPositions[ProgramConfiguration]);
- Get_S1 ( 4, FrameRate, "Frame rate 1"); Param_Info3(Mpegv_frame_rate[FrameRate], 3, " fps");
- Skip_S1( 4, "Frame rate 2? Always same as Frame rate 1");
- Skip_S2(16, "Frame number?");
- Element_Begin1("SMPTE time code?");
- int8u Frames_Units, Frames_Tens, Seconds_Units, Seconds_Tens, Minutes_Units, Minutes_Tens, Hours_Units, Hours_Tens;
- bool DropFrame;
-
- Skip_S1(4, "BG8");
- Skip_S1(4, "BG7");
-
- Skip_SB( "BGF2 / Field Phase");
- Skip_SB( "BGF1");
- Get_S1 (2, Hours_Tens, "Hours (Tens)");
- Get_S1 (4, Hours_Units, "Hours (Units)");
-
- Skip_S1(4, "BG6");
- Skip_S1(4, "BG5");
-
- Skip_SB( "BGF0 / BGF2");
- Get_S1 (3, Minutes_Tens, "Minutes (Tens)");
- Get_S1 (4, Minutes_Units, "Minutes (Units)");
-
- Skip_S1(4, "BG4");
- Skip_S1(4, "BG3");
-
- Skip_SB( "FP - Field Phase / BGF0");
- Get_S1 (3, Seconds_Tens, "Seconds (Tens)");
- Get_S1 (4, Seconds_Units, "Seconds (Units)");
-
- Skip_S1(4, "BG2");
- Skip_S1(4, "BG1");
-
- Skip_SB( "CF - Color fame");
- Get_SB ( DropFrame, "DP - Drop frame");
- Get_S1 (2, Frames_Tens, "Frames (Tens)");
- Get_S1 (4, Frames_Units, "Frames (Units)");
-
- Skip_BS(Data_BS_Remain(), "Unknown");
-
- if (Hours_Tens<3)
- {
- int64u TimeCode=(int64u)(Hours_Tens *10*60*60*1000
- + Hours_Units *60*60*1000
- + Minutes_Tens *10*60*1000
- + Minutes_Units *60*1000
- + Seconds_Tens *10*1000
- + Seconds_Units *1000
- + (Mpegv_frame_rate[FrameRate]?float64_int32s((Frames_Tens*10+Frames_Units)*1000/Mpegv_frame_rate[FrameRate]):0));
-
- Element_Info1(Ztring().Duration_From_Milliseconds(TimeCode));
-
- //TimeCode
- if (SMPTE_time_code_StartTimecode==(int64u)-1)
- SMPTE_time_code_StartTimecode=TimeCode;
- }
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_DolbyE::Descramble_16bit ()
-{
- int16u ScrambleMask;
- Get_S2 (16, ScrambleMask, "Scramble mask");
- int16u Size=((BigEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Size-Data_BS_Remain()/8)^ScrambleMask)>>2)&0x3FF;
-
- if (Data_BS_Remain()<(size_t)((Size+1)*BitDepth)) //+1 for additional unknown word
- return false; //There is a problem
-
- int8u* Temp=Descrambled_Buffer+(size_t)Element_Size-Data_BS_Remain()/8;
- for (int16u Pos=0; Pos<Size; Pos++)
- int16u2BigEndian(Temp+Pos*2, BigEndian2int16u(Temp+Pos*2)^ScrambleMask);
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_DolbyE::Descramble_20bit ()
-{
- int32u ScrambleMask;
- Get_S3 (20, ScrambleMask, "Scramble mask");
- int16u Size=((BigEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Size-Data_BS_Remain()/8)^(ScrambleMask>>4))>>2)&0x3FF;
-
- if (Data_BS_Remain()<(size_t)((Size+1)*BitDepth)) //+1 for additional unknown word
- return false; //There is a problem
-
- int8u* Temp=Descrambled_Buffer+(size_t)Element_Size-Data_BS_Remain()/8;
- int64u ScrambleMasks=(((int64u)ScrambleMask)<<20)|ScrambleMask;
- bool Half;
- if (Data_BS_Remain()%8)
- {
- Temp--;
- int24u2BigEndian(Temp, BigEndian2int24u(Temp)^(ScrambleMask));
- Half=true;
- }
- else
- Half=false;
- for (int16u Pos=0; Pos<Size-(Half?1:0); Pos+=2)
- int40u2BigEndian(Temp+(Half?3:0)+Pos*5/2, BigEndian2int40u(Temp+(Half?3:0)+Pos*5/2)^ScrambleMasks);
- if ((Size-((Size && Half)?1:0))%2==0)
- int24u2BigEndian(Temp+(Half?3:0)+(Size-((Size && Half)?1:0))*5/2, BigEndian2int24u(Temp+(Half?3:0)+(Size-((Size && Half)?1:0))*5/2)^(((int32u)ScrambleMasks)<<4));
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_DolbyE::Descramble_24bit ()
-{
- int32u ScrambleMask;
- Get_S3 (24, ScrambleMask, "Scramble mask");
- int32u Size=((BigEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Size-Data_BS_Remain()/8)^ScrambleMask)>>2)&0x3FF;
-
- if (Data_BS_Remain()<(size_t)((Size+1)*BitDepth)) //+1 for additional unknown word
- return false; //There is a problem
-
- int8u* Temp=Descrambled_Buffer+(size_t)Element_Size-Data_BS_Remain()/8;
- for (int16u Pos=0; Pos<Size; Pos++)
- int24u2BigEndian(Temp+Pos*2, BigEndian2int24u(Temp+Pos*2)^ScrambleMask);
-
- return true;
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_DOLBYE_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_DolbyE.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_DolbyE.h
deleted file mode 100644
index 0ab35e6f6..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_DolbyE.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Dolby E files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DolbyEH
-#define MediaInfo_File_DolbyEH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_DolbyE
-//***************************************************************************
-
-class File_DolbyE : public File__Analyze
-{
-public :
- //In
- int64u GuardBand_Before;
- int64u GuardBand_After;
-
- //Constructor/Destructor
- File_DolbyE();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Block();
-
- //Helpers
- bool Descramble_16bit();
- bool Descramble_20bit();
- bool Descramble_24bit();
-
- //Temp
- int64u SMPTE_time_code_StartTimecode;
- int8u ProgramConfiguration;
- int8u FrameRate;
- int8u BitDepth;
- bool ScrambledBitStream;
- int8u* Descrambled_Buffer; //Used in case of scrambled bitstream
- int64u GuardBand_Before_Initial;
- int64u GuardBand_After_Initial;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Dts.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Dts.cpp
deleted file mode 100644
index b608d12f3..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Dts.cpp
+++ /dev/null
@@ -1,1407 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DTS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Dts.h"
-#include "ZenLib/Utils.h"
-#include "ZenLib/BitStream.h"
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-#include <algorithm>
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* DTS_FrameType[]=
-{
- "Termination",
- "Normal",
-};
-
-//---------------------------------------------------------------------------
-const int32u DTS_SamplingRate[]=
-{
- 0, 8000, 16000, 32000, 0, 0, 11025, 22050,
- 44100, 0, 0, 12000, 24000, 48000, 96000, 192000,
-};
-
-//---------------------------------------------------------------------------
-const int32u DTS_BitRate[]=
-{
- 32000, 56000, 64000, 96000, 112000, 128000, 192000, 224000,
- 256000, 320000, 384000, 448000, 512000, 576000, 640000, 754500,
- 960000, 1024000, 1152000, 1280000, 1344000, 1408000, 1411200, 1472000,
- 1509750, 1920000, 2048000, 3072000, 3840000, 0, 0, 0,
-};
-
-//---------------------------------------------------------------------------
-const int8u DTS_Channels[]=
-{
- 1, 2, 2, 2, 2, 3, 3, 4,
- 4, 5, 6, 6, 6, 7, 8, 8,
-};
-
-//---------------------------------------------------------------------------
-const int8u DTS_Resolution[]=
-{16, 20, 24, 24};
-
-//---------------------------------------------------------------------------
-const char* DTS_ChannelPositions[16]=
-{
- "Front: C",
- "Front: C C",
- "Front: L R",
- "Front: L R",
- "Front: L R",
- "Front: L C R",
- "Front: L R, Back: C",
- "Front: L C R, Back: C",
- "Front: L R, Side: L R",
- "Front: L C R, Side: L R",
- "Front: L C C R, Side: L R",
- "Front: L C R, Side: L R",
- "Front: L R, Side: L R, Back: L R",
- "Front: L C R, Side: L R, Back: L R",
- "Front: L R, Side: L R, Back: L C C R",
- "Front: L C R, Side: L R, Back: L C R",
-};
-
-//---------------------------------------------------------------------------
-const char* DTS_ChannelPositions2[16]=
-{
- "1/0/0",
- "2/0/0",
- "2/0/0",
- "2/0/0",
- "2/0/0",
- "3/0/0",
- "2/1/0",
- "3/1/0",
- "2/2/0",
- "3/2/0",
- "4/2/0",
- "3/2/0",
- "2/2/2",
- "3/2/2",
- "2/2/4",
- "3/2/3",
-};
-
-//---------------------------------------------------------------------------
-const char* DTS_ChannelLayout[16]=
-{
- "C",
- "1+1",
- "L R",
- "L R",
- "Lt Rt",
- "C L R",
- "L R Cs",
- "C L R Cs",
- "L R Ls Rs",
- "C L R Ls Rs",
- "Cl Cr L R Ls Rs",
- "C L R Ls Rs",
- "C L R Ls Rs Rls Rrs",
- "C L R Ls Rs Rls Rrs",
- "L R Ls Rs Rls Cs Cs Rrs",
- "C L R Ls Rs Rls Cs Rrs",
-};
-
-//---------------------------------------------------------------------------
-const char* DTS_ExtensionAudioDescriptor[]=
-{
- "Channel Extension",
- "Reserved",
- "Frequency Extension",
- "Channel Extension + Frequency Extension",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* DTS_HD_RefClockCode[]=
-{
- "1/32000",
- "1/44100",
- "1/48000",
- "",
-};
-
-//---------------------------------------------------------------------------
-std::string DTS_HD_SpeakerActivityMask (int16u SpeakerActivityMask)
-{
- std::string Text;
- if ((SpeakerActivityMask&0x0003)==0x0003)
- Text+="Front: L C R";
- else
- {
- if (SpeakerActivityMask&0x0001)
- Text+="Front: C";
- if (SpeakerActivityMask&0x0002)
- Text+="Front: L R";
- }
-
- if (SpeakerActivityMask&0x0004)
- Text+=", Side: L R";
-
- if (SpeakerActivityMask&0x0010)
- Text+=", Back: C";
-
- if ((SpeakerActivityMask&0x00A0)==0x00A0)
- Text+=", High: L C R";
- else
- {
- if (SpeakerActivityMask&0x0020)
- Text+=", High: L R";
- if (SpeakerActivityMask&0x0080)
- Text+=", High: C";
- }
-
- if (SpeakerActivityMask&0x0800)
- Text+=", Side: L R";
-
- if (SpeakerActivityMask&0x0040)
- Text+=", Back: L R";
-
- if (SpeakerActivityMask&0x0100)
- Text+=", TopCtrSrrd";
- if (SpeakerActivityMask&0x0200)
- Text+=", Ctr: L R";
- if (SpeakerActivityMask&0x0400)
- Text+=", Wide: L R";
- if (SpeakerActivityMask&0x2000)
- Text+=", HiSide: L R";
-
- if ((SpeakerActivityMask&0xC000)==0x0C000)
- Text+=", HiRear: L C R";
- else
- {
- if (SpeakerActivityMask&0x4000)
- Text+=", HiRear: C";
- if (SpeakerActivityMask&0x8000)
- Text+=", HiRear: L R";
- }
-
- if (SpeakerActivityMask&0x0008)
- Text+=", LFE";
- if (SpeakerActivityMask&0x1000)
- Text+=", LFE2";
-
- return Text;
-}
-
-//---------------------------------------------------------------------------
-std::string DTS_HD_SpeakerActivityMask2 (int16u SpeakerActivityMask)
-{
- std::string Text;
- if ((SpeakerActivityMask&0x0003)==0x0003)
- Text+="3";
- else
- {
- if (SpeakerActivityMask&0x0001)
- Text+="1";
- else if (SpeakerActivityMask&0x0002)
- Text+="2";
- else
- Text+="0";
- }
-
- if (SpeakerActivityMask&0x0004)
- Text+="/2";
- else if ((SpeakerActivityMask&0x0840)==0x0000)
- Text+="/0";
-
- if (SpeakerActivityMask&0x0010)
- Text+="/1";
- else if ((SpeakerActivityMask&0x0840)==0x0000)
- Text+="/0";
-
- if ((SpeakerActivityMask&0x00A0)==0x00A0)
- Text+=".3";
- else
- {
- if (SpeakerActivityMask&0x0020)
- Text+=".2";
- if (SpeakerActivityMask&0x0080)
- Text+=".2";
- }
-
- if (SpeakerActivityMask&0x0800)
- Text+="/2";
- if (SpeakerActivityMask&0x0040)
- Text+="/2";
-
- if (SpeakerActivityMask&0x0100)
- Text+=".1";
- if (SpeakerActivityMask&0x0200)
- Text+=".2";
- if (SpeakerActivityMask&0x0400)
- Text+=".2";
- if (SpeakerActivityMask&0x2000)
- Text+=".2";
-
- if ((SpeakerActivityMask&0xC000)==0x0C000)
- Text+=".3";
- else
- {
- if (SpeakerActivityMask&0x4000)
- Text+=".1";
- if (SpeakerActivityMask&0x8000)
- Text+=".2";
- }
-
- if (SpeakerActivityMask&0x0008)
- Text+=".1";
- if (SpeakerActivityMask&0x1000)
- Text+=".1";
-
- return Text;
-}
-
-//---------------------------------------------------------------------------
-const char* DTS_HD_TypeDescriptor[]=
-{
- "Music",
- "Effects",
- "Dialog",
- "Commentary",
- "Visually Impaired",
- "Hearing Impaired",
- "Isolated Music Object",
- "Music and Effects",
- "Dialog and Commentary",
- "Effects and Commentary",
- "Isolated Music Object and Commentary",
- "Isolated Music Object and Effects",
- "Karaoke",
- "Music, Effects, Dialog",
- "Complete Audio Presentation",
- "",
-};
-
-//---------------------------------------------------------------------------
-int32u DTS_HD_MaximumSampleRate[]=
-{
- 8000,
- 16000,
- 32000,
- 64000,
- 128000,
- 22050,
- 44100,
- 88200,
- 176400,
- 352800,
- 12000,
- 24000,
- 48000,
- 96000,
- 192000,
- 384000,
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Dts::File_Dts()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("Dts");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Dts;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=32*1024;
- PTS_DTS_Needed=true;
- IsRawStream=true;
-
- //In
- Frame_Count_Valid=MediaInfoLib::Config.ParseSpeed_Get()>=0.3?32:2;
-
- //Buffer
- Save_Buffer=NULL;
-
- //Temp
- HD_size=0;
- Primary_Frame_Byte_Size=0;
- HD_SpeakerActivityMask=(int16u)-1;
- channel_arrangement=(int8u)-1;
- channel_arrangement_XCh=(int8u)-1;
- sample_frequency=(int8u)-1;
- sample_frequency_X96k=(int8u)-1;
- bit_rate=(int8u)-1;
- lfe_effects=(int8u)-1;
- bits_per_sample=(int8u)-1;
- ExtensionAudioDescriptor=(int8u)-1;
- HD_BitResolution=(int8u)-1;
- HD_MaximumSampleRate=(int8u)-1;
- HD_TotalNumberChannels=(int8u)-1;
- HD_ExSSFrameDurationCode=(int8u)-1;
- ExtendedCoding=false;
- ES=false;
- Core_Exists=false;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dts::Streams_Fill()
-{
- Fill(Stream_General, 0, General_Format, "DTS");
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "DTS");
-
- if (!Profile.empty())
- Fill(Stream_Audio, 0, Audio_Format_Profile, Profile+(Core_Exists?__T(" / Core"):__T("")));
- else if (ES)
- Fill(Stream_Audio, 0, Audio_Format_Profile, "ES");
- Fill(Stream_General, 0, General_Format_Profile, Retrieve(Stream_Audio, 0, Audio_Format_Profile));
- Fill(Stream_Audio, 0, Audio_Codec, (Profile.find(__T("MA"))==0 || Profile.find(__T("HRA"))==0)?"DTS-HD":"DTS");
-
- //HD data
- if ((ExtendedCoding && (ExtensionAudioDescriptor==0 || ExtensionAudioDescriptor==3 || ExtensionAudioDescriptor==6)))
- {
- switch(channel_arrangement_XCh)
- {
- case 1 :
- Fill(Stream_Audio, 0, Audio_Channel_s_, 7);
- Fill(Stream_Audio, 0, Audio_ChannelPositions, Ztring("Front: L C R, Side: L R, Back: C")+(lfe_effects?__T(", LFE"):__T("")));
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, Ztring("3/2/1")+(lfe_effects?__T(".1"):__T(".0")));
- break;
- case 2 :
- Fill(Stream_Audio, 0, Audio_Channel_s_, 8);
- Fill(Stream_Audio, 0, Audio_ChannelPositions, Ztring("Front: L C R, Side: L R, Back: L R")+(lfe_effects?__T(", LFE"):__T("")));
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, Ztring("3/2/2")+(lfe_effects?__T(".1"):__T(".0")));
- break;
- default:;
- }
- }
- else
- {
- if (HD_SpeakerActivityMask!=(int16u)-1)
- {
- Fill(Stream_Audio, 0, Audio_ChannelPositions, DTS_HD_SpeakerActivityMask(HD_SpeakerActivityMask).c_str());
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, DTS_HD_SpeakerActivityMask2(HD_SpeakerActivityMask).c_str());
- }
- if(HD_BitResolution!=(int8u)-1)
- Fill(Stream_Audio, 0, Audio_BitDepth, HD_BitResolution);
- if(HD_MaximumSampleRate!=(int8u)-1)
- Fill(Stream_Audio, 0, Audio_SamplingRate, DTS_HD_MaximumSampleRate[HD_MaximumSampleRate]);
- else if (sample_frequency_X96k!=(int8u)-1)
- Fill(Stream_Audio, 0, Audio_SamplingRate, DTS_SamplingRate[sample_frequency_X96k]);
- if(HD_TotalNumberChannels!=(int8u)-1)
- Fill(Stream_Audio, 0, Audio_Channel_s_, HD_TotalNumberChannels);
- if (Profile==__T("Express"))
- {
- Fill(Stream_Audio, 0, Audio_BitRate, BitRate_Get(true), 0);
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
- }
- }
-
- //Core data
- if (Core_Exists)
- {
- if ((Profile.find(__T("MA"))==0?__T("VBR"):__T("CBR"))!=Retrieve(Stream_Audio, 0, Audio_BitRate_Mode))
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, Profile.find(__T("MA"))==0?"VBR":"CBR");
- if (DTS_SamplingRate[sample_frequency]!=Retrieve(Stream_Audio, 0, Audio_SamplingRate).To_int32u())
- Fill(Stream_Audio, 0, Audio_SamplingRate, DTS_SamplingRate[sample_frequency]);
- Ztring BitRate;
- if (bit_rate<29 || Profile==__T("Express"))
- BitRate=Ztring::ToZtring(BitRate_Get(), 0);
- else if (bit_rate==29)
- BitRate=__T("Open");
- else if (bit_rate==30)
- BitRate=__T("Variable");
- else if (bit_rate==31)
- BitRate=__T("LossLess");
- if (Profile==__T("HRA"))
- Fill(Stream_Audio, 0, Audio_BitRate, BitRate_Get(true), 0);
- if ( Profile==__T("MA"))
- Fill(Stream_Audio, 0, Audio_BitRate, "Unknown");
- if (BitRate!=Retrieve(Stream_Audio, 0, Audio_BitRate))
- Fill(Stream_Audio, 0, Audio_BitRate, BitRate);
- if (Profile.find(__T("MA"))==0 || bit_rate==31)
- Fill(Stream_Audio, 0, Audio_Compression_Mode, "Lossless / Lossy", Unlimited, true, true);
-
- int8u Channels;
- Ztring ChannelPositions, ChannelPositions2, ChannelLayout;
- if (channel_arrangement<16)
- {
- Channels=DTS_Channels[channel_arrangement]+(lfe_effects?1:0);
- ChannelPositions.From_Local(DTS_ChannelPositions[channel_arrangement]);
- ChannelPositions2.From_Local(DTS_ChannelPositions2[channel_arrangement]);
- ChannelLayout.From_Local(DTS_ChannelLayout[channel_arrangement]);
- }
- else
- {
- Channels=8;
- ChannelPositions.From_Local("User defined");
- }
- if (lfe_effects)
- {
- ChannelPositions+=__T(", LFE");
- ChannelPositions2+=__T(".1");
- ChannelLayout+=__T(" LFE");
- }
- if (Channels!=Retrieve(Stream_Audio, 0, Audio_Channel_s_).To_int8u())
- Fill(Stream_Audio, 0, Audio_Channel_s_, Channels);
- if (ChannelPositions!=Retrieve(Stream_Audio, 0, Audio_ChannelPositions))
- Fill(Stream_Audio, 0, Audio_ChannelPositions, ChannelPositions);
- if (ChannelPositions2!=Retrieve(Stream_Audio, 0, Audio_ChannelPositions_String2))
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, ChannelPositions2);
- if (ChannelLayout!=Retrieve(Stream_Audio, 0, Audio_ChannelLayout))
- Fill(Stream_Audio, 0, Audio_ChannelLayout, ChannelLayout);
- if (DTS_Resolution[bits_per_sample]!=Retrieve(Stream_Audio, 0, Audio_BitDepth).To_int8u())
- Fill(Stream_Audio, 0, Audio_BitDepth, DTS_Resolution[bits_per_sample]);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Dts::Streams_Finish()
-{
- Fill(Stream_Audio, 0, Audio_Format_Settings_Endianness, BigEndian?"Big":"Little", Unlimited, true, true);
- Fill(Stream_Audio, 0, Audio_Format_Settings_Mode, Word?"16":"14", Unlimited, true, true);
-
- if (FrameInfo.PTS!=(int64u)-1 && FrameInfo.PTS>PTS_Begin)
- {
- Fill(Stream_Audio, 0, Audio_Duration, ((float64)(FrameInfo.PTS-PTS_Begin))/1000000, 0, true);
- Fill(Stream_Audio, 0, Audio_FrameCount, ((float64)(FrameInfo.PTS-PTS_Begin))/1000000/32, 0, true);
- }
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Dts::FileHeader_Begin()
-{
- //Must have enough buffer for having header
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- //False positives detection: Detect WAV files, the parser can't detect it easily, there is only 70 bytes of beginning for saying WAV
- switch (CC4(Buffer))
- {
- case 0x52494646 : //"RIFF"
- case 0x000001FD : //MPEG-PS private
- Finish("DTS");
- return false;
- default : ;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Dts::Synchronize()
-{
- //Synchronizing
- while (Buffer_Offset+6<=Buffer_Size)
- {
- if (!FrameSynchPoint_Test())
- return false; //Need more data
- if (Synched)
- break;
- Buffer_Offset++;
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+6>Buffer_Size)
- {
- if (Buffer_Offset+5==Buffer_Size)
- {
- int64u Value=CC5(Buffer+Buffer_Offset);
- if ((Value&0xFFFFFFFFFCLL)!=0x7FFE8001FCLL //16 bits and big endian Core
- && (Value&0xFFFFFFFF00LL)!=0xFE7F018000LL //16 bits and little endian Core
- && (Value&0xFFFFFFFFF7LL)!=0x1FFFE80007LL //14 bits and big endian Core
- && (Value&0xFFFFFFFFF0LL)!=0xFF1F00E8F0LL //14 bits and little endian Core
- && (Value&0xFFFFFFFF00LL)!=0x6458202500LL) //16 bits and big endian HD
- Buffer_Offset++;
- }
- if (Buffer_Offset+4==Buffer_Size)
- {
- int32u Value=CC4(Buffer+Buffer_Offset);
- if (Value!=0x7FFE8001 //16 bits and big endian Core
- && Value!=0xFE7F0180 //16 bits and little endian Core
- && Value!=0x1FFFE800 //14 bits and big endian Core
- && Value!=0xFF1F00E8 //14 bits and little endian Core
- && Value!=0x64582025) //16 bits and big endian HD
- Buffer_Offset++;
- }
- if (Buffer_Offset+3==Buffer_Size)
- {
- int32u Value=CC3(Buffer+Buffer_Offset);
- if (Value!=0x7FFE80 //16 bits and big endian Core
- && Value!=0xFE7F01 //16 bits and little endian Core
- && Value!=0x1FFFE8 //14 bits and big endian Core
- && Value!=0xFF1F00 //14 bits and little endian Core
- && Value!=0x645820) //16 bits and big endian HD
- Buffer_Offset++;
- }
- if (Buffer_Offset+2==Buffer_Size)
- {
- int16u Value=CC2(Buffer+Buffer_Offset);
- if (Value!=0x7FFE //16 bits and big endian Core
- && Value!=0xFE7F //16 bits and little endian Core
- && Value!=0x1FFF //14 bits and big endian Core
- && Value!=0xFF1F //14 bits and little endian Core
- && Value!=0x6458) //16 bits and big endian HD
- Buffer_Offset++;
- }
- if (Buffer_Offset+1==Buffer_Size)
- {
- int8u Value=CC1(Buffer+Buffer_Offset);
- if (Value!=0x7F //16 bits and big endian Core
- && Value!=0xFE //16 bits and little endian Core
- && Value!=0x1F //14 bits and big endian Core
- && Value!=0xFF //14 bits and little endian Core
- && Value!=0x64) //16 bits and big endian HD
- Buffer_Offset++;
- }
- return false;
- }
-
- //Synched
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Dts::Synched_Test()
-{
- //Padding
- while (Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]==0x00)
- Buffer_Offset++;
-
- //Must have enough buffer for having header
- if (Buffer_Offset+6>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (!FrameSynchPoint_Test())
- return false; //Need more data
- if (!Synched)
- return true;
-
- //We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Dts::Read_Buffer_Unsynched()
-{
- FrameInfo=frame_info();
-}
-
-//***************************************************************************
-// Buffer - Demux
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-bool File_Dts::Demux_UnpacketizeContainer_Test()
-{
- int32u Value=CC4(Buffer+Buffer_Offset);
- if (Value==0x7FFE8001)
- {
- int16u Size=((BigEndian2int24u(Buffer+Buffer_Offset+5)>>4)&0x3FFF)+1;
- Demux_Offset=Buffer_Offset+Size;
-
- if (Buffer_Offset+Size>Buffer_Size && File_Offset+Buffer_Size!=File_Size)
- return false; //No complete frame
-
- Demux_UnpacketizeContainer_Demux();
- }
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dts::Header_Parse()
-{
- Header_Fill_Size(Original_Size);
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dts::Data_Parse()
-{
- if (Save_Buffer)
- {
- File_Offset+=Buffer_Offset;
- swap(Buffer, Save_Buffer);
- swap(Buffer_Offset, Save_Buffer_Offset);
- swap(Buffer_Size, Save_Buffer_Size);
- if (!Word)
- Element_Size=Element_Size*14/16;
- }
-
- //Parsing
- int32u Sync;
- Get_B4 (Sync, "Sync");
- if (Sync==0x64582025)
- {
- //HD
- Element_Name("HD");
- Element_Code=1;
-
- int16u header_size;
- int8u SubStreamIndex, NumAssets, NumAudioPresent;
- bool isBlownUpHeader, StaticFieldsPresent;
- Skip_B1( "Unknown");
- BS_Begin();
- Get_S1 (2, SubStreamIndex, "Substream index");
- Get_SB (isBlownUpHeader, "Is blown up header");
- if (isBlownUpHeader)
- {
- Get_S2 (12, header_size, "Header size"); header_size++; Param_Info2(header_size, " bytes");
- Get_S3 (20, HD_size, "HD block size"); HD_size++; Param_Info2(HD_size, " bytes");
- }
- else
- {
- Get_S2 ( 8, header_size, "Header size"); header_size++; Param_Info2(header_size, " bytes");
- Get_S3 (16, HD_size, "HD block size"); HD_size++; Param_Info2(HD_size, " bytes");
- }
- TESTELSE_SB_GET(StaticFieldsPresent, "Static fields present");
- std::vector<int32u> ActiveExSSMasks;
- Info_S1(2, RefClockCode, "Reference clock code"); Param_Info1(DTS_HD_RefClockCode[RefClockCode]);
- Get_S1 (3, HD_ExSSFrameDurationCode, "ExSS frame duration code"); HD_ExSSFrameDurationCode++; Param_Info1(HD_ExSSFrameDurationCode);
- TEST_SB_SKIP( "Timestamp flag");
- Skip_S5(36, "Timestamp");
- TEST_SB_END();
- Get_S1 (3, NumAudioPresent, "Num audio present"); NumAudioPresent++; Param_Info2(NumAudioPresent, " channels");
- Get_S1 (3, NumAssets, "Num assets"); NumAssets++; Param_Info2(NumAssets, " assets");
- Element_Begin1("Active masks");
- for (int8u Pos=0; Pos<NumAudioPresent; Pos++)
- {
- int32u ActiveExSSMask;
- Get_S4 (SubStreamIndex+1, ActiveExSSMask, "Active ExSS mask");
- ActiveExSSMasks.push_back(ActiveExSSMask);
- }
- Element_End0();
- Element_Begin1("Active masks 2");
- for (int8u Pos=0; Pos<NumAudioPresent; Pos++)
- for (int8u Pos2=0; Pos2<SubStreamIndex+1; Pos2+=2)
- if (ActiveExSSMasks[Pos]%2)
- Skip_S1(8, "Active ExSS Mask");
- Element_End0();
- TEST_SB_SKIP( "Mix metadata Enabled");
- int8u Bits4MixOutMask, NumMixOutConfigs;
- Skip_S1(2, "Mix metadata adjustment level");
- Get_S1 (2, Bits4MixOutMask, "Bits4Mix out mask"); Bits4MixOutMask=4+Bits4MixOutMask*4; Param_Info2(Bits4MixOutMask, " bits");
- Get_S1 (2, NumMixOutConfigs, "Number of mix out configs"); NumMixOutConfigs++; Param_Info2(NumMixOutConfigs, " configs");
- for (int8u Pos=0; Pos<NumMixOutConfigs; Pos++)
- Skip_S1(Bits4MixOutMask, "MixOutChMask");
- TEST_SB_END();
- TESTELSE_SB_ELSE("Static fields present");
- NumAudioPresent=1;
- NumAssets=1;
- TESTELSE_SB_END();
- Asset_Sizes.clear();
- Element_Begin1("Sizes");
- for (int8u Pos=0; Pos<NumAssets; Pos++)
- {
- int32u Size;
- if (isBlownUpHeader)
- {
- Get_S3 (20, Size, "Size"); Size++; Param_Info2(Size, " bytes");
- }
- else
- {
- Get_S3 (16, Size, "Size"); Size++; Param_Info2(Size, " bytes");
- }
- Asset_Sizes.push_back(Size);
- }
- Element_End0();
- for (int8u Asset_Pos=0; Asset_Pos<NumAssets; Asset_Pos++)
- {
- Element_Begin1("Asset");
- int16u AssetSize;
- Get_S2 (9, AssetSize, "Asset size");
- AssetSize++; Param_Info2(AssetSize, " bytes?");
- Skip_S1(3, "Descriptor data for asset index");
- if (StaticFieldsPresent)
- {
- TEST_SB_SKIP( "Asset type descriptor present");
- Info_S1( 4, TypeDescriptor, "Asset type descriptor"); Param_Info1(DTS_HD_TypeDescriptor[TypeDescriptor]);
- TEST_SB_END();
- TEST_SB_SKIP( "Language descriptor present");
- Info_S3(24, LanguageDescriptor, "Language descriptor"); Param_Info1(Ztring().From_CC3(LanguageDescriptor));
- TEST_SB_END();
- TEST_SB_SKIP( "Info text present");
- int16u InfoTextByteSize;
- Get_S2(10, InfoTextByteSize, "Info text size"); InfoTextByteSize++; Param_Info2(InfoTextByteSize, "bytes");
- for (int16u Pos=0; Pos<InfoTextByteSize; Pos++)
- Skip_S1(8, "Info text");
- TEST_SB_END();
- Get_S1 (5, HD_BitResolution, "Bit resolution"); HD_BitResolution++; Param_Info2(HD_BitResolution, " bits");
- Get_S1 (4, HD_MaximumSampleRate, "Maximum sample rate"); Param_Info2(DTS_HD_MaximumSampleRate[HD_MaximumSampleRate], " Hz");
- Get_S1 (8, HD_TotalNumberChannels, "Total number of channels"); HD_TotalNumberChannels++; Param_Info2(HD_TotalNumberChannels, " channels");
- TEST_SB_SKIP( "1 to 1 map channels to speakers");
- int8u SpeakerActivityMaskBits, SpeakerRemapSetsCount;
- if (HD_TotalNumberChannels>2)
- Skip_SB( "Embedded stereo flag"); //else is 0
- if (HD_TotalNumberChannels>6)
- Skip_SB( "Embedded 6 Channels flag"); //else is 0
- TESTELSE_SB_SKIP( "Speaker mask enabled");
- Get_S1 (2, SpeakerActivityMaskBits, "Speaker activity mask bits"); Param_Info2(4+SpeakerActivityMaskBits*4, " bits");
- SpeakerActivityMaskBits=4+SpeakerActivityMaskBits*4;
- Get_S2 (SpeakerActivityMaskBits, HD_SpeakerActivityMask, "Speaker activity mask"); Param_Info1(DTS_HD_SpeakerActivityMask(HD_SpeakerActivityMask).c_str());
- TESTELSE_SB_ELSE( "Speaker mask enabled");
- SpeakerActivityMaskBits=0;
- TESTELSE_SB_END();
- Get_S1 (3, SpeakerRemapSetsCount, "Speaker remap sets count");
- for (int8u Pos=0; Pos<SpeakerRemapSetsCount; Pos++)
- Skip_S2(SpeakerActivityMaskBits, "Standard speaker layout mask");
- for (int8u Pos=0; Pos<SpeakerRemapSetsCount; Pos++)
- {
- int8u NumDecCh4Remap;
- Get_S1(5, NumDecCh4Remap, "NumDecCh4Remap");
- //Not finnished!
- }
- TEST_SB_END();
- Element_End0();
- }
- }
- BS_End();
- Skip_XX(header_size-Element_Offset, "Unknown");
- }
- else
- {
- //Frame
- Element_Name("Frame");
- Element_Code=0;
-
- int8u EncoderSoftwareRevision;
- bool crc_present;
- BS_Begin();
- Info_SB( FrameType, "Frame Type"); Param_Info1(DTS_FrameType[FrameType]);
- Skip_S1( 5, "Deficit Sample Count");
- Get_SB ( crc_present, "CRC Present");
- Get_S2 ( 7, Number_Of_PCM_Sample_Blocks, "Number of PCM Sample Blocks");
- Number_Of_PCM_Sample_Blocks++;
- Get_S2 (14, Primary_Frame_Byte_Size, "Primary Frame Byte Size minus 1");
- Primary_Frame_Byte_Size++;
- if (!Word)
- Primary_Frame_Byte_Size=Primary_Frame_Byte_Size*16/14; //Word is on 14 bits
- Param_Info2(Primary_Frame_Byte_Size, " bytes");
- Get_S1 ( 6, channel_arrangement, "Audio Channel Arrangement"); Param_Info2(DTS_Channels[channel_arrangement], " channels");
- Get_S1 ( 4, sample_frequency, "Core Audio Sampling Frequency"); Param_Info2(DTS_SamplingRate[sample_frequency], " Hz");
- Get_S1 ( 5, bit_rate, "Transmission Bit Rate"); Param_Info2(DTS_BitRate[bit_rate], " bps");
- Skip_SB( "Embedded Down Mix Enabled");
- Skip_SB( "Embedded Dynamic Range");
- Skip_SB( "Embedded Time Stamp");
- Skip_SB( "Auxiliary Data");
- Skip_SB( "HDCD");
- Get_S1 ( 3, ExtensionAudioDescriptor, "Extension Audio Descriptor"); Param_Info1(DTS_ExtensionAudioDescriptor[ExtensionAudioDescriptor]);
- Get_SB ( ExtendedCoding, "Extended Coding");
- Skip_SB( "Audio Sync Word Insertion");
- Get_S1 ( 2, lfe_effects, "Low Frequency Effects");
- Skip_SB( "Predictor History");
- if (crc_present)
- Skip_S2(16, "Header CRC Check");
- Skip_SB( "Multirate Interpolator");
- Get_S1 ( 4, EncoderSoftwareRevision, "Encoder Software Revision");
- Skip_S1( 2, "Copy History");
- Get_S1 ( 2, bits_per_sample, "Source PCM Resolution"); Param_Info1(Ztring::ToZtring(DTS_Resolution[bits_per_sample])+__T(" bits"));
- Get_SB ( ES, "ES");
- Skip_SB( "Front Sum/Difference");
- Skip_SB( "Surrounds Sum/Difference");
- Skip_S1( 4, "Dialog Normalisation Parameter");
- switch (EncoderSoftwareRevision)
- {
- case 6 :
- Skip_S1( 4, "Dialog Normalisation Parameter");
- break;
- case 7 :
- Skip_S1( 4, "Dialog Normalisation Parameter");
- break;
- default :
- Skip_S1( 4, "Unspecified");
- break;
- }
- BS_End();
- }
-
- //Name
- Element_Info1(Ztring::ToZtring(Frame_Count));
-
- //PTS
- Element_Info1C((FrameInfo.PTS!=(int64u)-1), __T("PTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.PTS)/1000000)));
-
- //Counting
- if (File_Offset+Buffer_Offset+Element_Size==File_Size)
- Frame_Count_Valid=Frame_Count; //Finish frames in case of there are less than Frame_Count_Valid frames
- if (Element_Code==0 || !Core_Exists)
- {
- if (Frame_Count==0)
- PTS_Begin=FrameInfo.PTS;
- Frame_Count++;
- Frame_Count_InThisBlock++;
- float64 BitRate=BitRate_Get();
- if (BitRate)
- {
- FrameInfo.DUR=float64_int64s(((float64)(Element_Size+Header_Size))*8/BitRate*1000000000);
- if (FrameInfo.DTS!=(int64u)-1)
- FrameInfo.DTS+=FrameInfo.DUR;
- if (FrameInfo.PTS!=(int64u)-1)
- FrameInfo.PTS=FrameInfo.DTS;
- }
- }
-
- //If filled
- if (Status[IsFilled])
- {
- //Little Endian and 14-bit streams management
- if (Save_Buffer)
- {
- delete[] Buffer;
- Buffer=Save_Buffer; Save_Buffer=NULL;
- Buffer_Offset=Save_Buffer_Offset;
- Buffer_Size=Save_Buffer_Size;
- File_Offset-=Buffer_Offset;
- if (!Word)
- Element_Size=Element_Size*16/14;
- }
-
- Skip_XX(Element_Size-Element_Offset, "Data");
- return;
- }
-
- //Parsing
- switch(Element_Code)
- {
- case 0 : Core(); break;
- case 1 : HD(); break;
- default : Skip_XX(Element_Size, "Data");
- }
-
- //Little Endian and 14-bit streams management
- if (Save_Buffer)
- {
- delete[] Buffer;
- Buffer=Save_Buffer; Save_Buffer=NULL;
- Buffer_Offset=Save_Buffer_Offset;
- Buffer_Size=Save_Buffer_Size;
- File_Offset-=Buffer_Offset;
- if (!Word)
- Element_Size=Element_Size*16/14;
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dts::Core()
-{
- Element_Name("Frame");
-
- //It exists (not in XSA streams)
- Core_Exists=true;
-
- //Looking for extensions
- int64u Core_Size=Element_Size, XCh_Sync=Element_Size, XXCh_Sync=Element_Size, X96k_Sync=Element_Size;
- if (ExtendedCoding)
- {
- //XCh
- if (ExtensionAudioDescriptor==0 || ExtensionAudioDescriptor==3)
- for (size_t Pos=0; Pos+4<=Element_Size; Pos++)
- if (CC4(Buffer+Buffer_Offset+Pos)==0x5A5A5A5A)
- XCh_Sync=Pos;
-
- //XXCh
- if (ExtensionAudioDescriptor==6)
- for (size_t Pos=0; Pos+4<=Element_Size; Pos++)
- if (CC4(Buffer+Buffer_Offset+Pos)==0x47004A03)
- XXCh_Sync=Pos;
-
- //X96k
- if (ExtensionAudioDescriptor==2 || ExtensionAudioDescriptor==3)
- for (size_t Pos=0; Pos+4<=Element_Size; Pos++)
- if (CC4(Buffer+Buffer_Offset+Pos)==0x1D95F262)
- X96k_Sync=Pos;
-
- //Finding core size
- if (XCh_Sync<Core_Size)
- Core_Size=XCh_Sync;
- if (XXCh_Sync<Core_Size)
- Core_Size=XXCh_Sync;
- if (X96k_Sync<Core_Size)
- Core_Size=X96k_Sync;
- }
-
- //Parsing
- Skip_XX(Core_Size-Element_Offset, "Core data");
- if (ExtendedCoding && (ExtensionAudioDescriptor==2 || ExtensionAudioDescriptor==3))
- {
- Element_Begin0();
- Skip_B4( "Magic");
- Core_X96k(XCh_Sync-Element_Offset);
- Element_End0();
- }
- if (ExtendedCoding && (ExtensionAudioDescriptor==0 || ExtensionAudioDescriptor==3))
- {
- Element_Begin0();
- Skip_B4( "Magic");
- Core_XCh(Element_Size-Element_Offset);
- Element_End0();
- }
- if (ExtendedCoding && ExtensionAudioDescriptor==6)
- {
- Element_Begin0();
- Skip_B4( "Magic");
- Core_XXCh(Element_Size-Element_Offset);
- Element_End0();
- }
-
- //Filling
- FILLING_BEGIN();
- if (Count_Get(Stream_Audio)==0 && Frame_Count>=Frame_Count_Valid)
- {
- Accept("DTS");
- Fill("DTS");
-
- //No more need data
- if (!IsSub && MediaInfoLib::Config.ParseSpeed_Get()<1)
- Finish("DTS");
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dts::Core_XCh(int64u Size)
-{
- //Parsing
- Element_Name("XCh (6.1 channels)");
- int16u XChFSIZE;
- int8u AMODE;
- BS_Begin();
- Get_S2 (10, XChFSIZE, "Primary Frame Byte Size");
- Get_S1 ( 4, AMODE, "Extension Channel Arrangement");
- BS_End();
- if (XChFSIZE==Element_Size-(Element_Offset-6))
- XChFSIZE--; //Compatibility reason (from specs)
- if ((int64u)XChFSIZE+1-6<=Size-2)
- Skip_XX(XChFSIZE+1-6, "XCh data");
- else
- Skip_XX(Size-2, "XCh data (with problem)");
-
- FILLING_BEGIN();
- channel_arrangement_XCh=AMODE;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dts::Core_XXCh(int64u Size)
-{
- Element_Name("XXCh (6.1 or 7.1 channels)");
- int8u ChannelsAdded;
- BS_Begin();
- Skip_S1 (8, "?");
- Get_S1 (2, ChannelsAdded, "Channels added?");
- Skip_S1 (6, "?");
- BS_End();
- Skip_XX(Size-2, "Data");
-
- FILLING_BEGIN();
- channel_arrangement_XCh=ChannelsAdded;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dts::Core_X96k(int64u Size)
-{
- //Parsing
- Element_Name("X96k (96 KHz)");
- int16u FSIZE96;
- int8u REVNO;
- BS_Begin();
- Get_S2 (12, FSIZE96, "96 kHz Extension Frame Byte Data Size");
- Get_S1 ( 4, REVNO, "Revision Number");
- BS_End();
- Skip_XX(Size-2, "X96k data"); //FSIZE96 is until end, not X96k size
-
- FILLING_BEGIN();
- sample_frequency_X96k=14; //96KHz
- Profile="96/24";
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dts::HD()
-{
- //Parsing
- while (Element_Offset<Element_Size)
-
- {
- //Looking for size
- int64u Next=Element_Offset+4;
- while (Next+4<=Element_Size)
- {
- int32u CC=CC4(Buffer+Buffer_Offset+(size_t)Next);
- if (CC==0x0A801921
- || CC==0x1D95F262
- || CC==0x41A29547
- || CC==0x47004A03
- || CC==0x5A5A5A5A
- || CC==0x655E315E)
- break;
- Next++;
- }
- if (Next+4>Element_Size)
- Next=Element_Size;
-
- Element_Begin0();
- int32u Magic;
- Get_B4 (Magic, "Magic");
- switch (Magic)
- {
- case 0x0A801921 : HD_XSA(Next-Element_Offset); break;
- case 0x1D95F262 : HD_X96k(Next-Element_Offset); break;
- case 0x41A29547 : HD_XLL(Next-Element_Offset); break;
- case 0x47004A03 : HD_XXCh(Next-Element_Offset); break;
- case 0x5A5A5A5A : HD_XCh(Next-Element_Offset); break;
- case 0x655E315E : HD_XBR(Next-Element_Offset); break;
- default :
- //Magic value is unknown
- if (Profile.empty())
- Profile="HD";
- Skip_XX(Next-Element_Offset, "Data");
- }
- Element_End0();
- }
-
- //Filling
- FILLING_BEGIN();
- if (Count_Get(Stream_Audio)==0 && Frame_Count>=Frame_Count_Valid)
- {
- Accept("DTS");
- Fill("DTS");
-
- //No more need data
- if (!IsSub && MediaInfoLib::Config.ParseSpeed_Get()<1)
- Finish("DTS");
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dts::HD_XCh(int64u Size)
-{
- //Parsing
- Element_Name("XCh (6.1 channels)");
- Skip_XX(Size, "Data");
-
- FILLING_BEGIN();
- channel_arrangement_XCh=1;
- if (Profile.empty())
- Profile="HRA";
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dts::HD_XXCh(int64u Size)
-{
- Element_Name("XXCh (6.1 or 7.1 channels)");
- int8u ChannelsAdded;
- BS_Begin();
- Skip_S1 (8, "?");
- Get_S1 (2, ChannelsAdded, "Channels added?");
- Skip_S1 (6, "?");
- BS_End();
- Skip_XX(Size-2, "Data");
-
- FILLING_BEGIN();
- channel_arrangement_XCh=ChannelsAdded;
- if (Profile.empty())
- Profile="HRA";
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dts::HD_X96k(int64u Size)
-{
- //Parsing
- Element_Name("X96k (96 KHz)");
- Skip_XX(Size, "Data");
-
- FILLING_BEGIN();
- sample_frequency=14; //96KHz
- Profile="HRA";
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dts::HD_XLL(int64u Size)
-{
- Element_Name("XLL (LossLess)");
- Skip_XX(Size, "Data");
-
- FILLING_BEGIN();
- Profile="MA";
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dts::HD_XBR(int64u Size)
-{
- Element_Name("XBR (BitRate extension)");
- Skip_XX(Size, "Data");
-
- FILLING_BEGIN();
- Profile="HRA";
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dts::HD_XSA(int64u Size)
-{
- Element_Name("XSA (low bitrate)");
- Skip_XX(Size, "Data");
-
- FILLING_BEGIN();
- Profile="Express";
- FILLING_END();
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-float64 File_Dts::BitRate_Get(bool WithHD)
-{
- if (bit_rate<29 || Profile==__T("Express"))
- {
- float64 BitRate;
- if (Profile==__T("Express"))
- BitRate=0; //No core bitrate
- else if (DTS_SamplingRate[sample_frequency])
- BitRate=((float64)Primary_Frame_Byte_Size)*8/(Number_Of_PCM_Sample_Blocks*32)*DTS_SamplingRate[sample_frequency]; //(float64)DTS_BitRate[bit_rate];
- else
- BitRate=0; //Problem
- if (WithHD && HD_ExSSFrameDurationCode!=(int8u)-1)
- {
- int32u SamplePerFrames=HD_ExSSFrameDurationCode;
- switch (HD_MaximumSampleRate)
- {
- case 0 : // 8000
- case 10 : // 12000
- SamplePerFrames*= 128; break;
- case 1 : // 16000
- case 5 : // 22050
- case 11 : // 24000
- SamplePerFrames*= 256; break;
- case 2 : // 32000
- case 6 : // 44100
- case 12 : // 48000
- SamplePerFrames*= 512; break;
- case 3 : // 64000
- case 7 : // 88200
- case 13 : // 96000
- SamplePerFrames*=1024; break;
- case 4 : //128000
- case 8 : //176400
- case 14 : //192000
- SamplePerFrames*=2048; break;
- case 9 : //352800
- case 15 : //384000
- SamplePerFrames*=4096; break;
- default : SamplePerFrames= 0; break; //Can never happen (4 bits)
- }
- if (SamplePerFrames)
- BitRate+=((float64)HD_size)*8*DTS_HD_MaximumSampleRate[HD_MaximumSampleRate]/SamplePerFrames;
- }
- //if (Primary_Frame_Byte_Size && Profile==__T("HRA"))
- // BitRate*=1+((float64)HD_size)/Primary_Frame_Byte_Size; //HD block are not in the nominal bitrate
- return BitRate;
- }
- else
- return 0;
-}
-
-//---------------------------------------------------------------------------
-bool File_Dts::FrameSynchPoint_Test()
-{
- if (Save_Buffer)
- return true; //Test already made by Synchronize()
-
- int64u Value=CC6(Buffer+Buffer_Offset);
- if ((Value&0xFFFFFFFFFC00LL)==0x7FFE8001FC00LL //16 bits and big endian Core
- || (Value&0xFFFFFFFF00FCLL)==0xFE7F018000FCLL //16 bits and little endian Core
- || (Value&0xFFFFFFFFF7F0LL)==0x1FFFE80007F0LL //14 bits and big endian Core
- || (Value&0xFFFFFFFFF0F7LL)==0xFF1F00E8F007LL //14 bits and little endian Core
- || (Value&0xFFFFFFFF0000LL)==0x645820250000LL) //16 bits and big endian HD
- {
- //Configuration - 14 bits or Little Endian
- switch (Buffer[Buffer_Offset])
- {
- default : Word=true; BigEndian=true; break; //16 bits and big endian bitstream
- case 0xFE : Word=true; BigEndian=false; break; //16 bits and little endian bitstream
- case 0x1F : Word=false; BigEndian=true; break; //14 bits and big endian bitstream
- case 0xFF : Word=false; BigEndian=false; break; //14 bits and little endian bitstream
- }
-
- int32u Size;
- if (Buffer[Buffer_Offset]==0x64) //HD
- {
- if (Buffer_Offset+10>Buffer_Size)
- return false; //Need more data
-
- bool isBlownUpHeader=(Buffer[Buffer_Offset+5]&0x20)?true:false;
- if (isBlownUpHeader)
- Size=((Buffer[Buffer_Offset+6]&0x01)<<19)
- | ( Buffer[Buffer_Offset+7] <<11)
- | ( Buffer[Buffer_Offset+8] << 3)
- | ( Buffer[Buffer_Offset+9] >> 5);
- else
- Size=((Buffer[Buffer_Offset+6]&0x1F)<<13)
- | ( Buffer[Buffer_Offset+7] << 3)
- | ( Buffer[Buffer_Offset+8] >> 5);
- Size++;
- Original_Size=Size;
- }
- else
- {
- if (Word)
- {
- if (BigEndian)
- Size=((Buffer[Buffer_Offset+5]&0x03)<<12)
- | ( Buffer[Buffer_Offset+6] << 4)
- | ( Buffer[Buffer_Offset+7] >> 4);
- else
- Size=((Buffer[Buffer_Offset+4]&0x03)<<12)
- | ( Buffer[Buffer_Offset+7] << 4)
- | ( Buffer[Buffer_Offset+6] >> 4);
- Size++;
- Original_Size=Size;
- }
- else
- {
- if (BigEndian)
- Size=((Buffer[Buffer_Offset+6]&0x03)<<12)
- | ( Buffer[Buffer_Offset+7] << 4)
- | ((Buffer[Buffer_Offset+8]&0x3C)>> 2);
- else
- Size=((Buffer[Buffer_Offset+7]&0x03)<<12)
- | ( Buffer[Buffer_Offset+6] << 4)
- | ((Buffer[Buffer_Offset+9]&0x3C)>> 2);
- Size++;
- Original_Size=Size*16/14;
- }
- }
- if (Buffer_Offset+Size>Buffer_Size)
- return false; //Need more data
-
- if (!Word || !BigEndian)
- {
- Save_Buffer=Buffer;
- Save_Buffer_Offset=Buffer_Offset;
- Save_Buffer_Size=Buffer_Size;
-
- //Preparing new buffer
- if (Word)
- {
- int8u* Buffer_Little=new int8u[Size];
- for (size_t Pos=0; Pos+1<Size; Pos+=2)
- {
- Buffer_Little[Pos+1]=Save_Buffer[Buffer_Offset+Pos ];
- Buffer_Little[Pos ]=Save_Buffer[Buffer_Offset+Pos+1];
- }
- Save_Buffer=Buffer_Little;
- Save_Buffer_Offset=0;
- Save_Buffer_Size=Size;
- }
- else
- {
- int8u* Dest=new int8u[Size];
- for (size_t Pos=0; Pos+8<=Original_Size; Pos+=8)
- {
- int64u Value;
- if (BigEndian)
- Value =(((int64u)( BigEndian2int16u(Buffer+Buffer_Offset+Pos )&0x3FFF))<<42)
- | (((int64u)( BigEndian2int16u(Buffer+Buffer_Offset+Pos+2)&0x3FFF))<<28)
- | (((int64u)( BigEndian2int16u(Buffer+Buffer_Offset+Pos+4)&0x3FFF))<<14)
- | (((int64u)( BigEndian2int16u(Buffer+Buffer_Offset+Pos+6)&0x3FFF)) );
- else
- Value =(((int64u)(LittleEndian2int16u(Buffer+Buffer_Offset+Pos )&0x3FFF))<<42)
- | (((int64u)(LittleEndian2int16u(Buffer+Buffer_Offset+Pos+2)&0x3FFF))<<28)
- | (((int64u)(LittleEndian2int16u(Buffer+Buffer_Offset+Pos+4)&0x3FFF))<<14)
- | (((int64u)(LittleEndian2int16u(Buffer+Buffer_Offset+Pos+6)&0x3FFF)) );
- int56u2BigEndian(Dest+Pos*14/16, Value);
- }
- Save_Buffer=Dest;
- Save_Buffer_Offset=0;
- Save_Buffer_Size=Size;
- }
- }
-
- Synched=true;
- }
- else
- Synched=false;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-} //NameSpace
-
-#endif //MEDIAINFO_DTS_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Dts.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Dts.h
deleted file mode 100644
index 549fd1afa..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Dts.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_DtsH
-#define MediaInfo_DtsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#ifdef ES
- #undef ES //Solaris defines this somewhere
-#endif
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Dts
-//***************************************************************************
-
-class File_Dts : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
-
- //Constructor/Destructor
- File_Dts();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
- void Read_Buffer_Unsynched();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test();
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Core();
- void Core_XCh(int64u Size);
- void Core_XXCh(int64u Size);
- void Core_X96k(int64u Size);
- void HD();
- void HD_XCh(int64u Size);
- void HD_XXCh(int64u Size);
- void HD_X96k(int64u Size);
- void HD_XLL(int64u Size);
- void HD_XBR(int64u Size);
- void HD_XSA(int64u Size);
-
- //Buffer
- bool FrameSynchPoint_Test();
- const int8u* Save_Buffer;
- size_t Save_Buffer_Offset;
- size_t Save_Buffer_Size;
-
- //Temp
- std::vector<ZenLib::int32u> Asset_Sizes;
- Ztring Profile;
- int32u Original_Size;
- int32u HD_size;
- int16u Primary_Frame_Byte_Size;
- int16u Number_Of_PCM_Sample_Blocks;
- int16u HD_SpeakerActivityMask;
- int8u channel_arrangement;
- int8u channel_arrangement_XCh;
- int8u sample_frequency;
- int8u sample_frequency_X96k;
- int8u bit_rate;
- int8u lfe_effects;
- int8u bits_per_sample;
- int8u ExtensionAudioDescriptor;
- int8u HD_BitResolution;
- int8u HD_MaximumSampleRate;
- int8u HD_TotalNumberChannels;
- int8u HD_ExSSFrameDurationCode;
- bool ExtendedCoding;
- bool Word;
- bool BigEndian;
- bool ES;
- bool Core_Exists;
-
- //Helpers
- float64 BitRate_Get(bool WithHD=false);
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ExtendedModule.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ExtendedModule.cpp
deleted file mode 100644
index 9f7f17e0d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ExtendedModule.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_XM_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_ExtendedModule.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_ExtendedModule::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<38)
- return false; //Must wait for more data
-
- if (CC8(Buffer)!=0x457874656E646564LL || CC8(Buffer+8)!=0x204D6F64756C653ALL //"Extended Module: "
- || CC1(Buffer+16)!=0x20 || CC1(Buffer+37)!=0x1A)
- {
- Reject("Extended Module");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_ExtendedModule::Read_Buffer_Continue()
-{
- //Parsing
- Ztring ModuleName, TrackerName;
- int32u HeaderSize;
- int16u Length, Channels, Patterns, Instruments, Flags, Tempo, BPM;
- int8u VersionMinor, VersionMajor;
- Skip_String(17, "Signature");
- Get_Local(20, ModuleName, "Module name");
- Skip_L1( "0x1A");
- Get_Local(20, TrackerName, "Tracker name");
- Get_L1 (VersionMinor, "Version (minor)");
- Get_L1 (VersionMajor, "Version (major)");
- Get_L4 (HeaderSize, "Header size");
- Get_L2 (Length, "Song Length");
- Skip_L2( "Restart position");
- Get_L2 (Channels, "Number of channels");
- Get_L2 (Patterns, "Number of patterns");
- Get_L2 (Instruments, "Number of instruments");
- Get_L2 (Flags, "Flags");
- Get_L2 (Tempo, "Tempo");
- Get_L2 (BPM, "BPM");
- Skip_XX(256, "Pattern order table");
-
- FILLING_BEGIN();
- Accept("Extended Module");
-
- Fill(Stream_General, 0, General_Format, "Extended Module");
- Fill(Stream_General, 0, General_Format_Version, Ztring::ToZtring(VersionMajor)+__T(".")+Ztring::ToZtring(VersionMinor/10)+Ztring::ToZtring(VersionMinor%10));
- Fill(Stream_General, 0, General_Track, ModuleName.Trim(__T(' ')));
- Fill(Stream_General, 0, General_Encoded_Application, TrackerName.Trim(__T(' ')));
- Fill(Stream_General, 0, "Tempo", Tempo);
- Fill(Stream_General, 0, "BPM", BPM);
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, "Sampler, Channels", Channels);
- Fill(Stream_Audio, 0, "Sampler, Patterns", Patterns);
- Fill(Stream_Audio, 0, "Sampler, Instruments", Instruments);
-
- //No more need data
- Finish("Extended Module");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_XM_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ExtendedModule.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ExtendedModule.h
deleted file mode 100644
index 7ad78f5d0..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ExtendedModule.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Extended Module files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_ExtendedModuleH
-#define MediaInfo_File_ExtendedModuleH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_ExtendedModule
-//***************************************************************************
-
-class File_ExtendedModule : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Flac.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Flac.cpp
deleted file mode 100644
index 5aede74c2..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Flac.cpp
+++ /dev/null
@@ -1,252 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_FLAC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Flac.h"
-#include "MediaInfo/Tag/File_VorbisCom.h"
-#include "base64.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-extern const char* Id3v2_PictureType(int8u Type); //In Tag/File_Id3v2.cpp
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Flac::File_Flac()
-:File__Analyze(), File__Tags_Helper()
-{
- //File__Tags_Helper
- Base=this;
-
- //In
- VorbisHeader=false;
-
- //Temp
- Last_metadata_block=false;
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Flac::FileHeader_Begin()
-{
- if (!File__Tags_Helper::FileHeader_Begin())
- return false;
-
- //Element_Size
- if (Buffer_Size<Buffer_Offset+4+(VorbisHeader?9:0))
- return false; //Must wait for more data
-
- if (CC4(Buffer+Buffer_Offset+(VorbisHeader?9:0))!=0x664C6143) //"fLaC"
- {
- File__Tags_Helper::Finish("Flac");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Flac::FileHeader_Parse()
-{
- //Parsing
- if (VorbisHeader)
- {
- Skip_B1( "Signature");
- Skip_Local(4, "Signature");
- Skip_B1( "Major version");
- Skip_B1( "Minor version");
- Skip_B2( "Number of header");
- }
- Skip_C4( "Signature");
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Flac::Header_Parse()
-{
- //Parsing
- int32u Length;
- int8u BLOCK_TYPE;
- BS_Begin();
- Get_SB ( Last_metadata_block, "Last-metadata-block");
- Get_S1 (7, BLOCK_TYPE, "BLOCK_TYPE");
- BS_End();
- Get_B3 (Length, "Length");
-
- //Filling
- Header_Fill_Code(BLOCK_TYPE, Ztring().From_CC1(BLOCK_TYPE));
- Header_Fill_Size(Element_Offset+Length);
-}
-
-//---------------------------------------------------------------------------
-void File_Flac::Data_Parse()
-{
- #define CASE_INFO(_NAME) \
- case Flac::_NAME : Element_Info1(#_NAME); _NAME(); break;
-
- //Parsing
- switch ((int16u)Element_Code)
- {
- CASE_INFO(STREAMINFO);
- CASE_INFO(PADDING);
- CASE_INFO(APPLICATION);
- CASE_INFO(SEEKTABLE);
- CASE_INFO(VORBIS_COMMENT);
- CASE_INFO(CUESHEET);
- CASE_INFO(PICTURE);
- default : Skip_XX(Element_Size, "Data");
- }
-
- if (Last_metadata_block)
- {
- if (!IsSub)
- Fill(Stream_Audio, 0, Audio_StreamSize, File_Size-(File_Offset+Buffer_Offset+Element_Size));
-
- //No more need data
- File__Tags_Helper::Finish("Flac");
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Flac::STREAMINFO()
-{
- //Parsing
- int64u Samples;
- int32u FrameSize_Min, FrameSize_Max, SampleRate;
- int8u Channels, BitPerSample;
- Skip_B2( "BlockSize_Min"); //The minimum block size (in samples) used in the stream.
- Skip_B2( "BlockSize_Max"); //The maximum block size (in samples) used in the stream. (Minimum blocksize == maximum blocksize) implies a fixed-blocksize stream.
- Get_B3 ( FrameSize_Min, "FrameSize_Min"); //The minimum frame size (in bytes) used in the stream. May be 0 to imply the value is not known.
- Get_B3 ( FrameSize_Max, "FrameSize_Max"); //The maximum frame size (in bytes) used in the stream. May be 0 to imply the value is not known.
- BS_Begin();
- Get_S3 (20, SampleRate, "SampleRate"); //Sample rate in Hz. Though 20 bits are available, the maximum sample rate is limited by the structure of frame headers to 1048570Hz. Also, a value of 0 is invalid.
- Get_S1 ( 3, Channels, "Channels"); Param_Info2(Channels+1, " channels"); //(number of channels)-1. FLAC supports from 1 to 8 channels
- Get_S1 ( 5, BitPerSample, "BitPerSample"); Param_Info2(BitPerSample+1, " bits"); //(bits per sample)-1. FLAC supports from 4 to 32 bits per sample. Currently the reference encoder and decoders only support up to 24 bits per sample.
- Get_S5 (36, Samples, "Samples");
- BS_End();
- Skip_B16( "MD5 signature of the unencoded audio data");
-
- FILLING_BEGIN();
- if (SampleRate==0)
- return;
- File__Tags_Helper::Accept("FLAC");
-
- File__Tags_Helper::Streams_Fill();
-
- File__Tags_Helper::Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "FLAC");
- Fill(Stream_Audio, 0, Audio_Codec, "FLAC");
- if (FrameSize_Min==FrameSize_Max && FrameSize_Min!=0 ) // 0 means it is unknown
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
- else
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "VBR");
- Fill(Stream_Audio, 0, Audio_SamplingRate, SampleRate);
- Fill(Stream_Audio, 0, Audio_Channel_s_, Channels+1);
- Fill(Stream_Audio, 0, Audio_BitDepth, BitPerSample+1);
- if (!IsSub)
- Fill(Stream_Audio, 0, Audio_Duration, Samples*1000/SampleRate);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Flac::APPLICATION()
-{
- //Parsing
- Skip_C4( "Application");
- if (Element_Size>4)
- Skip_XX(Element_Size-4, "(Application specific)");
-}
-
-//---------------------------------------------------------------------------
-void File_Flac::VORBIS_COMMENT()
-{
- //Parsing
- #if defined(MEDIAINFO_VORBISCOM_YES)
- File_VorbisCom VorbisCom;
- VorbisCom.StreamKind_Specific=Stream_Audio;
- Open_Buffer_Init(&VorbisCom);
- Open_Buffer_Continue(&VorbisCom);
- File__Analyze::Finish(&VorbisCom);
- Merge(VorbisCom, Stream_General, 0, 0);
- Merge(VorbisCom, Stream_Audio, 0, 0);
- Merge(VorbisCom, Stream_Menu, 0, 0);
- #else
- Skip_XX(Element_Offset, "Data");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Flac::PICTURE()
-{
- //Parsing
- int32u PictureType, MimeType_Size, Description_Size, Data_Size;
- Ztring MimeType, Description;
- Get_B4 (PictureType, "Picture type"); Element_Info1(Id3v2_PictureType((int8u)PictureType));
- Get_B4 (MimeType_Size, "MIME type size");
- Get_Local(MimeType_Size, MimeType, "MIME type");
- Get_B4 (Description_Size, "Description size");
- Get_UTF8(Description_Size, Description, "Description");
- Skip_B4( "Width");
- Skip_B4( "Height");
- Skip_B4( "Color depth");
- Skip_B4( "Number of colors used");
- Get_B4 (Data_Size, "Data size");
- if (Element_Offset+Data_Size>Element_Size)
- return; //There is a problem
- std::string Data_Raw((const char*)(Buffer+(size_t)(Buffer_Offset+Element_Offset)), Data_Size);
- std::string Data_Base64(Base64::encode(Data_Raw));
- Skip_XX(Element_Size-Element_Offset, "Data");
-
- //Filling
- Fill(Stream_General, 0, General_Cover, "Yes");
- Fill(Stream_General, 0, General_Cover_Description, Description);
- Fill(Stream_General, 0, General_Cover_Type, Id3v2_PictureType((int8u)PictureType));
- Fill(Stream_General, 0, General_Cover_Mime, MimeType);
- Fill(Stream_General, 0, General_Cover_Data, Data_Base64);
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_FLAC_YES
-
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Flac.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Flac.h
deleted file mode 100644
index 33abd5eda..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Flac.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Flac files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_FlacH
-#define MediaInfo_File_FlacH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Flac
-//***************************************************************************
-
-class File_Flac : public File__Analyze, public File__Tags_Helper
-{
-public :
- //In
- bool VorbisHeader;
-
- //Constructor/Destructor
- File_Flac();
-
-private :
- //Streams management
- void Streams_Finish() {File__Tags_Helper::Streams_Finish();}
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Global
- void Read_Buffer_Continue() {File__Tags_Helper::Read_Buffer_Continue();}
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void STREAMINFO();
- void PADDING() {Skip_XX(Element_Size, "Data");}
- void APPLICATION();
- void SEEKTABLE() {Skip_XX(Element_Size, "Data");}
- void VORBIS_COMMENT();
- void CUESHEET() {Skip_XX(Element_Size, "Data");}
- void PICTURE();
-
- //Temp
- bool Last_metadata_block;
-};
-
-//***************************************************************************
-// Const
-//***************************************************************************
-
-namespace Flac
-{
- const int16u STREAMINFO =0x00;
- const int16u PADDING =0x01;
- const int16u APPLICATION =0x02;
- const int16u SEEKTABLE =0x03;
- const int16u VORBIS_COMMENT =0x04;
- const int16u CUESHEET =0x05;
- const int16u PICTURE =0x06;
-}
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ImpulseTracker.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ImpulseTracker.cpp
deleted file mode 100644
index 6f7bf1834..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ImpulseTracker.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_IT_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_ImpulseTracker.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_ImpulseTracker::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- if (CC4(Buffer)!=0x494D504D) //"IMPM"
- {
- Reject("Impulse Tracker");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_ImpulseTracker::Read_Buffer_Continue()
-{
- //Parsing
- Ztring SongName;
- int16u OrdNum, InsNum, SmpNum, PatNum, Flags, Special;
- int8u VersionMajor, VersionMinor, SoftwareVersionMajor, SoftwareVersionMinor, IS, TS;
- bool Stereo;
- Skip_B4( "Signature");
-
- Get_Local(26, SongName, "Song name");
- Skip_L1( "Unknown");
- Skip_L1( "Unknown");
- Get_L2 (OrdNum, "Orders count");
- Get_L2 (InsNum, "Instruments count");
- Get_L2 (SmpNum, "Samples count");
- Get_L2 (PatNum, "Paterns count");
- Get_L1 (SoftwareVersionMinor, "Cwt/v (Minor)");
- Get_L1 (SoftwareVersionMajor, "Cwt/v (Major)");
- Get_L1 (VersionMinor, "Cwt (Minor)");
- Get_L1 (VersionMajor, "Cwt (Major)");
- Get_L2 (Flags, "Flags");
- Get_Flags (Flags, 0, Stereo, "Stereo");
- Skip_Flags(Flags, 1, "Vol0MixOptimizations");
- Skip_Flags(Flags, 2, "Use instruments/Samples");
- Skip_Flags(Flags, 3, "Linear/Amiga slides");
- Skip_Flags(Flags, 4, "Old/IT Effects");
- Get_L2 (Special, "Special");
- Skip_Flags(Special, 0, "Song Message attached");
- Skip_L1( "Global volume");
- Skip_L1( "Mix volume");
- Get_L1 (IS, "Initial Speed");
- Get_L1 (TS, "Initial Temp");
- Skip_L1( "Panning separation between channels");
- Skip_L1( "0");
- Skip_L2( "Message Length");
- Skip_L4( "Message Offset");
- Skip_L1( "Unknown");
- Skip_L1( "Unknown");
- Skip_L1( "Unknown");
- Skip_L1( "Unknown");
- Skip_L1( "Unknown");
- Skip_XX(64, "Chnl Pan");
- Skip_XX(64, "Chnl Vol");
- Skip_XX(OrdNum, "Orders");
- Skip_XX(InsNum*4, "Instruments");
- Skip_XX(SmpNum*4, "Samples");
- Skip_XX(PatNum*4, "Patterns");
-
- FILLING_BEGIN();
- Accept("Impulse Tracker");
-
- Fill(Stream_General, 0, General_Format, "Impulse Tracker");
- Fill(Stream_General, 0, General_Format_Version, Ztring(__T("Version "))+Ztring::ToZtring(VersionMajor)+__T(".")+Ztring::ToZtring(VersionMinor/16)+Ztring::ToZtring(VersionMinor%16));
- Fill(Stream_General, 0, General_Track, SongName);
- Fill(Stream_General, 0, General_Encoded_Application, Ztring(__T("Impulse Tracker ")+Ztring::ToZtring(SoftwareVersionMajor)+__T(".")+Ztring::ToZtring(SoftwareVersionMinor/16)+Ztring::ToZtring(SoftwareVersionMinor%16)));
- Fill(Stream_General, 0, "BPM", TS);
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Stereo?2:1);
-
- //No more need data
- Finish("Impulse Tracker");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_IT_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ImpulseTracker.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ImpulseTracker.h
deleted file mode 100644
index bcfae2353..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ImpulseTracker.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Impulse Tracker files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_ImpulseTrackerH
-#define MediaInfo_File_ImpulseTrackerH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_ImpulseTracker
-//***************************************************************************
-
-class File_ImpulseTracker : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_La.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_La.cpp
deleted file mode 100644
index 843639706..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_La.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_LA_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_La.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_La::File_La()
-:File__Analyze(), File__Tags_Helper()
-{
- //File__Tags_Helper
- Base=this;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_La::Streams_Finish()
-{
- //Filling
- int64u CompressedSize=File_Size-TagsSize;
- float32 CompressionRatio=((float32)UncompressedSize)/CompressedSize;
-
- Fill(Stream_Audio, 0, Audio_StreamSize, CompressedSize);
- Fill(Stream_Audio, 0, Audio_Compression_Ratio, CompressionRatio);
-
- File__Tags_Helper::Streams_Finish();
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_La::FileHeader_Begin()
-{
- if (!File__Tags_Helper::FileHeader_Begin())
- return false;
-
- //Synchro
- if (Buffer_Offset+2>Buffer_Size)
- return false;
- if (CC3(Buffer+Buffer_Offset)!=0x4C4130) //"LA0"
- {
- File__Tags_Helper::Reject("LA");
- return false;
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_La::FileHeader_Parse()
-{
- //Parsing
- Ztring Major, Minor;
- int32u SampleRate, Samples, BytesPerSecond, UnCompSize, WAVEChunk, FmtSize, FmtChunk, CRC32;
- int16u RawFormat, Channels, BytesPerSample, BitsPerSample;
-
- Skip_Local(2, "signature");
- Get_Local (1, Major, "major_version");
- Get_Local (1, Minor, "minor_version");
- Get_L4 (UnCompSize, "uncompressed_size");
- Get_L4 (WAVEChunk, "chunk");
- Skip_L4( "fmt_size");
- Get_L4 (FmtChunk, "fmt_chunk");
- Get_L4 (FmtSize, "fmt_size");
- Get_L2 (RawFormat, "raw_format");
- Get_L2 (Channels, "channels"); Param_Info2(Channels, " channel(s)");
- Get_L4 (SampleRate, "sample_rate");
- Get_L4 (BytesPerSecond, "bytes_per_second");
- Get_L2 (BytesPerSample, "bytes_per_sample");
- Get_L2 (BitsPerSample, "bits_per_sample");
- Get_L4 (Samples, "samples");
- Skip_L1( "flags");
- Get_L4 (CRC32, "crc");
-
- FILLING_BEGIN();
- if (SampleRate==0)
- return;
- Duration=((int64u)Samples/Channels)*1000/SampleRate; // Seems that it's samples per channels otherwise Duration is doubled ??!!
- if (Duration==0)
- return;
- UncompressedSize=((int64u)Samples)*Channels*(BitsPerSample/8);
- if (UncompressedSize==0)
- return;
-
- File__Tags_Helper::Accept("LA");
- Fill(Stream_General, 0, General_Format_Version, Major+__T('.')+Minor);
-
- File__Tags_Helper::Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "LA");
- Fill(Stream_Audio, 0, Audio_Codec, "LA");
- Fill(Stream_Audio, 0, Audio_Format_Version, Major+__T('.')+Minor);
- Fill(Stream_Audio, 0, Audio_BitDepth, BitsPerSample);
- Fill(Stream_Audio, 0, Audio_Channel_s_, Channels);
- Fill(Stream_Audio, 0, Audio_SamplingRate, SampleRate);
- Fill(Stream_Audio, 0, Audio_Duration, Duration);
-
- //No more need data
- File__Tags_Helper::Finish("LA");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_LA_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_La.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_La.h
deleted file mode 100644
index a373c528a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_La.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_LaH
-#define MediaInfo_File_LaH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_La
-//***************************************************************************
-
-class File_La : public File__Analyze, public File__Tags_Helper
-{
-public :
- //Constructor/Destructor
- File_La();
-
-private :
- //Streams management
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Global
- void Read_Buffer_Continue() {File__Tags_Helper::Read_Buffer_Continue();}
-
- //Temp
- int64u Duration;
- int64u UncompressedSize;
- bool seekable;
- bool high;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Midi.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Midi.cpp
deleted file mode 100644
index 907158ffa..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Midi.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MIDI_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Midi.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Midi::Read_Buffer_Continue()
-{
- Reject("MIDI");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_MIDI_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Midi.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Midi.h
deleted file mode 100644
index 8d3a875c3..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Midi.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about MIDI files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_MidiH
-#define MediaInfo_File_MidiH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Midi
-//***************************************************************************
-
-class File_Midi : public File__Analyze
-{
-protected :
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Module.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Module.cpp
deleted file mode 100644
index 2ae5619bf..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Module.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MOD_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Module.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Module::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<1084)
- return false; //Must wait for more data
-
- int32u Signature=CC4(Buffer+1080);
- switch (Signature)
- {
- case 0x4D2E4B2E : //M.K.
- case 0x4D214B21 : //M!K!
- case 0x664C5434 : //FLT4
- case 0x664C5438 : //FLT8
- case 0x3663684E : //6CHN
- case 0x3863684E : //8CHN
- break;
- default : Reject("Module");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Module::Read_Buffer_Continue()
-{
- //Parsing
- Ztring ModuleName, SamplesName;
- Get_Local (20, ModuleName, "Module name");
- for (int8u Pos=0; Pos<31; Pos++)
- {
- Element_Begin0();
- Get_Local(22, SamplesName, "Sample's name"); Element_Name(SamplesName);
- Skip_B2( "Sample length");
- Skip_B1( "Finetune value for the sample");
- Skip_B1( "Volume of the sample");
- Skip_B2( "Start of sample repeat offset");
- Skip_B2( "Length of sample repeat");
- Element_End0();
- }
- Skip_B1( "Number of song positions");
- Skip_B1( "0x8F");
- Skip_XX(128, "Pattern table");
- Skip_C4( "Signature");
-
- FILLING_BEGIN();
- Accept("Module");
-
- Fill(Stream_General, 0, General_Format, "Module");
-
- Stream_Prepare(Stream_Audio);
-
- //No more need data
- Finish("Module");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_MOD_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Module.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Module.h
deleted file mode 100644
index 0dd94926a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Module.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Module files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_ModuleH
-#define MediaInfo_File_ModuleH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Module
-//***************************************************************************
-
-class File_Module : public File__Analyze
-{
-public :
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpc.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpc.cpp
deleted file mode 100644
index 59082bbb9..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpc.cpp
+++ /dev/null
@@ -1,213 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Source: http://trac.musepack.net/trac/wiki/SV7Specification
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos (Common)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPC_YES) || defined(MEDIAINFO_MPCSV8_YES)
-//---------------------------------------------------------------------------
-
-#include "ZenLib/Conf.h"
-using namespace ZenLib;
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern const int16u Mpc_SampleFreq[]=
-{
- 44100, //CD
- 48000, //DAT, DVC, ADR
- 37800, //CD-ROM-XA
- 32000, //DSR, DAT-LP, DVC-LP
-};
-
-//---------------------------------------------------------------------------
-} //NameSpace
-
-//---------------------------------------------------------------------------
-#endif //...
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-//
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Mpc.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Mpc_Profile[]=
-{
- "no profile",
- "Unstable/Experimental",
- "",
- "",
- "",
- "Below Telephone (q=0)",
- "Below Telephone (q=1)",
- "Telephone (q=2)",
- "Thumb (q=3)",
- "Radio (q=4)",
- "Standard (q=5)",
- "Xtreme (q=6)",
- "Insane (q=7)",
- "BrainDead (q=8)",
- "Above BrainDead (q=9)",
- "Above BrainDead (q=10)",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpc_Link[]=
-{
- "Starts or ends with a very low level",
- "Ends loudly",
- "Starts loudly",
- "Starts loudly and ends loudly",
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Mpc::File_Mpc()
-:File__Analyze(), File__Tags_Helper()
-{
- //File__Tags_Helper
- Base=this;
-}
-
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Mpc::FileHeader_Begin()
-{
- //Tags
- if (!File__Tags_Helper::FileHeader_Begin())
- return false;
-
- if (Buffer_Offset+4>Buffer_Size)
- return false;
-
- //Test
- if (CC3(Buffer)!=0x4D502B || (CC1(Buffer+3)&0x0F)!=7) //"MP+" version 7
- {
- File__Tags_Helper::Reject("Musepack SV7");
- return false;
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpc::FileHeader_Parse()
-{
- //Parsing
- Element_Begin1("SV7 header");
- Ztring Encoder;
- int32u FrameCount;
- int16u TitleGain, AlbumGain;
- int8u Profile, Link, SampleFreq, EncoderVersion;
-
- Skip_C3( "Signature");
- BS_Begin();
- Skip_S1(4, "PNS");
- Skip_S1(4, "Version");
- BS_End();
-
- Get_L4 (FrameCount, "FrameCount");
-
- Skip_L2( "MaxLevel");
- BS_Begin();
- Get_S1 (4, Profile, "Profile"); Param_Info1(Mpc_Profile[Profile]);
- Get_S1 (2, Link, "Link"); Param_Info1(Mpc_Link[Link]);
- Get_S1 (2, SampleFreq, "SampleFreq"); Param_Info1(Mpc_SampleFreq[SampleFreq]);
- Skip_SB( "IntensityStereo");
- Skip_SB( "MidSideStereo");
- Skip_S1(6, "MaxBand");
- BS_End();
-
- Skip_L2( "TitlePeak");
- Get_L2 (TitleGain, "TitleGain"); Param_Info3(((float32)((int16s)TitleGain))/1000, 2, " dB");
-
- Skip_L2( "AlbumPeak");
- Get_L2 (AlbumGain, "AlbumGain"); Param_Info3(((float32)((int16s)TitleGain))/1000, 2, " dB");
-
- BS_Begin();
- Skip_S2(16, "unused");
- Skip_S1( 4, "LastFrameLength (part 1)");
- Skip_SB( "FastSeekingSafe");
- Skip_S1( 3, "unused");
- Skip_SB( "TrueGapless");
- Skip_S1( 7, "LastFrameLength (part 2)");
- BS_End();
-
- Get_L1 (EncoderVersion, "EncoderVersion");
- Encoder.From_Number(((float)EncoderVersion)/100, 2); if (EncoderVersion%10==0); else if (EncoderVersion%2==0) Encoder+=__T(" Beta"); else if (EncoderVersion%2==1) Encoder+=__T(" Alpha"); Param_Info1(Encoder);
-
- Element_End0();
-
- FILLING_BEGIN();
- File__Tags_Helper::Accept("Musepack SV7");
-
- File__Tags_Helper::Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_SamplingRate, Mpc_SampleFreq[SampleFreq]);
- Fill(Stream_Audio, 0, Audio_SamplingCount, FrameCount*1152);
- Fill(Stream_Audio, 0, Audio_Format, "Musepack SV7");
- Fill(Stream_Audio, 0, Audio_Codec, "SV7");
- Fill(Stream_Audio, 0, Audio_Codec_Settings, Mpc_Profile[Profile]);
- Fill(Stream_Audio, 0, Audio_Encoded_Library, Encoder);
- Fill(Stream_Audio, 0, Audio_BitDepth, 16); //MPC support only 16 bits
- Fill(Stream_Audio, 0, Audio_Duration, ((int64u)FrameCount)*1152*1000/Mpc_SampleFreq[SampleFreq]);
- if (FrameCount)
- Fill(Stream_Audio, 0, Audio_BitRate, (File_Size-25)*8*Mpc_SampleFreq[SampleFreq]/FrameCount/1152);
-
- //No more need data
- File__Tags_Helper::Finish("Musepack SV7");
- FILLING_END();
-}
-
-} //Namespace
-
-#endif //MEDIAINFO_MPC_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpc.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpc.h
deleted file mode 100644
index d1b472aee..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpc.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Musepack files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_MpcH
-#define MediaInfo_File_MpcH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Mpc
-//***************************************************************************
-
-class File_Mpc : public File__Analyze, public File__Tags_Helper
-{
-public :
- //Constructor/Destructor
- File_Mpc();
-
-private :
- //Streams management
- void Streams_Finish() {File__Tags_Helper::Streams_Finish();}
-
- //Buffer - Global
- void Read_Buffer_Continue() {File__Tags_Helper::Read_Buffer_Continue();}
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_MpcSv8.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_MpcSv8.cpp
deleted file mode 100644
index 7f34558c5..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_MpcSv8.cpp
+++ /dev/null
@@ -1,246 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Source: http://trac.musepack.net/trac/wiki/SV8Specification
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPCSV8_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_MpcSv8.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-extern const int16u Mpc_SampleFreq[];
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-namespace Elements
-{
- const int32u AP=0x4150;
- const int32u CT=0x4354;
- const int32u EI=0x4549;
- const int32u RG=0x5247;
- const int32u SE=0x5345;
- const int32u SH=0x5348;
- const int32u SO=0x534F;
- const int32u ST=0x5354;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_MpcSv8::File_MpcSv8()
-:File__Analyze(), File__Tags_Helper()
-{
- //File__Tags_Helper
- Base=this;
-}
-
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_MpcSv8::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- if (CC4(Buffer)!=0x4D50434B) //"MPCK"
- {
- File__Tags_Helper::Reject("Musepack SV8");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_MpcSv8::FileHeader_Parse()
-{
- //Parsing
- Skip_C4( "Magic Number");
-
- FILLING_BEGIN();
- File__Tags_Helper::Accept("MpcSv8");
-
- File__Tags_Helper::Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "Musepack SV8");
- Fill(Stream_Audio, 0, Audio_Codec, "SV8");
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_MpcSv8::Header_Begin()
-{
- //Tags
- if (!File__Tags_Helper::Header_Begin())
- return false;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_MpcSv8::Header_Parse()
-{
- //Parsing
- int64u Size;
- int16u Key;
- Get_C2 (Key, "Key");
- Get_VS (Size, "Size");
-
- //Filling
- Header_Fill_Code(Key, Ztring().From_CC4(Key<<16)); //Quick filling for CC2 with text
- Header_Fill_Size(Key==Elements::AP?Element_Offset:Size); //We don't need the data of audio packet, and we will stop here...
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_MpcSv8::Data_Parse()
-{
- #define CASE_INFO(_NAME, _DETAIL) \
- case Elements::_NAME : Element_Info1(_DETAIL); _NAME(); break;
-
- //Parsing
- switch (Element_Code)
- {
- CASE_INFO(AP, "Audio Packet");
- CASE_INFO(CT, "Chapter-Tag");
- CASE_INFO(EI, "Encoder Info");
- CASE_INFO(RG, "Replay Gain");
- CASE_INFO(SE, "Stream End");
- CASE_INFO(SH, "Stream Header");
- CASE_INFO(SO, "Seek Table Offset");
- CASE_INFO(ST, "Seek Table");
- default : Skip_XX(Element_Size, "Data");
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_MpcSv8::AP()
-{
- //No more need data
- File__Tags_Helper::Finish("MpcSv8");
-}
-
-//---------------------------------------------------------------------------
-void File_MpcSv8::EI()
-{
- //Parsing
- int8u Quality, Version1, Version2, Version3;
- bool PNS;
- BS_Begin();
- Get_S1 (7, Quality, "Quality");
- Get_SB ( PNS, "PNS");
- BS_End();
- Get_B1 (Version1, "Major version");
- Get_B1 (Version2, "Minor version");
- Get_B1 (Version3, "Build");
-}
-
-//---------------------------------------------------------------------------
-void File_MpcSv8::RG()
-{
- //Parsing
- int16u TitleGain, AlbumGain;
- Skip_B1( "Version");
- Get_L2 (TitleGain, "Title gain"); Param_Info3(((float32)((int16s)TitleGain))/1000, 2, " dB");
- Skip_L2( "Title peak");
- Get_L2 (AlbumGain, "Album gain"); Param_Info3(((float32)((int16s)TitleGain))/1000, 2, " dB");
- Skip_L2( "Album peak");
-}
-
-//---------------------------------------------------------------------------
-void File_MpcSv8::SH()
-{
- //Parsing
- int64u SampleCount;
- int8u Version, SampleFrequency, ChannelCount;
- bool MidSideStereo;
- Skip_B4( "CRC32");
- Get_B1 (Version, "Version");
- Get_VS (SampleCount, "Sample count");
- Skip_VS( "Beginning silence");
- BS_Begin();
- Get_S1 (3, SampleFrequency, "Sample frequency"); Param_Info1(Mpc_SampleFreq[SampleFrequency]);
- Skip_S1(5, "Max used bands");
- Get_S1 (4, ChannelCount, "Channel count");
- Get_SB ( MidSideStereo, "Mid side stereo used");
- Skip_S1(3, "Audio block frames");
- BS_End();
-
- //Filling
- FILLING_BEGIN();
- Fill(Stream_Audio, 0, Audio_SamplingRate, Mpc_SampleFreq[SampleFrequency]);
- if (SampleCount)
- {
- Fill(Stream_Audio, 0, Audio_SamplingCount, SampleCount);
- Fill(Stream_Audio, 0, Audio_Duration, SampleCount*1000/Mpc_SampleFreq[SampleFrequency]);
- Fill(Stream_Audio, 0, Audio_BitRate, File_Size*8*Mpc_SampleFreq[SampleFrequency]/SampleCount); //Should be more precise...
- }
- Fill(Stream_Audio, 0, Audio_BitDepth, 16); //MPC support only 16 bits
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_MpcSv8::SO()
-{
- //Parsing
- Skip_VS( "Offset");
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_MPCSV8_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_MpcSv8.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_MpcSv8.h
deleted file mode 100644
index 6ab836f14..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_MpcSv8.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Musepack files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_MpcSv8H
-#define MediaInfo_File_MpcSv8H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_MpcSv8
-//***************************************************************************
-
-class File_MpcSv8 : public File__Analyze, public File__Tags_Helper
-{
-public :
- //Constructor/Destructor
- File_MpcSv8();
-
-private :
- //Streams management
- void Streams_Finish() {File__Tags_Helper::Streams_Finish();}
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Global
- void Read_Buffer_Continue() {File__Tags_Helper::Read_Buffer_Continue();}
-
- //Buffer - Per element
- bool Header_Begin();
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void AP();
- void CT() {Skip_XX(Element_Size, "Data");}
- void EI();
- void RG();
- void SE() {Skip_XX(Element_Size, "Data");}
- void SH();
- void SO();
- void ST() {Skip_XX(Element_Size, "Data");}
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpega.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpega.cpp
deleted file mode 100644
index a779d3c42..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpega.cpp
+++ /dev/null
@@ -1,1658 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// A good start : http://www.codeproject.com/audio/MPEGAudioInfo.asp
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Constants (Common)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEGA_YES) || defined(MEDIAINFO_MPEGTS_YES) || defined(MEDIAINFO_MPEGPS_YES)
-//---------------------------------------------------------------------------
-
-#include "ZenLib/Conf.h"
-using namespace ZenLib;
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-const char* Mpega_Version[4]=
-{
- "MPA2.5",
- "",
- "MPA2",
- "MPA1"
-};
-
-//---------------------------------------------------------------------------
-const char* Mpega_Layer[4]=
-{
- "",
- "L3",
- "L2",
- "L1",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpega_Format_Profile_Version[4]=
-{
- "Version 2.5",
- "",
- "Version 2",
- "Version 1"
-};
-
-//---------------------------------------------------------------------------
-const char* Mpega_Format_Profile_Layer[4]=
-{
- "",
- "Layer 3",
- "Layer 2",
- "Layer 1",
-};
-
-//---------------------------------------------------------------------------
-} //NameSpace
-
-//---------------------------------------------------------------------------
-#endif //...
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-//
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEGA_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Mpega.h"
-#include "ZenLib/BitStream.h"
-#include "ZenLib/Utils.h"
-#if MEDIAINFO_ADVANCED
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#endif //MEDIAINFO_ADVANCED
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Mpega_Version_String[4]=
-{
- "MPEG-2.5 Audio",
- "",
- "MPEG-2 Audio",
- "MPEG-1 Audio",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpega_Layer_String[4]=
-{
- "",
- " layer 3",
- " layer 2",
- " layer 1",
-};
-
-//---------------------------------------------------------------------------
-const int16u Mpega_BitRate[4][4][16]=
-{
- {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, //MPEG Audio 2.5 layer X
- {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 0}, //MPEG Audio 2.5 layer 3
- {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 0}, //MPEG Audio 2.5 layer 2
- {0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, 0}}, //MPEG Audio 2.5 layer 1
- {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, //MPEG Audio X layer X
- {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, //MPEG Audio X layer 3
- {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, //MPEG Audio X layer 2
- {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, //MPEG Audio X layer 1
- {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, //MPEG Audio 2 layer X
- {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 0}, //MPEG Audio 2 layer 3
- {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 0}, //MPEG Audio 2 layer 2
- {0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, 0}}, //MPEG Audio 2 layer 1
- {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, //MPEG Audio 1 layer X
- {0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 0}, //MPEG Audio 1 layer 3
- {0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 0}, //MPEG Audio 1 layer 2
- {0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 0}}, //MPEG Audio 1 layer 1
-};
-
-//---------------------------------------------------------------------------
-const int16u Mpega_SamplingRate[4][4]=
-{
- {11025, 12000, 8000, 0}, //MPEG Audio 2.5
- { 0, 0, 0, 0}, //MPEG Audio X
- {22050, 24000, 16000, 0}, //MPEG Audio 2
- {44100, 48000, 32000, 0}, //MPEG Audio 1
-};
-
-//---------------------------------------------------------------------------
-const int16u Mpega_Channels[4]=
-{
- 2,
- 2,
- 2,
- 1,
-};
-
-//---------------------------------------------------------------------------
-const char* Mpega_Codec_Profile[4]=
-{
- "",
- "Joint stereo",
- "Dual mono",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpega_Codec_Profile_Extension[]=
-{
- "",
- "Intensity Stereo",
- "MS Stereo",
- "Intensity Stereo + MS Stereo",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpega_Emphasis[]=
-{
- "",
- "50/15ms",
- "Reserved",
- "CCITT",
-};
-
-//---------------------------------------------------------------------------
-const char* Lame_BitRate_Mode[]=
-{
- "",
- "CBR",
- "VBR",
- "VBR",
- "VBR",
- "VBR",
- "VBR",
- "",
- "CBR",
- "VBR",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Lame_Method[]=
-{
- "",
- "CBR",
- "ABR",
- "VBR (rh)",
- "VBR (mtrh)",
- "VBR (rh)",
- "VBR",
- "",
- "CBR (2-pass)",
- "ABR (2-pass)",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const int8u Mpega_Coefficient[4][4] = //Samples per Frame / 8
-{
- { 0, 72, 144, 12}, //MPEG Audio 2.5
- { 0, 0, 0, 0}, //MPEG Audio X
- { 0, 72, 144, 12}, //MPEG Audio 2
- { 0, 144, 144, 12}, //MPEG Audio 1
-};
-
-//---------------------------------------------------------------------------
-const int8u Mpega_SlotSize[4]= //A frame is coposed of slots
-{
- 0, // Layer X
- 1, // Layer3
- 1, // Layer2
- 4, // Layer1
-};
-
-//---------------------------------------------------------------------------
-const int16u Mpega_CRC12_Table[]=
-{
- 0x000, 0x80f, 0x811, 0x01e, 0x82d, 0x022, 0x03c, 0x833,
- 0x855, 0x05a, 0x044, 0x84b, 0x078, 0x877, 0x869, 0x066,
- 0x8a5, 0x0aa, 0x0b4, 0x8bb, 0x088, 0x887, 0x899, 0x096,
- 0x0f0, 0x8ff, 0x8e1, 0x0ee, 0x8dd, 0x0d2, 0x0cc, 0x8c3,
- 0x945, 0x14a, 0x154, 0x95b, 0x168, 0x967, 0x979, 0x176,
- 0x110, 0x91f, 0x901, 0x10e, 0x93d, 0x132, 0x12c, 0x923,
- 0x1e0, 0x9ef, 0x9f1, 0x1fe, 0x9cd, 0x1c2, 0x1dc, 0x9d3,
- 0x9b5, 0x1ba, 0x1a4, 0x9ab, 0x198, 0x997, 0x989, 0x186,
- 0xa85, 0x28a, 0x294, 0xa9b, 0x2a8, 0xaa7, 0xab9, 0x2b6,
- 0x2d0, 0xadf, 0xac1, 0x2ce, 0xafd, 0x2f2, 0x2ec, 0xae3,
- 0x220, 0xa2f, 0xa31, 0x23e, 0xa0d, 0x202, 0x21c, 0xa13,
- 0xa75, 0x27a, 0x264, 0xa6b, 0x258, 0xa57, 0xa49, 0x246,
- 0x3c0, 0xbcf, 0xbd1, 0x3de, 0xbed, 0x3e2, 0x3fc, 0xbf3,
- 0xb95, 0x39a, 0x384, 0xb8b, 0x3b8, 0xbb7, 0xba9, 0x3a6,
- 0xb65, 0x36a, 0x374, 0xb7b, 0x348, 0xb47, 0xb59, 0x356,
- 0x330, 0xb3f, 0xb21, 0x32e, 0xb1d, 0x312, 0x30c, 0xb03,
- 0xd05, 0x50a, 0x514, 0xd1b, 0x528, 0xd27, 0xd39, 0x536,
- 0x550, 0xd5f, 0xd41, 0x54e, 0xd7d, 0x572, 0x56c, 0xd63,
- 0x5a0, 0xdaf, 0xdb1, 0x5be, 0xd8d, 0x582, 0x59c, 0xd93,
- 0xdf5, 0x5fa, 0x5e4, 0xdeb, 0x5d8, 0xdd7, 0xdc9, 0x5c6,
- 0x440, 0xc4f, 0xc51, 0x45e, 0xc6d, 0x462, 0x47c, 0xc73,
- 0xc15, 0x41a, 0x404, 0xc0b, 0x438, 0xc37, 0xc29, 0x426,
- 0xce5, 0x4ea, 0x4f4, 0xcfb, 0x4c8, 0xcc7, 0xcd9, 0x4d6,
- 0x4b0, 0xcbf, 0xca1, 0x4ae, 0xc9d, 0x492, 0x48c, 0xc83,
- 0x780, 0xf8f, 0xf91, 0x79e, 0xfad, 0x7a2, 0x7bc, 0xfb3,
- 0xfd5, 0x7da, 0x7c4, 0xfcb, 0x7f8, 0xff7, 0xfe9, 0x7e6,
- 0xf25, 0x72a, 0x734, 0xf3b, 0x708, 0xf07, 0xf19, 0x716,
- 0x770, 0xf7f, 0xf61, 0x76e, 0xf5d, 0x752, 0x74c, 0xf43,
- 0xec5, 0x6ca, 0x6d4, 0xedb, 0x6e8, 0xee7, 0xef9, 0x6f6,
- 0x690, 0xe9f, 0xe81, 0x68e, 0xebd, 0x6b2, 0x6ac, 0xea3,
- 0x660, 0xe6f, 0xe71, 0x67e, 0xe4d, 0x642, 0x65c, 0xe53,
- 0xe35, 0x63a, 0x624, 0xe2b, 0x618, 0xe17, 0xe09, 0x606
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Mpega::File_Mpega()
-:File__Analyze(), File__Tags_Helper()
-{
- //File__Tags_Helper
- Base=this;
-
- //Configuration
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
- PTS_DTS_Needed=true;
- IsRawStream=true;
- Frame_Count_NotParsedIncluded=0;
-
- //In
- Frame_Count_Valid=MediaInfoLib::Config.ParseSpeed_Get()>=0.5?128:(MediaInfoLib::Config.ParseSpeed_Get()>=0.3?32:4);
- FrameIsAlwaysComplete=false;
- CalculateDelay=false;
-
- //Temp - BitStream info
- Surround_Frames=0;
- Block_Count[0]=0;
- Block_Count[1]=0;
- Block_Count[2]=0;
- Channels_Count[0]=0;
- Channels_Count[1]=0;
- Channels_Count[2]=0;
- Channels_Count[3]=0;
- Extension_Count[0]=0;
- Extension_Count[1]=0;
- Extension_Count[2]=0;
- Extension_Count[3]=0;
- Emphasis_Count[0]=0;
- Emphasis_Count[1]=0;
- Emphasis_Count[2]=0;
- Emphasis_Count[3]=0;
- Scfsi=0;
- Scalefac=0;
- Reservoir=0;
- LastSync_Offset=(int64u)-1;
- VBR_FileSize=0;
- VBR_Frames=0;
- Reservoir_Max=0;
- Xing_Scale=0;
- BitRate=0;
- MpegPsPattern_Count=0;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpega::Streams_Fill()
-{
- //VBR detection without header
- if (VBR_Frames==0)
- {
- //How much kinds of bitrates?
- if (BitRate_Count.size()>1)
- BitRate_Mode=__T("VBR");
- }
-
- File__Tags_Helper::Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "MPEG Audio");
- Fill(Stream_Audio, 0, Audio_Format_Version, Mpega_Format_Profile_Version[ID]);
- Fill(Stream_Audio, 0, Audio_Format_Profile, Mpega_Format_Profile_Layer[layer]);
- if (mode && mode<4)
- {
- Fill(Stream_Audio, 0, Audio_Format_Settings, Mpega_Codec_Profile[mode]);
- Fill(Stream_Audio, 0, Audio_Format_Settings_Mode, Mpega_Codec_Profile[mode]);
- }
- if (mode_extension && mode_extension<4)
- {
- Fill(Stream_Audio, 0, Audio_Format_Settings, Mpega_Codec_Profile_Extension[mode_extension]);
- Fill(Stream_Audio, 0, Audio_Format_Settings_ModeExtension, Mpega_Codec_Profile_Extension[mode_extension]);
- }
- if (emphasis && emphasis<4)
- {
- Fill(Stream_Audio, 0, Audio_Format_Settings, Mpega_Emphasis[emphasis]);
- Fill(Stream_Audio, 0, Audio_Format_Settings_Emphasis, Mpega_Emphasis[emphasis]);
- }
- Fill(Stream_Audio, 0, Audio_Codec, Ztring(Mpega_Version[ID])+Ztring(Mpega_Layer[layer]));
- Fill(Stream_Audio, 0, Audio_Codec_String, Ztring(Mpega_Version_String[ID])+Ztring(Mpega_Layer_String[layer]), true);
- Fill(Stream_Audio, 0, Audio_SamplingRate, Mpega_SamplingRate[ID][sampling_frequency]);
- if (mode<4)
- {
- Fill(Stream_Audio, 0, Audio_Channel_s_, Mpega_Channels[mode]);
- Fill(Stream_Audio, 0, Audio_Codec_Profile, Mpega_Codec_Profile[mode]);
- }
-
- //Bitrate, if CBR
- if (VBR_Frames==0 && BitRate_Mode!=__T("VBR"))
- {
- BitRate_Mode=__T("CBR");
- BitRate=Mpega_BitRate[ID][layer][bitrate_index]*1000;
- Fill(Stream_General, 0, General_OverallBitRate, BitRate);
- Fill(Stream_Audio, 0, Audio_BitRate, BitRate);
- if (CalculateDelay && Buffer_TotalBytes_FirstSynched>10 && BitRate>0)
- {
- Fill(Stream_Audio, 0, Audio_Delay, Buffer_TotalBytes_FirstSynched*8*1000/BitRate, 0);
- Fill(Stream_Audio, 0, Audio_Delay_Source, "Stream");
- }
- }
-
- //Bitrate mode
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, BitRate_Mode);
- Fill(Stream_Audio, 0, Audio_BitRate_Minimum, BitRate_Minimum);
- Fill(Stream_Audio, 0, Audio_BitRate_Nominal, BitRate_Nominal);
-
- //Tags
- File__Tags_Helper::Streams_Fill();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpega::Streams_Finish()
-{
- //Reservoir
- //Fill("Reservoir_Avg", Reservoir/Frame_Count);
- //Fill("Reservoir_Max", Reservoir_Max);
- //size_t Granules=(Mpeg==3?2:1);
- //size_t Ch=Mpega_Channels[Channels];
- //Fill("Scalefactors", Ztring::ToZtring(Scalefac*100/(Granules*Ch*Frame_Count))+__T('%'));
-
- //VBR_FileSize calculation
- if (!IsSub && (File_Size!=(int64u)-1 || LastSync_Offset!=(int64u)-1) && VBR_FileSize==0)
- {
- //We calculate VBR_FileSize from the last synch or File_Size
- if (LastSync_Offset!=(int64u)-1)
- {
- VBR_FileSize=LastSync_Offset;
- VBR_FileSize-=File_BeginTagSize;
- }
- else
- {
- VBR_FileSize=File_Size;
- VBR_FileSize-=File_BeginTagSize;
- VBR_FileSize-=File_EndTagSize;
- }
- }
-
- //Bitrate calculation if VBR
- int64u FrameCount=0;
- if (VBR_Frames>0)
- {
- FrameCount=VBR_Frames;
- float32 FrameLength=((float32)(VBR_FileSize?VBR_FileSize:File_Size-File_EndTagSize-File_BeginTagSize))/VBR_Frames;
- size_t Divider;
- if (ID==3 && layer==3) //MPEG 1 layer 1
- Divider=384/8;
- else if ((ID==2 || ID==0) && layer==3) ///MPEG 2 or 2.5 layer 1
- Divider=192/8;
- else if ((ID==2 || ID==0) && layer==1) //MPEG 2 or 2.5 layer 3
- Divider=576/8;
- else
- Divider=1152/8;
- if (ID<4 && sampling_frequency<4)
- BitRate=(int32u)(FrameLength*Mpega_SamplingRate[ID][sampling_frequency]/Divider);
- BitRate_Mode=__T("VBR");
- }
- //if (BitRate_Count.size()>1)
- //{
- // Ztring BitRate_VBR;
- // if (!BitRate_VBR.empty())
- // BitRate_VBR+=__T(' ');
- // BitRate_VBR+=Ztring::ToZtring(8);
- // BitRate_VBR+=__T(':');
- // BitRate_VBR+=Ztring::ToZtring(BitRate_Count[8]);
- // Fill("BitRate_VBR", Ztring::ToZtring(BitRate_Count[8]));
- //}
- if (VBR_FileSize)
- {
- if (BitRate)
- {
- Fill(Stream_General, 0, General_Duration, VBR_FileSize*8*1000/BitRate, 10, true);
- Fill(Stream_General, 0, General_OverallBitRate, BitRate, 10, true);
- Fill(Stream_Audio, 0, Audio_BitRate, BitRate, 10, true);
- if (CalculateDelay && Buffer_TotalBytes_FirstSynched>10 && BitRate>0)
- {
- Fill(Stream_Audio, 0, Audio_Delay, Buffer_TotalBytes_FirstSynched*8*1000/BitRate, 0, true);
- Fill(Stream_Audio, 0, Audio_Delay_Source, "Stream", Unlimited, true, true);
- }
- }
- Fill(Stream_Audio, 0, Audio_StreamSize, VBR_FileSize);
- }
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, BitRate_Mode, true);
-
- //Encoding library
- if (!Encoded_Library.empty())
- Fill(Stream_General, 0, General_Encoded_Library, Encoded_Library, true);
- if (Encoded_Library.empty())
- Encoded_Library_Guess();
- Fill(Stream_Audio, 0, Audio_Encoded_Library, Encoded_Library, true);
- Fill(Stream_Audio, 0, Audio_Encoded_Library_Settings, Encoded_Library_Settings, true);
-
- //Surround
- if (Surround_Frames>=Frame_Count*0.9)
- {
- //Fill(Stream_Audio, 0, Audio_Channel_s_, 6);
- }
-
- if (FrameInfo.PTS!=(int64u)-1 && FrameInfo.PTS>PTS_Begin)
- {
- Fill(Stream_Audio, 0, Audio_Duration, float64_int64s(((float64)(FrameInfo.PTS-PTS_Begin))/1000000));
- if (Retrieve(Stream_Audio, 0, Audio_BitRate_Mode)==__T("CBR") && ID<4 && sampling_frequency<4)
- {
- int16u Samples;
- if (ID==3 && layer==3) //MPEG 1 layer 1
- Samples=384;
- else if ((ID==2 || ID==0) && layer==1) //MPEG 2 or 2.5 layer 3
- Samples=576;
- else
- Samples=1152;
-
- float64 Frame_Duration=((float64)1)/Mpega_SamplingRate[ID][sampling_frequency]*Samples;
- FrameCount=float64_int64s(((float64)(FrameInfo.PTS-PTS_Begin))/1000000000/Frame_Duration);
- }
- }
-
- if (FrameCount==0 && VBR_FileSize && Retrieve(Stream_Audio, 0, Audio_BitRate_Mode)==__T("CBR") && ID<4 && layer<4 && sampling_frequency<4 && bitrate_index<16 && Mpega_SamplingRate[ID][sampling_frequency])
- {
- size_t Size=(Mpega_Coefficient[ID][layer]*Mpega_BitRate[ID][layer][bitrate_index]*1000/Mpega_SamplingRate[ID][sampling_frequency])*Mpega_SlotSize[layer];
- if (Size)
- FrameCount=float64_int64s(((float64)VBR_FileSize)/Size);
- }
-
- if (FrameCount)
- {
- int16u Samples;
- if (ID==3 && layer==3) //MPEG 1 layer 1
- Samples=384;
- else if ((ID==2 || ID==0) && layer==1) //MPEG 2 or 2.5 layer 3
- Samples=576;
- else
- Samples=1152;
- Fill(Stream_Audio, 0, Audio_FrameCount, FrameCount, 10, true);
- Fill(Stream_Audio, 0, Audio_SamplingCount, FrameCount*Samples, 10, true);
- }
-
- File__Tags_Helper::Streams_Finish();
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Mpega::FileHeader_Begin()
-{
- //Buffer size
- if (Buffer_Size<8)
- return File_Size<8; //Must wait for more data
-
- //Detecting WAV/SWF/FLV/ELF/DPG/WM/MZ/DLG files
- int32u Magic4=CC4(Buffer);
- int32u Magic3=Magic4>>8;
- int16u Magic2=Magic4>>16;
- if (Magic4==0x52494646 || Magic3==0x465753 || Magic3==0x464C56 || Magic4==0x7F454C46 || Magic4==0x44504730 || Magic4==0x3026B275 || Magic2==0x4D5A || Magic4==0x000001BA || Magic4==0x000001B3 || Magic4==0x00000100 || CC8(Buffer+Buffer_Offset)==0x444C472056312E30LL)
- {
- File__Tags_Helper::Reject("MPEG Audio");
- return false;
- }
-
- //Seems OK
- return true;
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Mpega::Synchronize()
-{
- //Tags
- bool Tag_Found_Begin;
- if (!File__Tags_Helper::Synchronize(Tag_Found_Begin))
- return false;
- if (Tag_Found_Begin)
- return true;
-
- //Synchronizing
- while (Buffer_Offset+4<=Buffer_Size)
- {
- while (Buffer_Offset+4<=Buffer_Size)
- {
- if (Buffer[Buffer_Offset ]==0xFF
- && (Buffer[Buffer_Offset+1]&0xE0)==0xE0
- && (Buffer[Buffer_Offset+2]&0xF0)!=0xF0
- && (Buffer[Buffer_Offset+2]&0x0C)!=0x0C)
- break; //while()
-
- //Tags
- bool Tag_Found_Synchro;
- if (!File__Tags_Helper::Synchronize(Tag_Found_Synchro))
- return false;
- if (Tag_Found_Synchro)
- return true;
-
- //Better detect MPEG-PS
- if (Frame_Count==0
- && Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0x01
- && Buffer[Buffer_Offset+3]==0xBA)
- {
- MpegPsPattern_Count++;
- if (MpegPsPattern_Count>=2)
- {
- File__Tags_Helper::Reject("MPEG Audio");
- return false;
- }
- }
-
- Buffer_Offset++;
- }
-
- if (Buffer_Offset+4<=Buffer_Size)//Testing if size is coherant
- {
- //Retrieving some info
- int8u ID0 =(CC1(Buffer+Buffer_Offset+1)>>3)&0x03;
- int8u layer0 =(CC1(Buffer+Buffer_Offset+1)>>1)&0x03;
- int8u bitrate_index0 =(CC1(Buffer+Buffer_Offset+2)>>4)&0x0F;
- int8u sampling_frequency0=(CC1(Buffer+Buffer_Offset+2)>>2)&0x03;
- int8u padding_bit0 =(CC1(Buffer+Buffer_Offset+2)>>1)&0x01;
- //Coherancy
- if (Mpega_SamplingRate[ID0][sampling_frequency0]==0 || Mpega_Coefficient[ID0][layer0]==0 || Mpega_BitRate[ID0][layer0][bitrate_index0]==0 || Mpega_SlotSize[layer0]==0)
- Buffer_Offset++; //False start
- else
- {
- //Testing next start, to be sure
- size_t Size0=(Mpega_Coefficient[ID0][layer0]*Mpega_BitRate[ID0][layer0][bitrate_index0]*1000/Mpega_SamplingRate[ID0][sampling_frequency0]+(padding_bit0?1:0))*Mpega_SlotSize[layer0];
- if (IsSub && Buffer_Offset+Size0==Buffer_Size)
- break;
- if (File_Offset+Buffer_Offset+Size0!=File_Size-File_EndTagSize)
- {
- //Padding
- while (Buffer_Offset+Size0+4<=Buffer_Size && Buffer[Buffer_Offset+Size0]==0x00)
- Size0++;
-
- if (Buffer_Offset+Size0+4>Buffer_Size)
- return false; //Need more data
-
- //Tags
- bool Tag_Found0;
- if (!File__Tags_Helper::Synchronize(Tag_Found0, Size0))
- return false;
- if (Tag_Found0)
- return true;
- if (File_Offset+Buffer_Offset+Size0==File_Size-File_EndTagSize)
- break;
-
- //Testing
- if ((CC2(Buffer+Buffer_Offset+Size0)&0xFFE0)!=0xFFE0 || (CC1(Buffer+Buffer_Offset+Size0+2)&0xF0)==0xF0 || (CC1(Buffer+Buffer_Offset+Size0+2)&0x0C)==0x0C)
- {
- //Testing VBRI in a malformed frame
- bool VbriFound=false;
- for (size_t Pos=Buffer_Offset+3; Pos+4<Buffer_Offset+Size0; Pos++)
- {
- if (Buffer[Pos ]==0x56
- && Buffer[Pos+1]==0x42
- && Buffer[Pos+2]==0x52
- && Buffer[Pos+3]==0x49)
- {
- VbriFound=true;
- break;
- }
- if (Buffer[Pos])
- break; //Only NULL bytes are authorized before VBRI header
- }
- if (VbriFound)
- break;
- Buffer_Offset++;
- }
- else
- {
- //Retrieving some info
- int8u ID1 =(CC1(Buffer+Buffer_Offset+Size0+1)>>3)&0x03;
- int8u layer1 =(CC1(Buffer+Buffer_Offset+Size0+1)>>1)&0x03;
- int8u bitrate_index1 =(CC1(Buffer+Buffer_Offset+Size0+2)>>4)&0x0F;
- int8u sampling_frequency1=(CC1(Buffer+Buffer_Offset+Size0+2)>>2)&0x03;
- int8u padding_bit1 =(CC1(Buffer+Buffer_Offset+Size0+2)>>1)&0x01;
- //Coherancy
- if (Mpega_SamplingRate[ID1][sampling_frequency1]==0 || Mpega_Coefficient[ID1][layer1]==0 || Mpega_BitRate[ID1][layer1][bitrate_index1]==0 || Mpega_SlotSize[layer1]==0)
- Buffer_Offset++; //False start
- else
- {
- //Testing next start, to be sure
- size_t Size1=(Mpega_Coefficient[ID1][layer1]*Mpega_BitRate[ID1][layer1][bitrate_index1]*1000/Mpega_SamplingRate[ID1][sampling_frequency1]+(padding_bit1?1:0))*Mpega_SlotSize[layer1];
- if (IsSub && Buffer_Offset+Size0+Size1==Buffer_Size)
- break;
- if (File_Offset+Buffer_Offset+Size0+Size1!=File_Size-File_EndTagSize)
- {
- //Padding
- while (Buffer_Offset+Size0+Size1+4<=Buffer_Size && Buffer[Buffer_Offset+Size0+Size1]==0x00)
- Size0++;
-
- if (Buffer_Offset+Size0+Size1+4>Buffer_Size)
- return false; //Need more data
-
- //Tags
- bool Tag_Found1;
- if (!File__Tags_Helper::Synchronize(Tag_Found1, Size0+Size1))
- return false;
- if (Tag_Found1)
- return true;
- if (File_Offset+Buffer_Offset+Size0+Size1==File_Size-File_EndTagSize)
- break;
-
- //Testing
- if ((CC2(Buffer+Buffer_Offset+Size0+Size1)&0xFFE0)!=0xFFE0 || (CC1(Buffer+Buffer_Offset+Size0+Size1+2)&0xF0)==0xF0 || (CC1(Buffer+Buffer_Offset+Size0+Size1+2)&0x0C)==0x0C)
- Buffer_Offset++;
- else
- {
- //Retrieving some info
- int8u ID2 =(CC1(Buffer+Buffer_Offset+Size0+Size1+1)>>3)&0x03;
- int8u layer2 =(CC1(Buffer+Buffer_Offset+Size0+Size1+1)>>1)&0x03;
- int8u bitrate_index2 =(CC1(Buffer+Buffer_Offset+Size0+Size1+2)>>4)&0x0F;
- int8u sampling_frequency2=(CC1(Buffer+Buffer_Offset+Size0+Size1+2)>>2)&0x03;
- int8u padding_bit2 =(CC1(Buffer+Buffer_Offset+Size0+Size1+2)>>1)&0x01;
- //Coherancy
- if (Mpega_SamplingRate[ID2][sampling_frequency2]==0 || Mpega_Coefficient[ID2][layer2]==0 || Mpega_BitRate[ID2][layer2][bitrate_index2]==0 || Mpega_SlotSize[layer2]==0)
- Buffer_Offset++; //False start
- else
- {
- //Testing next start, to be sure
- size_t Size2=(Mpega_Coefficient[ID2][layer2]*Mpega_BitRate[ID2][layer2][bitrate_index2]*1000/Mpega_SamplingRate[ID2][sampling_frequency2]+(padding_bit2?1:0))*Mpega_SlotSize[layer2];
- if (IsSub && Buffer_Offset+Size0+Size1+Size2==Buffer_Size)
- break;
- if (File_Offset+Buffer_Offset+Size0+Size1+Size2!=File_Size-File_EndTagSize)
- {
- //Padding
- while (Buffer_Offset+Size0+Size1+Size2+4<=Buffer_Size && Buffer[Buffer_Offset+Size0+Size1+Size2]==0x00)
- Size0++;
-
- if (Buffer_Offset+Size0+Size1+Size2+4>Buffer_Size)
- {
- if (IsSub || File_Offset+Buffer_Offset+Size0+Size1+Size2<File_Size)
- break;
- return false; //Need more data
- }
-
- //Tags
- bool Tag_Found2;
- if (!File__Tags_Helper::Synchronize(Tag_Found2, Size0+Size1+Size2))
- return false;
- if (Tag_Found2)
- return true;
- if (File_Offset+Buffer_Offset+Size0+Size1+Size2==File_Size-File_EndTagSize)
- break;
-
- //Testing
- if ((CC2(Buffer+Buffer_Offset+Size0+Size1+Size2)&0xFFE0)!=0xFFE0 || (CC1(Buffer+Buffer_Offset+Size0+Size1+Size2+2)&0xF0)==0xF0 || (CC1(Buffer+Buffer_Offset+Size0+Size1+Size2+2)&0x0C)==0x0C)
- Buffer_Offset++;
- else
- break; //while()
- }
- else
- break; //while()
- }
- }
- }
- else
- break; //while()
- }
- }
- }
- else
- break; //while()
- }
- }
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+4>Buffer_Size)
- {
- if (Buffer_Offset+3==Buffer_Size && (CC2(Buffer+Buffer_Offset)&0xFFE0)!=0xFFE0)
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && (CC2(Buffer+Buffer_Offset)&0xFFE0)!=0xFFE0)
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && CC1(Buffer+Buffer_Offset)!=0x00)
- Buffer_Offset++;
- return false;
- }
-
- //Synched is OK
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Mpega::Synched_Test()
-{
- //Tags
- if (!File__Tags_Helper::Synched_Test())
- return false;
-
- //Padding
- while (Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]==0x00)
- Buffer_Offset++;
-
- //Must have enough buffer for having header
- if (Buffer_Offset+3>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset ]!=0xFF
- || (Buffer[Buffer_Offset+1]&0xE0)!=0xE0
- || (Buffer[Buffer_Offset+2]&0xF0)==0xF0
- || (Buffer[Buffer_Offset+2]&0x0C)==0x0C)
- {
- Synched=false;
- return true;
- }
-
- //Retrieving some info
- int8u ID0 =(CC1(Buffer+Buffer_Offset+1)>>3)&0x03;
- int8u layer0 =(CC1(Buffer+Buffer_Offset+1)>>1)&0x03;
- int8u bitrate_index0 =(CC1(Buffer+Buffer_Offset+2)>>4)&0x0F;
- int8u sampling_frequency0=(CC1(Buffer+Buffer_Offset+2)>>2)&0x03;
- if (Mpega_SamplingRate[ID0][sampling_frequency0]==0 || Mpega_Coefficient[ID0][layer0]==0 || Mpega_BitRate[ID0][layer0][bitrate_index0]==0 || Mpega_SlotSize[layer0]==0)
- {
- Synched=false;
- return true;
- }
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Demux
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-bool File_Mpega::Demux_UnpacketizeContainer_Test()
-{
- //Retrieving some info
- int8u ID0 =(CC1(Buffer+Buffer_Offset+1)>>3)&0x03;
- int8u layer0 =(CC1(Buffer+Buffer_Offset+1)>>1)&0x03;
- int8u bitrate_index0 =(CC1(Buffer+Buffer_Offset+2)>>4)&0x0F;
- int8u sampling_frequency0=(CC1(Buffer+Buffer_Offset+2)>>2)&0x03;
- int8u padding_bit0 =(CC1(Buffer+Buffer_Offset+2)>>1)&0x01;
-
- if (Mpega_SamplingRate[ID][sampling_frequency]==0 || Mpega_Coefficient[ID][layer]==0 || Mpega_BitRate[ID][layer][bitrate_index]==0 || Mpega_SlotSize[layer]==0)
- return true; //Synhro issue
-
- #if MEDIAINFO_ADVANCED
- if (Frame_Count && File_Demux_Unpacketize_StreamLayoutChange_Skip)
- {
- int8u mode0 =CC1(Buffer+Buffer_Offset+3)>>6;
- if (sampling_frequency0!=sampling_frequency_Frame0 || Mpega_Channels[mode0]!=Mpega_Channels[mode_Frame0])
- {
- return true;
- }
- }
- #endif //MEDIAINFO_ADVANCED
-
- Demux_Offset=Buffer_Offset+(Mpega_Coefficient[ID0][layer0]*Mpega_BitRate[ID0][layer0][bitrate_index0]*1000/Mpega_SamplingRate[ID0][sampling_frequency0]+(padding_bit0?1:0))*Mpega_SlotSize[layer0];
-
- if (Demux_Offset>Buffer_Size)
- return false;
-
- Demux_UnpacketizeContainer_Demux();
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpega::Header_Parse()
-{
- //Parsing
- BS_Begin();
- Skip_S2(11, "syncword");
- Get_S1 (2, ID, "ID"); Param_Info1(Mpega_Version[ID]);
- Get_S1 (2, layer, "layer"); Param_Info1(Mpega_Layer[layer]);
- Get_SB ( protection_bit, "protection_bit");
- Get_S1 (4, bitrate_index, "bitrate_index"); Param_Info2(Mpega_BitRate[ID][layer][bitrate_index], " Kbps");
- Get_S1 (2, sampling_frequency, "sampling_frequency"); Param_Info2(Mpega_SamplingRate[ID][sampling_frequency], " Hz");
- Get_SB ( padding_bit, "padding_bit");
- Skip_SB( "private_bit");
- Get_S1 (2, mode, "mode"); Param_Info2(Mpega_Channels[mode], " channels"); Param_Info1(Mpega_Codec_Profile[mode]);
- Get_S1 (2, mode_extension, "mode_extension"); Param_Info1(Mpega_Codec_Profile_Extension[mode_extension]);
- Get_SB ( copyright, "copyright");
- Get_SB ( original_home, "original_home");
- Get_S1 (2, emphasis, "emphasis"); Param_Info1(Mpega_Emphasis[emphasis]);
- BS_End();
-
- //Coherancy
- if (Mpega_SamplingRate[ID][sampling_frequency]==0 || Mpega_Coefficient[ID][layer]==0 || Mpega_BitRate[ID][layer][bitrate_index]==0 || Mpega_SlotSize[layer]==0)
- {
- Element_Offset=1;
- Header_Fill_Size(1);
- Header_Fill_Code(0, "False start");
- Synched=false;
- return;
- }
-
- //Filling
- int64u Size = ((int64u)Mpega_Coefficient[ID][layer] * (int64u)Mpega_BitRate[ID][layer][bitrate_index] * 1000 / (int64u)Mpega_SamplingRate[ID][sampling_frequency] + (padding_bit ? 1 : 0)) * (int64u)Mpega_SlotSize[layer];
-
- //Special case: tags is inside the last frame
- if (File_Offset+Buffer_Offset+Size>=File_Size-File_EndTagSize)
- Size=File_Size-File_EndTagSize-(File_Offset+Buffer_Offset);
-
- Header_Fill_Size(Size);
- Header_Fill_Code(0, "frame");
-
- //Filling error detection
- sampling_frequency_Count[sampling_frequency]++;
- mode_Count[mode]++;
-
- FILLING_BEGIN();
- #if MEDIAINFO_DEMUX
- #if MEDIAINFO_ADVANCED
- if (!Frame_Count)
- {
- File_Demux_Unpacketize_StreamLayoutChange_Skip=Config->File_Demux_Unpacketize_StreamLayoutChange_Skip_Get();
- if (File_Demux_Unpacketize_StreamLayoutChange_Skip)
- {
- sampling_frequency_Frame0=sampling_frequency;
- mode_Frame0=mode;
- }
- }
- #endif //MEDIAINFO_ADVANCED
- #endif //MEDIAINFO_DEMUX
- FILLING_END();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpega::Data_Parse()
-{
- //If false start
- if (Element_Size==0)
- {
- Element_DoNotShow();
- return;
- }
-
- //Partial frame
- if (Header_Size + Element_Size<((int64u)Mpega_Coefficient[ID][layer] * (int64u)Mpega_BitRate[ID][layer][bitrate_index] * 1000 / (int64u)Mpega_SamplingRate[ID][sampling_frequency] + (padding_bit ? 1 : 0)) * (int64u)Mpega_SlotSize[layer])
- {
- Element_Name("Partial frame");
- Skip_XX(Element_Size, "Data");
- return;
- }
-
- //PTS
- Element_Info1C((FrameInfo.PTS!=(int64u)-1), __T("PTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.PTS)/1000000)));
-
- //Name
- Element_Info1(__T("Frame ")+Ztring::ToZtring(Frame_Count));
-
- //VBR and library headers
- if (Frame_Count<3) //No need to do it too much
- {
- if (!Header_Xing())
- Header_VBRI();
- }
-
- //Counting
- if (File_Offset+Buffer_Offset+Element_Size==File_Size-File_EndTagSize)
- Frame_Count_Valid=Frame_Count; //Finish MPEG Audio frames in case of there are less than Frame_Count_Valid frames
- if (Frame_Count==0 && Frame_Count_NotParsedIncluded==0)
- PTS_Begin=FrameInfo.PTS;
- Frame_Count++;
- Frame_Count_InThisBlock++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- LastSync_Offset=File_Offset+Buffer_Offset+Element_Size;
- {
- int16u Samples;
- if (ID==3 && layer==3) //MPEG 1 layer 1
- Samples=384;
- else if ((ID==2 || ID==0) && layer==1) //MPEG 2 or 2.5 layer 3
- Samples=576;
- else
- Samples=1152;
- FrameInfo.DUR=float64_int64s(((float64)1)/Mpega_SamplingRate[ID][sampling_frequency]*Samples*1000000000);
- if (FrameInfo.DTS!=(int64u)-1)
- FrameInfo.DTS+=FrameInfo.DUR;
- if (FrameInfo.PTS!=(int64u)-1)
- FrameInfo.PTS=FrameInfo.DTS;
- }
-
- //LAME
- if (Encoded_Library.empty() && (Frame_Count<Frame_Count_Valid || File_Offset+Buffer_Offset+Element_Size==File_Size-File_EndTagSize)) //Can be elsewhere... At the start, or end frame
- Header_Encoders();
-
- //Filling
- BitRate_Count[Mpega_BitRate[ID][layer][bitrate_index]]++;
- Channels_Count[mode]++;
- Extension_Count[mode_extension]++;
- Emphasis_Count[emphasis]++;
-
- if (Status[IsFilled])
- {
- Skip_XX(Element_Size, "Data");
- return;
- }
-
- //error_check
- if (protection_bit)
- {
- Element_Begin1("error_check");
- Skip_B2( "crc_check");
- Element_End0();
- }
-
- //audio_data
- Element_Begin1("audio_data");
- switch (layer)
- {
- case 1 : //Layer 3
- audio_data_Layer3();
- break;
- default: Skip_XX(Element_Size-Element_Offset, "(data)");
- }
- Element_End0();
-
- //MP3 Surround detection
- for (int64u Element_Offset_S=Element_Offset; Element_Offset_S+4<Element_Size; Element_Offset_S++)
- {
- if ( Buffer[(size_t)(Buffer_Offset+Element_Offset_S )] ==0xCF
- && (Buffer[(size_t)(Buffer_Offset+Element_Offset_S+1)]&0xF0)==0x30) //12 bits, 0xCF3x
- {
- int8u Surround_Size=((Buffer[(size_t)(Buffer_Offset+Element_Offset_S+1)]&0x0F)<<4)
- | ((Buffer[(size_t)(Buffer_Offset+Element_Offset_S+2)]&0xF0)>>4);
- int16u CRC12 =((Buffer[(size_t)(Buffer_Offset+Element_Offset_S+2)]&0x0F)<<8)
- | Buffer[(size_t)(Buffer_Offset+Element_Offset_S+3)];
- if (Element_Offset_S+Surround_Size-4>Element_Size)
- break;
-
- //CRC
- int16u CRC12_Calculated=0x0FFF;
- int8u* Data=(int8u*)Buffer+(size_t)(Buffer_Offset+Element_Offset_S+4);
- if (Element_Offset_S+Surround_Size+4>=Element_Size)
- break;
- for (int8u Surround_Pos=0; Surround_Pos<Surround_Size-4; Surround_Pos++)
- CRC12_Calculated=0x0FFF & (((CRC12_Calculated<<8)&0xff00)^Mpega_CRC12_Table[((CRC12_Calculated>>4) ^ *Data++) & 0xff]);
- if (CRC12_Calculated!=CRC12)
- break;
-
- //Parsing
- Skip_XX(Element_Offset_S-Element_Offset, "data");
- BS_Begin();
- Element_Begin1("Surround");
- Skip_S2(12, "Sync");
- Skip_S1( 8, "Size");
- Skip_S2(12, "CRC12");
- BS_End();
- Skip_XX(Surround_Size-4, "data");
- Element_End0();
-
- //Filling
- Surround_Frames++;
- break;
- }
- }
-
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "next data");
-
- FILLING_BEGIN();
- //Filling
- if (IsSub && BitRate_Count.size()>1 && !Encoded_Library.empty())
- Frame_Count_Valid=Frame_Count;
- if (!Status[IsAccepted])
- File__Analyze::Accept("MPEG Audio");
- if (!Status[IsFilled] && Frame_Count>=Frame_Count_Valid)
- {
- Fill("MPEG Audio");
-
- //Jumping
- if (!IsSub && MediaInfoLib::Config.ParseSpeed_Get()<1.0 && File_Offset+Buffer_Offset<File_Size/2)
- {
- File__Tags_Helper::GoToFromEnd(16*1024, "MPEG-A");
- LastSync_Offset=(int64u)-1;
- if (File_GoTo!=(int64u)-1)
- Open_Buffer_Unsynch();
- }
- }
-
- //Detect Id3v1 tags inside a frame
- if (!IsSub && File_Offset+Buffer_Offset+(size_t)Element_Size>File_Size-File_EndTagSize)
- {
- Open_Buffer_Unsynch();
- File__Analyze::Data_GoTo(File_Size-File_EndTagSize, "Tags inside a frame, parsing the tags");
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpega::audio_data_Layer3()
-{
- int16u main_data_end;
- BS_Begin();
- if (ID==3) //MPEG-1
- Get_S2 (9, main_data_end, "main_data_end");
- else
- Get_S2 (8, main_data_end, "main_data_end");
- if ((int32u)main_data_end>Reservoir_Max)
- Reservoir_Max=main_data_end;
- Reservoir+=main_data_end;
- if (ID==3) //MPEG-1
- {
- if (mode==3) //Mono
- Skip_S1(5, "private_bits");
- else
- Skip_S1(3, "private_bits");
- }
- else
- {
- if (mode==3) //Mono
- Skip_S1(1, "private_bits");
- else
- Skip_S1(2, "private_bits");
- }
- if (ID==3) //MPEG-1
- {
- Element_Begin1("scfsi");
- for(int8u ch=0; ch<Mpega_Channels[mode]; ch++)
- for(int8u scfsi_band=0; scfsi_band<4; scfsi_band++)
- {
- bool scfsi;
- Get_SB ( scfsi, "scfsi");
- if (scfsi)
- Scfsi++;
- }
- Element_End0();
- }
- for(int8u gr=0; gr<(ID==3?2:1); gr++)
- {
- Element_Begin1("granule");
- if (mode>=4)
- return;
- for(int8u ch=0; ch<Mpega_Channels[mode]; ch++)
- {
- Element_Begin1("channel");
- Skip_S2(12, "part2_3_length");
- Skip_S2(9, "big_values");
- Skip_S1(8, "global_gain");
- if (ID==3) //MPEG-1
- Skip_S1(4, "scalefac_compress");
- else
- Skip_S2(9, "scalefac_compress");
- bool blocksplit_flag;
- Get_SB ( blocksplit_flag, "blocksplit_flag");
- if (blocksplit_flag==1)
- {
- int8u block_type;
- bool mixed_block_flag;
- Get_S1 (2, block_type, "block_type");
- Get_SB ( mixed_block_flag, "mixed_block_flag");
- for (int8u region=0; region<2; region++)
- Skip_S1(5, "table_select");
- for (int8u window=0; window<3; window++)
- Skip_S1(3, "subblock_gain");
- if (block_type == 2)
- {
- if (mixed_block_flag==1)
- {
- Param_Info1("Mixed");
- Block_Count[2]++; //Mixed
- }
- else
- {
- Param_Info1("Short");
- Block_Count[1]++; //Short
- }
- }
- else
- {
- Param_Info1("Long");
- Block_Count[0]++; //Long
- }
- }
- else
- {
- for (int8u region=0; region<3; region++)
- Skip_S1(5, "table_select");
- Skip_S1(4, "region0_count");
- Skip_S1(3, "region1_count");
- Param_Info1("Long");
- Block_Count[0]++; //Long
- }
- if (ID==3) //MPEG-1
- Skip_SB( "preflag");
- bool scalefac;
- Get_SB ( scalefac, "scalefac_scale");
- if (scalefac)
- Scalefac++;
- Skip_SB( "count1table_select");
- Element_End0();
- } //channels
- Element_End0();
- } //granules
- BS_End();
- //Skip_XX(Element_Size-main_data_end-Element_Offset, "main_data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpega::Data_Parse_Fill()
-{
-}
-
-//---------------------------------------------------------------------------
-bool File_Mpega::Header_Xing()
-{
- int32u Xing_Header_Offset;
- if (ID==3) //MPEG-1
- if (mode==3) //Mono
- Xing_Header_Offset=21-4;
- else
- Xing_Header_Offset=36-4;
- else //MPEG-2 or 2.5
- if (mode==3) //Mono
- Xing_Header_Offset=13-4;
- else
- Xing_Header_Offset=21-4;
- if (Buffer_Offset+Xing_Header_Offset+128<Buffer_Size)
- {
- const int8u* Xing_Header=Buffer+Buffer_Offset+Xing_Header_Offset;
- if (CC4(Xing_Header)==CC4("Xing") || CC4(Xing_Header)==CC4("Info"))
- {
- //This is a "tag"
- Element_Info1("Tag (Xing)");
-
- //Parsing
- Element_Begin1("Xing");
- Element_Begin1("Xing header");
- Skip_XX(Xing_Header_Offset, "Junk");
- int32u Flags;
- bool FrameCount, FileSize, TOC, Scale, Lame;
- Skip_C4( "Xing");
- Get_B4 (Flags, "Flags");
- Get_Flags(Flags, 0, FrameCount, "FrameCount");
- Get_Flags(Flags, 1, FileSize, "FileSize");
- Get_Flags(Flags, 2, TOC, "TOC");
- Get_Flags(Flags, 3, Scale, "Scale");
- Get_Flags(Flags, 4, Lame, "Lame");
- int32u Xing_Header_Size=8
- +(FrameCount? 4:0) //FrameCount
- +(FileSize? 4:0) //FileSize
- +(TOC? 100:0) //TOC
- +(Scale? 4:0) //Scale
- +(Lame? 348:0); //Lame
- Element_End0();
- //Element size
- if (Xing_Header_Size>Element_Size-Xing_Header_Offset)
- return false; //Error tag size
-
- //Parsing
- if (FrameCount)
- Get_B4 (VBR_Frames, "FrameCount"); //FrameCount exclude this frame
- if (FileSize)
- {
- int32u VBR_FileSize_Temp;
- Get_B4 (VBR_FileSize_Temp, "FileSize");
- if (VBR_FileSize_Temp>4+Element_Size)
- VBR_FileSize=VBR_FileSize_Temp-4-Element_Size; //FileSize include the Xing element
- }
- if (TOC)
- Skip_XX(100, "TOC");
- if (Scale)
- Get_B4 (Xing_Scale, "Scale");
- Ztring Lib;
- Element_End0();
- Peek_Local(4, Lib);
- if (Lame || Lib==__T("LAME") || Lib==__T("GOGO") || Lib==__T("L3.9"))
- Header_Encoders_Lame();
-
- if (CC4(Xing_Header)==CC4("Info"))
- VBR_Frames=0; //This is not a VBR file
-
- //Clearing Error detection
- sampling_frequency_Count.clear();
- mode_Count.clear();
-
- return true;
- }
- }
- return false;
-}
-
-//---------------------------------------------------------------------------
-bool File_Mpega::Header_VBRI()
-{
- const size_t Fraunhofer_Header_Offset=36-4;
- if (Buffer_Offset+Fraunhofer_Header_Offset+32<Buffer_Size)
- {
- const int8u* Fraunhofer_Header=Buffer+Buffer_Offset+Fraunhofer_Header_Offset;
- if (CC4(Fraunhofer_Header)==CC4("VBRI") && CC2(Fraunhofer_Header+4)==0x0001) //VBRI v1 only
- {
- //This is a "tag"
-
- Element_Info1("Tag (VBRI)");
-
- //Parsing
- int32u VBR_FileSize_Temp;
- int16u TableSize, TableScale, EntryBytes;
- Skip_XX(Fraunhofer_Header_Offset, "Junk");
- Element_Begin1("VBRI");
- Skip_C4( "Sync");
- Skip_B2( "Version");
- Skip_B2( "Delay");
- Skip_B2( "Quality");
- Get_B4 (VBR_FileSize_Temp, "StreamBytes");
- Get_B4 (VBR_Frames, "StreamFrames"); //Multiplied by SamplesPerFrame (1152 for >=32KHz, else 576) --> Duration in samples
- Get_B2 (TableSize, "TableSize");
- Get_B2 (TableScale, "TableScale");
- Get_B2 (EntryBytes, "EntryBytes");
- Skip_B2( "EntryFrames"); //Count of frames per entry
- Element_Begin1("Table");
- for (int16u Pos=0; Pos<TableSize; Pos++)
- {
- switch (EntryBytes)
- {
- case 1 : {Info_B1(Entry, "Entry"); Param_Info2 (Entry*TableScale, " bytes");} break;
- case 2 : {Info_B2(Entry, "Entry"); Param_Info2 (Entry*TableScale, " bytes");} break;
- case 4 : {Info_B4(Entry, "Entry"); Param_Info2 (Entry*TableScale, " bytes");} break;
- default: Skip_XX(EntryBytes, "Entry");
- }
- }
- Element_End0();
- Element_End0();
- VBR_FileSize=VBR_FileSize_Temp;
-
- //Clearing Error detection
- sampling_frequency_Count.clear();
- mode_Count.clear();
-
- return true;
- }
- }
- return false;
-}
-
-//---------------------------------------------------------------------------
-bool File_Mpega::Header_Encoders()
-{
- std::string BufferS((const char*)(Buffer+Buffer_Offset), (size_t)Element_Size);
- size_t Buffer_Pos;
-
- //Lame
- Buffer_Pos=BufferS.find("LAME");
- if (Buffer_Pos!=std::string::npos && Buffer_Pos<=Element_Size-8)
- {
- Element_Info1("With tag (Lame)");
- Element_Offset=Buffer_Pos;
- if (Element_Offset+20<=Element_Size)
- Get_Local(20, Encoded_Library, "Encoded_Library");
- else
- Get_Local( 8, Encoded_Library, "Encoded_Library");
- Encoded_Library.Trim(__T('A'));
- Encoded_Library.Trim(__T('U'));
- Encoded_Library.Trim(__T('\xAA'));
- Element_Offset=0; //Reseting it
- return true;
- }
-
- //RCA
- Buffer_Pos=BufferS.find("RCA mp3PRO Encoder");
- if (Buffer_Pos!=std::string::npos && Buffer_Pos<Element_Size-23)
- {
- Element_Info1("With tag (RCA)");
- Encoded_Library="RCA ";
- Encoded_Library+=Ztring((const char*)(Buffer+Buffer_Offset+18), 5);
- return true;
- }
-
- //Thomson
- Buffer_Pos=BufferS.find("THOMSON mp3PRO Encoder");
- if (Buffer_Pos!=std::string::npos && Buffer_Pos<Element_Size-29)
- {
- Element_Info1("With tag (Thomson)");
- Encoded_Library="Thomson ";
- Encoded_Library+=Ztring((const char*)(Buffer+Buffer_Offset+22), 6);
- return true;
- }
-
- //Gogo (old)
- Buffer_Pos=BufferS.find("MPGE");
- if (Buffer_Pos!=std::string::npos)
- {
- Element_Info1("With tag (Gogo)");
- Encoded_Library="Gogo <3.0";
- return true;
- }
-
- //Gogo (new)
- Buffer_Pos=BufferS.find("GOGO");
- if (Buffer_Pos!=std::string::npos)
- {
- Element_Info1("With tag (Gogo)");
- Encoded_Library="Gogo >=3.0";
- return true;
- }
-
- return false;
-}
-
-void File_Mpega::Header_Encoders_Lame()
-{
- Peek_Local(8, Encoded_Library);
- if (Encoded_Library.find(__T("L3.99"))==0)
- Encoded_Library.insert(1, __T("AME")); //Ugly version string in Lame 3.99.1 "L3.99r1\0"
- if ((Encoded_Library>=__T("LAME3.90")) && Element_IsNotFinished())
- {
- int8u Flags, lowpass, EncodingFlags, BitRate, StereoMode;
- Param_Info1(Ztring(__T("V "))+Ztring::ToZtring((100-Xing_Scale)/10));
- Param_Info1(Ztring(__T("q "))+Ztring::ToZtring((100-Xing_Scale)%10));
- Get_Local(9, Encoded_Library, "Encoded_Library");
- Get_B1 (Flags, "Flags");
- if ((Flags&0xF0)<=0x20) //Rev. 0 or 1, http://gabriel.mp3-tech.org/mp3infotag.html and Rev. 2 was seen.
- {
- Param_Info1(Lame_Method[Flags&0x0F]);
- BitRate_Mode=Lame_BitRate_Mode[Flags&0x0F];
- if ((Flags&0x0F)==1 || (Flags&0x0F)==8) //2 possible values for CBR
- VBR_Frames=0;
- }
- Get_B1 (lowpass, "Lowpass filter value"); Param_Info2(lowpass*100, " Hz");
- Skip_B4( "Peak signal amplitude");
- Skip_B2( "Radio Replay Gain");
- Skip_B2( "Audiophile Replay Gain");
- Get_B1 (EncodingFlags, "Encoding Flags"); Param_Info1(Ztring(__T("ATH Type="))+Ztring::ToZtring(Flags&0x0F));
- Skip_Flags(EncodingFlags, 4, "nspsytune");
- Skip_Flags(EncodingFlags, 5, "nssafejoint");
- Skip_Flags(EncodingFlags, 6, "nogap (after)");
- Skip_Flags(EncodingFlags, 7, "nogap (before)");
- Get_B1 (BitRate, "BitRate");
- Skip_B3( "Encoder delays");
- BS_Begin();
- Skip_S1(2, "Source sample frequency");
- Skip_SB( "unwise settings used");
- Get_S1 (3, StereoMode, "Stereo mode");
- Skip_S1(2, "noise shapings");
- BS_End();
- Skip_B1( "MP3 Gain");
- Skip_B2( "Preset and surround info");
- Skip_B4( "MusicLength");
- Skip_B2( "MusicCRC");
- Skip_B2( "CRC-16 of Info Tag");
-
- FILLING_BEGIN();
- Encoded_Library_Settings+=__T("-m ");
- switch(StereoMode)
- {
- case 0 : Encoded_Library_Settings+=__T("m"); break;
- case 1 : Encoded_Library_Settings+=__T("s"); break;
- case 2 : Encoded_Library_Settings+=__T("d"); break;
- case 3 : Encoded_Library_Settings+=__T("j"); break;
- case 4 : Encoded_Library_Settings+=__T("f"); break;
- case 5 : Encoded_Library_Settings+=__T("a"); break;
- case 6 : Encoded_Library_Settings+=__T("i"); break;
- default: ;
- }
- if (Xing_Scale<=100) //Xing_Scale is used for LAME quality
- {
- Encoded_Library_Settings+=__T( " -V ")+Ztring::ToZtring((100-Xing_Scale)/10);
- Encoded_Library_Settings+=__T( " -q ")+Ztring::ToZtring((100-Xing_Scale)%10);
- }
- if (lowpass)
- Encoded_Library_Settings+=(Encoded_Library_Settings.empty()?__T("-lowpass "):__T(" -lowpass "))+((lowpass%10)?Ztring::ToZtring(((float)lowpass)/10, 1):Ztring::ToZtring(lowpass/10));
- switch (Flags&0x0F)
- {
- case 2 :
- case 9 : //ABR
- Encoded_Library_Settings+=__T(" --abr"); break;
- case 3 : //VBR (old/rh)
- Encoded_Library_Settings+=__T(" --vbr-old"); break;
- case 4 : //VBR (new/mtrh)
- Encoded_Library_Settings+=__T(" --vbr-new"); break;
- case 5 : //VBR (?/mt)
- Encoded_Library_Settings+=__T(" --vbr-mt"); break;
- default : ;
- }
- if (BitRate!=0x00 && BitRate!=0xFF)
- {
- switch (Flags&0x0F)
- {
- case 1 :
- case 8 : //CBR
- Encoded_Library_Settings+=__T(" -b ")+Ztring::ToZtring(BitRate);
- break;
- case 2 :
- case 9 : //ABR
- BitRate_Nominal.From_Number(BitRate*1000);
- Encoded_Library_Settings+=__T(" ")+Ztring::ToZtring(BitRate);
- break;
- case 3 : //VBR (old/rh)
- case 4 : //VBR (new/mtrh)
- case 5 : //VBR (?/mt)
- BitRate_Minimum.From_Number(BitRate*1000);
- Encoded_Library_Settings+=__T(" -b ")+Ztring::ToZtring(BitRate);
- break;
- default : ;
- }
- }
- FILLING_END();
- }
- else
- Get_Local(20, Encoded_Library, "Encoded_Library");
-}
-
-void File_Mpega::Encoded_Library_Guess()
-{
- //TODO: Not yet enough precise
-
- /*
- if (Block_Count[1]==0) //No short blocks
- {
- if (mode==2) //Dual Mono
- {
- if (Scfsi>0) //scfsi used
- {}
- else //no scfsi
- {
- if (Scalefac>0) //scalefacors used
- {}
- else //scalefacors not used
- Encoded_Library="Shine";
- }
- }
- else //Other than dual mono
- {
- if (Extension_Count[1]>0 || Extension_Count[3]>0) //Intensity Stereo
- Encoded_Library="Xing (very old)";
- else //No Intensity Stereo
- {
- if (Scfsi>0) //Scfsi used
- Encoded_Library="Xing (new)";
- else //Scsfi not used
- {
- if (Channels_Count[2]>0) //Joint Stereo
- {
- if (Channels_Count[0]>0) //also includes no Joint Stereo frames
- {
- if (padding_bit) //Padding
- {
- if (original_home)
- Encoded_Library="FhG (l3enc)";
- else
- Encoded_Library="FhG (fastenc or mp3enc)";
- }
- else //No padding
- Encoded_Library="FhG (ACM or producer pro)";
- }
- else //No stereo frames: joint stereo was forced
- {
- if (padding_bit && !original_home && !copyright)
- Encoded_Library="QDesign (fast mode)";
- }
- }
- else
- {
- if (Channels_Count[0]>0 && Scalefac==0 && !original_home) //Stereo
- Encoded_Library="Plugger";
- else
- Encoded_Library="Xing (old)";
- }
- }
- }
- }
- }
- else //Short blocks
- {
- if (Scfsi) //scfsi used
- {
- if (Scalefac>0) //Scalefactor used
- Encoded_Library="Gogo (after 3.0)"; //Could be lame, but with a label, detected elsewhere before
- else
- Encoded_Library="Lame (old) or m3e";
- }
- else //Scfsi not used
- {
- if (Scalefac>0) //Scalefactor used
- {
- if (padding_bit)
- {
- if (original_home)
- {
- //10 last bytes
- //int sum = get_final_sum(data);
- //if (sum==0)
- // return guess = __T("FhG (fastenc, low quality mode)");
- //else if (sum==10 * 0xFF)
- // return guess = __T("FhG (l3enc)");
- //else if (sum==5 * 0x20)
- // return guess = __T("FhG (fastenc, medium or high quality mode)");
- //else
- // return guess = __T("FhG (l3enc or fastenc)");
- }
- else
- {
- if (Channels_Count[1]>0 && Extension_Count[1]>0) //Joint Stereo and some Intensity Stereo
- Encoded_Library="Thomson mp3PRO Encoder";
- else
- Encoded_Library="FhG (fastenc or mp3enc)";
- }
- }
- else //No padding
- {
- if (BitRate_Mode.find(__T("VBR"))==0) //VBR
- Encoded_Library="FhG (fastenc)";
- else
- Encoded_Library="FhG (ACM or producer pro)";
- }
- }
- else //scalefactors not used
- {
- if (Channels_Count[1]>0) //Joint Stereo
- {
- if (padding_bit && !original_home && !copyright)
- Encoded_Library="QDesign";
- }
- else //Joint Stereo not used
- {
- if (BitRate_Mode.find(__T("VBR"))==0) //VBR
- Encoded_Library="Lame (old)";
- else //CBR
- {
-
- if (mode==2) //Dual Mono
- {
- if (padding_bit)
- Encoded_Library="Blade";
- else
- Encoded_Library="dist10 encoder or other encoder";
- }
- else //Stereo or Mono
- {
- //if (data.av_reservoir < 40 && !data.vbr) //ISO based encoders are unable to properly use bit reservoir... average reservoir usage is about 10
- //{
- // if (data.padding)
- // return guess = __T("Blade");
- // else
- // return guess = __T("dist10 encoder or other encoder");
- //}
- //else
- // return guess = __T("Gogo (before 3.0)");
- }
- }
- }
- }
- }
- }
- */
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_MPEGA_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpega.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpega.h
deleted file mode 100644
index 9aa990b5d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Mpega.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_MpegaH
-#define MediaInfo_File_MpegaH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-#include <map>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Mpega
-//***************************************************************************
-
-class File_Mpega : public File__Analyze, public File__Tags_Helper
-{
-public :
- //In
- int64u Frame_Count_Valid;
- bool FrameIsAlwaysComplete;
- bool CalculateDelay;
-
- //Constructor/Destructor
- File_Mpega();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
-
- //Buffer - Demux
- bool Demux_UnpacketizeContainer_Test();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
- void Data_Parse_Fill();
- void audio_data_Layer3();
-
- //Element
- bool Header_Xing();
- bool Header_VBRI();
- bool Header_Encoders();
- void Header_Encoders_Lame();
- void Encoded_Library_Guess();
-
- //Temp
- Ztring BitRate_Mode;
- Ztring BitRate_Nominal;
- Ztring BitRate_Minimum;
- Ztring Encoded_Library;
- Ztring Encoded_Library_Settings;
- std::map<int16u, size_t> BitRate_Count;
- std::map<int8u, size_t> sampling_frequency_Count;
- std::map<int8u, size_t> mode_Count;
- size_t Surround_Frames;
- size_t Block_Count[3]; //long, short, mixed
- size_t Channels_Count[4]; //Stereo, Join Stereo, Dual mono, mono
- size_t Extension_Count[4]; //No, IS, MS, IS+MS
- size_t Emphasis_Count[4]; //No, 50/15ms, Reserved, CCITT
- size_t Scfsi; //Total
- size_t Scalefac; //Total
- size_t Reservoir; //Total
- int64u LastSync_Offset;
- int64u VBR_FileSize;
- int32u VBR_Frames;
- int32u Reservoir_Max;
- int32u Xing_Scale;
- int32u BitRate; //Average
- int8u ID;
- int8u layer;
- int8u bitrate_index;
- int8u sampling_frequency;
- int8u mode;
- int8u mode_extension;
- int8u emphasis;
- bool protection_bit;
- bool padding_bit;
- bool copyright;
- bool original_home;
- size_t MpegPsPattern_Count;
-
- //Helpers
- bool Element_Name_IsOK();
-
- #if MEDIAINFO_DEMUX
- #if MEDIAINFO_ADVANCED
- int8u sampling_frequency_Frame0;
- int8u mode_Frame0;
- bool File_Demux_Unpacketize_StreamLayoutChange_Skip;
- #endif //MEDIAINFO_ADVANCED
- #endif //MEDIAINFO_DEMUX
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_OpenMG.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_OpenMG.cpp
deleted file mode 100644
index 084dad3c8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_OpenMG.cpp
+++ /dev/null
@@ -1,233 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about OpenMG (OMA) files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_OPENMG_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_OpenMG.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* OpenMG_CodecID_Format (int8u CodecID)
-{
- switch (CodecID)
- {
- case 0 :
- case 1 :
- return "Atrac3";
- case 3 : return "MPEG Audio";
- case 4 : return "PCM";
- case 5 : return "WMA";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* OpenMG_CodecID_Encryption (int8u CodecID)
-{
- switch (CodecID)
- {
- case 1 : return "SDMI";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-int32u OpenMG_SamplingRate (int8u SamplingRate_Code)
-{
- switch (SamplingRate_Code)
- {
- case 0 : return 32000;
- case 1 : return 44100;
- case 2 : return 44800;
- case 3 : return 88200;
- case 4 : return 96000;
- default : return 0;
- }
-}
-
-//---------------------------------------------------------------------------
-int8u OpenMG_Channels (int8u Channels_Code)
-{
- if (Channels_Code<=4)
- return Channels_Code;
- else
- return Channels_Code+1; //+LFE
-}
-
-//---------------------------------------------------------------------------
-const char* OpenMG_ChannelPositions (int8u Channels_Code)
-{
- switch (Channels_Code)
- {
- case 1 : return "Front: C";
- case 2 : return "Front: L R";
- case 3 : return "Front: L R, Side: C";
- case 4 : return "Front: L R, Back: L R";
- case 5 : return "Front: L C R, Side: L R, LFE";
- case 6 : return "Front: L C R, Side: L R, Back: C, LFE";
- case 7 : return "Front: L C R, Side: L R, Back: L R, LFE";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_OpenMG::File_OpenMG()
-{
- //File__Tags_Helper
- Base=this;
-
- //Config
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- IsRawStream=true;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_OpenMG::Streams_Fill()
-{
- Fill(Stream_General, 0, General_Format, "OpenMG");
-
- File__Tags_Helper::Stream_Prepare(Stream_Audio);
-
- File__Tags_Helper::Streams_Fill();
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_OpenMG::FileHeader_Begin()
-{
- if (!File__Tags_Helper::FileHeader_Begin())
- return false;
-
- //Synchro
- if (Buffer_Offset+3>Buffer_Size)
- return false;
-
- // Testing
- if (Buffer[Buffer_Offset ]!=0x45 // "EA3"
- || Buffer[Buffer_Offset+1]!=0x41
- || Buffer[Buffer_Offset+2]!=0x33)
- {
- File__Tags_Helper::Reject();
- return false;
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_OpenMG::FileHeader_Parse()
-{
- //Parsing
- int16u Size, FrameSize=0;
- int8u Flags, CodecID, SamplingRate_Code=0, Channels_Code=0;
- bool JointStereo=false;
- Skip_C3( "Code");
- Get_B1 (Flags, "Flags");
- Get_B2 (Size, "Size");
- Skip_XX(26, "Unknown");
- Get_B1 (CodecID, "Coded ID"); Param_Info1(OpenMG_CodecID_Format(CodecID));
- if (CodecID<=1) //Atrac3
- {
- BS_Begin();
- Skip_S1(7, "Unknown");
- Get_SB ( JointStereo, "Joint Stereo");
- Get_S1 (3, SamplingRate_Code, "Sampling Rate"); Param_Info2(OpenMG_SamplingRate(SamplingRate_Code), " Hz");
- Get_S1 (3, Channels_Code, "Channels"); Param_Info2(OpenMG_Channels(Channels_Code), " channel(s)");
- Get_S2 (10, FrameSize, "Frame size");
- BS_End();
- }
- Skip_XX(Size-Element_Offset, "Unknown");
-
- FILLING_BEGIN();
- if (!Status[IsAccepted])
- {
- File__Tags_Helper::Accept();
-
- Fill(Stream_Audio, 0, Audio_Format, OpenMG_CodecID_Format(CodecID));
- Fill(Stream_Audio, 0, Audio_Encryption, OpenMG_CodecID_Encryption(CodecID));
- int64u StreamSize=(int64u)-1;
- if (File_Size!=(int64u)-1)
- {
- StreamSize=File_Size-(Buffer_Offset+Element_Size);
- Fill(Stream_Audio, 0, Audio_StreamSize, StreamSize);
- }
- if (CodecID<=1) // Atrac3
- {
- Fill(Stream_Audio, 0, Audio_Channel_s_, OpenMG_Channels(Channels_Code));
- Fill(Stream_Audio, 0, Audio_ChannelPositions, OpenMG_ChannelPositions(Channels_Code));
- if (Channels_Code==1 && JointStereo)
- Fill(Stream_Audio, 0, Audio_Format_Settings_Mode, "Joint Stereo");
- Fill(Stream_Audio, 0, Audio_SamplingRate, OpenMG_SamplingRate(SamplingRate_Code));
-
- if (CodecID==1) //Protected
- FrameSize++; //Not sure
- FrameSize<<=3; //8-byte blocks
- int64u BitRate=OpenMG_SamplingRate(SamplingRate_Code)*FrameSize/256;
- Fill(Stream_Audio, 0, Audio_BitRate, BitRate);
- if (StreamSize!=(int64u)-1 && BitRate)
- Fill(Stream_Audio, 0, Audio_Duration, StreamSize*8*1000/BitRate);
- }
- }
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_OpenMG::Read_Buffer_Continue()
-{
- //Parsing
- Skip_XX(File_Size-Buffer_Offset, "Data");
-
- File__Analyze::Finish();
-}
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_OpenMG.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_OpenMG.h
deleted file mode 100644
index d7a4abb17..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_OpenMG.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about OpenMG (OMA) files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_OpenMGH
-#define MediaInfo_File_OpenMGH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_OpenMG
-//***************************************************************************
-
-class File_OpenMG : public File__Analyze, public File__Tags_Helper
-{
-public :
- //Constructor/Destructor
- File_OpenMG();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish() {File__Tags_Helper::Streams_Finish();}
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Global
- void Read_Buffer_Continue();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Opus.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Opus.cpp
deleted file mode 100644
index 129b95c79..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Opus.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-// Note : the buffer must be given in ONE call
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_OPUS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Opus.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-const char* Opus_ChannelPositions[]=
-{
- "",
- "Front: C",
- "Front: L R",
- "Front: L C R",
- "Front: L R, Rear: L R",
- "Front: L C R, Rear: L R",
- "Front: L C R, Rear: L R, LFE",
- "Front: L C R, Side: L R, Rear: C, LFE",
- "Front: L C R, Side: L R, Rear: L R, LFE",
-};
-
-//---------------------------------------------------------------------------
-const char* Opus_ChannelPositions2[]=
-{
- "",
- "1/0/0",
- "2/0/0",
- "2/1/0",
- "2/2/0",
- "3/2/0",
- "3/2/1",
- "3/2/2",
- "3/2/3",
-};
-
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Opus::File_Opus()
-:File__Analyze()
-{
- //Internal
- Identification_Done=false;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Opus::Header_Parse()
-{
- //Filling
- Header_Fill_Code(0, "Opus");
- Header_Fill_Size(Element_Size);
-}
-
-//---------------------------------------------------------------------------
-void File_Opus::Data_Parse()
-{
- //Parsing
- if (Identification_Done)
- Stream();
- else
- Identification();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Opus::Identification()
-{
- Element_Name("Identification");
-
- //Parsing
- Ztring opus_version, Channels_Positions;
- int8u Opus_version_id, ch_count, ch_map;
- int16u preskip;
- int32u sample_rate;
- Get_Local(8,opus_version, "opus_codec_id");
- Get_L1 (Opus_version_id, "opus_version_id");
- Get_L1 (ch_count, "channel_count");
- Get_L2 (preskip, "preskip");
- Get_L4 (sample_rate, "rate");
- Skip_L2( "ouput_gain");
- Get_L1 (ch_map, "channel_map");
- if (ch_map)
- {
- Skip_L1( "Stream count (N)");
- Skip_L1( "Two-channel stream count (M)");
- for (int8u Pos=0; Pos<ch_count; Pos++)
- Skip_L1( "Channel mapping");
- }
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "unknown");
-
- //Filling
- FILLING_BEGIN();
- Accept("Opus");
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "Opus");
- Fill(Stream_Audio, 0, Audio_Codec, "Opus");
-
- if (!opus_version.empty())
- {
- Fill(Stream_Audio, 0, Audio_SamplingRate, sample_rate?sample_rate:48000);
- Fill(Stream_Audio, 0, Audio_Channel_s_, ch_count);
- }
-
- switch (ch_map)
- {
- case 0 : // Mono/Stereo
- if (ch_count>2)
- break; // Not in spec
- // else it is as Vorbis specs, no break
- case 1 : // Vorbis order
- {
- Ztring ChannelPositions; ChannelPositions.From_Local(Opus_ChannelPositions[ch_count]);
- Ztring ChannelPositions2; ChannelPositions2.From_Local(Opus_ChannelPositions2[ch_count]);
- if (ChannelPositions!=Retrieve(Stream_Audio, 0, Audio_ChannelPositions))
- Fill(Stream_Audio, 0, Audio_ChannelPositions, ChannelPositions);
- if (ChannelPositions2!=Retrieve(Stream_Audio, 0, Audio_ChannelPositions_String2))
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, ChannelPositions2);
- }
- default: ; //Unknown
- }
-
- FILLING_END();
-
- //Filling
- Identification_Done=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Opus::Stream()
-{
- Element_Name("Stream");
-
- Skip_XX(Element_Size, "Data");
-
- Finish("Opus");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_OPUS_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Opus.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Opus.h
deleted file mode 100644
index f98f70493..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Opus.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about OPUS files
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_OpusH
-#define MediaInfo_File_OpusH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Opus
-//***************************************************************************
-
-class File_Opus : public File__Analyze
-{
-public :
- File_Opus();
-
-private :
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Identification();
- void Stream();
-
- //Temp
- bool Identification_Done;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm.cpp
deleted file mode 100644
index 24dda17d2..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm.cpp
+++ /dev/null
@@ -1,429 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PCM_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Pcm.h"
-#if MEDIAINFO_DEMUX
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#endif //MEDIAINFO_DEMUX
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Smpte_St0302_ChannelsPositions(int8u Channels)
-{
- switch (Channels)
- {
- case 2 : return "Front: L R"; //2 channels
- case 4 : return "Front: L C R, LFE"; //4 channels
- case 6 : return "Front: L C R, Side: L R, LFE"; //6 channels
- case 8 : return "Front: L C R, Side: L R, Back: L R, LFE"; //8 channels
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Smpte_St0302_ChannelsPositions2(int8u Channels)
-{
- switch (Channels)
- {
- case 2 : return "2/0/0.0"; //2 channels
- case 4 : return "3/0/0.1"; //4 channels
- case 6 : return "3/2/0.1"; //6 channels
- case 8 : return "3/2/2.1"; //8 channels
- default : return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Pcm::File_Pcm()
-{
- //Configuration
- ParserName=__T("PCM");
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- IsRawStream=true;
- PTS_DTS_Needed=true;
-
- //In
- Frame_Count_Valid=4;
- BitDepth=0;
- BitDepth_Significant=0;
- Channels=0;
- SamplingRate=0;
- Endianness='\0';
- Sign='\0';
- #if MEDIAINFO_DEMUX
- Frame_Count_Valid_Demux=0;
- #endif //MEDIAINFO_DEMUX
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Pcm::Streams_Fill()
-{
- if (Count_Get(Stream_Audio)==0)
- {
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "PCM");
- Fill(Stream_Audio, 0, Audio_Codec, "PCM");
- }
-
- //Filling
- Ztring Firm, ITU;
- if (Codec==__T("EVOB")) {Firm=__T(""); Endianness='B'; Sign='S';} //PCM Signed 16 bits Big Endian, Interleavement is for 2 samples*2 channels L0-1/L0-0/R0-1/R0-0/L1-1/L1-0/R1-1/R1-0/L0-2/R0-2/L1-2/R1-2, http://wiki.multimedia.cx/index.php?title=PCM
- else if (Codec==__T("VOB")) {Firm=__T(""); Endianness='B'; Sign='S';} //PCM Signed 16 bits Big Endian, Interleavement is for 2 samples*2 channels L0-1/L0-0/R0-1/R0-0/L1-1/L1-0/R1-1/R1-0/L0-2/R0-2/L1-2/R1-2, http://wiki.multimedia.cx/index.php?title=PCM
- else if (Codec==__T("M2TS")) {Firm=__T(""); Endianness='B'; Sign='S';} //PCM Signed Big Endian
- else if (Codec==__T("A_PCM/INT/BIG")) {Firm=__T(""); Endianness='B';}
- else if (Codec==__T("A_PCM/INT/LITTLE")) {Firm=__T(""); Endianness='L';}
- else if (Codec==__T("A_PCM/INT/FLOAT")) {Firm=__T(""); Endianness='B'; Sign='F';}
- else if (Codec==__T("fl32")) { if (!Endianness) Endianness='B'; if (!Sign) Sign='F'; BitDepth=32;}
- else if (Codec==__T("fl64")) { if (!Endianness) Endianness='B'; if (!Sign) Sign='F'; BitDepth=64;}
- else if (Codec==__T("in24")) { if (!Endianness) Endianness='B'; if (!Sign) Sign='U'; BitDepth=24;}
- else if (Codec==__T("in32")) { if (!Endianness) Endianness='B'; if (!Sign) Sign='U'; BitDepth=32;}
- else if (Codec==__T("raw ")) { if (!Endianness) Endianness='L'; Sign='U';}
- else if (Codec==__T("twos")) { Endianness='B'; Sign='S';}
- else if (Codec==__T("sowt")) { Endianness='L'; Sign='S';}
- else if (Codec==__T("lpcm")) { if (!Endianness) Endianness='B'; if (!Sign) Sign='S';}
- else if (Codec==__T("SWF ADPCM")) {Firm=__T("SWF");}
- else if (Codec==__T("1")) { if (BitDepth)
- {
- if (BitDepth>8)
- { Endianness='L'; Sign='S';}
- else
- { Sign='U';}
- }
- }
- else if (Codec==__T("2")) {Firm=__T("Microsoft");}
- else if (Codec==__T("3")) { Endianness='F';}
- else if (Codec==__T("10")) {Firm=__T("OKI");}
- else if (Codec==__T("11")) {Firm=__T("Intel");}
- else if (Codec==__T("12")) {Firm=__T("Mediaspace");}
- else if (Codec==__T("13")) {Firm=__T("Sierra");}
- else if (Codec==__T("14")) {Firm=__T("Antex");}
- else if (Codec==__T("17")) {Firm=__T("Dialogic");}
- else if (Codec==__T("18")) {Firm=__T("Mediavision");}
- else if (Codec==__T("20")) {Firm=__T("Yamaha");}
- else if (Codec==__T("33")) {Firm=__T("Antex");}
- else if (Codec==__T("36")) {Firm=__T("DSP Solution");}
- else if (Codec==__T("38")) {Firm=__T("Natural MicroSystems");}
- else if (Codec==__T("39")) {Firm=__T("Crystal Semiconductor");}
- else if (Codec==__T("3B")) {Firm=__T("Rockwell");}
- else if (Codec==__T("40")) {Firm=__T("Antex Electronics");}
- else if (Codec==__T("42")) {Firm=__T("IBM");}
- else if (Codec==__T("45")) {Firm=__T("Microsoft"); ITU=__T("G.726");}
- else if (Codec==__T("64")) {Firm=__T("Apicom"); ITU=__T("G.726");}
- else if (Codec==__T("65")) {Firm=__T("Apicom"); ITU=__T("G.722");}
- else if (Codec==__T("85")) {Firm=__T("DataFusion Systems"); ITU=__T("G.726");}
- else if (Codec==__T("8B")) {Firm=__T("Infocom"); ITU=__T("G.721");}
- else if (Codec==__T("97")) {Firm=__T("ZyXEL");}
- else if (Codec==__T("100")) {Firm=__T("Rhetorex");}
- else if (Codec==__T("125")) {Firm=__T("Sanyo");}
- else if (Codec==__T("140")) {Firm=__T("Dictaphone"); ITU=__T("G.726");}
- else if (Codec==__T("170")) {Firm=__T("Unisys");}
- else if (Codec==__T("175")) {Firm=__T("SyCom"); ITU=__T("G.726");}
- else if (Codec==__T("178")) {Firm=__T("Knownledge");}
- else if (Codec==__T("200")) {Firm=__T("Creative");}
- else if (Codec==__T("210")) {Firm=__T("Uher");}
- else if (Codec==__T("285")) {Firm=__T("Norcom Voice Systems");}
- else if (Codec==__T("1001")) {Firm=__T("Olivetti");}
- else if (Codec==__T("1C03")) {Firm=__T("Lucent"); ITU=__T("G.723");}
- else if (Codec==__T("1C0C")) {Firm=__T("Lucent"); ITU=__T("G.723");}
- else if (Codec==__T("4243")) {ITU=__T("G.726");}
- else if (Codec==__T("A105")) {ITU=__T("G.726");}
- else if (Codec==__T("A107")) {ITU=__T("G.726");}
-
- //Format
- Fill(Stream_Audio, 0, Audio_Codec_String, "PCM");
- Fill(Stream_Audio, 0, Audio_Codec_Family, "PCM");
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
-
- //SamplingRate
- if (SamplingRate)
- Fill(Stream_Audio, 0, Audio_SamplingRate, SamplingRate);
-
- //Firm
- Fill(Stream_Audio, 0, Audio_Format_Settings, Firm);
- Fill(Stream_Audio, 0, Audio_Format_Settings_Firm, Firm);
- Fill(Stream_Audio, 0, Audio_Codec_Settings, Firm);
- Fill(Stream_Audio, 0, Audio_Codec_Settings_Firm, Firm);
-
- //Endianess
- const char* Value;
- switch (Endianness)
- {
- case 'B': Value="Big"; break;
- case 'L': Value="Little"; break;
- default : Value="";
- }
- Fill(Stream_Audio, 0, Audio_Format_Settings, Value);
- Fill(Stream_Audio, 0, Audio_Format_Settings_Endianness, Value);
- Fill(Stream_Audio, 0, Audio_Codec_Settings, Value);
- Fill(Stream_Audio, 0, Audio_Codec_Settings_Endianness, Value);
-
- //Sign
- switch (Sign)
- {
- case 'S': Value="Signed"; break;
- case 'U': Value="Unsigned"; break;
- default : Value="";
- }
- Fill(Stream_Audio, 0, Audio_Format_Settings, Value);
- Fill(Stream_Audio, 0, Audio_Format_Settings_Sign, Value);
- Fill(Stream_Audio, 0, Audio_Codec_Settings, Value);
- Fill(Stream_Audio, 0, Audio_Codec_Settings_Sign, Value);
-
- //ITU
- Fill(Stream_Audio, 0, Audio_Format_Settings, ITU);
- Fill(Stream_Audio, 0, Audio_Format_Settings_ITU, ITU);
- Fill(Stream_Audio, 0, Audio_Codec_Settings, ITU);
- Fill(Stream_Audio, 0, Audio_Codec_Settings_ITU, ITU);
-
- //BitDepth
- if (BitDepth_Significant)
- {
- Fill(Stream_Audio, 0, Audio_BitDepth, BitDepth_Significant);
- Fill(Stream_Audio, 0, Audio_BitDepth_Stored, BitDepth);
- }
- else if (BitDepth)
- Fill(Stream_Audio, 0, Audio_BitDepth, BitDepth);
-
- //Channels
- if (Channels)
- Fill(Stream_Audio, 0, Audio_Channel_s_, Channels);
-
- //Bit rate
- if (SamplingRate && BitDepth && Channels)
- Fill(Stream_Audio, 0, Audio_BitRate, SamplingRate*BitDepth*Channels);
-
- //ChannelsPositions
- if (Codec==__T("SMPTE ST 337"))
- {
- Fill(Stream_Audio, 0, Audio_ChannelPositions, Smpte_St0302_ChannelsPositions(Channels));
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, Smpte_St0302_ChannelsPositions2(Channels));
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Pcm::Streams_Finish()
-{
- //No frames in PCM!
- Frame_Count=(int64u)-1;
- Frame_Count_NotParsedIncluded=(int64u)-1;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Pcm::Read_Buffer_Continue()
-{
- //Testing if we get enough data
- if (SamplingRate && BitDepth && Channels)
- {
- int64u BitRate=SamplingRate*BitDepth*Channels;
- int64u ByteRate=BitRate/8;
- if (Buffer_Size>=ByteRate/4) // 1/4 of second is enough for detection
- Frame_Count_Valid=2;
- }
-
- #if MEDIAINFO_DEMUX
- if (Demux_UnpacketizeContainer && !Status[IsAccepted])
- {
- Frame_Count_Valid_Demux++;
- if (Frame_Count_Valid_Demux<Frame_Count_Valid)
- Element_WaitForMoreData();
- }
- #endif //MEDIAINFO_DEMUX
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Pcm::FileHeader_Begin()
-{
- if (!Frame_Count_Valid)
- {
- Accept();
- Finish();
- }
-
- return true;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Pcm::Header_Parse()
-{
- //Filling
- Header_Fill_Code(0, "Block");
- if (BitDepth && Channels)
- {
- int64u Size=(Element_Size/(BitDepth*Channels/8))*(BitDepth*Channels/8); //A complete sample
- if (Element_Size && Size==0)
- {
- Element_WaitForMoreData();
- return;
- }
- Header_Fill_Size(Size);
- }
- else
- Header_Fill_Size(Element_Size); // Unknown sample size
-}
-
-//---------------------------------------------------------------------------
-void File_Pcm::Data_Parse()
-{
- #if MEDIAINFO_DEMUX
- FrameInfo.PTS=FrameInfo.DTS;
- if (Frame_Count_Valid_Demux)
- {
- if (FrameInfo.DUR!=(int64u)-1)
- FrameInfo.DUR*=Frame_Count_Valid_Demux;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1 && Frame_Count_NotParsedIncluded>=Frame_Count_Valid_Demux)
- Frame_Count_NotParsedIncluded-=Frame_Count_Valid_Demux-1;
- }
- Demux_random_access=true;
- Element_Code=(int64u)-1;
-
- if (BitDepth==20 && Endianness=='L' && Config->Demux_PCM_20bitTo16bit_Get())
- {
- size_t Info_Offset=(size_t)Element_Size;
- const int8u* Info=Buffer+Buffer_Offset;
- size_t Info2_Size=Info_Offset*4/5;
- int8u* Info2=new int8u[Info2_Size];
- size_t Info2_Pos=0;
- size_t Info_Pos=0;
-
- //Removing bits 3-0 (Little endian)
- // Dest : 20LE / L1L0 L3L2 R0L4 R2R1 R4R3
- // Source: L2L1 L4L3 R2R1 R4R2
- while (Info_Pos+5<=Info_Offset)
- {
- Info2[Info2_Pos ] =(Info[Info_Pos+1]<<4 ) | (Info[Info_Pos+0]>>4 );
- Info2[Info2_Pos+1] =(Info[Info_Pos+2]<<4 ) | (Info[Info_Pos+1]>>4 );
- Info2[Info2_Pos+2] = Info[Info_Pos+3] ;
- Info2[Info2_Pos+3] = Info[Info_Pos+4] ;
-
- Info2_Pos+=4;
- Info_Pos+=5;
- }
-
- Demux(Info2, Info2_Pos, ContentType_MainStream);
-
- delete[] Info2;
- }
- else if (BitDepth==20 && Endianness=='L' && Config->Demux_PCM_20bitTo24bit_Get())
- {
- size_t Info_Offset=(size_t)Element_Size;
- const int8u* Info=Buffer+Buffer_Offset;
- size_t Info2_Size=Info_Offset*6/5;
- int8u* Info2=new int8u[Info2_Size];
- size_t Info2_Pos=0;
- size_t Info_Pos=0;
-
- //Padding bits 3-0 (Little endian)
- // Dest : 20LE / L1L0 L3L2 R0L4 R2R1 R4R3
- // Source: L0XX L2L1 L4L3 R0XX R2R1 R4R2
- while (Info_Pos+5<=Info_Offset)
- {
- Info2[Info2_Pos ] = Info[Info_Pos+0]<<4 ;
- Info2[Info2_Pos+1] =(Info[Info_Pos+1]<<4 ) | (Info[Info_Pos+0]>>4 );
- Info2[Info2_Pos+2] =(Info[Info_Pos+2]<<4 ) | (Info[Info_Pos+1]>>4 );
- Info2[Info2_Pos+3] = Info[Info_Pos+2]&0xF0 ;
- Info2[Info2_Pos+4] = Info[Info_Pos+3] ;
- Info2[Info2_Pos+5] = Info[Info_Pos+4] ;
-
- Info2_Pos+=6;
- Info_Pos+=5;
- }
-
- Demux(Info2, Info2_Pos, ContentType_MainStream);
-
- delete[] Info2;
- }
- else
- {
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- }
- #endif //MEDIAINFO_DEMUX
-
- //Parsing
- Skip_XX(Element_Size, "Data"); //It is impossible to detect... Default is no detection, only filling
-
- #if MEDIAINFO_DEMUX
- if (Frame_Count_Valid_Demux)
- {
- Frame_Count+=Frame_Count_Valid_Demux-1;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded+=Frame_Count_Valid_Demux-1;
- FrameInfo.DUR/=Frame_Count_Valid_Demux;
- if (FrameInfo.DTS!=(int64u)-1)
- FrameInfo.DTS+=FrameInfo.DUR*Frame_Count;
- Frame_Count_Valid_Demux=0;
- }
- #endif //MEDIAINFO_DEMUX
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- if (FrameInfo.DTS!=(int64u)-1 && FrameInfo.DUR!=(int64u)-1)
- {
- if (BitDepth && Channels && SamplingRate)
- FrameInfo.DTS+=Element_Size*1000000000*8/BitDepth/Channels/SamplingRate;
- else
- FrameInfo.DTS+=FrameInfo.DUR;
- FrameInfo.PTS=FrameInfo.DTS;
- }
- if ((!Status[IsAccepted] && Frame_Count>=Frame_Count_Valid) || File_Offset+Buffer_Size>=File_Size)
- {
- Accept();
- Fill();
- }
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_PCM_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm.h
deleted file mode 100644
index a120e614c..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PCM files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_PcmH
-#define MediaInfo_File_PcmH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Pcm
-//***************************************************************************
-
-class File_Pcm : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
- ZenLib::Ztring Codec;
- int32u SamplingRate;
- int8u BitDepth;
- int8u BitDepth_Significant;
- int8u Channels;
- int8u Endianness;
- int8u Sign;
-
- //Buffer - Global
- void Read_Buffer_Continue ();
- #if MEDIAINFO_DEMUX
- int64u Frame_Count_Valid_Demux;
- #endif //MEDIAINFO_DEMUX
-
- //Constructor/Destructor
- File_Pcm();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_M2ts.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_M2ts.cpp
deleted file mode 100644
index eb9565515..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_M2ts.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PCMM2TS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Pcm_M2ts.h"
-#if MEDIAINFO_DEMUX
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#endif //MEDIAINFO_DEMUX
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-int8u Pcm_M2TS_channel_assignment[16]=
-{
- 0,
- 1,
- 0,
- 2,
- 3,
- 3,
- 4,
- 4,
- 5,
- 6,
- 7,
- 8,
- 0,
- 0,
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-int32u Pcm_M2TS_sampling_frequency[16]=
-{
- 0,
- 48000,
- 0,
- 0,
- 96000,
- 192000,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-int8u Pcm_M2TS_bits_per_sample[4]=
-{
- 0,
- 16,
- 20,
- 24,
-};
-
-//---------------------------------------------------------------------------
-extern const char* Pcm_VOB_ChannelsPositions(int8u channel_assignment);
-extern const char* Pcm_VOB_ChannelsPositions2(int8u channel_assignment);
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Pcm_M2ts::File_Pcm_M2ts()
-{
- //Configuration
- ParserName=__T("PCM M2TS");
- IsRawStream=true;
- PTS_DTS_Needed=true;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Pcm_M2ts::Streams_Fill()
-{
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "PCM");
- Fill(Stream_Audio, 0, Audio_Codec, "PCM");
- Fill(Stream_Audio, 0, Audio_Codec_Family, "PCM");
- Fill(Stream_Audio, 0, Audio_MuxingMode, "Blu-ray");
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
-
- int8u Channels=Pcm_M2TS_channel_assignment[channel_assignment];
- if (Channels)
- {
- if (Pcm_M2TS_sampling_frequency[sampling_frequency])
- Fill(Stream_Audio, 0, Audio_SamplingRate, Pcm_M2TS_sampling_frequency[sampling_frequency]);
- if (Pcm_M2TS_bits_per_sample[bits_per_sample])
- Fill(Stream_Audio, 0, Audio_BitDepth, Pcm_M2TS_bits_per_sample[bits_per_sample]);
- Fill(Stream_Audio, 0, Audio_Channel_s_, Channels);
- Fill(Stream_Audio, 0, Audio_ChannelPositions, Pcm_VOB_ChannelsPositions(channel_assignment));
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, Pcm_VOB_ChannelsPositions2(channel_assignment));
- if (Pcm_M2TS_sampling_frequency[sampling_frequency] && Pcm_M2TS_bits_per_sample[bits_per_sample])
- {
- if (Channels%2)
- Fill(Stream_Audio, 0, Audio_BitRate_Encoded, Pcm_M2TS_sampling_frequency[sampling_frequency]*(Channels+1)*Pcm_M2TS_bits_per_sample[bits_per_sample]); //Always by pair
- Fill(Stream_Audio, 0, Audio_BitRate, Pcm_M2TS_sampling_frequency[sampling_frequency]*Channels*Pcm_M2TS_bits_per_sample[bits_per_sample]);
- }
- }
-
- Fill(Stream_Audio, 0, Audio_Format_Settings, "Big");
- Fill(Stream_Audio, 0, Audio_Format_Settings_Endianness, "Big");
- Fill(Stream_Audio, 0, Audio_Codec_Settings, "Big");
- Fill(Stream_Audio, 0, Audio_Codec_Settings_Endianness, "Big");
- Fill(Stream_Audio, 0, Audio_Format_Settings, "Signed");
- Fill(Stream_Audio, 0, Audio_Format_Settings_Sign, "Signed");
- Fill(Stream_Audio, 0, Audio_Codec_Settings, "Signed");
- Fill(Stream_Audio, 0, Audio_Codec_Settings_Sign, "Signed");
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Pcm_M2ts::Read_Buffer_Continue()
-{
- if (Buffer_Size==0)
- return;
-
- //Parsing
- int16u audio_data_payload_size;
- Get_B2 ( audio_data_payload_size, "audio_data_payload_size");
- BS_Begin();
- Get_S1 (4, channel_assignment, "channel_assignment"); Param_Info2(Pcm_M2TS_channel_assignment[channel_assignment], " channel(s)");
- Get_S1 (4, sampling_frequency, "sampling_frequency"); Param_Info2(Pcm_M2TS_sampling_frequency[sampling_frequency], " Hz");
- Get_S1 (2, bits_per_sample, "bits_per_sample"); Param_Info2(Pcm_M2TS_bits_per_sample[bits_per_sample], " bits");
- Skip_SB( "start_flag");
- Skip_S1(5, "reserved");
- BS_End();
- Skip_XX(audio_data_payload_size, "audio_data_payload");
-
- FILLING_BEGIN_PRECISE();
- if (!Status[IsAccepted])
- {
- Accept();
- Finish();
- }
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_PCMM2TS_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_M2ts.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_M2ts.h
deleted file mode 100644
index c7d932d94..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_M2ts.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PCM (from Blu-ray) streams
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Pcm_M2tsH
-#define MediaInfo_File_Pcm_M2tsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Pcm_M2ts
-//***************************************************************************
-
-class File_Pcm_M2ts : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Pcm_M2ts();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-
- //Temp
- int8u channel_assignment;
- int8u sampling_frequency;
- int8u bits_per_sample;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_Vob.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_Vob.cpp
deleted file mode 100644
index 6fb2d8d16..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_Vob.cpp
+++ /dev/null
@@ -1,221 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PCMVOB_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Pcm_Vob.h"
-#if MEDIAINFO_DEMUX
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#endif //MEDIAINFO_DEMUX
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-int32u Pcm_VOB_BitDepth[]=
-{
- 16,
- 20,
- 24,
- 0,
-};
-
-//---------------------------------------------------------------------------
-int32u Pcm_VOB_Frequency[]=
-{
- 48000,
- 32000,
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-const char* Pcm_VOB_ChannelsPositions(int8u channel_assignment)
-{
- switch (channel_assignment)
- {
- case 1 : return "Front: C"; //1 channel
- case 3 : return "Front: L R"; //2 channels
- case 4 : return "Front: L C R"; //3 channels
- case 5 : return "Front: L R, LFE"; //3 channels
- case 6 : return "Front: L C R, LFE"; //4 channels
- case 7 : return "Front: L R, Side: L R"; //4 channels
- case 8 : return "Front: L C R, Side: L R"; //5 channels
- case 9 : return "Front: L C R, Side: L R, LFE"; //6 channels
- case 10 : return "Front: L C R, Side: L R, Back: L R"; //7 channels
- case 11 : return "Front: L C R, Side: L R, Back: L R, LFE"; //8 channels
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Pcm_VOB_ChannelsPositions2(int8u channel_assignment)
-{
- switch (channel_assignment)
- {
- case 1 : return "1/0/0.0"; //1 channel
- case 3 : return "2/0/0.0"; //2 channels
- case 4 : return "3/0/0.0"; //3 channels
- case 5 : return "2/0/0.1"; //3 channels
- case 6 : return "3/0/0.1"; //4 channels
- case 7 : return "2/2/0.0"; //4 channels
- case 8 : return "3/2/0.0"; //5 channels
- case 9 : return "3/2/0.1"; //6 channels
- case 10 : return "3/2/2.0"; //7 channels
- case 11 : return "3/2/2.1"; //8 channels
- default : return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Pcm_Vob::File_Pcm_Vob()
-{
- //Configuration
- ParserName=__T("PCM VOB");
- IsRawStream=true;
- PTS_DTS_Needed=true;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Pcm_Vob::Streams_Fill()
-{
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "PCM");
- Fill(Stream_Audio, 0, Audio_Codec, "PCM");
- Fill(Stream_Audio, 0, Audio_Codec_Family, "PCM");
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
-
- Fill(Stream_Audio, 0, Audio_BitDepth, Pcm_VOB_BitDepth[BitDepth]);
- Fill(Stream_Audio, 0, Audio_SamplingRate, Pcm_VOB_Frequency[Frequency]);
- Fill(Stream_Audio, 0, Audio_Channel_s_, NumberOfChannelsMinusOne+1);
- Fill(Stream_Audio, 0, Audio_ChannelPositions, Pcm_VOB_ChannelsPositions(NumberOfChannelsMinusOne+1));
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, Pcm_VOB_ChannelsPositions2(NumberOfChannelsMinusOne+1));
- Fill(Stream_Audio, 0, Audio_BitRate, Pcm_VOB_Frequency[Frequency]*(NumberOfChannelsMinusOne+1)*16);
-
- //PCM Signed 16 bits Big Endian, Interleavement is for 2 samples*2 channels L0-1/L0-0/R0-1/R0-0/L1-1/L1-0/R1-1/R1-0/L0-2/R0-2/L1-2/R1-2, http://wiki.multimedia.cx/index.php?title=PCM
- Fill(Stream_Audio, 0, Audio_Format_Settings, "Big");
- Fill(Stream_Audio, 0, Audio_Format_Settings_Endianness, "Big");
- Fill(Stream_Audio, 0, Audio_Codec_Settings, "Big");
- Fill(Stream_Audio, 0, Audio_Codec_Settings_Endianness, "Big");
- Fill(Stream_Audio, 0, Audio_Format_Settings, "Signed");
- Fill(Stream_Audio, 0, Audio_Format_Settings_Sign, "Signed");
- Fill(Stream_Audio, 0, Audio_Codec_Settings, "Signed");
- Fill(Stream_Audio, 0, Audio_Codec_Settings_Sign, "Signed");
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Pcm_Vob::Read_Buffer_Continue()
-{
- if (Buffer_Size==0)
- return;
-
- //Parsing
- Skip_B1( "Frame number");
- Skip_B2( "Bytes to skip (+1?)");
- Skip_B1( "Unknown");
- BS_Begin();
- Get_S1 (2, BitDepth, "Bit depth"); Param_Info1(Pcm_VOB_BitDepth[BitDepth]);
- Get_S1 (2, Frequency, "Frequency"); Param_Info1(Pcm_VOB_Frequency[Frequency]);
- Skip_SB( "Unknown");
- Get_S1 (3, NumberOfChannelsMinusOne, "Number of channels (minus 1)");
- BS_End();
- Skip_B1( "Start code");
-
- #if MEDIAINFO_DEMUX
- if (Config->Demux_PCM_20bitTo16bit_Get() && BitDepth==1) //20-bit
- {
- int8u* Info=new int8u[(size_t)((Element_Size-6)*4/5)];
- size_t Info_Offset=0;
-
- while (Element_Offset+5*(NumberOfChannelsMinusOne+1)<=Element_Size)
- {
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
-
- std::memcpy(Info+Info_Offset, Buffer+Buffer_Pos, 4*(NumberOfChannelsMinusOne+1));
-
- Info_Offset+=4*(NumberOfChannelsMinusOne+1);
- Element_Offset+=5*(NumberOfChannelsMinusOne+1);
- }
- Element_Offset=6;
-
- FrameInfo.PTS=FrameInfo.DTS;
- if (Pcm_VOB_Frequency[Frequency])
- FrameInfo.DUR=(Element_Size-6)/5*1000000000/Pcm_VOB_Frequency[Frequency];
- Demux_random_access=true;
- Element_Code=(int64u)-1;
- Demux(Info, Info_Offset, ContentType_MainStream);
-
- delete[] Info;
- }
- else
- {
- Demux_Offset=Buffer_Offset+(size_t)Element_Size;
- Buffer_Offset+=6; //Header is dropped
- Demux_UnpacketizeContainer_Demux();
- Buffer_Offset-=6;
- }
- #endif //MEDIAINFO_DEMUX
-
- Skip_XX(Element_Size-6, "Data");
-
- FILLING_BEGIN();
- Frame_Count++;
- Frame_Count_InThisBlock++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- if (FrameInfo.DTS!=(int64u)-1 && FrameInfo.DUR!=(int64u)-1)
- {
- FrameInfo.DTS+=FrameInfo.DUR;
- FrameInfo.PTS=FrameInfo.DTS;
- }
-
- if (!Status[IsAccepted])
- {
- Accept();
- Finish();
- }
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_PCMVOB_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_Vob.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_Vob.h
deleted file mode 100644
index 0baa44c14..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Pcm_Vob.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PCM (from DVD) files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Pcm_VobH
-#define MediaInfo_File_Pcm_VobH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Pcm_Vob
-//***************************************************************************
-
-class File_Pcm_Vob : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Pcm_Vob();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-
- //Temp
- int8u BitDepth;
- int8u Frequency;
- int8u NumberOfChannelsMinusOne;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ps2Audio.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ps2Audio.cpp
deleted file mode 100644
index 510792127..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ps2Audio.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PS2A_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Ps2Audio.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ps2Audio::Read_Buffer_Continue()
-{
- //Parsing
- while (Element_Offset<Element_Size)
- {
- int32u ID;
- Peek_B4(ID);
- switch (ID)
- {
- case 0x53536264 : SSbd(); break;
- case 0x53536864 : SShd(); break;
- default : Element_Offset=Element_Size; Reject("PS2 Audio");
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Ps2Audio::SSbd()
-{
- if (Count_Get(Stream_Audio)!=1)
- {
- Trusted_IsNot("Element should not be here");
- return;
- }
-
- Element_Begin1("SSbd (Body)");
- int32u Size;
- Skip_C4( "ID");
- Get_L4 (Size, "Size");
- Skip_XX(Element_Size-Element_Offset, "Data (Partial)");
- Element_End0();
-
- FILLING_BEGIN();
- Fill(Stream_Audio, 0, Audio_StreamSize, Size);
- if (BitRate)
- Fill(Stream_Audio, 0, Audio_Duration, ((int64u)Size)*1000*8/BitRate);
-
- Finish("PS2 Audio");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Ps2Audio::SShd()
-{
- Element_Begin1("SShd (Header)");
- //Parsing
- int32u Size, Format, SamplingRate, Channels;
- Skip_C4( "ID");
- Get_L4 (Size, "Size");
- if (Size!=0x18)
- {
- Trusted_IsNot("Bad size");
- return;
- }
- Get_L4 (Format, "Format");
- Get_L4 (SamplingRate, "Sampling rate");
- Get_L4 (Channels, "Channels");
- Skip_L4( "Bytes per channel");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Element_End0();
-
- FILLING_BEGIN();
- Accept("PS2 Audio");
-
- BitRate=SamplingRate*Channels*16; //Always 16 bits
-
- Stream_Prepare(Stream_Audio);
- Ztring FormatS;
- switch(Format)
- {
- case 0x00000001 : FormatS=__T("PCM"); break;
- case 0x00000010 : FormatS=__T("ADPCM"); break;
- default : ;
- }
- Fill(Stream_Audio, 0, Audio_Format, FormatS);
- Fill(Stream_Audio, 0, Audio_Codec, FormatS);
- Fill(Stream_Audio, 0, Audio_MuxingMode, "PS2");
- Fill(Stream_Audio, 0, Audio_SamplingRate, SamplingRate);
- Fill(Stream_Audio, 0, Audio_Channel_s_, Channels);
- Fill(Stream_Audio, 0, Audio_BitRate, BitRate);
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_PS2A_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ps2Audio.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ps2Audio.h
deleted file mode 100644
index 9ea1fece5..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Ps2Audio.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Ps2AudioH
-#define MediaInfo_Ps2AudioH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Ps2Audio
-//***************************************************************************
-
-class File_Ps2Audio : public File__Analyze
-{
-private :
- //Buffer - Global
- void Read_Buffer_Continue();
-
- //Elements
- void SSbd();
- void SShd();
-
- //Temp
- int32u BitRate;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Rkau.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Rkau.cpp
deleted file mode 100644
index 5d45ae36a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Rkau.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_RKAU_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Rkau.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Rkau::File_Rkau()
-:File__Analyze(), File__Tags_Helper()
-{
- //File__Tags_Helper
- Base=this;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Rkau::Streams_Finish()
-{
- //Filling
- int64u CompressedSize=File_Size-TagsSize;
- float32 CompressionRatio=((float32)UncompressedSize)/CompressedSize;
-
- Fill(Stream_Audio, 0, Audio_StreamSize, CompressedSize);
- Fill(Stream_Audio, 0, Audio_Compression_Ratio, CompressionRatio);
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "VBR");
-
- File__Tags_Helper::Streams_Finish();
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Rkau::FileHeader_Begin()
-{
- if (!File__Tags_Helper::FileHeader_Begin())
- return false;
-
- //Synchro
- if (Buffer_Offset+3>Buffer_Size)
- return false;
- if (CC3(Buffer+Buffer_Offset)!=0x524B41) //"RKA"
- {
- File__Tags_Helper::Reject("RKAU");
- return false;
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Rkau::FileHeader_Parse()
-{
- //Parsing
- Ztring version;
- int32u SampleRate, source_bytes;
- int8u Channels, BitsPerSample, Quality, Flags;
- bool joint_stereo, streaming, vrq_lossy_mode;
-
- Skip_Local(3, "Signature");
- Get_Local (1, version, "Version");
- Get_L4 (source_bytes, "SourceBytes");
- Get_L4 (SampleRate, "SampleRate");
- Get_L1 (Channels, "Channels");
- Get_L1 (BitsPerSample, "BitsPerSample");
- Get_L1 (Quality, "Quality");
- Get_L1 (Flags, "Flags");
- Get_Flags (Flags, 0, joint_stereo, "JointStereo");
- Get_Flags (Flags, 1, streaming, "Streaming");
- Get_Flags (Flags, 2, vrq_lossy_mode, "VRQLossyMode");
-
- FILLING_BEGIN();
- if (SampleRate==0)
- return;
- Duration=(((int64u)source_bytes*1000)/4)/SampleRate;
- if (Duration==0)
- return;
- UncompressedSize = ((int64u)Channels) * ((int64u)BitsPerSample / 8);
- if (UncompressedSize==0)
- return;
-
- //Filling data
- File__Tags_Helper::Accept("RKAU");
-
- File__Tags_Helper::Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "RK Audio");
- Fill(Stream_Audio, 0, Audio_Codec, "Rkau");
- Fill(Stream_Audio, 0, Audio_Encoded_Library, __T("1.0") + version);
- Fill(Stream_Audio, 0, Audio_Compression_Mode, (Quality==0)?"Lossless":"Lossy");
- Fill(Stream_Audio, 0, Audio_BitDepth, BitsPerSample);
- Fill(Stream_Audio, 0, Audio_Channel_s_, Channels);
- Fill(Stream_Audio, 0, Audio_SamplingRate, SampleRate);
- Fill(Stream_Audio, 0, Audio_Duration, Duration);
-
- FILLING_END();
-
- //No more needed data
- File__Tags_Helper::Finish("RKAU");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_RKAU_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Rkau.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Rkau.h
deleted file mode 100644
index 038d4b96d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Rkau.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about RKAU files
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_RkauH
-#define MediaInfo_File_RkauH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Rkau
-//***************************************************************************
-
-class File_Rkau : public File__Analyze, public File__Tags_Helper
-{
-public :
- //Constructor/Destructor
- File_Rkau();
-
-private :
- //Streams management
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Global
- void Read_Buffer_Continue() {File__Tags_Helper::Read_Buffer_Continue();}
-
- //Temp
- int64u Duration;
- int64u UncompressedSize;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ScreamTracker3.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ScreamTracker3.cpp
deleted file mode 100644
index ae54c06dd..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ScreamTracker3.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_S3M_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_ScreamTracker3.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_ScreamTracker3::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<44)
- return false; //Must wait for more data
-
- if (CC1(Buffer+28)!=0x1A || CC4(Buffer+44)!=0x5343524D) //"SCRM"
- {
- Reject("Scream Tracker 3");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_ScreamTracker3::Read_Buffer_Continue()
-{
- //Parsing
- Ztring SongName;
- int16u OrdNum, InsNum, PatNum, Flags, Special;
- int8u SoftwareVersionMajor, SoftwareVersionMinor, IS, TS;
- Get_Local(28, SongName, "Song name");
- Skip_L1( "0x1A");
- Skip_L1( "Type");
- Skip_L1( "Unknown");
- Skip_L1( "Unknown");
- Get_L2 (OrdNum, "Orders count");
- Get_L2 (InsNum, "Instruments count");
- Get_L2 (PatNum, "Paterns count");
- Get_L2 (Flags, "Flags");
- Skip_Flags(Flags, 0, "st2vibrato");
- Skip_Flags(Flags, 1, "st2tempo");
- Skip_Flags(Flags, 2, "amigaslides");
- Skip_Flags(Flags, 3, "0vol optimizations");
- Skip_Flags(Flags, 4, "amiga limits");
- Skip_Flags(Flags, 5, "enable filter/sfx with sb");
- Skip_Flags(Flags, 6, "st3.00 volumeslides");
- Skip_Flags(Flags, 7, "pecial custom data in file");
- Get_L1 (SoftwareVersionMajor, "Cwt/v (Major)");
- Get_L1 (SoftwareVersionMinor, "Cwt/v (Minor)");
- Skip_L2( "File format information");
- Skip_B4( "Signature");
- Skip_L1( "global volume");
- Get_L1 (IS, "Initial Speed");
- Get_L1 (TS, "Initial Temp");
- Skip_L1( "master volume");
- Skip_L1( "ultra click removal");
- Skip_L1( "Default channel pan positions are present");
- Skip_L1( "Unknown");
- Skip_L1( "Unknown");
- Skip_L1( "Unknown");
- Skip_L1( "Unknown");
- Skip_L1( "Unknown");
- Skip_L1( "Unknown");
- Skip_L1( "Unknown");
- Skip_L1( "Unknown");
- Get_L2 (Special, "Special");
- Skip_XX(32, "Channel settings");
- Skip_XX(OrdNum, "Orders");
- Skip_XX(InsNum*2, "Instruments");
- Skip_XX(PatNum*2, "Patterns");
-
- FILLING_BEGIN();
- Accept("Scream Tracker 3");
-
- Fill(Stream_General, 0, General_Format, "Scream Tracker 3");
- Fill(Stream_General, 0, General_Track, SongName);
- if ((SoftwareVersionMajor&0xF0)==0x10)
- Fill(Stream_General, 0, General_Encoded_Application, Ztring(__T("Scream Tracker ")+Ztring::ToZtring(SoftwareVersionMajor)+__T(".")+Ztring::ToZtring(SoftwareVersionMinor/16)+Ztring::ToZtring(SoftwareVersionMinor%16)));
- Fill(Stream_General, 0, "BPM", TS);
-
- Stream_Prepare(Stream_Audio);
-
- Finish("Scream Tracker 3");
- FILLING_END();
-
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_S3M_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ScreamTracker3.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ScreamTracker3.h
deleted file mode 100644
index df4faebb3..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_ScreamTracker3.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about ScreamTracker3 files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_ScreamTracker3H
-#define MediaInfo_File_ScreamTracker3H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_ScreamTracker3
-//***************************************************************************
-
-class File_ScreamTracker3 : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0302.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0302.cpp
deleted file mode 100644
index 6420878cd..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0302.cpp
+++ /dev/null
@@ -1,307 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_SMPTEST0302_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_SmpteSt0302.h"
-#if defined(MEDIAINFO_PCM_YES)
- #include "MediaInfo/Audio/File_Pcm.h"
-#endif
-#if defined(MEDIAINFO_SMPTEST0337_YES)
- #include "MediaInfo/Audio/File_SmpteSt0337.h"
-#endif
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-#if MEDIAINFO_DEMUX
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#endif //MEDIAINFO_EVENTS
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_SmpteSt0302::File_SmpteSt0302()
-:File__Analyze()
-{
- //Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Aes3;
- #endif //MEDIAINFO_EVENTS
- PTS_DTS_Needed=true;
- IsRawStream=true;
-}
-
-//---------------------------------------------------------------------------
-File_SmpteSt0302::~File_SmpteSt0302()
-{
- for (size_t Pos=0; Pos<Parsers.size(); Pos++)
- delete Parsers[Pos]; //Parsers[Pos]=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_SmpteSt0302::Streams_Accept()
-{
- // SMPTE ST 337
- {
- File_SmpteSt0337* SmpteSt0337=new File_SmpteSt0337();
- SmpteSt0337->Container_Bits=(4+bits_per_sample)*4;
- SmpteSt0337->Endianness='L';
- SmpteSt0337->Aligned=true;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_Level=4; //Intermediate
- SmpteSt0337->Demux_Level=2; //Container
- SmpteSt0337->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- Parsers.push_back(SmpteSt0337);
- }
-
- // Raw PCM
- {
- File_Pcm* Pcm=new File_Pcm();
- Pcm->Codec.From_Local("SMPTE ST 302");
- Pcm->BitDepth=(4+bits_per_sample)*4;
- Pcm->Channels=(1+number_channels)*2;
- Pcm->SamplingRate=48000;
- Pcm->Endianness='L';
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_Level=4; //Intermediate
- Pcm->Demux_Level=2; //Container
- Pcm->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- Parsers.push_back(Pcm);
- }
-
- // Init
- for (size_t Pos=0; Pos<Parsers.size(); Pos++)
- Open_Buffer_Init(Parsers[Pos]);
-}
-
-//---------------------------------------------------------------------------
-void File_SmpteSt0302::Streams_Fill()
-{
- if (Parsers.size()==1 && Parsers[0]->Status[IsAccepted])
- {
- Fill(Parsers[0]);
- Merge(*Parsers[0]);
- }
-
- for (size_t Pos=0; Pos<Count_Get(Stream_Audio); Pos++)
- if (Retrieve(Stream_Audio, Pos, Audio_MuxingMode).empty()) //TODO: put "SMPTE ST 302" in this field, the current name is there only for legacy
- Fill(Stream_Audio, 0, Audio_MuxingMode, "AES3");
-
- if (Count_Get(Stream_Audio)==1)
- {
- if (Retrieve(Stream_Audio, 0, Audio_BitRate).empty())
- Fill(Stream_Audio, 0, Audio_BitRate, (4+bits_per_sample)*(1+number_channels)*8*48000);
- if (Retrieve(Stream_Audio, 0, Audio_Format)==__T("PCM"))
- {
- Fill(Stream_Audio, 0, Audio_Codec, "AES3", Unlimited, true, true);
- Fill(Stream_Audio, 0, Audio_Codec_String, "AES3", Unlimited, true, true);
- Clear(Stream_Audio, 0, Audio_Codec_Family);
- }
- }
-
- Fill(Stream_Audio, 0, Audio_BitRate_Encoded, (5+bits_per_sample)*(1+number_channels)*8*48000);
- for (size_t Pos=1; Pos<Count_Get(Stream_Audio); Pos++)
- Fill(Stream_Audio, Pos, Audio_BitRate_Encoded, 0);
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-static inline int8u Reverse8(int n)
-{
- // Input: bit order is 76543210
- //Output: bit order is 45670123
- n=((n>>1)&0x55) | ((n<<1) & 0xaa);
- n=((n>>2)&0x33) | ((n<<2) & 0xcc);
- n=((n>>4)&0x0f) | ((n<<4) & 0xf0);
- return (int8u)n;
-}
-
-//---------------------------------------------------------------------------
-void File_SmpteSt0302::Read_Buffer_Continue()
-{
- //Parsing
- Get_B2 (audio_packet_size, "audio_packet_size");
- BS_Begin();
- Get_S1 (2, number_channels, "number_channels"); Param_Info2((1+number_channels)*2, " channels");
- Info_S1(8, channel_identification, "channel_identification");
- Get_S1 (2, bits_per_sample, "bits_per_sample"); Param_Info2((4+bits_per_sample)*4, " bits");
- Info_S1(4, alignment_bits, "alignment_bits");
- BS_End();
-
- //Enough data
- if (Element_Size<4+(int64u)audio_packet_size)
- {
- Element_Offset=0;
- Element_WaitForMoreData();
- return;
- }
-
- //Cohenrancy test
- if (Element_Size!=4+(int64u)audio_packet_size || bits_per_sample==3 || audio_packet_size%((1+number_channels)*(5+bits_per_sample)))
- {
- Trusted_IsNot("Wrong size");
- Skip_XX(Element_Size-4, "Problem?");
- return;
- }
-
- if (!Status[IsAccepted])
- Accept("SMPTE ST 302");
-
- //Decyphering
- size_t PcmSize=0;
- float64 Ratio=0;
- switch (bits_per_sample)
- {
- case 0 : PcmSize=audio_packet_size*4/5; Ratio=4.0/5.0; break;
- case 1 : PcmSize=audio_packet_size*5/6; Ratio=5.0/6.0; break;
- case 2 : PcmSize=audio_packet_size*6/7; Ratio=6.0/7.0; break;
- case 3 : Reject(); return;
- default: ;
- }
-
- int8u* Info=new int8u[PcmSize];
- size_t Info_Offset=0;
-
- while (Element_Offset<Element_Size)
- {
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
-
- switch (bits_per_sample)
- {
- case 0 : //16 bits
- // Source: L1L0 L3L2 R0XX R2R1 XXR3
- // Dest : 16LE / L1L0 L3L2 R1R0 R3R2
- Info[Info_Offset+0]= Reverse8(Buffer[Buffer_Pos+0]);
- Info[Info_Offset+1]= Reverse8(Buffer[Buffer_Pos+1]);
- Info[Info_Offset+2]=(Reverse8(Buffer[Buffer_Pos+3])<<4 ) | (Reverse8(Buffer[Buffer_Pos+2])>>4 );
- Info[Info_Offset+3]=(Reverse8(Buffer[Buffer_Pos+4])<<4 ) | (Reverse8(Buffer[Buffer_Pos+3])>>4 );
-
- Info_Offset+=4;
- Element_Offset+=5;
- break;
-
- case 1 : //20 bits
- // Source: L1L0 L3L2 XXL4 R1R0 R3R2 XXR4
- // Dest : 20LE / L1L0 L3L2 R0L4 R2R1 R4R3
- Info[Info_Offset+0]= Reverse8(Buffer[Buffer_Pos+0]) ;
- Info[Info_Offset+1]= Reverse8(Buffer[Buffer_Pos+1]) ;
- Info[Info_Offset+2]=(Reverse8(Buffer[Buffer_Pos+3])<<4 ) | (Reverse8(Buffer[Buffer_Pos+2])&0x0F);
- Info[Info_Offset+3]=(Reverse8(Buffer[Buffer_Pos+4])<<4 ) | (Reverse8(Buffer[Buffer_Pos+3])>>4 );
- Info[Info_Offset+4]=(Reverse8(Buffer[Buffer_Pos+5])<<4 ) | (Reverse8(Buffer[Buffer_Pos+4])>>4 );
-
- Info_Offset+=5;
- Element_Offset+=6;
- break;
-
- case 2 : //24 bits
- // Source: L1L0 L3L2 L5L4 R0XX R2R1 R4R3 XXR5
- // Dest : 16LE / L1L0 L3L2 L5L4 R1R0 R3R2 R5R4
- Info[Info_Offset+0] = Reverse8(Buffer[Buffer_Pos+0]) ;
- Info[Info_Offset+1] = Reverse8(Buffer[Buffer_Pos+1]) ;
- Info[Info_Offset+2] = Reverse8(Buffer[Buffer_Pos+2]) ;
- Info[Info_Offset+3] =(Reverse8(Buffer[Buffer_Pos+4])<<4 ) | (Reverse8(Buffer[Buffer_Pos+3])>>4 );
- Info[Info_Offset+4] =(Reverse8(Buffer[Buffer_Pos+5])<<4 ) | (Reverse8(Buffer[Buffer_Pos+4])>>4 );
- Info[Info_Offset+5] =(Reverse8(Buffer[Buffer_Pos+6])<<4 ) | (Reverse8(Buffer[Buffer_Pos+5])>>4 );
-
- Info_Offset+=6;
- Element_Offset+=7;
- break;
- default : ;
- }
- }
- Element_Offset=4;
-
- FrameInfo.PTS=FrameInfo.DTS;
- FrameInfo.DUR=((int64u)audio_packet_size)*1000000000/((1+number_channels)*(5+bits_per_sample)*48000);
-
- #if MEDIAINFO_DEMUX
- Demux_random_access=true;
- Demux(Info, Info_Offset, ContentType_MainStream);
- #endif //MEDIAINFO_DEMUX
-
- //Parsers
- for (size_t Pos=0; Pos<Parsers.size(); Pos++)
- {
- Parsers[Pos]->FrameInfo=FrameInfo;
- Open_Buffer_Continue(Parsers[Pos], Info, Info_Offset, true, Ratio);
-
- if (Parsers.size()>1 && Parsers[Pos]->Status[IsAccepted])
- {
- for (size_t Pos2=0; Pos2<Pos; Pos2++)
- delete Parsers[Pos2]; //Parsers[Pos2]=NULL;
- for (size_t Pos2=Pos+1; Pos2<Parsers.size(); Pos2++)
- delete Parsers[Pos2]; //Parsers[Pos2]=NULL;
- Parsers.resize(Pos+1);
- Parsers.erase(Parsers.begin(), Parsers.begin()+Parsers.size()-1);
- }
- }
- Element_Offset=Element_Size;
-
- delete[] Info;
-
- FrameInfo.DTS+=FrameInfo.DUR;
-
- //Filling
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- if (Parsers.size()>1 && Frame_Count>=2)
- {
- for (size_t Pos=0; Pos<Parsers.size()-1; Pos++)
- delete Parsers[Pos]; //Parsers[Pos]=NULL;
- Parsers.erase(Parsers.begin(), Parsers.begin()+Parsers.size()-1);
- }
-
- if (!Status[IsFilled] && Parsers.size()==1 && Parsers[0]->Status[IsFinished])
- {
- //Filling
- Finish("SMPTE ST 302");
- }
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_SMPTEST0302_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0302.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0302.h
deleted file mode 100644
index 2c7549ca7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0302.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about SMPTE ST0302
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_SmpteSt0302H
-#define MediaInfo_File_SmpteSt0302H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_SmpteSt0302
-//***************************************************************************
-
-class File_SmpteSt0302 : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_SmpteSt0302();
- ~File_SmpteSt0302();
-
-private :
- //Streams management
- void Streams_Accept();
- void Streams_Fill();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-
- //Temp
- int16u audio_packet_size;
- int8u number_channels;
- int8u bits_per_sample;
-
- //Parsers
- std::vector<File__Analyze*> Parsers;
- void Parsers_Init();
- void Parsers_Parse(const int8u* Parser_Buffer, size_t Parser_Buffer_Size);
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0331.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0331.cpp
deleted file mode 100644
index dee766da1..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0331.cpp
+++ /dev/null
@@ -1,227 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// AES3 PCM and non-PCM (SMPTE 337M)
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_SMPTEST0331_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_SmpteSt0331.h"
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-#if MEDIAINFO_SEEK
- #include "MediaInfo/MediaInfo_Internal.h"
-#endif //MEDIAINFO_SEEK
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Smpte_St0331_ChannelsPositions(int8u number_channels)
-{
- switch (number_channels)
- {
- case 2 : return "Front: L R"; //2 channels
- case 4 : return "Front: L C R, LFE"; //4 channels
- case 6 : return "Front: L C R, Side: L R, LFE"; //6 channels
- case 8 : return "Front: L C R, Side: L R, Back: L R, LFE"; //8 channels
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Smpte_St0331_ChannelsPositions2(int8u number_channels)
-{
- switch (number_channels)
- {
- case 2 : return "2/0/0.0"; //2 channels
- case 4 : return "3/0/0.1"; //4 channels
- case 6 : return "3/2/0.1"; //6 channels
- case 8 : return "3/2/2.1"; //8 channels
- default : return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_SmpteSt0331::File_SmpteSt0331()
-:File__Analyze()
-{
- //Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Aes3;
- #endif //MEDIAINFO_EVENTS
- PTS_DTS_Needed=true;
- IsRawStream=true;
-
- //In
- QuantizationBits=0;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_SmpteSt0331::Streams_Fill()
-{
- int8u Channels_Count=0;
- for (int8u Pos=0; Pos<8; Pos++)
- if (Channels_valid&(1<<Pos))
- Channels_Count++;
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "PCM");
- Fill(Stream_Audio, 0, Audio_Codec, "PCM");
- Fill(Stream_Audio, 0, Audio_SamplingRate, 48000);
- Fill(Stream_Audio, 0, Audio_BitRate, 8*32*48000);
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
-
- Fill(Stream_Audio, 0, Audio_Format_Settings_Endianness, "Little");
- Fill(Stream_Audio, 0, Audio_Channel_s_, Channels_Count);
- Fill(Stream_Audio, 0, Audio_ChannelPositions, Smpte_St0331_ChannelsPositions(Channels_Count));
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, Smpte_St0331_ChannelsPositions2(Channels_Count));
- if (QuantizationBits)
- Fill(Stream_Audio, 0, Audio_BitDepth, QuantizationBits);
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_SmpteSt0331::Read_Buffer_Continue()
-{
- if (!Status[IsAccepted])
- Accept("SMPTE ST 331");
-
- //SMPTE 331M
- BS_Begin();
- Skip_SB( "FVUCP Valid Flag");
- Skip_S1(4, "Reserved");
- Skip_S1(3, "5-sequence count");
- BS_End();
- Skip_L2( "Audio Sample Count");
- Get_B1 (Channels_valid, "Channels valid");
-
- if (QuantizationBits && Element_Offset<Element_Size)
- {
- int8u* Info = new int8u[(size_t)((Element_Size - Element_Offset)*((QuantizationBits == 16) ? 2 : 3) / 4)];
- size_t Info_Offset=0;
-
- while (Element_Offset+8*4<=Element_Size)
- {
- for (int8u Pos=0; Pos<8; Pos++)
- {
- if (Channels_valid&(1<<Pos))
- {
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
-
- if (QuantizationBits==16)
- {
- Info[Info_Offset+0] = (Buffer[Buffer_Pos+1]>>4) | ((Buffer[Buffer_Pos+2]<<4)&0xF0 );
- Info[Info_Offset+1] = (Buffer[Buffer_Pos+2]>>4) | ((Buffer[Buffer_Pos+3]<<4)&0xF0 );
- }
- else
- {
- Info[Info_Offset+0] = (Buffer[Buffer_Pos+0]>>4) | ((Buffer[Buffer_Pos+1]<<4)&0xF0 );
- Info[Info_Offset+1] = (Buffer[Buffer_Pos+1]>>4) | ((Buffer[Buffer_Pos+2]<<4)&0xF0 );
- Info[Info_Offset+2] = (Buffer[Buffer_Pos+2]>>4) | ((Buffer[Buffer_Pos+3]<<4)&0xF0 );
- }
-
- Info_Offset+=QuantizationBits==16?2:3;
- }
- Element_Offset+=4;
- }
- }
- Element_Offset=4;
-
- #if MEDIAINFO_DEMUX
- OriginalBuffer_Size=(size_t)Element_Size;
- OriginalBuffer=(int8u*)(Buffer+Buffer_Offset);
-
- FrameInfo.PTS=FrameInfo.DTS;
- FrameInfo.DUR=(Element_Size-4)*1000000000/48000/32; // 48 kHz, 4 bytes per sample
- Demux_random_access=true;
- Element_Code=(int64u)-1;
- Element_Offset=0;
- Demux(Info, Info_Offset, ContentType_MainStream);
- Element_Offset=4;
-
- OriginalBuffer_Size=0;
- OriginalBuffer=NULL;
- #endif //MEDIAINFO_DEMUX
-
- delete[] Info;
- }
-
- Skip_XX(Element_Size-4, "Data");
-
- Frame_Count_InThisBlock++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- #if MEDIAINFO_DEMUX
- if (FrameInfo.DTS!=(int64u)-1 && FrameInfo.DUR!=(int64u)-1)
- {
- FrameInfo.DTS+=FrameInfo.DUR;
- FrameInfo.PTS=FrameInfo.DTS;
- }
- #endif //MEDIAINFO_DEMUX
-
- FILLING_BEGIN();
- if (!Status[IsAccepted])
- {
- Accept("AES3");
-
- int8u Channels=0;
- for (int8u Pos=0; Pos<8; Pos++)
- {
- if (Channels_valid&(1<<Pos))
- Channels++;
- Element_Offset+=4;
- }
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "PCM");
- Fill(Stream_Audio, 0, Audio_Channel_s_, Channels);
- }
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_SMPTEST0331_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0331.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0331.h
deleted file mode 100644
index e9c70e71b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0331.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about SMPTE ST 331 streams
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_SmpteSt0331H
-#define MediaInfo_File_SmpteSt0331H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_SmpteSt0331
-//***************************************************************************
-
-class File_SmpteSt0331 : public File__Analyze
-{
-public :
- //In
- int32u QuantizationBits;
-
- //Constructor/Destructor
- File_SmpteSt0331();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-
- //Temp
- int8u Channels_valid;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0337.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0337.cpp
deleted file mode 100644
index 2302b3cea..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0337.cpp
+++ /dev/null
@@ -1,1324 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_SMPTEST0337_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_SmpteSt0337.h"
-#if defined(MEDIAINFO_AAC_YES)
- #include "MediaInfo/Audio/File_Aac.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_DOLBYE_YES)
- #include "MediaInfo/Audio/File_DolbyE.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif // MEDIAINFO_EVENTS
-#if MEDIAINFO_SEEK
- #include "MediaInfo/MediaInfo_Internal.h"
-#endif // MEDIAINFO_SEEK
-#include "MediaInfo/File_Unknown.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Smpte_St0337_data_type[32]= // SMPTE ST 338
-{
- "",
- "AC-3",
- "Time stamp",
- "Pause",
- "MPEG Audio",
- "MPEG Audio",
- "MPEG Audio",
- "AAC",
- "MPEG Audio",
- "MPEG Audio",
- "AAC",
- "AAC",
- "",
- "",
- "",
- "",
- "E-AC-3",
- "",
- "",
- "AAC",
- "",
- "E-AC-3",
- "",
- "",
- "",
- "",
- "Utility",
- "KLV",
- "Dolby E",
- "Captioning",
- "User defined",
- "",
-};
-
-//---------------------------------------------------------------------------
-stream_t Smpte_St0337_data_type_StreamKind[32]= // SMPTE 338M
-{
- Stream_Max,
- Stream_Audio,
- Stream_Max,
- Stream_Max,
- Stream_Audio,
- Stream_Audio,
- Stream_Audio,
- Stream_Max,
- Stream_Audio,
- Stream_Audio,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Max,
- Stream_Menu,
- Stream_Audio,
- Stream_Text,
- Stream_Max,
- Stream_Max,
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_SmpteSt0337::File_SmpteSt0337()
-:File__Analyze()
-{
- // Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Aes3;
- #endif // MEDIAINFO_EVENTS
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=256*1024;
- PTS_DTS_Needed=true;
-
- // In
- Container_Bits=0;
- Endianness=0x00;
- Aligned=false;
-
- // Temp
- FrameRate=0;
- Stream_Bits=0;
- data_type=(int8u)-1;
- GuardBand_Before=0;
- GuardBand_After=0;
- NullPadding_Size=0;
-
- // Parser
- Parser=NULL;
-
- #if MEDIAINFO_SEEK
- Duration_Detected=false;
- #endif // MEDIAINFO_SEEK
-}
-
-//---------------------------------------------------------------------------
-File_SmpteSt0337::~File_SmpteSt0337()
-{
- delete Parser; // Parser=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_SmpteSt0337::Streams_Accept()
-{
- Fill(Stream_General, 0, General_Format, "AES3");
- Fill(Stream_General, 0, General_OverallBitRate_Mode, "CBR");
-}
-
-//---------------------------------------------------------------------------
-void File_SmpteSt0337::Streams_Fill()
-{
- if (Parser && Parser->Status[IsAccepted])
- {
- Fill(Parser);
- Merge(*Parser);
-
- int64u OverallBitRate=Parser->Retrieve(Stream_General, 0, General_OverallBitRate).To_int64u();
- if (OverallBitRate)
- {
- OverallBitRate*=Element_Size; OverallBitRate/=Element_Size-Stream_Bits*4/8;
- Fill(Stream_General, 0, General_OverallBitRate, Ztring::ToZtring(OverallBitRate)+__T(" / ")+Parser->Retrieve(Stream_General, 0, General_OverallBitRate));
- }
- if (Parser->Count_Get(Stream_Audio))
- FrameRate=Retrieve(Stream_Audio, 0, Audio_FrameRate).To_float64();
- }
- else if (data_type!=(int8u)-1)
- {
- if (Retrieve(Stream_Audio, 0, Audio_Format).empty() && Smpte_St0337_data_type_StreamKind[data_type]!=Stream_Max)
- {
- Stream_Prepare(Smpte_St0337_data_type_StreamKind[data_type]);
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Format), Smpte_St0337_data_type[data_type]);
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Codec), Smpte_St0337_data_type[data_type]);
- }
- }
-
- // Guard band
- if (GuardBand_Before) // With guard band, there is big chances that AES3 bit rate is respected
- {
- Fill(Stream_General, 0, General_OverallBitRate, Container_Bits*2*48000);
- if (!IsSub && File_Size!=(int64u)-1)
- Fill(Stream_General, 0, General_Duration, ((float64)File_Size)*8/(Container_Bits*2*48000)*1000);
- }
-
- if (FrameRate && FrameSizes.size()==1)
- {
- Fill(Stream_General, 0, General_OverallBitRate, FrameSizes.begin()->first*Container_Bits*FrameRate, 0);
- }
-
- for (size_t Pos=0; Pos<Count_Get(StreamKind_Last); Pos++)
- {
- if (Endianness=='L' && Retrieve(StreamKind_Last, Pos, "Format_Settings_Endianness")==__T("Little"))
- Endianness='B';
- switch (Endianness)
- {
- case 'B' :
- Fill(StreamKind_Last, Pos, "Format_Settings", "Big");
- Fill(StreamKind_Last, Pos, "Format_Settings_Endianness", "Big", Unlimited, true, true);
- break;
- case 'L' :
- Fill(StreamKind_Last, Pos, "Format_Settings", "Little");
- Fill(StreamKind_Last, Pos, "Format_Settings_Endianness", "Little", Unlimited, true, true);
- break;
- default : ;
- }
- Fill(StreamKind_Last, Pos, "Format_Settings_Mode", Container_Bits);
- if (Retrieve(StreamKind_Last, Pos, Fill_Parameter(StreamKind_Last, Generic_BitDepth)).empty())
- Fill(StreamKind_Last, Pos, Fill_Parameter(StreamKind_Last, Generic_BitDepth), Stream_Bits);
-
- Fill(StreamKind_Last, Pos, "MuxingMode", "AES3");
- if (Retrieve(StreamKind_Last, Pos, Fill_Parameter(StreamKind_Last, Generic_BitRate_Mode))!=__T("CBR"))
- Fill(StreamKind_Last, Pos, Fill_Parameter(StreamKind_Last, Generic_BitRate_Mode), "CBR");
- if (File_Size!=(int64u)-1 && FrameSizes.size()==1)
- Fill(StreamKind_Last, Pos, Fill_Parameter(StreamKind_Last, Generic_FrameCount), File_Size/FrameSizes.begin()->first);
- if (Retrieve(StreamKind_Last, Pos, Fill_Parameter(StreamKind_Last, Generic_Duration)).empty())
- Fill(StreamKind_Last, Pos, Fill_Parameter(StreamKind_Last, Generic_Duration), Retrieve(Stream_General, 0, General_Duration));
- }
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-#if MEDIAINFO_SEEK
-//---------------------------------------------------------------------------
-void File_SmpteSt0337::Read_Buffer_Unsynched()
-{
- if (Frame_Count_NotParsedIncluded!=(int64u)-1 && FrameRate)
- {
- Frame_Count_NotParsedIncluded=float64_int64s(File_GoTo/FrameRate);
- FrameInfo.DTS=Frame_Count_NotParsedIncluded*1000000000/48000;
- }
-}
-#endif // MEDIAINFO_SEEK
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_SmpteSt0337::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- // Init
- if (!Duration_Detected)
- {
- MediaInfo_Internal MI;
- MI.Option(__T("File_KeepInfo"), __T("1"));
- Ztring ParseSpeed_Save=MI.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI.Option(__T("Demux_Get"), __T(""));
- MI.Option(__T("ParseSpeed"), __T("0"));
- MI.Option(__T("Demux"), Ztring());
- size_t MiOpenResult=MI.Open(File_Name);
- MI.Option(__T("ParseSpeed"), ParseSpeed_Save); // This is a global value, need to reset it. TODO: local value
- MI.Option(__T("Demux"), Demux_Save); // This is a global value, need to reset it. TODO: local value
- if (!MiOpenResult)
- return 0;
-
- FrameRate=MI.Get(Stream_Audio, 0, __T("FrameRate")).To_float64();
-
- Duration_Detected=true;
- }
-
- // Parsing
- switch (Method)
- {
- case 0 :
- if (FrameRate)
- {
- float64 FrameSize=3072000/FrameRate;
- int64u FrameCount=float64_int64s(Value/FrameSize);
- Value=float64_int64s(FrameCount*FrameSize);
- }
- GoTo(Value);
- Open_Buffer_Unsynch();
- return 1;
- case 1 :
- return Read_Buffer_Seek(0, File_Size*Value/10000, ID);
- case 2 : // Timestamp
- {
- if (FrameRate)
- return (size_t)-1; // Not supported
-
- {
- float64 FrameSize=3072000/FrameRate;
- Unsynch_Frame_Count=float64_int64s(((float64)Value)/1000000000*FrameRate);
- GoTo(float64_int64s(Unsynch_Frame_Count*FrameSize));
- Open_Buffer_Unsynch();
- return 1;
- }
- }
- case 3 : // FrameNumber
- {
- if (FrameRate)
- return (size_t)-1; // Not supported
-
- {
- float64 FrameSize=3072000/FrameRate;
- Unsynch_Frame_Count=Value;
- GoTo(float64_int64s(Unsynch_Frame_Count*FrameSize));
- Open_Buffer_Unsynch();
- return 1;
- }
- }
- default : return (size_t)-1; // Not supported
- }
-}
-#endif // MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_SmpteSt0337::Synchronize()
-{
- // Guard band
- size_t Buffer_Offset_Base=Buffer_Offset;
-
- // Synchronizing
- while (Buffer_Offset+16<=Buffer_Size)
- {
- if (!Status[IsAccepted] && !IsSub && File_Offset_FirstSynched==(int64u)-1 && Buffer_TotalBytes+Buffer_Offset>=Buffer_TotalBytes_FirstSynched_Max)
- {
- Reject();
- return false;
- }
-
- if ((Container_Bits==0 || Container_Bits==16) && (!Aligned || ((Buffer_TotalBytes+Buffer_Offset)%4)==0))
- {
- if (Buffer[Buffer_Offset ]==0xF8
- && Buffer[Buffer_Offset+1]==0x72
- && Buffer[Buffer_Offset+2]==0x4E
- && Buffer[Buffer_Offset+3]==0x1F) // 16-bit, BE
- {
- Container_Bits=16;
- Stream_Bits=16;
- Endianness='B'; // BE
- break; // while()
- }
- if (Buffer[Buffer_Offset ]==0x72
- && Buffer[Buffer_Offset+1]==0xF8
- && Buffer[Buffer_Offset+2]==0x1F
- && Buffer[Buffer_Offset+3]==0x4E) // 16-bit, LE
- {
- Container_Bits=16;
- Stream_Bits=16;
- Endianness='L'; // LE
- break; // while()
- }
- }
- if ((Container_Bits==0 || Container_Bits==20) && (!Aligned || ((Buffer_TotalBytes+Buffer_Offset)%5)==0))
- {
- if (Buffer[Buffer_Offset ]==0x6F
- && Buffer[Buffer_Offset+1]==0x87
- && Buffer[Buffer_Offset+2]==0x25
- && Buffer[Buffer_Offset+3]==0x4E
- && Buffer[Buffer_Offset+4]==0x1F) // 20-bit, BE
- {
- Container_Bits=20;
- Stream_Bits=20;
- Endianness='B'; // BE
- break; // while()
- }
- }
- if ((Container_Bits==0 || Container_Bits==20) && (!Aligned || ((Buffer_TotalBytes+Buffer_Offset)%5)==0))
- {
- if (Buffer[Buffer_Offset ]==0x72
- && Buffer[Buffer_Offset+1]==0xF8
- && Buffer[Buffer_Offset+2]==0xF6
- && Buffer[Buffer_Offset+3]==0xE1
- && Buffer[Buffer_Offset+4]==0x54) // 20-bit, LE
- {
- Container_Bits=20;
- Stream_Bits=20;
- Endianness='L'; // BE
- break; // while()
- }
- }
- if ((Container_Bits==0 || Container_Bits==24) && (!Aligned || ((Buffer_TotalBytes+Buffer_Offset)%6)==0))
- {
- if (Buffer[Buffer_Offset ]==0x96
- && Buffer[Buffer_Offset+1]==0xF8
- && Buffer[Buffer_Offset+2]==0x72
- && Buffer[Buffer_Offset+3]==0xA5
- && Buffer[Buffer_Offset+4]==0x4E
- && Buffer[Buffer_Offset+5]==0x1F) // 24-bit, BE
- {
- Container_Bits=24;
- Stream_Bits=24;
- Endianness='B'; // BE
- break; // while()
- }
- if (Buffer[Buffer_Offset ]==0x72
- && Buffer[Buffer_Offset+1]==0xF8
- && Buffer[Buffer_Offset+2]==0x96
- && Buffer[Buffer_Offset+3]==0x1F
- && Buffer[Buffer_Offset+4]==0x4E
- && Buffer[Buffer_Offset+5]==0xA5) // 24-bit, LE
- {
- Container_Bits=24;
- Stream_Bits=24;
- Endianness='L'; // LE
- break; // while()
- }
- if (Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0xF8
- && Buffer[Buffer_Offset+2]==0x72
- && Buffer[Buffer_Offset+3]==0x00
- && Buffer[Buffer_Offset+4]==0x4E
- && Buffer[Buffer_Offset+5]==0x1F) // 16-bit in 24-bit, BE
- {
- Container_Bits=24;
- Stream_Bits=16;
- Endianness='B'; // BE
- NullPadding_Size=1;
- break; // while()
- }
- if (Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x72
- && Buffer[Buffer_Offset+2]==0xF8
- && Buffer[Buffer_Offset+3]==0x00
- && Buffer[Buffer_Offset+4]==0x1F
- && Buffer[Buffer_Offset+5]==0x4E) // 16-bit in 24-bit, LE
- {
- Container_Bits=24;
- Stream_Bits=16;
- Endianness='L'; // LE
- NullPadding_Size=1;
- break; // while()
- }
- if (Buffer[Buffer_Offset ]==0x6F
- && Buffer[Buffer_Offset+1]==0x87
- && Buffer[Buffer_Offset+2]==0x20
- && Buffer[Buffer_Offset+3]==0x54
- && Buffer[Buffer_Offset+4]==0xE1
- && Buffer[Buffer_Offset+5]==0xF0) // 20-bit in 24-bit, BE
- {
- Container_Bits=24;
- Stream_Bits=20;
- Endianness='B'; // BE
- break; // while()
- }
- if (Buffer[Buffer_Offset ]==0x20
- && Buffer[Buffer_Offset+1]==0x87
- && Buffer[Buffer_Offset+2]==0x6F
- && Buffer[Buffer_Offset+3]==0xF0
- && Buffer[Buffer_Offset+4]==0xE1
- && Buffer[Buffer_Offset+5]==0x54) // 20-bit in 24-bit, LE
- {
- Container_Bits=24;
- Stream_Bits=20;
- Endianness='L'; // LE
- break; // while()
- }
- }
- if ((Container_Bits==0 || Container_Bits==32) && (!Aligned || ((Buffer_TotalBytes+Buffer_Offset)%8)==0))
- {
- if (Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0xF8
- && Buffer[Buffer_Offset+3]==0x72
- && Buffer[Buffer_Offset+4]==0x00
- && Buffer[Buffer_Offset+5]==0x00
- && Buffer[Buffer_Offset+6]==0x4E
- && Buffer[Buffer_Offset+7]==0x1F) // 16-bit in 32-bit, BE
- {
- Container_Bits=32;
- Stream_Bits=16;
- Endianness='B'; // BE
- NullPadding_Size=2;
- break; // while()
- }
- if (Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0x72
- && Buffer[Buffer_Offset+3]==0xF8
- && Buffer[Buffer_Offset+4]==0x00
- && Buffer[Buffer_Offset+5]==0x00
- && Buffer[Buffer_Offset+6]==0x1F
- && Buffer[Buffer_Offset+7]==0x4E) // 16-bit in 32-bit, LE
- {
- Container_Bits=32;
- Stream_Bits=16;
- Endianness='L'; // LE
- NullPadding_Size=2;
- break; // while()
- }
- if (Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x6F
- && Buffer[Buffer_Offset+2]==0x87
- && Buffer[Buffer_Offset+3]==0x20
- && Buffer[Buffer_Offset+4]==0x00
- && Buffer[Buffer_Offset+5]==0x54
- && Buffer[Buffer_Offset+6]==0xE1
- && Buffer[Buffer_Offset+7]==0xF0) // 20-bit in 32-bit, BE
- {
- Container_Bits=32;
- Stream_Bits=20;
- Endianness='B'; // BE
- NullPadding_Size=1;
- break; // while()
- }
- if (Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x20
- && Buffer[Buffer_Offset+2]==0x87
- && Buffer[Buffer_Offset+3]==0x6F
- && Buffer[Buffer_Offset+4]==0x00
- && Buffer[Buffer_Offset+5]==0xF0
- && Buffer[Buffer_Offset+6]==0xE1
- && Buffer[Buffer_Offset+7]==0x54) // 20-bit in 32-bit, LE
- {
- Container_Bits=32;
- Stream_Bits=20;
- Endianness='L'; // LE
- NullPadding_Size=1;
- break; // while()
- }
- if (Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x96
- && Buffer[Buffer_Offset+2]==0xF8
- && Buffer[Buffer_Offset+3]==0x72
- && Buffer[Buffer_Offset+4]==0x00
- && Buffer[Buffer_Offset+5]==0xA5
- && Buffer[Buffer_Offset+6]==0x4E
- && Buffer[Buffer_Offset+7]==0x1F) // 24-bit in 32-bit, BE
- {
- Container_Bits=32;
- Stream_Bits=24;
- Endianness='B'; // BE
- NullPadding_Size=1;
- break; // while()
- }
- if (Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x72
- && Buffer[Buffer_Offset+2]==0xF8
- && Buffer[Buffer_Offset+3]==0x96
- && Buffer[Buffer_Offset+4]==0x00
- && Buffer[Buffer_Offset+5]==0x1F
- && Buffer[Buffer_Offset+6]==0x4E
- && Buffer[Buffer_Offset+7]==0xA5) // 24-bit in 32-bit, LE
- {
- Container_Bits=32;
- Stream_Bits=24;
- Endianness='L'; // LE
- NullPadding_Size=1;
- break; // while()
- }
- }
-
- if (Container_Bits>=4 && Aligned)
- Buffer_Offset+=Container_Bits/4;
- else
- Buffer_Offset++;
- }
-
- // Guard band
- GuardBand_Before+=Buffer_Offset-Buffer_Offset_Base;
-
- // Parsing last bytes if needed
- if (Buffer_Offset+16>Buffer_Size)
- {
- return false;
- }
-
- if (!Status[IsAccepted])
- Accept("AES3");
-
- // Synched
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_SmpteSt0337::Synched_Test()
-{
- // Skip NULL padding
- size_t Buffer_Offset_Temp=Buffer_Offset;
- if (Aligned)
- {
- if (Container_Bits==16)
- {
- while ((Buffer_TotalBytes+Buffer_Offset_Temp)%4) // Padding in part of the AES3 block
- {
- if (Buffer_Offset_Temp+1>Buffer_Size)
- {
- Element_WaitForMoreData();
- return false;
- }
- if (Buffer[Buffer_Offset_Temp])
- {
- Trusted_IsNot("Bad sync");
- return true;
- }
- Buffer_Offset_Temp++;
- }
- while(Buffer_Offset_Temp+4<=Buffer_Size && CC4(Buffer+Buffer_Offset_Temp)==0x00000000)
- Buffer_Offset_Temp+=4;
- if (Buffer_Offset_Temp+4>Buffer_Size)
- {
- Element_WaitForMoreData();
- return false;
- }
- }
- if (Container_Bits==20)
- {
- while ((Buffer_TotalBytes+Buffer_Offset_Temp)%5) // Padding in part of the AES3 block
- {
- if (Buffer_Offset_Temp+1>Buffer_Size)
- {
- Element_WaitForMoreData();
- return false;
- }
- if (Buffer[Buffer_Offset_Temp])
- {
- Trusted_IsNot("Bad sync");
- return true;
- }
- Buffer_Offset_Temp++;
- }
- while(Buffer_Offset_Temp+5<=Buffer_Size && CC5(Buffer+Buffer_Offset_Temp)==0x0000000000LL)
- Buffer_Offset_Temp+=5;
- if (Buffer_Offset_Temp+5>Buffer_Size)
- {
- Element_WaitForMoreData();
- return false;
- }
- }
- if (Container_Bits==24)
- {
- while ((Buffer_TotalBytes+Buffer_Offset_Temp)%6) // Padding in part of the AES3 block
- {
- if (Buffer_Offset_Temp+1>Buffer_Size)
- {
- Element_WaitForMoreData();
- return false;
- }
- if (Buffer[Buffer_Offset_Temp])
- {
- Trusted_IsNot("Bad sync");
- return true;
- }
- Buffer_Offset_Temp++;
- }
- while(Buffer_Offset_Temp+6<=Buffer_Size && CC6(Buffer+Buffer_Offset_Temp)==0x000000000000LL)
- Buffer_Offset_Temp+=6;
- if (Buffer_Offset_Temp+6>Buffer_Size)
- {
- Element_WaitForMoreData();
- return false;
- }
- }
- else if (Container_Bits==32)
- {
- while ((Buffer_TotalBytes+Buffer_Offset_Temp)%8) // Padding in part of the AES3 block
- {
- if (Buffer_Offset_Temp+1>Buffer_Size)
- {
- Element_WaitForMoreData();
- return false;
- }
- if (Buffer[Buffer_Offset_Temp])
- {
- Trusted_IsNot("Bad sync");
- return true;
- }
- Buffer_Offset_Temp++;
- }
- while(Buffer_Offset_Temp+8<=Buffer_Size && CC8(Buffer+Buffer_Offset_Temp)==0x0000000000000000LL)
- Buffer_Offset_Temp+=8;
- if (Buffer_Offset_Temp+8>Buffer_Size)
- {
- Element_WaitForMoreData();
- return false;
- }
- }
- }
- else
- {
- while(Buffer_Offset_Temp+NullPadding_Size<Buffer_Size && !Buffer[Buffer_Offset_Temp+NullPadding_Size])
- Buffer_Offset_Temp++;
- if (Buffer_Offset_Temp+NullPadding_Size>=Buffer_Size)
- {
- Element_WaitForMoreData();
- return false;
- }
- }
-
- #if MEDIAINFO_TRACE
- if (Buffer_Offset_Temp-Buffer_Offset)
- {
- Element_Size=Buffer_Offset_Temp-Buffer_Offset;
- Skip_XX(Buffer_Offset_Temp-Buffer_Offset, "Guard band");
-
- GuardBand_Before+=Buffer_Offset_Temp-Buffer_Offset;
- }
- #endif // MEDIAINFO_TRACE
- Buffer_Offset=Buffer_Offset_Temp;
-
- // Must have enough buffer for having header
- if (Buffer_Offset+16>Buffer_Size)
- return false;
-
- // Quick test of synchro
- switch (Endianness)
- {
- case 'B' :
- switch (Container_Bits)
- {
- case 16 : if (CC4(Buffer+Buffer_Offset)!=0xF8724E1F) {Synched=false; return true;} break;
- case 20 : if (CC5(Buffer+Buffer_Offset)!=0x6F87254E1FLL) {Synched=false; return true;} break;
- case 24 :
- switch (Stream_Bits)
- {
- case 16 : if (CC6(Buffer+Buffer_Offset)!=0x00F872004E1FLL) {Synched=false; return true;} break;
- case 20 : if (CC6(Buffer+Buffer_Offset)!=0x6F872054E1F0LL) {Synched=false; return true;} break;
- case 24 : if (CC6(Buffer+Buffer_Offset)!=0x96F872A54E1FLL) {Synched=false; return true;} break;
- default : ;
- }
- break;
- case 32 :
- switch (Stream_Bits)
- {
- case 16 : if (CC8(Buffer+Buffer_Offset)!=0x0000F87200004E1FLL) {Synched=false; return true;} break;
- case 20 : if (CC8(Buffer+Buffer_Offset)!=0x006F87200054E1F0LL) {Synched=false; return true;} break;
- case 24 : if (CC8(Buffer+Buffer_Offset)!=0x0096F87200A5F41FLL) {Synched=false; return true;} break;
- default : ;
- }
- break;
- default : ;
- }
- break;
- case 'L' :
- switch (Container_Bits)
- {
- case 16 : if (CC4(Buffer+Buffer_Offset)!=0x72F81F4E) {Synched=false; return true;} break;
- case 20 : if (CC5(Buffer+Buffer_Offset)!=0x72F8F6E154LL) {Synched=false; return true;} break;
- case 24 :
- switch (Stream_Bits)
- {
- case 16 : if (CC6(Buffer+Buffer_Offset)!=0x0072F8001F4ELL) {Synched=false; return true;} break;
- case 20 : if (CC6(Buffer+Buffer_Offset)!=0x20876FF0E154LL) {Synched=false; return true;} break;
- case 24 : if (CC6(Buffer+Buffer_Offset)!=0x72F8961F4EA5LL) {Synched=false; return true;} break;
- default : ;
- }
- break;
- case 32 :
- switch (Stream_Bits)
- {
- case 16 : if (CC8(Buffer+Buffer_Offset)!=0x000072F800001F4ELL) {Synched=false; return true;} break;
- case 20 : if (CC8(Buffer+Buffer_Offset)!=0x0020876F00F0E154LL) {Synched=false; return true;} break;
- case 24 : if (CC8(Buffer+Buffer_Offset)!=0x0072F896001F4EA5LL) {Synched=false; return true;} break;
- default : ;
- }
- break;
- default : ;
- }
- break;
- default : ; // Should never happen
- }
-
- // We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_SmpteSt0337::Synched_Init()
-{
- if (Frame_Count_NotParsedIncluded==(int64u)-1)
- Frame_Count_NotParsedIncluded=0;
- if (FrameInfo.DTS==(int64u)-1)
- FrameInfo.DTS=0;
-}
-
-//***************************************************************************
-// Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_SmpteSt0337::Header_Parse()
-{
- // Parsing
- int32u Size=0;
- switch (Endianness)
- {
- case 'B' :
- switch (Container_Bits)
- {
- case 16 : Size=BigEndian2int16u(Buffer+Buffer_Offset+6) ; break;
- case 20 : Size=BigEndian2int24u(Buffer+Buffer_Offset+7)&0x0FFFFF; break;
- case 24 :
- switch (Stream_Bits)
- {
- case 16 : Size=BigEndian2int16u(Buffer+Buffer_Offset+9) ; break;
- case 20 : Size=BigEndian2int24u(Buffer+Buffer_Offset+9)>>4; break;
- case 24 : Size=BigEndian2int24u(Buffer+Buffer_Offset+9) ; break;
- default : ;
- }
- break;
- case 32 :
- switch (Stream_Bits)
- {
- case 16 : Size=BigEndian2int16u(Buffer+Buffer_Offset+0xE) ; break;
- case 20 : Size=BigEndian2int24u(Buffer+Buffer_Offset+0xD)>>4; break;
- case 24 : Size=BigEndian2int24u(Buffer+Buffer_Offset+0xD) ; break;
- default : ;
- }
- break;
- default : ;
- }
- break;
- case 'L' :
- switch (Container_Bits)
- {
- case 16 : Size=LittleEndian2int16u(Buffer+Buffer_Offset+6) ; break;
- case 20 : Size=LittleEndian2int24u(Buffer+Buffer_Offset+7)>>4; break;
- case 24 :
- switch (Stream_Bits)
- {
- case 16 : Size=LittleEndian2int16u(Buffer+Buffer_Offset+0xA) ; break;
- case 20 : Size=LittleEndian2int24u(Buffer+Buffer_Offset+0x9)>>4; break;
- case 24 : Size=LittleEndian2int24u(Buffer+Buffer_Offset+0x9) ; break;
- default : ;
- }
- break;
- case 32 :
- switch (Stream_Bits)
- {
- case 16 : Size=LittleEndian2int16u(Buffer+Buffer_Offset+0xE) ; break;
- case 20 : Size=LittleEndian2int24u(Buffer+Buffer_Offset+0xD)>>4; break;
- case 24 : Size=LittleEndian2int24u(Buffer+Buffer_Offset+0xD) ; break;
- default : ;
- }
- break;
- default : ;
- }
- break;
- default : ; // Should never happen
- }
-
- // Adaptation
- if (Container_Bits!=Stream_Bits)
- {
- Size*=Container_Bits; Size/=Stream_Bits;
- GuardBand_Before*=Container_Bits; GuardBand_Before/=Stream_Bits;
- }
-
- // Coherency test
- if (!IsSub && !Status[IsAccepted])
- {
- size_t Offset=Buffer_Offset+(size_t)(Container_Bits*4/8+Size/8);
- while (Offset<Buffer_Size && Buffer[Offset]==0x00)
- Offset++;
- if (Offset+Container_Bits/4>Buffer_Size)
- {
- Element_WaitForMoreData();
- return;
- }
- Offset/=Container_Bits/4;
- Offset*=Container_Bits/4;
- bool IsOK=true;
- for (int8u Pos=0; Pos<Container_Bits/4; Pos++)
- if (Buffer[Buffer_Offset+Pos]!=Buffer[Offset+Pos])
- {
- IsOK=false;
- break;
- }
- if (!IsOK)
- {
- Trusted_IsNot("Bad sync");
- Buffer_Offset++;
- return;
- }
- }
-
- // Filling
- Header_Fill_Size(Container_Bits*4/8+Size/8);
- Header_Fill_Code(0, "AES3");
-
- //Guard band
- if (IsSub && FrameInfo.DTS!=(int64u)-1)
- GuardBand_After+=Element_Size-(Container_Bits*4/8+Size/8);
-}
-
-//---------------------------------------------------------------------------
-void File_SmpteSt0337::Data_Parse()
-{
- #if MEDIAINFO_DEMUX
- FrameInfo.PTS=FrameInfo.DTS;
- Demux_random_access=true;
- Element_Code=(int64u)-1;
- #endif //MEDIAINFO_DEMUX
-
- // Adapting
- const int8u* Save_Buffer=NULL;
- size_t Save_Buffer_Offset=0;
- size_t Save_Buffer_Size=0;
- int64u Save_Element_Size=0;
-
- if (Endianness=='L'|| Container_Bits!=Stream_Bits)
- {
- int8u* Info=new int8u[(size_t)Element_Size];
- int8u* Info_Temp=Info;
-
- if (Endianness=='L' && Container_Bits==16 && Stream_Bits==16)
- {
- // Source: 16LE / L1L0 L3L2 R1R0 R3R2
- // Dest : 16BE / L3L2 L1L0 R3R2 R1R0
- while (Element_Offset+4<=Element_Size)
- {
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
-
- *(Info_Temp++)= Buffer[Buffer_Pos+1] ;
- *(Info_Temp++)= Buffer[Buffer_Pos ] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+3] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+2] ;
-
- Element_Offset+=4;
- }
- if (Element_Offset+2<=Element_Size) // Only in half of the AES3 stream
- {
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
-
- *(Info_Temp++)= Buffer[Buffer_Pos+1] ;
- *(Info_Temp++)= Buffer[Buffer_Pos ] ;
-
- Element_Offset+=2;
- }
- }
-
- if (Endianness=='L' && Container_Bits==20 && Stream_Bits==20)
- {
- // Source: 20LE / L1L0 L3L2 R0L4 R2R1 R4R3
- // Dest : 20BE / L4L3 L2L1 L0R4 R3R2 R1R0
- while (Element_Offset+5<=Element_Size)
- {
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
-
- *(Info_Temp++)=(Buffer[Buffer_Pos+2]<<4 ) | (Buffer[Buffer_Pos+1]>>4 );
- *(Info_Temp++)=(Buffer[Buffer_Pos+1]<<4 ) | (Buffer[Buffer_Pos+0]>>4 );
- *(Info_Temp++)=(Buffer[Buffer_Pos+0]<<4 ) | (Buffer[Buffer_Pos+4]>>4 );
- *(Info_Temp++)=(Buffer[Buffer_Pos+4]<<4 ) | (Buffer[Buffer_Pos+3]>>4 );
- *(Info_Temp++)=(Buffer[Buffer_Pos+3]<<4 ) | (Buffer[Buffer_Pos+2]>>4 );
-
- Element_Offset+=5;
- }
- }
-
- if (Endianness=='L' && Container_Bits==24 && Stream_Bits==16)
- {
- // Source: XXXX L1L0 L3L2 XXXX R1R0 R3R2
- // Dest : 16BE / L3L2 L1L0 R3R2 R1R0
- while (Element_Offset+6<=Element_Size)
- {
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
-
- *(Info_Temp++)= Buffer[Buffer_Pos+2] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+1] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+5] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+4] ;
-
- Element_Offset+=6;
- }
- }
-
- if (Endianness=='L' && Container_Bits==24 && Stream_Bits==20)
- {
- // Source: L0XX L2L1 L4L3 R0XX R2R1 R4R3
- // Dest : 20BE / L4L3 L2L1 L0R4 R3R2 R1R0
- while (Element_Offset+6<=Element_Size)
- {
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
-
- *(Info_Temp++)= Buffer[Buffer_Pos+2] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+1] ;
- *(Info_Temp++)=(Buffer[Buffer_Pos ]&0xF0) | (Buffer[Buffer_Pos+5]>>4 );
- *(Info_Temp++)=(Buffer[Buffer_Pos+5]<<4 ) | (Buffer[Buffer_Pos+4]>>4 );
- *(Info_Temp++)=(Buffer[Buffer_Pos+4]<<4 ) | (Buffer[Buffer_Pos+3]>>4 );
-
- Element_Offset+=6;
- }
- }
-
- if (Endianness=='L' && Container_Bits==24 && Stream_Bits==24)
- {
- // Source: 24LE / L1L0 L3L2 L5L3 R1R0 R3R2 R5R4
- // Dest : 24BE / L5L3 L3L2 L1L0 R5R4 R3R2 R1R0
- while (Element_Offset+6<=Element_Size)
- {
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
-
- *(Info_Temp++)= Buffer[Buffer_Pos+2] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+1] ;
- *(Info_Temp++)= Buffer[Buffer_Pos ] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+5] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+4] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+3] ;
-
- Element_Offset+=6;
- }
- }
-
- if (Endianness=='L' && Container_Bits==32 && Stream_Bits==16)
- {
- // Source: XXXX XXXX L1L0 L3L2 XXXX XXXX R1R0 R3R2
- // Dest : 16BE / L3L2 L1L0 R3R2 R1R0
- while (Element_Offset+8<=Element_Size)
- {
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
-
- *(Info_Temp++)= Buffer[Buffer_Pos+3] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+2] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+7] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+6] ;
-
- Element_Offset+=8;
- }
- }
- if (Endianness=='L' && Container_Bits==32 && Stream_Bits==20)
- {
- // Source: XXXX L0XX L2L1 L4L3 XXXX R0XX R2R1 R4R3
- // Dest : 20BE / L4L3 L2L1 L0R4 R3R2 R1R0
- while (Element_Offset+8<=Element_Size)
- {
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
-
- *(Info_Temp++)= Buffer[Buffer_Pos+3] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+2] ;
- *(Info_Temp++)=(Buffer[Buffer_Pos+1]&0xF0) | (Buffer[Buffer_Pos+7]>>4 );
- *(Info_Temp++)=(Buffer[Buffer_Pos+7]<<4 ) | (Buffer[Buffer_Pos+6]>>4 );
- *(Info_Temp++)=(Buffer[Buffer_Pos+6]<<4 ) | (Buffer[Buffer_Pos+5]>>4 );
-
- Element_Offset+=8;
- }
- }
-
- if (Endianness=='L' && Container_Bits==32 && Stream_Bits==24)
- {
- // Source: XXXX L1L0 L3L2 L5L3 XXXX R1R0 R3R2 R5R4
- // Dest : 24BE / L5L3 L3L2 L1L0 R5R4 R3R2 R1R0
- while (Element_Offset+8<=Element_Size)
- {
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
-
- *(Info_Temp++)= Buffer[Buffer_Pos+3] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+2] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+1] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+7] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+6] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+5] ;
-
- Element_Offset+=8;
- }
- }
-
- if (Endianness=='B' && Container_Bits==24 && Stream_Bits==20)
- {
- // Source: L4L3 L2L1 L0XX R4R3 R2R1 R0XX
- // Dest : 20BE / L4L3 L2L1 L0R4 R3R2 R1R0
- while (Element_Offset+6<=Element_Size)
- {
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
-
- *(Info_Temp++)= Buffer[Buffer_Pos ] ;
- *(Info_Temp++)= Buffer[Buffer_Pos+1] ;
- *(Info_Temp++)=(Buffer[Buffer_Pos+2]&0xF0) | (Buffer[Buffer_Pos+3]>>4 );
- *(Info_Temp++)=(Buffer[Buffer_Pos+3]<<4 ) | (Buffer[Buffer_Pos+4]>>4 );
- *(Info_Temp++)=(Buffer[Buffer_Pos+4]<<4 ) | (Buffer[Buffer_Pos+5]>>4 );
-
- Element_Offset+=6;
- }
- }
-
- Save_Buffer=Buffer;
- Save_Buffer_Offset=Buffer_Offset;
- Save_Buffer_Size=Buffer_Size;
- Save_Element_Size=Element_Size;
- File_Offset+=Buffer_Offset;
- Buffer=Info;
- Buffer_Offset=0;
- Buffer_Size=Info_Temp-Info;
- Element_Offset=0;
- Element_Size=Buffer_Size;
- }
-
- // Parsing
- int32u length_code;
- Element_Begin1("Header");
- BS_Begin();
- Skip_S3(Stream_Bits, "Pa");
- Skip_S3(Stream_Bits, "Pb");
- Element_Begin1("Pc");
- Skip_S1( 3, "data_stream_number");
- Skip_S1( 5, "data_type_dependent");
- Skip_SB( "error_flag");
- Info_S1( 2, data_mode, "data_mode"); Param_Info2(16+4*data_mode, " bits");
- Get_S1 ( 5, data_type, "data_type"); Param_Info1(Smpte_St0337_data_type[data_type]);
- if (Stream_Bits>16)
- Skip_S1( 4, "reserved");
- if (Stream_Bits>20)
- Skip_S1( 4, "reserved");
- Element_End0();
- Get_S3 (Stream_Bits, length_code, "length_code"); Param_Info2(length_code/8, " bytes");
- BS_End();
- Element_End0();
-
- if (Parser==NULL)
- {
- switch(data_type)
- {
- // SMPTE ST338
- case 1 : // AC-3
- case 16 : // E-AC-3 (professional)
- case 21 : // E-AC-3 (consumer)
- Parser=new File_Ac3();
- ((File_Ac3*)Parser)->Frame_Count_Valid=2;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- break;
- case 4 : // MPEG-1 Layer 1
- case 5 : // MPEG-1 Layer 2/3, MPEG-2 Layer 1/2/3 without extension
- case 6 : // MPEG-2 Layer 1/2/3 with extension
- case 8 : // MPEG-2 Layer 1 low frequency
- case 9 : // MPEG-2 Layer 2/3 low frequency
- Parser=new File_Mpega();
- break;
- case 7 : // MPEG-2 AAC in ADTS
- case 19 : // MPEG-2 AAC in ADTS low frequency
- #if defined(MEDIAINFO_AAC_YES)
- Parser=new File_Aac();
- ((File_Aac*)Parser)->Mode=File_Aac::Mode_ADTS;
- #else
- {
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "AAC");
- Parser->Fill(Stream_Audio, 0, Audio_MuxingMode, "ADTS");
- }
- #endif //defined(MEDIAINFO_AAC_YES)
- break;
- case 10 : // MPEG-4 AAC in ADTS or LATM
- case 11 : // MPEG-4 AAC in ADTS or LATM
- #if defined(MEDIAINFO_AAC_YES)
- Parser=new File_Aac();
- #else
- {
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "AAC");
- }
- #endif //defined(MEDIAINFO_AAC_YES)
- break;
- case 28 : // Dolby E
- Parser=new File_DolbyE();
- break;
- default : ;
- }
-
- if (Parser)
- {
- Open_Buffer_Init(Parser);
- }
- }
-
- #if MEDIAINFO_DEMUX
- if (Save_Buffer)
- {
- std::swap(Buffer, Save_Buffer);
- std::swap(Buffer_Offset, Save_Buffer_Offset);
- std::swap(Buffer_Size, Save_Buffer_Size);
- std::swap(Element_Size, Save_Element_Size);
- File_Offset-=Buffer_Offset;
- }
-
- if (data_type==28) //If Dolby E, we must demux the SMPTE ST 337 header too (TODO: add an option for forcing SMPTE ST 337 header)
- {
- int64u Demux_Element_Offset=Element_Offset;
- Element_Offset=0;
-
- if (Container_Bits==20)
- {
- //We must pad to 24 bits
- int8u* Info2=new int8u[(size_t)Element_Size*6/5];
- size_t Info2_Offset=0;
- const int8u* Demux_Buffer=Buffer+Buffer_Offset;
- size_t Demux_Buffer_Size=(size_t)Element_Size;
- size_t Demux_Buffer_Pos=0;
-
- // Source: 20LE L1L0 L3L2 R0L4 R2R1 R4R3
- // Dest : L0XX L2L1 L4L3 R0XX R2R1 R4R3
- while (Demux_Buffer_Pos+5<=Demux_Buffer_Size)
- {
- Info2[Info2_Offset+0]= Demux_Buffer[Demux_Buffer_Pos+0]<<4 ;
- Info2[Info2_Offset+1]=(Demux_Buffer[Demux_Buffer_Pos+1]<<4 ) | (Demux_Buffer[Demux_Buffer_Pos+0]>>4 );
- Info2[Info2_Offset+2]=(Demux_Buffer[Demux_Buffer_Pos+2]<<4 ) | (Demux_Buffer[Demux_Buffer_Pos+1]>>4 );
- Info2[Info2_Offset+3]= Demux_Buffer[Demux_Buffer_Pos+2]&0xF0 ;
- Info2[Info2_Offset+4]= Demux_Buffer[Demux_Buffer_Pos+3] ;
- Info2[Info2_Offset+5]= Demux_Buffer[Demux_Buffer_Pos+4] ;
-
- Info2_Offset+=6;
- Demux_Buffer_Pos+=5;
- }
-
- Demux(Info2, Info2_Offset, ContentType_MainStream);
-
- delete[] Info2;
- }
- else
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
-
- Element_Offset=Demux_Element_Offset;
- }
- else
- Demux(Buffer+Buffer_Offset+Container_Bits/2, (size_t)(Element_Size-Container_Bits/2), ContentType_MainStream);
-
- if (Save_Buffer)
- {
- File_Offset+=Buffer_Offset;
- std::swap(Buffer, Save_Buffer);
- std::swap(Buffer_Offset, Save_Buffer_Offset);
- std::swap(Buffer_Size, Save_Buffer_Size);
- std::swap(Element_Size, Save_Element_Size);
- }
- #endif //MEDIAINFO_DEMUX
-
- if (Parser && !Parser->Status[IsFinished])
- {
- switch(data_type)
- {
- case 28 :
- ((File_DolbyE*)Parser)->GuardBand_Before+=GuardBand_Before;
- ((File_DolbyE*)Parser)->GuardBand_After+=GuardBand_After;
- break;
- default : ;
- }
-
- Parser->FrameInfo=FrameInfo;
- Open_Buffer_Continue(Parser, Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset));
- Element_Offset=Element_Size;
- #if MEDIAINFO_DEMUX
- FrameInfo.DUR=Parser->FrameInfo.DUR;
- if (FrameInfo.DUR!=(int64u)-1)
- FrameInfo.DTS+=FrameInfo.DUR;
- else
- FrameInfo.DTS=(int64u)-1;
- FrameInfo.PTS=FrameInfo.DTS;
- #endif // MEDIAINFO_DEMUX
- }
- else
- {
- Skip_XX(Element_Size-Element_Offset, "Data");
- }
-
- FILLING_BEGIN();
- FrameSizes[IsSub?Buffer_Size:((GuardBand_Before+Element_Size)*Container_Bits/Stream_Bits)]++;
-
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
-
- if (Parser==NULL || (Frame_Count>=2 && Parser->Status[IsFilled]))
- Fill("AES3");
- if (Parser==NULL || (Frame_Count>=2 && Parser->Status[IsFinished]))
- Finish("AES3");
- FILLING_END();
-
- if (Save_Buffer)
- {
- delete[] Buffer;
- Buffer=Save_Buffer;
- Buffer_Offset=Save_Buffer_Offset;
- Buffer_Size=Save_Buffer_Size;
- File_Offset-=Buffer_Offset;
- }
-
- // Guard band
- GuardBand_Before=0;
- GuardBand_After=0;
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} // NameSpace
-
-#endif // MEDIAINFO_SMPTEST0337_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0337.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0337.h
deleted file mode 100644
index cd98039d3..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_SmpteSt0337.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Non-PCM Audio and Data in an AES3
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_SmpteSt0337H
-#define MediaInfo_File_SmpteSt0337H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_SmpteSt0337
-//***************************************************************************
-
-class File_SmpteSt0337 : public File__Analyze
-{
-public :
- // In
- int8u Container_Bits;
- int8u Endianness;
- bool Aligned;
-
- // Constructor/Destructor
- File_SmpteSt0337();
- ~File_SmpteSt0337();
-
-private :
- // Streams management
- void Streams_Accept();
- void Streams_Fill();
-
- // Buffer - Global
- #if MEDIAINFO_SEEK
- void Read_Buffer_Unsynched();
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif // MEDIAINFO_SEEK
-
- // Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
- void Synched_Init();
-
- // Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- // Elements
- void Raw();
- void Frame();
- void Frame_WithPadding();
- void Frame_FromMpegPs();
-
- // Temp
- float64 FrameRate;
- int8u Stream_Bits;
- int8u data_type;
- std::map<int64u, int64u> FrameSizes;
- int64u GuardBand_Before;
- int64u GuardBand_After;
- size_t NullPadding_Size;
-
- // Parser
- File__Analyze* Parser;
- void Parser_Parse(const int8u* Parser_Buffer, size_t Parser_Buffer_Size);
-
- #if MEDIAINFO_SEEK
- bool Duration_Detected;
- #endif // MEDIAINFO_SEEK
-};
-
-} // NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Speex.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Speex.cpp
deleted file mode 100644
index f611d6455..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Speex.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Note : the buffer must be given in ONE call
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_SPEEX_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Speex.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Speex::File_Speex()
-:File__Analyze()
-{
- //Internal
- Identification_Done=false;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Speex::Header_Parse()
-{
- //Filling
- Header_Fill_Code(0, "Speex");
- Header_Fill_Size(Element_Size);
-}
-
-//---------------------------------------------------------------------------
-void File_Speex::Data_Parse()
-{
- //Parsing
- if (Identification_Done)
- Comment();
- else
- Identification();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Speex::Identification()
-{
- Element_Name("Identification");
-
- //Parsing
- Ztring speex_version;
- int32u Speex_version_id, header_size, rate, nb_channels, bitrate, vbr;
- Skip_Local(8, "speex_string");
- Get_Local(20, speex_version, "speex_version");
- Get_L4 (Speex_version_id, "Speex_version_id");
- if (Speex_version_id==1)
- {
- Get_L4 (header_size, "header_size");
- Get_L4 (rate, "rate");
- Skip_L4( "mode");
- Skip_L4( "mode_bitstream_version");
- Get_L4 (nb_channels, "nb_channels");
- Get_L4 (bitrate, "bitrate");
- Skip_L4( "frame_size");
- Get_L4 (vbr, "vbr");
- Skip_L4( "frames_per_packet");
- Skip_L4( "extra_headers");
- Skip_L4( "reserved1");
- Skip_L4( "reserved2");
- if (header_size<Element_Size)
- Skip_XX(Element_Size-header_size, "Unknown");
-
- //Filling
- FILLING_BEGIN();
- Accept("Speex");
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "Speex");
- Fill(Stream_Audio, 0, Audio_Codec, "Speex");
- if (Speex_version_id==1)
- {
- if (!speex_version.empty())
- Fill(Stream_Audio, 0, Audio_Encoded_Library, speex_version);
- Fill(Stream_Audio, 0, Audio_SamplingRate, rate);
- Fill(Stream_Audio, 0, Audio_Channel_s_, nb_channels);
- if (bitrate!=(int32u)-1)
- Fill(Stream_Audio, 0, Audio_BitRate, bitrate);
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, vbr?"VBR":"CBR");
- }
- FILLING_END();
- }
-
- //Filling
- Identification_Done=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Speex::Comment()
-{
- Element_Name("Comment?");
-
- while (Element_Offset<Element_Size)
- {
- Ztring value;
- int32u size;
- Get_L4(size, "size");
- if (size)
- Get_Local(size, value, "value");
-
- //Filling
- if (!value.empty())
- Fill(Stream_Audio, 0, "Comment", value);
- }
-
- Finish("Speex");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_SPEEX_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Speex.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Speex.h
deleted file mode 100644
index 9f38f3b92..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Speex.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Speex files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_SpeexH
-#define MediaInfo_File_SpeexH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Speex
-//***************************************************************************
-
-class File_Speex : public File__Analyze
-{
-public :
- File_Speex();
-
-private :
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Identification();
- void Comment();
-
- //Temp
- bool Identification_Done;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tak.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tak.cpp
deleted file mode 100644
index 8a0492a8e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tak.cpp
+++ /dev/null
@@ -1,303 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Tak files
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-// Specifications : http://linuxstb.cream.org/tak_format.html
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_TAK_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Tak.h"
-#if defined(MEDIAINFO_RIFF_YES)
- #include "MediaInfo/Multiple/File_Riff.h"
-#endif
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Const
-//***************************************************************************
-
-namespace Elements
-{
- const int16u ENDOFMETADATA =0x00;
- const int16u STREAMINFO =0x01;
- const int16u SEEKTABLE =0x02;
- const int16u WAVEMETADATA =0x03;
- const int16u ENCODERINFO =0x04;
- const int16u PADDING =0x05;
-}
-
-//***************************************************************************
-// Const
-//***************************************************************************
-
-int8u Tak_samplesize[]=
-{
- 8,
- 16,
- 24,
- 0,
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Tak::File_Tak()
-:File__Analyze(), File__Tags_Helper()
-{
- //File__Tags_Helper
- Base=this;
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Tak::FileHeader_Begin()
-{
- if (!File__Tags_Helper::FileHeader_Begin())
- return false;
-
- //Synchro
- if (Buffer_Offset+4>Buffer_Size)
- return false;
- if (CC4(Buffer+Buffer_Offset)!=0x7442614B) //"tBaK"
- {
- File__Tags_Helper::Reject("TAK");
- return false;
- }
-
- return true;
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Tak::FileHeader_Parse()
-{
- Skip_C4( "Signature");
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Tak::Header_Parse()
-{
- //Parsing
- int32u block_length;
- int8u block_type;
- Get_L1 (block_type, "Block Type");
- Get_L3 (block_length, "Block Length");
-
- //Filling
- Header_Fill_Code(block_type, Ztring().From_CC1(block_type));
- Header_Fill_Size(Element_Offset+block_length);
-}
-
-//---------------------------------------------------------------------------
-void File_Tak::Data_Parse()
-{
- #define CASE_INFO(_NAME) \
- case Elements::_NAME : Element_Info1(#_NAME); _NAME(); break;
-
- //Parsing
- switch (Element_Code)
- {
- CASE_INFO(ENDOFMETADATA);
- CASE_INFO(STREAMINFO);
- CASE_INFO(SEEKTABLE);
- CASE_INFO(WAVEMETADATA);
- CASE_INFO(ENCODERINFO);
- CASE_INFO(PADDING);
- default : Skip_XX(Element_Size, "Data");
- }
-
- Element_Offset=Element_Size;
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Tak::ENDOFMETADATA()
-{
- //Filling
- Fill(Stream_General, 0, General_StreamSize, 0); //File_Offset+Buffer_Offset+Element_Size);
- Fill(Stream_Audio, 0, Audio_StreamSize, File_Size-(File_Offset+Buffer_Offset+Element_Size));
- File__Tags_Helper::Finish("TAK");
-}
-
-//---------------------------------------------------------------------------
-void File_Tak::STREAMINFO()
-{
- //Parsing
- int32u num_samples_hi, samplerate;
- int8u num_samples_lo, framesizecode, samplesize;
- bool channels;
-
- Skip_L1 ( "unknown");
- BS_Begin();
- Get_S1 ( 2, num_samples_lo, "num_samples (lo)");
- Get_S1 ( 3, framesizecode, "framesizecode");
- Skip_S1( 2, "unknown");
- BS_End();
- Get_L4 (num_samples_hi, "num_samples (hi)"); Param_Info2((((int64u)num_samples_hi)<<2 | num_samples_lo), " samples");
- Get_L3 (samplerate, "samplerate"); Param_Info2((samplerate/16)+6000, " Hz");
- BS_Begin();
- Skip_S1( 4, "unknown");
- Get_SB ( channels, "channels"); Param_Info1(channels?"Stereo":"Mono");
- Get_S1 ( 2, samplesize, "samplesize"); Param_Info1(Tak_samplesize[samplesize]);
- Skip_SB( "unknown");
- BS_End();
- Skip_L3( "crc");
-
- FILLING_BEGIN();
- //Coherency
- if (samplerate==0)
- return;
-
- //Computing
- int64u Samples=((int64u)num_samples_hi)<<2 | num_samples_lo;
- int32u SamplingRate=(samplerate/16)+6000;
-
- //Filling
- File__Tags_Helper::Accept("TAK");
-
- File__Tags_Helper::Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "TAK");
- Fill(Stream_Audio, 0, Audio_Codec, "TAK");
- Fill(Stream_Audio, 0, Audio_SamplingRate, SamplingRate);
- Fill(Stream_Audio, 0, Audio_Channel_s_, channels?2:1);
- if (Tak_samplesize[samplesize])
- Fill(Stream_Audio, 0, Audio_BitDepth, Tak_samplesize[samplesize]);
- Fill(Stream_Audio, 0, Audio_Duration, Samples*1000/SamplingRate);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Tak::SEEKTABLE()
-{
- //Parsing
- int16u num_seekpoints;
- Get_L2 (num_seekpoints, "num_seekpoints");
- Skip_L1 ( "unknown");
- Skip_L1 ( "seek interval");
- Element_Begin1("seekpoints");
- for (int16u Pos=0; Pos<num_seekpoints; Pos++)
- Skip_L5 ( "seekpoint");
- Element_End0();
- Skip_L3( "crc");
-}
-
-//---------------------------------------------------------------------------
-void File_Tak::WAVEMETADATA()
-{
- //Parsing
- int32u HeaderLength, FooterLength;
- Get_L3 (HeaderLength, "HeaderLength");
- Get_L3 (FooterLength, "FooterLength");
- #if defined(MEDIAINFO_RIFF_YES)
- //Creating the parser
- File_Riff MI;
- Open_Buffer_Init(&MI);
-
- //Parsing
- Open_Buffer_Continue(&MI, HeaderLength);
- Element_Offset+=HeaderLength;
-
- //Filling
- //Finish(&MI);
- //Merge(MI, StreamKind_Last, 0, StreamPos_Last);
-
- //The RIFF header is for PCM
- //Clear(Stream_Audio, StreamPos_Last, Audio_ID);
- //Fill(Stream_Audio, StreamPos_Last, Audio_Format, "TAK", Unlimited, true, true);
- //Fill(Stream_Audio, StreamPos_Last, Audio_Codec, "TAK", Unlimited, true, true);
- //Clear(Stream_Audio, StreamPos_Last, Audio_CodecID);
- //Clear(Stream_Audio, StreamPos_Last, Audio_CodecID_Hint);
- //Clear(Stream_Audio, StreamPos_Last, Audio_CodecID_Url);
- //Clear(Stream_Audio, StreamPos_Last, Audio_BitRate);
- //Clear(Stream_Audio, StreamPos_Last, Audio_BitRate_Mode);
- //Clear(Stream_Audio, StreamPos_Last, Audio_Codec_CC);
- #else
- Skip_XX(HeaderLength, "Wave header");
- #endif
- if (FooterLength)
- Skip_XX(FooterLength, "Wave footer");
- Skip_L3( "crc");
-}
-
-//---------------------------------------------------------------------------
-void File_Tak::ENCODERINFO()
-{
- //Parsing
- int8u Revision, Minor, Major, Preset_hi, Preset_lo;
- Get_L1 (Revision, "Revision");
- Get_L1 (Minor, "Minor");
- Get_L1 (Major, "Major");
- BS_Begin();
- Get_S1 (4, Preset_hi, "Preset (hi)");
- Get_S1 (4, Preset_lo, "Preset (lo)");
- BS_End();
-
- FILLING_BEGIN();
- Ztring Version=Ztring::ToZtring(Major)+__T('.')+Ztring::ToZtring(Minor)+__T('.')+Ztring::ToZtring(Revision);
- Ztring Preset=__T("-p")+Ztring::ToZtring(Preset_lo);
- switch (Preset_hi)
- {
- case 0x00 : break;
- case 0x01 : Preset+=__T('e'); break;
- case 0x02 : Preset+=__T('m'); break;
- default : Preset+=__T('-')+Ztring::ToZtring(Preset_hi, 16); //Unknown
- }
-
- Fill(Stream_Audio, 0, Audio_Encoded_Library, "TAK");
- Fill(Stream_Audio, 0, Audio_Encoded_Library_String, __T("TAK ")+Version);
- Fill(Stream_Audio, 0, Audio_Encoded_Library_Name, "TAK");
- Fill(Stream_Audio, 0, Audio_Encoded_Library_Version, Version);
- Fill(Stream_Audio, 0, Audio_Encoded_Library_Settings, Preset);
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_TAK_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tak.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tak.h
deleted file mode 100644
index a3d75274d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tak.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Tak files
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_TakH
-#define MediaInfo_File_TakH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Tak
-//***************************************************************************
-
-class File_Tak : public File__Analyze, public File__Tags_Helper
-{
-public :
- //In
- bool VorbisHeader;
-
- //Constructor/Destructor
- File_Tak();
-
-private :
- //Streams management
- void Streams_Finish() {File__Tags_Helper::Streams_Finish();}
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Global
- void Read_Buffer_Continue() {File__Tags_Helper::Read_Buffer_Continue();}
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void ENDOFMETADATA();
- void STREAMINFO();
- void SEEKTABLE();
- void WAVEMETADATA();
- void ENCODERINFO();
- void PADDING() {Skip_XX(Element_Size, "Padding");}
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tta.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tta.cpp
deleted file mode 100644
index d77e73403..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tta.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Source : http://tta.sourceforge.net/codec.format
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_TTA_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Tta.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Tta::File_Tta()
-:File__Analyze(), File__Tags_Helper()
-{
- //File__Tags_Helper
- Base=this;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Tta::Streams_Finish()
-{
- //Filling
- int64u CompressedSize=File_Size-TagsSize;
- float32 CompressionRatio=((float32)UncompressedSize)/CompressedSize;
-
- Fill(Stream_Audio, 0, Audio_StreamSize, CompressedSize);
- Fill(Stream_Audio, 0, Audio_Compression_Ratio, CompressionRatio);
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "VBR");
-
- File__Tags_Helper::Streams_Finish();
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Tta::FileHeader_Begin()
-{
- if (!File__Tags_Helper::FileHeader_Begin())
- return false;
-
- //Synchro
- if (Buffer_Offset+4>Buffer_Size)
- return false;
- if (CC4(Buffer+Buffer_Offset)!=0x54544131) //"TTA1"
- {
- File__Tags_Helper::Reject("TTA");
- return false;
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Tta::FileHeader_Parse()
-{
- //Parsing
- int32u SampleRate, Samples, CRC32;
- int16u AudioFormat, Channels, BitsPerSample;
- Skip_C4( "Signature");
- Get_L2 (AudioFormat, "AudioFormat");
- Get_L2 (Channels, "NumChannels");
- Get_L2 (BitsPerSample, "BitsPerSample");
- Get_L4 (SampleRate, "SampleRate");
- Get_L4 (Samples, "DataLength");
- Get_L4 (CRC32, "CRC32");
-
- FILLING_BEGIN();
- if (SampleRate==0)
- return;
- Duration=((int64u)Samples)*1000/SampleRate;
- if (Duration==0)
- return;
- UncompressedSize=((int64u)Samples)*Channels*(BitsPerSample/8);
- if (UncompressedSize==0)
- return;
-
- //Filling data
- File__Tags_Helper::Accept("TTA");
-
- File__Tags_Helper::Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "TTA");
- Fill(Stream_Audio, 0, Audio_Codec, "TTA ");
- Fill(Stream_Audio, 0, Audio_BitDepth, BitsPerSample);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Channels);
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, SampleRate);
- Fill(Stream_Audio, 0, Audio_Duration, Duration);
- FILLING_END();
-
- //No more need data
- File__Tags_Helper::Finish("TTA");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_TTA_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tta.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tta.h
deleted file mode 100644
index 72c9c85d8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Tta.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about TTA files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_TtaH
-#define MediaInfo_File_TtaH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Tta
-//***************************************************************************
-
-class File_Tta : public File__Analyze, public File__Tags_Helper
-{
-public :
- //Constructor/Destructor
- File_Tta();
-
-private :
- //Streams management
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Global
- void Read_Buffer_Continue() {File__Tags_Helper::Read_Buffer_Continue();}
-
- //Temp
- int64u Duration;
- int64u UncompressedSize;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_TwinVQ.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_TwinVQ.cpp
deleted file mode 100644
index 989506546..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_TwinVQ.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Source: http://wiki.multimedia.cx/index.php?title=VQF
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_TWINVQ_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_TwinVQ.h"
-#include "ZenLib/Utils.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* TwinVQ_samplerate(int32u samplerate)
-{
- switch (samplerate)
- {
- case 11 : return "11025";
- case 22 : return "22050";
- case 44 : return "44100";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-namespace Elements
-{
- const int32u _c__=0x28632920;
- const int32u AUTH=0x41555448;
- const int32u COMM=0x434F4D4D;
- const int32u COMT=0x434F4D54;
- const int32u DATA=0x44415441;
- const int32u DSIZ=0x4453495A;
- const int32u FILE=0x46494C45;
- const int32u NAME=0x4E414D45;
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_TwinVQ::FileHeader_Begin()
-{
- //Testing
- if (Buffer_Offset+4>Buffer_Size)
- return false;
- if (CC4(Buffer+Buffer_Offset)!=0x5457494E) //"TWIN"
- {
- Reject("TwinVQ");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_TwinVQ::FileHeader_Parse()
-{
- //Parsing
- Skip_C4( "magic");
- Skip_Local(8, "version");
- Skip_B4( "subchunks_size");
-
- FILLING_BEGIN();
- Accept("TwinVQ");
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "TwinVQ");
- Fill(Stream_Audio, 0, Audio_Codec, "TwinVQ");
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_TwinVQ::Header_Parse()
-{
- //Parsing
- int32u id, size;
- Get_C4 (id, "id");
- Get_B4 (size, "size");
-
- //Filling
- Header_Fill_Code(id, Ztring().From_CC4(id));
- Header_Fill_Size(8+(id==Elements::DATA?0:size)); //DATA chunk indicates the end of the header, with no chunk size
-}
-
-//---------------------------------------------------------------------------
-void File_TwinVQ::Data_Parse()
-{
- #define ELEMENT_CASE(_NAME, _DETAIL) \
- case Elements::_NAME : Element_Info1(_DETAIL); _NAME(); break;
-
- //Parsing
- switch (Element_Code)
- {
- ELEMENT_CASE(_c__, "Copyright");
- ELEMENT_CASE(AUTH, "Author");
- ELEMENT_CASE(COMM, "Mandatory information");
- ELEMENT_CASE(COMT, "Comment");
- ELEMENT_CASE(DATA, "Data");
- ELEMENT_CASE(DSIZ, "Data size");
- ELEMENT_CASE(FILE, "Filename");
- ELEMENT_CASE(NAME, "Song title");
- default : Skip_XX(Element_Size, "Unknown");
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_TwinVQ::COMM()
-{
- //Parsing
- int32u channel_mode, bitrate, samplerate;
- Get_B4 (channel_mode, "channel_mode");
- Get_B4 (bitrate, "bitrate");
- Get_B4 (samplerate, "samplerate");
- Skip_B4( "security_level");
-
- //Filling
- Fill(Stream_Audio, 0, Audio_Channel_s_, channel_mode+1);
- Fill(Stream_Audio, 0, Audio_BitRate, bitrate*1000);
- Fill(Stream_Audio, 0, Audio_SamplingRate, TwinVQ_samplerate(samplerate));
- if (!IsSub && File_Size!=(int64u)-1)
- Fill(Stream_Audio, 0, Audio_StreamSize, File_Size);
-}
-
-//---------------------------------------------------------------------------
-void File_TwinVQ::DATA()
-{
- //This is the end of the parsing (DATA chunk format is unknown)
- Finish("TwinVQ");
-}
-
-//---------------------------------------------------------------------------
-void File_TwinVQ::DSIZ()
-{
- //Parsing
- Skip_B4( "Value");
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_TwinVQ::_____char()
-{
- //Parsing
- Skip_Local(Element_Size, "Value");
-}
-
-//---------------------------------------------------------------------------
-void File_TwinVQ::_____char(const char* Parameter)
-{
- //Parsing
- Ztring Value;
- Get_Local(Element_Size, Value, "Value");
-
- //Filling
- Fill(Stream_General, 0, Parameter, Value);
-}
-
-} //Namespace
-
-#endif //MEDIAINFO_TWINVQ_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_TwinVQ.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_TwinVQ.h
deleted file mode 100644
index 6a2acd054..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_TwinVQ.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Musepack files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_TwinVQH
-#define MediaInfo_File_TwinVQH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_TwinVQ
-//***************************************************************************
-
-class File_TwinVQ : public File__Analyze
-{
-private :
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void _c__() {_____char("Copyright");}
- void ALBM() {_____char("Album");}
- void AUTH() {_____char("Performer");}
- void COMM();
- void COMT() {_____char("Comment");}
- void DATA();
- void DSIZ();
- void FILE() {_____char();}
- void NAME() {_____char("Title");}
-
- //Helpers
- void _____char();
- void _____char(const char* Parameter);
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Vorbis.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Vorbis.cpp
deleted file mode 100644
index 93112140a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Vorbis.cpp
+++ /dev/null
@@ -1,250 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Note : the buffer must be given in ONE call
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_VORBIS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Vorbis.h"
-#include <cmath>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-int8u ilog(int32u Value)
-{
- int8u ToReturn=0;
- while(Value)
- {
- ToReturn++;
- Value>>=1;
- }
- return ToReturn;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Vorbis::Header_Parse()
-{
- //Filling
- Header_Fill_Code(0, "Vorbis");
- Header_Fill_Size(Buffer_Size);
-}
-
-//---------------------------------------------------------------------------
-void File_Vorbis::Data_Parse()
-{
- //Parsing
- if (Status[IsAccepted])
- Setup();
- else
- Identification();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Vorbis::Identification()
-{
- Element_Name("Identification");
-
- //Parsing
- int32u Version, SamplingRate, BitRate_Maximum, BitRate_Nominal, BitRate_Minimum;
- int8u Channels;
- Skip_B1 ( "Signature");
- Skip_Local(6, "Signature");
- Get_L4 (Version, "Version");
- if (Version>0)
- return; //Not supported
- Get_L1 (Channels, "Channels");
- Get_L4 (SamplingRate, "SamplingRate");
- Get_L4 (BitRate_Maximum, "BitRate_Maximum");
- Get_L4 (BitRate_Nominal, "BitRate_Nominal");
- Get_L4 (BitRate_Minimum, "BitRate_Minimum");
- BS_Begin();
- Skip_BS(4, "BlockSize_0"); //2^Value
- Skip_BS(4, "BlockSize_1"); //2^Value
- BS_End();
- Skip_L1( "Framing");
-
- //Filling
- FILLING_BEGIN();
- Accept("Vorbis");
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format, "Vorbis");
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, "Vorbis");
- if (BitRate_Maximum!=0 && BitRate_Maximum<0x80000000) //This is a signed value, and negative values are not OK
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate_Maximum, BitRate_Maximum);
- if (BitRate_Nominal!=0 && BitRate_Nominal<0x80000000) //This is a signed value, and negative values are not OK
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate, BitRate_Nominal);
- if (BitRate_Minimum!=0 && BitRate_Minimum<0x80000000) //This is a signed value, and negative values are not OK
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate_Minimum, BitRate_Minimum);
- if (BitRate_Nominal && BitRate_Maximum==BitRate_Nominal && BitRate_Nominal==BitRate_Minimum)
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate_Mode, "CBR");
- else
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate_Mode, "VBR");
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Channels);
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, SamplingRate);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Vorbis::Setup()
-{
- Element_Name("Setup");
-
- //Parsing
- Skip_Local(6, "Signature");
- int32u codebook, codebook_dimensions, codebook_entries, ordered, codebook_lookup_type;
- int8u vorbis_codebook_count;
- Get_L1 (vorbis_codebook_count, "vorbis_codebook_count");
- BS_Begin_LE(); //Vorbis bitstream is Little Endian
- vorbis_codebook_count+=1;
- for (int Pos=0; Pos<vorbis_codebook_count; Pos++)
- {
- Element_Begin1("codebook");
- Get_T4 (24, codebook, "codebook");
- if (codebook!=0x564342)
- return;
- Get_BT (16, codebook_dimensions, "codebook_dimensions");
- Get_BT (24, codebook_entries, "codebook_entries");
- Get_BT (1, ordered, "ordered");
- if (!ordered)
- {
- int32u sparse;
- Get_BT (1, sparse, "sparse");
- for (int32u Pos2=0; Pos2<codebook_entries; Pos2++)
- {
- if (sparse)
- {
- int32u flag;
- Get_BT (1, flag, "flag");
- if (flag)
- {
- Info_BT(5, length, "length");
- }
- }
- else
- {
- Info_BT(5, length, "length");
- }
- }
- }
- else
- {
- Skip_BT(5, "length");
- int32u num;
- for(int32u i=0; i<codebook_entries; )
- {
- Get_BT (ilog(codebook_entries-i), num, "num");
- for(int32u j=0; j<num && i<codebook_entries; j++, i++);
- }
- }
- Get_BT (4, codebook_lookup_type, "codebook_lookup_type");
- if (codebook_lookup_type>2)
- return; //Not decodable
- if (codebook_lookup_type>0)
- {
- int8u codebook_value_bits;
- Info_BT(32, codebook_minimum_value, "codebook_minimum_value");
- Info_BT(32, codebook_delta_value, "codebook_delta_value");
- Get_T1 ( 4, codebook_value_bits, "codebook_value_bits");
- codebook_value_bits++;
- Info_BT( 1, codebook_sequence_p, "codebook_sequence_p");
- int32s vals;
- if (codebook_lookup_type==1)
- {
- vals=(int32u)floor(pow((float)codebook_entries,1.f/codebook_dimensions));
- for (;;)
- {
- int32u acc=1, acc1=1;
- for(int32u i=0; i<codebook_dimensions; i++)
- {
- acc*=vals;
- acc1*=vals+1;
- }
- if(acc<=codebook_entries && acc1>codebook_entries)
- break;
- else if(acc>codebook_entries)
- vals--;
- else
- vals++;
- }
- }
- else //codebook_lookup_type==2
- vals=codebook_entries*codebook_dimensions;
- int32u codebook_multiplicands;
- for(int i=0; i<vals; i++)
- Get_BT (codebook_value_bits, codebook_multiplicands, "codebook_multiplicands");
- }
- Element_End0();
- }
-
- //Time domain transforms
- int32u vorbis_time_count;
- Get_BT (6, vorbis_time_count, "vorbis_time_count");
- for (int32u Pos=0; Pos<vorbis_time_count+1; Pos++)
- Skip_BT(16, "zero");
-
- //Floors
- int32u vorbis_floor_count;
- Get_BT (6, vorbis_floor_count, "vorbis_floor_count");
- for (int32u Pos=0; Pos<vorbis_floor_count; Pos++)
- {
- int16u vorbis_floor_types;
- Get_T2(16, vorbis_floor_types, "vorbis_floor_types");
-
- FILLING_BEGIN();
- Fill(Stream_Audio, 0, Audio_Format_Settings_Floor, vorbis_floor_types);
- Fill(Stream_Audio, 0, Audio_Codec_Settings_Floor, vorbis_floor_types);
- if (vorbis_floor_types==0)
- {
- Fill(Stream_Audio, 0, Audio_Format_Settings, "Floor0");
- Fill(Stream_Audio, 0, Audio_Codec_Settings, "Floor0");
- }
- FILLING_END();
- //Must continue parsing...
- }
- BS_End_LE();
-
- Finish("Vorbis");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_VORBIS_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Vorbis.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Vorbis.h
deleted file mode 100644
index 2aa038b1d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Vorbis.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Vorbis files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_VorbisH
-#define MediaInfo_File_VorbisH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Vorbis
-//***************************************************************************
-
-class File_Vorbis : public File__Analyze
-{
-private :
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Identification();
- void Setup();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Wvpk.cpp b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Wvpk.cpp
deleted file mode 100644
index 91825934e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Wvpk.cpp
+++ /dev/null
@@ -1,723 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Source : http://www.wavpack.com/file_format.txt
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_WVPK_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Audio/File_Wvpk.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const int16u Wvpk_Resolution[]=
-{
- 8,
- 16,
- 24,
- 32,
-};
-
-//---------------------------------------------------------------------------
-const int32u Wvpk_SamplingRate[]=
-{
- 6000,
- 8000,
- 9600,
- 11025,
- 12000,
- 16000,
- 22050,
- 24000,
- 32000,
- 44100,
- 48000,
- 64000,
- 88200,
- 96000,
- 192000,
- 0,
-};
-
-//---------------------------------------------------------------------------
-const char* Wvpk_id(int8u ID)
-{
- switch (ID)
- {
- case 0x00 : return "could be used to pad WavPack blocks";
- case 0x02 : return "decorrelation terms & deltas";
- case 0x03 : return "initial decorrelation weights";
- case 0x04 : return "decorrelation sample history";
- case 0x05 : return "initial entropy variables";
- case 0x06 : return "entropy variables specific to hybrid mode";
- case 0x07 : return "info needed for hybrid lossless (wvc) mode";
- case 0x08 : return "specific info for floating point decode";
- case 0x09 : return "specific info for decoding integers > 24 bits";
- case 0x0A : return "normal compressed audio bitstream (wv file)";
- case 0x0B : return "correction file bitstream (wvc file)";
- case 0x0C : return "special extended bitstream for floating point data or integers > 24 bit";
- case 0x0D : return "contains channel count and channel_mask";
- case 0x21 : return "RIFF header for .wav files (before audio)";
- case 0x22 : return "RIFF trailer for .wav files (after audio)";
- case 0x25 : return "some encoding details for info purposes";
- case 0x26 : return "16-byte MD5 sum of raw audio data";
- case 0x27 : return "non-standard sampling rate info";
- default: return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Wvpk::File_Wvpk()
-:File__Analyze(), File__Tags_Helper()
-{
- //File__Tags_Helper
- Base=this;
-
- //Configuration
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=32*1024;
-
- //In
- Frame_Count_Valid=2;
- FromMKV=false;
- FromMKV_CodecPrivateParsed=false;
-
- //Temp - Technical info
- total_samples_FirstFrame=(int32u)-1;
- block_index_FirstFrame=0;
- block_index_LastFrame=0;
- SamplingRate=(int8u)-1;
- num_channels=0;
- channel_mask=0;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Wvpk::Streams_Finish()
-{
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "VBR");
-
- //Specific case
- if (FromMKV)
- return;
-
- //Duration
- if (SamplingRate<15)
- {
- int64u Duration=(((int64u)(block_index_LastFrame+block_samples_LastFrame-block_index_FirstFrame))*1000/Wvpk_SamplingRate[SamplingRate]); //Don't forget the last frame with block_samples...
- int64u CompressedSize=File_Size-TagsSize;
- int64u UncompressedSize=Duration*(mono?1:2)*Wvpk_Resolution[(resolution1?1:0)*2+(resolution0?1:0)]*Wvpk_SamplingRate[SamplingRate]/8/1000;
- float32 CompressionRatio=((float32)UncompressedSize)/CompressedSize;
- Fill(Stream_Audio, 0, Audio_StreamSize, CompressedSize, 3, true);
- Fill(Stream_Audio, 0, Audio_Duration, Duration, 10, true);
- Fill(Stream_Audio, 0, Audio_Compression_Ratio, CompressionRatio, 3, true);
- }
-
- File__Tags_Helper::Streams_Finish();
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Wvpk::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<2)
- return false; //Must wait for more data
-
- if (CC2(Buffer)==0x4D5A) //"MZ"
- {
- File__Tags_Helper::Reject("WavPack");
- return false; //Executable with WavPack data are currently not well supported --> It is preferable to set them as executable
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Wvpk::Synchronize()
-{
- //Specific case
- if (FromMKV)
- return true;
-
- //Tags
- bool Tag_Found;
- if (!File__Tags_Helper::Synchronize(Tag_Found))
- return false;
- if (Tag_Found)
- return true;
-
- //Synchronizing
- while (Buffer_Offset+4<=Buffer_Size)
- {
- while (Buffer_Offset+4<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x77
- || Buffer[Buffer_Offset+1]!=0x76
- || Buffer[Buffer_Offset+2]!=0x70
- || Buffer[Buffer_Offset+3]!=0x6B)) //"wvpk"
- Buffer_Offset++;
-
- if (Buffer_Offset+4<=Buffer_Size)//Testing if size is coherant
- {
- //Testing next start, to be sure
- size_t Size=LittleEndian2int32u(Buffer+Buffer_Offset+4)+8;
- if (Buffer_Offset+Size+4>Buffer_Size)
- return false; //Need more data
-
- //Testing
- if (Buffer[Buffer_Offset+Size ]!=0x77
- || Buffer[Buffer_Offset+Size+1]!=0x76
- || Buffer[Buffer_Offset+Size+2]!=0x70
- || Buffer[Buffer_Offset+Size+3]!=0x6B) //"wvpk"
- Buffer_Offset++;
- else
- break; //while()
- }
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+4>Buffer_Size)
- {
- if (Buffer_Offset+3==Buffer_Size && CC3(Buffer+Buffer_Offset)!=0x777670) //"wvp"
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && CC2(Buffer+Buffer_Offset)!=0x7776) //"wv"
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && CC1(Buffer+Buffer_Offset)!=0x77) //"w"
- Buffer_Offset++;
- return false;
- }
-
- //Synched is OK
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Wvpk::Synched_Test()
-{
- //Specific case
- if (FromMKV)
- return true;
-
- //Tags
- if (!File__Tags_Helper::Synched_Test())
- return false;
-
- //Must have enough buffer for having header
- if (Buffer_Offset+3>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset ]!=0x77
- || Buffer[Buffer_Offset+1]!=0x76
- || Buffer[Buffer_Offset+2]!=0x70
- || Buffer[Buffer_Offset+3]!=0x6B) //"wvpk"
- Synched=false;
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Wvpk::Read_Buffer_Continue()
-{
- //Tags
- if (!FromMKV)
- File__Tags_Helper::Read_Buffer_Continue();
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Wvpk::Header_Parse()
-{
- //Specific cases
- if (FromMKV)
- {
- Header_Fill_Size(Element_Size);
- Header_Fill_Code(0, "Block");
- return;
- }
-
- //Parsing
- int32u ckSize;
- Skip_C4( "ckID");
- Get_L4 (ckSize, "ckSize");
-
- //Filling
- Header_Fill_Size(8+ckSize);
- Header_Fill_Code(0, "Block");
-}
-
-//---------------------------------------------------------------------------
-void File_Wvpk::Data_Parse()
-{
- //Specific
- if (FromMKV && !FromMKV_CodecPrivateParsed)
- {
- //Parsing
- Get_L2 (version, "version");
-
- FILLING_BEGIN();
- FromMKV_CodecPrivateParsed=true;
- FILLING_END();
- return;
- }
-
- //Counting
- Frame_Count++;
-
- //Parsing
- Element_Begin1("Block Header");
- if (!FromMKV)
- Get_L2 (version, "version");
- if (version/0x100==0x4)
- {
- while (Element_Offset<Element_Size)
- {
- int32u total_samples=(int32u)-1, block_index=(int32u)-1, block_samples=0, flags, blocksize=(int32u)-1;
- bool initial_block=true, final_block=true;
- if (!FromMKV)
- {
- Skip_L1( "track_no");
- Skip_L1( "index_no");
- Get_L4 (total_samples, "total_samples");
- Get_L4 (block_index, "block_index");
- }
- if (!FromMKV || (FromMKV && Element_Offset==0))
- Get_L4 (block_samples, "block_samples");
- if (block_samples!=0) //empty frames have other values empty
- {
- if (!FromMKV)
- {
- if (block_index==0) //Only the frame with block_index==0
- total_samples_FirstFrame=total_samples; //Note: total_samples is not trustable for a cutted file
- if (Frame_Count==1)
- block_index_FirstFrame=block_index; //Save the block_index of the first block
- block_index_LastFrame=block_index;
- block_samples_LastFrame=block_samples;
- }
- Get_L4 (flags, "flags");
- Get_Flags (flags, 0, resolution0, "resolution0");
- Get_Flags (flags, 1, resolution1, "resolution1");
- Get_Flags (flags, 2, mono, "mono");
- Get_Flags (flags, 3, hybrid, "hybrid");
- Get_Flags (flags, 4, joint_stereo, "joint stereo");
- Get_Flags (flags, 5, cross_channel_decorrelation, "cross-channel decorrelation");
- Skip_Flags(flags, 6, "hybrid noise shaping");
- Skip_Flags(flags, 7, "floating point data");
- Skip_Flags(flags, 8, "extended size integers");
- Skip_Flags(flags, 9, "hybrid mode parameters control bitrate");
- Skip_Flags(flags, 10, "hybrid noise balanced between channels");
- Get_Flags (flags, 11, initial_block, "initial block in sequence");
- Get_Flags (flags, 12, final_block, "final block in sequence");
- Skip_Flags(flags, 13, "amount of data left-shift after decode");
- Skip_Flags(flags, 14, "amount of data left-shift after decode");
- Skip_Flags(flags, 15, "amount of data left-shift after decode");
- Skip_Flags(flags, 16, "amount of data left-shift after decode");
- Skip_Flags(flags, 17, "amount of data left-shift after decode");
- Skip_Flags(flags, 18, "maximum magnitude of decoded data");
- Skip_Flags(flags, 19, "maximum magnitude of decoded data");
- Skip_Flags(flags, 20, "maximum magnitude of decoded data");
- Skip_Flags(flags, 21, "maximum magnitude of decoded data");
- Skip_Flags(flags, 22, "maximum magnitude of decoded data");
- Skip_Flags(flags, 23, "sampling rate");
- Skip_Flags(flags, 24, "sampling rate");
- Skip_Flags(flags, 25, "sampling rate");
- Skip_Flags(flags, 26, "sampling rate"); SamplingRate=(int8u)(((flags>>23)&0xF)); Param_Info1(Wvpk_SamplingRate[SamplingRate]);
- Skip_Flags(flags, 27, "reserved");
- Skip_Flags(flags, 28, "reserved");
- Skip_Flags(flags, 29, "use IIR for negative hybrid noise shaping");
- Skip_Flags(flags, 30, "false stereo");
- Skip_Flags(flags, 31, "reserved");
- }
- else
- {
- Skip_L4( "flags (empty)");
-
- //Counting
- Frame_Count--; //This is not a real frame
- }
- Skip_L4( "crc");
- Element_End0();
-
- int64u End=Element_Size;
- if (FromMKV && !(initial_block && final_block))
- {
- Get_L4 (blocksize, "blocksize");
- End=Element_Offset+blocksize;
- if (End>=Element_Size)
- End=Element_Size;
- }
-
- //Sub-block
- int8u id;
- while (Element_Offset<End)
- {
- Element_Begin0();
- int32u word_size;
- bool large, odd_size;
- BS_Begin();
- Get_SB (large, "large");
- Get_SB (odd_size, "odd_size");
- Get_S1 (6, id, "id"); Element_Info1(Wvpk_id(id));
- BS_End();
- if (large)
- {
- Get_L3 (word_size, "word_size");
- }
- else
- {
- int8u word_size1;
- Get_L1 (word_size1, "word_size");
- word_size=word_size1;
- }
- if (word_size==0 && odd_size)
- Size=0; //Problem!
- else
- Size=word_size*2-(odd_size?1:0);
- Element_Name(Ztring().From_CC1(id));
- switch (id)
- {
- case 0x07 : id_07(); break;
- case 0x0D : id_0D(); break;
- case 0x25 : id_25(); break;
- default : if (word_size)
- Skip_XX(Size, "data");
- }
- if (odd_size)
- Skip_XX(1, "padding");
- Element_End0();
- }
- }
- }
-
- //Filling
- if (!Status[IsAccepted] && Frame_Count>=Frame_Count_Valid)
- {
- File__Tags_Helper::Accept("WavPack");
- Data_Parse_Fill();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Wvpk::Data_Parse_Fill()
-{
- //Filling
- File__Tags_Helper::Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "WavPack");
- Ztring Version_Minor=Ztring::ToZtring(version%0x100);
- if (Version_Minor.size()==1)
- Version_Minor.insert(0, 1, __T('0'));
- Fill(Stream_Audio, 0, Audio_Format_Profile, Ztring::ToZtring(version/0x100)+__T('.')+Version_Minor);
- Fill(Stream_Audio, 0, Audio_Codec, "Wavpack");
- Fill(Stream_Audio, 0, Audio_BitDepth, Wvpk_Resolution[(resolution1?1:0)*2+(resolution0?1:0)]);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, num_channels?num_channels:(mono?1:2));
- if (channel_mask)
- {
- Ztring Channels_Positions, Channels_Positions2;
- if (channel_mask&0x00C7)
- {
- int8u Count=0;
- Channels_Positions+=__T("Front:");
- if (channel_mask&0x0001)
- {
- Channels_Positions+=__T(" L");
- Count++;
- }
- if (channel_mask&0x0004)
- {
- Channels_Positions+=__T(" C");
- Count++;
- }
- if (channel_mask&0x0040)
- {
- Channels_Positions+=__T(" C");
- Count++;
- }
- if (channel_mask&0x0080)
- {
- Channels_Positions+=__T(" C");
- Count++;
- }
- if (channel_mask&0x0002)
- {
- Channels_Positions+=__T(" R");
- Count++;
- }
- Channels_Positions2+=Ztring::ToZtring(Count);
- }
- if (channel_mask&0x0600)
- {
- int8u Count=0;
- if (!Channels_Positions.empty())
- Channels_Positions+=__T(", ");
- Channels_Positions+=__T("Side:");
- if (channel_mask&0x0200)
- {
- Channels_Positions+=__T(" L");
- Count++;
- }
- if (channel_mask&0x0400)
- {
- Channels_Positions+=__T(" R");
- Count++;
- }
- Channels_Positions2+=__T('.')+Ztring::ToZtring(Count);
- }
- else
- Channels_Positions2+=__T("/0");
- if (channel_mask&0x0130)
- {
- int8u Count=0;
- if (!Channels_Positions.empty())
- Channels_Positions+=__T(", ");
- Channels_Positions+=__T("Back:");
- if (channel_mask&0x0010)
- {
- Channels_Positions+=__T(" L");
- Count++;
- }
- if (channel_mask&0x0100)
- {
- Channels_Positions+=__T(" C");
- Count++;
- }
- if (channel_mask&0x0020)
- {
- Channels_Positions+=__T(" R");
- Count++;
- }
- Channels_Positions2+=__T('/')+Ztring::ToZtring(Count);
- }
- else
- Channels_Positions2+=__T("/0");
- if (channel_mask&0x0008)
- {
- if (!Channels_Positions.empty())
- Channels_Positions+=__T(", ");
- Channels_Positions+=__T("LFE");
- Channels_Positions2+=__T(".1");
- }
- Fill(Stream_Audio, 0, Audio_ChannelPositions, Channels_Positions);
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, Channels_Positions2);
- }
-
- if (!FromMKV && SamplingRate<15)
- {
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, Wvpk_SamplingRate[SamplingRate]);
- if (total_samples_FirstFrame!=(int32u)-1) //--> this is a valid value
- Fill(Stream_Audio, 0, Audio_Duration, ((int64u)total_samples_FirstFrame)*1000/Wvpk_SamplingRate[SamplingRate]);
- }
- Fill(Stream_Audio, 0, Audio_Format_Settings, hybrid?"Hybrid lossy":"Lossless");
- Fill(Stream_Audio, 0, Audio_Codec_Settings, hybrid?"hybrid lossy":"lossless");
- Fill(Stream_Audio, 0, Audio_Encoded_Library_Settings, Encoded_Library_Settings);
-
- //No more need data
- File__Tags_Helper::GoToFromEnd(512*1024, "WavPack");
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Wvpk::id_07()
-{
- //Parsing
- Skip_XX(Size, "Data (Not decoded yet)");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Audio, 0, Audio_Compression_Mode).empty())
- Fill(Stream_Audio, 0, Audio_Compression_Mode, "Lossless");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Wvpk::id_0D()
-{
- //Parsing
- Get_L1 (num_channels, "num_channels");
- switch (Size)
- {
- case 1 :
- break;
- case 2 :
- {
- int8u channel_mask_1;
- Get_L1 (channel_mask_1, "channel_mask");
- channel_mask=channel_mask_1;
- }
- break;
- case 3 :
- {
- int16u channel_mask_2;
- Get_L2 (channel_mask_2, "channel_mask");
- channel_mask=channel_mask_2;
- }
- break;
- case 4 :
- Get_L3 (channel_mask, "channel_mask");
- break;
- case 5 :
- Get_L4 (channel_mask, "channel_mask");
- break;
- default : Skip_XX(Size, "unknown");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Wvpk::id_25()
-{
- //Parsing
- int32u flags;
- int8u extra=1;
- Get_L3 (flags, "flags");
- Skip_Flags(flags, 0, "");
- Skip_Flags(flags, 1, "fast mode");
- Skip_Flags(flags, 2, "");
- Skip_Flags(flags, 3, "high quality mode");
-
- Skip_Flags(flags, 4, "very high quality mode");
- Skip_Flags(flags, 5, "bitrate is kbps, not bits/sample");
- Skip_Flags(flags, 6, "automatic noise shaping");
- Skip_Flags(flags, 7, "shaping mode specified");
-
- Skip_Flags(flags, 8, "joint-stereo mode specified");
- Skip_Flags(flags, 9, "dynamic noise shaping");
- Skip_Flags(flags, 10, "create executable");
- Skip_Flags(flags, 11, "create correction file");
-
- Skip_Flags(flags, 12, "maximize bybrid compression");
- Skip_Flags(flags, 13, "");
- Skip_Flags(flags, 14, "");
- Skip_Flags(flags, 15, "calc noise in hybrid mode");
-
- Skip_Flags(flags, 16, "lossy mode");
- Skip_Flags(flags, 17, "extra processing mode");
- Skip_Flags(flags, 18, "no wvx stream w/ floats & big ints");
- Skip_Flags(flags, 19, "store MD5 signature");
-
- Skip_Flags(flags, 20, "merge blocks of equal redundancy (for lossyWAV)");
- Skip_Flags(flags, 21, "");
- Skip_Flags(flags, 22, "");
- Skip_Flags(flags, 23, "optimize for mono streams posing as stereo");
- if (flags&0x20000 && Size>=4)
- {
- Get_L1(extra, "extra");
- }
-
- if ((flags&0x20000 && Size>4) || (!(flags&0x20000) && Size>3))
- Skip_XX(Size-3-(flags&0x20000?1:0), "unknown");
-
- //Filling
- if (flags&0x000001)
- Encoded_Library_Settings+=__T(" -?");
- if (flags&0x000002)
- Encoded_Library_Settings+=__T(" -f");
- if (flags&0x000004)
- Encoded_Library_Settings+=__T(" -?");
- if (flags&0x000008)
- Encoded_Library_Settings+=__T(" -h");
- if (flags&0x000010)
- Encoded_Library_Settings+=__T(" -hh");
- if (flags&0x000020)
- Encoded_Library_Settings+=__T(" -?(bitrate is kbps, not bits/sample)");
- if (flags&0x000040)
- Encoded_Library_Settings+=__T(" -?(automatic noise shaping)");
- if (flags&0x000080)
- Encoded_Library_Settings+=__T(" -sn");
- if (flags&0x000100)
- Encoded_Library_Settings+=__T(" -jn");
- if (flags&0x000200)
- Encoded_Library_Settings+=__T(" -use-dns");
- if (flags&0x000400)
- Encoded_Library_Settings+=__T(" -e");
- if (flags&0x000800)
- Encoded_Library_Settings+=__T(" -c");
- if (flags&0x001000)
- Encoded_Library_Settings+=__T(" -cc");
- if (flags&0x002000)
- Encoded_Library_Settings+=__T(" -?");
- if (flags&0x004000)
- Encoded_Library_Settings+=__T(" -?");
- if (flags&0x008000)
- Encoded_Library_Settings+=__T(" -n");
- if (flags&0x010000)
- Encoded_Library_Settings+=__T(" -?(lossy mode)");
- if (flags&0x020000)
- {
- Encoded_Library_Settings+=__T(" -x");
- if (extra)
- Encoded_Library_Settings+=Ztring::ToZtring(extra);
- }
- if (flags&0x04000)
- Encoded_Library_Settings+=__T(" -?");
- if (flags&0x080000)
- Encoded_Library_Settings+=__T(" -m");
- if (flags&0x100000)
- Encoded_Library_Settings+=__T(" --merge-blocks");
- if (flags&0x200000)
- Encoded_Library_Settings+=__T(" -?");
- if (flags&0x400000)
- Encoded_Library_Settings+=__T(" -?");
- if (flags&0x800000)
- Encoded_Library_Settings+=__T(" --optimize-mono");
- if (!Encoded_Library_Settings.empty())
- Encoded_Library_Settings.erase(Encoded_Library_Settings.begin());
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_WVPK_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Wvpk.h b/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Wvpk.h
deleted file mode 100644
index e39edb4c2..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Audio/File_Wvpk.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about WavePack files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_WvpkH
-#define MediaInfo_File_WvpkH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Wvpk
-//***************************************************************************
-
-class File_Wvpk : public File__Analyze, public File__Tags_Helper
-{
-public :
- //In
- int64u Frame_Count_Valid;
- bool FromMKV;
- bool FromMKV_CodecPrivateParsed;
-
- //Constructor - Destructor
- File_Wvpk();
-
-private :
- //Streams management
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
- void Data_Parse_Fill();
-
- //Elements
- void id_07();
- void id_0D();
- void id_25();
-
- //Temp - Technical info
- int32u total_samples_FirstFrame;
- int32u block_index_FirstFrame;
- int32u block_index_LastFrame;
- int32u block_samples_LastFrame;
- bool resolution0;
- bool resolution1;
- bool mono;
- bool hybrid;
- bool joint_stereo;
- bool cross_channel_decorrelation;
- int8u SamplingRate;
- int8u num_channels;
- int32u channel_mask;
- int32u Size;
- int16u version;
- Ztring Encoded_Library_Settings;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate_MpegTs.cpp b/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate_MpegTs.cpp
deleted file mode 100644
index fddcf06ff..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate_MpegTs.cpp
+++ /dev/null
@@ -1,481 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Duplication helper for some specific formats
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEGPS_YES) || defined(MEDIAINFO_MPEGTS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Duplicate/File__Duplicate_MpegTs.h"
-#include "MediaInfo/MediaInfo_Config.h"
-#include "ZenLib/ZtringList.h"
-#include "ZenLib/File.h"
-#include <cstring>
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-// CRC_32_Table
-// A CRC is computed like this:
-// Init: int32u CRC_32 = 0xFFFFFFFF;
-// for each data byte do
-// CRC_32=(CRC_32<<8) ^ CRC_32_Table[(CRC_32>>24)^(data_byte)];
-extern int32u Psi_CRC_32_Table[256];
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-File__Duplicate_MpegTs::File__Duplicate_MpegTs (const Ztring &Target)
-: File__Duplicate__Base()
-{
- Writer.Configure(Target);
-
- //Current
- program_map_PIDs.resize(0x2000, 0);
- elementary_PIDs.resize(0x2000, 0);
- elementary_PIDs_program_map_PIDs.resize(0x2000, 0);
-}
-
-//***************************************************************************
-// Set
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File__Duplicate_MpegTs::Configure (const Ztring &Value, bool ToRemove)
-{
- //Form: "program_number"
- if (Value.find(__T("program_number="))==0)
- {
- int16u program_number=Ztring(Value.substr(15, std::string::npos)).To_int16u();
- if (ToRemove)
- {
- if (Wanted_program_numbers.find(program_number)!=Wanted_program_numbers.end())
- Wanted_program_numbers.erase(program_number);
- else if (Remove_program_numbers.find(program_number)==Remove_program_numbers.end())
- Remove_program_numbers.insert(program_number);
- }
- else
- {
- if (Remove_program_numbers.find(program_number)!=Remove_program_numbers.end())
- Remove_program_numbers.erase(program_number);
- if (Wanted_program_numbers.find(program_number)==Wanted_program_numbers.end())
- Wanted_program_numbers.insert(program_number);
- }
- if (!PAT.empty())
- PAT.begin()->second.ConfigurationHasChanged=true;
- }
- //Form: "program_map_PID"
- else if (Value.find(__T("program_map_PID="))==0)
- {
- int16u program_map_PID=Ztring(Value.substr(16, std::string::npos)).To_int16u();
- if (ToRemove)
- {
- if (Wanted_program_map_PIDs.find(program_map_PID)!=Wanted_program_map_PIDs.end())
- Wanted_program_map_PIDs.erase(program_map_PID);
- else if (Remove_program_map_PIDs.find(program_map_PID)==Remove_program_map_PIDs.end())
- Remove_program_map_PIDs.insert(program_map_PID);
- }
- else
- {
- if (Remove_program_map_PIDs.find(program_map_PID)!=Remove_program_map_PIDs.end())
- Remove_program_map_PIDs.erase(program_map_PID);
- if (Wanted_program_map_PIDs.find(program_map_PID)==Wanted_program_map_PIDs.end())
- Wanted_program_map_PIDs.insert(program_map_PID);
- }
- if (PMT.find(program_map_PID)!=PMT.end())
- PMT[program_map_PID].ConfigurationHasChanged=true;
- }
- //Form: "elementary_PID"
- else if (Value.find(__T("elementary_PID="))==0)
- {
- int16u elementary_PID=Ztring(Value.substr(15, std::string::npos)).To_int16u();
- if (ToRemove)
- {
- if (Wanted_elementary_PIDs.find(elementary_PID)!=Wanted_elementary_PIDs.end())
- Wanted_elementary_PIDs.erase(elementary_PID);
- else if (Remove_elementary_PIDs.find(elementary_PID)==Remove_elementary_PIDs.end())
- Remove_elementary_PIDs.insert(elementary_PID);
- }
- else
- {
- if (Remove_elementary_PIDs.find(elementary_PID)!=Remove_elementary_PIDs.end())
- Remove_elementary_PIDs.erase(elementary_PID);
- if (Wanted_elementary_PIDs.find(elementary_PID)==Wanted_elementary_PIDs.end())
- Wanted_elementary_PIDs.insert(elementary_PID);
- }
- if (PMT.find(elementary_PIDs_program_map_PIDs[elementary_PID])!=PMT.end())
- PMT[elementary_PIDs_program_map_PIDs[elementary_PID]].ConfigurationHasChanged=true;
- }
- //Old
- else
- {
- int16u program_number=Ztring(Value).To_int16u();
- if (ToRemove)
- {
- if (Wanted_program_numbers.find(program_number)!=Wanted_program_numbers.end())
- Wanted_program_numbers.erase(program_number);
- else if (Remove_program_numbers.find(program_number)==Remove_program_numbers.end())
- Remove_program_numbers.insert(program_number);
- }
- else
- {
- if (Remove_program_numbers.find(program_number)!=Remove_program_numbers.end())
- Remove_program_numbers.erase(program_number);
- if (Wanted_program_numbers.find(program_number)==Wanted_program_numbers.end())
- Wanted_program_numbers.insert(program_number);
- }
- if (!PAT.empty())
- PAT.begin()->second.ConfigurationHasChanged=true;
- }
-
- //Can be disabled?
- if (Wanted_program_numbers.empty()
- && Wanted_program_map_PIDs.empty()
- && Wanted_elementary_PIDs.empty()
- && Remove_program_numbers.empty()
- && Remove_program_map_PIDs.empty()
- && Remove_elementary_PIDs.empty())
- return true; //It can be erased
- else
- return false; //We always need it
-}
-
-//***************************************************************************
-// Write
-//***************************************************************************
-
-bool File__Duplicate_MpegTs::Write (int16u PID, const int8u* ToAdd, size_t ToAdd_Size)
-{
- if (elementary_PIDs[PID])
- {
- Writer.Write(ToAdd, ToAdd_Size);
- return false;
- }
- else if (program_map_PIDs[PID])
- return Manage_PMT(ToAdd, ToAdd_Size);
- else if (PID==0x0000)
- return Manage_PAT(ToAdd, ToAdd_Size);
- else
- return false;
-}
-
-bool File__Duplicate_MpegTs::Manage_PAT (const int8u* ToAdd, size_t ToAdd_Size)
-{
- if (!Parsing_Begin(ToAdd, ToAdd_Size, PAT))
- return false;
-
- //Programs
- program_map_PIDs.clear();
- program_map_PIDs.resize(0x2000, 0);
- elementary_PIDs.clear();
- elementary_PIDs.resize(0x2000, 0);
- while (FromTS.Offset+4<=FromTS.End)
- {
- //For each program
- int16u program_number =CC2(FromTS.Buffer+FromTS.Offset+0);
- int16u program_map_PID=CC2(FromTS.Buffer+FromTS.Offset+2)&0x1FFF;
- if (Wanted_program_numbers.find(program_number) !=Wanted_program_numbers.end()
- || Wanted_program_map_PIDs.find(program_map_PID)!=Wanted_program_map_PIDs.end())
- {
- //Integrating it
- program_map_PIDs[program_map_PID]=1;
- std::memcpy(PAT[StreamID].Buffer+PAT[StreamID].Offset, FromTS.Buffer+FromTS.Offset, 4);
- PAT[StreamID].Offset+=4;
- PMT[program_number].ConfigurationHasChanged=true;
- }
- FromTS.Offset+=4;
- }
-
- Parsing_End(PAT);
-
- //Reseting
- std::vector<int16u> StreamID_List;
- for (std::map<int16u, buffer>::iterator PAT_=PAT.begin(); PAT_!=PAT.end(); ++PAT_)
- if (PAT_->first!=StreamID)
- StreamID_List.push_back(PAT_->first);
- for (size_t Pos=0; Pos<StreamID_List.size(); Pos++)
- PAT[StreamID_List[Pos]].FromTS_version_number_Last=0xFF;
-
- return true;
-}
-
-bool File__Duplicate_MpegTs::Manage_PMT (const int8u* ToAdd, size_t ToAdd_Size)
-{
- if (!Parsing_Begin(ToAdd, ToAdd_Size, PMT))
- return false;
-
- //Testing program_number
- if (Wanted_program_numbers.find(StreamID)==Wanted_program_numbers.end()
- && Wanted_program_map_PIDs.find(elementary_PIDs_program_map_PIDs[StreamID]) == Wanted_program_map_PIDs.end())
- {
- delete[] PMT[StreamID].Buffer; PMT[StreamID].Buffer=NULL;
- return false;
- }
-
- //program_info_length
- int16u program_info_length=CC2(FromTS.Buffer+FromTS.Offset+2)&0x0FFF;
- std::memcpy(PMT[StreamID].Buffer+PMT[StreamID].Offset, FromTS.Buffer+FromTS.Offset, 4+program_info_length);
- FromTS.Offset+=4+program_info_length;
- PMT[StreamID].Offset+=4+program_info_length;
-
- //elementary_PIDs
- while (FromTS.Offset+5<=FromTS.End)
- {
- //For each elementary_PID
- int16u elementary_PID=CC2(FromTS.Buffer+FromTS.Offset+1)&0x1FFF;
- int16u ES_info_length=CC2(FromTS.Buffer+FromTS.Offset+3)&0x0FFF;
- if (Wanted_elementary_PIDs.empty() || Wanted_elementary_PIDs.find(elementary_PID)!=Wanted_elementary_PIDs.end())
- {
- //Integrating it
- elementary_PIDs[elementary_PID]=1;
- elementary_PIDs_program_map_PIDs[elementary_PID]=StreamID;
- std::memcpy(PMT[StreamID].Buffer+PMT[StreamID].Offset, FromTS.Buffer+FromTS.Offset, 5+ES_info_length);
- PMT[StreamID].Offset+=5+ES_info_length;
- }
- else
- elementary_PIDs[elementary_PID]=0;
- FromTS.Offset+=5+ES_info_length;
- }
-
- Parsing_End(PMT);
- return true;
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-bool File__Duplicate_MpegTs::Parsing_Begin (const int8u* ToAdd, size_t ToAdd_Size, std::map<int16u, buffer> &ToModify_)
-{
- //Managing big chunks
- int16u PID=((ToAdd[1]&0x1F)<<8)|ToAdd[2]; //BigEndian2int16u(ToAdd+1)&0x1FFF;
- if (ToAdd[1]&0x40) //payload_unit_start_indicator
- {
- FromTS.Buffer=ToAdd;
- FromTS.Size=ToAdd_Size;
- FromTS.Offset=0;
- }
- else
- {
- if (BigBuffers.find(PID)==BigBuffers.end())
- return false; //Start is missing
- if (ToAdd_Size<4 || BigBuffers[PID].Buffer_Size+ToAdd_Size-4>BigBuffers[PID].Buffer_Size_Max)
- return false; //Problem
- std::memcpy(BigBuffers[PID].Buffer+BigBuffers[PID].Buffer_Size, ToAdd+4, ToAdd_Size-4);
- BigBuffers[PID].Buffer_Size+=ToAdd_Size-4;
-
- FromTS.Buffer=BigBuffers[PID].Buffer;
- FromTS.Size=BigBuffers[PID].Buffer_Size;
- FromTS.Offset=0;
- }
-
- //adaptation_field_length
- int8u adaptation_field_length=0;
- if (CC1(FromTS.Buffer+3)&0x20) //adaptation_field_control (adaptation) == true
- adaptation_field_length=1+CC1(FromTS.Buffer+4);
-
- //pointer_field
- FromTS.Offset+=4+adaptation_field_length;
- int8u pointer_field=CC1(FromTS.Buffer+FromTS.Offset);
-
- //table_id
- FromTS.Offset+=1+pointer_field;
- int8u table_id=FromTS.Buffer[FromTS.Offset];
- if (table_id!=0x00 && table_id!=0x02) //Currently only PAT and PMT are handled
- return false;
-
- //section_length
- FromTS.Offset++;
- if (FromTS.Offset+2>FromTS.Size)
- return false;
- FromTS.Begin=FromTS.Offset-1;
- int16u section_length=CC2(FromTS.Buffer+FromTS.Offset)&0x0FFF;
- FromTS.End=4+adaptation_field_length+section_length;
-
- //Positionning just after section_length
- FromTS.Offset+=2;
-
- //Retrieving StreamID
- StreamID=CC2(FromTS.Buffer+FromTS.Offset);
- buffer &ToModify=ToModify_[StreamID];
-
- //version_number
- int8u FromTS_version_number=(CC1(FromTS.Buffer+FromTS.Offset+2)>>1)&0x1F;
- if (ToModify.version_number==0xFF && FromTS.End<=FromTS.Size-4) //Only if we have enough data
- ToModify.version_number=FromTS_version_number;
- if (ToModify.continuity_counter==0xFF && FromTS.End<=FromTS.Size-4) //Only if we have enough data
- ToModify.continuity_counter=FromTS.Buffer[3]&0xF;
- if (FromTS_version_number!=ToModify.FromTS_version_number_Last || ToModify.ConfigurationHasChanged)
- {
- if (FromTS.End<=FromTS.Size-4) //Only if we have enough data
- {
- ToModify.version_number++;
- if (ToModify.version_number>0x1F)
- ToModify.version_number=0;
- ToModify.FromTS_version_number_Last=FromTS_version_number;
- ToModify.ConfigurationHasChanged=false;
- }
- }
- else
- {
- if (ToModify.Buffer==NULL)
- return false;
-
- //This is the same as before --> Copying the last version, except continuity_counter (incremented)
- for (size_t Pos=0; Pos<ToModify.Size; Pos+=188)
- {
- ToModify.continuity_counter++;
- if (ToModify.continuity_counter>0x0F)
- ToModify.continuity_counter=0x00;
- ToModify.Buffer[Pos+3]&=0xF0;
- ToModify.Buffer[Pos+3]|=ToModify.continuity_counter;
- }
-
- //Managing big chunks
- if (BigBuffers.find(PID)!=BigBuffers.end())
- BigBuffers.erase(BigBuffers.find(PID));
-
- Writer.Write(ToModify.Buffer, ToModify.Size);
- return false;
- }
-
- //Test if we have enough data
- if (FromTS.End>FromTS.Size-4)
- {
- //Waiting for more data
- if (BigBuffers[PID].Buffer==NULL)
- {
- //Saving the data (not done at the beginning)
- BigBuffers[PID].Buffer_Size=FromTS.Size;
- BigBuffers[PID].Buffer_Size_Max=FromTS.End+188;
- BigBuffers[PID].Buffer=new int8u[BigBuffers[PID].Buffer_Size_Max];
- std::memcpy(BigBuffers[PID].Buffer, ToAdd, ToAdd_Size);
- }
- return false;
- }
-
- //Verifying CRC
- int32u CRC_32=0xFFFFFFFF;
- for (int32u CRC_32_Offset=(int32u)FromTS.Begin; CRC_32_Offset<FromTS.End+4; CRC_32_Offset++) //After syncword
- CRC_32=(CRC_32<<8) ^ Psi_CRC_32_Table[(CRC_32>>24)^(FromTS.Buffer[CRC_32_Offset])];
- if (CRC_32)
- return false; //Problem
-
- //Copying
- if (ToModify.Buffer!=NULL && ToModify.Size<FromTS.Size)
- {delete[] ToModify.Buffer; ToModify.Buffer=NULL;}
- if (ToModify.Buffer==NULL)
- ToModify.Buffer=new int8u[FromTS.Size+(FromTS.Size/188)*4];
- std::memcpy(ToModify.Buffer, FromTS.Buffer, FromTS.Begin+8); //Only up to last_section_number included
- ToModify.Offset=FromTS.Offset;
- ToModify.Begin=FromTS.Begin;
- ToModify.End=FromTS.End;
- ToModify.Size=FromTS.Size;
-
- //Changing version_number
- int8u ToReplace=FromTS.Buffer[FromTS.Offset+2];
- ToReplace&=0xC1; //11000001, for removing old version_number
- ToReplace|=ToModify.version_number<<1; //merging, with 1 bit offset
- ToModify.Buffer[ToModify.Offset+2]=ToReplace;
-
- //Positionning after last_section_number
- ToModify.Offset+=5;
- FromTS.Offset+=5;
-
- return true;
-}
-
-void File__Duplicate_MpegTs::Parsing_End (std::map<int16u, buffer> &ToModify_)
-{
- buffer &ToModify=ToModify_[StreamID];
-
- ToModify.End=ToModify.Offset;
- if (ToModify.End+4>ToModify.Size)
- return; //There was an error somewhere!
-
- //section_length
- int8u ToReplace=CC1(ToModify.Buffer+ToModify.Begin+1)&0xF0; //before section_length
- int16u section_length=(int16u)(ToModify.End-ToModify.Begin+1); //+4 for CRC, -3 for header size
- ToReplace|=section_length>>8;
- ToModify.Buffer[ToModify.Begin+1+0]=ToReplace;
- ToModify.Buffer[ToModify.Begin+1+1]=(int8u)(section_length&0xFF);
-
- //CRC32
- int32u CRC_32=0xFFFFFFFF;
- for (size_t Buffer_CRC_Pos=ToModify.Begin; Buffer_CRC_Pos<ToModify.End; Buffer_CRC_Pos++)
- CRC_32=(CRC_32<<8) ^ Psi_CRC_32_Table[(CRC_32>>24)^(ToModify.Buffer[Buffer_CRC_Pos])];
-
- ToModify.Buffer[ToModify.Offset+0]=(CRC_32>>24)&0xFF;
- ToModify.Buffer[ToModify.Offset+1]=(CRC_32>>16)&0xFF;
- ToModify.Buffer[ToModify.Offset+2]=(CRC_32>> 8)&0xFF;
- ToModify.Buffer[ToModify.Offset+3]= CRC_32 &0xFF;
-
- //Managing big chunks
- for (size_t Pos=188; Pos<ToModify.Size; Pos+=188)
- {
- std::memmove(ToModify.Buffer+Pos+4, ToModify.Buffer+Pos, ToModify.Size-Pos);
- std::memcpy(ToModify.Buffer+Pos, ToModify.Buffer, 4);
- ToModify.Buffer[Pos+1]&=0xBF; //Removing payload_unit_start_indicator
- ToModify.Offset+=4;
- ToModify.Size+=4;
-
- ToModify.continuity_counter++;
- if (ToModify.continuity_counter>0x0F)
- ToModify.continuity_counter=0x00;
- ToModify.Buffer[Pos+3]&=0xF0;
- ToModify.Buffer[Pos+3]|=ToModify.continuity_counter;
- }
- while (ToModify.Size-(ToModify.Offset+4)>188)
- ToModify.Size-=188;
-
- //Padding
- for (size_t Buffer_CRC_Pos=ToModify.End+4; Buffer_CRC_Pos<ToModify.Size; Buffer_CRC_Pos++)
- ToModify.Buffer[Buffer_CRC_Pos]=0xFF;
-
- Writer.Write(ToModify.Buffer, ToModify.Size);
-
- //Managing big chunks
- int16u PID=((ToModify.Buffer[1]&0x1F)<<8)|ToModify.Buffer[2]; //BigEndian2int16u(ToAdd+1)&0x1FFF;
- if (BigBuffers.find(PID)!=BigBuffers.end())
- BigBuffers.erase(BigBuffers.find(PID));
-}
-
-//***************************************************************************
-// Output_Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t File__Duplicate_MpegTs::Output_Buffer_Get (unsigned char** Output_Buffer)
-{
- return Writer.Output_Buffer_Get(Output_Buffer);
-}
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate_MpegTs.h b/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate_MpegTs.h
deleted file mode 100644
index d57ebd8c6..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate_MpegTs.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef File__Duplicate_MpegTsH
-#define File__Duplicate_MpegTsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Duplicate/File__Duplicate__Base.h"
-#include "MediaInfo/Duplicate/File__Duplicate__Writer.h"
-#include <set>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File__Duplicate_MpegTs
-//***************************************************************************
-
-class File__Duplicate_MpegTs : public File__Duplicate__Base
-{
-public :
- //Constructor/Destructor
- File__Duplicate_MpegTs(const Ztring &Target);
-
- //Set
- bool Configure (const Ztring &Value, bool ToRemove);
-
- //Write
- bool Write (int16u PID, const int8u* ToAdd=NULL, size_t ToAdd_Size=0);
-
- //Output buffer
- size_t Output_Buffer_Get (unsigned char** Output_Buffer=NULL);
-
-//private :
- File__Duplicate__Writer Writer;
-
- //Configuration
- std::set<int16u> Wanted_program_numbers;
- std::set<int16u> Wanted_program_map_PIDs;
- std::set<int16u> Wanted_elementary_PIDs;
- std::set<int16u> Remove_program_numbers;
- std::set<int16u> Remove_program_map_PIDs;
- std::set<int16u> Remove_elementary_PIDs;
-
- //Current
- std::vector<int8u> program_map_PIDs;
- std::vector<int8u> elementary_PIDs;
- std::vector<int16u> elementary_PIDs_program_map_PIDs;
-
- struct buffer
- {
- int8u* Buffer;
- size_t Offset;
- size_t Begin; //After pointer_field
- size_t End; //Before CRC
- size_t Size;
- int8u continuity_counter;
- int8u version_number;
- int8u FromTS_version_number_Last;
- bool ConfigurationHasChanged;
-
- buffer()
- {
- Buffer=NULL;
- Offset=0;
- Begin=0;
- End=0;
- Size=0;
- continuity_counter=0xFF;
- version_number=0xFF;
- FromTS_version_number_Last=0xFF;
- ConfigurationHasChanged=true;
- }
- ~buffer()
- {
- delete[] Buffer; //Buffer=NULL;
- }
- };
-
- struct buffer_const
- {
- const int8u* Buffer;
- size_t Offset;
- size_t Begin; //After pointer_field
- size_t End; //Before CRC
- size_t Size;
-
- buffer_const()
- {
- Buffer=NULL;
- Offset=0;
- Begin=0;
- End=0;
- Size=0;
- }
- };
-
- struct buffer_big
- {
- int8u* Buffer;
- size_t Buffer_Size;
- size_t Buffer_Size_Max;
-
- buffer_big()
- {
- Buffer=NULL;
- Buffer_Size=0;
- Buffer_Size_Max=0;
- }
- ~buffer_big()
- {
- delete[] Buffer; //Buffer=NULL;
- }
- };
-
- //Data
- bool Manage_PAT(const int8u* ToAdd, size_t ToAdd_Size);
- bool Manage_PMT(const int8u* ToAdd, size_t ToAdd_Size);
-
- //Buffers
- buffer_const FromTS;
- std::map<int16u, buffer> PAT;
- std::map<int16u, buffer> PMT;
- std::map<int16u, buffer_big> BigBuffers; //key is pid
-
- //Helpers
- bool Parsing_Begin(const int8u* ToAdd, size_t ToAdd_Size, std::map<int16u, buffer> &ToModify);
- void Parsing_End(std::map<int16u, buffer> &ToModify);
-
- //Temp
- int16u StreamID;
-};
-
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Base.cpp b/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Base.cpp
deleted file mode 100644
index cbcefc1e5..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Base.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Duplication helper for some specific formats
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-#include "MediaInfo/Duplicate/File__Duplicate__Base.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-File__Duplicate__Base::File__Duplicate__Base ()
-{
-}
-
-} //NameSpace
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Base.h b/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Base.h
deleted file mode 100644
index af68da6e6..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Base.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef File__Duplicate__BaseH
-#define File__Duplicate__BaseH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <map>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File__Duplicate__Base
-//***************************************************************************
-
-class File__Duplicate__Base
-{
-public :
- //Constructor/Destructor
- File__Duplicate__Base();
- //~File__Duplicate__Base();
-
-};
-
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Writer.cpp b/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Writer.cpp
deleted file mode 100644
index 2e319f765..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Writer.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Duplication helper for some specific formats
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-#include "MediaInfo/Duplicate/File__Duplicate__Writer.h"
-#include "MediaInfo/MediaInfo_Config.h"
-#include "ZenLib/ZtringList.h"
-#include "ZenLib/File.h"
-#include <cstring>
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File__Duplicate__Writer::File__Duplicate__Writer ()
-{
- //Out
- Output_Buffer_Configured=false;
-
- //Buffer
- Method=method_none;
- Buffer=NULL;
- Buffer_Size=0;
- Buffer_Size_Max=0;
- File_Pointer=NULL;
- Registered_Count=0; //Count of registerd streams
-}
-
-//---------------------------------------------------------------------------
-File__Duplicate__Writer::~File__Duplicate__Writer ()
-{
- //Buffer
- delete (File*)File_Pointer; //File_Pointer=NULL
-}
-
-//***************************************************************************
-// Configure
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Duplicate__Writer::Configure (const Ztring &Target)
-{
- //Form: "memory://pointer:size" <--Memory block is specified by user
- //WARNING: pointer must be in ***DECIMAL*** format.
- //Example: "memory://123456789:1316"
- if (Target.find(__T("memory://"))==0 && Target.find(__T(":"), 9)!=std::string::npos)
- {
- size_t SemiColumn_Pos=Target.find(__T(":"), 9);
- Ztring Address=Target.substr(9, SemiColumn_Pos-9);
- Ztring Size=Target.substr(SemiColumn_Pos+1);
- Method=method_buffer;
- Buffer=(int8u*)Address.To_int64u();
- Buffer_Size_Max=(size_t)Size.To_int64u();
- }
-
- //Form: "file://filename" or <--the exported filename is specified by user
- else if (Target.find(__T("file://"))==0)
- {
- Method=method_filename;
- File_Name=Target.substr(7, std::string::npos);
- }
-}
-
-//***************************************************************************
-// Write
-//***************************************************************************
-
-void File__Duplicate__Writer::Write (const int8u* ToAdd, size_t ToAdd_Size)
-{
- //Integrity
- if (ToAdd==NULL || ToAdd_Size==0)
- return;
-
- //Writing
- switch (Method)
- {
- //File based
- case method_filename :
- //Open the file if not yet done
- if (File_Pointer==NULL)
- {
- File_Pointer=new File;
- ((File*)File_Pointer)->Open(File_Name, File::Access_Write_Append);
- }
- //Write to the file
- ((File*)File_Pointer)->Write(ToAdd, ToAdd_Size);
- break;
-
- //Memory based
- case method_buffer :
- //Testing if enough place
- if (Buffer_Size+ToAdd_Size>Buffer_Size_Max)
- {
- Buffer_Size=0; //Buffer underrun, cleaning the buffer
- if (ToAdd_Size>Buffer_Size_Max)
- ToAdd_Size=0; //Buffer is too small, writing nothing
- }
-
- //Copying buffer
- std::memcpy(Buffer+Buffer_Size, ToAdd, ToAdd_Size);
- Buffer_Size+=ToAdd_Size;
- break;
- default : ;
- }
-}
-
-//***************************************************************************
-// Output_Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t File__Duplicate__Writer::Output_Buffer_Get ()
-{
- size_t Output_Buffer_Size=Buffer_Size;
- Buffer_Size=0; //Can be erased later...
- return Output_Buffer_Size;
-}
-
-//---------------------------------------------------------------------------
-size_t File__Duplicate__Writer::Output_Buffer_Get (unsigned char** Output_Buffer)
-{
- if (Output_Buffer)
- *Output_Buffer=Buffer;
- size_t Output_Buffer_Size=Buffer_Size;
- Buffer_Size=0; //Can be erased later...
- return Output_Buffer_Size;
-}
-
-} //NameSpace
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Writer.h b/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Writer.h
deleted file mode 100644
index 881d7e4a1..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Duplicate/File__Duplicate__Writer.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef File__Duplicate__WriterH
-#define File__Duplicate__WriterH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File__Duplicate__Writer
-//***************************************************************************
-
-class File__Duplicate__Writer
-{
-public :
- //Constructor/Destructor
- File__Duplicate__Writer();
- ~File__Duplicate__Writer();
-
- //Out
- bool Output_Buffer_Configured;
-
- //Configure
- void Configure (const Ztring &Target);
- void UnRegister(); //
-
- //Write
- void Write (const int8u* ToAdd, size_t ToAdd_Size);
-
- //Output buffer
- size_t Output_Buffer_Get ();
- size_t Output_Buffer_Get (unsigned char** Output_Buffer);
-
-private :
- //Buffer
- enum method
- {
- method_none,
- method_buffer,
- method_filename,
- };
- method Method;
- int8u* Buffer;
- size_t Buffer_Size;
- size_t Buffer_Size_Max;
- Ztring File_Name;
- void* File_Pointer; //ZenLib::File*
-public :
- size_t Registered_Count;
-};
-
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_EbuCore.cpp b/src/thirdparty/MediaInfo/MediaInfo/Export/Export_EbuCore.cpp
deleted file mode 100644
index f36e03893..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_EbuCore.cpp
+++ /dev/null
@@ -1,1726 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_EBUCORE_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Export/Export_EbuCore.h"
-#include "MediaInfo/File__Analyse_Automatic.h"
-#include <ctime>
-#include <cmath>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Ztring XML_Encode (const Ztring& Data)
-{
- Ztring Result;
- wstring::size_type Pos;
- for (Pos=0; Pos<Data.size(); Pos++)
- {
- switch (Data[Pos])
- {
- case __T('"'): Result+=__T("&quot;"); break;
- case __T('&'): Result+=__T("&amp;"); break;
- case __T('\''): Result+=__T("&apos;"); break;
- case __T('<'): Result+=__T("&lt;"); break;
- case __T('>'): Result+=__T("&lg;"); break;
- default: Result+=Data[Pos];
- }
- }
- return Result;
-}
-
-//---------------------------------------------------------------------------
-int32u EbuCore_VideoCompressionCodeCS_termID(MediaInfo_Internal &MI, size_t StreamPos)
-{
- const Ztring &Format=MI.Get(Stream_Video, StreamPos, Video_Format);
- const Ztring &Version=MI.Get(Stream_Video, StreamPos, Video_Format_Version);
- const Ztring &Profile=MI.Get(Stream_Video, StreamPos, Video_Format_Profile);
-
- if (Format==__T("MPEG Video"))
- {
- if (Version.find(__T("1"))!=string::npos)
- return 10000;
- if (Version.find(__T("2"))!=string::npos)
- {
- if (Profile.find(__T("Simple@"))!=string::npos)
- {
- if (Profile.find(__T("Main"))!=string::npos)
- return 20101;
- return 20100;
- }
- if (Profile.find(__T("Main@"))!=string::npos)
- {
- if (Profile.find(__T("Low"))!=string::npos)
- return 20201;
- if (Profile.find(__T("@Main"))!=string::npos)
- return 20202;
- if (Profile.find(__T("High 1440"))!=string::npos)
- return 20203;
- if (Profile.find(__T("High"))!=string::npos)
- return 20204;
- return 20200;
- }
- if (Profile.find(__T("SNR Scalable@"))!=string::npos)
- {
- if (Profile.find(__T("Low"))!=string::npos)
- return 20301;
- if (Profile.find(__T("Main"))!=string::npos)
- return 20302;
- return 20300;
- }
- if (Profile.find(__T("Spatial Sclable@"))!=string::npos)
- {
- if (Profile.find(__T("Main"))!=string::npos)
- return 20401;
- if (Profile.find(__T("High 1440"))!=string::npos)
- return 20402;
- if (Profile.find(__T("High"))!=string::npos)
- return 20403;
- return 20400;
- }
- if (Profile.find(__T("High@"))!=string::npos)
- {
- if (Profile.find(__T("Main"))!=string::npos)
- return 20501;
- if (Profile.find(__T("High 1440"))!=string::npos)
- return 20502;
- if (Profile.find(__T("High"))!=string::npos)
- return 20503;
- return 20500;
- }
- if (Profile.find(__T("Multi-view@"))!=string::npos)
- {
- if (Profile.find(__T("Main"))!=string::npos)
- return 20601;
- return 20600;
- }
- if (Profile.find(__T("4:2:2@"))!=string::npos)
- {
- if (Profile.find(__T("Main"))!=string::npos)
- return 20701;
- return 20700;
- }
- return 20000;
- }
- }
- if (Format==__T("MPEG-4 Visual"))
- {
- if (Profile.find(__T("Simple@"))==0)
- {
- if (Profile.find(__T("L0"))!=string::npos)
- return 30101;
- if (Profile.find(__T("L1"))!=string::npos)
- return 30102;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30103;
- if (Profile.find(__T("L3"))!=string::npos)
- return 30104;
- if (Profile.find(__T("L4"))!=string::npos)
- return 30105;
- if (Profile.find(__T("L5"))!=string::npos)
- return 30106;
- return 30100;
- }
- if (Profile.find(__T("Simple Scalable@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 30201;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30202;
- if (Profile.find(__T("L3"))!=string::npos)
- return 30203;
- return 30200;
- }
- if (Profile.find(__T("Advanced Simple@"))==0)
- {
- if (Profile.find(__T("L0"))!=string::npos)
- return 30301;
- if (Profile.find(__T("L1"))!=string::npos)
- return 30302;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30303;
- if (Profile.find(__T("L3"))!=string::npos)
- return 30304;
- if (Profile.find(__T("L4"))!=string::npos)
- return 30305;
- if (Profile.find(__T("L5"))!=string::npos)
- return 30306;
- return 30100;
- }
- if (Profile.find(__T("Core@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 30401;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30402;
- return 30400;
- }
- if (Profile.find(__T("Core Scalable@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 30501;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30502;
- if (Profile.find(__T("L3"))!=string::npos)
- return 30503;
- return 30500;
- }
- if (Profile.find(__T("Advanced Core@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 30601;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30602;
- return 30600;
- }
- if (Profile.find(__T("Main@"))==0)
- {
- if (Profile.find(__T("L2"))!=string::npos)
- return 30701;
- if (Profile.find(__T("L3"))!=string::npos)
- return 30702;
- if (Profile.find(__T("L4"))!=string::npos)
- return 30703;
- return 30700;
- }
- if (Profile.find(__T("N-bit@"))==0)
- {
- if (Profile.find(__T("L2"))!=string::npos)
- return 30801;
- return 30800;
- }
- if (Profile.find(__T("Advanced Real Time Simple@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 30901;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30902;
- if (Profile.find(__T("L3"))!=string::npos)
- return 30903;
- if (Profile.find(__T("L4"))!=string::npos)
- return 30904;
- return 30900;
- }
- if (Profile.find(__T("Advanced Coding Efficiency@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31001;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31002;
- if (Profile.find(__T("L3"))!=string::npos)
- return 31003;
- if (Profile.find(__T("L4"))!=string::npos)
- return 31004;
- return 31000;
- }
- if (Profile.find(__T("Simple Studio@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31101;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31102;
- if (Profile.find(__T("L3"))!=string::npos)
- return 31103;
- if (Profile.find(__T("L4"))!=string::npos)
- return 31104;
- return 31100;
- }
- if (Profile.find(__T("Core Studio@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31201;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31202;
- if (Profile.find(__T("L3"))!=string::npos)
- return 31203;
- if (Profile.find(__T("L4"))!=string::npos)
- return 31204;
- return 31200;
- }
- if (Profile.find(__T("Fine Granularity Scalable@"))==0)
- {
- if (Profile.find(__T("L0"))!=string::npos)
- return 31301;
- if (Profile.find(__T("L1"))!=string::npos)
- return 31302;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31303;
- if (Profile.find(__T("L3"))!=string::npos)
- return 31304;
- if (Profile.find(__T("L4"))!=string::npos)
- return 31305;
- if (Profile.find(__T("L5"))!=string::npos)
- return 31306;
- return 31300;
- }
- if (Profile.find(__T("Simple Face Animation@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31401;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31402;
- return 31400;
- }
- if (Profile.find(__T("Simple FBA@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31501;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31502;
- return 31500;
- }
- if (Profile.find(__T("Basic Animated Texture@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31601;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31602;
- return 31600;
- }
- if (Profile.find(__T("Scalable Texture@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31701;
- return 31700;
- }
- if (Profile.find(__T("Advanced Scalable Texture@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31801;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31802;
- if (Profile.find(__T("L3"))!=string::npos)
- return 31803;
- return 31800;
- }
- if (Profile.find(__T("Hybrid@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31901;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31902;
- return 31900;
- }
- return 30000;
- }
- if (Format==__T("JPEG"))
- return 50000;
- if (Format==__T("JPEG 2000"))
- {
- const Ztring &CodecID=MI.Get(Stream_Video, StreamPos, Video_CodecID);
- if (CodecID==__T("mjp2"))
- return 60100;
- if (CodecID==__T("mjs2"))
- return 60200;
- return 60000;
- }
- if (Format==__T("H.261"))
- return 70000;
- if (Format==__T("H.263"))
- return 80000;
-
- return 0;
-}
-
-Ztring EbuCore_VideoCompressionCodeCS_Name(int32u termID, MediaInfo_Internal &MI, size_t StreamPos) //xxyyzz: xx=main number, yy=sub-number, zz=sub-sub-number
-{
- switch (termID/10000)
- {
- case 1 : return __T("MPEG-1 Video");
- case 2 : switch ((termID%10000)/100)
- {
- case 1 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video Simple Profile @ Main Level");
- default: return __T("MPEG-2 Video Simple Profile");
- }
- case 2 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video Main Profile @ Low Level");
- case 2 : return __T("MPEG-2 Video Main Profile @ Main Level");
- case 3 : return __T("MPEG-2 Video Main Profile @ High 1440 Level");
- case 4 : return __T("MPEG-2 Video Main Profile @ High Level");
- default: return __T("MPEG-2 Video Main Profile");
- }
- case 3 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video SNR Scalable Profile @ Low Level");
- case 2 : return __T("MPEG-2 Video SNR Scalable Profile @ Main Level");
- default: return __T("MPEG-2 Video SNR Scalable Profile");
- }
- case 4 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video Spatial Scalable Profile @ Main Level");
- case 2 : return __T("MPEG-2 Video Spatial Scalable Profile @ High 1440 Level");
- case 3 : return __T("MPEG-2 Video Spatial Scalable Profile @ High Level");
- default: return __T("MPEG-2 Video Spatial Scalable Profile");
- }
- case 5 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video High Profile @ Main Level");
- case 2 : return __T("MPEG-2 Video High Profile @ High 1440 Level");
- case 3 : return __T("MPEG-2 Video High Profile @ High Level");
- default: return __T("MPEG-2 Video High Profile");
- }
- case 6 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video Multiview Profile @ Main Level");
- default: return __T("MPEG-2 Video Multiview Profile");
- }
- case 7 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video 4:2:2 Profile @ Main Level");
- default: return __T("MPEG-2 Video 4:2:2 Profile");
- }
- default: return __T("MPEG-2 Video");
- }
- case 3 : switch ((termID%10000)/100)
- {
- case 1 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Simple Profile @ Level 0");
- case 2 : return __T("MPEG-4 Visual Simple Profile @ Level 1");
- case 3 : return __T("MPEG-4 Visual Simple Profile @ Level 2");
- case 4 : return __T("MPEG-4 Visual Simple Profile @ Level 3");
- default: return __T("MPEG-4 Visual Simple Profile");
- }
- case 2 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Simple Scalable Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Simple Scalable Profile @ Level 2");
- default: return __T("MPEG-4 Visual Simple Scalable Profile");
- }
- case 3 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Advanced Visual Simple Profile @ Level 0");
- case 2 : return __T("MPEG-4 Advanced Visual Simple Profile @ Level 1");
- case 3 : return __T("MPEG-4 Advanced Visual Simple Profile @ Level 2");
- case 4 : return __T("MPEG-4 Advanced Visual Simple Profile @ Level 3");
- case 5 : return __T("MPEG-4 Advanced Visual Simple Profile @ Level 4");
- case 6 : return __T("MPEG-4 Advanced Visual Simple Profile @ Level 5");
- default: return __T("MPEG-4 Advanced Visual Simple Profile");
- }
- case 4 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Core Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Core Profile @ Level 2");
- default: return __T("MPEG-4 Visual Core Profile");
- }
- case 5 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Core-Scalable Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Core-Scalable Profile @ Level 2");
- case 3 : return __T("MPEG-4 Visual Core-Scalable Profile @ Level 3");
- default: return __T("MPEG-4 Visual Core-Scalable Profile");
- }
- case 6 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual AdvancedCore Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual AdvancedCore Profile @ Level 2");
- default: return __T("MPEG-4 Visual AdvancedCore Profile");
- }
- case 7 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Main Profile @ Level 2");
- case 2 : return __T("MPEG-4 Visual Main Profile @ Level 3");
- case 3 : return __T("MPEG-4 Visual Main Profile @ Level 4");
- default: return __T("MPEG-4 Visual Main Profile");
- }
- case 8 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual N-bit Profile @ Level 2");
- default: return __T("MPEG-4 Visual Main Profile");
- }
- case 9 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Advanced Real Time Simple Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Advanced Real Time Simple Profile @ Level 2");
- case 3 : return __T("MPEG-4 Visual Advanced Real Time Simple Profile @ Level 3");
- case 4 : return __T("MPEG-4 Visual Advanced Real Time Simple Profile @ Level 4");
- default: return __T("MPEG-4 Visual Advanced Real Time Simple Profile");
- }
- case 10 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Advanced Coding Efficiency Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Advanced Coding Efficiency Profile @ Level 2");
- case 3 : return __T("MPEG-4 Visual Advanced Coding Efficiency Profile @ Level 3");
- case 4 : return __T("MPEG-4 Visual Advanced Coding Efficiency Profile @ Level 4");
- default: return __T("MPEG-4 Visual Advanced Coding Efficiency Profile");
- }
- case 11 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Simple Studio Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Simple Studio Profile @ Level 2");
- case 3 : return __T("MPEG-4 Visual Simple Studio Profile @ Level 3");
- case 4 : return __T("MPEG-4 Visual Simple Studio Profile @ Level 4");
- default: return __T("MPEG-4 Visual Simple Studio Profile");
- }
- case 12 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Core Studio Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Core Studio Profile @ Level 2");
- case 3 : return __T("MPEG-4 Visual Core Studio Profile @ Level 3");
- case 4 : return __T("MPEG-4 Visual Core Studio Profile @ Level 4");
- default: return __T("MPEG-4 Visual Core Studio Profile");
- }
- case 13 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Fine Granularity Scalable Profile @ Level 0");
- case 2 : return __T("MPEG-4 Visual Fine Granularity Scalable Profile @ Level 1");
- case 3 : return __T("MPEG-4 Visual Fine Granularity Scalable Profile @ Level 2");
- case 4 : return __T("MPEG-4 Visual Fine Granularity Scalable Profile @ Level 3");
- case 5 : return __T("MPEG-4 Visual Fine Granularity Scalable Profile @ Level 4");
- case 6 : return __T("MPEG-4 Visual Fine Granularity Scalable Profile @ Level 5");
- default: return __T("MPEG-4 Visual Fine Granularity Scalable Profile");
- }
- case 14 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Simple Face Animation Profile @ Level 1");
- case 2 : return __T("MPEG-4 Simple Face Animation Profile @ Level 2");
- default: return __T("MPEG-4 Simple Face Animation Profile");
- }
- case 15 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Simple FBA Profile @ Level 1");
- case 2 : return __T("MPEG-4 Simple FBA Profile @ Level 2");
- default: return __T("MPEG-4 Simple FBA Profile");
- }
- case 16 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Basic Animated Texture Profile @ Level 1");
- case 2 : return __T("MPEG-4 Basic Animated Texture Profile @ Level 2");
- default: return __T("MPEG-4 Basic Animated Texture Profile");
- }
- case 17 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Advanced Scalable Texture Profile @ Level 1");
- default: return __T("MPEG-4 Advanced Scalable Texture Profile");
- }
- case 18 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Advanced Scalable Texture Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Advanced Scalable Texture Profile @ Level 2");
- case 3 : return __T("MPEG-4 Visual Advanced Scalable Texture Profile @ Level 3");
- default: return __T("MPEG-4 Visual Advanced Scalable Texture Profile");
- }
- case 19 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Hybrid Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Hybrid Profile @ Level 2");
- default: return __T("MPEG-4 Visual Hybrid Profile");
- }
- default: return __T("MPEG-4 Visual");
- }
- case 4 : return __T("JPEG");
- case 5 : return __T("MJPEG");
- case 6 : return __T("JPEG2000");
- case 7 : return __T("H261");
- case 8 : return __T("H263");
- default: return MI.Get(Stream_Video, StreamPos, Video_Format);
- }
-}
-
-//---------------------------------------------------------------------------
-int32u EbuCore_AudioCompressionCodeCS_termID(MediaInfo_Internal &MI, size_t StreamPos)
-{
- const Ztring &Format=MI.Get(Stream_Audio, StreamPos, Audio_Format);
- const Ztring &Version=MI.Get(Stream_Audio, StreamPos, Audio_Format_Version);
- const Ztring &Profile=MI.Get(Stream_Audio, StreamPos, Audio_Format_Profile);
-
- if (Format==__T("AC-3"))
- return 40200;
- if (Format==__T("E-AC-3"))
- return 40300;
- if (Format==__T("Dolby E"))
- return 40600;
- if (Format==__T("DTS"))
- return 50000;
- if (Format==__T("MPEG Audio"))
- {
- if (Version.find(__T("1"))!=string::npos)
- {
- if (Profile.find(__T("1"))!=string::npos)
- return 70100;
- if (Profile.find(__T("2"))!=string::npos)
- return 70200;
- if (Profile.find(__T("3"))!=string::npos)
- return 70300;
- return 70000;
- }
- if (Version.find(__T("2"))!=string::npos)
- {
- if (Profile.find(__T("1"))!=string::npos)
- return 90100;
- if (Profile.find(__T("2"))!=string::npos)
- return 90200;
- if (Profile.find(__T("3"))!=string::npos)
- return 90300;
- return 90000;
- }
- return 0;
- }
- if (Format==__T("PCM"))
- return 110000;
-
- return 0;
-}
-
-Ztring EbuCore_AudioCompressionCodeCS_Name(int32u termID, MediaInfo_Internal &MI, size_t StreamPos) //xxyyzz: xx=main number, yy=sub-number, zz=sub-sub-number
-{
- switch (termID/10000)
- {
- case 4 : switch ((termID%10000)/100)
- {
- case 2 : return __T("AC3");
- case 3 : return __T("E-AC3");
- case 6 : return __T("Dolby E");
- default: return __T("Dolby");
- }
- case 5 : return __T("DTS");
- case 7 : switch ((termID%10000)/100)
- {
- case 1 : return __T("MPEG-1 Audio Layer I");
- case 2 : return __T("MPEG-1 Audio Layer II");
- case 3 : return __T("MPEG-1 Audio Layer III");
- default: return __T("MPEG-1 Audio");
- }
- case 9 : switch ((termID%10000)/100)
- {
- case 1 : return __T("MPEG-2 Audio Layer I");
- case 2 : return __T("MPEG-2 Audio Layer II");
- case 3 : return __T("MPEG-2 Audio Layer III");
- default: return __T("MPEG-2 Audio");
- }
- default: return MI.Get(Stream_Audio, StreamPos, Video_Format);
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Export_EbuCore::Export_EbuCore ()
-{
-}
-
-//---------------------------------------------------------------------------
-Export_EbuCore::~Export_EbuCore ()
-{
-}
-
-//***************************************************************************
-// Input
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Ztring EbuCore_Transform_Video(Ztring &ToReturn, MediaInfo_Internal &MI, size_t StreamPos, Export_EbuCore::version Version)
-{
- size_t As11_UkDpp_Pos=(size_t)-1;
- for (size_t StreamPos_Temp=0; StreamPos_Temp<MI.Count_Get(Stream_Other); StreamPos_Temp++)
- {
- if (MI.Get(Stream_Other, StreamPos_Temp, Other_Format)==__T("AS-11 UKDPP"))
- As11_UkDpp_Pos=StreamPos_Temp;
- }
-
- ToReturn+=__T("\t\t\t<ebucore:videoFormat");
- //if (!MI.Get(Stream_Video, StreamPos, Video_ID).empty())
- // ToReturn+=__T(" videoFormatId=\"")+MI.Get(Stream_Video, StreamPos, Video_ID)+__T("\"");
- if (!MI.Get(Stream_Video, StreamPos, Video_Format).empty())
- ToReturn+=__T(" videoFormatName=\"")+MI.Get(Stream_Video, StreamPos, Video_Format)+__T("\"");
- if (!MI.Get(Stream_Video, StreamPos, Video_Format_Version).empty())
- ToReturn+=__T(" videoFormatVersionId=\"")+MI.Get(Stream_Video, StreamPos, Video_Format_Version)+__T("\"");
- ToReturn+=__T(">\n");
-
- //width
- if (!MI.Get(Stream_Video, StreamPos, Video_Width).empty())
- {
- Ztring Width;
- if (!MI.Get(Stream_Video, StreamPos, Video_Width_Original).empty())
- Width=MI.Get(Stream_Video, StreamPos, Video_Width_Original);
- else
- Width=MI.Get(Stream_Video, StreamPos, Video_Width);
- ToReturn+=__T("\t\t\t\t<ebucore:width unit=\"pixel\">")+MI.Get(Stream_Video, StreamPos, Video_Width)+__T("</ebucore:width>\n");
- }
-
- //height
- if (!MI.Get(Stream_Video, StreamPos, Video_Height).empty())
- {
- Ztring Height;
- if (!MI.Get(Stream_Video, StreamPos, Video_Height_Original).empty())
- Height=MI.Get(Stream_Video, StreamPos, Video_Height_Original);
- else
- Height=MI.Get(Stream_Video, StreamPos, Video_Height);
- ToReturn+=__T("\t\t\t\t<ebucore:height unit=\"pixel\">")+Height+__T("</ebucore:height>\n");
- }
-
- //lines
- if (!MI.Get(Stream_Video, StreamPos, Video_Height_Original).empty())
- ToReturn+=__T("\t\t\t\t<ebucore:lines>")+MI.Get(Stream_Video, StreamPos, Video_Height_Original)+__T("</ebucore:lines>\n");
-
- //frameRate
- if (!MI.Get(Stream_Video, StreamPos, Video_FrameRate).empty())
- {
- Ztring FrameRateString=MI.Get(Stream_Video, StreamPos, Video_FrameRate);
- Ztring factorNumerator, factorDenominator;
- if (FrameRateString==__T("23.976"))
- {
- factorNumerator=__T("24000");
- factorDenominator=__T("1001");
- }
- if (FrameRateString==__T("29.970"))
- {
- factorNumerator=__T("30000");
- factorDenominator=__T("1001");
- }
- if (FrameRateString==__T("59.940"))
- {
- factorNumerator=__T("60000");
- factorDenominator=__T("1001");
- }
- if (factorNumerator.empty())
- {
- factorNumerator=Ztring::ToZtring(FrameRateString.To_float64()*1000, 0);
- factorDenominator=__T("1000");
- }
- ToReturn+=__T("\t\t\t\t<ebucore:frameRate");
- ToReturn+=__T(" factorNumerator=\"")+factorNumerator+__T("\"");
- ToReturn+=__T(" factorDenominator=\"")+factorDenominator+__T("\"");
- ToReturn+=__T(">")+Ztring::ToZtring(FrameRateString.To_float64(), 0);
- ToReturn+=__T("</ebucore:frameRate>\n");
- }
-
- //aspectRatio
- if (!MI.Get(Stream_Video, StreamPos, Video_DisplayAspectRatio).empty())
- {
- Ztring AspectRatioString=MI.Get(Stream_Video, StreamPos, Video_DisplayAspectRatio_String);
- size_t AspectRatioString_Pos=AspectRatioString.find(__T(':'));
- Ztring factorNumerator, factorDenominator;
- if (AspectRatioString_Pos!=(size_t)-1)
- {
- factorNumerator=AspectRatioString.substr(0, AspectRatioString_Pos);
- factorDenominator=AspectRatioString.substr(AspectRatioString_Pos+1);
- }
- else
- {
- AspectRatioString_Pos=AspectRatioString.find(__T('.'));
- if (AspectRatioString_Pos!=(size_t)-1)
- {
- int64s Denominator=float64_int64s(pow((double)10, (int)(AspectRatioString.size()-AspectRatioString_Pos+1))); //Computing the right denomintor compared to the count of decimals in the value e.g. 1.778 will have a denominator of 1000 (3 digits after the comma)
- factorNumerator=Ztring::ToZtring(AspectRatioString.To_float32()*Denominator, 0);
- factorDenominator=Ztring::ToZtring(Denominator);
- }
- else
- {
- factorNumerator=AspectRatioString; //No decimal
- factorDenominator=__T("1");
- }
- }
- ToReturn+=__T("\t\t\t\t<ebucore:aspectRatio typeLabel=\"display\">\n");
- ToReturn+=__T("\t\t\t\t\t<ebucore:factorNumerator>")+factorNumerator+__T("</ebucore:factorNumerator>\n");
- ToReturn+=__T("\t\t\t\t\t<ebucore:factorDenominator>")+factorDenominator+__T("</ebucore:factorDenominator>\n");
- ToReturn+=__T("\t\t\t\t</ebucore:aspectRatio>\n");
- }
-
- //videoEncoding
- //if (!MI.Get(Stream_Video, StreamPos, Video_Format_Profile).empty())
- {
- int32u TermID=EbuCore_VideoCompressionCodeCS_termID(MI, StreamPos);
- Ztring typeLabel;
- Ztring TermID_String;
- if (TermID)
- {
- typeLabel=EbuCore_VideoCompressionCodeCS_Name(TermID, MI, StreamPos);
- TermID_String=Ztring::ToZtring(TermID/10000);
- if (TermID%10000)
- {
- TermID_String+=__T('.');
- TermID_String+=Ztring::ToZtring((TermID%10000)/100);
- if (TermID%100)
- {
- TermID_String+=__T('.');
- TermID_String+=Ztring::ToZtring(TermID%100);
- }
- }
- }
- else
- typeLabel=MI.Get(Stream_Video, StreamPos, Video_Format_Profile);
- ToReturn+=__T("\t\t\t\t<ebucore:videoEncoding typeLabel=\"")+typeLabel+__T("\"");
- if (!TermID_String.empty())
- ToReturn+=__T(" typeLink=\"http://www.ebu.ch/metadata/cs/ebu_VideoCompressionCodeCS.xml#")+TermID_String+__T("\"");
- ToReturn+=__T("/>\n");
- }
-
- //codec
- if (!MI.Get(Stream_Video, StreamPos, Video_CodecID).empty() || !MI.Get(Stream_Video, StreamPos, Video_Format_Commercial_IfAny).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:codec>\n");
- if (!MI.Get(Stream_Video, StreamPos, Video_CodecID).empty())
- {
- ToReturn+=__T("\t\t\t\t\t<ebucore:codecIdentifier>\n");
- ToReturn+=__T("\t\t\t\t\t\t<dc:identifier>")+MI.Get(Stream_Video, StreamPos, Video_CodecID)+__T("</dc:identifier>\n");
- ToReturn+=__T("\t\t\t\t\t</ebucore:codecIdentifier>\n");
- }
- if (!MI.Get(Stream_Video, StreamPos, Video_Format_Commercial_IfAny).empty())
- ToReturn+=__T("\t\t\t\t\t<ebucore:name>")+MI.Get(Stream_Video, StreamPos, Video_Format_Commercial_IfAny)+__T("</ebucore:name>\n");
- ToReturn+=__T("\t\t\t\t</ebucore:codec>\n");
- }
-
- //bitRate
- if (!MI.Get(Stream_Video, StreamPos, Video_BitRate).empty())
- ToReturn+=__T("\t\t\t\t<ebucore:bitRate>")+MI.Get(Stream_Video, StreamPos, Video_BitRate)+__T("</ebucore:bitRate>\n");
-
- //bitRateMax
- if (!MI.Get(Stream_Video, StreamPos, Video_BitRate_Maximum).empty())
- ToReturn+=__T("\t\t\t\t<ebucore:bitRateMax>")+MI.Get(Stream_Video, StreamPos, Video_BitRate_Maximum)+__T("</ebucore:bitRateMax>\n");
-
- //bitRateMode
- if (!MI.Get(Stream_Video, StreamPos, Video_BitRate_Mode).empty())
- {
- Ztring bitRateMode=MI.Get(Stream_Video, StreamPos, Video_BitRate_Mode);
- if (bitRateMode==__T("CBR"))
- bitRateMode=__T("constant");
- if (bitRateMode==__T("VBR"))
- bitRateMode=__T("variable");
- ToReturn+=__T("\t\t\t\t<ebucore:bitRateMode>")+bitRateMode+__T("</ebucore:bitRateMode>\n");
- }
-
- //scanningFormat
- if (!MI.Get(Stream_Video, StreamPos, Video_ScanType).empty())
- {
- Ztring ScanType=MI.Get(Stream_Video, StreamPos, Video_ScanType);
- if (ScanType==__T("MBAFF"))
- ScanType=__T("Interlaced");
- ScanType.MakeLowerCase();
- ToReturn+=__T("\t\t\t\t<ebucore:scanningFormat>")+ScanType+__T("</ebucore:scanningFormat>\n");
- }
-
- //scanningOrder
- if (!MI.Get(Stream_Video, StreamPos, Video_ScanOrder).empty())
- {
- Ztring ScanOrder=MI.Get(Stream_Video, StreamPos, Video_ScanOrder);
- if (ScanOrder==__T("TFF"))
- ScanOrder=__T("top");
- if (ScanOrder==__T("BFF"))
- ScanOrder=__T("bottom");
- if (ScanOrder.find(__T("Pulldown"))!=string::npos)
- ScanOrder=__T("pulldown");
- ToReturn+=__T("\t\t\t\t<ebucore:scanningOrder>")+ScanOrder+__T("</ebucore:scanningOrder>\n");
- }
-
- //videoTrack
- if (!MI.Get(Stream_Video, StreamPos, Video_ID).empty() || !MI.Get(Stream_Video, StreamPos, Video_Title).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:videoTrack");
- if (!MI.Get(Stream_Video, StreamPos, Video_ID).empty())
- ToReturn+=__T(" trackId=\"")+MI.Get(Stream_Video, StreamPos, Video_ID)+__T("\"");
- if (!MI.Get(Stream_Video, StreamPos, Video_Title).empty())
- ToReturn+=__T(" trackName=\"")+MI.Get(Stream_Video, StreamPos, Video_Title)+__T("\"");
- ToReturn+=__T("/>\n");
- }
-
- //flag_3D
- if (!MI.Get(Stream_Video, StreamPos, Video_MultiView_Count).empty())
- ToReturn+=__T("\t\t\t\t<ebucore:flag_3D>true</ebucore:flag_3D>\n");
-
- //technicalAttributeString - ActiveFormatDescription
- if (!MI.Get(Stream_Video, StreamPos, Video_ActiveFormatDescription).empty())
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"ActiveFormatDescription\">")+MI.Get(Stream_Video, StreamPos, Video_ActiveFormatDescription)+__T("</ebucore:technicalAttributeString>\n");
-
- //technicalAttributeString - Standard
- if (!MI.Get(Stream_Video, StreamPos, Video_Standard).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"Standard\">")+MI.Get(Stream_Video, StreamPos, Video_Standard)+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //technicalAttributeString - ColorSpace
- if (!MI.Get(Stream_Video, StreamPos, Video_ColorSpace).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"ColorSpace\">")+MI.Get(Stream_Video, StreamPos, Video_ColorSpace)+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //technicalAttributeString - ChromaSubsampling
- if (!MI.Get(Stream_Video, StreamPos, Video_ChromaSubsampling).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"ChromaSubsampling\">")+MI.Get(Stream_Video, StreamPos, Video_ChromaSubsampling)+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //technicalAttributeString - colour_primaries
- if (!MI.Get(Stream_Video, StreamPos, __T("colour_primaries")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"colour_primaries\">")+MI.Get(Stream_Video, StreamPos, __T("colour_primaries"))+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //technicalAttributeString - transfer_characteristics
- if (!MI.Get(Stream_Video, StreamPos, __T("transfer_characteristics")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"transfer_characteristics\">")+MI.Get(Stream_Video, StreamPos, __T("transfer_characteristics"))+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //technicalAttributeString - matrix_coefficients
- if (!MI.Get(Stream_Video, StreamPos, __T("matrix_coefficients")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"matrix_coefficients\">")+MI.Get(Stream_Video, StreamPos, __T("matrix_coefficients"))+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //technicalAttributeString - colour_range
- if (!MI.Get(Stream_Video, StreamPos, __T("colour_range")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"colour_range\">")+MI.Get(Stream_Video, StreamPos, __T("colour_range"))+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //technicalAttributeString - StreamSize
- if (!MI.Get(Stream_Video, StreamPos, Video_StreamSize).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeInteger typeLabel=\"StreamSize\"")+(Version>=Export_EbuCore::Version_1_6?Ztring(__T(" unit=\"byte\"")):Ztring())+__T(">")+MI.Get(Stream_Video, StreamPos, Video_StreamSize)+__T("</ebucore:technicalAttributeInteger>\n");
- }
-
- //technicalAttributeString - BitDepth
- if (!MI.Get(Stream_Video, StreamPos, Video_BitDepth).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeInteger typeLabel=\"BitDepth\"")+(Version>=Export_EbuCore::Version_1_6?Ztring(__T(" unit=\"bit\"")):Ztring())+__T(">")+MI.Get(Stream_Video, StreamPos, Video_BitDepth)+__T("</ebucore:technicalAttributeInteger>\n");
- }
-
- //technicalAttributeString
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("FpaManufacturer")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"FPAManufacturer\">")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("FpaManufacturer"))+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //technicalAttributeString
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("FpaVersion")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"FPAVersion\">")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("FpaVersion"))+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //technicalAttributeBoolean - Format_Settings_CABAC
- if (MI.Get(Stream_Video, StreamPos, Video_Format)==__T("AVC") && !MI.Get(Stream_Video, StreamPos, Video_Format_Settings_CABAC).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeBoolean typeLabel=\"CABAC\">")+Ztring(MI.Get(Stream_Video, StreamPos, Video_Format_Settings_CABAC)==__T("Yes")?__T("true"):__T("false"))+__T("</ebucore:technicalAttributeBoolean>\n");
- }
-
- //technicalAttributeBoolean - Format_Settings_MBAFF
- if (MI.Get(Stream_Video, StreamPos, Video_Format)==__T("AVC") && !MI.Get(Stream_Video, StreamPos, Video_ScanType).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeBoolean typeLabel=\"MBAFF\">")+Ztring(MI.Get(Stream_Video, StreamPos, Video_ScanType)==__T("MBAFF")?__T("true"):__T("false"))+__T("</ebucore:technicalAttributeBoolean>\n");
- }
-
- //technicalAttributeBoolean - FpaPass
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("FpaPass")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeBoolean typeLabel=\"MBAFF\">")+Ztring(MI.Get(Stream_Other, As11_UkDpp_Pos, __T("FpaPass"))==__T("Yes")?__T("true"):__T("false"))+__T("</ebucore:technicalAttributeBoolean>\n");
- }
-
- //technicalAttributeString
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("VideoComments")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:comment typeLabel=\"VideoComments\">")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("VideoComments"))+__T("</ebucore:comment>\n");
- }
-
- ToReturn+=__T("\t\t\t</ebucore:videoFormat>\n");
-
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-Ztring EbuCore_Transform_Audio(Ztring &ToReturn, MediaInfo_Internal &MI, size_t StreamPos, Export_EbuCore::version Version)
-{
-
- size_t As11_Core_Pos=(size_t)-1;
- size_t As11_UkDpp_Pos=(size_t)-1;
- for (size_t StreamPos_Temp=0; StreamPos_Temp<MI.Count_Get(Stream_Other); StreamPos_Temp++)
- {
- if (MI.Get(Stream_Other, StreamPos_Temp, Other_Format)==__T("AS-11 Core"))
- As11_Core_Pos=StreamPos_Temp;
- if (MI.Get(Stream_Other, StreamPos_Temp, Other_Format)==__T("AS-11 UKDPP"))
- As11_UkDpp_Pos=StreamPos_Temp;
- }
-
- ToReturn+=__T("\t\t\t<ebucore:audioFormat");
- //if (!MI.Get(Stream_Audio, StreamPos, Audio_ID).empty())
- // ToReturn+=__T(" audioFormatId=\"")+MI.Get(Stream_Audio, StreamPos, Audio_ID)+__T("\"");
- if (!MI.Get(Stream_Audio, StreamPos, Audio_Format).empty())
- ToReturn+=__T(" audioFormatName=\"")+MI.Get(Stream_Audio, StreamPos, Audio_Format)+__T("\"");
- if (!MI.Get(Stream_Audio, StreamPos, Audio_Format_Version).empty())
- ToReturn+=__T(" audioFormatVersionId=\"")+MI.Get(Stream_Audio, StreamPos, Audio_Format_Version)+__T("\"");
- ToReturn+=__T(">\n");
-
- //audioEncoding
- //if (!MI.Get(Stream_Audio, StreamPos, Audio_Format_Profile).empty())
- {
- int32u TermID=EbuCore_AudioCompressionCodeCS_termID(MI, StreamPos);
- Ztring typeLabel;
- Ztring TermID_String;
- if (TermID)
- {
- typeLabel=EbuCore_AudioCompressionCodeCS_Name(TermID, MI, StreamPos);
- TermID_String=Ztring::ToZtring(TermID/10000);
- if (TermID%10000)
- {
- TermID_String+=__T('.');
- TermID_String+=Ztring::ToZtring((TermID%10000)/100);
- if (TermID%100)
- {
- TermID_String+=__T('.');
- TermID_String+=Ztring::ToZtring(TermID%100);
- }
- }
- }
- else
- typeLabel=MI.Get(Stream_Audio, StreamPos, Audio_Format_Profile);
- ToReturn+=__T("\t\t\t\t<ebucore:audioEncoding typeLabel=\"")+typeLabel+__T("\"");
- if (!TermID_String.empty())
- ToReturn+=__T(" typeLink=\"http://www.ebu.ch/metadata/cs/ebu_AudioCompressionCodeCS.xml#")+TermID_String+__T("\"");
- ToReturn+=__T("/>\n");
- }
-
- //codec
- if (!MI.Get(Stream_Audio, StreamPos, Audio_CodecID).empty() || !MI.Get(Stream_Audio, StreamPos, Audio_Format_Commercial_IfAny).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:codec>\n");
- if (!MI.Get(Stream_Audio, StreamPos, Audio_CodecID).empty())
- {
- ToReturn+=__T("\t\t\t\t\t<ebucore:codecIdentifier>\n");
- ToReturn+=__T("\t\t\t\t\t\t<dc:identifier>")+MI.Get(Stream_Audio, StreamPos, Audio_CodecID)+__T("</dc:identifier>\n");
- ToReturn+=__T("\t\t\t\t\t</ebucore:codecIdentifier>\n");
- }
- if (!MI.Get(Stream_Audio, StreamPos, Audio_Format_Commercial_IfAny).empty())
- ToReturn+=__T("\t\t\t\t\t<ebucore:name>")+MI.Get(Stream_Audio, StreamPos, Audio_Format_Commercial_IfAny)+__T("</ebucore:name>\n");
- ToReturn+=__T("\t\t\t\t</ebucore:codec>\n");
- }
-
- //audioTrackConfiguration
- if (As11_Core_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_Core_Pos, __T("AudioTrackLayout")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:audioTrackConfiguration typeLabel=\"")+MI.Get(Stream_Other, As11_Core_Pos, __T("AudioTrackLayout"))+__T("\"/>\n");
- }
-
- //samplingRate
- if (!MI.Get(Stream_Audio, StreamPos, Audio_SamplingRate).empty())
- ToReturn+=__T("\t\t\t\t<ebucore:samplingRate>")+MI.Get(Stream_Audio, StreamPos, Audio_SamplingRate)+__T("</ebucore:samplingRate>\n");
-
- //sampleSize
- if (!MI.Get(Stream_Audio, StreamPos, Audio_BitDepth).empty())
- ToReturn+=__T("\t\t\t\t<ebucore:sampleSize>")+MI.Get(Stream_Audio, StreamPos, Audio_BitDepth)+__T("</ebucore:sampleSize>\n");
-
- //bitRate
- if (!MI.Get(Stream_Audio, StreamPos, Audio_BitRate).empty())
- ToReturn+=__T("\t\t\t\t<ebucore:bitRate>")+MI.Get(Stream_Audio, StreamPos, Audio_BitRate)+__T("</ebucore:bitRate>\n");
-
- //bitRateMax
- if (!MI.Get(Stream_Audio, StreamPos, Audio_BitRate_Maximum).empty())
- ToReturn+=__T("\t\t\t\t<ebucore:bitRateMax>")+MI.Get(Stream_Audio, StreamPos, Audio_BitRate_Maximum)+__T("</ebucore:bitRateMax>\n");
-
- //bitRateMode
- if (!MI.Get(Stream_Audio, StreamPos, Audio_BitRate_Mode).empty())
- {
- Ztring bitRateMode=MI.Get(Stream_Audio, StreamPos, Audio_BitRate_Mode);
- if (bitRateMode==__T("CBR"))
- bitRateMode=__T("constant");
- if (bitRateMode==__T("VBR"))
- bitRateMode=__T("variable");
- ToReturn+=__T("\t\t\t\t<ebucore:bitRateMode>")+bitRateMode+__T("</ebucore:bitRateMode>\n");
- }
-
- //audioTrack
- if (!MI.Get(Stream_Audio, StreamPos, Audio_ID).empty() || !MI.Get(Stream_Audio, StreamPos, Audio_Title).empty() || !MI.Get(Stream_Audio, StreamPos, Audio_Language).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:audioTrack");
- if (!MI.Get(Stream_Audio, StreamPos, Audio_ID).empty())
- {
- Ztring ID=MI.Get(Stream_Audio, StreamPos, Audio_ID);
- ID.FindAndReplace(__T(" / "), __T("_"));
- ToReturn+=__T(" trackId=\"")+ID+__T("\"");
- }
- if (!MI.Get(Stream_Audio, StreamPos, Audio_Title).empty())
- ToReturn+=__T(" trackName=\"")+MI.Get(Stream_Audio, StreamPos, Audio_Title)+__T("\"");
- if (!MI.Get(Stream_Audio, StreamPos, Audio_Language).empty())
- ToReturn+=__T(" trackLanguage=\"")+MI.Get(Stream_Audio, StreamPos, Audio_Language)+__T("\"");
- ToReturn+=__T("/>\n");
- }
-
- //channels
- if (!MI.Get(Stream_Audio, StreamPos, Audio_Channel_s_).empty())
- ToReturn+=__T("\t\t\t\t<ebucore:channels>")+MI.Get(Stream_Audio, StreamPos, Audio_Channel_s_)+__T("</ebucore:channels>\n");
-
- //format - technicalAttributeString - ChannelPositions
- if (!MI.Get(Stream_Audio, StreamPos, Audio_ChannelPositions).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"ChannelPositions\">")+MI.Get(Stream_Audio, StreamPos, Audio_ChannelPositions)+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //format - technicalAttributeString - ChannelLayout
- if (!MI.Get(Stream_Audio, StreamPos, Audio_ChannelLayout).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"ChannelLayout\">")+MI.Get(Stream_Audio, StreamPos, Audio_ChannelLayout)+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //technicalAttributeString - Format_Settings_Endianness
- if (!MI.Get(Stream_Audio, StreamPos, Audio_Format_Settings_Endianness).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"Endianness\">")+MI.Get(Stream_Audio, StreamPos, Audio_Format_Settings_Endianness)+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //technicalAttributeString - Format_Settings_Wrapping
- if (!MI.Get(Stream_Audio, StreamPos, Audio_Format_Settings_Wrapping).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeString typeLabel=\"Wrapping\">")+MI.Get(Stream_Audio, StreamPos, Audio_Format_Settings_Wrapping)+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //technicalAttributeString - StreamSize
- if (!MI.Get(Stream_Audio, StreamPos, Audio_StreamSize).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeInteger typeLabel=\"StreamSize\"")+(Version>=Export_EbuCore::Version_1_6?Ztring(__T(" unit=\"byte\"")):Ztring())+__T(">")+MI.Get(Stream_Audio, StreamPos, Audio_StreamSize)+__T("</ebucore:technicalAttributeInteger>\n");
- }
-
- //technicalAttributeString
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("AudioComments")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:comment typeLabel=\"AudioComments\">")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("AudioComments"))+__T("</ebucore:comment>\n");
- }
-
- ToReturn+=__T("\t\t\t</ebucore:audioFormat>\n");
-
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-Ztring EbuCore_Transform_Text(Ztring &ToReturn, MediaInfo_Internal &MI, size_t StreamPos)
-{
- ToReturn+=__T("\t\t\t<ebucore:dataFormat");
- //if (!MI.Get(Stream_Text, StreamPos, Text_ID).empty())
- // ToReturn+=__T(" dataFormatId=\"")+MI.Get(Stream_Text, StreamPos, Text_ID)+__T("\"");
- if (!MI.Get(Stream_Text, StreamPos, Text_Format_Version).empty())
- ToReturn+=__T(" dataFormatVersionId=\"")+MI.Get(Stream_Text, StreamPos, Text_Format_Version)+__T("\"");
- if (!MI.Get(Stream_Text, StreamPos, Text_Format).empty())
- ToReturn+=__T(" dataFormatName=\"")+MI.Get(Stream_Text, StreamPos, Text_Format)+__T("\"");
- if (!MI.Get(Stream_Text, StreamPos, Text_ID).empty())
- ToReturn+=__T(" dataTrackId=\"")+MI.Get(Stream_Text, StreamPos, Text_ID)+__T("\"");
- ToReturn+=__T(">\n");
-
- //subtitlingTrack
- {
- ToReturn+=__T("\t\t\t\t<ebucore:captioningFormat");
- if (!MI.Get(Stream_Text, StreamPos, Text_Format).empty())
- ToReturn+=__T(" captioningFormatName=\"")+MI.Get(Stream_Text, StreamPos, Text_Format)+__T("\"");
- if (!MI.Get(Stream_Text, StreamPos, Text_ID).empty())
- ToReturn+=__T(" trackId=\"")+MI.Get(Stream_Text, StreamPos, Text_ID)+__T("\"");
- if (!MI.Get(Stream_Text, StreamPos, Text_Title).empty())
- ToReturn+=__T(" typeLabel=\"")+MI.Get(Stream_Text, StreamPos, Text_Title)+__T("\"");
- if (!MI.Get(Stream_Text, StreamPos, Text_Language).empty())
- ToReturn+=__T(" language=\"")+MI.Get(Stream_Text, StreamPos, Text_Language)+__T("\"");
- ToReturn+=__T("/>\n");
- if (!MI.Get(Stream_Text, StreamPos, Text_CodecID).empty() || !MI.Get(Stream_Text, StreamPos, Text_Format_Commercial_IfAny).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:codec>\n");
- if (!MI.Get(Stream_Text, StreamPos, Text_CodecID).empty())
- {
- ToReturn+=__T("\t\t\t\t\t<ebucore:codecIdentifier>\n");
- ToReturn+=__T("\t\t\t\t\t\t<dc:identifier>")+MI.Get(Stream_Text, StreamPos, Text_CodecID)+__T("</dc:identifier>\n");
- ToReturn+=__T("\t\t\t\t\t</ebucore:codecIdentifier>\n");
- }
- if (!MI.Get(Stream_Text, StreamPos, Text_Format_Commercial_IfAny).empty())
- ToReturn+=__T("\t\t\t\t\t<ebucore:name>")+MI.Get(Stream_Text, StreamPos, Text_Format_Commercial_IfAny)+__T("</ebucore:name>\n");
- ToReturn+=__T("\t\t\t\t</ebucore:codec>\n");
- }
- }
-
- ToReturn+=__T("\t\t\t</ebucore:dataFormat>\n");
-
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-Ztring EbuCore_Transform_TimeCode(Ztring &ToReturn, MediaInfo_Internal &MI, size_t StreamPos, bool Is1_5)
-{
- if (Is1_5)
- ToReturn+=__T("\t\t\t<!-- (timecodeFormat not in XSD)\n");
-
- ToReturn+=__T("\t\t\t<ebucore:timecodeFormat");
- if (!MI.Get(Stream_Other, StreamPos, Other_Format).empty())
- ToReturn+=__T(" timecodeFormatName=\"")+MI.Get(Stream_Other, StreamPos, Other_Format)+__T("\"");
- ToReturn+=__T(">\n");
-
- //start
- {
- if (MI.Get(Stream_Other, StreamPos, Other_ID).find(__T("-Material"))!=string::npos)
- ToReturn+=__T("\t\t\t\t<ebucore:timecodeStart typeLabel=\"Material\">\n");
- else if (MI.Get(Stream_Other, StreamPos, Other_ID).find(__T("-Source"))!=string::npos)
- ToReturn+=__T("\t\t\t\t<ebucore:timecodeStart typeLabel=\"Source\">\n");
- else
- ToReturn+=__T("\t\t\t\t<ebucore:timecodeStart>\n");
- ToReturn+=__T("\t\t\t\t\t<ebucore:timecode>")+MI.Get(Stream_Other, StreamPos, Other_TimeCode_FirstFrame)+__T("</ebucore:timecode>\n");
- ToReturn+=__T("\t\t\t\t</ebucore:timecodeStart>\n");
- }
-
- if (!MI.Get(Stream_Other, StreamPos, Other_ID).empty() || !MI.Get(Stream_Other, StreamPos, Other_Title).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:timecodeTrack");
- if (!MI.Get(Stream_Other, StreamPos, Other_ID).empty())
- {
- Ztring ID=MI.Get(Stream_Other, StreamPos, Other_ID);
- ID.FindAndReplace(__T("-Material"), Ztring());
- ID.FindAndReplace(__T("-Source"), Ztring());
- ToReturn+=__T(" trackId=\"")+ID+__T("\"");
- }
- if (!MI.Get(Stream_Other, StreamPos, Other_Title).empty())
- ToReturn+=__T(" trackName=\"")+MI.Get(Stream_Other, StreamPos, Other_Title)+__T("\"");
- ToReturn+=__T("/>\n");
- }
-
- if (!MI.Get(Stream_Other, StreamPos, Other_ID).empty())
- ToReturn+=__T("\t\t\t\t<ebucore:technicalAttributeBoolean typeLabel=\"Stripped\">")+Ztring(MI.Get(Stream_Other, StreamPos, __T("TimeCode_Striped"))==__T("Yes")?__T("true"):__T("false"))+__T("</ebucore:technicalAttributeBoolean>\n");
-
- ToReturn+=__T("\t\t\t</ebucore:timecodeFormat>\n");
-
- if (Is1_5)
- ToReturn+=__T("\t\t\t-->\n");
-
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-Ztring EbuCore_Transform_Metadata(Ztring &ToReturn, MediaInfo_Internal &MI, size_t StreamPos, bool Is1_5)
-{
- if (Is1_5)
- ToReturn+=__T("\t\t\t<!-- (metadataFormat not in XSD)\n");
-
- ToReturn+=__T("\t\t\t<ebucore:metadataFormat");
- if (!MI.Get(Stream_Other, StreamPos, Other_Format).empty())
- ToReturn+=__T(" metadataFormatName=\"")+MI.Get(Stream_Other, StreamPos, Other_Format)+__T("\"");
- ToReturn+=__T(">\n");
-
- if (!MI.Get(Stream_Other, StreamPos, Other_ID).empty() || !MI.Get(Stream_Other, StreamPos, Other_Title).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:metadataTrack");
- if (!MI.Get(Stream_Other, StreamPos, Other_ID).empty())
- ToReturn+=__T(" trackId=\"")+MI.Get(Stream_Other, StreamPos, Other_ID)+__T("\"");
- if (!MI.Get(Stream_Other, StreamPos, Other_Title).empty())
- ToReturn+=__T(" trackName=\"")+MI.Get(Stream_Other, StreamPos, Other_Title)+__T("\"");
- ToReturn+=__T("/>\n");
- }
-
- ToReturn+=__T("\t\t\t</ebucore:metadataFormat>\n");
-
- if (Is1_5)
- ToReturn+=__T("\t\t\t-->\n");
-
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-Ztring Export_EbuCore::Transform(MediaInfo_Internal &MI, version Version)
-{
- //Current date/time is ISO format
- time_t Seconds=time(NULL);
- Ztring DateTime; DateTime.Date_From_Seconds_1970((int32u)Seconds);
- DateTime.FindAndReplace(__T("UTC "), __T(""));
- DateTime.FindAndReplace(__T(" "), __T("T"));
- Ztring Date=DateTime.substr(0, 10);
- Ztring Time=DateTime.substr(11, 8);
-
- size_t As11_Core_Pos=(size_t)-1;
- size_t As11_Segmentation_Pos=(size_t)-1;
- size_t As11_UkDpp_Pos=(size_t)-1;
- for (size_t StreamPos_Temp=0; StreamPos_Temp<MI.Count_Get(Stream_Other); StreamPos_Temp++)
- {
- if (MI.Get(Stream_Other, StreamPos_Temp, Other_Format)==__T("AS-11 Core"))
- As11_Core_Pos=StreamPos_Temp;
- if (MI.Get(Stream_Other, StreamPos_Temp, Other_Format)==__T("AS-11 Segmentation"))
- As11_Segmentation_Pos=StreamPos_Temp;
- if (MI.Get(Stream_Other, StreamPos_Temp, Other_Format)==__T("AS-11 UKDPP"))
- As11_UkDpp_Pos=StreamPos_Temp;
- }
-
- Ztring ToReturn;
-
- //ebuCoreMain
- ToReturn+=__T("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
- ToReturn+=__T("<!-- Generated by ")+MediaInfoLib::Config.Info_Version_Get()+__T(" -->\n");
- if (Version==Version_1_5)
- ToReturn+=__T("<ebucore:ebuCoreMain xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:ebucore=\"urn:ebu:metadata-schema:ebuCore_2014\"\n xmlns:xalan=\"http://xml.apache.org/xalan\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:schemaLocation=\"urn:ebu:metadata-schema:ebuCore_2014 http://www.ebu.ch/metadata/schemas/EBUCore/20140318/EBU_CORE_20140318.xsd\" version=\"1.5\" dateLastModified=\"")+Date+__T("\" timeLastModified=\"")+Time+__T("Z\">\n");
- else
- ToReturn+=__T("<ebucore:ebuCoreMain xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:ebucore=\"urn:ebu:metadata-schema:ebuCore_2015\"\n xmlns:xalan=\"http://xml.apache.org/xalan\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:schemaLocation=\"urn:ebu:metadata-schema:ebuCore_2014 http://www.ebu.ch/metadata/schemas/EBUCore/20141231/EBU_CORE_20141231_draft16.xsd\" version=\"1.6\" dateLastModified=\"")+Date+__T("\" timeLastModified=\"")+Time+__T("Z\">\n");
-
- //coreMetadata
- ToReturn+=__T("\t<ebucore:coreMetadata>\n");
-
- //title
- if (As11_Core_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_Core_Pos, __T("ProgrammeTitle")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:title typeLabel=\"PROGRAMME TITLE\">\n");
- ToReturn+=__T("\t\t\t<dc:title>")+MI.Get(Stream_Other, As11_Core_Pos, __T("ProgrammeTitle"))+__T("</dc:title>\n");
- ToReturn+=__T("\t\t</ebucore:title>\n");
- }
- else if (As11_Core_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_Core_Pos, __T("EpisodeTitleNumber")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:title typeLabel=\"EPISODE TITLE NUMBER\">\n");
- ToReturn+=__T("\t\t\t<dc:title>")+MI.Get(Stream_Other, As11_Core_Pos, __T("EpisodeTitleNumber"))+__T("</dc:title>\n");
- ToReturn+=__T("\t\t</ebucore:title>\n");
- }
-
- //alternativeTitle
- if (As11_Core_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_Core_Pos, __T("SeriesTitle")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:alternativeTitle typeLabel=\"SERIES TITLE\">\n");
- ToReturn+=__T("\t\t\t<dc:title>")+MI.Get(Stream_Other, As11_Core_Pos, __T("SeriesTitle"))+__T("</dc:title>\n");
- ToReturn+=__T("\t\t</ebucore:alternativeTitle>\n");
- }
- if (As11_Core_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_Core_Pos, __T("EpisodeTitleNumber")).empty() && !MI.Get(Stream_Other, As11_Core_Pos, __T("ProgrammeTitle")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:alternativeTitle typeLabel=\"EPISODE TITLE NUMBER\">\n");
- ToReturn+=__T("\t\t\t<dc:title>")+MI.Get(Stream_Other, As11_Core_Pos, __T("EpisodeTitleNumber"))+__T("</dc:title>\n");
- ToReturn+=__T("\t\t</ebucore:alternativeTitle>\n");
- }
-
- //description
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("Synopsis")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:description typeLabel=\"SYNOPSIS\">\n");
- ToReturn+=__T("\t\t\t<dc:description>")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("Synopsis"))+__T("</dc:description>\n");
- ToReturn+=__T("\t\t</ebucore:description>\n");
- }
-
- //ProductPlacement
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("ProductPlacement")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:description typeLabel=\"PRODUCT PLACEMENT\">\n");
- ToReturn+=__T("\t\t\t<dc:description>")+Ztring(MI.Get(Stream_Other, As11_UkDpp_Pos, __T("ProductPlacement"))==__T("Yes")?__T("true"):__T("false"))+__T("</dc:description>\n");
- ToReturn+=__T("\t\t</ebucore:description>\n");
- }
-
- //ContactEmail / ContactTelephoneNumber
- if (As11_UkDpp_Pos!=(size_t)-1 && (!MI.Get(Stream_Other, As11_UkDpp_Pos, __T("ContactEmail")).empty() || !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("ContactTelephoneNumber")).empty()))
- {
- ToReturn+=__T("\t\t<ebucore:contributor>\n");
- ToReturn+=__T("\t\t\t<ebucore:contactDetails>\n");
- ToReturn+=__T("\t\t\t\t<ebucore:details>\n");
- if (!MI.Get(Stream_Other, As11_UkDpp_Pos, __T("ContactEmail")).empty())
- ToReturn+=__T("\t\t\t\t\t<ebucore:emailAddress>")+XML_Encode(MI.Get(Stream_Other, As11_UkDpp_Pos, __T("ContactEmail")))+__T("</ebucore:emailAddress>\n");
- if (!MI.Get(Stream_Other, As11_UkDpp_Pos, __T("ContactTelephoneNumber")).empty())
- ToReturn+=__T("\t\t\t\t\t<ebucore:telephoneNumber>")+XML_Encode(MI.Get(Stream_Other, As11_UkDpp_Pos, __T("ContactTelephoneNumber")))+__T("</ebucore:telephoneNumber>\n");
- ToReturn+=__T("\t\t\t\t</ebucore:details>\n");
- ToReturn+=__T("\t\t\t</ebucore:contactDetails>\n");
- ToReturn+=__T("\t\t\t<ebucore:role typeLabel=\"contact\"/>\n");
- ToReturn+=__T("\t\t</ebucore:contributor>\n");
- }
-
- //Originator
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("Originator")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:contributor>\n");
- ToReturn+=__T("\t\t\t<ebucore:organisationDetails>\n");
- ToReturn+=__T("\t\t\t\t<ebucore:organisationName>")+XML_Encode(MI.Get(Stream_Other, As11_UkDpp_Pos, __T("Originator")))+__T("</ebucore:organisationName>\n");
- ToReturn+=__T("\t\t\t</ebucore:organisationDetails>\n");
- ToReturn+=__T("\t\t\t<ebucore:role typeLabel=\"originator\"/>\n");
- ToReturn+=__T("\t\t</ebucore:contributor>\n");
- }
-
- //Distributor
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("Distributor")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:contributor>\n");
- ToReturn+=__T("\t\t\t<ebucore:organisationDetails>\n");
- ToReturn+=__T("\t\t\t\t<ebucore:organisationName>")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("Distributor"))+__T("</ebucore:organisationName>\n");
- ToReturn+=__T("\t\t\t</ebucore:organisationDetails>\n");
- ToReturn+=__T("\t\t\t<ebucore:role typeLabel=\"distributor\"/>\n");
- ToReturn+=__T("\t\t</ebucore:contributor>\n");
- }
-
- //date
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("CopyrightYear")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:date>\n");
- ToReturn+=__T("\t\t\t<ebucore:copyrighted startYear=\"")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("CopyrightYear"))+__T("\"/>\n");
- ToReturn+=__T("\t\t</ebucore:date>\n");
- }
-
- //type
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("Genre")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:type>\n");
- ToReturn+=__T("\t\t\t<ebucore:genre typeDefinition=\"")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("Genre"))+__T("\"/>\n");
- ToReturn+=__T("\t\t</ebucore:type>\n");
- }
-
- //format
- ToReturn+=__T("\t\t<ebucore:format>\n");
-
- //format - videoFormat
- for (size_t Pos=0; Pos<MI.Count_Get(Stream_Video); Pos++)
- EbuCore_Transform_Video(ToReturn, MI, Pos, Version);
-
- //format - audioFormat
- for (size_t Pos=0; Pos<MI.Count_Get(Stream_Audio); Pos++)
- EbuCore_Transform_Audio(ToReturn, MI, Pos, Version);
-
- //format - containerFormat
- ToReturn+=__T("\t\t\t<ebucore:containerFormat");
- if (!MI.Get(Stream_General, 0, General_Format).empty())
- ToReturn+=(Version>=Version_1_6?__T(" containerFormatName=\""):__T(" formatLabel=\""))+MI.Get(Stream_General, 0, General_Format)+__T("\"");
- if (!MI.Get(Stream_General, 0, General_ID).empty())
- ToReturn+=__T(" containerFormatId=\"")+MI.Get(Stream_General, 0, General_ID)+__T("\"");
- ToReturn+=__T(">\n");
- if (!MI.Get(Stream_General, 0, General_CodecID).empty() || (!MI.Get(Stream_General, 0, General_Format_Commercial_IfAny).empty()))
- {
- ToReturn+=__T("\t\t\t\t<ebucore:codec>\n");
- if (!MI.Get(Stream_General, 0, General_CodecID).empty())
- {
- ToReturn+=__T("\t\t\t\t\t<ebucore:codecIdentifier>\n");
- ToReturn+=__T("\t\t\t\t\t\t<dc:identifier>")+MI.Get(Stream_General, 0, General_CodecID)+__T("</dc:identifier>\n");
- ToReturn+=__T("\t\t\t\t\t</ebucore:codecIdentifier>\n");
- }
- if (!MI.Get(Stream_General, 0, General_Format_Commercial_IfAny).empty())
- ToReturn+=__T("\t\t\t\t\t<ebucore:name>")+MI.Get(Stream_General, 0, General_Format_Commercial_IfAny)+__T("</ebucore:name>\n");
- ToReturn+=__T("\t\t\t\t</ebucore:codec>\n");
- }
- if (Version>=Version_1_6)
- {
- ToReturn+=__T("\t\t\t\t<ebucore:containerEncoding");
- if (!MI.Get(Stream_General, 0, General_Format).empty())
- ToReturn+=__T(" formatLabel=\"")+MI.Get(Stream_General, 0, General_Format)+__T("\"");
- //if (Version>=Version_1_6 && !MI.Get(Stream_General, 0, General_Format_Profile).empty())
- // ToReturn+=__T(" containeFormatProfile=\"")+MI.Get(Stream_General, 0, General_Format_Profile)+__T("\"");
- ToReturn+=__T("/>\n");
- }
- //format - containerFormat - technicalAttributeString - AS11ShimName
- if (As11_Core_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_Core_Pos, __T("ShimName")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:")+Ztring(Version>=Version_1_6?__T("technicalAttributeString"):__T("comment"))+__T(" typeLabel=\"AS11ShimName\">")+MI.Get(Stream_Other, As11_Core_Pos, __T("ShimName"))+__T("</ebucore:")+Ztring(Version>=Version_1_6?__T("technicalAttributeString"):__T("comment"))+__T(">\n");
- }
-
- //format - containerFormat - technicalAttributeString - AS11ShimVersion
- if (As11_Core_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_Core_Pos, __T("ShimVersion")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:")+Ztring(Version>=Version_1_6?__T("technicalAttributeString"):__T("comment"))+__T(" typeLabel=\"AS11ShimVersion\">")+MI.Get(Stream_Other, As11_Core_Pos, __T("ShimVersion"))+__T("</ebucore:")+Ztring(Version>=Version_1_6?__T("technicalAttributeString"):__T("comment"))+__T(">\n");
- }
-
- //format - containerFormat - technicalAttributeString - Format_Profile
- if (!MI.Get(Stream_General, 0, __T("Format_Profile")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:")+Ztring(Version>=Version_1_6?__T("technicalAttributeString"):__T("comment"))+__T(" typeLabel=\"FormatProfile\">")+MI.Get(Stream_General, 0, __T("Format_Profile"))+__T("</ebucore:")+Ztring(Version>=Version_1_6?__T("technicalAttributeString"):__T("comment"))+__T(">\n");
- }
-
- //format - containerFormat - technicalAttributeString - Format_Settings
- if (!MI.Get(Stream_General, 0, __T("Format_Profile")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:")+Ztring(Version>=Version_1_6?__T("technicalAttributeString"):__T("comment"))+__T(" typeLabel=\"FormatSettings\">")+MI.Get(Stream_General, 0, __T("Format_Settings"))+__T("</ebucore:")+Ztring(Version>=Version_1_6?__T("technicalAttributeString"):__T("comment"))+__T(">\n");
- }
-
- //format - containerFormat - technicalAttributeString - Encoded_Application
- if (!MI.Get(Stream_General, 0, __T("Encoded_Application")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:")+Ztring(Version>=Version_1_6?__T("technicalAttributeString"):__T("comment"))+__T(" typeLabel=\"WrittingApplication\">")+MI.Get(Stream_General, 0, __T("Encoded_Application"))+__T("</ebucore:")+Ztring(Version>=Version_1_6?__T("technicalAttributeString"):__T("comment"))+__T(">\n");
- }
-
- //format - containerFormat - technicalAttributeString - Encoded_Library
- if (!MI.Get(Stream_General, 0, __T("Encoded_Library/String")).empty())
- {
- ToReturn+=__T("\t\t\t\t<ebucore:")+Ztring(Version>=Version_1_6?__T("technicalAttributeString"):__T("comment"))+__T(" typeLabel=\"WrittingLibrary\">")+MI.Get(Stream_General, 0, __T("Encoded_Library/String"))+__T("</ebucore:")+Ztring(Version>=Version_1_6?__T("technicalAttributeString"):__T("comment"))+__T(">\n");
- }
-
- ToReturn+=__T("\t\t\t</ebucore:containerFormat>\n");
-
- //format - SigningPresent
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("SigningPresent")).empty())
- {
- if (Version==Version_1_5)
- ToReturn+=__T("\t\t\t<!-- (signingPresenceFlag not in XSD)\n");
- //ToReturn+=__T("\t\t\t<ebucore:dataFormat>\n");
- ToReturn+=__T("\t\t\t<ebucore:signingFormat signingPresenceFlag=\"")+Ztring(MI.Get(Stream_Other, As11_UkDpp_Pos, __T("SigningPresent"))==__T("Yes")?__T("true"):__T("false"))+__T("\"/>\n");
- //ToReturn+=__T("\t\t\t</ebucore:dataFormat>\n");
- if (Version==Version_1_5)
- ToReturn+=__T("\t\t\t-->\n");
- }
-
- //format - dataFormat
- for (size_t Pos=0; Pos<MI.Count_Get(Stream_Text); Pos++)
- EbuCore_Transform_Text(ToReturn, MI, Pos);
-
- //format - ClosedCaptionsPresent
- if (As11_Core_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_Core_Pos, __T("ClosedCaptionsPresent")).empty())
- {
- ToReturn+=__T("\t\t\t<ebucore:dataFormat>\n");
- ToReturn+=__T("\t\t\t\t<ebucore:captioningFormat captioningPresenceFlag=\"")+Ztring(MI.Get(Stream_Other, As11_Core_Pos, __T("OpenCaptionsPresent"))==__T("Yes")?__T("true"):__T("false"))+__T("\" closed=\"true\"/>\n");
- ToReturn+=__T("\t\t\t</ebucore:dataFormat>\n");
- }
-
- //format - OpenCaptionsPresent
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("OpenCaptionsPresent")).empty())
- {
- ToReturn+=__T("\t\t\t<ebucore:dataFormat>\n");
- ToReturn+=__T("\t\t\t\t<ebucore:captioningFormat captioningPresenceFlag=\"")+Ztring(MI.Get(Stream_Other, As11_UkDpp_Pos, __T("OpenCaptionsPresent"))==__T("Yes")?__T("true"):__T("false"))+__T("\" closed=\"false\"/>\n");
- ToReturn+=__T("\t\t\t</ebucore:dataFormat>\n");
- }
-
- //format - time codes
- for (size_t Pos=0; Pos<MI.Count_Get(Stream_Other); Pos++)
- if (MI.Get(Stream_Other, Pos, Other_Type)==__T("Time code"))
- EbuCore_Transform_TimeCode(ToReturn, MI, Pos, Version==Version_1_5);
-
- //format - Metadata
- for (size_t Pos=0; Pos<MI.Count_Get(Stream_Other); Pos++)
- if (MI.Get(Stream_Other, Pos, Other_Type)==__T("Metadata"))
- EbuCore_Transform_Metadata(ToReturn, MI, Pos, Version==Version_1_5);
-
- //format - technicalAttributeString - LineUpStart
- bool startDone=false;
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("LineUpStart")).empty())
- {
- ToReturn+=__T("\t\t\t<ebucore:start typeLabel=\"LineUpStart\">\n");
- ToReturn+=__T("\t\t\t\t<ebucore:timecode>")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("LineUpStart"))+__T("</ebucore:timecode>\n");
- ToReturn+=__T("\t\t\t</ebucore:start>\n");
- startDone=true;
- }
-
- //format - technicalAttributeString - IdentClockStart
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("IdentClockStart")).empty())
- {
- if (Version==Version_1_5 && startDone)
- ToReturn+=__T("\t\t\t<!-- Not valid in XSD\n");
- ToReturn+=__T("\t\t\t<ebucore:start typeLabel=\"IdentClockStart\">\n");
- ToReturn+=__T("\t\t\t\t<ebucore:timecode>")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("IdentClockStart"))+__T("</ebucore:timecode>\n");
- ToReturn+=__T("\t\t\t</ebucore:start>\n");
- if (Version==Version_1_5 && startDone)
- ToReturn+=__T("\t\t\t-->\n");
- }
-
- //format - duration
- bool durationDone=false;
- if (!MI.Get(Stream_General, 0, General_Duration).empty())
- {
- float64 DurationS=MI.Get(Stream_General, 0, General_Duration).To_float64()/1000;
- int64u DurationH=(int64u)(DurationS/60/60);
- DurationS-=DurationH*60*60;
- int64u DurationM=(int64u)(DurationS/60);
- DurationS-=DurationM*60;
- Ztring Duration;
- if (DurationH)
- Duration+=Ztring::ToZtring(DurationH)+__T('H');
- if (DurationM)
- Duration+=Ztring::ToZtring(DurationM)+__T('M');
- Duration+=Ztring::ToZtring(DurationS, 3)+__T('S');
- ToReturn+=__T("\t\t\t<ebucore:duration>\n");
- ToReturn+=__T("\t\t\t\t<ebucore:normalPlayTime>PT")+Duration+__T("</ebucore:normalPlayTime>\n");
- ToReturn+=__T("\t\t\t</ebucore:duration>\n");
- durationDone=true;
- }
-
- //format - duration
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("TotalProgrammeDuration")).empty())
- {
- if (Version==Version_1_5 && durationDone)
- ToReturn+=__T("\t\t\t<!-- Not valid in XSD\n");
- ToReturn+=__T("\t\t\t<ebucore:duration typeLabel=\"TotalProgrammeDuration\">\n");
- ToReturn+=__T("\t\t\t\t<ebucore:timecode>")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("IdentClockStart"))+__T("</ebucore:timecode>\n");
- ToReturn+=__T("\t\t\t</ebucore:duration>\n");
- if (Version==Version_1_5 && durationDone)
- ToReturn+=__T("\t\t\t-->\n");
- }
-
- //format - fileSize
- if (!MI.Get(Stream_General, 0, General_FileSize).empty())
- ToReturn+=__T("\t\t\t<ebucore:fileSize>")+MI.Get(Stream_General, 0, General_FileSize)+__T("</ebucore:fileSize>\n");
-
- //format - fileName
- if (!MI.Get(Stream_General, 0, General_FileName).empty())
- {
- Ztring Name=MI.Get(Stream_General, 0, General_FileName);
- if (!MI.Get(Stream_General, 0, General_FileExtension).empty())
- {
- Name+=__T('.');
- Name+=MI.Get(Stream_General, 0, General_FileExtension);
- }
- ToReturn+=__T("\t\t\t<ebucore:fileName>")+XML_Encode(Name)+__T("</ebucore:fileName>\n");
- }
-
- //format - locator
- if (!MI.Get(Stream_General, 0, General_CompleteName).empty())
- {
- ToReturn+=__T("\t\t\t<ebucore:locator>")+XML_Encode(MI.Get(Stream_General, 0, General_CompleteName))+__T("</ebucore:locator>\n");
- }
-
- //format - technicalAttributeString - AudioLoudnessStandard
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("AudioLoudnessStandard")).empty())
- {
- ToReturn+=__T("\t\t\t<ebucore:technicalAttributeString typeLabel=\"AudioLoudnessStandard\">")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("AudioLoudnessStandard"))+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //format - technicalAttributeString - AudioDescriptionType
- if (!MI.Get(Stream_Other, As11_UkDpp_Pos, __T("AudioDescriptionType")).empty())
- {
- ToReturn+=__T("\t\t\t<ebucore:technicalAttributeString typeLabel=\"AudioDescriptionType\">")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("AudioDescriptionType"))+__T("</ebucore:technicalAttributeString>\n");
- }
-
- //format - technicalAttributeString - overallBitRate
- if (!MI.Get(Stream_General, 0, General_OverallBitRate).empty())
- {
- ToReturn+=__T("\t\t\t<ebucore:technicalAttributeInteger typeLabel=\"OverallBitRate\"")+(Version>=Version_1_6?Ztring(__T(" unit=\"bps\"")):Ztring())+__T(">")+MI.Get(Stream_General, 0, General_OverallBitRate)+__T("</ebucore:technicalAttributeInteger>\n");
- }
-
- //format - technicalAttributeString - ProgrammeHasText
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_Core_Pos, __T("ProgrammeHasText")).empty())
- {
- ToReturn+=__T("\t\t\t<ebucore:technicalAttributeBoolean typeLabel=\"ProgrammeHasText\">")+Ztring(MI.Get(Stream_Other, As11_UkDpp_Pos, __T("ProgrammeHasText"))==__T("Yes")?__T("true"):__T("false"))+__T("</ebucore:technicalAttributeBoolean>\n");
- }
-
- //format - technicalAttributeString - AudioDescriptionPresent
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_Core_Pos, __T("AudioDescriptionPresent")).empty())
- {
- ToReturn+=__T("\t\t\t<ebucore:technicalAttributeBoolean typeLabel=\"AudioDescriptionPresent\">")+Ztring(MI.Get(Stream_Other, As11_UkDpp_Pos, __T("AudioDescriptionPresent"))==__T("Yes")?__T("true"):__T("false"))+__T("</ebucore:technicalAttributeBoolean>\n");
- }
-
- //format - dateCreated
- if (!MI.Get(Stream_General, 0, General_Encoded_Date).empty())
- {
- Ztring DateTime=MI.Get(Stream_General, 0, General_Encoded_Date);
- DateTime.FindAndReplace(__T("UTC "), __T(""));
- DateTime.FindAndReplace(__T(" "), __T("T"));
- Ztring Date=DateTime.substr(0, 10);
- Ztring Time=DateTime.substr(11, 8);
-
- ToReturn+=__T("\t\t\t<ebucore:dateCreated startDate=\"")+Date+__T("\" startTime=\"")+Time+__T("Z\"/>\n");
- }
-
- //format - dateModified
- if (!MI.Get(Stream_General, 0, General_Tagged_Date).empty())
- {
- Ztring DateTime=MI.Get(Stream_General, 0, General_Tagged_Date);
- DateTime.FindAndReplace(__T("UTC "), __T(""));
- DateTime.FindAndReplace(__T(" "), __T("T"));
- Ztring Date=DateTime.substr(0, 10);
- Ztring Time=DateTime.substr(11, 8);
-
- ToReturn+=__T("\t\t\t<ebucore:dateModified startDate=\"")+Date+__T("\" startTime=\"")+Time+__T("Z\"/>\n");
- }
-
- //format
- ToReturn+=__T("\t\t</ebucore:format>\n");
-
- //identifier
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("ProductionNumber")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:identifier typeLabel=\"PRODUCTION NUMBER\">\n");
- ToReturn+=__T("\t\t\t<dc:identifier>")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("ProductionNumber"))+__T("</dc:identifier>\n");
- ToReturn+=__T("\t\t</ebucore:identifier>\n");
- }
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("OtherIdentifier")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:identifier typeLabel=\"INTERNAL IDENTIFIER\">\n");
- ToReturn+=__T("\t\t\t<dc:identifier>")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("OtherIdentifier"))+__T("</dc:identifier>\n");
- ToReturn+=__T("\t\t</ebucore:identifier>\n");
- }
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("OtherIdentifierType")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:identifier typeLabel=\"INTERNAL IDENTIFIER TYPE\">\n");
- ToReturn+=__T("\t\t\t<dc:identifier>")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("OtherIdentifierType"))+__T("</dc:identifier>\n");
- ToReturn+=__T("\t\t</ebucore:identifier>\n");
- }
-
- //format - PrimaryAudioLanguage
- if (As11_Core_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_Core_Pos, __T("PrimaryAudioLanguage")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:language typeLabel=\"PrimaryAudioLanguage\">\n");
- ToReturn+=__T("\t\t\t<dc:language>")+MI.Get(Stream_Other, As11_Core_Pos, __T("PrimaryAudioLanguage"))+__T("</dc:language>\n");
- ToReturn+=__T("\t\t</ebucore:language>\n");
- }
-
- //format - SecondaryAudioLanguage
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("SecondaryAudioLanguage")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:language typeLabel=\"SecondaryAudioLanguage\">\n");
- ToReturn+=__T("\t\t\t<dc:language>")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("SecondaryAudioLanguage"))+__T("</dc:language>\n");
- ToReturn+=__T("\t\t</ebucore:language>\n");
- }
-
- //format - TertiaryAudioLanguage
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("TertiaryAudioLanguage")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:language typeLabel=\"TertiaryAudioLanguage\">\n");
- ToReturn+=__T("\t\t\t<dc:language>")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("TertiaryAudioLanguage"))+__T("</dc:language>\n");
- ToReturn+=__T("\t\t</ebucore:language>\n");
- }
-
- //language
- if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("ProgrammeTextLanguage")).empty())
- {
- ToReturn+=__T("\t\t<ebucore:language typeLabel=\"ProgrammeTextLanguage\">\n");
- ToReturn+=__T("\t\t\t<dc:language>")+MI.Get(Stream_Other, As11_UkDpp_Pos, __T("ProgrammeTextLanguage"))+__T("</dc:language>\n");
- ToReturn+=__T("\t\t</ebucore:language>\n");
- }
-
- //part
- if (As11_Segmentation_Pos!=(size_t)-1)
- {
- size_t Pos=1;
- for (;;)
- {
- Ztring Content=MI.Get(Stream_Other, As11_Segmentation_Pos, Ztring::ToZtring(Pos));
- if (Content.empty())
- break;
-
- Ztring Begin=Content.SubString(Ztring(), __T(" + "));
- Ztring Duration=Content.SubString(__T(" + "), __T(" = "));
-
- ToReturn+=__T("\t\t<ebucore:part partNumber=\"")+Ztring::ToZtring(Pos)+__T("\" partTotalNumber=\"")+MI.Get(Stream_Other, As11_Segmentation_Pos, __T("PartTotal"))+__T("\">\n");
- ToReturn+=__T("\t\t\t<ebucore:partStartTime>\n");
- ToReturn+=__T("\t\t\t\t<ebucore:timecode>")+Begin+__T("</ebucore:timecode>\n");
- ToReturn+=__T("\t\t\t</ebucore:partStartTime>\n");
- ToReturn+=__T("\t\t\t<ebucore:partDuration>\n");
- ToReturn+=__T("\t\t\t\t<ebucore:timecode>")+Duration+__T("</ebucore:timecode>\n");
- ToReturn+=__T("\t\t\t</ebucore:partDuration>\n");
- ToReturn+=__T("\t\t</ebucore:part>\n");
-
- Pos++;
- }
- }
-
- //coreMetadata
- ToReturn+=__T("\t</ebucore:coreMetadata>\n");
-
- //ebuCoreMain
- ToReturn+=__T("</ebucore:ebuCoreMain>\n");
-
- //Carriage return
- ToReturn.FindAndReplace(__T("\n"), EOL, 0, Ztring_Recursive);
-
- return ToReturn;
-}
-
-//***************************************************************************
-//
-//***************************************************************************
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_EbuCore.h b/src/thirdparty/MediaInfo/MediaInfo/Export/Export_EbuCore.h
deleted file mode 100644
index 3317a09cc..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_EbuCore.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef Export_EbuCoreH
-#define Export_EbuCoreH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Internal.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-/// @brief Export_EbuCore
-//***************************************************************************
-
-class Export_EbuCore
-{
-public :
- //Constructeur/Destructeur
- Export_EbuCore ();
- ~Export_EbuCore ();
-
- //Input
- enum version
- {
- Version_1_5,
- Version_1_6,
- };
- Ztring Transform(MediaInfo_Internal &MI, version Version=Version_1_5);
-};
-
-} //NameSpace
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_Mpeg7.cpp b/src/thirdparty/MediaInfo/MediaInfo/Export/Export_Mpeg7.cpp
deleted file mode 100644
index a884183ab..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_Mpeg7.cpp
+++ /dev/null
@@ -1,1554 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEG7_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Export/Export_Mpeg7.h"
-#include "MediaInfo/File__Analyse_Automatic.h"
-#include <ctime>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const Char* Mpeg7_Type(MediaInfo_Internal &MI) //TO ADAPT
-{
- if (MI.Count_Get(Stream_Image))
- {
- if (MI.Count_Get(Stream_Video) || MI.Count_Get(Stream_Audio))
- return __T("Multimedia");
- else
- return __T("Image");
- }
- else if (MI.Count_Get(Stream_Video))
- {
- if (MI.Count_Get(Stream_Audio))
- return __T("AudioVisual");
- else
- return __T("Video");
- }
- else if (MI.Count_Get(Stream_Audio))
- return __T("Audio");
-
- //Not known
- const Ztring &Format=MI.Get(Stream_General, 0, General_Format);
- if (Format==__T("AVI") || Format==__T("DV") || Format==__T("MPEG-4") || Format==__T("MPEG-PS") || Format==__T("MPEG-TS") || Format==__T("QuickTime") || Format==__T("Windows Media"))
- return __T("Video");
- if (Format==__T("MPEG Audio") || Format==__T("Wave"))
- return __T("Audio");
- if (Format==__T("BMP") || Format==__T("GIF") || Format==__T("JPEG") || Format==__T("JPEG 2000") || Format==__T("JPEG 2000") || Format==__T("PNG") || Format==__T("TIFF"))
- return __T("Image");
- return __T("Multimedia");
-}
-
-//---------------------------------------------------------------------------
-int32u Mpeg7_ContentCS_termID(MediaInfo_Internal &MI)
-{
- if (MI.Count_Get(Stream_Image))
- {
- if (MI.Count_Get(Stream_Video) || MI.Count_Get(Stream_Audio))
- return 20000;
- else
- return 40100;
- }
- else if (MI.Count_Get(Stream_Video))
- {
- if (MI.Count_Get(Stream_Audio))
- return 20000;
- else
- return 40200;
- }
- else if (MI.Count_Get(Stream_Audio))
- return 10000;
-
- //Not known
- const Ztring &Format=MI.Get(Stream_General, 0, General_Format);
- if (Format==__T("AVI") || Format==__T("DV") || Format==__T("MPEG-4") || Format==__T("MPEG-PS") || Format==__T("MPEG-TS") || Format==__T("QuickTime") || Format==__T("Windows Media"))
- return 40200;
- if (Format==__T("MPEG Audio") || Format==__T("Wave"))
- return 10000;
- if (Format==__T("BMP") || Format==__T("GIF") || Format==__T("JPEG") || Format==__T("JPEG 2000") || Format==__T("JPEG 2000") || Format==__T("PNG") || Format==__T("TIFF"))
- return 40100;
- return 500000;
-}
-
-Ztring Mpeg7_ContentCS_Name(int32u termID, MediaInfo_Internal &) //xxyyzz: xx=main number, yy=sub-number, zz=sub-sub-number
-{
- switch (termID/10000)
- {
- case 1 : return __T("Audio");
- case 2 : return __T("Audiovisual");
- case 3 : return __T("Scene");
- case 4 : switch ((termID%10000)/100)
- {
- case 1 : return __T("Image");
- case 2 : return __T("Video");
- case 3 : return __T("Graphics");
- }
- case 50 : return Ztring(); //Unknown
- default : return Ztring();
- }
-}
-
-//---------------------------------------------------------------------------
-int32u Mpeg7_FileFormatCS_termID_MediaInfo(MediaInfo_Internal &MI)
-{
- const Ztring &Format=MI.Get(Stream_General, 0, General_Format);
-
- if (Format==__T("MPEG Audio"))
- {
- if (MI.Get(Stream_Audio, 0, Audio_Format_Profile).find(__T("2"))!=string::npos)
- return 500000; //mp2
- if (MI.Get(Stream_Audio, 0, Audio_Format_Profile).find(__T("1"))!=string::npos)
- return 510000; //mp1
- return 0;
- }
- if (Format==__T("Wave") && MI.Get(Stream_General, 0, General_Format_Profile)==__T("RF64"))
- return 520000; //Wav (RF64)
- if (Format==__T("Wave64"))
- return 530000;
- return 0;
-}
-
-//---------------------------------------------------------------------------
-int32u Mpeg7_FileFormatCS_termID(MediaInfo_Internal &MI)
-{
- const Ztring &Format=MI.Get(Stream_General, 0, General_Format);
-
- if (Format==__T("AVI"))
- return 70000;
- if (Format==__T("BMP"))
- return 110000;
- if (Format==__T("GIF"))
- return 120000;
- if (Format==__T("DV"))
- return 60000;
- if (Format==__T("JPEG"))
- return 10000;
- if (Format==__T("JPEG 2000") || Format==__T("JPEG 2000"))
- return 20000;
- if (Format==__T("MPEG Audio"))
- return (MI.Get(Stream_Audio, 0, Audio_Format_Profile).find(__T("3"))!=string::npos)?40000:0;
- if (Format==__T("MPEG-4"))
- return 50000;
- if (Format==__T("MPEG-PS"))
- return 30100;
- if (Format==__T("MPEG-TS"))
- return 30200;
- if (Format==__T("PNG"))
- return 150000;
- if (Format==__T("QuickTime"))
- return 160000;
- if (Format==__T("TIFF"))
- return 180000;
- if (Format==__T("Wave"))
- {
- if (!MI.Get(Stream_General, 0, General_Format_Profile).empty())
- return Mpeg7_FileFormatCS_termID_MediaInfo(MI); //Out of specs
- else
- return 90000;
- }
- if (Format==__T("Windows Media"))
- return 190000;
- if (Format==__T("ZIP"))
- return 100000;
-
- //Out of specs
- return Mpeg7_FileFormatCS_termID_MediaInfo(MI);
-}
-
-Ztring Mpeg7_FileFormatCS_Name(int32u termID, MediaInfo_Internal &MI) //xxyyzz: xx=main number, yy=sub-number, zz=sub-sub-number
-{
- switch (termID/10000)
- {
- case 1 : return __T("jpeg");
- case 2 : return __T("JPEG 2000");
- case 3 : switch ((termID%10000)/100)
- {
- case 1 : return __T("mpeg-ps");
- case 2 : return __T("mpeg-ts");
- default: return __T("mpeg");
- }
- case 4 : return __T("mp3");
- case 5 : return __T("mp4");
- case 6 : return __T("dv");
- case 7 : return __T("avi");
- case 8 : return __T("bdf");
- case 9 : return __T("wav");
- case 10 : return __T("zip");
- case 11 : return __T("bmp");
- case 12 : return __T("gif");
- case 13 : return __T("photocd");
- case 14 : return __T("ppm");
- case 15 : return __T("png");
- case 16 : return __T("quicktime");
- case 17 : return __T("spiff");
- case 18 : return __T("tiff");
- case 19 : return __T("asf");
- case 20 : return __T("iff");
- case 21 : return __T("miff");
- case 22 : return __T("pcx");
- //Out of specs --> MediaInfo CS
- case 50 : return __T("mp1");
- case 51 : return __T("mp2");
- case 52 : return __T("wav-rf64");
- case 53 : return __T("wave64");
- default : return MI.Get(Stream_General, 0, General_Format);
- }
-}
-
-//---------------------------------------------------------------------------
-int32u Mpeg7_VisualCodingFormatCS_termID(MediaInfo_Internal &MI, size_t StreamPos)
-{
- const Ztring &Format=MI.Get(Stream_Video, StreamPos, Video_Format);
- const Ztring &Version=MI.Get(Stream_Video, StreamPos, Video_Format_Version);
- const Ztring &Profile=MI.Get(Stream_Video, StreamPos, Video_Format_Profile);
-
- if (Format==__T("MPEG Video"))
- {
- if (Version.find(__T("1"))!=string::npos)
- return 10000;
- if (Version.find(__T("2"))!=string::npos)
- {
- if (Profile.find(__T("Simple@"))!=string::npos)
- {
- if (Profile.find(__T("Main"))!=string::npos)
- return 20101;
- return 20100;
- }
- if (Profile.find(__T("Main@"))!=string::npos)
- {
- if (Profile.find(__T("Low"))!=string::npos)
- return 20201;
- if (Profile.find(__T("@Main"))!=string::npos)
- return 20202;
- if (Profile.find(__T("High 1440"))!=string::npos)
- return 20203;
- if (Profile.find(__T("High"))!=string::npos)
- return 20204;
- return 20200;
- }
- if (Profile.find(__T("SNR Scalable@"))!=string::npos)
- {
- if (Profile.find(__T("Low"))!=string::npos)
- return 20301;
- if (Profile.find(__T("Main"))!=string::npos)
- return 20302;
- return 20300;
- }
- if (Profile.find(__T("Spatial Sclable@"))!=string::npos)
- {
- if (Profile.find(__T("Main"))!=string::npos)
- return 20401;
- if (Profile.find(__T("High 1440"))!=string::npos)
- return 20402;
- if (Profile.find(__T("High"))!=string::npos)
- return 20403;
- return 20400;
- }
- if (Profile.find(__T("High@"))!=string::npos)
- {
- if (Profile.find(__T("Main"))!=string::npos)
- return 20501;
- if (Profile.find(__T("High 1440"))!=string::npos)
- return 20502;
- if (Profile.find(__T("High"))!=string::npos)
- return 20503;
- return 20500;
- }
- if (Profile.find(__T("Multi-view@"))!=string::npos)
- {
- if (Profile.find(__T("Main"))!=string::npos)
- return 20601;
- return 20600;
- }
- if (Profile.find(__T("4:2:2@"))!=string::npos)
- {
- if (Profile.find(__T("Main"))!=string::npos)
- return 20701;
- return 20700;
- }
- return 20000;
- }
- }
- if (Format==__T("MPEG-4 Visual"))
- {
- if (Profile.find(__T("Simple@"))==0)
- {
- if (Profile.find(__T("L0"))!=string::npos)
- return 30101;
- if (Profile.find(__T("L1"))!=string::npos)
- return 30102;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30103;
- if (Profile.find(__T("L3"))!=string::npos)
- return 30104;
- if (Profile.find(__T("L4"))!=string::npos)
- return 30105;
- if (Profile.find(__T("L5"))!=string::npos)
- return 30106;
- return 30100;
- }
- if (Profile.find(__T("Simple Scalable@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 30201;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30202;
- if (Profile.find(__T("L3"))!=string::npos)
- return 30203;
- return 30200;
- }
- if (Profile.find(__T("Advanced Simple@"))==0)
- {
- if (Profile.find(__T("L0"))!=string::npos)
- return 30301;
- if (Profile.find(__T("L1"))!=string::npos)
- return 30302;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30303;
- if (Profile.find(__T("L3"))!=string::npos)
- return 30304;
- if (Profile.find(__T("L4"))!=string::npos)
- return 30305;
- if (Profile.find(__T("L5"))!=string::npos)
- return 30306;
- return 30100;
- }
- if (Profile.find(__T("Core@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 30401;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30402;
- return 30400;
- }
- if (Profile.find(__T("Core Scalable@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 30501;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30502;
- if (Profile.find(__T("L3"))!=string::npos)
- return 30503;
- return 30500;
- }
- if (Profile.find(__T("Advanced Core@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 30601;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30602;
- return 30600;
- }
- if (Profile.find(__T("Main@"))==0)
- {
- if (Profile.find(__T("L2"))!=string::npos)
- return 30701;
- if (Profile.find(__T("L3"))!=string::npos)
- return 30702;
- if (Profile.find(__T("L4"))!=string::npos)
- return 30703;
- return 30700;
- }
- if (Profile.find(__T("N-bit@"))==0)
- {
- if (Profile.find(__T("L2"))!=string::npos)
- return 30801;
- return 30800;
- }
- if (Profile.find(__T("Advanced Real Time Simple@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 30901;
- if (Profile.find(__T("L2"))!=string::npos)
- return 30902;
- if (Profile.find(__T("L3"))!=string::npos)
- return 30903;
- if (Profile.find(__T("L4"))!=string::npos)
- return 30904;
- return 30900;
- }
- if (Profile.find(__T("Advanced Coding Efficiency@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31001;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31002;
- if (Profile.find(__T("L3"))!=string::npos)
- return 31003;
- if (Profile.find(__T("L4"))!=string::npos)
- return 31004;
- return 31000;
- }
- if (Profile.find(__T("Simple Studio@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31101;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31102;
- if (Profile.find(__T("L3"))!=string::npos)
- return 31103;
- if (Profile.find(__T("L4"))!=string::npos)
- return 31104;
- return 31100;
- }
- if (Profile.find(__T("Core Studio@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31201;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31202;
- if (Profile.find(__T("L3"))!=string::npos)
- return 31203;
- if (Profile.find(__T("L4"))!=string::npos)
- return 31204;
- return 31200;
- }
- if (Profile.find(__T("Fine Granularity Scalable@"))==0)
- {
- if (Profile.find(__T("L0"))!=string::npos)
- return 31301;
- if (Profile.find(__T("L1"))!=string::npos)
- return 31302;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31303;
- if (Profile.find(__T("L3"))!=string::npos)
- return 31304;
- if (Profile.find(__T("L4"))!=string::npos)
- return 31305;
- if (Profile.find(__T("L5"))!=string::npos)
- return 31306;
- return 31300;
- }
- if (Profile.find(__T("Simple Face Animation@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31401;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31402;
- return 31400;
- }
- if (Profile.find(__T("Simple FBA@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31501;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31502;
- return 31500;
- }
- if (Profile.find(__T("Basic Animated Texture@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31601;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31602;
- return 31600;
- }
- if (Profile.find(__T("Scalable Texture@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31701;
- return 31700;
- }
- if (Profile.find(__T("Advanced Scalable Texture@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31801;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31802;
- if (Profile.find(__T("L3"))!=string::npos)
- return 31803;
- return 31800;
- }
- if (Profile.find(__T("Hybrid@"))==0)
- {
- if (Profile.find(__T("L1"))!=string::npos)
- return 31901;
- if (Profile.find(__T("L2"))!=string::npos)
- return 31902;
- return 31900;
- }
- return 30000;
- }
- if (Format==__T("JPEG"))
- return 50000;
- if (Format==__T("JPEG 2000"))
- {
- const Ztring &CodecID=MI.Get(Stream_Video, StreamPos, Video_CodecID);
- if (CodecID==__T("mjp2"))
- return 60100;
- if (CodecID==__T("mjs2"))
- return 60200;
- return 60000;
- }
- if (Format==__T("H.261"))
- return 70000;
- if (Format==__T("H.263"))
- return 80000;
-
- return 0;
-}
-
-Ztring Mpeg7_VisualCodingFormatCS_Name(int32u termID, MediaInfo_Internal &MI, size_t StreamPos) //xxyyzz: xx=main number, yy=sub-number, zz=sub-sub-number
-{
- switch (termID/10000)
- {
- case 1 : return __T("MPEG-1 Video");
- case 2 : switch ((termID%10000)/100)
- {
- case 1 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video Simple Profile @ Main Level");
- default: return __T("MPEG-2 Video Simple Profile");
- }
- case 2 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video Main Profile @ Low Level");
- case 2 : return __T("MPEG-2 Video Main Profile @ Main Level");
- case 3 : return __T("MPEG-2 Video Main Profile @ High 1440 Level");
- case 4 : return __T("MPEG-2 Video Main Profile @ High Level");
- default: return __T("MPEG-2 Video Main Profile");
- }
- case 3 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video SNR Scalable Profile @ Low Level");
- case 2 : return __T("MPEG-2 Video SNR Scalable Profile @ Main Level");
- default: return __T("MPEG-2 Video SNR Scalable Profile");
- }
- case 4 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video Spatial Scalable Profile @ Main Level");
- case 2 : return __T("MPEG-2 Video Spatial Scalable Profile @ High 1440 Level");
- case 3 : return __T("MPEG-2 Video Spatial Scalable Profile @ High Level");
- default: return __T("MPEG-2 Video Spatial Scalable Profile");
- }
- case 5 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video High Profile @ Main Level");
- case 2 : return __T("MPEG-2 Video High Profile @ High 1440 Level");
- case 3 : return __T("MPEG-2 Video High Profile @ High Level");
- default: return __T("MPEG-2 Video High Profile");
- }
- case 6 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video Multiview Profile @ Main Level");
- default: return __T("MPEG-2 Video Multiview Profile");
- }
- case 7 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Video 4:2:2 Profile @ Main Level");
- default: return __T("MPEG-2 Video 4:2:2 Profile");
- }
- default: return __T("MPEG-2 Video");
- }
- case 3 : switch ((termID%10000)/100)
- {
- case 1 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Simple Profile @ Level 0");
- case 2 : return __T("MPEG-4 Visual Simple Profile @ Level 1");
- case 3 : return __T("MPEG-4 Visual Simple Profile @ Level 2");
- case 4 : return __T("MPEG-4 Visual Simple Profile @ Level 3");
- default: return __T("MPEG-4 Visual Simple Profile");
- }
- case 2 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Simple Scalable Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Simple Scalable Profile @ Level 2");
- default: return __T("MPEG-4 Visual Simple Scalable Profile");
- }
- case 3 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Advanced Visual Simple Profile @ Level 0");
- case 2 : return __T("MPEG-4 Advanced Visual Simple Profile @ Level 1");
- case 3 : return __T("MPEG-4 Advanced Visual Simple Profile @ Level 2");
- case 4 : return __T("MPEG-4 Advanced Visual Simple Profile @ Level 3");
- case 5 : return __T("MPEG-4 Advanced Visual Simple Profile @ Level 4");
- case 6 : return __T("MPEG-4 Advanced Visual Simple Profile @ Level 5");
- default: return __T("MPEG-4 Advanced Visual Simple Profile");
- }
- case 4 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Core Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Core Profile @ Level 2");
- default: return __T("MPEG-4 Visual Core Profile");
- }
- case 5 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Core-Scalable Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Core-Scalable Profile @ Level 2");
- case 3 : return __T("MPEG-4 Visual Core-Scalable Profile @ Level 3");
- default: return __T("MPEG-4 Visual Core-Scalable Profile");
- }
- case 6 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual AdvancedCore Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual AdvancedCore Profile @ Level 2");
- default: return __T("MPEG-4 Visual AdvancedCore Profile");
- }
- case 7 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Main Profile @ Level 2");
- case 2 : return __T("MPEG-4 Visual Main Profile @ Level 3");
- case 3 : return __T("MPEG-4 Visual Main Profile @ Level 4");
- default: return __T("MPEG-4 Visual Main Profile");
- }
- case 8 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual N-bit Profile @ Level 2");
- default: return __T("MPEG-4 Visual Main Profile");
- }
- case 9 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Advanced Real Time Simple Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Advanced Real Time Simple Profile @ Level 2");
- case 3 : return __T("MPEG-4 Visual Advanced Real Time Simple Profile @ Level 3");
- case 4 : return __T("MPEG-4 Visual Advanced Real Time Simple Profile @ Level 4");
- default: return __T("MPEG-4 Visual Advanced Real Time Simple Profile");
- }
- case 10 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Advanced Coding Efficiency Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Advanced Coding Efficiency Profile @ Level 2");
- case 3 : return __T("MPEG-4 Visual Advanced Coding Efficiency Profile @ Level 3");
- case 4 : return __T("MPEG-4 Visual Advanced Coding Efficiency Profile @ Level 4");
- default: return __T("MPEG-4 Visual Advanced Coding Efficiency Profile");
- }
- case 11 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Simple Studio Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Simple Studio Profile @ Level 2");
- case 3 : return __T("MPEG-4 Visual Simple Studio Profile @ Level 3");
- case 4 : return __T("MPEG-4 Visual Simple Studio Profile @ Level 4");
- default: return __T("MPEG-4 Visual Simple Studio Profile");
- }
- case 12 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Core Studio Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Core Studio Profile @ Level 2");
- case 3 : return __T("MPEG-4 Visual Core Studio Profile @ Level 3");
- case 4 : return __T("MPEG-4 Visual Core Studio Profile @ Level 4");
- default: return __T("MPEG-4 Visual Core Studio Profile");
- }
- case 13 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Fine Granularity Scalable Profile @ Level 0");
- case 2 : return __T("MPEG-4 Visual Fine Granularity Scalable Profile @ Level 1");
- case 3 : return __T("MPEG-4 Visual Fine Granularity Scalable Profile @ Level 2");
- case 4 : return __T("MPEG-4 Visual Fine Granularity Scalable Profile @ Level 3");
- case 5 : return __T("MPEG-4 Visual Fine Granularity Scalable Profile @ Level 4");
- case 6 : return __T("MPEG-4 Visual Fine Granularity Scalable Profile @ Level 5");
- default: return __T("MPEG-4 Visual Fine Granularity Scalable Profile");
- }
- case 14 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Simple Face Animation Profile @ Level 1");
- case 2 : return __T("MPEG-4 Simple Face Animation Profile @ Level 2");
- default: return __T("MPEG-4 Simple Face Animation Profile");
- }
- case 15 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Simple FBA Profile @ Level 1");
- case 2 : return __T("MPEG-4 Simple FBA Profile @ Level 2");
- default: return __T("MPEG-4 Simple FBA Profile");
- }
- case 16 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Basic Animated Texture Profile @ Level 1");
- case 2 : return __T("MPEG-4 Basic Animated Texture Profile @ Level 2");
- default: return __T("MPEG-4 Basic Animated Texture Profile");
- }
- case 17 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Advanced Scalable Texture Profile @ Level 1");
- default: return __T("MPEG-4 Advanced Scalable Texture Profile");
- }
- case 18 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Advanced Scalable Texture Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Advanced Scalable Texture Profile @ Level 2");
- case 3 : return __T("MPEG-4 Visual Advanced Scalable Texture Profile @ Level 3");
- default: return __T("MPEG-4 Visual Advanced Scalable Texture Profile");
- }
- case 19 : switch (termID%100)
- {
- case 1 : return __T("MPEG-4 Visual Hybrid Profile @ Level 1");
- case 2 : return __T("MPEG-4 Visual Hybrid Profile @ Level 2");
- default: return __T("MPEG-4 Visual Hybrid Profile");
- }
- default: return __T("MPEG-4 Visual");
- }
- case 4 : return __T("JPEG");
- case 5 : return __T("MJPEG");
- case 6 : return __T("JPEG2000");
- case 7 : return __T("H261");
- case 8 : return __T("H263");
- default: return MI.Get(Stream_Video, StreamPos, Video_Format);
- }
-}
-
-//---------------------------------------------------------------------------
-Ztring Mpeg7_Visual_colorDomain(MediaInfo_Internal &MI, size_t StreamPos)
-{
- const Ztring &Colorimetry=MI.Get(Stream_Video, StreamPos, Video_Colorimetry);
- if (Colorimetry.find(__T("4:"))!=string::npos)
- return __T(" colorDomain=\"color\"");
- if (Colorimetry==__T("Gray"))
- return __T(" colorDomain=\"graylevel\"");
- return __T("");
-}
-
-//---------------------------------------------------------------------------
-int32u Mpeg7_SystemCS_termID(MediaInfo_Internal &MI, size_t StreamPos)
-{
- if (MI.Get(Stream_Video, StreamPos, Video_Standard)==__T("PAL"))
- return 10000;
- if (MI.Get(Stream_Video, StreamPos, Video_Standard)==__T("SECAM"))
- return 20000;
- if (MI.Get(Stream_Video, StreamPos, Video_Standard)==__T("NTSC"))
- return 30000;
- return 0;
-}
-
-Ztring Mpeg7_SystemCS_Name(int32u termID) //xxyyzz: xx=main number, yy=sub-number, zz=sub-sub-number
-{
- switch (termID/10000)
- {
- case 1 : return __T("PAL");
- case 2 : return __T("SECAM");
- case 3 : return __T("NTSC");
- default : return Ztring();
- }
-}
-
-//---------------------------------------------------------------------------
-int32u Mpeg7_AudioCodingFormatCS_termID(MediaInfo_Internal &MI, size_t StreamPos)
-{
- const Ztring &Format=MI.Get(Stream_Audio, StreamPos, Audio_Format);
- const Ztring &Version=MI.Get(Stream_Audio, StreamPos, Audio_Format_Version);
- const Ztring &Profile=MI.Get(Stream_Audio, StreamPos, Audio_Format_Profile);
-
- if (Format==__T("AC-3"))
- return 10000;
- if (Format==__T("DTS"))
- return 20000;
- if (Format==__T("MPEG Audio"))
- {
- if (Version.find(__T("1"))!=string::npos)
- {
- if (Profile.find(__T("1"))!=string::npos)
- return 30100;
- if (Profile.find(__T("2"))!=string::npos)
- return 30200;
- if (Profile.find(__T("3"))!=string::npos)
- return 30300;
- return 30000;
- }
- if (Version.find(__T("2"))!=string::npos)
- {
- if (Profile.find(__T("1"))!=string::npos)
- return 40100;
- if (Profile.find(__T("2"))!=string::npos)
- return 40200;
- if (Profile.find(__T("3"))!=string::npos)
- return 40300;
- return 40000;
- }
- return 0;
- }
- if (Format==__T("PCM"))
- return 80000;
-
- return 0;
-}
-
-Ztring Mpeg7_AudioCodingFormatCS_Name(int32u termID, MediaInfo_Internal &MI, size_t StreamPos) //xxyyzz: xx=main number, yy=sub-number, zz=sub-sub-number
-{
- switch (termID/10000)
- {
- case 1 : return __T("AC3");
- case 2 : return __T("DTS");
- case 3 : switch ((termID%10000)/100)
- {
- case 1 : return __T("MPEG-1 Audio Layer I");
- case 2 : return __T("MPEG-1 Audio Layer II");
- case 3 : return __T("MPEG-1 Audio Layer III");
- default: return __T("MPEG-1 Audio");
- }
- case 4 : switch ((termID%10000)/100)
- {
- case 1 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Audio Low Sampling Rate Layer I");
- case 2 : return __T("MPEG-2 Audio Low Sampling Rate Layer II");
- case 3 : return __T("MPEG-2 Audio Low Sampling Rate Layer III");
- default: return __T("MPEG-2 Audio Low Sampling Rate");
- }
- case 2 : switch (termID%100)
- {
- case 1 : return __T("MPEG-2 Backward Compatible Multi-Channel Layer I");
- case 2 : return __T("MPEG-2 Backward Compatible Multi-Channel Layer II");
- case 3 : return __T("MPEG-2 Backward Compatible Multi-Channel Layer III");
- default: return __T("MPEG-2 Backward Compatible Multi-Channel");
- }
- default: return __T("MPEG-2 Audio");
- }
- case 8 : return __T("Linear PCM");
- default: return MI.Get(Stream_Audio, StreamPos, Video_Format);
- }
-}
-
-//---------------------------------------------------------------------------
-int32u Mpeg7_AudioPresentationCS_termID(MediaInfo_Internal &MI, size_t StreamPos)
-{
- const Ztring &Channels=MI.Get(Stream_Audio, StreamPos, Audio_Channel_s_);
- const Ztring &ChannelPositions2=MI.Get(Stream_Audio, StreamPos, Audio_ChannelPositions_String2);
- if (Channels==__T("6") && ChannelPositions2==__T("3/2.1"))
- return 50000;
- if (Channels==__T("8") && ChannelPositions2==__T("3/2/2.1"))
- return 60000;
- if (Channels==__T("2"))
- return 30000;
- if (Channels==__T("1"))
- return 20000;
- return 0;
-}
-
-Ztring Mpeg7_AudioPresentationCS_Name(int32u termID, MediaInfo_Internal &, size_t)
-{
- switch (termID/10000)
- {
- case 2 : return __T("mono");
- case 3 : return __T("stereo");
- case 5 : return __T("Home theater 5.1");
- case 6 : return __T("Movie theater");
- default: return Ztring();
- }
-}
-
-//---------------------------------------------------------------------------
-Ztring Mpeg7_AudioEmphasis(MediaInfo_Internal &MI, size_t StreamPos)
-{
- const Ztring &Emphasis=MI.Get(Stream_Audio, StreamPos, Audio_Format_Settings_Emphasis);
- if (Emphasis==__T("50/15ms"))
- return __T("50over15Microseconds");
- if (Emphasis==__T("CCITT"))
- return __T("ccittJ17");
- if (Emphasis==__T("Reserved"))
- return __T("reserved");
- return __T("none");
-}
-
-//---------------------------------------------------------------------------
-Ztring Mpeg7_MediaTimePoint(MediaInfo_Internal &MI)
-{
- if (MI.Count_Get(Stream_Video)==1 && MI.Get(Stream_General, 0, General_Format)==__T("MPEG-PS"))
- {
- int64u Delay=(int64u)(MI.Get(Stream_Video, 0, Video_Delay).To_float64()*90);
- int64u Rate=90000;
- int64u DD=Delay/(24*60*60*Rate);
- Delay=Delay%(24*60*60*Rate);
- int64u HH=Delay/(60*60*Rate);
- Delay=Delay%(60*60*Rate);
- int64u MM=Delay/(60*Rate);
- Delay=Delay%(60*Rate);
- int64u Sec=Delay/Rate;
- Delay=Delay%Rate;
- Ztring ToReturn;
- if (DD)
- ToReturn+=Ztring::ToZtring(DD);
- ToReturn+=__T('T');
- ToReturn+=(HH<10?__T("0"):__T(""))+Ztring::ToZtring(HH)+__T(':');
- ToReturn+=(MM<10?__T("0"):__T(""))+Ztring::ToZtring(MM)+__T(':');
- ToReturn+=(Sec<10?__T("0"):__T(""))+Ztring::ToZtring(Sec)+__T(':');
- ToReturn+=Ztring::ToZtring(Delay)+__T('F');
- ToReturn+=Ztring::ToZtring(Rate);
- return ToReturn;
- }
-
- //Default: In milliseconds
- int64u Milliseconds=MI.Get(Stream_Video, 0, Video_Delay).To_int64u();
- int64u DD=Milliseconds/(24*60*60*1000);
- Milliseconds=Milliseconds%(24*60*60*1000);
- int64u HH=Milliseconds/(60*60*1000);
- Milliseconds=Milliseconds%(60*60*1000);
- int64u MM=Milliseconds/(60*1000);
- Milliseconds=Milliseconds%(60*1000);
- int64u Sec=Milliseconds/1000;
- int64u NN=Milliseconds%1000;
- int64u FF=1000;
- Ztring ToReturn;
- if (DD)
- ToReturn+=Ztring::ToZtring(DD);
- ToReturn+=__T('T');
- ToReturn+=(HH<10?__T("0"):__T(""))+Ztring::ToZtring(HH)+__T(':');
- ToReturn+=(MM<10?__T("0"):__T(""))+Ztring::ToZtring(MM)+__T(':');
- ToReturn+=(Sec<10?__T("0"):__T(""))+Ztring::ToZtring(Sec)+__T(':');
- ToReturn+=Ztring::ToZtring(NN)+__T('F');
- ToReturn+=Ztring::ToZtring(FF);
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-Ztring Mpeg7_MediaDuration(MediaInfo_Internal &MI)
-{
- if (MI.Count_Get(Stream_Video)==1)
- {
- int64u FrameCount=MI.Get(Stream_Video, 0, Video_FrameCount).To_int64u();
- int64u FrameRate=MI.Get(Stream_Video, 0, Video_FrameRate).To_int64u();
- if (FrameRate==0)
- return Ztring();
- int64u DD=FrameCount/(24*60*60*FrameRate);
- FrameCount=FrameCount%(24*60*60*FrameRate);
- int64u HH=FrameCount/(60*60*FrameRate);
- FrameCount=FrameCount%(60*60*FrameRate);
- int64u MM=FrameCount/(60*FrameRate);
- FrameCount=FrameCount%(60*FrameRate);
- int64u Sec=FrameCount/FrameRate;
- FrameCount=FrameCount%FrameRate;
- Ztring ToReturn;
- ToReturn+=__T('P');
- if (DD)
- ToReturn+=Ztring::ToZtring(DD)+__T('D');
- ToReturn+=__T('T');
- ToReturn+=Ztring::ToZtring(HH)+__T('H');
- ToReturn+=Ztring::ToZtring(MM)+__T('M');
- ToReturn+=Ztring::ToZtring(Sec)+__T('S');
- ToReturn+=Ztring::ToZtring(FrameCount)+__T('N');
- ToReturn+=Ztring::ToZtring(FrameRate)+__T('F');
- return ToReturn;
- }
-
- if (MI.Count_Get(Stream_Audio)==1)
- {
- int64u SamplingCount=MI.Get(Stream_Audio, 0, Audio_SamplingCount).To_int64u();
- int64u SamplingRate=MI.Get(Stream_Audio, 0, Audio_SamplingRate).To_int64u();
- if (SamplingRate==0)
- return Ztring();
- int64u DD=SamplingCount/(24*60*60*SamplingRate);
- SamplingCount=SamplingCount%(24*60*60*SamplingRate);
- int64u HH=SamplingCount/(60*60*SamplingRate);
- SamplingCount=SamplingCount%(60*60*SamplingRate);
- int64u MM=SamplingCount/(60*SamplingRate);
- SamplingCount=SamplingCount%(60*SamplingRate);
- int64u Sec=SamplingCount/SamplingRate;
- SamplingCount=SamplingCount%SamplingRate;
- Ztring ToReturn;
- ToReturn+=__T('P');
- if (DD)
- ToReturn+=Ztring::ToZtring(DD)+__T('D');
- ToReturn+=__T('T');
- ToReturn+=Ztring::ToZtring(HH)+__T('H');
- ToReturn+=Ztring::ToZtring(MM)+__T('M');
- ToReturn+=Ztring::ToZtring(Sec)+__T('S');
- ToReturn+=Ztring::ToZtring(SamplingCount)+__T('N');
- ToReturn+=Ztring::ToZtring(SamplingRate)+__T('F');
- return ToReturn;
- }
-
- //Default: In milliseconds
- int64u Milliseconds=MI.Get(Stream_General, 0, General_Duration).To_int64u();
- int64u DD=Milliseconds/(24*60*60*1000);
- Milliseconds=Milliseconds%(24*60*60*1000);
- int64u HH=Milliseconds/(60*60*1000);
- Milliseconds=Milliseconds%(60*60*1000);
- int64u MM=Milliseconds/(60*1000);
- Milliseconds=Milliseconds%(60*1000);
- int64u Sec=Milliseconds/1000;
- int64u NN=Milliseconds%1000;
- int64u FF=1000;
- Ztring ToReturn;
- ToReturn+=__T('P');
- if (DD)
- ToReturn+=Ztring::ToZtring(DD)+__T('D');
- ToReturn+=__T('T');
- ToReturn+=Ztring::ToZtring(HH)+__T('H');
- ToReturn+=Ztring::ToZtring(MM)+__T('M');
- ToReturn+=Ztring::ToZtring(Sec)+__T('S');
- ToReturn+=Ztring::ToZtring(NN)+__T('N');
- ToReturn+=Ztring::ToZtring(FF)+__T('F');
- return ToReturn;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Export_Mpeg7::Export_Mpeg7 ()
-{
-}
-
-//---------------------------------------------------------------------------
-Export_Mpeg7::~Export_Mpeg7 ()
-{
-}
-
-//***************************************************************************
-// Input
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Ztring Mpeg7_Transform_Visual(Ztring &ToReturn, MediaInfo_Internal &MI, size_t StreamPos)
-{
- ToReturn+=__T("\t\t\t\t\t\t\t<mpeg7:VisualCoding>\n");
-
- //Format
- ToReturn+=__T("\t\t\t\t\t\t\t\t<mpeg7:Format");
- int32u VisualCodingFormatCS_termID=Mpeg7_VisualCodingFormatCS_termID(MI, StreamPos);
- if (VisualCodingFormatCS_termID)
- {
- ToReturn+=__T(" href=\"urn:mpeg:mpeg7:cs:VisualCodingFormatCS:2001:");
- ToReturn+=Ztring::ToZtring(VisualCodingFormatCS_termID/10000);
- ToReturn+=__T("\"");
- }
- ToReturn+=Mpeg7_Visual_colorDomain(MI, StreamPos); //Algo puts empty string if not known
- ToReturn+=__T(">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t<mpeg7:Name xml:lang=\"en\">"); ToReturn+=Mpeg7_VisualCodingFormatCS_Name((VisualCodingFormatCS_termID/10000)*10000, MI, StreamPos); ToReturn+=__T("</mpeg7:Name>\n");
- if (VisualCodingFormatCS_termID%10000)
- {
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t<mpeg7:Term termID=\"");
- ToReturn+=Ztring::ToZtring(VisualCodingFormatCS_termID/10000);
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring((VisualCodingFormatCS_termID%10000)/100);
- ToReturn+=__T("\">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t<mpeg7:Name xml:lang=\"en\">"); ToReturn+=Mpeg7_VisualCodingFormatCS_Name((VisualCodingFormatCS_termID/100)*100, MI, StreamPos); ToReturn+=__T("</mpeg7:Name>\n");
- if (VisualCodingFormatCS_termID%100)
- {
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t<mpeg7:Term termID=\"");
- ToReturn+=Ztring::ToZtring(VisualCodingFormatCS_termID/10000);
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring((VisualCodingFormatCS_termID%10000)/100);
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring(VisualCodingFormatCS_termID%100);
- ToReturn+=__T("\">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Name xml:lang=\"en\">"); ToReturn+=Mpeg7_VisualCodingFormatCS_Name(VisualCodingFormatCS_termID, MI, StreamPos); ToReturn+=__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t</mpeg7:Term>\n");
- }
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t</mpeg7:Term>\n");
- }
- ToReturn+=__T("\t\t\t\t\t\t\t\t</mpeg7:Format>\n");
-
- //Pixel
- if (!MI.Get(Stream_Video, 0, Video_PixelAspectRatio).empty()
- || !MI.Get(Stream_Video, 0, Video_Resolution).empty())
- {
- ToReturn+=__T("\t\t\t\t\t\t\t\t<mpeg7:Pixel");
- if (!MI.Get(Stream_Video, 0, Video_PixelAspectRatio).empty())
- {
- ToReturn+=__T(" aspectRatio=\"");
- ToReturn+=MI.Get(Stream_Video, 0, Video_PixelAspectRatio);
- ToReturn+=__T("\"");
- }
- if (!MI.Get(Stream_Video, 0, Video_Resolution).empty())
- {
- ToReturn+=__T(" bitsPer=\"");
- ToReturn+=MI.Get(Stream_Video, 0, Video_Resolution);
- ToReturn+=__T("\"");
- }
- ToReturn+=__T("/>\n");
- }
-
- //Frame
- ToReturn+=__T("\t\t\t\t\t\t\t\t<mpeg7:Frame aspectRatio=\"")+MI.Get(Stream_Video, 0, Video_DisplayAspectRatio); ToReturn+=__T("\" height=\""); ToReturn+=MI.Get(Stream_Video, 0, Video_Height); ToReturn+=__T("\" width=\""); ToReturn+=MI.Get(Stream_Video, 0, Video_Width); ToReturn+=__T("\" rate=\""); ToReturn+=MI.Get(Stream_Video, 0, Video_FrameRate); ToReturn+=__T("\" structure=\""); ToReturn+=MI.Get(Stream_Video, 0, Video_ScanType).MakeLowerCase(); ToReturn+=__T("\"/>\n");
-
- //Colorimetry
- if (MI.Get(Stream_Video, StreamPos, Video_Colorimetry).find(__T("4:2:0"))!=string::npos)
- {
- ToReturn+=__T("\t\t\t\t\t\t\t\t<mpeg7:ColorSampling> <!-- YUV 4:2:0 Interlaced -->\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t<mpeg7:Lattice height=\"720\" width=\"486\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t<mpeg7:Field temporalOrder=\"0\" positionalOrder=\"0\">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t<mpeg7:Component>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Name>Luminance</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Offset horizontal=\"0.0\" vertical=\"0.0\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Period horizontal=\"1.0\" vertical=\"2.0\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t</mpeg7:Component>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t<mpeg7:Component>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Name>ChrominanceBlueDifference</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Offset horizontal=\"0.0\" vertical=\"0.5\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Period horizontal=\"2.0\" vertical=\"4.0\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t</mpeg7:Component>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t<mpeg7:Component>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Name>ChrominanceRedDifference</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Offset horizontal=\"0.0\" vertical=\"0.5\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Period horizontal=\"2.0\" vertical=\"4.0\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t</mpeg7:Component>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t</mpeg7:Field>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t<mpeg7:Field temporalOrder=\"1\" positionalOrder=\"1\">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t<mpeg7:Component>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Name>Luminance</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Offset horizontal=\"0.0\" vertical=\"1.0\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Period horizontal=\"1.0\" vertical=\"2.0\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t</mpeg7:Component>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t<mpeg7:Component>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Name>ChrominanceBlueDifference</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Offset horizontal=\"0.0\" vertical=\"2.5\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Period horizontal=\"2.0\" vertical=\"4.0\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t</mpeg7:Component>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t<mpeg7:Component>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Name>ChrominanceRedDifference</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Offset horizontal=\"0.0\" vertical=\"2.5\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Period horizontal=\"4.0\" vertical=\"2.0\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t</mpeg7:Component>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t</mpeg7:Field>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t</mpeg7:ColorSampling>\n");
- }
-
- ToReturn+=__T("\t\t\t\t\t\t\t</mpeg7:VisualCoding>\n");
-
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-Ztring Mpeg7_Transform_Audio(Ztring &ToReturn, MediaInfo_Internal &MI, size_t StreamPos)
-{
- ToReturn+=__T("\t\t\t\t\t\t\t<mpeg7:AudioCoding>\n");
-
- //Format
- ToReturn+=__T("\t\t\t\t\t\t\t\t<mpeg7:Format");
- int32u AudioCodingFormatCS_termID=Mpeg7_AudioCodingFormatCS_termID(MI, StreamPos);
- if (AudioCodingFormatCS_termID)
- {
- ToReturn+=__T(" href=\"urn:mpeg:mpeg7:cs:AudioCodingFormatCS:2001:");
- ToReturn+=Ztring::ToZtring(AudioCodingFormatCS_termID/10000);
- ToReturn+=__T("\"");
- }
- ToReturn+=__T(">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t<mpeg7:Name xml:lang=\"en\">"); ToReturn+=Mpeg7_AudioCodingFormatCS_Name((AudioCodingFormatCS_termID/10000)*10000, MI, StreamPos); ToReturn+=__T("</mpeg7:Name>\n");
- if (AudioCodingFormatCS_termID%10000)
- {
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t<mpeg7:Term termID=\"");
- ToReturn+=Ztring::ToZtring(AudioCodingFormatCS_termID/10000);
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring((AudioCodingFormatCS_termID%10000)/100);
- ToReturn+=__T("\">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t<mpeg7:Name xml:lang=\"en\">"); ToReturn+=Mpeg7_AudioCodingFormatCS_Name((AudioCodingFormatCS_termID/100)*100, MI, StreamPos); ToReturn+=__T("</mpeg7:Name>\n");
- if (AudioCodingFormatCS_termID%100)
- {
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t<mpeg7:Term termID=\"");
- ToReturn+=Ztring::ToZtring(AudioCodingFormatCS_termID/10000);
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring((AudioCodingFormatCS_termID%10000)/100);
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring(AudioCodingFormatCS_termID%100);
- ToReturn+=__T("\">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Name xml:lang=\"en\">"); ToReturn+=Mpeg7_AudioCodingFormatCS_Name(AudioCodingFormatCS_termID, MI, StreamPos); ToReturn+=__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t</mpeg7:Term>\n");
- }
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t</mpeg7:Term>\n");
- }
- ToReturn+=__T("\t\t\t\t\t\t\t\t</mpeg7:Format>\n");
-
- //AudioChannels
- ToReturn+=__T("\t\t\t\t\t\t\t\t<mpeg7:AudioChannels>"); ToReturn+=MI.Get(Stream_Audio, StreamPos, Audio_Channel_s_); ToReturn+=__T("</mpeg7:AudioChannels>\n");
-
- //Sample
- ToReturn+=__T("\t\t\t\t\t\t\t\t<mpeg7:Sample rate=\""); ToReturn+=MI.Get(Stream_Audio, StreamPos, Audio_SamplingRate); ToReturn+=__T("\""); if (!MI.Get(Stream_Audio, StreamPos, Audio_BitDepth).empty()) {ToReturn+=__T(" bitsPer=\""); ToReturn+=MI.Get(Stream_Audio, StreamPos, Audio_BitDepth); ToReturn+=__T("\"");} ToReturn+=__T("/>\n");
-
- //Emphasis
- if (MI.Get(Stream_Audio, StreamPos, Audio_Format)==__T("MPEG Audio"))
- ToReturn+=__T("\t\t\t\t\t\t\t\t<mpeg7:Emphasis>")+Mpeg7_AudioEmphasis(MI, StreamPos)+__T("</mpeg7:Emphasis>\n");
-
- //Presentation
- int32u AudioPresentationCS_termID=Mpeg7_AudioPresentationCS_termID(MI, StreamPos);
- if (AudioPresentationCS_termID)
- {
- ToReturn+=__T("\t\t\t\t\t\t\t\t<mpeg7:Presentation href=\"urn:mpeg:mpeg7:cs:AudioPresentationCS:2001:");
- ToReturn+=Ztring::ToZtring(AudioPresentationCS_termID/10000);
- if (AudioPresentationCS_termID%10000)
- {
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring((AudioPresentationCS_termID%10000)/100);
- if (AudioPresentationCS_termID%100)
- {
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring(AudioPresentationCS_termID%100);
- }
- }
- ToReturn+=__T("\">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t<mpeg7:Name>")+Mpeg7_AudioPresentationCS_Name(AudioPresentationCS_termID, MI, StreamPos)+__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t</mpeg7:Presentation>\n");
- }
-
- ToReturn+=__T("\t\t\t\t\t\t\t</mpeg7:AudioCoding>\n");
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-Ztring Export_Mpeg7::Transform(MediaInfo_Internal &MI)
-{
- //Current date/time is ISO format
- time_t Time=time(NULL);
- Ztring TimeS; TimeS.Date_From_Seconds_1970((int32u)Time);
- TimeS.FindAndReplace(__T("UTC "), __T(""));
- TimeS.FindAndReplace(__T(" "), __T("T"));
- TimeS+=__T("+00:00");
-
- Ztring ToReturn;
-
- //Mpeg7
- ToReturn+=__T("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
- ToReturn+=__T("<!-- Generated at ")+TimeS+__T(" by ")+MediaInfoLib::Config.Info_Version_Get()+__T(" -->\n");
- ToReturn+=__T("<mpeg7:Mpeg7 xmlns=\"urn:mpeg:mpeg7:schema:2004\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:mpeg7=\"urn:mpeg:mpeg7:schema:2004\" xsi:schemaLocation=\"urn:mpeg:mpeg7:schema:2004 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-7_schema_files/mpeg7-v2.xsd\">\n");
-
- //Description - DescriptionMetadata
- {
- ToReturn+=__T("\t<mpeg7:DescriptionMetadata>\n");
- Ztring FileName=MI.Get(Stream_General, 0, General_FileName);
- Ztring Extension=MI.Get(Stream_General, 0, General_FileExtension);
- if (!Extension.empty())
- FileName+=__T('.')+Extension;
- if (!FileName.empty())
- ToReturn+=__T("\t\t<mpeg7:PrivateIdentifier>")+FileName+__T("</mpeg7:PrivateIdentifier>\n");
- ToReturn+=__T("\t\t<mpeg7:CreationTime>")+TimeS+__T("</mpeg7:CreationTime>\n");
- ToReturn+=__T("\t\t<mpeg7:Instrument>\n");
- ToReturn+=__T("\t\t\t<mpeg7:Tool>\n");
- ToReturn+=__T("\t\t\t\t<mpeg7:Name>")+MediaInfoLib::Config.Info_Version_Get()+__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t</mpeg7:Tool>\n");
- ToReturn+=__T("\t\t</mpeg7:Instrument>\n");
- ToReturn+=__T("\t</mpeg7:DescriptionMetadata>\n");
- }
-
- //Description - CreationDescription
- if (!MI.Get(Stream_General, 0, General_Movie).empty()
- || !MI.Get(Stream_General, 0, General_Track).empty()
- || !MI.Get(Stream_General, 0, General_Album).empty()
- || !MI.Get(Stream_General, 0, General_Encoded_Library).empty()
- || !MI.Get(Stream_General, 0, General_Performer).empty())
- {
- ToReturn+=__T("\t<mpeg7:Description xsi:type=\"CreationDescriptionType\">\n");
- ToReturn+=__T("\t\t<mpeg7:CreationInformation>\n");
- ToReturn+=__T("\t\t\t<mpeg7:Creation>\n");
- if (!MI.Get(Stream_General, 0, General_Movie).empty())
- ToReturn+=__T("\t\t\t\t<mpeg7:Title type=\"songTitle\">")+MI.Get(Stream_General, 0, General_Movie)+__T("</mpeg7:Title>\n");
- if (!MI.Get(Stream_General, 0, General_Track).empty())
- ToReturn+=__T("\t\t\t\t<mpeg7:Title type=\"songTitle\">")+MI.Get(Stream_General, 0, General_Title)+__T("</mpeg7:Title>\n");
- if (!MI.Get(Stream_General, 0, General_Album).empty())
- ToReturn+=__T("\t\t\t\t<mpeg7:Title type=\"albumTitle\">")+MI.Get(Stream_General, 0, General_Album)+__T("</mpeg7:Title>\n");
- if (!MI.Get(Stream_General, 0, General_WrittenBy).empty())
- {
- ToReturn+=__T("\t\t\t\t<mpeg7:Creator>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Role href=\"urn:mpeg:mpeg7:cs:RoleCS:2001:AUTHOR\"/>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Agent xsi:type=\"PersonGroupType\">\n");
- ToReturn+=__T("\t\t\t\t\t\t<mpeg7:Name>")+MI.Get(Stream_General, 0, General_WrittenBy)+__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t</mpeg7:Agent>\n");
- ToReturn+=__T("\t\t\t\t</mpeg7:Creator>\n");
- }
- if (!MI.Get(Stream_General, 0, General_Performer).empty())
- {
- ToReturn+=__T("\t\t\t\t<mpeg7:Creator>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Role href=\"urn:mpeg:mpeg7:cs:RoleCS:2001:PERFORMER\"/>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Agent xsi:type=\"PersonGroupType\">\n");
- ToReturn+=__T("\t\t\t\t\t\t<mpeg7:Name>")+MI.Get(Stream_General, 0, General_Performer)+__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t</mpeg7:Agent>\n");
- ToReturn+=__T("\t\t\t\t</mpeg7:Creator>\n");
- }
- if (!MI.Get(Stream_General, 0, General_ExecutiveProducer).empty())
- {
- ToReturn+=__T("\t\t\t\t<mpeg7:Creator>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Role href=\"urn:mpeg:mpeg7:cs:RoleCS:2001:EXECUTIVE-PRODUCER\"/>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Agent xsi:type=\"PersonGroupType\">\n");
- ToReturn+=__T("\t\t\t\t\t\t<mpeg7:Name>")+MI.Get(Stream_General, 0, General_ExecutiveProducer)+__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t</mpeg7:Agent>\n");
- ToReturn+=__T("\t\t\t\t</mpeg7:Creator>\n");
- }
- if (!MI.Get(Stream_General, 0, General_Producer).empty())
- {
- ToReturn+=__T("\t\t\t\t<mpeg7:Creator>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Role href=\"urn:mpeg:mpeg7:cs:RoleCS:2001:PRODUCER\"/>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Agent xsi:type=\"PersonGroupType\">\n");
- ToReturn+=__T("\t\t\t\t\t\t<mpeg7:Name>")+MI.Get(Stream_General, 0, General_Producer)+__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t</mpeg7:Agent>\n");
- ToReturn+=__T("\t\t\t\t</mpeg7:Creator>\n");
- }
- if (!MI.Get(Stream_General, 0, General_Director).empty())
- {
- ToReturn+=__T("\t\t\t\t<mpeg7:Creator>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Role href=\"urn:mpeg:mpeg7:cs:RoleCS:2001:PRODUCER\"/>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Agent xsi:type=\"PersonGroupType\">\n");
- ToReturn+=__T("\t\t\t\t\t\t<mpeg7:Name>")+MI.Get(Stream_General, 0, General_Director)+__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t</mpeg7:Agent>\n");
- ToReturn+=__T("\t\t\t\t</mpeg7:Creator>\n");
- }
- if (!MI.Get(Stream_General, 0, General_Composer).empty())
- {
- ToReturn+=__T("\t\t\t\t<mpeg7:Creator>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Role href=\"urn:mpeg:mpeg7:cs:RoleCS:2001:COMPOSER\"/>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Agent xsi:type=\"PersonGroupType\">\n");
- ToReturn+=__T("\t\t\t\t\t\t<mpeg7:Name>")+MI.Get(Stream_General, 0, General_Composer)+__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t</mpeg7:Agent>\n");
- ToReturn+=__T("\t\t\t\t</mpeg7:Creator>\n");
- }
- if (!MI.Get(Stream_General, 0, General_CostumeDesigner).empty())
- {
- ToReturn+=__T("\t\t\t\t<mpeg7:Creator>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Role href=\"urn:mpeg:mpeg7:cs:RoleCS:2001:COSTUME-SUPERVISOR\"/>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Agent xsi:type=\"PersonGroupType\">\n");
- ToReturn+=__T("\t\t\t\t\t\t<mpeg7:Name>")+MI.Get(Stream_General, 0, General_CostumeDesigner)+__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t</mpeg7:Agent>\n");
- ToReturn+=__T("\t\t\t\t</mpeg7:Creator>\n");
- }
- if (!MI.Get(Stream_General, 0, General_ProductionDesigner).empty())
- {
- ToReturn+=__T("\t\t\t\t<mpeg7:Creator>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Role href=\"urn:mpeg:mpeg7:cs:RoleCS:2001:PRODUCTION-DESIGNER\"/>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Agent xsi:type=\"PersonGroupType\">\n");
- ToReturn+=__T("\t\t\t\t\t\t<mpeg7:Name>")+MI.Get(Stream_General, 0, General_ProductionDesigner)+__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t</mpeg7:Agent>\n");
- ToReturn+=__T("\t\t\t\t</mpeg7:Creator>\n");
- }
- if (!MI.Get(Stream_General, 0, General_Publisher).empty())
- {
- ToReturn+=__T("\t\t\t\t<mpeg7:Creator>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Role href=\"urn:mpeg:mpeg7:cs:RoleCS:2001:PUBLISHER\"/>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Agent xsi:type=\"PersonGroupType\">\n");
- ToReturn+=__T("\t\t\t\t\t\t<mpeg7:Name>")+MI.Get(Stream_General, 0, General_Publisher)+__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t</mpeg7:Agent>\n");
- ToReturn+=__T("\t\t\t\t</mpeg7:Creator>\n");
- }
- if (!MI.Get(Stream_General, 0, General_DistributedBy).empty())
- {
- ToReturn+=__T("\t\t\t\t<mpeg7:Creator>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Role href=\"urn:mpeg:mpeg7:cs:RoleCS:2001:DISTRIBUTOR\"/>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Agent xsi:type=\"PersonGroupType\">\n");
- ToReturn+=__T("\t\t\t\t\t\t<mpeg7:Name>")+MI.Get(Stream_General, 0, General_DistributedBy)+__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t</mpeg7:Agent>\n");
- ToReturn+=__T("\t\t\t\t</mpeg7:Creator>\n");
- }
- if (!MI.Get(Stream_General, 0, General_Encoded_Library).empty())
- {
- ToReturn+=__T("\t\t\t\t<mpeg7:CreationTool>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:Tool>\n");
- ToReturn+=__T("\t\t\t\t\t\t<mpeg7:Name>")+MI.Get(Stream_General, 0, General_Encoded_Library)+__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t</mpeg7:Tool>\n");
- ToReturn+=__T("\t\t\t\t</mpeg7:CreationTool>\n");
- }
- ToReturn+=__T("\t\t\t</mpeg7:Creation>\n");
- ToReturn+=__T("\t\t</mpeg7:CreationInformation>\n");
- ToReturn+=__T("\t</mpeg7:Description>\n");
- }
-
- //Description - ContentEntity
- ToReturn+=__T("\t<mpeg7:Description xsi:type=\"ContentEntityType\">\n");
-
- //MultimediaContent
- ToReturn+=__T("\t\t<mpeg7:MultimediaContent xsi:type=\""); ToReturn+=Mpeg7_Type(MI); ToReturn+=__T("Type\">\n");
-
- //(Type)
- ToReturn+=__T("\t\t\t<mpeg7:"); ToReturn+=Mpeg7_Type(MI); ToReturn+=__T(">\n");
-
- //MediaFormat header
- ToReturn+=__T("\t\t\t\t<mpeg7:MediaInformation>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:MediaProfile>\n");
- ToReturn+=__T("\t\t\t\t\t\t<mpeg7:MediaFormat>\n");
-
- //Content
- ToReturn+=__T("\t\t\t\t\t\t\t<mpeg7:Content");
- int32u ContentCS_termID=Mpeg7_ContentCS_termID(MI);
- if (ContentCS_termID>=500000) //Out of spec
- ToReturn+=__T(" href=\"urn:x-mpeg7-mediainfo:cs:ContentCS:2009:");
- else
- ToReturn+=__T(" href=\"urn:mpeg:mpeg7:cs:ContentCS:2001:");
- ToReturn+=Ztring::ToZtring(ContentCS_termID/10000);
- if (ContentCS_termID%10000)
- {
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring((ContentCS_termID%10000)/100);
- if (ContentCS_termID%100)
- {
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring(ContentCS_termID%100);
- }
- }
- ToReturn+=__T("\"");
- ToReturn+=__T(">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t<mpeg7:Name xml:lang=\"en\">"); ToReturn+=Mpeg7_ContentCS_Name(ContentCS_termID, MI); ToReturn+=__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t</mpeg7:Content>\n");
-
- //FileFormat
- if (!MI.Get(Stream_General, 0, General_Format).empty())
- {
- ToReturn+=__T("\t\t\t\t\t\t\t<mpeg7:FileFormat");
- int32u FileFormatCS_termID=Mpeg7_FileFormatCS_termID(MI);
- if (FileFormatCS_termID)
- {
- if (FileFormatCS_termID>=500000) //Out of spec
- ToReturn+=__T(" href=\"urn:x-mpeg7-mediainfo:cs:FileFormatCS:2009:");
- else
- ToReturn+=__T(" href=\"urn:mpeg:mpeg7:cs:FileFormatCS:2001:");
- ToReturn+=Ztring::ToZtring(FileFormatCS_termID/10000);
- ToReturn+=__T("\"");
- }
- ToReturn+=__T(">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t<mpeg7:Name xml:lang=\"en\">"); ToReturn+=Mpeg7_FileFormatCS_Name((FileFormatCS_termID/10000)*10000, MI); ToReturn+=__T("</mpeg7:Name>\n");
- if (FileFormatCS_termID%10000)
- {
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t<mpeg7:Term termID=\"");
- ToReturn+=Ztring::ToZtring(FileFormatCS_termID/10000);
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring((FileFormatCS_termID%10000)/100);
- ToReturn+=__T("\">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t<mpeg7:Name xml:lang=\"en\">"); ToReturn+=Mpeg7_FileFormatCS_Name((FileFormatCS_termID/100)*100, MI); ToReturn+=__T("</mpeg7:Name>\n");
- if (FileFormatCS_termID%100)
- {
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t<mpeg7:Term termID=\"");
- ToReturn+=Ztring::ToZtring(FileFormatCS_termID/10000);
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring((FileFormatCS_termID%10000)/100);
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring(FileFormatCS_termID%100);
- ToReturn+=__T("\">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t\t<mpeg7:Name xml:lang=\"en\">"); ToReturn+=Mpeg7_FileFormatCS_Name(FileFormatCS_termID, MI); ToReturn+=__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t\t</mpeg7:Term>\n");
- }
- ToReturn+=__T("\t\t\t\t\t\t\t\t\t</mpeg7:Term>\n");
- }
- ToReturn+=__T("\t\t\t\t\t\t\t</mpeg7:FileFormat>\n");
- }
-
- //FileSize
- ToReturn+=__T("\t\t\t\t\t\t\t<mpeg7:FileSize>"); ToReturn+=MI.Get(Stream_General, 0, General_FileSize); ToReturn+=__T("</mpeg7:FileSize>\n");
-
- //System
- if (!MI.Get(Stream_Video, 0, Video_Standard).empty())
- {
- ToReturn+=__T("\t\t\t\t\t\t\t<mpeg7:System");
- int32u SystemCS_termID=Mpeg7_SystemCS_termID(MI, 0); //2 video streams are not supported
- if (SystemCS_termID)
- {
- ToReturn+=__T(" href=\"urn:mpeg:mpeg7:cs:SystemCS:2001:");
- ToReturn+=Ztring::ToZtring(SystemCS_termID/10000);
- if (SystemCS_termID%10000)
- {
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring((SystemCS_termID%10000)/100);
- if (SystemCS_termID%100)
- {
- ToReturn+=__T(".");
- ToReturn+=Ztring::ToZtring(SystemCS_termID%100);
- }
- }
- ToReturn+=__T("\"");
- }
- ToReturn+=__T(">\n");
- ToReturn+=__T("\t\t\t\t\t\t\t\t<mpeg7:Name xml:lang=\"en\">"); ToReturn+=Mpeg7_SystemCS_Name(SystemCS_termID); ToReturn+=__T("</mpeg7:Name>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t</mpeg7:System>\n");
- }
-
- //BitRate
- if (!MI.Get(Stream_General, 0, General_OverallBitRate).empty())
- {
- ToReturn+=__T("\t\t\t\t\t\t\t<mpeg7:BitRate");
- bool IsCBR=true;
- bool IsVBR=true;
- for (size_t StreamKind=Stream_Video; StreamKind<=Stream_Audio; StreamKind++)
- for (size_t StreamPos=0; StreamPos<MI.Count_Get((stream_t)StreamKind); StreamPos++)
- {
- if (IsCBR && MI.Get((stream_t)StreamKind, StreamPos, __T("BitRate_Mode"))==__T("VBR"))
- IsCBR=false;
- if (IsVBR && MI.Get((stream_t)StreamKind, StreamPos, __T("BitRate_Mode"))==__T("CBR"))
- IsVBR=false;
- }
- if (IsCBR && IsVBR)
- {
- IsCBR=false;
- IsVBR=false;
- }
- if (IsCBR)
- ToReturn+=__T(" variable=\"false\"");
- if (IsVBR)
- ToReturn+=__T(" variable=\"true\"");
- ToReturn+=__T(">"); ToReturn+=MI.Get(Stream_General, 0, General_OverallBitRate); ToReturn+=__T("</mpeg7:BitRate>\n");
- }
-
- //xxxCoding
- for (size_t Pos=0; Pos<MI.Count_Get(Stream_Video); Pos++)
- Mpeg7_Transform_Visual(ToReturn, MI, Pos);
- for (size_t Pos=0; Pos<MI.Count_Get(Stream_Audio); Pos++)
- Mpeg7_Transform_Audio(ToReturn, MI, Pos);
-
- //MediaFormat header
- ToReturn+=__T("\t\t\t\t\t\t</mpeg7:MediaFormat>\n");
-
- //MediaTranscodingHints, intraFrameDistance and anchorFrameDistance
- if (!MI.Get(Stream_Video, 0, Video_Format_Settings_GOP).empty())
- {
- Ztring M=MI.Get(Stream_Video, 0, Video_Format_Settings_GOP).SubString(__T("M="), __T(","));
- Ztring N=MI.Get(Stream_Video, 0, Video_Format_Settings_GOP).SubString(__T("N="), __T(""));
- ToReturn+=__T("\t\t\t\t\t\t<mpeg7:MediaTranscodingHints>\n");
- ToReturn+=__T("\t\t\t\t\t\t\t<mpeg7:CodingHints");
- if (!N.empty())
- ToReturn+=__T(" intraFrameDistance=\"")+N;
- if (!M.empty())
- ToReturn+=__T("\" anchorFrameDistance=\"")+M;
- ToReturn+=__T("\"/>\n");
- ToReturn+=__T("\t\t\t\t\t\t</mpeg7:MediaTranscodingHints>\n");
- }
-
- ToReturn+=__T("\t\t\t\t\t</mpeg7:MediaProfile>\n");
- ToReturn+=__T("\t\t\t\t</mpeg7:MediaInformation>\n");
-
- if (MI.Count_Get(Stream_Video)==1 || MI.Count_Get(Stream_Audio)==1)
- {
- //MediaTimePoint
- ToReturn+=__T("\t\t\t\t<mpeg7:MediaTime>\n");
- ToReturn+=__T("\t\t\t\t\t<mpeg7:MediaTimePoint>")+Mpeg7_MediaTimePoint(MI)+__T("</mpeg7:MediaTimePoint>\n");
-
- //MediaDuration
- ToReturn+=__T("\t\t\t\t\t<mpeg7:MediaDuration>"); ToReturn+=Mpeg7_MediaDuration(MI); ToReturn+=__T("</mpeg7:MediaDuration>\n");
- ToReturn+=__T("\t\t\t\t</mpeg7:MediaTime>\n");
- }
-
- //Mpeg7 footer
- ToReturn+=__T("\t\t\t</mpeg7:"); ToReturn+=Mpeg7_Type(MI); ToReturn+=__T(">\n");
- ToReturn+=__T("\t\t</mpeg7:MultimediaContent>\n");
- ToReturn+=__T("\t</mpeg7:Description>\n");
- ToReturn+=__T("</mpeg7:Mpeg7>\n");
-
- //Carriage return
- ToReturn.FindAndReplace(__T("\n"), EOL, 0, Ztring_Recursive);
-
- //Find and replace
- ZtringListList ToReplace=MediaInfoLib::Config.Inform_Replace_Get_All();
- for (size_t Pos=0; Pos<ToReplace.size(); Pos++)
- ToReturn.FindAndReplace(ToReplace[Pos][0], ToReplace[Pos][1], 0, Ztring_Recursive);
-
- return ToReturn;
-}
-
-//***************************************************************************
-//
-//***************************************************************************
-
-} //NameSpace
-
-#endif \ No newline at end of file
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_Mpeg7.h b/src/thirdparty/MediaInfo/MediaInfo/Export/Export_Mpeg7.h
deleted file mode 100644
index 85506024e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_Mpeg7.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef Export_Mpeg7H
-#define Export_Mpeg7H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Internal.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-/// @brief Export_Mpeg7
-//***************************************************************************
-
-class Export_Mpeg7
-{
-public :
- //Constructeur/Destructeur
- Export_Mpeg7 ();
- ~Export_Mpeg7 ();
-
- //Input
- Ztring Transform(MediaInfo_Internal &MI);
-};
-
-} //NameSpace
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore.cpp b/src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore.cpp
deleted file mode 100644
index 239582345..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore.cpp
+++ /dev/null
@@ -1,343 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PBCORE_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Export/Export_PBCore.h"
-#include "MediaInfo/File__Analyse_Automatic.h"
-#include <ctime>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Ztring PBCore_MediaType(MediaInfo_Internal &MI)
-{
- if (MI.Count_Get(Stream_Video))
- return __T("Video");
- else if (MI.Count_Get(Stream_Audio))
- return __T("Sound");
- else if (MI.Count_Get(Stream_Image))
- return __T("Static Image");
- else if (MI.Count_Get(Stream_Text))
- return __T("Text");
- else
- return Ztring();
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Export_PBCore::Export_PBCore ()
-{
-}
-
-//---------------------------------------------------------------------------
-Export_PBCore::~Export_PBCore ()
-{
-}
-
-//***************************************************************************
-// Input
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void PBCore_Transform(Ztring &ToReturn, MediaInfo_Internal &MI, stream_t StreamKind, size_t StreamPos)
-{
- //Menu: only if TimeCode
- if (StreamKind==Stream_Menu && MI.Get(Stream_Menu, StreamPos, Menu_Format)!=__T("TimeCode"))
- return;
-
- //essenceTrackType
- Ztring essenceTrackType;
- switch (StreamKind)
- {
- case Stream_Video:
- essenceTrackType=__T("Video");
- break;
- case Stream_Audio:
- essenceTrackType=__T("Audio");
- break;
- case Stream_Text:
- {
- Ztring Format=MI.Get(Stream_Text, StreamPos, Text_Format);
- if (Format==__T("EIA-608") || Format==__T("EIA-708"))
- essenceTrackType=__T("CC");
- else
- essenceTrackType=__T("Text");
- }
- break;
- case Stream_Menu:
- if (MI.Get(Stream_Menu, StreamPos, Menu_Format)==__T("TimeCode"))
- {
- essenceTrackType=__T("TimeCode");
- break;
- }
- else
- return; //Not supported
- default: return; //Not supported
- }
-
- ToReturn+=__T("\t\t<pbcoreEssenceTrack>\n");
-
- ToReturn+=__T("\t\t\t<essenceTrackType>")+essenceTrackType+__T("</essenceTrackType>\n");
-
- //essenceTrackIdentifier
- if (!MI.Get(StreamKind, StreamPos, __T("ID")).empty())
- {
- ToReturn+=__T("\t\t\t<essenceTrackIdentifier>")+MI.Get(StreamKind, StreamPos, __T("ID"))+__T("</essenceTrackIdentifier>\n");
- ToReturn+=__T("\t\t\t<essenceTrackIdentifierSource>ID (Mediainfo)</essenceTrackIdentifierSource>\n");
- }
- else if (!MI.Get(StreamKind, StreamPos, __T("UniqueID")).empty())
- {
- ToReturn+=__T("\t\t\t<essenceTrackIdentifier>")+MI.Get(StreamKind, StreamPos, __T("UniqueID"))+__T("</essenceTrackIdentifier>\n");
- ToReturn+=__T("\t\t\t<essenceTrackIdentifierSource>UniqueID (Mediainfo)</essenceTrackIdentifierSource>\n");
- }
- else if (!MI.Get(StreamKind, StreamPos, __T("StreamKindID")).empty())
- {
- ToReturn+=__T("\t\t\t<essenceTrackIdentifier>")+MI.Get(StreamKind, StreamPos, __T("StreamKindID"))+__T("</essenceTrackIdentifier>\n");
- ToReturn+=__T("\t\t\t<essenceTrackIdentifierSource>StreamKindID (Mediainfo)</essenceTrackIdentifierSource>\n");
- }
-
- //essenceTrackStandard
- if (StreamKind==Stream_Video && !MI.Get(Stream_Video, StreamPos, Video_Standard).empty())
- ToReturn+=__T("\t\t\t<essenceTrackStandard>")+MI.Get(Stream_Video, StreamPos, Video_Standard)+__T("</essenceTrackStandard>\n");
-
- //essenceTrackEncoding
- if (!MI.Get(StreamKind, StreamPos, __T("Format")).empty())
- {
- ToReturn+=__T("\t\t\t<essenceTrackEncoding>");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("Format"));
- if (!MI.Get(StreamKind, StreamPos, __T("Format_Profile")).empty()) ToReturn+=__T(' ')+MI.Get(StreamKind, StreamPos, __T("Format_Profile"));
- if (!MI.Get(StreamKind, StreamPos, __T("CodecID")).empty()) ToReturn+=__T(" (")+MI.Get(StreamKind, StreamPos, __T("CodecID"))+__T(')');
- ToReturn+=__T("</essenceTrackEncoding>\n");
- }
-
- //essenceTrackDataRate
- if (!MI.Get(StreamKind, StreamPos, __T("BitRate")).empty())
- {
- ToReturn+=__T("\t\t\t<essenceTrackDataRate>");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("BitRate"));
- if (!MI.Get(StreamKind, StreamPos, __T("BitRate_Mode")).empty())
- ToReturn+=__T(' ')+MI.Get(StreamKind, StreamPos, __T("BitRate_Mode"));
- ToReturn+=__T("</essenceTrackDataRate>\n");
- }
-
- //essenceTrackFrameRate
- if (StreamKind==Stream_Video && !MI.Get(Stream_Video, StreamPos, Video_FrameRate).empty())
- {
- ToReturn+=__T("\t\t\t<essenceTrackFrameRate>");
- ToReturn+=MI.Get(Stream_Video, StreamPos, Video_FrameRate);
- if (!MI.Get(Stream_Video, StreamPos, Video_FrameRate_Mode).empty())
- ToReturn+=__T(' ')+MI.Get(Stream_Video, StreamPos, Video_FrameRate_Mode);
- ToReturn+=__T("</essenceTrackFrameRate>\n");
- }
-
- //essenceTrackSamplingRate
- if (StreamKind==Stream_Audio && !MI.Get(Stream_Audio, StreamPos, Audio_SamplingRate).empty())
- ToReturn+=__T("\t\t\t<essenceTrackSamplingRate>")+MI.Get(Stream_Audio, StreamPos, Audio_SamplingRate)+__T("</essenceTrackSamplingRate>\n");
-
- //essenceTrackBitDepth
- if (!MI.Get(StreamKind, StreamPos, __T("BitDepth")).empty())
- ToReturn+=__T("\t\t\t<essenceTrackBitDepth version=\"PBCoreXSD_Ver_1.2_D1\">")+MI.Get(StreamKind, StreamPos, __T("BitDepth"))+__T("</essenceTrackBitDepth>\n");
-
- //essenceTrackFrameSize
- if (StreamKind==Stream_Video && !MI.Get(Stream_Video, StreamPos, Video_Width).empty())
- ToReturn+=__T("\t\t\t<essenceTrackFrameSize>")+MI.Get(Stream_Video, StreamPos, Video_Width)+__T('x')+MI.Get(Stream_Video, StreamPos, Video_Height)+__T("</essenceTrackFrameSize>\n");
-
- //essenceTrackAspectRatio
- if (StreamKind==Stream_Video && !MI.Get(Stream_Video, StreamPos, Video_DisplayAspectRatio).empty())
- ToReturn+=__T("\t\t\t<essenceTrackAspectRatio>")+MI.Get(Stream_Video, StreamPos, Video_DisplayAspectRatio)+__T("</essenceTrackAspectRatio>\n");
-
- //essenceTrackDuration
- if (!MI.Get(StreamKind, StreamPos, __T("Duration")).empty())
- ToReturn+=__T("\t\t\t<essenceTrackDuration>")+MI.Get(StreamKind, StreamPos, __T("Duration"))+__T("</essenceTrackDuration>\n");
-
- //essenceTrackLanguage
- if (!MI.Get(StreamKind, StreamPos, __T("Language")).empty())
- ToReturn+=__T("\t\t\t<essenceTrackLanguage>")+MediaInfoLib::Config.Iso639_2_Get(MI.Get(StreamKind, StreamPos, __T("Language")))+__T("</essenceTrackLanguage>\n");
-
- //essenceTrackAnnotation - all fields (except *_String*) separated by |
- Ztring Temp;
- for (size_t Pos=0; Pos<MI.Count_Get(StreamKind, StreamPos); Pos++)
- if (MI.Get(StreamKind, StreamPos, Pos, Info_Name).find(__T("String"))==std::string::npos && !MI.Get(StreamKind, StreamPos, Pos).empty())
- Temp+=MI.Get(StreamKind, StreamPos, Pos, Info_Name)+__T(": ")+MI.Get(StreamKind, StreamPos, Pos)+__T('|');
- if (!Temp.empty())
- {
- Temp.resize(Temp.size()-1);
- ToReturn+=__T("\t\t\t<essenceTrackAnnotation>"); ToReturn+=Temp; ToReturn+=__T("</essenceTrackAnnotation>\n");
- }
-
- ToReturn+=__T("\t\t</pbcoreEssenceTrack>\n");
-}
-
-//---------------------------------------------------------------------------
-Ztring Export_PBCore::Transform(MediaInfo_Internal &MI)
-{
- //Current date/time is ISO format
- time_t Time=time(NULL);
- Ztring TimeS; TimeS.Date_From_Seconds_1970((int32u)Time);
- TimeS.FindAndReplace(__T("UTC "), __T(""));
- TimeS.FindAndReplace(__T(" "), __T("T"));
- TimeS+=__T('Z');
-
- Ztring ToReturn;
- ToReturn+=__T("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
- ToReturn+=__T("<PBCoreDescriptionDocument xsi:schemaLocation=\"http://www.pbcore.org/PBCore/PBCoreNamespace.html http://www.pbcore.org/PBCore/PBCoreXSD_Ver_1-2-1.xsd\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.pbcore.org/PBCore/PBCoreNamespace.html\">\n");
- ToReturn+=__T("\t<!-- Generated at ")+TimeS+__T(" by ")+MediaInfoLib::Config.Info_Version_Get()+__T(" -->\n");
- ToReturn+=__T("\t<!-- Warning: MediaInfo outputs only pbcoreInstantiation, other mandatory PBCore data is junk -->\n");
- ToReturn+=__T("\t<pbcoreIdentifier>\n");
- ToReturn+=__T("\t\t<identifier>***</identifier>\n");
- ToReturn+=__T("\t\t<identifierSource>***</identifierSource>\n");
- ToReturn+=__T("\t</pbcoreIdentifier>\n");
- ToReturn+=__T("\t<pbcoreTitle>\n");
- ToReturn+=__T("\t\t<title>***</title>\n");
- ToReturn+=__T("\t</pbcoreTitle>\n");
- ToReturn+=__T("\t<pbcoreDescription>\n");
- ToReturn+=__T("\t\t<description>***</description>\n");
- ToReturn+=__T("\t\t<descriptionType>***</descriptionType>\n");
- ToReturn+=__T("\t</pbcoreDescription>\n");
- ToReturn+=__T("\t<pbcoreInstantiation>\n");
-
-
- //pbcoreFormatID
- ToReturn+=__T("\t\t<pbcoreFormatID>\n");
- //formatIdentifier
- ToReturn+=__T("\t\t\t<formatIdentifier>")+MI.Get(Stream_General, 0, General_FileName)+__T("</formatIdentifier>\n");
- //formatIdentifierSource
- ToReturn+=__T("\t\t\t<formatIdentifierSource version=\"PBCoreXSD_Ver_1.2_D1\">File Name</formatIdentifierSource>\n");
- ToReturn+=__T("\t\t</pbcoreFormatID>\n");
-
- //formatDigital
- if (!MI.Get(Stream_General, 0, General_InternetMediaType).empty())
- {
- ToReturn+=__T("\t\t<formatDigital>");
- ToReturn+=MI.Get(Stream_General, 0, General_InternetMediaType);
- ToReturn+=__T("</formatDigital>\n");
- }
- else
- {
- //TODO: how to implement formats without Media Type?
- ToReturn+=__T("\t\t<formatDigital>");
- if (MI.Count_Get(Stream_Video))
- ToReturn+=__T("video/x-");
- else if (MI.Count_Get(Stream_Image))
- ToReturn+=__T("image/x-");
- else if (MI.Count_Get(Stream_Audio))
- ToReturn+=__T("audio/x-");
- else
- ToReturn+=__T("application/x-");
- ToReturn+=Ztring(MI.Get(Stream_General, 0, __T("Format"))).MakeLowerCase();
- ToReturn+=__T("</formatDigital>\n");
- }
-
- //formatLocation
- ToReturn+=__T("\t\t<formatLocation>")+MI.Get(Stream_General, 0, General_CompleteName)+__T("</formatLocation>\n");
-
- //dateCreated
- if (!MI.Get(Stream_General, 0, General_Encoded_Date).empty())
- {
- Ztring dateCreated=MI.Get(Stream_General, 0, General_Recorded_Date);
- dateCreated.FindAndReplace(__T("UTC"), __T("-"));
- dateCreated.FindAndReplace(__T(" "), __T("T"));
- dateCreated+=__T('Z');
- ToReturn+=__T("\t\t<dateCreated>")+dateCreated+__T("</dateCreated>\n");
- }
-
- //dateIssued
- if (!MI.Get(Stream_General, 0, General_Recorded_Date).empty())
- {
- Ztring dateIssued=MI.Get(Stream_General, 0, General_Recorded_Date);
- dateIssued.FindAndReplace(__T("UTC"), __T("-"));
- dateIssued.FindAndReplace(__T(" "), __T("T"));
- dateIssued+=__T('Z');
- ToReturn+=__T("\t\t<dateIssued>")+dateIssued+__T("</dateIssued>\n");
- }
-
- //formatMediaType
- if (!PBCore_MediaType(MI).empty())
- ToReturn+=__T("\t\t<formatMediaType version=\"PBCoreXSD_Ver_1.2_D1\">")+PBCore_MediaType(MI)+__T("</formatMediaType>\n");
- else
- ToReturn+=__T("\t\t<formatMediaType version=\"PBCoreXSD_Ver_1.2_D1\">application/octet-stream</formatMediaType>\n");
-
- //formatGenerations
- ToReturn+=__T("\t\t<formatGenerations version=\"PBCoreXSD_Ver_1.2_D1\" />\n");
-
- //formatFileSize
- if (!MI.Get(Stream_General, 0, General_FileSize).empty())
- ToReturn+=__T("\t\t<formatFileSize>")+MI.Get(Stream_General, 0, General_FileSize)+__T("</formatFileSize>\n");
-
- //formatTimeStart
- if (!MI.Get(Stream_Video, 0, Video_Delay_Original_String3).empty())
- ToReturn+=__T("\t\t<formatTimeStart>")+MI.Get(Stream_Video, 0, Video_Delay_Original_String3)+__T("</formatTimeStart>\n");
- else if (!MI.Get(Stream_Video, 0, Video_Delay_String3).empty())
- ToReturn+=__T("\t\t<formatTimeStart>")+MI.Get(Stream_Video, 0, Video_Delay_String3)+__T("</formatTimeStart>\n");
-
- //formatDuration
- if (!MI.Get(Stream_General, 0, General_Duration_String3).empty())
- ToReturn+=__T("\t\t<formatDuration>")+MI.Get(Stream_General, 0, General_Duration_String3)+__T("</formatDuration>\n");
-
- //formatDataRate
- if (!MI.Get(Stream_General, 0, General_OverallBitRate).empty())
- {
- ToReturn+=__T("\t\t<formatDataRate>");
- ToReturn+=MI.Get(Stream_General, 0, General_OverallBitRate);
- if (!MI.Get(Stream_General, 0, General_OverallBitRate_Mode).empty())
- ToReturn+=__T(' ')+MI.Get(Stream_General, 0, General_OverallBitRate_Mode);
- ToReturn+=__T("</formatDataRate>\n");
- }
-
- //formatTracks
- ToReturn+=__T("\t\t<formatTracks>")+Ztring::ToZtring(MI.Count_Get(Stream_Video)+MI.Count_Get(Stream_Audio)+MI.Count_Get(Stream_Image)+MI.Count_Get(Stream_Text))+__T("</formatTracks>\n");
-
- //Streams
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<MI.Count_Get((stream_t)StreamKind); StreamPos++)
- PBCore_Transform(ToReturn, MI, (stream_t)StreamKind, StreamPos);
-
- ToReturn+=__T("\t</pbcoreInstantiation>\n");
- ToReturn+=__T("</PBCoreDescriptionDocument>\n");
-
- //Carriage return
- ToReturn.FindAndReplace(__T("\n"), EOL, 0, Ztring_Recursive);
-
- return ToReturn;
-}
-
-//***************************************************************************
-//
-//***************************************************************************
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore.h b/src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore.h
deleted file mode 100644
index a3742b11e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef Export_PBCoreH
-#define Export_PBCoreH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Internal.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-/// @brief Export_PBCore
-//***************************************************************************
-
-class Export_PBCore
-{
-public :
- //Constructeur/Destructeur
- Export_PBCore ();
- ~Export_PBCore ();
-
- //Input
- Ztring Transform(MediaInfo_Internal &MI);
-};
-
-} //NameSpace
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore2.cpp b/src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore2.cpp
deleted file mode 100644
index 24e5e15f8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore2.cpp
+++ /dev/null
@@ -1,584 +0,0 @@
-/* Copyright (c) 2009-2013 MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Contributor: Dave Rice, dave@dericed.com
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PBCORE_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Export/Export_PBCore2.h"
-#include "MediaInfo/File__Analyse_Automatic.h"
-#include <ctime>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Ztring PBCore2_MediaType(MediaInfo_Internal &MI)
-{
- if (MI.Count_Get(Stream_Video))
- return __T("Moving Image");
- else if (MI.Count_Get(Stream_Audio))
- return __T("Sound");
- else if (MI.Count_Get(Stream_Image))
- return __T("Static Image");
- else if (MI.Count_Get(Stream_Text))
- return __T("Text");
- else
- return Ztring();
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Export_PBCore2::Export_PBCore2 ()
-{
-}
-
-//---------------------------------------------------------------------------
-Export_PBCore2::~Export_PBCore2 ()
-{
-}
-
-//***************************************************************************
-// Input
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void PBCore2_Transform(Ztring &ToReturn, MediaInfo_Internal &MI, stream_t StreamKind, size_t StreamPos)
-{
- //Menu: only if TimeCode
- if (StreamKind==Stream_Menu && MI.Get(Stream_Menu, StreamPos, Menu_Format)!=__T("TimeCode"))
- return;
-
- //essenceTrackType
- Ztring essenceTrackType;
- switch (StreamKind)
- {
- case Stream_Video:
- essenceTrackType=__T("Video");
- break;
- case Stream_Audio:
- essenceTrackType=__T("Audio");
- break;
- case Stream_Image:
- essenceTrackType=__T("Image");
- break;
- case Stream_Text:
- {
- Ztring Format=MI.Get(Stream_Text, StreamPos, Text_Format);
- if (Format==__T("EIA-608") || Format==__T("EIA-708"))
- essenceTrackType=__T("CC");
- else
- essenceTrackType=__T("Text");
- }
- break;
- case Stream_Menu:
- if (MI.Get(Stream_Menu, StreamPos, Menu_Format)==__T("TimeCode"))
- {
- essenceTrackType=__T("TimeCode");
- break;
- }
- else
- return; //Not supported
- default: return; //Not supported
- }
-
- ToReturn+=__T("\t<instantiationEssenceTrack>\n");
-
- ToReturn+=__T("\t\t<essenceTrackType>");
- ToReturn+=essenceTrackType;
- ToReturn+=__T("</essenceTrackType>\n");
-
- //essenceTrackIdentifier
- if (!MI.Get(StreamKind, StreamPos, __T("ID")).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackIdentifier source=\"ID (Mediainfo)\">");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("ID"));
- ToReturn+=__T("</essenceTrackIdentifier>\n");
- }
- if (!MI.Get(Stream_General, 0, General_UniqueID).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackIdentifier source=\"UniqueID (Mediainfo)\">");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("UniqueID"));
- ToReturn+=__T("</essenceTrackIdentifier>\n");
- }
- if (!MI.Get(StreamKind, StreamPos, __T("StreamKindID")).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackIdentifier source=\"StreamKindID (Mediainfo)\">");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("StreamKindID"));
- ToReturn+=__T("</essenceTrackIdentifier>\n");
- }
- if (!MI.Get(StreamKind, StreamPos, __T("StreamOrder")).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackIdentifier source=\"StreamOrder (Mediainfo)\">");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("StreamOrder"));
- ToReturn+=__T("</essenceTrackIdentifier>\n");
- }
-
- //essenceTrackStandard
- if (StreamKind==Stream_Video && !MI.Get(Stream_Video, StreamPos, Video_Standard).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackStandard>");
- ToReturn+=MI.Get(Stream_Video, StreamPos, Video_Standard);
- ToReturn+=__T("</essenceTrackStandard>\n");
- }
-
- //essenceTrackEncoding
- if (!MI.Get(StreamKind, StreamPos, __T("Format")).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackEncoding");
- if (!MI.Get(StreamKind, StreamPos, __T("CodecID")).empty())
- {
- ToReturn+=__T(" source=\"codecid\"");
- ToReturn+=__T(" ref=\"");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("CodecID"));
- ToReturn+=__T("\"");
- }
- if (!MI.Get(StreamKind, StreamPos, __T("Format_Version")).empty())
- {
- ToReturn+=__T(" version=\"");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("Format_Version"));
- ToReturn+=__T("\"");
- }
- if (!MI.Get(StreamKind, StreamPos, __T("Format_Profile")).empty())
- {
- ToReturn+=__T(" annotation=\"profile:");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("Format_Profile"));
- ToReturn+=__T("\"");
- }
- ToReturn+=__T(">");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("Format"));
- ToReturn+=__T("</essenceTrackEncoding>\n");
- }
-
- //essenceTrackDataRate
- if (!MI.Get(StreamKind, StreamPos, __T("BitRate")).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackDataRate");
- ToReturn+=__T(" unitsOfMeasure=\"bits/second\"");
- if (!MI.Get(StreamKind, StreamPos, __T("BitRate_Mode")).empty())
- {
- ToReturn+=__T(" annotation=\"");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("BitRate_Mode"));
- ToReturn+=__T("\"");
- }
- ToReturn+=__T(">");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("BitRate"));
- ToReturn+=__T("</essenceTrackDataRate>\n");
- }
-
- //essenceTrackFrameRate
- if (StreamKind==Stream_Video && !MI.Get(Stream_Video, StreamPos, Video_FrameRate).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackFrameRate");
- if (!MI.Get(Stream_Video, StreamPos, Video_FrameRate_Mode).empty())
- {
- ToReturn+=__T(" annotation=\"");
- ToReturn+=MI.Get(Stream_Video, StreamPos, Video_FrameRate_Mode);
- ToReturn+=__T("\"");
- }
- ToReturn+=__T(">");
- ToReturn+=MI.Get(Stream_Video, StreamPos, Video_FrameRate);
- ToReturn+=__T("</essenceTrackFrameRate>\n");
- }
-
- //essenceTrackSamplingRate
- if (StreamKind==Stream_Audio && !MI.Get(Stream_Audio, StreamPos, Audio_SamplingRate).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackSamplingRate");
- ToReturn+=__T(" unitsOfMeasure=\"Hz\"");
- ToReturn+=__T(">");
- ToReturn+=MI.Get(Stream_Audio, StreamPos, Audio_SamplingRate);
- ToReturn+=__T("</essenceTrackSamplingRate>\n");
- }
-
- //essenceTrackBitDepth
- if (!MI.Get(StreamKind, StreamPos, __T("BitDepth")).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackBitDepth>");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("BitDepth"));
- ToReturn+=__T("</essenceTrackBitDepth>\n");
- }
-
- //essenceTrackFrameSize
- if (StreamKind==Stream_Video && !MI.Get(Stream_Video, StreamPos, Video_Width).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackFrameSize>");
- ToReturn+=MI.Get(Stream_Video, StreamPos, Video_Width);
- ToReturn+=__T('x');
- ToReturn+=MI.Get(Stream_Video, StreamPos, Video_Height);
- ToReturn+=__T("</essenceTrackFrameSize>\n");
- }
-
- //essenceTrackAspectRatio
- if (StreamKind==Stream_Video && !MI.Get(Stream_Video, StreamPos, Video_DisplayAspectRatio).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackAspectRatio>");
- ToReturn+=MI.Get(Stream_Video, StreamPos, Video_DisplayAspectRatio);
- ToReturn+=__T("</essenceTrackAspectRatio>\n");
- }
-
- //essenceTrackDuration
- if (!MI.Get(StreamKind, StreamPos, __T("Duration_String3")).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackDuration>");
- ToReturn+=MI.Get(StreamKind, StreamPos, __T("Duration_String3"));
- ToReturn+=__T("</essenceTrackDuration>\n");
- }
-
- //essenceTrackLanguage
- if (!MI.Get(StreamKind, StreamPos, __T("Language")).empty())
- {
- ToReturn+=__T("\t\t<essenceTrackLanguage>");
- ToReturn+=MediaInfoLib::Config.Iso639_2_Get(MI.Get(StreamKind, StreamPos, __T("Language")));
- ToReturn+=__T("</essenceTrackLanguage>\n");
- }
-
- //essenceTrackAnnotation - all fields (except *_String* and a blacklist)
- for (size_t Pos=0; Pos<MI.Count_Get(StreamKind, StreamPos); Pos++)
- if (
- MI.Get(StreamKind, StreamPos, Pos, Info_Name).find(__T("String"))==std::string::npos &&
- !MI.Get(StreamKind, StreamPos, Pos).empty() &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Bits-(Pixel*Frame)") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("BitDepth") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("BitRate") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("BitRate_Mode") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("ChannelPositions") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Codec") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Codec_Profile") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Codec_Settings") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Codec_Settings_CABAC") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Codec_Settings_RefFrames") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Codec/CC") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Codec/Family") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Codec/Info") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Codec/Url") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("CodecID") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("CodecID/Info") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("CodecID/Url") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Codec_Settings_Floor") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Colorimetry") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Count") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("DisplayAspectRatio") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Duration") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Encoded_Date") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Encoded_Library") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Format") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Format/Info") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Format/Url") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Format_Commercial") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Format_Profile") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Format_Version") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("FrameRate") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("FrameRate_Mode") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Height") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("ID") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("InternetMediaType") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Language") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Resolution") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("SamplingRate") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Standard") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("StreamCount") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("StreamKind") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("StreamKindID") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("StreamKindPos") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("StreamOrder") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("StreamSize_Proportion") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Tagged_Date") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("UniqueID") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Video_DisplayAspectRatio") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Video_FrameRate") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Video_FrameRate_Mode") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Video_Height") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Video_Standard") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Video_Width") &&
- MI.Get(StreamKind, StreamPos, Pos, Info_Name)!=__T("Width")
- )
- {
- ToReturn+=__T("\t\t<essenceTrackAnnotation");
- ToReturn+=__T(" annotationType=\"");
- ToReturn+=MI.Get(StreamKind, StreamPos, Pos, Info_Name);
- ToReturn+=__T("\">");
- ToReturn+=MI.Get(StreamKind, StreamPos, Pos);
- ToReturn+=__T("</essenceTrackAnnotation>\n");
- }
- ToReturn+=__T("\t</instantiationEssenceTrack>\n");
-}
-
-//---------------------------------------------------------------------------
-Ztring Export_PBCore2::Transform(MediaInfo_Internal &MI)
-{
- //Current date/time is ISO format
- time_t Time=time(NULL);
- Ztring TimeS; TimeS.Date_From_Seconds_1970((int32u)Time);
- TimeS.FindAndReplace(__T("UTC "), __T(""));
- TimeS.FindAndReplace(__T(" "), __T("T"));
- TimeS+=__T('Z');
-
- Ztring ToReturn;
- ToReturn+=__T("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
- ToReturn+=__T("<pbcoreInstantiationDocument xsi:schemaLocation=\"http://www.pbcore.org/PBCore/PBCoreNamespace.html http://pbcore.org/xsd/pbcore-2.0.xsd\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.pbcore.org/PBCore/PBCoreNamespace.html\">\n");
- ToReturn+=__T("<!-- Generated at ")+TimeS+__T(" by ")+MediaInfoLib::Config.Info_Version_Get()+__T(" -->\n");
-
- //instantiationIdentifier
- ToReturn+=__T("\t<instantiationIdentifier source=\"File Name\">");
- ToReturn+=MI.Get(Stream_General, 0, General_FileName);
- if (!MI.Get(Stream_General, 0, General_FileExtension).empty())
- {
- ToReturn+=__T(".");
- ToReturn+=MI.Get(Stream_General, 0, General_FileExtension);
- }
- ToReturn+=__T("</instantiationIdentifier>\n");
-
- // need to figure out how to get to non-internally-declared-values
- //if (!MI.Get(Stream_General, 0, General_Media/UUID).empty())
- //{
- // ToReturn+=__T("\t<instantiationIdentifier source=\"Media UUID\">")+MI.Get(Stream_General, 0, General_Media/UUID)+__T("</instantiationIdentifier>\n");
- //}
-
- //instantiationDates
- //dateIssued
- if (!MI.Get(Stream_General, 0, General_Recorded_Date).empty())
- {
- Ztring dateIssued=MI.Get(Stream_General, 0, General_Recorded_Date);
- dateIssued.FindAndReplace(__T("UTC"), __T(""));
- dateIssued.FindAndReplace(__T(" "), __T("T"));
- dateIssued+=__T('Z');
- ToReturn+=__T("\t<instantiationDate dateType=\"issued\">");
- ToReturn+=dateIssued+__T("</instantiationDate>\n");
- }
-
- //dateFileModified
- if (!MI.Get(Stream_General, 0, General_File_Modified_Date).empty())
- {
- Ztring dateModified=MI.Get(Stream_General, 0, General_File_Modified_Date);
- dateModified.FindAndReplace(__T("UTC "), __T(""));
- dateModified.FindAndReplace(__T(" "), __T("T"));
- dateModified+=__T('Z');
- ToReturn+=__T("\t<instantiationDate dateType=\"file modification\">");
- ToReturn+=dateModified+__T("</instantiationDate>\n");
- }
-
- //dateEncoder
- if (!MI.Get(Stream_General, 0, General_Encoded_Date).empty())
- {
- Ztring dateEncoded=MI.Get(Stream_General, 0, General_Encoded_Date);
- dateEncoded.FindAndReplace(__T("UTC "), __T(""));
- dateEncoded.FindAndReplace(__T(" "), __T("T"));
- dateEncoded+=__T('Z');
- ToReturn+=__T("\t<instantiationDate dateType=\"encoded\">");
- ToReturn+=dateEncoded+__T("</instantiationDate>\n");
- }
-
- //dateTagged
- if (!MI.Get(Stream_General, 0, General_Tagged_Date).empty())
- {
- Ztring dateTagged=MI.Get(Stream_General, 0, General_Tagged_Date);
- dateTagged.FindAndReplace(__T("UTC "), __T(""));
- dateTagged.FindAndReplace(__T(" "), __T("T"));
- dateTagged+=__T('Z');
- ToReturn+=__T("\t<instantiationDate dateType=\"tagged\">");
- ToReturn+=dateTagged+__T("</instantiationDate>\n");
- }
-
- //formatDigital
- if (!MI.Get(Stream_General, 0, General_InternetMediaType).empty())
- {
- ToReturn+=__T("\t<instantiationDigital>");
- ToReturn+=MI.Get(Stream_General, 0, General_InternetMediaType);
- ToReturn+=__T("</instantiationDigital>\n");
- }
- else
- {
- //TODO: how to implement formats without Media Type?
- ToReturn+=__T("\t<instantiationDigital>");
- if (MI.Count_Get(Stream_Video))
- ToReturn+=__T("video/x-");
- else if (MI.Count_Get(Stream_Image))
- ToReturn+=__T("image/x-");
- else if (MI.Count_Get(Stream_Audio))
- ToReturn+=__T("audio/x-");
- else
- ToReturn+=__T("application/x-");
- ToReturn+=Ztring(MI.Get(Stream_General, 0, __T("Format"))).MakeLowerCase();
- ToReturn+=__T("</instantiationDigital>\n");
- }
-
- //formatLocation
- ToReturn+=__T("\t<instantiationLocation>");
- ToReturn+=MI.Get(Stream_General, 0, General_CompleteName);
- ToReturn+=__T("</instantiationLocation>\n");
-
- //formatMediaType
- if (!PBCore2_MediaType(MI).empty())
- {
- ToReturn+=__T("\t<instantiationMediaType>");
- ToReturn+=PBCore2_MediaType(MI);
- ToReturn+=__T("</instantiationMediaType>\n");
- }
-
- //formatFileSize
- if (!MI.Get(Stream_General, 0, General_FileSize).empty())
- {
- ToReturn+=__T("\t<instantiationFileSize");
- ToReturn+=__T(" unitsOfMeasure=\"bytes\"");
- ToReturn+=__T(">");
- ToReturn+=MI.Get(Stream_General, 0, General_FileSize);
- ToReturn+=__T("</instantiationFileSize>\n");
- }
-
- //formatTimeStart
- if (!MI.Get(Stream_Video, 0, Video_Delay_Original_String3).empty())
- {
- ToReturn+=__T("\t<instantiationTimeStart>");
- ToReturn+=MI.Get(Stream_Video, 0, Video_Delay_Original_String3);
- ToReturn+=__T("</instantiationTimeStart>\n");
- }
- else if (!MI.Get(Stream_Video, 0, Video_Delay_String3).empty())
- {
- ToReturn+=__T("\t<instantiationTimeStart>");
- ToReturn+=MI.Get(Stream_Video, 0, Video_Delay_String3);
- ToReturn+=__T("</instantiationTimeStart>\n");
- }
-
- //formatDuration
- if (!MI.Get(Stream_General, 0, General_Duration_String3).empty())
- {
- ToReturn+=__T("\t<instantiationDuration>");
- ToReturn+=MI.Get(Stream_General, 0, General_Duration_String3);
- ToReturn+=__T("</instantiationDuration>\n");
- }
-
- //formatDataRate
- if (!MI.Get(Stream_General, 0, General_OverallBitRate).empty())
- {
- ToReturn+=__T("\t<instantiationDataRate");
- ToReturn+=__T(" unitsOfMeasure=\"bits/second\"");
- if (!MI.Get(Stream_General, 0, General_OverallBitRate_Mode).empty())
- {
- ToReturn+=__T(" annotation=\"");
- ToReturn+=MI.Get(Stream_General, 0, General_OverallBitRate_Mode);
- ToReturn+=__T("\"");
- }
- ToReturn+=__T(">");
- ToReturn+=MI.Get(Stream_General, 0, General_OverallBitRate);
- ToReturn+=__T("</instantiationDataRate>\n");
- }
-
- //formatTracks
- ToReturn+=__T("\t<instantiationTracks>")+Ztring::ToZtring(MI.Count_Get(Stream_Video)+MI.Count_Get(Stream_Audio)+MI.Count_Get(Stream_Image)+MI.Count_Get(Stream_Text))+__T("</instantiationTracks>\n");
-
- //Streams
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<MI.Count_Get((stream_t)StreamKind); StreamPos++)
- PBCore2_Transform(ToReturn, MI, (stream_t)StreamKind, StreamPos);
-
- //instantiationAnnotations
- for (size_t Pos=0; Pos<MI.Count_Get(Stream_General, 0); Pos++)
- if (
- MI.Get(Stream_General, 0, Pos, Info_Name).find(__T("String"))==std::string::npos &&
- !MI.Get(Stream_General, 0, Pos).empty() &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Count") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("StreamCount") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("StreamKind") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("StreamKindID") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("UniqueID") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Format/Url") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Format_Commercial") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Codec") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Codec/Url") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("CodecID") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("CodecID/Url") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Encoded_Date") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Tagged_Date") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Codec/Url") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Duration") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("StreamSize_Proportion") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("VideoCount") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("AudioCount") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("TextCount") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("MenuCount") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Video_Format_List") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Video_Format_WithHint_List") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Video_Codec_List") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Video_Language_List") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Audio_Format_List") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Audio_Format_WithHint_List") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Audio_Codec_List") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Audio_Language_List") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Text_Format_List") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Text_Format_WithHint_List") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Text_Codec_List") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Text_Language_List") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("CompleteName") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("FolderName") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("FileName") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("FileExtension") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("InternetMediaType") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Format/Extensions") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("Codec/Extensions") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("FileSize") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("OverallBitRate_Mode") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("OverallBitRate") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("StreamSize") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("File_Modified_Date") &&
- MI.Get(Stream_General, 0, Pos, Info_Name)!=__T("File_Modified_Date_Local")
- )
- {
- ToReturn+=__T("\t<instantiationAnnotation");
- ToReturn+=__T(" annotationType=\"");
- ToReturn+=MI.Get(Stream_General, 0, Pos, Info_Name);
- ToReturn+=__T("\">");
- ToReturn+=MI.Get(Stream_General, 0, Pos);
- ToReturn+=__T("</instantiationAnnotation>\n");
- }
-
- ToReturn+=__T("</pbcoreInstantiationDocument>\n");
-
- //Carriage return
- ToReturn.FindAndReplace(__T("\n"), EOL, 0, Ztring_Recursive);
-
- return ToReturn;
-}
-
-//***************************************************************************
-//
-//***************************************************************************
-
-} //NameSpace
-
-#endif \ No newline at end of file
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore2.h b/src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore2.h
deleted file mode 100644
index 55e0a9013..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_PBCore2.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef Export_PBCore2H
-#define Export_PBCore2H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Internal.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-/// @brief Export_PBCore 2.0
-//***************************************************************************
-
-class Export_PBCore2
-{
-public :
- //Constructeur/Destructeur
- Export_PBCore2 ();
- ~Export_PBCore2 ();
-
- //Input
- Ztring Transform(MediaInfo_Internal &MI);
-};
-
-} //NameSpace
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_reVTMD.cpp b/src/thirdparty/MediaInfo/MediaInfo/Export/Export_reVTMD.cpp
deleted file mode 100644
index 9c65a0f7e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_reVTMD.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// reVTMD is disabled due to its non-free licensing.
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_reVTMD.h b/src/thirdparty/MediaInfo/MediaInfo/Export/Export_reVTMD.h
deleted file mode 100644
index 2eef20021..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Export/Export_reVTMD.h
+++ /dev/null
@@ -1 +0,0 @@
-// reVTMD is disabled due to its non-compatible licensing.
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File_Dummy.cpp b/src/thirdparty/MediaInfo/MediaInfo/File_Dummy.cpp
deleted file mode 100644
index 90aa49ed4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File_Dummy.cpp
+++ /dev/null
@@ -1,313 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DUMMY_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File_Dummy.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dummy::FileHeader_Parse()
-{
- File_Name=__T("D:\\Example\\"); File_Name+=KindOfDummy;
- if (KindOfDummy==__T("Album"))
- {
- Fill_Dummy_General();
- Fill_Dummy_Audio();
- }
- else if (KindOfDummy==__T("Comic"))
- {
- Fill_Dummy_General();
- Fill_Dummy_Video();
- }
- else if (KindOfDummy==__T("Movie"))
- {
- Fill_Dummy_General();
- Fill_Dummy_Video();
- Fill_Dummy_Video();
- Fill_Dummy_Audio();
- Fill_Dummy_Audio();
- Fill_Dummy_Audio();
- Fill_Dummy_Audio();
- Fill_Dummy_Text();
- Fill_Dummy_Text();
- Fill_Dummy_Text();
- Fill_Dummy_Text();
- Fill_Dummy_Chapters();
- Fill_Dummy_Chapters();
- }
- else
- {
- File_Name=__T("D:\\WhatIsIt.mkv");
- Fill(Stream_General, 0, General_Domain, "Starwars saga");
- Fill(Stream_General, 0, General_Movie, "Starwars 4");
- Fill(Stream_General, 0, General_Movie_More, "A new hope");
- Fill(Stream_General, 0, General_Director, "Georges Lucas");
- Fill(Stream_General, 0, General_Released_Date, "1977");
- Fill(Stream_General, 0, General_FileSize, "734000000");
- Fill(Stream_General, 0, General_Format, "Matroska");
- Fill(Stream_General, 0, General_Format_Url, "http://MediaArea.net/MediaInfo");
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Codec, "XVID");
- Fill(Stream_Video, 0, Video_Codec_Url, "http://MediaArea.net/MediaInfo");
- Fill(Stream_Video, 0, Video_BitRate, "800000");
- Fill(Stream_Video, 0, Video_Width, "720");
- Fill(Stream_Video, 0, Video_Height, "320");
- Fill(Stream_Video, 0, Video_FrameRate, "24.976");
- Fill(Stream_Video, 0, Video_BitDepth, "8");
- Fill(Stream_Video, 0, Video_Language, "en");
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "AC-3");
- Fill(Stream_Audio, 0, Audio_Codec, "AC3");
- Fill(Stream_Audio, 0, Audio_Codec_Url, "http://MediaArea.net/MediaInfo");
- Fill(Stream_Audio, 0, Audio_BitRate, "384000");
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
- Fill(Stream_Audio, 0, Audio_Channel_s_, "6");
- Fill(Stream_Audio, 0, Audio_SamplingRate, "48000");
- Fill(Stream_Audio, 0, Audio_Language, "en");
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Codec, "SSA");
- Fill(Stream_Text, 0, Text_Codec_Url, "http://MediaArea.net/MediaInfo");
- Fill(Stream_Text, 0, Text_Language, "en");
- Fill(Stream_Text, 0, Text_Language_More, "Forced");
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, 0, Chapters_Total, "16");
- Fill(Stream_Other, 0, Chapters_Language, "en");
- }
-
- Accept();
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dummy::Fill_Dummy_General()
-{
- Fill(Stream_General, 0, General_Format, "Format");
- Fill(Stream_General, 0, General_Format_Url, "http://MediaArea.net/MediaInfo");
- Fill(Stream_General, 0, General_Format_Extensions, "fmt fmt fmt");
- Fill(Stream_General, 0, General_FileSize, "1000000");
- Fill(Stream_General, 0, General_Duration, "10000");
- Fill(Stream_General, 0, General_Domain, "Domain");
- Fill(Stream_General, 0, General_Collection, "Collection");
- Fill(Stream_General, 0, General_Season, "Season");
- Fill(Stream_General, 0, General_Season_Position_Total, "Season/Position_Total");
- if (KindOfDummy==__T("Album"))
- {
- Fill(Stream_General, 0, General_Album, "Album name");
- Fill(Stream_General, 0, General_Album_More, "More information about the album");
- Fill(Stream_General, 0, General_Part, "Part");
- Fill(Stream_General, 0, General_Part_Position_Total, "Part/Position_Total");
- Fill(Stream_General, 0, General_Part_Position, "Part/Position");
- Fill(Stream_General, 0, General_Track, "Track");
- Fill(Stream_General, 0, General_Track_Position, "Track/Position");
- Fill(Stream_General, 0, General_Track_More, "More information about the track");
- }
- else if (KindOfDummy==__T("Comic"))
- {
- Fill(Stream_General, 0, General_Comic, "Comic name");
- Fill(Stream_General, 0, General_Comic_More, "More information about the comic");
- }
- else //if (KindOfDummy==__T("Movie"))
- {
- Fill(Stream_General, 0, General_Movie, "Movie name");
- Fill(Stream_General, 0, General_Movie_More, "More information about the movie");
- }
- Fill(Stream_General, 0, General_Performer, "Performer");
- Fill(Stream_General, 0, General_Performer_Sort, "Performer/Sort");
- Fill(Stream_General, 0, General_Performer_Url, "Performer/Url");
- Fill(Stream_General, 0, General_Original_Performer, "Original/Performer");
- Fill(Stream_General, 0, General_Accompaniment, "Accompaniment");
- Fill(Stream_General, 0, General_Composer, "Composer");
- Fill(Stream_General, 0, General_Composer_Nationality, "Composer/Nationality");
- Fill(Stream_General, 0, General_Arranger, "Arranger");
- Fill(Stream_General, 0, General_Lyricist, "Lyricist");
- Fill(Stream_General, 0, General_Original_Lyricist, "Original/Lyricist");
- Fill(Stream_General, 0, General_Conductor, "Conductor");
- Fill(Stream_General, 0, General_Actor, "Actor");
- Fill(Stream_General, 0, General_Actor_Character, "Actor_Character");
- Fill(Stream_General, 0, General_WrittenBy, "WrittenBy");
- Fill(Stream_General, 0, General_ScreenplayBy, "ScreenplayBy");
- Fill(Stream_General, 0, General_Director, "Director");
- Fill(Stream_General, 0, General_AssistantDirector, "AssistantDirector");
- Fill(Stream_General, 0, General_DirectorOfPhotography, "DirectorOfPhotography");
- Fill(Stream_General, 0, General_ArtDirector, "ArtDirector");
- Fill(Stream_General, 0, General_EditedBy, "EditedBy");
- Fill(Stream_General, 0, General_Producer, "Producer");
- Fill(Stream_General, 0, General_CoProducer, "CoProducer");
- Fill(Stream_General, 0, General_ExecutiveProducer, "ExecutiveProducer");
- Fill(Stream_General, 0, General_ProductionDesigner, "ProductionDesigner");
- Fill(Stream_General, 0, General_CostumeDesigner, "CostumeDesigner");
- Fill(Stream_General, 0, General_Choregrapher, "Choregrapher");
- Fill(Stream_General, 0, General_SoundEngineer, "SoundEngineer");
- Fill(Stream_General, 0, General_MasteredBy, "MasteredBy");
- Fill(Stream_General, 0, General_RemixedBy, "RemixedBy");
- Fill(Stream_General, 0, General_ProductionStudio, "ProductionStudio");
- Fill(Stream_General, 0, General_Label, "Label");
- Fill(Stream_General, 0, General_Publisher, "Publisher");
- Fill(Stream_General, 0, General_Publisher_URL, "Publisher/URL");
- Fill(Stream_General, 0, General_DistributedBy, "DistributedBy");
- Fill(Stream_General, 0, General_EncodedBy, "EncodedBy");
- Fill(Stream_General, 0, General_ThanksTo, "ThanksTo");
- Fill(Stream_General, 0, General_ServiceName, "ServiceNeme");
- Fill(Stream_General, 0, General_ServiceProvider, "ServiceProvider");
- Fill(Stream_General, 0, General_Service_Url, "Service/URL");
- Fill(Stream_General, 0, General_ContentType, "ContentType");
- Fill(Stream_General, 0, General_Subject, "Subject");
- Fill(Stream_General, 0, General_Synopsis, "Synopsis");
- Fill(Stream_General, 0, General_Summary, "Summary");
- Fill(Stream_General, 0, General_Description, "Description");
- Fill(Stream_General, 0, General_Keywords, "Keywords");
- Fill(Stream_General, 0, General_Period, "Period");
- Fill(Stream_General, 0, General_LawRating, "LawRating");
- Fill(Stream_General, 0, General_Written_Date, "Written_Date");
- Fill(Stream_General, 0, General_Recorded_Date, "Recorded_Date");
- Fill(Stream_General, 0, General_Released_Date, "Released_Date");
- Fill(Stream_General, 0, General_Mastered_Date, "Mastered_Date");
- Fill(Stream_General, 0, General_Encoded_Date, "Encoded_Date");
- Fill(Stream_General, 0, General_Tagged_Date, "Tagged_Date");
- Fill(Stream_General, 0, General_Original_Released_Date, "Original/Released_Date");
- Fill(Stream_General, 0, General_Written_Location, "Written_Location");
- Fill(Stream_General, 0, General_Recorded_Location, "Recorded_Location");
- Fill(Stream_General, 0, General_Archival_Location, "Archival_Location");
- Fill(Stream_General, 0, General_Genre, "Genre");
- Fill(Stream_General, 0, General_Mood, "Mood");
- Fill(Stream_General, 0, General_Comment, "Comment");
- Fill(Stream_General, 0, General_Rating , "Rating ");
- Fill(Stream_General, 0, General_Encoded_Application, "Encoded_Application");
- Fill(Stream_General, 0, General_Encoded_Library, "Encoded_Library");
- Fill(Stream_General, 0, General_Encoded_Library_Settings, "Encoded_Library_Settings");
- Fill(Stream_General, 0, General_Copyright, "Copyright");
- Fill(Stream_General, 0, General_Producer_Copyright, "Producer_Copyright");
- Fill(Stream_General, 0, General_TermsOfUse, "TermsOfUse");
- Fill(Stream_General, 0, General_Copyright_Url, "Copyright/Url");
- Fill(Stream_General, 0, General_ISRC, "ISRC");
- Fill(Stream_General, 0, General_ISBN, "ISBN");
- Fill(Stream_General, 0, General_BarCode, "BarCode");
- Fill(Stream_General, 0, General_LCCN, "LCCN");
- Fill(Stream_General, 0, General_CatalogNumber, "CatalogNumber");
- Fill(Stream_General, 0, General_LabelCode, "LabelCode");
- Fill(Stream_General, 0, General_Cover, "Y");
- Fill(Stream_General, 0, General_Cover_Data, "Cover_Datas");
- Fill(Stream_General, 0, General_Summary, "Summary");
- Fill(Stream_General, 0, General_BPM, "100");
-}
-
-//---------------------------------------------------------------------------
-void File_Dummy::Fill_Dummy_Video()
-{
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_ID, "ID");
- Fill(Stream_Video, 0, Video_UniqueID, "UniqueID");
- Fill(Stream_Video, 0, Video_Title, "Title");
- Fill(Stream_Video, 0, Video_Codec, "Codec");
- Fill(Stream_Video, 0, Video_Codec_Info, "Codec/Info");
- Fill(Stream_Video, 0, Video_Codec_Url, "http://--Codec/Url--");
- Fill(Stream_Video, 0, Video_BitRate, "10000");
- Fill(Stream_Video, 0, Video_BitRate_Mode, "BitRate_Mode");
- Fill(Stream_Video, 0, Video_Encoded_Library, "Encoded_Library");
- Fill(Stream_Video, 0, Video_Encoded_Library_Settings, "Encoded_Library_Settings");
- if (KindOfDummy==__T("Album"))
- {
- Fill(Stream_Video, 0, Video_Width, "2000");
- Fill(Stream_Video, 0, Video_Height, "3000");
- }
- else //if (KindOfDummy==__T("Movie"))
- {
- Fill(Stream_Video, 0, Video_DisplayAspectRatio, "2");
- Fill(Stream_Video, 0, Video_FrameRate, "24.976");
- Fill(Stream_Video, 0, Video_FrameCount, "FrameCount");
- Fill(Stream_Video, 0, Video_BitDepth, "8");
- Fill(Stream_Video, 0, Video_Bits__Pixel_Frame_, "Bits/(Pixel*Frame)");
- Fill(Stream_Video, 0, Video_Delay, "100");
- Fill(Stream_Video, 0, Video_Duration, "990000");
- }
- Fill(Stream_Video, 0, Video_Language, "eng");
- Fill(Stream_Video, 0, Video_Language_More, "Language_More");
-}
-
-//---------------------------------------------------------------------------
-void File_Dummy::Fill_Dummy_Audio()
-{
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_ID, "ID");
- Fill(Stream_Audio, 0, Audio_UniqueID, "UniqueID");
- Fill(Stream_Audio, 0, Audio_Title, "Title");
- Fill(Stream_Audio, 0, Audio_Format, "Format");
- Fill(Stream_Audio, 0, Audio_Format_Info, "Format/Info");
- Fill(Stream_Audio, 0, Audio_Format_Url, "http://--Format/Url--");
- Fill(Stream_Audio, 0, Audio_Codec, "Codec");
- Fill(Stream_Audio, 0, Audio_Codec_Info, "Codec/Info");
- Fill(Stream_Audio, 0, Audio_Codec_Url, "http://--Codec/Url--");
- Fill(Stream_Audio, 0, Audio_BitRate, "1000");
- Fill(Stream_Audio, 0, Audio_BitRate_Mode, "BitRate_Mode");
- Fill(Stream_Audio, 0, Audio_Encoded_Library, "Encoded_Library");
- Fill(Stream_Audio, 0, Audio_Encoded_Library_Settings, "Encoded_Library_Settings");
- Fill(Stream_Audio, 0, Audio_Channel_s_, 2);
- Fill(Stream_Audio, 0, Audio_ChannelPositions, "ChannelPositions");
- Fill(Stream_Audio, 0, Audio_SamplingRate, "48000");
- Fill(Stream_Audio, 0, Audio_SamplingCount, "SamplingCount");
- Fill(Stream_Audio, 0, Audio_BitDepth, "BitDepth");
- Fill(Stream_Audio, 0, Audio_Delay, "10");
- Fill(Stream_Audio, 0, Audio_Duration, "100000");
- Fill(Stream_Audio, 0, Audio_Language, "fre");
- Fill(Stream_Audio, 0, Audio_Language_More, "Language_More");
-}
-
-//---------------------------------------------------------------------------
-void File_Dummy::Fill_Dummy_Text()
-{
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_ID, "ID");
- Fill(Stream_Text, 0, Text_UniqueID, "UniqueID");
- Fill(Stream_Text, 0, Text_Title, "Title");
- Fill(Stream_Text, 0, Text_Codec, "Codec");
- Fill(Stream_Text, 0, Text_Codec_Url, "http://--Codec/Url--");
- Fill(Stream_Text, 0, Text_Delay, "100");
- Fill(Stream_Text, 0, Text_Duration, "100");
- Fill(Stream_Text, 0, Text_Language, "de");
- Fill(Stream_Text, 0, Text_Language_More, "Language_More");
- Fill(Stream_Text, 0, Text_Summary, "Summary");
-}
-
-//---------------------------------------------------------------------------
-void File_Dummy::Fill_Dummy_Chapters()
-{
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, 0, Chapters_ID, "ID");
- Fill(Stream_Other, 0, Chapters_UniqueID, "UniqueID");
- Fill(Stream_Other, 0, Chapters_Title, "Title");
- Fill(Stream_Other, 0, Chapters_Total, "Total");
- Fill(Stream_Other, 0, Chapters_Language, "de");
-}
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File_Dummy.h b/src/thirdparty/MediaInfo/MediaInfo/File_Dummy.h
deleted file mode 100644
index f9ab4ee57..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File_Dummy.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Fill with Name of tags
-// Used to give an example to the GUI of what MediaInfo can do
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DummyH
-#define MediaInfo_File_DummyH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Dummy
-//***************************************************************************
-
-class File_Dummy : public File__Analyze
-{
-public :
- Ztring KindOfDummy;
-
-protected :
- //Buffer - File header
- void FileHeader_Parse ();
-
-private :
- void Fill_Dummy_General();
- void Fill_Dummy_Video();
- void Fill_Dummy_Audio();
- void Fill_Dummy_Text();
- void Fill_Dummy_Chapters();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File_Other.cpp b/src/thirdparty/MediaInfo/MediaInfo/File_Other.cpp
deleted file mode 100644
index d5ea6a42d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File_Other.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_OTHER_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File_Other.h"
-#include "ZenLib/Utils.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Other::Read_Buffer_Continue()
-{
- //Integrity
- if (Buffer_Size<16)
- {
- Element_WaitForMoreData();
- return;
- }
-
- Ztring Format;
- if (Buffer[0]==0xEA
- && Buffer[1]==0x22
- && Buffer[2]<=0x03)
- {
- Accept();
-
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Format, "Cheetah");
-
- Finish();
- return;
- }
- if (Buffer[0]==0x4C
- && Buffer[1]==0x61
- && Buffer[2]==0x6D
- && Buffer[3]==0x62
- && Buffer[4]==0x64
- && Buffer[5]==0x61)
- {
- Accept();
-
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Format, "Lambda");
-
- Finish();
- return;
- }
- if (CC4(Buffer)==0xC5C6CBC3) {Format=__T("RISC OS Chunk data");}
- else if (CC4(Buffer)==0x110000EF) {Format=__T("RISC OS AIF executable");}
- else if (CC4(Buffer)==CC4("Draw")) {Format=__T("RISC OS Draw");}
- else if (CC4(Buffer)==CC4("FONT")) {Format=__T("RISC OS Font");}
- else if (CC8(Buffer)==CC8("Maestro\r")) {Format=__T("RISC OS music file");}
- else if (CC4(Buffer)==CC4("FC14")) {Format=__T("Amiga Future Composer");}
- else if (CC4(Buffer)==CC4("SMOD")) {Format=__T("Amiga Future Composer");}
- else if (CC4(Buffer)==CC4("AON4")) {Format=__T("Amiga Art Of Noise");}
- else if (CC8(Buffer+1)==CC8("MUGICIAN")) {Format=__T("Amiga Mugician");}
- else if (Buffer_Size>=66 && CC8(Buffer+58)==CC8("SIDMON I")) {Format=__T("Amiga Sidmon");}
- else if (CC8(Buffer)==CC8("Synth4.0")) {Format=__T("Amiga Synthesis");}
- else if (CC4(Buffer)==CC4("ARP.")) {Format=__T("Amiga Holy Noise");}
- else if (CC4(Buffer)==CC4("BeEp")) {Format=__T("Amiga JamCracker");}
- else if (CC4(Buffer)==CC4("COSO")) {Format=__T("Amiga Hippel-COSO");}
- else if (CC3(Buffer)==CC3("LSX")) {Format=__T("Amiga LZX");}
- else if (CC4(Buffer)==CC4("MOVI")) {Format=__T("Silicon Graphics movie");}
- else if (CC4(Buffer+10)==CC4("Vivo")) {Format=__T("Vivo");}
- else if (CC4(Buffer+1)==CC4("VRML")) {Format=__T("VRML");}
- else if (CC5(Buffer)==CC5("HVQM4")) {Format=__T("GameCube Movie");}
- else if (CC8(Buffer)==CC8("KW-DIRAC"))
- {
- Accept("Dirac");
-
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "Dirac");
-
- Finish("Dirac");
- return;
- }
- else if (CC5(Buffer)==CC5("ustar")) {Format=__T("Tar archive");}
- //TODO: all archive magic numbers
- else if (CC4(Buffer+1)==CC4("MSCB")) {Format=__T("MS Cabinet");}
- else if (CC4(Buffer)==CC4(".snd")) {Format=__T("SUN Audio");}
- else if (CC4(Buffer)==0x2E736400) {Format=__T("DEC Audio");}
- else if (CC4(Buffer)==CC4("MThd")) {Format=__T("MIDI");}
- else if (CC4(Buffer)==CC4("CTMF")) {Format=__T("CMF");}
- else if (CC3(Buffer)==CC3("SBI")) {Format=__T("SoundBlaster");}
- else if (CC4(Buffer)==CC4("EMOD")) {Format=__T("Ext. MOD");}
- //TODO: Other Sound magic numbers
- else if (CC7(Buffer)==CC7("BLENDER")) {Format=__T("Blender");}
- else if (CC4(Buffer)==CC4("AC10")) {Format=__T("AutoCAD"); ;}
- else if (CC2(Buffer)==0x1F9D) {Format=__T("Compress");}
- else if (CC2(Buffer)==0x1F8B) {Format=__T("GZip");}
- else if (CC2(Buffer)==0x1F1E) {Format=__T("Huffman");}
- else if (CC3(Buffer)==CC3("BZh")) {Format=__T("BZip2");}
- else if (CC2(Buffer)==CC2("BZ")) {Format=__T("BZip1");}
- else if (CC3(Buffer)==CC3("NES")) {Format=__T("NES ROM");}
- else if (Buffer_Size>=0x108 && CC4(Buffer+0x104)==0xCEED6666) {Format=__T("GameBoy");}
- else if (Buffer_Size>=0x104 && CC4(Buffer+0x100)==CC4("SEGA")) {Format=__T("MegaDrive");}
- else if (Buffer_Size>=0x284 && CC4(Buffer+0x280)==CC4("EAGN")) {Format=__T("SupeMegaDrive");}
- else if (Buffer_Size>=0x284 && CC4(Buffer+0x280)==CC4("EAMG")) {Format=__T("SupeMegaDrive");}
- else if (CC4(Buffer)==0x21068028) {Format=__T("Dreamcast");}
- else if (CC4(Buffer)==CC4("LCDi")) {Format=__T("Dreamcast");}
- else if (CC4(Buffer)==0x37804012) {Format=__T("Nintendo64");}
- else if (CC8(Buffer)==CC8("PS-X EXE")) {Format=__T("Playstation");}
- else if (CC4(Buffer)==CC4("LCDi")) {Format=__T("Dreamcast");}
- else if (CC4(Buffer)==CC4("XBEH")) {Format=__T("X-Box");}
- else if (CC4(Buffer)==CC4("XIP0")) {Format=__T("X-Box");}
- else if (CC4(Buffer)==CC4("XTF0")) {Format=__T("X-Box");}
- else if (CC2(Buffer)==0x8008) {Format=__T("Lynx");}
- else if (CC7(Buffer)==CC7("\x01ZZZZZ\x01")) {Format=__T("");}
- else if (CC6(Buffer)==CC6("1\x0A\x0D""00:"))
- {
- Accept("SRT");
-
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Format, "SRT");
-
- Finish("SRT");
- return;
- }
- else if ((CC1(Buffer+0)==CC1("[") && CC1(Buffer+2)==CC1("S") && CC1(Buffer+22)==CC1("o") && CC1(Buffer+24)==CC1("]")) //Unicode Text is : "[Script Info]
- || (CC1(Buffer+2)==CC1("[") && CC1(Buffer+4)==CC1("S") && CC1(Buffer+24)==CC1("o") && CC1(Buffer+26)==CC1("]")))
- {
- Accept("SSA");
-
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Format, "SSA");
-
- Finish("SSA");
- return;
- }
- else if (CC4(Buffer)==CC4("RIFF") && CC4(Buffer+8)==CC4("AMV ")) {Format=__T("AMV");}
- else if (CC4(Buffer)==CC4("RIFF") && CC4(Buffer+8)==CC4("WEBP"))
- {
- Accept("WEBP");
-
- Stream_Prepare(Stream_Image);
- Fill(Stream_Image, 0, Image_Format, "WebP");
-
- Finish("WEBP");
- return;
- }
- else if (CC4(Buffer)==0x414D5697) {Format=__T("MTV");}
- else if (CC6(Buffer)==CC6("Z\0W\0F\0"))
- {
- Accept("ZWF");
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "ZWF");
-
- Finish("ZWF");
- return;
- }
- else if (CC4(Buffer)==0x616A6B67) //"ajkg"
- {
- Accept("Shorten");
-
- Fill(Stream_General, 0, General_Format_Version, CC1(Buffer+4));
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "Shorten");
-
- Finish("Shorten");
- return;
- }
- else if (CC4(Buffer)==0x504C5646) {Format=__T("PlayLater Video");}
- else if (CC4(Buffer)==CC4("")) {Format=__T("");}
-
- if (Format.empty())
- {
- Reject();
- return;
- }
-
- Accept();
-
- Element_Offset=File_Size-(File_Offset+Buffer_Offset);
- Fill(Stream_General, 0, General_Format, Format);
-
- Finish();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_OTHER_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File_Other.h b/src/thirdparty/MediaInfo/MediaInfo/File_Other.h
deleted file mode 100644
index b3632453e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File_Other.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Use magic number to detect only the format
-// Theses formats are not planned to be expanded, this is only to detect
-// well all files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_OtherH
-#define MediaInfo_File_OtherH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Other
-//***************************************************************************
-
-class File_Other : public File__Analyze
-{
-protected :
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File_Unknown.cpp b/src/thirdparty/MediaInfo/MediaInfo/File_Unknown.cpp
deleted file mode 100644
index 7c6c86160..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File_Unknown.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_UNKNOWN_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File_Unknown.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Unknown::Read_Buffer_Init()
-{
- Accept("Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Unknown::Read_Buffer_Continue()
-{
- Element_Offset=File_Size;
- Finish("Unknown");
-}
-
-//***************************************************************************
-//
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_UNKNOWN_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File_Unknown.h b/src/thirdparty/MediaInfo/MediaInfo/File_Unknown.h
deleted file mode 100644
index 29159ef59..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File_Unknown.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Empty container
-// This is only to have a void parser
-// It fill basic fields (filename...) only
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_UnknownH
-#define MediaInfo_File_UnknownH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Unknown
-//***************************************************************************
-
-class File_Unknown : public File__Analyze
-{
-protected :
- //Buffer - Global
- void Read_Buffer_Init ();
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__Analyse_Automatic.h b/src/thirdparty/MediaInfo/MediaInfo/File__Analyse_Automatic.h
deleted file mode 100644
index db0918c07..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__Analyse_Automatic.h
+++ /dev/null
@@ -1,1525 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Automaticly generated methods for MediaInfo
-// Don't modify, this will be deleted at the next automatic update
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File__Analyze_AutomaticH
-#define MediaInfo_File__Analyze_AutomaticH
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-enum generic
-{
- Generic_Format,
- Generic_Format_Info,
- Generic_Format_Url,
- Generic_Format_Commercial,
- Generic_Format_Commercial_IfAny,
- Generic_Format_Version,
- Generic_Format_Profile,
- Generic_Format_Compression,
- Generic_Format_Settings,
- Generic_InternetMediaType,
- Generic_CodecID,
- Generic_CodecID_Info,
- Generic_CodecID_Hint,
- Generic_CodecID_Url,
- Generic_CodecID_Description,
- Generic_Codec,
- Generic_Codec_String,
- Generic_Codec_Info,
- Generic_Codec_Url,
- Generic_Codec_CC,
- Generic_Duration,
- Generic_Duration_String,
- Generic_Duration_String1,
- Generic_Duration_String2,
- Generic_Duration_String3,
- Generic_Duration_String4,
- Generic_Duration_String5,
- Generic_Source_Duration,
- Generic_Source_Duration_String,
- Generic_Source_Duration_String1,
- Generic_Source_Duration_String2,
- Generic_Source_Duration_String3,
- Generic_Source_Duration_String4,
- Generic_Source_Duration_String5,
- Generic_BitRate_Mode,
- Generic_BitRate_Mode_String,
- Generic_BitRate,
- Generic_BitRate_String,
- Generic_BitRate_Minimum,
- Generic_BitRate_Minimum_String,
- Generic_BitRate_Nominal,
- Generic_BitRate_Nominal_String,
- Generic_BitRate_Maximum,
- Generic_BitRate_Maximum_String,
- Generic_BitRate_Encoded,
- Generic_BitRate_Encoded_String,
- Generic_FrameRate,
- Generic_FrameRate_String,
- Generic_FrameCount,
- Generic_Source_FrameCount,
- Generic_ColorSpace,
- Generic_ChromaSubsampling,
- Generic_Resolution,
- Generic_Resolution_String,
- Generic_BitDepth,
- Generic_BitDepth_String,
- Generic_Compression_Mode,
- Generic_Compression_Mode_String,
- Generic_Compression_Ratio,
- Generic_Delay,
- Generic_Delay_String,
- Generic_Delay_String1,
- Generic_Delay_String2,
- Generic_Delay_String3,
- Generic_Delay_String4,
- Generic_Delay_String5,
- Generic_Delay_Settings,
- Generic_Delay_DropFrame,
- Generic_Delay_Source,
- Generic_Delay_Source_String,
- Generic_Delay_Original,
- Generic_Delay_Original_String,
- Generic_Delay_Original_String1,
- Generic_Delay_Original_String2,
- Generic_Delay_Original_String3,
- Generic_Delay_Original_String4,
- Generic_Delay_Original_String5,
- Generic_Delay_Original_Settings,
- Generic_Delay_Original_DropFrame,
- Generic_Delay_Original_Source,
- Generic_Video_Delay,
- Generic_Video_Delay_String,
- Generic_Video_Delay_String1,
- Generic_Video_Delay_String2,
- Generic_Video_Delay_String3,
- Generic_Video_Delay_String4,
- Generic_Video_Delay_String5,
- Generic_StreamSize,
- Generic_StreamSize_String,
- Generic_StreamSize_String1,
- Generic_StreamSize_String2,
- Generic_StreamSize_String3,
- Generic_StreamSize_String4,
- Generic_StreamSize_String5,
- Generic_StreamSize_Proportion,
- Generic_Source_StreamSize,
- Generic_Source_StreamSize_String,
- Generic_Source_StreamSize_String1,
- Generic_Source_StreamSize_String2,
- Generic_Source_StreamSize_String3,
- Generic_Source_StreamSize_String4,
- Generic_Source_StreamSize_String5,
- Generic_Source_StreamSize_Proportion,
- Generic_StreamSize_Encoded,
- Generic_StreamSize_Encoded_String,
- Generic_StreamSize_Encoded_String1,
- Generic_StreamSize_Encoded_String2,
- Generic_StreamSize_Encoded_String3,
- Generic_StreamSize_Encoded_String4,
- Generic_StreamSize_Encoded_String5,
- Generic_StreamSize_Encoded_Proportion,
- Generic_Source_StreamSize_Encoded,
- Generic_Source_StreamSize_Encoded_String,
- Generic_Source_StreamSize_Encoded_String1,
- Generic_Source_StreamSize_Encoded_String2,
- Generic_Source_StreamSize_Encoded_String3,
- Generic_Source_StreamSize_Encoded_String4,
- Generic_Source_StreamSize_Encoded_String5,
- Generic_Source_StreamSize_Encoded_Proportion,
- Generic_Language,
- Generic_ServiceName,
- Generic_ServiceProvider,
-};
-
-//---------------------------------------------------------------------------
-enum general
-{
- General_Count,
- General_Status,
- General_StreamCount,
- General_StreamKind,
- General_StreamKind_String,
- General_StreamKindID,
- General_StreamKindPos,
- General_StreamOrder,
- General_FirstPacketOrder,
- General_Inform,
- General_ID,
- General_ID_String,
- General_UniqueID,
- General_UniqueID_String,
- General_MenuID,
- General_MenuID_String,
- General_GeneralCount,
- General_VideoCount,
- General_AudioCount,
- General_TextCount,
- General_OtherCount,
- General_ImageCount,
- General_MenuCount,
- General_Video_Format_List,
- General_Video_Format_WithHint_List,
- General_Video_Codec_List,
- General_Video_Language_List,
- General_Audio_Format_List,
- General_Audio_Format_WithHint_List,
- General_Audio_Codec_List,
- General_Audio_Language_List,
- General_Text_Format_List,
- General_Text_Format_WithHint_List,
- General_Text_Codec_List,
- General_Text_Language_List,
- General_Other_Format_List,
- General_Other_Format_WithHint_List,
- General_Other_Codec_List,
- General_Other_Language_List,
- General_Image_Format_List,
- General_Image_Format_WithHint_List,
- General_Image_Codec_List,
- General_Image_Language_List,
- General_Menu_Format_List,
- General_Menu_Format_WithHint_List,
- General_Menu_Codec_List,
- General_Menu_Language_List,
- General_CompleteName,
- General_FolderName,
- General_FileName,
- General_FileExtension,
- General_CompleteName_Last,
- General_FolderName_Last,
- General_FileName_Last,
- General_FileExtension_Last,
- General_Format,
- General_Format_String,
- General_Format_Info,
- General_Format_Url,
- General_Format_Extensions,
- General_Format_Commercial,
- General_Format_Commercial_IfAny,
- General_Format_Version,
- General_Format_Profile,
- General_Format_Compression,
- General_Format_Settings,
- General_InternetMediaType,
- General_CodecID,
- General_CodecID_String,
- General_CodecID_Info,
- General_CodecID_Hint,
- General_CodecID_Url,
- General_CodecID_Description,
- General_Interleaved,
- General_Codec,
- General_Codec_String,
- General_Codec_Info,
- General_Codec_Url,
- General_Codec_Extensions,
- General_Codec_Settings,
- General_Codec_Settings_Automatic,
- General_FileSize,
- General_FileSize_String,
- General_FileSize_String1,
- General_FileSize_String2,
- General_FileSize_String3,
- General_FileSize_String4,
- General_Duration,
- General_Duration_String,
- General_Duration_String1,
- General_Duration_String2,
- General_Duration_String3,
- General_Duration_String4,
- General_Duration_String5,
- General_Duration_Start,
- General_Duration_End,
- General_OverallBitRate_Mode,
- General_OverallBitRate_Mode_String,
- General_OverallBitRate,
- General_OverallBitRate_String,
- General_OverallBitRate_Minimum,
- General_OverallBitRate_Minimum_String,
- General_OverallBitRate_Nominal,
- General_OverallBitRate_Nominal_String,
- General_OverallBitRate_Maximum,
- General_OverallBitRate_Maximum_String,
- General_FrameRate,
- General_FrameRate_String,
- General_FrameCount,
- General_Delay,
- General_Delay_String,
- General_Delay_String1,
- General_Delay_String2,
- General_Delay_String3,
- General_Delay_String4,
- General_Delay_String5,
- General_Delay_Settings,
- General_Delay_DropFrame,
- General_Delay_Source,
- General_Delay_Source_String,
- General_StreamSize,
- General_StreamSize_String,
- General_StreamSize_String1,
- General_StreamSize_String2,
- General_StreamSize_String3,
- General_StreamSize_String4,
- General_StreamSize_String5,
- General_StreamSize_Proportion,
- General_HeaderSize,
- General_DataSize,
- General_FooterSize,
- General_IsStreamable,
- General_Album_ReplayGain_Gain,
- General_Album_ReplayGain_Gain_String,
- General_Album_ReplayGain_Peak,
- General_Encryption,
- General_Encryption_Format,
- General_Encryption_Length,
- General_Encryption_Method,
- General_Encryption_Mode,
- General_Encryption_Padding,
- General_Encryption_InitializationVector,
- General_Title,
- General_Title_More,
- General_Title_Url,
- General_Domain,
- General_Collection,
- General_Season,
- General_Season_Position,
- General_Season_Position_Total,
- General_Movie,
- General_Movie_More,
- General_Movie_Country,
- General_Movie_Url,
- General_Album,
- General_Album_More,
- General_Album_Sort,
- General_Album_Performer,
- General_Album_Performer_Sort,
- General_Album_Performer_Url,
- General_Comic,
- General_Comic_More,
- General_Comic_Position_Total,
- General_Part,
- General_Part_Position,
- General_Part_Position_Total,
- General_Track,
- General_Track_More,
- General_Track_Url,
- General_Track_Sort,
- General_Track_Position,
- General_Track_Position_Total,
- General_Grouping,
- General_Chapter,
- General_SubTrack,
- General_Original_Album,
- General_Original_Movie,
- General_Original_Part,
- General_Original_Track,
- General_Compilation,
- General_Compilation_String,
- General_Performer,
- General_Performer_Sort,
- General_Performer_Url,
- General_Original_Performer,
- General_Accompaniment,
- General_Composer,
- General_Composer_Nationality,
- General_Arranger,
- General_Lyricist,
- General_Original_Lyricist,
- General_Conductor,
- General_Director,
- General_CoDirector,
- General_AssistantDirector,
- General_DirectorOfPhotography,
- General_SoundEngineer,
- General_ArtDirector,
- General_ProductionDesigner,
- General_Choregrapher,
- General_CostumeDesigner,
- General_Actor,
- General_Actor_Character,
- General_WrittenBy,
- General_ScreenplayBy,
- General_EditedBy,
- General_CommissionedBy,
- General_Producer,
- General_CoProducer,
- General_ExecutiveProducer,
- General_MusicBy,
- General_DistributedBy,
- General_OriginalSourceForm_DistributedBy,
- General_MasteredBy,
- General_EncodedBy,
- General_RemixedBy,
- General_ProductionStudio,
- General_ThanksTo,
- General_Publisher,
- General_Publisher_URL,
- General_Label,
- General_Genre,
- General_Mood,
- General_ContentType,
- General_Subject,
- General_Description,
- General_Keywords,
- General_Summary,
- General_Synopsis,
- General_Period,
- General_LawRating,
- General_LawRating_Reason,
- General_ICRA,
- General_Released_Date,
- General_Original_Released_Date,
- General_Recorded_Date,
- General_Encoded_Date,
- General_Tagged_Date,
- General_Written_Date,
- General_Mastered_Date,
- General_File_Created_Date,
- General_File_Created_Date_Local,
- General_File_Modified_Date,
- General_File_Modified_Date_Local,
- General_Recorded_Location,
- General_Written_Location,
- General_Archival_Location,
- General_Encoded_Application,
- General_Encoded_Application_String,
- General_Encoded_Application_CompanyName,
- General_Encoded_Application_Name,
- General_Encoded_Application_Version,
- General_Encoded_Application_Url,
- General_Encoded_Library,
- General_Encoded_Library_String,
- General_Encoded_Library_CompanyName,
- General_Encoded_Library_Name,
- General_Encoded_Library_Version,
- General_Encoded_Library_Date,
- General_Encoded_Library_Settings,
- General_Encoded_OperatingSystem,
- General_Cropped,
- General_Dimensions,
- General_DotsPerInch,
- General_Lightness,
- General_OriginalSourceMedium,
- General_OriginalSourceForm,
- General_OriginalSourceForm_NumColors,
- General_OriginalSourceForm_Name,
- General_OriginalSourceForm_Cropped,
- General_OriginalSourceForm_Sharpness,
- General_Tagged_Application,
- General_BPM,
- General_ISRC,
- General_ISBN,
- General_BarCode,
- General_LCCN,
- General_CatalogNumber,
- General_LabelCode,
- General_Owner,
- General_Copyright,
- General_Copyright_Url,
- General_Producer_Copyright,
- General_TermsOfUse,
- General_ServiceName,
- General_ServiceChannel,
- General_Service_Url,
- General_ServiceProvider,
- General_ServiceProviderr_Url,
- General_ServiceType,
- General_NetworkName,
- General_OriginalNetworkName,
- General_Country,
- General_TimeZone,
- General_Cover,
- General_Cover_Description,
- General_Cover_Type,
- General_Cover_Mime,
- General_Cover_Data,
- General_Lyrics,
- General_Comment,
- General_Rating,
- General_Added_Date,
- General_Played_First_Date,
- General_Played_Last_Date,
- General_Played_Count,
- General_EPG_Positions_Begin,
- General_EPG_Positions_End,
-};
-
-//---------------------------------------------------------------------------
-enum video
-{
- Video_Count,
- Video_Status,
- Video_StreamCount,
- Video_StreamKind,
- Video_StreamKind_String,
- Video_StreamKindID,
- Video_StreamKindPos,
- Video_StreamOrder,
- Video_FirstPacketOrder,
- Video_Inform,
- Video_ID,
- Video_ID_String,
- Video_UniqueID,
- Video_UniqueID_String,
- Video_MenuID,
- Video_MenuID_String,
- Video_Format,
- Video_Format_Info,
- Video_Format_Url,
- Video_Format_Commercial,
- Video_Format_Commercial_IfAny,
- Video_Format_Version,
- Video_Format_Profile,
- Video_Format_Compression,
- Video_MultiView_BaseProfile,
- Video_MultiView_Count,
- Video_MultiView_Layout,
- Video_Format_Settings,
- Video_Format_Settings_BVOP,
- Video_Format_Settings_BVOP_String,
- Video_Format_Settings_QPel,
- Video_Format_Settings_QPel_String,
- Video_Format_Settings_GMC,
- Video_Format_Settings_GMC_String,
- Video_Format_Settings_Matrix,
- Video_Format_Settings_Matrix_String,
- Video_Format_Settings_Matrix_Data,
- Video_Format_Settings_CABAC,
- Video_Format_Settings_CABAC_String,
- Video_Format_Settings_RefFrames,
- Video_Format_Settings_RefFrames_String,
- Video_Format_Settings_Pulldown,
- Video_Format_Settings_FrameMode,
- Video_Format_Settings_GOP,
- Video_Format_Settings_PictureStructure,
- Video_Format_Settings_Wrapping,
- Video_InternetMediaType,
- Video_MuxingMode,
- Video_CodecID,
- Video_CodecID_String,
- Video_CodecID_Info,
- Video_CodecID_Hint,
- Video_CodecID_Url,
- Video_CodecID_Description,
- Video_Codec,
- Video_Codec_String,
- Video_Codec_Family,
- Video_Codec_Info,
- Video_Codec_Url,
- Video_Codec_CC,
- Video_Codec_Profile,
- Video_Codec_Description,
- Video_Codec_Settings,
- Video_Codec_Settings_PacketBitStream,
- Video_Codec_Settings_BVOP,
- Video_Codec_Settings_QPel,
- Video_Codec_Settings_GMC,
- Video_Codec_Settings_GMC_String,
- Video_Codec_Settings_Matrix,
- Video_Codec_Settings_Matrix_Data,
- Video_Codec_Settings_CABAC,
- Video_Codec_Settings_RefFrames,
- Video_Duration,
- Video_Duration_String,
- Video_Duration_String1,
- Video_Duration_String2,
- Video_Duration_String3,
- Video_Duration_String4,
- Video_Duration_String5,
- Video_Duration_FirstFrame,
- Video_Duration_FirstFrame_String,
- Video_Duration_FirstFrame_String1,
- Video_Duration_FirstFrame_String2,
- Video_Duration_FirstFrame_String3,
- Video_Duration_FirstFrame_String4,
- Video_Duration_FirstFrame_String5,
- Video_Duration_LastFrame,
- Video_Duration_LastFrame_String,
- Video_Duration_LastFrame_String1,
- Video_Duration_LastFrame_String2,
- Video_Duration_LastFrame_String3,
- Video_Duration_LastFrame_String4,
- Video_Duration_LastFrame_String5,
- Video_Source_Duration,
- Video_Source_Duration_String,
- Video_Source_Duration_String1,
- Video_Source_Duration_String2,
- Video_Source_Duration_String3,
- Video_Source_Duration_String4,
- Video_Source_Duration_String5,
- Video_Source_Duration_FirstFrame,
- Video_Source_Duration_FirstFrame_String,
- Video_Source_Duration_FirstFrame_String1,
- Video_Source_Duration_FirstFrame_String2,
- Video_Source_Duration_FirstFrame_String3,
- Video_Source_Duration_FirstFrame_String4,
- Video_Source_Duration_FirstFrame_String5,
- Video_Source_Duration_LastFrame,
- Video_Source_Duration_LastFrame_String,
- Video_Source_Duration_LastFrame_String1,
- Video_Source_Duration_LastFrame_String2,
- Video_Source_Duration_LastFrame_String3,
- Video_Source_Duration_LastFrame_String4,
- Video_Source_Duration_LastFrame_String5,
- Video_BitRate_Mode,
- Video_BitRate_Mode_String,
- Video_BitRate,
- Video_BitRate_String,
- Video_BitRate_Minimum,
- Video_BitRate_Minimum_String,
- Video_BitRate_Nominal,
- Video_BitRate_Nominal_String,
- Video_BitRate_Maximum,
- Video_BitRate_Maximum_String,
- Video_BitRate_Encoded,
- Video_BitRate_Encoded_String,
- Video_Width,
- Video_Width_String,
- Video_Width_Offset,
- Video_Width_Offset_String,
- Video_Width_Original,
- Video_Width_Original_String,
- Video_Width_CleanAperture,
- Video_Width_CleanAperture_String,
- Video_Height,
- Video_Height_String,
- Video_Height_Offset,
- Video_Height_Offset_String,
- Video_Height_Original,
- Video_Height_Original_String,
- Video_Height_CleanAperture,
- Video_Height_CleanAperture_String,
- Video_PixelAspectRatio,
- Video_PixelAspectRatio_String,
- Video_PixelAspectRatio_Original,
- Video_PixelAspectRatio_Original_String,
- Video_PixelAspectRatio_CleanAperture,
- Video_PixelAspectRatio_CleanAperture_String,
- Video_DisplayAspectRatio,
- Video_DisplayAspectRatio_String,
- Video_DisplayAspectRatio_Original,
- Video_DisplayAspectRatio_Original_String,
- Video_DisplayAspectRatio_CleanAperture,
- Video_DisplayAspectRatio_CleanAperture_String,
- Video_ActiveFormatDescription,
- Video_ActiveFormatDescription_String,
- Video_ActiveFormatDescription_MuxingMode,
- Video_Rotation,
- Video_Rotation_String,
- Video_FrameRate_Mode,
- Video_FrameRate_Mode_String,
- Video_FrameRate_Mode_Original,
- Video_FrameRate_Mode_Original_String,
- Video_FrameRate,
- Video_FrameRate_String,
- Video_FrameRate_Original,
- Video_FrameRate_Original_String,
- Video_FrameRate_Minimum,
- Video_FrameRate_Minimum_String,
- Video_FrameRate_Nominal,
- Video_FrameRate_Nominal_String,
- Video_FrameRate_Maximum,
- Video_FrameRate_Maximum_String,
- Video_FrameCount,
- Video_Source_FrameCount,
- Video_Standard,
- Video_Resolution,
- Video_Resolution_String,
- Video_Colorimetry,
- Video_ColorSpace,
- Video_ChromaSubsampling,
- Video_BitDepth,
- Video_BitDepth_String,
- Video_ScanType,
- Video_ScanType_String,
- Video_ScanType_Original,
- Video_ScanType_Original_String,
- Video_ScanType_StoreMethod,
- Video_ScanType_StoreMethod_FieldsPerBlock,
- Video_ScanType_StoreMethod_String,
- Video_ScanOrder,
- Video_ScanOrder_String,
- Video_ScanOrder_Stored,
- Video_ScanOrder_Stored_String,
- Video_ScanOrder_StoredDisplayedInverted,
- Video_ScanOrder_Original,
- Video_ScanOrder_Original_String,
- Video_Interlacement,
- Video_Interlacement_String,
- Video_Compression_Mode,
- Video_Compression_Mode_String,
- Video_Compression_Ratio,
- Video_Bits__Pixel_Frame_,
- Video_Delay,
- Video_Delay_String,
- Video_Delay_String1,
- Video_Delay_String2,
- Video_Delay_String3,
- Video_Delay_String4,
- Video_Delay_String5,
- Video_Delay_Settings,
- Video_Delay_DropFrame,
- Video_Delay_Source,
- Video_Delay_Source_String,
- Video_Delay_Original,
- Video_Delay_Original_String,
- Video_Delay_Original_String1,
- Video_Delay_Original_String2,
- Video_Delay_Original_String3,
- Video_Delay_Original_String4,
- Video_Delay_Original_String5,
- Video_Delay_Original_Settings,
- Video_Delay_Original_DropFrame,
- Video_Delay_Original_Source,
- Video_TimeStamp_FirstFrame,
- Video_TimeStamp_FirstFrame_String,
- Video_TimeStamp_FirstFrame_String1,
- Video_TimeStamp_FirstFrame_String2,
- Video_TimeStamp_FirstFrame_String3,
- Video_TimeStamp_FirstFrame_String4,
- Video_TimeStamp_FirstFrame_String5,
- Video_TimeCode_FirstFrame,
- Video_TimeCode_Settings,
- Video_TimeCode_Source,
- Video_Gop_OpenClosed,
- Video_Gop_OpenClosed_String,
- Video_Gop_OpenClosed_FirstFrame,
- Video_Gop_OpenClosed_FirstFrame_String,
- Video_StreamSize,
- Video_StreamSize_String,
- Video_StreamSize_String1,
- Video_StreamSize_String2,
- Video_StreamSize_String3,
- Video_StreamSize_String4,
- Video_StreamSize_String5,
- Video_StreamSize_Proportion,
- Video_Source_StreamSize,
- Video_Source_StreamSize_String,
- Video_Source_StreamSize_String1,
- Video_Source_StreamSize_String2,
- Video_Source_StreamSize_String3,
- Video_Source_StreamSize_String4,
- Video_Source_StreamSize_String5,
- Video_Source_StreamSize_Proportion,
- Video_StreamSize_Encoded,
- Video_StreamSize_Encoded_String,
- Video_StreamSize_Encoded_String1,
- Video_StreamSize_Encoded_String2,
- Video_StreamSize_Encoded_String3,
- Video_StreamSize_Encoded_String4,
- Video_StreamSize_Encoded_String5,
- Video_StreamSize_Encoded_Proportion,
- Video_Source_StreamSize_Encoded,
- Video_Source_StreamSize_Encoded_String,
- Video_Source_StreamSize_Encoded_String1,
- Video_Source_StreamSize_Encoded_String2,
- Video_Source_StreamSize_Encoded_String3,
- Video_Source_StreamSize_Encoded_String4,
- Video_Source_StreamSize_Encoded_String5,
- Video_Source_StreamSize_Encoded_Proportion,
- Video_Alignment,
- Video_Alignment_String,
- Video_Title,
- Video_Encoded_Application,
- Video_Encoded_Application_String,
- Video_Encoded_Application_CompanyName,
- Video_Encoded_Application_Name,
- Video_Encoded_Application_Version,
- Video_Encoded_Application_Url,
- Video_Encoded_Library,
- Video_Encoded_Library_String,
- Video_Encoded_Library_CompanyName,
- Video_Encoded_Library_Name,
- Video_Encoded_Library_Version,
- Video_Encoded_Library_Date,
- Video_Encoded_Library_Settings,
- Video_Encoded_OperatingSystem,
- Video_Language,
- Video_Language_String,
- Video_Language_String1,
- Video_Language_String2,
- Video_Language_String3,
- Video_Language_String4,
- Video_Language_More,
- Video_Default,
- Video_Default_String,
- Video_Forced,
- Video_Forced_String,
- Video_Encoded_Date,
- Video_Tagged_Date,
- Video_Encryption,
- Video_BufferSize,
- Video_colour_range,
- Video_colour_description_present,
- Video_colour_primaries,
- Video_transfer_characteristics,
- Video_matrix_coefficients,
- Video_colour_description_present_Original,
- Video_colour_primaries_Original,
- Video_transfer_characteristics_Original,
- Video_matrix_coefficients_Original,
-};
-
-//---------------------------------------------------------------------------
-enum audio
-{
- Audio_Count,
- Audio_Status,
- Audio_StreamCount,
- Audio_StreamKind,
- Audio_StreamKind_String,
- Audio_StreamKindID,
- Audio_StreamKindPos,
- Audio_StreamOrder,
- Audio_FirstPacketOrder,
- Audio_Inform,
- Audio_ID,
- Audio_ID_String,
- Audio_UniqueID,
- Audio_UniqueID_String,
- Audio_MenuID,
- Audio_MenuID_String,
- Audio_Format,
- Audio_Format_Info,
- Audio_Format_Url,
- Audio_Format_Commercial,
- Audio_Format_Commercial_IfAny,
- Audio_Format_Version,
- Audio_Format_Profile,
- Audio_Format_Compression,
- Audio_Format_Settings,
- Audio_Format_Settings_SBR,
- Audio_Format_Settings_SBR_String,
- Audio_Format_Settings_PS,
- Audio_Format_Settings_PS_String,
- Audio_Format_Settings_Mode,
- Audio_Format_Settings_ModeExtension,
- Audio_Format_Settings_Emphasis,
- Audio_Format_Settings_Floor,
- Audio_Format_Settings_Firm,
- Audio_Format_Settings_Endianness,
- Audio_Format_Settings_Sign,
- Audio_Format_Settings_Law,
- Audio_Format_Settings_ITU,
- Audio_Format_Settings_Wrapping,
- Audio_Matrix_Format,
- Audio_InternetMediaType,
- Audio_MuxingMode,
- Audio_MuxingMode_MoreInfo,
- Audio_CodecID,
- Audio_CodecID_String,
- Audio_CodecID_Info,
- Audio_CodecID_Hint,
- Audio_CodecID_Url,
- Audio_CodecID_Description,
- Audio_Codec,
- Audio_Codec_String,
- Audio_Codec_Family,
- Audio_Codec_Info,
- Audio_Codec_Url,
- Audio_Codec_CC,
- Audio_Codec_Description,
- Audio_Codec_Profile,
- Audio_Codec_Settings,
- Audio_Codec_Settings_Automatic,
- Audio_Codec_Settings_Floor,
- Audio_Codec_Settings_Firm,
- Audio_Codec_Settings_Endianness,
- Audio_Codec_Settings_Sign,
- Audio_Codec_Settings_Law,
- Audio_Codec_Settings_ITU,
- Audio_Duration,
- Audio_Duration_String,
- Audio_Duration_String1,
- Audio_Duration_String2,
- Audio_Duration_String3,
- Audio_Duration_String4,
- Audio_Duration_String5,
- Audio_Duration_FirstFrame,
- Audio_Duration_FirstFrame_String,
- Audio_Duration_FirstFrame_String1,
- Audio_Duration_FirstFrame_String2,
- Audio_Duration_FirstFrame_String3,
- Audio_Duration_FirstFrame_String4,
- Audio_Duration_FirstFrame_String5,
- Audio_Duration_LastFrame,
- Audio_Duration_LastFrame_String,
- Audio_Duration_LastFrame_String1,
- Audio_Duration_LastFrame_String2,
- Audio_Duration_LastFrame_String3,
- Audio_Duration_LastFrame_String4,
- Audio_Duration_LastFrame_String5,
- Audio_Source_Duration,
- Audio_Source_Duration_String,
- Audio_Source_Duration_String1,
- Audio_Source_Duration_String2,
- Audio_Source_Duration_String3,
- Audio_Source_Duration_String4,
- Audio_Source_Duration_String5,
- Audio_Source_Duration_FirstFrame,
- Audio_Source_Duration_FirstFrame_String,
- Audio_Source_Duration_FirstFrame_String1,
- Audio_Source_Duration_FirstFrame_String2,
- Audio_Source_Duration_FirstFrame_String3,
- Audio_Source_Duration_FirstFrame_String4,
- Audio_Source_Duration_FirstFrame_String5,
- Audio_Source_Duration_LastFrame,
- Audio_Source_Duration_LastFrame_String,
- Audio_Source_Duration_LastFrame_String1,
- Audio_Source_Duration_LastFrame_String2,
- Audio_Source_Duration_LastFrame_String3,
- Audio_Source_Duration_LastFrame_String4,
- Audio_Source_Duration_LastFrame_String5,
- Audio_BitRate_Mode,
- Audio_BitRate_Mode_String,
- Audio_BitRate,
- Audio_BitRate_String,
- Audio_BitRate_Minimum,
- Audio_BitRate_Minimum_String,
- Audio_BitRate_Nominal,
- Audio_BitRate_Nominal_String,
- Audio_BitRate_Maximum,
- Audio_BitRate_Maximum_String,
- Audio_BitRate_Encoded,
- Audio_BitRate_Encoded_String,
- Audio_Channel_s_,
- Audio_Channel_s__String,
- Audio_Channel_s__Original,
- Audio_Channel_s__Original_String,
- Audio_Matrix_Channel_s_,
- Audio_Matrix_Channel_s__String,
- Audio_ChannelPositions,
- Audio_ChannelPositions_String2,
- Audio_Matrix_ChannelPositions,
- Audio_Matrix_ChannelPositions_String2,
- Audio_ChannelLayout,
- Audio_ChannelLayoutID,
- Audio_SamplingRate,
- Audio_SamplingRate_String,
- Audio_SamplingCount,
- Audio_Source_SamplingCount,
- Audio_FrameRate,
- Audio_FrameRate_String,
- Audio_FrameCount,
- Audio_Source_FrameCount,
- Audio_Resolution,
- Audio_Resolution_String,
- Audio_BitDepth,
- Audio_BitDepth_String,
- Audio_BitDepth_Stored,
- Audio_BitDepth_Stored_String,
- Audio_Compression_Mode,
- Audio_Compression_Mode_String,
- Audio_Compression_Ratio,
- Audio_Delay,
- Audio_Delay_String,
- Audio_Delay_String1,
- Audio_Delay_String2,
- Audio_Delay_String3,
- Audio_Delay_String4,
- Audio_Delay_String5,
- Audio_Delay_Settings,
- Audio_Delay_DropFrame,
- Audio_Delay_Source,
- Audio_Delay_Source_String,
- Audio_Delay_Original,
- Audio_Delay_Original_String,
- Audio_Delay_Original_String1,
- Audio_Delay_Original_String2,
- Audio_Delay_Original_String3,
- Audio_Delay_Original_String4,
- Audio_Delay_Original_String5,
- Audio_Delay_Original_Settings,
- Audio_Delay_Original_DropFrame,
- Audio_Delay_Original_Source,
- Audio_Video_Delay,
- Audio_Video_Delay_String,
- Audio_Video_Delay_String1,
- Audio_Video_Delay_String2,
- Audio_Video_Delay_String3,
- Audio_Video_Delay_String4,
- Audio_Video_Delay_String5,
- Audio_Video0_Delay,
- Audio_Video0_Delay_String,
- Audio_Video0_Delay_String1,
- Audio_Video0_Delay_String2,
- Audio_Video0_Delay_String3,
- Audio_Video0_Delay_String4,
- Audio_Video0_Delay_String5,
- Audio_ReplayGain_Gain,
- Audio_ReplayGain_Gain_String,
- Audio_ReplayGain_Peak,
- Audio_StreamSize,
- Audio_StreamSize_String,
- Audio_StreamSize_String1,
- Audio_StreamSize_String2,
- Audio_StreamSize_String3,
- Audio_StreamSize_String4,
- Audio_StreamSize_String5,
- Audio_StreamSize_Proportion,
- Audio_Source_StreamSize,
- Audio_Source_StreamSize_String,
- Audio_Source_StreamSize_String1,
- Audio_Source_StreamSize_String2,
- Audio_Source_StreamSize_String3,
- Audio_Source_StreamSize_String4,
- Audio_Source_StreamSize_String5,
- Audio_Source_StreamSize_Proportion,
- Audio_StreamSize_Encoded,
- Audio_StreamSize_Encoded_String,
- Audio_StreamSize_Encoded_String1,
- Audio_StreamSize_Encoded_String2,
- Audio_StreamSize_Encoded_String3,
- Audio_StreamSize_Encoded_String4,
- Audio_StreamSize_Encoded_String5,
- Audio_StreamSize_Encoded_Proportion,
- Audio_Source_StreamSize_Encoded,
- Audio_Source_StreamSize_Encoded_String,
- Audio_Source_StreamSize_Encoded_String1,
- Audio_Source_StreamSize_Encoded_String2,
- Audio_Source_StreamSize_Encoded_String3,
- Audio_Source_StreamSize_Encoded_String4,
- Audio_Source_StreamSize_Encoded_String5,
- Audio_Source_StreamSize_Encoded_Proportion,
- Audio_Alignment,
- Audio_Alignment_String,
- Audio_Interleave_VideoFrames,
- Audio_Interleave_Duration,
- Audio_Interleave_Duration_String,
- Audio_Interleave_Preload,
- Audio_Interleave_Preload_String,
- Audio_Title,
- Audio_Encoded_Application,
- Audio_Encoded_Application_String,
- Audio_Encoded_Application_CompanyName,
- Audio_Encoded_Application_Name,
- Audio_Encoded_Application_Version,
- Audio_Encoded_Application_Url,
- Audio_Encoded_Library,
- Audio_Encoded_Library_String,
- Audio_Encoded_Library_CompanyName,
- Audio_Encoded_Library_Name,
- Audio_Encoded_Library_Version,
- Audio_Encoded_Library_Date,
- Audio_Encoded_Library_Settings,
- Audio_Encoded_OperatingSystem,
- Audio_Language,
- Audio_Language_String,
- Audio_Language_String1,
- Audio_Language_String2,
- Audio_Language_String3,
- Audio_Language_String4,
- Audio_Language_More,
- Audio_Default,
- Audio_Default_String,
- Audio_Forced,
- Audio_Forced_String,
- Audio_Encoded_Date,
- Audio_Tagged_Date,
- Audio_Encryption,
-};
-
-//---------------------------------------------------------------------------
-enum text
-{
- Text_Count,
- Text_Status,
- Text_StreamCount,
- Text_StreamKind,
- Text_StreamKind_String,
- Text_StreamKindID,
- Text_StreamKindPos,
- Text_StreamOrder,
- Text_FirstPacketOrder,
- Text_Inform,
- Text_ID,
- Text_ID_String,
- Text_UniqueID,
- Text_UniqueID_String,
- Text_MenuID,
- Text_MenuID_String,
- Text_Format,
- Text_Format_Info,
- Text_Format_Url,
- Text_Format_Commercial,
- Text_Format_Commercial_IfAny,
- Text_Format_Version,
- Text_Format_Profile,
- Text_Format_Compression,
- Text_Format_Settings,
- Text_Format_Settings_Wrapping,
- Text_InternetMediaType,
- Text_MuxingMode,
- Text_MuxingMode_MoreInfo,
- Text_CodecID,
- Text_CodecID_String,
- Text_CodecID_Info,
- Text_CodecID_Hint,
- Text_CodecID_Url,
- Text_CodecID_Description,
- Text_Codec,
- Text_Codec_String,
- Text_Codec_Info,
- Text_Codec_Url,
- Text_Codec_CC,
- Text_Duration,
- Text_Duration_String,
- Text_Duration_String1,
- Text_Duration_String2,
- Text_Duration_String3,
- Text_Duration_String4,
- Text_Duration_String5,
- Text_Duration_FirstFrame,
- Text_Duration_FirstFrame_String,
- Text_Duration_FirstFrame_String1,
- Text_Duration_FirstFrame_String2,
- Text_Duration_FirstFrame_String3,
- Text_Duration_FirstFrame_String4,
- Text_Duration_FirstFrame_String5,
- Text_Duration_LastFrame,
- Text_Duration_LastFrame_String,
- Text_Duration_LastFrame_String1,
- Text_Duration_LastFrame_String2,
- Text_Duration_LastFrame_String3,
- Text_Duration_LastFrame_String4,
- Text_Duration_LastFrame_String5,
- Text_Source_Duration,
- Text_Source_Duration_String,
- Text_Source_Duration_String1,
- Text_Source_Duration_String2,
- Text_Source_Duration_String3,
- Text_Source_Duration_String4,
- Text_Source_Duration_String5,
- Text_Source_Duration_FirstFrame,
- Text_Source_Duration_FirstFrame_String,
- Text_Source_Duration_FirstFrame_String1,
- Text_Source_Duration_FirstFrame_String2,
- Text_Source_Duration_FirstFrame_String3,
- Text_Source_Duration_FirstFrame_String4,
- Text_Source_Duration_FirstFrame_String5,
- Text_Source_Duration_LastFrame,
- Text_Source_Duration_LastFrame_String,
- Text_Source_Duration_LastFrame_String1,
- Text_Source_Duration_LastFrame_String2,
- Text_Source_Duration_LastFrame_String3,
- Text_Source_Duration_LastFrame_String4,
- Text_Source_Duration_LastFrame_String5,
- Text_BitRate_Mode,
- Text_BitRate_Mode_String,
- Text_BitRate,
- Text_BitRate_String,
- Text_BitRate_Minimum,
- Text_BitRate_Minimum_String,
- Text_BitRate_Nominal,
- Text_BitRate_Nominal_String,
- Text_BitRate_Maximum,
- Text_BitRate_Maximum_String,
- Text_BitRate_Encoded,
- Text_BitRate_Encoded_String,
- Text_Width,
- Text_Width_String,
- Text_Height,
- Text_Height_String,
- Text_FrameRate_Mode,
- Text_FrameRate_Mode_String,
- Text_FrameRate,
- Text_FrameRate_String,
- Text_FrameRate_Minimum,
- Text_FrameRate_Minimum_String,
- Text_FrameRate_Nominal,
- Text_FrameRate_Nominal_String,
- Text_FrameRate_Maximum,
- Text_FrameRate_Maximum_String,
- Text_FrameRate_Original,
- Text_FrameRate_Original_String,
- Text_FrameCount,
- Text_Source_FrameCount,
- Text_ColorSpace,
- Text_ChromaSubsampling,
- Text_Resolution,
- Text_Resolution_String,
- Text_BitDepth,
- Text_BitDepth_String,
- Text_Compression_Mode,
- Text_Compression_Mode_String,
- Text_Compression_Ratio,
- Text_Delay,
- Text_Delay_String,
- Text_Delay_String1,
- Text_Delay_String2,
- Text_Delay_String3,
- Text_Delay_String4,
- Text_Delay_String5,
- Text_Delay_Settings,
- Text_Delay_DropFrame,
- Text_Delay_Source,
- Text_Delay_Source_String,
- Text_Delay_Original,
- Text_Delay_Original_String,
- Text_Delay_Original_String1,
- Text_Delay_Original_String2,
- Text_Delay_Original_String3,
- Text_Delay_Original_String4,
- Text_Delay_Original_String5,
- Text_Delay_Original_Settings,
- Text_Delay_Original_DropFrame,
- Text_Delay_Original_Source,
- Text_Video_Delay,
- Text_Video_Delay_String,
- Text_Video_Delay_String1,
- Text_Video_Delay_String2,
- Text_Video_Delay_String3,
- Text_Video_Delay_String4,
- Text_Video_Delay_String5,
- Text_Video0_Delay,
- Text_Video0_Delay_String,
- Text_Video0_Delay_String1,
- Text_Video0_Delay_String2,
- Text_Video0_Delay_String3,
- Text_Video0_Delay_String4,
- Text_Video0_Delay_String5,
- Text_StreamSize,
- Text_StreamSize_String,
- Text_StreamSize_String1,
- Text_StreamSize_String2,
- Text_StreamSize_String3,
- Text_StreamSize_String4,
- Text_StreamSize_String5,
- Text_StreamSize_Proportion,
- Text_Source_StreamSize,
- Text_Source_StreamSize_String,
- Text_Source_StreamSize_String1,
- Text_Source_StreamSize_String2,
- Text_Source_StreamSize_String3,
- Text_Source_StreamSize_String4,
- Text_Source_StreamSize_String5,
- Text_Source_StreamSize_Proportion,
- Text_StreamSize_Encoded,
- Text_StreamSize_Encoded_String,
- Text_StreamSize_Encoded_String1,
- Text_StreamSize_Encoded_String2,
- Text_StreamSize_Encoded_String3,
- Text_StreamSize_Encoded_String4,
- Text_StreamSize_Encoded_String5,
- Text_StreamSize_Encoded_Proportion,
- Text_Source_StreamSize_Encoded,
- Text_Source_StreamSize_Encoded_String,
- Text_Source_StreamSize_Encoded_String1,
- Text_Source_StreamSize_Encoded_String2,
- Text_Source_StreamSize_Encoded_String3,
- Text_Source_StreamSize_Encoded_String4,
- Text_Source_StreamSize_Encoded_String5,
- Text_Source_StreamSize_Encoded_Proportion,
- Text_Title,
- Text_Encoded_Application,
- Text_Encoded_Application_String,
- Text_Encoded_Application_CompanyName,
- Text_Encoded_Application_Name,
- Text_Encoded_Application_Version,
- Text_Encoded_Application_Url,
- Text_Encoded_Library,
- Text_Encoded_Library_String,
- Text_Encoded_Library_CompanyName,
- Text_Encoded_Library_Name,
- Text_Encoded_Library_Version,
- Text_Encoded_Library_Date,
- Text_Encoded_Library_Settings,
- Text_Encoded_OperatingSystem,
- Text_Language,
- Text_Language_String,
- Text_Language_String1,
- Text_Language_String2,
- Text_Language_String3,
- Text_Language_String4,
- Text_Language_More,
- Text_Default,
- Text_Default_String,
- Text_Forced,
- Text_Forced_String,
- Text_Summary,
- Text_Encoded_Date,
- Text_Tagged_Date,
- Text_Encryption,
-};
-
-//---------------------------------------------------------------------------
-enum other
-{
- Other_Count,
- Other_Status,
- Other_StreamCount,
- Other_StreamKind,
- Other_StreamKind_String,
- Other_StreamKindID,
- Other_StreamKindPos,
- Other_StreamOrder,
- Other_FirstPacketOrder,
- Other_Inform,
- Other_ID,
- Other_ID_String,
- Other_UniqueID,
- Other_UniqueID_String,
- Other_MenuID,
- Other_MenuID_String,
- Other_Type,
- Other_Format,
- Other_Format_Info,
- Other_Format_Url,
- Other_Format_Commercial,
- Other_Format_Commercial_IfAny,
- Other_Format_Version,
- Other_Format_Profile,
- Other_Format_Compression,
- Other_Format_Settings,
- Other_MuxingMode,
- Other_CodecID,
- Other_CodecID_String,
- Other_CodecID_Info,
- Other_CodecID_Hint,
- Other_CodecID_Url,
- Other_CodecID_Description,
- Other_Duration,
- Other_Duration_String,
- Other_Duration_String1,
- Other_Duration_String2,
- Other_Duration_String3,
- Other_Duration_String4,
- Other_Duration_String5,
- Other_Duration_Start,
- Other_Duration_End,
- Other_FrameRate,
- Other_FrameRate_String,
- Other_FrameCount,
- Other_TimeStamp_FirstFrame,
- Other_TimeStamp_FirstFrame_String,
- Other_TimeStamp_FirstFrame_String1,
- Other_TimeStamp_FirstFrame_String2,
- Other_TimeStamp_FirstFrame_String3,
- Other_TimeStamp_FirstFrame_String4,
- Other_TimeStamp_FirstFrame_String5,
- Other_TimeCode_FirstFrame,
- Other_TimeCode_Settings,
- Other_TimeCode_Striped,
- Other_TimeCode_Striped_String,
- Other_Title,
- Other_Language,
- Other_Language_String,
- Other_Language_String1,
- Other_Language_String2,
- Other_Language_String3,
- Other_Language_String4,
- Other_Language_More,
-};
-
-//---------------------------------------------------------------------------
-enum image
-{
- Image_Count,
- Image_Status,
- Image_StreamCount,
- Image_StreamKind,
- Image_StreamKind_String,
- Image_StreamKindID,
- Image_StreamKindPos,
- Image_StreamOrder,
- Image_FirstPacketOrder,
- Image_Inform,
- Image_ID,
- Image_ID_String,
- Image_UniqueID,
- Image_UniqueID_String,
- Image_MenuID,
- Image_MenuID_String,
- Image_Title,
- Image_Format,
- Image_Format_Info,
- Image_Format_Url,
- Image_Format_Commercial,
- Image_Format_Commercial_IfAny,
- Image_Format_Version,
- Image_Format_Profile,
- Image_Format_Compression,
- Image_Format_Settings,
- Image_Format_Settings_Wrapping,
- Image_InternetMediaType,
- Image_CodecID,
- Image_CodecID_String,
- Image_CodecID_Info,
- Image_CodecID_Hint,
- Image_CodecID_Url,
- Image_CodecID_Description,
- Image_Codec,
- Image_Codec_String,
- Image_Codec_Family,
- Image_Codec_Info,
- Image_Codec_Url,
- Image_Width,
- Image_Width_String,
- Image_Width_Offset,
- Image_Width_Offset_String,
- Image_Width_Original,
- Image_Width_Original_String,
- Image_Height,
- Image_Height_String,
- Image_Height_Offset,
- Image_Height_Offset_String,
- Image_Height_Original,
- Image_Height_Original_String,
- Image_PixelAspectRatio,
- Image_PixelAspectRatio_String,
- Image_PixelAspectRatio_Original,
- Image_PixelAspectRatio_Original_String,
- Image_DisplayAspectRatio,
- Image_DisplayAspectRatio_String,
- Image_DisplayAspectRatio_Original,
- Image_DisplayAspectRatio_Original_String,
- Image_ColorSpace,
- Image_ChromaSubsampling,
- Image_Resolution,
- Image_Resolution_String,
- Image_BitDepth,
- Image_BitDepth_String,
- Image_Compression_Mode,
- Image_Compression_Mode_String,
- Image_Compression_Ratio,
- Image_StreamSize,
- Image_StreamSize_String,
- Image_StreamSize_String1,
- Image_StreamSize_String2,
- Image_StreamSize_String3,
- Image_StreamSize_String4,
- Image_StreamSize_String5,
- Image_StreamSize_Proportion,
- Image_Encoded_Library,
- Image_Encoded_Library_String,
- Image_Encoded_Library_Name,
- Image_Encoded_Library_Version,
- Image_Encoded_Library_Date,
- Image_Encoded_Library_Settings,
- Image_Language,
- Image_Language_String,
- Image_Language_String1,
- Image_Language_String2,
- Image_Language_String3,
- Image_Language_String4,
- Image_Language_More,
- Image_Default,
- Image_Default_String,
- Image_Forced,
- Image_Forced_String,
- Image_Summary,
- Image_Encoded_Date,
- Image_Tagged_Date,
- Image_Encryption,
- Image_colour_description_present,
- Image_colour_primaries,
- Image_transfer_characteristics,
- Image_matrix_coefficients,
- Image_colour_description_present_Original,
- Image_colour_primaries_Original,
- Image_transfer_characteristics_Original,
- Image_matrix_coefficients_Original,
-};
-
-//---------------------------------------------------------------------------
-enum menu
-{
- Menu_Count,
- Menu_Status,
- Menu_StreamCount,
- Menu_StreamKind,
- Menu_StreamKind_String,
- Menu_StreamKindID,
- Menu_StreamKindPos,
- Menu_StreamOrder,
- Menu_FirstPacketOrder,
- Menu_Inform,
- Menu_ID,
- Menu_ID_String,
- Menu_UniqueID,
- Menu_UniqueID_String,
- Menu_MenuID,
- Menu_MenuID_String,
- Menu_Format,
- Menu_Format_Info,
- Menu_Format_Url,
- Menu_Format_Commercial,
- Menu_Format_Commercial_IfAny,
- Menu_Format_Version,
- Menu_Format_Profile,
- Menu_Format_Compression,
- Menu_Format_Settings,
- Menu_CodecID,
- Menu_CodecID_String,
- Menu_CodecID_Info,
- Menu_CodecID_Hint,
- Menu_CodecID_Url,
- Menu_CodecID_Description,
- Menu_Codec,
- Menu_Codec_String,
- Menu_Codec_Info,
- Menu_Codec_Url,
- Menu_Duration,
- Menu_Duration_String,
- Menu_Duration_String1,
- Menu_Duration_String2,
- Menu_Duration_String3,
- Menu_Duration_String4,
- Menu_Duration_String5,
- Menu_Duration_Start,
- Menu_Duration_End,
- Menu_Delay,
- Menu_Delay_String,
- Menu_Delay_String1,
- Menu_Delay_String2,
- Menu_Delay_String3,
- Menu_Delay_String4,
- Menu_Delay_String5,
- Menu_Delay_Settings,
- Menu_Delay_DropFrame,
- Menu_Delay_Source,
- Menu_List_StreamKind,
- Menu_List_StreamPos,
- Menu_List,
- Menu_List_String,
- Menu_Title,
- Menu_Language,
- Menu_Language_String,
- Menu_Language_String1,
- Menu_Language_String2,
- Menu_Language_String3,
- Menu_Language_String4,
- Menu_Language_More,
- Menu_ServiceName,
- Menu_ServiceChannel,
- Menu_Service_Url,
- Menu_ServiceProvider,
- Menu_ServiceProviderr_Url,
- Menu_ServiceType,
- Menu_NetworkName,
- Menu_Original_NetworkName,
- Menu_Countries,
- Menu_TimeZones,
- Menu_LawRating,
- Menu_LawRating_Reason,
- Menu_Chapters_Pos_Begin,
- Menu_Chapters_Pos_End,
-};
-
-} //NameSpace
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze.cpp b/src/thirdparty/MediaInfo/MediaInfo/File__Analyze.cpp
deleted file mode 100644
index f90bde87d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze.cpp
+++ /dev/null
@@ -1,3841 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "MediaInfo/MediaInfo_Config.h"
-#if MEDIAINFO_IBIUSAGE && MEDIAINFO_SEEK
- #include "MediaInfo/Multiple/File_Ibi.h"
-#endif //MEDIAINFO_IBIUSAGE && MEDIAINFO_SEEK
-#if MEDIAINFO_IBIUSAGE
- #include "MediaInfo/Multiple/File_Ibi_Creation.h"
-#endif //MEDIAINFO_IBIUSAGE
-#include <cstring>
-using namespace std;
-using namespace tinyxml2;
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events_Internal.h"
-#endif //MEDIAINFO_EVENTS
-#ifdef MEDIAINFO_SSE2_YES
- #ifndef ZENLIB_MEMUTILS_SSE2
- #define ZENLIB_MEMUTILS_SSE2
- #endif //ZENLIB_MEMUTILS_SSE2
- #include "ZenLib/MemoryUtils.h"
-#else //MEDIAINFO_SSE2_YES
- #define memcpy_Unaligned_Unaligned std::memcpy
- #define memcpy_Unaligned_Unaligned_Once1024 std::memcpy
-#endif //MEDIAINFO_SSE2_YES
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File__Analyze::File__Analyze ()
-:File__Base()
-{
- //Info for speed optimization
- #if MEDIAINFO_TRACE
- Config_Trace_Level=MediaInfoLib::Config.Trace_Level_Get();
- Config_Trace_Layers=MediaInfoLib::Config.Trace_Layers_Get();
- Config_Trace_Format=MediaInfoLib::Config.Trace_Format_Get();
- Trace_DoNotSave=false;
- Trace_Layers.set();
- Trace_Layers_Update();
- #endif //MEDIAINFO_TRACE
- Config_Demux=MediaInfoLib::Config.Demux_Get();
- Config_LineSeparator=MediaInfoLib::Config.LineSeparator_Get();
- IsSub=false;
- IsRawStream=false;
-
- //In
- #if MEDIAINFO_EVENTS
- StreamIDs_Size=1;
- ParserIDs[0]=0x0;
- StreamIDs[0]=0;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Level=1; //Frame
- Demux_random_access=false;
- Demux_UnpacketizeContainer=false;
- Demux_IntermediateItemFound=true;
- Demux_Offset=0;
- Demux_TotalBytes=0;
- Demux_CurrentParser=NULL;
- Demux_EventWasSent_Accept_Specific=false;
- #endif //MEDIAINFO_DEMUX
- PTS_DTS_Needed=false;
- PTS_Begin=(int64u)-1;
- #if MEDIAINFO_ADVANCED2
- PTS_Begin_Segment=(int64u)-1;
- #endif //MEDIAINFO_ADVANCED2
- PTS_End=0;
- DTS_Begin=(int64u)-1;
- DTS_End=0;
- Offsets_Pos=(size_t)-1;
- OriginalBuffer=NULL;
- OriginalBuffer_Size=0;
- OriginalBuffer_Capacity=0;
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- ServiceDescriptors=NULL;
- #endif
-
- //Out
- Frame_Count=0;
- Frame_Count_Previous=0;
- Frame_Count_InThisBlock=0;
- Field_Count=0;
- Field_Count_Previous=0;
- Field_Count_InThisBlock=0;
- Frame_Count_NotParsedIncluded=(int64u)-1;
- FrameNumber_PresentationOrder=(int64u)-1;
-
- //Configuration
- DataMustAlwaysBeComplete=true;
- MustUseAlternativeParser=false;
- MustSynchronize=false;
- CA_system_ID_MustSkipSlices=false;
-
- //Buffer
- #if MEDIAINFO_SEEK
- Seek_Duration_Detected=false;
- #endif //MEDIAINFO_SEEK
- Buffer=NULL;
- Buffer_Temp=NULL;
- Buffer_Size=0;
- Buffer_Temp_Size=0;
- Buffer_Temp_Size_Max=0;
- Buffer_Offset=0;
- Buffer_Offset_Temp=0;
- Buffer_MinimumSize=0;
- Buffer_MaximumSize=16*1024*1024;
- Buffer_TotalBytes_FirstSynched=0;
- Buffer_TotalBytes_LastSynched=0;
- Buffer_TotalBytes=0;
- if (MediaInfoLib::Config.FormatDetection_MaximumOffset_Get())
- Buffer_TotalBytes_FirstSynched_Max=MediaInfoLib::Config.FormatDetection_MaximumOffset_Get();
- else
- Buffer_TotalBytes_FirstSynched_Max=1024*1024;
- if (Buffer_TotalBytes_FirstSynched_Max<(int64u)-1-64*1024*1024)
- Buffer_TotalBytes_Fill_Max=Buffer_TotalBytes_FirstSynched_Max+64*1024*1024;
- else
- Buffer_TotalBytes_Fill_Max=(int64u)-1;
- Buffer_PaddingBytes=0;
- Buffer_JunkBytes=0;
- Stream_BitRateFromContainer=0;
-
- //EOF
- EOF_AlreadyDetected=(MediaInfoLib::Config.ParseSpeed_Get()==1.0)?true:false;
-
- //Synchro
- MustParseTheHeaderFile=true;
- Synched=false;
- UnSynched_IsNotJunk=false;
- MustExtendParsingDuration=false;
- Trusted=Error;
- Trusted_Multiplier=1;
-
- //Header
- Header_Size=0;
-
- //Element
- Element_Offset=0;
- Element_Size=0;
-
- //Elements
- Element.resize(64);
- Element[0].Code=0;
- Element[0].Next=File_Size;
- Element[0].WaitForMoreData=false;
- Element[0].UnTrusted=false;
- Element[0].IsComplete=false;
- #if MEDIAINFO_TRACE
- if (Config_Trace_Level!=0)
- {
- //ToShow part
- Element[0].ToShow.Name.clear();
- Element[0].ToShow.Info.clear();
- Element[0].ToShow.Details.clear();
- Element[0].ToShow.NoShow=false;
- }
- #endif //MEDIAINFO_TRACE
- Element_Level_Base=0;
- Element_Level=0;
-
- //BitStream
- BS=new BitStream_Fast;
- BT=new BitStream_LE;
-
- //Temp
- Status[IsAccepted]=false;
- Status[IsFilled]=false;
- Status[IsUpdated]=false;
- Status[IsFinished]=false;
- ShouldContinueParsing=false;
-
- //Events data
- PES_FirstByte_IsAvailable=false;
-
- //AES
- #if MEDIAINFO_AES
- AES=NULL;
- AES_IV=NULL;
- AES_Decrypted=NULL;
- AES_Decrypted_Size=0;
- #endif //MEDIAINFO_AES
-
- //MD5
- #if MEDIAINFO_MD5
- MD5=NULL;
- Md5_ParseUpTo=0;
- #endif //MEDIAINFO_MD5
-
- Unsynch_Frame_Count=(int64u)-1;
- #if MEDIAINFO_IBIUSAGE
- Ibi_SynchronizationOffset_Current=0;
- Ibi_SynchronizationOffset_BeginOfFrame=0;
- #endif //MEDIAINFO_IBIUSAGE
- #if MEDIAINFO_IBIUSAGE
- Config_Ibi_Create=false;
- IbiStream=NULL;
- #endif //MEDIAINFO_IBIUSAGE
-}
-
-//---------------------------------------------------------------------------
-File__Analyze::~File__Analyze ()
-{
- //Buffer
- delete[] Buffer_Temp; //Buffer_Temp=NULL;
- delete[] OriginalBuffer;
-
- //BitStream
- delete BS; //BS=NULL;
- delete BT; //BS=NULL;
-
- //AES
- #if MEDIAINFO_AES
- delete AES; //AES=NULL;
- delete AES_IV; //AES_IV=NULL;
- delete AES_Decrypted; //AES_Decrypted=NULL;
- #endif //MEDIAINFO_AES
-
- //MD5
- #if MEDIAINFO_MD5
- delete MD5; //MD5=NULL;
- #endif //MEDIAINFO_MD5
-
- #if MEDIAINFO_IBIUSAGE
- if (!IsSub)
- delete IbiStream; //IbiStream=NULL;
- #endif //MEDIAINFO_IBIUSAGE
-}
-
-//***************************************************************************
-// Open
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Open_Buffer_Init (int64u File_Size_)
-{
- //Preparing
- File_Size=File_Size_;
- Element[0].Next=File_Size;
-
- //Buffer - Global
- Read_Buffer_Init();
-
- //Integrity
- if (File_Offset>File_Size)
- {
- Reject();
- return; //There is a problem
- }
-
- //Jump handling
- if (File_GoTo!=(int64u)-1)
- {
- Open_Buffer_Unsynch();
- File_GoTo=(int64u)-1;
- }
-
- //Configuring
- if (MediaInfoLib::Config.FormatDetection_MaximumOffset_Get())
- Buffer_TotalBytes_FirstSynched_Max=MediaInfoLib::Config.FormatDetection_MaximumOffset_Get();
- Config->ParseSpeed=MediaInfoLib::Config.ParseSpeed_Get();
- if (Config->File_IsSub_Get())
- IsSub=true;
- #if MEDIAINFO_DEMUX
- if (Demux_Level==1 && !IsSub && Config->Demux_Unpacketize_Get()) //If Demux_Level is Frame
- {
- Demux_Level=2; //Container
- Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #if MEDIAINFO_EVENTS
- if (StreamIDs_Size && IsRawStream)
- StreamIDs[StreamIDs_Size-1]=(int64u)-1;
- if (!IsSub)
- {
- ZtringListList SubFile_IDs;
- SubFile_IDs.Separator_Set(0, EOL);
- SubFile_IDs.Separator_Set(1, __T(","));
- SubFile_IDs.Write(Config->SubFile_IDs_Get());
- if (!SubFile_IDs.empty())
- {
- StreamIDs_Size=1+SubFile_IDs.size();
- StreamIDs[SubFile_IDs.size()]=IsRawStream?(int64u)-1:StreamIDs[0];
- StreamIDs_Width[SubFile_IDs.size()]=StreamIDs_Width[0];
- ParserIDs[SubFile_IDs.size()]=ParserIDs[0];
- for (size_t Pos=0; Pos<SubFile_IDs.size(); Pos++)
- {
- StreamIDs[Pos]=SubFile_IDs[Pos](0).To_int64u();
- StreamIDs_Width[Pos]=SubFile_IDs[Pos](1).To_int8u();
- ParserIDs[Pos]=SubFile_IDs[Pos](2).To_int8u();
- }
- }
- }
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_IBIUSAGE
- Config_Ibi_Create=Config->Ibi_Create_Get() && Config->ParseSpeed==1.0;
- if (Config_Ibi_Create && !IsSub && IbiStream==NULL)
- IbiStream=new ibi::stream;
- #endif //MEDIAINFO_IBIUSAGE
-}
-
-void File__Analyze::Open_Buffer_Init (File__Analyze* Sub)
-{
- Open_Buffer_Init(Sub, File_Size);
-}
-
-void File__Analyze::Open_Buffer_Init (File__Analyze* Sub, int64u File_Size_)
-{
- //Integrity
- if (Sub==NULL
- #if MEDIAINFO_EVENTS
- || StreamIDs_Size==0
- #endif
- )
- return;
-
- //Parsing
- #if MEDIAINFO_TRACE
- Sub->Init(Config, Details);
- #else //MEDIAINFO_TRACE
- Sub->Init(Config);
- #endif //MEDIAINFO_TRACE
- #if MEDIAINFO_EVENTS
- Sub->ParserIDs[StreamIDs_Size]=Sub->ParserIDs[0];
- Sub->StreamIDs_Width[StreamIDs_Size]=Sub->StreamIDs_Width[0];
- for (size_t Pos=0; Pos<StreamIDs_Size; Pos++)
- {
- Sub->ParserIDs[Pos]=ParserIDs[Pos];
- Sub->StreamIDs[Pos]=StreamIDs[Pos];
- Sub->StreamIDs_Width[Pos]=StreamIDs_Width[Pos];
- }
- Sub->StreamIDs[StreamIDs_Size-1]=Element_Code;
- Sub->StreamIDs_Size=StreamIDs_Size+1;
- #endif //MEDIAINFO_EVENTS
- Sub->IsSub=true;
- Sub->File_Name_WithoutDemux=IsSub?File_Name_WithoutDemux:File_Name;
- Sub->Open_Buffer_Init(File_Size_);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Open_Buffer_Continue (const int8u* ToAdd, size_t ToAdd_Size)
-{
- //Deleyed events
- #if MEDIAINFO_DEMUX
- if (Config->Events_Delayed_CurrentSource)
- {
- File__Analyze* Temp=Config->Events_Delayed_CurrentSource;
- Config->Events_Delayed_CurrentSource=NULL;
- Config->Event_Accepted(Temp);
- if (Config->Events_Delayed_CurrentSource)
- return;
- }
- #endif //MEDIAINFO_DEMUX
-
- if (ToAdd_Size)
- {
- Frame_Count_InThisBlock=0;
- Field_Count_InThisBlock=0;
- }
-
- //MD5
- #if MEDIAINFO_MD5
- if (ToAdd_Size)
- {
- if (!IsSub && !Buffer_Temp_Size && File_Offset==Config->File_Current_Offset && Config->File_Md5_Get())
- {
- delete MD5; MD5=new struct MD5Context;
- MD5Init(MD5);
- }
- if (MD5)
- MD5Update(MD5, ToAdd, (unsigned int)ToAdd_Size);
- }
- #endif //MEDIAINFO_MD5
-
- //AES
- #if MEDIAINFO_AES
- if (ToAdd_Size)
- {
- if (!IsSub && !Buffer_Temp_Size && File_Offset==Config->File_Current_Offset
- && Config->Encryption_Format_Get()==Encryption_Format_Aes
- && Config->Encryption_Key_Get().size()==16
- && Config->Encryption_Method_Get()==Encryption_Method_Segment
- && Config->Encryption_Mode_Get()==Encryption_Mode_Cbc
- && Config->Encryption_Padding_Get()==Encryption_Padding_Pkcs7
- && Config->Encryption_InitializationVector_Get()=="Sequence number")
- {
- delete AES; AES=new AESdecrypt;
- AES->key128((const unsigned char*)Config->Encryption_Key_Get().c_str());
- AES_IV=new int8u[16];
- int128u2BigEndian(AES_IV, int128u((int64u)Config->File_Names_Pos-1));
- }
- if (AES)
- {
- if (AES_Decrypted_Size<ToAdd_Size)
- {
- delete AES_Decrypted; AES_Decrypted=new int8u[ToAdd_Size*2];
- AES_Decrypted_Size=ToAdd_Size*2;
- }
- AES->cbc_decrypt(ToAdd, AES_Decrypted, (int)ToAdd_Size, AES_IV); //TODO: handle the case where ToAdd_Size is more than 2GB
- if (File_Offset+Buffer_Size+ToAdd_Size>=Config->File_Current_Size && ToAdd_Size)
- {
- int8u LastByte=AES_Decrypted[ToAdd_Size-1];
- ToAdd_Size-=LastByte;
- if (Config->File_Names_Pos && Config->File_Names_Pos-1<Config->File_Sizes.size())
- Config->File_Sizes[Config->File_Names_Pos-1]-=LastByte;
- Config->File_Current_Size-=LastByte;
- }
- ToAdd=AES_Decrypted;
- }
- }
- #endif //MEDIAINFO_AES
-
- //Integrity
- if (Status[IsFinished])
- return;
- //{File F; F.Open(Ztring(__T("d:\\direct"))+Ztring::ToZtring((size_t)this, 16), File::Access_Write_Append); F.Write(ToAdd, ToAdd_Size);}
-
- //Demand to go elsewhere
- if (File_GoTo!=(int64u)-1)
- {
- if (File_GoTo<File_Offset)
- return; //Seek must be done before
- if (File_GoTo>=File_Offset+ToAdd_Size)
- {
- File_Offset+=ToAdd_Size;
- return; //No need of this piece of data
- }
- }
-
- #if MEDIAINFO_MD5
- //MD5 parsing only
- if (Md5_ParseUpTo>File_Offset+Buffer_Size+ToAdd_Size)
- {
- File_Offset+=ToAdd_Size;
- return; //No need of this piece of data
- }
- if (Md5_ParseUpTo>File_Offset && Md5_ParseUpTo<=File_Offset+ToAdd_Size)
- {
- Buffer_Offset+=(size_t)(Md5_ParseUpTo-File_Offset);
- Md5_ParseUpTo=0;
- }
- #endif //MEDIAINFO_MD5
-
- if (Buffer_Temp_Size) //There is buffered data from before
- {
- //Allocating new buffer if needed
- if (Buffer_Temp_Size+ToAdd_Size>Buffer_Temp_Size_Max)
- {
- int8u* Old=Buffer_Temp;
- size_t Buffer_Temp_Size_Max_ToAdd=ToAdd_Size>32768?ToAdd_Size:32768;
- if (Buffer_Temp_Size_Max_ToAdd<Buffer_Temp_Size_Max) Buffer_Temp_Size_Max_ToAdd=Buffer_Temp_Size_Max;
- Buffer_Temp_Size_Max+=Buffer_Temp_Size_Max_ToAdd;
- Buffer_Temp=new int8u[Buffer_Temp_Size_Max];
- memcpy_Unaligned_Unaligned(Buffer_Temp, Old, Buffer_Temp_Size);
- delete[] Old; //Old=NULL;
- }
-
- //Copying buffer
- if (ToAdd_Size>0)
- {
- memcpy_Unaligned_Unaligned(Buffer_Temp+Buffer_Size, ToAdd, ToAdd_Size);
- Buffer_Temp_Size+=ToAdd_Size;
- }
-
- //Buffer
- Buffer=Buffer_Temp;
- Buffer_Size=Buffer_Temp_Size;
- }
- else
- {
- Buffer=ToAdd;
- Buffer_Size=ToAdd_Size;
- }
-
- //Preparing
- Trusted=(Buffer_Size>2*8*1024?Buffer_Size/8/1024:2)*Trusted_Multiplier; //Never less than 2 acceptable errors
-
- //Demand to go elsewhere
- if (File_GoTo!=(int64u)-1)
- {
- //The needed offset is in the new buffer
- Buffer_Offset+=(size_t)(File_GoTo-File_Offset);
- File_GoTo=(int64u)-1;
- }
-
- //Parsing
- if (!IsSub)
- {
- if (Config->File_Size && Config->File_Size!=(int64u)-1)
- Config->State_Set(((float)Buffer_TotalBytes)/Config->File_Size);
- else if (Config->File_Names.size()>1)
- Config->State_Set(((float)Config->File_Names_Pos)/Config->File_Names.size());
- }
- if (Buffer_Size>=Buffer_MinimumSize || File_Offset+Buffer_Size==File_Size) //Parsing only if we have enough buffer
- while (Open_Buffer_Continue_Loop());
-
- //MD5
- #if MEDIAINFO_MD5
- if (Md5_ParseUpTo>File_Size)
- Md5_ParseUpTo=File_Size;
-
- if (MD5 && File_Offset+Buffer_Size>=Config->File_Current_Size && Status[IsAccepted])
- {
- unsigned char Digest[16];
- MD5Final(Digest, MD5);
- Ztring Temp;
- Temp+=Ztring().From_CC2(BigEndian2int16u(Digest+ 0));
- Temp+=Ztring().From_CC2(BigEndian2int16u(Digest+ 2));
- Temp+=Ztring().From_CC2(BigEndian2int16u(Digest+ 4));
- Temp+=Ztring().From_CC2(BigEndian2int16u(Digest+ 6));
- Temp+=Ztring().From_CC2(BigEndian2int16u(Digest+ 8));
- Temp+=Ztring().From_CC2(BigEndian2int16u(Digest+10));
- Temp+=Ztring().From_CC2(BigEndian2int16u(Digest+12));
- Temp+=Ztring().From_CC2(BigEndian2int16u(Digest+14));
- Temp.MakeLowerCase();
- const char* MD5Pos=Config->File_Names.size()>1?"Source_List_MD5_Generated":"MD5_Generated";
- if (Config->File_Names_Pos<=1 && !Retrieve(Stream_General, 0, MD5Pos).empty() && Retrieve(Stream_General, 0, MD5Pos)==Temp)
- Clear(Stream_General, 0, MD5Pos);
- Fill(Stream_General, 0, MD5Pos, Temp);
- if (Config->File_Names_Pos<=1)
- (*Stream_More)[Stream_General][0](Ztring().From_Local(MD5Pos), Info_Options)=__T("N NT");
-
- delete MD5; MD5=NULL;
- }
-
- if (MD5 && File_GoTo!=(int64u)-1)
- {
- delete MD5; MD5=NULL; //MD5 not possible with a seek
- }
-
- if (MD5 && Buffer_Offset>Buffer_Size)
- {
- //We need the next data
- Md5_ParseUpTo=File_Offset+Buffer_Offset;
- Buffer_Offset=Buffer_Size;
- }
- #endif //MEDIAINFO_MD5
-
- //Should parse again?
- if (((File_GoTo==File_Size && File_Size!=(int64u)-1) || File_Offset+Buffer_Offset>=File_Size)
- #if MEDIAINFO_DEMUX
- && !Config->Demux_EventWasSent
- #endif //MEDIAINFO_DEMUX
- )
- {
- BookMark_Get();
-
- if (File_GoTo>=File_Size)
- {
- Element_Show(); //If Element_Level is >0, we must show what is in the details buffer
- while (Element_Level>0)
- Element_End0(); //This is Finish, must flush
- Buffer_Clear();
- File_Offset=File_Size;
- if (!IsSub && !Config->File_Names.empty())
- {
- if (Config->File_Sizes.size()>=Config->File_Names.size())
- Config->File_Current_Size=Config->File_Sizes[Config->File_Names.size()-1];
- Config->File_Current_Offset=Config->File_Current_Size;
- Config->File_Names_Pos=Config->File_Names.size()-1;
- }
- ForceFinish();
- return;
- }
- }
-
- //Demand to go elsewhere
- if (File_GoTo!=(int64u)-1)
- {
- if (Config->File_IsSeekable_Get())
- {
- if (File_GoTo>=File_Size)
- File_GoTo=File_Size;
- Buffer_Clear();
- }
- else
- File_Offset+=Buffer_Offset;
-
- return;
- }
- #if MEDIAINFO_MD5
- if (Md5_ParseUpTo)
- {
- Buffer_Clear();
- return;
- }
- #endif //MEDIAINFO_MD5
- if (Buffer_Offset>=Buffer_Size
- #if MEDIAINFO_MD5
- && MD5==NULL
- #endif //MEDIAINFO_MD5
- )
- {
- if (Buffer_Offset>Buffer_Size)
- File_GoTo=File_Offset+Buffer_Offset;
- Buffer_Clear();
- return;
- }
-
- //Buffer handling
- if (Buffer_Size && Buffer_Offset<=Buffer_Size) //all is not used
- {
- if (File_Offset+Buffer_Size>=File_Size //No more data will come
- #if MEDIAINFO_DEMUX
- && !Config->Demux_EventWasSent
- #endif //MEDIAINFO_DEMUX
- )
- {
- ForceFinish();
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return;
- #endif //MEDIAINFO_DEMUX
- }
-
- if (Buffer_Temp_Size==0) //If there was no copy
- {
- #if MEDIAINFO_DEMUX
- if (!IsSub && Config->Demux_EventWasSent && Config->File_Buffer_Repeat_IsSupported && Buffer_Offset==0) //If there was no byte consumed
- {
- Config->File_Buffer_Repeat=true;
- }
- else
- #endif //MEDIAINFO_DEMUX
- {
- if (Buffer_Temp!=NULL && Buffer_Temp_Size_Max<ToAdd_Size-Buffer_Offset)
- {
- delete[] Buffer_Temp; Buffer_Temp=NULL; Buffer_Temp_Size=0; Buffer_Temp_Size_Max=0;
- }
- if (Buffer_Temp==NULL)
- {
- size_t Buffer_Temp_Size_Max_ToAdd=ToAdd_Size-Buffer_Offset>32768?ToAdd_Size-Buffer_Offset:32768;
- if (Buffer_Temp_Size_Max_ToAdd<Buffer_Temp_Size_Max) Buffer_Temp_Size_Max_ToAdd=Buffer_Temp_Size_Max;
- Buffer_Temp_Size_Max=Buffer_Temp_Size_Max_ToAdd;
- Buffer_Temp=new int8u[Buffer_Temp_Size_Max];
- }
- Buffer_Temp_Size=ToAdd_Size-Buffer_Offset;
- memcpy_Unaligned_Unaligned(Buffer_Temp, ToAdd+Buffer_Offset, Buffer_Temp_Size);
- }
- }
- else if (Buffer_Offset) //Already a copy, just moving it
- {
- std::memmove(Buffer_Temp, Buffer_Temp+Buffer_Offset, Buffer_Size-Buffer_Offset);
- Buffer_Temp_Size=Buffer_Size-Buffer_Offset;
- }
- }
- else if (Buffer_Temp_Size)
- Buffer_Temp_Size=0;
-
- //Reserving unused data
- if ((int64u)-1-Buffer_Offset<File_Offset) //In case of unknown filesize, File_Offset may be (int64u)-1
- Buffer_Offset=(size_t)((int64u)-1-File_Offset);
- if (Buffer_Offset)
- {
- if (Buffer_Offset>=FrameInfo.Buffer_Offset_End && FrameInfo_Next.DTS!=(int64u)-1)
- {
- FrameInfo=FrameInfo_Next;
- FrameInfo_Next=frame_info();
- }
-
- float64 Ratio=1;
- if (OriginalBuffer)
- {
- Ratio=((float64)OriginalBuffer_Size)/Buffer_Size;
- size_t Temp_Size=(size_t)float64_int64s(((float64)Buffer_Offset)*Ratio);
-
- OriginalBuffer_Size-=Temp_Size;
- memmove(OriginalBuffer, OriginalBuffer+Buffer_Offset, OriginalBuffer_Size);
- }
-
- Buffer_Size-=Buffer_Offset;
- File_Offset+=Buffer_Offset;
- if (Buffer_Offset_Temp>=Buffer_Offset)
- Buffer_Offset_Temp-=Buffer_Offset;
- if (FrameInfo.Buffer_Offset_End!=(int64u)-1 && FrameInfo.Buffer_Offset_End>=Buffer_Offset)
- FrameInfo.Buffer_Offset_End-=Buffer_Offset;
- if (FrameInfo_Next.Buffer_Offset_End!=(int64u)-1 && FrameInfo_Next.Buffer_Offset_End>=Buffer_Offset)
- FrameInfo_Next.Buffer_Offset_End-=Buffer_Offset;
- if (!Offsets_Buffer.empty())
- {
- if (Offsets_Buffer.size()>=2 && Offsets_Buffer.size()%2==0 && Offsets_Buffer[0]==Offsets_Buffer[1])
- {
- size_t Pos=Offsets_Buffer.size()-2;
- do
- {
- if (Offsets_Buffer[Pos]>Buffer_Offset)
- {
- Offsets_Buffer[Pos]-=Buffer_Offset;
- Offsets_Buffer[Pos+1]-=Buffer_Offset;
- }
- else
- {
- Offsets_Stream[Pos]+=float64_int64s(Buffer_Offset*Ratio/2)-Offsets_Buffer[Pos];
- Offsets_Stream[Pos+1]+=float64_int64s(Buffer_Offset*Ratio/2)-Offsets_Buffer[Pos+1];
- Offsets_Buffer[Pos]=0;
- Offsets_Buffer[Pos+1]=0;
- Offsets_Buffer.erase(Offsets_Buffer.begin(), Offsets_Buffer.begin()+Pos);
- Offsets_Stream.erase(Offsets_Stream.begin(), Offsets_Stream.begin()+Pos);
- if (Offsets_Pos!=(size_t)-1 && Pos)
- {
- if (Pos<Offsets_Pos)
- Offsets_Pos-=Pos;
- else
- Offsets_Pos=0;
- }
- break;
- }
- if (Pos==0)
- break;
- Pos-=2;
- }
- while (Pos);
- }
- else
- {
- size_t Pos=Offsets_Buffer.size()-1;
- do
- {
- if (Offsets_Buffer[Pos]>Buffer_Offset*Ratio)
- Offsets_Buffer[Pos]-=float64_int64s(Buffer_Offset*Ratio);
- else
- {
- Offsets_Stream[Pos]+=float64_int64s(Buffer_Offset*Ratio)-Offsets_Buffer[Pos];
- Offsets_Buffer[Pos]=0;
- Offsets_Buffer.erase(Offsets_Buffer.begin(), Offsets_Buffer.begin()+Pos);
- Offsets_Stream.erase(Offsets_Stream.begin(), Offsets_Stream.begin()+Pos);
- if (Offsets_Pos!=(size_t)-1 && Pos)
- {
- if (Pos<Offsets_Pos)
- Offsets_Pos-=Pos;
- else
- Offsets_Pos=0;
- }
- break;
- }
- if (Pos==0)
- break;
- Pos--;
- }
- while (Pos);
- }
- }
-
- Buffer_Offset=0;
- }
-
- //Is it OK?
- if (Buffer_Size>Buffer_MaximumSize)
- {
- #if MEDIAINFO_MD5
- if (Config->File_Md5_Get() && MD5 && Status[IsAccepted])
- {
- Buffer_Clear();
- Md5_ParseUpTo=File_Size;
- }
- else
- #endif //MEDIAINFO_MD5
- ForceFinish();
- return;
- }
-}
-
-void File__Analyze::Open_Buffer_Continue (File__Analyze* Sub, const int8u* ToAdd, size_t ToAdd_Size, bool IsNewPacket, float64 Ratio)
-{
- if (Sub==NULL)
- return;
-
- //Sub
- if (Sub->File_GoTo!=(int64u)-1)
- Sub->File_GoTo=(int64u)-1;
- Sub->File_Offset=File_Offset+Buffer_Offset+Element_Offset;
- if (Sub->File_Size!=File_Size)
- {
- for (size_t Pos=0; Pos<=Sub->Element_Level; Pos++)
- if (Sub->Element[Pos].Next==Sub->File_Size)
- Sub->Element[Pos].Next=File_Size;
- Sub->File_Size=File_Size;
- }
- #if MEDIAINFO_TRACE
- Sub->Element_Level_Base=Element_Level_Base+Element_Level;
- #endif
-
- //{File F; F.Open(Ztring(__T("d:\\direct"))+Ztring::ToZtring((size_t)this, 16), File::Access_Write_Append); F.Write(ToAdd, ToAdd_Size);}
-
- //Adaptating File_Offset
- if (Sub!=this && Sub->Buffer_Size<=Sub->File_Offset)
- Sub->File_Offset-=Sub->Buffer_Size;
-
- //Parsing
- Sub->PES_FirstByte_IsAvailable=PES_FirstByte_IsAvailable;
- Sub->PES_FirstByte_Value=PES_FirstByte_Value;
- if (IsNewPacket && ToAdd_Size)
- {
- if (Offsets_Stream.empty())
- {
- Sub->Offsets_Stream.push_back(File_Offset+float64_int64s((Buffer_Offset+Element_Offset)*Ratio));
- Sub->Offsets_Buffer.push_back(Sub->Buffer_Size);
- }
- else
- {
- if (Offsets_Buffer[0]>=Buffer_Offset-Header_Size && (Sub->Offsets_Stream.empty() || Sub->Offsets_Stream[Sub->Offsets_Stream.size()-1]+Sub->Buffer_Size-Sub->Offsets_Buffer[Sub->Offsets_Stream.size()-1]!=Offsets_Stream[0]))
- {
- if ((Buffer_Offset-Header_Size)*Ratio<Offsets_Buffer[0])
- {
- Sub->Offsets_Stream.push_back(Offsets_Stream[0]);
- Sub->Offsets_Buffer.push_back((Sub->OriginalBuffer_Size?Sub->OriginalBuffer_Size:Sub->Buffer_Size)+Offsets_Buffer[0]-(Buffer_Offset+Element_Offset));
- }
- else
- {
- Sub->Offsets_Stream.push_back(Offsets_Stream[0]+Buffer_Offset+Element_Offset-Offsets_Buffer[0]);
- Sub->Offsets_Buffer.push_back(Sub->OriginalBuffer_Size?Sub->OriginalBuffer_Size:Sub->Buffer_Size);
- }
- }
- for (size_t Pos=1; Pos<Offsets_Stream.size(); Pos++)
- if (Offsets_Buffer[Pos]>=Buffer_Offset+Element_Offset && Offsets_Buffer[Pos]<Buffer_Offset+Element_Size)
- {
- if ((Buffer_Offset-Header_Size)*Ratio<Offsets_Buffer[Pos])
- {
- Sub->Offsets_Stream.push_back(Offsets_Stream[Pos]);
- Sub->Offsets_Buffer.push_back((Sub->OriginalBuffer_Size?Sub->OriginalBuffer_Size:Sub->Buffer_Size)+Offsets_Buffer[Pos]-(Buffer_Offset+Element_Offset));
- }
- else
- {
- Sub->Offsets_Stream.push_back(Offsets_Stream[Pos]+Buffer_Offset+Element_Offset-Offsets_Buffer[Pos]);
- Sub->Offsets_Buffer.push_back(Sub->OriginalBuffer_Size?Sub->OriginalBuffer_Size:Sub->Buffer_Size);
- }
- }
- }
- }
-
- if (Ratio!=1)
- {
- if (Sub->OriginalBuffer_Size+Element_Size-Element_Offset>Sub->OriginalBuffer_Capacity)
- {
- int8u* Temp=Sub->OriginalBuffer;
- Sub->OriginalBuffer_Capacity=(size_t)(Sub->OriginalBuffer_Size+Element_Size-Element_Offset);
- Sub->OriginalBuffer=new int8u[Sub->OriginalBuffer_Capacity];
- memcpy_Unaligned_Unaligned(Sub->OriginalBuffer, Temp, Sub->OriginalBuffer_Size);
- delete[] Temp;
- }
- memcpy_Unaligned_Unaligned(Sub->OriginalBuffer+Sub->OriginalBuffer_Size, Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset));
- Sub->OriginalBuffer_Size+=(size_t)(Element_Size-Element_Offset);
- }
-
- if (Sub->FrameInfo.DTS!=(int64u)-1)
- Sub->FrameInfo.Buffer_Offset_End=Sub->Buffer_Offset+Sub->Buffer_Size+ToAdd_Size;
- else if (Sub->FrameInfo_Previous.DTS!=(int64u)-1)
- Sub->FrameInfo_Previous.Buffer_Offset_End=Sub->Buffer_Offset+Sub->Buffer_Size+ToAdd_Size;
- if (Sub->FrameInfo_Previous.DTS!=(int64u)-1)
- {
- Sub->FrameInfo_Next=Sub->FrameInfo;
- Sub->FrameInfo=Sub->FrameInfo_Previous;
- Sub->FrameInfo_Previous=frame_info();
-
- Sub->Frame_Count_Previous=Sub->Frame_Count;
- Sub->Field_Count_Previous=Sub->Field_Count;
- }
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Sub->Frame_Count_NotParsedIncluded=Frame_Count_NotParsedIncluded;
- #if MEDIAINFO_DEMUX
- bool Demux_EventWasSent_Save=Config->Demux_EventWasSent;
- Config->Demux_EventWasSent=false;
- #endif //MEDIAINFO_DEMUX
- Sub->Open_Buffer_Continue(ToAdd, ToAdd_Size);
- #if MEDIAINFO_DEMUX
- if (Demux_EventWasSent_Save)
- Config->Demux_EventWasSent=true;
- #endif //MEDIAINFO_DEMUX
- if (Sub->Buffer_Size)
- {
- Sub->FrameInfo_Previous=Sub->FrameInfo;
- Sub->FrameInfo=Sub->FrameInfo_Next;
- Sub->FrameInfo_Next=frame_info();
- }
-
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- //Details handling
- if (!Sub->Element[0].ToShow.Details.empty() && !Trace_DoNotSave)
- {
- //Line separator
- if (!Element[Element_Level].ToShow.Details.empty())
- Element[Element_Level].ToShow.Details+=Config_LineSeparator;
-
- //From Sub
- while(Sub->Element_Level)
- Sub->Element_End0();
- Element[Element_Level].ToShow.Details+=Sub->Element[0].ToShow.Details;
- Sub->Element[0].ToShow.Details.clear();
- }
- else
- Element[Element_Level].ToShow.NoShow=true; //We don't want to show this item because there is no info in it
- }
- #endif
-}
-
-//---------------------------------------------------------------------------
-bool File__Analyze::Open_Buffer_Continue_Loop ()
-{
- //Header
- if (MustParseTheHeaderFile)
- {
- if (!FileHeader_Manage())
- return false; //Wait for more data
- if (Status[IsFinished] || File_GoTo!=(int64u)-1)
- return false; //Finish
- }
-
- //Parsing specific
- Element_Offset=0;
- Element_Size=Buffer_Size;
- Element[Element_Level].WaitForMoreData=false;
- Read_Buffer_Continue();
- if (Element_IsWaitingForMoreData())
- return false; //Wait for more data
- if (sizeof(size_t)<sizeof(int64u) && Buffer_Offset+Element_Offset>=(int64u)(size_t)-1)
- GoTo(File_Offset+Buffer_Offset+Element_Offset);
- else
- Buffer_Offset+=(size_t)Element_Offset;
- if ((Status[IsFinished] && !ShouldContinueParsing) || Buffer_Offset>Buffer_Size || File_GoTo!=(int64u)-1)
- return false; //Finish
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return false;
- #endif //MEDIAINFO_DEMUX
-
- //Parsing;
- while (Buffer_Offset<Buffer_Size)
- if (!Buffer_Parse())
- break;
- Buffer_TotalBytes+=Buffer_Offset;
-
- //Handling of File_GoTo with already buffered data
- #if MEDIAINFO_MD5
- if (File_GoTo==(int64u)-1 && Md5_ParseUpTo && Md5_ParseUpTo>=File_Offset && Md5_ParseUpTo<File_Offset+Buffer_Size)
- {
- File_GoTo=Md5_ParseUpTo;
- Md5_ParseUpTo=0;
- }
- #endif //MEDIAINFO_MD5
- if (File_GoTo!=(int64u)-1 && File_GoTo>=File_Offset && File_GoTo<File_Offset+Buffer_Size)
- {
- if (Buffer_Temp_Size==0) //If there was no copy
- {
- Buffer_Temp_Size=(size_t)(File_Offset+Buffer_Size-File_GoTo);
- if (Buffer_Temp!=NULL && Buffer_Temp_Size_Max<Buffer_Temp_Size)
- {
- delete[] Buffer_Temp; Buffer_Temp=NULL; Buffer_Temp_Size=0; Buffer_Temp_Size_Max=0;
- }
- if (Buffer_Temp==NULL)
- {
- size_t Buffer_Temp_Size_Max_ToAdd=Buffer_Temp_Size>32768?Buffer_Temp_Size:32768;
- if (Buffer_Temp_Size_Max_ToAdd<Buffer_Temp_Size_Max) Buffer_Temp_Size_Max_ToAdd=Buffer_Temp_Size_Max;
- Buffer_Temp_Size_Max=Buffer_Temp_Size_Max_ToAdd;
- Buffer_Temp=new int8u[Buffer_Temp_Size_Max];
- }
- memcpy_Unaligned_Unaligned(Buffer_Temp, Buffer+Buffer_Size-Buffer_Temp_Size, Buffer_Temp_Size);
- }
- else //Already a copy, just moving it
- {
- Buffer_Temp_Size=(size_t)(File_Offset+Buffer_Size-File_GoTo);
- std::memmove(Buffer_Temp, Buffer+Buffer_Size-Buffer_Temp_Size, Buffer_Temp_Size);
- }
- File_Offset+=Buffer_Size-Buffer_Temp_Size;
- Buffer=Buffer_Temp;
- Buffer_Offset=0;
- Buffer_Size=Buffer_Temp_Size;
- File_GoTo=(int64u)-1;
-
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return false;
- #endif //MEDIAINFO_DEMUX
-
- return true;
- }
-
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return false;
- #endif //MEDIAINFO_DEMUX
-
- //Parsing specific
- Read_Buffer_AfterParsing();
-
- //Jumping to the end of the file if needed
- if (!IsSub && !EOF_AlreadyDetected && Config->ParseSpeed<1 && Count_Get(Stream_General))
- {
- Element[Element_Level].WaitForMoreData=false;
- Detect_EOF();
- if ((File_GoTo!=(int64u)-1 && File_GoTo>File_Offset+Buffer_Offset) || (Status[IsFinished] && !ShouldContinueParsing))
- {
- EOF_AlreadyDetected=true;
- return false;
- }
- }
-
- return false;
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File__Analyze::Open_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- #if MEDIAINFO_DEMUX
- Config->Demux_EventWasSent=false;
- #endif //MEDIAINFO_DEMUX
-
- size_t ToReturn=Read_Buffer_Seek(Method, Value, ID);
-
- if (File_GoTo!=(int64u)-1)
- Buffer_Clear();
-
- return ToReturn;
-}
-#endif //MEDIAINFO_SEEK
-
-//---------------------------------------------------------------------------
-void File__Analyze::Open_Buffer_Position_Set (int64u File_Offset_)
-{
- if (File_Offset_==(int64u)-1)
- return;
-
- File_Offset=File_Offset_-Buffer_Temp_Size;
- File_GoTo=(int64u)-1;
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_ADVANCED2
-void File__Analyze::Open_Buffer_SegmentChange ()
-{
- Read_Buffer_SegmentChange();
-}
-#endif //MEDIAINFO_ADVANCED2
-
-//---------------------------------------------------------------------------
-void File__Analyze::Open_Buffer_Unsynch ()
-{
- Status[IsFinished]=false;
- FrameInfo=frame_info();
- FrameInfo_Previous=frame_info();
- FrameInfo_Next=frame_info();
- Frame_Count_NotParsedIncluded=Unsynch_Frame_Count;
- Unsynch_Frame_Count=(int64u)-1;
- PTS_End=0;
- DTS_End=0;
- #if MEDIAINFO_DEMUX
- Demux_IntermediateItemFound=true;
- Demux_Offset=0;
- Demux_TotalBytes=Buffer_TotalBytes;
- Config->Demux_EventWasSent=false;
- #endif //MEDIAINFO_DEMUX
-
- //Clearing duration
- if (Synched)
- {
- for (size_t StreamKind=(size_t)Stream_General; StreamKind<(size_t)Stream_Menu; StreamKind++)
- {
- size_t StreamPos_Count=Count_Get((stream_t)StreamKind);
- for (size_t StreamPos=0; StreamPos<StreamPos_Count; StreamPos++)
- Clear((stream_t)StreamKind, StreamPos, Fill_Parameter((stream_t)StreamKind, Generic_Duration));
- }
- }
-
- //if (Synched)
- if (!MustSynchronize || (MustSynchronize && File_Offset_FirstSynched!=(int64u)-1)) //Synched at least once
- {
- Synched=false;
- UnSynched_IsNotJunk=true;
- Read_Buffer_Unsynched();
- Ibi_Read_Buffer_Unsynched();
- }
- Buffer_Clear();
-
- //Some default values
- if (IsRawStream && File_GoTo==0)
- {
- FrameInfo.DTS=0;
- Frame_Count_NotParsedIncluded=0;
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Open_Buffer_Update ()
-{
- if (Status[IsAccepted])
- Streams_Update();
-
- Status[File__Analyze::IsUpdated]=false;
- for (size_t Pos=File__Analyze::User_16; Pos<File__Analyze::User_16+16; Pos++)
- Status[Pos]=false;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Open_Buffer_Finalize (bool NoBufferModification)
-{
- //File with unknown size (stream...), finnishing
- if (!NoBufferModification && File_Size==(int64u)-1)
- {
- File_Size=File_Offset+Buffer_Size;
- Open_Buffer_Continue((const int8u*)NULL, 0);
- }
-
- //Element must be Finish
- while (Element_Level>0)
- Element_End0();
-
- //Buffer - Global
- Fill();
- if (!NoBufferModification)
- {
- ForceFinish();
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return;
- #endif //MEDIAINFO_DEMUX
- Buffer_Clear();
- }
-
- #if MEDIAINFO_TRACE
- if (Details && Details->empty())
- Details->assign(Element[0].ToShow.Details);
- #endif //MEDIAINFO_TRACE
-
- #if MEDIAINFO_EVENTS
- if (Status[IsAccepted])
- {
- EVENT_BEGIN (General, End, 0)
- if (Event.StreamIDs_Size>=1)
- Event.StreamIDs[Event.StreamIDs_Size-1]=(int64u)-1;
- Event.PCR=(int64u)-1;
- Event.DTS=(int64u)-1;
- Event.PTS=(int64u)-1;
- Event.DUR=(int64u)-1;
- Event.Stream_Bytes_Analyzed=Buffer_TotalBytes;
- Event.Stream_Size=File_Size;
- Event.Stream_Bytes_Padding=Buffer_PaddingBytes;
- Event.Stream_Bytes_Junk=Buffer_JunkBytes;
- if (!IsSub && MustSynchronize && !Synched && !UnSynched_IsNotJunk)
- Event.Stream_Bytes_Junk+=Buffer_TotalBytes+Buffer_Offset-Buffer_TotalBytes_LastSynched;
- EVENT_END ()
- }
- #endif //MEDIAINFO_EVENTS
-}
-
-void File__Analyze::Open_Buffer_Finalize (File__Analyze* Sub)
-{
- if (Sub==NULL)
- return;
-
- //Finalize
- Open_Buffer_Init(Sub);
- Sub->Open_Buffer_Finalize();
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File__Analyze::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- #if MEDIAINFO_IBI
- if (!IsSub)
- {
- size_t ReturnValue=Ibi_Read_Buffer_Seek(Method, Value, ID);
- if (ReturnValue!=(size_t)-1) // If IBI file is supported
- return ReturnValue;
- }
- #endif //MEDIAINFO_IBI
-
- //Parsing
- switch (Method)
- {
- case 0 : //Default stream seek (byte offset)
- GoTo(Value);
- Open_Buffer_Unsynch();
- return 1;
- case 1 : //Default stream seek (percentage)
- GoTo(File_Size*Value/10000);
- Open_Buffer_Unsynch();
- return 1;
- default :
- return (size_t)-1; //Not supported
- }
-}
-#endif //MEDIAINFO_SEEK
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File__Analyze::Read_Buffer_Seek_OneFramePerFile (size_t Method, int64u Value, int64u ID)
-{
- //Parsing
- switch (Method)
- {
- case 0 :
- {
- if (Value>=Config->File_Size)
- return 2; //Invalid value
- int64u Offset=0;
- for (size_t Pos=0; Pos<Config->File_Sizes.size(); Pos++)
- {
- Offset+=Config->File_Sizes[Pos];
- if (Offset>=Value)
- {
- Offset-=Config->File_Sizes[Pos];
- break;
- }
- }
- GoTo(Offset);
- Open_Buffer_Unsynch();
- return 1;
- }
- case 1 :
- {
- if (Value>=10000)
- return 2; //Invalid value
- size_t FilePos=(size_t)((((float32)Value)/10000)*Config->File_Sizes.size());
- int64u Offset=0;
- for (size_t Pos=0; Pos<FilePos; Pos++)
- Offset+=Config->File_Sizes[Pos];
- GoTo(Offset);
- Open_Buffer_Unsynch();
- return 1;
- }
- case 2 : //Timestamp
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Rate_Get()==0)
- return (size_t)-1; //Not supported
- Value=float64_int64s(((float64)Value)/1000000000*Config->Demux_Rate_Get());
- #else //MEDIAINFO_DEMUX
- return (size_t)-1; //Not supported
- #endif //MEDIAINFO_DEMUX
- case 3 : //FrameNumber
- {
- if (Value>=Config->File_Names.size())
- return 2; //Invalid value
- int64u Offset=0;
- if (Config->File_Sizes.size()!=Config->File_Names.size())
- {
- Offset=Value; //File_GoTo is the frame offset in that case
- Config->File_GoTo_IsFrameOffset=true;
- }
- else
- for (size_t Pos=0; Pos<Value; Pos++)
- Offset+=Config->File_Sizes[Pos];
- GoTo(Offset);
- Open_Buffer_Unsynch();
- return 1;
- }
- default : return (size_t)-1; //Not supported
- }
-}
-#endif //MEDIAINFO_SEEK
-
-//---------------------------------------------------------------------------
-void File__Analyze::Read_Buffer_Unsynched_OneFramePerFile()
-{
- #if MEDIAINFO_ADVANCED
- if (Config->File_Sizes.size()!=Config->File_Names.size())
- {
- Frame_Count_NotParsedIncluded=File_GoTo;
- }
- else
- #endif //MEDIAINFO_ADVANCED
- {
- int64u GoTo=File_GoTo;
- for (Frame_Count_NotParsedIncluded=0; Frame_Count_NotParsedIncluded<Config->File_Sizes.size(); Frame_Count_NotParsedIncluded++)
- {
- if (GoTo>=Config->File_Sizes[(size_t)Frame_Count_NotParsedIncluded])
- GoTo-=Config->File_Sizes[(size_t)Frame_Count_NotParsedIncluded];
- else
- break;
- }
- }
-
- #if MEDIAINFO_DEMUX
- if (!IsSub && Config->Demux_Rate_Get()) //TODO: remove !IsSub when time code delay is removed from PTS
- {
- FrameInfo.DTS=float64_int64s(Frame_Count_NotParsedIncluded*((float64)1000000000)/Config->Demux_Rate_Get());
- FrameInfo.PTS=FrameInfo.DTS;
- }
- else
- FrameInfo.PTS=FrameInfo.DTS=(int64u)-1;
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-bool File__Analyze::Buffer_Parse()
-{
- //End of this level?
- if (File_Offset+Buffer_Offset>=Element[Element_Level].Next)
- {
- //There is no loop handler, so we make the level down here
- while (Element_Level>0 && File_Offset+Buffer_Offset>=Element[Element_Level].Next)
- Element_End0(); //This is a buffer restart, must sync to Element level
- if (File_Offset+Buffer_Offset==File_Size)
- return false; //End of file
- MustUseAlternativeParser=false; //Reset it if we go out of an element
- }
-
- //Synchro
- if (MustSynchronize)
- do
- {
- if (!Synchro_Manage())
- return false; //Wait for more data
- }
- while (!Synched);
- #if MEDIAINFO_DEMUX
- else if (Demux_TotalBytes<=Buffer_TotalBytes+Buffer_Offset)
- {
- if (Demux_UnpacketizeContainer && !Demux_UnpacketizeContainer_Test())
- {
- Demux_Offset-=Buffer_Offset;
- return false; //Wait for more data
- }
- if (Config->Demux_EventWasSent)
- return false;
- }
- #endif //MEDIAINFO_DEMUX
-
- //Offsets
- if (Offsets_Pos==(size_t)-1 && !Offsets_Buffer.empty())
- Offsets_Pos=0;
- if (Offsets_Pos!=(size_t)-1)
- {
- while (Offsets_Pos<Offsets_Buffer.size() && Buffer_Offset>Offsets_Buffer[Offsets_Pos])
- Offsets_Pos++;
- if (Offsets_Pos>=Offsets_Buffer.size() || Buffer_Offset!=Offsets_Buffer[Offsets_Pos])
- Offsets_Pos--;
- }
-
- //Header
- if (!Header_Manage())
- return false; //Wait for more data
-
- //Data
- if (!Data_Manage())
- return false; //Wait for more data
-
- Buffer_TotalBytes_LastSynched=Buffer_TotalBytes+Buffer_Offset;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Buffer_Clear()
-{
- //Buffer
- BS->Attach(NULL, 0);
- delete[] Buffer_Temp; Buffer_Temp=NULL;
- if (!Status[IsFinished])
- File_Offset+=Buffer_Size;
- else
- {
- File_Offset=File_Size;
- if (!IsSub && !Config->File_Names.empty())
- {
- if (Config->File_Sizes.size()>=Config->File_Names.size())
- Config->File_Current_Size=Config->File_Sizes[Config->File_Names.size()-1];
- Config->File_Current_Offset=Config->File_Current_Size;
- Config->File_Names_Pos=Config->File_Names.size()-1;
- }
- }
- Buffer_Size=0;
- Buffer_Temp_Size=0;
- Buffer_Offset=0;
- Buffer_Offset_Temp=0;
- Buffer_MinimumSize=0;
-
- OriginalBuffer_Size=0;
- Offsets_Stream.clear();
- Offsets_Buffer.clear();
- Offsets_Pos=(size_t)-1;
-
- //Details
- #if MEDIAINFO_TRACE
- Element[Element_Level].WaitForMoreData=false; //We must finalize the details
- Element[Element_Level].IsComplete=true; //We must finalize the details
- #endif //MEDIAINFO_TRACE
-
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File__Analyze::Synchronize_0x000001()
-{
- //Synchronizing
- while(Buffer_Offset+3<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x01))
- {
- Buffer_Offset+=2;
- while(Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Buffer_Offset+=2;
- if ((Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset-1]==0x00) || Buffer_Offset>=Buffer_Size)
- Buffer_Offset--;
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+3==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x01))
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00))
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && Buffer[Buffer_Offset ]!=0x00)
- Buffer_Offset++;
-
- if (Buffer_Offset+3>Buffer_Size)
- return false;
-
- //Synched is OK
- Synched=true;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File__Analyze::FileHeader_Begin_0x000001()
-{
- //Element_Size
- if (Buffer_Size<192*4)
- return true; //Not enough buffer for a test
-
- //Detecting OldDirac/WAV/SWF/FLV/ELF/DPG/WM files
- int64u Magic8=CC8(Buffer);
- int32u Magic4=Magic8>>32;
- int32u Magic3=Magic4>> 8;
- int16u Magic2=Magic4>>16;
- if (Magic8==0x4B572D4449524143LL || Magic4==0x52494646 || Magic3==0x465753 || Magic3==0x464C56 || Magic4==0x7F454C46 || Magic4==0x44504730 || Magic4==0x3026B275 || Magic2==0x4D5A || Magic4==0x1A45DFA3)
- {
- Reject();
- return false;
- }
-
- //GXF
- if (CC5(Buffer)==0x0000000001 && CC2(Buffer+14)==0xE1E2)
- {
- Reject();
- return false;
- }
-
- //Detecting MPEG-4 files (ftyp/mdat/skip/free)
- Magic4=CC4(Buffer+4);
- switch (Magic4)
- {
- case 0x66747970 : //ftyp
- case 0x6D646174 : //mdat
- case 0x736B6970 : //skip
- case 0x66726565 : //free
- Reject();
- return false;
- default : break;
- }
-
- //Detect TS files, and the parser is not enough precise to detect them later
- size_t Buffer_Offset=0;
- while (Buffer_Offset<188 && Buffer[Buffer_Offset]!=0x47) //Look for first Sync word
- Buffer_Offset++;
- if (Buffer_Offset<188 && Buffer[Buffer_Offset+188]==0x47 && Buffer[Buffer_Offset+188*2]==0x47 && Buffer[Buffer_Offset+188*3]==0x47)
- {
- Status[IsFinished]=true;
- return false;
- }
- Buffer_Offset=0;
-
- //Detect BDAV files, and the parser is not enough precise to detect them later
- while (Buffer_Offset<192 && CC1(Buffer+Buffer_Offset+4)!=0x47) //Look for first Sync word
- Buffer_Offset++;
- if (Buffer_Offset<192 && CC1(Buffer+Buffer_Offset+192+4)==0x47 && CC1(Buffer+Buffer_Offset+192*2+4)==0x47 && CC1(Buffer+Buffer_Offset+192*3+4)==0x47)
- {
- Status[IsFinished]=true;
- return false;
- }
- Buffer_Offset=0;
-
- //All should be OK...
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File__Analyze::FileHeader_Begin_XML(XMLDocument &Document)
-{
- //Element_Size
- if (!IsSub && (File_Size<32 || File_Size>16*1024*1024))
- {
- Reject();
- return false; //XML files are not expected to be so big
- }
-
- //Element_Size
- if (!IsSub && Buffer_Size<File_Size)
- {
- Element_WaitForMoreData();
- return false; //Must wait for more data
- }
-
- //XML header
- Ztring Data;
- if ((Buffer[0]=='<'
- && Buffer[1]==0x00)
- || (Buffer[0]==0xFF
- && Buffer[1]==0xFE
- && Buffer[2]=='<'
- && Buffer[3]==0x00))
- Data.From_UTF16LE((const char*)Buffer, Buffer_Size);
- else if ((Buffer[0]==0x00
- && Buffer[1]=='<')
- || (Buffer[0]==0xFE
- && Buffer[1]==0xFF
- && Buffer[2]==0x00
- && Buffer[3]=='<'))
- Data.From_UTF16BE((const char*)Buffer, Buffer_Size);
- else if ((Buffer[0]=='<')
- || (Buffer[0]==0xEF
- && Buffer[1]==0xBB
- && Buffer[2]==0xBF
- && Buffer[3]=='<'))
- Data.From_UTF8((const char*)Buffer, Buffer_Size);
- else
- {
- Reject();
- return false;
- }
-
- string DataUTF8=Data.To_UTF8();
- if (Document.Parse(DataUTF8.c_str()))
- {
- Reject();
- return false;
- }
-
- return true;
-}
-
-//***************************************************************************
-// Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File__Analyze::Synchro_Manage()
-{
- //Testing if synchro is OK
- if (Synched)
- {
- if (!IsSub)
- Buffer_TotalBytes_LastSynched=Buffer_TotalBytes+Buffer_Offset;
-
- if (!Synchro_Manage_Test())
- return false;
- }
-
- //Trying to synchronize
- if (!Synched)
- {
- //Buffer_TotalBytes_Fill_Max
- if (!Status[IsFilled] && Buffer_TotalBytes>=Buffer_TotalBytes_Fill_Max)
- {
- Open_Buffer_Unsynch();
- GoToFromEnd(0);
- return false;
- }
- if (!Synchronize())
- {
- if (Status[IsFinished])
- Finish(); //Finish
- if (!IsSub && File_Offset_FirstSynched==(int64u)-1 && Buffer_TotalBytes+Buffer_Offset>=Buffer_TotalBytes_FirstSynched_Max)
- {
- Open_Buffer_Unsynch();
- GoToFromEnd(0);
- }
- return false; //Wait for more data
- }
- Synched=true;
- if (!IsSub)
- {
- if (!UnSynched_IsNotJunk)
- Buffer_JunkBytes+=Buffer_TotalBytes+Buffer_Offset-Buffer_TotalBytes_LastSynched;
- Buffer_TotalBytes_LastSynched=Buffer_TotalBytes+Buffer_Offset;
- UnSynched_IsNotJunk=false;
- }
- if (File_Offset_FirstSynched==(int64u)-1)
- {
- Synched_Init();
- Buffer_TotalBytes_FirstSynched+=Buffer_TotalBytes+Buffer_Offset;
- File_Offset_FirstSynched=File_Offset+Buffer_Offset;
- }
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return false;
- #endif //MEDIAINFO_DEMUX
- if (!Synchro_Manage_Test())
- return false;
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File__Analyze::Synchro_Manage_Test()
-{
- //Testing if synchro is OK
- if (Synched)
- {
- if (!Synched_Test())
- return false;
- #if MEDIAINFO_DEMUX
- if (Synched && Demux_TotalBytes<=Buffer_TotalBytes+Buffer_Offset)
- {
- if (Demux_UnpacketizeContainer && !Demux_UnpacketizeContainer_Test())
- {
- Demux_Offset-=Buffer_Offset;
- return false; //Wait for more data
- }
- if (Config->Demux_EventWasSent)
- return false;
- }
- #endif //MEDIAINFO_DEMUX
- if (Buffer_Offset>=FrameInfo.Buffer_Offset_End && FrameInfo_Next.DTS!=(int64u)-1)
- {
- FrameInfo=FrameInfo_Next;
- FrameInfo_Next=frame_info();
- }
- if (Synched)
- {
- if (!IsSub)
- Buffer_TotalBytes_LastSynched=Buffer_TotalBytes+Buffer_Offset;
- }
- else
- {
- Element[Element_Level].IsComplete=true; //Else the trusting algo will think it
- Trusted_IsNot("Synchronisation lost");
- while (Element_Level)
- Element_End();
- }
- }
-
- //Trying to synchronize
- if (!Synched)
- {
- if (!Synchronize())
- {
- if (Status[IsFinished])
- Finish(); //Finish
- if (!IsSub && File_Offset_FirstSynched==(int64u)-1 && Buffer_TotalBytes+Buffer_Offset>=Buffer_TotalBytes_FirstSynched_Max)
- Reject();
- return false; //Wait for more data
- }
- Synched=true;
- if (!IsSub)
- {
- if (!UnSynched_IsNotJunk)
- Buffer_JunkBytes+=Buffer_TotalBytes+Buffer_Offset-Buffer_TotalBytes_LastSynched;
- Buffer_TotalBytes_LastSynched=Buffer_TotalBytes+Buffer_Offset;
- UnSynched_IsNotJunk=false;
- }
- if (File_Offset_FirstSynched==(int64u)-1)
- {
- Synched_Init();
- Buffer_TotalBytes_FirstSynched+=Buffer_TotalBytes+Buffer_Offset;
- File_Offset_FirstSynched=File_Offset+Buffer_Offset;
- }
- if (!Synched_Test())
- return false;
- #if MEDIAINFO_DEMUX
- if (Synched && Demux_TotalBytes<=Buffer_TotalBytes+Buffer_Offset)
- {
- if (Demux_UnpacketizeContainer && !Demux_UnpacketizeContainer_Test())
- {
- Demux_Offset-=Buffer_Offset;
- return false; //Wait for more data
- }
- if (Config->Demux_EventWasSent)
- return false;
- }
- #endif //MEDIAINFO_DEMUX
- }
-
- return true;
-}
-
-//***************************************************************************
-// File Header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File__Analyze::FileHeader_Manage()
-{
- //From the parser
- if (!Status[IsAccepted] && !FileHeader_Begin())
- {
- if (Status[IsFinished]) //Newest parsers set this bool if there is an error
- Reject();
- if (File_Offset+Buffer_Size>=File_Size)
- Reject();
- return false; //Wait for more data
- }
-
- //Positionning
- if ((Buffer_Size && Buffer_Offset+Element_Offset>Buffer_Size) || (sizeof(size_t)<sizeof(int64u) && Buffer_Offset+Element_Offset>=(int64u)(size_t)-1))
- {
- GoTo(File_Offset+Buffer_Offset+Element_Offset);
- return false;
- }
- else
- {
- Buffer_Offset+=(size_t)Element_Offset;
- Element_Offset=0;
- }
-
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return false;
- #endif //MEDIAINFO_DEMUX
-
- //From the parser
- Element_Size=Buffer_Size-Buffer_Offset;
- Element_Begin1("File Header");
- FileHeader_Parse();
- if (Element_Offset==0)
- Element_DoNotShow();
- Element_End0();
- if (Status[IsFinished]) //Newest parsers set this bool if there is an error
- {
- Finish();
- return false;
- }
-
- //Testing the parser result
- if (Element_IsWaitingForMoreData() || Element[Element_Level].UnTrusted) //Wait or problem
- {
- //The header is not complete, need more data
- #if MEDIAINFO_TRACE
- Element[Element_Level].ToShow.Details.clear();
- #endif //MEDIAINFO_TRACE
- return false;
- }
-
- //Positionning
- if ((Buffer_Size && Buffer_Offset+Element_Offset>Buffer_Size) || (sizeof(size_t)<sizeof(int64u) && Buffer_Offset+Element_Offset>=(int64u)(size_t)-1))
- {
- GoTo(File_Offset+Buffer_Offset+Element_Offset);
- return false;
- }
- else
- {
- Buffer_Offset+=(size_t)Element_Offset;
- Element_Offset=0;
- }
-
- MustParseTheHeaderFile=false;
- return true;
-}
-
-//***************************************************************************
-// Header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File__Analyze::Header_Manage()
-{
- //Test
- if (Buffer_Offset>=Buffer_Size)
- return false;
-
- //Header begin
- Element_Size=Element[Element_Level].Next-(File_Offset+Buffer_Offset);
- Element_Offset=0;
- if (!Header_Begin())
- {
- //Jumping to the end of the file if needed
- if (!EOF_AlreadyDetected && Config->ParseSpeed<1 && File_GoTo==(int64u)-1)
- {
- Element[Element_Level].WaitForMoreData=false;
- Detect_EOF();
- if ((File_GoTo!=(int64u)-1 && File_GoTo>File_Offset+Buffer_Offset) || (Status[IsFinished] && !ShouldContinueParsing))
- EOF_AlreadyDetected=true;
- }
- return false; //Wait for more data
- }
-
- //Going in a lower level
- Element_Size=Element[Element_Level].Next-(File_Offset+Buffer_Offset+Element_Offset);
- Element[Element_Level].UnTrusted=false;
- if (Buffer_Offset+Element_Size>Buffer_Size)
- {
- Element_Size=Buffer_Size-Buffer_Offset;
- Element[Element_Level].IsComplete=false;
- }
- else
- Element[Element_Level].IsComplete=true;
- if (Element_Size==0)
- return false;
- Element_Offset=0;
- Element_Begin0(); //Element
- #if MEDIAINFO_TRACE
- Data_Level=Element_Level;
- #endif //MEDIAINFO_TRACE
- Element_Begin1("Header"); //Header
-
- //Header parsing
- Header_Parse();
-
- //Testing the parser result
- if (Element[Element_Level].UnTrusted) //Problem
- {
- Element[Element_Level].UnTrusted=false;
- Header_Fill_Code(0, "Problem");
- if (MustSynchronize)
- {
- //Unsynchronizing to the next byte
- Element_Offset=1;
- Header_Fill_Size(1);
- Synched=false;
- }
- else
- {
- //Can not synchronize anymore in this block
- Element_Offset=Element[Element_Level-2].Next-(File_Offset+Buffer_Offset);
- Header_Fill_Size(Element_Offset);
- }
- }
-
- if (Element_IsWaitingForMoreData() || ((DataMustAlwaysBeComplete && Element[Element_Level-1].Next>File_Offset+Buffer_Size) || File_GoTo!=(int64u)-1) //Wait or want to have a comple data chunk
- #if MEDIAINFO_DEMUX
- || (Config->Demux_EventWasSent)
- #endif //MEDIAINFO_DEMUX
- )
- {
- //The header is not complete, need more data
- Element[Element_Level].WaitForMoreData=true;
- Element_End0(); //Header
- Element_End0(); //Element
- return false;
- }
-
- //Filling
- Element[Element_Level].WaitForMoreData=false;
- Element[Element_Level].IsComplete=true;
-
- //ToShow
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- if (Element[Element_Level-1].ToShow.Name.empty())
- Element[Element_Level-1].ToShow.Name=__T("Unknown");
- Element[Element_Level].ToShow.Size=Element_Offset;
- Element[Element_Level].ToShow.Header_Size=0;
- Element[Element_Level-1].ToShow.Header_Size=Header_Size;
- if (Element_Offset==0)
- Element_DoNotShow();
- }
- #endif //MEDIAINFO_TRACE
-
- //Integrity
- if (Element[Element_Level-1].Next<(File_Offset+Buffer_Offset+Element_Offset))
- Element[Element_Level-1].Next=File_Offset+Buffer_Offset+Element_Offset; //Size is not good
-
- //Positionning
- Element_Size=Element[Element_Level-1].Next-(File_Offset+Buffer_Offset+Element_Offset);
- Header_Size=Element_Offset;
- Buffer_Offset+=(size_t)Header_Size;
- Element_Offset=0;
- if (Buffer_Offset+Element_Size>Buffer_Size)
- {
- if (Buffer_Size>Buffer_Offset)
- Element_Size=Buffer_Size-Buffer_Offset;
- else
- Element_Size=0; //There is an error in the parsing
- Element[Element_Level-1].IsComplete=false;
- }
-
- Element_End0(); //Header
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Header_Parse()
-{
- //Filling
- Header_Fill_Code(0);
- Header_Fill_Size(Element_Size);
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Header_Fill_Code(int64u Code, const Ztring &Name)
-{
- //Filling
- Element[Element_Level-1].Code=Code;
-
- //ToShow
- if (Config_Trace_Level!=0)
- {
- Element_Level--;
- Element_Name(Name);
- Element_Level++;
- }
-}
-#endif //MEDIAINFO_TRACE
-
-void File__Analyze::Header_Fill_Code(int64u Code)
-{
- //Filling
- Element[Element_Level-1].Code=Code;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Header_Fill_Size(int64u Size)
-{
- if (Size==0)
- Trusted_IsNot("Block can't have a size of 0");
- if (DataMustAlwaysBeComplete && Size>Buffer_MaximumSize)
- {
- Element[Element_Level].IsComplete=true;
- Element[Element_Level-1].IsComplete=true;
- Trusted_IsNot("Block is too big");
- }
-
- if (Element[Element_Level].UnTrusted)
- return;
-
- //Integrity
- if (Size<Element_Offset)
- Size=Element_Offset; //At least what we read before!!!
-
- //Filling
- if (Element_Level==1)
- Element[0].Next=File_Offset+Buffer_Offset+Size;
- else if (File_Offset+Buffer_Offset+Size>Element[Element_Level-2].Next)
- Element[Element_Level-1].Next=Element[Element_Level-2].Next;
- else
- Element[Element_Level-1].Next=File_Offset+Buffer_Offset+Size;
- Element[Element_Level-1].IsComplete=true;
-
- //ToShow
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- Element[Element_Level-1].ToShow.Pos=File_Offset+Buffer_Offset;
- Element[Element_Level-1].ToShow.Size=Element[Element_Level-1].Next-(File_Offset+Buffer_Offset);
- }
- #endif //MEDIAINFO_TRACE
-}
-
-//***************************************************************************
-// Data
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File__Analyze::Data_Manage()
-{
- Element_WantNextLevel=false;
- if (!Element[Element_Level].UnTrusted)
- {
- Element_Code=Element[Element_Level].Code;
- //size_t Element_Level_Save=Element_Level;
- Data_Parse();
- BS->Attach(NULL, 0); //Clear it
- //Element_Level=Element_Level_Save;
-
- if (Buffer_Offset+(Element_WantNextLevel?Element_Offset:Element_Size)>=FrameInfo.Buffer_Offset_End)
- {
- if (Frame_Count_Previous<Frame_Count)
- Frame_Count_Previous=Frame_Count;
- if (Field_Count_Previous<Field_Count)
- Field_Count_Previous=Field_Count;
- }
-
- if (Buffer_Offset+(Element_WantNextLevel?Element_Offset:Element_Size)>=FrameInfo.Buffer_Offset_End && FrameInfo_Next.DTS!=(int64u)-1)
- {
- FrameInfo=FrameInfo_Next;
- FrameInfo_Next=frame_info();
- }
-
- //Testing the parser result
- if (Element_IsWaitingForMoreData())
- {
- //The data is not complete, need more data
- Element_End0(); //Element
- Buffer_Offset-=(size_t)Header_Size;
- return false;
- }
-
- Element[Element_Level].IsComplete=true;
-
- if (!Element_WantNextLevel && DataMustAlwaysBeComplete && Element_Offset<Element_Size)
- Element_Offset=Element_Size; //In case the element is not fully parsed, an element with size from the header is assumed
- }
-
- //If no need of more
- if (File_GoTo!=(int64u)-1 || (Status[IsFinished] && !ShouldContinueParsing)
- #if MEDIAINFO_MD5
- || Md5_ParseUpTo
- #endif //MEDIAINFO_MD5
- )
- {
- if (!Element_WantNextLevel)
- Element_End0(); //Element
- if (!Element_WantNextLevel && Element_Offset<Element_Size)
- Buffer_Offset+=(size_t)Element_Size;
- else
- {
- if (sizeof(size_t)<sizeof(int64u) && Buffer_Offset+Element_Offset>=(int64u)(size_t)-1)
- GoTo(File_Offset+Buffer_Offset+Element_Offset);
- else
- Buffer_Offset+=(size_t)Element_Offset;
- }
- Header_Size=0;
- Element_Size=0;
- Element_Offset=0;
- return false;
- }
-
- //Next element
- if (!Element_WantNextLevel
- #if MEDIAINFO_MD5
- && MD5==NULL
- #endif //MEDIAINFO_MD5
- )
- {
- if (Element[Element_Level].Next<=File_Offset+Buffer_Size)
- {
- if (Element_Offset<(size_t)(Element[Element_Level].Next-File_Offset-Buffer_Offset))
- Element_Offset=(size_t)(Element[Element_Level].Next-File_Offset-Buffer_Offset);
- }
- else if (!Status[IsFinished])
- {
- GoTo(Element[Element_Level].Next);
- if (!Element_WantNextLevel)
- Element_End0(); //Element
- return false;
- }
- }
-
- if (!Element_WantNextLevel && Element_Offset<Element_Size)
- Buffer_Offset+=(size_t)Element_Size;
- else
- {
- if (sizeof(size_t)<sizeof(int64u) && Buffer_Offset+Element_Offset>=(int64u)(size_t)-1)
- GoTo(File_Offset+Buffer_Offset+Element_Offset);
- else
- Buffer_Offset+=(size_t)Element_Offset;
- }
- Header_Size=0;
- Element_Size=0;
- Element_Offset=0;
-
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- {
- if (!Element_WantNextLevel)
- Element_End0();
- return false;
- }
- #endif //MEDIAINFO_DEMUX
-
- #if MEDIAINFO_TRACE
- if (Element_Level>0)
- Element[Element_Level-1].ToShow.NoShow=Element[Element_Level].ToShow.NoShow; //If data must not be shown, we hide the header too
- else
- Element[0].ToShow.NoShow=false; //This should never happen, but in case of
- #endif //MEDIAINFO_TRACE
- Element_End0(); //Element
- if (Element_WantNextLevel)
- Element_Level++;
- Element[Element_Level].UnTrusted=false;
-
- //Jumping to the end of the file if needed
- if (!EOF_AlreadyDetected && Config->ParseSpeed<1 && File_GoTo==(int64u)-1)
- {
- Element[Element_Level].WaitForMoreData=false;
- Detect_EOF();
- if ((File_GoTo!=(int64u)-1 && File_GoTo>File_Offset+Buffer_Offset) || (Status[IsFinished] && !ShouldContinueParsing))
- {
- EOF_AlreadyDetected=true;
- return false;
- }
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Data_Info (const Ztring &Parameter)
-{
- size_t Element_Level_Temp=Element_Level;
- Element_Level=Data_Level;
- Element_Info(Parameter);
- Element_Level=Element_Level_Temp;
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Data_Accept (const char* ParserName)
-{
- if (Status[IsAccepted] || Status[IsFinished])
- return;
-
- if (ParserName)
- Info(Ztring(ParserName)+__T(", accepted"));
-
- Accept(ParserName);
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Data_Finish (const char* ParserName)
-{
- if (ShouldContinueParsing)
- {
- //if (ParserName)
- // Info(Ztring(ParserName)+__T(", wants to finish, but should continue parsing"));
- return;
- }
-
- if (ParserName)
- Info(Ztring(ParserName)+__T(", finished"));
-
- Finish();
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Data_Reject (const char* ParserName)
-{
- Status[IsAccepted]=false;
- Status[IsFinished]=true;
- Clear();
-
- if (ParserName)// && File_Offset+Buffer_Offset+Element_Size<File_Size)
- Info(Ztring(ParserName)+__T(", rejected"));
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Data_GoTo (int64u GoTo_, const char* ParserName)
-{
- Element_Show();
-
- if (ShouldContinueParsing)
- {
- if (ParserName)
- Info(Ztring(ParserName)+__T(", wants to go to somewhere, but should continue parsing"));
- return;
- }
-
- if (IsSub)
- {
- if (ParserName)
- Info(Ztring(ParserName)+__T(", wants to go to somewhere, but is sub, waiting data"));
- return;
- }
-
- Info(Ztring(ParserName)+__T(", jumping to offset ")+Ztring::ToZtring(GoTo_, 16));
- GoTo(GoTo_);
- Element_End0();
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Data_GoToFromEnd (int64u GoToFromEnd, const char* ParserName)
-{
- if (IsSub && Config->ParseSpeed==1)
- return;
-
- if (GoToFromEnd>File_Size)
- {
- if (ParserName)
- Info(Ztring(ParserName)+__T(", wants to go to somewhere, but not valid"));
- return;
- }
-
- Data_GoTo(File_Size-GoToFromEnd, ParserName);
-}
-#endif //MEDIAINFO_TRACE
-
-
-//***************************************************************************
-// Element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-Ztring Log_Offset (int64u OffsetToShow, MediaInfo_Config::trace_Format Config_Trace_Format)
-{
- if (OffsetToShow==(int64u)-1)
- return __T(" ");
- int64u Offset=OffsetToShow%0x100000000ULL; //Only 32 bits
- Ztring Pos1; Pos1.From_Number(Offset, 16);
- Ztring Pos2;
- Pos2.resize(8-Pos1.size(), __T('0'));
- Pos2+=Pos1;
- Pos2.MakeUpperCase();
- switch (Config_Trace_Format)
- {
- case MediaInfo_Config::Trace_Format_Tree : Pos2+=__T(' '); break;
- case MediaInfo_Config::Trace_Format_CSV : Pos2+=__T(','); break;
- default : ;
- }
- return Pos2;
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-void File__Analyze::Element_Begin()
-{
- //Level
- Element_Level++;
-
- //Element
- Element[Element_Level].Code=0;
- Element[Element_Level].Next=Element[Element_Level-1].Next;
- Element[Element_Level].WaitForMoreData=Element[Element_Level-1].WaitForMoreData;
- Element[Element_Level].UnTrusted=Element[Element_Level-1].UnTrusted;
- Element[Element_Level].IsComplete=Element[Element_Level-1].IsComplete;
-
- //ToShow
- #if MEDIAINFO_TRACE
- Element[Element_Level].ToShow.Pos=File_Offset+Buffer_Offset+Element_Offset+BS->OffsetBeforeLastCall_Get(); //TODO: change this, used in Element_End0()
- if (Trace_Activated)
- {
- Element[Element_Level].ToShow.Size=Element[Element_Level].Next-(File_Offset+Buffer_Offset+Element_Offset+BS->OffsetBeforeLastCall_Get());
- Element[Element_Level].ToShow.Header_Size=0;
- Element[Element_Level].ToShow.Name.clear();
- Element[Element_Level].ToShow.Info.clear();
- Element[Element_Level].ToShow.Details.clear();
- Element[Element_Level].ToShow.NoShow=false;
- }
- #endif //MEDIAINFO_TRACE
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Element_Begin(const Ztring &Name)
-{
- //Level
- Element_Level++;
-
- //Element
- Element[Element_Level].Code=0;
- Element[Element_Level].Next=Element[Element_Level-1].Next;
- Element[Element_Level].WaitForMoreData=false;
- Element[Element_Level].UnTrusted=Element[Element_Level-1].UnTrusted;
- Element[Element_Level].IsComplete=Element[Element_Level-1].IsComplete;
-
- //ToShow
- Element[Element_Level].ToShow.Pos=File_Offset+Buffer_Offset+Element_Offset+BS->OffsetBeforeLastCall_Get(); //TODO: change this, used in Element_End0()
- if (Trace_Activated)
- {
- Element[Element_Level].ToShow.Size=Element[Element_Level].Next-(File_Offset+Buffer_Offset+Element_Offset+BS->OffsetBeforeLastCall_Get());
- Element[Element_Level].ToShow.Header_Size=0;
- Element_Name(Name);
- Element[Element_Level].ToShow.Info.clear();
- Element[Element_Level].ToShow.Details.clear();
- Element[Element_Level].ToShow.NoShow=false;
- }
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Element_Name(const Ztring &Name)
-{
- //ToShow
- if (Trace_Activated)
- {
- if (!Name.empty())
- {
- Ztring Name2=Name;
- Name2.FindAndReplace(__T("\r\n"), __T("__"), 0, Ztring_Recursive);
- Name2.FindAndReplace(__T("\r"), __T("_"), 0, Ztring_Recursive);
- Name2.FindAndReplace(__T("\n"), __T("_"), 0, Ztring_Recursive);
- if (Name2[0]==__T(' '))
- Name2[0]=__T('_');
- Element[Element_Level].ToShow.Name=Name2;
- }
- else
- Element[Element_Level].ToShow.Name=__T("(Empty)");
- }
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Element_Info(const Ztring &Parameter)
-{
- //Coherancy
- if (Config_Trace_Level==0 || !(Trace_Layers.to_ulong()&Config_Trace_Layers.to_ulong()) || Element[Element_Level].ToShow.Details.size()>64*1024*1024)
- return;
-
- //Needed?
- if (Config_Trace_Level<=0.7)
- return;
-
- //ToShow
- Ztring Parameter2(Parameter);
- Parameter2.FindAndReplace(__T("\r\n"), __T(" / "));
- Parameter2.FindAndReplace(__T("\r"), __T(" / "));
- Parameter2.FindAndReplace(__T("\n"), __T(" / "));
- switch (Config_Trace_Format)
- {
- case MediaInfo_Config::Trace_Format_Tree :
- case MediaInfo_Config::Trace_Format_CSV : Element[Element_Level].ToShow.Info+=__T(" - "); break;
- default : ;
- }
- Element[Element_Level].ToShow.Info+=Parameter2;
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Element_End(const Ztring &Name)
-{
- //ToShow
- if (Trace_Activated)
- {
- Element[Element_Level].ToShow.Size=Element[Element_Level].Next-Element[Element_Level].ToShow.Pos;
- if (!Name.empty())
- Element[Element_Level].ToShow.Name=Name;
- }
-
- Element_End_Common_Flush();
-}
-#endif //MEDIAINFO_TRACE
-
-//***************************************************************************
-// Element - Common
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Element_End_Common_Flush()
-{
- #if MEDIAINFO_TRACE
- //Size if not filled
- if (File_Offset+Buffer_Offset+Element_Offset+BS->Offset_Get()<Element[Element_Level].Next)
- Element[Element_Level].ToShow.Size=File_Offset+Buffer_Offset+Element_Offset+BS->Offset_Get()-Element[Element_Level].ToShow.Pos;
- #endif //MEDIAINFO_TRACE
-
- //Level
- if (Element_Level==0)
- return;
-
- //Element level
- Element_Level--;
-
- //Element
- Element[Element_Level].UnTrusted=Element[Element_Level+1].UnTrusted;
- Element[Element_Level].WaitForMoreData=Element[Element_Level+1].WaitForMoreData;
-
- #if MEDIAINFO_TRACE
- Element_End_Common_Flush_Details();
- #endif //MEDIAINFO_TRACE
-}
-
-#if MEDIAINFO_TRACE
-//---------------------------------------------------------------------------
-void File__Analyze::Element_End_Common_Flush_Details()
-{
- if (Trace_Activated)
- {
- if (!Element[Element_Level+1].WaitForMoreData && (Element[Element_Level+1].IsComplete || !Element[Element_Level+1].UnTrusted) && !Element[Element_Level+1].ToShow.NoShow)// && Config_Trace_Level!=0 && Element[Element_Level].ToShow.Details.size()<=64*1024*1024)
- {
- //Element
- if (!Element[Element_Level+1].ToShow.Name.empty())
- {
- if (!Element[Element_Level].ToShow.Details.empty())
- Element[Element_Level].ToShow.Details+=Config_LineSeparator;
- Element[Element_Level].ToShow.Details+=Element_End_Common_Flush_Build();
- Element[Element_Level+1].ToShow.Name.clear();
- }
-
- //Info
- if (!Element[Element_Level+1].ToShow.Details.empty())
- {
- if (!Element[Element_Level].ToShow.Details.empty())
- Element[Element_Level].ToShow.Details+=Config_LineSeparator;
- Element[Element_Level].ToShow.Details+=Element[Element_Level+1].ToShow.Details;
- Element[Element_Level+1].ToShow.Details.clear();
- }
- }
- }
-}
-#endif //MEDIAINFO_TRACE
-
-#if MEDIAINFO_TRACE
-//---------------------------------------------------------------------------
-Ztring File__Analyze::Element_End_Common_Flush_Build()
-{
- Ztring ToReturn;
-
- //Show Offset
- if (Config_Trace_Level>0.7)
- {
- ToReturn+=Log_Offset(Element[Element_Level+1].ToShow.Pos, Config_Trace_Format);
- }
-
- //Name
- switch (Config_Trace_Format)
- {
- case MediaInfo_Config::Trace_Format_Tree : ToReturn.resize(ToReturn.size()+Element_Level_Base+Element_Level, __T(' ')); break;
- case MediaInfo_Config::Trace_Format_CSV :
- ToReturn+=__T("G,");
- ToReturn+=Ztring::ToZtring(Element_Level_Base+Element_Level);
- ToReturn+=__T(',');
- break;
- default : ;
- }
- ToReturn+=Element[Element_Level+1].ToShow.Name;
-
- //Info
- ToReturn+=Element[Element_Level+1].ToShow.Info;
- Element[Element_Level+1].ToShow.Info.clear();
-
- //Size
- if (Config_Trace_Level>0.3)
- {
- switch (Config_Trace_Format)
- {
- case MediaInfo_Config::Trace_Format_Tree :
- ToReturn+=__T(" (");
- break;
- case MediaInfo_Config::Trace_Format_CSV :
- ToReturn+=__T(",(");
- break;
- default : ;
- }
- ToReturn+=Ztring::ToZtring(Element[Element_Level+1].ToShow.Size);
- if (Element[Element_Level+1].ToShow.Header_Size>0)
- {
- ToReturn+=__T("/");
- ToReturn+=Ztring::ToZtring(Element[Element_Level+1].ToShow.Size-Element[Element_Level+1].ToShow.Header_Size);
- }
- ToReturn+=__T(" bytes)");
- }
-
- return ToReturn;
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-void File__Analyze::Element_Prepare (int64u Size)
-{
- Element_Offset=0;
- Element_Size=Size;
- #if MEDIAINFO_TRACE
- Element[Element_Level].ToShow.Size=Size;
- #endif //MEDIAINFO_TRACE
-}
-//***************************************************************************
-// Param
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Param(const Ztring& Parameter, const Ztring& Value)
-{
- if (Config_Trace_Level==0 || !(Trace_Layers.to_ulong()&Config_Trace_Layers.to_ulong()))
- return;
-
- //Position
- int64u Pos=Element_Offset+BS->OffsetBeforeLastCall_Get();
-
- //Coherancy
- if (Element[Element_Level].UnTrusted)
- return;
-
- //Line separator
- if (!Element[Element_Level].ToShow.Details.empty())
- Element[Element_Level].ToShow.Details+=Config_LineSeparator;
-
- //Show Offset
- if (Config_Trace_Level>0.7)
- {
- Element[Element_Level].ToShow.Details+=Log_Offset(Pos==(int64u)-1?Pos:(File_Offset+Buffer_Offset+Pos), Config_Trace_Format);
- }
-
- //Show Parameter+Value
- switch (Config_Trace_Format)
- {
- case MediaInfo_Config::Trace_Format_Tree :
- {
- const size_t Padding_Value=40;
-
- //Show Parameter
- Ztring Param; Param=Parameter;
- if (Param.size()>Padding_Value) Param.resize(Padding_Value);
- Element[Element_Level].ToShow.Details.resize(Element[Element_Level].ToShow.Details.size()+Element_Level_Base+Element_Level, __T(' '));
- Element[Element_Level].ToShow.Details+=Param;
-
- //Show Value
- if (!Value.empty())
- {
- Element[Element_Level].ToShow.Details+=__T(": ");
- Element[Element_Level].ToShow.Details.resize(Element[Element_Level].ToShow.Details.size()+Padding_Value-Param.size()-Element_Level+1, __T(' '));
- Ztring Value2(Value);
- Value2.FindAndReplace(__T("\r\n"), __T(" / "), 0, Ztring_Recursive);
- Value2.FindAndReplace(__T("\r"), __T(" / "), 0, Ztring_Recursive);
- Value2.FindAndReplace(__T("\n"), __T(" / "), 0, Ztring_Recursive);
- Element[Element_Level].ToShow.Details+=Value2;
- }
- }
- break;
- case MediaInfo_Config::Trace_Format_CSV :
- Element[Element_Level].ToShow.Details+=__T("T,");
- Element[Element_Level].ToShow.Details+=Ztring::ToZtring(Element_Level_Base+Element_Level);
- Element[Element_Level].ToShow.Details+=__T(',');
- Element[Element_Level].ToShow.Details+=Parameter;
- Element[Element_Level].ToShow.Details+=__T(',');
- Element[Element_Level].ToShow.Details+=Value;
- break;
- default : ;
- }
-}
-#endif //MEDIAINFO_TRACE
-
-//***************************************************************************
-// Information
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Info(const Ztring& Value, size_t Element_Level_Minus)
-{
- if (Config_Trace_Format==MediaInfo_Config::Trace_Format_CSV)
- return; //Do not display info
-
- //Handling a different level (only Element_Level_Minus to 1 is currently well supported)
- size_t Element_Level_Final=Element_Level;
- if (Element_Level_Minus<=Element_Level)
- {
- if (Element_Level_Minus==1)
- {
- Element_Level--;
- Element_End_Common_Flush_Details();
- Element_Level++;
- }
- Element_Level_Final-=Element_Level_Minus;
- }
-
- if (Config_Trace_Level==0 || !(Trace_Layers.to_ulong()&Config_Trace_Layers.to_ulong()))
- return;
-
- //Coherancy
- if (Element[Element_Level_Final].UnTrusted)
- return;
-
- //Line separator
- if (!Element[Element_Level_Final].ToShow.Details.empty())
- Element[Element_Level_Final].ToShow.Details+=Config_LineSeparator;
-
- //Preparing
- Ztring ToShow; ToShow.resize(Element_Level_Final, __T(' '));
- ToShow+=__T("--- ");
- ToShow+=Value;
- ToShow+=__T(" ---");
- Ztring Separator; Separator.resize(Element_Level_Final, __T(' '));
- Separator.resize(ToShow.size(), __T('-'));
-
- //Show Offset
- Ztring Offset;
- if (Config_Trace_Level>0.7)
- Offset=Log_Offset(File_Offset+Buffer_Offset+Element_Offset+BS->Offset_Get(), Config_Trace_Format);
- Offset.resize(Offset.size()+Element_Level_Base, __T(' '));
-
- //Show Value
- Element[Element_Level_Final].ToShow.Details+=Offset;
- Element[Element_Level_Final].ToShow.Details+=Separator;
- Element[Element_Level_Final].ToShow.Details+=Config_LineSeparator;
- Element[Element_Level_Final].ToShow.Details+=Offset;
- Element[Element_Level_Final].ToShow.Details+=ToShow;
- Element[Element_Level_Final].ToShow.Details+=Config_LineSeparator;
- Element[Element_Level_Final].ToShow.Details+=Offset;
- Element[Element_Level_Final].ToShow.Details+=Separator;
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Param_Info (const Ztring &Text)
-{
- //Coherancy
- if (Element[Element_Level].UnTrusted)
- return;
- if (Config_Trace_Level==0 || !(Trace_Layers.to_ulong()&Config_Trace_Layers.to_ulong()) || Element[Element_Level].ToShow.Details.size()>64*1024*1024)
- return;
-
- //Needed?
- if (Config_Trace_Level<=0.7)
- return;
-
- //Filling
- Element[Element_Level].ToShow.Details+=__T(" - ")+Text;
-}
-#endif //MEDIAINFO_TRACE
-
-//***************************************************************************
-// Next code planning
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::NextCode_Add (int64u Code)
-{
- NextCode[Code]=true;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::NextCode_Clear ()
-{
- NextCode.clear();
-}
-
-//---------------------------------------------------------------------------
-bool File__Analyze::NextCode_Test ()
-{
- if (NextCode.find(Element_Code)==NextCode.end())
- {
- Trusted_IsNot("Frames are not in the right order");
- return false;
- }
-
- return true;
-}
-
-//***************************************************************************
-// Element trusting
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Trusted_IsNot (const char* Reason)
-#else //MEDIAINFO_TRACE
-void File__Analyze::Trusted_IsNot ()
-#endif //MEDIAINFO_TRACE
-{
- Element_Offset=Element_Size;
- BS->Attach(NULL, 0);
-
- if (!Element[Element_Level].UnTrusted)
- {
- #if MEDIAINFO_TRACE
- Param(Reason, 0);
- #endif //MEDIAINFO_TRACE
-
- //Enough data?
- if (!Element[Element_Level].IsComplete)
- {
- Element_WaitForMoreData();
- return;
- }
-
- Element[Element_Level].UnTrusted=true;
- Synched=false;
- if (!Status[IsFilled] && Trusted>0)
- Trusted--;
- }
-
- if (Trusted==0 && !Status[IsAccepted])
- Reject();
-}
-
-//***************************************************************************
-// Actions
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Accept (const char* ParserName_Char)
-#else //MEDIAINFO_TRACE
-void File__Analyze::Accept ()
-#endif //MEDIAINFO_TRACE
-{
- if (Status[IsAccepted] || Status[IsFinished])
- return;
-
- #if MEDIAINFO_TRACE
- if (ParserName.empty())
- ParserName.From_Local(ParserName_Char);
-
- if (!ParserName.empty())
- {
- bool MustElementBegin=Element_Level?true:false;
- if (Element_Level>0)
- Element_End0(); //Element
- Info(ParserName+__T(", accepted"));
- if (MustElementBegin)
- Element_Level++;
- }
- #endif //MEDIAINFO_TRACE
-
- Status[IsAccepted]=true;
- if (Count_Get(Stream_General)==0)
- {
- Stream_Prepare(Stream_General);
- Streams_Accept();
- }
-
- #if MEDIAINFO_EVENTS
- if (!IsSub)
- {
- EVENT_BEGIN (General, Parser_Selected, 0)
- std::memset(Event.Name, 0, 16);
- if (!ParserName.empty())
- strncpy(Event.Name, ParserName.To_Local().c_str(), 15);
- EVENT_END ()
-
- #if MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- if (!Demux_EventWasSent_Accept_Specific && Config->NextPacket_Get() && Config->Event_CallBackFunction_IsSet())
- Config->Demux_EventWasSent=true;
- #endif //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- }
-
- Config->Event_Accepted(this);
- #endif //MEDIAINFO_EVENTS
-}
-
-void File__Analyze::Accept (File__Analyze* Parser)
-{
- if (Parser==NULL)
- return;
-
- Parser->Accept();
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Update (const char* ParserName_Char)
-#else //MEDIAINFO_TRACE
-void File__Analyze::Update ()
-#endif //MEDIAINFO_TRACE
-{
- if (!Status[IsAccepted])
- return;
-
- Open_Buffer_Update();
-}
-
-void File__Analyze::Update (File__Analyze* Parser)
-{
- if (Parser==NULL)
- return;
-
- Parser->Update();
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Fill (const char* ParserName_Char)
-#else //MEDIAINFO_TRACE
-void File__Analyze::Fill ()
-#endif //MEDIAINFO_TRACE
-{
- if (!Status[IsAccepted] || Status[IsFilled] || Status[IsFinished])
- return;
-
- #if MEDIAINFO_TRACE
- if (ParserName.empty())
- ParserName.From_Local(ParserName_Char);
-
- if (!ParserName.empty())
- {
- bool MustElementBegin=Element_Level?true:false;
- if (Element_Level>0)
- Element_End0(); //Element
- Info(ParserName+__T(", filling"));
- if (MustElementBegin)
- Element_Level++;
- }
- #endif //MEDIAINFO_TRACE
-
- Streams_Fill();
- Status[IsFilled]=true;
- Status[IsUpdated]=true;
-
- //Instantaneous bitrate at the "fill" level
- if (File_Size==(int64u)-1 && FrameInfo.PTS!=(int64u)-1 && PTS_Begin!=(int64u)-1 && FrameInfo.PTS-PTS_Begin && StreamKind_Last!=Stream_General && StreamKind_Last!=Stream_Max)
- {
- Fill(StreamKind_Last, 0, "BitRate_Instantaneous", Buffer_TotalBytes*8*1000000000/(FrameInfo.PTS-PTS_Begin));
- (*Stream_More)[StreamKind_Last][0](Ztring().From_Local("BitRate_Instantaneous"), Info_Options)=__T("N NI");
- }
-}
-
-void File__Analyze::Fill (File__Analyze* Parser)
-{
- if (Parser==NULL)
- return;
-
- Parser->Fill();
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Finish (const char* ParserName_Char)
-#else //MEDIAINFO_TRACE
-void File__Analyze::Finish ()
-#endif //MEDIAINFO_TRACE
-{
- if (Status[IsFinished])
- return;
-
- if (!ShouldContinueParsing && !Status[IsFilled])
- Fill();
-
- if (ShouldContinueParsing || Config->ParseSpeed==1)
- {
- #if MEDIAINFO_TRACE
- if (!ParserName.empty())
- {
- bool MustElementBegin=Element_Level?true:false;
- if (Element_Level>0)
- Element_End0(); //Element
- //Info(Ztring(ParserName)+__T(", wants to finish, but should continue parsing"));
- if (MustElementBegin)
- Element_Level++;
- }
- #endif //MEDIAINFO_TRACE
-
- return;
- }
-
- ForceFinish();
-}
-
-void File__Analyze::Finish (File__Analyze* Parser)
-{
- ForceFinish(Parser); //The base parser wants, and is prepared to it, so nothing can be cancelled --> ForceFinish() instead of Finish()
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::ForceFinish (const char* ParserName_Char)
-#else //MEDIAINFO_TRACE
-void File__Analyze::ForceFinish ()
-#endif //MEDIAINFO_TRACE
-{
- if (Status[IsFinished])
- return;
-
- #if MEDIAINFO_TRACE
- if (ParserName.empty())
- ParserName.From_Local(ParserName_Char);
-
- if (!ParserName.empty())
- {
- bool MustElementBegin=Element_Level?true:false;
- if (Element_Level>0)
- Element_End0(); //Element
- Info(ParserName+__T(", finished"));
- if (MustElementBegin)
- Element_Level++;
- }
- #endif //MEDIAINFO_TRACE
-
- if (Status[IsAccepted])
- {
- //Total file size
- #if MEDIAINFO_ADVANCED
- if (!IsSub && !(!Config->File_IgnoreSequenceFileSize_Get() || Config->File_Names.size()<=1) && Config->ParseSpeed>=1.0 && Config->File_Names.size()>1 && Config->File_Names_Pos+1>=Config->File_Names.size())
- {
- Fill (Stream_General, 0, General_FileSize, Config->File_Current_Size, 10, true);
- }
- #endif //MEDIAINFO_ADVANCED
-
- Fill();
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return;
- #endif //MEDIAINFO_DEMUX
- Streams_Finish();
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return;
- #endif //MEDIAINFO_DEMUX
- if (Status[IsUpdated])
- {
- Open_Buffer_Update();
- if (IsSub)
- Status[IsUpdated]=true; //We want that container merges the result
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return;
- #endif //MEDIAINFO_DEMUX
- }
- Streams_Finish_Global();
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return;
- #endif //MEDIAINFO_DEMUX
- Ibi_Stream_Finish();
- }
-
- Status[IsFinished]=true;
-
- //Real stream size
- if (Config->ParseSpeed==1 && IsRawStream && Buffer_TotalBytes)
- {
- //Exception with text streams embedded in video
- if (StreamKind_Last==Stream_Text)
- StreamKind_Last=Stream_Video;
-
- Fill(StreamKind_Last, 0, "StreamSize", Buffer_TotalBytes, 10, true);
- }
-
- //Frame count
- if (Config->ParseSpeed==1 && IsRawStream && Frame_Count && Frame_Count!=(int64u)-1 && Retrieve(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_FrameCount)).empty())
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_FrameCount), Frame_Count);
-}
-
-void File__Analyze::ForceFinish (File__Analyze* Parser)
-{
- if (Parser==NULL)
- return;
-
- if (File_Offset+Buffer_Offset+Element_Size>=File_Size)
- {
- Element_Size=0;
- Parser->Buffer_Offset=(size_t)(Parser->File_Size-Parser->File_Offset);
- }
-
- Parser->ForceFinish();
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Reject (const char* ParserName)
-#else //MEDIAINFO_TRACE
-void File__Analyze::Reject ()
-#endif //MEDIAINFO_TRACE
-{
- Status[IsAccepted]=false;
- Status[IsFinished]=true;
- Clear();
-
- #if MEDIAINFO_TRACE
- if (ParserName)// && File_Offset+Buffer_Offset+Element_Size<File_Size)
- {
- bool MustElementBegin=Element_Level?true:false;
- if (Element_Level>0)
- Element_End0(); //Element
- Info(Ztring(ParserName)+__T(", rejected"));
- if (MustElementBegin)
- Element_Level++;
- }
- #endif //MEDIAINFO_TRACE
-}
-
-void File__Analyze::Reject (File__Analyze* Parser)
-{
- if (Parser==NULL)
- return;
-
- Parser->Reject();
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::GoTo (int64u GoTo, const char* ParserName)
-{
- if (!Status[IsAccepted])
- {
- Reject();
- return;
- }
-
- Element_Show();
-
- if (IsSub && Config->ParseSpeed==1)
- return;
-
- if (GoTo==File_Size)
- {
- BookMark_Get();
- if (File_GoTo==(int64u)-1)
- ForceFinish();
- return;
- }
-
- if (ShouldContinueParsing)
- {
- if (ParserName)
- {
- bool MustElementBegin=Element_Level?true:false;
- if (Element_Level>0)
- Element_End0(); //Element
- Info(Ztring(ParserName)+__T(", wants to go to somewhere, but should continue parsing"));
- if (MustElementBegin)
- Element_Level++;
- }
- return;
- }
-
- if (IsSub)
- {
- if (ParserName)
- {
- bool MustElementBegin=Element_Level?true:false;
- if (Element_Level>0)
- Element_End0(); //Element
- Info(Ztring(ParserName)+__T(", wants to go to somewhere, but is sub, waiting data"));
- if (MustElementBegin)
- Element_Level++;
- }
- return;
- }
-
- if (ParserName)
- {
- bool MustElementBegin=Element_Level?true:false;
- if (Element_Level>0)
- Element_End0(); //Element
- Info(Ztring(ParserName)+__T(", jumping to offset ")+Ztring::ToZtring(GoTo, 16));
- if (MustElementBegin)
- Element_Level++; //Element
- }
-
- File_GoTo=GoTo;
-
- #if MEDIAINFO_EVENTS
- EVENT_BEGIN (General, Move_Request, 0)
- Event.StreamOffset=File_GoTo;
- EVENT_END ()
- #endif //MEDIAINFO_EVENTS
-}
-#else //MEDIAINFO_TRACE
-void File__Analyze::GoTo (int64u GoTo)
-{
- if (!Status[IsAccepted])
- {
- Reject();
- return;
- }
-
- if (IsSub && Config->ParseSpeed==1)
- return;
-
- if (GoTo==File_Size)
- {
- BookMark_Get();
- if (File_GoTo==(int64u)-1)
- ForceFinish();
- return;
- }
-
- if (ShouldContinueParsing)
- {
- return;
- }
-
- if (IsSub)
- {
- return;
- }
-
- File_GoTo=GoTo;
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::GoToFromEnd (int64u GoToFromEnd, const char* ParserName)
-{
- if (GoToFromEnd>File_Size)
- {
- if (ParserName)
- {
- bool MustElementBegin=Element_Level?true:false;
- if (Element_Level>0)
- Element_End0(); //Element
- Info(Ztring(ParserName)+__T(", wants to go to somewhere, but not valid"));
- if (MustElementBegin)
- Element_Level++;
- }
- return;
- }
-
- if (File_Size==(int64u)-1)
- {
- #if MEDIAINFO_SEEK
- if (Config->File_IgnoreSequenceFileSize_Get() && GoToFromEnd)
- {
- File_GoTo=Config->File_Names.size()-1;
- File_Offset=(int64u)-1;
- Config->File_Current_Offset=(int64u)-1;
- Config->File_GoTo_IsFrameOffset=true;
- }
- else
- #endif //MEDIAINFO_SEEK
- ForceFinish(); //We can not jump
- return;
- }
-
- GoTo(File_Size-GoToFromEnd, ParserName);
-}
-#else //MEDIAINFO_TRACE
-void File__Analyze::GoToFromEnd (int64u GoToFromEnd)
-{
- if (GoToFromEnd>File_Size)
- return;
-
- if (File_Size==(int64u)-1)
- {
- #if MEDIAINFO_SEEK
- if (Config->File_IgnoreSequenceFileSize_Get() && GoToFromEnd)
- {
- File_GoTo=Config->File_Names.size()-1;
- File_Offset=(int64u)-1;
- Config->File_Current_Offset=(int64u)-1;
- Config->File_GoTo_IsFrameOffset=true;
- }
- else
- #endif //MEDIAINFO_SEEK
- ForceFinish(); //We can not jump
- return;
- }
-
- GoTo(File_Size-GoToFromEnd);
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-int64u File__Analyze::Element_Code_Get (size_t Level)
-{
- return Element[Level].Code;
-}
-
-//---------------------------------------------------------------------------
-int64u File__Analyze::Element_TotalSize_Get (size_t LevelLess)
-{
- return Element[Element_Level-LevelLess].Next-(File_Offset+Buffer_Offset);
-}
-
-//---------------------------------------------------------------------------
-bool File__Analyze::Element_IsComplete_Get ()
-{
- return Element[Element_Level].IsComplete;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Element_ThisIsAList ()
-{
- Element_WantNextLevel=true;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Element_WaitForMoreData ()
-{
- //if (File_Offset+Buffer_Size<File_Size)
- Element[Element_Level].WaitForMoreData=true;
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Element_DoNotTrust (const char* Reason)
-#else //MEDIAINFO_TRACE
-void File__Analyze::Element_DoNotTrust ()
-#endif //MEDIAINFO_TRACE
-{
- Element[Element_Level].WaitForMoreData=false;
- Element[Element_Level].IsComplete=true;
- #if MEDIAINFO_TRACE
- Trusted_IsNot(Reason);
- #else //MEDIAINFO_TRACE
- Trusted_IsNot();
- #endif //MEDIAINFO_TRACE
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Element_DoNotShow ()
-{
- Element[Element_Level].ToShow.NoShow=true;
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Element_Show ()
-{
- Element[Element_Level].ToShow.NoShow=false;
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-bool File__Analyze::Element_Show_Get ()
-{
- return !Element[Element_Level].ToShow.NoShow;
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Element_Show_Add (const Ztring &ToShow)
-{
- if (ToShow.empty())
- return;
-
- //Line separator
- if (!Element[Element_Level].ToShow.Details.empty())
- Element[Element_Level].ToShow.Details+=Config_LineSeparator;
-
- //From Sub
- Element[Element_Level].ToShow.Details+=ToShow;
-}
-#endif //MEDIAINFO_TRACE
-
-#if MEDIAINFO_TRACE
-void File__Analyze::Trace_Layers_Update(size_t Layer)
-{
- if (Layer!=(size_t)-1)
- {
- Trace_Layers.reset();
- Trace_Layers.set(Layer);
- }
- Trace_Activated=(Config_Trace_Level!=0 && (Trace_Layers&Config_Trace_Layers)!=0);
-}
-#endif //MEDIAINFO_TRACE
-
-//***************************************************************************
-// Status
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File__Analyze::Element_IsOK ()
-{
- #if !MEDIAINFO_TRACE
- if (BS && BS->BufferUnderRun)
- Trusted_IsNot();
- #endif //MEDIAINFO_TRACE
-
- return !Element[Element_Level].WaitForMoreData && !Element[Element_Level].UnTrusted;
-}
-
-//---------------------------------------------------------------------------
-bool File__Analyze::Element_IsNotFinished ()
-{
- if (BS->Remain()>0 || Element_Offset+BS->Offset_Get()<Element_Size)
- return true;
- else
- return false;
-}
-
-//---------------------------------------------------------------------------
-bool File__Analyze::Element_IsWaitingForMoreData ()
-{
- return Element[Element_Level].WaitForMoreData;
-}
-
-//***************************************************************************
-// BookMarks
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::BookMark_Set (size_t Element_Level_ToSet)
-{
- Element_Level_ToSet=Element_Level;
- BookMark_Element_Level=Element_Level_ToSet;
- BookMark_Code.resize(BookMark_Element_Level+1);
- BookMark_Next.resize(BookMark_Element_Level+1);
- for (size_t Pos=0; Pos<=BookMark_Element_Level; Pos++)
- {
- BookMark_Code[Pos]=Element[Pos].Code;
- BookMark_Next[Pos]=Element[Pos].Next;
- }
- BookMark_GoTo=File_Offset+Buffer_Offset+Element_Offset;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::BookMark_Get ()
-{
- if (!BookMark_Needed())
- return;
-
- Element_Show();
- while (Element_Level>0)
- Element_End0();
- while (Element_Level<BookMark_Element_Level)
- {
- Element_Begin1("Restarting parsing...");
- Element_WantNextLevel=true;
- }
-
- if (!BookMark_Code.empty())
- {
- for (size_t Pos=0; Pos<=BookMark_Element_Level; Pos++)
- {
- Element[Pos].Code=BookMark_Code[Pos];
- Element[Pos].Next=BookMark_Next[Pos];
- }
- BookMark_Code.clear();
- BookMark_Next.clear();
- BookMark_Element_Level=0;
- }
- if (File_GoTo==(int64u)-1)
- {
- #if MEDIAINFO_MD5
- delete MD5; MD5=NULL;
- #endif //MEDIAINFO_MD5
- File_GoTo=BookMark_GoTo;
- }
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File__Analyze::Details_Clear()
-{
- Details->clear();
- Element[0].ToShow.Details.clear();
-}
-#endif //MEDIAINFO_TRACE
-
-#if MEDIAINFO_EVENTS
-void File__Analyze::Event_Prepare(struct MediaInfo_Event_Generic* Event)
-{
- memset(Event, 0xFF, sizeof(struct MediaInfo_Event_Generic));
- Event->StreamIDs_Size=StreamIDs_Size;
- memcpy_Unaligned_Unaligned_Once1024(Event->StreamIDs, StreamIDs, 128);
- memcpy(Event->StreamIDs_Width, StreamIDs_Width, sizeof(StreamIDs_Width));
- memcpy(Event->ParserIDs, ParserIDs, sizeof(ParserIDs));
- Event->StreamOffset=File_Offset+Buffer_Offset+Element_Offset;
- Event->FrameNumber=Frame_Count_NotParsedIncluded;
- Event->PCR=FrameInfo.PCR;
- Event->DTS=(FrameInfo.DTS==(int64u)-1?FrameInfo.PTS:FrameInfo.DTS);
- Event->PTS=FrameInfo.PTS;
- Event->DUR=FrameInfo.DUR;
- //Event->FrameNumber_PresentationOrder=FrameNumber_PresentationOrder;
-}
-#endif //MEDIAINFO_EVENTS
-
-//***************************************************************************
-// Demux
-//***************************************************************************
-#if MEDIAINFO_DEMUX
-void File__Analyze::Demux (const int8u* Buffer, size_t Buffer_Size, contenttype Content_Type, const int8u* xx, size_t xxx)
-{
- if (!(Config_Demux&Demux_Level))
- return;
-
- if (!Buffer_Size)
- return;
-
- #if MEDIAINFO_DEMUX && MEDIAINFO_SEEK
- if (Config->Demux_IsSeeking)
- return;
- #endif //MEDIAINFO_SEEK
-
- #if MEDIAINFO_EVENTS
- //Demux
- if (StreamIDs_Size)
- StreamIDs[StreamIDs_Size-1]=Element_Code;
-
- EVENT_BEGIN(Global, Demux, 4)
- if (StreamIDs_Size)
- Event.EventCode|=((int32u)ParserIDs[StreamIDs_Size-1]<<24);
- Event.Content_Type=(int8u)Content_Type;
- Event.Content_Size=Buffer_Size;
- Event.Content=Buffer;
- Event.Flags=0;
- if (Demux_random_access)
- Event.Flags|=0x1; //Bit 0
- Event.Offsets_Size=Offsets_Buffer.size();
- std::vector<int64u> Offsets_Stream_Temp;
- std::vector<int64u> Offsets_Buffer_Temp;
- float64 Ratio=1;
- if (OriginalBuffer_Size)
- Ratio=((float64)File__Analyze::OriginalBuffer_Size)/File__Analyze::Buffer_Size;
- if (Offsets_Buffer.empty())
- {
- Event.Offsets_Stream=NULL;
- Event.Offsets_Content=NULL;
- }
- else if (Buffer_Offset+Element_Offset)
- {
- Offsets_Stream_Temp=Offsets_Stream;
- Offsets_Buffer_Temp=Offsets_Buffer;
- size_t Pos=0;
- if (Offsets_Buffer.size()>=2 && Offsets_Buffer.size()%2==0 && Offsets_Buffer[0]==Offsets_Buffer[1])
- {
- while (Pos+2<Offsets_Buffer_Temp.size() && Offsets_Buffer_Temp[Pos+2]<Buffer_Offset+Element_Offset)
- Pos+=2;
- if (Pos)
- {
- Offsets_Buffer_Temp.erase(Offsets_Buffer_Temp.begin(), Offsets_Buffer_Temp.begin()+Pos);
- Offsets_Stream_Temp.erase(Offsets_Stream_Temp.begin(), Offsets_Stream_Temp.begin()+Pos);
- Event.Offsets_Size-=Pos;
- }
- Offsets_Stream_Temp[0]+=(Buffer_Offset+Element_Offset)/2-Offsets_Buffer_Temp[0];
- Offsets_Stream_Temp[1]+=(Buffer_Offset+Element_Offset)/2-Offsets_Buffer_Temp[1];
- Offsets_Buffer_Temp[0]=0;
- Offsets_Buffer_Temp[1]=0;
- for (size_t Pos=2; Pos<Offsets_Buffer_Temp.size(); Pos+=2)
- {
- Offsets_Buffer_Temp[Pos]-=(Buffer_Offset+Element_Offset)/2;
- Offsets_Buffer_Temp[Pos+1]-=(Buffer_Offset+Element_Offset)/2;
- }
- }
- else
- {
- while (Pos+1<Offsets_Buffer_Temp.size() && Offsets_Buffer_Temp[Pos+1]<(Buffer_Offset+Element_Offset)*Ratio)
- Pos++;
- if (Pos)
- {
- Offsets_Buffer_Temp.erase(Offsets_Buffer_Temp.begin(), Offsets_Buffer_Temp.begin()+Pos);
- Offsets_Stream_Temp.erase(Offsets_Stream_Temp.begin(), Offsets_Stream_Temp.begin()+Pos);
- Event.Offsets_Size-=Pos;
- }
- Offsets_Stream_Temp[0]+=float64_int64s((Buffer_Offset+Element_Offset)*Ratio)-Offsets_Buffer_Temp[0];
- Offsets_Buffer_Temp[0]=0;
- for (size_t Pos=1; Pos<Offsets_Buffer_Temp.size(); Pos++)
- Offsets_Buffer_Temp[Pos]-=float64_int64s((Buffer_Offset+Element_Offset)*Ratio);
- }
- Event.Offsets_Stream=&Offsets_Stream_Temp.front();
- Event.Offsets_Content=&Offsets_Buffer_Temp.front();
- }
- else
- {
- Event.Offsets_Stream=&Offsets_Stream.front();
- Event.Offsets_Content=&Offsets_Buffer.front();
- }
- Event.OriginalContent_Size=OriginalBuffer_Size?((size_t)float64_int64s(((float64)(Element_Size-Element_Offset))*Ratio)):0;
- Event.OriginalContent=OriginalBuffer_Size?(OriginalBuffer+(size_t)float64_int64s(((float64)(Buffer_Offset+Element_Offset))*Ratio)):NULL;
- EVENT_END()
-
- if (StreamIDs_Size)
- StreamIDs[StreamIDs_Size-1]=(int64u)-1;
- #if MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- if (Status[IsAccepted] && Config->NextPacket_Get())
- Config->Demux_EventWasSent=true;
- #endif //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- if (StreamIDs_Size)
- StreamIDs[StreamIDs_Size-1]=(int64u)-1;
- #endif //MEDIAINFO_EVENTS
-}
-#endif //MEDIAINFO_DEMUX
-
-#if MEDIAINFO_DEMUX
-void File__Analyze::Demux_UnpacketizeContainer_Demux (bool random_access)
-{
- Demux_random_access=random_access;
-
- if (StreamIDs_Size>=2)
- Element_Code=StreamIDs[StreamIDs_Size-2];
- StreamIDs_Size--;
- Demux(Buffer+Buffer_Offset, Demux_Offset-Buffer_Offset, ContentType_MainStream);
- StreamIDs_Size++;
- if (StreamIDs_Size>=2)
- StreamIDs[StreamIDs_Size-2]=Element_Code;
- Demux_UnpacketizeContainer_Demux_Clear();
-}
-
-bool File__Analyze::Demux_UnpacketizeContainer_Test_OneFramePerFile ()
-{
- if (!IsSub && Buffer_Size<Config->File_Current_Size-Config->File_Current_Offset)
- {
- size_t* File_Buffer_Size_Hint_Pointer=Config->File_Buffer_Size_Hint_Pointer_Get();
- if (File_Buffer_Size_Hint_Pointer)
- (*File_Buffer_Size_Hint_Pointer) = (size_t)(Config->File_Current_Size - Config->File_Current_Offset - Buffer_Size);
- return false;
- }
-
- float64 Demux_Rate=Config->Demux_Rate_Get();
- if (!Demux_Rate)
- Demux_Rate=24;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- FrameInfo.DTS=float64_int64s(Frame_Count_NotParsedIncluded*1000000000/Demux_Rate);
- else
- FrameInfo.DTS=(int64u)-1;
- FrameInfo.PTS=FrameInfo.DTS;
- FrameInfo.DUR=float64_int64s(1000000000/Demux_Rate);
- Demux_Offset=Buffer_Size;
- Demux_UnpacketizeContainer_Demux();
-
- return true;
-}
-
-void File__Analyze::Demux_UnpacketizeContainer_Demux_Clear ()
-{
- Demux_TotalBytes=Buffer_TotalBytes+Demux_Offset;
- Demux_Offset=0;
- //if (Frame_Count || Field_Count)
- // Element_End0();
- //Element_Begin1("Frame or Field");
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// IBI
-//***************************************************************************
-#if MEDIAINFO_IBIUSAGE
-void File__Analyze::Ibi_Read_Buffer_Unsynched ()
-{
- Ibi_SynchronizationOffset_Current=(int64u)-1;
-
- if (IbiStream==NULL)
- return;
-
- IbiStream->Unsynch();
- for (size_t Pos=0; Pos<IbiStream->Infos.size(); Pos++)
- {
- if (File_GoTo==IbiStream->Infos[Pos].StreamOffset)
- {
- FrameInfo.DTS=(IbiStream->Infos[Pos].Dts!=(int64u)-1)?float64_int64s((((float64)IbiStream->Infos[Pos].Dts)*1000000000*IbiStream->DtsFrequencyDenominator/IbiStream->DtsFrequencyNumerator)):(int64u)-1;
- Frame_Count_NotParsedIncluded=IbiStream->Infos[Pos].FrameNumber;
- break;
- }
- }
-}
-
-#if MEDIAINFO_SEEK
-size_t File__Analyze::Ibi_Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- if (IbiStream==NULL)
- return (size_t)-1;
-
- //Init
- if (!Seek_Duration_Detected)
- {
- if (!IsSub)
- {
- //External IBI
- std::string IbiFile=Config->Ibi_Get();
- if (!IbiFile.empty())
- {
- IbiStream->Infos.clear(); //TODO: support IBI data from different inputs
-
- File_Ibi MI;
- Open_Buffer_Init(&MI, IbiFile.size());
- MI.Ibi=new ibi;
- MI.Open_Buffer_Continue((const int8u*)IbiFile.c_str(), IbiFile.size());
- (*IbiStream)=(*MI.Ibi->Streams.begin()->second);
- }
- }
-
- Seek_Duration_Detected=true;
- }
-
- //Parsing
- switch (Method)
- {
- case 0 :
- #if MEDIAINFO_IBI
- {
- for (size_t Pos=0; Pos<IbiStream->Infos.size(); Pos++)
- {
- if (Value<=IbiStream->Infos[Pos].StreamOffset)
- {
- if (Value<IbiStream->Infos[Pos].StreamOffset && Pos)
- Pos--;
-
- //Checking continuity of Ibi
- if (!IbiStream->Infos[Pos].IsContinuous && Pos+1<IbiStream->Infos.size())
- {
- Config->Demux_IsSeeking=true;
- GoTo((IbiStream->Infos[Pos].StreamOffset+IbiStream->Infos[Pos+1].StreamOffset)/2);
- Open_Buffer_Unsynch();
-
- return 1;
- }
-
- Config->Demux_IsSeeking=false;
-
- GoTo(IbiStream->Infos[Pos].StreamOffset);
- Open_Buffer_Unsynch();
-
- return 1;
- }
- }
-
- if (IbiStream->Infos.empty())
- {
- GoTo(0);
- Open_Buffer_Unsynch();
- }
- else if (!IbiStream->Infos[IbiStream->Infos.size()-1].IsContinuous)
- {
- GoTo(IbiStream->Infos[IbiStream->Infos.size()-1].StreamOffset);
- Open_Buffer_Unsynch();
- }
- else
- return 2; //Invalid value
- return 1;
- }
- #else //MEDIAINFO_IBI
- return (size_t)-2; //Not supported / IBI disabled
- #endif //MEDIAINFO_IBI
- case 1 :
- return Ibi_Read_Buffer_Seek(0, File_Size*Value/10000, ID);
- case 2 : //Timestamp
- #if MEDIAINFO_IBI
- {
- if (!(IbiStream->DtsFrequencyNumerator==1000000000 && IbiStream->DtsFrequencyDenominator==1))
- {
- float64 ValueF=(float64)Value;
- ValueF/=1000000000; //Value is in ns
- ValueF/=IbiStream->DtsFrequencyDenominator;
- ValueF*=IbiStream->DtsFrequencyNumerator;
- Value=float64_int64s(ValueF);
- }
-
- for (size_t Pos=0; Pos<IbiStream->Infos.size(); Pos++)
- {
- if (Value<=IbiStream->Infos[Pos].Dts)
- {
- if (Value<IbiStream->Infos[Pos].Dts && Pos)
- Pos--;
-
- //Checking continuity of Ibi
- if (!IbiStream->Infos[Pos].IsContinuous && Pos+1<IbiStream->Infos.size())
- {
- Config->Demux_IsSeeking=true;
- GoTo((IbiStream->Infos[Pos].StreamOffset+IbiStream->Infos[Pos+1].StreamOffset)/2);
- Open_Buffer_Unsynch();
-
- return 1;
- }
-
- Config->Demux_IsSeeking=false;
-
- GoTo(IbiStream->Infos[Pos].StreamOffset);
- Open_Buffer_Unsynch();
-
- return 1;
- }
- }
-
- if (IbiStream->Infos.empty())
- {
- GoTo(0);
- Open_Buffer_Unsynch();
- }
- else if (!IbiStream->Infos[IbiStream->Infos.size()-1].IsContinuous)
- {
- GoTo(IbiStream->Infos[IbiStream->Infos.size()-1].StreamOffset);
- Open_Buffer_Unsynch();
- }
- else
- return 2; //Invalid value
- return 1;
- }
- #else //MEDIAINFO_IBI
- return (size_t)-2; //Not supported / IBI disabled
- #endif //MEDIAINFO_IBI
- case 3 : //FrameNumber
- #if MEDIAINFO_IBI
- {
- for (size_t Pos=0; Pos<IbiStream->Infos.size(); Pos++)
- {
- if (Value<=IbiStream->Infos[Pos].FrameNumber)
- {
- if (Value<IbiStream->Infos[Pos].FrameNumber && Pos)
- Pos--;
-
- //Checking continuity of Ibi
- if (!IbiStream->Infos[Pos].IsContinuous && Pos+1<IbiStream->Infos.size())
- {
- Config->Demux_IsSeeking=true;
- GoTo((IbiStream->Infos[Pos].StreamOffset+IbiStream->Infos[Pos+1].StreamOffset)/2);
- Open_Buffer_Unsynch();
-
- return 1;
- }
-
- Config->Demux_IsSeeking=false;
-
- GoTo(IbiStream->Infos[Pos].StreamOffset);
- Open_Buffer_Unsynch();
-
- return 1;
- }
- }
-
- if (IbiStream->Infos.empty())
- {
- GoTo(0);
- Open_Buffer_Unsynch();
- }
- else if (!IbiStream->Infos[IbiStream->Infos.size()-1].IsContinuous)
- {
- GoTo(IbiStream->Infos[IbiStream->Infos.size()-1].StreamOffset);
- Open_Buffer_Unsynch();
- }
- else
- return 2; //Invalid value
- return 1;
- }
- #else //MEDIAINFO_IBI
- return (size_t)-2; //Not supported / IBI disabled
- #endif //MEDIAINFO_IBI
- default : return (size_t)-1; //Not supported
- }
-}
-#endif //MEDIAINFO_SEEK
-#endif //MEDIAINFO_IBIUSAGE
-
-#if MEDIAINFO_IBIUSAGE
-void File__Analyze::Ibi_Stream_Finish ()
-{
- if (IsSub)
- return;
-
- if (!(IbiStream==NULL || IbiStream->Infos.empty()) && File_Offset+Buffer_Size==File_Size)
- {
- ibi::stream::info IbiInfo;
- IbiInfo.StreamOffset=File_Offset+Buffer_Size;
- IbiInfo.FrameNumber=Frame_Count_NotParsedIncluded;
- IbiInfo.Dts=(FrameInfo.DTS!=(int64u)-1)?float64_int64s(((float64)FrameInfo.DTS)/1000000000*IbiStream->DtsFrequencyNumerator/IbiStream->DtsFrequencyDenominator):(int64u)-1;
- IbiInfo.IsContinuous=true;
- IbiStream->Add(IbiInfo);
- }
-
- if (Config_Ibi_Create)
- {
- if (!(IbiStream==NULL || IbiStream->Infos.empty()))
- Ibi.Streams[(int64u)-1]=new ibi::stream(*IbiStream);
-
- //Inform_Data
- ZtringListList Content;
- for (size_t StreamKind=Stream_General; StreamKind<Stream_Max; ++StreamKind)
- {
- ZtringListList Source=MediaInfoLib::Config.Info_Get((stream_t)StreamKind);
-
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); ++StreamPos)
- {
- ZtringList KindAndPos;
- KindAndPos.push_back(Get((stream_t)StreamKind, StreamPos, __T("StreamKind")));
- Content.push_back(KindAndPos);
-
- //Standard
- for (size_t Pos=0; Pos<Source.size(); ++Pos)
- {
- Ztring &Options=Source[Pos](Info_Options);
- if (InfoOption_ShowInSupported<Options.size() && Options[InfoOption_ShowInSupported]==__T('Y') && Pos<(*Stream)[StreamKind][StreamPos].size() && !(*Stream)[StreamKind][StreamPos][Pos].empty())
- {
- ZtringList Line;
- Line.push_back(Source[Pos][Info_Name]);
- Line.push_back((*Stream)[StreamKind][StreamPos][Pos]);
- Content.push_back(Line);
- }
- }
-
- //Additional
- for (size_t Pos=0; Pos<(*Stream_More)[StreamKind][StreamPos].size(); ++Pos)
- {
- ZtringList Line=(*Stream_More)[StreamKind][StreamPos][Pos];
- Line.resize(Info_Options+1);
- Content.push_back(Line);
- }
-
- //Separator
- Content.push_back(Ztring());
- }
- }
- if (!Content.empty())
- Content.resize(Content.size()-1);
- Ibi.Inform_Data=Content.Read();
-
- //IBI Creation
- File_Ibi_Creation IbiCreation(Ibi);
- Ztring IbiText=IbiCreation.Finish();
- if (!IbiText.empty())
- {
- Fill(Stream_General, 0, "IBI", IbiText);
- (*Stream_More)[Stream_General][0]("IBI", Info_Options)=__T("N NT");
- }
- }
-}
-
-void File__Analyze::Ibi_Stream_Finish (int64u Numerator, int64u Denominator)
-{
- if (IsSub || IbiStream==NULL)
- return;
-
- if (IbiStream->DtsFrequencyNumerator==1000000000 && IbiStream->DtsFrequencyDenominator==1 && !IbiStream->Infos.empty())
- {
- IbiStream->DtsFrequencyNumerator=Numerator;
- IbiStream->DtsFrequencyDenominator=Denominator;
- for (size_t Pos=0; Pos<IbiStream->Infos.size(); Pos++)
- if (IbiStream->Infos[Pos].Dts!=(int64u)-1)
- IbiStream->Infos[Pos].Dts=float64_int64s(((float64)IbiStream->Infos[Pos].Dts)/1000000000/Denominator*Numerator);
- }
-}
-
-void File__Analyze::Ibi_Add ()
-{
- if (IbiStream==NULL)
- return;
-
- ibi::stream::info IbiInfo;
- IbiInfo.StreamOffset=IsSub?Ibi_SynchronizationOffset_Current:(File_Offset+Buffer_Offset);
- IbiInfo.FrameNumber=Frame_Count_NotParsedIncluded;
- IbiInfo.Dts=FrameInfo.DTS;
- IbiStream->Add(IbiInfo);
-
- if (Frame_Count_NotParsedIncluded==(int64u)-1)
- Frame_Count_NotParsedIncluded=IbiStream->Infos[IbiStream->Infos_Pos-1].FrameNumber;
-}
-
-#endif //MEDIAINFO_IBCREATION
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze.h b/src/thirdparty/MediaInfo/MediaInfo/File__Analyze.h
deleted file mode 100644
index e455437b4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze.h
+++ /dev/null
@@ -1,1523 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File__AnalyzeH
-#define MediaInfo_File__AnalyzeH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Base.h"
-#include "MediaInfo/File__Analyse_Automatic.h"
-#include "ZenLib/BitStream_Fast.h"
-#include "ZenLib/BitStream_LE.h"
-#if MEDIAINFO_IBIUSAGE
- #include "MediaInfo/Multiple/File_Ibi_Creation.h"
-#endif //MEDIAINFO_IBIUSAGE
-#include "tinyxml2.h"
-#if MEDIAINFO_AES
- #include <aescpp.h>
-#endif //MEDIAINFO_AES
-#if MEDIAINFO_MD5
- extern "C"
- {
- #include <md5.h>
- }
-#endif //MEDIAINFO_MD5
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class MediaInfo_Internal;
-
-#if !MEDIAINFO_TRACE
- #include "MediaInfo/File__Analyze_MinimizeSize.h"
-#else
-
-//***************************************************************************
-// Class File__Base
-//***************************************************************************
-
-class File__Analyze : public File__Base
-{
-public :
- //***************************************************************************
- // Constructor/Destructor
- //***************************************************************************
-
- File__Analyze();
- virtual ~File__Analyze();
-
- //***************************************************************************
- // Open
- //***************************************************************************
-
- void Open_Buffer_Init ( int64u File_Size);
- void Open_Buffer_Init (File__Analyze* Sub);
- void Open_Buffer_Init (File__Analyze* Sub, int64u File_Size);
- void Open_Buffer_Continue ( const int8u* Buffer, size_t Buffer_Size);
- void Open_Buffer_Continue (File__Analyze* Sub, const int8u* Buffer, size_t Buffer_Size, bool IsNewPacket=true, float64 Ratio=1.0);
- void Open_Buffer_Continue (File__Analyze* Sub, size_t Buffer_Size) {if (Element_Offset+Buffer_Size<=Element_Size) Open_Buffer_Continue(Sub, Buffer+Buffer_Offset+(size_t)Element_Offset, Buffer_Size); Element_Offset+=Buffer_Size;}
- void Open_Buffer_Continue (File__Analyze* Sub) {if (Element_Offset<=Element_Size) Open_Buffer_Continue(Sub, Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset)); Element_Offset=Element_Size;}
- void Open_Buffer_Position_Set(int64u File_Offset);
- #if MEDIAINFO_SEEK
- size_t Open_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
- #if MEDIAINFO_ADVANCED2
- void Open_Buffer_SegmentChange();
- #endif //MEDIAINFO_ADVANCED2
- void Open_Buffer_Update ();
- void Open_Buffer_Update (File__Analyze* Sub);
- void Open_Buffer_Unsynch ();
- void Open_Buffer_Finalize (bool NoBufferModification=false);
- void Open_Buffer_Finalize (File__Analyze* Sub);
-
- //***************************************************************************
- // In/Out (for parsers)
- //***************************************************************************
-
- //In
- Ztring ParserName;
- #if MEDIAINFO_EVENTS
- size_t StreamIDs_Size;
- int64u StreamIDs[16];
- int8u StreamIDs_Width[16];
- int8u ParserIDs[16];
- void Event_Prepare (struct MediaInfo_Event_Generic* Event);
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- int8u Demux_Level; //bit 0=frame, bit 1=container, bit 2=elementary (eg MPEG-TS), bit 3=ancillary (e.g. DTVCC), default with frame set
- bool Demux_random_access;
- bool Demux_UnpacketizeContainer;
- bool Demux_IntermediateItemFound;
- size_t Demux_Offset;
- int64u Demux_TotalBytes;
- File__Analyze* Demux_CurrentParser;
- #endif //MEDIAINFO_DEMUX
- Ztring File_Name_WithoutDemux;
- bool PTS_DTS_Needed;
- struct frame_info
- {
- int64u Buffer_Offset_End;
- int64u PCR; //In nanoseconds
- int64u PTS; //In nanoseconds
- int64u DTS; //In nanoseconds
- int64u DUR; //In nanoseconds
-
- frame_info()
- {
- Buffer_Offset_End=(int64u)-1;
- PCR=(int64u)-1;
- PTS=(int64u)-1;
- DTS=(int64u)-1;
- DUR=(int64u)-1;
- }
- };
- frame_info FrameInfo;
- frame_info FrameInfo_Previous;
- frame_info FrameInfo_Next;
- std::vector<int64u> Offsets_Stream;
- std::vector<int64u> Offsets_Buffer;
- size_t Offsets_Pos;
- int8u* OriginalBuffer;
- size_t OriginalBuffer_Size;
- size_t OriginalBuffer_Capacity;
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- struct servicedescriptor
- {
- string language;
- };
- typedef std::map<int8u, servicedescriptor> servicedescriptors608;
- typedef std::map<int8u, servicedescriptor> servicedescriptors708;
- struct servicedescriptors
- {
- #if defined(MEDIAINFO_EIA608_YES)
- std::map<int8u, servicedescriptor> ServiceDescriptors608;
- #endif
- #if defined(MEDIAINFO_EIA708_YES)
- std::map<int8u, servicedescriptor> ServiceDescriptors708;
- #endif
- };
- servicedescriptors* ServiceDescriptors;
- #endif
-
- //Out
- int64u PTS_Begin; //In nanoseconds
- #if MEDIAINFO_ADVANCED2
- int64u PTS_Begin_Segment; //In nanoseconds
- #endif //MEDIAINFO_ADVANCED2
- int64u PTS_End; //In nanoseconds
- int64u DTS_Begin; //In nanoseconds
- int64u DTS_End; //In nanoseconds
- int64u Frame_Count;
- int64u Frame_Count_Previous;
- int64u Frame_Count_InThisBlock;
- int64u Field_Count;
- int64u Field_Count_Previous;
- int64u Field_Count_InThisBlock;
- int64u Frame_Count_NotParsedIncluded;
- int64u FrameNumber_PresentationOrder;
- bool Synched; //Data is synched
- bool UnSynched_IsNotJunk; //Data is actually synched
- bool MustExtendParsingDuration; //Data has some substreams difficult to detect (e.g. captions), must wait a bit before final filling
-
-protected :
- //***************************************************************************
- // Streams management
- //***************************************************************************
-
- virtual void Streams_Accept() {};
- virtual void Streams_Fill() {};
- virtual void Streams_Update() {};
- virtual void Streams_Finish() {};
-
- //***************************************************************************
- // Synchro
- //***************************************************************************
-
- virtual bool Synchronize() {Synched=true; return true;}; //Look for the synchro
- virtual bool Synched_Test() {return true;}; //Test is synchro is OK
- virtual void Synched_Init() {}; //When synched, we can Init data
- bool Synchro_Manage();
- bool Synchro_Manage_Test();
-
- //***************************************************************************
- // Buffer
- //***************************************************************************
-
- //Buffer
- virtual void Read_Buffer_Init () {}; //Temp, should be in File__Base caller
- virtual void Read_Buffer_Continue () {}; //Temp, should be in File__Base caller
- virtual void Read_Buffer_AfterParsing () {}; //Temp, should be in File__Base caller
- #if MEDIAINFO_SEEK
- virtual size_t Read_Buffer_Seek (size_t, int64u, int64u); //Temp, should be in File__Base caller
- size_t Read_Buffer_Seek_OneFramePerFile (size_t, int64u, int64u);
- #endif //MEDIAINFO_SEEK
- #if MEDIAINFO_ADVANCED2
- virtual void Read_Buffer_SegmentChange () {}; //Temp, should be in File__Base caller
- #endif //MEDIAINFO_ADVANCED2
- virtual void Read_Buffer_Unsynched () {}; //Temp, should be in File__Base caller
- void Read_Buffer_Unsynched_OneFramePerFile ();
- virtual void Read_Buffer_Finalize () {}; //Temp, should be in File__Base caller
- bool Buffer_Parse();
-
- //***************************************************************************
- // BitStream init
- //***************************************************************************
-
- void BS_Begin();
- void BS_Begin_LE(); //Little Endian version
- void BS_End();
- void BS_End_LE(); //Little Endian version
-
- //***************************************************************************
- // File Header
- //***************************************************************************
-
- //File Header - Management
- bool FileHeader_Manage ();
-
- //File Header - Begin
- virtual bool FileHeader_Begin () {return true;};
-
- //File Header - Parse
- virtual void FileHeader_Parse () {Element_DoNotShow();};
-
- //***************************************************************************
- // Header
- //***************************************************************************
-
- //Header - Management
- bool Header_Manage ();
-
- //Header - Begin
- virtual bool Header_Begin () {return true;};
-
- //Header - Parse
- virtual void Header_Parse ();
-
- //Header - Info
- void Header_Fill_Code (int64u Code);
- void Header_Fill_Code (int64u Code, const Ztring &Name);
- #define Header_Fill_Code2(A,B) Header_Fill_Code(A,B)
- void Header_Fill_Size (int64u Size);
-
- //***************************************************************************
- // Data
- //***************************************************************************
-
- //Header - Management
- bool Data_Manage ();
-
- //Data - Parse
- virtual void Data_Parse () {};
-
- //Data - Info
- void Data_Info (const Ztring &Parameter);
- inline void Data_Info_From_Milliseconds (int64u Parameter) {Data_Info(Ztring().Duration_From_Milliseconds(Parameter));}
-
- //Data - Get info
- size_t Data_Remain () {return (size_t)(Element_Size-(Element_Offset+BS->Offset_Get()));};
- size_t Data_BS_Remain () {return (size_t)BS->Remain();};
-
- //Data - Detect EOF
- virtual void Detect_EOF () {};
- bool EOF_AlreadyDetected;
-
- //Data - Helpers
- void Data_Accept (const char* ParserName);
- void Data_Reject (const char* ParserName);
- void Data_Finish (const char* ParserName);
- void Data_GoTo (int64u GoTo, const char* ParserName);
- void Data_GoToFromEnd (int64u GoToFromEnd, const char* ParserName);
-
- //***************************************************************************
- // Elements
- //***************************************************************************
-
- //Elements - Begin
- void Element_Begin ();
- void Element_Begin (const Ztring &Name);
- inline void Element_Begin (const char *Name) {Element_Begin(Ztring().From_UTF8(Name));}
- #define Element_Begin0() Element_Begin()
- #define Element_Begin1(_NAME) Element_Begin(_NAME)
- #define Element_Trace_Begin0() Element_Begin()
- #define Element_Trace_Begin1(_NAME) Element_Begin(_NAME)
-
- //Elements - Name
- void Element_Name (const Ztring &Name);
- inline void Element_Name (const char* Name) {Element_Name(Ztring().From_UTF8(Name));}
-
- //Elements - Info
- void Element_Info (const Ztring &Parameter);
- inline void Element_Info (const char* Parameter) {Element_Info(Ztring().From_UTF8(Parameter));}
- inline void Element_Info (const char* Parameter, const char* Measure) {Element_Info(Ztring().From_UTF8(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Element_Info (int8s Parameter, const char* Measure=NULL) {Element_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Element_Info (int8u Parameter, const char* Measure=NULL) {Element_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Element_Info (int16s Parameter, const char* Measure=NULL) {Element_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Element_Info (int16u Parameter, const char* Measure=NULL) {Element_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Element_Info (int32s Parameter, const char* Measure=NULL) {Element_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Element_Info (int32u Parameter, const char* Measure=NULL) {Element_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Element_Info (int64s Parameter, const char* Measure=NULL) {Element_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Element_Info (int64u Parameter, const char* Measure=NULL) {Element_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Element_Info (int128u Parameter, const char* Measure=NULL) {Element_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- #ifdef SIZE_T_IS_LONG
- inline void Element_Info (size_t Parameter, const char* Measure=NULL) {Element_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- #endif //SIZE_T_IS_LONG
- inline void Element_Info (float32 Parameter, int8u AfterComma=3, const char* Measure=NULL) {Element_Info(Ztring::ToZtring(Parameter, AfterComma)+Ztring().From_UTF8(Measure));}
- inline void Element_Info (float64 Parameter, int8u AfterComma=3, const char* Measure=NULL) {Element_Info(Ztring::ToZtring(Parameter, AfterComma)+Ztring().From_UTF8(Measure));}
- #define Element_Info1(_A) Element_Info(_A)
- #define Element_Info2(_A,_B) Element_Info(_A, _B)
- #define Element_Info3(_A,_B,_C) Element_Info(_A, _B, _C)
- #define Element_Info1C(_CONDITION,_A) if (_CONDITION) Element_Info(_A)
- inline void Element_Info_From_Milliseconds (int64u Parameter) {Element_Info(Ztring().Duration_From_Milliseconds(Parameter));}
-
- //Elements - End
- inline void Element_End () {Element_End_Common_Flush();}
- void Element_End (const Ztring &Name);
- inline void Element_End (const char *Name) {Element_End(Ztring().From_UTF8(Name));}
- #define Element_End0() Element_End()
- #define Element_End1(_NAME) Element_End(_NAME)
- #define Element_Trace_End0() Element_End()
- #define Element_Trace_End1(_NAME) Element_End(_NAME)
-
- //Elements - Preparation of element from external app
- void Element_Prepare (int64u Size);
-
-protected :
- //Element - Common
- void Element_End_Common_Flush();
- void Element_End_Common_Flush_Details();
- Ztring Element_End_Common_Flush_Build();
-public :
-
- //***************************************************************************
- // Param
- //***************************************************************************
-
- //TODO: put this in Ztring()
- Ztring ToZtring(const char* Value, size_t Value_Size=Unlimited, bool Utf8=true)
- {
- if (Utf8)
- return Ztring().From_UTF8(Value, Value_Size);
- else
- return Ztring().From_Local(Value, Value_Size);
- }
- #define VALUE(Value) \
- Ztring::ToZtring(Value).MakeUpperCase()+__T(" (0x")+Ztring::ToZtring(Value, 16).MakeUpperCase()+__T(")")
-
- //Param - Main
- void Param (const Ztring &Parameter, const Ztring& Value);
- inline void Param (const char* Parameter, const Ztring& Value) {Param(Ztring().From_Local(Parameter), Value);};
- inline void Param (const char* Parameter, const std::string& Value) {Param(Parameter, Ztring().From_Local(Value.c_str()));}
- inline void Param (const char* Parameter, const char* Value, size_t Value_Size=Unlimited, bool Utf8=true) {Param(Parameter, ToZtring(Value, Value_Size, Utf8));}
- inline void Param (const char* Parameter, const int8u* Value, size_t Value_Size=Unlimited, bool Utf8=true) {Param(Parameter, (const char*)Value, Value_Size, Utf8);}
- inline void Param (const char* Parameter, bool Value) {if (Value) Param(Parameter, "Yes"); else Param(Parameter, "No");}
- inline void Param (const char* Parameter, int8u Value) {Param(Parameter, Ztring::ToZtring(Value)+__T(" (0x")+Ztring().From_CC1(Value)+__T(")"));}
- inline void Param (const char* Parameter, int8s Value) {Param(Parameter, Ztring::ToZtring(Value)+__T(" (0x")+Ztring().From_CC1(Value)+__T(")"));}
- inline void Param (const char* Parameter, int16u Value) {Param(Parameter, Ztring::ToZtring(Value)+__T(" (0x")+Ztring().From_CC2(Value)+__T(")"));}
- inline void Param (const char* Parameter, int16s Value) {Param(Parameter, Ztring::ToZtring(Value)+__T(" (0x")+Ztring().From_CC2(Value)+__T(")"));}
- inline void Param (const char* Parameter, int32u Value) {Param(Parameter, Ztring::ToZtring(Value)+__T(" (0x")+Ztring::ToZtring(Value, 16)+__T(")"));}
- inline void Param (const char* Parameter, int32s Value) {Param(Parameter, Ztring::ToZtring(Value)+__T(" (0x")+Ztring::ToZtring(Value, 16)+__T(")"));}
- inline void Param (const char* Parameter, int64u Value) {Param(Parameter, Ztring::ToZtring(Value)+__T(" (0x")+Ztring::ToZtring(Value, 16)+__T(")"));}
- inline void Param (const char* Parameter, int64s Value) {Param(Parameter, Ztring::ToZtring(Value)+__T(" (0x")+Ztring::ToZtring(Value, 16)+__T(")"));}
- inline void Param (const char* Parameter, int128u Value){Param(Parameter, Ztring::ToZtring(Value)+__T(" (0x")+Ztring::ToZtring(Value, 16)+__T(")"));}
- inline void Param_GUID (const char* Parameter, int128u Value){Param(Parameter, Ztring().From_GUID(Value));}
- inline void Param_UUID (const char* Parameter, int128u Value){Param(Parameter, Ztring().From_UUID(Value));}
- #ifdef SIZE_T_IS_LONG
- inline void Param (const char* Parameter, size_t Value, intu Radix=16) {Param(Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase()+__T(" (")+Ztring::ToZtring(Value, 10).MakeUpperCase()+__T(")"));}
- #endif //SIZE_T_IS_LONG
- inline void Param (const char* Parameter, float32 Value, int8u AfterComma=3) {Param(Parameter, Ztring::ToZtring(Value, AfterComma));}
- inline void Param (const char* Parameter, float64 Value, int8u AfterComma=3) {Param(Parameter, Ztring::ToZtring(Value, AfterComma));}
- inline void Param (const char* Parameter, float80 Value, int8u AfterComma=3) {Param(Parameter, Ztring::ToZtring(Value, AfterComma));}
- inline void Param (const int32u Parameter, const Ztring& Value) {Param(Ztring().From_CC4(Parameter), Value);};
- inline void Param (const int16u Parameter, const Ztring& Value) {Param(Ztring().From_CC2(Parameter), Value);};
- #define Param1(_A) Param_(_A)
- #define Param2(_A,_B) Param(_A, _B)
- #define Param3(_A,_B,_C) Param(_A, _B, _C)
-
- //Param - Info
- void Param_Info (const Ztring &Parameter);
- inline void Param_Info (const char* Parameter) {Param_Info(Ztring().From_UTF8(Parameter));}
- inline void Param_Info (const char* Parameter, const char* Measure) {Param_Info(Ztring().From_UTF8(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Param_Info (int64u Parameter, const char* Measure=NULL) {Param_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Param_Info (int64s Parameter, const char* Measure=NULL) {Param_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Param_Info (int32u Parameter, const char* Measure=NULL) {Param_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Param_Info (int32s Parameter, const char* Measure=NULL) {Param_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Param_Info (int16u Parameter, const char* Measure=NULL) {Param_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Param_Info (int16s Parameter, const char* Measure=NULL) {Param_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Param_Info (int8u Parameter, const char* Measure=NULL) {Param_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Param_Info (int8s Parameter, const char* Measure=NULL) {Param_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- inline void Param_Info (float32 Parameter, int8u AfterComma=3, const char* Measure=NULL) {Param_Info(Ztring::ToZtring(Parameter, AfterComma)+Ztring().From_UTF8(Measure));}
- inline void Param_Info (float64 Parameter, int8u AfterComma=3, const char* Measure=NULL) {Param_Info(Ztring::ToZtring(Parameter, AfterComma)+Ztring().From_UTF8(Measure));}
- inline void Param_Info (float80 Parameter, int8u AfterComma=3, const char* Measure=NULL) {Param_Info(Ztring::ToZtring(Parameter, AfterComma)+Ztring().From_UTF8(Measure));}
- #ifdef SIZE_T_IS_LONG
- inline void Param_Info (size_t Parameter, const char* Measure=NULL) {Param_Info(Ztring::ToZtring(Parameter)+Ztring().From_UTF8(Measure));}
- #endif //SIZE_T_IS_LONG
- #define Param_Info1(_A) Param_Info(_A)
- #define Param_Info2(_A,_B) Param_Info(_A, _B)
- #define Param_Info3(_A,_B,_C) Param_Info(_A, _B, _C)
- #define Param_Info1C(_CONDITION,_A) if (_CONDITION) Param_Info(_A)
- #define Param_Info2C(_CONDITION,_A,_B) if (_CONDITION) Param_Info(_A, _B)
- #define Param_Info3C(_CONDITION,_A,_B,_C) if (_CONDITION) Param_Info(_A, _B, _C)
- inline void Param_Info_From_Milliseconds (int64u Parameter) {Param_Info(Ztring().Duration_From_Milliseconds(Parameter));}
-
- //***************************************************************************
- // Information
- //***************************************************************************
-
- void Info (const Ztring& Value, size_t Element_Level_Minus=0);
-
- //***************************************************************************
- // Big Endian (Integer, Float, Fixed-Point)
- //***************************************************************************
-
- void Get_B1 (int8u &Info, const char* Name);
- void Get_B2 (int16u &Info, const char* Name);
- void Get_B3 (int32u &Info, const char* Name);
- void Get_B4 (int32u &Info, const char* Name);
- void Get_B5 (int64u &Info, const char* Name);
- void Get_B6 (int64u &Info, const char* Name);
- void Get_B7 (int64u &Info, const char* Name);
- void Get_B8 (int64u &Info, const char* Name);
- void Get_B16 (int128u &Info, const char* Name);
- void Get_BF2 (float32 &Info, const char* Name);
- void Get_BF4 (float32 &Info, const char* Name);
- void Get_BF8 (float64 &Info, const char* Name);
- void Get_BF10 (float80 &Info, const char* Name);
- void Get_BFP4 (int8u Bits, float32 &Info, const char* Name);
- void Peek_B1 (int8u &Info);
- void Peek_B2 (int16u &Info);
- void Peek_B3 (int32u &Info);
- void Peek_B4 (int32u &Info);
- void Peek_B5 (int64u &Info);
- void Peek_B6 (int64u &Info);
- void Peek_B7 (int64u &Info);
- void Peek_B8 (int64u &Info);
- void Peek_B16 (int128u &Info);
- void Peek_BF4 (float32 &Info);
- void Peek_BF8 (float64 &Info);
- void Peek_BF10(float64 &Info);
- void Peek_BFP4(size_t Bits, float64 &Info);
- void Skip_B1 ( const char* Name);
- void Skip_B2 ( const char* Name);
- void Skip_B3 ( const char* Name);
- void Skip_B4 ( const char* Name);
- void Skip_B5 ( const char* Name);
- void Skip_B6 ( const char* Name);
- void Skip_B7 ( const char* Name);
- void Skip_B8 ( const char* Name);
- void Skip_B16 ( const char* Name);
- void Skip_BF4 ( const char* Name);
- void Skip_BF8 ( const char* Name);
- void Skip_BF10( const char* Name);
- void Skip_BFP4(int8u Bits, const char* Name);
- #define Info_B1(_INFO, _NAME) int8u _INFO; Get_B1 (_INFO, _NAME)
- #define Info_B2(_INFO, _NAME) int16u _INFO; Get_B2 (_INFO, _NAME)
- #define Info_B3(_INFO, _NAME) int32u _INFO; Get_B3 (_INFO, _NAME)
- #define Info_B4(_INFO, _NAME) int32u _INFO; Get_B4 (_INFO, _NAME)
- #define Info_B5(_INFO, _NAME) int64u _INFO; Get_B5 (_INFO, _NAME)
- #define Info_B6(_INFO, _NAME) int64u _INFO; Get_B6 (_INFO, _NAME)
- #define Info_B7(_INFO, _NAME) int64u _INFO; Get_B7 (_INFO, _NAME)
- #define Info_B8(_INFO, _NAME) int64u _INFO; Get_B8 (_INFO, _NAME)
- #define Info_B16(_INFO, _NAME) int128u _INFO; Get_B16 (_INFO, _NAME)
- #define Info_BF2(_INFO, _NAME) float32 _INFO; Get_BF2 (_INFO, _NAME)
- #define Info_BF4(_INFO, _NAME) float32 _INFO; Get_BF4 (_INFO, _NAME)
- #define Info_BF8(_INFO, _NAME) float64 _INFO; Get_BF8 (_INFO, _NAME)
- #define Info_BF10(_INFO, _NAME) float80 _INFO; Get_BF10(_INFO, _NAME)
- #define Info_BFP4(_BITS, _INFO, _NAME) float32 _INFO; Get_BFP4(_BITS, _INFO, _NAME)
-
- //***************************************************************************
- // Little Endian
- //***************************************************************************
-
- void Get_L1 (int8u &Info, const char* Name);
- void Get_L2 (int16u &Info, const char* Name);
- void Get_L3 (int32u &Info, const char* Name);
- void Get_L4 (int32u &Info, const char* Name);
- void Get_L5 (int64u &Info, const char* Name);
- void Get_L6 (int64u &Info, const char* Name);
- void Get_L7 (int64u &Info, const char* Name);
- void Get_L8 (int64u &Info, const char* Name);
- void Get_L16 (int128u &Info, const char* Name);
- void Get_LF4 (float32 &Info, const char* Name);
- void Get_LF8 (float64 &Info, const char* Name);
- void Peek_L1 (int8u &Info);
- void Peek_L2 (int16u &Info);
- void Peek_L3 (int32u &Info);
- void Peek_L4 (int32u &Info);
- void Peek_L5 (int64u &Info);
- void Peek_L6 (int64u &Info);
- void Peek_L7 (int64u &Info);
- void Peek_L8 (int64u &Info);
- void Peek_L16(int128u &Info);
- void Peek_LF4(float32 &Info);
- void Peek_LF8(float64 &Info);
- void Skip_L1 ( const char* Name);
- void Skip_L2 ( const char* Name);
- void Skip_L3 ( const char* Name);
- void Skip_L4 ( const char* Name);
- void Skip_L5 ( const char* Name);
- void Skip_L6 ( const char* Name);
- void Skip_L7 ( const char* Name);
- void Skip_L8 ( const char* Name);
- void Skip_LF4( const char* Name);
- void Skip_LF8( const char* Name);
- void Skip_L16( const char* Name);
- #define Info_L1(_INFO, _NAME) int8u _INFO; Get_L1 (_INFO, _NAME)
- #define Info_L2(_INFO, _NAME) int16u _INFO; Get_L2 (_INFO, _NAME)
- #define Info_L3(_INFO, _NAME) int32u _INFO; Get_L3 (_INFO, _NAME)
- #define Info_L4(_INFO, _NAME) int32u _INFO; Get_L4 (_INFO, _NAME)
- #define Info_L5(_INFO, _NAME) int64u _INFO; Get_L5 (_INFO, _NAME)
- #define Info_L6(_INFO, _NAME) int64u _INFO; Get_L6 (_INFO, _NAME)
- #define Info_L7(_INFO, _NAME) int64u _INFO; Get_L7 (_INFO, _NAME)
- #define Info_L8(_INFO, _NAME) int64u _INFO; Get_L8 (_INFO, _NAME)
- #define Info_L16(_INFO, _NAME) int128u _INFO; Get_L16(_INFO, _NAME)
- #define Info_LF4(_INFO, _NAME) float32 _INFO; Get_LF4(_INFO, _NAME)
- #define Info_LF8(_INFO, _NAME) float64 _INFO; Get_LF8(_INFO, _NAME)
-
- //***************************************************************************
- // Little and Big Endian together
- //***************************************************************************
-
- void Get_D1 (int8u &Info, const char* Name);
- void Get_D2 (int16u &Info, const char* Name);
- void Get_D3 (int32u &Info, const char* Name);
- void Get_D4 (int32u &Info, const char* Name);
- void Get_D5 (int64u &Info, const char* Name);
- void Get_D6 (int64u &Info, const char* Name);
- void Get_D7 (int64u &Info, const char* Name);
- void Get_D8 (int64u &Info, const char* Name);
- void Get_D16 (int128u &Info, const char* Name);
- void Get_DF4 (float32 &Info, const char* Name);
- void Get_DF8 (float64 &Info, const char* Name);
- void Peek_D1 (int8u &Info);
- void Peek_D2 (int16u &Info);
- void Peek_D3 (int32u &Info);
- void Peek_D4 (int32u &Info);
- void Peek_D5 (int64u &Info);
- void Peek_D6 (int64u &Info);
- void Peek_D7 (int64u &Info);
- void Peek_D8 (int64u &Info);
- void Peek_D16(int128u &Info);
- void Peek_DF4(float32 &Info);
- void Peek_DF8(float64 &Info);
- void Skip_D1 ( const char* Name);
- void Skip_D2 ( const char* Name);
- void Skip_D3 ( const char* Name);
- void Skip_D4 ( const char* Name);
- void Skip_D5 ( const char* Name);
- void Skip_D6 ( const char* Name);
- void Skip_D7 ( const char* Name);
- void Skip_D8 ( const char* Name);
- void Skip_DF4( const char* Name);
- void Skip_DF8( const char* Name);
- void Skip_D16( const char* Name);
- #define Info_D1(_INFO, _NAME) int8u _INFO; Get_D1 (_INFO, _NAME)
- #define Info_D2(_INFO, _NAME) int16u _INFO; Get_D2 (_INFO, _NAME)
- #define Info_D3(_INFO, _NAME) int32u _INFO; Get_D3 (_INFO, _NAME)
- #define Info_D4(_INFO, _NAME) int32u _INFO; Get_D4 (_INFO, _NAME)
- #define Info_D5(_INFO, _NAME) int64u _INFO; Get_D5 (_INFO, _NAME)
- #define Info_D6(_INFO, _NAME) int64u _INFO; Get_D6 (_INFO, _NAME)
- #define Info_D7(_INFO, _NAME) int64u _INFO; Get_D7 (_INFO, _NAME)
- #define Info_D8(_INFO, _NAME) int64u _INFO; Get_D8 (_INFO, _NAME)
- #define Info_D16(_INFO, _NAME) int128u _INFO; Get_D16(_INFO, _NAME)
- #define Info_DF4(_INFO, _NAME) float32 _INFO; Get_DF4(_INFO, _NAME)
- #define Info_DF8(_INFO, _NAME) float64 _INFO; Get_DF8(_INFO, _NAME)
-
- //***************************************************************************
- // GUID
- //***************************************************************************
-
- void Get_GUID (int128u &Info, const char* Name);
- void Peek_GUID(int128u &Info);
- void Skip_GUID( const char* Name);
- #define Info_GUID(_INFO, _NAME) int128u _INFO; Get_GUID(_INFO, _NAME)
-
- //***************************************************************************
- // UUID
- //***************************************************************************
-
- void Get_UUID (int128u &Info, const char* Name);
- void Peek_UUID(int128u &Info);
- void Skip_UUID( const char* Name);
- #define Info_UUID(_INFO, _NAME) int128u _INFO; Get_UUID(_INFO, _NAME)
-
- //***************************************************************************
- // EBML
- //***************************************************************************
-
- void Get_EB (int64u &Info, const char* Name);
- void Get_ES (int64s &Info, const char* Name);
- void Skip_EB( const char* Name);
- void Skip_ES( const char* Name);
- #define Info_EB(_INFO, _NAME) int64u _INFO; Get_EB(_INFO, _NAME)
- #define Info_ES(_INFO, _NAME) int64s _INFO; Get_ES(_INFO, _NAME)
-
- //***************************************************************************
- // Variable Size Value
- //***************************************************************************
-
- void Get_VS (int64u &Info, const char* Name);
- void Skip_VS( const char* Name);
- #define Info_VS(_INFO, _NAME) int64u _INFO; Get_VS(_INFO, _NAME)
-
- //***************************************************************************
- // Exp-Golomb
- //***************************************************************************
-
- void Get_UE (int32u &Info, const char* Name);
- void Get_SE (int32s &Info, const char* Name);
- void Skip_UE( const char* Name);
- void Skip_SE( const char* Name);
- #define Info_UE(_INFO, _NAME) int32u _INFO; Get_UE(_INFO, _NAME)
- #define Info_SE(_INFO, _NAME) int32s _INFO; Get_SE(_INFO, _NAME)
-
- //***************************************************************************
- // Interleaved Exp-Golomb
- //***************************************************************************
-
- void Get_UI (int32u &Info, const char* Name);
- void Get_SI (int32s &Info, const char* Name);
- void Skip_UI( const char* Name);
- void Skip_SI( const char* Name);
- #define Info_UI(_INFO, _NAME) int32u _INFO; Get_UI(_INFO, _NAME)
- #define Info_SI(_INFO, _NAME) int32s _INFO; Get_SI(_INFO, _NAME)
-
- //***************************************************************************
- // Variable Length Code
- //***************************************************************************
-
- struct vlc
- {
- int32u value;
- int8u bit_increment;
- int8s mapped_to1;
- int8s mapped_to2;
- int8s mapped_to3;
- };
- struct vlc_fast
- {
- int8u* Array;
- int8u* BitsToSkip;
- const vlc* Vlc;
- int8u Size;
- };
- #define VLC_END \
- {(int32u)-1, (int8u)-1, 0, 0, 0}
- void Get_VL_Prepare(vlc_fast &Vlc);
- void Get_VL (const vlc Vlc[], size_t &Info, const char* Name);
- void Get_VL (vlc_fast &Vlc, size_t &Info, const char* Name);
- void Skip_VL(const vlc Vlc[], const char* Name);
- void Skip_VL(vlc_fast &Vlc, const char* Name);
- #define Info_VL(Vlc, Info, Name) size_t Info; Get_VL(Vlc, Info, Name)
-
- //***************************************************************************
- // Characters
- //***************************************************************************
-
- void Get_C1 (int8u &Info, const char* Name);
- void Get_C2 (int16u &Info, const char* Name);
- void Get_C3 (int32u &Info, const char* Name);
- void Get_C4 (int32u &Info, const char* Name);
- void Get_C5 (int64u &Info, const char* Name);
- void Get_C6 (int64u &Info, const char* Name);
- void Get_C7 (int64u &Info, const char* Name);
- void Get_C8 (int64u &Info, const char* Name);
- void Skip_C1( const char* Name);
- void Skip_C2( const char* Name);
- void Skip_C3( const char* Name);
- void Skip_C4( const char* Name);
- void Skip_C5( const char* Name);
- void Skip_C6( const char* Name);
- void Skip_C7( const char* Name);
- void Skip_C8( const char* Name);
- #define Info_C1(_INFO, _NAME) int8u _INFO; Get_C1(_INFO, _NAME)
- #define Info_C2(_INFO, _NAME) int16u _INFO; Get_C2(_INFO, _NAME)
- #define Info_C3(_INFO, _NAME) int32u _INFO; Get_C3(_INFO, _NAME)
- #define Info_C4(_INFO, _NAME) int32u _INFO; Get_C4(_INFO, _NAME)
- #define Info_C5(_INFO, _NAME) int64u _INFO; Get_C5(_INFO, _NAME)
- #define Info_C6(_INFO, _NAME) int64u _INFO; Get_C6(_INFO, _NAME)
- #define Info_C7(_INFO, _NAME) int64u _INFO; Get_C7(_INFO, _NAME)
- #define Info_C8(_INFO, _NAME) int64u _INFO; Get_C8(_INFO, _NAME)
-
- //***************************************************************************
- // Text
- //***************************************************************************
-
- void Get_Local (int64u Bytes, Ztring &Info, const char* Name);
- void Get_ISO_6937_2(int64u Bytes, Ztring &Info, const char* Name);
- void Get_ISO_8859_1(int64u Bytes, Ztring &Info, const char* Name);
- void Get_ISO_8859_2(int64u Bytes, Ztring &Info, const char* Name);
- void Get_ISO_8859_5(int64u Bytes, Ztring &Info, const char* Name);
- void Get_String (int64u Bytes, std::string &Info, const char* Name);
- void Get_UTF8 (int64u Bytes, Ztring &Info, const char* Name);
- void Get_UTF16 (int64u Bytes, Ztring &Info, const char* Name);
- void Get_UTF16B (int64u Bytes, Ztring &Info, const char* Name);
- void Get_UTF16L (int64u Bytes, Ztring &Info, const char* Name);
- void Peek_Local (int64u Bytes, Ztring &Info);
- void Peek_String(int64u Bytes, std::string &Info);
- void Skip_Local (int64u Bytes, const char* Name);
- void Skip_ISO_6937_2(int64u Bytes, const char* Name);
- void Skip_String(int64u Bytes, const char* Name);
- void Skip_UTF8 (int64u Bytes, const char* Name);
- void Skip_UTF16B(int64u Bytes, const char* Name);
- void Skip_UTF16L(int64u Bytes, const char* Name);
- #define Info_Local(_BYTES, _INFO, _NAME) Ztring _INFO; Get_Local (_BYTES, _INFO, _NAME)
- #define Info_ISO_6937_2(_BYTES, _INFO, _NAME) Ztring _INFO; Get_ISO_6937_2 (_BYTES, _INFO, _NAME)
- #define Info_UTF8(_BYTES, _INFO, _NAME) Ztring _INFO; Get_UTF8 (_BYTES, _INFO, _NAME)
- #define Info_UTF16B(_BYTES, _INFO, _NAME) Ztring _INFO; Get_UTF16B(_BYTES, _INFO, _NAME)
- #define Info_UTF16L(_BYTES, _INFO, _NAME) Ztring _INFO; Get_UTF16L(_BYTES, _INFO, _NAME)
-
- //***************************************************************************
- // PAscal strings
- //***************************************************************************
-
- void Get_PA (std::string &Info, const char* Name);
- void Peek_PA(std::string &Info);
- void Skip_PA( const char* Name);
- #define Info_PA(_INFO, _NAME) Ztring _INFO; Get_PA (_INFO, _NAME)
-
- //***************************************************************************
- // Unknown
- //***************************************************************************
-
- void Skip_XX(int64u Bytes, const char* Name);
-
- //***************************************************************************
- // Flags
- //***************************************************************************
-
- void Get_Flags (int64u Flags, size_t Order, bool &Info, const char* Name);
- void Get_Flags (int64u ValueToPut, int8u &Info, const char* Name);
- void Skip_Flags(int64u Flags, size_t Order, const char* Name);
- void Skip_Flags(int64u ValueToPut, const char* Name);
- #define Get_FlagsM(_VALUE, _INFO, _NAME) Get_Flags(_VALUE, _INFO, _NAME)
- #define Skip_FlagsM(_VALUE, _NAME) Skip_Flags(_VALUE, _NAME)
- #define Info_Flags(_FLAGS, _ORDER, _INFO, _NAME) bool _INFO; Get_Flags (_FLAGS, _ORDER, _INFO, _NAME)
-
- //***************************************************************************
- // BitStream
- //***************************************************************************
-
- void Get_BS (int8u Bits, int32u &Info, const char* Name);
- void Get_SB ( bool &Info, const char* Name);
- bool Get_SB( const char* Name) {bool Temp; Get_SB(Temp, Name); return Temp;}
- void Get_S1 (int8u Bits, int8u &Info, const char* Name);
- void Get_S2 (int8u Bits, int16u &Info, const char* Name);
- void Get_S3 (int8u Bits, int32u &Info, const char* Name);
- void Get_S4 (int8u Bits, int32u &Info, const char* Name);
- void Get_S5 (int8u Bits, int64u &Info, const char* Name);
- void Get_S6 (int8u Bits, int64u &Info, const char* Name);
- void Get_S7 (int8u Bits, int64u &Info, const char* Name);
- void Get_S8 (int8u Bits, int64u &Info, const char* Name);
- void Peek_BS(int8u Bits, int32u &Info);
- void Peek_SB( bool &Info);
- bool Peek_SB() {bool Temp; Peek_SB(Temp); return Temp;}
- void Peek_S1(int8u Bits, int8u &Info);
- void Peek_S2(int8u Bits, int16u &Info);
- void Peek_S3(int8u Bits, int32u &Info);
- void Peek_S4(int8u Bits, int32u &Info);
- void Peek_S5(int8u Bits, int64u &Info);
- void Peek_S6(int8u Bits, int64u &Info);
- void Peek_S7(int8u Bits, int64u &Info);
- void Peek_S8(int8u Bits, int64u &Info);
- void Skip_BS(size_t Bits, const char* Name);
- void Skip_SB( const char* Name);
- void Skip_S1(int8u Bits, const char* Name);
- void Skip_S2(int8u Bits, const char* Name);
- void Skip_S3(int8u Bits, const char* Name);
- void Skip_S4(int8u Bits, const char* Name);
- void Skip_S5(int8u Bits, const char* Name);
- void Skip_S6(int8u Bits, const char* Name);
- void Skip_S7(int8u Bits, const char* Name);
- void Skip_S8(int8u Bits, const char* Name);
- void Mark_0 ();
- void Mark_0_NoTrustError (); //Use it for providing a warning instead of a non-trusting error
- void Mark_1 ();
- void Mark_1_NoTrustError (); //Use it for providing a warning instead of a non-trusting error
- #define Info_BS(_BITS, _INFO, _NAME) int32u _INFO; Get_BS(_BITS, _INFO, _NAME)
- #define Info_SB(_INFO, _NAME) bool _INFO; Get_SB( _INFO, _NAME)
- #define Info_S1(_BITS, _INFO, _NAME) int8u _INFO; Get_S1(_BITS, _INFO, _NAME)
- #define Info_S2(_BITS, _INFO, _NAME) int16u _INFO; Get_S2(_BITS, _INFO, _NAME)
- #define Info_S3(_BITS, _INFO, _NAME) int32u _INFO; Get_S4(_BITS, _INFO, _NAME)
- #define Info_S4(_BITS, _INFO, _NAME) int32u _INFO; Get_S4(_BITS, _INFO, _NAME)
- #define Info_S5(_BITS, _INFO, _NAME) int64u _INFO; Get_S5(_BITS, _INFO, _NAME)
- #define Info_S6(_BITS, _INFO, _NAME) int64u _INFO; Get_S6(_BITS, _INFO, _NAME)
- #define Info_S7(_BITS, _INFO, _NAME) int64u _INFO; Get_S7(_BITS, _INFO, _NAME)
- #define Info_S8(_BITS, _INFO, _NAME) int64u _INFO; Get_S8(_BITS, _INFO, _NAME)
-
- #define TEST_SB_GET(_CODE, _NAME) \
- { \
- Peek_SB(_CODE); \
- if (!_CODE) \
- Skip_SB( _NAME); \
- else \
- { \
- Element_Begin1(_NAME); \
- Skip_SB( _NAME); \
-
- #define TEST_SB_SKIP(_NAME) \
- { \
- if (!Peek_SB()) \
- Skip_SB( _NAME); \
- else \
- { \
- Element_Begin1(_NAME); \
- Skip_SB( _NAME); \
-
- #define TESTELSE_SB_GET(_CODE, _NAME) \
- { \
- Peek_SB(_CODE); \
- if (_CODE) \
- { \
- Element_Begin1(_NAME); \
- Skip_SB( _NAME); \
-
- #define TESTELSE_SB_SKIP(_NAME) \
- { \
- if (Peek_SB()) \
- { \
- Element_Begin1(_NAME); \
- Skip_SB( _NAME); \
-
- #define TESTELSE_SB_ELSE(_NAME) \
- Element_End0(); \
- } \
- else \
- { \
- Skip_SB( _NAME); \
-
- #define TESTELSE_SB_END() \
- } \
- } \
-
- #define TEST_SB_END() \
- Element_End0(); \
- } \
- } \
-
- //***************************************************************************
- // BitStream (Little Endian)
- //***************************************************************************
-
- void Get_BT (size_t Bits, int32u &Info, const char* Name);
- void Get_TB ( bool &Info, const char* Name);
- bool Get_TB( const char* Name) {bool Temp; Get_TB(Temp, Name); return Temp;}
- void Get_T1 (size_t Bits, int8u &Info, const char* Name);
- void Get_T2 (size_t Bits, int16u &Info, const char* Name);
- void Get_T4 (size_t Bits, int32u &Info, const char* Name);
- void Get_T8 (size_t Bits, int64u &Info, const char* Name);
- void Peek_BT(size_t Bits, int32u &Info);
- void Peek_TB( bool &Info);
- bool Peek_TB() {bool Temp; Peek_TB(Temp); return Temp;}
- void Peek_T1(size_t Bits, int8u &Info);
- void Peek_T2(size_t Bits, int16u &Info);
- void Peek_T4(size_t Bits, int32u &Info);
- void Peek_T8(size_t Bits, int64u &Info);
- void Skip_BT(size_t Bits, const char* Name);
- void Skip_TB( const char* Name);
- void Skip_T1(size_t Bits, const char* Name);
- void Skip_T2(size_t Bits, const char* Name);
- void Skip_T4(size_t Bits, const char* Name);
- void Skip_T8(size_t Bits, const char* Name);
- #define Info_BT(_BITS, _INFO, _NAME) int32u _INFO; Get_BT(_BITS, _INFO, _NAME)
- #define Info_TB(_INFO, _NAME) bool _INFO; Get_TB( _INFO, _NAME)
- #define Info_T1(_BITS, _INFO, _NAME) int8u _INFO; Get_T1(_BITS, _INFO, _NAME)
- #define Info_T2(_BITS, _INFO, _NAME) int16u _INFO; Get_T2(_BITS, _INFO, _NAME)
- #define Info_T4(_BITS, _INFO, _NAME) int32u _INFO; Get_T4(_BITS, _INFO, _NAME)
- #define Info_T8(_BITS, _INFO, _NAME) int64u _INFO; Get_T8(_BITS, _INFO, _NAME)
-
- #define TEST_TB_GET(_CODE, _NAME) \
- { \
- Peek_TB(_CODE); \
- if (!_CODE) \
- Skip_TB( _NAME); \
- else \
- { \
- Element_Begin1(_NAME); \
- Skip_TB( _NAME); \
-
- #define TEST_TB_SKIP(_NAME) \
- { \
- if (!Peek_TB()) \
- Skip_TB( _NAME); \
- else \
- { \
- Element_Begin1(_NAME); \
- Skip_TB( _NAME); \
-
- #define TESTELSE_TB_GET(_CODE, _NAME) \
- { \
- Peek_TB(_CODE); \
- if (_CODE) \
- { \
- Element_Begin1(_NAME); \
- Skip_TB( _NAME); \
-
- #define TESTELSE_TB_SKIP(_NAME) \
- { \
- if (Peek_TB()) \
- { \
- Element_Begin1(_NAME); \
- Skip_TB( _NAME); \
-
- #define TESTELSE_TB_ELSE(_NAME) \
- Element_End0(); \
- } \
- else \
- { \
- Skip_TB( _NAME); \
-
- #define TESTELSE_TB_END() \
- } \
- } \
-
- #define TEST_TB_END() \
- Element_End0(); \
- } \
- } \
-
- //***************************************************************************
- // Next code planning
- //***************************************************************************
-
- void NextCode_Add(int64u Code);
- void NextCode_Clear();
- bool NextCode_Test();
-
- //***************************************************************************
- // Element trusting
- //***************************************************************************
-
- void Trusted_IsNot (const char* Reason);
-
- //***************************************************************************
- // Stream filling
- //***************************************************************************
-
- //Elements - Preparation of element from external app
- size_t Stream_Prepare (stream_t KindOfStream, size_t StreamPos=(size_t)-1);
- size_t Stream_Erase (stream_t KindOfStream, size_t StreamPos);
-
- //Fill with datas (with parameter as a size_t)
- void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, const Ztring &Value, bool Replace=false);
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, const std::string &Value, bool Utf8=true, bool Replace=false) {if (Utf8) Fill(StreamKind, StreamPos, Parameter, Ztring().From_UTF8(Value.c_str(), Value.size()), Replace); else Fill(StreamKind, StreamPos, Parameter, Ztring().From_Local(Value.c_str(), Value.size()), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, const char* Value, size_t Value_Size=Unlimited, bool Utf8=true, bool Replace=false) {if (Utf8) Fill(StreamKind, StreamPos, Parameter, Ztring().From_UTF8(Value, Value_Size), Replace); else Fill(StreamKind, StreamPos, Parameter, Ztring().From_Local(Value, Value_Size), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, const wchar_t* Value, size_t Value_Size=Unlimited, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring().From_Unicode(Value, Value_Size), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int8u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int8s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int16u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int16s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int32u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int32s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int64u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int64s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, float32 Value, int8u AfterComma=3, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, AfterComma), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, float64 Value, int8u AfterComma=3, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, AfterComma), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, float80 Value, int8u AfterComma=3, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, AfterComma), Replace);}
- #ifdef SIZE_T_IS_LONG
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, size_t Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- #endif //SIZE_T_IS_LONG
- //Fill with datas
- void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, const Ztring &Value, bool Replace=false);
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, const std::string &Value, bool Utf8=true, bool Replace=false) {if (Utf8) Fill(StreamKind, StreamPos, Parameter, Ztring().From_UTF8(Value.c_str(), Value.size())); else Fill(StreamKind, StreamPos, Parameter, Ztring().From_Local(Value.c_str(), Value.size()), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, const char* Value, size_t Value_Size=Unlimited, bool Utf8=true, bool Replace=false) {if (Utf8) Fill(StreamKind, StreamPos, Parameter, Ztring().From_UTF8(Value, Value_Size), Replace); else Fill(StreamKind, StreamPos, Parameter, Ztring().From_Local(Value, Value_Size), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, const wchar_t* Value, size_t Value_Size=Unlimited, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring().From_Unicode(Value, Value_Size), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int8u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int8s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int16u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int16s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int32u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int32s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int64u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int64s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, float32 Value, int8u AfterComma=3, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, AfterComma), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, float64 Value, int8u AfterComma=3, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, AfterComma), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, float80 Value, int8u AfterComma=3, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, AfterComma), Replace);}
- #ifdef SIZE_T_IS_LONG
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, size_t Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- #endif //SIZE_T_IS_LONG
- ZtringListList Fill_Temp;
- void Fill_Flush ();
- static size_t Fill_Parameter(stream_t StreamKind, generic StreamPos);
-
- const Ztring &Retrieve_Const (stream_t StreamKind, size_t StreamPos, size_t Parameter, info_t KindOfInfo=Info_Text);
- Ztring Retrieve (stream_t StreamKind, size_t StreamPos, size_t Parameter, info_t KindOfInfo=Info_Text);
- const Ztring &Retrieve_Const (stream_t StreamKind, size_t StreamPos, const char* Parameter, info_t KindOfInfo=Info_Text);
- Ztring Retrieve (stream_t StreamKind, size_t StreamPos, const char* Parameter, info_t KindOfInfo=Info_Text);
-
- void Clear (stream_t StreamKind, size_t StreamPos, size_t Parameter);
- void Clear (stream_t StreamKind, size_t StreamPos, const char* Parameter);
- void Clear (stream_t StreamKind, size_t StreamPos);
- void Clear (stream_t StreamKind);
- inline void Clear () {File__Base::Clear();}
-
- //***************************************************************************
- // Filling
- //***************************************************************************
-
- //Actions
- void Accept (const char* ParserName=NULL);
- void Accept (File__Analyze* Parser);
- void Reject (const char* ParserName=NULL);
- void Reject (File__Analyze* Parser);
- void Update (const char* ParserName=NULL);
- void Update (File__Analyze* Parser);
- void Fill (const char* ParserName=NULL);
- void Fill (File__Analyze* Parser);
- void Finish (const char* ParserName=NULL);
- void Finish (File__Analyze* Parser);
- void ForceFinish (const char* ParserName=NULL);
- void ForceFinish (File__Analyze* Parser);
- void GoTo (int64u GoTo, const char* ParserName=NULL);
- void GoToFromEnd (int64u GoToFromEnd, const char* ParserName=NULL);
- int64u Element_Code_Get (size_t Level);
- int64u Element_TotalSize_Get (size_t LevelLess=0);
- bool Element_IsComplete_Get ();
- void Element_ThisIsAList ();
- void Element_WaitForMoreData ();
- void Element_DoNotTrust (const char* Reason);
- void Element_DoNotShow ();
- void Element_Show ();
- bool Element_Show_Get ();
- void Element_Show_Add (const Ztring &ToShow);
-
- //Status
- bool Element_IsOK ();
- bool Element_IsNotFinished ();
- bool Element_IsWaitingForMoreData ();
-
- //***************************************************************************
- // Merging
- //***************************************************************************
-
- //Utils
-public :
- size_t Merge(MediaInfo_Internal &ToAdd, bool Erase=true); //Merge 2 File_Base
- size_t Merge(MediaInfo_Internal &ToAdd, stream_t StreamKind, size_t StreamPos_From, size_t StreamPos_To, bool Erase=true); //Merge 2 streams
- size_t Merge(File__Analyze &ToAdd, bool Erase=true); //Merge 2 File_Base
- size_t Merge(File__Analyze &ToAdd, stream_t StreamKind, size_t StreamPos_From, size_t StreamPos_To, bool Erase=true); //Merge 2 streams
-
- void CodecID_Fill (const Ztring &Value, stream_t StreamKind, size_t StreamPos, infocodecid_format_t Format, stream_t StreamKind_CodecID=Stream_Max);
- void PixelAspectRatio_Fill (const Ztring &Value, stream_t StreamKind, size_t StreamPos, size_t Parameter_Width, size_t Parameter_Height, size_t Parameter_PixelAspectRatio, size_t Parameter_DisplayAspectRatio);
- void DisplayAspectRatio_Fill(const Ztring &Value, stream_t StreamKind, size_t StreamPos, size_t Parameter_Width, size_t Parameter_Height, size_t Parameter_PixelAspectRatio, size_t Parameter_DisplayAspectRatio);
-
- //***************************************************************************
- // Finalize
- //***************************************************************************
-
- //End
- void Streams_Finish_Global();
-
-protected :
- void Streams_Finish_StreamOnly();
- void Streams_Finish_StreamOnly(stream_t StreamKid, size_t StreamPos);
- void Streams_Finish_StreamOnly_General(size_t StreamPos);
- void Streams_Finish_StreamOnly_Video(size_t StreamPos);
- void Streams_Finish_StreamOnly_Audio(size_t StreamPos);
- void Streams_Finish_StreamOnly_Text(size_t StreamPos);
- void Streams_Finish_StreamOnly_Other(size_t StreamPos);
- void Streams_Finish_StreamOnly_Image(size_t StreamPos);
- void Streams_Finish_StreamOnly_Menu(size_t StreamPos);
- void Streams_Finish_InterStreams();
- void Streams_Finish_Cosmetic();
- void Streams_Finish_Cosmetic(stream_t StreamKid, size_t StreamPos);
- void Streams_Finish_Cosmetic_General(size_t StreamPos);
- void Streams_Finish_Cosmetic_Video(size_t StreamPos);
- void Streams_Finish_Cosmetic_Audio(size_t StreamPos);
- void Streams_Finish_Cosmetic_Text(size_t StreamPos);
- void Streams_Finish_Cosmetic_Chapters(size_t StreamPos);
- void Streams_Finish_Cosmetic_Image(size_t StreamPos);
- void Streams_Finish_Cosmetic_Menu(size_t StreamPos);
- void Streams_Finish_HumanReadable();
- void Streams_Finish_HumanReadable_PerStream(stream_t StreamKind, size_t StreamPos, size_t Parameter);
-
- void Tags ();
- void Video_FrameRate_Rounding (size_t Pos, video Parameter);
- void Video_BitRate_Rounding (size_t Pos, video Parameter);
- void Audio_BitRate_Rounding (size_t Pos, audio Parameter);
-
- //Utils - Finalize
- void Duration_Duration123 (stream_t StreamKind, size_t StreamPos, size_t Parameter);
- void FileSize_FileSize123 (stream_t StreamKind, size_t StreamPos, size_t Parameter);
- void Kilo_Kilo123 (stream_t StreamKind, size_t StreamPos, size_t Parameter);
- void Value_Value123 (stream_t StreamKind, size_t StreamPos, size_t Parameter);
- void YesNo_YesNo (stream_t StreamKind, size_t StreamPos, size_t Parameter);
-
- //***************************************************************************
- //
- //***************************************************************************
-
-protected :
- //Save for speed improvement
- float Config_Trace_Level;
- std::bitset<32> Config_Trace_Layers;
- MediaInfo_Config::trace_Format Config_Trace_Format;
- int8u Config_Demux;
- Ztring Config_LineSeparator;
- bool IsSub;
- bool IsRawStream;
-
- //Configuration
- bool DataMustAlwaysBeComplete; //Data must always be complete, else wait for more data
- bool MustUseAlternativeParser; //Must use the second parser (example: for Data part)
-
- //Synchro
- bool MustParseTheHeaderFile; //There is an header part, must parse it
- size_t Trusted;
- size_t Trusted_Multiplier;
-
- //Elements
- size_t Element_Level; //Current level
- bool Element_WantNextLevel; //Want to go to the next leavel instead of the same level
-
- //Element
- int64u Element_Code; //Code filled in the file, copy of Element[Element_Level].Code
- int64u Element_Offset; //Position in the Element (without header)
- int64u Element_Size; //Size of the Element (without header)
-
-private :
- //***************************************************************************
- // Buffer
- //***************************************************************************
-
- void Buffer_Clear(); //Clear the buffer
-protected :
- //Buffer
- bool Open_Buffer_Continue_Loop();
- const int8u* Buffer;
-public : //TO CHANGE
- size_t Buffer_Size;
- int64u Buffer_TotalBytes;
- int64u Buffer_TotalBytes_FirstSynched;
- int64u Buffer_TotalBytes_LastSynched;
- int64u Buffer_PaddingBytes;
- int64u Buffer_JunkBytes;
- float64 Stream_BitRateFromContainer;
-protected :
- int8u* Buffer_Temp;
- size_t Buffer_Temp_Size;
- size_t Buffer_Temp_Size_Max;
- size_t Buffer_Offset; //Temporary usage in this parser
- size_t Buffer_Offset_Temp; //Temporary usage in this parser
- size_t Buffer_MinimumSize;
- size_t Buffer_MaximumSize;
- int64u Buffer_TotalBytes_FirstSynched_Max;
- int64u Buffer_TotalBytes_Fill_Max;
- friend class File__Tags_Helper;
-
- //***************************************************************************
- // Helpers
- //***************************************************************************
-
- bool FileHeader_Begin_0x000001();
- bool FileHeader_Begin_XML(tinyxml2::XMLDocument &Document);
- bool Synchronize_0x000001();
-public:
- void TestContinuousFileNames(size_t CountOfFiles=24, Ztring FileExtension=Ztring());
-
-private :
-
- //***************************************************************************
- // Elements
- //***************************************************************************
-
- //Data
- size_t Data_Level; //Current level for Data ("Top level")
-
- //Element
- BitStream_Fast* BS; //For conversion from bytes to bitstream
- BitStream* BT; //For conversion from bytes to bitstream
-public : //TO CHANGE
- int64u Header_Size; //Size of the header of the current element
- const Ztring &Details_Get() {return Element[0].ToShow.Details;} //Direct access to details
- void Details_Clear();
-protected :
- bool Trace_DoNotSave;
- bool Trace_Activated;
- std::bitset<32> Trace_Layers;
- void Trace_Layers_Update (size_t Layer=(size_t)-1);
-private :
-
- //Elements
- size_t Element_Level_Base; //From other parsers
-
- struct element_details
- {
- struct to_show
- {
- int64u Pos; //Position of the element in the file
- int64u Size; //Size of the element (including header and sub-elements)
- int64u Header_Size; //Size of the header of the element
- Ztring Name; //Name planned for this element
- Ztring Info; //More info about the element
- Ztring Details; //The main text
- bool NoShow; //Don't show this element
- };
-
- int64u Code; //Code filled in the file
- int64u Next; //
- bool WaitForMoreData; //This element is not complete, we need more data
- bool UnTrusted; //This element has a problem
- bool IsComplete; //This element is fully buffered, no need of more
- to_show ToShow;
- };
- std::vector<element_details> Element;
-
- //NextCode
- std::map<int64u, bool> NextCode;
-
- //BookMarks
- size_t BookMark_Element_Level;
- int64u BookMark_GoTo;
- std::vector<int64u> BookMark_Code;
- std::vector<int64u> BookMark_Next;
-
-public :
- void BookMark_Set(size_t Element_Level_ToGet=(size_t)-1);
- void BookMark_Get();
- virtual bool BookMark_Needed() {return false;};
-
- //Temp
- std::bitset<32> Status;
- enum status
- {
- IsAccepted,
- IsFilled,
- IsUpdated,
- IsFinished,
- Reserved_04,
- Reserved_05,
- Reserved_06,
- Reserved_07,
- Reserved_08,
- Reserved_09,
- Reserved_10,
- Reserved_11,
- Reserved_12,
- Reserved_13,
- Reserved_14,
- Reserved_15,
- User_16,
- User_17,
- User_18,
- User_19,
- User_20,
- User_21,
- User_22,
- User_23,
- User_24,
- User_25,
- User_26,
- User_27,
- User_28,
- User_29,
- User_30,
- User_31,
- };
- bool ShouldContinueParsing;
-
- //Configuration
- bool MustSynchronize;
- bool CA_system_ID_MustSkipSlices;
-
- //Demux
- enum contenttype
- {
- ContentType_MainStream,
- ContentType_SubStream,
- ContentType_Header,
- ContentType_Synchro
- };
- #if MEDIAINFO_DEMUX
- void Demux (const int8u* Buffer, size_t Buffer_Size, contenttype ContentType, const int8u* OriginalBuffer=NULL, size_t OriginalBuffer_Size=0);
- virtual bool Demux_UnpacketizeContainer_Test() {return true;}
- bool Demux_UnpacketizeContainer_Test_OneFramePerFile();
- void Demux_UnpacketizeContainer_Demux(bool random_access=true);
- void Demux_UnpacketizeContainer_Demux_Clear();
- bool Demux_EventWasSent_Accept_Specific;
- #else //MEDIAINFO_DEMUX
- #define Demux(_A, _B, _C)
- #endif //MEDIAINFO_DEMUX
-
- //Events data
- bool PES_FirstByte_IsAvailable;
- bool PES_FirstByte_Value;
-
- int64u Unsynch_Frame_Count;
-
- //AES
- #if MEDIAINFO_AES
- AESdecrypt* AES;
- int8u* AES_IV;
- int8u* AES_Decrypted;
- size_t AES_Decrypted_Size;
- #endif //MEDIAINFO_AES
-
- //MD5
- #if MEDIAINFO_MD5
- struct MD5Context* MD5;
- int64u Md5_ParseUpTo;
- #endif //MEDIAINFO_MD5
-
- #if MEDIAINFO_SEEK
- private:
- bool Seek_Duration_Detected;
- #endif //MEDIAINFO_SEEK
-
- #if MEDIAINFO_IBIUSAGE
- public:
- int64u Ibi_SynchronizationOffset_Current;
- int64u Ibi_SynchronizationOffset_BeginOfFrame;
- #endif //MEDIAINFO_IBIUSAGE
- #if MEDIAINFO_IBIUSAGE
- public:
- bool Config_Ibi_Create;
- ibi Ibi; //If Main only
- ibi::stream* IbiStream; //If sub only
- size_t Ibi_Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- void Ibi_Read_Buffer_Unsynched ();
- void Ibi_Stream_Finish ();
- void Ibi_Stream_Finish (int64u Numerator, int64u Denominator); //Partial
- void Ibi_Add ();
- #else //MEDIAINFO_IBIUSAGE
- size_t Ibi_Read_Buffer_Seek (size_t, int64u, int64u) {return (size_t)-1;}
- void Ibi_Read_Buffer_Unsynched () {}
- void Ibi_Stream_Finish () {}
- void Ibi_Stream_Finish (int64u, int64u) {}
- void Ibi_Add () {}
- #endif //MEDIAINFO_IBIUSAGE
-};
-
-//Helpers
-#define DETAILS_INFO(_DATA) _DATA
-
-#endif //MEDIAINFO_TRACE
-
-} //NameSpace
-
-
-
-/*
-#define BS_END() \
- { \
- BS.Byte_Align(); \
- int32u BS_Value=0x00; \
- while(BS.Remain()>0 && BS_Value==0x00) \
- BS_Value=BS.Get(8); \
- if (BS_Value!=0x00) \
- INTEGRITY_SIZE(BS.Offset_Get()-1, BS.Offset_Get()) \
- else \
- INTEGRITY_SIZE(BS.Offset_Get(), BS.Offset_Get()) \
- } \
-
-#define BS_END_FF() \
- { \
- BS.Byte_Align(); \
- int32u BS_Value=0xFF; \
- while(BS.Remain()>0 && BS_Value==0x00) \
- BS_Value=BS.Get(8); \
- if (BS_Value!=0xFF) \
- INTEGRITY_SIZE(BS.Offset_Get()-1, BS.Offset_Get()) \
- else \
- INTEGRITY_SIZE(BS.Offset_Get(), BS.Offset_Get()) \
- } \
-
-#define BS_END_CANBEMORE() \
- { \
- } \
-*/
-
-
- //Begin
- #define FILLING_BEGIN() \
- if (Element_IsOK()) \
- {
-
- #define FILLING_BEGIN_PRECISE() \
- if (Element_IsOK() && Element_Offset==Element_Size) \
- {
-
- //Else
- #define FILLING_ELSE() \
- } \
- else \
- { \
-
- //End
- #define FILLING_END() \
- }
-
-#define ATOM_BEGIN \
- if (Level!=Element_Level) \
- { \
- Level++; \
- switch (Element_Code_Get(Level)) \
- { \
-
-#define ATOM(_ATOM) \
- case Elements::_ATOM : \
- if (Level==Element_Level) \
- { \
- if (Element_IsComplete_Get()) \
- _ATOM(); \
- else \
- { \
- Element_WaitForMoreData(); \
- return; \
- } \
- } \
- break; \
-
-#define ATOM_PARTIAL(_ATOM) \
- case Elements::_ATOM : \
- if (Level==Element_Level) \
- _ATOM(); \
- break; \
-
-#define ATOM_DEFAULT(_ATOM) \
- default : \
- if (Level==Element_Level) \
- { \
- if (Element_IsComplete_Get()) \
- _ATOM(); \
- else \
- { \
- Element_WaitForMoreData(); \
- return; \
- } \
- } \
- break; \
-
-#define ATOM_END \
- default : \
- Skip_XX(Element_TotalSize_Get(), "Unknown"); \
- } \
- } \
- break; \
-
-#define LIST(_ATOM) \
- case Elements::_ATOM : \
- if (Level==Element_Level) \
- { \
- Element_ThisIsAList(); \
- _ATOM(); \
- } \
-
-#define LIST_DEFAULT(_ATOM) \
- default : \
- if (Level==Element_Level) \
- { \
- Element_ThisIsAList(); \
- _ATOM(); \
- } \
-
-#define ATOM_END_DEFAULT \
- } \
- } \
- break; \
-
-#define ATOM_DEFAULT_ALONE(_ATOM) \
- if (Level!=Element_Level) \
- { \
- Level++; \
- if (Level==Element_Level) \
- { \
- if (Element_IsComplete_Get()) \
- _ATOM(); \
- else \
- { \
- Element_WaitForMoreData(); \
- return; \
- } \
- } \
- } \
- break; \
-
-#define LIST_DEFAULT_ALONE_BEGIN(_ATOM) \
- if (Level!=Element_Level) \
- { \
- Level++; \
- if (Level==Element_Level) \
- { \
- Element_ThisIsAList(); \
- _ATOM(); \
- } \
-
-#define LIST_DEFAULT_ALONE_END \
- } \
- break; \
-
-#define LIST_SKIP(_ATOM) \
- case Elements::_ATOM : \
- if (Level==Element_Level) \
- { \
- Element_ThisIsAList(); \
- _ATOM(); \
- } \
- break; \
-
-
-#define DATA_BEGIN \
- size_t Level=0; \
- ATOM_BEGIN \
-
-#define DATA_END \
- default : ; \
- Skip_XX(Element_TotalSize_Get(), "Unknown"); \
- } \
- } \
-
-#define DATA_DEFAULT \
- default : \
-
-#define DATA_END_DEFAULT \
- } \
- } \
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Buffer.cpp b/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Buffer.cpp
deleted file mode 100644
index e1434b27e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Buffer.cpp
+++ /dev/null
@@ -1,2538 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-#if MEDIAINFO_TRACE
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/MediaInfo_Config.h"
-#include "ZenLib/BitStream_LE.h"
-#include <cmath>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//Integrity test
-#define INTEGRITY(TOVALIDATE, ERRORTEXT, OFFSET) \
- if (!(TOVALIDATE)) \
- { \
- Trusted_IsNot(ERRORTEXT); \
- return; \
- } \
-
-#define INTEGRITY_INT(TOVALIDATE, ERRORTEXT, OFFSET) \
- if (!(TOVALIDATE)) \
- { \
- Trusted_IsNot(ERRORTEXT); \
- Info=0; \
- return; \
- } \
-
-#define INTEGRITY_SIZE_ATLEAST(_BYTES) \
- if (Element_Offset+_BYTES>Element_Size) \
- { \
- Trusted_IsNot("Size is wrong"); \
- return; \
- } \
-
-#define INTEGRITY_SIZE_ATLEAST_STRING(_BYTES) \
- if (Element_Offset+_BYTES>Element_Size) \
- { \
- Trusted_IsNot("Size is wrong"); \
- Info.clear(); \
- return; \
- } \
-
-#define INTEGRITY_SIZE_ATLEAST_INT(_BYTES) \
- if (Element_Offset+_BYTES>Element_Size) \
- { \
- Trusted_IsNot("Size is wrong"); \
- Info=0; \
- return; \
- } \
-
-#define INTEGRITY_SIZE_ATLEAST_BUFFER() \
- if (BS->Remain()==0) \
- { \
- Trusted_IsNot("Size is wrong"); \
- Info=0; \
- return; \
- } \
-
-//***************************************************************************
-// Init
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::BS_Begin()
-{
- size_t BS_Size;
- if (Element_Offset>=Element_Size)
- BS_Size=0;
- else if (Buffer_Offset+Element_Size<=Buffer_Size)
- BS_Size=(size_t)(Element_Size-Element_Offset);
- else if (Buffer_Offset+Element_Offset<=Buffer_Size)
- BS_Size=Buffer_Size-(size_t)(Buffer_Offset+Element_Offset);
- else
- BS_Size=0;
-
- BS->Attach(Buffer+Buffer_Offset+(size_t)Element_Offset, BS_Size);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::BS_Begin_LE()
-{
- size_t BS_Size;
- if (Buffer_Offset+Element_Size<=Buffer_Size)
- BS_Size=(size_t)(Element_Size-Element_Offset);
- else if (Buffer_Offset+Element_Offset<=Buffer_Size)
- BS_Size=Buffer_Size-(size_t)(Buffer_Offset+Element_Offset);
- else
- BS_Size=0;
-
- BT->Attach(Buffer+Buffer_Offset+(size_t)Element_Offset, BS_Size);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::BS_End()
-{
- BS->Byte_Align();
- Element_Offset+=BS->Offset_Get();
- BS->Attach(NULL, 0);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::BS_End_LE()
-{
- BT->Byte_Align();
- Element_Offset+=BT->Offset_Get();
- BT->Attach(NULL, 0);
-}
-
-//***************************************************************************
-// Big Endian
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B1(int8u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(1);
- Info=BigEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=1;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B2(int16u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=BigEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=2;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B3(int32u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(3);
- Info=BigEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated)
- {
- Ztring Pos1; Pos1.From_Number(Info, 16);
- Ztring Temp;
- Temp.resize(6-Pos1.size(), __T('0'));
- Temp.append(Pos1);
- Temp.MakeUpperCase();
- Param(Name, Ztring::ToZtring(Info)+__T(" (0x")+Temp+__T(")"));
- }
- Element_Offset+=3;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B4(int32u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated)
- {
- Ztring Pos1; Pos1.From_Number(Info, 16);
- Ztring Temp;
- Temp.resize(8-Pos1.size(), __T('0'));
- Temp.append(Pos1);
- Temp.MakeUpperCase();
- Param(Name, Ztring::ToZtring(Info)+__T(" (0x")+Temp+__T(")"));
- }
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B5(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(5);
- Info=BigEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=5;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B6(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=BigEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=6;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B7(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(7);
- Info=BigEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=7;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B8(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=BigEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B16(int128u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- //Info=BigEndian2int128u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.hi=BigEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.lo=BigEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset+8);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=16;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - float 16 bits
-// TODO: remove it when Linux version of ZenLib is updated
-float32 BigEndian2float16corrected(const char* Liste)
-{
- //sign 1 bit
- //exponent 5 bit
- //significand 10 bit
-
- //Retrieving data
- int16u Integer=BigEndian2int16u(Liste);
-
- //Retrieving elements
- bool Sign =(Integer&0x8000)?true:false;
- int32u Exponent=(Integer>>10)&0xFF;
- int32u Mantissa= Integer&0x03FF;
-
- //Some computing
- if (Exponent==0 || Exponent==0xFF)
- return 0; //These are denormalised numbers, NANs, and other horrible things
- Exponent-=0x0F; //Bias
- float64 Answer=(((float64)Mantissa)/8388608+1.0)*std::pow((float64)2, (int)Exponent); //(1+Mantissa) * 2^Exponent
- if (Sign)
- Answer=-Answer;
-
- return (float32)Answer;
-}
-inline float32 BigEndian2float16corrected (const int8u* List) {return BigEndian2float16corrected ((const char*)List);}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BF2(float32 &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=BigEndian2float16corrected(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=2;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BF4(float32 &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=BigEndian2float32(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BF8(float64 &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=BigEndian2float64(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BF10(float80 &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(10);
- Info=BigEndian2float80(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=10;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BFP4(int8u Bits, float32 &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- BS_Begin();
- int32s Integer=(int32s)BS->Get4(Bits);
- int32u Fraction=BS->Get4(32-Bits);
- BS_End();
- Element_Offset-=4; //Because of BS_End()
- if (Integer>=(1<<Bits)/2)
- Integer-=1<<Bits;
- Info=Integer+((float32)Fraction)/(1<<(32-Bits));
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B1(int8u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(1);
- Info=BigEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B2(int16u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=BigEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B3(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(3);
- Info=BigEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B4(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B5(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(5);
- Info=BigEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B6(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=BigEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B7(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(7);
- Info=BigEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B8(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=BigEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B16(int128u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- Info=BigEndian2int128u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_B1(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(1);
- if (Trace_Activated) Param(Name, BigEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=1;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_B2(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(2);
- if (Trace_Activated) Param(Name, BigEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=2;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_B3(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(3);
- if (Trace_Activated)
- {
- int32u Info=BigEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Ztring Pos1; Pos1.From_Number(Info, 16);
- Ztring Temp;
- Temp.resize(6-Pos1.size(), __T('0'));
- Temp.append(Pos1);
- Temp.MakeUpperCase();
- Param(Name, Ztring::ToZtring(Info)+__T(" (0x")+Temp+__T(")"));
- }
- Element_Offset+=3;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_B4(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(4);
- if (Trace_Activated)
- {
- int32u Info=BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Ztring Pos1; Pos1.From_Number(Info, 16);
- Ztring Temp;
- Temp.resize(8-Pos1.size(), __T('0'));
- Temp.append(Pos1);
- Temp.MakeUpperCase();
- Param(Name, Ztring::ToZtring(Info)+__T(" (0x")+Temp+__T(")"));
- }
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_B5(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(5);
- if (Trace_Activated) Param(Name, BigEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=5;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_B6(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(6);
- if (Trace_Activated) Param(Name, BigEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=6;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_B7(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(7);
- if (Trace_Activated) Param(Name, BigEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=7;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_B8(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(8);
- if (Trace_Activated) Param(Name, BigEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_B16(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(16);
- if (Trace_Activated) Param(Name, BigEndian2int128u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=16;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_BF4(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(4);
- if (Trace_Activated) Param(Name, BigEndian2float32(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_BFP4(int8u Bits, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(4);
- BS_Begin();
- int32u Integer=BS->Get4(Bits);
- int32u Fraction=BS->Get4(32-Bits);
- BS_End();
- Element_Offset-=4; //Because of BS_End()
- if (Trace_Activated) Param(Name, Integer+((float32)Fraction)/(1<<(32-Bits)));
- Element_Offset+=4;
-}
-
-//***************************************************************************
-// Little Endian
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L1(int8u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(1);
- Info=LittleEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=1;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L2(int16u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=LittleEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=2;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L3(int32u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(3);
- Info=LittleEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=3;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L4(int32u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L5(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(5);
- Info=LittleEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=5;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L6(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=LittleEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=6;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L7(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(7);
- Info=LittleEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=7;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L8(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L16(int128u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- //Info=LittleEndian2int128u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.hi=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.lo=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset+8);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=16;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_LF4(float32 &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=LittleEndian2float32(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_LF8(float64 &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=LittleEndian2float64(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L1(int8u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(1);
- Info=LittleEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L2(int16u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=LittleEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L3(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(3);
- Info=LittleEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L4(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L5(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(5);
- Info=LittleEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L6(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=LittleEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L7(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(7);
- Info=LittleEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L8(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_L1(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(1);
- if (Trace_Activated) Param(Name, LittleEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=1;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_L2(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(2);
- if (Trace_Activated) Param(Name, LittleEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=2;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_L3(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(3);
- if (Trace_Activated)
- {
- int32u Info=LittleEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Ztring Pos1; Pos1.From_Number(Info, 16);
- Ztring Temp;
- Temp.resize(6-Pos1.size(), __T('0'));
- Temp.append(Pos1);
- Temp.MakeUpperCase();
- Param(Name, Ztring::ToZtring(Info)+__T(" (0x")+Temp+__T(")"));
- }
- Element_Offset+=3;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_L4(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(4);
- if (Trace_Activated)
- {
- int32u Info=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Ztring Pos1; Pos1.From_Number(Info, 16);
- Ztring Temp;
- Temp.resize(8-Pos1.size(), __T('0'));
- Temp.append(Pos1);
- Temp.MakeUpperCase();
- Param(Name, Ztring::ToZtring(Info)+__T(" (0x")+Temp+__T(")"));
- }
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_L5(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(5);
- if (Trace_Activated) Param(Name, LittleEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=5;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_L6(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(6);
- if (Trace_Activated) Param(Name, LittleEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=6;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_L7(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(7);
- if (Trace_Activated) Param(Name, LittleEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=7;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_L8(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(8);
- if (Trace_Activated) Param(Name, LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_L16(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(16);
- if (Trace_Activated) Param(Name, LittleEndian2int128u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=16;
-}
-
-//***************************************************************************
-// Little and Big Endian together
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D1(int8u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=LittleEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=2;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D2(int16u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=LittleEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D3(int32u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=LittleEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=6;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D4(int32u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D5(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(10);
- Info=LittleEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=10;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D6(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(12);
- Info=LittleEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=12;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D7(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(14);
- Info=LittleEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=14;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D8(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- Info=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=16;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D16(int128u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(32);
- //Info=LittleEndian2int128u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.hi=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.lo=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset+8);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=32;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_DF4(float32 &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=LittleEndian2float32(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_DF8(float64 &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- Info=LittleEndian2float64(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=16;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D1(int8u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=LittleEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D2(int16u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=LittleEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D3(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=LittleEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D4(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D5(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(10);
- Info=LittleEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D6(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(12);
- Info=LittleEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D7(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(14);
- Info=LittleEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D8(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- Info=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_D1(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(2);
- if (Trace_Activated) Param(Name, LittleEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=2;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_D2(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(4);
- if (Trace_Activated) Param(Name, LittleEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_D3(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(6);
- if (Trace_Activated)
- {
- int32u Info=LittleEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Ztring Pos1; Pos1.From_Number(Info, 16);
- Ztring Temp;
- Temp.resize(6-Pos1.size(), __T('0'));
- Temp.append(Pos1);
- Temp.MakeUpperCase();
- Param(Name, Ztring::ToZtring(Info)+__T(" (0x")+Temp+__T(")"));
- }
- Element_Offset+=6;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_D4(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(8);
- if (Trace_Activated)
- {
- int32u Info=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Ztring Pos1; Pos1.From_Number(Info, 16);
- Ztring Temp;
- Temp.resize(8-Pos1.size(), __T('0'));
- Temp.append(Pos1);
- Temp.MakeUpperCase();
- Param(Name, Ztring::ToZtring(Info)+__T(" (0x")+Temp+__T(")"));
- }
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_D5(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(10);
- if (Trace_Activated) Param(Name, LittleEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=5;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_D6(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(12);
- if (Trace_Activated) Param(Name, LittleEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=12;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_D7(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(14);
- if (Trace_Activated) Param(Name, LittleEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=14;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_D8(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(16);
- if (Trace_Activated) Param(Name, LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=16;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_D16(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(32);
- if (Trace_Activated) Param(Name, LittleEndian2int128u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=32;
-}
-
-//***************************************************************************
-// GUID
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_GUID(int128u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- Info.hi=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.lo=BigEndian2int64u (Buffer+Buffer_Offset+(size_t)Element_Offset+8);
- if (Trace_Activated) Param_GUID(Name, Info);
- Element_Offset+=16;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_GUID(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(16);
- if (Trace_Activated) Param_GUID(Name, BigEndian2int128u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=16;
-}
-
-//***************************************************************************
-// UUID
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_UUID(int128u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- Info.hi=BigEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.lo=BigEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset+8);
- if (Trace_Activated) Param_UUID(Name, Info);
- Element_Offset+=16;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_UUID(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(16);
- if (Trace_Activated) Param_UUID(Name, BigEndian2int128u(Buffer+Buffer_Offset+(size_t)Element_Offset));
- Element_Offset+=16;
-}
-
-//***************************************************************************
-// EBML
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_EB(int64u &Info, const char* Name)
-{
- //Element size
- INTEGRITY_SIZE_ATLEAST_INT(1);
- if (Buffer[Buffer_Offset+(size_t)Element_Offset]==0xFF)
- {
- Info=File_Size-(File_Offset+Buffer_Offset+Element_Offset);
- if (Trace_Activated) Param(Name, "Unlimited");
- Element_Offset++;
- return;
- }
- int8u Size=0;
- int32u Size_Mark=0;
- BS_Begin();
- while (Size_Mark==0 && BS->Remain() && Size<=8)
- {
- Size++;
- Peek_BS(Size, Size_Mark);
- }
-
- //Integrity
- if (!BS->Remain() || Size>8)
- {
- if (Size>8)
- {
- //Element[Element_Level].IsComplete=true; //If it is in a header
- Trusted_IsNot("EBML integer parsing error");
- }
- Info=0;
- return;
- }
- BS_End();
- if (File_Offset+Buffer_Offset+Element_Offset>=Element[Element_Level].Next)
- {
- //Element[Element_Level].IsComplete=true; //If it is in a header
- Trusted_IsNot("Not enough place to have an EBML");
- Info=0;
- return; //Not enough space
- }
- INTEGRITY_SIZE_ATLEAST_INT(Size);
-
- //Element Name
- switch (Size)
- {
- case 1 : {
- int8u Element_Name;
- Peek_B1 (Element_Name);
- Info=Element_Name&0x7F; //Keep out first bit
- }
- break;
- case 2 : {
- int16u Element_Name;
- Peek_B2(Element_Name);
- Info=Element_Name&0x3FFF; //Keep out first bits
- }
- break;
- case 3 : {
- int32u Element_Name;
- Peek_B3(Element_Name);
- Info=Element_Name&0x1FFFFF; //Keep out first bits
- }
- break;
- case 4 : {
- int32u Element_Name;
- Peek_B4(Element_Name);
- Info=Element_Name&0x0FFFFFFF; //Keep out first bits
- }
- break;
- case 5 : {
- int64u Element_Name;
- Peek_B5(Element_Name);
- Info=Element_Name&0x07FFFFFFFFLL; //Keep out first bits
- }
- break;
- case 6 : {
- int64u Element_Name;
- Peek_B6(Element_Name);
- Info=Element_Name&0x03FFFFFFFFFFLL; //Keep out first bits
- }
- break;
- case 7 : {
- int64u Element_Name;
- Peek_B7(Element_Name);
- Info=Element_Name&0x01FFFFFFFFFFFFLL; //Keep out first bits
- }
- break;
- case 8 : {
- int64u Element_Name;
- Peek_B8(Element_Name);
- Info=Element_Name&0x00FFFFFFFFFFFFFFLL; //Keep out first bits
- }
- break;
- }
-
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=Size;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_ES(int64s &Info, const char* Name)
-{
- //Element size
- INTEGRITY_SIZE_ATLEAST_INT(1);
- int8u Size=0;
- int32u Size_Mark=0;
- BS_Begin();
- while (Size_Mark==0 && BS->Remain() && Size<=8)
- {
- Size++;
- Peek_BS(Size, Size_Mark);
- }
-
- //Integrity
- if (!BS->Remain() || Size>8)
- {
- if (Size>8)
- {
- //Element[Element_Level].IsComplete=true; //If it is in a header
- Trusted_IsNot("EBML integer parsing error");
- }
- Info=0;
- return;
- }
- BS_End();
- if (File_Offset+Buffer_Offset+Element_Offset>=Element[Element_Level].Next)
- {
- //Element[Element_Level].IsComplete=true; //If it is in a header
- Trusted_IsNot("Not enough place to have an EBML");
- Info=0;
- return; //Not enough space
- }
- INTEGRITY_SIZE_ATLEAST_INT(Size);
-
- //Element Name
- switch (Size)
- {
- case 1 : {
- int8u Element_Name;
- Peek_B1 (Element_Name);
- Info=(Element_Name&0x7F)-0x3F; //Keep out first bit and sign
- }
- break;
- case 2 : {
- int16u Element_Name;
- Peek_B2(Element_Name);
- Info=(Element_Name&0x3FFF)-0x1FFF; //Keep out first bits and sign
- }
- break;
- case 3 : {
- int32u Element_Name;
- Peek_B3(Element_Name);
- Info=(Element_Name&0x1FFFFF)-0x0FFFFF; //Keep out first bits and sign
- }
- break;
- case 4 : {
- int32u Element_Name;
- Peek_B4(Element_Name);
- Info=(Element_Name&0x0FFFFFFF)-0x07FFFFFF; //Keep out first bits and sign
- }
- break;
- case 5 : {
- int64u Element_Name;
- Peek_B5(Element_Name);
- Info=(Element_Name&0x07FFFFFFFFLL)-0x03FFFFFFFFLL; //Keep out first bits and sign
- }
- break;
- case 6 : {
- int64u Element_Name;
- Peek_B6(Element_Name);
- Info=(Element_Name&0x03FFFFFFFFFFLL)-0x01FFFFFFFFFFLL; //Keep out first bits and sign
- }
- break;
- case 7 : {
- int64u Element_Name;
- Peek_B7(Element_Name);
- Info=(Element_Name&0x01FFFFFFFFFFFFLL)-0x00FFFFFFFFFFFFLL; //Keep out first bits and sign
- }
- break;
- case 8 : {
- int64u Element_Name;
- Peek_B8(Element_Name);
- Info=(Element_Name&0x00FFFFFFFFFFFFFFLL)-0x007FFFFFFFFFFFFFLL; //Keep out first bits and sign
- }
- break;
- }
-
- if (Trace_Activated) Param(Name, Info);
- Element_Offset+=Size;
-}
-
-//***************************************************************************
-// Variable Size Value
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_VS(int64u &Info, const char* Name)
-{
- //Element size
- Info=0;
- int8u Size=0;
- bool more_data;
- BS_Begin();
- do
- {
- Size++;
- INTEGRITY_INT(8<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- more_data=BS->GetB();
- Info=128*Info+BS->Get1(7);
- }
- while (more_data && Size<=8 && BS->Remain());
- BS_End();
-
- //Integrity
- if (Size>8)
- {
- Trusted_IsNot("Variable Size Value parsing error");
- Info=0;
- return;
- }
- if (File_Offset+Buffer_Offset+Element_Offset>=Element[Element_Level].Next)
- {
- Trusted_IsNot("Not enough place to have a Variable Size Value");
- Info=0;
- return; //Not enough space
- }
-
- if (Trace_Activated)
- {
- Element_Offset-=Size;
- Param(Name, Info);
- Element_Offset+=Size;
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_VS(const char* Name)
-{
- //Element size
- int64u Info=0;
- int8u Size=0;
- bool more_data;
- BS_Begin();
- do
- {
- Size++;
- INTEGRITY_INT(8<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- more_data=BS->GetB();
- Info=128*Info+BS->Get1(7);
- }
- while (more_data && Size<=8 && BS->Remain());
- BS_End();
-
- //Integrity
- if (Size>8)
- {
- Trusted_IsNot("Variable Size Value parsing error");
- Info=0;
- return;
- }
- if (File_Offset+Buffer_Offset+Element_Offset>=Element[Element_Level].Next)
- {
- Trusted_IsNot("Not enough place to have a Variable Size Value");
- Info=0;
- return; //Not enough space
- }
-
- if (Trace_Activated)
- {
- Element_Offset-=Size;
- Param(Name, Info);
- Element_Offset+=Size;
- }
-}
-
-//***************************************************************************
-// Exp-Golomb
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_SE(int32s &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_BUFFER();
- int8u LeadingZeroBits=0;
- while(BS->Remain()>0 && !BS->GetB())
- LeadingZeroBits++;
- INTEGRITY(LeadingZeroBits<=32, "(Problem)", 0)
- double InfoD=pow((float)2, (float)LeadingZeroBits)-1+BS->Get4(LeadingZeroBits);
- INTEGRITY(InfoD<int32u(-1), "(Problem)", 0)
- Info=(int32s)(pow((double)-1, InfoD+1)*(int32u)ceil(InfoD/2));
-
- if (Trace_Activated)
- Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_SE(const char* Name)
-{
- INTEGRITY(BS->Remain(), "Size is wrong", 0)
- int8u LeadingZeroBits=0;
- while(BS->Remain()>0 && !BS->GetB())
- LeadingZeroBits++;
- if (Trace_Activated)
- {
- INTEGRITY(LeadingZeroBits<=32, "(Problem)", 0)
- double InfoD=pow((float)2, (float)LeadingZeroBits)-1+BS->Get4(LeadingZeroBits);
- INTEGRITY(InfoD<int32u(-1), "(Problem)", 0)
- Param(Name, (int32s)(pow(-1, InfoD+1)*(int32u)ceil(InfoD/2)));
- }
- else
- BS->Skip(LeadingZeroBits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_UE(int32u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_BUFFER();
- int8u LeadingZeroBits=0;
- while(BS->Remain()>0 && !BS->GetB())
- LeadingZeroBits++;
- INTEGRITY(LeadingZeroBits<=32, "(Problem)", 0)
- double InfoD=pow(2, (float)LeadingZeroBits);
- Info=(int32u)InfoD-1+BS->Get4(LeadingZeroBits);
-
- if (Trace_Activated)
- Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_UE(const char* Name)
-{
- INTEGRITY(BS->Remain(), "Size is wrong", 0)
- int8u LeadingZeroBits=0;
- while(BS->Remain()>0 && !BS->GetB())
- LeadingZeroBits++;
- if (Trace_Activated)
- {
- INTEGRITY(LeadingZeroBits<=32, "(Problem)", 0)
- double InfoD=pow(2, (float)LeadingZeroBits);
- Param(Name, (int32u)InfoD-1+BS->Get4(LeadingZeroBits));
- }
- else
- BS->Skip(LeadingZeroBits);
-}
-
-//***************************************************************************
-// Inverted Exp-Golomb
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_SI(int32s &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_BUFFER();
-
- Info=1;
- while(BS->Remain()>0 && BS->GetB()==0)
- {
- Info<<=1;
- if (BS->Remain()==0)
- {
- Trusted_IsNot("(Problem)");
- Info=0;
- return;
- }
- if(BS->GetB()==1)
- Info++;
- }
- Info--;
-
- if (Info!=0 && BS->Remain()>0 && BS->GetB()==1)
- Info=-Info;
-
- if (Trace_Activated)
- Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_SI(const char* Name)
-{
- int32s Info;
- Get_SI(Info, Name);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_UI(int32u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_BUFFER();
- Info=1;
- while(BS->Remain()>0 && BS->GetB()==0)
- {
- Info<<=1;
- if (BS->Remain()==0)
- {
- Trusted_IsNot("(Problem)");
- Info=0;
- return;
- }
- if(BS->GetB()==1)
- Info++;
- }
- Info--;
-
- if (Trace_Activated)
- Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_UI(const char* Name)
-{
- int32u Info;
- Get_UI(Info, Name);
-}
-
-//***************************************************************************
-// Variable Length Code
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_VL(const vlc Vlc[], size_t &Info, const char* Name)
-{
- Info=0;
- int32u Value=0;
-
- int8u CountOfBits=0;
- for(;;)
- {
- switch (Vlc[Info].bit_increment)
- {
- case 255 :
- Trusted_IsNot("Variable Length Code error");
- return;
- default : ;
- Value<<=Vlc[Info].bit_increment;
- Value|=BS->Get1(Vlc[Info].bit_increment);
- CountOfBits+=Vlc[Info].bit_increment;
- break;
- case 1 :
- Value<<=1;
- if (BS->GetB())
- Value++;
- CountOfBits++;
- case 0 : ;
- }
-
- if (Value==Vlc[Info].value)
- {
- if (Trace_Activated)
- {
- Ztring ToDisplay=Ztring::ToZtring(Value, 2);
- ToDisplay.insert(0, CountOfBits-ToDisplay.size(), __T('0'));
- ToDisplay+=__T(" (")+Ztring::ToZtring(CountOfBits)+__T(" bits)");
- Param(Name, ToDisplay);
- }
- return;
- }
- Info++;
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_VL_Prepare(vlc_fast &Vlc)
-{
- Vlc.Array=new int8u[((size_t)1)<<Vlc.Size];
- Vlc.BitsToSkip=new int8u[((size_t)1)<<Vlc.Size];
- memset(Vlc.Array, 0xFF, ((size_t)1)<<Vlc.Size);
- int8u Increment=0;
- int8u Pos=0;
- for(; ; Pos++)
- {
- if (Vlc.Vlc[Pos].bit_increment==255)
- break;
- Increment+=Vlc.Vlc[Pos].bit_increment;
- size_t Value=((size_t)Vlc.Vlc[Pos].value)<<(Vlc.Size-Increment);
- size_t ToFill_Size=((size_t)1)<<(Vlc.Size-Increment);
- for (size_t ToFill_Pos=0; ToFill_Pos<ToFill_Size; ToFill_Pos++)
- {
- Vlc.Array[Value+ToFill_Pos]=Pos;
- Vlc.BitsToSkip[Value+ToFill_Pos]=Increment;
- }
- }
- for (size_t Pos2=0; Pos2<(((size_t)1)<<Vlc.Size); Pos2++)
- if (Vlc.Array[Pos2]==(int8u)-1)
- {
- Vlc.Array[Pos2]=Pos;
- Vlc.BitsToSkip[Pos2]=(int8u)-1;
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_VL(vlc_fast &Vlc, size_t &Info, const char* Name)
-{
- if (BS->Remain()<Vlc.Size)
- {
- Get_VL(Vlc.Vlc, Info, Name);
- return;
- }
-
- int32u Value=BS->Peek4(Vlc.Size);
- Info=Vlc.Array[Value];
-
- if (Vlc.BitsToSkip[Value]==(int8u)-1)
- {
- Trusted_IsNot("Variable Length Code error");
- return;
- }
-
- if (Trace_Activated)
- {
- Ztring ToDisplay=Ztring::ToZtring(Value, 2);
- ToDisplay.insert(0, Vlc.Size-ToDisplay.size(), __T('0'));
- ToDisplay.resize(Vlc.BitsToSkip[Value]);
- ToDisplay+=__T(" (")+Ztring::ToZtring(Vlc.BitsToSkip[Value])+__T(" bits)");
- Param(Name, ToDisplay);
- }
-
- BS->Skip(Vlc.BitsToSkip[Value]);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_VL(const vlc Vlc[], const char* Name)
-{
- size_t Info;
- Get_VL(Vlc, Info, Name);
-}
-
-//***************************************************************************
-// Characters
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C1(int8u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(1);
- Info=CC1(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 1);
- Element_Offset+=1;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C2(int16u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=CC2(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 2);
- Element_Offset+=2;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C3(int32u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(3);
- Info=CC3(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 3);
- Element_Offset+=3;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C4(int32u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=CC4(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 4, false);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C5(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(5);
- Info=CC5(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 5);
- Element_Offset+=5;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C6(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=CC6(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 6);
- Element_Offset+=6;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C7(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(7);
- Info=CC7(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 7);
- Element_Offset+=7;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C8(int64u &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=CC8(Buffer+Buffer_Offset+(size_t)Element_Offset);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 8);
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_C1(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(1);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 1);
- Element_Offset+=1;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_C2(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(2);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 2);
- Element_Offset+=2;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_C3(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(3);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 3);
- Element_Offset+=3;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_C4(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(4);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 4);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_C5(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(5);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 5);
- Element_Offset+=5;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_C6(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(6);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 6);
- Element_Offset+=6;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_C7(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(7);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 7);
- Element_Offset+=7;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_C8(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(8);
- if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 8);
- Element_Offset+=8;
-}
-
-//***************************************************************************
-// Text
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_Local(int64u Bytes, Ztring &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- if (Trace_Activated && Bytes) Param(Name, Info);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_ISO_6937_2(int64u Bytes, Ztring &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.clear();
- size_t End = Buffer_Offset + (size_t)Element_Offset + (size_t)Bytes;
- for (size_t Pos=Buffer_Offset+(size_t)Element_Offset; Pos<End; ++Pos)
- {
- wchar_t EscapeChar=L'\x0000';
- wchar_t NewChar=L'\x0000';
- switch (Buffer[Pos])
- {
- case 0xA9 : NewChar=L'\x2018'; break;
- case 0xAA : NewChar=L'\x201C'; break;
- case 0xAC : NewChar=L'\x2190'; break;
- case 0xAD : NewChar=L'\x2191'; break;
- case 0xAE : NewChar=L'\x2192'; break;
- case 0xAF : NewChar=L'\x2193'; break;
- case 0xB4 : NewChar=L'\x00D7'; break;
- case 0xB8 : NewChar=L'\x00F7'; break;
- case 0xB9 : NewChar=L'\x2019'; break;
- case 0xBA : NewChar=L'\x201D'; break;
- case 0xC1 : EscapeChar=L'\x0300'; break;
- case 0xC2 : EscapeChar=L'\x0301'; break;
- case 0xC3 : EscapeChar=L'\x0302'; break;
- case 0xC4 : EscapeChar=L'\x0303'; break;
- case 0xC5 : EscapeChar=L'\x0304'; break;
- case 0xC6 : EscapeChar=L'\x0306'; break;
- case 0xC7 : EscapeChar=L'\x0307'; break;
- case 0xC8 : EscapeChar=L'\x0308'; break;
- case 0xCA : EscapeChar=L'\x030A'; break;
- case 0xCB : EscapeChar=L'\x0327'; break;
- case 0xCD : EscapeChar=L'\x030B'; break;
- case 0xCE : EscapeChar=L'\x0328'; break;
- case 0xCF : EscapeChar=L'\x030C'; break;
- case 0xD0 : NewChar=L'\x2015'; break;
- case 0xD1 : NewChar=L'\x00B9'; break;
- case 0xD2 : NewChar=L'\x00AE'; break;
- case 0xD3 : NewChar=L'\x00A9'; break;
- case 0xD4 : NewChar=L'\x2122'; break;
- case 0xD5 : NewChar=L'\x266A'; break;
- case 0xD6 : NewChar=L'\x00AC'; break;
- case 0xD7 : NewChar=L'\x00A6'; break;
- case 0xDC : NewChar=L'\x215B'; break;
- case 0xDD : NewChar=L'\x215C'; break;
- case 0xDE : NewChar=L'\x215D'; break;
- case 0xDF : NewChar=L'\x215E'; break;
- case 0xE0 : NewChar=L'\x2126'; break;
- case 0xE1 : NewChar=L'\x00C6'; break;
- case 0xE2 : NewChar=L'\x0110'; break;
- case 0xE3 : NewChar=L'\x00AA'; break;
- case 0xE4 : NewChar=L'\x0126'; break;
- case 0xE6 : NewChar=L'\x0132'; break;
- case 0xE7 : NewChar=L'\x013F'; break;
- case 0xE8 : NewChar=L'\x0141'; break;
- case 0xE9 : NewChar=L'\x00D8'; break;
- case 0xEA : NewChar=L'\x0152'; break;
- case 0xEB : NewChar=L'\x00BA'; break;
- case 0xEC : NewChar=L'\x00DE'; break;
- case 0xED : NewChar=L'\x0166'; break;
- case 0xEE : NewChar=L'\x014A'; break;
- case 0xEF : NewChar=L'\x0149'; break;
- case 0xF0 : NewChar=L'\x0138'; break;
- case 0xF1 : NewChar=L'\x00E6'; break;
- case 0xF2 : NewChar=L'\x0111'; break;
- case 0xF3 : NewChar=L'\x00F0'; break;
- case 0xF4 : NewChar=L'\x0127'; break;
- case 0xF5 : NewChar=L'\x0131'; break;
- case 0xF6 : NewChar=L'\x0133'; break;
- case 0xF7 : NewChar=L'\x0140'; break;
- case 0xF8 : NewChar=L'\x0142'; break;
- case 0xF9 : NewChar=L'\x00F8'; break;
- case 0xFA : NewChar=L'\x0153'; break;
- case 0xFB : NewChar=L'\x0153'; break;
- case 0xFC : NewChar=L'\x00FE'; break;
- case 0xFD : NewChar=L'\x00FE'; break;
- case 0xFE : NewChar=L'\x014B'; break;
- case 0xFF : NewChar=L'\x00AD'; break;
- case 0xC0 :
- case 0xC9 :
- case 0xCC :
- case 0xD8 :
- case 0xD9 :
- case 0xDA :
- case 0xDB :
- case 0xE5 :
- break;
- default : NewChar=(Char)(Buffer[Pos]);
- }
-
- if (EscapeChar)
- {
- if (Pos+1<End)
- {
- Info+=(Char)(Buffer[Pos+1]);
- Info+=Ztring().From_Unicode(&EscapeChar, 1); //(EscapeChar) after new ZenLib release
- EscapeChar=L'\x0000';
- Pos++;
- }
- }
- else if (NewChar)
- Info+=Ztring().From_Unicode(&NewChar, 1); //(NewChar) after new ZenLib release
- }
- if (Trace_Activated && Bytes) Param(Name, Info);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_ISO_8859_1(int64u Bytes, Ztring &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_ISO_8859_1((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- if (Trace_Activated && Bytes) Param(Name, Info);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_ISO_8859_2(int64u Bytes, Ztring &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_ISO_8859_2((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- if (Trace_Activated && Bytes) Param(Name, Info);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_ISO_8859_5(int64u Bytes, Ztring &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.clear();
- size_t End = Buffer_Offset + (size_t)Element_Offset + (size_t)Bytes;
- for (size_t Pos=Buffer_Offset+(size_t)Element_Offset; Pos<End; ++Pos)
- {
- switch (Buffer[Pos])
- {
- case 0xAD : Info+=Ztring().From_Unicode(L"\xAD"); break; //L'\xAD' after new ZenLib release
- case 0xF0 : Info+=Ztring().From_Unicode(L"\x2116"); break; //L'\x2116' after new ZenLib release
- case 0xFD : Info+=Ztring().From_Unicode(L"\xA7"); break; //L'\xA7' after new ZenLib release
- default :
- {
- wchar_t NewChar=(Buffer[Pos]<=0xA0?0x0000:0x0360)+Buffer[Pos];
- Info+=Ztring().From_Unicode(&NewChar, 1); //(NewChar) after new ZenLib release
- }
- }
- }
- if (Trace_Activated && Bytes) Param(Name, Info);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_String(int64u Bytes, std::string &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.assign((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- if (Trace_Activated && Bytes) Param(Name, Info);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_Local(int64u Bytes, Ztring &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_String(int64u Bytes, std::string &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.assign((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_UTF8(int64u Bytes, Ztring &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_UTF8((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- if (Trace_Activated && Bytes) Param(Name, Info);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_UTF16(int64u Bytes, Ztring &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_UTF16((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- if (Trace_Activated && Bytes) Param(Name, Info);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_UTF16B(int64u Bytes, Ztring &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_UTF16BE((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- if (Trace_Activated && Bytes) Param(Name, Info);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_UTF16L(int64u Bytes, Ztring &Info, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_UTF16LE((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- if (Trace_Activated && Bytes) Param(Name, Info);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_Local(int64u Bytes, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(Bytes);
- if (Trace_Activated && Bytes) Param(Name, Ztring().From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes));
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_ISO_6937_2(int64u Bytes, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(Bytes);
- if (Trace_Activated && Bytes)
- {
- Ztring Temp;
- Get_ISO_6937_2(Bytes, Temp, Name);
- }
- else
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_String(int64u Bytes, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(Bytes);
- if (Trace_Activated && Bytes) Param(Name, Ztring().From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes));
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_UTF8(int64u Bytes, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(Bytes);
- if (Trace_Activated && Bytes) Param(Name, Ztring().From_UTF8((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes));
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_UTF16B(int64u Bytes, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(Bytes);
- if (Trace_Activated && Bytes) Param(Name, Ztring().From_UTF16BE((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes));
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_UTF16L(int64u Bytes, const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(Bytes);
- if (Trace_Activated && Bytes) Param(Name, Ztring().From_UTF16LE((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes));
- Element_Offset+=Bytes;
-}
-
-//***************************************************************************
-// Text
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_PA(const char* Name)
-{
- INTEGRITY_SIZE_ATLEAST(1);
- int8u Size=Buffer[Buffer_Offset+(size_t)Element_Offset];
- INTEGRITY_SIZE_ATLEAST(1+Size);
- if (Trace_Activated && Size) Param(Name, Ztring().From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset+1), (size_t)Size));
- Element_Offset+=1+Size;
-}
-
-//***************************************************************************
-// Unknown
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_XX(int64u Bytes, const char* Name)
-{
- if (Element_Offset+Bytes!=Element_TotalSize_Get()) //Exception for seek to end of the element
- {
- INTEGRITY_SIZE_ATLEAST(Bytes);
- }
- if (Trace_Activated && Bytes) Param(Name, Ztring("(")+Ztring::ToZtring(Bytes)+Ztring(" bytes)"));
- Element_Offset+=Bytes;
-}
-
-//***************************************************************************
-// Flags
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_Flags (int64u Flags, size_t Order, bool &Info, const char* Name)
-{
- if (Flags&((int64u)1<<Order))
- Info=true;
- else
- Info=false;
-
- Element_Begin0();
- if (Trace_Activated) Param(Name, Info?"Yes":"No");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_Flags (int64u ValueToPut, int8u &Info, const char* Name)
-{
- Info=(int8u)ValueToPut;
-
- Element_Begin0();
- if (Trace_Activated) Param(Name, Info);
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_Flags(int64u Flags, size_t Order, const char* Name)
-{
- Element_Begin0();
- if (Trace_Activated) Param(Name, (Flags&((int64u)1<<Order))?"Yes":"No");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_Flags(int64u ValueToPut, const char* Name)
-{
- Element_Begin0();
- if (Trace_Activated) Param(Name, ValueToPut);
- Element_End0();
-}
-
-//***************************************************************************
-// BitStream
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BS(int8u Bits, int32u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Get4(Bits);
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_SB( bool &Info, const char* Name)
-{
- INTEGRITY_INT(1<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->GetB();
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S1(int8u Bits, int8u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Get1(Bits);
- if (Trace_Activated)
- {
- Param(Name, Info);
- Param_Info(__T("(")+Ztring::ToZtring(Bits)+__T(" bits)"));
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S2(int8u Bits, int16u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Get2(Bits);
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S3(int8u Bits, int32u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Get4(Bits);
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S4(int8u Bits, int32u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Get4(Bits);
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S5(int8u Bits, int64u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Get8(Bits);
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S6(int8u Bits, int64u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Get8(Bits);
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S7(int8u Bits, int64u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Get8(Bits);
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S8(int8u Bits, int64u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Get8(Bits);
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_BS(int8u Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Peek4(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_SB( bool &Info)
-{
- INTEGRITY_INT(1<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->PeekB();
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S1(int8u Bits, int8u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Peek1(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S2(int8u Bits, int16u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Peek2(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S3(int8u Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Peek4(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S4(int8u Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Peek4(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S5(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Peek8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S6(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Peek8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S7(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Peek8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S8(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- Info=BS->Peek8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_BS(size_t Bits, const char* Name)
-{
- INTEGRITY(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- if (Trace_Activated)
- {
- if (Bits<=32) //TODO: in BitStream.h, handle >32 bit gets
- Param(Name, BS->Get4((int8u)Bits));
- else
- {
- Param(Name, "(Data)");
- BS->Skip(Bits);
- }
- }
- else
- BS->Skip(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_SB( const char* Name)
-{
- INTEGRITY(1<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- if (Trace_Activated)
- Param(Name, BS->GetB());
- else
- BS->Skip(1);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_S1(int8u Bits, const char* Name)
-{
- INTEGRITY(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- if (Trace_Activated)
- {
- Param(Name, BS->Get1(Bits));
- Param_Info(__T("(")+Ztring::ToZtring(Bits)+__T(" bits)"));
- }
- else
- BS->Skip(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_S2(int8u Bits, const char* Name)
-{
- INTEGRITY(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- if (Trace_Activated)
- Param(Name, BS->Get2(Bits));
- else
- BS->Skip(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_S3(int8u Bits, const char* Name)
-{
- INTEGRITY(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- if (Trace_Activated)
- Param(Name, BS->Get4(Bits));
- else
- BS->Skip(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_S4(int8u Bits, const char* Name)
-{
- INTEGRITY(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- if (Trace_Activated)
- Param(Name, BS->Get4(Bits));
- else
- BS->Skip(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_S5(int8u Bits, const char* Name)
-{
- INTEGRITY(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- if (Trace_Activated)
- Param(Name, BS->Get8(Bits));
- else
- BS->Skip(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_S6(int8u Bits, const char* Name)
-{
- INTEGRITY(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- if (Trace_Activated)
- Param(Name, BS->Get8(Bits));
- else
- BS->Skip(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_S7(int8u Bits, const char* Name)
-{
- INTEGRITY(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- if (Trace_Activated)
- Param(Name, BS->Get8(Bits));
- else
- BS->Skip(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_S8(int8u Bits, const char* Name)
-{
- INTEGRITY(Bits<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- if (Trace_Activated)
- Param(Name, BS->Get8(Bits));
- else
- BS->Skip(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Mark_0()
-{
- INTEGRITY(1<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- bool Info=BS->GetB();
- if (Info)
- {
- Param("0", Info);
- Element_DoNotTrust("Mark bit is wrong");
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Mark_0_NoTrustError()
-{
- INTEGRITY(1<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- bool Info=BS->GetB();
- if (Info)
- {
- Param("0", Info);
- Param_Info("Warning: should be 0");
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Mark_1()
-{
- INTEGRITY(1<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- bool Info=BS->GetB();
- if (!Info)
- {
- Param("1", Info);
- Element_DoNotTrust("Mark bit is wrong");
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Mark_1_NoTrustError()
-{
- INTEGRITY(1<=BS->Remain(), "Size is wrong", BS->Offset_Get())
- bool Info=BS->GetB();
- if (!Info)
- {
- Param("1", Info);
- Param_Info("Warning: should be 1");
- }
-}
-
-//***************************************************************************
-// BitStream (Little Endian)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BT(size_t Bits, int32u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- Info=BT->Get(Bits);
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_TB( bool &Info, const char* Name)
-{
- INTEGRITY_INT(1<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- Info=BT->GetB();
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_T1(size_t Bits, int8u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- Info=BT->Get1(Bits);
- if (Trace_Activated)
- {
- Param(Name, Info);
- Param_Info(__T("(")+Ztring::ToZtring(Bits)+__T(" bits)"));
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_T2(size_t Bits, int16u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- Info=BT->Get2(Bits);
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_T4(size_t Bits, int32u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- Info=BT->Get4(Bits);
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_T8(size_t Bits, int64u &Info, const char* Name)
-{
- INTEGRITY_INT(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- Info=BT->Get8(Bits);
- if (Trace_Activated) Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_BT(size_t Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- Info=BT->Peek(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_TB( bool &Info)
-{
- INTEGRITY_INT(1<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- Info=BT->PeekB();
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_T1(size_t Bits, int8u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- Info=BT->Peek1(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_T2(size_t Bits, int16u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- Info=BT->Peek2(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_T4(size_t Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- Info=BT->Peek4(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_T8(size_t Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- Info=BT->Peek8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_BT(size_t Bits, const char* Name)
-{
- INTEGRITY(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- if (Trace_Activated)
- {
- if (Bits<=32) //TODO: in BitStream.h, handle >32 bit gets
- Param(Name, BT->Get(Bits));
- else
- {
- Param(Name, "(Data)");
- BT->Skip(Bits);
- }
- }
- else
- BT->Skip(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_TB( const char* Name)
-{
- INTEGRITY(1<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- if (Trace_Activated)
- Param(Name, BT->GetB());
- else
- BT->SkipB();
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_T1(size_t Bits, const char* Name)
-{
- INTEGRITY(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- if (Trace_Activated)
- {
- Param(Name, BT->Get1(Bits));
- Param_Info(__T("(")+Ztring::ToZtring(Bits)+__T(" bits)"));
- }
- else
- BT->Skip1(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_T2(size_t Bits, const char* Name)
-{
- INTEGRITY(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- if (Trace_Activated)
- Param(Name, BT->Get2(Bits));
- else
- BT->Skip2(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_T4(size_t Bits, const char* Name)
-{
- INTEGRITY(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- if (Trace_Activated)
- Param(Name, BT->Get4(Bits));
- else
- BT->Skip4(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_T8(size_t Bits, const char* Name)
-{
- INTEGRITY(Bits<=BT->Remain(), "Size is wrong", BT->Offset_Get())
- if (Trace_Activated)
- Param(Name, BT->Get8(Bits));
- else
- BT->Skip8(Bits);
-}
-
-} //NameSpace
-#endif //MEDIAINFO_TRACE
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Buffer_MinimizeSize.cpp b/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Buffer_MinimizeSize.cpp
deleted file mode 100644
index 2f10737b4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Buffer_MinimizeSize.cpp
+++ /dev/null
@@ -1,1741 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-#if !MEDIAINFO_TRACE
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/MediaInfo_Config.h"
-#include "ZenLib/BitStream_LE.h"
-#include <cmath>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//Integrity test
-#define INTEGRITY(TOVALIDATE) \
- if (!(TOVALIDATE)) \
- { \
- Trusted_IsNot(); \
- return; \
- } \
-
-#define INTEGRITY_BOOL(TOVALIDATE) \
- if (!(TOVALIDATE)) \
- { \
- Trusted_IsNot(); \
- Info=false; \
- return; \
- } \
-
-#define INTEGRITY_INT(TOVALIDATE) \
- if (!(TOVALIDATE)) \
- { \
- Trusted_IsNot(); \
- Info=0; \
- return; \
- } \
-
-#define INTEGRITY_SIZE_ATLEAST(_BYTES) \
- if (Element_Offset+_BYTES>Element_Size) \
- { \
- Trusted_IsNot(); \
- return; \
- } \
-
-#define INTEGRITY_SIZE_ATLEAST_STRING(_BYTES) \
- if (Element_Offset+_BYTES>Element_Size) \
- { \
- Trusted_IsNot(); \
- Info.clear(); \
- return; \
- } \
-
-#define INTEGRITY_SIZE_ATLEAST_INT(_BYTES) \
- if (Element_Offset+_BYTES>Element_Size) \
- { \
- Trusted_IsNot(); \
- Info=0; \
- return; \
- } \
-
-#define INTEGRITY_SIZE_ATLEAST_BUFFER() \
- if (BS->Remain()==0) \
- { \
- Trusted_IsNot(); \
- Info=0; \
- return; \
- } \
-
-//***************************************************************************
-// Init
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::BS_Begin()
-{
- size_t BS_Size;
- if (Element_Offset>=Element_Size)
- BS_Size=0;
- else if (Buffer_Offset+Element_Size<=Buffer_Size)
- BS_Size=(size_t)(Element_Size-Element_Offset);
- else if (Buffer_Offset+Element_Offset<=Buffer_Size)
- BS_Size=Buffer_Size-(size_t)(Buffer_Offset+Element_Offset);
- else
- BS_Size=0;
-
- BS->Attach(Buffer+Buffer_Offset+(size_t)Element_Offset, BS_Size);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::BS_Begin_LE()
-{
- size_t BS_Size;
- if (Buffer_Offset+Element_Size<=Buffer_Size)
- BS_Size=(size_t)(Element_Size-Element_Offset);
- else if (Buffer_Offset+Element_Offset<=Buffer_Size)
- BS_Size=Buffer_Size-(size_t)(Buffer_Offset+Element_Offset);
- else
- BS_Size=0;
-
- BT->Attach(Buffer+Buffer_Offset+(size_t)Element_Offset, BS_Size);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::BS_End()
-{
- BS->Byte_Align();
- Element_Offset+=BS->Offset_Get();
- BS->Attach(NULL, 0);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::BS_End_LE()
-{
- BT->Byte_Align();
- Element_Offset+=BT->Offset_Get();
- BT->Attach(NULL, 0);
-}
-
-//***************************************************************************
-// Big Endian
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B1_(int8u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(1);
- Info=BigEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=1;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B2_(int16u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=BigEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=2;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B3_(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(3);
- Info=BigEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=3;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B4_(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B5_(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(5);
- Info=BigEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=5;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B6_(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=BigEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=6;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B7_(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(7);
- Info=BigEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=7;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B8_(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=BigEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_B16_(int128u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- //Info=BigEndian2int128u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.hi=BigEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.lo=BigEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset+8);
- Element_Offset+=16;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - float 16 bits
-// TODO: remove it when Linux version of ZenLib is updated
-float32 BigEndian2float16corrected(const char* Liste)
-{
- //sign 1 bit
- //exponent 5 bit
- //significand 10 bit
-
- //Retrieving data
- int16u Integer=BigEndian2int16u(Liste);
-
- //Retrieving elements
- bool Sign =(Integer&0x8000)?true:false;
- int32u Exponent=(Integer>>10)&0xFF;
- int32u Mantissa= Integer&0x03FF;
-
- //Some computing
- if (Exponent==0 || Exponent==0xFF)
- return 0; //These are denormalised numbers, NANs, and other horrible things
- Exponent-=0x0F; //Bias
- float64 Answer=(((float64)Mantissa)/8388608+1.0)*std::pow((float64)2, (int)Exponent); //(1+Mantissa) * 2^Exponent
- if (Sign)
- Answer=-Answer;
-
- return (float32)Answer;
-}
-inline float32 BigEndian2float16corrected (const int8u* List) {return BigEndian2float16corrected ((const char*)List);}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BF2_(float32 &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=BigEndian2float16corrected(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BF4_(float32 &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=BigEndian2float32(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BF8_(float64 &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=BigEndian2float64(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BF10_(float80 &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(10);
- Info=BigEndian2float80(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=10;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BFP4_(int8u Bits, float32 &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- BS_Begin();
- int32s Integer=(int32s)BS->Get4(Bits);
- int32u Fraction=BS->Get4(32-Bits);
- BS_End();
- if (Integer>=(1<<Bits)/2)
- Integer-=1<<Bits;
- Info=Integer+((float32)Fraction)/(1<<(32-Bits));
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B1(int8u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(1);
- Info=BigEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B2(int16u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=BigEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B3(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(3);
- Info=BigEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B4(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B5(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(5);
- Info=BigEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B6(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=BigEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B7(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(7);
- Info=BigEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B8(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=BigEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_B16(int128u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- Info=BigEndian2int128u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//***************************************************************************
-// Little Endian
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L1_(int8u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(1);
- Info=LittleEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=1;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L2_(int16u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=LittleEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=2;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L3_(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(3);
- Info=LittleEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=3;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L4_(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L5_(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(5);
- Info=LittleEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=5;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L6_(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=LittleEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=6;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L7_(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(7);
- Info=LittleEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=7;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L8_(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_L16_(int128u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- //Info=LittleEndian2int128u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.lo=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.hi=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset+8);
- Element_Offset+=16;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_LF4_(float32 &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=LittleEndian2float32(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_LF8_(float64 &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=LittleEndian2float64(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L1(int8u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(1);
- Info=LittleEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L2(int16u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=LittleEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L3(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(3);
- Info=LittleEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L4(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L5(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(5);
- Info=LittleEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L6(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=LittleEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L7(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(7);
- Info=LittleEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_L8(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//***************************************************************************
-// Little and Big Endian together
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D1_(int8u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=LittleEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=2;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D2_(int16u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=LittleEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D3_(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=LittleEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=6;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D4_(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D5_(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(10);
- Info=LittleEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=10;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D6_(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(12);
- Info=LittleEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=12;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D7_(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(14);
- Info=LittleEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=14;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D8_(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- Info=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=16;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_D16_(int128u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(32);
- //Info=LittleEndian2int128u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.lo=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.hi=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset+8);
- Element_Offset+=32;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_DF4_(float32 &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=LittleEndian2float32(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=8;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_DF8_(float64 &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- Info=LittleEndian2float64(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=16;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D1(int8u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=LittleEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D2(int16u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=LittleEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D3(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=LittleEndian2int24u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D4(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D5(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(10);
- Info=LittleEndian2int40u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D6(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(12);
- Info=LittleEndian2int48u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D7(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(14);
- Info=LittleEndian2int56u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_D8(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- Info=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
-}
-
-//***************************************************************************
-// GUID
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_GUID(int128u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(16);
- Info.hi=LittleEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Info.lo=BigEndian2int64u (Buffer+Buffer_Offset+(size_t)Element_Offset+8);
- Element_Offset+=16;
-}
-
-//***************************************************************************
-// EBML
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_EB(int64u &Info)
-{
- //Element size
- INTEGRITY_SIZE_ATLEAST_INT(1);
- if (Buffer[Buffer_Offset+Element_Offset]==0xFF)
- {
- Info=File_Size-(File_Offset+Buffer_Offset+Element_Offset);
- Element_Offset++;
- return;
- }
- int8u Size=0;
- int8u Size_Mark=0;
- BS_Begin();
- while (Size_Mark==0 && BS->Remain() && Size<=8)
- {
- Size++;
- Peek_S1(Size, Size_Mark);
- }
-
- //Integrity
- if (!BS->Remain() || Size>8)
- {
- if (Size>8)
- {
- //Element[Element_Level].IsComplete=true; //If it is in a header
- Trusted_IsNot("EBML integer parsing error");
- }
- Info=0;
- return;
- }
- BS_End();
- if (File_Offset+Buffer_Offset+Element_Offset>=Element[Element_Level].Next)
- {
- //Element[Element_Level].IsComplete=true; //If it is in a header
- Trusted_IsNot("Not enough place to have an EBML");
- Info=0;
- return; //Not enough space
- }
- INTEGRITY_SIZE_ATLEAST_INT(Size);
-
- //Element Name
- switch (Size)
- {
- case 1 : {
- int8u Element_Name;
- Peek_B1 (Element_Name);
- Info=Element_Name&0x7F; //Keep out first bit
- }
- break;
- case 2 : {
- int16u Element_Name;
- Peek_B2(Element_Name);
- Info=Element_Name&0x3FFF; //Keep out first bits
- }
- break;
- case 3 : {
- int32u Element_Name;
- Peek_B3(Element_Name);
- Info=Element_Name&0x1FFFFF; //Keep out first bits
- }
- break;
- case 4 : {
- int32u Element_Name;
- Peek_B4(Element_Name);
- Info=Element_Name&0x0FFFFFFF; //Keep out first bits
- }
- break;
- case 5 : {
- int64u Element_Name;
- Peek_B5(Element_Name);
- Info=Element_Name&0x07FFFFFFFFLL; //Keep out first bits
- }
- break;
- case 6 : {
- int64u Element_Name;
- Peek_B6(Element_Name);
- Info=Element_Name&0x03FFFFFFFFFFLL; //Keep out first bits
- }
- break;
- case 7 : {
- int64u Element_Name;
- Peek_B7(Element_Name);
- Info=Element_Name&0x01FFFFFFFFFFFFLL; //Keep out first bits
- }
- break;
- case 8 : {
- int64u Element_Name;
- Peek_B8(Element_Name);
- Info=Element_Name&0x00FFFFFFFFFFFFFFLL; //Keep out first bits
- }
- break;
- }
-
- Element_Offset+=Size;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_ES(int64s &Info)
-{
- //Element size
- INTEGRITY_SIZE_ATLEAST_INT(1);
- int8u Size=0;
- int8u Size_Mark=0;
- BS_Begin();
- while (Size_Mark==0 && BS->Remain() && Size<=8)
- {
- Size++;
- Peek_S1(Size, Size_Mark);
- }
-
- //Integrity
- if (!BS->Remain() || Size>8)
- {
- if (Size>8)
- {
- //Element[Element_Level].IsComplete=true; //If it is in a header
- Trusted_IsNot("EBML integer parsing error");
- }
- Info=0;
- return;
- }
- BS_End();
- if (File_Offset+Buffer_Offset+Element_Offset>=Element[Element_Level].Next)
- {
- //Element[Element_Level].IsComplete=true; //If it is in a header
- Trusted_IsNot("Not enough place to have an EBML");
- Info=0;
- return; //Not enough space
- }
- INTEGRITY_SIZE_ATLEAST_INT(Size);
-
- //Element Name
- switch (Size)
- {
- case 1 : {
- int8u Element_Name;
- Peek_B1 (Element_Name);
- Info=(Element_Name&0x7F)-0x3F; //Keep out first bit and sign
- }
- break;
- case 2 : {
- int16u Element_Name;
- Peek_B2(Element_Name);
- Info=(Element_Name&0x3FFF)-0x1FFF; //Keep out first bits and sign
- }
- break;
- case 3 : {
- int32u Element_Name;
- Peek_B3(Element_Name);
- Info=(Element_Name&0x1FFFFF)-0x0FFFFF; //Keep out first bits and sign
- }
- break;
- case 4 : {
- int32u Element_Name;
- Peek_B4(Element_Name);
- Info=(Element_Name&0x0FFFFFFF)-0x07FFFFFF; //Keep out first bits and sign
- }
- break;
- case 5 : {
- int64u Element_Name;
- Peek_B5(Element_Name);
- Info=(Element_Name&0x07FFFFFFFFLL)-0x03FFFFFFFFLL; //Keep out first bits and sign
- }
- break;
- case 6 : {
- int64u Element_Name;
- Peek_B6(Element_Name);
- Info=(Element_Name&0x03FFFFFFFFFFLL)-0x01FFFFFFFFFFLL; //Keep out first bits and sign
- }
- break;
- case 7 : {
- int64u Element_Name;
- Peek_B7(Element_Name);
- Info=(Element_Name&0x01FFFFFFFFFFFFLL)-0x00FFFFFFFFFFFFLL; //Keep out first bits and sign
- }
- break;
- case 8 : {
- int64u Element_Name;
- Peek_B8(Element_Name);
- Info=(Element_Name&0x00FFFFFFFFFFFFFFLL)-0x007FFFFFFFFFFFFFLL; //Keep out first bits and sign
- }
- break;
- }
-
- Element_Offset+=Size;
-}
-
-//***************************************************************************
-// Variable Length Value
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_VS(int64u &Info)
-{
- //Element size
- Info=0;
- int8u Size=0;
- bool more_data;
- BS_Begin();
- do
- {
- Size++;
- INTEGRITY_INT(8<=BS->Remain())
- more_data=BS->GetB();
- Info=128*Info+BS->Get1(7);
- }
- while (more_data && Size<=8 && BS->Remain());
- BS_End();
-
- //Integrity
- if (Size>8)
- {
- Trusted_IsNot("Variable Length Value parsing error");
- Info=0;
- return;
- }
- if (File_Offset+Buffer_Offset+Element_Offset>=Element[Element_Level].Next)
- {
- Trusted_IsNot("Not enough place to have a Variable Length Value");
- Info=0;
- return; //Not enough space
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_VS()
-{
- //Element size
- int64u Info=0;
- int8u Size=0;
- bool more_data;
- BS_Begin();
- do
- {
- Size++;
- INTEGRITY_INT(8<=BS->Remain())
- more_data=BS->GetB();
- Info=128*Info+BS->Get1(7);
- }
- while (more_data && Size<=8 && BS->Remain());
- BS_End();
-
- //Integrity
- if (Size>8)
- {
- Trusted_IsNot("Variable Size Value parsing error");
- Info=0;
- return;
- }
- if (File_Offset+Buffer_Offset+Element_Offset>=Element[Element_Level].Next)
- {
- Trusted_IsNot("Not enough place to have a Variable Size Value");
- Info=0;
- return; //Not enough space
- }
-}
-
-//***************************************************************************
-// Exp-Golomb
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_SE(int32s &Info)
-{
- INTEGRITY_SIZE_ATLEAST_BUFFER();
- int8u LeadingZeroBits=0;
- while(BS->Remain()>0 && !BS->GetB())
- LeadingZeroBits++;
- INTEGRITY(LeadingZeroBits<=32)
- double InfoD=pow((float)2, (float)LeadingZeroBits)-1+BS->Get4(LeadingZeroBits);
- INTEGRITY(InfoD<int32u(-1))
- Info=(int32s)(pow((double)-1, InfoD+1)*(int32u)ceil(InfoD/2));
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_UE(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_BUFFER();
- int8u LeadingZeroBits=0;
- while(BS->Remain()>0 && !BS->GetB())
- LeadingZeroBits++;
- INTEGRITY(LeadingZeroBits<=32)
- double InfoD=pow((float)2, (float)LeadingZeroBits);
- Info=(int32u)InfoD-1+BS->Get4(LeadingZeroBits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_UE()
-{
- INTEGRITY(BS->Remain())
- int8u LeadingZeroBits=0;
- while(BS->Remain()>0 && !BS->GetB())
- LeadingZeroBits++;
- BS->Skip(LeadingZeroBits);
-}
-
-//***************************************************************************
-// Inverted Exp-Golomb
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_SI(int32s &Info)
-{
- INTEGRITY_SIZE_ATLEAST_BUFFER();
-
- Info=1;
- while(BS->Remain()>0 && BS->GetB()==0)
- {
- Info<<=1;
- if (BS->Remain()==0)
- {
- Trusted_IsNot("(Problem)");
- Info=0;
- return;
- }
- if(BS->GetB()==1)
- Info++;
- }
- Info--;
-
- if (Info!=0 && BS->Remain()>0 && BS->GetB()==1)
- Info=-Info;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_SI()
-{
- int32s Info;
- Get_SI(Info);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_UI(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_BUFFER();
- Info=1;
- while(BS->Remain()>0 && BS->GetB()==0)
- {
- Info<<=1;
- if (BS->Remain()==0)
- {
- Trusted_IsNot("(Problem)");
- Info=0;
- return;
- }
- if(BS->GetB()==1)
- Info++;
- }
- Info--;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_UI()
-{
- int32u Info;
- Get_UI(Info);
-}
-
-//***************************************************************************
-// Variable Length Code
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_VL_(const vlc Vlc[], size_t &Info)
-{
- Info=0;
- int32u Value=0;
-
- for(;;)
- {
- switch (Vlc[Info].bit_increment)
- {
- case 255 :
- Trusted_IsNot();
- return;
- default : ;
- Value<<=Vlc[Info].bit_increment;
- Value|=BS->Get1(Vlc[Info].bit_increment);
- break;
- case 1 :
- Value<<=1;
- if (BS->GetB())
- Value++;
- case 0 : ;
- }
-
- if (Value==Vlc[Info].value)
- return;
- Info++;
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_VL_(const vlc Vlc[])
-{
- size_t Info=0;
- int32u Value=0;
-
- for(;;)
- {
- switch (Vlc[Info].bit_increment)
- {
- case 255 :
- Trusted_IsNot();
- return;
- default : ;
- Value<<=Vlc[Info].bit_increment;
- Value|=BS->Get1(Vlc[Info].bit_increment);
- break;
- case 1 :
- Value<<=1;
- if (BS->GetB())
- Value++;
- case 0 : ;
- }
-
- if (Value==Vlc[Info].value)
- return;
- Info++;
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_VL_Prepare(vlc_fast &Vlc)
-{
- Vlc.Array=new int8u[((size_t)1)<<Vlc.Size];
- Vlc.BitsToSkip=new int8u[((size_t)1)<<Vlc.Size];
- memset(Vlc.Array, 0xFF, ((size_t)1)<<Vlc.Size);
- int8u Increment=0;
- int8u Pos=0;
- for(; ; Pos++)
- {
- if (Vlc.Vlc[Pos].bit_increment==255)
- break;
- Increment+=Vlc.Vlc[Pos].bit_increment;
- size_t Value = ((size_t)Vlc.Vlc[Pos].value) << (Vlc.Size - Increment);
- size_t ToFill_Size=((size_t)1)<<(Vlc.Size-Increment);
- for (size_t ToFill_Pos=0; ToFill_Pos<ToFill_Size; ToFill_Pos++)
- {
- Vlc.Array[Value+ToFill_Pos]=Pos;
- Vlc.BitsToSkip[Value+ToFill_Pos]=Increment;
- }
- }
- for (size_t Pos2=0; Pos2<(((size_t)1)<<Vlc.Size); Pos2++)
- if (Vlc.Array[Pos2]==(int8u)-1)
- {
- Vlc.Array[Pos2]=Pos;
- Vlc.BitsToSkip[Pos2]=(int8u)-1;
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_VL_(const vlc_fast &Vlc, size_t &Info)
-{
- if (BS->Remain()<Vlc.Size)
- {
- Get_VL(Vlc.Vlc, Info, Name);
- return;
- }
-
- int32u Value=BS->Peek4(Vlc.Size);
- Info=Vlc.Array[Value];
-
- if (Vlc.BitsToSkip[Value]==(int8u)-1)
- {
- Trusted_IsNot();
- return;
- }
-
- BS->Skip(Vlc.BitsToSkip[Value]);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_VL_(const vlc_fast &Vlc)
-{
- if (BS->Remain()<Vlc.Size)
- {
- Skip_VL_(Vlc.Vlc);
- return;
- }
-
- int32u Value=BS->Peek4(Vlc.Size);
-
- if (Vlc.BitsToSkip[Value]==(int8u)-1)
- {
- Trusted_IsNot();
- return;
- }
-
- BS->Skip(Vlc.BitsToSkip[Value]);
-}
-
-//***************************************************************************
-// Characters
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C1(int8u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(1);
- Info=CC1(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=1;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C2(int16u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(2);
- Info=CC2(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=2;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C3(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(3);
- Info=CC3(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=3;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C4(int32u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(4);
- Info=CC4(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=4;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C5(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(5);
- Info=CC5(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=5;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C6(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(6);
- Info=CC6(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=6;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C7(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(7);
- Info=CC7(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=7;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_C8(int64u &Info)
-{
- INTEGRITY_SIZE_ATLEAST_INT(8);
- Info=CC8(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=8;
-}
-
-//***************************************************************************
-// Text
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_Local(int64u Bytes, Ztring &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_ISO_6937_2(int64u Bytes, Ztring &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.clear();
- size_t End = Buffer_Offset + (size_t)Element_Offset + (size_t)Bytes;
- for (size_t Pos=Buffer_Offset+(size_t)Element_Offset; Pos<End; ++Pos)
- {
- wchar_t EscapeChar=__T('\x0000');
- wchar_t NewChar=__T('\x0000');
- switch (Buffer[Pos])
- {
- case 0xA9 : NewChar=__T('\x2018'); break;
- case 0xAA : NewChar=__T('\x201C'); break;
- case 0xAC : NewChar=__T('\x2190'); break;
- case 0xAD : NewChar=__T('\x2191'); break;
- case 0xAE : NewChar=__T('\x2192'); break;
- case 0xAF : NewChar=__T('\x2193'); break;
- case 0xB4 : NewChar=__T('\x00D7'); break;
- case 0xB8 : NewChar=__T('\x00F7'); break;
- case 0xB9 : NewChar=__T('\x2019'); break;
- case 0xBA : NewChar=__T('\x201D'); break;
- case 0xC1 : EscapeChar=__T('\x0300'); break;
- case 0xC2 : EscapeChar=__T('\x0301'); break;
- case 0xC3 : EscapeChar=__T('\x0302'); break;
- case 0xC4 : EscapeChar=__T('\x0303'); break;
- case 0xC5 : EscapeChar=__T('\x0304'); break;
- case 0xC6 : EscapeChar=__T('\x0306'); break;
- case 0xC7 : EscapeChar=__T('\x0307'); break;
- case 0xC8 : EscapeChar=__T('\x0308'); break;
- case 0xCA : EscapeChar=__T('\x030A'); break;
- case 0xCB : EscapeChar=__T('\x0327'); break;
- case 0xCD : EscapeChar=__T('\x030B'); break;
- case 0xCE : EscapeChar=__T('\x0328'); break;
- case 0xCF : EscapeChar=__T('\x030C'); break;
- case 0xD0 : NewChar=__T('\x2015'); break;
- case 0xD1 : NewChar=__T('\x00B9'); break;
- case 0xD2 : NewChar=__T('\x00AE'); break;
- case 0xD3 : NewChar=__T('\x00A9'); break;
- case 0xD4 : NewChar=__T('\x2122'); break;
- case 0xD5 : NewChar=__T('\x266A'); break;
- case 0xD6 : NewChar=__T('\x00AC'); break;
- case 0xD7 : NewChar=__T('\x00A6'); break;
- case 0xDC : NewChar=__T('\x215B'); break;
- case 0xDD : NewChar=__T('\x215C'); break;
- case 0xDE : NewChar=__T('\x215D'); break;
- case 0xDF : NewChar=__T('\x215E'); break;
- case 0xE0 : NewChar=__T('\x2126'); break;
- case 0xE1 : NewChar=__T('\x00C6'); break;
- case 0xE2 : NewChar=__T('\x0110'); break;
- case 0xE3 : NewChar=__T('\x00AA'); break;
- case 0xE4 : NewChar=__T('\x0126'); break;
- case 0xE6 : NewChar=__T('\x0132'); break;
- case 0xE7 : NewChar=__T('\x013F'); break;
- case 0xE8 : NewChar=__T('\x0141'); break;
- case 0xE9 : NewChar=__T('\x00D8'); break;
- case 0xEA : NewChar=__T('\x0152'); break;
- case 0xEB : NewChar=__T('\x00BA'); break;
- case 0xEC : NewChar=__T('\x00DE'); break;
- case 0xED : NewChar=__T('\x0166'); break;
- case 0xEE : NewChar=__T('\x014A'); break;
- case 0xEF : NewChar=__T('\x0149'); break;
- case 0xF0 : NewChar=__T('\x0138'); break;
- case 0xF1 : NewChar=__T('\x00E6'); break;
- case 0xF2 : NewChar=__T('\x0111'); break;
- case 0xF3 : NewChar=__T('\x00F0'); break;
- case 0xF4 : NewChar=__T('\x0127'); break;
- case 0xF5 : NewChar=__T('\x0131'); break;
- case 0xF6 : NewChar=__T('\x0133'); break;
- case 0xF7 : NewChar=__T('\x0140'); break;
- case 0xF8 : NewChar=__T('\x0142'); break;
- case 0xF9 : NewChar=__T('\x00F8'); break;
- case 0xFA : NewChar=__T('\x0153'); break;
- case 0xFB : NewChar=__T('\x0153'); break;
- case 0xFC : NewChar=__T('\x00FE'); break;
- case 0xFD : NewChar=__T('\x00FE'); break;
- case 0xFE : NewChar=__T('\x014B'); break;
- case 0xFF : NewChar=__T('\x00AD'); break;
- case 0xC0 :
- case 0xC9 :
- case 0xCC :
- case 0xD8 :
- case 0xD9 :
- case 0xDA :
- case 0xDB :
- case 0xE5 :
- break;
- default : NewChar=(wchar_t)(Buffer[Pos]);
- }
-
- if (EscapeChar)
- {
- if (Pos+1<End)
- {
- Info+=(Char)(Buffer[Pos+1]);
- Info+=Ztring().From_Unicode(&EscapeChar, 1); //(EscapeChar) after new ZenLib release
- EscapeChar=__T('\x0000');
- Pos++;
- }
- }
- else if (NewChar)
- Info+=Ztring().From_Unicode(&NewChar, 1); //(NewChar) after new ZenLib release
-
- }
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_ISO_8859_1(int64u Bytes, Ztring &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_ISO_8859_1((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_ISO_8859_2(int64u Bytes, Ztring &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_ISO_8859_2((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_ISO_8859_5(int64u Bytes, Ztring &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.clear();
- size_t End = Buffer_Offset + (size_t)Element_Offset + (size_t)Bytes;
- for (size_t Pos=Buffer_Offset+(size_t)Element_Offset; Pos<End; ++Pos)
- {
- switch (Buffer[Pos])
- {
- case 0xAD : Info+=Ztring().From_Unicode(L"\xAD"); break; //L'\xAD' after new ZenLib release
- case 0xF0 : Info+=Ztring().From_Unicode(L"\x2116"); break; //L'\x2116' after new ZenLib release
- case 0xFD : Info+=Ztring().From_Unicode(L"\xA7"); break; //L'\xA7' after new ZenLib release
- default :
- {
- wchar_t NewChar=(Buffer[Pos]<=0xA0?0x0000:0x0360)+Buffer[Pos];
- Info+=Ztring().From_Unicode(&NewChar, 1); //(NewChar) after new ZenLib release
- }
- }
- }
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_String(int64u Bytes, std::string &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.assign((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_Local(int64u Bytes, Ztring &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_String(int64u Bytes, std::string &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.assign((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_UTF8(int64u Bytes, Ztring &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_UTF8((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_UTF16(int64u Bytes, Ztring &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_UTF16((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_UTF16B(int64u Bytes, Ztring &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_UTF16BE((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- Element_Offset+=Bytes;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_UTF16L(int64u Bytes, Ztring &Info)
-{
- INTEGRITY_SIZE_ATLEAST_STRING(Bytes);
- Info.From_UTF16LE((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes);
- Element_Offset+=Bytes;
-}
-
-//***************************************************************************
-// Text
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_PA()
-{
- INTEGRITY_SIZE_ATLEAST(1);
- int8u Size=Buffer[Buffer_Offset+Element_Offset];
- int8u Pad=(Size%2)?0:1;
- INTEGRITY_SIZE_ATLEAST(1+Size+Pad);
- Element_Offset+=(size_t)(1+Size+Pad);
-}
-
-//***************************************************************************
-// Unknown
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Skip_XX(int64u Bytes)
-{
- if (Element_Offset+Bytes!=Element_TotalSize_Get()) //Exception for seek to end of the element
- {
- INTEGRITY_SIZE_ATLEAST(Bytes);
- }
- Element_Offset+=Bytes;
-}
-
-//***************************************************************************
-// Flags
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_Flags_ (int64u Flags, size_t Order, bool &Info)
-{
- if (Flags&((int64u)1<<Order))
- Info=true;
- else
- Info=false;
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_FlagsM_ (int64u ValueToPut, int8u &Info)
-{
- Info=(int8u)ValueToPut;
-}
-
-//***************************************************************************
-// BitStream
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BS_(int8u Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Get4(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_SB_( bool &Info)
-{
- INTEGRITY_INT(1<=BS->Remain())
- Info=BS->GetB();
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S1_(int8u Bits, int8u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Get1(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S2_(int8u Bits, int16u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Get2(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S3_(int8u Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Get4(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S4_(int8u Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Get4(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S5_(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Get8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S6_(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Get8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S7_(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Get8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_S8_(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Get8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_BS(int8u Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Peek4(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_SB( bool &Info)
-{
- INTEGRITY_INT(1<=BS->Remain())
- Info=BS->PeekB();
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S1(int8u Bits, int8u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Peek1(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S2(int8u Bits, int16u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Peek2(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S3(int8u Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Peek4(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S4(int8u Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Peek4(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S5(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Peek8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S6(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Peek8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S7(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Peek8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_S8(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BS->Remain())
- Info=BS->Peek8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Mark_0()
-{
- INTEGRITY(1<=BS->Remain())
- if (BS->GetB())
- Element_DoNotTrust("Mark bit is wrong");
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Mark_1()
-{
- INTEGRITY(1<=BS->Remain())
- if (!BS->GetB())
- Element_DoNotTrust("Mark bit is wrong");
-}
-
-//***************************************************************************
-// BitStream (Little Endian)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_BT_(int8u Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain())
- Info=BT->Get(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_TB_( bool &Info)
-{
- INTEGRITY_INT(1<=BT->Remain())
- Info=BT->GetB();
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_T1_(int8u Bits, int8u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain())
- Info=BT->Get1(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_T2_(int8u Bits, int16u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain())
- Info=BT->Get2(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_T4_(int8u Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain())
- Info=BT->Get4(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Get_T8_(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain())
- Info=BT->Get8(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_BT(int8u Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain())
- Info=BT->Peek(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_TB( bool &Info)
-{
- INTEGRITY_INT(1<=BT->Remain())
- Info=BT->PeekB();
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_T1(int8u Bits, int8u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain())
- Info=BT->Peek1(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_T2(int8u Bits, int16u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain())
- Info=BT->Peek2(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_T4(int8u Bits, int32u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain())
- Info=BT->Peek4(Bits);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Peek_T8(int8u Bits, int64u &Info)
-{
- INTEGRITY_INT(Bits<=BT->Remain())
- Info=BT->Peek8(Bits);
-}
-
-} //NameSpace
-#endif //MEDIAINFO_TRACE
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_MinimizeSize.h b/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_MinimizeSize.h
deleted file mode 100644
index 36f28c885..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_MinimizeSize.h
+++ /dev/null
@@ -1,1348 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File__AnalyzeMinimizeSizeH
-#define MediaInfo_File__AnalyzeMinimizeSizeH
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Class File__Analyze
-//***************************************************************************
-
-class File__Analyze : public File__Base
-{
-public :
- //***************************************************************************
- // Constructor/Destructor
- //***************************************************************************
-
- File__Analyze();
- virtual ~File__Analyze();
-
- //***************************************************************************
- // Open
- //***************************************************************************
-
- void Open_Buffer_Init ( int64u File_Size);
- void Open_Buffer_Init (File__Analyze* Sub);
- void Open_Buffer_Init (File__Analyze* Sub, int64u File_Size);
- void Open_Buffer_Continue ( const int8u* Buffer, size_t Buffer_Size);
- void Open_Buffer_Continue (File__Analyze* Sub, const int8u* Buffer, size_t Buffer_Size, bool IsNewPacket=true, float64 Ratio=1.0);
- void Open_Buffer_Continue (File__Analyze* Sub, size_t Buffer_Size) {if (Element_Offset+Buffer_Size<=Element_Size) Open_Buffer_Continue(Sub, Buffer+Buffer_Offset+(size_t)Element_Offset, Buffer_Size); Element_Offset+=Buffer_Size;}
- void Open_Buffer_Continue (File__Analyze* Sub) {if (Element_Offset<=Element_Size) Open_Buffer_Continue(Sub, Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset)); Element_Offset=Element_Size;}
- void Open_Buffer_Position_Set(int64u File_Offset);
- #if MEDIAINFO_SEEK
- size_t Open_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
- #if MEDIAINFO_ADVANCED2
- void Open_Buffer_SegmentChange();
- #endif //MEDIAINFO_ADVANCED2
- void Open_Buffer_Unsynch ();
- void Open_Buffer_Update ();
- void Open_Buffer_Update (File__Analyze* Sub);
- void Open_Buffer_Finalize (bool NoBufferModification=false);
- void Open_Buffer_Finalize (File__Analyze* Sub);
-
- //***************************************************************************
- // In/Out (for parsers)
- //***************************************************************************
-
- //In
- Ztring ParserName;
- #if MEDIAINFO_EVENTS
- size_t StreamIDs_Size;
- int64u StreamIDs[16];
- int8u StreamIDs_Width[16];
- int8u ParserIDs[16];
- void Event_Prepare (struct MediaInfo_Event_Generic* Event);
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- int8u Demux_Level; //bit 0=frame, bit 1=container, bit 2=elementary (eg MPEG-TS), bit 3=ancillary (e.g. DTVCC), default with frame set
- bool Demux_random_access;
- bool Demux_UnpacketizeContainer;
- bool Demux_IntermediateItemFound;
- size_t Demux_Offset;
- int64u Demux_TotalBytes;
- File__Analyze* Demux_CurrentParser;
- #endif //MEDIAINFO_DEMUX
- Ztring File_Name_WithoutDemux;
- bool PTS_DTS_Needed;
- struct frame_info
- {
- int64u Buffer_Offset_End;
- int64u PCR; //In nanoseconds
- int64u PTS; //In nanoseconds
- int64u DTS; //In nanoseconds
- int64u DUR; //In nanoseconds
-
- frame_info()
- {
- Buffer_Offset_End=(int64u)-1;
- PCR=(int64u)-1;
- PTS=(int64u)-1;
- DTS=(int64u)-1;
- DUR=(int64u)-1;
- }
- };
- frame_info FrameInfo;
- frame_info FrameInfo_Previous;
- frame_info FrameInfo_Next;
- std::vector<int64u> Offsets_Stream;
- std::vector<int64u> Offsets_Buffer;
- size_t Offsets_Pos;
- int8u* OriginalBuffer;
- size_t OriginalBuffer_Size;
- size_t OriginalBuffer_Capacity;
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- struct servicedescriptor
- {
- string language;
- };
- typedef std::map<int8u, servicedescriptor> servicedescriptors608;
- typedef std::map<int8u, servicedescriptor> servicedescriptors708;
- struct servicedescriptors
- {
- #if defined(MEDIAINFO_EIA608_YES)
- std::map<int8u, servicedescriptor> ServiceDescriptors608;
- #endif
- #if defined(MEDIAINFO_EIA708_YES)
- std::map<int8u, servicedescriptor> ServiceDescriptors708;
- #endif
- };
- servicedescriptors* ServiceDescriptors;
- #endif
-
- //Out
- int64u PTS_Begin; //In nanoseconds
- #if MEDIAINFO_ADVANCED2
- int64u PTS_Begin_Segment; //In nanoseconds
- #endif //MEDIAINFO_ADVANCED2
- int64u PTS_End; //In nanoseconds
- int64u DTS_Begin; //In nanoseconds
- int64u DTS_End; //In nanoseconds
- int64u Frame_Count;
- int64u Frame_Count_Previous;
- int64u Frame_Count_InThisBlock;
- int64u Field_Count;
- int64u Field_Count_Previous;
- int64u Field_Count_InThisBlock;
- int64u Frame_Count_NotParsedIncluded;
- int64u FrameNumber_PresentationOrder;
- bool Synched; //Data is synched
- bool UnSynched_IsNotJunk; //Data is actually synched
- bool MustExtendParsingDuration; //Data has some substreams difficult to detect (e.g. captions), must wait a bit before final filling
-
-protected :
- //***************************************************************************
- // Streams management
- //***************************************************************************
-
- virtual void Streams_Accept() {};
- virtual void Streams_Fill() {};
- virtual void Streams_Update() {};
- virtual void Streams_Finish() {};
-
- //***************************************************************************
- // Synchro
- //***************************************************************************
-
- virtual bool Synchronize() {Synched=true; return true;}; //Look for the synchro
- virtual bool Synched_Test() {return true;}; //Test is synchro is OK
- virtual void Synched_Init() {}; //When synched, we can Init data
- bool Synchro_Manage();
- bool Synchro_Manage_Test();
-
- //***************************************************************************
- // Buffer
- //***************************************************************************
-
- //Buffer
- virtual void Read_Buffer_Init () {}; //Temp, should be in File__Base caller
- virtual void Read_Buffer_Continue () {}; //Temp, should be in File__Base caller
- virtual void Read_Buffer_AfterParsing () {}; //Temp, should be in File__Base caller
- #if MEDIAINFO_SEEK
- virtual size_t Read_Buffer_Seek (size_t, int64u, int64u); //Temp, should be in File__Base caller
- size_t Read_Buffer_Seek_OneFramePerFile (size_t, int64u, int64u);
- #endif //MEDIAINFO_SEEK
- #if MEDIAINFO_ADVANCED2
- virtual void Read_Buffer_SegmentChange () {}; //Temp, should be in File__Base caller
- #endif //MEDIAINFO_ADVANCED2
- virtual void Read_Buffer_Unsynched () {}; //Temp, should be in File__Base caller
- void Read_Buffer_Unsynched_OneFramePerFile ();
- virtual void Read_Buffer_Finalize () {}; //Temp, should be in File__Base caller
- bool Buffer_Parse();
-
- //***************************************************************************
- // BitStream init
- //***************************************************************************
-
- void BS_Begin();
- void BS_Begin_LE(); //Little Endian version
- void BS_End();
- void BS_End_LE(); //Little Endian version
-
- //***************************************************************************
- // File Header
- //***************************************************************************
-
- //File Header - Management
- bool FileHeader_Manage ();
-
- //File Header - Begin
- virtual bool FileHeader_Begin () {return true;};
-
- //File Header - Parse
- virtual void FileHeader_Parse () {Element_DoNotShow();};
-
- //***************************************************************************
- // Header
- //***************************************************************************
-
- //Header - Management
- bool Header_Manage ();
-
- //Header - Begin
- virtual bool Header_Begin () {return true;};
-
- //Header - Parse
- virtual void Header_Parse ();
-
- //Header - Info
- void Header_Fill_Code (int64u Code);
- inline void Header_Fill_Code (int64u Code, const Ztring &) {Header_Fill_Code(Code);};
- #define Header_Fill_Code2(A,B) Header_Fill_Code(A)
- void Header_Fill_Size (int64u Size);
-
- //***************************************************************************
- // Data
- //***************************************************************************
-
- //Header - Management
- bool Data_Manage ();
-
- //Data - Parse
- virtual void Data_Parse () {};
-
- //Data - Info
- inline void Data_Info (const Ztring &) {};
- inline void Data_Info_From_Milliseconds (int64u) {}
-
- //Data - Get info
- size_t Data_Remain () {return (size_t)(Element_Size-(Element_Offset+BS->Offset_Get()));};
- size_t Data_BS_Remain () {return (size_t)BS->Remain();};
-
- //Data - Detect EOF
- virtual void Detect_EOF () {};
- bool EOF_AlreadyDetected;
-
- //Data - Helpers
- void Data_Accept (const char*) {Accept();}
- void Data_Accept () {Accept();}
- void Data_Reject (const char*) {Reject();}
- void Data_Reject () {Reject();}
- void Data_Finish (const char*) {ForceFinish();}
- void Data_Finish () {ForceFinish();}
- void Data_GoTo (int64u GoTo_, const char*) {GoTo(GoTo_);}
- void Data_GoTo (int64u GoTo_) {GoTo(GoTo_);}
- void Data_GoToFromEnd (int64u GoToFromEnd_, const char*) {GoToFromEnd(GoToFromEnd_);}
- void Data_GoToFromEnd (int64u GoToFromEnd_) {GoToFromEnd(GoToFromEnd_);}
-
- //***************************************************************************
- // Elements
- //***************************************************************************
-
- //Elements - Begin
- void Element_Begin ();
- #define Element_Begin0() Element_Begin()
- #define Element_Begin1(_NAME) Element_Begin()
- #define Element_Trace_Begin0()
- #define Element_Trace_Begin1(_NAME)
-
- //Elements - Name
- #define Element_Name(_A)
-
- //Elements - Info
- #define Element_Info1(_A)
- #define Element_Info2(_A,_B)
- #define Element_Info3(_A,_B,_C)
- #define Element_Info1C(_CONDITION,_A)
- #define Element_Info_From_Milliseconds(_A)
-
- //Elements - End
- inline void Element_End () {Element_End_Common_Flush();}
- #define Element_End0() Element_End()
- #define Element_End1(_NAME) Element_End()
- #define Element_Trace_End0()
- #define Element_Trace_End1(_NAME)
-
- //Elements - Preparation of element from external app
- void Element_Prepare (int64u Size);
-
-protected :
- //Element - Common
- void Element_End_Common_Flush();
- Ztring Element_End_Common_Flush_Build();
-public :
-
- //***************************************************************************
- // Param
- //***************************************************************************
-
- //Param - Main
- #define Param1(_A)
- #define Param2(_A,_B)
- #define Param3(_A,_B,_C)
-
- //Param - Info
- #define Param_Info1(_A)
- #define Param_Info2(_A,_B)
- #define Param_Info3(_A,_B,_C)
- #define Param_Info1C(_CONDITION,_A)
- #define Param_Info2C(_CONDITION,_A,_B)
- #define Param_Info3C(_CONDITION,_A,_B,_C)
- #define Param_Info_From_Milliseconds(A)
-
- //***************************************************************************
- // Information
- //***************************************************************************
-
- inline void Info (const Ztring&, size_t =0) {}
-
- //***************************************************************************
- // Big Endian (Integer, Float, Fixed-Point)
- //***************************************************************************
-
- void Get_B1_ (int8u &Info);
- void Get_B2_ (int16u &Info);
- void Get_B3_ (int32u &Info);
- void Get_B4_ (int32u &Info);
- void Get_B5_ (int64u &Info);
- void Get_B6_ (int64u &Info);
- void Get_B7_ (int64u &Info);
- void Get_B8_ (int64u &Info);
- void Get_B16_ (int128u &Info);
- void Get_BF2_ (float32 &Info);
- void Get_BF4_ (float32 &Info);
- void Get_BF8_ (float64 &Info);
- void Get_BF10_ (float80 &Info);
- void Get_BFP4_ (int8u Bits, float32 &Info);
- #define Get_B1(Info, Name) Get_B1_(Info)
- #define Get_B2(Info, Name) Get_B2_(Info)
- #define Get_B3(Info, Name) Get_B3_(Info)
- #define Get_B4(Info, Name) Get_B4_(Info)
- #define Get_B5(Info, Name) Get_B5_(Info)
- #define Get_B6(Info, Name) Get_B6_(Info)
- #define Get_B7(Info, Name) Get_B7_(Info)
- #define Get_B8(Info, Name) Get_B8_(Info)
- #define Get_B16(Info, Name) Get_B16_(Info)
- #define Get_BF2(Info, Name) Get_BF2_(Info)
- #define Get_BF4(Info, Name) Get_BF4_(Info)
- #define Get_BF8(Info, Name) Get_BF8_(Info)
- #define Get_BF10(Info, Name) Get_BF10_(Info)
- #define Get_BFP4(Bits, Info, Name) Get_BFP4_(Bits, Info)
- void Peek_B1 (int8u &Info);
- void Peek_B2 (int16u &Info);
- void Peek_B3 (int32u &Info);
- void Peek_B4 (int32u &Info);
- void Peek_B5 (int64u &Info);
- void Peek_B6 (int64u &Info);
- void Peek_B7 (int64u &Info);
- void Peek_B8 (int64u &Info);
- void Peek_B16 (int128u &Info);
- void Peek_BF4 (float32 &Info);
- void Peek_BF8 (float64 &Info);
- void Peek_BF10(float64 &Info);
- void Peek_BFP4(int8u Bits, float64 &Info);
- #define Skip_B1(Name) Element_Offset++
- #define Skip_B2(Name) Element_Offset+=2
- #define Skip_B3(Name) Element_Offset+=3
- #define Skip_B4(Name) Element_Offset+=4
- #define Skip_B5(Name) Element_Offset+=5
- #define Skip_B6(Name) Element_Offset+=6
- #define Skip_B7(Name) Element_Offset+=7
- #define Skip_B8(Name) Element_Offset+=8
- #define Skip_BF4(Name) Element_Offset+=4
- #define Skip_BF8(Name) Element_Offset+=8
- #define Skip_B16(Name) Element_Offset+=16
- #define Skip_BFP4(Size, Name) Element_Offset+=4
- #define Info_B1(_INFO, _NAME) Element_Offset++
- #define Info_B2(_INFO, _NAME) Element_Offset+=2
- #define Info_B3(_INFO, _NAME) Element_Offset+=3
- #define Info_B4(_INFO, _NAME) Element_Offset+=4
- #define Info_B5(_INFO, _NAME) Element_Offset+=5
- #define Info_B6(_INFO, _NAME) Element_Offset+=6
- #define Info_B7(_INFO, _NAME) Element_Offset+=7
- #define Info_B8(_INFO, _NAME) Element_Offset+=8
- #define Info_B16(_INFO, _NAME) Element_Offset+=16
- #define Info_BF4(_INFO, _NAME) Element_Offset+=4
- #define Info_BF8(_INFO, _NAME) Element_Offset+=8
- #define Info_BF10(_INFO, _NAME) Element_Offset+=10
- #define Info_BFP4(_BITS, _INFO, _NAME) Element_Offset+=4
-
- //***************************************************************************
- // Little Endian
- //***************************************************************************
-
- void Get_L1_ (int8u &Info);
- void Get_L2_ (int16u &Info);
- void Get_L3_ (int32u &Info);
- void Get_L4_ (int32u &Info);
- void Get_L5_ (int64u &Info);
- void Get_L6_ (int64u &Info);
- void Get_L7_ (int64u &Info);
- void Get_L8_ (int64u &Info);
- void Get_L16_ (int128u &Info);
- void Get_LF4_ (float32 &Info);
- void Get_LF8_ (float64 &Info);
- void Get_LF10_ (float80 &Info);
- void Get_LFP4_ (int8u Bits, float32 &Info);
- #define Get_L1(Info, Name) Get_L1_(Info)
- #define Get_L2(Info, Name) Get_L2_(Info)
- #define Get_L3(Info, Name) Get_L3_(Info)
- #define Get_L4(Info, Name) Get_L4_(Info)
- #define Get_L5(Info, Name) Get_L5_(Info)
- #define Get_L6(Info, Name) Get_L6_(Info)
- #define Get_L7(Info, Name) Get_L7_(Info)
- #define Get_L8(Info, Name) Get_L8_(Info)
- #define Get_L16(Info, Name) Get_L16_(Info)
- #define Get_LF4(Info, Name) Get_LF4_(Info)
- #define Get_LF8(Info, Name) Get_LF8_(Info)
- #define Get_LF10(Info, Name) Get_LF10_(Info)
- #define Get_LFP4(Bits, Info, Name) Get_LFP4_(Bits, Info)
- void Peek_L1 (int8u &Info);
- void Peek_L2 (int16u &Info);
- void Peek_L3 (int32u &Info);
- void Peek_L4 (int32u &Info);
- void Peek_L5 (int64u &Info);
- void Peek_L6 (int64u &Info);
- void Peek_L7 (int64u &Info);
- void Peek_L8 (int64u &Info);
- void Peek_L16 (int128u &Info);
- void Peek_LF4 (float32 &Info);
- void Peek_LF8 (float64 &Info);
- void Peek_LF10(float64 &Info);
- void Peek_LFP4(int8u Bits, float64 &Info);
- #define Skip_L1(Name) Element_Offset++
- #define Skip_L2(Name) Element_Offset+=2
- #define Skip_L3(Name) Element_Offset+=3
- #define Skip_L4(Name) Element_Offset+=4
- #define Skip_L5(Name) Element_Offset+=5
- #define Skip_L6(Name) Element_Offset+=6
- #define Skip_L7(Name) Element_Offset+=7
- #define Skip_L8(Name) Element_Offset+=8
- #define Skip_LF4(Name) Element_Offset+=4
- #define Skip_LF8(Name) Element_Offset+=8
- #define Skip_L16(Name) Element_Offset+=16
- #define Skip_LFP4(Size, Name) Element_Offset+=4
- #define Info_L1(_INFO, _NAME) Element_Offset++
- #define Info_L2(_INFO, _NAME) Element_Offset+=2
- #define Info_L3(_INFO, _NAME) Element_Offset+=3
- #define Info_L4(_INFO, _NAME) Element_Offset+=4
- #define Info_L5(_INFO, _NAME) Element_Offset+=5
- #define Info_L6(_INFO, _NAME) Element_Offset+=6
- #define Info_L7(_INFO, _NAME) Element_Offset+=7
- #define Info_L8(_INFO, _NAME) Element_Offset+=8
- #define Info_L16(_INFO, _NAME) Element_Offset+=16
- #define Info_LF4(_INFO, _NAME) Element_Offset+=4
- #define Info_LF8(_INFO, _NAME) Element_Offset+=8
- #define Info_LF10(_INFO, _NAME) Element_Offset+=10
- #define Info_LFP4(_LITS, _INFO, _NAME) Element_Offset+=4
-
- //***************************************************************************
- // Little and Big Endian together
- //***************************************************************************
-
- void Get_D1_ (int8u &Info);
- void Get_D2_ (int16u &Info);
- void Get_D3_ (int32u &Info);
- void Get_D4_ (int32u &Info);
- void Get_D5_ (int64u &Info);
- void Get_D6_ (int64u &Info);
- void Get_D7_ (int64u &Info);
- void Get_D8_ (int64u &Info);
- void Get_D16_ (int128u &Info);
- void Get_DF4_ (float32 &Info);
- void Get_DF8_ (float64 &Info);
- void Get_DF10_ (float80 &Info);
- void Get_DFP4_ (int8u Bits, float32 &Info);
- #define Get_D1(Info, Name) Get_D1_(Info)
- #define Get_D2(Info, Name) Get_D2_(Info)
- #define Get_D3(Info, Name) Get_D3_(Info)
- #define Get_D4(Info, Name) Get_D4_(Info)
- #define Get_D5(Info, Name) Get_D5_(Info)
- #define Get_D6(Info, Name) Get_D6_(Info)
- #define Get_D7(Info, Name) Get_D7_(Info)
- #define Get_D8(Info, Name) Get_D8_(Info)
- #define Get_D16(Info, Name) Get_D16_(Info)
- #define Get_DF4(Info, Name) Get_DF4_(Info)
- #define Get_DF8(Info, Name) Get_DF8_(Info)
- #define Get_DF10(Info, Name) Get_DF10_(Info)
- #define Get_DFP4(Bits, Info, Name) Get_DFP4_(Bits, Info)
- void Peek_D1 (int8u &Info);
- void Peek_D2 (int16u &Info);
- void Peek_D3 (int32u &Info);
- void Peek_D4 (int32u &Info);
- void Peek_D5 (int64u &Info);
- void Peek_D6 (int64u &Info);
- void Peek_D7 (int64u &Info);
- void Peek_D8 (int64u &Info);
- void Peek_D16 (int128u &Info);
- void Peek_DF4 (float32 &Info);
- void Peek_DF8 (float64 &Info);
- void Peek_DF10(float64 &Info);
- void Peek_DFP4(int8u Bits, float64 &Info);
- #define Skip_D1(Name) Element_Offset++
- #define Skip_D2(Name) Element_Offset+=2
- #define Skip_D3(Name) Element_Offset+=3
- #define Skip_D4(Name) Element_Offset+=4
- #define Skip_D5(Name) Element_Offset+=5
- #define Skip_D6(Name) Element_Offset+=6
- #define Skip_D7(Name) Element_Offset+=7
- #define Skip_D8(Name) Element_Offset+=8
- #define Skip_DF4(Name) Element_Offset+=4
- #define Skip_DF8(Name) Element_Offset+=8
- #define Skip_D16(Name) Element_Offset+=16
- #define Skip_DFP4(Size, Name) Element_Offset+=4
- #define Info_D1(_INFO, _NAME) Element_Offset++
- #define Info_D2(_INFO, _NAME) Element_Offset+=2
- #define Info_D3(_INFO, _NAME) Element_Offset+=3
- #define Info_D4(_INFO, _NAME) Element_Offset+=4
- #define Info_D5(_INFO, _NAME) Element_Offset+=5
- #define Info_D6(_INFO, _NAME) Element_Offset+=6
- #define Info_D7(_INFO, _NAME) Element_Offset+=7
- #define Info_D8(_INFO, _NAME) Element_Offset+=8
- #define Info_D16(_INFO, _NAME) Element_Offset+=16
- #define Info_DF4(_INFO, _NAME) Element_Offset+=4
- #define Info_DF8(_INFO, _NAME) Element_Offset+=8
- #define Info_DF10(_INFO, _NAME) Element_Offset+=10
- #define Info_DFP4(_DITS, _INFO, _NAME) Element_Offset+=4
-
- //***************************************************************************
- // GUID
- //***************************************************************************
-
- void Get_GUID (int128u &Info);
- inline void Get_GUID (int128u &Info, const char*) {Get_GUID(Info);}
- void Peek_GUID(int128u &Info);
- inline void Skip_GUID( const char*) {if (Element_Offset+16>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=16;}
- #define Info_GUID(_INFO, _NAME) int128u _INFO; Get_GUID(_INFO, _NAME)
-
- //***************************************************************************
- // UUID
- //***************************************************************************
-
- inline void Get_UUID (int128u &Info) {Get_B16_(Info);}
- inline void Get_UUID (int128u &Info, const char*) {Get_B16_(Info);}
- inline void Peek_UUID(int128u &Info) {Peek_B16(Info);}
- inline void Skip_UUID( const char*) {if (Element_Offset+16>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=16;}
- #define Info_UUID(_INFO, _NAME) int128u _INFO; Get_UUID(_INFO, _NAME)
-
- //***************************************************************************
- // EBML
- //***************************************************************************
-
- void Get_EB (int64u &Info);
- void Get_ES (int64s &Info);
- inline void Get_EB (int64u &Info, const char*) {Get_EB(Info);}
- inline void Get_ES (int64s &Info, const char*) {Get_ES(Info);}
- void Skip_EB();
- void Skip_ES();
- inline void Skip_EB( const char*) {Skip_EB();}
- inline void Skip_ES( const char*) {Skip_ES();}
- #define Info_EB(_INFO, _NAME) int64u _INFO; Get_EB(_INFO, _NAME)
- #define Info_ES(_INFO, _NAME) int64s _INFO; Get_ES(_INFO, _NAME)
-
- //***************************************************************************
- // Variable Size Value
- //***************************************************************************
-
- void Get_VS (int64u &Info);
- inline void Get_VS (int64u &Info, const char*) {Get_VS(Info);}
- void Skip_VS();
- inline void Skip_VS( const char*) {Skip_VS();}
- #define Info_VS(_INFO, _NAME) int64u _INFO; Get_VS(_INFO, _NAME)
-
- //***************************************************************************
- // Exp-Golomb
- //***************************************************************************
-
- void Get_UE (int32u &Info);
- void Get_SE (int32s &Info);
- inline void Get_UE (int32u &Info, const char*) {Get_UE(Info);}
- inline void Get_SE (int32s &Info, const char*) {Get_SE(Info);}
- void Skip_UE();
- inline void Skip_SE() {Skip_UE();}
- inline void Skip_UE( const char*) {Skip_UE();}
- inline void Skip_SE( const char*) {Skip_SE();}
- #define Info_UE(_INFO, _NAME) int32u _INFO; Get_UE(_INFO, _NAME)
- #define Info_SE(_INFO, _NAME) int32s _INFO; Get_SE(_INFO, _NAME)
-
- //***************************************************************************
- // Interleaved Exp-Golomb
- //***************************************************************************
-
- void Get_UI (int32u &Info);
- void Get_SI (int32s &Info);
- inline void Get_UI (int32u &Info, const char*) {Get_UI(Info);}
- inline void Get_SI (int32s &Info, const char*) {Get_SI(Info);}
- void Skip_UI();
- void Skip_SI();
- inline void Skip_UI( const char*) {Skip_UI();}
- inline void Skip_SI( const char*) {Skip_SI();}
- #define Info_UI(_INFO, _NAME) int32u _INFO; Get_UI(_INFO, _NAME)
- #define Info_SI(_INFO, _NAME) int32s _INFO; Get_SI(_INFO, _NAME)
-
- //***************************************************************************
- // Variable Length Code
- //***************************************************************************
-
- struct vlc
- {
- int32u value;
- int8u bit_increment;
- int8s mapped_to1;
- int8s mapped_to2;
- int8s mapped_to3;
- };
- struct vlc_fast
- {
- int8u* Array;
- int8u* BitsToSkip;
- const vlc* Vlc;
- int8u Size;
- };
- #define VLC_END \
- {(int32u)-1, (int8u)-1, 0, 0, 0}
- void Get_VL_Prepare(vlc_fast &Vlc);
- void Get_VL_ (const vlc Vlc[], size_t &Info);
- void Get_VL_ (const vlc_fast &Vlc, size_t &Info);
- #define Get_VL(Vlc, Info, Name) Get_VL_(Vlc, Info);
- void Skip_VL_(const vlc Vlc[]);
- void Skip_VL_(const vlc_fast &Vlc);
- #define Skip_VL(Vlc, Name) Skip_VL_(Vlc);
- #define Info_VL(Vlc, Info, Name) Skip_VL_(Vlc)
-
- //***************************************************************************
- // Characters
- //***************************************************************************
-
- void Get_C1 (int8u &Info);
- void Get_C2 (int16u &Info);
- void Get_C3 (int32u &Info);
- void Get_C4 (int32u &Info);
- void Get_C5 (int64u &Info);
- void Get_C6 (int64u &Info);
- void Get_C7 (int64u &Info);
- void Get_C8 (int64u &Info);
- inline void Get_C1 (int8u &Info, const char*) {Get_C1(Info);}
- inline void Get_C2 (int16u &Info, const char*) {Get_C2(Info);}
- inline void Get_C3 (int32u &Info, const char*) {Get_C3(Info);}
- inline void Get_C4 (int32u &Info, const char*) {Get_C4(Info);}
- inline void Get_C5 (int64u &Info, const char*) {Get_C5(Info);}
- inline void Get_C6 (int64u &Info, const char*) {Get_C6(Info);}
- inline void Get_C7 (int64u &Info, const char*) {Get_C7(Info);}
- inline void Get_C8 (int64u &Info, const char*) {Get_C8(Info);}
- inline void Skip_C1( const char*) {if (Element_Offset+1>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=1;}
- inline void Skip_C2( const char*) {if (Element_Offset+2>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=2;}
- inline void Skip_C3( const char*) {if (Element_Offset+3>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=3;}
- inline void Skip_C4( const char*) {if (Element_Offset+4>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=4;}
- inline void Skip_C5( const char*) {if (Element_Offset+5>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=5;}
- inline void Skip_C6( const char*) {if (Element_Offset+6>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=6;}
- inline void Skip_C7( const char*) {if (Element_Offset+7>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=7;}
- inline void Skip_C8( const char*) {if (Element_Offset+8>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=8;}
- #define Info_C1(_INFO, _NAME) int8u _INFO; Get_C1(_INFO, _NAME)
- #define Info_C2(_INFO, _NAME) int16u _INFO; Get_C2(_INFO, _NAME)
- #define Info_C3(_INFO, _NAME) int32u _INFO; Get_C3(_INFO, _NAME)
- #define Info_C4(_INFO, _NAME) int32u _INFO; Get_C4(_INFO, _NAME)
- #define Info_C5(_INFO, _NAME) int64u _INFO; Get_C5(_INFO, _NAME)
- #define Info_C6(_INFO, _NAME) int64u _INFO; Get_C6(_INFO, _NAME)
- #define Info_C7(_INFO, _NAME) int64u _INFO; Get_C7(_INFO, _NAME)
- #define Info_C8(_INFO, _NAME) int64u _INFO; Get_C8(_INFO, _NAME)
-
- //***************************************************************************
- // Text
- //***************************************************************************
-
- void Get_Local (int64u Bytes, Ztring &Info);
- void Get_ISO_6937_2 (int64u Bytes, Ztring &Info);
- void Get_ISO_8859_1 (int64u Bytes, Ztring &Info);
- void Get_ISO_8859_2 (int64u Bytes, Ztring &Info);
- void Get_ISO_8859_5 (int64u Bytes, Ztring &Info);
- void Get_String (int64u Bytes, std::string &Info);
- void Get_UTF8 (int64u Bytes, Ztring &Info);
- void Get_UTF16 (int64u Bytes, Ztring &Info);
- void Get_UTF16B (int64u Bytes, Ztring &Info);
- void Get_UTF16L (int64u Bytes, Ztring &Info);
- inline void Get_Local (int64u Bytes, Ztring &Info, const char*) {Get_Local(Bytes, Info);}
- inline void Get_ISO_6937_2 (int64u Bytes, Ztring &Info, const char*) {Get_ISO_6937_2(Bytes, Info);}
- inline void Get_ISO_8859_1 (int64u Bytes, Ztring &Info, const char*) {Get_ISO_8859_1(Bytes, Info);}
- inline void Get_ISO_8859_2 (int64u Bytes, Ztring &Info, const char*) {Get_ISO_8859_2(Bytes, Info);}
- inline void Get_ISO_8859_5 (int64u Bytes, Ztring &Info, const char*) {Get_ISO_8859_5(Bytes, Info);}
- inline void Get_String (int64u Bytes, std::string &Info, const char*) {Get_String(Bytes, Info);}
- inline void Get_UTF8 (int64u Bytes, Ztring &Info, const char*) {Get_UTF8(Bytes, Info);}
- inline void Get_UTF16 (int64u Bytes, Ztring &Info, const char*) {Get_UTF16(Bytes, Info);}
- inline void Get_UTF16B (int64u Bytes, Ztring &Info, const char*) {Get_UTF16B(Bytes, Info);}
- inline void Get_UTF16L (int64u Bytes, Ztring &Info, const char*) {Get_UTF16L(Bytes, Info);}
- void Peek_Local (int64u Bytes, Ztring &Info);
- void Peek_String(int64u Bytes, std::string &Info);
- void Skip_Local (int64u Bytes, const char*) {if (Element_Offset+Bytes>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=(size_t)Bytes;}
- void Skip_ISO_6937_2(int64u Bytes, const char*) {if (Element_Offset+Bytes>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=(size_t)Bytes;}
- void Skip_String(int64u Bytes, const char*) {if (Element_Offset+Bytes>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=(size_t)Bytes;}
- void Skip_UTF8 (int64u Bytes, const char*) {if (Element_Offset+Bytes>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=(size_t)Bytes;}
- void Skip_UTF16B(int64u Bytes, const char*) {if (Element_Offset+Bytes>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=(size_t)Bytes;}
- void Skip_UTF16L(int64u Bytes, const char*) {if (Element_Offset+Bytes>Element_Size) {Trusted_IsNot(); return;} Element_Offset+=(size_t)Bytes;}
- #define Info_Local(_BYTES, _INFO, _NAME) Ztring _INFO; Get_Local (_BYTES, _INFO, _NAME)
- #define Info_ISO_6937_2(_BYTES, _INFO, _NAME) Ztring _INFO; Info_ISO_6937_2(_BYTES, _INFO, _NAME)
- #define Info_UTF8(_BYTES, _INFO, _NAME) Ztring _INFO; Get_UTF8 (_BYTES, _INFO, _NAME)
- #define Info_UTF16B(_BYTES, _INFO, _NAME) Ztring _INFO; Get_UTF16B(_BYTES, _INFO, _NAME)
- #define Info_UTF16L(_BYTES, _INFO, _NAME) Ztring _INFO; Get_UTF16L(_BYTES, _INFO, _NAME)
-
- //***************************************************************************
- // Pascal strings
- //***************************************************************************
-
- void Get_PA (std::string &Info);
- inline void Get_PA (std::string &Info, const char*) {Get_PA(Info);}
- void Peek_PA(std::string &Info);
- void Skip_PA();
- inline void Skip_PA( const char*) {Skip_PA();}
- #define Info_PA(_INFO, _NAME) Ztring _INFO; Get_PA (_INFO, _NAME)
-
- //***************************************************************************
- // Unknown
- //***************************************************************************
-
- void Skip_XX(int64u Bytes);
- inline void Skip_XX(int64u Bytes, const char*) {Skip_XX(Bytes);}
-
- //***************************************************************************
- // Flags
- //***************************************************************************
-
- void Get_Flags_ (int64u Flags, size_t Order, bool &Info);
- void Get_FlagsM_ (int64u ValueToPut, int8u &Info); //Multiple
- #define Get_Flags(_FLAGS, _ORDER, _INFO, _NAME) Get_Flags_(_FLAGS, _ORDER, _INFO)
- #define Get_FlagsM(_VALUE, _INFO, _NAME) Get_FlagsM_(_VALUE, _INFO)
- #define Skip_Flags(_FLAGS, _ORDER, _NAME)
- #define Skip_FlagsM(_VALUE, _NAME)
- #define Info_Flags(_FLAGS, _ORDER, _INFO, _NAME)
-
- //***************************************************************************
- // BitStream
- //***************************************************************************
-
- void Get_BS_ (int8u Bits, int32u &Info);
- void Get_SB_ ( bool &Info);
- bool Get_SB_ () {return BS->GetB();}
- void Get_S1_ (int8u Bits, int8u &Info);
- void Get_S2_ (int8u Bits, int16u &Info);
- void Get_S3_ (int8u Bits, int32u &Info);
- void Get_S4_ (int8u Bits, int32u &Info);
- void Get_S5_ (int8u Bits, int64u &Info);
- void Get_S6_ (int8u Bits, int64u &Info);
- void Get_S7_ (int8u Bits, int64u &Info);
- void Get_S8_ (int8u Bits, int64u &Info);
- #define Get_BS(Bits, Info, Name) Get_BS_(Bits, Info)
- #define Get_SB( Info, Name) Get_SB_( Info)
- #define Get_S1(Bits, Info, Name) Get_S1_(Bits, Info)
- #define Get_S2(Bits, Info, Name) Get_S2_(Bits, Info)
- #define Get_S3(Bits, Info, Name) Get_S3_(Bits, Info)
- #define Get_S4(Bits, Info, Name) Get_S4_(Bits, Info)
- #define Get_S5(Bits, Info, Name) Get_S5_(Bits, Info)
- #define Get_S6(Bits, Info, Name) Get_S6_(Bits, Info)
- #define Get_S7(Bits, Info, Name) Get_S7_(Bits, Info)
- #define Get_S8(Bits, Info, Name) Get_S8_(Bits, Info)
- void Peek_BS(int8u Bits, int32u &Info);
- void Peek_SB( bool &Info);
- bool Peek_SB() {return BS->PeekB();}
- void Peek_S1(int8u Bits, int8u &Info);
- void Peek_S2(int8u Bits, int16u &Info);
- void Peek_S3(int8u Bits, int32u &Info);
- void Peek_S4(int8u Bits, int32u &Info);
- void Peek_S5(int8u Bits, int64u &Info);
- void Peek_S6(int8u Bits, int64u &Info);
- void Peek_S7(int8u Bits, int64u &Info);
- void Peek_S8(int8u Bits, int64u &Info);
- inline void Skip_BS_(size_t Bits) {BS->Skip(Bits);}
- inline void Skip_SB_( ) {BS->Skip(1);}
- inline void Skip_S1_(int8u Bits) {BS->Skip(Bits);}
- inline void Skip_S2_(int8u Bits) {BS->Skip(Bits);}
- inline void Skip_S3_(int8u Bits) {BS->Skip(Bits);}
- inline void Skip_S4_(int8u Bits) {BS->Skip(Bits);}
- inline void Skip_S5_(int8u Bits) {BS->Skip(Bits);}
- inline void Skip_S6_(int8u Bits) {BS->Skip(Bits);}
- inline void Skip_S7_(int8u Bits) {BS->Skip(Bits);}
- inline void Skip_S8_(int8u Bits) {BS->Skip(Bits);}
- #define Skip_BS(Bits, Name) Skip_BS_(Bits)
- #define Skip_SB( Name) Skip_SB_()
- #define Skip_S1(Bits, Name) Skip_S1_(Bits)
- #define Skip_S2(Bits, Name) Skip_S2_(Bits)
- #define Skip_S3(Bits, Name) Skip_S3_(Bits)
- #define Skip_S4(Bits, Name) Skip_S4_(Bits)
- #define Skip_S5(Bits, Name) Skip_S5_(Bits)
- #define Skip_S6(Bits, Name) Skip_S6_(Bits)
- #define Skip_S7(Bits, Name) Skip_S7_(Bits)
- #define Skip_S8(Bits, Name) Skip_S8_(Bits)
- void Mark_0 ();
- #define Mark_0_NoTrustError() Skip_SB_() //Use it for providing a warning instead of a non-trusting error
- void Mark_1 ();
- #define Mark_1_NoTrustError() Skip_SB_() //Use it for providing a warning instead of a non-trusting error
- #define Info_BS(_BITS, _INFO, _NAME) Skip_BS_(_BITS)
- #define Info_SB(_INFO, _NAME) Skip_SB_( )
- #define Info_S1(_BITS, _INFO, _NAME) Skip_S1_(_BITS)
- #define Info_S2(_BITS, _INFO, _NAME) Skip_S2_(_BITS)
- #define Info_S3(_BITS, _INFO, _NAME) Skip_S3_(_BITS)
- #define Info_S4(_BITS, _INFO, _NAME) Skip_S4_(_BITS)
- #define Info_S5(_BITS, _INFO, _NAME) Skip_S5_(_BITS)
- #define Info_S6(_BITS, _INFO, _NAME) Skip_S6_(_BITS)
- #define Info_S7(_BITS, _INFO, _NAME) Skip_S7_(_BITS)
- #define Info_S8(_BITS, _INFO, _NAME) Skip_S8_(_BITS)
-
- #define TEST_SB_GET(_CODE, _NAME) \
- { \
- Peek_SB(_CODE); \
- if (!_CODE) \
- Skip_SB_(); \
- else \
- { \
- Element_Begin0(); \
- Skip_SB_(); \
-
- #define TEST_SB_SKIP(_NAME) \
- { \
- if (!Peek_SB()) \
- Skip_SB_(); \
- else \
- { \
- Element_Begin0(); \
- Skip_SB_(); \
-
- #define TESTELSE_SB_GET(_CODE, _NAME) \
- { \
- Peek_SB(_CODE); \
- if (_CODE) \
- { \
- Element_Begin0(); \
- Skip_SB_(); \
-
- #define TESTELSE_SB_SKIP(_NAME) \
- { \
- if (Peek_SB()) \
- { \
- Element_Begin0(); \
- Skip_SB_(); \
-
- #define TESTELSE_SB_ELSE(_NAME) \
- Element_End0(); \
- } \
- else \
- { \
- Skip_SB_(); \
-
- #define TESTELSE_SB_END() \
- } \
- } \
-
- #define TEST_SB_END() \
- Element_End0(); \
- } \
- } \
-
- //***************************************************************************
- // BitStream (Little Endian)
- //***************************************************************************
-
- void Get_BT_ (int8u Bits, int32u &Info);
- void Get_TB_ ( bool &Info);
- bool Get_TB_ () {bool Temp; Get_TB_(Temp); return Temp;}
- void Get_T1_ (int8u Bits, int8u &Info);
- void Get_T2_ (int8u Bits, int16u &Info);
- void Get_T4_ (int8u Bits, int32u &Info);
- void Get_T8_ (int8u Bits, int64u &Info);
- #define Get_BT(Bits, Info, Name) Get_BT_(Bits, Info)
- #define Get_TB( Info, Name) Get_TB_( Info)
- #define Get_T1(Bits, Info, Name) Get_T1_(Bits, Info)
- #define Get_T2(Bits, Info, Name) Get_T2_(Bits, Info)
- #define Get_T4(Bits, Info, Name) Get_T4_(Bits, Info)
- #define Get_T8(Bits, Info, Name) Get_T8_(Bits, Info)
- void Peek_BT(int8u Bits, int32u &Info);
- void Peek_TB( bool &Info);
- bool Peek_TB() {bool Temp; Peek_TB(Temp); return Temp;}
- void Peek_T1(int8u Bits, int8u &Info);
- void Peek_T2(int8u Bits, int16u &Info);
- void Peek_T4(int8u Bits, int32u &Info);
- void Peek_T8(int8u Bits, int64u &Info);
- inline void Skip_BT_(size_t Bits) {BT->Skip(Bits);}
- inline void Skip_TB_( ) {BT->SkipB();}
- inline void Skip_T1_(int8u Bits) {BT->Skip1(Bits);}
- inline void Skip_T2_(int8u Bits) {BT->Skip2(Bits);}
- inline void Skip_T4_(int8u Bits) {BT->Skip4(Bits);}
- inline void Skip_T8_(int8u Bits) {BT->Skip8(Bits);}
- #define Skip_BT(Bits, Name) Skip_BT_(Bits)
- #define Skip_TB( Name) Skip_TB_()
- #define Skip_T1(Bits, Name) Skip_T1_(Bits)
- #define Skip_T2(Bits, Name) Skip_T2_(Bits)
- #define Skip_T4(Bits, Name) Skip_T4_(Bits)
- #define Skip_T8(Bits, Name) Skip_T8_(Bits)
- #define Info_BT(_BITS, _INFO, _NAME) Skip_BT_(_BITS)
- #define Info_TB(_INFO, _NAME) Skip_TB_( )
- #define Info_T1(_BITS, _INFO, _NAME) Skip_T1_(_BITS)
- #define Info_T2(_BITS, _INFO, _NAME) Skip_T2_(_BITS)
- #define Info_T4(_BITS, _INFO, _NAME) Skip_T4_(_BITS)
- #define Info_T8(_BITS, _INFO, _NAME) Skip_T8_(_BITS)
-
- #define TEST_TB_GET(_CODE, _NAME) \
- { \
- Peek_TB(_CODE); \
- if (!_CODE) \
- Skip_TB_(); \
- else \
- { \
- Element_Begin0(); \
- Skip_TB_(); \
-
- #define TEST_TB_TKIP(_NAME) \
- { \
- if (!Peek_TB()) \
- Skip_TB_(); \
- else \
- { \
- Element_Begin0(); \
- Skip_TB_(); \
-
- #define TESTELSE_TB_GET(_CODE, _NAME) \
- { \
- Peek_TB(_CODE); \
- if (_CODE) \
- { \
- Element_Begin0(); \
- Skip_TB_(); \
-
- #define TESTELSE_TB_TKIP(_NAME) \
- { \
- if (Peek_TB()) \
- { \
- Element_Begin0(); \
- Skip_TB_(); \
-
- #define TESTELSE_TB_ELSE(_NAME) \
- Element_End0(); \
- } \
- else \
- { \
- Skip_TB_(); \
-
- #define TESTELSE_TB_END() \
- } \
- } \
-
- #define TEST_TB_END() \
- Element_End0(); \
- } \
- } \
-
- //***************************************************************************
- // Next code planning
- //***************************************************************************
-
- void NextCode_Add(int64u Code);
- void NextCode_Clear();
- bool NextCode_Test();
-
- //***************************************************************************
- // Element trusting
- //***************************************************************************
-
- void Trusted_IsNot (const char*) {Trusted_IsNot();}
- void Trusted_IsNot ();
-
- //***************************************************************************
- // Stream filling
- //***************************************************************************
-
- //Elements - Preparation of element from external app
- size_t Stream_Prepare (stream_t KindOfStream, size_t StreamPos=(size_t)-1);
- size_t Stream_Erase (stream_t KindOfStream, size_t StreamPos);
-
- //Fill with datas (with parameter as a size_t)
- void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, const Ztring &Value, bool Replace=false);
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, const std::string &Value, bool Utf8=true, bool Replace=false) {if (Utf8) Fill(StreamKind, StreamPos, Parameter, Ztring().From_UTF8(Value.c_str(), Value.size()), Replace); else Fill(StreamKind, StreamPos, Parameter, Ztring().From_Local(Value.c_str(), Value.size()), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, const char* Value, size_t Value_Size=Unlimited, bool Utf8=true, bool Replace=false) {if (Utf8) Fill(StreamKind, StreamPos, Parameter, Ztring().From_UTF8(Value, Value_Size), Replace); else Fill(StreamKind, StreamPos, Parameter, Ztring().From_Local(Value, Value_Size), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, const wchar_t* Value, size_t Value_Size=Unlimited, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring().From_Unicode(Value, Value_Size), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int8u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int8s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int16u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int16s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int32u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int32s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int64u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, int64s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, float32 Value, int8u AfterComma=3, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, AfterComma), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, float64 Value, int8u AfterComma=3, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, AfterComma), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, float80 Value, int8u AfterComma=3, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, AfterComma), Replace);}
- #ifdef SIZE_T_IS_LONG
- inline void Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, size_t Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- #endif //SIZE_T_IS_LONG
- //Fill with datas
- void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, const Ztring &Value, bool Replace=false);
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, const std::string &Value, bool Utf8=true, bool Replace=false) {if (Utf8) Fill(StreamKind, StreamPos, Parameter, Ztring().From_UTF8(Value.c_str(), Value.size())); else Fill(StreamKind, StreamPos, Parameter, Ztring().From_Local(Value.c_str(), Value.size()), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, const char* Value, size_t Value_Size=Unlimited, bool Utf8=true, bool Replace=false) {if (Utf8) Fill(StreamKind, StreamPos, Parameter, Ztring().From_UTF8(Value, Value_Size), Replace); else Fill(StreamKind, StreamPos, Parameter, Ztring().From_Local(Value, Value_Size), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, const wchar_t* Value, size_t Value_Size=Unlimited, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring().From_Unicode(Value, Value_Size), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int8u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int8s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int16u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int16s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int32u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int32s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int64u Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, int64s Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, float32 Value, int8u AfterComma=3, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, AfterComma), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, float64 Value, int8u AfterComma=3, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, AfterComma), Replace);}
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, float80 Value, int8u AfterComma=3, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, AfterComma), Replace);}
- #ifdef SIZE_T_IS_LONG
- inline void Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, size_t Value, int8u Radix=10, bool Replace=false) {Fill(StreamKind, StreamPos, Parameter, Ztring::ToZtring(Value, Radix).MakeUpperCase(), Replace);}
- #endif //SIZE_T_IS_LONG
- ZtringListList Fill_Temp;
- void Fill_Flush ();
- static size_t Fill_Parameter(stream_t StreamKind, generic StreamPos);
-
- const Ztring &Retrieve_Const (stream_t StreamKind, size_t StreamPos, size_t Parameter, info_t KindOfInfo=Info_Text);
- Ztring Retrieve (stream_t StreamKind, size_t StreamPos, size_t Parameter, info_t KindOfInfo=Info_Text);
- const Ztring &Retrieve_Const (stream_t StreamKind, size_t StreamPos, const char* Parameter, info_t KindOfInfo=Info_Text);
- Ztring Retrieve (stream_t StreamKind, size_t StreamPos, const char* Parameter, info_t KindOfInfo=Info_Text);
-
- void Clear (stream_t StreamKind, size_t StreamPos, size_t Parameter);
- void Clear (stream_t StreamKind, size_t StreamPos, const char* Parameter);
- void Clear (stream_t StreamKind, size_t StreamPos);
- void Clear (stream_t StreamKind);
- inline void Clear () {File__Base::Clear();}
-
- //***************************************************************************
- // Filling
- //***************************************************************************
-
- //Actions
- void Accept (const char*) {Accept();}
- void Accept ();
- void Accept (File__Analyze* Parser);
- void Reject (const char*) {Reject();}
- void Reject ();
- void Reject (File__Analyze* Parser);
- void Fill (const char*) {Fill();}
- void Fill ();
- void Fill (File__Analyze* Parser);
- void Update (const char*) {Fill();}
- void Update ();
- void Update (File__Analyze* Parser);
- void Finish (const char*) {Finish();}
- void Finish ();
- void Finish (File__Analyze* Parser);
- void ForceFinish (const char*) {ForceFinish();}
- void ForceFinish ();
- void ForceFinish (File__Analyze* Parser);
- void GoTo (int64u GoTo_, const char*) {GoTo(GoTo_);}
- void GoTo (int64u GoTo);
- void GoToFromEnd (int64u GoToFromEnd_, const char*) {GoToFromEnd(GoToFromEnd_);}
- void GoToFromEnd (int64u GoToFromEnd);
- int64u Element_Code_Get (size_t Level);
- int64u Element_TotalSize_Get (size_t LevelLess=0);
- bool Element_IsComplete_Get ();
- void Element_ThisIsAList ();
- void Element_WaitForMoreData ();
- void Element_DoNotTrust (const char*) {Element_DoNotTrust();}
- void Element_DoNotTrust ();
- inline void Element_DoNotShow () {}
- inline void Element_Show () {}
- inline bool Element_Show_Get () {return false;}
- inline void Element_Show_Add (const Ztring &) {}
-
- //Status
- bool Element_IsOK ();
- bool Element_IsNotFinished ();
- bool Element_IsWaitingForMoreData ();
-
- //***************************************************************************
- // Merging
- //***************************************************************************
-
- //Utils
-public :
- size_t Merge(MediaInfo_Internal &ToAdd, bool Erase=true); //Merge 2 File_Base
- size_t Merge(MediaInfo_Internal &ToAdd, stream_t StreamKind, size_t StreamPos_From, size_t StreamPos_To, bool Erase=true); //Merge 2 streams
- size_t Merge(File__Analyze &ToAdd, bool Erase=true); //Merge 2 File_Base
- size_t Merge(File__Analyze &ToAdd, stream_t StreamKind, size_t StreamPos_From, size_t StreamPos_To, bool Erase=true); //Merge 2 streams
-
- void CodecID_Fill (const Ztring &Value, stream_t StreamKind, size_t StreamPos, infocodecid_format_t Format, stream_t StreamKind_CodecID=Stream_Max);
- void PixelAspectRatio_Fill (const Ztring &Value, stream_t StreamKind, size_t StreamPos, size_t Parameter_Width, size_t Parameter_Height, size_t Parameter_PixelAspectRatio, size_t Parameter_DisplayAspectRatio);
- void DisplayAspectRatio_Fill(const Ztring &Value, stream_t StreamKind, size_t StreamPos, size_t Parameter_Width, size_t Parameter_Height, size_t Parameter_PixelAspectRatio, size_t Parameter_DisplayAspectRatio);
-
- //***************************************************************************
- // Finalize
- //***************************************************************************
-
- //End
- void Streams_Finish_Global();
-
-protected :
- void Streams_Finish_StreamOnly();
- void Streams_Finish_StreamOnly(stream_t StreamKid, size_t StreamPos);
- void Streams_Finish_StreamOnly_General(size_t StreamPos);
- void Streams_Finish_StreamOnly_Video(size_t StreamPos);
- void Streams_Finish_StreamOnly_Audio(size_t StreamPos);
- void Streams_Finish_StreamOnly_Text(size_t StreamPos);
- void Streams_Finish_StreamOnly_Other(size_t StreamPos);
- void Streams_Finish_StreamOnly_Image(size_t StreamPos);
- void Streams_Finish_StreamOnly_Menu(size_t StreamPos);
- void Streams_Finish_InterStreams();
- void Streams_Finish_Cosmetic();
- void Streams_Finish_Cosmetic(stream_t StreamKid, size_t StreamPos);
- void Streams_Finish_Cosmetic_General(size_t StreamPos);
- void Streams_Finish_Cosmetic_Video(size_t StreamPos);
- void Streams_Finish_Cosmetic_Audio(size_t StreamPos);
- void Streams_Finish_Cosmetic_Text(size_t StreamPos);
- void Streams_Finish_Cosmetic_Chapters(size_t StreamPos);
- void Streams_Finish_Cosmetic_Image(size_t StreamPos);
- void Streams_Finish_Cosmetic_Menu(size_t StreamPos);
- void Streams_Finish_HumanReadable();
- void Streams_Finish_HumanReadable_PerStream(stream_t StreamKind, size_t StreamPos, size_t Parameter);
-
- void Tags ();
- void Video_FrameRate_Rounding (size_t Pos, video Parameter);
- void Video_BitRate_Rounding (size_t Pos, video Parameter);
- void Audio_BitRate_Rounding (size_t Pos, audio Parameter);
-
- //Utils - Finalize
- void Duration_Duration123 (stream_t StreamKind, size_t StreamPos, size_t Parameter);
- void FileSize_FileSize123 (stream_t StreamKind, size_t StreamPos, size_t Parameter);
- void Kilo_Kilo123 (stream_t StreamKind, size_t StreamPos, size_t Parameter);
- void Value_Value123 (stream_t StreamKind, size_t StreamPos, size_t Parameter);
- void YesNo_YesNo (stream_t StreamKind, size_t StreamPos, size_t Parameter);
-
- //***************************************************************************
- //
- //***************************************************************************
-
-protected :
- //Save for speed improvement
- int8u Config_Demux;
- Ztring Config_LineSeparator;
- bool IsSub;
- bool IsRawStream;
-
- //Configuration
- bool DataMustAlwaysBeComplete; //Data must always be complete, else wait for more data
- bool MustUseAlternativeParser; //Must use the second parser (example: for Data part)
-
- //Synchro
- bool MustParseTheHeaderFile; //There is an header part, must parse it
- size_t Trusted;
- size_t Trusted_Multiplier;
-
- //Elements
- size_t Element_Level; //Current level
- bool Element_WantNextLevel; //Want to go to the next leavel instead of the same level
-
- //Element
- int64u Element_Code; //Code filled in the file, copy of Element[Element_Level].Code
- int64u Element_Offset; //Position in the Element (without header)
- int64u Element_Size; //Size of the Element (without header)
-
-private :
- //***************************************************************************
- // Buffer
- //***************************************************************************
-
- void Buffer_Clear(); //Clear the buffer
-protected :
- //Buffer
- bool Open_Buffer_Continue_Loop();
- const int8u* Buffer;
-public : //TO CHANGE
- size_t Buffer_Size;
- int64u Buffer_TotalBytes;
- int64u Buffer_TotalBytes_FirstSynched;
- int64u Buffer_TotalBytes_LastSynched;
- int64u Buffer_PaddingBytes;
- int64u Buffer_JunkBytes;
- float64 Stream_BitRateFromContainer;
-protected :
- int8u* Buffer_Temp;
- size_t Buffer_Temp_Size;
- size_t Buffer_Temp_Size_Max;
- size_t Buffer_Offset; //Temporary usage in this parser
- size_t Buffer_Offset_Temp; //Temporary usage in this parser
- size_t Buffer_MinimumSize;
- size_t Buffer_MaximumSize;
- int64u Buffer_TotalBytes_FirstSynched_Max;
- int64u Buffer_TotalBytes_Fill_Max;
- friend class File__Tags_Helper;
-
- //***************************************************************************
- // Helpers
- //***************************************************************************
-
- bool FileHeader_Begin_0x000001();
- bool FileHeader_Begin_XML(tinyxml2::XMLDocument &Document);
- bool Synchronize_0x000001();
-public:
- void TestContinuousFileNames(size_t CountOfFiles=24, Ztring FileExtension=Ztring());
-
-private :
-
- //***************************************************************************
- // Elements
- //***************************************************************************
-
- //Element
- BitStream_Fast* BS; //For conversion from bytes to bitstream
- BitStream* BT; //For conversion from bytes to bitstream (Little Endian)
-public : //TO CHANGE
- int64u Header_Size; //Size of the header of the current element
-private :
-
- //Elements
- size_t Element_Level_Base; //From other parsers
-
-public : //For very quick access, to not use except if you know what you do
- struct element_details
- {
- int64u Code; //Code filled in the file
- int64u Next; //
- bool WaitForMoreData; //This element is not complete, we need more data
- bool UnTrusted; //This element has a problem
- bool IsComplete; //This element is fully buffered, no need of more
- };
- std::vector<element_details> Element;
-
-private :
-
- //NextCode
- std::map<int64u, bool> NextCode;
-
- //BookMarks
- size_t BookMark_Element_Level;
- int64u BookMark_GoTo;
- std::vector<int64u> BookMark_Code;
- std::vector<int64u> BookMark_Next;
-
-public :
- void BookMark_Set(size_t Element_Level_ToGet=(size_t)-1);
- void BookMark_Get();
- virtual bool BookMark_Needed() {return false;};
-
- //Temp
- std::bitset<32> Status;
- enum status
- {
- IsAccepted,
- IsFilled,
- IsUpdated,
- IsFinished,
- Reserved_04,
- Reserved_05,
- Reserved_06,
- Reserved_07,
- Reserved_08,
- Reserved_09,
- Reserved_10,
- Reserved_11,
- Reserved_12,
- Reserved_13,
- Reserved_14,
- Reserved_15,
- User_16,
- User_17,
- User_18,
- User_19,
- User_20,
- User_21,
- User_22,
- User_23,
- User_24,
- User_25,
- User_26,
- User_27,
- User_28,
- User_29,
- User_30,
- User_31,
- };
- bool ShouldContinueParsing;
-
- //Configuration
- bool MustSynchronize;
- bool CA_system_ID_MustSkipSlices;
-
- //Demux
- enum contenttype
- {
- ContentType_MainStream,
- ContentType_SubStream,
- ContentType_Header,
- ContentType_Synchro
- };
- #if MEDIAINFO_DEMUX
- void Demux (const int8u* Buffer, size_t Buffer_Size, contenttype ContentType, const int8u* OriginalBuffer=NULL, size_t OriginalBuffer_Size=0);
- virtual bool Demux_UnpacketizeContainer_Test() {return true;}
- bool Demux_UnpacketizeContainer_Test_OneFramePerFile();
- void Demux_UnpacketizeContainer_Demux(bool random_access=true);
- void Demux_UnpacketizeContainer_Demux_Clear();
- bool Demux_EventWasSent_Accept_Specific;
- #else //MEDIAINFO_DEMUX
- #define Demux(_A, _B, _C)
- #endif //MEDIAINFO_DEMUX
-
- //Events data
- bool PES_FirstByte_IsAvailable;
- bool PES_FirstByte_Value;
-
- int64u Unsynch_Frame_Count;
-
- //AES
- #if MEDIAINFO_AES
- AESdecrypt* AES;
- int8u* AES_IV;
- int8u* AES_Decrypted;
- size_t AES_Decrypted_Size;
- #endif //MEDIAINFO_AES
-
- //MD5
- #if MEDIAINFO_MD5
- struct MD5Context* MD5;
- int64u Md5_ParseUpTo;
- #endif //MEDIAINFO_MD5
-
- #if MEDIAINFO_SEEK
- private:
- bool Seek_Duration_Detected;
- #endif //MEDIAINFO_SEEK
-
- #if MEDIAINFO_IBIUSAGE
- public:
- bool Config_Ibi_Create;
- int64u Ibi_SynchronizationOffset_Current;
- int64u Ibi_SynchronizationOffset_BeginOfFrame;
- ibi Ibi; //If Main only
- ibi::stream* IbiStream; //If sub only
- size_t Ibi_Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- void Ibi_Read_Buffer_Unsynched ();
- void Ibi_Stream_Finish ();
- void Ibi_Stream_Finish (int64u Numerator, int64u Denominator); //Partial
- void Ibi_Add ();
- #else //MEDIAINFO_IBIUSAGE
- size_t Ibi_Read_Buffer_Seek (size_t, int64u, int64u) {return (size_t)-1;}
- void Ibi_Read_Buffer_Unsynched () {}
- void Ibi_Stream_Finish () {}
- void Ibi_Stream_Finish (int64u, int64u) {}
- void Ibi_Add () {}
- #endif //MEDIAINFO_IBIUSAGE
-};
-
-//Helpers
-#define DETAILS_INFO(_DATA)
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Streams.cpp b/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Streams.cpp
deleted file mode 100644
index 3993fc17f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Streams.cpp
+++ /dev/null
@@ -1,2679 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#include "MediaInfo/MediaInfo_Config.h"
-#include "MediaInfo/TimeCode.h"
-#include "ZenLib/File.h"
-#include "ZenLib/FileName.h"
-#include "ZenLib/BitStream_LE.h"
-#include <cmath>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Preparation des streams
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t File__Analyze::Stream_Prepare (stream_t KindOfStream, size_t StreamPos)
-{
- //Integrity
- if (!Status[IsAccepted] || KindOfStream>Stream_Max)
- return Error;
-
- //Clear
- if (KindOfStream==Stream_Max)
- {
- StreamKind_Last=Stream_Max;
- StreamPos_Last=(size_t)-1;
- return 0;
- }
-
- if (StreamPos>=Count_Get(KindOfStream))
- {
- //Add a stream
- (*Stream)[KindOfStream].resize((*Stream)[KindOfStream].size()+1);
- (*Stream_More)[KindOfStream].resize((*Stream_More)[KindOfStream].size()+1);
- StreamKind_Last=KindOfStream;
- StreamPos_Last=(*Stream)[KindOfStream].size()-1;
- }
- else
- {
- //Insert a stream
- (*Stream)[KindOfStream].insert((*Stream)[KindOfStream].begin()+StreamPos, ZtringList());
- (*Stream_More)[KindOfStream].insert((*Stream_More)[KindOfStream].begin()+StreamPos, ZtringListList());
- StreamKind_Last=KindOfStream;
- StreamPos_Last=StreamPos;
- }
-
- //Filling basic info
- Fill(StreamKind_Last, StreamPos_Last, (size_t)General_Count, Count_Get(StreamKind_Last, StreamPos_Last));
- Fill(StreamKind_Last, StreamPos_Last, General_StreamKind, MediaInfoLib::Config.Info_Get(StreamKind_Last).Read(General_StreamKind, Info_Text));
- Fill(StreamKind_Last, StreamPos_Last, General_StreamKind_String, MediaInfoLib::Config.Language_Get(MediaInfoLib::Config.Info_Get(StreamKind_Last).Read(General_StreamKind, Info_Text)), true);
- for (size_t Pos=0; Pos<Count_Get(KindOfStream); Pos++)
- {
- Fill(StreamKind_Last, Pos, General_StreamCount, Count_Get(StreamKind_Last), 10, true);
- Fill(StreamKind_Last, Pos, General_StreamKindID, Pos, 10, true);
- if (Count_Get(StreamKind_Last)>1)
- Fill(StreamKind_Last, Pos, General_StreamKindPos, Pos+1, 10, true);
- else
- Clear(StreamKind_Last, Pos, General_StreamKindPos);
- }
-
- //Filling Lists & Counts
- if (!IsSub && KindOfStream!=Stream_General)
- {
- const Ztring& StreamKind_Text=Get(KindOfStream, 0, General_StreamKind, Info_Text);
- if (Count_Get(KindOfStream)>1)
- {
- ZtringList Temp; Temp.Separator_Set(0, __T(" / "));
- Temp.Write(Retrieve(Stream_General, 0, Ztring(StreamKind_Text+__T("_Codec_List")).To_Local().c_str()));
- if (StreamPos<Temp.size())
- Temp.insert(Temp.begin()+StreamPos, Ztring());
- else
- Temp.push_back(Ztring());
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("_Codec_List")).To_Local().c_str(), Temp.Read(), true);
- Temp.Write(Retrieve(Stream_General, 0, Ztring(StreamKind_Text+__T("_Language_List")).To_Local().c_str()));
- if (StreamPos<Temp.size())
- Temp.insert(Temp.begin()+StreamPos, Ztring());
- else
- Temp.push_back(Ztring());
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("_Language_List")).To_Local().c_str(), Temp.Read(), true);
- Temp.Write(Retrieve(Stream_General, 0, Ztring(StreamKind_Text+__T("_Format_List")).To_Local().c_str()));
- if (StreamPos<Temp.size())
- Temp.insert(Temp.begin()+StreamPos, Ztring());
- else
- Temp.push_back(Ztring());
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("_Format_List")).To_Local().c_str(), Temp.Read(), true);
- Temp.Write(Retrieve(Stream_General, 0, Ztring(StreamKind_Text+__T("_Format_WithHint_List")).To_Local().c_str()));
- if (StreamPos<Temp.size())
- Temp.insert(Temp.begin()+StreamPos, Ztring());
- else
- Temp.push_back(Ztring());
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("_Format_WithHint_List")).To_Local().c_str(), Temp.Read(), true);
- }
-
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("Count")).To_Local().c_str(), Count_Get(KindOfStream), 10, true);
- }
-
- //File name and dates
- if (!IsSub && KindOfStream==Stream_General && File_Name.size()>0)
- {
- //File name
- if (File_Name.find(__T("://"))==string::npos)
- {
- Fill (Stream_General, 0, General_CompleteName, File_Name);
- Fill (Stream_General, 0, General_FolderName, FileName::Path_Get(File_Name));
- Fill (Stream_General, 0, General_FileName, FileName::Name_Get(File_Name));
- Fill (Stream_General, 0, General_FileExtension, FileName::Extension_Get(File_Name));
- }
- else
- {
- Ztring FileName_Modified=File_Name;
- size_t Begin=FileName_Modified.find(__T(':'), 6);
- size_t End=FileName_Modified.find(__T('@'));
- if (Begin!=string::npos && End!=string::npos && Begin<End)
- FileName_Modified.erase(Begin, End-Begin);
- Fill (Stream_General, 0, General_CompleteName, FileName_Modified);
- size_t FileName_Modified_PathSeparatorOffset=FileName_Modified.find_last_of(__T('/'));
- if (FileName_Modified_PathSeparatorOffset!=string::npos)
- {
- Fill (Stream_General, 0, General_FolderName, FileName_Modified.substr(0, FileName_Modified_PathSeparatorOffset));
- size_t FileName_Modified_ExtensionSeparatorOffset=FileName_Modified.find_last_of(__T('.'));
- if (FileName_Modified_ExtensionSeparatorOffset!=string::npos && FileName_Modified_ExtensionSeparatorOffset>FileName_Modified_PathSeparatorOffset)
- {
- Fill (Stream_General, 0, General_FileName, FileName_Modified.substr(FileName_Modified_PathSeparatorOffset+1, FileName_Modified_ExtensionSeparatorOffset-(FileName_Modified_PathSeparatorOffset+1)));
- Fill (Stream_General, 0, General_FileExtension, FileName_Modified.substr(FileName_Modified_ExtensionSeparatorOffset+1));
- }
- else
- Fill (Stream_General, 0, General_FileName, FileName_Modified.substr(FileName_Modified_PathSeparatorOffset+1));
- }
- }
-
- //File dates
- File F(File_Name);
- Fill (Stream_General, 0, General_File_Created_Date, F.Created_Get());
- Fill (Stream_General, 0, General_File_Created_Date_Local, F.Created_Local_Get());
- Fill (Stream_General, 0, General_File_Modified_Date, F.Modified_Get());
- Fill (Stream_General, 0, General_File_Modified_Date_Local, F.Modified_Local_Get());
- }
-
- //File size
- if (((!IsSub || !File_Name.empty()) && KindOfStream==Stream_General && File_Size!=(int64u)-1))
- Fill (Stream_General, 0, General_FileSize, File_Size);
-
- //Fill with already ready data
- for (size_t Pos=0; Pos<Fill_Temp.size(); Pos++)
- if (Fill_Temp(Pos, 0).IsNumber())
- Fill(StreamKind_Last, StreamPos_Last, Fill_Temp(Pos, 0).To_int32u(), Fill_Temp(Pos, 1));
- else
- {
- Fill(StreamKind_Last, StreamPos_Last, Fill_Temp(Pos, 0).To_UTF8().c_str(), Fill_Temp(Pos, 1));
- #if MEDIAINFO_DEMUX
- if (!Retrieve(KindOfStream, StreamPos_Last, "Demux_InitBytes").empty())
- (*Stream_More)[KindOfStream][StreamPos_Last](Ztring().From_Local("Demux_InitBytes"), Info_Options)=__T("N NT"); //TODO: find a better way to hide additional fields by default
- #endif //MEDIAINFO_DEMUX
- }
- Fill_Temp.clear();
-
- return StreamPos_Last; //The position in the stream count
-}
-
-size_t File__Analyze::Stream_Erase (stream_t KindOfStream, size_t StreamPos)
-{
- //Integrity
- if (!Status[IsAccepted] || KindOfStream>Stream_Max || StreamPos>=Count_Get(KindOfStream))
- return Error;
-
- //Filling Lists & Counts
- if (!IsSub && KindOfStream!=Stream_General)
- {
- const Ztring& StreamKind_Text=Get(KindOfStream, 0, General_StreamKind, Info_Text);
- ZtringList Temp; Temp.Separator_Set(0, __T(" / "));
- Temp.Write(Retrieve(Stream_General, 0, Ztring(StreamKind_Text+__T("_Codec_List")).To_Local().c_str()));
- if (StreamPos<Temp.size())
- Temp.erase(Temp.begin()+StreamPos);
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("_Codec_List")).To_Local().c_str(), Temp.Read(), true);
- Temp.Write(Retrieve(Stream_General, 0, Ztring(StreamKind_Text+__T("_Language_List")).To_Local().c_str()));
- if (StreamPos<Temp.size())
- Temp.erase(Temp.begin()+StreamPos);
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("_Language_List")).To_Local().c_str(), Temp.Read(), true);
- Temp.Write(Retrieve(Stream_General, 0, Ztring(StreamKind_Text+__T("_Format_List")).To_Local().c_str()));
- if (StreamPos<Temp.size())
- Temp.erase(Temp.begin()+StreamPos);
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("_Format_List")).To_Local().c_str(), Temp.Read(), true);
- Temp.Write(Retrieve(Stream_General, 0, Ztring(StreamKind_Text+__T("_Format_WithHint_List")).To_Local().c_str()));
- if (StreamPos<Temp.size())
- Temp.erase(Temp.begin()+StreamPos);
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("_Format_WithHint_List")).To_Local().c_str(), Temp.Read(), true);
-
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("Count")).To_Local().c_str(), Count_Get(KindOfStream)-1, 10, true);
- }
-
- //Insert a stream
- (*Stream)[KindOfStream].erase((*Stream)[KindOfStream].begin()+StreamPos);
- (*Stream_More)[KindOfStream].erase((*Stream_More)[KindOfStream].begin()+StreamPos);
-
- //Filling basic info
- for (size_t Pos=0; Pos<Count_Get(KindOfStream); Pos++)
- {
- Fill(KindOfStream, Pos, General_StreamCount, Count_Get(StreamKind_Last), 10, true);
- Fill(KindOfStream, Pos, General_StreamKindID, Pos, 10, true);
- if (Count_Get(KindOfStream)>1)
- Fill(KindOfStream, Pos, General_StreamKindPos, Pos+1, 10, true);
- else
- Clear(KindOfStream, Pos, General_StreamKindPos);
- }
-
- StreamKind_Last=Stream_Max;
- StreamPos_Last=(size_t)-1;
-
- return (*Stream)[KindOfStream].size()-1; //The position in the stream count
-}
-
-
-//***************************************************************************
-// Filling
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Fill (stream_t StreamKind, size_t StreamPos, size_t Parameter, const Ztring &Value, bool Replace)
-{
- //Integrity
- if (!Status[IsAccepted] || StreamKind>Stream_Max || Parameter==(size_t)-1)
- return;
-
- //Handling values with \r\n inside
- if (Value.find(__T('\r'))!=string::npos || Value.find(__T('\n'))!=string::npos)
- {
- Ztring NewValue=Value;
- NewValue.FindAndReplace(__T("\r\n"), __T(" / "), 0, Ztring_Recursive);
- NewValue.FindAndReplace(__T("\r"), __T(" / "), 0, Ztring_Recursive);
- NewValue.FindAndReplace(__T("\n"), __T(" / "), 0, Ztring_Recursive);
- if (NewValue.size()>=3 && NewValue.rfind(__T(" / "))==NewValue.size()-3)
- NewValue.resize(NewValue.size()-3);
- Fill(StreamKind, StreamPos, Parameter, NewValue, Replace);
- return;
- }
-
- //Handle Value before StreamKind
- if (StreamKind==Stream_Max || StreamPos>=(*Stream)[StreamKind].size())
- {
- ZtringList NewList;
- NewList.push_back(Ztring().From_Number(Parameter));
- NewList.push_back(Value);
- Fill_Temp.push_back(NewList);
- return; //No streams
- }
-
- //Some defaults
- if (Parameter==Fill_Parameter(StreamKind, Generic_Format_Commercial))
- Replace=true;
- if (Parameter==Fill_Parameter(StreamKind, Generic_Format_Commercial_IfAny))
- Replace=true;
-
- if (!Replace && Value.empty())
- return;
- if (Replace && Value.empty())
- {
- Clear(StreamKind, StreamPos, Parameter);
- return;
- }
-
- Ztring &Target=(*Stream)[StreamKind][StreamPos](Parameter);
- if (Target.empty() || Replace)
- Target=Value; //First value
- else
- {
- Target+=MediaInfoLib::Config.TagSeparator_Get();
- Target+=Value;
- }
- Status[IsUpdated]=true;
-
- //Deprecated
- if (Parameter==Fill_Parameter(StreamKind, Generic_BitDepth))
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Resolution), Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_BitDepth)), true);
- if (StreamKind==Stream_Video && Parameter==Video_Colorimetry)
- Fill(Stream_Video, StreamPos, Video_ChromaSubsampling, Value, Replace);
-
- switch (StreamKind)
- {
- case Stream_Video:
- switch (Parameter)
- {
- case Video_DisplayAspectRatio: DisplayAspectRatio_Fill(Value, Stream_Video, StreamPos, Video_Width, Video_Height, Video_PixelAspectRatio, Video_DisplayAspectRatio); break;
- case Video_PixelAspectRatio: PixelAspectRatio_Fill(Value, Stream_Video, StreamPos, Video_Width, Video_Height, Video_PixelAspectRatio, Video_DisplayAspectRatio); break;
- case Video_DisplayAspectRatio_CleanAperture: DisplayAspectRatio_Fill(Value, Stream_Video, StreamPos, Video_Width_CleanAperture, Video_Height_CleanAperture, Video_PixelAspectRatio_CleanAperture, Video_DisplayAspectRatio_CleanAperture); break;
- case Video_PixelAspectRatio_CleanAperture: PixelAspectRatio_Fill(Value, Stream_Video, StreamPos, Video_Width_CleanAperture, Video_Height_CleanAperture, Video_PixelAspectRatio_CleanAperture, Video_DisplayAspectRatio_CleanAperture); break;
- case Video_DisplayAspectRatio_Original: DisplayAspectRatio_Fill(Value, Stream_Video, StreamPos, Video_Width_Original, Video_Height_Original, Video_PixelAspectRatio_Original, Video_DisplayAspectRatio_Original); break;
- case Video_PixelAspectRatio_Original: PixelAspectRatio_Fill(Value, Stream_Video, StreamPos, Video_Width_Original, Video_Height_Original, Video_PixelAspectRatio_Original, Video_DisplayAspectRatio_Original); break;
- }
- break;
- case Stream_Image:
- switch (Parameter)
- {
- case Image_DisplayAspectRatio: DisplayAspectRatio_Fill(Value, Stream_Image, StreamPos, Image_Width, Image_Height, Image_PixelAspectRatio, Image_DisplayAspectRatio); break;
- case Image_PixelAspectRatio: PixelAspectRatio_Fill(Value, Stream_Image, StreamPos, Image_Width, Image_Height, Image_PixelAspectRatio, Image_DisplayAspectRatio); break;
- case Image_DisplayAspectRatio_Original: DisplayAspectRatio_Fill(Value, Stream_Image, StreamPos, Image_Width_Original, Image_Height_Original, Image_PixelAspectRatio_Original, Image_DisplayAspectRatio_Original); break;
- case Image_PixelAspectRatio_Original: PixelAspectRatio_Fill(Value, Stream_Image, StreamPos, Image_Width_Original, Image_Height_Original, Image_PixelAspectRatio_Original, Image_DisplayAspectRatio_Original); break;
- }
- break;
- }
-
- //Commercial name
- if (Parameter==Fill_Parameter(StreamKind, Generic_Format))
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format_Commercial), Value);
- if (Parameter==Fill_Parameter(StreamKind, Generic_Format_Commercial_IfAny))
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format_Commercial), Value, true);
-
- if (!IsSub)
- {
- Ztring ParameterName=Retrieve(StreamKind, StreamPos, Parameter, Info_Name);
-
- //Lists
- if (StreamKind!=Stream_General && (ParameterName==__T("Codec/String")
- || ParameterName==__T("Language/String")
- || ParameterName==__T("Format")
- || ParameterName==__T("CodecID/Hint")))
- {
- Ztring Temp1, Temp2;
- for (size_t StreamPos_Local=0; StreamPos_Local<(*Stream)[StreamKind].size(); StreamPos_Local++)
- {
- if (ParameterName==__T("CodecID/Hint"))
- Temp1+=Retrieve(StreamKind, StreamPos_Local, Fill_Parameter(StreamKind, Generic_Format))+__T(" / ");
- else
- Temp1+=Retrieve(StreamKind, StreamPos_Local, Parameter)+__T(" / ");
- if (ParameterName==__T("Format")
- || ParameterName==__T("CodecID/Hint"))
- {
- Temp2+=Retrieve(StreamKind, StreamPos_Local, Fill_Parameter(StreamKind, Generic_Format));
- if (!Retrieve(StreamKind, StreamPos_Local, Fill_Parameter(StreamKind, Generic_CodecID_Hint)).empty())
- {
- Temp2+=__T(" (");
- Temp2+=Retrieve(StreamKind, StreamPos_Local, Fill_Parameter(StreamKind, Generic_CodecID_Hint));
- Temp2+=__T(")");
- }
- Temp2+=__T(" / ");
- }
- }
- if (!Temp1.empty())
- Temp1.resize(Temp1.size()-3); //Delete extra " / "
- if (!Temp2.empty())
- Temp2.resize(Temp2.size()-3); //Delete extra " / "
- Ztring StreamKind_Text=Get(StreamKind, 0, General_StreamKind, Info_Text);
- if (ParameterName==__T("Codec/String"))
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("_Codec_List")).To_Local().c_str(), Temp1, true);
- if (ParameterName==__T("Language/String"))
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("_Language_List")).To_Local().c_str(), Temp1, true);
- if (ParameterName==__T("Format")
- || ParameterName==__T("CodecID/Hint"))
- {
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("_Format_List")).To_Local().c_str(), Temp1, true);
- Fill(Stream_General, 0, Ztring(StreamKind_Text+__T("_Format_WithHint_List")).To_Local().c_str(), Temp2, true);
- }
- }
-
- //General Format
- if (Parameter==Fill_Parameter(StreamKind, Generic_Format) && Retrieve(Stream_General, 0, General_Format).empty() && !Value.empty())
- Fill(Stream_General, 0, General_Format, Value); //If not already filled, we are filling with the stream format
-
- //ID
- if (Parameter==General_ID)
- Fill(StreamKind, StreamPos, General_ID_String, Value, Replace);
-
- //Format
- if (Parameter==Fill_Parameter(StreamKind, Generic_Format))
- {
- if ((Replace && !MediaInfoLib::Config.Format_Get(Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format)), InfoFormat_Info).empty()) || Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format_Info)).empty())
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format_Info), MediaInfoLib::Config.Format_Get(Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format)), InfoFormat_Info), true);
- if ((Replace && !MediaInfoLib::Config.Format_Get(Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format)), InfoFormat_Url).empty()) || Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format_Url)).empty())
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format_Url) , MediaInfoLib::Config.Format_Get(Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format)), InfoFormat_Url), true);
- if (StreamKind!=Stream_Menu)
- {
- if ((Replace && !MediaInfoLib::Config.Format_Get(Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format)), InfoFormat_InternetMediaType).empty()) || Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_InternetMediaType)).empty())
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_InternetMediaType), MediaInfoLib::Config.Format_Get(Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format)), InfoFormat_InternetMediaType), true);
- if ((Replace && !MediaInfoLib::Config.Format_Get(Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format)), InfoFormat_Compression_Mode).empty()) || Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Compression_Mode)).empty())
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Compression_Mode), MediaInfoLib::Config.Format_Get(Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format)), InfoFormat_Compression_Mode), true);
- }
- if (StreamKind==Stream_General)
- {
- Fill(Stream_General, 0, General_Format_Extensions, MediaInfoLib::Config.Format_Get(Value, InfoFormat_Extensions), true);
- Fill(Stream_General, 0, General_Format_String, Value, true);
- Fill(Stream_General, 0, General_Codec, Value, true);
- Fill(Stream_General, 0, General_Codec_String, Value, true);
- }
- }
- if (StreamKind==Stream_General && Parameter==General_Format_Info)
- (*Stream)[Stream_General][0](General_Codec_Info)=Value;
- if (StreamKind==Stream_General && Parameter==General_Format_Url)
- (*Stream)[Stream_General][0](General_Codec_Url)=Value;
- if (StreamKind==Stream_General && Parameter==General_Format_Extensions)
- (*Stream)[Stream_General][0](General_Codec_Extensions)=Value;
- if (StreamKind==Stream_General && Parameter==General_Format_Settings)
- (*Stream)[Stream_General][0](General_Codec_Settings)=Value;
-
- //Codec
- if (Parameter==Fill_Parameter(StreamKind, Generic_Codec))
- {
- const Ztring &C1=MediaInfoLib::Config.Codec_Get(Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Codec)), InfoCodec_Name, (stream_t)StreamKind);
- if (C1.empty())
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Codec_String), Value, true);
- else
- {
- Ztring D=Retrieve(StreamKind, StreamPos, "Codec/Family");
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Codec_String), C1, true);
- Fill(StreamKind, StreamPos, "Codec/Family", MediaInfoLib::Config.Codec_Get(Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Codec)), InfoCodec_KindofCodec, StreamKind), true);
- Ztring B=Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Codec));
- Ztring C=MediaInfoLib::Config.Codec_Get(B, InfoCodec_KindofCodec, StreamKind);
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Codec_Info) , MediaInfoLib::Config.Codec_Get(Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Codec)), InfoCodec_Description, StreamKind), true);
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Codec_Url) , MediaInfoLib::Config.Codec_Get(Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Codec)), InfoCodec_Url, StreamKind), true);
- }
- }
-
- //CodecID_Description
- if (Parameter==Fill_Parameter(StreamKind, Generic_CodecID_Info) && Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_CodecID_Description))==Value)
- Clear(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_CodecID_Description));
-
- //BitRate from BitRate_Nominal
- if ((Parameter==Fill_Parameter(StreamKind, Generic_BitRate)
- || Parameter==Fill_Parameter(StreamKind, Generic_BitRate_Nominal))
- #if MEDIAINFO_ADVANCED
- && Config->File_MergeBitRateInfo_Get()
- #endif //MEDIAINFO_ADVANCED
- )
- {
- float32 BitRate=Retrieve(StreamKind, StreamPos, "BitRate").To_float32();
- float32 BitRate_Nominal=Retrieve(StreamKind, StreamPos, "BitRate_Nominal").To_float32();
- if (BitRate_Nominal>BitRate*0.95 && BitRate_Nominal<BitRate*1.05)
- {
- Ztring Temp=Retrieve(StreamKind, StreamPos, "BitRate_Nominal");
- Clear(StreamKind, StreamPos, "BitRate_Nominal");
- Fill(StreamKind, StreamPos, "BitRate", Temp, true);
- }
- }
-
- //BitRate from BitRate_Maximum
- if ((Parameter==Fill_Parameter(StreamKind, Generic_BitRate)
- || Parameter==Fill_Parameter(StreamKind, Generic_BitRate_Maximum))
- #if MEDIAINFO_ADVANCED
- && Config->File_MergeBitRateInfo_Get()
- #endif //MEDIAINFO_ADVANCED
- )
- {
- float32 BitRate=Retrieve(StreamKind, StreamPos, "BitRate").To_float32();
- float32 BitRate_Maximum=Retrieve(StreamKind, StreamPos, "BitRate_Maximum").To_float32();
- if (BitRate>BitRate_Maximum*0.99 && BitRate<BitRate_Maximum*1.01)
- {
- Ztring Temp=Retrieve(StreamKind, StreamPos, "BitRate_Maximum");
- Clear(StreamKind, StreamPos, "BitRate_Maximum");
- Fill(StreamKind, StreamPos, "BitRate", Temp, true);
- }
- }
-
- //File size
- if (StreamKind==Stream_General && Parameter==General_FileSize)
- {
- int64u File_Size_Save=File_Size;
- File_Size=Value.To_int64u();
- for (size_t Kind=Stream_Video; Kind<Stream_Menu; Kind++)
- for (size_t Pos=0; Pos<Count_Get((stream_t)Kind); Pos++)
- FileSize_FileSize123((stream_t)Kind, Pos, Fill_Parameter((stream_t)Kind, Generic_StreamSize));
- File_Size=File_Size_Save;
- }
-
- //Delay/Video
- if (StreamKind==Stream_Video && StreamPos==0 && Parameter==Video_Delay)
- {
- for (size_t Pos=0; Pos<Count_Get(Stream_Audio); Pos++)
- if (!Retrieve(Stream_Audio, Pos, Audio_Delay).empty())
- {
- Fill(Stream_Audio, Pos, Audio_Video_Delay, Retrieve(Stream_Audio, Pos, Audio_Delay).To_int64s()-Value.To_int64s(), 10, true);
- if (Retrieve(Stream_Audio, Pos, Audio_Video_Delay).To_int64u()==0)
- for (size_t Param_Pos=Audio_Video_Delay+1; Param_Pos<=Audio_Video_Delay+4; Param_Pos++)
- if (Param_Pos<(*Stream)[Stream_Audio][Pos].size())
- (*Stream)[Stream_Audio][Pos][Param_Pos].clear();
- }
- for (size_t Pos=0; Pos<Count_Get(Stream_Text); Pos++)
- if (!Retrieve(Stream_Text, Pos, Text_Delay).empty())
- {
- Fill(Stream_Text, Pos, Text_Video_Delay, Retrieve(Stream_Text, Pos, Text_Delay).To_int64s()-Value.To_int64s(), 10, true);
- if (Retrieve(Stream_Text, Pos, Text_Video_Delay).To_int64u()==0)
- for (size_t Param_Pos=Text_Video_Delay+1; Param_Pos<=Text_Video_Delay+4; Param_Pos++)
- if (Param_Pos<(*Stream)[Stream_Text][Pos].size())
- (*Stream)[Stream_Text][Pos][Param_Pos].clear();
- }
- }
- if (StreamKind==Stream_Audio && Parameter==Audio_Delay && Count_Get(Stream_Video) && !Retrieve(Stream_Audio, StreamPos, Audio_Delay).empty() && !Retrieve(Stream_Video, 0, Video_Delay).empty())
- {
- if (Replace)
- Clear(Stream_Audio, StreamPos, Audio_Video_Delay);
- ZtringList AudioDelay; AudioDelay.Separator_Set(0, __T(" / ")); AudioDelay.Write(Retrieve(Stream_Audio, StreamPos, Audio_Delay));
- ZtringList VideoDelay; VideoDelay.Separator_Set(0, __T(" / ")); VideoDelay.Write(Retrieve(Stream_Video, 0, Video_Delay));
- if (!AudioDelay.empty() && !VideoDelay.empty() && AudioDelay.size() <= VideoDelay.size())
- {
- Fill(Stream_Audio, StreamPos, Audio_Video_Delay, AudioDelay(AudioDelay.size()-1).To_int64s()-VideoDelay(VideoDelay.size()-1).To_int64s(), 10);
- if (VideoDelay.size()==1 && Retrieve(Stream_Audio, StreamPos, Audio_Video_Delay).To_int64u()==0)
- for (size_t Pos=Audio_Video_Delay+1; Pos<=Audio_Video_Delay+4; Pos++)
- if (Pos<(*Stream)[Stream_Audio][StreamPos].size())
- (*Stream)[Stream_Audio][StreamPos][Pos].clear();
- }
- }
- if (StreamKind==Stream_Text && Parameter==Text_Delay && Count_Get(Stream_Video) && !Retrieve(Stream_Text, StreamPos, Text_Delay).empty() && !Retrieve(Stream_Video, 0, Video_Delay).empty())
- {
- Ztring MuxingMode_MoreInfo=Get(Stream_Text, StreamPos, "MuxingMode_MoreInfo");
- Ztring StreamID=MuxingMode_MoreInfo.SubString(__T("Muxed in Video #"), Ztring());
- size_t StreamID_Int=(size_t)StreamID.To_int64u();
- if (StreamID_Int)
- StreamID_Int--;
- Fill(Stream_Text, StreamPos, Text_Video_Delay, Value.To_int64s()-Retrieve(Stream_Video, StreamID_Int, Video_Delay).To_int64s(), 10, true);
- if (Retrieve(Stream_Text, StreamPos, Text_Video_Delay).To_int64u()==0)
- for (size_t Pos=Text_Video_Delay+1; Pos<=Text_Video_Delay+4; Pos++)
- if (Pos<(*Stream)[Stream_Text][StreamPos].size())
- (*Stream)[Stream_Text][StreamPos][Pos].clear();
- }
-
- //Delay/Video0
- if (StreamKind==Stream_Video && StreamPos==0 && Parameter==Video_Delay)
- {
- for (size_t Pos=0; Pos<Count_Get(Stream_Audio); Pos++)
- if (!Retrieve(Stream_Audio, Pos, Audio_Delay).empty())
- {
- Fill(Stream_Audio, Pos, Audio_Video0_Delay, Retrieve(Stream_Audio, Pos, Audio_Delay).To_int64s()-Value.To_int64s(), 10, true);
- if (Retrieve(Stream_Audio, Pos, Audio_Video0_Delay).To_int64u()==0)
- for (size_t Param_Pos=Audio_Video0_Delay+1; Param_Pos<=Audio_Video0_Delay+4; Param_Pos++)
- if (Param_Pos<(*Stream)[Stream_Audio][Pos].size())
- (*Stream)[Stream_Audio][Pos][Param_Pos].clear();
- }
- for (size_t Pos=0; Pos<Count_Get(Stream_Text); Pos++)
- if (!Retrieve(Stream_Text, Pos, Text_Delay).empty())
- {
- Fill(Stream_Text, Pos, Text_Video0_Delay, Retrieve(Stream_Text, Pos, Text_Delay).To_int64s()-Value.To_int64s(), 10, true);
- if (Retrieve(Stream_Text, Pos, Text_Video0_Delay).To_int64u()==0)
- for (size_t Param_Pos=Text_Video0_Delay+1; Param_Pos<=Text_Video0_Delay+4; Param_Pos++)
- if (Param_Pos<(*Stream)[Stream_Text][Pos].size())
- (*Stream)[Stream_Text][Pos][Param_Pos].clear();
- }
- }
- if (StreamKind==Stream_Audio && Parameter==Audio_Delay && Count_Get(Stream_Video) && !Retrieve(Stream_Audio, StreamPos, Audio_Delay).empty() && !Retrieve(Stream_Video, 0, Video_Delay).empty())
- {
- if (Replace)
- Clear(Stream_Audio, StreamPos, Audio_Video0_Delay);
- ZtringList AudioDelay; AudioDelay.Separator_Set(0, __T(" / ")); AudioDelay.Write(Retrieve(Stream_Audio, StreamPos, Audio_Delay));
- ZtringList VideoDelay; VideoDelay.Separator_Set(0, __T(" / ")); VideoDelay.Write(Retrieve(Stream_Video, 0, Video_Delay));
- if (!AudioDelay.empty() && !VideoDelay.empty() && AudioDelay.size() <= VideoDelay.size())
- {
- Fill(Stream_Audio, StreamPos, Audio_Video0_Delay, AudioDelay(AudioDelay.size() - 1).To_int64s() - VideoDelay(VideoDelay.size() - 1).To_int64s(), 10);
- if (VideoDelay.size()==1 && Retrieve(Stream_Audio, StreamPos, Audio_Video0_Delay).To_int64u()==0)
- for (size_t Pos=Audio_Video0_Delay+1; Pos<=Audio_Video0_Delay+4; Pos++)
- if (Pos<(*Stream)[Stream_Audio][StreamPos].size())
- (*Stream)[Stream_Audio][StreamPos][Pos].clear();
- }
- }
- if (StreamKind==Stream_Text && Parameter==Text_Delay && Count_Get(Stream_Video) && !Retrieve(Stream_Text, StreamPos, Text_Delay).empty() && !Retrieve(Stream_Video, 0, Video_Delay).empty())
- {
- Ztring MuxingMode_MoreInfo=Get(Stream_Text, StreamPos, "MuxingMode_MoreInfo");
- Ztring StreamID=MuxingMode_MoreInfo.SubString(__T("Muxed in Video #"), Ztring());
- size_t StreamID_Int=(size_t)StreamID.To_int64u();
- if (StreamID_Int)
- StreamID_Int--;
- Fill(Stream_Text, StreamPos, Text_Video0_Delay, Value.To_int64s()-Retrieve(Stream_Video, StreamID_Int, Video_Delay).To_int64s(), 10, true);
- if (Retrieve(Stream_Text, StreamPos, Text_Video0_Delay).To_int64u()==0)
- for (size_t Pos=Text_Video0_Delay+1; Pos<=Text_Video0_Delay+4; Pos++)
- if (Pos<(*Stream)[Stream_Text][StreamPos].size())
- (*Stream)[Stream_Text][StreamPos][Pos].clear();
- }
-
- //Language
- //-Find 2-digit language
- if (Parameter==Fill_Parameter(StreamKind, Generic_Language))
- {
- //Removing old strings
- Clear(StreamKind, StreamPos, Parameter+1); //String
- Clear(StreamKind, StreamPos, Parameter+2); //String1
- Clear(StreamKind, StreamPos, Parameter+3); //String2
- Clear(StreamKind, StreamPos, Parameter+4); //String3
- Clear(StreamKind, StreamPos, Parameter+5); //String4
-
- ZtringListList Languages;
- Languages.Separator_Set(0, __T(" / "));
- Languages.Separator_Set(1, __T("-"));
- Languages.Write((*Stream)[StreamKind][StreamPos][Parameter]);
-
- //Canonizing
- for (size_t Pos=0; Pos<Languages.size(); Pos++)
- {
- Ztring Language_Orig;
-
- //Removing undefined languages
- if (Languages[Pos].size()>=1)
- {
- Language_Orig=Languages[Pos][0];
- Languages[Pos][0].MakeLowerCase();
- if ((Languages[Pos][0].size()==3 && (Languages[Pos][0]==__T("mis")
- || Languages[Pos][0]==__T("und")
- || Languages[Pos][0]==__T("???")
- || Languages[Pos][0]==__T(" ")))
- || (Languages[Pos][0].size()==2 && Languages[Pos][0]==__T(" ")))
- Languages[Pos].clear();
- }
-
- //Finding ISO-639-1 from ISO-639-2 or translated name
- if (Languages[Pos].size()>=1)
- {
- if (Languages[Pos][0].size()==3 && !MediaInfoLib::Config.Iso639_1_Get(Languages[Pos][0]).empty())
- Languages[Pos][0]=MediaInfoLib::Config.Iso639_1_Get(Languages[Pos][0]);
- if (Languages[Pos][0].size()>3 && !MediaInfoLib::Config.Iso639_Find(Languages[Pos][0]).empty())
- Languages[Pos][0]=MediaInfoLib::Config.Iso639_Find(Languages[Pos][0]);
- if (Languages[Pos][0].size()>3)
- Languages[Pos][0]=Language_Orig; //We failed to detect language, using the original version
- }
- }
-
- if (Languages.Read()!=Retrieve(StreamKind, StreamPos, Parameter))
- Fill(StreamKind, StreamPos, Parameter, Languages.Read(), true);
- else
- {
- ZtringList Language1; Language1.Separator_Set(0, __T(" / "));
- ZtringList Language2; Language2.Separator_Set(0, __T(" / "));
- ZtringList Language3; Language3.Separator_Set(0, __T(" / "));
- ZtringList Language4; Language4.Separator_Set(0, __T(" / "));
-
- for (size_t Pos=0; Pos<Languages.size(); Pos++)
- {
- if (Languages[Pos].size()>=1)
- {
- Ztring Language_Translated=MediaInfoLib::Config.Language_Get(__T("Language_")+Languages[Pos][0]);
- if (Language_Translated.find(__T("Language_"))==0)
- Language_Translated=Languages[Pos][0]; //No translation found
- if (Languages[Pos].size()>=2)
- {
- if (Languages[Pos].size()==2 && Languages[Pos][1].size()>=2 && Languages[Pos][1].size()<=3 && (Languages[Pos][1][0]&0xDF)>=__T('A') && (Languages[Pos][1][0]&0xDF)<=__T('Z') && (Languages[Pos][1][1]&0xDF)>=__T('A') && (Languages[Pos][1][1]&0xDF)<=__T('Z'))
- {
- Language_Translated+=__T(" (");
- Language_Translated+=Ztring(Languages[Pos][1]).MakeUpperCase();
- Language_Translated+=__T(")");
- }
- else
- for (size_t Pos2=1; Pos2<Languages[Pos].size(); Pos2++)
- {
- Language_Translated+=__T('-'); //As the original string
- Language_Translated+=Languages[Pos][Pos2];
- }
- }
- Language1.push_back(Language_Translated);
- if (Languages[Pos][0].size()==2)
- {
- Language2.push_back(Languages[Pos][0]);
- Language4.push_back(Languages[Pos].Read());
- }
- else
- {
- Language2.push_back(Ztring());
- Language4.push_back(Ztring());
- }
- if (Languages[Pos][0].size()==3)
- Language3.push_back(Languages[Pos][0]);
- else if (!MediaInfoLib::Config.Iso639_2_Get(Languages[Pos][0]).empty())
- Language3.push_back(MediaInfoLib::Config.Iso639_2_Get(Languages[Pos][0]));
- else
- Language3.push_back(Ztring());
- }
- else
- {
- Language1.push_back(Ztring());
- Language2.push_back(Ztring());
- Language3.push_back(Ztring());
- Language4.push_back(Ztring());
- }
- }
-
- Fill(StreamKind, StreamPos, Parameter+2, Language1.Read()); //String1
- Fill(StreamKind, StreamPos, Parameter+3, Language2.Read()); //String2
- Fill(StreamKind, StreamPos, Parameter+4, Language3.Read()); //String3
- Fill(StreamKind, StreamPos, Parameter+5, Language4.Read()); //String4
- Fill(StreamKind, StreamPos, Parameter+1, Retrieve(StreamKind, StreamPos, Parameter+2)); //String
- }
- }
-
- //ServiceName / ServiceProvider
- if (Parameter==Fill_Parameter(StreamKind, Generic_ServiceName)
- || Parameter==Fill_Parameter(StreamKind, Generic_ServiceProvider))
- {
- if (Retrieve(StreamKind, StreamPos, Parameter).find(__T(" - "))==string::npos && (Retrieve(StreamKind, StreamPos, Parameter).find(__T(":"))==2 || Retrieve(StreamKind, StreamPos, Parameter).find(__T(":"))==3))
- {
- Ztring Temp=Retrieve(StreamKind, StreamPos, Parameter);
- Temp.erase(0, Retrieve(StreamKind, StreamPos, Parameter).find(__T(":"))+1);
- (*Stream)[StreamKind][StreamPos](Parameter)=Temp;
- }
- }
-
- //FrameRate Nominal
- if (StreamKind==Stream_Video && (Parameter==Video_FrameRate || Parameter==Video_FrameRate_Nominal))
- {
- float32 FrameRate=Retrieve(Stream_Video, StreamPos, Video_FrameRate).To_float32();
- float32 FrameRate_Nominal=Retrieve(Stream_Video, StreamPos, Video_FrameRate_Nominal).To_float32();
- if (FrameRate_Nominal>FrameRate*0.9995 && FrameRate_Nominal<FrameRate*1.0005)
- {
- Ztring Temp=Retrieve(StreamKind, StreamPos, Video_FrameRate_Nominal);
- Clear(StreamKind, StreamPos, Video_FrameRate_Nominal);
- if (Parameter==Video_FrameRate)
- Fill(StreamKind, StreamPos, Parameter, Temp, true);
- }
- }
-
- //Well known framerate values
- if (StreamKind==Stream_Video && (Parameter==Video_FrameRate || Parameter==Video_FrameRate_Nominal || Parameter==Video_FrameRate_Original))
- {
- Video_FrameRate_Rounding(StreamPos, (video)Parameter);
- if (Retrieve(Stream_Video, StreamPos, Video_FrameRate_Nominal)==Retrieve(Stream_Video, StreamPos, Video_FrameRate))
- Clear(Stream_Video, StreamPos, Video_FrameRate_Nominal);
- if (Parameter!=Video_FrameRate_Original && Retrieve(Stream_Video, StreamPos, Video_FrameRate_Original)==Retrieve(Stream_Video, StreamPos, Video_FrameRate))
- Clear(Stream_Video, StreamPos, Video_FrameRate_Original);
- }
-
- //Bits/(Pixel*Frame)
- if (StreamKind==Stream_Video && (Parameter==Video_BitRate || Parameter==Video_BitRate_Nominal || Parameter==Video_Width || Parameter==Video_Height || Parameter==Video_FrameRate))
- {
- float32 BitRate=Retrieve(Stream_Video, StreamPos, Video_BitRate).To_float32();
- if (BitRate==0)
- BitRate=Retrieve(Stream_Video, StreamPos, Video_BitRate_Nominal).To_float32();
- float F1=(float)Retrieve(Stream_Video, StreamPos, Video_Width).To_int32s()*(float)Retrieve(Stream_Video, StreamPos, Video_Height).To_int32s()*Retrieve(Stream_Video, StreamPos, Video_FrameRate).To_float32();
- if (BitRate && F1)
- Fill(Stream_Video, StreamPos, Video_Bits__Pixel_Frame_, BitRate/F1, 3, true);
- }
-
- //Special audio cases
- if (StreamKind==Stream_Audio && Parameter==Audio_CodecID
- && Retrieve(Stream_Audio, StreamPos, Audio_Channel_s_).empty()
- &&(Value==__T("samr")
- || Value==__T("sawb")
- || Value==__T("7A21")
- || Value==__T("7A22"))
- )
- Fill(Stream_Audio, StreamPos, Audio_Channel_s_, 1, 10, true); //AMR is always with 1 channel
-
- //Well known bitrate values
- if (StreamKind==Stream_Video && (Parameter==Video_BitRate || Parameter==Video_BitRate_Nominal))
- Video_BitRate_Rounding(StreamPos, (video)Parameter);
- if (StreamKind==Stream_Audio && (Parameter==Audio_BitRate || Parameter==Audio_BitRate_Nominal))
- Audio_BitRate_Rounding(StreamPos, (audio)Parameter);
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Fill (stream_t StreamKind, size_t StreamPos, const char* Parameter, const Ztring &Value, bool Replace)
-{
- //Integrity
- if (!Status[IsAccepted] || StreamKind>Stream_Max || Parameter==NULL || Parameter[0]=='\0')
- return;
-
- //Handling values with \r\n inside
- if (Value.find(__T('\r'))!=string::npos || Value.find(__T('\n'))!=string::npos)
- {
- Ztring NewValue=Value;
- NewValue.FindAndReplace(__T("\r\n"), __T(" / "), 0, Ztring_Recursive);
- NewValue.FindAndReplace(__T("\r"), __T(" / "), 0, Ztring_Recursive);
- NewValue.FindAndReplace(__T("\n"), __T(" / "), 0, Ztring_Recursive);
- if (NewValue.size()>=3 && NewValue.rfind(__T(" / "))==NewValue.size()-3)
- NewValue.resize(NewValue.size()-3);
- Fill(StreamKind, StreamPos, Parameter, NewValue, Replace);
- return;
- }
-
- //Handle Value before StreamKind
- if (StreamKind==Stream_Max || StreamPos>=(*Stream)[StreamKind].size())
- {
- Ztring ParameterZ=Ztring().From_UTF8(Parameter);
- if (Replace)
- for (size_t Pos=0; Pos<Fill_Temp.size(); Pos++)
- if (Fill_Temp[Pos](0)==ParameterZ)
- {
- Fill_Temp.erase(Fill_Temp.begin()+Pos);
- Pos--;
- }
- ZtringList NewList;
- NewList.push_back(ParameterZ);
- NewList.push_back(Value);
- Fill_Temp.push_back(NewList);
- return; //No streams
- }
-
- //Handling of well known parameters
- size_t Pos=MediaInfoLib::Config.Info_Get(StreamKind).Find(Ztring().From_Local(Parameter));
- if (Pos!=Error)
- {
- Fill(StreamKind, StreamPos, Pos, Value, Replace);
- return;
- }
-
- //Handling of unknown parameters
- if (Value.empty())
- {
- if (Replace)
- {
- size_t Pos_ToReplace=(*Stream_More)[StreamKind][StreamPos].Find(Ztring().From_ISO_8859_1(Parameter), Info_Name);
- if (Pos_ToReplace!=(size_t)-1)
- (*Stream_More)[StreamKind][StreamPos].erase((*Stream_More)[StreamKind][StreamPos].begin()+Pos_ToReplace); //Empty value --> remove the line
- }
- }
- else
- {
- Ztring &Target=(*Stream_More)[StreamKind][StreamPos](Ztring().From_ISO_8859_1(Parameter), Info_Text);
- if (Target.empty() || Replace)
- {
- Target=Value; //First value
- (*Stream_More)[StreamKind][StreamPos](Ztring().From_ISO_8859_1(Parameter), Info_Name_Text)=MediaInfoLib::Config.Language_Get(Ztring().From_Local(Parameter));
- (*Stream_More)[StreamKind][StreamPos](Ztring().From_ISO_8859_1(Parameter), Info_Options)=__T("Y NT");
- }
- else
- {
- Target+=MediaInfoLib::Config.TagSeparator_Get();
- Target+=Value;
- }
- }
- Fill(StreamKind, StreamPos, (size_t)General_Count, Count_Get(StreamKind, StreamPos), 10, true);
-}
-
-//---------------------------------------------------------------------------
-const Ztring &File__Analyze::Retrieve_Const (stream_t StreamKind, size_t StreamPos, size_t Parameter, info_t KindOfInfo)
-{
- //Integrity
- if (StreamKind>=Stream_Max
- || StreamPos>=(*Stream)[StreamKind].size()
- || Parameter>=(*Stream)[StreamKind][StreamPos].size())
- return MediaInfoLib::Config.EmptyString_Get();
-
- if (KindOfInfo!=Info_Text)
- return MediaInfoLib::Config.Info_Get(StreamKind, Parameter, KindOfInfo);
- return (*Stream)[StreamKind][StreamPos](Parameter);
-}
-
-//---------------------------------------------------------------------------
-Ztring File__Analyze::Retrieve (stream_t StreamKind, size_t StreamPos, size_t Parameter, info_t KindOfInfo)
-{
- //Integrity
- if (StreamKind>=Stream_Max
- || StreamPos>=(*Stream)[StreamKind].size()
- || Parameter>=(*Stream)[StreamKind][StreamPos].size())
- return MediaInfoLib::Config.EmptyString_Get();
-
- if (KindOfInfo!=Info_Text)
- return MediaInfoLib::Config.Info_Get(StreamKind, Parameter, KindOfInfo);
- return (*Stream)[StreamKind][StreamPos](Parameter);
-}
-
-//---------------------------------------------------------------------------
-const Ztring &File__Analyze::Retrieve_Const (stream_t StreamKind, size_t StreamPos, const char* Parameter, info_t KindOfInfo)
-{
- //Integrity
- if (StreamKind>=Stream_Max
- || StreamPos>=(*Stream)[StreamKind].size()
- || Parameter==NULL
- || Parameter[0]=='\0')
- return MediaInfoLib::Config.EmptyString_Get();
-
- if (KindOfInfo!=Info_Text)
- return MediaInfoLib::Config.Info_Get(StreamKind, Parameter, KindOfInfo);
- size_t Parameter_Pos=MediaInfoLib::Config.Info_Get(StreamKind).Find(Ztring().From_Local(Parameter));
- if (Parameter_Pos==Error)
- {
- Parameter_Pos=(*Stream_More)[StreamKind][StreamPos].Find(Ztring().From_Local(Parameter));
- if (Parameter_Pos==Error)
- return MediaInfoLib::Config.EmptyString_Get();
- return (*Stream_More)[StreamKind][StreamPos](Parameter_Pos, 1);
- }
- return (*Stream)[StreamKind][StreamPos](Parameter_Pos);
-}
-
-//---------------------------------------------------------------------------
-Ztring File__Analyze::Retrieve (stream_t StreamKind, size_t StreamPos, const char* Parameter, info_t KindOfInfo)
-{
- //Integrity
- if (StreamKind>=Stream_Max
- || StreamPos>=(*Stream)[StreamKind].size()
- || Parameter==NULL
- || Parameter[0]=='\0')
- return MediaInfoLib::Config.EmptyString_Get();
-
- if (KindOfInfo!=Info_Text)
- return MediaInfoLib::Config.Info_Get(StreamKind, Parameter, KindOfInfo);
- size_t Parameter_Pos=MediaInfoLib::Config.Info_Get(StreamKind).Find(Ztring().From_Local(Parameter));
- if (Parameter_Pos==Error)
- {
- Parameter_Pos=(*Stream_More)[StreamKind][StreamPos].Find(Ztring().From_Local(Parameter));
- if (Parameter_Pos==Error)
- return MediaInfoLib::Config.EmptyString_Get();
- return (*Stream_More)[StreamKind][StreamPos](Parameter_Pos, 1);
- }
- return (*Stream)[StreamKind][StreamPos](Parameter_Pos);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Clear (stream_t StreamKind, size_t StreamPos, const char* Parameter)
-{
- //Integrity
- if (StreamKind>=Stream_Max
- || Parameter==NULL
- || Parameter[0]=='\0')
- return;
-
- if (StreamPos>=(*Stream)[StreamKind].size())
- {
- size_t Pos=Fill_Temp.Find(Ztring().From_UTF8(Parameter));
- if (Pos!=string::npos)
- Fill_Temp.erase(Fill_Temp.begin()+Pos);
- return;
- }
-
- size_t Parameter_Pos=MediaInfoLib::Config.Info_Get(StreamKind).Find(Ztring().From_Local(Parameter));
- if (Parameter_Pos==Error)
- {
- Parameter_Pos=(*Stream_More)[StreamKind][StreamPos].Find(Ztring().From_Local(Parameter));
- if (Parameter_Pos==Error)
- return;
- (*Stream_More)[StreamKind][StreamPos](Parameter_Pos, 1).clear();
- return;
- }
-
- Clear(StreamKind, StreamPos, Parameter_Pos);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Clear (stream_t StreamKind, size_t StreamPos, size_t Parameter)
-{
- //Integrity
- if (StreamKind>=Stream_Max
- || StreamPos>=(*Stream)[StreamKind].size())
- return;
-
- //Normal
- if (Parameter<MediaInfoLib::Config.Info_Get(StreamKind).size())
- {
- //Is something available?
- if (Parameter>=(*Stream)[StreamKind][StreamPos].size())
- return; //Was never filled, no nead to clear it
-
- //Clearing
- (*Stream)[StreamKind][StreamPos][Parameter].clear();
-
- //Human readable
- if (MediaInfoLib::Config.ReadByHuman_Get())
- {
- //Strings
- const Ztring &List_Measure_Value=MediaInfoLib::Config.Info_Get(StreamKind).Read(Parameter, Info_Measure);
- if (List_Measure_Value==__T(" byte"))
- {
- const Ztring &Temp=MediaInfoLib::Config.Info_Get(StreamKind).Read(Parameter, Info_Name);
- size_t List_Size=Temp.find(__T("StreamSize"))==string::npos?5:7; //for /String5, with percentage, and proportion
- for (size_t Pos=Parameter+1; Pos<=Parameter+List_Size; Pos++)
- if (Pos<(*Stream)[StreamKind][StreamPos].size())
- (*Stream)[StreamKind][StreamPos][Pos].clear();
- }
- else if (List_Measure_Value==__T(" bps") || List_Measure_Value==__T(" Hz"))
- {
- if (Parameter+1<(*Stream)[StreamKind][StreamPos].size())
- (*Stream)[StreamKind][StreamPos][Parameter+1].clear();
- }
- else if (List_Measure_Value==__T(" ms"))
- {
- for (size_t Pos=Parameter+1; Pos<=Parameter+6; Pos++)
- if (Pos<(*Stream)[StreamKind][StreamPos].size())
- (*Stream)[StreamKind][StreamPos][Pos].clear();
- }
- else if (List_Measure_Value==__T("Yes"))
- {
- if (Parameter+1<(*Stream)[StreamKind][StreamPos].size())
- (*Stream)[StreamKind][StreamPos][Parameter+1].clear();
- }
- else if (!List_Measure_Value.empty())
- {
- if (Parameter+1<(*Stream)[StreamKind][StreamPos].size())
- (*Stream)[StreamKind][StreamPos][Parameter+1].clear();
- }
- else if (Parameter+1<(*Stream)[StreamKind][StreamPos].size() && MediaInfoLib::Config.Info_Get(StreamKind).Read(Parameter+1, Info_Name).find(__T("/String"))!=string::npos)
- {
- (*Stream)[StreamKind][StreamPos][Parameter+1].clear();
- }
- }
-
- return;
- }
-
- //More
- Parameter-=(*Stream)[StreamKind][StreamPos].size(); //For having Stream_More position
- if (Parameter<(*Stream_More)[StreamKind][StreamPos].size())
- {
- (*Stream_More)[StreamKind][StreamPos].erase((*Stream_More)[StreamKind][StreamPos].begin()+Parameter);
- return;
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Clear (stream_t StreamKind, size_t StreamPos)
-{
- //Integrity
- if (StreamKind>=Stream_Max
- || StreamPos>=(*Stream)[StreamKind].size())
- return;
-
- (*Stream)[StreamKind].erase((*Stream)[StreamKind].begin()+StreamPos);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Clear (stream_t StreamKind)
-{
- //Integrity
- if (StreamKind>=Stream_Max)
- return;
-
- (*Stream)[StreamKind].clear();
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Fill_Flush()
-{
- Stream_Prepare(Stream_Max); //clear filling
- Fill_Temp.clear();
-}
-
-//---------------------------------------------------------------------------
-size_t File__Analyze::Merge(MediaInfo_Internal &ToAdd, bool)
-{
- size_t Count=0;
- for (size_t StreamKind=(size_t)Stream_General; StreamKind<(size_t)Stream_Max; StreamKind++)
- {
- size_t StreamPos_Count=ToAdd.Count_Get((stream_t)StreamKind);
- for (size_t StreamPos=0; StreamPos<StreamPos_Count; StreamPos++)
- {
- //Prepare a new stream
- if (StreamPos>=Count_Get((stream_t)StreamKind))
- Stream_Prepare((stream_t)StreamKind);
-
- //Merge
- size_t Pos_Count=ToAdd.Count_Get((stream_t)StreamKind, StreamPos);
- for (size_t Pos=0; Pos<Pos_Count; Pos++)
- {
- if (StreamKind!=Stream_General
- || !(Pos==General_CompleteName
- || Pos==General_FolderName
- || Pos==General_FileName
- || Pos==General_FileExtension
- || Pos==General_File_Created_Date
- || Pos==General_Format
- || Pos==General_Format_String
- || Pos==General_Format_Extensions
- || Pos==General_Format_Info
- || Pos==General_Codec
- || Pos==General_Codec_String
- || Pos==General_Codec_Extensions
- || Pos==General_FileSize
- || Pos==General_FileSize_String
- || Pos==General_FileSize_String1
- || Pos==General_FileSize_String2
- || Pos==General_FileSize_String3
- || Pos==General_FileSize_String4
- || Pos==General_File_Created_Date_Local
- || Pos==General_File_Modified_Date
- || Pos==General_File_Modified_Date_Local))
- Fill((stream_t)StreamKind, StreamPos, Ztring(ToAdd.Get((stream_t)StreamKind, StreamPos, Pos, Info_Name)).To_UTF8().c_str(), ToAdd.Get((stream_t)StreamKind, StreamPos, Pos), true);
- }
-
- Count++;
- }
- }
-
- return Count;
-}
-
-//---------------------------------------------------------------------------
-size_t File__Analyze::Merge(MediaInfo_Internal &ToAdd, stream_t StreamKind, size_t StreamPos_From, size_t StreamPos_To, bool)
-{
- size_t Pos_Count=ToAdd.Count_Get(StreamKind, StreamPos_From);
- for (size_t Pos=General_Inform; Pos<Pos_Count; Pos++)
- if (!ToAdd.Get(StreamKind, StreamPos_From, Pos).empty())
- Fill(StreamKind, StreamPos_To, Ztring(ToAdd.Get((stream_t)StreamKind, StreamPos_From, Pos, Info_Name)).To_UTF8().c_str(), ToAdd.Get(StreamKind, StreamPos_From, Pos), true);
-
- return 1;
-}
-
-//---------------------------------------------------------------------------
-size_t File__Analyze::Merge(File__Analyze &ToAdd, bool Erase)
-{
- size_t Count=0;
- for (size_t StreamKind=(size_t)Stream_General+1; StreamKind<(size_t)Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<(*ToAdd.Stream)[StreamKind].size(); StreamPos++)
- {
- //Prepare a new stream
- Stream_Prepare((stream_t)StreamKind);
-
- //Merge
- Merge(ToAdd, (stream_t)StreamKind, StreamPos, StreamPos_Last, Erase);
-
- Count++;
- }
- return Count;
-}
-
-//---------------------------------------------------------------------------
-size_t File__Analyze::Merge(File__Analyze &ToAdd, stream_t StreamKind, size_t StreamPos_From, size_t StreamPos_To, bool Erase)
-{
- //Integrity
- if (!Status[IsAccepted] || &ToAdd==NULL || StreamKind>=Stream_Max || !ToAdd.Stream || StreamPos_From>=(*ToAdd.Stream)[StreamKind].size())
- return 0;
-
- //Destination
- while (StreamPos_To>=(*Stream)[StreamKind].size())
- Stream_Prepare(StreamKind);
-
- //Specific stuff
- Ztring Width_Temp, Height_Temp, PixelAspectRatio_Temp, DisplayAspectRatio_Temp, FrameRate_Temp, FrameRate_Mode_Temp, ScanType_Temp, ScanOrder_Temp, Channels_Temp, Delay_Temp, Delay_DropFrame_Temp, Delay_Source_Temp, Delay_Settings_Temp, Source_Temp, Source_Kind_Temp, Source_Info_Temp;
- Ztring colour_description_present_Temp, colour_primaries_Temp, transfer_characteristics_Temp, matrix_coefficients_Temp;
- if (StreamKind==Stream_Video)
- {
- Width_Temp=Retrieve(Stream_Video, StreamPos_To, Video_Width);
- Height_Temp=Retrieve(Stream_Video, StreamPos_To, Video_Height);
- PixelAspectRatio_Temp=Retrieve(Stream_Video, StreamPos_To, Video_PixelAspectRatio); //We want to keep the PixelAspectRatio_Temp of the video stream
- DisplayAspectRatio_Temp=Retrieve(Stream_Video, StreamPos_To, Video_DisplayAspectRatio); //We want to keep the DisplayAspectRatio_Temp of the video stream
- FrameRate_Temp=Retrieve(Stream_Video, StreamPos_To, Video_FrameRate); //We want to keep the FrameRate of AVI 120 fps
- FrameRate_Mode_Temp=Retrieve(Stream_Video, StreamPos_To, Video_FrameRate_Mode); //We want to keep the FrameRate_Mode of AVI 120 fps
- ScanType_Temp=Retrieve(Stream_Video, StreamPos_To, Video_ScanType);
- ScanOrder_Temp=Retrieve(Stream_Video, StreamPos_To, Video_ScanOrder);
- colour_description_present_Temp=Retrieve(Stream_Video, StreamPos_To, Video_colour_description_present);
- if (!colour_description_present_Temp.empty())
- {
- colour_primaries_Temp=Retrieve(Stream_Video, StreamPos_To, Video_colour_primaries);
- transfer_characteristics_Temp=Retrieve(Stream_Video, StreamPos_To, Video_transfer_characteristics);
- matrix_coefficients_Temp=Retrieve(Stream_Video, StreamPos_To, Video_matrix_coefficients);
- }
- Clear(Stream_Video, StreamPos_To, Video_colour_description_present);
- Clear(Stream_Video, StreamPos_To, Video_colour_primaries);
- Clear(Stream_Video, StreamPos_To, Video_transfer_characteristics);
- Clear(Stream_Video, StreamPos_To, Video_matrix_coefficients);
- }
- if (StreamKind==Stream_Audio)
- {
- Channels_Temp=Retrieve(Stream_Audio, StreamPos_To, Audio_Channel_s_);
- }
- if (ToAdd.Retrieve(StreamKind, StreamPos_From, Fill_Parameter(StreamKind, Generic_Delay_Source))==__T("Container"))
- {
- Fill(StreamKind, StreamPos_To, "Delay_Original", Retrieve(StreamKind, StreamPos_To, "Delay"), true);
- Clear(StreamKind, StreamPos_To, "Delay");
- Fill(StreamKind, StreamPos_To, "Delay_Original_DropFrame", Retrieve(StreamKind, StreamPos_To, "Delay_DropFrame"), true);
- Clear(StreamKind, StreamPos_To, "Delay_DropFrame");
- Fill(StreamKind, StreamPos_To, "Delay_Original_Source", Retrieve(StreamKind, StreamPos_To, "Delay_Source"), true);
- Clear(StreamKind, StreamPos_To, "Delay_Source");
- if (!ToAdd.Retrieve(StreamKind, StreamPos_To, "Format").empty()) //Exception: MPEG-4 TimeCode, settings are in the MPEG-4 header
- {
- Fill(StreamKind, StreamPos_To, "Delay_Original_Settings", Retrieve(StreamKind, StreamPos_To, "Delay_Settings"), true);
- Clear(StreamKind, StreamPos_To, "Delay_Settings");
- }
- }
- else
- {
- Delay_Temp=Retrieve(StreamKind, StreamPos_To, "Delay"); //We want to keep the Delay from the stream
- Delay_Settings_Temp=Retrieve(StreamKind, StreamPos_To, "Delay_Settings"); //We want to keep the Delay_Settings from the stream
- Delay_DropFrame_Temp=Retrieve(StreamKind, StreamPos_To, "Delay_DropFrame"); //We want to keep the Delay_Source from the stream
- Delay_Source_Temp=Retrieve(StreamKind, StreamPos_To, "Delay_Source"); //We want to keep the Delay_Source from the stream
- }
- Source_Temp=Retrieve(StreamKind, StreamPos_To, "Source");
- Source_Kind_Temp=Retrieve(StreamKind, StreamPos_To, "Source_Kind");
- Source_Info_Temp=Retrieve(StreamKind, StreamPos_To, "Source_Info");
-
- //Merging
- size_t Count=0;
- size_t Size=ToAdd.Count_Get(StreamKind, StreamPos_From);
- for (size_t Pos=General_Inform; Pos<Size; Pos++)
- {
- const Ztring &ToFill_Value=ToAdd.Get(StreamKind, StreamPos_From, Pos);
- if (!ToFill_Value.empty() && (Erase || Get(StreamKind, StreamPos_To, Pos).empty()))
- {
- if (Pos<MediaInfoLib::Config.Info_Get(StreamKind).size())
- Fill(StreamKind, StreamPos_To, Pos, ToFill_Value, true);
- else
- {
- Fill(StreamKind, StreamPos_To, ToAdd.Get(StreamKind, StreamPos_From, Pos, Info_Name).To_UTF8().c_str(), ToFill_Value, true);
- (*Stream_More)[StreamKind][StreamPos_To](ToAdd.Get(StreamKind, StreamPos_From, Pos, Info_Name), Info_Options)=ToAdd.Get(StreamKind, StreamPos_From, Pos, Info_Options);
- }
- Count++;
- }
- }
-
- //Specific stuff
- if (StreamKind==Stream_Video)
- {
- Ztring PixelAspectRatio_Original=Retrieve(Stream_Video, StreamPos_To, Video_PixelAspectRatio);
- Ztring DisplayAspectRatio_Original=Retrieve(Stream_Video, StreamPos_To, Video_DisplayAspectRatio);
-
- if (!Width_Temp.empty() && Width_Temp!=Retrieve(Stream_Video, StreamPos_To, Video_Width))
- {
- Fill(Stream_Video, StreamPos_To, Video_Width_Original, (*Stream)[Stream_Video][StreamPos_To][Video_Width], true);
- Fill(Stream_Video, StreamPos_To, Video_Width, Width_Temp, true);
- }
- if (!Height_Temp.empty() && Height_Temp!=Retrieve(Stream_Video, StreamPos_To, Video_Height))
- {
- Fill(Stream_Video, StreamPos_To, Video_Height_Original, (*Stream)[Stream_Video][StreamPos_To][Video_Height], true);
- Fill(Stream_Video, StreamPos_To, Video_Height, Height_Temp, true);
- }
- if (!PixelAspectRatio_Temp.empty() && PixelAspectRatio_Temp!=Retrieve(Stream_Video, StreamPos_To, Video_PixelAspectRatio))
- {
- Fill(Stream_Video, StreamPos_To, Video_PixelAspectRatio_Original, PixelAspectRatio_Original, true);
- Fill(Stream_Video, StreamPos_To, Video_PixelAspectRatio, PixelAspectRatio_Temp, true);
- }
- if (!DisplayAspectRatio_Temp.empty() && DisplayAspectRatio_Temp!=DisplayAspectRatio_Original)
- {
- Fill(Stream_Video, StreamPos_To, Video_DisplayAspectRatio_Original, DisplayAspectRatio_Original, true);
- Fill(Stream_Video, StreamPos_To, Video_DisplayAspectRatio, DisplayAspectRatio_Temp, true);
- }
- if (!FrameRate_Temp.empty() && FrameRate_Temp!=Retrieve(Stream_Video, StreamPos_To, Video_FrameRate))
- {
- Fill(Stream_Video, StreamPos_To, Video_FrameRate_Original, (*Stream)[Stream_Video][StreamPos_To][Video_FrameRate], true);
- Fill(Stream_Video, StreamPos_To, Video_FrameRate, FrameRate_Temp, true);
- }
- if (!FrameRate_Mode_Temp.empty() && FrameRate_Mode_Temp!=Retrieve(Stream_Video, StreamPos_To, Video_FrameRate_Mode))
- {
- Fill(Stream_Video, StreamPos_To, Video_FrameRate_Mode_Original, (*Stream)[Stream_Video][StreamPos_To][Video_FrameRate_Mode], true);
- Fill(Stream_Video, StreamPos_To, Video_FrameRate_Mode, FrameRate_Mode_Temp, true);
- }
- if (!ScanType_Temp.empty() && (ScanType_Temp!=Retrieve(Stream_Video, StreamPos_To, Video_ScanType) && !(ScanType_Temp==__T("Interlaced") && Retrieve(Stream_Video, StreamPos_To, Video_ScanType)==__T("MBAFF"))))
- {
- Fill(Stream_Video, StreamPos_To, Video_ScanType_Original, (*Stream)[Stream_Video][StreamPos_To][Video_ScanType], true);
- Fill(Stream_Video, StreamPos_To, Video_ScanType, ScanType_Temp, true);
- }
- if (Retrieve(Stream_Video, StreamPos_To, Video_ScanType_Original)!=__T("Progressive") && ((!ScanOrder_Temp.empty() && ScanOrder_Temp!=Retrieve(Stream_Video, StreamPos_To, Video_ScanOrder)) || !Retrieve(Stream_Video, StreamPos_To, Video_ScanType_Original).empty()))
- {
- Fill(Stream_Video, StreamPos_To, Video_ScanOrder_Original, (*Stream)[Stream_Video][StreamPos_To][Video_ScanOrder], true);
- if (ScanOrder_Temp.empty())
- {
- Clear(Stream_Video, StreamPos_To, Video_ScanOrder);
- Clear(Stream_Video, StreamPos_To, Video_ScanOrder_String);
- }
- else
- Fill(Stream_Video, StreamPos_To, Video_ScanOrder, ScanOrder_Temp, true);
- }
- if (!colour_description_present_Temp.empty())
- {
- if (!colour_description_present_Temp.empty() && !Retrieve(Stream_Video, StreamPos_To, Video_colour_description_present).empty()
- && (colour_primaries_Temp!=Retrieve(Stream_Video, StreamPos_To, Video_colour_primaries)
- || transfer_characteristics_Temp!=Retrieve(Stream_Video, StreamPos_To, Video_transfer_characteristics)
- || matrix_coefficients_Temp!=Retrieve(Stream_Video, StreamPos_To, Video_matrix_coefficients)))
- {
- Fill(Stream_Video, StreamPos_To, Video_colour_description_present_Original, (*Stream)[Stream_Video][StreamPos_To][Video_colour_description_present], true);
- Fill(Stream_Video, StreamPos_To, Video_colour_description_present, colour_description_present_Temp, true);
- Fill(Stream_Video, StreamPos_To, Video_colour_primaries_Original, (*Stream)[Stream_Video][StreamPos_To][Video_colour_primaries], true);
- Fill(Stream_Video, StreamPos_To, Video_colour_primaries, colour_primaries_Temp, true);
- Fill(Stream_Video, StreamPos_To, Video_transfer_characteristics_Original, (*Stream)[Stream_Video][StreamPos_To][Video_transfer_characteristics], true);
- Fill(Stream_Video, StreamPos_To, Video_transfer_characteristics, transfer_characteristics_Temp, true);
- Fill(Stream_Video, StreamPos_To, Video_matrix_coefficients_Original, (*Stream)[Stream_Video][StreamPos_To][Video_matrix_coefficients], true);
- Fill(Stream_Video, StreamPos_To, Video_matrix_coefficients, matrix_coefficients_Temp, true);
- }
- else
- {
- Fill(Stream_Video, StreamPos_To, Video_colour_description_present, colour_description_present_Temp, true);
- Fill(Stream_Video, StreamPos_To, Video_colour_primaries, colour_primaries_Temp, true);
- Fill(Stream_Video, StreamPos_To, Video_transfer_characteristics, transfer_characteristics_Temp, true);
- Fill(Stream_Video, StreamPos_To, Video_matrix_coefficients, matrix_coefficients_Temp, true);
- }
- }
- }
- if (StreamKind==Stream_Audio)
- {
- if (!Channels_Temp.empty())
- {
- //Test with legacy streams information
- bool IsOk=(Channels_Temp==Retrieve(Stream_Audio, StreamPos_To, Audio_Channel_s_));
- if (!IsOk)
- {
- ZtringList Temp; Temp.Separator_Set(0, __T(" / "));
- Temp.Write(Retrieve(Stream_Audio, StreamPos_To, Audio_Channel_s_));
- for (size_t Pos=0; Pos<Temp.size(); Pos++)
- if (Channels_Temp==Temp[Pos])
- IsOk=true;
- }
-
- if (!IsOk)
- {
- Fill(Stream_Audio, StreamPos_To, Audio_Channel_s__Original, (*Stream)[Stream_Audio][StreamPos_To][Audio_Channel_s_], true);
- Fill(Stream_Audio, StreamPos_To, Audio_Channel_s_, Channels_Temp, true);
- }
- }
- }
- if (!Delay_Source_Temp.empty() && Delay_Source_Temp!=Retrieve(StreamKind, StreamPos_To, "Delay_Source"))
- {
- Fill(StreamKind, StreamPos_To, "Delay_Original", Retrieve(StreamKind, StreamPos_To, "Delay"), true);
- Fill(StreamKind, StreamPos_To, "Delay", Delay_Temp, true);
- Fill(StreamKind, StreamPos_To, "Delay_Original_Settings", Retrieve(StreamKind, StreamPos_To, "Delay_Settings"), true);
- Fill(StreamKind, StreamPos_To, "Delay_Settings", Delay_Settings_Temp, true);
- Fill(StreamKind, StreamPos_To, "Delay_Original_DropFrame", Retrieve(StreamKind, StreamPos_To, "Delay_DropFrame"), true);
- Fill(StreamKind, StreamPos_To, "Delay_DropFrame", Delay_DropFrame_Temp, true);
- Fill(StreamKind, StreamPos_To, "Delay_Original_Source", Retrieve(StreamKind, StreamPos_To, "Delay_Source"), true);
- Fill(StreamKind, StreamPos_To, "Delay_Source", Delay_Source_Temp, true);
- }
- if (!Source_Temp.empty() && Source_Temp!=Retrieve(StreamKind, StreamPos_To, "Source"))
- {
- Fill(StreamKind, StreamPos_To, "Source_Original", Retrieve(StreamKind, StreamPos_To, "Source"), true);
- Fill(StreamKind, StreamPos_To, "Source", Source_Temp, true);
- Fill(StreamKind, StreamPos_To, "Source_Original_Kind", Retrieve(StreamKind, StreamPos_To, "Source_Kind"), true);
- Fill(StreamKind, StreamPos_To, "Source_Kind", Source_Info_Temp, true);
- Fill(StreamKind, StreamPos_To, "Source_Original_Info", Retrieve(StreamKind, StreamPos_To, "Source_Info"), true);
- Fill(StreamKind, StreamPos_To, "Source_Info", Source_Info_Temp, true);
- }
-
- Fill(StreamKind, StreamPos_To, (size_t)General_Count, Count_Get(StreamKind, StreamPos_To), 10, true);
- return 1;
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Analyze::Video_FrameRate_Rounding(size_t Pos, video Parameter)
-{
- float64 FrameRate=Retrieve(Stream_Video, Pos, Parameter).To_float64();
- float64 FrameRate_Sav=FrameRate;
-
- if (FrameRate> 9.990 && FrameRate<=10.010) FrameRate=10.000;
- else if (FrameRate>14.990 && FrameRate<=15.010) FrameRate=15.000;
- else if (FrameRate>23.952 && FrameRate<=23.988) FrameRate=23.976;
- else if (FrameRate>23.988 && FrameRate<=24.024) FrameRate=24.000;
- else if (FrameRate>24.975 && FrameRate<=25.025) FrameRate=25.000;
- else if (FrameRate>29.940 && FrameRate<=29.985) FrameRate=29.970;
- else if (FrameRate>29.970 && FrameRate<=30.030) FrameRate=30.000;
- else if (FrameRate>23.952*2 && FrameRate<=23.988*2) FrameRate=23.976*2;
- else if (FrameRate>23.988*2 && FrameRate<=24.024*2) FrameRate=24.000*2;
- else if (FrameRate>24.975*2 && FrameRate<=25.025*2) FrameRate=25.000*2;
- else if (FrameRate>29.940*2 && FrameRate<=29.985*2) FrameRate=29.970*2;
- else if (FrameRate>29.970*2 && FrameRate<=30.030*2) FrameRate=30.000*2;
-
- if (FrameRate!=FrameRate_Sav)
- Fill(Stream_Video, Pos, Parameter, FrameRate, 3, true);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Video_BitRate_Rounding(size_t Pos, video Parameter)
-{
- const Ztring& Format=Retrieve(Stream_Video, Pos, Video_Format);
- int32u BitRate=Retrieve(Stream_Video, Pos, Parameter).To_int32u();
- int32u BitRate_Sav=BitRate;
- if (Format==__T("AVC"))
- {
- if (BitRate>= 54942720 && BitRate<= 57185280) BitRate= 56064000; //AVC-INTRA50
- if (BitRate>=111390720 && BitRate<=115937280) BitRate=113664000; //AVC-INTRA100
- }
-
- if (BitRate!=BitRate_Sav)
- Fill(Stream_Video, Pos, Parameter, BitRate, 0, true);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Audio_BitRate_Rounding(size_t Pos, audio Parameter)
-{
- const Ztring& Format=Retrieve(Stream_Audio, Pos, Audio_Format);
- const Ztring& Codec=Retrieve(Stream_Audio, Pos, Audio_Codec);
- int32u BitRate=Retrieve(Stream_Audio, Pos, Parameter).To_int32u();
- int32u BitRate_Sav=BitRate;
- if (MediaInfoLib::Config.Codec_Get(Codec, InfoCodec_KindofCodec, Stream_Audio).find(__T("MPEG-"))==0
- || Retrieve(Stream_Audio, Pos, Audio_Codec_String).find(__T("MPEG-"))==0)
- {
- if (BitRate>= 7500 && BitRate<= 8500) BitRate= 8000;
- if (BitRate>= 15000 && BitRate<= 17000) BitRate= 16000;
- if (BitRate>= 23000 && BitRate<= 25000) BitRate= 24000;
- if (BitRate>= 31000 && BitRate<= 33000) BitRate= 32000;
- if (BitRate>= 38000 && BitRate<= 42000) BitRate= 40000;
- if (BitRate>= 46000 && BitRate<= 50000) BitRate= 48000;
- if (BitRate>= 54000 && BitRate<= 58000) BitRate= 56000;
- if (BitRate>= 62720 && BitRate<= 65280) BitRate= 64000;
- if (BitRate>= 78400 && BitRate<= 81600) BitRate= 80000;
- if (BitRate>= 94080 && BitRate<= 97920) BitRate= 96000;
- if (BitRate>= 109760 && BitRate<= 114240) BitRate= 112000;
- if (BitRate>= 125440 && BitRate<= 130560) BitRate= 128000;
- if (BitRate>= 156800 && BitRate<= 163200) BitRate= 160000;
- if (BitRate>= 156800 && BitRate<= 163200) BitRate= 160000;
- if (BitRate>= 188160 && BitRate<= 195840) BitRate= 192000;
- if (BitRate>= 219520 && BitRate<= 228480) BitRate= 224000;
- if (BitRate>= 219520 && BitRate<= 228480) BitRate= 224000;
- if (BitRate>= 250880 && BitRate<= 261120) BitRate= 256000;
- if (BitRate>= 282240 && BitRate<= 293760) BitRate= 288000;
- if (BitRate>= 313600 && BitRate<= 326400) BitRate= 320000;
- if (BitRate>= 344960 && BitRate<= 359040) BitRate= 352000;
- if (BitRate>= 376320 && BitRate<= 391680) BitRate= 384000;
- if (BitRate>= 407680 && BitRate<= 424320) BitRate= 416000;
- if (BitRate>= 439040 && BitRate<= 456960) BitRate= 448000;
- if (Retrieve(Stream_Audio, Pos, "BitRate_Mode")==__T("VBR"))
- BitRate=BitRate_Sav; //If VBR, we want the exact value
- }
-
- else if (MediaInfoLib::Config.Codec_Get(Codec, InfoCodec_Name, Stream_Audio).find(__T("AC3"))==0)
- {
- if (BitRate>= 31000 && BitRate<= 33000) BitRate= 32000;
- if (BitRate>= 39000 && BitRate<= 41000) BitRate= 40000;
- if (BitRate>= 46000 && BitRate<= 50000) BitRate= 48000;
- if (BitRate>= 54000 && BitRate<= 58000) BitRate= 56000;
- if (BitRate>= 62720 && BitRate<= 65280) BitRate= 64000;
- if (BitRate>= 78400 && BitRate<= 81600) BitRate= 80000;
- if (BitRate>= 94080 && BitRate<= 97920) BitRate= 96000;
- if (BitRate>= 109760 && BitRate<= 114240) BitRate= 112000;
- if (BitRate>= 125440 && BitRate<= 130560) BitRate= 128000;
- if (BitRate>= 156800 && BitRate<= 163200) BitRate= 160000;
- if (BitRate>= 188160 && BitRate<= 195840) BitRate= 192000;
- if (BitRate>= 219520 && BitRate<= 228480) BitRate= 224000;
- if (BitRate>= 250880 && BitRate<= 261120) BitRate= 256000;
- if (BitRate>= 313600 && BitRate<= 326400) BitRate= 320000;
- if (BitRate>= 376320 && BitRate<= 391680) BitRate= 384000;
- if (BitRate>= 439040 && BitRate<= 456960) BitRate= 448000;
- if (BitRate>= 501760 && BitRate<= 522240) BitRate= 512000;
- if (BitRate>= 564480 && BitRate<= 587520) BitRate= 576000;
- if (BitRate>= 627200 && BitRate<= 652800) BitRate= 640000;
- }
-
- else if (MediaInfoLib::Config.Codec_Get(Codec, InfoCodec_Name, Stream_Audio).find(__T("DTS"))==0)
- {
- if (BitRate>= 31000 && BitRate<= 33000) BitRate= 32000;
- if (BitRate>= 54000 && BitRate<= 58000) BitRate= 56000;
- if (BitRate>= 62720 && BitRate<= 65280) BitRate= 64000;
- if (BitRate>= 94080 && BitRate<= 97920) BitRate= 96000;
- if (BitRate>= 109760 && BitRate<= 114240) BitRate= 112000;
- if (BitRate>= 125440 && BitRate<= 130560) BitRate= 128000;
- if (BitRate>= 188160 && BitRate<= 195840) BitRate= 192000;
- if (BitRate>= 219520 && BitRate<= 228480) BitRate= 224000;
- if (BitRate>= 250880 && BitRate<= 261120) BitRate= 256000;
- if (BitRate>= 313600 && BitRate<= 326400) BitRate= 320000;
- if (BitRate>= 376320 && BitRate<= 391680) BitRate= 384000;
- if (BitRate>= 439040 && BitRate<= 456960) BitRate= 448000;
- if (BitRate>= 501760 && BitRate<= 522240) BitRate= 512000;
- if (BitRate>= 564480 && BitRate<= 587520) BitRate= 576000;
- if (BitRate>= 627200 && BitRate<= 652800) BitRate= 640000;
- if (BitRate>= 752640 && BitRate<= 783360) BitRate= 768000;
- if (BitRate>= 940800 && BitRate<= 979200) BitRate= 960000;
- if (BitRate>=1003520 && BitRate<=1044480) BitRate=1024000;
- if (BitRate>=1128960 && BitRate<=1175040) BitRate=1152000;
- if (BitRate>=1254400 && BitRate<=1305600) BitRate=1280000;
- if (BitRate>=1317120 && BitRate<=1370880) BitRate=1344000;
- if (BitRate>=1379840 && BitRate<=1436160) BitRate=1408000;
- if (BitRate>=1382976 && BitRate<=1439424) BitRate=1411200;
- if (BitRate>=1442560 && BitRate<=1501440) BitRate=1472000;
- if (BitRate>=1505280 && BitRate<=1566720) BitRate=1536000;
- if (BitRate>=1881600 && BitRate<=1958400) BitRate=1920000;
- if (BitRate>=2007040 && BitRate<=2088960) BitRate=2048000;
- if (BitRate>=3010560 && BitRate<=3133440) BitRate=3072000;
- if (BitRate>=3763200 && BitRate<=3916800) BitRate=3840000;
- }
-
- else if (Codec.find(__T("AAC"))==0 || MediaInfoLib::Config.Codec_Get(Codec, InfoCodec_Name, Stream_Audio).find(__T("AAC"))==0)
- {
- if (BitRate>= 46000 && BitRate<= 50000) BitRate= 48000;
- if (BitRate>= 64827 && BitRate<= 67473) BitRate= 66150;
- if (BitRate>= 70560 && BitRate<= 73440) BitRate= 72000;
- if (BitRate>= 94080 && BitRate<= 97920) BitRate= 96000;
- if (BitRate>= 94080 && BitRate<= 97920) BitRate= 96000;
- if (BitRate>= 129654 && BitRate<= 134946) BitRate= 132300;
- if (BitRate>= 141120 && BitRate<= 146880) BitRate= 144000;
- if (BitRate>= 188160 && BitRate<= 195840) BitRate= 192000;
- if (BitRate>= 259308 && BitRate<= 269892) BitRate= 264600;
- if (BitRate>= 282240 && BitRate<= 293760) BitRate= 288000;
- if (BitRate>= 345744 && BitRate<= 359856) BitRate= 352800;
- if (BitRate>= 376320 && BitRate<= 391680) BitRate= 384000;
- if (BitRate>= 518616 && BitRate<= 539784) BitRate= 529200;
- if (BitRate>= 564480 && BitRate<= 587520) BitRate= 576000;
- if (BitRate>= 648270 && BitRate<= 674730) BitRate= 661500;
- }
-
- else if (Codec==__T("PCM") || Codec==__T("QDM2") || MediaInfoLib::Config.Codec_Get(Codec, InfoCodec_Name, Stream_Audio).find(__T("PCM"))==0)
- {
- if (BitRate>= 62720 && BitRate<= 65280) BitRate= 64000;
- if (BitRate>= 86436 && BitRate<= 89964) BitRate= 88200;
- if (BitRate>= 125440 && BitRate<= 130560) BitRate= 128000;
- if (BitRate>= 172872 && BitRate<= 179928) BitRate= 176400;
- if (BitRate>= 188160 && BitRate<= 195840) BitRate= 192000;
- if (BitRate>= 250880 && BitRate<= 261120) BitRate= 256000;
- if (BitRate>= 345744 && BitRate<= 359856) BitRate= 352800;
- if (BitRate>= 376320 && BitRate<= 391680) BitRate= 384000;
- if (BitRate>= 501760 && BitRate<= 522240) BitRate= 512000;
- if (BitRate>= 691488 && BitRate<= 719712) BitRate= 705600;
- if (BitRate>= 752640 && BitRate<= 783360) BitRate= 768000;
- if (BitRate>=1003520 && BitRate<=1044480) BitRate=1024000;
- if (BitRate>=1128960 && BitRate<=1175040) BitRate=1152000;
- if (BitRate>=1382976 && BitRate<=1439424) BitRate=1411200;
- if (BitRate>=1505280 && BitRate<=1566720) BitRate=1536000;
- if (BitRate>=4515840 && BitRate<=4700160) BitRate=4608000;
- if (BitRate>=6021120 && BitRate<=6266880) BitRate=6144000;
- }
-
- else if (MediaInfoLib::Config.Codec_Get(Codec, InfoCodec_Name, Stream_Audio).find(__T("ADPCM"))==0
- || MediaInfoLib::Config.Codec_Get(Codec, InfoCodec_Name, Stream_Audio).find(__T("U-Law"))==0
- || MediaInfoLib::Config.Codec_Get(Codec, InfoCodec_KindofCodec, Stream_Audio)==__T("ADPCM")
- || MediaInfoLib::Config.Codec_Get(Codec, InfoCodec_KindofCodec, Stream_Audio)==__T("U-Law")
- || Format==__T("ADPCM"))
- {
- if (BitRate>= 42000 && BitRate<= 46000) BitRate= 44100;
- if (BitRate>= 62720 && BitRate<= 65280) BitRate= 64000;
- if (BitRate>= 86436 && BitRate<= 89964) BitRate= 88200;
- if (BitRate>= 125440 && BitRate<= 130560) BitRate= 128000;
- if (BitRate>= 172872 && BitRate<= 179928) BitRate= 176400;
- if (BitRate>= 188160 && BitRate<= 195840) BitRate= 192000;
- if (BitRate>= 250880 && BitRate<= 261120) BitRate= 256000;
- if (BitRate>= 345744 && BitRate<= 359856) BitRate= 352800;
- if (BitRate>= 376320 && BitRate<= 391680) BitRate= 384000;
- }
-
- if (BitRate!=BitRate_Sav)
- Fill(Stream_Audio, Pos, Parameter, BitRate, 0, true);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Tags()
-{
- //Integrity
- if (!Count_Get(Stream_General))
- return;
-
- //-Movie/Album
- if (!Retrieve(Stream_General, 0, General_Title).empty() && Retrieve(Stream_General, 0, General_Movie).empty() && Retrieve(Stream_General, 0, General_Track).empty())
- {
- if (Count_Get(Stream_Video) && Retrieve(Stream_General, 0, General_Collection).empty())
- Fill(Stream_General, 0, "Movie", Retrieve(Stream_General, 0, General_Title));
- else
- Fill(Stream_General, 0, "Track", Retrieve(Stream_General, 0, General_Title));
- }
- if (!Retrieve(Stream_General, 0, General_Title_More).empty() && Retrieve(Stream_General, 0, General_Movie_More).empty() && Retrieve(Stream_General, 0, General_Track_More).empty())
- {
- if (Count_Get(Stream_Video) && Retrieve(Stream_General, 0, General_Collection).empty())
- Fill(Stream_General, 0, "Movie/More", Retrieve(Stream_General, 0, General_Title_More));
- else
- Fill(Stream_General, 0, "Track/More", Retrieve(Stream_General, 0, General_Title_More));
- }
- if (!Retrieve(Stream_General, 0, General_Title_Url).empty() && Retrieve(Stream_General, 0, General_Movie_Url).empty() && Retrieve(Stream_General, 0, General_Track_Url).empty())
- {
- if (Count_Get(Stream_Video) && Retrieve(Stream_General, 0, General_Collection).empty())
- Fill(Stream_General, 0, "Movie/Url", Retrieve(Stream_General, 0, General_Title_Url));
- else
- Fill(Stream_General, 0, "Track/Url", Retrieve(Stream_General, 0, General_Title_Url));
- }
- //-Title
- if (Retrieve(Stream_General, 0, General_Title).empty() && !Retrieve(Stream_General, 0, General_Movie).empty())
- Fill(Stream_General, 0, "Title", Retrieve(Stream_General, 0, General_Movie));
- if (Retrieve(Stream_General, 0, General_Title).empty() && !Retrieve(Stream_General, 0, General_Track).empty())
- Fill(Stream_General, 0, "Title", Retrieve(Stream_General, 0, General_Track));
- if (Retrieve(Stream_General, 0, General_Title_More).empty() && !Retrieve(Stream_General, 0, General_Movie_More).empty())
- Fill(Stream_General, 0, "Title/More", Retrieve(Stream_General, 0, General_Movie_More));
- if (Retrieve(Stream_General, 0, General_Title_More).empty() && !Retrieve(Stream_General, 0, General_Track_More).empty())
- Fill(Stream_General, 0, "Title/More", Retrieve(Stream_General, 0, General_Track_More));
- if (Retrieve(Stream_General, 0, General_Title_Url).empty() && !Retrieve(Stream_General, 0, General_Movie_Url).empty())
- Fill(Stream_General, 0, "Title/Url", Retrieve(Stream_General, 0, General_Movie_Url));
- if (Retrieve(Stream_General, 0, General_Title_Url).empty() && !Retrieve(Stream_General, 0, General_Track_Url).empty())
- Fill(Stream_General, 0, "Title/Url", Retrieve(Stream_General, 0, General_Track_Url));
-
- //-Genre
- if (!Retrieve(Stream_General, 0, General_Genre).empty() && Retrieve(Stream_General, 0, General_Genre).size()<4 && Retrieve(Stream_General, 0, General_Genre)[0]>=__T('0') && Retrieve(Stream_General, 0, General_Genre)[0]<=__T('9'))
- {
- Ztring Genre;
- if (Retrieve(Stream_General, 0, General_Genre).size()==1) Genre=Ztring(__T("Genre_00"))+Retrieve(Stream_General, 0, General_Genre);
- if (Retrieve(Stream_General, 0, General_Genre).size()==2) Genre=Ztring(__T("Genre_0" ))+Retrieve(Stream_General, 0, General_Genre);
- if (Retrieve(Stream_General, 0, General_Genre).size()==3) Genre=Ztring(__T("Genre_" ))+Retrieve(Stream_General, 0, General_Genre);
- Fill(Stream_General, 0, "Genre", MediaInfoLib::Config.Language_Get(Genre), true);
- }
-}
-
-//***************************************************************************
-// Internal Functions
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//Duration
-void File__Analyze::Duration_Duration123(stream_t StreamKind, size_t StreamPos, size_t Parameter)
-{
- if (Retrieve(StreamKind, StreamPos, Parameter).empty())
- return;
-
- //Clearing old data
- Clear(StreamKind, StreamPos, Parameter+1);
- Clear(StreamKind, StreamPos, Parameter+2);
- Clear(StreamKind, StreamPos, Parameter+3);
- Clear(StreamKind, StreamPos, Parameter+4);
- Clear(StreamKind, StreamPos, Parameter+5);
- Clear(StreamKind, StreamPos, Parameter+6);
-
- //Retrieving multiple values
- ZtringList List;
- List.Separator_Set(0, __T(" / "));
- List.Write(Retrieve(StreamKind, StreamPos, Parameter));
-
- //Per value
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- int32s HH, MM, Sec, MS;
- Ztring DurationString1, DurationString2, DurationString3;
- bool Negative=false;
- MS=List[Pos].To_int32s(); //in ms
-
- if (MS<0)
- {
- Negative=true;
- MS=-MS;
- }
-
- //Hours
- HH=MS/1000/60/60; //h
- if (HH>0)
- {
- DurationString1+=Ztring::ToZtring(HH)+MediaInfoLib::Config.Language_Get(__T("h"));
- DurationString2+=Ztring::ToZtring(HH)+MediaInfoLib::Config.Language_Get(__T("h"));
- if (HH<10)
- DurationString3+=Ztring(__T("0"))+Ztring::ToZtring(HH)+__T(":");
- else
- DurationString3+=Ztring::ToZtring(HH)+__T(":");
- MS-=HH*60*60*1000;
- }
- else
- {
- DurationString3+=__T("00:");
- }
-
- //Minutes
- MM=MS/1000/60; //mn
- if (MM>0 || HH>0)
- {
- if (DurationString1.size()>0)
- DurationString1+=__T(" ");
- DurationString1+=Ztring::ToZtring(MM)+MediaInfoLib::Config.Language_Get(__T("mn"));
- if (DurationString2.size()<5)
- {
- if (DurationString2.size()>0)
- DurationString2+=__T(" ");
- DurationString2+=Ztring::ToZtring(MM)+MediaInfoLib::Config.Language_Get(__T("mn"));
- }
- if (MM<10)
- DurationString3+=Ztring(__T("0"))+Ztring::ToZtring(MM)+__T(":");
- else
- DurationString3+=Ztring::ToZtring(MM)+__T(":");
- MS-=MM*60*1000;
- }
- else
- {
- DurationString3+=__T("00:");
- }
-
- //Seconds
- Sec=MS/1000; //s
- if (Sec>0 || MM>0 || HH>0)
- {
- if (DurationString1.size()>0)
- DurationString1+=__T(" ");
- DurationString1+=Ztring::ToZtring(Sec)+MediaInfoLib::Config.Language_Get(__T("s"));
- if (DurationString2.size()<5)
- {
- if (DurationString2.size()>0)
- DurationString2+=__T(" ");
- DurationString2+=Ztring::ToZtring(Sec)+MediaInfoLib::Config.Language_Get(__T("s"));
- }
- else if (DurationString2.size()==0)
- DurationString2+=Ztring::ToZtring(Sec)+MediaInfoLib::Config.Language_Get(__T("s"));
- if (Sec<10)
- DurationString3+=Ztring(__T("0"))+Ztring::ToZtring(Sec)+__T(".");
- else
- DurationString3+=Ztring::ToZtring(Sec)+__T(".");
- MS-=Sec*1000;
- }
- else
- {
- DurationString3+=__T("00.");
- }
-
- //Milliseconds
- if (MS>0 || Sec>0 || MM>0 || HH>0)
- {
- if (DurationString1.size()>0)
- DurationString1+=__T(" ");
- DurationString1+=Ztring::ToZtring(MS)+MediaInfoLib::Config.Language_Get(__T("ms"));
- if (DurationString2.size()<5)
- {
- if (DurationString2.size()>0)
- DurationString2+=__T(" ");
- DurationString2+=Ztring::ToZtring(MS)+MediaInfoLib::Config.Language_Get(__T("ms"));
- }
- if (MS<10)
- DurationString3+=Ztring(__T("00"))+Ztring::ToZtring(MS);
- else if (MS<100)
- DurationString3+=Ztring(__T("0"))+Ztring::ToZtring(MS);
- else
- DurationString3+=Ztring::ToZtring(MS);
- }
- else
- {
- DurationString3+=__T("000");
- }
-
- if (Negative)
- {
- DurationString1=Ztring(__T("-"))+DurationString1;
- DurationString2=Ztring(__T("-"))+DurationString2;
- DurationString3=Ztring(__T("-"))+DurationString3;
- }
-
- Fill(StreamKind, StreamPos, Parameter+1, DurationString2); // /String
- Fill(StreamKind, StreamPos, Parameter+2, DurationString1); // /String1
- Fill(StreamKind, StreamPos, Parameter+3, DurationString2); // /String2
- Fill(StreamKind, StreamPos, Parameter+4, DurationString3); // /String3
-
- if (Parameter==Fill_Parameter(StreamKind, Generic_Duration))
- {
- Ztring DurationString4;
- Ztring FrameRateS=Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_FrameRate));
- Ztring FrameCountS=Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_FrameCount));
- if (!FrameRateS.empty() && !FrameCountS.empty() && FrameRateS.To_int64u() && FrameRateS.To_int64u()<256)
- {
- bool DropFrame=false;
- bool DropFrame_IsValid=false;
-
- // Testing time code
- if (StreamKind==Stream_Video)
- {
- Ztring TC=Retrieve(Stream_Video, StreamPos, Video_TimeCode_FirstFrame);
- if (TC.size()>=11 && TC[2]==__T(':') && TC[5]==__T(':'))
- {
- switch (TC[8])
- {
- case __T(':'):
- DropFrame=false;
- DropFrame_IsValid=true;
- break;
- case __T(';'):
- DropFrame=true;
- DropFrame_IsValid=true;
- break;
- default : ;
- }
- }
- }
-
- // Testing delay
- if (!DropFrame_IsValid)
- {
- Ztring TC=Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Delay_Original_DropFrame));
- if (TC.size()>=11 && TC[2]==__T(':') && TC[5]==__T(':'))
- {
- switch (TC[8])
- {
- case __T(':'):
- DropFrame=false;
- DropFrame_IsValid=true;
- break;
- case __T(';'):
- DropFrame=true;
- DropFrame_IsValid=true;
- break;
- default : ;
- }
- }
- }
-
- // Testing time code track
- if (!DropFrame_IsValid)
- {
- for (size_t Step=Retrieve(Stream_General, 0, General_Format)==__T("MXF")?0:1; Step<2; ++Step)
- {
- for (size_t TC_Pos=0; TC_Pos<Count_Get(Stream_Other); ++TC_Pos)
- if (Retrieve(Stream_Other, TC_Pos, Other_Type)==__T("Time code")
- && (Step || Retrieve(Stream_Other, TC_Pos, Other_TimeCode_Settings)==__T("Source Package")))
- {
- Ztring TC=Retrieve(Stream_Other, TC_Pos, Other_TimeCode_FirstFrame);
- if (TC.size()>=11 && TC[2]==__T(':') && TC[5]==__T(':'))
- {
- switch (TC[8])
- {
- case __T(':'):
- DropFrame=false;
- DropFrame_IsValid=true;
- break;
- case __T(';'):
- DropFrame=true;
- DropFrame_IsValid=true;
- break;
- default : ;
- }
- }
-
- if (DropFrame_IsValid)
- break; //Using first time code track
- }
-
- if (DropFrame_IsValid)
- break; //Using first time code track
- }
- }
-
- // Testing frame rate (1/1001)
- if (!DropFrame_IsValid)
- {
- float32 FrameRateF=FrameRateS.To_float32();
- int32s FrameRateI=float32_int32s(FrameRateS.To_float32());
- float FrameRateF_Min=((float32)FrameRateI)/((float32)1.002);
- float FrameRateF_Max=(float32)FrameRateI;
- if (FrameRateF>=FrameRateF_Min && FrameRateF<FrameRateF_Max)
- DropFrame=true;
- else
- DropFrame=false;
- }
-
- TimeCode TC(FrameCountS.To_int64s(), (int8u)float32_int32s(FrameRateS.To_float32()), DropFrame);
- DurationString4.From_UTF8(TC.ToString());
-
- Fill(StreamKind, StreamPos, Parameter+5, DurationString4); // /String4
- }
- Ztring DurationString5(DurationString3);
- if (!DurationString4.empty())
- {
- DurationString5+=__T(' ');
- DurationString5+=__T('(');
- DurationString5+=DurationString4;
- DurationString5+=__T(')');
- }
- Fill(StreamKind, StreamPos, Parameter+6, DurationString5); // /String5
- }
- }
-}
-
-//---------------------------------------------------------------------------
-//FileSize
-void File__Analyze::FileSize_FileSize123(stream_t StreamKind, size_t StreamPos, size_t Parameter)
-{
- if (Retrieve(StreamKind, StreamPos, Parameter).empty())
- return;
-
- float F1=(float)Retrieve(StreamKind, StreamPos, Parameter).To_int64s(); //Video C++ 6 patch, should be int64u
-
- //--Bytes, KiB, MiB or GiB...
- int32u Pow3=0;
- while(F1>=1024)
- {
- F1/=1024;
- Pow3++;
- }
- //--Count of digits
- int8u I2, I3, I4;
- if (F1>=100)
- {
- I2=0;
- I3=0;
- I4=1;
- }
- else if (F1>=10)
- {
- I2=0;
- I3=1;
- I4=2;
- }
- else //if (F1>=1)
- {
- I2=1;
- I3=2;
- I4=3;
- }
- Ztring Measure; bool MeasureIsAlwaysSame;
- switch (Pow3)
- {
- case 0 : Measure=__T(" Byte"); MeasureIsAlwaysSame=false; break;
- case 1 : Measure=__T(" KiB"); MeasureIsAlwaysSame=true; break;
- case 2 : Measure=__T(" MiB"); MeasureIsAlwaysSame=true; break;
- case 3 : Measure=__T(" GiB"); MeasureIsAlwaysSame=true; break;
- case 4 : Measure=__T(" TiB"); MeasureIsAlwaysSame=true; break;
- default : Measure=__T(" ?iB"); MeasureIsAlwaysSame=true;
- }
- Fill(StreamKind, StreamPos, Parameter+2, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(F1, 0), Measure, MeasureIsAlwaysSame), true); // /String1
- Fill(StreamKind, StreamPos, Parameter+3, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(F1, I2), Measure, MeasureIsAlwaysSame), true); // /String2
- Fill(StreamKind, StreamPos, Parameter+4, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(F1, I3), Measure, MeasureIsAlwaysSame), true); // /String3
- Fill(StreamKind, StreamPos, Parameter+5, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(F1, I4), Measure, MeasureIsAlwaysSame), true); // /String4
- float64 F2=(float)Retrieve(StreamKind, StreamPos, Parameter).To_float64();
- float64 File_Size_WithReferencedFiles=(float)Retrieve(Stream_General, 0, General_FileSize).To_float64();
- if (File_Size_WithReferencedFiles>0 && Parameter==Fill_Parameter(StreamKind, Generic_StreamSize) && F2*100/File_Size_WithReferencedFiles<=100)
- {
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_StreamSize_Proportion), F2/File_Size_WithReferencedFiles, 5, true);
- Fill(StreamKind, StreamPos, Parameter+6, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(F1, I3), Measure, MeasureIsAlwaysSame)+__T(" (")+Ztring::ToZtring(F2*100/File_Size_WithReferencedFiles, 0)+__T("%)"), true); // /String5
- Fill(StreamKind, StreamPos, Parameter+1, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(F1, I3), Measure, MeasureIsAlwaysSame)+__T(" (")+Ztring::ToZtring(F2*100/File_Size_WithReferencedFiles, 0)+__T("%)"), true);
- }
- else if (File_Size_WithReferencedFiles>0 && Parameter==Fill_Parameter(StreamKind, Generic_StreamSize_Encoded) && F2*100/File_Size_WithReferencedFiles<=100)
- {
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_StreamSize_Encoded_Proportion), F2/File_Size_WithReferencedFiles, 5, true);
- Fill(StreamKind, StreamPos, Parameter+6, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(F1, I3), Measure, MeasureIsAlwaysSame)+__T(" (")+Ztring::ToZtring(F2*100/File_Size_WithReferencedFiles, 0)+__T("%)"), true); // /String5
- Fill(StreamKind, StreamPos, Parameter+1, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(F1, I3), Measure, MeasureIsAlwaysSame)+__T(" (")+Ztring::ToZtring(F2*100/File_Size_WithReferencedFiles, 0)+__T("%)"), true);
- }
- else if (File_Size_WithReferencedFiles>0 && Parameter==Fill_Parameter(StreamKind, Generic_Source_StreamSize) && F2*100/File_Size_WithReferencedFiles<=100)
- {
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Source_StreamSize_Proportion), F2/File_Size_WithReferencedFiles, 5, true);
- Fill(StreamKind, StreamPos, Parameter+6, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(F1, I3), Measure, MeasureIsAlwaysSame)+__T(" (")+Ztring::ToZtring(F2*100/File_Size_WithReferencedFiles, 0)+__T("%)"), true); // /String5
- Fill(StreamKind, StreamPos, Parameter+1, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(F1, I3), Measure, MeasureIsAlwaysSame)+__T(" (")+Ztring::ToZtring(F2*100/File_Size_WithReferencedFiles, 0)+__T("%)"), true);
- }
- else if (File_Size_WithReferencedFiles>0 && Parameter==Fill_Parameter(StreamKind, Generic_Source_StreamSize_Encoded) && F2*100/File_Size_WithReferencedFiles<=100)
- {
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Source_StreamSize_Encoded_Proportion), F2/File_Size_WithReferencedFiles, 5, true);
- Fill(StreamKind, StreamPos, Parameter+6, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(F1, I3), Measure, MeasureIsAlwaysSame)+__T(" (")+Ztring::ToZtring(F2*100/File_Size_WithReferencedFiles, 0)+__T("%)"), true); // /String5
- Fill(StreamKind, StreamPos, Parameter+1, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(F1, I3), Measure, MeasureIsAlwaysSame)+__T(" (")+Ztring::ToZtring(F2*100/File_Size_WithReferencedFiles, 0)+__T("%)"), true);
- }
- else
- Fill(StreamKind, StreamPos, Parameter+1, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(F1, I3), Measure, MeasureIsAlwaysSame), true);
-}
-
-//---------------------------------------------------------------------------
-//FileSize
-void File__Analyze::Kilo_Kilo123(stream_t StreamKind, size_t StreamPos, size_t Parameter)
-{
- if (Retrieve(StreamKind, StreamPos, Parameter).empty())
- return;
-
- //Clearing old data
- Clear(StreamKind, StreamPos, Parameter+1);
-
- //Retrieving multiple values
- ZtringList List;
- List.Separator_Set(0, __T(" / "));
- List.Write(Retrieve(StreamKind, StreamPos, Parameter));
-
- //Per value
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- int64u BitRate=List[Pos].To_int64u();
-
- //Text
- if (BitRate==0 && (List[Pos].empty() || List[Pos][0]>__T('9')))
- {
- Fill(StreamKind, StreamPos, Parameter+1, MediaInfoLib::Config.Language_Get(List[Pos]));
- }
- else
- {
- //Well known values
- Ztring BitRateS;
- if (StreamKind==Stream_Audio)
- {
- if (Parameter==Audio_BitRate
- && (Retrieve(Stream_Audio, StreamPos, Audio_Format)==__T("PCM")
- || Retrieve(Stream_Audio, StreamPos, Audio_Format)==__T("ADPCM")
- || Retrieve(Stream_Audio, StreamPos, Audio_Format)==__T("U-Law")
- || Retrieve(Stream_Audio, StreamPos, Audio_Format)==__T("Qdesign 1")
- || Retrieve(Stream_Audio, StreamPos, Audio_Format)==__T("Qdesign 2")
- || Retrieve(Stream_Audio, StreamPos, Audio_Format)==__T("DTS")))
- {
- if (BitRate== 66150) BitRateS= "66.15";
- if (BitRate== 132300) BitRateS= "132.3";
- if (BitRate== 176400) BitRateS= "176.4";
- if (BitRate== 264600) BitRateS= "264.6";
- if (BitRate== 352800) BitRateS= "352.8";
- if (BitRate== 529200) BitRateS= "529.2";
- if (BitRate== 705600) BitRateS= "705.6";
- if (BitRate==1411200) BitRateS="1411.2";
- }
- if (Parameter==Audio_SamplingRate)
- {
- if (BitRate== 11024) BitRateS= "11.024";
- if (BitRate== 11025) BitRateS= "11.025";
- if (BitRate== 22050) BitRateS= "22.05";
- if (BitRate== 44100) BitRateS= "44.1";
- if (BitRate== 88200) BitRateS= "88.2";
- if (BitRate== 176400) BitRateS= "176.4";
- if (BitRate== 352800) BitRateS= "352.8";
- }
- }
- if (!BitRateS.empty())
- {
- Ztring Measure=MediaInfoLib::Config.Info_Get(StreamKind).Read(Parameter, Info_Measure);
- Measure.insert(1, __T("K"));
- Fill(StreamKind, StreamPos, Parameter+1, MediaInfoLib::Config.Language_Get(BitRateS, Measure, true));
- }
- else
- {
- //Standard
- if (BitRate>10000000000LL)
- {
- Ztring Measure=MediaInfoLib::Config.Info_Get(StreamKind).Read(Parameter, Info_Measure);
- Measure.insert(1, __T("G"));
- Fill(StreamKind, StreamPos, Parameter+1, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(((float)BitRate)/1000000000, BitRate>100000000000LL?0:1), Measure, true));
- }
- else if (BitRate>10000000)
- {
- Ztring Measure=MediaInfoLib::Config.Info_Get(StreamKind).Read(Parameter, Info_Measure);
- Measure.insert(1, __T("M"));
- Fill(StreamKind, StreamPos, Parameter+1, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(((float)BitRate)/1000000, BitRate>100000000?0:1), Measure, true));
- }
- else if (BitRate>10000)
- {
- Ztring Measure=MediaInfoLib::Config.Info_Get(StreamKind).Read(Parameter, Info_Measure);
- Measure.insert(1, __T("K"));
- Fill(StreamKind, StreamPos, Parameter+1, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(((float)BitRate)/1000, BitRate>100000?0:1), Measure, true));
- }
- else
- Fill(StreamKind, StreamPos, Parameter+1, MediaInfoLib::Config.Language_Get(Ztring::ToZtring(BitRate), MediaInfoLib::Config.Info_Get(StreamKind).Read(Parameter, Info_Measure), true));
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-//Value --> Value with measure
-void File__Analyze::Value_Value123(stream_t StreamKind, size_t StreamPos, size_t Parameter)
-{
- if (Retrieve(StreamKind, StreamPos, Parameter, Info_Measure).empty())
- return;
-
- //Clearing old data
- Clear(StreamKind, StreamPos, Parameter+1);
-
- //Retrieving multiple values
- ZtringList List;
- List.Separator_Set(0, __T(" / "));
- List.Write(Retrieve(StreamKind, StreamPos, Parameter));
-
- //Per value
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- //Filling
- Fill(StreamKind, StreamPos, Parameter+1, MediaInfoLib::Config.Language_Get(List[Pos], MediaInfoLib::Config.Info_Get(StreamKind).Read(Parameter, Info_Measure)));
- }
-
-}
-
-//---------------------------------------------------------------------------
-//Value --> Yes or No
-void File__Analyze::YesNo_YesNo(stream_t StreamKind, size_t StreamPos, size_t Parameter)
-{
- //Filling
- Fill(StreamKind, StreamPos, Parameter+1, MediaInfoLib::Config.Language_Get(Retrieve(StreamKind, StreamPos, Parameter)), true);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::CodecID_Fill(const Ztring &Value, stream_t StreamKind, size_t StreamPos, infocodecid_format_t Format, stream_t StreamKind_CodecID)
-{
- if (StreamKind_CodecID==Stream_Max)
- StreamKind_CodecID=StreamKind;
-
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_CodecID), Value);
- const Ztring &C1=MediaInfoLib::Config.CodecID_Get(StreamKind_CodecID, Format, Value, InfoCodecID_Format);
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format), C1.empty()?Value:C1, true);
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_CodecID_Info), MediaInfoLib::Config.CodecID_Get(StreamKind_CodecID, Format, Value, InfoCodecID_Description), true);
- Fill(StreamKind, StreamPos, "CodecID/Hint", MediaInfoLib::Config.CodecID_Get(StreamKind_CodecID, Format, Value, InfoCodecID_Hint), true);
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_CodecID_Url), MediaInfoLib::Config.CodecID_Get(StreamKind_CodecID, Format, Value, InfoCodecID_Url), true);
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format_Version), MediaInfoLib::Config.CodecID_Get(StreamKind_CodecID, Format, Value, InfoCodecID_Version), true);
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Format_Profile), MediaInfoLib::Config.CodecID_Get(StreamKind_CodecID, Format, Value, InfoCodecID_Profile), true);
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_ColorSpace), MediaInfoLib::Config.CodecID_Get(StreamKind_CodecID, Format, Value, InfoCodecID_ColorSpace), true);
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_ChromaSubsampling), MediaInfoLib::Config.CodecID_Get(StreamKind_CodecID, Format, Value, InfoCodecID_ChromaSubsampling), true);
- if (Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_BitDepth)).empty())
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_BitDepth), MediaInfoLib::Config.CodecID_Get(StreamKind_CodecID, Format, Value, InfoCodecID_BitDepth), true);
- if (Retrieve(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Compression_Mode)).empty())
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Compression_Mode), MediaInfoLib::Config.CodecID_Get(StreamKind_CodecID, Format, Value, InfoCodecID_Compression_Mode), true);
-
- //Specific cases
- if (Value==__T("v210") || Value==__T("V210"))
- Fill(Stream_Video, StreamPos, Video_BitDepth, 10);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::PixelAspectRatio_Fill(const Ztring &Value, stream_t StreamKind, size_t StreamPos, size_t Parameter_Width, size_t Parameter_Height, size_t Parameter_PixelAspectRatio, size_t Parameter_DisplayAspectRatio)
-{
- if (Value.empty() || !Retrieve(StreamKind, StreamPos, Parameter_DisplayAspectRatio).empty())
- return;
-
- if (Retrieve(StreamKind, StreamPos, Parameter_DisplayAspectRatio).empty())
- {
- float32 PAR=Value.To_float32();
- if (PAR>(float32)12/(float32)11*0.999 && PAR<(float32)12/(float32)11*1.001)
- PAR=(float32)12/(float32)11;
- if (PAR>(float32)10/(float32)11*0.999 && PAR<(float32)10/(float32)11*1.001)
- PAR=(float32)10/(float32)11;
- if (PAR>(float32)16/(float32)11*0.999 && PAR<(float32)16/(float32)11*1.001)
- PAR=(float32)16/(float32)11;
- if (PAR>(float32)40/(float32)33*0.999 && PAR<(float32)40/(float32)33*1.001)
- PAR=(float32)40/(float32)33;
- if (PAR>(float32)24/(float32)11*0.999 && PAR<(float32)24/(float32)11*1.001)
- PAR=(float32)24/(float32)11;
- if (PAR>(float32)20/(float32)11*0.999 && PAR<(float32)20/(float32)11*1.001)
- PAR=(float32)20/(float32)11;
- if (PAR>(float32)32/(float32)11*0.999 && PAR<(float32)32/(float32)11*1.001)
- PAR=(float32)32/(float32)11;
- if (PAR>(float32)80/(float32)33*0.999 && PAR<(float32)80/(float32)33*1.001)
- PAR=(float32)80/(float32)33;
- if (PAR>(float32)18/(float32)11*0.999 && PAR<(float32)18/(float32)11*1.001)
- PAR=(float32)18/(float32)11;
- if (PAR>(float32)15/(float32)11*0.999 && PAR<(float32)15/(float32)11*1.001)
- PAR=(float32)15/(float32)11;
- if (PAR>(float32)64/(float32)33*0.999 && PAR<(float32)64/(float32)33*1.001)
- PAR=(float32)64/(float32)33;
- if (PAR>(float32)160/(float32)99*0.999 && PAR<(float32)160/(float32)99*1.001)
- PAR=(float32)160/(float32)99;
- if (PAR>(float32)4/(float32)3*0.999 && PAR<(float32)4/(float32)3*1.01)
- PAR=(float32)4/(float32)3;
- if (PAR>(float32)3/(float32)2*0.999 && PAR<(float32)3/(float32)2*1.001)
- PAR=(float32)3/(float32)2;
- if (PAR>(float32)2/(float32)1*0.999 && PAR<(float32)2/(float32)1*1.001)
- PAR=(float32)2;
- if (PAR>(float32)59/(float32)54*0.999 && PAR<(float32)59/(float32)54*1.001)
- PAR=(float32)59/(float32)54;
- float32 Width =Retrieve(StreamKind, StreamPos, Parameter_Width ).To_float32();
- float32 Height=Retrieve(StreamKind, StreamPos, Parameter_Height ).To_float32();
- if (PAR && Height && Width)
- Fill(StreamKind, StreamPos, Parameter_DisplayAspectRatio, ((float32)Width)/Height*PAR);
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::DisplayAspectRatio_Fill(const Ztring &Value, stream_t StreamKind, size_t StreamPos, size_t Parameter_Width, size_t Parameter_Height, size_t Parameter_PixelAspectRatio, size_t Parameter_DisplayAspectRatio)
-{
- if (Value.empty())
- return;
-
- float DAR=Value.To_float32();
-
- if (Retrieve(StreamKind, StreamPos, Parameter_PixelAspectRatio).empty())
- {
- float Width =Retrieve(StreamKind, StreamPos, Parameter_Width).To_float32();
- float Height=Retrieve(StreamKind, StreamPos, Parameter_Height).To_float32();
- if (DAR && Height && Width)
- {
- if (Value==__T("1.778"))
- DAR=((float)16)/9; //More exact value
- if (Value==__T("1.333"))
- DAR=((float)4)/3; //More exact value
- Fill(StreamKind, StreamPos, Parameter_PixelAspectRatio, DAR/(((float32)Width)/Height));
- }
- }
-
- // /String version
- Ztring DARS;
- if (DAR>=(float)1.23 && DAR<(float)1.27) DARS=__T("5:4");
- else if (DAR>=(float)1.30 && DAR<(float)1.37) DARS=__T("4:3");
- else if (DAR>=(float)1.45 && DAR<(float)1.55) DARS=__T("3:2");
- else if (DAR>=(float)1.55 && DAR<(float)1.65) DARS=__T("16:10");
- else if (DAR>=(float)1.65 && DAR<(float)1.70) DARS=__T("5:3");
- else if (DAR>=(float)1.74 && DAR<(float)1.82) DARS=__T("16:9");
- else if (DAR>=(float)1.82 && DAR<(float)1.88) DARS=__T("1.85:1");
- else if (DAR>=(float)2.15 && DAR<(float)2.22) DARS=__T("2.2:1");
- else if (DAR>=(float)2.23 && DAR<(float)2.30) DARS=__T("2.25:1");
- else if (DAR>=(float)2.30 && DAR<(float)2.37) DARS=__T("2.35:1");
- else if (DAR>=(float)2.37 && DAR<(float)2.45) DARS=__T("2.40:1");
- else DARS.From_Number(DAR);
- DARS.FindAndReplace(__T("."), MediaInfoLib::Config.Language_Get(__T(" Config_Text_FloatSeparator")));
- if (MediaInfoLib::Config.Language_Get(__T(" Language_ISO639"))==__T("fr") && DARS.find(__T(":1"))==string::npos)
- DARS.FindAndReplace(__T(":"), __T("/"));
- Fill(StreamKind, StreamPos, Parameter_DisplayAspectRatio+1, DARS, true);
-}
-
-//---------------------------------------------------------------------------
-size_t File__Analyze::Fill_Parameter(stream_t StreamKind, generic StreamPos)
-{
- switch (StreamKind)
- {
- case Stream_General :
- switch (StreamPos)
- {
- case Generic_Format : return General_Format;
- case Generic_Format_Info : return General_Format_Info;
- case Generic_Format_Url : return General_Format_Url;
- case Generic_Format_Version : return General_Format_Version;
- case Generic_Format_Commercial : return General_Format_Commercial;
- case Generic_Format_Commercial_IfAny : return General_Format_Commercial_IfAny;
- case Generic_Format_Profile : return General_Format_Profile;
- case Generic_Format_Settings : return General_Format_Settings;
- case Generic_InternetMediaType : return General_InternetMediaType;
- case Generic_CodecID : return General_CodecID;
- case Generic_CodecID_Info : return General_CodecID_Info;
- case Generic_CodecID_Hint : return General_CodecID_Hint;
- case Generic_CodecID_Url : return General_CodecID_Url;
- case Generic_CodecID_Description : return General_CodecID_Description;
- case Generic_Codec : return General_Codec;
- case Generic_Codec_String : return General_Codec_String;
- case Generic_Codec_Info : return General_Codec_Info;
- case Generic_Codec_Url : return General_Codec_Url;
- case Generic_Duration : return General_Duration;
- case Generic_Duration_String : return General_Duration_String;
- case Generic_Duration_String1 : return General_Duration_String1;
- case Generic_Duration_String2 : return General_Duration_String2;
- case Generic_Duration_String3 : return General_Duration_String3;
- case Generic_Duration_String4 : return General_Duration_String4;
- case Generic_Duration_String5 : return General_Duration_String5;
- case Generic_FrameRate : return General_FrameRate;
- case Generic_FrameCount : return General_FrameCount;
- case Generic_Delay : return General_Delay;
- case Generic_Delay_String : return General_Delay_String;
- case Generic_Delay_String1 : return General_Delay_String1;
- case Generic_Delay_String2 : return General_Delay_String2;
- case Generic_Delay_String3 : return General_Delay_String3;
- case Generic_Delay_String4 : return General_Delay_String4;
- case Generic_Delay_String5 : return General_Delay_String5;
- case Generic_Delay_Settings : return General_Delay_Settings;
- case Generic_Delay_DropFrame : return General_Delay_DropFrame;
- case Generic_Delay_Source : return General_Delay_Source;
- case Generic_Delay_Source_String : return General_Delay_Source_String;
- case Generic_StreamSize : return General_StreamSize;
- case Generic_StreamSize_String : return General_StreamSize_String;
- case Generic_StreamSize_String1 : return General_StreamSize_String1;
- case Generic_StreamSize_String2 : return General_StreamSize_String2;
- case Generic_StreamSize_String3 : return General_StreamSize_String3;
- case Generic_StreamSize_String4 : return General_StreamSize_String4;
- case Generic_StreamSize_String5 : return General_StreamSize_String5;
- case Generic_StreamSize_Proportion : return General_StreamSize_Proportion;
- case Generic_ServiceName : return General_ServiceName;
- case Generic_ServiceProvider : return General_ServiceProvider;
- default: return (size_t)-1;
- }
- case Stream_Video :
- switch (StreamPos)
- {
- case Generic_Format : return Video_Format;
- case Generic_Format_Info : return Video_Format_Info;
- case Generic_Format_Url : return Video_Format_Url;
- case Generic_Format_Commercial : return Video_Format_Commercial;
- case Generic_Format_Commercial_IfAny : return Video_Format_Commercial_IfAny;
- case Generic_Format_Version : return Video_Format_Version;
- case Generic_Format_Profile : return Video_Format_Profile;
- case Generic_Format_Settings : return Video_Format_Settings;
- case Generic_InternetMediaType : return Video_InternetMediaType;
- case Generic_CodecID : return Video_CodecID;
- case Generic_CodecID_Info : return Video_CodecID_Info;
- case Generic_CodecID_Hint : return Video_CodecID_Hint;
- case Generic_CodecID_Url : return Video_CodecID_Url;
- case Generic_CodecID_Description : return Video_CodecID_Description;
- case Generic_Codec : return Video_Codec;
- case Generic_Codec_String : return Video_Codec_String;
- case Generic_Codec_Info : return Video_Codec_Info;
- case Generic_Codec_Url : return Video_Codec_Url;
- case Generic_Codec_CC : return Video_Codec_CC;
- case Generic_Duration : return Video_Duration;
- case Generic_Duration_String : return Video_Duration_String;
- case Generic_Duration_String1 : return Video_Duration_String1;
- case Generic_Duration_String2 : return Video_Duration_String2;
- case Generic_Duration_String3 : return Video_Duration_String3;
- case Generic_Duration_String4 : return Video_Duration_String4;
- case Generic_Duration_String5 : return Video_Duration_String5;
- case Generic_Source_Duration : return Video_Source_Duration;
- case Generic_Source_Duration_String : return Video_Source_Duration_String;
- case Generic_Source_Duration_String1 : return Video_Source_Duration_String1;
- case Generic_Source_Duration_String2 : return Video_Source_Duration_String2;
- case Generic_Source_Duration_String3 : return Video_Source_Duration_String3;
- case Generic_Source_Duration_String4 : return Video_Source_Duration_String4;
- case Generic_Source_Duration_String5 : return Video_Source_Duration_String5;
- case Generic_BitRate_Mode : return Video_BitRate_Mode;
- case Generic_BitRate_Mode_String : return Video_BitRate_Mode_String;
- case Generic_BitRate : return Video_BitRate;
- case Generic_BitRate_String : return Video_BitRate_String;
- case Generic_BitRate_Minimum : return Video_BitRate_Minimum;
- case Generic_BitRate_Minimum_String : return Video_BitRate_Minimum_String;
- case Generic_BitRate_Nominal : return Video_BitRate_Nominal;
- case Generic_BitRate_Nominal_String : return Video_BitRate_Nominal_String;
- case Generic_BitRate_Maximum : return Video_BitRate_Maximum;
- case Generic_BitRate_Maximum_String : return Video_BitRate_Maximum_String;
- case Generic_BitRate_Encoded : return Video_BitRate_Encoded;
- case Generic_BitRate_Encoded_String : return Video_BitRate_Encoded_String;
- case Generic_FrameRate : return Video_FrameRate;
- case Generic_FrameCount : return Video_FrameCount;
- case Generic_Source_FrameCount : return Video_Source_FrameCount;
- case Generic_ColorSpace : return Video_ColorSpace;
- case Generic_ChromaSubsampling : return Video_ChromaSubsampling;
- case Generic_Resolution : return Video_Resolution;
- case Generic_Resolution_String : return Video_Resolution_String;
- case Generic_BitDepth : return Video_BitDepth;
- case Generic_BitDepth_String : return Video_BitDepth_String;
- case Generic_Compression_Mode : return Video_Compression_Mode;
- case Generic_Compression_Mode_String : return Video_Compression_Mode_String;
- case Generic_Compression_Ratio : return Video_Compression_Ratio;
- case Generic_Delay : return Video_Delay;
- case Generic_Delay_String : return Video_Delay_String;
- case Generic_Delay_String1 : return Video_Delay_String1;
- case Generic_Delay_String2 : return Video_Delay_String2;
- case Generic_Delay_String3 : return Video_Delay_String3;
- case Generic_Delay_String4 : return Video_Delay_String4;
- case Generic_Delay_String5 : return Video_Delay_String5;
- case Generic_Delay_Settings : return Video_Delay_Settings;
- case Generic_Delay_DropFrame : return Video_Delay_DropFrame;
- case Generic_Delay_Source : return Video_Delay_Source;
- case Generic_Delay_Source_String : return Video_Delay_Source_String;
- case Generic_Delay_Original : return Video_Delay_Original;
- case Generic_Delay_Original_String : return Video_Delay_Original_String;
- case Generic_Delay_Original_String1 : return Video_Delay_Original_String1;
- case Generic_Delay_Original_String2 : return Video_Delay_Original_String2;
- case Generic_Delay_Original_String3 : return Video_Delay_Original_String3;
- case Generic_Delay_Original_String4 : return Video_Delay_Original_String4;
- case Generic_Delay_Original_Settings : return Video_Delay_Original_Settings;
- case Generic_Delay_Original_DropFrame : return Video_Delay_Original_DropFrame;
- case Generic_Delay_Original_Source : return Video_Delay_Original_Source;
- case Generic_StreamSize : return Video_StreamSize;
- case Generic_StreamSize_String : return Video_StreamSize_String;
- case Generic_StreamSize_String1 : return Video_StreamSize_String1;
- case Generic_StreamSize_String2 : return Video_StreamSize_String2;
- case Generic_StreamSize_String3 : return Video_StreamSize_String3;
- case Generic_StreamSize_String4 : return Video_StreamSize_String4;
- case Generic_StreamSize_String5 : return Video_StreamSize_String5;
- case Generic_StreamSize_Proportion : return Video_StreamSize_Proportion;
- case Generic_StreamSize_Encoded : return Video_StreamSize_Encoded;
- case Generic_StreamSize_Encoded_String : return Video_StreamSize_Encoded_String;
- case Generic_StreamSize_Encoded_String1 : return Video_StreamSize_Encoded_String1;
- case Generic_StreamSize_Encoded_String2 : return Video_StreamSize_Encoded_String2;
- case Generic_StreamSize_Encoded_String3 : return Video_StreamSize_Encoded_String3;
- case Generic_StreamSize_Encoded_String4 : return Video_StreamSize_Encoded_String4;
- case Generic_StreamSize_Encoded_String5 : return Video_StreamSize_Encoded_String5;
- case Generic_StreamSize_Encoded_Proportion : return Video_StreamSize_Encoded_Proportion;
- case Generic_Source_StreamSize : return Video_Source_StreamSize;
- case Generic_Source_StreamSize_String : return Video_Source_StreamSize_String;
- case Generic_Source_StreamSize_String1 : return Video_Source_StreamSize_String1;
- case Generic_Source_StreamSize_String2 : return Video_Source_StreamSize_String2;
- case Generic_Source_StreamSize_String3 : return Video_Source_StreamSize_String3;
- case Generic_Source_StreamSize_String4 : return Video_Source_StreamSize_String4;
- case Generic_Source_StreamSize_String5 : return Video_Source_StreamSize_String5;
- case Generic_Source_StreamSize_Proportion : return Video_Source_StreamSize_Proportion;
- case Generic_Source_StreamSize_Encoded : return Video_Source_StreamSize_Encoded;
- case Generic_Source_StreamSize_Encoded_String : return Video_Source_StreamSize_Encoded_String;
- case Generic_Source_StreamSize_Encoded_String1 : return Video_Source_StreamSize_Encoded_String1;
- case Generic_Source_StreamSize_Encoded_String2 : return Video_Source_StreamSize_Encoded_String2;
- case Generic_Source_StreamSize_Encoded_String3 : return Video_Source_StreamSize_Encoded_String3;
- case Generic_Source_StreamSize_Encoded_String4 : return Video_Source_StreamSize_Encoded_String4;
- case Generic_Source_StreamSize_Encoded_String5 : return Video_Source_StreamSize_Encoded_String5;
- case Generic_Source_StreamSize_Encoded_Proportion : return Video_Source_StreamSize_Encoded_Proportion;
- case Generic_Language : return Video_Language;
- default: return (size_t)-1;
- }
- case Stream_Audio :
- switch (StreamPos)
- {
- case Generic_Format : return Audio_Format;
- case Generic_Format_Info : return Audio_Format_Info;
- case Generic_Format_Url : return Audio_Format_Url;
- case Generic_Format_Commercial : return Audio_Format_Commercial;
- case Generic_Format_Commercial_IfAny : return Audio_Format_Commercial_IfAny;
- case Generic_Format_Version : return Audio_Format_Version;
- case Generic_Format_Profile : return Audio_Format_Profile;
- case Generic_Format_Settings : return Audio_Format_Settings;
- case Generic_InternetMediaType : return Audio_InternetMediaType;
- case Generic_CodecID : return Audio_CodecID;
- case Generic_CodecID_Info : return Audio_CodecID_Info;
- case Generic_CodecID_Hint : return Audio_CodecID_Hint;
- case Generic_CodecID_Url : return Audio_CodecID_Url;
- case Generic_CodecID_Description : return Audio_CodecID_Description;
- case Generic_Codec : return Audio_Codec;
- case Generic_Codec_String : return Audio_Codec_String;
- case Generic_Codec_Info : return Audio_Codec_Info;
- case Generic_Codec_Url : return Audio_Codec_Url;
- case Generic_Codec_CC : return Audio_Codec_CC;
- case Generic_Duration : return Audio_Duration;
- case Generic_Duration_String : return Audio_Duration_String;
- case Generic_Duration_String1 : return Audio_Duration_String1;
- case Generic_Duration_String2 : return Audio_Duration_String2;
- case Generic_Duration_String3 : return Audio_Duration_String3;
- case Generic_Duration_String4 : return Audio_Duration_String4;
- case Generic_Duration_String5 : return Audio_Duration_String5;
- case Generic_Source_Duration : return Audio_Source_Duration;
- case Generic_Source_Duration_String : return Audio_Source_Duration_String;
- case Generic_Source_Duration_String1 : return Audio_Source_Duration_String1;
- case Generic_Source_Duration_String2 : return Audio_Source_Duration_String2;
- case Generic_Source_Duration_String3 : return Audio_Source_Duration_String3;
- case Generic_Source_Duration_String4 : return Audio_Source_Duration_String4;
- case Generic_Source_Duration_String5 : return Audio_Source_Duration_String5;
- case Generic_BitRate_Mode : return Audio_BitRate_Mode;
- case Generic_BitRate_Mode_String : return Audio_BitRate_Mode_String;
- case Generic_BitRate : return Audio_BitRate;
- case Generic_BitRate_String : return Audio_BitRate_String;
- case Generic_BitRate_Minimum : return Audio_BitRate_Minimum;
- case Generic_BitRate_Minimum_String : return Audio_BitRate_Minimum_String;
- case Generic_BitRate_Nominal : return Audio_BitRate_Nominal;
- case Generic_BitRate_Nominal_String : return Audio_BitRate_Nominal_String;
- case Generic_BitRate_Maximum : return Audio_BitRate_Maximum;
- case Generic_BitRate_Maximum_String : return Audio_BitRate_Maximum_String;
- case Generic_BitRate_Encoded : return Audio_BitRate_Encoded;
- case Generic_BitRate_Encoded_String : return Audio_BitRate_Encoded_String;
- case Generic_FrameRate : return Audio_FrameRate;
- case Generic_FrameCount : return Audio_FrameCount;
- case Generic_Source_FrameCount : return Audio_Source_FrameCount;
- case Generic_Resolution : return Audio_Resolution;
- case Generic_Resolution_String : return Audio_Resolution_String;
- case Generic_BitDepth : return Audio_BitDepth;
- case Generic_BitDepth_String : return Audio_BitDepth_String;
- case Generic_Compression_Mode : return Audio_Compression_Mode;
- case Generic_Compression_Mode_String : return Audio_Compression_Mode_String;
- case Generic_Compression_Ratio : return Audio_Compression_Ratio;
- case Generic_Delay : return Audio_Delay;
- case Generic_Delay_String : return Audio_Delay_String;
- case Generic_Delay_String1 : return Audio_Delay_String1;
- case Generic_Delay_String2 : return Audio_Delay_String2;
- case Generic_Delay_String3 : return Audio_Delay_String3;
- case Generic_Delay_String4 : return Audio_Delay_String4;
- case Generic_Delay_String5 : return Audio_Delay_String5;
- case Generic_Delay_Settings : return Audio_Delay_Settings;
- case Generic_Delay_DropFrame : return Audio_Delay_DropFrame;
- case Generic_Delay_Source : return Audio_Delay_Source;
- case Generic_Delay_Source_String : return Audio_Delay_Source_String;
- case Generic_Delay_Original : return Audio_Delay_Original;
- case Generic_Delay_Original_String : return Audio_Delay_Original_String;
- case Generic_Delay_Original_String1 : return Audio_Delay_Original_String1;
- case Generic_Delay_Original_String2 : return Audio_Delay_Original_String2;
- case Generic_Delay_Original_String3 : return Audio_Delay_Original_String3;
- case Generic_Delay_Original_String4 : return Audio_Delay_Original_String4;
- case Generic_Delay_Original_Settings : return Audio_Delay_Original_Settings;
- case Generic_Delay_Original_DropFrame : return Audio_Delay_Original_DropFrame;
- case Generic_Delay_Original_Source : return Audio_Delay_Original_Source;
- case Generic_Video_Delay : return Audio_Video_Delay;
- case Generic_Video_Delay_String : return Audio_Video_Delay_String;
- case Generic_Video_Delay_String1 : return Audio_Video_Delay_String1;
- case Generic_Video_Delay_String2 : return Audio_Video_Delay_String2;
- case Generic_Video_Delay_String3 : return Audio_Video_Delay_String3;
- case Generic_Video_Delay_String4 : return Audio_Video_Delay_String4;
- case Generic_StreamSize : return Audio_StreamSize;
- case Generic_StreamSize_String : return Audio_StreamSize_String;
- case Generic_StreamSize_String1 : return Audio_StreamSize_String1;
- case Generic_StreamSize_String2 : return Audio_StreamSize_String2;
- case Generic_StreamSize_String3 : return Audio_StreamSize_String3;
- case Generic_StreamSize_String4 : return Audio_StreamSize_String4;
- case Generic_StreamSize_String5 : return Audio_StreamSize_String5;
- case Generic_StreamSize_Proportion : return Audio_StreamSize_Proportion;
- case Generic_StreamSize_Encoded : return Audio_StreamSize_Encoded;
- case Generic_StreamSize_Encoded_String : return Audio_StreamSize_Encoded_String;
- case Generic_StreamSize_Encoded_String1 : return Audio_StreamSize_Encoded_String1;
- case Generic_StreamSize_Encoded_String2 : return Audio_StreamSize_Encoded_String2;
- case Generic_StreamSize_Encoded_String3 : return Audio_StreamSize_Encoded_String3;
- case Generic_StreamSize_Encoded_String4 : return Audio_StreamSize_Encoded_String4;
- case Generic_StreamSize_Encoded_String5 : return Audio_StreamSize_Encoded_String5;
- case Generic_StreamSize_Encoded_Proportion : return Audio_StreamSize_Encoded_Proportion;
- case Generic_Source_StreamSize : return Audio_Source_StreamSize;
- case Generic_Source_StreamSize_String : return Audio_Source_StreamSize_String;
- case Generic_Source_StreamSize_String1 : return Audio_Source_StreamSize_String1;
- case Generic_Source_StreamSize_String2 : return Audio_Source_StreamSize_String2;
- case Generic_Source_StreamSize_String3 : return Audio_Source_StreamSize_String3;
- case Generic_Source_StreamSize_String4 : return Audio_Source_StreamSize_String4;
- case Generic_Source_StreamSize_String5 : return Audio_Source_StreamSize_String5;
- case Generic_Source_StreamSize_Proportion : return Audio_Source_StreamSize_Proportion;
- case Generic_Source_StreamSize_Encoded : return Audio_Source_StreamSize_Encoded;
- case Generic_Source_StreamSize_Encoded_String : return Audio_Source_StreamSize_Encoded_String;
- case Generic_Source_StreamSize_Encoded_String1 : return Audio_Source_StreamSize_Encoded_String1;
- case Generic_Source_StreamSize_Encoded_String2 : return Audio_Source_StreamSize_Encoded_String2;
- case Generic_Source_StreamSize_Encoded_String3 : return Audio_Source_StreamSize_Encoded_String3;
- case Generic_Source_StreamSize_Encoded_String4 : return Audio_Source_StreamSize_Encoded_String4;
- case Generic_Source_StreamSize_Encoded_String5 : return Audio_Source_StreamSize_Encoded_String5;
- case Generic_Source_StreamSize_Encoded_Proportion : return Audio_Source_StreamSize_Encoded_Proportion;
- case Generic_Language : return Audio_Language;
- default: return (size_t)-1;
- }
- case Stream_Text :
- switch (StreamPos)
- {
- case Generic_Format : return Text_Format;
- case Generic_Format_Info : return Text_Format_Info;
- case Generic_Format_Url : return Text_Format_Url;
- case Generic_Format_Commercial : return Text_Format_Commercial;
- case Generic_Format_Commercial_IfAny : return Text_Format_Commercial_IfAny;
- case Generic_Format_Version : return Text_Format_Version;
- case Generic_Format_Profile : return Text_Format_Profile;
- case Generic_Format_Settings : return Text_Format_Settings;
- case Generic_InternetMediaType : return Text_InternetMediaType;
- case Generic_CodecID : return Text_CodecID;
- case Generic_CodecID_Info : return Text_CodecID_Info;
- case Generic_CodecID_Hint : return Text_CodecID_Hint;
- case Generic_CodecID_Url : return Text_CodecID_Url;
- case Generic_CodecID_Description : return Text_CodecID_Description;
- case Generic_Codec : return Text_Codec;
- case Generic_Codec_String : return Text_Codec_String;
- case Generic_Codec_Info : return Text_Codec_Info;
- case Generic_Codec_Url : return Text_Codec_Url;
- case Generic_Codec_CC : return Text_Codec_CC;
- case Generic_Duration : return Text_Duration;
- case Generic_Duration_String : return Text_Duration_String;
- case Generic_Duration_String1 : return Text_Duration_String1;
- case Generic_Duration_String2 : return Text_Duration_String2;
- case Generic_Duration_String3 : return Text_Duration_String3;
- case Generic_Duration_String4 : return Text_Duration_String4;
- case Generic_Duration_String5 : return Text_Duration_String5;
- case Generic_Source_Duration : return Text_Source_Duration;
- case Generic_Source_Duration_String : return Text_Source_Duration_String;
- case Generic_Source_Duration_String1 : return Text_Source_Duration_String1;
- case Generic_Source_Duration_String2 : return Text_Source_Duration_String2;
- case Generic_Source_Duration_String3 : return Text_Source_Duration_String3;
- case Generic_Source_Duration_String4 : return Text_Source_Duration_String4;
- case Generic_Source_Duration_String5 : return Text_Source_Duration_String5;
- case Generic_BitRate_Mode : return Text_BitRate_Mode;
- case Generic_BitRate_Mode_String : return Text_BitRate_Mode_String;
- case Generic_BitRate : return Text_BitRate;
- case Generic_BitRate_String : return Text_BitRate_String;
- case Generic_BitRate_Minimum : return Text_BitRate_Minimum;
- case Generic_BitRate_Minimum_String : return Text_BitRate_Minimum_String;
- case Generic_BitRate_Nominal : return Text_BitRate_Nominal;
- case Generic_BitRate_Nominal_String : return Text_BitRate_Nominal_String;
- case Generic_BitRate_Maximum : return Text_BitRate_Maximum;
- case Generic_BitRate_Maximum_String : return Text_BitRate_Maximum_String;
- case Generic_BitRate_Encoded : return Text_BitRate_Encoded;
- case Generic_BitRate_Encoded_String : return Text_BitRate_Encoded_String;
- case Generic_FrameRate : return Text_FrameRate;
- case Generic_FrameCount : return Text_FrameCount;
- case Generic_Source_FrameCount : return Text_Source_FrameCount;
- case Generic_ColorSpace : return Text_ColorSpace;
- case Generic_ChromaSubsampling : return Text_ChromaSubsampling;
- case Generic_Resolution : return Text_Resolution;
- case Generic_Resolution_String : return Text_Resolution_String;
- case Generic_BitDepth : return Text_BitDepth;
- case Generic_BitDepth_String : return Text_BitDepth_String;
- case Generic_Compression_Mode : return Text_Compression_Mode;
- case Generic_Compression_Mode_String : return Text_Compression_Mode_String;
- case Generic_Compression_Ratio : return Text_Compression_Ratio;
- case Generic_Delay : return Text_Delay;
- case Generic_Delay_String : return Text_Delay_String;
- case Generic_Delay_String1 : return Text_Delay_String1;
- case Generic_Delay_String2 : return Text_Delay_String2;
- case Generic_Delay_String3 : return Text_Delay_String3;
- case Generic_Delay_String4 : return Text_Delay_String4;
- case Generic_Delay_String5 : return Text_Delay_String5;
- case Generic_Delay_Settings : return Text_Delay_Settings;
- case Generic_Delay_DropFrame : return Text_Delay_DropFrame;
- case Generic_Delay_Source : return Text_Delay_Source;
- case Generic_Delay_Source_String : return Text_Delay_Source_String;
- case Generic_Delay_Original : return Text_Delay_Original;
- case Generic_Delay_Original_String : return Text_Delay_Original_String;
- case Generic_Delay_Original_String1 : return Text_Delay_Original_String1;
- case Generic_Delay_Original_String2 : return Text_Delay_Original_String2;
- case Generic_Delay_Original_String3 : return Text_Delay_Original_String3;
- case Generic_Delay_Original_String4 : return Text_Delay_Original_String4;
- case Generic_Delay_Original_Settings : return Text_Delay_Original_Settings;
- case Generic_Delay_Original_DropFrame : return Text_Delay_Original_DropFrame;
- case Generic_Delay_Original_Source : return Text_Delay_Original_Source;
- case Generic_Video_Delay : return Text_Video_Delay;
- case Generic_Video_Delay_String : return Text_Video_Delay_String;
- case Generic_Video_Delay_String1 : return Text_Video_Delay_String1;
- case Generic_Video_Delay_String2 : return Text_Video_Delay_String2;
- case Generic_Video_Delay_String3 : return Text_Video_Delay_String3;
- case Generic_Video_Delay_String4 : return Text_Video_Delay_String4;
- case Generic_StreamSize : return Text_StreamSize;
- case Generic_StreamSize_String : return Text_StreamSize_String;
- case Generic_StreamSize_String1 : return Text_StreamSize_String1;
- case Generic_StreamSize_String2 : return Text_StreamSize_String2;
- case Generic_StreamSize_String3 : return Text_StreamSize_String3;
- case Generic_StreamSize_String4 : return Text_StreamSize_String4;
- case Generic_StreamSize_String5 : return Text_StreamSize_String5;
- case Generic_StreamSize_Proportion : return Text_StreamSize_Proportion;
- case Generic_StreamSize_Encoded : return Text_StreamSize_Encoded;
- case Generic_StreamSize_Encoded_String : return Text_StreamSize_Encoded_String;
- case Generic_StreamSize_Encoded_String1 : return Text_StreamSize_Encoded_String1;
- case Generic_StreamSize_Encoded_String2 : return Text_StreamSize_Encoded_String2;
- case Generic_StreamSize_Encoded_String3 : return Text_StreamSize_Encoded_String3;
- case Generic_StreamSize_Encoded_String4 : return Text_StreamSize_Encoded_String4;
- case Generic_StreamSize_Encoded_String5 : return Text_StreamSize_Encoded_String5;
- case Generic_StreamSize_Encoded_Proportion : return Text_StreamSize_Encoded_Proportion;
- case Generic_Source_StreamSize : return Text_Source_StreamSize;
- case Generic_Source_StreamSize_String : return Text_Source_StreamSize_String;
- case Generic_Source_StreamSize_String1 : return Text_Source_StreamSize_String1;
- case Generic_Source_StreamSize_String2 : return Text_Source_StreamSize_String2;
- case Generic_Source_StreamSize_String3 : return Text_Source_StreamSize_String3;
- case Generic_Source_StreamSize_String4 : return Text_Source_StreamSize_String4;
- case Generic_Source_StreamSize_String5 : return Text_Source_StreamSize_String5;
- case Generic_Source_StreamSize_Proportion : return Text_Source_StreamSize_Proportion;
- case Generic_Source_StreamSize_Encoded : return Text_Source_StreamSize_Encoded;
- case Generic_Source_StreamSize_Encoded_String : return Text_Source_StreamSize_Encoded_String;
- case Generic_Source_StreamSize_Encoded_String1 : return Text_Source_StreamSize_Encoded_String1;
- case Generic_Source_StreamSize_Encoded_String2 : return Text_Source_StreamSize_Encoded_String2;
- case Generic_Source_StreamSize_Encoded_String3 : return Text_Source_StreamSize_Encoded_String3;
- case Generic_Source_StreamSize_Encoded_String4 : return Text_Source_StreamSize_Encoded_String4;
- case Generic_Source_StreamSize_Encoded_String5 : return Text_Source_StreamSize_Encoded_String5;
- case Generic_Source_StreamSize_Encoded_Proportion : return Text_Source_StreamSize_Encoded_Proportion;
- case Generic_Language : return Text_Language;
- default: return (size_t)-1;
- }
- case Stream_Other :
- switch (StreamPos)
- {
- case Generic_Format : return Other_Format;
- case Generic_Format_Info : return Other_Format_Info;
- case Generic_Format_Url : return Other_Format_Url;
- case Generic_Format_Commercial : return Other_Format_Commercial;
- case Generic_Format_Commercial_IfAny : return Other_Format_Commercial_IfAny;
- case Generic_Format_Version : return Other_Format_Version;
- case Generic_Format_Profile : return Other_Format_Profile;
- case Generic_Format_Settings : return Other_Format_Settings;
- case Generic_CodecID : return Other_CodecID;
- case Generic_CodecID_Info : return Other_CodecID_Info;
- case Generic_CodecID_Hint : return Other_CodecID_Hint;
- case Generic_CodecID_Url : return Other_CodecID_Url;
- case Generic_CodecID_Description : return Other_CodecID_Description;
- case Generic_Duration : return Other_Duration;
- case Generic_Duration_String : return Other_Duration_String;
- case Generic_Duration_String1 : return Other_Duration_String1;
- case Generic_Duration_String2 : return Other_Duration_String2;
- case Generic_Duration_String3 : return Other_Duration_String3;
- case Generic_Duration_String4 : return Other_Duration_String4;
- case Generic_Duration_String5 : return Other_Duration_String5;
- case Generic_FrameRate : return Other_FrameRate;
- case Generic_FrameCount : return Other_FrameCount;
- case Generic_Language : return Other_Language;
- default: return (size_t)-1;
- }
- case Stream_Image :
- switch (StreamPos)
- {
- case Generic_Format : return Image_Format;
- case Generic_Format_Info : return Image_Format_Info;
- case Generic_Format_Url : return Image_Format_Url;
- case Generic_Format_Commercial : return Image_Format_Commercial;
- case Generic_Format_Commercial_IfAny : return Image_Format_Commercial_IfAny;
- case Generic_Format_Version : return Image_Format_Version;
- case Generic_Format_Profile : return Image_Format_Profile;
- case Generic_InternetMediaType : return Image_InternetMediaType;
- case Generic_CodecID : return Image_CodecID;
- case Generic_CodecID_Info : return Image_CodecID_Info;
- case Generic_CodecID_Hint : return Image_CodecID_Hint;
- case Generic_CodecID_Url : return Image_CodecID_Url;
- case Generic_CodecID_Description : return Image_CodecID_Description;
- case Generic_Codec : return Image_Codec;
- case Generic_Codec_String : return Image_Codec_String;
- case Generic_Codec_Info : return Image_Codec_Info;
- case Generic_Codec_Url : return Image_Codec_Url;
- case Generic_ColorSpace : return Image_ColorSpace;
- case Generic_ChromaSubsampling : return Image_ChromaSubsampling;
- case Generic_Resolution : return Image_Resolution;
- case Generic_Resolution_String : return Image_Resolution_String;
- case Generic_BitDepth : return Image_BitDepth;
- case Generic_BitDepth_String : return Image_BitDepth_String;
- case Generic_Compression_Mode : return Image_Compression_Mode;
- case Generic_Compression_Mode_String : return Image_Compression_Mode_String;
- case Generic_Compression_Ratio : return Image_Compression_Ratio;
- case Generic_StreamSize : return Image_StreamSize;
- case Generic_StreamSize_String : return Image_StreamSize_String;
- case Generic_StreamSize_String1 : return Image_StreamSize_String1;
- case Generic_StreamSize_String2 : return Image_StreamSize_String2;
- case Generic_StreamSize_String3 : return Image_StreamSize_String3;
- case Generic_StreamSize_String4 : return Image_StreamSize_String4;
- case Generic_StreamSize_String5 : return Image_StreamSize_String5;
- case Generic_StreamSize_Proportion : return Image_StreamSize_Proportion;
- case Generic_Language : return Image_Language;
- default: return (size_t)-1;
- }
- case Stream_Menu :
- switch (StreamPos)
- {
- case Generic_Format : return Menu_Format;
- case Generic_Format_Info : return Menu_Format_Info;
- case Generic_Format_Url : return Menu_Format_Url;
- case Generic_Format_Commercial : return Menu_Format_Commercial;
- case Generic_Format_Commercial_IfAny : return Menu_Format_Commercial_IfAny;
- case Generic_Format_Version : return Menu_Format_Version;
- case Generic_Format_Profile : return Menu_Format_Profile;
- case Generic_Format_Settings : return Menu_Format_Settings;
- case Generic_CodecID : return Menu_CodecID;
- case Generic_CodecID_Info : return Menu_CodecID_Info;
- case Generic_CodecID_Hint : return Menu_CodecID_Hint;
- case Generic_CodecID_Url : return Menu_CodecID_Url;
- case Generic_CodecID_Description : return Menu_CodecID_Description;
- case Generic_Codec : return Menu_Codec;
- case Generic_Codec_String : return Menu_Codec_String;
- case Generic_Codec_Info : return Menu_Codec_Info;
- case Generic_Codec_Url : return Menu_Codec_Url;
- case Generic_Duration : return Menu_Duration;
- case Generic_Duration_String : return Menu_Duration_String;
- case Generic_Duration_String1 : return Menu_Duration_String1;
- case Generic_Duration_String2 : return Menu_Duration_String2;
- case Generic_Duration_String3 : return Menu_Duration_String3;
- case Generic_Duration_String4 : return Menu_Duration_String4;
- case Generic_Duration_String5 : return Menu_Duration_String5;
- case Generic_Language : return Menu_Language;
- case Generic_ServiceName : return Menu_ServiceName;
- case Generic_ServiceProvider : return Menu_ServiceProvider;
- default: return (size_t)-1;
- }
- default: return (size_t)-1;
- }
-}
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Streams_Finish.cpp b/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Streams_Finish.cpp
deleted file mode 100644
index bb4d2aa8e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__Analyze_Streams_Finish.cpp
+++ /dev/null
@@ -1,1155 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Init and Finalize part
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Utils.h"
-#include "ZenLib/File.h"
-#include "ZenLib/FileName.h"
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#if MEDIAINFO_IBI
- #include "MediaInfo/Multiple/File_Ibi.h"
-#endif //MEDIAINFO_IBI
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-void File__Analyze::Streams_Finish_Global()
-{
- if (IsSub)
- return;
-
- #if MEDIAINFO_ADVANCED
- //Default frame rate
- if (Count_Get(Stream_Video)==1 && Retrieve(Stream_Video, 0, Video_FrameRate).empty() && Config->File_DefaultFrameRate_Get())
- Fill(Stream_Video, 0, Video_FrameRate, Config->File_DefaultFrameRate_Get());
- #endif //MEDIAINFO_ADVANCED
-
- //Video Frame count
- if (Count_Get(Stream_Video)==1 && Count_Get(Stream_Audio)==0 && Retrieve(Stream_Video, 0, Video_FrameCount).empty())
- {
- if (Frame_Count_NotParsedIncluded!=(int64u)-1 && File_Offset+Buffer_Size==File_Size)
- Fill(Stream_Video, 0, Video_FrameCount, Frame_Count_NotParsedIncluded);
- else if (Config->File_Names.size()>1)
- Fill(Stream_Video, 0, Video_FrameCount, Config->File_Names.size());
- #if MEDIAINFO_IBIUSAGE
- else
- {
- //External IBI
- std::string IbiFile=Config->Ibi_Get();
- if (!IbiFile.empty())
- {
- if (IbiStream)
- IbiStream->Infos.clear(); //TODO: support IBI data from different inputs
- else
- IbiStream=new ibi::stream;
-
- File_Ibi MI;
- Open_Buffer_Init(&MI, IbiFile.size());
- MI.Ibi=new ibi;
- MI.Open_Buffer_Continue((const int8u*)IbiFile.c_str(), IbiFile.size());
- if (!MI.Ibi->Streams.empty())
- (*IbiStream)=(*MI.Ibi->Streams.begin()->second);
- }
-
- if (IbiStream && !IbiStream->Infos.empty() && IbiStream->Infos[IbiStream->Infos.size()-1].IsContinuous && IbiStream->Infos[IbiStream->Infos.size()-1].FrameNumber!=(int64u)-1)
- Fill(Stream_Video, 0, Video_FrameCount, IbiStream->Infos[IbiStream->Infos.size()-1].FrameNumber);
- }
- #endif //MEDIAINFO_IBIUSAGE
- }
-
- Streams_Finish_StreamOnly();
- Streams_Finish_StreamOnly();
- Streams_Finish_InterStreams();
- Streams_Finish_StreamOnly();
- Streams_Finish_InterStreams();
- Streams_Finish_StreamOnly();
- Streams_Finish_InterStreams();
- Streams_Finish_StreamOnly();
-
- if (!IsSub && !Config->File_IsReferenced_Get() && MediaInfoLib::Config.ReadByHuman_Get())
- Streams_Finish_HumanReadable();
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::TestContinuousFileNames(size_t CountOfFiles, Ztring FileExtension)
-{
- if (IsSub || !Config->File_TestContinuousFileNames_Get())
- return;
-
- size_t Pos=Config->File_Names.size();
- if (!Pos)
- return;
-
- //Trying to detect continuous file names (e.g. video stream as an image or HLS)
- size_t Pos_Base = (size_t)-1;
- bool AlreadyPresent=Config->File_Names.size()==1?true:false;
- FileName FileToTest(Config->File_Names.Read(Config->File_Names.size()-1));
- Ztring FileToTest_Name=FileToTest.Name_Get();
- Ztring FileToTest_Name_After=FileToTest_Name;
- size_t FileNameToTest_End=FileToTest_Name.size();
- while (FileNameToTest_End && !(FileToTest_Name[FileNameToTest_End-1]>=__T('0') && FileToTest_Name[FileNameToTest_End-1]<=__T('9')))
- FileNameToTest_End--;
- size_t FileNameToTest_Pos=FileNameToTest_End;
- while (FileNameToTest_Pos && FileToTest_Name[FileNameToTest_Pos-1]>=__T('0') && FileToTest_Name[FileNameToTest_Pos-1]<=__T('9'))
- FileNameToTest_Pos--;
- if (FileNameToTest_Pos!=FileToTest_Name.size() && FileNameToTest_Pos!=FileNameToTest_End)
- {
- size_t Numbers_Size=FileNameToTest_End-FileNameToTest_Pos;
- int64u Pos=Ztring(FileToTest_Name.substr(FileNameToTest_Pos)).To_int64u();
- FileToTest_Name.resize(FileNameToTest_Pos);
- FileToTest_Name_After.erase(0, FileToTest_Name.size()+Numbers_Size);
-
- /*
- for (;;)
- {
- Pos++;
- Ztring Pos_Ztring; Pos_Ztring.From_Number(Pos);
- if (Numbers_Size>Pos_Ztring.size())
- Pos_Ztring.insert(0, Numbers_Size-Pos_Ztring.size(), __T('0'));
- Ztring Next=FileToTest.Path_Get()+PathSeparator+FileToTest_Name+Pos_Ztring+__T('.')+(FileExtension.empty()?FileToTest.Extension_Get():FileExtension);
- if (!File::Exists(Next))
- break;
- Config->File_Names.push_back(Next);
- }
- */
-
- //Detecting with a smarter algo (but missing frames are not detected)
- Ztring FileToTest_Name_Begin=FileToTest.Path_Get()+PathSeparator+FileToTest_Name;
- Ztring FileToTest_Name_End=FileToTest_Name_After+__T('.')+(FileExtension.empty()?FileToTest.Extension_Get():FileExtension);
- Pos_Base = (size_t)Pos;
- size_t Pos_Add_Max = 1;
- #if MEDIAINFO_ADVANCED
- bool File_IgnoreSequenceFileSize=Config->File_IgnoreSequenceFilesCount_Get(); //TODO: double check if it is expected
-
- size_t SequenceFileSkipFrames=Config->File_SequenceFilesSkipFrames_Get();
- if (SequenceFileSkipFrames)
- {
- for (;;)
- {
- size_t Pos_Add_Max_Old=Pos_Add_Max;
- for (size_t TempPos=Pos_Add_Max; TempPos<=Pos_Add_Max+SequenceFileSkipFrames; TempPos++)
- {
- Ztring Pos_Ztring; Pos_Ztring.From_Number(Pos_Base+TempPos);
- if (Numbers_Size>Pos_Ztring.size())
- Pos_Ztring.insert(0, Numbers_Size-Pos_Ztring.size(), __T('0'));
- Ztring Next=FileToTest_Name_Begin+Pos_Ztring+FileToTest_Name_End;
- if (File::Exists(Next))
- {
- Pos_Add_Max=TempPos+1;
- break;
- }
- }
- if (Pos_Add_Max==Pos_Add_Max_Old)
- break;
- }
- }
- else
- {
- #endif //MEDIAINFO_ADVANCED
- for (;;)
- {
- Ztring Pos_Ztring; Pos_Ztring.From_Number(Pos_Base+Pos_Add_Max);
- if (Numbers_Size>Pos_Ztring.size())
- Pos_Ztring.insert(0, Numbers_Size-Pos_Ztring.size(), __T('0'));
- Ztring Next=FileToTest_Name_Begin+Pos_Ztring+FileToTest_Name_End;
- if (!File::Exists(Next))
- break;
- Pos_Add_Max<<=1;
- #if MEDIAINFO_ADVANCED
- if (File_IgnoreSequenceFileSize && Pos_Add_Max>=CountOfFiles)
- break;
- #endif //MEDIAINFO_ADVANCED
- }
- size_t Pos_Add_Min = Pos_Add_Max >> 1;
- while (Pos_Add_Min+1<Pos_Add_Max)
- {
- size_t Pos_Add_Middle = Pos_Add_Min + ((Pos_Add_Max - Pos_Add_Min) >> 1);
- Ztring Pos_Ztring; Pos_Ztring.From_Number(Pos_Base+Pos_Add_Middle);
- if (Numbers_Size>Pos_Ztring.size())
- Pos_Ztring.insert(0, Numbers_Size-Pos_Ztring.size(), __T('0'));
- Ztring Next=FileToTest_Name_Begin+Pos_Ztring+FileToTest_Name_End;
- if (File::Exists(Next))
- Pos_Add_Min=Pos_Add_Middle;
- else
- Pos_Add_Max=Pos_Add_Middle;
- }
-
- #if MEDIAINFO_ADVANCED
- } //SequenceFileSkipFrames
- #endif //MEDIAINFO_ADVANCED
-
- size_t Pos_Max = Pos_Base + Pos_Add_Max;
- Config->File_Names.reserve(Pos_Add_Max);
- for (Pos=Pos_Base+1; Pos<Pos_Max; ++Pos)
- {
- Ztring Pos_Ztring; Pos_Ztring.From_Number(Pos);
- if (Numbers_Size>Pos_Ztring.size())
- Pos_Ztring.insert(0, Numbers_Size-Pos_Ztring.size(), __T('0'));
- Config->File_Names.push_back(FileToTest_Name_Begin+Pos_Ztring+FileToTest_Name_End);
- }
-
- if (!Config->File_IsReferenced_Get() && Config->File_Names.size()<CountOfFiles && AlreadyPresent)
- Config->File_Names.resize(1); //Removing files, wrong detection
- }
-
- if (Config->File_Names.size()==Pos)
- return;
-
- Config->File_IsImageSequence=true;
- Frame_Count_NotParsedIncluded=Pos_Base;
- #if MEDIAINFO_DEMUX
- float64 Demux_Rate=Config->Demux_Rate_Get();
- if (!Demux_Rate)
- Demux_Rate=24;
- Fill(Stream_Video, 0, Video_Delay, float64_int64s(Frame_Count_NotParsedIncluded*1000/Demux_Rate));
- #endif //MEDIAINFO_DEMUX
-
- #if MEDIAINFO_ADVANCED
- if (!Config->File_IgnoreSequenceFileSize_Get() || Config->File_Names.size()<=1)
- #endif //MEDIAINFO_ADVANCED
- {
- for (; Pos<Config->File_Names.size(); Pos++)
- {
- int64u Size=File::Size_Get(Config->File_Names[Pos]);
- Config->File_Sizes.push_back(Size);
- Config->File_Size+=Size;
- }
- }
- #if MEDIAINFO_ADVANCED
- else
- {
- Config->File_Size=(int64u)-1;
- File_Size=(int64u)-1;
- Clear(Stream_General, 0, General_FileSize);
- }
- #endif //MEDIAINFO_ADVANCED
-
- File_Size=Config->File_Size;
- Element[0].Next=File_Size;
- #if MEDIAINFO_ADVANCED
- if (!Config->File_IgnoreSequenceFileSize_Get() || Config->File_Names.size()<=1)
- #endif //MEDIAINFO_ADVANCED
- Fill (Stream_General, 0, General_FileSize, File_Size, 10, true);
- #if MEDIAINFO_ADVANCED
- if (!Config->File_IgnoreSequenceFilesCount_Get())
- #endif //MEDIAINFO_ADVANCED
- {
- Fill (Stream_General, 0, General_CompleteName_Last, Config->File_Names[Config->File_Names.size()-1], true);
- Fill (Stream_General, 0, General_FolderName_Last, FileName::Path_Get(Config->File_Names[Config->File_Names.size()-1]), true);
- Fill (Stream_General, 0, General_FileName_Last, FileName::Name_Get(Config->File_Names[Config->File_Names.size()-1]), true);
- Fill (Stream_General, 0, General_FileExtension_Last, FileName::Extension_Get(Config->File_Names[Config->File_Names.size()-1]), true);
- }
-
- #if MEDIAINFO_ADVANCED
- if (Config->File_Source_List_Get())
- {
- Ztring SourcePath=FileName::Path_Get(Retrieve(Stream_General, 0, General_CompleteName));
- size_t SourcePath_Size=SourcePath.size()+1; //Path size + path separator size
- for (size_t Pos=0; Pos<Config->File_Names.size(); Pos++)
- {
- Ztring Temp=Config->File_Names[Pos];
- Temp.erase(0, SourcePath_Size);
- Fill(Stream_General, 0, "Source_List", Temp);
- }
- (*Stream_More)[Stream_General][0](Ztring().From_Local("Source_List"), Info_Options)=__T("N NT");
- }
- #endif //MEDIAINFO_ADVANCED
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Streams_Finish_StreamOnly()
-{
- //Generic
- for (size_t StreamKind=Stream_General; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- Streams_Finish_StreamOnly((stream_t)StreamKind, StreamPos);
-
- //For each kind of (*Stream)
- for (size_t Pos=0; Pos<Count_Get(Stream_General); Pos++) Streams_Finish_StreamOnly_General(Pos);
- for (size_t Pos=0; Pos<Count_Get(Stream_Video); Pos++) Streams_Finish_StreamOnly_Video(Pos);
- for (size_t Pos=0; Pos<Count_Get(Stream_Audio); Pos++) Streams_Finish_StreamOnly_Audio(Pos);
- for (size_t Pos=0; Pos<Count_Get(Stream_Text); Pos++) Streams_Finish_StreamOnly_Text(Pos);
- for (size_t Pos=0; Pos<Count_Get(Stream_Other); Pos++) Streams_Finish_StreamOnly_Other(Pos);
- for (size_t Pos=0; Pos<Count_Get(Stream_Image); Pos++) Streams_Finish_StreamOnly_Image(Pos);
- for (size_t Pos=0; Pos<Count_Get(Stream_Menu); Pos++) Streams_Finish_StreamOnly_Menu(Pos);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Streams_Finish_StreamOnly(stream_t StreamKind, size_t Pos)
-{
- //BitRate from Duration and StreamSize
- if (StreamKind!=Stream_General && StreamKind!=Stream_Other && StreamKind!=Stream_Menu && Retrieve(StreamKind, Pos, "BitRate").empty() && !Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_StreamSize)).empty() && !Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_Duration)).empty())
- {
- float64 Duration=0;
- if (StreamKind==Stream_Video && !Retrieve(Stream_Video, Pos, Video_FrameCount).empty() && !Retrieve(Stream_Video, Pos, Video_FrameRate).empty())
- {
- int64u FrameCount=Retrieve(Stream_Video, Pos, Video_FrameCount).To_int64u();
- float64 FrameRate=Retrieve(Stream_Video, Pos, Video_FrameRate).To_float64();
- if (FrameCount && FrameRate)
- Duration=FrameCount*1000/FrameRate; //More precise (example: 1 frame at 29.97 fps)
- }
- if (Duration==0)
- Duration=Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_Duration)).To_float64();
- int64u StreamSize=Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_StreamSize)).To_int64u();
- if (Duration>0 && StreamSize>0)
- Fill(StreamKind, Pos, "BitRate", StreamSize*8*1000/Duration, 0);
- }
-
- //BitRate_Encoded from Duration and StreamSize_Encoded
- if (StreamKind!=Stream_General && StreamKind!=Stream_Other && StreamKind!=Stream_Menu && Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_BitRate_Encoded)).empty() && !Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_StreamSize_Encoded)).empty() && !Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_Duration)).empty())
- {
- float64 Duration=0;
- if (StreamKind==Stream_Video && !Retrieve(Stream_Video, Pos, Video_FrameCount).empty() && !Retrieve(Stream_Video, Pos, Video_FrameRate).empty())
- {
- int64u FrameCount=Retrieve(Stream_Video, Pos, Video_FrameCount).To_int64u();
- float64 FrameRate=Retrieve(Stream_Video, Pos, Video_FrameRate).To_float64();
- if (FrameCount && FrameRate)
- Duration=FrameCount*1000/FrameRate; //More precise (example: 1 frame at 29.97 fps)
- }
- if (Duration==0)
- Duration=Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_Duration)).To_float64();
- int64u StreamSize_Encoded=Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_StreamSize_Encoded)).To_int64u();
- if (Duration>0 && StreamSize_Encoded>0)
- Fill(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_BitRate_Encoded), StreamSize_Encoded*8*1000/Duration, 0);
- }
-
- //Duration from Bitrate and StreamSize
- if (StreamKind!=Stream_Other && Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_Duration)).empty() && !Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_StreamSize)).empty() && !Retrieve(StreamKind, Pos, "BitRate").empty() && Count_Get(Stream_Video)+Count_Get(Stream_Audio)>1) //If only one stream, duration will be copied later, useful for exact bitrate calculation
- {
- int64u BitRate=Retrieve(StreamKind, Pos, "BitRate").To_int64u();
- int64u StreamSize=Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_StreamSize)).To_int64u();
- if (BitRate>0 && StreamSize>0)
- Fill(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_Duration), StreamSize*8*1000/BitRate);
- }
-
- //StreamSize from BitRate and Duration
- if (StreamKind!=Stream_Other && Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_StreamSize)).empty() && !Retrieve(StreamKind, Pos, "BitRate").empty() && !Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_Duration)).empty() && Retrieve(StreamKind, Pos, "BitRate").find(__T(" / "))==std::string::npos) //If not done the first time or by other routine
- {
- int64u BitRate=Retrieve(StreamKind, Pos, "BitRate").To_int64u();
- int64u Duration=Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_Duration)).To_int64u();
- if (BitRate>0 && Duration>0)
- Fill(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_StreamSize), BitRate*Duration/8/1000);
- }
-
- //Bit rate and maximum bit rate
- if (!Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_BitRate)).empty() && Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_BitRate))==Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_BitRate_Maximum)))
- {
- Clear(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_BitRate_Maximum));
- if (Retrieve(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_BitRate_Mode)).empty())
- Fill(StreamKind, Pos, Fill_Parameter(StreamKind, Generic_BitRate_Mode), "CBR");
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Streams_Finish_StreamOnly_General(size_t UNUSED(StreamPos))
-{
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Streams_Finish_StreamOnly_Video(size_t Pos)
-{
- //Frame count
- if (Retrieve(Stream_Video, Pos, Video_FrameCount).empty() && Frame_Count_NotParsedIncluded!=(int64u)-1 && File_Offset+Buffer_Size==File_Size)
- {
- if (Count_Get(Stream_Video)==1 && Count_Get(Stream_Audio)==0)
- Fill(Stream_Video, 0, Video_FrameCount, Frame_Count_NotParsedIncluded);
- }
-
- //FrameCount from Duration and FrameRate
- if (Retrieve(Stream_Video, Pos, Video_FrameCount).empty())
- {
- int64s Duration=Retrieve(Stream_Video, Pos, Video_Duration).To_int64s();
- if (Duration==0)
- Duration=Retrieve(Stream_General, 0, General_Duration).To_int64s();
- float64 FrameRate=Retrieve(Stream_Video, Pos, Video_FrameRate).To_float64();
- if (Duration && FrameRate)
- Fill(Stream_Video, Pos, Video_FrameCount, Duration*FrameRate/1000, 0);
- }
-
- //Duration from FrameCount and FrameRate
- if (Retrieve(Stream_Video, Pos, Video_Duration).empty())
- {
- int64u FrameCount=Retrieve(Stream_Video, Pos, Video_FrameCount).To_int64u();
- float64 FrameRate=Retrieve(Stream_Video, Pos, "FrameRate").To_float64();
- if (FrameCount && FrameRate)
- Fill(Stream_Video, Pos, Video_Duration, FrameCount/FrameRate*1000, 0);
- }
-
- //FrameRate from FrameCount and Duration
- if (Retrieve(Stream_Video, Pos, Video_FrameRate).empty())
- {
- int64u FrameCount=Retrieve(Stream_Video, Pos, Video_FrameCount).To_int64u();
- float64 Duration=Retrieve(Stream_Video, Pos, Video_Duration).To_float64()/1000;
- if (FrameCount && Duration)
- Fill(Stream_Video, Pos, Video_FrameRate, FrameCount/Duration, 3);
- }
-
- //Pixel Aspect Ratio forced to 1.000 if none
- if (Retrieve(Stream_Video, Pos, Video_PixelAspectRatio).empty())
- Fill(Stream_Video, Pos, Video_PixelAspectRatio, 1.000);
-
- //Standard
- if (Retrieve(Stream_Video, Pos, Video_Standard).empty() && (Retrieve(Stream_Video, Pos, Video_Width)==__T("720") || Retrieve(Stream_Video, Pos, Video_Width)==__T("704")))
- {
- if (Retrieve(Stream_Video, Pos, Video_Height)==__T("576"))
- Fill(Stream_Video, Pos, Video_Standard, "PAL");
- else if (Retrieve(Stream_Video, Pos, Video_Height)==__T("486") || Retrieve(Stream_Video, Pos, Video_Height)==__T("480"))
- Fill(Stream_Video, Pos, Video_Standard, "NTSC");
- }
- if (Retrieve(Stream_Video, Pos, Video_Standard).empty() && Retrieve(Stream_Video, Pos, Video_Width)==__T("352"))
- {
- if (Retrieve(Stream_Video, Pos, Video_Height)==__T("576") || Retrieve(Stream_Video, Pos, Video_Height)==__T("288"))
- Fill(Stream_Video, Pos, Video_Standard, "PAL");
- else if (Retrieve(Stream_Video, Pos, Video_Height)==__T("486") || Retrieve(Stream_Video, Pos, Video_Height)==__T("480") || Retrieve(Stream_Video, Pos, Video_Height)==__T("243") || Retrieve(Stream_Video, Pos, Video_Height)==__T("240"))
- Fill(Stream_Video, Pos, Video_Standard, "NTSC");
- }
-
- //Known ScanTypes
- if (Retrieve(Stream_Video, Pos, Video_ScanType).empty()
- && (Retrieve(Stream_Video, Pos, Video_Format)==__T("RED")
- || Retrieve(Stream_Video, Pos, Video_Format)==__T("CineForm")
- || Retrieve(Stream_Video, Pos, Video_Format)==__T("DPX")
- || Retrieve(Stream_Video, Pos, Video_Format)==__T("EXR")))
- Fill(Stream_Video, Pos, Video_ScanType, "Progressive");
-
- //Commercial name
- #if defined(MEDIAINFO_VC3_YES)
- if (Retrieve(Stream_Video, Pos, Video_Format_Commercial_IfAny).empty() && Retrieve(Stream_Video, Pos, Video_Format)==__T("VC-3"))
- {
- //http://www.avid.com/static/resources/US/documents/dnxhd.pdf
- int64u Height=Retrieve(Stream_Video, Pos, Video_Height).To_int64u();
- int64u BitRate=float64_int64s(Retrieve(Stream_Video, Pos, Video_BitRate).To_float64()/1000000);
- int64u FrameRate=float64_int64s(Retrieve(Stream_Video, Pos, Video_FrameRate).To_float64());
- int64u BitRate_Final=0;
- if (Height>=900 && Height<=1300)
- {
- if (FrameRate==60)
- {
- if (BitRate>=420 && BitRate<440) //440
- BitRate_Final=440;
- if (BitRate>=271 && BitRate<311) //291
- BitRate_Final=290;
- if (BitRate>=80 && BitRate<100) //90
- BitRate_Final=90;
- }
- if (FrameRate==50)
- {
- if (BitRate>=347 && BitRate<387) //367
- BitRate_Final=365;
- if (BitRate>=222 && BitRate<262) //242
- BitRate_Final=240;
- if (BitRate>=65 && BitRate<85) //75
- BitRate_Final=75;
- }
- if (FrameRate==30)
- {
- if (BitRate>=420 && BitRate<440) //440
- BitRate_Final=440;
- if (BitRate>=200 && BitRate<240) //220
- BitRate_Final=220;
- if (BitRate>=130 && BitRate<160) //145
- BitRate_Final=145;
- if (BitRate>=90 && BitRate<110) //100
- BitRate_Final=100;
- if (BitRate>=40 && BitRate<50) //45
- BitRate_Final=45;
- }
- if (FrameRate==25)
- {
- if (BitRate>=347 && BitRate<387) //367
- BitRate_Final=365;
- if (BitRate>=164 && BitRate<204) //184
- BitRate_Final=185;
- if (BitRate>=111 && BitRate<131) //121
- BitRate_Final=120;
- if (BitRate>=74 && BitRate<94) //84
- BitRate_Final=85;
- if (BitRate>=31 && BitRate<41) //36
- BitRate_Final=36;
- }
- if (FrameRate==24)
- {
- if (BitRate>=332 && BitRate<372) //352
- BitRate_Final=350;
- if (BitRate>=156 && BitRate<196) //176
- BitRate_Final=175;
- if (BitRate>=105 && BitRate<125) //116
- BitRate_Final=116;
- if (BitRate>=70 && BitRate<90) //80
- BitRate_Final=80;
- if (BitRate>=31 && BitRate<41) //36
- BitRate_Final=36;
- }
- }
- if (Height>=600 && Height<=800)
- {
- if (FrameRate==60)
- {
- if (BitRate>=200 && BitRate<240) //220
- BitRate_Final=220;
- if (BitRate>=130 && BitRate<160) //145
- BitRate_Final=145;
- if (BitRate>=90 && BitRate<110) //110
- BitRate_Final=100;
- }
- if (FrameRate==50)
- {
- if (BitRate>=155 && BitRate<195) //175
- BitRate_Final=175;
- if (BitRate>=105 && BitRate<125) //115
- BitRate_Final=115;
- if (BitRate>=75 && BitRate<95) //85
- BitRate_Final=85;
- }
- if (FrameRate==30)
- {
- if (BitRate>=100 && BitRate<120) //110
- BitRate_Final=110;
- if (BitRate>=62 && BitRate<82) //72
- BitRate_Final=75;
- if (BitRate>=44 && BitRate<56) //51
- BitRate_Final=50;
- }
- if (FrameRate==25)
- {
- if (BitRate>=82 && BitRate<102) //92
- BitRate_Final=90;
- if (BitRate>=55 && BitRate<65) //60
- BitRate_Final=60;
- if (BitRate>=38 && BitRate<48) //43
- BitRate_Final=45;
- }
- if (FrameRate==24)
- {
- if (BitRate>=78 && BitRate<98) //88
- BitRate_Final=90;
- if (BitRate>=53 && BitRate<63) //58
- BitRate_Final=60;
- if (BitRate>=36 && BitRate<46) //41
- BitRate_Final=41;
- }
- }
-
- if (BitRate_Final)
- {
- int64u BitDepth=Retrieve(Stream_Video, Pos, Video_BitDepth).To_int64u();
- if (BitDepth==8 || BitDepth==10)
- Fill(Stream_Video, Pos, Video_Format_Commercial_IfAny, __T("DNxHD ")+Ztring::ToZtring(BitRate_Final)+(BitDepth==10?__T("x"):__T(""))); //"x"=10-bit
- }
- }
- #endif //defined(MEDIAINFO_VC3_YES)
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Streams_Finish_StreamOnly_Audio(size_t Pos)
-{
- //SamplingCount
- if (Retrieve(Stream_Audio, Pos, Audio_SamplingCount).empty())
- {
- int64s Duration=Retrieve(Stream_Audio, Pos, Audio_Duration).To_int64s();
- if (Duration==0)
- Duration=Retrieve(Stream_General, 0, General_Duration).To_int64s();
- float SamplingRate=Retrieve(Stream_Audio, Pos, Audio_SamplingRate).To_float32();
- if (Duration && SamplingRate)
- Fill(Stream_Audio, Pos, Audio_SamplingCount, ((float64)Duration)/1000*SamplingRate, 0);
- }
-
- //Frame count
- if (Retrieve(Stream_Audio, Pos, Audio_FrameCount).empty() && Frame_Count_NotParsedIncluded!=(int64u)-1 && File_Offset+Buffer_Size==File_Size)
- {
- if (Count_Get(Stream_Video)==0 && Count_Get(Stream_Audio)==1)
- Fill(Stream_Audio, 0, Audio_FrameCount, Frame_Count_NotParsedIncluded);
- }
-
- //Duration
- if (Retrieve(Stream_Audio, Pos, Audio_Duration).empty() && Retrieve(Stream_Audio, Pos, Audio_SamplingRate).To_int64u()!=0)
- {
- int64u Duration=Retrieve(Stream_Audio, Pos, Audio_SamplingCount).To_int64u()*1000/Retrieve(Stream_Audio, Pos, Audio_SamplingRate).To_int64u();
- if (Duration)
- Fill(Stream_Audio, Pos, Audio_Duration, Duration);
- }
-
- //Stream size
- if (Retrieve(Stream_Audio, Pos, Audio_StreamSize).empty() && !Retrieve(Stream_Audio, Pos, Audio_BitRate).empty() && !Retrieve(Stream_Audio, Pos, Audio_Duration).empty() && Retrieve(Stream_Audio, Pos, Audio_BitRate_Mode)==__T("CBR"))
- {
- int64u Duration=Retrieve(Stream_Audio, Pos, Audio_Duration).To_int64u();
- int64u BitRate=Retrieve(Stream_Audio, Pos, Audio_BitRate).To_int64u();
- if (Duration && BitRate)
- Fill(Stream_Audio, Pos, Audio_StreamSize, Duration*BitRate/8/1000);
- }
-
- //CBR/VBR
- if (Retrieve(Stream_Audio, Pos, Audio_BitRate_Mode).empty() && !Retrieve(Stream_Audio, Pos, Audio_Codec).empty())
- {
- Ztring Z1=MediaInfoLib::Config.Codec_Get(Retrieve(Stream_Audio, Pos, Audio_Codec), InfoCodec_BitRate_Mode, Stream_Audio);
- if (!Z1.empty())
- Fill(Stream_Audio, Pos, Audio_BitRate_Mode, Z1);
- }
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Streams_Finish_StreamOnly_Text(size_t UNUSED(Pos))
-{
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Streams_Finish_StreamOnly_Other(size_t UNUSED(StreamPos))
-{
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Streams_Finish_StreamOnly_Image(size_t UNUSED(StreamPos))
-{
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Streams_Finish_StreamOnly_Menu(size_t UNUSED(StreamPos))
-{
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Streams_Finish_InterStreams()
-{
- //Duration if General not filled
- if (Retrieve(Stream_General, 0, General_Duration).empty())
- {
- int64u Duration=0;
- //For all streams (Generic)
- for (size_t StreamKind=Stream_Video; StreamKind<Stream_Max; StreamKind++)
- for (size_t Pos=0; Pos<Count_Get((stream_t)StreamKind); Pos++)
- {
- if (!Retrieve((stream_t)StreamKind, Pos, Fill_Parameter((stream_t)StreamKind, Generic_Duration)).empty())
- {
- int64u Duration_Stream=Retrieve((stream_t)StreamKind, Pos, Fill_Parameter((stream_t)StreamKind, Generic_Duration)).To_int64u();
- if (Duration_Stream>Duration)
- Duration=Duration_Stream;
- }
- }
-
- //Filling
- if (Duration>0)
- Fill(Stream_General, 0, General_Duration, Duration);
- }
-
- //(*Stream) size if all stream sizes are OK
- if (Retrieve(Stream_General, 0, General_StreamSize).empty())
- {
- int64u StreamSize_Total=0;
- bool IsOK=true;
- //For all streams (Generic)
- for (size_t StreamKind=Stream_Video; StreamKind<Stream_Max; StreamKind++)
- {
- if (StreamKind!=Stream_Other && StreamKind!=Stream_Menu) //They have no big size, we never calculate them
- for (size_t Pos=0; Pos<Count_Get((stream_t)StreamKind); Pos++)
- {
- if (!Retrieve((stream_t)StreamKind, Pos, Fill_Parameter((stream_t)StreamKind, Generic_StreamSize_Encoded)).empty())
- StreamSize_Total+=Retrieve((stream_t)StreamKind, Pos, Fill_Parameter((stream_t)StreamKind, Generic_StreamSize_Encoded)).To_int64u();
- else if (!Retrieve((stream_t)StreamKind, Pos, Fill_Parameter((stream_t)StreamKind, Generic_StreamSize)).empty())
- StreamSize_Total+=Retrieve((stream_t)StreamKind, Pos, Fill_Parameter((stream_t)StreamKind, Generic_StreamSize)).To_int64u();
- else
- IsOK=false; //StreamSize not available for 1 stream, we can't calculate
- }
- }
-
- //Filling
- if (IsOK && StreamSize_Total>0 && StreamSize_Total<File_Size)
- Fill(Stream_General, 0, General_StreamSize, File_Size-StreamSize_Total);
- }
-
- //OverallBitRate if we have one Audio stream with bitrate
- if (Retrieve(Stream_General, 0, General_Duration).empty() && Retrieve(Stream_General, 0, General_OverallBitRate).empty() && Count_Get(Stream_Video)==0 && Count_Get(Stream_Audio)==1 && Retrieve(Stream_Audio, 0, Audio_BitRate).To_int64u()!=0 && (Retrieve(Stream_General, 0, General_Format)==Retrieve(Stream_Audio, 0, Audio_Format) || !Retrieve(Stream_General, 0, General_HeaderSize).empty()))
- Fill(Stream_General, 0, General_OverallBitRate, Retrieve(Stream_Audio, 0, Audio_BitRate));
-
- //OverallBitRate if Duration
- if (Retrieve(Stream_General, 0, General_OverallBitRate).empty() && Retrieve(Stream_General, 0, General_Duration).To_int64u()!=0 && !Retrieve(Stream_General, 0, General_FileSize).empty())
- {
- float64 Duration=0;
- if (Count_Get(Stream_Video)==1 && Retrieve(Stream_General, 0, General_Duration)==Retrieve(Stream_Video, 0, General_Duration) && !Retrieve(Stream_Video, 0, Video_FrameCount).empty() && !Retrieve(Stream_Video, 0, Video_FrameRate).empty())
- {
- int64u FrameCount=Retrieve(Stream_Video, 0, Video_FrameCount).To_int64u();
- float64 FrameRate=Retrieve(Stream_Video, 0, Video_FrameRate).To_float64();
- if (FrameCount && FrameRate)
- Duration=FrameCount*1000/FrameRate; //More precise (example: 1 frame at 29.97 fps)
- }
- if (Duration==0)
- Duration=Retrieve(Stream_General, 0, General_Duration).To_float64();
- Fill(Stream_General, 0, General_OverallBitRate, Retrieve(Stream_General, 0, General_FileSize).To_int64u()*8*1000/Duration, 0);
- }
-
- //Duration if OverallBitRate
- if (Retrieve(Stream_General, 0, General_Duration).empty() && Retrieve(Stream_General, 0, General_OverallBitRate).To_int64u()!=0)
- Fill(Stream_General, 0, General_Duration, Retrieve(Stream_General, 0, General_FileSize).To_float64()*8*1000/Retrieve(Stream_General, 0, General_OverallBitRate).To_float64(), 0);
-
- //Video bitrate can be the nominal one if <4s (bitrate estimation is not enough precise
- if (Count_Get(Stream_Video)==1 && Retrieve(Stream_Video, 0, Video_BitRate).empty() && Retrieve(Stream_General, 0, General_Duration).To_int64u()<4000)
- {
- Fill(Stream_Video, 0, Video_BitRate, Retrieve(Stream_Video, 0, Video_BitRate_Nominal));
- Clear(Stream_Video, 0, Video_BitRate_Nominal);
- }
-
- //Video bitrate if we have all audio bitrates and overal bitrate
- if (Count_Get(Stream_Video)==1 && Retrieve(Stream_General, 0, General_OverallBitRate).size()>4 && Retrieve(Stream_Video, 0, Video_BitRate).empty() && Retrieve(Stream_Video, 0, Video_BitRate_Encoded).empty() && Retrieve(Stream_General, 0, General_Duration).To_int64u()>=1000) //BitRate is > 10 000 and Duration>10s, to avoid strange behavior
- {
- double GeneralBitRate_Ratio=0.98; //Default container overhead=2%
- int32u GeneralBitRate_Minus=5000; //5000 bps because of a "classic" stream overhead
- double VideoBitRate_Ratio =0.98; //Default container overhead=2%
- int32u VideoBitRate_Minus =2000; //2000 bps because of a "classic" stream overhead
- double AudioBitRate_Ratio =0.98; //Default container overhead=2%
- int32u AudioBitRate_Minus =2000; //2000 bps because of a "classic" stream overhead
- double TextBitRate_Ratio =0.98; //Default container overhead=2%
- int32u TextBitRate_Minus =2000; //2000 bps because of a "classic" stream overhead
- //Specific value depends of Container
- if (IsRawStream)
- {
- GeneralBitRate_Ratio=1;
- GeneralBitRate_Minus=0;
- VideoBitRate_Ratio =1;
- VideoBitRate_Minus =0;
- AudioBitRate_Ratio =1;
- AudioBitRate_Minus =0;
- TextBitRate_Ratio =1;
- TextBitRate_Minus =0;
- }
- if (Get(Stream_General, 0, __T("Format"))==__T("MPEG-TS"))
- {
- GeneralBitRate_Ratio=0.98;
- GeneralBitRate_Minus=0;
- VideoBitRate_Ratio =0.97;
- VideoBitRate_Minus =0;
- AudioBitRate_Ratio =0.96;
- AudioBitRate_Minus =0;
- TextBitRate_Ratio =0.96;
- TextBitRate_Minus =0;
- }
- if (Get(Stream_General, 0, __T("Format"))==__T("MPEG-PS"))
- {
- GeneralBitRate_Ratio=0.99;
- GeneralBitRate_Minus=0;
- VideoBitRate_Ratio =0.99;
- VideoBitRate_Minus =0;
- AudioBitRate_Ratio =0.99;
- AudioBitRate_Minus =0;
- TextBitRate_Ratio =0.99;
- TextBitRate_Minus =0;
- }
- if (MediaInfoLib::Config.Format_Get(Retrieve(Stream_General, 0, General_Format), InfoFormat_KindofFormat)==__T("MPEG-4"))
- {
- GeneralBitRate_Ratio=1;
- GeneralBitRate_Minus=0;
- VideoBitRate_Ratio =1;
- VideoBitRate_Minus =0;
- AudioBitRate_Ratio =1;
- AudioBitRate_Minus =0;
- TextBitRate_Ratio =1;
- TextBitRate_Minus =0;
- }
- if (Get(Stream_General, 0, __T("Format"))==__T("Matroska"))
- {
- GeneralBitRate_Ratio=0.99;
- GeneralBitRate_Minus=0;
- VideoBitRate_Ratio =0.99;
- VideoBitRate_Minus =0;
- AudioBitRate_Ratio =0.99;
- AudioBitRate_Minus =0;
- TextBitRate_Ratio =0.99;
- TextBitRate_Minus =0;
- }
- if (Get(Stream_General, 0, __T("Format"))==__T("MXF"))
- {
- GeneralBitRate_Ratio=1;
- GeneralBitRate_Minus=1000;
- VideoBitRate_Ratio =1.00;
- VideoBitRate_Minus =1000;
- AudioBitRate_Ratio =1.00;
- AudioBitRate_Minus =1000;
- TextBitRate_Ratio =1.00;
- TextBitRate_Minus =1000;
- }
-
- //Testing
- float64 VideoBitRate=Retrieve(Stream_General, 0, General_OverallBitRate).To_float64()*GeneralBitRate_Ratio-GeneralBitRate_Minus;
- bool VideobitRateIsValid=true;
- for (size_t Pos=0; Pos<Count_Get(Stream_Audio); Pos++)
- {
- float64 AudioBitRate=0;
- if (!Retrieve(Stream_Audio, Pos, Audio_BitRate_Encoded).empty() && Retrieve(Stream_Audio, Pos, Audio_BitRate_Encoded)[0]<=__T('9')) //Note: quick test if it is a number
- AudioBitRate=Retrieve(Stream_Audio, Pos, Audio_BitRate_Encoded).To_float64();
- else if (!Retrieve(Stream_Audio, Pos, Audio_BitRate).empty() && Retrieve(Stream_Audio, Pos, Audio_BitRate)[0]<=__T('9')) //Note: quick test if it is a number
- AudioBitRate=Retrieve(Stream_Audio, Pos, Audio_BitRate).To_float64();
- else
- VideobitRateIsValid=false;
- if (VideobitRateIsValid && AudioBitRate_Ratio)
- VideoBitRate-=AudioBitRate/AudioBitRate_Ratio+AudioBitRate_Minus;
- }
- for (size_t Pos=0; Pos<Count_Get(Stream_Text); Pos++)
- {
- float64 TextBitRate;
- if (Retrieve(Stream_Text, Pos, Text_BitRate_Encoded).empty())
- TextBitRate=Retrieve(Stream_Text, Pos, Text_BitRate).To_float64();
- else
- TextBitRate=Retrieve(Stream_Text, Pos, Text_BitRate_Encoded).To_float64();
- if (TextBitRate_Ratio)
- VideoBitRate-=TextBitRate/TextBitRate_Ratio+TextBitRate_Minus;
- else
- VideoBitRate-=1000; //Estimation: Text stream are not often big
- }
- if (VideobitRateIsValid && VideoBitRate>=10000) //to avoid strange behavior
- {
- VideoBitRate=VideoBitRate*VideoBitRate_Ratio-VideoBitRate_Minus;
- Fill(Stream_Video, 0, Video_BitRate, VideoBitRate, 0); //Default container overhead=2%
- if (Retrieve(Stream_Video, 0, Video_StreamSize).empty() && !Retrieve(Stream_Video, 0, Video_Duration).empty())
- {
- float64 Duration=0;
- if (!Retrieve(Stream_Video, 0, Video_FrameCount).empty() && !Retrieve(Stream_Video, 0, Video_FrameRate).empty())
- {
- int64u FrameCount=Retrieve(Stream_Video, 0, Video_FrameCount).To_int64u();
- float64 FrameRate=Retrieve(Stream_Video, 0, Video_FrameRate).To_float64();
- if (FrameCount && FrameRate)
- Duration=FrameCount*1000/FrameRate; //More precise (example: 1 frame at 29.97 fps)
- }
- if (Duration==0)
- Duration=Retrieve(Stream_Video, 0, Video_Duration).To_float64();
- if (Duration)
- {
- int64u StreamSize=float64_int64s(VideoBitRate/8*Duration/1000);
- if (IsRawStream && File_Size!=(int64u)-1 && StreamSize>=File_Size*0.99)
- StreamSize=File_Size;
- Fill(Stream_Video, 0, Video_StreamSize, StreamSize);
- }
- }
- }
- }
-
- //General stream size if we have all streamsize
- if (File_Size!=(int64u)-1 && Retrieve(Stream_General, 0, General_StreamSize).empty())
- {
- //Testing
- int64s StreamSize=File_Size;
- bool StreamSizeIsValid=true;
- for (size_t StreamKind_Pos=Stream_General+1; StreamKind_Pos<Stream_Menu; StreamKind_Pos++)
- for (size_t Pos=0; Pos<Count_Get((stream_t)StreamKind_Pos); Pos++)
- {
- int64u StreamXX_StreamSize=Retrieve((stream_t)StreamKind_Pos, Pos, Fill_Parameter((stream_t)StreamKind_Pos, Generic_StreamSize)).To_int64u();
- if (StreamXX_StreamSize>0 || StreamKind_Pos==Stream_Text)
- StreamSize-=StreamXX_StreamSize;
- else
- StreamSizeIsValid=false;
- }
- if (StreamSizeIsValid && StreamSize>=0) //to avoid strange behavior
- Fill(Stream_General, 0, General_StreamSize, StreamSize);
- }
-
- //General_OverallBitRate_Mode
- if (Retrieve(Stream_General, 0, General_OverallBitRate_Mode).empty())
- {
- bool IsValid=false;
- bool IsCBR=true;
- bool IsVBR=false;
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Menu; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- {
- if (!IsValid)
- IsValid=true;
- if (Retrieve((stream_t)StreamKind, StreamPos, Fill_Parameter((stream_t)StreamKind, Generic_BitRate_Mode))!=__T("CBR"))
- IsCBR=false;
- if (Retrieve((stream_t)StreamKind, StreamPos, Fill_Parameter((stream_t)StreamKind, Generic_BitRate_Mode))==__T("VBR"))
- IsVBR=true;
- }
- if (IsValid)
- {
- if (IsCBR)
- Fill(Stream_General, 0, General_OverallBitRate_Mode, "CBR");
- if (IsVBR)
- Fill(Stream_General, 0, General_OverallBitRate_Mode, "VBR");
- }
- }
-
- //FrameRate if General not filled
- if (Retrieve(Stream_General, 0, General_FrameRate).empty() && Count_Get(Stream_Video))
- {
- Ztring FrameRate=Retrieve(Stream_Video, 0, Video_FrameRate);
- bool IsOk=true;
- if (FrameRate.empty())
- {
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- {
- Ztring FrameRate2=Retrieve((stream_t)StreamKind, StreamPos, Fill_Parameter((stream_t)StreamKind, Generic_FrameRate));
- if (!FrameRate2.empty() && FrameRate2!=FrameRate)
- IsOk=false;
- }
- }
- if (IsOk)
- Fill(Stream_General, 0, General_FrameRate, FrameRate);
- }
-
- //FrameCount if General not filled
- if (Retrieve(Stream_General, 0, General_FrameCount).empty() && Count_Get(Stream_Video))
- {
- Ztring FrameCount=Retrieve(Stream_Video, 0, Video_FrameCount);
- bool IsOk=true;
- if (FrameCount.empty())
- {
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- {
- Ztring FrameCount2=Retrieve((stream_t)StreamKind, StreamPos, Fill_Parameter((stream_t)StreamKind, Generic_FrameCount));
- if (!FrameCount2.empty() && FrameCount2!=FrameCount)
- IsOk=false;
- }
- }
- if (IsOk)
- Fill(Stream_General, 0, General_FrameCount, FrameCount);
- }
-
- //Tags
- Tags();
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Streams_Finish_HumanReadable()
-{
- //Generic
- for (size_t StreamKind=Stream_General; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- for (size_t Parameter=0; Parameter<Count_Get((stream_t)StreamKind, StreamPos); Parameter++)
- Streams_Finish_HumanReadable_PerStream((stream_t)StreamKind, StreamPos, Parameter);
-}
-
-//---------------------------------------------------------------------------
-void File__Analyze::Streams_Finish_HumanReadable_PerStream(stream_t StreamKind, size_t StreamPos, size_t Parameter)
-{
- Ztring ParameterName=Retrieve(StreamKind, StreamPos, Parameter, Info_Name);
- Ztring Value=Retrieve(StreamKind, StreamPos, Parameter, Info_Text);
-
- //Strings
- const Ztring &List_Measure_Value=MediaInfoLib::Config.Info_Get(StreamKind).Read(Parameter, Info_Measure);
- if (List_Measure_Value==__T(" byte"))
- FileSize_FileSize123(StreamKind, StreamPos, Parameter);
- else if (List_Measure_Value==__T(" bps") || List_Measure_Value==__T(" Hz"))
- Kilo_Kilo123(StreamKind, StreamPos, Parameter);
- else if (List_Measure_Value==__T(" ms"))
- Duration_Duration123(StreamKind, StreamPos, Parameter);
- else if (List_Measure_Value==__T("Yes"))
- YesNo_YesNo(StreamKind, StreamPos, Parameter);
- else
- {
- Value_Value123(StreamKind, StreamPos, Parameter);
-
- //Special cases - 120 fps 24/30 mode
- if (StreamKind==Stream_Video
- && List_Measure_Value==__T(" fps")
- && Retrieve(StreamKind, StreamPos, Video_FrameRate).To_int32u()==120
- && Retrieve(StreamKind, StreamPos, Video_FrameRate_Minimum).To_int32u()==24
- && Retrieve(StreamKind, StreamPos, Video_FrameRate_Maximum).To_int32u()==30)
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate_String, MediaInfoLib::Config.Language_Get(Retrieve(StreamKind, StreamPos, Video_FrameRate)+__T(" (24/30)"), __T(" fps")), true);
- }
-
- //BitRate_Mode / OverallBitRate_Mode
- if (ParameterName==(StreamKind==Stream_General?__T("OverallBitRate_Mode"):__T("BitRate_Mode")) && MediaInfoLib::Config.ReadByHuman_Get())
- {
- Clear(StreamKind, StreamPos, StreamKind==Stream_General?"OverallBitRate_Mode/String":"BitRate_Mode/String");
-
- ZtringList List;
- List.Separator_Set(0, __T(" / "));
- List.Write(Retrieve(StreamKind, StreamPos, Parameter));
-
- //Per value
- for (size_t Pos=0; Pos<List.size(); Pos++)
- List[Pos]=MediaInfoLib::Config.Language_Get(Ztring(__T("BitRate_Mode_"))+List[Pos]);
-
- Ztring Translated=List.Read();
- Fill(StreamKind, StreamPos, StreamKind==Stream_General?"OverallBitRate_Mode/String":"BitRate_Mode/String", Translated.find(__T("BitRate_Mode_"))?Translated:Value);
- }
-
- //Encoded_Application
- if (( ParameterName==__T("Encoded_Application")
- || ParameterName==__T("Encoded_Application_CompanyName")
- || ParameterName==__T("Encoded_Application_Name")
- || ParameterName==__T("Encoded_Application_Version")
- || ParameterName==__T("Encoded_Application_Date"))
- && Retrieve(StreamKind, StreamPos, "Encoded_Application/String").empty())
- {
- Ztring CompanyName=Retrieve(StreamKind, StreamPos, "Encoded_Application_CompanyName");
- Ztring Name=Retrieve(StreamKind, StreamPos, "Encoded_Application_Name");
- Ztring Version=Retrieve(StreamKind, StreamPos, "Encoded_Application_Version");
- Ztring Date=Retrieve(StreamKind, StreamPos, "Encoded_Application_Date");
- if (!Name.empty())
- {
- Ztring String;
- if (!CompanyName.empty())
- {
- String+=CompanyName;
- String+=__T(" ");
- }
- String+=Name;
- if (!Version.empty())
- {
- String+=__T(" ");
- String+=Version;
- }
- if (!Date.empty())
- {
- String+=__T(" (");
- String+=Date;
- String+=__T(")");
- }
- Fill(StreamKind, StreamPos, "Encoded_Application/String", String, true);
- }
- else
- Fill(StreamKind, StreamPos, "Encoded_Application/String", Retrieve(StreamKind, StreamPos, "Encoded_Application"), true);
- }
-
- //Encoded_Library
- if (( ParameterName==__T("Encoded_Library")
- || ParameterName==__T("Encoded_Library_CompanyName")
- || ParameterName==__T("Encoded_Library_Name")
- || ParameterName==__T("Encoded_Library_Version")
- || ParameterName==__T("Encoded_Library_Date"))
- && Retrieve(StreamKind, StreamPos, "Encoded_Library/String").empty())
- {
- Ztring CompanyName=Retrieve(StreamKind, StreamPos, "Encoded_Library_CompanyName");
- Ztring Name=Retrieve(StreamKind, StreamPos, "Encoded_Library_Name");
- Ztring Version=Retrieve(StreamKind, StreamPos, "Encoded_Library_Version");
- Ztring Date=Retrieve(StreamKind, StreamPos, "Encoded_Library_Date");
- if (!Name.empty())
- {
- Ztring String;
- if (!CompanyName.empty())
- {
- String+=CompanyName;
- String+=__T(" ");
- }
- String+=Name;
- if (!Version.empty())
- {
- String+=__T(" ");
- String+=Version;
- }
- if (!Date.empty())
- {
- String+=__T(" (");
- String+=Date;
- String+=__T(")");
- }
- Fill(StreamKind, StreamPos, "Encoded_Library/String", String, true);
- }
- else
- Fill(StreamKind, StreamPos, "Encoded_Library/String", Retrieve(StreamKind, StreamPos, "Encoded_Library"), true);
- }
-
- //Format_Settings_Matrix
- if (StreamKind==Stream_Video && Parameter==Video_Format_Settings_Matrix)
- {
- Ztring Translated=MediaInfoLib::Config.Language_Get(Ztring(__T("Format_Settings_Matrix_"))+Value);
- Fill(Stream_Video, StreamPos, Video_Format_Settings_Matrix_String, Translated.find(__T("Format_Settings_Matrix_"))?Translated:Value);
- }
-
- //Scan type
- if (StreamKind==Stream_Video && Parameter==Video_ScanType)
- {
- Ztring Translated=MediaInfoLib::Config.Language_Get(Ztring(__T("Interlaced_"))+Value);
- Fill(Stream_Video, StreamPos, Video_ScanType_String, Translated.find(__T("Interlaced_"))?Translated:Value);
- }
- if (StreamKind==Stream_Video && Parameter==Video_ScanType_Original)
- {
- Ztring Translated=MediaInfoLib::Config.Language_Get(Ztring(__T("Interlaced_"))+Value);
- Fill(Stream_Video, StreamPos, Video_ScanType_Original_String, Translated.find(__T("Interlaced_"))?Translated:Value);
- }
- if (StreamKind==Stream_Video && Parameter==Video_ScanType_StoreMethod)
- {
- Ztring ToTranslate=Ztring(__T("StoreMethod_"))+Value;
- if (!Retrieve(Stream_Video, StreamPos, Video_ScanType_StoreMethod_FieldsPerBlock).empty())
- ToTranslate+=__T('_')+Retrieve(Stream_Video, StreamPos, Video_ScanType_StoreMethod_FieldsPerBlock);
- Ztring Translated=MediaInfoLib::Config.Language_Get(ToTranslate);
- Fill(Stream_Video, StreamPos, Video_ScanType_StoreMethod_String, Translated.find(__T("StoreMethod_"))?Translated:Value);
- }
-
- //Scan order
- if (StreamKind==Stream_Video && Parameter==Video_ScanOrder)
- {
- Ztring Translated=MediaInfoLib::Config.Language_Get(Ztring(__T("Interlaced_"))+Value);
- Fill(Stream_Video, StreamPos, Video_ScanOrder_String, Translated.find(__T("Interlaced_"))?Translated:Value);
- }
- if (StreamKind==Stream_Video && Parameter==Video_ScanOrder_Stored)
- {
- Ztring Translated=MediaInfoLib::Config.Language_Get(Ztring(__T("Interlaced_"))+Value);
- Fill(Stream_Video, StreamPos, Video_ScanOrder_Stored_String, Translated.find(__T("Interlaced_"))?Translated:Value);
- }
- if (StreamKind==Stream_Video && Parameter==Video_ScanOrder_Original)
- {
- Ztring Translated=MediaInfoLib::Config.Language_Get(Ztring(__T("Interlaced_"))+Value);
- Fill(Stream_Video, StreamPos, Video_ScanOrder_Original_String, Translated.find(__T("Interlaced_"))?Translated:Value);
- }
-
- //Interlacement
- if (StreamKind==Stream_Video && Parameter==Video_Interlacement)
- {
- const Ztring &Z1=Retrieve(Stream_Video, StreamPos, Video_Interlacement);
- if (Z1.size()==3)
- Fill(Stream_Video, StreamPos, Video_Interlacement_String, MediaInfoLib::Config.Language_Get(Ztring(__T("Interlaced_"))+Z1));
- else
- Fill(Stream_Video, StreamPos, Video_Interlacement_String, MediaInfoLib::Config.Language_Get(Z1));
- if (Retrieve(Stream_Video, StreamPos, Video_Interlacement_String).empty())
- Fill(Stream_Video, StreamPos, Video_Interlacement_String, Z1, true);
- }
-
- //FrameRate_Mode
- if (StreamKind==Stream_Video && Parameter==Video_FrameRate_Mode)
- {
- Ztring Translated=MediaInfoLib::Config.Language_Get(Ztring(__T("FrameRate_Mode_"))+Value);
- Fill(Stream_Video, StreamPos, Video_FrameRate_Mode_String, Translated.find(__T("FrameRate_Mode_"))?Translated:Value);
- }
-
- //Compression_Mode
- if (Parameter==Fill_Parameter(StreamKind, Generic_Compression_Mode))
- {
- Ztring Translated=MediaInfoLib::Config.Language_Get(Ztring(__T("Compression_Mode_"))+Value);
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Compression_Mode_String), Translated.find(__T("Compression_Mode_"))?Translated:Value);
- }
-
- //Delay_Source
- if (Parameter==Fill_Parameter(StreamKind, Generic_Delay_Source))
- {
- Ztring Translated=MediaInfoLib::Config.Language_Get(Ztring(__T("Delay_Source_"))+Value);
- Fill(StreamKind, StreamPos, Fill_Parameter(StreamKind, Generic_Delay_Source_String), Translated.find(__T("Delay_Source_"))?Translated:Value);
- }
-
- //Gop_OpenClosed
- if (StreamKind==Stream_Video && (Parameter==Video_Gop_OpenClosed || Parameter==Video_Gop_OpenClosed_FirstFrame))
- {
- Ztring Translated=MediaInfoLib::Config.Language_Get(Ztring(__T("Gop_OpenClosed_"))+Value);
- Fill(Stream_Video, StreamPos, Parameter+1, Translated.find(__T("Gop_OpenClosed_"))?Translated:Value, true);
- }
-}
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__Base.cpp b/src/thirdparty/MediaInfo/MediaInfo/File__Base.cpp
deleted file mode 100644
index f3adb2b02..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__Base.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Base.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "ZenLib/File.h"
-#include <cstring>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Gestion de la classe
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//Constructeurs
-File__Base::File__Base ()
-{
- //Init pointers
- #if MEDIAINFO_TRACE
- Details=NULL;
- #endif //MEDIAINFO_TRACE
- Stream=NULL;
- Stream_More=NULL;
- Stream_MustBeDeleted=false;
-
- //File
- File_Size=(int64u)-1;
- File_Offset=0;
- File_Offset_FirstSynched=(int64u)-1;
- File_GoTo=(int64u)-1;
-
- //Optimization init
- StreamKind_Last=Stream_Max;
- StreamPos_Last=Error;
-
- //Config
- Config=NULL;
-}
-
-//---------------------------------------------------------------------------
-//Constructeurs
-File__Base::~File__Base ()
-{
- if (Stream_MustBeDeleted)
- {
- delete Stream; //Stream=NULL;
- delete Stream_More; //Stream_More=NULL;
- }
-}
-
-//---------------------------------------------------------------------------
-//Base
-#if MEDIAINFO_TRACE
-void File__Base::Init (MediaInfo_Config_MediaInfo * Config_, Ztring* Details_, std::vector<std::vector<ZtringList> > * Stream_, std::vector<std::vector<ZtringListList> > * Stream_More_)
-#else //MEDIAINFO_TRACE
-void File__Base::Init (MediaInfo_Config_MediaInfo * Config_, std::vector<std::vector<ZtringList> > * Stream_, std::vector<std::vector<ZtringListList> > * Stream_More_)
-#endif //MEDIAINFO_TRACE
-{
- if (Config)
- return; //Already done
-
- if (Stream_)
- {
- Stream=Stream_;
- Stream_More=Stream_More_;
- Stream_MustBeDeleted=false;
- }
- else
- {
- Stream=new std::vector<std::vector<ZtringList> >;
- Stream->resize(Stream_Max);
- Stream_More=new std::vector<std::vector<ZtringListList> >;
- Stream_More->resize(Stream_Max);
- Stream_MustBeDeleted=true;
- }
-
- Config=Config_;
- #if MEDIAINFO_TRACE
- Details=Details_;
- #endif //MEDIAINFO_TRACE
-}
-
-//***************************************************************************
-// Fonctions
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t File__Base::Count_Get (stream_t StreamKind, size_t Pos) const
-{
- //Integrity
- if (StreamKind>=Stream_Max)
- return 0;
-
- //Count of streams
- if (!Stream)
- return 0;
- if (Pos==Error)
- return (*Stream)[StreamKind].size();
-
- //Integrity
- if (Pos>=(*Stream)[StreamKind].size())
- return 0;
-
- //Count of piece of information in a stream
- return MediaInfoLib::Config.Info_Get(StreamKind).size()+(*Stream_More)[StreamKind][Pos].size();
-}
-
-//---------------------------------------------------------------------------
-const Ztring &File__Base::Get (stream_t StreamKind, size_t StreamNumber, size_t Parameter, info_t KindOfInfo)
-{
- //Check integrity
- if (StreamKind>=Stream_Max || StreamNumber>=(*Stream)[StreamKind].size() || Parameter>=MediaInfoLib::Config.Info_Get(StreamKind).size()+(StreamNumber>=(*Stream_More)[StreamKind].size()?0:(*Stream_More)[StreamKind][StreamNumber].size()) || KindOfInfo>=Info_Max)
- return MediaInfoLib::Config.EmptyString_Get(); //Parameter is unknown
-
- else if (Parameter<MediaInfoLib::Config.Info_Get(StreamKind).size())
- {
- //Optimization : KindOfInfo>Info_Text is in static lists
- if (KindOfInfo!=Info_Text)
- return MediaInfoLib::Config.Info_Get(StreamKind)[Parameter][KindOfInfo]; //look for static information only
- else if (Parameter<(*Stream)[StreamKind][StreamNumber].size())
- return (*Stream)[StreamKind][StreamNumber][Parameter];
- else
- return MediaInfoLib::Config.EmptyString_Get(); //This parameter is known, but not filled
- }
- else
- {
- if (((size_t)(Parameter-MediaInfoLib::Config.Info_Get(StreamKind).size()))<(*Stream_More)[StreamKind][StreamNumber].size() && ((size_t)KindOfInfo)<(*Stream_More)[StreamKind][StreamNumber][Parameter-MediaInfoLib::Config.Info_Get(StreamKind).size()].size())
- return (*Stream_More)[StreamKind][StreamNumber][Parameter-MediaInfoLib::Config.Info_Get(StreamKind).size()][KindOfInfo];
- else
- return MediaInfoLib::Config.EmptyString_Get(); //Not filled
- }
-}
-
-//---------------------------------------------------------------------------
-const Ztring &File__Base::Get (stream_t StreamKind, size_t StreamPos, const Ztring &Parameter, info_t KindOfInfo, info_t KindOfSearch)
-{
- size_t ParameterI=0;
-
- //Check integrity
- if (StreamKind>=Stream_Max || StreamPos>=(*Stream)[StreamKind].size() || KindOfInfo>=Info_Max)
- return MediaInfoLib::Config.EmptyString_Get();
- if ((ParameterI=MediaInfoLib::Config.Info_Get(StreamKind).Find(Parameter, KindOfSearch))==Error)
- {
- ParameterI=(*Stream_More)[StreamKind][StreamPos].Find(Parameter, KindOfSearch);
- if (ParameterI==Error)
- return MediaInfoLib::Config.EmptyString_Get(); //Parameter is unknown
- return (*Stream_More)[StreamKind][StreamPos][ParameterI](KindOfInfo);
- }
-
- return Get(StreamKind, StreamPos, ParameterI, KindOfInfo);
-}
-
-//---------------------------------------------------------------------------
-int File__Base::Set (stream_t StreamKind, size_t StreamNumber, size_t Parameter, const Ztring &ToSet, const Ztring &OldValue)
-{
- //Integrity
- if (Count_Get(StreamKind)<=StreamNumber)
- return 0;
-
- return Set(StreamKind, StreamNumber, Get(StreamKind, StreamNumber, Parameter, Info_Name), ToSet, OldValue);
-}
-
-//---------------------------------------------------------------------------
-int File__Base::Set (stream_t StreamKind, size_t StreamNumber, const Ztring &Parameter, const Ztring &ToSet, const Ztring &OldValue)
-{
- //Integrity
- if (Count_Get(StreamKind)<=StreamNumber)
- return 0;
-
- return Write(StreamKind, StreamNumber, Parameter, ToSet, OldValue);
-}
-
-//---------------------------------------------------------------------------
-void File__Base::Language_Set()
-{
-}
-
-//***************************************************************************
-// Divers
-//***************************************************************************
-
-void File__Base::Clear()
-{
- for (size_t StreamKind=0; StreamKind<Stream_Max; StreamKind++)
- {
- (*Stream)[StreamKind].clear();
- (*Stream_More)[StreamKind].clear();
- }
-}
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__Base.h b/src/thirdparty/MediaInfo/MediaInfo/File__Base.h
deleted file mode 100644
index 2eddfaa5d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__Base.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Give common methods for all file types
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo__BaseH
-#define MediaInfo__BaseH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Config.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class MediaInfo_Config_MediaInfo;
-
-//***************************************************************************
-// Class File__Base
-//***************************************************************************
-
-class File__Base
-{
-public :
- //Constructor/Destructor
- File__Base();
- virtual ~File__Base();
- #if MEDIAINFO_TRACE
- void Init(MediaInfo_Config_MediaInfo * Config, Ztring* Details, std::vector<std::vector<ZtringList> > * Stream_=NULL, std::vector<std::vector<ZtringListList> > * Stream_More=NULL);
- #else //MEDIAINFO_TRACE
- void Init(MediaInfo_Config_MediaInfo * Config, std::vector<std::vector<ZtringList> > * Stream_=NULL, std::vector<std::vector<ZtringListList> > * Stream_More=NULL);
- #endif //MEDIAINFO_TRACE
-
- //Save
- int Save ();
-
- //Get information
- const Ztring &Get (stream_t StreamKind, size_t StreamNumber, size_t Parameter, info_t KindOfInfo=Info_Text);
- virtual const Ztring &Get (stream_t StreamKind, size_t StreamNumber, const Ztring &Parameter, info_t KindOfInfo=Info_Text, info_t KindOfSearch=Info_Name);
-
- //Set information
- int Set (stream_t StreamKind, size_t StreamNumber, size_t Parameter, const Ztring &ToSet, const Ztring &OldValue=__T(""));
- int Set (stream_t StreamKind, size_t StreamNumber, const Ztring &Parameter, const Ztring &ToSet, const Ztring &OldValue=__T(""));
-
- //Output buffer
- virtual size_t Output_Buffer_Get (const String &) {return 0;};
- virtual size_t Output_Buffer_Get (size_t) {return 0;};
-
- //Options
- size_t Count_Get (stream_t StreamKind, size_t Pos=Error) const;
- void Language_Set (); //Update language for an existing File__Base
-
-protected :
- //Read
- virtual void Read_Buffer_Init () {} //To overload
- virtual void Read_Buffer_Unsynched() {} //To overload
- virtual void Read_Buffer_Continue () {} //To overload
- virtual void Read_Buffer_Finalize () {} //To overload
-
- //Write
- virtual int Write (stream_t /*StreamKind*/, size_t /*StreamNumber*/, const Ztring &/*Parameter*/, const Ztring &/*ToSet*/, const Ztring &/*OldValue*/) {return -1;} //Write the value in memory
- virtual int WriteToDisk () {return -1;} //Write modified tags on disk
-
- //Arrays
-public : //TODO:put it as private
- std::vector<std::vector<ZtringList> > * Stream; //pointer to others listed streams
- std::vector<std::vector<ZtringListList> > * Stream_More; //pointer to others listed streams
- bool Stream_MustBeDeleted;
-protected :
- stream_t StreamKind_Last;
- size_t StreamPos_Last;
-
- //Config
- MediaInfo_Config_MediaInfo* Config;
-
- //Details
- #if MEDIAINFO_TRACE
- Ztring* Details;
- #endif //MEDIAINFO_TRACE
-
-public :
- #if MEDIAINFO_TRACE
- void Details_Add(const char* Parameter);
- #endif //MEDIAINFO_TRACE
- virtual void Option_Manage() {};
-
- //File
- Ztring File_Name;
- int64u File_Size;
- int64u File_Offset;
- int64u File_Offset_FirstSynched;
- int64u File_GoTo; //How many byte to skip?
-
- //Divers
- void Clear();
-
-private :
- //Constructor
- File__Base (const File__Base&); // Prevent copy-construction
- File__Base& operator=(const File__Base&); // Prevent assignment
-
-public : //A virer
- friend class File__Analyze;
- friend class File__MultipleParsing;
- friend class File__ReferenceFilesHelper;
- friend class resource;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__Duplicate.cpp b/src/thirdparty/MediaInfo/MediaInfo/File__Duplicate.cpp
deleted file mode 100644
index f4d53ab11..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__Duplicate.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Duplication helper for some specific formats
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DUPLICATE
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Duplicate.h"
-#include "MediaInfo/MediaInfo_Config.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "ZenLib/ZtringList.h"
-#include "ZenLib/File.h"
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-File__Duplicate::File__Duplicate ()
-:File__Analyze()
-{
- //Temp
- File__Duplicate_HasChanged_=false;
- File__Duplicate_Needed=false;
- Config_File_Duplicate_Get_AlwaysNeeded_Count=0;
-}
-
-File__Duplicate::~File__Duplicate ()
-{
-}
-
-//***************************************************************************
-// Get
-//***************************************************************************
-
-bool File__Duplicate::File__Duplicate_Get ()
-{
- return File__Duplicate_Needed;
-}
-
-bool File__Duplicate::File__Duplicate_HasChanged ()
-{
- //Retrieving general configuration
- while (Config->File_Duplicate_Get_AlwaysNeeded(Config_File_Duplicate_Get_AlwaysNeeded_Count))
- {
- if (File__Duplicate_Set(Config->File_Duplicate_Get(Config_File_Duplicate_Get_AlwaysNeeded_Count)))
- File__Duplicate_HasChanged_=true;
- Config_File_Duplicate_Get_AlwaysNeeded_Count++;
- }
-
- bool File__Duplicate_HasChanged_Temp=File__Duplicate_HasChanged_;
- File__Duplicate_HasChanged_=false;
- return File__Duplicate_HasChanged_Temp;
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_DUPLICATE
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__Duplicate.h b/src/thirdparty/MediaInfo/MediaInfo/File__Duplicate.h
deleted file mode 100644
index f1715aeb4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__Duplicate.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef File__DuplicateH
-#define File__DuplicateH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Duplicate/File__Duplicate__Writer.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File__Duplicate
-//***************************************************************************
-
-class File__Duplicate : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File__Duplicate();
- virtual ~File__Duplicate();
-
-protected :
- virtual bool File__Duplicate_Set (const Ztring &Value)=0; //Fill a new File__Duplicate value
-
- //Get
- bool File__Duplicate_Get ();
-
- //Modifications
- bool File__Duplicate_HasChanged();
-
-private :
- bool File__Duplicate_HasChanged_;
- bool File__Duplicate_Needed;
- size_t Config_File_Duplicate_Get_AlwaysNeeded_Count;
-};
-
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__MultipleParsing.cpp b/src/thirdparty/MediaInfo/MediaInfo/File__MultipleParsing.cpp
deleted file mode 100644
index 746d22526..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__MultipleParsing.cpp
+++ /dev/null
@@ -1,849 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__MultipleParsing.h"
-//---------------------------------------------------------------------------
-// Multiple
-#if defined(MEDIAINFO_AAF_YES)
- #include "MediaInfo/Multiple/File_Aaf.h"
-#endif
-#if defined(MEDIAINFO_BDMV_YES)
- #include "MediaInfo/Multiple/File_Bdmv.h"
-#endif
-#if defined(MEDIAINFO_CDXA_YES)
- #include "MediaInfo/Multiple/File_Cdxa.h"
-#endif
-#if defined(MEDIAINFO_DASHMPD_YES)
- #include "MediaInfo/Multiple/File_DashMpd.h"
-#endif
-#if defined(MEDIAINFO_DCP_YES)
- #include "MediaInfo/Multiple/File_DcpAm.h"
-#endif
-#if defined(MEDIAINFO_DCP_YES)
- #include "MediaInfo/Multiple/File_DcpCpl.h"
-#endif
-#if defined(MEDIAINFO_DCP_YES)
- #include "MediaInfo/Multiple/File_DcpPkl.h"
-#endif
-#if defined(MEDIAINFO_DPG_YES)
- #include "MediaInfo/Multiple/File_Dpg.h"
-#endif
-#if defined(MEDIAINFO_DVDIF_YES)
- #include "MediaInfo/Multiple/File_DvDif.h"
-#endif
-#if defined(MEDIAINFO_DVDV_YES)
- #include "MediaInfo/Multiple/File_Dvdv.h"
-#endif
-#if defined(MEDIAINFO_DXW_YES)
- #include "MediaInfo/Multiple/File_Dxw.h"
-#endif
-#if defined(MEDIAINFO_FLV_YES)
- #include "MediaInfo/Multiple/File_Flv.h"
-#endif
-#if defined(MEDIAINFO_GXF_YES)
- #include "MediaInfo/Multiple/File_Gxf.h"
-#endif
-#if defined(MEDIAINFO_HDSF4M_YES)
- #include "MediaInfo/Multiple/File_HdsF4m.h"
-#endif
-#if defined(MEDIAINFO_HLS_YES)
- #include "MediaInfo/Multiple/File_Hls.h"
-#endif
-#if defined(MEDIAINFO_IBI_YES)
- #include "MediaInfo/Multiple/File_Ibi.h"
-#endif
-#if defined(MEDIAINFO_ISM_YES)
- #include "MediaInfo/Multiple/File_Ism.h"
-#endif
-#if defined(MEDIAINFO_IMF_YES)
- #include "MediaInfo/Multiple/File_ImfCpl.h"
-#endif
-#if defined(MEDIAINFO_IVF_YES)
- #include "MediaInfo/Multiple/File_Ivf.h"
-#endif
-#if defined(MEDIAINFO_LXF_YES)
- #include "MediaInfo/Multiple/File_Lxf.h"
-#endif
-#if defined(MEDIAINFO_MK_YES)
- #include "MediaInfo/Multiple/File_Mk.h"
-#endif
-#if defined(MEDIAINFO_MPEG4_YES)
- #include "MediaInfo/Multiple/File_Mpeg4.h"
-#endif
-#if defined(MEDIAINFO_MPEGPS_YES)
- #include "MediaInfo/Multiple/File_MpegPs.h"
-#endif
-#if defined(MEDIAINFO_MPEGTS_YES) || defined(MEDIAINFO_BDAV_YES) || defined(MEDIAINFO_TSP_YES)
- #include "MediaInfo/Multiple/File_MpegTs.h"
-#endif
-#if defined(MEDIAINFO_MXF_YES)
- #include "MediaInfo/Multiple/File_Mxf.h"
-#endif
-#if defined(MEDIAINFO_NUT_YES)
- #include "MediaInfo/Multiple/File_Nut.h"
-#endif
-#if defined(MEDIAINFO_OGG_YES)
- #include "MediaInfo/Multiple/File_Ogg.h"
-#endif
-#if defined(MEDIAINFO_P2_YES)
- #include "MediaInfo/Multiple/File_P2_Clip.h"
-#endif
-#if defined(MEDIAINFO_PMP_YES)
- #include "MediaInfo/Multiple/File_Pmp.h"
-#endif
-#if defined(MEDIAINFO_PTX_YES)
- #include "MediaInfo/Multiple/File_Ptx.h"
-#endif
-#if defined(MEDIAINFO_RIFF_YES)
- #include "MediaInfo/Multiple/File_Riff.h"
-#endif
-#if defined(MEDIAINFO_RM_YES)
- #include "MediaInfo/Multiple/File_Rm.h"
-#endif
-#if defined(MEDIAINFO_SEQUENCEINFO_YES)
- #include "MediaInfo/Multiple/File_SequenceInfo.h"
-#endif
-#if defined(MEDIAINFO_SKM_YES)
- #include "MediaInfo/Multiple/File_Skm.h"
-#endif
-#if defined(MEDIAINFO_SWF_YES)
- #include "MediaInfo/Multiple/File_Swf.h"
-#endif
-#if defined(MEDIAINFO_WM_YES)
- #include "MediaInfo/Multiple/File_Wm.h"
-#endif
-#if defined(MEDIAINFO_XDCAM_YES)
- #include "MediaInfo/Multiple/File_Xdcam_Clip.h"
-#endif
-
-//---------------------------------------------------------------------------
-// Video
-#if defined(MEDIAINFO_AVC_YES)
- #include "MediaInfo/Video/File_Avc.h"
-#endif
-#if defined(MEDIAINFO_AVSV_YES)
- #include "MediaInfo/Video/File_AvsV.h"
-#endif
-#if defined(MEDIAINFO_DIRAC_YES)
- #include "MediaInfo/Video/File_Dirac.h"
-#endif
-#if defined(MEDIAINFO_FLIC_YES)
- #include "MediaInfo/Video/File_Flic.h"
-#endif
-#if defined(MEDIAINFO_H263_YES)
- #include "MediaInfo/Video/File_H263.h"
-#endif
-#if defined(MEDIAINFO_HEVC_YES)
- #include "MediaInfo/Video/File_Hevc.h"
-#endif
-#if defined(MEDIAINFO_MPEG4V_YES)
- #include "MediaInfo/Video/File_Mpeg4v.h"
-#endif
-#if defined(MEDIAINFO_MPEGV_YES)
- #include "MediaInfo/Video/File_Mpegv.h"
-#endif
-#if defined(MEDIAINFO_VC1_YES)
- #include "MediaInfo/Video/File_Vc1.h"
-#endif
-#if defined(MEDIAINFO_VC3_YES)
- #include "MediaInfo/Video/File_Vc3.h"
-#endif
-#if defined(MEDIAINFO_Y4M_YES)
- #include "MediaInfo/Video/File_Y4m.h"
-#endif
-
-//---------------------------------------------------------------------------
-// Audio
-#if defined(MEDIAINFO_AAC_YES)
- #include "MediaInfo/Audio/File_Aac.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_ALS_YES)
- #include "MediaInfo/Audio/File_Als.h"
-#endif
-#if defined(MEDIAINFO_AMR_YES)
- #include "MediaInfo/Audio/File_Amr.h"
-#endif
-#if defined(MEDIAINFO_AMV_YES)
- #include "MediaInfo/Audio/File_Amv.h"
-#endif
-#if defined(MEDIAINFO_APE_YES)
- #include "MediaInfo/Audio/File_Ape.h"
-#endif
-#if defined(MEDIAINFO_AU_YES)
- #include "MediaInfo/Audio/File_Au.h"
-#endif
-#if defined(MEDIAINFO_CAF_YES)
- #include "MediaInfo/Audio/File_Caf.h"
-#endif
-#if defined(MEDIAINFO_DTS_YES)
- #include "MediaInfo/Audio/File_Dts.h"
-#endif
-#if defined(MEDIAINFO_DOLBYE_YES)
- #include "MediaInfo/Audio/File_DolbyE.h"
-#endif
-#if defined(MEDIAINFO_FLAC_YES)
- #include "MediaInfo/Audio/File_Flac.h"
-#endif
-#if defined(MEDIAINFO_IT_YES)
- #include "MediaInfo/Audio/File_ImpulseTracker.h"
-#endif
-#if defined(MEDIAINFO_LA_YES)
- #include "MediaInfo/Audio/File_La.h"
-#endif
-#if defined(MEDIAINFO_MIDI_YES)
- #include "MediaInfo/Audio/File_Midi.h"
-#endif
-#if defined(MEDIAINFO_MOD_YES)
- #include "MediaInfo/Audio/File_Module.h"
-#endif
-#if defined(MEDIAINFO_MPC_YES)
- #include "MediaInfo/Audio/File_Mpc.h"
-#endif
-#if defined(MEDIAINFO_MPCSV8_YES)
- #include "MediaInfo/Audio/File_MpcSv8.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if defined(MEDIAINFO_OPENMG_YES)
- #include "MediaInfo/Audio/File_OpenMG.h"
-#endif
-#if defined(MEDIAINFO_RKAU_YES)
- #include "MediaInfo/Audio/File_Rkau.h"
-#endif
-#if defined(MEDIAINFO_S3M_YES)
- #include "MediaInfo/Audio/File_ScreamTracker3.h"
-#endif
-#if defined(MEDIAINFO_SMPTEST0337_YES)
- #include "MediaInfo/Audio/File_SmpteSt0337.h"
-#endif
-#if defined(MEDIAINFO_TAK_YES)
- #include "MediaInfo/Audio/File_Tak.h"
-#endif
-#if defined(MEDIAINFO_TTA_YES)
- #include "MediaInfo/Audio/File_Tta.h"
-#endif
-#if defined(MEDIAINFO_TWINVQ_YES)
- #include "MediaInfo/Audio/File_TwinVQ.h"
-#endif
-#if defined(MEDIAINFO_WVPK_YES)
- #include "MediaInfo/Audio/File_Wvpk.h"
-#endif
-#if defined(MEDIAINFO_XM_YES)
- #include "MediaInfo/Audio/File_ExtendedModule.h"
-#endif
-
-//---------------------------------------------------------------------------
-// Text
-#if defined(MEDIAINFO_EIA608_YES)
- #include "MediaInfo/Text/File_Eia608.h"
-#endif
-#if defined(MEDIAINFO_N19_YES)
- #include "MediaInfo/Text/File_N19.h"
-#endif
-#if defined(MEDIAINFO_PDF_YES)
- #include "MediaInfo/Text/File_Pdf.h"
-#endif
-#if defined(MEDIAINFO_SCC_YES)
- #include "MediaInfo/Text/File_Scc.h"
-#endif
-#if defined(MEDIAINFO_SUBRIP_YES)
- #include "MediaInfo/Text/File_SubRip.h"
-#endif
-#if defined(MEDIAINFO_TTML_YES)
- #include "MediaInfo/Text/File_Ttml.h"
-#endif
-#if defined(MEDIAINFO_OTHERTEXT_YES)
- #include "MediaInfo/Text/File_OtherText.h"
-#endif
-
-//---------------------------------------------------------------------------
-// Image
-#if defined(MEDIAINFO_ARRIRAW_YES)
- #include "MediaInfo/Image/File_ArriRaw.h"
-#endif
-#if defined(MEDIAINFO_BMP_YES)
- #include "MediaInfo/Image/File_Bmp.h"
-#endif
-#if defined(MEDIAINFO_BPG_YES)
- #include "MediaInfo/Image/File_Bpg.h"
-#endif
-#if defined(MEDIAINFO_DDS_YES)
- #include "MediaInfo/Image/File_Dds.h"
-#endif
-#if defined(MEDIAINFO_DPX_YES)
- #include "MediaInfo/Image/File_Dpx.h"
-#endif
-#if defined(MEDIAINFO_EXR_YES)
- #include "MediaInfo/Image/File_Exr.h"
-#endif
-#if defined(MEDIAINFO_GIF_YES)
- #include "MediaInfo/Image/File_Gif.h"
-#endif
-#if defined(MEDIAINFO_ICO_YES)
- #include "MediaInfo/Image/File_Ico.h"
-#endif
-#if defined(MEDIAINFO_JPEG_YES)
- #include "MediaInfo/Image/File_Jpeg.h"
-#endif
-#if defined(MEDIAINFO_PCX_YES)
- #include "MediaInfo/Image/File_Pcx.h"
-#endif
-#if defined(MEDIAINFO_PNG_YES)
- #include "MediaInfo/Image/File_Png.h"
-#endif
-#if defined(MEDIAINFO_PSD_YES)
- #include "MediaInfo/Image/File_Psd.h"
-#endif
-#if defined(MEDIAINFO_TIFF_YES)
- #include "MediaInfo/Image/File_Tiff.h"
-#endif
-#if defined(MEDIAINFO_TGA_YES)
- #include "MediaInfo/Image/File_Tga.h"
-#endif
-
-//---------------------------------------------------------------------------
-// Archive
-#if defined(MEDIAINFO_7Z_YES)
- #include "MediaInfo/Archive/File_7z.h"
-#endif
-#if defined(MEDIAINFO_ACE_YES)
- #include "MediaInfo/Archive/File_Ace.h"
-#endif
-#if defined(MEDIAINFO_BZIP2_YES)
- #include "MediaInfo/Archive/File_Bzip2.h"
-#endif
-#if defined(MEDIAINFO_ELF_YES)
- #include "MediaInfo/Archive/File_Elf.h"
-#endif
-#if defined(MEDIAINFO_GZIP_YES)
- #include "MediaInfo/Archive/File_Gzip.h"
-#endif
-#if defined(MEDIAINFO_ISO9660_YES)
- #include "MediaInfo/Archive/File_Iso9660.h"
-#endif
-#if defined(MEDIAINFO_MZ_YES)
- #include "MediaInfo/Archive/File_Mz.h"
-#endif
-#if defined(MEDIAINFO_RAR_YES)
- #include "MediaInfo/Archive/File_Rar.h"
-#endif
-#if defined(MEDIAINFO_TAR_YES)
- #include "MediaInfo/Archive/File_Tar.h"
-#endif
-#if defined(MEDIAINFO_ZIP_YES)
- #include "MediaInfo/Archive/File_Zip.h"
-#endif
-
-//---------------------------------------------------------------------------
-// Other
-#if !defined(MEDIAINFO_OTHER_NO)
- #include "MediaInfo/File_Other.h"
-#endif
-#include "MediaInfo/File_Unknown.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Out
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File__Analyze* File__MultipleParsing::Parser_Get()
-{
- if (Parser.size()!=1)
- return NULL;
-
- File__Analyze* ToReturn=Parser[0]; //The first parser
- Parser.clear();
- return ToReturn;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File__MultipleParsing::File__MultipleParsing()
-:File__Analyze()
-{
- #if MEDIAINFO_TRACE
- Trace_DoNotSave=true;
- #endif //MEDIAINFO_TRACE
-
- // Multiple
- #if defined(MEDIAINFO_AAF_YES)
- Parser.push_back(new File_Aaf());
- #endif
- #if defined(MEDIAINFO_BDAV_YES)
- {File_MpegTs* Temp=new File_MpegTs(); Temp->BDAV_Size=4; Parser.push_back(Temp);}
- #endif
-// Only with directories, no By Buffer interface
-// #if defined(MEDIAINFO_BDMV_YES)
-// Parser.push_back(new File_Bdmv());
-// #endif
- #if defined(MEDIAINFO_CDXA_YES)
- Parser.push_back(new File_Cdxa());
- #endif
- #if defined(MEDIAINFO_DASHMPD_YES)
- Parser.push_back(new File_DashMpd());
- #endif
- #if defined(MEDIAINFO_DCP_YES)
- Parser.push_back(new File_DcpAm());
- #endif
- #if defined(MEDIAINFO_DCP_YES)
- Parser.push_back(new File_DcpCpl());
- #endif
- #if defined(MEDIAINFO_DCP_YES)
- Parser.push_back(new File_DcpPkl());
- #endif
- #if defined(MEDIAINFO_DPG_YES)
- Parser.push_back(new File_Dpg());
- #endif
- #if defined(MEDIAINFO_DVDIF_YES)
- Parser.push_back(new File_DvDif());
- #endif
- #if defined(MEDIAINFO_DVDV_YES)
- Parser.push_back(new File_Dvdv());
- #endif
- #if defined(MEDIAINFO_DXW_YES)
- Parser.push_back(new File_Dxw());
- #endif
- #if defined(MEDIAINFO_FLV_YES)
- Parser.push_back(new File_Flv());
- #endif
- #if defined(MEDIAINFO_GXF_YES)
- Parser.push_back(new File_Gxf());
- #endif
- #if defined(MEDIAINFO_HDSF4M_YES)
- Parser.push_back(new File_HdsF4m());
- #endif
- #if defined(MEDIAINFO_HLS_YES)
- Parser.push_back(new File_Hls());
- #endif
- #if defined(MEDIAINFO_ISM_YES)
- Parser.push_back(new File_Ism());
- #endif
- #if defined(MEDIAINFO_IVF_YES)
- Parser.push_back(new File_Ivf());
- #endif
- #if defined(MEDIAINFO_LXF_YES)
- Parser.push_back(new File_Lxf());
- #endif
- #if defined(MEDIAINFO_MK_YES)
- Parser.push_back(new File_Mk());
- #endif
- #if defined(MEDIAINFO_MPEG4_YES)
- Parser.push_back(new File_Mpeg4());
- #endif
- #if defined(MEDIAINFO_MPEGPS_YES)
- Parser.push_back(new File_MpegPs());
- #endif
- #if defined(MEDIAINFO_MPEGTS_YES)
- Parser.push_back(new File_MpegTs());
- #endif
- #if defined(MEDIAINFO_TSP_YES)
- {File_MpegTs* Temp=new File_MpegTs(); Temp->TSP_Size=16; Parser.push_back(Temp);}
- #endif
- #if defined(MEDIAINFO_MXF_YES)
- Parser.push_back(new File_Mxf());
- #endif
- #if defined(MEDIAINFO_NUT_YES)
- Parser.push_back(new File_Nut());
- #endif
- #if defined(MEDIAINFO_OGG_YES)
- Parser.push_back(new File_Ogg());
- #endif
- #if defined(MEDIAINFO_P2_YES)
- Parser.push_back(new File_P2_Clip());
- #endif
- #if defined(MEDIAINFO_PMP_YES)
- Parser.push_back(new File_Pmp());
- #endif
- #if defined(MEDIAINFO_PTX_YES)
- Parser.push_back(new File_Ptx());
- #endif
- #if defined(MEDIAINFO_RIFF_YES)
- Parser.push_back(new File_Riff());
- #endif
- #if defined(MEDIAINFO_RM_YES)
- Parser.push_back(new File_Rm());
- #endif
- #if defined(MEDIAINFO_SEQUENCEINFO_YES)
- Parser.push_back(new File_SequenceInfo());
- #endif
- #if defined(MEDIAINFO_SKM_YES)
- Parser.push_back(new File_Skm());
- #endif
- #if defined(MEDIAINFO_SWF_YES)
- Parser.push_back(new File_Swf());
- #endif
- #if defined(MEDIAINFO_WM_YES)
- Parser.push_back(new File_Wm());
- #endif
- #if defined(MEDIAINFO_XDCAM_YES)
- Parser.push_back(new File_Xdcam_Clip());
- #endif
-
- // Video
- #if defined(MEDIAINFO_AVC_YES)
- Parser.push_back(new File_Avc());
- #endif
- #if defined(MEDIAINFO_HEVC_YES)
- Parser.push_back(new File_Hevc());
- #endif
- #if defined(MEDIAINFO_AVSV_YES)
- Parser.push_back(new File_AvsV());
- #endif
- #if defined(MEDIAINFO_DIRAC_YES)
- Parser.push_back(new File_Dirac());
- #endif
- #if defined(MEDIAINFO_FLIC_YES)
- Parser.push_back(new File_Flic());
- #endif
- #if defined(MEDIAINFO_H263_YES)
- Parser.push_back(new File_H263());
- #endif
- #if defined(MEDIAINFO_MPEG4V_YES)
- Parser.push_back(new File_Mpeg4v());
- #endif
- #if defined(MEDIAINFO_MPEGV_YES)
- Parser.push_back(new File_Mpegv());
- #endif
- #if defined(MEDIAINFO_VC1_YES)
- Parser.push_back(new File_Vc1());
- #endif
- #if defined(MEDIAINFO_VC3_YES)
- Parser.push_back(new File_Vc3());
- #endif
- #if defined(MEDIAINFO_Y4M_YES)
- Parser.push_back(new File_Y4m());
- #endif
-
- // Audio
- #if defined(MEDIAINFO_AAC_YES)
- {File_Aac* Temp=new File_Aac(); Temp->Mode=File_Aac::Mode_ADIF; Parser.push_back(Temp);}
- #endif
- #if defined(MEDIAINFO_AAC_YES)
- {File_Aac* Temp=new File_Aac(); Temp->Mode=File_Aac::Mode_ADTS; Parser.push_back(Temp);}
- #endif
- #if defined(MEDIAINFO_AC3_YES)
- Parser.push_back(new File_Ac3());
- #endif
- #if defined(MEDIAINFO_SMPTEST0337_YES)
- Parser.push_back(new File_SmpteSt0337());
- #endif
- #if defined(MEDIAINFO_ALS_YES)
- Parser.push_back(new File_Als());
- #endif
- #if defined(MEDIAINFO_AMR_YES)
- Parser.push_back(new File_Amr());
- #endif
- #if defined(MEDIAINFO_AMV_YES)
- Parser.push_back(new File_Amv());
- #endif
- #if defined(MEDIAINFO_APE_YES)
- Parser.push_back(new File_Ape());
- #endif
- #if defined(MEDIAINFO_AU_YES)
- Parser.push_back(new File_Au());
- #endif
- #if defined(MEDIAINFO_CAF_YES)
- Parser.push_back(new File_Caf());
- #endif
- #if defined(MEDIAINFO_DTS_YES)
- Parser.push_back(new File_Dts());
- #endif
-// Too many false-positives
-// #if defined(MEDIAINFO_DOLBYE_YES)
-// Parser.push_back(new File_DolbyE());
-// #endif
- #if defined(MEDIAINFO_FLAC_YES)
- Parser.push_back(new File_Flac());
- #endif
- #if defined(MEDIAINFO_IT_YES)
- Parser.push_back(new File_ImpulseTracker());
- #endif
- #if defined(MEDIAINFO_LA_YES)
- Parser.push_back(new File_La());
- #endif
- #if defined(MEDIAINFO_MIDI_YES)
- Parser.push_back(new File_Midi());
- #endif
- #if defined(MEDIAINFO_MOD_YES)
- Parser.push_back(new File_Module());
- #endif
- #if defined(MEDIAINFO_MPC_YES)
- Parser.push_back(new File_Mpc());
- #endif
- #if defined(MEDIAINFO_MPCSV8_YES)
- Parser.push_back(new File_MpcSv8());
- #endif
- #if defined(MEDIAINFO_MPEGA_YES)
- Parser.push_back(new File_Mpega());
- #endif
- #if defined(MEDIAINFO_OPENMG_YES)
- Parser.push_back(new File_OpenMG());
- #endif
- #if defined(MEDIAINFO_RKAU_YES)
- Parser.push_back(new File_Rkau());
- #endif
- #if defined(MEDIAINFO_S3M_YES)
- Parser.push_back(new File_ScreamTracker3());
- #endif
- #if defined(MEDIAINFO_TAK_YES)
- Parser.push_back(new File_Tak());
- #endif
- #if defined(MEDIAINFO_TTA_YES)
- Parser.push_back(new File_Tta());
- #endif
- #if defined(MEDIAINFO_TWINVQ_YES)
- Parser.push_back(new File_TwinVQ());
- #endif
- #if defined(MEDIAINFO_WVPK_YES)
- Parser.push_back(new File_Wvpk());
- #endif
- #if defined(MEDIAINFO_XM_YES)
- Parser.push_back(new File_ExtendedModule());
- #endif
-
- // Text
-// Too many false-positives
-// #if defined(MEDIAINFO_EIA608_YES)
-// Parser.push_back(new File_Eia608());
-// #endif
- #if defined(MEDIAINFO_N19_YES)
- Parser.push_back(new File_N19());
- #endif
- #if defined(MEDIAINFO_PDF_YES)
- Parser.push_back(new File_Pdf());
- #endif
- #if defined(MEDIAINFO_SCC_YES)
- Parser.push_back(new File_Scc());
- #endif
- #if defined(MEDIAINFO_SUBRIP_YES)
- Parser.push_back(new File_SubRip());
- #endif
- #if defined(MEDIAINFO_TTML_YES)
- Parser.push_back(new File_Ttml());
- #endif
- #if defined(MEDIAINFO_OTHERTEXT_YES)
- Parser.push_back(new File_OtherText());
- #endif
-
- // Image
- #if defined(MEDIAINFO_ARRIRAW_YES)
- Parser.push_back(new File_ArriRaw());
- #endif
- #if defined(MEDIAINFO_BMP_YES)
- Parser.push_back(new File_Bmp());
- #endif
- #if defined(MEDIAINFO_BPG_YES)
- Parser.push_back(new File_Bpg());
- #endif
- #if defined(MEDIAINFO_DDS_YES)
- Parser.push_back(new File_Dds());
- #endif
- #if defined(MEDIAINFO_DPX_YES)
- Parser.push_back(new File_Dpx());
- #endif
- #if defined(MEDIAINFO_EXR_YES)
- Parser.push_back(new File_Exr());
- #endif
- #if defined(MEDIAINFO_GIF_YES)
- Parser.push_back(new File_Gif());
- #endif
- #if defined(MEDIAINFO_ICO_YES)
- Parser.push_back(new File_Ico());
- #endif
- #if defined(MEDIAINFO_JPEG_YES)
- Parser.push_back(new File_Jpeg());
- #endif
- #if defined(MEDIAINFO_PCX_YES)
- Parser.push_back(new File_Pcx());
- #endif
- #if defined(MEDIAINFO_PNG_YES)
- Parser.push_back(new File_Png());
- #endif
- #if defined(MEDIAINFO_PSD_YES)
- Parser.push_back(new File_Psd());
- #endif
- #if defined(MEDIAINFO_TIFF_YES)
- Parser.push_back(new File_Tiff());
- #endif
- #if defined(MEDIAINFO_TGA_YES)
- Parser.push_back(new File_Tga());
- #endif
-
- // Archive
- #if defined(MEDIAINFO_7Z_YES)
- Parser.push_back(new File_7z());
- #endif
- #if defined(MEDIAINFO_ACE_YES)
- Parser.push_back(new File_Ace());
- #endif
- #if defined(MEDIAINFO_BZIP2_YES)
- Parser.push_back(new File_Bzip2());
- #endif
- #if defined(MEDIAINFO_ELF_YES)
- Parser.push_back(new File_Elf());
- #endif
- #if defined(MEDIAINFO_GZIP_YES)
- Parser.push_back(new File_Gzip());
- #endif
- #if defined(MEDIAINFO_ISO9660_YES)
- Parser.push_back(new File_Iso9660());
- #endif
- #if defined(MEDIAINFO_MZ_YES)
- Parser.push_back(new File_Mz());
- #endif
- #if defined(MEDIAINFO_RAR_YES)
- Parser.push_back(new File_Rar());
- #endif
- #if defined(MEDIAINFO_TAR_YES)
- Parser.push_back(new File_Tar());
- #endif
- #if defined(MEDIAINFO_ZIP_YES)
- Parser.push_back(new File_Zip());
- #endif
-
- // Other
- #if defined(MEDIAINFO_OTHER_YES)
- Parser.push_back(new File_Other());
- #endif
-}
-
-//---------------------------------------------------------------------------
-File__MultipleParsing::~File__MultipleParsing()
-{
- for (size_t Pos=0; Pos<Parser.size(); Pos++)
- delete Parser[Pos]; //Parser[Pos]=NULL
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__MultipleParsing::Streams_Finish()
-{
- if (Parser.size()!=1)
- return;
-
- Parser[0]->Open_Buffer_Finalize();
- #if MEDIAINFO_TRACE
- Details=Parser[0]->Details;
- #endif //MEDIAINFO_TRACE
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__MultipleParsing::Read_Buffer_Init()
-{
- //Parsing
- for (size_t Pos=0; Pos<Parser.size(); Pos++)
- {
- //Parsing
- #if MEDIAINFO_TRACE
- Parser[Pos]->Init(Config, Details, Stream, Stream_More);
- #else //MEDIAINFO_TRACE
- Parser[Pos]->Init(Config, Stream, Stream_More);
- #endif //MEDIAINFO_TRACE
- Parser[Pos]->File_Name=File_Name;
- Parser[Pos]->Open_Buffer_Init(File_Size);
- }
-}
-
-//---------------------------------------------------------------------------
-void File__MultipleParsing::Read_Buffer_Unsynched()
-{
- //Parsing
- for (size_t Pos=0; Pos<Parser.size(); Pos++)
- Parser[Pos]->Open_Buffer_Unsynch();
-}
-
-//---------------------------------------------------------------------------
-void File__MultipleParsing::Read_Buffer_Continue()
-{
- //Parsing
- for (size_t Pos=0; Pos<Parser.size(); Pos++)
- {
- //Parsing
- Parser[Pos]->Open_Buffer_Continue(Buffer+Buffer_Offset, (size_t)Element_Size);
- if (File_Offset+Buffer_Size==File_Size)
- Parser[Pos]->Open_Buffer_Finalize();
-
- //Testing if the parser failed
- if (Parser[Pos]->Status[IsFinished] && !Parser[Pos]->Status[IsAccepted])
- {
- delete Parser[Pos];
- Parser.erase(Parser.begin()+Pos);
- Pos--; //for the next position
-
- if (Parser.empty())
- {
- File__Analyze* Temp=new File_Unknown(); Parser.push_back(Temp);
- Read_Buffer_Init();
- }
- }
- else
- {
- //If Parser is found, erasing all the other parsers
- if (Parser.size()>1 && Parser[Pos]->Status[IsAccepted])
- {
- File__Analyze* Temp=Parser[Pos];
- for (size_t To_Delete_Pos=0; To_Delete_Pos<Parser.size(); To_Delete_Pos++)
- if (To_Delete_Pos!=Pos)
- delete Parser[To_Delete_Pos]; //Parser[Pos]=NULL
- Parser.clear();
- Parser.push_back(Temp);
- Pos=0;
- }
-
- if (Parser.size()==1)
- {
- //Status
- if (!Status[IsAccepted] && Parser[Pos]->Status[IsAccepted])
- Status[IsAccepted]=true;
- if (!Status[IsFilled] && Parser[Pos]->Status[IsFilled])
- Status[IsFilled]=true;
- if (!Status[IsUpdated] && Parser[Pos]->Status[IsUpdated])
- Status[IsUpdated]=true;
- if (!Status[IsFinished] && Parser[Pos]->Status[IsFinished])
- Status[IsFinished]=true;
-
- //Positionning if requested
- if (Parser[0]->File_GoTo!=(int64u)-1)
- File_GoTo=Parser[0]->File_GoTo;
- }
- }
- }
-}
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/File__MultipleParsing.h b/src/thirdparty/MediaInfo/MediaInfo/File__MultipleParsing.h
deleted file mode 100644
index 56283b3ef..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/File__MultipleParsing.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about MPEG files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_MpegH
-#define MediaInfo_MpegH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File__MultipleParsing
-//***************************************************************************
-
-class File__MultipleParsing : public File__Analyze
-{
-public :
- //Out
- File__Analyze* Parser_Get();
-
- //Constructor
- File__MultipleParsing();
- ~File__MultipleParsing();
-
-private :
- //Streams management
- void Streams_Finish();
-
- //Buffer - Global
- void Read_Buffer_Init();
- void Read_Buffer_Unsynched();
- void Read_Buffer_Continue();
-
- //Temp
- std::vector<File__Analyze*> Parser;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_ArriRaw.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_ArriRaw.cpp
deleted file mode 100644
index 486a61194..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_ArriRaw.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about ARRI RAW files
-//
-// From http://www.fileformat.info/format/png/
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_ARRIRAW_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_ArriRaw.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_ArriRaw::File_ArriRaw()
-{
- //Config
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- IsRawStream=true;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_ArriRaw::Streams_Accept()
-{
- Fill(Stream_General, 0, General_Format, "Arri Raw");
-
- if (!IsSub)
- {
- TestContinuousFileNames();
-
- Stream_Prepare((Config->File_Names.size()>1 || Config->File_IsReferenced_Get())?Stream_Video:Stream_Image);
- Fill(StreamKind_Last, StreamPos_Last, "StreamSize", File_Size);
- if (StreamKind_Last==Stream_Video)
- Fill(Stream_Video, StreamPos_Last, Video_FrameCount, Config->File_Names.size());
- }
- else
- Stream_Prepare(StreamKind_Last);
-
- //Configuration
- Frame_Count_NotParsedIncluded=0;
-}
-
-//***************************************************************************
-// Header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_ArriRaw::FileHeader_Begin()
-{
- // Minimum buffer size
- if (Buffer_Size<8)
- return false; // Must wait for more data
-
- // Testing
- if (Buffer[0]!=0x41 // "ARRI.4Vx"
- || Buffer[1]!=0x52
- || Buffer[2]!=0x52
- || Buffer[3]!=0x49
- || Buffer[4]!=0x12
- || Buffer[5]!=0x34
- || Buffer[6]!=0x56
- || Buffer[7]!=0x78)
- {
- Reject("Arri Raw");
- return false;
- }
-
- Accept();
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_ArriRaw::Read_Buffer_Unsynched()
-{
- Read_Buffer_Unsynched_OneFramePerFile();
-}
-
-//---------------------------------------------------------------------------
-void File_ArriRaw::Read_Buffer_Continue()
-{
- //Parsing
- Skip_C4( "Signature");
- Skip_C1( "Signature");
- Skip_C3( "Signature");
- Skip_XX(File_Size-8, "Data");
-
- FILLING_BEGIN();
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- if (!Status[IsFilled])
- {
- Fill();
- if (Config->ParseSpeed<1.0)
- Finish();
- }
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_ArriRaw.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_ArriRaw.h
deleted file mode 100644
index 95617d1ca..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_ArriRaw.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about ARRI RAW files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_ArriRawH
-#define MediaInfo_File_ArriRawH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_ArriRaw
-//***************************************************************************
-
-class File_ArriRaw : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_ArriRaw();
-
-private :
- //Streams management
- void Streams_Accept();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test() {return Demux_UnpacketizeContainer_Test_OneFramePerFile();}
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID) {return Read_Buffer_Seek_OneFramePerFile(Method, Value, ID);}
- #endif //MEDIAINFO_SEEK
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Bmp.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Bmp.cpp
deleted file mode 100644
index 9ce3bdd7d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Bmp.cpp
+++ /dev/null
@@ -1,264 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// BMP - Format
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// From http://www.onicos.com/staff/iz/formats/bmp.html
-//
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_BMP_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Bmp.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Bmp_CompressionMethod(int32u CompressionMethod)
-{
- switch(CompressionMethod)
- {
- case 0 : return "RGB";
- case 1 : return "RLE";
- case 2 : return "RLE";
- case 3 : return "Bit field";
- case 4 : return "JPEG";
- case 5 : return "PNG";
- default: return "";
- }
-}
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Bmp::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<2)
- return false; //Must wait for more data
-
- if (CC2(Buffer)!=0x424D) //"BM"
- {
- Reject("BMP");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Bmp::Read_Buffer_Continue()
-{
- //Parsing
- int32u Size, DIB_Size, Offset;
- Element_Begin1("File header");
- Skip_C2( "Magic");
- Get_L4 (Size, "Size");
- Skip_L2( "Reserved");
- Skip_L2( "Reserved");
- Get_L4 (Offset, "Offset of data");
- Element_End0();
-
- FILLING_BEGIN();
- if (Size!=(int32u)-1 && Size!=File_Size)
- {
- Reject("BMP");
- return;
- }
-
- Accept("BMP");
-
- Fill(Stream_General, 0, General_Format, "Bitmap");
-
- Stream_Prepare(Stream_Image);
- FILLING_END();
-
- Element_Begin1("DIB header");
- Peek_L4 (DIB_Size);
- switch (DIB_Size)
- {
- case 12 : BitmapCoreHeader(1); break;
- case 40 : BitmapInfoHeader(1); break;
- case 52 : BitmapInfoHeader(2); break;
- case 56 : BitmapInfoHeader(3); break;
- case 64 : BitmapCoreHeader(2); break;
- case 108 : BitmapInfoHeader(4); break;
- case 124 : BitmapInfoHeader(5); break;
- default : if (DIB_Size>124)
- {
- BitmapInfoHeader((int8u)-1); //Future versions of BitmapInfoHeader (OS/2 is abandonned)
- Skip_XX(14+124-Element_Offset, "Unknown");
- }
- }
- Element_End0();
-
- if (Element_Offset<Offset)
- Skip_XX(Offset-Element_Offset, "Other header data");
- Skip_XX(File_Size-Offset, "Image data");
-
- //No need of more
- Finish("BMP");
-}
-
-//***************************************************************************
-// Buffer - Elements
-//***************************************************************************
-
-void File_Bmp::BitmapCoreHeader(int8u Version)
-{
- #if MEDIAINFO_TRACE
- switch (Version)
- {
- case 1 : Element_Info1("OS/2 1.x BITMAPCOREHEADER"); break;
- case 2 : Element_Info1("OS/2 2.x BITMAPCOREHEADER"); break;
- default: Element_Info1("OS/2 ? BITMAPCOREHEADER");
- }
- #endif //MEDIAINFO_TRACE
-
- //Parsing
- int16u Width, Height, BitsPerPixel;
- Skip_L4( "Size");
- Get_L2 (Width, "Width");
- Get_L2 (Height, "Height");
- Skip_L2( "Color planes");
- Get_L2 (BitsPerPixel, "Bits per pixel");
-
- FILLING_BEGIN();
- if (BitsPerPixel<8)
- BitsPerPixel=8; //It is a palette
-
- Fill(Stream_Image, 0, Image_Width, Width);
- Fill(Stream_Image, 0, Image_Height, Height);
- Fill(Stream_Image, 0, Image_BitDepth, BitsPerPixel);
- Fill(Stream_Image, 0, Image_ColorSpace, "RGB");
- FILLING_END();
-
- if (Version>1) //V2 additional fields for information only
- {
- Skip_L4( "Compression");
- Skip_L4( "ImageDataSize");
- Skip_L4( "XResolution");
- Skip_L4( "YResolution");
- Skip_L4( "ColorsUsed");
- Skip_L4( "ColorsImportant");
- Skip_L2( "Units");
- Skip_L2( "Reserved");
- Skip_L2( "Recording");
- Skip_L2( "Rendering");
- Skip_L4( "Size1");
- Skip_L4( "Size2");
- Skip_L4( "ColorEncoding");
- Skip_L4( "Identifier");
- }
-}
-
-void File_Bmp::BitmapInfoHeader(int8u Version)
-{
- #if MEDIAINFO_TRACE
- switch (Version)
- {
- case 1 : Element_Info1("BITMAPINFOHEADER"); break;
- case 2 : Element_Info1("BITMAPV2INFOHEADER"); break;
- case 3 : Element_Info1("BITMAPV3INFOHEADER"); break;
- case 4 : Element_Info1("BITMAPV4HEADER"); break;
- case 5 : Element_Info1("BITMAPV5HEADER"); break;
- default: Element_Info1("BITMAPV?HEADER");
- }
- #endif //MEDIAINFO_TRACE
-
- //Parsing
- int32u Width, Height, CompressionMethod;
- int16u BitsPerPixel;
- Skip_L4( "Size");
- Get_L4 (Width, "Width");
- Get_L4 (Height, "Height");
- Skip_L2( "Color planes");
- Get_L2 (BitsPerPixel, "Bits per pixel");
- Get_L4 (CompressionMethod, "Compression method"); Param_Info1(Bmp_CompressionMethod(CompressionMethod));
- Skip_L4( "Image size");
- Skip_L4( "Horizontal resolution");
- Skip_L4( "Vertical resolution");
- Skip_L4( "Number of colors in the color palette");
- Skip_L4( "Number of important colors used");
-
- FILLING_BEGIN();
- if (BitsPerPixel<8)
- BitsPerPixel=8; //It is a palette
-
- Fill(Stream_Image, 0, Image_Width, Width);
- Fill(Stream_Image, 0, Image_Height, Height);
- Fill(Stream_Image, 0, Image_BitDepth, BitsPerPixel);
- Fill(Stream_Image, 0, Image_Format, Bmp_CompressionMethod(CompressionMethod));
- Fill(Stream_Image, 0, Image_Codec, Bmp_CompressionMethod(CompressionMethod));
- Fill(Stream_Image, 0, Image_ColorSpace, "RGB");
- FILLING_END();
-
- if (Version>1)
- {
- Skip_L4( "Red Channel bit mask");
- Skip_L4( "Green Channel bit mask");
- Skip_L4( "Blue Channel bit mask");
- if (Version>2)
- {
- Skip_L4( "Alpha Channel bit mask");
- if (Version>3)
- {
- Skip_L4( "Color Space endpoints");
- Skip_L4( "Color Space endpoints");
- Skip_L4( "Color Space endpoints");
- Skip_L4( "Color Space endpoints");
- Skip_L4( "Color Space endpoints");
- Skip_L4( "Color Space endpoints");
- Skip_L4( "Color Space endpoints");
- Skip_L4( "Red Gamma");
- Skip_L4( "Green Gamma");
- Skip_L4( "Blue Gamma");
- if (Version>4)
- {
- Skip_L4( "Intent");
- Skip_L4( "ProfileData");
- Skip_L4( "ProfileSize");
- Skip_L4( "Reserved");
- }
- }
- }
- }
-}
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Bmp.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Bmp.h
deleted file mode 100644
index c3b65c160..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Bmp.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Bitmap files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_BmpH
-#define MediaInfo_File_BmpH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Bmp
-//***************************************************************************
-
-class File_Bmp : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-
- //Elements
- void BitmapCoreHeader(int8u Version); //OS/2
- void BitmapInfoHeader(int8u Version); //Windows
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Bpg.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Bpg.cpp
deleted file mode 100644
index 3d2e5ab04..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Bpg.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// From http://bellard.org/bpg/bpg_spec.txt
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_BPG_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Bpg.h"
-#include <cmath>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-const char* Bpg_ColorSpace(int8u ColorSpace)
-{
- switch (ColorSpace)
- {
- case 0:
- case 3:
- case 4: return "YUV";
- case 1: return "RGB";
- case 2: return "YCgCo";
- default: return "";
- }
-};
-
-//---------------------------------------------------------------------------
-const char* Bpg_colour_primaries(int8u ColorSpace)
-{
- switch (ColorSpace)
- {
- case 0: return "BT.601";
- case 3: return "BT.701";
- case 4: return "BT.2020";
- default: return "";
- }
-};
-
-//---------------------------------------------------------------------------
-const char* Bpg_Pixel_format(int8u PixelFormat)
-{
- switch (PixelFormat)
- {
- case 0 : return "Grayscale";
- case 1 :
- case 4 : return "4:2:0";
- case 2 :
- case 5 : return "4:2:2";
- case 3 : return "4:4:4";
- default: return "";
- }
-
-};
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Bpg::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- if (CC4(Buffer) != 0x425047FB) //"BPG"
- {
- Reject("BPG");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Bpg::Read_Buffer_Continue()
-{
- //Parsing
- Ztring Version;
- int64u Width, Height;
- int8u pixelformat, BitsDepth, ColorSpace;
- bool Alpha1_flag, Alpha2_flag, ReservedZeros, limited_range_flag, ExtensionPresentFlag;
- Element_Begin1("File header");
- Skip_C4( "Magic"); // File Magic
- BS_Begin();
- Get_S1 (3, pixelformat, "pixel_format"); Param_Info1(Bpg_Pixel_format(pixelformat));
- Get_SB (Alpha1_flag, "Alpha1 Present Flag");
- Get_S1 (4, BitsDepth, "bit_depth_minus_8");
-
- Get_S1(4, ColorSpace, "color_space"); Param_Info1(Bpg_ColorSpace(ColorSpace)); Param_Info1(Bpg_colour_primaries(ColorSpace));
- Get_SB (ExtensionPresentFlag, "Extension Present Flag");
- Get_SB (Alpha2_flag, "Alpha2 Present Flag");
- Get_SB (limited_range_flag, "limited_range_flag");
- Get_SB (ReservedZeros, "Reserved");
- BS_End();
-
- Get_VS(Width, "Picture Width");
- Get_VS(Height, "Picture Height");
-
-
- Element_End0();
-
- FILLING_BEGIN();
- Accept("BPG");
-
- Stream_Prepare(Stream_Image);
- Fill(Stream_Image, 0, Image_Width, Width);
- Fill(Stream_Image, 0, Image_Height, Height);
- Fill(Stream_Image, 0, Image_Format, __T("BPG"));
- Fill(Stream_Image, 0, Image_ChromaSubsampling, Bpg_Pixel_format(pixelformat));
- Fill(Stream_Image, 0, Image_ColorSpace, Bpg_ColorSpace(ColorSpace));
- Fill(Stream_Image, 0, Image_colour_primaries, Bpg_colour_primaries(ColorSpace));
- Fill(Stream_Image, 0, Image_BitDepth, BitsDepth + 8);
- Fill(Stream_Image, 0, Image_Codec, __T("BPG"));
- FILLING_END();
-
- Finish("BPG");
-}
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Bpg.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Bpg.h
deleted file mode 100644
index 5eec138ae..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Bpg.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about BPG files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_BpgH
-#define MediaInfo_File_BpgH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Bpg
-//***************************************************************************
-
-class File_Bpg : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Dds.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Dds.cpp
deleted file mode 100644
index f257fdce6..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Dds.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DDS (DirectDraw Surface) files
-//
-// From http://msdn.microsoft.com/en-us/library/windows/desktop/bb943982%28v=vs.85%29.aspx
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DDS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Dds.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Dds::File_Dds()
-{
- //Config
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- IsRawStream=true;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dds::Streams_Accept()
-{
- Fill(Stream_General, 0, General_Format, "DDS");
-
- if (!IsSub)
- {
- TestContinuousFileNames();
-
- Stream_Prepare((Config->File_Names.size()>1 || Config->File_IsReferenced_Get())?Stream_Video:Stream_Image);
- Fill(StreamKind_Last, StreamPos_Last, "StreamSize", File_Size);
- if (StreamKind_Last==Stream_Video)
- Fill(Stream_Video, StreamPos_Last, Video_FrameCount, Config->File_Names.size());
- if (pfFlags&0x4) //DDPF_FOURCC
- CodecID_Fill(Ztring().From_CC4(FourCC), StreamKind_Last, StreamPos_Last, InfoCodecID_Format_Riff, Stream_Video);
- if (Flags&0x2) //DDSD_HEIGHT
- Fill(StreamKind_Last, 0, "Height", Height);
- if (Flags&0x4) //DDSD_WIDTH
- Fill(StreamKind_Last, 0, "Width", Width);
- if (Flags&0x800000) //DDSD_DEPTH
- Fill(StreamKind_Last, 0, "BitDepth", Depth);
- }
- else
- Stream_Prepare(StreamKind_Last);
-}
-
-//***************************************************************************
-// Header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Dds::FileHeader_Begin()
-{
- // Minimum buffer size
- if (Buffer_Size<8)
- return false; // Must wait for more data
-
- // Testing
- if (Buffer[0]!=0x44 // "DDS "
- || Buffer[1]!=0x44
- || Buffer[2]!=0x53
- || Buffer[3]!=0x20
- || LittleEndian2int32u(Buffer+4)<124)
- {
- Reject();
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Dds::FileHeader_Parse()
-{
- //Parsing
- int32u Size;
- Skip_C4( "Magic");
- Get_L4 (Size, "Size");
- Get_L4 (Flags, "Flags");
- Get_L4 (Height, "Height");
- Get_L4 (Width, "Width");
- Skip_L4( "PitchOrLinearSize");
- Skip_L4( "Depth");
- Skip_L4( "MipMapCount");
- Skip_XX(4*11, "Reserved1");
- Element_Begin1("Pixel format");
- int32u pf_Size;
- Get_L4 (pf_Size, "Size");
- if (pf_Size>=32)
- {
- Get_L4 (pfFlags, "Flags");
- Get_C4 (FourCC, "FourCC");
- Skip_L4( "RGBBitCount");
- Skip_L4( "RBitMask");
- Skip_L4( "GBitMask");
- Skip_L4( "BBitMask");
- Skip_L4( "ABitMask");
- if (pf_Size>32)
- Skip_XX(Size-32, "(Data)");
- }
- else if (pf_Size>4)
- Skip_XX(pf_Size-4, "");
- Element_End0();
- Skip_L4( "Caps");
- Skip_L4( "Caps2");
- Skip_L4( "Caps3");
- Skip_L4( "Caps4");
- Skip_L4( "Reserved2");
- if (Size>124)
- Skip_XX(Size-124, "(Data)");
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dds::Read_Buffer_Unsynched()
-{
- Read_Buffer_Unsynched_OneFramePerFile();
-}
-
-//---------------------------------------------------------------------------
-void File_Dds::Read_Buffer_Continue()
-{
- Skip_XX(File_Size-(File_Offset+Buffer_Offset), "Data");
-
- FILLING_BEGIN();
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- if (!Status[IsAccepted])
- {
- Accept();
- Fill();
- if (Config->ParseSpeed<1.0)
- Finish();
- }
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Dds.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Dds.h
deleted file mode 100644
index 5871ed0eb..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Dds.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DDS (DirectDraw Surface) files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DdsH
-#define MediaInfo_File_DdsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Dds
-//***************************************************************************
-
-class File_Dds : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Dds();
-
-private :
- //Streams management
- void Streams_Accept();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test() {return Demux_UnpacketizeContainer_Test_OneFramePerFile();}
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID) {return Read_Buffer_Seek_OneFramePerFile(Method, Value, ID);}
- #endif //MEDIAINFO_SEEK
- void Read_Buffer_Continue ();
-
- // Temp
- int32u Flags;
- int32u Width;
- int32u Height;
- int32u Depth;
- int32u pfFlags;
- int32u FourCC;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Dpx.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Dpx.cpp
deleted file mode 100644
index 6b9b66b84..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Dpx.cpp
+++ /dev/null
@@ -1,851 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DPX_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Dpx.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* DPX_Orientation[]=
-{
- "Left to right, Top to bottom",
- "Right to left, Top to bottom",
- "Left to right, Bottom to top",
- "Right to left, Bottom to top",
- "Top to bottom, Left to right",
- "Top to bottom, Right to left",
- "Bottom to top, Left to right",
- "Bottom to top, Right to left",
- "Reserved for future use"
-};
-
-//---------------------------------------------------------------------------
-const char* DPX_Descriptors0[]=
-{
- "User defined (or unspecified single component)",
- "Red (R)",
- "Green (G)",
- "Blue (B)",
- "Alpha (matte)",
- "", //No info
- "Luma (Y)",
- "Color Difference (CB, CR, subsampled by two)",
- "Depth (Z)",
- "Composite video"
-};
-
-const char* DPX_Descriptors50[]=
-{
- "R,G,B",
- "R,G,B, Alpha (A)",
- "A, B, G, R"
-};
-
-const char* DPX_Descriptors100[]=
-{
- "CB, Y, CR, Y (4:2:2) ---- based on SMPTE 125M",
- "CB, Y, A, CR, Y, A (4:2:2:4)",
- "CB, Y, CR (4:4:4)",
- "CB, Y, CR, A (4:4:4:4)"
-};
-
-const char* DPX_Descriptors150[]=
-{
- "User-defined 2-component element",
- "User-defined 3-component element",
- "User-defined 4-component element",
- "User-defined 5-component element",
- "User-defined 6-component element",
- "User-defined 7-component element",
- "User-defined 8-component element"
-};
-
-const char* DPX_Descriptors(int8u i)
-{
- if(i<10)
- return DPX_Descriptors0[i];
- if(i<50)
- return "Reserved for future single components";
- if(i<53)
- return DPX_Descriptors50[i-50];
- if(i<100)
- return "Reserved for future RGB ++ formats";
- if(i<104)
- return DPX_Descriptors100[i-100];
- if(i<150)
- return "Reserved for future CBYCR ++ formats";
- if(i<157)
- return "Reserved for future single components";
- return "Reserved for future formats";
-}
-
-//---------------------------------------------------------------------------
-const char* Mpegv_transfer_characteristics(int8u transfer_characteristics);
-const char* DPX_TransferCharacteristic(int8u TransferCharacteristic)
-{
- switch (TransferCharacteristic)
- {
- case 1 : return "Printing density";
- case 2 : return Mpegv_transfer_characteristics(8); //Linear
- case 3 : return "Logarithmic"; //Value not specified in specs
- case 5 : //SMPTE 274M, for HDTV, mapped to BT.709
- case 6 : return Mpegv_transfer_characteristics(1); //BT.709
- case 7 : return Mpegv_transfer_characteristics(5); //BT.470 System B, BT.470 System G (typo in specs?)
- case 8 : return Mpegv_transfer_characteristics(4); //BT.470 System M (typo in specs?)
- case 9 : //BT.601 (NTSC)
- case 10 : return Mpegv_transfer_characteristics(6); //BT.601 (PAL)
- case 11 : return "Z (depth) - linear";
- case 12 : return "Z (depth) - homogeneous";
- default : return "";
- }
-};
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-const char* Mpegv_colour_primaries(int8u colour_primaries);
-const char* DPX_ColorimetricSpecification(int8u ColorimetricSpecification)
-{
- switch (ColorimetricSpecification)
- {
- case 1 : return "Printing density";
- case 5 : //SMPTE 274M, for HDTV, mapped to BT.709
- case 6 : return Mpegv_colour_primaries(1); //BT.709
- case 7 : return Mpegv_colour_primaries(5); //BT.470 System B, BT.470 System G (typo in specs?), mapped to BT.601 PAL
- case 8 : return Mpegv_colour_primaries(6); //BT.470 System M (typo in specs?), mapped to BT.601 NTSC
- case 9 : return Mpegv_colour_primaries(6); //BT.601 NTSC
- case 10 : return Mpegv_colour_primaries(5); //BT.601 PAL
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* DPX_ValidBitDephs(int8u i)
-{
- switch(i)
- {
- case 1 :
- case 8 :
- case 10 :
- case 12 :
- case 16 :
- return "integer";
- case 32 :
- return "IEEE floating point (R32)";
- case 64 :
- return "IEEE floating point (R64)";
- default :
- return "invalid";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* DPX_ComponentDataPackingMethod[]=
-{
- "Packed into 32-bit words",
- "Filled to 32-bit words, method A",
- "Filled to 32-bit words, method B",
- "Reserved for future use",
- "Reserved for future use",
- "Reserved for future use",
- "Reserved for future use",
- "Reserved for future use"
-};
-
-//---------------------------------------------------------------------------
-const char* DPX_ComponentDataEncodingMethod[]=
-{
- "No encoding applied",
- "Run-length encoded",
- "Reserved for future use",
- "Reserved for future use",
- "Reserved for future use",
- "Reserved for future use",
- "Reserved for future use",
- "Reserved for future use"
-};
-
-//---------------------------------------------------------------------------
-const char* DPX_VideoSignalStandard0[]=
-{
- "Undefined",
- "NTSC",
- "PAL",
- "PAL-M",
- "SECAM"
-};
-
-const char* DPX_VideoSignalStandard50[]=
-{
- "YCBCR ITU-R 601-5 525-line, 2:1 interlace, 4:3 aspect ratio",
- "YCBCR ITU-R 601-5 625-line, 2:1 interlace, 4:3 aspect ratio"
-};
-
-const char* DPX_VideoSignalStandard100[]=
-{
- "YCBCR ITU-R 601-5 525-line, 2:1 interlace, 16:9 aspect ratio",
- "YCBCR ITU-R 601-5 625-line, 2:1 interlace, 16:9 aspect ratio"
-};
-
-const char* DPX_VideoSignalStandard150[]=
-{
- "YCBCR 1050-line, 2:1 interlace, 16:9 aspect ratio",
- "YCBCR 1125-line, 2:1 interlace, 16:9 aspect ratio (SMPTE 274M)",
- "YCBCR 1250-line, 2:1 interlace, 16:9 aspect ratio",
- "YCBCR 1125-line, 2:1 interlace, 16:9 aspect ratio (SMPTE 240M)"
-};
-
-const char* DPX_VideoSignalStandard200[]=
-{
- "YCBCR 525-line, 1:1 progressive, 16:9 aspect ratio",
- "YCBCR 625-line, 1:1 progressive, 16:9 aspect ratio",
- "YCBCR 750-line, 1:1 progressive, 16:9 aspect ratio (SMPTE 296M)",
- "YCBCR 1125-line, 1:1 progressive, 16:9 aspect ratio (SMPTE 274M)"
-};
-
-const char* DPX_VideoSignalStandard(int8u i)
-{
- if(i<5)
- return DPX_VideoSignalStandard0[i];
- if(i<50)
- return "Reserved for other composite video";
- if(i<52)
- return DPX_VideoSignalStandard50[i-50];
- if(i<100)
- return "Reserved for future component video";
- if(i<102)
- return DPX_VideoSignalStandard100[i-100];
- if(i<150)
- return "Reserved for future widescreen";
- if(i<154)
- return DPX_VideoSignalStandard150[i-150];
- if(i<200)
- return "Reserved for future high-definition interlace";
- if(i<204)
- return DPX_VideoSignalStandard200[i-200];
- return "Reserved for future high-definition progressive";
-}
-
-//***************************************************************************
-// Const
-//***************************************************************************
-
-enum Elements
-{
- Pos_GenericSection,
- Pos_IndustrySpecific,
- Pos_UserDefined,
- Pos_Padding,
- Pos_ImageData,
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Dpx::File_Dpx()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("DPX");
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dpx::Streams_Accept()
-{
- if (!IsSub)
- {
- TestContinuousFileNames();
-
- Stream_Prepare((Config->File_Names.size()>1 || Config->File_IsReferenced_Get())?Stream_Video:Stream_Image);
- if (File_Size!=(int64u)-1)
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_StreamSize), File_Size);
- if (StreamKind_Last==Stream_Video)
- Fill(Stream_Video, StreamPos_Last, Video_FrameCount, Config->File_Names.size());
- }
- else
- Stream_Prepare(Stream_Image);
-
- //Configuration
- Buffer_MaximumSize=64*1024*1024; //Some big frames are possible (e.g YUV 4:2:2 10 bits 1080p)
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Dpx::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- int32u Magic=CC4(Buffer);
- switch (Magic)
- {
- case 0x802A5FD7 : // (Cineon Big)
- case 0xD75F2A80 : // (Cineon Little)
- case 0x53445058 : //"SPDX" (Dpx Big)
- case 0x58504453 : //"XDPS" (Dpx Little)
- break;
- default :
- Reject();
- return false;
- }
-
- //Generic Section size
- if (Buffer_Size<28)
- return false; //Must wait for more data
- Sizes_Pos=Pos_GenericSection;
- switch (Magic)
- {
- case 0x802A5FD7 : // (Cineon Big)
- case 0xD75F2A80 : // (Cineon Little)
- IsDpx=false;
- break;
- case 0x58504453 : //"XDPS" (Dpx Little)
- case 0x53445058 : //"SPDX" (Dpx Big)
- IsDpx=true;
- break;
- default : ;
- }
- switch (Magic)
- {
- case 0xD75F2A80 : // (Cineon Little)
- case 0x58504453 : //"XDPS" (Dpx Little)
- LittleEndian=true;
- break;
- case 0x802A5FD7 : // (Cineon Big)
- case 0x53445058 : //"SPDX" (Dpx Big)
- LittleEndian=false;
- break;
- default : ;
- }
-
- //All should be OK...
- Accept();
-
- return true;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dpx::Header_Parse()
-{
- //Filling
- Header_Fill_Code(Sizes_Pos); //We use Sizes_Pos as the unique key
- if (Sizes.empty())
- {
- if (Element_Size<28)
- {
- Element_WaitForMoreData();
- return;
- }
- int32u Size=LittleEndian?LittleEndian2int32u(Buffer+Buffer_Offset+24):BigEndian2int32u(Buffer+Buffer_Offset+24);
- if (Size==(int32u)-1)
- Size=LittleEndian?LittleEndian2int32u(Buffer+Buffer_Offset+4):BigEndian2int32u(Buffer+Buffer_Offset+4);
- Header_Fill_Size(Size);
- }
- else
- Header_Fill_Size(Sizes[Sizes_Pos]);
-}
-
-//---------------------------------------------------------------------------
-void File_Dpx::Data_Parse()
-{
- if (!IsDpx) // Is Cineon
- {
- switch (Element_Code)
- {
- case Pos_GenericSection : GenericSectionHeader_Cineon(); break;
- case Pos_IndustrySpecific : IndustrySpecificHeader_Cineon(); break;
- case Pos_UserDefined : UserDefinedHeader_Cineon(); break;
- case Pos_Padding : Padding(); break;
- case Pos_ImageData : ImageData(); break;
- default : ;
- }
- }
- else
- {
- switch (Element_Code)
- {
- case Pos_GenericSection : GenericSectionHeader_Dpx(); break;
- case Pos_IndustrySpecific : IndustrySpecificHeader_Dpx(); break;
- case Pos_UserDefined : UserDefinedHeader_Dpx(); break;
- case Pos_Padding : Padding(); break;
- case Pos_ImageData : ImageData(); break;
- default : ;
- }
- }
-
- do
- Sizes_Pos++; //We go automaticly to the next block
- while (Sizes_Pos<Sizes.size() && Sizes[Sizes_Pos]==0);
- if (Sizes_Pos>=Sizes.size())
- {
- Sizes.clear();
- Sizes_Pos=0;
-
- if (!Status[IsFilled])
- Fill();
- if (File_Offset+Buffer_Offset+Element_Size<Config->File_Current_Size)
- GoTo(Config->File_Current_Size);
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dpx::GenericSectionHeader_Cineon()
-{
- Element_Name("Generic section header");
-
- //Parsing
- Element_Begin1("File information");
- Ztring CreationDate, CreationTime;
- string Version;
- int32u Size_Header, Size_Total, Size_Generic, Size_Industry, Size_User;
- Skip_B4( "Magic number");
- Get_X4 (Size_Header, "Offset to image data");
- Get_X4 (Size_Generic, "Generic section header length");
- Get_X4 (Size_Industry, "Industry specific header length");
- Get_X4 (Size_User, "User-defined header length");
- Get_X4 (Size_Total, "Total image file size");
- Get_String(8, Version, "Version number of header format");
- Skip_UTF8 (100, "FileName");
- Get_UTF8 (12, CreationDate, "Creation Date");
- Get_UTF8 (12, CreationTime, "Creation Time");
- Skip_XX(36, "Reserved for future use");
- Element_End0();
-
- Element_Begin1("Image information");
- int8u ImageElements;
- Info_B1(ImageOrientation, "Image orientation"); Param_Info1(DPX_Orientation[ImageOrientation>8?8:ImageOrientation]);
- Get_B1 (ImageElements, "Number of image elements");
- Skip_B2( "Unused");
- if (ImageElements>8)
- ImageElements=8;
- for(int8u ImageElement=0; ImageElement<ImageElements; ImageElement++)
- GenericSectionHeader_Cineon_ImageElement();
- if (ImageElements!=8)
- Skip_XX((8-ImageElements)*28, "Padding");
- Skip_BF4( "White point - x");
- Skip_BF4( "White point - y");
- Skip_BF4( "Red primary chromaticity - x");
- Skip_BF4( "Red primary chromaticity - u");
- Skip_BF4( "Green primary chromaticity - x");
- Skip_BF4( "Green primary chromaticity - y");
- Skip_BF4( "Blue primary chromaticity - x");
- Skip_BF4( "Blue primary chromaticity - y");
- Skip_UTF8(200, "Label text");
- Skip_XX(28, "Reserved for future use");
- Element_End0();
-
- Element_Begin1("Image Data Format Information");
- Skip_B1( "Data interleave");
- Skip_B1( "Packing");
- Skip_B1( "Data signed or unsigned");
- Skip_B1( "Image sense");
- Skip_B4( "End of line padding");
- Skip_B4( "End of channel padding");
- Skip_XX(20, "Reserved for future use");
-
- Element_Begin1("Image Origination Information");
- Skip_B4( "X offset");
- Skip_B4( "Y offset");
- Skip_UTF8 (100, "FileName");
- Get_UTF8 (12, CreationDate, "Creation Date");
- Get_UTF8 (12, CreationTime, "Creation Time");
- Skip_UTF8(64, "Input device");
- Skip_UTF8(32, "Input device model number");
- Skip_UTF8(32, "Input device serial number");
- Skip_BF4( "X input device pitch");
- Skip_BF4( "Y input device pitch");
- Skip_BF4( "Image gamma of capture device");
- Skip_XX(40, "Reserved for future use");
- Element_End0();
-
- FILLING_BEGIN();
- //Coherency tests
- if (File_Offset+Buffer_Offset+Size_Total>=Config->File_Current_Size)
- Size_Total=(int32u)(Config->File_Current_Size-(File_Offset+Buffer_Offset)); //The total size is bigger than the real size
- if (Size_Generic+Size_Industry+Size_User>Size_Header || Size_Header>Size_Total)
- {
- Reject();
- return;
- }
-
- //Filling sizes
- Sizes.push_back(Size_Header);
- Sizes.push_back(Size_Industry);
- Sizes.push_back(Size_User);
- Sizes.push_back(Size_Header-(Size_Generic+Size_Industry+Size_User)); //Size of padding
- Sizes.push_back(Size_Total-Size_Header); //Size of image
-
- //Filling meta
- if (Frame_Count==0)
- {
- Fill(Stream_General, 0, General_Encoded_Date, CreationDate+__T(' ')+CreationTime); //ToDo: transform it in UTC
- Fill(StreamKind_Last, StreamPos_Last, "Encoded_Date", CreationDate+__T(' ')+CreationTime); //ToDo: transform it in UTC
- Fill(StreamKind_Last, StreamPos_Last, "Format", "Cineom");
- if (Version.size()>2 && Version[0]=='V' && Version[1]>='0' && Version[2]<='9')
- Version.insert(1, "ersion ");
- Fill(StreamKind_Last, StreamPos_Last, "Format_Version", Version);
- Fill(Stream_General, 0, General_Format_Version, Version);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dpx::GenericSectionHeader_Cineon_ImageElement()
-{
- Element_Begin1("image element");
- int32u Width, Height;
- Skip_B1( "Designator - Byte 0");
- Skip_B1( "Designator - Byte 1");
- Skip_B1( "Bits per pixel");
- Skip_B1( "Unused");
- Get_X4 (Width, "Pixels per line");
- Get_X4 (Height, "Lines per image element");
- Skip_BF4( "Minimum data value");
- Skip_BF4( "Minimum quantity represented");
- Skip_BF4( "Maximum data value");
- Skip_BF4( "Maximum quantity represented");
- Element_End0();
-
- FILLING_BEGIN();
- if (Frame_Count==0)
- {
- Fill(StreamKind_Last, StreamPos_Last, "Width", Width);
- Fill(StreamKind_Last, StreamPos_Last, "Height", Height);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dpx::GenericSectionHeader_Dpx()
-{
- Element_Name("Generic section header");
-
- //Parsing
- Element_Begin1("File information");
- std::string Version, CreationDate, Creator, Project, Copyright;
- int32u Size_Header, Size_Total, Size_Generic, Size_Industry, Size_User;
- Skip_String(4, "Magic number");
- Get_X4 (Size_Header, "Offset to image data");
- Get_String(8, Version, "Version number of header format");
- Get_X4 (Size_Total, "Total image file size");
- Skip_B4( "Ditto Key");
- Get_X4 (Size_Generic, "Generic section header length");
- Get_X4 (Size_Industry, "Industry specific header length");
- Get_X4 (Size_User, "User-defined header length");
- Skip_UTF8 (100, "FileName");
- Get_String (24, CreationDate, "Creation Date");
- Get_String (100, Creator, "Creator");
- Get_String (200, Project, "Project");
- Get_String (200, Copyright, "Right to use or copyright statement");
- Skip_B4( "Encryption key");
- Skip_XX(104, "Reserved for future use");
- Element_End0();
-
- Element_Begin1("Image information");
- int32u Width, Height, PAR_H, PAR_V;
- int16u ImageElements;
- Info_B2(ImageOrientation, "Image orientation");Param_Info1(DPX_Orientation[ImageOrientation]);
- Get_X2 (ImageElements, "Number of image elements");
- if (ImageElements>8)
- ImageElements=8;
- Get_X4 (Width, "Pixels per line");
- Get_X4 (Height, "Lines per image element");
- for(int16u ImageElement=0; ImageElement<ImageElements; ImageElement++)
- GenericSectionHeader_Dpx_ImageElement();
- if (ImageElements!=8)
- Skip_XX((8-ImageElements)*72, "Padding");
- Skip_XX(52, "Reserved for future use");
- Element_End0();
-
- Element_Begin1("Image source information");
- Skip_B4( "X Offset");
- Skip_B4( "Y Offset");
- Skip_BF4( "X center");
- Skip_BF4( "Y center");
- Skip_B4( "X original size");
- Skip_B4( "Y original size");
- Skip_UTF8(100, "Source image filename");
- Skip_UTF8(24, "Source image date/time");
- Skip_UTF8(32, "Input device name");
- Skip_UTF8(32, "Input device serial number");
- Element_Begin1("Border validity");
- Skip_B2( "XL border");
- Skip_B2( "XR border");
- Skip_B2( "YT border");
- Skip_B2( "YB border");
- Element_End0();
- Get_X4 (PAR_H, "Pixel ratio : horizontal");
- Get_X4 (PAR_V, "Pixel ratio : vertical");
-
- Element_Begin1("Additional source image information");
- Skip_BF4( "X scanned size");
- Skip_BF4( "Y scanned size");
- Skip_XX(20, "Reserved for future use");
- Element_End0();
-
- FILLING_BEGIN();
- //Coherency tests
- if (File_Offset+Buffer_Offset+Size_Total!=Config->File_Current_Size)
- Size_Total=(int32u)(Config->File_Current_Size-(File_Offset+Buffer_Offset)); //The total size is bigger than the real size
- if (Size_Generic==(int32u)-1)
- Size_Generic=(int32u)Element_Size;
- if (Size_Industry==(int32u)-1)
- Size_Industry=0;
- if (Size_User==(int32u)-1)
- Size_User=0;
- if (Size_Generic+Size_Industry+Size_User>Size_Header || Size_Header>Size_Total)
- {
- Reject();
- return;
- }
-
- //Filling sizes
- Sizes.push_back(Size_Header);
- Sizes.push_back(Size_Industry);
- Sizes.push_back(Size_User);
- Sizes.push_back(Size_Header-(Size_Generic+Size_Industry+Size_User)); //Size of padding
- Sizes.push_back(Size_Total-Size_Header); //Size of image
-
- //Filling meta
- if (Frame_Count==0)
- {
- Fill(Stream_General, 0, General_Encoded_Date, CreationDate); //ToDo: transform it in UTC
- Fill(StreamKind_Last, StreamPos_Last, "Encoded_Date", CreationDate); //ToDo: transform it in UTC
- Fill(Stream_General, 0, General_Encoded_Library, Creator);
- Fill(StreamKind_Last, StreamPos_Last, "Encoded_Library", Creator);
- Fill(Stream_General, 0, "Project", Project); //ToDo: map to a MediaInfo field (which one?)
- Fill(Stream_General, 0, General_Copyright, Copyright);
- Fill(StreamKind_Last, StreamPos_Last, "Format", "DPX");
- if (Version.size()>2 && Version[0]=='V' && Version[1]>='0' && Version[2]<='9')
- Version.insert(1, "ersion ");
- Fill(StreamKind_Last, StreamPos_Last, "Format_Version", Version);
- Fill(Stream_General, 0, General_Format_Version, Version);
-
- Fill(StreamKind_Last, StreamPos_Last, "Width", Width);
- Fill(StreamKind_Last, StreamPos_Last, "Height", Height);
- if (PAR_V && PAR_H!=(int32u)-1 && PAR_V!=(int32u)-1)
- Fill(StreamKind_Last, StreamPos_Last, "PixelAspectRatio", ((float)PAR_H)/PAR_V);
- else
- Fill(StreamKind_Last, StreamPos_Last, "PixelAspectRatio", (float)1, 3);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dpx::GenericSectionHeader_Dpx_ImageElement()
-{
- Element_Begin1("image element");
- int8u TransferCharacteristic, ColorimetricSpecification, BitDephs;
- Info_B4(DataSign, "Data sign");Param_Info1((DataSign==0?"unsigned":"signed"));
- Skip_B4( "Reference low data code value");
- Skip_BF4( "Reference low quantity represented");
- Skip_B4( "Reference high data code value");
- Skip_BF4( "Reference high quantity represented");
- Info_B1(Descriptor, "Descriptor");Param_Info1(DPX_Descriptors(Descriptor));
- Get_B1 (TransferCharacteristic, "Transfer characteristic");Param_Info1(DPX_TransferCharacteristic(TransferCharacteristic));
- Get_B1 (ColorimetricSpecification, "Colorimetric specification");Param_Info1(DPX_ColorimetricSpecification(ColorimetricSpecification));
- Get_B1 (BitDephs, "Bit depth");Param_Info1(DPX_ValidBitDephs(BitDephs));
- Info_B2(ComponentDataPackingMethod, "Packing");Param_Info1((ComponentDataPackingMethod<8?DPX_ComponentDataPackingMethod[ComponentDataPackingMethod]:"invalid"));
- Info_B2(ComponentDataEncodingMethod, "Encoding");Param_Info1((ComponentDataEncodingMethod<8?DPX_ComponentDataEncodingMethod[ComponentDataEncodingMethod]:"invalid"));
- Skip_B4( "Offset to data");
- Skip_B4( "End-of-line padding");
- Skip_B4( "End-of-image padding");
- Skip_UTF8(32, "Description of image element");
- Element_End0();
-
- FILLING_BEGIN();
- if (Frame_Count==0)
- {
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", BitDephs);
- Fill(StreamKind_Last, StreamPos_Last, "colour_description_present", "Yes");
- Fill(StreamKind_Last, StreamPos_Last, "colour_primaries", DPX_TransferCharacteristic(TransferCharacteristic));
- Fill(StreamKind_Last, StreamPos_Last, "transfer_characteristics", DPX_ColorimetricSpecification(ColorimetricSpecification));
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dpx::IndustrySpecificHeader_Cineon()
-{
- Element_Name("Motion picture industry specific header");
-
- //Parsing
- Element_Begin1("Motion-picture film information");
- Skip_B1( "?");
- Skip_B1( "?");
- Skip_B1( "?");
- Skip_B1( "?");
- Skip_B4( "?");
- Skip_B4( "?");
- Skip_UTF8(32, "?");
- Skip_B4( "?");
- Skip_B4( "?");
- Skip_UTF8(32, "?");
- Skip_UTF8(200, "?");
- Skip_XX(740, "Reserved for future use");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Dpx::IndustrySpecificHeader_Dpx()
-{
- Element_Name("Industry specific header");
-
- //Parsing
- Element_Begin1("Motion-picture film information");
- Skip_String(2, "Film mfg. ID code");
- Skip_String(2, "Film type");
- Skip_String(2, "Offset in perfs");
- Skip_String(6, "Prefix");
- Skip_String(4, "Count");
- Skip_String(32, "Format - e.g. Academy");
- Skip_B4( "Frame position in sequence");
- Skip_B4( "Sequence length (frames)");
- Skip_B4( "Held count (1 = default)");
- Skip_BF4( "Frame rate of original (frames/s)");
- Skip_BF4( "Shutter angle of camera in degrees");
- Skip_UTF8(32, "Frame identification - e.g. keyframe");
- Skip_UTF8(100, "Slate information");
- Skip_XX(56, "Reserved for future use");
- Element_End0();
-
- Element_Begin1("Television information");
- Skip_B4( "SMPTE time code");
- Skip_B4( "SMPTE user bits");
- Info_B1(Interlace, "Interlace");Param_Info1((Interlace==0?"noninterlaced":"2:1 interlace"));
- Skip_B1( "Field number");
- Info_B1(VideoSignalStandard, "Video signal standard");Param_Info1(DPX_VideoSignalStandard(VideoSignalStandard));
- Skip_B1( "Zero");
- Skip_BF4( "Horizontal sampling rate (Hz)");
- Skip_BF4( "Vertical sampling rate (Hz)");
- Skip_BF4( "Temporal sampling rate or frame rate (Hz)");
- Skip_BF4( "Time offset from sync to first pixel (ms)");
- Skip_BF4( "Gamma");
- Skip_BF4( "Black level code value");
- Skip_BF4( "Black gain");
- Skip_BF4( "Breakpoint");
- Skip_BF4( "Reference white level code value");
- Skip_BF4( "Integration time (s)");
- Skip_XX(76, "Reserved for future use");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Dpx::UserDefinedHeader_Cineon()
-{
- Element_Name("User defined header");
-
- //Parsing
- Skip_XX(Sizes[Pos_UserDefined], "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Dpx::UserDefinedHeader_Dpx()
-{
- Element_Name("User defined header");
-
- //Parsing
- if (Sizes[Pos_UserDefined]<32)
- {
- //Not in spec
- Skip_XX(Sizes[Pos_UserDefined], "Unknown");
- return;
- }
- Skip_UTF8(32, "User identification");
- Skip_XX(Sizes[Pos_UserDefined]-32, "User defined");
-}
-
-//---------------------------------------------------------------------------
-void File_Dpx::Padding()
-{
- Element_Name("Padding");
-
- //Parsing
- Skip_XX(Sizes[Pos_Padding], "Padding");
-}
-
-//---------------------------------------------------------------------------
-void File_Dpx::ImageData()
-{
- Element_Name("Image Data");
-
- //Parsing
- Skip_XX(Sizes[Pos_ImageData], "Data");
-
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
-
- if (Config->ParseSpeed<1.0)
- Finish("DPX"); //No need of more
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dpx::Get_X2(int16u &Info, const char* Name)
-{
- if (LittleEndian)
- Get_L2 (Info, Name);
- else
- Get_B2 (Info, Name);
-}
-
-//---------------------------------------------------------------------------
-void File_Dpx::Get_X4(int32u &Info, const char* Name)
-{
- if (LittleEndian)
- Get_L4 (Info, Name);
- else
- Get_B4 (Info, Name);
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_DPX_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Dpx.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Dpx.h
deleted file mode 100644
index 66cc33147..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Dpx.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DPX files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DpxH
-#define MediaInfo_File_DpxH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Dpx
-//***************************************************************************
-
-class File_Dpx : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Dpx();
-
-private :
- //Streams management
- void Streams_Accept();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test() {return Demux_UnpacketizeContainer_Test_OneFramePerFile();}
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Unsynched() {Read_Buffer_Unsynched_OneFramePerFile();}
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID) {return Read_Buffer_Seek_OneFramePerFile(Method, Value, ID);}
- #endif //MEDIAINFO_SEEK
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void GenericSectionHeader_Cineon();
- void GenericSectionHeader_Dpx();
- void GenericSectionHeader_Cineon_ImageElement();
- void GenericSectionHeader_Dpx_ImageElement();
- void IndustrySpecificHeader_Cineon();
- void IndustrySpecificHeader_Dpx();
- void UserDefinedHeader_Cineon();
- void UserDefinedHeader_Dpx();
- void Padding();
- void ImageData();
-
- //Temp
- std::vector<int32u> Sizes;
- size_t Sizes_Pos;
- int8u Version;
- bool IsDpx;
- bool LittleEndian;
-
- //Helpers
- void Get_X2 (int16u &Info, const char* Name);
- void Get_X4 (int32u &Info, const char* Name);
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Exr.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Exr.cpp
deleted file mode 100644
index 9e2f88d25..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Exr.cpp
+++ /dev/null
@@ -1,338 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_EXR_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Exr.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//***************************************************************************
-// Const
-//***************************************************************************
-
-enum Elements
-{
- Pos_FileInformation,
- Pos_GenericSection,
- Pos_IndustrySpecific,
- Pos_UserDefined,
- Pos_Padding,
- Pos_ImageData,
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Exr::File_Exr()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("EXR");
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Exr::Streams_Accept()
-{
- Fill(Stream_General, 0, General_Format, "EXR");
-
- if (!IsSub)
- {
- TestContinuousFileNames();
-
- Stream_Prepare((Config->File_Names.size()>1 || Config->File_IsReferenced_Get())?Stream_Video:Stream_Image);
- if (File_Size!=(int64u)-1)
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_StreamSize), File_Size);
- if (StreamKind_Last==Stream_Video)
- Fill(Stream_Video, StreamPos_Last, Video_FrameCount, Config->File_Names.size());
- }
- else
- Stream_Prepare(Stream_Image);
-
- //Configuration
- Buffer_MaximumSize=64*1024*1024; //Some big frames are possible (e.g YUV 4:2:2 10 bits 1080p)
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Exr::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- if (CC4(Buffer)!=0x762F3101) //"v/1"+1
- {
- Reject();
- return false;
- }
-
- //All should be OK...
- Accept();
-
- return true;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Exr::Header_Begin()
-{
- //Header
- if (Buffer_Offset+4>Buffer_Size)
- return false;
- if (CC4(Buffer+Buffer_Offset)==0x762F3101) //"v/1"+1
- return Buffer_Offset+12<=Buffer_Size;
-
- //Name
- name_End=0;
- while (Buffer_Offset+name_End<Buffer_Size)
- {
- if (Buffer[Buffer_Offset+name_End]=='\0')
- break;
- if (name_End==31)
- break;
- name_End++;
- }
- if (Buffer_Offset+name_End>=Buffer_Size)
- return false;
- if (name_End>=31)
- {
- Reject();
- return false;
- }
- if (name_End==0)
- return true;
-
- //Type
- type_End=0;
- while (Buffer_Offset+name_End+1+type_End<Buffer_Size)
- {
- if (Buffer[Buffer_Offset+name_End+1+type_End]=='\0')
- break;
- if (type_End==31)
- break;
- type_End++;
- }
-
- if (Buffer_Offset+name_End+1+type_End>=Buffer_Size)
- return false;
- if (type_End>=31)
- {
- Reject();
- return false;
- }
-
- if (Buffer_Offset+name_End+1+type_End+1+4>=Buffer_Size)
- return false;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Exr::Header_Parse()
-{
- //Header
- if (CC4(Buffer+Buffer_Offset)==0x762F3101) //"v/1"+1
- {
- //Filling
- Header_Fill_Code(0, "File header");
- Header_Fill_Size(12);
- return;
- }
-
- //Image data
- if (name_End==0)
- {
- //Filling
- Header_Fill_Code(0, "Image data");
- Header_Fill_Size(ImageData_End-(File_Offset+Buffer_Offset));
- return;
- }
-
- int32u size;
- Get_String(name_End, name, "name");
- Element_Offset++; //Null byte
- Get_String(type_End, type, "type");
- Element_Offset++; //Null byte
- Get_L4 (size, "size");
-
- //Filling
- Header_Fill_Code(0, Ztring().From_Local(name.c_str()));
- Header_Fill_Size(name_End+1+type_End+1+4+size);
-}
-
-//---------------------------------------------------------------------------
-void File_Exr::Data_Parse()
-{
- if (CC4(Buffer+Buffer_Offset)==0x762F3101) //"v/1"+1 //Header
- Header();
- else if (name_End==0)
- ImageData();
- else if (name=="comments" && type=="string")
- comments();
- else if (name=="compression" && type=="compression" && Element_Size==1)
- compression();
- else if (name=="dataWindow" && type=="box2i" && Element_Size==16)
- dataWindow();
- else if (name=="displayWindow" && type=="box2i" && Element_Size==16)
- displayWindow();
- else if (name=="pixelAspectRatio" && type=="float" && Element_Size==4)
- pixelAspectRatio();
- else
- Skip_XX(Element_Size, "value");
-}
-
-//---------------------------------------------------------------------------
-void File_Exr::Header()
-{
- //Parsing
- int32u Flags;
- int8u Version;
- Skip_L4( "Magic number");
- Get_L1 (Version, "Version field");
- Get_L3 (Flags, "Flags");
-
- //Filling
- if (Frame_Count==0)
- {
- Fill(Stream_General, 0, General_Format_Version, __T("Version ")+Ztring::ToZtring(Version));
- Fill(StreamKind_Last, 0, "Format", "EXR");
- Fill(StreamKind_Last, 0, "Format_Version", __T("Version ")+Ztring::ToZtring(Version));
- Fill(StreamKind_Last, 0, "Format_Profile", (Flags&0x02)?"Tile":"Line");
- }
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- ImageData_End=Config->File_Current_Size;
-}
-
-//---------------------------------------------------------------------------
-void File_Exr::ImageData()
-{
- Skip_XX(Element_Size, "data");
-
- if (!Status[IsFilled])
- Fill();
- if (Config->ParseSpeed<1.0)
- Finish();
-}
-
-//---------------------------------------------------------------------------
-void File_Exr::comments ()
-{
- //Parsing
- Ztring value;
- Get_Local(Element_Size, value, "value");
-
- //Filling
- if (Frame_Count==1)
- Fill(StreamKind_Last, 0, General_Comment, value);
-}
-
-//---------------------------------------------------------------------------
-void File_Exr::compression ()
-{
- //Parsing
- int8u value;
- Get_L1 (value, "value");
-
- //Filling
- std::string Compression;
- switch (value)
- {
- case 0x00 : Compression="raw"; break;
- case 0x01 : Compression="RLZ"; break;
- case 0x02 : Compression="ZIPS"; break;
- case 0x03 : Compression="ZIP"; break;
- case 0x04 : Compression="PIZ"; break;
- case 0x05 : Compression="PXR24"; break;
- case 0x06 : Compression="B44"; break;
- case 0x07 : Compression="B44A"; break;
- default : ;
- }
-
- if (Frame_Count==1)
- Fill(StreamKind_Last, 0, "Format_Compression", Compression.c_str());
-}
-
-//---------------------------------------------------------------------------
-void File_Exr::dataWindow ()
-{
- //Parsing
- int32u xMin, yMin, xMax, yMax;
- Get_L4 (xMin, "xMin");
- Get_L4 (yMin, "yMin");
- Get_L4 (xMax, "xMax");
- Get_L4 (yMax, "yMax");
-}
-
-//---------------------------------------------------------------------------
-void File_Exr::displayWindow ()
-{
- //Parsing
- int32u xMin, yMin, xMax, yMax;
- Get_L4 (xMin, "xMin");
- Get_L4 (yMin, "yMin");
- Get_L4 (xMax, "xMax");
- Get_L4 (yMax, "yMax");
-
- //Filling
- if (Frame_Count==1)
- {
- Fill(StreamKind_Last, 0, "Width", xMax-xMin+1);
- Fill(StreamKind_Last, 0, "Height", yMax-yMin+1);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Exr::pixelAspectRatio ()
-{
- //Parsing
- float value;
- Get_LF4(value, "value");
-
- //Filling
- if (Frame_Count==1)
- Fill(StreamKind_Last, 0, "PixelAspectRatio", value?value:1, 3);
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_EXR_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Exr.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Exr.h
deleted file mode 100644
index 84e651233..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Exr.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about EXR files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_ExrH
-#define MediaInfo_File_ExrH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Exr
-//***************************************************************************
-
-class File_Exr : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Exr();
-
-private :
- //Streams management
- void Streams_Accept();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test() {return Demux_UnpacketizeContainer_Test_OneFramePerFile();}
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Unsynched() {Read_Buffer_Unsynched_OneFramePerFile();}
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID) {return Read_Buffer_Seek_OneFramePerFile(Method, Value, ID);}
- #endif //MEDIAINFO_SEEK
-
- //Buffer - Per element
- bool Header_Begin();
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Header();
- void ImageData();
- void comments();
- void compression();
- void dataWindow();
- void displayWindow();
- void pixelAspectRatio();
-
- //Temp
- std::string name;
- std::string type;
- size_t name_End;
- size_t type_End;
- int64u ImageData_End;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Gif.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Gif.cpp
deleted file mode 100644
index 8998a31e8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Gif.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// From http://www.onicos.com/staff/iz/formats/gif.html
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_GIF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Gif.h"
-#include <cmath>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Gif::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<3)
- return false; //Must wait for more data
-
- if (CC3(Buffer)!=0x474946) //"GIF"
- {
- Reject("GIF");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Gif::Read_Buffer_Continue()
-{
- //Parsing
- Ztring Version;
- int16u Width, Height;
- int8u BackgroundColorIndex, PixelAspectRatio, Resolution, GCT_Size;
- bool GCT_Flag, Sort;
- Skip_Local(3, "Header");
- Get_Local (3, Version, "Version");
- Get_L2 (Width, "Logical Screen Width");
- Get_L2 (Height, "Logical Screen Height");
- BS_Begin();
- Get_SB ( GCT_Flag, "Global Color Table Flag");
- Get_S1 (3, Resolution, "Color Resolution");
- Get_SB ( Sort, "Sort Flag to Global Color Table");
- Get_S1 (3, GCT_Size, "Size of Global Color Table"); Param_Info1(Ztring::ToZtring((int16u)pow(2.0, 1+GCT_Size)));
- BS_End();
- Get_L1 (BackgroundColorIndex, "Background Color Index");
- Get_L1 (PixelAspectRatio, "Pixel Aspect Ratio");
- if (GCT_Flag)
- Skip_XX((int16u)pow(2.0, 1+GCT_Size)*3, "Global Color Table");
- Element_End0();
-
- FILLING_BEGIN();
- Accept("GIF");
-
- Stream_Prepare(Stream_Image);
- Fill(Stream_Image, 0, Image_Width, Width);
- Fill(Stream_Image, 0, Image_Height, Height);
- Fill(Stream_Image, 0, Image_Format, __T("GIF"));
- Fill(Stream_Image, 0, Image_Format_Profile, Version);
- Fill(Stream_Image, 0, Image_Codec, __T("GIF")+Version);
- if (PixelAspectRatio)
- Fill(Stream_Image, 0, Image_PixelAspectRatio, (((float)PixelAspectRatio)+15)/64);
-
- Finish("GIF");
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Gif.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Gif.h
deleted file mode 100644
index 80d6db7e3..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Gif.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about GIF files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_GifH
-#define MediaInfo_File_GifH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Gif
-//***************************************************************************
-
-class File_Gif : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Ico.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Ico.cpp
deleted file mode 100644
index 7e98a6163..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Ico.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_ICO_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Ico.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Ico::File_Ico()
-{
- IcoDataSize=0;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ico::Streams_Fill()
-{
- Fill(Stream_General, 0, General_Format, Type==1?"ICO":"CUR");
-
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- {
- Stream_Prepare(Stream_Image);
- Fill(Stream_Image, StreamPos_Last, Image_Width, Streams[Pos].Width?Streams[Pos].Width:256);
- Fill(Stream_Image, StreamPos_Last, Image_Height, Streams[Pos].Height?Streams[Pos].Height:256);
- if (Type==1)
- Fill(Stream_Image, StreamPos_Last, Image_BitDepth, Streams[Pos].BitsPerPixel);
- Fill(Stream_Image, StreamPos_Last, Image_StreamSize, Streams[Pos].Size);
- }
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Ico::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- if (CC2(Buffer) || (LittleEndian2int16u(Buffer+2)!=1 && LittleEndian2int16u(Buffer+2)!=2))
- {
- Reject("ICO");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Ico::FileHeader_Parse()
-{
- //Parsing
- Skip_L2( "Reserved");
- Get_L2 (Type, "Type");
- Get_L2 (Count, "Count");
-}
-
-//***************************************************************************
-
-// Buffer - Per element
-//***************************************************************************
-//---------------------------------------------------------------------------
-void File_Ico::Header_Parse()
-{
- Header_Fill_Size(16);
- Header_Fill_Code(0, "Directory");
-}
-
-//---------------------------------------------------------------------------
-void File_Ico::Data_Parse()
-{
- //Parsing
- int32u Size, Offset;
- int16u BitsPerPixel;
- int8u Width, Height;
- Get_L1 (Width, "Width");
- Get_L1 (Height, "Height");
- Skip_L1( "Colour count");
- Skip_L1( "Reserved");
- Skip_L2( Type==1?"Colour planes":"X hotspot");
- Get_L2 (BitsPerPixel, Type==1?"Bits per pixel":"Y hotspot");
- Get_L4 (Size, "Size of the bitmap data");
- Get_L4 (Offset, "Offset of the bitmap data");
-
- FILLING_BEGIN_PRECISE();
- stream Stream;
- Stream.Width=Width;
- Stream.Height=Height;
- Stream.BitsPerPixel=BitsPerPixel;
- Stream.Size=Size;
- Stream.Offset=Offset;
- Streams.push_back(Stream);
-
- IcoDataSize+=Size;
- if (Offset>File_Size || File_Offset+Buffer_Offset+Element_Size+IcoDataSize>File_Size)
- Reject("ICO");
- Count--;
- if (Count==0)
- {
- if (File_Offset+Buffer_Offset+Element_Size+IcoDataSize!=File_Size)
- Reject("ICO");
- else
- {
- Accept("ICO");
- Finish("ICO");
- }
- }
- FILLING_END();
-}
-
-//***************************************************************************
-//
-//***************************************************************************
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Ico.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Ico.h
deleted file mode 100644
index d125b55ff..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Ico.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Icon files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_IcoH
-#define MediaInfo_File_IcoH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Ico
-//***************************************************************************
-
-class File_Ico : public File__Analyze
-{
-public:
- //Constructor/Destructor
- File_Ico();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse ();
-
- //Buffer - Per element
- void Header_Parse ();
- void Data_Parse ();
-
- //Temp
- int64u IcoDataSize;
- int16u Type;
- int16u Count;
- struct stream
- {
- int32u Size;
- int32u Offset;
- int16u BitsPerPixel;
- int8u Width;
- int8u Height;
- };
- std::vector<stream> Streams;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Jpeg.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Jpeg.cpp
deleted file mode 100644
index 9c0f41bd2..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Jpeg.cpp
+++ /dev/null
@@ -1,1178 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Links:
-//
-// http://www.fileformat.info/format/jpeg/
-// http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html
-// http://www.w3.org/Graphics/JPEG/jfif3.pdf
-// http://www.sentex.net/~mwandel/jhead/
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_JPEG_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Jpeg.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "ZenLib/Utils.h"
-#include <vector>
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-namespace Elements
-{
- const int16u TEM =0xFF01;
- const int16u SOC =0xFF4F; //JPEG 2000
- const int16u SIZ =0xFF51; //JPEG 2000
- const int16u COD =0xFF52; //JPEG 2000
- const int16u COC =0xFF53; //JPEG 2000
- const int16u TLM =0xFF55; //JPEG 2000
- const int16u PLM =0xFF57; //JPEG 2000
- const int16u PLT =0xFF58; //JPEG 2000
- const int16u QCD =0xFF5C; //JPEG 2000
- const int16u QCC =0xFF5D; //JPEG 2000
- const int16u RGN =0xFF5E; //JPEG 2000
- const int16u POC =0xFF5F; //JPEG 2000
- const int16u PPM =0xFF60; //JPEG 2000
- const int16u PPT =0xFF61; //JPEG 2000
- const int16u CME =0xFF64; //JPEG 2000
- const int16u SOT =0xFF90; //JPEG 2000
- const int16u SOP =0xFF91; //JPEG 2000
- const int16u EPH =0xFF92; //JPEG 2000
- const int16u SOD =0xFF93; //JPEG 2000
- const int16u S0F0=0xFFC0;
- const int16u S0F1=0xFFC1;
- const int16u S0F2=0xFFC2;
- const int16u S0F3=0xFFC3;
- const int16u DHT =0xFFC4;
- const int16u S0F5=0xFFC5;
- const int16u S0F6=0xFFC6;
- const int16u S0F7=0xFFC7;
- const int16u JPG =0xFFC8;
- const int16u S0F9=0xFFC9;
- const int16u S0FA=0xFFCA;
- const int16u S0FB=0xFFCB;
- const int16u DAC =0xFFCC;
- const int16u S0FD=0xFFCD;
- const int16u S0FE=0xFFCE;
- const int16u S0FF=0xFFCF;
- const int16u RST0=0xFFD0;
- const int16u RST1=0xFFD1;
- const int16u RST2=0xFFD2;
- const int16u RST3=0xFFD3;
- const int16u RST4=0xFFD4;
- const int16u RST5=0xFFD5;
- const int16u RST6=0xFFD6;
- const int16u RST7=0xFFD7;
- const int16u SOI =0xFFD8;
- const int16u EOI =0xFFD9; //EOC in JPEG 2000
- const int16u SOS =0xFFDA;
- const int16u DQT =0xFFDB;
- const int16u DNL =0xFFDC;
- const int16u DRI =0xFFDD;
- const int16u DHP =0xFFDE;
- const int16u EXP =0xFFDF;
- const int16u APP0=0xFFE0;
- const int16u APP1=0xFFE1;
- const int16u APP2=0xFFE2;
- const int16u APP3=0xFFE3;
- const int16u APP4=0xFFE4;
- const int16u APP5=0xFFE5;
- const int16u APP6=0xFFE6;
- const int16u APP7=0xFFE7;
- const int16u APP8=0xFFE8;
- const int16u APP9=0xFFE9;
- const int16u APPA=0xFFEA;
- const int16u APPB=0xFFEB;
- const int16u APPC=0xFFEC;
- const int16u APPD=0xFFED;
- const int16u APPE=0xFFEE;
- const int16u APPF=0xFFEF;
- const int16u JPG0=0xFFF0;
- const int16u JPG1=0xFFF1;
- const int16u JPG2=0xFFF2;
- const int16u JPG3=0xFFF3;
- const int16u JPG4=0xFFF4;
- const int16u JPG5=0xFFF5;
- const int16u JPG6=0xFFF6;
- const int16u JPG7=0xFFF7;
- const int16u JPG8=0xFFF8;
- const int16u JPG9=0xFFF9;
- const int16u JPGA=0xFFFA;
- const int16u JPGB=0xFFFB;
- const int16u JPGC=0xFFFC;
- const int16u JPGD=0xFFFD;
- const int16u COM =0xFFFE;
-}
-
-//---------------------------------------------------------------------------
-// Borland C++ does not accept local template
-struct Jpeg_samplingfactor
-{
- int8u Ci;
- int8u Hi;
- int8u Vi;
-};
-
-//---------------------------------------------------------------------------
-string Jpeg2000_Rsiz(int16u Rsiz)
-{
- switch (Rsiz)
- {
- case 0x0000: return "No restrictions";
- case 0x0001: return "Profile-0";
- case 0x0002: return "Profile-1";
- case 0x0003: return "D-Cinema 2k";
- case 0x0004: return "D-Cinema 4k";
- case 0x0005: return "D-Cinema 2k Scalable";
- case 0x0006: return "D-Cinema 4k Scalable";
- case 0x0007: return "Long-term storage";
- case 0x0101: return "BCS@L1"; //Broadcast Contribution Single Tile
- case 0x0102: return "BCS@L2"; //Broadcast Contribution Single Tile
- case 0x0103: return "BCS@L3"; //Broadcast Contribution Single Tile
- case 0x0104: return "BCS@L4"; //Broadcast Contribution Single Tile
- case 0x0105: return "BCS@L5"; //Broadcast Contribution Single Tile
- case 0x0205: return "BCM@L5"; //Broadcast Contribution Multi-tile
- case 0x0306: return "BCMR@L6"; //Broadcast Contribution Multi-tile Reversible
- case 0x0307: return "BCMR@L7"; //Broadcast Contribution Multi-tile Reversible
- default: return Ztring::ToZtring(Rsiz, 16).To_UTF8();
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Jpeg::File_Jpeg()
-{
- //Config
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Jpeg;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- MustSynchronize=true;
- IsRawStream=true;
-
- //In
- StreamKind=Stream_Image;
- Interlaced=false;
- #if MEDIAINFO_DEMUX
- FrameRate=0;
- #endif //MEDIAINFO_DEMUX
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Jpeg::Streams_Accept()
-{
- if (!IsSub)
- {
- TestContinuousFileNames();
-
- Stream_Prepare(Config->File_Names.size()>1?Stream_Video:StreamKind);
- if (File_Size!=(int64u)-1)
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_StreamSize), File_Size);
- if (StreamKind_Last==Stream_Video)
- Fill(Stream_Video, StreamPos_Last, Video_FrameCount, Config->File_Names.size());
- }
- else
- Stream_Prepare(StreamKind);
-
- //Configuration
- Buffer_MaximumSize=64*1024*1024; //Some big frames are possible (e.g YUV 4:2:2 10 bits 1080p)
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::Streams_Finish()
-{
- if (StreamKind_Last==Stream_Video && Config->ParseSpeed>=1.0)
- Fill (Stream_Video, 0, Video_StreamSize, Buffer_TotalBytes, 10, true);
-}
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Jpeg::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<3)
- return false; //Must wait for more data
-
- if (Buffer[2]!=0xFF
- || (CC2(Buffer)!=Elements::SOI
- && CC2(Buffer)!=Elements::SOC))
- {
- Reject("JPEG");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Jpeg::Synchronize()
-{
- //Synchronizing
- while(Buffer_Offset+2<=Buffer_Size && (Buffer[Buffer_Offset ]!=0xFF
- || Buffer[Buffer_Offset+1]==0x00))
- Buffer_Offset++;
-
- if (Buffer_Offset+1==Buffer_Size && Buffer[Buffer_Offset ]!=0xFF)
- Buffer_Offset++;
-
- if (Buffer_Offset+2>Buffer_Size)
- return false;
-
- //Synched is OK
- Synched=true;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Jpeg::Synched_Test()
-{
- if (SOS_SOD_Parsed)
- return true; ///No sync after SOD
-
- //Must have enough buffer for having header
- if (Buffer_Offset+2>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset]!=0xFF)
- {
- Synched=false;
- return true;
- }
-
- //We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::Synched_Init()
-{
- APP0_JFIF_Parsed=false;
- SOS_SOD_Parsed=false;
- APPE_Adobe0_transform=(int8u)-1;
-}
-
-//***************************************************************************
-// Buffer - Demux
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-bool File_Jpeg::Demux_UnpacketizeContainer_Test()
-{
- if (!IsSub)
- {
- if (!Status[IsAccepted])
- Accept();
- if (Config->File_Names.size()>1)
- return Demux_UnpacketizeContainer_Test_OneFramePerFile();
- }
-
- if (Interlaced && Buffer_Offset==0)
- {
- bool StartIsFound=false;
- while (Demux_Offset+2<=Buffer_Size)
- {
- int16u code=BigEndian2int16u(Buffer+Demux_Offset);
- Demux_Offset+=2;
- switch (code)
- {
- case Elements::SOD : //JPEG-2000 start
- StartIsFound=true;
- case Elements::TEM :
- case Elements::RST0 :
- case Elements::RST1 :
- case Elements::RST2 :
- case Elements::RST3 :
- case Elements::RST4 :
- case Elements::RST5 :
- case Elements::RST6 :
- case Elements::RST7 :
- case Elements::SOC :
- case Elements::SOI :
- case Elements::EOI :
- break;
- default :
- if (Demux_Offset+2>Buffer_Size)
- break;
- {
- int16u size=BigEndian2int16u(Buffer+Demux_Offset);
- if (Demux_Offset+2+size>Buffer_Size)
- break;
- Demux_Offset+=size;
- if (code==Elements::SOS) //JPEG start
- StartIsFound=true;
- }
- }
- if (StartIsFound)
- break;
- }
-
- while (Demux_Offset+2<=Buffer_Size)
- {
- while (Demux_Offset<Buffer_Size && Buffer[Demux_Offset]!=0xFF)
- Demux_Offset++;
- if (Demux_Offset+2<=Buffer_Size && Buffer[Demux_Offset+1]==0xD9) //EOI (JPEG 2000)
- break;
- Demux_Offset++;
- }
- if (Demux_Offset+2<=Buffer_Size)
- Demux_Offset+=2;
- }
- else
- Demux_Offset=Buffer_Size;
-
- if (Interlaced)
- {
- if (Field_Count==0 && FrameRate && Demux_Offset!=Buffer_Size)
- FrameRate*=2; //Now field rate
- if (FrameRate)
- FrameInfo.DUR=float64_int64s(1000000000/FrameRate); //Actually, field or frame rate
- }
-
- Demux_UnpacketizeContainer_Demux();
-
- if (Interlaced)
- {
- if (FrameInfo.DTS!=(int64u)-1 && FrameInfo.DUR!=(int64u)-1)
- FrameInfo.DTS+=FrameInfo.DUR;
- }
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Jpeg::Read_Buffer_Unsynched()
-{
- SOS_SOD_Parsed=false;
-
- Read_Buffer_Unsynched_OneFramePerFile();
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::Read_Buffer_Continue()
-{
- if (Config->ParseSpeed>=1.0 && IsSub && Status[IsFilled])
- {
- #if MEDIAINFO_DEMUX
- if (Buffer_TotalBytes<Demux_TotalBytes)
- {
- Skip_XX(Demux_TotalBytes-Buffer_TotalBytes, "Data"); //We currently don't want to parse data during demux
- Param_Info1(Frame_Count);
- if (Interlaced)
- {
- Field_Count++;
- Field_Count_InThisBlock++;
- }
- if (!Interlaced || Field_Count%2==0)
- {
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- }
- return;
- }
- #endif //MEDIAINFO_DEMUX
-
- #if MEDIAINFO_DEMUX
- if (!Demux_UnpacketizeContainer)
- #endif //MEDIAINFO_DEMUX
- {
- Skip_XX(Buffer_Size, "Data"); //We currently don't want to parse data during demux
- Param_Info1(Frame_Count);
- if (Interlaced)
- Field_Count+=2;
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- }
- }
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Jpeg::Header_Parse()
-{
- if (SOS_SOD_Parsed)
- {
- Header_Fill_Code(0, "Data");
- if (!Header_Parser_Fill_Size())
- {
- Element_WaitForMoreData();
- return;
- }
- return;
- }
-
- //Parsing
- int16u code, size;
- Get_B2 (code, "Marker");
- switch (code)
- {
- case Elements::TEM :
- case Elements::RST0 :
- case Elements::RST1 :
- case Elements::RST2 :
- case Elements::RST3 :
- case Elements::RST4 :
- case Elements::RST5 :
- case Elements::RST6 :
- case Elements::RST7 :
- case Elements::SOC :
- case Elements::SOD :
- case Elements::SOI :
- case Elements::EOI :
- size=0; break;
- default : Get_B2 (size, "Fl - Frame header length");
- }
-
- //Filling
- Header_Fill_Code(code, Ztring().From_CC2(code));
- Header_Fill_Size(2+size);
-}
-
-//---------------------------------------------------------------------------
-bool File_Jpeg::Header_Parser_Fill_Size()
-{
- //Look for next Sync word
- if (Buffer_Offset_Temp==0) //Buffer_Offset_Temp is not 0 if Header_Parse_Fill_Size() has already parsed first frames
- Buffer_Offset_Temp=Buffer_Offset;
-
- #if MEDIAINFO_DEMUX
- if (Buffer_TotalBytes+2<Demux_TotalBytes)
- Buffer_Offset_Temp=(size_t)(Demux_TotalBytes-(Buffer_TotalBytes+2));
- #endif //MEDIAINFO_DEMUX
-
- while (Buffer_Offset_Temp+2<=Buffer_Size)
- {
- while (Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp]!=0xFF)
- Buffer_Offset_Temp++;
- if (Buffer_Offset_Temp+2<=Buffer_Size && Buffer[Buffer_Offset_Temp+1]==0xD9) //EOI
- break;
- Buffer_Offset_Temp++;
- }
-
- //Must wait more data?
- if (Buffer_Offset_Temp+2>Buffer_Size)
- {
- if (/*FrameIsAlwaysComplete ||*/ File_Offset+Buffer_Size>=File_Size)
- Buffer_Offset_Temp=Buffer_Size; //We are sure that the next bytes are a start
- else
- return false;
- }
-
- //OK, we continue
- Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
- Buffer_Offset_Temp=0;
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::Data_Parse()
-{
- #define CASE_INFO(_NAME, _DETAIL) \
- case Elements::_NAME : Element_Info1(#_NAME); Element_Info1(_DETAIL); _NAME(); break;
-
- //Parsing
- if (SOS_SOD_Parsed)
- {
- Skip_XX(Element_Size, "Data");
- SOS_SOD_Parsed=false;
- return;
- }
- switch (Element_Code)
- {
- CASE_INFO(TEM , "TEM");
- CASE_INFO(SOC , "Start of codestream"); //JPEG 2000
- CASE_INFO(SIZ , "Image and tile size"); //JPEG 2000
- CASE_INFO(COD , "Coding style default"); //JPEG 2000
- CASE_INFO(COC , "Coding style component"); //JPEG 2000
- CASE_INFO(TLM , "Tile-part lengths, main header"); //JPEG 2000
- CASE_INFO(PLM , "Packet length, main header"); //JPEG 2000
- CASE_INFO(PLT , "Packet length, tile-part header"); //JPEG 2000
- CASE_INFO(QCD , "Quantization default"); //JPEG 2000
- CASE_INFO(QCC , "Quantization component "); //JPEG 2000
- CASE_INFO(RGN , "Region-of-interest"); //JPEG 2000
- CASE_INFO(POC , "Progression order change"); //JPEG 2000
- CASE_INFO(PPM , "Packed packet headers, main header"); //JPEG 2000
- CASE_INFO(PPT , "Packed packet headers, tile-part header"); //JPEG 2000
- CASE_INFO(CME , "Comment and extension"); //JPEG 2000
- CASE_INFO(SOT , "Start of tile-part"); //JPEG 2000
- CASE_INFO(SOP , "Start of packet"); //JPEG 2000
- CASE_INFO(EPH , "End of packet header"); //JPEG 2000
- CASE_INFO(SOD , "Start of data"); //JPEG 2000
- CASE_INFO(S0F0, "Baseline DCT (Huffman)");
- CASE_INFO(S0F1, "Extended sequential DCT (Huffman)");
- CASE_INFO(S0F2, "Progressive DCT (Huffman)");
- CASE_INFO(S0F3, "Lossless (sequential) (Huffman)");
- CASE_INFO(DHT , "Define Huffman Tables");
- CASE_INFO(S0F5, "Differential sequential DCT (Huffman)");
- CASE_INFO(S0F6, "Differential progressive DCT (Huffman)");
- CASE_INFO(S0F7, "Differential lossless (sequential) (Huffman)");
- CASE_INFO(JPG , "Reserved for JPEG extensions");
- CASE_INFO(S0F9, "Extended sequential DCT (Arithmetic)");
- CASE_INFO(S0FA, "Progressive DCT (Arithmetic)");
- CASE_INFO(S0FB, "Lossless (sequential) (Arithmetic)");
- CASE_INFO(DAC , "Define Arithmetic Coding");
- CASE_INFO(S0FD, "Differential sequential DCT (Arithmetic)");
- CASE_INFO(S0FE, "Differential progressive DCT (Arithmetic)");
- CASE_INFO(S0FF, "Differential lossless (sequential) (Arithmetic)");
- CASE_INFO(RST0, "Restart Interval Termination 0");
- CASE_INFO(RST1, "Restart Interval Termination 1");
- CASE_INFO(RST2, "Restart Interval Termination 2");
- CASE_INFO(RST3, "Restart Interval Termination 3");
- CASE_INFO(RST4, "Restart Interval Termination 4");
- CASE_INFO(RST5, "Restart Interval Termination 5");
- CASE_INFO(RST6, "Restart Interval Termination 6");
- CASE_INFO(RST7, "Restart Interval Termination 7");
- CASE_INFO(SOI , "Start Of Image");
- CASE_INFO(EOI , "End Of Image"); //Is EOC (End of codestream) in JPEG 2000
- CASE_INFO(SOS , "Start Of Scan");
- CASE_INFO(DQT , "Define Quantization Tables");
- CASE_INFO(DNL , "Define Number of Lines");
- CASE_INFO(DRI , "Define Restart Interval");
- CASE_INFO(DHP , "Define Hierarchical Progression");
- CASE_INFO(EXP , "Expand Reference Components");
- CASE_INFO(APP0, "Application-specific marker 0");
- CASE_INFO(APP1, "Application-specific marker 1");
- CASE_INFO(APP2, "Application-specific marker 2");
- CASE_INFO(APP3, "Application-specific marker 3");
- CASE_INFO(APP4, "Application-specific marker 4");
- CASE_INFO(APP5, "Application-specific marker 5");
- CASE_INFO(APP6, "Application-specific marker 6");
- CASE_INFO(APP7, "Application-specific marker 7");
- CASE_INFO(APP8, "Application-specific marker 8");
- CASE_INFO(APP9, "Application-specific marker 9");
- CASE_INFO(APPA, "Application-specific marker 10");
- CASE_INFO(APPB, "Application-specific marker 11");
- CASE_INFO(APPC, "Application-specific marker 12");
- CASE_INFO(APPD, "Application-specific marker 13");
- CASE_INFO(APPE, "Application-specific marker 14");
- CASE_INFO(APPF, "Application-specific marker 15");
- CASE_INFO(JPG0, "JPG");
- CASE_INFO(JPG1, "JPG");
- CASE_INFO(JPG2, "JPG");
- CASE_INFO(JPG3, "JPG");
- CASE_INFO(JPG4, "JPG");
- CASE_INFO(JPG5, "JPG");
- CASE_INFO(JPG6, "JPG");
- CASE_INFO(JPG7, "JPG");
- CASE_INFO(JPG8, "JPG");
- CASE_INFO(JPG9, "JPG");
- CASE_INFO(JPGA, "JPG");
- CASE_INFO(JPGB, "JPG");
- CASE_INFO(JPGC, "JPG");
- CASE_INFO(JPGD, "JPG");
- CASE_INFO(COM , "Comment");
- default : Element_Info1("Reserved");
- Skip_XX(Element_Size, "Data");
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Jpeg::SIZ()
-{
- //Parsing
- vector<float> SamplingFactors;
- vector<int8u> BitDepths;
- int8u SamplingFactors_Max=0;
- int32u Xsiz, Ysiz;
- int16u Rsiz, Count;
- Get_B2 (Rsiz, "Rsiz - Capability of the codestream");
- Get_B4 (Xsiz, "Xsiz - Image size X");
- Get_B4 (Ysiz, "Ysiz - Image size Y");
- Skip_B4( "XOsiz - Image offset X");
- Skip_B4( "YOsiz - Image offset Y");
- Skip_B4( "tileW - Size of tile W");
- Skip_B4( "tileH - Size of tile H");
- Skip_B4( "XTOsiz - Upper-left tile offset X");
- Skip_B4( "YTOsiz - Upper-left tile offset Y");
- Get_B2 (Count, "Components and initialize related arrays");
- for (int16u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("Initialize related array");
- int8u BitDepth, compSubsX, compSubsY;
- BS_Begin();
- Skip_SB( "Signed");
- Get_S1 (7, BitDepth, "BitDepth"); Param_Info1(1+BitDepth); Element_Info1(1+BitDepth);
- BS_End();
- Get_B1 ( compSubsX, "compSubsX"); Element_Info1(compSubsX);
- Get_B1 ( compSubsY, "compSubsY"); Element_Info1(compSubsY);
- Element_End0();
-
- //Filling list of HiVi
- if (compSubsX)
- {
- SamplingFactors.push_back(((float)compSubsY)/compSubsX);
- if (((float)compSubsY)/compSubsX>SamplingFactors_Max)
- SamplingFactors_Max=(int8u)((float)compSubsY)/compSubsX;
- }
-
- if (BitDepths.empty() || BitDepth!=BitDepths[0])
- BitDepths.push_back(BitDepth);
- }
-
- FILLING_BEGIN_PRECISE();
- if (Frame_Count==0 && Field_Count==0)
- {
- Accept("JPEG 2000");
- Fill("JPEG 2000");
-
- if (Count_Get(StreamKind_Last)==0)
- Stream_Prepare(StreamKind_Last);
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Format), "JPEG 2000");
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Codec), "JPEG 2000");
- Fill(StreamKind_Last, 0, "Format_Profile", Jpeg2000_Rsiz(Rsiz));
- if (StreamKind_Last==Stream_Image)
- Fill(Stream_Image, 0, Image_Codec_String, "JPEG 2000", Unlimited, true, true); //To Avoid automatic filling
- Fill(StreamKind_Last, 0, StreamKind_Last==Stream_Image?(size_t)Image_Width:(size_t)Video_Width, Xsiz);
- Fill(StreamKind_Last, 0, StreamKind_Last==Stream_Image?(size_t)Image_Height:(size_t)Video_Height, Ysiz*(Interlaced?2:1)); //If image is from interlaced content, must multiply height by 2
-
- if (BitDepths.size()==1)
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_BitDepth), 1+BitDepths[0]);
-
- //Chroma subsampling
- if (SamplingFactors_Max)
- while (SamplingFactors_Max<4)
- {
- for (size_t Pos=0; Pos<SamplingFactors.size(); Pos++)
- SamplingFactors[Pos]*=2;
- SamplingFactors_Max*=2;
- }
- while (SamplingFactors.size()<3)
- SamplingFactors.push_back(0);
- Ztring ChromaSubsampling;
- for (size_t Pos=0; Pos<SamplingFactors.size(); Pos++)
- ChromaSubsampling+=Ztring::ToZtring(SamplingFactors[Pos], 0)+__T(':');
- if (!ChromaSubsampling.empty())
- {
- ChromaSubsampling.resize(ChromaSubsampling.size()-1);
- Fill(StreamKind_Last, 0, "ChromaSubsampling", ChromaSubsampling);
-
- //Not for sure
- if (ChromaSubsampling==__T("4:4:4") && (Retrieve(StreamKind_Last, 0, "Format_Profile")==__T("D-Cinema 2k") || Retrieve(StreamKind_Last, 0, "Format_Profile")==__T("D-Cinema 4k")))
- Fill(StreamKind_Last, 0, "ColorSpace", "XYZ");
- else if (!IsSub)
- {
- if (ChromaSubsampling==__T("4:2:0") || ChromaSubsampling==__T("4:2:2"))
- Fill(StreamKind_Last, 0, "ColorSpace", "YUV");
- else if (ChromaSubsampling==__T("4:4:4"))
- Fill(StreamKind_Last, 0, "ColorSpace", "RGB");
- }
- }
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::COD()
-{
- //Parsing
- int8u Style, Style2, Levels, MultipleComponentTransform;
- bool PrecinctUsed;
- Get_B1 (Style, "Scod - Style");
- Get_Flags (Style, 0, PrecinctUsed, "Precinct used");
- Skip_Flags(Style, 1, "Use SOP (start of packet)");
- Skip_Flags(Style, 2, "Use EPH (end of packet header)");
- Get_B1 (Levels, "Number of decomposition levels");
- Skip_B1( "Progression order");
- Skip_B2( "Number of layers");
- Info_B1(DimX, "Code-blocks dimensions X (2^(n+2))"); Param_Info2(1<<(DimX+2), " pixels");
- Info_B1(DimY, "Code-blocks dimensions Y (2^(n+2))"); Param_Info2(1<<(DimY+2), " pixels");
- Get_B1 (Style2, "Style of the code-block coding passes");
- Skip_Flags(Style2, 0, "Selective arithmetic coding bypass");
- Skip_Flags(Style2, 1, "MQ states for all contexts");
- Skip_Flags(Style2, 2, "Regular termination");
- Skip_Flags(Style2, 3, "Vertically stripe-causal context formation");
- Skip_Flags(Style2, 4, "Error resilience info is embedded on MQ termination");
- Skip_Flags(Style2, 5, "Segmentation marker is to be inserted at the end of each normalization coding pass");
- Skip_B1( "Transform");
- Get_B1(MultipleComponentTransform, "Multiple component transform");
- if (PrecinctUsed)
- {
- BS_Begin();
- Skip_S1(4, "LL sub-band width");
- Skip_S1(4, "LL sub-band height");
- BS_End();
- for (int16u Pos=0; Pos<Levels; Pos++)
- {
- Element_Begin1("Decomposition level");
- BS_Begin();
- Skip_S1(4, "decomposition level width");
- Skip_S1(4, "decomposition level height");
- BS_End();
- Element_End0();
- }
- }
-
- FILLING_BEGIN();
- if (Frame_Count==0 && Field_Count==0)
- {
- switch (MultipleComponentTransform)
- {
- case 0x01 : Fill(StreamKind_Last, 0, "Compression_Mode", "Lossless"); break;
- case 0x02 : Fill(StreamKind_Last, 0, "Compression_Mode", "Lossy"); break;
- default : ;
- }
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::QCD()
-{
- //Parsing
- Skip_B1( "Sqcd - Style");
- Skip_XX(Element_Size-Element_Offset, "QCD data");
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::SOD()
-{
- SOS_SOD_Parsed=true;
- if (Interlaced)
- {
- Field_Count++;
- Field_Count_InThisBlock++;
- }
- if (!Interlaced || Field_Count%2==0)
- {
- Frame_Count++;
- Frame_Count_InThisBlock++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- if (Status[IsFilled])
- Fill();
- if (Config->ParseSpeed<1.0)
- Finish("JPEG 2000"); //No need of more
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::SOF_()
-{
- //Parsing
- vector<Jpeg_samplingfactor> SamplingFactors;
- int16u Height, Width;
- int8u Resolution, Count;
- Get_B1 (Resolution, "P - Sample precision");
- Get_B2 (Height, "Y - Number of lines");
- Get_B2 (Width, "X - Number of samples per line");
- Get_B1 (Count, "Nf - Number of image components in frame");
- for (int8u Pos=0; Pos<Count; Pos++)
- {
- Jpeg_samplingfactor SamplingFactor;
- Element_Begin1("Component");
- Get_B1 ( SamplingFactor.Ci, "Ci - Component identifier"); if (SamplingFactor.Ci>Count) Element_Info1(Ztring().append(1, (Char)SamplingFactor.Ci)); else Element_Info1(SamplingFactor.Ci);
- BS_Begin();
- Get_S1 (4, SamplingFactor.Hi, "Hi - Horizontal sampling factor"); Element_Info1(SamplingFactor.Hi);
- Get_S1 (4, SamplingFactor.Vi, "Vi - Vertical sampling factor"); Element_Info1(SamplingFactor.Vi);
- BS_End();
- Skip_B1( "Tqi - Quantization table destination selector");
- Element_End0();
-
- //Filling list of HiVi
- SamplingFactors.push_back(SamplingFactor);
- }
-
- FILLING_BEGIN_PRECISE();
- if (Frame_Count==0 && Field_Count==0)
- {
- Accept("JPEG");
- Fill("JPEG");
-
- if (Count_Get(StreamKind_Last)==0)
- Stream_Prepare(StreamKind_Last);
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Format), "JPEG");
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Codec), "JPEG");
- if (StreamKind_Last==Stream_Image)
- Fill(Stream_Image, 0, Image_Codec_String, "JPEG", Unlimited, true, true); //To Avoid automatic filling
- if (StreamKind_Last==Stream_Video)
- Fill(Stream_Video, 0, Video_InternetMediaType, "video/JPEG", Unlimited, true, true);
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_BitDepth), Resolution);
- Fill(StreamKind_Last, 0, "Height", Height*(Interlaced?2:1));
- Fill(StreamKind_Last, 0, "Width", Width);
-
- //ColorSpace from http://docs.oracle.com/javase/1.4.2/docs/api/javax/imageio/metadata/doc-files/jpeg_metadata.html
- switch (APPE_Adobe0_transform)
- {
- case 0x01 :
- if (Count==3)
- Fill(StreamKind_Last, 0, "ColorSpace", "YUV");
- break;
- case 0x02 :
- if (Count==4)
- Fill(StreamKind_Last, 0, "ColorSpace", "YCCB");
- break;
- default :
- {
- int8u Ci[256];
- memset(Ci, 0, 256);
- for (int8u Pos=0; Pos<Count; Pos++)
- Ci[SamplingFactors[Pos].Ci]++;
-
- switch (Count)
- {
- case 1 : Fill(StreamKind_Last, 0, "ColorSpace", "Y"); break;
- case 2 : Fill(StreamKind_Last, 0, "ColorSpace", "YA"); break;
- case 3 :
- if (!APP0_JFIF_Parsed && Ci['R']==1 && Ci['G']==1 && Ci['B']==1) //RGB
- Fill(StreamKind_Last, 0, "ColorSpace", "RGB");
- else if ((Ci['Y']==1 && ((Ci['C']==1 && Ci['c']==1) //YCc
- || Ci['C']==2)) //YCC
- || APP0_JFIF_Parsed //APP0 JFIF header present so YCC
- || APPE_Adobe0_transform==0 //transform set to YCC
- || (SamplingFactors[0].Ci==0 && SamplingFactors[1].Ci==1 && SamplingFactors[2].Ci==2) //012
- || (SamplingFactors[0].Ci==1 && SamplingFactors[1].Ci==2 && SamplingFactors[2].Ci==3)) //123
- Fill(StreamKind_Last, 0, "ColorSpace", "YUV");
- break;
- case 4 :
- if (!APP0_JFIF_Parsed && Ci['R']==1 && Ci['G']==1 && Ci['B']==1 && Ci['A']==1) //RGBA
- Fill(StreamKind_Last, 0, "ColorSpace", "RGBA");
- else if ((Ci['Y']==1 && Ci['A']==1 && ((Ci['C']==1 && Ci['c']==1) //YCcA
- || Ci['C']==2)) //YCCA
- || APP0_JFIF_Parsed //APP0 JFIF header present so YCCA
- || (SamplingFactors[0].Ci==0 && SamplingFactors[1].Ci==1 && SamplingFactors[2].Ci==2 && SamplingFactors[3].Ci==3) //0123
- || (SamplingFactors[0].Ci==1 && SamplingFactors[1].Ci==2 && SamplingFactors[2].Ci==3 && SamplingFactors[3].Ci==4)) //1234
- Fill(StreamKind_Last, 0, "ColorSpace", "YUVA");
- else if (APPE_Adobe0_transform==0) //transform set to CMYK
- Fill(StreamKind_Last, 0, "ColorSpace", "YCCB");
- break;
- default: ;
- }
- }
- }
-
- //Chroma subsampling
- if ((SamplingFactors.size()==3 || SamplingFactors.size()==4) && SamplingFactors[1].Hi==1 && SamplingFactors[2].Hi==1 && SamplingFactors[1].Vi==1 && SamplingFactors[2].Vi==1)
- {
- string ChromaSubsampling;
- switch (SamplingFactors[0].Hi)
- {
- case 1 :
- switch (SamplingFactors[0].Vi)
- {
- case 1 : ChromaSubsampling="4:4:4"; break;
- default: ;
- }
- break;
- case 2 :
- switch (SamplingFactors[0].Vi)
- {
- case 1 : ChromaSubsampling="4:2:2"; break;
- case 2 : ChromaSubsampling="4:2:0"; break;
- default: ;
- }
- break;
- case 4 :
- switch (SamplingFactors[0].Vi)
- {
- case 1 : ChromaSubsampling="4:1:1"; break;
- case 2 : ChromaSubsampling="4:1:0"; break;
- default: ;
- }
- break;
- default: ;
- }
- if (!ChromaSubsampling.empty())
- {
- if (SamplingFactors.size()==4)
- {
- if (ChromaSubsampling=="4:4:4" && SamplingFactors[3].Hi==1 && SamplingFactors[3].Vi==1)
- ChromaSubsampling+=":4";
- else
- ChromaSubsampling+=":?";
- }
- Fill(StreamKind_Last, 0, "ChromaSubsampling", ChromaSubsampling);
- }
- }
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::SOS()
-{
- //Parsing
- int8u Count;
- Get_B1 (Count, "Number of image components in scan");
- for (int8u Pos=0; Pos<Count; Pos++)
- {
- Skip_B1( "Scan component selector");
- Skip_B1( "Entropy coding table destination selector");
- }
- Skip_B1( "Start of spectral or predictor selection");
- Skip_B1( "End of spectral selection");
- Skip_B1( "Successive approximation bit position");
-
- FILLING_BEGIN_PRECISE();
- SOS_SOD_Parsed=true;
- if (Interlaced)
- {
- Field_Count++;
- Field_Count_InThisBlock++;
- }
- if (!Interlaced || Field_Count%2==0)
- {
- Frame_Count++;
- Frame_Count_InThisBlock++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- }
- if (Status[IsFilled])
- Fill();
- if (Config->ParseSpeed<1.0)
- Finish("JPEG"); //No need of more
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::APP0()
-{
- //Parsing
- int32u Name;
- Get_C4(Name, "Name");
- switch (Name)
- {
- case 0x41564931 : APP0_AVI1(); break; //"AVI1"
- case 0x4A464946 : APP0_JFIF(); break; //"JFIF"
- case 0x4A464646 : APP0_JFFF(); break; //"JFFF"
- default : Skip_XX(Element_Size-Element_Offset, "Unknown");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::APP0_AVI1()
-{
- Element_Info1("AVI1");
-
- //Parsing
- int8u FieldOrder=(int8u)-1;
- if (Element_Size==16-4)
- {
- Get_B1 (FieldOrder, "Polarity");
- Skip_XX(7, "Zeroes");
- }
- if (Element_Size==18-4)
- {
- int32u FieldSizeLessPadding;
- Get_B1 (FieldOrder, "Field Order");
- Skip_B1( "Zero");
- Skip_B4( "FieldSize");
- Get_B4 (FieldSizeLessPadding, "FieldSizeLessPadding");
-
- //Coherency
- if (FieldOrder==0 && IsSub && FieldSizeLessPadding!=Buffer_Size)
- FieldOrder=(int8u)-1; //Not coherant
- }
-
- FILLING_BEGIN();
- if (Frame_Count==0 && Field_Count==0)
- {
- Accept();
-
- switch (FieldOrder)
- {
- case 0x00 : Fill(Stream_Video, 0, Video_Interlacement, "PPF"); Fill(Stream_Video, 0, Video_ScanType, "Progressive"); break;
- case 0x01 : Fill(Stream_Video, 0, Video_Interlacement, "TFF"); Fill(Stream_Video, 0, Video_ScanType, "Interlaced"); Fill(Stream_Video, 0, Video_ScanOrder, "TFF"); Interlaced=true; break;
- case 0x02 : Fill(Stream_Video, 0, Video_Interlacement, "BFF"); Fill(Stream_Video, 0, Video_ScanType, "Interlaced"); Fill(Stream_Video, 0, Video_ScanOrder, "BFF"); Interlaced=true; break;
- case 0xFF : Fill(Stream_Video, 0, Video_ScanType, "Interlaced"); Interlaced=true; break;
- default : ;
- }
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::APP0_JFIF()
-{
- Element_Info1("JFIF");
-
- //Parsing
- Skip_B1( "Zero");
- int16u Width, Height;
- int8u Unit, ThumbailX, ThumbailY;
- Skip_B2( "Version");
- Get_B1 (Unit, "Unit"); //0=Pixels, 1=dpi, 2=dpcm
- Get_B2 (Width, "Xdensity");
- Get_B2 (Height, "Ydensity");
- Get_B1 (ThumbailX, "Xthumbail");
- Get_B1 (ThumbailY, "Ythumbail");
- Skip_XX(3*ThumbailX*ThumbailY, "RGB Thumbail");
-
- APP0_JFIF_Parsed=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::APP0_JFFF()
-{
- Element_Info1("JFFF");
-
- Skip_B1( "Zero");
- Skip_B1( "extension_code"); //0x10 Thumbnail coded using JPEG, 0x11 Thumbnail stored using 1 byte/pixel, 0x13 Thumbnail stored using 3 bytes/pixel
- if (Element_Size>Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "extension_data");
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::APP0_JFFF_JPEG()
-{
- //Parsing
- Element_Begin1("Thumbail JPEG");
- if (Element_Size>Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "Data");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::APP0_JFFF_1B()
-{
- //Parsing
- Element_Begin1("Thumbail 1 byte per pixel");
- int8u ThumbailX, ThumbailY;
- Get_B1 (ThumbailX, "Xthumbail");
- Get_B1 (ThumbailY, "Ythumbail");
- Skip_XX(768, "Palette");
- Skip_XX(ThumbailX*ThumbailY, "Thumbail");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::APP0_JFFF_3B()
-{
- //Parsing
- Element_Begin1("Thumbail 3 bytes per pixel");
- int8u ThumbailX, ThumbailY;
- Get_B1 (ThumbailX, "Xthumbail");
- Get_B1 (ThumbailY, "Ythumbail");
- Skip_XX(3*ThumbailX*ThumbailY, "RGB Thumbail");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::APP1()
-{
- //Parsing
- int64u Name;
- Get_C6(Name, "Name");
-
- switch (Name)
- {
- case 0x457869660000LL : APP1_EXIF(); break; //"Exif\0\0"
- default : Skip_XX(Element_Size-Element_Offset, "Data");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::APP1_EXIF()
-{
- Element_Info1("Exif");
-
- //Parsing
- int32u Alignment;
- Get_C4(Alignment, "Alignment");
- if (Alignment==0x49492A00)
- Skip_B4( "First_IFD");
- if (Alignment==0x4D4D2A00)
- Skip_L4( "First_IFD");
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::APPE()
-{
- //Parsing
- int64u Name;
- Get_C6(Name, "Name");
- switch (Name)
- {
- case 0x41646F626500LL : APPE_Adobe0(); break; //"AVI1"
- default : Skip_XX(Element_Size-Element_Offset, "Unknown");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Jpeg::APPE_Adobe0()
-{
- Element_Info1("Adobe");
-
- //Parsing
- int8u Version;
- Get_B1(Version, "Version");
- if (Version==100)
- {
- int8u transform;
- Skip_B2( "flags0");
- Skip_B2( "flags1");
- Get_B1 (transform, "transform");
-
- FILLING_BEGIN();
- APPE_Adobe0_transform=transform;
- FILLING_END();
- }
- else
- Skip_XX(Element_Size-Element_Offset, "unknown");
-}
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Jpeg.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Jpeg.h
deleted file mode 100644
index 80de45e4d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Jpeg.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about JPEG files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_JpegH
-#define MediaInfo_File_JpegH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Jpeg
-//***************************************************************************
-
-class File_Jpeg : public File__Analyze
-{
-public :
- //In
- stream_t StreamKind;
- bool Interlaced;
- #if MEDIAINFO_DEMUX
- float64 FrameRate;
- #endif //MEDIAINFO_DEMUX
-
- //Constructor/Destructor
- File_Jpeg();
-
-private :
- //Streams management
- void Streams_Accept();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
- void Synched_Init();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test();
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
- void Read_Buffer_Continue();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID) {return Read_Buffer_Seek_OneFramePerFile(Method, Value, ID);}
- #endif //MEDIAINFO_SEEK
-
- //Buffer - Per element
- void Header_Parse();
- bool Header_Parser_Fill_Size();
- void Data_Parse();
-
- //Elements
- void TEM () {};
- void SOC () {}
- void SIZ ();
- void COD ();
- void COC () {Skip_XX(Element_Size, "Data");}
- void TLM () {Skip_XX(Element_Size, "Data");}
- void PLM () {Skip_XX(Element_Size, "Data");}
- void PLT () {Skip_XX(Element_Size, "Data");}
- void QCD ();
- void QCC () {Skip_XX(Element_Size, "Data");}
- void RGN () {Skip_XX(Element_Size, "Data");}
- void POC () {Skip_XX(Element_Size, "Data");}
- void PPM () {Skip_XX(Element_Size, "Data");}
- void PPT () {Skip_XX(Element_Size, "Data");}
- void CME () {Skip_XX(Element_Size, "Data");}
- void SOT () {Skip_XX(Element_Size, "Data");}
- void SOP () {Skip_XX(Element_Size, "Data");}
- void EPH () {Skip_XX(Element_Size, "Data");}
- void SOD ();
- void SOF_();
- void S0F0() {SOF_();};
- void S0F1() {SOF_();};
- void S0F2() {SOF_();};
- void S0F3() {SOF_();}
- void DHT () {Skip_XX(Element_Size, "Data");}
- void S0F5() {SOF_();}
- void S0F6() {SOF_();}
- void S0F7() {SOF_();}
- void JPG () {Skip_XX(Element_Size, "Data");}
- void S0F9() {SOF_();}
- void S0FA() {SOF_();}
- void S0FB() {SOF_();}
- void DAC () {Skip_XX(Element_Size, "Data");}
- void S0FD() {SOF_();}
- void S0FE() {SOF_();}
- void S0FF() {SOF_();}
- void RST0() {};
- void RST1() {};
- void RST2() {};
- void RST3() {};
- void RST4() {};
- void RST5() {};
- void RST6() {};
- void RST7() {};
- void SOI () {};
- void EOI () {};
- void SOS ();
- void DQT () {Skip_XX(Element_Size, "Data");}
- void DNL () {Skip_XX(Element_Size, "Data");}
- void DRI () {Skip_XX(Element_Size, "Data");}
- void DHP () {Skip_XX(Element_Size, "Data");}
- void EXP () {Skip_XX(Element_Size, "Data");}
- void APP0();
- void APP0_AVI1();
- void APP0_JFIF();
- void APP0_JFFF();
- void APP0_JFFF_JPEG();
- void APP0_JFFF_1B();
- void APP0_JFFF_3B();
- void APP1();
- void APP1_EXIF();
- void APP2() {Skip_XX(Element_Size, "Data");}
- void APP3() {Skip_XX(Element_Size, "Data");}
- void APP4() {Skip_XX(Element_Size, "Data");}
- void APP5() {Skip_XX(Element_Size, "Data");}
- void APP6() {Skip_XX(Element_Size, "Data");}
- void APP7() {Skip_XX(Element_Size, "Data");}
- void APP8() {Skip_XX(Element_Size, "Data");}
- void APP9() {Skip_XX(Element_Size, "Data");}
- void APPA() {Skip_XX(Element_Size, "Data");}
- void APPB() {Skip_XX(Element_Size, "Data");}
- void APPC() {Skip_XX(Element_Size, "Data");}
- void APPD() {Skip_XX(Element_Size, "Data");}
- void APPE();
- void APPE_Adobe0();
- void APPF() {Skip_XX(Element_Size, "Data");}
- void JPG0() {Skip_XX(Element_Size, "Data");}
- void JPG1() {Skip_XX(Element_Size, "Data");}
- void JPG2() {Skip_XX(Element_Size, "Data");}
- void JPG3() {Skip_XX(Element_Size, "Data");}
- void JPG4() {Skip_XX(Element_Size, "Data");}
- void JPG5() {Skip_XX(Element_Size, "Data");}
- void JPG6() {Skip_XX(Element_Size, "Data");}
- void JPG7() {Skip_XX(Element_Size, "Data");}
- void JPG8() {Skip_XX(Element_Size, "Data");}
- void JPG9() {Skip_XX(Element_Size, "Data");}
- void JPGA() {Skip_XX(Element_Size, "Data");}
- void JPGB() {Skip_XX(Element_Size, "Data");}
- void JPGC() {Skip_XX(Element_Size, "Data");}
- void JPGD() {Skip_XX(Element_Size, "Data");}
- void COM () {Skip_XX(Element_Size, "Data");}
-
- //Temp
- int8u APPE_Adobe0_transform;
- bool APP0_JFIF_Parsed;
- bool SOS_SOD_Parsed;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Pcx.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Pcx.cpp
deleted file mode 100644
index 29622e645..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Pcx.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-// From http://courses.engr.illinois.edu/ece390/books/labmanual/graphics-pcx.html
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PCX_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Pcx.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Pcx_VersionInfo(int16u Version)
-{
- switch(Version)
- {
- case 0 : return "Paintbrush v2.5";
- case 2 : return "Paintbrush v2.8 with palette information";
- case 3 : return "Paintbrush v2.8 without palette information";
- case 4 : return "Paintbrush/Windows";
- case 5 : return "Paintbrush v3.0+";
- default: return "";
- }
-}
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Pcx::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<130) //Size of the header
- return false; //Must wait for more data
-
- if (Buffer[0]!=0x0A
- || Buffer[1]>0x05
- || Buffer[2]!=0x01
- || !(Buffer[3]==1 || Buffer[3]==4 || Buffer[3]==8 || Buffer[3]==24))
- {
- Reject("PCX");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// File Header Information
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Pcx::Read_Buffer_Continue()
-{
- //Parsing
- int16u XMin, YMin, XMax, YMax, HorDPI, VertDPI, BytesPerLine, PaletteType, HScrSize, VScrSize;
- int8u Manufacturer, Version, EncodingScheme, BitsPerPixel, ColorPlanes;
-
- Get_L1 (Manufacturer, "Manufacturer");
- Get_L1 (Version, "Version"); // 0,2,3,4,5
- Get_L1 (EncodingScheme, "EncodingScheme"); // RLE=1
- Get_L1 (BitsPerPixel, "Bits Per Pixel"); // 1,4,8,24
- Get_L2 (XMin, "Left margin of image");
- Get_L2 (YMin, "Upper margin of image");
- Get_L2 (XMax, "Right margin of image");
- Get_L2 (YMax, "Lower margin of image");
- Get_L2 (HorDPI, "Horizontal Resolution");
- Get_L2 (VertDPI, "Vertical Resolution");
- Skip_XX(48, "Palette");
- Skip_L1( "Reserved");
- Get_L1 (ColorPlanes, "ColorPlanes");
- Get_L2 (BytesPerLine, "BytesPerLine");
- Get_L2 (PaletteType, "PaletteType");
- Get_L2 (HScrSize, "Horizontal Screen Size");
- Get_L2 (VScrSize, "Vertical Screen Size");
- Skip_XX(56, "Filler");
-
-
- FILLING_BEGIN();
- //Integrity tests
- if (XMax<=XMin
- || YMax<=YMin
- || BytesPerLine<XMax-XMin)
- {
- Reject("PCX");
- return;
- }
-
- Accept("PCX");
- Stream_Prepare(Stream_Image);
- Fill(Stream_Image, 0, Image_Format, "PCX");
- Fill(Stream_Image, 0, Image_Format_Version, Pcx_VersionInfo(Version));
- Fill(Stream_Image, 0, Image_Width, XMax-XMin);
- Fill(Stream_Image, 0, Image_Height, YMax-YMin);
- Fill(Stream_Image, 0, Image_BitDepth, BitsPerPixel);
- Fill(Stream_Image, 0, "DPI", Ztring::ToZtring(VertDPI) + __T(" x ") + Ztring::ToZtring(HorDPI));
- Finish("PCX");
- FILLING_END();
-}
-
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Pcx.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Pcx.h
deleted file mode 100644
index e92ad0c06..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Pcx.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PCX files
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_PcxH
-#define MediaInfo_File_PcxH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Pcx
-//***************************************************************************
-
-class File_Pcx : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Elements
- void Read_Buffer_Continue();
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Png.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Png.cpp
deleted file mode 100644
index 51f855d2a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Png.cpp
+++ /dev/null
@@ -1,310 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PNG files
-//
-// From http://www.fileformat.info/format/png/
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PNG_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Png.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Png_Colour_type(int8u Colour_type)
-{
- switch (Colour_type)
- {
- case 0 : return "Greyscale";
- case 2 : return "Truecolour";
- case 3 : return "Indexed-colour";
- case 4 : return "Greyscale with alpha";
- case 6 : return "Truecolour with alpha";
- default: return "";
- }
-}
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-namespace Elements
-{
- const int32u IDAT=0x49444154;
- const int32u IEND=0x49454E44;
- const int32u IHDR=0x49484452;
- const int32u PLTE=0x506C5445;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Png::File_Png()
-{
- //Config
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- IsRawStream=true;
-
- //Temp
- Signature_Parsed=false;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Png::Streams_Accept()
-{
- if (!IsSub)
- {
- TestContinuousFileNames();
-
- Stream_Prepare((Config->File_Names.size()>1 || Config->File_IsReferenced_Get())?Stream_Video:Stream_Image);
- if (File_Size!=(int64u)-1)
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_StreamSize), File_Size);
- if (StreamKind_Last==Stream_Video)
- Fill(Stream_Video, StreamPos_Last, Video_FrameCount, Config->File_Names.size());
- }
- else
- Stream_Prepare(StreamKind_Last);
-}
-
-//***************************************************************************
-// Header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Png::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<8)
- return false; //Must wait for more data
-
- if (CC4(Buffer+4)!=0x0D0A1A0A) //Byte order
- {
- Reject("PNG");
- return false;
- }
-
- switch (CC4(Buffer)) //Signature
- {
- case 0x89504E47 :
- Accept("PNG");
-
- Fill(Stream_General, 0, General_Format, "PNG");
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Format), "PNG");
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Codec), "PNG");
-
- break;
-
- case 0x8A4E4E47 :
- Accept("PNG");
-
- Fill(Stream_General, 0, General_Format, "MNG");
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Format), "MNG");
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Codec), "MNG");
-
- Finish("PNG");
- break;
-
- case 0x8B4A4E47 :
- Accept("PNG");
-
- Fill(Stream_General, 0, General_Format, "JNG");
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Format), "JNG");
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Codec), "JNG");
-
- Finish("PNG");
- break;
-
- default:
- Reject("PNG");
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Png::Read_Buffer_Unsynched()
-{
- Signature_Parsed=false;
-
- Read_Buffer_Unsynched_OneFramePerFile();
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Png::Header_Parse()
-{
- if (!Signature_Parsed)
- {
- //Filling
- Header_Fill_Size(8);
- Header_Fill_Code(0, "File header");
-
- return;
- }
-
- //Parsing
- int32u Length, Chunk_Type;
- Get_B4 (Length, "Length");
- Get_C4 (Chunk_Type, "Chunk Type");
-
- //Filling
- Header_Fill_Size(12+Length); //+4 for CRC
- Header_Fill_Code(Chunk_Type, Ztring().From_CC4(Chunk_Type));
-}
-
-//---------------------------------------------------------------------------
-void File_Png::Data_Parse()
-{
- if (!Signature_Parsed)
- {
- Signature();
- return;
- }
-
- Element_Size-=4; //For CRC
-
- #define CASE_INFO(_NAME, _DETAIL) \
- case Elements::_NAME : Element_Info1(_DETAIL); _NAME(); break;
-
- //Parsing
- switch (Element_Code)
- {
- CASE_INFO(IDAT, "Image data");
- CASE_INFO(IEND, "Image trailer");
- CASE_INFO(IHDR, "Image header");
- CASE_INFO(PLTE, "Palette table");
- default : Skip_XX(Element_Size, "Unknown");
- }
-
- Element_Size+=4; //For CRC
- Skip_B4( "CRC");
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Png::Signature()
-{
- //Parsing
- Skip_B4( "Signature");
- Skip_B4( "ByteOrder");
-
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- Signature_Parsed=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Png::IEND()
-{
- Signature_Parsed=false;
-}
-
-//---------------------------------------------------------------------------
-void File_Png::IHDR()
-{
- //Parsing
- int32u Width, Height;
- int8u Bit_depth, Colour_type, Compression_method, Interlace_method;
- Get_B4 (Width, "Width");
- Get_B4 (Height, "Height");
- Get_B1 (Bit_depth, "Bit depth");
- Get_B1 (Colour_type, "Colour type"); Param_Info1(Png_Colour_type(Colour_type));
- Get_B1 (Compression_method, "Compression method");
- Skip_B1( "Filter method");
- Get_B1 (Interlace_method, "Interlace method");
-
- FILLING_BEGIN_PRECISE();
- if (!Status[IsFilled])
- {
- Fill(StreamKind_Last, 0, "Width", Width);
- Fill(StreamKind_Last, 0, "Height", Height);
- int8u Resolution;
- switch (Colour_type)
- {
- case 0 : Resolution=Bit_depth; break;
- case 2 : Resolution=Bit_depth*3; break;
- case 3 : Resolution=Bit_depth; break;
- case 4 : Resolution=Bit_depth*2; break;
- case 6 : Resolution=Bit_depth*4; break;
- default: Resolution=0;
- }
- if (Resolution)
- Fill(StreamKind_Last, 0, "BitDepth", Resolution);
- switch (Compression_method)
- {
- case 0 :
- Fill(StreamKind_Last, 0, "Format_Compression", "LZ77");
- break;
- default: ;
- }
- switch (Interlace_method)
- {
- case 0 :
- break;
- case 1 :
- break;
- default: ;
- }
-
- Fill();
- }
-
- if (Config->ParseSpeed<1.0)
- Finish("PNG"); //No need of more
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Png.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Png.h
deleted file mode 100644
index 5975b7edf..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Png.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PNG files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_PngH
-#define MediaInfo_File_PngH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Png
-//***************************************************************************
-
-class File_Png : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Png();
-
-private :
- //Streams management
- void Streams_Accept();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test() {return Demux_UnpacketizeContainer_Test_OneFramePerFile();}
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID) {return Read_Buffer_Seek_OneFramePerFile(Method, Value, ID);}
- #endif //MEDIAINFO_SEEK
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Signature();
- void IDAT() {Skip_XX(Element_Size, "Data");}
- void IEND();
- void IHDR();
- void PLTE() {Skip_XX(Element_Size, "Data");}
-
- //Temp
- bool Signature_Parsed;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Psd.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Psd.cpp
deleted file mode 100644
index 69566d169..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Psd.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PSD files
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-// From http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/PhotoshopFileFormats.htm
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PSD_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Psd.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Psd_ColorMode(int16u ColorMode)
-{
- switch(ColorMode)
- {
- case 0 : return "Bitmap";
- case 1 : return "Grayscale";
- case 2 : return "Indexed";
- case 3 : return "RGB";
- case 4 : return "CMYK";
- case 7 : return "Multichannel";
- case 8 : return "Duotone";
- case 9 : return "Lab";
- default: return "";
- }
-}
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Psd::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- if (CC4(Buffer)!=0x38425053) //"8BPS"
- {
- Reject("PSD");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// File Header Information
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Psd::Read_Buffer_Continue()
-{
- //Parsing
- int32u Width, Height;
- int16u BitsDepth, Version, channels, ColorMode;
- Skip_C4( "Signature");
- Get_B2 (Version, "Version"); // 1 = PSD, 2 = PSB
- Skip_B6( "Reserved");
- Get_B2 (channels, "channels"); // 1 to 56, including alpha channel
- Get_B4 (Height, "Height");
- Get_B4 (Width, "Width");
- Get_B2 (BitsDepth, "Depth"); // 1,8,16 or 32
- Get_B2 (ColorMode, "Color Mode"); Param_Info1(Psd_ColorMode(ColorMode));
-
- FILLING_BEGIN();
- Accept("PSD");
- Stream_Prepare(Stream_Image);
- Fill(Stream_Image, 0, Image_Format, Version==1?"PSD":"PSB");
- Fill(Stream_Image, 0, Image_Format_Version, Version);
- Fill(Stream_Image, 0, Image_ColorSpace, Psd_ColorMode(ColorMode));
- Fill(Stream_Image, 0, Image_Width, Width);
- Fill(Stream_Image, 0, Image_Height, Height);
- Fill(Stream_Image, 0, Image_BitDepth, BitsDepth);
- Finish("PSD");
- FILLING_END();
-}
-
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Psd.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Psd.h
deleted file mode 100644
index c05870e6e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Psd.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PSD files
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_PsdH
-#define MediaInfo_File_PsdH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Psd
-//***************************************************************************
-
-class File_Psd : public File__Analyze
-{
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Elements
- void Read_Buffer_Continue();
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Rle.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Rle.cpp
deleted file mode 100644
index 44e5ceee0..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Rle.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_RLE_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Rle.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Rle::File_Rle()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("RLE");
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Rle::Streams_Fill()
-{
- Stream_Prepare(Stream_General);
- Fill(Stream_General, 0, General_Format, "RLE");
-
- Stream_Prepare(Stream_Text); //TODO: This is currenlty only text
- Fill(Stream_Text, 0, Text_Format, "RLE");
- Fill(Stream_Text, 0, Text_Codec, "RLE");
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Rle::Read_Buffer_Continue()
-{
- //Filling
- Accept();
- Finish("RLE");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_RLE_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Rle.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Rle.h
deleted file mode 100644
index 755e4ca3d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Rle.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about RLE files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_RleH
-#define MediaInfo_File_RleH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Rle
-//***************************************************************************
-
-class File_Rle : public File__Analyze
-{
-public :
- File_Rle();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Tga.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Tga.cpp
deleted file mode 100644
index 56094744f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Tga.cpp
+++ /dev/null
@@ -1,306 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// TGA format
-//
-// From http://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_TGA_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Tga.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Tga_Image_Type_Compression(int8u Image_Type)
-{
- switch (Image_Type)
- {
- case 1 : return "Color-mapped";
- case 2 :
- case 3 : return "Raw";
- case 9 : return "Color-mapped + RLE";
- case 10 :
- case 11 : return "RLE";
- case 32 :
- case 33 : return "Huffman";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Tga_Image_Type_ColorSpace(int8u Image_Type)
-{
- switch (Image_Type)
- {
- case 1 :
- case 2 :
- case 9 :
- case 10 :
- case 32 :
- case 33 : return "RGB";
- case 3 :
- case 11 : return "Y";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Tga::File_Tga()
-{
- //Configuration
- ParserName=__T("TGA");
- Buffer_MaximumSize=64*1024*1024; //Some big frames are possible (e.g YUV 4:2:2 10 bits 1080p)
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Tga::Streams_Fill()
-{
- Fill(Stream_General, 0, General_Format, "TGA");
- Fill(Stream_General, 0, General_Format_Version, __T("Version ")+Ztring::ToZtring(Version));
- Fill(Stream_General, 0, General_Title, Image_ID);
-
- Stream_Prepare(Stream_Image);
- Fill(Stream_Image, 0, Image_Format, Tga_Image_Type_Compression(Image_Type));
- Fill(Stream_Image, 0, Image_ColorSpace, Tga_Image_Type_ColorSpace(Image_Type));
- Fill(Stream_Image, 0, Image_CodecID, Image_Type);
- Fill(Stream_Image, 0, Image_Width, Image_Width_);
- Fill(Stream_Image, 0, Image_Height, Image_Height_);
- Fill(Stream_Image, 0, Image_BitDepth, Pixel_Depth);
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Tga::FileHeader_Begin()
-{
- //Synchro
- if (18>Buffer_Size)
- return false;
- if (Buffer[2]==0x00
- || Buffer[16]>32) //bit depth
- {
- Reject();
- return false;
- }
- if (Buffer_Size<File_Size)
- return false; //Must wait for more data
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Tga::Read_Buffer_Continue()
-{
- //Parsing
- Tga_File_Header();
- Image_Color_Map_Data();
- Tga_File_Footer();
-
- FILLING_BEGIN();
- //Coherency in case of no magic value
- if (Version==1)
- {
- switch (Image_Type)
- {
- case 1 : //Color mapped images
- case 9 : //Color mapped images, RLE
- if (Color_Map_Type!=1)
- {
- Reject();
- return;
- }
- break;
- case 2 : //True-color images
- case 10 : //True-color images, RLE
- if (Color_Map_Type)
- {
- Reject();
- return;
- }
- break;
- case 3 : //Black and White
- case 11 : //Black and White, RLE
- if (Color_Map_Type)
- {
- Reject();
- return;
- }
- break;
- default : Reject();
- return;
- }
- switch (Color_Map_Type)
- {
- case 0 :
- if (First_Entry_Index || Color_map_Length || Color_map_Entry_Size)
- {
- Reject();
- return;
- }
- break;
- case 1 :
- switch (Color_map_Entry_Size)
- {
- case 15 :
- case 16 :
- case 24 :
- case 32 :
- break;
- default : Reject();
- return;
- ;
- }
- break;
- default : Reject();
- return;
- }
- switch (Pixel_Depth)
- {
- case 8 :
- case 16 :
- case 24 :
- case 32 :
- break;
- default : Reject();
- return;
- ;
- }
- }
-
- Accept();
- Fill();
- Finish();
- FILLING_END();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Tga::Tga_File_Header()
-{
- //Parsing
- Element_Begin1("Tga File Header");
- Get_L1 (ID_Length, "ID Length");
- Get_L1 (Color_Map_Type, "Color Map Type");
- Get_L1 (Image_Type, "Image Type"); Param_Info1(Tga_Image_Type_Compression(Image_Type));
- Element_End0();
- Element_Begin1("Color Map Specification");
- Get_L2 (First_Entry_Index, "First Entry Index");
- Get_L2 (Color_map_Length, "Color map Length");
- Get_L1 (Color_map_Entry_Size, "Color map Entry Size");
- Element_End0();
- Element_Begin1("Image Specification");
- Skip_L2( "X-origin of Image");
- Skip_L2( "Y-origin of Image");
- Get_L2 (Image_Width_, "Image Width");
- Get_L2 (Image_Height_, "Image Height");
- Get_L1 (Pixel_Depth, "Pixel Depth");
- Get_L1 (Image_Descriptor, "Image Descriptor");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Tga::Image_Color_Map_Data()
-{
- Element_Begin1("Image/Color Map Data");
- Get_Local(ID_Length, Image_ID, "Image ID");
- if (Color_Map_Type==1)
- {
- int64u EntrySizeInBits=8;
- if (Color_map_Entry_Size<24)
- EntrySizeInBits=Color_map_Entry_Size/3;
-
- Skip_XX(Color_map_Length*EntrySizeInBits/8, "Color Map Data");
-
- }
- if (Element_Offset+26<Element_Size
- && Buffer[Buffer_Size- 18]==0x54
- && Buffer[Buffer_Size- 17]==0x52
- && Buffer[Buffer_Size- 16]==0x55
- && Buffer[Buffer_Size- 15]==0x45
- && Buffer[Buffer_Size- 14]==0x56
- && Buffer[Buffer_Size- 13]==0x49
- && Buffer[Buffer_Size- 12]==0x53
- && Buffer[Buffer_Size- 11]==0x49
- && Buffer[Buffer_Size- 10]==0x4F
- && Buffer[Buffer_Size- 9]==0x4E
- && Buffer[Buffer_Size- 8]==0x2D
- && Buffer[Buffer_Size- 7]==0x58
- && Buffer[Buffer_Size- 6]==0x46
- && Buffer[Buffer_Size- 5]==0x49
- && Buffer[Buffer_Size- 4]==0x4C
- && Buffer[Buffer_Size- 3]==0x45
- && Buffer[Buffer_Size- 2]==0x2E
- && Buffer[Buffer_Size- 1]==0x00)
- Version=2;
- else
- Version=1;
- Skip_XX(Element_Size-Element_Offset-(Version==2?26:0), "Image Data");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Tga::Tga_File_Footer()
-{
- if (Version==1)
- return; //No footer
-
- Element_Begin1("Image/color Map Data");
- Skip_L4( "Extension Area Offset");
- Skip_L4( "Developer Directory Offset");
- Skip_Local(16, "Signature");
- Skip_Local( 1, "Reserved Character");
- Skip_L1( "Binary Zero String Terminator");
- Element_End0();
-}
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Tga.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Tga.h
deleted file mode 100644
index 9d7f4a74b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Tga.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about TGA files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_TgaH
-#define MediaInfo_File_TgaH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Tga
-//***************************************************************************
-
-class File_Tga : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Tga();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-
- //Elements
- void Tga_File_Header();
- void Image_Color_Map_Data();
- void Tga_File_Footer();
-
- //Temp - File Header
- int16u First_Entry_Index;
- int16u Color_map_Length;
- int16u Image_Width_;
- int16u Image_Height_;
- int8u ID_Length;
- int8u Color_Map_Type;
- int8u Image_Type;
- int8u Color_map_Entry_Size;
- int8u Pixel_Depth;
- int8u Image_Descriptor;
-
- //Temp - File Footer
- Ztring Image_ID;
- int8u Version;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Tiff.cpp b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Tiff.cpp
deleted file mode 100644
index 949a9f841..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Tiff.cpp
+++ /dev/null
@@ -1,565 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// TIFF Format
-//
-// From
-// http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf
-// http://www.fileformat.info/format/tiff/
-// http://en.wikipedia.org/wiki/Tagged_Image_File_Format
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_TIFF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Image/File_Tiff.h"
-#include "ZenLib/Utils.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-namespace Tiff_Tag
-{
- const int16u ImageWidth = 256;
- const int16u ImageLength = 257;
- const int16u BitsPerSample = 258;
- const int16u Compression = 259;
- const int16u PhotometricInterpretation = 262;
- const int16u ImageDescription = 270;
- const int16u SamplesPerPixel = 277;
- const int16u ExtraSamples = 338;
-}
-
-//---------------------------------------------------------------------------
-const char* Tiff_Tag_Name(int32u Tag)
-{
- switch (Tag)
- {
- case Tiff_Tag::ImageWidth : return "ImageWidth";
- case Tiff_Tag::ImageLength : return "ImageLength";
- case Tiff_Tag::BitsPerSample : return "BitsPerSample";
- case Tiff_Tag::Compression : return "Compression";
- case Tiff_Tag::PhotometricInterpretation : return "PhotometricInterpretation";
- case Tiff_Tag::ImageDescription : return "ImageDescription";
- case Tiff_Tag::SamplesPerPixel : return "SamplesPerPixel";
- case Tiff_Tag::ExtraSamples : return "ExtraSamples";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-namespace Tiff_Type
-{
- const int16u Byte = 1;
- const int16u Short = 3;
- const int16u Long = 4;
-}
-
-//---------------------------------------------------------------------------
-const char* Tiff_Type_Name(int32u Type)
-{
- switch (Type)
- {
- case Tiff_Type::Byte : return "Byte";
- case Tiff_Type::Short : return "Short";
- case Tiff_Type::Long : return "Long";
- default : return ""; //Unknown
- }
-}
-
-//---------------------------------------------------------------------------
-const int8u Tiff_Type_Size(int32u Type)
-{
- switch (Type)
- {
- case Tiff_Type::Byte : return 1;
- case Tiff_Type::Short : return 2;
- case Tiff_Type::Long : return 4;
- default : return 0; //Unknown
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Tiff_Compression(int32u Compression)
-{
- switch (Compression)
- {
- case 1 : return "Raw";
- case 2 : return "CCITT Group 3";
- case 3 : return "CCITT T.4";
- case 5 : return "LZW";
- case 6 : return "JPEG";
- case 32773 : return "PackBits";
- default : return ""; //Unknown
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Tiff_Compression_Mode(int32u Compression)
-{
- switch (Compression)
- {
- case 1 :
- case 2 :
- case 3 :
- case 5 :
- case 32773 : return "Lossless";
- default : return ""; //Unknown or depends of the compresser (e.g. JPEG can be lossless or lossy)
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Tiff_PhotometricInterpretation(int32u PhotometricInterpretation)
-{
- switch (PhotometricInterpretation)
- {
- case 0 :
- case 1 : return "B/W or Grey scale";
- case 2 : return "RGB";
- case 3 : return "Palette";
- case 4 : return "Transparency mask";
- case 5 : return "CMYK";
- case 6 : return "YCbCr";
- case 8 : return "CIELAB";
- default : return ""; //Unknown
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Tiff_PhotometricInterpretation_ColorSpace (int32u PhotometricInterpretation)
-{
- switch (PhotometricInterpretation)
- {
- case 0 :
- case 1 : return "Y";
- case 2 : return "RGB";
- case 3 : return "RGB"; //Palette
- case 4 : return "A"; //Transparency mask;
- case 5 : return "CMYK";
- case 6 : return "YUV"; //YCbCr
- case 8 : return "CIELAB"; //What is it?
- default : return ""; //Unknown
- }
-}
-
-const char* Tiff_ExtraSamples(int32u ExtraSamples)
-{
- switch (ExtraSamples)
- {
- case 0 :
- case 1 : return "Associated Alpha";
- case 2 : return "Unassocieted Alpha";
- default : return ""; //Unknown
- }
-}
-
-const char* Tiff_ExtraSamples_ColorSpace(int32u ExtraSamples)
-{
- switch (ExtraSamples)
- {
- case 1 : return "A";
- default : return ""; //Unknown
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Tiff::File_Tiff()
-{
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Tiff::FileHeader_Begin()
-{
- //Element_Size
- /* Minimum header for a tiff file is 8 byte */
- if (Buffer_Size<8)
- return false; //Must wait for more data
- if (CC4(Buffer)==0x49492A00)
- LittleEndian = true;
- else if (CC4(Buffer)==0x4D4D002A)
- LittleEndian = false;
- else
- {
- Reject("TIFF");
- return false;
- }
-
- //All should be OK...
- Accept("TIFF");
- Fill(Stream_General, 0, General_Format, "TIFF");
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Tiff::FileHeader_Parse()
-{
- //The only IFD that is known at forehand is the first one, it's offset is placed byte 4-7 in the file.
- int32u IFDOffset;
- Skip_B4( "Magic");
- Get_X4 (IFDOffset, "IFDOffset");
-
- FILLING_BEGIN();
- //Initial IFD
- GoTo(IFDOffset, "TIFF");
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Tiff::Header_Parse()
-{
- //Handling remaining IFD data
- if (!IfdItems.empty())
- {
- if (File_Offset+Buffer_Offset!=IfdItems.begin()->first)
- IfdItems.clear(); //There was a problem during the seek, trashing remaining positions from last IFD
- else
- {
- Header_Fill_Code(IfdItems.begin()->second.Tag, Tiff_Tag_Name(IfdItems.begin()->second.Tag));
- Header_Fill_Size(Tiff_Type_Size(IfdItems.begin()->second.Type)*IfdItems.begin()->second.Count);
- return;
- }
- }
-
- /* A tiff images consist in principle of two types of blocks, IFD's and data blocks */
- /* Each datablock, which could be a image, tiles, transperancy filter is described by one IFD. */
- /* These IFD's can be placed at any offset in the file and are linked in a chain fashion way. */
- /* where one IFD points out where the next IFD is placed */
- /* */
- /* A creator of a tiff file must describe the "main image" in the first IFD, this means that a */
- /* reader, such this one, only need to read the first IFD in order to get the bitdepth, resolution etc. */
- /* of the main image. */
-
- /* Read one IFD and print out the result */
-
- /* Scan the tiff file for the IFD's (Image File Directory) */
- /* As long as the IFD offset to the next IFD in the file is not 0 */
-
- /* Get number of directories for this IFD */
- int16u NrOfDirectories;
- Get_X2 (NrOfDirectories, "NrOfDirectories");
-
- //Filling
- Header_Fill_Code(0xFFFFFFFF, "IFD"); //OxFFFFFFFF can not be a Tag, so using it as a magic value
- Header_Fill_Size(2+12*((int64u)NrOfDirectories)+4); //2 for header + 12 per directory + 4 for next IFD offset
-}
-
-//---------------------------------------------------------------------------
-void File_Tiff::Data_Parse()
-{
- int32u IFDOffset=0;
- if (IfdItems.empty())
- {
- //Default values
- Infos.clear();
- Infos[Tiff_Tag::BitsPerSample]=__T("1");
-
- //Parsing new IFD
- while (Element_Offset+8+4<Element_Size)
- Read_Directory();
- Get_X4 (IFDOffset, "IFDOffset");
- }
- else
- {
- //Handling remaining IFD data from a previous IFD
- GetValueOffsetu(IfdItems.begin()->second); //Parsing the IFD item
- IfdItems.erase(IfdItems.begin()->first); //Removing IFD item from the list of IFD items to parse
- }
-
- //Some items are not inside the directory, jumping to the offset
- if (!IfdItems.empty())
- GoTo(IfdItems.begin()->first, "TIFF");
- else
- {
- //This IFD is finished, filling data then going to next IFD
- Data_Parse_Fill();
- if (IFDOffset)
- GoTo(IFDOffset, "TIFF");
- else
- {
- Finish(); //No more IFDs
- GoToFromEnd(0);
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Tiff::Data_Parse_Fill()
-{
- Stream_Prepare(Stream_Image);
-
- infos::iterator Info;
-
- //Width
- Info=Infos.find(Tiff_Tag::ImageWidth);
- if (Info!=Infos.end())
- Fill(Stream_Image, StreamPos_Last, Image_Width, Info->second.Read());
-
- //Height
- Info=Infos.find(Tiff_Tag::ImageLength);
- if (Info!=Infos.end())
- Fill(Stream_Image, StreamPos_Last, Image_Height, Info->second.Read());
-
- //BitsPerSample
- Info=Infos.find(Tiff_Tag::BitsPerSample);
- if (Info!=Infos.end())
- {
- if (Info->second.size()>1)
- {
- bool IsOk=true;
- for (size_t Pos=1; Pos<Info->second.size(); ++Pos)
- if (Info->second[Pos]!=Info->second[0])
- IsOk=false;
- if (IsOk)
- Info->second.resize(1); //They are all same, we display 1 piece of information
- }
-
- Fill(Stream_Image, StreamPos_Last, Image_BitDepth, Info->second.Read());
- }
-
- //Compression
- Info=Infos.find(Tiff_Tag::Compression);
- if (Info!=Infos.end())
- {
- int32u Value=Info->second.Read().To_int32u();
- Fill(Stream_Image, StreamPos_Last, Image_Format, Tiff_Compression(Value));
- Fill(Stream_Image, StreamPos_Last, Image_Codec, Tiff_Compression(Value));
- Fill(Stream_Image, StreamPos_Last, Image_Compression_Mode, Tiff_Compression_Mode(Value));
- }
-
- //PhotometricInterpretation
- Info=Infos.find(Tiff_Tag::PhotometricInterpretation);
- if (Info!=Infos.end())
- {
- int32u Value=Info->second.Read().To_int32u();
- Fill(Stream_Image, StreamPos_Last, Image_ColorSpace, Tiff_PhotometricInterpretation_ColorSpace(Value));
- //Note: should we differeniate between raw RGB and palette (also RGB actually...)
- }
-
- //ImageDescription
- Info=Infos.find(Tiff_Tag::ImageDescription);
- if (Info!=Infos.end())
- Fill(Stream_Image, StreamPos_Last, Image_Title, Info->second.Read());
-
- //ExtraSamples
- Info=Infos.find(Tiff_Tag::ExtraSamples);
- if (Info!=Infos.end())
- {
- Ztring ColorSpace=Retrieve(Stream_Image, StreamPos_Last, Image_ColorSpace);
- ColorSpace+=Ztring().From_Local(Tiff_ExtraSamples_ColorSpace(Info->second.Read().To_int32u()));
- Fill(Stream_Image, StreamPos_Last, Image_ColorSpace, ColorSpace, true);
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Tiff::Read_Directory()
-{
- /* Each directory consist of 4 fields */
- /* Get information for this directory */
- Element_Begin0();
- ifditem IfdItem;
- Get_X2 (IfdItem.Tag, "Tag"); Param_Info1(Tiff_Tag_Name(IfdItem.Tag));
- Get_X2 (IfdItem.Type, "Type"); Param_Info1(Tiff_Type_Name(IfdItem.Type));
- Get_X4 (IfdItem.Count, "Count");
- Element_Name(Tiff_Tag_Name(IfdItem.Tag));
-
- if (Tiff_Type_Size(IfdItem.Type)*IfdItem.Count<=4)
- {
- GetValueOffsetu(IfdItem);
-
- /* Padding up, skip dummy bytes */
- if (Tiff_Type_Size(IfdItem.Type)==0)
- {
- if (Element_Offset+4<Element_Size)
- Skip_XX(Element_Size-(Element_Offset+4), "Unknown");
- }
- else if (Tiff_Type_Size(IfdItem.Type)*IfdItem.Count<4)
- Skip_XX(Tiff_Type_Size(IfdItem.Type)*IfdItem.Count, "Padding");
- }
- else
- {
- int32u IFDOffset;
- Get_X4 (IFDOffset, "IFDOffset");
- IfdItems[IFDOffset]=IfdItem;
- }
- Element_End0();
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Tiff::Get_X2(int16u &Info, const char* Name)
-{
- if (LittleEndian)
- Get_L2 (Info, Name);
- else
- Get_B2 (Info, Name);
-}
-
-//---------------------------------------------------------------------------
-void File_Tiff::Get_X4(int32u &Info, const char* Name)
-{
- if (LittleEndian)
- Get_L4 (Info, Name);
- else
- Get_B4 (Info, Name);
-}
-
-//---------------------------------------------------------------------------
-void File_Tiff::GetValueOffsetu(ifditem &IfdItem)
-{
- ZtringList &Info=Infos[IfdItem.Tag]; Info.clear(); Info.Separator_Set(0, __T(" / "));
- const char* Name=Tiff_Tag_Name(IfdItem.Tag);
-
- if (IfdItem.Count>=10)
- {
- //Too many data, we don't currently need it and we skip it
- Skip_XX(Element_Size-(Element_Offset+4), Name);
- Info.clear();
- return;
- }
-
- switch (IfdItem.Type)
- {
- case 1: /* 8-bit unsigned integer. */
- for (int16u Pos=0; Pos<IfdItem.Count; Pos++)
- {
- int8u Ret8;
- #if MEDIAINFO_TRACE
- if (LittleEndian)
- Get_L1 (Ret8, Name);
- else
- Get_B1 (Ret8, Name);
- Element_Info1(Ztring::ToZtring(Ret8));
- #else //MEDIAINFO_TRACE
- if (Element_Offset+1>Element_Size)
- {
- Trusted_IsNot();
- break;
- }
- if (LittleEndian)
- Ret8=LittleEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- else
- Ret8=BigEndian2int8u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset++;
- #endif //MEDIAINFO_TRACE
- Info.push_back(Ztring::ToZtring(Ret8));
- }
- break;
-
- case 3: /* 16-bit (2-byte) unsigned integer. */
- for (int16u Pos=0; Pos<IfdItem.Count; Pos++)
- {
- int16u Ret16;
- #if MEDIAINFO_TRACE
- if (LittleEndian)
- Get_L2 (Ret16, Name);
- else
- Get_B2 (Ret16, Name);
- switch (IfdItem.Tag)
- {
- case Tiff_Tag::Compression : Element_Info1(Tiff_Compression(Ret16)); break;
- case Tiff_Tag::PhotometricInterpretation : Element_Info1(Tiff_PhotometricInterpretation(Ret16)); break;
- default : Element_Info1(Ztring::ToZtring(Ret16));
- }
- #else //MEDIAINFO_TRACE
- if (Element_Offset+2>Element_Size)
- {
- Trusted_IsNot();
- break;
- }
- if (LittleEndian)
- Ret16=LittleEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- else
- Ret16=BigEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=2;
- #endif //MEDIAINFO_TRACE
- Info.push_back(Ztring::ToZtring(Ret16));
- }
- break;
-
- case 4: /* 32-bit (4-byte) unsigned integer */
- for (int16u Pos=0; Pos<IfdItem.Count; Pos++)
- {
- int32u Ret32;
- #if MEDIAINFO_TRACE
- if (LittleEndian)
- Get_L4 (Ret32, Name);
- else
- Get_B4 (Ret32, Name);
- Element_Info1(Ztring::ToZtring(Ret32));
- #else //MEDIAINFO_TRACE
- if (Element_Offset+4>Element_Size)
- {
- Trusted_IsNot();
- break;
- }
- if (LittleEndian)
- Ret32=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- else
- Ret32=BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=4;
- #endif //MEDIAINFO_TRACE
- Info.push_back(Ztring::ToZtring(Ret32));
- }
- break;
-
- default: //Unknown
- {
- if (LittleEndian)
- Skip_L4( Name);
- else
- Skip_B4( Name);
- Info.clear(); //We actually do not know the type
- }
- }
-}
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Tiff.h b/src/thirdparty/MediaInfo/MediaInfo/Image/File_Tiff.h
deleted file mode 100644
index 9b514861a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Image/File_Tiff.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about TIFF files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_TiffH
-#define MediaInfo_File_TiffH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Tiff
-//***************************************************************************
-
-class File_Tiff : public File__Analyze
-{
-public:
- //Constructor/Destructor
- File_Tiff();
-
-private :
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
- void Data_Parse_Fill();
-
- //Elements
- void Read_Directories();
- void Read_Directory();
-
- //Temp
- struct ifditem
- {
- int16u Tag;
- int16u Type;
- int32u Count;
- };
- typedef std::map<int32u, ifditem> ifditems; //Key is byte offset
- ifditems IfdItems;
- typedef std::map<int16u, ZtringList> infos; //Key is Tag value
- infos Infos;
- bool LittleEndian;
-
- //Helpers
- void Get_X2 (int16u &Info, const char* Name);
- void Get_X4 (int32u &Info, const char* Name);
- void GetValueOffsetu(ifditem &IfdItem);
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo.cpp b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo.cpp
deleted file mode 100644
index c269b6fc7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo.cpp
+++ /dev/null
@@ -1,239 +0,0 @@
-// MediaInfo - All info about media files
-
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#if defined(_MSC_VER) && _MSC_VER >= 1800 && _MSC_VER < 1900 && defined(_M_X64)
- #include <math.h> // needed for _set_FMA3_enable()
-#endif
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-//To clarify the code
-namespace MediaInfo_Debug_MediaInfo
-{
-
-#if defined (MEDIAINFO_DEBUG_CONFIG) || defined (MEDIAINFO_DEBUG_BUFFER) || defined (MEDIAINFO_DEBUG_OUTPUT)
- #ifdef WINDOWS
- const Char* MediaInfo_Debug_Name=__T("MediaInfo_Debug");
- #else
- const Char* MediaInfo_Debug_Name=__T("/tmp/MediaInfo_Debug");
- #endif
-#endif
-
-#ifdef MEDIAINFO_DEBUG_CONFIG
- #define MEDIAINFO_DEBUG_STATIC(_TOAPPEND) \
- { \
- File F(Ztring(MediaInfo_Debug_Name)+__T(".Config.static.txt"), File::Access_Write_Append); \
- Ztring Debug; \
- _TOAPPEND; \
- Debug+=__T("\r\n"); \
- F.Write(Debug); \
- F.Close(); \
- }
-#else // MEDIAINFO_DEBUG_CONFIG
- #define MEDIAINFO_DEBUG_STATIC(_TOAPPEND)
-#endif // MEDIAINFO_DEBUG_CONFIG
-
-}
-using namespace MediaInfo_Debug_MediaInfo;
-
-//***************************************************************************
-// Constructor/destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-MediaInfo::MediaInfo()
-{
- Internal=new MediaInfo_Internal();
-
- // FMA3 support in the 2013 CRT is broken on Vista and Windows 7 RTM (fixed in SP1).
- // See https://connect.microsoft.com/VisualStudio/feedback/details/987093/x64-log-function-uses-vpsrlq-avx-instruction-without-regard-to-operating-system-so-it-crashes-on-vista-x64
- // Hotfix: we disable it for MSVC2013.
- #if defined(_MSC_VER) && _MSC_VER >= 1800 && _MSC_VER < 1900 && defined(_M_X64)
- _set_FMA3_enable(0);
- #endif
-}
-
-//---------------------------------------------------------------------------
-MediaInfo::~MediaInfo()
-{
- delete Internal; //Internal=NULL;
-}
-
-//***************************************************************************
-// Files
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t MediaInfo::Open(const String &File_Name_)
-{
- return Internal->Open(File_Name_);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo::Open (const int8u* Begin, size_t Begin_Size, const int8u* End, size_t End_Size, int64u File_Size)
-{
- return Internal->Open(Begin, Begin_Size, End, End_Size, (File_Size<Begin_Size+End_Size)?(Begin_Size+End_Size):File_Size);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo::Open_Buffer_Init (int64u File_Size, int64u File_Offset)
-{
- return Internal->Open_Buffer_Init(File_Size, File_Offset);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo::Open_Buffer_Continue (const int8u* ToAdd, size_t ToAdd_Size)
-{
- return Internal->Open_Buffer_Continue(ToAdd, ToAdd_Size).to_ulong();
-}
-
-//---------------------------------------------------------------------------
-int64u MediaInfo::Open_Buffer_Continue_GoTo_Get ()
-{
- return Internal->Open_Buffer_Continue_GoTo_Get();
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo::Open_Buffer_Finalize ()
-{
- return Internal->Open_Buffer_Finalize();
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo::Open_NextPacket ()
-{
- return Internal->Open_NextPacket().to_ulong();
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo::Save()
-{
- return 0; //Not yet implemented
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo::Close()
-{
- return Internal->Close();
-}
-
-//***************************************************************************
-// Get File info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-String MediaInfo::Inform(size_t)
-{
- return Internal->Inform();
-}
-
-//---------------------------------------------------------------------------
-String MediaInfo::Get(stream_t StreamKind, size_t StreamPos, size_t Parameter, info_t KindOfInfo)
-{
- return Internal->Get(StreamKind, StreamPos, Parameter, KindOfInfo);
-}
-
-//---------------------------------------------------------------------------
-String MediaInfo::Get(stream_t StreamKind, size_t StreamPos, const String &Parameter, info_t KindOfInfo, info_t KindOfSearch)
-{
- return Internal->Get(StreamKind, StreamPos, Parameter, KindOfInfo, KindOfSearch);
-}
-
-//***************************************************************************
-// Set File info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t MediaInfo::Set(const String &, stream_t, size_t, size_t, const String &)
-{
- return 0; //Not yet implemented
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo::Set(const String &, stream_t, size_t, const String &, const String &)
-{
- return 0; //Not yet implemented
-}
-
-//***************************************************************************
-// Output buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t MediaInfo::Output_Buffer_Get (const String &Value)
-{
- return Internal->Output_Buffer_Get(Value);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo::Output_Buffer_Get (size_t Pos)
-{
- return Internal->Output_Buffer_Get(Pos);
-}
-
-//***************************************************************************
-// Information
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-String MediaInfo::Option (const String &Option, const String &Value)
-{
- return Internal->Option(Option, Value);
-}
-
-//---------------------------------------------------------------------------
-String MediaInfo::Option_Static (const String &Option, const String &Value)
-{
- MEDIAINFO_DEBUG_STATIC(Debug+=__T("Option_Static, Option=");Debug+=Ztring(Option);Debug+=__T(", Value=");Debug+=Ztring(Value);)
- MediaInfoLib::Config.Init(); //Initialize Configuration
-
- if (Option==__T("Info_Capacities"))
- {
- return __T("Option disactivated for this version, will come back soon!");
- //MediaInfo_Internal MI;
- //return MI.Option(Option);
- }
- else if (Option==__T("Info_Version"))
- {
- Ztring ToReturn=MediaInfoLib::Config.Info_Version_Get();
- if (MediaInfo_Internal::LibraryIsModified())
- ToReturn+=__T(" modified");
- return ToReturn;
- }
- else
- return MediaInfoLib::Config.Option(Option, Value);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo::Count_Get (stream_t StreamKind, size_t StreamPos)
-{
- return Internal->Count_Get(StreamKind, StreamPos);
-
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo::State_Get ()
-{
- return Internal->State_Get();
-}
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo.h b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo.h
deleted file mode 100644
index be2be16f7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo.h
+++ /dev/null
@@ -1,252 +0,0 @@
-// MediaInfo - All information about media files
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Give information about a lot of media files
-// Dispatch the file to be tested by all containers
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfoH
-#define MediaInfoH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Const.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#undef MEDIAINFO_EXP
-#if defined(_WIN32) && !defined(__MINGW32__) //MinGW32 does not support _declspec
- #ifdef MEDIAINFO_DLL_EXPORT
- #define MEDIAINFO_EXP
- #else
- #define MEDIAINFO_EXP
- #endif
-#else //defined(_WIN32) && !defined(__MINGW32__)
- #if __GNUC__ >= 4
- #define MEDIAINFO_EXP __attribute__ ((visibility("default")))
- #else
- #define MEDIAINFO_EXP
- #endif
-#endif //defined(_WIN32) && !defined(__MINGW32__)
-
-#if !defined(__WINDOWS__)
- #define __stdcall //Supported only on windows
-#endif //!defined(_WIN32)
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class MediaInfo_Internal;
-
-//***************************************************************************
-/// @brief MediaInfo
-/// @version 0.7
-//***************************************************************************
-
-class MEDIAINFO_EXP MediaInfo
-{
-public :
- //Constructor/Destructor
- MediaInfo ();
- ~MediaInfo ();
- //File
- /// Open a file and collect information about it (technical information and tags)
- /// @brief Open a file
- /// @param File_Name Full name of file to open
- /// @retval 0 File not opened
- /// @retval 1 File opened
- size_t Open (const String &File_Name);
- /// Open a Buffer (Begin and end of the stream) and collect information about it (technical information and tags)
- /// @brief Open a buffer
- /// @param Begin First bytes of the buffer
- /// @param Begin_Size Size of Begin
- /// @param End Last bytes of the buffer
- /// @param End_Size Size of End
- /// @param File_Size Total size of the file
- /// @retval 0 File not opened
- /// @retval 1 File opened
- size_t Open (const ZenLib::int8u* Begin, size_t Begin_Size, const ZenLib::int8u* End=NULL, size_t End_Size=0, ZenLib::int64u File_Size=0);
- /// Open a stream and collect information about it (technical information and tags)
- /// @brief Open a stream (Init)
- /// @param File_Size Estimated file size
- /// @param File_Offset Offset of the file (if we don't have the beginning of the file)
- /// @retval 0 File not opened
- /// @retval 1 File opened
- size_t Open_Buffer_Init (ZenLib::int64u File_Size=(ZenLib::int64u)-1, ZenLib::int64u File_Offset=0);
- /// Open a stream and collect information about it (technical information and tags)
- /// @brief Open a stream (Continue)
- /// @param Buffer pointer to the stream
- /// @param Buffer_Size Count of bytes to read
- /// @return a bitfield \n
- /// bit 0: Is Accepted (format is known)
- /// bit 1: Is Filled (main data is collected)
- /// bit 2: Is Updated (some data have beed updated, example: duration for a real time MPEG-TS stream)
- /// bit 3: Is Finalized (No more data is needed, will not use further data)
- /// bit 4-15: Reserved
- /// bit 16-31: User defined
- size_t Open_Buffer_Continue (const ZenLib::int8u* Buffer, size_t Buffer_Size);
- /// Open a stream and collect information about it (technical information and tags)
- /// @brief Open a stream (Get the needed file Offset)
- /// @return the needed offset of the file \n
- /// File size if no more bytes are needed
- ZenLib::int64u Open_Buffer_Continue_GoTo_Get ();
- /// Open a stream and collect information about it (technical information and tags)
- /// @brief Open a stream (Finalize)
- /// @retval 0 failed
- /// @retval 1 succeed
- size_t Open_Buffer_Finalize ();
- /// If Open() is used in "PerPacket" mode, parse only one packet and return
- /// @brief Read one packet (if "PerPacket" mode is set)
- /// @return a bitfield \n
- /// bit 0: A packet was read
- size_t Open_NextPacket ();
- /// (NOT IMPLEMENTED YET) Save the file opened before with Open() (modifications of tags)
- /// @brief (NOT IMPLEMENTED YET) Save the file
- /// @retval 0 failed
- /// @retval 1 suceed
- size_t Save ();
- /// Close a file opened before with Open() (without saving)
- /// @brief Close a file
- /// @warning without have saved before, modifications are lost
- void Close ();
-
- //General information
- /// Get all details about a file in one string
- /// @brief Get all details about a file
- /// @param Reserved Reserved, do not use
- /// @pre You can change default presentation with Inform_Set()
- /// @return Text with information about the file
- String Inform (size_t Reserved=0);
-
- //Get
- /// Get a piece of information about a file (parameter is an integer)
- /// @brief Get a piece of information about a file (parameter is an integer)
- /// @param StreamKind Kind of stream (general, video, audio...)
- /// @param StreamNumber Stream number in Kind of stream (first, second...)
- /// @param Parameter Parameter you are looking for in the stream (Codec, width, bitrate...), in integer format (first parameter, second parameter...)
- /// @param InfoKind Kind of information you want about the parameter (the text, the measure, the help...)
- /// @return a string about information you search \n
- /// an empty string if there is a problem
- String Get (stream_t StreamKind, size_t StreamNumber, size_t Parameter, info_t InfoKind=Info_Text);
- /// Get a piece of information about a file (parameter is a string)
- /// @brief Get a piece of information about a file (parameter is a string)
- /// @param StreamKind Kind of stream (general, video, audio...)
- /// @param StreamNumber Stream number in Kind of stream (first, second...)
- /// @param Parameter Parameter you are looking for in the stream (Codec, width, bitrate...), in string format ("Codec", "Width"...) \n
- /// See MediaInfo::Option("Info_Parameters") to have the full list
- /// @param InfoKind Kind of information you want about the parameter (the text, the measure, the help...)
- /// @param SearchKind Where to look for the parameter
- /// @return a string about information you search \n
- /// an empty string if there is a problem
- String Get (stream_t StreamKind, size_t StreamNumber, const String &Parameter, info_t InfoKind=Info_Text, info_t SearchKind=Info_Name);
-
- //Set
- /// (NOT IMPLEMENTED YET) Set a piece of information about a file (parameter is an integer)
- /// @brief (NOT IMPLEMENTED YET) Set a piece of information about a file (parameter is an int)
- /// @warning Not yet implemented, do not use it
- /// @param ToSet Piece of information
- /// @param StreamKind Kind of stream (general, video, audio...)
- /// @param StreamNumber Stream number in Kind of stream (first, second...)
- /// @param Parameter Parameter you are looking for in the stream (Codec, width, bitrate...), in integer format (first parameter, second parameter...)
- /// @param OldValue The old value of the parameter \n if OldValue is empty and ToSet is filled: tag is added \n if OldValue is filled and ToSet is filled: tag is replaced \n if OldValue is filled and ToSet is empty: tag is deleted
- /// @retval >0 succeed
- /// @retval 0 failed
- size_t Set (const String &ToSet, stream_t StreamKind, size_t StreamNumber, size_t Parameter, const String &OldValue=String());
- /// (NOT IMPLEMENTED YET) Set a piece of information about a file (parameter is a string)
- /// @warning Not yet implemented, do not use it
- /// @brief (NOT IMPLEMENTED YET) Set information about a file (parameter is a string)
- /// @param ToSet Piece of information
- /// @param StreamKind Kind of stream (general, video, audio...)
- /// @param StreamNumber Stream number in Kind of stream (first, second...)
- /// @param Parameter Parameter you are looking for in the stream (Codec, width, bitrate...), in string format
- /// @param OldValue The old value of the parameter \n if OldValue is empty and ToSet is filled: tag is added \n if OldValue is filled and ToSet is filled: tag is replaced \n if OldValue is filled and ToSet is empty: tag is deleted
- /// @retval >0 succeed
- /// @retval 0 failed
- size_t Set (const String &ToSet, stream_t StreamKind, size_t StreamNumber, const String &Parameter, const String &OldValue=String());
-
- //Output_Buffered
- /// Output the written size when "File_Duplicate" option is used.
- /// @brief Output the written size when "File_Duplicate" option is used.
- /// @param Value The unique name of the duplicated stream (begin with "memory://")
- /// @return The size of the used buffer
- size_t Output_Buffer_Get (const String &Value);
- /// Output the written size when "File_Duplicate" option is used.
- /// @brief Output the written size when "File_Duplicate" option is used.
- /// @param Pos The order of calling
- /// @return The size of the used buffer
- size_t Output_Buffer_Get (size_t Pos);
-
- //Info
- /// Configure or get information about MediaInfoLib
- /// @param Option The name of option
- /// @param Value The value of option
- /// @return Depend of the option: by default "" (nothing) means No, other means Yes
- /// @post Known options are: \n
- /// * (NOT IMPLEMENTED YET) "BlockMethod": Configure when Open Method must return (default or not command not understood: "1") \n
- /// "0": Immediatly \n
- /// "1": After geting local information \n
- /// "2": When user interaction is needed, or whan Internet information is get
- /// * "Complete": For debug, configure if MediaInfoLib::Inform() show all information (doesn't care of InfoOption_NoShow tag): shows all information if true, shows only useful for user information if false (No by default)\n
- /// * "Complete_Get": return the state of "Complete" \n
- /// * "Language": Configure language (default language, and this object); Value is Description of language (format: "Column1;Colum2\n...) \n
- /// Column 1: Unique name ("Bytes", "Title") \n
- /// Column 2: translation ("Octets", "Titre") \n
- /// * "Language_Get": Get the language file in memory
- /// * "Language_Update": Configure language of this object only (for optimisation); Value is Description of language (format: "Column1;Colum2\n...) \n
- /// Column 1: Unique name ("Bytes", "Title") \n
- /// Column 2: translation ("Octets", "Titre") \n
- /// * "Inform": Configure custom text, See MediaInfoLib::Inform() function; Description of views (format: "Column1;Colum2...) \n
- /// Column 1: code (11 lines: "General", "Video", "Audio", "Text", "Other", "Begin", "End", "Page_Begin", "Page_Middle", "Page_End") \n
- /// Column 2: The text to show (exemple: "Audio: %FileName% is at %BitRate/String%") \n
- /// * "ParseUnknownExtensions": Configure if MediaInfo parse files with unknown extension\n
- /// * "ParseUnknownExtensions_Get": Get if MediaInfo parse files with unknown extension\n
- /// * "ShowFiles": Configure if MediaInfo keep in memory files with specific kind of streams (or no streams); Value is Description of components (format: "Column1;Colum2\n...) \n\n
- /// Column 1: code (available: "Nothing" for unknown format, "VideoAudio" for at least 1 video and 1 audio, "VideoOnly" for video streams only, "AudioOnly", "TextOnly") \n
- /// Column 2: "" (nothing) not keeping, other for keeping
- /// * (NOT IMPLEMENTED YET) "TagSeparator": Configure the separator if there are multiple same tags (" | " by default)\n
- /// * (NOT IMPLEMENTED YET) "TagSeparator_Get": return the state of "TagSeparator" \n
- /// * (NOT IMPLEMENTED YET) "Internet": Authorize Internet connection (Yes by default)
- /// * (NOT IMPLEMENTED YET) "Internet_Title_Get": When State=5000, give all possible titles for this file (one per line) \n
- /// Form: Author TagSeparator Title TagSeparator Year\n...
- /// * (NOT IMPLEMENTED YET) "Internet_Title_Set": Set the Good title (same as given by Internet_Title_Get) \n
- /// Form: Author TagSeparator Title TagSeparator Year
- /// * "Info_Parameters": Information about what are known unique names for parameters \n
- /// * "Info_Parameters_CSV": Information about what are known unique names for parameters, in CSV format \n
- /// * "Info_Codecs": Information about which codec is known \n
- /// * "Info_Version": Information about the version of MediaInfoLib
- /// * "Info_Url": Information about where to find the last version
- String Option (const String &Option, const String &Value=String());
- /// Configure or get information about MediaInfoLib
- /// @param Option The name of option
- /// @param Value The value of option
- /// @return Depend of the option: by default "" (nothing) means No, other means Yes
- /// @post Known options are: See MediaInfo::Option()
- static String Option_Static (const String &Option, const String &Value=String());
- /// @brief (NOT IMPLEMENTED YET) Get the state of the library
- /// @retval <1000 No information is available for the file yet
- /// @retval >=1000_<5000 Only local (into the file) information is available, getting Internet information (titles only) is no finished yet
- /// @retval 5000 (only if Internet connection is accepted) User interaction is needed (use Option() with "Internet_Title_Get") \n
- /// Warning: even there is only one possible, user interaction (or the software) is needed
- /// @retval >5000<=10000 Only local (into the file) information is available, getting Internet information (all) is no finished yet
- /// @retval <10000 Done
- size_t State_Get ();
- /// @brief Count of streams of a stream kind (StreamNumber not filled), or count of piece of information in this stream
- /// @param StreamKind Kind of stream (general, video, audio...)
- /// @param StreamNumber Stream number in this kind of stream (first, second...)
- /// @return The count of fields for this stream kind / stream number if stream number is provided, else the count of streams for this stream kind
- size_t Count_Get (stream_t StreamKind, size_t StreamNumber=(size_t)-1);
-
-private :
- MediaInfo_Internal* Internal;
-
- //Constructor
- MediaInfo (const MediaInfo&); // Prevent copy-construction
- MediaInfo& operator=(const MediaInfo&); // Prevent assignment
-};
-
-} //NameSpace
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfoList.cpp b/src/thirdparty/MediaInfo/MediaInfo/MediaInfoList.cpp
deleted file mode 100644
index 7e8b2b32f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfoList.cpp
+++ /dev/null
@@ -1,246 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// For user: you can disable or enable it
-//#define MEDIAINFO_DEBUG
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(__BORLANDC__) && defined (_DEBUG)
- //Why? in Debug mode with release Wx Libs, wxAssert is not defined?
- void wxAssert (int, const wchar_t*, int, const wchar_t*, const wchar_t*){return;}
- void wxAssert (int, const char*, int, const char*, const char*){return;}
-#endif
-#include "MediaInfoList.h"
-#include "MediaInfoList_Internal.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-//To clarify the code
-namespace MediaInfoList_Debug
-{
-#ifdef MEDIAINFO_DEBUG
- #include <stdio.h>
- FILE* F;
- std::string Debug;
-
- #undef MEDIAINFO_DEBUG
- #define MEDIAINFO_DEBUG(_TOAPPEND) \
- F=fopen("MediaInfoList_Debug.txt", "a+t"); \
- Debug.clear(); \
- _TOAPPEND; \
- Debug+="\r\n"; \
- fwrite(Debug.c_str(), Debug.size(), 1, F); \
- fclose(F);
-#else // MEDIAINFO_DEBUG
- #define MEDIAINFO_DEBUG(_TOAPPEND)
-#endif // MEDIAINFO_DEBUG
-
-#ifdef MEDIAINFO_DEBUG
-#define EXECUTE_VOID(_METHOD,_DEBUGB) \
- ((MediaInfo_Internal*)Internal)->_METHOD;
-#else //MEDIAINFO_DEBUG
-#define EXECUTE_VOID(_METHOD,_DEBUGB) \
- ((MediaInfo_Internal*)Internal)->_METHOD; \
- MEDIAINFO_DEBUG(_DEBUGB)
-#endif //MEDIAINFO_DEBUG
-
-#ifdef MEDIAINFO_DEBUG
-#define EXECUTE_INT(_METHOD,_DEBUGB) \
- return ((MediaInfo_Internal*)Internal)->_METHOD;
-#else //MEDIAINFO_DEBUG
-#define EXECUTE_INT(_METHOD, _DEBUGB) \
- int64u ToReturn=((MediaInfo_Internal*)Internal)->_METHOD; \
- MEDIAINFO_DEBUG(_DEBUGB) \
- return ToReturn;
-#endif //MEDIAINFO_DEBUG
-
-#ifdef MEDIAINFO_DEBUG
-#define EXECUTE_STRING(_METHOD,_DEBUGB) \
- return ((MediaInfo_Internal*)Internal)->_METHOD;
-#else //MEDIAINFO_DEBUG
-#define EXECUTE_STRING(_METHOD,_DEBUGB) \
- Ztring ToReturn=((MediaInfo_Internal*)Internal)->_METHOD; \
- MEDIAINFO_DEBUG(_DEBUGB) \
- return ToReturn;
-#endif //MEDIAINFO_DEBUG
-}
-using namespace MediaInfoList_Debug;
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Gestion de la classe
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//Constructeurs
-MediaInfoList::MediaInfoList(size_t Count_Init)
-{
- MEDIAINFO_DEBUG(Debug+="Construction";)
- Internal=new MediaInfoList_Internal(Count_Init);
-}
-
-//---------------------------------------------------------------------------
-//Destructeur
-MediaInfoList::~MediaInfoList()
-{
- MEDIAINFO_DEBUG(Debug+="Destruction";)
- delete Internal; //Internal=NULL;
-}
-
-//***************************************************************************
-// Files
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList::Open(const String &File, const fileoptions_t Options)
-{
- MEDIAINFO_DEBUG(Debug+="Open, File=";Debug+=Ztring(File).To_Local().c_str();)
- return Internal->Open(File, Options);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList::Open_Buffer_Init (int64u File_Size_, int64u File_Offset_)
-{
- return Internal->Open_Buffer_Init(File_Size_, File_Offset_);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList::Open_Buffer_Continue (size_t FilePos, const int8u* ToAdd, size_t ToAdd_Size)
-{
- return Internal->Open_Buffer_Continue(FilePos, ToAdd, ToAdd_Size);
-}
-
-//---------------------------------------------------------------------------
-int64u MediaInfoList::Open_Buffer_Continue_GoTo_Get (size_t FilePos)
-{
- return Internal->Open_Buffer_Continue_GoTo_Get(FilePos);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList::Open_Buffer_Finalize (size_t FilePos)
-{
- return Internal->Open_Buffer_Finalize(FilePos);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList::Save(size_t)
-{
- return 0; //Not yet implemented
-}
-
-//---------------------------------------------------------------------------
-void MediaInfoList::Close(size_t FilePos)
-{
- Internal->Close(FilePos);
-}
-
-//***************************************************************************
-// Get File info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-String MediaInfoList::Inform(size_t FilePos, size_t)
-{
- return Internal->Inform(FilePos);
-}
-
-//---------------------------------------------------------------------------
-String MediaInfoList::Get(size_t FilePos, stream_t KindOfStream, size_t StreamNumber, size_t Parameter, info_t KindOfInfo)
-{
- return Internal->Get(FilePos, KindOfStream, StreamNumber, Parameter, KindOfInfo);
-}
-
-//---------------------------------------------------------------------------
-String MediaInfoList::Get(size_t FilePos, stream_t KindOfStream, size_t StreamNumber, const String &Parameter, info_t KindOfInfo, info_t KindOfSearch)
-{
- //TRACE(Trace+=__T("Get(L), CompleteName=");Trace+=Info[FilePos].Get(Stream_General, 0, __T("CompleteName")).c_str();)
- //TRACE(Trace+=__T("Get(L), StreamKind=");Trace+=ZenLib::Ztring::ToZtring((int8u)KindOfStream);Trace+=__T(", StreamNumber=");Trace+=ZenLib::Ztring::ToZtring((int8u)StreamNumber);Trace+=__T(", Parameter=");Trace+=ZenLib::Ztring(Parameter);Trace+=__T(", KindOfInfo=");Trace+=ZenLib::Ztring::ToZtring((int8u)KindOfInfo);Trace+=__T(", KindOfSearch=");Trace+=ZenLib::Ztring::ToZtring((int8u)KindOfSearch);)
- //TRACE(Trace+=__T("Get(L), will return ");Trace+=Info[FilePos].Get(KindOfStream, StreamNumber, Parameter, KindOfInfo, KindOfSearch).c_str();)
-
- return Internal->Get(FilePos, KindOfStream, StreamNumber, Parameter, KindOfInfo, KindOfSearch);
-}
-
-//***************************************************************************
-// Set File info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList::Set(const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, const String &OldValue)
-{
- return Internal->Set(ToSet, FilePos, StreamKind, StreamNumber, Parameter, OldValue);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList::Set(const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, const String &OldValue)
-{
- return Internal->Set(ToSet, FilePos, StreamKind, StreamNumber, Parameter, OldValue);
-}
-
-//***************************************************************************
-// Output buffer
-//***************************************************************************
-
-/*
-//---------------------------------------------------------------------------
-char* MediaInfoList::Output_Buffer_Get (size_t FilePos, size_t &Output_Buffer_Size)
-{
- return Internal->Output_Buffer_Get(FilePos, Output_Buffer_Size);
-}
-*/
-
-//***************************************************************************
-// Information
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-String MediaInfoList::Option (const String &Option, const String &Value)
-{
- return Internal->Option(Option, Value);
-
-}
-
-//---------------------------------------------------------------------------
-String MediaInfoList::Option_Static (const String &Option, const String &Value)
-{
- return MediaInfo::Option_Static(Option, Value);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList::State_Get()
-{
- return Internal->State_Get();
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList::Count_Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber)
-{
- return Internal->Count_Get(FilePos, StreamKind, StreamNumber);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList::Count_Get()
-{
- return Internal->Count_Get();
-}
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfoList.h b/src/thirdparty/MediaInfo/MediaInfo/MediaInfoList.h
deleted file mode 100644
index 90f8b2e70..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfoList.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Give information about a lot of media files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfoListH
-#define MediaInfoListH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#undef MEDIAINFO_EXP
-#if defined(_WIN32) && !defined(__MINGW32__) //MinGW32 does not support _declspec
- #ifdef MEDIAINFO_DLL_EXPORT
- #define MEDIAINFO_EXP
- #else
- #define MEDIAINFO_EXP
- #endif
-#else //defined(_WIN32) && !defined(__MINGW32__)
- #if __GNUC__ >= 4
- #define MEDIAINFO_EXP __attribute__ ((visibility("default")))
- #else
- #define MEDIAINFO_EXP
- #endif
-#endif //defined(_WIN32) && !defined(__MINGW32__)
-
-#if !defined(__WINDOWS__)
- #define __stdcall //Supported only on windows
-#endif //!defined(_WIN32)
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class MediaInfoList_Internal;
-
-//***************************************************************************
-/// @brief MediaInfoList
-/// @version 0.7
-//***************************************************************************
-
-class MEDIAINFO_EXP MediaInfoList
-{
-public :
- //Class
- /// @brief Constructor
- /// @param Count_Init optimization information: How many files do you plan to handle?
- MediaInfoList (size_t Count_Init=64);
- ~MediaInfoList ();
-
- //Files
- /// Open one or more files and collect information about them (technical information and tags)
- /// @brief Open files
- /// @param File Full name of file(s) to open \n
- /// or Full name of folder(s) to open \n
- /// (if multiple names, names must be separated by "|")
- /// @param Options: FileOption_Recursive = Recursive mode for folders \n
- /// FileOption_Close = Close all already opened files before
- /// @return Number of files successfuly added
- size_t Open (const String &File, const fileoptions_t Options=FileOption_Nothing);
- /// Open a stream and collect information about it (technical information and tags)
- /// @brief Open a stream (Init)
- /// @param File_Size Estimated file size
- /// @param File_Offset Offset of the file (if we don't have the beginning of the file)
- /// @retval 0 failed
- /// @retval 1 succeed
- size_t Open_Buffer_Init (ZenLib::int64u File_Size=(ZenLib::int64u)-1, ZenLib::int64u File_Offset=0);
- /// Open a stream and collect information about it (technical information and tags)
- /// @brief Open a stream (Continue)
- /// @param FilePos File position
- /// @param Buffer pointer to the stream
- /// @param Buffer_Size Count of bytes to read
- /// @retval 0 failed
- /// @retval 1 succeed
- size_t Open_Buffer_Continue (size_t FilePos, const ZenLib::int8u* Buffer, size_t Buffer_Size);
- /// Open a stream and collect information about it (technical information and tags)
- /// @brief Open a stream (Get the needed file Offset)
- /// @param FilePos File position
- /// @return the needed offset of the file \n
- /// File size if no more bytes are needed
- ZenLib::int64u Open_Buffer_Continue_GoTo_Get (size_t FilePos);
- /// Open a stream and collect information about it (technical information and tags)
- /// @brief Open a stream (Finalize)
- /// @param FilePos File position
- /// @retval 0 failed
- /// @retval 1 succeed
- size_t Open_Buffer_Finalize (size_t FilePos);
- /// Save the file opened before with Open() (modifications of tags)
- /// @brief Save the file
- /// @param FilePos File position \n
- /// (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") )
- /// @retval 0 failed
- /// @retval 1 succeed
- size_t Save (size_t FilePos);
- /// (NOT IMPLEMENTED YET) Save all files opened before with Open() (modifications of tags)
- /// @brief (NOT IMPLEMENTED YET) Save all files
- /// @param FilePos File position \n
- /// (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") )
- /// @retval Count of files saved
- void Close (size_t FilePos=(size_t)-1);
-
- /// Get all details about a file in one string
- /// @brief Get all details about a file
- /// @param FilePos File position \n
- /// (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") )
- /// @param Reserved Deprecated, do not use it anymore
- /// @pre You can change default presentation with Inform_Set()
- /// @return Text with information about the file
- String Inform (size_t FilePos=(size_t)-1, size_t Reserved=0);
-
- //Get
- /// Get a piece of information about a file (parameter is an integer)
- /// @brief Get a piece of information about a file (parameter is an integer)
- /// @param FilePos File position \n
- /// (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") )
- /// @param StreamKind Kind of stream (general, video, audio...)
- /// @param StreamNumber Stream number in Kind of stream (first, second...)
- /// @param Parameter Parameter you are looking for in the stream (Codec, width, bitrate...), in integer format (first parameter, second parameter...)
- /// @param KindOfInfo Kind of information you want about the parameter (the text, the measure, the help...)
- /// @return a string about information you search \n
- /// an empty string if there is a problem
- String Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, info_t KindOfInfo=Info_Text); //Get info, FilePos=File position, StreamKind=General video audio text chapter, StreamNumber=stream number, PosInStream=parameter you want, KindOfInfo=name, text, measure, options, name (language), measure (language), info, how to
- /// Get a piece of information about a file (parameter is a string)
- /// @brief Get a piece of information about a file (parameter is a string)
- /// @param FilePos File position \n
- /// (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") )
- /// @param StreamKind Kind of stream (general, video, audio...)
- /// @param StreamNumber Stream number in Kind of stream (first, second...)
- /// @param Parameter Parameter you are looking for in the stream (Codec, width, bitrate...), in string format ("Codec", "Width"...) \n
- /// See MediaInfo::Option("Info_Parameters") to have the full list
- /// @param KindOfInfo Kind of information you want about the parameter (the text, the measure, the help...)
- /// @param KindOfSearch Where to look for the parameter
- /// @return a string about information you search \n
- /// an empty string if there is a problem
- String Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, info_t KindOfInfo=Info_Text, info_t KindOfSearch=Info_Name); //Get info, FilePos=File position, StreamKind=General video audio text chapter, StreamNumber=stream number, PosInStream=parameter you want, KindOfInfo=name text measure options name(language) measure(language) information how to, KindOfSearch=which Kind Of information Parameter must be searched?
-
- //Set
- /// (NOT IMPLEMENTED YET) Set a piece of information about a file (parameter is an int)
- /// @brief (NOT IMPLEMENTED YET) Set a piece of information about a file (parameter is an int)
- /// @warning Not yet implemented, do not use it
- /// @param ToSet Piece of information
- /// @param FilePos File position \n
- /// (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") )
- /// @param StreamKind Kind of stream (general, video, audio...)
- /// @param StreamNumber Stream number in Kind of stream (first, second...)
- /// @param Parameter Parameter you are looking for in the stream (Codec, width, bitrate...), in integer format (first parameter, second parameter...)
- /// @param OldValue The old value of the parameter \n if OldValue is empty and ToSet is filled: tag is added \n if OldValue is filled and ToSet is filled: tag is replaced \n if OldValue is filled and ToSet is empty: tag is deleted
- /// @retval >0 succeed
- /// @retval 0 failed
- size_t Set (const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, const String &OldValue=String()); //Get info, FilePos=File position, StreamKind=General video audio text chapter, StreamNumber=stream number, PosInStream=parameter you want, KindOfInfo=name, text, measure, options name(language) measure(language) information how to
- /// @brief (NOT IMPLEMENTED YET) Get information about a file (parameter is a string)
- /// @warning Not yet implemented, do not use it
- /// @param ToSet Piece of information
- /// @param FilePos File position \n
- /// (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") )
- /// @param StreamKind Kind of stream (general, video, audio...)
- /// @param StreamNumber Stream number in Kind of stream (first, second...)
- /// @param Parameter Parameter you are looking for in the stream (Codec, width, bitrate...), in string format ("Codec", "Width"...) \n
- /// See Option("Info_Parameters") to have the full list
- /// @param OldValue The old value of the parameter \n if OldValue is empty and ToSet is filled: tag is added \n if OldValue is filled and ToSet is filled: tag is replaced \n if OldValue is filled and ToSet is empty: tag is deleted
- /// @retval >0 succeed
- /// @retval 0 failed
- size_t Set (const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, const String &OldValue=String()); //Get info, FilePos=File position, StreamKind=General video audio text chapter, StreamNumber=stream number, PosInStream=parameter you want, KindOfInfo=name text measure options name (language) measure (language) information how to, KindOfSearch=which Kind Of information Parameter must be searched?
-
- //Output_Buffered
- /// Output buffer retrieving, used for File_Duplicate option.
- /// @brief Output buffer retrieving
- /// @param FilePos File position
- /// @param Output_Buffer_Size A pointer to the variable that receives the size of the buffer \n
- /// Note: you must use all the size of the buffer before the next call to this procedure
- /// @return A pointer on the output buffer, NULL if there is nothing in the buffer
- char* Output_Buffer_Get (size_t FilePos, size_t &Output_Buffer_Size);
-
- //Info
- /// Configure or get information about MediaInfoLib
- /// @param Option The name of option
- /// @param Value The value of option
- /// @return Depend of the option: by default "" (nothing) means No, other means Yes
- /// @post Known options are: See MediaInfo::Option()
- String Option (const String &Option, const String &Value=String());
- /// Configure or get information about MediaInfoLib (static version)
- /// @param Option The name of option
- /// @param Value The value of option
- /// @return Depend of the option: by default "" (nothing) means No, other means Yes
- /// @post Known options are: See MediaInfo::Option()
- static String Option_Static (const String &Option, const String &Value=String());
- /// @brief (NOT IMPLEMENTED YET) Get the state of the library
- /// @retval <1000 No information is available for the file yet
- /// @retval >=1000_<5000 Only local (into the file) information is available, getting Internet information (titles only) is no finished yet
- /// @retval 5000 (only if Internet connection is accepted) User interaction is needed (use Option() with "Internet_Title_Get") \n
- /// Warning: even there is only one possible, user interaction (or the software) is needed
- /// @retval >5000<=10000 Only local (into the file) information is available, getting Internet information (all) is no finished yet
- /// @retval <10000 Done
- size_t State_Get ();
- /// @brief Count of streams, or count of piece of information in this stream
- /// @param FilePos File position \n
- /// (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") )
- /// @param StreamKind Kind of stream (general, video, audio...)
- /// @param StreamNumber Stream number in this kind of stream (first, second...)
- /// @return The count of fields for this stream kind / stream number if stream number is provided, else the count of streams for this stream kind
- size_t Count_Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber=(size_t)-1);
- /// @brief Get the count of opened files
- /// @return Count of files opened
- size_t Count_Get ();
-
-private :
- MediaInfoList_Internal* Internal;
-
- //Constructor
- MediaInfoList (const MediaInfoList&); // Prevent copy-construction
- MediaInfoList& operator=(const MediaInfoList&); // Prevent assignment
-};
-
-} //NameSpace
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfoList_Internal.cpp b/src/thirdparty/MediaInfo/MediaInfo/MediaInfoList_Internal.cpp
deleted file mode 100644
index 87336899b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfoList_Internal.cpp
+++ /dev/null
@@ -1,468 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfoList_Internal.h"
-#include "MediaInfo/MediaInfo_Config.h"
-#include "ZenLib/File.h"
-#include "ZenLib/Dir.h"
-#include "MediaInfo/Reader/Reader_Directory.h"
-#include "MediaInfo/File__Analyse_Automatic.h"
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Gestion de la classe
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//Constructeurs
-MediaInfoList_Internal::MediaInfoList_Internal(size_t Count_Init)
-: Thread()
-{
- CriticalSectionLocker CSL(CS);
-
- //Initialisation
- Info.reserve(Count_Init);
- for (size_t Pos=0; Pos<Info.size(); Pos++)
- Info[Pos]=NULL;
- ToParse_AlreadyDone=0;
- ToParse_Total=0;
- CountValid=0;
-
- //Threading
- BlockMethod=0;
- State=0;
- IsInThread=false;
-}
-
-//---------------------------------------------------------------------------
-//Destructeur
-MediaInfoList_Internal::~MediaInfoList_Internal()
-{
- Close();
-}
-
-//***************************************************************************
-// Fichiers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList_Internal::Open(const String &File_Name, const fileoptions_t Options)
-{
- //Option FileOption_Close
- if (Options & FileOption_CloseAll)
- Close(All);
-
- //Option Recursive
- //TODO
-
- //Get all filenames
- ZtringList List;
- size_t Pos=File_Name.find(__T(':'));
- if (Pos!=string::npos && Pos!=1)
- List.push_back(File_Name);
- else if (File::Exists(File_Name))
- List.push_back(File_Name);
- else
- List=Dir::GetAllFileNames(File_Name, (Options&FileOption_NoRecursive)?Dir::Include_Files:((Dir::dirlist_t)(Dir::Include_Files|Dir::Parse_SubDirs)));
-
- #if defined(MEDIAINFO_DIRECTORY_YES)
- Reader_Directory().Directory_Cleanup(List);
- #endif //defined(MEDIAINFO_DIRECTORY_YES)
-
- //Registering files
- CS.Enter();
- if (ToParse.empty())
- CountValid=0;
- for (ZtringList::iterator L=List.begin(); L!=List.end(); ++L)
- ToParse.push(*L);
- ToParse_Total+=List.size();
- if (ToParse_Total)
- State=ToParse_AlreadyDone*10000/ToParse_Total;
- else
- State=10000;
- CS.Leave();
-
- //Parsing
- if (BlockMethod==1)
- {
- CS.Enter();
- if (!IsRunning()) //If already created, the routine will read the new files
- {
- RunAgain();
- IsInThread=true;
- }
- CS.Leave();
- return 0;
- }
- else
- {
- Entry(); //Normal parsing
- return Count_Get();
- }
-}
-
-void MediaInfoList_Internal::Entry()
-{
- if (ToParse_Total==0)
- return;
-
- for (;;)
- {
- CS.Enter();
- if (!ToParse.empty())
- {
- MediaInfo_Internal* MI=new MediaInfo_Internal();
- for (std::map<String, String>::iterator Config_MediaInfo_Item=Config_MediaInfo_Items.begin(); Config_MediaInfo_Item!=Config_MediaInfo_Items.end(); ++Config_MediaInfo_Item)
- MI->Option(Config_MediaInfo_Item->first, Config_MediaInfo_Item->second);
- if (BlockMethod==1)
- MI->Option(__T("Thread"), __T("1"));
- MI->Open(ToParse.front());
-
- if (BlockMethod==1)
- {
- CS.Leave();
- while (MI->State_Get()<10000)
- {
- size_t A=MI->State_Get();
- CS.Enter();
- State=(ToParse_AlreadyDone*10000+A)/ToParse_Total;
- CS.Leave();
- if (IsTerminating())
- {
- break;
- }
- Yield();
- }
- CS.Enter();
- }
- Info.push_back(MI);
- ToParse.pop();
- ToParse_AlreadyDone++;
-
- //Removing sequences of files from the list
- if (!MI->Get(Stream_General, 0, General_CompleteName_Last).empty())
- {
- Ztring CompleteName_Begin=MI->Get(Stream_General, 0, General_CompleteName);
- Ztring CompleteName_Last=MI->Get(Stream_General, 0, General_CompleteName_Last);
- size_t Pos=0;
- for (; Pos<CompleteName_Begin.size(); Pos++)
- {
- if (Pos>=CompleteName_Last.size())
- break;
- if (CompleteName_Begin[Pos]!=CompleteName_Last[Pos])
- break;
- }
- if (Pos<CompleteName_Begin.size())
- {
- CompleteName_Begin.resize(Pos);
- while (!ToParse.empty() && ToParse.front().find(CompleteName_Begin)==0)
- {
- ToParse.pop();
- ToParse_Total--;
- }
- }
- }
-
- State=ToParse_AlreadyDone*10000/ToParse_Total;
- //if ((ToParse_AlreadyDone%10)==0)
- // printf("%f done (%i/%i %s)\n", ((float)State)/100, (int)ToParse_AlreadyDone, (int)ToParse_Total, Ztring(ToParse.front()).To_UTF8().c_str());
- }
- if (IsTerminating() || State==10000)
- {
- CS.Leave();
- break;
- }
- CS.Leave();
- Yield();
- }
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList_Internal::Open_Buffer_Init (int64u File_Size_, int64u File_Offset_)
-{
- MediaInfo_Internal* MI=new MediaInfo_Internal();
- MI->Open_Buffer_Init(File_Size_, File_Offset_);
-
- CriticalSectionLocker CSL(CS);
- size_t Pos=Info.size();
- Info.push_back(MI);
- return Pos;
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList_Internal::Open_Buffer_Continue (size_t FilePos, const int8u* ToAdd, size_t ToAdd_Size)
-{
- CriticalSectionLocker CSL(CS);
- if (FilePos>=Info.size() || Info[FilePos]==NULL)
- return 0;
-
- return Info[FilePos]->Open_Buffer_Continue(ToAdd, ToAdd_Size).to_ulong();
-}
-
-//---------------------------------------------------------------------------
-int64u MediaInfoList_Internal::Open_Buffer_Continue_GoTo_Get (size_t FilePos)
-{
- CriticalSectionLocker CSL(CS);
- if (FilePos>=Info.size() || Info[FilePos]==NULL)
- return (int64u)-1;
-
- return Info[FilePos]->Open_Buffer_Continue_GoTo_Get();
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList_Internal::Open_Buffer_Finalize (size_t FilePos)
-{
- CriticalSectionLocker CSL(CS);
- if (FilePos>=Info.size() || Info[FilePos]==NULL)
- return 0;
-
- return Info[FilePos]->Open_Buffer_Finalize();
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList_Internal::Save(size_t)
-{
- CriticalSectionLocker CSL(CS);
- return 0; //Not yet implemented
-}
-
-//---------------------------------------------------------------------------
-void MediaInfoList_Internal::Close(size_t FilePos)
-{
- if (IsRunning())
- {
- RequestTerminate();
- while(IsExited())
- Yield();
- }
-
- CriticalSectionLocker CSL(CS);
- if (FilePos==Unlimited)
- {
- for (size_t Pos=0; Pos<Info.size(); Pos++)
- {
- delete Info[Pos]; Info[Pos]=NULL;
- }
- Info.clear();
- }
- else if (FilePos<Info.size())
- {
- delete Info[FilePos]; Info[FilePos]=NULL;
- Info.erase(Info.begin()+FilePos);
- }
-
- ToParse_AlreadyDone=0;
- ToParse_Total=0;
-}
-
-//***************************************************************************
-// Get File info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-String MediaInfoList_Internal::Inform(size_t FilePos, size_t)
-{
- if (FilePos==Error)
- {
- Ztring Retour;
- FilePos=0;
- ZtringListList MediaInfo_Custom_View; MediaInfo_Custom_View.Write(Option(__T("Inform_Get")));
- bool XML=false;
- if (MediaInfoLib::Config.Inform_Get()==__T("XML"))
- XML=true;
- if (XML) Retour+=__T("<?xml version=\"1.0\" encoding=\"UTF-8\"?>")+MediaInfoLib::Config.LineSeparator_Get()+__T("<Mediainfo version=\"")+MediaInfoLib::Config.Info_Version_Get().SubString(__T(" v"), Ztring())+__T("\">")+MediaInfoLib::Config.LineSeparator_Get();
- else
- Retour+=MediaInfo_Custom_View("Page_Begin");
- while (FilePos<Info.size())
- {
- Retour+=Inform(FilePos);
- if (FilePos<Info.size()-1)
- {
- Retour+=MediaInfo_Custom_View("Page_Middle");
- }
- FilePos++;
- }
- if (XML) Retour+=__T("</Mediainfo>")+MediaInfoLib::Config.LineSeparator_Get();
- else Retour+=MediaInfo_Custom_View("Page_End");//
- return Retour.c_str();
- }
-
- CriticalSectionLocker CSL(CS);
-
- if (FilePos>=Info.size() || Info[FilePos]==NULL || Info[FilePos]->Count_Get(Stream_General)==0)
- return MediaInfoLib::Config.EmptyString_Get();
-
- Info[FilePos]->IsFirst=FilePos==0;
- Info[FilePos]->IsLast=(FilePos+1)==Info.size();
- return Info[FilePos]->Inform();
-}
-
-//---------------------------------------------------------------------------
-String MediaInfoList_Internal::Get(size_t FilePos, stream_t KindOfStream, size_t StreamNumber, size_t Parameter, info_t KindOfInfo)
-{
- CriticalSectionLocker CSL(CS);
- if (FilePos==Error || FilePos>=Info.size() || Info[FilePos]==NULL || Info[FilePos]->Count_Get(Stream_General)==0)
- return MediaInfoLib::Config.EmptyString_Get();
-
- return Info[FilePos]->Get(KindOfStream, StreamNumber, Parameter, KindOfInfo);
-}
-
-//---------------------------------------------------------------------------
-String MediaInfoList_Internal::Get(size_t FilePos, stream_t KindOfStream, size_t StreamNumber, const String &Parameter, info_t KindOfInfo, info_t KindOfSearch)
-{
- CriticalSectionLocker CSL(CS);
- if (FilePos==Error || FilePos>=Info.size() || Info[FilePos]==NULL || Info[FilePos]->Count_Get(Stream_General)==0)
- return MediaInfoLib::Config.EmptyString_Get();
-
- return Info[FilePos]->Get(KindOfStream, StreamNumber, Parameter, KindOfInfo, KindOfSearch);
-}
-
-//***************************************************************************
-// Set File info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList_Internal::Set(const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, const String &OldValue)
-{
- CriticalSectionLocker CSL(CS);
- if (FilePos==(size_t)-1)
- FilePos=0; //TODO : average
-
- if (FilePos>=Info.size() || Info[FilePos]==NULL || Info[FilePos]->Count_Get(Stream_General)==0)
- return 0;
-
- return Info[FilePos]->Set(ToSet, StreamKind, StreamNumber, Parameter, OldValue);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList_Internal::Set(const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, const String &OldValue)
-{
- CriticalSectionLocker CSL(CS);
- if (FilePos==(size_t)-1)
- FilePos=0; //TODO : average
-
- if (FilePos>=Info.size() || Info[FilePos]==NULL || Info[FilePos]->Count_Get(Stream_General)==0)
- return 0;
-
- return Info[FilePos]->Set(ToSet, StreamKind, StreamNumber, Parameter, OldValue);
-}
-
-//***************************************************************************
-// Output buffer
-//***************************************************************************
-
-/*
-//---------------------------------------------------------------------------
-char* MediaInfoList_Internal::Output_Buffer_Get (size_t FilePos, size_t &Output_Buffer_Size)
-{
- if (FilePos==(size_t)-1)
- FilePos=0; //TODO : average
-
- if (FilePos>=Info.size() || Info[FilePos]==NULL || Info[FilePos]->Count_Get(Stream_General)==0)
- return 0;
-
- return Info[FilePos]->Output_Buffer_Get(Output_Buffer_Size);
-}
-*/
-
-//***************************************************************************
-// Information
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-String MediaInfoList_Internal::Option (const String &Option, const String &Value)
-{
- CriticalSectionLocker CSL(CS);
- Ztring OptionLower=Option; OptionLower.MakeLowerCase();
- if (Option==__T(""))
- return __T("");
- else if (OptionLower==__T("manguage_update"))
- {
- //Special case : Language_Update must update all MediaInfo classes
- for (unsigned int Pos=0; Pos<Info.size(); Pos++)
- if (Info[Pos])
- Info[Pos]->Option(__T("language_update"), Value);
-
- return __T("");
- }
- else if (OptionLower==__T("create_dummy"))
- {
- Info.resize(Info.size()+1);
- Info[Info.size()-1]=new MediaInfo_Internal();
- Info[Info.size()-1]->Option(Option, Value);
- return __T("");
- }
- else if (OptionLower==__T("thread"))
- {
- BlockMethod=1;
- return __T("");
- }
- else if (OptionLower.find(__T("file_"))==0)
- {
- Config_MediaInfo_Items[Option]=Value;
- return __T("");
- }
- else
- return MediaInfo::Option_Static(Option, Value);
-}
-
-//---------------------------------------------------------------------------
-String MediaInfoList_Internal::Option_Static (const String &Option, const String &Value)
-{
- return MediaInfo::Option_Static(Option, Value);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList_Internal::State_Get()
-{
- CriticalSectionLocker CSL(CS);
- if (State==10000)
- {
- //Pause();
- IsInThread=false;
- }
- return State;
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList_Internal::Count_Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber)
-{
- CriticalSectionLocker CSL(CS);
- if (FilePos>=Info.size() || Info[FilePos]==NULL)
- return 0;
-
- return Info[FilePos]->Count_Get(StreamKind, StreamNumber);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfoList_Internal::Count_Get()
-{
- CriticalSectionLocker CSL(CS);
- return Info.size();
-}
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfoList_Internal.h b/src/thirdparty/MediaInfo/MediaInfo/MediaInfoList_Internal.h
deleted file mode 100644
index acbaa2aa8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfoList_Internal.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Give information about a lot of media files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfoList_InternalH
-#define MediaInfoList_InternalH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#include <queue>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class MediaInfoList_Internal : public ZenLib::Thread
-{
-public :
- //Class
- MediaInfoList_Internal (size_t Count_Init=64);
- virtual ~MediaInfoList_Internal ();
-
- //Files
- size_t Open (const String &File, const fileoptions_t Options=FileOption_Nothing);
- size_t Open_Buffer_Init (ZenLib::int64u File_Size=(ZenLib::int64u)-1, ZenLib::int64u File_Offset=0);
- size_t Open_Buffer_Continue (size_t FilePos, const ZenLib::int8u* Buffer, size_t Buffer_Size);
- ZenLib::int64u Open_Buffer_Continue_GoTo_Get (size_t FilePos);
- size_t Open_Buffer_Finalize (size_t FilePos);
- size_t Save (size_t FilePos);
- void Close (size_t FilePos=(size_t)-1);
- String Inform (size_t FilePos=(size_t)-1, size_t Reserved=0);
-
- //Get
- String Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, info_t KindOfInfo=Info_Text); //Get info, FilePos=File position, StreamKind=General video audio text chapter, StreamNumber=stream number, PosInStream=parameter you want, KindOfInfo=name, text, measure, options, name (language), measure (language), info, how to
- String Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, info_t KindOfInfo=Info_Text, info_t KindOfSearch=Info_Name); //Get info, FilePos=File position, StreamKind=General video audio text chapter, StreamNumber=stream number, PosInStream=parameter you want, KindOfInfo=name text measure options name(language) measure(language) information how to, KindOfSearch=which Kind Of information Parameter must be searched?
-
- //Set
- size_t Set (const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, const String &OldValue=__T("")); //Get info, FilePos=File position, StreamKind=General video audio text chapter, StreamNumber=stream number, PosInStream=parameter you want, KindOfInfo=name, text, measure, options name(language) measure(language) information how to
- size_t Set (const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, const String &OldValue=__T("")); //Get info, FilePos=File position, StreamKind=General video audio text chapter, StreamNumber=stream number, PosInStream=parameter you want, KindOfInfo=name text measure options name (language) measure (language) information how to, KindOfSearch=which Kind Of information Parameter must be searched?
-
- //Output_Buffered
- char* Output_Buffer_Get (size_t File_Pos, size_t &Output_Buffer_Size);
-
- //Info
- String Option (const String &Option, const String &Value=String(__T("")));
- static String Option_Static (const String &Option, const String &Value=String(__T("")));
- size_t State_Get ();
- size_t Count_Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber=(size_t)-1);
- size_t Count_Get ();
-
-private :
- std::vector<MediaInfo_Internal*> Info;
- std::queue<String> ToParse;
- std::map<String, String> Config_MediaInfo_Items; //Config per file
- size_t ToParse_AlreadyDone;
- size_t ToParse_Total;
- size_t CountValid;
- MediaInfo_Config_MediaInfo Config;
-
- //Threading
- size_t BlockMethod; //Open() return: 0=immedialtly, 1=after local info, 2=when user interaction is needed
- size_t State;
- bool IsInThread;
- void Entry();
- ZenLib::CriticalSection CS;
-};
-
-} //NameSpace
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config.cpp b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config.cpp
deleted file mode 100644
index 6e2007c28..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config.cpp
+++ /dev/null
@@ -1,2438 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Global configuration of MediaInfo
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-// Debug
-#ifdef MEDIAINFO_DEBUG
- #include <stdio.h>
- #include <windows.h>
- namespace MediaInfo_Config_Debug
- {
- FILE* F;
- std::string Debug;
- SYSTEMTIME st_In;
-
- void Debug_Open(bool Out)
- {
- F=fopen("C:\\Temp\\MediaInfo_Debug.txt", "a+t");
- Debug.clear();
- SYSTEMTIME st;
- GetLocalTime( &st );
-
- char Duration[100];
- if (Out)
- {
- FILETIME ft_In;
- if (SystemTimeToFileTime(&st_In, &ft_In))
- {
- FILETIME ft_Out;
- if (SystemTimeToFileTime(&st, &ft_Out))
- {
- ULARGE_INTEGER UI_In;
- UI_In.HighPart=ft_In.dwHighDateTime;
- UI_In.LowPart=ft_In.dwLowDateTime;
-
- ULARGE_INTEGER UI_Out;
- UI_Out.HighPart=ft_Out.dwHighDateTime;
- UI_Out.LowPart=ft_Out.dwLowDateTime;
-
- ULARGE_INTEGER UI_Diff;
- UI_Diff.QuadPart=UI_Out.QuadPart-UI_In.QuadPart;
-
- FILETIME ft_Diff;
- ft_Diff.dwHighDateTime=UI_Diff.HighPart;
- ft_Diff.dwLowDateTime=UI_Diff.LowPart;
-
- SYSTEMTIME st_Diff;
- if (FileTimeToSystemTime(&ft_Diff, &st_Diff))
- {
- sprintf(Duration, "%02hd:%02hd:%02hd.%03hd", st_Diff.wHour, st_Diff.wMinute, st_Diff.wSecond, st_Diff.wMilliseconds);
- }
- else
- strcpy(Duration, " ");
- }
- else
- strcpy(Duration, " ");
-
- }
- else
- strcpy(Duration, " ");
- }
- else
- {
- st_In=st;
- strcpy(Duration, " ");
- }
-
- fprintf(F," %02hd:%02hd:%02hd.%03hd %s", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds, Duration);
- }
-
- void Debug_Close()
- {
- Debug += "\r\n";
- fwrite(Debug.c_str(), Debug.size(), 1, F); \
- fclose(F);
- }
- }
- using namespace MediaInfo_Config_Debug;
-
- #define MEDIAINFO_DEBUG1(_NAME,_TOAPPEND) \
- Debug_Open(false); \
- Debug+=", ";Debug+=_NAME; \
- _TOAPPEND; \
- Debug_Close();
-
- #define MEDIAINFO_DEBUG2(_NAME,_TOAPPEND) \
- Debug_Open(true); \
- Debug+=", ";Debug+=_NAME; \
- _TOAPPEND; \
- Debug_Close();
-#else // MEDIAINFO_DEBUG
- #define MEDIAINFO_DEBUG1(_NAME,__TOAPPEND)
- #define MEDIAINFO_DEBUG2(_NAME,__TOAPPEND)
-#endif // MEDIAINFO_DEBUG
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Config.h"
-#include "ZenLib/ZtringListListF.h"
-#include "ZenLib/File.h"
-#include <algorithm>
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-const Char* MediaInfo_Version=__T("MediaInfoLib - v0.7.73");
-const Char* MediaInfo_Url=__T("http://MediaArea.net/MediaInfo");
- Ztring EmptyZtring; //Use it when we can't return a reference to a true Ztring
-const Ztring EmptyZtring_Const; //Use it when we can't return a reference to a true Ztring, const version
-const ZtringListList EmptyZtringListList_Const; //Use it when we can't return a reference to a true ZtringListList, const version
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_General_Mpeg4 (InfoMap &Info);
-void MediaInfo_Config_CodecID_Video_Matroska (InfoMap &Info);
-void MediaInfo_Config_CodecID_Video_Mpeg4 (InfoMap &Info);
-void MediaInfo_Config_CodecID_Video_Ogg (InfoMap &Info);
-void MediaInfo_Config_CodecID_Video_Real (InfoMap &Info);
-void MediaInfo_Config_CodecID_Video_Riff (InfoMap &Info);
-void MediaInfo_Config_CodecID_Audio_Matroska (InfoMap &Info);
-void MediaInfo_Config_CodecID_Audio_Mpeg4 (InfoMap &Info);
-void MediaInfo_Config_CodecID_Audio_Ogg (InfoMap &Info);
-void MediaInfo_Config_CodecID_Audio_Real (InfoMap &Info);
-void MediaInfo_Config_CodecID_Audio_Riff (InfoMap &Info);
-void MediaInfo_Config_CodecID_Text_Matroska (InfoMap &Info);
-void MediaInfo_Config_CodecID_Text_Mpeg4 (InfoMap &Info);
-void MediaInfo_Config_CodecID_Text_Riff (InfoMap &Info);
-void MediaInfo_Config_CodecID_Other_Mpeg4 (InfoMap &Info);
-void MediaInfo_Config_Codec (InfoMap &Info);
-void MediaInfo_Config_DefaultLanguage (Translation &Info);
-void MediaInfo_Config_Iso639_1 (InfoMap &Info);
-void MediaInfo_Config_Iso639_2 (InfoMap &Info);
-void MediaInfo_Config_General (ZtringListList &Info);
-void MediaInfo_Config_Video (ZtringListList &Info);
-void MediaInfo_Config_Audio (ZtringListList &Info);
-void MediaInfo_Config_Text (ZtringListList &Info);
-void MediaInfo_Config_Other (ZtringListList &Info);
-void MediaInfo_Config_Image (ZtringListList &Info);
-void MediaInfo_Config_Menu (ZtringListList &Info);
-void MediaInfo_Config_Summary (ZtringListList &Info);
-void MediaInfo_Config_Format (InfoMap &Info);
-void MediaInfo_Config_Library_DivX (InfoMap &Info);
-void MediaInfo_Config_Library_XviD (InfoMap &Info);
-void MediaInfo_Config_Library_MainConcept_Avc (InfoMap &Info);
-void MediaInfo_Config_Library_VorbisCom (InfoMap &Info);
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-void MediaInfo_Config::Init()
-{
- CS.Enter();
- //We use Init() instead of COnstructor because for some backends (like WxWidgets...) does NOT like constructor of static object with Unicode conversion
-
- //Test
- if (!LineSeparator.empty())
- {
- CS.Leave();
- return; //Already done
- }
-
- //Filling
- FormatDetection_MaximumOffset=0;
- #if MEDIAINFO_ADVANCED
- VariableGopDetection_Occurences=4;
- VariableGopDetection_GiveUp=false;
- InitDataNotRepeated_Occurences=(int64u)-1; //Disabled by default
- InitDataNotRepeated_GiveUp=false;
- #endif //MEDIAINFO_ADVANCED
- MpegTs_MaximumOffset=64*1024*1024;
- MpegTs_MaximumScanDuration=30000000000LL;
- MpegTs_ForceStreamDisplay=false;
- #if MEDIAINFO_ADVANCED
- MpegTs_VbrDetection_Delta=0;
- MpegTs_VbrDetection_Occurences=4;
- MpegTs_VbrDetection_GiveUp=false;
- #endif //MEDIAINFO_ADVANCED
- Complete=0;
- BlockMethod=0;
- Internet=0;
- MultipleValues=0;
- ParseUnknownExtensions=1;
- ShowFiles_Nothing=1;
- ShowFiles_VideoAudio=1;
- ShowFiles_VideoOnly=1;
- ShowFiles_AudioOnly=1;
- ShowFiles_TextOnly=1;
- ParseSpeed=(float32)0.5;
- Verbosity=(float32)0.5;
- Trace_Level=(float32)0.0;
- Trace_TimeSection_OnlyFirstOccurrence=false;
- Trace_Format=Trace_Format_Tree;
- Language_Raw=false;
- ReadByHuman=true;
- LegacyStreamDisplay=true;
- SkipBinaryData=false;
- Demux=0;
- LineSeparator=EOL;
- ColumnSeparator=__T(";");
- TagSeparator=__T(" / ");
- Quote=__T("\"");
- DecimalPoint=__T(".");
- ThousandsPoint=Ztring();
- #if MEDIAINFO_EVENTS
- Event_CallBackFunction=NULL;
- Event_UserHandler=NULL;
- #endif //MEDIAINFO_EVENTS
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ssh_IgnoreSecurity=false;
- Ssl_IgnoreSecurity=false;
- #endif //defined(MEDIAINFO_LIBCURL_YES)
-
- CS.Leave();
-
- ZtringListList ZLL1; Language_Set(ZLL1);
-}
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-Ztring MediaInfo_Config::Option (const String &Option, const String &Value_Raw)
-{
- CS.Enter();
- SubFile_Config(Option)=Value_Raw;
- CS.Leave();
-
- String Option_Lower(Option);
- size_t Egal_Pos=Option_Lower.find(__T('='));
- if (Egal_Pos==string::npos)
- Egal_Pos=Option_Lower.size();
- transform(Option_Lower.begin(), Option_Lower.begin()+Egal_Pos, Option_Lower.begin(), (int(*)(int))tolower); //(int(*)(int)) is a patch for unix
-
- //Parsing pointer to a file
- Ztring Value;
- if (Value_Raw.find(__T("file://"))==0)
- {
- //Open
- Ztring FileName(Value_Raw, 7, Ztring::npos);
- File F(FileName.c_str());
-
- //Read
- int64u Size=F.Size_Get();
- if (Size>=0xFFFFFFFF)
- Size=1024*1024;
- int8u* Buffer=new int8u[(size_t)Size+1];
- size_t Pos=F.Read(Buffer, (size_t)Size);
- F.Close();
- Buffer[Pos]='\0';
- Ztring FromFile; FromFile.From_UTF8((char*)Buffer);
- if (FromFile.empty())
- FromFile.From_Local((char*)Buffer);
- delete[] Buffer; //Buffer=NULL;
-
- //Merge
- Value=FromFile;
- }
- else
- Value=Value_Raw;
-
- if (Option_Lower.empty())
- {
- return Ztring();
- }
- else if (Option_Lower==__T("charset_config"))
- {
- return Ztring(); //Only used in DLL, no Library action
- }
- else if (Option_Lower==__T("charset_output"))
- {
- return Ztring(); //Only used in DLL, no Library action
- }
- else if (Option_Lower==__T("complete"))
- {
- Complete_Set(Value.To_int8u()?true:false);
- return Ztring();
- }
- else if (Option_Lower==__T("complete_get"))
- {
- if (Complete_Get())
- return __T("1");
- else
- return Ztring();
- }
- else if (Option_Lower==__T("blockmethod"))
- {
- if (Value.empty())
- BlockMethod_Set(0);
- else
- BlockMethod_Set(1);
- return Ztring();
- }
- else if (Option_Lower==__T("blockmethod_get"))
- {
- if (BlockMethod_Get())
- return __T("1");
- else
- return Ztring();
- }
- else if (Option_Lower==__T("internet"))
- {
- if (Value.empty())
- Internet_Set(0);
- else
- Internet_Set(1);
- return Ztring();
- }
- else if (Option_Lower==__T("internet_get"))
- {
- if (Internet_Get())
- return __T("1");
- else
- return Ztring();
- }
- else if (Option_Lower==__T("demux"))
- {
- String Value_Lower(Value);
- transform(Value_Lower.begin(), Value_Lower.end(), Value_Lower.begin(), (int(*)(int))tolower); //(int(*)(int)) is a patch for unix
-
- if (Value_Lower==__T("all"))
- Demux_Set(7);
- else if (Value_Lower==__T("frame"))
- Demux_Set(1);
- else if (Value_Lower==__T("container"))
- Demux_Set(2);
- else if (Value_Lower==__T("elementary"))
- Demux_Set(4);
- else
- Demux_Set(0);
- return Ztring();
- }
- else if (Option_Lower==__T("demux_get"))
- {
- switch (Demux_Get())
- {
- case 7 : return __T("All");
- case 1 : return __T("Frame");
- case 2 : return __T("Container");
- case 4 : return __T("Elementary");
- default: return Ztring();
- }
- }
- else if (Option_Lower==__T("multiplevalues"))
- {
- if (Value.empty())
- MultipleValues_Set(0);
- else
- MultipleValues_Set(1);
- return Ztring();
- }
- else if (Option_Lower==__T("multiplevalues_get"))
- {
- if (MultipleValues_Get())
- return __T("1");
- else
- return Ztring();
- }
- else if (Option_Lower==__T("parseunknownextensions"))
- {
- if (Value.empty())
- ParseUnknownExtensions_Set(0);
- else
- ParseUnknownExtensions_Set(1);
- return Ztring();
- }
- else if (Option_Lower==__T("parseunknownextensions_get"))
- {
- if (ParseUnknownExtensions_Get())
- return __T("1");
- else
- return Ztring();
- }
- else if (Option_Lower==__T("showfiles_set"))
- {
- ShowFiles_Set(Value.c_str());
- return Ztring();
- }
- else if (Option_Lower==__T("readbyhuman"))
- {
- ReadByHuman_Set(Value.To_int8u()?true:false);
- return Ztring();
- }
- else if (Option_Lower==__T("readbyhuman_get"))
- {
- return ReadByHuman_Get()?__T("1"):__T("0");
- }
- else if (Option_Lower==__T("legacystreamdisplay"))
- {
- LegacyStreamDisplay_Set(Value.To_int8u()?true:false);
- return Ztring();
- }
- else if (Option_Lower==__T("legacystreamdisplay_get"))
- {
- return LegacyStreamDisplay_Get()?__T("1"):__T("0");
- }
- else if (Option_Lower==__T("skipbinarydata"))
- {
- SkipBinaryData_Set(Value.To_int8u()?true:false);
- return Ztring();
- }
- else if (Option_Lower==__T("skipbinarydata_get"))
- {
- return SkipBinaryData_Get()?__T("1"):__T("0");
- }
- else if (Option_Lower==__T("parsespeed"))
- {
- ParseSpeed_Set(Value.To_float32());
- return Ztring();
- }
- else if (Option_Lower==__T("parsespeed_get"))
- {
- return Ztring::ToZtring(ParseSpeed_Get(), 3);
- }
- else if (Option_Lower==__T("verbosity"))
- {
- Verbosity_Set(Value.To_float32());
- return Ztring();
- }
- else if (Option_Lower==__T("verbosity_get"))
- {
- return Ztring::ToZtring(Verbosity_Get(), 3);
- }
- else if (Option_Lower==__T("lineseparator"))
- {
- LineSeparator_Set(Value);
- return Ztring();
- }
- else if (Option_Lower==__T("lineseparator_get"))
- {
- return LineSeparator_Get();
- }
- else if (Option_Lower==__T("version"))
- {
- Version_Set(Value);
- return Ztring();
- }
- else if (Option_Lower==__T("version_get"))
- {
- return Version_Get();
- }
- else if (Option_Lower==__T("columnseparator"))
- {
- ColumnSeparator_Set(Value);
- return Ztring();
- }
- else if (Option_Lower==__T("columnseparator_get"))
- {
- return ColumnSeparator_Get();
- }
- else if (Option_Lower==__T("tagseparator"))
- {
- TagSeparator_Set(Value);
- return Ztring();
- }
- else if (Option_Lower==__T("tagseparator_get"))
- {
- return TagSeparator_Get();
- }
- else if (Option_Lower==__T("quote"))
- {
- Quote_Set(Value);
- return Ztring();
- }
- else if (Option_Lower==__T("quote_get"))
- {
- return Quote_Get();
- }
- else if (Option_Lower==__T("decimalpoint"))
- {
- DecimalPoint_Set(Value);
- return Ztring();
- }
- else if (Option_Lower==__T("decimalpoint_get"))
- {
- return DecimalPoint_Get();
- }
- else if (Option_Lower==__T("thousandspoint"))
- {
- ThousandsPoint_Set(Value);
- return Ztring();
- }
- else if (Option_Lower==__T("thousandspoint_get"))
- {
- return ThousandsPoint_Get();
- }
- else if (Option_Lower==__T("streammax"))
- {
- ZtringListList StreamMax=Value.c_str();
- StreamMax_Set(StreamMax);
- return Ztring();
- }
- else if (Option_Lower==__T("streammax_get"))
- {
- return StreamMax_Get();
- }
- else if (Option_Lower==__T("language"))
- {
- ZtringListList Language=Value.c_str();
- Language_Set(Language);
- return Ztring();
- }
- else if (Option_Lower==__T("language_get"))
- {
- return Language_Get();
- }
- else if (Option_Lower==__T("inform"))
- {
- Inform_Set(Value.c_str());
- return Ztring();
- }
- else if (Option_Lower==__T("output"))
- {
- Inform_Set(Value.c_str());
- return Ztring();
- }
- else if (Option_Lower==__T("inform_get"))
- {
- return Inform_Get();
- }
- else if (Option_Lower==__T("output_get"))
- {
- return Inform_Get();
- }
- else if (Option_Lower==__T("inform_replace"))
- {
- Inform_Replace_Set(Value.c_str());
- return Ztring();
- }
- else if (Option_Lower==__T("inform_replace_get"))
- {
- return Inform_Get();
- }
- else if (Option_Lower==__T("details")) //Legacy for trace_level
- {
- return MediaInfo_Config::Option(__T("Trace_Level"), Value);
- }
- else if (Option_Lower==__T("details_get")) //Legacy for trace_level
- {
- return MediaInfo_Config::Option(__T("Trace_Level_Get"), Value);
- }
- else if (Option_Lower==__T("detailslevel")) //Legacy for trace_level
- {
- return MediaInfo_Config::Option(__T("Trace_Level"), Value);
- }
- else if (Option_Lower==__T("detailslevel_get")) //Legacy for trace_level
- {
- return MediaInfo_Config::Option(__T("Trace_Level_Get"), Value);
- }
- else if (Option_Lower==__T("trace_level"))
- {
- Trace_Level_Set(Value);
- return Ztring();
- }
- else if (Option_Lower==__T("trace_level_get"))
- {
- return Ztring::ToZtring(Trace_Level_Get());
- }
- else if (Option_Lower==__T("trace_timesection_onlyfirstoccurrence"))
- {
- Trace_TimeSection_OnlyFirstOccurrence_Set(Value.To_int64u()?true:false);
- return Ztring();
- }
- else if (Option_Lower==__T("trace_timesection_onlyfirstoccurrence_get"))
- {
- return Trace_TimeSection_OnlyFirstOccurrence_Get()?__T("1"):__T("0");
- }
- else if (Option_Lower==__T("detailsformat")) //Legacy for trace_format
- {
- return MediaInfo_Config::Option(__T("Trace_Format"), Value);
- }
- else if (Option_Lower==__T("detailsformat_get")) //Legacy for trace_format
- {
- return MediaInfo_Config::Option(__T("Trace_Format_Get"), Value);
- }
- else if (Option_Lower==__T("trace_format"))
- {
- String NewValue_Lower(Value);
- transform(NewValue_Lower.begin(), NewValue_Lower.end(), NewValue_Lower.begin(), (int(*)(int))tolower); //(int(*)(int)) is a patch for unix
-
- CriticalSectionLocker CSL(CS);
- if (NewValue_Lower==__T("csv"))
- Trace_Format_Set(Trace_Format_CSV);
- else
- Trace_Format_Set(Trace_Format_Tree);
- return Ztring();
- }
- else if (Option_Lower==__T("trace_format_get"))
- {
- switch (Trace_Format_Get())
- {
- case Trace_Format_CSV : return __T("CSV");
- default : return __T("Tree");
- }
- }
- else if (Option_Lower==__T("detailsmodificator"))
- {
- Trace_Modificator_Set(Value);
- return Ztring();
- }
- else if (Option_Lower==__T("detailsmodificator_get"))
- {
- return Trace_Modificator_Get(Value);
- }
- else if (Option_Lower==__T("info_parameters"))
- {
- ZtringListList ToReturn=Info_Parameters_Get();
-
- //Adapt first column
- for (size_t Pos=0; Pos<ToReturn.size(); Pos++)
- {
- Ztring &C1=ToReturn(Pos, 0);
- if (!ToReturn(Pos, 1).empty())
- {
- C1.resize(25, ' ');
- ToReturn(Pos, 0)=C1 + __T(" :");
- }
- }
-
- ToReturn.Separator_Set(0, LineSeparator_Get());
- ToReturn.Separator_Set(1, __T(" "));
- ToReturn.Quote_Set(Ztring());
- return ToReturn.Read();
- }
- else if (Option_Lower==__T("info_parameters_csv"))
- {
- return Info_Parameters_Get(Value==__T("Complete"));
- }
- else if (Option_Lower==__T("info_codecs"))
- {
- return Info_Codecs_Get();
- }
- else if (Option_Lower==__T("info_version"))
- {
- return Info_Version_Get();
- }
- else if (Option_Lower==__T("info_url"))
- {
- return Info_Url_Get();
- }
- else if (Option_Lower==__T("formatdetection_maximumoffset"))
- {
- FormatDetection_MaximumOffset_Set(Value==__T("-1")?(int64u)-1:((Ztring*)&Value)->To_int64u());
- return Ztring();
- }
- else if (Option_Lower==__T("formatdetection_maximumoffset_get"))
- {
- return FormatDetection_MaximumOffset_Get()==(int64u)-1?Ztring(__T("-1")):Ztring::ToZtring(FormatDetection_MaximumOffset_Get());
- }
- else if (Option_Lower==__T("variablegopdetection_occurences"))
- {
- #if MEDIAINFO_ADVANCED
- VariableGopDetection_Occurences_Set(Value.To_int64u());
- return Ztring();
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("variablegopdetection_occurences_get"))
- {
- #if MEDIAINFO_ADVANCED
- return Ztring::ToZtring(VariableGopDetection_Occurences_Get());
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("variablegopdetection_giveup"))
- {
- #if MEDIAINFO_ADVANCED
- VariableGopDetection_GiveUp_Set(Value.To_int8u()?true:false);
- return Ztring();
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("variablegopdetection_giveup_get"))
- {
- #if MEDIAINFO_ADVANCED
- return VariableGopDetection_GiveUp_Get()?__T("1"):__T("0");
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("initdatanotrepeated_occurences"))
- {
- #if MEDIAINFO_ADVANCED
- InitDataNotRepeated_Occurences_Set(Value.To_int64u());
- return Ztring();
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("initdatanotrepeated_occurences_get"))
- {
- #if MEDIAINFO_ADVANCED
- return Ztring::ToZtring(InitDataNotRepeated_Occurences_Get());
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("initdatanotrepeated_giveup"))
- {
- #if MEDIAINFO_ADVANCED
- InitDataNotRepeated_GiveUp_Set(Value.To_int8u()?true:false);
- return Ztring();
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("initdatanotrepeated_giveup_get"))
- {
- #if MEDIAINFO_ADVANCED
- return InitDataNotRepeated_GiveUp_Get()?__T("1"):__T("0");
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("mpegts_maximumoffset"))
- {
- MpegTs_MaximumOffset_Set(Value==__T("-1")?(int64u)-1:((Ztring*)&Value)->To_int64u());
- return Ztring();
- }
- else if (Option_Lower==__T("mpegts_maximumoffset_get"))
- {
- return MpegTs_MaximumOffset_Get()==(int64u)-1?Ztring(__T("-1")):Ztring::ToZtring(MpegTs_MaximumOffset_Get());
- }
- else if (Option_Lower==__T("mpegts_vbrdetection_delta"))
- {
- #if MEDIAINFO_ADVANCED
- MpegTs_VbrDetection_Delta_Set(Value.To_float64());
- return Ztring();
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("mpegts_vbrdetection_delta_get"))
- {
- #if MEDIAINFO_ADVANCED
- return Ztring::ToZtring(MpegTs_VbrDetection_Delta_Get(), 9);
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("mpegts_vbrdetection_occurences"))
- {
- #if MEDIAINFO_ADVANCED
- MpegTs_VbrDetection_Occurences_Set(Value.To_int64u());
- return Ztring();
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("mpegts_vbrdetection_occurences_get"))
- {
- #if MEDIAINFO_ADVANCED
- return Ztring::ToZtring(MpegTs_VbrDetection_Occurences_Get());
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("mpegts_vbrdetection_giveup"))
- {
- #if MEDIAINFO_ADVANCED
- MpegTs_VbrDetection_GiveUp_Set(Value.To_int8u()?true:false);
- return Ztring();
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("mpegts_vbrdetection_giveup_get"))
- {
- #if MEDIAINFO_ADVANCED
- return MpegTs_VbrDetection_GiveUp_Get()?__T("1"):__T("0");
- #else // MEDIAINFO_ADVANCED
- return __T("advanced features are disabled due to compilation options");
- #endif // MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("mpegts_maximumscanduration"))
- {
- MpegTs_MaximumScanDuration_Set(float64_int64s((((Ztring*)&Value)->To_float64())*1000000000));
- return Ztring();
- }
- else if (Option_Lower==__T("mpegts_maximumscanduration_get"))
- {
- return MpegTs_MaximumScanDuration_Get()==(int64u)-1?Ztring(__T("-1")):Ztring::ToZtring(MpegTs_MaximumOffset_Get());
- }
- else if (Option_Lower==__T("mpegts_forcestreamdisplay"))
- {
- MpegTs_ForceStreamDisplay_Set(Value.To_int8u()?true:false);
- return Ztring();
- }
- else if (Option_Lower==__T("mpegts_forcestreamdisplay_get"))
- {
- return MpegTs_ForceStreamDisplay_Get()?__T("1"):__T("0");
- }
- else if (Option_Lower==__T("custommapping"))
- {
- CustomMapping_Set(Value);
- return Ztring();
- }
- else if (Option_Lower==__T("event_callbackfunction"))
- {
- #if MEDIAINFO_EVENTS
- return Event_CallBackFunction_Set(Value);
- #else //MEDIAINFO_EVENTS
- return __T("Event manager is disabled due to compilation options");
- #endif //MEDIAINFO_EVENTS
- }
- else if (Option_Lower==__T("ssh_knownhostsfilename"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ssh_KnownHostsFileName_Set(Value);
- return Ztring();
- #else // defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif // defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower==__T("ssh_publickeyfilename"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ssh_PublicKeyFileName_Set(Value);
- return Ztring();
- #else // defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif // defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower==__T("ssh_privatekeyfilename"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ssh_PrivateKeyFileName_Set(Value);
- return Ztring();
- #else // defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif // defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower==__T("ssh_ignoresecurity"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ssh_IgnoreSecurity_Set(Value.empty() || Value.To_float32());
- return Ztring();
- #else // defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif // defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower==__T("ssl_certificatefilename"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ssl_CertificateFileName_Set(Value);
- return Ztring();
- #else // defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif // defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower==__T("ssl_certificateFormat"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ssl_CertificateFormat_Set(Value);
- return Ztring();
- #else // defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif // defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower==__T("ssl_privatekeyfilename"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ssl_PrivateKeyFileName_Set(Value);
- return Ztring();
- #else // defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif // defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower==__T("ssl_privatekeyformat"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ssl_PrivateKeyFormat_Set(Value);
- return Ztring();
- #else // defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif // defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower==__T("ssl_certificateauthorityfilename"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ssl_CertificateAuthorityFileName_Set(Value);
- return Ztring();
- #else // defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif // defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower==__T("ssl_certificateauthoritypath"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ssl_CertificateAuthorityPath_Set(Value);
- return Ztring();
- #else // defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif // defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower==__T("ssl_certificaterevocationlistfilename"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ssl_CertificateRevocationListFileName_Set(Value);
- return Ztring();
- #else // defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif // defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower==__T("ssl_ignoresecurity"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ssl_IgnoreSecurity_Set(Value.empty() || Value.To_float32());
- return Ztring();
- #else // defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif // defined(MEDIAINFO_LIBCURL_YES)
- }
- else
- return __T("Option not known");
-}
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::Complete_Set (size_t NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Complete=NewValue;
-}
-
-size_t MediaInfo_Config::Complete_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Complete;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::BlockMethod_Set (size_t NewValue)
-{
- CriticalSectionLocker CSL(CS);
- BlockMethod=NewValue;
-}
-
-size_t MediaInfo_Config::BlockMethod_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return BlockMethod;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::Internet_Set (size_t NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Internet=NewValue;
-}
-
-size_t MediaInfo_Config::Internet_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Internet;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::MultipleValues_Set (size_t NewValue)
-{
- CriticalSectionLocker CSL(CS);
- MultipleValues=NewValue;
-}
-
-size_t MediaInfo_Config::MultipleValues_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return MultipleValues;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::ParseUnknownExtensions_Set (size_t NewValue)
-{
- CriticalSectionLocker CSL(CS);
- ParseUnknownExtensions=NewValue;
-}
-
-size_t MediaInfo_Config::ParseUnknownExtensions_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return ParseUnknownExtensions;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::ShowFiles_Set (const ZtringListList &NewShowFiles)
-{
- CriticalSectionLocker CSL(CS);
- for (size_t Pos=0; Pos<NewShowFiles.size(); Pos++)
- {
- const Ztring& Object=NewShowFiles.Read(Pos, 0);
- if (Object==__T("Nothing"))
- ShowFiles_Nothing=NewShowFiles.Read(Pos, 1).empty()?1:0;
- else if (Object==__T("VideoAudio"))
- ShowFiles_VideoAudio=NewShowFiles.Read(Pos, 1).empty()?1:0;
- else if (Object==__T("VideoOnly"))
- ShowFiles_VideoOnly=NewShowFiles.Read(Pos, 1).empty()?1:0;
- else if (Object==__T("AudioOnly"))
- ShowFiles_AudioOnly=NewShowFiles.Read(Pos, 1).empty()?1:0;
- else if (Object==__T("TextOnly"))
- ShowFiles_TextOnly=NewShowFiles.Read(Pos, 1).empty()?1:0;
- }
-}
-
-size_t MediaInfo_Config::ShowFiles_Nothing_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return ShowFiles_Nothing;
-}
-
-size_t MediaInfo_Config::ShowFiles_VideoAudio_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return ShowFiles_VideoAudio;
-}
-
-size_t MediaInfo_Config::ShowFiles_VideoOnly_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return ShowFiles_VideoOnly;
-}
-
-size_t MediaInfo_Config::ShowFiles_AudioOnly_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return ShowFiles_AudioOnly;
-}
-
-size_t MediaInfo_Config::ShowFiles_TextOnly_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return ShowFiles_TextOnly;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::ParseSpeed_Set (float32 NewValue)
-{
- CriticalSectionLocker CSL(CS);
- ParseSpeed=NewValue;
-}
-
-float32 MediaInfo_Config::ParseSpeed_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return ParseSpeed;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::Verbosity_Set (float32 NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Verbosity=NewValue;
-}
-
-float32 MediaInfo_Config::Verbosity_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Verbosity;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::ReadByHuman_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- ReadByHuman=NewValue;
-}
-
-bool MediaInfo_Config::ReadByHuman_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return ReadByHuman;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::LegacyStreamDisplay_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- LegacyStreamDisplay=NewValue;
-}
-
-bool MediaInfo_Config::LegacyStreamDisplay_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return LegacyStreamDisplay;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::SkipBinaryData_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- SkipBinaryData=NewValue;
-}
-
-bool MediaInfo_Config::SkipBinaryData_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return SkipBinaryData;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::Trace_Level_Set (const ZtringListList &NewTrace_Level)
-{
- CriticalSectionLocker CSL(CS);
-
- //Global
- if (NewTrace_Level.size()==1 && NewTrace_Level[0].size()==1)
- {
- Trace_Level=NewTrace_Level[0][0].To_float32();
- if (Trace_Layers.to_ulong()==0) //if not set to a specific layer
- Trace_Layers.set();
- return;
- }
-
- //Per item
- else
- {
- Trace_Layers.reset();
- for (size_t Pos=0; Pos<NewTrace_Level.size(); Pos++)
- {
- if (NewTrace_Level[Pos].size()==2)
- {
- if (NewTrace_Level[Pos][0]==__T("Container1"))
- Trace_Layers.set(0, NewTrace_Level[Pos][1].To_int64u()?true:false);
- }
- }
- }
-}
-
-float32 MediaInfo_Config::Trace_Level_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Trace_Level;
-}
-
-std::bitset<32> MediaInfo_Config::Trace_Layers_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Trace_Layers;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::Trace_TimeSection_OnlyFirstOccurrence_Set (bool Value)
-{
- CriticalSectionLocker CSL(CS);
- Trace_TimeSection_OnlyFirstOccurrence=Value;
-}
-
-bool MediaInfo_Config::Trace_TimeSection_OnlyFirstOccurrence_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Trace_TimeSection_OnlyFirstOccurrence;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::Trace_Format_Set (trace_Format NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Trace_Format=NewValue;
-}
-
-MediaInfo_Config::trace_Format MediaInfo_Config::Trace_Format_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Trace_Format;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::Trace_Modificator_Set (const ZtringList &NewValue)
-{
- ZtringList List(NewValue);
- if (List.size()!=2)
- return;
- transform(List[0].begin(), List[0].end(), List[0].begin(), (int(*)(int))tolower); //(int(*)(int)) is a patch for unix
-
- CriticalSectionLocker CSL(CS);
- Trace_Modificators[List[0]]=List[1]==__T("1");
-}
-
-Ztring MediaInfo_Config::Trace_Modificator_Get (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
- std::map<Ztring, bool>::iterator ToReturn=Trace_Modificators.find(Value);
- if (ToReturn!=Trace_Modificators.end())
- return ToReturn->second?__T("1"):__T("0");
- else
- return Ztring();
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::Demux_Set (int8u NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Demux=NewValue;
-}
-
-int8u MediaInfo_Config::Demux_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Demux;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::LineSeparator_Set (const Ztring &NewValue)
-{
- CriticalSectionLocker CSL(CS);
- LineSeparator=NewValue;
-}
-
-Ztring MediaInfo_Config::LineSeparator_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return LineSeparator;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::Version_Set (const Ztring &NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Version=ZtringListList(NewValue).Read(0); //Only the 1st value
-}
-
-Ztring MediaInfo_Config::Version_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Version;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::ColumnSeparator_Set (const Ztring &NewValue)
-{
- CriticalSectionLocker CSL(CS);
- ColumnSeparator=NewValue;
-}
-
-Ztring MediaInfo_Config::ColumnSeparator_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return ColumnSeparator;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::TagSeparator_Set (const Ztring &NewValue)
-{
- CriticalSectionLocker CSL(CS);
- TagSeparator=NewValue;
-}
-
-Ztring MediaInfo_Config::TagSeparator_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return TagSeparator;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::Quote_Set (const Ztring &NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Quote=NewValue;
-}
-
-Ztring MediaInfo_Config::Quote_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Quote;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::DecimalPoint_Set (const Ztring &NewValue)
-{
- CriticalSectionLocker CSL(CS);
- DecimalPoint=NewValue;
-}
-
-Ztring MediaInfo_Config::DecimalPoint_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return DecimalPoint;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::ThousandsPoint_Set (const Ztring &NewValue)
-{
- CriticalSectionLocker CSL(CS);
- ThousandsPoint=NewValue;
-}
-
-Ztring MediaInfo_Config::ThousandsPoint_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return ThousandsPoint;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::StreamMax_Set (const ZtringListList &)
-{
- CriticalSectionLocker CSL(CS);
- //TODO : implementation
-}
-
-Ztring MediaInfo_Config::StreamMax_Get ()
-{
- CriticalSectionLocker CSL(CS);
- ZtringListList StreamMax;
- //TODO : implementation
- return StreamMax.Read();
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::Language_Set (const ZtringListList &NewValue)
-{
- CriticalSectionLocker CSL(CS);
-
- //Which language to choose?
- //-Raw
- if (NewValue.size()==1 && NewValue[0].size()==1 && NewValue[0][0]==__T("raw"))
- {
- Language_Raw=true;
- Language.clear();
- //Exceptions
- Language.Write(__T(" Config_Text_ColumnSize"), __T("32"));
- Language.Write(__T(" Config_Text_Separator"), __T(" : "));
- Language.Write(__T(" Config_Text_NumberTag"), __T(" #"));
- Language.Write(__T(" Config_Text_FloatSeparator"), __T("."));
- Language.Write(__T(" Config_Text_ThousandsSeparator"), Ztring());
- }
- //-Add custom language to English language
- else
- {
- Language_Raw=false;
- //Fill base words (with English translation)
- MediaInfo_Config_DefaultLanguage(Language);
- //Add custom language to English language
- for (size_t Pos=0; Pos<NewValue.size(); Pos++)
- if (NewValue[Pos].size()>=2)
- Language.Write(NewValue[Pos][0], NewValue[Pos][1]);
- else if (NewValue[Pos].size()==1)
- Language.Write(NewValue[Pos][0], Ztring());
- }
-
- //Fill Info
- for (size_t StreamKind=0; StreamKind<Stream_Max; StreamKind++)
- if (!Info[StreamKind].empty())
- Language_Set((stream_t)StreamKind);
-}
-
-void MediaInfo_Config::Language_Set (stream_t StreamKind)
-{
- //CriticalSectionLocker CSL(CS); //No, only used internaly
-
- //Fill Info
- for (size_t Pos=0; Pos<Info[StreamKind].size(); Pos++)
- {
- //Strings - Info_Name_Text
- Ztring ToReplace=Info[StreamKind](Pos, Info_Name);
- if (!Language_Raw && ToReplace.find(__T("/String"))!=Error)
- {
- ToReplace.FindAndReplace(__T("/String1"), Ztring());
- ToReplace.FindAndReplace(__T("/String2"), Ztring());
- ToReplace.FindAndReplace(__T("/String3"), Ztring());
- ToReplace.FindAndReplace(__T("/String4"), Ztring());
- ToReplace.FindAndReplace(__T("/String5"), Ztring());
- ToReplace.FindAndReplace(__T("/String6"), Ztring());
- ToReplace.FindAndReplace(__T("/String7"), Ztring());
- ToReplace.FindAndReplace(__T("/String8"), Ztring());
- ToReplace.FindAndReplace(__T("/String9"), Ztring());
- ToReplace.FindAndReplace(__T("/String"), Ztring());
- }
- if (!Language_Raw && ToReplace.find(__T("/"))!=Error) //Complex values, like XXX/YYY --> We translate both XXX and YYY
- {
- Ztring ToReplace1=ToReplace.SubString(Ztring(), __T("/"));
- Ztring ToReplace2=ToReplace.SubString(__T("/"), Ztring());
- Info[StreamKind](Pos, Info_Name_Text)=Language.Get(ToReplace1);
- Info[StreamKind](Pos, Info_Name_Text)+=__T("/");
- Info[StreamKind](Pos, Info_Name_Text)+=Language.Get(ToReplace2);
- }
- else
- Info[StreamKind](Pos, Info_Name_Text)=Language.Get(ToReplace);
- //Strings - Info_Measure_Text
- Info[StreamKind](Pos, Info_Measure_Text).clear(); //I don(t know why, but if I don't do this Delphi/C# debugger make crashing the calling program
- Info[StreamKind](Pos, Info_Measure_Text)=Language.Get(Info[StreamKind](Pos, Info_Measure));
- //Slashes
-
- }
-}
-
-Ztring MediaInfo_Config::Language_Get ()
-{
- CriticalSectionLocker CSL(CS);
- Ztring ToReturn;//TODO =Language.Read();
- return ToReturn;
-}
-
-Ztring MediaInfo_Config::Language_Get (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
-
- if (Value.find(__T(" / "))==string::npos)
- return Language.Get(Value);
-
- ZtringList List;
- List.Separator_Set(0, __T(" / "));
- List.Write(Value);
-
- //Per value
- for (size_t Pos=0; Pos<List.size(); Pos++)
- List[Pos]=Language.Get(List[Pos]);
-
- return List.Read();
-}
-
-//---------------------------------------------------------------------------
-Ztring MediaInfo_Config::Language_Get (const Ztring &Count, const Ztring &Value, bool ValueIsAlwaysSame)
-{
- //Integrity
- if (Count.empty())
- return EmptyString_Get();
-
- //Different Plurals are available or not?
- if (Language_Get(Value+__T("1")).empty())
- {
- //if (Count==__T("0") || Count==__T("1"))
- return Count+Language_Get(Value);
- //else
- //return Count+Language_Get(Value+__T("s"));
- }
-
- //Detecting plural form for multiple plurals
- int8u Form=(int8u)-1;
-
- if (!ValueIsAlwaysSame)
- {
- //Polish has 2 plurial, Algorithm of Polish
- size_t CountI=Count.To_int32u();
- size_t Pos3=CountI/100;
- int8u Pos2=(int8u)((CountI-Pos3*100)/10);
- int8u Pos1=(int8u)(CountI-Pos3*100-Pos2*10);
- if (Pos3==0)
- {
- if (Pos2==0)
- {
- if (Pos1==0 && Count.size()==1) //Only "0", not "0.xxx"
- Form=0; //000 to 000 kanal?
- else if (Pos1<=1)
- Form=1; //001 to 001 kanal
- else if (Pos1<=4)
- Form=2; //002 to 004 kanaly
- else //if (Pos1>=5)
- Form=3; //005 to 009 kanalow
- }
- else if (Pos2==1)
- Form=3; //010 to 019 kanalow
- else //if (Pos2>=2)
- {
- if (Pos1<=1)
- Form=3; //020 to 021, 090 to 091 kanalow
- else if (Pos1<=4)
- Form=2; //022 to 024, 092 to 094 kanali
- else //if (Pos1>=5)
- Form=3; //025 to 029, 095 to 099 kanalow
- }
- }
- else //if (Pos3>=1)
- {
- if (Pos2==0)
- {
- if (Pos1<=1)
- Form=3; //100 to 101 kanalow
- else if (Pos1<=4)
- Form=2; //102 to 104 kanaly
- else //if (Pos1>=5)
- Form=3; //105 to 109 kanalow
- }
- else if (Pos2==1)
- Form=3; //110 to 119 kanalow
- else //if (Pos2>=2)
- {
- if (Pos1<=1)
- Form=3; //120 to 121, 990 to 991 kanalow
- else if (Pos1<=4)
- Form=2; //122 to 124, 992 to 994 kanali
- else //if (Pos1>=5)
- Form=3; //125 to 129, 995 to 999 kanalow
- }
- }
- }
-
- //Replace dot and thousand separator
- Ztring ToReturn=Count;
- Ztring DecimalPoint=Ztring().From_Number(0.0, 1).substr(1, 1); //Getting Decimal point
- size_t DotPos=ToReturn.find(DecimalPoint);
- if (DotPos!=string::npos)
- ToReturn.FindAndReplace(DecimalPoint, Language_Get(__T(" Config_Text_FloatSeparator")), DotPos);
- else
- DotPos=ToReturn.size();
- if (DotPos>3)
- ToReturn.insert(DotPos-3, Language_Get(__T(" Config_Text_ThousandsSeparator")));
-
- //Selecting the form
- if (Form==0)
- ToReturn =Language_Get(Value+__T("0")); //Only the translation
- else if (Form==1)
- ToReturn+=Language_Get(Value+__T("1"));
- else if (Form==2)
- ToReturn+=Language_Get(Value+__T("2"));
- else if (Form==3)
- ToReturn+=Language_Get(Value+__T("3"));
- else
- ToReturn+=Language_Get(Value);
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::Inform_Set (const ZtringListList &NewValue)
-{
- if (NewValue.Read(0, 0)==__T("Details"))
- Trace_Level_Set(NewValue.Read(0, 1));
- else
- {
- Trace_Level_Set(__T("0"));
-
- CriticalSectionLocker CSL(CS);
-
- //Inform
- if (NewValue==__T("Summary"))
- MediaInfo_Config_Summary(Custom_View);
- else
- Custom_View=NewValue;
- }
-
- CriticalSectionLocker CSL(CS);
-
- //Parsing pointers to files in streams
- for (size_t Pos=0; Pos<Custom_View.size(); Pos++)
- {
- if (Custom_View[Pos].size()>1 && Custom_View(Pos, 1).find(__T("file://"))==0)
- {
- //Open
- Ztring FileName(Custom_View(Pos, 1), 7, Ztring::npos);
- File F(FileName.c_str());
-
- //Read
- int64u Size=F.Size_Get();
- if (Size>=0xFFFFFFFF)
- Size=1024*1024;
- int8u* Buffer=new int8u[(size_t)Size+1];
- size_t F_Offset=F.Read(Buffer, (size_t)Size);
- F.Close();
- Buffer[F_Offset]='\0';
- Ztring FromFile; FromFile.From_Local((char*)Buffer);
- delete[] Buffer; //Buffer=NULL;
-
- //Merge
- FromFile.FindAndReplace(__T("\r\n"), __T("\\r\\n"), 0, Ztring_Recursive);
- FromFile.FindAndReplace(__T("\n"), __T("\\r\\n"), 0, Ztring_Recursive);
- Custom_View(Pos, 1)=FromFile;
- }
- }
-}
-
-Ztring MediaInfo_Config::Inform_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Custom_View.Read();
-}
-
-Ztring MediaInfo_Config::Inform_Get (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
- size_t Pos=Custom_View.Find(Value);
- if (Pos==Error || 1>=Custom_View[Pos].size())
- return EmptyString_Get();
- return Custom_View[Pos][1];
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config::Inform_Replace_Set (const ZtringListList &NewValue_Replace)
-{
- CriticalSectionLocker CSL(CS);
-
- //Parsing
- for (size_t Pos=0; Pos<NewValue_Replace.size(); Pos++)
- {
- if (NewValue_Replace[Pos].size()==2)
- Custom_View_Replace(NewValue_Replace[Pos][0])=NewValue_Replace[Pos][1];
- }
-}
-
-ZtringListList MediaInfo_Config::Inform_Replace_Get_All ()
-{
- CriticalSectionLocker CSL(CS);
- return Custom_View_Replace;
-}
-
-//---------------------------------------------------------------------------
-const Ztring &MediaInfo_Config::Format_Get (const Ztring &Value, infoformat_t KindOfFormatInfo)
-{
- //Loading codec table if not yet done
- CS.Enter();
- if (Format.empty())
- MediaInfo_Config_Format(Format);
- CS.Leave();
-
- return Format.Get(Value, KindOfFormatInfo);
-}
-
-//---------------------------------------------------------------------------
-InfoMap &MediaInfo_Config::Format_Get ()
-{
- //Loading codec table if not yet done
- CS.Enter();
- if (Format.empty())
- MediaInfo_Config_Format(Format);
- CS.Leave();
-
- return Format;
-}
-
-//---------------------------------------------------------------------------
-const Ztring &MediaInfo_Config::Codec_Get (const Ztring &Value, infocodec_t KindOfCodecInfo)
-{
- //Loading codec table if not yet done
- CS.Enter();
- if (Codec.empty())
- MediaInfo_Config_Codec(Codec);
- CS.Leave();
-
- return Codec.Get(Value, KindOfCodecInfo);
-}
-
-//---------------------------------------------------------------------------
-const Ztring &MediaInfo_Config::Codec_Get (const Ztring &Value, infocodec_t KindOfCodecInfo, stream_t KindOfStream)
-{
- //Loading codec table if not yet done
- CS.Enter();
- if (Codec.empty())
- MediaInfo_Config_Codec(Codec);
- CS.Leave();
-
- //Transform to text
- Ztring KindOfStreamS;
- switch (KindOfStream)
- {
- case Stream_General : KindOfStreamS=__T("G"); break;
- case Stream_Video : KindOfStreamS=__T("V"); break;
- case Stream_Audio : KindOfStreamS=__T("A"); break;
- case Stream_Text : KindOfStreamS=__T("T"); break;
- case Stream_Image : KindOfStreamS=__T("I"); break;
- case Stream_Other : KindOfStreamS=__T("C"); break;
- case Stream_Menu : KindOfStreamS=__T("M"); break;
- case Stream_Max : KindOfStreamS=__T(" "); break;
- }
-
- return Codec.Get(Value, KindOfCodecInfo, KindOfStreamS, InfoCodec_KindOfStream);
-}
-
-//---------------------------------------------------------------------------
-const Ztring &MediaInfo_Config::CodecID_Get (stream_t KindOfStream, infocodecid_format_t Format, const Ztring &Value, infocodecid_t KindOfCodecIDInfo)
-{
- if (Format>=InfoCodecID_Format_Max || KindOfStream>=Stream_Max)
- return EmptyString_Get();
-
- CS.Enter();
- if (CodecID[Format][KindOfStream].empty())
- {
- switch (KindOfStream)
- {
- case Stream_General :
- switch (Format)
- {
- case InfoCodecID_Format_Mpeg4 : MediaInfo_Config_CodecID_General_Mpeg4(CodecID[Format][KindOfStream]); break;
- default: ;
- }
- break;
- case Stream_Video :
- switch (Format)
- {
- case InfoCodecID_Format_Matroska : MediaInfo_Config_CodecID_Video_Matroska(CodecID[Format][KindOfStream]); break;
- case InfoCodecID_Format_Mpeg4 : MediaInfo_Config_CodecID_Video_Mpeg4(CodecID[Format][KindOfStream]); break;
- case InfoCodecID_Format_Real : MediaInfo_Config_CodecID_Video_Real(CodecID[Format][KindOfStream]); break;
- case InfoCodecID_Format_Riff : MediaInfo_Config_CodecID_Video_Riff(CodecID[Format][KindOfStream]); break;
- default: ;
- }
- break;
- case Stream_Audio :
- switch (Format)
- {
- case InfoCodecID_Format_Matroska : MediaInfo_Config_CodecID_Audio_Matroska(CodecID[Format][KindOfStream]); break;
- case InfoCodecID_Format_Mpeg4 : MediaInfo_Config_CodecID_Audio_Mpeg4(CodecID[Format][KindOfStream]); break;
- case InfoCodecID_Format_Real : MediaInfo_Config_CodecID_Audio_Real(CodecID[Format][KindOfStream]); break;
- case InfoCodecID_Format_Riff : MediaInfo_Config_CodecID_Audio_Riff(CodecID[Format][KindOfStream]); break;
- default: ;
- }
- break;
- case Stream_Text :
- switch (Format)
- {
- case InfoCodecID_Format_Matroska : MediaInfo_Config_CodecID_Text_Matroska(CodecID[Format][KindOfStream]); break;
- case InfoCodecID_Format_Mpeg4 : MediaInfo_Config_CodecID_Text_Mpeg4(CodecID[Format][KindOfStream]); break;
- case InfoCodecID_Format_Riff : MediaInfo_Config_CodecID_Text_Riff(CodecID[Format][KindOfStream]); break;
- default: ;
- }
- break;
- case Stream_Other :
- switch (Format)
- {
- case InfoCodecID_Format_Mpeg4 : MediaInfo_Config_CodecID_Other_Mpeg4(CodecID[Format][KindOfStream]); break;
- default: ;
- }
- break;
- default: ;
- }
- }
- CS.Leave();
- return CodecID[Format][KindOfStream].Get(Value, KindOfCodecIDInfo);
-}
-
-//---------------------------------------------------------------------------
-const Ztring &MediaInfo_Config::Library_Get (infolibrary_format_t Format, const Ztring &Value, infolibrary_t KindOfLibraryInfo)
-{
- if (Format>=InfoLibrary_Format_Max)
- return EmptyString_Get();
-
- CS.Enter();
- if (Library[Format].empty())
- {
- switch (Format)
- {
- case InfoLibrary_Format_DivX : MediaInfo_Config_Library_DivX(Library[Format]); break;
- case InfoLibrary_Format_XviD : MediaInfo_Config_Library_XviD(Library[Format]); break;
- case InfoLibrary_Format_MainConcept_Avc : MediaInfo_Config_Library_MainConcept_Avc(Library[Format]); break;
- case InfoLibrary_Format_VorbisCom : MediaInfo_Config_Library_VorbisCom(Library[Format]); break;
- default: ;
- }
- }
- CS.Leave();
- return Library[Format].Get(Value, KindOfLibraryInfo);
-}
-
-//---------------------------------------------------------------------------
-const Ztring &MediaInfo_Config::Iso639_1_Get (const Ztring &Value)
-{
- //Loading codec table if not yet done
- CS.Enter();
- if (Iso639_1.empty())
- MediaInfo_Config_Iso639_1(Iso639_1);
- CS.Leave();
-
- return Iso639_1.Get(Ztring(Value).MakeLowerCase(), 1);
-}
-
-//---------------------------------------------------------------------------
-const Ztring &MediaInfo_Config::Iso639_2_Get (const Ztring &Value)
-{
- //Loading codec table if not yet done
- CS.Enter();
- if (Iso639_2.empty())
- MediaInfo_Config_Iso639_2(Iso639_2);
- CS.Leave();
-
- return Iso639_2.Get(Ztring(Value).MakeLowerCase(), 1);
-}
-
-//---------------------------------------------------------------------------
-const Ztring MediaInfo_Config::Iso639_Find (const Ztring &Value)
-{
- Translation Info;
- MediaInfo_Config_DefaultLanguage (Info);
- Ztring Value_Lower(Value);
- Value_Lower.MakeLowerCase();
-
- for (Translation::iterator Trans=Info.begin(); Trans!=Info.end(); ++Trans)
- {
- Trans->second.MakeLowerCase();
- if (Trans->second==Value_Lower && Trans->first.find(__T("Language_"))==0)
- return Trans->first.substr(9, string::npos);
- }
- return Ztring();
-}
-
-//---------------------------------------------------------------------------
-const Ztring MediaInfo_Config::Iso639_Translate (const Ztring Value)
-{
- Ztring Code(Value);
- if (Code.size()==3 && !MediaInfoLib::Config.Iso639_1_Get(Code).empty())
- Code=MediaInfoLib::Config.Iso639_1_Get(Code);
- if (Code.size()>3 && !MediaInfoLib::Config.Iso639_Find(Code).empty())
- Code=MediaInfoLib::Config.Iso639_Find(Code);
- if (Code.size()>3)
- return Value;
- Ztring Language_Translated=MediaInfoLib::Config.Language_Get(__T("Language_")+Code);
- if (Language_Translated.find(__T("Language_"))==0)
- return Value; //No translation found
- return Language_Translated;
-}
-
-//---------------------------------------------------------------------------
-const Ztring &MediaInfo_Config::Info_Get (stream_t KindOfStream, const Ztring &Value, info_t KindOfInfo)
-{
- //Loading codec table if not yet done
- CS.Enter();
- if (Info[KindOfStream].empty())
- switch (KindOfStream)
- {
- case Stream_General : MediaInfo_Config_General(Info[Stream_General]); Language_Set(Stream_General); break;
- case Stream_Video : MediaInfo_Config_Video(Info[Stream_Video]); Language_Set(Stream_Video); break;
- case Stream_Audio : MediaInfo_Config_Audio(Info[Stream_Audio]); Language_Set(Stream_Audio); break;
- case Stream_Text : MediaInfo_Config_Text(Info[Stream_Text]); Language_Set(Stream_Text); break;
- case Stream_Other : MediaInfo_Config_Other(Info[Stream_Other]); Language_Set(Stream_Other); break;
- case Stream_Image : MediaInfo_Config_Image(Info[Stream_Image]); Language_Set(Stream_Image); break;
- case Stream_Menu : MediaInfo_Config_Menu(Info[Stream_Menu]); Language_Set(Stream_Menu); break;
- default:;
- }
- CS.Leave();
-
- if (KindOfStream>=Stream_Max)
- return EmptyString_Get();
- size_t Pos=Info[KindOfStream].Find(Value);
- if (Pos==Error || (size_t)KindOfInfo>=Info[KindOfStream][Pos].size())
- return EmptyString_Get();
- return Info[KindOfStream][Pos][KindOfInfo];
-}
-
-const Ztring &MediaInfo_Config::Info_Get (stream_t KindOfStream, size_t Pos, info_t KindOfInfo)
-{
- //Loading codec table if not yet done
- CS.Enter();
- if (Info[KindOfStream].empty())
- switch (KindOfStream)
- {
- case Stream_General : MediaInfo_Config_General(Info[Stream_General]); Language_Set(Stream_General); break;
- case Stream_Video : MediaInfo_Config_Video(Info[Stream_Video]); Language_Set(Stream_Video); break;
- case Stream_Audio : MediaInfo_Config_Audio(Info[Stream_Audio]); Language_Set(Stream_Audio); break;
- case Stream_Text : MediaInfo_Config_Text(Info[Stream_Text]); Language_Set(Stream_Text); break;
- case Stream_Other : MediaInfo_Config_Other(Info[Stream_Other]); Language_Set(Stream_Other); break;
- case Stream_Image : MediaInfo_Config_Image(Info[Stream_Image]); Language_Set(Stream_Image); break;
- case Stream_Menu : MediaInfo_Config_Menu(Info[Stream_Menu]); Language_Set(Stream_Menu); break;
- default:;
- }
- CS.Leave();
-
- if (KindOfStream>=Stream_Max)
- return EmptyString_Get();
- if (Pos>=Info[KindOfStream].size() || (size_t)KindOfInfo>=Info[KindOfStream][Pos].size())
- return EmptyString_Get();
- return Info[KindOfStream][Pos][KindOfInfo];
-}
-
-const ZtringListList &MediaInfo_Config::Info_Get(stream_t KindOfStream)
-{
- if (KindOfStream>=Stream_Max)
- return EmptyStringListList_Get();
-
- //Loading codec table if not yet done
- CS.Enter();
- if (Info[KindOfStream].empty())
- switch (KindOfStream)
- {
- case Stream_General : MediaInfo_Config_General(Info[Stream_General]); Language_Set(Stream_General); break;
- case Stream_Video : MediaInfo_Config_Video(Info[Stream_Video]); Language_Set(Stream_Video); break;
- case Stream_Audio : MediaInfo_Config_Audio(Info[Stream_Audio]); Language_Set(Stream_Audio); break;
- case Stream_Text : MediaInfo_Config_Text(Info[Stream_Text]); Language_Set(Stream_Text); break;
- case Stream_Other : MediaInfo_Config_Other(Info[Stream_Other]); Language_Set(Stream_Other); break;
- case Stream_Image : MediaInfo_Config_Image(Info[Stream_Image]); Language_Set(Stream_Image); break;
- case Stream_Menu : MediaInfo_Config_Menu(Info[Stream_Menu]); Language_Set(Stream_Menu); break;
- default:;
- }
- CS.Leave();
-
- return Info[KindOfStream];
-}
-
-//---------------------------------------------------------------------------
-Ztring MediaInfo_Config::Info_Parameters_Get (bool Complete)
-{
- CriticalSectionLocker CSL(CS);
-
- //Loading all
- MediaInfo_Config_General(Info[Stream_General]);
- MediaInfo_Config_Video(Info[Stream_Video]);
- MediaInfo_Config_Audio(Info[Stream_Audio]);
- MediaInfo_Config_Text(Info[Stream_Text]);
- MediaInfo_Config_Other(Info[Stream_Other]);
- MediaInfo_Config_Image(Info[Stream_Image]);
- MediaInfo_Config_Menu(Info[Stream_Menu]);
-
- //Building
- ZtringListList ToReturn;
- size_t ToReturn_Pos=0;
-
- for (size_t StreamKind=0; StreamKind<Stream_Max; StreamKind++)
- {
- ToReturn(ToReturn_Pos, 0)=Info[StreamKind].Read(__T("StreamKind"), Info_Text);
- ToReturn_Pos++;
- for (size_t Pos=0; Pos<Info[StreamKind].size(); Pos++)
- if (!Info[StreamKind].Read(Pos, Info_Name).empty())
- {
- if (Complete)
- ToReturn.push_back(Info[StreamKind].Read(Pos));
- else
- {
- ToReturn(ToReturn_Pos, 0)=Info[StreamKind].Read(Pos, Info_Name);
- ToReturn(ToReturn_Pos, 1)=Info[StreamKind].Read(Pos, Info_Info);
- }
- ToReturn_Pos++;
- }
- ToReturn_Pos++;
- }
- return ToReturn.Read();
-}
-
-//---------------------------------------------------------------------------
-Ztring MediaInfo_Config::Info_Tags_Get () const
-{
- return Ztring();
-}
-
-Ztring MediaInfo_Config::Info_Codecs_Get ()
-{
- CriticalSectionLocker CSL(CS);
-
- //Loading
- MediaInfo_Config_Codec(Codec);
-
- //Building
- Ztring ToReturn;
- InfoMap::iterator Temp=Codec.begin();
- while (Temp!=Codec.end())
- {
- ToReturn+=Temp->second.Read();
- ToReturn+=EOL;
- ++Temp;
- }
-
- return ToReturn;
-}
-
-Ztring MediaInfo_Config::Info_Version_Get () const
-{
- return MediaInfo_Version;
-}
-
-Ztring MediaInfo_Config::Info_Url_Get () const
-{
- return MediaInfo_Url;
-}
-
-const Ztring &MediaInfo_Config::EmptyString_Get () const
-{
- return EmptyZtring_Const;
-}
-
-const ZtringListList &MediaInfo_Config::EmptyStringListList_Get () const
-{
- return EmptyZtringListList_Const;
-}
-
-void MediaInfo_Config::FormatDetection_MaximumOffset_Set (int64u Value)
-{
- CriticalSectionLocker CSL(CS);
- FormatDetection_MaximumOffset=Value;
-}
-
-int64u MediaInfo_Config::FormatDetection_MaximumOffset_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return FormatDetection_MaximumOffset;
-}
-
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config::VariableGopDetection_Occurences_Set (int64u Value)
-{
- CriticalSectionLocker CSL(CS);
- VariableGopDetection_Occurences=Value;
-}
-
-int64u MediaInfo_Config::VariableGopDetection_Occurences_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return VariableGopDetection_Occurences;
-}
-#endif // MEDIAINFO_ADVANCED
-
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config::VariableGopDetection_GiveUp_Set (bool Value)
-{
- CriticalSectionLocker CSL(CS);
- VariableGopDetection_GiveUp=Value;
-}
-
-bool MediaInfo_Config::VariableGopDetection_GiveUp_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return VariableGopDetection_GiveUp;
-}
-#endif // MEDIAINFO_ADVANCED
-
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config::InitDataNotRepeated_Occurences_Set (int64u Value)
-{
- CriticalSectionLocker CSL(CS);
- InitDataNotRepeated_Occurences=Value;
-}
-
-int64u MediaInfo_Config::InitDataNotRepeated_Occurences_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return InitDataNotRepeated_Occurences;
-}
-#endif // MEDIAINFO_ADVANCED
-
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config::InitDataNotRepeated_GiveUp_Set (bool Value)
-{
- CriticalSectionLocker CSL(CS);
- InitDataNotRepeated_GiveUp=Value;
-}
-
-bool MediaInfo_Config::InitDataNotRepeated_GiveUp_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return InitDataNotRepeated_GiveUp;
-}
-#endif // MEDIAINFO_ADVANCED
-
-void MediaInfo_Config::MpegTs_MaximumOffset_Set (int64u Value)
-{
- CriticalSectionLocker CSL(CS);
- MpegTs_MaximumOffset=Value;
-}
-
-int64u MediaInfo_Config::MpegTs_MaximumOffset_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return MpegTs_MaximumOffset;
-}
-
-void MediaInfo_Config::MpegTs_MaximumScanDuration_Set (int64u Value)
-{
- CriticalSectionLocker CSL(CS);
- MpegTs_MaximumScanDuration=Value;
-}
-
-int64u MediaInfo_Config::MpegTs_MaximumScanDuration_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return MpegTs_MaximumScanDuration;
-}
-
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config::MpegTs_VbrDetection_Delta_Set (float64 Value)
-{
- CriticalSectionLocker CSL(CS);
- MpegTs_VbrDetection_Delta=Value;
-}
-
-float64 MediaInfo_Config::MpegTs_VbrDetection_Delta_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return MpegTs_VbrDetection_Delta;
-}
-#endif // MEDIAINFO_ADVANCED
-
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config::MpegTs_VbrDetection_Occurences_Set (int64u Value)
-{
- CriticalSectionLocker CSL(CS);
- MpegTs_VbrDetection_Occurences=Value;
-}
-
-int64u MediaInfo_Config::MpegTs_VbrDetection_Occurences_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return MpegTs_VbrDetection_Occurences;
-}
-#endif // MEDIAINFO_ADVANCED
-
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config::MpegTs_VbrDetection_GiveUp_Set (bool Value)
-{
- CriticalSectionLocker CSL(CS);
- MpegTs_VbrDetection_GiveUp=Value;
-}
-
-bool MediaInfo_Config::MpegTs_VbrDetection_GiveUp_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return MpegTs_VbrDetection_GiveUp;
-}
-#endif // MEDIAINFO_ADVANCED
-
-void MediaInfo_Config::MpegTs_ForceStreamDisplay_Set (bool Value)
-{
- CriticalSectionLocker CSL(CS);
- MpegTs_ForceStreamDisplay=Value;
-}
-
-bool MediaInfo_Config::MpegTs_ForceStreamDisplay_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return MpegTs_ForceStreamDisplay;
-}
-
-//***************************************************************************
-// SubFile
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-ZtringListList MediaInfo_Config::SubFile_Config_Get ()
-{
- CriticalSectionLocker CSL(CS);
-
- return SubFile_Config;
-}
-
-//***************************************************************************
-// Custom mapping
-//***************************************************************************
-
-void MediaInfo_Config::CustomMapping_Set (const Ztring &Value)
-{
- ZtringList List; List.Separator_Set(0, __T(","));
- List.Write(Value);
- if (List.size()==3)
- {
- CriticalSectionLocker CSL(CS);
- CustomMapping[List[0]][List[1]]=List[2];
- }
-}
-
-Ztring MediaInfo_Config::CustomMapping_Get (const Ztring &Format, const Ztring &Field)
-{
- CriticalSectionLocker CSL(CS);
- return CustomMapping[Format][Field];
-}
-
-bool MediaInfo_Config::CustomMapping_IsPresent(const Ztring &Format, const Ztring &Field)
-{
- CriticalSectionLocker CSL(CS);
- std::map<Ztring, std::map<Ztring, Ztring> >::iterator PerFormat=CustomMapping.find(Format);
- if (PerFormat==CustomMapping.end())
- return false;
- std::map<Ztring, Ztring>::iterator PerField=PerFormat->second.find(Field);
- if (PerField==PerFormat->second.end())
- return false;
- return true;
-}
-
-//***************************************************************************
-// Event
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-bool MediaInfo_Config::Event_CallBackFunction_IsSet ()
-{
- CriticalSectionLocker CSL(CS);
-
- return Event_CallBackFunction?true:false;
-}
-#endif //MEDIAINFO_EVENTS
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-Ztring MediaInfo_Config::Event_CallBackFunction_Set (const Ztring &Value)
-{
- ZtringList List=Value;
-
- CriticalSectionLocker CSL(CS);
-
- if (List.empty())
- {
- Event_CallBackFunction=(MediaInfo_Event_CallBackFunction*)NULL;
- Event_UserHandler=NULL;
- }
- else
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- if (List[Pos].find(__T("CallBack=memory://"))==0)
- Event_CallBackFunction=(MediaInfo_Event_CallBackFunction*)Ztring(List[Pos].substr(18, std::string::npos)).To_int64u();
- else if (List[Pos].find(__T("UserHandle=memory://"))==0)
- Event_UserHandler=(void*)Ztring(List[Pos].substr(20, std::string::npos)).To_int64u();
- else if (List[Pos].find(__T("UserHandler=memory://"))==0)
- Event_UserHandler=(void*)Ztring(List[Pos].substr(21, std::string::npos)).To_int64u();
- else
- return("Problem during Event_CallBackFunction value parsing");
- }
-
- return Ztring();
-}
-#endif //MEDIAINFO_EVENTS
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-Ztring MediaInfo_Config::Event_CallBackFunction_Get ()
-{
- CriticalSectionLocker CSL(CS);
-
- return __T("CallBack=memory://")+Ztring::ToZtring((size_t)Event_CallBackFunction)+__T(";UserHandler=memory://")+Ztring::ToZtring((size_t)Event_UserHandler);
-}
-#endif //MEDIAINFO_EVENTS
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-void MediaInfo_Config::Event_Send (const int8u* Data_Content, size_t Data_Size)
-{
- CriticalSectionLocker CSL(CS);
-
- if (Event_CallBackFunction)
- Event_CallBackFunction ((unsigned char*)Data_Content, Data_Size, Event_UserHandler);
-}
-#endif //MEDIAINFO_EVENTS
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-void MediaInfo_Config::Event_Send (const int8u* Data_Content, size_t Data_Size, const Ztring &File_Name)
-{
- CriticalSectionLocker CSL(CS);
-
- if (Event_CallBackFunction)
- {
- MEDIAINFO_DEBUG1( "Event",
- Debug+=", EventID=";Debug+=Ztring::ToZtring(LittleEndian2int32u(Data_Content), 16).To_UTF8();)
-
- Event_CallBackFunction ((unsigned char*)Data_Content, Data_Size, Event_UserHandler);
-
- MEDIAINFO_DEBUG2( "Event",
- )
- }
-}
-#endif //MEDIAINFO_EVENTS
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-void MediaInfo_Config::Log_Send (int8u Type, int8u Severity, int32u MessageCode, const Ztring &Message)
-{
- struct MediaInfo_Event_Log_0 Event;
- Event.EventCode=MediaInfo_EventCode_Create(MediaInfo_Parser_None, MediaInfo_Event_Log, 0);
- Event.Type=Type;
- Event.Severity=Severity;
- Event.Reserved2=(int8u)-1;
- Event.Reserved3=(int8u)-1;
- Event.MessageCode=MessageCode;
- Event.Reserved4=(int32u)-1;
- wstring MessageU=Message.To_Unicode();
- string MessageA=Message.To_Local();
- Event.MessageStringU=MessageU.c_str();
- Event.MessageStringA=MessageA.c_str();
- Event_Send((const int8u*)&Event, sizeof(MediaInfo_Event_Log_0));
-}
-#endif //MEDIAINFO_EVENTS
-
-//***************************************************************************
-// Curl
-//***************************************************************************
-
-#if defined(MEDIAINFO_LIBCURL_YES)
-void MediaInfo_Config::Ssh_PublicKeyFileName_Set (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
- Ssh_PublicKeyFileName=Value;
-}
-
-Ztring MediaInfo_Config::Ssh_PublicKeyFileName_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ssh_PublicKeyFileName;
-}
-
-void MediaInfo_Config::Ssh_PrivateKeyFileName_Set (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
- Ssh_PrivateKeyFileName=Value;
-}
-
-Ztring MediaInfo_Config::Ssh_PrivateKeyFileName_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ssh_PrivateKeyFileName;
-}
-
-void MediaInfo_Config::Ssh_KnownHostsFileName_Set (const Ztring &Value)
-{
- if (Value.empty())
- return; //empty value means "disable security" for libcurl, not acceptable
-
- CriticalSectionLocker CSL(CS);
- Ssh_KnownHostsFileName=Value;
-}
-
-Ztring MediaInfo_Config::Ssh_KnownHostsFileName_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ssh_KnownHostsFileName;
-}
-
-void MediaInfo_Config::Ssh_IgnoreSecurity_Set (bool Value)
-{
- CriticalSectionLocker CSL(CS);
- Ssh_IgnoreSecurity=Value;
-}
-
-bool MediaInfo_Config::Ssh_IgnoreSecurity_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ssh_IgnoreSecurity;
-}
-
-void MediaInfo_Config::Ssl_CertificateFileName_Set (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
- Ssl_CertificateFileName=Value;
-}
-
-Ztring MediaInfo_Config::Ssl_CertificateFileName_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ssl_CertificateFileName;
-}
-
-void MediaInfo_Config::Ssl_CertificateFormat_Set (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
- Ssl_CertificateFormat=Value;
-}
-
-Ztring MediaInfo_Config::Ssl_CertificateFormat_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ssl_CertificateFormat;
-}
-
-void MediaInfo_Config::Ssl_PrivateKeyFileName_Set (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
- Ssl_PrivateKeyFileName=Value;
-}
-
-Ztring MediaInfo_Config::Ssl_PrivateKeyFileName_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ssl_PrivateKeyFileName;
-}
-
-void MediaInfo_Config::Ssl_PrivateKeyFormat_Set (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
- Ssl_PrivateKeyFormat=Value;
-}
-
-Ztring MediaInfo_Config::Ssl_PrivateKeyFormat_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ssl_PrivateKeyFormat;
-}
-
-void MediaInfo_Config::Ssl_CertificateAuthorityFileName_Set (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
- Ssl_CertificateAuthorityFileName=Value;
-}
-
-Ztring MediaInfo_Config::Ssl_CertificateAuthorityFileName_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ssl_CertificateAuthorityFileName;
-}
-
-void MediaInfo_Config::Ssl_CertificateAuthorityPath_Set (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
- Ssl_CertificateAuthorityPath=Value;
-}
-
-Ztring MediaInfo_Config::Ssl_CertificateAuthorityPath_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ssl_CertificateAuthorityPath;
-}
-
-void MediaInfo_Config::Ssl_CertificateRevocationListFileName_Set (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
- Ssl_CertificateRevocationListFileName=Value;
-}
-
-Ztring MediaInfo_Config::Ssl_CertificateRevocationListFileName_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ssl_CertificateRevocationListFileName;
-}
-
-void MediaInfo_Config::Ssl_IgnoreSecurity_Set (bool Value)
-{
- CriticalSectionLocker CSL(CS);
- Ssl_IgnoreSecurity=Value;
-}
-
-bool MediaInfo_Config::Ssl_IgnoreSecurity_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ssl_IgnoreSecurity;
-}
-
-#endif //defined(MEDIAINFO_LIBCURL_YES)
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config.h b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config.h
deleted file mode 100644
index d3878deed..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config.h
+++ /dev/null
@@ -1,351 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Global configuration of MediaInfo
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_ConfigH
-#define MediaInfo_ConfigH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Internal_Const.h"
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-#include "ZenLib/CriticalSection.h"
-#include "ZenLib/ZtringListList.h"
-#include "ZenLib/Translation.h"
-#include "ZenLib/InfoMap.h"
-#include <bitset>
-using namespace ZenLib;
-using std::vector;
-using std::string;
-using std::map;
-using std::make_pair;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class MediaInfo_Config
-//***************************************************************************
-
-class MediaInfo_Config
-{
-public :
- //Constructor/Destructor
- MediaInfo_Config() {}
- void Init(); //Must be called instead of constructor
-
- //General
- Ztring Option (const String &Option, const String &Value=Ztring());
-
- //Info
- void Complete_Set (size_t NewValue);
- size_t Complete_Get ();
-
- void BlockMethod_Set (size_t NewValue);
- size_t BlockMethod_Get ();
-
- void Internet_Set (size_t NewValue);
- size_t Internet_Get ();
-
- void MultipleValues_Set (size_t NewValue);
- size_t MultipleValues_Get ();
-
- void ParseUnknownExtensions_Set (size_t NewValue);
- size_t ParseUnknownExtensions_Get ();
-
- void ShowFiles_Set (const ZtringListList &NewShowFiles);
- size_t ShowFiles_Nothing_Get ();
- size_t ShowFiles_VideoAudio_Get ();
- size_t ShowFiles_VideoOnly_Get ();
- size_t ShowFiles_AudioOnly_Get ();
- size_t ShowFiles_TextOnly_Get ();
-
- void ReadByHuman_Set (bool NewValue);
- bool ReadByHuman_Get ();
-
- void LegacyStreamDisplay_Set (bool Value);
- bool LegacyStreamDisplay_Get ();
-
- void SkipBinaryData_Set (bool Value);
- bool SkipBinaryData_Get ();
-
- void ParseSpeed_Set (float32 NewValue);
- float32 ParseSpeed_Get ();
-
- void Verbosity_Set (float32 NewValue);
- float32 Verbosity_Get ();
-
- void Trace_Level_Set (const ZtringListList &NewDetailsLevel);
- float32 Trace_Level_Get ();
- std::bitset<32> Trace_Layers_Get ();
-
- void Trace_TimeSection_OnlyFirstOccurrence_Set (bool Value);
- bool Trace_TimeSection_OnlyFirstOccurrence_Get ();
-
- enum trace_Format
- {
- Trace_Format_Tree,
- Trace_Format_CSV,
- };
- void Trace_Format_Set (trace_Format NewValue);
- trace_Format Trace_Format_Get ();
-
- void Trace_Modificator_Set (const ZtringList &NewModifcator); //Not implemented
- Ztring Trace_Modificator_Get (const Ztring &Modificator); //Not implemented
-
- void Demux_Set (int8u NewValue);
- int8u Demux_Get ();
-
- void LineSeparator_Set (const Ztring &NewValue);
- Ztring LineSeparator_Get ();
-
- void Version_Set (const Ztring &NewValue);
- Ztring Version_Get ();
-
- void ColumnSeparator_Set (const Ztring &NewValue);
- Ztring ColumnSeparator_Get ();
-
- void TagSeparator_Set (const Ztring &NewValue);
- Ztring TagSeparator_Get ();
-
- void Quote_Set (const Ztring &NewValue);
- Ztring Quote_Get ();
-
- void DecimalPoint_Set (const Ztring &NewValue);
- Ztring DecimalPoint_Get ();
-
- void ThousandsPoint_Set (const Ztring &NewValue);
- Ztring ThousandsPoint_Get ();
-
- void StreamMax_Set (const ZtringListList &NewValue);
- Ztring StreamMax_Get ();
-
- void Language_Set (const ZtringListList &NewLanguage);
- Ztring Language_Get ();
- Ztring Language_Get (const Ztring &Value);
- Ztring Language_Get (const Ztring &Count, const Ztring &Value, bool ValueIsAlwaysSame=false);
-
- void Inform_Set (const ZtringListList &NewInform);
- Ztring Inform_Get ();
- Ztring Inform_Get (const Ztring &Value);
-
- void Inform_Replace_Set (const ZtringListList &NewInform_Replace);
- ZtringListList Inform_Replace_Get_All ();
-
- const Ztring &Format_Get (const Ztring &Value, infoformat_t KindOfFormatInfo=InfoFormat_Name);
- InfoMap &Format_Get(); //Should not be, but too difficult to hide it
-
- const Ztring &Codec_Get (const Ztring &Value, infocodec_t KindOfCodecInfo=InfoCodec_Name);
- const Ztring &Codec_Get (const Ztring &Value, infocodec_t KindOfCodecInfo, stream_t KindOfStream);
-
- const Ztring &CodecID_Get (stream_t KindOfStream, infocodecid_format_t Format, const Ztring &Value, infocodecid_t KindOfCodecIDInfo=InfoCodecID_Format);
-
- const Ztring &Library_Get (infolibrary_format_t Format, const Ztring &Value, infolibrary_t KindOfLibraryInfo=InfoLibrary_Version);
-
- const Ztring &Iso639_1_Get (const Ztring &Value);
- const Ztring &Iso639_2_Get (const Ztring &Value);
- const Ztring Iso639_Find (const Ztring &Value);
- const Ztring Iso639_Translate (const Ztring Value);
-
- const Ztring &Info_Get (stream_t KindOfStream, const Ztring &Value, info_t KindOfInfo=Info_Text);
- const Ztring &Info_Get (stream_t KindOfStream, size_t Pos, info_t KindOfInfo=Info_Text);
- const ZtringListList &Info_Get(stream_t KindOfStream); //Should not be, but too difficult to hide it
-
- Ztring Info_Parameters_Get (bool Complete=false);
- Ztring Info_Tags_Get () const;
- Ztring Info_CodecsID_Get ();
- Ztring Info_Codecs_Get ();
- Ztring Info_Version_Get () const;
- Ztring Info_Url_Get () const;
-
- const Ztring &EmptyString_Get() const; //Use it when we can't return a reference to a true string
- const ZtringListList &EmptyStringListList_Get() const; //Use it when we can't return a reference to a true string list list
-
- void FormatDetection_MaximumOffset_Set (int64u Value);
- int64u FormatDetection_MaximumOffset_Get ();
-
- #if MEDIAINFO_ADVANCED
- void VariableGopDetection_Occurences_Set (int64u Value);
- int64u VariableGopDetection_Occurences_Get ();
- void VariableGopDetection_GiveUp_Set (bool Value);
- bool VariableGopDetection_GiveUp_Get ();
- void InitDataNotRepeated_Occurences_Set (int64u Value);
- int64u InitDataNotRepeated_Occurences_Get ();
- void InitDataNotRepeated_GiveUp_Set (bool Value);
- bool InitDataNotRepeated_GiveUp_Get ();
- #endif //MEDIAINFO_ADVANCED
-
- void MpegTs_MaximumOffset_Set (int64u Value);
- int64u MpegTs_MaximumOffset_Get ();
- void MpegTs_MaximumScanDuration_Set (int64u Value);
- int64u MpegTs_MaximumScanDuration_Get ();
- void MpegTs_ForceStreamDisplay_Set (bool Value);
- bool MpegTs_ForceStreamDisplay_Get ();
- #if MEDIAINFO_ADVANCED
- void MpegTs_VbrDetection_Delta_Set (float64 Value);
- float64 MpegTs_VbrDetection_Delta_Get ();
- void MpegTs_VbrDetection_Occurences_Set (int64u Value);
- int64u MpegTs_VbrDetection_Occurences_Get ();
- void MpegTs_VbrDetection_GiveUp_Set (bool Value);
- bool MpegTs_VbrDetection_GiveUp_Get ();
- #endif //MEDIAINFO_ADVANCED
-
- ZtringListList SubFile_Config_Get ();
-
- void CustomMapping_Set (const Ztring &Value);
- Ztring CustomMapping_Get (const Ztring &Format, const Ztring &Field);
- bool CustomMapping_IsPresent (const Ztring &Format, const Ztring &Field);
-
- void ErrorLog_Callback_Set(const Ztring &Value);
- void ErrorLog(const Ztring &Value);
-
- #if MEDIAINFO_EVENTS
- bool Event_CallBackFunction_IsSet ();
- Ztring Event_CallBackFunction_Set (const Ztring &Value);
- Ztring Event_CallBackFunction_Get ();
- void Event_Send(const int8u* Data_Content, size_t Data_Size);
- void Event_Send(const int8u* Data_Content, size_t Data_Size, const Ztring &File_Name);
- void Log_Send(int8u Type, int8u Severity, int32u MessageCode, const Ztring &Message);
- void Log_Send(int8u Type, int8u Severity, int32u MessageCode, const char* Message) {return Log_Send(Type, Severity, MessageCode, Ztring().From_Local(Message));}
- #endif //MEDIAINFO_EVENTS
-
- #if defined(MEDIAINFO_LIBCURL_YES)
- void Ssh_PublicKeyFileName_Set (const Ztring &NewValue);
- Ztring Ssh_PublicKeyFileName_Get ();
- void Ssh_PrivateKeyFileName_Set (const Ztring &NewValue);
- Ztring Ssh_PrivateKeyFileName_Get ();
- void Ssh_IgnoreSecurity_Set (bool NewValue);
- void Ssh_KnownHostsFileName_Set (const Ztring &NewValue);
- Ztring Ssh_KnownHostsFileName_Get ();
- bool Ssh_IgnoreSecurity_Get ();
- void Ssl_CertificateFileName_Set (const Ztring &NewValue);
- Ztring Ssl_CertificateFileName_Get ();
- void Ssl_CertificateFormat_Set (const Ztring &NewValue);
- Ztring Ssl_CertificateFormat_Get ();
- void Ssl_PrivateKeyFileName_Set (const Ztring &NewValue);
- Ztring Ssl_PrivateKeyFileName_Get ();
- void Ssl_PrivateKeyFormat_Set (const Ztring &NewValue);
- Ztring Ssl_PrivateKeyFormat_Get ();
- void Ssl_CertificateAuthorityFileName_Set (const Ztring &NewValue);
- Ztring Ssl_CertificateAuthorityFileName_Get ();
- void Ssl_CertificateAuthorityPath_Set (const Ztring &NewValue);
- Ztring Ssl_CertificateAuthorityPath_Get ();
- void Ssl_CertificateRevocationListFileName_Set (const Ztring &NewValue);
- Ztring Ssl_CertificateRevocationListFileName_Get ();
- void Ssl_IgnoreSecurity_Set (bool NewValue);
- bool Ssl_IgnoreSecurity_Get ();
- #endif //defined(MEDIAINFO_LIBCURL_YES)
-
-private :
- int64u FormatDetection_MaximumOffset;
- #if MEDIAINFO_ADVANCED
- int64u VariableGopDetection_Occurences;
- bool VariableGopDetection_GiveUp;
- int64u InitDataNotRepeated_Occurences;
- bool InitDataNotRepeated_GiveUp;
- #endif //MEDIAINFO_ADVANCED
- int64u MpegTs_MaximumOffset;
- int64u MpegTs_MaximumScanDuration;
- bool MpegTs_ForceStreamDisplay;
- #if MEDIAINFO_ADVANCED
- float64 MpegTs_VbrDetection_Delta;
- int64u MpegTs_VbrDetection_Occurences;
- bool MpegTs_VbrDetection_GiveUp;
- #endif //MEDIAINFO_ADVANCED
- size_t Complete;
- size_t BlockMethod;
- size_t Internet;
- size_t MultipleValues;
- size_t ParseUnknownExtensions;
- size_t ShowFiles_Nothing;
- size_t ShowFiles_VideoAudio;
- size_t ShowFiles_VideoOnly;
- size_t ShowFiles_AudioOnly;
- size_t ShowFiles_TextOnly;
- float32 ParseSpeed;
- float32 Verbosity;
- float32 Trace_Level;
- bool Trace_TimeSection_OnlyFirstOccurrence;
- std::bitset<32> Trace_Layers; //0-7: Container, 8: Stream
- std::map<Ztring, bool> Trace_Modificators; //If we want to add/remove some details
- bool Language_Raw;
- bool ReadByHuman;
- bool LegacyStreamDisplay;
- bool SkipBinaryData;
- int8u Demux;
- Ztring Version;
- Ztring ColumnSeparator;
- Ztring LineSeparator;
- Ztring TagSeparator;
- Ztring Quote;
- Ztring DecimalPoint;
- Ztring ThousandsPoint;
- Translation Language; //ex. : "KB;Ko"
- ZtringListList Custom_View; //Definition of "General", "Video", "Audio", "Text", "Other", "Image"
- ZtringListList Custom_View_Replace; //ToReplace;ReplaceBy
- trace_Format Trace_Format;
-
- InfoMap Container;
- InfoMap CodecID[InfoCodecID_Format_Max][Stream_Max];
- InfoMap Format;
- InfoMap Codec;
- InfoMap Library[InfoLibrary_Format_Max];
- InfoMap Iso639_1;
- InfoMap Iso639_2;
- ZtringListList Info[Stream_Max]; //General info
-
- ZtringListList SubFile_Config;
-
- std::map<Ztring, std::map<Ztring, Ztring> > CustomMapping;
-
- ZenLib::CriticalSection CS;
-
- void Language_Set (stream_t StreamKind);
-
- //Event
- #if MEDIAINFO_EVENTS
- MediaInfo_Event_CallBackFunction* Event_CallBackFunction; //void Event_Handler(unsigned char* Data_Content, size_t Data_Size, void* UserHandler)
- void* Event_UserHandler;
- #endif //MEDIAINFO_EVENTS
-
- #if defined(MEDIAINFO_LIBCURL_YES)
- Ztring Ssh_PublicKeyFileName;
- Ztring Ssh_PrivateKeyFileName;
- Ztring Ssh_KnownHostsFileName;
- bool Ssh_IgnoreSecurity;
- Ztring Ssl_CertificateFileName;
- Ztring Ssl_CertificateFormat;
- Ztring Ssl_PrivateKeyFileName;
- Ztring Ssl_PrivateKeyFormat;
- Ztring Ssl_CertificateAuthorityFileName;
- Ztring Ssl_CertificateAuthorityPath;
- Ztring Ssl_CertificateRevocationListFileName;
- bool Ssl_IgnoreSecurity;
- #endif //defined(MEDIAINFO_LIBCURL_YES)
-
- //Constructor
- MediaInfo_Config (const MediaInfo_Config&); // Prevent copy-construction
- MediaInfo_Config& operator=(const MediaInfo_Config&); // Prevent assignment
-};
-
-extern MediaInfo_Config Config;
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_Automatic.cpp b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_Automatic.cpp
deleted file mode 100644
index b639cef37..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_Automatic.cpp
+++ /dev/null
@@ -1,6010 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Automaticly generated methods for MediaInfo
-// Don't modify, this will be deleted at the next automatic update
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/PreComp.h"
-#include "ZenLib/ZtringListList.h"
-#include "ZenLib/InfoMap.h"
-#include "ZenLib/Translation.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_DefaultLanguage (Translation &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- " Language_ISO639;en\n"
- " Author_Email;Info@MediaArea.net\n"
- " Author_Name;Zen\n"
- " Author_OldNames;Initial translator\n"
- " Language_Name;English\n"
- " Config_Text_ColumnSize;40\n"
- " Config_Text_Separator; : \n"
- " Config_Text_NumberTag; #\n"
- " Config_Text_FloatSeparator;.\n"
- " Config_Text_ThousandsSeparator; \n"
- " audio stream1; audio stream\n"
- " audio stream2; audio streams\n"
- " audio stream3; audio streams\n"
- " bit1; bit\n"
- " bit2; bits\n"
- " bit3; bits\n"
- " bps; bps\n"
- " Bps; Bps\n"
- " Byte1; Byte\n"
- " Byte2; Bytes\n"
- " Byte3; Bytes\n"
- " channel1; channel\n"
- " channel2; channels\n"
- " channel3; channels\n"
- " chapter1; chapter\n"
- " chapter2; chapters\n"
- " chapter3; chapters\n"
- " chapters stream1; chapters stream\n"
- " chapters stream2; chapters streams\n"
- " chapters stream3; chapters streams\n"
- " character1; character\n"
- " character2; characters\n"
- " character3; characters\n"
- " day1; day\n"
- " day2; days\n"
- " day3; days\n"
- " dB1; dB\n"
- " dB2; dB\n"
- " dB3; dB\n"
- " file1; file\n"
- " file2; files\n"
- " file3; files\n"
- " fps1; fps\n"
- " fps2; fps\n"
- " fps3; fps\n"
- " frame1; frame\n"
- " frame2; frames\n"
- " frame3; frames\n"
- " GB; GB\n"
- " Gb; Gb\n"
- " Gbps; Gbps\n"
- " GBps; GBps\n"
- " GHz; GHz\n"
- " GiB; GiB\n"
- " GibiByte1; GibiBytes\n"
- " GibiByte2; GibiBytes\n"
- " GibiByte3; GibiBytes\n"
- " GiBps; GiBps\n"
- " GigaBit1; GigaBit\n"
- " GigaBit2; GigaBits\n"
- " GigaBit3; GigaBits\n"
- " GigaByte1; GigaByte\n"
- " GigaByte2; GigaBytes\n"
- " GigaByte3; GigaBytes\n"
- " hour1; hour\n"
- " hour2; hours\n"
- " hour3; hours\n"
- " Hz; Hz\n"
- " image stream1; image stream\n"
- " image stream2; image streams\n"
- " image stream3; image streams\n"
- " KB; KB\n"
- " Kb; Kb\n"
- " KBps; KBps\n"
- " Kbps; Kbps\n"
- " KHz; KHz\n"
- " KiB; KiB\n"
- " KibiBit1; KibiBit\n"
- " KibiBit2; KibiBits\n"
- " KibiBit3; KibiBits\n"
- " KibiByte1; KibiByte\n"
- " KibiByte2; KibiBytes\n"
- " KibiByte3; KibiBytes\n"
- " KiBps; KiBps\n"
- " KiloBit1; KiloBit\n"
- " KiloBit2; KiloBits\n"
- " KiloBit3; KiloBits\n"
- " KiloByte1; KiloByte\n"
- " KiloByte2; KiloBytes\n"
- " KiloByte3; KiloBytes\n"
- " MB; MB\n"
- " Mb; Mb\n"
- " Mbps; Mbps\n"
- " MBps; MebiBytes\n"
- " MebiBit1; MebiBit\n"
- " MebiBit2; MebiBits\n"
- " MebiBit3; MebiBits\n"
- " MebiByte1; MebiByte\n"
- " MebiByte2; MebiBytes\n"
- " MebiByte3; MebiBytes\n"
- " MegaBit1; MegaBit\n"
- " MegaBit2; MegaBits\n"
- " MegaBit3; MegaBits\n"
- " MegaByte1; MegaByte\n"
- " MegaByte2; MegaBytes\n"
- " MegaByte3; MegaBytes\n"
- " MHz; MHz\n"
- " MiB; MiB\n"
- " Mib; Mib\n"
- " MiBps; MiBps\n"
- " millisecond1; millisecond\n"
- " millisecond2; milliseconds\n"
- " millisecond3; milliseconds\n"
- " minute1; minute\n"
- " minute2; minutes\n"
- " minute3; minutes\n"
- " month1; month\n"
- " month2; months\n"
- " month3; months\n"
- " pixel1; pixel\n"
- " pixel2; pixels\n"
- " pixel3; pixels\n"
- " second1; second\n"
- " second2; seconds\n"
- " second3; seconds\n"
- " text stream1; text stream\n"
- " text stream2; text streams\n"
- " text stream3; text streams\n"
- " video frames1; video frame\n"
- " video frames2; video frames\n"
- " video frames3; video frames\n"
- " video stream1; video stream\n"
- " video stream2; video streams\n"
- " video stream3; video streams\n"
- " warppoint0;No warppoints\n"
- " warppoint1; warppoint\n"
- " warppoint2; warppoints\n"
- " warppoint3; warppoints\n"
- " week1; week\n"
- " week2; weeks\n"
- " week3; weeks\n"
- " year1; year\n"
- " year2; years\n"
- " year3; years\n"
- ", ;, \n"
- ": ;: \n"
- "3D;3D\n"
- "3DType;3D Type\n"
- "About;About\n"
- "About_Hint;How to contact me and find last version\n"
- "Accompaniment;Accompaniment\n"
- "ActiveFormatDescription;Active Format Description\n"
- "ActiveFormatDescription_MuxingMode;Active Format Description, Muxing mode\n"
- "Actor;Actor\n"
- "Actor_Character;Character played\n"
- "Added_Date;Added date\n"
- "Address;Address\n"
- "Advanced;Advanced\n"
- "Advanced mode;Advanced mode\n"
- "Album;Album\n"
- "Album_ReplayGain_Gain;Album replay gain\n"
- "Album_ReplayGain_Peak;Album replay gain peak\n"
- "Alignment;Alignment\n"
- "Alignment_Aligned;Aligned on interleaves\n"
- "Alignment_Split;Split accross interleaves\n"
- "All;All\n"
- "Archival_Location;Archival location\n"
- "Arranger;Arranger\n"
- "ArtDirector;ArtDirector\n"
- "AspectRatio;Aspect ratio\n"
- "AssistantDirector;AssistantDirector\n"
- "at;at\n"
- "At least one file;(You must at least open one file)\n"
- "Audio;Audio\n"
- "Audio stream(s);Audio streams\n"
- "Audio_Codec_List;Audio codecs\n"
- "Audio_No;No audio\n"
- "Audio1;First audio stream\n"
- "Audio2;Second audio stream\n"
- "AudioComments;Audio Comments\n"
- "AudioCount;Count of audio streams\n"
- "AudioDescriptionPresent;Audio Description Present\n"
- "AudioDescriptionType;Audio Description Type\n"
- "AudioLoudnessStandard;Audio Loudness Standard\n"
- "AudioTrackLayout;Audio Track Layout\n"
- "Author;Author\n"
- "BarCode;BarCode\n"
- "Basic;Basic\n"
- "Basic_Note;Note : for more information about this file, you must select a different view (Sheet, Tree...)\n"
- "BitDepth;Bit depth\n"
- "BitDepth_Stored;Stored bit depth\n"
- "BitRate;Bit rate\n"
- "BitRate_Encoded;Encoded bit rate\n"
- "BitRate_Maximum;Maximum bit rate\n"
- "BitRate_Minimum;Minimum bit rate\n"
- "BitRate_Mode;Bit rate mode\n"
- "BitRate_Mode_CBR;Constant\n"
- "BitRate_Mode_VBR;Variable\n"
- "BitRate_Nominal;Nominal bit rate\n"
- "Bits-(Pixel*Frame);Bits/(Pixel*Frame)\n"
- "BufferSize;Buffer size\n"
- "Cancel;Cancel\n"
- "Channel(s);Channel(s)\n"
- "ChannelPositions;Channel positions\n"
- "Chapter(s);Chapter(s)\n"
- "Chapters;Chapters\n"
- "Chapters stream(s);Chapters stream(s)\n"
- "Chapters_Codec_List;Chapters Codecs\n"
- "Chapters_No;No chapters\n"
- "ChaptersCount;Count of chapter streams\n"
- "CheckNewVersion;Check for new version\n"
- "Choose custom;Choose custom\n"
- "Choose custom sheet;Choose your desired custom sheet\n"
- "Choose custom text;Choose your desired custom text\n"
- "Choose export format;Choose your desired export format\n"
- "Choose file(s);Choose the files to open\n"
- "Choose filename;Choose your desired filename\n"
- "Choose language;Choose your desired language\n"
- "Choregrapher;Choregrapher\n"
- "Chroma;Chroma\n"
- "ChromaSubsampling;Chroma subsampling\n"
- "Close;Close\n"
- "Close all before open;Close all before open\n"
- "ClosedCaptionsLanguage;Closed Captions Language\n"
- "ClosedCaptionsPresent;Closed Captions Present\n"
- "ClosedCaptionsType;Closed Captions Type\n"
- "Codec;Codec\n"
- "Codec_Description;Codec description\n"
- "Codec_Info;Details for codec\n"
- "Codec_Profile;Codec profile\n"
- "Codec_Settings;Codec settings\n"
- "Codec_Settings_BVOP;Codec settings, BVOP\n"
- "Codec_Settings_CABAC;Codec settings, CABAC\n"
- "Codec_Settings_Endianness;Codec settings, Endianness\n"
- "Codec_Settings_Firm;Codec settings, Firm\n"
- "Codec_Settings_Floor;Codec settings, Floor\n"
- "Codec_Settings_GMC;Codec settings, GMC\n"
- "Codec_Settings_ITU;Codec settings, ITU\n"
- "Codec_Settings_Law;Codec settings, Law\n"
- "Codec_Settings_Matrix;Codec settings, Matrix\n"
- "Codec_Settings_PacketBitStream;Codec settings, Packet bitstream\n"
- "Codec_Settings_QPel;Codec settings, QPel\n"
- "Codec_Settings_Sign;Codec settings, Sign\n"
- "Codec_Url;Weblink for codec\n"
- "CodecID;Codec ID\n"
- "CodecID_Description;Description of the codec\n"
- "CoDirector;Codirector\n"
- "Collection;Collection\n"
- "Colorimetry;Colorimetry\n"
- "ColorSpace;Color space\n"
- "colour_primaries;Color primaries\n"
- "colour_range;Color range\n"
- "Comment;Comment\n"
- "CommissionedBy;Commissioned by\n"
- "Compilation;Compilation\n"
- "CompleteName;Complete name\n"
- "CompletionDate;Completion Date\n"
- "Composer;Composer\n"
- "Compression_Mode;Compression mode\n"
- "Compression_Mode_Lossless;Lossless\n"
- "Compression_Mode_Lossy;Lossy\n"
- "Compression_Ratio;Compression ratio\n"
- "Conductor;Conductor\n"
- "ContactEmail;Contact Email\n"
- "ContactTelephoneNumber;Contact Telephone Number\n"
- "Container and general information;Container and general information\n"
- "ContentType;ContentType\n"
- "CoProducer;Coproducer\n"
- "Copyright;Copyright\n"
- "CopyrightYear;Copyright Year\n"
- "CostumeDesigner;Costume designer\n"
- "Count;Count\n"
- "Country;Country\n"
- "Cover;Cover\n"
- "Cover_Datas;Cover datas\n"
- "Cover_Description;Cover description\n"
- "Cover_Mime;Cover MIME\n"
- "Cover_Type;Cover type\n"
- "Cropped;Crop dimensions\n"
- "Custom;Custom\n"
- "Customize;Customize\n"
- "Date;Date\n"
- "Debug;Debug\n"
- "Decimal point;Decimal point\n"
- "Delay;Delay\n"
- "Delay_Source;Delay, origin\n"
- "Delay_Source_Container;Container\n"
- "Delay_Source_Stream;Raw stream\n"
- "Delete;Delete\n"
- "Description;Description\n"
- "Digitized_Date;Digitized date\n"
- "Dimensions;Dimensions\n"
- "Director;Director\n"
- "DirectorOfPhotography;Director of photography\n"
- "DisplayAspectRatio;Display aspect ratio\n"
- "DisplayAspectRatio_CleanAperture;Clean aperture display aspect ratio\n"
- "DisplayAspectRatio_Original;Original display aspect ratio\n"
- "DistributedBy;Distributed by\n"
- "Distributor;Distributor\n"
- "Donate;Donate\n"
- "DotsPerInch;Dots per inch\n"
- "Duration;Duration\n"
- "Duration_End;End time\n"
- "Duration_Start;Start time\n"
- "Edit;Edit\n"
- "EditedBy;Edited by\n"
- "EMail;E-Mail\n"
- "Encoded_Application;Writing application\n"
- "Encoded_Date;Encoded date\n"
- "Encoded_Library;Writing library\n"
- "Encoded_Library_Settings;Encoding settings\n"
- "Encoded_Original;Original support\n"
- "EncodedBy;Encoded by\n"
- "EPG_Positions;EPG positions (internal)\n"
- "EpisodeTitleNumber;Episode Title Number\n"
- "Error_File;Error while reading file\n"
- "ExecutiveProducer;Executive producer\n"
- "Exit;Exit\n"
- "Exit_Hint;Quit the program\n"
- "Export;Export\n"
- "Export_Hint;Export in a customized format\n"
- "Extensions;Extensions usually used\n"
- "Family;Family\n"
- "Fax;Fax\n"
- "File;File\n"
- "File size;File size\n"
- "File_Append;Append to the existing file (Warning : be careful to have the same parameters)\n"
- "File_Created_Date;File creation date\n"
- "File_Created_Date_Local;File creation date (local)\n"
- "File_Hint;Select a multimedia file to examine\n"
- "File_Modified_Date;File last modification date\n"
- "File_Modified_Date_Local;File last modification date (local)\n"
- "FileExtension;File extension\n"
- "FileName;File name\n"
- "FileSize;File size\n"
- "Folder;Folder\n"
- "Folder (R);Folder (R)\n"
- "Folder (R)_Hint;Select a folder to examine (with all folders recursively)\n"
- "Folder (Recursively);Folder (Recursively)\n"
- "Folder_Hint;Select a folder to examine\n"
- "FolderName;Folder name\n"
- "Format;Format\n"
- "Format_Commercial;Commercial name\n"
- "Format_Commercial_IfAny;Commercial name\n"
- "Format_Description;Format description\n"
- "Format_Info;Details for format\n"
- "Format_Profile;Format profile\n"
- "Format_Settings;Format settings\n"
- "Format_Settings_BVOP;Format settings, BVOP\n"
- "Format_Settings_CABAC;Format settings, CABAC\n"
- "Format_Settings_Emphasis;Emphasis\n"
- "Format_Settings_Endianness;Format settings, Endianness\n"
- "Format_Settings_Firm;Format settings, Firm\n"
- "Format_Settings_Floor;Format settings, Floor\n"
- "Format_Settings_FrameMode;Frame mode\n"
- "Format_Settings_GMC;Format settings, GMC\n"
- "Format_Settings_GOP;Format settings, GOP\n"
- "Format_Settings_ITU;Format settings, ITU\n"
- "Format_Settings_Law;Format settings, Law\n"
- "Format_Settings_Matrix;Format settings, Matrix\n"
- "Format_Settings_Matrix_Custom;Custom\n"
- "Format_Settings_Matrix_Default;Default\n"
- "Format_Settings_Mode;Mode\n"
- "Format_Settings_ModeExtension;Mode extension\n"
- "Format_Settings_PacketBitStream;Format settings, Packet bitstream\n"
- "Format_Settings_PictureStructure;Format settings, picture structure\n"
- "Format_Settings_PS;Format settings, PS\n"
- "Format_Settings_Pulldown;Format settings, Pulldown\n"
- "Format_Settings_QPel;Format settings, QPel\n"
- "Format_Settings_RefFrames;Format settings, ReFrames\n"
- "Format_Settings_SBR;Format settings, SBR\n"
- "Format_Settings_Sign;Format settings, Sign\n"
- "Format_Settings_Wrapping;Format settings, wrapping mode\n"
- "Format_Url;Weblink for format\n"
- "Format_Version;Format version\n"
- "FpaManufacturer;FPA Manufacturer\n"
- "FpaPass;FPA Pass\n"
- "FpaVersion;FPA Version\n"
- "FrameCount;Frame count\n"
- "FrameRate;Frame rate\n"
- "FrameRate_Maximum;Maximum frame rate\n"
- "FrameRate_Minimum;Minimum frame rate\n"
- "FrameRate_Mode;Frame rate mode\n"
- "FrameRate_Mode_CFR;Constant\n"
- "FrameRate_Mode_VFR;Variable\n"
- "FrameRate_Nominal;Nominal frame rate\n"
- "FrameRate_Original;Original frame rate\n"
- "General;General\n"
- "Genre;Genre\n"
- "Genre_000;Blues\n"
- "Genre_001;Classic Rock\n"
- "Genre_002;Country\n"
- "Genre_003;Dance\n"
- "Genre_004;Disco\n"
- "Genre_005;Funk\n"
- "Genre_006;Grunge\n"
- "Genre_007;Hip-Hop\n"
- "Genre_008;Jazz\n"
- "Genre_009;Metal\n"
- "Genre_010;New Age\n"
- "Genre_011;Oldies\n"
- "Genre_012;Other\n"
- "Genre_013;Pop\n"
- "Genre_014;R&B\n"
- "Genre_015;Rap\n"
- "Genre_016;Reggae\n"
- "Genre_017;Rock\n"
- "Genre_018;Techno\n"
- "Genre_019;Industrial\n"
- "Genre_020;Alternative\n"
- "Genre_021;Ska\n"
- "Genre_022;Death Metal\n"
- "Genre_023;Pranks\n"
- "Genre_024;Soundtrack\n"
- "Genre_025;Euro-Techno\n"
- "Genre_026;Ambient\n"
- "Genre_027;Trip-Hop\n"
- "Genre_028;Vocal\n"
- "Genre_029;Jazz+Funk\n"
- "Genre_030;Fusion\n"
- "Genre_031;Trance\n"
- "Genre_032;Classical\n"
- "Genre_033;Instrumental\n"
- "Genre_034;Acid\n"
- "Genre_035;House\n"
- "Genre_036;Game\n"
- "Genre_037;Sound Clip\n"
- "Genre_038;Gospel\n"
- "Genre_039;Noise\n"
- "Genre_040;Alt. Rock\n"
- "Genre_041;Bass\n"
- "Genre_042;Soul\n"
- "Genre_043;Punk\n"
- "Genre_044;Space\n"
- "Genre_045;Meditative\n"
- "Genre_046;Instrumental Pop\n"
- "Genre_047;Instrumental Rock\n"
- "Genre_048;Ethnic\n"
- "Genre_049;Gothic\n"
- "Genre_050;Darkwave\n"
- "Genre_051;Techno-Industrial\n"
- "Genre_052;Electronic\n"
- "Genre_053;Pop-Folk\n"
- "Genre_054;Eurodance\n"
- "Genre_055;Dream\n"
- "Genre_056;Southern Rock\n"
- "Genre_057;Comedy\n"
- "Genre_058;Cult\n"
- "Genre_059;Gangsta Rap\n"
- "Genre_060;Top 40\n"
- "Genre_061;Christian Rap\n"
- "Genre_062;Pop/Funk\n"
- "Genre_063;Jungle\n"
- "Genre_064;Native American\n"
- "Genre_065;Cabaret\n"
- "Genre_066;New Wave\n"
- "Genre_067;Psychedelic\n"
- "Genre_068;Rave\n"
- "Genre_069;Showtunes\n"
- "Genre_070;Trailer\n"
- "Genre_071;Lo-Fi\n"
- "Genre_072;Tribal\n"
- "Genre_073;Acid Punk\n"
- "Genre_074;Acid Jazz\n"
- "Genre_075;Polka\n"
- "Genre_076;Retro\n"
- "Genre_077;Musical\n"
- "Genre_078;Rock & Roll\n"
- "Genre_079;Hard Rock\n"
- "Genre_080;Folk\n"
- "Genre_081;Folk-Rock\n"
- "Genre_082;National Folk\n"
- "Genre_083;Swing\n"
- "Genre_084;Fast-Fusion\n"
- "Genre_085;Bebop\n"
- "Genre_086;Latin\n"
- "Genre_087;Revival\n"
- "Genre_088;Celtic\n"
- "Genre_089;Bluegrass\n"
- "Genre_090;Avantgarde\n"
- "Genre_091;Gothic Rock\n"
- "Genre_092;Progressive Rock\n"
- "Genre_093;Psychedelic Rock\n"
- "Genre_094;Symphonic Rock\n"
- "Genre_095;Slow Rock\n"
- "Genre_096;Big Band\n"
- "Genre_097;Chorus\n"
- "Genre_098;Easy Listening\n"
- "Genre_099;Acoustic\n"
- "Genre_100;Humour\n"
- "Genre_101;Speech\n"
- "Genre_102;Chanson\n"
- "Genre_103;Opera\n"
- "Genre_104;Chamber Music\n"
- "Genre_105;Sonata\n"
- "Genre_106;Symphony\n"
- "Genre_107;Booty Bass\n"
- "Genre_108;Primus\n"
- "Genre_109;Porn Groove\n"
- "Genre_110;Satire\n"
- "Genre_111;Slow Jam\n"
- "Genre_112;Club\n"
- "Genre_113;Tango\n"
- "Genre_114;Samba\n"
- "Genre_115;Folklore\n"
- "Genre_116;Ballad\n"
- "Genre_117;Power Ballad\n"
- "Genre_118;Rhythmic Soul\n"
- "Genre_119;Freestyle\n"
- "Genre_120;Duet\n"
- "Genre_121;Punk Rock\n"
- "Genre_122;Drum Solo\n"
- "Genre_123;A Cappella\n"
- "Genre_124;Euro-House\n"
- "Genre_125;Dance Hall\n"
- "Genre_126;Goa\n"
- "Genre_127;Drum & Bass\n"
- "Genre_128;Club-House\n"
- "Genre_129;Hardcore\n"
- "Genre_130;Terror\n"
- "Genre_131;Indie\n"
- "Genre_132;BritPop\n"
- "Genre_133;Afro-Punk\n"
- "Genre_134;Polsk Punk\n"
- "Genre_135;Beat\n"
- "Genre_136;Christian Gangsta Rap\n"
- "Genre_137;Heavy Metal\n"
- "Genre_138;Black Metal\n"
- "Genre_139;Crossover\n"
- "Genre_140;Contemporary Christian\n"
- "Genre_141;Christian Rock\n"
- "Genre_142;Merengue\n"
- "Genre_143;Salsa\n"
- "Genre_144;Thrash Metal\n"
- "Genre_145;Anime\n"
- "Genre_146;JPop\n"
- "Genre_147;Synthpop\n"
- "Genre_148;Abstract\n"
- "Genre_149;Art Rock\n"
- "Genre_150;Baroque\n"
- "Genre_151;Bhangra\n"
- "Genre_152;Big Beat\n"
- "Genre_153;Breakbeat\n"
- "Genre_154;Chillout\n"
- "Genre_155;Downtempo\n"
- "Genre_156;Dub\n"
- "Genre_157;EBM\n"
- "Genre_158;Eclectic\n"
- "Genre_159;Electro\n"
- "Genre_160;Electroclash\n"
- "Genre_161;Emo\n"
- "Genre_162;Experimental\n"
- "Genre_163;Garage\n"
- "Genre_164;Global\n"
- "Genre_165;IDM\n"
- "Genre_166;Illbient\n"
- "Genre_167;Industro-Goth\n"
- "Genre_168;Jam Band\n"
- "Genre_169;Krautrock\n"
- "Genre_170;Leftfield\n"
- "Genre_171;Lounge\n"
- "Genre_172;Math Rock\n"
- "Genre_173;New Romantic\n"
- "Genre_174;Nu-Breakz\n"
- "Genre_175;Post-Punk\n"
- "Genre_176;Post-Rock\n"
- "Genre_177;Psytrance\n"
- "Genre_178;Shoegaze\n"
- "Genre_179;Space Rock\n"
- "Genre_180;Trop Rock\n"
- "Genre_181;World Music\n"
- "Genre_182;Neoclassical\n"
- "Genre_183;Audiobook\n"
- "Genre_184;Audio Theatre\n"
- "Genre_185;Neue Deutsche Welle\n"
- "Genre_186;Podcast\n"
- "Genre_187;Indie Rock\n"
- "Genre_188;G-Funk\n"
- "Genre_189;Dubstep\n"
- "Genre_190;Garage Rock\n"
- "Genre_191;Psybient\n"
- "Go to WebSite;Go to website\n"
- "Gop_OpenClosed;GOP, Open/Closed\n"
- "Gop_OpenClosed_Open;Open\n"
- "Gop_OpenClosed_Closed;Closed\n"
- "Gop_OpenClosed_FirstFrame;GOP, Open/Closed of first frame\n"
- "Grouping;Grouping\n"
- "h;h\n"
- "Header file;Create a header file\n"
- "Height;Height\n"
- "Height_CleanAperture;Clean aperture height\n"
- "Height_Original;Original height\n"
- "Help;Help\n"
- "Hint;Hint\n"
- "How many audio streams?;How many audio streams?\n"
- "How many chapters streams?;How many chapters streams?\n"
- "How many text streams?;How many text streams?\n"
- "How many video streams?;How many video streams?\n"
- "HTML;HTML\n"
- "ID;ID\n"
- "IdentClockStart;Ident Clock Start\n"
- "Image;Image\n"
- "Image stream(s);Image streams\n"
- "Image_Codec_List;Codecs Image\n"
- "ImageCount;Count of image streams\n"
- "Info;Info\n"
- "Instruments;Instruments\n"
- "Interlaced_BFF;Bottom Field First\n"
- "Interlaced_Interlaced;Interlaced\n"
- "Interlaced_PPF;Progressive\n"
- "Interlaced_Progressive;Progressive\n"
- "Interlaced_TFF;Top Field First\n"
- "Interlacement;Interlacement\n"
- "Interleave_Duration;Interleave, duration\n"
- "Interleave_Preload;Interleave, preload duration\n"
- "Interleave_VideoFrames;Interleave, duration\n"
- "Interleaved;Interleaved\n"
- "InternetMediaType;Internet media type\n"
- "IRCA;IRCA\n"
- "ISBN;ISBN\n"
- "ISRC;ISRC\n"
- "Keywords;Keywords\n"
- "Known codecs;Known codecs\n"
- "Known formats;Known formats\n"
- "Known parameters;Known parameters\n"
- "Label;Label\n"
- "Language;Language\n"
- "Language_aa;Afar\n"
- "Language_ab;Abkhazian\n"
- "Language_ae;Avestan\n"
- "Language_af;Afrikaans\n"
- "Language_ak;Akan\n"
- "Language_am;Amharic\n"
- "Language_an;Aragonese\n"
- "Language_ar;Arabic\n"
- "Language_as;Assamese\n"
- "Language_av;Avaric\n"
- "Language_ay;Aymara\n"
- "Language_az;Azerbaijani\n"
- "Language_ba;Bashkir\n"
- "Language_be;Belarusian\n"
- "Language_bg;Bulgarian\n"
- "Language_bh;Bihari\n"
- "Language_bi;Bislama\n"
- "Language_bm;Bambara\n"
- "Language_bn;Bengali\n"
- "Language_bo;Tibetan\n"
- "Language_br;Breton\n"
- "Language_bs;Bosnian\n"
- "Language_ca;Catalan\n"
- "Language_ce;Chechen\n"
- "Language_ch;Chamorro\n"
- "Language_co;Corsican\n"
- "Language_cr;Cree\n"
- "Language_cs;Czech\n"
- "Language_cu;Slave\n"
- "Language_cv;Chuvash\n"
- "Language_cy;Welsh\n"
- "Language_da;Danish\n"
- "Language_de;German\n"
- "Language_dv;Divehi\n"
- "Language_dz;Dzongkha\n"
- "Language_ee;Ewe\n"
- "Language_el;Greek\n"
- "Language_en;English\n"
- "Language_en-gb;English (Great Britain)\n"
- "Language_en-us;English (United States)\n"
- "Language_eo;Esperanto\n"
- "Language_es;Spanish\n"
- "Language_et;Estonian\n"
- "Language_eu;Basque\n"
- "Language_fa;Persian\n"
- "Language_ff;Fulah\n"
- "Language_fi;Finnish\n"
- "Language_fj;Fijian\n"
- "Language_fo;Faroese\n"
- "Language_fr;French\n"
- "Language_fy;Frisian\n"
- "Language_ga;Irish\n"
- "Language_gd;Gaelic\n"
- "Language_gl;Galician\n"
- "Language_gn;Guarani\n"
- "Language_gu;Gujarati\n"
- "Language_gv;Manx\n"
- "Language_ha;Hausa\n"
- "Language_he;Hebrew\n"
- "Language_hi;Hindi\n"
- "Language_ho;Hiri Motu\n"
- "Language_hr;Croatian\n"
- "Language_ht;Haitian\n"
- "Language_hu;Hungarian\n"
- "Language_hy;Armenian\n"
- "Language_hz;Herero\n"
- "Language_ia;Auxiliary Language Association\n"
- "Language_id;Indonesian\n"
- "Language_ie;Interlingue\n"
- "Language_ig;Igbo\n"
- "Language_ii;Sichuan Yi\n"
- "Language_ik;Inupiaq\n"
- "Language_Info;Language info\n"
- "Language_io;Ido\n"
- "Language_is;Icelandic\n"
- "Language_it;Italian\n"
- "Language_iu;Inuktitut\n"
- "Language_ja;Japanese\n"
- "Language_jv;Javanese\n"
- "Language_ka;Georgian\n"
- "Language_kg;Kongo\n"
- "Language_ki;Kikuyu\n"
- "Language_kj;Kuanyama\n"
- "Language_kk;Kazakh\n"
- "Language_kl;Kalaallisut\n"
- "Language_km;Khmer\n"
- "Language_kn;Kannada\n"
- "Language_ko;Korean\n"
- "Language_kr;Kanuri\n"
- "Language_ks;Kashmiri\n"
- "Language_ku;Kurdish\n"
- "Language_kv;Komi\n"
- "Language_kw;Cornish\n"
- "Language_ky;Kirghiz\n"
- "Language_la;Latin\n"
- "Language_lb;Luxembourgish\n"
- "Language_lg;Ganda\n"
- "Language_li;Limburgish\n"
- "Language_ln;Lingala\n"
- "Language_lo;Lao\n"
- "Language_lt;Lithuanian\n"
- "Language_lu;Luba-Katanga\n"
- "Language_lv;Latvian\n"
- "Language_mg;Malagasy\n"
- "Language_mh;Marshallese\n"
- "Language_mi;Maori\n"
- "Language_mk;Macedonian\n"
- "Language_ml;Malayalam\n"
- "Language_mn;Mongolian\n"
- "Language_mo;Moldavian\n"
- "Language_More;Language, more info\n"
- "Language_mr;Marathi\n"
- "Language_ms;Malay\n"
- "Language_mt;Maltese\n"
- "Language_mul;Multiple languages\n"
- "Language_my;Burmese\n"
- "Language_na;Nauru\n"
- "Language_nb;Norwegian Bokmal\n"
- "Language_nd;Ndebele\n"
- "Language_ne;Nepali\n"
- "Language_ng;Ndonga\n"
- "Language_nl;Dutch\n"
- "Language_nn;Norwegian Nynorsk\n"
- "Language_no;Norwegian\n"
- "Language_nr;Ndebele\n"
- "Language_nv;Navaho\n"
- "Language_ny;Nyanja\n"
- "Language_oc;Occitan\n"
- "Language_oj;Ojibwa\n"
- "Language_om;Oromo\n"
- "Language_or;Oriya\n"
- "Language_os;Ossetic\n"
- "Language_pa;Panjabi\n"
- "Language_pi;Pali\n"
- "Language_pl;Polish\n"
- "Language_ps;Pushto\n"
- "Language_pt;Portuguese\n"
- "Language_pt-br;Portuguese (Brazil)\n"
- "Language_qu;Quechua\n"
- "Language_rm;Raeto-Romance\n"
- "Language_rn;Rundi\n"
- "Language_ro;Romanian\n"
- "Language_ru;Russian\n"
- "Language_rw;Kinyarwanda\n"
- "Language_sa;Sanskrit\n"
- "Language_sc;Sardinian\n"
- "Language_sd;Sindhi\n"
- "Language_se;Northern Sami\n"
- "Language_sg;Sango\n"
- "Language_si;Sinhala\n"
- "Language_sk;Slovak\n"
- "Language_sl;Slovenian\n"
- "Language_sm;Samoan\n"
- "Language_sn;Shona\n"
- "Language_so;Somali\n"
- "Language_sq;Albanian\n"
- "Language_sr;Serbian\n"
- "Language_ss;Swati\n"
- "Language_st;Sotho\n"
- "Language_su;Sundanese\n"
- "Language_sv;Swedish\n"
- "Language_sw;Swahili\n"
- "Language_ta;Tamil\n"
- "Language_te;Telugu\n"
- "Language_tg;Tajik\n"
- "Language_th;Thai\n"
- "Language_ti;Tigrinya\n"
- "Language_tk;Turkmen\n"
- "Language_tl;Tagalog\n"
- "Language_tn;Tswana\n"
- "Language_to;Tonga\n"
- "Language_tr;Turkish\n"
- "Language_ts;Tsonga\n"
- "Language_tt;Tatar\n"
- "Language_tw;Twi\n"
- "Language_ty;Tahitian\n"
- "Language_ug;Uighur\n"
- "Language_uk;Ukrainian\n"
- "Language_ur;Urdu\n"
- "Language_uz;Uzbek\n"
- "Language_ve;Venda\n"
- "Language_vi;Vietnamese\n"
- "Language_vo;Volapuk\n"
- "Language_wa;Walloon\n"
- "Language_wo;Wolof\n"
- "Language_xh;Xhosa\n"
- "Language_yi;Yiddish\n"
- "Language_yo;Yoruba\n"
- "Language_za;Zhuang\n"
- "Language_zh;Chinese\n"
- "Language_zh-cn;Chinese (China)\n"
- "Language_zh-tw;Chinese (Taiwan)\n"
- "Language_zu;Zulu\n"
- "LawRating;Law rating\n"
- "LCCN;LCCN\n"
- "Library;Muxing library\n"
- "Lightness;Lightness\n"
- "LineUpStart;Line Up Start\n"
- "List;List\n"
- "Lyricist;Lyricist\n"
- "Lyrics;Lyrics\n"
- "Mastered_Date;Mastered date\n"
- "MasteredBy;Mastered by\n"
- "Matrix_Channel(s);Matrix encoding, Channel(s)\n"
- "Matrix_ChannelPositions;Matrix encoding, channel positions\n"
- "matrix_coefficients;Matrix coefficients\n"
- "Matrix_Format;Matrix encoding, format\n"
- "MediaInfo_About;MediaInfo provides easy access to technical and tag information about video and audio files.\r\nExcept the Mac App Store graphical user interface, it is open-source software, which means that it is free of charge to the end user and developers have freedom to study, to improve and to redistribute the program (BSD license)\n"
- "Menu;Menu\n"
- "Menu stream(s);Menu streams\n"
- "Menu_Codec_List;Menu codecs\n"
- "Menu_Hint;More possibilities\n"
- "Menu_No;No menu\n"
- "MenuCount;Count of menu streams\n"
- "MenuID;Menu ID\n"
- "mn;mn\n"
- "Mood;Mood\n"
- "More;More\n"
- "Movie;Movie name\n"
- "ms;ms\n"
- "MSDI;MSDI\n"
- "MusicBy;Music by\n"
- "MuxingMode;Muxing mode\n"
- "MuxingMode_MoreInfo;Muxing mode, more info\n"
- "MuxingMode_PackedBitstream;Packed bitstream\n"
- "Name;Name\n"
- "Nationality;Nationality\n"
- "NetworkName;Network name\n"
- "New;New\n"
- "Newest version;Check for new versions (requires Internet connection)\n"
- "NewVersion_Menu;A new version is available\n"
- "NewVersion_Question_Content;A new version (v%Version%) is available, would you like to download it?\n"
- "NewVersion_Question_Title;A new version was released!\n"
- "No;No\n"
- "Not yet;Not yet\n"
- "NumColors;Number of colors\n"
- "OK;OK\n"
- "One output file per input file;One output file per input file\n"
- "Open;Open\n"
- "OpenCandy_01;Downloading ________\n"
- "OpenCandy_02;__% Complete\n"
- "OpenCandy_03;Internet connection interrupted\n"
- "OpenCandy_04;________ download complete\n"
- "OpenCandy_05;Click to install ________\n"
- "OpenCandy_06;Are you sure you wish to cancel the install?\r\nIf you wish to postpone the install until later, select 'No'.\r\nNote: You may select Exit from the menu to defer installation until after the next time you reboot.\n"
- "OpenCandy_07;Download of ________ has been paused.\r\nClick on the tray icon to resume downloading.\n"
- "OpenCandy_08;A critical error has occurred. Installation of _________ will be aborted.\n"
- "OpenCandy_09;Pause download\n"
- "OpenCandy_10;Cancel install\n"
- "OpenCandy_11;Resume download\n"
- "OpenCandy_12;Exit Installer\n"
- "OpenCandy_13;___________ - Recommended by ____________\n"
- "OpenCandy_14;Downloading _________\n"
- "OpenCandy_15;___________, the software recommended to you by ___________, is now downloading at your requestWe will let you know when it is ready to be installed.\n"
- "OpenCandy_16;___________ is ready for installation\n"
- "OpenCandy_17;___________ is now fully downloaded. Please click on 'Install' to proceed.\n"
- "OpenCandy_18;___________ of ___________ downloaded\n"
- "OpenCandy_19;Powered by OpenCandy\n"
- "OpenCandy_20;Learn more at OpenCandy.com\n"
- "OpenCandy_21;Install\n"
- "OpenCandy_22;Installation of ___________\n"
- "OpenCandy_23;This will cancel the installation of ___________\r\nAre you sure you wish to exit?\n"
- "OpenCandy_24;Pause\n"
- "OpenCandy_25;Your download has been paused. Click 'Resume' when you are ready to continue.\n"
- "OpenCandy_26;Resume\n"
- "OpenCandy_27;Install Now\n"
- "OpenCandy_28;Pause Download\n"
- "OpenCandy_29;Resume Download\n"
- "OpenCandy_30;Cancel Install\n"
- "OpenCandy_31;Please choose an installation option\n"
- "OpenCandy_32;Install ___________\n"
- "OpenCandy_33;Don't Install\n"
- "OpenCandy_34;Please select an install option\n"
- "OpenCandy_35;______ recommends this software\n"
- "OpenCandy_36;Your current installation will not be interrupted\n"
- "OpenCaptionsLanguage;Open Captions Language\n"
- "OpenCaptionsPresent;Open Captions Present\n"
- "OpenCaptionsType;Open Captions Type\n"
- "Options;Options\n"
- "Options_Hint;Preferences\n"
- "Original;Original\n"
- "OriginalNetworkName;Original network name\n"
- "OriginalSourceForm;Original source form\n"
- "OriginalSourceMedium;Original source medium\n"
- "Originator;Originator\n"
- "Other;Other\n"
- "OtherIdentifier;Other Identifier\n"
- "OtherIdentifierType;Other Identifier Type\n"
- "Output;Output\n"
- "Output format;Output format\n"
- "OverallBitRate;Overall bit rate\n"
- "OverallBitRate_Maximum;Maximum Overall bit rate\n"
- "OverallBitRate_Minimum;Minimum Overall bit rate\n"
- "OverallBitRate_Mode;Overall bit rate mode\n"
- "OverallBitRate_Nominal;Nominal Overall bit rate\n"
- "Part;Part\n"
- "Part_Count;Total count\n"
- "PartNumber;Part Number\n"
- "PartTotal;Part Total\n"
- "Performer;Performer\n"
- "Period;Period\n"
- "Phone;Phone\n"
- "PictureRatio;Picture Ratio\n"
- "PixelAspectRatio;Pixel aspect ratio\n"
- "PixelAspectRatio_CleanAperture;Clean aperture pixel aspect ratio\n"
- "PixelAspectRatio_Original;Original pixel aspect ratio\n"
- "PlayCounter;PlayCounter\n"
- "Played_Count;Times played\n"
- "Played_First_Date;First played\n"
- "Played_Last_Date;Last played\n"
- "PlayTime;PlayTime\n"
- "Position;Position\n"
- "Position_Total;Total\n"
- "Preferences;Preferences\n"
- "PrimaryAudioLanguage;Primary Audio Language\n"
- "Producer;Producer\n"
- "ProductionDesigner;Production designer\n"
- "ProductionNumber;Production Number\n"
- "ProductionStudio;Production studio\n"
- "ProductPlacement;Product Placement\n"
- "ProgrammeHasText;Programme Has Text\n"
- "ProgrammeTextLanguage;Programme Text Language\n"
- "ProgrammeTitle;Programme Title\n"
- "Publisher;Publisher\n"
- "Purchased_Date;purchased date\n"
- "Quote character;Quote character\n"
- "RadioStation;Radio station\n"
- "Rating;Rating\n"
- "Recorded_Date;Recorded date\n"
- "Recorded_Location;Recorded location\n"
- "Released_Date;Released date\n"
- "RemixedBy;Remixed by\n"
- "ReplayGain_Gain;Replay gain\n"
- "ReplayGain_Peak;Replay gain peak\n"
- "Resolution;Resolution\n"
- "s;s\n"
- "SamplingCount;Samples count\n"
- "SamplingRate;Sampling rate\n"
- "Save;Save\n"
- "ScanOrder;Scan order\n"
- "ScanOrder_Original;Original scan order\n"
- "ScanOrder_Stored;Stored scan order\n"
- "ScanOrder_StoredDisplayedInverted;Scan order, stored/displayed order inverted\n"
- "ScanOrder_StoreMethod;Scan order, store method\n"
- "ScanType;Scan type\n"
- "ScanType_Original;Original scan type\n"
- "ScanType_StoreMethod;Scan type, store method\n"
- "ScreenplayBy;Screenplay by\n"
- "Season;Season\n"
- "SecondaryAudioLanguage;Secondary Audio Language\n"
- "see below;see below\n"
- "Send HeaderFile;Please send me the Header file here : http://sourceforge.net/projects/mediainfo/ (Bug section)\n"
- "Separator_Columns;columns separator\n"
- "Separator_Lines;lines separator\n"
- "SeriesTitle;Series Title\n"
- "ServiceChannel;Service channel number\n"
- "ServiceName;Service name\n"
- "ServiceProvider;Service provider\n"
- "ServiceType;Service type\n"
- "Set;Set\n"
- "Set_Count;Set count\n"
- "Setup;Setup\n"
- "Sharpness;Sharpness\n"
- "Sheet;Sheet\n"
- "Sheet (Complete);Sheet (Complete)\n"
- "Shell extension;Explorer extension (in Windows Explorer, right click on a file, there will be a MediaInfo option)\n"
- "Shell extension, folder;For folders too\n"
- "Shell InfoTip;Explorer Tooltip (in Windows Explorer, move the mouse over the file, info will be displayed)\n"
- "ShimName;Shim Name\n"
- "ShimVersion;Shim Version\n"
- "Show menu;Show menu\n"
- "Show toolbar;Show toolbar\n"
- "SigningPresent;Signing Present\n"
- "SignLanguage;Sign Language\n"
- "Sort;Sorted by\n"
- "SoundEngineer;Sound engineer\n"
- "Source;Source\n"
- "Source_Duration;Source duration\n"
- "Source_FrameCount;Source frame count\n"
- "Source_SamplingCount;Source sample count\n"
- "Source_StreamSize;Source stream size\n"
- "Source_StreamSize_Encoded;Source encoded stream size\n"
- "Standard;Standard\n"
- "StoreMethod_InterleavedFields;Interleaved fields\n"
- "StoreMethod_SeparatedFields;Separated fields\n"
- "StoreMethod_SeparatedFields_1;Separated fields (1 field per block)\n"
- "StoreMethod_SeparatedFields_2;Separated fields (2 fields per block)\n"
- "Stream;Stream\n"
- "Stream_MoreInfo;More information about the stream\n"
- "StreamCount;Count of stream of this kind\n"
- "StreamID;Stream ID\n"
- "StreamKind;Kind of stream\n"
- "StreamKindID;Stream identifier\n"
- "StreamKindPos;Stream identifier\n"
- "StreamSize;Stream size\n"
- "StreamSize_Encoded;Encoded stream size\n"
- "StreamSize_Proportion;Proportion of this stream\n"
- "Subject;Subject\n"
- "SubTrack;SubTrack\n"
- "Summary;Summary\n"
- "Supported formats;Supported formats\n"
- "Supported?;Supported?\n"
- "Synopsis;Synopsis\n"
- "SystemId;Id\n"
- "Tagged_Application;Tagging application\n"
- "Tagged_Date;Tagged date\n"
- "Technician;Technician\n"
- "TermsOfUse;Terms of use\n"
- "TertiaryAudioLanguage;Tertiary Audio Language\n"
- "Text;Text\n"
- "Text - Custom;Text - Custom\n"
- "Text (HTML);Text (HTML)\n"
- "Text stream(s);Text streams\n"
- "Text streams;Text streams\n"
- "Text_Codec_List;Text codecs\n"
- "Text_No;No text\n"
- "Text1;First text stream\n"
- "Text2;Second text stream\n"
- "Text3;Third text stream\n"
- "TextCount;Count of text streams\n"
- "TextlessElementsExist;Textless Elements Exist\n"
- "ThanksTo;Thanks to\n"
- "Thousands separator;Thousands separator\n"
- "TimeCode;Time code\n"
- "TimeCode_FirstFrame;Time code of first frame\n"
- "TimeCode_Settings;Time code settings\n"
- "TimeCode_Source;Time code source\n"
- "TimeCode_Striped;Time code, striped\n"
- "TimeStamp;Time stamp\n"
- "TimeZone;Timezone\n"
- "Title;Title\n"
- "Title_More;Title, more info\n"
- "Total;Total\n"
- "TotalNumberOfParts;Total Number Of Parts\n"
- "TotalProgrammeDuration;Total Programme Duration\n"
- "Track;Track name\n"
- "Track_Count;Track count\n"
- "transfer_characteristics;Transfer characteristics\n"
- "Translator;Translator\n"
- "Tree;Tree\n"
- "Tree & Text;Tree & Text\n"
- "Type;Type\n"
- "UniqueID;Unique ID\n"
- "Unknown;Unknown\n"
- "Url;Url\n"
- "Video;Video\n"
- "Video stream(s);Video stream(s)\n"
- "Video_Codec_List;Codecs Video\n"
- "Video_Delay;Delay relative to video\n"
- "Video_No;No video\n"
- "Video0_Delay;Video0 delay\n"
- "Video1;First video stream\n"
- "VideoComments;Video Comments\n"
- "VideoCount;Count of video streams\n"
- "View;View\n"
- "View_Hint;Change the means of viewing information\n"
- "Warning : more streams in the files;Warning : there are more streams in the files\n"
- "Web;Web\n"
- "WebSite_Audio;Go to the web site of this audio codec\n"
- "WebSite_Audio_More;Go to the web site (%Url%) to find this audio codec\n"
- "WebSite_General;Go to the web site of a player for this file\n"
- "WebSite_General_More;Go to the web site of a player for this file\n"
- "WebSite_Text;Go to the web site of this text codec\n"
- "WebSite_Text_More;Go to the web site (%Url%) to find this text codec\n"
- "WebSite_Url;http://MediaArea.net/MediaInfo\n"
- "WebSite_Video;Go to the web site of this video codec\n"
- "WebSite_Video_More;Go to the web site (%Url%) to find this video codec\n"
- "Width;Width\n"
- "Width_CleanAperture;Clean aperture width\n"
- "Width_Original;Original width\n"
- "WriteMe;Write mail to author\n"
- "WriteToTranslator;Write to translator\n"
- "Written_Date;Written date\n"
- "Written_Location;Written location\n"
- "WrittenBy;Written by\n"
- "Yes;Yes\n"
- "Your system;Your system\n"
- "ZZ_Automatic_Percent;100\n"
- "ZZ_AutomaticLanguage_Percent;100\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Format (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "AAF;;;M;Aaf;;aaf;;\n"
- "AIFF;;;M;Riff;Apple/SGI;aiff aifc aif;audio/x-aiff;\n"
- "AMV;;;M;Riff;Chinese hack of AVI;amv;;http://en.wikipedia.org/wiki/AMV_video_format\n"
- "AVI;;;M;Riff;Audio Video Interleave;avi;video/vnd.avi;\n"
- "BDAV;;;M;Bdav;Blu-ray Video;m2ts;;\n"
- "Blu-ray Clip info;;;M;Bdmv;;clpi;;\n"
- "Blu-ray Index;;;M;Bdmv;;bdmv;;\n"
- "Blu-ray Movie object;;;M;Bdmv;;bdmv;;\n"
- "Blu-ray Playlist;;;M;Bdmv;;mpls;;\n"
- "CDDA;;;M;Riff;;cda;;\n"
- "CDXA;;;M;Cdxa;;dat;;\n"
- "DASH MPD;;;M;DashMpd;;mpd;application/dash+xml;;Lossy\n"
- "DV;;;M;DvdDif;;dv dif;video/DV;;Lossy\n"
- "DivX;;;M;Riff;Hack of AVI;divx;video/vnd.avi;http://www.divx.com\n"
- "DPG;;;M;Dpg;Nintendo DS;dpg;;\n"
- "DVD Video;;;M;Dvdv;;ifo;;\n"
- "Flash Video;;;M;Flv;;flv;application/x-shockwave-flash;http://www.macromedia.com/go/getflashplayer\n"
- "GXF;;;M;Gxf;SMPTE 360M;gxf;;\n"
- "HDS F4M;Flash Media Manifest;;M;HdsF4m;;f4m\n"
- "HLS;;;M;Hls;;m3u8;\n"
- "Google Video;;;M;Riff;Hack of AVI;gvi;;http://video.google.com/playerdownload.html\n"
- "ISM;Internet Streaming Media;;M;Ism;;ism;;\n"
- "IVF;;;M;Ivf;;ivf;;\n"
- "LXF;;;M;Lxf;;lxf;video/lxf;\n"
- "Matroska;;;M;Mk;;mkv mk3d mka mks;;http://packs.matroska.org/\n"
- "MPEG-PS;;;M;MpegPs;;mpeg mpg m2p vob pss;video/MP2P;\n"
- "MPEG-TS;;;M;MpegTs;;ts m2t m2s m2ts m4t m4s ts tp trp;video/MP2T;\n"
- "MPEG-4;;;M;Mpeg4;;mp4 m4v m4a m4b m4p 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma f4v;video/mp4;\n"
- "MTV;;;M;Other;Chinese hack of MPEG-1 layer 3;mtv;;http://en.wikipedia.org/wiki/Chinese_MP4/MTV_Player\n"
- "MXF;;;M;Mxf;;mxf;application/mxf;\n"
- "NSV;;;M;Nsv;Nullsoft Streaming Video;nsv;;http://winamp.com\n"
- "Ogg;;;M;Ogg;;ogg ogm opus;video/ogg;http://www.free-codecs.com/Ogg_DirectShow_Filters_download.htm\n"
- "PMP;;;M;Pmp;Playstation Portable;pmp;;\n"
- "PTX;;;M;Ptx;;ptx;;\n"
- "QuickTime;;;M;Mpeg4;Original Apple specifications;mov qt;video/quicktime;http://www.apple.com/quicktime/download/standalone.html\n"
- "RealMedia;;;M;Rm;;rm rmvb ra;application/vnd.rn-realmedia;\n"
- "RIFF-MMP;;;M;Riff;RIFF Multimedia Movie;;;\n"
- "ShockWave;;;M;Swf;;swf;application/x-shockwave;http://www.macromedia.com/go/getflashplayer\n"
- "SKM;;;M;Skm;Sky Korean Mobilephone;skm;;http://www.isky.co.kr/html/cs/download.jsp\n"
- "Windows Media;;;M;Wm;;asf wmv wma;video/x-ms-wmv;\n"
- "WebM;;;M;Mkv;;webm;video/webm;http://www.webmproject.org/\n"
- "AVC;;;V;Avc;Advanced Video Codec;avc h264;video/H264;http://developers.videolan.org/x264.html\n"
- "AVS Video;;;V;AvsV;Audio Video Standard, Video part;;;http://www.avs.org.cn/;Lossy\n"
- "Dirac;;;V;Dirac;;drc;;http://diracvideo.org/;Lossy\n"
- "FFV1;;;V;;;;;;Lossless\n"
- "FFV2;;;V;;;;;;Lossless\n"
- "FLC;;;V;Flic;;fli flc;;http://www.chem.nott.ac.uk/flc.html;Lossy\n"
- "FLI;;;V;Flic;;fli flc;;http://www.chem.nott.ac.uk/flc.html;Lossy\n"
- "FLIC;;;V;Flic;;fli flc;;http://www.chem.nott.ac.uk/flc.html;Lossy\n"
- "H.261;;;V;;;h261;video/H261;;Lossy\n"
- "H.263;;;V;;;h263;video/H263;;Lossy\n"
- "HEVC;;;V;Hevc;High Efficiency Video Coding;avc h264;video/H265;http://www.itu.int\n"
- "MPEG Video;;;V;Mpegv;;mpgv mpv mp1v m1v mp2v m2v;video/MPV;;Lossy\n"
- "MPEG-4 Visual;;;V;Mpeg4;;m4v mp4v;video/MP4V-ES;;Lossy\n"
- "Theora;;;V;;;;;http://www.theora.org/;Lossy\n"
- "VC-1;;;V;Vc1;;vc1;video/vc1;;Lossy\n"
- "YUV4MPEG2;;;V;Y4m;;y4m;;;Lossless\n"
- "VP8;;;V;;;;;http://www.webmproject.org/;Lossy\n"
- "YUV;;;V;;;;;;Lossless\n"
- "AAC;;;A;;Advanced Audio Codec;;;;Lossy\n"
- "AC-3;;;A;Ac3;Audio Coding 3;ac3;;;Lossy\n"
- "ADIF;;;A;Adif;Audio Data Interchange Format;;;\n"
- "ADTS;;;A;Adts;Audio Data Transport Stream;aac;;\n"
- "ALS;;;A;Als;MPEG-4 Audio Lossless Coding;als;;http://www.nue.tu-berlin.de/forschung/projekte/lossless/mp4als.html#downloads;Lossless\n"
- "AMR;;;A;Amr;Adaptive Multi-Rate;amr;audio/AMR;http://www.apple.com/quicktime/download/standalone.html\n"
- "Atrac;;;A;;;;audio/ATRAC;;Lossy\n"
- "Atrac3;;;A;;;;audio/ATRAC3;;Lossy\n"
- "AU;;;A;Au;uLaw/AU Audio File;au;audio/basic;\n"
- "DolbyE;;;A;Aes3;;dde\n"
- "DTS;;;A;Dts;Digital Theater Systems;dts;;;Lossy\n"
- "DTS-HD;;;A;Dts;Digital Theater Systems;dts;;;Lossy\n"
- "E-AC-3;;;A;Ac3;Audio Coding 3;dd+ ec3;audio/eac3;;Lossy\n"
- "Extended Module;;;A;ExtendedModule;;xm;;\n"
- "FLAC;;;A;Flac;Free Lossless Audio Codec;flac;;http://flac.sourceforge.net/\n"
- "G.719;;;A;;;;audio/G719;;Lossy\n"
- "G.722;;;A;;;;audio/G722;;Lossy\n"
- "G.722.1;;;A;;;;audio/G7221;;Lossy\n"
- "G.723;;;A;;;;audio/G723;;Lossy\n"
- "G.729;;;A;;;;audio/G729;;Lossy\n"
- "G.729.1;;;A;;;;audio/G7291;;Lossy\n"
- "Impulse Tracker;;;A;ImpulseTracker;;it;;\n"
- "LA;;;A;La;Lossless Audio Codec;la;;http://www.lossless-audio.com/;Lossless\n"
- "MIDI;;;A;Riff;RIFF Musical Instrument Digital Interface;midi mid kar;audio/midi;\n"
- "Module;;;A;Module;;mod;;\n"
- "Monkey's Audio;;;A;Ape;;ape mac;;http://www.monkeysaudio.com/;Lossless\n"
- "MPEG Audio;;;A;Mpega;;m1a mpa1 mp1 m2a mpa2 mp2 mp3;audio/mpeg;;Lossy\n"
- "OpenMG;;;A;OpenMG;;oma omg aa3;;;Lossy\n"
- "Musepack SV7;;;A;Mpc;;mpc;;http://www.musepack.net;Lossy\n"
- "Musepack SV8;;;A;Mpc;;mp+;;http://www.musepack.net;Lossy\n"
- "QCELP;;;A;;;;audio/QCELP;\n"
- "RIFF-MIDI;;;A;Riff;RIFF Musical Instrument Digital Interface;;;\n"
- "RKAU;RK Audio;;A;Rkau;;rka;;http://www.msoftware.co.nz\n"
- "Scream Tracker 3;;;A;S3m;;s3m;;\n"
- "Shorten;;;A;;;shn;;http://etree.org/shnutils/shorten/;Lossless\n"
- "SLS;;;A;;MPEG-4 Scalable Lossless Coding;sls;;http://www.chiariglione.org/mpeg/technologies/mp04-sls/index.htm;Lossless\n"
- "Speex;;;A;;;;audio/speex;http://www.speex.org/;Lossy\n"
- "Opus;;;A;;;;audio/opus;http://opus-codec.org/;Lossy\n"
- "TAK;;;A;;;tak;;http://thbeck.de/Tak/Tak.html;Lossless\n"
- "TrueHD;;;A;Ac3;;dts;;;Lossless\n"
- "TwinVQ;;;A;TwinVQ;Transform domain Weighted INterleave Vector Quantization;vqf;;http://www.twinvq.org/english/index_en.html\n"
- "Vorbis;;;A;;;;audio/vorbis;http://www.vorbis.com/;Lossy\n"
- "Wave;;;A;Riff;;wav;audio/vnd.wave;\n"
- "Wave64;;;A;Riff;;w64;;\n"
- "WavPack;;;A;Wvpk;;wv wvc;;http://www.wavpack.com\n"
- "Arri Raw;;;I;ArriRaw;;ari;;\n"
- "Bitmap;;;I;Bmp;;bmp;image/bmp;;Lossless\n"
- "BPG;;;I;Bpg;Better Portable Graphics;bpg;image/bpg;http://bellard.org/bpg/\n"
- "DDS;;;I;Dds;DirectDraw Surface;dds;;\n"
- "DPX;;;I;Dpx;;dpx cin;;;Lossless\n"
- "EXR;;;I;Exr;;exr;;;Lossless\n"
- "DIB;;;I;Riff;RIFF Device Independent Bitmap;;;;Lossless\n"
- "GIF;;;I;Gif;Graphics Interchange Format;gif;image/gif;;Lossless\n"
- "ICO;;;I;Ico;;ico;image/vnd.microsoft.icon;;Lossless\n"
- "JNG;;;I;Jng;JPEG Network Graphic;jng;;;Lossy\n"
- "JPEG;;;I;Jpeg;;jpeg jpg jpe;image/jpeg;;Lossy\n"
- "JPEG 2000;;;I;Jpeg;;jp2;image/jp2;http://www.morgan-multimedia.com/JPEG 2000/\n"
- "LZ77;;;I;;;;;\n"
- "MNG;;;I;Mng;Multiple-Image Network Graphic;mng;;;Lossless\n"
- "PCX;;;I;pcx;Personal Computer eXchange;pcx;image/pcx;;Lossless\n"
- "PNG;;;I;Png;Portable Network Graphic;png;image/png;;Lossless\n"
- "PSD;;;I;Psd;Photoshop File Format;psd;image/psd;http://www.adobe.com/;Lossless\n"
- "RIFF Palette;;;I;Riff;RIFF Palette;;;\n"
- "RLE;;;I;;Run-length encoding;rle;;\n"
- "TIFF;;;I;Tiff;;tiff tif;image/tiff;\n"
- "TGA;;;I;Tga;;tga;image/tga;\n"
- "7-Zip;;;C;7z;;7z;;http://7-zip.org\n"
- "ACE;;;C;Ace;;ace;;http://winace.com\n"
- "ELF;;;C;Elf;;so;;\n"
- "ISO 9660;;;C;Iso9660;;iso;;\n"
- "MZ;;;C;Mz;;exe dll;;\n"
- "RAR;;;C;Rar;From Rarlabs;rar;application/x-rar-compressed;http://rarlabs.com\n"
- "ZIP;;;C;Zip;;zip;application/zip;http://winzip.com\n"
- "Adobe encore DVD;;;T;Other;;txt;;http://www.adobe.fr/products/encore/;Lossless\n"
- "AQTitle;;;T;Other;;aqt;;http://www.volny.cz/aberka/czech/aqt.html;Lossless\n"
- "ASS;;;T;Other;;ssa;;http://ffdshow.sourceforge.net/tikiwiki/tiki-index.php?page=Getting+ffdshow;Lossless\n"
- "Captions 32;;;T;Other;;txt;;;Lossless\n"
- "Captions Inc;;;T;Other;;txt;;;Lossless\n"
- "CPC Captioning;;;T;Other;;txt;;http://www.cpcweb.com/Captioning/cap_software.htm;Lossless\n"
- "Cheeta;;;T;Other;;asc;;;Lossless\n"
- "N19;;;T;N19;;stl;;;Lossless\n"
- "PDF;;;T;Pdf;;pdf;;\n"
- "SAMI;;;T;Sami;;smi sami;;;Lossless\n"
- "SCC;;;T;SCC;;scc sc2;;;Lossless\n"
- "SubRip;;;T;SubRip;;srt;;http://ffdshow.sourceforge.net/tikiwiki/tiki-index.php?page=Getting+ffdshow;Lossless\n"
- "TTML;;;T;TTML;;dfxp;;;Lossless\n"
- "SSA;;;T;Other;;ssa;;http://ffdshow.sourceforge.net/tikiwiki/tiki-index.php?page=Getting+ffdshow;Lossless\n"
- "WebVTT;;;T;WebVTT;;vtt;;;Lossless\n"
- "Blender;;;O;Other;;blenders;;http://www.blender3d.com\n"
- "AutoCAD;;;O;Other;;;;http://www.autodesk.com\n"
- "PlayLater Video;;;V;Other;;;;http://www.playon.tv/playlater\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_General_Mpeg4 (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "M4V ;MPEG-4;;;\n"
- "isom;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;Base Media\n"
- "iso2;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;Base Media\n"
- "iso4;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;Base Media\n"
- "mp41;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;Base Media / Version 1\n"
- "mp42;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;Base Media / Version 2\n"
- "avc1;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;JVT\n"
- "3gp1;MPEG-4;;;http://www.3gpp.org/;3GPP Media Release 1\n"
- "3gp2;MPEG-4;;;http://www.3gpp.org/;3GPP Media Release 2\n"
- "3gp3;MPEG-4;;;http://www.3gpp.org/;3GPP Media Release 3\n"
- "3gp4;MPEG-4;;;http://www.3gpp.org/;3GPP Media Release 4\n"
- "3gp5;MPEG-4;;;http://www.3gpp.org/;3GPP Media Release 5\n"
- "3gp6;MPEG-4;;;http://www.3gpp.org/;3GPP Media Release 6 Basic\n"
- "3gp6;MPEG-4;;;http://www.3gpp.org/;3GPP Media Release 6 Progressive Download\n"
- "3gp6;MPEG-4;;;http://www.3gpp.org/;3GPP Media Release 6 Streaming Servers\n"
- "3gp7;MPEG-4;;;http://www.3gpp.org/;3GPP Media Release 7 Streaming Servers\n"
- "3g2a;MPEG-4;;;http://www.3gpp2.org/;3GPP2 Media\n"
- "3ge6;MPEG-4;;;http://www.3gpp.org/;3GPP Release 6 MBMS Extended Presentation\n"
- "3ge7;MPEG-4;;;http://www.3gpp.org/;3GPP Release 7 MBMS Extended Presentation\n"
- "3gg6;MPEG-4;;;http://www.3gpp.org/;3GPP Release 6 General\n"
- "3gp8;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "3gp9;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "CAQV;MPEG-4;;;http://world.casio.com/;Casio\n"
- "FACE;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;Facebook\n"
- "isml;MPEG-4;IIS Smooth Streaming file format;;http://www.apple.com/quicktime/download/standalone.html;ISML\n"
- "JP20;MPEG-4;;;http://gpac.sourceforge.net/;JPEG 2000\n"
- "JPM ;MPEG-4;;;http://www.iso.org/;JPEG 2000 Compound Image\n"
- "JPX ;MPEG-4;;;http://www.iso.org/;JPEG 2000 w/ extensions\n"
- "KDDI;MPEG-4;;;http://www.3gpp2.org/;3GPP2 EZMovie for KDDI 3G Cellphones\n"
- "MJ2S;MPEG-4;;;http://www.iso.org/;Motion JPEG 2000 Simple Profile\n"
- "MJP2;MPEG-4;;;http://www.iso.org/;Motion JPEG 2000 General Profile\n"
- "MQT ;MPEG-4;;;http://www.sony.com/;Sony/Mobile QuickTime\n"
- "MSNV;MPEG-4;;;http://www.sony.com/;Sony PSP\n"
- "ndas;MPEG-4;;;http://www.nerodigital.com;Nero Digital AAC Audio\n"
- "ndsc;MPEG-4;;;http://www.nerodigital.com;Nero Digital Cinema Profile\n"
- "ndsh;MPEG-4;;;http://www.nerodigital.com;Nero Digital HDTV Profile\n"
- "ndsm;MPEG-4;;;http://www.nerodigital.com;Nero Digital Mobile Profile\n"
- "ndsp;MPEG-4;;;http://www.nerodigital.com;Nero Digital Portable Profile\n"
- "ndss;MPEG-4;;;http://www.nerodigital.com;Nero Digital Standard Profile\n"
- "ndxc;MPEG-4;;;http://www.nerodigital.com;Nero Digital AVC Cinema Profile\n"
- "ndxh;MPEG-4;;;http://www.nerodigital.com;Nero Digital AVC HDTV Profile\n"
- "ndxm;MPEG-4;;;http://www.nerodigital.com;Nero Digital AVC Mobile Profile\n"
- "ndxp;MPEG-4;;;http://www.nerodigital.com;Nero Digital AVC Portable Profile\n"
- "ndxs;MPEG-4;;;http://www.nerodigital.com;Nero Digital AVC Standard Profile\n"
- "mmp4;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;Mobile version\n"
- "mp71;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;ISO 14496-12 MPEG-7 meta data\n"
- "mp7b;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;ISO 14496-12 MPEG-7 meta data\n"
- "piff;MPEG-4;Protected Interoperable File Format;;http://www.apple.com/quicktime/download/standalone.html;PIFF\n"
- "qt ;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;QuickTime\n"
- "SDV ;MPEG-4;;;http://www.sdcard.org/;SD Memory Card Video\n"
- "M4A ;MPEG-4;;;http://www.apple.com/itunes/;Apple audio with iTunes info\n"
- "M4B ;MPEG-4;;;http://www.apple.com/itunes/;Apple audio with iTunes position\n"
- "M4P ;MPEG-4;;;http://www.apple.com/itunes/;AES encrypted audio\n"
- "M4VP;MPEG-4;;;http://www.apple.com/iphone/;Apple iPhone\n"
- "iphE;MPEG-4;;;http://www.apple.com/iphone/;Apple iPhone (Cellular)\n"
- "M4VH;MPEG-4;;;http://www.apple.com/appletv/;Apple TV\n"
- "QTCA;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;Quicktime compressed archive\n"
- "CAQV;MPEG-4;;;;Casio Digital Camera\n"
- "QTI ;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;QuickTime Image\n"
- "f4v ;MPEG-4;;;http://www.apple.com/quicktime/download/standalone.html;Adobe Flash\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_Video_Matroska (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "V_UNCOMPRESSED;RGB;;Raw uncompressed video frames\n"
- "V_DIRAC;Dirac;;;http://diracvideo.org/\n"
- "V_MPEG4/IS0/SP;MPEG-4 Visual;;There is a zero instead of a O, may be a problem;http://www.divx.com\n"
- "V_MPEG4/IS0/ASP;MPEG-4 Visual;;There is a zero instead of a O, may be a problem;http://www.xvid.org/Downloads.15.0.html\n"
- "V_MPEG4/IS0/AP;MPEG-4 Visual;;There is a zero instead of a O, may be a problem;http://ffdshow-tryout.sourceforge.net/\n"
- "V_MPEG4/IS0/AVC;AVC;;There is a zero instead of a O, may be a problem;http://ffdshow-tryout.sourceforge.net/\n"
- "V_MPEG4/ISO/SP;MPEG-4 Visual;;Simple Profile;http://www.divx.com\n"
- "V_MPEG4/ISO/ASP;MPEG-4 Visual;;Advanced Simple Profile;http://www.xvid.org/Downloads.15.0.html\n"
- "V_MPEG4/ISO/AP;MPEG-4 Visual;;Advanced Profile;http://ffdshow-tryout.sourceforge.net/\n"
- "V_MPEG4/ISO/AVC;AVC;;;http://ffdshow-tryout.sourceforge.net/\n"
- "V_MPEGH/ISO/HEVC;HEVC;;\n"
- "V_MPEG4/MS/V2;MPEG-4 Visual;MS MPEG-4 v2;MS MPEG-4 v2;http://ffdshow-tryout.sourceforge.net/\n"
- "V_MPEG4/MS/V3;MPEG-4 Visual;MS MPEG-4 v3;MS MPEG-4 v3;http://ffdshow-tryout.sourceforge.net/\n"
- "V_MPEG1;MPEG Video;;MPEG 1 or 2 Video;http://ffdshow-tryout.sourceforge.net/\n"
- "V_MPEG2;MPEG Video;;MPEG 1 or 2 Video;http://ffdshow-tryout.sourceforge.net/\n"
- "V_PRORES;ProRes;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "V_REAL/RV10;RealVideo 1;;RealVideo 1.0 aka RealVideo 5;http://www.real.com\n"
- "V_REAL/RV20;RealVideo 2;;RealVideo 2.0 aka G2 and RealVideo G2+SVT;http://www.real.com\n"
- "V_REAL/RV30;RealVideo 3;;RealVideo 3.0 aka RealVideo 8;http://www.real.com\n"
- "V_REAL/RV40;RealVideo 4;;RealVideo 4.0 aka RealVideo 9;http://www.real.com\n"
- "V_THEORA;Theora;;;http://www.theora.org\n"
- "V_VP8;VP8;;;http://www.webmproject.org/\n"
- "V_VP9;VP9;;;http://www.webmproject.org/\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_Video_Mpeg4 (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "2vuy;YUV;;;;;;YUV;4:2:2\n"
- "2Vuy;YUV;;;;;;YUV;4:2:2\n"
- "8BPS;RGB;;;;;;RGB;8:8:8\n"
- "ac16;YUV;;;;;;YUV;4:2:2\n"
- "ac32;YUV;;;;;;YUV;4:2:2\n"
- "acBG;YUV;;;;;;YUV;4:2:2\n"
- "apch;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;422 HQ;;YUV;4:2:2\n"
- "apcn;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;422;;YUV;4:2:2\n"
- "apcs;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;422 LT;;YUV;4:2:2\\n"
- "apco;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;422 Proxy;;YUV;4:2:2\n"
- "ap4c;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;4444;;;4:4:4\n"
- "ap4h;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;4444;;;4:4:4\n"
- "ap4x;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;4444 XQ;;;4:4:4\n"
- "ai11;AVC;;Advanced Video Coding;http://ffdshow-tryout.sourceforge.net;;\n"
- "ai12;AVC;;Advanced Video Coding;http://ffdshow-tryout.sourceforge.net;;\n"
- "ai13;AVC;;Advanced Video Coding;http://ffdshow-tryout.sourceforge.net;;\n"
- "ai14;AVC;;Advanced Video Coding;http://ffdshow-tryout.sourceforge.net;;\n"
- "ai15;AVC;;Advanced Video Coding;http://ffdshow-tryout.sourceforge.net;;\n"
- "ai1q;AVC;;Advanced Video Coding;http://ffdshow-tryout.sourceforge.net;;\n"
- "ai5q;AVC;;Advanced Video Coding;http://ffdshow-tryout.sourceforge.net;;\n"
- "AV1x;YUV;;;;;;YUV;4:2:2\n"
- "avc1;AVC;;Advanced Video Coding;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "avcp;AVC;;Advanced Video Coding Parameters;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "AVDJ;JPEG;;Avid\n"
- "AVdv;DV;;Avid;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "AVd1;DV;;Avid;http://www.apple.com/quicktime/download/standalone.html;;\n"
- "AVdn;VC-3;DNxHD;Avid;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "AVmp;MPEG Video;Avid IMX;;;;Version 2;;\n"
- "avr ;JPEG;;;;;;\n"
- "b16g;Gray;;;;;;Y;16\n"
- "b32a;Gray/Alpha;;;;;;YA;16:16\n"
- "b48r;RGB;;;;;;RGB;16:16:16\n"
- "b64a;RGBA;;;;;;RGBA;16:16:16:16\n"
- "base;RGBA;;;;;;RGBA;16:16:16:16\n"
- "blit;RGBA;;;;;;RGBA;16:16:16:16\n"
- "blnd;Alpha Compositor;;;;;;\n"
- "blur;Blur;;;;;;CMYK\n"
- "CFHD;CineForm;;CineForm High-Definition (HD) wavelet codec;http://www.cineform.com/;;;\n"
- "CHQX;Canopus HQX;;;;;;\n"
- "CLLC;Canopus Lossless;;;;;;\n"
- "CUVC;Canopus HQ;;;;;;\n"
- "cmyk;CMYK;;;;;;\n"
- "cvid;Cinepack;;;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "drac;Dirac;;Dirac Video Coder;http://www.bbc.co.uk/rd/projects/dirac/index.shtml;;;\n"
- "dslv;Cross Fade;;;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "DV10;Digital Voodoo;;Digital Voodoo 10 bit Uncompressed 4:2:2 codec;http://www.digitalvoodoo.net/;;;\n"
- "dv5n;DV;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "dv5p;DV;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "dvc ;DV;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "dvcp;DV;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "dvh1;DV;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "dvh2;DV;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "dvh3;DV;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "dvh4;DV;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "dvh5;DV;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "dvh6;DV;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "dvhp;DV;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "dvhq;DV;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "DVOO;Digital Voodoo;;Digital Voodoo 8 bit Uncompressed 4:2:2 codec;http://www.digitalvoodoo.net/;;;\n"
- "DVOR;Digital Voodoo;;Digital Voodoo intermediate raw;http://www.digitalvoodoo.net/;;;\n"
- "dvpp;DV;DVCPRO;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "DVTV;Digital Voodoo;;Digital Voodoo intermediate 2vuy;http://www.digitalvoodoo.net/;;;\n"
- "DVVT;Digital Voodoo;;Digital Voodoo intermediate v210;http://www.digitalvoodoo.net/;;;\n"
- "encv;(Encrypted);;;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "FFV1;FFV1;;;;;;\n"
- "gif ;M-GIF;;;;;;\n"
- "Hap1;Hap;;Hap Video Codec;https://github.com/Vidvox/hap;;;\n"
- "Hap5;Hap Alpha;;Hap Video Codec;https://github.com/Vidvox/hap;;;\n"
- "HapY;Hap Q;;Hap Video Codec;https://github.com/Vidvox/hap;;;\n"
- "h261;H.261;;;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "h263;H.263;;;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "H263;H.263;;;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "h264;H.264;;;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "hcpa;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;High;;YUV;4:2:2\n"
- "HD10;Digital Voodoo;;Digital Voodoo 10 bit Uncompressed 4:2:2 HD codec;http://www.digitalvoodoo.net/;;;\n"
- "hdv1;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdv2;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdv3;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdv4;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdv5;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdv6;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdv7;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdv8;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdv9;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdva;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdvb;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdvc;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdvd;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdve;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hdvf;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "hvc1;HEVC;;High Efficiency Video Coding;http://www.itu.int/;;;\n"
- "hev1;HEVC;;High Efficiency Video Coding;http://www.itu.int/;;;\n"
- "icod;AIC;;Apple Intermediate Codec;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:0\n"
- "j420;YUV;;;;;;YUV;4:2:0\n"
- "jpeg;JPEG;;;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "kpcd;Photo CD;;;;;;\n"
- "LMP2;MPEG Video;;;;;;YUV\n"
- "M105;Matrox;;;http://www.matrox.com/;;;\n"
- "MMES;MPEG Video;;;;;;YUV\n"
- "mmes;MPEG Video;;;;;;YUV\n"
- "mjp2;JPEG 2000;;;;;;\n"
- "mjpa;JPEG;;;;;;\n"
- "mjpb;JPEG;;;;;;\n"
- "mp4v;MPEG-4 Visual;;;;;;\n"
- "mpeg;MPEG Video;;;;;;\n"
- "mx3n;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "mx3p;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "mx4n;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "mx4p;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "mx5n;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "mx5p;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "myuv;YUV;;;;;;YUV;4:2:0\n"
- "ncpa;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;Normal;;YUV;4:2:2\n"
- "ovc1;VC-1;;Smooth Streaming Media Video;http://alexzambelli.com/blog/2009/02/10/smooth-streaming-architecture/;;;\n"
- "png ;PNG;;;;;;\n"
- "PIM1;MPEG Video;;;;;;YUV\n"
- "PIM2;MPEG Video;;;;;;YUV\n"
- "PNTG;MacPaint;;Apple MacPaint image format;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "raw ;RGB;;;http://www.apple.com/quicktime/download/standalone.html;;;RGB\n"
- "rle ;RLE;;;http://www.apple.com/quicktime/download/standalone.html;;;RGB\n"
- "rpza;Road Pizza;;;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "s263;H.263;;;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "Shr0;SheerVideo;;Generic SheerVideo codec;http://www.bitjazz.com/;;;\n"
- "Shr1;SheerVideo;;SheerVideo RGB;http://www.bitjazz.com/;;;\n"
- "Shr2;SheerVideo;;SheerVideo Y'CbCr[A] 4:4:4;http://www.bitjazz.com/;;;\n"
- "Shr3;SheerVideo;;SheerVideo Y'CbCr 4:2:2;http://www.bitjazz.com/;;;\n"
- "Shr4;SheerVideo;;SheerVideo Y'CbCr 4:2:2;http://www.bitjazz.com/;;;\n"
- "SV10;Sorenson;;Sorenson Media Video R1;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "SVQ1;Sorenson 1;;Sorenson Media Video 1 (Apple QuickTime 3);http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "SVQ2;Sorenson 2;;Sorenson Media Video 2 (Apple QuickTime 4);http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "SVQ3;Sorenson 3;;Sorenson Media Video 3 (Apple QuickTime 5);http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "v210;YUV;AJA Video Systems Xena;;;;;YUV;4:2:2\n"
- "V210;YUV;AJA Video Systems Xena;;;;;YUV;4:2:2\n"
- "vc-1;VC-1;;SMPTE VC-1;http://www.smpte.org/;;;YUV\n"
- "WMV3;VC-1;WMV3;Windows Media Video 9;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx;;;\n"
- "WRLE;Bitmap;;Windows BMP image format;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd50;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd51;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd52;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd53;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd54;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd55;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd56;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd57;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd58;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd59;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd5a;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd5b;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd5c;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd5d;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd5e;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xd5f;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdhd;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdh2;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdv0;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdv1;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdv2;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdv3;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdv4;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdv5;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdv6;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdv7;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdv8;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdv9;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdva;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdvb;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdvc;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdvd;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdve;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "xdvf;MPEG Video;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "yuv2;YUV;;;;;;YUV;4:2:2\n"
- "yuvs;YUV;;;;;;YUV;4:2:2\n"
- "yuvu;YUV;;;;;;YUV;4:2:2\n"
- "yuvx;YUV;;;;;;YUV;4:2:2\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_Video_Real (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "RV10;RealVideo 1;;Based on H.263, Real Player 5;http://www.real.com\n"
- "RV13;RealVideo 1.3;;Based on H.263, Real Player 5;http://www.real.com\n"
- "RV20;RealVideo 2;;Based on H.263, Real Player 6;http://www.real.com\n"
- "RV30;RealVideo 3;;Between H.263 and AVC (H.264), Real Player 8;http://www.real.com\n"
- "RV40;RealVideo 4;;Based on AVC (H.264), Real Player 9;http://www.real.com\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_Video_Riff (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "0x00000000;RGB;;Basic Windows bitmap format. 1, 4 and 8 bpp versions are palettised. 16, 24 and 32bpp contain raw RGB samples;http://www.fourcc.org/indexrgb.htm;;;;\n"
- "0x01000000;RLE;;Run length encoded 8bpp RGB image;http://www.fourcc.org/indexrgb.htm;;;;\n"
- "0x02000010;MPEG Video;;;;;;YUV;4:2:0\n"
- "0x02000000;RLE;;Run length encoded 4bpp RGB image;http://www.fourcc.org/indexrgb.htm;;;;\n"
- "0x03000000;RGB;;Raw RGB with arbitrary sample packing within a pixel. Packing and precision of R, G and B components is determined by bit masks for each;http://www.fourcc.org/indexrgb.htm;;;;\n"
- "1978;RGB;A.M.Paredes predictor;;http://www.pegasusimaging.com/cgi-bin/download2.cgi?LVIDB;;;RGB;\n"
- " BIT;RGB;;;;;;RGB;\n"
- " JPG;JPEG;;;;;;YUV\n"
- " PNG;PNG;;;;;;RGB;\n"
- " RAW;RGB;;;http://www.fourcc.org/indexrgb.htm;;;RGB;\n"
- " raw;RGB;;;http://www.fourcc.org/indexrgb.htm;;;RGB;\n"
- " RGB;RGB;;;http://www.fourcc.org/indexrgb.htm;;;RGB;\n"
- " RL4;RLE;;;http://www.fourcc.org/indexrgb.htm;;;RGB;;4\n"
- " RL8;RLE;;;http://www.fourcc.org/indexrgb.htm;;;RGB;;8\n"
- "2VUY;YUV;Optibase VideoPump;;;;;YUV;4:2:2\n"
- "3IV0;MPEG-4 Visual;3ivX;3ivX pre-1.0;http://www.3ivx.com/download/;;;YUV;4:2:0\n"
- "3IV1;MPEG-4 Visual;3ivX;3ivX 1.0-3.5;http://www.3ivx.com/download/;;;YUV;4:2:0\n"
- "3IV2;MPEG-4 Visual;3ivX;3ivX 4.0;http://www.3ivx.com/download/;;;YUV;4:2:0\n"
- "3IVD;MPEG-4 Visual;3ivX;;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "3IVX;MPEG-4 Visual;3ivX;;http://www.3ivx.com/download/;;;YUV;4:2:0\n"
- "3VID;MPEG-4 Visual;3ivX;;http://www.3ivx.com/download/;;;YUV;4:2:0\n"
- "8BPS;RGB;Apple;;http://ffdshow-tryout.sourceforge.net/;;;RGBA\n"
- "AAS4;RLE;Autodesk;;http://mirror01.iptelecom.net.ua/~video/codecs/Autodesk.Animator.v1.11.Codec.exe;;;RGB\n"
- "AASC;RLE;Autodesk;;http://mirror01.iptelecom.net.ua/~video/codecs/Autodesk.Animator.v1.11.Codec.exe;;;RGB\n"
- "ABYR;Kensigton low;Kensington;Low resolution, low frame rate (6fps) for digital cameras;;;;\n"
- "ACTL;ACT-L2;Streambox;;http://www.streambox.com/products/act-L2_codec.htm;;;\n"
- "ADV1;WaveCodec;Loronix;;http://www.loronix.com/products/video_clips/wavecodec.asp;;;\n"
- "ADVJ;JPEG;Avid;;;;;YUV\n"
- "AEIK;Indeo 3.2;;Vector Quantization;;;;\n"
- "AEMI;MPEG Video;VideoONE;MPEG-1-I Capture;http://www.array.com;;;YUV;4:2:0\n"
- "AFLC;FLC;Autodesk;;http://mirror01.iptelecom.net.ua/~video/codecs/Autodesk.Animator.v1.11.Codec.exe;;;\n"
- "AFLI;FLI;Autodesk;;http://mirror01.iptelecom.net.ua/~video/codecs/Autodesk.Animator.v1.11.Codec.exe;;;\n"
- "AHDV;CineForm;CineForm HD;;http://www.cineform.com/products/ConnectHD.htm;;;\n"
- "AJPG;JPEG;;22fps for digital cameras;;;;YUV\n"
- "ALPH;Ziracom;;Ziracom Digital Communications Inc.;;;;\n"
- "AMM2;AMV2 MT;AMV2 MT Video Codec Version 2;;http://amamaman.hp.infoseek.co.jp/english/amv2_e.html;;;\n"
- "AMPG;MPEG-1;VideoONE;;http://www.array.com;;;YUV;4:2:0\n"
- "AMR ;AMR;;Speech codec;;;;\n"
- "AMV3;AMV3;AMV3 Video Codec Version 3;;http://amamaman.hp.infoseek.co.jp/english/amv2_e.html;;;YUV;4:2:0\n"
- "ANIM;RDX;Intel;;;;;\n"
- "AP41;MPEG-4 Visual;AngelPotion;Hack of MS MPEG-4 v3;http://www.divxity.com/download/ap4v1-702.exe;;;YUV;4:2:0\n"
- "AP42;MPEG-4 Visual;AngelPotion;Hack of MS MPEG-4 v3;http://www.divxity.com/download/ap4v1-702.exe;;;YUV;4:2:0\n"
- "apch;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;High;;YUV;4:2:2\n"
- "apcn;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV;4:2:2\n"
- "apcs;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;LT;;YUV;4:2:2\n"
- "apco;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;Proxy;;YUV;4:2:2\n"
- "ap4c;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;;;;4:4:4\n"
- "ap4h;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;;;;4:4:4\n"
- "ASLC;AlparySoft Lossless;;;http://www.free-codecs.com/download/Alparysoft_Lossless_Video_Codec.htm;;;\n"
- "ASV1;Asus 1;;;ftp://ftp.asuscom.de/pub/asuscom/treiber/vga/ASUS_VGA_TOOLS/asv2dec.zip;;;\n"
- "ASV2;Asus 2;;;ftp://ftp.asuscom.de/pub/asuscom/treiber/vga/ASUS_VGA_TOOLS/asv2dec.zip;;;\n"
- "ASVX;Asus X;;;ftp://ftp.asuscom.de/pub/asuscom/treiber/vga/ASUS_VGA_TOOLS/asv2dec.zip;;;\n"
- "ATM4;MPEG-4 Visual;Nero;;http://www.nero.com;;;YUV;4:2:0\n"
- "AUR2;YUV;;Auravision Aura 2;;;;YUV;4:2:2\n"
- "AURA;YUV;;Auravision Aura 1;;;;YUV;4:1:1\n"
- "AUVX;AUVX;;USH GmbH;;;;\n"
- "AV1X;Avid 1:1;;;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe;;;\n"
- "AVC1;AVC;;;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "avc1;AVC;;;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "AVD1;DV;Avid;;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe;;;YUV;\n"
- "AVDJ;JPEG;Avid;;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe;;;YUV\n"
- "AVDN;Avid HD;;;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe;;;;\n"
- "AVDV;DV;Avid;;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe;;;YUV;\n"
- "AVI1;JPEG;MainConcept;;;;;YUV\n"
- "AVI2;JPEG;MainConcept;;;;;YUV\n"
- "AVID;JPEG;Avid;;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe;;;YUV\n"
- "AVIS;AviSynth;;Wrapper for AviSynth (Dummy);http://ffdshow-tryout.sourceforge.net/;;;;\n"
- "AVMP;Avid IMX;;;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe;;;;\n"
- "AVR ;JPEG;Avid NuVista;Avid ABVB/NuVista JPEG with Alpha-channel;;;;YUV\n"
- "AVRn;JPEG;Avid JPEG;;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe;;;YUV\n"
- "AVRN;JPEG;Avid JPEG;;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe;;;YUV\n"
- "AVUI;Avid;;Avid Meridien Uncompressed with Alpha-channel;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe;;;;\n"
- "AVUP;Avid;;Avid 10bit Packed (Quick Time);http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe;;;;\n"
- "AYUV;YUV;YUV;;;;;YUVA;4:4:4;8\n"
- "AZPR;QuickTime;;;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "AZRP;QuickTime;;;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "BGR ;RGB;RGB;;;;;RGB\n"
- "BHIV;BeHere iVideo;;;;;;\n"
- "BINK;Bink;;;;;;\n"
- "BIT ;RGB;RGB;;;;;RGB\n"
- "BITM;H.261;Microsoft;;;;;YUV\n"
- "BLOX;MPEG Video;Blox;;http://www.ii.uj.edu.pl/~jezabek/blox/blox-0.1.0b.zip;;;YUV;4:2:0\n"
- "BLZ0;MPEG-4 Visual;DivX;DivX for Blizzard Decoder Filter;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "BT20;MediaStream;;Conexant ProSummer MediaStream;;;;\n"
- "BTCV;Composite;;Conexant Composite Video;;;;\n"
- "BTVC;Composite;;Conexant Composite Video;;;;\n"
- "BW00;Wavelet;BergWave;;;;;\n"
- "BW10;MPEG-1;Broadway;Data Translation Broadway MPEG Capture/Compression;;;;YUV\n"
- "BXBG;RGB;Boxx;;;;;RGB\n"
- "BXRG;RGB;Boxx;;;;;RGB\n"
- "BXY2;YUV;Boxx;10-bit;;;;YUV\n"
- "BXYV;YUV;Boxx;;;;;YUV\n"
- "CC12;YUV;Intel;;;;;YUV\n"
- "CDV5;DV;Canopus;Canopus SD50/DVHD;http://www.cineform.com/products/ConnectHD.htm;;;YUV\n"
- "CDVC;DV;Canopus;Canopus DV (DV);http://www.cineform.com/products/ConnectHD.htm;;;YUV\n"
- "CDVH;DV;Canopus;Canopus SD50/DVHD;http://www.cineform.com/products/ConnectHD.htm;;;YUV\n"
- "CFCC;JPEG;DPS Perception;Dummy format - only AVI header;;;;YUV\n"
- "CFHD;CineForm;;CineForm 10-bit Visually Perfect HD (Wavelet);;;;\n"
- "CGDI;Camcorder;;Camcorder Video (MS Office 97);;;;\n"
- "CHAM;Champagne;;Winnov Caviara Champagne;;;;\n"
- "CHQX;Canopus HQX;;;;;;\n"
- "CJPG;JPEG;Creative;Creative Video Blaster Webcam Go JPEG;;;;YUV\n"
- "CLJR;YUV;Cirrus Logic;Less than 8 bits per Y, U and V sample.;http://www.fourcc.org/indexyuv.htm;;;YUV;4:1:1\n"
- "CLLC;Canopus Lossless;;;;;;\n"
- "CLPL;YUV;;Format similar to YV12 but including a level of indirection.;;;;YUV\n"
- "CM10;MediaShow;;CyberLink Corporation;http://www.cyberlink.com;;;\n"
- "CMYK;CMYK;;Common Data Format in Printing;;;;\n"
- "COL0;MPEG-4 Visual;;Hacked MS MPEG-4 v3;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "COL1;MPEG-4 Visual;;Hacked MS MPEG-4 v3;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "CPLA;YUV;Weitek;;;;;YUV;4:2:0\n"
- "CRAM;MS Video;;Microsoft Video 1;;;;\n"
- "CSCD;CamStudio;;RenderSoft CamStudio lossless (LZO & GZIP compression);;;;\n"
- "CT10;TalkingShow;;CyberLink Corporation;http://www.cyberlink.com;;;\n"
- "CTRX;Citrix;;Citrix Scalable Video;;;;\n"
- "CUVC;Canopus HQ;;;;;;\n"
- "CVID;Cinepack;;;http://www.cinepak.com/text.html;;;\n"
- "cvid;Cinepack;;;http://www.cinepak.com/text.html;;;\n"
- "CWLT;WLT;;Microsoft Color WLT DIB;;;;\n"
- "CYUV;YUV;Creative Labs;;http://www.fourcc.org/indexyuv.htm;;;YUV;4:2:2\n"
- "cyuv;YUV;;;http://www.fourcc.org/indexyuv.htm;;;YUV;4:2:2\n"
- "CYUY;YUV;ATI;;http://www.fourcc.org/indexyuv.htm;;;YUV;4:2:2\n"
- "D261;H.261;DEC;;;;;\n"
- "D263;H.263;DEC;;;;;\n"
- "DAVC;AVC;Dicas;;;;;YUV;4:2:0\n"
- "DC25;DV;MainConcept;;;;;YUV\n"
- "DCAP;DV;Pinnacle;;;;;YUV\n"
- "DCL1;Data Connextion;;Conferencing;;;;\n"
- "DCT0;WniWni;;;;;;\n"
- "DFSC;VFW;;DebugMode FrameServer VFW;;;;\n"
- "DIB ;RGB;;;;;;RGB\n"
- "DIV1;MPEG-4 Visual;FFMpeg;Hacked MS MPEG-4 V1;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "DIV2;MPEG-4 Visual;MS MPEG-4 1/2;;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "DIV3;MPEG-4 Visual;DivX 3 Low;;http://www.divx.com;;;YUV;4:2:0\n"
- "DIV4;MPEG-4 Visual;DivX 3 Fast;;http://www.divx.com;;;YUV;4:2:0\n"
- "DIV5;MPEG-4 Visual;DivX 5;;http://www.divx.com;;;YUV;4:2:0\n"
- "DIV6;MPEG-4 Visual;MS MPEG-4 v3;;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "DIVX;MPEG-4 Visual;DivX 4;Project Mayo;http://mediaarea.net/DIVX;;;YUV;4:2:0\n"
- "divx;MPEG-4 Visual;DivX;Mainly used by Google;http://www.divx.com;;;YUV;4:2:0\n"
- "DJPG;JPEG;Broadway 101;Data Translation, Inc.;;;;YUV\n"
- "DM4V;MPEG-4 Visual;Dicas;;;;;YUV;4:2:0\n"
- "DMB1;JPEG;Rainbow;Matrox Rainbow Runner hardware compression;http://mirror01.iptelecom.net.ua/~video/codecs/PICVideo.MJPG.v2.10.27.codec.exe;;;YUV\n"
- "DMB2;JPEG;Paradigm;;;;;YUV\n"
- "DMK2;V36 PDA;;ViewSonic V36 PDA Video;;;;\n"
- "DP02;MPEG-4 Visual;DynaPel;;;;;YUV;4:2:0\n"
- "DP16;YUV;Matsushita;With DPCM 6-bit compression;;;;YUV;4:1:1\n"
- "DP18;YUV;Matsushita;With DPCM 8-bit compression;;;;YUV;4:1:1\n"
- "DP26;YUV;Matsushita;With DPCM 6-bit compression;;;;YUV;4:2:2\n"
- "DP28;YUV;Matsushita;With DPCM 8-bit compression;;;;YUV;4:2:2\n"
- "DP96;YUV;Matsushita;With DPCM 6-bit compression;;;;YUV\n"
- "DP98;YUV;Matsushita;With DPCM 8-bit compression;;;;YUV\n"
- "DP9L;YUV;Matsushita;With DPCM 6-bit compression;;;;YUV\n"
- "DPS0;JPEG;DPS Reality;Dummy format - only AVI header;;;;YUV\n"
- "DPSC;JPEG;DPS PAR;Dummy format - only AVI header;;;;YUV\n"
- "DRWX;DV;Pinnacle;;;;;YUV\n"
- "DSVD;DV;Microsoft;;;;;YUV\n"
- "DTMT;Media-100;;;;;\n"
- "DTNT;Media-100;;;;;\n"
- "DUCK;TrueMotion S;Duck Corporation;;;;\n"
- "DV10;RGB;BlueFish;BlueFish444 (lossless RGBA, YUV 10-bit);;;;RGB\n"
- "DV25;DV;DVCPro;;;;;YUV\n"
- "dv25;DV;DVCPro;;;;;YUV\n"
- "DV50;DV;DVCPro5;;;;;YUV\n"
- "dv50;DV;DVCPro5;;;;;YUV\n"
- "DVAN;DV;Pinnacle DV300;;;;;YUV\n"
- "DVC ;DV;Apple;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "DVCP;DV;Apple;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "DVCS;DV;MainConcept;;;;;YUV\n"
- "DVE2;DV;Insoft DVE-2;InSoft DVE-2 Videoconferencing;;;;YUV\n"
- "DVH1;DV;Pinnacle;;;;;YUV\n"
- "dvhd;DV;HD;;;;;YUV\n"
- "DVIS;DV;DualMoon;;;;;YUV\n"
- "DVL ;DV;Radius;;;;;YUV\n"
- "DVLP;DV;Radius;;;;;YUV\n"
- "DVMA;DV;Darim;;;;;YUV\n"
- "DVNM;DVNM;;Matsushita Electric Industrial Co., Ltd.;;;;\n"
- "DVOR;RGB;BlueFish;BlueFish444 (lossless RGBA, YUV 10-bit);;;;RGB\n"
- "DVPN;DV;Apple;;;;;YUV\n"
- "DVPP;DV;Apple;;;;;YUV\n"
- "DVR ;MPEG Video;ASF;;;;;YUV;4:2:0\n"
- "DVR1;Targa2000;;;;;;\n"
- "DVRS;DV;DualMoon;;;;;YUV\n"
- "dvsd;DV;Sony;;;;;YUV\n"
- "dvsl;DV;Sony;;;;;YUV\n"
- "DVSL;DV;;;;;;YUV\n"
- "DVX1;DVX 1 SP;;Lucent DVX1000SP Video Decoder;;;;\n"
- "DVX2;DVX 2 S;;Lucent DVX2000S Video Decoder;;;;\n"
- "DVX3;DVX 3 S;;Lucent DVX3000S Video Decoder;;;;\n"
- "DX50;MPEG-4 Visual;DivX 5;;http://mediaarea.net/DX50;;;YUV;4:2:0\n"
- "DXGM;EA GameVideo;;;;;;\n"
- "DXT1;DirectX TC;;DirectX Compressed Texture (1bit alpha channel)\n"
- "DXT2;DirectX TC;;DirectX Compressed Texture\n"
- "DXT3;DirectX TC;;DirectX Compressed Texture (4bit alpha channel)\n"
- "DXT4;DirectX TC;;DirectX Compressed Texture\n"
- "DXT5;DirectX TC;;DirectX Compressed Texture (3bit alpha channel with interpolation)\n"
- "DXTC;DirectX TC;;DirectX Texture Compression\n"
- "DXTn;DirectX TC;;Microsoft Compressed Texture\n"
- "DXTN;DirectX TC;;Microsoft DirectX Compressed Texture (DXTn)\n"
- "EKQ0;Elsa KQ;;Elsa graphics card quick\n"
- "ELK0;Elsa LK;;Elsa graphics card\n"
- "EM2V;Elymonyx MPEG-2;;Etymonix MPEG-2 I-frame\n"
- "EQK0;Elsa;;Elsa graphics card quick\n"
- "ESCP;Escape;;Eidos Escape\n"
- "ETV1;eTreppid 1;;eTreppid Video 1\n"
- "ETV2;eTreppid 2;;eTreppid Video 2\n"
- "ETVC;eTreppid C;;eTreppid Video C\n"
- "FFDS;FFDS;;;http://ffdshow-tryout.sourceforge.net/;;;\n"
- "FFV1;FFV1;;;http://ffdshow-tryout.sourceforge.net/;;;\n"
- "FFV2;FFV2;;;http://ffdshow-tryout.sourceforge.net/;;;\n"
- "FFVH;HuffYUV;;;http://ffdshow-tryout.sourceforge.net/;;;\n"
- "FLIC;FLI/FLC;Autodesk;;;;;\n"
- "FLJP;DField JPEG;;D-Vision Field Encoded JPEG with LSI (or Targa emulation);;;;\n"
- "FLV1;Sorenson Spark;;;http://ffdshow-tryout.sourceforge.net/;;;\n"
- "FLV4;VP6;On2;;http://ftp.pub.cri74.org/pub/win9x/video/codecs/VP6/vp6_vfw_codec.exe;Heightened Sharpness;;\n"
- "FMJP;JPEG;D-Vision;;;;;YUV\n"
- "FMP4;MPEG-4 Visual;;;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "FPS1;Fraps;;;http://www.fraps.com/;;;\n"
- "FRLE;JPEG;SoftLab-Nsk;SoftLab-NSK Y16 + Alpha RLE;;;;YUV\n"
- "FRWA;JPEG;SoftLab-Nsk;SoftLab-NSK Vision Forward JPEG with Alpha-channel;;;;YUV\n"
- "FRWD;JPEG;SoftLab-Nsk;SoftLab-NSK Vision Forward JPEG;;;;YUV\n"
- "FRWT;JPEG;SoftLab-Nsk;SoftLab-NSK Vision Forward JPEG with Alpha-channel;;;;YUV\n"
- "FRWU;JPEG;SoftLab-Nsk;SoftLab-NSK Vision Forward Uncompressed;;;;YUV\n"
- "FVF1;Itered Fractal;;;;;;\n"
- "FVFW;FVFW;;;http://ffdshow-tryout.sourceforge.net/;;;\n"
- "FXT1;3DFX;;;;;;\n"
- "G2M2;GoToMeeting2;;Citrix Systems, Inc.;http://www.gotomeeting.com/;;;\n"
- "G2M3;GoToMeeting3;;Citrix Systems, Inc.;http://www.gotomeeting.com/;;;\n"
- "GEPJ;JPEG;White Pine;;;;;YUV\n"
- "GJPG;Grand Tech GT891x;;;;;;\n"
- "GLCC;GigaLink;;;;;;\n"
- "GLZW;LZW;Gabest;;http://sourceforge.net/project/showfiles.php?group_id=82303&package_id=84358;;;\n"
- "GMP4;GeoVision Advanced MPEG-4;;;http://www.geovision.com.tw/;;;\n"
- "GM40;GeoVision Advanced MPEG-4;;;http://www.geovision.com.tw/;;;\n"
- "GPEG;JPEG;Gabest;;http://sourceforge.net/project/showfiles.php?group_id=82303&package_id=84358;;;YUV\n"
- "GPJM;JPEG;Pinnacle;;;;;YUV\n"
- "GREY;YUV;;Simple grayscale video;http://www.fourcc.org/indexyuv.htm;;;YUV\n"
- "GWLT;MS GWLT;;Microsoft Greyscale WLT DIB;;;;\n"
- "GXVE;ViVD V2;SoftMedia;;;;;\n"
- "H260;H.260;;;;;;\n"
- "H261;H.261;;;;;;\n"
- "H262;MPEG Video;;;;;;YUV;4:2:0\n"
- "H263;H.263;;;;;;\n"
- "h263;H.263;;;http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "H264;AVC;;;;;;YUV;4:2:0\n"
- "h264;AVC;;;;;;YUV;4:2:0\n"
- "H265;H.265;;;;;;\n"
- "H266;H.266;;;;;;\n"
- "H267;H.267;;;;;;\n"
- "H268;H.268;;;;;;\n"
- "H269;H.263;;;;;;\n"
- "HD10;RGB;BlueFish;BlueFish444 (lossless RGBA, YUV 10-bit);;;;RGB\n"
- "HDX4;Jomigo HDX4;;;;;;\n"
- "HFYU;HuffYUV;;;;;;\n"
- "HMCR;Rendition;;Rendition Motion Compensation Format;;;;\n"
- "HMRR;Rendition;;Rendition Motion Compensation Format;;;;\n"
- "i263;H.263;;;;;;\n"
- "I420;YUV;;8 bit Y plane followed by 8 bit 2x2 subsampled U and V planes.;;;;\n"
- "IAN ;Indeo 4;;;;;;\n"
- "ICLB;CellB;;InSoft CellB Videoconferencing;;;;\n"
- "IDM0;Wavelets 2;;IDM Motion Wavelets 2.0;;;;\n"
- "IF09;H.261;Microsoft;;;;;\n"
- "IFO9;YUV;Intel;;;;;YUV\n"
- "IGOR;PowerDVD;;;;;;\n"
- "IJPG;JPEG;Intergraph;;;;;YUV\n"
- "ILVC;Layered Video;Intel;;;;;\n"
- "ILVR;H.263+;;;;;;\n"
- "IMAC;MotionComp;;Intel hardware motion compensation.;;;;\n"
- "IMC1;YUV;;As YV12, except the U and V planes each have the same stride as the Y plane;;;;YUV\n"
- "IMC2;YUV;;Similar to IMC1, except that the U and V lines are interleaved at half stride boundaries;;;;YUV\n"
- "IMC3;YUV;;As IMC1, except that U and V are swapped;;;;YUV\n"
- "IMC4;YUV;;As IMC2, except that U and V are swapped;;;;YUV\n"
- "IMG ;YUV;;;;;;YUV\n"
- "IMJG;Accom JPEG;;Accom SphereOUS JPEG with Alpha-channel;;;;\n"
- "IPDV;I-O DV;;I-O Data Device Giga AVI DV;;;\n"
- "IPJ2;JPEG 2000;;Image Power JPEG 2000;;;\n"
- "IR21;Indeo 2.1;;;;;\n"
- "IRAW;YUV;;;http://www.fourcc.org/indexyuv.htm;;;YUV\n"
- "ISME;ISME;;Intel;;;\n"
- "IUYV;YUV;;Lead 16bpp. Interlaced version of UYVY (line order 0, 2, 4,....,1, 3, 5....);;;;YUV\n"
- "IV30;Indeo 3;;Intel Indeo Video 3;;;\n"
- "IV31;Indeo 3;;Intel Indeo Video 3.1;;;\n"
- "IV32;Indeo 3;;Intel Indeo Video 3.2;;;\n"
- "IV33;Indeo 3;;Intel Indeo Video 3.3;;;\n"
- "IV34;Indeo 3;;Intel Indeo Video 3.4;;;\n"
- "IV35;Indeo 3;;Intel Indeo Video 3.5;;;\n"
- "IV36;Indeo 3;;Intel Indeo Video 3.6;;;\n"
- "IV37;Indeo 3;;Intel Indeo Video 3.7;;;\n"
- "IV38;Indeo 3;;Intel Indeo Video 3.8;;;\n"
- "IV39;Indeo 3;;Intel Indeo Video 3.9;;;\n"
- "IV40;Indeo 4;;Intel Indeo Video 4.0;;;\n"
- "IV41;Indeo 4;;Intel Indeo Video 4.1;;;\n"
- "IV42;Indeo 4;;Intel Indeo Video 4.2;;;\n"
- "IV43;Indeo 4;;Intel Indeo Video 4.3;;;\n"
- "IV44;Indeo 4;;Intel Indeo Video 4.4;;;\n"
- "IV45;Indeo 4;;Intel Indeo Video 4.5;;;\n"
- "IV46;Indeo 4;;Intel Indeo Video 4.6;;;\n"
- "IV47;Indeo 4;;Intel Indeo Video 4.7;;;\n"
- "IV48;Indeo 4;;Intel Indeo Video 4.8;;;\n"
- "IV49;Indeo 4;;Intel Indeo Video 4.9;;;\n"
- "IV50;Indeo 4;;Intel Indeo Video 5.0 Wavelet;http://www.fourcc.org/indexyuv.htm;;\n"
- "IY41;YUV;;Lead 16bpp. Interlaced version of Y41P (line order 0, 2, 4,....,1, 3, 5....);http://www.fourcc.org/indexyuv.htm;;;YUV\n"
- "IYU1;YUV;;IEEE1394 12bpp. 12 bit format used in mode 2 of the IEEE 1394 Digital Camera 1.04 spec;http://www.fourcc.org/indexyuv.htm;;;YUV\n"
- "IYU2;YUV;;IEEE1394 24bpp. 24 bit format used in mode 2 of the IEEE 1394 Digital Camera 1.04 spec;;;;YUV\n"
- "IYUV;YUV;;Intel Indeo iYUV 4:2:0;;;;YUV\n"
- "JBYR;Kensington;;Kensington Video;http://ffdshow-tryout.sourceforge.net/;;\n"
- "JFIF;JPEG;;;;;;YUV\n"
- "JPEG;JPEG;;;http://www.apple.com/quicktime/download/standalone.html;;;YUV\n"
- "JPG;JPEG;;;http://mirror01.iptelecom.net.ua/~video/codecs/PICVideo.Lossless.JPEG.codec.v2.10.27.exe;;;YUV\n"
- "JPGL;JPEG;Pegasus;DIVIO JPEG Light for WebCams (Pegasus Lossless JPEG);;;;YUV\n"
- "KMVC;Karl;;Karl Morton's Video (presumably);http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "kpcd;Photo CD;;Kodak Photo CD;;;;\n"
- "L261;H.261;Lead Technologies;;;;;\n"
- "L263;H.263+;Lead Technologies;;;;;\n"
- "LAGS;Lagarith;;;;;;\n"
- "LBYR;Creative WebCam;;;;;;\n"
- "LCMW;Lead CMW;;Lead Technologies Motion CMW;;;;\n"
- "LCW2;Lead MCMW;;LEADTools MCMW 9Motion Wavelet;http://mirror01.iptelecom.net.ua/~video/codecs/LEAD.MCMP-JPEG.v1.016.codec.exe;;;\n"
- "LEAD;Lead Video;;;;;;\n"
- "LGRY;Lead GrayScale;;;;;;\n"
- "LIA1;Liafail;;Liafail, Inc.;;;;\n"
- "LJ2K;JPEG 2000;Lead;;http://mirror01.iptelecom.net.ua/~video/codecs/LEAD.MCMP-JPEG.v1.016.codec.exe;;;\n"
- "LJPG;JPEG;Lead;;http://mirror01.iptelecom.net.ua/~video/codecs/LEAD.MCMP-JPEG.v1.016.codec.exe;;;YUV\n"
- "Ljpg;JPEG;Lead;;;;;YUV\n"
- "LMP2;MPEG-PS;Lead;;;;;\n"
- "LOCO;LOCO;;Lossless;;;;\n"
- "LSCR;Lead Screen capture;;;;;;\n"
- "LSV0;LSV0;;Infinop Inc.;;;;\n"
- "LSVC;Vmail;;Vianet Lighting Strike Vmail (Streaming);;;;\n"
- "LSVM;Vmail;;Vianet Lighting Strike Vmail (Streaming);;;;\n"
- "LSVW;Infinop;;Infinop Lightning Strike multiple bit rate video codec.;;;;\n"
- "LSVX;Vmail;;Vianet Lightning Strike Video Codec;;;;\n"
- "LZO1;LZO;;LZO compressed (lossless);;;;\n"
- "M101;YUV;Matrox;;;;;YUV\n"
- "M261;H.261;Microsoft;;;;;\n"
- "M263;H.263;Microsoft;;;;;\n"
- "M4CC;MPEG-4 Visual;ESS Divo;;;;;YUV;4:2:0\n"
- "M4S2;MPEG-4 Visual;Microsoft;;;;;YUV;4:2:0\n"
- "MC12;ATI Motion;;ATI Motion Compensation Format;;;;\n"
- "MC24;JPEG;MainConcept;;;;;YUV\n"
- "MCAM;ATI Motion;;ATI Motion Compensation Format;;;;\n"
- "MCZM;RGB;;Theory MicroCosm Lossless 64bit RGB with Alpha-channel;;;;RGB\n"
- "MDVD;MicroDVD;;Alex MicroDVD Video (hacked MS MPEG-4);;;;\n"
- "MDVF;DV;Pinnacle;Pinnacle DV/DV50/DVHD100;;;;YUV\n"
- "MHFY;YUV;;A.M.Paredes mhuffyYUV (LossLess);http://mirror01.iptelecom.net.ua/~video/codecs/Pinnacle.ReelTime.v2.5.software.only.codec.exe;;;YUV\n"
- "MJ2C;JPEG 2000;;Morgan Multimedia JPEG 2000 Compression;http://mirror01.iptelecom.net.ua/~video/codecs/Pinnacle.ReelTime.v2.5.software.only.codec.exe;;;\n"
- "MJPA;JPEG;Pinacle;Pinnacle ReelTime MJPG hardware;http://mediaxw.sourceforge.net;;;YUV\n"
- "MJPB;JPEG;Pinacle B;;;;;YUV\n"
- "MJPG;JPEG;;;;;;YUV\n"
- "mJPG;JPEG;IBM;Including Huffman Tables;;;;YUV\n"
- "MJPX;JPEG;Pegasus;Pegasus PICVideo JPEG;;;;YUV\n"
- "ML20;Webcam;;Mimic MSN Messenger Webcam;;;;\n"
- "MLCY;MLC;;MLC Lossless Codec;http://www.linek.sk/mlc/;;;;;;Lossless\n"
- "MMES;MPEG Video;Matrox;I-frame;;;;YUV;4:2:0\n"
- "MMIF;MPEG Video;Matrox;I-frame;;;;YUV;4:2:0\n"
- "MNVD;MindVid;;MindBend MindVid LossLess;;;;\n"
- "MP2V;MPEG Video;;Media Excel MPEG-2 Video;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "MP2v;MPEG Video;;MPEG-2 Video;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "MP41;MPEG-4 Visual;Microsoft;Microsoft MPEG-4 v1 (pre-standard);http://ffdshow-tryout.sourceforge.net/;;;\n"
- "MP42;MPEG-4 Visual;Microsoft;Microsoft MPEG-4 v2 (pre-standard);http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "MP43;MPEG-4 Visual;Microsoft;Microsoft MPEG-4 v3 (pre-standard);;;;\n"
- "MP4S;MPEG-4 Visual;MS MPEG-4 v3;Microsoft MPEG-4 (Windows Media 7.0);;;;YUV;4:2:0\n"
- "MP4V;MPEG-4 Visual;;Apple QuickTime MPEG-4 native;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "MPEG;MPEG Video;;Chromatic MPEG 1 Video I Frame;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "mpeg;MPEG Video;;MPEG-1 Video;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "MPG1;MPEG Video;Ffmpeg;(MPEG-1/2) FFmpeg;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "mpg1;MPEG Video;Ffmpeg;(MPEG-1/2) FFmpeg;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "MPG2;MPEG Video;Ffmpeg;(MPEG-1/2) FFmpeg;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "mpg2;MPEG Video;Ffmpeg;(MPEG-1/2) FFmpeg;http://ffdshow-tryout.sourceforge.net/;;;YUV;4:2:0\n"
- "MPG3;MPEG-4 Visual;FFmpeg DivX 3;(MPEG-4) MS MPEG-4 v3;;;;YUV;4:2:0\n"
- "MPG4;MPEG-4 Visual;MS MPEG-4 v1;Microsoft MPEG-4 v1;;;;YUV;4:2:0\n"
- "MPGI;MPEG Video;Sigma;Sigma Design MPEG-1 I-frame;;;;YUV;4:2:0\n"
- "MPNG;PNG;;Motion PNG;;;;\n"
- "MRCA;Mrcodec;;FAST Multimedia;;;;\n"
- "MRLE;RLE;;Microsoft RLE;;;;RGB\n"
- "MSS1;Screen Video;Windows;Windows Screen Video;;;;\n"
- "MSS2;Windows Media;;Windows Media 9;;;;\n"
- "MSUC;MSU;;MSU LossLess;;;;\n"
- "MSUD;MSU;;MSU LossLess;;;;\n"
- "MSV1;Microsoft Video 1;;Microsoft Video 1;;;;\n"
- "MSVC;Microsoft Video 1;;Microsoft Video 1;;;;\n"
- "MSZH;AVImszh;;Lossless (ZIP compression);;;;\n"
- "MTGA;TGA;;Motion TGA images (24, 32 bpp);;;;\n"
- "MTX1;JPEG;Matrox;;;;;YUV\n"
- "MTX2;JPEG;Matrox;;;;;YUV\n"
- "MTX3;JPEG;Matrox;;;;;YUV\n"
- "MTX4;JPEG;Matrox;;;;;YUV\n"
- "MTX5;JPEG;Matrox;;;;;YUV\n"
- "MTX6;JPEG;Matrox;;;;;YUV\n"
- "MTX7;JPEG;Matrox;;;;;YUV\n"
- "MTX8;JPEG;Matrox;;;;;YUV\n"
- "MTX9;JPEG;Matrox;;;;;YUV\n"
- "MV10;Nokia;;Nokia Mobile Phones;;;;\n"
- "MV11;Nokia;;Nokia Mobile Phones;;;;\n"
- "MV12;MVI;;Motion Pixels (old);;;;\n"
- "MV99;Nokia;;Nokia Mobile Phones;;;;\n"
- "MVC1;Nokia;;Nokia Mobile Phones;;;;\n"
- "MVC2;Nokia;;Nokia Mobile Phones;;;;\n"
- "MVC9;Nokia;;Nokia Mobile Phones;;;;\n"
- "MVI1;MVI;;Motion Pixels MVI;;;;\n"
- "MVI2;MVI;;Motion Pixels MVI;;;;\n"
- "MWV1;Aware Motion Wavelets;;Aware Motion Wavelets;;;;\n"
- "MYUV;RGB;;Media-100 844/X Uncompressed;;;;RGB\n"
- "NAVI;MPEG-4 Visual;;nAVI video (hacked MS MPEG-4);;;;YUV;4:2:0\n"
- "NDIG;MPEG-4 Visual;Ahead;Ahead Nero Digital MPEG-4;;;;YUV;4:2:0\n"
- "NHVU;Nvidia Texture;;Nvidia Texture Format (GEForce 3);;;;\n"
- "NO16;RGB;;Theory None16 64bit uncompressed Uncompressed;;;;RGB\n"
- "NT00;YUV;LightWave;NewTek LightWave HDTV YUV with Alpha-channel;;;;YUV\n"
- "NTN1;NogaTech Video 1;;Nogatech Video Compression 1;;;;\n"
- "NTN2;NogaTech Video 2;;Nogatech Video Compression 2 (GrabBee hardware coder);;;;\n"
- "NUV1;Nuppel;;NuppelVideo;;;;\n"
- "NV12;YUV;;8-bit Y plane followed by an interleaved U/V plane with 2x2 subsampling;;;;YUV\n"
- "NV21;YUV;;As NV12 with U and V reversed in the interleaved plane;;;;YUV\n"
- "NVDS;Nvidia Texture;;Nvidia Texture Format;;;;\n"
- "NVHS;Nvidia Texture;;Nvidia Texture Format (GeForce 3);;;;\n"
- "NVHU;Nvidia Texture;;Nvidia Texture Format;;;;\n"
- "NVS0;Nvidia Texture;;Nvidia Texture Compression Format;;;;\n"
- "NVS1;Nvidia Texture;;Nvidia Texture Compression Format;;;;\n"
- "NVS2;Nvidia Texture;;Nvidia Texture Compression Format;;;;\n"
- "NVS3;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVS4;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVS5;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVS6;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVS7;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVS8;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVS9;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVT0;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVT1;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVT2;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVT3;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVT4;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVT5;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVT6;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVT7;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVT8;Nvidia Texture;;Nvidia Texture Compression Format\n"
- "NVT9;Nvidia Texture;;Nvidia Texture Compression Format;;;;\n"
- "NY12;YUV;Nogatech;;;;;YUV\n"
- "NYUV;YUV;Nogatech;;;;;YUV\n"
- "ONYX;VP7;On2;;http://www.on2.com/vp7.php3;;;\n"
- "PCLE;Studio400;Pinnacle;;;;;\n"
- "PDVC;DV;Panasonic;;;;;YUV\n"
- "PGVV;Radius Video Vision;;;;;;\n"
- "PHMO;Photomotion;IBM;;;;;\n"
- "PIM1;JPEG;Pegasus;Pinnacle DC1000 hardware (MPEG compression);http://mirror01.iptelecom.net.ua/~video/codecs/PICVideo.Lossless.JPEG.codec.v2.10.27.exe;;;YUV\n"
- "PIM2;JPEG;Pegasus;Pegasus Imaging;http://mirror01.iptelecom.net.ua/~video/codecs/PICVideo.Lossless.JPEG.codec.v2.10.27.exe;;;YUV\n"
- "PIMJ;JPEG;Pegasus;Pegasus Imaging PICvideo Lossless JPEG;http://mirror01.iptelecom.net.ua/~video/codecs/PICVideo.Lossless.JPEG.codec.v2.10.27.exe;;;YUV\n"
- "PIXL;JPEG;Miro;MiroVideo XL (JPEG);;;;YUV\n"
- "PNG;PNG;;;;;;\n"
- "PNG1;PNG;;Corecodec.org CorePNG;;;;\n"
- "PVEZ;PowerEZ;;Horizons Technology PowerEZ;;;;\n"
- "PVMM;MPEG-4 Visual;Pegasus;PacketVideo Corporation MPEG-4;;;;YUV;4:2:0\n"
- "PVW2;Wavelet;Pegasus;Pegasus Imaging Wavelet 2000;;;;\n"
- "PVWV;Wavelet;Pegasus;Pegasus Imaging Wavelet 2000;;;;\n"
- "PXLT;Pixlet;;Apple Pixlet (Wavelet);;;;\n"
- "Q1.0;QPEG 1.0;;Q-Team QPEG 1.0;http://www.q-team.de;;;\n"
- "Q1.1;QPEG 1.1;;Q-Team QPEG 1.1;http://www.q-team.de;;;\n"
- "QDGX;Apple GX;;Apple QuickDUncompressed GX;;;;\n"
- "QDRW;Palettized Video;;Apple;;;;\n"
- "QPEG;QPEG 1.1;;Q-Team QPEG 1.1;;;;\n"
- "QPEQ;QPEG 1.1;;Q-Team QPEG 1.1;;;;\n"
- "R210;YUV;;BlackMagic YUV (Quick Time);;;;YUV\n"
- "R411;DV;Radius;Radius DV NTSC YUV;;;;YUV\n"
- "R420;DV;Radius;Radius DV PAL YUV;;;;YUV\n"
- "RAV_;MPEG-1;GroupTron;GroupTRON ReferenceAVI (dummy for MPEG compressor);;;;YUV;4:2:0\n"
- "RAVI;MPEG-1;GroupTron;GroupTRON ReferenceAVI (dummy for MPEG compressor);;;;YUV;4:2:0\n"
- "RAW ;RGB;;Full Frames (Uncompressed);;;;RGB\n"
- "raw ;RGB;;Full Frames (Uncompressed);http://www.apple.com/quicktime/download/standalone.html;;;RGB\n"
- "RGB ;RGB;;;;;;RGB;8:8:8\n"
- "RGB1;RGB;;;;;;RGB 3:3:2;3:3:2\n"
- "RGB2;RGB;;;;;;RGB 3:3:2;3:3:2\n"
- "RGBA;RGB;;;http://www.fourcc.org/indexrgb.htm;;;RGB\n"
- "RGBO;RGB;;Little Endian;;;;RGB 5:5:5;5:5:5\n"
- "RGBP;RGB;;Little Endian;;;;RGB 5:6:5;5:6:5\n"
- "RGBQ;RGB;;Big Endian;;;;RGB 5:5:5;5:5:5\n"
- "RGBR;RGB;;Big Endian;;;;RGB 5:6:5;5:6:5\n"
- "RGBT;RGBA;;;http://www.fourcc.org/indexrgb.htm;;;RGBA\n"
- "RIVA;Swizzled texture;;Nvidia;;;;\n"
- "RL4;RLE;;RLE 4bpp RGB;;;;RGB\n"
- "RL8;RLE;;RLE 8bpp RGB;;;;RGB\n"
- "RLE ;RLE;;RLE RGB with arbitrary sample packing within a pixel;http://www.fourcc.org/indexrgb.htm;;;RGB\n"
- "RLE4;RLE;;RLE 4bpp RGB;http://www.fourcc.org/indexrgb.htm;;;RGB\n"
- "RLE8;RLE;;RLE 8bpp RGB;http://www.fourcc.org/indexrgb.htm;;;RGB\n"
- "RLND;Roland;;Roland Corporation;;;;\n"
- "RMP4;MPEG-4 Visual;RealMagic;REALmagic MPEG-4 Video (Sigma Design, built on XviD);;;;YUV;4:2:0\n"
- "ROQV;Id RoQ;;Id RoQ File Video Decoder;;;;\n"
- "RT21;Intel Video 2.1;;Intel Real Time Video 2.1;;;;\n"
- "RTV0;NewTek VideoToaster;;NewTek VideoToaster (dummy format - only AVI header);;;;\n"
- "RUD0;Rududu;;Rududu video;;;;\n"
- "RV10;RealVideo 1;;H263, RealVideo 5;http://www.real.com;;;\n"
- "RV13;RealVideo 1;;H263, RealVideo 5;http://www.real.com;;;\n"
- "RV20;RealVideo 2;;H263, RealVideo 6;http://www.real.com;;;\n"
- "RV30;RealVideo 3;;Between H263 and H264, RealVideo 8;http://www.real.com;;;\n"
- "RV40;RealVideo 4;;H264, RealVideo 9;http://www.real.com;;;\n"
- "RVX ;RDX;;Intel RDX;;;;\n"
- "S263;H.263;;;http://ffdshow-tryout.sourceforge.net/;;;\n"
- "S422;YUV;VideoCap C210;VideoCap C210;;;;YUV\n"
- "SAN3;MPEG-4 Visual;;Direct copy of DivX 3.11;;;;YUV;4:2:0\n"
- "SANM;Smush v2;;LucasArts;http://www.lucasarts.com/;;;\n"
- "SCCD;SoftCam;;;;;;\n"
- "SDCC;DV;Sun;Sun Digital Camera;;;;YUV;4:1:1\n"
- "SEDG;MPEG-4 Visual;Samsung;Samsung MPEG-4;;;;YUV;4:2:0\n"
- "SEG4;Cinepak;;;http://www.sega.com/;;;\n"
- "SEGA;Cinepak;;;http://www.sega.com/;;;\n"
- "SFMC;CrystalNet;;CrystalNet Surface Fitting Method;;;;\n"
- "SHR0;BitJazz SheerVideo;;BitJazz SheerVideo (realtime lossless);;;;\n"
- "SHR1;BitJazz SheerVideo;;BitJazz SheerVideo (realtime lossless);;;;\n"
- "SHR2;BitJazz SheerVideo;;BitJazz SheerVideo (realtime lossless);;;;\n"
- "SHR3;BitJazz SheerVideo;;BitJazz SheerVideo (realtime lossless);;;;\n"
- "SHR4;BitJazz SheerVideo;;BitJazz SheerVideo (realtime lossless);;;;\n"
- "SHR5;BitJazz SheerVideo;;BitJazz SheerVideo (realtime lossless);;;;\n"
- "SHR6;BitJazz SheerVideo;;BitJazz SheerVideo (realtime lossless);;;;\n"
- "SHR7;BitJazz SheerVideo;;BitJazz SheerVideo (realtime lossless);;;;\n"
- "SIF1;SIF1;;;http://mysif.ru/SIF1_dd_Eng.htm;;;\n"
- "SJPG;JPEG;CuSeeMe;CuSeeMe;http://mirror01.iptelecom.net.ua/~video/codecs/CUseeMe.JPEG.CODEC.v1.17.exe;;;YUV\n"
- "SL25;DV;SoftLab DVCPro;SoftLab-NSK DVCPRO;;;;YUV;4:1:1\n"
- "SL50;DV;SoftLab DVCPro5;SoftLab-NSK ;;;;YUV;4:1:1\n"
- "SLDV;DV;SoftLab;SoftLab-NSK Forward DV Draw;;;;YUV;4:1:1\n"
- "SLIF;MPEG Video;SoftLab;SoftLab-NSK MPEG-2 I-frames;;;;YUV;4:2:0\n"
- "SLMJ;JPEG;SoftLab;SoftLab-NSK Forward JPEG;;;;YUV\n"
- "smc ;SMC;;Apple Graphics (SMC);http://www.apple.com/quicktime/download/standalone.html;;;\n"
- "SMSC;Radius;;;;;;\n"
- "SMSD;Radius;;;;;;\n"
- "SMSV;Wavelet Video;;WorldConnect Wavelet Streaming Video;;;;\n"
- "SNOW;Snow;;;http://ffdshow-tryout.sourceforge.net/;;;\n"
- "SP40;YUV;SunPlus;SunPlus YUV;;;;YUV\n"
- "SP44;MegaCam;;SunPlus Aiptek MegaCam;;;;\n"
- "SP53;MegaCam;;SunPlus Aiptek MegaCam;;;;\n"
- "SP54;MegaCam;;SunPlus Aiptek MegaCam;;;;\n"
- "SP55;MegaCam;;SunPlus Aiptek MegaCam;;;;\n"
- "SP56;MegaCam;;SunPlus Aiptek MegaCam;;;;\n"
- "SP57;MegaCam;;SunPlus Aiptek MegaCam;;;;\n"
- "SP58;MegaCam;;SunPlus Aiptek MegaCam;;;;\n"
- "SP61;MegaCam;;SunPlus Aiptek MegaCam;;;;\n"
- "SPIG;Spigot;;Radius Spigot;;;;\n"
- "SPLC;ACM audio;;Splash Studios ACM Audio;;;;\n"
- "SPRK;Spark;;;;;;\n"
- "SQZ2;VXTreme 2;;Microsoft VXTreme Video V2;;;;\n"
- "STVA;ST Imager;;ST Microelectronics CMOS Imager Data (Bayer);;;;\n"
- "STVB;ST Imager;;ST Microelectronics CMOS Imager Data (Nudged Bayer);;;;\n"
- "STVC;ST Imager;;ST Microelectronics CMOS Imager Data (Bunched);;;;\n"
- "STVX;ST Imager;;ST Microelectronics CMOS Imager Data (Extended Data Format);;;;\n"
- "STVY;ST Imager;;ST Microelectronics CMOS Imager Data (Extended Data Format with Correction Data);;;;\n"
- "SV10;Sorenson;;Sorenson Media Video R1;;;;\n"
- "SVQ1;AVC;Sorenson 1;Sorenson Media Video 1 (Apple QuickTime 3);;;;\n"
- "SVQ2;AVC;Sorenson 2;Sorenson Media Video 2 (Apple QuickTime 4);;;;\n"
- "SVQ3;AVC;Sorenson 3;Sorenson Media Video 3 (Apple QuickTime 5);;;;\n"
- "SWC1;JPEG;MainConcept;MainConcept JPEG;;;;YUV\n"
- "T420;YUV;Toshiba;Toshiba YUV 4:2:0;;;;YUV\n"
- "TGA ;TGA;Apple;Apple TGA (with Alpha-channel)\n"
- "THEO;Theora;;FFVFW Supported\n"
- "TIFF;Apple TIFF;;Apple TIFF (with Alpha-channel)\n"
- "TIM2;Pinnacle DVI;;Pinnacle RAL DVI\n"
- "TLMS;TeraLogic;;TeraLogic Motion Intraframe\n"
- "TLST;TeraLogic;;TeraLogic Motion Intraframe\n"
- "TM10;Duck;;Duck TrueMotion\n"
- "TM20;Duck 2;;Duck TrueMotion 2.0\n"
- "TM2A;Duck Archiver 2;;Duck TrueMotion Archiver 2.0\n"
- "TM2X;Duck 2;;Duck TrueMotion 2X\n"
- "TMIC;TeraLogic;;TeraLogic Motion Intraframe\n"
- "TMOT;Horizons TM S;;Horizons Technology TrueMotion Video\n"
- "TR20;Duck TM RT2;;Duck TrueMotion RT 2.0\n"
- "TRLE;Akula;;Akula Alpha Pro Custom AVI (LossLess)\n"
- "TSCC;TechSmith;;TechSmith Screen Capture\n"
- "tscc;TechSmith;;TechSmith Screen Capture\n"
- "TV10;Tecomac;;Tecomac Low-Bit Rate;;;;\n"
- "TVJP;Pinnacle/Truevision;;TrueVision Field Encoded JPEG (Targa emulation);;;;\n"
- "TVMJ;Pinnacle/Truevision;;Truevision TARGA JPEG Hardware (or Targa emulation);;;;\n"
- "TY0N;Trident;;Trident Decompression Driver;;;;\n"
- "TY2C;Trident;;Trident Decompression Driver;;;;\n"
- "TY2N;Trident;;Trident Decompression Driver;;;;\n"
- "U<Y ;YUV;Discreet;Discreet UC YUV 4:2:2:4 10 bit;;;;YUV\n"
- "U<YA;YUV;Discreet;Discreet UC YUV 4:2:2:4 10 bit (with Alpha-channel);;;;YUV\n"
- "U263;H.263;UB;UB Video H.263/H.263+/H.263++ Decoder;http://eMajix.com;;;\n"
- "UCOD;ClearVideo;;ClearVideo (fractal compression-based);;;;\n"
- "ULH0;YUV;Ut Video;Ut Video Lossless Codec;http://umezawa.dyndns.info/archive/utvideo;;;YUV;4:2:0\n"
- "ULH2;YUV;Ut Video;Ut Video Lossless Codec;http://umezawa.dyndns.info/archive/utvideo;;;YUV;4:2:2\n"
- "ULRA;RGBA;Ut Video;Ut Video Lossless Codec;http://umezawa.dyndns.info/archive/utvideo;;;RGBA;4:4:4:4\n"
- "ULRG;RGB;Ut Video;Ut Video Lossless Codec;http://umezawa.dyndns.info/archive/utvideo;;;RGB;4:4:4\n"
- "ULTI;Ultimotion;;IBM Ultimotion;;;;\n"
- "ULY0;YUV;Ut Video;Ut Video Lossless Codec;http://umezawa.dyndns.info/archive/utvideo;;;YUV;4:2:0\n"
- "ULY2;YUV;Ut Video;Ut Video Lossless Codec;http://umezawa.dyndns.info/archive/utvideo;;;YUV;4:2:2\n"
- "UMP4;MPEG-4 Visual;UB;UB Video MPEG 4;http://www.fourcc.org/indexyuv.htm;;;YUV;4:2:0\n"
- "UYNV;YUV;;Nvidia 16bpp. A direct copy of UYVY registered by Nvidia to work around problems in some olds which did not like hardware which offered more than 2 UYVY surfaces.;http://www.fourcc.org/indexyuv.htm;;;YUV\n"
- "UYVP;YUV;;Evans & Sutherland 24bpp. YUV 4:2:2 extended precision 10-bits per component in U0Y0V0Y1 order;;;;YUV\n"
- "UYVU;YUV;SoftLab;SoftLab-NSK Forward YUV;http://www.fourcc.org/indexyuv.htm;;;YUV\n"
- "UYVY;YUV;;Uncompressed 16bpp. YUV 4:2:2 (Y sample at every pixel, U and V sampled at every second pixel horizontally on each line). A macropixel contains 2 pixels in 1 u_int32.;;;;YUV;4:2:2\n"
- "V210;YUV;;Optibase VideoPump 10-bit 4:2:2 Component YUV;;;;\n"
- "v210;YUV;AJA Video Systems Xena;;;;;YUV;4:2:2\n"
- "V261;VX3000S;;Lucent VX3000S;;;;\n"
- "V422;YUV;Vitec;;;;;YUV;4:2:2\n"
- "V655;YUV;Vitec;Vitec Multimedia 16 bit YUV 4:2:2 (6:5:5) format;;;;YUV\n"
- "VBLE;MarcFD VBLE;;MarcFD VBLE Lossless;;;;\n"
- "VCR1;ATI Video 1;;ATI VCR 1.0;;;;\n"
- "VCR2;ATI Video 2;;ATI VCR 2.0 (MPEG YV12);;;;\n"
- "VCR3;ATI Video 3;;ATI VCR 3.0;;;;\n"
- "VCR4;ATI Video 4;;ATI VCR 4.0;;;;\n"
- "VCR5;ATI Video 5;;ATI VCR 5.0;;;;\n"
- "VCR6;ATI Video 6;;ATI VCR 6.0;;;;\n"
- "VCR7;ATI Video 7;;ATI VCR 7.0;;;;\n"
- "VCR8;ATI Video 8;;ATI VCR 8.0;;;;\n"
- "VCR9;ATI Video 9;;ATI VCR 9.0;;;;\n"
- "VCWV;Wavelet;;VideoCon;;;;\n"
- "VDCT;RGB;VideoMaker;Video Maker Pro DIB;;;;RGB\n"
- "VDOM;VDOWave;;VDONet Wave;;;;\n"
- "VDOW;VDOLive;;VDONet Live (H,263);;;;\n"
- "VDST;VirtualDub;;VirtualDub remote frameclient ICM driver;;;;\n"
- "VDTZ;YUV;;VideoTizer / Darim Vision YUV;;;;YUV;4:2:2\n"
- "VGPX;VGP;;Alaris VideoGramPixel;;;;\n"
- "VIDM;MPEG-4 Visual;DivX 5 Pro;DivX 5.0 Pro Supported;;;;YUV;4:2:0\n"
- "VIDS;Vitec;;Vitec Multimedia YUV 4:2:2;www.yks.ne.jp/~hori/;;;\n"
- "VIFP;VFAPI;;Virtual Frame API (VFAPI dummy format);;;;\n"
- "VIV1;H.263;Vivo;;;;;\n"
- "VIV2;H.263;Vivo;;;;;\n"
- "VIVO;H.263;Vivo;;;;;\n"
- "VIXL;JPEG;Miro XL;Miro Video XL;http://mirror01.iptelecom.net.ua/~video/codecs/miroVIDEO-XL.codec.v2.2.exe;;;YUV\n"
- "VJPG;JPEG;;;;;;YUV\n"
- "VLV1;Videologic;;;;;;\n"
- "VMNC;Vmware;;;http://www.vmware.com/;;;\n"
- "VP30;VP3;On2;;;;;\n"
- "VP31;VP3;On2;;;;;\n"
- "VP32;VP3;On2;;;;;\n"
- "VP40;VP4;On2;;;;;\n"
- "VP50;VP5;On2;;;;;\n"
- "VP60;VP6;On2;;http://ftp.pub.cri74.org/pub/win9x/video/codecs/VP6/vp6_vfw_codec.exe;Simple;;\n"
- "VP61;VP6;On2;;http://ftp.pub.cri74.org/pub/win9x/video/codecs/VP6/vp6_vfw_codec.exe;Advanced;;\n"
- "VP62;VP6;On2;;http://ftp.pub.cri74.org/pub/win9x/video/codecs/VP6/vp6_vfw_codec.exe;Heightened Sharpness;;\n"
- "VP6A;VP6;On2;;http://ftp.pub.cri74.org/pub/win9x/video/codecs/VP6/vp6_vfw_codec.exe;Alpha;;\n"
- "VP6F;VP6;On2;;http://ftp.pub.cri74.org/pub/win9x/video/codecs/VP6/vp6_vfw_codec.exe;Heightened Sharpness;;\n"
- "VP70;VP7;On2;;;General;;\n"
- "VP71;VP7;On2;;;Error Resilient;;\n"
- "VP72;VP7;On2;;;;;\n"
- "VP80;VP8;;;http://www.webmproject.org;;;YUV;4:2:0\n"
- "VQC1;Vector 1;;Vector-quantised 1 (high compression) http://eprints.ecs.soton.ac.uk/archive/00001310/01/VTC97-js.pdf;;;;\n"
- "VQC2;Vector 2;;Vector-quantised 2 (high robustness against channel errors) http://eprints.ecs.soton.ac.uk/archive/00001310/01/VTC97-js.pdf;;;;\n"
- "VQJP;VQ630;;Dual-mode digital camera;;;;\n"
- "VQS4;VQ110;;DV camera;;;;\n"
- "VR21;YUV;BlckMagic;BlackMagic YUV (Quick Time);;;;YUV\n"
- "VSSH;AVC;Vanguard VSS;;;;;YUV;4:2:0\n"
- "VSSV;Vanguard Video;Vanguard VSS;;;;;\n"
- "VSSW;AVC;Vanguard VSS;;;;;YUV;4:2:0\n"
- "VTLP;GGP;;Alaris VideoGramPixel;;;;\n"
- "VX1K;DVX 1 S;;Lucent VX1000S Video;;;;\n"
- "VX2K;DVX 2 S;;Lucent VX2000S Video;;;;\n"
- "VXSP;DVX 1 SP;;Lucent VX1000SP Video;;;;\n"
- "VYU9;YUV;ATI;;;;;YUV\n"
- "VYUY;YUV;ATI;;;;;YUV\n"
- "WBVC;W9960;;Winbond Electronics W9960;;;;\n"
- "WHAM;Microsoft Video 1;;;;;;\n"
- "WINX;Winnov;;;;;;\n"
- "WJPG;JPEG;Winbond ;Winbond JPEG (AverMedia USB devices);;;;YUV\n"
- "WMV1;WMV1;;Windows Media Video 7;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx;;;\n"
- "WMV2;WMV2;;Windows Media Video 8;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx;;;\n"
- "WMV3;VC-1;WMV3;Windows Media Video 9;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx;;;\n"
- "WMVA;VC-1;WMV;Windows Media Video;http://ffdshow-tryout.sourceforge.net/;;;\n"
- "WMVP;WMV3;;Windows Media Video V9;;;;\n"
- "WNIX;WniWni;;WniWni;;;;\n"
- "WNV1;WinNov;;WinNov Videum Hardware Compression;http://www.winnov.com/;;;\n"
- "WNVA;WinNov;;WinNov Videum Hardware Compression;http://www.winnov.com/;;;\n"
- "WRLE;RGB;Apple;Apple QuickTime BMP;;;;RGB\n"
- "WRPR;AVideoTools;;VideoTools VideoServer Client (wrapper for AviSynth);;;;\n"
- "WV1F;;;;http://ffdshow-tryout.sourceforge.net/;;;\n"
- "WVC1;VC-1;Microsoft;;;;;\n"
- "WVLT;IllusionHope Wavelet 9/7;;IllusionHope Wavelet 9/7;;;;\n"
- "WVP2;;;;http://ffdshow-tryout.sourceforge.net/;;;\n"
- "WZCD;iScan;;CORE Co. Ltd.;;;;\n"
- "WZDC;iSnap;;CORE Co. Ltd.;;;;\n"
- "X263;H.263;Xirlink;;;;;\n"
- "X264;AVC;;XiWave GNU GPL x264 MPEG-4;;;;\n"
- "XJPG;JPEG;Xirlink;;;;;YUV\n"
- "XLV0;NetXL Video;;NetXL Inc. XL Video Decoder;;;;\n"
- "XMPG;MPEG Video;Xing;XING MPEG (I frame only);;;;YUV;4:2:0\n"
- "XVID;MPEG-4 Visual;XviD;;http://mediaarea.net/XVID;;;YUV;4:2:0\n"
- "XVIX;MPEG-4 Visual;XviD;Based on XviD MPEG-4;http://www.xvid.org/Downloads.15.0.html;;;YUV;4:2:0\n"
- "XWV0;XiWave Video;;;;;;\n"
- "XWV1;XiWave Video;;;;;;\n"
- "XWV2;XiWave Video;;;;;;\n"
- "XWV3;XiWave Video;;;;;;\n"
- "XWV4;XiWave Video;;;;;;\n"
- "XWV5;XiWave Video;;;;;;\n"
- "XWV6;XiWave Video;;;;;;\n"
- "XWV7;XiWave Video;;;;;;\n"
- "XWV8;XiWave Video;;;;;;\n"
- "XWV9;XiWave Video;;;;;;\n"
- "XXAN;Origin VideoGame;;Used in Wing Commander 3 and 4;;;;\n"
- "XYZP;YUV;;Extended PAL format XYZ palette;;;;YUV\n"
- "Y211;YUV;;Packed YUV format with Y sampled at every second pixel across each line and U and V sampled at every fourth pixel;;;;YUV\n"
- "Y216;YUV;Targa;Pinnacle TARGA CineWave YUV (Quick Time);;;;YUV\n"
- "Y411;YUV;;YUV 4:1:1 Packed;;;;YUV;4:1:1\n"
- "Y41B;YUV;;YUV 4:1:1 Planar;;;;YUV;4:1:1\n"
- "Y41P;YUV;;Conexant (ex Brooktree) YUV 4:1:1 Raw;http://www.fourcc.org/indexyuv.htm;;;YUV;4:1:1\n"
- "Y41T;YUV;;Format as for Y41P, but the lsb of each Y component is used to signal pixel transparency;;;;YUVA;4:1:1\n"
- "Y422;YUV;;Direct copy of UYVY as used by ADS Technologies Pyro WebCam firewire camera;;;;YUV;4:2:2\n"
- "Y42B;YUV;;YUV 4:2:2 Planar;;;;YUV;4:2:2\n"
- "Y42T;YUV;;Format as for UYVY, but the lsb of each Y component is used to signal pixel transparency;;;;YUVA;4:2:2\n"
- "Y444;YUV;;IYU2 (iRez Stealth Fire camera);;;;YUV\n"
- "Y8 ;GrayScale;;Simple grayscale video;;;;Y\n"
- "Y800;GrayScale;;Simple grayscale video;;;;Y\n"
- "YC12;YUV;;Intel YUV12;http://www.fourcc.org/indexyuv.htm;;;YUV\n"
- "YCCK;YUV;;;;;;YUV\n"
- "YMPG;MPEG-PS;;YMPEG Alpha (dummy for MPEG-2 compressor);;;;\n"
- "YU12;YUV;;ATI YV12 4:2:0 Planar;;;;YUV;4:2:0\n"
- "YU92;YUV;;Intel - YUV;;;;YUV\n"
- "YUNV;YUV;;A direct copy of YUY2 registered by Nvidia to work around problems in some olds which did not like hardware that offered more than 2 YUY2 surfaces;;;;YUV\n"
- "YUV2;YUV;;Apple Component Video (YUV 4:2:2);http://www.apple.com/quicktime/download/standalone.html;;;YUV;\n"
- "YUV8;YUV;;Winnov Caviar YUV8 ;http://www.fourcc.org/indexyuv.htm;;;YUV;\n"
- "YUV9;YUV;;Intel YUV9;;;;YUV;\n"
- "YUVP;YUV;;YUV 4:2:2 extended precision 10-bits per component in Y0U0Y1V0 order;;;;YUV;4:2:2;10\n"
- "YUY2;YUV;;YUV 4:2:2 as for UYVY but with different component ordering within the u_int32 macropixel;http://www.fourcc.org/indexyuv.htm;;;YUV;4:2:2\n"
- "YUYP;YUV;;Evans & Sutherland;;;;YUV;\n"
- "YUYV;YUV;;Canopus YUV format;http://www.fourcc.org/indexyuv.htm;;;YUV;\n"
- "YV12;YUV;;ATI YVU12 4:2:0 Planar;http://www.fourcc.org/indexyuv.htm;;;YUV;4:2:0\n"
- "YV16;YUV;;Elecard YUV 4:2:2 Planar;;;;YUV;4:2:2\n"
- "YV92;YUV;;Intel Smart Video Recorder YVU9;;;;YUV;\n"
- "YVU9;YUV;;Brooktree YVU9 Raw (YVU9 Planar);http://www.fourcc.org/indexyuv.htm;;;YUV;\n"
- "YVYU;YUV;;YUV 4:2:2 as for UYVY but with different component ordering within the u_int32 macropixel;;;;YUV;4:2:2\n"
- "ZLIB;AVIzlib;;Lossless (ZIP compression);;;;;\n"
- "ZMBV;Zip;;Zip Motion Blocks Video;;;;;\n"
- "ZPEG;Video Zipper;;Metheus Video Zipper;;;;;\n"
- "ZYGO;ZyGo;;ZyGo Video;;;;;\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_Audio_Matroska (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "A_MPEG/L1;MPEG Audio;MP1;;http://www.iis.fraunhofer.de/amm/index.html\n"
- "A_MPEG/L2;MPEG Audio;MP2;;http://www.iis.fraunhofer.de/amm/index.html\n"
- "A_MPEG/L3;MPEG Audio;MP3;;http://www.iis.fraunhofer.de/amm/index.html\n"
- "A_PCM/INT/BIG;PCM;;\n"
- "A_PCM/INT/LIT;PCM;;\n"
- "A_PCM/FLOAT/IEEE;PCM;;\n"
- "A_AC3;AC-3;;\n"
- "A_AC3/BSID9;AC-3;;\n"
- "A_AC3/BSID10;AC-3;;\n"
- "A_DTS;DTS;;\n"
- "A_EAC3;E-AC-3;;\n"
- "A_FLAC;Flac;;;http://flac.sourceforge.net\n"
- "A_OPUS;Opus;;;http://opus-codec.org\n"
- "A_TTA1;TTA;;The True Audio Lossless Codec;http://true-audio.com\n"
- "A_VORBIS;Vorbis;;;http://www.vorbis.com\n"
- "A_WAVPACK4;WavPack;;;http://www.wavpack.com\n"
- "A_REAL/14_4;VSELP;;Real Audio 1 (14.4);http://www.real.com\n"
- "A_REAL/28_8;G.728;;Real Audio 2 (28.8);http://www.real.com\n"
- "A_REAL/COOK;Cooker;;Real Audio Cook Codec (codename: Gecko);http://www.real.com\n"
- "A_REAL/SIPR;G.729;;Real & Sipro Voice Codec;http://www.real.com\n"
- "A_REAL/RALF;RealAudio Lossless;;Real Audio Lossless Format;http://www.real.com\n"
- "A_REAL/ATRC;Atrac;;Real & Sony Atrac3 Codec;http://www.real.com\n"
- "A_TRUEHD;TrueHD;;;http://www.dolby.com/consumer/technology/trueHD.html\n"
- "A_MLP;MLP;;Meridian Lossless Packing;http://www.meridian-audio.com\n"
- "A_AAC;AAC;;\n"
- "A_AAC/MPEG2/MAIN;AAC;;\n"
- "A_AAC/MPEG2/LC;AAC;;\n"
- "A_AAC/MPEG2/LC/SBR;AAC;;\n"
- "A_AAC/MPEG2/SSR;AAC;;\n"
- "A_AAC/MPEG4/MAIN;AAC;;\n"
- "A_AAC/MPEG4/LC;AAC;;\n"
- "A_AAC/MPEG4/LC/SBR;AAC;;\n"
- "A_AAC/MPEG4/LC/SBR/PS;AAC;;\n"
- "A_AAC/MPEG4/SSR;AAC\n"
- "A_AAC/MPEG4/LTP;AAC\n"
- "A_ALAC;ALAC;;Apple Lossless Audio Codec;http://www.apple.com/quicktime/download/standalone.html\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_Audio_Mpeg4 (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- ".mp3;MPEG Audio;;;\n"
- "A104;AMR;;;http://www.apple.com/quicktime/download/standalone.html;Wide band\n"
- "aac ;AAC;;\n"
- "ac-3;AC-3;;;\n"
- "alac;ALAC;;Apple Lossless Audio Codec;http://www.apple.com/quicktime/download/standalone.html\n"
- "alaw;ADPCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "dtsc;DTS;;Digital Theater Systems;http://www.dts.com\n"
- "dtsh;DTS;HRA;Digital Theater Systems High Res;http://www.dts.com\n"
- "dtsl;DTS;MA;Digital Theater Systems Master Audio;http://www.dts.com\n"
- "dtse;DTS;Express;;Digital Theater Systems Low Bitrate;http://www.dts.com\n"
- "dvca;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "ec-3;E-AC-3;;;\n"
- "enca;(Encrypted);;;\n"
- "fl32;PCM ; ;;http://www.apple.com/quicktime/download/standalone.html\n"
- "fl64;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "ima4;ADPCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "in24;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "in32;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "lpcm;PCM;;;\n"
- "MAC3;MACE 3;;;\n"
- "MAC6;MACE 6;;;\n"
- "nmos;Nellymoser;;;http://www.nellymoser.com/\n"
- "NONE;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "owma;WMA Pro;;Smooth Streaming Media Audio;http://alexzambelli.com/blog/2009/02/10/smooth-streaming-architecture/\n"
- "Qclp;QCELP;;Qualcomm PureVoice;\n"
- "QDM1;QDesign 1;;QDesign Music 1;http://www.apple.com/quicktime/download/standalone.html\n"
- "QDM2;Qdesign 2;;QDesign Music 2;http://www.apple.com/quicktime/download/standalone.html\n"
- "QDMC;Qdesign 2;(Old);QDesign Music 2 (old version, rare);http://www.apple.com/quicktime/download/standalone.html\n"
- "raw ;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "sac3;AC-3;;Made by Nero;http://www.nerodigital.com\n"
- "samr;AMR;;;http://www.apple.com/quicktime/download/standalone.html;Narrow band\n"
- "sawb;AMR;;;http://www.apple.com/quicktime/download/standalone.html;Wide band\n"
- "sevc;EVRC;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "sowt;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "twos;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "ulaw;ADPCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "vdva;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "WMA2;WMA;;Windows Media Audio;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx;;Version 2\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_Audio_Real (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "14.4;VSELP;;Real Player 1;http://www.real.com\n"
- "14_4;VSELP;;Real Player 1;http://www.real.com\n"
- "28.8;G.728;;Real Player 2;http://www.real.com\n"
- "28_8;G.728;;Real Player 2;http://www.real.com\n"
- "atrc;Atrac;;Real Player 8;http://www.real.com\n"
- "audio/X-MP3-draft-00;MPEG Audio;;\n"
- "audio/x-ralf-mpeg4;RealAudio Lossless;;Real Audio Lossless Format, Real Player 10;http://www.real.com;;;;;;Lossless\n"
- "audio/x-ralf-mpeg4-generic;RealAudio Lossless;;Real Audio Lossless Format, Real Player 10;http://www.real.com;;;;;;Lossless\n"
- "cook;Cooker;;Based on G.722.1, Real Player 6;http://www.real.com\n"
- "dnet;AC-3;;Real Player 3;http://www.real.com\n"
- "lpcJ;VSELP;;Real Player 1;http://www.real.com\n"
- "raac;AAC;;Real Player 9;http://www.real.com;LC\n"
- "racp;AAC;;Real Player 10;http://www.real.com;HE-AAC\n"
- "rtrc;RealAudio 8;;;http://www.real.com\n"
- "sipr;ACELP;;Real Player 4;http://www.real.com\n"
- "whrl;RealAudio Multi-Channel;;Real Audio Multi-Channel;http://www.real.com\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_Audio_Riff (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "0;;;;\n"
- "1;PCM;;;http://www.microsoft.com/windows/\n"
- "2;ADPCM;;;http://www.microsoft.com/windows/\n"
- "3;PCM;IEEE ;;http://www.microsoft.com/windows/;Float\n"
- "4;VSELP;Compaq;;\n"
- "5;CVSD;IBM;;\n"
- "6;ADPCM;CCITT;;http://www.microsoft.com/windows/;A-Law\n"
- "7;ADPCM;CCITT;;http://www.microsoft.com/windows/;U-Law\n"
- "8;DTS;;Digital Theater Systems;\n"
- "9;DRM;Microsoft;;\n"
- "A;WMA;;Windows Media Audio;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx;Voice\n"
- "C;MPEG Audio;;;;MPEG-2 5.1\n"
- "10;ADPCM;OKI;;\n"
- "11;ADPCM;Intel;;\n"
- "12;ADPCM;Mediaspace;;\n"
- "13;ADPCM;Sierra;;\n"
- "14;ADPCM;Antex;G.723\n"
- "15;STD;DSP solutions;\n"
- "16;FIX;DSP solutions;\n"
- "17;ADPCM;Dialogic-OKI;;http://www.microsoft.com/windows/\n"
- "18;ADPCM;;\n"
- "19;CU;HP;\n"
- "1A;Dynamic Voice;HP;\n"
- "20;ADPCM;Yamaha;\n"
- "21;SONARC;Speech Compression;\n"
- "22;Truespeech;DSP Group;;http://www.microsoft.com/windows/\n"
- "23;SC1;Echo Speech;\n"
- "24;AudioFile 36;Virtual Music ;\n"
- "25;APTX;;Audio Processing Technology X\n"
- "26;AudioFile 10;Virtual Music;\n"
- "27;Prosody 1612;Aculab plc;\n"
- "28;LRC;Merging Technologies;\n"
- "30;AC-2;Dolby Laboratories;\n"
- "31;GSM 6.10;Microsoft;;http://www.microsoft.com/windows/\n"
- "32;Microsoft Audio;;\n"
- "33;ADPCM;Antex;\n"
- "34;VQLPC;Control Resources;\n"
- "35;REAL;DSP Solutions;\n"
- "36;ADPCM;DSP Solutions;\n"
- "37;CR10;;Control Resources 10\n"
- "38;ADPCM;Natural MicroSystems VBX;\n"
- "39;ADPCM;Crystal Semiconductor IMA;\n"
- "3A;SC3;Echo Speech;\n"
- "3B;ADPCM;Rockwell;\n"
- "3C;DigiTalk;Rockwell DigiTalk;\n"
- "3D;Xebec;;Xebec Multimedia Solutions\n"
- "40;ADPCM;Antex Electronics;G.721\n"
- "41;CELP;Antex Electronics;G.728\n"
- "42;G.723.1;Microsoft;;http://www.microsoft.com/windows/;\n"
- "42;ADPCM;;IBM;;\n"
- "42;G.729;Microsoft;;;\n"
- "45;ADPCM;Microsoft;G.726;http://www.microsoft.com/windows/;\n"
- "50;MPEG Audio;;;http://www.iis.fraunhofer.de/amm/index.html;;Version 1\n"
- "51;MPEG Audio;;;http://www.iis.fraunhofer.de/amm/index.html;;Version 2\n"
- "52;RT24;InSoft, Inc.;;;\n"
- "53;PAC;InSoft, Inc.;;;\n"
- "55;MPEG Audio;MP3;;http://www.iis.fraunhofer.de/amm/index.html;\n"
- "59;G.723;Lucent;G.723;;\n"
- "60;Cirrus;;Cirrus Logic;;\n"
- "61;PCM;ESS Technology;;;\n"
- "62;Voxware;;;;\n"
- "63;Atrac;Canopus;;;\n"
- "64;ADPCM;APICOM;G.726;;\n"
- "65;ADPCM;APICOM;G.722;;\n"
- "66;DSAT;Microsoft;\n"
- "67;DSAT Display;Microsoft;\n"
- "69;BYTE_ALIGNED;Voxware;;http://www.voxware.com/\n"
- "70;AC8;Voxware;;http://www.voxware.com/\n"
- "71;AC10;Voxware;;http://www.voxware.com/\n"
- "72;AC16;Voxware;;http://www.voxware.com/\n"
- "73;AC20;Voxware;;http://www.voxware.com/\n"
- "74;RT24;Voxware;MetaVoice;http://www.voxware.com/\n"
- "75;RT29;Voxware;MetaSound;http://www.voxware.com/\n"
- "76;RT29HW;Voxware;;http://www.voxware.com/\n"
- "77;VR12;Voxware;;http://www.voxware.com/\n"
- "78;VR18;Voxware;;http://www.voxware.com/\n"
- "79;TQ40;Voxware;;http://www.voxware.com/\n"
- "7A;SC3;Voxware;\n"
- "7B;SC3;Voxware;\n"
- "80;Softsound;;\n"
- "81;TQ60;Voxware;;http://www.voxware.com/\n"
- "82;MSRT24;Microsoft;\n"
- "83;G.729a;AT&T;\n"
- "84;MVI_MVI2;Motion Pixels;\n"
- "85;ADPCM;DataFusion Systems;G.726\n"
- "86;GSM 6.10;DataFusion Systems;\n"
- "88;ISI AUDIO;;Iterated Systems AUDIO\n"
- "89;Onlive;;OnLive! Technologies\n"
- "8A;SX20;Multitude;\n"
- "8B;ADPCM;Infocom ITS A/S;\n"
- "8C;G.729;Convedia Corporation;\n"
- "91;SBC24;;Siemens Business Communications Sys 24\n"
- "92;AC-3;Sonic Foundry;\n"
- "93;G.723;MediaSonic;\n"
- "94;Prosody 8KBPS;Aculab plc;\n"
- "97;ADPCM;ZyXEL Communications;\n"
- "98;LPCBB;Philips Speech Processing;;\n"
- "99;Packed;;Studer Professional Audio AG Packed;\n"
- "A0;PHONYTALK;Malden Electronics;;\n"
- "A1;GSM;Racal Recorders;;\n"
- "A2;G.720a;Racal Recorders;;\n"
- "A3;G.723.1;Racal Recorders;;\n"
- "A4;ACELP;Racal Recorders;;\n"
- "B0;AAC;NEC Corporation;;\n"
- "FF;AAC;;;\n"
- "100;ADPCM;;;\n"
- "101;IRAT;BeCubed;;\n"
- "102;ADPCM;IBM;;;A-law\n"
- "103;ADPCM;IBM AVC;;\n"
- "111;G.723;Vivo;;\n"
- "112;SIREN;Vivo;;\n"
- "120;CELP;Philips Speech Processing;;\n"
- "121;Grundig;Philips Speech Processing;;\n"
- "123;G.723;Digital Equipment Corporation;;\n"
- "125;ADPCM;;;\n"
- "130;ACELP;Sipro;;http://dividix.host.sk;.net\n"
- "131;ACELP;Sipro;;;4800\n"
- "132;ACELP;Sipro;;;8V3\n"
- "133;G.729;Sipro;;\n"
- "134;G.729a;Sipro;;\n"
- "135;KELVIN;Sipro;;\n"
- "135;AMR;VoiceAge Corporation;;\n"
- "140;ADPCM;Dictaphone Corporation;G.726;\n"
- "140;CELP68;Dictaphone Corporation;;\n"
- "140;CELP54;Dictaphone Corporation;;\n"
- "150;PureVoice;Qualcomm;;\n"
- "151;HalfRate;Qualcomm;;\n"
- "155;TUBGSM;Ring Zero Systems;;\n"
- "160;WMA;;Windows Media Audio;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx;;Version 1\n"
- "161;WMA;;Windows Media Audio;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx;;Version 2\n"
- "162;WMA;;Windows Media Audio;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx;Pro\n"
- "163;WMA;;Windows Media Audio;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx;Lossless\n"
- "170;ADPCM;Unisys Nap;;;\n"
- "171;ADPCM;Unisys Nap;;;U-law\n"
- "172;ADPCM;Unisys Nap;;;A-law\n"
- "173;16K;Unisys Nap;;;\n"
- "174;G.700;SyCom Technologies;;;\n"
- "175;ADPCM;SyCom Technologies;;;\n"
- "176;CELP54;SyCom Technologies;;;\n"
- "177;CELP68;SyCom Technologies;;;\n"
- "178;ADPCM;Knowledge Adventure, Inc.;;;\n"
- "180;AAC;Fraunhofer IIS;;;\n"
- "190;DTS;;Digital Theater Systems;;\n"
- "200;ADPCM;Creative Labs;;;\n"
- "202;Fast Speech 8;Creative Labs\n"
- "203;Fast Speech 10;Creative Labs\n"
- "210;ADPCM;UHER informatic GmbH\n"
- "215;ACM;Ulead\n"
- "216;ACM;Ulead\n"
- "220;QuaterDeck;\n"
- "230;VC;;I-link VC\n"
- "240;RAW_SPORT;;Aureal\n"
- "241;AC-3;ESST\n"
- "250;HSX;Interactive Products, Inc.\n"
- "251;RPELP;Interactive Products, Inc.\n"
- "260;CS2;Consistent Software\n"
- "270;Atrac3;Sony\n"
- "271;SCY;Sony\n"
- "272;Atrac3;Sony\n"
- "273;SPC;Sony\n"
- "280;Telum;;\n"
- "281;TelumIA;;\n"
- "285;ADPCM;Norcom Voice Systems;\n"
- "300;FM_TOWNS_SND;Fujitsu;\n"
- "350;Dev;Micronas Semiconductors, Inc.;\n"
- "351;CELP833;Micronas Semiconductors, Inc.;\n"
- "400;DIGITAL;Brooktree;\n"
- "401;Music Coder;Intel;;http://www.intel.com/\n"
- "402;IAC2;Ligos;;http://www.ligos.com\n"
- "450;Qdesign;;QDesign Music\n"
- "500;VP7;;On2\n"
- "501;VP6;;On2\n"
- "680;VM;;AT&T VME_VMPCM\n"
- "681;TPC;;AT&T TPC\n"
- "700;YMPEG;;YMPEG Alpha\n"
- "8AE;LiteWave;;ClearJump LiteWave\n"
- "AAC;AAC;;;\n"
- "1000;GSM;Ing C. Olivetti & C., S.p.A.;;\n"
- "1001;ADPCM;Ing C. Olivetti & C., S.p.A.;;\n"
- "1002;CELP;Ing C. Olivetti & C., S.p.A.;;\n"
- "1003;SBC;Ing C. Olivetti & C., S.p.A.;;\n"
- "1004;OPR;Ing C. Olivetti & C., S.p.A.;;\n"
- "1100;LH_CODEC;Lernout & Hauspie; Codec;\n"
- "1101;CELP;Lernout & Hauspie;;http://www.microsoft.com/windows/;4.8 kb/s\n"
- "1102;SBC;Lernout & Hauspie;;http://www.microsoft.com/windows/;8 kb/s\n"
- "1103;SBC;Lernout & Hauspie;;http://www.microsoft.com/windows/;12 kb/s\n"
- "1104;SBC;Lernout & Hauspie;;http://www.microsoft.com/windows/;16 kb/s\n"
- "1400;Norris;;Norris Communications, Inc.;\n"
- "1401;ISIAudio;;;\n"
- "1500;MUSICOMPRESS;;Soundspace Music Compression;\n"
- "181C;RT24;VoxWare;;\n"
- "181E;AX24000P;Lucent elemedia;;\n"
- "1971;SonicFoundry;;Lossless\n"
- "1C03;ADPCM;Lucent;G.723\n"
- "1C07;SX8300P;Lucent\n"
- "1C0C;ADPCM;Lucent;G.723\n"
- "1F03;DigiTalk;;CUseeMe (ex-Rocwell)\n"
- "1FC4;ALF2CD;NCT Soft\n"
- "2000;AC-3;\n"
- "2001;DTS;;Digital Theater Systems\n"
- "2002;VSELP;;RealAudio 1/2 14.4\n"
- "2003;VSELP;;RealAudio 1/2 28.8\n"
- "2004;Cooker;;RealAudio G2/8 Cook (low bitrate)\n"
- "2005;DNET;;RealAudio 3/4/5 Music (DNET)\n"
- "2006;AAC;;RealAudio 10 AAC (RAAC)\n"
- "2007;AAC;;RealAudio 10 AAC+ (RACP)\n"
- "2048;Sonic;\n"
- "3313;AviSynth;;makeAVIS (fake AVI sound from AviSynth scripts)\n"
- "4143;AAC;;Divio MPEG-4 AAC audio;;\n"
- "4201;Nokia;;;;\n"
- "4243;ADPCM;;G.726;;\n"
- "43AC;Speex;;;;\n"
- "564C;Vorbis;;;;\n"
- "566F;Vorbis;;;http://www.vorbis.com;\n"
- "5756;WavPack;;;http://www.wavpack.com/;\n"
- "674F;Vorbis;;;http://www.vorbis.com;;Mode 1\n"
- "6750;Vorbis;;;http://www.vorbis.com;;Mode 2\n"
- "6751;Vorbis;;;http://www.vorbis.com;;Mode 3\n"
- "676F;Vorbis;;;http://www.vorbis.com;;Mode 1+\n"
- "6770;Vorbis;;;http://www.vorbis.com;;Mode 2+\n"
- "6771;Vorbis;;;http://www.vorbis.com;;Mode 3+\n"
- "8180;AAC\n"
- "7A21;AMR;;GSM-AMR (CBR, no SID);http://www.microsoft.com;\n"
- "7A22;AMR;;GSM-AMR (VBR, including SID);http://www.microsoft.com;\n"
- "A100;G.723.1;;;;\n"
- "A101;AVQSBC;;\n"
- "A102;ODSBC;;\n"
- "A103;G729A;;\n"
- "A104;AMR;;\n"
- "A105;ADPCM;;G.726\n"
- "A106;AAC;;\n"
- "A107;ADPCM;;G.726\n"
- "A109;Speex;;;http://www.speex.org/\n"
- "DFAC;FrameServer;;DebugMode SonicFoundry Vegas FrameServer ACM Codec\n"
- "F1AC;FLAC;;Free Lossless Audio Codec\n"
- "FFFE;Extensible;;\n"
- "FFFF;In Development;;\n"
- "58CB7144-23E9-BFAA-A119-FFFA01E4CE62;Atrac3;;\n"
- "AD98D184-AAC3-11D0-A41C-00A0C9223196;VC;;\n"
- "05589F81-C356-11CE-BF01-00AA0055595A;WaveFormatEx;;\n"
- "518590A2-A184-11D0-8522-00C04FD9BAF3;DSound;;\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_Text_Matroska (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "S_ASS;ASS;;Advanced Sub Station Alpha\n"
- "S_IMAGE/BMP;Bitmap;;Basic image based subtitle format\n"
- "S_SSA;SSA;;Sub Station Alpha\n"
- "S_TEXT/ASS;ASS;;Advanced Sub Station Alpha\n"
- "S_TEXT/SSA;SSA;;Sub Station Alpha\n"
- "S_TEXT/USF;USF;;Universal Subtitle Format\n"
- "S_TEXT/UTF8;UTF-8;;UTF-8 Plain Text\n"
- "S_USF;USF;;Universal Subtitle Format\n"
- "S_UTF8;UTF-8;;UTF-8 Plain Text\n"
- "S_VOBSUB;VobSub;;Picture based subtitle format used on DVDs\n"
- "S_HDMV/PGS;PGS;;Picture based subtitle format used on BDs/HD-DVDs\n"
- "S_HDMV/TEXTST;TEXTST;;Text based subtitle format used on BDs\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_Text_Mpeg4 (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "c608;EIA-608\n"
- "c708;EIA-708\n"
- "subp;VobSub;;The same subtitle format used on DVDs\n"
- "text;Apple text;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "sbtl;Apple text;(iPhone);;http://www.apple.com/quicktime/download/standalone.html\n"
- "dfxp;TTML\n"
- "tx3g;Timed text;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "enct;(Encrypted);;\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_Text_Riff (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "DXSB;DivX Subtitle;;Subtitle in AVI from DivX networks;http://www.divx.com\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_CodecID_Other_Mpeg4 (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "rtp ;RTP\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Codec (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- " BIT;RGB;4CC;V;RGB;;Uncompressed\n"
- " JPG;JPEG;4CC;V;JPEG;;\n"
- " PNG;PNG;4CC;V;RGB;;\n"
- " RAW;RGB;4CC;V;RGB;;Uncompressed;http://www.fourcc.org/indexrgb.htm\n"
- " RGB;RGB;4CC;V;RGB;;Uncompressed. Basic Windows bitmap format. 1, 4 and 8 bpp versions are palettised. 16, 24 and 32bpp contain Uncompressed RGB samples.;http://www.fourcc.org/indexrgb.htm\n"
- " RL4;RGB;4CC;V;RGB;;RLE 4bpp;http://www.fourcc.org/indexrgb.htm\n"
- " RL8;RGB;4CC;V;RGB;;RLE 8bpp;http://www.fourcc.org/indexrgb.htm\n"
- "1978;RGB;4CC;V;JPEG;;A.M.Paredes predictor;http://www.pegasusimaging.com/cgi-bin/download2.cgi?LVIDB\n"
- "2VUY;YUV;4CC;V;YUV;;Optibase VideoPump 8-bit 4:2:2 Component YCbCr\n"
- "3IV0;3ivX;4CC;V;MPEG-4V;;3ivX pre-1.0;http://www.3ivx.com/download/\n"
- "3IV1;3ivX;4CC;V;MPEG-4V;;3ivX 1.0-3.5;http://www.3ivx.com/download/\n"
- "3IV2;3ivX;4CC;V;MPEG-4V;;3ivX 4.0;http://www.3ivx.com/download/\n"
- "3IVD;3ivX;4CC;V;MPEG-4V;;;http://ffdshow-tryout.sourceforge.net/\n"
- "3IVX;3ivX;4CC;V;MPEG-4V;;;http://www.3ivx.com/download/\n"
- "3VID;3ivX;4CC;V;MPEG-4V;;;http://www.3ivx.com/download/\n"
- "8BPS;QuickTime 8bps;4CC;V;RGB;;Apple QuickTime Planar RGB with Alpha-channel;http://ffdshow-tryout.sourceforge.net/\n"
- "AAS4;Autodesk;4CC;V;RGB;;Autodesk Animator Studio RLE (warning: this is a discoutinued product);http://mirror01.iptelecom.net.ua/~video/codecs/Autodesk.Animator.v1.11.Codec.exe\n"
- "AASC;Autodesk;4CC;V;RGB;;Autodesk Animator Studio RLE (warning: this is a discoutinued product);http://mirror01.iptelecom.net.ua/~video/codecs/Autodesk.Animator.v1.11.Codec.exe\n"
- "ABYR;Kensigton low;4CC;V;;;Kensington (low resolution, low frame rate (6fps) for digital cameras)\n"
- "ACTL;ACT-L2;4CC;V;;;Streambox ACT-L2;http://www.streambox.com/products/act-L2_codec.htm\n"
- "ADV1;WaveCodec;4CC;V;Wavelet;;Loronix WaveCodec;http://www.loronix.com/products/video_clips/wavecodec.asp\n"
- "ADVJ;Avid;4CC;V;JPEG;;Avid JPEG. Aka AVRn\n"
- "AEIK;Indeo 3.2;4CC;V;;;Intel Indeo Video 3.2 (Vector Quantization)\n"
- "AEMI;VideoONE;4CC;V;MPEG-V;;Array VideoONE MPEG-1-I Capture. Array's used for I frame only MPEG-1 AVI files;http://www.array.com\n"
- "AFLC;Autodesk;4CC;V;;;Autodesk Animator Studio FLI (256 color) (warning: this is a discoutinued product);http://mirror01.iptelecom.net.ua/~video/codecs/Autodesk.Animator.v1.11.Codec.exe\n"
- "AFLI;Autodesk;4CC;V;;;Autodesk Animator Studio FLI (256 color) (warning: this is a discoutinued product);http://mirror01.iptelecom.net.ua/~video/codecs/Autodesk.Animator.v1.11.Codec.exe\n"
- "AHDV;CineForm;4CC;V;Wavelet;;CineForm 10-bit Visually Perfect HD (Wavelet);http://www.cineform.com/products/ConnectHD.htm\n"
- "AJPG;JPEG;4CC;V;JPEG;;22fps JPEG-based for digital cameras\n"
- "ALPH;Ziracom;4CC;V;;;Ziracom Digital Communications Inc.\n"
- "AMPG;VideoONE;4CC;V;MPEG-1;;Array VideoONE MPEG;http://www.array.com\n"
- "AMR ;AMR;4CC;V;;;Speech codec\n"
- "ANIM;RDX;4CC;V;;;Intel RDX\n"
- "AP41;AngelPotion;4CC;V;MPEG-4V;;AngelPotion Definitive 1 (hack of MS MPEG-4 v3);http://www.divxity.com/download/ap4v1-702.exe\n"
- "AP42;AngelPotion;4CC;V;MPEG-4V;;AngelPotion Definitive 2 (hack of MS MPEG-4 v3);http://www.divxity.com/download/ap4v1-702.exe\n"
- "ASLC;AlparySoft Lossless;4CC;V;;;AlparySoft Lossless;http://www.free-codecs.com/download/Alparysoft_Lossless_Video_Codec.htm\n"
- "ASV1;Asus 1;4CC;V;;;Asus Video 1;ftp://ftp.asuscom.de/pub/asuscom/treiber/vga/ASUS_VGA_TOOLS/asv2dec.zip\n"
- "ASV2;Asus 2;4CC;V;;;Asus Video 2;ftp://ftp.asuscom.de/pub/asuscom/treiber/vga/ASUS_VGA_TOOLS/asv2dec.zip\n"
- "ASVX;Asus X;4CC;V;;;Asus Video X;ftp://ftp.asuscom.de/pub/asuscom/treiber/vga/ASUS_VGA_TOOLS/asv2dec.zip\n"
- "ATM4;Nero MPEG-4;4CC;V;MPEG-4V;;Ahead Nero Digital MPEG-4;http://www.nero.com\n"
- "AUR2;YUV;4CC;V;YUV;;Auravision Aura 2 - YUV 422\n"
- "AURA;YUV;4CC;V;YUV;;Auravision Aura 1 - YUV 411\n"
- "AUVX;AUVX;4CC;V;;;USH GmbH\n"
- "AV1X;Avid 1:1;4CC;V;;;Avid 1:1x (Quick Time);http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe\n"
- "AVC1;AVC;4CC;V;AVC;;Advanced Video Codec;http://ffdshow-tryout.sourceforge.net/\n"
- "AVD1;Avid DV;4CC;V;DV;;Avid DV (Quick Time);http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe\n"
- "AVDJ;Avid JFIF;4CC;V;JPEG;;Avid Meridien JFIF with Alpha-channel;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe\n"
- "AVDN;Avid HD;4CC;V;;;Avid DNxHD (Quick Time);http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe\n"
- "AVDV;Avid DV;4CC;V;DV;;Avid DV;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe\n"
- "AVI1;MainConcept;4CC;V;JPEG;;MainConcept JPEG\n"
- "AVI2;MainConcept;4CC;V;JPEG;;MainConcept JPEG\n"
- "AVID;Avid JPEG;4CC;V;JPEG;;Avid JPEG;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe\n"
- "AVIS;AviSynth;4CC;V;;;Wrapper for AviSynth (Dummy);http://ffdshow-tryout.sourceforge.net/\n"
- "AVMP;Avid IMX;4CC;V;;;Avid IMX (Quick Time);http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe\n"
- "AVR ;Avid NuVista;4CC;V;JPEG;;Avid ABVB/NuVista JPEG with Alpha-channel\n"
- "AVRn;Avid JPEG;4CC;V;JPEG;;Avid JPEG;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe\n"
- "AVRN;Avid JPEG;4CC;V;JPEG;;Avid JPEG;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe\n"
- "AVUI;Avid;4CC;V;;;Avid Meridien Uncompressed with Alpha-channel;http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe\n"
- "AVUP;Avid;4CC;V;;;Avid 10bit Packed (Quick Time);http://mirror01.iptelecom.net.ua/~video/codecs/Avid.VfW.codec.v2.0d2.exe\n"
- "AYUV;YUV;4CC;V;YUV;;4:4:4 YUV (AYUV)\n"
- "AZPR;QuickTime;4CC;V;;;Quicktime Apple Video;http://www.apple.com/quicktime/download/standalone.html\n"
- "AZRP;QuickTime;4CC;V;;;Quicktime Apple Video;http://www.apple.com/quicktime/download/standalone.html\n"
- "BGR ;RGB;4CC;V;RGB;;Uncompressed RGB32\n"
- "BHIV;BeHere iVideo;4CC;V;;;BeHere iVideo\n"
- "BINK;Bink;4CC;V;;;RAD Game Tools Bink Video\n"
- "BIT ;RGB;4CC;V;RGB;;Uncompressed. BI_BITFIELDS\n"
- "BITM;H.261;4CC;V;;;Microsoft H.261\n"
- "BLOX;Blox;4CC;V;;;Jan Jezabek BLOX MPEG;http://www.ii.uj.edu.pl/~jezabek/blox/blox-0.1.0b.zip\n"
- "BLZ0;DivX;4CC;V;MPEG-4V;;DivX for Blizzard Decoder Filter;http://ffdshow-tryout.sourceforge.net/\n"
- "BT20;MediaStream;4CC;V;;;Conexant ProSummer MediaStream\n"
- "BTCV;Composite;4CC;V;;;Conexant Composite Video\n"
- "BTVC;Composite;4CC;V;;;Conexant Composite Video\n"
- "BW00;BergWave;4CC;V;Wavelet;;BergWave (Wavelet)\n"
- "BW10;Broadway;4CC;V;MPEG-1;;Data Translation Broadway MPEG Capture/Compression\n"
- "BXBG;Boxx RGB;4CC;V;;;BOXX BGR\n"
- "BXRG;Boxx RGB;4CC;V;;;BOXX RGB\n"
- "BXY2;Boxx YUV;4CC;V;;;BOXX 10-bit YUV\n"
- "BXYV;Boxx YUV;4CC;V;;;BOXX YUV\n"
- "CC12;Intel YUV;4CC;V;YUV;;Intel YUV12\n"
- "CDV5;Canopus DV;4CC;V;DV;;Canopus SD50/DVHD;http://www.cineform.com/products/ConnectHD.htm\n"
- "CDVC;Canopus DV;4CC;V;DV;;Canopus DV (DV);http://www.cineform.com/products/ConnectHD.htm\n"
- "CDVH;Canopus DV;4CC;V;DV;;Canopus SD50/DVHD;http://www.cineform.com/products/ConnectHD.htm\n"
- "CFCC;Perception;4CC;V;;;DPS Perception JPEG (dummy format - only AVI header)\n"
- "CFHD;CineForm;4CC;V;;;CineForm 10-bit Visually Perfect HD (Wavelet)\n"
- "CGDI;Camcorder;4CC;V;;;Camcorder Video (MS Office 97)\n"
- "CHAM;Champagne;4CC;V;;;Winnov Caviara Champagne\n"
- "CJPG;Creative JPEG;4CC;V;JPEG;;Creative Video Blaster Webcam Go JPEG\n"
- "CLJR;YUV;4CC;V;YUV;;Cirrus Logic YUV 4:1:1;http://www.fourcc.org/indexyuv.htm\n"
- "CLLC;Canopus;4CC;V;;;Canopus LossLess\n"
- "CLPL;YUV;4CC;V;YUV;;Format similar to YV12 but including a level of indirection.\n"
- "CM10;MediaShow;4CC;V;;;CyberLink Corporation;http://www.cyberlink.com\n"
- "CMYK;CMYK;4CC;V;;;Common Data Format in Printing\n"
- "COL0;MS MPEG-4 v3;4CC;V;MPEG-4V;;Hacked MS MPEG-4 v3;http://ffdshow-tryout.sourceforge.net/\n"
- "COL1;MS MPEG-4 v3;4CC;V;MPEG-4V;;Hacked MS MPEG-4 v3;http://ffdshow-tryout.sourceforge.net/\n"
- "CPLA;YUV;4CC;V;YUV;;Weitek YUV 4:2:0 Planar\n"
- "CRAM;MS Video;4CC;V;;;Microsoft Video 1\n"
- "CSCD;CamStudio;4CC;V;;;RenderSoft CamStudio lossless (LZO & GZIP compression)\n"
- "CT10;TalkingShow;4CC;V;;;CyberLink Corporation;http://www.cyberlink.com\n"
- "CTRX;Citrix;4CC;V;;;Citrix Scalable Video\n"
- "CUVC;Canopus HQ;4CC;V;;;Canopus HQ\n"
- "CVID;Cinepack;4CC;V;;;Cinepak by CTi (ex. Radius) Vector Quantization;http://www.cinepak.com/text.html\n"
- "cvid;Cinepack;4CC;V;;;Cinepak by CTi (ex. Radius) Vector Quantization;http://www.apple.com/quicktime/download/standalone.html\n"
- "CWLT;WLT;4CC;V;;;Microsoft Color WLT DIB\n"
- "CYUV;YUV;4CC;V;YUV;;Creative Labs YUV 4:2:2;http://www.fourcc.org/indexyuv.htm\n"
- "CYUY;YUV;4CC;V;YUV;;ATI Technologies YUV;http://www.fourcc.org/indexyuv.htm\n"
- "D261;H.261;4CC;V;;;DEC H.261\n"
- "D263;H.263;4CC;V;;;DEC H.263\n"
- "DAVC;AVC;4CC;V;AVC;;Dicas MPEGable H.264/MPEG-4 AVC base profile\n"
- "DC25;MainConcept DV;4CC;V;DV;;MainConcept ProDV\n"
- "DCAP;Pinnacle DV25;4CC;V;DV;;Pinnacle DV25\n"
- "DCL1;Data Connextion;4CC;V;;;Data Connection Conferencing\n"
- "DCT0;WniWni;4CC;V;;;WniWni\n"
- "DFSC;VFW;4CC;V;;;DebugMode FrameServer VFW\n"
- "DIB ;RGB;4CC;V;RGB;;Device Independent Bitmap\n"
- "DIV1;FFMpeg;4CC;V;MPEG-4V;;FFmpeg-4 V1 (hacked MS MPEG-4 V1);http://ffdshow-tryout.sourceforge.net/\n"
- "DIV2;MS MPEG-4 1/2;4CC;V;MPEG-4V;;;http://ffdshow-tryout.sourceforge.net/\n"
- "DIV3;DivX 3 Low;4CC;V;MPEG-4V;;;http://www.divx.com\n"
- "DIV4;DivX 3 Fast;4CC;V;MPEG-4V;;;http://www.divx.com\n"
- "DIV5;DivX 5;4CC;V;MPEG-4V;;;http://www.divx.com\n"
- "DIV6;MS MPEG-4 v3;4CC;V;MPEG-4V;;MS MPEG-4 v3;http://ffdshow-tryout.sourceforge.net/\n"
- "DIVX;DivX 4;4CC;V;MPEG-4V;;Project Mayo DivX 4;http://www.divx.com\n"
- "divx;DivX;4CC;V;MPEG-4V;;Mainly used by Google;http://www.divx.com\n"
- "DJPG;Broadway 101;4CC;V;JPEG;;Data Translation, Inc.\n"
- "DM4V;Dicas;4CC;V;MPEG-4V;;Dicas MPEGable MPEG-4\n"
- "DMB1;Rainbow;4CC;V;JPEG;;Matrox Rainbow Runner hardware compression;http://mirror01.iptelecom.net.ua/~video/codecs/PICVideo.MJPG.v2.10.27.codec.exe\n"
- "DMB2;Paradigm JPEG;4CC;V;JPEG;;JPEG used by Paradigm\n"
- "DMK2;V36 PDA;4CC;V;;;ViewSonic V36 PDA Video\n"
- "DP02;DynaPel;4CC;V;MPEG-4V;;DynaPel MPEG-4\n"
- "DP16;YUV411;4CC;V;YUV;;Matsushita Electric Industrial Co., Ltd. (With DPCM 6-bit compression)\n"
- "DP18;YUV411;4CC;V;YUV;;Matsushita Electric Industrial Co., Ltd. (With DPCM 8-bit compression)\n"
- "DP26;YUV422;4CC;V;YUV;;Matsushita Electric Industrial Co., Ltd. (With DPCM 6-bit compression)\n"
- "DP28;YUV422;4CC;V;YUV;;Matsushita Electric Industrial Co., Ltd. (With DPCM 8-bit compression)\n"
- "DP96;YVU9;4CC;V;YUV;;Matsushita Electric Industrial Co., Ltd. (With DPCM 6-bit compression)\n"
- "DP98;YVU9;4CC;V;YUV;;Matsushita Electric Industrial Co., Ltd. (With DPCM 8-bit compression)\n"
- "DP9L;YVU9;4CC;V;YUV;;Matsushita Electric Industrial Co., Ltd. (With DPCM 6-bit compression)\n"
- "DPS0;DPS Reality;4CC;V;JPEG;;DPS Reality JPEG (dummy format - only AVI header)\n"
- "DPSC;DPS PAR;4CC;V;JPEG;;DPS PAR JPEG (dummy format - only AVI header)\n"
- "DRWX;Pinnacle DV25;4CC;V;DV;;Pinnacle DV25\n"
- "DSVD;DV;4CC;V;DV;;Microsoft DirectShow DV\n"
- "DTMT;Media-100;4CC;V;;;Media-100\n"
- "DTNT;Media-100;4CC;V;;;Media-100\n"
- "DUCK;TrueMotion S;4CC;V;;;Duck Corporation True Motion S\n"
- "DV10;BlueFish;4CC;V;;;BlueFish444 (lossless RGBA, YUV 10-bit)\n"
- "DV25;DVCPro;4CC;V;DV;;Matrox DVCPRO\n"
- "DV50;DVCPro5;4CC;V;DV;;Matrox\n"
- "DVAN;Pinnacle DV300;4CC;V;DV;;Pinnacle miroVideo DV300 SW only\n"
- "DVC ;Apple DV NTSC;4CC;V;DV;;Apple QuickTime DV (DVCPRO NTSC);http://www.apple.com/quicktime/download/standalone.html\n"
- "dvc ;Apple DV NTSC;4CC;V;DV;;Apple QuickTime DV (DVCPRO NTSC);http://www.apple.com/quicktime/download/standalone.html\n"
- "DVCP;Apple DV PAL;4CC;V;DV;;Apple QuickTime DV (DVCPRO PAL);http://www.apple.com/quicktime/download/standalone.html\n"
- "dvcp;Apple DV PAL;4CC;V;DV;;Apple QuickTime DV (DVCPRO PAL);http://www.apple.com/quicktime/download/standalone.html\n"
- "DVCS;MainConcept DV;4CC;V;DV;;MainConcept DV\n"
- "DVE2;Insoft DVE-2;4CC;V;DV;;InSoft DVE-2 Videoconferencing\n"
- "DVH1;Pinnacle DV;4CC;V;DV;;Pinnacle DVHD100\n"
- "dvhd;DV HD;4CC;V;DV;;DV 1125 lines at 30.00 Hz or 1250 lines at 25.00 Hz\n"
- "dvhd;DV HD;4CC;A;DV;;Sony DV (DV), audio part\n"
- "DVIS;DualMoon DV;4CC;V;DV;;VSYNC DualMoon Iris DV\n"
- "DVL ;Radius DV NTSC;4CC;V;DV;;Radius SoftDV 16:9 NTSC\n"
- "DVLP;Radius DV PAL;4CC;V;DV;;Radius SoftDV 16:9 PAL\n"
- "DVMA;Darim DV;4CC;V;DV;;Darim Vision DVMPEG (dummy for MPEG compressor)\n"
- "DVNM;DVNM;4CC;V;;;Matsushita Electric Industrial Co., Ltd.\n"
- "DVOR;BlueFish;4CC;V;;;BlueFish444 (lossless RGBA, YUV 10-bit)\n"
- "DVPN;Apple DV NTSC;4CC;V;DV;;Apple QuickTime DV (DV NTSC)\n"
- "DVPP;Apple DV PAL;4CC;V;DV;;Apple QuickTime DV (DV PAL)\n"
- "DVR ;MPEG-2 Video;4CC;V;MPEG-2;;MPEG-2 Video in a ASF container\n"
- "DVR1;Targa2000;4CC;V;;;TARGA2000\n"
- "DVRS;DualMoon DV;4CC;V;DV;;VSYNC DualMoon Iris DV\n"
- "DVSD;DV;4CC;V;DV;;IEC 61834 and SMPTE 314M\n"
- "dvsd;Sony DV;4CC;V;DV;;Sony DV (DV) 525 lines at 29.97 Hz or 625 lines at 25.00 Hz\n"
- "dvsd;Sony DV;4CC;A;DV;;Sony DV (DV), audio part\n"
- "dvsl;Sony DV;4CC;V;DV;;Sony DV (DV) 525 lines at 29.97 Hz or 625 lines at 25.00 Hz\n"
- "dvsl;Sony DV;4CC;A;DV;;Sony DV (DV), audio part\n"
- "DVSL;DSL DV;4CC;V;DV;;DV compressed in SD (SDL)\n"
- "DVX1;DVX 1 SP;4CC;V;;;Lucent DVX1000SP Video Decoder\n"
- "DVX2;DVX 2 S;4CC;V;;;Lucent DVX2000S Video Decoder\n"
- "DVX3;DVX 3 S;4CC;V;;;Lucent DVX3000S Video Decoder\n"
- "DX50;DivX 5;4CC;V;MPEG-4V;;;http://www.divx.com\n"
- "DXGM;EA GameVideo;4CC;V;;;Electronic Arts Game Video\n"
- "DXSB;DivX.com Subtitle;4CC;T;;;Subtitle in AVI from DivX networks;http://www.divx.com\n"
- "DXT1;DirectX TC;4CC;V;;;DirectX Compressed Texture (1bit alpha channel)\n"
- "DXT2;DirectX TC;4CC;V;;;DirectX Compressed Texture\n"
- "DXT3;DirectX TC;4CC;V;;;DirectX Compressed Texture (4bit alpha channel)\n"
- "DXT4;DirectX TC;4CC;V;;;DirectX Compressed Texture\n"
- "DXT5;DirectX TC;4CC;V;;;DirectX Compressed Texture (3bit alpha channel with interpolation)\n"
- "DXTC;DirectX TC;4CC;V;;;DirectX Texture Compression\n"
- "DXTn;DirectX TC;4CC;V;;;Microsoft Compressed Texture\n"
- "DXTN;DirectX TC;4CC;V;;;Microsoft DirectX Compressed Texture (DXTn)\n"
- "EKQ0;Elsa KQ;4CC;V;;;Elsa graphics card quick\n"
- "ELK0;Elsa LK;4CC;V;;;Elsa graphics card\n"
- "EM2V;Elymonyx MPEG-2;4CC;V;;;Etymonix MPEG-2 I-frame\n"
- "EMWC;WMA;;A;;;EverAd, Inc.\n"
- "EQK0;Elsa;4CC;V;;;Elsa graphics card quick\n"
- "ESCP;Escape;4CC;V;;;Eidos Escape\n"
- "ETV1;eTreppid 1;4CC;V;;;eTreppid Video 1\n"
- "ETV2;eTreppid 2;4CC;V;;;eTreppid Video 2\n"
- "ETVC;eTreppid C;4CC;V;;;eTreppid Video C\n"
- "FFDS;FFDS;4CC;V;;;;http://ffdshow-tryout.sourceforge.net/\n"
- "FFV1;FFV1;4CC;V;;;;http://ffdshow-tryout.sourceforge.net/\n"
- "FFVH;FFVH;4CC;V;;;;http://ffdshow-tryout.sourceforge.net/\n"
- "FLIC;FLI/FLC;4CC;V;;;Autodesk FLI/FLC Animation\n"
- "FLJP;DField JPEG;4CC;V;;;D-Vision Field Encoded JPEG with LSI (or Targa emulation)\n"
- "FLV1;H.263;;4CC;V;;;;http://ffdshow-tryout.sourceforge.net/\n"
- "FLV4;VP6;4CC;V;;;Flash, On2 Technologies;http://www.on2.com\n"
- "FMJP;D-Vision JPEG;4CC;V;;;D-Vision fieldbased ISO JPEG\n"
- "FMP4;MPEG-4 Visual;4CC;V;MPEG-4V;;;http://ffdshow-tryout.sourceforge.net/\n"
- "FPS1;FRAPS;4CC;V;;;;http://www.fraps.com/\n"
- "FRLE;SoftLab-Nsk JPEG;4CC;V;;;SoftLab-NSK Y16 + Alpha RLE\n"
- "FRWA;SoftLab-Nsk JPEG (w Alpha);4CC;V;;;SoftLab-NSK Vision Forward JPEG with Alpha-channel\n"
- "FRWD;SoftLab-Nsk JPEG;4CC;V;;;SoftLab-NSK Vision Forward JPEG\n"
- "FRWT;SoftLab-Nsk JPEG;4CC;V;;;SoftLab-NSK Vision Forward JPEG with Alpha-channel\n"
- "FRWU;SoftLab-Nsk JPEG;4CC;V;;;SoftLab-NSK Vision Forward Uncompressed\n"
- "FVF1;Itered Fractal;4CC;V;;;Iterated Systems Fractal Video Frame\n"
- "FVFW;FVFW;4CC;V;;;;http://ffdshow-tryout.sourceforge.net/\n"
- "FXT1;3DFX;4CC;V;;;3dfx Interactive, Inc.\n"
- "G2M2;GoToMeeting2;4CC;V;;;Citrix Systems, Inc.;http://www.gotomeeting.com/\n"
- "G2M3;GoToMeeting3;4CC;V;;;Citrix Systems, Inc.;http://www.gotomeeting.com/\n"
- "GEPJ;White Pine JPEG;4CC;V;;;White Pine JPEG\n"
- "GJPG;Grand Tech GT891x;4CC;V;;;Grand Tech GT891x\n"
- "GLCC;GigaLink;4CC;V;;;GigaLink AV Capture\n"
- "GLZW;Gabest;4CC;V;;;Motion LZW by Gabest;http://sourceforge.net/project/showfiles.php?group_id=82303&package_id=84358\n"
- "GPEG;Gabest;4CC;V;JPEG;;JPEG by Gabest (with floating point);http://sourceforge.net/project/showfiles.php?group_id=82303&package_id=84358\n"
- "GPJM;Pinnacle JPEG;4CC;V;JPEG;;Pinnacle ReelTime JPEG\n"
- "GREY;YUV;4CC;V;YUV;;Simple grayscale video;http://www.fourcc.org/indexyuv.htm\n"
- "GWLT;MS GWLT;4CC;V;;;Microsoft Greyscale WLT DIB\n"
- "GXVE;ViVD V2;4CC;V;;;SoftMedia\n"
- "H260;Intel H.260;4CC;V;;;Intel H.260\n"
- "H261;Intel H.261;4CC;V;;;Intel H.261\n"
- "H262;Intel H.262;4CC;V;;;Intel H.262\n"
- "H263;Intel H.263;4CC;V;;;Intel H.263\n"
- "H264;AVC;4CC;V;AVC;;Intel H.264\n"
- "h264;AVC;4CC;V;AVC;;Intel H.264\n"
- "H265;Intel H.265;4CC;V;;;Intel H.265\n"
- "H266;Intel H.266;4CC;V;;;Intel H.266\n"
- "H267;Intel H.267;4CC;V;;;Intel H.267\n"
- "H268;Intel H.268;4CC;V;;;Intel H.268\n"
- "H269;Intel H.263;4CC;V;;;Intel H.263 for POTS-based videoconferencing\n"
- "HD10;BlueFish;4CC;V;;;BlueFish444 (lossless RGBA, YUV 10-bit)\n"
- "HDX4;Jomigo;4CC;V;;;Jomigo HDX4\n"
- "HFYU;Huffman;4CC;V;;;Huffman Lossless YUV and RGB formats (with Alpha-channel)\n"
- "HMCR;Rendition;4CC;V;;;Rendition Motion Compensation Format\n"
- "HMRR;Rendition;4CC;V;;;Rendition Motion Compensation Format\n"
- "i263;Intel H.263;4CC;V;;;Intel H.263\n"
- "I420;YUV;4CC;V;;\n"
- "IAN ;Indeo 4;4CC;V;;;Intel Indeo 4\n"
- "ICLB;CellB;4CC;V;;;InSoft CellB Videoconferencing\n"
- "IDM0;Wavelets 2;4CC;V;;;IDM Motion Wavelets 2.0\n"
- "IF09;H.261;4CC;V;;;Microsoft H.261\n"
- "IFO9;YUV9;4CC;V;YUV;;Intel\n"
- "IGOR;PowerDVD;4CC;V;;;Power DVD\n"
- "IJPG;Intergraph JPEG;4CC;V;JPEG;;Intergraph\n"
- "ILVC;Layered Video;4CC;V;;;Intel Layered Video\n"
- "ILVR;H.263+;4CC;V;;;Intel H.263+\n"
- "IMAC;MotionComp;4CC;V;;;Intel hardware motion compensation.\n"
- "IMC1;YUV;4CC;V;YUV;;As YV12, except the U and V planes each have the same stride as the Y plane\n"
- "IMC2;YUV;4CC;V;YUV;;Similar to IMC1, except that the U and V lines are interleaved at half stride boundaries\n"
- "IMC3;YUV;4CC;V;YUV;;As IMC1, except that U and V are swapped\n"
- "IMC4;YUV;4CC;V;YUV;;As IMC2, except that U and V are swapped\n"
- "IMG ;YUV;4CC;V;YUV;\n"
- "IMJG;Accom JPEG;4CC;V;;;Accom SphereOUS JPEG with Alpha-channel\n"
- "IPDV;I-O DV;4CC;V;;;I-O Data Device Giga AVI DV\n"
- "IPJ2;JPEG 2000;4CC;V;;;Image Power JPEG 2000\n"
- "IR21;Indeo 2.1;4CC;V;;;Intel Indeo 2.1\n"
- "IRAW;YUV;4CC;V;YUV;;Intel YUV Uncompressed;http://www.fourcc.org/indexyuv.htm\n"
- "ISME;ISME;4CC;V;;;Intel\n"
- "IUYV;YUV;4CC;V;YUV;;Lead 16bpp. Interlaced version of UYVY (line order 0, 2, 4,....,1, 3, 5....)\n"
- "IV30;Indeo 3;4CC;V;;;Intel Indeo Video 3\n"
- "IV31;Indeo 3;4CC;V;;;Intel Indeo Video 3.1\n"
- "IV32;Indeo 3;4CC;V;;;Intel Indeo Video 3.2\n"
- "IV33;Indeo 3;4CC;V;;;Intel Indeo Video 3.3\n"
- "IV34;Indeo 3;4CC;V;;;Intel Indeo Video 3.4\n"
- "IV35;Indeo 3;4CC;V;;;Intel Indeo Video 3.5\n"
- "IV36;Indeo 3;4CC;V;;;Intel Indeo Video 3.6\n"
- "IV37;Indeo 3;4CC;V;;;Intel Indeo Video 3.7\n"
- "IV38;Indeo 3;4CC;V;;;Intel Indeo Video 3.8\n"
- "IV39;Indeo 3;4CC;V;;;Intel Indeo Video 3.9\n"
- "IV40;Indeo 4;4CC;V;;;Intel Indeo Video 4.0\n"
- "IV41;Indeo 4;4CC;V;;;Intel Indeo Video 4.1\n"
- "IV42;Indeo 4;4CC;V;;;Intel Indeo Video 4.2\n"
- "IV43;Indeo 4;4CC;V;;;Intel Indeo Video 4.3\n"
- "IV44;Indeo 4;4CC;V;;;Intel Indeo Video 4.4\n"
- "IV45;Indeo 4;4CC;V;;;Intel Indeo Video 4.5\n"
- "IV46;Indeo 4;4CC;V;;;Intel Indeo Video 4.6\n"
- "IV47;Indeo 4;4CC;V;;;Intel Indeo Video 4.7\n"
- "IV48;Indeo 4;4CC;V;;;Intel Indeo Video 4.8\n"
- "IV49;Indeo 4;4CC;V;;;Intel Indeo Video 4.9\n"
- "IV50;Indeo 4;4CC;V;;;Intel Indeo Video 5.0 Wavelet;http://www.fourcc.org/indexyuv.htm\n"
- "IY41;YUV;4CC;V;YUV;;Lead 16bpp. Interlaced version of Y41P (line order 0, 2, 4,....,1, 3, 5....);http://www.fourcc.org/indexyuv.htm\n"
- "IYU1;YUV;4CC;V;YUV;;IEEE1394 12bpp. 12 bit format used in mode 2 of the IEEE 1394 Digital Camera 1.04 spec;http://www.fourcc.org/indexyuv.htm\n"
- "IYU2;YUV;4CC;V;YUV;;IEEE1394 24bpp. 24 bit format used in mode 2 of the IEEE 1394 Digital Camera 1.04 spec\n"
- "IYUV;YUV;4CC;V;YUV;;Intel Indeo iYUV 4:2:0\n"
- "JBYR;Kensington;4CC;V;;;Kensington Video;http://ffdshow-tryout.sourceforge.net/\n"
- "JFIF;JPEG;4CC;V;JPEG;;\n"
- "JPEG;JPEG;4CC;V;JPEG;;JPEG compressed;http://www.apple.com/quicktime/download/standalone.html\n"
- "jpeg;JPEG;4CC;V;JPEG;;JPEG compressed\n"
- "JPG;JPEG;4CC;V;JPEG;;JPEG compressed;http://mirror01.iptelecom.net.ua/~video/codecs/PICVideo.Lossless.JPEG.codec.v2.10.27.exe\n"
- "JPGL;Pegasus JPEG;4CC;V;;;DIVIO JPEG Light for WebCams (Pegasus Lossless JPEG)\n"
- "KMVC;Karl;4CC;V;;;Karl Morton's Video (presumably);http://www.apple.com/quicktime/download/standalone.html\n"
- "kpcd;Photo CD;4CC;V;;;Kodak Photo CD\n"
- "L261;H.261;4CC;V;;;Lead Technologies H.261\n"
- "L263;H.263+;4CC;V;;;Lead Technologies H.263\n"
- "LAGS;Lagarith;4CC;V;;;Lagarith LossLess\n"
- "LBYR;Creative WebCam;4CC;V;;;Creative WebCam\n"
- "LCMW;Lead CMW;4CC;V;;;Lead Technologies Motion CMW\n"
- "LCW2;Lead MCMW;4CC;V;;;LEADTools MCMW 9Motion Wavelet;http://mirror01.iptelecom.net.ua/~video/codecs/LEAD.MCMP-JPEG.v1.016.codec.exe\n"
- "LEAD;Lead Video;4CC;V;;;LEAD Video\n"
- "LGRY;Lead GrayScale;4CC;V;;;Lead Technologies Grayscale Image\n"
- "LIA1;Liafail;4CC;V;;;Liafail, Inc.\n"
- "LJ2K;Lead JPEG 2000;4CC;V;;;LEADTools JPEG 2000;http://mirror01.iptelecom.net.ua/~video/codecs/LEAD.MCMP-JPEG.v1.016.codec.exe\n"
- "LJPG;Lead JPEG;4CC;V;JPEG;;LEAD JPEG;http://mirror01.iptelecom.net.ua/~video/codecs/LEAD.MCMP-JPEG.v1.016.codec.exe\n"
- "Ljpg;Lead JPEG;4CC;V;JPEG;;LEAD JPEG\n"
- "LMP2;Lead MPEG-2;4CC;V;;;LEADTools MPEG-2\n"
- "LOCO;LOCO;4CC;V;;;LOCO Lossless\n"
- "LSCR;Lead Screen capture;4CC;V;;;LEAD Screen Capture\n"
- "LSV0;LSV0;4CC;V;;;Infinop Inc.\n"
- "LSVC;Vmail;4CC;V;;;Vianet Lighting Strike Vmail (Streaming)\n"
- "LSVM;Vmail;4CC;V;;;Vianet Lighting Strike Vmail (Streaming)\n"
- "LSVW;Infinop;4CC;V;;;Infinop Lightning Strike multiple bit rate video codec.\n"
- "LSVX;Vmail;4CC;V;;;Vianet Lightning Strike Video Codec\n"
- "LZO1;LZO;4CC;V;;;LZO compressed (lossless)\n"
- "M101;YUV;4CC;V;YUV;;Matrox\n"
- "M261;H.261;4CC;V;;;Microsoft H.261\n"
- "M263;H.263;4CC;V;;;Microsoft H.263\n"
- "M4CC;ESS Divo;4CC;V;MPEG-4V;;ESS MPEG-4 Divio\n"
- "M4S2;FFmpeg MPEG-4;4CC;V;;;Microsoft MPEG-4 (hacked MS MPEG-4)\n"
- "MC12;ATI Motion;4CC;V;;;ATI Motion Compensation Format\n"
- "MC24;MainConcept JPEG;4CC;V;JPEG;;MainConcept JPEG\n"
- "MCAM;ATI Motion;4CC;V;;;ATI Motion Compensation Format\n"
- "MCZM;RGB;4CC;V;RGB;;Theory MicroCosm Lossless 64bit RGB with Alpha-channel\n"
- "MDVD;MicroDVD;4CC;V;;;Alex MicroDVD Video (hacked MS MPEG-4)\n"
- "MDVF;Pinnacle DV;4CC;V;DV;;Pinnacle DV/DV50/DVHD100\n"
- "MHFY;YUB;4CC;V;YUV;;A.M.Paredes mhuffyYUV (LossLess);http://mirror01.iptelecom.net.ua/~video/codecs/Pinnacle.ReelTime.v2.5.software.only.codec.exe\n"
- "MJ2C;JPEG 2000;4CC;V;;;Morgan Multimedia JPEG 2000 Compression;http://mirror01.iptelecom.net.ua/~video/codecs/Pinnacle.ReelTime.v2.5.software.only.codec.exe\n"
- "MJPA;Pinacle JPEG A;4CC;V;;;Pinnacle ReelTime MJPG hardware;http://mediaxw.sourceforge.net\n"
- "MJPB;Pinacle JPEG B;4CC;V;JPEG;;JPEG\n"
- "MJPG;JPEG;4CC;V;JPEG;;JPEG including Huffman Tables\n"
- "mJPG;IBM JPEG (w Huffman);4CC;V;JPEG;;IBM JPEG including Huffman Tables\n"
- "MJPX;Pegasus JPEG;4CC;V;;;Pegasus PICVideo JPEG\n"
- "ML20;Webcam;4CC;V;;;Mimic MSN Messenger Webcam\n"
- "MMES;Matrox MPEG-2;4CC;V;MPEG-V;;Matrox MPEG-2 I-frame\n"
- "MMIF;Matrox MPEG-2;4CC;V;MPEG-V;;Matrox MPEG-2 I-frame\n"
- "MNVD;MindVid;4CC;V;;;MindBend MindVid LossLess\n"
- "MP2A;MPEG-2 Audio;4CC;A;MPEG-A;;Media Excel MPEG-2 Audio\n"
- "MP2T;MPEG-2 TS;4CC;M;MPEG-TS;;Media Excel MPEG-2 Transport Stream\n"
- "MP2V;MPEG-2 Video;4CC;V;MPEG-V;;Media Excel MPEG-2 Video;http://ffdshow-tryout.sourceforge.net/\n"
- "MP2v;MPEG-2 Video;4CC;V;MPEG-V;;MPEG-2 Video;http://ffdshow-tryout.sourceforge.net/\n"
- "MP41;S-Mpeg 4 v1;4CC;V;;;Microsoft MPEG-4 V1 (enhansed H263);http://ffdshow-tryout.sourceforge.net/\n"
- "MP42;S-Mpeg 4 v2;4CC;V;;;Microsoft MPEG-4 V2;http://www.apple.com/quicktime/download/standalone.html\n"
- "MP43;S-Mpeg 4 v3;4CC;V;;;Microsoft MPEG-4 V3\n"
- "mp4a;AAC;4CC;A;AAC;;AAC;http://ffdshow-tryout.sourceforge.net/\n"
- "MP4A;MPEG-4 Audio;4CC;A;AAC;;Media Excel MPEG-4 Audio;http://www.apple.com/quicktime/download/standalone.html\n"
- "MP4S;MS MPEG-4 v3;4CC;V;MPEG-4V;;Microsoft MPEG-4 (Windows Media 7.0)\n"
- "mp4s;MPEG-4 TS;4CC;M;MPEG-TS;;(MPEG-4) Apple MPEG-4 Transport Stream;http://ffdshow-tryout.sourceforge.net/\n"
- "MP4T;MPEG-4 TS;4CC;M;MPEG-TS;;Media Excel MPEG-4 Transport Stream;http://www.apple.com/quicktime/download/standalone.html\n"
- "MP4V;MPEG-4 Video;4CC;V;MPEG-4V;;Apple QuickTime MPEG-4 native;http://ffdshow-tryout.sourceforge.net/\n"
- "mp4v;MPEG-4 Video;4CC;V;MPEG-4V;;(MPEG-4) Apple MPEG-4 Video;http://www.apple.com/quicktime/download/standalone.html\n"
- "MPEG;MPEG;4CC;V;MPEG-V;;Chromatic MPEG 1 Video I Frame;http://ffdshow-tryout.sourceforge.net/\n"
- "mpeg;MPEG;4CC;V;MPEG-V;;MPEG-1 Video;http://ffdshow-tryout.sourceforge.net/\n"
- "MPG1;FFmpeg MPEG 1/2;4CC;V;MPEG-V;;(MPEG-1/2) FFmpeg;http://ffdshow-tryout.sourceforge.net/\n"
- "MPG2;FFmpeg MPEG 1/2;4CC;V;MPEG-V;;(MPEG-1/2) FFmpeg;http://ffdshow-tryout.sourceforge.net/\n"
- "MPG3;FFmpeg DivX 3;4CC;V;MPEG-4V;;(MPEG-4) MS MPEG-4 v3\n"
- "MPG4;MS MPEG-4 v1;4CC;V;MPEG-4V;;Microsoft MPEG-4 v1\n"
- "MPGI;Sigma MPEG;4CC;V;MPEG-V;;Sigma Design MPEG-1 I-frame\n"
- "MPNG;PNG;4CC;V;RGB;;Motion PNG\n"
- "MRCA;Mrcodec;4CC;V;;;FAST Multimedia\n"
- "MRLE;RLE;4CC;V;RGB;;Microsoft RLE\n"
- "MSS1;Windows Screen Video;4CC;V;;;Windows Screen Video\n"
- "MSS2;Windows Media;4CC;V;;;Windows Media 9\n"
- "MSUC;MSU;4CC;V;;;MSU LossLess\n"
- "MSUD;MSU;4CC;V;;;MSU LossLess\n"
- "MSV1;Microsoft Video 1;4CC;V;;;Microsoft Video 1\n"
- "MSVC;Microsoft Video 1;4CC;V;;;Microsoft Video 1\n"
- "MSZH;AVImszh;4CC;V;;;Lossless (ZIP compression)\n"
- "MTGA;TGA;4CC;V;RGB;;Motion TGA images (24, 32 bpp)\n"
- "MTX1;Matrox JPEG;4CC;V;JPEG;;Matrox JPEG\n"
- "MTX2;Matrox JPEG;4CC;V;JPEG;;Matrox JPEG\n"
- "MTX3;Matrox JPEG;4CC;V;JPEG;;Matrox JPEG\n"
- "MTX4;Matrox JPEG;4CC;V;JPEG;;Matrox JPEG\n"
- "MTX5;Matrox JPEG;4CC;V;JPEG;;Matrox JPEG\n"
- "MTX6;Matrox JPEG;4CC;V;JPEG;;Matrox JPEG\n"
- "MTX7;Matrox JPEG;4CC;V;JPEG;;Matrox JPEG\n"
- "MTX8;Matrox JPEG;4CC;V;JPEG;;Matrox JPEG\n"
- "MTX9;Matrox JPEG;4CC;V;JPEG;;Matrox JPEG\n"
- "MV10;Nokia;4CC;V;;;Nokia Mobile Phones\n"
- "MV11;Nokia;4CC;V;;;Nokia Mobile Phones\n"
- "MV12;MVI;4CC;V;;;Motion Pixels (old)\n"
- "MV99;Nokia;4CC;V;;;Nokia Mobile Phones\n"
- "MVC1;Nokia;4CC;V;;;Nokia Mobile Phones\n"
- "MVC2;Nokia;4CC;V;;;Nokia Mobile Phones\n"
- "MVC9;Nokia;4CC;V;;;Nokia Mobile Phones\n"
- "MVI1;MVI;4CC;V;;;Motion Pixels MVI\n"
- "MVI2;MVI;4CC;V;;;Motion Pixels MVI\n"
- "MWV1;Aware Motion Wavelets;4CC;V;;;Aware Motion Wavelets\n"
- "MYUV;RGB;4CC;V;RGB;;Media-100 844/X Uncompressed\n"
- "NAVI;MS MPEG-4;4CC;V;MPEG-4V;;nAVI video (hacked MS MPEG-4)\n"
- "NDIG;Ahead MPEG-4;4CC;V;MPEG-4V;;Ahead Nero Digital MPEG-4\n"
- "NHVU;Nvidia Texture;4CC;V;;;Nvidia Texture Format (GEForce 3)\n"
- "NO16;RGB;4CC;V;RGB;;Theory None16 64bit uncompressed Uncompressed\n"
- "NT00;LightWave;4CC;V;YUV;;NewTek LightWave HDTV YUV with Alpha-channel\n"
- "NTN1;NogaTech Video 1;4CC;V;;;Nogatech Video Compression 1\n"
- "NTN2;NogaTech Video 2;4CC;V;;;Nogatech Video Compression 2 (GrabBee hardware coder)\n"
- "NUV1;Nuppel;4CC;V;;;NuppelVideo\n"
- "NV12;YUV;4CC;V;YUV;;8-bit Y plane followed by an interleaved U/V plane with 2x2 subsampling\n"
- "NV21;YUV;4CC;V;YUV;;As NV12 with U and V reversed in the interleaved plane\n"
- "NVDS;Nvidia Texture;4CC;V;;;Nvidia Texture Format\n"
- "NVHS;Nvidia Texture;4CC;V;;;Nvidia Texture Format (GeForce 3)\n"
- "NVHU;Nvidia Texture;4CC;V;;;Nvidia Texture Format\n"
- "NVS0;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVS1;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVS2;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVS3;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVS4;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVS5;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVS6;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVS7;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVS8;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVS9;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVT0;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVT1;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVT2;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVT3;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVT4;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVT5;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVT6;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVT7;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVT8;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NVT9;Nvidia Texture;4CC;V;;;Nvidia Texture Compression Format\n"
- "NY12;YUV;4CC;V;YUV;;Nogatech Ltd.\n"
- "NYUV;YUV;4CC;V;YUV;;Nogatech Ltd.\n"
- "ONYX;VP7;4CC;V;;;On2 VP7;http://www.on2.com/vp7.php3\n"
- "PCLE;Studio400;4CC;V;;;Pinnacle Systems, Inc.\n"
- "PDVC;Panasonic DV;4CC;V;DV;;Panasonic DV\n"
- "PGVV;Radius Video Vision;4CC;V;;;Radius Video Vision Telecast (adaptive JPEG)\n"
- "PHMO;Photomotion;4CC;V;;;IBM Photomotion\n"
- "PIM1;Pegasus JPEG;4CC;V;JPEG;;Pinnacle DC1000 hardware (MPEG compression);http://mirror01.iptelecom.net.ua/~video/codecs/PICVideo.Lossless.JPEG.codec.v2.10.27.exe\n"
- "PIM2;Pegasus JPEG;4CC;V;JPEG;;Pegasus Imaging;http://mirror01.iptelecom.net.ua/~video/codecs/PICVideo.Lossless.JPEG.codec.v2.10.27.exe\n"
- "PIMJ;Pegasus JPEG;4CC;V;JPEG;;Pegasus Imaging PICvideo Lossless JPEG;http://mirror01.iptelecom.net.ua/~video/codecs/PICVideo.Lossless.JPEG.codec.v2.10.27.exe\n"
- "PIXL;Miro JPEG;4CC;V;JPEG;;MiroVideo XL (JPEG)\n"
- "PNG;PNG;4CC;V;RGB;;\n"
- "PNG1;PNG;4CC;V;RGB;;Corecodec.org CorePNG\n"
- "PVEZ;PowerEZ;4CC;V;;;Horizons Technology PowerEZ\n"
- "PVMM;Pegasus MPEG-4;4CC;V;MPEG-4V;;PacketVideo Corporation MPEG-4\n"
- "PVW2;Pegasus Wavelet;4CC;V;;;Pegasus Imaging Wavelet 2000\n"
- "PVWV;Pegasus Wavelet;4CC;V;;;Pegasus Imaging Wavelet 2000\n"
- "PXLT;Pixlet;4CC;V;;;Apple Pixlet (Wavelet)\n"
- "Q1.0;QPEG 1.0;4CC;V;;;Q-Team QPEG 1.0;http://www.q-team.de\n"
- "Q1.1;QPEG 1.1;4CC;V;;;Q-Team QPEG 1.1;http://www.q-team.de\n"
- "Qclp;QCLP;4CC;A;;;\n"
- "QDGX;Apple GX;4CC;V;;;Apple QuickDUncompressed GX\n"
- "QDM1;QDesign 1;4CC;A;;;QDesign Music 1\n"
- "QDM2;Qdesign 2;4CC;A;;;QDesign Music 2\n"
- "QDRW;Palettized Video;4CC;V;;;Apple\n"
- "QPEG;QPEG 1.1;4CC;V;;;Q-Team QPEG 1.1\n"
- "QPEQ;QPEG 1.1;4CC;V;;;Q-Team QPEG 1.1\n"
- "R210;YUV;4CC;V;YUV;;BlackMagic YUV (Quick Time)\n"
- "R411;Radius DV;4CC;V;DV;;Radius DV NTSC YUV\n"
- "R420;Radius DV;4CC;V;DV;;Radius DV PAL YUV\n"
- "RAV_;GroupTron;4CC;V;MPEG-1;;GroupTRON ReferenceAVI (dummy for MPEG compressor)\n"
- "RAVI;GroupTron;4CC;V;MPEG-1;;GroupTRON ReferenceAVI (dummy for MPEG compressor)\n"
- "RAW ;RGB;4CC;V;RGB;;Full Frames (Uncompressed)\n"
- "raw ;RGB;4CC;V;RGB;;Full Frames (Uncompressed);http://www.apple.com/quicktime/download/standalone.html\n"
- "RGB ;RGB;4CC;V;RGB;;Uncompressed RGB32\n"
- "RGB1;RGB;4CC;V;RGB;;Uncompressed RGB332 3:3:2\n"
- "RGBA;RGB;4CC;V;RGB;;Uncompressed w/ Alpha. Uncompressed RGB with alpha. Sample precision and packing is arbitrary and determined using bit masks for each component, as for BI_BITFIELDS.;http://www.fourcc.org/indexrgb.htm\n"
- "RGBO;RGB;4CC;V;RGB;;Uncompressed RGB555 5:5:5\n"
- "RGBP;RGB;4CC;V;RGB;;Uncompressed RGB565 5:6:5\n"
- "RGBQ;RGB;4CC;V;RGB;;Uncompressed RGB555X 5:5:5 BE\n"
- "RGBR;RGB;4CC;V;RGB;;Uncompressed RGB565X 5:6:5 BE\n"
- "RGBT;RGB;4CC;V;RGB;;Uncompressed RGB with transparency;http://www.fourcc.org/indexrgb.htm\n"
- "RIVA;Swizzled texture;4CC;V;;;Nvidia\n"
- "RL4;RLE;4CC;V;RGB;;RLE 4bpp RGB\n"
- "RL8;RLE;4CC;V;RGB;;RLE 8bpp RGB\n"
- "RLE ;RLE;4CC;V;RGB;;RLE RGB with arbitrary sample packing within a pixel;http://www.fourcc.org/indexrgb.htm\n"
- "rle ;Animation;4CC;V;RGB;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "RLE4;RLE;4CC;V;RGB;;RLE 4bpp RGB;http://www.fourcc.org/indexrgb.htm\n"
- "RLE8;RLE;4CC;V;RGB;;RLE 8bpp RGB;http://www.fourcc.org/indexrgb.htm\n"
- "RLND;Roland;4CC;V;;;Roland Corporation\n"
- "RMP4;RealMagic MPEG-4;4CC;V;MPEG-4V;;REALmagic MPEG-4 Video (Sigma Design, built on XviD)\n"
- "ROQV;Id RoQ;4CC;V;;;Id RoQ File Video Decoder\n"
- "rpza;Road Pizza;4CC;V;;;Apple Video 16 bit road pizza;http://www.apple.com/quicktime/download/standalone.html\n"
- "RT21;Intel Video 2.1;4CC;V;;;Intel Real Time Video 2.1\n"
- "RTV0;NewTek VideoToaster;4CC;V;;;NewTek VideoToaster (dummy format - only AVI header)\n"
- "RUD0;Rududu;4CC;V;;;Rududu video\n"
- "RV10;RealVideo 1;4CC;V;;;H263, RealVideo 5;http://www.real.com\n"
- "rv10;RealVideo 1;Real;V;;;H263, RealVideo 5;http://www.real.com\n"
- "RV13;RealVideo 1;4CC;V;;;H263, RealVideo 5;http://www.real.com\n"
- "rv20;RealVideo 2;Real;V;;;H263, RealVideo 6;http://www.real.com\n"
- "RV20;RealVideo 2;4CC;V;;;H263, RealVideo 6;http://www.real.com\n"
- "rv30;RealVideo 3;Real;V;;;Between H263 and H264, RealVideo 8;http://www.real.com\n"
- "RV30;RealVideo 3;4CC;V;;;Between H263 and H264, RealVideo 8;http://www.real.com\n"
- "rv40;RealVideo 4;Real;V;;;H264, RealVideo 9;http://www.real.com\n"
- "RV40;RealVideo 4;4CC;V;;;H264, RealVideo 9;http://www.real.com\n"
- "RVX ;RDX;4CC;V;;;Intel RDX\n"
- "S263;S263;4CC;V;;;;http://ffdshow-tryout.sourceforge.net/\n"
- "S422;VideoCap C210;4CC;V;YUV;;VideoCap C210\n"
- "s422;VideoCap C210;4CC;V;YUV;;VideoCap C210\n"
- "SAMR;AMR;4CC;A;;;\n"
- "SAN3;SAN3;4CC;V;MPEG-4V;;Direct copy of DivX 3.11\n"
- "SANM;Smush v2;4CC;V;;;LucasArts;http://www.lucasarts.com/\n"
- "SCCD;SoftCam;4CC;V;;;\n"
- "SDCC;Sun DV;4CC;V;DV;;Sun Digital Camera\n"
- "SEDG;Samsung MPEG-4;4CC;V;MPEG-4V;;Samsung MPEG-4\n"
- "SEG4;Cinepak;4CC;V;;;;http://www.sega.com/\n"
- "SEGA;Cinepak;4CC;V;;;;http://www.sega.com/\n"
- "SFMC;CrystalNet;4CC;V;;;CrystalNet Surface Fitting Method\n"
- "SHR0;BitJazz SheerVideo;4CC;V;;;BitJazz SheerVideo (realtime lossless)\n"
- "SHR1;BitJazz SheerVideo;4CC;V;;;BitJazz SheerVideo (realtime lossless)\n"
- "SHR2;BitJazz SheerVideo;4CC;V;;;BitJazz SheerVideo (realtime lossless)\n"
- "SHR3;BitJazz SheerVideo;4CC;V;;;BitJazz SheerVideo (realtime lossless)\n"
- "SHR4;BitJazz SheerVideo;4CC;V;;;BitJazz SheerVideo (realtime lossless)\n"
- "SHR5;BitJazz SheerVideo;4CC;V;;;BitJazz SheerVideo (realtime lossless)\n"
- "SHR6;BitJazz SheerVideo;4CC;V;;;BitJazz SheerVideo (realtime lossless)\n"
- "SHR7;BitJazz SheerVideo;4CC;V;;;BitJazz SheerVideo (realtime lossless)\n"
- "SJPG;CuSeeMe;4CC;V;JPEG;;CuSeeMe;http://mirror01.iptelecom.net.ua/~video/codecs/CUseeMe.JPEG.CODEC.v1.17.exe\n"
- "SL25;SoftLab DVCPro;4CC;V;;;SoftLab-NSK DVCPRO\n"
- "SL50;SoftLab DVCPro5;4CC;V;;;SoftLab-NSK \n"
- "SLDV;SoftLab DV;4CC;V;;;SoftLab-NSK Forward DV Draw\n"
- "SLIF;SoftLab MPEG-2;4CC;V;MPEG-V;;SoftLab-NSK MPEG-2 I-frames\n"
- "SLMJ;SoftLab JPEG;4CC;V;JPEG;;SoftLab-NSK Forward JPEG\n"
- "smc ;SMC;4CC;V;;;Apple Graphics (SMC);http://www.apple.com/quicktime/download/standalone.html\n"
- "SMSC;Radius;4CC;V;;;\n"
- "SMSD;Radius;4CC;V;;;\n"
- "SMSV;Wavelet Video;4CC;V;;;WorldConnect Wavelet Streaming Video\n"
- "smsv;Wavelet Video;4CC;V;;;WorldConnect Wavelet Video\n"
- "SNOW;Snow;4CC;V;;;;http://ffdshow-tryout.sourceforge.net/\n"
- "SP40;SunPlus YUV;4CC;V;YUV;;SunPlus YUV\n"
- "SP44;MegaCam;4CC;V;;;SunPlus Aiptek MegaCam\n"
- "SP53;MegaCam;4CC;V;;;SunPlus Aiptek MegaCam\n"
- "SP54;MegaCam;4CC;V;;;SunPlus Aiptek MegaCam\n"
- "SP55;MegaCam;4CC;V;;;SunPlus Aiptek MegaCam\n"
- "SP56;MegaCam;4CC;V;;;SunPlus Aiptek MegaCam\n"
- "SP57;MegaCam;4CC;V;;;SunPlus Aiptek MegaCam\n"
- "SP58;MegaCam;4CC;V;;;SunPlus Aiptek MegaCam\n"
- "SP61;MegaCam;4CC;V;;;SunPlus Aiptek MegaCam\n"
- "SPIG;Spigot;4CC;V;;;Radius Spigot\n"
- "SPLC;ACM audio;4CC;V;;;Splash Studios ACM Audio\n"
- "SPRK;Spark;4CC;V;;\n"
- "SQZ2;VXTreme 2;4CC;V;;;Microsoft VXTreme Video V2\n"
- "STVA;ST Imager;4CC;V;;;ST Microelectronics CMOS Imager Data (Bayer)\n"
- "STVB;ST Imager;4CC;V;;;ST Microelectronics CMOS Imager Data (Nudged Bayer)\n"
- "STVC;ST Imager;4CC;V;;;ST Microelectronics CMOS Imager Data (Bunched)\n"
- "STVX;ST Imager;4CC;V;;;ST Microelectronics CMOS Imager Data (Extended Data Format)\n"
- "STVY;ST Imager;4CC;V;;;ST Microelectronics CMOS Imager Data (Extended Data Format with Correction Data)\n"
- "subp;VobSub;4CC;T;;;The same subtitle format used on DVDs\n"
- "SV10;Sorenson;4CC;V;;;Sorenson Media Video R1\n"
- "SVQ1;Sorenson 1;4CC;V;;;Sorenson Media Video 1 (Apple QuickTime 3)\n"
- "SVQ2;Sorenson 2;4CC;V;;;Sorenson Media Video 2 (Apple QuickTime 4)\n"
- "SVQ3;Sorenson 3;4CC;V;;;Sorenson Media Video 3 (Apple QuickTime 5)\n"
- "SWC1;MainConcept JPEG;4CC;V;JPEG;;MainConcept JPEG\n"
- "T420;Toshiba YUV;4CC;V;YUV;;Toshiba YUV 4:2:0\n"
- "TGA ;Apple TGA;4CC;V;;;Apple TGA (with Alpha-channel)\n"
- "THEO;Theora;4CC;V;;;FFVFW Supported\n"
- "TIFF;Apple TIFF;4CC;V;;;Apple TIFF (with Alpha-channel)\n"
- "TIM2;Pinnacle DVI;4CC;V;;;Pinnacle RAL DVI\n"
- "TLMS;TeraLogic;4CC;V;;;TeraLogic Motion Intraframe\n"
- "TLST;TeraLogic;4CC;V;;;TeraLogic Motion Intraframe\n"
- "TM10;Duck;4CC;V;;;Duck TrueMotion\n"
- "TM20;Duck 2;4CC;V;;;Duck TrueMotion 2.0\n"
- "TM2A;Duck Archiver 2;4CC;V;;;Duck TrueMotion Archiver 2.0\n"
- "TM2X;Duck 2;4CC;V;;;Duck TrueMotion 2X\n"
- "TMIC;TeraLogic;4CC;V;;;TeraLogic Motion Intraframe\n"
- "TMOT;Horizons TM S;4CC;V;;;Horizons Technology TrueMotion Video\n"
- "TR20;Duck TM RT2;4CC;V;;;Duck TrueMotion RT 2.0\n"
- "TRLE;Akula;4CC;V;;;Akula Alpha Pro Custom AVI (LossLess)\n"
- "TSCC;TechSmith;4CC;V;;;TechSmith Screen Capture\n"
- "TV10;Tecomac;4CC;V;;;Tecomac Low-Bit Rate\n"
- "TVJP;Pinnacle/Truevision;4CC;V;;;TrueVision Field Encoded JPEG (Targa emulation)\n"
- "TVMJ;Pinnacle/Truevision;4CC;V;;;Truevision TARGA JPEG Hardware (or Targa emulation)\n"
- "TY0N;Trident;4CC;V;;;Trident Decompression Driver\n"
- "TY2C;Trident;4CC;V;;;Trident Decompression Driver\n"
- "TY2N;Trident;4CC;V;;;Trident Decompression Driver\n"
- "U<Y ;Discreet YUV;4CC;V;YUV;;Discreet UC YUV 4:2:2:4 10 bit\n"
- "U<YA;Discreet YUV;4CC;V;;;Discreet UC YUV 4:2:2:4 10 bit (with Alpha-channel)\n"
- "U263;UB H.263;4CC;V;;;UB Video H.263/H.263+/H.263++ Decoder;http://eMajix.com\n"
- "UCOD;ClearVideo;4CC;V;;;ClearVideo (fractal compression-based)\n"
- "ULH0;YUV;Ut Video;Ut Video Lossless Codec;http://umezawa.dyndns.info/archive/utvideo;;;YUV;4:2:0\n"
- "ULH2;YUV;Ut Video;Ut Video Lossless Codec;http://umezawa.dyndns.info/archive/utvideo;;;YUV;4:2:2\n"
- "ULRA;RGBA;Ut Video;Ut Video Lossless Codec;http://umezawa.dyndns.info/archive/utvideo;;;RGBA;4:4:4:4\n"
- "ULRG;RGB;Ut Video;Ut Video Lossless Codec;http://umezawa.dyndns.info/archive/utvideo;;;RGB;4:4:4\n"
- "ULTI;Ultimotion;4CC;V;;;IBM Ultimotion\n"
- "ULY0;YUV;Ut Video;Ut Video Lossless Codec;http://umezawa.dyndns.info/archive/utvideo;;;YUV;4:2:2\n"
- "ULY2;YUV;Ut Video;Ut Video Lossless Codec;http://umezawa.dyndns.info/archive/utvideo;;;YUV;4:2:0\n"
- "UMP4;UB MPEG-4;4CC;V;MPEG-4V;;UB Video MPEG 4;http://www.fourcc.org/indexyuv.htm\n"
- "UYNV;YUV;4CC;V;YUV;;Nvidia 16bpp. A direct copy of UYVY registered by Nvidia to work around problems in some olds which did not like hardware which offered more than 2 UYVY surfaces.;http://www.fourcc.org/indexyuv.htm\n"
- "UYVP;YUV;4CC;V;YUV;;Evans & Sutherland 24bpp. YCbCr 4:2:2 extended precision 10-bits per component in U0Y0V0Y1 order\n"
- "UYVU;SoftLab YUV;4CC;V;YUV;;SoftLab-NSK Forward YUV;http://www.fourcc.org/indexyuv.htm\n"
- "UYVY;YUV;4CC;V;YUV;;Uncompressed 16bpp. YUV 4:2:2 (Y sample at every pixel, U and V sampled at every second pixel horizontally on each line). A macropixel contains 2 pixels in 1 u_int32.\n"
- "V210;Optibase;4CC;V;;;Optibase VideoPump 10-bit 4:2:2 Component YCbCr\n"
- "V261;VX3000S;4CC;V;;;Lucent VX3000S\n"
- "V422;Vitec YUV;4CC;V;YUV;;Vitec Multimedia YUV 4:2:2 as for UYVY, but with different component ordering within the u_int32 macropixel\n"
- "V655;Vitec YUV;4CC;V;YUV;;Vitec Multimedia 16 bit YUV 4:2:2 (6:5:5) format\n"
- "VBLE;MarcFD VBLE;4CC;V;;;MarcFD VBLE Lossless\n"
- "VCR1;ATI Video 1;4CC;V;;;ATI VCR 1.0\n"
- "VCR2;ATI Video 2;4CC;V;;;ATI VCR 2.0 (MPEG YV12)\n"
- "VCR3;ATI Video 3;4CC;V;;;ATI VCR 3.0\n"
- "VCR4;ATI Video 4;4CC;V;;;ATI VCR 4.0\n"
- "VCR5;ATI Video 5;4CC;V;;;ATI VCR 5.0\n"
- "VCR6;ATI Video 6;4CC;V;;;ATI VCR 6.0\n"
- "VCR7;ATI Video 7;4CC;V;;;ATI VCR 7.0\n"
- "VCR8;ATI Video 8;4CC;V;;;ATI VCR 8.0\n"
- "VCR9;ATI Video 9;4CC;V;;;ATI VCR 9.0\n"
- "VCWV;Wavelet;4CC;V;;;VideoCon\n"
- "VDCT;VideoMaker RGB;4CC;V;RGB;;Video Maker Pro DIB\n"
- "VDOM;VDOWave;4CC;V;;;VDONet Wave\n"
- "VDOW;VDOLive;4CC;V;;;VDONet Live (H,263)\n"
- "VDST;VirtualDub;4CC;V;;;VirtualDub remote frameclient ICM driver\n"
- "VDTZ;YUV;4CC;V;YUV;;VideoTizer / Darim Vision YUV\n"
- "VGPX;VGP;4CC;V;;;Alaris VideoGramPixel\n"
- "VIDM;DivX 5 pro;4CC;V;MPEG-4V;;DivX 5.0 Pro Supported\n"
- "VIDS;Vitec;4CC;V;;;Vitec Multimedia YUV 4:2:2;www.yks.ne.jp/~hori/\n"
- "VIFP;VFAPI;4CC;V;;;Virtual Frame API (VFAPI dummy format)\n"
- "VIV1;H.263;4CC;V;;;Vivo H.263\n"
- "VIV2;H.263;4CC;V;;;Vivo H.263\n"
- "VIVO;H.263;4CC;V;;;Vivo H.263\n"
- "VIXL;Miro XL;4CC;V;JPEG;;Miro Video XL;http://mirror01.iptelecom.net.ua/~video/codecs/miroVIDEO-XL.codec.v2.2.exe\n"
- "VJPG;JPEG;4CC;V;JPEG;;\n"
- "VLV1;Videologic;4CC;V;;;\n"
- "VMNC;Vmware;4CC;V;;;;http://www.vmware.com/\n"
- "VP30;VP3;4CC;V;;;On2 VP3\n"
- "VP31;VP3;4CC;V;;;On2 VP3\n"
- "VP32;VP3;4CC;V;;;On2 VP3\n"
- "VP40;VP4;4CC;V;;;On2 TrueCast VP4\n"
- "VP50;VP5;4CC;V;;;On2 TrueCast VP5\n"
- "VP60;VP6;4CC;V;;;On2 TrueCast VP6\n"
- "VP61;VP6;4CC;V;;;On2 TrueCast VP6.1\n"
- "VP62;VP6;4CC;V;;;On2 TrueCast VP6.2;http://ftp.pub.cri74.org/pub/win9x/video/codecs/VP6/vp6_vfw_codec.exe\n"
- "VP6A;VP6;4CC;V;;;On2 TrueCast VP6.2;http://ftp.pub.cri74.org/pub/win9x/video/codecs/VP6/vp6_vfw_codec.exe\n"
- "VP6F;VP6;4CC;V;;;On2 TrueCast VP6.2;http://ftp.pub.cri74.org/pub/win9x/video/codecs/VP6/vp6_vfw_codec.exe\n"
- "VP70;VP7;4CC;V;;;On2 TrueMotion VP7\n"
- "VP71;VP7;4CC;V;;;On2 TrueMotion VP7\n"
- "VP72;VP7;4CC;V;;;On2 TrueMotion VP7\n"
- "VQC1;Vector 1;4CC;V;;;Vector-quantised 1 (high compression) http://eprints.ecs.soton.ac.uk/archive/00001310/01/VTC97-js.pdf\n"
- "VQC2;Vector 2;4CC;V;;;Vector-quantised 2 (high robustness against channel errors) http://eprints.ecs.soton.ac.uk/archive/00001310/01/VTC97-js.pdf\n"
- "VQJP;VQ630;4CC;V;;;Dual-mode digital camera\n"
- "VQS4;VQ110;4CC;V;;;DV camera\n"
- "VR21;BlckMagic YUV;4CC;V;YUV;;BlackMagic YUV (Quick Time)\n"
- "VSSH;AVC;4CC;V;AVC;;Vanguard VSS H.264\n"
- "VSSV;Vanguard Video;4CC;V;;;Vanguard Software Solutions Video\n"
- "VSSW;AVC;4CC;V;AVC;;Vanguard VSS H.264\n"
- "VTLP;GGP;4CC;V;;;Alaris VideoGramPixel\n"
- "VX1K;DVX 1 S;4CC;V;;;Lucent VX1000S Video\n"
- "VX2K;DVX 2 S;4CC;V;;;Lucent VX2000S Video\n"
- "VXSP;DVX 1 SP;4CC;V;;;Lucent VX1000SP Video\n"
- "VYU9;YUV;4CC;V;YUV;;ATI YUV\n"
- "VYUY;YUV;4CC;V;YUV;;ATI Packed YUV Data\n"
- "WBVC;W9960;4CC;V;;;Winbond Electronics W9960\n"
- "WHAM;Microsoft Video 1;4CC;V;;;\n"
- "WINX;Winnov;4CC;V;;;\n"
- "WJPG;Winbond JPEG;4CC;V;JPEG;;Winbond JPEG (AverMedia USB devices)\n"
- "WMV1;WMV1;4CC;V;;;Windows Media Video 7;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx\n"
- "WMV2;WMV2;4CC;V;;;Windows Media Video 8;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx\n"
- "WMV3;WMV3;4CC;V;VC-1;;Windows Media Video 9;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx\n"
- "WMVA;WMV;4CC;V;VC-1;;Windows Media Video;http://ffdshow-tryout.sourceforge.net/\n"
- "WMVP;WMV3;4CC;V;;;Windows Media Video V9\n"
- "WNIX;WniWni;4CC;V;;;WniWni\n"
- "WNV1;WinNov;4CC;V;;;WinNov Videum Hardware Compression;http://www.winnov.com/\n"
- "WNVA;WinNov;4CC;V;;;WinNov Videum Hardware Compression;http://www.winnov.com/\n"
- "WRLE;Apple BMP;4CC;V;RGB;;Apple QuickTime BMP\n"
- "WRPR;AVideoTools;4CC;V;;;VideoTools VideoServer Client (wrapper for AviSynth)\n"
- "WV1F;WV1F;4CC;V;;;;http://ffdshow-tryout.sourceforge.net/\n"
- "WVC1;VC-1;4CC;V;VC-1;;Microsoft\n"
- "WVLT;IllusionHope Wavelet 9/7;4CC;V;;;IllusionHope Wavelet 9/7\n"
- "WVP2;WVP2;4CC;V;;;;http://ffdshow-tryout.sourceforge.net/\n"
- "WZCD;iScan;4CC;V;;;CORE Co. Ltd.\n"
- "WZDC;iSnap;4CC;V;;;CORE Co. Ltd.\n"
- "X263;H.263;4CC;V;;;Xirlink H.263\n"
- "x263;Xirlink;4CC;V;;;\n"
- "X264;AVC;4CC;V;AVC;;XiWave GNU GPL x264 MPEG-4\n"
- "x264;AVC;4CC;V;AVC;;XiWave GNU GPL x264 MPEG-4\n"
- "XJPG;Xirlink;4CC;V;JPEG;;Xirlink, Inc.\n"
- "XLV0;NetXL Video;4CC;V;;;NetXL Inc. XL Video Decoder\n"
- "XMPG;Xing MPEG;4CC;V;MPEG-V;;XING MPEG (I frame only)\n"
- "XVID;XviD;4CC;V;MPEG-4V;;XviD project;http://www.xvid.org/Downloads.15.0.html\n"
- "XVIX;XviD;4CC;V;MPEG-4V;;Based on XviD MPEG-4;http://www.xvid.org/Downloads.15.0.html\n"
- "XWV0;XiWave Video;4CC;V;;;XiWave Video\n"
- "XWV1;XiWave Video;4CC;V;;;XiWave Video\n"
- "XWV2;XiWave Video;4CC;V;;;XiWave Video\n"
- "XWV3;XiWave Video;4CC;V;;;XiWave Video (Xi-3 Video)\n"
- "XWV4;XiWave Video;4CC;V;;;XiWave Video\n"
- "XWV5;XiWave Video;4CC;V;;;XiWave Video\n"
- "XWV6;XiWave Video;4CC;V;;;XiWave Video\n"
- "XWV7;XiWave Video;4CC;V;;;XiWave Video\n"
- "XWV8;XiWave Video;4CC;V;;;XiWave Video\n"
- "XWV9;XiWave Video;4CC;V;;;XiWave Video\n"
- "XXAN;Origin VideoGame;4CC;V;;;Origin Video (used in Wing Commander 3 and 4)\n"
- "XYZP;PAL;4CC;V;;;Extended PAL format XYZ palette\n"
- "Y211;YUV;4CC;V;YUV;;Packed YUV format with Y sampled at every second pixel across each line and U and V sampled at every fourth pixel\n"
- "Y216;Targa YUV;4CC;V;YUV;;Pinnacle TARGA CineWave YUV (Quick Time)\n"
- "Y411;YUV;4CC;V;YUV;;YUV 4:1:1 Packed\n"
- "Y41B;YUV;4CC;V;YUV;;YUV 4:1:1 Planar\n"
- "Y41P;YUV;4CC;V;YUV;;Conexant (ex Brooktree) YUV 4:1:1 Raw;http://www.fourcc.org/indexyuv.htm\n"
- "Y41T;YUV;4CC;V;YUV;;Format as for Y41P, but the lsb of each Y component is used to signal pixel transparency\n"
- "Y422;YUV;4CC;V;YUV;;Direct copy of UYVY as used by ADS Technologies Pyro WebCam firewire camera\n"
- "Y42B;YUV;4CC;V;YUV;;YUV 4:2:2 Planar\n"
- "Y42T;YUV;4CC;V;YUV;;Format as for UYVY, but the lsb of each Y component is used to signal pixel transparency\n"
- "Y444;YUV;4CC;V;YUV;;IYU2 (iRez Stealth Fire camera)\n"
- "Y8 ;GrayScale;4CC;V;;;Simple grayscale video\n"
- "Y800;GrayScale;4CC;V;;;Simple grayscale video\n"
- "YC12;YUV;4CC;V;YUV;;Intel YUV12;http://www.fourcc.org/indexyuv.htm\n"
- "YCCK;YUV;4CC;V;YUV;;\n"
- "YMPG;MPEG-2;4CC;V;MPEG-2;;YMPEG Alpha (dummy for MPEG-2 compressor)\n"
- "YU12;YUV;4CC;V;YUV;;ATI YV12 4:2:0 Planar\n"
- "YU92;YUV;4CC;V;YUV;;Intel - YUV\n"
- "YUNV;YUV;4CC;V;YUV;;A direct copy of YUY2 registered by Nvidia to work around problems in some olds which did not like hardware that offered more than 2 YUY2 surfaces\n"
- "YUV2;YUV;4CC;V;YUV;;Apple Component Video (YUV 4:2:2);http://www.apple.com/quicktime/download/standalone.html\n"
- "YUV8;YUV;4CC;V;YUV;;Winnov Caviar YUV8 ;http://www.fourcc.org/indexyuv.htm\n"
- "YUV9;YUV;4CC;V;YUV;;Intel YUV9\n"
- "YUVP;YUV;4CC;V;YUV;;YCbCr 4:2:2 extended precision 10-bits per component in Y0U0Y1V0 order\n"
- "YUY2;YUV;4CC;V;YUV;;YUV 4:2:2 as for UYVY but with different component ordering within the u_int32 macropixel;http://www.fourcc.org/indexyuv.htm\n"
- "YUYP;YUV;4CC;V;YUV;;Evans & Sutherland\n"
- "YUYV;YUV;4CC;V;YUV;;Canopus YUV format;http://www.fourcc.org/indexyuv.htm\n"
- "YV12;YUV;4CC;V;YUV;;ATI YVU12 4:2:0 Planar;http://www.fourcc.org/indexyuv.htm\n"
- "YV16;YUV;4CC;V;YUV;;Elecard YUV 4:2:2 Planar\n"
- "YV92;YUV;4CC;V;YUV;;Intel Smart Video Recorder YVU9\n"
- "YVU9;YUV;4CC;V;YUV;;Brooktree YVU9 Raw (YVU9 Planar);http://www.fourcc.org/indexyuv.htm\n"
- "YVYU;YUV;4CC;V;YUV;;YUV 4:2:2 as for UYVY but with different component ordering within the u_int32 macropixel\n"
- "ZLIB;AVIzlib;4CC;V;RGB;;Lossless (ZIP compression)\n"
- "ZMBV;Zip;4CC;V;;;Zip Motion Blocks Video\n"
- "ZPEG;Video Zipper;4CC;V;RGB;;Metheus Video Zipper\n"
- "ZYGO;ZyGo;4CC;V;;;ZyGo Video\n"
- "V_UNCOMPRESSED;Raw;Mk;V;;;Raw uncompressed video frames\n"
- "V_DIRAC;Dirac;Mk;V;;;;http://diracvideo.org/\n"
- "V_MPEG4/ISO/SP;MPEG-4 Visual SP;Mk;V;MPEG-4V;;Simple Profile;http://www.divx.com\n"
- "V_MPEG4/ISO/ASP;MPEG-4 Visual ASP;Mk;V;MPEG-4V;;Advanced Simple Profile;http://www.xvid.org/Downloads.15.0.html\n"
- "V_MPEG4/ISO/AP;MPEG-4 Visual AP;Mk;V;MPEG-4V;;Advanced Profile;http://ffdshow-tryout.sourceforge.net/\n"
- "V_MPEG4/ISO/AVC;AVC;Mk;V;AVC;;Advanced Video Codec;http://ffdshow-tryout.sourceforge.net/\n"
- "V_MPEG4/MS/V2;MS MPEG-4 v2;Mk;V;MPEG-4V;;MS MPEG-4 v2;http://ffdshow-tryout.sourceforge.net/\n"
- "V_MPEG4/MS/V3;MS MPEG-4 v3;Mk;V;MPEG-4V;;MS MPEG-4 v3;http://ffdshow-tryout.sourceforge.net/\n"
- "V_MPEG1;MPEG-1 Video;Mk;V;MPEG-V;;MPEG 1 or 2 Video;http://ffdshow-tryout.sourceforge.net/\n"
- "V_MPEG2;MPEG-2 Video;Mk;V;MPEG-V;;MPEG 1 or 2 Video;http://ffdshow-tryout.sourceforge.net/\n"
- "V_REAL/RV10;Real 1;Mk;V;;;RealVideo 1.0 aka RealVideo 5;http://www.real.com\n"
- "V_REAL/RV20;Real 2;Mk;V;;;RealVideo 2.0 aka G2 and RealVideo G2+SVT;http://www.real.com\n"
- "V_REAL/RV30;Real 3;Mk;V;;;RealVideo 3.0 aka RealVideo 8;http://www.real.com\n"
- "V_REAL/RV40;Real 4;Mk;V;;;RealVideo 4.0 aka RealVideo 9;http://www.real.com\n"
- "V_THEORA;Theora;Mk;V;;;;http://www.theora.org\n"
- "A_MPEG/L1;MPEG1/2 L1;Mk;A;MPEG-A;;MPEG1 or 2 Audio layer 1;http://www.iis.fraunhofer.de/amm/index.html\n"
- "A_MPEG/L2;MPEG1/2 L2;Mk;A;MPEG-A;;MPEG1 or 2 Audio layer 2;http://www.iis.fraunhofer.de/amm/index.html\n"
- "A_MPEG/L3;MPEG1/2 L3;Mk;A;MPEG-A;;MPEG1 or 2 Audio Layer 3;http://www.iis.fraunhofer.de/amm/index.html\n"
- "A_PCM/INT/BIG;PCM;Mk;A;PCM;;Linear PCM (Big Endian)\n"
- "A_PCM/INT/LIT;PCM;Mk;A;PCM;;Linear PCM (Little Endian)\n"
- "A_PCM/FLOAT/IEEE;PCM;Mk;A;PCM;;Microsoft Linear PCM, Float;http://www.microsoft.com/windows/\n"
- "A_AC3;AC3;Mk;A;AC3;;Dolby AC3\n"
- "A_AC3/BSID9;AC3;Mk;A;AC3;;Dolby AC3\n"
- "A_AC3/BSID10;AC3;Mk;A;AC3;;Dolby AC3\n"
- "A_DTS;DTS;Mk;A;DTS;;\n"
- "A_EAC3;EAC3;Mk;A;EAC3;;Dolby Enhanced AC3\n"
- "A_FLAC;Flac;Mk;A;Flac;;;http://flac.sourceforge.net\n"
- "A_OPUS;Opus;;;http://opus-codec.org\n"
- "A_TTA1;TTA;Mk;A;TTA;;The True Audio Lossless Codec;http://true-audio.com\n"
- "A_VORBIS;Vorbis;Mk;A;Vorbis;VBR;;http://www.vorbis.com\n"
- "A_WAVPACK4;WavPack;Mk;A;Real;VBR;;http://www.wavpack.com\n"
- "A_REAL/14_4;RealAudio 1;Mk;A;Real;;Real Audio 1 (14.4);http://www.real.com\n"
- "A_REAL/28_8;RealAudio 2;Mk;A;Real;;Real Audio 2 (28.8);http://www.real.com\n"
- "A_REAL/COOK;RealAudio 7;Mk;A;Real;;Real Audio Cook Codec (codename: Gecko);http://www.real.com\n"
- "A_REAL/SIPR;RealAudio 4;Mk;A;Real;;Real & Sipro Voice Codec;http://www.real.com\n"
- "A_REAL/RALF;RealAudio Lossless;Mk;A;Real;;Real Audio Lossless Format;http://www.real.com\n"
- "A_REAL/ATRC;RealAudio Atrac3;Mk;A;Real;;Real & Sony Atrac3 Codec;http://www.real.com\n"
- "A_AAC;AAC;Mk;A;AAC;;\n"
- "A_AAC/MPEG2/MAIN;AAC Main;Mk;A;AAC;;AAC Main\n"
- "A_AAC/MPEG2/LC;AAC LC;Mk;A;AAC;;AAC Low Complexity\n"
- "A_AAC/MPEG2/LC/SBR;AAC LC-SBR;Mk;A;AAC;;AAC Low Complexity with Spectral Band Replication\n"
- "A_AAC/MPEG2/SSR;AAC SSR;Mk;A;AAC;;AAC Scalable Sampling Rate\n"
- "A_AAC/MPEG4/MAIN;AAC Main;Mk;A;AAC;;AAC Low Complexity\n"
- "A_AAC/MPEG4/MAIN/SBR;AAC Main;Mk;A;AAC;;AAC Low Complexity with Spectral Band Replication\n"
- "A_AAC/MPEG4/MAIN/SBR/PS;AAC Main;Mk;A;AAC;;AAC Low Complexity with Spectral Band Replication and Parametric Stereo\n"
- "A_AAC/MPEG4/MAIN/PS;AAC Main;Mk;A;AAC;;AAC Low Complexity with Parametric Stereo\n"
- "A_AAC/MPEG4/LC;AAC LC;Mk;A;AAC;;AAC Low Complexity\n"
- "A_AAC/MPEG4/LC/SBR;AAC LC-SBR;Mk;A;AAC;;AAC Low Complexity with Spectral Band Replication\n"
- "A_AAC/MPEG4/LC/SBR/PS;AAC LC-SBR-PS;Mk;A;AAC;;AAC Low Complexity with Spectral Band Replication and Parametric Stereo\n"
- "A_AAC/MPEG4/LC/PS;AAC LC-PS;Mk;A;AAC;;AAC Low Complexity with Parametric Stereo\n"
- "A_AAC/MPEG4/SSR;AAC SSR;Mk;A;AAC;;AAC Scalable Sampling Rate\n"
- "A_AAC/MPEG4/LTP;AAC LTP;Mk;A;AAC;;AAC Long Term Prediction\n"
- "14_4;VSELP;Real;A;;;EIA/TIA IS-54 VSELP, Real Audio 1 (for streaming 14.4 Kbps);http://www.real.com\n"
- "14.4;VSELP;Real;A;;;EIA/TIA IS-54 VSELP, Real Audio 1 (for streaming 14.4 Kbps);http://www.real.com\n"
- "lpcJ;VSELP;Real;A;;;EIA/TIA IS-54 VSELP, Real Audio 1 (for streaming 14.4 Kbps);http://www.real.com\n"
- "28_8;G.728;Real;A;;;ITU-T G.728, Real Audio 2 (for streaming 28.8 Kbps);http://www.real.com\n"
- "28.8;G.728;Real;A;;;ITU-T G.728, Real Audio 2 (for streaming 28.8 Kbps);http://www.real.com\n"
- "cook;Cooker;Real;A;;;Real Audio G2/7 Cook (low bitrate);http://www.real.com\n"
- "dnet;AC3;Real;A;AC3;;A52/AC3, Real Audio 2;http://www.real.com\n"
- "sipr;G.729;Real;A;;;G.729, Real Audio 2;http://www.real.com\n"
- "rtrc;RealAudio 8;Real;A;;;Real Audio 8 (RTRC);http://www.real.com\n"
- "ralf;Lossless;Real;A;;;Real Audio Lossless Format;http://www.real.com\n"
- "whrl;Multi-Channel;Real;A;;;Real Audio Multi-Channel;http://www.real.com\n"
- "atrc;Atrac;Real;A;;;Real & Sony Atrac3;http://www.real.com\n"
- "raac;AAC-LC;Real;A;AAC;;Real Audio 10 AAC LC;http://www.real.com\n"
- "racp;AAC-HE;Real;A;AAC;;Real Audio 10 AAC-HE;http://www.real.com\n"
- "OPUS;Opus;Ogg;A;OPUS;;;http://opus-codec.org\n"
- "Vorbis;Vorbis;Ogg;A;Vorbis;;;http://www.vorbis.com\n"
- "Theora;Theora;Ogg;V;Theora;;;http://www.theora.com\n"
- "mp4a;AAC;4CC;A;AAC;;AAC (3GPP);http://www.apple.com/quicktime/download/standalone.html\n"
- "mp4v;MPEG-4;4CC;V;MPEG-4V;;MPEG-4 Video (3GPP);http://www.apple.com/quicktime/download/standalone.html\n"
- "avc1;AVC;4CC;V;AVC;;Advanced Video Codec;http://www.apple.com/quicktime/download/standalone.html\n"
- "h263;H.263;4CC;V;;;H.263 (3GPP);http://www.apple.com/quicktime/download/standalone.html\n"
- "s263;H.263;4CC;V;;;H.263 (3GPP);http://www.apple.com/quicktime/download/standalone.html\n"
- "samr;AMR-NB;4CC;A;;;AMR narrow band (3GPP);http://www.apple.com/quicktime/download/standalone.html\n"
- "sawb;AMR-WB;4CC;A;;;AMR wide band (3GPP);http://www.apple.com/quicktime/download/standalone.html\n"
- "sevc;EVRC;4CC;A;;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "tx3g;Timed;4CC;T;;;Timed text (3GPP);http://www.apple.com/quicktime/download/standalone.html\n"
- "encv;Encrypted;4CC;V;;;Encrypted Video (3GPP);http://www.apple.com/quicktime/download/standalone.html\n"
- "enca;Encrypted;4CC;A;;;Encrypted Audio (3GPP);http://www.apple.com/quicktime/download/standalone.html\n"
- "enct;Encrypted;4CC;T;;;Encrypted Text (3GPP);http://www.apple.com/quicktime/download/standalone.html\n"
- "ima4;ADPCM;4CC;A;ADPCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "raw ;PCM;4CC;A;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "twos;PCM;4CC;A;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "sowt;PCM;4CC;A;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "alac;Lossless;4CC;A;;;Apple Lossless Format (similar to FLAC);http://www.apple.com/quicktime/download/standalone.html\n"
- "sac3;AC3;4CC;A;AC3;;AC3 in MP4 (made in Nero);http://www.nerodigital.com\n"
- "in24;PCM;4CC;A;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "in32;PCM;4CC;A;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "fl32;PCM ;4CC;A;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "fl64;PCM;4CC;A;PCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "alaw;A-Law;4CC;A;ADPCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- "ulaw;U-Law;4CC;A;ADPCM;;;http://www.apple.com/quicktime/download/standalone.html\n"
- ".mp3;MPEG-1/2 L3;2CC;A;MPEG-A;;MPEG-1 or 2 layer 3;http://www.iis.fraunhofer.de/amm/index.html\n"
- "MPEG-4 AAC main;AAC Main;Mp4v2;A;AAC;;\n"
- "MPEG-4 AAC LC;AAC LC;Mp4v2;A;AAC;;\n"
- "MPEG-4 AAC SSR;AAC SSR;Mp4v2;A;AAC;;\n"
- "MPEG-4 AAC LTP;AAC LTP;Mp4v2;A;AAC;;\n"
- "AVC;AVC;MediaInfo;V;AVC;;Advanced Video Codec;http://developers.videolan.org/x264.html\n"
- "MPEG-1V;MPEG-1 Video;MediaInfo;V;MPEG-V;;\n"
- "MPEG-2V;MPEG-2 Video;MediaInfo;V;MPEG-V;;\n"
- "MPEG-4V;MPEG-4 Visual;MediaInfo;V;MPEG-4V;;\n"
- "MPEG-1A;MPEG-1 Audio;MediaInfo;A;MPEG-A;;\n"
- "MPEG-1A L1;MPEG-1 Audio Layer 1;MediaInfo;A;MPEG-A;;\n"
- "MPEG-1A L2;MPEG-1 Audio Layer 2;MediaInfo;A;MPEG-A;;\n"
- "MPEG-1A L3;MPEG-1 Audio Layer 3;MediaInfo;A;MPEG-A;;\n"
- "MPEG-2A;MPEG-2 Audio;MediaInfo;A;MPEG-A;;\n"
- "MPEG-2A L1;MPEG-2 Audio Layer 1;MediaInfo;A;MPEG-A;;\n"
- "MPEG-2A L2;MPEG-2 Audio Layer 2;MediaInfo;A;MPEG-A;;\n"
- "MPEG-2A L3;MPEG-2 Audio Layer 3;MediaInfo;A;MPEG-A;;\n"
- "MPEG-2.5A;MPEG-2.5 Audio;MediaInfo;A;MPEG-A;;;\n"
- "MPEG-2.5A L1;MPEG-2.5 Audio Layer 1;MediaInfo;A;MPEG-A;;;\n"
- "MPEG-2.5A L2;MPEG-2.5 Audio Layer 2;MediaInfo;A;MPEG-A;;;\n"
- "MPEG-2.5A L3;MPEG-2.5 Audio Layer 3;MediaInfo;A;MPEG-A;;;\n"
- "APE;Monkey's Audio;MediaInfo;A;;;;http://www.monkeysaudio.com/\n"
- "ALS;ALS;MediaInfo;A;;;MPEG-4 Audio Lossless Coding;http://www.nue.tu-berlin.de/forschung/projekte/lossless/mp4als.html#downloads\n"
- "Vodei;Vodei MP;MediaInfo;V;;;Video On Demand Exploration Interface;http://www.vodei.com\n"
- "SWF ADPCM;ADPCM;MediaInfo;A;ADPCM;;ADPCM found in SWF/FLV files;http://www.adobe.com\n"
- "AC3+;AC3+;MediaInfo;A;AC3;;Dolby Ehanced AC3;\n"
- "TrueHD;TrueHD;MediaInfo;A;AC3;;Dolby TrueHD (AC3 based);\n"
- "VC-1;VC-1;MediaInfo;V;VC-1;;;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx\n"
- "LA;LA;MediaInfo;A;;;Lossless Audio Codec;la;http://www.lossless-audio.com/\n"
- "0;Unknown;2CC;A;;;;\n"
- "1;PCM;2CC;A;PCM;;Microsoft PCM;http://www.microsoft.com/windows/\n"
- "2;ADPCM;2CC;A;ADPCM;;Microsoft ADPCM;http://www.microsoft.com/windows/\n"
- "3;PCM;2CC;A;PCM;;IEEE FLOAT;http://www.microsoft.com/windows/\n"
- "4;VSELP;2CC;A;;;Compaq VSELP\n"
- "5;CVSD;2CC;A;;;IBM CVSD\n"
- "6;A-Law;2CC;A;ADPCM;;CCITT A-Law;http://www.microsoft.com/windows/\n"
- "7;U-Law;2CC;A;ADPCM;;CCITT U-Law;http://www.microsoft.com/windows/\n"
- "8;DTS;2CC;A;DTS;;\n"
- "9;DRM;2CC;A;;;Microsoft\n"
- "A;WMSpeech;2CC;A;;;\n"
- "C;MPEG2 5.1;2CC;A;;;MPEG2 5.1\n"
- "10;ADPCM;2CC;A;ADPCM;;OKI ADPCM\n"
- "11;ADPCM;2CC;A;ADPCM;;Intel ADPCM\n"
- "12;ADPCM;2CC;A;ADPCM;;Mediaspace (Videologic) ADPCM\n"
- "13;ADPCM;2CC;A;ADPCM;;Sierra ADPCM\n"
- "14;ADPCM;2CC;A;ADPCM;;Antex G723 ADPCM\n"
- "15;STD;2CC;A;;;DSP solutions Digi-STD\n"
- "16;FIX;2CC;A;;;DSP solutions Digi-FIX\n"
- "17;ADPCM;2CC;A;ADPCM;;Dialogic-OKI ADPCM;http://www.microsoft.com/windows/\n"
- "18;ADPCM;2CC;A;ADPCM;;\n"
- "19;CU;2CC;A;;;HP CU_CODEC\n"
- "1A;Dynamic Voice;2CC;A;;;HP\n"
- "20;ADPCM;2CC;A;ADPCM;;Yamaha ADPCM\n"
- "21;SONARC;2CC;A;;;Speech Compression SONARC\n"
- "22;Truespeech;2CC;A;;;DSP Group TrueSpeech;http://www.microsoft.com/windows/\n"
- "23;SC1;2CC;A;;;Echo Speech SC1\n"
- "24;AF36;2CC;A;;;Virtual Music AudioFile 36\n"
- "25;APTX;2CC;A;;;Audio Processing Technology X\n"
- "26;AF10;2CC;A;;;Virtual Music AudioFile 10\n"
- "27;Prosody 1612;2CC;A;;;Aculab plc Prosody 1612\n"
- "28;LRC;2CC;A;;;Merging Technologies LRC\n"
- "30;AC2;2CC;A;;;Dolby Laboratories AC2\n"
- "31;GSM 6.10;2CC;A;;;Microsoft GSM 6.10;http://www.microsoft.com/windows/\n"
- "32;MSAUDIO;2CC;A;;;Microsoft Audio\n"
- "33;ADPCM;2CC;A;ADPCM;;Antex ADPCM\n"
- "34;VQLPC;2CC;A;;;Control Resources VQLPC\n"
- "35;REAL;2CC;A;;;DSP Solutions Digi-REAL\n"
- "36;ADPCM;2CC;A;ADPCM;;DSP Solutions Digi-ADPCM\n"
- "37;CR10;2CC;A;;;Control Resources 10\n"
- "38;ADPCM;2CC;A;ADPCM;;Natural MicroSystems VBX ADPCM\n"
- "39;ADPCM;2CC;A;ADPCM;;Crystal Semiconductor IMA ADPCM\n"
- "3A;SC3;2CC;A;;;Echo Speech SC3\n"
- "3B;ADPCM;2CC;A;;;Rockwell ADPCM\n"
- "3C;DigiTalk;2CC;A;;;Rockwell DigiTalk\n"
- "3D;Xebec;2CC;A;;;Xebec Multimedia Solutions\n"
- "40;ADPCM;2CC;A;ADPCM;;Antex Electronics G721 ADPCM\n"
- "41;CELP;2CC;A;;;Antex Electronics G728 CELP\n"
- "42;G.723.1;2CC;A;;;Microsoft G.723.1;http://www.microsoft.com/windows/\n"
- "42;ADPCM;2CC;A;;;IBM\n"
- "42;MSG729;2CC;A;;;Microsoft\n"
- "45;ADPCM;2CC;A;ADPCM;;Microsoft G.726;http://www.microsoft.com/windows/\n"
- "50;MPEG-1/2 L1;2CC;A;MPEG-1;;;http://www.iis.fraunhofer.de/amm/index.html\n"
- "51;MPEG-1/2 L2;2CC;A;MPEG-1;;;http://www.iis.fraunhofer.de/amm/index.html\n"
- "52;RT24;2CC;A;;;InSoft, Inc.\n"
- "53;PAC;2CC;A;;;InSoft, Inc.\n"
- "55;MPEG-1/2 L3;2CC;A;MPEG-1;;MPEG-1 or 2 layer 3;http://www.iis.fraunhofer.de/amm/index.html\n"
- "59;G723;2CC;A;;;Lucent G723\n"
- "60;Cirrus;2CC;A;;;Cirrus Logic\n"
- "61;PCM;2CC;A;;;ESS Technology PCM\n"
- "62;Voxware;2CC;A;;;\n"
- "63;ATRAC;2CC;A;;;Canopus ATRAC\n"
- "64;ADPCM;2CC;A;ADPCM;;APICOM G726 ADPCM\n"
- "65;ADPCM;2CC;A;ADPCM;;APICOM G722 ADPCM\n"
- "66;DSAT;2CC;A;;;Microsoft DSAT\n"
- "67;DSAT Display;2CC;A;;;Microsoft DSAT DISPLAY\n"
- "69;BYTE_ALIGNED;2CC;A;;;Voxware BYTE_ALIGNED;http://www.voxware.com/\n"
- "70;AC8;2CC;A;;;Voxware AC8;http://www.voxware.com/\n"
- "71;AC10;2CC;A;;;Voxware AC10;http://www.voxware.com/\n"
- "72;AC16;2CC;A;;;Voxware AC16;http://www.voxware.com/\n"
- "73;AC20;2CC;A;;;Voxware AC20;http://www.voxware.com/\n"
- "74;RT24;2CC;A;;;Voxware RT24 (MetaVoice);http://www.voxware.com/\n"
- "75;RT29;2CC;A;;;Voxware RT29 (MetaSound);http://www.voxware.com/\n"
- "76;RT29HW;2CC;A;;;Voxware RT29HW;http://www.voxware.com/\n"
- "77;VR12;2CC;A;;;Voxware VR12;http://www.voxware.com/\n"
- "78;VR18;2CC;A;;;Voxware VR18;http://www.voxware.com/\n"
- "79;TQ40;2CC;A;;;Voxware TQ40;http://www.voxware.com/\n"
- "7A;SC3;2CC;A;;;Voxware\n"
- "7B;SC3;2CC;A;;;Voxware\n"
- "80;Softsound;2CC;A;;;\n"
- "81;TQ60;2CC;A;;;Voxware TQ60;http://www.voxware.com/\n"
- "82;MSRT24;2CC;A;;;Microsoft MSRT24\n"
- "83;G729A;2CC;A;;;AT&T G729A\n"
- "84;MVI_MVI2;2CC;A;;;Motion Pixels MVI_MVI2\n"
- "85;ADPCM;2CC;A;ADPCM;;DataFusion Systems (Pty) G726\n"
- "86;GSM6.10;2CC;A;;;DataFusion Systems (Pty) GSM6.10\n"
- "88;ISI AUDIO;2CC;A;;;Iterated Systems AUDIO\n"
- "89;Onlive;2CC;A;;;OnLive! Technologies\n"
- "8A;SX20;2CC;A;;;Multitude\n"
- "8B;ADPCM;2CC;A;ADPCM;;Infocom ITS A/S\n"
- "8C;G.729;2CC;A;;;Convedia Corporation\n"
- "91;SBC24;2CC;A;;;Siemens Business Communications Sys 24\n"
- "92;AC3 SPDIF;2CC;A;;;Sonic Foundry AC3 SPDIF\n"
- "93;G723;2CC;A;;;MediaSonic G723\n"
- "94;Prosody 8KBPS;2CC;A;;;Aculab plc Prosody 8KBPS\n"
- "97;ADPCM;2CC;A;ADPCM;;ZyXEL Communications ADPCM\n"
- "98;LPCBB;2CC;A;;;Philips Speech Processing LPCBB\n"
- "99;Packed;2CC;A;;;Studer Professional Audio AG Packed\n"
- "A0;PHONYTALK;2CC;A;;;Malden Electronics PHONYTALK\n"
- "A1;GSM;2CC;A;;;Racal Recorders\n"
- "A2;G.720a;2CC;A;;;Racal Recorders\n"
- "A3;G.723.1;2CC;A;;;Racal Recorders\n"
- "A4;ACELP;2CC;A;;;Racal Recorders\n"
- "B0;AAC;2CC;A;AAC;;NEC Corporation\n"
- "FF;AAC;2CC;A;AAC;;\n"
- "100;ADPCM;2CC;A;ADPCM;;\n"
- "101;IRAT;2CC;A;;;BeCubed IRAT\n"
- "102;;2CC;A;;;IBM A-law\n"
- "103;;2CC;A;;;IBM AVC ADPCM\n"
- "111;G723;2CC;A;;;Vivo G723\n"
- "112;SIREN;2CC;A;;;Vivo SIREN\n"
- "120;CELP;2CC;A;;;Philips Speech Processing\n"
- "121;Grundig;2CC;A;;;Philips Speech Processing\n"
- "123;G723;2CC;A;;;Digital Equipment Corporation (DEC) G723\n"
- "125;ADPCM;2CC;A;ADPCM;;\n"
- "130;ACEPL;2CC;A;;;Sipro ACEPL.net;http://dividix.host.sk\n"
- "131;ACELP4800;2CC;A;;;Sipro ACELP4800\n"
- "132;ACELP8V3;2CC;A;;;Sipro ACELP8V3\n"
- "133;G729;2CC;A;;;Sipro G729\n"
- "134;G729;2CC;A;;;Sipro G729A\n"
- "135;KELVIN;2CC;A;;;Sipro KELVIN\n"
- "135;AMR;2CC;A;;;VoiceAge Corporation\n"
- "140;ADPCM;2CC;A;ADPCM;;Dictaphone Corporation G726 ADPCM\n"
- "140;CELP68;2CC;A;;;Dictaphone Corporation\n"
- "140;CELP54;2CC;A;;;Dictaphone Corporation\n"
- "150;PureVoice;2CC;A;;;Qualcomm PUREVOICE\n"
- "151;HalfRate;2CC;A;;;Qualcomm HALFRATE\n"
- "155;TUBGSM;2CC;A;;;Ring Zero Systems TUBGSM\n"
- "160;WMA1;2CC;A;;;Windows Media Audio 1;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx\n"
- "161;WMA2;2CC;A;;;Windows Media Audio 2;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx\n"
- "162;WMA3;2CC;A;;;Windows Media Audio 3;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx\n"
- "163;WMA Lossless;2CC;A;;;Windows Media Audio 3;http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx\n"
- "163;WMA Pro;2CC;A;;;WMA Pro over S/PDIF\n"
- "170;ADPCM;2CC;A;ADPCM;;Unisys Nap ADPCM\n"
- "171;U-Law;2CC;A;ADPCM;;Unisys Nap U-law\n"
- "172;A-Law;2CC;A;ADPCM;;Unisys Nap A-law\n"
- "173;16K;2CC;A;;;Unisys Nap 16K\n"
- "174;G.700;2CC;A;;;SyCom Technologies\n"
- "175;ADPCM;2CC;A;ADPCM;;SyCom Technologies\n"
- "176;CELP54;2CC;A;;;SyCom Technologies\n"
- "177;CELP68;2CC;A;;;SyCom Technologies\n"
- "178;ADPCM;2CC;A;ADPCM;;Knowledge Adventure, Inc.\n"
- "180;AAC;2CC;A;;;Fraunhofer IIS\n"
- "190;DTS;2CC;A;;\n"
- "200;ADPCM;2CC;A;ADPCM;;Creative Labs ADPCM\n"
- "202;FastSpeech8;2CC;A;;;Creative Labs Fast Speech 8\n"
- "203;FastSpeech10;2CC;A;;;Creative Labs Fast Speech 10\n"
- "210;ADPCM;2CC;A;ADPCM;;UHER informatic GmbH ADPCM\n"
- "215;;2CC;A;;;Ulead DV ACM\n"
- "216;;2CC;A;;;Ulead DV ACM\n"
- "220;QuaterDeck;2CC;A;;;Quarterdeck\n"
- "230;VC;2CC;A;;;I-link VC\n"
- "240;RAW_SPORT;2CC;A;;;Aureal RAW_SPORT\n"
- "241;AC3;2CC;A;;;ESST AC3\n"
- "250;HSX;2CC;A;;;Interactive Products, Inc. (IPI) HSX\n"
- "251;RPELP;2CC;A;;;Interactive Products, Inc. (IPI) RPELP\n"
- "260;CS2;2CC;A;;;Consistent Software CS2\n"
- "270;SCX;2CC;A;;;Sony\n"
- "271;SCY;2CC;A;;;Sony\n"
- "272;Atrac3;2CC;A;;;Sony\n"
- "273;SPC;2CC;A;;;Sony\n"
- "280;Telum;2CC;A;;\n"
- "281;TelumIA;2CC;A;;\n"
- "285;ADPCM;2CC;A;ADPCM;;Norcom Voice Systems\n"
- "300;FM_TOWNS_SND;2CC;A;;;Fujitsu FM_TOWNS_SND\n"
- "350;Dev;2CC;A;;;Micronas Semiconductors, Inc.\n"
- "351;CELP833;2CC;A;;;Micronas Semiconductors, Inc.\n"
- "400;BTV_DIGITAL;2CC;A;;;Brooktree (BTV) DIGITAL\n"
- "401;Music Coder;2CC;A;;;Intel Music Coder;http://www.intel.com/\n"
- "402;IAC2;2CC;A;;;Ligos IAC2;http://www.ligos.com\n"
- "450;Qdesign;2CC;A;;;QDesign Music\n"
- "500;VP7;2CC;A;;;On2\n"
- "501;VP6;2CC;A;;;On2\n"
- "680;VMPCM;2CC;A;;;AT&T VME_VMPCM\n"
- "681;TPC;2CC;A;;;AT&T TPC\n"
- "700;YMPEG;2CC;A;;;YMPEG Alpha\n"
- "8AE;LiteWave;2CC;A;;;ClearJump LiteWave\n"
- "AAC;AAC;2CC;A;AAC;;\n"
- "1000;GSM;2CC;A;;;Ing C. Olivetti & C., S.p.A. GSM\n"
- "1001;ADPCM;2CC;A;ADPCM;;Ing C. Olivetti & C., S.p.A. ADPCM\n"
- "1002;CELP;2CC;A;;;Ing C. Olivetti & C., S.p.A. CELP\n"
- "1003;SBC;2CC;A;;;Ing C. Olivetti & C., S.p.A. SBC\n"
- "1004;OPR;2CC;A;;;Ing C. Olivetti & C., S.p.A. OPR\n"
- "1100;LH_CODEC;2CC;A;;;Lernout & Hauspie Codec\n"
- "1101;CELP;2CC;A;;;Lernout & Hauspie CELP 4.8 kb/s;http://www.microsoft.com/windows/\n"
- "1102;SBC;2CC;A;;;Lernout & Hauspie SBC 8 kb/s;http://www.microsoft.com/windows/\n"
- "1103;SBC;2CC;A;;;Lernout & Hauspie SBC 12 kb/s;http://www.microsoft.com/windows/\n"
- "1104;SBC;2CC;A;;;Lernout & Hauspie SBC 16 kb/s;http://www.microsoft.com/windows/\n"
- "1400;NORRIS;2CC;A;;;Norris Communications, Inc.\n"
- "1401;ISIAUDIO;2CC;A;;;ISIAudio\n"
- "1500;MUSICOMPRESS;2CC;A;;;Soundspace Music Compression\n"
- "181C;RT24;2CC;A;;;VoxWare RT24 speech codec\n"
- "181E;AX24000P;2CC;A;;;Lucent elemedia AX24000P Music codec\n"
- "1971;SonicFoundry;2CC;A;;;Lossless\n"
- "1C03;ADPCM;2CC;A;ADPCM;;Lucent SX5363S G.723 compliant codec\n"
- "1C07;SX8300P;2CC;A;;;Lucent SX8300P speech codec\n"
- "1C0C;ADPCM;2CC;A;ADPCM;;Lucent SX5363S G.723 compliant codec\n"
- "1F03;DigiTalk;2CC;A;;;CUseeMe DigiTalk (ex-Rocwell)\n"
- "1FC4;ALF2CD;2CC;A;;;NCT Soft ALF2CD ACM\n"
- "2000;AC3;2CC;A;AC3;CBR;Dolby AC3\n"
- "2001;DTS;2CC;A;DTS;;Digital Theater Systems\n"
- "2002;Real Audio 1;2CC;A;;;RealAudio 1/2 14.4\n"
- "2003;Real Audio 1;2CC;A;;;RealAudio 1/2 28.8\n"
- "2004;Real Audio 2;2CC;A;;;RealAudio G2/8 Cook (low bitrate)\n"
- "2005;Real Audio 3;2CC;A;;;RealAudio 3/4/5 Music (DNET)\n"
- "2006;AAC;2CC;A;AAC;;RealAudio 10 AAC (RAAC)\n"
- "2007;AAC+;2CC;A;AAC;;RealAudio 10 AAC+ (RACP)\n"
- "3313;AviSynth;2CC;A;;;makeAVIS (fake AVI sound from AviSynth scripts)\n"
- "4143;AAC;2CC;A;AAC;;Divio MPEG-4 AAC audio\n"
- "4201;Nokia;2CC;A;;\n"
- "4243;ADPCM;2CC;A;ADPCM;;G726\n"
- "43AC;Lead Speech;2CC;A;;\n"
- "564C;Lead Vorbis;2CC;A;;;\n"
- "566F;Vorbis;2CC;A;Vorbis;;;http://www.vorbis.com\n"
- "5756;WavPack;2CC;A;;;;http://www.wavpack.com/\n"
- "674F;Vorbis;2CC;A;Vorbis;;Mode 1;http://www.vorbis.com\n"
- "6750;Vorbis;2CC;A;Vorbis;;Mode 2;http://www.vorbis.com\n"
- "6751;Vorbis;2CC;A;Vorbis;;Mode 3;http://www.vorbis.com\n"
- "676F;Vorbis;2CC;A;Vorbis;;Mode 1+;http://www.vorbis.com\n"
- "6770;Vorbis;2CC;A;Vorbis;;Mode 2+;http://www.vorbis.com\n"
- "6771;Vorbis;2CC;A;Vorbis;;Mode 2+;http://www.vorbis.com\n"
- "7A21;AMR;2CC;A;;CBR;GSM-AMR (CBR, no SID);http://www.microsoft.com\n"
- "7A22;AMR;2CC;A;;VBR;GSM-AMR (VBR, including SID);http://www.microsoft.com\n"
- "A100;G723.1;2CC;A;;;\n"
- "A101;AVQSBC;2CC;A;;;\n"
- "A102;ODSBC;2CC;A;;;\n"
- "A103;G729A;2CC;A;;;\n"
- "A104;AMR-WB;2CC;A;;;\n"
- "A105;ADPCM;2CC;A;ADPCM;;G726\n"
- "A106;AAC;2CC;A;;;\n"
- "A107;ADPCM;2CC;A;ADPCM;;G726\n"
- "A109;Speex;2CC;A;;;;http://www.speex.org/\n"
- "DFAC;FrameServer;2CC;A;;;DebugMode SonicFoundry Vegas FrameServer ACM Codec\n"
- "F1AC;FLAC;2CC;A;;;Free Lossless Audio Codec FLAC\n"
- "FFFE;PCM;2CC;A;PCM;;Extensible wave format\n"
- "FFFF;In Development;2CC;A;;;In Development / Unregistered\n"
- "S_TEXT/UTF8;UTF-8;Mk;T;;;UTF-8 Plain Text\n"
- "S_TEXT/SSA;SSA;Mk;T;;;Sub Station Alpha\n"
- "S_TEXT/ASS;ASS;Mk;T;;;Advanced Sub Station Alpha\n"
- "S_TEXT/USF;USF;Mk;T;;;Universal Subtitle Format\n"
- "S_IMAGE/BMP;Bitmap;Mk;T;;;Basic image based subtitle format\n"
- "S_VOBSUB;VobSub;Mk;T;;;Picture based subtitle format used on DVDs\n"
- "S_HDMV/PGS;PGS;Mk;T;;;Picture based subtitle format used on BDs/HD-DVDs\n"
- "S_HDMV/TEXTST;TEXTST;Mk;T;;;Text based subtitle format used on BDs\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Generic (ZtringListList &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "Format\n"
- "Format/Info\n"
- "Format/Url\n"
- "Format_Commercial\n"
- "Format_Commercial_IfAny\n"
- "Format_Version\n"
- "Format_Profile\n"
- "Format_Compression\n"
- "Format_Settings\n"
- "InternetMediaType\n"
- "CodecID\n"
- "CodecID/Info\n"
- "CodecID/Hint\n"
- "CodecID/Url\n"
- "CodecID_Description\n"
- "Codec\n"
- "Codec/String\n"
- "Codec/Info\n"
- "Codec/Url\n"
- "Codec/CC\n"
- "Duration\n"
- "Duration/String\n"
- "Duration/String1\n"
- "Duration/String2\n"
- "Duration/String3\n"
- "Duration/String4\n"
- "Duration/String5\n"
- "Source_Duration\n"
- "Source_Duration/String\n"
- "Source_Duration/String1\n"
- "Source_Duration/String2\n"
- "Source_Duration/String3\n"
- "Source_Duration/String4\n"
- "Source_Duration/String5\n"
- "BitRate_Mode\n"
- "BitRate_Mode/String\n"
- "BitRate\n"
- "BitRate/String\n"
- "BitRate_Minimum\n"
- "BitRate_Minimum/String\n"
- "BitRate_Nominal\n"
- "BitRate_Nominal/String\n"
- "BitRate_Maximum\n"
- "BitRate_Maximum/String\n"
- "BitRate_Encoded\n"
- "BitRate_Encoded/String\n"
- "FrameRate\n"
- "FrameRate/String\n"
- "FrameCount\n"
- "Source_FrameCount\n"
- "ColorSpace\n"
- "ChromaSubsampling\n"
- "Resolution\n"
- "Resolution/String\n"
- "BitDepth\n"
- "BitDepth/String\n"
- "Compression_Mode\n"
- "Compression_Mode/String\n"
- "Compression_Ratio\n"
- "Delay\n"
- "Delay/String\n"
- "Delay/String1\n"
- "Delay/String2\n"
- "Delay/String3\n"
- "Delay/String4\n"
- "Delay/String5\n"
- "Delay_Settings\n"
- "Delay_DropFrame\n"
- "Delay_Source\n"
- "Delay_Source/String\n"
- "Delay_Original\n"
- "Delay_Original/String\n"
- "Delay_Original/String1\n"
- "Delay_Original/String2\n"
- "Delay_Original/String3\n"
- "Delay_Original/String4\n"
- "Delay_Original/String5\n"
- "Delay_Original_Settings\n"
- "Delay_Original_DropFrame\n"
- "Delay_Original_Source\n"
- "Video_Delay\n"
- "Video_Delay/String\n"
- "Video_Delay/String1\n"
- "Video_Delay/String2\n"
- "Video_Delay/String3\n"
- "Video_Delay/String4\n"
- "Video_Delay/String5\n"
- "StreamSize\n"
- "StreamSize/String\n"
- "StreamSize/String1\n"
- "StreamSize/String2\n"
- "StreamSize/String3\n"
- "StreamSize/String4\n"
- "StreamSize/String5\n"
- "StreamSize_Proportion\n"
- "Source_StreamSize\n"
- "Source_StreamSize/String\n"
- "Source_StreamSize/String1\n"
- "Source_StreamSize/String2\n"
- "Source_StreamSize/String3\n"
- "Source_StreamSize/String4\n"
- "Source_StreamSize/String5\n"
- "Source_StreamSize_Proportion\n"
- "StreamSize_Encoded\n"
- "StreamSize_Encoded/String\n"
- "StreamSize_Encoded/String1\n"
- "StreamSize_Encoded/String2\n"
- "StreamSize_Encoded/String3\n"
- "StreamSize_Encoded/String4\n"
- "StreamSize_Encoded/String5\n"
- "StreamSize_Encoded_Proportion\n"
- "Source_StreamSize_Encoded\n"
- "Source_StreamSize_Encoded/String\n"
- "Source_StreamSize_Encoded/String1\n"
- "Source_StreamSize_Encoded/String2\n"
- "Source_StreamSize_Encoded/String3\n"
- "Source_StreamSize_Encoded/String4\n"
- "Source_StreamSize_Encoded/String5\n"
- "Source_StreamSize_Encoded_Proportion\n"
- "Language\n"
- "ServiceName\n"
- "ServiceProvider\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_General (ZtringListList &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "Count;;;N NI;;;Count of objects available in this stream\n"
- "Status;;;N NI;;;bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)\n"
- "StreamCount;;;N NI;;;Count of streams of that kind available\n"
- "StreamKind;General;;N NT;;;Stream type name\n"
- "StreamKind/String;;;N NT;;;Stream type name\n"
- "StreamKindID;;;N NI;;;Number of the stream (base=0)\n"
- "StreamKindPos;;;N NI;;;When multiple streams, number of the stream (base=1)\n"
- "StreamOrder;;;N YI;;;Stream order in the file, whatever is the kind of stream (base=0)\n"
- "FirstPacketOrder;;;N YI;;;Order of the first fully decodable packet met in the file, whatever is the kind of stream (base=0)\n"
- "Inform;;;N NT;;;Last **Inform** call\n"
- "ID;;;N YI;;;The ID for this stream in this file\n"
- "ID/String;;;Y NT;;;The ID for this stream in this file\n"
- "UniqueID;;;N YI;;;The unique ID for this stream, should be copied with stream copy\n"
- "UniqueID/String;;;Y NT;;;The unique ID for this stream, should be copied with stream copy\n"
- "MenuID;;;N YI;;;The menu ID for this stream in this file\n"
- "MenuID/String;;;Y NT;;;The menu ID for this stream in this file\n"
- "GeneralCount;1;;N NI;;;Number of general streams\n"
- "VideoCount;;;N NI;;;Number of video streams\n"
- "AudioCount;;;N NI;;;Number of audio streams\n"
- "TextCount;;;N NI;;;Number of text streams\n"
- "OtherCount;;;N NI;;;Number of other streams\n"
- "ImageCount;;;N NI;;;Number of image streams\n"
- "MenuCount;;;N NI;;;Number of menu streams\n"
- "Video_Format_List;;;N NT;;;Video Codecs in this file, separated by /\n"
- "Video_Format_WithHint_List;;;N NT;;;Video Codecs in this file with popular name (hint), separated by /\n"
- "Video_Codec_List;;;N NT;;;Deprecated, do not use in new projects\n"
- "Video_Language_List;;;N NT;;;Video languagesin this file, full names, separated by /\n"
- "Audio_Format_List;;;N NT;;;Audio Codecs in this file,separated by /\n"
- "Audio_Format_WithHint_List;;;N NT;;;Audio Codecs in this file with popular name (hint), separated by /\n"
- "Audio_Codec_List;;;N NT;;;Deprecated, do not use in new projects\n"
- "Audio_Language_List;;;N NT;;;Audio languages in this file separated by /\n"
- "Text_Format_List;;;N NT;;;Text Codecs in this file, separated by /\n"
- "Text_Format_WithHint_List;;;N NT;;;Text Codecs in this file with popular name (hint),separated by /\n"
- "Text_Codec_List;;;N NT;;;Deprecated, do not use in new projects\n"
- "Text_Language_List;;;N NT;;;Text languages in this file, separated by /\n"
- "Other_Format_List;;;N NT;;;Other formats in this file, separated by /\n"
- "Other_Format_WithHint_List;;;N NT;;;Other formats in this file with popular name (hint), separated by /\n"
- "Other_Codec_List;;;N NT;;;Deprecated, do not use in new projects\n"
- "Other_Language_List;;;N NT;;;Chapters languages in this file, separated by /\n"
- "Image_Format_List;;;N NT;;;Image Codecs in this file, separated by /\n"
- "Image_Format_WithHint_List;;;N NT;;;Image Codecs in this file with popular name (hint), separated by /\n"
- "Image_Codec_List;;;N NT;;;Deprecated, do not use in new projects\n"
- "Image_Language_List;;;N NT;;;Image languages in this file, separated by /\n"
- "Menu_Format_List;;;N NT;;;Menu Codecsin this file, separated by /\n"
- "Menu_Format_WithHint_List;;;N NT;;;Menu Codecs in this file with popular name (hint),separated by /\n"
- "Menu_Codec_List;;;N NT;;;Deprecated, do not use in new projects\n"
- "Menu_Language_List;;;N NT;;;Menu languages in this file, separated by /\n"
- "CompleteName;;;Y YT;;;Complete name (Folder+Name+Extension)\n"
- "FolderName;;;N NT;;;Folder name only\n"
- "FileName;;;N NT;;;File name only\n"
- "FileExtension;;;N NT;;;File extension only\n"
- "CompleteName_Last;;;Y YT;;;Complete name (Folder+Name+Extension) of the last file (in the case of a sequence of files)\n"
- "FolderName_Last;;;N NT;;;Folder name only of the last file (in the case of a sequence of files)\n"
- "FileName_Last;;;N NT;;;File name only of the last file (in the case of a sequence of files)\n"
- "FileExtension_Last;;;N NT;;;File extension only of the last file (in the case of a sequence of files)\n"
- "Format;;;Y YT;;;Format used\n"
- "Format/String;;;N NT;;;Deprecated, do not use in new projects\n"
- "Format/Info;;;Y NT;;;Info about this Format\n"
- "Format/Url;;;N NT;;;Link to a description of this format\n"
- "Format/Extensions;;;N NT;;;Known extensions of this format\n"
- "Format_Commercial;;;N NT;;;Commercial name used by vendor for theses setings or Format field if there is no difference\n"
- "Format_Commercial_IfAny;;;Y YT;;;Commercial name used by vendor for theses setings if there is one\n"
- "Format_Version;;;Y YT;;;Version of this format\n"
- "Format_Profile;;;Y YT;;;Profile of the Format\n"
- "Format_Compression;;;Y YT;;;Compression method used;\n"
- "Format_Settings;;;Y YT;;;Settings needed for decoder used\n"
- "InternetMediaType;;;N YT;;;Internet Media Type (aka MIME Type, Content-Type)\n"
- "CodecID;;;Y YT;;;Codec ID (found in some containers);\n"
- "CodecID/String;;;Y NT;;;Codec ID (found in some containers);\n"
- "CodecID/Info;;;Y NT;;;Info about this codec\n"
- "CodecID/Hint;;;Y NT;;;A hint/popular name for this codec\n"
- "CodecID/Url;;;N NT;;;A link to more details about this codec ID\n"
- "CodecID_Description;;;Y YT;;;Manual description given by the container\n"
- "Interleaved;;;N YT;;;If Audio and video are muxed\n"
- "Codec;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec/String;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec/Info;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec/Url;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec/Extensions;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Settings;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Settings_Automatic;;;N NT;;;Deprecated, do not use in new projects\n"
- "FileSize;; byte;N YT;;;File size in bytes\n"
- "FileSize/String;;;Y NT;;;File size (with measure)\n"
- "FileSize/String1;;;N NT;;;File size (with measure, 1 digit mini)\n"
- "FileSize/String2;;;N NT;;;File size (with measure, 2 digit mini)\n"
- "FileSize/String3;;;N NT;;;File size (with measure, 3 digit mini)\n"
- "FileSize/String4;;;N NT;;;File size (with measure, 4 digit mini)\n"
- "Duration;; ms;N YI;;;Play time of the stream in ms\n"
- "Duration/String;;;Y NT;;;Play time in format : XXx YYy only, YYy omited if zero\n"
- "Duration/String1;;;N NT;;;Play time in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Duration/String2;;;N NT;;;Play time in format : XXx YYy only, YYy omited if zero\n"
- "Duration/String3;;;N NT;;;Play time in format : HH:MM:SS.MMM\n"
- "Duration/String4;;;N NT;;;Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Duration/String5;;;N NT;;;Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Duration_Start;;;Y YT;;\n"
- "Duration_End;;;Y YT;;\n"
- "OverallBitRate_Mode;;;N YT;;;Bit rate mode of all streams (VBR, CBR)\n"
- "OverallBitRate_Mode/String;;;Y NT;;;Bit rate mode of all streams (Variable, Constant)\n"
- "OverallBitRate;; bps;N YF;;;Bit rate of all streams in bps\n"
- "OverallBitRate/String;;;Y NT;;;Bit rate of all streams (with measure)\n"
- "OverallBitRate_Minimum;; bps;N YF;;;Minimum Bit rate in bps\n"
- "OverallBitRate_Minimum/String;;;Y NT;;;Minimum Bit rate (with measurement)\n"
- "OverallBitRate_Nominal;; bps;N YF;;;Nominal Bit rate in bps\n"
- "OverallBitRate_Nominal/String;;;Y NT;;;Nominal Bit rate (with measurement)\n"
- "OverallBitRate_Maximum;; bps;N YF;;;Maximum Bit rate in bps\n"
- "OverallBitRate_Maximum/String;;;Y NT;;;Maximum Bit rate (with measurement)\n"
- "FrameRate;; fps;N YF;;;Frames per second\n"
- "FrameRate/String;;;N NT;;;Frames per second (with measurement)\n"
- "FrameCount;;;N NI;;;Frame count (a frame contains a count of samples depends of the format);\n"
- "Delay;; ms;N YI;;;Delay fixed in the stream (relative) IN MS\n"
- "Delay/String;;;N NT;;;Delay with measurement\n"
- "Delay/String1;;;N NT;;;Delay with measurement\n"
- "Delay/String2;;;N NT;;;Delay with measurement\n"
- "Delay/String3;;;N NT;;;format : HH:MM:SS.MMM\n"
- "Delay/String4;;;N NT;;;Delay in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Delay/String5;;;N NT;;;Delay in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Delay_Settings;;;N NT;;;Delay settings (in case of timecode for example)\n"
- "Delay_DropFrame;;;N NT;;;Delay drop frame\n"
- "Delay_Source;;;N NT;;;Delay source (Container or Stream or empty)\n"
- "Delay_Source/String;;;N NT;;;Delay source (Container or Stream or empty)\n"
- "StreamSize;; byte;N YI;;;Stream size in bytes\n"
- "StreamSize/String;;;N NT;;\n"
- "StreamSize/String1;;;N NT;;\n"
- "StreamSize/String2;;;N NT;;\n"
- "StreamSize/String3;;;N NT;;\n"
- "StreamSize/String4;;;N NT;;\n"
- "StreamSize/String5;;;N NT;;;With proportion\n"
- "StreamSize_Proportion;;;N NT;;;Stream size divided by file size\n"
- "HeaderSize;;;N YI;;\n"
- "DataSize;;;N YI;;\n"
- "FooterSize;;;N YI;;\n"
- "IsStreamable;;;N YT;;\n"
- "Album_ReplayGain_Gain;; dB;N YT;;;The gain to apply to reach 89dB SPL on playback\n"
- "Album_ReplayGain_Gain/String;;;Y YT;;\n"
- "Album_ReplayGain_Peak;;;Y YT;;;The maximum absolute peak value of the item;\n"
- "Encryption;;;Y YT;;;;\n"
- "Encryption_Format;;;N YT;;;;\n"
- "Encryption_Length;;;N YT;;;;\n"
- "Encryption_Method;;;N YT;;;;\n"
- "Encryption_Mode;;;N YT;;;;\n"
- "Encryption_Padding;;;N YT;;;;\n"
- "Encryption_InitializationVector;;;N YT;;;;\n"
- "Title;;;N NT;;;(Generic)Title of file;;Title\n"
- "Title/More;;;N NT;;;(Generic)More info about the title of file;;Title\n"
- "Title/Url;;;N NT;;;(Generic)Url;;Title\n"
- "Domain;;;Y YT;;;Univers movies belong to, e.g. Starwars, Stargate, Buffy, Dragonballs;;Title\n"
- "Collection;;;Y YT;;;Name of the series, e.g. Starwars movies, Stargate SG-1, Stargate Atlantis, Buffy, Angel;;Title\n"
- "Season;;;Y YT;;;Name of the season, e.g. Strawars first Trilogy, Season 1;;Title\n"
- "Season_Position;;;Y YI;;;Number of the Season;;Title\n"
- "Season_Position_Total;;;Y YI;;;Place of the season e.g. 2 of 7;;Title\n"
- "Movie;;;Y YT;;;Name of the movie. Eg : Starwars, a new hope;;Title\n"
- "Movie/More;;;Y YT;;;More infos about the movie;;Title\n"
- "Movie/Country;;;Y YT;;;Country, where the movie was procuced;;Title\n"
- "Movie/Url;;;Y YT;;;Homepage for the movie;;Title\n"
- "Album;;;Y YT;;;Name of an audio-album. Eg : The joshua tree;;Title\n"
- "Album/More;;;Y YT;;;More infos about the album;;Title\n"
- "Album/Sort;;;Y YT;;;;;Title\n"
- "Album/Performer;;;Y YT;;;Album performer/artist of this file;;Entity\n"
- "Album/Performer/Sort;;;Y YT;;;;;Entity\n"
- "Album/Performer/Url;;;Y YT;;;Homepage of the album performer/artist;;Entity\n"
- "Comic;;;Y YT;;;Name of the comic.;;Title\n"
- "Comic/More;;;Y YT;;;;;Title\n"
- "Comic/Position_Total;;;Y YI;;;;;Title\n"
- "Part;;;Y YT;;;Name of the part. e.g. CD1, CD2;;Title\n"
- "Part/Position;;;Y YI;;;Number of the part;;Title\n"
- "Part/Position_Total;;;Y YI;;;Place of the part e.g. 2 of 3;;Title\n"
- "Track;;;Y YT;;;Name of the track. e.g. track1, track 2;;Title\n"
- "Track/More;;;Y YT;;;More infos about the track;;Title\n"
- "Track/Url;;;Y YT;;;Link to a site about this track;;Title\n"
- "Track/Sort;;;Y YT;;;;;Title\n"
- "Track/Position;;;Y YI;;;Number of this track;;Title\n"
- "Track/Position_Total;;;Y YI;;;Place of this track, e.g. 3 of 15;;Title\n"
- "Grouping;;;Y YT;;;iTunes grouping;;Title\n"
- "Chapter;;;Y YT;;;Name of the chapter.;;Title\n"
- "SubTrack;;;Y YT;;;Name of the subtrack.;;Title\n"
- "Original/Album;;;Y YT;;;Original name of album, serie...;;Title\n"
- "Original/Movie;;;Y YT;;;Original name of the movie;;Title\n"
- "Original/Part;;;Y YT;;;Original name of the part in the original support;;Title\n"
- "Original/Track;;;Y YT;;;Original name of the track in the original support;;Title\n"
- "Compilation;;Yes;Y YT;;;iTunes compilation;;Title\n"
- "Compilation/String;;;Y YT;;;iTunes compilation;;Title\n"
- "Performer;;;Y YT;;;Main performer/artist of this file;;Entity\n"
- "Performer/Sort;;;Y YT;;;;;Entity\n"
- "Performer/Url;;;Y YT;;;Homepage of the performer/artist;;Entity\n"
- "Original/Performer;;;Y YT;;;Original artist(s)/performer(s).;;Entity\n"
- "Accompaniment;;;Y YT;;;Band/orchestra/accompaniment/musician.;;Entity\n"
- "Composer;;;Y YT;;;Name of the original composer.;;Entity\n"
- "Composer/Nationality;;;Y YT;;;Nationality of the main composer of the item, mostly for classical music.;;Entity\n"
- "Arranger;;;Y YT;;;The person who arranged the piece. e.g. Ravel.;;Entity\n"
- "Lyricist;;;Y YT;;;The person who wrote the lyrics for a musical item.;;Entity\n"
- "Original/Lyricist;;;Y YT;;;Original lyricist(s)/text writer(s).;;Entity\n"
- "Conductor;;;Y YT;;;The artist(s) who performed the work. In classical music this would be the conductor, orchestra, soloists.;;Entity\n"
- "Director;;;Y YT;;;Name of the director.;;Entity\n"
- "CoDirector;;;Y YT;;;Name of the codirector.;;Entity\n"
- "AssistantDirector;;;Y YT;;;Name of the assistant director.;;Entity\n"
- "DirectorOfPhotography;;;Y YT;;;The name of the director of photography, also known as cinematographer.;;Entity\n"
- "SoundEngineer;;;Y YT;;;The name of the sound engineer or sound recordist.;;Entity\n"
- "ArtDirector;;;Y YT;;;The person who oversees the artists and craftspeople who build the sets.;;Entity\n"
- "ProductionDesigner;;;Y YT;;;The person responsible for designing the Overall visual appearance of a movie.;;Entity\n"
- "Choregrapher;;;Y YT;;;The name of the choregrapher.;;Entity\n"
- "CostumeDesigner;;;Y YT;;;The name of the costume designer.;;Entity\n"
- "Actor;;;Y YT;;;Real name of an actor or actress playing a role in the movie.;;Entity\n"
- "Actor_Character;;;Y YT;;;Name of the character an actor or actress plays in this movie.;;Entity\n"
- "WrittenBy;;;Y YT;;;The author of the story or script.;;Entity\n"
- "ScreenplayBy;;;Y YT;;;The author of the screenplay or scenario (used for movies and TV shows).;;Entity\n"
- "EditedBy;;;Y YT;;;Editors name;;Entity\n"
- "CommissionedBy;;;Y YT;;;name of the person or organization that commissioned the subject of the file;;Entity\n"
- "Producer;;;Y YT;;;Name of the producer of the movie.;;Entity\n"
- "CoProducer;;;Y YT;;;The name of a co-producer.;;Entity\n"
- "ExecutiveProducer;;;Y YT;;;The name of an executive producer.;;Entity\n"
- "MusicBy;;;Y YT;;;Main music-artist for a movie;;Entity\n"
- "DistributedBy;;;Y YT;;;Company the item is mainly distributed by ;;Entity\n"
- "OriginalSourceForm/DistributedBy;;;Y YT;;;Name of the person or organization who supplied the original subject;;Entity\n"
- "MasteredBy;;;Y YT;;;The engineer who mastered the content for a physical medium or for digital distribution.;;Entity\n"
- "EncodedBy;;;Y YT;;;Name of the person or organisation that encoded/ripped the audio file.;;Entity\n"
- "RemixedBy;;;Y YT;;;Name of the artist(s), that interpreted, remixed, or otherwise modified the item.;;Entity\n"
- "ProductionStudio;;;Y YT;;;Main production studio ;;Entity\n"
- "ThanksTo;;;Y YT;;;A very general tag for everyone else that wants to be listed.;;Entity\n"
- "Publisher;;;Y YT;;;Name of the organization publishing the album (i.e. the 'record label') or movie.;;Entity\n"
- "Publisher/URL;;;Y YT;;;Publishers official webpage.;;Entity\n"
- "Label;;;Y YT;;;Brand or trademark associated with the marketing of music recordings and music videos.;;Entity\n"
- "Genre;;;Y YT;;;The main genre of the audio or video. e.g. classical, ambient-house, synthpop, sci-fi, drama, etc.;;Classification\n"
- "Mood;;;Y YT;;;Intended to reflect the mood of the item with a few keywords, e.g. Romantic, Sad, Uplifting, etc.;;Classification\n"
- "ContentType;;;Y YT;;;The type of the item. e.g. Documentary, Feature Film, Cartoon, Music Video, Music, Sound FX, etc.;;Classification\n"
- "Subject;;;Y YT;;;Describes the topic of the file, such as Aerial view of Seattle..;;Classification\n"
- "Description;;;Y YT;;;A short description of the contents, such as Two birds flying.;;Classification\n"
- "Keywords;;;Y YT;;;Keywords to the item separated by a comma, used for searching.;;Classification\n"
- "Summary;;;Y YT;;;A plot outline or a summary of the story.;;Classification\n"
- "Synopsis;;;Y YT;;;A description of the story line of the item.;;Classification\n"
- "Period;;;Y YT;;;Describes the period that the piece is from or about. e.g. Renaissance.;;Classification\n"
- "LawRating;;;Y YT;;;Depending on the country it's the format of the rating of a movie (P, R, X in the USA, an age in other countries or a URI defining a logo).;;Classification\n"
- "LawRating_Reason;;;Y YT;;;Reason for the law rating;;Classification\n"
- "ICRA;;;Y YT;;;The ICRA rating. (Previously RSACi);;Classification\n"
- "Released_Date;;;Y YT;;;The date/year that the item was released.;;Temporal\n"
- "Original/Released_Date;;;Y YT;;;The date/year that the item was originaly released.;;Temporal\n"
- "Recorded_Date;;;Y YT;;;The time/date/year that the recording began.;;Temporal\n"
- "Encoded_Date;;;Y YT;;;The time/date/year that the encoding of this item was completed began.;;Temporal\n"
- "Tagged_Date;;;Y YT;;;The time/date/year that the tags were done for this item.;;Temporal\n"
- "Written_Date;;;Y YT;;;The time/date/year that the composition of the music/script began.;;Temporal\n"
- "Mastered_Date;;;Y YT;;;The time/date/year that the item was tranfered to a digitalmedium.;;Temporal\n"
- "File_Created_Date;;;N NT;;;The time that the file was created on the file system;;Temporal\n"
- "File_Created_Date_Local;;;N NT;;;The time that the file was created on the file system (Warning: this field depends of local configuration, do not use it in an international database);;Temporal\n"
- "File_Modified_Date;;;N NT;;;The time that the file was modified on the file system;;Temporal\n"
- "File_Modified_Date_Local;;;N NT;;;The time that the file was modified on the file system (Warning: this field depends of local configuration, do not use it in an international database);;Temporal\n"
- "Recorded_Location;;;Y YT;;;Location where track was recorded. (See COMPOSITION_LOCATION for format);;Spatial\n"
- "Written_Location;;;Y YT;;;Location that the item was originaly designed/written. Information should be stored in the following format: country code, state/province, city where the coutry code is the same 2 octets as in Internet domains, or possibly ISO-3166. e.g. US, Texas, Austin or US, , Austin.;;Spatial\n"
- "Archival_Location;;;Y YT;;;Location, where an item is archived, e.eg. Louvre,Paris,France;;Spatial\n"
- "Encoded_Application;;;N YT;;;Name of the software package used to create the file, such as Microsoft WaveEdit;;Technical\n"
- "Encoded_Application/String;;;Y NT;;;Name of the software package used to create the file, such as Microsoft WaveEdit, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)';;Technical\n"
- "Encoded_Application_CompanyName;;;N YT;;;Name of the company;;Technical\n"
- "Encoded_Application_Name;;;N YT;;;Name of the product;;Technical\n"
- "Encoded_Application_Version;;;N YT;;;Version of the product;;Technical\n"
- "Encoded_Application_Url;;;N YT;;;Name of the software package used to create the file, such as Microsoft WaveEdit.;;Technical\n"
- "Encoded_Library;;;N YT;;;Software used to create the file;;Technical\n"
- "Encoded_Library/String;;;Y NT;;;Software used to create the file, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)';;Technical\n"
- "Encoded_Library_CompanyName;;;N YT;;;Name of the company;;Technical\n"
- "Encoded_Library_Name;;;N NT;;;Name of the the encoding-software;;Technical\n"
- "Encoded_Library_Version;;;N NT;;;Version of encoding-software;;Technical\n"
- "Encoded_Library_Date;;;N NT;;;Release date of software;;Technical\n"
- "Encoded_Library_Settings;;;Y YT;;;Parameters used by the software;;Technical\n"
- "Encoded_OperatingSystem;;;N YT;;;Operating System of encoding-software;;Technical\n"
- "Cropped;;;Y YT;;;Describes whether an image has been cropped and, if so, how it was cropped.;;Technical\n"
- "Dimensions;;;Y YT;;;Specifies the size of the original subject of the file. eg 8.5 in h, 11 in w;;Technical\n"
- "DotsPerInch;;;Y YT;;;Stores dots per inch setting of the digitizer used to produce the file;;Technical\n"
- "Lightness;;;Y YT;;;Describes the changes in lightness settings on the digitizer required to produce the file;;Technical\n"
- "OriginalSourceMedium;;;Y YT;;;Original medium of the material, e.g. vinyl, Audio-CD, Super8 or BetaMax;;Technical\n"
- "OriginalSourceForm;;;Y YT;;;Original form of the material, e.g. slide, paper, map;;Technical\n"
- "OriginalSourceForm/NumColors;;;Y YT;;;Number of colors requested when digitizing, e.g. 256 for images or 32 bit RGB for video;;Technical\n"
- "OriginalSourceForm/Name;;;Y YT;;;Name of the product the file was originally intended for;;Technical\n"
- "OriginalSourceForm/Cropped;;;Y YT;;;Describes whether an image has been cropped and, if so, how it was cropped. e.g. 16:9 to 4:3, top and bottom;;Technical\n"
- "OriginalSourceForm/Sharpness;;;Y YT;;;Identifies the changes in sharpness for the digitizer requiered to produce the file;;Technical\n"
- "Tagged_Application;;;Y YT;;;Software used to tag this file;;Technical\n"
- "BPM;;;Y YT;;;Average number of beats per minute;;Technical\n"
- "ISRC;;;Y YT;;;International Standard Recording Code, excluding the ISRC prefix and including hyphens.;;Identifier\n"
- "ISBN;;;Y YT;;;International Standard Book Number.;;Identifier\n"
- "BarCode;;;Y YT;;;EAN-13 (13-digit European Article Numbering) or UPC-A (12-digit Universal Product Code) bar code identifier.;;Identifier\n"
- "LCCN;;;Y YT;;;Library of Congress Control Number.;;Identifier\n"
- "CatalogNumber;;;Y YT;;;A label-specific catalogue number used to identify the release. e.g. TIC 01.;;Identifier\n"
- "LabelCode;;;Y YT;;;A 4-digit or 5-digit number to identify the record label, typically printed as (LC) xxxx or (LC) 0xxxx on CDs medias or covers, with only the number being stored.;;Identifier\n"
- "Owner;;;Y YT;;;Owner of the file;;Legal\n"
- "Copyright;;;Y YT;;;Copyright attribution.;;Legal\n"
- "Copyright/Url;;;Y YT;;;Link to a site with copyright/legal information.;;Legal\n"
- "Producer_Copyright;;;Y YT;;;The copyright information as per the productioncopyright holder.;;Legal\n"
- "TermsOfUse;;;Y YT;;;License information, e.g., All Rights Reserved,Any Use Permitted.;;Legal\n"
- "ServiceName;;;Y YT;;;;;Legal\n"
- "ServiceChannel;;;Y YT;;;;;Legal\n"
- "Service/Url;;;Y YT;;;;;Legal\n"
- "ServiceProvider;;;Y YT;;;;;Legal\n"
- "ServiceProviderr/Url;;;Y YT;;;;;Legal\n"
- "ServiceType;;;Y YT;;;;;Legal\n"
- "NetworkName;;;Y YT;;;;;Legal\n"
- "OriginalNetworkName;;;Y YT;;;;;Legal\n"
- "Country;;;Y YT;;;;;Legal\n"
- "TimeZone;;;Y YT;;;;;Legal\n"
- "Cover;;;Y YT;;;Is there a cover;;Info\n"
- "Cover_Description;;;Y YT;;;short descriptio, e.g. Earth in space;;Info\n"
- "Cover_Type;;;Y YT;;;;;Info\n"
- "Cover_Mime;;;Y YT;;;;;Info\n"
- "Cover_Data;;;N YT;;;Cover, in binary format encoded BASE64;;Info\n"
- "Lyrics;;;Y YT;;;Text of a song;;Info\n"
- "Comment;;;Y YT;;;Any comment related to the content.;;Personal\n"
- "Rating;;;Y YT;;;A numeric value defining how much a person likes the song/movie. The number is between 0 and 5 with decimal values possible (e.g. 2.7), 5(.0) being the highest possible rating.;;Personal\n"
- "Added_Date;;;Y YT;;;Date/year the item was added to the owners collection;;Personal\n"
- "Played_First_Date;;;Y YT;;;The date, the owner first played an item;;Personal\n"
- "Played_Last_Date;;;Y YT;;;The date, the owner last played an item;;Personal\n"
- "Played_Count;;;Y YI;;;Number of times an item was played;;Personal\n"
- "EPG_Positions_Begin;;;N YI;;;;\n"
- "EPG_Positions_End;;;N YI;;;;\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Video (ZtringListList &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "Count;;;N NI;;;Count of objects available in this stream\n"
- "Status;;;N NI;;;bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)\n"
- "StreamCount;;;N NI;;;Count of streams of that kind available\n"
- "StreamKind;Video;;N NT;;;Stream type name\n"
- "StreamKind/String;;;N NT;;;Stream type name\n"
- "StreamKindID;;;N NI;;;Number of the stream (base=0)\n"
- "StreamKindPos;;;N NI;;;When multiple streams, number of the stream (base=1)\n"
- "StreamOrder;;;N YI;;;Stream order in the file, whatever is the kind of stream (base=0)\n"
- "FirstPacketOrder;;;N YI;;;Order of the first fully decodable packet met in the file, whatever is the kind of stream (base=0)\n"
- "Inform;;;N NT;;;Last **Inform** call\n"
- "ID;;;N YI;;;The ID for this stream in this file\n"
- "ID/String;;;Y NT;;;The ID for this stream in this file\n"
- "UniqueID;;;N YI;;;The unique ID for this stream, should be copied with stream copy\n"
- "UniqueID/String;;;Y NT;;;The unique ID for this stream, should be copied with stream copy\n"
- "MenuID;;;N YI;;;The menu ID for this stream in this file\n"
- "MenuID/String;;;Y NT;;;The menu ID for this stream in this file\n"
- "Format;;;Y YT;;;Format used\n"
- "Format/Info;;;Y NT;;;Info about Format\n"
- "Format/Url;;;N NT;;;Link\n"
- "Format_Commercial;;;N NT;;;Commercial name used by vendor for theses setings or Format field if there is no difference\n"
- "Format_Commercial_IfAny;;;Y YT;;;Commercial name used by vendor for theses setings if there is one\n"
- "Format_Version;;;Y YT;;;Version of this format\n"
- "Format_Profile;;;Y YT;;;Profile of the Format\n"
- "Format_Compression;;;N YT;;;Compression mode of the Format\n"
- "MultiView_BaseProfile;;;Y YT;;;Multiview, profile of the base stream\n"
- "MultiView_Count;;;Y YT;;;Multiview, count of views\n"
- "MultiView_Layout;;;Y YT;;;Multiview, how views are muxed in the container in case of it is not muxing in the stream\n"
- "Format_Settings;;;N YT;;;Settings needed for decoder used, summary\n"
- "Format_Settings_BVOP;;Yes;N YT;;;Settings needed for decoder used, detailled\n"
- "Format_Settings_BVOP/String;;;Y NT;;;Settings needed for decoder used, detailled\n"
- "Format_Settings_QPel;;Yes;N YT;;;Settings needed for decoder used, detailled\n"
- "Format_Settings_QPel/String;;;Y NT;;;Settings needed for decoder used, detailled\n"
- "Format_Settings_GMC;; warppoint;N YI;;;Settings needed for decoder used, detailled\n"
- "Format_Settings_GMC/String;;;Y NT;;\n"
- "Format_Settings_Matrix;;;N YT;;;Settings needed for decoder used, detailled\n"
- "Format_Settings_Matrix/String;;;Y NT;;;Settings needed for decoder used, detailled\n"
- "Format_Settings_Matrix_Data;;;N NT;;;Matrix, in binary format encoded BASE64. Order = intra, non-intra, gray intra, gray non-intra\n"
- "Format_Settings_CABAC;;Yes;N YT;;;Settings needed for decoder used, detailled\n"
- "Format_Settings_CABAC/String;;;Y NT;;;Settings needed for decoder used, detailled\n"
- "Format_Settings_RefFrames;; frame;N YI;;;Settings needed for decoder used, detailled\n"
- "Format_Settings_RefFrames/String;;;Y NT;;;Settings needed for decoder used, detailled\n"
- "Format_Settings_Pulldown;;;Y YT;;;Settings needed for decoder used, detailled\n"
- "Format_Settings_FrameMode;;;Y YT;;;Settings needed for decoder used, detailled\n"
- "Format_Settings_GOP;;;Y YT;;;Settings needed for decoder used, detailled (M=x N=y)\n"
- "Format_Settings_PictureStructure;;;Y YT;;;Settings needed for decoder used, detailled (Type of frame, and field/frame info)\n"
- "Format_Settings_Wrapping;;;Y YT;;;Wrapping mode (Frame wrapped or Clip wrapped)\n"
- "InternetMediaType;;;N YT;;;Internet Media Type (aka MIME Type, Content-Type)\n"
- "MuxingMode;;;Y YT;;;How this file is muxed in the container\n"
- "CodecID;;;Y YT;;;Codec ID (found in some containers);\n"
- "CodecID/String;;;Y NT;;;Codec ID (found in some containers);\n"
- "CodecID/Info;;;Y NT;;;Info on the codec\n"
- "CodecID/Hint;;;Y NT;;;Hint/popular name for this codec\n"
- "CodecID/Url;;;N NT;;;Homepage for more details about this codec\n"
- "CodecID_Description;;;Y YT;;;Manual description given by the container\n"
- "Codec;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec/String;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec/Family;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec/Info;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec/Url;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec/CC;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Profile;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Description;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Settings;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Settings_PacketBitStream;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Settings_BVOP;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Settings_QPel;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Settings_GMC;; warppoint;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Settings_GMC/String;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Settings_Matrix;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Settings_Matrix_Data;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Settings_CABAC;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec_Settings_RefFrames;;;N NT;;;Deprecated, do not use in new projects\n"
- "Duration;; ms;N YI;;;Play time of the stream in ms\n"
- "Duration/String;;;Y NT;;;Play time in format : XXx YYy only, YYy omited if zero\n"
- "Duration/String1;;;N NT;;;Play time in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Duration/String2;;;N NT;;;Play time in format : XXx YYy only, YYy omited if zero\n"
- "Duration/String3;;;N NT;;;Play time in format : HH:MM:SS.MMM\n"
- "Duration/String4;;;N NT;;;Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Duration/String5;;;N NT;;;Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Duration_FirstFrame;; ms;N YI;;;Duration of the first frame if it is longer than others, in ms\n"
- "Duration_FirstFrame/String;;;Y NT;;;Duration of the first frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Duration_FirstFrame/String1;;;N NT;;;Duration of the first frame if it is longer than others, in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Duration_FirstFrame/String2;;;N NT;;;Duration of the first frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Duration_FirstFrame/String3;;;N NT;;;Duration of the first frame if it is longer than others, in format : HH:MM:SS.MMM\n"
- "Duration_FirstFrame/String4;;;N NT;;;Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Duration_FirstFrame/String5;;;N NT;;;Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Duration_LastFrame;; ms;N YI;;;Duration of the last frame if it is longer than others, in ms\n"
- "Duration_LastFrame/String;;;Y NT;;;Duration of the last frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Duration_LastFrame/String1;;;N NT;;;Duration of the last frame if it is longer than others, in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Duration_LastFrame/String2;;;N NT;;;Duration of the last frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Duration_LastFrame/String3;;;N NT;;;Duration of the last frame if it is longer than others, in format : HH:MM:SS.MMM\n"
- "Duration_LastFrame/String4;;;N NT;;;Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Duration_LastFrame/String5;;;N NT;;;Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Source_Duration;; ms;N YI;;;Source Play time of the stream, in ms;\n"
- "Source_Duration/String;;;Y NT;;;Source Play time in format : XXx YYy only, YYy omited if zero;\n"
- "Source_Duration/String1;;;N NT;;;Source Play time in format : HHh MMmn SSs MMMms, XX omited if zero;\n"
- "Source_Duration/String2;;;N NT;;;Source Play time in format : XXx YYy only, YYy omited if zero;\n"
- "Source_Duration/String3;;;N NT;;;Source Play time in format : HH:MM:SS.MMM;\n"
- "Source_Duration/String4;;;N NT;;;Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Source_Duration/String5;;;N NT;;;Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Source_Duration_FirstFrame;; ms;N YI;;;Source Duration of the first frame if it is longer than others, in ms\n"
- "Source_Duration_FirstFrame/String;;;Y NT;;;Source Duration of the first frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Source_Duration_FirstFrame/String1;;;N NT;;;Source Duration of the first frame if it is longer than others, in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Source_Duration_FirstFrame/String2;;;N NT;;;Source Duration of the first frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Source_Duration_FirstFrame/String3;;;N NT;;;Source Duration of the first frame if it is longer than others, in format : HH:MM:SS.MMM\n"
- "Source_Duration_FirstFrame/String4;;;N NT;;;Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Source_Duration_FirstFrame/String5;;;N NT;;;Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Source_Duration_LastFrame;; ms;N YI;;;Source Duration of the last frame if it is longer than others, in ms\n"
- "Source_Duration_LastFrame/String;;;Y NT;;;Source Duration of the last frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Source_Duration_LastFrame/String1;;;N NT;;;Source Duration of the last frame if it is longer than others, in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Source_Duration_LastFrame/String2;;;N NT;;;Source Duration of the last frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Source_Duration_LastFrame/String3;;;N NT;;;Source Duration of the last frame if it is longer than others, in format : HH:MM:SS.MMM\n"
- "Source_Duration_LastFrame/String4;;;N NT;;;Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Source_Duration_LastFrame/String5;;;N NT;;;Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "BitRate_Mode;;;N YT;;;Bit rate mode (VBR, CBR)\n"
- "BitRate_Mode/String;;;Y NT;;;Bit rate mode (Variable, Cconstant)\n"
- "BitRate;; bps;N YF;;;Bit rate in bps\n"
- "BitRate/String;;;Y NT;;;Bit rate (with measurement)\n"
- "BitRate_Minimum;; bps;N YF;;;Minimum Bit rate in bps\n"
- "BitRate_Minimum/String;;;Y NT;;;Minimum Bit rate (with measurement)\n"
- "BitRate_Nominal;; bps;N YF;;;Nominal Bit rate in bps\n"
- "BitRate_Nominal/String;;;Y NT;;;Nominal Bit rate (with measurement)\n"
- "BitRate_Maximum;; bps;N YF;;;Maximum Bit rate in bps\n"
- "BitRate_Maximum/String;;;Y NT;;;Maximum Bit rate (with measurement)\n"
- "BitRate_Encoded;; bps;N YF;;;Encoded (with forced padding) bit rate in bps, if some container padding is present\n"
- "BitRate_Encoded/String;;;Y NT;;;Encoded (with forced padding) bit rate (with measurement), if some container padding is present\n"
- "Width;; pixel;N YI;;;Width (aperture size if present) in pixel\n"
- "Width/String;;;Y NT;;;Width (aperture size if present) with measurement (pixel)\n"
- "Width_Offset;; pixel;N YI;;;Offset between original width and displayed width in pixel\n"
- "Width_Offset/String;;;N NT;;;Offset between original width and displayed width in pixel\n"
- "Width_Original;; pixel;N YI;;;Original (in the raw stream) width in pixel\n"
- "Width_Original/String;;;Y NT;;;Original (in the raw stream) width with measurement (pixel)\n"
- "Width_CleanAperture;; pixel;N YI;;;Clean Aperture width in pixel\n"
- "Width_CleanAperture/String;;;Y NT;;;Clean Aperture width with measurement (pixel)\n"
- "Height;; pixel;N YI;;;Height in pixel\n"
- "Height/String;;;Y NT;;;Height with measurement (pixel)\n"
- "Height_Offset;; pixel;N YI;;;Offset between original height and displayed height in pixel\n"
- "Height_Offset/String;;;N NT;;;Offset between original height and displayed height in pixel\n"
- "Height_Original;; pixel;N YI;;;Original (in the raw stream) height in pixel\n"
- "Height_Original/String;;;Y NT;;;Original (in the raw stream) height with measurement (pixel)\n"
- "Height_CleanAperture;; pixel;N YI;;;Clean Aperture height in pixel\n"
- "Height_CleanAperture/String;;;Y NT;;;Clean Aperture height with measurement (pixel)\n"
- "PixelAspectRatio;;;N YF;;;Pixel Aspect ratio\n"
- "PixelAspectRatio/String;;;N NT;;;Pixel Aspect ratio\n"
- "PixelAspectRatio_Original;;;N YF;;;Original (in the raw stream) Pixel Aspect ratio\n"
- "PixelAspectRatio_Original/String;;;N NT;;;Original (in the raw stream) Pixel Aspect ratio\n"
- "PixelAspectRatio_CleanAperture;;;N YF;;;Clean Aperture Pixel Aspect ratio\n"
- "PixelAspectRatio_CleanAperture/String;;;N NT;;;Clean Aperture Pixel Aspect ratio\n"
- "DisplayAspectRatio;;;N YF;;;Display Aspect ratio\n"
- "DisplayAspectRatio/String;;;Y NT;;;Display Aspect ratio\n"
- "DisplayAspectRatio_Original;;;N YF;;;Original (in the raw stream) Display Aspect ratio\n"
- "DisplayAspectRatio_Original/String;;;Y NT;;;Original (in the raw stream) Display Aspect ratio\n"
- "DisplayAspectRatio_CleanAperture;;;N YF;;;Clean Aperture Display Aspect ratio\n"
- "DisplayAspectRatio_CleanAperture/String;;;Y NT;;;Clean Aperture Display Aspect ratio\n"
- "ActiveFormatDescription;;;N YN;;;Active Format Description (AFD value)\n"
- "ActiveFormatDescription/String;;;Y NT;;;Active Format Description (text)\n"
- "ActiveFormatDescription_MuxingMode;;;N YT;;;Active Format Description (AFD value) muxing mode (Ancillary or Raw stream)\n"
- "Rotation;;;N YT;;;Rotation\n"
- "Rotation/String;;;Y NT;;;Rotation (if not horizontal)\n"
- "FrameRate_Mode;;;N YT;;;Frame rate mode (CFR, VFR)\n"
- "FrameRate_Mode/String;;;Y NT;;;Frame rate mode (Constant, Variable)\n"
- "FrameRate_Mode_Original;;;N YT;;;Original frame rate mode (CFR, VFR)\n"
- "FrameRate_Mode_Original/String;;;Y NT;;;Original frame rate mode (Constant, Variable)\n"
- "FrameRate;; fps;N YF;;;Frames per second\n"
- "FrameRate/String;;;Y NT;;;Frames per second (with measurement)\n"
- "FrameRate_Original;; fps;N YF;;;Original (in the raw stream) frames per second\n"
- "FrameRate_Original/String;;;Y NT;;;Original (in the raw stream) frames per second (with measurement)\n"
- "FrameRate_Minimum;; fps;N YF;;;Minimum Frames per second\n"
- "FrameRate_Minimum/String;;;Y NT;;;Minimum Frames per second (with measurement)\n"
- "FrameRate_Nominal;; fps;N YF;;;Nominal Frames per second\n"
- "FrameRate_Nominal/String;;;Y NT;;;Nominal Frames per second (with measurement)\n"
- "FrameRate_Maximum;; fps;N YF;;;Maximum Frames per second\n"
- "FrameRate_Maximum/String;;;Y NT;;;Maximum Frames per second (with measurement)\n"
- "FrameCount;;;N NI;;;Number of frames\n"
- "Source_FrameCount;;;N NI;;;Source Number of frames\n"
- "Standard;;;Y NT;;;NTSC or PAL\n"
- "Resolution;; bit;N NI;;;Deprecated, do not use in new projects\n"
- "Resolution/String;;;N NT;;;Deprecated, do not use in new projects\n"
- "Colorimetry;;;N NT;;;Deprecated, do not use in new projects\n"
- "ColorSpace;;;Y YT;;\n"
- "ChromaSubsampling;;;Y YT;;\n"
- "BitDepth;; bit;N YI;;;16/24/32\n"
- "BitDepth/String;;;Y NT;;;16/24/32 bits\n"
- "ScanType;;;N YT;;\n"
- "ScanType/String;;;Y NT;;\n"
- "ScanType_Original;;;N YT;;\n"
- "ScanType_Original/String;;;Y NT;;\n"
- "ScanType_StoreMethod;;;N YT;;;;Separated fields or Interleaved fields\n"
- "ScanType_StoreMethod_FieldsPerBlock;;;N YT;;;;Count of fields per container block\n"
- "ScanType_StoreMethod/String;;;Y NT;;;;Separated fields or Interleaved fields\n"
- "ScanOrder;;;N YT;;;\n"
- "ScanOrder/String;;;Y NT;;;\n"
- "ScanOrder_Stored;;;N YT;;;;In case the stored order is not same as the display order\n"
- "ScanOrder_Stored/String;;;Y NT;;;;In case the stored order is not same as the display order\n"
- "ScanOrder_StoredDisplayedInverted;;;N NT;;;\n"
- "ScanOrder_Original;;;N YT;;;\n"
- "ScanOrder_Original/String;;;Y NT;;;\n"
- "Interlacement;;;N NT;;;Deprecated, do not use in new projects\n"
- "Interlacement/String;;;N NT;;;Deprecated, do not use in new projects\n"
- "Compression_Mode;;;N YT;;;Compression mode (Lossy or Lossless)\n"
- "Compression_Mode/String;;;Y NT;;;Compression mode (Lossy or Lossless)\n"
- "Compression_Ratio;;;Y YF;;;Current stream size divided by uncompressed stream size;\n"
- "Bits-(Pixel*Frame);;;Y NF;;;bits/(Pixel*Frame) (like Gordian Knot)\n"
- "Delay;; ms;N NI;;;Delay fixed in the stream (relative) IN MS\n"
- "Delay/String;;;N NT;;;Delay with measurement\n"
- "Delay/String1;;;N NT;;;Delay with measurement\n"
- "Delay/String2;;;N NT;;;Delay with measurement\n"
- "Delay/String3;;;N NT;;;Delay in format : HH:MM:SS.MMM\n"
- "Delay/String4;;;N NT;;;Delay in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Delay/String5;;;N NT;;;Delay in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Delay_Settings;;;N NT;;;Delay settings (in case of timecode for example)\n"
- "Delay_DropFrame;;;N NT;;;Delay drop frame\n"
- "Delay_Source;;;N NT;;;Delay source (Container or Stream or empty)\n"
- "Delay_Source/String;;;N NT;;;Delay source (Container or Stream or empty)\n"
- "Delay_Original;; ms;N NI;;;Delay fixed in the raw stream (relative) IN MS\n"
- "Delay_Original/String;;;N NT;;;Delay with measurement\n"
- "Delay_Original/String1;;;N NT;;;Delay with measurement\n"
- "Delay_Original/String2;;;N NT;;;Delay with measurement\n"
- "Delay_Original/String3;;;N NT;;;Delay in format: HH:MM:SS.MMM;\n"
- "Delay_Original/String4;;;N NT;;;Delay in format: HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Delay_Original/String5;;;N NT;;;Delay in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Delay_Original_Settings;;;N NT;;;Delay settings (in case of timecode for example);\n"
- "Delay_Original_DropFrame;;;N NT;;;Delay drop frame info\n"
- "Delay_Original_Source;;;N NT;;;Delay source (Stream or empty)\n"
- "TimeStamp_FirstFrame;; ms;N YI;;;TimeStamp fixed in the stream (relative) IN MS\n"
- "TimeStamp_FirstFrame/String;;;Y NT;;;TimeStamp with measurement\n"
- "TimeStamp_FirstFrame/String1;;;N NT;;;TimeStamp with measurement\n"
- "TimeStamp_FirstFrame/String2;;;N NT;;;TimeStamp with measurement\n"
- "TimeStamp_FirstFrame/String3;;;N NT;;;TimeStamp in format : HH:MM:SS.MMM\n"
- "TimeStamp_FirstFrame/String4;;;N NT;;;TimeStamp in format: HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "TimeStamp_FirstFrame/String5;;;N NT;;;TimeStamp in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "TimeCode_FirstFrame;;;Y YC;;;Time code in HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available format\n"
- "TimeCode_Settings;;;Y YT;;;Time code settings\n"
- "TimeCode_Source;;;Y YT;;;Time code source (Container, Stream, SystemScheme1, SDTI, ANC...)\n"
- "Gop_OpenClosed;; ;N YT;;;Time code information about Open/Closed\n"
- "Gop_OpenClosed/String;;;Y NT;;;Time code information about Open/Closed\n"
- "Gop_OpenClosed_FirstFrame;; ;N YT;;;Time code information about Open/Closed of first frame if GOP is Open for the other GOPs\n"
- "Gop_OpenClosed_FirstFrame/String;;;Y NT;;;Time code information about Open/Closed of first frame if GOP is Open for the other GOPs\n"
- "StreamSize;; byte;N YI;;;Streamsize in bytes;\n"
- "StreamSize/String;;;Y NT;;;Streamsize in with percentage value;\n"
- "StreamSize/String1;;;N NT;;;;\n"
- "StreamSize/String2;;;N NT;;;;\n"
- "StreamSize/String3;;;N NT;;;;\n"
- "StreamSize/String4;;;N NT;;;;\n"
- "StreamSize/String5;;;N NT;;;Streamsize in with percentage value;\n"
- "StreamSize_Proportion;;;N NT;;;Stream size divided by file size;\n"
- "Source_StreamSize;; byte;N YI;;;Source Streamsize in bytes;\n"
- "Source_StreamSize/String;;;Y NT;;;Source Streamsize in with percentage value;\n"
- "Source_StreamSize/String1;;;N NT;;;;\n"
- "Source_StreamSize/String2;;;N NT;;;;\n"
- "Source_StreamSize/String3;;;N NT;;;;\n"
- "Source_StreamSize/String4;;;N NT;;;;\n"
- "Source_StreamSize/String5;;;N NT;;;Source Streamsize in with percentage value;\n"
- "Source_StreamSize_Proportion;;;N NT;;;Source Stream size divided by file size;\n"
- "StreamSize_Encoded;; byte;N YI;;;Encoded Streamsize in bytes;\n"
- "StreamSize_Encoded/String;;;Y NT;;;Encoded Streamsize in with percentage value;\n"
- "StreamSize_Encoded/String1;;;N NT;;;;\n"
- "StreamSize_Encoded/String2;;;N NT;;;;\n"
- "StreamSize_Encoded/String3;;;N NT;;;;\n"
- "StreamSize_Encoded/String4;;;N NT;;;;\n"
- "StreamSize_Encoded/String5;;;N NT;;;Encoded Streamsize in with percentage value;\n"
- "StreamSize_Encoded_Proportion;;;N NT;;;Encoded Stream size divided by file size;\n"
- "Source_StreamSize_Encoded;; byte;N YI;;;Source Encoded Streamsize in bytes;\n"
- "Source_StreamSize_Encoded/String;;;Y NT;;;Source Encoded Streamsize in with percentage value;\n"
- "Source_StreamSize_Encoded/String1;;;N NT;;;;\n"
- "Source_StreamSize_Encoded/String2;;;N NT;;;;\n"
- "Source_StreamSize_Encoded/String3;;;N NT;;;;\n"
- "Source_StreamSize_Encoded/String4;;;N NT;;;;\n"
- "Source_StreamSize_Encoded/String5;;;N NT;;;Source Encoded Streamsize in with percentage value;\n"
- "Source_StreamSize_Encoded_Proportion;;;N NT;;;Source Encoded Stream size divided by file size;\n"
- "Alignment;;;Y NT;;;How this stream file is aligned in the container;\n"
- "Alignment/String;;;N YT;;;;\n"
- "Title;;;Y YI;;;Name of the track;\n"
- "Encoded_Application;;;N YT;;;Name of the software package used to create the file, such as Microsoft WaveEdit;;Technical\n"
- "Encoded_Application/String;;;Y NT;;;Name of the software package used to create the file, such as Microsoft WaveEdit, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)';;Technical\n"
- "Encoded_Application_CompanyName;;;N YT;;;Name of the company;;Technical\n"
- "Encoded_Application_Name;;;N YT;;;Name of the product;;Technical\n"
- "Encoded_Application_Version;;;N YT;;;Version of the product;;Technical\n"
- "Encoded_Application_Url;;;N YT;;;Name of the software package used to create the file, such as Microsoft WaveEdit.;;Technical\n"
- "Encoded_Library;;;N YT;;;Software used to create the file;;Technical\n"
- "Encoded_Library/String;;;Y NT;;;Software used to create the file, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)';;Technical\n"
- "Encoded_Library_CompanyName;;;N YT;;;Name of the company;;Technical\n"
- "Encoded_Library_Name;;;N NT;;;Name of the the encoding-software;;Technical\n"
- "Encoded_Library_Version;;;N NT;;;Version of encoding-software;;Technical\n"
- "Encoded_Library_Date;;;N NT;;;Release date of software;;Technical\n"
- "Encoded_Library_Settings;;;Y YT;;;Parameters used by the software;;Technical\n"
- "Encoded_OperatingSystem;;;N YT;;;Operating System of encoding-software;;Technical\n"
- "Language;;;N YT;;;Language (2-letter ISO 639-1 if exists, else 3-letter ISO 639-2, and with optional ISO 3166-1 country separated by a dash if available, e.g. en, en-us, zh-cn);\n"
- "Language/String;;;Y NT;;;Language (full);\n"
- "Language/String1;;;N NT;;;Language (full);\n"
- "Language/String2;;;N NT;;;Language (2-letter ISO 639-1 if exists, else empty);\n"
- "Language/String3;;;N NT;;;Language (3-letter ISO 639-2 if exists, else empty);\n"
- "Language/String4;;;N NT;;;Language (2-letter ISO 639-1 if exists with optional ISO 3166-1 country separated by a dash if available, e.g. en, en-us, zh-cn, else empty);\n"
- "Language_More;;;Y YT;;;More info about Language (e.g. Director's Comment);\n"
- "Default;;Yes;N YT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Default/String;;;Y NT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Forced;;Yes;N YT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Forced/String;;;Y NT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Encoded_Date;;;Y YT;;;UTC time that the encoding of this item was completed began.;;Temporal\n"
- "Tagged_Date;;;Y YT;;;UTC time that the tags were done for this item.;;Temporal\n"
- "Encryption;;;Y YT;;;;\n"
- "BufferSize;;;N YT;;;Defines the size of the buffer needed to decode the sequence.\n"
- "colour_range;;;Y YT;;;Colour range for YUV colour space\n"
- "colour_description_present;;;N YT;;;Presence of colour description\n"
- "colour_primaries;;;Y YT;;;Chromaticity coordinates of the source primaries\n"
- "transfer_characteristics;;;Y YT;;;Opto-electronic transfer characteristic of the source picture\n"
- "matrix_coefficients;;;Y YT;;;Matrix coefficients used in deriving luma and chroma signals from the green, blue, and red primaries\n"
- "colour_description_present_Original;;;N YT;;;Presence of colour description\n"
- "colour_primaries_Original;;;Y YT;;;Chromaticity coordinates of the source primaries\n"
- "transfer_characteristics_Original;;;Y YT;;;Opto-electronic transfer characteristic of the source picture\n"
- "matrix_coefficients_Original;;;Y YT;;;Matrix coefficients used in deriving luma and chroma signals from the green, blue, and red primaries\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Audio (ZtringListList &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "Count;;;N NI;;;Count of objects available in this stream\n"
- "Status;;;N NI;;;bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)\n"
- "StreamCount;;;N NI;;;Count of streams of that kind available\n"
- "StreamKind;Audio;;N NT;;;Stream type name;\n"
- "StreamKind/String;;;N NT;;;Stream type name\n"
- "StreamKindID;;;N NI;;;Number of the stream (base=0)\n"
- "StreamKindPos;;;N NI;;;When multiple streams, number of the stream (base=1)\n"
- "StreamOrder;;;N YI;;;Stream order in the file, whatever is the kind of stream (base=0)\n"
- "FirstPacketOrder;;;N YI;;;Order of the first fully decodable packet met in the file, whatever is the kind of stream (base=0)\n"
- "Inform;;;N NT;;;Last **Inform** call\n"
- "ID;;;N YI;;;The ID for this stream in this file\n"
- "ID/String;;;Y NT;;;The ID for this stream in this file\n"
- "UniqueID;;;N YI;;;The unique ID for this stream, should be copied with stream copy\n"
- "UniqueID/String;;;Y NT;;;The unique ID for this stream, should be copied with stream copy\n"
- "MenuID;;;N YI;;;The menu ID for this stream in this file\n"
- "MenuID/String;;;Y NT;;;The menu ID for this stream in this file\n"
- "Format;;;Y YT;;;Format used;\n"
- "Format/Info;;;Y NT;;;Info about the format;\n"
- "Format/Url;;;N NT;;;Homepage of this format;\n"
- "Format_Commercial;;;N YT;;;Commercial name used by vendor for theses setings or Format field if there is no difference;\n"
- "Format_Commercial_IfAny;;;Y YT;;;Commercial name used by vendor for theses setings if there is one;\n"
- "Format_Version;;;Y YT;;;Version of this format;\n"
- "Format_Profile;;;Y YT;;;Profile of this Format;\n"
- "Format_Compression;;;Y YT;;;Compression method used;\n"
- "Format_Settings;;;N YT;;;Settings needed for decoder used, summary;\n"
- "Format_Settings_SBR;;Yes;N YT;;;;\n"
- "Format_Settings_SBR/String;;;N NT;;;;\n"
- "Format_Settings_PS;;Yes;N YT;;;;\n"
- "Format_Settings_PS/String;;;N NT;;;;\n"
- "Format_Settings_Mode;;;Y YT;;;;\n"
- "Format_Settings_ModeExtension;;;Y YT;;;;\n"
- "Format_Settings_Emphasis;;;Y YT;;;;\n"
- "Format_Settings_Floor;;;Y YT;;;;\n"
- "Format_Settings_Firm;;;Y YT;;;;\n"
- "Format_Settings_Endianness;;;Y YT;;;;\n"
- "Format_Settings_Sign;;;Y YT;;;;\n"
- "Format_Settings_Law;;;Y YT;;;;\n"
- "Format_Settings_ITU;;;Y YT;;;;\n"
- "Format_Settings_Wrapping;;;Y YT;;;Wrapping mode (Frame wrapped or Clip wrapped)\n"
- "Matrix_Format;;;Y YI;;;Matrix format (e.g. DTS Neural);\n"
- "InternetMediaType;;;N YT;;;Internet Media Type (aka MIME Type, Content-Type);\n"
- "MuxingMode;;;Y YT;;;How this stream is muxed in the container;\n"
- "MuxingMode_MoreInfo;;;Y NT;;;More info (text) about the muxing mode;\n"
- "CodecID;;;Y YT;;;Codec ID (found in some containers);\n"
- "CodecID/String;;;Y NT;;;Codec ID (found in some containers);\n"
- "CodecID/Info;;;Y NT;;;Info about codec ID;\n"
- "CodecID/Hint;;;Y NT;;;Hint/popular name for this codec ID;\n"
- "CodecID/Url;;;N NT;;;Homepage for more details about this codec ID;\n"
- "CodecID_Description;;;Y YT;;;Manual description given by the container;\n"
- "Codec;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec/String;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec/Family;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec/Info;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec/Url;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec/CC;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec_Description;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec_Profile;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec_Settings;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec_Settings_Automatic;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec_Settings_Floor;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec_Settings_Firm;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec_Settings_Endianness;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec_Settings_Sign;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec_Settings_Law;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Codec_Settings_ITU;;;N NT;;;Deprecated, do not use in new projects;\n"
- "Duration;; ms;N YI;;;Play time of the stream, in ms;\n"
- "Duration/String;;;Y NT;;;Play time in format : XXx YYy only, YYy omited if zero;\n"
- "Duration/String1;;;N NT;;;Play time in format : HHh MMmn SSs MMMms, XX omited if zero;\n"
- "Duration/String2;;;N NT;;;Play time in format : XXx YYy only, YYy omited if zero;\n"
- "Duration/String3;;;N NT;;;Play time in format : HH:MM:SS.MMM;\n"
- "Duration/String4;;;N NT;;;Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Duration/String5;;;N NT;;;Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Duration_FirstFrame;; ms;N YI;;;Duration of the first frame if it is longer than others, in ms\n"
- "Duration_FirstFrame/String;;;Y NT;;;Duration of the first frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Duration_FirstFrame/String1;;;N NT;;;Duration of the first frame if it is longer than others, in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Duration_FirstFrame/String2;;;N NT;;;Duration of the first frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Duration_FirstFrame/String3;;;N NT;;;Duration of the first frame if it is longer than others, in format : HH:MM:SS.MMM\n"
- "Duration_FirstFrame/String4;;;N NT;;;Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Duration_FirstFrame/String5;;;N NT;;;Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Duration_LastFrame;; ms;N YI;;;Duration of the last frame if it is longer than others, in ms\n"
- "Duration_LastFrame/String;;;Y NT;;;Duration of the last frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Duration_LastFrame/String1;;;N NT;;;Duration of the last frame if it is longer than others, in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Duration_LastFrame/String2;;;N NT;;;Duration of the last frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Duration_LastFrame/String3;;;N NT;;;Duration of the last frame if it is longer than others, in format : HH:MM:SS.MMM\n"
- "Duration_LastFrame/String4;;;N NT;;;Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Duration_LastFrame/String5;;;N NT;;;Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Source_Duration;; ms;N YI;;;Source Play time of the stream, in ms;\n"
- "Source_Duration/String;;;Y NT;;;Source Play time in format : XXx YYy only, YYy omited if zero;\n"
- "Source_Duration/String1;;;N NT;;;Source Play time in format : HHh MMmn SSs MMMms, XX omited if zero;\n"
- "Source_Duration/String2;;;N NT;;;Source Play time in format : XXx YYy only, YYy omited if zero;\n"
- "Source_Duration/String3;;;N NT;;;Source Play time in format : HH:MM:SS.MMM;\n"
- "Source_Duration/String4;;;N NT;;;Source Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Source_Duration/String5;;;N NT;;;Source Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Source_Duration_FirstFrame;; ms;N YI;;;Source Duration of the first frame if it is longer than others, in ms\n"
- "Source_Duration_FirstFrame/String;;;Y NT;;;Source Duration of the first frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Source_Duration_FirstFrame/String1;;;N NT;;;Source Duration of the first frame if it is longer than others, in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Source_Duration_FirstFrame/String2;;;N NT;;;Source Duration of the first frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Source_Duration_FirstFrame/String3;;;N NT;;;Source Duration of the first frame if it is longer than others, in format : HH:MM:SS.MMM\n"
- "Source_Duration_FirstFrame/String4;;;N NT;;;Source Duration of the first frame if it is longer than others, in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Source_Duration_FirstFrame/String5;;;N NT;;;Source Duration of the first frame if it is longer than others, in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Source_Duration_LastFrame;; ms;N YI;;;Source Duration of the last frame if it is longer than others, in ms\n"
- "Source_Duration_LastFrame/String;;;Y NT;;;Source Duration of the last frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Source_Duration_LastFrame/String1;;;N NT;;;Source Duration of the last frame if it is longer than others, in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Source_Duration_LastFrame/String2;;;N NT;;;Source Duration of the last frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Source_Duration_LastFrame/String3;;;N NT;;;Source Duration of the last frame if it is longer than others, in format : HH:MM:SS.MMM\n"
- "Source_Duration_LastFrame/String4;;;N NT;;;Source Duration of the last frame if it is longer than others, in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Source_Duration_LastFrame/String5;;;N NT;;;Source Duration of the last frame if it is longer than others, in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "BitRate_Mode;;;N YT;;;Bit rate mode (VBR, CBR);\n"
- "BitRate_Mode/String;;;Y NT;;;Bit rate mode (Constant, Variable);\n"
- "BitRate;; bps;N YF;;;Bit rate in bps;\n"
- "BitRate/String;;;Y NT;;;Bit rate (with measurement);\n"
- "BitRate_Minimum;; bps;N YF;;;Minimum Bit rate in bps;\n"
- "BitRate_Minimum/String;;;Y NT;;;Minimum Bit rate (with measurement);\n"
- "BitRate_Nominal;; bps;N YF;;;Nominal Bit rate in bps;\n"
- "BitRate_Nominal/String;;;Y NT;;;Nominal Bit rate (with measurement);\n"
- "BitRate_Maximum;; bps;N YF;;;Maximum Bit rate in bps;\n"
- "BitRate_Maximum/String;;;Y NT;;;Maximum Bit rate (with measurement);\n"
- "BitRate_Encoded;; bps;N YF;;;Encoded (with forced padding) bit rate in bps, if some container padding is present\n"
- "BitRate_Encoded/String;;;Y NT;;;Encoded (with forced padding) bit rate (with measurement), if some container padding is present\n"
- "Channel(s);; channel;N YI;;;Number of channels;\n"
- "Channel(s)/String;;;Y NT;;;Number of channels (with measurement);\n"
- "Channel(s)_Original;; channel;N YI;;;Number of channels;\n"
- "Channel(s)_Original/String;;;Y NT;;;Number of channels (with measurement);\n"
- "Matrix_Channel(s);; channel;N YI;;;Number of channels after matrix decoding;\n"
- "Matrix_Channel(s)/String;;;Y NT;;;Number of channels after matrix decoding (with measurement);\n"
- "ChannelPositions;;;Y YT;;;Position of channels;\n"
- "ChannelPositions/String2;;;N NT;;;Position of channels (x/y.z format);\n"
- "Matrix_ChannelPositions;;;Y YT;;;Position of channels after matrix decoding;\n"
- "Matrix_ChannelPositions/String2;;;N NT;;;Position of channels after matrix decoding (x/y.z format);\n"
- "ChannelLayout;;;N YT;;;Layout of channels (in the stream);\n"
- "ChannelLayoutID;;;N YT;;;ID of layout of channels (e.g. MXF descriptor channel assignment). Warning, sometimes this is not enough for uniquely identifying a layout (e.g. MXF descriptor channel assignment is SMPTE 377-4). For AC-3, the form is x,y with x=acmod and y=lfeon.;\n"
- "SamplingRate;; Hz;N YF;;;Sampling rate;\n"
- "SamplingRate/String;;;Y NT;;;in KHz;\n"
- "SamplingCount;;;N NI;;;Sample count (based on sampling rate);\n"
- "Source_SamplingCount;;;N NI;;;Source Sample count (based on sampling rate);\n"
- "FrameRate;; fps;N YF;;;Frames per second\n"
- "FrameRate/String;;;N NT;;;Frames per second (with measurement)\n"
- "FrameCount;;;N NI;;;Frame count (a frame contains a count of samples depends of the format);\n"
- "Source_FrameCount;;;N NI;;;Source Frame count (a frame contains a count of samples depends of the format);\n"
- "Resolution;; bit;N NI;;;Deprecated, do not use in new projects;\n"
- "Resolution/String;;;N NT;;;Deprecated, do not use in new projects;\n"
- "BitDepth;; bit;N YI;;;Resolution in bits (8, 16, 20, 24). Note: significant bits in case the stored bit depth is different;\n"
- "BitDepth/String;;;Y NT;;;Resolution in bits (8, 16, 20, 24). Note: significant bits in case the stored bit depth is different;\n"
- "BitDepth_Stored;; bit;N YI;;;Stored Resolution in bits (8, 16, 20, 24);\n"
- "BitDepth_Stored/String;;;Y NT;;;Stored Resolution in bits (8, 16, 20, 24);\n"
- "Compression_Mode;;;N YT;;;Compression mode (Lossy or Lossless)\n"
- "Compression_Mode/String;;;Y NT;;;Compression mode (Lossy or Lossless)\n"
- "Compression_Ratio;;;Y YF;;;Current stream size divided by uncompressed stream size;\n"
- "Delay;; ms;N NI;;;Delay fixed in the stream (relative) IN MS\n"
- "Delay/String;;;N NT;;;Delay with measurement\n"
- "Delay/String1;;;N NT;;;Delay with measurement\n"
- "Delay/String2;;;N NT;;;Delay with measurement\n"
- "Delay/String3;;;N NT;;;Delay in format : HH:MM:SS.MMM\n"
- "Delay/String4;;;N NT;;;Delay in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Delay/String5;;;N NT;;;Delay in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Delay_Settings;;;N NT;;;Delay settings (in case of timecode for example)\n"
- "Delay_DropFrame;;;N NT;;;Delay drop frame\n"
- "Delay_Source;;;N NT;;;Delay source (Container or Stream or empty)\n"
- "Delay_Source/String;;;N NT;;;Delay source (Container or Stream or empty)\n"
- "Delay_Original;; ms;N NI;;;Delay fixed in the raw stream (relative) IN MS\n"
- "Delay_Original/String;;;N NT;;;Delay with measurement\n"
- "Delay_Original/String1;;;N NT;;;Delay with measurement\n"
- "Delay_Original/String2;;;N NT;;;Delay with measurement\n"
- "Delay_Original/String3;;;N NT;;;Delay in format: HH:MM:SS.MMM;\n"
- "Delay_Original/String4;;;N NT;;;Delay in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Delay_Original/String5;;;N NT;;;Delay in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Delay_Original_Settings;;;N NT;;;Delay settings (in case of timecode for example);\n"
- "Delay_Original_DropFrame;;;N NT;;;Delay drop frame info\n"
- "Delay_Original_Source;;;N NT;;;Delay source (Stream or empty)\n"
- "Video_Delay;; ms;N NI;;;Delay fixed in the stream (absolute / video)\n"
- "Video_Delay/String;;;Y NT;;\n"
- "Video_Delay/String1;;;N NT;;\n"
- "Video_Delay/String2;;;N NT;;\n"
- "Video_Delay/String3;;;N NT;;\n"
- "Video_Delay/String4;;;N NT;;\n"
- "Video_Delay/String5;;;N NT;;\n"
- "Video0_Delay;; ms;N NI;;;Deprecated, do not use in new projects\n"
- "Video0_Delay/String;;;N NT;;;Deprecated, do not use in new projects\n"
- "Video0_Delay/String1;;;N NT;;;Deprecated, do not use in new projects\n"
- "Video0_Delay/String2;;;N NT;;;Deprecated, do not use in new projects\n"
- "Video0_Delay/String3;;;N NT;;;Deprecated, do not use in new projects\n"
- "Video0_Delay/String4;;;N NT;;;Deprecated, do not use in new projects\n"
- "Video0_Delay/String5;;;N NT;;;Deprecated, do not use in new projects\n"
- "ReplayGain_Gain;; dB;N YT;;;The gain to apply to reach 89dB SPL on playback;\n"
- "ReplayGain_Gain/String;;;Y YT;;;;\n"
- "ReplayGain_Peak;;;Y YT;;;The maximum absolute peak value of the item;\n"
- "StreamSize;; byte;N YI;;;Streamsize in bytes;\n"
- "StreamSize/String;;;Y NT;;;Streamsize in with percentage value;\n"
- "StreamSize/String1;;;N NT;;;;\n"
- "StreamSize/String2;;;N NT;;;;\n"
- "StreamSize/String3;;;N NT;;;;\n"
- "StreamSize/String4;;;N NT;;;;\n"
- "StreamSize/String5;;;N NT;;;Streamsize in with percentage value;\n"
- "StreamSize_Proportion;;;N NT;;;Stream size divided by file size;\n"
- "Source_StreamSize;; byte;N YI;;;Source Streamsize in bytes;\n"
- "Source_StreamSize/String;;;Y NT;;;Source Streamsize in with percentage value;\n"
- "Source_StreamSize/String1;;;N NT;;;;\n"
- "Source_StreamSize/String2;;;N NT;;;;\n"
- "Source_StreamSize/String3;;;N NT;;;;\n"
- "Source_StreamSize/String4;;;N NT;;;;\n"
- "Source_StreamSize/String5;;;N NT;;;Source Streamsize in with percentage value;\n"
- "Source_StreamSize_Proportion;;;N NT;;;Source Stream size divided by file size;\n"
- "StreamSize_Encoded;; byte;N YI;;;Encoded Streamsize in bytes;\n"
- "StreamSize_Encoded/String;;;Y NT;;;Encoded Streamsize in with percentage value;\n"
- "StreamSize_Encoded/String1;;;N NT;;;;\n"
- "StreamSize_Encoded/String2;;;N NT;;;;\n"
- "StreamSize_Encoded/String3;;;N NT;;;;\n"
- "StreamSize_Encoded/String4;;;N NT;;;;\n"
- "StreamSize_Encoded/String5;;;N NT;;;Encoded Streamsize in with percentage value;\n"
- "StreamSize_Encoded_Proportion;;;N NT;;;Encoded Stream size divided by file size;\n"
- "Source_StreamSize_Encoded;; byte;N YI;;;Source Encoded Streamsize in bytes;\n"
- "Source_StreamSize_Encoded/String;;;Y NT;;;Source Encoded Streamsize in with percentage value;\n"
- "Source_StreamSize_Encoded/String1;;;N NT;;;;\n"
- "Source_StreamSize_Encoded/String2;;;N NT;;;;\n"
- "Source_StreamSize_Encoded/String3;;;N NT;;;;\n"
- "Source_StreamSize_Encoded/String4;;;N NT;;;;\n"
- "Source_StreamSize_Encoded/String5;;;N NT;;;Source Encoded Streamsize in with percentage value;\n"
- "Source_StreamSize_Encoded_Proportion;;;N NT;;;Source Encoded Stream size divided by file size;\n"
- "Alignment;;;N YT;;;How this stream file is aligned in the container;\n"
- "Alignment/String;;;Y NT;;;Where this stream file is aligned in the container;\n"
- "Interleave_VideoFrames;;;N YF;;;Between how many video frames the stream is inserted;\n"
- "Interleave_Duration;;;N YI;;;Between how much time (ms) the stream is inserted;\n"
- "Interleave_Duration/String;;;Y NT;;;Between how much time and video frames the stream is inserted (with measurement);\n"
- "Interleave_Preload;;;N YI;;;How much time is buffered before the first video frame;\n"
- "Interleave_Preload/String;;;Y NT;;;How much time is buffered before the first video frame (with measurement);\n"
- "Title;;;Y YI;;;Name of the track;\n"
- "Encoded_Application;;;N YT;;;Name of the software package used to create the file, such as Microsoft WaveEdit;;Technical\n"
- "Encoded_Application/String;;;Y NT;;;Name of the software package used to create the file, such as Microsoft WaveEdit, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)';;Technical\n"
- "Encoded_Application_CompanyName;;;N YT;;;Name of the company;;Technical\n"
- "Encoded_Application_Name;;;N YT;;;Name of the product;;Technical\n"
- "Encoded_Application_Version;;;N YT;;;Version of the product;;Technical\n"
- "Encoded_Application_Url;;;N YT;;;Name of the software package used to create the file, such as Microsoft WaveEdit.;;Technical\n"
- "Encoded_Library;;;N YT;;;Software used to create the file;;Technical\n"
- "Encoded_Library/String;;;Y NT;;;Software used to create the file, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)';;Technical\n"
- "Encoded_Library_CompanyName;;;N YT;;;Name of the company;;Technical\n"
- "Encoded_Library_Name;;;N NT;;;Name of the the encoding-software;;Technical\n"
- "Encoded_Library_Version;;;N NT;;;Version of encoding-software;;Technical\n"
- "Encoded_Library_Date;;;N NT;;;Release date of software;;Technical\n"
- "Encoded_Library_Settings;;;Y YT;;;Parameters used by the software;;Technical\n"
- "Encoded_OperatingSystem;;;N YT;;;Operating System of encoding-software;;Technical\n"
- "Language;;;N YT;;;Language (2-letter ISO 639-1 if exists, else 3-letter ISO 639-2, and with optional ISO 3166-1 country separated by a dash if available, e.g. en, en-us, zh-cn);\n"
- "Language/String;;;Y NT;;;Language (full);\n"
- "Language/String1;;;N NT;;;Language (full);\n"
- "Language/String2;;;N NT;;;Language (2-letter ISO 639-1 if exists, else empty);\n"
- "Language/String3;;;N NT;;;Language (3-letter ISO 639-2 if exists, else empty);\n"
- "Language/String4;;;N NT;;;Language (2-letter ISO 639-1 if exists with optional ISO 3166-1 country separated by a dash if available, e.g. en, en-us, zh-cn, else empty);\n"
- "Language_More;;;Y YT;;;More info about Language (e.g. Director's Comment);\n"
- "Default;;Yes;N YT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Default/String;;;Y NT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Forced;;Yes;N YT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Forced/String;;;Y NT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Encoded_Date;;;Y YT;;;UTC time that the encoding of this item was completed began.;;Temporal\n"
- "Tagged_Date;;;Y YT;;;UTC time that the tags were done for this item.;;Temporal\n"
- "Encryption;;;Y YT;;;;\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Text (ZtringListList &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "Count;;;N NI;;;Count of objects available in this stream\n"
- "Status;;;N NI;;;bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)\n"
- "StreamCount;;;N NI;;;Count of streams of that kind available\n"
- "StreamKind;Text;;N NT;;;Stream type name\n"
- "StreamKind/String;;;N NT;;;Stream type name\n"
- "StreamKindID;;;N NI;;;Number of the stream (base=0)\n"
- "StreamKindPos;;;N NI;;;When multiple streams, number of the stream (base=1)\n"
- "StreamOrder;;;N YI;;;Stream order in the file, whatever is the kind of stream (base=0)\n"
- "FirstPacketOrder;;;N YI;;;Order of the first fully decodable packet met in the file, whatever is the kind of stream (base=0)\n"
- "Inform;;;N NT;;;Last **Inform** call\n"
- "ID;;;N YI;;;The ID for this stream in this file\n"
- "ID/String;;;Y NT;;;The ID for this stream in this file\n"
- "UniqueID;;;N YI;;;The unique ID for this stream, should be copied with stream copy\n"
- "UniqueID/String;;;Y NT;;;The unique ID for this stream, should be copied with stream copy\n"
- "MenuID;;;N YI;;;The menu ID for this stream in this file\n"
- "MenuID/String;;;Y NT;;;The menu ID for this stream in this file\n"
- "Format;;;Y YT;;;Format used\n"
- "Format/Info;;;Y NT;;;Info about Format\n"
- "Format/Url;;;N NT;;;Link\n"
- "Format_Commercial;;;N NT;;;Commercial name used by vendor for theses setings or Format field if there is no difference\n"
- "Format_Commercial_IfAny;;;Y YT;;;Commercial name used by vendor for theses setings if there is one\n"
- "Format_Version;;;Y NT;;;Version of this format\n"
- "Format_Profile;;;Y NT;;;Profile of the Format\n"
- "Format_Compression;;;Y NT;;;Compression method used;\n"
- "Format_Settings;;;Y NT;;;Settings needed for decoder used\n"
- "Format_Settings_Wrapping;;;Y YT;;;Wrapping mode (Frame wrapped or Clip wrapped)\n"
- "InternetMediaType;;;N YT;;;Internet Media Type (aka MIME Type, Content-Type)\n"
- "MuxingMode;;;Y YT;;;How this stream is muxed in the container\n"
- "MuxingMode_MoreInfo;;;Y NT;;;More info (text) about the muxing mode\n"
- "CodecID;;;Y YT;;;Codec ID (found in some containers);\n"
- "CodecID/String;;;Y NT;;;Codec ID (found in some containers);\n"
- "CodecID/Info;;;Y NT;;;Info about codec ID\n"
- "CodecID/Hint;;;Y NT;;;A hint for this codec ID\n"
- "CodecID/Url;;;N NT;;;A link for more details about this codec ID\n"
- "CodecID_Description;;;Y YT;;;Manual description given by the container\n"
- "Codec;;;N YT;;;Deprecated\n"
- "Codec/String;;;N NT;;;Deprecated\n"
- "Codec/Info;;;N NT;;;Deprecated\n"
- "Codec/Url;;;N NT;;;Deprecated\n"
- "Codec/CC;;;N NT;;;Deprecated\n"
- "Duration;; ms;N YI;;;Play time of the stream, in ms\n"
- "Duration/String;;;Y NT;;;Play time (formated)\n"
- "Duration/String1;;;N NT;;;Play time in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Duration/String2;;;N NT;;;Play time in format : XXx YYy only, YYy omited if zero\n"
- "Duration/String3;;;N NT;;;Play time in format : HH:MM:SS.MMM\n"
- "Duration/String4;;;N NT;;;Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Duration/String5;;;N NT;;;Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Duration_FirstFrame;; ms;N YI;;;Duration of the first frame if it is longer than others, in ms\n"
- "Duration_FirstFrame/String;;;Y NT;;;Duration of the first frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Duration_FirstFrame/String1;;;N NT;;;Duration of the first frame if it is longer than others, in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Duration_FirstFrame/String2;;;N NT;;;Duration of the first frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Duration_FirstFrame/String3;;;N NT;;;Duration of the first frame if it is longer than others, in format : HH:MM:SS.MMM\n"
- "Duration_FirstFrame/String4;;;N NT;;;Duration of the first frame if it is longer than others, in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Duration_FirstFrame/String5;;;N NT;;;Duration of the first frame if it is longer than others, in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Duration_LastFrame;; ms;N YI;;;Duration of the last frame if it is longer than others, in ms\n"
- "Duration_LastFrame/String;;;Y NT;;;Duration of the last frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Duration_LastFrame/String1;;;N NT;;;Duration of the last frame if it is longer than others, in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Duration_LastFrame/String2;;;N NT;;;Duration of the last frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Duration_LastFrame/String3;;;N NT;;;Duration of the last frame if it is longer than others, in format : HH:MM:SS.MMM\n"
- "Duration_LastFrame/String4;;;N NT;;;Duration of the last frame if it is longer than others, in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Duration_LastFrame/String5;;;N NT;;;Duration of the last frame if it is longer than others, in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Source_Duration;; ms;N YI;;;Source Play time of the stream, in ms;\n"
- "Source_Duration/String;;;Y NT;;;Source Play time in format : XXx YYy only, YYy omited if zero;\n"
- "Source_Duration/String1;;;N NT;;;Source Play time in format : HHh MMmn SSs MMMms, XX omited if zero;\n"
- "Source_Duration/String2;;;N NT;;;Source Play time in format : XXx YYy only, YYy omited if zero;\n"
- "Source_Duration/String3;;;N NT;;;Source Play time in format : HH:MM:SS.MMM;\n"
- "Source_Duration/String4;;;N NT;;;Source Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Source_Duration/String5;;;N NT;;;Source Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Source_Duration_FirstFrame;; ms;N YI;;;Source Duration of the first frame if it is longer than others, in ms\n"
- "Source_Duration_FirstFrame/String;;;Y NT;;;Source Duration of the first frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Source_Duration_FirstFrame/String1;;;N NT;;;Source Duration of the first frame if it is longer than others, in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Source_Duration_FirstFrame/String2;;;N NT;;;Source Duration of the first frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Source_Duration_FirstFrame/String3;;;N NT;;;Source Duration of the first frame if it is longer than others, in format : HH:MM:SS.MMM\n"
- "Source_Duration_FirstFrame/String4;;;N NT;;;Source Duration of the first frame if it is longer than others, in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Source_Duration_FirstFrame/String5;;;N NT;;;Source Duration of the first frame if it is longer than others, in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Source_Duration_LastFrame;; ms;N YI;;;Source Duration of the last frame if it is longer than others, in ms\n"
- "Source_Duration_LastFrame/String;;;Y NT;;;Source Duration of the last frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Source_Duration_LastFrame/String1;;;N NT;;;Source Duration of the last frame if it is longer than others, in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Source_Duration_LastFrame/String2;;;N NT;;;Source Duration of the last frame if it is longer than others, in format : XXx YYy only, YYy omited if zero\n"
- "Source_Duration_LastFrame/String3;;;N NT;;;Source Duration of the last frame if it is longer than others, in format : HH:MM:SS.MMM\n"
- "Source_Duration_LastFrame/String4;;;N NT;;;Source Duration of the last frame if it is longer than others, in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Source_Duration_LastFrame/String5;;;N NT;;;Source Duration of the last frame if it is longer than others, in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "BitRate_Mode;;;N YT;;;Bit rate mode (VBR, CBR)\n"
- "BitRate_Mode/String;;;Y NT;;;Bit rate mode (Constant, Variable)\n"
- "BitRate;; bps;N YF;;;Bit rate in bps\n"
- "BitRate/String;;;Y NT;;;Bit rate (with measurement)\n"
- "BitRate_Minimum;; bps;N YF;;;Minimum Bit rate in bps\n"
- "BitRate_Minimum/String;;;Y NT;;;Minimum Bit rate (with measurement)\n"
- "BitRate_Nominal;; bps;N YF;;;Nominal Bit rate in bps\n"
- "BitRate_Nominal/String;;;Y NT;;;Nominal Bit rate (with measurement)\n"
- "BitRate_Maximum;; bps;N YF;;;Maximum Bit rate in bps\n"
- "BitRate_Maximum/String;;;Y NT;;;Maximum Bit rate (with measurement)\n"
- "BitRate_Encoded;; bps;N YF;;;Encoded (with forced padding) bit rate in bps, if some container padding is present\n"
- "BitRate_Encoded/String;;;Y NT;;;Encoded (with forced padding) bit rate (with measurement), if some container padding is present\n"
- "Width;; character;N YI;;;Width\n"
- "Width/String;;;Y NT;;\n"
- "Height;; character;N YI;;;Height\n"
- "Height/String;;;Y NT;;\n"
- "FrameRate_Mode;;;N YT;;;Frame rate mode (CFR, VFR)\n"
- "FrameRate_Mode/String;;;Y NT;;;Frame rate mode (Constant, Variable)\n"
- "FrameRate;; fps;N YF;;;Frames per second\n"
- "FrameRate/String;;;Y NT;;;Frames per second (with measurement)\n"
- "FrameRate_Minimum;; fps;N YF;;;Minimum Frames per second\n"
- "FrameRate_Minimum/String;;;Y NT;;;Minimum Frames per second (with measurement)\n"
- "FrameRate_Nominal;; fps;N YF;;;Nominal Frames per second\n"
- "FrameRate_Nominal/String;;;Y NT;;;Nominal Frames per second (with measurement)\n"
- "FrameRate_Maximum;; fps;N YF;;;Maximum Frames per second\n"
- "FrameRate_Maximum/String;;;Y NT;;;Maximum Frames per second (with measurement)\n"
- "FrameRate_Original;; fps;N YF;;;Original (in the raw stream) Frames per second\n"
- "FrameRate_Original/String;;;Y NT;;;Original (in the raw stream) Frames per second (with measurement)\n"
- "FrameCount;;;N NI;;;Number of frames\n"
- "Source_FrameCount;;;N NI;;;Source Number of frames\n"
- "ColorSpace;;;Y YT;;\n"
- "ChromaSubsampling;;;Y YT;;\n"
- "Resolution;; bit;N NI;;;Deprecated, do not use in new projects\n"
- "Resolution/String;;;N NT;;;Deprecated, do not use in new projects\n"
- "BitDepth;; bit;N YI;;\n"
- "BitDepth/String;;;Y NT;;\n"
- "Compression_Mode;;;N YT;;;Compression mode (Lossy or Lossless)\n"
- "Compression_Mode/String;;;Y NT;;;Compression mode (Lossy or Lossless)\n"
- "Compression_Ratio;;;Y YF;;;Current stream size divided by uncompressed stream size;\n"
- "Delay;; ms;N NI;;;Delay fixed in the stream (relative) IN MS\n"
- "Delay/String;;;N NT;;;Delay with measurement\n"
- "Delay/String1;;;N NT;;;Delay with measurement\n"
- "Delay/String2;;;N NT;;;Delay with measurement\n"
- "Delay/String3;;;N NT;;;Delay in format : HH:MM:SS.MMM\n"
- "Delay/String4;;;N NT;;;Delay in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Delay/String5;;;N NT;;;Delay in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Delay_Settings;;;N NT;;;Delay settings (in case of timecode for example)\n"
- "Delay_DropFrame;;;N NT;;;Delay drop frame\n"
- "Delay_Source;;;N NT;;;Delay source (Container or Stream or empty)\n"
- "Delay_Source/String;;;N NT;;;Delay source (Container or Stream or empty)\n"
- "Delay_Original;; ms;N NI;;;Delay fixed in the raw stream (relative) IN MS\n"
- "Delay_Original/String;;;N NT;;;Delay with measurement\n"
- "Delay_Original/String1;;;N NT;;;Delay with measurement\n"
- "Delay_Original/String2;;;N NT;;;Delay with measurement\n"
- "Delay_Original/String3;;;N NT;;;Delay in format: HH:MM:SS.MMM;\n"
- "Delay_Original/String4;;;N NT;;;Delay in format: HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Delay_Original/String5;;;N NT;;;Delay in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Delay_Original_Settings;;;N NT;;;Delay settings (in case of timecode for example);\n"
- "Delay_Original_DropFrame;;;N NT;;;Delay drop frame info\n"
- "Delay_Original_Source;;;N NT;;;Delay source (Stream or empty)\n"
- "Video_Delay;; ms;N NI;;;Delay fixed in the stream (absolute / video)\n"
- "Video_Delay/String;;;Y NT;;\n"
- "Video_Delay/String1;;;N NT;;\n"
- "Video_Delay/String2;;;N NT;;\n"
- "Video_Delay/String3;;;N NT;;\n"
- "Video_Delay/String4;;;N NT;;\n"
- "Video_Delay/String5;;;N NT;;\n"
- "Video0_Delay;; ms;N NI;;;Deprecated, do not use in new projects\n"
- "Video0_Delay/String;;;N NT;;;Deprecated, do not use in new projects\n"
- "Video0_Delay/String1;;;N NT;;;Deprecated, do not use in new projects\n"
- "Video0_Delay/String2;;;N NT;;;Deprecated, do not use in new projects\n"
- "Video0_Delay/String3;;;N NT;;;Deprecated, do not use in new projects\n"
- "Video0_Delay/String4;;;N NT;;;Deprecated, do not use in new projects\n"
- "Video0_Delay/String5;;;N NT;;;Deprecated, do not use in new projects\n"
- "StreamSize;; byte;N YI;;;Streamsize in bytes;\n"
- "StreamSize/String;;;Y NT;;;Streamsize in with percentage value;\n"
- "StreamSize/String1;;;N NT;;;;\n"
- "StreamSize/String2;;;N NT;;;;\n"
- "StreamSize/String3;;;N NT;;;;\n"
- "StreamSize/String4;;;N NT;;;;\n"
- "StreamSize/String5;;;N NT;;;Streamsize in with percentage value;\n"
- "StreamSize_Proportion;;;N NT;;;Stream size divided by file size;\n"
- "Source_StreamSize;; byte;N YI;;;Source Streamsize in bytes;\n"
- "Source_StreamSize/String;;;Y NT;;;Source Streamsize in with percentage value;\n"
- "Source_StreamSize/String1;;;N NT;;;;\n"
- "Source_StreamSize/String2;;;N NT;;;;\n"
- "Source_StreamSize/String3;;;N NT;;;;\n"
- "Source_StreamSize/String4;;;N NT;;;;\n"
- "Source_StreamSize/String5;;;N NT;;;Source Streamsize in with percentage value;\n"
- "Source_StreamSize_Proportion;;;N NT;;;Source Stream size divided by file size;\n"
- "StreamSize_Encoded;; byte;N YI;;;Encoded Streamsize in bytes;\n"
- "StreamSize_Encoded/String;;;Y NT;;;Encoded Streamsize in with percentage value;\n"
- "StreamSize_Encoded/String1;;;N NT;;;;\n"
- "StreamSize_Encoded/String2;;;N NT;;;;\n"
- "StreamSize_Encoded/String3;;;N NT;;;;\n"
- "StreamSize_Encoded/String4;;;N NT;;;;\n"
- "StreamSize_Encoded/String5;;;N NT;;;Encoded Streamsize in with percentage value;\n"
- "StreamSize_Encoded_Proportion;;;N NT;;;Encoded Stream size divided by file size;\n"
- "Source_StreamSize_Encoded;; byte;N YI;;;Source Encoded Streamsize in bytes;\n"
- "Source_StreamSize_Encoded/String;;;Y NT;;;Source Encoded Streamsize in with percentage value;\n"
- "Source_StreamSize_Encoded/String1;;;N NT;;;;\n"
- "Source_StreamSize_Encoded/String2;;;N NT;;;;\n"
- "Source_StreamSize_Encoded/String3;;;N NT;;;;\n"
- "Source_StreamSize_Encoded/String4;;;N NT;;;;\n"
- "Source_StreamSize_Encoded/String5;;;N NT;;;Source Encoded Streamsize in with percentage value;\n"
- "Source_StreamSize_Encoded_Proportion;;;N NT;;;Source Encoded Stream size divided by file size;\n"
- "Title;;;Y YI;;;Name of the track\n"
- "Encoded_Application;;;N YT;;;Name of the software package used to create the file, such as Microsoft WaveEdit;;Technical\n"
- "Encoded_Application/String;;;Y NT;;;Name of the software package used to create the file, such as Microsoft WaveEdit, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)';;Technical\n"
- "Encoded_Application_CompanyName;;;N YT;;;Name of the company;;Technical\n"
- "Encoded_Application_Name;;;N YT;;;Name of the product;;Technical\n"
- "Encoded_Application_Version;;;N YT;;;Version of the product;;Technical\n"
- "Encoded_Application_Url;;;N YT;;;Name of the software package used to create the file, such as Microsoft WaveEdit.;;Technical\n"
- "Encoded_Library;;;N YT;;;Software used to create the file;;Technical\n"
- "Encoded_Library/String;;;Y NT;;;Software used to create the file, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)';;Technical\n"
- "Encoded_Library_CompanyName;;;N YT;;;Name of the company;;Technical\n"
- "Encoded_Library_Name;;;N NT;;;Name of the the encoding-software;;Technical\n"
- "Encoded_Library_Version;;;N NT;;;Version of encoding-software;;Technical\n"
- "Encoded_Library_Date;;;N NT;;;Release date of software;;Technical\n"
- "Encoded_Library_Settings;;;Y YT;;;Parameters used by the software;;Technical\n"
- "Encoded_OperatingSystem;;;N YT;;;Operating System of encoding-software;;Technical\n"
- "Language;;;N YT;;;Language (2-letter ISO 639-1 if exists, else 3-letter ISO 639-2, and with optional ISO 3166-1 country separated by a dash if available, e.g. en, en-us, zh-cn)\n"
- "Language/String;;;Y NT;;;Language (full)\n"
- "Language/String1;;;N NT;;;Language (full)\n"
- "Language/String2;;;N NT;;;Language (2-letter ISO 639-1 if exists, else empty)\n"
- "Language/String3;;;N NT;;;Language (3-letter ISO 639-2 if exists, else empty);\n"
- "Language/String4;;;N NT;;;Language (2-letter ISO 639-1 if exists with optional ISO 3166-1 country separated by a dash if available, e.g. en, en-us, zh-cn, else empty);\n"
- "Language_More;;;Y YT;;;More info about Language (e.g. Director's Comment);\n"
- "Default;;Yes;N YT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Default/String;;;Y NT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Forced;;Yes;N YT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Forced/String;;;Y NT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Summary;;;N NT;;;;\n"
- "Encoded_Date;;;Y YT;;;The time that the encoding of this item was completed began.;;Temporal\n"
- "Tagged_Date;;;Y YT;;;The time that the tags were done for this item.;;Temporal\n"
- "Encryption;;;Y YT;;;;\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Other (ZtringListList &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "Count;;;N NI;;;Count of objects available in this stream\n"
- "Status;;;N NI;;;bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)\n"
- "StreamCount;;;N NI;;;Count of streams of that kind available\n"
- "StreamKind;Other;;N NT;;;Stream type name\n"
- "StreamKind/String;;;N NT;;;Stream type name\n"
- "StreamKindID;;;N NI;;;Number of the stream (base=0)\n"
- "StreamKindPos;;;N NI;;;When multiple streams, number of the stream (base=1)\n"
- "StreamOrder;;;N YI;;;Stream order in the file, whatever is the kind of stream (base=0)\n"
- "FirstPacketOrder;;;N YI;;;Order of the first fully decodable packet met in the file, whatever is the kind of stream (base=0)\n"
- "Inform;;;N NT;;;Last **Inform** call\n"
- "ID;;;N YI;;;The ID for this stream in this file\n"
- "ID/String;;;Y NT;;;The ID for this stream in this file\n"
- "UniqueID;;;N YI;;;The unique ID for this stream, should be copied with stream copy\n"
- "UniqueID/String;;;Y NT;;;The unique ID for this stream, should be copied with stream copy\n"
- "MenuID;;;N YI;;;The menu ID for this stream in this file\n"
- "MenuID/String;;;Y NT;;;The menu ID for this stream in this file\n"
- "Type;;;Y YT;;;Type\n"
- "Format;;;Y YT;;;Format used\n"
- "Format/Info;;;N NT;;;Info about Format\n"
- "Format/Url;;;N NT;;;Link\n"
- "Format_Commercial;;;N NT;;;Commercial name used by vendor for theses setings or Format field if there is no difference\n"
- "Format_Commercial_IfAny;;;Y YT;;;Commercial name used by vendor for theses setings if there is one\n"
- "Format_Version;;;Y NT;;;Version of this format\n"
- "Format_Profile;;;Y NT;;;Profile of the Format\n"
- "Format_Compression;;;Y NT;;;Compression method used;\n"
- "Format_Settings;;;Y NT;;;Settings needed for decoder used\n"
- "MuxingMode;;;Y YT;;;How this file is muxed in the container\n"
- "CodecID;;;Y YT;;;Codec ID (found in some containers);\n"
- "CodecID/String;;;Y NT;;;Codec ID (found in some containers);\n"
- "CodecID/Info;;;Y NT;;;Info about this codec\n"
- "CodecID/Hint;;;Y NT;;;A hint/popular name for this codec\n"
- "CodecID/Url;;;N NT;;;A link to more details about this codec ID\n"
- "CodecID_Description;;;Y YT;;;Manual description given by the container\n"
- "Duration;; ms;N YI;;;Play time of the stream in ms\n"
- "Duration/String;;;Y NT;;;Play time in format : XXx YYy only, YYy omited if zero\n"
- "Duration/String1;;;N NT;;;Play time in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Duration/String2;;;N NT;;;Play time in format : XXx YYy only, YYy omited if zero\n"
- "Duration/String3;;;N NT;;;Play time in format : HH:MM:SS.MMM\n"
- "Duration/String4;;;N NT;;;Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Duration/String5;;;N NT;;;Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Duration_Start;;;Y YT;;\n"
- "Duration_End;;;Y YT;;\n"
- "FrameRate;; fps;N YF;;;Frames per second\n"
- "FrameRate/String;;;Y NT;;;Frames per second (with measurement)\n"
- "FrameCount;;;N NI;;;Number of frames\n"
- "TimeStamp_FirstFrame;; ms;N YI;;;TimeStamp fixed in the stream (relative) IN MS\n"
- "TimeStamp_FirstFrame/String;;;Y NT;;;TimeStamp with measurement\n"
- "TimeStamp_FirstFrame/String1;;;N NT;;;TimeStamp with measurement\n"
- "TimeStamp_FirstFrame/String2;;;N NT;;;TimeStamp with measurement\n"
- "TimeStamp_FirstFrame/String3;;;N NT;;;TimeStamp in format : HH:MM:SS.MMM\n"
- "TimeStamp_FirstFrame/String4;;;N NT;;;TimeStamp in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "TimeStamp_FirstFrame/String5;;;N NT;;;TimeStamp in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "TimeCode_FirstFrame;;;Y YC;;;Time code in HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available format\n"
- "TimeCode_Settings;;;Y YT;;;Time code settings\n"
- "TimeCode_Striped;;Yes;N YT;;;Time code is striped (only 1st time code, no discontinuity)\n"
- "TimeCode_Striped/String;;;Y NT;;;Time code is striped (only 1st time code, no discontinuity)\n"
- "Title;;;Y YI;;;Name of this menu\n"
- "Language;;;N YT;;;Language (2-letter ISO 639-1 if exists, else 3-letter ISO 639-2, and with optional ISO 3166-1 country separated by a dash if available, e.g. en, en-us, zh-cn)\n"
- "Language/String;;;Y NT;;;Language (full)\n"
- "Language/String1;;;N NT;;;Language (full);\n"
- "Language/String2;;;N NT;;;Language (2-letter ISO 639-1 if exists, else empty);\n"
- "Language/String3;;;N NT;;;Language (3-letter ISO 639-2 if exists, else empty);\n"
- "Language/String4;;;N NT;;;Language (2-letter ISO 639-1 if exists with optional ISO 3166-1 country separated by a dash if available, e.g. en, en-us, zh-cn, else empty);\n"
- "Language_More;;;Y YT;;;More info about Language (e.g. Director's Comment);\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Image (ZtringListList &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "Count;;;N NI;;;Count of objects available in this stream\n"
- "Status;;;N NI;;;bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)\n"
- "StreamCount;;;N NI;;;Count of streams of that kind available\n"
- "StreamKind;Image;;N NT;;;Stream type name\n"
- "StreamKind/String;;;N NT;;;Stream type name\n"
- "StreamKindID;;;N NI;;;Number of the stream (base=0)\n"
- "StreamKindPos;;;N NI;;;When multiple streams, number of the stream (base=1)\n"
- "StreamOrder;;;N YI;;;Stream order in the file, whatever is the kind of stream (base=0)\n"
- "FirstPacketOrder;;;N YI;;;Order of the first fully decodable packet met in the file, whatever is the kind of stream (base=0)\n"
- "Inform;;;N NT;;;Last **Inform** call\n"
- "ID;;;N YI;;;The ID for this stream in this file\n"
- "ID/String;;;Y NT;;;The ID for this stream in this file\n"
- "UniqueID;;;N YI;;;The unique ID for this stream, should be copied with stream copy\n"
- "UniqueID/String;;;Y NT;;;The unique ID for this stream, should be copied with stream copy\n"
- "MenuID;;;N YI;;;The menu ID for this stream in this file\n"
- "MenuID/String;;;Y NT;;;The menu ID for this stream in this file\n"
- "Title;;;Y YI;;;Name of the track\n"
- "Format;;;Y YT;;;Format used\n"
- "Format/Info;;;Y NT;;;Info about Format\n"
- "Format/Url;;;N NT;;;Link\n"
- "Format_Commercial;;;N NT;;;Commercial name used by vendor for theses setings or Format field if there is no difference\n"
- "Format_Commercial_IfAny;;;Y YT;;;Commercial name used by vendor for theses setings if there is one\n"
- "Format_Version;;;Y NT;;;Version of this format\n"
- "Format_Profile;;;Y NT;;;Profile of the Format\n"
- "Format_Compression;;;N YT;;;Compression mode of the Format\n"
- "Format_Settings;;;Y NT;;;Settings needed for decoder used\n"
- "Format_Settings_Wrapping;;;Y YT;;;Wrapping mode (Frame wrapped or Clip wrapped)\n"
- "InternetMediaType;;;N YT;;;Internet Media Type (aka MIME Type, Content-Type)\n"
- "CodecID;;;Y YT;;;Codec ID (found in some containers);\n"
- "CodecID/String;;;Y NT;;;Codec ID (found in some containers);\n"
- "CodecID/Info;;;Y NT;;;Info about codec ID\n"
- "CodecID/Hint;;;Y NT;;;A hint for this codec ID\n"
- "CodecID/Url;;;N NT;;;A link for more details about this codec ID\n"
- "CodecID_Description;;;Y YT;;;Manual description given by the container\n"
- "Codec;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec/String;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec/Family;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec/Info;;;N NT;;;Deprecated, do not use in new projects\n"
- "Codec/Url;;;N NT;;;Deprecated, do not use in new projects\n"
- "Width;; pixel;N YI;;;Width (aperture size if present) in pixel\n"
- "Width/String;;;Y NT;;;Width (aperture size if present) with measurement (pixel)\n"
- "Width_Offset;; pixel;N YI;;;Offset between original width and displayed width (aperture size) in pixel\n"
- "Width_Offset/String;;;N NT;;;Offset between original width and displayed width (aperture size) in pixel\n"
- "Width_Original;; pixel;N YI;;;Original (in the raw stream) width in pixel\n"
- "Width_Original/String;;;Y NT;;;Original (in the raw stream) width with measurement (pixel)\n"
- "Height;; pixel;N YI;;;Height (aperture size if present) in pixel\n"
- "Height/String;;;Y NT;;;Height (aperture size if present) with measurement (pixel)\n"
- "Height_Offset;; pixel;N YI;;;Offset between original height and displayed height (aperture size) in pixel\n"
- "Height_Offset/String;;;N NT;;;Offset between original height and displayed height (aperture size) in pixel\n"
- "Height_Original;; pixel;N YI;;;Original (in the raw stream) height in pixel\n"
- "Height_Original/String;;;Y NT;;;Original (in the raw stream) height with measurement (pixel)\n"
- "PixelAspectRatio;;;N YF;;;Pixel Aspect ratio\n"
- "PixelAspectRatio/String;;;N NT;;;Pixel Aspect ratio\n"
- "PixelAspectRatio_Original;;;N YF;;;Original (in the raw stream) Pixel Aspect ratio\n"
- "PixelAspectRatio_Original/String;;;N NT;;;Original (in the raw stream) Pixel Aspect ratio\n"
- "DisplayAspectRatio;;;N YF;;;Display Aspect ratio\n"
- "DisplayAspectRatio/String;;;Y NT;;;Display Aspect ratio\n"
- "DisplayAspectRatio_Original;;;N YF;;;Original (in the raw stream) Display Aspect ratio\n"
- "DisplayAspectRatio_Original/String;;;Y NT;;;Original (in the raw stream) Display Aspect ratio\n"
- "ColorSpace;;;Y YT;;\n"
- "ChromaSubsampling;;;Y YT;;\n"
- "Resolution;; bit;N NI;;;Deprecated, do not use in new projects\n"
- "Resolution/String;;;N NT;;;Deprecated, do not use in new projects\n"
- "BitDepth;; bit;N YI;;\n"
- "BitDepth/String;;;Y NT;;\n"
- "Compression_Mode;;;N YT;;;Compression mode (Lossy or Lossless)\n"
- "Compression_Mode/String;;;Y NT;;;Compression mode (Lossy or Lossless)\n"
- "Compression_Ratio;;;Y YF;;;Current stream size divided by uncompressed stream size;\n"
- "StreamSize;; byte;N YI;;;Stream size in bytes\n"
- "StreamSize/String;;;Y NT;;\n"
- "StreamSize/String1;;;N NT;;\n"
- "StreamSize/String2;;;N NT;;\n"
- "StreamSize/String3;;;N NT;;\n"
- "StreamSize/String4;;;N NT;;\n"
- "StreamSize/String5;;;N NT;;;With proportion;\n"
- "StreamSize_Proportion;;;N NT;;;Stream size divided by file size;\n"
- "Encoded_Library;;;N YT;;;Software used to create the file;\n"
- "Encoded_Library/String;;;Y NT;;;Software used to create the file;\n"
- "Encoded_Library_Name;;;N NT;;;Info from the software;\n"
- "Encoded_Library_Version;;;N NT;;;Version of software;\n"
- "Encoded_Library_Date;;;N NT;;;Release date of software;\n"
- "Encoded_Library_Settings;;;Y YT;;;Parameters used by the software;\n"
- "Language;;;N YT;;;Language (2-letter ISO 639-1 if exists, else 3-letter ISO 639-2, and with optional ISO 3166-1 country separated by a dash if available, e.g. en, en-us, zh-cn);\n"
- "Language/String;;;Y NT;;;Language (full);\n"
- "Language/String1;;;N NT;;;Language (full);\n"
- "Language/String2;;;N NT;;;Language (2-letter ISO 639-1 if exists, else empty);\n"
- "Language/String3;;;N NT;;;Language (3-letter ISO 639-2 if exists, else empty);\n"
- "Language/String4;;;N NT;;;Language (2-letter ISO 639-1 if exists with optional ISO 3166-1 country separated by a dash if available, e.g. en, en-us, zh-cn, else empty);\n"
- "Language_More;;;Y YT;;;More info about Language (e.g. Director's Comment);\n"
- "Default;;Yes;N YT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Default/String;;;Y NT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Forced;;Yes;N YT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Forced/String;;;Y NT;;;Set if that track should be used if no language found matches the user preference.\n"
- "Summary;;;N NT;;;;\n"
- "Encoded_Date;;;Y YT;;;The time that the encoding of this item was completed began.;;Temporal\n"
- "Tagged_Date;;;Y YT;;;The time that the tags were done for this item.;;Temporal\n"
- "Encryption;;;Y YT;;;;\n"
- "colour_description_present;;;N YT;;;Presence of colour description\n"
- "colour_primaries;;;Y YT;;;Chromaticity coordinates of the source primaries\n"
- "transfer_characteristics;;;Y YT;;;Opto-electronic transfer characteristic of the source picture\n"
- "matrix_coefficients;;;Y YT;;;Matrix coefficients used in deriving luma and chroma signals from the green, blue, and red primaries\n"
- "colour_description_present_Original;;;N YT;;;Presence of colour description\n"
- "colour_primaries_Original;;;Y YT;;;Chromaticity coordinates of the source primaries\n"
- "transfer_characteristics_Original;;;Y YT;;;Opto-electronic transfer characteristic of the source picture\n"
- "matrix_coefficients_Original;;;Y YT;;;Matrix coefficients used in deriving luma and chroma signals from the green, blue, and red primaries\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Menu (ZtringListList &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "Count;;;N NI;;;Count of objects available in this stream\n"
- "Status;;;N NI;;;bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)\n"
- "StreamCount;;;N NI;;;Count of streams of that kind available\n"
- "StreamKind;Menu;;N NT;;;Stream type name\n"
- "StreamKind/String;;;N NT;;;Stream type name\n"
- "StreamKindID;;;N NI;;;Number of the stream (base=0)\n"
- "StreamKindPos;;;N NI;;;When multiple streams, number of the stream (base=1)\n"
- "StreamOrder;;;N YI;;;Stream order in the file, whatever is the kind of stream (base=0)\n"
- "FirstPacketOrder;;;N YI;;;Order of the first fully decodable packet met in the file, whatever is the kind of stream (base=0)\n"
- "Inform;;;N NT;;;Last **Inform** call\n"
- "ID;;;N YI;;;The ID for this stream in this file\n"
- "ID/String;;;Y NT;;;The ID for this stream in this file\n"
- "UniqueID;;;N YI;;;The unique ID for this stream, should be copied with stream copy\n"
- "UniqueID/String;;;Y NT;;;The unique ID for this stream, should be copied with stream copy\n"
- "MenuID;;;N YI;;;The menu ID for this stream in this file\n"
- "MenuID/String;;;Y NT;;;The menu ID for this stream in this file\n"
- "Format;;;N YT;;;Format used\n"
- "Format/Info;;;N NT;;;Info about Format\n"
- "Format/Url;;;N NT;;;Link\n"
- "Format_Commercial;;;N NT;;;Commercial name used by vendor for theses setings or Format field if there is no difference\n"
- "Format_Commercial_IfAny;;;Y YT;;;Commercial name used by vendor for theses setings if there is one\n"
- "Format_Version;;;Y NT;;;Version of this format\n"
- "Format_Profile;;;Y NT;;;Profile of the Format\n"
- "Format_Compression;;;Y NT;;;Compression method used;\n"
- "Format_Settings;;;Y NT;;;Settings needed for decoder used\n"
- "CodecID;;;Y YT;;;Codec ID (found in some containers);\n"
- "CodecID/String;;;Y NT;;;Codec ID (found in some containers);\n"
- "CodecID/Info;;;Y NT;;;Info about this codec\n"
- "CodecID/Hint;;;Y NT;;;A hint/popular name for this codec\n"
- "CodecID/Url;;;N NT;;;A link to more details about this codec ID\n"
- "CodecID_Description;;;Y YT;;;Manual description given by the container\n"
- "Codec;;;N YT;;;Deprecated\n"
- "Codec/String;;;N NT;;;Deprecated\n"
- "Codec/Info;;;N NT;;;Deprecated\n"
- "Codec/Url;;;N NT;;;Deprecated\n"
- "Duration;; ms;N YI;;;Play time of the stream in ms\n"
- "Duration/String;;;Y NT;;;Play time in format : XXx YYy only, YYy omited if zero\n"
- "Duration/String1;;;N NT;;;Play time in format : HHh MMmn SSs MMMms, XX omited if zero\n"
- "Duration/String2;;;N NT;;;Play time in format : XXx YYy only, YYy omited if zero\n"
- "Duration/String3;;;N NT;;;Play time in format : HH:MM:SS.MMM\n"
- "Duration/String4;;;N NT;;;Play time in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Duration/String5;;;N NT;;;Play time in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Duration_Start;;;Y YT;;\n"
- "Duration_End;;;Y YT;;\n"
- "Delay;; ms;N NI;;;Delay fixed in the stream (relative) IN MS\n"
- "Delay/String;;;N NT;;;Delay with measurement\n"
- "Delay/String1;;;N NT;;;Delay with measurement\n"
- "Delay/String2;;;N NT;;;Delay with measurement\n"
- "Delay/String3;;;N NT;;;Delay in format : HH:MM:SS.MMM\n"
- "Delay/String4;;;N NT;;;Delay in format : HH:MM:SS:FF, last colon replaced by semicolon for drop frame if available\n"
- "Delay/String5;;;N NT;;;Delay in format : HH:MM:SS.mmm (HH:MM:SS:FF)\n"
- "Delay_Settings;;;N NT;;;Delay settings (in case of timecode for example)\n"
- "Delay_DropFrame;;;N NT;;;Delay drop frame\n"
- "Delay_Source;;;N NT;;;Delay source (Container or Stream or empty)\n"
- "List_StreamKind;;;N YT;;;List of programs available\n"
- "List_StreamPos;;;N YT;;;List of programs available\n"
- "List;;;N YT;;;List of programs available\n"
- "List/String;;;Y NT;;;List of programs available\n"
- "Title;;;Y YI;;;Name of this menu\n"
- "Language;;;N YT;;;Language (2-letter ISO 639-1 if exists, else 3-letter ISO 639-2, and with optional ISO 3166-1 country separated by a dash if available, e.g. en, en-us, zh-cn)\n"
- "Language/String;;;Y NT;;;Language (full)\n"
- "Language/String1;;;N NT;;;Language (full);\n"
- "Language/String2;;;N NT;;;Language (2-letter ISO 639-1 if exists, else empty);\n"
- "Language/String3;;;N NT;;;Language (3-letter ISO 639-2 if exists, else empty);\n"
- "Language/String4;;;N NT;;;Language (2-letter ISO 639-1 if exists with optional ISO 3166-1 country separated by a dash if available, e.g. en, en-us, zh-cn, else empty);\n"
- "Language_More;;;Y YT;;;More info about Language (e.g. Director's Comment);\n"
- "ServiceName;;;Y YT;;;;;Legal\n"
- "ServiceChannel;;;Y YT;;;;;Legal\n"
- "Service/Url;;;Y YT;;;;;Legal\n"
- "ServiceProvider;;;Y YT;;;;;Legal\n"
- "ServiceProviderr/Url;;;Y YT;;;;;Legal\n"
- "ServiceType;;;Y YT;;;;;Legal\n"
- "NetworkName;;;Y YT;;;;;Legal\n"
- "Original/NetworkName;;;Y YT;;;;;Legal\n"
- "Countries;;;Y YT;;;;;Legal\n"
- "TimeZones;;;Y YT;;;;;Legal\n"
- "LawRating;;;Y YT;;;Depending on the country it's the format of the rating of a movie (P, R, X in the USA, an age in other countries or a URI defining a logo).;;Classification\n"
- "LawRating_Reason;;;Y YT;;;Reason for the law rating;;Classification\n"
- "Chapters_Pos_Begin;;;N NI;;;Used by third-party developers to know about the beginning of the chapters list, to be used by Get(Stream_Menu, x, Pos), where Pos is an Integer between Chapters_Pos_Begin and Chapters_Pos_End;\n"
- "Chapters_Pos_End;;;N NI;;;Used by third-party developers to know about the end of the chapters list (this position excluded)\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Iso639_1 (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "aar;aa\n"
- "abk;ab\n"
- "ave;ae\n"
- "afr;af\n"
- "aka;ak\n"
- "amh;am\n"
- "arg;an\n"
- "ara;ar\n"
- "asm;as\n"
- "ava;av\n"
- "aym;ay\n"
- "aze;az\n"
- "bak;ba\n"
- "bel;be\n"
- "bul;bg\n"
- "bih;bh\n"
- "bis;bi\n"
- "bam;bm\n"
- "ben;bn\n"
- "tib;bo\n"
- "tib;bo\n"
- "bre;br\n"
- "bos;bs\n"
- "cat;ca\n"
- "che;ce\n"
- "cha;ch\n"
- "cos;co\n"
- "cre;cr\n"
- "ces;cs\n"
- "cze;cs\n"
- "chu;cu\n"
- "chv;cv\n"
- "cym;cy\n"
- "wel;cy\n"
- "dan;da\n"
- "deu;de\n"
- "ger;de\n"
- "div;dv\n"
- "dzo;dz\n"
- "ewe;ee\n"
- "gre;el\n"
- "ell;el\n"
- "eng;en\n"
- "epo;eo\n"
- "spa;es\n"
- "est;et\n"
- "baq;eu\n"
- "eus;eu\n"
- "fas;fa\n"
- "per;fa\n"
- "ful;ff\n"
- "fin;fi\n"
- "fij;fj\n"
- "fao;fo\n"
- "fra;fr\n"
- "fre;fr\n"
- "fry;fy\n"
- "gle;ga\n"
- "gla;gd\n"
- "glg;gl\n"
- "grn;gn\n"
- "guj;gu\n"
- "glv;gv\n"
- "hau;ha\n"
- "heb;he\n"
- "hin;hi\n"
- "hmo;ho\n"
- "hrv;hr\n"
- "hrv;hr\n"
- "hat;ht\n"
- "hun;hu\n"
- "hye;hy\n"
- "arm;hy\n"
- "her;hz\n"
- "ina;ia\n"
- "ind;id\n"
- "ile;ie\n"
- "ibo;ig\n"
- "iii;ii\n"
- "ipk;ik\n"
- "ido;io\n"
- "ice;is\n"
- "isl;is\n"
- "ita;it\n"
- "iku;iu\n"
- "jpn;ja\n"
- "jav;jv\n"
- "geo;ka\n"
- "kat;ka\n"
- "kon;kg\n"
- "kik;ki\n"
- "kua;kj\n"
- "kaz;kk\n"
- "kal;kl\n"
- "khm;km\n"
- "kan;kn\n"
- "kor;ko\n"
- "kau;kr\n"
- "kas;ks\n"
- "kur;ku\n"
- "kom;kv\n"
- "cor;kw\n"
- "kir;ky\n"
- "lat;la\n"
- "ltz;lb\n"
- "lug;lg\n"
- "lim;li\n"
- "lin;ln\n"
- "lao;lo\n"
- "lit;lt\n"
- "lub;lu\n"
- "lav;lv\n"
- "mlg;mg\n"
- "mah;mh\n"
- "mao;mi\n"
- "mri;mi\n"
- "mac;mk\n"
- "mkd;mk\n"
- "mal;ml\n"
- "mon;mn\n"
- "mol;mo\n"
- "mar;mr\n"
- "may;ms\n"
- "msa;ms\n"
- "mlt;mt\n"
- "bur;my\n"
- "mya;my\n"
- "nau;na\n"
- "nob;nb\n"
- "nde;nd\n"
- "nde;nd\n"
- "nep;ne\n"
- "ndo;ng\n"
- "dut;nl\n"
- "nld;nl\n"
- "nno;nn\n"
- "nor;no\n"
- "nbl;nr\n"
- "nbl;nr\n"
- "nav;nv\n"
- "nya;ny\n"
- "oci;oc\n"
- "oji;oj\n"
- "orm;om\n"
- "ori;or\n"
- "oss;os\n"
- "pan;pa\n"
- "pli;pi\n"
- "pol;pl\n"
- "pus;ps\n"
- "por;pt\n"
- "que;qu\n"
- "roh;rm\n"
- "run;rn\n"
- "ron;ro\n"
- "rum;ro\n"
- "rus;ru\n"
- "kin;rw\n"
- "san;sa\n"
- "srd;sc\n"
- "snd;sd\n"
- "sme;se\n"
- "sag;sg\n"
- "sin;si\n"
- "slk;sk\n"
- "slo;sk\n"
- "slv;sl\n"
- "smo;sm\n"
- "sna;sn\n"
- "som;so\n"
- "alb;sq\n"
- "sqi;sq\n"
- "scc;sr\n"
- "srp;sr\n"
- "ssw;ss\n"
- "sot;st\n"
- "sun;su\n"
- "swe;sv\n"
- "swa;sw\n"
- "tam;ta\n"
- "tel;te\n"
- "tgk;tg\n"
- "tha;th\n"
- "tir;ti\n"
- "tuk;tk\n"
- "tgl;tl\n"
- "tsn;tn\n"
- "ton;to\n"
- "tur;tr\n"
- "tso;ts\n"
- "tat;tt\n"
- "twi;tw\n"
- "tah;ty\n"
- "uig;ug\n"
- "ukr;uk\n"
- "urd;ur\n"
- "uzb;uz\n"
- "ven;ve\n"
- "vie;vi\n"
- "vol;vo\n"
- "wln;wa\n"
- "wol;wo\n"
- "xho;xh\n"
- "yid;yi\n"
- "yor;yo\n"
- "zha;za\n"
- "chi;zh\n"
- "zho;zh\n"
- "zul;zu\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Iso639_2 (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "aa;aar\n"
- "ab;abk\n"
- "ae;ave\n"
- "af;afr\n"
- "ak;aka\n"
- "am;amh\n"
- "an;arg\n"
- "ar;ara\n"
- "as;asm\n"
- "av;ava\n"
- "ay;aym\n"
- "az;aze\n"
- "ba;bak\n"
- "be;bel\n"
- "bg;bul\n"
- "bh;bih\n"
- "bi;bis\n"
- "bm;bam\n"
- "bn;ben\n"
- "bo;tib\n"
- "bo;tib\n"
- "br;bre\n"
- "bs;bos\n"
- "ca;cat\n"
- "ce;che\n"
- "ch;cha\n"
- "co;cos\n"
- "cr;cre\n"
- "cs;ces\n"
- "cs;cze\n"
- "cu;chu\n"
- "cv;chv\n"
- "cy;cym\n"
- "cy;wel\n"
- "da;dan\n"
- "de;deu\n"
- "de;ger\n"
- "dv;div\n"
- "dz;dzo\n"
- "ee;ewe\n"
- "el;gre\n"
- "el;ell\n"
- "en;eng\n"
- "eo;epo\n"
- "es;spa\n"
- "et;est\n"
- "eu;baq\n"
- "eu;eus\n"
- "fa;fas\n"
- "fa;per\n"
- "ff;ful\n"
- "fi;fin\n"
- "fj;fij\n"
- "fo;fao\n"
- "fr;fra\n"
- "fr;fre\n"
- "fy;fry\n"
- "ga;gle\n"
- "gd;gla\n"
- "gl;glg\n"
- "gn;grn\n"
- "gu;guj\n"
- "gv;glv\n"
- "ha;hau\n"
- "he;heb\n"
- "hi;hin\n"
- "ho;hmo\n"
- "hr;hrv\n"
- "hr;hrv\n"
- "ht;hat\n"
- "hu;hun\n"
- "hy;hye\n"
- "hy;arm\n"
- "hz;her\n"
- "ia;ina\n"
- "id;ind\n"
- "ie;ile\n"
- "ig;ibo\n"
- "ii;iii\n"
- "ik;ipk\n"
- "io;ido\n"
- "is;ice\n"
- "is;isl\n"
- "it;ita\n"
- "iu;iku\n"
- "ja;jpn\n"
- "jv;jav\n"
- "ka;geo\n"
- "ka;kat\n"
- "kg;kon\n"
- "ki;kik\n"
- "kj;kua\n"
- "kk;kaz\n"
- "kl;kal\n"
- "km;khm\n"
- "kn;kan\n"
- "ko;kor\n"
- "kr;kau\n"
- "ks;kas\n"
- "ku;kur\n"
- "kv;kom\n"
- "kw;cor\n"
- "ky;kir\n"
- "la;lat\n"
- "lb;ltz\n"
- "lg;lug\n"
- "li;lim\n"
- "ln;lin\n"
- "lo;lao\n"
- "lt;lit\n"
- "lu;lub\n"
- "lv;lav\n"
- "mg;mlg\n"
- "mh;mah\n"
- "mi;mao\n"
- "mi;mri\n"
- "mk;mac\n"
- "mk;mkd\n"
- "ml;mal\n"
- "mn;mon\n"
- "mo;mol\n"
- "mr;mar\n"
- "ms;may\n"
- "ms;msa\n"
- "mt;mlt\n"
- "my;bur\n"
- "my;mya\n"
- "na;nau\n"
- "nb;nob\n"
- "nd;nde\n"
- "nd;nde\n"
- "ne;nep\n"
- "ng;ndo\n"
- "nl;dut\n"
- "nl;nld\n"
- "nn;nno\n"
- "no;nor\n"
- "nr;nbl\n"
- "nr;nbl\n"
- "nv;nav\n"
- "ny;nya\n"
- "oc;oci\n"
- "oj;oji\n"
- "om;orm\n"
- "or;ori\n"
- "os;oss\n"
- "pa;pan\n"
- "pi;pli\n"
- "pl;pol\n"
- "ps;pus\n"
- "pt;por\n"
- "qu;que\n"
- "rm;roh\n"
- "rn;run\n"
- "ro;ron\n"
- "ro;rum\n"
- "ru;rus\n"
- "rw;kin\n"
- "sa;san\n"
- "sc;srd\n"
- "sd;snd\n"
- "se;sme\n"
- "sg;sag\n"
- "si;sin\n"
- "sk;slk\n"
- "sk;slo\n"
- "sl;slv\n"
- "sm;smo\n"
- "sn;sna\n"
- "so;som\n"
- "sq;alb\n"
- "sq;sqi\n"
- "sr;scc\n"
- "sr;srp\n"
- "ss;ssw\n"
- "st;sot\n"
- "su;sun\n"
- "sv;swe\n"
- "sw;swa\n"
- "ta;tam\n"
- "te;tel\n"
- "tg;tgk\n"
- "th;tha\n"
- "ti;tir\n"
- "tk;tuk\n"
- "tl;tgl\n"
- "tn;tsn\n"
- "to;ton\n"
- "tr;tur\n"
- "ts;tso\n"
- "tt;tat\n"
- "tw;twi\n"
- "ty;tah\n"
- "ug;uig\n"
- "uk;ukr\n"
- "ur;urd\n"
- "uz;uzb\n"
- "ve;ven\n"
- "vi;vie\n"
- "vo;vol\n"
- "wa;wln\n"
- "wo;wol\n"
- "xh;xho\n"
- "yi;yid\n"
- "yo;yor\n"
- "za;zha\n"
- "zh;chi\n"
- "zh;zho\n"
- "zu;zul\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Library_DivX (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "Main source;http://xmm.sourceforge.net/DivX5-6_Xvid_Bitstream_version.php\n"
- "413;5.0.0;UTC 2002-03-04\n"
- "450;5.0.1;UTC 2002-04-09\n"
- "481;5.0.2;UTC 2002-05-16\n"
- "484;5.0.2;UTC 2002-05-16\n"
- "487;5.0.2;UTC 2002-05-16\n"
- "696;5.0.5 Beta(Tahanea);UTC 2003-01\n"
- "740;5.0.3;UTC 2003-01-24\n"
- "795;5.0.4 Beta1or2(Schizo);UTC 2003-01\n"
- "804;5.0.4 Beta3(Schizo);UTC 2003-01\n"
- "814;5.0.4 Beta4(Schizo);UTC 2003-01\n"
- "822;5.0.4;UTC 2003-04-17\n"
- "830;5.0.5;UTC 2003-04-24\n"
- "894;5.0.5 Kauehi;UTC 2003-07-02\n"
- "922;5.1.0 Beta1(Manihi);UTC 2003-07-26\n"
- "936;5.1.0 Beta2(Kaukura);UTC 2003-08-02\n"
- "959;5.1.0;UTC 2003-09-02\n"
- "985;5.1.0 (HD?);UTC 2003-10\n"
- "1009;5.1.1 Beta1;UTC 2003-10-21\n"
- "1025;5.1.1 Beta2;UTC 2003-11\n"
- "1031;5.1.1 (Maupiti);UTC 2003-11-19\n"
- "1263;5.2.0;UTC 2004-07-15\n"
- "1272;5.2.0 (DrDivX 105);UTC 2004-07-17\n"
- "1307;5.2.1 Alpha;UTC 2004-09-08\n"
- "1314;5.2.1 Beta;UTC 2004-09-08\n"
- "1328;5.2.1 (WaffleDay);UTC 2004-09-08\n"
- "1338;5.2.1 (DrDivX 106);UTC 2004-09-08\n"
- "1394;5.3.0 Plasma Alpha (Tritium);UTC 2004-09-08\n"
- "1408;5.3.0 Plasma Alpha (CoreBurn);UTC 2004-10\n"
- "1429;>5.3.0, <5.9.0\n"
- "1438;>5.3.0, <5.9.0\n"
- "1453;5.9.0 Fusion (InertialConfinement);UTC 2005-01\n"
- "1461;5.9.0 Fusion (HiggsBoson);UTC 2005-01\n"
- "1528;5.9.0 Fusion (HiggsBoson);UTC 2005-03-05\n"
- "1571;6.0.0;UTC 2005-06-15\n"
- "1594;6.0.0 (DivX Converter1.0);UTC 2005-06\n"
- "1599;6.0.0 Helium;UTC 2005-06\n"
- "1612;6.0.0 Helium (GodFatherOfSoul);UTC 2005-06-15\n"
- "1697;6.0.3 Fusion (ThermonuclearFusion);UTC 2005-10-18\n"
- "1737;He-3 (TwinTurbocharger);UTC 2005-12\n"
- "1786;6.1.0;UTC 2005-12-12\n"
- "1828;6.1.1;UTC 2006-02-01\n"
- "1893;6.2.0 Beta1;UTC 2006-03-25\n"
- "1910;6.2.0;UTC 2006-04-11\n"
- "1913;6.2.1;UTC 2006-04\n"
- "1915;6.2.1 Patch1Beta;UTC 2006-04\n"
- "1920;6.2.2;UTC 2006-04-26\n"
- "1977;6.2.5;UTC 2006-06-16\n"
- "1988;6.2.5;UTC 2006-07\n"
- "2075;>6.2.5, <6.4.0\n"
- "2081;6.4.0 Beta1;UTC 2006-09-27\n"
- "2086;6.4.0;UTC 2006-10-03\n"
- "2201;6.5.0;UTC 2006-12\n"
- "2207;6.5.1;UTC 2007-03\n"
- "2292;6.6.0;UTC 2007-05-04\n"
- "2306;6.6.1\n"
- "2309;6.6.1\n"
- "2318;6.6.1.4\n"
- "2396;6.7 Beta;UTC 2007-08-26\n"
- "2432;6.7.0;UTC 2007-09-20\n"
- "2510;6.8.0;UTC 2007-12-04\n"
- "2521;6.8.0 Converter 6.6\n"
- "2559;6.8.2;UTC 2008-05-17\n"
- "2676;6.8.3-6.8.4;UTC 2008-06-07\n"
- "2816;6.8.5;UTC 2009-08-20\n"
- "2851;6.8.5;UTC 2009-08-20\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Library_XviD (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "Main source;http://xmm.sourceforge.net/DivX5-6_Xvid_Bitstream_version.php\n"
- "1;0.0.01;UTC 2002-10-17\n"
- "2;0.0.02;UTC 2002-10-30\n"
- "3;0.0.03;UTC 2002-12-09\n"
- "4;0.0.04;UTC 2003-01\n"
- "5;0.0.05;UTC 2003-01-11\n"
- "6;0.0.06;UTC 2003-01-12\n"
- "7;0.0.07;UTC 2003-01-13\n"
- "8;0.0.08;UTC 2003-01-14\n"
- "9;0.0.09;UTC 2003-03-25\n"
- "10;0.0.10;UTC 2003-06-09\n"
- "11;0.0.11;UTC 2003-06-09\n"
- "12;0.0.12;UTC 2003-06-11\n"
- "13;0.0.13;UTC 2003-06-11\n"
- "14;0.0.14;UTC 2003-06-28\n"
- "15;0.0.15;UTC 2003-07-28\n"
- "16;0.0.16;UTC 2003-07-28\n"
- "17;0.0.17;UTC 2003-08-06\n"
- "18;0.0.18;UTC 2003-09-04\n"
- "19;0.0.19;UTC 2003-09-28\n"
- "20;0.0.20;UTC 2003-10-09\n"
- "21;1.0.0 Beta1 (Aloha);UTC 2003-11-29\n"
- "22;1.0.0 Beta1.5;UTC 2003-12-03\n"
- "23;1.0.0 Beta2 (Ciao);UTC 2003-12-06\n"
- "24;1.0.0 Beta2.5;UTC 2003-12-18\n"
- "25;1.0.0 Beta3 (Selam);UTC 2003-12-27\n"
- "26;1.0.0 RC1 (Niltze);UTC 2004-01-26\n"
- "27;1.0.0 RC1b;UTC 2004-01-30\n"
- "28;1.0.0 RC2 (Jambo);UTC 2004-02-01\n"
- "29;1.0.0 RC3 (Nihao);UTC 2004-03-22\n"
- "30;1.0.0 RC4 (Hola);UTC 2004-04-05\n"
- "31;1.0.0 RC4b;UTC 2004-04-15\n"
- "32;1.0.0 RC4c;UTC 2004-05-02\n"
- "33;1.0.0 RC4d;UTC 2004-05-03\n"
- "34;1.0.0;UTC 2004-05-09\n"
- "35;1.0.1;UTC 2004-06-05\n"
- "36;1.0.2;UTC 2004-08-29\n"
- "37;1.0.3;UTC 2004-12-20\n"
- "38;1.1.0 Beta1;UTC 2005-01-16\n"
- "39;1.1.0 Beta2;UTC 2005-04-04\n"
- "40;1.1.0 RC;UTC 2005-11-22\n"
- "41;1.1.0;UTC 2005-11-22\n"
- "42;1.2.0.dev42;UTC 2005-12\n"
- "43;1.2.0SMP;UTC 2006-01-08\n"
- "44;1.1.1;UTC 2006-07-10\n"
- "45;1.2.0.dev45;UTC 2006-07-10\n"
- "46;1.1.2;UTC 2006-11-01\n"
- "47;1.2.0.dev47;UTC 2006-11-01\n"
- "48;1.2.0.dev48\n"
- "49;1.2.0.dev49\n"
- "50;1.2.1;UTC 2008-12-04\n"
- "55;1.3.0.dev55\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Library_MainConcept_Avc (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "2.0.1889;2.0.1889;UTC 2006-01-11\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Library_VorbisCom (InfoMap &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "Main source;http://wiki.hydrogenaudio.org/index.php?title=Recommended_Ogg_Vorbis\n"
- "Xiphophorus libVorbis I 20000508;1.0 Beta 1/2;UTC 2000-05-08\n"
- "Xiphophorus libVorbis I 20001031;1.0 Beta 3;UTC 2000-10-31\n"
- "Xiphophorus libVorbis I 20010225;1.0 Beta 4;UTC 2001-02-25\n"
- "Xiphophorus libVorbis I 20010615;1.0 RC1;UTC 2000-16-15\n"
- "Xiphophorus libVorbis I 20010813;1.0 RC2;UTC 2000-18-13\n"
- "Xiphophorus libVorbis I 20010816 (gtune 1);1.0 RC2 (GTune 1);UTC 2001-08-16\n"
- "Xiphophorus libVorbis I 20011014 (GTune 2);1.0 RC2 (GTune 2);UTC 2001-10-14\n"
- "Xiphophorus libVorbis I 20011217;1.0 RC3;UTC 2001-12-17\n"
- "Xiphophorus libVorbis I 20011231;1.0 RC3;UTC 2001-12-31\n"
- "Xiph.Org libVorbis I 20020717;1.0;UTC 2002-07-17\n"
- "Xiph.Org/Sjeng.Org libVorbis I 20020717 (GTune 3, beta 1);1.0 (GTune 3 Beta 1);UTC 2002-07-17\n"
- "Xiph.Org libVorbis I 20030308;1.0.1 (CVS);UTC 2003-03-08\n"
- "Xiph.Org libVorbis I 20030909;1.0.1;UTC 2003-09-09\n"
- "Xiph.Org/Sjeng.Org libVorbis I 20030909 (GTune 3, beta 2) EXPERIMENTAL;1.0 (GTune 3 Beta 2);UTC 2003-09-09\n"
- "Xiph.Org libVorbis I 20031230 (1.0.1);1.0.1 (CVS);UTC 2003-12-30\n"
- "Xiph.Org/Sjeng.Org libVorbis I 20031230 (GTune 3, beta 2);1.0.1 (GTune 3 Beta 2);UTC 2003-12-30\n"
- "AO aoTuV b2 [20040420] (based on Xiph.Org's 1.0.1);Beta 2;UTC 2004-04-20\n"
- "Xiph.Org libVorbis I 20040629;1.1;UTC 2004-06-29\n"
- "Xiph.Org libVorbis I 20040920;1.1 (with impulse_trigger_profile);UTC 2004-09-20\n"
- "AO aoTuV b3 [20041120] (based on Xiph.Org's libVorbis);Beta 3;UTC 2004-11-20\n"
- "Xiph.Org libVorbis I 20050304;1.1.1/1.1.2;UTC 2005-03-04\n"
- "AO aoTuV b4 [20050617] (based on Xiph.Org's libVorbis);Beta 4;UTC 2005-06-17\n"
- "BS Lancer [20050709] (based on aoTuV b4 [20050617]);(aoTuV Beta 4);UTC 2005-07-09\n"
- "AO aoTuV b4a [20051105] (based on Xiph.Org's libVorbis);Beta 4.5;UTC 2005-11-05\n"
- "AO aoTuV b4b [20051117] (based on Xiph.Org's libVorbis);Beta 4.51;UTC 2005-11-17\n"
- "BS Lancer [20051121] (based on aoTuV b4b [20051117]);(aoTuV Beta 4.51);UTC 2005-11-21\n"
- "AO aoTuV pre-beta5 [20060321] (based on Xiph.Org's libVorbis);Beta 5 (preBeta);UTC 2006-03-21\n"
- "AO aoTuV b5 [20061024] (based on Xiph.Org's libVorbis);Beta 5;UTC 2006-10-24\n"
- "Xiph.Org libVorbis I 20070622;1.2;UTC 2007-06-22\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_Summary (ZtringListList &Info)
-{
- Info.Separator_Set(0, __T("\n"));
- Info.Write(Ztring().From_UTF8(
- "General;[%Format%][ (%Format_Profile%)][ (%Format_Commercial_IfAny%)]$if(%Format%,$: $)%FileSize/String%[, %Duration/String%]\n"
- "Video;[%Language/String%, ][%BitRate/String%$if(%BitRate_Nominal/String%, \\(%BitRate_Nominal/String%\\)), ][%Width%*][%Height%][ (%DisplayAspectRatio/String%), ][$at$ %FrameRate/String%, ][%Format%][ (%CodecID/Hint%)][ (%Standard%)]$if(%MuxingMode%, \\(%MuxingMode%\\))$if(%Format_Version%, \\(%Format_Version%\\))$if(%Format_Profile%, \\(%Format_Profile%\\))$if(%Format_Settings%, \\(%Format_Settings%\\))[ (%Format_Commercial_IfAny%)]\n"
- "Audio;[%Language/String%, ][%BitRate/String%$if(%BitRate_Nominal/String%, \\(%BitRate_Nominal/String%\\)), ][%SamplingRate/String%, ][%BitDepth/String%, ][%Channel(s)_Original/String% / ][%Channel(s)/String%, ][%Format%][ (%CodecID/Hint%)]$if(%MuxingMode%, \\(%MuxingMode%\\))$if(%Format_Version%, \\(%Format_Version%\\))$if(%Format_Profile%, \\(%Format_Profile%\\))$if(%Format_Settings%, \\(%Format_Settings%\\))[ (%Format_Commercial_IfAny%)]\n"
- "Text;[%Language/String%, ][%Format%][ (%Format_Commercial_IfAny%)]$if(%MuxingMode%, \\(%MuxingMode%\\))\n"
- "Image;[%Language/String%, ][%Width%*][%Height%][ (%DisplayAspectRatio/String%)][, %Format%]\n"
- "Chapters;[%Language/String%, ]%Total% chapters[, %Format%][ (%Format_Commercial_IfAny%)]\n"
- ));
- Info.Separator_Set(0, ZenLib::EOL);
-}
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_MediaInfo.cpp b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_MediaInfo.cpp
deleted file mode 100644
index c00de7885..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_MediaInfo.cpp
+++ /dev/null
@@ -1,2733 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "MediaInfo/MediaInfo_Config.h"
-#include "ZenLib/ZtringListListF.h"
-#if MEDIAINFO_EVENTS
- #include "ZenLib/FileName.h"
-#endif //MEDIAINFO_EVENTS
-#if MEDIAINFO_IBI || MEDIAINFO_AES
- #include "base64.h"
-#endif //MEDIAINFO_IBI || MEDIAINFO_AES
-#include <algorithm>
-#if MEDIAINFO_DEMUX
- #include <cmath>
-#endif //MEDIAINFO_DEMUX
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-// Debug
-#ifdef MEDIAINFO_DEBUG
- #include <stdio.h>
- #include <windows.h>
- namespace MediaInfo_Config_MediaInfo_Debug
- {
- FILE* F;
- std::string Debug;
- SYSTEMTIME st_In;
-
- void Debug_Open(bool Out)
- {
- F=fopen("C:\\Temp\\MediaInfo_Debug.txt", "a+t");
- Debug.clear();
- SYSTEMTIME st;
- GetLocalTime( &st );
-
- char Duration[100];
- if (Out)
- {
- FILETIME ft_In;
- if (SystemTimeToFileTime(&st_In, &ft_In))
- {
- FILETIME ft_Out;
- if (SystemTimeToFileTime(&st, &ft_Out))
- {
- ULARGE_INTEGER UI_In;
- UI_In.HighPart=ft_In.dwHighDateTime;
- UI_In.LowPart=ft_In.dwLowDateTime;
-
- ULARGE_INTEGER UI_Out;
- UI_Out.HighPart=ft_Out.dwHighDateTime;
- UI_Out.LowPart=ft_Out.dwLowDateTime;
-
- ULARGE_INTEGER UI_Diff;
- UI_Diff.QuadPart=UI_Out.QuadPart-UI_In.QuadPart;
-
- FILETIME ft_Diff;
- ft_Diff.dwHighDateTime=UI_Diff.HighPart;
- ft_Diff.dwLowDateTime=UI_Diff.LowPart;
-
- SYSTEMTIME st_Diff;
- if (FileTimeToSystemTime(&ft_Diff, &st_Diff))
- {
- sprintf(Duration, "%02hd:%02hd:%02hd.%03hd", st_Diff.wHour, st_Diff.wMinute, st_Diff.wSecond, st_Diff.wMilliseconds);
- }
- else
- strcpy(Duration, " ");
- }
- else
- strcpy(Duration, " ");
-
- }
- else
- strcpy(Duration, " ");
- }
- else
- {
- st_In=st;
- strcpy(Duration, " ");
- }
-
- fprintf(F," %02hd:%02hd:%02hd.%03hd %s", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds, Duration);
- }
-
- void Debug_Close()
- {
- Debug += "\r\n";
- fwrite(Debug.c_str(), Debug.size(), 1, F); \
- fclose(F);
- }
- }
- using namespace MediaInfo_Config_MediaInfo_Debug;
-
- #define MEDIAINFO_DEBUG1(_NAME,_TOAPPEND) \
- Debug_Open(false); \
- Debug+=", ";Debug+=_NAME; \
- _TOAPPEND; \
- Debug_Close();
-
- #define MEDIAINFO_DEBUG2(_NAME,_TOAPPEND) \
- Debug_Open(true); \
- Debug+=", ";Debug+=_NAME; \
- _TOAPPEND; \
- Debug_Close();
-#else // MEDIAINFO_DEBUG
- #define MEDIAINFO_DEBUG1(_NAME,__TOAPPEND)
- #define MEDIAINFO_DEBUG2(_NAME,__TOAPPEND)
-#endif // MEDIAINFO_DEBUG
-
-namespace MediaInfoLib
-{
-
-const size_t Buffer_NormalSize=/*188*7;//*/64*1024;
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-MediaInfo_Config_MediaInfo::MediaInfo_Config_MediaInfo()
-{
- FileIsSeekable=true;
- FileIsSub=false;
- FileIsDetectingDuration=false;
- FileIsReferenced=false;
- FileTestContinuousFileNames=true;
- FileKeepInfo=false;
- FileStopAfterFilled=false;
- FileStopSubStreamAfterFilled=false;
- Audio_MergeMonoStreams=false;
- File_Demux_Interleave=false;
- File_ID_OnlyRoot=false;
- #if MEDIAINFO_ADVANCED
- File_IgnoreSequenceFileSize=false;
- File_IgnoreSequenceFilesCount=false;
- File_SequenceFilesSkipFrames=0;
- File_DefaultFrameRate=0;
- File_Source_List=false;
- File_RiskyBitRateEstimation=false;
- File_MergeBitRateInfo=true;
- #if MEDIAINFO_DEMUX
- File_Demux_Unpacketize_StreamLayoutChange_Skip=false;
- #endif //MEDIAINFO_DEMUX
- #endif //MEDIAINFO_ADVANCED
- #if MEDIAINFO_MD5
- File_Md5=false;
- #endif //MEDIAINFO_MD5
- #if defined(MEDIAINFO_REFERENCES_YES)
- File_CheckSideCarFiles=false;
- #endif //defined(MEDIAINFO_REFERENCES_YES)
- File_TimeToLive=0;
- File_Buffer_Size_Hint_Pointer=NULL;
- File_Buffer_Read_Size=64*1024*1024;
- #if MEDIAINFO_AES
- Encryption_Format=Encryption_Format_None;
- Encryption_Method=Encryption_Method_None;
- Encryption_Mode=Encryption_Mode_None;
- Encryption_Padding=Encryption_Padding_None;
- #endif //MEDIAINFO_AES
- #if MEDIAINFO_NEXTPACKET
- NextPacket=false;
- #endif //MEDIAINFO_NEXTPACKET
- #if MEDIAINFO_FILTER
- File_Filter_Audio=false;
- File_Filter_HasChanged_=false;
- #endif //MEDIAINFO_FILTER
- #if MEDIAINFO_EVENTS
- Event_CallBackFunction=NULL;
- Event_UserHandler=NULL;
- SubFile_StreamID=(int64u)-1;
- ParseUndecodableFrames=false;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_ForceIds=false;
- Demux_PCM_20bitTo16bit=false;
- Demux_PCM_20bitTo24bit=false;
- Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10=false;
- Demux_Hevc_Transcode_Iso14496_15_to_AnnexB=false;
- Demux_Unpacketize=false;
- Demux_Rate=0;
- Demux_FirstDts=(int64u)-1;
- Demux_FirstFrameNumber=(int64u)-1;
- Demux_InitData=0; //In Demux event
- #endif //MEDIAINFO_DEMUX
- #if MEDIAINFO_IBIUSAGE
- Ibi_UseIbiInfoIfAvailable=false;
- #endif //MEDIAINFO_IBIUSAGE
- #if MEDIAINFO_IBIUSAGE
- Ibi_Create=false;
- #endif //MEDIAINFO_IBIUSAGE
-
- //Specific
- File_MpegTs_ForceMenu=false;
- File_MpegTs_stream_type_Trust=true;
- File_MpegTs_Atsc_transport_stream_id_Trust=true;
- File_MpegTs_RealTime=false;
- File_Mxf_TimeCodeFromMaterialPackage=false;
- File_Bdmv_ParseTargetedFile=true;
- #if defined(MEDIAINFO_DVDIF_YES)
- File_DvDif_DisableAudioIfIsInContainer=false;
- File_DvDif_IgnoreTransmittingFlags=false;
- #endif //defined(MEDIAINFO_DVDIF_YES)
- #if defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- File_DvDif_Analysis=false;
- #endif //defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- #if MEDIAINFO_MACROBLOCKS
- File_Macroblocks_Parse=false;
- #endif //MEDIAINFO_MACROBLOCKS
- File_GrowingFile_Delay=10;
- #if defined(MEDIAINFO_LIBMMS_YES)
- File_Mmsh_Describe_Only=false;
- #endif //defined(MEDIAINFO_LIBMMS_YES)
- File_Eia608_DisplayEmptyStream=false;
- File_Eia708_DisplayEmptyStream=false;
- State=0;
- #if defined(MEDIAINFO_AC3_YES)
- File_Ac3_IgnoreCrc=false;
- #endif //defined(MEDIAINFO_AC3_YES)
-
- //Internal to MediaInfo, not thread safe
- File_Names_Pos=0;
- File_Buffer=NULL;
- File_Buffer_Size_Max=0;
- File_Buffer_Size_ToRead=Buffer_NormalSize;
- File_Buffer_Size=0;
- File_Buffer_Repeat=false;
- File_Buffer_Repeat_IsSupported=false;
- File_IsGrowing=false;
- File_IsNotGrowingAnymore=false;
- File_IsImageSequence=false;
- File_Current_Offset=0;
- File_Current_Size=(int64u)-1;
- File_IgnoreEditsBefore=0;
- File_IgnoreEditsAfter=(int64u)-1;
- File_EditRate=0;
- File_Size=(int64u)-1;
- ParseSpeed=MediaInfoLib::Config.ParseSpeed_Get();
- #if MEDIAINFO_EVENTS
- Config_PerPackage=NULL;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent=false;
- Demux_Offset_Frame=(int64u)-1;
- Demux_Offset_DTS=(int64u)-1;
- Demux_Offset_DTS_FromStream=(int64u)-1;
- Events_Delayed_CurrentSource=NULL;
- #if MEDIAINFO_SEEK
- Demux_IsSeeking=false;
- #endif //MEDIAINFO_SEEK
- #endif //MEDIAINFO_DEMUX
- #if MEDIAINFO_SEEK
- File_GoTo_IsFrameOffset=false;
- #endif //MEDIAINFO_SEEK
-}
-
-MediaInfo_Config_MediaInfo::~MediaInfo_Config_MediaInfo()
-{
- delete[] File_Buffer; //File_Buffer=NULL;
-
- #if MEDIAINFO_EVENTS
- for (events_delayed::iterator Event=Events_Delayed.begin(); Event!=Events_Delayed.end(); ++Event)
- for (size_t Pos=0; Pos<Event->second.size(); Pos++)
- delete Event->second[Pos]; //Event->second[Pos]=NULL;
- #endif //MEDIAINFO_EVENTS
-}
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-Ztring MediaInfo_Config_MediaInfo::Option (const String &Option, const String &Value)
-{
- #if MEDIAINFO_EVENTS
- SubFile_Config(Option)=Value;
- #endif //MEDIAINFO_EVENTS
-
- String Option_Lower(Option);
- size_t Egal_Pos=Option_Lower.find(__T('='));
- if (Egal_Pos==string::npos)
- Egal_Pos=Option_Lower.size();
- transform(Option_Lower.begin(), Option_Lower.begin()+Egal_Pos, Option_Lower.begin(), (int(*)(int))tolower); //(int(*)(int)) is a patch for unix
-
- if (Option_Lower==__T("file_isseekable"))
- {
- File_IsSeekable_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_isseekable_get"))
- {
- return File_IsSeekable_Get()?"1":"0";
- }
- if (Option_Lower==__T("file_issub"))
- {
- File_IsSub_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_issub_get"))
- {
- return File_IsSub_Get()?"1":"0";
- }
- if (Option_Lower==__T("file_isdetectingduration"))
- {
- File_IsDetectingDuration_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_isdetectingduration_get"))
- {
- return File_IsDetectingDuration_Get()?"1":"0";
- }
- if (Option_Lower==__T("file_isreferenced"))
- {
- File_IsReferenced_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_isreferenced_get"))
- {
- return File_IsReferenced_Get()?"1":"0";
- }
- if (Option_Lower==__T("file_testcontinuousfilenames"))
- {
- File_TestContinuousFileNames_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_testcontinuousfilenames_get"))
- {
- return File_TestContinuousFileNames_Get()?"1":"0";
- }
- if (Option_Lower==__T("file_keepinfo"))
- {
- File_KeepInfo_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_keepinfo_get"))
- {
- return File_KeepInfo_Get()?"1":"0";
- }
- if (Option_Lower==__T("file_stopafterfilled"))
- {
- File_StopAfterFilled_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_stopafterfilled_get"))
- {
- return File_StopAfterFilled_Get()?"1":"0";
- }
- if (Option_Lower==__T("file_stopsubstreamafterfilled"))
- {
- File_StopSubStreamAfterFilled_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_stopsubstreamafterfilled_get"))
- {
- return File_StopSubStreamAfterFilled_Get()?"1":"0";
- }
- if (Option_Lower==__T("file_audio_mergemonostreams"))
- {
- File_Audio_MergeMonoStreams_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_audio_mergemonostreams_get"))
- {
- return File_Audio_MergeMonoStreams_Get()?"1":"0";
- }
- else if (Option_Lower==__T("file_demux_interleave"))
- {
- File_Demux_Interleave_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_demux_interleave_get"))
- {
- return File_Demux_Interleave_Get()?"1":"0";
- }
- else if (Option_Lower==__T("file_id_onlyroot"))
- {
- File_ID_OnlyRoot_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_id_onlyroot_get"))
- {
- return File_ID_OnlyRoot_Get()?"1":"0";
- }
- else if (Option_Lower==__T("file_ignoresequencefilescount"))
- {
- #if MEDIAINFO_MD5
- File_IgnoreSequenceFilesCount_Set(!(Value==__T("0") || Value.empty()));
- return Ztring();
- #else //MEDIAINFO_MD5
- return __T("Disabled due to compilation options");
- #endif //MEDIAINFO_MD5
- }
- else if (Option_Lower==__T("file_sequencefilesskipframes") || Option_Lower==__T("file_sequencefileskipframes"))
- {
- #if MEDIAINFO_ADVANCED
- File_SequenceFilesSkipFrames_Set(Ztring(Value).To_int64u());
- return Ztring();
- #else //MEDIAINFO_ADVANCED
- return __T("Disabled due to compilation options");
- #endif //MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("file_defaultframerate"))
- {
- #if MEDIAINFO_MD5
- File_DefaultFrameRate_Set(Ztring(Value).To_float64());
- return Ztring();
- #else //MEDIAINFO_MD5
- return __T("File_DefaultFrameRate is disabled due to compilation options");
- #endif //MEDIAINFO_MD5
- }
- else if (Option_Lower==__T("file_source_list"))
- {
- #if MEDIAINFO_MD5
- File_Source_List_Set(!(Value==__T("0") || Value.empty()));
- return Ztring();
- #else //MEDIAINFO_MD5
- return __T("MD5 is disabled due to compilation options");
- #endif //MEDIAINFO_MD5
- }
- else if (Option_Lower==__T("file_riskybitrateestimation"))
- {
- #if MEDIAINFO_ADVANCED
- File_RiskyBitRateEstimation_Set(!(Value==__T("0") || Value.empty()));
- return Ztring();
- #else //MEDIAINFO_ADVANCED
- return __T("Advanced features are disabled due to compilation options");
- #endif //MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("file_mergebitrateinfo"))
- {
- #if MEDIAINFO_ADVANCED
- File_MergeBitRateInfo_Set(!(Value==__T("0") || Value.empty()));
- return Ztring();
- #else //MEDIAINFO_ADVANCED
- return __T("Advanced features are disabled due to compilation options");
- #endif //MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("file_demux_unpacketize_streamlayoutchange_skip"))
- {
- #if MEDIAINFO_DEMUX
- #if MEDIAINFO_ADVANCED
- File_Demux_Unpacketize_StreamLayoutChange_Skip_Set(!(Value==__T("0") || Value.empty()));
- return Ztring();
- #else //MEDIAINFO_ADVANCED
- return __T("Advanced features disabled due to compilation options");
- #endif //MEDIAINFO_ADVANCED
- #else //MEDIAINFO_ADVANCED
- return __T("Advanced features disabled due to compilation options");
- #endif //MEDIAINFO_ADVANCED
- }
- else if (Option_Lower==__T("file_md5"))
- {
- #if MEDIAINFO_MD5
- File_Md5_Set(!(Value==__T("0") || Value.empty()));
- return Ztring();
- #else //MEDIAINFO_MD5
- return __T("MD5 is disabled due to compilation options");
- #endif //MEDIAINFO_MD5
- }
- else if (Option_Lower==__T("file_checksidecarfiles"))
- {
- #if defined(MEDIAINFO_REFERENCES_YES)
- File_CheckSideCarFiles_Set(!(Value==__T("0") || Value.empty()));
- return Ztring();
- #else //defined(MEDIAINFO_REFERENCES_YES)
- return __T("Disabled due to compilation options");
- #endif //defined(MEDIAINFO_REFERENCES_YES)
- }
- else if (Option_Lower==__T("file_filename"))
- {
- File_FileName_Set(Value);
- return __T("");
- }
- else if (Option_Lower==__T("file_filename_get"))
- {
- return File_FileName_Get();
- }
- else if (Option_Lower==__T("file_filenameformat"))
- {
- File_FileNameFormat_Set(Value);
- return __T("");
- }
- else if (Option_Lower==__T("file_filenameformat_get"))
- {
- return File_FileNameFormat_Get();
- }
- else if (Option_Lower==__T("file_timetolive"))
- {
- File_TimeToLive_Set(Ztring(Value).To_float64());
- return __T("");
- }
- else if (Option_Lower==__T("file_timetolive_get"))
- {
- return Ztring::ToZtring(File_TimeToLive_Get(), 9);
- }
- else if (Option_Lower==__T("file_partial_begin"))
- {
- File_Partial_Begin_Set(Value);
- return __T("");
- }
- else if (Option_Lower==__T("file_partial_begin_get"))
- {
- return File_Partial_Begin_Get();
- }
- else if (Option_Lower==__T("file_partial_end"))
- {
- File_Partial_End_Set(Value);
- return __T("");
- }
- else if (Option_Lower==__T("file_partial_end_get"))
- {
- return File_Partial_End_Get();
- }
- else if (Option_Lower==__T("file_forceparser"))
- {
- File_ForceParser_Set(Value);
- return __T("");
- }
- else if (Option_Lower==__T("file_forceparser_get"))
- {
- return File_ForceParser_Get();
- }
- else if (Option_Lower==__T("file_buffer_size_hint_pointer"))
- {
- File_Buffer_Size_Hint_Pointer_Set((size_t*)Ztring(Value).To_int64u());
- return __T("");
- }
- else if (Option_Lower==__T("file_buffer_size_hint_pointer_get"))
- {
- return Ztring::ToZtring((size_t)File_Buffer_Size_Hint_Pointer_Get());
- }
- else if (Option_Lower==__T("file_buffer_read_size"))
- {
- File_Buffer_Read_Size_Set((size_t)Ztring(Value).To_int64u());
- return __T("");
- }
- else if (Option_Lower==__T("file_buffer_read_size_get"))
- {
- return Ztring::ToZtring((size_t)File_Buffer_Read_Size_Get());
- }
- else if (Option_Lower==__T("file_filter"))
- {
- #if MEDIAINFO_FILTER
- Ztring ValueLowerCase=Ztring(Value).MakeLowerCase();
- if (ValueLowerCase==__T("audio"))
- File_Filter_Audio_Set(true);
- else
- File_Filter_Set(ValueLowerCase.To_int64u());
- return Ztring();
- #else //MEDIAINFO_FILTER
- return __T("Filter manager is disabled due to compilation options");
- #endif //MEDIAINFO_FILTER
- }
- else if (Option_Lower==__T("file_filter_get"))
- {
- #if MEDIAINFO_FILTER
- return Ztring();//.From_Number(File_Filter_Get());
- #else //MEDIAINFO_FILTER
- return __T("Filter manager is disabled due to compilation options");
- #endif //MEDIAINFO_FILTER
- }
- else if (Option_Lower==__T("file_duplicate"))
- {
- #if MEDIAINFO_DUPLICATE
- return File_Duplicate_Set(Value);
- #else //MEDIAINFO_DUPLICATE
- return __T("Duplicate manager is disabled due to compilation options");
- #endif //MEDIAINFO_DUPLICATE
- }
- else if (Option_Lower==__T("file_duplicate_get"))
- {
- #if MEDIAINFO_DUPLICATE
- //if (File_Duplicate_Get())
- return __T("1");
- //else
- // return __T("");
- #else //MEDIAINFO_DUPLICATE
- return __T("Duplicate manager is disabled due to compilation options");
- #endif //MEDIAINFO_DUPLICATE
- }
- else if (Option_Lower==__T("file_demux_forceids"))
- {
- #if MEDIAINFO_DEMUX
- if (Ztring(Value).To_int64u()==0)
- Demux_ForceIds_Set(false);
- else
- Demux_ForceIds_Set(true);
- return Ztring();
- #else //MEDIAINFO_DEMUX
- return __T("Demux manager is disabled due to compilation options");
- #endif //MEDIAINFO_DEMUX
- }
- else if (Option_Lower==__T("file_demux_pcm_20bitto16bit"))
- {
- #if MEDIAINFO_DEMUX
- if (Ztring(Value).To_int64u()==0)
- Demux_PCM_20bitTo16bit_Set(false);
- else
- Demux_PCM_20bitTo16bit_Set(true);
- return Ztring();
- #else //MEDIAINFO_DEMUX
- return __T("Demux manager is disabled due to compilation options");
- #endif //MEDIAINFO_DEMUX
- }
- else if (Option_Lower==__T("file_demux_pcm_20bitto24bit"))
- {
- #if MEDIAINFO_DEMUX
- if (Ztring(Value).To_int64u()==0)
- Demux_PCM_20bitTo24bit_Set(false);
- else
- Demux_PCM_20bitTo24bit_Set(true);
- return Ztring();
- #else //MEDIAINFO_DEMUX
- return __T("Demux manager is disabled due to compilation options");
- #endif //MEDIAINFO_DEMUX
- }
- else if (Option_Lower==__T("file_demux_avc_transcode_iso14496_15_to_iso14496_10"))
- {
- #if MEDIAINFO_DEMUX
- if (Ztring(Value).To_int64u()==0)
- Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10_Set(false);
- else
- Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10_Set(true);
- return Ztring();
- #else //MEDIAINFO_DEMUX
- return __T("Demux manager is disabled due to compilation options");
- #endif //MEDIAINFO_DEMUX
- }
- else if (Option_Lower==__T("file_demux_hevc_transcode_iso14496_15_to_annexb"))
- {
- #if MEDIAINFO_DEMUX
- if (Ztring(Value).To_int64u()==0)
- Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Set(false);
- else
- Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Set(true);
- return Ztring();
- #else //MEDIAINFO_DEMUX
- return __T("Demux manager is disabled due to compilation options");
- #endif //MEDIAINFO_DEMUX
- }
- else if (Option_Lower==__T("file_demux_unpacketize"))
- {
- #if MEDIAINFO_DEMUX
- if (Ztring(Value).To_int64u()==0)
- Demux_Unpacketize_Set(false);
- else
- Demux_Unpacketize_Set(true);
- return Ztring();
- #else //MEDIAINFO_DEMUX
- return __T("Demux manager is disabled due to compilation options");
- #endif //MEDIAINFO_DEMUX
- }
- else if (Option_Lower==__T("file_demux_rate"))
- {
- #if MEDIAINFO_DEMUX
- Demux_Rate_Set(Ztring(Value).To_float64());
- return Ztring();
- #else //MEDIAINFO_DEMUX
- return __T("Demux manager is disabled due to compilation options");
- #endif //MEDIAINFO_DEMUX
- }
- else if (Option_Lower==__T("file_demux_firstdts"))
- {
- #if MEDIAINFO_DEMUX
- int64u ValueInt64u;
- if (Value.find(__T(":"))!=string::npos)
- {
- Ztring ValueZ=Value;
- ValueInt64u=0;
- size_t Value_Pos=ValueZ.find(__T(":"));
- if (Value_Pos==string::npos)
- Value_Pos=ValueZ.size();
- ValueInt64u+=Ztring(ValueZ.substr(0, Value_Pos)).To_int64u()*60*60*1000*1000*1000;
- ValueZ.erase(0, Value_Pos+1);
- Value_Pos=ValueZ.find(__T(":"));
- if (Value_Pos==string::npos)
- Value_Pos=ValueZ.size();
- ValueInt64u+=Ztring(ValueZ.substr(0, Value_Pos)).To_int64u()*60*1000*1000*1000;
- ValueZ.erase(0, Value_Pos+1);
- Value_Pos=ValueZ.find(__T("."));
- if (Value_Pos==string::npos)
- Value_Pos=ValueZ.size();
- ValueInt64u+=Ztring(ValueZ.substr(0, Value_Pos)).To_int64u()*1000*1000*1000;
- ValueZ.erase(0, Value_Pos+1);
- if (!ValueZ.empty())
- ValueInt64u+=Ztring(ValueZ).To_int64u()*1000*1000*1000/(int64u)pow(10.0, (int)ValueZ.size());
- }
- else
- ValueInt64u=Ztring(Value).To_int64u();
- Demux_FirstDts_Set(ValueInt64u);
- return Ztring();
- #else //MEDIAINFO_DEMUX
- return __T("Demux manager is disabled due to compilation options");
- #endif //MEDIAINFO_DEMUX
- }
- else if (Option_Lower==__T("file_demux_firstframenumber"))
- {
- #if MEDIAINFO_DEMUX
- Demux_FirstFrameNumber_Set(Ztring(Value).To_int64u());
- return Ztring();
- #else //MEDIAINFO_DEMUX
- return __T("Demux manager is disabled due to compilation options");
- #endif //MEDIAINFO_DEMUX
- }
- else if (Option_Lower==__T("file_demux_initdata"))
- {
- #if MEDIAINFO_DEMUX
- Ztring Value_Lower(Value); Value_Lower.MakeLowerCase();
- if (Value_Lower==__T("event")) Demux_InitData_Set(0);
- else if (Value_Lower==__T("field")) Demux_InitData_Set(1);
- else return __T("Invalid value");
- return Ztring();
- #else //MEDIAINFO_DEMUX
- return __T("Demux manager is disabled due to compilation options");
- #endif //MEDIAINFO_DEMUX
- }
- else if (Option_Lower==__T("file_ibi"))
- {
- #if MEDIAINFO_IBIUSAGE
- Ibi_Set(Value);
- return Ztring();
- #else //MEDIAINFO_IBIUSAGE
- return __T("IBI support is disabled due to compilation options");
- #endif //MEDIAINFO_IBIUSAGE
- }
- else if (Option_Lower==__T("file_ibi_create"))
- {
- #if MEDIAINFO_IBIUSAGE
- if (Ztring(Value).To_int64u()==0)
- Ibi_Create_Set(false);
- else
- Ibi_Create_Set(true);
- return Ztring();
- #else //MEDIAINFO_IBIUSAGE
- return __T("IBI support is disabled due to compilation options");
- #endif //MEDIAINFO_IBIUSAGE
- }
- else if (Option_Lower==__T("file_ibi_useibiinfoifavailable"))
- {
- #if MEDIAINFO_IBIUSAGE
- if (Ztring(Value).To_int64u()==0)
- Ibi_UseIbiInfoIfAvailable_Set(false);
- else
- Ibi_UseIbiInfoIfAvailable_Set(true);
- return Ztring();
- #else //MEDIAINFO_IBIUSAGE
- return __T("IBI support is disabled due to compilation options");
- #endif //MEDIAINFO_IBIUSAGE
- }
- else if (Option_Lower==__T("file_encryption_format"))
- {
- #if MEDIAINFO_AES
- Encryption_Format_Set(Value);
- return Ztring();
- #else //MEDIAINFO_AES
- return __T("Encryption manager is disabled due to compilation options");
- #endif //MEDIAINFO_AES
- }
- else if (Option_Lower==__T("file_encryption_key"))
- {
- #if MEDIAINFO_AES
- Encryption_Key_Set(Value);
- return Ztring();
- #else //MEDIAINFO_AES
- return __T("Encryption manager is disabled due to compilation options");
- #endif //MEDIAINFO_AES
- }
- else if (Option_Lower==__T("file_encryption_method"))
- {
- #if MEDIAINFO_AES
- Encryption_Method_Set(Value);
- return Ztring();
- #else //MEDIAINFO_AES
- return __T("Encryption manager is disabled due to compilation options");
- #endif //MEDIAINFO_AES
- }
- else if (Option_Lower==__T("file_encryption_mode") || Option_Lower==__T("file_encryption_modeofoperation"))
- {
- #if MEDIAINFO_AES
- Encryption_Mode_Set(Value);
- return Ztring();
- #else //MEDIAINFO_AES
- return __T("Encryption manager is disabled due to compilation options");
- #endif //MEDIAINFO_AES
- }
- else if (Option_Lower==__T("file_encryption_padding"))
- {
- #if MEDIAINFO_AES
- Encryption_Padding_Set(Value);
- return Ztring();
- #else //MEDIAINFO_AES
- return __T("Encryption manager is disabled due to compilation options");
- #endif //MEDIAINFO_AES
- }
- else if (Option_Lower==__T("file_encryption_initializationvector"))
- {
- #if MEDIAINFO_AES
- Encryption_InitializationVector_Set(Value);
- return Ztring();
- #else //MEDIAINFO_AES
- return __T("Encryption manager is disabled due to compilation options");
- #endif //MEDIAINFO_AES
- }
- else if (Option_Lower==__T("file_nextpacket"))
- {
- #if MEDIAINFO_NEXTPACKET
- if (Ztring(Value).To_int64u()==0)
- NextPacket_Set(false);
- else
- NextPacket_Set(true);
- return Ztring();
- #else //MEDIAINFO_NEXTPACKET
- return __T("NextPacket manager is disabled due to compilation options");
- #endif //MEDIAINFO_NEXTPACKET
- }
- else if (Option_Lower==__T("file_subfile_streamid_set"))
- {
- #if MEDIAINFO_EVENTS
- SubFile_StreamID_Set(Value.empty()?(int64u)-1:Ztring(Value).To_int64u());
- return Ztring();
- #else //MEDIAINFO_EVENTS
- return __T("Event manager is disabled due to compilation options");
- #endif //MEDIAINFO_EVENTS
- }
- else if (Option_Lower==__T("file_subfile_ids_set"))
- {
- #if MEDIAINFO_EVENTS
- SubFile_IDs_Set(Value);
- return Ztring();
- #else //MEDIAINFO_EVENTS
- return __T("Event manager is disabled due to compilation options");
- #endif //MEDIAINFO_EVENTS
- }
- else if (Option_Lower==__T("file_parseundecodableframes"))
- {
- #if MEDIAINFO_EVENTS
- ParseUndecodableFrames_Set(!(Value==__T("0") || Value.empty()));
- return Ztring();
- #else //MEDIAINFO_EVENTS
- return __T("Event manager is disabled due to compilation options");
- #endif //MEDIAINFO_EVENTS
- }
- else if (Option_Lower==__T("file_mpegts_forcemenu"))
- {
- File_MpegTs_ForceMenu_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_mpegts_forcemenu_get"))
- {
- return File_MpegTs_ForceMenu_Get()?"1":"0";
- }
- else if (Option_Lower==__T("file_mpegts_stream_type_trust"))
- {
- File_MpegTs_stream_type_Trust_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_mpegts_stream_type_trust_get"))
- {
- return File_MpegTs_stream_type_Trust_Get()?"1":"0";
- }
- else if (Option_Lower==__T("file_mpegts_atsc_transport_stream_id_trust"))
- {
- File_MpegTs_Atsc_transport_stream_id_Trust_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_mpegts_atsc_transport_stream_id_trust_get"))
- {
- return File_MpegTs_Atsc_transport_stream_id_Trust_Get()?"1":"0";
- }
- else if (Option_Lower==__T("file_mpegts_realtime"))
- {
- File_MpegTs_RealTime_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_mpegts_realtime_get"))
- {
- return File_MpegTs_RealTime_Get()?"1":"0";
- }
- else if (Option_Lower==__T("file_mxf_timecodefrommaterialpackage"))
- {
- File_Mxf_TimeCodeFromMaterialPackage_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_mxf_timecodefrommaterialpackage_get"))
- {
- return File_Mxf_TimeCodeFromMaterialPackage_Get()?"1":"0";
- }
- else if (Option_Lower==__T("file_bdmv_parsetargetedfile"))
- {
- File_Bdmv_ParseTargetedFile_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_bdmv_parsetargetedfile_get"))
- {
- return File_Bdmv_ParseTargetedFile_Get()?"1":"0";
- }
- else if (Option_Lower==__T("file_dvdif_disableaudioifisincontainer"))
- {
- #if defined(MEDIAINFO_DVDIF_YES)
- File_DvDif_DisableAudioIfIsInContainer_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- #else //defined(MEDIAINFO_DVDIF_YES)
- return __T("DVDIF is disabled due to compilation options");
- #endif //defined(MEDIAINFO_DVDIF_YES)
- }
- else if (Option_Lower==__T("file_dvdif_disableaudioifisincontainer_get"))
- {
- #if defined(MEDIAINFO_DVDIF_YES)
- return File_DvDif_DisableAudioIfIsInContainer_Get()?"1":"0";
- #else //defined(MEDIAINFO_DVDIF_YES)
- return __T("DVDIF is disabled due to compilation options");
- #endif //defined(MEDIAINFO_DVDIF_YES)
- }
- else if (Option_Lower==__T("file_dvdif_ignoretransmittingflags"))
- {
- #if defined(MEDIAINFO_DVDIF_YES)
- File_DvDif_IgnoreTransmittingFlags_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- #else //defined(MEDIAINFO_DVDIF_YES)
- return __T("DVDIF is disabled due to compilation options");
- #endif //defined(MEDIAINFO_DVDIF_YES)
- }
- else if (Option_Lower==__T("file_dvdif_ignoretransmittingflags_get"))
- {
- #if defined(MEDIAINFO_DVDIF_YES)
- return File_DvDif_IgnoreTransmittingFlags_Get()?"1":"0";
- #else //defined(MEDIAINFO_DVDIF_YES)
- return __T("DVDIF is disabled due to compilation options");
- #endif //defined(MEDIAINFO_DVDIF_YES)
- }
- else if (Option_Lower==__T("file_dvdif_analysis"))
- {
- #if defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- File_DvDif_Analysis_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- #else //defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- return __T("DVDIF Analysis is disabled due to compilation options");
- #endif //defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- }
- else if (Option_Lower==__T("file_dvdif_analysis_get"))
- {
- #if defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- return File_DvDif_Analysis_Get()?"1":"0";
- #else //defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- return __T("DVDIF Analysis is disabled due to compilation options");
- #endif //defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- }
- else if (Option_Lower==__T("file_macroblocks_parse"))
- {
- #if MEDIAINFO_MACROBLOCKS
- File_Macroblocks_Parse_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- #else //MEDIAINFO_MACROBLOCKS
- return __T("Macroblock parsing is disabled due to compilation options");
- #endif //MEDIAINFO_MACROBLOCKS
- }
- else if (Option_Lower==__T("file_macroblocks_parse_get"))
- {
- #if MEDIAINFO_MACROBLOCKS
- return File_Macroblocks_Parse_Get()?"1":"0";
- #else //MEDIAINFO_MACROBLOCKS
- return __T("Macroblock parsing is disabled due to compilation options");
- #endif //MEDIAINFO_MACROBLOCKS
- }
- else if (Option_Lower==__T("file_growingfile_delay"))
- {
- File_GrowingFile_Delay_Set(Ztring(Value).To_float64());
- return Ztring();
- }
- else if (Option_Lower==__T("file_growingfile_delay_get"))
- {
- return Ztring::ToZtring(File_GrowingFile_Delay_Get());
- }
- else if (Option_Lower==__T("file_curl"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- File_Curl_Set(Value);
- return __T("");
- #else //defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif //defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower.find(__T("file_curl,"))==0 || Option_Lower.find(__T("file_curl;"))==0)
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- File_Curl_Set(Option.substr(10), Value);
- return __T("");
- #else //defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif //defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower==__T("file_curl_get"))
- {
- #if defined(MEDIAINFO_LIBCURL_YES)
- return File_Curl_Get(Value);
- #else //defined(MEDIAINFO_LIBCURL_YES)
- return __T("Libcurl support is disabled due to compilation options");
- #endif //defined(MEDIAINFO_LIBCURL_YES)
- }
- else if (Option_Lower==__T("file_mmsh_describe_only"))
- {
- #if defined(MEDIAINFO_LIBMMS_YES)
- File_Mmsh_Describe_Only_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- #else //defined(MEDIAINFO_LIBMMS_YES)
- return __T("Libmms support is disabled due to compilation options");
- #endif //defined(MEDIAINFO_LIBMMS_YES)
- }
- else if (Option_Lower==__T("file_mmsh_describe_only_get"))
- {
- #if defined(MEDIAINFO_LIBMMS_YES)
- return File_Mmsh_Describe_Only_Get()?"1":"0";
- #else //defined(MEDIAINFO_LIBMMS_YES)
- return __T("Libmms support is disabled due to compilation options");
- #endif //defined(MEDIAINFO_LIBMMS_YES)
- }
- else if (Option_Lower==__T("file_eia708_displayemptystream"))
- {
- File_Eia708_DisplayEmptyStream_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_eia708_displayemptystream_get"))
- {
- return File_Eia708_DisplayEmptyStream_Get()?"1":"0";
- }
- else if (Option_Lower==__T("file_eia608_displayemptystream"))
- {
- File_Eia608_DisplayEmptyStream_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- }
- else if (Option_Lower==__T("file_eia608_displayemptystream_get"))
- {
- return File_Eia608_DisplayEmptyStream_Get()?"1":"0";
- }
- else if (Option_Lower==__T("file_ac3_ignorecrc"))
- {
- #if defined(MEDIAINFO_AC3_YES)
- File_Ac3_IgnoreCrc_Set(!(Value==__T("0") || Value.empty()));
- return __T("");
- #else //defined(MEDIAINFO_AC3_YES)
- return __T("AC-3 support is disabled due to compilation options");
- #endif //defined(MEDIAINFO_AC3_YES)
- }
- else if (Option_Lower==__T("file_ac3_ignorecrc_get"))
- {
- #if defined(MEDIAINFO_AC3_YES)
- return File_Ac3_IgnoreCrc_Get()?"1":"0";
- #else //defined(MEDIAINFO_AC3_YES)
- return __T("AC-3 support is disabled due to compilation options");
- #endif //defined(MEDIAINFO_AC3_YES)
- }
- else if (Option_Lower==__T("file_event_callbackfunction"))
- {
- #if MEDIAINFO_EVENTS
- return Event_CallBackFunction_Set(Value);
- #else //MEDIAINFO_EVENTS
- return __T("Event manager is disabled due to compilation options");
- #endif //MEDIAINFO_EVENTS
- }
- else
- return __T("Option not known");
-}
-
-//***************************************************************************
-// File Is Seekable
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_IsSeekable_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- FileIsSeekable=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_IsSeekable_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return FileIsSeekable;
-}
-
-//***************************************************************************
-// File Is Sub
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_IsSub_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- FileIsSub=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_IsSub_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return FileIsSub;
-}
-
-//***************************************************************************
-// File Is Detecting Duration
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_IsDetectingDuration_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- FileIsDetectingDuration=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_IsDetectingDuration_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return FileIsDetectingDuration;
-}
-
-//***************************************************************************
-// File Is Referenced
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_IsReferenced_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- FileIsReferenced=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_IsReferenced_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return FileIsReferenced;
-}
-
-//***************************************************************************
-// File Keep Info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_KeepInfo_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- FileKeepInfo=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_KeepInfo_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return FileKeepInfo;
-}
-
-//***************************************************************************
-// File test continuous file names
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_TestContinuousFileNames_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- FileTestContinuousFileNames=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_TestContinuousFileNames_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return FileTestContinuousFileNames;
-}
-
-//***************************************************************************
-// Stop after filled
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_StopAfterFilled_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- FileStopAfterFilled=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_StopAfterFilled_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return FileStopAfterFilled;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_StopSubStreamAfterFilled_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- FileStopSubStreamAfterFilled=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_StopSubStreamAfterFilled_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return FileStopSubStreamAfterFilled;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_Audio_MergeMonoStreams_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Audio_MergeMonoStreams=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Audio_MergeMonoStreams_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Audio_MergeMonoStreams;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_Demux_Interleave_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Demux_Interleave=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Demux_Interleave_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_Demux_Interleave;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_ID_OnlyRoot_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_ID_OnlyRoot=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_ID_OnlyRoot_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_ID_OnlyRoot;
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_MD5
-void MediaInfo_Config_MediaInfo::File_Md5_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Md5=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Md5_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_Md5;
-}
-#endif //MEDIAINFO_MD5
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_REFERENCES_YES)
-void MediaInfo_Config_MediaInfo::File_CheckSideCarFiles_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_CheckSideCarFiles=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_CheckSideCarFiles_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_CheckSideCarFiles;
-}
-#endif //defined(MEDIAINFO_REFERENCES_YES)
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config_MediaInfo::File_IgnoreSequenceFileSize_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_IgnoreSequenceFileSize=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_IgnoreSequenceFileSize_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_IgnoreSequenceFileSize;
-}
-#endif //MEDIAINFO_ADVANCED
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config_MediaInfo::File_IgnoreSequenceFilesCount_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_IgnoreSequenceFilesCount=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_IgnoreSequenceFilesCount_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_IgnoreSequenceFilesCount;
-}
-#endif //MEDIAINFO_ADVANCED
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config_MediaInfo::File_SequenceFilesSkipFrames_Set (int64u NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_SequenceFilesSkipFrames=NewValue;
-}
-
-int64u MediaInfo_Config_MediaInfo::File_SequenceFilesSkipFrames_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_SequenceFilesSkipFrames;
-}
-#endif //MEDIAINFO_ADVANCED
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config_MediaInfo::File_DefaultFrameRate_Set (float64 NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_DefaultFrameRate=NewValue;
- #if MEDIAINFO_DEMUX
- Demux_Rate=File_DefaultFrameRate;
- #endif //MEDIAINFO_DEMUX
-}
-
-float64 MediaInfo_Config_MediaInfo::File_DefaultFrameRate_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_DefaultFrameRate;
-}
-#endif //MEDIAINFO_ADVANCED
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config_MediaInfo::File_Source_List_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Source_List=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Source_List_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_Source_List;
-}
-#endif //MEDIAINFO_ADVANCED
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config_MediaInfo::File_RiskyBitRateEstimation_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_RiskyBitRateEstimation=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_RiskyBitRateEstimation_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_RiskyBitRateEstimation;
-}
-#endif //MEDIAINFO_ADVANCED
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config_MediaInfo::File_MergeBitRateInfo_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_MergeBitRateInfo=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_MergeBitRateInfo_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_MergeBitRateInfo;
-}
-#endif //MEDIAINFO_ADVANCED
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-#if MEDIAINFO_ADVANCED
-void MediaInfo_Config_MediaInfo::File_Demux_Unpacketize_StreamLayoutChange_Skip_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Demux_Unpacketize_StreamLayoutChange_Skip=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Demux_Unpacketize_StreamLayoutChange_Skip_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_Demux_Unpacketize_StreamLayoutChange_Skip;
-}
-#endif //MEDIAINFO_ADVANCED
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// File name from somewhere else
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_FileName_Set (const Ztring &NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_FileName=NewValue;
-}
-
-Ztring MediaInfo_Config_MediaInfo::File_FileName_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_FileName;
-}
-
-//***************************************************************************
-// File name format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_FileNameFormat_Set (const Ztring &NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_FileNameFormat=NewValue;
-}
-
-Ztring MediaInfo_Config_MediaInfo::File_FileNameFormat_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_FileNameFormat;
-}
-
-//***************************************************************************
-// Time to live
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_TimeToLive_Set (float64 NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_TimeToLive=NewValue;
-}
-
-float64 MediaInfo_Config_MediaInfo::File_TimeToLive_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_TimeToLive;
-}
-
-//***************************************************************************
-// Partial file (begin and end are cut)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_Partial_Begin_Set (const Ztring &NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Partial_Begin=NewValue;
-}
-
-Ztring MediaInfo_Config_MediaInfo::File_Partial_Begin_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_Partial_Begin;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_Partial_End_Set (const Ztring &NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Partial_End=NewValue;
-}
-
-Ztring MediaInfo_Config_MediaInfo::File_Partial_End_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_Partial_End;
-}
-
-//***************************************************************************
-// Force Parser
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_ForceParser_Set (const Ztring &NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_ForceParser=NewValue;
-}
-
-Ztring MediaInfo_Config_MediaInfo::File_ForceParser_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_ForceParser;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_Buffer_Size_Hint_Pointer_Set (size_t* NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Buffer_Size_Hint_Pointer=NewValue;
-}
-
-size_t* MediaInfo_Config_MediaInfo::File_Buffer_Size_Hint_Pointer_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_Buffer_Size_Hint_Pointer;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_Buffer_Read_Size_Set (size_t NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Buffer_Read_Size=NewValue;
-}
-
-size_t MediaInfo_Config_MediaInfo::File_Buffer_Read_Size_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_Buffer_Read_Size;
-}
-
-//***************************************************************************
-// Filter
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_FILTER
-void MediaInfo_Config_MediaInfo::File_Filter_Set (int64u NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Filter_16[(int16u)NewValue]=true;
- File_Filter_HasChanged_=true;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Filter_Get (const int16u Value)
-{
- CriticalSectionLocker CSL(CS);
- //Test
- bool Exists;
- if (File_Filter_16.empty())
- Exists=true;
- else
- Exists=(File_Filter_16.find(Value)!=File_Filter_16.end());
- return Exists;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Filter_Get ()
-{
- CriticalSectionLocker CSL(CS);
- bool Exist=!File_Filter_16.empty();
- return Exist;
-}
-
-void MediaInfo_Config_MediaInfo::File_Filter_Audio_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Filter_Audio=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Filter_Audio_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return File_Filter_Audio;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Filter_HasChanged ()
-{
- CriticalSectionLocker CSL(CS);
- bool File_Filter_HasChanged_Temp=File_Filter_HasChanged_;
- File_Filter_HasChanged_=false;
- return File_Filter_HasChanged_Temp;
-}
-#endif //MEDIAINFO_FILTER
-
-//***************************************************************************
-// Duplicate
-//***************************************************************************
-
-#if MEDIAINFO_DUPLICATE
-Ztring MediaInfo_Config_MediaInfo::File_Duplicate_Set (const Ztring &Value_In)
-{
- //Preparing for File__Duplicate...
- CS.Enter();
- File__Duplicate_List.push_back(Value_In);
-
- //Handling Memory index
- Ztring ToReturn;
- ZtringList List=Value_In;
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- //Form= "(-)Data", if "-" the value will be removed
- Ztring &Value=List[Pos];
- bool ToRemove=false;
- if (Value.find(__T('-'))==0)
- {
- Value.erase(Value.begin());
- ToRemove=true;
- }
-
- //Testing if this is information about a target
- if (List[Pos].find(__T("memory:"))==0 || List[Pos].find(__T("file:"))==0)
- {
- //Searching if already exist
- size_t Memory_Pos=File__Duplicate_Memory_Indexes.Find(List[Pos]);
- if (!ToRemove && Memory_Pos==Error)
- {
- //Does not exist yet (and adding is wanted)
- Memory_Pos=File__Duplicate_Memory_Indexes.Find(__T(""));
- if (Memory_Pos!=Error)
- File__Duplicate_Memory_Indexes[Memory_Pos]=List[Pos]; //A free place is found
- else
- {
- //Adding the place at the end
- Memory_Pos=File__Duplicate_Memory_Indexes.size();
- File__Duplicate_Memory_Indexes.push_back(List[Pos]);
- }
- }
- else if (ToRemove)
- {
- //Exists yet but Removal is wanted
- File__Duplicate_Memory_Indexes[Memory_Pos].clear();
- Memory_Pos=(size_t)-1;
- }
-
- ToReturn+=__T(";")+Ztring().From_Number(Memory_Pos);
- }
- }
- if (!ToReturn.empty())
- ToReturn.erase(ToReturn.begin()); //Remove first ";"
-
- CS.Leave();
- File_IsSeekable_Set(false); //If duplication, we can not seek anymore
-
- return ToReturn;
-}
-
-Ztring MediaInfo_Config_MediaInfo::File_Duplicate_Get (size_t AlreadyRead_Pos)
-{
- CriticalSectionLocker CSL(CS);
- if (AlreadyRead_Pos>=File__Duplicate_List.size())
- return Ztring(); //Nothing or not more than the last time
- Ztring Temp=File__Duplicate_List[AlreadyRead_Pos];
- return Temp;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Duplicate_Get_AlwaysNeeded (size_t AlreadyRead_Pos)
-{
- CriticalSectionLocker CSL(CS);
- bool Temp=AlreadyRead_Pos>=File__Duplicate_List.size();
- return !Temp; //True if there is something to read
-}
-
-size_t MediaInfo_Config_MediaInfo::File__Duplicate_Memory_Indexes_Get (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
- return File__Duplicate_Memory_Indexes.Find(Value);
-}
-
-void MediaInfo_Config_MediaInfo::File__Duplicate_Memory_Indexes_Erase (const Ztring &Value)
-{
- CriticalSectionLocker CSL(CS);
- size_t Pos=File__Duplicate_Memory_Indexes.Find(Value);
- if (Pos!=Error)
- File__Duplicate_Memory_Indexes[Pos].clear();
-}
-#endif //MEDIAINFO_DUPLICATE
-
-//***************************************************************************
-// Demux
-//***************************************************************************
-
-#if MEDIAINFO_DEMUX
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::Demux_ForceIds_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Demux_ForceIds=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::Demux_ForceIds_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Demux_ForceIds;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::Demux_PCM_20bitTo16bit_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Demux_PCM_20bitTo16bit=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::Demux_PCM_20bitTo16bit_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Demux_PCM_20bitTo16bit;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::Demux_PCM_20bitTo24bit_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Demux_PCM_20bitTo24bit=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::Demux_PCM_20bitTo24bit_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Demux_PCM_20bitTo24bit;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Demux_Hevc_Transcode_Iso14496_15_to_AnnexB=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Demux_Hevc_Transcode_Iso14496_15_to_AnnexB;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::Demux_Unpacketize_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Demux_Unpacketize=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::Demux_Unpacketize_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Demux_Unpacketize;
-}
-#endif //MEDIAINFO_DEMUX
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-void MediaInfo_Config_MediaInfo::Demux_Rate_Set (float64 NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Demux_Rate=NewValue;
-}
-
-float64 MediaInfo_Config_MediaInfo::Demux_Rate_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Demux_Rate;
-}
-#endif //MEDIAINFO_DEMUX
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-void MediaInfo_Config_MediaInfo::Demux_FirstDts_Set (int64u NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Demux_FirstDts=NewValue;
-}
-
-int64u MediaInfo_Config_MediaInfo::Demux_FirstDts_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Demux_FirstDts;
-}
-#endif //MEDIAINFO_DEMUX
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-void MediaInfo_Config_MediaInfo::Demux_FirstFrameNumber_Set (int64u NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Demux_FirstFrameNumber=NewValue;
-}
-
-int64u MediaInfo_Config_MediaInfo::Demux_FirstFrameNumber_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Demux_FirstFrameNumber;
-}
-#endif //MEDIAINFO_DEMUX
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-void MediaInfo_Config_MediaInfo::Demux_InitData_Set (int8u NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Demux_InitData=NewValue;
-}
-
-int8u MediaInfo_Config_MediaInfo::Demux_InitData_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Demux_InitData;
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// IBI support
-//***************************************************************************
-
-#if MEDIAINFO_IBIUSAGE
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::Ibi_Set (const Ztring &Value)
-{
- string Data_Base64=Value.To_UTF8();
-
- CriticalSectionLocker CSL(CS);
- Ibi=Base64::decode(Data_Base64);
-}
-
-string MediaInfo_Config_MediaInfo::Ibi_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ibi;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::Ibi_UseIbiInfoIfAvailable_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Ibi_UseIbiInfoIfAvailable=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::Ibi_UseIbiInfoIfAvailable_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ibi_UseIbiInfoIfAvailable;
-}
-#endif //MEDIAINFO_IBIUSAGE
-
-#if MEDIAINFO_IBIUSAGE
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::Ibi_Create_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- Ibi_Create=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::Ibi_Create_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Ibi_Create;
-}
-#endif //MEDIAINFO_IBIUSAGE
-
-//***************************************************************************
-// Encryption
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_AES
-void MediaInfo_Config_MediaInfo::Encryption_Format_Set (const Ztring &Value)
-{
- string Data=Value.To_UTF8();
- encryption_format Encryption_Format_Temp=Encryption_Format_None;
- if (Data=="AES")
- Encryption_Format_Temp=Encryption_Format_Aes;
-
- CriticalSectionLocker CSL(CS);
- Encryption_Format=Encryption_Format_Temp;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::Encryption_Format_Set (encryption_format Value)
-{
- CriticalSectionLocker CSL(CS);
- Encryption_Format=Value;
-}
-
-string MediaInfo_Config_MediaInfo::Encryption_Format_GetS ()
-{
- CriticalSectionLocker CSL(CS);
- switch (Encryption_Format)
- {
- case Encryption_Format_Aes: return "AES";
- default: return string();
- }
-}
-
-encryption_format MediaInfo_Config_MediaInfo::Encryption_Format_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Encryption_Format;
-}
-#endif //MEDIAINFO_AES
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_AES
-void MediaInfo_Config_MediaInfo::Encryption_Key_Set (const Ztring &Value)
-{
- string Data_Base64=Value.To_UTF8();
-
- CriticalSectionLocker CSL(CS);
- Encryption_Key=Base64::decode(Data_Base64);
-}
-
-void MediaInfo_Config_MediaInfo::Encryption_Key_Set (const int8u* Value, size_t Value_Size)
-{
- CriticalSectionLocker CSL(CS);
- Encryption_Key=string((const char*)Value, Value_Size);
-}
-
-string MediaInfo_Config_MediaInfo::Encryption_Key_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Encryption_Key;
-}
-#endif //MEDIAINFO_AES
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_AES
-void MediaInfo_Config_MediaInfo::Encryption_Method_Set (const Ztring &Value)
-{
- string Data=Value.To_UTF8();
- encryption_method Encryption_Method_Temp=Encryption_Method_None;
- if (Data=="Segment")
- Encryption_Method_Temp=Encryption_Method_Segment;
-
- CriticalSectionLocker CSL(CS);
- Encryption_Method=Encryption_Method_Temp;
-}
-
-void MediaInfo_Config_MediaInfo::Encryption_Method_Set (encryption_method Value)
-{
- CriticalSectionLocker CSL(CS);
- Encryption_Method=Value;
-}
-
-string MediaInfo_Config_MediaInfo::Encryption_Method_GetS ()
-{
- CriticalSectionLocker CSL(CS);
- switch (Encryption_Method)
- {
- case Encryption_Method_Segment: return "Segment";
- default: return string();
- }
-}
-
-encryption_method MediaInfo_Config_MediaInfo::Encryption_Method_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Encryption_Method;
-}
-#endif //MEDIAINFO_AES
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_AES
-void MediaInfo_Config_MediaInfo::Encryption_Mode_Set (const Ztring &Value)
-{
- string Data=Value.To_UTF8();
- encryption_mode Encryption_Mode_Temp=Encryption_Mode_None;
- if (Data=="CBC")
- Encryption_Mode_Temp=Encryption_Mode_Cbc;
-
- CriticalSectionLocker CSL(CS);
- Encryption_Mode=Encryption_Mode_Temp;
-}
-
-void MediaInfo_Config_MediaInfo::Encryption_Mode_Set (encryption_mode Value)
-{
- CriticalSectionLocker CSL(CS);
- Encryption_Mode=Value;
-}
-
-string MediaInfo_Config_MediaInfo::Encryption_Mode_GetS ()
-{
- CriticalSectionLocker CSL(CS);
- switch (Encryption_Mode)
- {
- case Encryption_Mode_Cbc: return "CBC";
- default: return string();
- }
-}
-
-encryption_mode MediaInfo_Config_MediaInfo::Encryption_Mode_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Encryption_Mode;
-}
-#endif //MEDIAINFO_AES
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_AES
-void MediaInfo_Config_MediaInfo::Encryption_Padding_Set (const Ztring &Value)
-{
- string Data=Value.To_UTF8();
- encryption_padding Encryption_Padding_Temp=Encryption_Padding_None;
- if (Data=="PKCS7")
- Encryption_Padding_Temp=Encryption_Padding_Pkcs7;
-
- CriticalSectionLocker CSL(CS);
- Encryption_Padding=Encryption_Padding_Temp;
-}
-
-void MediaInfo_Config_MediaInfo::Encryption_Padding_Set (encryption_padding Value)
-{
- CriticalSectionLocker CSL(CS);
- Encryption_Padding=Value;
-}
-
-string MediaInfo_Config_MediaInfo::Encryption_Padding_GetS ()
-{
- CriticalSectionLocker CSL(CS);
- switch (Encryption_Padding)
- {
- case Encryption_Padding_Pkcs7: return "PKCS7";
- default: return string();
- }
-}
-
-encryption_padding MediaInfo_Config_MediaInfo::Encryption_Padding_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Encryption_Padding;
-}
-#endif //MEDIAINFO_AES
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_AES
-void MediaInfo_Config_MediaInfo::Encryption_InitializationVector_Set (const Ztring &Value)
-{
- if (Value==__T("Sequence number"))
- {
- CriticalSectionLocker CSL(CS);
- Encryption_InitializationVector="Sequence number";
- }
- else
- {
- string Data_Base64=Value.To_UTF8();
-
- CriticalSectionLocker CSL(CS);
- Encryption_InitializationVector=Base64::decode(Data_Base64);
- }
-}
-
-string MediaInfo_Config_MediaInfo::Encryption_InitializationVector_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return Encryption_InitializationVector;
-}
-#endif //MEDIAINFO_AES
-
-//***************************************************************************
-// NextPacket
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_NEXTPACKET
-void MediaInfo_Config_MediaInfo::NextPacket_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- NextPacket=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::NextPacket_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return NextPacket;
-}
-#endif //MEDIAINFO_NEXTPACKET
-
-//***************************************************************************
-// SubFile
-//***************************************************************************
-
-#if MEDIAINFO_EVENTS
-//---------------------------------------------------------------------------
-ZtringListList MediaInfo_Config_MediaInfo::SubFile_Config_Get ()
-{
- CriticalSectionLocker CSL(CS);
-
- return SubFile_Config;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::SubFile_StreamID_Set (int64u Value)
-{
- CriticalSectionLocker CSL(CS);
-
- SubFile_StreamID=Value;
-}
-
-//---------------------------------------------------------------------------
-int64u MediaInfo_Config_MediaInfo::SubFile_StreamID_Get ()
-{
- CriticalSectionLocker CSL(CS);
-
- return SubFile_StreamID;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::SubFile_IDs_Set (Ztring Value)
-{
- CriticalSectionLocker CSL(CS);
-
- SubFile_IDs=Value;
-}
-
-//---------------------------------------------------------------------------
-Ztring MediaInfo_Config_MediaInfo::SubFile_IDs_Get ()
-{
- CriticalSectionLocker CSL(CS);
-
- return SubFile_IDs;
-}
-#endif //MEDIAINFO_EVENTS
-
-//***************************************************************************
-// SubFile
-//***************************************************************************
-
-#if MEDIAINFO_EVENTS
-//---------------------------------------------------------------------------
-bool MediaInfo_Config_MediaInfo::ParseUndecodableFrames_Get ()
-{
- CriticalSectionLocker CSL(CS);
-
- return ParseUndecodableFrames;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::ParseUndecodableFrames_Set (bool Value)
-{
- CriticalSectionLocker CSL(CS);
-
- ParseUndecodableFrames=Value;
-}
-#endif //MEDIAINFO_EVENTS
-
-//***************************************************************************
-// Event
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-bool MediaInfo_Config_MediaInfo::Event_CallBackFunction_IsSet ()
-{
- CriticalSectionLocker CSL(CS);
-
- return Event_CallBackFunction?true:false;
-}
-#endif //MEDIAINFO_EVENTS
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-Ztring MediaInfo_Config_MediaInfo::Event_CallBackFunction_Set (const Ztring &Value)
-{
- ZtringList List=Value;
-
- CriticalSectionLocker CSL(CS);
-
- if (List.empty())
- {
- Event_CallBackFunction=(MediaInfo_Event_CallBackFunction*)NULL;
- Event_UserHandler=NULL;
- }
- else
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- if (List[Pos].find(__T("CallBack=memory://"))==0)
- Event_CallBackFunction=(MediaInfo_Event_CallBackFunction*)Ztring(List[Pos].substr(18, std::string::npos)).To_int64u();
- else if (List[Pos].find(__T("UserHandle=memory://"))==0)
- Event_UserHandler=(void*)Ztring(List[Pos].substr(20, std::string::npos)).To_int64u();
- else if (List[Pos].find(__T("UserHandler=memory://"))==0)
- Event_UserHandler=(void*)Ztring(List[Pos].substr(21, std::string::npos)).To_int64u();
- else
- return("Problem during Event_CallBackFunction value parsing");
- }
-
- return Ztring();
-}
-#endif //MEDIAINFO_EVENTS
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-Ztring MediaInfo_Config_MediaInfo::Event_CallBackFunction_Get ()
-{
- CriticalSectionLocker CSL(CS);
-
- return __T("CallBack=memory://")+Ztring::ToZtring((size_t)Event_CallBackFunction)+__T(";UserHandler=memory://")+Ztring::ToZtring((size_t)Event_UserHandler);
-}
-#endif //MEDIAINFO_EVENTS
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-void MediaInfo_Config_MediaInfo::Event_Send (File__Analyze* Source, const int8u* Data_Content, size_t Data_Size, const Ztring &File_Name)
-{
- CriticalSectionLocker CSL(CS);
-
- if (Source==NULL)
- {
- MediaInfo_Event_Generic* Temp=(MediaInfo_Event_Generic*)Data_Content;
-
- if (Demux_Offset_Frame!=(int64u)-1)
- {
- if (Temp->FrameNumber!=(int64u)-1)
- Temp->FrameNumber+=Demux_Offset_Frame;
- if (Temp->FrameNumber_PresentationOrder!=(int64u)-1)
- Temp->FrameNumber_PresentationOrder+=Demux_Offset_Frame;
- }
- if (Demux_Offset_DTS!=(int64u)-1)
- {
- if (Temp->DTS!=(int64u)-1)
- Temp->DTS+=Demux_Offset_DTS;
- if (Temp->PTS!=(int64u)-1)
- Temp->PTS+=Demux_Offset_DTS;
- if (Demux_Offset_DTS_FromStream!=(int64u)-1)
- {
- if (Temp->DTS!=(int64u)-1)
- Temp->DTS-=Demux_Offset_DTS_FromStream;
- if (Temp->PTS!=(int64u)-1)
- Temp->PTS-=Demux_Offset_DTS_FromStream;
- }
- }
- if (File_IgnoreEditsBefore)
- {
- if (Temp->FrameNumber!=(int64u)-1)
- {
- if (Temp->FrameNumber>File_IgnoreEditsBefore)
- Temp->FrameNumber-=File_IgnoreEditsBefore;
- else
- Temp->FrameNumber=0;
- }
- if (Temp->DTS!=(int64u)-1)
- {
- if (File_IgnoreEditsBefore && File_EditRate)
- {
- int64u TimeOffset=float64_int64s(((float64)File_IgnoreEditsBefore)/File_EditRate*1000000000);
- if (Temp->DTS>TimeOffset)
- Temp->DTS-=TimeOffset;
- else
- Temp->DTS=0;
- }
- }
- if (Temp->PTS!=(int64u)-1)
- {
- if (File_IgnoreEditsBefore && File_EditRate)
- {
- int64u TimeOffset=float64_int64s(((float64)File_IgnoreEditsBefore)/File_EditRate*1000000000);
- if (Temp->PTS>TimeOffset)
- Temp->PTS-=TimeOffset;
- else
- Temp->PTS=0;
- }
- }
- }
- }
-
- if (Source)
- {
- event_delayed* Event=new event_delayed(Data_Content, Data_Size, File_Name);
- Events_Delayed[Source].push_back(Event);
-
- // Copying buffers
- int32u* EventCode=(int32u*)Data_Content;
- if (((*EventCode)&0x00FFFFFF)==((MediaInfo_Event_Global_Demux<<8)|4) && Data_Size==sizeof(MediaInfo_Event_Global_Demux_4))
- {
- MediaInfo_Event_Global_Demux_4* Old=(MediaInfo_Event_Global_Demux_4*)Data_Content;
- MediaInfo_Event_Global_Demux_4* New=(MediaInfo_Event_Global_Demux_4*)Event->Data_Content;
- if (New->Content_Size)
- {
- int8u* Content=new int8u[New->Content_Size];
- std::memcpy(Content, Old->Content, New->Content_Size*sizeof(int8u));
- New->Content=Content;
- }
- if (New->Offsets_Size)
- {
- int64u* Offsets_Stream=new int64u[New->Offsets_Size];
- std::memcpy(Offsets_Stream, Old->Offsets_Stream, New->Offsets_Size*sizeof(int64u));
- New->Offsets_Stream=Offsets_Stream;
- int64u* Offsets_Content=new int64u[New->Offsets_Size];
- std::memcpy(Offsets_Content, Old->Offsets_Content, New->Offsets_Size*sizeof(int64u));
- New->Offsets_Content=Offsets_Content;
- }
- if (New->OriginalContent_Size)
- {
- int8u* OriginalContent=new int8u[New->OriginalContent_Size];
- std::memcpy(OriginalContent, Old->OriginalContent, New->OriginalContent_Size*sizeof(int8u));
- New->OriginalContent=OriginalContent;
- }
- }
- }
- else if (Event_CallBackFunction)
- {
- MEDIAINFO_DEBUG1( "CallBackFunction",
- Debug+=", EventID=";Debug+=Ztring::ToZtring(LittleEndian2int32u(Data_Content), 16).To_UTF8();)
-
- Event_CallBackFunction ((unsigned char*)Data_Content, Data_Size, Event_UserHandler);
-
- MEDIAINFO_DEBUG2( "CallBackFunction",
- )
- }
- else if (!File_Name.empty())
- {
- MediaInfo_Event_Generic* Event_Generic=(MediaInfo_Event_Generic*)Data_Content;
- if ((Event_Generic->EventCode&0x00FFFFFF)==((MediaInfo_Event_Global_Demux<<8)|0x04)) //Demux version 4
- {
- if (!MediaInfoLib::Config.Demux_Get())
- return;
-
- MediaInfo_Event_Global_Demux_4* Event=(MediaInfo_Event_Global_Demux_4*)Data_Content;
-
- Ztring File_Name_Final(File_Name);
- if (Event->StreamIDs_Size==0)
- File_Name_Final+=__T(".demux");
- else for (size_t Pos=0; Pos<Event->StreamIDs_Size; Pos++)
- {
- if (Event->StreamIDs_Width[Pos]==17)
- {
- Ztring ID;
- ID.From_CC4((int32u)Event->StreamIDs[Pos]);
- File_Name_Final+=__T('.')+ID;
- }
- else if (Event->StreamIDs_Width[Pos])
- {
- Ztring ID;
- ID.From_Number(Event->StreamIDs[Pos], 16);
- while (ID.size()<Event->StreamIDs_Width[Pos])
- ID.insert(0, 1, __T('0'));
- if (ID.size()>Event->StreamIDs_Width[Pos])
- ID.erase(0, ID.size()-Event->StreamIDs_Width[Pos]);
- File_Name_Final+=__T('.')+ID;
- }
- else
- File_Name_Final+=__T(".raw");
- }
-
- File F;
- F.Open(File_Name_Final, File::Access_Write_Append);
- F.Write(Event->Content, Event->Content_Size);
- }
- }
-}
-
-void MediaInfo_Config_MediaInfo::Event_Accepted (File__Analyze* Source)
-{
- #if MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- if (Demux_EventWasSent && NextPacket_Get())
- {
- Events_Delayed_CurrentSource=Source;
- return;
- }
- #endif //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
-
- for (events_delayed::iterator Event=Events_Delayed.begin(); Event!=Events_Delayed.end(); ++Event)
- if (Event->first==Source)
- {
- for (size_t Pos=0; Pos<Event->second.size(); Pos++)
- if (Event->second[Pos])
- {
- Event_Send(NULL, Event->second[Pos]->Data_Content, Event->second[Pos]->Data_Size, Event->second[Pos]->File_Name);
-
- int32u EventCode=*((int32u*)Event->second[Pos]->Data_Content);
- bool IsDemux=(EventCode&0x00FFFF00)==(MediaInfo_Event_Global_Demux<<8);
-
- if (IsDemux)
- {
- MediaInfo_Event_Global_Demux_4* Old=(MediaInfo_Event_Global_Demux_4*)Event->second[Pos]->Data_Content;
- delete[] Old->Content; Old->Content=NULL;
- if (Old->Offsets_Size)
- {
- delete[] Old->Offsets_Content; Old->Offsets_Content=NULL;
- }
- if (Old->Offsets_Size)
- {
- delete[] Old->OriginalContent; Old->OriginalContent=NULL;
- }
- }
-
- delete Event->second[Pos]; Event->second[Pos]=NULL;
-
- #if MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- if (IsDemux && NextPacket_Get())
- {
- Demux_EventWasSent=true;
- Event->second.erase(Event->second.begin(), Event->second.begin()+Pos);
- Events_Delayed_CurrentSource=Source;
- return;
- }
- #endif //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- }
-
- Events_Delayed.erase(Event->first);
- return;
- }
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::Event_SubFile_Start(const Ztring &FileName_Absolute)
-{
- Ztring FileName_Relative;
- if (File_Names_RootDirectory.empty())
- {
- FileName FN(FileName_Absolute);
- FileName_Relative=FN.Name_Get();
- if (!FN.Extension_Get().empty())
- {
- FileName_Relative+=__T('.');
- FileName_Relative+=FN.Extension_Get();
- }
- }
- else
- {
- Ztring Root=File_Names_RootDirectory+PathSeparator;
- FileName_Relative=FileName_Absolute;
- if (FileName_Relative.find(Root)==0)
- FileName_Relative.erase(0, Root.size());
- }
-
- struct MediaInfo_Event_General_SubFile_Start_0 Event;
- memset(&Event, 0xFF, sizeof(struct MediaInfo_Event_Generic));
- Event.EventCode=MediaInfo_EventCode_Create(0, MediaInfo_Event_General_SubFile_Start, 0);
- Event.EventSize=sizeof(struct MediaInfo_Event_General_SubFile_Start_0);
- Event.StreamIDs_Size=0;
-
- std::string FileName_Relative_Ansi=FileName_Relative.To_UTF8();
- std::wstring FileName_Relative_Unicode=FileName_Relative.To_Unicode();
- std::string FileName_Absolute_Ansi=FileName_Absolute.To_UTF8();
- std::wstring FileName_Absolute_Unicode=FileName_Absolute.To_Unicode();
- Event.FileName_Relative=FileName_Relative_Ansi.c_str();
- Event.FileName_Relative_Unicode=FileName_Relative_Unicode.c_str();
- Event.FileName_Absolute=FileName_Absolute_Ansi.c_str();
- Event.FileName_Absolute_Unicode=FileName_Absolute_Unicode.c_str();
-
- Event_Send(NULL, (const int8u*)&Event, Event.EventSize);
-}
-#endif //MEDIAINFO_EVENTS
-
-//***************************************************************************
-// Force Parser
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_MpegTs_ForceMenu_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_MpegTs_ForceMenu=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_MpegTs_ForceMenu_Get ()
-{
- CriticalSectionLocker CSL(CS);
- bool Temp=File_MpegTs_ForceMenu;
- return Temp;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_MpegTs_stream_type_Trust_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_MpegTs_stream_type_Trust=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_MpegTs_stream_type_Trust_Get ()
-{
- CS.Enter();
- bool Temp=File_MpegTs_stream_type_Trust;
- CS.Leave();
- return Temp;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_MpegTs_Atsc_transport_stream_id_Trust_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_MpegTs_Atsc_transport_stream_id_Trust=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_MpegTs_Atsc_transport_stream_id_Trust_Get ()
-{
- CS.Enter();
- bool Temp=File_MpegTs_Atsc_transport_stream_id_Trust;
- CS.Leave();
- return Temp;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_MpegTs_RealTime_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_MpegTs_RealTime=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_MpegTs_RealTime_Get ()
-{
- CS.Enter();
- bool Temp=File_MpegTs_RealTime;
- CS.Leave();
- return Temp;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_Mxf_TimeCodeFromMaterialPackage_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Mxf_TimeCodeFromMaterialPackage=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Mxf_TimeCodeFromMaterialPackage_Get ()
-{
- CS.Enter();
- bool Temp=File_Mxf_TimeCodeFromMaterialPackage;
- CS.Leave();
- return Temp;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_Bdmv_ParseTargetedFile_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Bdmv_ParseTargetedFile=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Bdmv_ParseTargetedFile_Get ()
-{
- CriticalSectionLocker CSL(CS);
- bool Temp=File_Bdmv_ParseTargetedFile;
- return Temp;
-}
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DVDIF_YES)
-void MediaInfo_Config_MediaInfo::File_DvDif_DisableAudioIfIsInContainer_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_DvDif_DisableAudioIfIsInContainer=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_DvDif_DisableAudioIfIsInContainer_Get ()
-{
- CriticalSectionLocker CSL(CS);
- bool Temp=File_DvDif_DisableAudioIfIsInContainer;
- return Temp;
-}
-#endif //defined(MEDIAINFO_DVDIF_YES)
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DVDIF_YES)
-void MediaInfo_Config_MediaInfo::File_DvDif_IgnoreTransmittingFlags_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_DvDif_IgnoreTransmittingFlags=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_DvDif_IgnoreTransmittingFlags_Get ()
-{
- CriticalSectionLocker CSL(CS);
- bool Temp=File_DvDif_IgnoreTransmittingFlags;
- return Temp;
-}
-#endif //defined(MEDIAINFO_DVDIF_YES)
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DVDIF_ANALYZE_YES)
-void MediaInfo_Config_MediaInfo::File_DvDif_Analysis_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_DvDif_Analysis=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_DvDif_Analysis_Get ()
-{
- CriticalSectionLocker CSL(CS);
- bool Temp=File_DvDif_Analysis;
- return Temp;
-}
-#endif //defined(MEDIAINFO_DVDIF_ANALYZE_YES)
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_MACROBLOCKS
-void MediaInfo_Config_MediaInfo::File_Macroblocks_Parse_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Macroblocks_Parse=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Macroblocks_Parse_Get ()
-{
- CriticalSectionLocker CSL(CS);
- bool Temp=File_Macroblocks_Parse;
- return Temp;
-}
-#endif //MEDIAINFO_MACROBLOCKS
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_GrowingFile_Delay_Set (float64 NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_GrowingFile_Delay=NewValue;
-}
-
-float64 MediaInfo_Config_MediaInfo::File_GrowingFile_Delay_Get ()
-{
- CriticalSectionLocker CSL(CS);
- float64 Temp=File_GrowingFile_Delay;
- return Temp;
-}
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_LIBCURL_YES)
-void MediaInfo_Config_MediaInfo::File_Curl_Set (const Ztring &NewValue)
-{
- size_t Pos=NewValue.find(__T(','));
- if (Pos==string::npos)
- Pos=NewValue.find(__T(';'));
- if (Pos!=string::npos)
- {
- Ztring Field=NewValue.substr(0, Pos); Field.MakeLowerCase();
- Ztring Value=NewValue.substr(Pos+1, string::npos);
- CriticalSectionLocker CSL(CS);
- Curl[Field]=Value;
- }
-}
-
-void MediaInfo_Config_MediaInfo::File_Curl_Set (const Ztring &Field_, const Ztring &NewValue)
-{
- Ztring Field=Field_; Field.MakeLowerCase();
- CriticalSectionLocker CSL(CS);
- Curl[Field]=NewValue;
-}
-
-Ztring MediaInfo_Config_MediaInfo::File_Curl_Get (const Ztring &Field_)
-{
- Ztring Field=Field_; Field.MakeLowerCase();
- CriticalSectionLocker CSL(CS);
- std::map<Ztring, Ztring>::iterator Value=Curl.find(Field);
- if (Value==Curl.end())
- return Ztring();
- else
- return Curl[Field];
-}
-#endif //defined(MEDIAINFO_LIBCURL_YES)
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_LIBMMS_YES)
-void MediaInfo_Config_MediaInfo::File_Mmsh_Describe_Only_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Mmsh_Describe_Only=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Mmsh_Describe_Only_Get ()
-{
- CriticalSectionLocker CSL(CS);
- bool Temp=File_Mmsh_Describe_Only;
- return Temp;
-}
-#endif //defined(MEDIAINFO_LIBMMS_YES)
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_Eia608_DisplayEmptyStream_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Eia608_DisplayEmptyStream=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Eia608_DisplayEmptyStream_Get ()
-{
- CriticalSectionLocker CSL(CS);
- bool Temp=File_Eia608_DisplayEmptyStream;
- return Temp;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::File_Eia708_DisplayEmptyStream_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Eia708_DisplayEmptyStream=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Eia708_DisplayEmptyStream_Get ()
-{
- CriticalSectionLocker CSL(CS);
- bool Temp=File_Eia708_DisplayEmptyStream;
- return Temp;
-}
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AC3_YES)
-void MediaInfo_Config_MediaInfo::File_Ac3_IgnoreCrc_Set (bool NewValue)
-{
- CriticalSectionLocker CSL(CS);
- File_Ac3_IgnoreCrc=NewValue;
-}
-
-bool MediaInfo_Config_MediaInfo::File_Ac3_IgnoreCrc_Get ()
-{
- CriticalSectionLocker CSL(CS);
- bool Temp=File_Ac3_IgnoreCrc;
- return Temp;
-}
-#endif //defined(MEDIAINFO_AC3_YES)
-
-//***************************************************************************
-// Analysis internal
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void MediaInfo_Config_MediaInfo::State_Set (float NewValue)
-{
- CriticalSectionLocker CSL(CS);
- State=NewValue;
-}
-
-float MediaInfo_Config_MediaInfo::State_Get ()
-{
- CriticalSectionLocker CSL(CS);
- float Temp=State;
- return Temp;
-}
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_MediaInfo.h b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_MediaInfo.h
deleted file mode 100644
index 29c9b048b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_MediaInfo.h
+++ /dev/null
@@ -1,539 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Configuration of MediaInfo (per MediaInfo block)
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Config_MediaInfoH
-#define MediaInfo_Config_MediaInfoH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Internal_Const.h"
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Config.h"
- #include "MediaInfo/MediaInfo_Events.h"
- #include "ZenLib/File.h"
-#endif //MEDIAINFO_EVENTS
-#include "ZenLib/CriticalSection.h"
-#include "ZenLib/Translation.h"
-#include "ZenLib/InfoMap.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-#if MEDIAINFO_EVENTS
- class File__Analyze;
- class MediaInfo_Config_PerPackage;
-#endif //MEDIAINFO_EVENTS
-
-#if MEDIAINFO_AES
-enum encryption_format
-{
- Encryption_Format_None,
- Encryption_Format_Aes,
-};
-enum encryption_method
-{
- Encryption_Method_None,
- Encryption_Method_Segment,
-};
-enum encryption_mode
-{
- Encryption_Mode_None,
- Encryption_Mode_Cbc,
-};
-enum encryption_padding
-{
- Encryption_Padding_None,
- Encryption_Padding_Pkcs7,
-};
-#endif //MEDIAINFO_AES
-
-//***************************************************************************
-// Class MediaInfo_Config_MediaInfo
-//***************************************************************************
-
-class MediaInfo_Config_MediaInfo
-{
-public :
- //Constructor/Destructor
- MediaInfo_Config_MediaInfo();
- ~MediaInfo_Config_MediaInfo();
-
- //General
- Ztring Option (const String &Option, const String &Value=Ztring());
-
- void File_IsSeekable_Set (bool NewValue);
- bool File_IsSeekable_Get ();
-
- void File_IsSub_Set (bool NewValue);
- bool File_IsSub_Get ();
-
- void File_IsDetectingDuration_Set (bool NewValue);
- bool File_IsDetectingDuration_Get ();
-
- void File_IsReferenced_Set (bool NewValue);
- bool File_IsReferenced_Get ();
-
- void File_TestContinuousFileNames_Set (bool NewValue);
- bool File_TestContinuousFileNames_Get ();
-
- void File_KeepInfo_Set (bool NewValue);
- bool File_KeepInfo_Get ();
-
- void File_StopAfterFilled_Set (bool NewValue);
- bool File_StopAfterFilled_Get ();
-
- void File_StopSubStreamAfterFilled_Set (bool NewValue);
- bool File_StopSubStreamAfterFilled_Get ();
-
- void File_Audio_MergeMonoStreams_Set (bool NewValue);
- bool File_Audio_MergeMonoStreams_Get ();
-
- void File_Demux_Interleave_Set (bool NewValue);
- bool File_Demux_Interleave_Get ();
-
- void File_ID_OnlyRoot_Set (bool NewValue);
- bool File_ID_OnlyRoot_Get ();
-
- #if MEDIAINFO_ADVANCED
- void File_IgnoreSequenceFileSize_Set (bool NewValue);
- bool File_IgnoreSequenceFileSize_Get ();
- #endif //MEDIAINFO_ADVANCED
-
- #if MEDIAINFO_ADVANCED
- void File_IgnoreSequenceFilesCount_Set (bool NewValue);
- bool File_IgnoreSequenceFilesCount_Get ();
- #endif //MEDIAINFO_ADVANCED
-
- #if MEDIAINFO_ADVANCED
- void File_SequenceFilesSkipFrames_Set (int64u NewValue);
- int64u File_SequenceFilesSkipFrames_Get ();
- #endif //MEDIAINFO_ADVANCED
-
- #if MEDIAINFO_ADVANCED
- void File_DefaultFrameRate_Set (float64 NewValue);
- float64 File_DefaultFrameRate_Get ();
- #endif //MEDIAINFO_ADVANCED
-
- #if MEDIAINFO_ADVANCED
- void File_Source_List_Set (bool NewValue);
- bool File_Source_List_Get ();
- #endif //MEDIAINFO_ADVANCED
-
- #if MEDIAINFO_ADVANCED
- void File_RiskyBitRateEstimation_Set (bool NewValue);
- bool File_RiskyBitRateEstimation_Get ();
- void File_MergeBitRateInfo_Set (bool NewValue);
- bool File_MergeBitRateInfo_Get ();
- #endif //MEDIAINFO_ADVANCED
-
- #if MEDIAINFO_DEMUX
- #if MEDIAINFO_ADVANCED
- void File_Demux_Unpacketize_StreamLayoutChange_Skip_Set (bool NewValue);
- bool File_Demux_Unpacketize_StreamLayoutChange_Skip_Get ();
- #endif //MEDIAINFO_ADVANCED
- #endif //MEDIAINFO_DEMUX
-
- #if MEDIAINFO_MD5
- void File_Md5_Set (bool NewValue);
- bool File_Md5_Get ();
- #endif //MEDIAINFO_MD5
-
- #if defined(MEDIAINFO_REFERENCES_YES)
- void File_CheckSideCarFiles_Set (bool NewValue);
- bool File_CheckSideCarFiles_Get ();
- #endif //defined(MEDIAINFO_REFERENCES_YES)
-
- void File_FileName_Set (const Ztring &NewValue);
- Ztring File_FileName_Get ();
-
- void File_FileNameFormat_Set (const Ztring &NewValue);
- Ztring File_FileNameFormat_Get ();
-
- void File_TimeToLive_Set (float64 NewValue);
- float64 File_TimeToLive_Get ();
-
- void File_Partial_Begin_Set (const Ztring &NewValue);
- Ztring File_Partial_Begin_Get ();
- void File_Partial_End_Set (const Ztring &NewValue);
- Ztring File_Partial_End_Get ();
-
- void File_ForceParser_Set (const Ztring &NewValue);
- Ztring File_ForceParser_Get ();
-
- void File_Buffer_Size_Hint_Pointer_Set (size_t* NewValue);
- size_t* File_Buffer_Size_Hint_Pointer_Get ();
-
- void File_Buffer_Read_Size_Set (size_t NewValue);
- size_t File_Buffer_Read_Size_Get ();
-
- #if MEDIAINFO_AES
- void Encryption_Format_Set (const Ztring &Value);
- void Encryption_Format_Set (encryption_format Value);
- string Encryption_Format_GetS ();
- encryption_format Encryption_Format_Get ();
- void Encryption_Key_Set (const Ztring &Value);
- void Encryption_Key_Set (const int8u* Value, size_t Value_Size);
- string Encryption_Key_Get ();
- void Encryption_Method_Set (const Ztring &Value);
- void Encryption_Method_Set (encryption_method Value);
- string Encryption_Method_GetS ();
- encryption_method Encryption_Method_Get ();
- void Encryption_Mode_Set (const Ztring &Value);
- void Encryption_Mode_Set (encryption_mode Value);
- string Encryption_Mode_GetS ();
- encryption_mode Encryption_Mode_Get ();
- void Encryption_Padding_Set (const Ztring &Value);
- void Encryption_Padding_Set (encryption_padding Value);
- string Encryption_Padding_GetS ();
- encryption_padding Encryption_Padding_Get ();
- void Encryption_InitializationVector_Set (const Ztring &Value);
- string Encryption_InitializationVector_Get ();
- #endif //MEDIAINFO_AES
-
- #if MEDIAINFO_NEXTPACKET
- void NextPacket_Set (bool NewValue);
- bool NextPacket_Get ();
- #endif //MEDIAINFO_NEXTPACKET
-
- #if MEDIAINFO_FILTER
- void File_Filter_Set (int64u NewValue);
- bool File_Filter_Get (const int16u Value);
- bool File_Filter_Get ();
- void File_Filter_Audio_Set (bool NewValue);
- bool File_Filter_Audio_Get ();
- bool File_Filter_HasChanged();
- #endif //MEDIAINFO_FILTER
-
- #if MEDIAINFO_DUPLICATE
- Ztring File_Duplicate_Set (const Ztring &Value);
- Ztring File_Duplicate_Get (size_t AlreadyRead_Pos); //Requester must say how many Get() it already read
- bool File_Duplicate_Get_AlwaysNeeded (size_t AlreadyRead_Pos); //Requester must say how many Get() it already read
- #endif //MEDIAINFO_DEMUX
-
- #if MEDIAINFO_DUPLICATE
- size_t File__Duplicate_Memory_Indexes_Get (const Ztring &ToFind);
- void File__Duplicate_Memory_Indexes_Erase (const Ztring &ToFind);
- #endif //MEDIAINFO_DEMUX
-
- #if MEDIAINFO_EVENTS
- ZtringListList SubFile_Config_Get ();
- void SubFile_StreamID_Set(int64u Value);
- int64u SubFile_StreamID_Get();
- void SubFile_IDs_Set(Ztring Value);
- Ztring SubFile_IDs_Get();
- #endif //MEDIAINFO_EVENTS
-
- #if MEDIAINFO_EVENTS
- bool ParseUndecodableFrames_Get ();
- void ParseUndecodableFrames_Set (bool Value);
- #endif //MEDIAINFO_EVENTS
-
- #if MEDIAINFO_EVENTS
- bool Event_CallBackFunction_IsSet ();
- Ztring Event_CallBackFunction_Set (const Ztring &Value);
- Ztring Event_CallBackFunction_Get ();
- void Event_Send(File__Analyze* Source, const int8u* Data_Content, size_t Data_Size, const Ztring &File_Name=Ztring());
- void Event_Accepted(File__Analyze* Source);
- void Event_SubFile_Start(const Ztring &FileName_Absolute);
- #endif //MEDIAINFO_EVENTS
-
- #if MEDIAINFO_DEMUX
- void Demux_ForceIds_Set (bool NewValue);
- bool Demux_ForceIds_Get ();
- void Demux_PCM_20bitTo16bit_Set (bool NewValue);
- bool Demux_PCM_20bitTo16bit_Get ();
- void Demux_PCM_20bitTo24bit_Set (bool NewValue);
- bool Demux_PCM_20bitTo24bit_Get ();
- void Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10_Set (bool NewValue);
- bool Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10_Get ();
- void Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Set (bool NewValue);
- bool Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Get ();
- void Demux_Unpacketize_Set (bool NewValue);
- bool Demux_Unpacketize_Get ();
- void Demux_Rate_Set (float64 NewValue);
- float64 Demux_Rate_Get ();
- void Demux_FirstDts_Set (int64u NewValue);
- int64u Demux_FirstDts_Get ();
- void Demux_FirstFrameNumber_Set (int64u NewValue);
- int64u Demux_FirstFrameNumber_Get ();
- void Demux_InitData_Set (int8u NewValue);
- int8u Demux_InitData_Get ();
- #endif //MEDIAINFO_DEMUX
-
- #if MEDIAINFO_IBIUSAGE
- void Ibi_Set (const Ztring &NewValue);
- std::string Ibi_Get ();
- void Ibi_UseIbiInfoIfAvailable_Set (bool NewValue);
- bool Ibi_UseIbiInfoIfAvailable_Get ();
- #endif //MEDIAINFO_IBIUSAGE
- #if MEDIAINFO_IBIUSAGE
- void Ibi_Create_Set (bool NewValue);
- bool Ibi_Create_Get ();
- #endif //MEDIAINFO_IBIUSAGE
-
- //Specific
- void File_MpegTs_ForceMenu_Set (bool NewValue);
- bool File_MpegTs_ForceMenu_Get ();
- void File_MpegTs_stream_type_Trust_Set (bool NewValue);
- bool File_MpegTs_stream_type_Trust_Get ();
- void File_MpegTs_Atsc_transport_stream_id_Trust_Set (bool NewValue);
- bool File_MpegTs_Atsc_transport_stream_id_Trust_Get ();
- void File_MpegTs_RealTime_Set (bool NewValue);
- bool File_MpegTs_RealTime_Get ();
- void File_Mxf_TimeCodeFromMaterialPackage_Set (bool NewValue);
- bool File_Mxf_TimeCodeFromMaterialPackage_Get ();
- void File_Bdmv_ParseTargetedFile_Set (bool NewValue);
- bool File_Bdmv_ParseTargetedFile_Get ();
- #if defined(MEDIAINFO_DVDIF_YES)
- void File_DvDif_DisableAudioIfIsInContainer_Set (bool NewValue);
- bool File_DvDif_DisableAudioIfIsInContainer_Get ();
- void File_DvDif_IgnoreTransmittingFlags_Set (bool NewValue);
- bool File_DvDif_IgnoreTransmittingFlags_Get ();
- #endif //defined(MEDIAINFO_DVDIF_YES)
- #if defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- void File_DvDif_Analysis_Set (bool NewValue);
- bool File_DvDif_Analysis_Get ();
- #endif //defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- #if MEDIAINFO_MACROBLOCKS
- void File_Macroblocks_Parse_Set (bool NewValue);
- bool File_Macroblocks_Parse_Get ();
- #endif //MEDIAINFO_MACROBLOCKS
- void File_GrowingFile_Delay_Set(float64 Value);
- float64 File_GrowingFile_Delay_Get();
- #if defined(MEDIAINFO_LIBCURL_YES)
- void File_Curl_Set (const Ztring &NewValue);
- void File_Curl_Set (const Ztring &Field, const Ztring &NewValue);
- Ztring File_Curl_Get (const Ztring &Field);
- #endif //defined(MEDIAINFO_LIBCURL_YES)
- #if defined(MEDIAINFO_LIBMMS_YES)
- void File_Mmsh_Describe_Only_Set (bool NewValue);
- bool File_Mmsh_Describe_Only_Get ();
- #endif //defined(MEDIAINFO_LIBMMS_YES)
- void File_Eia608_DisplayEmptyStream_Set (bool NewValue);
- bool File_Eia608_DisplayEmptyStream_Get ();
- void File_Eia708_DisplayEmptyStream_Set (bool NewValue);
- bool File_Eia708_DisplayEmptyStream_Get ();
- #if defined(MEDIAINFO_AC3_YES)
- void File_Ac3_IgnoreCrc_Set (bool NewValue);
- bool File_Ac3_IgnoreCrc_Get ();
- #endif //defined(MEDIAINFO_AC3_YES)
-
- //Analysis internal
- void State_Set (float State);
- float State_Get ();
-
- //Internal to MediaInfo, not thread safe
- ZtringList File_Names;
- std::vector<int64u> File_Sizes;
- size_t File_Names_Pos;
- size_t File_Buffer_Size_Max;
- size_t File_Buffer_Size_ToRead;
- size_t File_Buffer_Size;
- int8u* File_Buffer;
- bool File_Buffer_Repeat;
- bool File_Buffer_Repeat_IsSupported;
- bool File_IsGrowing;
- bool File_IsNotGrowingAnymore;
- bool File_IsImageSequence;
- int64u File_Current_Offset;
- int64u File_Current_Size;
- int64u File_IgnoreEditsBefore;
- int64u File_IgnoreEditsAfter;
- float64 File_EditRate;
- int64u File_Size;
- float32 ParseSpeed;
- #if MEDIAINFO_EVENTS
- MediaInfo_Config_PerPackage* Config_PerPackage;
- Ztring File_Names_RootDirectory;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- bool Demux_EventWasSent;
- int64u Demux_Offset_Frame;
- int64u Demux_Offset_DTS;
- int64u Demux_Offset_DTS_FromStream;
- File__Analyze* Events_Delayed_CurrentSource;
- #if MEDIAINFO_SEEK
- bool Demux_IsSeeking;
- #endif //MEDIAINFO_SEEK
- #endif //MEDIAINFO_DEMUX
- #if MEDIAINFO_SEEK
- bool File_GoTo_IsFrameOffset;
- #endif //MEDIAINFO_SEEK
-
-private :
- bool FileIsSeekable;
- bool FileIsSub;
- bool FileIsDetectingDuration;
- bool FileIsReferenced;
- bool FileTestContinuousFileNames;
- bool FileKeepInfo;
- bool FileStopAfterFilled;
- bool FileStopSubStreamAfterFilled;
- bool Audio_MergeMonoStreams;
- bool File_Demux_Interleave;
- bool File_ID_OnlyRoot;
- #if MEDIAINFO_ADVANCED
- bool File_IgnoreSequenceFileSize;
- bool File_IgnoreSequenceFilesCount;
- int64u File_SequenceFilesSkipFrames;
- float64 File_DefaultFrameRate;
- bool File_Source_List;
- bool File_RiskyBitRateEstimation;
- bool File_MergeBitRateInfo;
- #if MEDIAINFO_DEMUX
- bool File_Demux_Unpacketize_StreamLayoutChange_Skip;
- #endif //MEDIAINFO_DEMUX
- #endif //MEDIAINFO_ADVANCED
- #if MEDIAINFO_MD5
- bool File_Md5;
- #endif //MEDIAINFO_MD5
- #if defined(MEDIAINFO_REFERENCES_YES)
- bool File_CheckSideCarFiles;
- #endif //defined(MEDIAINFO_REFERENCES_YES)
- Ztring File_FileName;
- Ztring File_FileNameFormat;
- float64 File_TimeToLive;
- Ztring File_Partial_Begin;
- Ztring File_Partial_End;
- Ztring File_ForceParser;
- size_t* File_Buffer_Size_Hint_Pointer;
- size_t File_Buffer_Read_Size;
-
- //Extra
- #if MEDIAINFO_AES
- encryption_format Encryption_Format;
- string Encryption_Key;
- encryption_method Encryption_Method;
- encryption_mode Encryption_Mode;
- encryption_padding Encryption_Padding;
- string Encryption_InitializationVector;
- #endif //MEDIAINFO_AES
-
- #if MEDIAINFO_NEXTPACKET
- bool NextPacket;
- #endif //MEDIAINFO_NEXTPACKET
-
- #if MEDIAINFO_FILTER
- std::map<int16u, bool> File_Filter_16;
- bool File_Filter_Audio;
- bool File_Filter_HasChanged_;
- #endif //MEDIAINFO_FILTER
-
- #if MEDIAINFO_DUPLICATE
- std::vector<Ztring> File__Duplicate_List;
- ZtringList File__Duplicate_Memory_Indexes;
- #endif //MEDIAINFO_DUPLICATE
-
- //Event
- #if MEDIAINFO_EVENTS
- MediaInfo_Event_CallBackFunction* Event_CallBackFunction; //void Event_Handler(unsigned char* Data_Content, size_t Data_Size, void* UserHandler)
- struct event_delayed
- {
- int8u* Data_Content;
- size_t Data_Size;
- Ztring File_Name;
-
- event_delayed (const int8u* Data_Content_, size_t Data_Size_, const Ztring &File_Name_)
- {
- File_Name=File_Name_;
- Data_Size=Data_Size_;
- Data_Content=new int8u[Data_Size];
- std::memcpy(Data_Content, Data_Content_, Data_Size);
- }
-
- ~event_delayed ()
- {
- delete[] Data_Content; //Data_Content=NULL;
- }
- };
- typedef std::map<File__Analyze*, std::vector<event_delayed*> > events_delayed;
- events_delayed Events_Delayed;
- void* Event_UserHandler;
- ZtringListList SubFile_Config;
- int64u SubFile_StreamID;
- bool ParseUndecodableFrames;
- Ztring SubFile_IDs;
- #endif //MEDIAINFO_EVENTS
-
- #if MEDIAINFO_DEMUX
- bool Demux_ForceIds;
- bool Demux_PCM_20bitTo16bit;
- bool Demux_PCM_20bitTo24bit;
- bool Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10;
- bool Demux_Hevc_Transcode_Iso14496_15_to_AnnexB;
- bool Demux_Unpacketize;
- float64 Demux_Rate;
- int64u Demux_FirstDts;
- int64u Demux_FirstFrameNumber;
- int8u Demux_InitData;
- #endif //MEDIAINFO_DEMUX
-
- #if MEDIAINFO_IBIUSAGE
- std::string Ibi;
- bool Ibi_UseIbiInfoIfAvailable;
- #endif //MEDIAINFO_IBIUSAGE
- #if MEDIAINFO_IBIUSAGE
- bool Ibi_Create;
- #endif //MEDIAINFO_IBIUSAGE
-
- //Specific
- bool File_MpegTs_ForceMenu;
- bool File_MpegTs_stream_type_Trust;
- bool File_MpegTs_Atsc_transport_stream_id_Trust;
- bool File_MpegTs_RealTime;
- bool File_Mxf_TimeCodeFromMaterialPackage;
- bool File_Bdmv_ParseTargetedFile;
- #if defined(MEDIAINFO_DVDIF_YES)
- bool File_DvDif_DisableAudioIfIsInContainer;
- bool File_DvDif_IgnoreTransmittingFlags;
- #endif //defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- #if defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- bool File_DvDif_Analysis;
- #endif //defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- #if MEDIAINFO_MACROBLOCKS
- bool File_Macroblocks_Parse;
- #endif //MEDIAINFO_MACROBLOCKS
- float64 File_GrowingFile_Delay;
- #if defined(MEDIAINFO_LIBMMS_YES)
- bool File_Mmsh_Describe_Only;
- #endif //defined(MEDIAINFO_LIBMMS_YES)
- bool File_Eia608_DisplayEmptyStream;
- bool File_Eia708_DisplayEmptyStream;
- #if defined(MEDIAINFO_AC3_YES)
- bool File_Ac3_IgnoreCrc;
- #endif //defined(MEDIAINFO_AC3_YES)
-
- //Analysis internal
- float State;
-
- //Generic
- #if defined(MEDIAINFO_LIBCURL_YES)
- std::map<Ztring, Ztring> Curl;
- #endif //defined(MEDIAINFO_LIBCURL_YES)
-
- ZenLib::CriticalSection CS;
-
- //Constructor
- MediaInfo_Config_MediaInfo (const MediaInfo_Config_MediaInfo&); // Prevent copy-construction
- MediaInfo_Config_MediaInfo& operator=(const MediaInfo_Config_MediaInfo&); // Prevent assignment
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_PerPackage.cpp b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_PerPackage.cpp
deleted file mode 100644
index 64847b076..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_PerPackage.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Config_PerPackage.h"
-#include "MediaInfo/MediaInfo_Config.h"
-#include <algorithm>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-MediaInfo_Config_PerPackage::MediaInfo_Config_PerPackage()
-{
- #if MEDIAINFO_EVENTS
- Event_CallBackFunction=NULL;
- Event_UserHandler=NULL;
- #endif //MEDIAINFO_EVENTS
-
- CountOfPackages=(size_t)-1;
-}
-
-MediaInfo_Config_PerPackage::~MediaInfo_Config_PerPackage()
-{
-}
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-Ztring MediaInfo_Config_PerPackage::Option (const String &Option, const String &Value)
-{
- String Option_Lower(Option);
- size_t Egal_Pos=Option_Lower.find(__T('='));
- if (Egal_Pos==string::npos)
- Egal_Pos=Option_Lower.size();
- transform(Option_Lower.begin(), Option_Lower.begin()+Egal_Pos, Option_Lower.begin(), (int(*)(int))tolower); //(int(*)(int)) is a patch for unix
-
- if (Option_Lower==__T("file_event_callbackfunction"))
- {
- #if MEDIAINFO_EVENTS
- return Event_CallBackFunction_Set(Value);
- #else //MEDIAINFO_EVENTS
- return __T("Event manager is disabled due to compilation options");
- #endif //MEDIAINFO_EVENTS
- }
- else
- return __T("Option not known");
-}
-
-//***************************************************************************
-// Event
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-bool MediaInfo_Config_PerPackage::Event_CallBackFunction_IsSet ()
-{
- CriticalSectionLocker CSL(CS);
-
- return Event_CallBackFunction?true:false;
-}
-#endif //MEDIAINFO_EVENTS
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-Ztring MediaInfo_Config_PerPackage::Event_CallBackFunction_Set (const Ztring &Value)
-{
- ZtringList List=Value;
-
- CriticalSectionLocker CSL(CS);
-
- if (List.empty())
- {
- Event_CallBackFunction=(MediaInfo_Event_CallBackFunction*)NULL;
- Event_UserHandler=NULL;
- }
- else
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- if (List[Pos].find(__T("CallBack=memory://"))==0)
- Event_CallBackFunction=(MediaInfo_Event_CallBackFunction*)Ztring(List[Pos].substr(18, std::string::npos)).To_int64u();
- else if (List[Pos].find(__T("UserHandle=memory://"))==0)
- Event_UserHandler=(void*)Ztring(List[Pos].substr(20, std::string::npos)).To_int64u();
- else if (List[Pos].find(__T("UserHandler=memory://"))==0)
- Event_UserHandler=(void*)Ztring(List[Pos].substr(21, std::string::npos)).To_int64u();
- else
- return("Problem during Event_CallBackFunction value parsing");
- }
-
- return Ztring();
-}
-#endif //MEDIAINFO_EVENTS
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-Ztring MediaInfo_Config_PerPackage::Event_CallBackFunction_Get ()
-{
- CriticalSectionLocker CSL(CS);
-
- return __T("CallBack=memory://")+Ztring::ToZtring((size_t)Event_CallBackFunction)+__T(";UserHandler=memory://")+Ztring::ToZtring((size_t)Event_UserHandler);
-}
-#endif //MEDIAINFO_EVENTS
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-void MediaInfo_Config_PerPackage::Event_Send (File__Analyze* Source, const int8u* Data_Content, size_t Data_Size, const Ztring &File_Name)
-{
- CriticalSectionLocker CSL(CS);
-
- if (Event_CallBackFunction)
- Event_CallBackFunction ((unsigned char*)Data_Content, Data_Size, Event_UserHandler);
-}
-#endif //MEDIAINFO_EVENTS
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_PerPackage.h b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_PerPackage.h
deleted file mode 100644
index f0c283c24..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Config_PerPackage.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Configuration of MediaInfo (per Package block)
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Config_PerPackageH
-#define MediaInfo_Config_PerPackageH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Internal_Const.h"
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Config.h"
- #include "MediaInfo/MediaInfo_Events.h"
- #include "ZenLib/File.h"
-#endif //MEDIAINFO_EVENTS
-#include "ZenLib/CriticalSection.h"
-#include "ZenLib/Translation.h"
-#include "ZenLib/InfoMap.h"
-#include <deque>
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-#if MEDIAINFO_EVENTS
- class File__Analyze;
-#endif //MEDIAINFO_EVENTS
-
-//***************************************************************************
-// Class MediaInfo_Config_PerPackage
-//***************************************************************************
-
-class MediaInfo_Config_PerPackage
-{
-public :
- //Constructor/Destructor
- MediaInfo_Config_PerPackage();
- ~MediaInfo_Config_PerPackage();
-
- //General
- Ztring Option (const String &Option, const String &Value=Ztring());
-
- #if MEDIAINFO_EVENTS
- void IsClosedGOP (File__Analyze* Source);
- #endif //MEDIAINFO_EVENTS
-
- #if MEDIAINFO_EVENTS
- bool Event_CallBackFunction_IsSet ();
- Ztring Event_CallBackFunction_Set (const Ztring &Value);
- Ztring Event_CallBackFunction_Get ();
- void Event_Send(File__Analyze* Source, const int8u* Data_Content, size_t Data_Size, const Ztring &File_Name=Ztring());
- void Event_SubFile_Start(const Ztring &FileName_Absolute);
- #endif //MEDIAINFO_EVENTS
-
- //Internal
- size_t CountOfPackages;
-
-private :
- //Event
- #if MEDIAINFO_EVENTS
- MediaInfo_Event_CallBackFunction* Event_CallBackFunction; //void Event_Handler(unsigned char* Data_Content, size_t Data_Size, void* UserHandler)
- void* Event_UserHandler;
- #endif //MEDIAINFO_EVENTS
-
- ZenLib::CriticalSection CS;
-
- //Constructor
- MediaInfo_Config_PerPackage (const MediaInfo_Config_PerPackage&); // Prevent copy-construction
- MediaInfo_Config_PerPackage& operator=(const MediaInfo_Config_PerPackage&); // Prevent assignment
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Const.h b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Const.h
deleted file mode 100644
index b1b6223e6..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Const.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Global configuration of MediaInfo
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_ConstH
-#define MediaInfo_ConstH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include <string>
-#include <ZenLib/Conf.h>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-/// \mainpage MediaInfoLib Index Page
-///
-/// \section Interfaces
-///
-/// There is 2 access methods
-///
-/// - MediaInfo class \n
-/// To manage one file, this is the simplest interface. \n
-/// - MediaInfo::Open to analyse file \n
-/// - MediaInfo::Inform to have a summary \n
-/// - MediaInfo::Get to retreive one piece of information \n
-///
-/// - MediaInfoList class \n
-/// To manage a list of files \n
-/// - MediaInfoList::Open to analyse file \n
-/// - MediaInfoList::Inform to have a summary \n
-/// - MediaInfoList::Get to retreive one piece of information \n
-/// - MediaInfoList::Close to close one file \n
-///
-/// \section C C Interface (MediaInfo_*)
-/// For compatibility and DLL interface \n
-/// This is a C interface for the List class \n
-/// Note : Don't forget to include the MediaInfoDLL.h file in your source file! \n
-/// - Example of commands:
-/// - MediaInfo_Open to analyse file \n
-/// - MediaInfo_Inform to have a summary \n
-/// - MediaInfo_Get to retreive one piece of information \n
-/// - MediaInfo_Close to free memory \n
-///
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-/// @brief Kinds of Stream
-enum stream_t
-{
- Stream_General, ///< StreamKind = General
- Stream_Video, ///< StreamKind = Video
- Stream_Audio, ///< StreamKind = Audio
- Stream_Text, ///< StreamKind = Text
- Stream_Other, ///< StreamKind = Chapters
- Stream_Image, ///< StreamKind = Image
- Stream_Menu, ///< StreamKind = Menu
- Stream_Max
-};
-
-/// @brief Kind of information
-enum info_t
-{
- Info_Name, ///< InfoKind = Unique name of parameter
- Info_Text, ///< InfoKind = Value of parameter
- Info_Measure, ///< InfoKind = Unique name of measure unit of parameter
- Info_Options, ///< InfoKind = See infooptions_t
- Info_Name_Text, ///< InfoKind = Translated name of parameter
- Info_Measure_Text, ///< InfoKind = Translated name of measure unit
- Info_Info, ///< InfoKind = More information about the parameter
- Info_HowTo, ///< InfoKind = How this parameter is supported, could be N (No), B (Beta), R (Read only), W (Read/Write)
- Info_Domain, ///< InfoKind = Domain of this piece of information
- Info_Max
-};
-
-/// Get(...)[infooptions_t] return a string like "YNYN..." \n
-/// Use this enum to know at what correspond the Y (Yes) or N (No)
-/// If Get(...)[0]==Y, then :
-/// @brief Option if InfoKind = Info_Options
-enum infooptions_t
-{
- InfoOption_ShowInInform, ///< Show this parameter in Inform()
- InfoOption_Reserved, ///<
- InfoOption_ShowInSupported, ///< Internal use only (info : Must be showed in Info_Capacities() )
- InfoOption_TypeOfValue, ///< Value return by a standard Get() can be : T (Text), I (Integer, warning up to 64 bits), F (Float), D (Date), B (Binary datas coded Base64) (Numbers are in Base 10)
- InfoOption_Max
-};
-
-/// @brief File opening options
-enum fileoptions_t
-{
- FileOption_Nothing =0x00,
- FileOption_NoRecursive =0x01, ///< Do not browse folders recursively
- FileOption_CloseAll =0x02, ///< Close all files before open
- FileOption_Max =0x04
-};
-
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-//Char types
-#undef __T
-#define __T(__x) __T(__x)
-#if defined(UNICODE) || defined (_UNICODE)
- typedef wchar_t Char; ///< Unicode/Ansi independant char
- #undef __T
- #define __T(__x) L ## __x
-#else
- typedef char Char; ///< Unicode/Ansi independant char
- #undef __T
- #define __T(__x) __x
-#endif
-typedef std::basic_string<MediaInfoLib::Char> String; ///< Unicode/Ansi independant string
-typedef std::basic_stringstream<MediaInfoLib::Char> StringStream; ///< Unicode/Ansi independant stringstream
-typedef std::basic_istringstream<MediaInfoLib::Char> tiStringStream; ///< Unicode/Ansi independant istringstream
-typedef std::basic_ostringstream<MediaInfoLib::Char> toStringStream; ///< Unicode/Ansi independant ostringstream
-//---------------------------------------------------------------------------
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Events.h b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Events.h
deleted file mode 100644
index 4bfd1f35f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Events.h
+++ /dev/null
@@ -1,758 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-/*Structures for MediaInfo events */
-
-#ifndef MediaInfo_EventsH
-#define MediaInfo_EventsH
-
-/***************************************************************************/
-/* Platforms (from libzen) */
-/***************************************************************************/
-
-/*-------------------------------------------------------------------------*/
-/*Win32*/
-#if defined(__NT__) || defined(_WIN32) || defined(WIN32)
- #ifndef WIN32
- #define WIN32
- #endif
- #ifndef _WIN32
- #define _WIN32
- #endif
- #ifndef __WIN32__
- #define __WIN32__ 1
- #endif
-#endif
-
-/*-------------------------------------------------------------------------*/
-/*Win64*/
-#if defined(_WIN64) || defined(WIN64)
- #ifndef WIN64
- #define WIN64
- #endif
- #ifndef _WIN64
- #define _WIN64
- #endif
- #ifndef __WIN64__
- #define __WIN64__ 1
- #endif
-#endif
-
-/*-------------------------------------------------------------------------*/
-/*Windows*/
-#if defined(WIN32) || defined(WIN64)
- #ifndef WINDOWS
- #define WINDOWS
- #endif
- #ifndef _WINDOWS
- #define _WINDOWS
- #endif
- #ifndef __WINDOWS__
- #define __WINDOWS__ 1
- #endif
-#endif
-
-/*-------------------------------------------------------------------------*/
-/*Unix (Linux, HP, Sun, BeOS...)*/
-#if defined(UNIX) || defined(_UNIX) || defined(__UNIX__) \
- || defined(__unix) || defined(__unix__) \
- || defined(____SVR4____) || defined(__LINUX__) || defined(__sgi) \
- || defined(__hpux) || defined(sun) || defined(__SUN__) || defined(_AIX) \
- || defined(__EMX__) || defined(__VMS) || defined(__BEOS__)
- #ifndef UNIX
- #define UNIX
- #endif
- #ifndef _UNIX
- #define _UNIX
- #endif
- #ifndef __UNIX__
- #define __UNIX__ 1
- #endif
-#endif
-
-/*-------------------------------------------------------------------------*/
-/*MacOS Classic*/
-#if defined(macintosh)
- #ifndef MACOS
- #define MACOS
- #endif
- #ifndef _MACOS
- #define _MACOS
- #endif
- #ifndef __MACOS__
- #define __MACOS__ 1
- #endif
-#endif
-
-/*-------------------------------------------------------------------------*/
-/*MacOS X*/
-#if defined(__APPLE__) && defined(__MACH__)
- #ifndef MACOSX
- #define MACOSX
- #endif
- #ifndef _MACOSX
- #define _MACOSX
- #endif
- #ifndef __MACOSX__
- #define __MACOSX__ 1
- #endif
-#endif
-
-/*Test of targets*/
-#if defined(WINDOWS) && defined(UNIX) && defined(MACOS) && defined(MACOSX)
- #pragma message Multiple platforms???
-#endif
-
-#if !defined(WIN32) && !defined(UNIX) && !defined(MACOS) && !defined(MACOSX)
- #pragma message No known platforms, assume default
-#endif
-
-/*-------------------------------------------------------------------------*/
-/*8-bit int */
-#if UCHAR_MAX==0xff
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 8
- typedef signed char MediaInfo_int8s;
- typedef unsigned char MediaInfo_int8u;
-#else
- #pragma message This machine has no 8-bit integertype?
-#endif
-
-/*-------------------------------------------------------------------------*/
-/*16-bit int */
-#if UINT_MAX == 0xffff
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 16
- typedef signed int MediaInfo_int16s;
- typedef unsigned int MediaInfo_int16u;
-#elif USHRT_MAX == 0xffff
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 16
- typedef signed short MediaInfo_int16s;
- typedef unsigned short MediaInfo_int16u;
-#else
- #pragma message This machine has no 16-bit integertype?
-#endif
-
-/*-------------------------------------------------------------------------*/
-/*32-bit int */
-#if UINT_MAX == 0xfffffffful
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 32
- typedef signed int MediaInfo_int32s;
- typedef unsigned int MediaInfo_int32u;
-#elif ULONG_MAX == 0xfffffffful
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 32
- typedef signed long MediaInfo_int32s;
- typedef unsigned long MediaInfo_int32u;
-#elif USHRT_MAX == 0xfffffffful
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 32
- typedef signed short MediaInfo_int32s;
- typedef unsigned short MediaInfo_int32u;
-#else
- #pragma message This machine has no 32-bit integer type?
-#endif
-
-/*-------------------------------------------------------------------------*/
-/*64-bit int */
-#if defined(__MINGW32__) || defined(__CYGWIN32__) || defined(__UNIX__) || defined(__MACOSX__)
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 64
- typedef unsigned long long MediaInfo_int64u;
- typedef signed long long MediaInfo_int64s;
-#elif defined(__WIN32__) || defined(_WIN32)
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 64
- typedef unsigned __int64 MediaInfo_int64u;
- typedef signed __int64 MediaInfo_int64s;
-#else
- #pragma message This machine has no 64-bit integer type?
-#endif
-/*-------------------------------------------------------------------------*/
-
-
-/***************************************************************************/
-/* The callback function */
-/***************************************************************************/
-
-#if !defined(__WINDOWS__) && !defined(__stdcall)
- #define __stdcall
-#endif //!defined(__WINDOWS__)
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
- typedef void (__stdcall MediaInfo_Event_CallBackFunction)(unsigned char* Data_Content, size_t Data_Size, void* UserHandler);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/***************************************************************************/
-/* EventCode management */
-/***************************************************************************/
-
-#define MediaInfo_EventCode_Create(ParserID, EventID, EventVersion) \
- ( ((MediaInfo_int32u)ParserID )<<24 \
- | ((MediaInfo_int32u)EventID )<< 8 \
- | ((MediaInfo_int32u)EventVersion) )
-
-/***************************************************************************/
-/* Global */
-/***************************************************************************/
-
-/*-------------------------------------------------------------------------*/
-/* Time code */
-typedef struct MediaInfo_time_code
-{
- MediaInfo_int8u Hours;
- MediaInfo_int8u Minutes;
- MediaInfo_int8u Seconds;
- MediaInfo_int8u Frames;
- MediaInfo_int8u FramesPerSecond;
- MediaInfo_int8u DropFrame; //0= No, 1=Yes
- MediaInfo_int8u Reserved[2];
-} MediaInfo_time_code;
-
-/*-------------------------------------------------------------------------*/
-/* Generic */
-#define MEDIAINFO_EVENT_GENERIC \
- MediaInfo_int32u EventCode; \
- MediaInfo_int32u ReservedI32; \
- size_t EventSize; \
- size_t StreamIDs_Size; \
- MediaInfo_int64u StreamIDs[16]; \
- MediaInfo_int8u StreamIDs_Width[16]; \
- MediaInfo_int8u ParserIDs[16]; \
- MediaInfo_int64u StreamOffset; \
- MediaInfo_int64u FrameNumber; \
- MediaInfo_int64u PCR; \
- MediaInfo_int64u PTS; \
- MediaInfo_int64u DTS; \
- MediaInfo_int64u DUR; \
- MediaInfo_int64u FrameNumber_PresentationOrder; \
- MediaInfo_int64u ReservedI64[1]; \
- MediaInfo_time_code TimeCode_Container; \
- MediaInfo_time_code TimeCode_SDTI; \
- MediaInfo_time_code TimeCode_RawStream; \
- MediaInfo_time_code ReservedT[5]; \
-
-typedef struct MediaInfo_Event_Generic
-{
- MEDIAINFO_EVENT_GENERIC
-} MediaInfo_Event_Generic;
-
-/*-------------------------------------------------------------------------*/
-/* MediaInfo_Event_Log_0 */
-#define MediaInfo_Event_Log 0x0F00
-struct MediaInfo_Event_Log_0
-{
- MEDIAINFO_EVENT_GENERIC
- MediaInfo_int8u Type;
- MediaInfo_int8u Severity;
- MediaInfo_int8u Reserved2;
- MediaInfo_int8u Reserved3;
- MediaInfo_int32u MessageCode;
- MediaInfo_int32u Reserved4;
- const wchar_t* MessageString;
- const wchar_t* MessageStringU;
- const char* MessageStringA;
-};
-
-/*-------------------------------------------------------------------------*/
-/* Demux */
-#define MediaInfo_Event_Global_Demux 0xAF00
-enum MediaInfo_Event_Global_Demux_0_contenttype
-{
- MediaInfo_Event_Global_Demux_0_ContentType_MainStream,
- MediaInfo_Event_Global_Demux_0_ContentType_SubStream,
- MediaInfo_Event_Global_Demux_0_ContentType_Header,
- MediaInfo_Event_Global_Demux_0_ContentType_Synchro
-};
-
-struct MediaInfo_Event_Global_Demux_4
-{
- MEDIAINFO_EVENT_GENERIC
- MediaInfo_int8u Content_Type; /*MediaInfo_Event_Global_Demux_0_contenttype*/
- size_t Content_Size;
- const MediaInfo_int8u* Content;
- MediaInfo_int64u Flags; /*bit0=random_access*/
- size_t Offsets_Size;
- const MediaInfo_int64u* Offsets_Stream; /* From the begin of the stream */
- const MediaInfo_int64u* Offsets_Content; /* From the begin of the demuxed content */
- size_t OriginalContent_Size; /* In case of decoded content inside MediaInfo, OriginalContent contain the not-decoded stream */
- const MediaInfo_int8u* OriginalContent; /* In case of decoded content inside MediaInfo, OriginalContent contain the not-decoded stream */
-};
-
-/*-------------------------------------------------------------------------*/
-/* BytesRead */
-#define MediaInfo_Event_Global_BytesRead 0xAF02
-struct MediaInfo_Event_Global_BytesRead_0
-{
- MEDIAINFO_EVENT_GENERIC
- size_t Content_Size;
- const MediaInfo_int8u* Content;
-};
-
-/*-------------------------------------------------------------------------*/
-/* MediaInfo_Event_Video_SliceInfo_0 */
-#define MediaInfo_Event_Video_SliceInfo 0x7801
-struct MediaInfo_Event_Video_SliceInfo_0
-{
- MEDIAINFO_EVENT_GENERIC
- MediaInfo_int64u FieldPosition;
- MediaInfo_int64u SlicePosition;
- MediaInfo_int8u SliceType;
- MediaInfo_int64u Flags;
-};
-
-/***************************************************************************/
-/* General */
-/***************************************************************************/
-
-#define MediaInfo_Parser_None 0x00
-#define MediaInfo_Parser_General 0x00
-#define MediaInfo_Parser_Global 0x00
-#define MediaInfo_Parser_Video 0x01
-
-/*-------------------------------------------------------------------------*/
-/* SubFile_Missing */
-#define MediaInfo_Event_General_SubFile_Missing 0x1F01
-struct MediaInfo_Event_General_SubFile_Missing_0
-{
- MEDIAINFO_EVENT_GENERIC
- const char* FileName_Relative;
- const wchar_t* FileName_Relative_Unicode;
- const char* FileName_Absolute;
- const wchar_t* FileName_Absolute_Unicode;
-};
-
-/*-------------------------------------------------------------------------*/
-/* Start */
-#define MediaInfo_Event_General_Start 0x7001
-struct MediaInfo_Event_General_Start_0
-{
- MEDIAINFO_EVENT_GENERIC
- MediaInfo_int64u Stream_Size;
- const char* FileName;
- const wchar_t* FileName_Unicode;
-};
-
-/*-------------------------------------------------------------------------*/
-/* End */
-#define MediaInfo_Event_General_End 0x7002
-struct MediaInfo_Event_General_End_0
-{
- MEDIAINFO_EVENT_GENERIC
- MediaInfo_int64u Stream_Bytes_Analyzed;
- MediaInfo_int64u Stream_Size;
- MediaInfo_int64u Stream_Bytes_Padding;
- MediaInfo_int64u Stream_Bytes_Junk;
-};
-
-/*-------------------------------------------------------------------------*/
-/* Parser_Selected */
-#define MediaInfo_Event_General_Parser_Selected 0x7003
-struct MediaInfo_Event_General_Parser_Selected_0
-{
- MEDIAINFO_EVENT_GENERIC
- char Name[16];
-};
-
-/*-------------------------------------------------------------------------*/
-/* Move request */
-#define MediaInfo_Event_General_Move_Request 0x7004
-struct MediaInfo_Event_General_Move_Request_0
-{
- MEDIAINFO_EVENT_GENERIC
-};
-
-/*-------------------------------------------------------------------------*/
-/* Move done */
-#define MediaInfo_Event_General_Move_Done 0x7005
-struct MediaInfo_Event_General_Move_Done_0
-{
- MEDIAINFO_EVENT_GENERIC
-};
-
-/*-------------------------------------------------------------------------*/
-/* SubFile_Start */
-#define MediaInfo_Event_General_SubFile_Start 0x7006
-struct MediaInfo_Event_General_SubFile_Start_0
-{
- MEDIAINFO_EVENT_GENERIC
- const char* FileName_Relative;
- const wchar_t* FileName_Relative_Unicode;
- const char* FileName_Absolute;
- const wchar_t* FileName_Absolute_Unicode;
-};
-
-/*-------------------------------------------------------------------------*/
-/* SubFile_End */
-#define MediaInfo_Event_General_SubFile_End 0x7007
-struct MediaInfo_Event_General_SubFile_End_0
-{
- MEDIAINFO_EVENT_GENERIC
-};
-
-/***************************************************************************/
-/* MPEG-TS / BDAV / TSP */
-/***************************************************************************/
-
-#define MediaInfo_Parser_SideCar 0x72
-
-/***************************************************************************/
-/* MPEG-TS / BDAV / TSP */
-/***************************************************************************/
-
-#define MediaInfo_Parser_MpegTs 0x01
-
-/***************************************************************************/
-/* MPEG-PS */
-/***************************************************************************/
-
-#define MediaInfo_Parser_MpegPs 0x02
-#define MediaInfo_Parser_MpegPs_Ext 0x70
-
-/***************************************************************************/
-/* DV / DIF */
-/***************************************************************************/
-
-#define MediaInfo_Parser_DvDif 0x03
-
-/*-------------------------------------------------------------------------*/
-/* Analysis */
-#define MediaInfo_Event_DvDif_Analysis_Frame 0xB001
-struct MediaInfo_Event_DvDif_Analysis_Frame_0
-{
- MediaInfo_int32u EventCode;
- MediaInfo_int32u TimeCode;
- MediaInfo_int32u RecordedDateTime1;
- MediaInfo_int16u RecordedDateTime2;
- MediaInfo_int8u Arb;
- MediaInfo_int8u Verbosity;
- char* Errors;
-};
-
-/***************************************************************************/
-/* CDXA */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Cdxa 0x04
-
-/***************************************************************************/
-/* FLV */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Flv 0x06
-
-/***************************************************************************/
-/* GXF */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Gxf 0x07
-
-/***************************************************************************/
-/* Matroska */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Matroska 0x08
-
-/***************************************************************************/
-/* MPEG-4 */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Mpeg4 0x09
-#define MediaInfo_Parser_Mpeg4_Desc 0x71
-
-/***************************************************************************/
-/* MXF */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Mxf 0x0A
-
-/***************************************************************************/
-/* OGG */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Ogg 0x0B
-
-/***************************************************************************/
-/* RIFF */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Riff 0x0C
-
-/***************************************************************************/
-/* WM */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Wm 0x0D
-
-/***************************************************************************/
-/* LXF */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Lxf 0x0E
-
-/***************************************************************************/
-/* HLS */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Hls 0x60
-
-/***************************************************************************/
-/* HLS Index */
-/***************************************************************************/
-
-#define MediaInfo_Parser_HlsIndex 0x61
-
-/***************************************************************************/
-/* Internet Streaming Media */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Ism 0x62
-
-/***************************************************************************/
-/* DASH MPD */
-/***************************************************************************/
-
-#define MediaInfo_Parser_DashMpd 0x63
-
-/***************************************************************************/
-/* HDS F4M */
-/***************************************************************************/
-
-#define MediaInfo_Parser_HdsF4m 0x64
-
-/***************************************************************************/
-/* DCP Composition Asset Map */
-/***************************************************************************/
-
-#define MediaInfo_Parser_DcpAm 0x65
-
-/***************************************************************************/
-/* DCP Composition Playlist */
-/***************************************************************************/
-
-#define MediaInfo_Parser_DcpCpl 0x66
-
-/***************************************************************************/
-/* DCP Package List */
-/***************************************************************************/
-
-#define MediaInfo_Parser_DcpPkl 0x67
-
-/***************************************************************************/
-/* DCP Output List */
-/***************************************************************************/
-
-#define MediaInfo_Parser_DcpOpl 0x68
-
-/***************************************************************************/
-/* Pro Tools session 10 */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Ptx 0x69
-
-/***************************************************************************/
-/* AAF */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Aaf 0x6A
-
-/***************************************************************************/
-/* DXW */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Dxw 0x6B
-
-/***************************************************************************/
-/* MPEG Video */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Mpegv 0x80
-
-/***************************************************************************/
-/* AVC */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Avc 0x81
-
-/***************************************************************************/
-/* AVC */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Hevc 0x83
-
-/***************************************************************************/
-/* VC-1 */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Vc1 0x82
-
-/***************************************************************************/
-/* Active Format Description (AFD) */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Afd 0x83
-
-/***************************************************************************/
-/* Bar Data */
-/***************************************************************************/
-
-#define MediaInfo_Parser_BarData 0x84
-
-/***************************************************************************/
-/* MPEG-4 Visual */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Mpeg4v 0x85
-
-/***************************************************************************/
-/* DTS */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Dts 0xA0
-
-/***************************************************************************/
-/* AC-3 */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Ac3 0xA1
-
-/***************************************************************************/
-/* AAC */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Aac 0xA2
-
-/***************************************************************************/
-/* MPEG Audio */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Mpega 0xA3
-
-/***************************************************************************/
-/* PCM */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Pcm 0xA4
-
-/***************************************************************************/
-/* AES-3 */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Aes3 0xA5
-
-/***************************************************************************/
-/* Dolby E */
-/***************************************************************************/
-
-#define MediaInfo_Parser_DolbyE 0xA6
-
-/***************************************************************************/
-/* Channel grouping intermediate module */
-/***************************************************************************/
-
-#define MediaInfo_Parser_ChannelGrouping 0xA7
-
-/***************************************************************************/
-/* JPEG */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Jpeg 0xC0
-
-/***************************************************************************/
-/* CEA-608 (formely IEA-608) */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Eia608 0xF0
-
-/***************************************************************************/
-/* DTVCC Transport (CEA-708, formely IEA-708) */
-/***************************************************************************/
-
-#define MediaInfo_Parser_DtvccTransport 0xF1
-#define MediaInfo_Parser_Eia708 0xF1 /*Deprecated*/
-
-/***************************************************************************/
-/* DTVCC Caption (CEA-708, formely IEA-708) */
-/***************************************************************************/
-
-#define MediaInfo_Parser_DtvccCaption 0xF2
-
-/***************************************************************************/
-/* CDP */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Cdp 0xF3
-
-/***************************************************************************/
-/* DVD CC */
-/***************************************************************************/
-
-#define MediaInfo_Parser_DvdCc 0xF4
-
-/***************************************************************************/
-/* SCTE 20 */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Scte20 0xF5
-
-/***************************************************************************/
-/* DVB Subtitle */
-/***************************************************************************/
-
-#define MediaInfo_Parser_DvbSubtitle 0xF6
-
-/***************************************************************************/
-/* Teletext */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Teletext 0xF7
-
-/***************************************************************************/
-/* SCC */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Scc 0xF8
-
-/***************************************************************************/
-/* ARIB STD B24/B37 */
-/***************************************************************************/
-
-#define MediaInfo_Parser_AribStdB24B37 0xF9
-
-/***************************************************************************/
-/* TTML */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Ttml 0xFA
-
-/***************************************************************************/
-/* SubRip */
-/***************************************************************************/
-
-#define MediaInfo_Parser_SubRip 0xFB
-
-/***************************************************************************/
-/* N19 */
-/***************************************************************************/
-
-#define MediaInfo_Parser_N19 0xFC
-
-/***************************************************************************/
-/* SDP */
-/***************************************************************************/
-
-#define MediaInfo_Parser_Sdp 0xFD
-
-#endif //MediaInfo_EventsH
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Events_Internal.h b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Events_Internal.h
deleted file mode 100644
index b4bcc12c6..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Events_Internal.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-#ifndef MediaInfo_Events_InternalH
-#define MediaInfo_Events_InternalH
-
-#include "MediaInfo/MediaInfo_Events.h"
-#include "MediaInfo/TimeCode.h"
-#include <cstring>
-using namespace MediaInfoLib;
-using namespace std;
-
-//---------------------------------------------------------------------------
-// Generic
-#define EVENT_BEGIN(_EventType, _EventName, _EventVersion) \
-{ \
- struct MediaInfo_Event_##_EventType##_##_EventName##_##_EventVersion Event;\
- Event_Prepare((struct MediaInfo_Event_Generic*)&Event); \
- Event.EventCode=MediaInfo_EventCode_Create(MediaInfo_Parser_##_EventType, MediaInfo_Event_##_EventType##_##_EventName, _EventVersion); \
- Event.EventSize=sizeof(struct MediaInfo_Event_##_EventType##_##_EventName##_##_EventVersion); \
-
-#define EVENT_END() \
- Config->Event_Send(Status[IsAccepted]?NULL:this, (const int8u*)&Event, Event.EventSize, IsSub?File_Name_WithoutDemux:File_Name); \
-} \
-
-#define EVENT(_EventType, _EventName, _EventVersion) \
- EVENT_BEGIN(_EventType, _EventName, _EventVersion) \
- EVENT_END ()
-
-//---------------------------------------------------------------------------
-// Helpers
-namespace MediaInfoLib
-{
- inline void Events_PCR(int64u PCR, int64u &Event_PCR, char* Event_PCR_HR)
- {
- Event_PCR=PCR;
- if (PCR!=(int64u)-1)
- {
- string PCR_HR=Ztring().Duration_From_Milliseconds(PCR/1000000).To_UTF8();
- if (PCR_HR.size()==12)
- strcpy(Event_PCR_HR, PCR_HR.c_str());
- else
- memset(Event_PCR_HR, 0x00, 13);
- }
- else
- memset(Event_PCR_HR, 0x00, 13);
- }
-
- inline void Events_PTS(int64u PTS, int64u &Event_PTS, char* Event_PTS_HR)
- {
- Event_PTS=PTS;
- if (PTS!=(int64u)-1)
- {
- string PTS_HR=Ztring().Duration_From_Milliseconds(PTS/1000000).To_UTF8();
- if (PTS_HR.size()==12)
- strcpy(Event_PTS_HR, PTS_HR.c_str());
- else
- memset(Event_PTS_HR, 0x00, 13);
- }
- else
- memset(Event_PTS_HR, 0x00, 13);
- }
-
- inline void Events_DTS(int64u DTS, int64u &Event_DTS, char* Event_DTS_HR)
- {
- Event_DTS=DTS;
- if (DTS!=(int64u)-1)
- {
- string DTS_HR=Ztring().Duration_From_Milliseconds(DTS/1000000).To_UTF8();
- if (DTS_HR.size()==12)
- strcpy(Event_DTS_HR, DTS_HR.c_str());
- else
- memset(Event_DTS_HR, 0x00, 13);
- }
- else
- memset(Event_DTS_HR, 0x00, 13);
- }
-
- inline void Events_TimeCode(const TimeCode &Tc, MediaInfo_time_code &Event_TimeCode, char* Event_TimeCode_HR)
- {
- if (Tc.IsValid())
- {
- Event_TimeCode.Hours=Tc.Hours;
- Event_TimeCode.Minutes=Tc.Minutes;
- Event_TimeCode.Seconds=Tc.Seconds;
- Event_TimeCode.Frames=Tc.Frames;
- Event_TimeCode.FramesPerSecond=Tc.FramesPerSecond;
- Event_TimeCode.DropFrame=Tc.DropFrame;
- Event_TimeCode_HR[ 0]='0'+Tc.Hours/10;
- Event_TimeCode_HR[ 1]='0'+Tc.Hours%10;
- Event_TimeCode_HR[ 2]=':';
- Event_TimeCode_HR[ 3]='0'+Tc.Minutes/10;
- Event_TimeCode_HR[ 4]='0'+Tc.Minutes%10;
- Event_TimeCode_HR[ 5]=':';
- Event_TimeCode_HR[ 6]='0'+Tc.Seconds/10;
- Event_TimeCode_HR[ 7]='0'+Tc.Seconds%10;
- Event_TimeCode_HR[ 8]=Tc.DropFrame?';':':';
- Event_TimeCode_HR[ 9]='0'+Tc.Frames/10;
- Event_TimeCode_HR[10]='0'+Tc.Frames%10;
- Event_TimeCode_HR[11]='\0';
- Event_TimeCode_HR[12]='\0';
- }
- else
- {
- Event_TimeCode.Hours=(MediaInfo_int8u)-1;
- Event_TimeCode.Minutes=(MediaInfo_int8u)-1;
- Event_TimeCode.Seconds=(MediaInfo_int8u)-1;
- Event_TimeCode.Frames=(MediaInfo_int8u)-1;
- Event_TimeCode.FramesPerSecond=(MediaInfo_int8u)-1;
- Event_TimeCode.DropFrame=(MediaInfo_int8u)-1;
- memset(Event_TimeCode_HR, 0x00, 13);
- }
- }
-}
-
-#endif //MediaInfo_EventsH
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_File.cpp b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_File.cpp
deleted file mode 100644
index 59f97c423..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_File.cpp
+++ /dev/null
@@ -1,1136 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// How to:
-// To add a new format,
-// Fill includes, SelectFromExtension, ListFormats and LibraryIsModified
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/Reader/Reader_File.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-// Multiple
-#if defined(MEDIAINFO_AAF_YES)
- #include "MediaInfo/Multiple/File_Aaf.h"
-#endif
-#if defined(MEDIAINFO_BDMV_YES)
- #include "MediaInfo/Multiple/File_Bdmv.h"
-#endif
-#if defined(MEDIAINFO_CDXA_YES)
- #include "MediaInfo/Multiple/File_Cdxa.h"
-#endif
-#if defined(MEDIAINFO_DASHMPD_YES)
- #include "MediaInfo/Multiple/File_DashMpd.h"
-#endif
-#if defined(MEDIAINFO_DCP_YES)
- #include "MediaInfo/Multiple/File_DcpAm.h"
-#endif
-#if defined(MEDIAINFO_DCP_YES)
- #include "MediaInfo/Multiple/File_DcpCpl.h"
-#endif
-#if defined(MEDIAINFO_DCP_YES)
- #include "MediaInfo/Multiple/File_DcpPkl.h"
-#endif
-#if defined(MEDIAINFO_DVDIF_YES)
- #include "MediaInfo/Multiple/File_DvDif.h"
-#endif
-#if defined(MEDIAINFO_DVDV_YES)
- #include "MediaInfo/Multiple/File_Dvdv.h"
-#endif
-#if defined(MEDIAINFO_DXW_YES)
- #include "MediaInfo/Multiple/File_Dxw.h"
-#endif
-#if defined(MEDIAINFO_FLV_YES)
- #include "MediaInfo/Multiple/File_Flv.h"
-#endif
-#if defined(MEDIAINFO_GXF_YES)
- #include "MediaInfo/Multiple/File_Gxf.h"
-#endif
-#if defined(MEDIAINFO_HDSF4M_YES)
- #include "MediaInfo/Multiple/File_HdsF4m.h"
-#endif
-#if defined(MEDIAINFO_HLS_YES)
- #include "MediaInfo/Multiple/File_Hls.h"
-#endif
-#if defined(MEDIAINFO_IBI_YES)
- #include "MediaInfo/Multiple/File_Ibi.h"
-#endif
-#if defined(MEDIAINFO_ISM_YES)
- #include "MediaInfo/Multiple/File_Ism.h"
-#endif
-#if defined(MEDIAINFO_IMF_YES)
- #include "MediaInfo/Multiple/File_ImfCpl.h"
-#endif
-#if defined(MEDIAINFO_IVF_YES)
- #include "MediaInfo/Multiple/File_Ivf.h"
-#endif
-#if defined(MEDIAINFO_LXF_YES)
- #include "MediaInfo/Multiple/File_Lxf.h"
-#endif
-#if defined(MEDIAINFO_MK_YES)
- #include "MediaInfo/Multiple/File_Mk.h"
-#endif
-#if defined(MEDIAINFO_MPEG4_YES)
- #include "MediaInfo/Multiple/File_Mpeg4.h"
-#endif
-#if defined(MEDIAINFO_MPEGPS_YES)
- #include "MediaInfo/Multiple/File_MpegPs.h"
-#endif
-#if defined(MEDIAINFO_MPEGTS_YES) || defined(MEDIAINFO_BDAV_YES) || defined(MEDIAINFO_TSP_YES)
- #include "MediaInfo/Multiple/File_MpegTs.h"
-#endif
-#if defined(MEDIAINFO_MXF_YES)
- #include "MediaInfo/Multiple/File_Mxf.h"
-#endif
-#if defined(MEDIAINFO_NUT_YES)
- #include "MediaInfo/Multiple/File_Nut.h"
-#endif
-#if defined(MEDIAINFO_OGG_YES)
- #include "MediaInfo/Multiple/File_Ogg.h"
-#endif
-#if defined(MEDIAINFO_P2_YES)
- #include "MediaInfo/Multiple/File_P2_Clip.h"
-#endif
-#if defined(MEDIAINFO_PMP_YES)
- #include "MediaInfo/Multiple/File_Pmp.h"
-#endif
-#if defined(MEDIAINFO_PTX_YES)
- #include "MediaInfo/Multiple/File_Ptx.h"
-#endif
-#if defined(MEDIAINFO_RIFF_YES)
- #include "MediaInfo/Multiple/File_Riff.h"
-#endif
-#if defined(MEDIAINFO_RM_YES)
- #include "MediaInfo/Multiple/File_Rm.h"
-#endif
-#if defined(MEDIAINFO_SEQUENCEINFO_YES)
- #include "MediaInfo/Multiple/File_SequenceInfo.h"
-#endif
-#if defined(MEDIAINFO_SKM_YES)
- #include "MediaInfo/Multiple/File_Skm.h"
-#endif
-#if defined(MEDIAINFO_SWF_YES)
- #include "MediaInfo/Multiple/File_Swf.h"
-#endif
-#if defined(MEDIAINFO_WM_YES)
- #include "MediaInfo/Multiple/File_Wm.h"
-#endif
-#if defined(MEDIAINFO_XDCAM_YES)
- #include "MediaInfo/Multiple/File_Xdcam_Clip.h"
-#endif
-#if defined(MEDIAINFO_DPG_YES)
- #include "MediaInfo/Multiple/File_Dpg.h"
-#endif
-
-//---------------------------------------------------------------------------
-// Video
-#if defined(MEDIAINFO_AVC_YES)
- #include "MediaInfo/Video/File_Avc.h"
-#endif
-#if defined(MEDIAINFO_AVSV_YES)
- #include "MediaInfo/Video/File_AvsV.h"
-#endif
-#if defined(MEDIAINFO_DIRAC_YES)
- #include "MediaInfo/Video/File_Dirac.h"
-#endif
-#if defined(MEDIAINFO_FLIC_YES)
- #include "MediaInfo/Video/File_Flic.h"
-#endif
-#if defined(MEDIAINFO_H263_YES)
- #include "MediaInfo/Video/File_H263.h"
-#endif
-#if defined(MEDIAINFO_HEVC_YES)
- #include "MediaInfo/Video/File_Hevc.h"
-#endif
-#if defined(MEDIAINFO_MPEG4V_YES)
- #include "MediaInfo/Video/File_Mpeg4v.h"
-#endif
-#if defined(MEDIAINFO_MPEGV_YES)
- #include "MediaInfo/Video/File_Mpegv.h"
-#endif
-#if defined(MEDIAINFO_VC1_YES)
- #include "MediaInfo/Video/File_Vc1.h"
-#endif
-#if defined(MEDIAINFO_VC3_YES)
- #include "MediaInfo/Video/File_Vc3.h"
-#endif
-#if defined(MEDIAINFO_Y4M_YES)
- #include "MediaInfo/Video/File_Y4m.h"
-#endif
-
-//---------------------------------------------------------------------------
-// Audio
-#if defined(MEDIAINFO_AAC_YES)
- #include "MediaInfo/Audio/File_Aac.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_ALS_YES)
- #include "MediaInfo/Audio/File_Als.h"
-#endif
-#if defined(MEDIAINFO_AMR_YES)
- #include "MediaInfo/Audio/File_Amr.h"
-#endif
-#if defined(MEDIAINFO_AMV_YES)
- #include "MediaInfo/Audio/File_Amv.h"
-#endif
-#if defined(MEDIAINFO_APE_YES)
- #include "MediaInfo/Audio/File_Ape.h"
-#endif
-#if defined(MEDIAINFO_AU_YES)
- #include "MediaInfo/Audio/File_Au.h"
-#endif
-#if defined(MEDIAINFO_CAF_YES)
- #include "MediaInfo/Audio/File_Caf.h"
-#endif
-#if defined(MEDIAINFO_DTS_YES)
- #include "MediaInfo/Audio/File_Dts.h"
-#endif
-#if defined(MEDIAINFO_DOLBYE_YES)
- #include "MediaInfo/Audio/File_DolbyE.h"
-#endif
-#if defined(MEDIAINFO_FLAC_YES)
- #include "MediaInfo/Audio/File_Flac.h"
-#endif
-#if defined(MEDIAINFO_IT_YES)
- #include "MediaInfo/Audio/File_ImpulseTracker.h"
-#endif
-#if defined(MEDIAINFO_LA_YES)
- #include "MediaInfo/Audio/File_La.h"
-#endif
-#if defined(MEDIAINFO_MIDI_YES)
- #include "MediaInfo/Audio/File_Midi.h"
-#endif
-#if defined(MEDIAINFO_MOD_YES)
- #include "MediaInfo/Audio/File_Module.h"
-#endif
-#if defined(MEDIAINFO_MPC_YES)
- #include "MediaInfo/Audio/File_Mpc.h"
-#endif
-#if defined(MEDIAINFO_MPCSV8_YES)
- #include "MediaInfo/Audio/File_MpcSv8.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if defined(MEDIAINFO_OPENMG_YES)
- #include "MediaInfo/Audio/File_OpenMG.h"
-#endif
-#if defined(MEDIAINFO_RKAU_YES)
- #include "MediaInfo/Audio/File_Rkau.h"
-#endif
-#if defined(MEDIAINFO_S3M_YES)
- #include "MediaInfo/Audio/File_ScreamTracker3.h"
-#endif
-#if defined(MEDIAINFO_SMPTEST0337_YES)
- #include "MediaInfo/Audio/File_SmpteSt0337.h"
-#endif
-#if defined(MEDIAINFO_TAK_YES)
- #include "MediaInfo/Audio/File_Tak.h"
-#endif
-#if defined(MEDIAINFO_TTA_YES)
- #include "MediaInfo/Audio/File_Tta.h"
-#endif
-#if defined(MEDIAINFO_TWINVQ_YES)
- #include "MediaInfo/Audio/File_TwinVQ.h"
-#endif
-#if defined(MEDIAINFO_WVPK_YES)
- #include "MediaInfo/Audio/File_Wvpk.h"
-#endif
-#if defined(MEDIAINFO_XM_YES)
- #include "MediaInfo/Audio/File_ExtendedModule.h"
-#endif
-
-//---------------------------------------------------------------------------
-// Text
-#if defined(MEDIAINFO_EIA608_YES)
- #include "MediaInfo/Text/File_Eia608.h"
-#endif
-#if defined(MEDIAINFO_N19_YES)
- #include "MediaInfo/Text/File_N19.h"
-#endif
-#if defined(MEDIAINFO_PDF_YES)
- #include "MediaInfo/Text/File_Pdf.h"
-#endif
-#if defined(MEDIAINFO_SCC_YES)
- #include "MediaInfo/Text/File_Scc.h"
-#endif
-#if defined(MEDIAINFO_SDP_YES)
- #include "MediaInfo/Text/File_Sdp.h"
-#endif
-#if defined(MEDIAINFO_SUBRIP_YES)
- #include "MediaInfo/Text/File_SubRip.h"
-#endif
-#if defined(MEDIAINFO_TELETEXT_YES)
- #include "MediaInfo/Text/File_Teletext.h"
-#endif
-#if defined(MEDIAINFO_TTML_YES)
- #include "MediaInfo/Text/File_Ttml.h"
-#endif
-#if defined(MEDIAINFO_OTHERTEXT_YES)
- #include "MediaInfo/Text/File_OtherText.h"
-#endif
-
-//---------------------------------------------------------------------------
-// Image
-#if defined(MEDIAINFO_ARRIRAW_YES)
- #include "MediaInfo/Image/File_ArriRaw.h"
-#endif
-#if defined(MEDIAINFO_BMP_YES)
- #include "MediaInfo/Image/File_Bmp.h"
-#endif
-#if defined(MEDIAINFO_BPG_YES)
- #include "MediaInfo/Image/File_Bpg.h"
-#endif
-#if defined(MEDIAINFO_DDS_YES)
- #include "MediaInfo/Image/File_Dds.h"
-#endif
-#if defined(MEDIAINFO_DPX_YES)
- #include "MediaInfo/Image/File_Dpx.h"
-#endif
-#if defined(MEDIAINFO_EXR_YES)
- #include "MediaInfo/Image/File_Exr.h"
-#endif
-#if defined(MEDIAINFO_GIF_YES)
- #include "MediaInfo/Image/File_Gif.h"
-#endif
-#if defined(MEDIAINFO_ICO_YES)
- #include "MediaInfo/Image/File_Ico.h"
-#endif
-#if defined(MEDIAINFO_JPEG_YES)
- #include "MediaInfo/Image/File_Jpeg.h"
-#endif
-#if defined(MEDIAINFO_PCX_YES)
- #include "MediaInfo/Image/File_Pcx.h"
-#endif
-#if defined(MEDIAINFO_PNG_YES)
- #include "MediaInfo/Image/File_Png.h"
-#endif
-#if defined(MEDIAINFO_PSD_YES)
- #include "MediaInfo/Image/File_Psd.h"
-#endif
-#if defined(MEDIAINFO_TIFF_YES)
- #include "MediaInfo/Image/File_Tiff.h"
-#endif
-#if defined(MEDIAINFO_TGA_YES)
- #include "MediaInfo/Image/File_Tga.h"
-#endif
-
-//---------------------------------------------------------------------------
-// Archive
-#if defined(MEDIAINFO_7Z_YES)
- #include "MediaInfo/Archive/File_7z.h"
-#endif
-#if defined(MEDIAINFO_ACE_YES)
- #include "MediaInfo/Archive/File_Ace.h"
-#endif
-#if defined(MEDIAINFO_BZIP2_YES)
- #include "MediaInfo/Archive/File_Bzip2.h"
-#endif
-#if defined(MEDIAINFO_ELF_YES)
- #include "MediaInfo/Archive/File_Elf.h"
-#endif
-#if defined(MEDIAINFO_GZIP_YES)
- #include "MediaInfo/Archive/File_Gzip.h"
-#endif
-#if defined(MEDIAINFO_ISO9660_YES)
- #include "MediaInfo/Archive/File_Iso9660.h"
-#endif
-#if defined(MEDIAINFO_MZ_YES)
- #include "MediaInfo/Archive/File_Mz.h"
-#endif
-#if defined(MEDIAINFO_RAR_YES)
- #include "MediaInfo/Archive/File_Rar.h"
-#endif
-#if defined(MEDIAINFO_TAR_YES)
- #include "MediaInfo/Archive/File_Tar.h"
-#endif
-#if defined(MEDIAINFO_ZIP_YES)
- #include "MediaInfo/Archive/File_Zip.h"
-#endif
-
-//---------------------------------------------------------------------------
-// Other
-#if defined(MEDIAINFO_OTHER_YES)
- #include "MediaInfo/File_Other.h"
-#endif
-#if defined(MEDIAINFO_UNKNOWN_YES)
- #include "MediaInfo/File_Unknown.h"
-#endif
-#if defined(MEDIAINFO_DUMMY_YES)
- #include "MediaInfo/File_Dummy.h"
-#endif
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-bool MediaInfo_Internal::SelectFromExtension (const String &Parser)
-{
- CriticalSectionLocker CSL(CS);
-
- //Clear last value
- delete Info; Info=NULL;
-
- //Searching the right File_*
- if (0) {} //For #defines
-
- // Multiple
- #if defined(MEDIAINFO_AAF_YES)
- else if (Parser==__T("Aaf")) Info=new File_Aaf();
- #endif
- #if defined(MEDIAINFO_BDAV_YES)
- else if (Parser==__T("Bdav")) {Info=new File_MpegTs(); ((File_MpegTs*)Info)->BDAV_Size=4;}
- #endif
- #if defined(MEDIAINFO_BDMV_YES)
- else if (Parser==__T("Bdmv")) Info=new File_Bdmv();
- #endif
- #if defined(MEDIAINFO_CDXA_YES)
- else if (Parser==__T("Cdxa")) Info=new File_Cdxa();
- #endif
- #if defined(MEDIAINFO_DASHMPD_YES)
- else if (Parser==__T("DashMpd")) Info=new File_DashMpd();
- #endif
- #if defined(MEDIAINFO_DCP_YES)
- else if (Parser==__T("DcpAm")) Info=new File_DcpAm();
- #endif
- #if defined(MEDIAINFO_DCP_YES)
- else if (Parser==__T("DcpCpl")) Info=new File_DcpCpl();
- #endif
- #if defined(MEDIAINFO_DCP_YES)
- else if (Parser==__T("DcpPkg")) Info=new File_DcpPkl();
- #endif
- #if defined(MEDIAINFO_DPG_YES)
- else if (Parser==__T("Dpg")) Info=new File_Dpg();
- #endif
- #if defined(MEDIAINFO_DVDIF_YES)
- else if (Parser==__T("DvDif")) Info=new File_DvDif();
- #endif
- #if defined(MEDIAINFO_DVDV_YES)
- else if (Parser==__T("Dvdv")) Info=new File_Dvdv();
- #endif
- #if defined(MEDIAINFO_DXW_YES)
- else if (Parser==__T("Dxw")) Info=new File_Dxw();
- #endif
- #if defined(MEDIAINFO_FLV_YES)
- else if (Parser==__T("Flv")) Info=new File_Flv();
- #endif
- #if defined(MEDIAINFO_GXF_YES)
- else if (Parser==__T("Gxf")) Info=new File_Gxf();
- #endif
- #if defined(MEDIAINFO_HDSF4M_YES)
- else if (Parser==__T("HdsF4m")) Info=new File_HdsF4m();
- #endif
- #if defined(MEDIAINFO_HLS_YES)
- else if (Parser==__T("Hls")) Info=new File_Hls();
- #endif
- #if defined(MEDIAINFO_ISM_YES)
- else if (Parser==__T("Ism")) Info=new File_Ism();
- #endif
- #if defined(MEDIAINFO_IVF_YES)
- else if (Parser==__T("Ivf")) Info=new File_Ivf();
- #endif
- #if defined(MEDIAINFO_LXF_YES)
- else if (Parser==__T("Lxf")) Info=new File_Lxf();
- #endif
- #if defined(MEDIAINFO_MK_YES)
- else if (Parser==__T("Mk")) Info=new File_Mk();
- #endif
- #if defined(MEDIAINFO_MPEG4_YES)
- else if (Parser==__T("Mpeg4")) Info=new File_Mpeg4();
- #endif
- #if defined(MEDIAINFO_MPEGPS_YES)
- else if (Parser==__T("MpegPs")) Info=new File_MpegPs();
- #endif
- #if defined(MEDIAINFO_MPEGTS_YES)
- else if (Parser==__T("MpegTs")) Info=new File_MpegTs();
- #endif
- #if defined(MEDIAINFO_MXF_YES)
- else if (Parser==__T("Mxf")) Info=new File_Mxf();
- #endif
- #if defined(MEDIAINFO_NUT_YES)
- else if (Parser==__T("Nut")) Info=new File_Nut();
- #endif
- #if defined(MEDIAINFO_OGG_YES)
- else if (Parser==__T("Ogg")) Info=new File_Ogg();
- #endif
- #if defined(MEDIAINFO_P2_YES)
- else if (Parser==__T("P2_Clip")) Info=new File_P2_Clip();
- #endif
- #if defined(MEDIAINFO_PMP_YES)
- else if (Parser==__T("Pmp")) Info=new File_Pmp();
- #endif
- #if defined(MEDIAINFO_PTX_YES)
- else if (Parser==__T("Ptx")) Info=new File_Ptx();
- #endif
- #if defined(MEDIAINFO_RIFF_YES)
- else if (Parser==__T("Riff")) Info=new File_Riff();
- #endif
- #if defined(MEDIAINFO_RM_YES)
- else if (Parser==__T("Rm")) Info=new File_Rm();
- #endif
- #if defined(MEDIAINFO_SEQUENCEINFO_YES)
- else if (Parser==__T("SequenceInfo")) Info=new File_SequenceInfo();
- #endif
- #if defined(MEDIAINFO_SKM_YES)
- else if (Parser==__T("Skm")) Info=new File_Skm();
- #endif
- #if defined(MEDIAINFO_SWF_YES)
- else if (Parser==__T("Swf")) Info=new File_Swf();
- #endif
- #if defined(MEDIAINFO_WM_YES)
- else if (Parser==__T("Wm")) Info=new File_Wm();
- #endif
- #if defined(MEDIAINFO_XDCAM_YES)
- else if (Parser==__T("Xdcam_Clip")) Info=new File_Xdcam_Clip();
- #endif
-
- // Video
- #if defined(MEDIAINFO_AVC_YES)
- else if (Parser==__T("Avc")) Info=new File_Avc();
- #endif
- #if defined(MEDIAINFO_HEVC_YES)
- else if (Parser==__T("Hevc")) Info=new File_Hevc();
- #endif
- #if defined(MEDIAINFO_AVSV_YES)
- else if (Parser==__T("AvsV")) Info=new File_AvsV();
- #endif
- #if defined(MEDIAINFO_DIRAC_YES)
- else if (Parser==__T("Dirac")) Info=new File_Dirac();
- #endif
- #if defined(MEDIAINFO_FLIC_YES)
- else if (Parser==__T("Flic")) Info=new File_Flic();
- #endif
- #if defined(MEDIAINFO_H263_YES)
- else if (Parser==__T("H263")) Info=new File_H263();
- #endif
- #if defined(MEDIAINFO_MPEG4V_YES)
- else if (Parser==__T("Mpeg4v")) Info=new File_Mpeg4v();
- #endif
- #if defined(MEDIAINFO_MPEGV_YES)
- else if (Parser==__T("Mpegv")) Info=new File_Mpegv();
- #endif
- #if defined(MEDIAINFO_VC1_YES)
- else if (Parser==__T("Vc1")) Info=new File_Vc1();
- #endif
- #if defined(MEDIAINFO_VC3_YES)
- else if (Parser==__T("Vc3")) Info=new File_Vc3();
- #endif
- #if defined(MEDIAINFO_Y4M_YES)
- else if (Parser==__T("Y4m")) Info=new File_Y4m();
- #endif
-
- // Audio
- #if defined(MEDIAINFO_AAC_YES)
- else if (Parser==__T("Adts")) {Info=new File_Aac(); ((File_Aac*)Info)->Mode=File_Aac::Mode_ADTS;} // Prioritization against ADIF
- #endif
- #if defined(MEDIAINFO_AC3_YES)
- else if (Parser==__T("Ac3")) Info=new File_Ac3();
- #endif
- #if defined(MEDIAINFO_SMPTEST0337_YES)
- else if (Parser==__T("Aes3")) Info=new File_SmpteSt0337();
- #endif
- #if defined(MEDIAINFO_ALS_YES)
- else if (Parser==__T("Als")) Info=new File_Als();
- #endif
- #if defined(MEDIAINFO_AMR_YES)
- else if (Parser==__T("Amr")) Info=new File_Amr();
- #endif
- #if defined(MEDIAINFO_AMV_YES)
- else if (Parser==__T("Amv")) Info=new File_Amv();
- #endif
- #if defined(MEDIAINFO_APE_YES)
- else if (Parser==__T("Ape")) Info=new File_Ape();
- #endif
- #if defined(MEDIAINFO_AU_YES)
- else if (Parser==__T("Au")) Info=new File_Au();
- #endif
- #if defined(MEDIAINFO_CAF_YES)
- else if (Parser==__T("Caf")) Info=new File_Caf();
- #endif
- #if defined(MEDIAINFO_DTS_YES)
- else if (Parser==__T("Dts")) Info=new File_Dts();
- #endif
- #if defined(MEDIAINFO_DOLBYE_YES)
- else if (Parser==__T("DolbyE")) Info=new File_DolbyE();
- #endif
- #if defined(MEDIAINFO_FLAC_YES)
- else if (Parser==__T("Flac")) Info=new File_Flac();
- #endif
- #if defined(MEDIAINFO_IT_YES)
- else if (Parser==__T("It")) Info=new File_ImpulseTracker();
- #endif
- #if defined(MEDIAINFO_LA_YES)
- else if (Parser==__T("La")) Info=new File_La();
- #endif
- #if defined(MEDIAINFO_MIDI_YES)
- else if (Parser==__T("Midi")) Info=new File_Midi();
- #endif
- #if defined(MEDIAINFO_MOD_YES)
- else if (Parser==__T("Mod")) Info=new File_Module();
- #endif
- #if defined(MEDIAINFO_MPC_YES)
- else if (Parser==__T("Mpc")) Info=new File_Mpc();
- #endif
- #if defined(MEDIAINFO_MPCSV8_YES)
- else if (Parser==__T("Mpc")) Info=new File_MpcSv8();
- #endif
- #if defined(MEDIAINFO_MPEGA_YES)
- else if (Parser==__T("Mpega")) Info=new File_Mpega();
- #endif
- #if defined(MEDIAINFO_OPENMG_YES)
- else if (Parser==__T("OpenMG")) Info=new File_OpenMG();
- #endif
- #if defined(MEDIAINFO_RKAU_YES)
- else if (Parser==__T("Rkau")) Info=new File_Rkau();
- #endif
- #if defined(MEDIAINFO_S3M_YES)
- else if (Parser==__T("S3m")) Info=new File_ScreamTracker3();
- #endif
- #if defined(MEDIAINFO_TAK_YES)
- else if (Parser==__T("Tak")) Info=new File_Tak();
- #endif
- #if defined(MEDIAINFO_TTA_YES)
- else if (Parser==__T("Tta")) Info=new File_Tta();
- #endif
- #if defined(MEDIAINFO_TWINVQ_YES)
- else if (Parser==__T("TwinVQ")) Info=new File_TwinVQ();
- #endif
- #if defined(MEDIAINFO_WVPK_YES)
- else if (Parser==__T("Wvpk")) Info=new File_Wvpk();
- #endif
- #if defined(MEDIAINFO_XM_YES)
- else if (Parser==__T("Xm")) Info=new File_ExtendedModule();
- #endif
-
- // Text
- #if defined(MEDIAINFO_EIA608_YES)
- else if (Parser==__T("CEA-608")) Info=new File_Eia608();
- else if (Parser==__T("EIA-608")) Info=new File_Eia608();
- #endif
- #if defined(MEDIAINFO_N19_YES)
- else if (Parser==__T("N19")) Info=new File_N19();
- #endif
- #if defined(MEDIAINFO_PDF_YES)
- else if (Parser==__T("PDF")) Info=new File_Pdf();
- #endif
- #if defined(MEDIAINFO_SCC_YES)
- else if (Parser==__T("SCC")) Info=new File_Scc();
- #endif
- #if defined(MEDIAINFO_SDP_YES)
- else if (Parser==__T("SDP")) Info=new File_Sdp();
- #endif
- #if defined(MEDIAINFO_SUBRIP_YES)
- else if (Parser==__T("SubRip")) Info=new File_SubRip();
- else if (Parser==__T("WebVTT")) Info=new File_SubRip();
- #endif
- #if defined(MEDIAINFO_TELETEXT_YES)
- else if (Parser==__T("Teletext")) Info=new File_Teletext();
- #endif
- #if defined(MEDIAINFO_TTML_YES)
- else if (Parser==__T("TTML")) Info=new File_Ttml();
- #endif
- #if defined(MEDIAINFO_OTHERTEXT_YES)
- else if (Parser==__T("OtherText")) Info=new File_OtherText();
- #endif
-
- // Image
- #if defined(MEDIAINFO_ARRIRAW_YES)
- else if (Parser==__T("Arri Raw")) Info=new File_ArriRaw();
- #endif
- #if defined(MEDIAINFO_BMP_YES)
- else if (Parser==__T("Bmp")) Info=new File_Bmp();
- #endif
- #if defined(MEDIAINFO_BPG_YES)
- else if (Parser==__T("Bpg")) Info=new File_Bpg();
- #endif
- #if defined(MEDIAINFO_DDS_YES)
- else if (Parser==__T("Dds")) Info=new File_Dds();
- #endif
- #if defined(MEDIAINFO_DPX_YES)
- else if (Parser==__T("Dpx")) Info=new File_Dpx();
- #endif
- #if defined(MEDIAINFO_EXR_YES)
- else if (Parser==__T("Exr")) Info=new File_Exr();
- #endif
- #if defined(MEDIAINFO_GIF_YES)
- else if (Parser==__T("Gif")) Info=new File_Gif();
- #endif
- #if defined(MEDIAINFO_ICO_YES)
- else if (Parser==__T("Ico")) Info=new File_Ico();
- #endif
- #if defined(MEDIAINFO_JPEG_YES)
- else if (Parser==__T("Jpeg")) Info=new File_Jpeg();
- #endif
- #if defined(MEDIAINFO_PCX_YES)
- else if (Parser==__T("PCX")) Info=new File_Pcx();
- #endif
- #if defined(MEDIAINFO_PNG_YES)
- else if (Parser==__T("Png")) Info=new File_Png();
- #endif
- #if defined(MEDIAINFO_PSD_YES)
- else if (Parser==__T("Psd")) Info=new File_Psd();
- #endif
- #if defined(MEDIAINFO_TIFF_YES)
- else if (Parser==__T("Tiff")) Info=new File_Tiff();
- #endif
- #if defined(MEDIAINFO_TGA_YES)
- else if (Parser==__T("Tga")) Info=new File_Tga();
- #endif
-
- // Archive
- #if defined(MEDIAINFO_7Z_YES)
- else if (Parser==__T("7z")) Info=new File_7z();
- #endif
- #if defined(MEDIAINFO_ACE_YES)
- else if (Parser==__T("Ace")) Info=new File_Ace();
- #endif
- #if defined(MEDIAINFO_BZIP2_YES)
- else if (Parser==__T("Bzip2")) Info=new File_Bzip2();
- #endif
- #if defined(MEDIAINFO_ELF_YES)
- else if (Parser==__T("Elf")) Info=new File_Elf();
- #endif
- #if defined(MEDIAINFO_GZIP_YES)
- else if (Parser==__T("Gzip")) Info=new File_Gzip();
- #endif
- #if defined(MEDIAINFO_ISO9660_YES)
- else if (Parser==__T("Iso9660")) Info=new File_Iso9660();
- #endif
- #if defined(MEDIAINFO_MZ_YES)
- else if (Parser==__T("Mz")) Info=new File_Mz();
- #endif
- #if defined(MEDIAINFO_RAR_YES)
- else if (Parser==__T("Rar")) Info=new File_Rar();
- #endif
- #if defined(MEDIAINFO_TAR_YES)
- else if (Parser==__T("Tar")) Info=new File_Tar();
- #endif
- #if defined(MEDIAINFO_ZIP_YES)
- else if (Parser==__T("Zip")) Info=new File_Zip();
- #endif
-
- // Other
- #if defined(MEDIAINFO_OTHER_YES)
- else if (Parser==__T("Other")) Info=new File_Other();
- #endif
-
- //No parser
- else
- return false;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-#if !defined(MEDIAINFO_READER_NO)
-int MediaInfo_Internal::ListFormats(const String &File_Name)
-{
- // Multiple
- #if defined(MEDIAINFO_AAF_YES)
- delete Info; Info=new File_Aaf(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_BDAV_YES)
- delete Info; Info=new File_MpegTs(); ((File_MpegTs*)Info)->BDAV_Size=4; if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_BDMV_YES)
- delete Info; Info=new File_Bdmv(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_CDXA_YES)
- delete Info; Info=new File_Cdxa(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_DASHMPD_YES)
- delete Info; Info=new File_DashMpd(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_DCP_YES)
- delete Info; Info=new File_DcpAm(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_DCP_YES)
- delete Info; Info=new File_DcpCpl(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_DCP_YES)
- delete Info; Info=new File_DcpPkl(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_DVDIF_YES)
- delete Info; Info=new File_DvDif(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_DVDV_YES)
- delete Info; Info=new File_Dvdv(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_DXW_YES)
- delete Info; Info=new File_Dxw(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_FLV_YES)
- delete Info; Info=new File_Flv(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_GXF_YES)
- delete Info; Info=new File_Gxf(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_HDSF4M_YES)
- delete Info; Info=new File_HdsF4m(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_HLS_YES)
- delete Info; Info=new File_Hls(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_IBI_YES)
- delete Info; Info=new File_Ibi(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_ISM_YES)
- delete Info; Info=new File_Ism(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_IVF_YES)
- delete Info; Info=new File_Ivf(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_LXF_YES)
- delete Info; Info=new File_Lxf(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_MK_YES)
- delete Info; Info=new File_Mk(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_MPEG4_YES)
- delete Info; Info=new File_Mpeg4(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_MPEGPS_YES)
- delete Info; Info=new File_MpegPs(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_MPEGTS_YES)
- delete Info; Info=new File_MpegTs(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_MPLI_YES)
- delete Info; Info=new File_Mpli(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_MXF_YES)
- delete Info; Info=new File_Mxf(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_NUT_YES)
- delete Info; Info=new File_Nut(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_OGG_YES)
- delete Info; Info=new File_Ogg(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_P2_YES)
- delete Info; Info=new File_P2_Clip(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_PMP_YES)
- delete Info; Info=new File_Pmp(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_PTX_YES)
- delete Info; Info=new File_Ptx(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_RIFF_YES)
- delete Info; Info=new File_Riff(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_RM_YES)
- delete Info; Info=new File_Rm(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_SEQUENCEINFO_YES)
- delete Info; Info=new File_SequenceInfo(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_SKM_YES)
- delete Info; Info=new File_Skm(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_SWF_YES)
- delete Info; Info=new File_Swf(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_TSP_YES)
- delete Info; Info=new File_MpegTs(); ((File_MpegTs*)Info)->TSP_Size=16; if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_WM_YES)
- delete Info; Info=new File_Wm(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_XDCAM_YES)
- delete Info; Info=new File_Xdcam_Clip(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_DPG_YES)
- delete Info; Info=new File_Dpg(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
-
- // Video
- #if defined(MEDIAINFO_AVC_YES)
- delete Info; Info=new File_Avc(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_HEVC_YES)
- delete Info; Info=new File_Hevc(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_AVSV_YES)
- delete Info; Info=new File_AvsV(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_DIRAC_YES)
- delete Info; Info=new File_Dirac(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_FLIC_YES)
- delete Info; Info=new File_Flic(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_H263_YES)
- //delete Info; Info=new File_H263(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1; //At the end, too much sensible
- #endif
- #if defined(MEDIAINFO_MPEG4V_YES)
- delete Info; Info=new File_Mpeg4v(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_MPEGV_YES)
- delete Info; Info=new File_Mpegv(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_VC1_YES)
- delete Info; Info=new File_Vc1(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_VC3_YES)
- delete Info; Info=new File_Vc3(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_Y4M_YES)
- delete Info; Info=new File_Y4m(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
-
- // Audio
- #if defined(MEDIAINFO_AAC_YES)
- delete Info; Info=new File_Aac(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_AC3_YES)
- delete Info; Info=new File_Ac3(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_SMPTEST0337_YES)
- delete Info; Info=new File_SmpteSt0337(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_ALS_YES)
- delete Info; Info=new File_Als(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_AMR_YES)
- delete Info; Info=new File_Amr(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_AMV_YES)
- delete Info; Info=new File_Amv(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_APE_YES)
- delete Info; Info=new File_Ape(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_AU_YES)
- delete Info; Info=new File_Au(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_CAF_YES)
- delete Info; Info=new File_Caf(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_DTS_YES)
- delete Info; Info=new File_Dts(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
-// Too many false-positives
-// #if defined(MEDIAINFO_DOLBYE_YES)
-// delete Info; Info=new File_DolbyE(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
-// #endif
- #if defined(MEDIAINFO_FLAC_YES)
- delete Info; Info=new File_Flac(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_IT_YES)
- delete Info; Info=new File_ImpulseTracker(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_LA_YES)
- delete Info; Info=new File_La(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_MIDI_YES)
- delete Info; Info=new File_Midi(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_MOD_YES)
- delete Info; Info=new File_Module(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_MPC_YES)
- delete Info; Info=new File_Mpc(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_MPCSV8_YES)
- delete Info; Info=new File_MpcSv8(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_MPEGA_YES)
- delete Info; Info=new File_Mpega(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_OPENMG_YES)
- delete Info; Info=new File_OpenMG(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_RKAU_YES)
- delete Info; Info=new File_Rkau(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_TAK_YES)
- delete Info; Info=new File_Tak(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_S3M_YES)
- delete Info; Info=new File_ScreamTracker3(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_TTA_YES)
- delete Info; Info=new File_Tta(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_TWINVQ_YES)
- delete Info; Info=new File_TwinVQ(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_WVPK_YES)
- delete Info; Info=new File_Wvpk(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_XM_YES)
- delete Info; Info=new File_ExtendedModule(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
-
- // Text
- #if defined(MEDIAINFO_N19_YES)
- delete Info; Info=new File_N19(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_PDF_YES)
- delete Info; Info=new File_Pdf(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_SCC_YES)
- delete Info; Info=new File_Scc(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_SDP_YES)
- delete Info; Info=new File_Sdp(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_SUBRIP_YES)
- delete Info; Info=new File_SubRip(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_TELETEXT_YES)
- delete Info; Info=new File_Teletext(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_TTML_YES)
- delete Info; Info=new File_Ttml(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_OTHERTEXT_YES)
- delete Info; Info=new File_OtherText(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
-
- // Image
- #if defined(MEDIAINFO_ARRIRAW_YES)
- delete Info; Info=new File_ArriRaw(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_BMP_YES)
- delete Info; Info=new File_Bmp(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_BPG_YES)
- delete Info; Info=new File_Bpg(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_DDS_YES)
- delete Info; Info=new File_Dds(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_DPX_YES)
- delete Info; Info=new File_Dpx(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_GIF_YES)
- delete Info; Info=new File_Gif(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_ICO_YES)
- delete Info; Info=new File_Ico(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_JPEG_YES)
- delete Info; Info=new File_Jpeg(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_PCX_YES)
- delete Info; Info=new File_Pcx(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_PNG_YES)
- delete Info; Info=new File_Png(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_PSD_YES)
- delete Info; Info=new File_Psd(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_TIFF_YES)
- delete Info; Info=new File_Tiff(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_TGA_YES)
- //delete Info; Info=new File_Tga(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1; //At the end, too much sensible
- #endif
-
- // Archive
- #if defined(MEDIAINFO_ACE_YES)
- delete Info; Info=new File_Ace(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_7Z_YES)
- delete Info; Info=new File_7z(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_BZIP2_YES)
- delete Info; Info=new File_Bzip2(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_ELF_YES)
- delete Info; Info=new File_Elf(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_GZIP_YES)
- delete Info; Info=new File_Gzip(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_ISO9660_YES)
- delete Info; Info=new File_Iso9660(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_MZ_YES)
- delete Info; Info=new File_Mz(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_RAR_YES)
- delete Info; Info=new File_Rar(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_TAR_YES)
- delete Info; Info=new File_Tar(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
- #if defined(MEDIAINFO_ZIP_YES)
- delete Info; Info=new File_Zip(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
-
- // Other
- #if !defined(MEDIAINFO_OTHER_NO)
- delete Info; Info=new File_Other(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
-
- //At the end, too much sensible
- #if defined(MEDIAINFO_TGA_YES)
- delete Info; Info=new File_Tga(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1; //At the end, too much sensible
- #endif
- #if defined(MEDIAINFO_H263_YES)
- delete Info; Info=new File_H263(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- #endif
-
- // Default (empty)
- delete Info; Info=new File_Unknown(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
- return 0;
-}
-#endif //!defined(MEDIAINFO_READER_NO)
-
-//---------------------------------------------------------------------------
-bool MediaInfo_Internal::LibraryIsModified ()
-{
- #if defined(MEDIAINFO_MULTI_NO) || defined(MEDIAINFO_VIDEO_NO) || defined(MEDIAINFO_AUDIO_NO) || defined(MEDIAINFO_TEXT_NO) || defined(MEDIAINFO_IMAGE_NO) || defined(MEDIAINFO_ARCHIVE_NO) \
- || defined(MEDIAINFO_BDAV_NO) || defined(MEDIAINFO_MK_NO) || defined(MEDIAINFO_OGG_NO) || defined(MEDIAINFO_RIFF_NO) || defined(MEDIAINFO_MPEG4_NO) || defined(MEDIAINFO_MPEGPS_NO) || defined(MEDIAINFO_MPEGTS_NO) || defined(MEDIAINFO_DXW_NO) || defined(MEDIAINFO_FLV_NO) || defined(MEDIAINFO_GXF_NO) || defined(MEDIAINFO_HDSF4M_NO) || defined(MEDIAINFO_HLS_NO) || defined(MEDIAINFO_ISM_NO) || defined(MEDIAINFO_IVF_NO) || defined(MEDIAINFO_LXF_NO) || defined(MEDIAINFO_SWF_NO) || defined(MEDIAINFO_MXF_NO) || defined(MEDIAINFO_NUT_NO) || defined(MEDIAINFO_WM_NO) || defined(MEDIAINFO_QT_NO) || defined(MEDIAINFO_RM_NO) || defined(MEDIAINFO_DVDIF_NO) || defined(MEDIAINFO_DVDV_NO) || defined(MEDIAINFO_AAF_NO) || defined(MEDIAINFO_CDXA_NO) || defined(MEDIAINFO_DPG_NO) || defined(MEDIAINFO_TSP_NO) \
- || defined(MEDIAINFO_AVC_NO) || defined(MEDIAINFO_AVSV_NO) || defined(MEDIAINFO_HEVC_NO) || defined(MEDIAINFO_MPEG4V_NO) || defined(MEDIAINFO_MPEGV_NO) || defined(MEDIAINFO_FLIC_NO) || defined(MEDIAINFO_THEORA_NO) || defined(MEDIAINFO_Y4M_NO) \
- || defined(MEDIAINFO_AC3_NO) || defined(MEDIAINFO_ADIF_NO) || defined(MEDIAINFO_ADTS_NO) || defined(MEDIAINFO_SMPTEST0337_NO) || defined(MEDIAINFO_AMR_NO) || defined(MEDIAINFO_DTS_NO) || defined(MEDIAINFO_DOLBYE_NO) || defined(MEDIAINFO_FLAC_NO) || defined(MEDIAINFO_APE_NO) || defined(MEDIAINFO_MPC_NO) || defined(MEDIAINFO_MPCSV8_NO) || defined(MEDIAINFO_MPEGA_NO) || defined(MEDIAINFO_OPENMG_NO) || defined(MEDIAINFO_TWINVQ_NO) || defined(MEDIAINFO_XM_NO) || defined(MEDIAINFO_MOD_NO) || defined(MEDIAINFO_S3M_NO) || defined(MEDIAINFO_IT_NO) || defined(MEDIAINFO_SPEEX_NO) || defined(MEDIAINFO_TAK_NO) || defined(MEDIAINFO_PS2A_NO) \
- || defined(MEDIAINFO_CMML_NO) || defined(MEDIAINFO_KATE_NO) || defined(MEDIAINFO_PGS_NO) || defined(MEDIAINFO_OTHERTEXT_NO) \
- || defined(MEDIAINFO_ARRIRAW_NO) || defined(MEDIAINFO_BMP_NO) || defined(MEDIAINFO_DDS_NO) || defined(MEDIAINFO_DPX_NO) || defined(MEDIAINFO_EXR_NO) || defined(MEDIAINFO_GIF_NO) || defined(MEDIAINFO_ICO_NO) || defined(MEDIAINFO_JPEG_NO) || defined(MEDIAINFO_PNG_NO) || defined(MEDIAINFO_TGA_NO) || defined(MEDIAINFO_TIFF_NO) \
- || defined(MEDIAINFO_7Z_NO) || defined(MEDIAINFO_ZIP_NO) || defined(MEDIAINFO_RAR_NO) || defined(MEDIAINFO_ACE_NO) || defined(MEDIAINFO_ELF_NO) || defined(MEDIAINFO_MZ_NO) \
- || defined(MEDIAINFO_OTHER_NO) || defined(MEDIAINFO_DUMMY_NO)
- return true;
- #else
- return false;
- #endif
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Internal::CreateDummy (const String&)
-{
- #if defined(MEDIAINFO_DUMMY_YES)
- Info=new File_Dummy();
- ((File_Dummy*)Info)->KindOfDummy=Value;
- #endif
-}
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Inform.cpp b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Inform.cpp
deleted file mode 100644
index 5ee7305a2..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Inform.cpp
+++ /dev/null
@@ -1,698 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Inform part
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Utils.h"
-#if defined(MEDIAINFO_EBUCORE_YES)
- #include "MediaInfo/Export/Export_EbuCore.h"
-#endif //defined(MEDIAINFO_EBUCORE_YES)
-#if defined(MEDIAINFO_MPEG7_YES)
- #include "MediaInfo/Export/Export_Mpeg7.h"
-#endif //defined(MEDIAINFO_MPEG7_YES)
-#if defined(MEDIAINFO_REVTMD_YES)
- #include "MediaInfo/Export/Export_reVTMD.h"
-#endif //defined(MEDIAINFO_REVTMD_YES)
-#if defined(MEDIAINFO_PBCORE_YES)
- #include "MediaInfo/Export/Export_PBCore.h"
- #include "MediaInfo/Export/Export_PBCore2.h"
-#endif //defined(MEDIAINFO_PBCORE_YES)
-#include "MediaInfo/MediaInfo_Internal.h"
-#include "MediaInfo/File__Analyze.h"
-#include "base64.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern MediaInfo_Config Config;
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-Ztring MediaInfo_Internal::Inform()
-{
- CS.Enter();
- if (Info && Info->Status[File__Analyze::IsUpdated])
- Info->Open_Buffer_Update();
- CS.Leave();
-
- #if MEDIAINFO_TRACE
- if (MediaInfoLib::Config.Trace_Level_Get() || MediaInfoLib::Config.Inform_Get()==__T("Details"))
- {
- if (!Details.empty())
- {
- Ztring Content=Details;
-
- return Details;
- }
- else if (Info)
- return Info->Details_Get();
- }
- #endif //MEDIAINFO_TRACE
-
- #if defined(MEDIAINFO_EBUCORE_YES)
- if (MediaInfoLib::Config.Inform_Get()==__T("EBUCore_1.6"))
- return Export_EbuCore().Transform(*this, Export_EbuCore::Version_1_6);
- if (MediaInfoLib::Config.Inform_Get()==__T("EBUCore") || MediaInfoLib::Config.Inform_Get()==__T("EBUCore_1.5"))
- return Export_EbuCore().Transform(*this);
- #endif //defined(MEDIAINFO_EBUCORE_YES)
- #if defined(MEDIAINFO_MPEG7_YES)
- if (MediaInfoLib::Config.Inform_Get()==__T("MPEG-7"))
- return Export_Mpeg7().Transform(*this);
- #endif //defined(MEDIAINFO_MPEG7_YES)
- #if defined(MEDIAINFO_PBCORE_YES)
- if (MediaInfoLib::Config.Inform_Get()==__T("PBCore") || MediaInfoLib::Config.Inform_Get()==__T("PBCore_1.2"))
- return Export_PBCore().Transform(*this);
- if (MediaInfoLib::Config.Inform_Get()==__T("PBCore2") || MediaInfoLib::Config.Inform_Get()==__T("PBCore_2.0"))
- return Export_PBCore2().Transform(*this);
- #endif //defined(MEDIAINFO_PBCORE_YES)
- #if defined(MEDIAINFO_REVTMD_YES)
- if (MediaInfoLib::Config.Inform_Get()==__T("reVTMD"))
- return __T("reVTMD is disabled due to its non-free licensing."); //return Export_reVTMD().Transform(*this);
- #endif //defined(MEDIAINFO_REVTMD_YES)
-
- #if defined(MEDIAINFO_CUSTOM_YES)
-
- if (!(
- MediaInfoLib::Config.Inform_Get(__T("General")).empty()
- && MediaInfoLib::Config.Inform_Get(__T("Video")).empty()
- && MediaInfoLib::Config.Inform_Get(__T("Audio")).empty()
- && MediaInfoLib::Config.Inform_Get(__T("Text")).empty()
- && MediaInfoLib::Config.Inform_Get(__T("Chapters")).empty()
- && MediaInfoLib::Config.Inform_Get(__T("Image")).empty()
- && MediaInfoLib::Config.Inform_Get(__T("Menu")).empty()
- ))
- {
- Ztring Retour;
- Retour+=MediaInfoLib::Config.Inform_Get(__T("File_Begin"));
- Retour+=MediaInfoLib::Config.Inform_Get(__T("General_Begin"));
- Retour+=Inform(Stream_General, 0, false);
- Retour+=MediaInfoLib::Config.Inform_Get(__T("General_End"));
- if (Count_Get(Stream_Video))
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Video_Begin"));
- for (size_t I1=0; I1<Count_Get(Stream_Video); I1++)
- {
- Retour+=Inform(Stream_Video, I1, false);
- if (I1!=Count_Get(Stream_Video)-1)
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Video_Middle"));
- }
- if (Count_Get(Stream_Video))
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Video_End"));
- if (Count_Get(Stream_Audio))
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Audio_Begin"));
- for (size_t I1=0; I1<Count_Get(Stream_Audio); I1++)
- {
- Retour+=Inform(Stream_Audio, I1, false);
- if (I1!=Count_Get(Stream_Audio)-1)
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Audio_Middle"));
- }
- if (Count_Get(Stream_Audio))
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Audio_End"));
- if (Count_Get(Stream_Text))
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Text_Begin"));
- for (size_t I1=0; I1<Count_Get(Stream_Text); I1++)
- {
- Retour+=Inform(Stream_Text, I1, false);
- if (I1!=Count_Get(Stream_Text)-1)
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Text_Middle"));
- }
- if (Count_Get(Stream_Text))
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Text_End"));
- if (Count_Get(Stream_Other))
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Chapters_Begin"));
- for (size_t I1=0; I1<Count_Get(Stream_Other); I1++)
- {
- Retour+=Inform(Stream_Other, I1, false);
- if (I1!=Count_Get(Stream_Other)-1)
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Chapters_Middle"));
- }
- if (Count_Get(Stream_Other))
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Chapters_End"));
- if (Count_Get(Stream_Image))
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Image_Begin"));
- for (size_t I1=0; I1<Count_Get(Stream_Image); I1++)
- {
- Retour+=Inform(Stream_Image, I1, false);
- if (I1!=Count_Get(Stream_Image)-1)
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Image_Middle"));
- }
- if (Count_Get(Stream_Image))
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Image_End"));
- if (Count_Get(Stream_Menu))
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Menu_Begin"));
- for (size_t I1=0; I1<Count_Get(Stream_Menu); I1++)
- {
- Retour+=Inform(Stream_Menu, I1, false);
- if (I1!=Count_Get(Stream_Menu)-1)
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Menu_Middle"));
- }
- if (Count_Get(Stream_Menu))
- Retour+=MediaInfoLib::Config.Inform_Get(__T("Menu_End"));
- Retour+=MediaInfoLib::Config.Inform_Get(__T("File_End"));
-
- Retour.FindAndReplace(__T("\\r\\n"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\r"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\n"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\r\n"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\r"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\n"), MediaInfoLib::Config.LineSeparator_Get(), 0, Ztring_Recursive);
-
- //Special characters
- Retour.FindAndReplace(__T("|SC1|"), __T("\\"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC2|"), __T("["), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC3|"), __T("]"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC4|"), __T(","), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC5|"), __T(";"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC6|"), __T("("), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC7|"), __T(")"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC8|"), __T(")"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC9|"), __T("),"), 0, Ztring_Recursive);
-
- return Retour;
- }
- #endif //defined(MEDIAINFO_CUSTOM_YES)
-
- #if defined(MEDIAINFO_TEXT_YES) || defined(MEDIAINFO_HTML_YES) || defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_CSV_YES)
-
- //Informations
- Ztring Retour;
- bool HTML=false;
- bool XML=false;
- bool CSV=false;
- if (MediaInfoLib::Config.Inform_Get()==__T("HTML"))
- HTML=true;
- if (MediaInfoLib::Config.Inform_Get()==__T("XML"))
- XML=true;
- if (MediaInfoLib::Config.Inform_Get()==__T("CSV"))
- CSV=true;
-
- if (HTML) Retour+=__T("<html>\n\n<head>\n<META http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /></head>\n<body>\n");
- if (XML) Retour+=__T("<File>\n");
-
- for (size_t StreamKind=(size_t)Stream_General; StreamKind<Stream_Max; StreamKind++)
- {
- //Pour chaque type de flux
- for (size_t StreamPos=0; StreamPos<(size_t)Count_Get((stream_t)StreamKind); StreamPos++)
- {
- //Pour chaque stream
- if (HTML) Retour+=__T("<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"2\" style=\"border:1px solid Navy\">\n<tr>\n <td width=\"150\"><h2>");
- if (XML) Retour+=__T("<track type=\"");
- Ztring A=Get((stream_t)StreamKind, StreamPos, __T("StreamKind/String"));
- Ztring B=Get((stream_t)StreamKind, StreamPos, __T("StreamKindPos"));
- if (!XML && !B.empty())
- {
- if (CSV)
- A+=__T(",");
- else
- A+=MediaInfoLib::Config.Language_Get(__T(" Config_Text_NumberTag"));
- A+=B;
- }
- Retour+=A;
- if (XML)
- {
- Retour+=__T("\"");
- if (!B.empty())
- {
- Retour+=__T(" streamid=\"");
- Retour+=B;
- Retour+=__T("\"");
- }
- }
- if (HTML) Retour+=__T("</h2></td>\n </tr>");
- if (XML) Retour+=__T(">");
- Retour+=MediaInfoLib::Config.LineSeparator_Get();
- Retour+=Inform((stream_t)StreamKind, StreamPos, false);
- Retour.FindAndReplace(__T("\\"), __T("|SC1|"), 0, Ztring_Recursive);
- if (HTML) Retour+=__T("</table>\n<br />");
- if (XML) Retour+=__T("</track>\n");
- Retour+=MediaInfoLib::Config.LineSeparator_Get();
- }
- }
-
- if (HTML) Retour+=__T("\n</body>\n</html>\n");
- if (XML) Retour+=__T("</File>\n");
-
- Retour.FindAndReplace(__T("\\r\\n"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\r"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\n"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\r\n"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\r"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\n"), MediaInfoLib::Config.LineSeparator_Get(), 0, Ztring_Recursive);
-
- //Special characters
- Retour.FindAndReplace(__T("|SC1|"), __T("\\"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC2|"), __T("["), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC3|"), __T("]"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC4|"), __T(","), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC5|"), __T(";"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC6|"), __T("("), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC7|"), __T(")"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC8|"), __T(")"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC9|"), __T("),"), 0, Ztring_Recursive);
-
- return Retour;
-
- #else //defined(MEDIAINFO_TEXT_YES) || defined(MEDIAINFO_HTML_YES) || defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_CSV_YES)
-
- return Ztring(); //Disabled
-
- #endif //defined(MEDIAINFO_TEXT_YES) || defined(MEDIAINFO_HTML_YES) || defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_CSV_YES)
-}
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_TEXT_YES) || defined(MEDIAINFO_HTML_YES) || defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_CSV_YES) || defined(MEDIAINFO_CUSTOM_YES)
-Ztring MediaInfo_Internal::Inform (stream_t StreamKind, size_t StreamPos, bool IsDirect)
-{
- //Integrity
- if (StreamKind>=Stream_Max || StreamPos>=Stream[StreamKind].size())
- return Ztring();
-
- if (MediaInfoLib::Config.Inform_Get(__T("General")).empty()
- && MediaInfoLib::Config.Inform_Get(__T("Video")).empty()
- && MediaInfoLib::Config.Inform_Get(__T("Audio")).empty()
- && MediaInfoLib::Config.Inform_Get(__T("Text")).empty()
- && MediaInfoLib::Config.Inform_Get(__T("Chapters")).empty()
- && MediaInfoLib::Config.Inform_Get(__T("Image")).empty()
- && MediaInfoLib::Config.Inform_Get(__T("Menu")).empty())
- {
- Ztring Retour;
- #if defined(MEDIAINFO_HTML_YES)
- bool HTML=MediaInfoLib::Config.Inform_Get()==__T("HTML")?true:false;
- #endif //defined(MEDIAINFO_HTML_YES)
- #if defined(MEDIAINFO_XML_YES)
- bool XML=MediaInfoLib::Config.Inform_Get()==__T("XML")?true:false;
- #endif //defined(MEDIAINFO_XML_YES)
- #if defined(MEDIAINFO_CSV_YES)
- bool CSV=MediaInfoLib::Config.Inform_Get()==__T("CSV")?true:false;
- #endif //defined(MEDIAINFO_CSV_YES)
- #if defined(MEDIAINFO_TEXT_YES) && (defined(MEDIAINFO_HTML_YES) || defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_CSV_YES))
- bool Text=true;
- #if defined(MEDIAINFO_HTML_YES)
- if (HTML)
- Text=false;
- #endif //defined(MEDIAINFO_HTML_YES)
- #if defined(MEDIAINFO_XML_YES)
- if (XML)
- Text=false;
- #endif //defined(MEDIAINFO_XML_YES)
- #if defined(MEDIAINFO_CSV_YES)
- if (CSV)
- Text=false;
- #endif //defined(MEDIAINFO_CSV_YES)
- #endif //defined(MEDIAINFO_TEXT_YES) && (defined(MEDIAINFO_HTML_YES) || defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_CSV_YES))
- size_t Size=Count_Get(StreamKind, StreamPos);
- for (size_t Champ_Pos=0; Champ_Pos<Size; Champ_Pos++)
- {
- //Pour chaque champ
- //Ztring A=Get((stream_t)4, 2, 0, Info_Measure_Text); // TODO Bug sinon? voir Ztring
- Ztring A=Get((stream_t)StreamKind, StreamPos, Champ_Pos, Info_Measure_Text); // TODO Bug sinon? voir Ztring
- if ((MediaInfoLib::Config.Complete_Get() || Get((stream_t)StreamKind, StreamPos, Champ_Pos, Info_Options)[InfoOption_ShowInInform]==__T('Y')) && !Get((stream_t)StreamKind, StreamPos, Champ_Pos, Info_Text).empty())
- {
- Ztring Nom=Get((stream_t)StreamKind, StreamPos, Champ_Pos, Info_Name_Text);
- if (Nom.empty())
- Nom=Get((stream_t)StreamKind, StreamPos, Champ_Pos, Info_Name); //Texte n'existe pas
- #if defined(MEDIAINFO_TEXT_YES) && (defined(MEDIAINFO_HTML_YES) || defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_CSV_YES))
- if (Text)
- #endif //defined(MEDIAINFO_TEXT_YES) && (defined(MEDIAINFO_HTML_YES) || defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_CSV_YES))
- {
- int8u Nom_Size=MediaInfoLib::Config.Language_Get(__T(" Config_Text_ColumnSize")).To_int8u();
- if (Nom_Size==0)
- Nom_Size=32; //Default
- Nom.resize(Nom_Size, ' ');
- }
- Ztring Valeur=Get((stream_t)StreamKind, StreamPos, Champ_Pos, Info_Text);
- Valeur.FindAndReplace(__T("\\"), __T("|SC1|"), 0, Ztring_Recursive);
- #if defined(MEDIAINFO_HTML_YES)
- if (HTML)
- {
- Retour+=__T(" <tr>\n <td><i>");
- Retour+=Nom;
- Retour+=__T(" :</i></td>\n <td colspan=\"3\">");
- Retour+=Valeur;
- Retour+=__T("</td>\n </tr>");
- }
- #endif //defined(MEDIAINFO_HTML_YES)
- #if defined(MEDIAINFO_XML_YES)
- if (XML)
- {
- Nom=Xml_Name_Escape(Nom);
- size_t Modified;
- Xml_Content_Escape_Modifying(Valeur, Modified);
-
- Retour+=__T("<");
- Retour+=Nom;
- if (Modified==1 && !MediaInfoLib::Config.SkipBinaryData_Get()) //Base64
- Retour+=__T(" dt=\"binary.base64\"");
- Retour+=__T(">");
- if (Modified==1 && MediaInfoLib::Config.SkipBinaryData_Get())
- Retour+=__T("(Binary data)");
- else
- Retour+=Valeur;
- Retour+=__T("</");
- Retour+=Nom;
- Retour+=__T(">");
- }
- #endif //defined(MEDIAINFO_XML_YES)
- #if defined(MEDIAINFO_CSV_YES)
- if (CSV)
- {
- Retour+=Nom;
- Retour+=__T(",");
- Retour+=Valeur;
- }
- #endif //defined(MEDIAINFO_CSV_YES)
- #if defined(MEDIAINFO_TEXT_YES) && (defined(MEDIAINFO_HTML_YES) || defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_CSV_YES))
- if (Text)
- #endif //defined(MEDIAINFO_TEXT_YES) && (defined(MEDIAINFO_HTML_YES) || defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_CSV_YES))
- Retour+=Nom + MediaInfoLib::Config.Language_Get(__T(" Config_Text_Separator")) + Valeur;
- Retour+=MediaInfoLib::Config.LineSeparator_Get();
- }
- }
-
- Retour.FindAndReplace(__T("\\r\\n"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\r"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\n"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\r\n"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\r"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\n"), MediaInfoLib::Config.LineSeparator_Get(), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC1|"), __T("\\"), 0, Ztring_Recursive);
- return Retour;
- }
-
- Ztring Retour=MediaInfoLib::Config.Inform_Get(Get(StreamKind, 0, __T("StreamKind"), Info_Text));
- ZtringList Info;
-
- Info=Stream[StreamKind][StreamPos];
-
- //Special characters
- Retour.FindAndReplace(__T("\\\\"), __T("|SC1|"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\["), __T("|SC2|"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\]"), __T("|SC3|"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\,"), __T("|SC4|"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\;"), __T("|SC5|"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\("), __T("|SC6|"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\)"), __T("|SC7|"), 0, Ztring_Recursive);
-
- //Gestion $xx$
- size_t PosX=0;
- while (Retour.find(__T("$"), PosX)!=(size_t)-1)
- {
- PosX=Retour.find(__T("$"), PosX);
- if (Retour.size()>PosX+2 && !(Retour(PosX+1)==__T('i') && Retour(PosX+2)==__T('f') && Retour(PosX+3)==__T('('))) //To keep out "%" without any signification, or "$if(..."
- {
- Ztring ARemplacer=Ztring(__T("$")+Retour.SubString(__T("$"), __T("$"), PosX))+__T("$");
- Ztring RemplacerPar=MediaInfoLib::Config.Language_Get(Retour.SubString(__T("$"), __T("$"), PosX)); //TODO : case sensitive
- Retour.FindAndReplace(ARemplacer, RemplacerPar);
- }
- else if (PosX == (size_t)-1)
- break;
- else
- PosX++;
- }
-
- //Gestion $if()
- size_t Position=Retour.find(__T("$if("));
- while (Position!=Error && Position>0)
- {
- ZtringList Elements;
- size_t Elements_Index;
- Elements.Separator_Set(0, __T(","));
- Elements.Write(Retour.SubString(__T("$if("), __T(")"), Position));
- Elements(0)=Elements(0).SubString(__T("%"), __T("%"));
-
- //Test if there is something to replace
- size_t Pos=MediaInfoLib::Config.Info_Get(StreamKind).Find(Elements(0));
- if (Pos!=std::string::npos)
- {
- if (Info(Pos).size()>0)
- Elements_Index=1;
- else
- Elements_Index=2;
- }
- else
- Elements_Index=2;
-
- //Replace
- while (Elements(Elements_Index).SubString(__T("%"), __T("%")).size()>0)
- {
- Ztring ToReplace=Elements(Elements_Index).SubString(__T("%"), __T("%"));
- Ztring ReplacedBy=Info(MediaInfoLib::Config.Info_Get(StreamKind).Find(ToReplace));
- ToReplace=Ztring(__T("%"))+ToReplace+Ztring(__T("%"));
- Elements(Elements_Index).FindAndReplace(ToReplace, ReplacedBy);
- }
-
- Ztring ToReplace=Ztring(__T("$if("))+Retour.SubString(__T("$if("), __T(")"), Position)+__T(")");
- Retour.FindAndReplace(ToReplace, Elements(Elements_Index));
- Position=Retour.find(__T("$if("));
- }
-
- //Gestion []
- while (!Retour.SubString(__T("["), __T("]")).empty())
- {
- Ztring Crochets=Retour.SubString(__T("["), __T("]"));
- Ztring ValueToFind=Crochets.SubString(__T("%"), __T("%"));
- size_t ValueToFind_Pos=MediaInfoLib::Config.Info_Get(StreamKind).Find(ValueToFind);
- Ztring ARemplacer=Ztring(__T("[")+Crochets+__T("]"));
- if (ValueToFind_Pos!=Error)
- {
- Ztring RemplacerPar=Info(ValueToFind_Pos);
- if (RemplacerPar.empty())
- Retour.FindAndReplace(ARemplacer, Ztring());
- else
- {
- //Formate l'interieur
- Ztring ATraiter=Crochets;
- Ztring Crochets_ARemplacer=Ztring(__T("%")+ATraiter.SubString(__T("%"), __T("%")))+__T("%");
- Ztring Crochets_RemplacerPar=Info(MediaInfoLib::Config.Info_Get(StreamKind).Find(ATraiter.SubString(__T("%"), __T("%"))));
- ATraiter.FindAndReplace(Crochets_ARemplacer, Crochets_RemplacerPar);
- Retour.FindAndReplace(ARemplacer, ATraiter);
- }
- }
- else
- Retour.FindAndReplace(ARemplacer, Ztring());
- }
-
- //Gestion %xxx%
- PosX=0;
- while (Retour.find(__T("%"), PosX)!=(size_t)-1)
- {
- PosX=Retour.find(__T("%"), PosX);
- if (Retour.size() > PosX + 2 && Retour[PosX + 1] >= __T('A') && Retour[PosX + 1] <= __T('Z')) //To keep out "%" without any signification
- {
- Ztring ARemplacer = Ztring(__T("%") + Retour.SubString(__T("%"), __T("%"), PosX)) + __T("%");
- Ztring RemplacerPar = Get(StreamKind, StreamPos, Retour.SubString(__T("%"), __T("%"), PosX));
- RemplacerPar.FindAndReplace(__T("\\"), __T("|SC1|"), 0, Ztring_Recursive);
- RemplacerPar.FindAndReplace(__T("),"), __T("|SC9|"), 0, Ztring_Recursive);
- RemplacerPar.FindAndReplace(__T(")"), __T("|SC8|"), 0, Ztring_Recursive);
- Retour.FindAndReplace(ARemplacer, RemplacerPar);
- }
- else if (PosX == (size_t)-1)
- break;
- else
- PosX++;
- }
-
- //Retour=__T("<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"2\" style=\"border:1px solid Navy\">\n<tr>\n <td width=\"150\">Video #0</td>\n </tr>\r\n <tr>\n <td><i>Codec :</i></td>\n <td colspan=\"3\">WMV1</td>\n </tr>\r\n <tr>\n <td><i>Codec/Info :</i></td>\n <td colspan=\"3\">Windows Media Video 7</td>\n </tr>\r\n <tr>\n <td><i>Width :</i></td>\n <td colspan=\"3\">200 pixels</td>\n </tr>\r\n <tr>\n <td><i>Height :</i></td>\n <td colspan=\"3\">150 pixels</td>\n </tr>\r\n <tr>\n <td><i>Aspect ratio :</i></td>\n <td colspan=\"3\">4/3</td>\n </tr>\r\n <tr>\n <td><i>Resolution :</i></td>\n <td colspan=\"3\">24 bits</td>\n </tr>\r\n</table>\n");
- Retour.FindAndReplace(__T("\\r\\n"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\r"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\\n"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\r\n"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\r"), __T("\n"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("\n"), MediaInfoLib::Config.LineSeparator_Get(), 0, Ztring_Recursive);
-
- //Special characters
- if (IsDirect)
- {
- Retour.FindAndReplace(__T("|SC1|"), __T("\\"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC2|"), __T("["), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC3|"), __T("]"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC4|"), __T(","), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC5|"), __T(";"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC6|"), __T("("), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC7|"), __T(")"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC8|"), __T(")"), 0, Ztring_Recursive);
- Retour.FindAndReplace(__T("|SC9|"), __T("),"), 0, Ztring_Recursive);
- }
-
- return Retour;
-}
-#endif //defined(MEDIAINFO_TEXT_YES) || defined(MEDIAINFO_HTML_YES) || defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_CSV_YES) || defined(MEDIAINFO_CUSTOM_YES)
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_CUSTOM_YES)
-void MediaInfo_Internal::Traiter(Ztring &C)
-{
- //$if(%a%,zezeze%a%,rrere)
- size_t Position=C.find(__T("$if("));
- while (Position>0)
- {
- //Recuperation de la chaine entiere
- Ztring Total;
- Ztring ARemplacer;
- ZtringList Total1;
- Total1.Separator_Set(0, __T("),"));
- Total=C.SubString(__T("$if("), __T(")"), Position);
- ARemplacer=Ztring(__T("$if(")+Total+__T(")"));
- Total1.Write(Total);
- if (Total1(0).empty()) //mettre champ2
- C.FindAndReplace(ARemplacer, Total1(2), Position);
- else
- C.FindAndReplace(ARemplacer, Total1(1), Position);
- Position=C.find(__T("$if("), Position);
- }
-
- //reformatage
- C.FindAndReplace(__T("|SC8|"), __T(")"), 0, Ztring_Recursive);
- C.FindAndReplace(__T("|SC9|"), __T("),"), 0, Ztring_Recursive);
- //C.FindAndReplace(__T("\\r\\n"), __T("\n"), 0, Ztring_Recursive);
-}
-#endif //defined(MEDIAINFO_CUSTOM_YES)
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_XML_YES)
-Ztring MediaInfo_Internal::Xml_Name_Escape (const Ztring &Name)
-{
- Ztring ToReturn(Name);
-
- if (ToReturn.operator()(0)>='0' && ToReturn.operator()(0)<='9')
- ToReturn.insert(0, 1, __T('_'));
- ToReturn.FindAndReplace(__T(" "), __T("_"), 0, Ztring_Recursive);
- ToReturn.FindAndReplace(__T("/"), __T("_"), 0, Ztring_Recursive);
- ToReturn.FindAndReplace(__T("("), __T("_"), 0, Ztring_Recursive);
- ToReturn.FindAndReplace(__T(")"), __T("_"), 0, Ztring_Recursive);
- ToReturn.FindAndReplace(__T("*"), __T("_"), 0, Ztring_Recursive);
- ToReturn.FindAndReplace(__T(","), __T("_"), 0, Ztring_Recursive);
- ToReturn.FindAndReplace(__T(":"), __T("_"), 0, Ztring_Recursive);
- ToReturn.FindAndReplace(__T("@"), __T("_"), 0, Ztring_Recursive);
- size_t ToReturn_Pos=0;
- while (ToReturn_Pos<ToReturn.size())
- {
- if (!(ToReturn[ToReturn_Pos]>=__T('A') && ToReturn[ToReturn_Pos]<=__T('Z'))
- && !(ToReturn[ToReturn_Pos]>=__T('a') && ToReturn[ToReturn_Pos]<=__T('z'))
- && !(ToReturn[ToReturn_Pos]>=__T('0') && ToReturn[ToReturn_Pos]<=__T('9'))
- && !(ToReturn[ToReturn_Pos]==__T('_')))
- ToReturn.erase(ToReturn_Pos, 1);
- else
- ToReturn_Pos++;
- }
- if (ToReturn.empty())
- ToReturn="Unknown";
-
- return ToReturn;
-}
-#endif //defined(MEDIAINFO_XML_YES)
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_XML_YES)
-Ztring MediaInfo_Internal::Xml_Content_Escape (const Ztring &Content, size_t &Modified)
-{
- Ztring ToReturn(Content);
- return Xml_Content_Escape_Modifying(ToReturn, Modified);
-}
-#endif //defined(MEDIAINFO_XML_YES)
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_XML_YES)
-size_t Xml_Content_Escape_MustEscape(const Ztring &Content)
-{
- size_t Pos=0;
- size_t Size=Content.size();
- for (; Pos<Size; Pos++)
- {
- switch (Content[Pos])
- {
- case __T('\"'):
- case __T('&') :
- case __T('\''):
- case __T('<') :
- case __T('>') :
- return Pos;
- default :
- if (Content[Pos]<0x20)
- return Pos;
- }
- }
-
- return Pos;
-}
-Ztring &MediaInfo_Internal::Xml_Content_Escape_Modifying (Ztring &Content, size_t &Modified)
-{
- size_t Pos=Xml_Content_Escape_MustEscape(Content);
- Ztring Content_Save=Content;
- Modified=0;
- if (Pos>=Content.size())
- return Content;
-
- for (; Pos<Content.size(); Pos++)
- {
- switch (Content[Pos])
- {
- case __T('\"'):
- Content[Pos]=__T('&');
- Content.insert(Pos+1, __T("quot;"));
- Pos+=5;
- break;
- case __T('&'):
- Content[Pos]=__T('&');
- Content.insert(Pos+1, __T("amp;"));
- Pos+=4;
- break;
- case __T('\''):
- Content[Pos]=__T('&');
- Content.insert(Pos+1, __T("apos;"));
- Pos+=5;
- break;
- case __T('<'):
- Content[Pos]=__T('&');
- Content.insert(Pos+1, __T("lt;"));
- Pos+=3;
- break;
- case __T('>'):
- Content[Pos]=__T('&');
- Content.insert(Pos+1, __T("gt;"));
- Pos+=3;
- break;
- default:
- if (Content[Pos]<0x20)
- {
- /* Is still invalid XML
- Ztring Character=__T("#x")+Ztring::ToZtring(Content[Pos]/16, 16)+Ztring::ToZtring(Content[Pos]%16, 16)+__T(";");
- Content[Pos]=__T('&');
- Content.insert(Pos+1, Character);
- Pos+=5;
- */
- string Content_Utf8=Content_Save.To_UTF8(); //TODO: shouldn't we never convert to Unicode?
- string Content_Base64=Base64::encode(Content_Utf8);
- Content.From_UTF8(Content_Base64);
- Modified=1; //Base64
- Pos=Content.size(); //End
- }
- }
- }
-
- return Content;
-}
-#endif //defined(MEDIAINFO_XML_YES)
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Internal.cpp b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Internal.cpp
deleted file mode 100644
index 4c6f28398..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Internal.cpp
+++ /dev/null
@@ -1,1393 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Internal.h"
-#include "MediaInfo/MediaInfo_Config.h"
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/File__MultipleParsing.h"
-#include "ZenLib/Dir.h"
-#include "ZenLib/File.h"
-#include "ZenLib/FileName.h"
-#if defined(MEDIAINFO_DIRECTORY_YES)
- #include "MediaInfo/Reader/Reader_Directory.h"
-#endif
-#if defined(MEDIAINFO_FILE_YES)
- #include "MediaInfo/Reader/Reader_File.h"
-#endif
-#if defined(MEDIAINFO_LIBCURL_YES)
- #include "MediaInfo/Reader/Reader_libcurl.h"
-#endif
-#if defined(MEDIAINFO_LIBMMS_YES)
- #include "MediaInfo/Reader/Reader_libmms.h"
-#endif
-#if defined(MEDIAINFO_IBI_YES)
- #include "MediaInfo/Multiple/File_Ibi.h"
-#endif
-#include "MediaInfo/Multiple/File_Dxw.h"
-#include <cmath>
-#ifdef MEDIAINFO_DEBUG_WARNING_GET
- #include <iostream>
-#endif //MEDIAINFO_DEBUG_WARNING_GET
-#ifdef MEDIAINFO_DEBUG_BUFFER
- #include "ZenLib/FileName.h"
- #include <cstring>
-#endif //MEDIAINFO_DEBUG_BUFFER
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-//To clarify the code
-namespace MediaInfo_Debug_MediaInfo_Internal
-{
-
-#if defined (MEDIAINFO_DEBUG_CONFIG) || defined (MEDIAINFO_DEBUG_BUFFER) || defined (MEDIAINFO_DEBUG_OUTPUT)
- #ifdef WINDOWS
- const Char* MediaInfo_Debug_Name=__T("MediaInfo_Debug");
- #else
- const Char* MediaInfo_Debug_Name=__T("/tmp/MediaInfo_Debug");
- #endif
-#endif
-
-#ifdef MEDIAINFO_DEBUG_CONFIG
- #define MEDIAINFO_DEBUG_CONFIG_TEXT(_TOAPPEND) \
- { \
- Ztring Debug; \
- _TOAPPEND; \
- Debug+=__T("\r\n"); \
- if (!Debug_Config.Opened_Get()) \
- { \
- if (Config.File_Names.empty()) \
- Debug_Config.Create(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".Config.txt")); \
- else \
- { \
- Ztring File_Temp; \
- if (Config.File_Names[0].rfind(__T('\\'))!=string::npos) \
- File_Temp=Config.File_Names[0].substr(Config.File_Names[0].rfind(__T('\\'))+1, string::npos); \
- else if (Config.File_Names[0].rfind(__T('/'))!=string::npos) \
- File_Temp=Config.File_Names[0].substr(Config.File_Names[0].rfind(__T('/'))+1, string::npos); \
- else \
- File_Temp=Config.File_Names[0]; \
- Debug_Config.Create(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".")+File_Temp+__T(".Config.txt")); \
- } \
- } \
- Debug_Config.Write(Debug); \
- }
-#else // MEDIAINFO_DEBUG_CONFIG
- #define MEDIAINFO_DEBUG_CONFIG_TEXT(_TOAPPEND)
-#endif // MEDIAINFO_DEBUG_CONFIG
-
-#ifdef MEDIAINFO_DEBUG_CONFIG
- #define EXECUTE_SIZE_T(_METHOD,_DEBUGB) \
- { \
- size_t ToReturn=_METHOD; \
- MEDIAINFO_DEBUG_CONFIG_TEXT(_DEBUGB) \
- return ToReturn; \
- }
-#else //MEDIAINFO_DEBUG_CONFIG
- #define EXECUTE_SIZE_T(_METHOD, _DEBUGB) \
- return _METHOD;
-#endif //MEDIAINFO_DEBUG_CONFIG
-
-#ifdef MEDIAINFO_DEBUG_CONFIG
- #define EXECUTE_INT64U(_METHOD,_DEBUGB) \
- { \
- int64u ToReturn=_METHOD; \
- MEDIAINFO_DEBUG_CONFIG_TEXT(_DEBUGB) \
- return ToReturn; \
- }
-#else //MEDIAINFO_DEBUG_CONFIG
- #define EXECUTE_INT64U(_METHOD, _DEBUGB) \
- return _METHOD;
-#endif //MEDIAINFO_DEBUG_CONFIG
-
-#ifdef MEDIAINFO_DEBUG_CONFIG
- #define EXECUTE_STRING(_METHOD,_DEBUGB) \
- { \
- Ztring ToReturn=_METHOD; \
- MEDIAINFO_DEBUG_CONFIG_TEXT(_DEBUGB) \
- return ToReturn; \
- }
-#else //MEDIAINFO_DEBUG_CONFIG
- #define EXECUTE_STRING(_METHOD,_DEBUGB) \
- return _METHOD;
-#endif //MEDIAINFO_DEBUG_CONFIG
-
-#ifdef MEDIAINFO_DEBUG_BUFFER
- #define MEDIAINFO_DEBUG_BUFFER_SAVE(_BUFFER, _SIZE) \
- { \
- if (!Debug_Buffer_Stream.Opened_Get()) \
- { \
- if (Config.File_Names.empty()) \
- Debug_Buffer_Stream.Create(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".Buffer.Stream.0000000000000000")); \
- else \
- { \
- Ztring File_Temp; \
- if (Config.File_Names[0].rfind(__T('\\'))!=string::npos) \
- File_Temp=Config.File_Names[0].substr(Config.File_Names[0].rfind(__T('\\'))+1, string::npos); \
- else if (Config.File_Names[0].rfind(__T('/'))!=string::npos) \
- File_Temp=Config.File_Names[0].substr(Config.File_Names[0].rfind(__T('/'))+1, string::npos); \
- else \
- File_Temp=Config.File_Names[0]; \
- Debug_Buffer_Stream.Create(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".")+File_Temp+__T(".Buffer.Stream.0000000000000000")); \
- } \
- Debug_Buffer_Stream_Order=0; \
- if (Config.File_Names.empty()) \
- Debug_Buffer_Sizes.Create(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".Buffer.Sizes.0000000000000000")); \
- else \
- { \
- Ztring File_Temp; \
- if (Config.File_Names[0].rfind(__T('\\'))!=string::npos) \
- File_Temp=Config.File_Names[0].substr(Config.File_Names[0].rfind(__T('\\'))+1, string::npos); \
- else if (Config.File_Names[0].rfind(__T('/'))!=string::npos) \
- File_Temp=Config.File_Names[0].substr(Config.File_Names[0].rfind(__T('/'))+1, string::npos); \
- else \
- File_Temp=Config.File_Names[0]; \
- Debug_Buffer_Sizes.Create(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".")+File_Temp+__T(".Buffer.Sizes.0000000000000000")); \
- } \
- Debug_Buffer_Sizes_Count=0; \
- } \
- Debug_Buffer_Stream.Write(_BUFFER, _SIZE); \
- Debug_Buffer_Sizes.Write((int8u*)&_SIZE, sizeof(size_t)); \
- Debug_Buffer_Sizes_Count+=_SIZE; \
- if (Debug_Buffer_Sizes_Count>=MEDIAINFO_DEBUG_BUFFER_SAVE_FileSize) \
- { \
- Debug_Buffer_Stream.Close(); \
- Debug_Buffer_Sizes.Close(); \
- Ztring Before=Ztring::ToZtring(Debug_Buffer_Stream_Order-1); \
- while (Before.size()<16) \
- Before.insert(0, 1, __T('0')); \
- Ztring Next=Ztring::ToZtring(Debug_Buffer_Stream_Order+1); \
- while (Next.size()<16) \
- Next.insert(0, 1, __T('0')); \
- Debug_Buffer_Stream.Create(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".Buffer.Stream.")+Next); \
- Debug_Buffer_Sizes.Create(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".Buffer.Sizes.")+Next); \
- File::Delete(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".Buffer.Stream.")+Before); \
- File::Delete(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".Buffer.Sizes.")+Before); \
- Debug_Buffer_Stream_Order++; \
- Debug_Buffer_Sizes_Count=0; \
- } \
- }
-#else // MEDIAINFO_DEBUG_BUFFER
- #define MEDIAINFO_DEBUG_BUFFER_SAVE(_BUFFER, _SIZE)
-#endif // MEDIAINFO_DEBUG_BUFFER
-
-#ifdef MEDIAINFO_DEBUG_OUTPUT
- #define MEDIAINFO_DEBUG_OUTPUT_INIT(_VALUE, _DEBUGB) \
- { \
- if (OptionLower==__T("file_duplicate")) \
- { \
- size_t Pos=(size_t)ToReturn2.To_int64u(); \
- if (Pos>=Debug_Output_Pos_Stream.size()) \
- { \
- Debug_Output_Pos_Stream.resize(Pos+1); \
- Debug_Output_Pos_Stream[Pos]=new File(); \
- Debug_Output_Pos_Sizes.resize(Pos+1); \
- Debug_Output_Pos_Sizes[Pos]=new File(); \
- Debug_Output_Pos_Pointer.resize(Pos+1); \
- Debug_Output_Pos_Pointer[Pos]=(void*)Ztring(Value).SubString(__T("memory://"), __T(":")).To_int64u(); \
- } \
- } \
- EXECUTE_STRING(_VALUE, _DEBUGB) \
- }
-#else // MEDIAINFO_DEBUG_OUTPUT
- #define MEDIAINFO_DEBUG_OUTPUT_INIT(_VALUE, _DEBUGB) \
- EXECUTE_STRING(_VALUE, _DEBUGB)
-#endif // MEDIAINFO_DEBUG_OUTPUT
-
-#ifdef MEDIAINFO_DEBUG_OUTPUT
- #define MEDIAINFO_DEBUG_OUTPUT_VALUE(_VALUE, _METHOD) \
- { \
- size_t ByteCount=Info->Output_Buffer_Get(Value); \
- void* ValueH=(void*)Ztring(Value).SubString(__T("memory://"), __T(":")).To_int64u(); \
- map<void*, File>::iterator F_Stream=Debug_Output_Value_Stream.find(ValueH); \
- if (F_Stream!=Debug_Output_Value_Stream.end()) \
- { \
- map<void*, File>::iterator F_Sizes=Debug_Output_Value_Stream.find(ValueH); \
- if (!F_Stream->second.Opened_Get()) \
- { \
- F_Stream->second.Create(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".Output.")+Ztring::ToZtring((size_t)ValueH, 16)+__T(".Stream")); \
- F_Sizes->second.Create(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".Output.")+Ztring::ToZtring((size_t)ValueH, 16)+__T(".Sizes")); \
- } \
- F_Stream->second.Write((int8u*)ValueH, ByteCount); \
- F_Sizes->second.Write((int8u*)&ByteCount, sizeof(ByteCount)); \
- } \
- return ByteCount; \
- }
-#else // MEDIAINFO_DEBUG_OUTPUT
- #define MEDIAINFO_DEBUG_OUTPUT_VALUE(_VALUE, _METHOD) \
- return _METHOD
-#endif // MEDIAINFO_DEBUG_OUTPUT
-
-#ifdef MEDIAINFO_DEBUG_OUTPUT
- #define MEDIAINFO_DEBUG_OUTPUT_POS(_POS, _METHOD) \
- { \
- size_t ByteCount=Info->Output_Buffer_Get(_POS); \
- if (_POS<Debug_Output_Pos_Stream.size()) \
- { \
- if (!Debug_Output_Pos_Stream[_POS]->Opened_Get()) \
- { \
- Debug_Output_Pos_Stream[_POS]->Create(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".Output.")+Ztring::ToZtring(Pos, 16)+__T(".Stream")); \
- Debug_Output_Pos_Sizes[_POS]->Create(Ztring(MediaInfo_Debug_Name)+__T(".")+Ztring::ToZtring((size_t)this, 16)+__T(".Output.")+Ztring::ToZtring(Pos, 16)+__T(".Sizes")); \
- } \
- Debug_Output_Pos_Stream[_POS]->Write((int8u*)Debug_Output_Pos_Pointer[_POS], ByteCount); \
- Debug_Output_Pos_Sizes[_POS]->Write((int8u*)&ByteCount, sizeof(ByteCount)); \
- } \
- return ByteCount; \
- }
-#else // MEDIAINFO_DEBUG_OUTPUT
- #define MEDIAINFO_DEBUG_OUTPUT_POS(_VALUE, _METHOD) \
- return _METHOD
-#endif // MEDIAINFO_DEBUG_OUTPUT
-
-}
-using namespace MediaInfo_Debug_MediaInfo_Internal;
-
-//***************************************************************************
-// Constructor/destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-MediaInfo_Internal::MediaInfo_Internal()
-: Thread()
-{
- CriticalSectionLocker CSL(CS);
-
- MEDIAINFO_DEBUG_CONFIG_TEXT(Debug+=__T("Construction");)
-
- MediaInfoLib::Config.Init(); //Initialize Configuration
-
- BlockMethod=BlockMethod_Local;
- Info=NULL;
- #if !defined(MEDIAINFO_READER_NO)
- Reader=NULL;
- #endif //!defined(MEDIAINFO_READER_NO)
- Info_IsMultipleParsing=false;
-
- Stream.resize(Stream_Max);
- Stream_More.resize(Stream_Max);
-
- //Position in a MediaInfoList class
- IsFirst=true;
- IsLast=true;
-
- //Threading
- BlockMethod=0;
- IsInThread=false;
-}
-
-//---------------------------------------------------------------------------
-MediaInfo_Internal::~MediaInfo_Internal()
-{
- Close();
-
- CriticalSectionLocker CSL(CS);
-
- MEDIAINFO_DEBUG_CONFIG_TEXT(Debug+=__T("Destruction");)
-
- delete Info; //Info=NULL;
- #if !defined(MEDIAINFO_READER_NO)
- delete Reader; //Reader=NULL;
- #endif //!defined(MEDIAINFO_READER_NO)
- #ifdef MEDIAINFO_DEBUG_OUTPUT
- for (size_t Pos=0; Pos<Debug_Output_Pos_Stream.size(); Pos++)
- {
- delete Debug_Output_Pos_Stream[Pos]; //Debug_Output_Pos_Stream[Pos]=NULL;
- delete Debug_Output_Pos_Sizes[Pos]; //Debug_Output_Pos_Sizes[Pos]=NULL;
- }
- #endif //MEDIAINFO_DEBUG_OUTPUT
-}
-
-//***************************************************************************
-// Files
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t MediaInfo_Internal::Open(const String &File_Name_)
-{
- Close();
-
- //External IBI
- #if MEDIAINFO_IBIUSAGE
- if (Config.Ibi_UseIbiInfoIfAvailable_Get())
- {
- std::string IbiFile=Config.Ibi_Get();
- if (!IbiFile.empty())
- {
- Info=new File_Ibi();
- Open_Buffer_Init(IbiFile.size(), File_Name_);
- Open_Buffer_Continue((const int8u*)IbiFile.c_str(), IbiFile.size());
- Open_Buffer_Finalize();
-
- if (!Get(Stream_General, 0, __T("Format")).empty() && Get(Stream_General, 0, __T("Format"))!=__T("Ibi"))
- return 1;
-
- //Nothing interesting
- Close();
- }
- }
- #endif //MEDIAINFO_IBIUSAGE
-
- CS.Enter();
- MEDIAINFO_DEBUG_CONFIG_TEXT(Debug+=__T("Open, File=");Debug+=Ztring(File_Name_).c_str();)
- Config.File_Names.clear();
- if (Config.File_FileNameFormat_Get()==__T("CSV"))
- {
- Config.File_Names.Separator_Set(0, __T(","));
- Config.File_Names.Write(File_Name_);
- }
- else if (!File_Name_.empty())
- Config.File_Names.push_back(File_Name_);
- if (Config.File_Names.empty())
- {
- CS.Leave();
- return 0;
- }
- Config.File_Names_Pos=1;
- CS.Leave();
-
- //Parsing
- if (BlockMethod==1)
- {
- if (!IsInThread) //If already created, the routine will read the new files
- {
- Run();
- IsInThread=true;
- }
- return 0;
- }
- else
- {
- Entry(); //Normal parsing
- return Count_Get(Stream_General);
- }
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Internal::Entry()
-{
- CS.Enter();
- MEDIAINFO_DEBUG_CONFIG_TEXT(Debug+=__T("Entry");)
- Config.State_Set(0);
- CS.Leave();
-
- if ((Config.File_Names[0].size()>=6
- && Config.File_Names[0][0]==__T('m')
- && Config.File_Names[0][1]==__T('m')
- && Config.File_Names[0][2]==__T('s')
- && Config.File_Names[0][3]==__T(':')
- && Config.File_Names[0][4]==__T('/')
- && Config.File_Names[0][5]==__T('/'))
- || (Config.File_Names[0].size()>=7
- && Config.File_Names[0][0]==__T('m')
- && Config.File_Names[0][1]==__T('m')
- && Config.File_Names[0][2]==__T('s')
- && Config.File_Names[0][3]==__T('h')
- && Config.File_Names[0][4]==__T(':')
- && Config.File_Names[0][5]==__T('/')
- && Config.File_Names[0][6]==__T('/')))
- #if defined(MEDIAINFO_LIBMMS_YES)
- Reader_libmms().Format_Test(this, Config.File_Names[0]);
- #else //MEDIAINFO_LIBMMS_YES
- {
- #if MEDIAINFO_EVENTS
- struct MediaInfo_Event_Log_0 Event;
- Event.EventCode=MediaInfo_EventCode_Create(MediaInfo_Parser_None, MediaInfo_Event_Log, 0);
- Event.Type=0xC0;
- Event.Severity=0xFF;
- Event.MessageCode=0;
- Event.MessageStringU=L"Libmms cupport is disabled due to compilation options";
- Event.MessageStringA="Libmms cupport is disabled due to compilation options";
- MediaInfoLib::Config.Event_Send((const int8u*)&Event, sizeof(MediaInfo_Event_Log_0));
- #endif //MEDIAINFO_EVENTS
- }
- #endif //MEDIAINFO_LIBMMS_YES
-
- else if (Config.File_Names[0].find(__T("://"))!=string::npos)
- #if defined(MEDIAINFO_LIBCURL_YES)
- {
- CS.Enter();
- if (Reader)
- {
- CS.Leave();
- return; //There is a problem
- }
- Reader=new Reader_libcurl();
- CS.Leave();
-
- Reader->Format_Test(this, Config.File_Names[0]);
-
- #if MEDIAINFO_NEXTPACKET
- if (Config.NextPacket_Get())
- return;
- #endif //MEDIAINFO_NEXTPACKET
- }
- #else //MEDIAINFO_LIBCURL_YES
- {
- #if MEDIAINFO_EVENTS
- struct MediaInfo_Event_Log_0 Event;
- Event.EventCode=MediaInfo_EventCode_Create(MediaInfo_Parser_None, MediaInfo_Event_Log, 0);
- Event.Type=0xC0;
- Event.Severity=0xFF;
- Event.MessageCode=0;
- Event.MessageStringU=L"Libcurl support is disabled due to compilation options";
- Event.MessageStringA="Libcurl support is disabled due to compilation options";
- MediaInfoLib::Config.Event_Send((const int8u*)&Event, sizeof(MediaInfo_Event_Log_0));
- #endif //MEDIAINFO_EVENTS
- }
- #endif //MEDIAINFO_LIBCURL_YES
-
- #if defined(MEDIAINFO_DIRECTORY_YES)
- else if (Dir::Exists(Config.File_Names[0]))
- Reader_Directory().Format_Test(this, Config.File_Names[0]);
- #endif //MEDIAINFO_DIRECTORY_YES
-
- #if defined(MEDIAINFO_FILE_YES)
- else if (File::Exists(Config.File_Names[0]))
- {
- #if defined(MEDIAINFO_REFERENCES_YES)
- string Dxw;
- if (Config.File_CheckSideCarFiles_Get() && !Config.File_IsReferenced_Get())
- {
- FileName Test(Config.File_Names[0]);
- Ztring FileExtension=Test.Extension_Get();
- FileExtension.MakeLowerCase();
-
- if (FileExtension!=__T("cap"))
- {
- Test.Extension_Set(__T("cap"));
- if (File::Exists(Test))
- Dxw+=" <clip file=\""+Test.Name_Get().To_UTF8()+".cap\" />\r\n";
- }
- if (FileExtension!=__T("dfxp"))
- {
- Test.Extension_Set(__T("dfxp"));
- if (File::Exists(Test))
- Dxw+=" <clip file=\""+Test.Name_Get().To_UTF8()+".dfxp\" />\r\n";
- }
- if (FileExtension!=__T("sami"))
- {
- Test.Extension_Set(__T("sami"));
- if (File::Exists(Test))
- Dxw+=" <clip file=\""+Test.Name_Get().To_UTF8()+".sami\" />\r\n";
- }
- if (FileExtension!=__T("sc2"))
- {
- Test.Extension_Set(__T("sc2"));
- if (File::Exists(Test))
- Dxw+=" <clip file=\""+Test.Name_Get().To_UTF8()+".sc2\" />\r\n";
- }
- if (FileExtension!=__T("scc"))
- {
- Test.Extension_Set(__T("scc"));
- if (File::Exists(Test))
- Dxw+=" <clip file=\""+Test.Name_Get().To_UTF8()+".scc\" />\r\n";
- }
- if (FileExtension!=__T("smi"))
- {
- Test.Extension_Set(__T("smi"));
- if (File::Exists(Test))
- Dxw+=" <clip file=\""+Test.Name_Get().To_UTF8()+".smi\" />\r\n";
- }
- if (FileExtension!=__T("srt"))
- {
- Test.Extension_Set(__T("srt"));
- if (File::Exists(Test))
- Dxw+=" <clip file=\""+Test.Name_Get().To_UTF8()+".srt\" />\r\n";
- }
- if (FileExtension!=__T("stl"))
- {
- Test.Extension_Set(__T("stl"));
- if (File::Exists(Test))
- Dxw+=" <clip file=\""+Test.Name_Get().To_UTF8()+".stl\" />\r\n";
- }
- if (FileExtension!=__T("ttml"))
- {
- Test.Extension_Set(__T("ttml"));
- if (File::Exists(Test))
- Dxw+=" <clip file=\""+Test.Name_Get().To_UTF8()+".ttml\" />\r\n";
- }
- if (FileExtension!=__T("ssa"))
- {
- Test.Extension_Set(__T("ssa"));
- if (File::Exists(Test))
- Dxw+=" <clip file=\""+Test.Name_Get().To_UTF8()+".ssa\" />\r\n";
- }
- if (FileExtension!=__T("ass"))
- {
- Test.Extension_Set(__T("ass"));
- if (File::Exists(Test))
- Dxw+=" <clip file=\""+Test.Name_Get().To_UTF8()+".ass\" />\r\n";
- }
- if (FileExtension!=__T("vtt"))
- {
- Test.Extension_Set(__T("vtt"));
- if (File::Exists(Test))
- Dxw+=" <clip file=\""+Test.Name_Get().To_UTF8()+".vtt\" />\r\n";
- }
- if (FileExtension!=__T("xml"))
- {
- Test.Extension_Set(__T("xml"));
- if (File::Exists(Test))
- {
- MediaInfo_Internal MI;
- Ztring ParseSpeed_Save=MI.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI.Option(__T("Demux_Get"), __T(""));
- MI.Option(__T("ParseSpeed"), __T("0"));
- MI.Option(__T("Demux"), Ztring());
- size_t MiOpenResult=MI.Open(Test);
- MI.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (MiOpenResult)
- {
- Ztring Format=MI.Get(Stream_General, 0, General_Format);
- if (Format==__T("TTML"))
- Dxw+=" <clip file=\""+Test.Name_Get().To_UTF8()+".xml\" />\r\n";
- }
- }
- }
-
- Ztring Name=Test.Name_Get();
- Ztring BaseName=Name.SubString(Ztring(), __T("_"));
- if (!BaseName.empty())
- {
- ZtringList List;
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_audio.mp4"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_sub.dfxp"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_sub.sami"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_sub.sc2"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_sub.scc"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_sub.smi"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_sub.srt"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_sub.stl"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_sub.vtt"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_forcesub.dfxp"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_forcesub.sami"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_forcesub.sc2"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_forcesub.scc"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_forcesub.smi"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_forcesub.srt"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_forcesub.stl"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_forcesub.vtt"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_cc.dfxp"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_cc.sami"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_cc.sc2"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_cc.scc"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_cc.smi"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_cc.srt"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_cc.stl"), Dir::Include_Files);
- List+=Dir::GetAllFileNames(Test.Path_Get()+PathSeparator+BaseName+__T("_*_cc.vtt"), Dir::Include_Files);
- for (size_t Pos=0; Pos<List.size(); Pos++)
- Dxw+=" <clip file=\""+List[Pos].To_UTF8()+"\" />\r\n";
- }
-
- if (!Dxw.empty())
- {
- Dxw.insert(0, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n"
- "<indexFile xmlns=\"urn:digimetrics-xml-wrapper\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:digimetrics-xml-wrapper DMSCLIP.XSD\">\r\n"
- " <clip source=\"main\" file=\""+FileName(Config.File_Names[0]).Name_Get().To_UTF8()+"."+FileName(Config.File_Names[0]).Extension_Get().To_UTF8()+"\" />\r\n");
- Dxw.append("</indexFile>\r\n");
- Config.File_FileNameFormat_Set(__T("Dxw"));
- }
- }
-
- if (Dxw.empty())
- {
- CS.Enter();
- if (Reader)
- {
- CS.Leave();
- return; //There is a problem
- }
- Reader=new Reader_File();
- CS.Leave();
-
- Reader->Format_Test(this, Config.File_Names[0]);
- }
- else
- {
- Open_Buffer_Init(Dxw.size(), FileName(Config.File_Names[0]).Path_Get()+PathSeparator+FileName(Config.File_Names[0]).Name_Get());
- Open_Buffer_Continue((const int8u*)Dxw.c_str(), Dxw.size());
- #if MEDIAINFO_NEXTPACKET
- if (Config.NextPacket_Get())
- return;
- #endif //MEDIAINFO_NEXTPACKET
- Open_Buffer_Finalize();
- }
- #else //defined(MEDIAINFO_REFERENCES_YES)
- CS.Enter();
- if (Reader)
- {
- CS.Leave();
- return; //There is a problem
- }
- Reader=new Reader_File();
- CS.Leave();
-
- Reader->Format_Test(this, Config.File_Names[0]);
- #endif //defined(MEDIAINFO_REFERENCES_YES)
-
- #if MEDIAINFO_NEXTPACKET
- if (Config.NextPacket_Get())
- return;
- #endif //MEDIAINFO_NEXTPACKET
- }
- #endif //MEDIAINFO_FILE_YES
-
- CS.Enter();
- Config.State_Set(1);
- CS.Leave();
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo_Internal::Open (const int8u* Begin, size_t Begin_Size, const int8u* End, size_t End_Size, int64u File_Size)
-{
- Open_Buffer_Init(File_Size);
- Open_Buffer_Continue(Begin, Begin_Size);
- if (End && Begin_Size+End_Size<=File_Size)
- {
- Open_Buffer_Init(File_Size, File_Size-End_Size);
- Open_Buffer_Continue(End, End_Size);
- }
- Open_Buffer_Finalize();
-
- return 1;
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo_Internal::Open_Buffer_Init (int64u File_Size_, const String &File_Name)
-{
- CriticalSectionLocker CSL(CS);
-
- if (Config.File_Names.size()<=1) //If analyzing multiple files, theses members are adapted in File_Reader.cpp
- {
- if (File_Size_!=(int64u)-1)
- Config.File_Size=Config.File_Current_Size=File_Size_;
- }
-
- if (Info==NULL)
- {
- Ztring ForceParser = Config.File_ForceParser_Get();
- if (!ForceParser.empty())
- {
- CS.Leave();
- SelectFromExtension(ForceParser);
- CS.Enter();
- }
- if (Info==NULL)
- {
- Info=new File__MultipleParsing;
- Info_IsMultipleParsing=true;
- }
- }
- #if MEDIAINFO_TRACE
- Info->Init(&Config, &Details, &Stream, &Stream_More);
- #else //MEDIAINFO_TRACE
- Info->Init(&Config, &Stream, &Stream_More);
- #endif //MEDIAINFO_TRACE
- if (!File_Name.empty())
- Info->File_Name=File_Name;
- Info->Open_Buffer_Init(File_Size_);
-
- if (File_Name.empty())
- {
- #if MEDIAINFO_EVENTS
- {
- struct MediaInfo_Event_General_Start_0 Event;
- memset(&Event, 0xFF, sizeof(struct MediaInfo_Event_Generic));
- Event.EventCode=MediaInfo_EventCode_Create(MediaInfo_Parser_None, MediaInfo_Event_General_Start, 0);
- Event.EventSize=sizeof(struct MediaInfo_Event_General_Start_0);
- Event.StreamIDs_Size=0;
- Event.Stream_Size=File_Size_;
- Event.FileName=NULL;
- Event.FileName_Unicode=NULL;
- Config.Event_Send(NULL, (const int8u*)&Event, sizeof(MediaInfo_Event_General_Start_0));
- }
- #endif //MEDIAINFO_EVENTS
- }
-
- return 1;
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo_Internal::Open_Buffer_Init (int64u File_Size_, int64u File_Offset_)
-{
- MEDIAINFO_DEBUG_CONFIG_TEXT(Debug+=__T("Open_Buffer_Init, File_Size=");Debug+=Ztring::ToZtring(File_Size_);Debug+=__T(", File_Offset=");Debug+=Ztring::ToZtring(File_Offset_);)
- #ifdef MEDIAINFO_DEBUG_BUFFER
- if (Info && File_Offset_>Info->File_Offset)
- {
- size_t Temp_Size=(size_t)(File_Offset_-Info->File_Offset);
- int8u* Temp=new int8u[Temp_Size];
- std::memset(Temp, 0xCC, Temp_Size);
- MEDIAINFO_DEBUG_BUFFER_SAVE(Temp, Temp_Size);
- delete[] Temp;
- }
- #endif //MEDIAINFO_DEBUG_BUFFER
-
- if (Config.File_Names.size()<=1) //If analyzing multiple files, theses members are adapted in File_Reader.cpp
- {
- if (File_Size_!=(int64u)-1)
- Config.File_Size=Config.File_Current_Size=File_Size_;
- }
-
- if (Info==NULL || File_Size_!=(int64u)-1)
- Open_Buffer_Init(File_Size_);
-
- if (File_Offset_!=(int64u)-1 && Info)
- {
- CriticalSectionLocker CSL(CS);
- Info->Open_Buffer_Position_Set(File_Offset_);
- }
-
- #if MEDIAINFO_EVENTS
- if (Info && Info->Status[File__Analyze::IsAccepted])
- {
- struct MediaInfo_Event_General_Move_Done_0 Event;
- memset(&Event, 0xFF, sizeof(struct MediaInfo_Event_Generic));
- Event.EventCode=MediaInfo_EventCode_Create(MediaInfo_Parser_None, MediaInfo_Event_General_Move_Done, 0);
- Event.EventSize=sizeof(struct MediaInfo_Event_General_Move_Done_0);
- Event.StreamIDs_Size=0;
- Event.StreamOffset=File_Offset_;
- Config.Event_Send(NULL, (const int8u*)&Event, sizeof(MediaInfo_Event_General_Move_Done_0));
- }
- else
- {
- struct MediaInfo_Event_General_Start_0 Event;
- memset(&Event, 0xFF, sizeof(struct MediaInfo_Event_Generic));
- Event.EventCode=MediaInfo_EventCode_Create(MediaInfo_Parser_None, MediaInfo_Event_General_Start, 0);
- Event.EventSize=sizeof(struct MediaInfo_Event_General_Start_0);
- Event.StreamIDs_Size=0;
- Event.Stream_Size=File_Size_;
- Event.FileName=NULL;
- Event.FileName_Unicode=NULL;
- Config.Event_Send(NULL, (const int8u*)&Event, sizeof(MediaInfo_Event_General_Start_0));
- }
- #endif //MEDIAINFO_EVENTS
-
- EXECUTE_SIZE_T(1, Debug+=__T("Open_Buffer_Init, will return 1");)
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_ADVANCED2
-size_t MediaInfo_Internal::Open_Buffer_SegmentChange ()
-{
- MEDIAINFO_DEBUG_CONFIG_TEXT(Debug+=__T("Open_Buffer_SegmentChange"))
-
- Info->Open_Buffer_SegmentChange();
-
- return 1;
-}
-#endif //MEDIAINFO_ADVANCED2
-
-//---------------------------------------------------------------------------
-void MediaInfo_Internal::Open_Buffer_Unsynch ()
-{
- MEDIAINFO_DEBUG_CONFIG_TEXT(Debug+=__T("Open_Buffer_Unsynch");)
-
- if (Info==NULL)
- return;
-
- CriticalSectionLocker CSL(CS);
- Info->Open_Buffer_Unsynch();
-}
-
-//---------------------------------------------------------------------------
-std::bitset<32> MediaInfo_Internal::Open_Buffer_Continue (const int8u* ToAdd, size_t ToAdd_Size)
-{
- CriticalSectionLocker CSL(CS);
- MEDIAINFO_DEBUG_BUFFER_SAVE(ToAdd, ToAdd_Size);
- if (Info==NULL)
- return 0;
-
- Info->Open_Buffer_Continue(ToAdd, ToAdd_Size);
-
- if (Info_IsMultipleParsing && Info->Status[File__Analyze::IsAccepted])
- {
- //Found
- File__Analyze* Info_ToDelete=Info;
- Info=((File__MultipleParsing*)Info)->Parser_Get();
- delete Info_ToDelete; //Info_ToDelete=NULL;
- Info_IsMultipleParsing=false;
- }
-
- #if 0 //temp, for old users
- //The parser wanted seek but the buffer is not seekable
- if (Info->File_GoTo!=(int64u)-1 && Config.File_IsSeekable_Get()==0)
- {
- Info->Open_Buffer_Finalize(true);
- Info->File_GoTo=(int64u)-1;
- MEDIAINFO_DEBUG_CONFIG_TEXT(Debug+=__T("Open_Buffer_Continue, will return 0");)
- return 0;
- }
-
- return 1;
- #else
- //The parser wanted seek but the buffer is not seekable
- if (Info->File_GoTo!=(int64u)-1 && Config.File_IsSeekable_Get()==0)
- {
- Info->Fill();
- Info->File_GoTo=(int64u)-1;
- }
-
- return Info->Status;
- #endif
-}
-
-//---------------------------------------------------------------------------
-int64u MediaInfo_Internal::Open_Buffer_Continue_GoTo_Get ()
-{
- CriticalSectionLocker CSL(CS);
- if (Info==NULL)
- return (int64u)-1;
-
- if (Info->File_GoTo==(int64u)-1
- || (Info->File_GoTo>=Info->File_Offset && Info->File_GoTo<Info->File_Offset+0x10000)) //If jump is tiny, this is not worth the performance cost due to seek
- return (int64u)-1;
- else
- return Info->File_GoTo;
-}
-
-//---------------------------------------------------------------------------
-bool MediaInfo_Internal::Open_Buffer_Position_Set(int64u File_Offset)
-{
- CriticalSectionLocker CSL(CS);
- if (Info==NULL)
- return false;
-
- Info->Open_Buffer_Position_Set(File_Offset);
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t MediaInfo_Internal::Open_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- CriticalSectionLocker CSL(CS);
- if (Info==NULL)
- return false;
-
- return Info->Open_Buffer_Seek(Method, Value, ID);
-}
-#endif //MEDIAINFO_SEEK
-
-//---------------------------------------------------------------------------
-size_t MediaInfo_Internal::Open_Buffer_Finalize ()
-{
- CS.Enter();
- if (Info && Info->Status[File__Analyze::IsUpdated])
- {
- Info->Open_Buffer_Update();
- Info->Status[File__Analyze::IsUpdated]=false;
- for (size_t Pos=File__Analyze::User_16; Pos<File__Analyze::User_16+16; Pos++)
- Info->Status[Pos]=false;
- }
- CS.Leave();
-
- CriticalSectionLocker CSL(CS);
- MEDIAINFO_DEBUG_CONFIG_TEXT(Debug+=__T("Open_Buffer_Finalize");)
- if (Info==NULL)
- return 0;
-
- Info->Open_Buffer_Finalize();
- #if MEDIAINFO_DEMUX
- if (Config.Demux_EventWasSent)
- return 0;
- #endif //MEDIAINFO_DEMUX
-
- //Cleanup
- if (!Config.File_IsSub_Get() && !Config.File_KeepInfo_Get()) //We need info for the calling parser
- {
- delete Info; Info=NULL;
- }
- if (Config.File_Names_Pos>=Config.File_Names.size())
- {
- delete[] Config.File_Buffer; Config.File_Buffer=NULL; Config.File_Buffer_Size=0; Config.File_Buffer_Size_Max=0;
- }
-
- EXECUTE_SIZE_T(1, Debug+=__T("Open_Buffer_Finalize, will return 1"))
-}
-
-//---------------------------------------------------------------------------
-std::bitset<32> MediaInfo_Internal::Open_NextPacket ()
-{
- CriticalSectionLocker CSL(CS);
-
- bool Demux_EventWasSent=false;
- if (Info==NULL || !Info->Status[File__Analyze::IsFinished])
- {
- #if !defined(MEDIAINFO_READER_NO)
- if (Reader)
- {
- CS.Leave();
- Demux_EventWasSent=(Reader->Format_Test_PerParser_Continue(this)==2);
- CS.Enter();
- }
- else
- #endif //defined(MEDIAINFO_READER_NO)
- {
- #if MEDIAINFO_NEXTPACKET
- Config.Demux_EventWasSent=false;
- #endif //MEDIAINFO_NEXTPACKET
- Open_Buffer_Continue(NULL, 0);
- #if MEDIAINFO_NEXTPACKET
- Demux_EventWasSent=Config.Demux_EventWasSent;
- if (!Demux_EventWasSent)
- #endif //MEDIAINFO_NEXTPACKET
- Open_Buffer_Finalize();
- }
- }
-
- std::bitset<32> ToReturn=Info==NULL?std::bitset<32>(0x0F):Info->Status;
- if (Demux_EventWasSent)
- ToReturn[8]=true; //bit 8 is for the reception of a frame
-
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Internal::Close()
-{
- if (IsRunning())
- {
- RequestTerminate();
- while(IsExited())
- Yield();
- }
-
- CriticalSectionLocker CSL(CS);
- MEDIAINFO_DEBUG_CONFIG_TEXT(Debug+=__T("Close");)
- Stream.clear();
- Stream.resize(Stream_Max);
- Stream_More.clear();
- Stream_More.resize(Stream_Max);
- delete Info; Info=NULL;
- #if !defined(MEDIAINFO_READER_NO)
- delete Reader; Reader=NULL;
- #endif //defined(MEDIAINFO_READER_NO)
-}
-
-//***************************************************************************
-// Get File info
-//***************************************************************************
-
-/*//---------------------------------------------------------------------------
-Ztring MediaInfo_Internal::Inform(size_t)
-{
- //Info case
- if (Info)
- return Info->Inform();
-
- if (!Info)
- return MediaInfoLib::Config.EmptyString_Get();
-
- return Info->Inform();
-} */
-
-//---------------------------------------------------------------------------
-Ztring MediaInfo_Internal::Get(stream_t StreamKind, size_t StreamPos, size_t Parameter, info_t KindOfInfo)
-{
- CriticalSectionLocker CSL(CS);
- MEDIAINFO_DEBUG_CONFIG_TEXT(Debug+=__T("Get, StreamKind=");Debug+=Ztring::ToZtring((size_t)StreamKind);Debug+=__T(", StreamPos=");Debug+=Ztring::ToZtring(StreamPos);Debug+=__T(", Parameter=");Debug+=Ztring::ToZtring(Parameter);)
-
- if (Info && Info->Status[File__Analyze::IsUpdated])
- {
- Info->Open_Buffer_Update();
- Info->Status[File__Analyze::IsUpdated]=false;
- for (size_t Pos=File__Analyze::User_16; Pos<File__Analyze::User_16+16; Pos++)
- Info->Status[Pos]=false;
- }
-
- //Check integrity
- if (StreamKind>=Stream_Max || StreamPos>=Stream[StreamKind].size() || Parameter>=MediaInfoLib::Config.Info_Get(StreamKind).size()+Stream_More[StreamKind][StreamPos].size() || KindOfInfo>=Info_Max)
- return MediaInfoLib::Config.EmptyString_Get(); //Parameter is unknown
-
- else if (Parameter<MediaInfoLib::Config.Info_Get(StreamKind).size())
- {
- //Optimization : KindOfInfo>Info_Text is in static lists
- if (KindOfInfo!=Info_Text)
- EXECUTE_STRING(MediaInfoLib::Config.Info_Get(StreamKind, Parameter, KindOfInfo), Debug+=__T("Get, will return ");Debug+=ToReturn;) //look for static information only
- else if (Parameter<Stream[StreamKind][StreamPos].size())
- EXECUTE_STRING(Stream[StreamKind][StreamPos][Parameter], Debug+=__T("Get, will return ");Debug+=ToReturn;)
- else
- EXECUTE_STRING(MediaInfoLib::Config.EmptyString_Get(), Debug+=__T("Get, will return ");Debug+=ToReturn;) //This parameter is known, but not filled
- }
- else
- EXECUTE_STRING(Stream_More[StreamKind][StreamPos][Parameter-MediaInfoLib::Config.Info_Get(StreamKind).size()](KindOfInfo), Debug+=__T("Get, will return ");Debug+=ToReturn;)
-}
-
-//---------------------------------------------------------------------------
-Ztring MediaInfo_Internal::Get(stream_t StreamKind, size_t StreamPos, const String &Parameter, info_t KindOfInfo, info_t KindOfSearch)
-{
- //Legacy
- if (Parameter.find(__T("_String"))!=Error)
- {
- Ztring S1=Parameter;
- S1.FindAndReplace(__T("_String"), __T("/String"));
- return Get(StreamKind, StreamPos, S1, KindOfInfo, KindOfSearch);
- }
- if (Parameter==__T("Channels"))
- return Get(StreamKind, StreamPos, __T("Channel(s)"), KindOfInfo, KindOfSearch);
- if (Parameter==__T("Artist"))
- return Get(StreamKind, StreamPos, __T("Performer"), KindOfInfo, KindOfSearch);
- if (Parameter==__T("AspectRatio"))
- return Get(StreamKind, StreamPos, __T("DisplayAspectRatio"), KindOfInfo, KindOfSearch);
- if (Parameter==__T("AspectRatio/String"))
- return Get(StreamKind, StreamPos, __T("DisplayAspectRatio/String"), KindOfInfo, KindOfSearch);
- if (Parameter==__T("Chroma"))
- return Get(StreamKind, StreamPos, __T("Colorimetry"), KindOfInfo, KindOfSearch);
- if (Parameter==__T("PlayTime"))
- return Get(StreamKind, StreamPos, __T("Duration"), KindOfInfo, KindOfSearch);
- if (Parameter==__T("PlayTime/String"))
- return Get(StreamKind, StreamPos, __T("Duration/String"), KindOfInfo, KindOfSearch);
- if (Parameter==__T("PlayTime/String1"))
- return Get(StreamKind, StreamPos, __T("Duration/String1"), KindOfInfo, KindOfSearch);
- if (Parameter==__T("PlayTime/String2"))
- return Get(StreamKind, StreamPos, __T("Duration/String2"), KindOfInfo, KindOfSearch);
- if (Parameter==__T("PlayTime/String3"))
- return Get(StreamKind, StreamPos, __T("Duration/String3"), KindOfInfo, KindOfSearch);
- if (StreamKind==Stream_General && Parameter==__T("BitRate"))
- return Get(Stream_General, StreamPos, __T("OverallBitRate"), KindOfInfo, KindOfSearch);
- if (StreamKind==Stream_General && Parameter==__T("BitRate/String"))
- return Get(Stream_General, StreamPos, __T("OverallBitRate/String"), KindOfInfo, KindOfSearch);
- if (StreamKind==Stream_General && Parameter==__T("BitRate_Minimum"))
- return Get(Stream_General, StreamPos, __T("OverallBitRate_Minimum"), KindOfInfo, KindOfSearch);
- if (StreamKind==Stream_General && Parameter==__T("BitRate_Minimum/String"))
- return Get(Stream_General, StreamPos, __T("OverallBitRate_Minimum/String"), KindOfInfo, KindOfSearch);
- if (StreamKind==Stream_General && Parameter==__T("BitRate_Nominal"))
- return Get(Stream_General, StreamPos, __T("OverallBitRate_Nominal"), KindOfInfo, KindOfSearch);
- if (StreamKind==Stream_General && Parameter==__T("BitRate_Nominal/String"))
- return Get(Stream_General, StreamPos, __T("OverallBitRate_Nominal/String"), KindOfInfo, KindOfSearch);
- if (StreamKind==Stream_General && Parameter==__T("BitRate_Maximum"))
- return Get(Stream_General, StreamPos, __T("OverallBitRate_Maximum"), KindOfInfo, KindOfSearch);
- if (StreamKind==Stream_General && Parameter==__T("BitRate_Maximum/String"))
- return Get(Stream_General, StreamPos, __T("OverallBitRate_Maximum/String"), KindOfInfo, KindOfSearch);
- if (Parameter==__T("AFD"))
- return Get(StreamKind, StreamPos, __T("ActiveFormatDescription"), KindOfInfo, KindOfSearch);
- if (Parameter==__T("Encoded_Application") && Info && !Info->Retrieve(StreamKind, StreamPos, "Encoded_Application/String").empty())
- return Get(StreamKind, StreamPos, __T("Encoded_Application/String"), KindOfInfo, KindOfSearch);
- if (Parameter==__T("Encoded_Library") && Info && !Info->Retrieve(StreamKind, StreamPos, "Encoded_Library/String").empty())
- return Get(StreamKind, StreamPos, __T("Encoded_Library/String"), KindOfInfo, KindOfSearch);
-
- CS.Enter();
- MEDIAINFO_DEBUG_CONFIG_TEXT(Debug+=__T("Get, StreamKind=");Debug+=Ztring::ToZtring((size_t)StreamKind);Debug+=__T(", StreamKind=");Debug+=Ztring::ToZtring(StreamPos);Debug+=__T(", Parameter=");Debug+=Ztring(Parameter);)
-
- if (Info && Info->Status[File__Analyze::IsUpdated])
- {
- Info->Open_Buffer_Update();
- Info->Status[File__Analyze::IsUpdated]=false;
- for (size_t Pos=File__Analyze::User_16; Pos<File__Analyze::User_16+16; Pos++)
- Info->Status[Pos]=false;
- }
-
- //Check integrity
- if (StreamKind>=Stream_Max || StreamPos>=Stream[StreamKind].size() || KindOfInfo>=Info_Max)
- {
- CS.Leave();
- EXECUTE_STRING(MediaInfoLib::Config.EmptyString_Get(), Debug+=__T("Get, stream and/or pos is invalid will return empty string");) //Parameter is unknown
- }
-
- //Special cases
- //-Inform for a stream
- if (Parameter==__T("Inform"))
- {
- CS.Leave();
- Ztring InformZtring=Inform(StreamKind, StreamPos, true);
- CS.Enter();
- size_t Pos=MediaInfoLib::Config.Info_Get(StreamKind).Find(__T("Inform"));
- if (Pos!=Error)
- Stream[StreamKind][StreamPos](Pos)=InformZtring;
- }
-
- //Case of specific info
- size_t ParameterI=MediaInfoLib::Config.Info_Get(StreamKind).Find(Parameter, KindOfSearch);
- if (ParameterI==Error)
- {
- ParameterI=Stream_More[StreamKind][StreamPos].Find(Parameter, KindOfSearch);
- if (ParameterI==Error)
- {
- #ifdef MEDIAINFO_DEBUG_WARNING_GET
- if (Ztring(Parameter)!=__T("SCTE35_PID")) //TODO: define a special interface for parser-specific parameters
- std::cerr<<"MediaInfo: Warning, Get(), parameter \""<<Ztring(Parameter).To_Local()<<"\""<<std::endl;
- #endif //MEDIAINFO_DEBUG_WARNING_GET
-
- CS.Leave();
- EXECUTE_STRING(MediaInfoLib::Config.EmptyString_Get(), Debug+=__T("Get, parameter is unknown, will return empty string");) //Parameter is unknown
- }
- CS.Leave();
- CriticalSectionLocker CSL(CS);
- return Stream_More[StreamKind][StreamPos][ParameterI](KindOfInfo);
- }
-
- CS.Leave();
-
- EXECUTE_STRING(Get(StreamKind, StreamPos, ParameterI, KindOfInfo), Debug+=__T("Get, will return ");Debug+=ToReturn;)
-}
-
-//***************************************************************************
-// Set File info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t MediaInfo_Internal::Set(const String &ToSet, stream_t StreamKind, size_t StreamPos, size_t Parameter, const String &OldValue)
-{
- CriticalSectionLocker CSL(CS);
- if (!Info)
- return 0;
-
- return Info->Set(StreamKind, StreamPos, Parameter, ToSet, OldValue);
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo_Internal::Set(const String &ToSet, stream_t StreamKind, size_t StreamPos, const String &Parameter, const String &OldValue)
-{
- CriticalSectionLocker CSL(CS);
- if (!Info)
- return 0;
-
- return Info->Set(StreamKind, StreamPos, Parameter, ToSet, OldValue);
-}
-
-//***************************************************************************
-// Output buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t MediaInfo_Internal::Output_Buffer_Get (const String &Value)
-{
- CriticalSectionLocker CSL(CS);
- if (!Info)
- return 0;
-
- MEDIAINFO_DEBUG_OUTPUT_VALUE(Value, Info->Output_Buffer_Get(Value));
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo_Internal::Output_Buffer_Get (size_t Pos)
-{
- CriticalSectionLocker CSL(CS);
- if (!Info)
- return 0;
-
- MEDIAINFO_DEBUG_OUTPUT_POS(Pos, Info->Output_Buffer_Get(Pos));
-}
-
-//***************************************************************************
-// Information
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-String MediaInfo_Internal::Option (const String &Option, const String &Value)
-{
- CriticalSectionLocker CSL(CS);
- MEDIAINFO_DEBUG_CONFIG_TEXT(Debug+=__T("Option, Option=");Debug+=Ztring(Option);Debug+=__T(", Value=");Debug+=Ztring(Value);)
- Ztring OptionLower=Option; OptionLower.MakeLowerCase();
- if (Option.empty())
- return __T("");
- else if (OptionLower==__T("language_update"))
- {
- if (!Info || Info->Get(Stream_General, 0, __T("CompleteName"))==__T(""))
- return __T("");
-
- ZtringListList Language=Value.c_str();
- MediaInfoLib::Config.Language_Set(Language);
-
- return __T("");
- }
- else if (OptionLower==__T("create_dummy"))
- {
- CreateDummy (Value);
- delete Info; Info=NULL;
- return __T("");
- }
- else if (OptionLower==__T("thread"))
- {
- BlockMethod=1;
- return __T("");
- }
- else if (Option==__T("info_capacities"))
- {
- return __T("Option removed");
- }
- #if MEDIAINFO_TRACE
- else if (OptionLower.find(__T("file_details_clear"))==0)
- {
- if (Info)
- Info->Details_Clear();
-
- return __T("");
- }
- #endif //MEDIAINFO_TRACE
- else if (OptionLower.find(__T("file_seek"))==0)
- {
- #if MEDIAINFO_SEEK
- if (Reader==NULL && Info==NULL)
- return __T("Error: Reader pointer is empty");
-
- size_t Method=(size_t)-1;
- int64u SeekValue=(int64u)-1;
- int64u ID=(int64u)-1;
-
- ZtringList List; List.Separator_Set(0, __T(","));
- List.Write(Value);
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- if (!List[Pos].empty() && List[Pos].find(__T('%'))==List[Pos].size()-1)
- {
- Method=1;
- SeekValue=(int64u)(Ztring(List[Pos]).To_float32()*100);
- }
- else if (!List[Pos].empty() && List[Pos].find_first_not_of(__T("0123456789"))==string::npos)
- {
- Method=0;
- SeekValue=Ztring(List[Pos]).To_int64u();
- }
- else if (!List[Pos].empty() && List[Pos].find(__T("Frame="))!=string::npos)
- {
- Method=3;
- Ztring FrameNumberZ=List[Pos].substr(List[Pos].find(__T("Frame="))+6, string::npos);
- SeekValue=FrameNumberZ.To_int64u();
- }
- else if (!List[Pos].empty() && List[Pos].find(__T(":"))!=string::npos)
- {
- Method=2;
- Ztring ValueZ=List[Pos];
- SeekValue=0;
- size_t Value_Pos=ValueZ.find(__T(":"));
- if (Value_Pos==string::npos)
- Value_Pos=ValueZ.size();
- SeekValue+=Ztring(ValueZ.substr(0, Value_Pos)).To_int64u()*60*60*1000*1000*1000;
- ValueZ.erase(0, Value_Pos+1);
- Value_Pos=ValueZ.find(__T(":"));
- if (Value_Pos==string::npos)
- Value_Pos=ValueZ.size();
- SeekValue+=Ztring(ValueZ.substr(0, Value_Pos)).To_int64u()*60*1000*1000*1000;
- ValueZ.erase(0, Value_Pos+1);
- Value_Pos=ValueZ.find(__T("."));
- if (Value_Pos==string::npos)
- Value_Pos=ValueZ.size();
- SeekValue+=Ztring(ValueZ.substr(0, Value_Pos)).To_int64u()*1000*1000*1000;
- ValueZ.erase(0, Value_Pos+1);
- if (!ValueZ.empty())
- SeekValue+=Ztring(ValueZ).To_int64u()*1000*1000*1000/(int64u)pow(10.0, (int)ValueZ.size());
- }
- else if (!List[Pos].empty() && List[Pos].find(__T("ID="))!=string::npos)
- {
- Ztring IDZ=List[Pos].substr(List[Pos].find(__T("ID="))+3, string::npos);
- ID=IDZ.To_int64u();
- }
- }
-
- CS.Leave();
- size_t Result;
- if (Reader)
- Result=Reader->Format_Test_PerParser_Seek(this, Method, SeekValue, ID);
- else
- Result=Open_Buffer_Seek(Method, SeekValue, ID);
- CS.Enter();
- switch (Result)
- {
- case 1 : return __T("");
- case 2 : return __T("Invalid value");
- #if MEDIAINFO_IBIUSAGE
- case 3 : return __T("Feature not supported / IBI file not provided");
- case 4 : return __T("Problem during IBI file parsing");
- #endif //MEDIAINFO_IBIUSAGE
- case 5 : return __T("Invalid ID");
- case 6 : return __T("Internal error");
- #if !MEDIAINFO_IBIUSAGE
- case (size_t)-2 : return __T("Feature not supported / IBI support disabled due to compilation options");
- #endif //MEDIAINFO_IBIUSAGE
- case (size_t)-1 : return __T("Feature not supported");
- default : return __T("Unknown error");
- }
- #else //MEDIAINFO_SEEK
- return __T("Seek manager is disabled due to compilation options");
- #endif //MEDIAINFO_SEEK
- }
- else if (OptionLower.find(__T("file_"))==0)
- {
- Ztring ToReturn2=Config.Option(Option, Value);
- if (Info)
- Info->Option_Manage();
-
- MEDIAINFO_DEBUG_OUTPUT_INIT(ToReturn2, Debug+=__T("Option, will return ");Debug+=ToReturn;)
- }
- else
- EXECUTE_STRING(MediaInfoLib::Config.Option(Option, Value), Debug+=__T("Option, will return ");Debug+=ToReturn;)
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo_Internal::Count_Get (stream_t StreamKind, size_t StreamPos)
-{
- CriticalSectionLocker CSL(CS);
-
- if (Info && Info->Status[File__Analyze::IsUpdated])
- {
- Info->Open_Buffer_Update();
- Info->Status[File__Analyze::IsUpdated]=false;
- for (size_t Pos=File__Analyze::User_16; Pos<File__Analyze::User_16+16; Pos++)
- Info->Status[Pos]=false;
- }
-
- //Integrity
- if (StreamKind>=Stream_Max)
- return 0;
-
- //Count of streams
- if (StreamPos==Error)
- return Stream[StreamKind].size();
-
- //Integrity
- if (StreamPos>=Stream[StreamKind].size())
- return 0;
-
- //Count of piece of information in a stream
- return MediaInfoLib::Config.Info_Get(StreamKind).size()+Stream_More[StreamKind][StreamPos].size();
-}
-
-//---------------------------------------------------------------------------
-size_t MediaInfo_Internal::State_Get ()
-{
- CriticalSectionLocker CSL(CS);
- return (size_t)(Config.State_Get()*10000);
-}
-
-//---------------------------------------------------------------------------
-void MediaInfo_Internal::TestContinuousFileNames ()
-{
- CriticalSectionLocker CSL(CS);
- if (Info)
- Info->TestContinuousFileNames();
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-void MediaInfo_Internal::Event_Prepare (struct MediaInfo_Event_Generic* Event)
-{
- CriticalSectionLocker CSL(CS);
- if (Info)
- Info->Event_Prepare(Event);
-}
-#endif // MEDIAINFO_EVENTS
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Internal.h b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Internal.h
deleted file mode 100644
index 10e062c0b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Internal.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Give information about a lot of media files
-// Dispatch the file to be tested by all containers
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_InternalH
-#define MediaInfo_InternalH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-// For developer: you can disable or enable traces
-//#define MEDIAINFO_DEBUG_CONFIG
-//#define MEDIAINFO_DEBUG_BUFFER
-//#define MEDIAINFO_DEBUG_OUTPUT
-//#define MEDIAINFO_DEBUG_WARNING_GET
-// For developer: customization of traces
-#ifdef MEDIAINFO_DEBUG_BUFFER
- const size_t MEDIAINFO_DEBUG_BUFFER_SAVE_FileSize=128*1024*1024;
-#endif //MEDIAINFO_DEBUG_BUFFER
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Config.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "ZenLib/Thread.h"
-#if defined (MEDIAINFO_DEBUG_CONFIG) || defined (MEDIAINFO_DEBUG_BUFFER) || defined (MEDIAINFO_DEBUG_OUTPUT)
- #include <ZenLib/File.h>
- #include <map>
-#endif //MEDIAINFO_DEBUG
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__Analyze;
-class Internet__Base;
-class Reader__Base;
-
-//***************************************************************************
-/// @brief MediaInfo_Internal
-/// @version 0.7
-//***************************************************************************
-
-class MediaInfo_Internal : public ZenLib::Thread
-{
-public :
- //Constructor/Destructor
- MediaInfo_Internal ();
- ~MediaInfo_Internal ();
-
- //File
- size_t Open (const String &File_Name);
- size_t Open (const ZenLib::int8u* Begin, size_t Begin_Size, const ZenLib::int8u* End=NULL, size_t End_Size=0, ZenLib::int64u File_Size=0);
- size_t Open_Buffer_Init (ZenLib::int64u File_Size=(ZenLib::int64u)-1, const String &File_Name=String());
- size_t Open_Buffer_Init (ZenLib::int64u File_Size, ZenLib::int64u File_Offset);
- #if MEDIAINFO_ADVANCED2
- size_t Open_Buffer_SegmentChange ();
- #endif //MEDIAINFO_ADVANCED2
- std::bitset<32> Open_Buffer_Continue (const ZenLib::int8u* Buffer, size_t Buffer_Size);
- ZenLib::int64u Open_Buffer_Continue_GoTo_Get ();
- bool Open_Buffer_Position_Set(int64u File_Offset);
- #if MEDIAINFO_SEEK
- size_t Open_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
- void Open_Buffer_Unsynch ();
- size_t Open_Buffer_Finalize ();
- std::bitset<32> Open_NextPacket ();
- void Close ();
-
- //General information
- Ztring Inform ();
- Ztring Inform (stream_t StreamKind, size_t StreamNumber, bool IsDirect); //All about only a specific stream
-
- //Get
- Ztring Get (stream_t StreamKind, size_t StreamNumber, size_t Parameter, info_t InfoKind=Info_Text);
- Ztring Get (stream_t StreamKind, size_t StreamNumber, const String &Parameter, info_t InfoKind=Info_Text, info_t SearchKind=Info_Name);
-
- //Set
- size_t Set (const String &ToSet, stream_t StreamKind, size_t StreamNumber, size_t Parameter, const String &OldValue=__T(""));
- size_t Set (const String &ToSet, stream_t StreamKind, size_t StreamNumber, const String &Parameter, const String &OldValue=__T(""));
-
- //Output_Buffered
- size_t Output_Buffer_Get (const String &Value);
- size_t Output_Buffer_Get (size_t Pos);
-
- //Info
- String Option (const String &Option, const String &Value=__T(""));
- size_t State_Get ();
- size_t Count_Get (stream_t StreamKind, size_t StreamNumber=(size_t)-1);
-
- //Position in a MediaInfoList class
- bool IsFirst;
- bool IsLast;
-
- //Internal
- static bool LibraryIsModified(); //Is the library has been modified? (#defines...)
-
-private :
- friend class File_Bdmv; //Theses classes need access to internal structure for optimization. There is recursivity with theses formats
- friend class File_Cdxa; //Theses classes need access to internal structure for optimization. There is recursivity with theses formats
- friend class File_Lxf; //Theses classes need access to internal structure for optimization. There is recursivity with theses formats
- friend class File_Mpeg4; //Theses classes need access to internal structure for optimization. There is recursivity with theses formats
- friend class File_MpegTs;//Theses classes need access to internal structure for optimization. There is recursivity with theses formats
- friend class File_MpegPs;//Theses classes need access to internal structure for optimization. There is recursivity with theses formats
- friend class File_Mxf; //Theses classes need access to internal structure for optimization. There is recursivity with theses formats
- friend class File_DcpAm; //Theses classes need access to internal structure for optimization. There is recursivity with theses formats
- friend class File_DcpCpl;//Theses classes need access to internal structure for optimization. There is recursivity with theses formats
- friend class File_DcpPkl;//Theses classes need access to internal structure for optimization. There is recursivity with theses formats
- friend class File__ReferenceFilesHelper; //Theses classes need access to internal structure for optimization. There is recursivity with theses formats
- friend class resource;//Theses classes need access to internal structure for optimization. There is recursivity with theses formats
- friend class Reader_File; //For Info member
-
- //Parsing handles
- File__Analyze* Info;
- //Internet__Base* Internet;
- #if !defined(MEDIAINFO_READER_NO)
- Reader__Base* Reader;
- #endif //defined(MEDIAINFO_READER_NO)
-
- //Helpers
- void CreateDummy (const String& Value); //Create dummy Information
- MediaInfo_Internal(const MediaInfo_Internal&); // Copy Constructor
-
- //Open Buffer
- bool Info_IsMultipleParsing;
-
- //Config
- std::vector<std::vector<ZtringList> > Stream;
- std::vector<std::vector<ZtringListList> > Stream_More;
- Ztring Details;
- void Traiter(Ztring &C); //enleve les $if...
-
-public :
- bool SelectFromExtension (const String &Parser); //Select File_* from the parser name
- void TestContinuousFileNames();
- #if MEDIAINFO_EVENTS
- void Event_Prepare (struct MediaInfo_Event_Generic* Event);
- #endif // MEDIAINFO_EVENTS
- #if !defined(MEDIAINFO_READER_NO)
- int ListFormats(const String &File_Name=String());
- #else //!defined(MEDIAINFO_READER_NO)
- int ListFormats(const String &File_Name=String()) {return 0;}
- #endif //!defined(MEDIAINFO_READER_NO)
- MediaInfo_Config_MediaInfo Config;
-
- Ztring Xml_Name_Escape(const Ztring &Name);
- Ztring Xml_Content_Escape(const Ztring &Content, size_t &Modified);
- Ztring &Xml_Content_Escape_Modifying(Ztring &Content, size_t &Modified);
-
-private :
- //Threading
- size_t BlockMethod; //Open() return: 0=immedialtly, 1=after local info, 2=when user interaction is needed
- bool IsInThread;
- void Entry();
- ZenLib::CriticalSection CS;
-
- #ifdef MEDIAINFO_DEBUG_CONFIG
- File Debug_Config;
- #endif //MEDIAINFO_DEBUG_CONFIG
- #ifdef MEDIAINFO_DEBUG_BUFFER
- File Debug_Buffer_Stream;
- int64u Debug_Buffer_Stream_Order;
- File Debug_Buffer_Sizes;
- int64u Debug_Buffer_Sizes_Count;
- #endif //MEDIAINFO_DEBUG_BUFFER
- #ifdef MEDIAINFO_DEBUG_OUTPUT
- map<void*, File> Debug_Output_Value_Stream; //Key is the memory address
- map<void*, File> Debug_Output_Value_Sizes; //Key is the memory address
- vector<File*> Debug_Output_Pos_Stream; //Key is the pos
- vector<File*> Debug_Output_Pos_Sizes; //Key is the pos
- vector<void*> Debug_Output_Pos_Pointer; //Key is the pos
- #endif //MEDIAINFO_DEBUG_OUTPUT
-};
-
-} //NameSpace
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Internal_Const.h b/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Internal_Const.h
deleted file mode 100644
index a69168b9e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/MediaInfo_Internal_Const.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Global configuration of MediaInfo
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Internal_ConstH
-#define MediaInfo_Internal_ConstH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Const.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-/// @brief Used with Format info
-enum infoformat_t
-{
- InfoFormat_Name, ///<
- InfoFormat_LongName, ///<
- InfoFormat_Family, ///<
- InfoFormat_KindofFormat, ///<
- InfoFormat_Parser, ///<
- InfoFormat_Info, ///<
- InfoFormat_Extensions, ///<
- InfoFormat_InternetMediaType, ///<
- InfoFormat_Url, ///<
- InfoFormat_Compression_Mode, ///<
- InfoFormat_Max
-};
-
-/// @brief Used with Codec ID info
-enum infocodecid_t
-{
- InfoCodecID_Codec, ///<
- InfoCodecID_Format, ///<
- InfoCodecID_Hint, ///<
- InfoCodecID_Description, ///<
- InfoCodecID_Url, ///<
- InfoCodecID_Profile, ///<
- InfoCodecID_Version, ///<
- InfoCodecID_ColorSpace, ///<
- InfoCodecID_ChromaSubsampling, ///<
- InfoCodecID_BitDepth, ///<
- InfoCodecID_Compression_Mode, ///<
- InfoCodecID_Max
-};
-
-/// @brief Used with Codec ID info (Format type part)
-enum infocodecid_format_t
-{
- InfoCodecID_Format_Matroska, ///<
- InfoCodecID_Format_Mpeg4, ///<
- InfoCodecID_Format_Real, ///<
- InfoCodecID_Format_Riff, ///<
- InfoCodecID_Format_Max
-};
-
-/// @brief Used with Codec info
-enum infocodec_t
-{
- InfoCodec_Codec, ///<
- InfoCodec_Name, ///<
- InfoCodec_KindOfCode, ///<
- InfoCodec_KindOfStream, ///<
- InfoCodec_KindofCodec, ///<
- InfoCodec_BitRate_Mode, ///<
- InfoCodec_Description, ///<
- InfoCodec_Url, ///<
- InfoCodec_Max
-};
-
-/// @brief Used with Encoder info
-enum infoencoder_t
-{
- InfoEncoder_Name, ///<
- InfoEncoder_LongName, ///<
- InfoEncoder_Date, ///<
- InfoEncoder_Max
-};
-
-/// @brief Used with Library info
-enum infolibrary_t
-{
- InfoLibrary_Numlber, ///<
- InfoLibrary_Version, ///<
- InfoLibrary_Date, ///<
- InfoLibrary_Max
-};
-
-/// @brief Used with Library info (Format type part)
-enum infolibrary_format_t
-{
- InfoLibrary_Format_DivX, ///<
- InfoLibrary_Format_XviD, ///<
- InfoLibrary_Format_MainConcept_Avc, ///<
- InfoLibrary_Format_VorbisCom, ///<
- InfoLibrary_Format_Max
-};
-
-/// @brief Used by BlockMethod
-enum blockmethod_t
-{
- BlockMethod_Now, ///< Return now, without parsing (init only)
- BlockMethod_Often, ///< Return as often as possible
- BlockMethod_Local, ///< Return after local parsing (no Internet connection)
- BlockMethod_Needed, ///< Return when a user interaction is needed
- BlockMethod_Max
-};
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-//Char types
-#if defined(UNICODE) || defined (_UNICODE)
- typedef wchar_t Char;
- #undef __T
- #define __T(__x) L ## __x
-#else
- typedef char Char;
- #undef __T
- #define __T(__x) __x
-#endif
-//---------------------------------------------------------------------------
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Aaf.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Aaf.cpp
deleted file mode 100644
index f88975057..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Aaf.cpp
+++ /dev/null
@@ -1,656 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AAF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Aaf.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "ZenLib/FileName.h"
-#include "ZenLib/File.h"
-#include "tinyxml2.h"
-using namespace ZenLib;
-using namespace tinyxml2;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-const char* AAf_tagSTGTY (int8u tagSTGTY)
-{
- switch (tagSTGTY)
- {
- case 0 : return "unknown";
- case 1 : return "storage";
- case 2 : return "stream";
- case 3 : return "ILockBytes";
- case 4 : return "IPropertyStorage";
- case 5 : return "root";
- default: return "";
- }
-}
-
-const char* AAf_tagDECOLOR (int8u tagDECOLOR)
-{
- switch (tagDECOLOR)
- {
- case 0 : return "red";
- case 1 : return "black";
- default: return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Aaf::File_Aaf()
-:File__Analyze()
-{
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Aaf;
- StreamIDs_Width[0]=16;
- #endif //MEDIAINFO_EVENTS
-
- //Temp
- ReferenceFiles=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_Aaf::~File_Aaf()
-{
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- delete Streams[Pos];
-
- delete ReferenceFiles; //ReferenceFiles=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aaf::Streams_Finish()
-{
- if (ReferenceFiles==NULL)
- return;
-
- ReferenceFiles->ParseReferences();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_Aaf::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- if (ReferenceFiles==NULL)
- return 0;
-
- return ReferenceFiles->Seek(Method, Value, ID);
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Aaf::FileHeader_Begin()
-{
- if (File_Size<0x100)
- {
- Reject("Aaf");
- return false;
- }
-
- //Element_Size
- if (Buffer_Size<0x18)
- return false; //Must wait for more data
-
- if (Buffer[ 0x0]!=0xD0
- || Buffer[ 0x1]!=0xCF
- || Buffer[ 0x2]!=0x11
- || Buffer[ 0x3]!=0xE0
- || Buffer[ 0x4]!=0xA1
- || Buffer[ 0x5]!=0xB1
- || Buffer[ 0x6]!=0x1A
- || Buffer[ 0x7]!=0xE1
- || Buffer[ 0x8]!=0x41
- || Buffer[ 0x9]!=0x41
- || Buffer[ 0xA]!=0x46
- || Buffer[ 0xB]!=0x42
- || Buffer[ 0xC]!=0x0D
- || Buffer[ 0xD]!=0x00
- || Buffer[ 0xE]!=0x4F
- || Buffer[ 0xF]!=0x4D
- || Buffer[0x10]!=0x06
- || Buffer[0x11]!=0x0E
- || Buffer[0x12]!=0x2B
- || Buffer[0x13]!=0x34
- || Buffer[0x14]!=0x01
- || Buffer[0x15]!=0x01
- || Buffer[0x16]!=0x01
- || Buffer[0x17]!=0xFF)
- {
- Reject("Aaf");
- return false;
- }
-
- //Element_Size
- if (Buffer_Size<File_Size)
- return false; //Must wait for more data
-
- //Accept the file
- Accept("Aaf");
- Fill(Stream_General, 0, General_Format, "AAF");
-
- Step=Step_None;
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
-
- //All should be OK...
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::Read_Buffer_Continue()
-{
- if (File_Offset || Buffer_Offset)
- return;
-
- //Parsing
- Element_Begin1("Header");
- int32u csectFat;
- int16u DllVersion, ByteOrder;
- Skip_B8( "abSig");
- Skip_B16( "clsid");
- Skip_L2( "MinorVersion");
- Get_L2 (DllVersion, "DllVersion");
- Get_L2 (ByteOrder, "ByteOrder");
- Get_L2 (SectorShift, "SectorShift");
- Get_L2 (MiniSectorShift, "MiniSectorShift");
- Skip_L2( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "csectDir");
- Get_L4 (csectFat, "csectFat");
- Get_L4 (sectDirStart, "sectDirStart");
- Skip_L4( "signature");
- Get_L4 (MiniSectorCutoff, "MiniSectorCutoff");
- Get_L4 (sectMiniFatStart, "sectMiniFatStart");
- Skip_L4( "csectMiniFat");
- Skip_L4( "sectDifStart");
- Skip_L4( "sectDif");
- Element_Begin1("sectFat");
- for (int16u Pos=0; Pos<(csectFat>109?109:csectFat); Pos++)
- {
- int32u sectFat;
- Get_L4 (sectFat, "sectFat");
- sectsFat.push_back(sectFat);
- }
- if (csectFat<109)
- Skip_XX((109-csectFat)*4, "unused sectsFat");
- Element_End();
- Element_End();
-
- FILLING_BEGIN();
- Fill("Aaf");
- Step=Step_Fat;
- sectsFat_Pos=0;
- if (sectsFat.empty())
- {
- Finish();
- }
- else
- GoTo((1+sectsFat[0])*(1<<SectorShift));
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aaf::Header_Parse()
-{
- switch (Step)
- {
- case Step_Fat : Header_Fill_Code(0, "FAT");
- Header_Fill_Size(((int64u)1) << SectorShift);
- break;
- case Step_MiniFat : Header_Fill_Code(0, "MiniFAT");
- Header_Fill_Size(((int64u)1) << SectorShift);
- break;
- case Step_Directory : Header_Fill_Code(0, "Directory");
- Header_Fill_Size(((int64u)1) << SectorShift);
- break;
- case Step_Stream : Header_Fill_Code(0, "Stream");
- Header_Fill_Size(((int64u)1) << (Streams[0]->Size<MiniSectorCutoff ? MiniSectorShift : SectorShift));
- break;
- default : ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::Data_Parse()
-{
- //Parsing
- switch (Step)
- {
- case Step_Fat : Fat(); return;
- case Step_MiniFat : MiniFat(); break;
- case Step_Directory : Directory(); break;
- case Step_Stream : StreamElement(); return;
- default : Skip_XX(Element_Size, "Unknown");
- }
-
- size_t Pointers_Pos=(size_t)((File_Offset+Buffer_Offset)>>SectorShift)-1;
- if (Pointers_Pos<Pointers.size())
- {
- if (Pointers[Pointers_Pos]<0xFFFFFFF0)
- GoTo((1+Pointers[Pointers_Pos])*(1<<SectorShift));
- else if (Step==Step_MiniFat)
- {
- Step=Step_Directory;
- Directory_Pos=0;
- GoTo((1+sectDirStart)*(1<<SectorShift));
- }
- else if (Step==Step_Directory)
- {
- Step=Step_Stream;
- if (Streams.empty())
- Finish();
- else
- {
- Streams_Pos=0;
- Streams_Pos2=0;
- GoTo(Streams[0]->StreamOffsets[0]);
- }
- }
- else
- Finish();
- }
- else
- Finish();
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::Fat()
-{
- //Parsing
- while (Element_Offset<Element_Size)
- {
- int32u Pointer;
- Get_L4 (Pointer, "Pointer"); Param_Info1(Ztring::ToZtring(Pointers.size()));
- //Pointer=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- //Element_Offset+=4;
- Pointers.push_back(Pointer);
- }
-
- //Next FAT sector or next step
- sectsFat_Pos++;
- if (sectsFat_Pos<sectsFat.size())
- GoTo((1+sectsFat[sectsFat_Pos])*(1<<SectorShift));
- else
- {
- Step=Step_MiniFat;
- GoTo((1+sectMiniFatStart)*(1<<SectorShift));
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::MiniFat()
-{
- //Parsing
- while (Element_Offset<Element_Size)
- {
- int32u Pointer;
- Get_L4 (Pointer, "Pointer"); Param_Info1(Ztring::ToZtring(MiniPointers.size()));
- //Pointer=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- //Element_Offset+=4;
- MiniPointers.push_back(Pointer);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::Directory()
-{
- //Parsing
- while (Element_Offset<Element_Size)
- Directory_Entry();
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::Directory_Entry()
-{
- //Parsing
- Element_Begin1("Directory entry");
- Element_Info1(Directory_Pos);
- Ztring ab;
- int64u Size;
- int32u SectStart;
- int8u mse;
- Get_UTF16L(64, ab, "ab"); Element_Info1(ab);
- Skip_L2( "cb");
- Get_L1 (mse, "mse"); Element_Info1(AAf_tagSTGTY(mse));
- Info_L1(flags, "flags"); Element_Info1(AAf_tagDECOLOR(flags));
- Skip_L4( "LeftSib SID");
- Skip_L4( "RightSib SID");
- Skip_L4( mse==2?"0":"Child SID"); //Zero if stream
- Skip_L16( mse==2?"0":"clsId");//Zero if stream
- Skip_L4( "UserFlags");
- Info_L8(CreationTime, mse==2?"0":"Create time"); if (mse!=2) {Param_Info1(CreationTime?Ztring().Date_From_Milliseconds_1601(CreationTime/10000):Ztring());} //Zero if stream
- Info_L8(ModificationTime, mse==2?"0":"Modify time"); if (mse!=2) {Param_Info1(CreationTime?Ztring().Date_From_Milliseconds_1601(ModificationTime/10000):Ztring());} //Zero if stream
- Get_L4 (SectStart, mse==1?"0":"SectStart"); //Zero if storage
- if (SectorShift<=9)
- {
- int32u Size32;
- Get_L4 (Size32, mse==1?"0":"Size"); //Zero if storage
- Skip_L4( "PropType");
- Size=Size32;
-
- }
- else
- {
- Get_L8 (Size, mse==1?"0":"Size"); //Zero if storage
- }
-
- if (mse==5 && Size) //If root
- {
- //Building sectMiniFats_FatPointers
- int32u Pointers_Pos=SectStart;
- while (Pointers_Pos<Pointers.size())
- {
- Param_Info1(Ztring::ToZtring(Pointers_Pos<<SectorShift));
- sectsMiniStream.push_back(Pointers_Pos);
- Pointers_Pos=Pointers[Pointers_Pos];
- }
- }
- else if (mse==2 && Size) //If stream
- {
- Param_Info1("StreamOffset");
- stream* Stream = new stream(
- ab,
- Directory_Pos,
- Size
- );
- if (Size<MiniSectorCutoff) //MiniFAT
- {
- int32u Pointers_Pos=SectStart;
- while (Pointers_Pos<MiniPointers.size())
- {
- int32u SectPos=Pointers_Pos>>(SectorShift-MiniSectorShift);
- int32u MiniSectPos=Pointers_Pos&((((size_t)1)<<(SectorShift-MiniSectorShift))-1);
- Stream->StreamOffsets.push_back(((1+sectsMiniStream[SectPos])<<SectorShift)+(MiniSectPos<<MiniSectorShift));
- Param_Info1(Ztring::ToZtring(((1+sectsMiniStream[SectPos])<<SectorShift)+(MiniSectPos<<MiniSectorShift)));
- Pointers_Pos=MiniPointers[Pointers_Pos];
- }
- }
- else //FAT
- {
- int32u Pointers_Pos=SectStart;
- while (Pointers_Pos<Pointers.size())
- {
- Stream->StreamOffsets.push_back((1+Pointers_Pos)<<SectorShift);
- Param_Info1(Ztring::ToZtring((1+Pointers_Pos)<<SectorShift));
- Pointers_Pos=Pointers[Pointers_Pos];
- }
- }
- Streams.push_back(Stream);
- }
- Element_End0();
-
- Directory_Pos++;
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::StreamElement()
-{
- if (Streams_Pos>=Streams.size() || Streams[Streams_Pos]->Size>=0x1000000) //TODO: more serious test about size
- return; //Incoherancy
-
- //Saving data
- if (Streams[Streams_Pos]->StreamOffsets.size()!=1)
- {
- Skip_XX(Element_Size, "Stream data");
- int16u Shift=(Streams[Streams_Pos]->Size<MiniSectorCutoff?MiniSectorShift:SectorShift);
- if (Streams[Streams_Pos]->Buffer==NULL)
- Streams[Streams_Pos]->Buffer=new int8u[(size_t)((1+(Streams[Streams_Pos]->Size>>Shift))<<Shift)];
- memcpy(Streams[Streams_Pos]->Buffer+Streams_Pos2*(((int64u)1)<<Shift), Buffer+Buffer_Offset, (size_t)Element_Size);
- }
-
- //Next Element
- Streams_Pos2++;
- if (Streams_Pos2>=Streams[Streams_Pos]->StreamOffsets.size())
- {
- Element_Offset=0;
- StreamElement_Parse();
- Streams_Pos++;
- Streams_Pos2=0;
- }
- if (Streams_Pos<Streams.size())
- GoTo(Streams[Streams_Pos]->StreamOffsets[Streams_Pos2]);
- else
- Finish();
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::StreamElement_Parse()
-{
- //Searching emulation_prevention_three_byte
- const int8u* Save_Buffer=Buffer;
- int64u Save_File_Offset=File_Offset;
- size_t Save_Buffer_Offset=Buffer_Offset;
- int64u Save_Element_Size=Element_Size;
-
- if (Streams[Streams_Pos]->Buffer)
- {
- //We must change the buffer for keeping out
- Element_Size=Streams[Streams_Pos]->Size;
- File_Offset=Streams[Streams_Pos]->StreamOffsets[0];
- Buffer_Offset=0;
- Buffer=Streams[Streams_Pos]->Buffer;
- }
-
- //Parsing
- Element_Info1(Streams[Streams_Pos]->Directory_Pos);
- Element_Info1(Streams[Streams_Pos]->Name);
- int16u Count;
- Skip_L2( "0x204C?");
- Get_L2 (Count, "Count");
- vector<int16u> Sizes;
- vector<int16u> Keys;
- for (int16u Pos=0; Pos<Count; Pos++)
- {
- int16u Key, Size;
- Get_L2 (Key, "Key");
- Skip_L2( "Flags?");
- Get_L2 (Size, "Size");
- Sizes.push_back(Size);
- Keys.push_back(Key);
- }
-
- #define ELEMENT(_ELEMENT, _NAME) \
-
- for (int16u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin0();
- xxxSize=Sizes[Pos];
- switch (Keys[Pos])
- {
- case 0x0001 : Element_Name("MetaDictionary"); MetaDictionary(); break;
- case 0x0002 : Element_Name("Header"); Header(); break;
- case 0x0003 : Element_Name("ClassDefinitions"); ClassDefinitions(); break;
- case 0x0004 : Element_Name("TypeDefinitions"); TypeDefinitions(); break;
- case 0x0005 : Element_Name("Identification"); Identification(); break;
- case 0x0006 : Element_Name("Name"); Name(); break;
- case 0x0007 : Element_Name("MetaDefinition"); MetaDefinition(); break;
- case 0x0008 : Element_Name("ParentClass"); ParentClass(); break;
- case 0x0009 : Element_Name("Properties"); Properties(); break;
- case 0x000A : Element_Name("IsConcrete"); IsConcrete(); break;
- case 0x000B : Element_Name("Type"); Type(); break;
- case 0x000C : Element_Name("IsOptional"); IsOptional(); break;
- case 0x000D : Element_Name("LocalIdentification"); LocalIdentification(); break;
- case 0x000E : Element_Name("IsUniqueIdentifier"); IsUniqueIdentifier(); break;
- case 0x000F : Element_Name("Size"); Size(); break;
- case 0x3D02 : Element_Name("Locked"); Locked(); break;
- case 0x4001 : Element_Name("NetworkLocator"); NetworkLocator(); break;
- default : Skip_XX(xxxSize, "Unknown");
- }
- Element_End0();
- }
-
- //
- if (Streams[Streams_Pos]->Buffer)
- {
- //We must change the buffer for keeping out
- Element_Size=Save_Element_Size;
- File_Offset=Save_File_Offset;
- Buffer_Offset=Save_Buffer_Offset;
- delete[] Buffer; Buffer=Save_Buffer;
- Element_Offset=Element_Size;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::MetaDictionary()
-{
- Skip_UTF16L(xxxSize, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::Header()
-{
- Skip_UTF16L(xxxSize, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::ClassDefinitions()
-{
- Skip_UTF16L(xxxSize, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::TypeDefinitions()
-{
- Skip_UTF16L(xxxSize, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::Identification()
-{
- Skip_B8( "Part2");
- Skip_B8( "Part1");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::Name()
-{
- Skip_UTF16L(xxxSize, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::MetaDefinition()
-{
- Skip_UTF16L(xxxSize, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::ParentClass()
-{
- Skip_B5( "WeakReference");
- Skip_B8( "Part2");
- Skip_B8( "Part1");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::Properties()
-{
- Skip_UTF16L(xxxSize, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::IsConcrete()
-{
- Skip_L1( "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::Type()
-{
- Skip_B8( "Part2");
- Skip_B8( "Part1");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::IsOptional()
-{
- Skip_L1( "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::LocalIdentification()
-{
- Skip_L2( "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::IsUniqueIdentifier()
-{
- Skip_L1( "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::Size()
-{
- Skip_L1( "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::Locked()
-{
- Skip_L1( "Data");
-
- //Descriptors[Streams[Streams_Pos]->Directory_Pos].StreamKind=Stream_Audio;
-}
-
-//---------------------------------------------------------------------------
-void File_Aaf::NetworkLocator()
-{
- Ztring Data;
- Get_UTF16L(xxxSize, Data, "Data");
-
- sequence* Sequence=new sequence;
- Sequence->AddFileName(Data);
- ReferenceFiles->AddSequence(Sequence);
-
- //Locators[Streams[Streams_Pos]->Directory_Pos].EssenceLocator=Data;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_AAF_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Aaf.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Aaf.h
deleted file mode 100644
index f7efe1821..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Aaf.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about AAF files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_AafH
-#define MediaInfo_File_AafH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_Aaf
-//***************************************************************************
-
-class File_Aaf : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Aaf();
- ~File_Aaf();
-
-private :
- //Streams management
- void Streams_Finish ();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
- void Read_Buffer_Continue ();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void FatSect();
- void Fat();
- void MiniFat();
- void Directory();
- void Directory_Entry();
- void StreamElement();
- void StreamElement_Parse();
-
- void MetaDictionary(); //0x0001
- void Header(); //0x0002
- void ClassDefinitions(); //0x0003
- void TypeDefinitions(); //0x0004
- void Identification(); //0x0005
- void Name(); //0x0006
- void MetaDefinition(); //0x0007
- void ParentClass(); //0x0008
- void Properties(); //0x0009
- void IsConcrete(); //0x000A
- void Type(); //0x000B
- void IsOptional(); //0x000C
- void LocalIdentification(); //0x000D
- void IsUniqueIdentifier(); //0x000E
- void Size(); //0x000F
- void Locked(); //0x3D02
- void NetworkLocator(); //0x4001
-
- //Temp
- int16u xxxSize;
- int16u SectorShift;
- int16u MiniSectorShift;
- int32u sectMiniFatStart;
- int32u sectDirStart;
- int32u MiniSectorCutoff;
- typedef enum step
- {
- Step_None,
- Step_Fat,
- Step_MiniFat,
- Step_Directory,
- Step_Stream,
- } step;
- step Step;
- vector<int32u> sectsFat;
- vector<int32u> sectsMiniStream;
- vector<int32u> Pointers;
- vector<int32u> MiniPointers;
- typedef struct stream
- {
- Ztring Name;
- size_t Directory_Pos;
- int32u ChildSID;
- int64u Size;
- int8u* Buffer;
- vector<int32u> StreamOffsets;
-
- stream(const Ztring Name_, size_t Directory_Pos_, int64u Size_)
- :
- Name(Name_),
- Directory_Pos(Directory_Pos_),
- ChildSID((int32u)-1),
- Size(Size_),
- Buffer(NULL)
- {
- }
-
- private:
- stream &operator=(const stream &v);
- stream();
- } stream;
- vector<stream*> Streams;
- size_t sectsFat_Pos;
- size_t Streams_Pos;
- size_t Streams_Pos2;
- size_t Directory_Pos;
- File__ReferenceFilesHelper* ReferenceFiles;
-
- //Descriptor
- /*
- struct descriptor
- {
- stream_t StreamKind;
- int32u ChildSID;
-
- descriptor()
- {
- StreamKind=Stream_Max;
- ChildSID=(int32u)-1;
- }
- };
- typedef std::map<int32u, descriptor> descriptors; //Key is Directory_Pos of Descriptor
- descriptors Descriptors;
- */
-
- //Locator
- /*
- struct locator
- {
- Ztring EssenceLocator;
- };
- typedef std::map<int32u, locator> locators; //Key is Directory_Pos of the locator
- locators Locators;
- */
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ancillary.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ancillary.cpp
deleted file mode 100644
index 3abb6d1ca..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ancillary.cpp
+++ /dev/null
@@ -1,1024 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_ANCILLARY_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Ancillary.h"
-#if defined(MEDIAINFO_CDP_YES)
- #include "MediaInfo/Text/File_Cdp.h"
-#endif
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-#if defined(MEDIAINFO_TIMECODE_YES)
- #include "MediaInfo/Multiple/File_Gxf_TimeCode.h"
-#endif
-#if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- #include "MediaInfo/Text/File_AribStdB24B37.h"
-#endif
-#if defined(MEDIAINFO_SDP_YES)
- #include "MediaInfo/Text/File_Sdp.h"
-#endif
-#if defined(MEDIAINFO_MXF_YES)
- #include "MediaInfo/Multiple/File_Mxf.h"
-#endif
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include <cstring>
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-namespace MediaInfoLib
-{
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-const char* Ancillary_DataID(int8u DataID, int8u SecondaryDataID)
-{
- // TODO: check http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.1364-2-201003-I!!PDF-E.pdf
- switch (DataID)
- {
- case 0x00 : return "Undefined";
- case 0x08 :
- switch (SecondaryDataID)
- {
- case 0x0C : return "MPEG-2 Recoding Information"; //SMPTE ST 353
- default : return "(Reserved for 8-bit applications)";
- }
- break;
- case 0x40 :
- switch (SecondaryDataID)
- {
- case 0x01 : //SMPTE ST 305
- case 0x02 : return "SDTI"; //SMPTE ST 348
- case 0x04 : //SMPTE ST 427
- case 0x05 : //SMPTE ST 427
- case 0x06 : return "Link Encryption Key"; //SMPTE ST 427
- default : return "(Internationally registered)";
- }
- break;
- case 0x41 :
- switch (SecondaryDataID)
- {
- case 0x01 : return "Payload identifier"; //SMPTE ST 352
- case 0x05 : return "Bar Data"; //SMPTE ST 2016
- case 0x06 : return "Pan-Scan Information"; //SMPTE ST 2016
- case 0x07 : return "ANSI/SCTE 104 Messages"; //SMPTE ST 2010
- case 0x08 : return "DVB/SCTE VBI Data"; //SMPTE ST 2031
- default : return "(Internationally registered)";
- }
- break;
- case 0x43 :
- switch (SecondaryDataID)
- {
- case 0x02 : return "SDP"; //OP-47 SDP, also RDD 8
- case 0x03 : return "Multipacket"; //OP-47 Multipacket, also RDD 8
- case 0x05 : return "Acquisition Metadata"; //RDD 18
- default : return "(Internationally registered)";
- }
- break;
- case 0x44 :
- switch (SecondaryDataID)
- {
- case 0x44 : return "ISAN or UMID"; //SMPTE RP 223
- default : return "(Internationally registered)";
- }
- break;
- case 0x45 :
- //SMPTE 2020-1-2008
- switch (SecondaryDataID)
- {
- case 0x01 : return "Audio Metadata - No association";
- case 0x02 : return "Audio Metadata - Channels 1/2";
- case 0x03 : return "Audio Metadata - Channels 3/4";
- case 0x04 : return "Audio Metadata - Channels 5/6";
- case 0x05 : return "Audio Metadata - Channels 7/8";
- case 0x06 : return "Audio Metadata - Channels 9/10";
- case 0x07 : return "Audio Metadata - Channels 11/12";
- case 0x08 : return "Audio Metadata - Channels 13/14";
- case 0x09 : return "Audio Metadata - Channels 15/16";
- default : return "(Internationally registered)";
- }
- break;
- case 0x46 :
- switch (SecondaryDataID)
- {
- case 0x01 : return "Two-Frame Marker"; //SMPTE RP 2051
- default : return "(Internationally registered)";
- }
- break;
- case 0x50 :
- switch (SecondaryDataID)
- {
- case 0x01 : return "WSS"; //RDD 8
- default : return "(Reserved)";
- }
- break;
- case 0x51 :
- switch (SecondaryDataID)
- {
- case 0x01 : return "Film Transfer and Video Production Information"; //RP 215
- default : return "(Reserved)";
- }
- break;
- case 0x5F :
- switch (SecondaryDataID&0xF0)
- {
- case 0xD0 : return "ARIB STD B37"; //ARIB STD B37
- default : return "(Reserved)";
- }
- break;
- case 0x60 :
- switch (SecondaryDataID)
- {
- case 0x60 : return "ATC"; //SMPTE RP 188 / SMPTE ST 12-2
- default : return "(Internationally registered)";
- }
- break;
- case 0x61 :
- switch (SecondaryDataID)
- {
- case 0x01 : return "CDP"; //SMPTE 334
- case 0x02 : return "CEA-608"; //SMPTE 334
- default : return "(Internationally registered)";
- }
- break;
- case 0x62 :
- switch (SecondaryDataID)
- {
- case 0x01 : return "Program description"; //SMPTE 334
- case 0x02 : return "Data broadcast"; //SMPTE 334
- case 0x03 : return "VBI data"; //SMPTE 334
- default : return "(Internationally registered)";
- }
- break;
- case 0x64 :
- switch (SecondaryDataID)
- {
- case 0x64 : return "LTC"; //SMPTE RP 196
- case 0x6F : return "VITC"; //SMPTE RP 196
- default : return "(Internationally registered)";
- }
- break;
- case 0x80 : return "Marked for deletion";
- case 0x84 : return "Data end marker";
- case 0x88 : return "Data start marker";
- default :
- if (DataID<=0x03)
- return "(Reserved)";
- else if (DataID<=0x0F)
- return "(Reserved for 8-bit applications)";
- else if (DataID<=0x3F)
- return "(Reserved)";
- else if (DataID<=0x4F)
- return "(Internationally registered)";
- else if (DataID<=0x5F)
- return "(Reserved)";
- else if (DataID<=0x7F)
- return "(Internationally registered)";
- else if (DataID<=0x83)
- return "(Reserved)";
- else if (DataID<=0x87)
- return "(Reserved)";
- else if (DataID<=0x9F)
- return "(Reserved)";
- else if (DataID<=0xBF)
- return "(Internationally registered)";
- else if (DataID<=0xCF)
- return "User application";
- else
- return "(Internationally registered)";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Ancillary::File_Ancillary()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("Ancillary");
- PTS_DTS_Needed=true;
-
- //In
- WithTenBit=false;
- WithChecksum=false;
- HasBFrames=false;
- InDecodingOrder=false;
- LineNumber_IsSecondField=false;
- AspectRatio=0;
- FrameRate=0;
- LineNumber=(int32u)-1;
- #if defined(MEDIAINFO_CDP_YES)
- Cdp_Parser=NULL;
- #endif //defined(MEDIAINFO_CDP_YES)
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- AribStdB34B37_Parser=NULL;
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- #if defined(MEDIAINFO_SDP_YES)
- Sdp_Parser=NULL;
- #endif //defined(MEDIAINFO_SDP_YES)
- #if defined(MEDIAINFO_MXF_YES)
- Rdd18_Parser=NULL;
- #endif //defined(MEDIAINFO_MXF_YES)
-}
-
-//---------------------------------------------------------------------------
-File_Ancillary::~File_Ancillary()
-{
- #if defined(MEDIAINFO_CDP_YES)
- delete Cdp_Parser; //Cdp_Parser=NULL;
- for (size_t Pos=0; Pos<Cdp_Data.size(); Pos++)
- delete Cdp_Data[Pos]; //Cdp_Data[Pos]=NULL;
- #endif //defined(MEDIAINFO_CDP_YES)
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- for (size_t Pos=0; Pos<AfdBarData_Data.size(); Pos++)
- delete AfdBarData_Data[Pos]; //AfdBarData_Data[Pos]=NULL;
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- delete AribStdB34B37_Parser; //AribStdB34B37_Parser=NULL;
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- #if defined(MEDIAINFO_SDP_YES)
- delete Sdp_Parser; //Sdp_Parser=NULL;
- #endif //defined(MEDIAINFO_SDP_YES)
- #if defined(MEDIAINFO_MXF_YES)
- delete Rdd18_Parser; //Rdd18_Parser=NULL;
- #endif //defined(MEDIAINFO_MXF_YES)
-}
-
-//---------------------------------------------------------------------------
-void File_Ancillary::Streams_Finish()
-{
- #if defined(MEDIAINFO_CDP_YES)
- if (Cdp_Parser && !Cdp_Parser->Status[IsFinished] && Cdp_Parser->Status[IsAccepted])
- {
- Finish(Cdp_Parser);
- for (size_t StreamPos=0; StreamPos<Cdp_Parser->Count_Get(Stream_Text); StreamPos++)
- {
- Merge(*Cdp_Parser, Stream_Text, StreamPos, StreamPos);
- Ztring MuxingMode=Cdp_Parser->Retrieve(Stream_Text, StreamPos, "MuxingMode");
- Fill(Stream_Text, StreamPos, "MuxingMode", __T("Ancillary data / ")+MuxingMode, true);
- }
-
- Ztring LawRating=Cdp_Parser->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=Cdp_Parser->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
- }
- #endif //defined(MEDIAINFO_CDP_YES)
-
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (AribStdB34B37_Parser && !AribStdB34B37_Parser->Status[IsFinished] && AribStdB34B37_Parser->Status[IsAccepted])
- {
- Finish(AribStdB34B37_Parser);
- for (size_t StreamPos=0; StreamPos<AribStdB34B37_Parser->Count_Get(Stream_Text); StreamPos++)
- {
- Merge(*AribStdB34B37_Parser, Stream_Text, StreamPos, StreamPos);
- Ztring MuxingMode=AribStdB34B37_Parser->Retrieve(Stream_Text, StreamPos, "MuxingMode");
- Fill(Stream_Text, StreamPos, "MuxingMode", __T("Ancillary data / ")+MuxingMode, true);
- }
- }
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
-
- #if defined(MEDIAINFO_SDP_YES)
- if (Sdp_Parser && !Sdp_Parser->Status[IsFinished] && Sdp_Parser->Status[IsAccepted])
- {
- Finish(Sdp_Parser);
- for (size_t StreamPos=0; StreamPos<Sdp_Parser->Count_Get(Stream_Text); StreamPos++)
- {
- Merge(*Sdp_Parser, Stream_Text, StreamPos, StreamPos);
- Ztring MuxingMode=Sdp_Parser->Retrieve(Stream_General, 0, General_Format);
- Fill(Stream_Text, StreamPos, "MuxingMode", __T("Ancillary data / OP-47 / ")+MuxingMode, true);
- }
- }
- #endif //defined(MEDIAINFO_SDP_YES)
-
- #if defined(MEDIAINFO_MXF_YES)
- if (Rdd18_Parser && !Rdd18_Parser->Status[IsFinished] && Rdd18_Parser->Status[IsAccepted])
- {
- Finish(Rdd18_Parser);
- for (size_t StreamPos=0; StreamPos<Rdd18_Parser->Count_Get(Stream_Other); StreamPos++)
- {
- Merge(*Rdd18_Parser, Stream_Other, StreamPos, StreamPos);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "Acquisition Metadata", Unlimited, true, true);
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / RDD 18");
- }
- }
- #endif //defined(MEDIAINFO_MXF_YES)
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Ancillary::Synchronize()
-{
- //Synchronizing
- while (Buffer_Offset+6<=Buffer_Size && ( Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+ 1]!=0xFF
- || Buffer[Buffer_Offset+ 2]!=0xFF))
- Buffer_Offset++;
-
- if (!Status[IsAccepted])
- {
- Accept();
-
- Fill(Stream_General, 0, General_Format, "Ancillary");
- }
-
- //Synched is OK
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Ancillary::Synched_Test()
-{
- Synchronize(); //This is not always in synch directly, there may be some garbage
-
- //Must have enough buffer for having header
- if (Buffer_Offset+6>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (CC3(Buffer+Buffer_Offset)!=0x00FFFF)
- Synched=false;
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ancillary::Read_Buffer_Continue()
-{
- if (!Cdp_Data.empty() && AspectRatio && FrameRate)
- {
- ((File_Cdp*)Cdp_Parser)->AspectRatio=AspectRatio;
- for (size_t Pos=0; Pos<Cdp_Data.size(); Pos++)
- {
- if (Cdp_Parser->PTS_DTS_Needed)
- Cdp_Parser->FrameInfo.DTS=FrameInfo.DTS-(Cdp_Data.size()-Pos)*FrameInfo.DUR;
- Open_Buffer_Continue(Cdp_Parser, Cdp_Data[Pos]->Data, Cdp_Data[Pos]->Size);
- delete Cdp_Data[Pos]; //Cdp_Data[0]=NULL;
- }
- Cdp_Data.clear();
- }
-
- if (Element_Size==0)
- {
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- //Keeping only one, TODO: parse it without video stream
- for (size_t Pos=1; Pos<AfdBarData_Data.size(); Pos++)
- delete AfdBarData_Data[Pos]; //AfdBarData_Data[0]=NULL;
- if (!AfdBarData_Data.empty())
- AfdBarData_Data.resize(1);
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
-
- return;
- }
-
- if (!Status[IsAccepted] && !MustSynchronize)
- Accept();
-}
-
-//---------------------------------------------------------------------------
-void File_Ancillary::Read_Buffer_AfterParsing()
-{
- Buffer_Offset=Buffer_Size; //This is per frame
-
- Frame_Count++;
- Frame_Count_InThisBlock++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
-}
-
-//---------------------------------------------------------------------------
-void File_Ancillary::Read_Buffer_Unsynched()
-{
- #if defined(MEDIAINFO_CDP_YES)
- for (size_t Pos=0; Pos<Cdp_Data.size(); Pos++)
- delete Cdp_Data[Pos]; //Cdp_Data[Pos]=NULL;
- Cdp_Data.clear();
- if (Cdp_Parser)
- Cdp_Parser->Open_Buffer_Unsynch();
- #endif //defined(MEDIAINFO_CDP_YES)
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- for (size_t Pos=0; Pos<AfdBarData_Data.size(); Pos++)
- delete AfdBarData_Data[Pos]; //AfdBarData_Data[Pos]=NULL;
- AfdBarData_Data.clear();
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (AribStdB34B37_Parser)
- AribStdB34B37_Parser->Open_Buffer_Unsynch();
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- #if defined(MEDIAINFO_SDP_YES)
- if (Sdp_Parser)
- Sdp_Parser->Open_Buffer_Unsynch();
- #endif //defined(MEDIAINFO_SDP_YES)
- #if defined(MEDIAINFO_MXF_YES)
- if (Rdd18_Parser)
- Rdd18_Parser->Open_Buffer_Unsynch();
- #endif //defined(MEDIAINFO_MXF_YES)
- AspectRatio=0;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ancillary::Header_Parse()
-{
- //Parsing
- if (MustSynchronize)
- {
- if (WithTenBit)
- {
- Skip_L2( "Ancillary data flag");
- Skip_L2( "Ancillary data flag");
- Skip_L2( "Ancillary data flag");
- }
- else
- {
- Skip_L1( "Ancillary data flag");
- Skip_L1( "Ancillary data flag");
- Skip_L1( "Ancillary data flag");
- }
- }
- Get_L1 (DataID, "Data ID");
- if (WithTenBit)
- Skip_L1( "Parity+Unused"); //even:1, odd:2
- Get_L1 (SecondaryDataID, "Secondary Data ID"); Param_Info1(Ancillary_DataID(DataID, SecondaryDataID));
- if (WithTenBit)
- Skip_L1( "Parity+Unused"); //even:1, odd:2
- Get_L1 (DataCount, "Data count");
- if (WithTenBit)
- Skip_L1( "Parity+Unused"); //even:1, odd:2
-
- //Test (in some container formats, Cheksum is present sometimes)
- bool WithChecksum_Temp=WithChecksum;
- if (!MustSynchronize && !WithChecksum && (size_t)((3+DataCount+1)*(WithTenBit?2:1))==Buffer_Size)
- WithChecksum_Temp=true;
-
- //Filling
- Header_Fill_Code((((int16u)DataID)<<8)|SecondaryDataID, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- Header_Fill_Size(((MustSynchronize?3:0)+3+DataCount+(WithChecksum_Temp?1:0))*(WithTenBit?2:1));
-}
-
-//---------------------------------------------------------------------------
-void File_Ancillary::Data_Parse()
-{
- Element_Info1(Ancillary_DataID(DataID, SecondaryDataID));
-
- //Buffer
- int8u* Payload=new int8u[DataCount];
- Element_Begin1("Raw data");
- for(int8u Pos=0; Pos<DataCount; Pos++)
- {
- Get_L1 (Payload[Pos], "Data");
- if (WithTenBit)
- Skip_L1( "Parity+Unused"); //even:1, odd:2
- }
-
- //Parsing
- if (WithChecksum)
- Skip_L1( "Checksum");
- if (WithTenBit)
- Skip_L1( "Parity+Unused"); //even:1, odd:2
- Element_End0();
-
- FILLING_BEGIN();
- switch (DataID)
- {
- case 0x08 :
- switch (SecondaryDataID)
- {
- case 0x0C : // (from SMPTE ST 353)
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "MPEG-2 Recoding Information");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE ST 353");
- }
- break;
- default :
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- }
- break;
- case 0x40 :
- switch (SecondaryDataID)
- {
- case 0x01 : // (from SMPTE ST 305)
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "SDTI");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE ST 305");
- }
- break;
- case 0x02 : // (from SMPTE ST 348)
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "SDTI");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE ST 348");
- }
- break;
- case 0x04 :
- case 0x05 :
- case 0x06 : // (from SMPTE ST 427)
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "Link Encryption Key");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE ST 427");
- }
- break;
- default :
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- }
- break;
- case 0x41 :
- switch (SecondaryDataID)
- {
- case 0x01 : //SMPTE ST 352
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "Payload identifier");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE ST 352");
- }
- break;
- case 0x05 : //Bar Data (from SMPTE 2016-3), saving data for future use
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- {
- buffered_data* AfdBarData=new buffered_data;
- AfdBarData->Data=new int8u[(size_t)DataCount];
- std::memcpy(AfdBarData->Data, Payload, (size_t)DataCount);
- AfdBarData->Size=(size_t)DataCount;
- AfdBarData_Data.push_back(AfdBarData);
- }
- #endif //MEDIAINFO_AFDBARDATA_YES
- break;
- case 0x06 : //SMPTE ST 2016
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "Pan-Scan Information");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE ST 2016");
- }
- break;
- case 0x07 : //SMPTE ST 2010
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "ANSI/SCTE 104 Messages");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE ST 2010");
- }
- break;
- case 0x08 : //SMPTE ST 2031
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "DVB/SCTE VBI Data");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE ST 2031");
- }
- break;
- default :
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- }
- break;
- case 0x43 :
- switch (SecondaryDataID)
- {
- case 0x02 : //OP-47 SDP, also RDD 8
- /*
- if (Count_Get(Stream_Text)==0)
- {
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, StreamPos_Last, Text_Format, "Teletext Subtitle");
- Fill(Stream_Text, StreamPos_Last, Text_MuxingMode, "Ancillary data / OP-47 / SDP");
- }
- */
- #if defined(MEDIAINFO_SDP_YES)
- if (Sdp_Parser==NULL)
- {
- Sdp_Parser=new File_Sdp;
- Open_Buffer_Init(Sdp_Parser);
- }
- if (!Sdp_Parser->Status[IsFinished])
- {
- if (Sdp_Parser->PTS_DTS_Needed)
- Sdp_Parser->FrameInfo=FrameInfo;
- Open_Buffer_Continue(Sdp_Parser, Payload, (size_t)DataCount);
- }
- #endif //defined(MEDIAINFO_SDP_YES)
- break;
- case 0x03 : //OP-47 Multipacket, also RDD 8
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / OP-47 / Multipacket");
- }
- break;
- case 0x05 : //RDD 18
- #if defined(MEDIAINFO_MXF_YES)
- if (Rdd18_Parser==NULL)
- {
- Rdd18_Parser=new File_Mxf;
- Open_Buffer_Init(Rdd18_Parser);
- }
- if (!Rdd18_Parser->Status[IsFinished])
- Open_Buffer_Continue(Rdd18_Parser, Payload+1, (size_t)DataCount-1);
- #endif //defined(MEDIAINFO_MXF_YES)
-
- /*
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "Acquisition Metadata");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / RDD 18");
- Merge(*Parser, Stream_Other, 0, StreamPos_Last);
- }
- */
- break;
- default :
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- }
- break;
- case 0x44 :
- switch (SecondaryDataID)
- {
- case 0x44 : //SMPTE RP 223
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- switch (DataCount)
- {
- case 0x19: Fill(Stream_Other, StreamPos_Last, Other_Format, "ISAN"); break;
- case 0x20:
- case 0x40: Fill(Stream_Other, StreamPos_Last, Other_Format, "UMID"); break;
- }
-
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE RP 223");
- }
- break;
- default :
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- }
- break;
- case 0x45 : // (from SMPTE 2020-1)
- switch (SecondaryDataID)
- {
- case 0x01 : //No association
- case 0x02 : //Channel pair 1/2
- case 0x03 : //Channel pair 3/4
- case 0x04 : //Channel pair 5/6
- case 0x05 : //Channel pair 7/8
- case 0x06 : //Channel pair 9/10
- case 0x07 : //Channel pair 11/12
- case 0x08 : //Channel pair 13/14
- case 0x09 : //Channel pair 15/16
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "Audio Metadata");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE ST 2020");
- }
- break;
- default :
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- }
- break;
- case 0x46 :
- switch (SecondaryDataID)
- {
- case 0x01 : // (from SMPTE ST 2051)
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "Two-Frame Marker");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE ST 2051");
- }
- break;
- default :
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- }
- break;
- case 0x50 :
- switch (SecondaryDataID)
- {
- case 0x01: //RDD 8
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "WSS"); //TODO: inject it in the video stream when a sample is available
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / RDD 8");
- }
- break;
- default :
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- }
- break;
- case 0x5F : // (from ARIB STD-B37)
- if ((SecondaryDataID&0xF0)==0xD0) //Digital Closed Caption
- {
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (AribStdB34B37_Parser==NULL)
- {
- AribStdB34B37_Parser=new File_AribStdB24B37;
- ((File_AribStdB24B37*)AribStdB34B37_Parser)->IsAncillaryData=true;
- ((File_AribStdB24B37*)AribStdB34B37_Parser)->ParseCcis=true;
- Open_Buffer_Init(AribStdB34B37_Parser);
- }
- if (!AribStdB34B37_Parser->Status[IsFinished])
- {
- if (AribStdB34B37_Parser->PTS_DTS_Needed)
- AribStdB34B37_Parser->FrameInfo=FrameInfo;
- Open_Buffer_Continue(AribStdB34B37_Parser, Payload, (size_t)DataCount);
- }
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- }
- else
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- break;
- case 0x60 :
- switch (SecondaryDataID)
- {
- case 0x60 : // (from SMPTE RP 188 / SMPTE ST 12-2)
- // Time code ATC
- #if defined(MEDIAINFO_TIMECODE_YES)
- {
- File_Gxf_TimeCode Parser;
- Parser.IsAtc=true;
- Open_Buffer_Init(&Parser);
- Open_Buffer_Continue(&Parser, Payload, (size_t)DataCount);
-
- bool Exists=false;
- if (LineNumber!=(int32u)-1)
- for (size_t Pos=0; Pos<Count_Get(Stream_Other); Pos++)
- {
- if (__T("Line")+Ztring::ToZtring(LineNumber)==Retrieve(Stream_Other, Pos, Other_ID)
- && ((!LineNumber_IsSecondField && Retrieve(Stream_Other, Pos, "IsSecondField").empty()) || (LineNumber_IsSecondField && !Retrieve(Stream_Other, Pos, "IsSecondField").empty()))
- && Parser.Settings==Retrieve(Stream_Other, Pos, Other_TimeCode_Settings).To_UTF8())
- Exists=true;
- }
- else
- for (size_t Pos=0; Pos<Count_Get(Stream_Other); Pos++)
- {
- if (Parser.Settings==Retrieve(Stream_Other, Pos, Other_TimeCode_Settings).To_UTF8())
- Exists=true;
- }
- if (!Exists)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Time code");
- Fill(Stream_Other, StreamPos_Last, Other_Format, "SMPTE ATC");
- Fill(Stream_Other, StreamPos_Last, Other_TimeCode_FirstFrame, Parser.TimeCode_FirstFrame);
- Fill(Stream_Other, StreamPos_Last, Other_TimeCode_Settings, Parser.Settings);
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE RP 188");
- if (LineNumber!=(int32u)-1)
- Fill(Stream_Other, StreamPos_Last, Other_ID, __T("Line")+Ztring::ToZtring(LineNumber));
- if (LineNumber_IsSecondField)
- Fill(Stream_Other, StreamPos_Last, "IsSecondField", "Yes");
- }
- }
- #endif //defined(MEDIAINFO_TIMECODE_YES)
- break;
- default :
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- }
- break;
- case 0x61 : //Defined data services (from SMPTE 334-1)
- switch (SecondaryDataID)
- {
- case 0x01 : //CDP (from SMPTE 334-1)
- #if defined(MEDIAINFO_CDP_YES)
- {
- if (Cdp_Parser==NULL)
- {
- Cdp_Parser=new File_Cdp;
- Open_Buffer_Init(Cdp_Parser);
- }
- Demux(Payload, (size_t)DataCount, ContentType_MainStream);
- if (InDecodingOrder || (!HasBFrames && AspectRatio && FrameRate))
- {
- if (!Cdp_Parser->Status[IsFinished])
- {
- if (Cdp_Parser->PTS_DTS_Needed)
- Cdp_Parser->FrameInfo.DTS=FrameInfo.DTS;
- ((File_Cdp*)Cdp_Parser)->AspectRatio=AspectRatio;
- Open_Buffer_Continue(Cdp_Parser, Payload, (size_t)DataCount);
- }
- }
- else
- {
- //Saving data for future use
- buffered_data* Cdp=new buffered_data;
- Cdp->Data=new int8u[(size_t)DataCount];
- std::memcpy(Cdp->Data, Payload, (size_t)DataCount);
- Cdp->Size=(size_t)DataCount;
- Cdp_Data.push_back(Cdp);
- }
- }
- #endif //MEDIAINFO_CDP_YES
- break;
- case 0x02 : //CEA-608 (from SMPTE 334-1)
- if (Count_Get(Stream_Text)==0)
- {
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, StreamPos_Last, Text_Format, "CEA-608");
- Fill(Stream_Text, StreamPos_Last, Text_MuxingMode, "Ancillary data / SMPTE 334");
- }
- break;
- default :
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- }
- break;
- case 0x62 : //Variable-format data services (from SMPTE 334-1)
- switch (SecondaryDataID)
- {
- case 0x01 : //Program description (from SMPTE 334-1),
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "Program description");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE ST 334");
- }
- break;
- case 0x02 : //Data broadcast (from SMPTE 334-1)
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "Data broadcast");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE ST 334");
- }
- break;
- case 0x03 : //VBI data (from SMPTE 334-1)
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, "VBI data");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE ST 334");
- }
- break;
- default :
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- }
- break;
- case 0x64 :
- switch (SecondaryDataID)
- {
- case 0x64 : // (from SMPTE RP 196)
- // LTC in HANC space
- {
- bool Exists=false;
- if (LineNumber!=(int32u)-1)
- for (size_t Pos=0; Pos<Count_Get(Stream_Other); Pos++)
- {
- if (__T("Line")+Ztring::ToZtring(LineNumber)==Retrieve(Stream_Other, Pos, Other_ID))
- Exists=true;
- }
- else
- if (Count_Get(Stream_Other)!=0)
- Exists=true;
- if (!Exists)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Time code");
- Fill(Stream_Other, StreamPos_Last, Other_Format, "LTC");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE RP 196");
- if (LineNumber!=(int32u)-1)
- Fill(Stream_Other, StreamPos_Last, Other_ID, __T("Line")+Ztring::ToZtring(LineNumber));
- }
- }
- break;
- case 0x7F : // (from SMPTE RP 196)
- // VITC in HANC space
- {
- bool Exists=false;
- if (LineNumber!=(int32u)-1)
- for (size_t Pos=0; Pos<Count_Get(Stream_Other); Pos++)
- {
- if (__T("Line")+Ztring::ToZtring(LineNumber)==Retrieve(Stream_Other, Pos, Other_ID))
- Exists=true;
- }
- else
- if (Count_Get(Stream_Other)!=0)
- Exists=true;
- if (!Exists)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Time code");
- Fill(Stream_Other, StreamPos_Last, Other_Format, "VITC");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "Ancillary data / SMPTE RP 196");
- if (LineNumber!=(int32u)-1)
- Fill(Stream_Other, StreamPos_Last, Other_ID, __T("Line")+Ztring::ToZtring(LineNumber));
- }
- }
- break;
- default :
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- }
- break;
- default :
- if (Count_Get(Stream_Other)==0)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Format, Ztring().From_CC1(DataID)+__T('-')+Ztring().From_CC1(SecondaryDataID));
- }
- }
- FILLING_END();
-
- delete[] Payload; //Payload=NULL
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_ANCILLARY_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ancillary.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ancillary.h
deleted file mode 100644
index ad9359feb..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ancillary.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Ancillary data (SMPTE ST291)
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_AncillaryH
-#define MediaInfo_AncillaryH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Ancillary
-//***************************************************************************
-
-class File_Ancillary : public File__Analyze
-{
-public :
- //In
- bool WithTenBit;
- bool WithChecksum;
- bool HasBFrames;
- bool InDecodingOrder;
- bool LineNumber_IsSecondField;
- float64 AspectRatio;
- float64 FrameRate;
- int32u LineNumber;
-
- //In/Out
- struct buffered_data
- {
- size_t Size;
- int8u* Data;
-
- buffered_data()
- {
- Size=0;
- Data=NULL;
- }
-
- ~buffered_data()
- {
- delete[] Data; //Data=NULL;
- }
- };
- #if defined(MEDIAINFO_CDP_YES)
- std::vector<buffered_data*> Cdp_Data;
- File__Analyze* Cdp_Parser;
- #endif //defined(MEDIAINFO_CDP_YES)
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- std::vector<buffered_data*> AfdBarData_Data;
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- File__Analyze* AribStdB34B37_Parser;
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- #if defined(MEDIAINFO_SDP_YES)
- File__Analyze* Sdp_Parser;
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- #if defined(MEDIAINFO_MXF_YES)
- File__Analyze* Rdd18_Parser;
- #endif //defined(MEDIAINFO_MXF_YES)
-
- //Constructor/Destructor
- File_Ancillary();
- ~File_Ancillary();
-
-private :
- //Streams management
- void Streams_Finish();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
-
- //Buffer - Global
- void Read_Buffer_Continue();
- void Read_Buffer_AfterParsing();
- void Read_Buffer_Unsynched();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Temp
- int8u DataID;
- int8u SecondaryDataID;
- int8u DataCount;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Bdmv.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Bdmv.cpp
deleted file mode 100644
index 263a52661..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Bdmv.cpp
+++ /dev/null
@@ -1,1636 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_BDMV_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Bdmv.h"
-#include "MediaInfo/MediaInfo.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#include "ZenLib/Dir.h"
-#include "ZenLib/FileName.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// index (INDX) with title
-// --> MovieObject (MOBJ) with mobj
-// --> PlayList (MPLS)
-// --> PlayItem (MPLS) with Mark
-// --> ClipInfo (CLPI)
-// --> Clip (?) (CLPI)
-// --> Stream (M2TS)
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-namespace Elements
-{
- const int32u CLPI=0x48444D56; //HDMV
- const int32u INDX=0x494E4458;
- const int32u MOBJ=0x4D4F424A;
- const int32u MPLS=0x4D504C53;
-}
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Clpi_Offsets[]=
-{
- "ClipInfo",
- "SequenceInfo",
- "ProgramInfo",
- "CPI",
- "ClipMark",
- "ExtensionData",
- "Reserved",
- "Reserved",
- "Reserved",
-};
-
-//---------------------------------------------------------------------------
-const char* Indx_Offsets[]=
-{
- "AppInfoBDMV",
- "Indexes",
- "ExtensionData",
- "Reserved",
- "Reserved",
- "Reserved",
- "Reserved",
- "Reserved",
- "Reserved",
-};
-
-//---------------------------------------------------------------------------
-const char* Mobj_Offsets[]=
-{
- "MovieObjects",
- "Reserved",
- "Reserved",
- "Reserved",
- "Reserved",
- "Reserved",
- "Reserved",
- "Reserved",
- "Reserved",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpls_Offsets[]=
-{
- "AppInfoPlayList",
- "PlayList",
- "PlayListMarks",
- "ExtensionData",
- "Reserved",
- "Reserved",
- "Reserved",
- "Reserved",
- "Reserved",
-};
-
-//---------------------------------------------------------------------------
-const char* Bdmv_Type(int32u Type_Indicator, size_t Start_Adress_Pos)
-{
- switch (Type_Indicator)
- {
- case Elements::CLPI : return Clpi_Offsets[Start_Adress_Pos];
- case Elements::INDX : return Indx_Offsets[Start_Adress_Pos];
- case Elements::MOBJ : return Mobj_Offsets[Start_Adress_Pos];
- case Elements::MPLS : return Mpls_Offsets[Start_Adress_Pos];
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Clpi_Format(int8u StreamType)
-{
- switch (StreamType)
- {
- case 0x01 : return "MPEG-1 Video";
- case 0x02 : return "MPEG-2 Video";
- case 0x03 : return "MPEG-1 Audio";
- case 0x04 : return "MPEG-2 Audio";
- case 0x1B : return "AVC";
- case 0x20 : return "AVC";
- case 0x80 : return "PCM";
- case 0x81 : return "AC-3";
- case 0x82 : return "DTS";
- case 0x83 : return "TrueHD";
- case 0x84 : return "E-AC-3";
- case 0x85 : return "DTS";
- case 0x86 : return "DTS";
- case 0x90 : return "PGS";
- case 0x91 : return "Interactive";
- case 0x92 : return "Subtitle";
- case 0xA1 : return "E-AC-3"; //Secondary
- case 0xA2 : return "DTS"; //Secondary
- case 0xEA : return "VC-1";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Clpi_Format_Profile(int8u StreamType)
-{
- switch (StreamType)
- {
- case 0x85 : return "HD";
- case 0x86 : return "MA";
- case 0xA2 : return "HD"; //Secondary
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-stream_t Clpi_Type(int8u StreamType)
-{
- switch (StreamType)
- {
- case 0x01 : return Stream_Video;
- case 0x02 : return Stream_Video;
- case 0x03 : return Stream_Audio;
- case 0x04 : return Stream_Audio;
- case 0x1B : return Stream_Video;
- case 0x20 : return Stream_Video;
- case 0x80 : return Stream_Audio;
- case 0x81 : return Stream_Audio;
- case 0x82 : return Stream_Audio;
- case 0x83 : return Stream_Audio;
- case 0x84 : return Stream_Audio;
- case 0x85 : return Stream_Audio;
- case 0x86 : return Stream_Audio;
- case 0x90 : return Stream_Text;
- case 0x91 : return Stream_Max;
- case 0x92 : return Stream_Text;
- case 0xA1 : return Stream_Audio;
- case 0xA2 : return Stream_Audio;
- case 0xEA : return Stream_Video;
- default : return Stream_Max;
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Clpi_Video_Format[]=
-{
- "",
- "480i",
- "576i",
- "480p",
- "1080i",
- "720p",
- "1080p",
- "576p",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Clpi_Video_Interlacement[]=
-{
- "",
- "Interlaced",
- "Interlaced",
- "PPF",
- "Interlaced",
- "PPF",
- "PPF",
- "PPF",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Clpi_Video_Standard[]=
-{
- "",
- "NTSC",
- "PAL",
- "NTSC",
- "",
- "",
- "",
- "PAL",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-int16u Clpi_Video_Width[]=
-{
- 0,
- 720,
- 720,
- 720,
- 1920,
- 1280,
- 1920,
- 720,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-int16u Clpi_Video_Height[]=
-{
- 0,
- 480,
- 576,
- 480,
- 1080,
- 720,
- 1080,
- 576,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-float32 Clpi_Video_FrameRate[]=
-{
- (float32) 0.000,
- (float32)23.976,
- (float32)24.000,
- (float32)25.000,
- (float32)29.970,
- (float32) 0.000,
- (float32)50.000,
- (float32)59.940,
- (float32) 0.000,
- (float32) 0.000,
- (float32) 0.000,
- (float32) 0.000,
- (float32) 0.000,
- (float32) 0.000,
- (float32) 0.000,
- (float32) 0.000,
-};
-
-//---------------------------------------------------------------------------
-float32 Clpi_Video_AspectRatio[]=
-{
- (float32)0.000,
- (float32)0.000,
- (float32)1.333,
- (float32)1.778,
- (float32)2.210,
- (float32)0.000,
- (float32)0.000,
- (float32)0.000,
- (float32)0.000,
- (float32)0.000,
- (float32)0.000,
- (float32)0.000,
- (float32)0.000,
- (float32)0.000,
- (float32)0.000,
- (float32)0.000,
-};
-
-//---------------------------------------------------------------------------
-int8u Clpi_Audio_Channels[]=
-{
- 0,
- 1,
- 0,
- 2,
- 0,
- 0,
- 0, //Multi 6-8
- 0,
- 0,
- 0,
- 0,
- 0,
- 0, //Combo
- 0,
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-int32u Clpi_Audio_SamplingRate[]=
-{
- 0,
- 48000,
- 0,
- 0,
- 96000,
- 192000,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 48000, //192000?
- 48000, // 96000?
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-const char* Indx_object_type[]=
-{
- "",
- "HDMV",
- "BD-J",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Indx_playback_type[4][4]=
-{
- {"", "", "", "", },
- {"Movie", "Interactive", "", "", },
- {"", "", "Movie", "Interactive", },
- {"", "", "", "", },
-};
-
-//---------------------------------------------------------------------------
-const char* Indx_title_search[]=
-{
- "Permitted",
- "Prohibited1",
- "Prohibited2",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpls_playback_type[]=
-{
- "Sequential",
- "Random",
- "Shuffle",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpls_PlayListMarks_Mark_type(int8u type)
-{
- switch (type)
- {
- case 1 : return "entry-mark";
- case 2 : return "link point";
- default: return "";
- }
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Ztring Bdmv_Decimal_Hexa(int64u Number)
-{
- Ztring Temp;
- Temp.From_Number(Number);
- Temp+=__T(" (0x");
- Temp+=Ztring::ToZtring(Number, 16);
- Temp+=__T(")");
- return Temp;
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Bdmv::FileHeader_Begin()
-{
- size_t BDMV_Pos=File_Name.find(Ztring(1, PathSeparator)+__T("BDMV"));
- if (BDMV_Pos!=string::npos && BDMV_Pos+5==File_Name.size()) //Blu-ray directory
- return true;
-
- //Element_Size
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- switch (CC4(Buffer))
- {
- case Elements::CLPI :
- case Elements::INDX :
- case Elements::MOBJ :
- case Elements::MPLS :
- break;
- default : Reject("Blu-ray");
- return false;
- }
-
- //Init
- Mpls_PlayList_IsParsed=false;
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Read_Buffer_Continue()
-{
- size_t BDMV_Pos=File_Name.find(Ztring(1, PathSeparator)+__T("BDMV"));
- if (BDMV_Pos!=string::npos && BDMV_Pos+5==File_Name.size()) //Blu-ray directory
- {
- BDMV();
- return;
- }
-
- if (Buffer_Size<File_Size)
- {
- Element_WaitForMoreData();
- return; //Wait for more data
- }
-
- //Parsing
- int32u type_indicator;
- int16u version_numberH;
- Element_Begin1("Header");
- Get_C4 (type_indicator, "type_indicator");
- Data_Accept("Blu-ray");
- Get_C2 (version_numberH, "version_number (High)");
- Skip_C2( "version_number (Low)");
- Element_End0();
-
- FILLING_BEGIN();
- Accept("BDMV");
- switch (type_indicator)
- {
- case Elements::CLPI : Fill(Stream_General, 0, General_Format, "Blu-ray Clip info"); break;
- case Elements::INDX : Fill(Stream_General, 0, General_Format, "Blu-ray Index"); break;
- case Elements::MOBJ : Fill(Stream_General, 0, General_Format, "Blu-ray Movie object"); break;
- case Elements::MPLS : Fill(Stream_General, 0, General_Format, "Blu-ray Playlist"); break;
- default : ;
- }
- FILLING_END();
-
- if (version_numberH==0x3031 || version_numberH==0x3032) //Version 1 or 2
- {
- Element_Begin1("Offsets");
- Types[0x28]=0; //First object
- for (size_t Start_Adress_Pos=1; Start_Adress_Pos<9; Start_Adress_Pos++)
- {
- int32u Start_Adress;
- Get_B4 (Start_Adress, Bdmv_Type(type_indicator, Start_Adress_Pos));
- Types[Start_Adress]=Start_Adress_Pos;
- }
- Element_End0();
-
- for (std::map<int32u, size_t>::iterator Type=Types.begin(); Type!=Types.end(); ++Type)
- {
- if (Type->first>=Element_Offset) //If valid
- {
- if (Type->first>Element_Offset)
- Skip_XX(Type->first-Element_Offset, "unknown");
-
- Element_Begin1(Bdmv_Type(type_indicator, Type->second));
- int32u length;
- Get_B4 (length, "length");
- int64u End=Element_Offset+length;
- switch (type_indicator)
- {
- case Elements::CLPI :
- switch(Type->second)
- {
- case 2 : Clpi_ProgramInfo(); break;
- case 5 : Clpi_ExtensionData(); break;
- default: ;
- }
- break;
- case Elements::INDX :
- switch(Type->second)
- {
- case 0 : Indx_AppInfoBDMV(); break;
- case 1 : Indx_Indexes(); break;
- case 2 : Indx_ExtensionData(); break;
- default: ;
- }
- break;
- case Elements::MOBJ :
- switch(Type->second)
- {
- case 0 : Mobj_MovieObjects(); break;
- case 1 : Mobj_ExtensionData(); break;
- default: ;
- }
- break;
- case Elements::MPLS :
- switch(Type->second)
- {
- case 0 : Mpls_AppInfoPlayList(); break;
- case 1 : Mpls_PlayList(); break;
- case 2 : Mpls_PlayListMarks (); break;
- case 3 : Mpls_ExtensionData (); break;
- default: ;
- }
- break;
- default : ;
- }
- if (End>Element_Offset)
- Skip_XX(End-Element_Offset, "Unknown");
- Element_End0();
- }
- }
-
- if (Element_Size>Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- }
- else
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Bdmv::BDMV()
-{
- Accept("BDMV");
-
- //Searching the longest playlist
- ZtringList List=Dir::GetAllFileNames(File_Name+PathSeparator+__T("PLAYLIST")+PathSeparator+__T("*.mpls"), Dir::Include_Files);
- std::vector<MediaInfo_Internal*> MIs;
- MIs.resize(List.size());
- size_t MaxDuration_Pos=(size_t)-1;
- int64u MaxDuration=0;
- if (Config->File_Bdmv_ParseTargetedFile_Get())
- {
- for (size_t Pos=0; Pos<MIs.size(); Pos++)
- {
- MIs[Pos]=new MediaInfo_Internal();
- MIs[Pos]->Option(__T("File_Bdmv_ParseTargetedFile"), __T("0"));
- MIs[Pos]->Option(__T("File_IsReferenced"), __T("1"));
- MIs[Pos]->Open(List[Pos]);
- int64u Duration=Ztring(MIs[Pos]->Get(Stream_General, 0, General_Duration)).To_int64u();
- if (Duration>MaxDuration)
- {
- MaxDuration=Duration;
- MaxDuration_Pos=Pos;
- }
- }
- }
-
- if (MaxDuration_Pos!=(size_t)-1)
- {
- //Merging
- MediaInfo_Internal MI;
- MI.Option(__T("File_IsReferenced"), __T("1"));
- MI.Open(List[MaxDuration_Pos]); //Open it again for having the M2TS part
- Merge(MI);
-
- Clear(Stream_General, 0, General_Format);
- Clear(Stream_General, 0, General_Format_String);
- Clear(Stream_General, 0, General_Format_Extensions);
- Clear(Stream_General, 0, General_Format_Info);
- Clear(Stream_General, 0, General_Codec);
- Clear(Stream_General, 0, General_Codec_String);
- Clear(Stream_General, 0, General_Codec_Extensions);
- Clear(Stream_General, 0, General_FileSize);
- Clear(Stream_Video, 0, Video_ScanType_String);
- Clear(Stream_Video, 0, Video_Bits__Pixel_Frame_);
- }
-
- for (size_t Pos=0; Pos<MIs.size(); Pos++)
- delete MIs[Pos]; //MIs[Pos]=NULL;
- MIs.clear();
-
- //Detecting some directories
- if (Dir::Exists(File_Name+PathSeparator+__T("BDSVM"))
- || Dir::Exists(File_Name+PathSeparator+__T("SLYVM"))
- || Dir::Exists(File_Name+PathSeparator+__T("ANYVM")))
- Fill(Stream_General, 0, General_Format_Profile, "BD+");
- if (Dir::Exists(File_Name+PathSeparator+__T("BDJO")) && !Dir::GetAllFileNames(File_Name+PathSeparator+__T("BDJO")).empty())
- Fill(Stream_General, 0, General_Format_Profile, "BD-Java");
-
- //Filling
- File_Name.resize(File_Name.size()-5); //Removing "/BDMV"
- Fill(Stream_General, 0, General_Format, "Blu-ray movie", Unlimited, true, true);
- Fill(Stream_General, 0, General_CompleteName, File_Name, true);
- Fill(Stream_General, 0, General_FolderName, FileName::Path_Get(File_Name), true);
- if (FileName::Extension_Get(File_Name).empty())
- Fill(Stream_General, 0, General_FileName, FileName::Name_Get(File_Name), true);
- else
- Fill(Stream_General, 0, General_FileName, FileName::Name_Get(File_Name)+__T('.')+FileName::Extension_Get(File_Name), true);
- File_Name.clear();
-
- Finish("BDMV");
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Clpi_ProgramInfo()
-{
- //Retrieving data from the M2TS file
- std::map<int16u, stream_t> PIDs_StreamKind;
- std::map<int16u, size_t> PIDs_StreamPos;
- if (Config->File_Bdmv_ParseTargetedFile_Get() && File_Name.size()>10+1+7)
- {
- Ztring file=File_Name.substr(File_Name.size()-10, 5);
- Ztring M2TS_File=File_Name;
- M2TS_File.resize(M2TS_File.size()-(10+1+7));
- M2TS_File+=__T("STREAM");
- M2TS_File+=PathSeparator;
- M2TS_File+=file;
- M2TS_File+=__T(".m2ts");
-
- MediaInfo_Internal MI;
- MI.Option(__T("File_Bdmv_ParseTargetedFile"), __T("0"));
- MI.Option(__T("File_IsReferenced"), __T("1"));
- if (MI.Open(M2TS_File))
- {
- Merge(MI);
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- Fill((stream_t)StreamKind, StreamPos, "Source", file+__T(".m2ts"));
- }
-
- //Retrieving PID mapping
- for (size_t StreamKind=(size_t)Stream_General+1; StreamKind<(size_t)Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- {
- int16u PID=Retrieve((stream_t)StreamKind, StreamPos, General_ID).To_int16u();
- PIDs_StreamKind[PID]=(stream_t)StreamKind;
- PIDs_StreamPos[PID]=StreamPos;
- }
- }
-
- //Parsing
- int8u number_of_program_sequences;
- Skip_B1( "Unknown");
- Get_B1 (number_of_program_sequences, "number_of_program_sequences");
- for (int8u program_sequence=0; program_sequence<number_of_program_sequences; program_sequence++)
- {
- int8u number_of_streams_in_ps;
- Skip_B4( "Unknown");
- Skip_B2( "program_map_PID");
- Get_B1 (number_of_streams_in_ps, "number_of_streams_in_ps");
- Skip_B1( "Unknown");
- for (int16u Pos=0; Pos<number_of_streams_in_ps; Pos++)
- {
- Element_Begin1("Stream");
- int16u stream_PID;
- int8u Stream_Length;
- Get_B2 (stream_PID, "stream_PID");
- Get_B1 (Stream_Length, "Length");
- int64u Stream_End=Element_Offset+Stream_Length;
- StreamKind_Last=Stream_Max;
- std::map<int16u, stream_t>::iterator PID_StreamKind=PIDs_StreamKind.find(stream_PID);
- if (PID_StreamKind!=PIDs_StreamKind.end())
- {
- StreamKind_Last=PID_StreamKind->second;
- StreamPos_Last=PIDs_StreamPos.find(stream_PID)->second;
- }
- Get_B1 (stream_type, "Stream type"); Param_Info1(Clpi_Format(stream_type)); Element_Info1(Clpi_Format(stream_type));
- switch (Clpi_Type(stream_type))
- {
- case Stream_Video : StreamCodingInfo_Video(); break;
- case Stream_Audio : StreamCodingInfo_Audio(); break;
- case Stream_Text : StreamCodingInfo_Text() ; break;
- default : ;
- }
-
- if (Stream_End-Element_Offset)
- Skip_XX(Stream_End-Element_Offset, "Unknown");
- Element_End0();
-
- FILLING_BEGIN();
- if (StreamKind_Last!=Stream_Max)
- {
- Fill(StreamKind_Last, StreamPos_Last, General_ID, stream_PID, 10, true);
- Fill(StreamKind_Last, StreamPos_Last, General_ID_String, Bdmv_Decimal_Hexa(stream_PID), true);
- }
- FILLING_END();
- }
- }
-}
-
-struct entry
-{
- int16u ID1;
- int16u ID2;
- int32u Length;
-};
-typedef std::map<int32u, entry> entries; //Key is the start address
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Clpi_ExtensionData()
-{
- entries Entries; //Key is the start address
-
- int32u Base_Pos=(int32u)Element_Offset-4;
-
- int8u number_of_ext_data_entries;
- Skip_B4( "Unknown");
- Skip_B3( "Unknown");
- Element_Begin1("Offsets");
- Get_B1 (number_of_ext_data_entries, "number_of_ext_data_entries");
- for (size_t Start_Adress_Pos=0; Start_Adress_Pos<number_of_ext_data_entries; Start_Adress_Pos++)
- {
- int32u Start_Adress, Length;
- int16u ID1, ID2;
- Get_B2 (ID1, "ID1");
- Get_B2 (ID2, "ID2");
- Get_B4 (Start_Adress, "Start_Adress");
- Get_B4 (Length, "Length");
- Entries[Base_Pos+Start_Adress].ID1=ID1;
- Entries[Base_Pos+Start_Adress].ID2=ID2;
- Entries[Base_Pos+Start_Adress].Length=Length;
- }
- Element_End0();
-
- for (entries::iterator Entry=Entries.begin(); Entry!=Entries.end(); ++Entry)
- {
- if (Entry->first>=Element_Offset) //If valid
- {
- if (Entry->first>Element_Offset)
- Skip_XX(Entry->first-Element_Offset, "unknown");
-
- Element_Begin1("Entry");
- int32u length;
- Get_B4 (length, "length");
- int64u End=Element_Offset+length;
- switch (Entry->second.ID1)
- {
- case 0x0002 :
- switch(Entry->second.ID2)
- {
- case 0x0005 : Clpi_ProgramInfo(); break;
- default: ;
- }
- break;
- default : ;
- }
- if (End>Element_Offset)
- Skip_XX(End-Element_Offset, "Unknown");
- Element_End0();
- }
- }
-
- if (Element_Size>Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Indx_AppInfoBDMV()
-{
- //Parsing
- Skip_B2( "reserved");
- Skip_Local(32, "user_data");
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Indx_Indexes()
-{
- //Parsing
- int16u number_of_Titles;
- Element_Begin1("FirstPlayback");
- BS_Begin();
- int8u FirstPlayback_object_type;
- Get_S1 ( 2, FirstPlayback_object_type, "object_type"); Param_Info1(Indx_object_type[FirstPlayback_object_type]);
- Skip_S4(30, "reserved");
- BS_End();
- Indx_Indexes_Index(FirstPlayback_object_type);
- Element_End0();
- Element_Begin1("TopMenu");
- BS_Begin();
- int8u TopMenu_object_type;
- Get_S1 ( 2, TopMenu_object_type, "object_type"); Param_Info1(Indx_object_type[TopMenu_object_type]);
- Skip_S4(30, "reserved");
- BS_End();
- Indx_Indexes_Index(TopMenu_object_type);
- Element_End0();
- Get_B2 (number_of_Titles, "number_of_Titles");
- for (int16u Pos=0; Pos<number_of_Titles; Pos++)
- {
- Element_Begin1("Title");
- BS_Begin();
- int8u Title_object_type;
- Get_S1 ( 2, Title_object_type, "object_type"); Param_Info1(Indx_object_type[Title_object_type]);
- Info_S1( 2, Title_title_search, "title_search"); Param_Info1(Indx_title_search[Title_title_search]);
- Skip_S4(28, "reserved");
- BS_End();
- Indx_Indexes_Index(Title_object_type);
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Indx_Indexes_Index(int8u object_type)
-{
- BS_Begin();
- Info_S1( 2, playback_type, "playback_type"); Param_Info1(Indx_playback_type[object_type][playback_type]);
- Skip_S2(14, "reserved");
- BS_End();
- switch (object_type)
- {
- case 1 : //HDMV
- {
- Info_B2(id_ref, "id_ref"); Element_Info1(id_ref);
- Skip_B4( "reserved");
- }
- break;
- case 2 : //BD-J
- {
- Info_Local(5, id_ref, "id_ref"); Element_Info1(id_ref);
- Skip_B1( "reserved");
- }
- break;
- default:
- Skip_XX(6, "unknown");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Indx_ExtensionData()
-{
- //Parsing
- std::map<int32u, int32u> exts; //Key is the start address, value is length
- int64u Base_Offset=Element_Offset-4; //Size is included
- int8u number_of_ext_data_entries;
- Skip_B4( "data_block_start_adress");
- Skip_B3( "reserved");
- Get_B1 (number_of_ext_data_entries, "number_of_ext_data_entries");
- for (int16u Pos=0; Pos<number_of_ext_data_entries; Pos++)
- {
- Element_Begin1("ext_data_entry");
- int32u ext_data_start_adress, ext_data_length;
- Skip_B2( "ID1 (AVCHD)");
- Skip_B2( "ID2 (Version)");
- Get_B4 (ext_data_start_adress, "ext_data_start_adress");
- Get_B4 (ext_data_length, "ext_data_length");
- Element_End0();
- exts[ext_data_start_adress]=ext_data_length;
- }
-
- for (std::map<int32u, int32u>::iterator ext=exts.begin(); ext!=exts.end(); ++ext)
- {
- if (Base_Offset+ext->first>=Element_Offset)
- {
- if (Base_Offset+ext->first>Element_Offset)
- Skip_XX(ext->first-Element_Offset, "Unknown");
-
- Element_Begin0();
- int64u End=Element_Offset+ext->second;
-
- int32u type_indicator;
- Get_C4(type_indicator, "type_indicator"); Element_Info1(Ztring().From_CC4(type_indicator));
- switch (type_indicator)
- {
- case 0x49444558 : Indx_ExtensionData_IDEX(); break;
- default : Element_Name("Unknown");
- Skip_XX(ext->second-4, "Unknown");
- }
- if (End>Element_Offset)
- Skip_XX(End-Element_Offset, "Unknown");
- Element_End0();
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Indx_ExtensionData_IDEX()
-{
- Element_Name("IndexExtension");
-
- //Parsing
- int64u Base_Offset=Element_Offset-4; //Size is included
- int32u TableOfPlayLists_start_adress, MakersPrivateData_start_adress;
- Skip_B4( "reserved");
- Get_B4 (TableOfPlayLists_start_adress, "TableOfPlayLists_start_adress");
- Get_B4 (MakersPrivateData_start_adress, "MakersPrivateData_start_adress");
- Skip_XX(24, "reserved");
-
- Indx_ExtensionData_IDEX_UIAppInfoAVCHD();
- if (TableOfPlayLists_start_adress)
- {
- if (Base_Offset+TableOfPlayLists_start_adress>Element_Offset)
- Skip_XX(Base_Offset+TableOfPlayLists_start_adress-Element_Offset, "Unknown");
- Indx_ExtensionData_IDEX_TableOfPlayLists();
- }
- if (MakersPrivateData_start_adress)
- {
- if (Base_Offset+MakersPrivateData_start_adress>Element_Offset)
- Skip_XX(Base_Offset+MakersPrivateData_start_adress-Element_Offset, "Unknown");
- Indx_ExtensionData_IDEX_MakersPrivateData();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Indx_ExtensionData_IDEX_UIAppInfoAVCHD()
-{
- Element_Begin1("UIAppInfoAVCHD");
-
- //Parsing
- int32u length, length2;
- int8u AVCHD_name_length;
- Get_B4 (length, "length");
- Skip_B2( "maker_ID");
- Skip_B2( "maker_model_code");
- Skip_XX(32, "maker_private_area");
- BS_Begin();
- Skip_BS(15, "reserved");
- Skip_SB( "AVCHD_write_protect_flag");
- BS_End();
- Skip_B2( "ref_to_menu_thumbail_index");
- Skip_B1( "time_zone");
- Skip_XX(7, "record_time_and_date");
- Skip_B1( "reserved");
- Skip_B1( "AVCHD_character_set");
- Get_B1 (AVCHD_name_length, "AVCHD_name_length");
- Skip_Local(AVCHD_name_length, "AVCHD_name");
- Skip_XX(255-AVCHD_name_length, "AVCHD_name (junk)");
- Element_Begin1("additional data");
- Get_B4 (length2, "length2");
- Skip_XX(length2, "reserved");
- Element_End0();
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Indx_ExtensionData_IDEX_TableOfPlayLists()
-{
- Element_Begin1("TableOfPlayLists");
-
- //Parsing
- int32u length;
- Get_B4 (length, "length");
- Skip_XX(length, "unknown");
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Indx_ExtensionData_IDEX_MakersPrivateData()
-{
- Element_Begin1("MakersPrivateData");
-
- //Parsing
- int64u Base_Offset=Element_Offset-4; //Size is included
- int32u length, datablock_start_adress;
- int8u number_of_maker_entries;
- Get_B4 (length, "length");
- Get_B4 (datablock_start_adress, "datablock_start_adress");
- Skip_XX(24, "reserved");
- Get_B1 (number_of_maker_entries, "number_of_maker_entries");
- for (int8u Pos=0; Pos<number_of_maker_entries; Pos++)
- {
- Element_Begin1("maker_entry");
- Skip_B2( "maker_ID");
- Skip_B2( "maker_model_code");
- Skip_B4( "mpd_start_adress");
- Skip_B4( "mpd_length");
- Element_End0();
- }
-
- if (datablock_start_adress)
- {
- if (Base_Offset+datablock_start_adress>Element_Offset)
- Skip_XX(Base_Offset+datablock_start_adress-Element_Offset, "Unknown");
- Skip_XX(length-datablock_start_adress, "Unknown");
- }
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Mobj_MovieObjects()
-{
- //Parsing
- int16u number_of_mobjs;
- Skip_B4( "reserved");
- Get_B2 (number_of_mobjs, "number_of_mobj");
- for (int16u mobjs_Pos=0; mobjs_Pos<number_of_mobjs; mobjs_Pos++)
- {
- Element_Begin1("mobj");
- int16u number_of_navigation_commands;
- BS_Begin();
- Info_SB(resume, "resume"); Param_Info1(resume?"suspend":"discard");
- Info_SB(menu_call, "menu_call"); Param_Info1(menu_call?"enable":"disable");
- Info_SB(title_search, "title_search"); Param_Info1(title_search?"enable":"disable");
- Skip_BS(13, "reserved");
- BS_End();
- Get_B2 (number_of_navigation_commands, "number_of_navigation_commands");
- for (int16u navigation_command_Pos=0; navigation_command_Pos<number_of_navigation_commands; navigation_command_Pos++)
- {
- Element_Begin1("navigation_command");
- Skip_B4( "opcode");
- Skip_B4( "destination");
- Skip_B4( "source");
- Element_End0();
- }
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Mobj_ExtensionData()
-{
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Mpls_AppInfoPlayList()
-{
- //Parsing
- Skip_B1( "unknown");
- BS_Begin();
- Skip_S1(6, "unknown");
- Info_S2(2, playback_type, "playback_type"); Param_Info1(Mpls_playback_type[playback_type]);
- BS_End();
- Skip_B2( "playback_count");
- Skip_B4( "user_operation_mask_code 1");
- Skip_B4( "user_operation_mask_code 2");
- BS_Begin();
- Skip_SB( "random access");
- Skip_SB( "audio mix");
- Skip_SB( "bypass mixer");
- Skip_S2(13, "reserved");
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Mpls_PlayList()
-{
- //Parsing
- Mpls_PlayList_Duration=0;
- int16u number_of_PlayItems, number_of_SubPaths;
- Skip_B2( "reserved");
- Get_B2 (number_of_PlayItems, "number_of_PlayItems");
- Get_B2 (number_of_SubPaths, "number_of_SubPaths");
- for (int16u Pos=0; Pos<number_of_PlayItems; Pos++)
- Mpls_PlayList_PlayItem();
-
- if (Mpls_PlayList_Duration)
- Fill(Stream_General, 0, General_Duration, Mpls_PlayList_Duration/45);
-
- for (int16u SubPath_Pos=0; SubPath_Pos<number_of_SubPaths; SubPath_Pos++)
- {
- Element_Begin1("SubPath");
- int32u SubPath_length;
- int16u number_of_SubPlayItems;
- int8u SubPath_type;
- Get_B4 (SubPath_length, "length");
- int64u SubPath_End=Element_Offset+SubPath_length;
- Skip_B1( "Unknown");
- Get_B1 (SubPath_type, "SubPath_type");
- Skip_B2( "repeat");
- Get_B2 (number_of_SubPlayItems, "number_of_SubPlayItems");
- for (int16u Pos=0; Pos<number_of_SubPlayItems; Pos++)
- Mpls_PlayList_SubPlayItem(SubPath_type, Pos);
-
- if (SubPath_End>Element_Offset)
- Skip_XX(SubPath_End-Element_Offset, "unknown");
- Element_End0();
- }
-
- FILLING_BEGIN();
- if (!Mpls_PlayList_IsParsed)
- {
- Mpls_PlayList_number_of_SubPaths=number_of_SubPaths;
- Mpls_PlayList_IsParsed=true;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Mpls_PlayList_PlayItem()
-{
- Element_Begin1("PlayItem");
- Ztring Clip_Information_file_name;
- int32u Time_In, Time_Out;
- int16u length;
- Get_B2 (length, "length");
- int64u End=Element_Offset+length;
- Get_Local (5, Clip_Information_file_name, "Clip_Information_file_name"); Element_Info1(Clip_Information_file_name);
- Skip_Local(4, "Clip_codec_identifier");
- Skip_B2( "unknown");
- Skip_B1( "Unknown");
- Get_B4 (Time_In, "Time (In)"); Param_Info1((float32)Time_In/45000);
- Get_B4 (Time_Out, "Time (Out)"); Param_Info1((float32)Time_Out/45000);
- Skip_B4( "UO1");
- Skip_B4( "UO2");
- Skip_B4( "An?");
-
- Mpls_PlayList_PlayItem_Duration=Time_Out-Time_In;
- if (Time_Out>Time_In)
- Mpls_PlayList_Duration+=Mpls_PlayList_PlayItem_Duration;
-
- std::vector<size_t> StreamCount_Before;
- for (size_t StreamKind=Stream_General; StreamKind<Stream_Max; StreamKind++)
- StreamCount_Before.push_back(Count_Get((stream_t)StreamKind));
-
- Mpls_PlayList_PlayItem_STN_table();
-
- if (Clip_Information_file_names.find(Clip_Information_file_name)==Clip_Information_file_names.end() && File_Name.size()>10+1+8)
- {
- Ztring CLPI_File=File_Name;
- CLPI_File.resize(CLPI_File.size()-(10+1+8));
- CLPI_File+=__T("CLIPINF");
- CLPI_File+=PathSeparator;
- CLPI_File+=Clip_Information_file_name;
- CLPI_File+=__T(".clpi");
-
- MediaInfo_Internal MI;
- MI.Option(__T("File_Bdmv_ParseTargetedFile"), Config->File_Bdmv_ParseTargetedFile_Get()?__T("1"):__T("0"));
- MI.Option(__T("File_IsReferenced"), __T("1"));
- if (MI.Open(CLPI_File))
- {
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<MI.Count_Get((stream_t)StreamKind); StreamPos++)
- {
- while (StreamCount_Before[StreamKind]+StreamPos>=Count_Get((stream_t)StreamKind))
- Stream_Prepare((stream_t)StreamKind);
- Merge(MI, (stream_t)StreamKind, StreamPos, StreamCount_Before[StreamKind]+StreamPos);
- }
- }
-
- Clip_Information_file_names.insert(Clip_Information_file_name);
- }
-
- if (End>Element_Offset)
- Skip_XX(End-Element_Offset, "unknown");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Mpls_PlayList_PlayItem_STN_table()
-{
- Element_Begin1("STN");
-
- int16u length;
- Get_B2 (length, "length");
- int64u End=Element_Offset+length;
- if (End>Element_Size)
- {
- Skip_XX(Element_Size-Element_Offset, "Problem");
- return;
- }
- Skip_B2( "unknown");
- Skip_B1( "Vi");
- Skip_B1( "Au");
- Skip_B1( "PG");
- Skip_B1( "IG");
- Skip_B1( "sV");
- Skip_B1( "sA");
- Skip_B1( "PIP");
- Skip_B1( "unknown");
- Skip_B1( "unknown");
- Skip_B1( "unknown");
- Skip_B1( "unknown");
- Skip_B1( "unknown");
-
- while (Element_Offset+16<=End)
- {
- Element_Begin0();
- Ztring language;
- int16u mPID;
- int8u IDs_length;
- Skip_B1( "type");
- Skip_B1( "unknown");
- Get_B2 (mPID, "mPID"); Element_Name(Ztring::ToZtring(mPID, 16));
- Skip_B2( "SPid");
- Skip_B2( "sCid");
- Skip_B2( "sPID");
- Get_B1 (IDs_length, "length");
- int64u IDs_End=Element_Offset+IDs_length;
- Get_B1 (stream_type, "stream_type"); Param_Info1(Clpi_Format(stream_type)); Element_Info1(Clpi_Format(stream_type));
- switch (Clpi_Type(stream_type))
- {
- case Stream_Video : Mpls_PlayList_PlayItem_STN_table_Video(); break;
- case Stream_Audio : Mpls_PlayList_PlayItem_STN_table_Audio(); break;
- case Stream_Text : Mpls_PlayList_PlayItem_STN_table_Text() ; break;
- default : StreamKind_Last=Stream_Max;
- }
- Get_Local(3, language, "language"); Element_Info1(language);
-
- if (IDs_End-Element_Offset)
- Skip_XX(IDs_End-Element_Offset, "unknown");
- Element_End0();
-
- FILLING_BEGIN();
- if (StreamKind_Last!=Stream_Max)
- {
- if (mPID)
- {
- Fill(StreamKind_Last, StreamPos_Last, General_ID, mPID, 10, true);
- Fill(StreamKind_Last, StreamPos_Last, General_ID_String, Bdmv_Decimal_Hexa(mPID), true);
- }
- Fill(StreamKind_Last, StreamPos_Last, "Language", language);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Duration), Mpls_PlayList_PlayItem_Duration/45);
- }
- FILLING_END();
- }
-
- if (End>Element_Offset)
- Skip_XX(End-Element_Offset, "unknown");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Mpls_PlayList_PlayItem_STN_table_Video()
-{
- //Parsing
- int8u Format, FrameRate;
- BS_Begin();
- Get_S1 (4, Format, "format"); Param_Info1(Clpi_Video_Format[Format]);
- Get_S1 (4, FrameRate, "frame_rate"); Param_Info1(Clpi_Video_FrameRate[FrameRate]);
- BS_End();
-
- FILLING_BEGIN();
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, StreamPos_Last, Video_Format, Clpi_Format(stream_type));
- if (Clpi_Video_Width[Format])
- Fill(Stream_Video, StreamPos_Last, Video_Width, Clpi_Video_Width[Format]);
- if (Clpi_Video_Height[Format])
- Fill(Stream_Video, StreamPos_Last, Video_Height, Clpi_Video_Height[Format]);
- Fill(Stream_Video, StreamPos_Last, Video_Interlacement, Clpi_Video_Interlacement[Format]);
- Fill(Stream_Video, StreamPos_Last, Video_Standard, Clpi_Video_Standard[Format]);
- if (Clpi_Video_FrameRate[FrameRate])
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, Clpi_Video_FrameRate[FrameRate]);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Mpls_PlayList_PlayItem_STN_table_Audio()
-{
- //Parsing
- int8u Channels, SamplingRate;
- BS_Begin();
- Get_S1 (4, Channels, "channel_layout"); Param_Info1(Clpi_Audio_Channels[Channels]);
- Get_S1 (4, SamplingRate, "sampling_rate"); Param_Info1(Clpi_Audio_SamplingRate[SamplingRate]);
- BS_End();
-
- FILLING_BEGIN();
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format, Clpi_Format(stream_type));
- Fill(Stream_Audio, StreamPos_Last, Audio_Format_Profile, Clpi_Format_Profile(stream_type));
- if (Clpi_Audio_Channels[Channels])
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Clpi_Audio_Channels[Channels]);
- if (Clpi_Audio_SamplingRate[SamplingRate])
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, Clpi_Audio_SamplingRate[SamplingRate]);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Mpls_PlayList_PlayItem_STN_table_Text()
-{
- //Parsing
- if (stream_type==0x92) //Subtitle
- Skip_B1( "Unknown");
-
- FILLING_BEGIN();
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, StreamPos_Last, Text_Format, Clpi_Format(stream_type));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Mpls_PlayList_SubPlayItem(int8u SubPath_type, int16u Pos)
-{
- Element_Begin1("SubPlayItem");
- Ztring Clip_Information_file_name;
- int16u length;
- Get_B2 (length, "length");
- int64u End=Element_Offset+length;
- Get_Local (5, Clip_Information_file_name, "Clip_Information_file_name"); Element_Info1(Clip_Information_file_name);
- Skip_Local(4, "Clip_codec_identifier");
- Skip_B4( "unknown");
- Skip_B1( "unknown");
- Info_B4(Time_In, "time (in)"); Param_Info1((float32)Time_In/45000);
- Info_B4(Time_Out, "time (out)"); Param_Info1((float32)Time_Out/45000);
- Skip_B2( "sync PI");
- Skip_B4( "sync PTS");
-
- if (End>Element_Offset)
- Skip_XX(End-Element_Offset, "unknown");
- Element_End0();
-
- FILLING_BEGIN();
- if (SubPath_type==8 && Pos!=(int16u)-1) //MVC
- {
- if (File_Name.size()>=10+1+8)
- {
- Ztring CLPI_File=File_Name;
- CLPI_File.resize(CLPI_File.size()-(10+1+8));
- CLPI_File+=__T("CLIPINF");
- CLPI_File+=PathSeparator;
- CLPI_File+=Clip_Information_file_name;
- CLPI_File+=__T(".clpi");
-
- MediaInfo_Internal MI;
- MI.Option(__T("File_Bdmv_ParseTargetedFile"), Config->File_Bdmv_ParseTargetedFile_Get()?__T("1"):__T("0"));
- MI.Option(__T("File_IsReferenced"), __T("1"));
- if (MI.Open(CLPI_File))
- {
- if (MI.Count_Get(Stream_Video))
- {
- Ztring ID=Retrieve(Stream_Video, Pos, Video_ID);
- Ztring ID_String=Retrieve(Stream_Video, Pos, Video_ID_String);
- Ztring Format_Profile=Retrieve(Stream_Video, Pos, Video_Format_Profile);
- Ztring BitRate=Retrieve(Stream_Video, Pos, Video_BitRate);
- Ztring Source=Retrieve(Stream_Video, Pos, "Source");
- Fill(Stream_Video, Pos, Video_ID, MI.Get(Stream_Video, 0, Video_ID)+__T(" / ")+ID, true);
- Fill(Stream_Video, Pos, Video_ID_String, MI.Get(Stream_Video, 0, Video_ID_String)+__T(" / ")+ID_String, true);
- if (!Format_Profile.empty())
- Fill(Stream_Video, Pos, Video_Format_Profile, MI.Get(Stream_Video, 0, Video_Format_Profile)+__T(" / ")+Format_Profile, true);
- if (!BitRate.empty())
- Fill(Stream_Video, Pos, Video_BitRate, Ztring::ToZtring(BitRate.To_int32u()+MI.Get(Stream_Video, 0, Video_BitRate).To_int32u())+__T(" / ")+BitRate, true);
- if (!Source.empty())
- Fill(Stream_Video, Pos, "Source", Clip_Information_file_name +__T(".m2ts / ")+Source, true);
- }
- }
- }
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Mpls_PlayListMarks()
-{
- Stream_Prepare(Stream_Menu);
- Fill(Stream_Menu, StreamPos_Last, Menu_Chapters_Pos_Begin, Count_Get(Stream_Menu, StreamPos_Last), 10, true);
-
- //Parsing
- int32u time_Pos0=0, time_Pos=1;
- int16u count;
- Get_B2 (count, "count");
- for (int16u Pos=0; Pos<count; Pos++)
- {
- Element_Begin1("Mark");
- int8u type;
- Skip_B1( "unknown");
- Get_B1 (type, "type"); Param_Info1(Mpls_PlayListMarks_Mark_type(type));
- switch (type)
- {
- case 1 : //entry-mark
- case 2 : //link point
- {
- int32u time;
- int16u stream_file_index;
- Get_B2 (stream_file_index, "stream_file_index");
- Get_B4 (time, "time"); Param_Info2(time/45, " milliseconds");
- Skip_B2( "unknown");
- Skip_B4( "unknown");
-
- FILLING_BEGIN();
- if (Pos==0)
- time_Pos0=time;
- if (stream_file_index==0 && type==1) //We currently handle only the first file
- {
- Fill(Stream_Menu, 0, Ztring().Duration_From_Milliseconds((int64u)((time-time_Pos0)/45)).To_UTF8().c_str(), __T("Chapter ")+Ztring::ToZtring(time_Pos));
- time_Pos++;
- }
- FILLING_END();
- }
- break;
- default:
- Skip_XX(12, "unknwon");
- }
- Element_End0();
- }
-
- Fill(Stream_Menu, StreamPos_Last, Menu_Chapters_Pos_End, Count_Get(Stream_Menu, StreamPos_Last), 10, true);
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Mpls_ExtensionData()
-{
- entries Entries; //Key is the start address
-
- int32u Base_Pos=(int32u)Element_Offset-4;
-
- int8u number_of_ext_data_entries;
- Skip_B4( "Unknown");
- Skip_B3( "Unknown");
- Element_Begin1("Offsets");
- Get_B1 (number_of_ext_data_entries, "number_of_ext_data_entries");
- for (size_t Start_Adress_Pos=0; Start_Adress_Pos<number_of_ext_data_entries; Start_Adress_Pos++)
- {
- int32u Start_Adress, Length;
- int16u ID1, ID2;
- Get_B2 (ID1, "ID1");
- Get_B2 (ID2, "ID2");
- Get_B4 (Start_Adress, "Start_Adress");
- Get_B4 (Length, "Length");
- Entries[Base_Pos+Start_Adress].ID1=ID1;
- Entries[Base_Pos+Start_Adress].ID2=ID2;
- Entries[Base_Pos+Start_Adress].Length=Length;
- }
- Element_End0();
-
- for (entries::iterator Entry=Entries.begin(); Entry!=Entries.end(); ++Entry)
- {
- if (Entry->first>=Element_Offset) //If valid
- {
- if (Entry->first>Element_Offset)
- Skip_XX(Entry->first-Element_Offset, "unknown");
-
- Element_Begin1("Entry");
- int64u End=Element_Offset+Entry->second.Length;
- switch (Entry->second.ID1)
- {
- case 0x0001 :
- switch(Entry->second.ID2)
- {
- case 0x0001 : break; //Mpls_ExtensionData_pip_metadata(); break;
- default: ;
- }
- break;
- case 0x0002 :
- switch(Entry->second.ID2)
- {
- case 0x0001 : break; //Mpls_ExtensionData_STN_table(); break;
- case 0x0002 : Mpls_ExtensionData_SubPath_entries(); break;
- case 0x0003 : break; //Mpls_ExtensionData_active_video_window(); break;
- default: ;
- }
- break;
- default : ;
- }
- if (End>Element_Offset)
- Skip_XX(End-Element_Offset, "Unknown");
- Element_End0();
- }
- }
-
- if (Element_Size>Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::Mpls_ExtensionData_SubPath_entries()
-{
- Element_Begin1("SubPath_entries");
- int32u length;
- int16u number_of_SubPath_extensions;
- int8u SubPath_type;
- Get_B4 (length, "length");
- int64u End=Element_Offset+length;
- Get_B2 (number_of_SubPath_extensions, "number_of_SubPath_extensions");
- for (int8u SubPath_extension=0; SubPath_extension<number_of_SubPath_extensions; SubPath_extension++)
- {
- Element_Begin1("SubPath_extension");
- int32u SubPath_extension_length;
- Get_B4 (SubPath_extension_length, "length");
- int64u SubPath_extension_End=Element_Offset+SubPath_extension_length;
- Skip_B1( "Unknown");
- Get_B1 (SubPath_type, "SubPath_type");
- switch(SubPath_type)
- {
- case 0x08 :
- {
- int8u number_of_SubPlayItems;
- Skip_B3( "Unknown");
- Get_B1 (number_of_SubPlayItems, "number_of_SubPlayItems");
- for (int8u Pos=0; Pos<number_of_SubPlayItems; Pos++)
- Mpls_PlayList_SubPlayItem(SubPath_type, Pos);
- }
- default : ;
- }
- if (SubPath_extension_End-Element_Offset)
- Skip_XX(SubPath_extension_End-Element_Offset, "Padding");
- Element_End0();
- }
- if (End-Element_Offset)
- Skip_XX(End-Element_Offset, "Padding");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::StreamCodingInfo_Video()
-{
- //Parsing
- int8u Format, FrameRate, AspectRatio;
- BS_Begin();
- Get_S1 (4, Format, "Format"); Param_Info1(Clpi_Video_Format[Format]);
- Get_S1 (4, FrameRate, "Frame rate"); Param_Info1(Clpi_Video_FrameRate[FrameRate]);
- Get_S1 (4, AspectRatio, "Aspect ratio"); Param_Info1(Clpi_Video_AspectRatio[AspectRatio]);
- Skip_BS(4, "Reserved");
- BS_End();
-
- FILLING_BEGIN();
- if (StreamKind_Last==Stream_Max)
- {
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, StreamPos_Last, Video_Format, Clpi_Format(stream_type));
- if (Clpi_Video_Width[Format])
- Fill(Stream_Video, StreamPos_Last, Video_Width, Clpi_Video_Width[Format]);
- if (Clpi_Video_Height[Format])
- Fill(Stream_Video, StreamPos_Last, Video_Height, Clpi_Video_Height[Format]);
- Fill(Stream_Video, StreamPos_Last, Video_Interlacement, Clpi_Video_Interlacement[Format]);
- Fill(Stream_Video, StreamPos_Last, Video_Standard, Clpi_Video_Standard[Format]);
- if (Clpi_Video_FrameRate[FrameRate])
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, Clpi_Video_FrameRate[FrameRate]);
- if (Clpi_Video_Height[AspectRatio])
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, Clpi_Video_AspectRatio[AspectRatio], 3, true);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::StreamCodingInfo_Audio()
-{
- //Parsing
- Ztring Language;
- int8u Channels, SamplingRate;
- BS_Begin();
- Get_S1 (4, Channels, "Channel layout"); Param_Info1(Clpi_Audio_Channels[Channels]);
- Get_S1 (4, SamplingRate, "Sampling Rate"); Param_Info1(Clpi_Audio_SamplingRate[SamplingRate]);
- BS_End();
- Get_Local(3, Language, "Language"); Element_Info1(Language);
-
- FILLING_BEGIN();
- if (StreamKind_Last==Stream_Max)
- {
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format, Clpi_Format(stream_type));
- Fill(Stream_Audio, StreamPos_Last, Audio_Format_Profile, Clpi_Format_Profile(stream_type));
- if (Clpi_Audio_Channels[Channels])
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Clpi_Audio_Channels[Channels]);
- if (Clpi_Audio_SamplingRate[SamplingRate])
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, Clpi_Audio_SamplingRate[SamplingRate]);
- }
- Fill(Stream_Audio, StreamPos_Last, Audio_Language, Language);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Bdmv::StreamCodingInfo_Text()
-{
- //Parsing
- Ztring Language;
- if (stream_type==0x92) //Subtitle
- Skip_B1( "Unknown");
- Get_Local(3, Language, "Language"); Element_Info1(Language);
-
- FILLING_BEGIN();
- if (StreamKind_Last==Stream_Max)
- {
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, StreamPos_Last, Text_Format, Clpi_Format(stream_type));
- }
- Fill(Stream_Text, StreamPos_Last, Text_Language, Language);
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_BDMV_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Bdmv.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Bdmv.h
deleted file mode 100644
index 8abf94508..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Bdmv.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Blu-ray Movie files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_BdmvH
-#define MediaInfo_File_BdmvH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <set>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Bdmv
-//***************************************************************************
-
-class File_Bdmv : public File__Analyze
-{
-public :
- void BDMV(); //The BDMV directory
-
-private :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-
- //Elements
- void Clpi_ProgramInfo();
- void Clpi_ExtensionData();
- void Indx_AppInfoBDMV();
- void Indx_Indexes();
- void Indx_Indexes_Index(int8u object_type);
- void Indx_ExtensionData();
- void Indx_ExtensionData_IDEX();
- void Indx_ExtensionData_IDEX_UIAppInfoAVCHD();
- void Indx_ExtensionData_IDEX_TableOfPlayLists();
- void Indx_ExtensionData_IDEX_MakersPrivateData();
- void Mobj_MovieObjects();
- void Mobj_ExtensionData();
- void Mpls_AppInfoPlayList();
- void Mpls_PlayList();
- void Mpls_PlayList_PlayItem();
- void Mpls_PlayList_PlayItem_STN_table();
- void Mpls_PlayList_PlayItem_STN_table_Video();
- void Mpls_PlayList_PlayItem_STN_table_Audio();
- void Mpls_PlayList_PlayItem_STN_table_Text();
- void Mpls_PlayList_SubPlayItem(int8u SubPath_type, int16u Pos);
- void Mpls_PlayListMarks();
- void Mpls_ExtensionData();
- void Mpls_ExtensionData_SubPath_entries();
- void StreamCodingInfo_Video();
- void StreamCodingInfo_Audio();
- void StreamCodingInfo_Text();
-
- //Temp
- int8u stream_type;
- std::map<int32u, size_t> Types; //Key is the start address
- int64u Mpls_PlayList_Duration;
- int64u Mpls_PlayList_PlayItem_Duration;
- int16u Mpls_PlayList_number_of_SubPaths;
- bool Mpls_PlayList_IsParsed;
- std::set<Ztring> Clip_Information_file_names;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Cdxa.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Cdxa.cpp
deleted file mode 100644
index 3a3c14759..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Cdxa.cpp
+++ /dev/null
@@ -1,309 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_CDXA_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Cdxa.h"
-#include "ZenLib/Utils.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// Format
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// CDXA = RIFF header + Raw sectors
-// Riff header size = 44
-// Raw sector size = 2352
-//
-// Raw sector :
-// Sync 12 bytes (00 FF .. FF 00)
-// Header 4 bytes
-// SubHeader 8 bytes
-// Datas 2324 bytes
-// EDC (CRC) 4 bytes
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Cdxa::File_Cdxa()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("CDXA");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Cdxa;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- MustSynchronize=true;
-
- //Temp
- MI=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_Cdxa::~File_Cdxa()
-{
- delete MI; //MI=NULL;
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-// RIFF Header, 44 bytes
-// RIFF header 4 bytes, Pos=0
-// RIFF data size 4 bytes, Pos=4
-// Format (CDXA) 4 bytes, Pos=8
-// Format Header 4 bytes, Pos=12
-// Format Size 4 bytes, Pos=16
-// Format user_id 2 bytes, Pos=20
-// Format group_id 2 bytes, Pos=22
-// Format attributes 2 bytes, Pos=24
-// Format xa_signature 2 bytes, Pos=26 ("XA")
-// Format xa_track_number 4 bytes, Pos=28
-// Format Reserved 4 bytes, Pos=32
-// Data Header 4 bytes, Pos=36
-// Data Size 4 bytes, Pos=40
-//
-// Attributes (big endian):
-// 15 Directory
-// 14 CDDA
-// 13 Interleaved
-// 12 Mode2Form2 --> 2324 bytes/block
-// 11 Mode2Form1 --> 2048 bytes/block
-// 10 Exec_Other
-// 09 Reserved
-// 08 Read_Other
-// 07 Reserved
-// 06 Exec_Group
-// 05 Reserved
-// 04 Read_Group
-// 03 Reserved
-// 02 Exec_User
-// 01 Reserved
-// 00 Read_User
-
-//---------------------------------------------------------------------------
-bool File_Cdxa::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<0x28)
- return false; //Must wait for more data
-
- if ( CC4(Buffer+0x00)!=0x52494646 //"RIFF"
- || LittleEndian2int32u(Buffer+0x04)!=LittleEndian2int32u(Buffer+0x28)+0x24 //Sizes of chunks
- || CC4(Buffer+0x08)!=0x43445841 //"CDXA"
- || CC4(Buffer+0x0C)!=0x666D7420 //"fmt "
- || LittleEndian2int32u(Buffer+0x10)!=0x10
- || CC2(Buffer+0x1A)!=0x5841 //"XA"
- || CC4(Buffer+0x24)!=0x64617461) //"data"
- {
- Reject("CDXA");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Cdxa::FileHeader_Parse()
-{
- //Parsing
- Skip_C4( "RIFF header");
- Skip_L4( "RIFF data size");
- Skip_C4( "CDXA");
- Skip_C4( "fmt header");
- Skip_L4( "fmt size");
- Skip_L2( "user_id");
- Skip_L2( "group_id");
- Skip_L2( "attributes");
- Skip_C2( "xa_signature");
- Skip_L4( "xa_track_number");
- Skip_L4( "reserved");
- Skip_C4( "data header");
- Skip_L4( "data size");
-
- FILLING_BEGIN();
- Accept("CDXA");
- MI=new MediaInfo_Internal;
- MI->Option(__T("FormatDetection_MaximumOffset"), __T("1048576"));
- MI->Option(__T("File_IsReferenced"), __T("1"));
- //MI->Option(__T("File_IsSub"), __T("1"));
- MI->Open_Buffer_Init(File_Size, File_Offset+Buffer_Offset);
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Cdxa::Synchronize()
-{
- //Synchronizing
- while ( Buffer_Offset+2352*3+12<=Buffer_Size
- && !(CC8(Buffer+Buffer_Offset+2352*0)==0x00FFFFFFFFFFFFFFLL && CC4(Buffer+Buffer_Offset+2352*0+8)==0xFFFFFF00
- && CC8(Buffer+Buffer_Offset+2352*1)==0x00FFFFFFFFFFFFFFLL && CC4(Buffer+Buffer_Offset+2352*1+8)==0xFFFFFF00
- && CC8(Buffer+Buffer_Offset+2352*2)==0x00FFFFFFFFFFFFFFLL && CC4(Buffer+Buffer_Offset+2352*2+8)==0xFFFFFF00
- && CC8(Buffer+Buffer_Offset+2352*3)==0x00FFFFFFFFFFFFFFLL && CC4(Buffer+Buffer_Offset+2352*3+8)==0xFFFFFF00))
- Buffer_Offset++;
- if (Buffer_Offset+2352*3+12>Buffer_Size)
- return false;
-
- //Synched is OK
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Cdxa::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+12>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (!(CC8(Buffer+Buffer_Offset)==0x00FFFFFFFFFFFFFFLL && CC4(Buffer+Buffer_Offset+8)==0xFFFFFF00))
- Synched=false;
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Cdxa::Streams_Finish ()
-{
- if (!MI)
- return;
-
- //If nothing
- if (MI->Info==NULL || !MI->Info->Status[IsAccepted])
- {
- Fill(Stream_General, 0, General_Format, "CDXA");
- }
- else
- {
-
- //General
- MI->Info->Open_Buffer_Finalize();
- Merge(*(MI->Info));
- Merge(*(MI->Info), Stream_General, 0, 0);
- const Ztring &Format=Retrieve(Stream_General, 0, General_Format);
- Fill(Stream_General, 0, General_Format, (Ztring(__T("CDXA/"))+Format).c_str(), Unlimited, true);
- Clear(Stream_General, 0, General_Duration);
- Clear(Stream_Video, 0, Video_Duration);
- }
-
- //Purge what is not needed anymore
- if (!File_Name.empty()) //Only if this is not a buffer, with buffer we can have more data
- {
- delete MI; MI=NULL;
- }
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Cdxa::Header_Parse()
-{
- //Parsing
- Skip_B4( "Sync1");
- Skip_B4( "Sync2");
- Skip_B4( "Sync3");
- Skip_B4( "Header");
- Skip_B8( "SubHeader");
-
- //Filling
- Header_Fill_Size(2352);
- Header_Fill_Code(0, "Chunk");
-}
-
-//---------------------------------------------------------------------------
-void File_Cdxa::Data_Parse()
-{
- if (MI==NULL)
- {
- //Where is the header? --> Problem
- Reject("CDXA");
- return;
- }
-
- //CRC or not?
- int64u CRC_Size=4;
- if (Element_Size!=2328)
- CRC_Size=0;
-
- //Parsing
- Skip_XX(Element_Size-CRC_Size, "Data");
- if (CRC_Size>0)
- Skip_B4( "CRC");
-
- //Preparing to fill MediaInfo with a buffer
- MI->Open_Buffer_Position_Set(File_Offset+Buffer_Offset);
-
- //Sending the buffer to MediaInfo
- MI->Open_Buffer_Continue(Buffer+Buffer_Offset, (size_t)(Element_Size-CRC_Size));
-
- //Testing if filled
- if (MI->Info->Status[IsFilled]) {
-
- }
-
- //Testing if MediaInfo always need data
- File_GoTo=MI->Open_Buffer_Continue_GoTo_Get();
- if (File_GoTo==(int64u)-1 && MI->Info->Status[IsFilled] && File_Size!=(int64u)-1 && File_Offset+Buffer_Size<File_Size/2)
- GoToFromEnd(File_Offset+Buffer_Size);
- if (File_GoTo!=(int64u)-1)
- Info("CDXA, Jumping to end of file");
-
- //Details
- #if MEDIAINFO_TRACE
- if (Config_Trace_Level)
- {
- if (!MI->Inform().empty())
- Element_Show_Add(MI->Inform());
- }
- #endif //MEDIAINFO_TRACE
-
- //Demux
- Demux(Buffer+Buffer_Offset, (size_t)(Element_Size-CRC_Size), ContentType_MainStream);
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_CDXA_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Cdxa.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Cdxa.h
deleted file mode 100644
index a4796798c..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Cdxa.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about CDXA files
-// (like Video-CD...)
-// CDXA are read by MS-Windows with CRC bytes
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_CdxaH
-#define MediaInfo_File_CdxaH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class MediaInfo_Internal;
-
-//***************************************************************************
-// Class File_Cdxa
-//***************************************************************************
-
-class File_Cdxa : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Cdxa();
- ~File_Cdxa();
-
-private :
- //Streams management
- void Streams_Finish ();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Temp
- MediaInfo_Internal* MI;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DashMpd.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DashMpd.cpp
deleted file mode 100644
index f855a0c6d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DashMpd.cpp
+++ /dev/null
@@ -1,709 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-// Period
-// AdaptationSet --> One per stream
-// SegmentTemplate (optional)
-// SegmentTimeline
-// S --> duration per segment, count of segments
-// Representation --> file name from SegmentTemplate or BaseURL
-// SegmentBase
-// SegmentList
-// Representation --> file name from BaseURL
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DASHMPD_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_DashMpd.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "ZenLib/FileName.h"
-#include "ZenLib/File.h"
-#include "tinyxml2.h"
-using namespace ZenLib;
-using namespace tinyxml2;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-void DashMpd_Transform (Ztring &Value, std::map<Ztring, Ztring> &Attributes)
-{
- size_t Pos1=0;
- for (;;)
- {
- Pos1=Value.find(__T('$'), Pos1);
- if (Pos1==string::npos)
- break;
- size_t Pos2=Value.find(__T('$'), Pos1+1);
- if (Pos2==string::npos)
- break;
- Ztring Name=Value.substr(Pos1+1, Pos2-Pos1-1);
- if (Name.empty())
- Value.erase(Pos1, 1);
- else
- {
- if (Name==__T("RepresentationID"))
- Name=__T("id");
- if (Name==__T("Bandwidth"))
- Name=__T("bandwidth");
- std::map<Ztring, Ztring>::iterator Attribute_It=Attributes.find(Name);
- if (Attribute_It!=Attributes.end())
- {
- Value.erase(Pos1, Pos2-Pos1+1);
- Value.insert(Pos1, Attribute_It->second);
- }
- else
- Pos1+=2+Name.size();
- }
- }
-}
-
-//---------------------------------------------------------------------------
-stream_t DashMpd_mimeType_StreamKind (const char* mimeType)
-{
- Ztring StreamKind; StreamKind.From_UTF8(mimeType);
- if (StreamKind.find(__T("video"))==0)
- return Stream_Video;
- else if (StreamKind.find(__T("audio"))==0)
- return Stream_Audio;
- else if (StreamKind.find(__T("application/ttml+xml"))==0)
- return Stream_Text;
- else
- return Stream_Other;
-}
-
-//---------------------------------------------------------------------------
-Ztring DashMpd_codecid_CodecID (const char* codecid)
-{
- Ztring CodecID;
-
- Ztring Codecs; Codecs.From_UTF8(codecid);
- size_t DotPos=Codecs.find(__T('.'));
- if (DotPos==4 && Codecs.substr(0, DotPos).find(__T("mp4"))==0)
- DotPos=Codecs.find(__T('.'), 5);
- if (DotPos==string::npos)
- {
- CodecID=Codecs;
- }
- else
- {
- CodecID=Codecs.substr(0, DotPos);
- //TODO per format, rfc 6381 //Sequence->Infos["Format_Profile"]=;
- }
- CodecID.FindAndReplace(__T("0x"), Ztring(), 0, Ztring_Recursive);
-
- return CodecID;
-}
-
-//---------------------------------------------------------------------------
-struct template_generic
-{
- sequence* Sequence;
- Ztring SourceDir;
- Ztring BaseURL;
- Ztring initialization;
- Ztring media;
- int64u duration;
- int64u startNumber;
- int64u duration_Max;
- int64u startNumber_Max;
- struct segmenttimeline
- {
- int64u t; //start time
- int64u d; //duration per segment
- int64u r; //repeat count
-
- segmenttimeline()
- {
- t=1;
- d=1;
- r=0;
- }
- };
- std::vector<segmenttimeline> SegmentTimeLines;
- std::map<Ztring, Ztring> Attributes_ForMedia;
-
- template_generic(const Ztring &BaseURL=Ztring(), const Ztring &SourceDir=Ztring())
- {
- Sequence=new sequence;
- template_generic::BaseURL=BaseURL;
- template_generic::SourceDir=SourceDir;
- duration=1;
- startNumber=1;
- duration_Max=0;
- startNumber_Max=0;
- }
-
- template_generic(const template_generic &ToCopy)
- {
- Sequence=new sequence;
- *Sequence=*ToCopy.Sequence;
- template_generic::BaseURL=ToCopy.BaseURL;
- template_generic::SourceDir=ToCopy.SourceDir;
- initialization=ToCopy.initialization;
- media=ToCopy.media;
- duration=ToCopy.duration;
- startNumber=ToCopy.duration;
- duration_Max=ToCopy.duration_Max;
- startNumber_Max=ToCopy.startNumber_Max;
- }
-
- void AdaptationSet_Attributes_Parse (XMLElement* Item);
- void SegmentTemplate_Attributes_Parse (XMLElement* Item);
- void SegmentTimeline_Attributes_Parse (XMLElement* Item);
- void Representation_Attributes_Parse (XMLElement* Item);
-
- void Decode ();
-};
-
-void template_generic::AdaptationSet_Attributes_Parse (XMLElement* Item)
-{
- const char* Attribute;
-
- //Attributes - mineType
- Attribute=Item->Attribute("mimeType");
- if (Attribute)
- Sequence->StreamKind=DashMpd_mimeType_StreamKind(Attribute);
-
- //Attributes - codecs
- Attribute=Item->Attribute("codecs");
- if (Attribute)
- Sequence->Infos["CodecID"]=DashMpd_codecid_CodecID(Attribute);
-
- //Attributes - lang
- Attribute=Item->Attribute("lang");
- if (Attribute)
- Sequence->Infos["Language"].From_UTF8(Attribute);
-}
-
-void template_generic::SegmentTemplate_Attributes_Parse (XMLElement* Item)
-{
- const char* Attribute;
-
- //Attributes - initialization
- Attribute=Item->Attribute("initialization");
- if (Attribute)
- {
- initialization.From_UTF8(Attribute);
- }
-
- //Attributes - media
- Attribute=Item->Attribute("media");
- if (Attribute)
- {
- media.From_UTF8(Attribute);
- }
-
- //Attributes - duration
- Attribute=Item->Attribute("duration");
- if (Attribute)
- {
- duration=Ztring().From_UTF8(Attribute).To_int64u();
- }
-
- //Attributes - startNumber
- Attribute=Item->Attribute("startNumber");
- if (Attribute)
- {
- startNumber=Ztring().From_UTF8(Attribute).To_int64u();
- }
-}
-
-void template_generic::SegmentTimeline_Attributes_Parse (XMLElement* Item)
-{
- const char* Attribute;
- segmenttimeline SegmentTimeLine;
-
- //Attributes - t (start time)
- Attribute=Item->Attribute("t");
- if (Attribute)
- {
- SegmentTimeLine.t=Ztring().From_UTF8(Attribute).To_int64u();
- }
- else
- SegmentTimeLine.t=startNumber;
-
- //Attributes - d (duration per segment)
- Attribute=Item->Attribute("d");
- if (Attribute)
- {
- SegmentTimeLine.d=Ztring().From_UTF8(Attribute).To_int64u();
- }
- else
- SegmentTimeLine.d=duration;
-
- //Attributes - r (repeat count)
- Attribute=Item->Attribute("r");
- if (Attribute)
- {
- SegmentTimeLine.r=Ztring().From_UTF8(Attribute).To_int64u();
- }
-
- SegmentTimeLines.push_back(SegmentTimeLine);
- duration_Max+=SegmentTimeLine.d*(SegmentTimeLine.r+1);
- startNumber_Max+=SegmentTimeLine.r+1;
-}
-
-void template_generic::Representation_Attributes_Parse (XMLElement* Item)
-{
- const char* Attribute;
-
- //Attributes - id
- Attribute=Item->Attribute("id");
- if (Attribute)
- {
- Sequence->StreamID=Ztring().From_UTF8(Attribute).To_int64u(16);
- }
-
- //Attributes - bandwidth
- Attribute=Item->Attribute("bandwidth");
- if (Attribute)
- {
- Sequence->Infos["BitRate"].From_UTF8(Attribute);
- }
-
- //Attributes - frame size
- Attribute=Item->Attribute("width");
- if (Attribute)
- {
- Sequence->Infos["Width"].From_UTF8(Attribute);
- }
- Attribute=Item->Attribute("height");
- if (Attribute)
- {
- Sequence->Infos["Height"].From_UTF8(Attribute);
- }
-
- //Attributes - mineType
- Attribute=Item->Attribute("mimeType");
- if (Attribute)
- Sequence->StreamKind=DashMpd_mimeType_StreamKind(Attribute);
-
- //Attributes - codecs
- Attribute=Item->Attribute("codecs");
- if (Attribute)
- Sequence->Infos["CodecID"]=DashMpd_codecid_CodecID(Attribute);
-
- //Attributes - lang
- Attribute=Item->Attribute("lang");
- if (Attribute)
- Sequence->Infos["Language"].From_UTF8(Attribute);
-
- //Attributes - Saving all attributes
- for (const XMLAttribute* Attribute_Item=Item->FirstAttribute(); Attribute_Item; Attribute_Item=Attribute_Item->Next())
- {
- Ztring Name; Name.From_UTF8(Attribute_Item->Name());
- Ztring Value; Value.From_UTF8(Attribute_Item->Value());
- Attributes_ForMedia[Name]=Value;
- }
-}
-
-//---------------------------------------------------------------------------
-void template_generic::Decode()
-{
- //initialization - URL decoding, template adaptation and add it
- if (!initialization.empty())
- {
- DashMpd_Transform(initialization, Attributes_ForMedia);
- Sequence->AddFileName(BaseURL+initialization);
- }
-
- //media - URL decoding, template adaptation and add it
- if (!media.empty())
- {
- DashMpd_Transform(media, Attributes_ForMedia);
- size_t Index_Pos=media.find(__T("$Index"));
- size_t Index_StringSize=5;
- if (Index_Pos==string::npos)
- {
- Index_Pos=media.find(__T("$Number"));
- Index_StringSize++;
- }
- int8u Index_Size=1;
- if (Index_Pos!=string::npos)
- {
- size_t Index_Pos_End=media.find(__T('$'), Index_Pos+1+Index_StringSize);
- if (Index_Pos_End!=string::npos && Index_Pos+1+Index_StringSize+2<Index_Pos_End && media[Index_Pos+1+Index_StringSize]=='%' && media[Index_Pos+1+Index_StringSize+1]=='0')
- {
- Index_Size=Ztring(media.substr(Index_Pos+1+Index_StringSize+2, Index_Pos_End-(Index_Pos+1+Index_StringSize+2))).To_int8u();
- }
- else if (Index_Pos_End==string::npos || Index_Pos+1+Index_StringSize!=Index_Pos_End)
- Index_Pos=string::npos;
- }
- size_t Time_Pos=media.find(__T("$Time$"));
- if (Index_Pos!=string::npos || Time_Pos!=string::npos)
- {
- Ztring Media_Name(media);
- if (Index_Pos!=string::npos)
- {
- Media_Name.erase(Index_Pos, 1+Index_StringSize+1);
- if (Time_Pos!=string::npos && Time_Pos>Index_Pos)
- Time_Pos-=1+Index_StringSize+1;
- }
- if (Time_Pos!=string::npos)
- {
- Media_Name.erase(Time_Pos, 6);
- if (Index_Pos!=string::npos && Index_Pos>Time_Pos)
- Index_Pos-=6;
- }
- if (SegmentTimeLines.empty())
- {
- int64u Index_Pos_Temp=startNumber;
- for (;;)
- {
- Ztring Media_Name_Temp(Media_Name);
- Ztring Index; Index.From_Number(Index_Pos_Temp);
- if (Index.size()<Index_Size)
- Index.insert(0, Index_Size-Index.size(), __T('0'));
- Media_Name_Temp.insert(Index_Pos, Index);
-
- Ztring File_Name;
- if (!SourceDir.empty())
- File_Name+=SourceDir+PathSeparator;
- File_Name+=BaseURL+Media_Name_Temp;
- if (!File::Exists(File_Name))
- break;
- Sequence->AddFileName(File_Name);
- Index_Pos_Temp++;
- }
- }
- else
- {
- int64u SegmentTimeLines_duration=0;
- int64u SegmentTimeLines_startNumber=startNumber;
- for (size_t SegmentTimeLines_Pos=0; SegmentTimeLines_Pos<SegmentTimeLines.size(); SegmentTimeLines_Pos++)
- {
- for (int64u Pos=0; Pos<=SegmentTimeLines[SegmentTimeLines_Pos].r; Pos++)
- {
- Ztring Media_Name_Temp(Media_Name);
- size_t Time_Pos_Temp=Time_Pos;
- if (Index_Pos!=string::npos)
- {
- Ztring Index; Index.From_Number(SegmentTimeLines_startNumber);
- if (Index.size()<Index_Size)
- Index.insert(0, Index_Size-Index.size(), __T('0'));
- Media_Name_Temp.insert(Index_Pos, Index);
- if (Time_Pos!=string::npos && Time_Pos>Index_Pos)
- Time_Pos_Temp+=Index.size();
- }
- if (Time_Pos_Temp!=string::npos)
- {
- Ztring Time; Time.From_Number(SegmentTimeLines_duration);
- Media_Name_Temp.insert(Time_Pos_Temp, Time);
- }
-
- Sequence->AddFileName(BaseURL+Media_Name_Temp);
- SegmentTimeLines_duration+=SegmentTimeLines[SegmentTimeLines_Pos].d;
- SegmentTimeLines_startNumber++;
- }
- }
- }
- }
- else
- Sequence->AddFileName(BaseURL+media);
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_DashMpd::File_DashMpd()
-:File__Analyze()
-{
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_DashMpd;
- StreamIDs_Width[0]=16;
- #endif //MEDIAINFO_EVENTS
-
- //Temp
- ReferenceFiles=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_DashMpd::~File_DashMpd()
-{
- delete ReferenceFiles; //ReferenceFiles=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DashMpd::Streams_Finish()
-{
- if (ReferenceFiles==NULL)
- return;
-
- ReferenceFiles->ParseReferences();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_DashMpd::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- if (ReferenceFiles==NULL)
- return 0;
-
- return ReferenceFiles->Seek(Method, Value, ID);
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_DashMpd::FileHeader_Begin()
-{
- XMLDocument document;
- if (!FileHeader_Begin_XML(document))
- return false;
-
- {
- XMLElement* Root=document.FirstChildElement("MPD");
- if (Root)
- {
- const char* Attribute=Root->Attribute("xmlns");
- if (Attribute==NULL
- || (Ztring().From_UTF8(Attribute)!=__T("urn:mpeg:DASH:schema:MPD:2011")
- && Ztring().From_UTF8(Attribute)!=__T("urn:mpeg:dash:schema:mpd:2011") //Some muxers use lower case version
- && Ztring().From_UTF8(Attribute)!=__T("urn:3GPP:ns:PSS:AdaptiveHTTPStreamingMPD:2009")))
- {
- Reject("DashMpd");
- return false;
- }
-
- Accept("DashMpd");
- Fill(Stream_General, 0, General_Format, "DASH MPD");
- Config->File_ID_OnlyRoot_Set(false);
-
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
-
- //Parsing main elements
- Ztring BaseURL;
-
- for (XMLElement* Root_Item=Root->FirstChildElement(); Root_Item; Root_Item=Root_Item->NextSiblingElement())
- {
- //Common information
- if (string(Root_Item->Value())=="BaseURL")
- {
- if (BaseURL.empty()) //Using the first one
- BaseURL=Root_Item->GetText();
- }
-
- //Period
- if (string(Root_Item->Value())=="Period")
- {
- for (XMLElement* Period_Item=Root_Item->FirstChildElement(); Period_Item; Period_Item=Period_Item->NextSiblingElement())
- {
- //AdaptationSet (=a stream)
- if (string(Period_Item->Value())=="AdaptationSet")
- {
- template_generic Template_Generic(BaseURL, FileName(File_Name).Path_Get());
-
- Template_Generic.AdaptationSet_Attributes_Parse(Period_Item);
-
- //Sub
- for (XMLElement* AdaptationSet_Item=Period_Item->FirstChildElement(); AdaptationSet_Item; AdaptationSet_Item=AdaptationSet_Item->NextSiblingElement())
- {
- //SegmentTemplate
- if (string(AdaptationSet_Item->Value())=="SegmentTemplate")
- {
- Template_Generic.SegmentTemplate_Attributes_Parse(AdaptationSet_Item);
-
- //Sub
- for (XMLElement* SegmentTemplate_Item=AdaptationSet_Item->FirstChildElement(); SegmentTemplate_Item; SegmentTemplate_Item=SegmentTemplate_Item->NextSiblingElement())
- {
- //SegmentTimeline
- if (string(SegmentTemplate_Item->Value())=="SegmentTimeline")
- {
- //Sub
- for (XMLElement* SegmentTimeline_Item=SegmentTemplate_Item->FirstChildElement(); SegmentTimeline_Item; SegmentTimeline_Item=SegmentTimeline_Item->NextSiblingElement())
- {
- //SegmentTimeline
- if (string(SegmentTimeline_Item->Value())=="S")
- {
- Template_Generic.SegmentTimeline_Attributes_Parse(SegmentTimeline_Item);
- }
- }
- }
- }
- }
-
- //Representation
- if (string(AdaptationSet_Item->Value())=="Representation")
- {
- template_generic Template_Generic_PerRepresentation(Template_Generic);
-
- Template_Generic_PerRepresentation.Representation_Attributes_Parse(AdaptationSet_Item);
-
- //Sub
- for (XMLElement* Representation_Item=AdaptationSet_Item->FirstChildElement(); Representation_Item; Representation_Item=Representation_Item->NextSiblingElement())
- {
- //BaseURL
- if (string(Representation_Item->Value())=="BaseURL")
- {
- Template_Generic_PerRepresentation.Sequence->AddFileName(BaseURL+Ztring().From_UTF8(Representation_Item->GetText()));
- }
-
- //SegmentTemplate
- if (string(Representation_Item->Value())=="SegmentTemplate")
- {
- Template_Generic_PerRepresentation.SegmentTemplate_Attributes_Parse(Representation_Item);
- }
-
- //SegmentBase
- if (string(Representation_Item->Value())=="SegmentBase")
- {
- //Sub
- for (XMLElement* SegmentBase_Item=Representation_Item->FirstChildElement(); SegmentBase_Item; SegmentBase_Item=SegmentBase_Item->NextSiblingElement())
- {
- //Initialization
- if (string(SegmentBase_Item->Value())=="Initialization")
- {
- Attribute=SegmentBase_Item->Attribute("sourceURL");
- if (Attribute)
- Template_Generic_PerRepresentation.Sequence->AddFileName(BaseURL+Ztring().From_UTF8(Attribute), 0);
- }
- }
- }
-
- //SegmentList
- if (string(Representation_Item->Value())=="SegmentList")
- {
- //Sub
- for (XMLElement* SegmentBase_Item=Representation_Item->FirstChildElement(); SegmentBase_Item; SegmentBase_Item=SegmentBase_Item->NextSiblingElement())
- {
- //Initialization
- if (string(SegmentBase_Item->Value())=="SegmentURL")
- {
- bool IsSupported=true;
- Attribute=SegmentBase_Item->Attribute("mediaRange");
- if (Attribute)
- {
- size_t Length=strlen(Attribute);
- if (Length<2
- || Attribute[0]!='0'
- || Attribute[1]!='-')
- IsSupported=false; //Currently, we do not support ranges
- }
-
- Attribute=SegmentBase_Item->Attribute("media");
- if (Attribute && IsSupported)
- Template_Generic_PerRepresentation.Sequence->AddFileName(BaseURL+Ztring().From_UTF8(Attribute));
- }
- }
- }
- }
-
- Template_Generic_PerRepresentation.Decode();
- ReferenceFiles->AddSequence(Template_Generic_PerRepresentation.Sequence);
- }
- }
- }
-
- //Representation (=a stream)
- if (string(Period_Item->Value())=="Representation")
- {
- sequence* Sequence=new sequence;
- int64u duration=1;
-
- //Attributes - mineType
- Attribute=Period_Item->Attribute("mimeType");
- if (Attribute)
- Sequence->StreamKind=DashMpd_mimeType_StreamKind(Attribute);
-
- //Attributes - codecs
- Attribute=Period_Item->Attribute("codecs");
- if (Attribute)
- Sequence->Infos["CodecID"]=DashMpd_codecid_CodecID(Attribute);
-
- //Attributes - lang
- Attribute=Period_Item->Attribute("lang");
- if (Attribute)
- Sequence->Infos["Language"].From_UTF8(Attribute);
-
- //Sub
- for (XMLElement* AdaptationSet_Item=Period_Item->FirstChildElement(); AdaptationSet_Item; AdaptationSet_Item=AdaptationSet_Item->NextSiblingElement())
- {
- //SegmentInfo
- if (string(AdaptationSet_Item->Value())=="SegmentInfo")
- {
- //Attributes - duration
- Attribute=AdaptationSet_Item->Attribute("duration");
- if (Attribute)
- {
- duration=Ztring().From_UTF8(Attribute).To_int64u();
- }
-
- //Sub
- for (XMLElement* SegmentInfo_Item=AdaptationSet_Item->FirstChildElement(); SegmentInfo_Item; SegmentInfo_Item=SegmentInfo_Item->NextSiblingElement())
- {
- //InitialisationSegmentURL
- if (string(SegmentInfo_Item->Value())=="InitialisationSegmentURL")
- {
- Attribute=SegmentInfo_Item->Attribute("sourceURL");
- if (Attribute)
- Sequence->AddFileName(BaseURL+Ztring().From_UTF8(Attribute), 0);
- }
-
- //Url
- if (string(SegmentInfo_Item->Value())=="Url")
- {
- Attribute=SegmentInfo_Item->Attribute("sourceURL");
- if (Attribute)
- Sequence->AddFileName(BaseURL+Ztring().From_UTF8(Attribute));
- }
- }
-
- ReferenceFiles->AddSequence(Sequence);
- }
- }
- }
- }
- }
- }
- }
- else
- {
- Reject("DashMpd");
- return false;
- }
- }
-
- Element_Offset=File_Size;
-
- //All should be OK...
- return true;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_DASHMPD_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DashMpd.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DashMpd.h
deleted file mode 100644
index bc2a5eebc..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DashMpd.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DASH (.mpd) files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DashMpdH
-#define MediaInfo_File_DashMpdH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_DashMpd
-//***************************************************************************
-
-class File_DashMpd : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_DashMpd();
- ~File_DashMpd();
-
-private :
- //Streams management
- void Streams_Finish ();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Helpers
- void Representation();
-
- //Temp
- File__ReferenceFilesHelper* ReferenceFiles;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpAm.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpAm.cpp
deleted file mode 100644
index a275afa76..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpAm.cpp
+++ /dev/null
@@ -1,298 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DCP_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_DcpAm.h"
-#include "MediaInfo/MediaInfo.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#include "MediaInfo/Multiple/File_DcpCpl.h"
-#include "ZenLib/Dir.h"
-#include "ZenLib/FileName.h"
-#include "tinyxml2.h"
-using namespace tinyxml2;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_DcpAm::File_DcpAm()
-:File__Analyze()
-{
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_DcpAm;
- StreamIDs_Width[0]=sizeof(size_t)*2;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent_Accept_Specific=true;
- #endif //MEDIAINFO_DEMUX
-
- //PKL
- PKL_Pos=(size_t)-1;
-
- //Temp
- ReferenceFiles=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_DcpAm::~File_DcpAm()
-{
- delete ReferenceFiles; //ReferenceFiles=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DcpAm::Streams_Finish()
-{
- if (ReferenceFiles==NULL)
- return;
-
- ReferenceFiles->ParseReferences();
-
- // Detection of IMF CPL
- bool IsImf=false;
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- if (Retrieve((stream_t)StreamKind, StreamPos, "MuxingMode").find(__T("IMF CPL"))==0)
- IsImf=true;
- if (IsImf)
- {
- Fill(Stream_General, 0, General_Format, "IMF AM", Unlimited, true, true);
- Clear(Stream_General, 0, General_Format_Version);
- }
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_DcpAm::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- if (ReferenceFiles==NULL)
- return 0;
-
- return ReferenceFiles->Seek(Method, Value, ID);
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_DcpAm::FileHeader_Begin()
-{
- XMLDocument document;
- if (!FileHeader_Begin_XML(document))
- return false;
-
- std::string NameSpace;
- XMLElement* AssetMap=document.FirstChildElement("AssetMap");
- if (AssetMap==NULL)
- {
- NameSpace="am:";
- AssetMap=document.FirstChildElement((NameSpace+"AssetMap").c_str());
- }
- if (!AssetMap)
- {
- Reject("DcpAm");
- return false;
- }
-
- const char* Attribute=AssetMap->Attribute(NameSpace.empty()?"xmlns":"xmlns:am");
- if (!Attribute)
- {
- Reject("DcpAm");
- return false;
- }
-
- if (strcmp(Attribute, "http://www.digicine.com/PROTO-ASDCP-AM-20040311#")
- && strcmp(Attribute, "http://www.smpte-ra.org/schemas/429-9/2007/AM"))
- {
- Reject("DcpAm");
- return false;
- }
-
- Accept("DcpAm");
- Fill(Stream_General, 0, General_Format, "DCP AM");
- Fill(Stream_General, 0, General_Format_Version, NameSpace=="am:"?"SMPTE":"Interop");
- Config->File_ID_OnlyRoot_Set(false);
-
- //Parsing main elements
- for (XMLElement* AssetMap_Item=AssetMap->FirstChildElement(); AssetMap_Item; AssetMap_Item=AssetMap_Item->NextSiblingElement())
- {
- //AssetList
- if (!strcmp(AssetMap_Item->Value(), (NameSpace+"AssetList").c_str()))
- {
- for (XMLElement* AssetList_Item=AssetMap_Item->FirstChildElement(); AssetList_Item; AssetList_Item=AssetList_Item->NextSiblingElement())
- {
- //Asset
- if (!strcmp(AssetList_Item->Value(), (NameSpace+"Asset").c_str()))
- {
- File_DcpPkl::stream Stream;
-
- for (XMLElement* Asset_Item=AssetList_Item->FirstChildElement(); Asset_Item; Asset_Item=Asset_Item->NextSiblingElement())
- {
- //ChunkList
- if (!strcmp(Asset_Item->Value(), (NameSpace+"ChunkList").c_str()))
- {
- for (XMLElement* ChunkList_Item=Asset_Item->FirstChildElement(); ChunkList_Item; ChunkList_Item=ChunkList_Item->NextSiblingElement())
- {
- //Chunk
- if (!strcmp(ChunkList_Item->Value(), (NameSpace+"Chunk").c_str()))
- {
- File_DcpPkl::stream::chunk Chunk;
-
- for (XMLElement* Chunk_Item=ChunkList_Item->FirstChildElement(); Chunk_Item; Chunk_Item=Chunk_Item->NextSiblingElement())
- {
- //Path
- if (!strcmp(Chunk_Item->Value(), (NameSpace+"Path").c_str()))
- Chunk.Path=Chunk_Item->GetText();
- }
-
- Stream.ChunkList.push_back(Chunk);
- }
- }
- }
-
- //Id
- if (!strcmp(Asset_Item->Value(), (NameSpace+"Id").c_str()))
- Stream.Id=Asset_Item->GetText();
-
- //PackingList
- if (!strcmp(Asset_Item->Value(), (NameSpace+"PackingList").c_str()))
- {
- PKL_Pos=Streams.size();
- Stream.StreamKind=(stream_t)(Stream_Max+2); // Means PKL
- }
- }
-
- Streams.push_back(Stream);
- }
- }
- }
-
- //Creator
- if (!strcmp(AssetMap_Item->Value(), (NameSpace+"Creator").c_str()))
- Fill(Stream_General, 0, General_Encoded_Library, AssetMap_Item->GetText());
-
- //IssueDate
- if (!strcmp(AssetMap_Item->Value(), (NameSpace+"IssueDate").c_str()))
- Fill(Stream_General, 0, General_Encoded_Date, AssetMap_Item->GetText());
-
- //Issuer
- if (!strcmp(AssetMap_Item->Value(), (NameSpace+"Issuer").c_str()))
- Fill(Stream_General, 0, General_EncodedBy, AssetMap_Item->GetText());
- }
- Element_Offset=File_Size;
-
- //Merging with PKL
- if (PKL_Pos<Streams.size() && Streams[PKL_Pos].ChunkList.size()==1)
- {
- FileName Directory(File_Name);
- Ztring PKL_FileName; PKL_FileName.From_UTF8(Streams[PKL_Pos].ChunkList[0].Path);
- if (PKL_FileName.find(__T("file://"))==0 && PKL_FileName.find(__T("file:///"))==string::npos)
- PKL_FileName.erase(0, 7); //TODO: better handling of relative and absolute file naes
- MediaInfo_Internal MI;
- MI.Option(__T("File_KeepInfo"), __T("1"));
- Ztring ParseSpeed_Save=MI.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI.Option(__T("Demux_Get"), __T(""));
- MI.Option(__T("ParseSpeed"), __T("0"));
- MI.Option(__T("Demux"), Ztring());
- MI.Option(__T("File_IsReferenced"), __T("1"));
- size_t MiOpenResult=MI.Open(Directory.Path_Get()+PathSeparator+PKL_FileName);
- MI.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (MiOpenResult
- && (MI.Get(Stream_General, 0, General_Format)==__T("DCP PKL")
- || MI.Get(Stream_General, 0, General_Format)==__T("IMF PKL")))
- {
- MergeFromPkl(((File_DcpPkl*)MI.Info)->Streams);
-
- for (size_t Pos=0; Pos<MI.Count_Get(Stream_Other); ++Pos)
- {
- Stream_Prepare(Stream_Other);
- Merge(*MI.Info, Stream_Other, Pos, StreamPos_Last);
- }
- }
- }
-
- //Creating the playlist
- if (!Config->File_IsReferenced_Get())
- {
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
-
- for (File_DcpPkl::streams::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- if (Stream->StreamKind==(stream_t)(Stream_Max+1) && Stream->ChunkList.size()==1) // Means CPL
- {
- sequence* Sequence=new sequence;
- Sequence->FileNames.push_back(Ztring().From_UTF8(Stream->ChunkList[0].Path));
-
- Sequence->StreamID=ReferenceFiles->Sequences_Size()+1;
- ReferenceFiles->AddSequence(Sequence);
- }
-
- ReferenceFiles->FilesForStorage=true;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DcpAm::MergeFromPkl (File_DcpPkl::streams &StreamsToMerge)
-{
- for (File_DcpPkl::streams::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- {
- for (File_DcpPkl::streams::iterator StreamToMerge=StreamsToMerge.begin(); StreamToMerge!=StreamsToMerge.end(); ++StreamToMerge)
- if (StreamToMerge->Id==Stream->Id)
- {
- if (Stream->StreamKind==Stream_Max)
- Stream->StreamKind=StreamToMerge->StreamKind;
- if (Stream->OriginalFileName.empty())
- Stream->OriginalFileName=StreamToMerge->OriginalFileName;
- if (Stream->Type.empty())
- Stream->Type=StreamToMerge->Type;
- if (Stream->AnnotationText.empty())
- Stream->AnnotationText=StreamToMerge->AnnotationText;
- }
- }
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_DCP_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpAm.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpAm.h
deleted file mode 100644
index 02e75379e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpAm.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DCP AssetMap files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DcpAmH
-#define MediaInfo_File_DcpAmH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/Multiple/File_DcpPkl.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_DcpAm
-//***************************************************************************
-
-class File_DcpAm : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_DcpAm();
- ~File_DcpAm();
-
- //Streams
- File_DcpPkl::streams Streams;
-
-private :
- //Streams management
- void Streams_Finish ();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //PKL
- size_t PKL_Pos;
- void MergeFromPkl (File_DcpPkl::streams &StreamsToMerge);
-
- //Temp
- File__ReferenceFilesHelper* ReferenceFiles;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpCpl.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpCpl.cpp
deleted file mode 100644
index 1f0211352..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpCpl.cpp
+++ /dev/null
@@ -1,353 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DCP_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_DcpCpl.h"
-#include "MediaInfo/Multiple/File_DcpAm.h"
-#include "MediaInfo/MediaInfo.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#include "ZenLib/Dir.h"
-#include "ZenLib/File.h"
-#include "ZenLib/FileName.h"
-#include "tinyxml2.h"
-#include <list>
-using namespace tinyxml2;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_DcpCpl::File_DcpCpl()
-:File__Analyze()
-{
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_DcpCpl;
- StreamIDs_Width[0]=sizeof(size_t)*2;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent_Accept_Specific=true;
- #endif //MEDIAINFO_DEMUX
-
- //Temp
- ReferenceFiles=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_DcpCpl::~File_DcpCpl()
-{
- delete ReferenceFiles; //ReferenceFiles=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DcpCpl::Streams_Finish()
-{
- if (ReferenceFiles==NULL)
- return;
-
- ReferenceFiles->ParseReferences();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_DcpCpl::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- if (ReferenceFiles==NULL)
- return 0;
-
- return ReferenceFiles->Seek(Method, Value, ID);
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_DcpCpl::FileHeader_Begin()
-{
- XMLDocument document;
- if (!FileHeader_Begin_XML(document))
- return false;
-
- bool IsDcp=false, IsImf=false;
-
- XMLElement* Root=document.FirstChildElement("CompositionPlaylist");
- if (!Root)
- {
- Reject("DcpCpl");
- return false;
- }
-
- const char* Attribute=Root->Attribute("xmlns");
- if (!Attribute)
- {
- Reject("DcpCpl");
- return false;
- }
-
- if (!strcmp(Attribute, "http://www.digicine.com/PROTO-ASDCP-CPL-20040511#")
- ||!strcmp(Attribute, "http://www.smpte-ra.org/schemas/429-7/2006/CPL"))
- IsDcp=true;
- if (!strcmp(Attribute, "http://www.smpte-ra.org/schemas/2067-3/XXXX") //Some muxers use XXXX instead of year
- || !strcmp(Attribute, "http://www.smpte-ra.org/schemas/2067-3/2013"))
- IsImf=true;
-
- if (!IsDcp && !IsImf)
- {
- Reject("DcpCpl");
- return false;
- }
-
- Accept("DcpCpl");
- Fill(Stream_General, 0, General_Format, IsDcp?"DCP CPL":"IMF CPL");
- Config->File_ID_OnlyRoot_Set(false);
-
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
-
- //Parsing main elements
- for (XMLElement* CompositionPlaylist_Item=Root->FirstChildElement(); CompositionPlaylist_Item; CompositionPlaylist_Item=CompositionPlaylist_Item->NextSiblingElement())
- {
- //CompositionTimecode
- if (IsImf && (!strcmp(CompositionPlaylist_Item->Value(), "CompositionTimecode") || !strcmp(CompositionPlaylist_Item->Value(), "cpl:CompositionTimecode")))
- {
- sequence* Sequence=new sequence;
- Sequence->StreamKind=Stream_Other;
- Sequence->Infos["Type"]=__T("Time code");
- Sequence->Infos["Format"]=__T("CPL TC");
- Sequence->Infos["TimeCode_Striped"]=__T("Yes");
- bool IsDropFrame=false;
-
- for (XMLElement* CompositionTimecode_Item=CompositionPlaylist_Item->FirstChildElement(); CompositionTimecode_Item; CompositionTimecode_Item=CompositionTimecode_Item->NextSiblingElement())
- {
- //TimecodeDropFrame
- if (!strcmp(CompositionTimecode_Item->Value(), "TimecodeDropFrame") || !strcmp(CompositionTimecode_Item->Value(), "cpl:TimecodeDropFrame"))
- {
- if (strcmp(CompositionTimecode_Item->GetText(), "") && strcmp(CompositionTimecode_Item->GetText(), "0"))
- IsDropFrame=true;
- }
-
- //TimecodeRate
- if (!strcmp(CompositionTimecode_Item->Value(), "TimecodeRate") || !strcmp(CompositionTimecode_Item->Value(), "cpl:TimecodeRate"))
- Sequence->Infos["FrameRate"].From_UTF8(CompositionTimecode_Item->GetText());
-
- //TimecodeStartAddress
- if (!strcmp(CompositionTimecode_Item->Value(), "TimecodeStartAddress") || !strcmp(CompositionTimecode_Item->Value(), "cpl:TimecodeStartAddress"))
- Sequence->Infos["TimeCode_FirstFrame"].From_UTF8(CompositionTimecode_Item->GetText());
- }
-
- //Adaptation
- if (IsDropFrame)
- {
- std::map<string, Ztring>::iterator Info=Sequence->Infos.find("TimeCode_FirstFrame");
- if (Info!=Sequence->Infos.end() && Info->second.size()>=11 && Info->second[8]!=__T(';'))
- Info->second[8]=__T(';');
- }
-
- Sequence->StreamID=ReferenceFiles->Sequences_Size()+1;
- ReferenceFiles->AddSequence(Sequence);
-
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_ID, Sequence->StreamID);
- for (std::map<string, Ztring>::iterator Info=Sequence->Infos.begin(); Info!=Sequence->Infos.end(); ++Info)
- Fill(Stream_Other, StreamPos_Last, Info->first.c_str(), Info->second);
- }
-
- //ReelList / SegmentList
- if ((IsDcp && !strcmp(CompositionPlaylist_Item->Value(), "ReelList"))
- || (IsImf && !strcmp(CompositionPlaylist_Item->Value(), "SegmentList")))
- {
- for (XMLElement* ReelList_Item=CompositionPlaylist_Item->FirstChildElement(); ReelList_Item; ReelList_Item=ReelList_Item->NextSiblingElement())
- {
- //Reel
- if ((IsDcp && !strcmp(ReelList_Item->Value(), "Reel"))
- || (IsImf && !strcmp(ReelList_Item->Value(), "Segment")))
- {
- for (XMLElement* Reel_Item=ReelList_Item->FirstChildElement(); Reel_Item; Reel_Item=Reel_Item->NextSiblingElement())
- {
- //AssetList
- if ((IsDcp && !strcmp(Reel_Item->Value(), "AssetList"))
- || (IsImf && !strcmp(Reel_Item->Value(), "SequenceList")))
- {
- for (XMLElement* AssetList_Item=Reel_Item->FirstChildElement(); AssetList_Item; AssetList_Item=AssetList_Item->NextSiblingElement())
- {
- //File
- //if ((IsDcp && (!strcmp(AssetList_Item->Value(), "MainPicture") || !strcmp(AssetList_Item->Value(), "MainSound")))
- // || (IsImf && (!strcmp(AssetList_Item->Value(), "cc:MainImageSequence") || !strcmp(AssetList_Item->Value(), "cc:MainImage"))))
- {
- sequence* Sequence=new sequence;
- Ztring Asset_Id;
-
- if ((IsDcp && !strcmp(AssetList_Item->Value(), "MainPicture"))
- || (IsImf && !strcmp(AssetList_Item->Value(), "cc:MainImageSequence")))
- Sequence->StreamKind=Stream_Video;
- if ((IsDcp && !strcmp(AssetList_Item->Value(), "MainSound"))
- || (IsImf && !strcmp(AssetList_Item->Value(), "cc:MainAudioSequence")))
- Sequence->StreamKind=Stream_Audio;
-
- for (XMLElement* File_Item=AssetList_Item->FirstChildElement(); File_Item; File_Item=File_Item->NextSiblingElement())
- {
- //Id
- if (!strcmp(File_Item->Value(), "Id") && Asset_Id.empty())
- Asset_Id.From_UTF8(File_Item->GetText());
-
- //ResourceList
- if (IsImf && !strcmp(File_Item->Value(), "ResourceList"))
- {
- for (XMLElement* ResourceList_Item=File_Item->FirstChildElement(); ResourceList_Item; ResourceList_Item=ResourceList_Item->NextSiblingElement())
- {
- //Resource
- if (!strcmp(ResourceList_Item->Value(), "Resource"))
- {
- Ztring Resource_Id;
-
- resource* Resource=new resource;
- for (XMLElement* Resource_Item=ResourceList_Item->FirstChildElement(); Resource_Item; Resource_Item=Resource_Item->NextSiblingElement())
- {
- //EditRate
- if (!strcmp(Resource_Item->Value(), "EditRate"))
- {
- const char* EditRate=Resource_Item->GetText();
- Resource->EditRate=atof(EditRate);
- const char* EditRate2=strchr(EditRate, ' ');
- if (EditRate2!=NULL)
- {
- float64 EditRate2f=atof(EditRate2);
- if (EditRate2f)
- Resource->EditRate/=EditRate2f;
- }
- }
-
- //EntryPoint
- if (!strcmp(Resource_Item->Value(), "EntryPoint"))
- {
- Resource->IgnoreEditsBefore=atoi(Resource_Item->GetText());
- if (Resource->IgnoreEditsAfter!=(int64u)-1)
- Resource->IgnoreEditsAfter+=Resource->IgnoreEditsBefore;
- }
-
- //Id
- if (!strcmp(File_Item->Value(), "Id") && Resource_Id.empty())
- Resource_Id.From_UTF8(File_Item->GetText());
-
- //SourceDuration
- if (!strcmp(Resource_Item->Value(), "SourceDuration"))
- Resource->IgnoreEditsAfter=Resource->IgnoreEditsBefore+atoi(Resource_Item->GetText());
-
- //TrackFileId
- if (!strcmp(Resource_Item->Value(), "TrackFileId"))
- Resource->FileNames.push_back(Ztring().From_UTF8(Resource_Item->GetText()));
- }
-
- if (Resource->FileNames.empty())
- Resource->FileNames.push_back(Resource_Id);
- Sequence->AddResource(Resource);
- }
- }
- }
- }
-
- if (Sequence->Resources.empty())
- {
- resource* Resource=new resource;
- Resource->FileNames.push_back(Asset_Id);
- Sequence->AddResource(Resource);
- }
- Sequence->StreamID=ReferenceFiles->Sequences_Size()+1;
- ReferenceFiles->AddSequence(Sequence);
- }
- }
- }
- }
- }
- }
- }
- }
-
- Element_Offset=File_Size;
-
- //Getting files names
- FileName Directory(File_Name);
- Ztring Assetmap_FileName=Directory.Path_Get()+PathSeparator+__T("ASSETMAP.xml");
- bool IsOk=false;
- if (File::Exists(Assetmap_FileName))
- IsOk=true;
- else
- {
- Assetmap_FileName.resize(Assetmap_FileName.size()-4); //Old fashion, without ".xml"
- if (File::Exists(Assetmap_FileName))
- IsOk=true;
- }
- if (IsOk)
- {
- MediaInfo_Internal MI;
- MI.Option(__T("File_KeepInfo"), __T("1"));
- Ztring ParseSpeed_Save=MI.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI.Option(__T("Demux_Get"), __T(""));
- MI.Option(__T("ParseSpeed"), __T("0"));
- MI.Option(__T("Demux"), Ztring());
- MI.Option(__T("File_IsReferenced"), __T("1"));
- size_t MiOpenResult=MI.Open(Assetmap_FileName);
- MI.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (MiOpenResult
- && (MI.Get(Stream_General, 0, General_Format)==__T("DCP AM")
- || MI.Get(Stream_General, 0, General_Format)==__T("IMF AM")))
- {
- MergeFromAm(((File_DcpAm*)MI.Info)->Streams);
- }
- }
-
- ReferenceFiles->FilesForStorage=true;
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DcpCpl::MergeFromAm (File_DcpPkl::streams &StreamsToMerge)
-{
- for (File_DcpPkl::streams::iterator StreamToMerge=StreamsToMerge.begin(); StreamToMerge!=StreamsToMerge.end(); ++StreamToMerge)
- if (!StreamToMerge->ChunkList.empty()) // Note: ChunkLists with more than 1 file are not yet supported)
- ReferenceFiles->UpdateFileName(Ztring().From_UTF8(StreamToMerge->Id), Ztring().From_UTF8(StreamToMerge->ChunkList[0].Path));
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_DCP_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpCpl.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpCpl.h
deleted file mode 100644
index 22f44e125..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpCpl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DCP/IMF Composition Playlist files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DcpCplH
-#define MediaInfo_File_DcpCplH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/Multiple/File_DcpPkl.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_DcpCpl
-//***************************************************************************
-
-class File_DcpCpl : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_DcpCpl();
- ~File_DcpCpl();
-
-private :
- //Streams management
- void Streams_Finish ();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //PKL
- size_t PKL_Pos;
- void MergeFromAm (File_DcpPkl::streams &StreamsToMerge);
-
- //Temp
- File__ReferenceFilesHelper* ReferenceFiles;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpPkl.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpPkl.cpp
deleted file mode 100644
index 0014bee51..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpPkl.cpp
+++ /dev/null
@@ -1,265 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DCP_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_DcpPkl.h"
-#include "MediaInfo/Multiple/File_DcpAm.h"
-#include "MediaInfo/Multiple/File_DcpCpl.h"
-#include "MediaInfo/MediaInfo.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#include "ZenLib/Dir.h"
-#include "ZenLib/File.h"
-#include "ZenLib/FileName.h"
-#include "tinyxml2.h"
-using namespace tinyxml2;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_DcpPkl::File_DcpPkl()
-:File__Analyze()
-{
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_DcpPkl;
- StreamIDs_Width[0]=sizeof(size_t)*2;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent_Accept_Specific=true;
- #endif //MEDIAINFO_DEMUX
-
- //Temp
- ReferenceFiles=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_DcpPkl::~File_DcpPkl()
-{
- delete ReferenceFiles; //ReferenceFiles=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DcpPkl::Streams_Finish()
-{
- if (Config->File_IsReferenced_Get() || ReferenceFiles==NULL)
- return;
-
- ReferenceFiles->ParseReferences();
-
- // Detection of IMF CPL
- bool IsImf=false;
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- if (Retrieve((stream_t)StreamKind, StreamPos, "MuxingMode").find(__T("IMF CPL"))==0)
- IsImf=true;
- if (IsImf)
- {
- Fill(Stream_General, 0, General_Format, "IMF PKL", Unlimited, true, true);
- Clear(Stream_General, 0, General_Format_Version);
- }
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_DcpPkl::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- if (Config->File_IsReferenced_Get() || ReferenceFiles==NULL)
- return 0;
-
- return ReferenceFiles->Seek(Method, Value, ID);
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_DcpPkl::FileHeader_Begin()
-{
- XMLDocument document;
- if (!FileHeader_Begin_XML(document))
- return false;
-
- XMLElement* PackingList=document.FirstChildElement("PackingList");
- if (!PackingList)
- {
- Reject("DcpPkl");
- return false;
- }
-
- const char* Attribute=PackingList->Attribute("xmlns");
- if (!Attribute)
- {
- Reject("DcpPkl");
- return false;
- }
-
- if (strcmp(Attribute, "http://www.digicine.com/PROTO-ASDCP-PKL-20040311#")
- && strcmp(Attribute, "http://www.smpte-ra.org/schemas/429-8/2007/PKL"))
- {
- Reject("DcpPkl");
- return false;
- }
-
- Accept("DcpPkl");
- Fill(Stream_General, 0, General_Format, "DCP PKL");
- Config->File_ID_OnlyRoot_Set(false);
-
- //Parsing main elements
- for (XMLElement* PackingList_Item=PackingList->FirstChildElement(); PackingList_Item; PackingList_Item=PackingList_Item->NextSiblingElement())
- {
- //AssetList
- if (!strcmp(PackingList_Item->Value(), "AssetList"))
- {
- for (XMLElement* AssetList_Item=PackingList_Item->FirstChildElement(); AssetList_Item; AssetList_Item=AssetList_Item->NextSiblingElement())
- {
- //Asset
- if (!strcmp(AssetList_Item->Value(), "Asset"))
- {
- stream Stream;
-
- for (XMLElement* File_Item=AssetList_Item->FirstChildElement(); File_Item; File_Item=File_Item->NextSiblingElement())
- {
- //AnnotationText
- if (!strcmp(File_Item->Value(), "AnnotationText"))
- Stream.AnnotationText=File_Item->GetText();
-
- //Id
- if (!strcmp(File_Item->Value(), "Id"))
- Stream.Id=File_Item->GetText();
-
- //OriginalFileName
- if (!strcmp(File_Item->Value(), "OriginalFileName"))
- Stream.OriginalFileName=File_Item->GetText();
-
- //Type
- if (!strcmp(File_Item->Value(), "Type"))
- {
- if (!strcmp(File_Item->GetText(), "application/x-smpte-mxf;asdcpKind=Picture"))
- Stream.StreamKind=Stream_Video;
- else if (!strcmp(File_Item->GetText(), "application/x-smpte-mxf;asdcpKind=Sound"))
- Stream.StreamKind=Stream_Audio;
- else if (!strcmp(File_Item->GetText(), "text/xml") || !strcmp(File_Item->GetText(), "text/xml;asdcpKind=CPL"))
- Stream.StreamKind=(stream_t)(Stream_Max+1); // Means CPL
- else
- Stream.StreamKind=Stream_Other;
- }
- }
-
- Streams.push_back(Stream);
- }
- }
- }
- }
- Element_Offset=File_Size;
-
- //Merging with Assetmap
- if (!Config->File_IsReferenced_Get())
- {
- FileName Directory(File_Name);
- Ztring Assetmap_FileName=Directory.Path_Get()+PathSeparator+__T("ASSETMAP.xml");
- bool IsOk=false;
- if (File::Exists(Assetmap_FileName))
- IsOk=true;
- else
- {
- Assetmap_FileName.resize(Assetmap_FileName.size()-4); //Old fashion, without ".xml"
- if (File::Exists(Assetmap_FileName))
- IsOk=true;
- }
- if (IsOk)
- {
- MediaInfo_Internal MI;
- MI.Option(__T("File_KeepInfo"), __T("1"));
- Ztring ParseSpeed_Save=MI.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI.Option(__T("Demux_Get"), __T(""));
- MI.Option(__T("ParseSpeed"), __T("0"));
- MI.Option(__T("Demux"), Ztring());
- MI.Option(__T("File_IsReferenced"), __T("1"));
- size_t MiOpenResult=MI.Open(Assetmap_FileName);
- MI.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (MiOpenResult
- && (MI.Get(Stream_General, 0, General_Format)==__T("DCP AM")
- || MI.Get(Stream_General, 0, General_Format)==__T("IMF AM")))
- {
- MergeFromAm(((File_DcpPkl*)MI.Info)->Streams);
- }
- }
- }
-
- //Creating the playlist
- if (!Config->File_IsReferenced_Get())
- {
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
-
- for (File_DcpPkl::streams::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- if (Stream->StreamKind==(stream_t)(Stream_Max+1) && Stream->ChunkList.size()==1) // Means CPL
- {
- sequence* Sequence=new sequence;
- Sequence->FileNames.push_back(Ztring().From_UTF8(Stream->ChunkList[0].Path));
-
- Sequence->StreamID=ReferenceFiles->Sequences_Size()+1;
- ReferenceFiles->AddSequence(Sequence);
- }
-
- ReferenceFiles->FilesForStorage=true;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DcpPkl::MergeFromAm (File_DcpPkl::streams &StreamsToMerge)
-{
- for (File_DcpPkl::streams::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- {
- for (File_DcpPkl::streams::iterator StreamToMerge=StreamsToMerge.begin(); StreamToMerge!=StreamsToMerge.end(); ++StreamToMerge)
- if (StreamToMerge->Id==Stream->Id)
- *Stream=*StreamToMerge;
- }
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_DCP_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpPkl.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpPkl.h
deleted file mode 100644
index cb2548b29..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DcpPkl.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DCP/IMF Package List files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DcpPklH
-#define MediaInfo_File_DcpPklH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_DcpPkl
-//***************************************************************************
-
-class File_DcpPkl : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_DcpPkl();
- ~File_DcpPkl();
-
- //Streams
- struct stream
- {
- stream_t StreamKind; // With special cases: Stream_Max+1 means CPL, Stream_Max+2 means PKL
- string Id;
- string OriginalFileName;
- string Type;
- string AnnotationText;
- struct chunk
- {
- string Path;
- };
- typedef std::vector<chunk> chunks;
- chunks ChunkList;
-
- stream()
- {
- StreamKind=Stream_Max;
- }
- };
- typedef std::vector<stream> streams;
- streams Streams;
-
-private :
- //Streams management
- void Streams_Finish ();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //AM
- void MergeFromAm (File_DcpPkl::streams &StreamsToMerge);
-
- //Temp
- File__ReferenceFilesHelper* ReferenceFiles;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dpg.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dpg.cpp
deleted file mode 100644
index 12cbc4cba..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dpg.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Format:
-// * File header
-// * MPEG Audio stream
-// * MPEG Video stream
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DPG_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Dpg.h"
-#if defined(MEDIAINFO_MPEGV_YES)
- #include "MediaInfo/Video/File_Mpegv.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Dpg::File_Dpg()
-{
- //Data
- Parser=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_Dpg::~File_Dpg()
-{
- delete Parser; //Parser=NULL;
-}
-
-//***************************************************************************
-// Buffer - File offset
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Dpg::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<0x14)
- return false; //Must wait for more data
-
- if ( CC4(Buffer )!=0x44504730 //"DPG0"
- || LittleEndian2int32u(Buffer+0x10)!=0) //Zero
- {
- Reject("DPG");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Dpg::FileHeader_Parse()
-{
- //Parsing
- int32u FrameCount, FrameRate, SamplingRate;
- Skip_C4( "Signature");
- Get_L4 (FrameCount, "Frame count");
- Get_L4 (FrameRate, "Frame rate"); Param_Info2(FrameRate/0x100, " fps");
- Get_L4 (SamplingRate, "Sampling rate");
- Skip_L4( "0x00000000");
- Get_L4 (Audio_Offset, "Audio Offset");
- Get_L4 (Audio_Size, "Audio Size");
- Get_L4 (Video_Offset, "Video Offset");
- Get_L4 (Video_Size, "Video Size");
-
- FILLING_BEGIN();
- Accept("DPG");
-
- Fill(Stream_General, 0, General_Format, "DPG");
-
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_FrameRate, (float)(FrameRate/0x100), 3);
- Fill(Stream_Video, 0, Video_FrameCount, FrameCount);
- Fill(Stream_Video, 0, Video_StreamSize, Video_Size);
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_SamplingRate, SamplingRate);
- Fill(Stream_Audio, 0, Audio_StreamSize, Audio_Size);
-
- //Positionning
- #if defined(MEDIAINFO_MPEGA_YES)
- Parser=new File_Mpega();
- Open_Buffer_Init(Parser);
- GoTo(Audio_Offset, "DPG");
- #elif defined(MEDIAINFO_MPEGV_YES)
- Audio_Size=0;
- Parser=new File_Mpegv();
- Open_Buffer_Init(Parser);
- GoTo(Video_Offset, "DPG");
- #else
- Finish("DPG");
- #endif
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dpg::Read_Buffer_Unsynched()
-{
- if (Parser)
- Parser->Open_Buffer_Unsynch();
-}
-
-//---------------------------------------------------------------------------
-void File_Dpg::Read_Buffer_Continue()
-{
- if (!Parser)
- return; //Not ready
-
- #if defined(MEDIAINFO_MPEGA_YES) || defined(MEDIAINFO_MPEGV_YES)
- if (Audio_Size)
- {
- #if defined(MEDIAINFO_MPEGA_YES)
- Open_Buffer_Continue(Parser, (size_t)((File_Offset+Buffer_Size<Audio_Offset+Audio_Size)?Buffer_Size:(Audio_Offset+Audio_Size-File_Offset)));
- if (Parser->Status[IsAccepted])
- {
- Parser->Open_Buffer_Unsynch();
- Finish(Parser);
- Merge(*Parser, Stream_Audio, 0, 0);
- #if defined(MEDIAINFO_MPEGV_YES)
- Audio_Size=0;
- Data_GoTo(Video_Offset, "DPG");
- delete Parser; Parser=new File_Mpegv();
- Open_Buffer_Init(Parser);
- #else
- Finish("DPG");
- #endif
- }
- #endif
- }
- else
- {
- #if defined(MEDIAINFO_MPEGV_YES)
- Open_Buffer_Continue(Parser, (size_t)((File_Offset+Buffer_Size<Video_Offset+Video_Size)?Buffer_Size:(Video_Offset+Video_Size-File_Offset)));
- if (Parser->Status[IsAccepted])
- {
- //Merging
- Parser->Open_Buffer_Unsynch();
- Finish(Parser);
- Merge(*Parser, Stream_Video, 0, 0);
-
- Finish("DPG");
- }
- #endif
- }
- #endif //defined(MEDIAINFO_MPEGA_YES) || defined(MEDIAINFO_MPEGV_YES)
-
- //Positioning
- Buffer_Offset=Buffer_Size; //We have already parsed this data
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_DPG_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dpg.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dpg.h
deleted file mode 100644
index 852d4a4af..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dpg.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DPG (Nintendo DS) files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DpgH
-#define MediaInfo_File_DpgH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Dpg
-//***************************************************************************
-
-class File_Dpg : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Dpg();
- ~File_Dpg();
-
-private :
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer
- void Read_Buffer_Unsynched();
- void Read_Buffer_Continue();
-
- //Elements
- void Audio();
- void Video();
-
- //Data
- File__Analyze* Parser;
-
- //Temp
- int32u Audio_Offset;
- int32u Audio_Size;
- int32u Video_Offset;
- int32u Video_Size;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DvDif.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DvDif.cpp
deleted file mode 100644
index 696e97239..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DvDif.cpp
+++ /dev/null
@@ -1,1853 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DVDIF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_DvDif.h"
-#if defined(MEDIAINFO_EIA608_YES)
- #include "MediaInfo/Text/File_Eia608.h"
-#endif
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#if MEDIAINFO_SEEK
- #include "MediaInfo/MediaInfo_Internal.h"
-#endif //MEDIAINFO_SEEK
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-const char* Dv_sct[]=
-{
- "Header",
- "Subcode",
- "VAUX",
- "Audio",
- "Video",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Dv_Ssyb_Pc0(int8u Pc0)
-{
- switch (Pc0)
- {
- case 0x13 : return "Timecode";
- case 0x14 : return "Binary group";
- case 0x50 :
- case 0x60 : return "Source";
- case 0x51 :
- case 0x61 : return "Source control";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Dv_Disp[]=
-{
- "4/3", //S306M, S314M
- "16/9", //S306M
- "16/9", //S306M, S314M
- "4/3", //Which spec?
- "",
- "",
- "",
- "16/9 or 4/3 depends of ssyb AP3", //Which spec?
-};
-
-//---------------------------------------------------------------------------
-const int32u Dv_Audio_SamplingRate[]=
-{
- 48000,
- 44100,
- 32000,
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-const char* Dv_StereoMode[]=
-{
- "Multi-Stero",
- "Lumped",
-};
-
-//---------------------------------------------------------------------------
-const int32u Dv_Audio_BitDepth[]=
-{
- 16,
- 12,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-const int8u Dv_ChannelsPerBlock[]=
-{
- 1,
- 2,
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-const char* Dv_Pair[]=
-{
- "One pair of channels",
- "Independent channels",
-};
-
-//---------------------------------------------------------------------------
-const char* Dv_CopyGenerationManagementSystem[]=
-{
- "Unrestricted",
- "Not used",
- "One generation only",
- "No copy",
-};
-
-//---------------------------------------------------------------------------
-const char* Dv_InputType[]=
-{
- "Analog",
- "Digital",
- "Reserved",
- "No information",
-};
-
-//---------------------------------------------------------------------------
-const char* Dv_CompressionTimes[]=
-{
- "Once",
- "Twice",
- "Three+",
- "No information",
-};
-
-//---------------------------------------------------------------------------
-const char* Dv_Emphasis[]=
-{
- "Enphasis off",
- "Enphasis on",
- "Reserved",
- "Reserved",
-};
-
-//---------------------------------------------------------------------------
-const char* Dv_consumer_camera_1_ae_mode[]=
-{
- "full automatic",
- "gain priority mode",
- "shutter priority mode",
- "iris priority mode",
- "manual",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "", //no info
-};
-
-//---------------------------------------------------------------------------
-const char* Dv_consumer_camera_1_wb_mode[]=
-{
- "automatic",
- "hold",
- "one push",
- "pre-set",
- "",
- "",
- "",
- "", //no info
-};
-
-//---------------------------------------------------------------------------
-const char* Dv_consumer_camera_1_white_balance(int8u white_balance)
-{
- switch (white_balance)
- {
- case 0x00 : return "candle";
- case 0x01 : return "incandescent lamp";
- case 0x02 : return "low color temperature; florescent lamp";
- case 0x03 : return "high color temperature; florescent lamp";
- case 0x04 : return "sunlight";
- case 0x05 : return "cloudy weather";
- case 0x1F : return ""; //No info
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Dv_consumer_camera_1_fcm[]=
-{
- "auto focus",
- "manual focus",
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_DvDif::File_DvDif()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("DV");
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
-
- //In
- Frame_Count_Valid=2;
- AuxToAnalyze=0x00; //No Aux to analyze
- IgnoreAudio=false;
-
- //Temp
- FrameSize_Theory=0;
- Duration=0;
- TimeCode_FirstFrame_ms=(int64u)-1;
- Synched_Test_Reset();
- DSF_IsValid=false;
- APT=0xFF; //Impossible
- video_source_stype=0xFF;
- audio_source_stype=0xFF;
- ssyb_AP3=0xFF;
- TF1=false; //Valid by default, for direct analyze
- TF2=false; //Valid by default, for direct analyze
- TF3=false; //Valid by default, for direct analyze
- system=false;
- FSC_WasSet=false;
- FSP_WasNotSet=false;
- video_sourcecontrol_IsParsed=false;
- audio_locked=false;
-
- #if MEDIAINFO_SEEK
- Duration_Detected=false;
- #endif //MEDIAINFO_SEEK
-
- #ifdef MEDIAINFO_DVDIF_ANALYZE_YES
- Analyze_Activated=false;
- video_source_Detected=false;
- Speed_FrameCount=0;
- Speed_FrameCount_Video_STA_Errors=0;
- Speed_FrameCount_Audio_Errors.resize(8);
- Speed_FrameCount_Timecode_Incoherency=0;
- Speed_FrameCount_Contains_NULL=0;
- Speed_Contains_NULL=0;
- Speed_FrameCount_Arb_Incoherency=0;
- Speed_FrameCount_Stts_Fluctuation=0;
- System_IsValid=false;
- Frame_AtLeast1DIF=false;
- QU=(int8u)-1;
- CH_IsPresent.resize(8);
- Speed_TimeCode_IsValid=false;
- Speed_Arb_IsValid=false;
- Mpeg4_stts=NULL;
- Mpeg4_stts_Pos=0;
- Stats.resize(10);
- Stats_Total=0;
- Stats_Total_WithoutArb=0;
- Stats_Total_AlreadyDetected=false;
- #endif //MEDIAINFO_DVDIF_ANALYZE_YES
-}
-
-//---------------------------------------------------------------------------
-File_DvDif::~File_DvDif()
-{
- for (size_t Pos=0; Pos<Streams_Audio.size(); Pos++)
- delete Streams_Audio[Pos];
-
- #if defined(MEDIAINFO_EIA608_YES)
- for (size_t Pos=0; Pos<CC_Parsers.size(); Pos++)
- delete CC_Parsers[Pos]; //CC_Parsers[Pos]=NULL;
- #endif
- #if defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- delete Mpeg4_stts; //Mpeg4_stts=NULL;
- #endif
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DvDif::Streams_Fill()
-{
- Fill(Stream_General, 0, General_Format, "DV", Unlimited, true, true);
-
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "DV");
- Fill(Stream_Video, 0, Video_Codec, "DV");
- Fill(Stream_Video, 0, Video_Standard, system?"PAL":"NTSC");
- Fill(Stream_Video, 0, Video_BitDepth, 8);
- bool IsHd=false;
- float FrameRate_Multiplicator=1;
- switch (video_source_stype)
- {
- case 0x00 :
- case 0x04 :
- Fill(Stream_Video, 0, Video_Width, 720);
- Fill(Stream_Video, 0, Video_Height, system?576:480);
- break;
- case 0x14 :
- case 0x15 :
- Fill(Stream_Video, 0, Video_Width, system?1440:1280);
- Fill(Stream_Video, 0, Video_Height, video_source_stype==0x14?1080:1035);
- IsHd=true;
- break;
- case 0x18 :
- Fill(Stream_Video, 0, Video_Width, 960);
- Fill(Stream_Video, 0, Video_Height, 720);
- FrameRate_Multiplicator=2;
- IsHd=true;
- break;
- default : ;
- }
- Fill(Stream_Video, 0, Video_FrameRate, (system?25.000:29.970)*FrameRate_Multiplicator);
- Fill(Stream_Video, 0, Video_FrameRate_Mode, "CFR");
- if (video_sourcecontrol_IsParsed)
- {
- if (FSC_WasSet && FSP_WasNotSet)
- {
- switch (video_source_stype)
- {
- case 0x14 :
- case 0x15 :
- Fill(Stream_Video, 0, Video_ScanType, "Interlaced");
- if (FieldOrder_FF)
- Fill(Stream_Video, 0, Video_ScanOrder, FieldOrder_FS?"TFF":"BFF");
- else
- Fill(Stream_Video, 0, Video_ScanOrder, FieldOrder_FS?"Top field only":"Bottom field only");
- Fill(Stream_Video, 0, Video_Interlacement, "Interlaced");
- break;
- case 0x18 :
- Fill(Stream_Video, 0, Video_ScanType, "Progressive");
- Fill(Stream_Video, 0, Video_Interlacement, "Progressive");
- break;
- default : ;
- }
- }
- else if (Interlaced)
- {
- Fill(Stream_Video, 0, Video_ScanType, "Interlaced");
- if (FieldOrder_FF)
- Fill(Stream_Video, 0, Video_ScanOrder, FieldOrder_FS?"BFF":"TFF");
- else
- Fill(Stream_Video, 0, Video_ScanOrder, FieldOrder_FS?"Bottom field only":"Top field only");
- Fill(Stream_Video, 0, Video_Interlacement, "Interlaced");
- }
- else
- {
- Fill(Stream_Video, 0, Video_ScanType, Interlaced?"Interlaced":"Progressive");
- Fill(Stream_Video, 0, Video_Interlacement, Interlaced?"Interlaced":"PFF");
- }
- switch (aspect)
- {
- case 0 :
- case 4 : Fill(Stream_Video, 0, Video_DisplayAspectRatio, 4.0/3.0, 3, true); break;
- case 1 :
- case 2 : Fill(Stream_Video, 0, Video_DisplayAspectRatio, 16.0/9.0, 3, true); break;
- case 7 : switch (ssyb_AP3)
- {
- case 0 : Fill(Stream_Video, 0, Video_DisplayAspectRatio, 16.0/9.0, 3, true); break;
- case 7 : Fill(Stream_Video, 0, Video_DisplayAspectRatio, 4.0/3.0, 3, true); break;
- default: ; //No indication of aspect ratio?
- }
- default: ;
- }
- }
-
- if (!FSC_WasSet) //Original DV 25 Mbps
- {
- if (system==false) //NTSC
- {
- switch (video_source_stype)
- {
- case 0 : Fill(Stream_Video, 0, Video_Colorimetry, "4:1:1"); break; //NTSC 25 Mbps
- default : ;
- }
- }
- else //PAL
- {
- switch (video_source_stype)
- {
- case 0 : if (APT==0)
- Fill(Stream_Video, 0, Video_Colorimetry, "4:2:0"); //PAL 25 Mbps (IEC 61834)
- else
- Fill(Stream_Video, 0, Video_Colorimetry, "4:1:1"); //PAL 25 Mbps (SMPTE 314M)
- break;
- default : ;
- }
- }
- }
- else //DV 50 Mbps and 100 Mbps
- Fill(Stream_Video, 0, Video_Colorimetry, "4:2:2");
-
- if (FrameSize_Theory && !IsHd)
- {
- float64 OverallBitRate=FrameSize_Theory*(DSF?((float64)25.000):((float64)30000/1001))*8;
- if (FSC_WasSet)
- {
- if (FSP_WasNotSet)
- OverallBitRate*=4; //DV100
- else
- OverallBitRate*=2; //DV50
- }
- if (OverallBitRate)
- {
- if (IsSub)
- Fill(Stream_Video, 0, Video_BitRate_Encoded, OverallBitRate, 0);
- else
- Fill(Stream_General, 0, General_OverallBitRate, OverallBitRate, 0);
- Fill(Stream_Video, 0, (FSC_WasSet && FSP_WasNotSet)?Video_BitRate_Maximum:Video_BitRate, OverallBitRate*134/150*76/80, 0); //134 Video DIF from 150 DIF, 76 bytes from 80 byte DIF
- }
- }
-
- if (!Config->File_DvDif_DisableAudioIfIsInContainer_Get())
- for (size_t Pos=0; Pos<Streams_Audio.size(); Pos++)
- {
- Stream_Prepare(Stream_Audio);
- for (std::map<std::string, Ztring>::iterator Info=Streams_Audio[Pos]->Infos.begin(); Info!=Streams_Audio[Pos]->Infos.end(); ++Info)
- Fill(Stream_Audio, StreamPos_Last, Info->first.c_str(), Info->second, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate_Encoded, 0);
- }
-
- if (Stream_BitRateFromContainer && Retrieve(Stream_Video, 0, Video_BitRate).empty())
- {
- if (Stream_BitRateFromContainer>=28800000*0.98 && Stream_BitRateFromContainer<=28800000*1.02)
- {
- Fill(Stream_Video, 0, Video_BitRate, ((float64)28800000)*134/150*76/80, 0);
- Fill(Stream_Video, 0, Video_BitRate_Encoded, 28800000);
- }
- if (Stream_BitRateFromContainer>=57600000*0.98 && Stream_BitRateFromContainer<=57600000*1.02)
- {
- Fill(Stream_Video, 0, Video_BitRate, ((float64)57600000)*134/150*76/80, 0);
- Fill(Stream_Video, 0, Video_BitRate_Encoded, 57600000);
- }
- if (Stream_BitRateFromContainer>=115200000*0.98 && Stream_BitRateFromContainer<=115200000*1.02)
- {
- Fill(Stream_Video, 0, Video_BitRate, ((float64)115200000)*134/150*76/80, 0);
- Fill(Stream_Video, 0, Video_BitRate_Encoded, 115200000);
- }
- }
-
- //Library settings
- Fill(Stream_Video, 0, Video_Encoded_Library_Settings, Encoded_Library_Settings);
-
- //Profile
- if (FSC_WasSet || IsHd)
- {
- if (FSP_WasNotSet || IsHd)
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "DVCPRO HD");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "DVCPRO HD");
- Clear(Stream_Video, 0, Video_BitDepth); //MXF files say that DVCPRO HD streams are 8 or 10 bits, exact?
- }
- else
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "DVCPRO 50");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "DVCPRO 50");
- Fill(Stream_Video, 0, Video_BitRate_Mode, "CBR");
- }
- }
- else if (audio_locked || (Retrieve(Stream_Video, 0, Video_Standard)==__T("PAL") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:1:1")))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "DVCPRO");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "DVCPRO");
- Fill(Stream_Video, 0, Video_BitRate_Mode, "CBR");
- }
- else
- Fill(Stream_Video, 0, Video_BitRate_Mode, "CBR");
-
- //Delay
- if (TimeCode_FirstFrame_ms!=(int64u)-1)
- {
- Fill(Stream_Video, 0, Video_Delay, TimeCode_FirstFrame_ms);
- if (TimeCode_FirstFrame.size()==11)
- Fill(Stream_Video, 0, Video_Delay_DropFrame, TimeCode_FirstFrame[8]==';'?"Yes":"No");
- Fill(Stream_Video, 0, Video_Delay_Source, "Stream");
- Fill(Stream_Video, 0, Video_TimeCode_FirstFrame, TimeCode_FirstFrame.c_str());
- Fill(Stream_Video, 0, Video_TimeCode_Source, "Subcode time code");
- for (size_t Pos=0; Pos<Count_Get(Stream_Audio); Pos++)
- {
- Fill(Stream_Audio, Pos, Audio_Delay, TimeCode_FirstFrame_ms);
- Fill(Stream_Audio, Pos, Audio_Delay_Source, "Stream");
- }
- }
-
- #if defined(MEDIAINFO_EIA608_YES)
- for (size_t Pos=0; Pos<CC_Parsers.size(); Pos++)
- if (CC_Parsers[Pos] && CC_Parsers[Pos]->Status[IsAccepted])
- {
- Finish(CC_Parsers[Pos]);
- for (size_t Pos2=0; Pos2<CC_Parsers[Pos]->Count_Get(Stream_Text); Pos2++)
- {
- Stream_Prepare(Stream_Text);
- Merge(*CC_Parsers[Pos], Stream_Text, Pos2, StreamPos_Last);
- Fill(Stream_Text, StreamPos_Last, Text_ID, CC_Parsers[Pos]->Retrieve(Stream_Text, Pos2, Text_ID), true);
- }
- }
- #endif //defined(MEDIAINFO_EIA608_YES)
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::Streams_Finish()
-{
- if (!Recorded_Date_Date.empty())
- {
- Ztring Recorded_Date(Recorded_Date_Date);
- if (Recorded_Date_Time.size()>4)
- {
- Recorded_Date+=__T(" ");
- Recorded_Date+=Recorded_Date_Time;
- }
- if (Count_Get(Stream_General)==0)
- Stream_Prepare(Stream_General);
- Fill(Stream_General, 0, General_Recorded_Date, Recorded_Date, true);
- }
- if (!IsSub && Duration)
- Fill(Stream_General, 0, General_Duration, Duration);
-
- #ifdef MEDIAINFO_DVDIF_ANALYZE_YES
- if (Config->File_DvDif_Analysis_Get())
- {
- //Errors stats
- Status[IsFinished]=true; //We need to fill it before the call to Errors_Stats_Update
- Errors_Stats_Update();
- Errors_Stats_Update_Finnish();
- }
- #endif //MEDIAINFO_DVDIF_ANALYZE_YES
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_DvDif::FileHeader_Begin()
-{
- //Must have enough buffer for having header
- if (Buffer_Size<8)
- return false; //Must wait for more data
-
- //False positives detection: detect some headers from other files, DV parser is not smart enough
- if (CC4(Buffer)==0x52494646 //RIFF
- || CC4(Buffer+4)==0x66747970 //ftyp
- || CC4(Buffer+4)==0x66726565 //free
- || CC4(Buffer+4)==0x6D646174 //mdat
- || CC4(Buffer+4)==0x6D6F6F76 //moov
- || CC4(Buffer+4)==0x736B6970 //skip
- || CC4(Buffer+4)==0x77696465 //wide
- || CC4(Buffer)==0x060E2B34) //MXF begin
- {
- Finish();
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_DvDif::Synchronize()
-{
- if (AuxToAnalyze)
- {
- Accept();
- return true;
- }
-
- while (Buffer_Offset+8*80<=Buffer_Size //8 blocks
- && !((Buffer[Buffer_Offset+0*80]&0xE0)==0x00 && (Buffer[Buffer_Offset+0*80+1]&0xF0)==0x00 && Buffer[Buffer_Offset+0*80+2]==0x00 //Header 0
- && (Buffer[Buffer_Offset+1*80]&0xE0)==0x20 && (Buffer[Buffer_Offset+1*80+1]&0xF0)==0x00 && Buffer[Buffer_Offset+1*80+2]==0x00 //Subcode 0
- && (Buffer[Buffer_Offset+2*80]&0xE0)==0x20 && (Buffer[Buffer_Offset+2*80+1]&0xF0)==0x00 && Buffer[Buffer_Offset+2*80+2]==0x01 //Subcode 1
- && (Buffer[Buffer_Offset+3*80]&0xE0)==0x40 && (Buffer[Buffer_Offset+3*80+1]&0xF0)==0x00 && Buffer[Buffer_Offset+3*80+2]==0x00 //VAUX 0
- && (Buffer[Buffer_Offset+4*80]&0xE0)==0x40 && (Buffer[Buffer_Offset+4*80+1]&0xF0)==0x00 && Buffer[Buffer_Offset+4*80+2]==0x01 //VAUX 1
- && (Buffer[Buffer_Offset+5*80]&0xE0)==0x40 && (Buffer[Buffer_Offset+5*80+1]&0xF0)==0x00 && Buffer[Buffer_Offset+5*80+2]==0x02 //VAUX 2
- && (Buffer[Buffer_Offset+6*80]&0xE0)==0x60 && (Buffer[Buffer_Offset+6*80+1]&0xF0)==0x00 && Buffer[Buffer_Offset+6*80+2]==0x00 //Audio 0
- && (Buffer[Buffer_Offset+7*80]&0xE0)==0x80 && (Buffer[Buffer_Offset+7*80+1]&0xF0)==0x00 && Buffer[Buffer_Offset+7*80+2]==0x00)) //Video 0
- Buffer_Offset++;
-
- if (Buffer_Offset+8*80>Buffer_Size)
- return false;
-
- if (!Status[IsAccepted])
- Accept();
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_DvDif::Synched_Test()
-{
- if (AuxToAnalyze)
- return true;
-
- //Must have enough buffer for having header
- if (Buffer_Offset+80>Buffer_Size)
- return false;
-
- //NULL blocks
- if (Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0x00)
- return true;
-
- SCT =(Buffer[Buffer_Offset ]&0xE0)>>5;
- DBN = Buffer[Buffer_Offset+2];
-
- //DIF Sequence Numbers
- if (DSF_IsValid)
- {
- if (Dseq_Old!=Dseq)
- {
- if (Dseq==0
- && !(!DSF && Dseq_Old==9)
- && !( DSF && Dseq_Old==11))
- {
- if (!Status[IsAccepted])
- Trusted_IsNot("Wrong order");
- else
- Synched_Test_Reset();
- }
- Dseq_Old=Dseq;
- }
- }
-
- //DIF Block Numbers
- if (SCT!=(int8u)-1)
- {
- int8u Number=DBN_Olds[SCT]+1;
- switch (SCT)
- {
- case 0 : //Header
- if (SCT_Old!=4
- || DBN!=0)
- {
- if (!Status[IsAccepted])
- Trusted_IsNot("Wrong order");
- else
- Synched_Test_Reset();
- }
- break;
- case 1 : //Subcode
- if (!((DBN==0 && SCT_Old==0) || (DBN!=0 && SCT_Old==1))
- || (Number!=DBN && !(Number==2 && DBN==0)))
- {
- if (!Status[IsAccepted])
- Trusted_IsNot("Wrong order");
- else
- Synched_Test_Reset();
- }
- break;
- case 2 : //VAUX
- if (!((DBN==0 && SCT_Old==1) || (DBN!=0 && SCT_Old==2))
- || (Number!=DBN && !(Number==3 && DBN==0)))
- {
- if (!Status[IsAccepted])
- Trusted_IsNot("Wrong order");
- else
- Synched_Test_Reset();
- }
- break;
- case 3 : //Audio
- if (!((DBN==0 && SCT_Old==2) || (DBN!=0 && SCT_Old==4))
- || (Number!=DBN && !(Number==9 && DBN==0)))
- {
- if (!Status[IsAccepted])
- Trusted_IsNot("Wrong order");
- else
- Synched_Test_Reset();
- }
- break;
- case 4 : //Video
- if (!(SCT_Old==3 || SCT_Old==4)
- || (Number!=DBN && !(Number==135 && DBN==0)))
- {
- if (!Status[IsAccepted])
- Trusted_IsNot("Wrong order");
- else
- Synched_Test_Reset();
- }
- break;
- default: ;
- }
-
- if (SCT!=(int8u)-1)
- {
- SCT_Old=SCT;
- DBN_Olds[SCT]=DBN;
- }
- }
-
- //We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::Synched_Test_Reset()
-{
- //Temp
- SCT=(int8u)-1;
- SCT_Old=4; //Video
- DBN_Olds[0]=0;
- DBN_Olds[1]=1; //SubCode
- DBN_Olds[2]=2; //Vaux
- DBN_Olds[3]=8; //Audio
- DBN_Olds[4]=134; //Video
- DBN_Olds[5]=0;
- DBN_Olds[6]=0;
- DBN_Olds[7]=0;
-
- //Synch
- Synched=false;
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::Synched_Init()
-{
- //FrameInfo
- if (FrameInfo.DTS==(int64u)-1)
- FrameInfo.DTS=0; //No DTS in container
- if (FrameInfo.PTS==(int64u)-1)
- FrameInfo.PTS=0; //No PTS in container
- if (Frame_Count_NotParsedIncluded==(int64u)-1)
- Frame_Count_NotParsedIncluded=0; //No Frame_Count_NotParsedIncluded in the container
-}
-
-//***************************************************************************
-// Buffer - Demux
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-bool File_DvDif::Demux_UnpacketizeContainer_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+8*80>Buffer_Size)
- return false;
-
- if ((Buffer[Buffer_Offset]&0xE0)==0x00 //Speed up the parsing
- && (CC3(Buffer+Buffer_Offset+0*80)&0xE0FCFF)==0x000400 //Header 0 (with FSC==false and FSP==true)
- && (CC3(Buffer+Buffer_Offset+1*80)&0xE0F0FF)==0x200000 //Subcode 0
- && (CC3(Buffer+Buffer_Offset+2*80)&0xE0F0FF)==0x200001 //Subcode 1
- && (CC3(Buffer+Buffer_Offset+3*80)&0xE0F0FF)==0x400000 //VAUX 0
- && (CC3(Buffer+Buffer_Offset+4*80)&0xE0F0FF)==0x400001 //VAUX 1
- && (CC3(Buffer+Buffer_Offset+5*80)&0xE0F0FF)==0x400002 //VAUX 2
- && (CC3(Buffer+Buffer_Offset+6*80)&0xE0F0FF)==0x600000 //Audio 0
- && (CC3(Buffer+Buffer_Offset+7*80)&0xE0F0FF)==0x800000) //Video 0
- {
- if (Demux_Offset==0)
- {
- Demux_Offset=Buffer_Offset+1;
- }
-
- while (Demux_Offset+8*80<=Buffer_Size //8 blocks
- && !((Buffer[Demux_Offset]&0xE0)==0x00 //Speed up the parsing
- && (CC3(Buffer+Demux_Offset+0*80)&0xE0FCFF)==0x000400 //Header 0 (with FSC==false and FSP==true)
- && (CC3(Buffer+Demux_Offset+1*80)&0xE0F0FF)==0x200000 //Subcode 0
- && (CC3(Buffer+Demux_Offset+2*80)&0xE0F0FF)==0x200001 //Subcode 1
- && (CC3(Buffer+Demux_Offset+3*80)&0xE0F0FF)==0x400000 //VAUX 0
- && (CC3(Buffer+Demux_Offset+4*80)&0xE0F0FF)==0x400001 //VAUX 1
- && (CC3(Buffer+Demux_Offset+5*80)&0xE0F0FF)==0x400002 //VAUX 2
- && (CC3(Buffer+Demux_Offset+6*80)&0xE0F0FF)==0x600000 //Audio 0
- && (CC3(Buffer+Demux_Offset+7*80)&0xE0F0FF)==0x800000)) //Video 0
- Demux_Offset++;
-
- if (Demux_Offset+8*80>Buffer_Size && File_Offset+Buffer_Size!=File_Size)
- return false; //No complete frame
- if (Demux_Offset+8*80>Buffer_Size && File_Offset+Buffer_Size==File_Size)
- Demux_Offset=(size_t)(File_Size-File_Offset); //Using the complete buffer (no next sync)
-
- Demux_UnpacketizeContainer_Demux();
- }
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DvDif::Read_Buffer_Unsynched()
-{
- Synched_Test_Reset();
- if (!IsSub && File_GoTo!=(int64u)-1 && (Frame_Count
- #if MEDIAINFO_SEEK
- || Duration_Detected
- #endif //MEDIAINFO_SEEK
- ) && !FSP_WasNotSet)
- {
- int64u BytesPerFrame=12000*(DSF?12:10);
- if (FSC_WasSet)
- BytesPerFrame*=2;
- Frame_Count_NotParsedIncluded=File_GoTo/BytesPerFrame;
- FrameInfo.PTS=FrameInfo.DTS=float64_int64s(Frame_Count_NotParsedIncluded/(DSF?25.000:(30.000*1000/1001))*1000000000);
- }
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_DvDif::Read_Buffer_Seek (size_t Method, int64u Value, int64u /*ID*/)
-{
- //Init
- if (!Duration_Detected)
- {
- MediaInfo_Internal MI;
- MI.Option(__T("File_KeepInfo"), __T("1"));
- Ztring ParseSpeed_Save=MI.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI.Option(__T("Demux_Get"), __T(""));
- MI.Option(__T("ParseSpeed"), __T("0"));
- MI.Option(__T("Demux"), Ztring());
- size_t MiOpenResult=MI.Open(File_Name);
- MI.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (!MiOpenResult || MI.Get(Stream_General, 0, General_Format)!=__T("DV"))
- return 0;
-
- TotalFrames=Ztring(MI.Get(Stream_Video, 0, Video_FrameCount)).To_int64u();
- int64u VideoBitRate=Ztring(MI.Get(Stream_Video, 0, Video_BitRate)).To_int64u();
- if (VideoBitRate==0 || VideoBitRate>=50000000)
- {
- FSC_WasSet=true;
- FSP_WasNotSet=true;
- }
- else if (VideoBitRate>=30000000)
- FSC_WasSet=true;
- float32 FrameRate=Ztring(MI.Get(Stream_Video, 0, Video_FrameRate)).To_float32();
- if (FrameRate>=24.0 && FrameRate<26.0)
- DSF=system=true;
- if (FrameRate>=29.0 && FrameRate<31.0)
- DSF=system=false;
- Duration_Detected=true;
- }
-
- //Parsing
- switch (Method)
- {
- case 0 :
- GoTo(Value);
- Open_Buffer_Unsynch();
- return 1;
- case 1 :
- GoTo(File_Size*Value/10000);
- Open_Buffer_Unsynch();
- return 1;
- case 2 : //Timestamp
- {
- //We transform TimeStamp to a frame number
- Value=float64_int64s(((float64)Value)*(DSF?25.000:(30.000*1000/1001))/1000000000);
- }
- //No break;
- case 3 : //FrameNumber
- if (!FSP_WasNotSet)
- {
- int64u BytesPerFrame=12000*(DSF?12:10);
- if (FSC_WasSet)
- BytesPerFrame*=2;
- GoTo(BytesPerFrame*Value);
- Open_Buffer_Unsynch();
- Frame_Count_NotParsedIncluded=Value;
- FrameInfo.PTS=FrameInfo.DTS=float64_int64s(Frame_Count_NotParsedIncluded/(DSF?25.000:(30.000*1000/1001))*1000000000);
- return 1;
- }
- else
- return (size_t)-1; //Not supported
- default : return (size_t)-1; //Not supported
- }
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DvDif::Header_Parse()
-#if MEDIAINFO_TRACE
-{
- if (AuxToAnalyze!=0x00)
- {
- SCT=(int8u)-1;
- Header_Fill_Code(AuxToAnalyze, Ztring::ToZtring(AuxToAnalyze, 16));
- Header_Fill_Size(4);
- return;
- }
-
- //Unsynch problems
- if (Element_Size<80)
- {
- Element_WaitForMoreData();
- return;
- }
- if (Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0x00)
- {
- SCT=(int8u)-1;
- Header_Fill_Code((int64u)-1);
- Header_Fill_Size(80);
- return;
- }
-
- //Parsing
- BS_Begin();
- //0
- Get_S1 (3, SCT, "SCT - Section Type"); Param_Info1(Dv_sct[SCT]);
- Skip_SB( "Res - Reserved");
- Skip_S1(4, "Arb - Arbitrary bits");
- //1
- Get_S1 (4, Dseq, "Dseq - DIF sequence number"); //0-9 for 525/60; 0-11 for 625/50
- Get_SB ( FSC, "FSC - Channel number");
- Get_SB ( FSP, "FSP - Channel number"); //SMPTE 370M only
- Skip_S1(2, "Res - Reserved");
- BS_End();
- //2
- Get_B1 (DBN, "DBN - DIF block number"); //Video: 0-134, Audio: 0-8
-
- Header_Fill_Code(SCT, Dv_sct[SCT]);
- Header_Fill_Size(80);
-}
-#else //MEDIAINFO_TRACE
-{
- if (AuxToAnalyze!=0x00)
- {
- SCT=(int8u)-1;
- Header_Fill_Code(AuxToAnalyze);
- Header_Fill_Size(4);
- return;
- }
-
- //Unsynch problems
- if (Element_Size<80)
- {
- Element_WaitForMoreData();
- return;
- }
- if (Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0x00)
- {
- SCT=(int8u)-1;
- Header_Fill_Code((int64u)-1);
- Header_Fill_Size(80);
- return;
- }
-
- //Parsing
- SCT =(Buffer[Buffer_Offset ]&0xE0)>>5;
- Dseq=(Buffer[Buffer_Offset+1]&0xF0)>>4;
- FSC =(Buffer[Buffer_Offset+1]&0x08)==0x08;
- FSP =(Buffer[Buffer_Offset+1]&0x04)==0x04;
- DBN = Buffer[Buffer_Offset+2];
- Element_Offset+=3;
-
- Header_Fill_Code(SCT);
- Header_Fill_Size(80);
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-void File_DvDif::Data_Parse()
-{
- if (Element_Code==(int64u)-1)
- {
- Skip_XX(Element_Size, "Junk");
- return;
- }
-
- //Config
- if (SCT!=(int8u)-1)
- {
- if (!FSC_WasSet && FSC)
- FSC_WasSet=true;
-
- if (!FSP_WasNotSet && !FSP)
- FSP_WasNotSet=true;
- }
-
- if (AuxToAnalyze!=0x00)
- {
- Element();
- return;
- }
-
- Element_Info1(DBN);
-
- switch (SCT)
- {
- case 0 : Header(); break;
- case 1 : Subcode(); break;
- case 2 : VAUX(); break;
- case 3 : Audio(); break;
- case 4 : Video(); break;
- default: Skip_XX(Element_Size, "Unknown");
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DvDif::Header()
-#if MEDIAINFO_TRACE
-{
- BS_Begin();
- //3
- Get_SB ( DSF, "DSF - DIF Sequence Flag"); //0=NTSC, 1=PAL
- Skip_SB( "Zero");
- Skip_S1(6, "Reserved");
-
- //4
- Skip_S1(5, "Reserved");
- Get_S1 (3, APT, "APT"); //Track application ID, 0=4:2:0, 1=not 4:2:0
-
- //5
- Get_SB ( TF1, "TF1 - Audio data is not valid");
- Skip_S1(4, "Reserved");
- Skip_S1(3, "AP1 - Audio application ID");
-
- //6
- Get_SB ( TF2, "TF2 - Video data is not valid");
- Skip_S1(4, "Reserved");
- Skip_S1(3, "AP2 - Video application ID");
-
- //7
- Get_SB ( TF3, "TF3 - Subcode is not valid");
- Skip_S1(4, "Reserved");
- Skip_S1(3, "AP3 - Subcode application ID");
-
- //8-79
- BS_End();
- Skip_XX(72, "Reserved"); //Should be filled with 0xFF
-
- if (Config->File_DvDif_IgnoreTransmittingFlags_Get())
- {
- TF1=false;
- TF2=false;
- TF3=false;
- }
-
- FILLING_BEGIN();
- DSF_IsValid=true;
- Dseq_Old=DSF?11:9;
- FrameSize_Theory=(DSF?12:10)*150*80; //12 DIF sequences for PAL, 10 for NTSC
-
- if (TF1 && TF2)
- {
- //This is not logic, the header says no audio and no video! We do not trust the header, resetting all
- TF1=false;
- TF2=false;
- TF3=false;
- }
- FILLING_END();
-}
-#else //MEDIAINFO_TRACE
-{
- if (Element_Size<77)
- {
- Trusted_IsNot("Size is wrong");
- return;
- }
-
- DSF=(Buffer[Buffer_Offset ]&0x80)?true:false;
- APT=(Buffer[Buffer_Offset+1]&0x07);
- TF1=(Buffer[Buffer_Offset+2]&0x80)?true:false;
- TF2=(Buffer[Buffer_Offset+3]&0x80)?true:false;
- TF3=(Buffer[Buffer_Offset+4]&0x80)?true:false;
-
- if (Config->File_DvDif_IgnoreTransmittingFlags_Get())
- {
- TF1=false;
- TF2=false;
- TF3=false;
- }
-
- FILLING_BEGIN();
- DSF_IsValid=true;
- Dseq_Old=DSF?11:9;
- FrameSize_Theory=(DSF?12:10)*150*80; //12 DIF sequences for PAL, 10 for NTSC
-
- if (TF1 && TF2)
- {
- //This is not logic, the header says no audio and no video! We do not trust the header, resetting all
- TF1=false;
- TF2=false;
- TF3=false;
- }
- FILLING_END();
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-void File_DvDif::Subcode()
-#if MEDIAINFO_TRACE
-{
- //Present?
- if (TF3)
- {
- Skip_XX(Element_Size, "Unused");
- return;
- }
-
- //Parsing
- for (int8u syb_num=0; syb_num<6; syb_num++)
- Subcode_Ssyb(syb_num);
- Skip_XX(29, "Unused");
-}
-#else //MEDIAINFO_TRACE
-{
- if (TF3)
- return;
-
- for (int8u syb_num=0; syb_num<6; syb_num++)
- Subcode_Ssyb(syb_num);
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-void File_DvDif::Subcode_Ssyb(int8u syb_num)
-{
- Element_Begin1("ssyb");
-
- //Parsing
- BS_Begin();
- //ID0-ID1
- Skip_SB( "FR - Identification of half of channel"); //1=first half, 0=second
- if (syb_num==0)
- {
- if (FSC==false)
- Get_S1 ( 3, ssyb_AP3, "AP3 - Subcode application ID");
- else
- Skip_S1( 3, "AP3 - Subcode application ID");
- }
- else if (DBN==1 && syb_num==5)
- Skip_S1(3, "APT - track application ID");
- else
- Skip_S1(3, "Res - Reserved");
- Skip_S1(8, "Arb - Arbitrary bits");
- Skip_S1(4, "Syb - SSYSB number");
- BS_End();
- //FFh
- Skip_B1( "0xFF");
- //PC0-PC4
- Element();
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::VAUX()
-{
- //Present?
- if (TF2)
- {
- Skip_XX(Element_Size, "Unused");
- return;
- }
-
- //Parsing
- for (int8u i=0; i<15; i++)
- Element();
- Skip_XX(2, "Unused");
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::Audio()
-{
- //Present?
- if (TF1)
- {
- Skip_XX(Element_Size, "Unused");
- return;
- }
-
- Element_Name("Audio");
-
- Element(); //First 5 bytes
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::Video()
-{
- #if MEDIAINFO_TRACE
- //Present?
- if (TF2)
- {
- Skip_XX(Element_Size, "Unused");
- return;
- }
-
- Element_Name("Video");
-
- //Parsing
- BS_Begin();
- Skip_S1(4, "STA");
- Skip_S1(4, "QNO");
- BS_End();
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- #endif //MEDIAINFO_TRACE
-
- FILLING_BEGIN();
- if (DBN==134 && video_source_stype!=(int8u)-1)
- {
- if (!Status[IsAccepted])
- {
- Accept("DV DIF");
-
- if (!IsSub)
- Fill(Stream_General, 0, General_Format, "DV");
- }
- if (!Status[IsFilled] && Frame_Count>=Frame_Count_Valid)
- #ifdef MEDIAINFO_DVDIF_ANALYZE_YES
- {
- if (Config->File_DvDif_Analysis_Get())
- Fill("DV DIF");
- else
- Finish("DV DIF");
- }
- #else //MEDIAINFO_DVDIF_ANALYZE_YES
- Finish("DV DIF");
- #endif //MEDIAINFO_DVDIF_ANALYZE_YES
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::Element()
-{
- Element_Begin0();
- int8u PackType;
- if (AuxToAnalyze==0x00)
- Get_B1 (PackType, "Pack Type");
- else
- PackType=AuxToAnalyze; //Forced by parser
-
- switch(PackType)
- {
- case 0x13 : timecode(); break;
- case 0x14 : binary_group(); break;
- case 0x50 : audio_source(); break;
- case 0x51 : audio_sourcecontrol(); break;
- case 0x52 : audio_recdate(); break;
- case 0x53 : audio_rectime(); break;
- case 0x60 : video_source(); break;
- case 0x61 : video_sourcecontrol(); break;
- case 0x62 : video_recdate(); break;
- case 0x63 : video_rectime(); break;
- case 0x65 : closed_captions(); break;
- case 0x70 : consumer_camera_1(); break;
- case 0x71 : consumer_camera_2(); break;
- case 0xFF : Element_Name(Ztring().From_Number(PackType, 16));
- Skip_B4( "Unused"); break;
- default : Element_Name(Ztring().From_Number(PackType, 16));
- Skip_B4( "Unknown");
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::binary_group()
-{
- Element_Name("binary_group");
-
- if (Buffer[Buffer_Offset+(size_t)Element_Offset ]==0xFF
- && Buffer[Buffer_Offset+(size_t)Element_Offset+1]==0xFF
- && Buffer[Buffer_Offset+(size_t)Element_Offset+2]==0xFF
- && Buffer[Buffer_Offset+(size_t)Element_Offset+3]==0xFF
- )
- {
- Skip_XX(4, "All one");
- return;
- }
-
- //Parsing
- BS_Begin();
- Skip_S1(4, "Binary group 2");
- Skip_S1(4, "Binary group 1");
- Skip_S1(4, "Binary group 4");
- Skip_S1(4, "Binary group 3");
- Skip_S1(4, "Binary group 6");
- Skip_S1(4, "Binary group 5");
- Skip_S1(4, "Binary group 8");
- Skip_S1(4, "Binary group 7");
- BS_End();
-}
-
-
-//---------------------------------------------------------------------------
-void File_DvDif::timecode()
-{
- Element_Name("timecode");
-
- if (Buffer[Buffer_Offset+(size_t)Element_Offset ]==0x00
- && Buffer[Buffer_Offset+(size_t)Element_Offset+1]==0x00
- && Buffer[Buffer_Offset+(size_t)Element_Offset+2]==0x00
- && Buffer[Buffer_Offset+(size_t)Element_Offset+3]==0x00
- )
- {
- Skip_XX(4, "All zero");
- return;
- }
-
- //Parsing
- int8u Frames_Units, Frames_Tens, Seconds_Units, Seconds_Tens, Minutes_Units, Minutes_Tens, Hours_Units, Hours_Tens;
- int64u MilliSeconds=0;
- int8u Frames=0;
- bool DropFrame=false;
- BS_Begin();
- Skip_SB( "CF - Color fame");
- if (!DSF_IsValid)
- Skip_SB( "Arbitrary bit or DP");
- else if (DSF) //625/50
- Skip_SB( "Arbitrary bit");
- else //525/60
- Get_SB (DropFrame, "DP - Drop frame"); //525/60
- Get_S1 (2, Frames_Tens, "Frames (Tens)");
- Frames+=Frames_Tens*10;
- Get_S1 (4, Frames_Units, "Frames (Units)");
- Frames+=Frames_Units;
-
- if (!DSF_IsValid)
- Skip_SB( "BGF0 or PC");
- else if (DSF) //625/50
- Skip_SB( "BGF0 - Binary group flag");
- else //525/60
- Skip_SB( "PC - Biphase mark polarity correction"); //0=even; 1=odd
- Get_S1 (3, Seconds_Tens, "Seconds (Tens)");
- MilliSeconds+=Seconds_Tens*10*1000;
- Get_S1 (4, Seconds_Units, "Seconds (Units)");
- MilliSeconds+=Seconds_Units*1000;
-
- if (!DSF_IsValid)
- Skip_SB( "BGF2 or BGF0");
- else if (DSF) //625/50
- Skip_SB( "BGF2 - Binary group flag");
- else //525/60
- Skip_SB( "BGF0 - Binary group flag");
- Get_S1 (3, Minutes_Tens, "Minutes (Tens)");
- MilliSeconds+=Minutes_Tens*10*60*1000;
- Get_S1 (4, Minutes_Units, "Minutes (Units)");
- MilliSeconds+=Minutes_Units*60*1000;
-
- if (!DSF_IsValid)
- Skip_SB( "PC or BGF1");
- else if (DSF) //625/50
- Skip_SB( "PC - Biphase mark polarity correction"); //0=even; 1=odd
- else //525/60
- Skip_SB( "BGF1 - Binary group flag");
- Skip_SB( "BGF2 - Binary group flag");
- Get_S1 (2, Hours_Tens, "Hours (Tens)");
- MilliSeconds+=Hours_Tens*10*60*60*1000;
- Get_S1 (4, Hours_Units, "Hours (Units)");
- MilliSeconds+=Hours_Units*60*60*1000;
- Element_Info1(Ztring().Duration_From_Milliseconds(MilliSeconds+((DSF_IsValid && Frames!=45)?((int64u)(Frames/(DSF?25.000:29.970)*1000)):0)));
- BS_End();
-
- if (TimeCode_FirstFrame_ms==(int64u)-1 && MilliSeconds!=167185000) //if all bits are set to 1, this is not a valid timestamp
- {
- TimeCode_FirstFrame_ms=MilliSeconds;
- if (DSF_IsValid && Frames!=45) //all bits are set to 1
-
- TimeCode_FirstFrame_ms+=(int64u)(Frames/(DSF?25.000:29.970)*1000);
-
- TimeCode_FirstFrame+=('0'+Hours_Tens);
- TimeCode_FirstFrame+=('0'+Hours_Units);
- TimeCode_FirstFrame+=':';
- TimeCode_FirstFrame+=('0'+Minutes_Tens);
- TimeCode_FirstFrame+=('0'+Minutes_Units);
- TimeCode_FirstFrame+=':';
- TimeCode_FirstFrame+=('0'+Seconds_Tens);
- TimeCode_FirstFrame+=('0'+Seconds_Units);
- TimeCode_FirstFrame+=DropFrame?';':':';
- TimeCode_FirstFrame+=('0'+Frames_Tens);
- TimeCode_FirstFrame+=('0'+Frames_Units);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::audio_source()
-{
- if (TF1)
- {
- Skip_XX(4, "Unused");
- return;
- }
-
- Element_Name("audio_source");
-
- int8u SamplingRate, Resolution;
- BS_Begin();
- //PC1
- Get_SB ( audio_locked, "LF - Locked mode");
- Skip_SB( "Reserved");
- Skip_S1(6, "AF - Samples in this frame");
-
- //PC2
- Info_S1(1, StereoMode, "SM - Stereo mode"); Param_Info1(Dv_StereoMode[StereoMode]);
- Info_S1(2, ChannelsPerBlock, "CHN - Channels per block"); Param_Info1(Dv_ChannelsPerBlock[ChannelsPerBlock]);
- Info_S1(1, Pair, "PA - Pair"); Param_Info1(Dv_Pair[Pair]);
- Skip_S1(4, "AM - Audio mode");
-
- Skip_SB( "Reserved");
- Skip_SB( "ML - Multi-language");
- Skip_SB( "50/60");
- Get_S1 (5, audio_source_stype, "STYPE - audio blocks per video frame"); Param_Info1(audio_source_stype==0?"2 channels":(audio_source_stype==2?"4 channels":"Unknown")); //0=25 Mbps, 2=50 Mbps
-
- Skip_SB( "EF - Emphasis off");
- Skip_SB( "TC - Time constant of emphasis");
- Get_S1 (3, SamplingRate, "SMP - Sampling rate"); Param_Info1(Dv_Audio_SamplingRate[SamplingRate]);
- Get_S1 (3, Resolution, "QU - Resolution"); Param_Info1(Dv_Audio_BitDepth[Resolution]);
- BS_End();
-
- FILLING_BEGIN();
- if (!IgnoreAudio && Streams_Audio.empty() && Dv_Audio_SamplingRate[SamplingRate] && Dv_Audio_BitDepth[Resolution])
- {
- //Calculating the count of audio
- size_t Audio_Count=1;
- if (audio_source_stype==2 || (Resolution==1 && SamplingRate==2)) //stype=2 or (Resolution=12 bits and SamplingRate=32 KHz)
- Audio_Count=2;
- if (audio_source_stype==3)
- Audio_Count=4;
-
- //Filling
- if (Streams_Audio.size()<Audio_Count)
- Streams_Audio.resize(Audio_Count);
- for (size_t Pos=0; Pos<Audio_Count; Pos++)
- {
- if (Streams_Audio[Pos]==NULL)
- Streams_Audio[Pos]=new stream;
- Streams_Audio[Pos]->Infos["ID"].From_Number(Pos);
- Streams_Audio[Pos]->Infos["Format"]=__T("PCM");
- Streams_Audio[Pos]->Infos["Codec"]=__T("PCM");
- Streams_Audio[Pos]->Infos["BitRate_Mode"]=__T("CBR");
- Streams_Audio[Pos]->Infos["Channel(s)"].From_Number(audio_source_stype==3?1:2);
- Streams_Audio[Pos]->Infos["SamplingRate"].From_Number(Dv_Audio_SamplingRate[SamplingRate]);
- Streams_Audio[Pos]->Infos["BitDepth"].From_Number(Dv_Audio_BitDepth[Resolution]);
- Streams_Audio[Pos]->Infos["BitRate"].From_Number((audio_source_stype==3?1:2)*Dv_Audio_SamplingRate[SamplingRate]*Dv_Audio_BitDepth[Resolution]);
- }
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::audio_sourcecontrol()
-{
- if (TF1)
- {
- Skip_XX(4, "Unused");
- return;
- }
-
- Element_Name("audio_control");
-
- BS_Begin();
-
- //PC1
- Info_S1(2, CopyGenerationManagementSystem, "CGMS - Copy generation management system"); Param_Info1(Dv_CopyGenerationManagementSystem[CopyGenerationManagementSystem]);
- Info_S1(2, InputType, "ISR - Input type"); Param_Info1(Dv_InputType[InputType]);
- Info_S1(2, CompressionTimes, "CMP - Compression times"); Param_Info1(Dv_CompressionTimes[CompressionTimes]);
- Info_S1(2, Emphasis, "EFC - Emphasis"); Param_Info1(Dv_Emphasis[Emphasis]);
-
- //PC2
- Skip_SB( "REC S Non-recording start point");
- Skip_SB( "REC E - Non-recording end point");
- Skip_SB( "FADE S - Recording mode"); //1=Original
- Skip_SB( "FADE E - Unknown");
- Skip_SB( "Reserved");
- Skip_SB( "Reserved");
- Skip_SB( "Reserved");
- Skip_SB( "Reserved");
-
- //PC3
- Skip_SB( "DRF - Direction"); //1=Forward
- Skip_S1(7, "SPD - Speed");
-
- //PC4
- Skip_SB( "Reserved");
- Skip_S1(7, "GEN - Category");
-
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::audio_recdate()
-{
- if (TF1)
- {
- Skip_XX(4, "Unused");
- return;
- }
-
- Element_Name("audio_recdate");
-
- recdate();
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::audio_rectime()
-{
- if (TF1)
- {
- Skip_XX(4, "Unused");
- return;
- }
-
- Element_Name("audio_rectime");
-
- rectime();
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::video_source()
-{
- if (TF2)
- {
- Skip_XX(4, "Unused");
- return;
- }
-
- Element_Name("video_source");
-
- BS_Begin();
- //PC1
- Skip_S1(4, "TVCH (tens of units, 0-9)");
- Skip_S1(4, "TVCH (units, 0-9)");
-
- //PC2
- Skip_SB( "B/W - Black and White"); //0=Black and White, 1=Color
- Skip_SB( "EN - Color Frames is not valid");
- Skip_S1(2, "CLF - Color frames id");
- Skip_S1(4, "TVCH (hundreds of units, 0-9)");
-
- //PC3
- Skip_S1(2, "SRC");
- Get_SB ( system, "50/60 - System");
- Get_S1 (5, video_source_stype, "STYPE - Signal type of video signal"); //0=not 4:2:2, 4=4:2:2
-
- //PC4
- BS_End();
- Skip_B1( "TUN/VISC");
-
- FILLING_BEGIN();
- if (FSC==false && FSP==true && Dseq==0)
- {
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- FrameInfo.DUR=float64_int64s(((float64)1000000000)/(DSF?25.000:29.970));
- if (FrameInfo.DTS!=(int64u)-1)
- FrameInfo.DTS+=FrameInfo.DUR;
- if (FrameInfo.PTS!=(int64u)-1)
- FrameInfo.PTS+=FrameInfo.DUR;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::video_sourcecontrol()
-{
- if (TF2)
- {
- Skip_XX(4, "Unused");
- return;
- }
-
- Element_Name("video_control");
-
- BS_Begin();
- //PC1
- Info_S1(2, CopyGenerationManagementSystem, "CGMS - Copy generation management system"); Param_Info1(Dv_CopyGenerationManagementSystem[CopyGenerationManagementSystem]);
- Skip_S1(2, "ISR");
- Skip_S1(2, "CMP");
- Skip_S2(2, "SS");
-
- //PC2
- Skip_SB( "REC S");
- Skip_SB( "Reserved");
- Skip_S1(2, "REC M");
- Skip_SB( "Reserved");
- Get_S1 (3, aspect, "DISP - Aspect ratio"); Param_Info1(Dv_Disp[aspect]);
-
- //PC3
- Get_SB ( FieldOrder_FF, "FF - Frame/Field"); //1=Frame, 0=Field
- Get_SB ( FieldOrder_FS, "FS - First/second field"); //0=Field 2, 1=Field 1, if FF=0 x is output twice, if FF=1, Field x fisrst, other second
- Skip_SB( "FC - Frame Change"); //0=Same picture as before
- Get_SB ( Interlaced, "IL - Interlaced"); //1=Interlaced
- Skip_SB( "SF");
- Skip_SB( "SC");
- Skip_S1(2, "BCS");
-
- //PC4
- Skip_SB( "Reserved");
- Skip_S1(7, "GEN - Category");
-
- BS_End();
-
- FILLING_BEGIN();
- video_sourcecontrol_IsParsed=true;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::video_recdate()
-{
- if (TF2)
- {
- Skip_XX(4, "Unused");
- return;
- }
-
- Element_Name("video_recdate");
-
- Ztring Date=recdate();
- if (Recorded_Date_Date.empty())
- Recorded_Date_Date=Date;
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::video_rectime()
-{
- if (TF2)
- {
- Skip_XX(4, "Unused");
- return;
- }
-
- Element_Name("video_rectime");
-
- Ztring Date=rectime();
- if (Recorded_Date_Time.empty())
- Recorded_Date_Time=Date;
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::closed_captions()
-{
- Element_Name("closed_captions");
-
- #if defined(MEDIAINFO_EIA608_YES)
- if (CC_Parsers.empty())
- {
- CC_Parsers.resize(2);
- for (int8u Pos=0; Pos<2; Pos++)
- {
- CC_Parsers[Pos]=new File_Eia608();
- ((File_Eia608*)CC_Parsers[Pos])->cc_type=Pos;
- }
- Frame_Count_Valid*=10; //More frames
- }
- if (Dseq==0) //CC are duplicated for each DIF sequence!
- {
- for (size_t Pos=0; Pos<2; Pos++)
- {
- Open_Buffer_Init(CC_Parsers[Pos]);
- Open_Buffer_Continue(CC_Parsers[Pos], 2);
- }
- }
-
- #else
- Skip_XX(4, "Captions");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::consumer_camera_1()
-{
- Element_Name("consumer_camera_1");
-
- //Parsing
- BS_Begin();
- int8u ae_mode, wb_mode, white_balance, fcm;
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Skip_S1(6, "iris");
- Get_S1 (4, ae_mode, "ae mode"); Param_Info1(Dv_consumer_camera_1_ae_mode[ae_mode]);
- Skip_S1(4, "agc(Automatic Gain Control)");
- Get_S1 (3, wb_mode, "wb mode (white balance mode)"); Param_Info1(Dv_consumer_camera_1_wb_mode[wb_mode]);
- Get_S1 (5, white_balance, "white balance"); Param_Info1(Dv_consumer_camera_1_white_balance(white_balance));
- Get_S1 (1, fcm, "fcm (Focus mode)"); Param_Info1(Dv_consumer_camera_1_fcm[fcm]);
- Skip_S1(7, "focus (focal point)");
- BS_End();
-
- if (Encoded_Library_Settings.empty())
- {
- if (ae_mode<0x0F) Encoded_Library_Settings+=__T("ae mode=")+Ztring(Dv_consumer_camera_1_ae_mode[ae_mode])+__T(" / ");
- if (wb_mode<0x08) Encoded_Library_Settings+=__T("wb mode=")+Ztring(Dv_consumer_camera_1_wb_mode[wb_mode])+__T(" / ");
- if (wb_mode<0x1F) Encoded_Library_Settings+=__T("white balance=")+Ztring(Dv_consumer_camera_1_white_balance(white_balance))+__T(" / ");
- Encoded_Library_Settings+=__T("fcm=")+Ztring(Dv_consumer_camera_1_fcm[fcm]);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_DvDif::consumer_camera_2()
-{
- Element_Name("consumer_camera_2");
-
- //Parsing
- BS_Begin();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Skip_S1(1, "vpd");
- Skip_S1(5, "vertical panning speed");
- Skip_S1(1, "is");
- Skip_S1(1, "hpd");
- Skip_S1(6, "horizontal panning speed");
- Skip_S1(8, "focal length");
- Skip_S1(1, "zen");
- Info_S1(3, zoom_U, "units of e-zoom");
- Info_S1(4, zoom_D, "1/10 of e-zoom"); /*if (zoom_D!=0xF)*/ Param_Info1(__T("zoom=")+Ztring().From_Number(zoom_U+((float32)zoom_U)/10, 2));
- BS_End();
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Ztring File_DvDif::recdate()
-{
- BS_Begin();
-
- int8u Temp;
- int16u Year=0;
- int8u Month=0, Day=0;
- Skip_S1(8, "Time zone specific"); //ds, tm, tens of time zone, units of time zone, 0xFF for Unknwon
- Skip_SB( "1");
- Skip_SB( "1");
- Get_S1 (2, Temp, "Days (Tens)");
- Day+=Temp*10;
- Get_S1 (4, Temp, "Days (Units)");
- Day+=Temp;
- Skip_SB( "1");
- Skip_SB( "1");
- Skip_SB( "1");
- Get_S1 (1, Temp, "Month (Tens)");
- Month+=Temp*10;
- Get_S1 (4, Temp, "Month (Units)");
- Month+=Temp;
- Get_S1 (4, Temp, "Year (Tens)");
- Year+=Temp*10;
- Get_S1 (4, Temp, "Year (Units)");
- Year+=Temp;
- Year+=Year<25?2000:1900;
- Element_Info1(Ztring::ToZtring(Year)+__T("-")+Ztring::ToZtring(Month)+__T("-")+Ztring::ToZtring(Day));
-
- BS_End();
-
- if (Month>12 || Day>31)
- return Ztring(); //If all bits are set to 1, this is invalid
- Ztring MonthString;
- if (Month<10)
- MonthString=__T("0");
- MonthString+=Ztring::ToZtring(Month);
- Ztring DayString;
- if (Day<10)
- DayString=__T("0");
- DayString+=Ztring::ToZtring(Day);
- return Ztring::ToZtring(Year)+__T("-")+MonthString+__T("-")+DayString;
-}
-
-//---------------------------------------------------------------------------
-Ztring File_DvDif::rectime()
-{
- if (!DSF_IsValid)
- {
- Trusted_IsNot("Not in right order");
- return Ztring();
- }
-
- BS_Begin();
-
- if (Buffer[Buffer_Offset+(size_t)Element_Offset ]==0x00
- && Buffer[Buffer_Offset+(size_t)Element_Offset+1]==0x00
- && Buffer[Buffer_Offset+(size_t)Element_Offset+2]==0x00
- && Buffer[Buffer_Offset+(size_t)Element_Offset+3]==0x00
- )
- {
- Skip_XX(4, "All zero");
- return Ztring();
- }
-
- int8u Temp;
- int64u Time=0;
- int8u Frames=0;
- Skip_SB( "Unknown");
- Skip_SB( "1");
- Get_S1 (2, Temp, "Frames (Tens)");
- Frames+=Temp*10;
- Get_S1 (4, Temp, "Frames (Units)");
- Frames+=Temp;
- if (Temp!=0xF && DSF_IsValid)
- Time+=(int64u)(Frames/(DSF?25.000:29.970));
- Skip_SB( "1");
- Get_S1 (3, Temp, "Seconds (Tens)");
- Time+=Temp*10*1000;
- Get_S1 (4, Temp, "Seconds (Units)");
- Time+=Temp*1000;
- Skip_SB( "1");
- Get_S1 (3, Temp, "Minutes (Tens)");
- Time+=Temp*10*60*1000;
- Get_S1 (4, Temp, "Minutes (Units)");
- Time+=Temp*60*1000;
- Skip_SB( "1");
- Skip_SB( "1");
- Get_S1 (2, Temp, "Hours (Tens)");
- Time+=Temp*10*60*60*1000;
- Get_S1 (4, Temp, "Hours (Units)");
- Time+=Temp*60*60*1000;
- Element_Info1(Ztring().Duration_From_Milliseconds(Time));
-
- BS_End();
-
- if (Time!=167185000)
- return Ztring().Duration_From_Milliseconds(Time);
- else
- return Ztring(); //If all bits are set to 1, this is invalid
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_DV_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DvDif.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DvDif.h
deleted file mode 100644
index 266983416..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DvDif.h
+++ /dev/null
@@ -1,351 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DV-DIF (DV Digital Interface Format)
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DvDifH
-#define MediaInfo_File_DvDifH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_DvDif
-//***************************************************************************
-
-class File_DvDif : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
- int8u AuxToAnalyze; //Only Aux must be parsed
- bool IgnoreAudio;
-
- //Constructor/Destructor
- File_DvDif();
- ~File_DvDif();
-
-protected :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
- void Synched_Test_Reset();
- void Synched_Init();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test();
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Global
- #ifdef MEDIAINFO_DVDIF_ANALYZE_YES
- void Read_Buffer_Continue();
- #endif //MEDIAINFO_DVDIF_ANALYZE_YES
- void Read_Buffer_Unsynched();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer
- void Header_Parse();
- void Data_Parse();
-
- //Elements - Main
- void Header();
- void Subcode();
- void Subcode_Ssyb(int8u syb_num);
- void VAUX();
- void Audio();
- void Video();
-
- //Elements - Sub
- void Element();
- void timecode();
- void binary_group();
- void audio_source();
- void audio_sourcecontrol();
- void audio_recdate();
- void audio_rectime();
- void video_source();
- void video_sourcecontrol();
- void video_recdate();
- void video_rectime();
- void closed_captions();
- void consumer_camera_1();
- void consumer_camera_2();
-
- //Helpers
- Ztring recdate();
- Ztring rectime();
-
- //Streams
- struct stream
- {
- std::map<std::string, Ztring> Infos;
- };
- std::vector<stream*> Streams_Audio;
-
- //Temp
- #if defined(MEDIAINFO_EIA608_YES)
- std::vector<File__Analyze*> CC_Parsers;
- #endif
- Ztring Recorded_Date_Date;
- Ztring Recorded_Date_Time;
- Ztring Encoded_Library_Settings;
- string TimeCode_FirstFrame;
- int64u Duration;
- int64u TimeCode_FirstFrame_ms;
- int64u FrameSize_Theory; //The size of a frame
- int8u SCT;
- int8u SCT_Old;
- int8u Dseq;
- int8u Dseq_Old;
- int8u DBN;
- int8u DBN_Olds[8];
- int8u video_source_stype;
- int8u audio_source_stype;
- bool FSC;
- bool FSP;
- bool DSF;
- bool DSF_IsValid;
- int8u APT;
- bool TF1;
- bool TF2;
- bool TF3;
- int8u aspect;
- int8u ssyb_AP3;
- bool FieldOrder_FF;
- bool FieldOrder_FS;
- bool Interlaced;
- bool system;
- bool FSC_WasSet;
- bool FSP_WasNotSet;
- bool video_sourcecontrol_IsParsed;
- bool audio_locked;
-
- #if MEDIAINFO_SEEK
- bool Duration_Detected;
- int64u TotalFrames;
- #endif //MEDIAINFO_SEEK
-
- #ifdef MEDIAINFO_DVDIF_ANALYZE_YES
- bool Analyze_Activated;
- bool video_source_Detected;
-
- void Errors_Stats_Update();
- void Errors_Stats_Update_Finnish();
- Ztring Errors_Stats_03;
- Ztring Errors_Stats_05;
- Ztring Errors_Stats_09;
- Ztring Errors_Stats_10;
- Ztring Date;
- Ztring Time;
- int64u Speed_FrameCount; //Global - Total
- int64u Speed_FrameCount_Video_STA_Errors; //Global - Error 1
- std::vector<int64u> Speed_FrameCount_Audio_Errors; //Global - Error 2
- int64u Speed_FrameCount_Timecode_Incoherency; //Global - Error 3
- int64u Speed_FrameCount_Contains_NULL; //Global - Error 4
- int64u Speed_Contains_NULL; //Per Frame - Error 4
- int64u Speed_FrameCount_Arb_Incoherency; //Global - Error 5
- int64u Speed_FrameCount_Stts_Fluctuation; //Global - Error 6
- int8u QU;
- bool QU_FSC; //Validity is with QU
- bool QU_System; //Validity is with QU
- bool REC_ST;
- bool REC_END;
- bool REC_IsValid;
- bool System;
- bool System_IsValid;
- bool Frame_AtLeast1DIF;
- struct dvdate
- {
- int8u Days;
- int8u Months;
- int8u Years;
- bool MultipleValues;
- bool IsValid;
-
- dvdate() {Clear();}
-
- void Clear()
- {
- MultipleValues=false;
- IsValid=false;
- }
- };
- struct dvtime
- {
- struct time
- {
- int8u Frames;
- int8u Seconds;
- int8u Minutes;
- int8u Hours;
- bool DropFrame;
-
- time()
- {
- Frames=(int8u)-1;
- Seconds=(int8u)-1;
- Minutes=(int8u)-1;
- Hours=(int8u)-1;
- DropFrame=false;
- }
- };
- time Time;
- bool MultipleValues;
- bool IsValid;
-
- dvtime() {Clear();}
-
- void Clear()
- {
- MultipleValues=false;
- IsValid=false;
- }
- };
- dvtime Speed_TimeCode_Last;
- dvtime Speed_TimeCode_Current;
- dvtime Speed_TimeCode_Current_Theory;
- Ztring Speed_TimeCodeZ_First;
- Ztring Speed_TimeCodeZ_Last;
- Ztring Speed_TimeCodeZ_Current;
- bool Speed_TimeCode_IsValid;
- dvtime Speed_RecTime_Current;
- dvtime Speed_RecTime_Current_Theory;
- dvtime Speed_RecTime_Current_Theory2;
- Ztring Speed_RecTimeZ_First;
- Ztring Speed_RecTimeZ_Last;
- Ztring Speed_RecTimeZ_Current;
- dvdate Speed_RecDate_Current;
- Ztring Speed_RecDateZ_First;
- Ztring Speed_RecDateZ_Last;
- Ztring Speed_RecDateZ_Current;
- std::vector<size_t> Video_STA_Errors; //Per STA type
- std::vector<size_t> Video_STA_Errors_Total; //Per STA type
- std::vector<size_t> Audio_Errors; //Per Dseq
- std::vector<size_t> audio_source_IsPresent;
- std::vector<bool> CH_IsPresent;
- std::vector<std::vector<size_t> > Audio_Errors_Total; //Per Channel and Dseq
- std::vector<std::vector<size_t> > Audio_Invalids; //Per Channel and Dseq
- std::vector<std::vector<size_t> > Audio_Invalids_Total; //Per Channel and Dseq
- struct recZ_Single
- {
- int64u FramePos;
- Ztring Date;
- Ztring Time;
-
- recZ_Single()
- {
- FramePos=(int64u)-1;
- }
- };
- struct recZ
- {
- recZ_Single First;
- recZ_Single Last;
- };
- std::vector<recZ> Speed_RecZ;
- struct timeCodeZ_Single
- {
- int64u FramePos;
- Ztring TimeCode;
-
- timeCodeZ_Single()
- {
- FramePos=(int64u)-1;
- }
- };
- struct timeCodeZ
- {
- timeCodeZ_Single First;
- timeCodeZ_Single Last;
- };
- std::vector<timeCodeZ> Speed_TimeCodeZ;
- struct timeStampsZ_Single
- {
- int64u FramePos;
- Ztring Time;
- Ztring TimeCode;
- Ztring Date;
-
- timeStampsZ_Single()
- {
- FramePos=(int64u)-1;
- }
- };
- struct timeStampsZ
- {
- timeStampsZ_Single First;
- timeStampsZ_Single Last;
- };
- std::vector<timeStampsZ> Speed_TimeStampsZ;
-
-
-
- struct arb
- {
- std::vector<size_t> Value_Counters;
- int8u Value;
- bool MultipleValues;
- bool IsValid;
-
- arb() {Clear();}
-
- void Clear()
- {
- Value_Counters.clear();
- Value_Counters.resize(16);
- Value=0xF; //Used only when we are sure
- MultipleValues=false;
- IsValid=false;
- }
- };
- arb Speed_Arb_Last;
- arb Speed_Arb_Current;
- arb Speed_Arb_Current_Theory;
- bool Speed_Arb_IsValid;
-
- //Stats
- std::vector<size_t> Stats;
- size_t Stats_Total;
- size_t Stats_Total_WithoutArb;
- bool Stats_Total_AlreadyDetected;
-
-public:
- //From MPEG-4 container
- struct stts_part
- {
- int64u Pos_Begin;
- int64u Pos_End;
- int32u Duration;
- };
- typedef std::vector<stts_part> stts;
- stts* Mpeg4_stts;
- size_t Mpeg4_stts_Pos;
- #endif //MEDIAINFO_DVDIF_ANALYZE_YES
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DvDif_Analysis.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DvDif_Analysis.cpp
deleted file mode 100644
index d87f3fe4a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_DvDif_Analysis.cpp
+++ /dev/null
@@ -1,1616 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DVDIF_YES) && defined(MEDIAINFO_DVDIF_ANALYZE_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_DvDif.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Analysis
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DvDif::Read_Buffer_Continue()
-{
- if (!Analyze_Activated)
- {
- if (Config->File_DvDif_Analysis_Get())
- Analyze_Activated=true;
- else
- return;
- }
-
- //Errors stats
- while (Buffer_Offset+80<=Buffer_Size)
- {
- if ((Buffer[Buffer_Offset]&0xE0)==0x00 //SCT=0 (Header)
- && !(Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0x00))
- {
- Frame_AtLeast1DIF=true;
-
- if (!DSF_IsValid)
- {
- DSF=(Buffer[Buffer_Offset+3]&0x80)?true:false;
- DSF_IsValid=true;
- Dseq_Old=DSF?11:9;
- }
- }
-
- //Quick search depends of SCT
- switch(Buffer[Buffer_Offset]&0xE0)
- {
- case 0x20 : //SCT=1 (Subcode)
- {
- Frame_AtLeast1DIF=true;
-
- for (size_t Pos=3*8; Pos<40; Pos+=2*8)
- {
- int8u PackType=Buffer[Buffer_Offset+3+Pos+3];
- //dv_timecode
- if (PackType==0x13) //Pack type=0x13 (dv_timecode)
- {
- bool DropFrame =( Buffer[Buffer_Offset+3+Pos+3+1]&0x40)?true:false;
- int8u Frames =((Buffer[Buffer_Offset+3+Pos+3+1]&0x30)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+3+1]&0x0F) ) ;
- int8u Seconds =((Buffer[Buffer_Offset+3+Pos+3+2]&0x70)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+3+2]&0x0F)) ;
- int8u Minutes =((Buffer[Buffer_Offset+3+Pos+3+3]&0x70)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+3+3]&0x0F) ) ;
- int8u Hours =((Buffer[Buffer_Offset+3+Pos+3+4]&0x30)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+3+4]&0x0F) ) ;
-
- if (Frames ==0x00
- && Seconds==0x00
- && Minutes==0x00
- && Hours ==0x00
- && Buffer[Buffer_Offset+3+Pos+3+1]==0x00
- && Buffer[Buffer_Offset+3+Pos+3+2]==0x00
- && Buffer[Buffer_Offset+3+Pos+3+3]==0x00
- && Buffer[Buffer_Offset+3+Pos+3+4]==0x00
- )
- {
- Frames =45;
- Seconds=85;
- Minutes=85;
- Hours =45;
- }
- if (Frames !=45
- && Seconds!=85
- && Minutes!=85
- && Hours !=45) //If not disabled
- {
- if (Speed_TimeCode_Current.IsValid
- && (Speed_TimeCode_Current.Time.DropFrame !=DropFrame
- || Speed_TimeCode_Current.Time.Frames !=Frames
- || Speed_TimeCode_Current.Time.Seconds !=Seconds
- || Speed_TimeCode_Current.Time.Minutes !=Minutes
- || Speed_TimeCode_Current.Time.Hours !=Hours))
- {
- Speed_TimeCode_Current.MultipleValues=true; //There are 2+ different values
- }
- else if (!Speed_TimeCode_Current.IsValid && !Speed_TimeCode_Current.MultipleValues)
- {
- Speed_TimeCode_Current.Time.DropFrame=DropFrame;
- Speed_TimeCode_Current.Time.Frames =Frames;
- Speed_TimeCode_Current.Time.Seconds =Seconds;
- Speed_TimeCode_Current.Time.Minutes =Minutes;
- Speed_TimeCode_Current.Time.Hours =Hours;
- Speed_TimeCode_Current.IsValid =true;
- }
- }
- }
-
- //video_recdate
- if (PackType==0x62) //Pack type=0x62 (video_rectime)
- {
- int8u Days =((Buffer[Buffer_Offset+3+Pos+2]&0x30)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+2]&0x0F) ) ;
- int8u Months =((Buffer[Buffer_Offset+3+Pos+3]&0x10)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+3]&0x0F) ) ;
- int8u Years =((Buffer[Buffer_Offset+3+Pos+4]&0xF0)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+4]&0x0F) ) ;
- if (Months<=12
- && Days <=31)
- {
- if (Speed_RecDate_Current.IsValid
- && Speed_RecDate_Current.Days !=Days
- && Speed_RecDate_Current.Months !=Months
- && Speed_RecDate_Current.Years !=Years)
- {
- Speed_RecDate_Current.MultipleValues=true; //There are 2+ different values
- }
- else if (!Speed_RecTime_Current.MultipleValues)
- {
- Speed_RecDate_Current.Days =Days;
- Speed_RecDate_Current.Months =Months;
- Speed_RecDate_Current.Years =Years;
- Speed_RecDate_Current.IsValid =true;
- }
- }
- }
-
- //video_rectime
- if (PackType==0x63) //Pack type=0x63 (video_rectime)
- {
- int8u Frames =((Buffer[Buffer_Offset+3+Pos+1]&0x30)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+1]&0x0F) ) ;
- int8u Seconds =((Buffer[Buffer_Offset+3+Pos+2]&0x70)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+2]&0x0F)) ;
- int8u Minutes =((Buffer[Buffer_Offset+3+Pos+3]&0x70)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+3]&0x0F) ) ;
- int8u Hours =((Buffer[Buffer_Offset+3+Pos+4]&0x30)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+4]&0x0F) ) ;
- if (Seconds<61
- && Minutes<60
- && Hours <24) //If not disabled
- {
- if (Speed_RecTime_Current.IsValid
- && Speed_RecTime_Current.Time.Frames !=Frames
- && Speed_RecTime_Current.Time.Seconds !=Seconds
- && Speed_RecTime_Current.Time.Minutes !=Minutes
- && Speed_RecTime_Current.Time.Hours !=Hours)
- {
- Speed_RecTime_Current.MultipleValues=true; //There are 2+ different values
- }
- else if (!Speed_RecTime_Current.MultipleValues)
- {
- Speed_RecTime_Current.Time.Frames =Frames;
- Speed_RecTime_Current.Time.Seconds =Seconds;
- Speed_RecTime_Current.Time.Minutes =Minutes;
- Speed_RecTime_Current.Time.Hours =Hours;
- Speed_RecTime_Current.IsValid =true;
- }
- }
- }
- }
- }
- break;
-
- case 0x40 : //SCT=2 (VAUX)
- {
- Frame_AtLeast1DIF=true;
-
- for (size_t Pos=0; Pos<15*5; Pos+=5)
- {
- int8u PackType=Buffer[Buffer_Offset+3+Pos];
- //video_source
- if (PackType==0x60 && !System_IsValid) //Pack type=0x60 (video_source)
- {
- System=(Buffer[Buffer_Offset+3+Pos+3]&0x20)==0x20?true:false;
- System_IsValid=true;
- video_source_Detected=true;
- }
-
- //video_recdate
- if (PackType==0x62) //Pack type=0x62 (video_rectime)
- {
- int8u Days =((Buffer[Buffer_Offset+3+Pos+2]&0x30)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+2]&0x0F) ) ;
- int8u Months =((Buffer[Buffer_Offset+3+Pos+3]&0x10)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+3]&0x0F) ) ;
- int8u Years =((Buffer[Buffer_Offset+3+Pos+4]&0xF0)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+4]&0x0F) ) ;
- if (Months<=12
- && Days <=31)
- {
- if (Speed_RecDate_Current.IsValid
- && Speed_RecDate_Current.Days !=Days
- && Speed_RecDate_Current.Months !=Months
- && Speed_RecDate_Current.Years !=Years)
- {
- Speed_RecDate_Current.MultipleValues=true; //There are 2+ different values
- }
- else if (!Speed_RecTime_Current.MultipleValues)
- {
- Speed_RecDate_Current.Days =Days;
- Speed_RecDate_Current.Months =Months;
- Speed_RecDate_Current.Years =Years;
- Speed_RecDate_Current.IsValid =true;
- }
- }
- }
-
- //video_rectime
- if (PackType==0x63) //Pack type=0x63 (video_rectime)
- {
- int8u Frames =((Buffer[Buffer_Offset+3+Pos+1]&0x30)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+1]&0x0F) ) ;
- int8u Seconds =((Buffer[Buffer_Offset+3+Pos+2]&0x70)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+2]&0x0F)) ;
- int8u Minutes =((Buffer[Buffer_Offset+3+Pos+3]&0x70)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+3]&0x0F) ) ;
- int8u Hours =((Buffer[Buffer_Offset+3+Pos+4]&0x30)>>4)*10
- + ((Buffer[Buffer_Offset+3+Pos+4]&0x0F) ) ;
- if (Seconds!=85
- && Minutes!=85
- && Hours !=45) //If not disabled
- {
- if (Speed_RecTime_Current.IsValid
- && Speed_RecTime_Current.Time.Frames !=Frames
- && Speed_RecTime_Current.Time.Seconds !=Seconds
- && Speed_RecTime_Current.Time.Minutes !=Minutes
- && Speed_RecTime_Current.Time.Hours !=Hours)
- {
- Speed_RecTime_Current.MultipleValues=true; //There are 2+ different values
- }
- else if (!Speed_RecTime_Current.MultipleValues)
- {
- Speed_RecTime_Current.Time.Frames =Frames;
- Speed_RecTime_Current.Time.Seconds =Seconds;
- Speed_RecTime_Current.Time.Minutes =Minutes;
- Speed_RecTime_Current.Time.Hours =Hours;
- Speed_RecTime_Current.IsValid =true;
- }
- }
- }
- }
- }
- break;
-
- case 0x60 : //SCT=3 (Audio)
- {
- //audio_source
- if (Buffer[Buffer_Offset+3+0]==0x50) //audio_source
- {
- QU_FSC =(Buffer[Buffer_Offset+1 ]&0x08)?true:false; //FSC
- QU_System =(Buffer[Buffer_Offset+3+3]&0x20)?true:false; //50/60
-
- int8u AUDIO_MODE=Buffer[Buffer_Offset+3+2]&0x0F;
- QU =Buffer[Buffer_Offset+3+4]&0x07;
-
- size_t Channel=(QU_FSC?2:0)+((Buffer[Buffer_Offset+1]>>4)>=(QU_System?6:5)?1:0); //If Dseq>=5 or 6
- if (audio_source_IsPresent.empty())
- audio_source_IsPresent.resize(8);
- audio_source_IsPresent[Channel]=true;
-
- if (AUDIO_MODE==0x0F)
- {
- if (Audio_Invalids.empty())
- {
- Audio_Invalids.resize(8);
- for (size_t Pos=0; Pos<8; Pos++)
- Audio_Invalids[Pos].resize(16);
- }
- Audio_Invalids[Channel][Buffer[Buffer_Offset+1]>>4]+=9;
- }
- }
-
- //audio_source_control
- if (Buffer[Buffer_Offset+3+0]==0x51) //audio_source_control
- {
- REC_ST =(Buffer[Buffer_Offset+3+2]&0x80)?true:false;
- REC_END=(Buffer[Buffer_Offset+3+2]&0x40)?true:false;
- REC_IsValid=true;
- }
-
- //audio_recdate
- if (Buffer[Buffer_Offset+3+0]==0x52) //Pack type=0x52 (audio_rectime)
- {
- int8u Days =((Buffer[Buffer_Offset+3+2]&0x30)>>4)*10
- + ((Buffer[Buffer_Offset+3+2]&0x0F) ) ;
- int8u Months =((Buffer[Buffer_Offset+3+3]&0x10)>>4)*10
- + ((Buffer[Buffer_Offset+3+3]&0x0F) ) ;
- int8u Years =((Buffer[Buffer_Offset+3+4]&0xF0)>>4)*10
- + ((Buffer[Buffer_Offset+3+4]&0x0F) ) ;
- if (Months<=12
- && Days <=31)
- {
- if (Speed_RecDate_Current.IsValid
- && Speed_RecDate_Current.Days !=Days
- && Speed_RecDate_Current.Months !=Months
- && Speed_RecDate_Current.Years !=Years)
- {
- Speed_RecDate_Current.MultipleValues=true; //There are 2+ different values
- }
- else if (!Speed_RecTime_Current.MultipleValues)
- {
- Speed_RecDate_Current.Days =Days;
- Speed_RecDate_Current.Months =Months;
- Speed_RecDate_Current.Years =Years;
- Speed_RecDate_Current.IsValid =true;
- }
- }
- }
-
- //audio_rectime
- if (Buffer[Buffer_Offset+3+0]==0x53) //Pack type=0x53 (audio_rectime)
- {
- int8u Frames =((Buffer[Buffer_Offset+3+1]&0x30)>>4)*10
- + ((Buffer[Buffer_Offset+3+1]&0x0F) ) ;
- int8u Seconds =((Buffer[Buffer_Offset+3+2]&0x70)>>4)*10
- + ((Buffer[Buffer_Offset+3+2]&0x0F)) ;
- int8u Minutes =((Buffer[Buffer_Offset+3+3]&0x70)>>4)*10
- + ((Buffer[Buffer_Offset+3+3]&0x0F) ) ;
- int8u Hours =((Buffer[Buffer_Offset+3+4]&0x30)>>4)*10
- + ((Buffer[Buffer_Offset+3+4]&0x0F) ) ;
- if (Seconds!=85
- && Minutes!=85
- && Hours !=45) //If not disabled
- {
- if (Speed_RecTime_Current.IsValid
- && Speed_RecTime_Current.Time.Frames !=Frames
- && Speed_RecTime_Current.Time.Seconds !=Seconds
- && Speed_RecTime_Current.Time.Minutes !=Minutes
- && Speed_RecTime_Current.Time.Hours !=Hours)
- {
- Speed_RecTime_Current.MultipleValues=true; //There are 2+ different values
- }
- else if (!Speed_RecTime_Current.MultipleValues)
- {
- Speed_RecTime_Current.Time.Frames =Frames;
- Speed_RecTime_Current.Time.Seconds =Seconds;
- Speed_RecTime_Current.Time.Minutes =Minutes;
- Speed_RecTime_Current.Time.Hours =Hours;
- Speed_RecTime_Current.IsValid =true;
- }
- }
- }
-
- //Audio errors
- if (Buffer[Buffer_Offset+8]==0x80)
- {
- if ((QU==0 && Buffer[Buffer_Offset+ 9]==0x00) //16-bit 0x8000
- || (QU==1 && Buffer[Buffer_Offset+10]==0x00) //12-bit 0x800
- || (QU==(int8u)-1 && ((Buffer[Buffer_Offset+ 9]==0x00 && Buffer[Buffer_Offset+10]==0x80 && Buffer[Buffer_Offset+11]==0x00)
- || (Buffer[Buffer_Offset+ 9]==0x80 && Buffer[Buffer_Offset+10]==0x00)))) //In case of QU is not already detected
- {
- if (Audio_Errors.empty())
- Audio_Errors.resize(16);
- Audio_Errors[Buffer[Buffer_Offset+1]>>4]++;
- }
- }
- }
- break;
-
- case 0x80 : //SCT=4 (Video)
- {
- //Speed_Arb_Current
- int8u Value=Buffer[Buffer_Offset+0]&0x0F;
- Speed_Arb_Current.Value_Counters[Value]++;
- if (Value==0xF)
- {
- if (!Speed_Arb_Current.IsValid)
- {
- Speed_Arb_Current.Value =0xF;
- Speed_Arb_Current.IsValid=true;
- }
- }
- else
- {
- if (Speed_Arb_Current.IsValid
- && Speed_Arb_Current.Value!=0xF
- && Speed_Arb_Current.Value!=Value)
- Speed_Arb_Current.MultipleValues=true; //There are 2+ different values
- else if (!Speed_Arb_Current.MultipleValues)
- {
- Speed_Arb_Current.Value =Value;
- Speed_Arb_Current.IsValid=true;
- }
- }
-
- //STA
- if (Buffer[Buffer_Offset+3]&0xF0)
- {
- if (video_source_Detected)
- {
- if (Video_STA_Errors.empty())
- Video_STA_Errors.resize(16);
- Video_STA_Errors[Buffer[Buffer_Offset+3]>>4]++;
- }
- }
- }
- break;
- }
-
- //Errors stats
- if (Frame_AtLeast1DIF &&
- (Buffer[Buffer_Offset ]&0xE0)==0x00 //SCT=0 (Header)
- && (Buffer[Buffer_Offset+1]&0xF0)==0x00 //Dseq=0
- && (Buffer[Buffer_Offset+1]&0x08)==0x00) //FSC=0
- Errors_Stats_Update();
-
- //Coherency test
- if (Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0x00)
- Speed_Contains_NULL++;
-
- Buffer_Offset+=80;
- }
-
- if (!Status[IsAccepted])
- File__Analyze::Buffer_Offset=0;
- Config->State_Set(((float)File_Offset)/File_Size);
-}
-
-void File_DvDif::Errors_Stats_Update()
-{
- if (!Analyze_Activated)
- {
- if (Config->File_DvDif_Analysis_Get())
- Analyze_Activated=true;
- else
- return;
- }
-
- Ztring Errors_Stats_Line;
- if (Speed_FrameCount) //We must have at least one complete frame
- {
- bool Errors_AreDetected=false;
- bool Infos_AreDetected=false;
- bool Arb_AreDetected=false;
-
- #if MEDIAINFO_EVENTS
- //Demux
- struct MediaInfo_Event_DvDif_Analysis_Frame_0 Event;
- Event.EventCode=MediaInfo_EventCode_Create(MediaInfo_Parser_DvDif, MediaInfo_Event_DvDif_Analysis_Frame, 0);
- Event.TimeCode=0;
- Event.RecordedDateTime1=0;
- Event.RecordedDateTime2=0;
- Event.Arb=0;
- Event.Verbosity=0;
- Event.Errors=NULL;
- #endif //MEDIAINFO_EVENTS
-
- //Framerate computing
- float64 FrameRate=29.970;
- if (System_IsValid)
- FrameRate=System?25.000:29.970;
- else if (DSF_IsValid)
- FrameRate=DSF?25.000:29.970;
- else
- FrameRate=29.970;
- if (FrameRate==29.970 && Speed_TimeCode_Current.IsValid && !Speed_TimeCode_Current.Time.DropFrame)
- FrameRate=30.000;
-
- //Frame number
- Ztring Frame_Number_Padded=Ztring::ToZtring(Speed_FrameCount-1);
- if (Frame_Number_Padded.size()<8)
- Frame_Number_Padded.insert(0, 8-Frame_Number_Padded.size(), __T(' '));
- Errors_Stats_Line+=Frame_Number_Padded;
- Errors_Stats_Line+=__T('\t');
-
- //Time Offset
- float64 Time_Offset=(Speed_FrameCount-1)*1000/FrameRate;
- Errors_Stats_Line+=Ztring().Duration_From_Milliseconds((int64u)Time_Offset);
- Errors_Stats_Line+=__T('\t');
-
- //Timecode
- if (Speed_TimeCode_Current.IsValid)
- {
- Speed_TimeCodeZ_Last=Speed_TimeCodeZ_Current;
- Speed_TimeCodeZ_Current.clear();
- Speed_TimeCodeZ_Current.reserve(12);
- Speed_TimeCodeZ_Current.reserve(11);
- Speed_TimeCodeZ_Current+=__T('0')+Speed_TimeCode_Current.Time.Hours /10;
- Speed_TimeCodeZ_Current+=__T('0')+Speed_TimeCode_Current.Time.Hours %10;
- Speed_TimeCodeZ_Current+=__T(':');
- Speed_TimeCodeZ_Current+=__T('0')+Speed_TimeCode_Current.Time.Minutes/10;
- Speed_TimeCodeZ_Current+=__T('0')+Speed_TimeCode_Current.Time.Minutes%10;
- Speed_TimeCodeZ_Current+=__T(':');
- Speed_TimeCodeZ_Current+=__T('0')+Speed_TimeCode_Current.Time.Seconds/10;
- Speed_TimeCodeZ_Current+=__T('0')+Speed_TimeCode_Current.Time.Seconds%10;
- Speed_TimeCodeZ_Current+=(!DSF && Speed_TimeCode_Current.Time.DropFrame)?__T(';'):__T(':');
- Speed_TimeCodeZ_Current+=__T('0')+Speed_TimeCode_Current.Time.Frames /10;
- Speed_TimeCodeZ_Current+=__T('0')+Speed_TimeCode_Current.Time.Frames %10;
- Errors_Stats_Line+=Speed_TimeCodeZ_Current;
- if (Speed_TimeCodeZ.empty())
- {
- Speed_TimeCodeZ.resize(1);
- Speed_TimeCodeZ[0].First.FramePos=Speed_FrameCount;
- Speed_TimeCodeZ[0].First.TimeCode=Speed_TimeCodeZ_Current;
- }
- if (Speed_TimeStampsZ.empty())
- {
- Speed_TimeStampsZ.resize(1);
- Speed_TimeStampsZ[0].First.FramePos=Speed_FrameCount;
- Speed_TimeStampsZ[0].First.Time+=Ztring().Duration_From_Milliseconds((int64u)Time_Offset);
- }
- if (Speed_TimeStampsZ[0].First.FramePos==Speed_FrameCount)
- Speed_TimeStampsZ[0].First.TimeCode=Speed_TimeCodeZ_Current;
- #if MEDIAINFO_EVENTS
- int32u Seconds=Speed_TimeCode_Current.Time.Hours *60*60
- + Speed_TimeCode_Current.Time.Minutes *60
- + Speed_TimeCode_Current.Time.Seconds ;
- Event.TimeCode|=Seconds<<8;
- Event.TimeCode|=(!DSF && Speed_TimeCode_Current.Time.DropFrame)<<7;
- Event.TimeCode|=Speed_TimeCode_Current.Time.Frames;
- #endif //MEDIAINFO_EVENTS
- }
- else
- {
- Errors_Stats_Line+=__T("XX:XX:XX:XX");
- #if MEDIAINFO_EVENTS
- Event.TimeCode|=0x7FFFF<<8;
- //Event.TimeCode|=Speed_TimeCode_Current.Time.DropFrame<<7;
- Event.TimeCode|=0x3F;
- #endif //MEDIAINFO_EVENTS
- }
- Errors_Stats_Line+=__T('\t');
-
- //Timecode order coherency
- if (!Speed_TimeCode_IsValid && Speed_TimeCode_Current.IsValid
- && (Speed_TimeCode_Current.Time.Hours!=0
- || Speed_TimeCode_Current.Time.Minutes!=0
- || Speed_TimeCode_Current.Time.Seconds!=0
- || Speed_TimeCode_Current.Time.Frames!=0))
- Speed_TimeCode_IsValid=true;
- bool TimeCode_Disrupted=false;
- if (Speed_TimeCode_IsValid && Speed_TimeCode_Current.IsValid && Speed_TimeCode_Last.IsValid
- && Speed_TimeCode_Current.Time.Frames ==Speed_TimeCode_Last.Time.Frames
- && Speed_TimeCode_Current.Time.Seconds==Speed_TimeCode_Last.Time.Seconds
- && Speed_TimeCode_Current.Time.Minutes==Speed_TimeCode_Last.Time.Minutes
- && Speed_TimeCode_Current.Time.Hours ==Speed_TimeCode_Last.Time.Hours)
- {
- Errors_Stats_Line+=__T('R');
- #if MEDIAINFO_EVENTS
- Event.TimeCode|=1<<31;
- #endif //MEDIAINFO_EVENTS
- if (Speed_TimeCode_Current.Time.Hours
- || Speed_TimeCode_Current.Time.Seconds
- || Speed_TimeCode_Current.Time.Minutes)
- Errors_AreDetected=true;
- }
- else if (Speed_TimeCode_IsValid && Speed_TimeCode_Current.IsValid && Speed_TimeCode_Current_Theory.IsValid
- && ( Speed_TimeCode_Current.Time.Frames !=Speed_TimeCode_Current_Theory.Time.Frames
- || Speed_TimeCode_Current.Time.Seconds!=Speed_TimeCode_Current_Theory.Time.Seconds
- || Speed_TimeCode_Current.Time.Minutes!=Speed_TimeCode_Current_Theory.Time.Minutes
- || Speed_TimeCode_Current.Time.Hours !=Speed_TimeCode_Current_Theory.Time.Hours))
- {
- size_t Speed_TimeCodeZ_Pos=Speed_TimeCodeZ.size();
- Speed_TimeCodeZ.resize(Speed_TimeCodeZ_Pos+1);
- Speed_TimeCodeZ[Speed_TimeCodeZ_Pos].First.FramePos=Speed_FrameCount-1;
- Speed_TimeCodeZ[Speed_TimeCodeZ_Pos].First.TimeCode=Speed_TimeCodeZ_Current;
- Speed_TimeCodeZ[Speed_TimeCodeZ_Pos-1].Last.FramePos=Speed_FrameCount-1;
- Speed_TimeCodeZ[Speed_TimeCodeZ_Pos-1].Last.TimeCode=Speed_TimeCodeZ_Last;
-
- Errors_Stats_Line+=__T('N');
- #if MEDIAINFO_EVENTS
- Event.TimeCode|=1<<30;
- #endif //MEDIAINFO_EVENTS
- Speed_TimeCode_Current_Theory=Speed_TimeCode_Current;
- TimeCode_Disrupted=true;
- Errors_AreDetected=true;
- }
- else
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
-
- //RecDate/RecTime
- if (Speed_RecDate_Current.IsValid)
- {
- Speed_RecDateZ_Last=Speed_RecDateZ_Current;
- Speed_RecDateZ_Current.clear();
- Speed_RecDateZ_Current.reserve(10);
- Speed_RecDateZ_Current+=Speed_RecDate_Current.Years<75?__T("20"):__T("19");
- Speed_RecDateZ_Current+=__T('0')+Speed_RecDate_Current.Years /10;
- Speed_RecDateZ_Current+=__T('0')+Speed_RecDate_Current.Years %10;
- Speed_RecDateZ_Current+=__T('-');
- Speed_RecDateZ_Current+=__T('0')+Speed_RecDate_Current.Months /10;
- Speed_RecDateZ_Current+=__T('0')+Speed_RecDate_Current.Months %10;
- Speed_RecDateZ_Current+=__T('-');
- Speed_RecDateZ_Current+=__T('0')+Speed_RecDate_Current.Days /10;
- Speed_RecDateZ_Current+=__T('0')+Speed_RecDate_Current.Days %10;
- Errors_Stats_Line+=Speed_RecDateZ_Current;
- if (Speed_RecZ.empty())
- {
- Speed_RecZ.resize(1);
- Speed_RecZ[0].First.FramePos=Speed_FrameCount;
- Speed_RecZ[0].First.Date=Speed_RecDateZ_Current;
- }
- if (Speed_TimeStampsZ.empty())
- {
- Speed_TimeStampsZ.resize(1);
- Speed_TimeStampsZ[0].First.FramePos=Speed_FrameCount;
- Speed_TimeStampsZ[0].First.Time+=Ztring().Duration_From_Milliseconds((int64u)Time_Offset);
- }
- if (Speed_TimeStampsZ[0].First.FramePos==Speed_FrameCount)
- Speed_TimeStampsZ[0].First.Date=Speed_RecDateZ_Current;
- #if MEDIAINFO_EVENTS
- Event.RecordedDateTime1|=Speed_RecDate_Current.Years<<17;
- Event.RecordedDateTime2|=Speed_RecDate_Current.Months<<12;
- Event.RecordedDateTime2|=Speed_RecDate_Current.Days<<8;
- #endif //MEDIAINFO_EVENTS
- }
- else
- {
- Errors_Stats_Line+=__T("XXXX-XX-XX");
- #if MEDIAINFO_EVENTS
- Event.RecordedDateTime1|=0x7F<<17;
- Event.RecordedDateTime2|=0x0F<<12;
- Event.RecordedDateTime2|=0x1F<<8;
- #endif //MEDIAINFO_EVENTS
- }
- Errors_Stats_Line+=__T(" ");
- if (Speed_RecTime_Current.IsValid)
- {
- Speed_RecTimeZ_Last=Speed_RecTimeZ_Current;
- Speed_RecTimeZ_Current.clear();
- Speed_RecTimeZ_Current.reserve(12);
- Speed_RecTimeZ_Current+=__T('0')+Speed_RecTime_Current.Time.Hours /10;
- Speed_RecTimeZ_Current+=__T('0')+Speed_RecTime_Current.Time.Hours %10;
- Speed_RecTimeZ_Current+=__T(':');
- Speed_RecTimeZ_Current+=__T('0')+Speed_RecTime_Current.Time.Minutes/10;
- Speed_RecTimeZ_Current+=__T('0')+Speed_RecTime_Current.Time.Minutes%10;
- Speed_RecTimeZ_Current+=__T(':');
- Speed_RecTimeZ_Current+=__T('0')+Speed_RecTime_Current.Time.Seconds/10;
- Speed_RecTimeZ_Current+=__T('0')+Speed_RecTime_Current.Time.Seconds%10;
- #if MEDIAINFO_EVENTS
- int32u Seconds=Speed_RecTime_Current.Time.Hours *60*60
- + Speed_RecTime_Current.Time.Minutes *60
- + Speed_RecTime_Current.Time.Seconds ;
- Event.RecordedDateTime1|=Seconds;
- #endif //MEDIAINFO_EVENTS
- if (Speed_RecTime_Current.Time.Frames!=45)
- {
- int32u Milliseconds;
- if (System_IsValid)
- Milliseconds=Speed_RecTime_Current.Time.Frames*(System?40:33);
- else if (DSF_IsValid)
- Milliseconds=Speed_RecTime_Current.Time.Frames*(DSF?40:33);
- else
- Milliseconds=Speed_RecTime_Current.Time.Frames*33;
- Speed_RecTimeZ_Current+=__T('.');
- Speed_RecTimeZ_Current+=__T('0')+(Char)(Milliseconds/100);
- Speed_RecTimeZ_Current+=__T('0')+(Char)((Milliseconds%100)/10);
- Speed_RecTimeZ_Current+=__T('0')+(Char)(Milliseconds%10);
- #if MEDIAINFO_EVENTS
- Event.RecordedDateTime2|=Speed_RecTime_Current.Time.Frames;
- #endif //MEDIAINFO_EVENTS
- }
- else
- {
- Speed_RecTimeZ_Current+=__T(" ");
- #if MEDIAINFO_EVENTS
- Event.RecordedDateTime2|=0x7F;
- #endif //MEDIAINFO_EVENTS
- }
- Errors_Stats_Line+=Speed_RecTimeZ_Current;
- if (Speed_RecZ.empty() || Speed_RecZ[0].First.FramePos==Speed_FrameCount) //Empty or the same frame as RecDate
- {
- if (Speed_RecZ.empty())
- Speed_RecZ.resize(1);
- Speed_RecZ[0].First.FramePos=Speed_FrameCount;
- Speed_RecZ[0].First.Time=Speed_RecTimeZ_Current;
- }
- if (Speed_TimeStampsZ.empty())
- {
- Speed_TimeStampsZ.resize(1);
- Speed_TimeStampsZ[0].First.FramePos=Speed_FrameCount;
- Speed_TimeStampsZ[0].First.Time+=Ztring().Duration_From_Milliseconds((int64u)Time_Offset);
- }
- if (Speed_TimeStampsZ[0].First.FramePos==Speed_FrameCount) //Empty or the same frame as RecDate or the same frame as TimeCode
- Speed_TimeStampsZ[0].First.Time=Speed_RecTimeZ_Current;
- }
- else
- {
- Errors_Stats_Line+=__T("XX:XX:XX.XXX");
- #if MEDIAINFO_EVENTS
- Event.RecordedDateTime1|=0x1FFFF;
- Event.RecordedDateTime2|=0x7F;
- #endif //MEDIAINFO_EVENTS
- }
- Errors_Stats_Line+=__T('\t');
-
- //RecDate/RecTime coherency, Rec start/end
- bool RecTime_Disrupted=false;
- if (Speed_RecTime_Current.IsValid && Speed_RecTime_Current_Theory.IsValid
- && !( Speed_RecTime_Current.Time.Seconds==Speed_RecTime_Current_Theory.Time.Seconds
- && Speed_RecTime_Current.Time.Minutes==Speed_RecTime_Current_Theory.Time.Minutes
- && Speed_RecTime_Current.Time.Hours ==Speed_RecTime_Current_Theory.Time.Hours)
- && !( Speed_RecTime_Current.Time.Seconds==Speed_RecTime_Current_Theory2.Time.Seconds
- && Speed_RecTime_Current.Time.Minutes==Speed_RecTime_Current_Theory2.Time.Minutes
- && Speed_RecTime_Current.Time.Hours ==Speed_RecTime_Current_Theory2.Time.Hours))
- {
- size_t Speed_RecZ_Pos=Speed_RecZ.size();
- Speed_RecZ.resize(Speed_RecZ_Pos+1);
- Speed_RecZ[Speed_RecZ_Pos].First.FramePos=Speed_FrameCount-1;
- Speed_RecZ[Speed_RecZ_Pos].First.Date=Speed_RecDateZ_Current;
- Speed_RecZ[Speed_RecZ_Pos].First.Time=Speed_RecTimeZ_Current;
- Speed_RecZ[Speed_RecZ_Pos-1].Last.FramePos=Speed_FrameCount-1;
- Speed_RecZ[Speed_RecZ_Pos-1].Last.Date=Speed_RecDateZ_Last;
- Speed_RecZ[Speed_RecZ_Pos-1].Last.Time=Speed_RecTimeZ_Last;
-
- Errors_Stats_Line+=__T('N');
- #if MEDIAINFO_EVENTS
- Event.RecordedDateTime1|=1<<30;
- #endif //MEDIAINFO_EVENTS
- if (!REC_IsValid || REC_ST)
- {
- RecTime_Disrupted=true;
- Errors_AreDetected=true; //If there is a start, this is not an error
- }
- }
- else
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
-
- //Speed_Arb_Current
- if (Speed_Arb_Current.IsValid)
- {
- //Searching the bigest value count
- int8u Biggest_Pos=0xF;
- size_t Biggest_Count=0;
- for (int8u Pos=0; Pos<=0xF; Pos++) //0xF is not considered as a valid value.
- if (Speed_Arb_Current.Value_Counters[Pos]>Biggest_Count)
- {
- Biggest_Pos=Pos;
- Biggest_Count=Speed_Arb_Current.Value_Counters[Pos];
- }
- Errors_Stats_Line+=Ztring::ToZtring(Biggest_Pos, 16);
- #if MEDIAINFO_EVENTS
- Event.Arb|=Biggest_Pos;
- Event.Arb|=1<<4;
- #endif //MEDIAINFO_EVENTS
- Speed_Arb_Current.Value=Biggest_Pos;
- }
- else
- Errors_Stats_Line+=__T('X');
- Errors_Stats_Line+=__T('\t');
-
- //Speed_Arb_Current coherency
- if (!Speed_Arb_IsValid && Speed_Arb_Current.IsValid && Speed_Arb_Current.Value!=0)
- Speed_Arb_IsValid=true;
- if (Speed_Arb_IsValid && Speed_Arb_Current.IsValid && Speed_Arb_Last.IsValid
- && Speed_Arb_Current.Value ==Speed_Arb_Last.Value
- && Speed_Arb_Current.Value!=0xF)
- {
- Errors_Stats_Line+=__T('R');
- #if MEDIAINFO_EVENTS
- Event.Arb|=1<<7;
- #endif //MEDIAINFO_EVENTS
- if (Speed_Arb_Current.Value!=0xF)
- Arb_AreDetected=true;
-
- Speed_Arb_Current_Theory.IsValid=false;
- }
- else if (Speed_Arb_IsValid && Speed_Arb_Current.IsValid && Speed_Arb_Current_Theory.IsValid
- && Speed_Arb_Current.Value != Speed_Arb_Current_Theory.Value)
- {
- Errors_Stats_Line+=__T('N');
- #if MEDIAINFO_EVENTS
- Event.Arb|=1<<6;
- #endif //MEDIAINFO_EVENTS
- Speed_Arb_Current_Theory=Speed_Arb_Current;
- Arb_AreDetected=true;
- }
- else
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
-
- //Start
- if (REC_IsValid && !REC_ST)
- {
- Errors_Stats_Line+=__T('S');
- #if MEDIAINFO_EVENTS
- Event.RecordedDateTime1|=1<<29;
- #endif //MEDIAINFO_EVENTS
- Infos_AreDetected=true;
- }
- else
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
-
- //End
- if (REC_IsValid && !REC_END)
- {
- Errors_Stats_Line+=__T('E');
- #if MEDIAINFO_EVENTS
- Event.RecordedDateTime1|=1<<28;
- #endif //MEDIAINFO_EVENTS
- Infos_AreDetected=true;
- }
- else
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
-
- //TimeStamp (RecDate/RecTime and TimeCode together)
- if (TimeCode_Disrupted || RecTime_Disrupted)
- {
- size_t Speed_TimeStampsZ_Pos=Speed_TimeStampsZ.size();
- Speed_TimeStampsZ.resize(Speed_TimeStampsZ_Pos+1);
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].First.FramePos=Speed_FrameCount-1;
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].First.TimeCode=Speed_TimeCodeZ_Current;
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].First.Date=Speed_RecDateZ_Current;
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].First.Time=Speed_RecTimeZ_Current;
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos-1].Last.FramePos=Speed_FrameCount-1;
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos-1].Last.TimeCode=Speed_TimeCodeZ_Last;
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos-1].Last.Date=Speed_RecDateZ_Last;
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos-1].Last.Time=Speed_RecTimeZ_Last;
- }
-
- //Channels
- for (size_t Channel=0; Channel<8; Channel++)
- {
- if (!audio_source_IsPresent.empty() && audio_source_IsPresent[Channel])
- {
- if (Channel<4 && (!Audio_Invalids.empty() || !Audio_Errors.empty()))
- {
- size_t Audio_Errors_Count=0;
- size_t Pos_Begin=(Channel%2)*(QU_System?6:5);
- size_t Pos_End=(Channel%2+1)*(QU_System?6:5);
- if ((Channel>=2 && !QU_FSC)
- || (Channel< 2 && QU_FSC))
- Pos_End=Pos_Begin; //Not here
- if (!Audio_Invalids.empty())
- for (size_t Pos=Pos_Begin; Pos<Pos_End; Pos++)
- if (Audio_Invalids[Channel][Pos])
- Audio_Errors_Count+=Audio_Invalids[Channel][Pos];
- if (!Audio_Errors.empty())
- for (size_t Pos=Pos_Begin; Pos<Pos_End; Pos++)
- if (Audio_Errors[Pos])
- Audio_Errors_Count+=Audio_Errors[Pos];
- if (Audio_Errors_Count>=(size_t)((QU_System?6:5)*9))
- audio_source_IsPresent[Channel]=false;
- else
- CH_IsPresent[Channel]=true;
- }
- }
- }
-
-
- //Error 1: Video errors
- Ztring Errors_Stats_Line_Details;
- if (!Video_STA_Errors.empty())
- {
- if (!Stats_Total_AlreadyDetected)
- {
- Stats_Total_AlreadyDetected=true;
- Stats_Total++;
- Stats_Total_WithoutArb++;
- }
- Stats[1]++;
- Errors_Stats_Line+=__T('1');
-
- size_t Video_STA_Errors_Count=0;
- Ztring Video_STA_Errors_Details;
- for (size_t Pos=0; Pos<16; Pos++)
- {
- if (Video_STA_Errors[Pos])
- {
- Video_STA_Errors_Count+=Video_STA_Errors[Pos];
- Ztring Video_STA_Errors_Count_Padded=Ztring::ToZtring(Video_STA_Errors[Pos]);
- if (Video_STA_Errors_Count_Padded.size()<8)
- Video_STA_Errors_Count_Padded.insert(0, 8-Video_STA_Errors_Count_Padded.size(), __T(' '));
- Video_STA_Errors_Details+=Video_STA_Errors_Count_Padded;
- Video_STA_Errors_Details+=__T(" \"");
- Video_STA_Errors_Details+=Ztring::ToZtring(Pos, 16);
- Video_STA_Errors_Details+=__T("\" errors, ");
- if (Video_STA_Errors_Total.empty())
- Video_STA_Errors_Total.resize(16);
- Video_STA_Errors_Total[Pos]+=Video_STA_Errors[Pos];
- }
- }
- if (Video_STA_Errors_Details.size()>2)
- {
- Ztring Video_STA_Errors_Count_Padded=Ztring::ToZtring(((float)Video_STA_Errors_Count)*100/((DSF_IsValid && DSF)?1500:1350)*(QU_FSC?2:1), 2);
- if (Video_STA_Errors_Count_Padded.size()<5)
- Video_STA_Errors_Count_Padded.insert(0, 5-Video_STA_Errors_Count_Padded.size(), __T(' '));
- Errors_Stats_Line_Details+=Video_STA_Errors_Count_Padded+__T("%");
- Video_STA_Errors_Details.resize(Video_STA_Errors_Details.size()-2);
- Errors_Stats_Line_Details+=__T(" (")+Video_STA_Errors_Details+__T(")");
- Speed_FrameCount_Video_STA_Errors++;
- Errors_AreDetected=true;
- }
- }
- else
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
- Errors_Stats_Line_Details+=__T('\t');
-
- //Error 2: Audio errors
- if (QU!=(int8u)-1 && (!Audio_Invalids.empty() || !Audio_Errors.empty()))
- {
- if (Audio_Errors.empty())
- Audio_Errors.resize(16);
- bool ErrorsAreAlreadyDetected=false;
- for (size_t Channel=0; Channel<4; Channel++)
- {
- size_t Audio_Errors_Count=0;
- Ztring Audio_Errors_Details;
- size_t Pos_Begin=(Channel%2)*(QU_System?6:5);
- size_t Pos_End=(Channel%2+1)*(QU_System?6:5);
- if ((Channel>=2 && !QU_FSC)
- || (Channel< 2 && QU_FSC)
- || !CH_IsPresent[Channel])
- Pos_End=Pos_Begin; //Not here
- for (size_t Pos=Pos_Begin; Pos<Pos_End; Pos++)
- {
- if (Audio_Errors[Pos])
- {
- Audio_Errors_Count+=Audio_Errors[Pos];
- Ztring Audio_Errors_Count_Padded=Ztring::ToZtring(Audio_Errors[Pos]);
- if (Audio_Errors_Count_Padded.size()<2)
- Audio_Errors_Count_Padded.insert(0, 2-Audio_Errors_Count_Padded.size(), __T(' '));
- Audio_Errors_Details+=Audio_Errors_Count_Padded;
- Audio_Errors_Details+=__T(" Dseq=");
- Audio_Errors_Details+=Ztring::ToZtring(Pos, 16);
- Audio_Errors_Details+=__T(", ");
- if (Audio_Errors_Total.empty())
- {
- Audio_Errors_Total.resize(8);
- for (size_t Audio_Errors_Pos=0; Audio_Errors_Pos<8; Audio_Errors_Pos++)
- Audio_Errors_Total[Audio_Errors_Pos].resize(16);
- }
- Audio_Errors_Total[Channel][Pos]+=Audio_Errors[Pos];
- }
- }
- if (Audio_Errors_Count)
- {
- if (!ErrorsAreAlreadyDetected)
- {
- if (!Stats_Total_AlreadyDetected)
- {
- Stats_Total_AlreadyDetected=true;
- Stats_Total++;
- Stats_Total_WithoutArb++;
- }
- Stats[2]++;
- Errors_Stats_Line+=__T('2');
- }
-
- Ztring Audio_Errors_Count_Padded=Ztring::ToZtring(((float)Audio_Errors_Count)*100/((DSF_IsValid && DSF)?54:45)*(QU_FSC?2:1), 2);
- if (Audio_Errors_Count_Padded.size()<2)
- Audio_Errors_Count_Padded.insert(0, 2-Audio_Errors_Count_Padded.size(), __T(' '));
- if (ErrorsAreAlreadyDetected)
- Errors_Stats_Line_Details+=__T(", ");
- if (Audio_Errors_Count<(size_t)((QU_System?6:5)*9))
- {
- Errors_Stats_Line_Details+=__T("CH")+Ztring::ToZtring(Channel+1)+__T(": ")+Audio_Errors_Count_Padded+__T("%");
- Audio_Errors_Details.resize(Audio_Errors_Details.size()-2);
- Errors_Stats_Line_Details+=__T(" (")+Audio_Errors_Details+__T(")");
- }
- else
- Errors_Stats_Line_Details+=__T("CH")+Ztring::ToZtring(Channel+1)+__T(": no valid DIF");
-
- Speed_FrameCount_Audio_Errors[Channel]++;
- ErrorsAreAlreadyDetected=true;
- Errors_AreDetected=true;
- }
- }
- if (!ErrorsAreAlreadyDetected)
- Errors_Stats_Line+=__T(' ');
- }
- else
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
- Errors_Stats_Line_Details+=__T('\t');
-
- //Error 3: Timecode incoherency
- if (Speed_TimeCode_Current.MultipleValues)
- {
- if (!Stats_Total_AlreadyDetected)
- {
- Stats_Total_AlreadyDetected=true;
- Stats_Total++;
- Stats_Total_WithoutArb++;
- }
- Stats[3]++;
- Errors_Stats_Line+=__T('3');
- Errors_Stats_Line_Details+=__T("Timecode incoherency, first detected value is used");
- Speed_FrameCount_Timecode_Incoherency++;
- Errors_AreDetected=true;
- }
- else
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
- Errors_Stats_Line_Details+=__T('\t');
-
- //Error 4: DIF order incoherency
- if (Speed_Contains_NULL)
- {
- if (!Stats_Total_AlreadyDetected)
- {
- Stats_Total_AlreadyDetected=true;
- Stats_Total++;
- Stats_Total_WithoutArb++;
- }
- Stats[4]++;
- Errors_Stats_Line+=__T('4');
- Errors_Stats_Line_Details+=Ztring::ToZtring(Speed_Contains_NULL)+__T(" NULL DIFs");
- Speed_FrameCount_Contains_NULL++;
- Errors_AreDetected=true;
- }
- else
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
- Errors_Stats_Line_Details+=__T('\t');
-
- //Error 5: Speed_Arb_Current incoherency
- if (Speed_Arb_Current.MultipleValues)
- {
- if (!Stats_Total_AlreadyDetected)
- {
- Stats_Total_AlreadyDetected=true;
- Stats_Total++;
- }
- Stats[5]++;
- Errors_Stats_Line+=__T('5');
- Ztring Arb_Errors;
- for (size_t Pos=0; Pos<16; Pos++)
- if (Speed_Arb_Current.Value_Counters[Pos])
- {
- Arb_Errors+=Ztring::ToZtring(Speed_Arb_Current.Value_Counters[Pos]);
- Arb_Errors+=__T(" Arb bit=\"");
- Arb_Errors+=Ztring::ToZtring(Pos, 16);
- Arb_Errors+=__T("\", ");
- }
- if (Arb_Errors.size()>2)
- {
- Arb_Errors.resize(Arb_Errors.size()-2);
- Errors_Stats_Line_Details+=Arb_Errors;
- }
- Speed_FrameCount_Arb_Incoherency++;
- Arb_AreDetected=true;
- }
- else
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
- Errors_Stats_Line_Details+=__T('\t');
-
- //Error 6:
- if (Mpeg4_stts && Mpeg4_stts_Pos<Mpeg4_stts->size() && Speed_FrameCount-1>=Mpeg4_stts->at(Mpeg4_stts_Pos).Pos_Begin && Speed_FrameCount-1<Mpeg4_stts->at(Mpeg4_stts_Pos).Pos_End)
- {
- if (!Stats_Total_AlreadyDetected)
- {
- Stats_Total_AlreadyDetected=true;
- Stats_Total++;
- Stats_Total_WithoutArb++;
- }
- Stats[6]++;
- Errors_Stats_Line+=__T('6');
- Errors_Stats_Line_Details+=__T("stts flucuation");
- Speed_FrameCount_Stts_Fluctuation++;
- Errors_AreDetected=true;
- }
- else
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
- Errors_Stats_Line_Details+=__T('\t');
-
- //Error 7:
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
- Errors_Stats_Line_Details+=__T('\t');
-
- //Error 8:
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
- Errors_Stats_Line_Details+=__T('\t');
-
- //Error 9:
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
- Errors_Stats_Line_Details+=__T('\t');
-
- //Error 0:
- Errors_Stats_Line+=__T(' ');
- Errors_Stats_Line+=__T('\t');
- Errors_Stats_Line_Details+=__T('\t');
-
- //Filling the main text if needed
- {
- #if MEDIAINFO_EVENTS
- if (!Config->Event_CallBackFunction_IsSet())
- {
- Errors_Stats_10+=Errors_Stats_Line;
- Errors_Stats_10+=Errors_Stats_Line_Details;
- Errors_Stats_10+=__T("&");
- }
- Event.Verbosity=10;
- #endif //MEDIAINFO_EVENTS
- }
- if (Speed_FrameCount==1
- || Status[IsFinished]
- || Errors_AreDetected
- || Infos_AreDetected
- || Arb_AreDetected)
- {
- #if MEDIAINFO_EVENTS
- if (!Config->Event_CallBackFunction_IsSet())
- {
- Errors_Stats_09+=Errors_Stats_Line;
- Errors_Stats_09+=Errors_Stats_Line_Details;
- Errors_Stats_09+=__T("&");
- }
- Event.Verbosity=9;
- #endif //MEDIAINFO_EVENTS
-
- if (Speed_FrameCount==1
- || Status[IsFinished]
- || Errors_AreDetected
- || Infos_AreDetected)
- {
- #if MEDIAINFO_EVENTS
- if (!Config->Event_CallBackFunction_IsSet())
- {
- Errors_Stats_05+=Errors_Stats_Line;
- Errors_Stats_05+=Errors_Stats_Line_Details;
- Errors_Stats_05+=__T("&");
- }
- Event.Verbosity=5;
- #endif //MEDIAINFO_EVENTS
-
- if (Speed_FrameCount==1
- || Status[IsFinished]
- || Errors_AreDetected)
- {
- #if MEDIAINFO_EVENTS
- if (!Config->Event_CallBackFunction_IsSet())
- {
- Errors_Stats_03+=Errors_Stats_Line;
- Errors_Stats_03+=Errors_Stats_Line_Details;
- Errors_Stats_03+=__T("&");
- }
- Event.Verbosity=3;
- #endif //MEDIAINFO_EVENTS
- }
- }
- }
-
- #if MEDIAINFO_EVENTS
- std::string Errors;
- if (Errors_Stats_Line_Details.size()>10)
- {
- Errors=Errors_Stats_Line_Details.To_Local();
- Event.Errors=(char*)Errors.c_str();
- }
- Config->Event_Send(this, (const int8u*)&Event, sizeof(MediaInfo_Event_DvDif_Analysis_Frame_0));
- #endif //MEDIAINFO_EVENTS
- }
-
- //Speed_TimeCode_Current
- if (!Speed_TimeCode_Current_Theory.IsValid)
- Speed_TimeCode_Current_Theory=Speed_TimeCode_Current;
- if (Speed_TimeCode_Current_Theory.IsValid)
- {
- int8u Frames_Max;
- if (System_IsValid)
- Frames_Max=System?25:30;
- else if (DSF_IsValid)
- Frames_Max=DSF?25:30;
- else
- Frames_Max=30;
-
- Speed_TimeCode_Current_Theory.Time.Frames++;
- if (Speed_TimeCode_Current_Theory.Time.Frames>=Frames_Max)
- {
- Speed_TimeCode_Current_Theory.Time.Seconds++;
- Speed_TimeCode_Current_Theory.Time.Frames=0;
- if (Speed_TimeCode_Current_Theory.Time.Seconds>=60)
- {
- Speed_TimeCode_Current_Theory.Time.Seconds=0;
- Speed_TimeCode_Current_Theory.Time.Minutes++;
-
- if (!DSF && Speed_TimeCode_Current_Theory.Time.DropFrame && Speed_TimeCode_Current_Theory.Time.Minutes%10)
- Speed_TimeCode_Current_Theory.Time.Frames=2; //frames 0 and 1 are dropped for every minutes except 00 10 20 30 40 50
-
- if (Speed_TimeCode_Current_Theory.Time.Minutes>=60)
- {
- Speed_TimeCode_Current_Theory.Time.Minutes=0;
- Speed_TimeCode_Current_Theory.Time.Hours++;
- if (Speed_TimeCode_Current_Theory.Time.Hours>=24)
- {
- Speed_TimeCode_Current_Theory.Time.Hours=0;
- }
- }
- }
- }
- }
-
- //Speed_RecTime_Current_Theory
- Speed_RecTime_Current_Theory=Speed_RecTime_Current;
- Speed_RecTime_Current_Theory2=Speed_RecTime_Current; //Don't change it
- if (Speed_RecTime_Current_Theory.IsValid)
- {
- Speed_RecTime_Current_Theory.Time.Seconds++;
- if (Speed_RecTime_Current_Theory.Time.Seconds>=60)
- {
- Speed_RecTime_Current_Theory.Time.Seconds=0;
- Speed_RecTime_Current_Theory.Time.Minutes++;
- if (Speed_RecTime_Current_Theory.Time.Seconds>=60)
- {
- Speed_RecTime_Current_Theory.Time.Minutes=0;
- Speed_RecTime_Current_Theory.Time.Hours++;
- if (Speed_RecTime_Current_Theory.Time.Hours>=24)
- {
- Speed_RecTime_Current_Theory.Time.Hours=0;
- }
- }
- }
- }
-
- //Speed_Arb_Current_Theory
- if (!Speed_Arb_Current_Theory.IsValid && Speed_Arb_Current.Value!=0xF)
- Speed_Arb_Current_Theory=Speed_Arb_Current;
- if (Speed_Arb_Current_Theory.IsValid && Speed_Arb_Current.Value!=0xF)
- {
- Speed_Arb_Current_Theory.Value++;
- if (Speed_Arb_Current_Theory.Value>=12)
- {
- Speed_Arb_Current_Theory.Value=0;
- }
- }
-
- Speed_TimeCode_Last=Speed_TimeCode_Current;
- Speed_TimeCode_Current.Clear();
- Speed_RecDate_Current.IsValid=false;
- Speed_RecDate_Current.MultipleValues=false;
- Speed_RecTime_Current.IsValid=false;
- Speed_RecTime_Current.MultipleValues=false;
- Speed_Arb_Last=Speed_Arb_Current;
- Speed_Arb_Current.Clear();
- Speed_FrameCount++;
- REC_IsValid=false;
- Speed_Contains_NULL=0;
- Frame_AtLeast1DIF=true;
- if (Buffer_Offset+2>=Buffer_Size
- || (Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0x00))
- Frame_AtLeast1DIF=false;
- Video_STA_Errors.clear();
- Audio_Errors.clear();
- Audio_Invalids.clear();
- Stats_Total_AlreadyDetected=false;
-}
-
-void File_DvDif::Errors_Stats_Update_Finnish()
-{
- if (!Analyze_Activated)
- {
- if (Config->File_DvDif_Analysis_Get())
- Analyze_Activated=true;
- else
- return;
- }
-
- //Preparing next frame
- Speed_FrameCount--;
- Ztring Errors_Stats_End_03;
- Ztring Errors_Stats_End_05;
- Ztring Errors_Stats_End_Lines;
-
- //Frames
- if (Speed_FrameCount)
- Errors_Stats_End_Lines+=__T("Frame Count: ")+Ztring::ToZtring(Speed_FrameCount)+__T('&');
-
- //One block
- if (!Errors_Stats_End_Lines.empty())
- {
- Errors_Stats_End_05+=Errors_Stats_End_Lines;
- Errors_Stats_End_05+=__T('&');
- Errors_Stats_End_Lines.clear();
- }
-
- //Error 1: Video error concealment
- if (Speed_FrameCount_Video_STA_Errors)
- Errors_Stats_End_Lines+=__T("Frame count with video error concealment: ")+Ztring::ToZtring(Speed_FrameCount_Video_STA_Errors)+__T(" frames &");
- if (!Video_STA_Errors_Total.empty())
- {
- Ztring Errors_Details;
- size_t Errors_Count=0;
- for (size_t Pos=0; Pos<16; Pos++)
- {
- if (Video_STA_Errors_Total[Pos])
- {
- Errors_Count+=Video_STA_Errors_Total[Pos];
- Ztring Errors_Count_Padded=Ztring::ToZtring(Video_STA_Errors_Total[Pos]);
- if (Errors_Count_Padded.size()<8)
- Errors_Count_Padded.insert(0, 8-Errors_Count_Padded.size(), __T(' '));
- Errors_Details+=Errors_Count_Padded;
- Errors_Details+=__T(" \"");
- Errors_Details+=Ztring::ToZtring(Pos, 16);
- Errors_Details+=__T("\" errors, ");
- }
- }
- if (Errors_Details.size()>2)
- {
- Errors_Stats_End_Lines+=__T("Total video error concealment: ");
- Ztring Errors_Count_Padded=Ztring::ToZtring(Errors_Count);
- if (Errors_Count_Padded.size()<8)
- Errors_Count_Padded.insert(0, 8-Errors_Count_Padded.size(), __T(' '));
- Errors_Stats_End_Lines+=__T(" ")+Errors_Count_Padded+__T(" errors");
- Errors_Details.resize(Errors_Details.size()-2);
- Errors_Stats_End_Lines+=__T(" (")+Errors_Details+__T(")")+__T('&');
- }
- }
-
- //Error 2: Audio error code
- if (!Audio_Errors_Total.empty())
- {
- for (size_t Channel=0; Channel<8; Channel++)
- {
- if (Speed_FrameCount_Audio_Errors[Channel])
- Errors_Stats_End_Lines+=__T("Frame count with CH")+Ztring::ToZtring(Channel+1)+__T(" audio error code: ")+Ztring::ToZtring(Speed_FrameCount_Audio_Errors[Channel])+__T(" frames &");
-
- Ztring Errors_Details;
- size_t Errors_Count=0;
- for (size_t Pos=0; Pos<16; Pos++)
- {
- if (Audio_Errors_Total[Channel][Pos])
- {
- Errors_Count+=Audio_Errors_Total[Channel][Pos];
- Ztring Errors_Count_Padded=Ztring::ToZtring(Audio_Errors_Total[Channel][Pos]);
- if (Errors_Count_Padded.size()<8)
- Errors_Count_Padded.insert(0, 8-Errors_Count_Padded.size(), __T(' '));
- Errors_Details+=Errors_Count_Padded;
- Errors_Details+=__T(" Dseq=");
- Errors_Details+=Ztring::ToZtring(Pos, 16);
- Errors_Details+=__T(", ");
- }
- }
- if (Errors_Details.size()>2)
- {
- Errors_Stats_End_Lines+=__T("Total audio error code for CH")+Ztring::ToZtring(Channel+1)+__T(": ");
- Ztring Errors_Count_Padded=Ztring::ToZtring(Errors_Count);
- if (Errors_Count_Padded.size()<8)
- Errors_Count_Padded.insert(0, 8-Errors_Count_Padded.size(), __T(' '));
- Errors_Stats_End_Lines+=__T(" ")+Errors_Count_Padded+__T(" errors");
- Errors_Details.resize(Errors_Details.size()-2);
- Errors_Stats_End_Lines+=__T(" (")+Errors_Details+__T(")")+__T('&');
- }
- }
- }
-
- //Error 3: Timecode incoherency
- if (Speed_FrameCount_Timecode_Incoherency)
- Errors_Stats_End_Lines+=__T("Frame count with DV timecode incoherency: ")+Ztring::ToZtring(Speed_FrameCount_Timecode_Incoherency)+__T(" frames &");
-
- //Error 4: DIF incohereny
- if (Speed_FrameCount_Contains_NULL)
- Errors_Stats_End_Lines+=__T("Frame count with DIF incoherency: ")+Ztring::ToZtring(Speed_FrameCount_Contains_NULL)+__T(" frames &");
-
- //Error 5: Arbitrary bit inconsistency
- if (Speed_FrameCount_Arb_Incoherency)
- Errors_Stats_End_Lines+=__T("Frame count with Arbitrary bit inconsistency: ")+Ztring::ToZtring(Speed_FrameCount_Arb_Incoherency)+__T(" frames &");
-
- //Error 6: Stts fluctuation
- if (Speed_FrameCount_Stts_Fluctuation)
- Errors_Stats_End_Lines+=__T("Frame count with stts fluctuation: ")+Ztring::ToZtring(Speed_FrameCount_Stts_Fluctuation)+__T(" frames &");
-
- //One block
- if (!Errors_Stats_End_Lines.empty())
- {
- Errors_Stats_End_03+=Errors_Stats_End_Lines;
- Errors_Stats_End_03+=__T('&');
- Errors_Stats_End_05+=Errors_Stats_End_Lines;
- Errors_Stats_End_05+=__T('&');
- Errors_Stats_End_Lines.clear();
- }
-
- //TimeStamps (RecDate/RecTime and TimeCode)
- if (!Speed_RecDateZ_Current.empty() || !Speed_RecTimeZ_Current.empty()) //Date and Time must be both available
- {
- size_t Speed_TimeStampsZ_Pos=Speed_TimeStampsZ.size();
- if (Speed_TimeStampsZ_Pos)
- {
- Speed_TimeStampsZ_Pos--;
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].Last.FramePos=Speed_FrameCount;
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].Last.FramePos=Speed_FrameCount;
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].Last.TimeCode=Speed_TimeCodeZ_Current;
- if (Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].Last.FramePos-(Speed_TimeStampsZ_Pos?Speed_TimeStampsZ[Speed_TimeStampsZ_Pos-1].Last.FramePos:0)==1) //Only one frame, the "Last" part is not filled
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].Last.TimeCode=Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].First.TimeCode;
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].Last.Date=Speed_RecDateZ_Current;
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].Last.Time=Speed_RecTimeZ_Current;
- if (Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].Last.FramePos-(Speed_TimeStampsZ_Pos?Speed_TimeStampsZ[Speed_TimeStampsZ_Pos-1].Last.FramePos:0)==1)
- {
- //Only one frame, the "Last" part is not filled
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].Last.Date=Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].First.Date;
- Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].Last.Time=Speed_TimeStampsZ[Speed_TimeStampsZ_Pos].First.Time;
- }
-
- //Framerate computing
- float64 FrameRate=29.970;
- if (System_IsValid)
- FrameRate=System?25.000:29.970;
- else if (DSF_IsValid)
- FrameRate=DSF?25.000:29.970;
- else
- FrameRate=29.970;
- if (FrameRate==29.970 && Speed_TimeCode_Current.IsValid && !Speed_TimeCode_Current.Time.DropFrame)
- FrameRate=30.000;
-
- Errors_Stats_End_Lines+=__T("Absolute time\tDV timecode range \tRecorded date/time range \tFrame range&");
- for (size_t Pos=0; Pos<Speed_TimeStampsZ.size(); Pos++)
- {
- //Time
- float64 Time_Offset=(Pos?Speed_TimeStampsZ[Pos-1].Last.FramePos:0)*1000/FrameRate;
- Errors_Stats_End_Lines+=Ztring().Duration_From_Milliseconds((int64u)Time_Offset);
-
- Errors_Stats_End_Lines+=__T("\t");
-
- //TimeCode_range
- Errors_Stats_End_Lines+=Speed_TimeStampsZ[Pos].First.TimeCode.empty()?Ztring(__T("XX:XX:XX:XX")):Speed_TimeStampsZ[Pos].First.TimeCode;
-
- Errors_Stats_End_Lines+=__T(" - ");
-
- Errors_Stats_End_Lines+=Speed_TimeStampsZ[Pos].Last.TimeCode.empty()?Ztring(__T("XX:XX:XX:XX")):Speed_TimeStampsZ[Pos].Last.TimeCode;
-
- Errors_Stats_End_Lines+=__T("\t");
-
- //Recorded date/time_range
- Errors_Stats_End_Lines+=Speed_TimeStampsZ[Pos].First.Date.empty()?Ztring(__T("XXXX-XX-XX")):Speed_TimeStampsZ[Pos].First.Date;
- Errors_Stats_End_Lines+=__T(' ');
- Errors_Stats_End_Lines+=Speed_TimeStampsZ[Pos].First.Time.empty()?Ztring(__T("XX:XX:XX:XX")):Speed_TimeStampsZ[Pos].First.Time;
-
- Errors_Stats_End_Lines+=__T(" - ");
-
- Errors_Stats_End_Lines+=Speed_TimeStampsZ[Pos].Last.Date.empty()?Ztring(__T("XXXX-XX-XX")):Speed_TimeStampsZ[Pos].Last.Date;
- Errors_Stats_End_Lines+=__T(' ');
- Errors_Stats_End_Lines+=Speed_TimeStampsZ[Pos].Last.Time.empty()?Ztring(__T("XX:XX:XX:XX")):Speed_TimeStampsZ[Pos].Last.Time;
-
- Errors_Stats_End_Lines+=__T("\t");
-
- //Frame range
- int64u Start=Pos?Speed_TimeStampsZ[Pos-1].Last.FramePos:0;
- Ztring Start_Padded=Ztring::ToZtring(Start);
- if (Start_Padded.size()<8)
- Start_Padded.insert(0, 8-Start_Padded.size(), __T(' '));
-
- Errors_Stats_End_Lines+=Start_Padded;
-
- int64u End=Speed_TimeStampsZ[Pos].Last.FramePos-1;
- Ztring End_Padded=Ztring::ToZtring(End);
- if (End_Padded.size()<8)
- End_Padded.insert(0, 8-End_Padded.size(), __T(' '));
- Errors_Stats_End_Lines+=__T(" - ")+End_Padded;
-
- Errors_Stats_End_Lines+=__T('&');
- }
- }
- }
-
- //One block
- if (!Errors_Stats_End_Lines.empty())
- {
- Errors_Stats_End_05+=Errors_Stats_End_Lines;
- Errors_Stats_End_05+=__T('&');
- Errors_Stats_End_Lines.clear();
- }
-
- //Stats
- if (Stats_Total)
- {
- Errors_Stats_End_Lines+=__T("Percent of frames with Error: ");
- Errors_Stats_End_Lines+=Ztring::ToZtring(((float)Stats_Total_WithoutArb*100)/Speed_FrameCount, 2);
- Errors_Stats_End_Lines+=__T("%");
- Errors_Stats_End_Lines+=__T('&');
- Errors_Stats_End_Lines+=__T("Percent of frames with Error (including Arbitrary bit inconsistency): ");
- Errors_Stats_End_Lines+=Ztring::ToZtring(((float)Stats_Total*100)/Speed_FrameCount, 2);
- Errors_Stats_End_Lines+=__T("%");
- Errors_Stats_End_Lines+=__T('&');
-
- if (Stats[1])
- {
- Errors_Stats_End_Lines+=__T("Percent of frames with Video Error Concealment: ");
- Errors_Stats_End_Lines+=Ztring::ToZtring(((float)Stats[1]*100)/Speed_FrameCount, 2);
- Errors_Stats_End_Lines+=__T("%");
- Errors_Stats_End_Lines+=__T('&');
- }
-
- if (Stats[2])
- {
- Errors_Stats_End_Lines+=__T("Percent of frames with Audio Errors: ");
- Errors_Stats_End_Lines+=Ztring::ToZtring(((float)Stats[2]*100)/Speed_FrameCount, 2);
- Errors_Stats_End_Lines+=__T("%");
- Errors_Stats_End_Lines+=__T('&');
- }
-
- if (Stats[3])
- {
- Errors_Stats_End_Lines+=__T("Percent of frames with Timecode Incoherency: ");
- Errors_Stats_End_Lines+=Ztring::ToZtring(((float)Stats[3]*100)/Speed_FrameCount, 2);
- Errors_Stats_End_Lines+=__T("%");
- Errors_Stats_End_Lines+=__T('&');
- }
-
- if (Stats[4])
- {
- Errors_Stats_End_Lines+=__T("Percent of frames with DIF Incoherency: ");
- Errors_Stats_End_Lines+=Ztring::ToZtring(((float)Stats[4]*100)/Speed_FrameCount, 2);
- Errors_Stats_End_Lines+=__T("%");
- Errors_Stats_End_Lines+=__T('&');
- }
-
- if (Stats[5])
- {
- Errors_Stats_End_Lines+=__T("Percent of frames with Arbitrary bit inconsistency: ");
- Errors_Stats_End_Lines+=Ztring::ToZtring(((float)Stats[5]*100)/Speed_FrameCount, 2);
- Errors_Stats_End_Lines+=__T("%");
- Errors_Stats_End_Lines+=__T('&');
- }
-
- if (Stats[6])
- {
- Errors_Stats_End_Lines+=__T("Percent of frames with Stts Fluctuation: ");
- Errors_Stats_End_Lines+=Ztring::ToZtring(((float)Stats[6]*100)/Speed_FrameCount, 2);
- Errors_Stats_End_Lines+=__T("%");
- Errors_Stats_End_Lines+=__T('&');
- }
- }
-
- //One block
- if (!Errors_Stats_End_Lines.empty())
- {
- Errors_Stats_End_05+=Errors_Stats_End_Lines;
- Errors_Stats_End_05+=__T('&');
- Errors_Stats_End_Lines.clear();
- }
-
- //
- if (Errors_Stats_End_03.size()>2)
- Errors_Stats_End_03.resize(Errors_Stats_End_03.size()-2); //Removing last carriage returns
- if (Errors_Stats_End_05.size()>2)
- Errors_Stats_End_05.resize(Errors_Stats_End_05.size()-2); //Removing last carriage returns
-
- if (Errors_Stats_End_03.empty())
- {
- Errors_Stats_End_03+=__T("No identified errors");
- Errors_Stats_End_05+=__T("&&No identified errors");
- }
-
- //Filling
- if (Count_Get(Stream_Video)==0)
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, "Errors_Stats_Begin", "Frame # \tAbsolute time\tDV timecode\tN\tRecorded date/time \tN\tA\tN\tS\tE\t1\t2\t3\t4\t5\t6\t7\t8\t9\t0\t1\t2\t3\t4\t5\t6\t7\t8\t9\t0");
- (*Stream_More)[Stream_Video][0](Ztring().From_Local("Errors_Stats_Begin"), Info_Options)=__T("N NT");
- Fill(Stream_Video, 0, "Errors_Stats_03", Errors_Stats_03);
- (*Stream_More)[Stream_Video][0](Ztring().From_Local("Errors_Stats_03"), Info_Options)=__T("N NT");
- Fill(Stream_Video, 0, "Errors_Stats_05", Errors_Stats_05);
- (*Stream_More)[Stream_Video][0](Ztring().From_Local("Errors_Stats_05"), Info_Options)=__T("N NT");
- Fill(Stream_Video, 0, "Errors_Stats_09", Errors_Stats_09);
- (*Stream_More)[Stream_Video][0](Ztring().From_Local("Errors_Stats_09"), Info_Options)=__T("N NT");
- Fill(Stream_Video, 0, "Errors_Stats_10", Errors_Stats_10);
- (*Stream_More)[Stream_Video][0](Ztring().From_Local("Errors_Stats_10"), Info_Options)=__T("N NT");
- if (MediaInfoLib::Config.Verbosity_Get()>=(float32)1.0)
- Fill(Stream_Video, 0, "Errors_Stats", Errors_Stats_10);
- else if (MediaInfoLib::Config.Verbosity_Get()>=(float32)0.5)
- Fill(Stream_Video, 0, "Errors_Stats", Errors_Stats_09);
- else if (MediaInfoLib::Config.Verbosity_Get()>=(float32)0.9)
- Fill(Stream_Video, 0, "Errors_Stats", Errors_Stats_05);
- else
- Fill(Stream_Video, 0, "Errors_Stats", Errors_Stats_03);
- (*Stream_More)[Stream_Video][0](Ztring().From_Local("Errors_Stats"), Info_Options)=__T("N NT");
- Fill(Stream_Video, 0, "Errors_Stats_End_03", Errors_Stats_End_03);
- (*Stream_More)[Stream_Video][0](Ztring().From_Local("Errors_Stats_End_03"), Info_Options)=__T("N NT");
- Fill(Stream_Video, 0, "Errors_Stats_End_05", Errors_Stats_End_05);
- (*Stream_More)[Stream_Video][0](Ztring().From_Local("Errors_Stats_End_05"), Info_Options)=__T("N NT");
- if (MediaInfoLib::Config.Verbosity_Get()>=(float32)0.5)
- Fill(Stream_Video, 0, "Errors_Stats_End", Errors_Stats_End_05);
- else
- Fill(Stream_Video, 0, "Errors_Stats_End", Errors_Stats_End_03);
- (*Stream_More)[Stream_Video][0](Ztring().From_Local("Errors_Stats_End"), Info_Options)=__T("N NT");
- Fill(Stream_Video, 0, "FrameCount_Speed", Speed_FrameCount);
- (*Stream_More)[Stream_Video][0](Ztring().From_Local("FrameCount_Speed"), Info_Options)=__T("N NT");
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_DV_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dvdv.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dvdv.cpp
deleted file mode 100644
index b0c024377..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dvdv.cpp
+++ /dev/null
@@ -1,1579 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DVD objects
-// (.ifo files on DVD-Video)
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Mainly from http://dvd.sourceforge.net/dvdinfo/ifo.html
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include <vector>
-using namespace std;
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DVDV_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Dvdv.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-const char* IFO_VTS_Category[]=
-{
- "Normal",
- "Karaoke",
-};
-
-const char* IFO_Format_V[]=
-{
- "MPEG Video",
- "MPEG Video",
- "",
- "",
-};
-
-const char* IFO_Format_Version_V[]=
-{
- "Version 1",
- "Version 2",
- "",
- "",
-};
-
-const char* IFO_CodecV[]=
-{
- "MPEG-1V",
- "MPEG-2V",
- "",
- "",
-};
-
-const char* IFO_Standard[]=
-{
- "NTSC",
- "PAL",
- "",
- "",
-};
-
-float32 IFO_AspectRatio[]=
-{
- (float32)1.333,
- (float32)0.000,
- (float32)0.000,
- (float32)1.778,
-};
-
-const char* IFO_BitRate_Mode[]=
-{
- "VBR",
- "CBR",
-};
-
-const size_t IFO_Width[]=
-{720, 704, 352, 352, 0, 0, 0, 0};
-
-const size_t IFO_Height[4][8]=
-{{480, 480, 480, 240, 0, 0, 0, 0}, //NTSC
- {576, 576, 576, 288, 0, 0, 0, 0}, //PAL
- { 0, 0, 0, 0, 0, 0, 0, 0}, //Unknown
- { 0, 0, 0, 0, 0, 0, 0, 0}, //Unknown
- };
-
-const float64 IFO_FrameRate[]=
-{29.970, 25.000};
-
-const char* IFO_Format_A[]=
-{
- "AC-3",
- "",
- "MPEG Audio",
- "MPEG Audio",
- "PCM",
- "",
- "DTS",
- "SDDS",
-};
-
-const char* IFO_Format_Profile_A[]=
-{
- "",
- "",
- "Version 1",
- "Version 2",
- "",
- "",
- "",
- "",
-};
-
-const char* IFO_CodecA[]=
-{
- "AC3",
- "",
- "MPEG-1A",
- "MPEG-2A",
- "LPCM (Big Endian)",
- "",
- "DTS",
- "SDDS",
-};
-
-const char* IFO_ModeA[]=
-{
- "",
- "Karaoke",
- "Surround",
- "",
-};
-
-const char* IFO_ResolutionA[]=
-{
- "16",
- "20",
- "24",
- "DRC",
-};
-
-const int16u IFO_SamplingRate[]=
-{48000, 0, 0, 0, 0, 0, 0, 0};
-
-const char* IFO_Language_MoreA[]=
-{
- "",
- "",
- "For visually impaired",
- "Director's comments",
- "Director's comments",
- "",
- "",
- "",
-};
-
-const char* IFO_Format_T[]=
-{
- "RLE",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-const char* IFO_Resolution_T[]=
-{
- "2",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-const char* IFO_CodecT[]=
-{
- "2-bit RLE",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-const char* IFO_Language_MoreT[]=
-{
- "",
- "Normal",
- "Large",
- "Children",
- "",
- "",
- "Large",
- "Children",
- "",
- "Forced",
- "",
- "",
- "",
- "Director comments",
- "Director comments large",
- "Director comments children",
-};
-
-const size_t IFO_PlaybackTime_FrameRate[]=
-{1, 25, 1, 30};
-
-const char* IFO_MenuType[]=
-{
- "",
- "",
- "",
- "root",
- "sub-picture",
- "audio",
- "angle",
- "PTT (chapter)",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-extern const char* AC3_ChannelPositions[];
-extern const char* AC3_ChannelPositions2[];
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Dvdv::File_Dvdv()
-:File__Analyze()
-{
- //Temp
- VTS_Attributes_AreHere=false;
- Program_Pos=0;
- Time_Pos=0;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dvdv::Streams_Finish()
-{
- //Purge what is not needed anymore
- if (!File_Name.empty()) //Only if this is not a buffer, with buffer we can have more data
- Sectors.clear();
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dvdv::FileHeader_Parse()
-{
- //Parsing
- int64u Identifier;
- int32u Type;
- Get_C8 (Identifier, "Identifier");
- Get_C4 (Type, "Type");
-
- FILLING_BEGIN();
- //Identifier
- if (Identifier!=CC8("DVDVIDEO"))
- {
- Reject("DVD Video");
- return;
- }
-
- Accept("DVD Video");
-
- Fill(Stream_General, 0, General_Format, "DVD Video");
-
- //Versions
- switch (Type)
- {
- case Dvdv::VMG : VMG(); break;
- case Dvdv::VTS : VTS(); break;
- default :
- Reject("DVD Video");
- return;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-#define SUBELEMENT(_ELEMENT) \
- { \
- Element_Begin1(#_ELEMENT); \
- _ELEMENT(); \
- Element_End0(); \
- } \
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VMG()
-{
- int32u Sector_Pointer_LastSector, Sector_Pointer_TT_SRPT, Sector_Pointer_VMGM_PGCI_UT, Sector_Pointer_VMG_PTL_MAIT, Sector_Pointer_VMG_VTS_ATRT, Sector_Pointer_VMG_TXTDT_MG, Sector_Pointer_VMGM_C_ADT, Sector_Pointer_VMGM_VOBU_ADMAP;
- int16u Version, Audio_Count, Text_Count;
- Element_Info1("DVD Video - VMG");
- Element_Begin1("Header");
- Info_B4(LastSector, "Last sector of VMG set (last sector of BUP)"); Param_Info2((LastSector+1)*2048, " bytes");
- Skip_XX(12, "Unknown");
- Get_B4 (Sector_Pointer_LastSector, "last sector of IFO");
- Get_B2 (Version, "version number"); Param_Info1(Ztring::ToZtring((Version&0x00F0)>>4)+__T(".")+Ztring::ToZtring(Version&0x000F));
- Info_B4(Category, "VMG category");
- Skip_B2( "number of volumes");
- Skip_B2( "volume number");
- Skip_B1( "side ID");
- Skip_XX(19, "Unknown");
- Skip_B2( "number of title sets");
- Skip_Local(32, "Provider ID");
- Skip_B8( "VMG POS");
- Skip_XX(24, "Unknown");
- Skip_B4( "end byte address of VMGI_MAT");
- Skip_B4( "start address of FP_PGC (First Play program chain)");
- Skip_XX(56, "Unknown");
- Info_B4(Sector_Pointer_Menu, "start sector of Menu VOB");
- Get_B4 (Sector_Pointer_TT_SRPT, "sector pointer to TT_SRPT (table of titles)");
- Get_B4 (Sector_Pointer_VMGM_PGCI_UT, "sector pointer to VMGM_PGCI_UT (Menu Program Chain table)");
- Get_B4 (Sector_Pointer_VMG_PTL_MAIT, "sector pointer to VMG_PTL_MAIT (Parental Management masks)");
- Get_B4 (Sector_Pointer_VMG_VTS_ATRT, "sector pointer to VMG_VTS_ATRT (copies of VTS audio/sub-picture attributes)");
- Get_B4 (Sector_Pointer_VMG_TXTDT_MG, "sector pointer to VMG_TXTDT_MG (text data)");
- Get_B4 (Sector_Pointer_VMGM_C_ADT, "sector pointer to VMGM_C_ADT (menu cell address table)");
- Get_B4 (Sector_Pointer_VMGM_VOBU_ADMAP, "sector pointer to VMGM_VOBU_ADMAP (menu VOBU address map)");
- Skip_XX(32, "Unknown");
- Element_End0();
-
- //-VTSM
- VTS_Attributes_AreHere=true;
- Element_Begin1("VMGM (VMG for Menu)");
- Element_Begin1("Video streams");
- Element_Info2(1, " streams");
- SUBELEMENT(Video)
- Element_End0();
- Element_Begin1("Audio streams");
- Get_B2 (Audio_Count, "number of audio streams in VMGM_VOBS");
- Element_Info2(Audio_Count, " streams");
- for (int16u Pos=0; Pos<8; Pos++)
- {
- if (Pos<Audio_Count)
- SUBELEMENT(Audio)
- else
- Skip_XX(8, "Reserved for Audio");
- }
- Skip_XX(16, "Unknown");
- Element_End0();
- Element_Begin1("Text streams");
- Get_B2 (Text_Count, "number of subpicture streams in VMGM_VOBS");
- Element_Info2(Text_Count, " streams");
- for (int16u Pos=0; Pos<1; Pos++)
- {
- if (Pos<Text_Count)
- SUBELEMENT(Text)
- else
- Skip_XX(6, "Reserved for Text");
- }
- Skip_XX(164, "Unknown");
- Element_End0();
- Element_End0();
- Skip_XX(2048-Element_Offset, "Junk");
-
- //Filling
- FILLING_BEGIN();
- Fill(Stream_General, 0, General_Format_Profile, "Menu");
-
- if (Version>0x001F)
- return;
- Sectors.resize(Sector_Pointer_LastSector+1);
- if (Sector_Pointer_TT_SRPT<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_TT_SRPT]=Sector_TT_SRPT;
- if (Sector_Pointer_VMGM_PGCI_UT<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VMGM_PGCI_UT]=Sector_VMGM_PGCI_UT;
- if (Sector_Pointer_VMG_PTL_MAIT<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VMG_PTL_MAIT]=Sector_VMG_PTL_MAIT;
- if (Sector_Pointer_VMG_VTS_ATRT<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VMG_VTS_ATRT]=Sector_VMG_VTS_ATRT;
- if (Sector_Pointer_VMG_TXTDT_MG<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VMG_TXTDT_MG]=Sector_VMG_TXTDT_MG;
- if (Sector_Pointer_VMGM_C_ADT<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VMGM_C_ADT]=Sector_VMGM_C_ADT;
- if (Sector_Pointer_VMGM_VOBU_ADMAP<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VMGM_VOBU_ADMAP]=Sector_VMGM_VOBU_ADMAP;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VTS()
-{
- //Parsing
- int32u Sector_Pointer_LastSector, Sector_Pointer_VTS_PTT_SRPT, Sector_Pointer_VTS_PGCI, Sector_Pointer_VTSM_PGCI_UT, Sector_Pointer_VTS_TMAPTI, Sector_Pointer_VTSM_C_ADT, Sector_Pointer_VTSM_VOBU_ADMAP, Sector_Pointer_VTS_C_ADT, Sector_Pointer_VTS_VOBU_ADMAP;
- int16u Version, Audio_Count, Text_Count;
- Element_Info1("DVD Video - VTS (Video Title Set)");
- Element_Begin1("Header");
- Info_B4(LastSector, "Last sector of Title set (last sector of BUP)"); Param_Info2((LastSector+1)*2048, " bytes");
- Skip_XX(12, "Unknown");
- Get_B4 (Sector_Pointer_LastSector, "last sector of IFO");
- Get_B2 (Version, "version number"); Param_Info1(Ztring::ToZtring((Version&0x00F0)>>4)+__T(".")+Ztring::ToZtring(Version&0x000F));
- Info_B4(Category, "VTS category");
- #if MEDIAINFO_TRACE
- if (Category<2) Param_Info1(IFO_VTS_Category[Category]);
- #endif //MEDIAINFO_TRACE
- Skip_XX(90, "Unknown");
- Skip_B4( "end byte address of VTS_MAT");
- Skip_XX(60, "Unknown");
- Info_B4(StartSector_Menu, "start sector of Menu VOB"); Param_Info2((StartSector_Menu+1)*2048, " bytes");
- Info_B4(StartSector_Title, "start sector of Title Vob"); Param_Info2((StartSector_Title+1)*2048, " bytes");
- Get_B4 (Sector_Pointer_VTS_PTT_SRPT, "sector pointer to VTS_PTT_SRPT (Table of Titles and Chapters)");
- Get_B4 (Sector_Pointer_VTS_PGCI, "sector pointer to VTS_PGCI (Title Program Chain table)");
- Get_B4 (Sector_Pointer_VTSM_PGCI_UT, "sector pointer to VTSM_PGCI_UT (Menu Program Chain table)");
- Get_B4 (Sector_Pointer_VTS_TMAPTI, "sector pointer to VTS_TMAPTI (Time map)");
- Get_B4 (Sector_Pointer_VTSM_C_ADT, "sector pointer to VTSM_C_ADT (Menu cell address table)");
- Get_B4 (Sector_Pointer_VTSM_VOBU_ADMAP, "sector pointer to VTSM_VOBU_ADMAP(menu VOBU address map)");
- Get_B4 (Sector_Pointer_VTS_C_ADT, "sector pointer to VTS_C_ADT (Title set cell address table)");
- Get_B4 (Sector_Pointer_VTS_VOBU_ADMAP, "sector pointer to VTS_VOBU_ADMAP (Title set VOBU address map)");
- Skip_XX(24, "Unknown");
- Element_End0();
-
- //-VTSM
- Element_Begin1("VTSM (VTS for Menu, Vob 0)");
- Element_Begin1("Video streams");
- Element_Info2(1, " streams");
- SUBELEMENT(Video)
- Element_End0();
- Element_Begin1("Audio streams");
- Get_B2 (Audio_Count, "number of audio streams in VTSM_VOBS");
- Element_Info2(Audio_Count, " streams");
- for (int16u Pos=0; Pos<8; Pos++)
- {
- if (Pos<Audio_Count)
- SUBELEMENT(Audio)
- else
- Skip_XX(8, "Reserved for Audio");
- }
- Skip_XX(16, "Unknown");
- Element_End0();
- Element_Begin1("Text streams");
- Get_B2 (Text_Count, "number of subpicture streams in VTSM_VOBS");
- Element_Info2(Text_Count, " streams");
- for (int16u Pos=0; Pos<1; Pos++)
- {
- if (Pos<Text_Count)
- SUBELEMENT(Text)
- else
- Skip_XX(6, "Reserved for Text");
- }
- Skip_XX(164, "Unknown");
- Element_End0();
- Element_End0();
-
- //-VTS
- VTS_Attributes_AreHere=true;
- Element_Begin1("VTS (VTS for movie, Vob 1-9)");
- Element_Begin1("Video streams");
- Element_Info2(1, " streams");
- SUBELEMENT(Video)
- Element_End0();
- Element_Begin1("Audio streams");
- Get_B2 (Audio_Count, "number of audio streams in VMGM_VOBS");
- Element_Info2(Audio_Count, " streams");
- for (int16u Pos=0; Pos<8; Pos++)
- {
- if (Pos<Audio_Count)
- SUBELEMENT(Audio)
- else
- Skip_XX(8, "Reserved for Audio");
- }
- Skip_XX(16, "Unknown");
- Element_End0();
- Element_Begin1("Text streams");
- Get_B2 (Text_Count, "number of subpicture streams in VMGM_VOBS");
- Element_Info2(Text_Count, " streams");
- for (int16u Pos=0; Pos<32; Pos++)
- {
- if (Pos<Text_Count)
- SUBELEMENT(Text)
- else
- Skip_XX(6, "Reserved for Text");
- }
- Skip_XX(2, "Unknown");
- Element_End0();
- Element_Begin1("MultiChannel Info");
- Element_Info2(Audio_Count, " streams");
- for (int16u Pos=0; Pos<8; Pos++)
- {
- if (Pos<Audio_Count)
- SUBELEMENT(MultiChannel)
- else
- Skip_XX(24, "Reserved for multichannel extension");
- }
- Element_End0();
- Element_End0();
- Skip_XX(2048-Element_Offset, "Junk");
-
- //Filling
- FILLING_BEGIN();
- Fill(Stream_General, 0, General_Format_Profile, "Program");
-
- if (Version>0x001F)
- return;
- if (Sector_Pointer_LastSector==(int32u)-1 || Sector_Pointer_LastSector+1>File_Size/2048)
- Sector_Pointer_LastSector=(int32u)(File_Size/2048);
- Sectors.resize(Sector_Pointer_LastSector+1);
- if (Sector_Pointer_VTS_PTT_SRPT<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VTS_PTT_SRPT]=Sector_VTS_PTT_SRPT;
- if (Sector_Pointer_VTS_PGCI<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VTS_PGCI]=Sector_VTS_PGCI;
- if (Sector_Pointer_VTSM_PGCI_UT<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VTSM_PGCI_UT]=Sector_VTSM_PGCI_UT;
- if (Sector_Pointer_VTS_TMAPTI<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VTS_TMAPTI]=Sector_VTS_TMAPTI;
- if (Sector_Pointer_VTSM_C_ADT<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VTSM_C_ADT]=Sector_VTSM_C_ADT;
- if (Sector_Pointer_VTSM_VOBU_ADMAP<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VTSM_VOBU_ADMAP]=Sector_VTSM_VOBU_ADMAP;
- if (Sector_Pointer_VTS_C_ADT<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VTS_C_ADT]=Sector_VTS_C_ADT;
- if (Sector_Pointer_VTS_VOBU_ADMAP<=Sector_Pointer_LastSector)
- Sectors[Sector_Pointer_VTS_VOBU_ADMAP]=Sector_VTS_VOBU_ADMAP;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::Video()
-{
- //Parsing
- int32u Codec, Standard, AspectRatio, Resolution, BitRate_Mode;
- BS_Begin();
- Get_BS (2, Codec, "Coding mode"); Param_Info1(IFO_CodecV[Codec]);
- Get_BS (2, Standard, "Standard"); Param_Info1(IFO_Standard[Standard]);
- Get_BS (2, AspectRatio, "Aspect ratio"); Param_Info1(IFO_AspectRatio[AspectRatio]);
- Info_BS(1, Pan, "Automatic Pan/Scan"); Param_Info1(Pan?"No":"Yes");
- Info_BS(1, Letter, "Automatic Letterbox"); Param_Info1(Letter?"No":"Yes");
- Skip_BS(1, "CC for line 21 field 1 in GOP (NTSC only)");
- Skip_BS(1, "CC for line 21 field 2 in GOP (NTSC only)");
- Get_BS (3, Resolution, "Resolution"); Param_Info1(Ztring::ToZtring(IFO_Width[Resolution])+__T("x")+Ztring::ToZtring(IFO_Height[Standard][Resolution]));
- Info_BS(1, Letterboxed, "Letterboxed"); Param_Info1(Letter?"Yes":"No");
- Get_BS (1, BitRate_Mode, "Bitrate mode"); Param_Info1(IFO_BitRate_Mode[BitRate_Mode]);
- Info_BS(1, Camera, "Camera/Film"); Param_Info1(Letter?"Film":"Camera");
- BS_End();
-
- //Filling
- FILLING_BEGIN();
- if (VTS_Attributes_AreHere)
- {
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, StreamPos_Last, Video_Format, IFO_Format_V[Codec]);
- Fill(Stream_Video, StreamPos_Last, Video_Format_Version, IFO_Format_Version_V[Codec]);
- Fill(Stream_Video, StreamPos_Last, Video_Codec, IFO_CodecV[Codec]);
- Fill(Stream_Video, StreamPos_Last, Video_Width, IFO_Width[Resolution]);
- Fill(Stream_Video, StreamPos_Last, Video_Height, IFO_Height[Standard][Resolution]);
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, IFO_AspectRatio[AspectRatio], 3, true);
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, IFO_FrameRate[Standard]);
- Fill(Stream_Video, StreamPos_Last, Video_BitRate_Mode, IFO_BitRate_Mode[BitRate_Mode]);
- Fill(Stream_Video, StreamPos_Last, General_ID, __T("224"));
- Fill(Stream_Video, StreamPos_Last, General_ID_String, __T("224 (0xE0)"), Unlimited, true);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::Audio()
-{
- //Parsing
- Ztring Language;
- int32u Codec, LanguageType, Mode, Resolution, SamplingRate, Channels;
- int8u Language_Extension, ChannelsK=(int8u)-1;
- BS_Begin();
- Get_BS (3, Codec, "Coding mode"); Param_Info1(IFO_CodecA[Codec]);
- Info_BS(1, MultiChannel, "Multichannel extension present"); Param_Info1(MultiChannel?"Yes":"No");
- Get_BS (2, LanguageType, "Language type"); Param_Info1(LanguageType==1?"2CC":"Unknown");
- Get_BS (2, Mode, "Application mode"); Param_Info1(IFO_ModeA[Mode]);
- Get_BS (2, Resolution, "Resolution"); Param_Info1C((Codec==2 || Codec==3), IFO_ResolutionA[Resolution]); Param_Info1C((Codec==4), Mode?"DRC":"No DRC");
- Get_BS (2, SamplingRate, "Sampling rate"); Param_Info1(Ztring::ToZtring(IFO_SamplingRate[SamplingRate]));
- Get_BS (4, Channels, "Channels"); Param_Info2(Channels+1, " channels");
- BS_End();
- Get_Local(3, Language, "Language code");
- if (!Language.empty() && Language[0]>=0x80)
- Language.clear(); //this is 0xFF...
- if (Language==__T("iw"))
- Language=__T("he"); //Hebrew patch, is "iw" in DVDs
- Get_B1 (Language_Extension, "Language extension"); Param_Info1C((Language_Extension<8), IFO_Language_MoreA[Language_Extension]);
- Skip_B1( "Unknown");
- switch (Mode)
- {
- case 1 : //Karaoke
- {
- BS_Begin();
- Skip_BS(1, "Zero");
- Get_S1 (3, ChannelsK, "Channels");
- #ifdef MEDIAINFO_AC3_YES
- Param_Info1(AC3_ChannelPositions[ChannelsK]);
- #endif //MEDIAINFO_AC3_YES
- Skip_BS(2, "Version");
- Info_BS(1, MC, "MC intro present"); Param_Info1(MC?"Yes":"No");
- Info_BS(1, Duet, "Duet"); Param_Info1(Duet?"Duet":"Solo");
- BS_End();
- }
- break;
- case 2 : //Surround
- {
- BS_Begin();
- Skip_BS(4, "Reserved");
- Info_BS(1, DolbyDecode, "Suitable for Dolby surround decoding"); Param_Info1(DolbyDecode?"Yes":"No");
- Skip_BS(3, "Reserved");
- BS_End();
- }
- break;
- default:
- {
- Skip_B1( "Reserved");
- }
- }
-
- //Filling
- FILLING_BEGIN();
- if (VTS_Attributes_AreHere)
- {
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format, IFO_Format_A[Codec]);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format_Profile, IFO_Format_Profile_A[Codec]);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, IFO_CodecA[Codec]);
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, IFO_SamplingRate[SamplingRate]);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Channels+1);
- if (Codec==3)
- Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, IFO_ResolutionA[Resolution]);
- else if (Codec==4 && Mode)
- Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, "DRC");
- Fill(Stream_Audio, StreamPos_Last, Audio_Language, Language);
- if (Language_Extension<8)
- Fill(Stream_Audio, StreamPos_Last, Audio_Language_More, IFO_Language_MoreA[Language_Extension]);
- #ifdef MEDIAINFO_AC3_YES
- if (Codec==0 && ChannelsK!=(int8u)-1) //AC-3
- {
- Fill(Stream_Audio, 0, Audio_ChannelPositions, AC3_ChannelPositions[ChannelsK]);
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, AC3_ChannelPositions2[ChannelsK]);
- }
- #endif //MEDIAINFO_AC3_YES
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::Text()
-{
- //Parsing
- Ztring Language;
- int32u Codec, LanguageType;
- int8u Language_Extension;
- BS_Begin();
- Get_BS (3, Codec, "Coding mode"); Param_Info1(IFO_CodecT[Codec]);
- Skip_BS(3, "Reserved");
- Get_BS (2, LanguageType, "Language type"); Param_Info1(LanguageType==1?"2CC":"Unknown");
- BS_End();
- Skip_B1( "Reserved");
- Get_Local(3, Language, "Language code");
- if (!Language.empty() && Language[0]>=0x80)
- Language.clear(); //this is 0xFF...
- if (Language==__T("iw"))
- Language=__T("he"); //Hebrew patch, is "iw" in DVDs
- Get_B1 (Language_Extension, "Language extension"); Param_Info1C((Language_Extension<16), IFO_Language_MoreT[Language_Extension]);
-
- //Filling
- FILLING_BEGIN();
- if (VTS_Attributes_AreHere)
- {
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, StreamPos_Last, Text_Format, IFO_Format_T[Codec]);
- Fill(Stream_Text, StreamPos_Last, Text_BitDepth, IFO_Resolution_T[Codec]);
- Fill(Stream_Text, StreamPos_Last, Text_Codec, IFO_CodecT[Codec]);
- Fill(Stream_Text, StreamPos_Last, Text_Language, Language);
-
- if (Language_Extension<16)
- Fill(Stream_Text, StreamPos_Last, Text_Language_More, IFO_Language_MoreT[Language_Extension]);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::MultiChannel()
-{
- //Parsing
- BS_Begin();
- Element_Begin1("ACH0");
- Skip_BS(7, "Reserved");
- Skip_BS(1, "ACH0 Guide Melody exists");
- Element_End0();
- Element_Begin1("ACH1");
- Skip_BS(7, "Reserved");
- Skip_BS(1, "ACH1 Guide Melody exists");
- Element_End0();
- Element_Begin1("ACH2");
- Skip_BS(4, "Reserved");
- Skip_BS(1, "ACH2 Guide Vocal 1 exists");
- Skip_BS(1, "ACH2 Guide Vocal 2 exists");
- Skip_BS(1, "ACH2 Guide Melody 1 exists");
- Skip_BS(1, "ACH2 Guide Melody 2 exists");
- Element_End0();
- Element_Begin1("ACH3");
- Skip_BS(4, "Reserved");
- Skip_BS(1, "ACH3 Guide Vocal 1 exists");
- Skip_BS(1, "ACH3 Guide Vocal 2 exists");
- Skip_BS(1, "ACH3 Guide Melody A exists");
- Skip_BS(1, "ACH3 Sound Effect A exists");
- Element_End0();
- Element_Begin1("ACH4");
- Skip_BS(4, "Reserved");
- Skip_BS(1, "ACH4 Guide Vocal 1 exists");
- Skip_BS(1, "ACH4 Guide Vocal 2 exists");
- Skip_BS(1, "ACH4 Guide Melody B exists");
- Skip_BS(1, "ACH4 Sound Effect B exists");
- Element_End0();
- BS_End();
- Skip_XX(19, "Unknown");
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dvdv::Header_Parse()
-{
- //Calculating
- size_t Sector_Pos=(size_t)((File_Offset+Buffer_Offset)/2048);
- size_t Sector_Count=1;
- while (Sector_Pos+Sector_Count<Sectors.size() && Sectors[Sector_Pos+Sector_Count]==Sector_Nothing)
- Sector_Count++;
-
- //Filling
- Header_Fill_Size(Sector_Count*2048);
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::Data_Parse()
-{
- //Parsing
- size_t Sector_Pos=(size_t)((File_Offset+Buffer_Offset)/2048);
- if (Sector_Pos>=Sectors.size())
- {
- Accept("DVD Video");
- Finish("DVD Video");
- return;
- }
-
- //Parsing
- switch(Sectors[Sector_Pos])
- {
- case Sector_VTS_PTT_SRPT : VTS_PTT_SRPT(); break;
- case Sector_VTS_PGCI : VTS_PGCI(); break;
- case Sector_VTSM_PGCI_UT : VTSM_PGCI_UT(); break;
- case Sector_VTS_TMAPTI : VTS_TMAPTI(); break;
- case Sector_VTSM_C_ADT : VTSM_C_ADT(); break;
- case Sector_VTSM_VOBU_ADMAP : VTSM_VOBU_ADMAP(); break;
- case Sector_VTS_C_ADT : VTS_C_ADT(); break;
- case Sector_VTS_VOBU_ADMAP : VTS_VOBU_ADMAP(); break;
- case Sector_TT_SRPT : TT_SRPT(); break;
- case Sector_VMGM_PGCI_UT : VMGM_PGCI_UT(); break;
- case Sector_VMG_PTL_MAIT : VMG_PTL_MAIT(); break;
- case Sector_VMG_VTS_ATRT : VMG_VTS_ATRT(); break;
- case Sector_VMG_TXTDT_MG : VMG_TXTDT_MG(); break;
- case Sector_VMGM_C_ADT : VMGM_C_ADT(); break;
- case Sector_VMGM_VOBU_ADMAP : VMGM_VOBU_ADMAP(); break;
- default : ;
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VTS_PTT_SRPT ()
-{
- Element_Name("Table of Titles and Chapters");
-
- //Parsing
- int32u Element_RealSize;
- Element_Begin1("Header");
- Skip_B2( "Count of elements");
- Skip_B2( "Unknown");
- Get_B4 (Element_RealSize, "End address");
- Element_RealSize++; //Last byte
- Element_End0();
- Element_Begin1("Extra data");
- int32u Offset;
- Get_B4 (Offset, "Offset of first element");
- int64u Extra_Size=Offset-Element_Offset;
- if (Extra_Size>0)
- Skip_XX(Extra_Size, "Extra data (Unknown)");
- Element_End0();
-
- //For each chapter
- while (Element_Offset<Element_RealSize)
- {
- //VTS_PTT
- int16u PGCN, PGN;
- Element_Begin0();
- Get_B2 (PGCN, "Program Chain (PGCN)");
- Get_B2 (PGN, "Program (PGN)");
- Element_Name("Chapter"); Element_Info1(Ztring::ToZtring(PGCN)); Element_Info1(Ztring::ToZtring(PGN));
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VTS_PGCI ()
-{
- Element_Name("Title Program Chain table");
-
- //Parsing
- int32u EndAddress;
- Element_Begin1("Header");
- int32u Offset;
- Skip_B2( "Number of Program Chains");
- Skip_B2( "Reserved");
- Get_B4 (EndAddress, "End address");
- if (EndAddress>=Element_Size)
- EndAddress=(int32u)Element_Size-1;
- Element_Begin1("PGC category");
- BS_Begin();
- Skip_BS(1, "entry PGC");
- Skip_BS(7, "title number");
- BS_End();
- Skip_B1( "Unknown");
- Skip_B2( "parental management mask");
- Element_End0();
- Get_B4 (Offset, "offset to VTS_PGC - relative to VTS_PGCI");
- if (Offset-16>0)
- Skip_XX(Offset-16, "Unknown");
- Element_End0();
-
- //For each Program
- //DETAILLEVEL_SET(1.0);
- while (Element_Offset<=EndAddress)
- {
- PGC(Offset, true);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VTSM_PGCI_UT ()
-{
- Element_Name("Menu Program Chain table");
-
- //Parsing
- int16u LU_Count;
- Element_Begin1("Header");
- int32u EndAddress, Offset;
- int8u Flags;
- Get_B2 (LU_Count, "Number of Language Units");
- Skip_B2( "Reserved");
- Get_B4 (EndAddress, "End address");
- if (EndAddress>=Element_Size)
- EndAddress=(int32u)Element_Size-1;
- Skip_C3( "Language");
- Get_B1 (Flags, "Menu existence flags");
- Skip_Flags(Flags, 3, "PTT");
- Skip_Flags(Flags, 4, "angle");
- Skip_Flags(Flags, 5, "audio");
- Skip_Flags(Flags, 6, "sub-picture");
- Skip_Flags(Flags, 7, "root");
- Get_B4 (Offset, "Offset to VTSM_LU relative to VTSM_PGCI_UT");
- if (Offset-16>0)
- Skip_XX(Offset-16, "Unknown");
- Element_End0();
-
- for (int16u LU_Pos=0; LU_Pos<LU_Count; LU_Pos++)
- {
- Element_Begin1("Language Unit");
- int32u LU_Size;
- int16u PGC_Count;
- Element_Begin1("Header");
- Get_B2 (PGC_Count, "Number of Program Chains");
- Skip_B2( "Reserved");
- Get_B4 (LU_Size, "end address (last byte of last PGC in this LU) relative to VTSM_LU");
- LU_Size++; //Last byte
- Element_Begin1("PGC category");
- int32u EntryPGC;
- BS_Begin();
- Get_BS (1, EntryPGC, "Entry PGC");
- Skip_BS(3, "Unknown");
- if (EntryPGC)
- {
- Info_BS(4, MenuType, "menu type"); Param_Info1(IFO_MenuType[MenuType]);
- }
- else
- {
- Skip_BS(4, "Reserved");
- }
- BS_End();
- Skip_B1( "Unknown");
- Skip_B2( "parental management mask");
- Element_End0();
- Get_B4 (Offset, "offset to VTSM_PGC relative to VTSM_LU");
- if (Offset-16>0)
- Skip_XX(Offset-16, "Unknown");
- Element_End0();
- for (int16u PGC_Pos=0; PGC_Pos<PGC_Count; PGC_Pos++)
- PGC(Element_Offset);
-
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VTS_TMAPTI ()
-{
- Element_Name("Time map");
-
- //Parsing
- Element_Begin1("Header");
- int32u EndAddress, Offset;
- Skip_B2( "Number of program chains");
- Skip_B2( "Reserved");
- Get_B4 (EndAddress, "End address");
- if (EndAddress>=Element_Size)
- EndAddress=(int32u)Element_Size-1;
- Get_B4 (Offset, "Offset to VTS_TMAP 1");
- if (Offset-12>0)
- Skip_XX(Offset-12, "Unknown");
- Element_End0();
-
- //DETAILLEVEL_SET(1.0);
- while (Element_Offset<=EndAddress)
- {
- //VTS_TMAP
- Element_Begin1("Time Map");
- //std::vector<size_t> Sector_Times;
- int8u Sector_Times_SecondsPerTime;
- int16u Count;
- Get_B1 (Sector_Times_SecondsPerTime, "Time unit (seconds)");
- Skip_B1( "Unknown");
- Get_B2 (Count, "Number of entries in map");
- //Sector_Times.resize(Count);
- BS_Begin();
- for (int16u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("Sector Offset");
- int32u SectorOffset;
- Skip_BS( 1, "discontinuous with previous");
- Get_BS (31, SectorOffset, "Sector offset within VOBS of nearest VOBU");
- //Get_B4 (Sector_Times[Pos], Sector offset within VOBS of nearest VOBU);// Param_Info1(Ztring().Duration_From_Milliseconds((Pos+1)*Sectors_Times_SecondsPerTime[Program_Pos]));
- //Sector_Times[Pos]&=0x7FFFFFFF; //bit 31 is set if VOBU time codes are discontinuous with previous
- Element_Info1(SectorOffset);
- Element_End0();
- }
- BS_End();
- Element_End0();
-
- //Filling
- //Sectors_Times.push_back(Sector_Times);
- //Sectors_Times_SecondsPerTime.push_back(Sector_Times_SecondsPerTime);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VTSM_C_ADT ()
-{
- Element_Name("Menu cell address table");
-
- //Parsing
- int32u EndAddress;
- Element_Begin1("Header");
- Skip_B2( "Number of cells");
- Skip_B2( "Reserved");
- Get_B4 (EndAddress, "End address");
- if (EndAddress>=Element_Size)
- EndAddress=(int32u)Element_Size-1;
- Element_End0();
-
- //DETAILLEVEL_SET(1.0);
- while (Element_Offset<=EndAddress)
- {
- //ADT
- Element_Begin1("Entry");
- Skip_B2( "VOBidn");
- Skip_B1( "CELLidn");
- Skip_B1( "Unknown");
- Skip_B4( "Starting sector within VOB");
- Skip_B4( "Ending sector within VOB");
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VTSM_VOBU_ADMAP ()
-{
- Element_Name("Menu VOBU address map");
-
- //Parsing
- int32u EndAddress;
- Element_Begin1("Header");
- Get_B4 (EndAddress, "End address");
- if (EndAddress>=Element_Size)
- EndAddress=(int32u)Element_Size-1;
- Element_End0();
-
- //DETAILLEVEL_SET(1.0);
- while (Element_Offset<=EndAddress)
- {
- //ADMAP
- Skip_B4( "Starting sector within VOB of first VOBU");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VTS_C_ADT ()
-{
- Element_Name("Title set cell address table");
-
- //Parsing
- int32u EndAddress;
- Element_Begin1("Header");
- Skip_B2( "Number of cells");
- Skip_B2( "Reserved");
- Get_B4 (EndAddress, "End address");
- if (EndAddress>=Element_Size)
- EndAddress=(int32u)Element_Size-1;
- Element_End0();
-
- //DETAILLEVEL_SET(1.0);
- while (Element_Offset<=EndAddress)
- {
- //ADT
- Element_Begin1("Entry");
- int32u Start, End;
- int16u VOBidn;
- int8u CELLidn;
- Get_B2 (VOBidn, "VOBidn");
- Get_B1 (CELLidn, "CELLidn");
- Skip_B1( "Unknown");
- Get_B4 (Start, "Starting sector within VOB"); Param_Info1(Time_ADT(Start));
- Get_B4 (End, "Ending sector within VOB"); Param_Info1(Time_ADT(End));
- Element_End0();
-
- //Filling
- FILLING_BEGIN();
- FILLING_END();
- //Fill(Ztring::ToZtring(CELLidn).To_Local().c_str(), Time_ADT(Start));
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VTS_VOBU_ADMAP ()
-{
- Element_Name("Title set VOBU address map");
-
- //Parsing
- int32u EndAddress;
- Element_Begin1("Header");
- Get_B4 (EndAddress, "End address");
- if (EndAddress>=Element_Size)
- EndAddress=(int32u)Element_Size-1;
- Element_End0();
-
- //DETAILLEVEL_SET(1.0);
- while (Element_Offset<Element_Size)
- {
- //ADMAP
- Skip_B4( "Starting sector within VOB of first VOBU");
- }
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Ztring File_Dvdv::Time_ADT(int32u)
-{
- return Ztring();
- /*
- if (Sectors_Times.empty())
- return Ztring(); //TODO: it can be empty?
-
- while (Time_Pos<Sectors_Times[Program_Pos].size() && Sectors_Times[Program_Pos][Time_Pos]<Value)
- Time_Pos++;
- if (Time_Pos<Sectors_Times[Program_Pos].size())
- {
- int32u Time=(Time_Pos+1)*Sectors_Times_SecondsPerTime[Program_Pos]*1000;
- float32 Part;
- //True time is between Time and Time+Sectors_Times_SecondsPerTime, finding where...
- int32u Sectors_Count;
- if (Time_Pos==0)
- Sectors_Count=Sectors_Times[Program_Pos][Time_Pos];
- else
- Sectors_Count=Sectors_Times[Program_Pos][Time_Pos]-Sectors_Times[Program_Pos][Time_Pos-1];
- Part=(Sectors_Times[Program_Pos][Time_Pos]-Value); //Count of more sectors after
- Part/=Sectors_Count; //Percentage
- Time=(int32u)((Time_Pos+1-Part)*Sectors_Times_SecondsPerTime[Program_Pos]*1000);
-
- return Ztring().Duration_From_Milliseconds(Time*1000);
- }
- else
- {
- int32u Time=(Time_Pos+1)*Sectors_Times_SecondsPerTime[Program_Pos]*1000;
- float32 Part;
- //True time is between Time and Time+Sectors_Times_SecondsPerTime, finding where... but with the last offset diffrence
- int32u Sectors_Count=Sectors_Times[Program_Pos][Time_Pos-1]-Sectors_Times[Program_Pos][Time_Pos-2];
- Part=((int32s)Sectors_Times[Program_Pos][Time_Pos-1])-((int32s)Value); //Count of more sectors after
- Part/=Sectors_Count; //Percentage
- Part+=1; //We were one offset less
- Time=(int32u)((Time_Pos+1-Part)*Sectors_Times_SecondsPerTime[Program_Pos]*1000);
-
- return Ztring().Duration_From_Milliseconds(Time*1000);
- }
- */
-}
-
-void File_Dvdv::Get_Duration(int64u &Duration, const Ztring &Name)
-{
- int32u FrameRate, FF;
- int8u HH, MM, Sec;
- Element_Begin1(Name);
- Get_B1 (HH, "Hours (BCD)");
- Get_B1 (MM, "Minutes (BCD)");
- Get_B1 (Sec, "Seconds (BCD)");
- BS_Begin();
- Get_BS (2, FrameRate, "Frame rate"); Param_Info2(IFO_PlaybackTime_FrameRate[FrameRate], " fps");
- Get_BS (6, FF, "Frames (BCD)");
- BS_End();
-
- Duration= Ztring::ToZtring(HH, 16).To_int64u() * 60 * 60 * 1000 //BCD
- + Ztring::ToZtring(MM, 16).To_int64u() * 60 * 1000 //BCD
- + Ztring::ToZtring(Sec, 16).To_int64u() * 1000 //BCD
- + Ztring::ToZtring(FF, 16).To_int64u() * 1000/IFO_PlaybackTime_FrameRate[FrameRate]; //BCD
-
- Element_Info1(Ztring::ToZtring(Duration));
- Element_End0();
-}
-
-
-void File_Dvdv::PGC(int64u Offset, bool Title)
-{
- vector<int8u> Stream_Control_Audio;
- vector<int8u> Stream_Control_SubPicture_43;
- vector<int8u> Stream_Control_SubPicture_Wide;
- vector<int8u> Stream_Control_SubPicture_Letterbox;
- vector<int8u> Stream_Control_SubPicture_PanScan;
- vector<int64u> CellDurations;
- vector<int8u> ProgramMap;
-
- //VTS_PGC
- Element_Begin1("PGC");
- int16u commands, program_map, cell_playback, cell_position;
- int8u Program_Count;
- Element_Begin1("Header");
- int32u Flags;
- int8u Cells;
- int64u TotalDuration;
- Skip_B2( "Unknown");
- Get_B1 (Program_Count, "number of programs");
- Get_B1 (Cells, "number of cells");
- Get_Duration(TotalDuration, "Duration");
- Get_B4 (Flags, "prohibited user ops");
- /*Skip_Flags(Flags, 0, "Time play or search");
- Skip_Flags(Flags, 1, PTT play or search);
- Skip_Flags(Flags, 2, Title play);
- Skip_Flags(Flags, 3, Stop);
- Skip_Flags(Flags, 4, GoUp);
- Skip_Flags(Flags, 5, Time or PTT search);
- Skip_Flags(Flags, 6, TopPG or PrevPG search);
- Skip_Flags(Flags, 7, NextPG search);
- Skip_Flags(Flags, 8, Forward scan);
- Skip_Flags(Flags, 9, Backward scan);
- Skip_Flags(Flags, 10, Menu call - Title);
- Skip_Flags(Flags, 11, Menu call - Root);
- Skip_Flags(Flags, 12, Menu call - Subpicture);
- Skip_Flags(Flags, 13, Menu call - Audio);
- Skip_Flags(Flags, 14, Menu call - Angle);
- Skip_Flags(Flags, 15, Menu call - PTT);
- Skip_Flags(Flags, 16, Resume);
- Skip_Flags(Flags, 17, Button select or activate);
- Skip_Flags(Flags, 18, Still off);
- Skip_Flags(Flags, 19, Pause on);
- Skip_Flags(Flags, 20, Audio stream change);
- Skip_Flags(Flags, 21, Subpicture stream change);
- Skip_Flags(Flags, 22, Angle change);
- Skip_Flags(Flags, 23, Karaoke audio mix change);
- Skip_Flags(Flags, 24, Video presentation mode change);
- */
- /*
- Skip_Flags(Flags, 0, Video presentation mode change);
- Skip_Flags(Flags, 1, Karaoke audio mix change);
- Skip_Flags(Flags, 2, Angle change);
- Skip_Flags(Flags, 3, Subpicture stream change);
- Skip_Flags(Flags, 4, Audio stream change);
- Skip_Flags(Flags, 5, Pause on);
- Skip_Flags(Flags, 6, Still off);
- Skip_Flags(Flags, 7, Button select or activate);
- Skip_Flags(Flags, 8, Resume);
- Skip_Flags(Flags, 9, Menu call - PTT);
- Skip_Flags(Flags, 10, Menu call - Angle);
- Skip_Flags(Flags, 11, Menu call - Audio);
- Skip_Flags(Flags, 12, Menu call - Subpicture);
- Skip_Flags(Flags, 13, Menu call - Root);
- Skip_Flags(Flags, 14, Menu call - Title);
- Skip_Flags(Flags, 15, Backward scan);
- Skip_Flags(Flags, 16, Forward scan);
- Skip_Flags(Flags, 17, NextPG search);
- Skip_Flags(Flags, 18, TopPG or PrevPG search);
- Skip_Flags(Flags, 19, Time or PTT search);
- Skip_Flags(Flags, 20, GoUp);
- Skip_Flags(Flags, 21, Stop);
- Skip_Flags(Flags, 22, Title play);
- Skip_Flags(Flags, 23, PTT play or search);
- Skip_Flags(Flags, 24, Time play or search);
- */
- Element_Begin1("Audio Stream Controls");
- for (size_t Pos=0; Pos<8; Pos++)
- {
- Element_Begin1("Audio Stream Control");
- Element_Info1(Ztring::ToZtring(Pos));
- int8u Number;
- bool Available;
- BS_Begin();
- Get_SB ( Available, "Stream available");
- Get_S1 (7, Number, "Stream number");
- BS_End();
- Skip_B1( "Reserved");
- Element_End0();
- if (Available)
- Stream_Control_Audio.push_back(Number);
-
- if (Available && Retrieve(Stream_Audio, Pos, Text_ID).empty() && Sectors[(size_t)((File_Offset+Buffer_Offset)/2048)]==Sector_VTS_PGCI)
- {
- while (Pos>Count_Get(Stream_Audio))
- Stream_Prepare(Stream_Audio);
-
- int8u ToAdd=0;
- if (Retrieve(Stream_Audio, Pos, Audio_Format)==__T("AC-3"))
- ToAdd=0x80;
- if (Retrieve(Stream_Audio, Pos, Audio_Format)==__T("DTS"))
- ToAdd=0x88;
- if (Retrieve(Stream_Audio, Pos, Audio_Format)==__T("LPCM"))
- ToAdd=0xA0;
- Ztring ID_String; ID_String.From_Number(ToAdd+Number); ID_String+=__T(" (0x"); ID_String+=Ztring::ToZtring(ToAdd+Number, 16); ID_String+=__T(")");
- Fill(Stream_Audio, Pos, Audio_ID, ID_String);
- Fill(Stream_Audio, Pos, Audio_ID_String, ID_String, true);
- }
- }
- Element_End0();
- Element_Begin1("Subpicture Stream Controls");
- for (size_t Pos=0; Pos<32; Pos++)
- {
- Element_Begin1("Subpicture Stream Control");
- Element_Info1(Ztring::ToZtring(Pos));
- int8u Number_43, Number_Wide, Number_Letterbox, Number_PanScan;
- bool Available;
- BS_Begin();
- Get_SB ( Available, "Stream available");
- Get_S1 (7, Number_43, "Stream number for 4/3");
- BS_End();
- Get_B1 (Number_Wide, "Stream number for Wide");
- Get_B1 (Number_Letterbox, "Stream number for Letterbox");
- Get_B1 (Number_PanScan, "Stream number for Pan&Scan");
- Element_End0();
- if (Available)
- {
- Stream_Control_SubPicture_43.push_back(Number_43);
- Stream_Control_SubPicture_Wide.push_back(Number_Wide);
- Stream_Control_SubPicture_Letterbox.push_back(Number_Letterbox);
- Stream_Control_SubPicture_PanScan.push_back(Number_PanScan);
- }
-
- if (Available && Retrieve(Stream_Text, Pos, Text_ID).empty() && Sectors[(size_t)((File_Offset+Buffer_Offset)/2048)]==Sector_VTS_PGCI)
- {
- while (Pos>Count_Get(Stream_Text))
- Stream_Prepare(Stream_Text);
-
- Ztring ID_String; ID_String.From_Number(0x20+Number_Wide); ID_String+=__T(" (0x"); ID_String+=Ztring::ToZtring(0x20+Number_Wide, 16); ID_String+=__T(")");
- Fill(Stream_Text, Pos, Text_ID, ID_String);
- Fill(Stream_Text, Pos, Text_ID_String, ID_String, true);
- }
- }
- Element_End0();
- Skip_B2( "next PGCN");
- Skip_B2( "previous PGCN");
- Skip_B2( "goup PGCN");
- Skip_B1( "PGC still time - 255=infinite");
- Skip_B1( "PG playback mode");
- Element_Begin1("palette");
- for (int Pos=0; Pos<16; Pos++)
- {
- Skip_B4( "palette (0 - Y - Cr - Cb)");
- }
- Element_End0();
- Get_B2 (commands, "offset within PGC to commands");
- Get_B2 (program_map, "offset within PGC to program map");
- Get_B2 (cell_playback, "offset within PGC to cell playback information table");
- Get_B2 (cell_position, "offset within PGC to cell position information table");
- Element_End0();
-
- //commands
- if (commands>0)
- {
- if (Element_Offset<Offset+commands)
- {
- if (Offset+commands>Element_Size)
- {
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- return;
- }
- Skip_XX(Offset+commands-Element_Offset, "Unknown");
- }
- Element_Begin1("commands");
- int16u PreCommands_Count, PostCommands_Count, CellCommands_Count, EndAdress;
- Get_B2 (PreCommands_Count, "Number of pre commands");
- Get_B2 (PostCommands_Count, "Number of post commands");
- Get_B2 (CellCommands_Count, "Number of cell commands");
- Get_B2 (EndAdress, "End address relative to command table");
- if (PreCommands_Count>0)
- {
- Element_Begin1("Pre commands");
- for (int16u Pos=0; Pos<PreCommands_Count; Pos++)
- {
- Element_Begin1("Pre command");
- Skip_XX(8, "Pre command");
- Element_End0();
- }
- Element_End0();
- }
- if (PostCommands_Count>0)
- {
- Element_Begin1("Post commands");
- for (int16u Pos=0; Pos<PostCommands_Count; Pos++)
- {
- Element_Begin1("Post command");
- Skip_XX(8, "Post command");
- Element_End0();
- }
- Element_End0();
- }
- if (CellCommands_Count>0)
- {
- Element_Begin1("Cell commands");
- for (int16u Pos=0; Pos<CellCommands_Count; Pos++)
- {
- Element_Begin1("Cell command");
- Skip_XX(8, "Cell command");
- Element_End0();
- }
- Element_End0();
- }
- Element_End0();
- }
-
- //program map
- if (program_map>0)
- {
- if (Element_Offset<Offset+program_map)
- Skip_XX(Offset+program_map-Element_Offset, "Unknown");
- Element_Begin1("program map");
- for (int8u Pos=0; Pos<Program_Count; Pos++)
- {
- Element_Begin1("Entry");
- int8u entry;
- Get_B1( entry, "Entry cell number");
- ProgramMap.push_back(entry);
- //Skip_B1( "Entry cell number");
- Element_End0();
- }
- Element_End0();
- }
-
- //cell playback
- if (cell_playback>0)
- {
- if (Element_Offset<Offset+cell_playback)
- Skip_XX(Offset+cell_playback-Element_Offset, "Unknown");
- Element_Begin1("cell playback");
- for (int8u Pos=0; Pos<Cells; Pos++)
- {
- int64u CellDuration;
- Element_Begin1("cell");
- Skip_XX(4, "ToDo");
- Get_Duration(CellDuration, "Time");
- Skip_B4( "first VOBU start sector");
- Skip_B4( "first ILVU end sector");
- Skip_B4( "last VOBU start sector");
- Skip_B4( "last VOBU end sector");
- Element_Info1(Ztring::ToZtring(Pos)); Element_Info1(Ztring::ToZtring(CellDuration));
- Element_End0();
-
- CellDurations.push_back(CellDuration);
- }
- Element_End0();
- }
-
- //cell position
- if (cell_position>0)
- {
- if (Element_Offset<Offset+cell_position)
- Skip_XX(Offset+cell_position-Element_Offset, "Unknown");
- Element_Begin1("cell position");
- for (int8u Pos=0; Pos<Cells; Pos++)
- {
- Element_Begin1("cell");
- Skip_B2( "VOBid");
- Skip_B1( "reserved");
- Skip_B1( "Cell id");
- Element_End0();
- }
- Element_End0();
- }
-
- Element_End0();
-
- FILLING_BEGIN();
- if (Title)
- {
- Stream_Prepare(Stream_Menu);
-
- int64u ProgramTotalDuration=0;
- Fill(Stream_Menu, StreamPos_Last, Menu_Chapters_Pos_Begin, Count_Get(Stream_Menu, StreamPos_Last), 10, true);
- for (int8u Pos=0; Pos<ProgramMap.size(); Pos++)
- {
- Fill(StreamKind_Last, StreamPos_Last, Ztring().Duration_From_Milliseconds(ProgramTotalDuration).To_Local().c_str(), Ztring(__T("Chapter "))+Ztring::ToZtring(Pos+1));
-
- int8u End;
- if (Pos+1>=Program_Count)
- End=Cells+1;
- else
- End=ProgramMap[Pos+1];
-
- int64u ProgramDuration=0;
- if (Pos<ProgramMap.size())
- for (int8u CellPos=ProgramMap[Pos]; CellPos<End; CellPos++)
- if (CellPos && CellPos<=CellDurations.size())
- ProgramDuration+=CellDurations[CellPos-1];
- ProgramTotalDuration+=ProgramDuration;
- }
- Fill(Stream_Menu, StreamPos_Last, Menu_Chapters_Pos_End, Count_Get(Stream_Menu, StreamPos_Last), 10, true);
- Fill(Stream_Menu, StreamPos_Last, Menu_Duration, TotalDuration);
-
- for (size_t Pos=0; Pos<Stream_Control_Audio.size(); Pos++)
- {
- Fill(StreamKind_Last, StreamPos_Last, "List (Audio)", Stream_Control_Audio[Pos]);
- }
- for (size_t Pos=0; Pos<Stream_Control_SubPicture_43.size(); Pos++)
- {
- Fill(StreamKind_Last, StreamPos_Last, "List (Subtitles 4/3)", Stream_Control_SubPicture_43[Pos]);
- }
- for (size_t Pos=0; Pos<Stream_Control_SubPicture_Wide.size(); Pos++)
- {
- Fill(StreamKind_Last, StreamPos_Last, "List (Subtitles Wide)", Stream_Control_SubPicture_Wide[Pos]);
- }
- for (size_t Pos=0; Pos<Stream_Control_SubPicture_Letterbox.size(); Pos++)
- {
- Fill(StreamKind_Last, StreamPos_Last, "List (Subtitles Letterbox)", Stream_Control_SubPicture_Letterbox[Pos]);
- }
- for (size_t Pos=0; Pos<Stream_Control_SubPicture_PanScan.size(); Pos++)
- {
- Fill(StreamKind_Last, StreamPos_Last, "List (Subtitles Pan&Scan)", Stream_Control_SubPicture_PanScan[Pos]);
- }
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::TT_SRPT()
-{
- Element_Name("table of titles");
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VMGM_PGCI_UT()
-{
- Element_Name("Menu Program Chain table");
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VMG_PTL_MAIT()
-{
- Element_Name("Parental Management masks");
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VMG_VTS_ATRT()
-{
- Element_Name("copies of VTS audio/sub-picture attributes");
-
- //Parsing
- int32u EndAddress;
- Element_Begin1("Header");
- int32u Offset;
- Skip_B4( "Number of title sets");
- Get_B4 (EndAddress, "End address");
- if (EndAddress>=Element_Size)
- EndAddress=(int32u)Element_Size-1;
- Get_B4 (Offset, "Offset to VTSM_LU relative to VTSM_PGCI_UT");
- if (Offset-12>0)
- Skip_XX(Offset-12, "Unknown");
- Element_End0();
-
- while (Element_Offset<=EndAddress)
- {
- Element_Begin1("VTS_ATRT");
- Element_Begin1("Header");
- int32u Size;
- Get_B4 (Size, "End address");
- Size++; //Last byte
- Element_End0();
- Element_Begin1("Copy of VTS Category");
- Skip_B4( "VTS Category");
- Element_End0();
- Element_Begin1("Copy of VTS attributes");
- Skip_XX(Size-8, "VTS attributes");
- Element_End0();
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VMG_TXTDT_MG()
-{
- Element_Name("text data");
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VMGM_C_ADT()
-{
- Element_Name("menu cell address table");
-}
-
-//---------------------------------------------------------------------------
-void File_Dvdv::VMGM_VOBU_ADMAP()
-{
- Element_Name("menu VOBU address map");
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_DVDV_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dvdv.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dvdv.h
deleted file mode 100644
index d9ef5f85b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dvdv.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DVD objects
-// (.ifo files on DVD-Video)
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DvdvH
-#define MediaInfo_File_DvdvH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Dvdv
-//***************************************************************************
-
-class File_Dvdv : public File__Analyze
-{
-protected :
- //Streams management
- void Streams_Finish();
-
-public :
- File_Dvdv();
-
-private :
- //Buffer
- void FileHeader_Parse ();
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void VMG();
- void VTS();
- void VTS_PTT_SRPT();
- void VTS_PGCI();
- void VTSM_PGCI_UT();
- void VTS_TMAPTI();
- void VTSM_C_ADT();
- void VTSM_VOBU_ADMAP();
- void VTS_C_ADT();
- void VTS_VOBU_ADMAP();
- void TT_SRPT();
- void VMGM_PGCI_UT();
- void VMG_PTL_MAIT();
- void VMG_VTS_ATRT();
- void VMG_TXTDT_MG();
- void VMGM_C_ADT();
- void VMGM_VOBU_ADMAP();
-
- void Video();
- void Audio();
- void Text();
- void MultiChannel();
-
- //Temp
- bool VTS_Attributes_AreHere;
- //std::vector<size_t> Sectors;
- //std::vector<std::vector<size_t> > Sectors_Times;
- //std::vector<int8u> Sectors_Times_SecondsPerTime;
-
- enum sector
- {
- Sector_Nothing,
- Sector_VTS_PTT_SRPT,
- Sector_VTS_PGCI,
- Sector_VTSM_PGCI_UT,
- Sector_VTS_TMAPTI,
- Sector_VTSM_C_ADT,
- Sector_VTSM_VOBU_ADMAP,
- Sector_VTS_C_ADT,
- Sector_VTS_VOBU_ADMAP,
- Sector_TT_SRPT,
- Sector_VMGM_PGCI_UT,
- Sector_VMG_PTL_MAIT,
- Sector_VMG_VTS_ATRT,
- Sector_VMG_TXTDT_MG,
- Sector_VMGM_C_ADT,
- Sector_VMGM_VOBU_ADMAP,
- };
- std::vector<sector> Sectors;
-
- //Helpers
- Ztring Time_ADT(int32u Value);
- size_t Program_Pos;
- size_t Time_Pos;
- void Get_Duration(int64u &Duration, const Ztring &Name);
- Ztring Time_String; //Value from Time_*()
- void PGC(int64u Offset, bool Title=false);
-};
-
-//***************************************************************************
-// Const
-//***************************************************************************
-
-namespace Dvdv
-{
- const int32u VMG=0x2D564D47;
- const int32u VTS=0x2D565453;
-}
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dxw.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dxw.cpp
deleted file mode 100644
index a001463a5..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dxw.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DXW_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Dxw.h"
-#include "MediaInfo/MediaInfo.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#include "ZenLib/Dir.h"
-#include "ZenLib/FileName.h"
-#include "ZenLib/Format/Http/Http_Utils.h"
-#include "tinyxml2.h"
-using namespace tinyxml2;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Dxw::File_Dxw()
-:File__Analyze()
-{
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Dxw;
- StreamIDs_Width[0]=sizeof(size_t)*2;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent_Accept_Specific=true;
- #endif //MEDIAINFO_DEMUX
-
- //Temp
- ReferenceFiles=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_Dxw::~File_Dxw()
-{
- delete ReferenceFiles; //ReferenceFiles=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dxw::Streams_Finish()
-{
- if (ReferenceFiles==NULL)
- return;
-
- ReferenceFiles->ParseReferences();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_Dxw::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- if (ReferenceFiles==NULL)
- return 0;
-
- return ReferenceFiles->Seek(Method, Value, ID);
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Dxw::FileHeader_Begin()
-{
- XMLDocument document;
- if (!FileHeader_Begin_XML(document))
- return false;
-
- {
- XMLElement* Root=document.FirstChildElement("indexFile");
- if (Root)
- {
- const char* Attribute=Root->Attribute("xmlns");
- if (Attribute==NULL || Ztring().From_UTF8(Attribute)!=__T("urn:digimetrics-xml-wrapper"))
- {
- Reject("DXW");
- return false;
- }
-
- Accept("DXW");
- Fill(Stream_General, 0, General_Format, "DXW");
-
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
-
- XMLElement* Track=Root->FirstChildElement();
- while (Track)
- {
- if (string(Track->Value())=="clip")
- {
- sequence* Sequence=new sequence;
-
- Attribute=Track->Attribute("file");
- if (Attribute)
- {
- Sequence->AddFileName(Ztring().From_UTF8(Attribute));
-
- Attribute=Track->Attribute("type");
- if (Attribute)
- {
- Ztring StreamKind; StreamKind.From_UTF8(Attribute);
- if (StreamKind==__T("video"))
- Sequence->StreamKind=Stream_Video;
- if (StreamKind==__T("audio"))
- Sequence->StreamKind=Stream_Audio;
- if (StreamKind==__T("data"))
- Sequence->StreamKind=Stream_Text; //Not sure this is a right mapping, but this is only used when file is missing
- }
-
- Attribute=Track->Attribute("source");
- if (Attribute)
- {
- Ztring StreamKind; StreamKind.From_UTF8(Attribute);
- if (StreamKind==__T("main"))
- Sequence->IsMain=true;
- }
-
- Sequence->StreamID=ReferenceFiles->Sequences_Size()+1;
- }
-
- Attribute=Track->Attribute("framerate");
- if (Attribute)
- {
- Sequence->FrameRate_Set(Ztring().From_UTF8(Attribute).To_float64());
-
- Attribute=Track->Attribute("type");
- if (Attribute)
- {
- Ztring StreamKind; StreamKind.From_UTF8(Attribute);
- if (StreamKind==__T("video"))
- Sequence->StreamKind=Stream_Video;
- if (StreamKind==__T("audio"))
- Sequence->StreamKind=Stream_Audio;
- if (StreamKind==__T("data"))
- Sequence->StreamKind=Stream_Text; //Not sure this is a right mapping, but this is only used when file is missing
- }
-
- XMLElement* Frame=Track->FirstChildElement();
- while (Frame)
- {
- if (string(Frame->Value())=="frame")
- {
- Attribute=Frame->Attribute("file");
- if (Attribute)
- Sequence->AddFileName(Ztring().From_UTF8(Attribute));
- }
-
- Frame=Frame->NextSiblingElement();
- }
- }
-
- Sequence->StreamID=ReferenceFiles->Sequences_Size()+1;
- ReferenceFiles->AddSequence(Sequence);
- }
-
- Track=Track->NextSiblingElement();
- }
- }
- else
- {
- Reject("DXW");
- return false;
- }
- }
-
- Element_Offset=File_Size;
-
- //All should be OK...
- return true;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_DXW_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dxw.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dxw.h
deleted file mode 100644
index ac6fdee07..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Dxw.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DXW files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DxwH
-#define MediaInfo_File_DxwH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_Dxw
-//***************************************************************************
-
-class File_Dxw : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Dxw();
- ~File_Dxw();
-
-private :
- //Streams management
- void Streams_Finish ();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Temp
- File__ReferenceFilesHelper* ReferenceFiles;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Flv.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Flv.cpp
deleted file mode 100644
index b43a764ed..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Flv.cpp
+++ /dev/null
@@ -1,1710 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-//
-// Examples:
-// http://samples.mplayerhq.hu/FLV/
-//
-// Reverse engineering
-// http://osflash.org/documentation/amf/astypes
-//
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_FLV_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Flv.h"
-#if defined(MEDIAINFO_AVC_YES)
- #include "MediaInfo/Video/File_Avc.h"
-#endif
-#if defined(MEDIAINFO_HEVC_YES)
- #include "MediaInfo/Video/File_Hevc.h"
-#endif
-#if defined(MEDIAINFO_AAC_YES)
- #include "MediaInfo/Audio/File_Aac.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if defined(MEDIAINFO_RM_YES)
- #include "MediaInfo/Multiple/File_Rm.h"
-#endif
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-#include <algorithm>
-#if MEDIAINFO_DEMUX
- #include "base64.h"
-#endif //MEDIAINFO_DEMUX
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-const int16u Flv_Channels[]=
-{
- 1,
- 2,
-};
-
-const int16u Flv_Resolution[]=
-{
- 8,
- 16,
-};
-
-const int16u Flv_SamplingRate[]=
-{
- 5500,
- 11025,
- 22050,
- 44100,
- 8000, //Special case for Nellymoser 8kHz mono
-};
-
-const char* Flv_Format_Audio[16]=
-{
- "PCM",
- "ADPCM",
- "MPEG Audio",
- "PCM",
- "Nellymoser", //16 KHz
- "Nellymoser", //8 KHz
- "Nellymoser",
- "ADPCM",
- "ADPCM",
- "",
- "AAC",
- "Speex",
- "",
- "",
- "MPEG Audio", //8 KHz
- "",
-};
-
-const char* Flv_Format_Profile_Audio[16]=
-{
- "",
- "",
- "Layer 3",
- "",
- "",
- "",
- "",
- "A-law",
- "U-law",
- "",
- "",
- "",
- "",
- "",
- "Layer 3", //8 KHz
- "",
-};
-
-const char* Flv_Codec_Audio[16]=
-{
- "Uncompressed",
- "ADPCM",
- "MPEG-1 Audio Layer 3",
- "",
- "Nellymoser 16kHz mono",
- "Nellymoser 8kHz mono",
- "Nellymoser",
- "ADPCM",
- "ADPCM",
- "",
- "AAC",
- "Speex",
- "",
- "",
- "MPEG Audio Layer 3",
- "",
-};
-
-const char* Flv_CodecID_Hint_Audio[16]=
-{
- "",
- "",
- "MP3",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "MP3", //8 KHz
- "",
-};
-
-const char* Flv_Format_Video[16]=
-{
- "",
- "",
- "Sorenson Spark",
- "Screen video",
- "VP6",
- "VP6",
- "Screen video 2",
- "AVC",
- "",
- "",
- "",
- "",
- "HEVC",
- "",
- "",
- "",
-};
-
-const char* Flv_Format_Profile_Video[16]=
-{
- "",
- "",
- "",
- "",
- "",
- "Alpha channel",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-const char* Flv_Codec_Video[16]=
-{
- "",
- "",
- "Sorenson H263",
- "Screen video",
- "On2 VP6",
- "On2 VP6 with alpha channel",
- "Screen video 2",
- "AVC",
- "",
- "",
- "",
- "",
- "HEVC",
- "",
- "",
- "",
-};
-
-const char* Flv_CodecID_Hint_Video[16]=
-{
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-const char* Flv_H263_PictureSize[]=
-{
- "custom, 1 byte",
- "custom, 2 bytes",
- "CIF (352x288)",
- "QCIF (176x144)",
- "SQCIF (128x96)",
- "320x240",
- "160x120",
- "",
-};
-
-const int16u Flv_H263_WidthHeight[8][2]=
-{
- { 0, 0},
- { 0, 0},
- {352, 288},
- {176, 144},
- {128, 96},
- {320, 240},
- {160, 120},
- {0, 0},
-};
-
-const char* Flv_H263_PictureType[]=
-{
- "IntraFrame",
- "InterFrame",
- "InterFrame (Disposable)",
- "",
-};
-const char* Flv_VP6_FrameMode[]=
-{
- "IntraFrame",
- "",
-};
-
-const char* Flv_VP6_Marker[]=
-{
- "VP6.1/6.2",
- "VP6.0",
-};
-
-const char* Flv_VP6_Version[]=
-{
- "",
- "",
- "",
- "",
- "",
- "",
- "VP6.0/6.1",
- "VP6.0 (Electronic Arts)",
- "VP6.2",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-const char* Flv_VP6_Version2[]=
-{
- "VP6.0",
- "",
- "",
- "VP6.1/6.2",
-};
-
-const char* Flv_FrameType[]=
-{
- "",
- "KeyFrame",
- "InterFrame",
- "InterFrame (Disposable)",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-const char* Flv_TagType[]=
-{
- "DOUBLE",
- "UI8",
- "SCRIPTDATASTRING",
- "SCRIPTDATAOBJECT[n]",
- "SCRIPTDATASTRING defining the MovieClip path",
- "Null",
- "Undefined",
- "UI16",
- "SCRIPTDATAVARIABLE[ECMAArrayLength]",
- "EndOfObject",
- "SCRIPTDATAVARIABLE[n]",
- "SCRIPTDATADATE",
- "SCRIPTDATALONGSTRING",
- "Unsupported",
- "Recordset",
- "XML",
- "TypedObject",
- "AMF3 data",
-};
-
-const char* Flv_Amf3Type[]=
-{
- "Undefined",
- "Null",
- "Boolean-false",
- "Boolean-true",
- "Integer",
- "Number",
- "String",
- "XML",
- "Data",
- "Array",
- "Object",
- "XML String",
- "ByteArray",
-};
-
-const char* Flv_AVCPacketType(int8u Value)
-{
- switch (Value)
- {
- case 0 : return "AVC sequence header";
- case 1 : return "NALU";
- case 2 : return "end of sequence";
- default: return "";
- }
-}
-
-const char* Flv_AACPacketType(int8u Value)
-{
- switch (Value)
- {
- case 0 : return "AAC sequence header";
- case 1 : return "AAC Raw";
- default: return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Flv::File_Flv()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("FLV");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Flv;
- StreamIDs_Width[0]=2;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- #endif //MEDIAINFO_DEMUX
-
- //Internal
- Stream.resize(3); //Null, Video, Audio
-
- //Temp
- Searching_Duration=false;
- MetaData_NotTrustable=false;
- PreviousTagSize=(int32u)-1;
- meta_filesize=(int64u)-1;
- meta_duration=0;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Flv::Streams_Fill()
-{
- //Coherency
- if (Count_Get(Stream_Video) && Count_Get(Stream_Audio) && !Retrieve(Stream_Video, 0, Video_BitRate).empty() && Retrieve(Stream_Audio, 0, Audio_BitRate).empty())
- {
- Fill(Stream_General, 0, General_OverallBitRate, Retrieve(Stream_Video, 0, Video_BitRate));
- Clear(Stream_Video, 0, Video_BitRate);
- }
-
- //Trying to detect VFR
- std::vector<int64u> video_stream_FrameRate_Between;
- for (size_t Pos=1; Pos<video_stream_FrameRate.size(); Pos++)
- video_stream_FrameRate_Between.push_back(video_stream_FrameRate[Pos]-video_stream_FrameRate[Pos-1]);
- std::sort(video_stream_FrameRate_Between.begin(), video_stream_FrameRate_Between.end());
- if (!video_stream_FrameRate_Between.empty())
- {
- if (video_stream_FrameRate_Between[0]*0.9<video_stream_FrameRate_Between[video_stream_FrameRate_Between.size()-1]
- && video_stream_FrameRate_Between[0]*1.1>video_stream_FrameRate_Between[video_stream_FrameRate_Between.size()-1])
- {
- float Time;
- if (video_stream_FrameRate.size()>30)
- Time=((float)(video_stream_FrameRate[30]-video_stream_FrameRate[0]))/30; //30 frames for handling 30 fps rounding problems
- else
- Time=((float)(video_stream_FrameRate[video_stream_FrameRate.size()-1]-video_stream_FrameRate[0]))/(video_stream_FrameRate.size()-1); //30 frames for handling 30 fps rounding problems
- if (Time)
- {
- Fill(Stream_Video, 0, Video_FrameRate, 1000/Time);
- Fill(Stream_Video, 0, Video_FrameRate_Mode, "CFR");
- }
- }
- else
- Fill(Stream_Video, 0, Video_FrameRate_Mode, "VFR");
- }
-
- //Parsers
- if (Stream[Stream_Video].Parser!=NULL)
- {
- Fill(Stream[Stream_Video].Parser);
- Merge(*Stream[Stream_Video].Parser, Stream_Video, 0, 0);
- }
- if (Stream[Stream_Audio].Parser!=NULL)
- {
- Fill(Stream[Stream_Audio].Parser);
- Merge(*Stream[Stream_Audio].Parser, Stream_Audio, 0, 0);
-
- //Special case: AAC
- if (Retrieve(Stream_Audio, 0, Audio_Format)==__T("AAC")
- || Retrieve(Stream_Audio, 0, Audio_Format)==__T("MPEG Audio")
- || Retrieve(Stream_Audio, 0, Audio_Format)==__T("Vorbis"))
- Clear(Stream_Audio, 0, Audio_BitDepth); //Resolution is not valid for AAC / MPEG Audio / Vorbis
- }
-
- //Delay
- if (Stream[Stream_Video].Delay!=(int32u)-1)
- {
- Fill(Stream_Video, 0, Video_Delay, Stream[Stream_Video].Delay+Retrieve(Stream_Video, 0, Video_Delay).To_int32u(), 10, true);
- Fill(Stream_Video, 0, Video_Delay_Source, "Container");
- }
- if (Stream[Stream_Audio].Delay!=(int32u)-1)
- {
- Fill(Stream_Audio, 0, Audio_Delay, Stream[Stream_Audio].Delay+Retrieve(Stream_Audio, 0, Audio_Delay).To_int32u(), 10, true);
- Fill(Stream_Audio, 0, Audio_Delay_Source, "Container");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::Streams_Finish()
-{
- //Duration
- //if (meta_duration)
- // Fill(Stream_General, 0, General_Duration, meta_duration, 10, true);
- Streams_Finish_PerStream(Stream_Video);
- Streams_Finish_PerStream(Stream_Audio);
-
- /*
- float64 FrameRate=Retrieve(Stream_Video, 0, Video_FrameRate).To_float64();
- if (LastFrame_Time!=(int32u)-1 && FirstFrame_Time!=(int32u)-1)
- Duration_Final=LastFrame_Time-FirstFrame_Time+((LastFrame_Type==9 && FrameRate)?((int64u)(1000/FrameRate)):0);
- if (Duration_Final)
- {
- if (Count_Get(Stream_Video))
- Fill(Stream_Video, 0, Video_Duration, Duration_Final, 10, true);
- if (Count_Get(Stream_Audio))
- Fill(Stream_Audio, 0, Audio_Duration, Duration_Final, 10, true);
-
- //Integrity
- if (Count_Get(Stream_Video) && File_Size!=(int64u)-1 && !Retrieve(Stream_Video, 0, Video_BitRate).empty() && !Retrieve(Stream_Video, 0, Video_Duration).empty())
- {
- int64u BitRate_Video_Meta=Retrieve(Stream_Video, 0, Video_BitRate).To_int64u();
- int64u Duration=Retrieve(Stream_Video, 0, Video_Duration).To_int64u();
- int64u BitRate_Video_Duration=File_Size*8*1000/Duration;
- if (Count_Get(Stream_Audio) && !Retrieve(Stream_Audio, 0, Audio_BitRate).empty())
- {
- int64u BitRate_Audio=Retrieve(Stream_Audio, 0, Audio_BitRate).To_int64u();
- if (BitRate_Audio<BitRate_Video_Duration)
- BitRate_Video_Duration-=BitRate_Audio;
- else if (BitRate_Audio)
- BitRate_Video_Duration=0; //There is a problem
- }
- if (BitRate_Video_Meta<BitRate_Video_Duration/2 || BitRate_Video_Meta>BitRate_Video_Duration*2)
- Clear(Stream_Video, 0, Video_BitRate);
- }
- }
- */
-
- if (Stream[Stream_Video].Parser!=NULL)
- {
- Finish(Stream[Stream_Video].Parser);
- Merge(*Stream[Stream_Video].Parser, Stream_Video, 0, 0);
- }
- if (Stream[Stream_Audio].Parser!=NULL)
- {
- Finish(Stream[Stream_Audio].Parser);
- Merge(*Stream[Stream_Audio].Parser, Stream_Audio, 0, 0);
- }
-
- if (Retrieve(Stream_General, 0, General_Duration).empty() && Retrieve(Stream_Video, 0, Video_Duration).empty() && meta_duration)
- Fill(Stream_General, 0, General_Duration, meta_duration, 0, true);
-
- //Purge what is not needed anymore
- if (!File_Name.empty()) //Only if this is not a buffer, with buffer we can have more data
- Stream.clear();
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::Streams_Finish_PerStream(stream_t StreamKind)
-{
- if (Stream[StreamKind].TimeStamp!=(int32u)-1)
- {
- //Calculating the last timestamp (last block included)
- if (!Stream[StreamKind].Durations.empty())
- {
- int64u Durations_Total=0;
- for (size_t Pos=0; Pos<Stream[StreamKind].Durations.size(); Pos++)
- Durations_Total+=Stream[StreamKind].Durations[Pos];
- int32u Duration_Average=float32_int32s(((float32)Durations_Total)/Stream[StreamKind].Durations.size());
- Stream[StreamKind].TimeStamp+=Duration_Average;
- }
-
- Fill(StreamKind, 0, "Duration", Stream[StreamKind].TimeStamp, 10, true);
- }
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Flv::FileHeader_Begin()
-{
- //Synchro
- if (3>Buffer_Size)
- return false;
- if (Buffer[0]!=0x46 //"FLV"
- || Buffer[1]!=0x4C
- || Buffer[2]!=0x56)
- {
- Reject();
- return false;
- }
- if (9>Buffer_Size)
- return false;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::FileHeader_Parse()
-{
- //Parsing
- Element_Begin1("FLV header");
- int32u Size;
- int8u Version, Flags;
- Skip_String(3, "Signature");
- Get_B1 (Version, "Version");
- Get_B1 (Flags, "Flags");
- Get_Flags (Flags, 0, video_stream_Count, "Video");
- Get_Flags (Flags, 2, audio_stream_Count, "Audio");
- Get_B4 (Size, "Size");
- if (Size>9)
- Skip_XX(Size-9, "Unknown");
- Element_End0();
-
- FILLING_BEGIN();
- //Integrity
- if (Version==0 || Size<9)
- {
- Reject();
- return;
- }
-
- //Filling
- Accept();
-
- Fill(Stream_General, 0, General_Format, "Flash Video");
- if (!video_stream_Count && !audio_stream_Count)
- {
- //TODO: quick and awful hack for a file having both bools unset, should detect directly the streams
- video_stream_Count=true;
- audio_stream_Count=true;
- }
- if (video_stream_Count)
- {
- Stream_Prepare(Stream_Video);
- #if MEDIAINFO_DEMUX
- if (Config->Demux_ForceIds_Get())
- Fill(Stream_Video, 0, Video_ID, 9);
- #endif //MEDIAINFO_DEMUX
- video_stream_FrameRate_Detected=false;
- }
- else
- video_stream_FrameRate_Detected=true;
- if (audio_stream_Count)
- {
- Stream_Prepare(Stream_Audio);
- #if MEDIAINFO_DEMUX
- if (Config->Demux_ForceIds_Get())
- Fill(Stream_Audio, 0, Audio_ID, 8);
- #endif //MEDIAINFO_DEMUX
- }
-
- if (Version>1)
- {
- Finish();
- return; //Version more than 1 is not supported
- }
- FILLING_ELSE()
- Reject();
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Flv::Synchronize()
-{
- if (File_Offset+Buffer_Offset+4==File_Size)
- return true; // Used by seek from end
-
- //Synchronizing
- while (Buffer_Offset+15<=Buffer_Size)
- {
- int32u BodyLength=BigEndian2int24u(Buffer+Buffer_Offset+5);
- if ((Buffer[Buffer_Offset ]
- || Buffer[Buffer_Offset+1]
- || Buffer[Buffer_Offset+2]
- || Buffer[Buffer_Offset+3]>=11)
- && File_Offset+Buffer_Offset+15+BodyLength==File_Size)
- break; //Last block
- if (File_Offset+Buffer_Offset+15+BodyLength<File_Size)
- {
- if (Buffer_Offset+15+BodyLength+15>Buffer_Size)
- return false; //Need more data
-
- if ((Buffer[Buffer_Offset ]
- || Buffer[Buffer_Offset+1]
- || Buffer[Buffer_Offset+2]
- || Buffer[Buffer_Offset+3]>=11)
- && (BigEndian2int32u(Buffer+Buffer_Offset+15+BodyLength)==11+BodyLength // PreviousTagSize
- || BigEndian2int32u(Buffer+Buffer_Offset+15+BodyLength)==BodyLength)) // PreviousTagSize without 11, found in some buggy files
- {
- PreviousTagSize_Add11=(BigEndian2int32u(Buffer+Buffer_Offset+15+BodyLength)==BodyLength)?0:11;
- break;
- }
- }
-
- Buffer_Offset++;
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+15>Buffer_Size)
- return false;
-
- //Synched
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Flv::Synched_Test()
-{
- if (File_Offset+Buffer_Offset+4==File_Size)
- return true; // Used by seek from end
-
- //Must have enough buffer for having header
- if (Buffer_Offset+15>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset ]==0
- && Buffer[Buffer_Offset+1]==0
- && Buffer[Buffer_Offset+2]==0
- && Buffer[Buffer_Offset+3]<PreviousTagSize_Add11
- && File_Offset+Buffer_Offset>9)
- {
- Synched=false;
- return true;
- }
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Flv::Read_Buffer_Unsynched()
-{
- if (!Searching_Duration) //If Searching_Duration, we are looking for end in inverse order, no timestamp reset
- {
- Stream[Stream_Video].TimeStamp=(int32u)-1;
- if (Stream[Stream_Video].Parser)
- Stream[Stream_Video].Parser->Open_Buffer_Unsynch();
- Stream[Stream_Audio].TimeStamp=(int32u)-1;
- if (Stream[Stream_Audio].Parser)
- Stream[Stream_Audio].Parser->Open_Buffer_Unsynch();
- }
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Flv::Header_Parse()
-{
- if (Searching_Duration && File_Offset+Buffer_Offset==File_Size-4)
- {
- Get_B4 (PreviousTagSize, "PreviousTagSize");
-
- //Filling
- Header_Fill_Code((int64u)-1, "End Of File");
- Header_Fill_Size(4);
- return;
- }
-
- //Parsing
- int32u BodyLength;
- int8u Type;
- Get_B4 (PreviousTagSize, "PreviousTagSize");
- if (File_Offset+Buffer_Offset+4<File_Size)
- {
- int32u Timestamp_Base;
- int8u Timestamp_Extended;
- Get_B1 (Type, "Type"); //Param_Info1(Type<19?Flv_Type[Type]:__T("Unknown"));
- Get_B3 (BodyLength, "BodyLength");
- Get_B3 (Timestamp_Base, "Timestamp_Base"); //in ms
- Get_B1 (Timestamp_Extended, "Timestamp_Extended"); //TimeStamp = Timestamp_Extended*0x01000000+Timestamp_Base
- Skip_B3( "StreamID");
-
- // For audio, check if it's just an audio config.
- bool Skip_Timestamps=false;
- if (Type==0x08)
- {
- int16u Format_Info;
- Peek_B2(Format_Info);
- int8u Format=(Format_Info>>12)&0x0F;
- if (Format==10 && (Format_Info&0xFF)==0) // AAC sequence header
- Skip_Timestamps=true;
- }
-
- //Filling
- if ((Type==0x08 && !Skip_Timestamps) || Type==0x09)
- {
- Time=(((int32u)Timestamp_Extended)<<24)|Timestamp_Base;
- stream_t StreamKind=(Type==0x08)?Stream_Audio:Stream_Video;
- if (Stream[StreamKind].Delay==(int32u)-1)
- Stream[StreamKind].Delay=Time;
- else if (Stream[StreamKind].TimeStamp!=(int32u)-1 && Time>Stream[StreamKind].TimeStamp)
- Stream[StreamKind].Durations.push_back(Time-Stream[StreamKind].TimeStamp);
- if (!Searching_Duration || Stream[StreamKind].TimeStamp==(int32u)-1)
- Stream[StreamKind].TimeStamp=Time;
- }
-
- if (Type==0)
- Trusted_IsNot("Wrong type");
- }
- else
- {
- Type=0;
- BodyLength=0;
- }
-
- //Filling
- Header_Fill_Code(Type, Ztring().From_Number(Type, 16));
- Header_Fill_Size(Element_Offset+BodyLength);
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::Data_Parse()
-{
- switch (Element_Code)
- {
- case 0x00 : Element_Name("End Of File"); break;
- case 0x08 : audio(); break;
- case 0x09 : video(); break;
- case 0x12 : meta(); break;
- case 0xFA : Rm(); break;
- case (int64u)-1 : //When searching the last frame
- if (8+PreviousTagSize>File_Size)
- {
- Searching_Duration=false;
- Open_Buffer_Unsynch(); //There is a problem, trying to sync
- PreviousTagSize=65536;
- }
- GoTo(File_Size-PreviousTagSize-8, "FLV");
- return;
- default : if (Searching_Duration)
- {
- Finish(); //This is surely a bad en of file, don't try anymore
- return;
- }
-
- }
-
- if (Searching_Duration)
- {
- if ((((Count_Get(Stream_Video)==0 || Stream[Stream_Video].TimeStamp!=(int32u)-1)
- && (Count_Get(Stream_Audio)==0 || Stream[Stream_Audio].TimeStamp!=(int32u)-1))
- || (File_Size>65536*2 && File_Offset+Buffer_Offset-Header_Size-PreviousTagSize-4<File_Size-65536))
- && Config->ParseSpeed<1)
- Finish();
- else if (Element_Code==0xFA) //RM metadata have a malformed PreviousTagSize, always
- {
- //Trying to sync
- Searching_Duration=false;
- Open_Buffer_Unsynch(); //There is a problem, trying to sync
- GoToFromEnd(Header_Size+Element_Size+65536);
- return;
- }
- else
- GoTo(File_Offset+Buffer_Offset-Header_Size-PreviousTagSize-4);
- }
- else if (!video_stream_Count && !audio_stream_Count && video_stream_FrameRate_Detected && File_Offset+65536*2<File_Size && MediaInfoLib::Config.ParseSpeed_Get()<1) //All streams are parsed
- {
- Fill();
-
- //Trying to find the last frame for duration
- Read_Buffer_Unsynched(); //This is not synched yet, so we call directly this method instead of Open_Buffer_Unsynched
- GoToFromEnd(4, "FLV");
- Searching_Duration=true;
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Flv::video()
-{
- Element_Name("Video");
- Stream[Stream_Video].PacketCount++;
- Element_Info1(Stream[Stream_Video].PacketCount);
-
- //Handling FrameRate
- if (!video_stream_FrameRate_Detected)
- {
- if (video_stream_FrameRate.empty() || Time!=video_stream_FrameRate[video_stream_FrameRate.size()-1]) //if 2 block witht the same timestamp
- video_stream_FrameRate.push_back(Time);
- if (video_stream_FrameRate.size()>30)
- video_stream_FrameRate_Detected=true;
- }
-
- if (Element_Size==0) //Header says that video is present, but there is only one null packet
- {
- Element_Info1("Null");
- return;
- }
-
- //Needed?
- if (!video_stream_Count && Config->ParseSpeed<1)
- return; //No more need of Video stream
-
- //Parsing
- int8u Codec, FrameType;
- Element_Begin1("Stream header");
- BS_Begin();
- Get_S1 (4, FrameType, "frameType"); Param_Info1(Flv_FrameType[FrameType]);
- Get_S1 (4, Codec, "codecID"); Param_Info1(Flv_Codec_Video[Codec]); Element_Info1(Flv_Codec_Video[Codec]);
- BS_End();
- Element_End0();
-
- FILLING_BEGIN();
- //Filling
- if (Retrieve(Stream_Video, 0, Video_Format).empty())
- {
- if (Count_Get(Stream_Video)==0)
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, Flv_Format_Video[Codec]);
- Fill(Stream_Video, 0, Video_Format_Profile, Flv_Format_Profile_Video[Codec]);
- Fill(Stream_Video, 0, Video_Codec, Flv_Codec_Video[Codec]);
- Fill(Stream_Video, 0, Video_CodecID, Codec);
- Fill(Stream_Video, 0, Video_CodecID_Hint, Flv_CodecID_Hint_Video[Codec]);
- Fill(Stream_Video, 0, Video_BitDepth, 8); //FLV is not known to support another bit depth
-
- MustSynchronize=true; // Now, synchronization test is possible
- }
-
- //Parsing video data
- switch (Codec)
- {
- case 2 : video_H263(); break;
- case 3 : video_ScreenVideo(1); break;
- case 4 : video_VP6(false); break;
- case 5 : video_VP6(true); break;
- case 6 : video_ScreenVideo(2); break;
- case 7 : video_AVC(); break;
- case 12 : video_HEVC(); break;
- default : Skip_XX(Element_Size-Element_Offset, "Unknown");
- video_stream_Count=false; //No more need of Video stream;
- }
- FILLING_END();
-
- #if MEDIAINFO_DEMUX
- int8u Demux_Level_old=Demux_Level;
- if (Stream[Stream_Video].Parser && Stream[Stream_Video].Parser->Demux_Level==2)
- Demux_Level=4;
- Demux(Buffer+Buffer_Offset+1, (size_t)(Element_Size-1), ContentType_MainStream);
- Demux_Level=Demux_Level_old;
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::video_H263()
-{
- //Parsing
- int16u Width=0, Height=0;
- int8u Version, PictureSize, PictureType;
- bool ExtraInformationFlag;
- BS_Begin();
- Skip_S3(17, "PictureStartCode");
- Get_S1 ( 5, Version, "Version");
- if (Version>1)
- return;
- Skip_S1( 8, "TemporalReference");
- Get_S1 ( 3, PictureSize, "PictureSize"); Param_Info1(Flv_H263_PictureSize[PictureSize]);
- switch (PictureSize)
- {
- case 0 :
- Get_S2 ( 8, Width, "Width");
- Get_S2 ( 8, Height, "Height");
- break;
- case 1 :
- Get_S2 (16, Width, "Width");
- Get_S2 (16, Height, "Height");
- break;
- default :
- if (PictureSize<8)
- {
- Width=Flv_H263_WidthHeight[PictureSize][0];
- Height=Flv_H263_WidthHeight[PictureSize][1];
- }
- }
- Get_S1 ( 2, PictureType, "PictureSize"); Param_Info1(Flv_H263_PictureType[PictureType]);
- Skip_SB( "DeblockingFlag");
- Skip_S1( 5, "Quantizer");
- Get_SB ( ExtraInformationFlag, "ExtraInformationFlag");
- while (ExtraInformationFlag)
- {
- Skip_S1( 8, "ExtraInformation");
- Get_SB ( ExtraInformationFlag, "ExtraInformationFlag");
- }
- BS_End();
-
- FILLING_BEGIN();
- Fill(Stream_Video, 0, Video_Width, Width, 10, true);
- Fill(Stream_Video, 0, Video_Height, Height, 10, true);
- video_stream_Count=false; //No more need of Video stream
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::video_ScreenVideo(int8u Version)
-{
- //Parsing
- int16u Width, Height;
- BS_Begin();
- Info_S1( 4, BlockWidth, "BlockWidth"); Param_Info1((BlockWidth+1)*16);
- Get_S2 (12, Width, "ImageWidth");
- Info_S1( 4, BlockHeight, "BlockHeight"); Param_Info1((BlockHeight+1)*16);
- Get_S2 (12, Height, "ImageHeight");
- if (Version==2)
- {
- Skip_S1(6, "Reserved");
- Skip_SB( "has IFrameImage");
- Skip_SB( "has PaletteInfo");
- }
- BS_End();
-
- FILLING_BEGIN();
- Fill(Stream_Video, 0, Video_Width, Width, 10, true);
- Fill(Stream_Video, 0, Video_Height, Height, 10, true);
- video_stream_Count=false; //No more need of Video stream
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// From: http://wiki.multimedia.cx/index.php?title=On2_VP6
-//
-void File_Flv::video_VP6(bool WithAlpha)
-{
- //Parsing
- int8u HorizontalAdjustment, VerticalAdjustment;
- bool FrameMode, Marker;
- BS_Begin();
- Get_S1 ( 4, HorizontalAdjustment, "HorizontalAdjustment");
- Get_S1 ( 4, VerticalAdjustment, "VerticalAdjustment");
- if (WithAlpha)
- Skip_S3(24, "OffsetToAlpha");
- Get_SB ( FrameMode, "FrameMode"); Param_Info1(Flv_VP6_FrameMode[FrameMode]);
- Skip_S1( 6, "Quantization");
- Get_SB ( Marker, "Marker"); Param_Info1(Flv_VP6_Marker[Marker]);
- BS_End();
- if (FrameMode)
- {
- if (Marker==1)
- Skip_B2( "Offset");
- }
- else
- {
- int8u Version, Version2, Width, Height;
- BS_Begin();
- Get_S1 ( 5, Version, "Version");
- Get_S1 ( 2, Version2, "Version2");
- Skip_SB( "Interlace");
- BS_End();
- if (Marker || Version2==0)
- Skip_B2( "Offset");
- Skip_B1( "MacroBlock_Height");
- Skip_B1( "MacroBlock_Width");
- Get_B1 (Height, "Height"); Param_Info1(Ztring::ToZtring(Height*16)+__T(" pixels"));
- Get_B1 (Width, "Width"); Param_Info1(Ztring::ToZtring(Width*16)+__T(" pixels"));
-
- FILLING_BEGIN();
- if (Width && Height)
- {
- Fill(Stream_Video, 0, Video_Width, Width*16-HorizontalAdjustment, 10, true);
- Fill(Stream_Video, 0, Video_Height, Height*16-VerticalAdjustment, 10, true);
- }
- video_stream_Count=false; //No more need of Video stream
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::video_AVC()
-{
- int8u AVCPacketType;
- Get_B1 (AVCPacketType, "AVCPacketType"); Param_Info1(Flv_AVCPacketType(AVCPacketType));
- Info_B3(CompositionTime, "CompositionTime"); Param_Info1(Ztring::ToZtring((int32s)(CompositionTime+0xFF000000)));
-
- switch (AVCPacketType)
- {
- case 0 :
- #ifdef MEDIAINFO_AVC_YES
- if (Stream[Stream_Video].Parser==NULL)
- {
- Stream[Stream_Video].Parser=new File_Avc;
- Open_Buffer_Init(Stream[Stream_Video].Parser);
- ((File_Avc*)Stream[Stream_Video].Parser)->MustParse_SPS_PPS=true;
- ((File_Avc*)Stream[Stream_Video].Parser)->SizedBlocks=true;
- ((File_Avc*)Stream[Stream_Video].Parser)->MustSynchronize=false;
- }
-
- //Parsing
- Open_Buffer_Continue(Stream[Stream_Video].Parser);
- #else
- Skip_XX(Element_Size-Element_Offset, "AVC Data");
- video_stream_Count=false; //Unable to parse it
- #endif
- break;
- case 1 :
- #ifdef MEDIAINFO_AVC_YES
- if (Stream[Stream_Video].Parser==NULL)
- {
- //Data before header, this is wrong
- video_stream_Count=false;
- break;
- }
-
- //Parsing
- Open_Buffer_Continue(Stream[Stream_Video].Parser);
-
- //Disabling this stream
- if (Stream[Stream_Video].Parser->File_GoTo!=(int64u)-1 || Stream[Stream_Video].Parser->Count_Get(Stream_Video)>0 || (Config->ParseSpeed<1.0 && Stream[Stream_Video].PacketCount>=300))
- {
- Stream[Stream_Video].Parser->Open_Buffer_Unsynch();
- video_stream_Count=false;
- }
- #else
- Skip_XX(Element_Size-Element_Offset, "AVC Data");
- video_stream_Count=false; //Unable to parse it
- #endif
- break;
- default: Skip_XX(Element_Size-Element_Offset, "Unknown");
- video_stream_Count=false; //Unable to parse it
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::video_HEVC()
-{
- int8u AVCPacketType;
- Get_B1 (AVCPacketType, "AVCPacketType"); Param_Info1(Flv_AVCPacketType(AVCPacketType));
- Info_B3(CompositionTime, "CompositionTime"); Param_Info1(Ztring::ToZtring((int32s)(CompositionTime+0xFF000000)));
-
- switch (AVCPacketType)
- {
- case 0 :
- #ifdef MEDIAINFO_HEVC_YES
- if (Stream[Stream_Video].Parser==NULL)
- {
- Stream[Stream_Video].Parser=new File_Hevc;
- Open_Buffer_Init(Stream[Stream_Video].Parser);
- ((File_Hevc*)Stream[Stream_Video].Parser)->MustParse_VPS_SPS_PPS=true;
- ((File_Hevc*)Stream[Stream_Video].Parser)->MustParse_VPS_SPS_PPS_FromFlv=true;
- ((File_Hevc*)Stream[Stream_Video].Parser)->MustSynchronize=false;
- ((File_Hevc*)Stream[Stream_Video].Parser)->SizedBlocks=true;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Get())
- {
- Stream[Stream_Video].Parser->Demux_Level=2; //Container
- Stream[Stream_Video].Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- }
-
- //Parsing
- Open_Buffer_Continue(Stream[Stream_Video].Parser);
-
- //Demux
- #if MEDIAINFO_DEMUX
- switch (Config->Demux_InitData_Get())
- {
- case 0 : //In demux event
- Demux_Level=2; //Container
- Demux(Buffer+Buffer_Offset+2, (size_t)(Element_Size-2), ContentType_Header);
- break;
- case 1 : //In field
- {
- std::string Data_Raw((const char*)(Buffer+Buffer_Offset+2), (size_t)(Element_Size-2));
- std::string Data_Base64(Base64::encode(Data_Raw));
- Fill(Stream_Video, StreamPos_Last, "Demux_InitBytes", Data_Base64);
- (*Stream_More)[Stream_Video][StreamPos_Last](Ztring().From_Local("Demux_InitBytes"), Info_Options)=__T("N NT");
- }
- break;
- default : ;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- Skip_XX(Element_Size-Element_Offset, "HEVC Data");
- video_stream_Count=false; //Unable to parse it
- #endif
- break;
- case 1 :
- #ifdef MEDIAINFO_HEVC_YES
- if (Stream[Stream_Video].Parser==NULL)
- {
- //Data before header, this is wrong
- video_stream_Count=false;
- break;
- }
-
- //Parsing
- Open_Buffer_Continue(Stream[Stream_Video].Parser);
-
- //Disabling this stream
- if (Stream[Stream_Video].Parser->File_GoTo!=(int64u)-1 || Stream[Stream_Video].Parser->Count_Get(Stream_Video)>0 || (Config->ParseSpeed<1.0 && Stream[Stream_Video].PacketCount>=300))
- {
- Stream[Stream_Video].Parser->Open_Buffer_Unsynch();
- video_stream_Count=false;
- }
- #else
- Skip_XX(Element_Size-Element_Offset, "HEVC Data");
- video_stream_Count=false; //Unable to parse it
- #endif
- break;
- default: Skip_XX(Element_Size-Element_Offset, "Unknown");
- video_stream_Count=false; //Unable to parse it
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::audio()
-{
- Element_Name("Audio");
- Stream[Stream_Audio].PacketCount++;
- Element_Info1(Stream[Stream_Audio].PacketCount);
-
- if (Element_Size==0) //Header says that audio is present, but there is only one null packet
- {
- Element_Info1("Null");
- return;
- }
-
- //Needed?
- if (!audio_stream_Count && Config->ParseSpeed<1)
- return; //No more need of Audio stream
-
- //Parsing
- int8u codec, sampling_rate;
- bool is_16bit, is_stereo;
- Element_Begin1("Stream header");
- BS_Begin();
- Get_S1 (4, codec, "codec"); Param_Info1(Flv_Codec_Audio[codec]); Element_Info1(Flv_Codec_Audio[codec]);
- Get_S1 (2, sampling_rate, "sampling_rate"); Param_Info1(Ztring::ToZtring(Flv_SamplingRate[sampling_rate])+__T(" Hz"));
- Get_SB ( is_16bit, "is_16bit"); Param_Info1(Ztring::ToZtring(Flv_Resolution[is_16bit])+__T(" bits"));
- Get_SB ( is_stereo, "is_stereo"); Param_Info1(Ztring::ToZtring(Flv_Channels[is_stereo])+__T(" channel(s)"));
- BS_End();
- Element_End0();
-
- //Special case
- if (codec==5) //Nellymoser 8kHz mono
- {
- sampling_rate=5; //8000 Hz forced
- is_stereo=false; //Mono forced
- }
-
- if (codec!=10) // AAC has an header
- {
- Demux(Buffer+Buffer_Offset+(size_t)(Element_Offset+1), (size_t)(Element_Size-Element_Offset-1), ContentType_MainStream);
- }
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Audio, 0, Audio_Format).empty())
- {
- //Filling
- if (Count_Get(Stream_Audio)==0)
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Channel_s_, Flv_Channels[is_stereo], 10, true);
- if (codec!=2 && codec!=10 && codec!=14) //MPEG Audio and AAC are not fixed bit depth
- Fill(Stream_Audio, 0, Audio_BitDepth, Flv_Resolution[is_16bit], 10, true);
- if (sampling_rate<4)
- Fill(Stream_Audio, 0, Audio_SamplingRate, Flv_SamplingRate[sampling_rate], 10, true);
- Fill(Stream_Audio, 0, Audio_Format, Flv_Format_Audio[codec]);
- Fill(Stream_Audio, 0, Audio_Format_Profile, Flv_Format_Profile_Audio[codec]);
- Fill(Stream_Audio, 0, Audio_Codec, Flv_Codec_Audio[codec]);
- Fill(Stream_Audio, 0, Audio_CodecID, codec);
- Fill(Stream_Audio, 0, Audio_CodecID_Hint, Flv_CodecID_Hint_Audio[codec]);
- if (codec==1)
- {
- //ADPCM
- Fill(Stream_Audio, 0, Audio_Format_Settings, "ShockWave");
- Fill(Stream_Audio, 0, Audio_Format_Settings_Firm, "ShockWave");
- Fill(Stream_Audio, 0, Audio_Codec_Settings, "SWF");
- Fill(Stream_Audio, 0, Audio_Codec_Settings_Firm, "SWF");
-
- }
-
- MustSynchronize=true; // Now, synchronization test is possible
- }
-
- //Parsing audio data
- switch (codec)
- {
- case 2 :
- case 14 : audio_MPEG(); break;
- case 10 : audio_AAC(); break;
- default : Skip_XX(Element_Size-Element_Offset, "Unknown");
- audio_stream_Count=false; //No more need of Audio stream
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::audio_MPEG()
-{
- #if defined(MEDIAINFO_MPEGA_YES)
- if (Stream[Stream_Audio].Parser==NULL)
- {
- Stream[Stream_Audio].Parser=new File_Mpega;
- Open_Buffer_Init(Stream[Stream_Audio].Parser);
- ((File_Mpega*)Stream[Stream_Audio].Parser)->FrameIsAlwaysComplete=true;
- }
-
- //Parsing
- Open_Buffer_Continue(Stream[Stream_Audio].Parser);
-
- //Disabling this stream
- if (Stream[Stream_Audio].Parser->File_GoTo!=(int64u)-1 || Stream[Stream_Audio].Parser->Count_Get(Stream_Audio)>0)
- {
- Stream[Stream_Audio].Parser->Open_Buffer_Unsynch();
- audio_stream_Count=false;
- }
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::audio_AAC()
-{
- int8u AACPacketType;
- Get_B1 (AACPacketType, "AACPacketType"); Param_Info1(Flv_AACPacketType(AACPacketType));
-
- switch (AACPacketType)
- {
- case 0 :
- #if defined(MEDIAINFO_AAC_YES)
- if (Stream[Stream_Audio].Parser==NULL)
- {
- Stream[Stream_Audio].Parser=new File_Aac;
- ((File_Aac*)Stream[Stream_Audio].Parser)->Mode=File_Aac::Mode_AudioSpecificConfig;
- Open_Buffer_Init(Stream[Stream_Audio].Parser);
- }
-
- //Parsing
- Open_Buffer_Continue(Stream[Stream_Audio].Parser);
-
- //Demux
- #if MEDIAINFO_DEMUX
- switch (Config->Demux_InitData_Get())
- {
- case 0 : //In demux event
- Demux_Level=2; //Container
- Demux(Buffer+Buffer_Offset+2, (size_t)(Element_Size-2), ContentType_Header);
- break;
- case 1 : //In field
- {
- std::string Data_Raw((const char*)(Buffer+Buffer_Offset+2), (size_t)(Element_Size-2));
- std::string Data_Base64(Base64::encode(Data_Raw));
- Fill(Stream_Audio, StreamPos_Last, "Demux_InitBytes", Data_Base64);
- (*Stream_More)[Stream_Audio][StreamPos_Last](Ztring().From_Local("Demux_InitBytes"), Info_Options)=__T("N NT");
- }
- break;
- default : ;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- Skip_XX(Element_Size-Element_Offset, "AAC Data");
- audio_stream_Count=false; //Unable to parse it
- #endif
- break;
- case 1 :
- //Parsing
- Demux(Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset), ContentType_MainStream);
- Open_Buffer_Continue(Stream[Stream_Audio].Parser);
-
- Stream[Stream_Audio].Parser->Open_Buffer_Unsynch();
- audio_stream_Count=false; //No need of more
- break;
- default: Skip_XX(Element_Size-Element_Offset, "Unknown");
- audio_stream_Count=false; //Unable to parse it
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::meta()
-{
- Element_Name("Meta");
-
- //Parsing
- meta_Level=0;
- meta_SCRIPTDATAOBJECT();
-
- if (MetaData_NotTrustable)
- {
- meta_duration=0;
- Clear(Stream_Video, 0, Video_StreamSize);
- Clear(Stream_Video, 0, Video_BitRate);
- Clear(Stream_Video, 0, Video_Bits__Pixel_Frame_);
- Clear(Stream_Audio, 0, Audio_StreamSize);
- Clear(Stream_Audio, 0, Audio_BitRate);
- Clear(Stream_General, 0, General_Duration);
- Clear(Stream_General, 0, General_OverallBitRate);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::meta_SCRIPTDATAOBJECT()
-{
- //Parsing Value
- std::string StringData;
- meta_SCRIPTDATAVALUE(StringData);
- meta_SCRIPTDATAVALUE(StringData);
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::meta_SCRIPTDATAVARIABLE()
-{
- std::string StringData;
- int16u StringLength;
- Element_Begin0();
- Get_B2 (StringLength, "StringLength");
- Get_String(StringLength, StringData, "StringData");
- Element_Name(StringData.c_str());
-
- //Parsing Value
- meta_SCRIPTDATAVALUE(StringData);
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::meta_SCRIPTDATAVALUE(const std::string &StringData)
-{
- std::string StringDataModified(StringData);
- if (!StringDataModified.empty() && StringDataModified[0]==__T('_'))
- StringDataModified.erase(StringDataModified.begin());
-
- //Parsing
- int8u Type;
- Get_B1 (Type, "Type"); Param_Info1C((Type<0x12), Flv_TagType[Type]);
- switch (Type)
- {
- case 0x00 : //DOUBLE --> 64 bits Big endian float
- {
- float64 Value;
- Get_BF8(Value, "Value");
- if (Value==0)
- break;
- std::string ToFill;
- Ztring ValueS;
- stream_t StreamKind=Stream_General;
- if (StringDataModified=="width") {ToFill="Width"; StreamKind=Stream_Video; ValueS.From_Number(Value, 0); video_stream_Count=true;} //1 file with FrameRate tag and video stream but no video present tag
- else if (StringDataModified=="height") {ToFill="Height"; StreamKind=Stream_Video; ValueS.From_Number(Value, 0); video_stream_Count=true;} //1 file with FrameRate tag and video stream but no video present tag
- else if (StringDataModified=="duration") meta_duration=Value*1000;
- else if (StringDataModified=="audiodatarate") {ToFill="BitRate"; StreamKind=Stream_Audio; ValueS.From_Number(Value*1000, 0);}
- else if (StringDataModified=="framerate") {ToFill="FrameRate"; StreamKind=Stream_Video; ValueS.From_Number(Value, 3); video_stream_FrameRate_Detected=true; video_stream_Count=true;} //1 file with FrameRate tag and video stream but no video present tag
- else if (StringDataModified=="videoframerate") {ToFill="FrameRate"; StreamKind=Stream_Video; ValueS.From_Number(Value, 3); video_stream_FrameRate_Detected=true; video_stream_Count=true;} //1 file with FrameRate tag and video stream but no video present tag
- else if (StringDataModified=="filesize") {meta_filesize=(int64u)Value;}
- else if (StringDataModified=="audiosize") {ToFill="StreamSize"; StreamKind=Stream_Audio; ValueS.From_Number(Value, 0); if (Value>File_Size) MetaData_NotTrustable=true;}
- else if (StringDataModified=="videosize") {ToFill="StreamSize"; StreamKind=Stream_Video; ValueS.From_Number(Value, 0); if (Value>File_Size) MetaData_NotTrustable=true; video_stream_Count=true;} //1 file with FrameRate tag and video stream but no video present tag
- else if (StringDataModified=="videodatarate") {ToFill="BitRate"; StreamKind=Stream_Video; ValueS.From_Number(Value*1000, 0); video_stream_Count=true;} //1 file with FrameRate tag and video stream but no video present tag
- else if (StringDataModified=="videocodecid") {; video_stream_Count=true;} //1 file with FrameRate tag and video stream but no video present tag
- else if (StringDataModified=="audiodelay") {ToFill="Delay"; StreamKind=Stream_Audio; if (Value>0) ValueS.From_Number(Value*1000, 0);}
- else if (StringDataModified=="audiosamplerate") {ToFill="SamplingRate"; StreamKind=Stream_Audio; if (Value>0) ValueS.From_Number(Value, 0);}
- else if (StringDataModified=="audiosamplesize") {ToFill="BitDepth"; StreamKind=Stream_Audio; if (Value>0) ValueS.From_Number(Value, 0);}
- else if (StringDataModified=="totalduration") {ToFill="Duration"; StreamKind=Stream_General; ValueS.From_Number(Value*1000, 0);}
- else if (StringDataModified=="totaldatarate") {ToFill="OverallBitRate"; StreamKind=Stream_General; ValueS.From_Number(Value*1000, 0);}
- else if (StringDataModified=="totalframes") {ToFill="FrameCount"; StreamKind=Stream_Video; ValueS.From_Number(Value*1000, 0);}
- else if (StringDataModified=="bytelength") {if (File_Size!=Value) MetaData_NotTrustable=true;}
- else if (!(StringDataModified=="datasize"
- || StringDataModified=="lasttimestamp"
- || StringDataModified=="lastkeyframetimestamp"
- || StringDataModified=="lastkeyframelocation"
- || StringDataModified=="canSeekToEnd"
- || StringDataModified=="keyframes_times"
- || StringDataModified=="keyframes_filepositions"
- || StringDataModified=="aacaot"
- || StringDataModified=="audiochannels"
- || StringDataModified=="audiocodecid"
- || StringDataModified=="avclevel"
- || StringDataModified=="avcprofile"
- || StringDataModified=="moovPosition")) {StreamKind=Stream_General; ToFill=StringData; ValueS.From_Number(Value);}
- #if MEDIAINFO_TRACE
- if (ValueS.empty())
- ValueS.From_Number(Value, 0);
- Element_Info1(ValueS);
- #endif //MEDIAINFO_TRACE
- if (!ToFill.empty())
- {
- Fill(StreamKind, 0, ToFill.c_str(), ValueS, true);
- if (ToFill=="FrameRate")
- Fill(StreamKind, 0, "FrameRate_Mode", "CFR", Unlimited, true, true);
- }
- }
- break;
- case 0x01 : //UI8
- {
- int8u Value;
- Get_B1 (Value, "Value");
- std::string ToFill;
- if (StringDataModified=="haskeyframes") {}
- else if (StringDataModified=="hasKeyframes") {}
- else if (StringDataModified=="hasVideo") {}
- else if (StringDataModified=="stereo") {}
- else if (StringDataModified=="canSeekToEnd") {}
- else if (StringDataModified=="hasAudio") {}
- else if (StringDataModified=="hasmetadata") {}
- else if (StringDataModified=="hasMetadata") {}
- else if (StringDataModified=="hasCuePoints") {}
- else if (StringDataModified=="canseekontime") {}
- else {ToFill=StringData;}
- Element_Info1(Value);
- Fill(Stream_General, 0, ToFill.c_str(), Value?"Yes":"No", Unlimited, true, true);
- }
- break;
- case 0x02 : //SCRIPTDATASTRING
- {
- int16u Value_Size;
- Get_B2 (Value_Size, "Value_Size");
- if (Value_Size)
- {
- Ztring Value;
- Get_UTF8(Value_Size, Value, "Value");
- size_t ToFill=(size_t)-1;
- std::string ToFillS;
- if (StringDataModified=="creator") {ToFill=General_Encoded_Application;}
- else if (StringDataModified=="creationdate") {ToFill=General_Encoded_Date; Value.Date_From_String(Value.To_UTF8().c_str());}
- else if (StringDataModified=="encoder") {ToFill=General_Encoded_Application;}
- else if (StringDataModified=="Encoded_With") {ToFill=General_Encoded_Application;}
- else if (StringDataModified=="Encoded_By") {ToFill=General_Encoded_Application;}
- else if (StringDataModified=="metadatacreator") {ToFill=General_Tagged_Application;}
- else if (StringDataModified=="creation_time") {ToFill=General_Encoded_Date; Value.insert(0, __T("UTC "));}
- else if (StringDataModified=="sourcedata") {}
- else if (StringDataModified=="audiocodecid") {}
- else if (StringDataModified=="videocodecid") {}
- else if (!(StringDataModified=="major_brand"
- || StringDataModified=="minor_version"
- || StringDataModified=="compatible_brands"))
- ToFillS=StringData;
- if (Value.find(__T('\r'))!=std::string::npos)
- Value.resize(Value.find(__T('\r')));
- if (Value.find(__T('\n'))!=std::string::npos)
- Value.resize(Value.find(__T('\n')));
- Element_Info1(Value);
- if (ToFill!=(size_t)-1)
- Fill(Stream_General, 0, ToFill, Value, true);
- else if (!ToFillS.empty())
- Fill(Stream_General, 0, StringData.c_str(), Value, true);
- }
- }
- break;
- case 0x03 : //SCRIPTDATAOBJECT[n]
- case 0x10 : //Typed object - SCRIPTDATAOBJECT[n]
- {
- std::string StringData2;
- int16u StringLength2;
- meta_Level++;
- meta_LevelFinished[meta_Level]=false;
- while (!meta_LevelFinished[meta_Level])
- {
- if (Element_Offset>=Element_Size)
- break;
- Element_Begin0();
- Get_B2 (StringLength2, "StringLength2");
- Get_String(StringLength2, StringData2, "StringData2");
- Element_Name(StringData2.empty()?"EndOfObject":StringData2.c_str());
- meta_SCRIPTDATAVALUE(StringData+'_'+StringData2);
- Element_End0();
- }
- meta_Level--;
- }
- break;
- case 0x04 : //SCRIPTDATASTRING defining the MovieClip path
- {
- int16u Value_Size;
- Get_B2 (Value_Size, "Value_Size");
- if (Value_Size)
- {
- Ztring Value;
- Get_Local(Value_Size, Value, "Value");
- if (Value==__T("unknown")) Value.clear();
- Element_Info1C((!Value.empty()), Value);
- Fill(Stream_General, 0, StringData.c_str(), Value, true);
- }
- }
- break;
- case 0x05 : //NULL
- case 0x06 : //Undefined - NULL
- case 0x0D : //Unsupported - NULL
- break;
- case 0x07 : //UI16
- {
- int16u Value;
- Get_B2 (Value, "Value");
- Element_Info1(Value);
- Fill(Stream_General, 0, StringData.c_str(), Value, true);
- }
- break;
- case 0x08 : //SCRIPTDATAVARIABLE[ECMAArrayLength]
- {
- int32u ECMAArrayLength;
- Get_B4 (ECMAArrayLength, "ECMAArrayLength");
- Element_Info1(Ztring::ToZtring(ECMAArrayLength)+__T(" elements"));
- for (int32u Pos=0; Pos<ECMAArrayLength; Pos++)
- {
- meta_SCRIPTDATAVARIABLE();
- if (meta_LevelFinished[meta_Level])
- Pos=ECMAArrayLength; //Finished
- }
- }
- break;
- case 0x09 :
- Element_Info1("EndOfObject");
- meta_LevelFinished[meta_Level]=true;
- break;
- case 0x0A : //SCRIPTDATAVARIABLE[n]
- case 0x0E : //RecordSet - SCRIPTDATAVARIABLE[n]
- {
- int32u Count;
- Get_B4 (Count, "Count");
- for (int32u Pos=0; Pos<Count; Pos++)
- meta_SCRIPTDATAVALUE(StringData);
- }
- break;
- case 0x0B : //SCRIPTDATADATE
- {
- float64 Value;
- Get_BF8(Value, "Value");
- Ztring ValueS;
- ValueS.Date_From_Seconds_1970((int32u)(Value/1000));
- Param_Info1(ValueS);
- Skip_B2( "Local_Offset_Minutes");
- std::string ToFill;
- if (StringData=="metadatadate") {ToFill="Tagged_Date";}
- else {ToFill=StringData;}
- Element_Info1(ValueS);
- Fill(Stream_General, 0, ToFill.c_str(), ValueS, true);
- }
- break;
- case 0x0C : //SCRIPTDATALONGSTRING
- case 0x0F : //XML - SCRIPTDATALONGSTRING
- {
- int32u Value_Size;
- Get_B4 (Value_Size, "Value_Size");
- if (Value_Size)
- {
- Ztring Value;
- Get_UTF16B(Value_Size, Value, "Value");
- std::string ToFill;
- if (StringData=="creator") {ToFill="Encoded_Application";}
- else if (StringData=="liveXML") {}
- else if (StringData=="metadatacreator") {ToFill="Tagged_Application";}
- else if (StringData=="creationdate") {ToFill="Encoded_Date"; Value.Date_From_String(Value.To_UTF8().c_str());}
- else {ToFill=StringData;}
- Element_Info1(Value);
- if (!ToFill.empty())
- Fill(Stream_General, 0, ToFill.c_str(), Value, true);
- }
- }
- break;
- case 0x11 : //AMF3 data
- {
- int32u TypeCode;
- Get_B4 (TypeCode, "AMF3 type code"); Param_Info1C((TypeCode<0x0D), Flv_Amf3Type[TypeCode]);
- switch (TypeCode)
- {
- case 0x00 : //undefined
- case 0x01 : //null
- case 0x02 : //boolean-false
- case 0x03 : //boolean-true
- break;
- default : //Not implemented or unknown
- Element_Offset=Element_Size;
- }
- }
- break;
- default : //Unknown
- Element_Offset=Element_Size; //Forcing the end of parsing
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Flv::Rm()
-{
- Element_Name("Real Media tags");
-
- //Creating the parser
- File_Rm MI;
- Open_Buffer_Init(&MI);
-
- //Parsing
- Open_Buffer_Continue(&MI);
-
- //Filling
- Finish(&MI);
- Merge(MI, Stream_General, 0, 0);
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_FLV_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Flv.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Flv.h
deleted file mode 100644
index 63421372f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Flv.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Flash files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_FlvH
-#define MediaInfo_File_FlvH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Flv
-//***************************************************************************
-
-class File_Flv : public File__Analyze
-{
-public :
- File_Flv();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
- void Streams_Finish_PerStream(stream_t StreamID);
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void header();
- void video();
- void video_H263();
- void video_ScreenVideo(int8u Version);
- void video_VP6(bool WithAlpha);
- void video_AVC();
- void video_HEVC();
- void audio();
- void audio_MPEG();
- void audio_AAC();
- void meta();
- void meta_SCRIPTDATAOBJECT();
- void meta_SCRIPTDATAVARIABLE();
- void meta_SCRIPTDATAVALUE(const std::string &StringData);
- void Rm();
-
- //Streams
- struct stream
- {
- File__Analyze* Parser;
- size_t PacketCount;
- int32u Delay;
- int32u TimeStamp;
- std::vector<int32u> Durations;
-
- stream()
- {
- Parser=NULL;
- PacketCount=0;
- Delay=(int32u)-1;
- TimeStamp=(int32u)-1;
- }
-
- ~stream()
- {
- delete Parser; //Parser=NULL;
- }
- };
- std::vector<stream> Stream; //Null, Video, Audio
-
- //Count
- bool video_stream_Count;
- bool audio_stream_Count;
-
- //Temp
- bool video_stream_FrameRate_Detected;
- std::vector<int32u> video_stream_FrameRate;
- int32u Time;
- int8u meta_Level;
- std::map<int8u, bool> meta_LevelFinished;
- bool Searching_Duration;
- bool MetaData_NotTrustable;
- int32u PreviousTagSize;
- int32u PreviousTagSize_Add11;
- int64u meta_filesize;
- float64 meta_duration;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf.cpp
deleted file mode 100644
index 0b6fb816d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf.cpp
+++ /dev/null
@@ -1,1664 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_GXF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Gxf.h"
-#include "MediaInfo/Multiple/File_Gxf_TimeCode.h"
-#if defined(MEDIAINFO_DVDIF_YES)
- #include "MediaInfo/Multiple/File_DvDif.h"
-#endif
-#if defined(MEDIAINFO_RIFF_YES)
- #include "MediaInfo/Multiple/File_Riff.h"
-#endif
-#if defined(MEDIAINFO_GXF_YES)
- #include "MediaInfo/Multiple/File_Umf.h"
-#endif
-#if defined(MEDIAINFO_MPEGV_YES)
- #include "MediaInfo/Video/File_Mpegv.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_PCM_YES)
- #include "MediaInfo/Audio/File_Pcm.h"
-#endif
-#if defined(MEDIAINFO_SMPTEST0337_YES)
- #include "MediaInfo/Audio/File_ChannelGrouping.h"
-#endif
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "ZenLib/Utils.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Gxf_Tag_Name(int8u Tag)
-{
- switch (Tag)
- {
- case 0x40 : return "Media file name of material";
- case 0x41 : return "First field of material in stream";
- case 0x42 : return "Last field of material in stream";
- case 0x43 : return "Mark in for the stream";
- case 0x44 : return "Mark out for the stream";
- case 0x45 : return "Estimated size of stream in 1024 byte units";
- case 0x46 :
- case 0x47 :
- case 0x48 :
- case 0x49 :
- case 0x4A :
- case 0x4B : return "Reserved";
- case 0x4C : return "Media file name";
- case 0x4D : return "Auxiliary Information";
- case 0x4E : return "Media file system version";
- case 0x4F : return "MPEG auxiliary information";
- case 0x50 : return "Frame rate";
- case 0x51 : return "Lines per frame";
- case 0x52 : return "Fields per frame";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Gxf_MediaTypes(int8u Type)
-{
- switch (Type)
- {
- case 3 : return "JPEG"; //525 lines
- case 4 : return "JPEG"; //625 lines
- case 7 : return "SMPTE 12M"; //525 lines
- case 8 : return "SMPTE 12M"; //625 lines
- case 9 : return "PCM"; //24-bit
- case 10 : return "PCM"; //16-bit
- case 11 : return "MPEG-2 Video"; //525 lines
- case 12 : return "MPEG-2 Video"; //625 lines
- case 13 : return "DV"; //25 Mbps, 525 lines
- case 14 : return "DV"; //25 Mbps, 625 lines
- case 15 : return "DV"; //50 Mbps, 525 lines
- case 16 : return "DV"; //50 Mbps, 625 lines
- case 17 : return "AC-3"; //16-bit
- case 18 : return "AES"; //non-PCM
- case 19 : return "Reserved";
- case 20 : return "MPEG-2 Video"; //HD, Main Profile at High Level
- case 21 : return "Ancillary data"; //SMPTE 291M 10-bit type 2 component ancillary data
- case 22 : return "MPEG-1 Video"; //525 lines
- case 23 : return "MPEG-1 Video"; //625 lines
- case 24 : return "SMPTE 12M"; //HD
- case 25 : return "DV"; //DVCPRO HD
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-stream_t Gxf_MediaTypes_StreamKind(int8u Type)
-{
- switch (Type)
- {
- case 3 : return Stream_Video;
- case 4 : return Stream_Video;
- case 7 : return Stream_Max;
- case 8 : return Stream_Max;
- case 9 : return Stream_Audio;
- case 10 : return Stream_Audio;
- case 11 : return Stream_Video;
- case 12 : return Stream_Video;
- case 13 : return Stream_Video;
- case 14 : return Stream_Video;
- case 15 : return Stream_Video;
- case 16 : return Stream_Video;
- case 17 : return Stream_Audio;
- case 18 : return Stream_Audio;
- case 19 : return Stream_Max;
- case 20 : return Stream_Video;
- case 21 : return Stream_Max;
- case 22 : return Stream_Video;
- case 23 : return Stream_Video;
- case 24 : return Stream_Max;
- case 25 : return Stream_Video;
- default : return Stream_Max;
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Gxf_MediaTypes_Format(int8u Type)
-{
- switch (Type)
- {
- case 3 : return "JPEG"; //525 lines
- case 4 : return "JPEG"; //625 lines
- case 9 : return "PCM"; //24-bit
- case 10 : return "PCM"; //16-bit
- case 11 : return "MPEG Video"; //525 lines
- case 12 : return "MPEG Video"; //625 lines
- case 13 : return "DV"; //25 Mbps, 525 lines
- case 14 : return "DV"; //25 Mbps, 625 lines
- case 15 : return "DV"; //50 Mbps, 525 lines
- case 16 : return "DV"; //50 Mbps, 625 lines
- case 17 : return "AC-3"; //16-bit
- case 18 : return "SMPTE 338M, table 1, data type 28"; //SMPTE 338M, table 1, data type 28
- case 20 : return "MPEG Video"; //HD, Main Profile at High Level
- case 22 : return "MPEG Video"; //525 lines
- case 23 : return "MPEG Video"; //625 lines
- case 25 : return "DV"; //DVCPRO HD
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-double Gxf_FrameRate(int32u Content)
-{
- switch (Content)
- {
- case 1 : return 60.000;
- case 2 : return 59.940;
- case 3 : return 50.000;
- case 4 : return 30.000;
- case 5 : return 29.970;
- case 6 : return 25.000;
- case 7 : return 24.000;
- case 8 : return 23.976;
- default: return 0.000;
- }
-}
-
-//---------------------------------------------------------------------------
-int32u Gxf_LinesPerFrame_Height(int32u Content)
-{
- switch (Content)
- {
- case 1 : return 480;
- case 2 : return 576;
- case 4 : return 1080;
- case 6 : return 720;
- default: return 0;
- }
-}
-
-//---------------------------------------------------------------------------
-int32u Gxf_LinesPerFrame_Width(int32u Content)
-{
- switch (Content)
- {
- case 1 : return 720;
- case 2 : return 720;
- case 4 : return 1920;
- case 6 : return 1080;
- default: return 0;
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Gxf_FieldsPerFrame(int32u Tag)
-{
- switch (Tag)
- {
- case 1 : return "Progressive";
- case 2 : return "Interlaced";
- default: return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Gxf::File_Gxf()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("GXF");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Gxf;
- StreamIDs_Width[0]=2;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- #endif //MEDIAINFO_DEMUX
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
- Buffer_TotalBytes_Fill_Max=(int64u)-1; //Disabling this feature for this format, this is done in the parser
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent_Accept_Specific=true;
- #endif //MEDIAINFO_DEMUX
-
- //Temp
- Material_Fields_FieldsPerFrame=1; //Progressive by default
- Parsers_Count=0;
- AncillaryData_StreamID=(int8u)-1;
- Material_Fields_First_IsValid=false;
- Material_Fields_Last_IsValid=false;
- Material_File_Size_IsValid=false;
- UMF_File=NULL;
- #if defined(MEDIAINFO_ANCILLARY_YES)
- Ancillary=NULL;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
- SizeToAnalyze=16*1024*1024;
- IsParsingMiddle_MaxOffset=(int64u)-1;
- Audio_Count=0;
- Element_Code=0x00; //Element_Code is used as a test for pre-existing parsing, it must be initialized
-
- #if MEDIAINFO_DEMUX
- Demux_HeaderParsed=false;
- #endif //MEDIAINFO_DEMUX
- #if MEDIAINFO_SEEK
- Flt_FieldPerEntry=(int32u)-1;
- IFrame_IsParsed=false;
- #endif //MEDIAINFO_SEEK
-}
-
-//---------------------------------------------------------------------------
-File_Gxf::~File_Gxf()
-{
- //Temp
- delete Ancillary; //Ancillary=NULL;
- delete UMF_File; //UMF_File=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Gxf::Streams_Finish()
-{
- //Merging audio if Title are same
- for (size_t StreamID=0; StreamID<Streams.size(); StreamID++)
- {
- if (Gxf_MediaTypes_StreamKind(Streams[StreamID].MediaType)==Stream_Video)
- {
- Ztring Title=Streams[StreamID].MediaName;
- size_t Title_Extension_Offset=Title.find(__T(".M0"));
- if (Title_Extension_Offset==std::string::npos || Title_Extension_Offset!=Title.size()-3)
- Title_Extension_Offset=Title.find(__T(".H0"));
- if (Title_Extension_Offset!=std::string::npos && Title_Extension_Offset==Title.size()-3)
- {
- Title.resize(Title.size()-3);
- Streams[StreamID].MediaName=Title;
- }
- }
- if (Gxf_MediaTypes_StreamKind(Streams[StreamID].MediaType)==Stream_Audio && Config->File_Audio_MergeMonoStreams_Get())
- {
- Ztring Title=Streams[StreamID].MediaName;
- size_t Title_Extension_Offset=Title.find(__T(".A0"));
- if (Title_Extension_Offset!=std::string::npos && Title_Extension_Offset==Title.size()-3)
- {
- Title.resize(Title.size()-3);
- for (size_t StreamID2=StreamID+1; StreamID2<Streams.size(); StreamID2++)
- {
- if (Streams[StreamID2].MediaName==Title+__T(".A")+Ztring::ToZtring(StreamID2-StreamID))
- {
- Streams[StreamID].MediaName=Title;
- if (Streams[StreamID].Parsers.size()==1 && Streams[StreamID2].Parsers.size()==1)
- {
- int32u Channels=Streams[StreamID].Parsers[0]->Retrieve(Stream_Audio, 0, Audio_Channel_s_).To_int32u()+Streams[StreamID2].Parsers[0]->Retrieve(Stream_Audio, 0, Audio_Channel_s_).To_int32u();
- Streams[StreamID].Parsers[0]->Fill(Stream_Audio, 0, Audio_Channel_s_, Channels, 10, true);
- int32u BitRate=Streams[StreamID].Parsers[0]->Retrieve(Stream_Audio, 0, Audio_BitRate).To_int32u()+Streams[StreamID2].Parsers[0]->Retrieve(Stream_Audio, 0, Audio_BitRate).To_int32u();
- Streams[StreamID].Parsers[0]->Fill(Stream_Audio, 0, Audio_BitRate, BitRate, 10, true);
- }
- Streams[StreamID2].MediaType=(int8u)-1;
- }
- }
- }
- }
- }
-
- //For each Streams
- for (size_t StreamID=0; StreamID<Streams.size(); StreamID++)
- Streams_Finish_PerStream(StreamID, Streams[StreamID]);
-
- //Global
- if (Material_Fields_First_IsValid && Material_Fields_Last_IsValid && Material_Fields_Last-Material_Fields_First)
- {
- int64u FrameCount=(Material_Fields_Last+1-Material_Fields_First)/Material_Fields_FieldsPerFrame;
- Fill(Stream_Video, 0, Video_FrameCount, FrameCount);
- if (Gxf_FrameRate(Streams[0x00].FrameRate_Code))
- Fill(Stream_Video, 0, Video_Duration, ((float64)FrameCount)/Gxf_FrameRate(Streams[0x00].FrameRate_Code)*1000, 0); //In milliseconds
-
- //We trust more the MPEG Video bitrate thant the rest
- //TODO: Chech why there is incohenrency (mainly about Material File size info in the sample)
- if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video"))
- Fill(Stream_Video, 0, Video_BitRate, Retrieve(Stream_Video, 0, Video_BitRate_Nominal));
- }
- if (Material_File_Size_IsValid)
- {
- //Fill(Stream_General, 0, General_OverallBitRate, ((int64u)Material_File_Size)*1024*8/???);
- }
-
- //Time code tracks
- for (std::map<int8u, tc>::iterator TimeCode=TimeCodes.begin(); TimeCode!=TimeCodes.end(); ++TimeCode)
- {
- int64u TimeCode_FirstFrame_ms=((File_Gxf_TimeCode*)Streams[TimeCode->first].Parsers[0])->TimeCode_FirstFrame_ms;
- string TimeCode_FirstFrame=((File_Gxf_TimeCode*)Streams[TimeCode->first].Parsers[0])->TimeCode_FirstFrame;
- bool TimeCode_FirstFrame_Striped=false;
- if (TimeCode_FirstFrame_ms==(int64u)-1)
- {
- TimeCode_FirstFrame_ms=TimeCode->second.Milliseconds;
- TimeCode_FirstFrame=TimeCode->second.String;
- TimeCode_FirstFrame_Striped=true;
- }
- if (TimeCode_FirstFrame_ms!=(int64u)-1)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_CodecID, Streams[TimeCode->first].MediaType);
- Fill(Stream_Other, StreamPos_Last, Other_ID, TimeCode->first);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Time code");
- Fill(Stream_Other, StreamPos_Last, Other_Format, "SMPTE TC");
- Fill(Stream_Other, StreamPos_Last, Other_TimeCode_FirstFrame, TimeCode_FirstFrame.c_str());
- if (TimeCode_FirstFrame_Striped)
- Fill(Stream_Other, StreamPos_Last, Other_TimeCode_Striped, "Yes");
- if (TimeCode->first<Streams.size())
- Fill(Stream_Other, StreamPos_Last, Other_Title, Streams[TimeCode->first].MediaName);
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Gxf::Streams_Finish_PerStream(size_t StreamID, stream &Temp)
-{
- if (Temp.MediaType==(int8u)-1)
- return;
-
- //By the parser
- if (Temp.Parsers.size()==1 && Temp.Parsers[0]->Status[IsAccepted])
- {
- StreamKind_Last=Stream_Max;
- StreamPos_Last=(size_t)-1;
- if (Config->ParseSpeed<=1.0)
- {
- Fill(Temp.Parsers[0]);
- Temp.Parsers[0]->Open_Buffer_Unsynch();
- }
- Finish(Temp.Parsers[0]);
-
- //Video
- bool IsTimeCode=false;
- for (std::map<int8u, tc>::iterator TimeCode=TimeCodes.begin(); TimeCode!=TimeCodes.end(); ++TimeCode)
- if (StreamID==TimeCode->first)
- IsTimeCode=true;
- if (!IsTimeCode && Temp.DisplayInfo)
- {
- if (Temp.Parsers[0]->Count_Get(Stream_Video))
- {
- Stream_Prepare(Stream_Video);
-
- if (TimeCodes.empty())
- {
- Fill(Stream_Video, StreamPos_Last, Video_Delay, ((float64)(Material_Fields_First/Material_Fields_FieldsPerFrame))/Gxf_FrameRate(Streams[0x00].FrameRate_Code)*1000, 0);
- Fill(Stream_Video, StreamPos_Last, Video_Delay_Source, "Container");
- }
- else
- for (std::map<int8u, tc>::iterator TimeCode=TimeCodes.begin(); TimeCode!=TimeCodes.end(); ++TimeCode)
- {
- int64u TimeCode_FirstFrame_ms=((File_Gxf_TimeCode*)Streams[TimeCode->first].Parsers[0])->TimeCode_FirstFrame_ms;
- string TimeCode_FirstFrame=((File_Gxf_TimeCode*)Streams[TimeCode->first].Parsers[0])->TimeCode_FirstFrame;
- if (TimeCode_FirstFrame_ms==(int64u)-1)
- {
- TimeCode_FirstFrame_ms=TimeCode->second.Milliseconds;
- TimeCode_FirstFrame=TimeCode->second.String;
- }
- if (TimeCode_FirstFrame_ms!=(int64u)-1)
- {
- Fill(Stream_Video, StreamPos_Last, Video_Delay, TimeCode_FirstFrame_ms, 0);
- if (TimeCode_FirstFrame.size()==11)
- Fill(Stream_Video, StreamPos_Last, Video_Delay_DropFrame, TimeCode_FirstFrame[8]==';'?"Yes":"No");
- Fill(Stream_Video, StreamPos_Last, Video_Delay_Source, "Container");
-
- //Fill(Stream_Video, StreamPos_Last, Video_TimeCode_FirstFrame, TimeCode_FirstFrame.c_str());
- //Fill(Stream_Video, StreamPos_Last, Video_TimeCode_Source, "Time code track");
- }
- }
-
- Merge(*Temp.Parsers[0], Stream_Video, 0, StreamPos_Last);
- Fill(Stream_Video, StreamPos_Last, Video_CodecID, Temp.MediaType);
-
- Fill(Stream_Video, StreamPos_Last, Video_ID, StreamID, 10, true);
- Fill(Stream_Video, StreamPos_Last, "Title", Temp.MediaName);
-
- Ztring LawRating=Temp.Parsers[0]->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=Temp.Parsers[0]->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
-
- //Special cases
- if (Temp.Parsers[0]->Count_Get(Stream_Text))
- {
- //Video and Text are together
- size_t Parser_Text_Count=Temp.Parsers[0]->Count_Get(Stream_Text);
- for (size_t Parser_Text_Pos=0; Parser_Text_Pos<Parser_Text_Count; Parser_Text_Pos++)
- {
- Stream_Prepare(Stream_Text);
- Merge(*Temp.Parsers[0], Stream_Text, Parser_Text_Pos, StreamPos_Last);
- Ztring ID=Retrieve(Stream_Text, StreamPos_Last, Text_ID);
- Fill(Stream_Text, StreamPos_Last, Text_ID, Ztring::ToZtring(AncillaryData_StreamID)+__T("-")+ID, true);
- Fill(Stream_Text, StreamPos_Last, Text_ID_String, Ztring::ToZtring(AncillaryData_StreamID)+__T("-")+ID, true);
- Fill(Stream_Text, StreamPos_Last, Text_Delay, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Delay), true);
- Fill(Stream_Text, StreamPos_Last, Text_Delay_Source, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Delay_Source), true);
- Fill(Stream_Text, StreamPos_Last, Text_Delay_Original, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Delay_Original), true);
- Fill(Stream_Text, StreamPos_Last, Text_Delay_Original_Source, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Delay_Original_Source), true);
- }
-
- StreamKind_Last=Stream_Video;
- StreamPos_Last=Count_Get(Stream_Video)-1;
- }
- }
-
- //Audio
- for (size_t Pos=0; Pos<Temp.Parsers[0]->Count_Get(Stream_Audio); Pos++)
- {
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, StreamPos_Last, Audio_CodecID, Temp.MediaType);
-
- if (TimeCodes.empty())
- {
- Fill(Stream_Audio, StreamPos_Last, Audio_Delay, ((float64)(Material_Fields_First/Material_Fields_FieldsPerFrame))/Gxf_FrameRate(Streams[0x00].FrameRate_Code)*1000, 0);
- Fill(Stream_Audio, StreamPos_Last, Audio_Delay_Source, "Container");
- }
- else
- for (std::map<int8u, tc>::iterator TimeCode=TimeCodes.begin(); TimeCode!=TimeCodes.end(); ++TimeCode)
- {
- int64u TimeCode_FirstFrame_ms=((File_Gxf_TimeCode*)Streams[TimeCode->first].Parsers[0])->TimeCode_FirstFrame_ms;
- string TimeCode_FirstFrame=((File_Gxf_TimeCode*)Streams[TimeCode->first].Parsers[0])->TimeCode_FirstFrame;
- if (TimeCode_FirstFrame_ms==(int64u)-1)
- {
- TimeCode_FirstFrame_ms=TimeCode->second.Milliseconds;
- TimeCode_FirstFrame=TimeCode->second.String;
- }
- if (TimeCode_FirstFrame_ms!=(int64u)-1)
- {
- Fill(Stream_Audio, StreamPos_Last, Audio_Delay, TimeCode_FirstFrame_ms, 0);
- if (TimeCode_FirstFrame.size()==11)
- Fill(Stream_Audio, StreamPos_Last, Audio_Delay_DropFrame, TimeCode_FirstFrame[8]==';'?"Yes":"No");
- Fill(Stream_Audio, StreamPos_Last, Audio_Delay_Source, "Container");
-
- //Fill(Stream_Audio, StreamPos_Last, Audio_TimeCode_FirstFrame, TimeCode_FirstFrame.c_str());
- //Fill(Stream_Audio, StreamPos_Last, Audio_TimeCode_Source, "Time code track");
- }
- }
-
- Merge(*Temp.Parsers[0], Stream_Audio, Pos, StreamPos_Last, false);
-
- Ztring ID;
- if (Temp.IsChannelGrouping)
- ID=Ztring::ToZtring(StreamID-1)+__T(" / "); //First half of the channel grouping
- ID+=Ztring::ToZtring(StreamID); //Second half of the channel grouping or standalone
- Ztring ID_String=ID;
- if (!Retrieve(Stream_Audio, StreamPos_Last, Audio_ID).empty())
- {
- ID+=__T('-')+Retrieve(Stream_Audio, StreamPos_Last, Audio_ID);
- ID_String+=__T('-')+Retrieve(Stream_Audio, StreamPos_Last, Audio_ID_String);
- }
- Fill(Stream_Audio, StreamPos_Last, Audio_ID, ID, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_ID_String, ID_String, true);
- if (Temp.IsChannelGrouping)
- Fill(Stream_Audio, StreamPos_Last, "Title", Streams[StreamID-1].MediaName); //First half of the channel grouping
- Fill(StreamKind_Last, StreamPos_Last, "Title", Temp.MediaName); //Second half of the channel grouping or standalone
-
- for (std::map<std::string, Ztring>::iterator Info=Temp.Infos.begin(); Info!=Temp.Infos.end(); ++Info)
- if (Info->first=="BitRate" && Temp.Parsers[0]->Count_Get(Stream_Audio)>1)
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate_Encoded, Pos?Ztring(__T("0")):Info->second); // In case of more than 1 audio sub-stream Encoded bit rate is the bit rate of all streams + overhead
- else if (Retrieve(Stream_Audio, StreamPos_Last, Info->first.c_str()).empty())
- Fill(Stream_Audio, StreamPos_Last, Info->first.c_str(), Info->second);
- }
-
- //Text
- if (Temp.Parsers[0]->Count_Get(Stream_Text))
- {
- size_t Parser_Text_Count=Temp.Parsers[0]->Count_Get(Stream_Text);
- for (size_t Parser_Text_Pos=0; Parser_Text_Pos<Parser_Text_Count; Parser_Text_Pos++)
- {
- Stream_Prepare(Stream_Text);
- Merge(*Temp.Parsers[0], Stream_Text, Parser_Text_Pos, StreamPos_Last);
- Ztring ID=Retrieve(Stream_Text, StreamPos_Last, Text_ID);
- Fill(Stream_Text, StreamPos_Last, Text_ID, Ztring::ToZtring(AncillaryData_StreamID)+__T("-")+ID, true);
- Fill(Stream_Text, StreamPos_Last, Text_ID_String, Ztring::ToZtring(AncillaryData_StreamID)+__T("-")+ID, true);
- Fill(Stream_Text, StreamPos_Last, Text_Delay, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Delay), true);
- Fill(Stream_Text, StreamPos_Last, Text_Delay_Source, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Delay_Source), true);
- Fill(Stream_Text, StreamPos_Last, Text_Delay_Original, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Delay_Original), true);
- Fill(Stream_Text, StreamPos_Last, Text_Delay_Original_Source, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Delay_Original_Source), true);
- Fill(Stream_Text, StreamPos_Last, "Title", Temp.MediaName);
- }
-
- Ztring LawRating=Temp.Parsers[0]->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=Temp.Parsers[0]->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
-
- StreamKind_Last=Stream_Max;
- StreamPos_Last=(size_t)-1;
- }
-
- //Other
- if (Temp.Parsers[0]->Count_Get(Stream_Other))
- {
- size_t Parser_Other_Count=Temp.Parsers[0]->Count_Get(Stream_Other);
- for (size_t Parser_Other_Pos=0; Parser_Other_Pos<Parser_Other_Count; Parser_Other_Pos++)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_CodecID, Temp.MediaType);
- Merge(*Temp.Parsers[0], Stream_Other, Parser_Other_Pos, StreamPos_Last);
- Ztring ID=Retrieve(Stream_Other, StreamPos_Last, Other_ID);
- Fill(Stream_Other, StreamPos_Last, Other_ID, Ztring::ToZtring(AncillaryData_StreamID)+__T("-")+ID, true);
- Fill(Stream_Other, StreamPos_Last, Other_ID_String, Ztring::ToZtring(AncillaryData_StreamID)+__T("-")+ID, true);
- /*
- Fill(Stream_Other, StreamPos_Last, Other_Delay, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Delay), true);
- Fill(Stream_Other, StreamPos_Last, Other_Delay_Source, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Delay_Source), true);
- Fill(Stream_Other, StreamPos_Last, Other_Delay_Original, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Delay_Original), true);
- Fill(Stream_Other, StreamPos_Last, Other_Delay_Original_Source, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Delay_Original_Source), true);
- */
- Fill(Stream_Other, StreamPos_Last, "Title", Temp.MediaName);
- }
-
- StreamKind_Last=Stream_Max;
- StreamPos_Last=(size_t)-1;
- }
- }
- }
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Gxf::Synchronize()
-{
- //Synchronizing
- while (Buffer_Offset+16<=Buffer_Size)
- {
- while (Buffer_Offset+16<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x00
- || Buffer[Buffer_Offset+3]!=0x00
- || Buffer[Buffer_Offset+4]!=0x01
- || Buffer[Buffer_Offset+14]!=0xE1
- || Buffer[Buffer_Offset+15]!=0xE2))
- {
- Buffer_Offset+=4;
- while (Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Buffer_Offset+=4;
- for (int8u Pos=0; Pos<3; Pos++)
- if (Buffer_Offset>=Buffer_Size || Buffer[Buffer_Offset-1]==0x00)
- Buffer_Offset--;
- }
-
- if (Buffer_Offset+16<=Buffer_Size) //Testing if size is coherant
- {
- //Retrieving some info
- int32u Size=BigEndian2int32u(Buffer+Buffer_Offset+6);
-
- //Testing
- if (Buffer_Offset+Size+16>Buffer_Size)
- return false; //Need more data
- if (Buffer[Buffer_Offset+Size ]!=0x00
- || Buffer[Buffer_Offset+Size+1]!=0x00
- || Buffer[Buffer_Offset+Size+2]!=0x00
- || Buffer[Buffer_Offset+Size+3]!=0x00
- || Buffer[Buffer_Offset+Size+4]!=0x01
- || Buffer[Buffer_Offset+Size+14]!=0xE1
- || Buffer[Buffer_Offset+Size+15]!=0xE2)
- Buffer_Offset++;
- else
- break;
- }
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+16>Buffer_Size)
- {
- return false;
- }
-
- if (!Status[IsAccepted])
- {
- Accept("GXF");
- Fill(Stream_General, 0, General_Format, "GXF");
- Streams.resize(0x40);
- }
-
- //Synched is OK
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Gxf::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+16>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (CC5(Buffer+Buffer_Offset )!=0x0000000001
- || CC2(Buffer+Buffer_Offset+14)!=0xE1E2)
- Synched=false;
-
- //Test if the next synchro is available
- int32u PacketLength=BigEndian2int32u(Buffer+Buffer_Offset+6);
- if (File_Offset+Buffer_Offset+PacketLength+16<=File_Size)
- {
- if (Buffer_Offset+PacketLength+16>Buffer_Size)
- return false;
- if (CC5(Buffer+Buffer_Offset+PacketLength )!=0x0000000001
- || CC2(Buffer+Buffer_Offset+PacketLength+14)!=0xE1E2)
- Synched=false;
- }
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Gxf::Read_Buffer_Unsynched()
-{
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- for (size_t Parser_Pos=0; Parser_Pos<Streams[Pos].Parsers.size(); Parser_Pos++)
- Streams[Pos].Parsers[Parser_Pos]->Open_Buffer_Unsynch();
-
- #if MEDIAINFO_SEEK
- IFrame_IsParsed=false;
- #endif //MEDIAINFO_SEEK
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_Gxf::Read_Buffer_Seek (size_t Method, int64u Value, int64u)
-{
- //Parsing
- switch (Method)
- {
- case 0 : Open_Buffer_Unsynch(); GoTo(Value); return 1;
- case 1 : Open_Buffer_Unsynch(); GoTo(File_Size*Value/10000); return 1;
- case 2 : //Timestamp
- {
- //We transform TimeStamp to a frame number
- if (Streams.empty() || Gxf_FrameRate(Streams[0x00].FrameRate_Code)==0)
- return (size_t)-1; //Not supported
-
- int64u Delay=0;
- if (TimeCodes.empty())
- {
- if (Material_Fields_First_IsValid)
- Delay=float64_int64s(((float64)(Material_Fields_First/Material_Fields_FieldsPerFrame))/Gxf_FrameRate(Streams[0x00].FrameRate_Code)*1000000000);
- else
- Delay=0;
- }
- else
- {
- for (std::map<int8u, tc>::iterator TimeCode=TimeCodes.begin(); TimeCode!=TimeCodes.end(); ++TimeCode)
- {
- int64u TimeCode_First=((File_Gxf_TimeCode*)Streams[TimeCode->first].Parsers[0])->TimeCode_FirstFrame_ms;
- if (TimeCode_First==(int64u)-1)
- TimeCode_First=TimeCode->second.Milliseconds;
- if (TimeCode_First==(int64u)-1)
- Delay=0;
- else
- {
- Delay=TimeCode_First*1000000;
- break;
- }
- }
- }
-
- if (Value<Delay)
- Value=0;
- else
- Value=float64_int64s(((float64)(Value-Delay))/1000000000*Gxf_FrameRate(Streams[0x00].FrameRate_Code));
- }
- //No break;
- case 3 : //FrameNumber
- {
- if (Seeks.empty())
- return (size_t)-1; //Not supported
-
- //Search previous I-Frame
- if (UMF_File && ((File_Umf*)UMF_File)->GopSize!=(int64u)-1)
- {
- Value/=((File_Umf*)UMF_File)->GopSize;
- Value*=((File_Umf*)UMF_File)->GopSize;
- }
- Value*=Material_Fields_FieldsPerFrame;
-
- for (size_t Pos=0; Pos<Seeks.size(); Pos++)
- {
- if (Material_Fields_First+Value<=Seeks[Pos].FrameNumber)
- {
- if (Material_Fields_First+Value<Seeks[Pos].FrameNumber && Pos)
- Pos--;
- Open_Buffer_Unsynch();
- GoTo(((int64u)Seeks[Pos].StreamOffset)*1024);
-
- return 1;
- }
- }
-
- return 2; //Invalid value
- }
- default : return (size_t)-1; //Not supported
- }
-}
-#endif //MEDIAINFO_SEEK
-
-//---------------------------------------------------------------------------
-void File_Gxf::Read_Buffer_AfterParsing()
-{
- if (File_GoTo==(int64u)-1 && File_Offset+Buffer_Offset>=IsParsingMiddle_MaxOffset)
- {
- Fill();
- Open_Buffer_Unsynch();
- Finish();
- return;
- }
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Gxf::Header_Begin()
-{
- #if MEDIAINFO_DEMUX
- //Handling of multiple frames in one block
- if (Element_Code==0xBF && Config->Demux_Unpacketize_Get() && Streams[TrackNumber].Demux_EventWasSent) //media block
- {
- Open_Buffer_Continue(Streams[TrackNumber].Parsers[0], Buffer+Buffer_Offset, 0);
- if (Config->Demux_EventWasSent)
- return false;
- Streams[TrackNumber].Demux_EventWasSent=false;
- }
- #endif //MEDIAINFO_DEMUX
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Gxf::Header_Parse()
-{
- //Parsing
- int32u PacketLength;
- int8u PacketType;
- Skip_B5( "Packet leader");
- Get_B1 (PacketType, "Packet type");
- Get_B4 (PacketLength, "Packet length");
- Skip_B4( "Reserved");
- Skip_B2( "Packet trailer");
-
- //Filling
- Header_Fill_Size(PacketLength);
- Header_Fill_Code(PacketType);
-
- #if MEDIAINFO_DEMUX
- if (!Demux_HeaderParsed)
- {
- if (PacketType==0xBF) //media
- {
- if (Config->NextPacket_Get() && Config->Event_CallBackFunction_IsSet())
- Config->Demux_EventWasSent=true; //First set is to indicate the user that header is parsed
- Demux_HeaderParsed=true;
- }
- }
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-void File_Gxf::Data_Parse()
-{
- //Counting
- Frame_Count++;
-
- switch (Element_Code)
- {
- case 0x00 : Finish("GXF"); break;
- case 0xBC : map(); break;
- case 0xBF : media(); break;
- case 0xFB : end_of_stream(); break;
- case 0xFC : field_locator_table(); break;
- case 0xFD : UMF_file(); break;
- default: ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Gxf::map()
-{
- Element_Name("map");
-
- //Parsing
- int8u Version;
- Element_Begin1("Preamble");
- BS_Begin();
- Mark_1();
- Mark_1();
- Mark_1();
- Get_S1(5, Version, "Version");
- BS_End();
- Skip_B1( "Reserved");
- Element_End0();
-
- Element_Begin1("Material Data");
- int16u SectionLength;
- Get_B2 (SectionLength, "Section Length");
- if (Element_Offset+SectionLength>=Element_Size)
- SectionLength=(int16u)(Element_Size-Element_Offset);
- int64u Material_Data_End=Element_Offset+SectionLength;
- while (Element_Offset<Material_Data_End)
- {
- Element_Begin1("Tag");
- int8u Tag, DataLength;
- Get_B1(Tag, "Tag");
- Get_B1(DataLength, "Data Length");
- Element_Name(Gxf_Tag_Name(Tag));
- switch (Tag)
- {
- case 0x40 : //Media file name of material
- {
- Ztring MediaFileName;
- Get_Local(DataLength, MediaFileName, "Content");
- Fill(Stream_General, 0, General_Title, MediaFileName, true);
- }
- break;
- case 0x41 : //First field of material in stream
- if (DataLength==4)
- {
- if (Material_Fields_First_IsValid)
- Skip_B4( "Content");
- else
- {
- Get_B4 (Material_Fields_First, "Content");
- Material_Fields_First_IsValid=true;
- }
- }
- else
- Skip_XX(DataLength, "Unknown");
- break;
- case 0x42 : //Last field of material in stream
- if (DataLength==4)
- {
- if (Material_Fields_Last_IsValid)
- Skip_B4( "Content");
- else
- {
- Get_B4 (Material_Fields_Last, "Content");
- Material_Fields_Last_IsValid=true;
- }
- }
- else
- Skip_XX(DataLength, "Unknown");
- break;
- case 0x43 : //Mark in for the stream
- if (DataLength==4)
- Skip_B4( "Content");
- else
- Skip_XX(DataLength, "Unknown");
- break;
- case 0x44 : //Mark out for the stream
- if (DataLength==4)
- Skip_B4( "Content");
- else
- Skip_XX(DataLength, "Unknown");
- break;
- case 0x45 : //Estimated size of stream in 1024 byte units
- if (DataLength==4)
- {
- Get_B4 (Material_File_Size , "Content");
- Material_File_Size_IsValid=true;
- }
- else
- Skip_XX(DataLength, "Unknown");
- break;
- case 0x46 : //Reserved
- if (DataLength==4)
- Skip_B4( "Content");
- else
- Skip_XX(DataLength, "Unknown");
- break;
- case 0x47 : //Reserved
- if (DataLength==8)
- Skip_B8( "Content");
- else
- Skip_XX(DataLength, "Unknown");
- break;
- case 0x48 : //Reserved
- Skip_String(DataLength, "Content");
- break;
- case 0x49 : //Reserved
- Skip_String(DataLength, "Content");
- break;
- case 0x4A : //Reserved
- Skip_String(DataLength, "Content");
- break;
- case 0x4B : //Reserved
- Skip_String(DataLength, "Content");
- break;
- default : Skip_XX(DataLength, "Unknown");
- }
- Element_End0();
- }
- Element_End0();
-
- Element_Begin1("Track Description");
- int32u Stream_Video_FrameRate_Code=(int32u)-1, Stream_Video_FieldsPerFrame_Code=(int32u)-1;
- Get_B2 (SectionLength, "Section Length");
- if (Element_Offset+SectionLength>=Element_Size)
- SectionLength=(int16u)(Element_Size-Element_Offset);
- int64u Track_Data_End=Element_Offset+SectionLength;
- while (Element_Offset<Track_Data_End)
- {
- Element_Begin1("Track");
- int16u TrackLength;
- int8u MediaType, TrackID;
- Get_B1 (MediaType, "Media type"); Param_Info1(Gxf_MediaTypes(MediaType&0x7F));
- Get_B1 (TrackID, "Track ID");
- Get_B2 (TrackLength, "Track Length");
- if (Element_Offset+TrackLength>=Track_Data_End)
- TrackLength=(int16u)(Track_Data_End-Element_Offset);
- int64u Track_End=Element_Offset+TrackLength;
- Element_Info1(TrackID&0x3F);
- Element_Info1(Gxf_MediaTypes(MediaType&0x7F));
-
- FILLING_BEGIN();
- MediaType&=0x7F; //Remove the last bit
- TrackID&=0x3F; //Remove the 2 last bits
- Streams[TrackID].MediaType=MediaType;
- Streams[TrackID].TrackID=TrackID;
- if (Streams[TrackID].Parsers.empty())
- {
- Streams[TrackID].MediaType=MediaType;
- Streams[TrackID].TrackID=TrackID;
-
- //Parsers
- #if MEDIAINFO_DEMUX
- Element_Code=TrackID;
- #endif //MEDIAINFO_DEMUX
- switch (MediaType)
- {
- case 3 :
- case 4 : //JPEG
- {
- File__Analyze* Parser=new File__Analyze;
- Open_Buffer_Init(Parser);
- Parser->Accept();
- Parser->Fill();
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Format, "JPEG");
- Streams[TrackID].Parsers.push_back(Parser);
- }
- break;
- case 7 :
- case 8 :
- case 24 : //TimeCode
- {
- File__Analyze* Parser=new File_Gxf_TimeCode;
- Open_Buffer_Init(Parser);
- Streams[TrackID].Parsers.push_back(Parser);
-
- Parsers_Count++;
- Streams[TrackID].Searching_Payload=true;
- TimeCodes[TrackID].Milliseconds=(int64u)-1;
- }
- break;
- case 9 :
- case 10 :
- {
- File__Analyze* Parser=new File__Analyze;
- Open_Buffer_Init(Parser);
- Parser->Accept();
- Parser->Fill();
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "PCM");
- Parser->Fill(Stream_Audio, 0, Audio_Format_Settings_Endianness, "Little");
- Streams[TrackID].Parsers.push_back(Parser);
-
- Audio_Count++;
- }
- break;
- case 11 :
- case 12 :
- case 20 :
- case 22 :
- case 23 : //MPEG Video
- {
- File__Analyze* Parser=new File_Mpegv();
- ((File_Mpegv*)Parser)->FrameIsAlwaysComplete=true;
- ((File_Mpegv*)Parser)->Ancillary=&Ancillary;
- Open_Buffer_Init(Parser);
- Streams[TrackID].Parsers.push_back(Parser);
-
- Parsers_Count++;
- Streams[TrackID].Searching_Payload=true;
- }
- break;
- case 13 :
- case 14 :
- case 15 :
- case 16 :
- case 25 : // was found for DVCPro HD in some files (not in SMPTE ST 360-2009, maybe it is present in a later version)
- //DV
- {
- File__Analyze* Parser=new File_DvDif();
- Open_Buffer_Init(Parser);
- Streams[TrackID].Parsers.push_back(Parser);
-
- Parsers_Count++;
- Streams[TrackID].Searching_Payload=true;
- }
- break;
- case 17 : //AC-3 in AES3 (half)
- case 18 : //Dolby E in AES3 (half)
- {
- File__Analyze* Parser=ChooseParser_ChannelGrouping(TrackID);
- if (Parser)
- {
- Open_Buffer_Init(Parser);
- Streams[TrackID].Parsers.push_back(Parser);
-
- Parsers_Count++;
- Audio_Count++;
- Streams[TrackID].Searching_Payload=true;
- }
- }
- break;
- case 21 : //Ancillary Metadata
- {
- File__Analyze* Parser=new File_Riff();
- ((File_Riff*)Parser)->Ancillary=&Ancillary;
- Open_Buffer_Init(Parser);
- Streams[TrackID].Parsers.push_back(Parser);
-
- Parsers_Count++;
- Streams[TrackID].Searching_Payload=true;
-
- Ancillary=new File_Ancillary;
- Ancillary->WithTenBit=true;
- Ancillary->WithChecksum=true;
- Open_Buffer_Init(Ancillary);
- AncillaryData_StreamID=TrackID;
- if (SizeToAnalyze<8*16*1024*1024)
- SizeToAnalyze*=8; //10x more, to be sure to find captions
- }
- break;
- default : ;
- }
-
- if (Gxf_MediaTypes_StreamKind(MediaType)==Stream_Audio)
- {
- //Resolution
- switch (MediaType)
- {
- case 9 :
- case 18 : //24-bit
- Streams[TrackID].Infos["BitDepth"].From_Number(24);
- break;
- case 10 :
- case 17 : //16-bit
- Streams[TrackID].Infos["BitDepth"].From_Number(16);
- break;
- default : ;
- }
-
- //Channels
- switch (MediaType)
- {
- case 9 :
- case 10 : //Mono
- Streams[TrackID].Infos["Channel(s)"].From_Number(1);
- break;
- case 18 : //Stereo
- Streams[TrackID].Infos["Channel(s)"].From_Number(2);
- break;
- default : ;
- }
-
- //Sampling rate
- switch (MediaType)
- {
- case 9 :
- case 10 :
- case 17 :
- case 18 : //48000
- Streams[TrackID].Infos["SamplingRate"].From_Number(48000);
- break;
- default : ;
- }
-
- //Bit rate
- switch (MediaType)
- {
- case 9 : //Mono, 48 KHz, 24-bit (or padded up to 24-bit)
- Streams[TrackID].Infos["BitRate"].From_Number(1*48000*24);
- break;
- case 10 : //Mono, 48 KHz, 16-bit
- Streams[TrackID].Infos["BitRate"].From_Number(1*48000*16);
- break;
- case 18 : //Stereo, 48 KHz, 24-bit (or padded up to 24-bit)
- Streams[TrackID].Infos["BitRate"].From_Number(2*48000*24);
- break;
- default : ;
- }
- }
- }
- FILLING_END();
-
- int8u Hours=(int8u)-1, Minutes=(int8u)-1, Seconds=(int8u)-1, Fields=(int8u)-1;
- bool Invalid=true, DropFrame=true;
- bool TimeCode_Parsed=false;
-
- while (Element_Offset<Track_End)
- {
- Element_Begin1("Tag");
- int8u Tag, DataLength;
- Get_B1(Tag, "Tag");
- Get_B1(DataLength, "Data Length");
- Element_Name(Gxf_Tag_Name(Tag));
- switch (Tag)
- {
- case 0x4C : //Media name
- {
- Get_Local(DataLength, Streams[TrackID].MediaName, "Content");
- }
- break;
- case 0x4D : //Auxiliary Information
- if (DataLength==8)
- {
- if (MediaType==21)
- {
- //Ancillary
- Skip_B1( "Reserved");
- Skip_B1( "Reserved");
- Skip_B1( "Ancillary data presentation format");
- Skip_B1( "Number of ancillary data fields per ancillary data media packet");
- Skip_B2( "Byte size of each ancillary data field");
- Skip_B2( "Byte size of the ancillary data media packet in 256 byte units");
- }
- else if (MediaType==7 || MediaType==8 || MediaType==24)
- {
- //TimeCode
- Get_B1 (Fields, "Fields");
- Get_B1 (Seconds, "Second");
- Get_B1 (Minutes, "Minute");
- BS_Begin();
- Get_SB ( Invalid, "Invalid");
- Skip_SB( "Color frame");
- Get_SB ( DropFrame, "Drop frame");
- Get_S1 (5, Hours, "Hour");
- BS_End();
- Skip_B1( "User bits");
- Skip_B1( "User bits");
- Skip_B1( "User bits");
- Skip_B1( "User bits");
- if (!Invalid)
- TimeCode_Parsed=true;
- }
- else
- Skip_B8( "Content");
- }
- else
- Skip_XX(DataLength, "Unknown");
- break;
- case 0x4E : //Media file system version
- if (DataLength==4)
- Skip_B4( "Content");
- else
- Skip_XX(DataLength, "Unknown");
- break;
- case 0x4F : //MPEG auxiliary information
- Skip_String(DataLength, "Content");
- break;
- case 0x50 : //Frame rate
- if (DataLength==4)
- {
- Get_B4 (Streams[TrackID].FrameRate_Code, "Content"); Param_Info1(Gxf_FrameRate(Streams[TrackID].FrameRate_Code)); Element_Info1(Gxf_FrameRate(Streams[TrackID].FrameRate_Code));
- for (std::map<int8u, tc>::iterator TimeCode=TimeCodes.begin(); TimeCode!=TimeCodes.end(); ++TimeCode)
- if (TrackID==TimeCode->first)
- for (size_t Pos=0; Pos<Streams[TrackID].Parsers.size(); Pos++)
- ((File_Gxf_TimeCode*)Streams[TrackID].Parsers[Pos])->FrameRate_Code=Streams[0x00].FrameRate_Code;
- if (Gxf_MediaTypes_StreamKind(MediaType)==Stream_Video)
- Stream_Video_FrameRate_Code=Streams[TrackID].FrameRate_Code;
- }
- else
- Skip_XX(DataLength, "Unknown");
- break;
- case 0x51 : //Lines per frame
- if (DataLength==4)
- {
- Get_B4 (Streams[TrackID].LinesPerFrame_Code, "Content"); Param_Info1(Gxf_LinesPerFrame_Height(Streams[TrackID].LinesPerFrame_Code)); Element_Info1(Gxf_LinesPerFrame_Height(Streams[TrackID].LinesPerFrame_Code));
- }
- else
- Skip_XX(DataLength, "Unknown");
- break;
- case 0x52 : //Fields per frame
- if (DataLength==4)
- {
- Get_B4 (Streams[TrackID].FieldsPerFrame_Code, "Content"); Param_Info1(Gxf_FieldsPerFrame(Streams[TrackID].FieldsPerFrame_Code)); Element_Info1(Gxf_FieldsPerFrame(Streams[TrackID].FieldsPerFrame_Code));
- if (Gxf_MediaTypes_StreamKind(MediaType)==Stream_Video)
- {
- Stream_Video_FieldsPerFrame_Code=Streams[TrackID].FieldsPerFrame_Code;
- Material_Fields_FieldsPerFrame=Streams[TrackID].FieldsPerFrame_Code;
- }
- for (std::map<int8u, tc>::iterator TimeCode=TimeCodes.begin(); TimeCode!=TimeCodes.end(); ++TimeCode)
- if (TrackID==TimeCode->first)
- for (size_t Pos=0; Pos<Streams[TrackID].Parsers.size(); Pos++)
- ((File_Gxf_TimeCode*)Streams[TrackID].Parsers[Pos])->FieldsPerFrame_Code=Streams[0x00].FieldsPerFrame_Code;
- }
- else
- Skip_XX(DataLength, "Unknown");
- break;
- default : Skip_XX(DataLength, "Unknown");
- }
- Element_End0();
- }
- Element_End0();
-
- //Test on TimeCode
- if (TimeCode_Parsed && !Invalid)
- {
- std::map<int8u, tc>::iterator TimeCode=TimeCodes.find(TrackID);
- if (TimeCode==TimeCodes.end() || TimeCode->second.Milliseconds==(int64u)-1)
- {
- float64 FrameRate=Gxf_FrameRate(Streams[TrackID].FrameRate_Code);
- TimeCodes[TrackID].Milliseconds=Hours *60*60*1000
- +Minutes *60*1000
- +Seconds *1000;
- MediaInfoLib::TimeCode TC;
- TC.Hours=Hours;
- TC.Minutes=Minutes;
- TC.Seconds=Seconds;
- TC.Frames=Fields/2;
- TC.DropFrame=DropFrame;
- TimeCodes[TrackID].String=TC.ToString();
-
- if (!FrameRate)
- {
- //Time code frame rate is missing, using the video frame rate
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- if (Streams[Pos].FrameRate_Code!=(int32u)-1)
- {
- FrameRate=Gxf_FrameRate(Streams[Pos].FrameRate_Code);
- break;
- }
- }
- if (FrameRate)
- float64_int64s(Fields*1000/(FrameRate*2));
- }
- }
- }
- Element_End0();
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Padding");
-
- //Filling missing frame rates for PCM
- for (size_t TrackID=0; TrackID<Streams.size(); TrackID++)
- {
- if (Gxf_FrameRate(Streams[TrackID].FrameRate_Code)==0)
- {
- Streams[TrackID].FrameRate_Code=Stream_Video_FrameRate_Code;
- Streams[TrackID].FieldsPerFrame_Code=Stream_Video_FieldsPerFrame_Code;
- }
- if (Material_Fields_First_IsValid && Gxf_MediaTypes_StreamKind(Streams[TrackID].MediaType)==Stream_Audio) //In case of offset, MediaFieldNumber-Material_Fields_First is not well rounded
- {
- float64 Temp=((float64)Material_Fields_First/Streams[TrackID].FieldsPerFrame_Code)/Gxf_FrameRate(Streams[TrackID].FrameRate_Code);
- Temp*=48000; //TODO: find where this piece of info is available
- Temp/=32768;
- Temp-=(int64u)(Temp);
- if (Temp)
- {
- Temp=((float64)32768)/48000*(1-Temp); //Duration of the first frame not counted
- Streams[TrackID].FirstFrameDuration=float64_int64s(Temp*1000000000);
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Gxf::media()
-{
- Element_Name("media");
-
- //Parsing
- int32u MediaFieldNumber;
- int8u MediaType;
- Element_Begin1("Preamble");
- Get_B1 (MediaType, "Media type");
- Get_B1 (TrackNumber, "Track number");
- Get_B4 (MediaFieldNumber, "Media field number");
- Skip_B1( "Field information");
- Skip_B1( "Field information");
- Skip_B1( "Field information");
- Skip_B1( "Field information");
- Skip_B4( "Time line field number");
- Skip_B1( "Flags");
- Skip_B1( "Reserved");
- TrackNumber&=0x3F;
- Element_End0();
- Element_Info1(TrackNumber);
-
- //Managing audio 32768-sample DTS synchro
- if (Gxf_MediaTypes_StreamKind(MediaType)==Stream_Audio && MediaFieldNumber==Material_Fields_First && Gxf_FrameRate(Streams[TrackNumber].FrameRate_Code) && Streams[TrackNumber].FirstFrameDuration)
- {
- float64 Temp=((float64)MediaFieldNumber/Material_Fields_FieldsPerFrame)/Gxf_FrameRate(Streams[TrackNumber].FrameRate_Code);
- Temp*=48000; //TODO: find where this piece of info is available
- Temp/=32768;
- Temp-=(int64u)(Temp);
- Temp*=(Element_Size-Element_Offset);
- int64u ByteOffset=(int64u)Temp;
- int64u SampleSize=(Element_Size-Element_Offset)/32768;
- ByteOffset/=SampleSize; //Need to be in sync with sample size
- ByteOffset*=SampleSize;
- Element_Offset+=ByteOffset;
- }
-
- #if MEDIAINFO_SEEK
- if (!IFrame_IsParsed)
- {
- if (UMF_File && ((File_Umf*)UMF_File)->GopSize!=(int64u)-1)
- IFrame_IsParsed=(((MediaFieldNumber-(Material_Fields_First_IsValid?Material_Fields_First:0))/Material_Fields_FieldsPerFrame)%((File_Umf*)UMF_File)->GopSize)==0;
- else if (Gxf_MediaTypes_StreamKind(Streams[TrackNumber].MediaType)==Stream_Video)
- IFrame_IsParsed=true;
- }
- #endif //MEDIAINFO_SEEK
-
- #if MEDIAINFO_DEMUX
- if (Streams[TrackNumber].MediaType!=8) //Not a TimeCode stream
- {
- Element_Code=TrackNumber;
- int64u TimeCode_First=0;
- if (!TimeCodes.empty())
- {
- TimeCode_First=((File_Gxf_TimeCode*)Streams[TimeCodes.begin()->first].Parsers[0])->TimeCode_FirstFrame_ms;
- if (TimeCode_First==(int64u)-1)
- TimeCode_First=TimeCodes.begin()->second.Milliseconds;
- }
- if (TimeCode_First!=(int64u)-1)
- TimeCode_First*=1000000;
- if (Gxf_MediaTypes_StreamKind(Streams[TrackNumber].MediaType)==Stream_Video)
- {
- if (Gxf_FrameRate(Streams[TrackNumber].FrameRate_Code))
- {
- FrameInfo.DTS=TimeCode_First+float64_int64s(((float64)MediaFieldNumber-(Material_Fields_First_IsValid?Material_Fields_First:0))/Material_Fields_FieldsPerFrame*1000000000/Gxf_FrameRate(Streams[TrackNumber].FrameRate_Code));
- FrameInfo.PTS=(int64u)-1;
- FrameInfo.DUR=float64_int64s(((float64)1000000000)/Gxf_FrameRate(Streams[TrackNumber].FrameRate_Code));
- }
- else
- FrameInfo.DTS=FrameInfo.PTS=FrameInfo.DUR=(int64u)-1;
- if (MediaFieldNumber-(Material_Fields_First_IsValid?Material_Fields_First:0)==0)
- Demux_random_access=true;
- else
- {
- if (UMF_File && ((File_Umf*)UMF_File)->GopSize!=(int64u)-1)
- Demux_random_access=(((MediaFieldNumber-(Material_Fields_First_IsValid?Material_Fields_First:0))/Material_Fields_FieldsPerFrame)%((File_Umf*)UMF_File)->GopSize)==0;
- else
- Demux_random_access=false;
- }
- }
- else if (Gxf_MediaTypes_StreamKind(Streams[TrackNumber].MediaType)==Stream_Audio)
- {
- if (Gxf_FrameRate(Streams[TrackNumber].FrameRate_Code))
- {
- Frame_Count_NotParsedIncluded=(int64u)((MediaFieldNumber-(Material_Fields_First_IsValid?Material_Fields_First:0))/Gxf_FrameRate(Streams[TrackNumber].FrameRate_Code)*48000/32768/Material_Fields_FieldsPerFrame); //A block is 32768 samples at 48 KHz
- FrameInfo.PTS=TimeCode_First+Frame_Count_NotParsedIncluded*1000000000*32768/48000; //A block is 32768 samples at 48 KHz
- if (Material_Fields_First_IsValid && MediaFieldNumber!=Material_Fields_First && Streams[TrackNumber].FirstFrameDuration) //In case of offset, MediaFieldNumber-Material_Fields_First is not well rounded
- {
- FrameInfo.PTS+=Streams[TrackNumber].FirstFrameDuration;
- Frame_Count_NotParsedIncluded++;
- }
- FrameInfo.DTS=FrameInfo.PTS;
- }
- else
- FrameInfo.DTS=FrameInfo.PTS=(int64u)-1;
- FrameInfo.DUR=float64_int64s(((float64)1000000000)*32768/48000);
- Demux_random_access=true;
- }
- else
- {
- if (Gxf_FrameRate(Streams[0x00].FrameRate_Code))
- FrameInfo.DTS=FrameInfo.PTS=TimeCode_First+float64_int64s(((float64)(MediaFieldNumber-(Material_Fields_First_IsValid?Material_Fields_First:0)))*1000000000/Gxf_FrameRate(Streams[0x00].FrameRate_Code)/Material_Fields_FieldsPerFrame);
- else
- FrameInfo.DTS=FrameInfo.PTS=(int64u)-1;
- FrameInfo.DUR=(int64u)-1;
- Demux_random_access=true;
- }
- #if MEDIAINFO_SEEK
- if (Gxf_MediaTypes_StreamKind(Streams[TrackNumber].MediaType)!=Stream_Video || IFrame_IsParsed)
- #endif //MEDIAINFO_SEEK
- {
- if (Gxf_MediaTypes_StreamKind(Streams[TrackNumber].MediaType)!=Stream_Audio)
- Frame_Count_NotParsedIncluded=(MediaFieldNumber-(Material_Fields_First_IsValid?Material_Fields_First:0))/Material_Fields_FieldsPerFrame;
- Demux_Level=(!Streams[TrackNumber].Parsers.empty() && (Streams[TrackNumber].Parsers[0]->Demux_UnpacketizeContainer || Streams[TrackNumber].Parsers[0]->Demux_Level==2))?4:2; //Intermediate (D-10 Audio) / Container
- Demux(Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset), ContentType_MainStream);
- }
- Element_Code=0xBF; //media
- }
- #endif //MEDIAINFO_DEMUX
-
- //Needed?
- if (!Streams[TrackNumber].Searching_Payload && IsParsingMiddle_MaxOffset==(int64u)-1)
- {
- Skip_XX(Element_Size-Element_Offset, "data");
- //Element_DoNotShow();
- return;
- }
-
- for (size_t Pos=0; Pos<Streams[TrackNumber].Parsers.size(); Pos++)
- {
- Streams[TrackNumber].Parsers[Pos]->FrameInfo.DTS=FrameInfo.DTS;
- Open_Buffer_Continue(Streams[TrackNumber].Parsers[Pos], Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset));
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent && Config->Demux_Unpacketize_Get())
- Streams[TrackNumber].Demux_EventWasSent=true;
- #endif //MEDIAINFO_DEMUX
-
- //Multiple parsers
- if (Streams[TrackNumber].Parsers.size()>1)
- {
- if (!Streams[TrackNumber].Parsers[Pos]->Status[IsAccepted] && Streams[TrackNumber].Parsers[Pos]->Status[IsFinished])
- {
- delete *(Streams[TrackNumber].Parsers.begin()+Pos);
- Streams[TrackNumber].Parsers.erase(Streams[TrackNumber].Parsers.begin()+Pos);
- Pos--;
- }
- else if (Streams[TrackNumber].Parsers.size()>1 && Streams[TrackNumber].Parsers[Pos]->Status[IsAccepted])
- {
- File__Analyze* Parser=Streams[TrackNumber].Parsers[Pos];
- for (size_t Pos2=0; Pos2<Streams[TrackNumber].Parsers.size(); Pos2++)
- {
- if (Pos2!=Pos)
- delete *(Streams[TrackNumber].Parsers.begin()+Pos2);
- }
- Streams[TrackNumber].Parsers.clear();
- Streams[TrackNumber].Parsers.push_back(Parser);
- }
- }
- }
-
- Element_Offset=Element_Size;
-
- if (IsParsingMiddle_MaxOffset!=(int64u)-1 && Config->ParseSpeed<1 && Streams[TrackNumber].Parsers.size()==1 && Streams[TrackNumber].Parsers[0]->Status[IsFilled])
- {
- Streams[TrackNumber].Searching_Payload=false;
-
- if (Parsers_Count>0)
- Parsers_Count--;
- if (Parsers_Count==0)
- {
- TryToFinish();
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Gxf::end_of_stream()
-{
- Element_Name("end of stream");
-}
-
-//---------------------------------------------------------------------------
-void File_Gxf::field_locator_table()
-{
- Element_Name("field locator table");
-
- //Parsing
- int32u Entries;
- #if MEDIAINFO_SEEK
- Get_L4 (Flt_FieldPerEntry, "Number of fields per FLT entry");
- #else //MEDIAINFO_SEEK
- Skip_L4( "Number of fields per FLT entry");
- #endif //MEDIAINFO_SEEK
- Get_L4 (Entries, "Number of FLT entries");
- for (size_t Pos=0; Pos<Entries; Pos++)
- {
- #if MEDIAINFO_SEEK
- int32u Offset;
- Get_L4 (Offset, "Offset to fields");
- Flt_Offsets.push_back(Offset);
- #else //MEDIAINFO_SEEK
- Skip_L4( "Offset to fields");
- #endif //MEDIAINFO_SEEK
- if (Element_Offset==Element_Size)
- break;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Gxf::UMF_file()
-{
- Element_Name("UMF file");
-
- //Parsing
- int32u PayloadDataLength;
- Element_Begin1("Preamble");
- Skip_B1( "First/last packet flag");
- Get_B4 (PayloadDataLength, "Payload data length");
- Element_End0();
-
- if (UMF_File==NULL)
- {
- UMF_File=new File_Umf();
- Open_Buffer_Init(UMF_File);
- }
- Open_Buffer_Continue(UMF_File, Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset));
-
- #if MEDIAINFO_SEEK
- if (Seeks.empty() && Flt_FieldPerEntry!=(int32u)-1 && ((File_Umf*)UMF_File)->GopSize!=(int64u)-1)
- {
- size_t NextIFrame=0;
- for (size_t Pos=0; Pos<Flt_Offsets.size(); Pos++)
- if (Pos*Flt_FieldPerEntry>=NextIFrame)
- {
- seek Seek;
- Seek.FrameNumber=(Material_Fields_First_IsValid?Material_Fields_First:0)+Pos*Flt_FieldPerEntry;
- Seek.StreamOffset=Flt_Offsets[Pos];
- Seeks.push_back(Seek);
- NextIFrame+=(size_t)((File_Umf*)UMF_File)->GopSize*Material_Fields_FieldsPerFrame;
- }
- Flt_Offsets.clear();
- }
- #endif //MEDIAINFO_SEEK
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Gxf::Detect_EOF()
-{
- if (File_Offset+Buffer_Size>=SizeToAnalyze)
- {
- TryToFinish();
- }
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_Gxf::ChooseParser_ChannelGrouping(int8u TrackID)
-{
- File_ChannelGrouping* Parser;
- if (Audio_Count%2)
- {
- if (!Streams[TrackID-1].IsChannelGrouping)
- return NULL; //Not a channel grouping
-
- Parser=new File_ChannelGrouping;
- Parser->CanBePcm=true;
- Parser->Channel_Pos=1;
- Parser->Common=((File_ChannelGrouping*)Streams[TrackID-1].Parsers[0])->Common;
- Parser->StreamID=TrackID-1;
- Streams[TrackID].IsChannelGrouping=true;
- }
- else
- {
- Parser=new File_ChannelGrouping;
- Parser->CanBePcm=true;
- Parser->Channel_Pos=0;
- //if (Descriptor->second.Infos.find("SamplingRate")!=Descriptor->second.Infos.end())
- Streams[TrackID].IsChannelGrouping=true;
- Streams[TrackID].DisplayInfo=false;
- }
- Parser->BitDepth=24;
- Parser->Channel_Total=2;
- Parser->SamplingRate=48000; //TODO: find where this piece of info is avaialble
- Parser->Endianness='L';
-
- #if MEDIAINFO_DEMUX
- if (Demux_UnpacketizeContainer)
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
-
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-void File_Gxf::TryToFinish()
-{
- if (!IsSub && File_Size!=(int64u)-1 && Config->ParseSpeed<1 && IsParsingMiddle_MaxOffset==(int64u)-1 && File_Size/2>SizeToAnalyze*4)
- {
- IsParsingMiddle_MaxOffset=File_Size/2+SizeToAnalyze*4;
- GoTo(File_Size/2);
- Open_Buffer_Unsynch();
- Parsers_Count=(int8u)-1;
- return;
- }
-
- Finish();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_GXF_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf.h
deleted file mode 100644
index 3f71cbbf6..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about GXF files
-// SMPTE 360M - General Exchange Format
-// SMPTE RDD 14-2007 - General Exchange Format-2
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_GxfH
-#define MediaInfo_File_GxfH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#if defined(MEDIAINFO_ANCILLARY_YES)
- #include <MediaInfo/Multiple/File_Ancillary.h>
-#endif //defined(MEDIAINFO_ANCILLARY_YES)
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Gxf
-//***************************************************************************
-
-class File_Gxf : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Gxf();
- ~File_Gxf();
-
-private :
- //Streams management
- void Streams_Finish();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
- void Read_Buffer_AfterParsing();
-
- //Buffer - Per element
- bool Header_Begin();
- void Header_Parse();
- void Data_Parse();
-
- //Packets
- void map();
- void media();
- void end_of_stream();
- void field_locator_table();
- void UMF_file();
-
- //Temp - Global
- #if defined(MEDIAINFO_ANCILLARY_YES)
- File_Ancillary* Ancillary;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
- int32u Material_Fields_First;
- int32u Material_Fields_Last;
- int32u Material_File_Size;
- int32u Material_Fields_FieldsPerFrame;
- int8u Parsers_Count;
- int8u AncillaryData_StreamID;
- struct tc
- {
- int64u Milliseconds;
- string String;
-
- tc()
- {
- Milliseconds=(int64u)-1;
- }
- };
- std::map<int8u, tc> TimeCodes; //Key is StreamID
- bool Material_Fields_First_IsValid;
- bool Material_Fields_Last_IsValid;
- bool Material_File_Size_IsValid;
-
- //Temp - Stream
- struct stream
- {
- std::vector<File__Analyze*> Parsers;
- int64u FirstFrameDuration; //In case of audio, indicates the duration of the first frame
- stream_t StreamKind;
- size_t StreamPos;
- int32u TimeStamp_Start;
- int32u TimeStamp_End;
- int32u FrameRate_Code;
- int32u LinesPerFrame_Code;
- int32u FieldsPerFrame_Code;
- int8u MediaType;
- int8u TrackID;
- bool Searching_Payload;
- bool Searching_TimeStamp_Start;
- bool Searching_TimeStamp_End;
- bool IsChannelGrouping;
- bool DisplayInfo; //In case of channel grouping, info is about the complete (2*half) stream, so second stream info must not be used
- Ztring MediaName;
- std::map<std::string, Ztring> Infos;
- #if MEDIAINFO_DEMUX
- bool Demux_EventWasSent;
- #endif //MEDIAINFO_DEMUX
-
- stream()
- {
- FirstFrameDuration=0;
- StreamKind=Stream_Max;
- StreamPos=(size_t)-1;
- TimeStamp_Start = (int32u)-1;
- TimeStamp_End = (int32u)-1;
- Searching_Payload = false;
- Searching_TimeStamp_Start=false;
- Searching_TimeStamp_End=false;
- FrameRate_Code=(int32u)-1;
- LinesPerFrame_Code=(int32u)-1;
- FieldsPerFrame_Code=(int32u)-1;
- MediaType=(int8u)-1;
- TrackID=(int8u)-1;
- IsChannelGrouping=false;
- DisplayInfo=true;
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent=false;
- #endif //MEDIAINFO_DEMUX
- }
- ~stream()
- {
- for (size_t Pos=0; Pos<Parsers.size(); Pos++)
- delete Parsers[Pos];
- }
- };
- std::vector<stream> Streams;
- File__Analyze* UMF_File;
- int64u SizeToAnalyze; //Total size of a chunk to analyse, it may be changed by the parser
- int64u IsParsingMiddle_MaxOffset;
- int8u Audio_Count;
- int8u TrackNumber;
-
- //File__Analyze helpers
- void Streams_Finish_PerStream(size_t StreamID, stream &Temp);
- void Detect_EOF();
- File__Analyze* ChooseParser_ChannelGrouping(int8u TrackID);
- void TryToFinish();
-
- #if MEDIAINFO_DEMUX
- bool Demux_HeaderParsed;
- #endif //MEDIAINFO_DEMUX
-
- #if MEDIAINFO_SEEK
- int32u Flt_FieldPerEntry;
- std::vector<int32u> Flt_Offsets; //In 1024-byte
- struct seek
- {
- int64u FrameNumber;
- int32u StreamOffset; //In 1024-byte
- };
- std::vector<seek> Seeks;
- bool IFrame_IsParsed;
- #endif //MEDIAINFO_SEEK
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf_TimeCode.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf_TimeCode.cpp
deleted file mode 100644
index cd1a7b40d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf_TimeCode.cpp
+++ /dev/null
@@ -1,353 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_TIMECODE_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Gxf_TimeCode.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_GXF_YES)
- extern double Gxf_FrameRate(int32u Content);
-#else //defined(MEDIAINFO_GXF_YES)
- double Gxf_FrameRate(int32u Content) //TODO: remove any relationship with GXF
- {
- switch (Content)
- {
- case 1 : return 60.000;
- case 2 : return 59.940;
- case 3 : return 50.000;
- case 4 : return 30.000;
- case 5 : return 29.970;
- case 6 : return 25.000;
- case 7 : return 24.000;
- case 8 : return 23.976;
- default: return 0.000;
- }
- }
-#endif //defined(MEDIAINFO_GXF_YES)
-
-//---------------------------------------------------------------------------
-const char* Atc_PayloadType (int8u PayloadType)
-{
- switch (PayloadType)
- {
- case 0 : return "ATC_LTC";
- case 1 : return "ATC_VITC1";
- case 2 : return "ATC_VITC2";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Gxf_TimeCode::File_Gxf_TimeCode()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("Time code");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Gxf;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- #endif //MEDIAINFO_DEMUX
-
- //In
- FrameRate_Code=(int32u)-1;
- FieldsPerFrame_Code=(int32u)-1;
- IsAtc=false;
-
- //Out
- TimeCode_FirstFrame_ms=(int64u)-1;
-}
-
-//---------------------------------------------------------------------------
-File_Gxf_TimeCode::~File_Gxf_TimeCode()
-{
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Gxf_TimeCode::Streams_Fill()
-{
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Delay, TimeCode_FirstFrame_ms);
- if (TimeCode_FirstFrame.size()==11)
- Fill(Stream_Video, StreamPos_Last, Video_Delay_DropFrame, TimeCode_FirstFrame[8]==';'?"Yes":"No");
- Fill(Stream_Video, 0, Video_Delay_Source, "Container");
- Fill(Stream_Video, 0, Video_TimeCode_FirstFrame, TimeCode_FirstFrame.c_str());
- //Fill(Stream_Video, 0, Video_TimeCode_Source, "Time code track");
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Delay, TimeCode_FirstFrame_ms);
- if (TimeCode_FirstFrame.size()==11)
- Fill(Stream_Audio, StreamPos_Last, Audio_Delay_DropFrame, TimeCode_FirstFrame[8]==';'?"Yes":"No");
- Fill(Stream_Audio, 0, Audio_Delay_Source, "Container");
- Fill(Stream_Audio, 0, Video_TimeCode_FirstFrame, TimeCode_FirstFrame.c_str());
- //Fill(Stream_Audio, 0, Video_TimeCode_Source, "Time code track");
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Gxf_TimeCode::Read_Buffer_Continue()
-{
- int8u Validity[504];
-
- if (!IsAtc)
- {
- if (Element_Size!=4096)
- {
- Skip_XX(Element_Size, "Data");
- return;
- }
-
- //Reading bitmap first (validity of first byte is at the end)
- Element_Offset=504*8;
- Element_Begin1("Validity");
- BS_Begin_LE(); //is Little Endian
- for (size_t Pos=0; Pos<504; Pos++)
- {
- bool Validity_Bit;
- Get_TB (Validity_Bit, "Bit");
- Validity[Pos]=Validity_Bit?1:0;
- }
- BS_End_LE();
- Skip_B1( "Pad");
- Element_End0();
- }
-
- //Parsing
- Element_Offset=0;
- for (size_t Pos=0; Pos<(IsAtc?(size_t)1:(size_t)504); Pos++)
- {
- if (IsAtc || Validity[Pos])
- {
- Element_Begin1("TimeCode");
- int8u Frames_Units, Frames_Tens, Seconds_Units, Seconds_Tens, Minutes_Units, Minutes_Tens, Hours_Units, Hours_Tens;
- bool DropFrame;
- int8u DBB1=0, DBB2=0;
- if (IsAtc)
- {
- bool Temp;
- BS_Begin();
-
- Get_S1 (4, Frames_Units, "Frames (Units)");
- Get_SB ( Temp, "DBB1_0"); if (Temp) DBB1|=(1<<0);
- Skip_S1(3, "Zero");
-
- Skip_S1(4, "BG1");
- Get_SB ( Temp, "DBB1_1"); if (Temp) DBB1|=(1<<1);
- Skip_S1(3, "Zero");
-
- Skip_SB( "CF - Color fame");
- Get_SB ( DropFrame, "DP - Drop frame");
- Get_S1 (2, Frames_Tens, "Frames (Tens)");
- Get_SB ( Temp, "DBB1_2"); if (Temp) DBB1|=(1<<2);
- Skip_S1(3, "Zero");
-
- Skip_S1(4, "BG2");
- Get_SB ( Temp, "DBB1_3"); if (Temp) DBB1|=(1<<3);
- Skip_S1(3, "Zero");
-
- Get_S1 (4, Seconds_Units, "Seconds (Units)");
- Get_SB ( Temp, "DBB1_4"); if (Temp) DBB1|=(1<<4);
- Skip_S1(3, "Zero");
-
- Skip_S1(4, "BG3");
- Get_SB ( Temp, "DBB1_5"); if (Temp) DBB1|=(1<<5);
- Skip_S1(3, "Zero");
-
- Skip_SB( "FM - Frame Mark");
- Get_S1 (3, Seconds_Tens, "Seconds (Tens)");
- Get_SB ( Temp, "DBB1_6"); if (Temp) DBB1|=(1<<6);
- Skip_S1(3, "Zero");
-
- Skip_S1(4, "BG4");
- Get_SB ( Temp, "DBB1_7"); if (Temp) DBB1|=(1<<7);
- Skip_S1(3, "Zero");
-
- Get_S1 (4, Minutes_Units, "Minutes (Units)");
- Get_SB ( Temp, "DBB2_0"); if (Temp) DBB2|=(1<<0);
- Skip_S1(3, "Zero");
-
- Skip_S1(4, "BG5");
- Get_SB ( Temp, "DBB2_1"); if (Temp) DBB2|=(1<<1);
- Skip_S1(3, "Zero");
-
- Skip_SB( "BGF0");
- Get_S1 (3, Minutes_Tens, "Minutes (Tens)");
- Get_SB ( Temp, "DBB2_2"); if (Temp) DBB2|=(1<<2);
- Skip_S1(3, "Zero");
-
- Skip_S1(4, "BG6");
- Get_SB ( Temp, "DBB2_3"); if (Temp) DBB2|=(1<<3);
- Skip_S1(3, "Zero");
-
- Get_S1 (4, Hours_Units, "Hours (Units)");
- Get_SB ( Temp, "DBB2_4"); if (Temp) DBB2|=(1<<4);
- Skip_S1(3, "Zero");
-
- Skip_S1(4, "BG7");
- Get_SB ( Temp, "DBB2_5"); if (Temp) DBB2|=(1<<5);
- Skip_S1(3, "Zero");
-
- Skip_SB( "BGF2");
- Skip_SB( "BGF1");
- Get_S1 (2, Hours_Tens, "Hours (Tens)");
- Get_SB ( Temp, "DBB2_6"); if (Temp) DBB2|=(1<<6);
- Skip_S1(3, "Zero");
-
- Skip_S1(4, "BG8");
- Get_SB ( Temp, "DBB2_7"); if (Temp) DBB2|=(1<<7);
- Skip_S1(3, "Zero");
-
- BS_End();
- }
- else
- {
- BS_Begin();
-
- Skip_S1(4, "BG1");
- Get_S1 (4, Frames_Units, "Frames (Units)");
-
- Skip_S1(4, "BG2");
- Skip_SB( "CF - Color fame");
- Get_SB ( DropFrame, "DP - Drop frame");
- Get_S1 (2, Frames_Tens, "Frames (Tens)");
-
- Skip_S1(4, "BG3");
- Get_S1 (4, Seconds_Units, "Seconds (Units)");
-
- Skip_S1(4, "BG4");
- Skip_SB( "FM - Frame Mark");
- Get_S1 (3, Seconds_Tens, "Seconds (Tens)");
-
- Skip_S1(4, "BG5");
- Get_S1 (4, Minutes_Units, "Minutes (Units)");
-
- Skip_S1(4, "BG6");
- Skip_SB( "BGF0");
- Get_S1 (3, Minutes_Tens, "Minutes (Tens)");
-
- Skip_S1(4, "BG7");
- Get_S1 (4, Hours_Units, "Hours (Units)");
-
- Skip_S1(4, "BG8");
- Skip_SB( "BGF2");
- Skip_SB( "BGF1");
- Get_S1 (2, Hours_Tens, "Hours (Tens)");
-
- BS_End();
- }
-
- int64u TimeCode_Ms=(int64u)(Hours_Tens *10*60*60*1000
- + Hours_Units *60*60*1000
- + Minutes_Tens *10*60*1000
- + Minutes_Units *60*1000
- + Seconds_Tens *10*1000
- + Seconds_Units *1000
- + (Gxf_FrameRate(FrameRate_Code)==0?0:((Frames_Tens*10+Frames_Units)*1000/float64_int32s(Gxf_FrameRate(FrameRate_Code)/(Gxf_FrameRate(FrameRate_Code)>30?2:1)))));
-
- if (TimeCode_FirstFrame.empty())
- {
- TimeCode_FirstFrame+=('0'+Hours_Tens);
- TimeCode_FirstFrame+=('0'+Hours_Units);
- TimeCode_FirstFrame+=':';
- TimeCode_FirstFrame+=('0'+Minutes_Tens);
- TimeCode_FirstFrame+=('0'+Minutes_Units);
- TimeCode_FirstFrame+=':';
- TimeCode_FirstFrame+=('0'+Seconds_Tens);
- TimeCode_FirstFrame+=('0'+Seconds_Units);
- TimeCode_FirstFrame+=DropFrame?';':':';
- TimeCode_FirstFrame+=('0'+Frames_Tens);
- TimeCode_FirstFrame+=('0'+Frames_Units);
- }
-
- #if MEDIAINFO_TRACE
- string TimeCode;
- TimeCode+=('0'+Hours_Tens);
- TimeCode+=('0'+Hours_Units);
- TimeCode+=':';
- TimeCode+=('0'+Minutes_Tens);
- TimeCode+=('0'+Minutes_Units);
- TimeCode+=':';
- TimeCode+=('0'+Seconds_Tens);
- TimeCode+=('0'+Seconds_Units);
- TimeCode+=DropFrame?';':':';
- TimeCode+=('0'+Frames_Tens);
- TimeCode+=('0'+Frames_Units);
- Element_Info1(TimeCode.c_str());
- #endif //MEDIAINFO_TRACE
- if (IsAtc)
- {
- Settings=Atc_PayloadType(DBB1);
- Element_Info1(__T("PayloadType=")+Ztring().From_UTF8(Settings.c_str()));
- Element_Info1(__T("VitcLineSelect=")+Ztring::ToZtring(DBB2&0x1F));
- }
- Element_End0();
-
- FILLING_BEGIN();
- if (TimeCode_FirstFrame_ms==(int64u)-1)
- TimeCode_FirstFrame_ms=TimeCode_Ms;
- FILLING_END();
- }
- else
- Skip_XX(8, "Junk");
- }
-
- //bitmap, already parsed
- Element_Offset+=64;
-
- FILLING_BEGIN();
- if (!Status[IsFilled] && TimeCode_FirstFrame_ms!=(int64u)-1)
- {
- Accept();
- Fill();
-
- if (MediaInfoLib::Config.ParseSpeed_Get()<1)
- Finish();
- }
-
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_TIMECODE_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf_TimeCode.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf_TimeCode.h
deleted file mode 100644
index 6161e6c76..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Gxf_TimeCode.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about GXF files
-// SMPTE 360M - General Exchange Format
-// SMPTE RDD 14-2007 - General Exchange Format-2
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Gxf_TimeCodeH
-#define MediaInfo_File_Gxf_TimeCodeH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#if defined(MEDIAINFO_ANCILLARY_YES)
- #include <MediaInfo/Multiple/File_Ancillary.h>
-#endif //defined(MEDIAINFO_ANCILLARY_YES)
-#include "MediaInfo/TimeCode.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Gxf_TimeCode
-//***************************************************************************
-
-class File_Gxf_TimeCode : public File__Analyze
-{
-public :
- //In
- int32u FrameRate_Code;
- int32u FieldsPerFrame_Code;
- bool IsAtc; // SMPTE ST 12-2
-
- //Out
- int64u TimeCode_FirstFrame_ms;
- string TimeCode_FirstFrame;
- string Settings;
-
- //Constructor/Destructor
- File_Gxf_TimeCode();
- ~File_Gxf_TimeCode();
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_HdsF4m.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_HdsF4m.cpp
deleted file mode 100644
index 139738eeb..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_HdsF4m.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_HDSF4M_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_HdsF4m.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "ZenLib/FileName.h"
-#include "ZenLib/File.h"
-#include "tinyxml2.h"
-using namespace ZenLib;
-using namespace tinyxml2;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_HdsF4m::File_HdsF4m()
-:File__Analyze()
-{
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_HdsF4m;
- StreamIDs_Width[0]=16;
- #endif //MEDIAINFO_EVENTS
-
- //Temp
- ReferenceFiles=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_HdsF4m::~File_HdsF4m()
-{
- delete ReferenceFiles; //ReferenceFiles=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_HdsF4m::Streams_Finish()
-{
- if (ReferenceFiles==NULL)
- return;
-
- ReferenceFiles->ParseReferences();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_HdsF4m::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- if (ReferenceFiles==NULL)
- return 0;
-
- return ReferenceFiles->Seek(Method, Value, ID);
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_HdsF4m::FileHeader_Begin()
-{
- XMLDocument document;
- if (!FileHeader_Begin_XML(document))
- return false;
-
- {
- XMLElement* Root=document.FirstChildElement("manifest");
- if (Root)
- {
- const char* Attribute=Root->Attribute("xmlns");
- if (Attribute==NULL || Ztring().From_UTF8(Attribute)!=__T("http://ns.adobe.com/f4m/1.0"))
- {
- Reject("HdsF4m");
- return false;
- }
-
- Accept("HdsF4m");
- Fill(Stream_General, 0, General_Format, "HDS F4M");
- Config->File_ID_OnlyRoot_Set(false);
-
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
-
- //Parsing main elements
- Ztring BaseURL;
-
- for (XMLElement* Root_Item=Root->FirstChildElement(); Root_Item; Root_Item=Root_Item->NextSiblingElement())
- {
- //Common information
- if (string(Root_Item->Value())=="BaseURL")
- {
- if (BaseURL.empty()) //Using the first one
- BaseURL=Root_Item->GetText();
- }
-
- //Period
- if (string(Root_Item->Value())=="media")
- {
- sequence* Sequence=new sequence;
- const char* Attribute;
-
- //Attributes - mineType
- Attribute=Root_Item->Attribute("url");
- if (Attribute)
- Sequence->AddFileName(Ztring().From_UTF8(Attribute)+__T("Seg1.f4f"));
-
- Sequence->StreamID=ReferenceFiles->Sequences_Size()+1;
- ReferenceFiles->AddSequence(Sequence);
- }
- }
- }
- else
- {
- Reject("HdsF4m");
- return false;
- }
- }
-
- Element_Offset=File_Size;
-
- //All should be OK...
- return true;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_HDSF4M_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_HdsF4m.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_HdsF4m.h
deleted file mode 100644
index 6ea92049e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_HdsF4m.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about HDS (.f4m) files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_HdsF4mH
-#define MediaInfo_File_HdsF4mH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_HdsF4m
-//***************************************************************************
-
-class File_HdsF4m : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_HdsF4m();
- ~File_HdsF4m();
-
-private :
- //Streams management
- void Streams_Finish ();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Helpers
- void Representation();
-
- //Temp
- File__ReferenceFilesHelper* ReferenceFiles;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Hls.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Hls.cpp
deleted file mode 100644
index e6b3b99c0..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Hls.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_HLS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Hls.h"
-#include "MediaInfo/MediaInfo.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#include "ZenLib/File.h"
-#include "ZenLib/Dir.h"
-#include "ZenLib/FileName.h"
-#include "ZenLib/ZtringList.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Hls::File_Hls()
-:File__Analyze()
-{
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Hls;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent_Accept_Specific=true;
- #endif //MEDIAINFO_DEMUX
-
- //Temp
- ReferenceFiles=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_Hls::~File_Hls()
-{
- delete ReferenceFiles; //ReferenceFiles=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Hls::Streams_Finish()
-{
- if (ReferenceFiles==NULL)
- return;
-
- ReferenceFiles->ParseReferences();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_Hls::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- if (ReferenceFiles==NULL)
- return 0;
-
- return ReferenceFiles->Seek(Method, Value, ID);
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Hls::FileHeader_Begin()
-{
- //Element_Size
- if (File_Size>1024*1024 || File_Size<10)
- {
- Reject("HLS");
- return false; //HLS files are not big
- }
-
- if (Buffer_Size<File_Size)
- return false; //Wait for complete file
-
- Ztring Document; Document.From_UTF8((char*)Buffer, Buffer_Size);
- ZtringList Lines;
- size_t LinesSeparator_Pos=Document.find_first_of(__T("\r\n"));
- if (LinesSeparator_Pos>File_Size-1)
- {
- Reject("HLS");
- return false;
- }
- Ztring LinesSeparator;
- if (Document[LinesSeparator_Pos]==__T('\r') && LinesSeparator_Pos+1<Document.size() && Document[LinesSeparator_Pos+1]==__T('\n'))
- LinesSeparator=__T("\r\n");
- else if (Document[LinesSeparator_Pos]==__T('\r'))
- LinesSeparator=__T("\r");
- else if (Document[LinesSeparator_Pos]==__T('\n'))
- LinesSeparator=__T("\n");
- else
- {
- Reject("HLS");
- return false;
- }
- Lines.Separator_Set(0, LinesSeparator);
- Lines.Write(Document);
-
- if (Lines(0)!=__T("#EXTM3U"))
- {
- Reject("HLS");
- return false;
- }
-
- Accept("HLS");
- Fill(Stream_General, 0, General_Format, "HLS");
-
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
- if (!IsSub)
- ReferenceFiles->ContainerHasNoId=true;
-
- sequence* Sequence=new sequence;
-
- bool IsGroup=false;
- for (size_t Line=0; Line<Lines.size(); Line++)
- {
- if (!Lines[Line].empty())
- {
- if (Lines[Line].find(__T("#EXT-X-KEY:"))==0)
- {
- ZtringListList List;
- List.Separator_Set(0, __T(","));
- List.Separator_Set(1, __T("="));
- List.Write(Lines[Line].substr(11, string::npos));
- for (size_t Pos=0; Pos<List.size(); ++Pos)
- {
- if (List[Pos](0)==__T("METHOD"))
- {
- if (List[Pos](1).find(__T("AES-128"))==0)
- {
- Fill(Stream_General, 0, General_Encryption_Format, "AES");
- Fill(Stream_General, 0, General_Encryption_Length, "128");
- Fill(Stream_General, 0, General_Encryption_Method, "Segment");
- Fill(Stream_General, 0, General_Encryption_Mode, "CBC");
- Fill(Stream_General, 0, General_Encryption_Padding, "PKCS7");
- Fill(Stream_General, 0, General_Encryption_InitializationVector, "Sequence number");
-
- #if MEDIAINFO_AES
- //Trying to get the key from FileName.FileExt.key
- if (Config->Encryption_Key_Get().empty())
- {
- File KeyFile;
- if (KeyFile.Open(File_Name+__T(".key")))
- {
- if (KeyFile.Size_Get()==16)
- {
- int8u Key[16];
- if (KeyFile.Read(Key, 16)==16)
- Config->Encryption_Key_Set(Key, 16);
- }
- else
- Fill(Stream_General, 0, "Encryption_Key_Problem", KeyFile.Size_Get());
- }
- }
- #endif
- }
- Fill(Stream_General, 0, General_Encryption, List[Pos](1));
- }
- }
- }
- else if (Lines[Line].find(__T("#EXT-X-STREAM-INF:"))==0)
- {
- IsGroup=true;
- }
- else if (Lines[Line][0]==__T('#'))
- ;
- else
- {
- if (IsGroup)
- {
- Sequence->AddFileName(Lines[Line]);
- Sequence->StreamID=ReferenceFiles->Sequences_Size()+1;
- ReferenceFiles->AddSequence(Sequence);
- IsGroup=false;
- Sequence=new sequence();
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_HlsIndex;
- StreamIDs_Width[0]=sizeof(size_t);
- #endif //MEDIAINFO_EVENTS
- }
- else
- Sequence->AddFileName(Lines[Line]);
- }
- }
- }
-
- if (!Sequence->FileNames.empty())
- {
- ReferenceFiles->AddSequence(Sequence);
- Fill(Stream_General, 0, General_Format_Profile, "Media");
- }
- else
- {
- Fill(Stream_General, 0, General_Format_Profile, "Master");
- }
-
- Element_Offset=File_Size;
-
- //All should be OK...
- return true;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_HLS_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Hls.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Hls.h
deleted file mode 100644
index da8d1347a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Hls.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about HLS files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_HlsH
-#define MediaInfo_File_HlsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_Hls
-//***************************************************************************
-
-class File_Hls : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Hls();
- ~File_Hls();
-
-private :
- //Streams management
- void Streams_Finish ();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Temp
- File__ReferenceFilesHelper* ReferenceFiles;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi.cpp
deleted file mode 100644
index a267125d7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi.cpp
+++ /dev/null
@@ -1,946 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_IBI
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Ibi.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include <zlib.h>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Ibi::File_Ibi()
-:File__Analyze()
-{
- //Configuration
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- #endif //MEDIAINFO_DEMUX
- DataMustAlwaysBeComplete=false;
-
- #if MEDIAINFO_IBIUSAGE
- //In
- Ibi=NULL;
-
- //Temp
- Ibi_MustDelete=false;
- #endif //MEDIAINFO_IBIUSAGE
-}
-
-//---------------------------------------------------------------------------
-File_Ibi::~File_Ibi()
-{
- #if MEDIAINFO_IBIUSAGE
- if (Ibi_MustDelete)
- delete Ibi; //Ibi=NULL;
- #endif //MEDIAINFO_IBIUSAGE
-}
-
-//***************************************************************************
-// Get information
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_IBIUSAGE
-const Ztring &File_Ibi::Get (stream_t /*StreamKind*/, size_t /*StreamNumber*/, const Ztring &Parameter, info_t /*KindOfInfo*/, info_t /*KindOfSearch*/)
-{
- ibi::streams::iterator IbiStream_Temp=Ibi->Streams.begin(); //TODO: management of multiple streams
- if (IbiStream_Temp!=Ibi->Streams.end() && !IbiStream_Temp->second->Infos.empty())
- {
- int64u FrameNumber=Parameter.To_int64u();
-
- for (size_t Pos=0; Pos<IbiStream_Temp->second->Infos.size()-1; Pos++)
- if (IbiStream_Temp->second->Infos[Pos].FrameNumber==FrameNumber || IbiStream_Temp->second->Infos[Pos+1].FrameNumber>FrameNumber)
- {
- Get_Temp=__T("StreamOffset=")+Ztring::ToZtring(IbiStream_Temp->second->Infos[Pos].StreamOffset)
- + __T(" / FrameNumber=")+Ztring::ToZtring(IbiStream_Temp->second->Infos[Pos].FrameNumber)
- + __T(" / Dts=")+Ztring::ToZtring(IbiStream_Temp->second->Infos[Pos].Dts);
- return Get_Temp;
- }
- }
-
- //Can not be found
- Get_Temp.clear();
- return Get_Temp;
-}
-#endif //MEDIAINFO_IBIUSAGE
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ibi::Streams_Accept()
-{
- Fill(Stream_General, 0, General_Format, "Ibi");
-
- #if MEDIAINFO_IBIUSAGE
- if (Ibi==NULL)
- {
- Ibi=new ibi();
- Ibi_MustDelete=true;
- }
- #endif //MEDIAINFO_IBIUSAGE
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_IBIUSAGE
-void File_Ibi::Streams_Finish()
-{
- Config->File_KeepInfo_Set(true); //In order to let Get() available
-
- if (Count_Get(Stream_Video)==0) //If not yet done by Inform part
- for (ibi::streams::iterator IbiStream_Temp=Ibi->Streams.begin(); IbiStream_Temp!=Ibi->Streams.end(); ++IbiStream_Temp)
- {
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, StreamPos_Last, General_ID, IbiStream_Temp->first);
- }
-}
-#endif //MEDIAINFO_IBIUSAGE
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ibi::Header_Parse()
-{
- //Test of zero padding
- int8u Null;
- Peek_B1(Null);
- if (Null==0x00)
- {
- if (Buffer_Offset_Temp==0)
- Buffer_Offset_Temp=Buffer_Offset+1;
-
- while (Buffer_Offset_Temp<Buffer_Size)
- {
- if (Buffer[Buffer_Offset_Temp])
- break;
- Buffer_Offset_Temp++;
- }
- if (Buffer_Offset_Temp>=Buffer_Size)
- {
- Element_WaitForMoreData();
- return;
- }
-
- Header_Fill_Code((int32u)-1); //Should be (int64u)-1 but Borland C++ does not like this
- Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
- Buffer_Offset_Temp=0;
-
- return;
- }
-
- //Parsing
- int64u Name, Size;
- Get_EB (Name, "Name");
- Get_EB (Size, "Size");
-
- //Filling
- Header_Fill_Code(Name, Ztring().From_Number(Name, 16));
- Header_Fill_Size(Element_Offset+Size);
-}
-
-//---------------------------------------------------------------------------
-namespace Elements
-{
- //Common
- const int64u Zero=(int32u)-1; //Should be (int64u)-1 but Borland C++ does not like this
- const int64u CRC32=0x3F;
- const int64u Void=0x6C;
-
- //EBML
- const int64u Ebml=0xA45DFA3;
- const int64u Ebml_Version=0x286;
- const int64u Ebml_ReadVersion=0x2F7;
- const int64u Ebml_MaxIDLength=0x2F2;
- const int64u Ebml_MaxSizeLength=0x2F3;
- const int64u Ebml_DocType=0x282;
- const int64u Ebml_DocTypeVersion=0x287;
- const int64u Ebml_DocTypeReadVersion=0x285;
-
- //Segment
- const int64u Stream=1;
- const int64u Stream_Header=1;
- const int64u Stream_ByteOffset=2;
- const int64u Stream_FrameNumber=3;
- const int64u Stream_Dts=4;
- const int64u CompressedIndex=2;
- const int64u WritingApplication=3;
- const int64u WritingApplication_Name=1;
- const int64u WritingApplication_Version=2;
- const int64u InformData=4;
- const int64u SourceInfo=5;
- const int64u SourceInfo_IndexCreationDate=1;
- const int64u SourceInfo_SourceModificationDate=2;
- const int64u SourceInfo_SourceSize=3;
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::Data_Parse()
-{
- #define LIS2(_ATOM, _NAME) \
- case Elements::_ATOM : \
- if (Level==Element_Level) \
- { \
- Element_Name(_NAME); \
- _ATOM(); \
- Element_ThisIsAList(); \
- } \
-
- #define ATO2(_ATOM, _NAME) \
- case Elements::_ATOM : \
- if (Level==Element_Level) \
- { \
- if (Element_IsComplete_Get()) \
- { \
- Element_Name(_NAME); \
- _ATOM(); \
- } \
- else \
- { \
- Element_WaitForMoreData(); \
- return; \
- } \
- } \
- break; \
-
- #define ATOM_END_MK \
- ATOM(Zero) \
- ATOM(CRC32) \
- ATOM(Void) \
- ATOM_END
-
- //Parsing
- DATA_BEGIN
- LIST(Ebml)
- ATOM_BEGIN
- ATOM(Ebml_Version)
- ATOM(Ebml_ReadVersion)
- ATOM(Ebml_MaxIDLength)
- ATOM(Ebml_MaxSizeLength)
- ATOM(Ebml_DocType)
- ATOM(Ebml_DocTypeVersion)
- ATOM(Ebml_DocTypeReadVersion)
- ATOM_END_MK
- LIST(Stream)
- ATOM_BEGIN
- ATOM(Stream_Header)
- ATOM(Stream_ByteOffset)
- ATOM(Stream_FrameNumber)
- ATOM(Stream_Dts)
- ATOM_END_MK
- ATOM(CompressedIndex)
- LIST(WritingApplication)
- ATOM_BEGIN
- ATOM(WritingApplication_Name)
- ATOM(WritingApplication_Version)
- ATOM_END_MK
- LIST(SourceInfo)
- ATOM_BEGIN
- ATOM(SourceInfo_IndexCreationDate)
- ATOM(SourceInfo_SourceModificationDate)
- ATOM(SourceInfo_SourceSize)
- ATOM_END_MK
- ATOM(InformData)
- DATA_END_DEFAULT
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ibi::Zero()
-{
- Element_Name("ZeroPadding");
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::CRC32()
-{
- Element_Name("CRC32");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::Void()
-{
- Element_Name("Void");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::Ebml()
-{
- Element_Name("Ebml");
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::Ebml_Version()
-{
- Element_Name("Version");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::Ebml_ReadVersion()
-{
- Element_Name("ReadVersion");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::Ebml_MaxIDLength()
-{
- Element_Name("MaxIDLength");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::Ebml_MaxSizeLength()
-{
- Element_Name("MaxSizeLength");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::Ebml_DocType()
-{
- Element_Name("DocType");
-
- //Parsing
- Ztring Data;
- Get_Local(Element_Size, Data, "Data"); Element_Info1(Data);
-
- //Filling
- FILLING_BEGIN();
-
- if (Data==__T("MediaInfo Index"))
- Accept("Ibi");
- else
- {
- Reject("Ibi");
- return;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::Ebml_DocTypeVersion()
-{
- Element_Name("DocTypeVersion");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::Ebml_DocTypeReadVersion()
-{
- Element_Name("DocTypeReadVersion");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::Stream()
-{
- Element_Name("Stream");
-
- ID_Current=(int64u)-1;
-}
-
-void File_Ibi::Stream_Header()
-{
- Element_Name("Stream Header");
- Get_EB (ID_Current, "ID");
-
- FILLING_BEGIN();
- #if MEDIAINFO_IBIUSAGE
- if (Ibi)
- {
- //Filling information for ID after data
- ibi::streams::iterator IbiStream_Temp=Ibi->Streams.find((int64u)-1);
- if (IbiStream_Temp!=Ibi->Streams.end())
- {
- Ibi->Streams[ID_Current]=IbiStream_Temp->second;
- Ibi->Streams.erase(IbiStream_Temp);
- }
- }
- #else //MEDIAINFO_IBIUSAGE
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, StreamPos_Last, General_ID, ID_Current);
- #endif //MEDIAINFO_IBIUSAGE
- FILLING_END();
-}
-
-void File_Ibi::Stream_ByteOffset()
-{
- Element_Name("Byte Offset");
-
- //Parsing
- #if MEDIAINFO_IBIUSAGE
- size_t Pos=0;
- #endif //MEDIAINFO_IBIUSAGE
- int64u Offset=0;
- while (Element_Offset<Element_Size)
- {
- int64u Item;
- Get_EB (Item, "Item");
- Offset+=Item;
- #if MEDIAINFO_IBIUSAGE
- Param_Info1(Pos);
- #endif //MEDIAINFO_IBIUSAGE
- Param_Info1(Ztring::ToZtring(Offset)+__T(" (0x")+Ztring::ToZtring(Offset, 16)+__T(')'));
-
- #if MEDIAINFO_IBIUSAGE
- FILLING_BEGIN();
- if (Ibi)
- {
- //Filling information for ID after data
- if (Ibi->Streams[ID_Current]==NULL)
- Ibi->Streams[ID_Current]=new ibi::stream();
- if (Pos>=Ibi->Streams[ID_Current]->Infos.size())
- {
- Ibi->Streams[ID_Current]->Infos.push_back(ibi::stream::info());
- Ibi->Streams[ID_Current]->Infos[Pos].IsContinuous=true; //default
- }
- Ibi->Streams[ID_Current]->Infos[Pos].StreamOffset=Offset;
- Pos++;
- }
- FILLING_END();
- #endif //MEDIAINFO_IBIUSAGE
- }
-}
-
-void File_Ibi::Stream_FrameNumber()
-{
- Element_Name("Frame Number");
-
- //Parsing
- #if MEDIAINFO_IBIUSAGE
- size_t Pos=0;
- #endif //MEDIAINFO_IBIUSAGE
- int64u Offset=0;
- while (Element_Offset<Element_Size)
- {
- int64u Item;
- Get_EB (Item, "Item");
- Offset+=Item;
- #if MEDIAINFO_IBIUSAGE
- Param_Info1(Pos);
- #endif //MEDIAINFO_IBIUSAGE
- Param_Info1(Ztring::ToZtring(Offset)+__T(" (0x")+Ztring::ToZtring(Offset, 16)+__T(')'));
-
- #if MEDIAINFO_IBIUSAGE
- FILLING_BEGIN();
- if (Ibi)
- {
- //Filling information for ID after data
- if (Ibi->Streams[ID_Current]==NULL)
- Ibi->Streams[ID_Current]=new ibi::stream();
- if (Pos>=Ibi->Streams[ID_Current]->Infos.size())
- {
- Ibi->Streams[ID_Current]->Infos.push_back(ibi::stream::info());
- Ibi->Streams[ID_Current]->Infos[Pos].IsContinuous=true; //default
- }
- Ibi->Streams[ID_Current]->Infos[Pos].FrameNumber=Offset;
- Pos++;
- }
- FILLING_END();
- #endif //MEDIAINFO_IBIUSAGE
- }
-}
-
-void File_Ibi::Stream_Dts()
-{
- Element_Name("DTS");
-
- //Parsing
- int64u Item;
- Get_EB (Item, "DtsFrequencyNumerator");
- #if MEDIAINFO_IBIUSAGE
- FILLING_BEGIN();
- if (Ibi)
- Ibi->Streams[ID_Current]->DtsFrequencyNumerator=Item;
- FILLING_END();
- #endif //MEDIAINFO_IBIUSAGE
- Get_EB (Item, "DtsFrequencyDenominator");
- #if MEDIAINFO_IBIUSAGE
- FILLING_BEGIN();
- if (Ibi)
- {
- Ibi->Streams[ID_Current]->DtsFrequencyDenominator=Item;
-
- //Handling of previous inverted Numerator/Denominator
- if (Ibi->Streams[ID_Current]->DtsFrequencyNumerator<Ibi->Streams[ID_Current]->DtsFrequencyDenominator)
- std::swap(Ibi->Streams[ID_Current]->DtsFrequencyNumerator, Ibi->Streams[ID_Current]->DtsFrequencyDenominator);
- }
- FILLING_END();
- #endif //MEDIAINFO_IBIUSAGE
-
- #if MEDIAINFO_IBIUSAGE
- size_t Pos=0;
- #endif //MEDIAINFO_IBIUSAGE
- int64u Offset=0;
- while (Element_Offset<Element_Size)
- {
- int64u Item;
- Get_EB (Item, "Item");
- Offset+=Item;
- #if MEDIAINFO_IBIUSAGE
- Param_Info1(Pos);
- #endif //MEDIAINFO_IBIUSAGE
- Param_Info1(Ztring::ToZtring(Offset)+__T(" (0x")+Ztring::ToZtring(Offset, 16)+__T(')'));
-
- #if MEDIAINFO_IBIUSAGE
- FILLING_BEGIN();
- if (Ibi)
- {
- //Filling information for ID after data
- if (Ibi->Streams[ID_Current]==NULL)
- Ibi->Streams[ID_Current]=new ibi::stream();
- if (Pos>=Ibi->Streams[ID_Current]->Infos.size())
- {
- Ibi->Streams[ID_Current]->Infos.push_back(ibi::stream::info());
- Ibi->Streams[ID_Current]->Infos[Pos].IsContinuous=true; //default
- }
- Ibi->Streams[ID_Current]->Infos[Pos].Dts=Offset;
- Pos++;
- }
- FILLING_END();
- #endif //MEDIAINFO_IBIUSAGE
- }
-}
-
-void File_Ibi::CompressedIndex()
-{
- if (!Status[IsAccepted])
- {
- Reject("Ibi");
- return;
- }
-
- Element_Name("Compressed Index");
- int64u UncompressedSize;
- Get_EB (UncompressedSize, "Uncompressed size");
-
- //Sizes
- unsigned long Source_Size=(unsigned long)(Element_Size-Element_Offset);
- unsigned long Dest_Size=(unsigned long)UncompressedSize;
-
- //Uncompressing
- int8u* Dest;
- try
- {
- Dest=new int8u[Dest_Size];
- }
- catch (...)
- {
- //Memory error
- Reject();
- return;
- }
- if (uncompress((Bytef*)Dest, &Dest_Size, (const Bytef*)Buffer+Buffer_Offset+(size_t)Element_Offset, Source_Size)<0)
- {
- Skip_XX(Element_Size-Element_Offset, "Problem during the decompression");
- delete[] Dest; //Dest=NULL;
- return;
- }
-
- //Exiting this element
- Skip_XX(Element_Size-Element_Offset, "Will be parsed");
-
- //Configuring buffer
- const int8u* Buffer_Sav=Buffer;
- size_t Buffer_Size_Sav=Buffer_Size;
- int8u* Buffer_Temp_Sav=Buffer_Temp;
- size_t Buffer_Temp_Size_Sav=Buffer_Temp_Size;
- size_t Buffer_Offset_Sav=Buffer_Offset;
- size_t Buffer_Offset_Temp_Sav=Buffer_Offset_Temp;
- Buffer=NULL;
- Buffer_Size=0;
- Buffer_Temp=NULL;
- Buffer_Temp_Size=0;
- Buffer_Offset=0;
- Buffer_Offset_Temp=0;
-
- //Configuring level
- std::vector<int64u> Element_Sizes_Sav;
- size_t Element_Level_Sav=Element_Level;
- while(Element_Level)
- {
- Element_Sizes_Sav.push_back(Element_TotalSize_Get());
- Element_End0();
- }
-
- //Configuring file size
- int64u File_Size_Sav=File_Size;
- if (File_Size<File_Offset+Buffer_Offset+Element_Offset+Dest_Size)
- File_Size=File_Offset+Buffer_Offset+Element_Offset+Dest_Size;
- Element_Level++;
- Header_Fill_Size(File_Size);
- Element_Level--;
-
- //Parsing
- Buffer=Dest;
- Buffer_Size=Dest_Size;
- while (Open_Buffer_Continue_Loop());
- delete[] Dest; //Dest=NULL;
-
- //Resetting file size
- File_Size=File_Size_Sav;
- while(Element_Level)
- Element_End0();
- Element_Level++;
- Header_Fill_Size(File_Size);
- Element_Level--;
-
- //Configuring level
- while(Element_Level<Element_Level_Sav)
- {
- Element_Begin0();
- Element_Begin0();
- Header_Fill_Size(Element_Sizes_Sav[0]);
- Element_End0();
- }
-
- //Resetting buffer
- Buffer=Buffer_Sav;
- Buffer_Size=Buffer_Size_Sav;
- Buffer_Temp=Buffer_Temp_Sav;
- Buffer_Temp_Size=Buffer_Temp_Size_Sav;
- Buffer_Offset=Buffer_Offset_Sav;
- Buffer_Offset_Temp=Buffer_Offset_Temp_Sav;
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::WritingApplication()
-{
- Element_Name("WritingApplication");
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::WritingApplication_Name()
-{
- Element_Name("Name");
-
- //Parsing
- Skip_UTF8(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::WritingApplication_Version()
-{
- Element_Name("Version");
-
- //Parsing
- Skip_UTF8(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::SourceInfo()
-{
- Element_Name("Source Information");
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::SourceInfo_IndexCreationDate()
-{
- Element_Name("Index Creation Date");
-
- //Parsing
- Skip_B8( "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::SourceInfo_SourceModificationDate()
-{
- Element_Name("Source Modification Date");
-
- //Parsing
- Skip_B8( "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::SourceInfo_SourceSize()
-{
- Element_Name("Source Size");
-
- //Parsing
- Skip_B8( "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi::InformData()
-{
- Element_Name("InformData");
-
- //Parsing
- Ztring InformData_FromFile;
- Get_UTF8 (Element_Size, InformData_FromFile, "Data");
-
- //Filling
- #if MEDIAINFO_IBIUSAGE
- if (Config->Ibi_UseIbiInfoIfAvailable_Get())
- {
- ZtringListList Fields(InformData_FromFile);
- for (size_t Pos=0; Pos<Fields.size(); Pos++)
- {
- if (Pos==0 || Fields[Pos].size()<2)
- {
- if (Pos)
- Pos++;
- if (Pos>Fields.size() || Fields[Pos].size()<1)
- break; //End or problem
-
- if (Fields[Pos][0]==__T("General"))
- ; //Nothing to do
- else if (Fields[Pos][0]==__T("Video"))
- Stream_Prepare(Stream_Video);
- else if (Fields[Pos][0]==__T("Audio"))
- Stream_Prepare(Stream_Audio);
- else if (Fields[Pos][0]==__T("Text"))
- Stream_Prepare(Stream_Text);
- else if (Fields[Pos][0]==__T("Other"))
- Stream_Prepare(Stream_Other);
- else if (Fields[Pos][0]==__T("Image"))
- Stream_Prepare(Stream_Image);
- else if (Fields[Pos][0]==__T("Menu"))
- Stream_Prepare(Stream_Menu);
- else
- break; //Problem
- Pos++;
- }
-
- Fill(StreamKind_Last, StreamPos_Last, Fields[Pos][0].To_UTF8().c_str(), Fields[Pos][1], true);
- if (Info_Options<Fields[Pos].size())
- (*Stream_More)[StreamKind_Last][StreamPos_Last](Fields[Pos][0].To_UTF8().c_str(), Info_Options)=Fields[Pos][Info_Options];
- }
- }
- #endif //MEDIAINFO_IBIUSAGE
-}
-
-//***************************************************************************
-// Data
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ibi::UInteger_Info()
-{
- switch (Element_Size)
- {
- case 1 :
- {
- Info_B1(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 2 :
- {
- Info_B2(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 3 :
- {
- Info_B3(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 4 :
- {
- Info_B4(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 5 :
- {
- Info_B5(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 6 :
- {
- Info_B6(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 7 :
- {
- Info_B7(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 8 :
- {
- Info_B8(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 16:
- {
- Info_B16(Data, "Data"); Element_Info1(Data);
- return;
- }
- default : Skip_XX(Element_Size, "Data");
- }
-}
-
-//---------------------------------------------------------------------------
-int64u File_Ibi::UInteger_Get()
-{
- switch (Element_Size)
- {
- case 1 :
- {
- int8u Data;
- Get_B1 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 2 :
- {
- int16u Data;
- Get_B2 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 3 :
- {
- int32u Data;
- Get_B3 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 4 :
- {
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 5 :
- {
- int64u Data;
- Get_B5 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 6 :
- {
- int64u Data;
- Get_B6 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 7 :
- {
- int64u Data;
- Get_B7 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 8 :
- {
- int64u Data;
- Get_B8 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- default : Skip_XX(Element_Size, "Data");
- return 0;
- }
-}
-
-//---------------------------------------------------------------------------
-int128u File_Ibi::UInteger16_Get()
-{
- switch (Element_Size)
- {
- case 1 :
- {
- int8u Data;
- Get_B1 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 2 :
- {
- int16u Data;
- Get_B2 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 3 :
- {
- int32u Data;
- Get_B3 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 4 :
- {
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 5 :
- {
- int64u Data;
- Get_B5 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 6 :
- {
- int64u Data;
- Get_B6 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 7 :
- {
- int64u Data;
- Get_B7 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 8 :
- {
- int64u Data;
- Get_B8 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 16:
- {
- int128u Data;
- Get_B16(Data, "Data"); Element_Info1(Data);
- return Data;
- }
- default : Skip_XX(Element_Size, "Data");
- return 0;
- }
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_IBI
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi.h
deleted file mode 100644
index 76538aad1..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Ibi files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_IbiH
-#define MediaInfo_File_IbiH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Classe File_Ibi
-//***************************************************************************
-
-class File_Ibi : public File__Analyze
-{
-public :
- File_Ibi();
- ~File_Ibi();
-
- //In
- #if MEDIAINFO_IBIUSAGE
- ibi* Ibi;
- #endif //MEDIAINFO_IBIUSAGE
-
-private :
- #if MEDIAINFO_IBIUSAGE
- //Get information
- const Ztring &Get (stream_t StreamKind, size_t StreamNumber, const Ztring &Parameter, info_t KindOfInfo=Info_Text, info_t KindOfSearch=Info_Name);
- #endif //MEDIAINFO_IBIUSAGE
-
- //Streams management
- void Streams_Accept();
- #if MEDIAINFO_IBIUSAGE
- void Streams_Finish();
- #endif //MEDIAINFO_IBIUSAGE
-
- //Buffer - Element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Zero();
- void CRC32();
- void Void();
- void Ebml();
- void Ebml_Version();
- void Ebml_ReadVersion();
- void Ebml_MaxIDLength();
- void Ebml_MaxSizeLength();
- void Ebml_DocType();
- void Ebml_DocTypeVersion();
- void Ebml_DocTypeReadVersion();
- void Stream();
- void Stream_Header();
- void Stream_ByteOffset();
- void Stream_FrameNumber();
- void Stream_Dts();
- void CompressedIndex();
- void WritingApplication();
- void WritingApplication_Name();
- void WritingApplication_Version();
- void InformData();
- void SourceInfo();
- void SourceInfo_IndexCreationDate();
- void SourceInfo_SourceModificationDate();
- void SourceInfo_SourceSize();
-
- //Data
- int64u UInteger_Get();
- int128u UInteger16_Get();
- void UInteger_Info();
-
- //Temp
- Ztring Get_Temp;
- int64u ID_Current;
- #if MEDIAINFO_IBIUSAGE
- bool Ibi_MustDelete;
- #endif //MEDIAINFO_IBIUSAGE
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi_Creation.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi_Creation.cpp
deleted file mode 100644
index 398e1aba3..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi_Creation.cpp
+++ /dev/null
@@ -1,565 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_IBIUSAGE
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Ibi_Creation.h"
-#include <cstring>
-#include <ctime>
-#include <zlib.h>
-#include "base64.h"
-#include "ZenLib/File.h"
-#include "ZenLib/OS_Utils.h"
-#ifdef WINDOWS
- #undef __TEXT
- #include <windows.h>
-#endif
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-extern const Char* MediaInfo_Version;
-
-//***************************************************************************
-// Ibi structure
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-ibi::ibi()
-{
-}
-
-//---------------------------------------------------------------------------
-ibi::~ibi()
-{
- for (streams::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- delete Stream->second; //Stream->second=NULL;
-}
-
-//---------------------------------------------------------------------------
-void ibi::stream::Add (const info &Info)
-{
- if (!IsSynchronized)
- {
- //Searching the right insertion point
- for (Infos_Pos=0; Infos_Pos<Infos.size(); Infos_Pos++)
- if (Info.StreamOffset<Infos[Infos_Pos].StreamOffset)
- break;
- }
-
- //Testing if new data is same as current insertion point
- if (Infos_Pos && Infos[Infos_Pos-1].FrameNumber==Info.FrameNumber && Info.FrameNumber!=(int64u)-1)
- {
- IsSynchronized=true;
- return;
- }
- if (Infos_Pos && Info.Dts==Infos[Infos_Pos-1].Dts && Info.Dts!=(int64u)-1)
- {
- //Duplicate, updating it (in case of new frame count)
- if (Infos_Pos && Info.FrameNumber!=(int64u)-1 && Info.FrameNumber<Infos[Infos_Pos-1].FrameNumber)
- {
- Infos[Infos_Pos-1].FrameNumber=Info.FrameNumber;
- Infos[Infos_Pos-1].Dts=Info.Dts;
- }
-
- IsSynchronized=true;
- return;
- }
- if (Infos_Pos && Info.StreamOffset==Infos[Infos_Pos-1].StreamOffset)
- {
- //Duplicate, updating it (in case of new frame count)
- if (Infos_Pos && Info.FrameNumber!=(int64u)-1 && Info.FrameNumber<Infos[Infos_Pos-1].FrameNumber)
- {
- Infos[Infos_Pos-1].FrameNumber=Info.FrameNumber;
- Infos[Infos_Pos-1].Dts=Info.Dts;
- }
-
- IsSynchronized=true;
- return;
- }
-
- //Previous item
- if (IsSynchronized && Infos_Pos)
- {
- Infos[Infos_Pos-1].IsContinuous=true;
- IsContinuous=true;
-
- IsModified=true;
- }
- IsSynchronized=true;
-
- //Testing if new data is same as next insertion point
- if (Infos_Pos<Infos.size() && Infos[Infos_Pos].FrameNumber==Info.FrameNumber && Info.FrameNumber!=(int64u)-1)
- {
- Infos_Pos++;
-
- IsSynchronized=true;
- return;
- }
- if (Infos_Pos<Infos.size() && Info.Dts==Infos[Infos_Pos].Dts && Info.Dts!=(int64u)-1)
- {
- Infos_Pos++;
-
- IsSynchronized=true;
- return;
- }
- if (Infos_Pos<Infos.size() && Info.StreamOffset==Infos[Infos_Pos].StreamOffset)
- {
- //Duplicate, updating it (in case of new frame count)
- if (IsSynchronized && Info.FrameNumber!=(int64u)-1)
- Infos[Infos_Pos].FrameNumber=Info.FrameNumber;
-
- Infos_Pos++;
-
- IsSynchronized=true;
- return;
- }
-
- Infos.insert(Infos.begin()+Infos_Pos, Info);
- Infos_Pos++;
-
- IsModified=true;
-}
-
-//---------------------------------------------------------------------------
-void ibi::stream::Unsynch ()
-{
- Infos_Pos=0;
- IsModified=false;
- IsContinuous=false;
- IsSynchronized=false;
-}
-
-//***************************************************************************
-// Utils
-//***************************************************************************
-
-size_t int64u2Ebml(int8u* List, int64u Value)
-{
- //1 byte
- if (Value<=126) //2^7-2
- {
- if (List)
- {
- List[0]=0x80|((int8u)Value);
- }
- return 1;
- }
-
- //2 bytes
- if (Value<=16382) //2^14-2
- {
- if (List)
- {
- List[0]=0x40|((int8u)(Value>>8));
- List[1]=(int8u)Value;
- }
- return 2;
- }
-
- //3 bytes
- if (Value<=2097150) //2^21-2
- {
- if (List)
- {
- List[0]=0x20|((int8u)(Value>>16));
- List[1]=(int8u)(Value>>8);
- List[2]=(int8u)Value;
- }
- return 3;
- }
-
- //4 bytes
- if (Value<=268435454) //2^28-2
- {
- if (List)
- {
- List[0]=0x10|((int8u)(Value>>24));
- List[1]=(int8u)(Value>>16);
- List[2]=(int8u)(Value>>8);
- List[3]=(int8u)Value;
- }
- return 4;
- }
-
- //5 bytes
- if (Value<=34359738366LL) //2^35-2
- {
- if (List)
- {
- List[0]=0x08|((int8u)(Value>>32));
- List[1]=(int8u)(Value>>24);
- List[2]=(int8u)(Value>>16);
- List[3]=(int8u)(Value>>8);
- List[4]=(int8u)Value;
- }
- return 5;
- }
-
- //6 bytes
- if (Value<=4398046511102LL) //2^42-2
- {
- if (List)
- {
- List[0]=0x04|((int8u)(Value>>40));
- List[1]=(int8u)(Value>>32);
- List[2]=(int8u)(Value>>24);
- List[3]=(int8u)(Value>>16);
- List[4]=(int8u)(Value>>8);
- List[5]=(int8u)Value;
- }
- return 6;
- }
-
- //7 bytes
- if (Value<=562949953421310LL) //2^49-2
- {
- if (List)
- {
- List[0]=0x02|((int8u)(Value>>48));
- List[1]=(int8u)(Value>>40);
- List[2]=(int8u)(Value>>32);
- List[3]=(int8u)(Value>>24);
- List[4]=(int8u)(Value>>16);
- List[5]=(int8u)(Value>>8);
- List[6]=(int8u)Value;
- }
- return 7;
- }
-
- //8 bytes
- if (Value<=72057594037927934LL) //2^56-2
- {
- if (List)
- {
- List[0]=0x01;
- List[1]=(int8u)(Value>>56);
- List[2]=(int8u)(Value>>40);
- List[3]=(int8u)(Value>>32);
- List[4]=(int8u)(Value>>24);
- List[5]=(int8u)(Value>>16);
- List[6]=(int8u)(Value>>8);
- List[7]=(int8u)Value;
- }
- return 8;
- }
-
- if (List)
- List[0]=0xFF;
- return 1;
-}
-
-size_t EbmlBlock(int8u* List, size_t List_MaxSize, int64u Code, int8u* Content, size_t Content_Size)
-{
- if (Content_Size==0)
- return 0;
-
- size_t Code_EbmlSize=int64u2Ebml(NULL, Code);
- size_t Content_EbmlSize=int64u2Ebml(NULL, Content_Size);
-
- if (List && Code_EbmlSize+Content_EbmlSize+Content_Size>List_MaxSize)
- return 0;
-
- if (List)
- {
- List+=int64u2Ebml(List, Code);
- List+=int64u2Ebml(List, Content_Size);
- std::memcpy(List, Content, Content_Size);
- //List+=Content_Size; //Content
- }
-
- return Code_EbmlSize+Content_EbmlSize+Content_Size;
-}
-
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Ibi_Creation::File_Ibi_Creation()
-{
-}
-
-//---------------------------------------------------------------------------
-File_Ibi_Creation::~File_Ibi_Creation()
-{
- for (size_t Pos=0; Pos<Buffers.size(); Pos++)
- delete Buffers[Pos];
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ibi_Creation::Set(const ibi &Ibi)
-{
- //Source information
- if (!Ibi.FileName.empty())
- {
- int64s CurrentDate=(int64s)time(NULL)*1000000000LL; //From seconds to nanoseconds
- CurrentDate-=978307200000000000LL; //Count of nanoseconds between January 1, 1970 (time_t base) and January 1, 2001 (EBML base)
-
- int64s LastModifiedDate=0;
- bool LastModifiedDate_IsValid=false;
- int64s FileSize=0;
- bool FileSize_IsValid=false;
-
- #if defined WINDOWS
- HANDLE File_Handle;
- #ifdef UNICODE
- File_Handle=CreateFileW(Ibi.FileName.c_str(), 0, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
- #else
- File_Handle=CreateFile(Ibi.FileName.To_Local().c_str(), 0, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
- #endif //UNICODE
- if (File_Handle!=INVALID_HANDLE_VALUE)
- {
- FILETIME TimeFT;
- if (GetFileTime(File_Handle, NULL, NULL, &TimeFT))
- {
- LastModifiedDate=(0x100000000LL*TimeFT.dwHighDateTime+TimeFT.dwLowDateTime)*100; //From 100-nanoseconds to nanoseconds
- LastModifiedDate-=12622780800000000LL; //Count of nanoseconds between January 1, 1601 (Windows base) and January 1, 2001 (EBML base)
- LastModifiedDate_IsValid=true;
- }
-
- DWORD High; DWORD Low=GetFileSize(File_Handle, &High);
- if (Low!=INVALID_FILE_SIZE)
- {
- FileSize=0x100000000ULL*High+Low;
- FileSize_IsValid=true;
- }
-
- CloseHandle(File_Handle);
- }
- #endif //WINDOWS
-
- size_t BlockSizeWithoutHeader=1+1+8; //Index creation date + Source file size
- if (LastModifiedDate_IsValid)
- BlockSizeWithoutHeader+=1+1+8; //Source file modification date
- if (FileSize_IsValid)
- BlockSizeWithoutHeader+=1+1+8; //Source file size
-
- buffer* Buffer=new buffer;
- Buffer->Content=new int8u[1+int64u2Ebml(NULL, 1+int64u2Ebml(NULL, BlockSizeWithoutHeader))+BlockSizeWithoutHeader];
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 0x05); //Source information
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, BlockSizeWithoutHeader); //Size
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 0x01); //Index creation date
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 8); //Size
- int64u2BigEndian(Buffer->Content+Buffer->Size, (int64u)CurrentDate); Buffer->Size+=8; //Content
- if (LastModifiedDate_IsValid)
- {
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 0x02); //Source file modification date
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 8); //Size
- int64u2BigEndian(Buffer->Content+Buffer->Size, (int64u)LastModifiedDate); Buffer->Size+=8; //Content
- }
- if (FileSize_IsValid)
- {
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 0x03); //Source file size
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 8); //Size
- int64u2BigEndian(Buffer->Content+Buffer->Size, (int64u)CurrentDate); Buffer->Size+=8; //Content
- }
- Buffers.push_back(Buffer);
- }
-
- //Writing application
- {
- string Version=Ztring(MediaInfo_Version).SubString(__T(" - v"), Ztring()).To_UTF8();
- buffer* Buffer=new buffer;
- Buffer->Content=new int8u[1+int64u2Ebml(NULL, 1+1+9+1+int64u2Ebml(NULL, Version.size())+Version.size())+1+1+9+1+int64u2Ebml(NULL, Version.size())+Version.size()];
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 0x03); //Writing application
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 1+1+9+1+1+Version.size()); //Size
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 0x01); //Writing application name
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 9); //Size
- std::memcpy(Buffer->Content+Buffer->Size, "MediaInfo", 9); Buffer->Size+=9; //Content
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 0x02); //Writing application version
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, Version.size()); //Size
- std::memcpy(Buffer->Content+Buffer->Size, Version.c_str(), Version.size()); Buffer->Size+=Version.size(); //Content
- Buffers.push_back(Buffer);
- }
-
- //InformData
- if (!Ibi.Inform_Data.empty())
- {
- string Content(Ibi.Inform_Data.To_UTF8());
- buffer* Buffer=new buffer;
- Buffer->Content=new int8u[1+int64u2Ebml(NULL, Content.size())+Content.size()];
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 0x04); //InformData
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, Content.size()); //Size
- std::memcpy(Buffer->Content+Buffer->Size, Content.c_str(), Content.size()); Buffer->Size+=Content.size(); //Content
- Buffers.push_back(Buffer);
- }
-
- //Streams
- for (ibi::streams::const_iterator IbiStream_Temp=Ibi.Streams.begin(); IbiStream_Temp!=Ibi.Streams.end(); ++IbiStream_Temp)
- Add(IbiStream_Temp->first, *IbiStream_Temp->second);
-}
-
-//---------------------------------------------------------------------------
-void File_Ibi_Creation::Add(int64u ID, const ibi::stream &Stream)
-{
- //Useful?
- if (Stream.Infos.empty())
- return;
-
- //Header
- int8u* IbiHeader;
- size_t IbiHeader_Offset=0;
- if (ID!=(int64u)-1)
- {
- IbiHeader=new int8u[int64u2Ebml(NULL, ID)];
- IbiHeader_Offset+=int64u2Ebml(IbiHeader, ID);
- }
- else
- IbiHeader=NULL;
-
- //Init - Byte Offset
- int8u* IbiByteOffset=new int8u[8*Stream.Infos.size()];
- size_t IbiByteOffset_Offset=0;
-
- //Init - Frame Number
- int8u* IbiFrameNumber=new int8u[8*Stream.Infos.size()];
- size_t IbiFrameNumber_Offset=0;
-
- //Init - DTS
- int8u* IbiDts=new int8u[16+8*Stream.Infos.size()];
- size_t IbiDts_Offset=0;
- IbiDts_Offset+=int64u2Ebml(IbiDts+IbiDts_Offset, Stream.DtsFrequencyNumerator);
- IbiDts_Offset+=int64u2Ebml(IbiDts+IbiDts_Offset, Stream.DtsFrequencyDenominator);
-
- //Per item
- for (size_t Pos=0; Pos<Stream.Infos.size(); Pos++)
- {
- IbiByteOffset_Offset+=int64u2Ebml(IbiByteOffset+IbiByteOffset_Offset, Stream.Infos[Pos].StreamOffset-(Pos?Stream.Infos[Pos-1].StreamOffset:0));
- IbiFrameNumber_Offset+=int64u2Ebml(IbiFrameNumber+IbiFrameNumber_Offset, Stream.Infos[Pos].FrameNumber-(Pos?Stream.Infos[Pos-1].FrameNumber:0));
- IbiDts_Offset+=int64u2Ebml(IbiDts+IbiDts_Offset, Stream.Infos[Pos].Dts-(Pos?Stream.Infos[Pos-1].Dts:0));
- }
-
- //Sizes
- size_t IbiHeader_EbmlSize=EbmlBlock(NULL, 0, 0x01, NULL, IbiHeader_Offset);
- size_t IbiByteOffset_EbmlSize=EbmlBlock(NULL, 0, 0x02, NULL, IbiByteOffset_Offset);
- size_t IbiFrameNumber_EbmlSize=EbmlBlock(NULL, 0, 0x03, NULL, IbiFrameNumber_Offset);
- size_t IbiDts_EbmlSize=EbmlBlock(NULL, 0, 0x04, NULL, IbiDts_Offset);
-
- //Buffer
- buffer* Buffer=new buffer;
- Buffer->Content=new int8u[1+int64u2Ebml(NULL, IbiHeader_EbmlSize+IbiByteOffset_EbmlSize+IbiFrameNumber_EbmlSize+IbiDts_EbmlSize)+IbiHeader_EbmlSize+IbiByteOffset_EbmlSize+IbiFrameNumber_EbmlSize+IbiDts_EbmlSize];
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, 0x01); //Stream
- Buffer->Size+=int64u2Ebml(Buffer->Content+Buffer->Size, IbiHeader_EbmlSize+IbiByteOffset_EbmlSize+IbiFrameNumber_EbmlSize+IbiDts_EbmlSize); //Size
- Buffer->Size+=EbmlBlock(Buffer->Content+Buffer->Size, IbiHeader_EbmlSize, 0x01, IbiHeader, IbiHeader_Offset); //IbiHeader
- Buffer->Size+=EbmlBlock(Buffer->Content+Buffer->Size, IbiByteOffset_EbmlSize, 0x02, IbiByteOffset, IbiByteOffset_Offset); //ByteOffset
- Buffer->Size+=EbmlBlock(Buffer->Content+Buffer->Size, IbiFrameNumber_EbmlSize, 0x03, IbiFrameNumber, IbiFrameNumber_Offset); //FrameNumber
- Buffer->Size+=EbmlBlock(Buffer->Content+Buffer->Size, IbiDts_EbmlSize, 0x04, IbiDts, IbiDts_Offset); //Dts
-
- Buffers.push_back(Buffer);
-
- //Finish
- delete[] IbiByteOffset; //IbiByteOffset=NULL;
- delete[] IbiFrameNumber; //IbiFrameNumber=NULL;
- delete[] IbiDts; //IbiDts=NULL;
-}
-
-Ztring File_Ibi_Creation::Finish()
-{
- //Test
- if (Buffers.empty())
- return Ztring();
-
- //Size computing
- size_t Size=4+1+2+1+15+2+1+1; //Header size
- for (size_t Pos=0; Pos<Buffers.size(); Pos++)
- Size+=Buffers[Pos]->Size;
-
- //Buffer creation
- int8u* Main=new int8u[Size];
- size_t Main_Offset=0;
-
- //Header
- size_t Header_Offset=4+1+2+1+15+2+1+1; //Size (Code + Size + Content, twice)
- Main_Offset+=int64u2Ebml(Main+Main_Offset, 0x0A45DFA3); //EBML
- Main_Offset+=int64u2Ebml(Main+Main_Offset, Header_Offset-(4+1)); //Size (Complete header size minus header header size)
- Main_Offset+=int64u2Ebml(Main+Main_Offset, 0x0282); //DocType
- Main_Offset+=int64u2Ebml(Main+Main_Offset, 15); //Size
- std::memcpy(Main+Main_Offset, "MediaInfo Index", 15); Main_Offset+=15; //Content
- Main_Offset+=int64u2Ebml(Main+Main_Offset, 0x0285); //DocTypeReadVersion
- Main_Offset+=int64u2Ebml(Main+Main_Offset, 1); //Size
- Main[Main_Offset]=0x01; Main_Offset+=1; //Content
-
- //for each stream
- for (size_t Pos=0; Pos<Buffers.size(); Pos++)
- {
- std::memcpy(Main+Main_Offset, Buffers[Pos]->Content, Buffers[Pos]->Size);
- Main_Offset+=Buffers[Pos]->Size;
- }
-
- //Compressed
- if (Header_Offset < Main_Offset)
- {
- buffer Buffer;
- size_t UncompressedSize = Main_Offset - Header_Offset;
- int8u* Compressed = new int8u[UncompressedSize];
- unsigned long CompressedSize = (unsigned long)Main_Offset;
- if (compress2(Compressed, &CompressedSize, Main + Header_Offset, (unsigned long)UncompressedSize, Z_BEST_COMPRESSION) == Z_OK && CompressedSize < UncompressedSize)
- {
- Main_Offset = Header_Offset; //Removing uncompressed content
- Main_Offset += int64u2Ebml(Main + Main_Offset, 0x02); //Compressed index
- Main_Offset += int64u2Ebml(Main + Main_Offset, int64u2Ebml(NULL, UncompressedSize) + CompressedSize); //Size
- Main_Offset += int64u2Ebml(Main + Main_Offset, UncompressedSize); //Uncompressed size
-
- //Filling
- Buffer.Size = Main_Offset + CompressedSize;
- Buffer.Content = new int8u[Buffer.Size];
- std::memcpy(Buffer.Content, Main, Main_Offset); //File header + compressed data header
- std::memcpy(Buffer.Content + Main_Offset, Compressed, CompressedSize); //Compressed data
- }
- else
- {
- //Filling
- Buffer.Size = Size;
- Buffer.Content = new int8u[Buffer.Size];
- std::memcpy(Buffer.Content, Main, Size);
- }
-
- std::string Data_Raw((const char*)Buffer.Content, Buffer.Size);
- std::string Data_Base64(Base64::encode(Data_Raw));
-
- delete[] Main; //Main=NULL;
-
- return Ztring().From_UTF8(Data_Base64);
- }
- else
- {
- delete[] Main; //Main=NULL;
-
- return Ztring();
- }
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_IBIUSAGE
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi_Creation.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi_Creation.h
deleted file mode 100644
index 6942e1730..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ibi_Creation.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Ibi files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Ibi_CreationH
-#define MediaInfo_File_Ibi_CreationH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Ztring.h"
-#include <vector>
-#include <map>
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Ibi structure
-//***************************************************************************
-
-struct ibi
-{
- struct stream
- {
- int64u DtsFrequencyNumerator;
- int64u DtsFrequencyDenominator;
- struct info
- {
- int64u StreamOffset;
- int64u FrameNumber;
- int64u Dts;
- bool IsContinuous;
-
- info()
- {
- StreamOffset=(int64u)-1;
- FrameNumber=(int64u)-1;
- Dts=(int64u)-1;
- IsContinuous=false;
- }
- };
- std::vector<info> Infos;
- size_t Infos_Pos;
- bool IsContinuous;
- bool IsModified;
- bool IsSynchronized;
-
- stream()
- {
- DtsFrequencyNumerator=1000000000; //nanosecond
- DtsFrequencyDenominator=1;
- Infos_Pos=0;
- IsContinuous=false;
- IsModified=false;
- IsSynchronized=false;
- }
-
- void Add (const info &Info);
- void Unsynch();
- };
- typedef std::map<int64u, stream*> streams;
- streams Streams;
-
- Ztring Inform_Data;
- Ztring FileName;
-
- //Constructor/Destructor
- ibi();
- ~ibi();
-};
-
-//***************************************************************************
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-//***************************************************************************
-
-class File_Ibi_Creation
-{
-public :
- File_Ibi_Creation();
- File_Ibi_Creation(const ibi &Ibi) {Set(Ibi);}
- ~File_Ibi_Creation();
-
- void Set(const ibi &Ibi);
- void Add(int64u ID, const ibi::stream &Stream);
- Ztring Finish();
-
-private :
- struct buffer
- {
- int8u* Content;
- size_t Size;
-
- buffer()
- {
- Content=NULL;
- Size=0;
- }
-
- ~buffer()
- {
- delete[] Content; //Content=NULL;
- }
- };
- std::vector<buffer*> Buffers;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ism.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ism.cpp
deleted file mode 100644
index 60e9b1f38..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ism.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_ISM_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Ism.h"
-#include <set>
-#include "MediaInfo/MediaInfo.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#include "ZenLib/Dir.h"
-#include "ZenLib/FileName.h"
-#include "ZenLib/Format/Http/Http_Utils.h"
-#include "tinyxml2.h"
-using namespace tinyxml2;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Ism::File_Ism()
-:File__Analyze()
-{
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Ism;
- StreamIDs_Width[0]=sizeof(size_t)*2;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent_Accept_Specific=true;
- #endif //MEDIAINFO_DEMUX
-
- //Temp
- ReferenceFiles=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_Ism::~File_Ism()
-{
- delete ReferenceFiles; //ReferenceFiles=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ism::Streams_Accept()
-{
- Fill(Stream_General, 0, General_Format, "ISM");
-}
-
-//---------------------------------------------------------------------------
-void File_Ism::Streams_Finish()
-{
- if (ReferenceFiles==NULL)
- return;
-
- ReferenceFiles->ParseReferences();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_Ism::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- if (ReferenceFiles==NULL)
- return 0;
-
- return ReferenceFiles->Seek(Method, Value, ID);
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Ism::FileHeader_Begin()
-{
- XMLDocument document;
- if (!FileHeader_Begin_XML(document))
- return false;
-
- {
- XMLElement* Root=document.FirstChildElement("smil");
- if (Root)
- {
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
-
- std::set<Ztring> FileNames;
-
- XMLElement* Body=Root->FirstChildElement();
- while (Body)
- {
- if (string(Body->Value())=="body")
- {
- XMLElement* Switch=Body->FirstChildElement();
- while (Switch)
- {
- if (string(Switch->Value())=="switch")
- {
- Accept("ISM");
-
- XMLElement* Stream=Switch->FirstChildElement();
- while (Stream)
- {
- string Value(Stream->Value());
- if (Value=="video" || Value=="videostream" || Value=="audio" || Value=="audiostream" || Value=="text" || Value=="textstream")
- {
- sequence* Sequence=new sequence;
-
- if (Value=="video" || Value=="videostream")
- Sequence->StreamKind=Stream_Video;
- if (Value=="audio" || Value=="audiostream")
- Sequence->StreamKind=Stream_Audio;
- if (Value=="text" || Value=="textstream" )
- Sequence->StreamKind=Stream_Text;
-
- const char* Attribute=Stream->Attribute("src");
- if (Attribute)
- Sequence->AddFileName(Ztring().From_UTF8(Attribute));
-
- XMLElement* Param=Stream->FirstChildElement();
- while (Param)
- {
- if (string(Param->Value())=="param")
- {
- Attribute=Param->Attribute("name");
- if (Attribute && Ztring().From_UTF8(Attribute)==__T("trackID"))
- {
- Attribute=Param->Attribute("value");
- if (Attribute)
- Sequence->StreamID=Ztring().From_UTF8(Attribute).To_int64u();
- }
- }
- Param=Param->NextSiblingElement();
- }
-
- if (!Sequence->FileNames.empty() && !Sequence->FileNames[0].empty() && FileNames.find(Sequence->FileNames[0])==FileNames.end())
- {
- ReferenceFiles->AddSequence(Sequence);
- FileNames.insert(Sequence->FileNames[0]);
- }
- }
-
- Stream=Stream->NextSiblingElement();
- }
- }
-
- Switch=Switch->NextSiblingElement();
- }
- }
-
- Body=Body->NextSiblingElement();
- }
- }
- else
- {
- Reject("ISM");
- return false;
- }
- }
-
- Element_Offset=File_Size;
-
- //All should be OK...
- return true;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_ISM_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ism.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ism.h
deleted file mode 100644
index 545f59204..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ism.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DXW files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_IsmH
-#define MediaInfo_File_IsmH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_Ism
-//***************************************************************************
-
-class File_Ism : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Ism();
- ~File_Ism();
-
-private :
- //Streams management
- void Streams_Accept ();
- void Streams_Finish ();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Temp
- File__ReferenceFilesHelper* ReferenceFiles;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ivf.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ivf.cpp
deleted file mode 100644
index 93ed2e32c..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ivf.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-// From : http://www.webmproject.org/
-// Specs: http://wiki.multimedia.cx/index.php?title=IVF
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_IVF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Ivf.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Ivf::FileHeader_Begin()
-{
- //Synchro
- if (4>Buffer_Size)
- return false;
- if (Buffer[0]!=0x44 //"DKIF"
- || Buffer[1]!=0x4B
- || Buffer[2]!=0x49
- || Buffer[3]!=0x46)
- {
- Reject();
- return false;
- }
- if (6>Buffer_Size)
- return false;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Ivf::FileHeader_Parse()
-{
- //Parsing
- int32u frame_rate_num, frame_rate_den, frame_count, fourcc;
- int16u version, header_size, width, height;
-
- Skip_C4 ( "Signature");
- Get_L2 (version, "Version");
- if (version==0)
- {
- Get_L2 (header_size, "Header Size");
- if (header_size>=32)
- {
- Get_C4 (fourcc, "Fourcc");
- Get_L2 (width, "Width");
- Get_L2 (height, "Height");
- Get_L4 (frame_rate_num, "FrameRate Numerator");
- Get_L4 (frame_rate_den, "FrameRate Denominator");
- Get_L4 (frame_count, "Frame Count");
- Skip_L4( "Unused");
- if (header_size-32)
- Skip_XX(header_size-32, "Unknown");
- }
- else
- {
- fourcc=0x00000000;
- width=0;
- height=0;
- frame_rate_num=0;
- frame_rate_den=0;
- frame_count=0;
- }
- }
- else
- {
- header_size=0;
- fourcc=0x00000000;
- width=0;
- height=0;
- frame_rate_num=0;
- frame_rate_den=0;
- frame_count=0;
- }
-
- FILLING_BEGIN();
- Accept("IVF");
-
- Fill(Stream_General, 0, General_Format, "IVF");
-
- if (version==0 && header_size>=32)
- {
- Stream_Prepare(Stream_Video);
- CodecID_Fill(Ztring().From_CC4(fourcc), Stream_Video, 0, InfoCodecID_Format_Riff);
- Fill(Stream_Video, 0, Video_FrameRate, (float)frame_rate_num / frame_rate_den);
- Fill(Stream_Video, 0, Video_FrameCount, frame_count);
- Fill(Stream_Video, 0, Video_Width, width);
- Fill(Stream_Video, 0, Video_Height, height);
- Fill(Stream_Video, 0, Video_StreamSize, File_Size-header_size-12*frame_count); //Overhead is 12 byte per frame
- }
-
- //No more need data
- Finish("IVF");
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_IVF_*
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ivf.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ivf.h
deleted file mode 100644
index 3180c5ec1..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ivf.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-// Information about IVF files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_IvfH
-#define MediaInfo_IvfH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Ivf
-//***************************************************************************
-
-class File_Ivf : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
-private :
- //Buffer
- bool FileHeader_Begin();
- void FileHeader_Parse();
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Lxf.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Lxf.cpp
deleted file mode 100644
index 56c6a5ee0..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Lxf.cpp
+++ /dev/null
@@ -1,1860 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_LXF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Lxf.h"
-#if defined(MEDIAINFO_AVC_YES)
- #include "MediaInfo/Video/File_Avc.h"
-#endif
-#if defined(MEDIAINFO_DVDIF_YES)
- #include "MediaInfo/Multiple/File_DvDif.h"
-#endif
-#if defined(MEDIAINFO_VC3_YES)
- #include "MediaInfo/Video/File_Vc3.h"
-#endif
-#if defined(MEDIAINFO_MPEGV_YES)
- #include "MediaInfo/Video/File_Mpegv.h"
-#endif
-#if defined(MEDIAINFO_AAC_YES)
- #include "MediaInfo/Audio/File_Aac.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_DTS_YES)
- #include "MediaInfo/Audio/File_Dts.h"
-#endif
-#if defined(MEDIAINFO_SMPTEST0337_YES)
- #include "MediaInfo/Audio/File_ChannelGrouping.h"
-#endif
-#if defined(MEDIAINFO_DOLBYE_YES)
- #include "MediaInfo/Audio/File_DolbyE.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if defined(MEDIAINFO_PCM_YES)
- #include "MediaInfo/Audio/File_Pcm.h"
-#endif
-#if defined(MEDIAINFO_SMPTEST0337_YES)
- #include "MediaInfo/Audio/File_SmpteSt0337.h"
-#endif
-#if defined(MEDIAINFO_ANCILLARY_YES)
- #include "MediaInfo/Multiple/File_Ancillary.h"
-#endif //defined(MEDIAINFO_ANCILLARY_YES)
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include <bitset>
-#include <MediaInfo/MediaInfo_Internal.h>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-const char* Lxf_Format_Video[16]=
-{
- "JPEG",
- "MPEG Video", //Version 1
- "MPEG Video", //Version 2, 4:2:0
- "MPEG Video", //Version 2, 4:2:2
- "DV", //25 Mbps 4:1:1 or 4:2:0
- "DV", //DVCPRO
- "DV", //DVCPRO 50 / HD
- "RGB", //RGB uncompressed
- "Gray", //Gray uncompressed
- "MPEG Video", //Version 2, 4:2:2, GOP=9
- "AVC",
- "AVC",
- "AVC",
- "AVC",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Lxf_PictureType[4]=
-{
- "I", //Closed
- "I", //Open
- "P",
- "B",
-};
-
-//---------------------------------------------------------------------------
-extern const float32 Mpegv_frame_rate[]; //In Video/File_Mpegv.cpp
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Lxf::File_Lxf()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("LXF");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Lxf;
- StreamIDs_Width[0]=4; //2 numbers for Code, 2 numbers for subcode
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- #endif //MEDIAINFO_DEMUX
- MustSynchronize=true;
- Buffer_TotalBytes_Fill_Max=(int64u)-1; //Disabling this feature for this format, this is done in the parser
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent_Accept_Specific=true;
- #endif //MEDIAINFO_DEMUX
-
- //Streams
- #if defined(MEDIAINFO_ANCILLARY_YES)
- Ancillary=NULL;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
-
- //Temp
- LookingForLastFrame=false;
- Stream_Count=0;
- Info_General_StreamSize=0;
- Video_Sizes_Pos=(size_t)-1;
- Audio_Sizes_Pos=(size_t)-1;
-
- //Demux
- #if MEDIAINFO_DEMUX
- DemuxParser=NULL;
- #endif //MEDIAINFO_DEMUX
-
- //Seek
- #if MEDIAINFO_SEEK
- SeekRequest=(int64u)-1;
- #endif //MEDIAINFO_SEEK
- FrameRate=0;
- TimeStamp_Rate=720000;
- Duration_Detected=false;
- LastAudio_BufferOffset=(int64u)-1;
-}
-
-//---------------------------------------------------------------------------
-File_Lxf::~File_Lxf()
-{
- for (size_t Pos=0; Pos<Videos.size(); Pos++)
- for (size_t Pos2=0; Pos2<Videos[Pos].Parsers.size(); Pos2++)
- delete Videos[Pos].Parsers[Pos2];
- for (size_t Pos=0; Pos<Audios.size(); Pos++)
- for (size_t Pos2=0; Pos2<Audios[Pos].Parsers.size(); Pos2++)
- delete Audios[Pos].Parsers[Pos2];
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Lxf::FileHeader_Begin()
-{
- //Synchro
- if (8>Buffer_Size)
- return false;
- if (Buffer[0]!=0x4C //"LEITCH"
- || Buffer[1]!=0x45
- || Buffer[2]!=0x49
- || Buffer[3]!=0x54
- || Buffer[4]!=0x43
- || Buffer[5]!=0x48
- || Buffer[6]!=0x00
- || Buffer[7]!=0x00)
- {
- Reject();
- return false;
- }
-
- return true;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Lxf::Streams_Fill()
-{
- Fill(Stream_General, 0, General_Format_Version, __T("Version "+Ztring::ToZtring(Version)));
-
- for (size_t Pos=2; Pos<Videos.size(); Pos++) //TODO: better handling of fill/finish for Ancillary data
- if (Videos[Pos].Parsers.size()==1)
- Streams_Fill_PerStream(Videos[Pos].Parsers[0], Stream_Video, Pos, Videos[Pos].Format);
- for (size_t Pos=0; Pos<Audios.size(); Pos++)
- if (Audios[Pos].Parsers.size()==1)
- Streams_Fill_PerStream(Audios[Pos].Parsers[0], Stream_Audio, Pos, Audios[Pos].Format);
-
- //FrameRate
- if (FrameRate && Retrieve(Stream_Video, 0, Video_FrameRate).empty())
- Fill(Stream_Video, 0, Video_FrameRate, FrameRate, 3);
-}
-
-//---------------------------------------------------------------------------
-void File_Lxf::Streams_Fill_PerStream(File__Analyze* Parser, stream_t Container_StreamKind, size_t Parser_Pos, int8u Format)
-{
- if (Parser==NULL)
- return;
-
- Fill(Parser);
- if (Parser->Count_Get(Stream_Audio) && Config->File_Audio_MergeMonoStreams_Get() && Parser->Retrieve(Stream_Audio, 0, Audio_Format)==__T("PCM"))
- {
- if (Count_Get(Stream_Audio)==0)
- {
- Merge(*Parser);
- Fill(Stream_Audio, 0, Audio_Channel_s_, Audio_Sizes.size(), 10, true);
- int64u BitRate=Retrieve(Stream_Audio, 0, Audio_BitRate).To_int64u();
- Fill(Stream_Audio, 0, Audio_BitRate, BitRate*Audio_Sizes.size(), 10, true);
- #if MEDIAINFO_DEMUX
- if (Config->Demux_ForceIds_Get())
- {
- for (size_t Audio_Pos=0; Audio_Pos<Audio_Sizes.size(); Audio_Pos++)
- Fill(StreamKind_Last, StreamPos_Last, General_ID, 0x200+Audio_Pos);
- }
- #endif //MEDIAINFO_DEMUX
- }
- }
- else
- {
- Merge(*Parser);
-
- Ztring LawRating=Parser->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=Parser->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
-
- #if MEDIAINFO_DEMUX
- if (Config->Demux_ForceIds_Get())
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Parser->Count_Get((stream_t)StreamKind); StreamPos++)
- {
- Ztring ID;
- if (Parser->Count_Get(Stream_Audio) && Parser->Retrieve(Stream_Audio, 0, Audio_MuxingMode)==__T("AES3") && Parser_Pos%2)
- ID+=Ztring::ToZtring(0x100*Container_StreamKind+Parser_Pos-1)+__T(" / ");
- ID+=Ztring::ToZtring(0x100*Container_StreamKind+Parser_Pos);
- if (!Parser->Retrieve((stream_t)StreamKind, StreamPos, General_ID).empty())
- ID+=__T('-')+Parser->Retrieve((stream_t)StreamKind, StreamPos, General_ID);
- Fill((stream_t)StreamKind, Count_Get((stream_t)StreamKind)-Parser->Count_Get((stream_t)StreamKind)+StreamPos, General_ID, ID, true);
- }
- #endif //MEDIAINFO_DEMUX
- }
- if (Format!=(int8u)-1)
- Fill(Container_StreamKind, Container_StreamKind==Stream_Video?0:Parser_Pos, Fill_Parameter(Container_StreamKind, Generic_CodecID), Format);
- if (Container_StreamKind==Stream_Video)
- for (size_t Pos=Count_Get(Stream_Audio)-Parser->Count_Get(Stream_Audio); Pos<Count_Get(Stream_Audio); Pos++)
- Fill(Stream_Audio, Pos, Audio_MuxingMode, Parser->Retrieve(Stream_General, 0, General_Format));
-}
-
-//---------------------------------------------------------------------------
-void File_Lxf::Streams_Finish()
-{
- if (Videos.size()>1 && Videos[1].Parsers.size()==1) //TODO: better handling of fill/finish for Ancillary data
- {
- Finish(Videos[1].Parsers[0]);
- Streams_Fill_PerStream(Videos[1].Parsers[0], Stream_Video, 1);
- }
- if (Videos.size()>2 && Videos[2].Parsers.size()==1)
- {
- Finish(Videos[2].Parsers[0]);
- Merge(*Videos[2].Parsers[0], Stream_Video, 0, 0);
-
- Ztring LawRating=Videos[2].Parsers[0]->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=Videos[2].Parsers[0]->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
- }
-
- if (Audios_Header.TimeStamp_End!=(int64u)-1 && Audios_Header.TimeStamp_Begin!=(int64u)-1 && Audios_Header.Duration_First!=(int64u)-1)
- {
- int64u Duration=float64_int64s(((float64)(Audios_Header.TimeStamp_End-Audios_Header.TimeStamp_Begin))/TimeStamp_Rate*1000);
- int64u FrameCount=float64_int64s(((float64)(Audios_Header.TimeStamp_End-Audios_Header.TimeStamp_Begin))/Audios_Header.Duration_First);
- for (size_t Pos=0; Pos<Count_Get(Stream_Audio); Pos++)
- {
- if (Retrieve(Stream_Audio, Pos, Audio_Duration).empty())
- Fill(Stream_Audio, Pos, Audio_Duration, Duration);
- if (Retrieve(Stream_Audio, Pos, Audio_FrameCount).empty())
- Fill(Stream_Audio, Pos, Audio_FrameCount, FrameCount);
- }
- Info_General_StreamSize+=FrameCount*0x48;
- }
- if (Videos_Header.TimeStamp_End!=(int64u)-1 && Videos_Header.TimeStamp_Begin!=(int64u)-1)
- {
- int64u Duration=float64_int64s(((float64)(Videos_Header.TimeStamp_End-Videos_Header.TimeStamp_Begin))/TimeStamp_Rate*1000);
- int64u FrameCount=float64_int64s(((float64)(Videos_Header.TimeStamp_End-Videos_Header.TimeStamp_Begin))/Videos_Header.Duration);
- if (Duration)
- for (size_t Pos=0; Pos<Count_Get(Stream_Video); Pos++)
- Fill(Stream_Video, Pos, Video_Duration, Duration, 10, true);
- Info_General_StreamSize+=FrameCount*0x48;
-
- if (Count_Get(Stream_Video)==1 && Retrieve(Stream_Video, 0, Video_BitRate).empty())
- {
- for (size_t Pos=0; Pos<Videos.size(); Pos++)
- if (Videos[Pos].BytesPerFrame!=(int64u)-1)
- Info_General_StreamSize+=Videos[Pos].BytesPerFrame*FrameCount;
- for (size_t Pos=0; Pos<Audios.size(); Pos++)
- if (Audios[Pos].BytesPerFrame!=(int64u)-1)
- Info_General_StreamSize+=Audios[Pos].BytesPerFrame*Retrieve(Stream_Audio, Pos, Audio_FrameCount).To_int64u();
- Fill(Stream_General, 0, General_StreamSize, Info_General_StreamSize);
- if (Info_General_StreamSize<File_Size)
- Fill(Stream_Video, 0, Video_StreamSize, File_Size-Info_General_StreamSize);
- }
- }
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Lxf::Synchronize()
-{
- //Synchronizing
- while (Buffer_Offset+20<=Buffer_Size && ( Buffer[Buffer_Offset ]!=0x4C
- || Buffer[Buffer_Offset+ 1]!=0x45
- || Buffer[Buffer_Offset+ 2]!=0x49
- || Buffer[Buffer_Offset+ 3]!=0x54
- || Buffer[Buffer_Offset+ 4]!=0x43
- || Buffer[Buffer_Offset+ 5]!=0x48
- || Buffer[Buffer_Offset+ 6]!=0x00
- || Buffer[Buffer_Offset+ 7]!=0x00
- ))
- {
- Buffer_Offset+=6+2;
- while (Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Buffer_Offset+=2;
- if (Buffer_Offset>=Buffer_Size || Buffer[Buffer_Offset-1]==0x00)
- Buffer_Offset--;
- Buffer_Offset-=6;
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+20>Buffer_Size)
- {
- while (Buffer_Offset+8>Buffer_Size)
- if (Buffer_Offset+8==Buffer_Size && CC8(Buffer+Buffer_Offset)!=0x4C45495443480000LL)
- Buffer_Offset++;
- else
- break;
- if (Buffer_Offset+7==Buffer_Size && CC7(Buffer+Buffer_Offset)!=0x4C454954434800LL)
- Buffer_Offset++;
- if (Buffer_Offset+6==Buffer_Size && CC6(Buffer+Buffer_Offset)!=0x4C4549544348LL)
- Buffer_Offset++;
- if (Buffer_Offset+5==Buffer_Size && CC5(Buffer+Buffer_Offset)!=0x4C45495443LL)
- Buffer_Offset++;
- if (Buffer_Offset+4==Buffer_Size && CC4(Buffer+Buffer_Offset)!=0x4C454954)
- Buffer_Offset++;
- if (Buffer_Offset+3==Buffer_Size && CC3(Buffer+Buffer_Offset)!=0x4C4549)
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && CC2(Buffer+Buffer_Offset)!=0x4C45)
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && CC1(Buffer+Buffer_Offset)!=0x4C)
- Buffer_Offset++;
- return false;
- }
-
- if (!Status[IsAccepted])
- {
- Accept();
-
- Fill(Stream_General, 0, General_Format, "LXF");
-
- File_Buffer_Size_Hint_Pointer=Config->File_Buffer_Size_Hint_Pointer_Get();
- }
-
- #if MEDIAINFO_SEEK
- //TimeStamp
- if (SeekRequest!=(int64u)-1)
- {
- if (TimeOffsets.find(File_Offset+Buffer_Offset)==TimeOffsets.end()) //Not already saved
- {
- if (Buffer_Offset+0x48>=Buffer_Size)
- return false;
- int32u Type =LittleEndian2int32u(Buffer+Buffer_Offset+16);
- if (Type==0) //Video
- {
- //Filling with the new frame
- Version=LittleEndian2int32u(Buffer+Buffer_Offset+8);
- int64u TimeStamp, Duration;
- switch (Version)
- {
- case 0 : TimeStamp =LittleEndian2int32u(Buffer+Buffer_Offset+24);
- Duration =LittleEndian2int32u(Buffer+Buffer_Offset+28);
- break;
- case 1 : TimeStamp =LittleEndian2int64u(Buffer+Buffer_Offset+24);
- Duration =LittleEndian2int64u(Buffer+Buffer_Offset+32);
- break;
- default: TimeStamp=Duration=0;
- }
- int8u PictureType=(LittleEndian2int8u (Buffer+Buffer_Offset+42)&0xC0)>>6;
- TimeOffsets[File_Offset+Buffer_Offset]=stream_header(TimeStamp, TimeStamp+Duration, Duration, PictureType);
- SeekRequest_Divider=2;
- }
- }
- if (Read_Buffer_Seek(2, (int64u)-1, (int64u)-1))
- return false;
- }
- #endif //MEDIAINFO_SEEK
-
- //Synched is OK
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Lxf::Synched_Test()
-{
- if (Video_Sizes_Pos<Video_Sizes.size())
- return true;
- if (Audio_Sizes_Pos<Audio_Sizes.size())
- return true;
-
- //Must have enough buffer for having header
- if (Buffer_Offset+16>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (CC8(Buffer+Buffer_Offset)!=0x4C45495443480000LL)
- Synched=false;
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Lxf::Read_Buffer_Unsynched()
-{
- Video_Sizes.clear();
- Audio_Sizes.clear();
- LastAudio_BufferOffset=(int64u)-1;
- LastAudio_TimeOffset=stream_header();
- Video_Sizes_Pos=(size_t)-1;
- Audio_Sizes_Pos=(size_t)-1;
- Videos_Header.TimeStamp_End=(int64u)-1;
- Audios_Header.TimeStamp_End=(int64u)-1;
-
- for (size_t Pos=0; Pos<Videos.size(); Pos++)
- for (size_t Pos2=0; Pos2<Videos[Pos].Parsers.size(); Pos2++)
- Videos[Pos].Parsers[Pos2]->Open_Buffer_Unsynch();
- for (size_t Pos=0; Pos<Audios.size(); Pos++)
- for (size_t Pos2=0; Pos2<Audios[Pos].Parsers.size(); Pos2++)
- Audios[Pos].Parsers[Pos2]->Open_Buffer_Unsynch();
-}
-
-//---------------------------------------------------------------------------
-void File_Lxf::Read_Buffer_Continue()
-{
- #if MEDIAINFO_DEMUX
- if (DemuxParser)
- {
- Open_Buffer_Continue(DemuxParser, Buffer+Buffer_Offset, 0, false);
- if (!Config->Demux_EventWasSent)
- DemuxParser=NULL; //No more need of it
- }
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_Lxf::Read_Buffer_Seek (size_t Method, int64u Value, int64u)
-{
- //Init
- if (!Duration_Detected)
- {
- MediaInfo_Internal MI;
- MI.Option(__T("File_KeepInfo"), __T("1"));
- Ztring ParseSpeed_Save=MI.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI.Option(__T("Demux_Get"), __T(""));
- MI.Option(__T("ParseSpeed"), __T("0"));
- MI.Option(__T("Demux"), Ztring());
- size_t MiOpenResult=MI.Open(File_Name);
- MI.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (!MiOpenResult || MI.Get(Stream_General, 0, General_Format)!=__T("LXF"))
- return 0;
- for (time_offsets::iterator TimeOffset=((File_Lxf*)MI.Info)->TimeOffsets.begin(); TimeOffset!=((File_Lxf*)MI.Info)->TimeOffsets.end(); ++TimeOffset)
- TimeOffsets[TimeOffset->first]=TimeOffset->second;
- int64u Duration=float64_int64s(Ztring(MI.Get(Stream_General, 0, __T("Duration"))).To_float64()*TimeStamp_Rate/1000);
- TimeOffsets[File_Size]=stream_header(Duration, Duration, 0, (int8u)-1);
- SeekRequest_Divider=2;
- Duration_Detected=true;
- }
-
- //Parsing
- switch (Method)
- {
- case 0 : Open_Buffer_Unsynch(); GoTo(Value); return 1;
- case 1 : Open_Buffer_Unsynch(); GoTo(File_Size*Value/10000); return 1;
- case 3 : //Frame
- {
- if (FrameRate==0 && Videos_Header.TimeStamp_End!=(int64u)-1 && Videos_Header.TimeStamp_End-Videos_Header.TimeStamp_Begin!=0)
- FrameRate=TimeStamp_Rate/(Videos_Header.TimeStamp_End-Videos_Header.TimeStamp_Begin);
- if (FrameRate==0)
- return (size_t)-1; //Not supported
- float64 TimeStamp=((float64)Value)/FrameRate;
- Value=float64_int64s(TimeStamp*1000000000); // In nanoseconds
- }
- case 2 : //Timestamp
- {
- if (Value!=(int64u)-1)
- {
- Value=float64_int64s((float64)Value*TimeStamp_Rate/1000000000); //Convert in LXF unit
- time_offsets::iterator End=TimeOffsets.end();
- --End;
- if (Value>=End->second.TimeStamp_End)
- return 2; //Higher than total size
- SeekRequest=Value;
- }
-
- //Looking if we already have the timestamp
- int64u SeekRequest_Mini=SeekRequest; if (SeekRequest_Mini>1000000) SeekRequest_Mini-=float64_int64s(TimeStamp_Rate/1000); //-1ms
- int64u SeekRequest_Maxi=SeekRequest+float64_int64s(TimeStamp_Rate/1000); //+1ms
- for (time_offsets::iterator TimeOffset=TimeOffsets.begin(); TimeOffset!=TimeOffsets.end(); ++TimeOffset)
- {
- if (TimeOffset->second.TimeStamp_Begin<=SeekRequest_Maxi && TimeOffset->second.TimeStamp_End>=SeekRequest_Mini) //If it is found in a frame we know
- {
- //Looking for the corresponding I-Frame
- while (TimeOffset->second.PictureType&0x2 && TimeOffset!=TimeOffsets.begin()) //Not an I-Frame (and not fisrt frame)
- {
- time_offsets::iterator Previous=TimeOffset;
- --Previous;
- if (Previous->second.TimeStamp_End!=TimeOffset->second.TimeStamp_Begin) //Testing if the previous frame is not known.
- {
- SeekRequest=TimeOffset->second.TimeStamp_Begin-(float64_int64s(TimeStamp_Rate/1000)+1); //1ms+1, so we are sure to not synch on the current frame again
- Open_Buffer_Unsynch();
- GoTo((Previous->first+TimeOffset->first)/2);
- return 1; //Looking for previous frame
-
- }
- TimeOffset=Previous;
- }
-
- //We got the right I-Frame
- if (Value==0)
- {
- for (size_t Pos=0; Pos<Videos.size(); Pos++)
- for (size_t Pos2=0; Pos2<Videos[Pos].Parsers.size(); Pos2++)
- Videos[Pos].Parsers[Pos2]->Unsynch_Frame_Count=0;
- }
- Open_Buffer_Unsynch();
- GoTo(TimeOffset->first);
- SeekRequest=(int64u)-1;
- return 1;
- }
-
- if (TimeOffset->second.TimeStamp_Begin>SeekRequest_Maxi) //Testing if too far
- {
- time_offsets::iterator Previous=TimeOffset; --Previous;
- int64u ReferenceOffset;
- if (File_Offset+Buffer_Offset==TimeOffset->first && TimeOffset->second.TimeStamp_Begin>SeekRequest) //If current frame is already too far
- ReferenceOffset=File_Offset+Buffer_Offset;
- else
- ReferenceOffset=TimeOffset->first;
- if (SeekRequest_Divider==0)
- {
- SeekRequest=Previous->second.TimeStamp_Begin-(float64_int64s(TimeStamp_Rate/1000)+1); //1ms+1, so we are sure to not synch on the current frame again
- ReferenceOffset=Previous->first;
- --Previous;
- SeekRequest_Divider=2;
- }
- Open_Buffer_Unsynch();
- GoTo(Previous->first+(ReferenceOffset-Previous->first)/SeekRequest_Divider);
- SeekRequest_Divider*=2;
- return 1;
- }
- }
- }
- return 0;
- default : return (size_t)-1;
- }
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Lxf::Header_Begin()
-{
- if (Buffer_Offset+16>Buffer_Size)
- return false;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Lxf::Header_Parse()
-{
- while (Video_Sizes_Pos<Video_Sizes.size() && Video_Sizes[Video_Sizes_Pos]==0)
- Video_Sizes_Pos++;
- if (Video_Sizes_Pos<Video_Sizes.size())
- {
- //Filling
- Header_Fill_Code(0x100+Video_Sizes_Pos, __T("Stream"));
- Header_Fill_Size(Video_Sizes[Video_Sizes_Pos]);
- Video_Sizes_Pos++;
- return;
- }
- while (Audio_Sizes_Pos<Audio_Sizes.size() && Audio_Sizes[Audio_Sizes_Pos]==0)
- Audio_Sizes_Pos++;
- if (Audio_Sizes_Pos<Audio_Sizes.size())
- {
- //Filling
- Header_Fill_Code(0x200+Audio_Sizes_Pos, __T("Stream"));
- Header_Fill_Size(Audio_Sizes[Audio_Sizes_Pos]);
- Audio_Sizes_Pos++;
- return;
- }
-
- //Parsing
- int64u BlockSize=0, TimeStamp=0, Duration=0;
- int32u HeaderSize, Type;
- Skip_C8( "Signature");
- Get_L4 (Version, "Version"); //0=start and duration are in field, 1=in 27 MHz values
- Get_L4 (HeaderSize, "Header size");
- if (Element_Size<HeaderSize)
- {
- Element_WaitForMoreData();
- return;
- }
- if (Version>1)
- {
- //Filling
- Header_Fill_Code(0, "Unknown");
- Header_Fill_Size(HeaderSize);
- Synched=false;
- return;
- }
- Get_L4 (Type, "Type");
- Skip_L4( "Stream ID");
- switch (Version)
- {
- case 0 :
- {
- int32u TimeStamp4, Duration4;
- Get_L4 (TimeStamp4, "TimeStamp");
- TimeStamp=TimeStamp4;
- Param_Info3(((float64)TimeStamp4)/TimeStamp_Rate, 3, " s");
- FrameInfo.DTS=FrameInfo.PTS=float64_int64s(((float64)TimeStamp)*1000000000/TimeStamp_Rate);
- Get_L4 (Duration4, "Duration");
- Duration=Duration4;
- Param_Info3(((float64)Duration)/TimeStamp_Rate, 3, " s");
- FrameInfo.DUR=float64_int64s(((float64)Duration)*1000000000/TimeStamp_Rate);
- }
- break;
- case 1 :
- Get_L8 (TimeStamp, "TimeStamp"); Param_Info3(((float64)TimeStamp)/720000, 3, " s"); FrameInfo.DTS=FrameInfo.PTS=float64_int64s(((float64)TimeStamp)*1000000/720);
- Get_L8 (Duration, "Duration"); Param_Info3(((float64)Duration)/720000, 3, " s"); FrameInfo.DUR=float64_int64s(((float64)Duration)*1000000/720);
- break;
- default: ;
- }
- switch(Type)
- {
- case 0 : //Video
- {
- Video_Sizes.resize(3);
- int32u Size;
- int8u VideoFormat, GOP_M, PictureType;
- BS_Begin_LE();
- Get_T1 (4, VideoFormat, "Format"); Param_Info1(Lxf_Format_Video[VideoFormat]);
- Skip_T1(7, "GOP (N)");
- Get_T1 (3, GOP_M, "GOP (M)");
- Info_T1(8, BitRate, "Bit rate"); Param_Info2((BitRate*(BitRate>60?10:(BitRate>50?5:1))-(BitRate>60?500:(BitRate>50?200:0)))*1000000, " bps");
- Get_T1 (2, PictureType, "Picture type"); Param_Info1(Lxf_PictureType[PictureType]);
- BS_End_LE();
- Skip_L1( "Reserved");
- Get_L4(Size, "Video data size");
- Skip_L4( "Zero");
- if (!Video_Sizes.empty())
- Video_Sizes[2]=Size;
- BlockSize+=Size;
- Get_L4(Size, "VBI data size");
- if (!Video_Sizes.empty())
- Video_Sizes[1]=Size;
- BlockSize+=Size;
- Skip_L4( "Zero");
- Get_L4(Size, "Meta data size");
- if (!Video_Sizes.empty())
- Video_Sizes[0]=Size;
- BlockSize+=Size;
- if (Videos_Header.TimeStamp_Begin==(int64u)-1)
- Videos_Header.TimeStamp_Begin=TimeStamp;
- Videos_Header.TimeStamp_End=TimeStamp+Duration;
- Videos_Header.Duration=Duration;
- if (TimeStamp==LastAudio_TimeOffset.TimeStamp_Begin)
- TimeOffsets[LastAudio_BufferOffset]=stream_header(TimeStamp, TimeStamp+Duration, Duration, PictureType);
- else
- TimeOffsets[File_Offset+Buffer_Offset]=stream_header(TimeStamp, TimeStamp+Duration, Duration, PictureType);
- int64u PTS_Computing=TimeStamp;
- #if MEDIAINFO_DEMUX
- switch (PictureType)
- {
- case 2 :
- case 3 : Demux_random_access=false; break; //P-Frame, B-Frame
- default: Demux_random_access=true ; //I-Frame
- }
- #endif //MEDIAINFO_DEMUX
- if (2>Videos.size())
- Videos.resize(2+1);
- if (!Video_Sizes.empty())
- Videos[2].Format=VideoFormat;
- if (GOP_M>1) //With B-frames
- {
- switch (PictureType)
- {
- case 2 : PTS_Computing+=GOP_M*Duration; break; //P-Frame
- case 3 : break; //B-Frame
- default: PTS_Computing+=Duration; //I-Frame
- }
- }
- FrameInfo.PTS=float64_int64s(((float64)PTS_Computing)*1000000000/TimeStamp_Rate);
- }
- break;
- case 1 : //Audio
- {
- int32u Size;
- int8u Channels_Count=0;
-
- if (Version==0)
- {
- Skip_L4( "First Active Field");
- Skip_L4( "Total fields in packet");
- }
- BS_Begin_LE();
- Get_T1 ( 6, SampleSize, "Sample size");
- Skip_T1( 6, "Sample precision");
- Skip_T1(20, "Reserved");
- BS_End_LE();
- Element_Begin1("Tracks mask");
- BS_Begin_LE();
- for (size_t Pos=0; Pos<32; Pos++)
- {
- bool Channel;
- Get_TB(Channel, "Channel");
- if (Channel)
- Channels_Count++;
- }
- BS_End_LE();
- Element_End0();
- Get_L4(Size, "Track size");
- Skip_L4( "Zero");
- if (Version>=1)
- {
- Skip_L4( "Zero");
- Skip_L4( "Zero");
- }
- Audio_Sizes.resize(Channels_Count);
- for (size_t Pos=0; Pos<Audio_Sizes.size(); Pos++)
- Audio_Sizes[Pos]=Size;
- BlockSize=Size*Channels_Count;
- if (Audios_Header.TimeStamp_Begin==(int64u)-1)
- Audios_Header.TimeStamp_Begin=TimeStamp;
- Audios_Header.TimeStamp_End=TimeStamp+Duration;
- Audios_Header.Duration=Duration;
- if (Audios_Header.Duration_First==(int64u)-1 && Duration)
- Audios_Header.Duration_First=Duration;
- LastAudio_BufferOffset=File_Offset+Buffer_Offset;
- LastAudio_TimeOffset=stream_header(TimeStamp, TimeStamp+Duration, Duration, (int8u)-1);
- #if MEDIAINFO_DEMUX
- Demux_random_access=true;
- #endif //MEDIAINFO_DEMUX
- }
- break;
- case 2 : //Header
- {
- Header_Sizes.resize(2);
- int32u SegmentFormat, Size;
-
- Get_L4 (SegmentFormat, "Segment format");
- Get_L4 (Size, "Data size");
- Header_Sizes[0]=Size;
- BlockSize+=Size;
- if (SegmentFormat)
- {
- Get_L4 (Size, "Extended fields size");
- Header_Sizes[1]=Size;
- BlockSize+=Size;
- }
- Skip_L4( "Zero");
- Skip_L4( "Zero");
- Skip_L4( "Zero");
- }
- break;
- default : BlockSize=0;
- }
- Skip_L4( "Checksum");
- if (Version)
- Skip_L4( "Zero");
-
- if (Element_Offset<HeaderSize)
- Skip_XX(Header_Size-Element_Offset, "Unknown");
-
- if (Buffer_Offset+Element_Offset+BlockSize>Buffer_Size)
- {
- //Hints
- if (File_Buffer_Size_Hint_Pointer)
- {
- size_t Buffer_Size_Target=(size_t)(Buffer_Offset+0x48+BlockSize+0x48); //+0x48 for next packet header
- if ((*File_Buffer_Size_Hint_Pointer)<Buffer_Size_Target)
- (*File_Buffer_Size_Hint_Pointer)=Buffer_Size_Target;
- }
- }
-
- //Filling
- Header_Fill_Code(Type, Ztring::ToZtring(Type));
- Header_Fill_Size(HeaderSize+BlockSize);
-}
-
-//---------------------------------------------------------------------------
-void File_Lxf::Data_Parse()
-{
- switch(Element_Code)
- {
- case 0 : Video(); break;
- case 1 : Audio(); break;
- case 2 : Header(); break;
- default :
- if (Element_Code&0x000100)
- Video_Stream(Element_Code&0xFF);
- else if (Element_Code&0x000200)
- Audio_Stream(Element_Code&0xFF);
- else
- Skip_XX(Element_Size, "Unknown");
- }
-
- FILLING_BEGIN();
- if (Element_Code&0x000100 && (Element_Code&0xFF)==2) //Checking Video stream 2
- {
- Frame_Count++;
- if (!Status[IsFilled] && ((Frame_Count>6 && (Stream_Count==0 ||Config->ParseSpeed==0.0)) || Frame_Count>512)) //5 video frames for 1 Audio frame
- {
- Fill("LXF");
- if (MediaInfoLib::Config.ParseSpeed_Get()<1)
- {
- LookingForLastFrame=true;
- if (3*(File_Offset+Buffer_Offset)<=File_Size)
- {
- GoToFromEnd((File_Offset+Buffer_Offset)*2*6/Frame_Count);
- Open_Buffer_Unsynch();
- }
- }
- }
- }
- FILLING_END();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Lxf::Header()
-{
- Element_Name("Header");
-
- for (size_t Pos=0; Pos<Header_Sizes.size(); Pos++)
- {
- switch(Pos)
- {
- case 0 : Header_Info(); break;
- case 1 : Header_Meta(); break;
- default : Skip_XX(Header_Sizes[Pos], "Data");
- }
- }
- Header_Sizes.clear();
-
- Info_General_StreamSize=0x48+Element_Size;
-
- #if MEDIAINFO_DEMUX
- if (Config->NextPacket_Get() && Config->Event_CallBackFunction_IsSet())
- Config->Demux_EventWasSent=true; //First set is to indicate the user that header is parsed
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-void File_Lxf::Header_Info()
-{
- Element_Begin1("Disk segment");
-
- //Parsing
- int64u End=Element_Offset+Header_Sizes[0];
- if (Header_Sizes[0]>=120)
- {
- Skip_L4( "prev");
- Skip_L4( "next");
- Skip_L4( "videoClusters");
- Skip_L4( "audioClusters");
- Skip_C8( "ID");
- Skip_L4( "minFrame");
- Skip_L4( "start");
- Skip_L4( "duration");
- Skip_L4( "tcOffset");
- BS_Begin_LE();
- Skip_T1(4, "Format");
- Skip_T1(7, "GOP (N)");
- Skip_T1(3, "GOP (M)");
- Skip_T1(8, "Bit rate");
- Skip_TB( "VBI present");
- Skip_TB( "Aspect Ratio");
- BS_End_LE();
- Skip_L1( "reserved");
- Skip_L4( "base");
- Skip_L4( "prev");
- Skip_L4( "next");
- BS_Begin_LE();
- Skip_T1(7, "recordDate - Year");
- Skip_T1(4, "recordDate - Month");
- Skip_T1(5, "recordDate - Day");
- Skip_T1(7, "killDate - Year");
- Skip_T1(4, "killDate - Month");
- Skip_T1(5, "killDate - Day");
- BS_End_LE();
- Skip_L1( "tc_type");
- Skip_L1( "status");
- Skip_L1( "disk");
- Skip_String(26, "description");
- Skip_String(16, "agency");
- Skip_String( 6, "description");
- Skip_L1( "videoGain");
- Skip_L1( "videoSetup");
- Skip_L1( "chromaGain");
- Skip_L1( "hueLSB");
- Skip_L1( "reserved");
- BS_Begin_LE();
- Skip_T1(2, "hueMSB");
- Skip_T1(4, "audioTracks");
- Skip_TB( "writeProtected");
- Skip_TB( "allocated");
- Skip_TB( "sliding");
- Skip_TB( "tcTranslate");
- Skip_TB( "invisible");
- Skip_TB( "macro");
- Skip_TB( "alpha");
- Skip_TB( "project");
- Skip_TB( "purged");
- Skip_TB( "reference");
- Skip_TB( "looping");
- Skip_TB( "notReadyToPlay");
- Skip_TB( "notReadyToTransfer");
- Skip_TB( "notReadyToArchive");
- Skip_TB( "transferInProgress");
- Skip_T2(11, "reserved");
- BS_End_LE();
- }
- if (Element_Offset<End)
- Skip_XX(End-Element_Offset, "Unknown");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Lxf::Header_Meta()
-{
- Element_Begin1("Extended fields area");
-
- int64u Offset=0;
- int64u Pos=0;
-
- while (Offset<Header_Sizes[1])
- {
- int8u Size;
- Get_L1 (Size, "Size");
- if (Size)
- {
- switch (Pos)
- {
- case 0 : //Record Date/Time
- {
- Skip_XX(Size, "Record Date/Time");
- }
- break;
- case 1 : //Codec Where Recorded
- {
- Ztring Library;
- Get_UTF8(Size, Library, "Codec Where Recorded");
- Fill(Stream_General, 0, General_Encoded_Library, Library);
- }
- break;
- case 2 : //Source Handle
- {
- Skip_XX(Size, "Source Handle");
- }
- break;
- case 3 : //UMID
- {
- Skip_XX(Size, "UMID");
- }
- break;
- case 4 : //Video size / rate info
- {
- if (Size==0x10)
- {
- Element_Begin1("Video size / rate info");
- BS_Begin_LE();
- Element_Begin1("formatCode");
- int8u formatCode=(int8u)-1;
- for (int8u Pos=0; Pos<96; Pos++)
- {
- bool Temp;
- Get_TB (Temp, "formatCode bit");
- if (Temp)
- {
- if (formatCode==(int8u)-1)
- formatCode=Pos;
- else
- formatCode=(int8u)-2; //problem
- }
- }
- if (formatCode<96)
- {
- int8u frameRateCode=formatCode%8;
- #if MEDIAINFO_TRACE
- int8u temp=formatCode/8;
- int8u scanType=temp%2;
- int8u verticalsizeCode=temp/2;
- Element_Info(verticalsizeCode);
- Element_Info(scanType);
- #endif //MEDIAINFO_TRACE
- if (frameRateCode<16-1)
- {
- FrameRate=Mpegv_frame_rate[frameRateCode+1];
- if (Version==0)
- TimeStamp_Rate=FrameRate*2; //Time stamp is in fields
- Element_Info3(FrameRate, 3, " fps");
- }
- }
- Element_End0();
- Skip_TB( "field");
- Skip_TB( "interlaced");
- Skip_TB( "progressive");
- Skip_TB( "pulldown");
- Skip_TB( "chroma 420");
- Skip_TB( "chroma 422");
- Skip_TB( "chroma 311");
- Skip_TB( "PAR 1:1");
- Skip_TB( "PAR 4:3");
- Skip_T4(23, "Zero");
- BS_End_LE();
- Element_End0();
- }
- else
- Skip_XX(Size, "Video size / rate info");
- }
- break;
- case 5 : //Source Video Info
- {
- Skip_XX(Size, "Source Video Info");
- }
- break;
- case 6 : //GUID
- {
- Skip_XX(Size, "GUID");
- }
- break;
- case 7 : //User Name
- {
- Ztring Channel;
- Get_UTF16L(Size, Channel, "User Name");
- Fill(Stream_General, 0, General_EncodedBy, Channel);
- }
- break;
- case 8 : //Department
- {
- Skip_UTF16L(Size, "Department");
- }
- break;
- case 9 : //Reserved
- case 10 : //Reserved
- {
- Skip_XX(Size, "Reserved");
- }
- break;
- case 11 : //Link
- {
- Skip_XX(Size, "Link");
- }
- break;
- case 12 : //Extended Description
- {
- Ztring Title;
- Get_UTF16L(Size, Title, "Extended Description");
- Fill(Stream_General, 0, General_Title, Title);
- }
- break;
- case 13 : //Extended Agency
- {
- Ztring Title;
- Get_UTF16L(Size, Title, "Extended Agency");
- Fill(Stream_General, 0, General_EncodedBy, Title);
- }
- break;
- case 14 : //User-definable Field
- case 15 : //User-definable Field
- case 16 : //User-definable Field
- case 17 : //User-definable Field
- {
- Ztring Comment;
- Get_UTF16L(Size, Comment, "User-definable Field");
- Fill(Stream_General, 0, General_Comment, Comment);
- }
- break;
- case 18 : //External Controller UID
- {
- Skip_XX(Size, "External Controller UID");
- }
- break;
- case 19 : //Video ARC
- {
- Skip_XX(Size, "Video ARC");
- }
- break;
- case 20 : //Modified Timestamp
- {
- Skip_XX(Size, "Modified Timestamp");
- }
- break;
- case 21 : //Video QA Status
- {
- Skip_XX(Size, "Video QA Status");
- }
- break;
- case 22 : //User Segments In Use (bitmask)
- {
- Skip_XX(Size, "User Segments In Use");
- }
- break;
- case 23 : //Audio Track Info
- {
- BS_Begin_LE();
- for (int8u Pos=0; Pos<Size; Pos++)
- {
- int8u Format;
- Skip_TB( "Group / AES pair");
- Skip_T1(3, "Channels (modulo 8)");
- Get_T1 (3, Format, "Audio format");
- Skip_TB( "Metadata in ANC");
-
- if (Pos>=Audios.size())
- Audios.resize(Pos+1);
- Audios[Pos].Format=Format;
- }
- BS_End_LE();
- }
- break;
- case 24 : //Audio Tag Info
- {
- for (int8u Pos=0; Pos<Size; Pos++)
- Skip_L1( "Language");
- }
- break;
- default : Skip_XX(Size, "Data");
- }
- }
- Offset+=1+Size;
- Pos++;
- }
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Lxf::Audio()
-{
- Element_Name("Audio");
-
- #if MEDIAINFO_SEEK
- if (FrameRate==0 && Audios_Header.TimeStamp_End-Audios_Header.TimeStamp_Begin!=0)
- FrameRate=TimeStamp_Rate/(Audios_Header.TimeStamp_End-Audios_Header.TimeStamp_Begin);
- #endif //MEDIAINFO_SEEK
-
- Audio_Sizes_Pos=0;
- Element_ThisIsAList();
-}
-
-//---------------------------------------------------------------------------
-void File_Lxf::Audio_Stream(size_t Pos)
-{
- if (LookingForLastFrame || (Config->ParseSpeed<1 && Pos<Audios.size() && Audios[Pos].IsFilled))
- {
- Skip_XX(Element_Size, "Data");
- return;
- }
-
- if (Pos>=Audios.size())
- Audios.resize(Pos+1);
- if (Audios[Pos].Parsers.empty())
- {
- //Trying to detect if this is PCM
- /*
- switch (Audios[Pos].Format)
- {
- case (int8u)-1 : //PCM without codec identifier (default)
- case 0 : //PCM
- {
- #ifdef MEDIAINFO_SMPTEST0337_YES
- {
- File_ChannelGrouping* Parser=new File_ChannelGrouping;
- if (Pos%2 && !Audios[Pos-1].Parsers.empty())
- {
- Parser->Channel_Pos=1;
- Parser->Common=((File_ChannelGrouping*)Audios[Pos-1].Parsers[0])->Common;
- Parser->StreamID=Pos-1;
- Element_Code--;
- }
- else
- {
- Parser->Channel_Pos=0;
- Parser->SampleRate=48000;
- }
- Parser->Channel_Total=2;
- Parser->ByteDepth=SampleSize/8;
-
- Open_Buffer_Init(Parser);
- Audios[Pos].Parsers.push_back(Parser);
- }
- #endif //MEDIAINFO_SMPTEST0337_YES
-
- Audios[Pos].BytesPerFrame=Audio_Sizes[Pos];
-
- #ifdef MEDIAINFO_PCM_YES
- File_Pcm* Parser=new File_Pcm;
- Parser->SamplingRate=48000;
- Parser->Channels=1;
- Parser->BitDepth=SampleSize;
- Parser->Endianness='L';
- #if !defined(MEDIAINFO_MPEGA_YES) && !defined(MEDIAINFO_SMPTEST0337_YES)
- Parser->Frame_Count_Valid=1;
- #else
- Parser->Frame_Count_Valid=2;
- #endif
- #else //MEDIAINFO_PCM_YES
- File__Analyze* Parser=new File__Analyze;
- #endif //MEDIAINFO_PCM_YES
- Open_Buffer_Init(Parser);
- #ifndef MEDIAINFO_PCM_YES
- Parser->Accept();
- Parser->Stream_Prepare(Stream_Audio);
- int64u BitRate=float64_int64s(Audio_Sizes[Pos]*TimeStamp_Rate*8/(Audios_Header.TimeStamp_End-Audios_Header.TimeStamp_Begin));
- Parser->Fill(Stream_Audio, StreamPos_Last, Audio_BitRate, BitRate);
- Parser->Fill(Stream_Audio, 0, Audio_BitRate_Mode, "CBR");
- Parser->Fill(Stream_Audio, StreamPos_Last, Audio_Format, "PCM");
- Parser->Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, 48000);
- Parser->Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, 1);
- Parser->Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, SampleSize);
- Parser->Fill();
- #endif //MEDIAINFO_PCM_YES
- Audios[Pos].Parsers.push_back(Parser);
-
- #ifdef MEDIAINFO_MPEGA_YES
- {
- File_Mpega* Parser=new File_Mpega();
- Open_Buffer_Init(Parser);
- Audios[Pos].Parsers.push_back(Parser);
- }
- #endif //MEDIAINFO_MPEGA_YES
- }
- break;
- case 1 : //DTS
- {
- #ifdef MEDIAINFO_DTS_YES
- File_Dts* Parser=new File_Dts();
- #else //MEDIAINFO_DTS_YES
- File__Analyze* Parser=new File__Analyze;
- #endif //MEDIAINFO_DTS_YES
- Open_Buffer_Init(Parser);
- Audios[Pos].Parsers.push_back(Parser);
- }
- break;
- case 2 : //AC-3
- case 5 : //E-AC-3
- {
- #ifdef MEDIAINFO_AC3_YES
- File_Ac3* Parser=new File_Ac3;
- #else //MEDIAINFO_AAC_YES
- File__Analyze* Parser=new File__Analyze;
- #endif //MEDIAINFO_AAC_YES
- Open_Buffer_Init(Parser);
- Audios[Pos].Parsers.push_back(Parser);
- }
- break;
- case 3 : //Dolby E
- {
- #ifdef MEDIAINFO_SMPTEST0337_YES
- {
- File_ChannelGrouping* Parser=new File_ChannelGrouping;
- if (Pos%2 && !Audios[Pos-1].Parsers.empty())
- {
- Parser->Channel_Pos=1;
- Parser->Common=((File_ChannelGrouping*)Audios[Pos-1].Parsers[0])->Common;
- Parser->StreamID=Pos-1;
- Element_Code--;
- }
- else
- {
- Parser->Channel_Pos=0;
- Parser->SampleRate=48000;
- }
- Parser->Channel_Total=2;
- Parser->ByteDepth=SampleSize/8;
-
- Open_Buffer_Init(Parser);
- Audios[Pos].Parsers.push_back(Parser);
- }
- #endif //MEDIAINFO_SMPTEST0337_YES
-
- #ifdef MEDIAINFO_DOLBYE_YES
- File_DolbyE* Parser=new File_DolbyE();
- #else //MEDIAINFO_DOLBYE_YES
- File__Analyze* Parser=new File__Analyze;
- #endif //MEDIAINFO_DOLBYE_YES
- Open_Buffer_Init(Parser);
- Audios[Pos].Parsers.push_back(Parser);
- }
- case 4 :
- {
- #ifdef MEDIAINFO_MPEGA_YES
- File_Mpega* Parser=new File_Mpega();
- #else //MEDIAINFO_MPEGA_YES
- File__Analyze* Parser=new File__Analyze;
- #endif //MEDIAINFO_MPEGA_YES
- Open_Buffer_Init(Parser);
- Audios[Pos].Parsers.push_back(Parser);
- }
- break;
- case 6 :
- {
- #ifdef MEDIAINFO_AAC_YES
- File_Aac* Parser=new File_Aac();
- Parser->Mode=File_Aac::Mode_ADTS;
- #else //MEDIAINFO_AAC_YES
- File__Analyze* Parser=new File__Analyze;
- #endif //MEDIAINFO_AAC_YES
- Open_Buffer_Init(Parser);
- Audios[Pos].Parsers.push_back(Parser);
- }
- break;
- default :
- {
- File__Analyze* Parser=new File__Analyze;
- Open_Buffer_Init(Parser);
- Audios[Pos].Parsers.push_back(Parser);
- }
- }
- */
-
- #ifdef MEDIAINFO_SMPTEST0337_YES
- if (!(Pos%2 && Audios[Pos-1].Parsers.size()<=1)) //If the first half-stream was already rejected, don't try this one
- {
- File_ChannelGrouping* Parser=new File_ChannelGrouping;
- if (Pos%2 && !Audios[Pos-1].Parsers.empty())
- {
- Parser->Channel_Pos=1;
- Parser->Common=((File_ChannelGrouping*)Audios[Pos-1].Parsers[0])->Common;
- Parser->StreamID=Pos-1;
- }
- else
- Parser->Channel_Pos=0;
- Parser->BitDepth=SampleSize;
- Parser->Channel_Total=2;
- Parser->SamplingRate=48000;
- Parser->Endianness='L';
-
- Audios[Pos].Parsers.push_back(Parser);
- }
- #endif //MEDIAINFO_SMPTEST0337_YES
- #ifdef MEDIAINFO_SMPTEST0337_YES
- {
- File_SmpteSt0337* Parser=new File_SmpteSt0337;
- Parser->Container_Bits=SampleSize;
- Parser->Endianness='L';
- Parser->Aligned=true;
-
- Audios[Pos].Parsers.push_back(Parser);
- }
- #endif //MEDIAINFO_SMPTEST0337_YES
- #ifdef MEDIAINFO_AC3_YES
- Audios[Pos].Parsers.push_back(new File_Ac3());
- #endif //MEDIAINFO_AC3_YES
- #ifdef MEDIAINFO_DTS_YES
- Audios[Pos].Parsers.push_back(new File_Dts());
- #endif //MEDIAINFO_DTS_YES
- #ifdef MEDIAINFO_MPEGA_YES
- Audios[Pos].Parsers.push_back(new File_Mpega());
- #endif //MEDIAINFO_MPEGA_YES
- #ifdef MEDIAINFO_AAC_YES
- {
- File_Aac* Parser=new File_Aac;
- Parser->Mode=File_Aac::Mode_ADTS;
-
- Audios[Pos].Parsers.push_back(Parser);
- }
- #endif //MEDIAINFO_AAC_YES
- #ifdef MEDIAINFO_PCM_YES
- {
- File_Pcm* Parser=new File_Pcm;
- Parser->SamplingRate=48000;
- Parser->Channels=1;
- Parser->BitDepth=SampleSize;
- Parser->Endianness='L';
- #if !defined(MEDIAINFO_SMPTEST0337_YES) && !defined(MEDIAINFO_MPEGA_YES)
- Parser->Frame_Count_Valid=1;
- #else
- Parser->Frame_Count_Valid=2;
- #endif
-
- Audios[Pos].Parsers.push_back(Parser);
- }
- #endif //MEDIAINFO_PCM_YES
-
- for (size_t Pos2=0; Pos2<Audios[Pos].Parsers.size(); Pos2++)
- {
- Open_Buffer_Init(Audios[Pos].Parsers[Pos2]);
-
- #if MEDIAINFO_DEMUX
- //There are several frames in 1 block, we must rely on the stream parser
- if (Config->Demux_Unpacketize_Get())
- {
- Audios[Pos].Parsers[Pos2]->Demux_Level=2; //Container
- Audios[Pos].Parsers[Pos2]->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- }
-
- Stream_Count++;
- }
-
- /*
- #if MEDIAINFO_DEMUX
- #if MEDIAINFO_SEEK
- if (SeekRequest==(int64u)-1)
- #endif //MEDIAINFO_SEEK
- {
- Element_Code=0x200+Pos;
- Frame_Count_NotParsedIncluded=float64_int64s(((float64)(Audios_Header.TimeStamp_End-Audios_Header.Duration))/TimeStamp_Rate*FrameRate);
- if (SampleSize==20 && Config->Demux_PCM_20bitTo16bit_Get())
- {
- //Removing bits 3-0 (Little endian)
- int8u* SixteenBit=new int8u[(size_t)Audio_Sizes[Pos]];
- size_t SixteenBit_Pos=0;
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
- size_t Buffer_Max=Buffer_Offset+(size_t)(Element_Offset+Audio_Sizes[Pos]);
-
- while (Buffer_Pos+5<=Buffer_Max)
- {
- int64u Temp=LittleEndian2int40u(Buffer+Buffer_Pos);
- Temp=((Temp&0xFFFF000000LL)>>8)|((Temp&0xFFFF0LL)>>4);
- int32s2LittleEndian(SixteenBit+SixteenBit_Pos, (int32s)Temp);
- SixteenBit_Pos+=4;
- Buffer_Pos+=5;
- }
-
- Demux(SixteenBit, SixteenBit_Pos, ContentType_MainStream);
-
- delete[] SixteenBit;
- }
- else if (SampleSize==20 && Config->Demux_PCM_20bitTo24bit_Get())
- {
- //Padding bits 3-0 (Little endian)
- int8u* Output=new int8u[(size_t)Audio_Sizes[Pos]*24/20];
- size_t Output_Pos=0;
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
- size_t Buffer_Max=Buffer_Offset+(size_t)(Element_Offset+Audio_Sizes[Pos]);
-
- while (Buffer_Pos+5<=Buffer_Max)
- {
- Output[Output_Pos ] = Buffer[Buffer_Pos+0]<<4 ;
- Output[Output_Pos+1] = (Buffer[Buffer_Pos+1]<<4 ) | (Buffer[Buffer_Pos+0]>>4 );
- Output[Output_Pos+2] = (Buffer[Buffer_Pos+2]<<4 ) | (Buffer[Buffer_Pos+1]>>4 );
- Output[Output_Pos+3] = Buffer[Buffer_Pos+2]&0xF0 ;
- Output[Output_Pos+4] = Buffer[Buffer_Pos+3] ;
- Output[Output_Pos+5] = Buffer[Buffer_Pos+4] ;
-
- Buffer_Pos+=5;
- Output_Pos+=6;
- }
-
- Demux(Output, Output_Pos, ContentType_MainStream);
-
- delete[] Output;
- }
- else
- Demux(Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)Audio_Sizes[Pos], ContentType_MainStream);
- }
- #endif //MEDIAINFO_DEMUX
- */
-
- #if MEDIAINFO_DEMUX
- #if MEDIAINFO_SEEK
- if (SeekRequest==(int64u)-1)
- #endif //MEDIAINFO_SEEK
- {
- Element_Code=0x200+Pos;
- Frame_Count_NotParsedIncluded=float64_int64s(((float64)(Audios_Header.TimeStamp_End-Audios_Header.Duration))/TimeStamp_Rate*FrameRate);
- Demux_Level=4; //Intermediate
- Demux(Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)Audio_Sizes[Pos], ContentType_MainStream);
- }
- #endif //MEDIAINFO_DEMUX
-
- //Parsing
- Frame_Count_NotParsedIncluded=float64_int64s(((float64)(Audios_Header.TimeStamp_End-Audios_Header.Duration))/TimeStamp_Rate*FrameRate);
- for (size_t Pos2=0; Pos2<Audios[Pos].Parsers.size(); Pos2++)
- {
- if (Audios[Pos].Parsers[Pos2]->FrameInfo.DTS==(int64u)-1 || !((FrameInfo.DUR/2>FrameInfo.DTS || Audios[Pos].Parsers[Pos2]->FrameInfo.DTS>=FrameInfo.DTS-FrameInfo.DUR/2) && Audios[Pos].Parsers[Pos2]->FrameInfo.DTS<FrameInfo.DTS+FrameInfo.DUR/2))
- Audios[Pos].Parsers[Pos2]->FrameInfo=FrameInfo;
- Open_Buffer_Continue(Audios[Pos].Parsers[Pos2], Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)Audio_Sizes[Pos]);
-
- if (Audios[Pos].Parsers.size()>1)
- {
- if (!Audios[Pos].Parsers[Pos2]->Status[IsAccepted] && Audios[Pos].Parsers[Pos2]->Status[IsFinished])
- {
- delete *(Audios[Pos].Parsers.begin()+Pos2);
- Audios[Pos].Parsers.erase(Audios[Pos].Parsers.begin()+Pos2);
- Pos2--;
- }
- else if (Audios[Pos].Parsers.size()>1 && Audios[Pos].Parsers[Pos2]->Status[IsAccepted])
- {
- File__Analyze* Parser=Audios[Pos].Parsers[Pos2];
- for (size_t Pos3=0; Pos3<Audios[Pos].Parsers.size(); Pos3++)
- {
- if (Pos3!=Pos2)
- delete *(Audios[Pos].Parsers.begin()+Pos3);
- }
- Audios[Pos].Parsers.clear();
- Audios[Pos].Parsers.push_back(Parser);
- }
- }
-
- if (Audios[Pos].Parsers.size()==1 && !Audios[Pos].IsFilled && Audios[Pos].Parsers[0]->Status[IsFilled])
- {
- if (Stream_Count>0)
- Stream_Count--;
- Audios[Pos].IsFilled=true;
- }
-
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- DemuxParser=Audios[Pos].Parsers[0];
- #endif //MEDIAINFO_DEMUX
- }
- Element_Offset+=Audio_Sizes[Pos];
-}
-
-//---------------------------------------------------------------------------
-void File_Lxf::Video()
-{
- Element_Name("Video");
-
- #if MEDIAINFO_SEEK
- if (FrameRate==0 && Videos_Header.TimeStamp_End-Videos_Header.TimeStamp_Begin!=0)
- FrameRate=TimeStamp_Rate/(Videos_Header.TimeStamp_End-Videos_Header.TimeStamp_Begin);
- #endif //MEDIAINFO_SEEK
-
- Video_Sizes_Pos=0;
- Element_ThisIsAList();
-}
-
-//---------------------------------------------------------------------------
-void File_Lxf::Video_Stream(size_t Pos)
-{
- if (LookingForLastFrame || (Config->ParseSpeed<1 && Pos<Videos.size() && Videos[Pos].IsFilled && Pos!=1)) //Hint: trying to catch VBI/VANC at the end of the file
- {
- Skip_XX(Element_Size, "Data");
- return;
- }
-
- #if MEDIAINFO_DEMUX
- #if MEDIAINFO_SEEK
- if (SeekRequest==(int64u)-1)
- #endif //MEDIAINFO_SEEK
- {
- Element_Code=0x100+Pos;
- Frame_Count_NotParsedIncluded=float64_int64s(((float64)(Videos_Header.TimeStamp_End-Videos_Header.Duration))/TimeStamp_Rate*FrameRate);
- Demux_Level=2; //Container
- Demux(Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)Video_Sizes[Pos], ContentType_MainStream);
- }
- #endif //MEDIAINFO_DEMUX
-
- if (Pos>=Videos.size())
- Videos.resize(Pos+1);
-
- switch (Pos)
- {
- case 1 : Video_Stream_1(); break;
- case 2 : Video_Stream_2(); break;
- default: ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Lxf::Video_Stream_1()
-{
- if (Video_Sizes[1]<2)
- {
- Skip_XX(Video_Sizes[1], "Unknown");
- return;
- }
-
- int8u Lines_Allocated, Lines_Used;
- Get_L1 (Lines_Allocated, "Lines allocated");
- Get_L1 (Lines_Used, "Lines used");
-
- if (Lines_Allocated==0 || Lines_Used>Lines_Allocated || Video_Sizes[1]<2+Lines_Used)
- {
- Skip_XX(Video_Sizes[1]-2, "Unknown");
- return;
- }
-
- Videos[1].BytesPerFrame=Video_Sizes[1]-(2+Lines_Allocated);
- int64u BytesPerLine=Videos[1].BytesPerFrame/Lines_Allocated;
-
- std::vector<int8u> FieldNumbers;
- std::vector<bool> FieldNumbers_IsSecondField;
- BS_Begin_LE();
- for (int8u Pos=0; Pos<Lines_Allocated; Pos++)
- {
- int8u FieldNumber;
- bool FieldNumber_IsSecondField;
- Get_T1 (7, FieldNumber, "Field line");
- Get_TB ( FieldNumber_IsSecondField, "Field");
-
- if (Pos<Lines_Used)
- {
- FieldNumbers.push_back(FieldNumber);
- FieldNumbers_IsSecondField.push_back(FieldNumber_IsSecondField);
- }
- }
- BS_End_LE();
-
- for (int8u Pos=0; Pos<Lines_Used; Pos++)
- {
- #if defined(MEDIAINFO_CDP_YES)
- Element_Begin1("VANC line");
- if (Videos[1].Parsers.empty())
- {
- Ancillary=new File_Ancillary;
- Ancillary->InDecodingOrder=true;
- Ancillary->WithChecksum=true;
- Ancillary->MustSynchronize=true;
- Open_Buffer_Init(Ancillary);
- Videos[1].Parsers.push_back(Ancillary);
- Stream_Count++;
- }
- Videos[1].Parsers[0]->FrameInfo=FrameInfo;
- ((File_Ancillary*)Videos[1].Parsers[0])->LineNumber=FieldNumbers[Pos];
- ((File_Ancillary*)Videos[1].Parsers[0])->LineNumber_IsSecondField=FieldNumbers_IsSecondField[Pos];
- Open_Buffer_Continue(Videos[1].Parsers[0], Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)BytesPerLine);
- if (Videos[1].Parsers[0]->Status[IsFilled])
- {
- if (Stream_Count>0)
- Stream_Count--;
- Videos[1].IsFilled=true;
- }
- Element_Offset+=BytesPerLine;
- Element_End0();
- #else
- Skip_XX(BytesPerLine, "VBI/VANC data");
- #endif
- }
- Skip_XX((Lines_Allocated-Lines_Used)*BytesPerLine, "Unused lines");
-
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Lxf::Video_Stream_2()
-{
- if (Videos[2].Parsers.empty())
- {
- /*
- //Trying to detect if this is PCM
- switch (Videos[2].Format)
- {
- case 0x01 :
- case 0x02 :
- case 0x03 :
- case 0x09 :
- {
- #ifdef MEDIAINFO_MPEGV_YES
- File_Mpegv* Parser=new File_Mpegv();
- #else //MEDIAINFO_MPEGV_YES
- File__Analyze* Parser=new File__Analyze;
- #endif //MEDIAINFO_MPEGV_YES
- Open_Buffer_Init(Parser);
- #ifndef MEDIAINFO_MPEGV_YES
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Format, "MPEG Video");
- if (Videos_Header.TimeStamp_End-Videos_Header.TimeStamp_Begin)
- {
- FrameRate=((float64)1)*TimeStamp_Rate/(Videos_Header.TimeStamp_End-Videos_Header.TimeStamp_Begin);
- if (FrameRate)
- Parser->Fill(Stream_Video, 0, Video_FrameRate, FrameRate);
- }
- #endif //MEDIAINFO_MPEGV_YES
- Videos[2].Parsers.push_back(Parser);
- }
- break;
- case 0x04 :
- case 0x05 :
- case 0x06 :
- {
- #ifdef MEDIAINFO_DVDIF_YES
- File_DvDif* Parser=new File_DvDif();
- #else //MEDIAINFO_DVDIF_YES
- File__Analyze* Parser=new File__Analyze;
- #endif //MEDIAINFO_DVDIF_YES
- Open_Buffer_Init(Parser);
- #ifndef MEDIAINFO_DVDIF_YES
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Format, "DV");
- if (Videos_Header.TimeStamp_End-Videos_Header.TimeStamp_Begin)
- {
- FrameRate=((float64)1)*TimeStamp_Rate/(Videos_Header.TimeStamp_End-Videos_Header.TimeStamp_Begin);
- if (FrameRate)
- Parser->Fill(Stream_Video, 0, Video_FrameRate, FrameRate);
- int64u BitRate=float64_int64s(((float64)Video_Sizes[1])*TimeStamp_Rate*8/(Videos_Header.TimeStamp_End-Videos_Header.TimeStamp_Begin));
- if (BitRate)
- Parser->Fill(Stream_Video, 0, Video_BitRate, BitRate);
- Parser->Fill(Stream_Video, 0, Video_BitRate_Mode, "CBR");
- }
- #endif //MEDIAINFO_DVDIF_YES
- Videos[2].Parsers.push_back(Parser);
- }
- #ifdef MEDIAINFO_VC3_YES
- if (Videos[2].Format==0x06) // One file with VideoFormat = 6 has VC-3
- {
- File_Vc3* Parser=new File_Vc3();
- Open_Buffer_Init(Parser);
- Videos[2].Parsers.push_back(Parser);
- }
- #endif //MEDIAINFO_VC3_YES
- break;
- case 0x0A :
- case 0x0B :
- case 0x0C :
- case 0x0D :
- {
- #ifdef MEDIAINFO_AVC_YES
- File_Avc* Parser=new File_Avc();
- #else //MEDIAINFO_AVC_YES
- File__Analyze* Parser=new File__Analyze;
- #endif //MEDIAINFO_AVC_YES
- Open_Buffer_Init(Parser);
- #ifndef MEDIAINFO_AVC_YES
- Parser->Accept();
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Format, "AVC");
- if (Videos_Header.TimeStamp_End-Videos_Header.TimeStamp_Begin)
- {
- FrameRate=((float64)1)*TimeStamp_Rate/(Videos_Header.TimeStamp_End-Videos_Header.TimeStamp_Begin);
- if (FrameRate)
- Parser->Fill(Stream_Video, 0, Video_FrameRate, FrameRate);
- }
- #endif //MEDIAINFO_AVC_YES
- Videos[2].Parsers.push_back(Parser);
- }
- break;
- default :
- {
- File__Analyze* Parser=new File__Analyze;
- Open_Buffer_Init(Parser);
- Videos[2].Parsers.push_back(Parser);
- }
- }
- */
-
- #ifdef MEDIAINFO_DVDIF_YES
- Videos[2].Parsers.push_back(new File_DvDif());
- #endif //MEDIAINFO_DVDIF_YES
- #ifdef MEDIAINFO_MPEGV_YES
- {
- File_Mpegv* Parser=new File_Mpegv();
- #if defined(MEDIAINFO_ANCILLARY_YES)
- Parser->Ancillary=&Ancillary;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
- Videos[2].Parsers.push_back(Parser);
- }
- #endif //MEDIAINFO_MPEGV_YES
- #ifdef MEDIAINFO_AVC_YES
- Videos[2].Parsers.push_back(new File_Avc());
- #endif //MEDIAINFO_AVC_YES
- #ifdef MEDIAINFO_VC3_YES
- Videos[2].Parsers.push_back(new File_Vc3());
- #endif //MEDIAINFO_VC3_YES
- for (size_t Pos2=0; Pos2<Videos[2].Parsers.size(); Pos2++)
- Open_Buffer_Init(Videos[2].Parsers[Pos2]);
-
- Stream_Count++;
- }
-
- //Parsing
- for (size_t Pos2=0; Pos2<Videos[2].Parsers.size(); Pos2++)
- {
- Videos[2].Parsers[Pos2]->FrameInfo=FrameInfo;
- Open_Buffer_Continue(Videos[2].Parsers[Pos2], Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)Video_Sizes[2]);
- Element_Show();
-
- if (Videos[2].Parsers.size()>1)
- {
- if (!Videos[2].Parsers[Pos2]->Status[IsAccepted] && Videos[2].Parsers[Pos2]->Status[IsFinished])
- {
- delete *(Videos[2].Parsers.begin()+Pos2);
- Videos[2].Parsers.erase(Videos[2].Parsers.begin()+Pos2);
- Pos2--;
- }
- else if (Videos[2].Parsers.size()>1 && Videos[2].Parsers[Pos2]->Status[IsAccepted])
- {
- File__Analyze* Parser=Videos[2].Parsers[Pos2];
- for (size_t Pos3=0; Pos3<Videos[2].Parsers.size(); Pos3++)
- {
- if (Pos3!=Pos2)
- delete *(Videos[2].Parsers.begin()+Pos3);
- }
- Videos[2].Parsers.clear();
- Videos[2].Parsers.push_back(Parser);
- }
- }
-
- if (Videos[2].Parsers.size()==1 && !Videos[2].IsFilled && Videos[2].Parsers[0]->Status[IsFilled])
- {
- if (Stream_Count>0)
- Stream_Count--;
- Videos[2].IsFilled=true;
- }
- }
- Element_Offset+=Video_Sizes[2];
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_LXF_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Lxf.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Lxf.h
deleted file mode 100644
index d0a7d9b61..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Lxf.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Lxf files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_LxfH
-#define MediaInfo_File_LxfH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#if defined(MEDIAINFO_ANCILLARY_YES)
- #include <MediaInfo/Multiple/File_Ancillary.h>
-#endif //defined(MEDIAINFO_ANCILLARY_YES)
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Lxf
-//***************************************************************************
-
-class File_Lxf : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Lxf();
- ~File_Lxf();
-
-protected :
- //Streams management
- void Streams_Fill ();
- void Streams_Fill_PerStream (File__Analyze* Parser, stream_t Container_StreamKind, size_t Parser_Pos, int8u Format=(int8u)-1);
- void Streams_Finish ();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
-
- //Buffer - Global
- void Read_Buffer_Continue();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
- void Read_Buffer_Unsynched();
-
- //Buffer - Per element
- bool Header_Begin ();
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Header();
- void Header_Info();
- void Header_Meta();
- void Audio();
- void Audio_Stream(size_t Pos);
- void Video();
- void Video_Stream(size_t Pos);
- void Video_Stream_1();
- void Video_Stream_2();
-
- //Streams
- struct stream
- {
- std::vector<File__Analyze*> Parsers;
- int64u BytesPerFrame;
- int8u Format;
- bool IsFilled;
-
- stream()
- {
- BytesPerFrame=(int64u)-1;
- Format=(int8u)-1;
- IsFilled=false;
- }
- };
- typedef std::vector<stream> streams;
- streams Videos;
- streams Audios;
- struct stream_header
- {
- int64u TimeStamp_Begin;
- int64u TimeStamp_End;
- int64u Duration;
- int64u Duration_First;
- int8u PictureType;
-
- stream_header()
- {
- TimeStamp_Begin=(int64u)-1;
- TimeStamp_End=(int64u)-1;
- Duration=(int64u)-1;
- Duration_First=(int64u)-1;
- PictureType=(int8u)-1;
- }
- stream_header(int64u TimeStamp_Begin_, int64u TimeStamp_End_, int64u Duration_, int8u PictureType_)
- {
- TimeStamp_Begin=TimeStamp_Begin_;
- TimeStamp_End=TimeStamp_End_;
- Duration=Duration_;
- Duration_First = (int64u)-1;
- PictureType = PictureType_;
- }
- };
- stream_header Videos_Header;
- stream_header Audios_Header;
- #if defined(MEDIAINFO_ANCILLARY_YES)
- File_Ancillary* Ancillary;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
-
- //Temp
- bool LookingForLastFrame;
- int64u Stream_Count;
- int64u Info_General_StreamSize;
- std::vector<int64u> Header_Sizes;
- std::vector<int64u> Audio_Sizes;
- size_t Audio_Sizes_Pos;
- std::vector<int64u> Video_Sizes;
- size_t Video_Sizes_Pos;
- int8u SampleSize;
- int32u Version;
-
- //Hints
- size_t* File_Buffer_Size_Hint_Pointer;
-
- //Demux
- #if MEDIAINFO_DEMUX
- File__Analyze* DemuxParser;
- #endif //MEDIAINFO_DEMUX
-
- //Seek
- typedef std::map<int64u, stream_header> time_offsets;
- time_offsets TimeOffsets;
- #if MEDIAINFO_SEEK
- int64u SeekRequest_Divider;
- int64u SeekRequest;
- #endif //MEDIAINFO_SEEK
- float64 FrameRate;
- float64 TimeStamp_Rate;
- bool Duration_Detected;
- int64u LastAudio_BufferOffset;
- stream_header LastAudio_TimeOffset;
-};
-
-} //NameSpace
-
-#endif
-
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mk.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mk.cpp
deleted file mode 100644
index a514f2362..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mk.cpp
+++ /dev/null
@@ -1,3582 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MK_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Mk.h"
-#if defined(MEDIAINFO_OGG_YES)
- #include "MediaInfo/Multiple/File_Ogg.h"
-#endif
-#if defined(MEDIAINFO_RM_YES)
- #include "MediaInfo/Multiple/File_Rm.h"
-#endif
-#if defined(MEDIAINFO_MPEG4V_YES)
- #include "MediaInfo/Video/File_Mpeg4v.h"
-#endif
-#if defined(MEDIAINFO_AVC_YES)
- #include "MediaInfo/Video/File_Avc.h"
-#endif
-#if defined(MEDIAINFO_HEVC_YES)
- #include "MediaInfo/Video/File_Hevc.h"
-#endif
-#if defined(MEDIAINFO_FFV1_YES)
- #include "MediaInfo/Video/File_Ffv1.h"
-#endif
-#if defined(MEDIAINFO_HUFFYUV_YES)
- #include "MediaInfo/Video/File_HuffYuv.h"
-#endif
-#if defined(MEDIAINFO_VC1_YES)
- #include "MediaInfo/Video/File_Vc1.h"
-#endif
-#if defined(MEDIAINFO_DIRAC_YES)
- #include "MediaInfo/Video/File_Dirac.h"
-#endif
-#if defined(MEDIAINFO_MPEGV_YES)
- #include "MediaInfo/Video/File_Mpegv.h"
-#endif
-#if defined(MEDIAINFO_PRORES_YES)
- #include "MediaInfo/Video/File_ProRes.h"
-#endif
-#if defined(MEDIAINFO_VP8_YES)
- #include "MediaInfo/Video/File_Vp8.h"
-#endif
-#if defined(MEDIAINFO_AAC_YES)
- #include "MediaInfo/Audio/File_Aac.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_DTS_YES)
- #include "MediaInfo/Audio/File_Dts.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if defined(MEDIAINFO_FLAC_YES)
- #include "MediaInfo/Audio/File_Flac.h"
-#endif
-#if defined(MEDIAINFO_OPUS_YES)
- #include "MediaInfo/Audio/File_Opus.h"
-#endif
-#if defined(MEDIAINFO_WVPK_YES)
- #include "MediaInfo/Audio/File_Wvpk.h"
-#endif
-#if defined(MEDIAINFO_TTA_YES)
- #include "MediaInfo/Audio/File_Tta.h"
-#endif
-#if defined(MEDIAINFO_PCM_YES)
- #include "MediaInfo/Audio/File_Pcm.h"
-#endif
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-#include <cstring>
-#include <algorithm>
-#if MEDIAINFO_DEMUX
- #include "base64.h"
-#endif //MEDIAINFO_DEMUX
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Mk_ContentCompAlgo(int64u Algo)
-{
- switch (Algo)
- {
- case 0x00 : return "zlib";
- case 0x01 : return "bzlib";
- case 0x02 : return "lzo1x";
- case 0x03 : return "Header stripping";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mk_StereoMode(int64u StereoMode)
-{
- switch (StereoMode)
- {
- case 0x00 : return ""; //Mono (default)
- case 0x01 : return "Side by Side (left eye first)";
- case 0x02 : return "Top-Bottom (right eye first)";
- case 0x03 : return "Top-Bottom (left eye first)";
- case 0x04 : return "Checkboard (right eye first)";
- case 0x05 : return "Checkboard (left eye first)";
- case 0x06 : return "Row Interleaved (right eye first)";
- case 0x07 : return "Row Interleaved (left eye first)";
- case 0x08 : return "Column Interleaved (right eye first)";
- case 0x09 : return "Column Interleaved (left eye first)";
- case 0x0A : return "Anaglyph (cyan/red)";
- case 0x0B : return "Side by Side (right eye first)";
- case 0x0C : return "Anaglyph (green/magenta)";
- case 0x0D : return "Both Eyes laced in one block (left eye first)";
- case 0x0E : return "Both Eyes laced in one block (right eye first)";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mk_StereoMode_v2(int64u StereoMode)
-{
- switch (StereoMode)
- {
- case 0x00 : return ""; //Mono (default)
- case 0x01 : return "Right Eye";
- case 0x02 : return "Left Eye";
- case 0x03 : return "Both Eye";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-extern std::string ExtensibleWave_ChannelMask (int32u ChannelMask);
-
-//---------------------------------------------------------------------------
-extern std::string ExtensibleWave_ChannelMask2 (int32u ChannelMask);
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Mk::File_Mk()
-:File__Analyze()
-{
- //Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Matroska;
- StreamIDs_Width[0]=16;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- #endif //MEDIAINFO_DEMUX
- DataMustAlwaysBeComplete=false;
-
- //Temp
- Format_Version=0;
- TimecodeScale=1000000; //Default value
- Duration=0;
- Cluster_AlreadyParsed=false;
-
- //Helpers
- CodecPrivate=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_Mk::~File_Mk()
-{
- delete[] CodecPrivate; //CodecPrivate=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mk::Streams_Finish()
-{
- if (Duration!=0 && TimecodeScale!=0)
- Fill(Stream_General, 0, General_Duration, Duration*int64u_float64(TimecodeScale)/1000000.0, 0);
- for (std::map<int64u, stream>::iterator Temp=Stream.begin(); Temp!=Stream.end(); ++Temp)
- {
- StreamKind_Last=Temp->second.StreamKind;
- StreamPos_Last=Temp->second.StreamPos;
-
- if (Temp->second.DisplayAspectRatio!=0)
- {
- //Corrections
- if (Temp->second.DisplayAspectRatio>=1.777 && Temp->second.DisplayAspectRatio<=1.778)
- Temp->second.DisplayAspectRatio=((float32)16)/9;
- if (Temp->second.DisplayAspectRatio>=1.333 && Temp->second.DisplayAspectRatio<=1.334)
- Temp->second.DisplayAspectRatio=((float32)4)/3;
- Fill(Stream_Video, Temp->second.StreamPos, Video_DisplayAspectRatio, Temp->second.DisplayAspectRatio, 3, true);
- int64u Width=Retrieve(Stream_Video, Temp->second.StreamPos, Video_Width).To_int64u();
- int64u Height=Retrieve(Stream_Video, Temp->second.StreamPos, Video_Height).To_int64u();
- if (Width)
- Fill(Stream_Video, Temp->second.StreamPos, Video_PixelAspectRatio, Temp->second.DisplayAspectRatio*Height/Width, 3, true);
- }
-
- if (Temp->second.Parser)
- {
- Fill(Temp->second.Parser);
- if (Config->ParseSpeed<=1.0)
- Temp->second.Parser->Open_Buffer_Unsynch();
- }
-
- //Video specific
- if (StreamKind_Last==Stream_Video)
- {
- //FrameRate
- bool IsVfr=false;
- if (Temp->second.Segment_Cluster_BlockGroup_BlockDuration_Counts.size()>2)
- IsVfr=true;
- else if (Temp->second.TimeCodes.size()>1)
- {
- //Trying to detect VFR
- std::vector<int64s> FrameRate_Between;
- std::sort(Temp->second.TimeCodes.begin(), Temp->second.TimeCodes.end()); //This is PTS, no DTS --> Some frames are out of order
- size_t FramesToAdd=0;
- for (size_t Pos=1; Pos<Temp->second.TimeCodes.size(); Pos++)
- {
- int64u Duration=Temp->second.TimeCodes[Pos]-Temp->second.TimeCodes[Pos-1];
- if (Duration)
- FrameRate_Between.push_back(Duration);
- else
- FramesToAdd++;
- }
- if (FrameRate_Between.size()>1)
- {
- int64s FrameRate_Between_Last=FrameRate_Between[FrameRate_Between.size()-1];
- size_t Pos=FrameRate_Between.size()-2;
- while (Pos)
- {
- if (!(FrameRate_Between[Pos]*0.9<FrameRate_Between_Last
- && FrameRate_Between[Pos]*1.1>FrameRate_Between_Last))
- break;
- Pos--;
- }
- if (Pos)
- FrameRate_Between.resize(Pos+1); //We peek 40 frames, and remove the last ones, because this is PTS, no DTS --> Some frames are out of order
- }
- if (FrameRate_Between.size()>=30+1+FramesToAdd)
- FrameRate_Between.resize((FrameRate_Between.size()-4>30+1+FramesToAdd)?(FrameRate_Between.size()-4):(30+1+FramesToAdd)); //We peek 40 frames, and remove the last ones, because this is PTS, no DTS --> Some frames are out of order
- std::sort(FrameRate_Between.begin(), FrameRate_Between.end());
- if (!FrameRate_Between.empty()
- && FrameRate_Between[0]*0.9<FrameRate_Between[FrameRate_Between.size()-1]
- && FrameRate_Between[0]*1.1>FrameRate_Between[FrameRate_Between.size()-1]
- && TimecodeScale)
- {
- float Time=0;
- if (Temp->second.TimeCodes.size()>30+FramesToAdd)
- Time=(float)(Temp->second.TimeCodes[30+FramesToAdd]-Temp->second.TimeCodes[0])/30; //30 frames for handling 30 fps rounding problems
- else if (Temp->second.TrackDefaultDuration)
- Time=(float)Temp->second.TrackDefaultDuration/TimecodeScale; //TrackDefaultDuration is maybe more precise than the time code
- else
- Time=(float)(Temp->second.TimeCodes[Temp->second.TimeCodes.size()-1]-Temp->second.TimeCodes[0])/(Temp->second.TimeCodes.size()-1);
- if (Time)
- {
- float32 FrameRate_FromCluster=1000000000/Time/TimecodeScale;
- if (Temp->second.Parser)
- {
- float32 FrameRate_FromParser=Temp->second.Parser->Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate).To_float32();
- if (FrameRate_FromParser
- && FrameRate_FromParser*2>FrameRate_FromCluster*0.9
- && FrameRate_FromParser*2<FrameRate_FromCluster*1.1) //TODO: awfull method to detect interlaced content with one field per block
- FrameRate_FromCluster/=2;
- }
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, FrameRate_FromCluster);
- }
- }
- else if (!FrameRate_Between.empty())
- IsVfr=true;
- }
- else if (Temp->second.TrackDefaultDuration)
- {
- float32 FrameRate_FromCluster=1000000000/(float32)Temp->second.TrackDefaultDuration;
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, FrameRate_FromCluster);
- }
-
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate_Mode, IsVfr?"VFR":"CFR");
- }
-
- if (Temp->second.Parser)
- {
- //Delay
- if (Temp->second.TimeCode_Start!=(int64u)-1 && TimecodeScale)
- {
- //From TimeCode
- float64 Delay=Temp->second.TimeCode_Start*int64u_float64(TimecodeScale)/1000000.0;
-
- //From stream format
- if (StreamKind_Last==Stream_Audio && Count_Get(Stream_Video)==1 && Temp->second.Parser->Count_Get(Stream_General)>0)
- {
- if (Temp->second.Parser->Buffer_TotalBytes_FirstSynched==0)
- ;
- else if (Temp->second.AvgBytesPerSec!=0)
- Delay+=((float64)Temp->second.Parser->Buffer_TotalBytes_FirstSynched)*1000/Temp->second.AvgBytesPerSec;
- else
- {
- int64u BitRate = Temp->second.Parser->Retrieve(Stream_Audio, 0, Audio_BitRate).To_int64u();
- if (BitRate == 0)
- BitRate = Temp->second.Parser->Retrieve(Stream_Audio, 0, Audio_BitRate_Nominal).To_int64u();
- if (BitRate)
- Delay += ((float64)Temp->second.Parser->Buffer_TotalBytes_FirstSynched) * 1000 / BitRate;
- }
- }
-
- //Filling
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay), Delay, 0, true);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay_Source), "Container");
- }
-
- Ztring Duration_Temp, Codec_Temp;
- Duration_Temp=Retrieve(StreamKind_Last, Temp->second.StreamPos, Fill_Parameter(StreamKind_Last, Generic_Duration)); //Duration from stream is sometimes false
- Codec_Temp=Retrieve(StreamKind_Last, Temp->second.StreamPos, Fill_Parameter(StreamKind_Last, Generic_Codec)); //We want to keep the 4CC
-
- Finish(Temp->second.Parser);
- Merge(*Temp->second.Parser, Temp->second.StreamKind, 0, Temp->second.StreamPos);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Duration), Duration_Temp, true);
- if (Temp->second.StreamKind==Stream_Video && !Codec_Temp.empty())
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), Codec_Temp, true);
-
- //Special case: AAC
- if (StreamKind_Last==Stream_Audio
- && (Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("AAC")
- || Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("MPEG Audio")
- || Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("Vorbis")))
- Clear(Stream_Audio, StreamPos_Last, Audio_BitDepth); //Resolution is not valid for AAC / MPEG Audio / Vorbis
-
- //Special case: 5.1
- if (StreamKind_Last==Stream_Audio
- && (Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("AC-3")
- || Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("E-AC-3")
- || Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("DTS"))
- && Retrieve(Stream_Audio, StreamPos_Last, Audio_Channel_s__Original)==__T("6")
- && Retrieve(Stream_Audio, StreamPos_Last, Audio_Channel_s_)==__T("5"))
- {
- Clear(Stream_Audio, StreamPos_Last, Audio_Channel_s__Original);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, 6, 10, true); //Some muxers do not count LFE in the channel count, let's say it is normal
- }
-
- //VFR
- if (Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate_Mode)==__T("VFR") && Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate_Original).empty())
- {
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate_Original, Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate));
- Clear(Stream_Video, StreamPos_Last, Video_FrameRate);
- }
- }
-
- if (Temp->second.FrameRate!=0 && Retrieve(Stream_Video, Temp->second.StreamPos, Video_FrameRate).empty())
- Fill(Stream_Video, Temp->second.StreamPos, Video_FrameRate, Temp->second.FrameRate, 3);
-
- //Flags
- Fill(Temp->second.StreamKind, Temp->second.StreamPos, "Default", Temp->second.Default?"Yes":"No");
- Fill(Temp->second.StreamKind, Temp->second.StreamPos, "Forced", Temp->second.Forced?"Yes":"No");
- }
-
- //Chapters
- if (TimecodeScale)
- {
- for (EditionEntries_Pos=0; EditionEntries_Pos<EditionEntries.size(); EditionEntries_Pos++)
- {
- Stream_Prepare(Stream_Menu);
- Fill(Stream_Menu, StreamPos_Last, Menu_Chapters_Pos_Begin, Count_Get(Stream_Menu, StreamPos_Last), 10, true);
- for (ChapterAtoms_Pos=0; ChapterAtoms_Pos<EditionEntries[EditionEntries_Pos].ChapterAtoms.size(); ChapterAtoms_Pos++)
- {
- if (EditionEntries[EditionEntries_Pos].ChapterAtoms[ChapterAtoms_Pos].ChapterTimeStart!=(int64u)-1)
- {
- Ztring Text;
- for (ChapterDisplays_Pos=0; ChapterDisplays_Pos<EditionEntries[EditionEntries_Pos].ChapterAtoms[ChapterAtoms_Pos].ChapterDisplays.size(); ChapterDisplays_Pos++)
- {
- Ztring PerLanguage;
- if (!EditionEntries[EditionEntries_Pos].ChapterAtoms[ChapterAtoms_Pos].ChapterDisplays[ChapterDisplays_Pos].ChapLanguage.empty())
- PerLanguage=MediaInfoLib::Config.Iso639_1_Get(EditionEntries[EditionEntries_Pos].ChapterAtoms[ChapterAtoms_Pos].ChapterDisplays[ChapterDisplays_Pos].ChapLanguage)+__T(':');
- PerLanguage+=EditionEntries[EditionEntries_Pos].ChapterAtoms[ChapterAtoms_Pos].ChapterDisplays[ChapterDisplays_Pos].ChapString;
- Text+=PerLanguage+__T(" - ");
- }
- if (Text.size())
- Text.resize(Text.size()-3);
- Fill(Stream_Menu, StreamPos_Last, Ztring().Duration_From_Milliseconds(EditionEntries[EditionEntries_Pos].ChapterAtoms[ChapterAtoms_Pos].ChapterTimeStart/1000000).To_UTF8().c_str(), Text);
- }
- }
- Fill(Stream_Menu, StreamPos_Last, Menu_Chapters_Pos_End, Count_Get(Stream_Menu, StreamPos_Last), 10, true);
- }
- }
-
- //Purge what is not needed anymore
- if (!File_Name.empty()) //Only if this is not a buffer, with buffer we can have more data
- Stream.clear();
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mk::Header_Parse()
-{
- //Test of zero padding
- int8u Null;
- Peek_B1(Null);
- if (Null==0x00)
- {
- if (Buffer_Offset_Temp==0)
- Buffer_Offset_Temp=Buffer_Offset+1;
-
- while (Buffer_Offset_Temp<Buffer_Size)
- {
- if (Buffer[Buffer_Offset_Temp])
- break;
- Buffer_Offset_Temp++;
- }
- if (Buffer_Offset_Temp>=Buffer_Size)
- {
- Element_WaitForMoreData();
- return;
- }
-
- Header_Fill_Code((int32u)-1); //Should be (int64u)-1 but Borland C++ does not like this
- Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
- Buffer_Offset_Temp=0;
-
- return;
- }
-
- //Parsing
- int64u Name, Size;
- Get_EB (Name, "Name");
- Get_EB (Size, "Size");
-
- //Filling
- Header_Fill_Code(Name, Ztring().From_Number(Name, 16));
- Header_Fill_Size(Element_Offset+Size);
-}
-
-//---------------------------------------------------------------------------
-namespace Elements
-{
- //Common
- const int64u Zero=(int32u)-1; //Should be (int64u)-1 but Borland C++ does not like this
- const int64u CRC32=0x3F;
- const int64u Void=0x6C;
-
- //EBML
- const int64u Ebml=0xA45DFA3;
- const int64u Ebml_Version=0x286;
- const int64u Ebml_ReadVersion=0x2F7;
- const int64u Ebml_MaxIDLength=0x2F2;
- const int64u Ebml_MaxSizeLength=0x2F3;
- const int64u Ebml_DocType=0x282;
- const int64u Ebml_DocTypeVersion=0x287;
- const int64u Ebml_DocTypeReadVersion=0x285;
-
- //Segment
- const int64u Segment=0x8538067;
- const int64u Segment_Attachements=0x0941A469;
- const int64u Segment_Attachements_AttachedFile=0x21A7;
- const int64u Segment_Attachements_AttachedFile_FileData=0x065C;
- const int64u Segment_Attachements_AttachedFile_FileDescription=0x067E;
- const int64u Segment_Attachements_AttachedFile_FileName=0x066E;
- const int64u Segment_Attachements_AttachedFile_FileMimeType=0x0660;
- const int64u Segment_Attachements_AttachedFile_FileReferral=0x0675;
- const int64u Segment_Attachements_AttachedFile_FileUID=0x06AE;
- const int64u Segment_Chapters=0x43A770;
- const int64u Segment_Chapters_EditionEntry=0x05B9;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom=0x36;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess=0x2944;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCodecID=0x2955;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCommand=0x2911;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCommand_ChapProcessData=0x2933;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCommand_ChapProcessTime=0x2922;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessPrivate=0x050D;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay=0x00;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay_ChapCountry=0x037E;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay_ChapLanguage=0x037C;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay_ChapString=0x05;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterFlagEnabled=0x0598;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterFlagHidden=0x18;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterPhysicalEquiv=0x23C3;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterSegmentEditionUID=0x2EBC;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterSegmentUID=0x2E67;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterTimeStart=0x11;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterTimeEnd=0x12;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterTrack=0x0F;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterTrack_ChapterTrackNumber=0x09;
- const int64u Segment_Chapters_EditionEntry_ChapterAtom_ChapterUID=0x33C4;
- const int64u Segment_Chapters_EditionEntry_EditionFlagDefault=0x05DB;
- const int64u Segment_Chapters_EditionEntry_EditionFlagHidden=0x05BD;
- const int64u Segment_Chapters_EditionEntry_EditionFlagOrdered=0x05DD;
- const int64u Segment_Chapters_EditionEntry_EditionUID=0x05BC;
- const int64u Segment_Cluster=0xF43B675;
- const int64u Segment_Cluster_BlockGroup=0x20;
- const int64u Segment_Cluster_BlockGroup_Block=0x21;
- const int64u Segment_Cluster_BlockGroup_BlockAdditions=0x35A1;
- const int64u Segment_Cluster_BlockGroup_BlockAdditions_BlockMore=0x26;
- const int64u Segment_Cluster_BlockGroup_BlockAdditions_BlockMore_BlockAddID=0x6E;
- const int64u Segment_Cluster_BlockGroup_BlockAdditions_BlockMore_BlockAdditional=0x25;
- const int64u Segment_Cluster_BlockGroup_BlockDuration=0x1B;
- const int64u Segment_Cluster_BlockGroup_ReferenceBlock=0x7B;
- const int64u Segment_Cluster_BlockGroup_ReferencePriority=0x7A;
- const int64u Segment_Cluster_BlockGroup_Slices=0xE;
- const int64u Segment_Cluster_BlockGroup_Slices_TimeSlice=0x68;
- const int64u Segment_Cluster_BlockGroup_Slices_TimeSlice_Duration=0x4F;
- const int64u Segment_Cluster_BlockGroup_Slices_TimeSlice_LaceNumber=0x4C;
- const int64u Segment_Cluster_Position=0x27;
- const int64u Segment_Cluster_PrevSize=0x2B;
- const int64u Segment_Cluster_SilentTracks=0x1854;
- const int64u Segment_Cluster_SilentTracks_SilentTrackNumber=0x18D7;
- const int64u Segment_Cluster_SimpleBlock=0x23;
- const int64u Segment_Cluster_Timecode=0x67;
- const int64u Segment_Cues=0xC53BB6B;
- const int64u Segment_Cues_CuePoint=0x3B;
- const int64u Segment_Cues_CuePoint_CueTime=0x33;
- const int64u Segment_Cues_CuePoint_CueTrackPositions=0x37;
- const int64u Segment_Cues_CuePoint_CueTrackPositions_CueTrack=0x77;
- const int64u Segment_Cues_CuePoint_CueTrackPositions_CueClusterPosition=0x71;
- const int64u Segment_Cues_CuePoint_CueTrackPositions_CueBlockNumber=0x1378;
- const int64u Segment_Info=0x549A966;
- const int64u Segment_Info_ChapterTranslate=0x2924;
- const int64u Segment_Info_ChapterTranslate_ChapterTranslateCodec=0x29BF;
- const int64u Segment_Info_ChapterTranslate_ChapterTranslateEditionUID=0x29FC;
- const int64u Segment_Info_ChapterTranslate_ChapterTranslateID=0x29A5;
- const int64u Segment_Info_DateUTC=0x461;
- const int64u Segment_Info_Duration=0x489;
- const int64u Segment_Info_MuxingApp=0xD80;
- const int64u Segment_Info_NextFilename=0x1E83BB;
- const int64u Segment_Info_NextUID=0x1EB923;
- const int64u Segment_Info_PrevFilename=0x1C83AB;
- const int64u Segment_Info_PrevUID=0x1CB923;
- const int64u Segment_Info_SegmentFamily=0x444;
- const int64u Segment_Info_SegmentFilename=0x3384;
- const int64u Segment_Info_SegmentUID=0x33A4;
- const int64u Segment_Info_TimecodeScale=0xAD7B1;
- const int64u Segment_Info_Title=0x3BA9;
- const int64u Segment_Info_WritingApp=0x1741;
- const int64u Segment_SeekHead=0x14D9B74;
- const int64u Segment_SeekHead_Seek=0xDBB;
- const int64u Segment_SeekHead_Seek_SeekID=0x13AB;
- const int64u Segment_SeekHead_Seek_SeekPosition=0x13AC;
- const int64u Segment_Tags=0x0254C367;
- const int64u Segment_Tags_Tag=0x3373;
- const int64u Segment_Tags_Tag_SimpleTag=0x27C8;
- const int64u Segment_Tags_Tag_SimpleTag_TagBinary=0x485;
- const int64u Segment_Tags_Tag_SimpleTag_TagDefault=0x484;
- const int64u Segment_Tags_Tag_SimpleTag_TagLanguage=0x47A;
- const int64u Segment_Tags_Tag_SimpleTag_TagName=0x5A3;
- const int64u Segment_Tags_Tag_SimpleTag_TagString=0x487;
- const int64u Segment_Tags_Tag_Targets=0x23C0;
- const int64u Segment_Tags_Tag_Targets_AttachmentUID=0x23C6;
- const int64u Segment_Tags_Tag_Targets_ChapterUID=0x23C4;
- const int64u Segment_Tags_Tag_Targets_EditionUID=0x23C9;
- const int64u Segment_Tags_Tag_Targets_TargetType=0x23CA;
- const int64u Segment_Tags_Tag_Targets_TargetTypeValue=0x28CA;
- const int64u Segment_Tags_Tag_Targets_TrackUID=0x23C5;
- const int64u Segment_Tracks=0x654AE6B;
- const int64u Segment_Tracks_TrackEntry=0x2E;
- const int64u Segment_Tracks_TrackEntry_AttachmentLink=0x3446;
- const int64u Segment_Tracks_TrackEntry_Audio=0x61;
- const int64u Segment_Tracks_TrackEntry_Audio_BitDepth=0x2264;
- const int64u Segment_Tracks_TrackEntry_Audio_Channels=0x1F;
- const int64u Segment_Tracks_TrackEntry_Audio_OutputSamplingFrequency=0x38B5;
- const int64u Segment_Tracks_TrackEntry_Audio_SamplingFrequency=0x35;
- const int64u Segment_Tracks_TrackEntry_CodecDecodeAll=0x2A;
- const int64u Segment_Tracks_TrackEntry_CodecID=0x6;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings=0x2D80;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding=0x2240;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Order=0x1031;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Scope=0x1032;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Type=0x1033;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Compression=0x1034;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Compression_ContentCompAlgo=0x0254;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Compression_ContentCompSettings=0x0255;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption=0x1035;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentEncAlgo=0x07E1;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentEncKeyID=0x07E2;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentSignature=0x07E3;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentSigKeyID=0x07E4;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentSigAlgo=0x07E5;
- const int64u Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentSigHashAlgo=0x07E6;
- const int64u Segment_Tracks_TrackEntry_CodecName=0x58688;
- const int64u Segment_Tracks_TrackEntry_CodecPrivate=0x23A2;
- const int64u Segment_Tracks_TrackEntry_DefaultDuration=0x3E383;
- const int64u Segment_Tracks_TrackEntry_FlagDefault=0x8;
- const int64u Segment_Tracks_TrackEntry_FlagEnabled=0x39;
- const int64u Segment_Tracks_TrackEntry_FlagForced=0x15AA;
- const int64u Segment_Tracks_TrackEntry_FlagLacing=0x1C;
- const int64u Segment_Tracks_TrackEntry_Language=0x2B59C;
- const int64u Segment_Tracks_TrackEntry_MaxBlockAdditionID=0x15EE;
- const int64u Segment_Tracks_TrackEntry_MaxCache=0x2DF8;
- const int64u Segment_Tracks_TrackEntry_MinCache=0x2DE7;
- const int64u Segment_Tracks_TrackEntry_Name=0x136E;
- const int64u Segment_Tracks_TrackEntry_TrackNumber=0x57;
- const int64u Segment_Tracks_TrackEntry_TrackTimecodeScale=0x3314F;
- const int64u Segment_Tracks_TrackEntry_TrackType=0x3;
- const int64u Segment_Tracks_TrackEntry_TrackUID=0x33C5;
- const int64u Segment_Tracks_TrackEntry_Video=0x60;
- const int64u Segment_Tracks_TrackEntry_Video_AspectRatioType=0x14B3;
- const int64u Segment_Tracks_TrackEntry_Video_ColourSpace=0xEB524;
- const int64u Segment_Tracks_TrackEntry_Video_DisplayHeight=0x14BA;
- const int64u Segment_Tracks_TrackEntry_Video_DisplayUnit=0x14B2;
- const int64u Segment_Tracks_TrackEntry_Video_DisplayWidth=0x14B0;
- const int64u Segment_Tracks_TrackEntry_Video_FlagInterlaced=0x1A;
- const int64u Segment_Tracks_TrackEntry_Video_FrameRate=0x383E3;
- const int64u Segment_Tracks_TrackEntry_Video_PixelCropBottom=0x14AA;
- const int64u Segment_Tracks_TrackEntry_Video_PixelCropLeft=0x14CC;
- const int64u Segment_Tracks_TrackEntry_Video_PixelCropRight=0x14DD;
- const int64u Segment_Tracks_TrackEntry_Video_PixelCropTop=0x14BB;
- const int64u Segment_Tracks_TrackEntry_Video_PixelHeight=0x3A;
- const int64u Segment_Tracks_TrackEntry_Video_PixelWidth=0x30;
- const int64u Segment_Tracks_TrackEntry_Video_StereoMode=0x13B8;
- const int64u Segment_Tracks_TrackEntry_Video_StereoModeBuggy=0x13B9;
- const int64u Segment_Tracks_TrackEntry_TrackOverlay=0x2FAB;
- const int64u Segment_Tracks_TrackEntry_TrackTranslate=0x2624;
- const int64u Segment_Tracks_TrackEntry_TrackTranslate_Codec=0x26BF;
- const int64u Segment_Tracks_TrackEntry_TrackTranslate_EditionUID=0x26FC;
- const int64u Segment_Tracks_TrackEntry_TrackTranslate_TrackID=0x26A5;
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Data_Parse()
-{
- #define LIS2(_ATOM, _NAME) \
- case Elements::_ATOM : \
- if (Level==Element_Level) \
- { \
- Element_Name(_NAME); \
- _ATOM(); \
- Element_ThisIsAList(); \
- } \
-
- #define ATO2(_ATOM, _NAME) \
- case Elements::_ATOM : \
- if (Level==Element_Level) \
- { \
- if (Element_IsComplete_Get()) \
- { \
- Element_Name(_NAME); \
- _ATOM(); \
- } \
- else \
- { \
- Element_WaitForMoreData(); \
- return; \
- } \
- } \
- break; \
-
- #define ATOM_END_MK \
- ATOM(Zero) \
- ATOM(CRC32) \
- ATOM(Void) \
- ATOM_END
-
- //Parsing
- DATA_BEGIN
- LIST(Ebml)
- ATOM_BEGIN
- ATOM(Ebml_Version)
- ATOM(Ebml_ReadVersion)
- ATOM(Ebml_MaxIDLength)
- ATOM(Ebml_MaxSizeLength)
- ATOM(Ebml_DocType)
- ATOM(Ebml_DocTypeVersion)
- ATOM(Ebml_DocTypeReadVersion)
- ATOM_END_MK
- LIST(Segment)
- ATOM_BEGIN
- LIST(Segment_Attachements)
- ATOM_BEGIN
- LIST(Segment_Attachements_AttachedFile)
- ATOM_BEGIN
- LIST_SKIP(Segment_Attachements_AttachedFile_FileData) //This is ATOM, but some ATOMs are too big
- ATOM(Segment_Attachements_AttachedFile_FileDescription)
- ATOM(Segment_Attachements_AttachedFile_FileName)
- ATOM(Segment_Attachements_AttachedFile_FileMimeType)
- ATOM(Segment_Attachements_AttachedFile_FileReferral)
- ATOM(Segment_Attachements_AttachedFile_FileUID)
- ATOM_END_MK
- ATOM_END_MK
- LIST(Segment_Chapters)
- ATOM_BEGIN
- LIST(Segment_Chapters_EditionEntry)
- ATOM_BEGIN
- LIST(Segment_Chapters_EditionEntry_ChapterAtom)
- ATOM_BEGIN
- LIST(Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess)
- ATOM_BEGIN
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCodecID)
- LIST(Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCommand)
- ATOM_BEGIN
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCommand_ChapProcessData)
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCommand_ChapProcessTime)
- ATOM_END_MK
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessPrivate)
- ATOM_END_MK
- LIST(Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay)
- ATOM_BEGIN
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay_ChapCountry)
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay_ChapLanguage)
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay_ChapString)
- ATOM_END_MK
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapterFlagEnabled)
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapterFlagHidden)
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapterPhysicalEquiv)
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapterSegmentEditionUID)
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapterSegmentUID)
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapterTimeEnd)
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapterTimeStart)
- LIST(Segment_Chapters_EditionEntry_ChapterAtom_ChapterTrack)
- ATOM_BEGIN
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapterTrack_ChapterTrackNumber)
- ATOM_END_MK
- ATOM(Segment_Chapters_EditionEntry_ChapterAtom_ChapterUID)
- ATOM_END_MK
- ATOM(Segment_Chapters_EditionEntry_EditionFlagDefault)
- ATOM(Segment_Chapters_EditionEntry_EditionFlagHidden)
- ATOM(Segment_Chapters_EditionEntry_EditionFlagOrdered)
- ATOM(Segment_Chapters_EditionEntry_EditionUID)
- ATOM_END_MK
- ATOM_END_MK
- LIST(Segment_Cluster)
- ATOM_BEGIN
- LIST(Segment_Cluster_BlockGroup)
- ATOM_BEGIN
- ATOM(Segment_Cluster_BlockGroup_Block)
- LIST(Segment_Cluster_BlockGroup_BlockAdditions)
- ATOM_BEGIN
- LIST(Segment_Cluster_BlockGroup_BlockAdditions_BlockMore)
- ATOM_BEGIN
- ATOM(Segment_Cluster_BlockGroup_BlockAdditions_BlockMore_BlockAddID)
- ATOM(Segment_Cluster_BlockGroup_BlockAdditions_BlockMore_BlockAdditional)
- ATOM_END_MK
- ATOM_END_MK
- ATOM(Segment_Cluster_BlockGroup_BlockDuration)
- ATOM(Segment_Cluster_BlockGroup_ReferenceBlock)
- ATOM(Segment_Cluster_BlockGroup_ReferencePriority)
- LIST(Segment_Cluster_BlockGroup_Slices)
- ATOM_BEGIN
- LIST(Segment_Cluster_BlockGroup_Slices_TimeSlice)
- ATOM_BEGIN
- ATOM(Segment_Cluster_BlockGroup_Slices_TimeSlice_Duration)
- ATOM(Segment_Cluster_BlockGroup_Slices_TimeSlice_LaceNumber)
- ATOM_END_MK
- ATOM_END_MK
- ATOM_END_MK
- ATOM(Segment_Cluster_Position)
- ATOM(Segment_Cluster_PrevSize)
- LIST(Segment_Cluster_SilentTracks)
- ATOM_BEGIN
- ATOM(Segment_Cluster_SilentTracks_SilentTrackNumber)
- ATOM_END_MK
- ATOM(Segment_Cluster_SimpleBlock)
- ATOM(Segment_Cluster_Timecode)
- ATOM_END_MK
- LIST(Segment_Cues)
- ATOM_BEGIN
- LIST(Segment_Cues_CuePoint)
- ATOM_BEGIN
- ATOM(Segment_Cues_CuePoint_CueTime)
- LIST(Segment_Cues_CuePoint_CueTrackPositions)
- ATOM_BEGIN
- ATOM(Segment_Cues_CuePoint_CueTrackPositions_CueTrack)
- ATOM(Segment_Cues_CuePoint_CueTrackPositions_CueClusterPosition)
- ATOM(Segment_Cues_CuePoint_CueTrackPositions_CueBlockNumber)
- ATOM_END_MK
- ATOM_END_MK
- ATOM_END_MK
- LIST(Segment_Info)
- ATOM_BEGIN
- LIST(Segment_Info_ChapterTranslate)
- ATOM_BEGIN
- ATOM(Segment_Info_ChapterTranslate_ChapterTranslateCodec)
- ATOM(Segment_Info_ChapterTranslate_ChapterTranslateEditionUID)
- ATOM(Segment_Info_ChapterTranslate_ChapterTranslateID)
- ATOM_END_MK
- ATOM(Segment_Info_DateUTC)
- ATOM(Segment_Info_Duration)
- ATOM(Segment_Info_MuxingApp)
- ATOM(Segment_Info_NextFilename)
- ATOM(Segment_Info_NextUID)
- ATOM(Segment_Info_PrevFilename)
- ATOM(Segment_Info_PrevUID)
- ATOM(Segment_Info_SegmentFamily)
- ATOM(Segment_Info_SegmentFilename)
- ATOM(Segment_Info_SegmentUID)
- ATOM(Segment_Info_TimecodeScale)
- ATOM(Segment_Info_Title)
- ATOM(Segment_Info_WritingApp)
- ATOM_END_MK
- LIST(Segment_SeekHead)
- ATOM_BEGIN
- LIST(Segment_SeekHead_Seek)
- ATOM_BEGIN
- ATOM(Segment_SeekHead_Seek_SeekID)
- ATOM(Segment_SeekHead_Seek_SeekPosition)
- ATOM_END_MK
- ATOM_END_MK
- LIST(Segment_Tags)
- ATOM_BEGIN
- LIST(Segment_Tags_Tag)
- ATOM_BEGIN
- LIST(Segment_Tags_Tag_SimpleTag)
- ATOM_BEGIN
- LIST(Segment_Tags_Tag_SimpleTag)
- ATOM_BEGIN
- LIST(Segment_Tags_Tag_SimpleTag)
- ATOM_BEGIN
- ATOM(Segment_Tags_Tag_SimpleTag_TagBinary)
- ATOM(Segment_Tags_Tag_SimpleTag_TagDefault)
- ATOM(Segment_Tags_Tag_SimpleTag_TagLanguage)
- ATOM(Segment_Tags_Tag_SimpleTag_TagName)
- ATOM(Segment_Tags_Tag_SimpleTag_TagString)
- ATOM_END_MK
- ATOM(Segment_Tags_Tag_SimpleTag_TagBinary)
- ATOM(Segment_Tags_Tag_SimpleTag_TagDefault)
- ATOM(Segment_Tags_Tag_SimpleTag_TagLanguage)
- ATOM(Segment_Tags_Tag_SimpleTag_TagName)
- ATOM(Segment_Tags_Tag_SimpleTag_TagString)
- ATOM_END_MK
- ATOM(Segment_Tags_Tag_SimpleTag_TagBinary)
- ATOM(Segment_Tags_Tag_SimpleTag_TagDefault)
- ATOM(Segment_Tags_Tag_SimpleTag_TagLanguage)
- ATOM(Segment_Tags_Tag_SimpleTag_TagName)
- ATOM(Segment_Tags_Tag_SimpleTag_TagString)
- ATOM_END_MK
- LIST(Segment_Tags_Tag_Targets)
- ATOM_BEGIN
- ATOM(Segment_Tags_Tag_Targets_AttachmentUID)
- ATOM(Segment_Tags_Tag_Targets_ChapterUID)
- ATOM(Segment_Tags_Tag_Targets_EditionUID)
- ATOM(Segment_Tags_Tag_Targets_TargetType)
- ATOM(Segment_Tags_Tag_Targets_TargetTypeValue)
- ATOM(Segment_Tags_Tag_Targets_TrackUID)
- ATOM_END_MK
- ATOM_END_MK
- ATOM_END_MK
- LIST(Segment_Tracks)
- ATOM_BEGIN
- LIST(Segment_Tracks_TrackEntry)
- ATOM_BEGIN
- ATOM(Segment_Tracks_TrackEntry_AttachmentLink)
- LIST(Segment_Tracks_TrackEntry_Audio)
- ATOM_BEGIN
- ATOM(Segment_Tracks_TrackEntry_Audio_BitDepth)
- ATOM(Segment_Tracks_TrackEntry_Audio_Channels)
- ATOM(Segment_Tracks_TrackEntry_Audio_OutputSamplingFrequency)
- ATOM(Segment_Tracks_TrackEntry_Audio_SamplingFrequency)
- ATOM_END_MK
- ATOM(Segment_Tracks_TrackEntry_CodecDecodeAll)
- ATOM(Segment_Tracks_TrackEntry_CodecID)
- LIS2(Segment_Tracks_TrackEntry_ContentEncodings, "ContentEncodings")
- ATOM_BEGIN
- LIS2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding, "ContentEncoding")
- ATOM_BEGIN
- ATO2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Order, "Order")
- ATO2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Scope, "Scope")
- ATO2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Type, "Type")
- LIS2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Compression, "Compression")
- ATOM_BEGIN
- ATO2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Compression_ContentCompAlgo, "Algo")
- ATO2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Compression_ContentCompSettings, "Settings")
- ATOM_END_MK
- LIS2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption, "Encryption")
- ATOM_BEGIN
- ATO2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentEncAlgo, "Algo")
- ATO2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentEncKeyID, "KeyID")
- ATO2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentSignature, "Signature")
- ATO2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentSigKeyID, "SigKeyID")
- ATO2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentSigAlgo, "SigAlgo")
- ATO2(Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentSigHashAlgo, "SigHashAlgo")
- ATOM_END_MK
- ATOM_END_MK
- ATOM_END_MK
- ATOM(Segment_Tracks_TrackEntry_CodecName)
- ATOM(Segment_Tracks_TrackEntry_CodecPrivate)
- ATOM(Segment_Tracks_TrackEntry_DefaultDuration)
- ATOM(Segment_Tracks_TrackEntry_FlagDefault)
- ATOM(Segment_Tracks_TrackEntry_FlagEnabled)
- ATOM(Segment_Tracks_TrackEntry_FlagForced)
- ATOM(Segment_Tracks_TrackEntry_FlagLacing)
- ATOM(Segment_Tracks_TrackEntry_Language)
- ATOM(Segment_Tracks_TrackEntry_MaxBlockAdditionID)
- ATOM(Segment_Tracks_TrackEntry_MaxCache)
- ATOM(Segment_Tracks_TrackEntry_MinCache)
- ATOM(Segment_Tracks_TrackEntry_Name)
- ATOM(Segment_Tracks_TrackEntry_TrackNumber)
- ATOM(Segment_Tracks_TrackEntry_TrackTimecodeScale)
- ATOM(Segment_Tracks_TrackEntry_TrackType)
- ATOM(Segment_Tracks_TrackEntry_TrackUID)
- LIST(Segment_Tracks_TrackEntry_Video)
- ATOM_BEGIN
- ATOM(Segment_Tracks_TrackEntry_Video_AspectRatioType)
- ATOM(Segment_Tracks_TrackEntry_Video_ColourSpace)
- ATOM(Segment_Tracks_TrackEntry_Video_DisplayHeight)
- ATOM(Segment_Tracks_TrackEntry_Video_DisplayUnit)
- ATOM(Segment_Tracks_TrackEntry_Video_DisplayWidth)
- ATOM(Segment_Tracks_TrackEntry_Video_FlagInterlaced)
- ATOM(Segment_Tracks_TrackEntry_Video_FrameRate)
- ATOM(Segment_Tracks_TrackEntry_Video_PixelCropBottom)
- ATOM(Segment_Tracks_TrackEntry_Video_PixelCropLeft)
- ATOM(Segment_Tracks_TrackEntry_Video_PixelCropRight)
- ATOM(Segment_Tracks_TrackEntry_Video_PixelCropTop)
- ATOM(Segment_Tracks_TrackEntry_Video_PixelHeight)
- ATOM(Segment_Tracks_TrackEntry_Video_PixelWidth)
- ATOM(Segment_Tracks_TrackEntry_Video_StereoMode)
- ATOM_END_MK
- ATOM(Segment_Tracks_TrackEntry_TrackOverlay)
- LIST(Segment_Tracks_TrackEntry_TrackTranslate)
- ATOM_BEGIN
- ATOM(Segment_Tracks_TrackEntry_TrackTranslate_Codec)
- ATOM(Segment_Tracks_TrackEntry_TrackTranslate_EditionUID)
- ATOM(Segment_Tracks_TrackEntry_TrackTranslate_TrackID)
- ATOM_END_MK
- ATOM_END_MK
- ATOM_END_MK
- ATOM_END_MK
- DATA_END
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mk::Zero()
-{
- Element_Name("ZeroPadding");
-
- Skip_XX(Element_Size, "Padding");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::CRC32()
-{
- Element_Name("CRC32");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Void()
-{
- Element_Name("Void");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Ebml()
-{
- Element_Name("Ebml");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Ebml_Version()
-{
- Element_Name("Version");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Ebml_ReadVersion()
-{
- Element_Name("ReadVersion");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Ebml_MaxIDLength()
-{
- Element_Name("MaxIDLength");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Ebml_MaxSizeLength()
-{
- Element_Name("MaxSizeLength");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Ebml_DocType()
-{
- Element_Name("DocType");
-
- //Parsing
- Ztring Data;
- Get_Local(Element_Size, Data, "Data"); Element_Info1(Data);
-
- //Filling
- FILLING_BEGIN();
- if (Data==__T("matroska"))
- {
- Accept("Matroska");
- Fill(Stream_General, 0, General_Format, "Matroska");
- }
- else if (Data==__T("webm"))
- {
- Accept("Matroska");
- Fill(Stream_General, 0, General_Format, "WebM");
- }
- else
- {
- Reject("Matroska");
- return;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Ebml_DocTypeVersion()
-{
- Element_Name("DocTypeVersion");
-
- //Parsing
- Format_Version=UInteger_Get();
-
- //Filling
- FILLING_BEGIN();
- Fill(Stream_General, 0, General_Format_Version, __T("Version ")+Ztring::ToZtring(Format_Version));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Ebml_DocTypeReadVersion()
-{
- Element_Name("DocTypeReadVersion");
-
- //Parsing
- int64u UInteger=UInteger_Get();
-
- //Filling
- FILLING_BEGIN();
- if (UInteger!=Format_Version)
- Fill(Stream_General, 0, General_Format_Version, __T("Version ")+Ztring::ToZtring(UInteger)); //Adding compatible version for info about legacy decoders
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment()
-{
- Element_Name("Segment");
-
- if (!Status[IsAccepted])
- {
- Accept("Matroska");
- Fill(Stream_General, 0, General_Format, "Matroska"); //Default is Matroska
- }
-
- Segment_Offset_Begin=File_Offset+Buffer_Offset;
- Segment_Offset_End=File_Offset+Buffer_Offset+Element_TotalSize_Get();
-}
-
-void File_Mk::Segment_Attachements()
-{
- Element_Name("Attachements");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Attachements_AttachedFile()
-{
- Element_Name("AttachedFile");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Attachements_AttachedFile_FileData()
-{
- Element_Name("FileData");
-
- //Parsing
- Skip_XX(Element_TotalSize_Get(), "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Attachements_AttachedFile_FileDescription()
-{
- Element_Name("FileDescription");
-
- //Parsing
- Local_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Attachements_AttachedFile_FileName()
-{
- Element_Name("FileName");
-
- //Parsing
- Ztring Data=UTF8_Get();
-
- Fill(Stream_General, 0, "Attachements", Data);
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Attachements_AttachedFile_FileMimeType()
-{
- Element_Name("FileMimeType");
-
- //Parsing
- Local_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Attachements_AttachedFile_FileReferral()
-{
- Element_Name("FileReferral");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Attachements_AttachedFile_FileUID()
-{
- Element_Name("FileUID");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters()
-{
- Element_Name("Chapters");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry()
-{
- Element_Name("EditionEntry");
-
- //Filling
- EditionEntries_Pos=EditionEntries.size();
- EditionEntries.resize(EditionEntries_Pos+1);
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom()
-{
- Element_Name("ChapterAtom");
-
- //Filling
- ChapterAtoms_Pos=EditionEntries[EditionEntries_Pos].ChapterAtoms.size();
- EditionEntries[EditionEntries_Pos].ChapterAtoms.resize(ChapterAtoms_Pos+1);
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess()
-{
- Element_Name("ChapProcess");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCodecID()
-{
- Element_Name("ChapProcessCodecID");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCommand()
-{
- Element_Name("ChapProcessCommand");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCommand_ChapProcessData()
-{
- Element_Name("ChapProcessData");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCommand_ChapProcessTime()
-{
- Element_Name("ChapProcessTime");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessPrivate()
-{
- Element_Name("ChapProcessPrivate");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay()
-{
- Element_Name("ChapterDisplay");
-
- //Filling
- ChapterDisplays_Pos=EditionEntries[EditionEntries_Pos].ChapterAtoms[ChapterAtoms_Pos].ChapterDisplays.size();
- EditionEntries[EditionEntries_Pos].ChapterAtoms[ChapterAtoms_Pos].ChapterDisplays.resize(ChapterDisplays_Pos+1);
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay_ChapCountry()
-{
- Element_Name("ChapCountry");
-
- //Parsing
- Local_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay_ChapLanguage()
-{
- Element_Name("ChapLanguage");
-
- //Parsing
- Ztring Data=Local_Get();
-
- FILLING_BEGIN();
- EditionEntries[EditionEntries_Pos].ChapterAtoms[ChapterAtoms_Pos].ChapterDisplays[ChapterDisplays_Pos].ChapLanguage=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay_ChapString()
-{
- Element_Name("ChapString");
-
- //Parsing
- Ztring Data=UTF8_Get();
-
- FILLING_BEGIN();
- EditionEntries[EditionEntries_Pos].ChapterAtoms[ChapterAtoms_Pos].ChapterDisplays[ChapterDisplays_Pos].ChapString=Data;
- //if (TimecodeScale!=0 && ChapterTimeStart!=(int64u)-1)
- // Fill(StreamKind_Last, StreamPos_Last, Ztring::ToZtring(Chapter_Pos).To_Local().c_str(), Ztring().Duration_From_Milliseconds(ChapterTimeStart/TimecodeScale)+__T(" - ")+ChapterString, true);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterFlagHidden()
-{
- Element_Name("ChapterFlagHidden");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterFlagEnabled()
-{
- Element_Name("ChapterFlagEnabled");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterPhysicalEquiv()
-{
- Element_Name("ChapterPhysicalEquiv");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterSegmentEditionUID()
-{
- Element_Name("ChapterSegmentEditionUID");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterSegmentUID()
-{
- Element_Name("ChapterSegmentUID");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterTimeEnd()
-{
- Element_Name("ChapterTimeEnd");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterTimeStart()
-{
- Element_Name("ChapterTimeStart");
-
- //Parsing
- int64u Data=UInteger_Get();
-
- FILLING_BEGIN();
- EditionEntries[EditionEntries_Pos].ChapterAtoms[ChapterAtoms_Pos].ChapterTimeStart=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterTrack()
-{
- Element_Name("ChapterTrack");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterTrack_ChapterTrackNumber()
-{
- Element_Name("ChapterTrackNumber");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_ChapterAtom_ChapterUID()
-{
- Element_Name("ChapterUID");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_EditionFlagDefault()
-{
- Element_Name("EditionFlagDefault");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_EditionFlagHidden()
-{
- Element_Name("EditionFlagHidden");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_EditionFlagOrdered()
-{
- Element_Name("EditionFlagOrdered");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Chapters_EditionEntry_EditionUID()
-{
- Element_Name("EditionUID");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster()
-{
- Element_Name("Cluster");
-
- //For each stream
- std::map<int64u, stream>::iterator Temp=Stream.begin();
- if (!Cluster_AlreadyParsed)
- {
- Stream_Count=0;
- while (Temp!=Stream.end())
- {
- if (Temp->second.Parser)
- Temp->second.Searching_Payload=true;
- if (Temp->second.StreamKind==Stream_Video || Temp->second.StreamKind==Stream_Audio)
- Temp->second.Searching_TimeStamp_Start=true;
- if (Temp->second.StreamKind==Stream_Video)
- Temp->second.Searching_TimeStamps=true;
- if (Temp->second.Searching_Payload
- || Temp->second.Searching_TimeStamp_Start
- || Temp->second.Searching_TimeStamps)
- Stream_Count++;
-
- //Specific cases
- if (Retrieve(Temp->second.StreamKind, Temp->second.StreamPos, Audio_CodecID).find(__T("A_AAC/"))==0)
- ((File_Aac*)Stream[Temp->first].Parser)->Mode=File_Aac::Mode_raw_data_block; //In case AudioSpecificConfig is not present
-
- ++Temp;
- }
-
- //We must parse moov?
- if (Stream_Count==0)
- {
- //Jumping
- std::sort(Segment_Seeks.begin(), Segment_Seeks.end());
- for (size_t Pos=0; Pos<Segment_Seeks.size(); Pos++)
- if (Segment_Seeks[Pos]>File_Offset+Buffer_Offset+Element_Size)
- {
- GoTo(Segment_Seeks[Pos]);
- break;
- }
- if (File_GoTo==(int64u)-1)
- GoTo(Segment_Offset_End);
- return;
- }
- }
- Cluster_AlreadyParsed=true;
- Segment_Cluster_TimeCode_Value=0; //Default
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_BlockGroup()
-{
- Element_Name("BlockGroup");
-
- Segment_Cluster_BlockGroup_BlockDuration_Value=(int64u)-1;
- Segment_Cluster_BlockGroup_BlockDuration_TrackNumber=(int64u)-1;
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_BlockGroup_Block()
-{
- Element_Name("Block");
-
- //Parsing
- int64u TrackNumber;
- Get_EB (TrackNumber, "TrackNumber");
-
- //Finished?
- Stream[TrackNumber].PacketCount++;
- if (Stream[TrackNumber].Searching_Payload || Stream[TrackNumber].Searching_TimeStamps || Stream[TrackNumber].Searching_TimeStamp_Start)
- {
- //Parsing
- int16u TimeCode;
- Get_B2 (TimeCode, "TimeCode");
-
- FILLING_BEGIN();
- if (Segment_Cluster_TimeCode_Value+TimeCode<Stream[TrackNumber].TimeCode_Start) //Does not work well: Stream[TrackNumber].Searching_TimeStamp_Start)
- {
- FILLING_BEGIN();
- Stream[TrackNumber].TimeCode_Start=Segment_Cluster_TimeCode_Value+TimeCode;
- //Stream[TrackNumber].Searching_TimeStamp_Start=false;
- FILLING_END();
- }
- if (Stream[TrackNumber].Searching_TimeStamps)
- {
- Stream[TrackNumber].TimeCodes.push_back(Segment_Cluster_TimeCode_Value+TimeCode);
- if (Stream[TrackNumber].TimeCodes.size()>40)
- Stream[TrackNumber].Searching_TimeStamps=false;
- }
-
- if (Segment_Cluster_BlockGroup_BlockDuration_Value!=(int64u)-1)
- {
- Stream[TrackNumber].Segment_Cluster_BlockGroup_BlockDuration_Counts[Segment_Cluster_BlockGroup_BlockDuration_Value]++;
- Segment_Cluster_BlockGroup_BlockDuration_Value=(int64u)-1;
- }
- FILLING_END();
-
- if (Stream[TrackNumber].Searching_Payload)
- {
- std::vector<int64u> Laces;
- int32u Lacing;
- Element_Begin1("Flags");
- BS_Begin();
- Skip_BS(1, "KeyFrame");
- Skip_BS(3, "Reserved");
- Skip_BS(1, "Invisible");
- Get_BS (2, Lacing, "Lacing");
- Skip_BS(1, "Discardable");
- BS_End();
- Element_End0();
- if (Lacing>0)
- {
- Element_Begin1("Lacing");
- int8u FrameCountMinus1;
- Get_B1(FrameCountMinus1, "Frame count minus 1");
- switch (Lacing)
- {
- case 1 : //Xiph lacing
- {
- int64u Element_Offset_Virtual=0;
- for (int8u Pos=0; Pos<FrameCountMinus1; Pos++)
- {
- int32u Size=0;
- int8u Size8;
- do
- {
- Get_B1 (Size8, "Size");
- Size+=Size8;
- }
- while (Size8==0xFF);
- Param_Info1(Size);
- Element_Offset_Virtual+=Size;
- Laces.push_back(Size);
- }
- Laces.push_back(Element_Size-Element_Offset-Element_Offset_Virtual); //last lace
- }
- break;
- case 2 : //Fixed-size lacing - No more data
- {
- int64u Size=(Element_Size-Element_Offset)/(FrameCountMinus1+1);
- Laces.resize(FrameCountMinus1+1, Size);
- }
- break;
- case 3 : //EBML lacing
- {
- int64u Element_Offset_Virtual=0, Size;
- Get_EB (Size, "Size");
- Laces.push_back(Size);
- Element_Offset_Virtual+=Size;
- for (int8u Pos=1; Pos<FrameCountMinus1; Pos++)
- {
- int64s Diff;
- Get_ES (Diff, "Difference");
- Size+=Diff; Param_Info1(Size);
- Element_Offset_Virtual+=Size;
- Laces.push_back(Size);
- }
- Laces.push_back(Element_Size-Element_Offset-Element_Offset_Virtual); Param_Info1(Size); //last lace
- }
- break;
- default : ; //Should never be here
- }
- Element_End0();
- }
- else
- Laces.push_back(Element_Size-Element_Offset);
-
- FILLING_BEGIN();
- //Parsing
- for (size_t Pos=0; Pos<Laces.size(); Pos++)
- {
- //Content compression
- if (Stream[TrackNumber].ContentCompAlgo!=(int32u)-1 && Stream[TrackNumber].ContentCompAlgo!=3)
- Stream[TrackNumber].Searching_Payload=false; //Unsupported
-
- //Integrity test
- if (Element_Offset+Laces[Pos]>Element_Size)
- Stream[TrackNumber].Searching_Payload=false; //There is a problem
-
- if (Stream[TrackNumber].Searching_Payload)
- {
- Element_Code=TrackNumber;
-
- //Content compression
- if (Stream[TrackNumber].ContentCompAlgo==3) //Header Stripping
- {
- Element_Offset-=(size_t)Stream[TrackNumber].ContentCompSettings_Buffer_Size; //This is an extra array, not in the stream
- Open_Buffer_Continue(Stream[TrackNumber].Parser, Stream[TrackNumber].ContentCompSettings_Buffer, (size_t)Stream[TrackNumber].ContentCompSettings_Buffer_Size);
- Element_Offset+=(size_t)Stream[TrackNumber].ContentCompSettings_Buffer_Size;
- Demux(Stream[TrackNumber].ContentCompSettings_Buffer, (size_t)Stream[TrackNumber].ContentCompSettings_Buffer_Size, ContentType_MainStream);
- }
-
- //Parsing
- #if MEDIAINFO_DEMUX
- int8u Demux_Level_old=Demux_Level;
- if (Stream[TrackNumber].Parser && Stream[TrackNumber].Parser->Demux_Level==2)
- Demux_Level=4;
- Demux(Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset), ContentType_MainStream);
- Demux_Level=Demux_Level_old;
- #endif //MEDIAINFO_DEMUX
- Open_Buffer_Continue(Stream[TrackNumber].Parser, (size_t)Laces[Pos]);
- if (Stream[TrackNumber].Parser->Status[IsFilled]
- || Stream[TrackNumber].Parser->Status[IsFinished]
- || Stream[TrackNumber].PacketCount>=300)
- Stream[TrackNumber].Searching_Payload=false;
- }
- else
- Skip_XX(Laces[Pos], "Data");
- }
-
- //Positionning
- Element_Offset=Element_Size;
- FILLING_END();
- }
- else
- {
- Skip_XX(Element_Size-Element_Offset, "Data");
- }
-
- if (!Stream[TrackNumber].Searching_Payload && !Stream[TrackNumber].Searching_TimeStamps && !Stream[TrackNumber].Searching_TimeStamp_Start)
- Stream_Count--;
- }
- else
- {
- Skip_XX(Element_Size-Element_Offset, "Data");
- }
-
- //Filling
- Frame_Count++;
- if (!Status[IsFilled] && ((Frame_Count>6 && (Stream_Count==0 ||Config->ParseSpeed==0.0)) || Frame_Count>512*Stream.size()))
- {
- Fill();
- if (MediaInfoLib::Config.ParseSpeed_Get()<1)
- {
- //Jumping
- std::sort(Segment_Seeks.begin(), Segment_Seeks.end());
- for (size_t Pos=0; Pos<Segment_Seeks.size(); Pos++)
- if (Segment_Seeks[Pos]>File_Offset+Buffer_Offset+Element_Size)
- {
- GoTo(Segment_Seeks[Pos]);
- break;
- }
- if (File_GoTo==(int64u)-1)
- GoTo(Segment_Offset_End);
- }
- }
-
- Element_Show(); //For debug
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_BlockGroup_BlockAdditions()
-{
- Element_Name("BlockAdditions");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_BlockGroup_BlockAdditions_BlockMore()
-{
- Element_Name("BlockMore");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_BlockGroup_BlockAdditions_BlockMore_BlockAddID()
-{
- Element_Name("BlockAddID");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_BlockGroup_BlockAdditions_BlockMore_BlockAdditional()
-{
- Element_Name("BlockAdditional");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_BlockGroup_BlockDuration()
-{
- Element_Name("BlockDuration");
-
- //Parsing
- int64u Segment_Cluster_TimeCode_Value=UInteger_Get();
-
- FILLING_BEGIN();
- if (Segment_Cluster_BlockGroup_BlockDuration_TrackNumber!=(int64u)-1)
- {
- Stream[Segment_Cluster_BlockGroup_BlockDuration_TrackNumber].Segment_Cluster_BlockGroup_BlockDuration_Counts[Segment_Cluster_TimeCode_Value]++;
- Segment_Cluster_BlockGroup_BlockDuration_TrackNumber=(int64u)-1;
- }
- else
- Segment_Cluster_BlockGroup_BlockDuration_Value=Segment_Cluster_TimeCode_Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_BlockGroup_ReferenceBlock()
-{
- Element_Name("ReferenceBlock");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_BlockGroup_ReferencePriority()
-{
- Element_Name("ReferencePriority");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_BlockGroup_Slices()
-{
- Element_Name("Slices");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_BlockGroup_Slices_TimeSlice()
-{
- Element_Name("TimeSlice");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_BlockGroup_Slices_TimeSlice_Duration()
-{
- Element_Name("Duration");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_BlockGroup_Slices_TimeSlice_LaceNumber()
-{
- Element_Name("LaceNumber");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_Position()
-{
- Element_Name("Position");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_PrevSize()
-{
- Element_Name("PrevSize");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_SilentTracks()
-{
- Element_Name("SilentTracks");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_SilentTracks_SilentTrackNumber()
-{
- Element_Name("SilentTrackNumber");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_SimpleBlock()
-{
- Segment_Cluster_BlockGroup_BlockDuration_Value=(int64u)-1;
- Segment_Cluster_BlockGroup_BlockDuration_TrackNumber=(int64u)-1;
-
- Segment_Cluster_BlockGroup_Block();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cluster_Timecode()
-{
- Element_Name("Timecode");
-
- //Parsing
- Segment_Cluster_TimeCode_Value=UInteger_Get();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cues()
-{
- Element_Name("Cues");
-
- //Skipping Cues, we don't need of them
- Skip_XX(Element_TotalSize_Get(), "Cues data, skipping");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cues_CuePoint()
-{
- Element_Name("CuePoint");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cues_CuePoint_CueTime()
-{
- Element_Name("CueTime");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cues_CuePoint_CueTrackPositions()
-{
- Element_Name("CueTrackPositions");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cues_CuePoint_CueTrackPositions_CueTrack()
-{
- Element_Name("CueTrack");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cues_CuePoint_CueTrackPositions_CueClusterPosition()
-{
- Element_Name("CueClusterPosition");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Cues_CuePoint_CueTrackPositions_CueBlockNumber()
-{
- Element_Name("CueBlockNumber");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info()
-{
- Element_Name("Info");
-
- if (Cluster_AlreadyParsed)
- Skip_XX(Element_TotalSize_Get(), "Alreadys parsed, skipping");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_ChapterTranslate()
-{
- Element_Name("ChapterTranslate");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_ChapterTranslate_ChapterTranslateCodec()
-{
- Element_Name("ChapterTranslateCodec");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_ChapterTranslate_ChapterTranslateEditionUID()
-{
- Element_Name("ChapterTranslateEditionUID");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_ChapterTranslate_ChapterTranslateID()
-{
- Element_Name("ChapterTranslateID");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_DateUTC()
-{
- Element_Name("DateUTC");
-
- //Parsing
- int64u Data;
- Get_B8(Data, "Data"); Element_Info1(Data/1000000000+978307200); //From Beginning of the millenium, in nanoseconds
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, "Encoded_Date", Ztring().Date_From_Seconds_1970((int32u)(Data/1000000000+978307200))); //978307200s between beginning of the millenium and 1970
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_Duration()
-{
- Element_Name("Duration");
-
- //Parsing
- float64 Float=Float_Get();
-
- FILLING_BEGIN();
- Duration=Float;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_MuxingApp()
-{
- Element_Name("MuxingApp");
-
- //Parsing
- Ztring Data=UTF8_Get();
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, "Encoded_Library", Data);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_NextFilename()
-{
- Element_Name("NextFilename");
-
- //Parsing
- UTF8_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_NextUID()
-{
- Element_Name("NextUID");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_PrevFilename()
-{
- Element_Name("PrevFilename");
-
- //Parsing
- UTF8_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_PrevUID()
-{
- Element_Name("PrevUID");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_SegmentFamily()
-{
- Element_Name("SegmentFamily");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_SegmentFilename()
-{
- Element_Name("SegmentFilename");
-
- //Parsing
- UTF8_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_SegmentUID()
-{
- Element_Name("SegmentUID");
-
- //Parsing
- int128u Data;
- Data=UInteger16_Get();
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, General_UniqueID, Ztring().From_Local(Data.toString(10)));
- Fill(Stream_General, 0, General_UniqueID_String, Ztring().From_Local(Data.toString(10))+__T(" (0x")+Ztring().From_Local(Data.toString(16))+__T(')'));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_TimecodeScale()
-{
- Element_Name("TimecodeScale");
-
- //Parsing
- int64u UInteger=UInteger_Get();
-
- FILLING_BEGIN();
- TimecodeScale=UInteger;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_Title()
-{
- Element_Name("Title");
-
- //Parsing
- Ztring Data=UTF8_Get();
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, "Title", Data);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Info_WritingApp()
-{
- Element_Name("WritingApp");
-
- //Parsing
- Ztring Data=UTF8_Get();
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, "Encoded_Application", Data);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_SeekHead()
-{
- Element_Name("SeekHead");
-
- Segment_Seeks.clear();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_SeekHead_Seek()
-{
- Element_Name("Seek");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_SeekHead_Seek_SeekID()
-{
- Element_Name("SeekID");
-
- //Parsing
- int64u Data;
- Get_EB (Data, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_SeekHead_Seek_SeekPosition()
-{
- Element_Name("SeekPosition");
-
- //Parsing
- int64u Data=UInteger_Get();
-
- Segment_Seeks.push_back(Segment_Offset_Begin+Data);
- Element_Info1(Ztring::ToZtring(Segment_Offset_Begin+Data, 16));
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags()
-{
- Element_Name("Tags");
-
- Segment_Tag_SimpleTag_TagNames.clear();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag()
-{
- Element_Name("Tag");
-
- Segment_Tag_TrackUID=(int64u)-1;
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag_SimpleTag()
-{
- Element_Name("SimpleTag");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag_SimpleTag_TagBinary()
-{
- Element_Name("TagBinary");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag_SimpleTag_TagDefault()
-{
- Element_Name("TagDefault");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag_SimpleTag_TagLanguage()
-{
- Element_Name("TagLanguage");
-
- //Parsing
- Ztring Data;
- Get_Local(Element_Size, Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- //Fill(StreamKind_Last, StreamPos_Last, "Language", Data);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag_SimpleTag_TagName()
-{
- Element_Name("TagName");
-
- //Parsing
- Ztring TagName=UTF8_Get();
-
- Segment_Tag_SimpleTag_TagNames.resize(Element_Level-5); //5 is the first level of a tag
- Segment_Tag_SimpleTag_TagNames.push_back(TagName);
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag_SimpleTag_TagString()
-{
- Element_Name("TagString");
-
- //Parsing
- Ztring TagString;
- TagString=UTF8_Get();
-
- if (Segment_Tag_SimpleTag_TagNames.empty())
- return;
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("BITSPS")) return; //Useless
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("BPS")) return; //Useless
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("COMPATIBLE_BRANDS")) return; //QuickTime techinical info, useless
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("CREATION_TIME")) {Segment_Tag_SimpleTag_TagNames[0]=__T("Encoded_Date"); TagString.insert(0, __T("UTC "));}
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("DATE_DIGITIZED")) {Segment_Tag_SimpleTag_TagNames[0]=__T("Mastered_Date"); TagString.insert(0, __T("UTC "));}
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("ENCODED_BY")) Segment_Tag_SimpleTag_TagNames[0]=__T("EncodedBy");
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("ENCODER")) Segment_Tag_SimpleTag_TagNames[0]=__T("Encoded_Library");
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("FPS")) return; //Useless
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("LANGUAGE")) Segment_Tag_SimpleTag_TagNames[0]=__T("Language");
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("MAJOR_BRAND")) return; //QuickTime techinical info, useless
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("MINOR_VERSION")) return; //QuickTime techinical info, useless
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("ORIGINAL_MEDIA_TYPE")) Segment_Tag_SimpleTag_TagNames[0]=__T("OriginalSourceForm");
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("STEREO_MODE")) return; //Useless
- if (Segment_Tag_SimpleTag_TagNames[0]==__T("TERMS_OF_USE")) Segment_Tag_SimpleTag_TagNames[0]=__T("TermsOfUse");
- for (size_t Pos=1; Pos<Segment_Tag_SimpleTag_TagNames.size(); Pos++)
- {
- if (Segment_Tag_SimpleTag_TagNames[Pos]==__T("BARCODE")) Segment_Tag_SimpleTag_TagNames[Pos]=__T("BarCode");
- if (Segment_Tag_SimpleTag_TagNames[Pos]==__T("COMMENT")) Segment_Tag_SimpleTag_TagNames[Pos]=__T("Comment");
- if (Segment_Tag_SimpleTag_TagNames[Pos]==__T("URL")) Segment_Tag_SimpleTag_TagNames[Pos]=__T("Url");
- }
-
- Ztring TagName;
- for (size_t Pos=0; Pos<Segment_Tag_SimpleTag_TagNames.size(); Pos++)
- {
- TagName+=Segment_Tag_SimpleTag_TagNames[Pos];
- if (Pos+1<Segment_Tag_SimpleTag_TagNames.size())
- TagName+=__T('/');
- }
-
- StreamKind_Last=Stream_General;
- StreamPos_Last=0;
- if (Segment_Tag_TrackUID!=(int64u)-1 && Segment_Tag_TrackUID!=0)//0: Specs say this is for all tracks, but I prefer to wait for a sample in order to see how it is used in the reality
- {
- Ztring ID=Ztring::ToZtring(Segment_Tag_TrackUID);
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- if (Retrieve((stream_t)StreamKind, StreamPos, General_ID)==ID)
- {
- StreamKind_Last=(stream_t)StreamKind;
- StreamPos_Last=StreamPos;
- }
- }
-
- Fill(StreamKind_Last, StreamPos_Last, TagName.To_Local().c_str(), TagString, true);
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag_Targets()
-{
- Element_Name("Targets");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag_Targets_AttachmentUID()
-{
- Element_Name("AttachmentUID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag_Targets_ChapterUID()
-{
- Element_Name("ChapterUID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag_Targets_EditionUID()
-{
- Element_Name("EditionUID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag_Targets_TargetType()
-{
- Element_Name("TargetType");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag_Targets_TargetTypeValue()
-{
- Element_Name("TargetTypeValue");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tags_Tag_Targets_TrackUID()
-{
- Element_Name("TrackUID");
-
- //Parsing
- Segment_Tag_TrackUID=UInteger_Get();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks()
-{
- Element_Name("Tracks");
-
- if (Cluster_AlreadyParsed)
- Skip_XX(Element_TotalSize_Get(), "Alreadys parsed, skipping");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry()
-{
- Element_Name("TrackEntry");
-
- //Clearing
- CodecID.clear();
- InfoCodecID_Format_Type=InfoCodecID_Format_Matroska;
- TrackType=(int64u)-1;
- TrackNumber=(int64u)-1;
- TrackVideoDisplayWidth=0;
- TrackVideoDisplayHeight=0;
- AvgBytesPerSec=0;
-
- //Preparing
- Stream_Prepare(Stream_Max);
-
- //Default values
- Fill_Flush();
- Fill(StreamKind_Last, StreamPos_Last, "Language", "eng");
- Fill(StreamKind_Last, StreamPos_Last, General_StreamOrder, Stream.size());
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_AttachmentLink()
-{
- Element_Name("AttachmentLink");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Audio()
-{
- Element_Name("Audio");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Audio_BitDepth()
-{
- Element_Name("BitDepth");
-
- //Parsing
- int64u UInteger=UInteger_Get();
-
- FILLING_BEGIN();
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", UInteger, 10, true);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Audio_Channels()
-{
- Element_Name("Channels");
-
- //Parsing
- int64u UInteger=UInteger_Get();
-
- FILLING_BEGIN();
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, UInteger, 10, true);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Audio_OutputSamplingFrequency()
-{
- Element_Name("OutputSamplingFrequency");
-
- //Parsing
- float64 Float=Float_Get();
-
- FILLING_BEGIN();
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, Float, 0, true);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Audio_SamplingFrequency()
-{
- Element_Name("SamplingFrequency");
-
- //Parsing
- float64 Float=Float_Get();
-
- FILLING_BEGIN();
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, Float, 0, true);
- if (Retrieve(Stream_Audio, StreamPos_Last, Audio_CodecID).find(__T("A_AAC/"))==0)
- ((File_Aac*)Stream[TrackNumber].Parser)->AudioSpecificConfig_OutOfBand((int32u)float64_int64s(Float));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_CodecDecodeAll()
-{
- Element_Name("CodecDecodeAll");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_CodecID()
-{
- Element_Name("CodecID");
-
- //Parsing
- Ztring Data;
- Get_Local(Element_Size, Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- CodecID=Data;
- CodecID_Manage();
- CodecPrivate_Manage();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Compression()
-{
- FILLING_BEGIN();
- Stream[TrackNumber].ContentCompAlgo=0; //0 is default
- Fill(StreamKind_Last, StreamPos_Last, "MuxingMode", Mk_ContentCompAlgo(0), Unlimited, true, true);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Compression_ContentCompAlgo()
-{
- //Parsing
- int64u Algo=UInteger_Get(); Param_Info1(Mk_ContentCompAlgo(Algo));
-
- FILLING_BEGIN();
- Stream[TrackNumber].ContentCompAlgo=Algo;
- Fill(StreamKind_Last, StreamPos_Last, "MuxingMode", Mk_ContentCompAlgo(Algo), Unlimited, true, true);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Compression_ContentCompSettings()
-{
- //Parsing
- Skip_XX(Element_Size, "Data");
-
- FILLING_BEGIN();
- Stream[TrackNumber].ContentCompSettings_Buffer=new int8u[(size_t)Element_Size];
- std::memcpy(Stream[TrackNumber].ContentCompSettings_Buffer, Buffer+Buffer_Offset, (size_t)Element_Size);
- Stream[TrackNumber].ContentCompSettings_Buffer_Size=(size_t)Element_Size;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_CodecName()
-{
- Element_Name("CodecName");
-
- //Parsing
- UTF8_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_CodecPrivate()
-{
- Element_Name("CodecPrivate");
-
- //Creating the parser
- if (Stream.find(TrackNumber)==Stream.end() || Stream[TrackNumber].Parser==NULL)
- {
- if (Stream.find(TrackNumber)==Stream.end() || Retrieve(Stream[TrackNumber].StreamKind, Stream[TrackNumber].StreamPos, "CodecID").empty())
- {
- //Codec not already known, saving CodecPrivate
- if (CodecPrivate)
- delete[] CodecPrivate; //CodecPrivate=NULL.
- CodecPrivate_Size=(size_t)Element_Size;
- CodecPrivate=new int8u[(size_t)Element_Size];
- std::memcpy(CodecPrivate, Buffer+Buffer_Offset, (size_t)Element_Size);
- return;
- }
-
- if (Stream[TrackNumber].StreamKind==Stream_Audio && Retrieve(Stream_Audio, Stream[TrackNumber].StreamPos, Audio_CodecID)==__T("A_MS/ACM"))
- Segment_Tracks_TrackEntry_CodecPrivate_auds();
- else if (Stream[TrackNumber].StreamKind==Stream_Video && Retrieve(Stream_Video, Stream[TrackNumber].StreamPos, Video_CodecID)==__T("V_MS/VFW/FOURCC"))
- Segment_Tracks_TrackEntry_CodecPrivate_vids();
- else if (Element_Size>0)
- Skip_XX(Element_Size, "Unknown");
- return;
- }
-
- #if MEDIAINFO_DEMUX
- switch (Config->Demux_InitData_Get())
- {
- case 0 : //In demux event
- {
- Demux_Level=2; //Container
- int64u Element_Code_Old=Element_Code;
- Element_Code=TrackNumber;
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_Header);
- Element_Code=Element_Code_Old;
- }
- break;
- case 1 : //In field
- {
- std::string Data_Raw((const char*)(Buffer+Buffer_Offset), (size_t)Element_Size);
- std::string Data_Base64(Base64::encode(Data_Raw));
- Fill(StreamKind_Last, StreamPos_Last, "Demux_InitBytes", Data_Base64);
- (*Stream_More)[StreamKind_Last][StreamPos_Last](Ztring().From_Local("Demux_InitBytes"), Info_Options)=__T("N NT");
- }
- break;
- default : ;
- }
- #endif // MEDIAINFO_DEMUX
-
- //Parsing
- Open_Buffer_Continue(Stream[TrackNumber].Parser);
-
- //Filling
- if (Stream[TrackNumber].Parser->Status[IsFinished]) //Can be finnished here...
- {
- Stream[TrackNumber].Searching_Payload=false;
- Stream_Count--;
- }
-
- //In case of problem
- Element_Show();
-}
-
-//--------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_CodecPrivate_auds()
-{
- Element_Info1("Copy of auds");
-
- //Parsing
- int32u SamplesPerSec;
- int16u FormatTag, Channels, BitsPerSample;
- Get_L2 (FormatTag, "FormatTag");
- Get_L2 (Channels, "Channels");
- Get_L4 (SamplesPerSec, "SamplesPerSec");
- Get_L4 (AvgBytesPerSec, "AvgBytesPerSec");
- Skip_L2( "BlockAlign");
- Get_L2 (BitsPerSample, "BitsPerSample");
-
- //Filling
- FILLING_BEGIN();
- InfoCodecID_Format_Type=InfoCodecID_Format_Riff;
- CodecID.From_Number(FormatTag, 16);
- CodecID_Fill(CodecID, Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, CodecID, true); //May be replaced by codec parser
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec_CC, CodecID);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Channels!=5?Channels:6, 10, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, SamplesPerSec, 10, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate, AvgBytesPerSec*8, 10, true);
- if (BitsPerSample)
- Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, BitsPerSample);
-
- CodecID_Manage();
- if (TrackNumber!=(int64u)-1)
- Stream[TrackNumber].AvgBytesPerSec=AvgBytesPerSec;
- FILLING_END();
-
- //Options
- if (Element_Offset+2>Element_Size)
- return; //No options
-
- //Parsing
- int16u Option_Size;
- Get_L2 (Option_Size, "cbSize");
-
- //Filling
- if (Option_Size>0)
- {
- if (FormatTag==0xFFFE) //Extensible Wave
- Segment_Tracks_TrackEntry_CodecPrivate_auds_ExtensibleWave();
- else Skip_XX(Option_Size, "Unknown");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_CodecPrivate_auds_ExtensibleWave()
-{
- //Parsing
- int128u SubFormat;
- int32u ChannelMask;
- Skip_L2( "ValidBitsPerSample / SamplesPerBlock");
- Get_L4 (ChannelMask, "ChannelMask");
- Get_GUID(SubFormat, "SubFormat");
-
- FILLING_BEGIN();
- if ((SubFormat.hi&0xFFFFFFFFFFFF0000LL)==0x0010000000000000LL && SubFormat.lo==0x800000AA00389B71LL)
- {
- CodecID_Fill(Ztring().From_Number((int16u)SubFormat.hi, 16), Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff);
- Fill(Stream_Audio, StreamPos_Last, Audio_CodecID, Ztring().From_GUID(SubFormat), true);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, MediaInfoLib::Config.Codec_Get(Ztring().From_Number((int16u)SubFormat.hi, 16)), true);
-
- //Creating the parser
- #if defined(MEDIAINFO_PCM_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Riff, Ztring().From_Number((int16u)SubFormat.hi, 16))==__T("PCM"))
- {
- //Creating the parser
- File_Pcm MI;
- MI.Frame_Count_Valid=0;
- MI.Codec=Ztring().From_Number((int16u)SubFormat.hi, 16);
-
- //Parsing
- Open_Buffer_Init(&MI);
- Open_Buffer_Continue(&MI, 0);
-
- //Filling
- Finish(&MI);
- Merge(MI, StreamKind_Last, 0, StreamPos_Last);
- }
- #endif
- }
- else
- {
- CodecID_Fill(Ztring().From_GUID(SubFormat), Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff);
- }
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelPositions, ExtensibleWave_ChannelMask(ChannelMask));
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelPositions_String2, ExtensibleWave_ChannelMask2(ChannelMask));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_CodecPrivate_vids()
-{
- Element_Info1("Copy of vids");
-
- //Parsing
- int32u Width, Height, Compression;
- int16u Resolution;
- Skip_L4( "Size");
- Get_L4 (Width, "Width");
- Get_L4 (Height, "Height");
- Skip_L2( "Planes");
- Get_L2 (Resolution, "BitCount");
- Get_C4 (Compression, "Compression");
- Skip_L4( "SizeImage");
- Skip_L4( "XPelsPerMeter");
- Skip_L4( "YPelsPerMeter");
- Skip_L4( "ClrUsed");
- Skip_L4( "ClrImportant");
-
- FILLING_BEGIN();
- Ztring Codec;
- if (((Compression&0x000000FF)>=0x00000020 && (Compression&0x000000FF)<=0x0000007E
- && (Compression&0x0000FF00)>=0x00002000 && (Compression&0x0000FF00)<=0x00007E00
- && (Compression&0x00FF0000)>=0x00200000 && (Compression&0x00FF0000)<=0x007E0000
- && (Compression&0xFF000000)>=0x20000000 && (Compression&0xFF000000)<=0x7E000000)
- || Compression==0x00000000
- ) //Sometimes this value is wrong, we have to test this
- {
- //Filling
- InfoCodecID_Format_Type=InfoCodecID_Format_Riff;
- CodecID.From_CC4(Compression);
- if (Compression==0x00000000)
- {
- Fill(Stream_Video, StreamPos_Last, Video_Format, "RGB", Unlimited, true, true);
- Fill(Stream_Video, StreamPos_Last, Video_Codec, "RGB", Unlimited, true, true); //Raw RGB, not handled by automatic codec mapping
- }
- else
- {
- CodecID_Fill(CodecID, Stream_Video, StreamPos_Last, InfoCodecID_Format_Riff);
- Fill(Stream_Video, StreamPos_Last, Video_Codec, CodecID, true); //FormatTag, may be replaced by codec parser
- Fill(Stream_Video, StreamPos_Last, Video_Codec_CC, CodecID); //FormatTag
- }
- Fill(Stream_Video, StreamPos_Last, Video_Width, Width, 10, true);
- Fill(Stream_Video, StreamPos_Last, Video_Height, Height, 10, true);
- if (Resolution==32 && Compression==0x74736363) //tscc
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", 8);
- else if (Compression==0x44495633) //DIV3
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", 8);
- else if (Compression==0x44585342) //DXSB
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", Resolution);
- else if (Resolution>16 && MediaInfoLib::Config.CodecID_Get(StreamKind_Last, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression), InfoCodecID_ColorSpace).find(__T("RGBA"))!=std::string::npos) //RGB codecs
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", Resolution/4);
- else if (Compression==0x00000000 //RGB
- || MediaInfoLib::Config.CodecID_Get(StreamKind_Last, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression), InfoCodecID_ColorSpace).find(__T("RGB"))!=std::string::npos) //RGB codecs
- {
- if (Resolution==32)
- {
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), "RGBA", Unlimited, true, true);
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", Resolution/4); //With Alpha
- }
- else
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", Resolution<=16?8:(Resolution/3)); //indexed or normal
- }
- else if (Compression==0x56503632 //VP62
- || MediaInfoLib::Config.CodecID_Get(StreamKind_Last, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression), InfoCodecID_Format)==__T("H.263") //H.263
- || MediaInfoLib::Config.CodecID_Get(StreamKind_Last, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression), InfoCodecID_Format)==__T("VC-1")) //VC-1
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", Resolution/3);
- }
-
- //Creating the parser
- CodecID_Manage();
-
- FILLING_END();
-
- if (Data_Remain())
- {
- Element_Begin1("Private data");
- if (Stream[TrackNumber].Parser)
- {
- #if defined(MEDIAINFO_FFV1_YES)
- if (Compression==0x46465631) //FFV1
- ((File_Ffv1*)Stream[TrackNumber].Parser)->IsOutOfBandData=true; //TODO: implement ISOutOfBandData in a generic maner
- #endif
- #if defined(MEDIAINFO_FFV1_YES)
- if (Compression==0x46465648) //FFVH
- ((File_HuffYuv*)Stream[TrackNumber].Parser)->IsOutOfBandData=true; //TODO: implement ISOutOfBandData in a generic maner
- #endif
- Open_Buffer_Continue(Stream[TrackNumber].Parser);
- }
- else
- Skip_XX(Data_Remain(), "Unknown");
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_DefaultDuration()
-{
- Element_Name("DefaultDuration");
-
- //Parsing
- int64u UInteger=UInteger_Get();
-
- FILLING_BEGIN();
- Stream[TrackNumber].TrackDefaultDuration=UInteger;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_FlagDefault()
-{
- Element_Name("FlagDefault");
-
- //Parsing
- int64u UInteger=UInteger_Get();
-
- FILLING_BEGIN();
- Stream[TrackNumber].Default=UInteger?true:false;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_FlagEnabled()
-{
- Element_Name("FlagEnabled");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_FlagForced()
-{
- Element_Name("FlagForced");
-
- //Parsing
- int64u UInteger=UInteger_Get();
-
- FILLING_BEGIN();
- Stream[TrackNumber].Forced=UInteger?true:false;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_FlagLacing()
-{
- Element_Name("FlagLacing");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Language()
-{
- Element_Name("Language");
-
- //Parsing
- Ztring Data;
- Get_Local(Element_Size, Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Fill(StreamKind_Last, StreamPos_Last, "Language", Data, true);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_MaxBlockAdditionID()
-{
- Element_Name("MaxBlockAdditionID");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_MaxCache()
-{
- Element_Name("MaxCache");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_MinCache()
-{
- Element_Name("MinCache");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Name()
-{
- Element_Name("Name");
-
- //Parsing
- Ztring Data;
- Get_UTF8(Element_Size, Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Fill(StreamKind_Last, StreamPos_Last, "Title", Data);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_TrackNumber()
-{
- Element_Name("TrackNumber");
-
- //Parsing
- TrackNumber=UInteger_Get();
-
- FILLING_BEGIN();
- Fill(StreamKind_Last, StreamPos_Last, General_ID, TrackNumber);
- if (StreamKind_Last!=Stream_Max)
- {
- Stream[TrackNumber].StreamKind=StreamKind_Last;
- Stream[TrackNumber].StreamPos=StreamPos_Last;
- }
- if (TrackVideoDisplayWidth && TrackVideoDisplayHeight)
- Stream[TrackNumber].DisplayAspectRatio=((float)TrackVideoDisplayWidth)/(float)TrackVideoDisplayHeight;
- if (AvgBytesPerSec)
- Stream[TrackNumber].AvgBytesPerSec=AvgBytesPerSec;
-
- CodecID_Manage();
- CodecPrivate_Manage();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_TrackTimecodeScale()
-{
- Element_Name("TrackTimecodeScale");
-
- Float_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_TrackType()
-{
- Element_Name("TrackType");
-
- //Parsing
- int64u UInteger=UInteger_Get();
-
- //Filling
- FILLING_BEGIN();
- TrackType=UInteger;
- switch(UInteger)
- {
- case 0x01 :
- Stream_Prepare(Stream_Video);
- break;
- case 0x02 :
- Stream_Prepare(Stream_Audio);
- break;
- case 0x11 :
- Stream_Prepare(Stream_Text );
- break;
- default : ;
- }
-
- if (TrackNumber!=(int64u)-1 && StreamKind_Last!=Stream_Max)
- {
- Stream[TrackNumber].StreamKind=StreamKind_Last;
- Stream[TrackNumber].StreamPos=StreamPos_Last;
- }
-
- CodecID_Manage();
- CodecPrivate_Manage();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_TrackUID()
-{
- Element_Name("TrackUID");
-
- //Parsing
- int64u UInteger=UInteger_Get();
-
- //Filling
- FILLING_BEGIN();
- Fill(StreamKind_Last, StreamPos_Last, General_UniqueID, UInteger);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video()
-{
- Element_Name("Video");
-
- //Preparing
- TrackVideoDisplayWidth=0;
- TrackVideoDisplayHeight=0;
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_AspectRatioType()
-{
- Element_Name("AspectRatioType");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_ColourSpace()
-{
- Element_Name("ColourSpace");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_DisplayHeight()
-{
- Element_Name("DisplayHeight");
-
- //Parsing
- int64u UInteger=UInteger_Get();
-
- //Filling
- FILLING_BEGIN();
- TrackVideoDisplayHeight=UInteger;
- if (TrackNumber!=(int64u)-1 && TrackVideoDisplayWidth && TrackVideoDisplayHeight)
- Stream[TrackNumber].DisplayAspectRatio=((float)TrackVideoDisplayWidth)/(float)TrackVideoDisplayHeight;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_DisplayUnit()
-{
- Element_Name("DisplayUnit");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_DisplayWidth()
-{
- Element_Name("DisplayWidth");
-
- //Parsing
- int64u UInteger=UInteger_Get();
-
- //Filling
- FILLING_BEGIN();
- TrackVideoDisplayWidth=UInteger;
- if (TrackNumber!=(int64u)-1 && TrackVideoDisplayWidth && TrackVideoDisplayHeight)
- Stream[TrackNumber].DisplayAspectRatio=((float)TrackVideoDisplayWidth)/(float)TrackVideoDisplayHeight;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_FlagInterlaced()
-{
- Element_Name("FlagInterlaced");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_FrameRate()
-{
- Element_Name("FrameRate");
-
- //Parsing
- float64 Value=Float_Get();
-
- //Filling
- FILLING_BEGIN();
- Stream[TrackNumber].FrameRate=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_PixelCropBottom()
-{
- Element_Name("PixelCropBottom");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_PixelCropLeft()
-{
- Element_Name("PixelCropLeft");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_PixelCropRight()
-{
- Element_Name("PixelCropRight");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_PixelCropTop()
-{
- Element_Name("PixelCropTop");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_PixelHeight()
-{
- Element_Name("PixelHeight");
-
- //Parsing
- int64u UInteger=UInteger_Get();
-
- //Filling
- FILLING_BEGIN();
- Fill(Stream_Video, StreamPos_Last, Video_Height, UInteger, 10, true);
- if (!TrackVideoDisplayHeight)
- TrackVideoDisplayHeight=UInteger; //Default value of DisplayHeight is PixelHeight
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_PixelWidth()
-{
- Element_Name("PixelWidth");
-
- //Parsing
- int64u UInteger=UInteger_Get();
-
- //Filling
- FILLING_BEGIN();
- Fill(Stream_Video, StreamPos_Last, Video_Width, UInteger, 10, true);
- if (!TrackVideoDisplayWidth)
- TrackVideoDisplayWidth=UInteger; //Default value of DisplayWidth is PixelWidth
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_Video_StereoMode()
-{
- Element_Name("StereoMode");
-
- //Parsing
- int64u UInteger=UInteger_Get(); Element_Info1(Format_Version==2?Mk_StereoMode_v2(UInteger):Mk_StereoMode(UInteger));
-
- //Filling
- FILLING_BEGIN();
- Fill(Stream_Video, StreamPos_Last, Video_MultiView_Count, 2); //Matroska seems to be limited to 2 views
- Fill(Stream_Video, StreamPos_Last, Video_MultiView_Layout, Format_Version==2?Mk_StereoMode_v2(UInteger):Mk_StereoMode(UInteger));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_TrackOverlay()
-{
- Element_Name("TrackOverlay");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_TrackTranslate()
-{
- Element_Name("TrackTranslate");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_TrackTranslate_Codec()
-{
- Element_Name("Codec");
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_TrackTranslate_EditionUID()
-{
- Element_Name("EditionUID");
-
- //Parsing
- UInteger_Info();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Segment_Tracks_TrackEntry_TrackTranslate_TrackID()
-{
- Element_Name("TrackID");
-
- //Parsing
- UInteger_Info();
-}
-
-//***************************************************************************
-// Data
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mk::UInteger_Info()
-{
- switch (Element_Size)
- {
- case 1 :
- {
- Info_B1(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 2 :
- {
- Info_B2(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 3 :
- {
- Info_B3(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 4 :
- {
- Info_B4(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 5 :
- {
- Info_B5(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 6 :
- {
- Info_B6(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 7 :
- {
- Info_B7(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 8 :
- {
- Info_B8(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 16:
- {
- Info_B16(Data, "Data"); Element_Info1(Data);
- return;
- }
- default : Skip_XX(Element_Size, "Data");
- }
-}
-
-//---------------------------------------------------------------------------
-int64u File_Mk::UInteger_Get()
-{
- switch (Element_Size)
- {
- case 1 :
- {
- int8u Data;
- Get_B1 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 2 :
- {
- int16u Data;
- Get_B2 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 3 :
- {
- int32u Data;
- Get_B3 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 4 :
- {
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 5 :
- {
- int64u Data;
- Get_B5 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 6 :
- {
- int64u Data;
- Get_B6 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 7 :
- {
- int64u Data;
- Get_B7 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 8 :
- {
- int64u Data;
- Get_B8 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- default : Skip_XX(Element_Size, "Data");
- return 0;
- }
-}
-
-//---------------------------------------------------------------------------
-int128u File_Mk::UInteger16_Get()
-{
- switch (Element_Size)
- {
- case 1 :
- {
- int8u Data;
- Get_B1 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 2 :
- {
- int16u Data;
- Get_B2 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 3 :
- {
- int32u Data;
- Get_B3 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 4 :
- {
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 5 :
- {
- int64u Data;
- Get_B5 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 6 :
- {
- int64u Data;
- Get_B6 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 7 :
- {
- int64u Data;
- Get_B7 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 8 :
- {
- int64u Data;
- Get_B8 (Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 16:
- {
- int128u Data;
- Get_B16(Data, "Data"); Element_Info1(Data);
- return Data;
- }
- default : Skip_XX(Element_Size, "Data");
- return 0;
- }
-}
-
-//---------------------------------------------------------------------------
-float64 File_Mk::Float_Get()
-{
- switch (Element_Size)
- {
- case 4 :
- {
- float32 Data;
- Get_BF4(Data, "Data"); Element_Info1(Data);
- return Data;
- }
- case 8 :
- {
- float64 Data;
- Get_BF8(Data, "Data"); Element_Info1(Data);
- return Data;
- }
- default : Skip_XX(Element_Size, "Data");
- return 0.0;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Float_Info()
-{
- switch (Element_Size)
- {
- case 4 :
- {
- Info_BF4(Data, "Data"); Element_Info1(Data);
- return;
- }
- case 8 :
- {
- Info_BF8(Data, "Data"); Element_Info1(Data);
- return;
- }
- default : Skip_XX(Element_Size, "Data");
- return;
- }
-}
-
-//---------------------------------------------------------------------------
-Ztring File_Mk::UTF8_Get()
-{
- Ztring Data;
- Get_UTF8(Element_Size, Data, "Data"); Element_Info1(Data);
- return Data;
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::UTF8_Info()
-{
- Info_UTF8(Element_Size, Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-Ztring File_Mk::Local_Get()
-{
- Ztring Data;
- Get_Local(Element_Size, Data, "Data"); Element_Info1(Data);
- return Data;
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::Local_Info()
-{
- Info_Local(Element_Size, Data, "Data"); Element_Info1(Data);
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mk::CodecID_Manage()
-{
- if (TrackType==(int64u)-1 || TrackNumber==(int64u)-1 || CodecID.empty() || Stream[TrackNumber].Parser)
- return; //Not ready (or not needed)
-
- if (Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_CodecID)).empty())
- {
- CodecID_Fill(CodecID, StreamKind_Last, StreamPos_Last, InfoCodecID_Format_Matroska);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), CodecID);
- }
-
- //Creating the parser
- #if defined(MEDIAINFO_MPEG4V_YES) || defined(MEDIAINFO_AVC_YES) || defined(MEDIAINFO_HEVC_YES) || defined(MEDIAINFO_VC1_YES) || defined(MEDIAINFO_DIRAC_YES) || defined(MEDIAINFO_MPEGV_YES) || defined(MEDIAINFO_VP8_YES) || defined(MEDIAINFO_OGG_YES)
- const Ztring &Format=MediaInfoLib::Config.CodecID_Get(StreamKind_Last, InfoCodecID_Format_Type, CodecID, InfoCodecID_Format);
- #endif
- if (0);
- #if defined(MEDIAINFO_MPEG4V_YES)
- else if (Format==__T("MPEG-4 Visual"))
- {
- Stream[TrackNumber].Parser=new File_Mpeg4v;
- ((File_Mpeg4v*)Stream[TrackNumber].Parser)->FrameIsAlwaysComplete=true;
- }
- #endif
- #if defined(MEDIAINFO_AVC_YES)
- else if (Format==__T("AVC"))
- {
- Stream[TrackNumber].Parser=new File_Avc;
- ((File_Avc*)Stream[TrackNumber].Parser)->FrameIsAlwaysComplete=true;
- if (InfoCodecID_Format_Type==InfoCodecID_Format_Matroska)
- {
- ((File_Avc*)Stream[TrackNumber].Parser)->MustSynchronize=false;
- ((File_Avc*)Stream[TrackNumber].Parser)->MustParse_SPS_PPS=true;
- ((File_Avc*)Stream[TrackNumber].Parser)->SizedBlocks=true;
- }
- }
- #endif
- #if defined(MEDIAINFO_HEVC_YES)
- else if (Format==__T("HEVC"))
- {
- Stream[TrackNumber].Parser=new File_Hevc;
- ((File_Hevc*)Stream[TrackNumber].Parser)->FrameIsAlwaysComplete=true;
- if (InfoCodecID_Format_Type==InfoCodecID_Format_Matroska)
- {
- ((File_Hevc*)Stream[TrackNumber].Parser)->MustSynchronize=false;
- ((File_Hevc*)Stream[TrackNumber].Parser)->MustParse_VPS_SPS_PPS=true;
- ((File_Hevc*)Stream[TrackNumber].Parser)->MustParse_VPS_SPS_PPS_FromMatroska=true;
- ((File_Hevc*)Stream[TrackNumber].Parser)->SizedBlocks=true;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Get())
- {
- Stream[TrackNumber].Parser->Demux_Level=2; //Container
- Stream[TrackNumber].Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- }
- }
- #endif
- #if defined(MEDIAINFO_FFV1_YES)
- else if (Format==__T("FFV1"))
- {
- Stream[TrackNumber].Parser=new File_Ffv1;
- }
- #endif
- #if defined(MEDIAINFO_HUFFYUV_YES)
- else if (Format==__T("HuffYUV"))
- {
- Stream[TrackNumber].Parser=new File_HuffYuv;
- }
- #endif
- #if defined(MEDIAINFO_VC1_YES)
- else if (Format==__T("VC-1"))
- {
- Stream[TrackNumber].Parser=new File_Vc1;
- ((File_Vc1*)Stream[TrackNumber].Parser)->FrameIsAlwaysComplete=true;
- ((File_Vc1*)Stream[TrackNumber].Parser)->Frame_Count_Valid=1;
- }
- #endif
- #if defined(MEDIAINFO_DIRAC_YES)
- else if (Format==__T("Dirac"))
- {
- Stream[TrackNumber].Parser=new File_Dirac;
- ((File_Dirac*)Stream[TrackNumber].Parser)->Frame_Count_Valid=1;
- }
- #endif
- #if defined(MEDIAINFO_MPEGV_YES)
- else if (Format==__T("MPEG Video"))
- {
- Stream[TrackNumber].Parser=new File_Mpegv;
- ((File_Mpegv*)Stream[TrackNumber].Parser)->FrameIsAlwaysComplete=true;
- }
- #endif
- #if defined(MEDIAINFO_PRORES_YES)
- else if (Format==__T("ProRes"))
- {
- Stream[TrackNumber].Parser=new File_ProRes;
- }
- #endif
- #if defined(MEDIAINFO_VP8_YES)
- else if (Format==__T("VP8"))
- {
- Stream[TrackNumber].Parser=new File_Vp8;
- }
- #endif
- #if defined(MEDIAINFO_OGG_YES)
- else if (Format==__T("Theora") || Format==__T("Vorbis"))
- {
- Stream[TrackNumber].Parser=new File_Ogg;
- Stream[TrackNumber].Parser->MustSynchronize=false;
- ((File_Ogg*)Stream[TrackNumber].Parser)->XiphLacing=true;
- }
- #endif
- #if defined(MEDIAINFO_RM_YES)
- else if (CodecID.find(__T("V_REAL/"))==0)
- {
- Stream[TrackNumber].Parser=new File_Rm;
- ((File_Rm*)Stream[TrackNumber].Parser)->FromMKV_StreamType=Stream_Video;
- }
- #endif
- #if defined(MEDIAINFO_AC3_YES)
- else if (Format==__T("AC-3") || Format==__T("E-AC-3") || Format==__T("TrueHD"))
- {
- Stream[TrackNumber].Parser=new File_Ac3;
- ((File_Ac3*)Stream[TrackNumber].Parser)->Frame_Count_Valid=2;
- }
- #endif
- #if defined(MEDIAINFO_DTS_YES)
- else if (Format==__T("DTS"))
- {
- Stream[TrackNumber].Parser=new File_Dts;
- ((File_Dts*)Stream[TrackNumber].Parser)->Frame_Count_Valid=2;
- }
- #endif
- #if defined(MEDIAINFO_AAC_YES)
- else if (CodecID==(__T("A_AAC")))
- {
- Stream[TrackNumber].Parser=new File_Aac;
- ((File_Aac*)Stream[TrackNumber].Parser)->Mode=File_Aac::Mode_AudioSpecificConfig;
- }
- #endif
- #if defined(MEDIAINFO_AAC_YES)
- else if (CodecID.find(__T("A_AAC/"))==0)
- {
- Ztring Profile;
- int8u audioObjectType=0, Version=0, SBR=2, PS=2;
- if (CodecID==__T("A_AAC/MPEG2/MAIN")) {Version=2; Profile=__T("Main"); audioObjectType=1;}
- else if (CodecID==__T("A_AAC/MPEG2/LC")) {Version=2; Profile=__T("LC"); audioObjectType=2; SBR=0;}
- else if (CodecID==__T("A_AAC/MPEG2/LC/SBR")) {Version=2; Profile=__T("HE-AAC / LC"); audioObjectType=2; SBR=1;}
- else if (CodecID==__T("A_AAC/MPEG2/SSR")) {Version=2; Profile=__T("SSR"); audioObjectType=3;}
- else if (CodecID==__T("A_AAC/MPEG4/MAIN")) {Version=4; Profile=__T("Main"); audioObjectType=1;}
- else if (CodecID==__T("A_AAC/MPEG4/LC")) {Version=4; Profile=__T("LC"); audioObjectType=2; SBR=0;}
- else if (CodecID==__T("A_AAC/MPEG4/LC/SBR")) {Version=4; Profile=__T("HE-AAC / LC"); audioObjectType=2; SBR=1; PS=0;}
- else if (CodecID==__T("A_AAC/MPEG4/LC/SBR/PS")){Version=4; Profile=__T("HE-AACv2 / HE-AAC / LC"); audioObjectType=2; SBR=1; PS=1;}
- else if (CodecID==__T("A_AAC/MPEG4/SSR")) {Version=4; Profile=__T("SSR"); audioObjectType=3;}
- else if (CodecID==__T("A_AAC/MPEG4/LTP")) {Version=4; Profile=__T("LTP"); audioObjectType=4;}
- else if (CodecID==__T("raac")) { Profile=__T("LC"); audioObjectType=2;}
- else if (CodecID==__T("racp")) { Profile=__T("HE-AAC / LC"); audioObjectType=2; SBR=1; PS=0;}
-
- if (Version>0)
- Fill(Stream_Audio, StreamPos_Last, Audio_Format_Version, Version==2?"Version 2":"Version 4");
- Fill(Stream_Audio, StreamPos_Last, Audio_Format_Profile, Profile);
- if (SBR!=2)
- Fill(Stream_Audio, StreamPos_Last, Audio_Format_Settings_SBR, SBR?"Yes":"No");
- if (PS!=2)
- Fill(Stream_Audio, StreamPos_Last, Audio_Format_Settings_PS, PS?"Yes":"No");
- int32u sampling_frequency=Retrieve(Stream_Audio, StreamPos_Last, Audio_SamplingRate).To_int32u();
-
- Stream[TrackNumber].Parser=new File_Aac;
- ((File_Aac*)Stream[TrackNumber].Parser)->Mode=File_Aac::Mode_AudioSpecificConfig;
- ((File_Aac*)Stream[TrackNumber].Parser)->AudioSpecificConfig_OutOfBand(sampling_frequency, audioObjectType, SBR==1?true:false, PS==1?true:false, SBR==1?true:false, PS==1?true:false);
- }
- #endif
- #if defined(MEDIAINFO_AAC_YES)
- else if (Format==(__T("AAC")))
- {
- Stream[TrackNumber].Parser=new File_Aac;
- ((File_Aac*)Stream[TrackNumber].Parser)->Mode=File_Aac::Mode_ADTS;
- }
- #endif
- #if defined(MEDIAINFO_MPEGA_YES)
- else if (Format==__T("MPEG Audio"))
- {
- Stream[TrackNumber].Parser=new File_Mpega;
- }
- #endif
- #if defined(MEDIAINFO_FLAC_YES)
- else if (Format==__T("Flac"))
- {
- Stream[TrackNumber].Parser=new File_Flac;
- }
- #endif
- #if defined(MEDIAINFO_OPUS_YES)
- else if (CodecID.find(__T("A_OPUS"))==0) //http://wiki.xiph.org/MatroskaOpus
- {
- Stream[TrackNumber].Parser=new File_Opus;
- }
- #endif
- #if defined(MEDIAINFO_WVPK_YES)
- else if (Format==__T("WavPack"))
- {
- Stream[TrackNumber].Parser=new File_Wvpk;
- ((File_Wvpk*)Stream[TrackNumber].Parser)->FromMKV=true;
- }
- #endif
- #if defined(MEDIAINFO_TTA_YES)
- else if (Format==__T("TTA"))
- {
- //Stream[TrackNumber].Parser=new File_Tta; //Parser is not needed, because header is useless and dropped (the parser analyses only the header)
- }
- #endif
- #if defined(MEDIAINFO_PCM_YES)
- else if (Format==__T("PCM"))
- {
- Stream[TrackNumber].Parser=new File_Pcm;
- ((File_Pcm*)Stream[TrackNumber].Parser)->Codec=CodecID;
- }
- #endif
- #if defined(MEDIAINFO_RM_YES)
- else if (CodecID.find(__T("A_REAL/"))==0)
- {
- Stream[TrackNumber].Parser=new File_Rm;
- ((File_Rm*)Stream[TrackNumber].Parser)->FromMKV_StreamType=Stream_Audio;
- }
- #endif
- Element_Code=TrackNumber;
- Open_Buffer_Init(Stream[TrackNumber].Parser);
-
- CodecID.clear();
-}
-
-//---------------------------------------------------------------------------
-void File_Mk::CodecPrivate_Manage()
-{
- if (CodecPrivate==NULL || TrackNumber==(int64u)-1 || TrackType==(int64u)-1)
- return; //Not ready (or not needed)
-
- //Codec Private is already here, so we can parse it now
- const int8u* Buffer_Save=Buffer;
- size_t Buffer_Offset_Save=Buffer_Offset;
- size_t Buffer_Size_Save=Buffer_Size;
- int64u Element_Size_Save=Element_Size;
- Buffer=CodecPrivate;
- Buffer_Offset=0;
- Buffer_Size=CodecPrivate_Size;
- Element_Offset=0;
- Element_Size=Buffer_Size;
- Segment_Tracks_TrackEntry_CodecPrivate();
- Buffer=Buffer_Save;
- Buffer_Offset=Buffer_Offset_Save;
- Buffer_Size=Buffer_Size_Save;
- Element_Size=Element_Size_Save;
- Element_Offset=Element_Size_Save;
- delete[] CodecPrivate; CodecPrivate=NULL;
- CodecPrivate_Size=0;
- Element_Name("(Multiple info)");
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_MK_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mk.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mk.h
deleted file mode 100644
index 5ac36f757..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mk.h
+++ /dev/null
@@ -1,346 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Matroska files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_MatroskaH
-#define MediaInfo_File_MatroskaH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Classe File_Matroska
-//***************************************************************************
-
-class File_Mk : public File__Analyze
-{
-protected :
- //Streams management
- void Streams_Finish();
-
-public :
- File_Mk();
- ~File_Mk();
- void Segment_Attachements_AttachedFile_FileName();
-
-private :
- //Buffer
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Zero();
- void CRC32();
- void Void();
- void Ebml();
- void Ebml_Version();
- void Ebml_ReadVersion();
- void Ebml_MaxIDLength();
- void Ebml_MaxSizeLength();
- void Ebml_DocType();
- void Ebml_DocTypeVersion();
- void Ebml_DocTypeReadVersion();
- void Segment();
- void Segment_Attachements();
- void Segment_Attachements_AttachedFile();
- void Segment_Attachements_AttachedFile_FileData();
- void Segment_Attachements_AttachedFile_FileDescription();
- void Segment_Attachements_AttachedFile_FileMimeType();
- void Segment_Attachements_AttachedFile_FileReferral();
- void Segment_Attachements_AttachedFile_FileUID();
- void Segment_Chapters();
- void Segment_Chapters_EditionEntry();
- void Segment_Chapters_EditionEntry_ChapterAtom();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCodecID();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCommand();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCommand_ChapProcessData();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessCommand_ChapProcessTime();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapProcess_ChapProcessPrivate();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay_ChapCountry();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay_ChapLanguage();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterDisplay_ChapString();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterFlagHidden();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterFlagEnabled();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterPhysicalEquiv();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterSegmentEditionUID();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterSegmentUID();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterTimeEnd();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterTimeStart();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterTrack();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterTrack_ChapterTrackNumber();
- void Segment_Chapters_EditionEntry_ChapterAtom_ChapterUID();
- void Segment_Chapters_EditionEntry_EditionFlagDefault();
- void Segment_Chapters_EditionEntry_EditionFlagHidden();
- void Segment_Chapters_EditionEntry_EditionFlagOrdered();
- void Segment_Chapters_EditionEntry_EditionUID();
- void Segment_Cluster();
- void Segment_Cluster_BlockGroup();
- void Segment_Cluster_BlockGroup_Block();
- void Segment_Cluster_BlockGroup_BlockAdditions();
- void Segment_Cluster_BlockGroup_BlockAdditions_BlockMore();
- void Segment_Cluster_BlockGroup_BlockAdditions_BlockMore_BlockAddID();
- void Segment_Cluster_BlockGroup_BlockAdditions_BlockMore_BlockAdditional();
- void Segment_Cluster_BlockGroup_BlockDuration();
- void Segment_Cluster_BlockGroup_ReferenceBlock();
- void Segment_Cluster_BlockGroup_ReferencePriority();
- void Segment_Cluster_BlockGroup_Slices();
- void Segment_Cluster_BlockGroup_Slices_TimeSlice();
- void Segment_Cluster_BlockGroup_Slices_TimeSlice_Duration();
- void Segment_Cluster_BlockGroup_Slices_TimeSlice_LaceNumber();
- void Segment_Cluster_Position();
- void Segment_Cluster_PrevSize();
- void Segment_Cluster_SilentTracks();
- void Segment_Cluster_SilentTracks_SilentTrackNumber();
- void Segment_Cluster_SimpleBlock();
- void Segment_Cluster_Timecode();
- void Segment_Cues();
- void Segment_Cues_CuePoint();
- void Segment_Cues_CuePoint_CueTime();
- void Segment_Cues_CuePoint_CueTrackPositions();
- void Segment_Cues_CuePoint_CueTrackPositions_CueTrack();
- void Segment_Cues_CuePoint_CueTrackPositions_CueClusterPosition();
- void Segment_Cues_CuePoint_CueTrackPositions_CueBlockNumber();
- void Segment_Info();
- void Segment_Info_ChapterTranslate();
- void Segment_Info_ChapterTranslate_ChapterTranslateCodec();
- void Segment_Info_ChapterTranslate_ChapterTranslateEditionUID();
- void Segment_Info_ChapterTranslate_ChapterTranslateID();
- void Segment_Info_DateUTC();
- void Segment_Info_Duration();
- void Segment_Info_MuxingApp();
- void Segment_Info_NextFilename();
- void Segment_Info_NextUID();
- void Segment_Info_PrevFilename();
- void Segment_Info_PrevUID();
- void Segment_Info_SegmentFamily();
- void Segment_Info_SegmentFilename();
- void Segment_Info_SegmentUID();
- void Segment_Info_TimecodeScale();
- void Segment_Info_Title();
- void Segment_Info_WritingApp();
- void Segment_SeekHead();
- void Segment_SeekHead_Seek();
- void Segment_SeekHead_Seek_SeekID();
- void Segment_SeekHead_Seek_SeekPosition();
- void Segment_Tags();
- void Segment_Tags_Tag();
- void Segment_Tags_Tag_SimpleTag();
- void Segment_Tags_Tag_SimpleTag_TagBinary();
- void Segment_Tags_Tag_SimpleTag_TagDefault();
- void Segment_Tags_Tag_SimpleTag_TagLanguage();
- void Segment_Tags_Tag_SimpleTag_TagName();
- void Segment_Tags_Tag_SimpleTag_TagString();
- void Segment_Tags_Tag_Targets();
- void Segment_Tags_Tag_Targets_AttachmentUID();
- void Segment_Tags_Tag_Targets_ChapterUID();
- void Segment_Tags_Tag_Targets_EditionUID();
- void Segment_Tags_Tag_Targets_TargetType();
- void Segment_Tags_Tag_Targets_TargetTypeValue();
- void Segment_Tags_Tag_Targets_TrackUID();
- void Segment_Tracks();
- void Segment_Tracks_TrackEntry();
- void Segment_Tracks_TrackEntry_AttachmentLink();
- void Segment_Tracks_TrackEntry_Audio();
- void Segment_Tracks_TrackEntry_Audio_BitDepth();
- void Segment_Tracks_TrackEntry_Audio_Channels();
- void Segment_Tracks_TrackEntry_Audio_OutputSamplingFrequency();
- void Segment_Tracks_TrackEntry_Audio_SamplingFrequency();
- void Segment_Tracks_TrackEntry_CodecDecodeAll();
- void Segment_Tracks_TrackEntry_CodecID();
- void Segment_Tracks_TrackEntry_ContentEncodings() {};
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding() {};
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Order() {UInteger_Info();};
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Scope() {UInteger_Info();};
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Type() {UInteger_Info();};
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Compression();
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Compression_ContentCompAlgo();
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Compression_ContentCompSettings();
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption() {};
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentEncAlgo() {UInteger_Info();};
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentEncKeyID() {Skip_XX(Element_Size, "Data");};
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentSignature() {Skip_XX(Element_Size, "Data");};
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentSigKeyID() {Skip_XX(Element_Size, "Data");};
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentSigAlgo() {UInteger_Info();};
- void Segment_Tracks_TrackEntry_ContentEncodings_ContentEncoding_Encryption_ContentSigHashAlgo() {UInteger_Info();};
- void Segment_Tracks_TrackEntry_CodecName();
- void Segment_Tracks_TrackEntry_CodecPrivate();
- void Segment_Tracks_TrackEntry_CodecPrivate_auds();
- void Segment_Tracks_TrackEntry_CodecPrivate_auds_ExtensibleWave();
- void Segment_Tracks_TrackEntry_CodecPrivate_vids();
- void Segment_Tracks_TrackEntry_DefaultDuration();
- void Segment_Tracks_TrackEntry_FlagDefault();
- void Segment_Tracks_TrackEntry_FlagEnabled();
- void Segment_Tracks_TrackEntry_FlagForced();
- void Segment_Tracks_TrackEntry_FlagLacing();
- void Segment_Tracks_TrackEntry_Language();
- void Segment_Tracks_TrackEntry_MaxBlockAdditionID();
- void Segment_Tracks_TrackEntry_MaxCache();
- void Segment_Tracks_TrackEntry_MinCache();
- void Segment_Tracks_TrackEntry_Name();
- void Segment_Tracks_TrackEntry_TrackNumber();
- void Segment_Tracks_TrackEntry_TrackTimecodeScale();
- void Segment_Tracks_TrackEntry_TrackType();
- void Segment_Tracks_TrackEntry_TrackUID();
- void Segment_Tracks_TrackEntry_Video();
- void Segment_Tracks_TrackEntry_Video_AspectRatioType();
- void Segment_Tracks_TrackEntry_Video_ColourSpace();
- void Segment_Tracks_TrackEntry_Video_DisplayHeight();
- void Segment_Tracks_TrackEntry_Video_DisplayUnit();
- void Segment_Tracks_TrackEntry_Video_DisplayWidth();
- void Segment_Tracks_TrackEntry_Video_FlagInterlaced();
- void Segment_Tracks_TrackEntry_Video_FrameRate();
- void Segment_Tracks_TrackEntry_Video_PixelCropBottom();
- void Segment_Tracks_TrackEntry_Video_PixelCropLeft();
- void Segment_Tracks_TrackEntry_Video_PixelCropRight();
- void Segment_Tracks_TrackEntry_Video_PixelCropTop();
- void Segment_Tracks_TrackEntry_Video_PixelHeight();
- void Segment_Tracks_TrackEntry_Video_PixelWidth();
- void Segment_Tracks_TrackEntry_Video_StereoMode();
- void Segment_Tracks_TrackEntry_Video_StereoModeBuggy() {Segment_Tracks_TrackEntry_Video_StereoMode();}
- void Segment_Tracks_TrackEntry_TrackOverlay();
- void Segment_Tracks_TrackEntry_TrackTranslate();
- void Segment_Tracks_TrackEntry_TrackTranslate_Codec();
- void Segment_Tracks_TrackEntry_TrackTranslate_EditionUID();
- void Segment_Tracks_TrackEntry_TrackTranslate_TrackID();
-
- struct stream
- {
- std::vector<int64u> TimeCodes;
- int64u TimeCode_Start;
- File__Analyze* Parser;
- stream_t StreamKind;
- size_t StreamPos;
- size_t PacketCount;
- int32u AvgBytesPerSec; //Only used by x_MS/* codecIDs
- float32 DisplayAspectRatio;
- float64 FrameRate;
- bool Searching_Payload;
- bool Searching_TimeStamps;
- bool Searching_TimeStamp_Start;
- bool Default;
- bool Forced;
- int64u ContentCompAlgo;
- size_t ContentCompSettings_Buffer_Size;
- int8u* ContentCompSettings_Buffer;
- std::map<std::string, Ztring> Infos;
- int64u TrackDefaultDuration;
- std::map<int64u, int64u> Segment_Cluster_BlockGroup_BlockDuration_Counts;
-
- stream()
- {
- TimeCode_Start=(int64u)-1;
- Parser=NULL;
- StreamKind=Stream_Max;
- StreamPos=0;
- PacketCount=0;
- AvgBytesPerSec=0;
- DisplayAspectRatio=0;
- FrameRate=0;
- Searching_Payload=false;
- Searching_TimeStamps=false;
- Searching_TimeStamp_Start=false;
- Default=true;
- Forced=false;
- ContentCompAlgo=(int32u)-1;
- ContentCompSettings_Buffer_Size=0;
- ContentCompSettings_Buffer=NULL;
- TrackDefaultDuration=0;
- }
-
- ~stream()
- {
- delete Parser; //Parser=NULL;
- delete[] ContentCompSettings_Buffer; //ContentCompSettings_Buffer=NULL;
- }
- };
- std::map<int64u, stream> Stream;
- size_t Stream_Count;
-
- //Data
- int64u UInteger_Get();
- int128u UInteger16_Get();
- void UInteger_Info();
-
- float64 Float_Get();
- void Float_Info();
-
- Ztring UTF8_Get();
- void UTF8_Info();
-
- Ztring Local_Get();
- void Local_Info();
-
- //Temp - TrackEntry
- int8u* CodecPrivate;
- size_t CodecPrivate_Size;
- void CodecPrivate_Manage();
- Ztring CodecID;
- infocodecid_format_t InfoCodecID_Format_Type;
- void CodecID_Manage();
- int64u TrackType;
-
- //Temp
- int64u Format_Version;
- int64u TimecodeScale;
- float64 Duration;
- int64u TrackNumber;
- int64u TrackVideoDisplayWidth;
- int64u TrackVideoDisplayHeight;
- int32u AvgBytesPerSec;
- int64u Segment_Cluster_TimeCode_Value;
- bool Cluster_AlreadyParsed;
-
- //Chapters
- struct chapterdisplay
- {
- Ztring ChapLanguage;
- Ztring ChapString;
- };
- struct chapteratom
- {
- int64u ChapterTimeStart;
- std::vector<chapterdisplay> ChapterDisplays;
-
- chapteratom()
- {
- ChapterTimeStart=(int64u)-1;
- }
- };
- struct editionentry
- {
- std::vector<chapteratom> ChapterAtoms;
- };
- std::vector<editionentry> EditionEntries;
- size_t EditionEntries_Pos;
- size_t ChapterAtoms_Pos;
- size_t ChapterDisplays_Pos;
- int64u Segment_Offset_Begin;
- int64u Segment_Offset_End;
- std::vector<int64u> Segment_Seeks;
- size_t Segment_Seeks_Pos;
- int64u Segment_Tag_TrackUID;
- std::vector<Ztring> Segment_Tag_SimpleTag_TagNames;
- int64u Segment_Cluster_BlockGroup_BlockDuration_Value;
- int64u Segment_Cluster_BlockGroup_BlockDuration_TrackNumber;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4.cpp
deleted file mode 100644
index 4735b0094..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4.cpp
+++ /dev/null
@@ -1,2144 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Main part
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_MPEG4_YES
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Mpeg4.h"
-#include "MediaInfo/Multiple/File_Mpeg4_Descriptors.h"
-#if defined(MEDIAINFO_MPEGPS_YES)
- #include "MediaInfo/Multiple/File_MpegPs.h"
-#endif
-#include "ZenLib/FileName.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-#ifdef MEDIAINFO_REFERENCES_YES
- #include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#endif //MEDIAINFO_REFERENCES_YES
-#include "ZenLib/Format/Http/Http_Utils.h"
-#include <algorithm> // std::sort
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Const
-//***************************************************************************
-
-namespace Elements
-{
- const int64u free=0x66726565;
- const int64u mdat=0x6D646174;
- const int64u moov_meta______=0x2D2D2D2D;
- const int64u moov_meta___ART=0xA9415254;
- const int64u moov_meta___alb=0xA9616C62;
- const int64u moov_meta___ard=0xA9617264;
- const int64u moov_meta___arg=0xA9617267;
- const int64u moov_meta___aut=0xA9617574;
- const int64u moov_meta___con=0xA963696E;
- const int64u moov_meta___cmt=0xA9636D74;
- const int64u moov_meta___cpy=0xA9637079;
- const int64u moov_meta___day=0xA9646179;
- const int64u moov_meta___des=0xA9646573;
- const int64u moov_meta___dir=0xA9646972;
- const int64u moov_meta___dis=0xA9646973;
- const int64u moov_meta___edl=0xA965646C;
- const int64u moov_meta___enc=0xA9656E63;
- const int64u moov_meta___fmt=0xA9666D74;
- const int64u moov_meta___gen=0xA967656E;
- const int64u moov_meta___grp=0xA9677270;
- const int64u moov_meta___hos=0xA9686F73;
- const int64u moov_meta___inf=0xA9696E66;
- const int64u moov_meta___key=0xA96B6579;
- const int64u moov_meta___lyr=0xA96C7972;
- const int64u moov_meta___mak=0xA96D616B;
- const int64u moov_meta___mod=0xA96D6F64;
- const int64u moov_meta___nam=0xA96E616D;
- const int64u moov_meta___ope=0xA96F7065;
- const int64u moov_meta___prd=0xA9707264;
- const int64u moov_meta___PRD=0xA9505244;
- const int64u moov_meta___prf=0xA9707266;
- const int64u moov_meta___req=0xA9726571;
- const int64u moov_meta___sne=0xA9736E65;
- const int64u moov_meta___sol=0xA9736F6C;
- const int64u moov_meta___src=0xA9737263;
- const int64u moov_meta___st3=0xA9737403;
- const int64u moov_meta___swr=0xA9737772;
- const int64u moov_meta___too=0xA9746F6F;
- const int64u moov_meta___url=0xA975726C;
- const int64u moov_meta___wrn=0xA977726E;
- const int64u moov_meta___wrt=0xA9777274;
- const int64u moov_meta___xpd=0xA9787064;
- const int64u moov_meta__aART=0x61415254;
- const int64u moov_meta__akID=0x616B4944;
- const int64u moov_meta__albm=0x616C626D;
- const int64u moov_meta__apID=0x61704944;
- const int64u moov_meta__atID=0x61744944;
- const int64u moov_meta__auth=0x61757468;
- const int64u moov_meta__catg=0x63617467;
- const int64u moov_meta__cnID=0x636E4944;
- const int64u moov_meta__cpil=0x6370696C;
- const int64u moov_meta__cprt=0x63707274;
- const int64u moov_meta__covr=0x636F7672;
- const int64u moov_meta__desc=0x64657363;
- const int64u moov_meta__disk=0x6469736B;
- const int64u moov_meta__dscp=0x64736370;
- const int64u moov_meta__egid=0x65676964;
- const int64u moov_meta__flvr=0x666C7672;
- const int64u moov_meta__gnre=0x676E7265;
- const int64u moov_meta__geID=0x67654944;
- const int64u moov_meta__grup=0x67727570;
- const int64u moov_meta__hdvd=0x68647664;
- const int64u moov_meta__itnu=0x69746E75;
- const int64u moov_meta__keyw=0x6B657977;
- const int64u moov_meta__ldes=0x6C646573;
- const int64u moov_meta__name=0x6E616D65;
- const int64u moov_meta__pcst=0x70637374;
- const int64u moov_meta__perf=0x70657266;
- const int64u moov_meta__pgap=0x70676170;
- const int64u moov_meta__plID=0x706C4944;
- const int64u moov_meta__purd=0x70757264;
- const int64u moov_meta__purl=0x7075726C;
- const int64u moov_meta__rate=0x72617465;
- const int64u moov_meta__rndu=0x726E6475;
- const int64u moov_meta__rpdu=0x72706475;
- const int64u moov_meta__rtng=0x72746E67;
- const int64u moov_meta__sdes=0x73646573;
- const int64u moov_meta__sfID=0x73664944;
- const int64u moov_meta__soaa=0x736F6161;
- const int64u moov_meta__soal=0x736F616C;
- const int64u moov_meta__soar=0x736F6172;
- const int64u moov_meta__soco=0x736F636F;
- const int64u moov_meta__sonm=0x736F6E6D;
- const int64u moov_meta__sosn=0x736F736E;
- const int64u moov_meta__stik=0x7374696B;
- const int64u moov_meta__titl=0x7469746C;
- const int64u moov_meta__tool=0x746F6F6C;
- const int64u moov_meta__trkn=0x74726B6E;
- const int64u moov_meta__tmpo=0x746D706F;
- const int64u moov_meta__tven=0x7476656E;
- const int64u moov_meta__tves=0x74766573;
- const int64u moov_meta__tvnn=0x74766E6E;
- const int64u moov_meta__tvsh=0x74767368;
- const int64u moov_meta__tvsn=0x7476736E;
- const int64u moov_meta__xid_=0x78696420;
- const int64u moov_meta__year=0x79656172;
- const int64u moov_meta__yyrc=0x79797263;
- const int64u moov_trak_mdia_hdlr_alis=0x616C6973;
- const int64u moov_trak_mdia_hdlr_hint=0x68696E74;
- const int64u skip=0x736B6970;
- const int64u wide=0x77696465;
-}
-
-//---------------------------------------------------------------------------
-Ztring Mpeg4_Encoded_Library(int32u Vendor)
-{
- switch (Vendor)
- {
- case 0x33495658 : return __T("3ivX"); //3IVX
- case 0x6170706C : return __T("Apple QuickTime"); //appl
- case 0x6E696B6F : return __T("Nikon"); //niko
- case 0x6F6C796D : return __T("Olympus"); //olym
- case 0x6F6D6E65 : return __T("Omneon"); //omne
- default: return Ztring().From_CC4(Vendor);
- }
-}
-
-//---------------------------------------------------------------------------
-Ztring Mpeg4_Language_Apple(int16u Language)
-{
- switch (Language)
- {
- case 0 : return __T("en");
- case 1 : return __T("fr");
- case 2 : return __T("de");
- case 6 : return __T("es");
- default: return Ztring::ToZtring(Language);
- }
-}
-
-//---------------------------------------------------------------------------
-extern const char* Mpeg4_chan(int16u Ordering);
-extern const char* Mpeg4_chan_Layout(int16u Ordering);
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Mpeg4::File_Mpeg4()
-:File__Analyze()
-{
- //Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Mpeg4;
- StreamIDs_Width[0]=8;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- #endif //MEDIAINFO_DEMUX
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(0); //Container1
- #endif //MEDIAINFO_TRACE
-
- DataMustAlwaysBeComplete=false;
-
- //Temp
- mdat_MustParse=false;
- moov_mvhd_TimeScale=1;
- Vendor=0x00000000;
- FirstMdatPos=(int64u)-1;
- LastMdatPos=0;
- FirstMoovPos=(int64u)-1;
- MajorBrand=0x00000000;
- IsSecondPass=false;
- IsParsing_mdat=false;
- IsFragmented=false;
- StreamOrder=0;
- moov_trak_tkhd_TrackID=(int32u)-1;
- #if defined(MEDIAINFO_REFERENCES_YES)
- ReferenceFiles=NULL;
- #endif //defined(MEDIAINFO_REFERENCES_YES)
- mdat_Pos_NormalParsing=false;
- moof_traf_base_data_offset=(int64u)-1;
- data_offset_present=true;
- #if MEDIAINFO_NEXTPACKET
- ReferenceFiles_IsParsing=false;
- #endif //MEDIAINFO_NEXTPACKET
- #if MEDIAINFO_DEMUX
- TimeCode_FrameOffset=0;
- TimeCode_DtsOffset=0;
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-File_Mpeg4::~File_Mpeg4()
-{
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::Streams_Accept()
-{
- if (!IsSub)
- {
- /*bool IsDashMpd=false;
- for (size_t Pos=0; pos<ftyps
- TestContinuousFileNames();*/
- }
-
- if (!IsSub && MajorBrand==0x6A703220) //"jp2 "
- {
- TestContinuousFileNames();
-
- Stream_Prepare((Config->File_Names.size()>1 || Config->File_IsReferenced_Get())?Stream_Video:Stream_Image);
- if (StreamKind_Last==Stream_Video)
- Fill(Stream_Video, StreamPos_Last, Video_FrameCount, Config->File_Names.size());
- }
-
- //Configuration
- Buffer_MaximumSize=64*1024*1024; //Some big frames are possible (e.g YUV 4:2:2 10 bits 1080p)
- File_Buffer_Size_Hint_Pointer=Config->File_Buffer_Size_Hint_Pointer_Get();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::Streams_Finish()
-{
- #if defined(MEDIAINFO_REFERENCES_YES) && MEDIAINFO_NEXTPACKET
- //Locators only
- if (ReferenceFiles_IsParsing)
- {
- ReferenceFiles->ParseReferences();
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return;
- #endif //MEDIAINFO_DEMUX
-
- Streams_Finish_CommercialNames();
- return;
- }
- #endif //defined(MEDIAINFO_REFERENCES_YES) && MEDIAINFO_NEXTPACKET
-
- //Final Cut EIA-608 format
- if (Retrieve(Stream_General, 0, General_Format)==__T("Final Cut EIA-608"))
- {
- for (streams::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- {
- Stream->second.Parsers[0]->Finish();
- if (Stream->second.Parsers[0]->Count_Get(Stream_Text))
- {
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, StreamPos_Last, Text_ID, Stream->first==1?"608-1":"608-2");
- Fill(Stream_Text, StreamPos_Last, "MuxingMode", __T("Final Cut"), Unlimited);
- Merge(*Stream->second.Parsers[0], Stream_Text, 0, StreamPos_Last);
- }
-
- //Law rating
- Ztring LawRating=Stream->second.Parsers[0]->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=Stream->second.Parsers[0]->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
- }
-
- return;
- }
-
- Fill_Flush();
- int64u File_Size_Total=File_Size;
-
- //TimeCode
- for (streams::iterator Temp=Streams.begin(); Temp!=Streams.end(); ++Temp)
- if (Temp->second.TimeCode)
- TimeCode_Associate(Temp->first);
-
- //For each stream
- streams::iterator Temp=Streams.begin();
- while (Temp!=Streams.end())
- {
- //Preparing
- StreamKind_Last=Temp->second.StreamKind;
- StreamPos_Last=Temp->second.StreamPos;
-
- if (StreamKind_Last==Stream_Max && Temp->second.hdlr_SubType)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, Ztring().From_CC4(Temp->second.hdlr_SubType));
- }
-
- //if (Temp->second.stsz_StreamSize)
- // Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_StreamSize), Temp->second.stsz_StreamSize);
-
- //Edit lists coherencies
- if (Temp->second.edts.size()>1 && Temp->second.edts[0].Duration==Temp->second.tkhd_Duration)
- {
- bool Duplicates=true;
- for (size_t Pos=1; Pos<Temp->second.edts.size(); Pos++)
- if (Temp->second.edts[Pos-1].Delay!=Temp->second.edts[Pos].Delay || Temp->second.edts[Pos-1].Duration!=Temp->second.edts[Pos].Duration || Temp->second.edts[Pos-1].Rate!=Temp->second.edts[Pos].Rate)
- Duplicates=false;
- if (Duplicates)
- Temp->second.edts.resize(1);
- }
-
- //Fragments
- if (IsFragmented)
- {
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Duration), Temp->second.stts_Duration/((float)Temp->second.mdhd_TimeScale)*1000, 0, true);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_FrameCount), Temp->second.stts_FrameCount, 10, true);
- }
-
- //Duration/StreamSize
- if (moov_mvhd_TimeScale && Temp->second.TimeCode==NULL && Temp->second.mdhd_TimeScale)
- {
- Ztring Duration_stts_FirstFrame, Duration_stts_LastFrame;
- if (Temp->second.stts_Duration_FirstFrame)
- Duration_stts_FirstFrame.From_Number(((float32)(((int32s)Temp->second.stts_Duration_FirstFrame)-((int32s)Temp->second.stts[1].SampleDuration)))*1000/Temp->second.mdhd_TimeScale, 0); //The duration of the frame minus 1 normal frame duration
- if (Temp->second.stts_Duration_LastFrame)
- Duration_stts_LastFrame.From_Number(((float32)(((int32s)Temp->second.stts_Duration_LastFrame)-((int32s)Temp->second.stts[Temp->second.stts_Duration_FirstFrame?1:0].SampleDuration)))*1000/Temp->second.mdhd_TimeScale, 0); //The duration of the frame minus 1 normal frame duration
-
- float32 Duration_tkhd_H=((float32)(Temp->second.tkhd_Duration+1))/moov_mvhd_TimeScale;
- float32 Duration_tkhd_L=((float32)(Temp->second.tkhd_Duration-1))/moov_mvhd_TimeScale;
- float32 Duration_stts=((float32)Temp->second.stts_Duration)/Temp->second.mdhd_TimeScale;
- if (!IsFragmented && Duration_stts && !(Duration_stts>=Duration_tkhd_L && Duration_stts<=Duration_tkhd_H))
- {
- //There is a difference between media/stts atom and track atom
- Fill(StreamKind_Last, StreamPos_Last, "Source_Duration", Duration_stts*1000, 0);
- Fill(StreamKind_Last, StreamPos_Last, "Source_Duration_FirstFrame", Duration_stts_FirstFrame);
- Fill(StreamKind_Last, StreamPos_Last, "Source_Duration_LastFrame", Duration_stts_LastFrame);
- if (Temp->second.stts.size()!=1 || Temp->second.mdhd_TimeScale<100 || Temp->second.stts[0].SampleDuration!=1) //TODO: test PCM
- if (Temp->second.stts_FrameCount)
- Fill(StreamKind_Last, StreamPos_Last, "Source_FrameCount", Temp->second.stts_FrameCount);
- if (Temp->second.stsz_StreamSize)
- Fill(StreamKind_Last, StreamPos_Last, "Source_StreamSize", Temp->second.stsz_StreamSize);
-
- //Calculating new properties based on track duration
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Duration), ((float32)Temp->second.tkhd_Duration)/moov_mvhd_TimeScale*1000, 0, true);
- //Fill(StreamKind_Last, StreamPos_Last, "Duration_FirstFrame", Duration_stts_FirstFrame);
- Clear(StreamKind_Last, StreamPos_Last, "Duration_LastFrame"); //TODO
-
- int64u FrameCount;
- if (Temp->second.stts_Min && Temp->second.stts_Min==Temp->second.stts_Max)
- FrameCount=float64_int64s(((float64)Temp->second.tkhd_Duration)/moov_mvhd_TimeScale*Temp->second.mdhd_TimeScale/Temp->second.stts_Min);
- else
- {
- FrameCount=0;
- int64u Ticks_Max=float64_int64s(((float64)Temp->second.tkhd_Duration)/moov_mvhd_TimeScale*Temp->second.mdhd_TimeScale);
- int64u Ticks=0;
- for (size_t stts_Pos=0; stts_Pos<Temp->second.stts.size(); stts_Pos++)
- {
- int64u Ticks_Complete = (int64u)Temp->second.stts[stts_Pos].SampleCount * (int64u)Temp->second.stts[stts_Pos].SampleDuration;
- if (Ticks+Ticks_Complete>=Ticks_Max)
- {
- if (Temp->second.stts[stts_Pos].SampleDuration)
- FrameCount+=float64_int64s(((float64)(Ticks_Max-Ticks))/Temp->second.stts[stts_Pos].SampleDuration);
- break;
- }
- Ticks+=Ticks_Complete;
- FrameCount+=Temp->second.stts[stts_Pos].SampleCount;
- }
- }
- if (Temp->second.stts.size()!=1 || Temp->second.mdhd_TimeScale<100 || Temp->second.stts[0].SampleDuration!=1) //TODO: test PCM
- Fill(StreamKind_Last, StreamPos_Last, "FrameCount", FrameCount, 10, true);
-
- if (Temp->second.stsz_Total.empty())
- Fill(StreamKind_Last, StreamPos_Last, "StreamSize", FrameCount*Temp->second.stsz_Sample_Size*Temp->second.stsz_Sample_Multiplier);
- else if (FrameCount<=Temp->second.stsz_Total.size())
- {
- int64u StreamSize=0;
- for (size_t stsz_Pos=0; stsz_Pos<FrameCount; stsz_Pos++)
- StreamSize+=Temp->second.stsz_Total[stsz_Pos];
- bool HasEncodedBitRate=!Retrieve(StreamKind_Last, StreamPos_Last, "BitRate_Encoded").empty();
- Fill(StreamKind_Last, StreamPos_Last, HasEncodedBitRate?"StreamSize_Encoded":"StreamSize", StreamSize);
- }
- }
- else
- {
- //Normal
- if (Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Duration)).empty())
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Duration), Duration_stts*1000, 0);
- Fill(StreamKind_Last, StreamPos_Last, "Duration_FirstFrame", Duration_stts_FirstFrame);
- Fill(StreamKind_Last, StreamPos_Last, "Duration_LastFrame", Duration_stts_LastFrame);
- if (Temp->second.stts.size()!=1 || Temp->second.mdhd_TimeScale<100 || Temp->second.stts[0].SampleDuration!=1) //TODO: test PCM
- if (Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_FrameCount)).empty() && Temp->second.stts_FrameCount)
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_FrameCount), Temp->second.stts_FrameCount);
- bool HasPadding=(Temp->second.Parsers.size()==1 && !Temp->second.Parsers[0]->Retrieve(StreamKind_Last, StreamPos_Last, "BitRate_Encoded").empty()) || (Temp->second.Parsers.size()==1 && Temp->second.Parsers[0]->Buffer_TotalBytes && ((float32)Temp->second.Parsers[0]->Buffer_PaddingBytes)/Temp->second.Parsers[0]->Buffer_TotalBytes>0.02);
- if (Temp->second.stsz_StreamSize)
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, HasPadding?Generic_StreamSize_Encoded:Generic_StreamSize), Temp->second.stsz_StreamSize);
- }
- }
-
- //Edit Lists
- float64 Delay=0;
- switch (Temp->second.edts.size())
- {
- case 0 :
- break;
- case 1 :
- if (Temp->second.edts[0].Duration==Temp->second.tkhd_Duration && Temp->second.edts[0].Rate==0x00010000 && moov_mvhd_TimeScale)
- {
- Delay=Temp->second.edts[0].Delay;
- Delay=-Delay;
- if (Temp->second.mdhd_TimeScale)
- Delay/=Temp->second.mdhd_TimeScale; //In seconds
- }
- break;
- case 2 :
- if (Temp->second.edts[0].Delay==(int32u)-1 && Temp->second.edts[0].Duration+Temp->second.edts[1].Duration==Temp->second.tkhd_Duration && Temp->second.edts[0].Rate==0x00010000 && Temp->second.edts[1].Rate==0x00010000 && moov_mvhd_TimeScale)
- {
- Delay=Temp->second.edts[0].Duration;
- Temp->second.tkhd_Duration-=float64_int64s(Delay);
- Delay/=moov_mvhd_TimeScale; //In seconds
- }
- break;
- default:
- break; //TODO: handle more complex Edit Lists
- }
- if (Delay && !Retrieve(StreamKind_Last, StreamPos_Last, "Source_Duration").empty())
- {
- Delay+=Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay)).To_float64()/1000; //TODO: use TimeCode value directly instead of the rounded value
- if (!Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay_Source)).empty() && Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay_Source))!=__T("Container"))
- {
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay_Original), Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay)));
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay_Original_Source), Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay_Source)));
- }
- Fill(StreamKind_Last, StreamPos_Last, "Source_Delay", Delay*1000, 0, true);
- Fill(StreamKind_Last, StreamPos_Last, "Source_Delay_Source", "Container", Unlimited, true, true);
- (*Stream_More)[StreamKind_Last][StreamPos_Last](Ztring().From_Local("Source_Delay"), Info_Options)=__T("N NT");
- (*Stream_More)[StreamKind_Last][StreamPos_Last](Ztring().From_Local("Source_Delay_Source"), Info_Options)=__T("N NT");
- }
-
- if (StreamKind_Last==Stream_Video && Temp->second.TimeCode==NULL)
- {
- if (Temp->second.mdhd_TimeScale && Temp->second.stts_Min && Temp->second.stts_Max)
- {
- if (Temp->second.stts_Min==0 || Temp->second.stts_Max==0 || (Temp->second.stts_Min!=Temp->second.stts_Max && ((float)Temp->second.mdhd_TimeScale)/Temp->second.stts_Min-((float)Temp->second.mdhd_TimeScale)/Temp->second.stts_Max>=0.001))
- {
- if (Temp->second.stts_Max)
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate_Minimum, ((float)Temp->second.mdhd_TimeScale)/Temp->second.stts_Max, 3, true);
- if (Temp->second.stts_Min)
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate_Maximum, ((float)Temp->second.mdhd_TimeScale)/Temp->second.stts_Min, 3, true);
- if (Temp->second.stts_Duration)
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, ((float)Temp->second.stts_FrameCount)/Temp->second.stts_Duration*Temp->second.mdhd_TimeScale, 3, true);
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate_Mode, "VFR", Unlimited, true, true);
- }
- else
- {
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, ((float)Temp->second.mdhd_TimeScale)/Temp->second.stts_Max, 3, true);
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate_Mode, "CFR", Unlimited, true, true);
- }
- }
- }
-
- //Coherency
- if (!IsFragmented && Temp->second.stts_Duration!=Temp->second.mdhd_Duration && Temp->second.mdhd_TimeScale)
- {
- //There is a difference between media/mdhd atom and track atom
- Fill(StreamKind_Last, StreamPos_Last, "mdhd_Duration", ((float32)Temp->second.mdhd_Duration)/Temp->second.mdhd_TimeScale*1000, 0);
- }
-
- //When there are few frames, difficult to detect PCM
- if (Temp->second.IsPcm && !Temp->second.Parsers.empty() && !Temp->second.Parsers[0]->Status[IsAccepted])
- {
- for (size_t Pos=0; Pos<Temp->second.Parsers.size()-1; Pos++)
- delete Temp->second.Parsers[Pos];
- Temp->second.Parsers.erase(Temp->second.Parsers.begin(), Temp->second.Parsers.begin()+Temp->second.Parsers.size()-1);
- Temp->second.Parsers[0]->Accept();
- }
-
- //Parser specific
- if (Temp->second.Parsers.size()==1)
- {
- if (Config->ParseSpeed<=1.0)
- {
- Fill(Temp->second.Parsers[0]);
- Temp->second.Parsers[0]->Open_Buffer_Unsynch();
- }
-
- //Finalizing and Merging
- Finish(Temp->second.Parsers[0]);
- if (StreamKind_Last==Stream_General)
- {
- //Special case for TimeCode without link
- for (std::map<int32u, stream>::iterator Target=Streams.begin(); Target!=Streams.end(); ++Target)
- if (Target->second.StreamKind!=Stream_General)
- Merge(*Temp->second.Parsers[0], Target->second.StreamKind, 0, Target->second.StreamPos);
- }
- else
- {
- //Hacks - Before
- Ztring FrameRate_Temp, FrameRate_Mode_Temp, Duration_Temp, Delay_Temp;
- if (StreamKind_Last==Stream_Video)
- {
- if (Temp->second.Parsers[0] && Retrieve(Stream_Video, 0, Video_CodecID_Hint)==__T("DVCPRO HD"))
- {
- Temp->second.Parsers[0]->Clear(Stream_Video, 0, Video_FrameRate);
- Temp->second.Parsers[0]->Clear(Stream_Video, 0, Video_Width);
- Temp->second.Parsers[0]->Clear(Stream_Video, 0, Video_Height);
- Temp->second.Parsers[0]->Clear(Stream_Video, 0, Video_DisplayAspectRatio);
- Temp->second.Parsers[0]->Clear(Stream_Video, 0, Video_PixelAspectRatio);
- }
-
- FrameRate_Temp=Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate);
- FrameRate_Mode_Temp=Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate_Mode);
- Duration_Temp=Retrieve(Stream_Video, StreamPos_Last, Video_Duration);
- Delay_Temp=Retrieve(Stream_Video, StreamPos_Last, Video_Delay);
-
- //Special case: DV 1080i and MPEG-4 header is lying (saying this is 1920 pixel wide, but this is 1440 pixel wide)
- if (Temp->second.Parsers[0]->Get(Stream_Video, 0, Video_Format)==__T("DV") && Retrieve(Stream_Video, StreamKind_Last, Video_Width)==__T("1080"))
- Clear(Stream_Video, StreamKind_Last, Video_Width);
- }
-
- //Special case - Multiple sub-streams in a stream
- if ((Temp->second.Parsers[0]->Retrieve(Stream_General, 0, General_Format)==__T("ChannelGrouping") && Temp->second.Parsers[0]->Count_Get(Stream_Audio))
- || Temp->second.Parsers[0]->Retrieve(Stream_General, 0, General_Format)==__T("Final Cut EIA-608")
- || Temp->second.Parsers[0]->Retrieve(Stream_General, 0, General_Format)==__T("Final Cut CDP"))
- {
- //Before
- Clear(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_StreamSize));
- if (StreamKind_Last==Stream_Audio)
- {
- Clear(Stream_Audio, StreamPos_Last, Audio_Format_Settings_Sign);
- }
- ZtringList StreamSave;
- ZtringListList StreamMoreSave;
- if (StreamKind_Last!=Stream_Max)
- {
- StreamSave.Write((*File__Analyze::Stream)[StreamKind_Last][StreamPos_Last].Read());
- StreamMoreSave.Write((*Stream_More)[StreamKind_Last][StreamPos_Last].Read());
- }
-
- //Erasing former streams data
- stream_t NewKind=StreamKind_Last;
- size_t NewPos1;
- Ztring ID;
- if (Temp->second.Parsers[0]->Retrieve(Stream_General, 0, General_Format)==__T("ChannelGrouping"))
- {
- //Channel coupling, removing the 2 corresponding streams
- NewPos1=(StreamPos_Last/2)*2;
- size_t NewPos2=NewPos1+1;
- ID=Retrieve(StreamKind_Last, NewPos1, General_ID)+__T(" / ")+Retrieve(StreamKind_Last, NewPos2, General_ID);
-
- Stream_Erase(NewKind, NewPos2);
- Stream_Erase(NewKind, NewPos1);
-
- streams::iterator NextStream=Temp;
- ++NextStream;
- size_t NewAudio_Count=Temp->second.Parsers[0]->Count_Get(Stream_Audio);
- while (NextStream!=Streams.end())
- {
- if (NextStream->second.StreamKind==Stream_Audio)
- {
- NextStream->second.StreamPos-=2;
- NextStream->second.StreamPos+=NewAudio_Count;
- }
- ++NextStream;
- }
- }
- else
- {
- //One channel
- NewPos1=StreamPos_Last;
- ID=Retrieve(StreamKind_Last, NewPos1, General_ID);
- Stream_Erase(StreamKind_Last, StreamPos_Last);
- }
-
- //After
- size_t New_Count=Temp->second.Parsers[0]->Count_Get(NewKind);
- for (size_t StreamPos=0; StreamPos<New_Count; StreamPos++)
- {
- Stream_Prepare(NewKind, NewPos1+StreamPos);
- Merge(*Temp->second.Parsers[0], StreamKind_Last, StreamPos, StreamPos_Last);
- Ztring Parser_ID=Retrieve(StreamKind_Last, StreamPos_Last, General_ID);
- Fill(StreamKind_Last, StreamPos_Last, General_ID, ID+__T("-")+Parser_ID, true);
- for (size_t Pos=0; Pos<StreamSave.size(); Pos++)
- if (Retrieve(StreamKind_Last, StreamPos_Last, Pos).empty())
- Fill(StreamKind_Last, StreamPos_Last, Pos, StreamSave[Pos]);
- for (size_t Pos=0; Pos<StreamMoreSave.size(); Pos++)
- Fill(StreamKind_Last, StreamPos_Last, StreamMoreSave(Pos, 0).To_Local().c_str(), StreamMoreSave(Pos, 1));
- }
- Ztring LawRating=Temp->second.Parsers[0]->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=Temp->second.Parsers[0]->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
- }
- else
- {
- //Temp->second.Parsers[0]->Clear(StreamKind_Last, StreamPos_Last, "Delay"); //DV TimeCode is removed
- Temp->second.Parsers[0]->Clear(StreamKind_Last, StreamPos_Last, "FrameCount");
- Merge(*Temp->second.Parsers[0], StreamKind_Last, 0, StreamPos_Last);
-
- //Law rating
- Ztring LawRating=Temp->second.Parsers[0]->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=Temp->second.Parsers[0]->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
- }
-
- //Hacks - After
- if (StreamKind_Last==Stream_Video)
- {
- Fill(Stream_Video, StreamPos_Last, Video_Duration, Duration_Temp, true);
- if (!FrameRate_Temp.empty() && FrameRate_Temp!=Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate))
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, FrameRate_Temp, true);
- if (!FrameRate_Mode_Temp.empty() && FrameRate_Mode_Temp!=Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate_Mode))
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate_Mode, FrameRate_Mode_Temp, true);
-
- //Special case for TimeCode and DV multiple audio
- if (!Delay_Temp.empty() && Delay_Temp!=Retrieve(Stream_Video, StreamPos_Last, Video_Delay))
- {
- for (size_t Pos=0; Pos<Count_Get(Stream_Audio); Pos++)
- if (Retrieve(Stream_Audio, Pos, "MuxingMode_MoreInfo")==__T("Muxed in Video #1"))
- {
- //Fill(Stream_Audio, Pos, Audio_Delay_Original, Retrieve(Stream_Audio, Pos, Audio_Delay));
- Fill(Stream_Audio, Pos, Audio_Delay, Retrieve(Stream_Video, StreamPos_Last, Video_Delay), true);
- Fill(Stream_Audio, Pos, Audio_Delay_Settings, Retrieve(Stream_Video, StreamPos_Last, Video_Delay_Settings), true);
- Fill(Stream_Audio, Pos, Audio_Delay_Source, Retrieve(Stream_Video, StreamPos_Last, Video_Delay_Source), true);
- Fill(Stream_Audio, Pos, Audio_Delay_Original, Retrieve(Stream_Video, StreamPos_Last, Video_Delay_Original), true);
- Fill(Stream_Audio, Pos, Audio_Delay_Original_Settings, Retrieve(Stream_Video, StreamPos_Last, Video_Delay_Original_Settings), true);
- Fill(Stream_Audio, Pos, Audio_Delay_Original_Source, Retrieve(Stream_Video, StreamPos_Last, Video_Delay_Original_Source), true);
- }
- for (size_t Pos=0; Pos<Count_Get(Stream_Text); Pos++)
- if (Retrieve(Stream_Text, Pos, "MuxingMode_MoreInfo")==__T("Muxed in Video #1"))
- {
- //Fill(Stream_Text, Pos, Text_Delay_Original, Retrieve(Stream_Text, Pos, Text_Delay));
- Fill(Stream_Text, Pos, Text_Delay, Retrieve(Stream_Video, StreamPos_Last, Video_Delay), true);
- Fill(Stream_Text, Pos, Text_Delay_Settings, Retrieve(Stream_Video, StreamPos_Last, Video_Delay_Settings), true);
- Fill(Stream_Text, Pos, Text_Delay_Source, Retrieve(Stream_Video, StreamPos_Last, Video_Delay_Source), true);
- Fill(Stream_Text, Pos, Text_Delay_Original, Retrieve(Stream_Video, StreamPos_Last, Video_Delay_Original), true);
- Fill(Stream_Text, Pos, Text_Delay_Original_Settings, Retrieve(Stream_Video, StreamPos_Last, Video_Delay_Original_Settings), true);
- Fill(Stream_Text, Pos, Text_Delay_Original_Source, Retrieve(Stream_Video, StreamPos_Last, Video_Delay_Original_Source), true);
- }
- }
- }
-
- //Special case: AAC
- if (StreamKind_Last==Stream_Audio
- && (Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("AAC")
- || Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("MPEG Audio")
- || Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("Vorbis")))
- Clear(Stream_Audio, StreamPos_Last, Audio_BitDepth); //Resolution is not valid for AAC / MPEG Audio / Vorbis
-
- //Special case: DV with Audio or/and Text in the video stream
- if (StreamKind_Last==Stream_Video && Temp->second.Parsers[0] && (Temp->second.Parsers[0]->Count_Get(Stream_Audio) || Temp->second.Parsers[0]->Count_Get(Stream_Text)))
- {
- //Video and Audio are together
- size_t Audio_Count=Temp->second.Parsers[0]->Count_Get(Stream_Audio);
- for (size_t Audio_Pos=0; Audio_Pos<Audio_Count; Audio_Pos++)
- {
- Fill_Flush();
- Stream_Prepare(Stream_Audio);
- size_t Pos=Count_Get(Stream_Audio)-1;
- Merge(*Temp->second.Parsers[0], Stream_Audio, Audio_Pos, StreamPos_Last);
- Fill(Stream_Audio, Pos, Audio_MuxingMode, Temp->second.Parsers[0]->Retrieve(Stream_General, 0, General_Format));
- Fill(Stream_Audio, Pos, Audio_MuxingMode_MoreInfo, __T("Muxed in Video #")+Ztring().From_Number(Temp->second.StreamPos+1));
- Fill(Stream_Audio, Pos, Audio_Duration, Retrieve(Stream_Video, Temp->second.StreamPos, Video_Duration));
- Fill(Stream_Audio, Pos, Audio_StreamSize_Encoded, 0); //Included in the DV stream size
- Ztring ID=Retrieve(Stream_Audio, Pos, Audio_ID);
- Fill(Stream_Audio, Pos, Audio_ID, Retrieve(Stream_Video, Temp->second.StreamPos, Video_ID)+__T("-")+ID, true);
- Fill(Stream_Audio, Pos, "Source", Retrieve(Stream_Video, Temp->second.StreamPos, "Source"));
- Fill(Stream_Audio, Pos, "Source_Info", Retrieve(Stream_Video, Temp->second.StreamPos, "Source_Info"));
- }
-
- //Video and Text are together
- size_t Text_Count=Temp->second.Parsers[0]->Count_Get(Stream_Text);
- for (size_t Text_Pos=0; Text_Pos<Text_Count; Text_Pos++)
- {
- Fill_Flush();
- Stream_Prepare(Stream_Text);
- size_t Pos=Count_Get(Stream_Text)-1;
- Merge(*Temp->second.Parsers[0], Stream_Text, Text_Pos, StreamPos_Last);
- Fill(Stream_Text, Pos, Text_MuxingMode, Temp->second.Parsers[0]->Retrieve(Stream_General, 0, General_Format));
- Fill(Stream_Text, Pos, Text_MuxingMode_MoreInfo, __T("Muxed in Video #")+Ztring().From_Number(Temp->second.StreamPos+1));
- Fill(Stream_Text, Pos, Text_Duration, Retrieve(Stream_Video, Temp->second.StreamPos, Video_Duration));
- Fill(Stream_Text, Pos, Text_StreamSize_Encoded, 0); //Included in the DV stream size
- Ztring ID=Retrieve(Stream_Text, Pos, Text_ID);
- Fill(Stream_Text, Pos, Text_ID, Retrieve(Stream_Video, Temp->second.StreamPos, Video_ID)+__T("-")+ID, true);
- Fill(Stream_Text, Pos, "Source", Retrieve(Stream_Video, Temp->second.StreamPos, "Source"));
- Fill(Stream_Text, Pos, "Source_Info", Retrieve(Stream_Video, Temp->second.StreamPos, "Source_Info"));
- }
-
- StreamKind_Last=Temp->second.StreamKind;
- StreamPos_Last=Temp->second.StreamPos;
- }
- }
- }
-
- //ScanOrder_StoredDisplayedInverted
- // Priorizing https://developer.apple.com/library/mac/technotes/tn2162/_index.html#//apple_ref/doc/uid/DTS40013070-CH1-TNTAG10-THE__FIEL__IMAGEDESCRIPTION_EXTENSION__FIELD_FRAME_INFORMATION
- /*
- switch (Temp->second.fiel_detail)
- {
- case 1 : // Separated fields, TFF
- case 6 : // Separated fields, BFF
- Fill(Stream_Video, StreamPos_Last, Video_ScanOrder, "TFF", Unlimited, true, true);
- break;
- case 9 : // Interleaved fields, TFF
- case 14 : // Interleaved fields, BFF
- Fill(Stream_Video, StreamPos_Last, Video_ScanOrder, "BFF", Unlimited, true, true);
- break;
- default : ;
- }
- */
-
- //External file name specific
- if (Temp->second.MI && Temp->second.MI->Info)
- {
- //Preparing
- StreamKind_Last=Temp->second.StreamKind;
- StreamPos_Last=Temp->second.StreamPos;
-
- //Hacks - Before
- Ztring CodecID=Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_CodecID));
- Ztring Source=Retrieve(StreamKind_Last, StreamPos_Last, "Source");
- Ztring Source_Info=Retrieve(StreamKind_Last, StreamPos_Last, "Source_Info");
-
- Merge(*Temp->second.MI->Info, Temp->second.StreamKind, 0, Temp->second.StreamPos);
- File_Size_Total+=Ztring(Temp->second.MI->Get(Stream_General, 0, General_FileSize)).To_int64u();
-
- //Hacks - After
- if (CodecID!=Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_CodecID)))
- {
- if (!CodecID.empty())
- CodecID+=__T(" / ");
- CodecID+=Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_CodecID));
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_CodecID), CodecID, true);
- }
- if (Source!=Retrieve(StreamKind_Last, StreamPos_Last, "Source"))
- {
- Ztring Source_Original=Retrieve(StreamKind_Last, StreamPos_Last, "Source");
- Ztring Source_Original_Info=Retrieve(StreamKind_Last, StreamPos_Last, "Source_Info");
- Fill(StreamKind_Last, StreamPos_Last, "Source", Source, true);
- Fill(StreamKind_Last, StreamPos_Last, "Source_Info", Source_Info, true);
- Fill(StreamKind_Last, StreamPos_Last, "Source_Original", Source_Original, true);
- Fill(StreamKind_Last, StreamPos_Last, "Source_Original_Info", Source_Original_Info, true);
- }
- if (StreamKind_Last==Stream_Audio
- && Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)!=__T("PCM")
- && !Retrieve(Stream_Audio, StreamPos_Last, Audio_Channel_s__Original).empty())
- {
- Clear(Stream_Audio, StreamPos_Last, Audio_Channel_s__Original);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, 6, 10, true); //The PCM channel count is fake
- }
-
- //Muxing Mode
- Fill(StreamKind_Last, StreamPos_Last, "MuxingMode", Temp->second.MI->Get(Stream_General, 0, General_Format));
-
- //Special case: DV with Audio or/and Text in the video stream
- if (StreamKind_Last==Stream_Video && Temp->second.MI->Info && (Temp->second.MI->Info->Count_Get(Stream_Audio) || Temp->second.MI->Info->Count_Get(Stream_Text)))
- {
- //Video and Audio are together
- size_t Audio_Count=Temp->second.MI->Info->Count_Get(Stream_Audio);
- for (size_t Audio_Pos=0; Audio_Pos<Audio_Count; Audio_Pos++)
- {
- Fill_Flush();
- Stream_Prepare(Stream_Audio);
- size_t Pos=Count_Get(Stream_Audio)-1;
- Merge(*Temp->second.MI->Info, Stream_Audio, Audio_Pos, StreamPos_Last);
- if (Retrieve(Stream_Audio, Pos, Audio_MuxingMode).empty())
- Fill(Stream_Audio, Pos, Audio_MuxingMode, Retrieve(Stream_Video, Temp->second.StreamPos, Video_Format), true);
- else
- Fill(Stream_Audio, Pos, Audio_MuxingMode, Retrieve(Stream_Video, Temp->second.StreamPos, Video_Format)+__T(" / ")+Retrieve(Stream_Audio, Pos, Audio_MuxingMode), true);
- Fill(Stream_Audio, Pos, Audio_MuxingMode_MoreInfo, __T("Muxed in Video #")+Ztring().From_Number(Temp->second.StreamPos+1));
- Fill(Stream_Audio, Pos, Audio_Duration, Retrieve(Stream_Video, Temp->second.StreamPos, Video_Duration), true);
- Fill(Stream_Audio, Pos, Audio_StreamSize_Encoded, 0); //Included in the DV stream size
- Ztring ID=Retrieve(Stream_Audio, Pos, Audio_ID);
- Fill(Stream_Audio, Pos, Audio_ID, Retrieve(Stream_Video, Temp->second.StreamPos, Video_ID)+__T("-")+ID, true);
- Fill(Stream_Audio, Pos, "Source", Retrieve(Stream_Video, Temp->second.StreamPos, "Source"));
- Fill(Stream_Audio, Pos, "Source_Info", Retrieve(Stream_Video, Temp->second.StreamPos, "Source_Info"));
- }
-
- //Video and Text are together
- size_t Text_Count=Temp->second.MI->Info->Count_Get(Stream_Text);
- for (size_t Text_Pos=0; Text_Pos<Text_Count; Text_Pos++)
- {
- Fill_Flush();
- Stream_Prepare(Stream_Text);
- size_t Pos=Count_Get(Stream_Text)-1;
- Merge(*Temp->second.MI->Info, Stream_Text, Text_Pos, StreamPos_Last);
- if (Retrieve(Stream_Text, Pos, Text_MuxingMode).empty())
- Fill(Stream_Text, Pos, Text_MuxingMode, Retrieve(Stream_Video, Temp->second.StreamPos, Video_Format), true);
- else
- Fill(Stream_Text, Pos, Text_MuxingMode, Retrieve(Stream_Video, Temp->second.StreamPos, Video_Format)+__T(" / ")+Retrieve(Stream_Text, Pos, Text_MuxingMode), true);
- Fill(Stream_Text, Pos, Text_MuxingMode_MoreInfo, __T("Muxed in Video #")+Ztring().From_Number(Temp->second.StreamPos+1));
- Fill(Stream_Text, Pos, Text_Duration, Retrieve(Stream_Video, Temp->second.StreamPos, Video_Duration));
- Fill(Stream_Text, Pos, Text_StreamSize_Encoded, 0); //Included in the DV stream size
- Ztring ID=Retrieve(Stream_Text, Pos, Text_ID);
- Fill(Stream_Text, Pos, Text_ID, Retrieve(Stream_Video, Temp->second.StreamPos, Video_ID)+__T("-")+ID, true);
- Fill(Stream_Text, Pos, "Source", Retrieve(Stream_Video, Temp->second.StreamPos, "Source"));
- Fill(Stream_Text, Pos, "Source_Info", Retrieve(Stream_Video, Temp->second.StreamPos, "Source_Info"));
- }
- }
- }
-
- //Aperture size
- if (Temp->second.CleanAperture_Width)
- {
- Fill(Stream_Video, StreamPos_Last, "Width_CleanAperture", Temp->second.CleanAperture_Width, 0, true);
- Fill(Stream_Video, StreamPos_Last, "Height_CleanAperture", Temp->second.CleanAperture_Height, 0, true);
- Fill(Stream_Video, StreamPos_Last, "PixelAspectRatio_CleanAperture", Temp->second.CleanAperture_PixelAspectRatio, 3, true);
- }
-
- //Special case: QuickTime files and Stereo streams, there is a default value in QuickTime player, a QuickTime "standard"?
- if (StreamKind_Last==Stream_Audio
- && Retrieve(Stream_Audio, StreamPos_Last, Audio_Channel_s_)==__T("2")
- && Retrieve(Stream_Audio, StreamPos_Last, Audio_ChannelLayout).empty()
- && Retrieve(Stream_Audio, StreamPos_Last, Audio_ChannelPositions).empty()
- && Retrieve(Stream_General, 0, General_Format_Profile)==__T("QuickTime"))
- {
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelPositions, Mpeg4_chan(101));
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelLayout, Mpeg4_chan_Layout(101));
- }
-
- //Bitrate Mode
- if (Retrieve(StreamKind_Last, StreamPos_Last, "BitRate_Mode").empty())
- {
- if (Temp->second.stss.empty() && Temp->second.stss.size()!=Temp->second.stsz_Total.size() && !IsFragmented)
- {
- int64u Size_Min=(int64u)-1, Size_Max=0;
- for (size_t Pos=0; Pos<Temp->second.stsz_Total.size(); Pos++)
- {
- if (Temp->second.stsz_Total[Pos]<Size_Min)
- Size_Min=Temp->second.stsz_Total[Pos];
- if (Temp->second.stsz_Total[Pos]>Size_Max)
- Size_Max=Temp->second.stsz_Total[Pos];
- }
-
- if (Size_Min*(1.005+0.005)<Size_Max)
- Fill(StreamKind_Last, StreamPos_Last, "BitRate_Mode", "VBR");
- else
- Fill(StreamKind_Last, StreamPos_Last, "BitRate_Mode", "CBR");
- }
- else
- {
- //TODO: compute Bit rate mode from stsz and stss (in order to compute per GOP instead of per frame)
- }
- }
-
- for (std::map<string, Ztring>::iterator Info=Temp->second.Infos.begin(); Info!=Temp->second.Infos.end(); ++Info)
- Fill(StreamKind_Last, StreamPos_Last, Info->first.c_str(), Info->second);
-
- ++Temp;
- }
- if (Vendor!=0x00000000 && Vendor!=0xFFFFFFFF)
- {
- Ztring VendorS=Mpeg4_Encoded_Library(Vendor);
- if (!Vendor_Version.empty())
- {
- VendorS+=__T(' ');
- VendorS+=Vendor_Version;
- }
- Fill(Stream_General, 0, General_Encoded_Library, VendorS);
- Fill(Stream_General, 0, General_Encoded_Library_Name, Mpeg4_Encoded_Library(Vendor));
- Fill(Stream_General, 0, General_Encoded_Library_Version, Vendor_Version);
- }
-
- if (File_Size_Total!=File_Size)
- Fill(Stream_General, 0, General_FileSize, File_Size_Total, 10, true);
- if (Count_Get(Stream_Video)==0 && Count_Get(Stream_Image)==0 && Count_Get(Stream_Audio)>0)
- Fill(Stream_General, 0, General_InternetMediaType, "audio/mp4", Unlimited, true, true);
-
- //Parsing sequence files
- #ifdef MEDIAINFO_REFERENCES_YES
- for (streams::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- if (!Stream->second.File_Name.empty())
- {
- if (ReferenceFiles==NULL)
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
-
- sequence* Sequence=new sequence;
- Sequence->AddFileName(Stream->second.File_Name);
- Sequence->StreamKind=Stream->second.StreamKind;
- Sequence->StreamPos=Stream->second.StreamPos;
- Sequence->StreamID=Retrieve(Stream->second.StreamKind, Stream->second.StreamPos, General_ID).To_int64u();
- if (Stream->second.StreamKind==Stream_Video)
- {
- Sequence->FrameRate_Set(Retrieve(Stream_Video, Stream->second.StreamPos, Video_FrameRate).To_float64());
-
- #if MEDIAINFO_IBIUSAGE
- for (size_t stss_Pos=0; stss_Pos<Stream->second.stss.size(); stss_Pos++)
- {
- int64u Value=Stream->second.stss[stss_Pos];
-
- //Searching the corresponding stco
- std::vector<stream::stsc_struct>::iterator Stsc=Stream->second.stsc.begin();
- int64u SamplePos=0;
- for (; Stsc!=Stream->second.stsc.end(); ++Stsc)
- {
- std::vector<stream::stsc_struct>::iterator Stsc_Next=Stsc; ++Stsc_Next;
- int64u CountOfSamples = ((Stsc_Next == Stream->second.stsc.end() ? ((int64u)Stream->second.stco.size()) : ((int64u)Stsc_Next->FirstChunk)) - (int64u)Stsc->FirstChunk) * (int64u)Stsc->SamplesPerChunk;
- if (Stsc_Next!=Stream->second.stsc.end() && Value>=SamplePos+CountOfSamples)
- SamplePos+=CountOfSamples;
- else
- {
- int64u CountOfChunks=(Value-SamplePos)/Stsc->SamplesPerChunk;
- size_t stco_Pos=(size_t)(Stsc->FirstChunk-1+CountOfChunks); //-1 because first chunk is number 1
- if (stco_Pos<Stream->second.stco.size())
- {
- stream::stts_durations::iterator stts_Duration=Stream->second.stts_Durations.begin()+Stream->second.stts_Durations_Pos;
- ibi::stream::info IbiInfo;
- IbiInfo.StreamOffset=Stream->second.stco[stco_Pos];
- IbiInfo.FrameNumber=Value;
- IbiInfo.Dts=TimeCode_DtsOffset+(stts_Duration->DTS_Begin+(((int64u)stts_Duration->SampleDuration)*(Value-stts_Duration->Pos_Begin)))*1000000000/Stream->second.mdhd_TimeScale;
- Sequence->IbiStream.Add(IbiInfo);
- }
- }
- }
- }
- #endif //MEDIAINFO_IBIUSAGE
-
- }
- ReferenceFiles->AddSequence(Sequence);
- }
-
- if (ReferenceFiles)
- {
- ReferenceFiles->ParseReferences();
- #if MEDIAINFO_NEXTPACKET
- if (Config->NextPacket_Get() && ReferenceFiles && ReferenceFiles->Sequences_Size())
- {
- ReferenceFiles_IsParsing=true;
- return;
- }
- #endif //MEDIAINFO_NEXTPACKET
- }
- #endif //MEDIAINFO_REFERENCES_YES
-
- //Commercial names
- Streams_Finish_CommercialNames();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::Streams_Finish_CommercialNames()
-{
- if (Count_Get(Stream_Video)==1)
- {
- Streams_Finish_StreamOnly();
- if (Retrieve(Stream_Video, 0, Video_Format)==__T("DV") && Retrieve(Stream_Video, 0, Video_Format_Commercial)==__T("DVCPRO HD"))
- {
- int32u BitRate=Retrieve(Stream_Video, 0, Video_BitRate).To_int32u();
- int32u BitRate_Max=Retrieve(Stream_Video, 0, Video_BitRate_Maximum).To_int32u();
-
- if (BitRate_Max && BitRate>=BitRate_Max)
- {
- Clear(Stream_Video, 0, Video_BitRate_Maximum);
- Fill(Stream_Video, 0, Video_BitRate, BitRate_Max, 10, true);
- Fill(Stream_Video, 0, Video_BitRate_Mode, "CBR", Unlimited, true, true);
- }
- }
- if (!Retrieve(Stream_Video, 0, Video_Format_Commercial_IfAny).empty())
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, Retrieve(Stream_Video, 0, Video_Format_Commercial_IfAny));
- Fill(Stream_General, 0, General_Format_Commercial, Retrieve(Stream_General, 0, General_Format)+__T(' ')+Retrieve(Stream_Video, 0, Video_Format_Commercial_IfAny));
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)!=__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:0") && (Retrieve(Stream_Video, 0, Video_BitRate)==__T("18000000") || Retrieve(Stream_Video, 0, Video_BitRate_Nominal)==__T("18000000") || Retrieve(Stream_Video, 0, Video_BitRate_Maximum)==__T("18000000")))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "XDCAM EX 18");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "XDCAM EX 18");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)!=__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:0") && (Retrieve(Stream_Video, 0, Video_BitRate)==__T("25000000") || Retrieve(Stream_Video, 0, Video_BitRate_Nominal)==__T("25000000") || Retrieve(Stream_Video, 0, Video_BitRate_Maximum)==__T("25000000")))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "XDCAM EX 25");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "XDCAM EX 25");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)!=__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:0") && (Retrieve(Stream_Video, 0, Video_BitRate)==__T("35000000") || Retrieve(Stream_Video, 0, Video_BitRate_Nominal)==__T("35000000") || Retrieve(Stream_Video, 0, Video_BitRate_Maximum)==__T("35000000")))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "XDCAM EX 35");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "XDCAM EX 35");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)!=__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:2") && (Retrieve(Stream_Video, 0, Video_BitRate)==__T("50000000") || Retrieve(Stream_Video, 0, Video_BitRate_Nominal)==__T("50000000") || Retrieve(Stream_Video, 0, Video_BitRate_Maximum)==__T("50000000")))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "XDCAM HD422");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "XDCAM HD422");
- }
- }
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::Read_Buffer_Unsynched()
-{
- if (!IsSub && MajorBrand==0x6A703220) //"jp2 "
- return Read_Buffer_Unsynched_OneFramePerFile();
-
- if (mdat_Pos.empty())
- {
- IsParsing_mdat=false;
- return;
- }
- mdat_Pos_Temp=&mdat_Pos[0];
- while (mdat_Pos_Temp!=mdat_Pos_Max && mdat_Pos_Temp->Offset<File_GoTo)
- mdat_Pos_Temp++;
- if (mdat_Pos_Temp!=mdat_Pos_Max && mdat_Pos_Temp->Offset>File_GoTo)
- mdat_Pos_Temp--; //Previous frame
- if (mdat_Pos_Temp==mdat_Pos_Max)
- {
- IsParsing_mdat=false;
- return;
- }
- IsParsing_mdat=true;
-
- #if MEDIAINFO_SEEK
- //Searching the ID of the first stream to be demuxed
- std::map<int32u, stream>::iterator Next_Stream=Streams.end();
- #if MEDIAINFO_DEMUX
- size_t Next_Stream_Stco=(size_t)-1;
- #endif //MEDIAINFO_DEMUX
- for (std::map<int32u, stream>::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- {
- for (size_t Stco_Pos=0; Stco_Pos<Stream->second.stco.size(); Stco_Pos++)
- if (Stream->second.stco[Stco_Pos]==mdat_Pos_Temp->Offset)
- {
- Next_Stream=Stream;
- #if MEDIAINFO_DEMUX
- Next_Stream_Stco=Stco_Pos;
- #endif //MEDIAINFO_DEMUX
- break;
- }
- if (Next_Stream!=Streams.end())
- break;
- }
- #endif //MEDIAINFO_SEEK
-
- for (std::map<int32u, stream>::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- {
- for (size_t Pos=0; Pos<Stream->second.Parsers.size(); Pos++)
- Stream->second.Parsers[Pos]->Open_Buffer_Unsynch();
-
- #if MEDIAINFO_SEEK && MEDIAINFO_DEMUX
- //Searching the next position for this stream
- int64u StreamOffset=(int64u)-1;
- if (StreamOffset_Jump.empty() || File_GoTo==mdat_Pos[0].Offset)
- StreamOffset=mdat_Pos_Temp->Offset;
- else if (Next_Stream_Stco!=(size_t)-1)
- {
- //Searching the right place for this stream
- int64u StreamOffset_Temp=Next_Stream->second.stco[Next_Stream_Stco];
- std::map<int64u, int64u>::iterator StreamOffset_Jump_Temp;
- for (;;)
- {
- StreamOffset_Jump_Temp=StreamOffset_Jump.find(StreamOffset_Temp);
- if (StreamOffset_Jump_Temp==StreamOffset_Jump.end())
- break;
- if (Stream==Next_Stream)
- StreamOffset_Temp=StreamOffset_Jump_Temp->first;
- else
- {
- ++StreamOffset_Jump_Temp;
- if (StreamOffset_Jump_Temp==StreamOffset_Jump.end())
- break;
- StreamOffset_Temp=StreamOffset_Jump_Temp->second;
- }
-
- if (!Stream->second.stco.empty() && StreamOffset_Temp>=Stream->second.stco[0] && StreamOffset_Temp<=Stream->second.stco[Stream->second.stco.size()-1])
- for (size_t Stco_Pos=0; Stco_Pos<Stream->second.stco.size(); Stco_Pos++)
- if (StreamOffset_Temp==Stream->second.stco[Stco_Pos])
- {
- StreamOffset=Stream->second.stco[Stco_Pos];
- break;
- }
-
- if (StreamOffset!=(int64u)-1)
- break;
- }
- }
-
- if (StreamOffset!=(int64u)-1)
- for (size_t stco_Pos=0; stco_Pos<Stream->second.stco.size(); stco_Pos++)
- if (Stream->second.stco[stco_Pos]>=StreamOffset)
- {
- //Searching the corresponding frame position
- std::vector<stream::stsc_struct>::iterator Stsc=Stream->second.stsc.begin();
- int64u SamplePos=0;
- for (; Stsc!=Stream->second.stsc.end(); ++Stsc)
- {
- std::vector<stream::stsc_struct>::iterator Stsc_Next=Stsc; ++Stsc_Next;
- if (Stsc_Next!=Stream->second.stsc.end() && stco_Pos+1>=Stsc_Next->FirstChunk)
- {
- int64u CountOfSamples = ((int64u)Stsc_Next->FirstChunk - (int64u)Stsc->FirstChunk) * (int64u)Stsc->SamplesPerChunk;
- SamplePos+=CountOfSamples;
- }
- else
- {
- int64u CountOfSamples = ((int64u)stco_Pos + 1 - (int64u)Stsc->FirstChunk) * (int64u)Stsc->SamplesPerChunk;
- SamplePos+=CountOfSamples;
-
- Stream->second.stts_FramePos=SamplePos;
-
- //Searching the corresponding duration block position
- for (stream::stts_durations::iterator Stts_Duration=Stream->second.stts_Durations.begin(); Stts_Duration!=Stream->second.stts_Durations.end(); ++Stts_Duration)
- if (SamplePos>=Stts_Duration->Pos_Begin && SamplePos<Stts_Duration->Pos_End)
- {
- Stream->second.stts_Durations_Pos=Stts_Duration-Stream->second.stts_Durations.begin();
- break;
- }
-
- break;
- }
- }
-
- break;
- }
- #endif //MEDIAINFO_SEEK && MEDIAINFO_DEMUX
- }
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_Mpeg4::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- #if defined(MEDIAINFO_REFERENCES_YES)
- if (ReferenceFiles)
- return ReferenceFiles->Seek(Method, Value, ID);
- #endif //defined(MEDIAINFO_REFERENCES_YES)
- if (!IsSub && MajorBrand==0x6A703220) //"jp2 "
- return Read_Buffer_Seek_OneFramePerFile(Method, Value, ID);
-
- //Parsing
- switch (Method)
- {
- case 0 :
- if (Value==0)
- return Read_Buffer_Seek(3, 0, ID);
-
- if (FirstMoovPos==(int64u)-1)
- return 6; //Internal error
-
- if (Value>=LastMdatPos)
- {
- GoTo(File_Size);
- Open_Buffer_Unsynch();
- return 1;
- }
-
- {
- //Looking for the minimal stream offset, for every video/audio/text stream
- int64u JumpTo=File_Size;
- for (std::map<int32u, stream>::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- switch (Stream->second.StreamKind)
- {
- case Stream_Video :
- case Stream_Audio :
- case Stream_Text :
- {
- //Searching the corresponding chunk offset
- std::vector<int64u>::iterator Stco=Stream->second.stco.begin();
- if (Value<*Stco)
- return Read_Buffer_Seek(3, 0, ID);
-
- for (; Stco!=Stream->second.stco.end(); ++Stco)
- {
- std::vector<int64u>::iterator Stco_Next=Stco; ++Stco_Next;
- if (Stco_Next!=Stream->second.stco.end() && Value>=*Stco && Value<*Stco_Next)
- {
- if (JumpTo>*Stco)
- JumpTo=*Stco;
- break;
- }
- }
- }
- break;
- default : ;
- }
-
- GoTo(JumpTo);
- Open_Buffer_Unsynch();
- return 1;
- }
- case 1 :
- if (Value==0)
- return Read_Buffer_Seek(3, 0, ID);
-
- if (FirstMoovPos==(int64u)-1)
- return 6; //Internal error
-
- return Read_Buffer_Seek(0, FirstMdatPos+(LastMdatPos-FirstMdatPos)*Value/10000, ID);
- case 2 : //Timestamp
- #if MEDIAINFO_DEMUX
- {
- //Searching time stamp offset due to Time code offset
- for (std::map<int32u, stream>::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- if (Stream->second.StreamKind==Stream_Video)
- {
- if (Value>TimeCode_DtsOffset) //Removing Time Code offset
- Value-=TimeCode_DtsOffset;
- else
- Value=0; //Sooner
- break;
- }
-
- //Looking for the minimal stream offset, for every video/audio/text stream
- int64u JumpTo=File_Size;
- for (std::map<int32u, stream>::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- switch (Stream->second.StreamKind)
- {
- case Stream_Video :
- case Stream_Audio :
- case Stream_Text :
- {
- int64u Value2=float64_int64s(((float64)Value)*Stream->second.mdhd_TimeScale/1000000000); //Transformed in mpeg4 ticks (per track)
-
- //Searching the corresponding frame
- for (stream::stts_durations::iterator stts_Duration=Stream->second.stts_Durations.begin(); stts_Duration!=Stream->second.stts_Durations.end(); ++stts_Duration)
- {
- if (Value2>=stts_Duration->DTS_Begin && Value2<stts_Duration->DTS_End)
- {
- int64u FrameNumber=stts_Duration->Pos_Begin+(Value2-stts_Duration->DTS_Begin)/stts_Duration->SampleDuration;
-
- //Searching the I-Frame
- if (!Stream->second.stss.empty())
- {
- for (size_t Pos=0; Pos<Stream->second.stss.size(); Pos++)
- if (FrameNumber<=Stream->second.stss[Pos])
- {
- if (Pos && FrameNumber<Stream->second.stss[Pos])
- FrameNumber=Stream->second.stss[Pos-1];
- break;
- }
- }
-
- //Searching the corresponding stco
- std::vector<stream::stsc_struct>::iterator Stsc=Stream->second.stsc.begin();
- int64u SamplePos=0;
- for (; Stsc!=Stream->second.stsc.end(); ++Stsc)
- {
- std::vector<stream::stsc_struct>::iterator Stsc_Next=Stsc; ++Stsc_Next;
- int64u CountOfSamples = ((Stsc_Next == Stream->second.stsc.end() ? (int64u)Stream->second.stco.size() : (int64u)Stsc_Next->FirstChunk) - (int64u)Stsc->FirstChunk) * (int64u)Stsc->SamplesPerChunk;
- if (Stsc_Next!=Stream->second.stsc.end() && FrameNumber>=SamplePos+CountOfSamples)
- SamplePos+=CountOfSamples;
- else
- {
- int64u CountOfChunks=(FrameNumber-SamplePos)/Stsc->SamplesPerChunk;
- size_t stco_Pos=(size_t)(Stsc->FirstChunk-1+CountOfChunks); //-1 because first chunk is number 1
- if (stco_Pos>Stream->second.stco.size())
- return 2; //Invalid FrameNumber
- if (JumpTo>Stream->second.stco[stco_Pos])
- JumpTo=Stream->second.stco[stco_Pos];
- break;
- }
- }
-
- }
- }
-
- }
- break;
- default : ;
- }
-
- if (!StreamOffset_Jump.empty())
- {
- std::map<int64u, int64u>::iterator StreamOffset_Current=StreamOffset_Jump.end();
- do
- --StreamOffset_Current;
- while (StreamOffset_Current->second>JumpTo && StreamOffset_Current!=StreamOffset_Jump.begin());
- JumpTo=StreamOffset_Current->second;
- }
-
- GoTo(JumpTo);
- Open_Buffer_Unsynch();
- return 1;
- }
- #else //MEDIAINFO_DEMUX
- return (size_t)-1; //Not supported
- #endif //MEDIAINFO_DEMUX
- case 3 :
- //FrameNumber
- #if MEDIAINFO_DEMUX
- {
- //Looking for video stream
- std::map<int32u, stream>::iterator Stream;
- for (Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- if (Stream->second.StreamKind==Stream_Video)
- break;
- if (Stream==Streams.end())
- for (Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- if (Stream->second.StreamKind==Stream_Audio)
- break;
- if (Stream==Streams.end())
- for (Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- if (Stream->second.StreamKind==Stream_Text)
- break;
- if (Stream==Streams.end())
- return 0; //Not supported
-
- //Searching the I-Frame
- if (!Stream->second.stss.empty())
- {
- for (size_t Pos=0; Pos<Stream->second.stss.size(); Pos++)
- if (Value<=Stream->second.stss[Pos])
- {
- if (Pos && Value<Stream->second.stss[Pos])
- Value=Stream->second.stss[Pos-1];
- break;
- }
- }
-
- //Searching the corresponding stco
- std::vector<stream::stsc_struct>::iterator Stsc=Stream->second.stsc.begin();
- int64u SamplePos=0;
- for (; Stsc!=Stream->second.stsc.end(); ++Stsc)
- {
- std::vector<stream::stsc_struct>::iterator Stsc_Next=Stsc; ++Stsc_Next;
- int64u CountOfSamples = ((Stsc_Next == Stream->second.stsc.end() ? ((int64u)Stream->second.stco.size()) : ((int64u)Stsc_Next->FirstChunk)) - (int64u)Stsc->FirstChunk) * (int64u)Stsc->SamplesPerChunk;
- if (Stsc_Next!=Stream->second.stsc.end() && Value>=SamplePos+CountOfSamples)
- SamplePos+=CountOfSamples;
- else
- {
- int64u CountOfChunks=(Value-SamplePos)/Stsc->SamplesPerChunk;
- size_t stco_Pos=(size_t)(Stsc->FirstChunk-1+CountOfChunks); //-1 because first chunk is number 1
- if (stco_Pos>Stream->second.stco.size())
- return 2; //Invalid value
- int64u Offset=Stream->second.stco[stco_Pos];
-
- //Seeking back to audio/text frames before this video frame
- if (!StreamOffset_Jump.empty())
- {
- if (stco_Pos==0) //The first Stco is considered as the last byte of previous stram
- {
- if (!mdat_Pos.empty())
- Offset=mdat_Pos[0].Offset;
- }
- else
- {
- std::map<int64u, int64u>::iterator StreamOffset_Jump_Temp=StreamOffset_Jump.find(Stream->second.stco[stco_Pos]);
- if (StreamOffset_Jump_Temp!=StreamOffset_Jump.end())
- Offset=StreamOffset_Jump_Temp->second;
- }
- }
- else
- {
- //TODO
- }
-
- GoTo(Offset);
- Open_Buffer_Unsynch();
- return 1;
- }
- }
-
- return 2; //Invalid value
- }
- #else //MEDIAINFO_DEMUX
- return (size_t)-1; //Not supported
- #endif //MEDIAINFO_DEMUX
- default : return 0;
- }
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::Read_Buffer_Init()
-{
- if (MediaInfoLib::Config.ParseSpeed_Get()==1.00)
- FrameCount_MaxPerStream=(int32u)-1;
- else if (MediaInfoLib::Config.ParseSpeed_Get()<=0.3)
- FrameCount_MaxPerStream=128;
- else
- FrameCount_MaxPerStream=512;
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Mpeg4::Header_Begin()
-{
- #if MEDIAINFO_DEMUX
- //Handling of multiple frames in one block
- if (IsParsing_mdat && Config->Demux_Unpacketize_Get())
- {
- stream &Stream_Temp=Streams[(int32u)Element_Code];
- if (Stream_Temp.Demux_EventWasSent)
- {
- Open_Buffer_Continue(Stream_Temp.Parsers[0], Buffer+Buffer_Offset, 0);
- if (Config->Demux_EventWasSent)
- return false;
- Stream_Temp.Demux_EventWasSent=false;
- }
- }
- #endif //MEDIAINFO_DEMUX
-
- if (IsParsing_mdat && Element_Level==0)
- Element_Begin0();
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::Header_Parse()
-{
- //mdat
- if (IsParsing_mdat)
- {
- //Positionning
- if (mdat_Pos_Temp==mdat_Pos_Max || File_Offset+Buffer_Offset<mdat_Pos_Temp->Offset)
- {
- Header_Fill_Code(0, "(Junk)");
- int64u Size=mdat_Pos_Temp==mdat_Pos_Max?Element_TotalSize_Get():(mdat_Pos_Temp->Offset-(File_Offset+Buffer_Offset));
- if (Size>1 && Size>=Buffer_MaximumSize/2)
- Size=Buffer_MaximumSize;
- if (Size==Element_TotalSize_Get())
- IsParsing_mdat=false;
- Header_Fill_Size(Size);
- return;
- }
-
- //Filling
- Header_Fill_Code2(mdat_Pos_Temp->StreamID, Ztring::ToZtring(mdat_Pos_Temp->StreamID));
- Header_Fill_Size(mdat_Pos_Temp->Size);
- if (Buffer_Offset+mdat_Pos_Temp->Size<=Buffer_Size) //Only if we will not need it later (in case of partial data, this function will be called again for the same chunk)
- {
- mdat_Pos_Temp++;
- while (mdat_Pos_Temp!=mdat_Pos_Max)
- {
- if (mdat_Pos_NormalParsing && !Streams[mdat_Pos_Temp->StreamID].IsPriorityStream)
- break;
- if (!mdat_Pos_NormalParsing && Streams[mdat_Pos_Temp->StreamID].IsPriorityStream)
- break;
- mdat_Pos_Temp++;
- }
- }
- else
- Element_WaitForMoreData();
-
- //Hints
- if (File_Buffer_Size_Hint_Pointer && mdat_Pos_Temp!=mdat_Pos_Max && mdat_Pos_Temp->Offset+mdat_Pos_Temp->Size>File_Offset+Buffer_Size && mdat_Pos_Temp->Offset<File_Offset+Buffer_Size+128*1024)
- {
- size_t Buffer_Size_Target=(size_t)(mdat_Pos_Temp->Offset+mdat_Pos_Temp->Size-(File_Offset+Buffer_Size));
- if (Buffer_Size_Target<128*1024)
- Buffer_Size_Target=128*1024;
- (*File_Buffer_Size_Hint_Pointer)=Buffer_Size_Target;
- }
-
- return;
- }
-
- //Parsing
- int64u Size;
- int32u Size_32, Name;
- if (Element_Size==2)
- {
- int16u Size_16;
- Peek_B2(Size_16);
- if (!Size_16)
- {
- Skip_B2( "Size");
-
- //Filling
- Header_Fill_Code(0, "Junk");
- Header_Fill_Size(2);
- return;
- }
- }
- Get_B4 (Size_32, "Size");
- if (Size_32==0 && (Element_Size==4 || Element_Size==8))
- {
- //Filling
- Header_Fill_Code(0, "Junk");
- Header_Fill_Size(4);
- return;
- }
- Size=Size_32;
- Get_C4 (Name, "Name");
- if (Name==0x33647666) //3dvf
- Name=0x6D6F6F76; //moov
- if (Name==0x61766964) //avid
- Name=0x6D646174; //mdat
-
- if (Size<8)
- {
- //Special case: until the end of the atom
- if (Size==0)
- {
- Size=Config->File_Current_Size-(File_Offset+Buffer_Offset);
- if (Status[IsAccepted] && Element_Level==2 && Name==0x00000000) //First real level (Level 1 is atom, level 2 is header block)
- {
- Element_Offset=0;
- Name=Elements::mdat;
- }
- }
- //Special case: Big files, size is 64-bit
- else if (Size==1)
- {
- //Reading Extended size
- Get_B8 (Size, "Size (Extended)");
- }
- //Not in specs!
- else
- {
- Size=Config->File_Current_Size-(File_Offset+Buffer_Offset);
- }
- }
-
- //Specific case: file begin with "free" atom
- if (!Status[IsAccepted]
- && (Name==Elements::free
- || Name==Elements::skip
- || Name==Elements::wide))
- {
- Accept("MPEG-4");
- Fill(Stream_General, 0, General_Format, "QuickTime");
- }
-
- //Filling
- Header_Fill_Code(Name, Ztring().From_CC4(Name));
- Header_Fill_Size(Size);
-
- if (Name==0x6D6F6F76 && Buffer_Offset+Size>Buffer_Size-Buffer_Offset) //moov
- {
- File_Buffer_Size_Hint_Pointer=Config->File_Buffer_Size_Hint_Pointer_Get();
-
- //Hints
- if (File_Buffer_Size_Hint_Pointer && Size>128*1024)
- {
- size_t Buffer_Size_Target=(size_t)(Buffer_Offset+Size-(Buffer_Size-Buffer_Offset));
- if (Buffer_Size_Target<128*1024)
- Buffer_Size_Target=128*1024;
- (*File_Buffer_Size_Hint_Pointer)=Buffer_Size_Target;
- }
- }
-}
-
-//---------------------------------------------------------------------------
-struct Mpeg4_muxing
-{
- int64u MinimalOffset;
- int64u MaximalOffset;
-
- Mpeg4_muxing()
- {
- MinimalOffset=(int64u)-1;
- MaximalOffset=0;
- }
-};
-bool File_Mpeg4::BookMark_Needed()
-{
- #if MEDIAINFO_MD5
- if (!mdat_MustParse && !mdat_Pos_NormalParsing && Config->File_Md5_Get() && FirstMdatPos<FirstMoovPos)
- {
- Element_Show();
- while (Element_Level>0)
- Element_End0();
- mdat_Pos_NormalParsing=true;
- GoTo(0);
- IsSecondPass=true;
- return false;
- }
- #endif //MEDIAINFO_MD5
-
- if (!mdat_MustParse)
- return false;
-
- //Handling of some wrong stsz and stsc atoms (ADPCM)
- if (!IsSecondPass)
- for (std::map<int32u, stream>::iterator Temp=Streams.begin(); Temp!=Streams.end(); ++Temp)
- if (Temp->second.StreamKind==Stream_Audio
- && (Retrieve(Stream_Audio, Temp->second.StreamPos, Audio_CodecID)==__T("ima4")
- || Retrieve(Stream_Audio, Temp->second.StreamPos, Audio_CodecID)==__T("11")))
- {
- Temp->second.stsz_StreamSize/=16;
- Temp->second.stsz_StreamSize*=17;
- float32 BitRate_Nominal=Retrieve(Stream_Audio, Temp->second.StreamPos, Audio_BitRate_Nominal).To_float32();
- if (BitRate_Nominal)
- {
- BitRate_Nominal/=16;
- BitRate_Nominal*=17;
- Fill(Stream_Audio, Temp->second.StreamPos, Audio_BitRate_Nominal, BitRate_Nominal, 0, true);
- }
- int64u Channels=Retrieve(Stream_Audio, Temp->second.StreamPos, Audio_Channel_s_).To_int64u();
- if (Channels!=2)
- {
- Temp->second.stsz_StreamSize/=2;
- Temp->second.stsz_StreamSize*=Channels;
- }
- for (size_t Pos=0; Pos<Temp->second.stsc.size(); Pos++)
- {
- Temp->second.stsc[Pos].SamplesPerChunk/=16;
- Temp->second.stsc[Pos].SamplesPerChunk*=17;
- if (Channels!=2)
- {
- Temp->second.stsc[Pos].SamplesPerChunk/=2;
- Temp->second.stsc[Pos].SamplesPerChunk*=(int32u)Channels;
- }
- }
- }
-
- //In case of second pass
- if (mdat_Pos.empty())
- {
- #if MEDIAINFO_DEMUX
- std::map<int32u, struct Mpeg4_muxing> Muxing; //key is StreamID
- #endif //MEDIAINFO_DEMUX
- size_t stco_Count=(size_t)-1;
- bool stco_IsDifferent=false;
-
- //For each stream
- for (std::map<int32u, stream>::iterator Temp=Streams.begin(); Temp!=Streams.end(); ++Temp)
- if (!Temp->second.Parsers.empty())
- {
- if (!Temp->second.File_Name.empty())
- {
- #if MEDIAINFO_DEMUX
- if (Config_Demux && Config->File_Demux_Interleave_Get()
- && Temp->second.StreamKind!=Stream_Other) // e.g. a time code, we can live without demuxing the time code
- {
- //Remark: supporting both embedded and referenced streams is currently not supported
- mdat_Pos.clear();
- return false;
- }
- else
- #endif // MEDIAINFO_DEMUX
- continue;
- }
-
- if (!Temp->second.stsz.empty() || Temp->second.stsz_Sample_Size)
- {
- if (!stco_IsDifferent)
- {
- if (stco_Count==(size_t)-1)
- stco_Count=Temp->second.stco.size();
- else if (stco_Count!=Temp->second.stco.size())
- stco_IsDifferent=true;
- }
-
- size_t Chunk_FrameCount=0;
- int32u Chunk_Number=1;
- int32u Sample_ByteSize=0;
- if (Temp->second.StreamKind==Stream_Audio)
- Sample_ByteSize=Retrieve(Stream_Audio, Temp->second.StreamPos, Audio_BitDepth).To_int32u()*Retrieve(Stream_Audio, Temp->second.StreamPos, Audio_Channel_s_).To_int32u()/8;
-
- #if MEDIAINFO_DEMUX
- stream::stts_durations Temp_stts_Durations;
- #endif //MEDIAINFO_DEMUX
- if (!Temp->second.stco.empty() && !Temp->second.stsc.empty())
- {
- int64u* stco_Current = &Temp->second.stco[0];
- int64u* stco_Max = stco_Current + Temp->second.stco.size();
- int64u* stsz_Current = Temp->second.stsz.empty()?NULL:&Temp->second.stsz[0];
- int64u* stsz_Max = stsz_Current + Temp->second.stsz.size();
- stream::stsc_struct* stsc_Current = &Temp->second.stsc[0];
- stream::stsc_struct* stsc_Max = stsc_Current + Temp->second.stsc.size();
- #if MEDIAINFO_DEMUX
- int64u MinimalOffset = (int64u)-1;
- int64u MaximalOffset = 0;
- #endif //MEDIAINFO_DEMUX
- for (; stco_Current<stco_Max; ++stco_Current)
- {
- #if MEDIAINFO_DEMUX
- if (MinimalOffset>*stco_Current)
- MinimalOffset = *stco_Current;
- if (MaximalOffset < *stco_Current)
- MaximalOffset = *stco_Current;
- #endif //MEDIAINFO_DEMUX
-
- while (stsc_Current + 1 < stsc_Max && Chunk_Number >= (stsc_Current + 1)->FirstChunk)
- stsc_Current++;
-
- if (Temp->second.stsz_Sample_Size == 0 && stsc_Current && !Temp->second.stsz.empty())
- {
- //Each sample has its own size
- int64u Chunk_Offset = 0;
- for (size_t Pos = 0; Pos < stsc_Current->SamplesPerChunk; Pos++)
- if (*stsz_Current)
- {
- mdat_Pos_Type mdat_Pos_Temp2;
- mdat_Pos_Temp2.Offset = *stco_Current + Chunk_Offset;
- mdat_Pos_Temp2.StreamID = Temp->first;
- mdat_Pos_Temp2.Size = *stsz_Current;
- mdat_Pos.push_back(mdat_Pos_Temp2);
- Chunk_Offset += *stsz_Current;
- stsz_Current++;
- if (stsz_Current >= stsz_Max)
- break;
- }
- if (stsz_Current >= stsz_Max)
- break;
- }
- else if (Temp->second.IsPcm && (!Sample_ByteSize || Temp->second.stsz_Sample_Size <= Sample_ByteSize) && stsc_Current && stsc_Current->SamplesPerChunk*Temp->second.stsz_Sample_Size*Temp->second.stsz_Sample_Multiplier < 0x1000000)
- {
- //Same size per sample, but granularity is too small
- mdat_Pos_Type mdat_Pos_Temp2;
- mdat_Pos_Temp2.Offset = *stco_Current;
- mdat_Pos_Temp2.StreamID = Temp->first;
- mdat_Pos_Temp2.Size = stsc_Current->SamplesPerChunk*Temp->second.stsz_Sample_Size*Temp->second.stsz_Sample_Multiplier;
- mdat_Pos.push_back(mdat_Pos_Temp2);
-
- #if MEDIAINFO_DEMUX
- if (Temp_stts_Durations.empty() || stsc_Current->SamplesPerChunk != Temp_stts_Durations[Temp_stts_Durations.size() - 1].SampleDuration)
- {
- stream::stts_duration stts_Duration;
- stts_Duration.Pos_Begin = Temp_stts_Durations.empty() ? 0 : Temp_stts_Durations[Temp_stts_Durations.size() - 1].Pos_End;
- stts_Duration.Pos_End = stts_Duration.Pos_Begin + 1;
- stts_Duration.SampleDuration = stsc_Current->SamplesPerChunk;
- stts_Duration.DTS_Begin = Temp_stts_Durations.empty() ? 0 : Temp_stts_Durations[Temp_stts_Durations.size() - 1].DTS_End;
- stts_Duration.DTS_End = stts_Duration.DTS_Begin + stts_Duration.SampleDuration;
- Temp_stts_Durations.push_back(stts_Duration);
- //Temp->second.stsc[stsc_Pos].SamplesPerChunk=1;
- }
- else
- {
- Temp_stts_Durations[Temp_stts_Durations.size() - 1].Pos_End++;
- Temp_stts_Durations[Temp_stts_Durations.size() - 1].DTS_End += Temp_stts_Durations[Temp_stts_Durations.size() - 1].SampleDuration;
- }
- #endif //MEDIAINFO_DEMUX
- }
- else if (stsc_Current < stsc_Max)
- {
- //Same size per sample
- int64u Chunk_Offset = 0;
- for (size_t Pos = 0; Pos < stsc_Current->SamplesPerChunk; Pos++)
- if (Temp->second.stsz_Sample_Size*Temp->second.stsz_Sample_Multiplier)
- {
- int64u Size = Temp->second.stsz_Sample_Size*Temp->second.stsz_Sample_Multiplier;
- mdat_Pos_Type mdat_Pos_Temp2;
- mdat_Pos_Temp2.Offset = *stco_Current + Chunk_Offset;
- mdat_Pos_Temp2.StreamID = Temp->first;
- mdat_Pos_Temp2.Size = Size;
- mdat_Pos.push_back(mdat_Pos_Temp2);
- Chunk_Offset += Size;
- Chunk_FrameCount++;
- }
- if (Chunk_FrameCount >= FrameCount_MaxPerStream)
- break;
- }
-
- Chunk_Number++;
- }
- #if MEDIAINFO_DEMUX
- Muxing[Temp->first].MinimalOffset=MinimalOffset;
- Muxing[Temp->first].MaximalOffset=MaximalOffset;
- #endif //MEDIAINFO_DEMUX
- for (size_t Pos=0; Pos<Temp->second.Parsers.size(); Pos++)
- Temp->second.Parsers[Pos]->Stream_BitRateFromContainer=Temp->second.stsz_StreamSize*8/(((float64)Temp->second.stts_Duration)/Temp->second.mdhd_TimeScale);
- #if MEDIAINFO_DEMUX
- if (FrameCount_MaxPerStream==(int32u)-1 && !Temp_stts_Durations.empty())
- {
- Temp->second.stts_Durations=Temp_stts_Durations;
- for (stsc_Current=&Temp->second.stsc[0]; stsc_Current<stsc_Max; ++stsc_Current)
- stsc_Current->SamplesPerChunk=1;
- Temp->second.stts_FrameCount=Temp_stts_Durations[Temp_stts_Durations.size()-1].Pos_End;
- }
- #endif //MEDIAINFO_DEMUX
- }
- }
-
- //special cases
- #if MEDIAINFO_DEMUX
- if (Temp->second.stsz.empty() && Temp->second.StreamKind==Stream_Video && Retrieve(Stream_Video, Temp->second.StreamPos, Video_CodecID)==__T("AV1x"))
- {
- //Found unknown data before the raw content
- int64u Width=Retrieve(Stream_Video, Temp->second.StreamPos, Video_Width).To_int64u();
- int64u Height=Retrieve(Stream_Video, Temp->second.StreamPos, Video_Height).To_int64u();
- if (Width && Height && Temp->second.stsz_Sample_Size>(Width*Height*2))
- Temp->second.Demux_Offset=Temp->second.stsz_Sample_Size-(Width*Height*2); // YUV 4:2:2 8 bit = 2 bytes per pixel
- }
- #endif //MEDIAINFO_DEMUX
- }
- std::sort(mdat_Pos.begin(), mdat_Pos.end(), &mdat_pos_sort);
- mdat_Pos_Temp=mdat_Pos.empty()?NULL:&mdat_Pos[0];
- mdat_Pos_Max=mdat_Pos_Temp+mdat_Pos.size();
-
- #if MEDIAINFO_DEMUX
- if (!stco_IsDifferent && Muxing.size()==2)
- {
- std::map<int32u, struct Mpeg4_muxing>::iterator Muxing_1=Muxing.begin();
- std::map<int32u, struct Mpeg4_muxing>::iterator Muxing_2=Muxing.begin(); ++Muxing_2;
- if (Muxing_1->second.MaximalOffset>Muxing_2->second.MinimalOffset)
- swap(Muxing_1, Muxing_2);
- if (Muxing_1->second.MaximalOffset<=Muxing_2->second.MinimalOffset)
- {
- for (size_t stco_Pos=1; stco_Pos<stco_Count; stco_Pos++)
- {
- StreamOffset_Jump[Streams[Muxing_1->first].stco[stco_Pos]]=Streams[Muxing_2->first].stco[stco_Pos-1];
- StreamOffset_Jump[Streams[Muxing_2->first].stco[stco_Pos]]=Streams[Muxing_1->first].stco[stco_Pos];
- }
- StreamOffset_Jump[Streams[Muxing_2->first].stco[0]]=Streams[Muxing_2->first].stco[stco_Count-1];
- }
- }
- #endif //MEDIAINFO_DEMUX
- }
- if (mdat_Pos.empty())
- return false;
-
- IsParsing_mdat=false;
- if (!mdat_Pos_ToParseInPriority_StreamIDs.empty())
- {
- //Hanlding StreamIDs to parse in priority (currently, only the first block of each stream is parsed in priority)
- if (!Streams[mdat_Pos_ToParseInPriority_StreamIDs[0]].stco.empty())
- {
- mdat_Pos_Type* Temp=&mdat_Pos[0];
- int64u stco_ToFind=Streams[mdat_Pos_ToParseInPriority_StreamIDs[0]].stco[0];
- while (Temp<mdat_Pos_Max && Temp->Offset!=stco_ToFind)
- Temp++;
- if (Temp<mdat_Pos_Max && Temp->Offset<File_Size) //Skipping data not in a truncated file
- {
- Element_Show();
- while (Element_Level>0)
- Element_End0();
- Element_Begin1("Priority streams");
-
- mdat_Pos_Temp=Temp;
- GoTo(Temp->Offset);
- IsParsing_mdat=true;
- }
- }
- mdat_Pos_ToParseInPriority_StreamIDs.erase(mdat_Pos_ToParseInPriority_StreamIDs.begin());
- }
-
- if (File_GoTo==(int64u)-1 && !mdat_Pos_NormalParsing && !mdat_Pos.empty() && mdat_Pos.begin()->Offset<File_Size) //Skipping data not in a truncated file
- {
- Element_Show();
- while (Element_Level>0)
- Element_End0();
- Element_Begin1("Second pass");
-
- mdat_Pos_Temp=&mdat_Pos[0];
- #if MEDIAINFO_MD5
- if (Config->File_Md5_Get())
- {
- GoTo(0);
- Md5_ParseUpTo=mdat_Pos_Temp->Offset;
- }
- else
- #endif //MEDIAINFO_MD5
- GoTo(mdat_Pos_Temp->Offset);
- IsParsing_mdat=true;
- mdat_Pos_NormalParsing=true;
- }
-
- IsSecondPass=true;
- return false; //We do not want to use the bookmark feature, only detect the end of the file
-}
-
-//---------------------------------------------------------------------------
-//Get language string from 2CC
-Ztring File_Mpeg4::Language_Get(int16u Language)
-{
- if (Language==0x7FFF || Language==0xFFFF)
- return Ztring();
-
- if (Language<0x100)
- return Mpeg4_Language_Apple(Language);
-
- Ztring ToReturn;
- ToReturn.append(1, (Char)((Language>>10&0x1F)+0x60));
- ToReturn.append(1, (Char)((Language>> 5&0x1F)+0x60));
- ToReturn.append(1, (Char)((Language>> 0&0x1F)+0x60));
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-//Get Metadata definition from 4CC
-File_Mpeg4::method File_Mpeg4::Metadata_Get(std::string &Parameter, int64u Meta)
-{
- File_Mpeg4::method Method;
- switch (Meta)
- {
- //http://atomicparsley.sourceforge.net/mpeg-4files.html
- //http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/QuickTime.html#ItemList
- case Elements::moov_meta___alb : Parameter="Album"; Method=Method_String; break;
- case Elements::moov_meta___ard : Parameter="Director"; Method=Method_String; break;
- case Elements::moov_meta___arg : Parameter="Arranger"; Method=Method_String; break;
- case Elements::moov_meta___ART : Parameter="Performer"; Method=Method_String; break;
- case Elements::moov_meta___aut : Parameter="Performer"; Method=Method_String; break;
- case Elements::moov_meta___con : Parameter="Conductor"; Method=Method_String; break;
- case Elements::moov_meta___cmt : Parameter="Comment"; Method=Method_String; break;
- case Elements::moov_meta___cpy : Parameter="Copyright"; Method=Method_String; break;
- case Elements::moov_meta___day : Parameter="Recorded_Date"; Method=Method_String; break;
- case Elements::moov_meta___des : Parameter="Title/More"; Method=Method_String; break;
- case Elements::moov_meta___dir : Parameter="Director"; Method=Method_String; break;
- case Elements::moov_meta___dis : Parameter="TermsOfUse"; Method=Method_String; break;
- case Elements::moov_meta___edl : Parameter="Tagged_Date"; Method=Method_String; break;
- case Elements::moov_meta___enc : Parameter="Encoded_Application"; Method=Method_String; break;
- case Elements::moov_meta___fmt : Parameter="Origin"; Method=Method_String; break;
- case Elements::moov_meta___gen : Parameter="Genre"; Method=Method_String; break;
- case Elements::moov_meta___grp : Parameter="Grouping"; Method=Method_String; break;
- case Elements::moov_meta___hos : Parameter="HostComputer"; Method=Method_String; break;
- case Elements::moov_meta___inf : Parameter="Title/More"; Method=Method_String; break;
- case Elements::moov_meta___key : Parameter="Keywords"; Method=Method_String; break;
- case Elements::moov_meta___lyr : Parameter="Lyrics"; Method=Method_String; break;
- case Elements::moov_meta___mak : Parameter="Make"; Method=Method_String; break;
- case Elements::moov_meta___mod : Parameter="Model"; Method=Method_String; break;
- case Elements::moov_meta___nam : Parameter="Title"; Method=Method_String3; break;
- case Elements::moov_meta___ope : Parameter="Original/Performer"; Method=Method_String; break;
- case Elements::moov_meta___prd : Parameter="Producer"; Method=Method_String; break;
- case Elements::moov_meta___PRD : Parameter="Product"; Method=Method_String; break;
- case Elements::moov_meta___prf : Parameter="Performer"; Method=Method_String; break;
- case Elements::moov_meta___req : Parameter="Comment"; Method=Method_String; break;
- case Elements::moov_meta___sne : Parameter="SoundEngineer"; Method=Method_String; break;
- case Elements::moov_meta___sol : Parameter="Conductor"; Method=Method_String; break;
- case Elements::moov_meta___src : Parameter="DistributedBy"; Method=Method_String; break;
- case Elements::moov_meta___st3 : Parameter="Subtitle"; Method=Method_String; break;
- case Elements::moov_meta___swr : Parameter="Encoded_Application"; Method=Method_String; break;
- case Elements::moov_meta___too : Parameter="Encoded_Application"; Method=Method_String; break;
- case Elements::moov_meta___url : Parameter="Track/Url"; Method=Method_String; break;
- case Elements::moov_meta___wrn : Parameter="Warning"; Method=Method_String; break;
- case Elements::moov_meta___wrt : Parameter="Composer"; Method=Method_String; break;
- case Elements::moov_meta___xpd : Parameter="ExecutiveProducer"; Method=Method_String; break;
- case Elements::moov_meta__aART : Parameter="Album/Performer"; Method=Method_String2; break;
- case Elements::moov_meta__akID : Parameter="AppleStoreAccountType"; Method=Method_Binary; break;
- case Elements::moov_meta__albm : Parameter="Album"; Method=Method_String2; break; //Has a optional track number after the NULL byte
- case Elements::moov_meta__apID : Parameter="AppleStoreAccount"; Method=Method_String; break;
- case Elements::moov_meta__atID : Parameter="AlbumTitleID"; Method=Method_Binary; break;
- case Elements::moov_meta__auth : Parameter="Performer"; Method=Method_String2; break;
- case Elements::moov_meta__catg : Parameter="Category"; Method=Method_String; break;
- case Elements::moov_meta__cnID : Parameter="AppleStoreCatalogID"; Method=Method_String; break;
- case Elements::moov_meta__cpil : Parameter="Compilation"; Method=Method_Binary; break;
- case Elements::moov_meta__cprt : Parameter="Copyright"; Method=Method_String2; break;
- case Elements::moov_meta__desc : Parameter="Description"; Method=Method_String; break;
- case Elements::moov_meta__disk : Parameter="Part"; Method=Method_Binary; break;
- case Elements::moov_meta__dscp : Parameter="Title/More"; Method=Method_String2; break;
- case Elements::moov_meta__egid : Parameter="EpisodeGlobalUniqueID"; Method=Method_Binary; break;
- case Elements::moov_meta__flvr : Parameter="Flavour"; Method=Method_Binary; break;
- case Elements::moov_meta__gnre : Parameter="Genre"; Method=Method_String2; break;
- case Elements::moov_meta__geID : Parameter="GenreID"; Method=Method_Binary; break;
- case Elements::moov_meta__grup : Parameter="Grouping"; Method=Method_String; break;
- case Elements::moov_meta__hdvd : Parameter="HDVideo"; Method=Method_Binary; break;
- case Elements::moov_meta__itnu : Parameter="iTunesU"; Method=Method_Binary; break;
- case Elements::moov_meta__keyw : Parameter="Keyword"; Method=Method_String; break;
- case Elements::moov_meta__ldes : Parameter="LongDescription"; Method=Method_String; break;
- case Elements::moov_meta__name : Parameter="Title"; Method=Method_String; break;
- case Elements::moov_meta__pcst : Parameter="Podcast"; Method=Method_Binary; break;
- case Elements::moov_meta__perf : Parameter="Performer"; Method=Method_String2; break;
- case Elements::moov_meta__pgap : Parameter.clear(); Method=Method_None; break;
- case Elements::moov_meta__plID : Parameter="PlayListID"; Method=Method_Binary; break;
- case Elements::moov_meta__purd : Parameter="PurchaseDate"; Method=Method_String; break;
- case Elements::moov_meta__purl : Parameter="PodcastURL"; Method=Method_String; break;
- case Elements::moov_meta__rate : Parameter="Rating"; Method=Method_Binary; break;
- case Elements::moov_meta__rtng : Parameter="Rating"; Method=Method_Binary; break;
- case Elements::moov_meta__sdes : Parameter="Description"; Method=Method_String; break;
- case Elements::moov_meta__sfID : Parameter="AppleStoreCountry"; Method=Method_Binary; break;
- case Elements::moov_meta__soaa : Parameter="Album/Performer/Sort"; Method=Method_String; break; //SortAlbumArtist
- case Elements::moov_meta__soal : Parameter="Album/Sort"; Method=Method_String2; break; //SortAlbum
- case Elements::moov_meta__soar : Parameter="Performer/Sort"; Method=Method_String; break; //SortArtist
- case Elements::moov_meta__soco : Parameter="Composer/Sort"; Method=Method_String; break; //SortComposer
- case Elements::moov_meta__sonm : Parameter="Title/Sort"; Method=Method_String; break; //SortName
- case Elements::moov_meta__sosn : Parameter="Title/Sort"; Method=Method_String; break; //SortShow
- case Elements::moov_meta__stik : Parameter="ContentType"; Method=Method_Binary; break;
- case Elements::moov_meta__titl : Parameter="Title"; Method=Method_String2; break;
- case Elements::moov_meta__tool : Parameter="Encoded_Application"; Method=Method_String3; break;
- case Elements::moov_meta__tmpo : Parameter="BPM"; Method=Method_Binary; break;
- case Elements::moov_meta__trkn : Parameter="Track"; Method=Method_Binary; break;
- case Elements::moov_meta__tven : Parameter="Part_ID"; Method=Method_Binary; break; //TVEpisodeID
- case Elements::moov_meta__tves : Parameter="Part"; Method=Method_String; break; //TVEpisode
- case Elements::moov_meta__tvnn : Parameter="TVNetworkName"; Method=Method_String; break;
- case Elements::moov_meta__tvsh : Parameter="Collection"; Method=Method_String; break; //TVShow
- case Elements::moov_meta__tvsn : Parameter="Season"; Method=Method_String; break; //TVSeason
- case Elements::moov_meta__xid_ : Parameter="Vendor"; Method=Method_String; break;
- case Elements::moov_meta__year : Parameter="Recorded_Date"; Method=Method_String2; break;
- case Elements::moov_meta__yyrc : Parameter="Recorded_Date"; Method=Method_String2; break;
- default :
- {
- Parameter.clear();
- Parameter.append(1, (char)((Meta&0xFF000000)>>24));
- Parameter.append(1, (char)((Meta&0x00FF0000)>>16));
- Parameter.append(1, (char)((Meta&0x0000FF00)>> 8));
- Parameter.append(1, (char)((Meta&0x000000FF)>> 0));
- Method=Method_String;
- }
- }
-
- Ztring Value;
- Value.append(1, (Char)((Meta&0xFF000000)>>24)); //Can not use From_CC4 because there is sometimes the (C) character, not in Ansi 7-bit, so wrongly decoded on UTF-8 systems
- Value.append(1, (Char)((Meta&0x00FF0000)>>16));
- Value.append(1, (Char)((Meta&0x0000FF00)>> 8));
- Value.append(1, (Char)((Meta&0x000000FF)>> 0));
- if (MediaInfoLib::Config.CustomMapping_IsPresent(__T("MP4"), Value))
- Parameter=MediaInfoLib::Config.CustomMapping_Get(__T("MP4"), Value).To_Local();
-
- return Method;
-}
-
-//---------------------------------------------------------------------------
-//Get Metadata definition from string
-File_Mpeg4::method File_Mpeg4::Metadata_Get(std::string &Parameter, const std::string &Meta)
-{
- if (Meta=="com.apple.quicktime.copyright") Parameter="Copyright";
- else if (Meta=="com.apple.quicktime.displayname") Parameter="Title";
- else if (Meta=="DATE") Parameter="Encoded_Date";
- else if (Meta=="iTunEXTC") Parameter="ContentRating";
- else if (Meta=="iTunMOVI") Parameter="iTunMOVI";
- else if (Meta=="iTunNORM") Parameter="";
- else if (Meta=="iTunes_CDDB_IDs") Parameter="";
- else if (Meta=="iTunSMPB") Parameter="";
- else if (Meta=="PERFORMER") Parameter="Performer";
- else if (Meta=="PUBLISHER") Parameter="Publisher";
- else Parameter=Meta;
- return Method_String;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::Descriptors()
-{
- //Preparing
- File_Mpeg4_Descriptors MI;
- MI.KindOfStream=StreamKind_Last;
- MI.PosOfStream=StreamPos_Last;
- MI.Parser_DoNotFreeIt=true;
-
- int64u Elemen_Code_Save=Element_Code;
- Element_Code=moov_trak_tkhd_TrackID; //Element_Code is use for stream identifier
- Open_Buffer_Init(&MI);
- Element_Code=Elemen_Code_Save;
- mdat_MustParse=true; //Data is in MDAT
-
- //Parsing
- Open_Buffer_Continue(&MI);
-
- //Filling
- Finish(&MI);
- Merge(MI, StreamKind_Last, 0, StreamPos_Last);
-
- //Special case: AAC
- if (StreamKind_Last==Stream_Audio
- && (Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("AAC")
- || Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("MPEG Audio")
- || Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("Vorbis")))
- Clear(Stream_Audio, StreamPos_Last, Audio_BitDepth); //Resolution is not valid for AAC / MPEG Audio / Vorbis
-
- //Parser from Descriptor
- if (MI.Parser)
- {
- for (size_t Pos=0; Pos<Streams[moov_trak_tkhd_TrackID].Parsers.size(); Pos++)
- delete Streams[moov_trak_tkhd_TrackID].Parsers[Pos];
- Streams[moov_trak_tkhd_TrackID].Parsers.clear();
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(MI.Parser);
- mdat_MustParse=true;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::TimeCode_Associate(int32u TrackID)
-{
- //Trying to detect time code attached to 1 video only but for all streams in reality
- int32u TimeCode_TrackID=(int32u)-1;
- bool TimeCode_TrackID_MoreThanOne=false;
- for (std::map<int32u, stream>::iterator Strea=Streams.begin(); Strea!=Streams.end(); ++Strea)
- if (Strea->second.TimeCode_TrackID!=(int32u)-1)
- {
- if (TimeCode_TrackID==(int32u)-1)
- TimeCode_TrackID=Strea->second.TimeCode_TrackID;
- else
- TimeCode_TrackID_MoreThanOne=true;
- }
- if (!TimeCode_TrackID_MoreThanOne && TimeCode_TrackID!=(int32u)-1)
- for (std::map<int32u, stream>::iterator Strea=Streams.begin(); Strea!=Streams.end(); ++Strea)
- Strea->second.TimeCode_TrackID=TimeCode_TrackID; //For all tracks actually
-
- //Is it general or for a specific stream?
- bool IsGeneral=true;
- for (std::map<int32u, stream>::iterator Strea=Streams.begin(); Strea!=Streams.end(); ++Strea)
- if (Strea->second.TimeCode_TrackID==TrackID)
- IsGeneral=false;
-
- //For each track in the file (but only the last one will be used!)
- for (std::map<int32u, stream>::iterator Strea=Streams.begin(); Strea!=Streams.end(); ++Strea)
- if (!Streams[TrackID].Parsers.empty() && (IsGeneral && Strea->second.StreamKind!=Stream_Max) || Strea->second.TimeCode_TrackID==TrackID)
- {
- if (Strea->second.StreamKind==Stream_Video)
- {
- Fill(Stream_Video, Strea->second.StreamPos, Video_Delay_Settings, Ztring(__T("DropFrame="))+(Streams[TrackID].TimeCode->DropFrame?__T("Yes"):__T("No")));
- Fill(Stream_Video, Strea->second.StreamPos, Video_Delay_Settings, Ztring(__T("24HourMax="))+(Streams[TrackID].TimeCode->H24?__T("Yes"):__T("No")));
- Fill(Stream_Video, Strea->second.StreamPos, Video_Delay_Settings, Ztring(__T("IsVisual="))+(Streams[TrackID].TimeCode_IsVisual?__T("Yes"):__T("No")));
- }
- if (Strea->second.StreamKind!=Stream_Other)
- {
- Fill(Strea->second.StreamKind, Strea->second.StreamPos, "Delay", Streams[TrackID].Parsers[0]->Get(Stream_General, 0, "Delay"));
- Fill(Strea->second.StreamKind, Strea->second.StreamPos, "Delay_DropFrame", Streams[TrackID].TimeCode->DropFrame?__T("Yes"):__T("No"));
- Fill(Strea->second.StreamKind, Strea->second.StreamPos, "Delay_Source", "Container");
- }
-
- //Fill(Strea->second.StreamKind, Strea->second.StreamPos, "TimeCode_FirstFrame", Streams[TrackID].Parsers[0]->Get(Stream_General, 0, "TimeCode_FirstFrame"));
- //Fill(Strea->second.StreamKind, Strea->second.StreamPos, "TimeCode_Source", Streams[TrackID].Parsers[0]->Get(Stream_General, 0, "TimeCode_Source"));
- }
- }
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_MPEG4_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4.h
deleted file mode 100644
index aedf73b6e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4.h
+++ /dev/null
@@ -1,528 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Mpeg4H
-#define MediaInfo_File_Mpeg4H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-class File_MpegPs;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_Mpeg4
-//***************************************************************************
-
-class File_Mpeg4 : public File__Analyze
-{
-protected :
- //Streams management
- void Streams_Accept();
- void Streams_Finish();
- void Streams_Finish_CommercialNames ();
-
-public :
- File_Mpeg4();
- ~File_Mpeg4();
-
-private :
- //Buffer - Global
- void Read_Buffer_Init();
- void Read_Buffer_Unsynched();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer
- bool Header_Begin();
- void Header_Parse();
- void Data_Parse();
- bool BookMark_Needed();
-
- //Elements
- void bloc();
- void cdat();
- void cdt2() {cdat();}
- void free();
- void ftyp();
- void idat();
- void idsc();
- void jp2c();
- void jp2h();
- void jp2h_ihdr();
- void jp2h_colr();
- void mdat();
- void mdat_xxxx();
- void mdat_StreamJump();
- void mfra();
- void mfra_mfro();
- void mfra_tfra();
- void moof();
- void moof_mfhd();
- void moof_traf();
- void moof_traf_sdtp();
- void moof_traf_tfhd();
- void moof_traf_trun();
- void moov();
- void moov_ainf();
- void moov_cmov();
- void moov_cmov_cmvd();
- void moov_cmov_cmvd_zlib();
- void moov_cmov_dcom();
- void moov_ctab();
- void moov_iods();
- void moov_meta();
- void moov_meta_hdlr();
- void moov_meta_bxml();
- void moov_meta_keys();
- void moov_meta_keys_mdta();
- void moov_meta_ilst();
- void moov_meta_ilst_xxxx();
- void moov_meta_ilst_xxxx_data();
- void moov_meta_ilst_xxxx_mean();
- void moov_meta_ilst_xxxx_name();
- void moov_meta_xml();
- void moov_mvex();
- void moov_mvex_mehd();
- void moov_mvex_trex();
- void moov_mvhd();
- void moov_trak();
- void moov_trak_edts();
- void moov_trak_edts_elst();
- void moov_trak_load();
- void moov_trak_mdia();
- void moov_trak_mdia_hdlr();
- void moov_trak_mdia_imap();
- void moov_trak_mdia_imap_sean();
- void moov_trak_mdia_imap_sean___in();
- void moov_trak_mdia_imap_sean___in___ty();
- void moov_trak_mdia_imap_sean___in_dtst();
- void moov_trak_mdia_imap_sean___in_obid();
- void moov_trak_mdia_mdhd();
- void moov_trak_mdia_minf();
- void moov_trak_mdia_minf_code();
- void moov_trak_mdia_minf_code_sean();
- void moov_trak_mdia_minf_code_sean_RU_A();
- void moov_trak_mdia_minf_dinf();
- void moov_trak_mdia_minf_dinf_url_();
- void moov_trak_mdia_minf_dinf_urn_();
- void moov_trak_mdia_minf_dinf_dref();
- void moov_trak_mdia_minf_dinf_dref_alis();
- void moov_trak_mdia_minf_dinf_dref_rsrc();
- void moov_trak_mdia_minf_gmhd();
- void moov_trak_mdia_minf_gmhd_gmin();
- void moov_trak_mdia_minf_gmhd_tmcd();
- void moov_trak_mdia_minf_gmhd_tmcd_tcmi();
- void moov_trak_mdia_minf_gmhd_tcmi();
- void moov_trak_mdia_minf_hint();
- void moov_trak_mdia_minf_hdlr();
- void moov_trak_mdia_minf_hmhd();
- void moov_trak_mdia_minf_nmhd();
- void moov_trak_mdia_minf_smhd();
- void moov_trak_mdia_minf_sthd();
- void moov_trak_mdia_minf_vmhd();
- void moov_trak_mdia_minf_stbl();
- void moov_trak_mdia_minf_stbl_cslg();
- void moov_trak_mdia_minf_stbl_co64();
- void moov_trak_mdia_minf_stbl_ctts();
- void moov_trak_mdia_minf_stbl_sdtp();
- void moov_trak_mdia_minf_stbl_stco();
- void moov_trak_mdia_minf_stbl_stdp();
- void moov_trak_mdia_minf_stbl_stps();
- void moov_trak_mdia_minf_stbl_stsc();
- void moov_trak_mdia_minf_stbl_stsd();
- void moov_trak_mdia_minf_stbl_stsd_stpp();
- void moov_trak_mdia_minf_stbl_stsd_stpp_btrt() {moov_trak_mdia_minf_stbl_stsd_xxxx_btrt();}
- void moov_trak_mdia_minf_stbl_stsd_text();
- void moov_trak_mdia_minf_stbl_stsd_tmcd();
- void moov_trak_mdia_minf_stbl_stsd_tmcd_name();
- void moov_trak_mdia_minf_stbl_stsd_tx3g();
- void moov_trak_mdia_minf_stbl_stsd_tx3g_ftab();
- void moov_trak_mdia_minf_stbl_stsd_xxxx();
- void moov_trak_mdia_minf_stbl_stsd_xxxxSound();
- void moov_trak_mdia_minf_stbl_stsd_xxxxStream();
- void moov_trak_mdia_minf_stbl_stsd_xxxxText();
- void moov_trak_mdia_minf_stbl_stsd_xxxxVideo();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_alac();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_ACLR();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_APRG();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_ARES();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_avcC();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_bitr();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_btrt();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_chan();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_clap();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_colr();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_colr_nclc(bool LittleEndian=false);
- void moov_trak_mdia_minf_stbl_stsd_xxxx_colr_prof();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_d263();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_dac3();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_damr();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_dec3();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_ddts();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_dvc1();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_esds();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_fiel();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_glbl();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_hvcC();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_idfm();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_jp2h() {jp2h();}
- void moov_trak_mdia_minf_stbl_stsd_xxxx_jp2h_colr() {jp2h_colr();}
- void moov_trak_mdia_minf_stbl_stsd_xxxx_jp2h_ihdr() {jp2h_ihdr();}
- void moov_trak_mdia_minf_stbl_stsd_xxxx_pasp();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_sinf();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_frma();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_imif();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_schm();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_schi();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_wave();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_wave_acbf();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_wave_enda();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_wave_frma();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_wave_samr();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_wave_srcq();
- void moov_trak_mdia_minf_stbl_stsd_xxxx_wave_xxxx();
- void moov_trak_mdia_minf_stbl_stsh();
- void moov_trak_mdia_minf_stbl_stss();
- void moov_trak_mdia_minf_stbl_stsz();
- void moov_trak_mdia_minf_stbl_stts();
- void moov_trak_mdia_minf_stbl_stts_Common(int32u SampleCount, int32u SampleDuration, int32u Pos=0, int32u NumberOfEntries=1);
- void moov_trak_mdia_minf_stbl_stz2() {moov_trak_mdia_minf_stbl_stsz();}
- void moov_trak_meta() {moov_meta();}
- void moov_trak_meta_hdlr() {moov_meta_hdlr();}
- void moov_trak_meta_bxml() {moov_meta_bxml();}
- void moov_trak_meta_keys() {moov_meta_keys();}
- void moov_trak_meta_keys_mdta() {moov_meta_keys_mdta();}
- void moov_trak_meta_ilst() {moov_meta_ilst();}
- void moov_trak_meta_ilst_xxxx() {moov_meta_ilst_xxxx();}
- void moov_trak_meta_ilst_xxxx_data() {moov_meta_ilst_xxxx_data();}
- void moov_trak_meta_ilst_xxxx_mean() {moov_meta_ilst_xxxx_mean();}
- void moov_trak_meta_ilst_xxxx_name() {moov_meta_ilst_xxxx_name();}
- void moov_trak_meta_xml() {moov_meta_xml();}
- void moov_trak_tapt();
- void moov_trak_tapt_clef();
- void moov_trak_tapt_prof();
- void moov_trak_tapt_enof();
- void moov_trak_tkhd();
- void moov_trak_tref();
- void moov_trak_tref_chap();
- void moov_trak_tref_clcp();
- void moov_trak_tref_dpnd();
- void moov_trak_tref_fall();
- void moov_trak_tref_folw();
- void moov_trak_tref_forc();
- void moov_trak_tref_ipir();
- void moov_trak_tref_hint();
- void moov_trak_tref_mpod();
- void moov_trak_tref_scpt();
- void moov_trak_tref_ssrc();
- void moov_trak_tref_sync();
- void moov_trak_tref_tmcd();
- void moov_trak_udta();
- void moov_trak_udta_xxxx();
- void moov_udta();
- void moov_udta_AllF();
- void moov_udta_chpl();
- void moov_udta_clsf();
- void moov_udta_cprt();
- void moov_udta_DcMD();
- void moov_udta_DcMD_Cmbo();
- void moov_udta_DcMD_DcME();
- void moov_udta_DcMD_DcME_Keyw();
- void moov_udta_DcMD_DcME_Mtmd();
- void moov_udta_DcMD_DcME_Rate();
- void moov_udta_FIEL();
- void moov_udta_FXTC();
- void moov_udta_hinf();
- void moov_udta_hinv();
- void moov_udta_hnti();
- void moov_udta_hnti_rtp ();
- void moov_udta_ID32();
- void moov_udta_kywd();
- void moov_udta_loci();
- void moov_udta_LOOP();
- void moov_udta_MCPS();
- void moov_udta_meta();
- void moov_udta_meta_hdlr();
- void moov_udta_meta_ilst();
- void moov_udta_meta_ilst_xxxx();
- void moov_udta_meta_ilst_xxxx_data();
- void moov_udta_meta_ilst_xxxx_mean();
- void moov_udta_meta_ilst_xxxx_name();
- void moov_udta_ndrm();
- void moov_udta_nsav();
- void moov_udta_rtng();
- void moov_udta_ptv ();
- void moov_udta_Sel0();
- void moov_udta_tags();
- void moov_udta_tags_meta();
- void moov_udta_tags_tseg();
- void moov_udta_tags_tseg_tshd();
- void moov_udta_WLOC();
- void moov_udta_XMP_();
- void moov_udta_yrrc();
- void moov_udta_xxxx();
- void pdin();
- void PICT();
- void pckg();
- void pnot();
- void RDAO();
- void RDAS();
- void RDVO();
- void RDVS();
- void RED1();
- void REDA();
- void REDV();
- void REOB();
- void skip();
- void wide();
-
- //Helpers
- bool Element_Level_Get();
- bool Element_Name_Get();
- bool Element_Size_Get();
- Ztring Language_Get(int16u Language);
- enum method
- {
- Method_None,
- Method_String,
- Method_String2,
- Method_String3,
- Method_Integer,
- Method_Binary
- };
- method Metadata_Get(std::string &Parameter, int64u Meta);
- method Metadata_Get(std::string &Parameter, const std::string &Meta);
- void Descriptors();
- void TimeCode_Associate(int32u TrackID);
-
- //Temp
- bool List;
- bool mdat_MustParse;
- int32u moov_cmov_dcom_Compressor;
- int32u moov_meta_hdlr_Type;
- std::string moov_meta_ilst_xxxx_name_Name;
- size_t moov_trak_mdia_minf_stbl_stsd_Pos;
- int32u moov_trak_tkhd_TrackID;
- float32 moov_trak_tkhd_Width;
- float32 moov_trak_tkhd_Height;
- float32 moov_trak_tkhd_DisplayAspectRatio;
- float32 moov_trak_tkhd_Rotation;
- std::vector<std::string> moov_udta_meta_keys_List;
- size_t moov_udta_meta_keys_ilst_Pos;
- int32u moov_mvhd_TimeScale;
- int32u Vendor;
- Ztring Vendor_Version;
- int64u FirstMdatPos;
- int64u LastMdatPos; //This is the position of the byte after the last byte of mdat
- int64u FirstMoovPos;
- int64u moof_base_data_offset;
- int32u FrameCount_MaxPerStream;
- bool data_offset_present;
- int64u moof_traf_base_data_offset;
- int32u moof_traf_default_sample_duration;
- int32u moof_traf_default_sample_size;
- int32u MajorBrand;
- bool IsSecondPass;
- bool IsParsing_mdat;
- bool IsFragmented;
- size_t StreamOrder;
-
- //Data
- struct stream
- {
- Ztring File_Name;
- std::vector<File__Analyze*> Parsers;
- std::map<string, Ztring> Infos;
- MediaInfo_Internal* MI;
- struct timecode
- {
- int32u TimeScale;
- int32u FrameDuration;
- bool DropFrame;
- bool H24;
- bool NegativeTimes;
- };
- timecode* TimeCode;
- stream_t StreamKind;
- size_t StreamPos;
- int32u hdlr_Type;
- int32u hdlr_SubType;
- int32u hdlr_Manufacturer;
- struct edts_struct
- {
- int32u Duration;
- int32u Delay;
- int32u Rate;
- };
- std::vector<edts_struct> edts;
- std::vector<int64u> stco;
- struct stsc_struct
- {
- int32u FirstChunk;
- int32u SamplesPerChunk;
- };
- std::vector<stsc_struct> stsc;
- std::vector<int64u> stsz;
- std::vector<int64u> stsz_Total; //TODO: merge with stsz
- int64u stsz_StreamSize; //TODO: merge with stsz
- std::vector<int64u> stss; //Sync Sample, base=0
- struct stts_struct
- {
- int32u SampleCount;
- int32u SampleDuration;
- };
- std::vector<stts_struct> stts;
- int64u stsz_Sample_Size;
- int64u stsz_Sample_Multiplier;
- int64u stsz_Sample_Count;
- int64u tkhd_Duration;
- int32u mdhd_TimeScale;
- int64u mdhd_Duration;
- int32u stts_Min;
- int32u stts_Max;
- int64u stts_FrameCount;
- int64u stts_Duration;
- int64u stts_Duration_FirstFrame;
- int64u stts_Duration_LastFrame;
- int64u stts_SampleDuration;
- int32u mvex_trex_default_sample_duration;
- int32u mvex_trex_default_sample_size;
- int32u TimeCode_TrackID;
- bool TimeCode_IsVisual;
- bool IsPcm;
- bool IsPcmMono;
- bool IsPriorityStream;
- bool IsFilled;
- bool IsChapter;
- float32 CleanAperture_Width;
- float32 CleanAperture_Height;
- float32 CleanAperture_PixelAspectRatio;
- #if MEDIAINFO_DEMUX || MEDIAINFO_SEEK
- int8u Demux_Level;
- int64u Demux_Offset;
-
- struct stts_duration
- {
- int64u Pos_Begin;
- int64u Pos_End;
- int64u DTS_Begin;
- int64u DTS_End;
- int32u SampleDuration;
- };
- typedef std::vector<stts_duration> stts_durations;
- stts_durations stts_Durations;
- size_t stts_Durations_Pos;
- int64u stts_FramePos;
- #endif //MEDIAINFO_DEMUX || MEDIAINFO_SEEK
- #if MEDIAINFO_DEMUX
- bool PtsDtsAreSame;
- bool Demux_EventWasSent;
- #endif //MEDIAINFO_DEMUX
-
- stream()
- {
- MI=NULL;
- TimeCode=NULL;
- StreamKind=Stream_Max;
- StreamPos=0;
- hdlr_Type=0x00000000;
- hdlr_SubType=0x00000000;
- hdlr_Manufacturer=0x00000000;
- stsz_StreamSize=0;
- stsz_Sample_Size=0;
- stsz_Sample_Multiplier=1;
- stsz_Sample_Count=0;
- tkhd_Duration=0;
- mdhd_TimeScale=0;
- mdhd_Duration=0;
- stts_Min=(int32u)-1;
- stts_Max=0;
- stts_FrameCount=0;
- stts_Duration=0;
- stts_Duration_FirstFrame=0;
- stts_Duration_LastFrame=0;
- stts_SampleDuration = 0;
- mvex_trex_default_sample_duration=0;
- mvex_trex_default_sample_size=0;
- TimeCode_TrackID=(int32u)-1;
- TimeCode_IsVisual=false;
- IsPcm=false;
- IsPcmMono=false;
- IsPriorityStream=false;
- IsFilled=false;
- IsChapter=false;
- CleanAperture_Width=0;
- CleanAperture_Height=0;
- CleanAperture_PixelAspectRatio=0;
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- Demux_Offset=0;
- stts_Durations_Pos=0;
- stts_FramePos=0;
- #endif //MEDIAINFO_DEMUX
- #if MEDIAINFO_DEMUX
- PtsDtsAreSame=false;
- Demux_EventWasSent=false;
- #endif //MEDIAINFO_DEMUX
- }
-
- ~stream()
- {
- for (size_t Pos=0; Pos<Parsers.size(); Pos++)
- delete Parsers[Pos];
- delete MI; //MI=NULL;
- delete TimeCode; //TimeCode=NULL;
- }
- };
- typedef std::map<int32u, stream> streams;
- streams Streams;
- streams::iterator Stream;
- #if defined(MEDIAINFO_REFERENCES_YES)
- File__ReferenceFilesHelper* ReferenceFiles;
- #endif //defined(MEDIAINFO_REFERENCES_YES)
- #if MEDIAINFO_NEXTPACKET
- bool ReferenceFiles_IsParsing;
- #endif //MEDIAINFO_NEXTPACKET
-
- //Hints
- size_t* File_Buffer_Size_Hint_Pointer;
-
- //Positions
- struct mdat_Pos_Type
- {
- int64u Offset;
- int64u Size;
- int32u StreamID;
- int32u Reserved1;
- int64u Reserved2;
- };
- typedef std::vector<mdat_Pos_Type> mdat_pos;
- static bool mdat_pos_sort (const File_Mpeg4::mdat_Pos_Type &i,const File_Mpeg4::mdat_Pos_Type &j) { return (i.Offset<j.Offset); }
- mdat_pos mdat_Pos;
- mdat_Pos_Type* mdat_Pos_Temp;
- mdat_Pos_Type* mdat_Pos_Max;
- std::vector<int32u> mdat_Pos_ToParseInPriority_StreamIDs;
- bool mdat_Pos_NormalParsing;
-
- #if MEDIAINFO_DEMUX
- int64u TimeCode_FrameOffset;
- int64u TimeCode_DtsOffset;
- std::map<int64u, int64u> StreamOffset_Jump; //Key is the current position, value is the jump position
- #endif //MEDIAINFO_DEMUX
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_Descriptors.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_Descriptors.cpp
deleted file mode 100644
index 010049235..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_Descriptors.cpp
+++ /dev/null
@@ -1,1001 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Descriptors part
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_MPEG4_YES
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Mpeg4_Descriptors.h"
-#include <cstring>
-#if defined(MEDIAINFO_OGG_YES)
- #include "MediaInfo/Multiple/File_Ogg.h"
-#endif
-#if defined(MEDIAINFO_AVC_YES)
- #include "MediaInfo/Video/File_Avc.h"
-#endif
-#if defined(MEDIAINFO_VC1_YES)
- #include "MediaInfo/Video/File_Vc1.h"
-#endif
-#if defined(MEDIAINFO_DIRAC_YES)
- #include "MediaInfo/Video/File_Dirac.h"
-#endif
-#if defined(MEDIAINFO_MPEG4V_YES)
- #include "MediaInfo/Video/File_Mpeg4v.h"
-#endif
-#if defined(MEDIAINFO_MPEGV_YES)
- #include "MediaInfo/Video/File_Mpegv.h"
-#endif
-#if defined(MEDIAINFO_JPEG_YES)
- #include "MediaInfo/Image/File_Jpeg.h"
-#endif
-#if defined(MEDIAINFO_PNG_YES)
- #include "MediaInfo/Image/File_Png.h"
-#endif
-#if defined(MEDIAINFO_AAC_YES)
- #include "MediaInfo/Audio/File_Aac.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_DTS_YES)
- #include "MediaInfo/Audio/File_Dts.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if MEDIAINFO_DEMUX
- #include "base64.h"
-#endif //MEDIAINFO_DEMUX
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_MPEG4V_YES
- const char* Mpeg4v_Profile_Level(int32u Profile_Level);
-#endif //MEDIAINFO_MPEG4V_YES
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_Descriptors_Predefined(int8u ID)
-{
- switch (ID)
- {
- case 0x00 : return "Custom";
- case 0x01 : return "null SL packet header";
- case 0x02 : return "Reserved for use in MP4 files";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_Descriptors_ObjectTypeIndication(int8u ID)
-{
- switch (ID)
- {
- case 0x01 : return "Systems ISO/IEC 14496-1";
- case 0x02 : return "Systems ISO/IEC 14496-1 (v2)";
- case 0x03 : return "Interaction Stream";
- case 0x05 : return "AFX Stream";
- case 0x06 : return "Font Data Stream";
- case 0x07 : return "Synthesized Texture Stream";
- case 0x08 : return "Streaming Text Stream";
- case 0x20 : return "Visual ISO/IEC 14496-2 (MPEG-4 Visual)";
- case 0x21 : return "Visual ISO/IEC 14496-10 (AVC)";
- case 0x22 : return "Parameter Sets for Visual ISO/IEC 14496-10 (AVC)";
- case 0x24 : return "ALS"; //Not sure
- case 0x2B : return "SAOC"; //Not sure
- case 0x40 : return "Audio ISO/IEC 14496-3 (AAC)";
- case 0x60 : return "Visual ISO/IEC 13818-2 Simple Profile (MPEG Video)";
- case 0x61 : return "Visual ISO/IEC 13818-2 Main Profile (MPEG Video)";
- case 0x62 : return "Visual ISO/IEC 13818-2 SNR Profile (MPEG Video)";
- case 0x63 : return "Visual ISO/IEC 13818-2 Spatial Profile (MPEG Video)";
- case 0x64 : return "Visual ISO/IEC 13818-2 High Profile (MPEG Video)";
- case 0x65 : return "Visual ISO/IEC 13818-2 422 Profile (MPEG Video)";
- case 0x66 : return "Audio ISO/IEC 13818-7 Main Profile (AAC)";
- case 0x67 : return "Audio ISO/IEC 13818-7 Low Complexity Profile (AAC)";
- case 0x68 : return "Audio ISO/IEC 13818-7 Scaleable Sampling Rate Profile (AAC)";
- case 0x69 : return "Audio ISO/IEC 13818-3 (MPEG Audio)";
- case 0x6A : return "Visual ISO/IEC 11172-2 (MPEG Video)";
- case 0x6B : return "Audio ISO/IEC 11172-3 (MPEG Audio)";
- case 0x6C : return "Visual ISO/IEC 10918-1 (JPEG)";
- case 0x6D : return "PNG";
- case 0xA0 : return "EVRC";
- case 0xA1 : return "SMV";
- case 0xA2 : return "3GPP2 Compact Multimedia Format (CMF)";
- case 0xA3 : return "VC-1";
- case 0xA4 : return "Dirac";
- case 0xA5 : return "AC-3";
- case 0xA6 : return "E-AC-3";
- case 0xA9 : return "DTS";
- case 0xAA : return "DTS-HD High Resolution";
- case 0xAB : return "DTS-HD Master Audio";
- case 0xAC : return "DTS-HD Express";
- case 0xD1 : return "Private - EVRC";
- case 0xD3 : return "Private - AC-3";
- case 0xD4 : return "Private - DTS";
- case 0xDD : return "Private - Ogg";
- case 0xDE : return "Private - Ogg";
- case 0xE1 : return "Private - QCELP";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_Descriptors_StreamType(int8u ID)
-{
- switch (ID)
- {
- case 0x01 : return "ObjectDescriptorStream";
- case 0x02 : return "ClockReferenceStream";
- case 0x03 : return "SceneDescriptionStream";
- case 0x04 : return "VisualStream";
- case 0x05 : return "AudioStream";
- case 0x06 : return "MPEG7Stream";
- case 0x07 : return "IPMPStream";
- case 0x08 : return "ObjectContentInfoStream";
- case 0x09 : return "MPEGJStream";
- case 0x0A : return "Interaction Stream";
- case 0x0B : return "IPMPToolStream";
- case 0x0C : return "FontDataStream";
- case 0x0D : return "StreamingText";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_Descriptors_ODProfileLevelIndication(int8u /*ID*/)
-{
- return "";
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_Descriptors_SceneProfileLevelIndication(int8u ID)
-{
- switch (ID)
- {
- case 1 : return "Simple2D@L1";
- case 2 : return "Simple2D@L2";
- case 11 : return "Basic2D@L1";
- case 12 : return "Core2D@L1";
- case 13 : return "Core2D@L2";
- case 14 : return "Advanced2D@L1";
- case 15 : return "Advanced2D@L2";
- case 16 : return "Advanced2D@L3";
- case 17 : return "Main2D@L1";
- case 18 : return "Main2D@L2";
- case 19 : return "Main2D@L3";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_Descriptors_AudioProfileLevelIndication(int8u ID)
-{
- switch (ID)
- {
- case 1 : return "Main@L1";
- case 2 : return "Main@L2";
- case 3 : return "Main@L3";
- case 4 : return "Main@L4";
- case 5 : return "Scalable@L1";
- case 6 : return "Scalable@L2";
- case 7 : return "Scalable@L3";
- case 8 : return "Scalable@L4";
- case 9 : return "Speech@L1";
- case 10 : return "Speech@L2";
- case 11 : return "Synthesis@L1";
- case 12 : return "Synthesis@L2";
- case 13 : return "Synthesis@L3";
- case 14 : return "HighQualityAudio@L1";
- case 15 : return "HighQualityAudio@L2";
- case 16 : return "HighQualityAudio@L3";
- case 17 : return "HighQualityAudio@L4";
- case 18 : return "HighQualityAudio@L5";
- case 19 : return "HighQualityAudio@L6";
- case 20 : return "HighQualityAudio@L7";
- case 21 : return "HighQualityAudio@L8";
- case 22 : return "LowDelayAudio@L1";
- case 23 : return "LowDelayAudio@L2";
- case 24 : return "LowDelayAudio@L3";
- case 25 : return "LowDelayAudio@L4";
- case 26 : return "LowDelayAudio@L5";
- case 27 : return "LowDelayAudio@L6";
- case 28 : return "LowDelayAudio@L7";
- case 29 : return "LowDelayAudio@L8";
- case 30 : return "NaturalAudio@L1";
- case 31 : return "NaturalAudio@L2";
- case 32 : return "NaturalAudio@L3";
- case 33 : return "NaturalAudio@L4";
- case 34 : return "MobileAudioInternetworking@L1";
- case 35 : return "MobileAudioInternetworking@L2";
- case 36 : return "MobileAudioInternetworking@L3";
- case 37 : return "MobileAudioInternetworking@L4";
- case 38 : return "MobileAudioInternetworking@L5";
- case 39 : return "MobileAudioInternetworking@L6";
- case 40 : return "AAC@L1";
- case 41 : return "AAC@L2";
- case 42 : return "AAC@L4";
- case 43 : return "AAC@L5";
- case 44 : return "HighEfficiencyAAC@L2";
- case 45 : return "HighEfficiencyAAC@L3";
- case 46 : return "HighEfficiencyAAC@L4";
- case 47 : return "HighEfficiencyAAC@L5";
- case 59 : return "HighDefinitionAAC@L1";
- case 60 : return "ALSSimple@L1";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-extern const char* Mpeg4v_Profile_Level(int32u Profile_Level);
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_Descriptors_GraphicsProfileLevelIndication(int8u ID)
-{
- switch (ID)
- {
- case 1 : return "Simple2D@L1";
- case 2 : return "Simple2D+Text@L1";
- case 3 : return "Simple2D+Text@L2";
- case 4 : return "Core2D@L1";
- case 5 : return "Core2D@L2";
- case 6 : return "Advanced2D@L1";
- case 7 : return "Advanced2D@L2";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Mpeg4_Descriptors::File_Mpeg4_Descriptors()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("MPEG-4 Descriptor");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Mpeg4_Desc;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- IsRawStream=true;
-
- //In
- KindOfStream=Stream_Max;
- PosOfStream=(size_t)-1;
- Parser_DoNotFreeIt=false;
- SLConfig_DoNotFreeIt=false;
-
- //Out
- Parser=NULL;
- ES_ID=0x0000;
- SLConfig=NULL;
-
- //Temp
- ObjectTypeId=0x00;
-}
-
-//---------------------------------------------------------------------------
-File_Mpeg4_Descriptors::~File_Mpeg4_Descriptors()
-{
- if (!Parser_DoNotFreeIt)
- delete Parser;// Parser=NULL;
- if (!SLConfig_DoNotFreeIt)
- delete SLConfig;// SLConfig=NULL;
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_Descriptors::Header_Parse()
-{
- //Parsing
- size_t Size=0;
- int8u type, Size_ToAdd;
- Get_B1(type, "type");
- if (type==0)
- {
- Header_Fill_Code(0x00, "Padding");
- Header_Fill_Size(1);
- return;
- }
- do
- {
- Get_B1(Size_ToAdd, "size");
- Size=(Size<<7) | (Size_ToAdd&0x7F);
- }
- while (Size_ToAdd&0x80);
-
- //Filling
- Header_Fill_Code(type, Ztring().From_CC1(type));
- if (Element_Offset+Size>=Element_Size)
- Size=(size_t)(Element_Size-Element_Offset); //Found one file with too big size but content is OK, cutting the block
- Header_Fill_Size(Element_Offset+Size);
-}
-
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_Descriptors::Data_Parse()
-{
- //Preparing
- Status[IsAccepted]=true;
-
- #define ELEMENT_CASE(_NAME, _DETAIL) \
- case 0x##_NAME : Element_Name(_DETAIL); Descriptor_##_NAME(); break;
-
- //Parsing
- switch (Element_Code)
- {
- ELEMENT_CASE(00, "Forbidden");
- ELEMENT_CASE(01, "ObjectDescrTag");
- ELEMENT_CASE(02, "InitialObjectDescrTag");
- ELEMENT_CASE(03, "ES_DescrTag");
- ELEMENT_CASE(04, "DecoderConfigDescrTag");
- ELEMENT_CASE(05, "DecSpecificInfoTag");
- ELEMENT_CASE(06, "SLConfigDescrTag");
- ELEMENT_CASE(07, "ContentIdentDescrTag");
- ELEMENT_CASE(08, "SupplContentIdentDescrTag");
- ELEMENT_CASE(09, "IPI_DescrPointerTag");
- ELEMENT_CASE(0A, "IPMP_DescrPointerTag");
- ELEMENT_CASE(0B, "IPMP_DescrTag");
- ELEMENT_CASE(0C, "QoS_DescrTag");
- ELEMENT_CASE(0D, "RegistrationDescrTag");
- ELEMENT_CASE(0E, "ES_ID_IncTag");
- ELEMENT_CASE(0F, "ES_ID_RefTag");
- ELEMENT_CASE(10, "MP4_IOD_Tag");
- ELEMENT_CASE(11, "MP4_OD_Tag");
- ELEMENT_CASE(12, "IPL_DescrPointerRefTag");
- ELEMENT_CASE(13, "ExtendedProfileLevelDescrTag");
- ELEMENT_CASE(14, "profileLevelIndicationIndexDescrTag");
- ELEMENT_CASE(40, "ContentClassificationDescrTag");
- ELEMENT_CASE(41, "KeyWordDescrTag");
- ELEMENT_CASE(42, "RatingDescrTag");
- ELEMENT_CASE(43, "LanguageDescrTag");
- ELEMENT_CASE(44, "ShortTextualDescrTag");
- ELEMENT_CASE(45, "ExpandedTextualDescrTag");
- ELEMENT_CASE(46, "ContentCreatorNameDescrTag");
- ELEMENT_CASE(47, "ContentCreationDateDescrTag");
- ELEMENT_CASE(48, "OCICreatorNameDescrTag");
- ELEMENT_CASE(49, "OCICreationDateDescrTag");
- ELEMENT_CASE(4A, "SmpteCameraPositionDescrTag");
- ELEMENT_CASE(4B, "SegmentDescrTag");
- ELEMENT_CASE(4C, "MediaTimeDescrTag");
- ELEMENT_CASE(60, "IPMP_ToolsListDescrTag");
- ELEMENT_CASE(61, "IPMP_ToolTag");
- ELEMENT_CASE(62, "FLEXmuxTimingDescrTag");
- ELEMENT_CASE(63, "FLEXmuxCodeTableDescrTag");
- ELEMENT_CASE(64, "ExtSLConfigDescrTag");
- ELEMENT_CASE(65, "FLEXmuxBufferSizeDescrTag");
- ELEMENT_CASE(66, "FLEXmuxIdentDescrTag");
- ELEMENT_CASE(67, "DependencyPointerTag");
- ELEMENT_CASE(68, "DependencyMarkerTag");
- ELEMENT_CASE(69, "FLEXmuxChannelDescrTag");
- default: if (Element_Code>=0xC0)
- Element_Name("user private");
- else
- Element_Name("unknown");
- Skip_XX(Element_Size, "Data");
- break;
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_Descriptors::Descriptor_01()
-{
- //Parsing
- bool URL_Flag;
- BS_Begin();
- Skip_S2(10, "ObjectDescriptorID");
- Get_SB ( URL_Flag, "URL_Flag");
- Skip_SB( "includeInlineProfileLevelFlag");
- Skip_S1( 4, "reserved");
- BS_End();
- if (URL_Flag)
- {
- int8u URLlength;
- Get_B1 (URLlength, "URLlength");
- Skip_UTF8(URLlength, "URLstring");
- }
- if (Element_Code==0x02 || Element_Code==0x10)
- {
- Info_B1(ODProfileLevel, "ODProfileLevelIndication"); Param_Info1(Mpeg4_Descriptors_ODProfileLevelIndication(ODProfileLevel));
- Info_B1(SceneProfileLevel, "sceneProfileLevelIndication"); Param_Info1(Mpeg4_Descriptors_SceneProfileLevelIndication(SceneProfileLevel));
- Info_B1(AudioProfileLevel, "audioProfileLevelIndication"); Param_Info1(Mpeg4_Descriptors_AudioProfileLevelIndication(AudioProfileLevel));
- Info_B1(VisualProfileLevel, "visualProfileLevelIndication"); Param_Info1(Mpeg4v_Profile_Level(VisualProfileLevel));
- Info_B1(GraphicsProfileLevel, "graphicsProfileLevelIndication"); Param_Info1(Mpeg4_Descriptors_GraphicsProfileLevelIndication(GraphicsProfileLevel));
- }
-
- FILLING_BEGIN();
- Element_ThisIsAList();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_Descriptors::Descriptor_03()
-{
- //Parsing
- bool streamDependenceFlag, URL_Flag, OCRstreamFlag;
- Get_B2 (ES_ID, "ES_ID");
- BS_Begin();
- Get_SB ( streamDependenceFlag, "streamDependenceFlag");
- Get_SB ( URL_Flag, "URL_Flag");
- Get_SB ( OCRstreamFlag, "OCRstreamFlag");
- Skip_S1(5, "streamPriority");
- BS_End();
- if (streamDependenceFlag)
- Skip_B2( "dependsOn_ES_ID");
- if (URL_Flag)
- {
- int8u URLlength;
- Get_B1 (URLlength, "URLlength");
- Skip_UTF8(URLlength, "URLstring");
- }
- if (OCRstreamFlag)
- Skip_B2( "OCR_ES_Id");
-
- FILLING_BEGIN();
- Element_ThisIsAList();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_Descriptors::Descriptor_04()
-{
- //Parsing
- int32u bufferSizeDB, MaxBitrate, AvgBitrate;
- int8u streamType;
- Get_B1 (ObjectTypeId, "objectTypeIndication"); Param_Info1(Mpeg4_Descriptors_ObjectTypeIndication(ObjectTypeId));
- BS_Begin();
- Get_S1 (6, streamType, "streamType"); Param_Info1(Mpeg4_Descriptors_StreamType(streamType));
- Skip_SB( "upStream");
- Skip_SB( "reserved");
- BS_End();
- Get_B3 (bufferSizeDB, "bufferSizeDB");
- Get_B4 (MaxBitrate, "maxBitrate");
- Get_B4 (AvgBitrate, "avgBitrate");
-
- FILLING_BEGIN();
- if (KindOfStream==Stream_Max)
- switch (ObjectTypeId)
- {
- case 0x20 :
- case 0x21 :
- case 0x60 :
- case 0x61 :
- case 0x62 :
- case 0x63 :
- case 0x64 :
- case 0x65 :
- case 0x6A :
- case 0x6C :
- case 0x6D :
- case 0x6E :
- case 0xA3 :
- case 0xA4 :
- KindOfStream=Stream_Video; break;
- case 0x40 :
- case 0x66 :
- case 0x67 :
- case 0x68 :
- case 0x69 :
- case 0x6B :
- case 0xA0 :
- case 0xA1 :
- case 0xA5 :
- case 0xA6 :
- case 0xA9 :
- case 0xAA :
- case 0xAB :
- case 0xAC :
- case 0xD1 :
- case 0xD3 :
- case 0xD4 :
- case 0xE1 :
- KindOfStream=Stream_Audio; break;
- case 0x08 :
- KindOfStream=Stream_Text; break;
- default: ;
- }
- if (Count_Get(KindOfStream)==0)
- Stream_Prepare(KindOfStream);
- switch (ObjectTypeId)
- {
- case 0x01 : Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), "System", Error, false, true); break;
- case 0x02 : Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), "System Core", Error, false, true); break;
- //case 0x03 Interaction Stream
- //case 0x05 AFX
- //case 0x06 Font Data
- //case 0x07 Synthesized Texture Stream
- case 0x08 : Fill(Stream_Text , StreamPos_Last, Text_Format, "Streaming Text", Error, false, true); break;
- case 0x20 : Fill(Stream_Video , StreamPos_Last, Video_Format, "MPEG-4 Visual", Error, false, true); break;
- case 0x21 : Fill(Stream_Video , StreamPos_Last, Video_Format, "AVC", Error, false, true); break;
- //case 0x22 Parameter Sets for AVC
- case 0x40 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "AAC", Error, false, true); break; //MPEG-4 AAC
- case 0x60 : Fill(Stream_Video , StreamPos_Last, Video_Format, "MPEG Video", Error, false, true); Fill(Stream_Video, StreamPos_Last, Video_Format_Profile, "Simple" , Error, false, true); Fill(Stream_Video, StreamPos_Last, Video_Format_Version, "Version 2", Error, false, true); break; //MPEG-2V Simple
- case 0x61 : Fill(Stream_Video , StreamPos_Last, Video_Format, "MPEG Video", Error, false, true); Fill(Stream_Video, StreamPos_Last, Video_Format_Profile, "Main" , Error, false, true); Fill(Stream_Video, StreamPos_Last, Video_Format_Version, "Version 2", Error, false, true); break; //MPEG-2V Main
- case 0x62 : Fill(Stream_Video , StreamPos_Last, Video_Format, "MPEG Video", Error, false, true); Fill(Stream_Video, StreamPos_Last, Video_Format_Profile, "SNR" , Error, false, true); Fill(Stream_Video, StreamPos_Last, Video_Format_Version, "Version 2", Error, false, true); break; //MPEG-2V SNR
- case 0x63 : Fill(Stream_Video , StreamPos_Last, Video_Format, "MPEG Video", Error, false, true); Fill(Stream_Video, StreamPos_Last, Video_Format_Profile, "Spatial", Error, false, true); Fill(Stream_Video, StreamPos_Last, Video_Format_Version, "Version 2", Error, false, true); break; //MPEG-2V Spatial
- case 0x64 : Fill(Stream_Video , StreamPos_Last, Video_Format, "MPEG Video", Error, false, true); Fill(Stream_Video, StreamPos_Last, Video_Format_Profile, "High" , Error, false, true); Fill(Stream_Video, StreamPos_Last, Video_Format_Version, "Version 2", Error, false, true); break; //MPEG-2V High
- case 0x65 : Fill(Stream_Video , StreamPos_Last, Video_Format, "MPEG Video", Error, false, true); Fill(Stream_Video, StreamPos_Last, Video_Format_Profile, "4:2:2" , Error, false, true); Fill(Stream_Video, StreamPos_Last, Video_Format_Version, "Version 2", Error, false, true); break; //MPEG-2V 4:2:2
- case 0x66 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "AAC", Error, false, true); Fill(Stream_Audio, StreamPos_Last, Audio_Format_Profile, "Main", Error, false, true); break; //MPEG-2 AAC Main
- case 0x67 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "AAC", Error, false, true); Fill(Stream_Audio, StreamPos_Last, Audio_Format_Profile, "LC", Error, false, true); break; //MPEG-2 AAC LC
- case 0x68 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "AAC", Error, false, true); Fill(Stream_Audio, StreamPos_Last, Audio_Format_Profile, "SSR", Error, false, true); break; //MPEG-2 AAC SSR
- case 0x69 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "MPEG Audio", Error, false, true); Fill(Stream_Audio, StreamPos_Last, Audio_Format_Version, "Version 2", Error, false, true); Fill(Stream_Audio, StreamPos_Last, Audio_Format_Profile, "Layer 3", Error, false, true); break;
- case 0x6A : Fill(Stream_Video , StreamPos_Last, Video_Format, "MPEG Video", Error, false, true); Fill(Stream_Video, StreamPos_Last, Video_Format_Version, "Version 1", Error, false, true); break;
- case 0x6B : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "MPEG Audio", Error, false, true); Fill(Stream_Audio, StreamPos_Last, Audio_Format_Version, "Version 1", Error, false, true); break;
- case 0x6C : Fill(Stream_Video , StreamPos_Last, Video_Format, "JPEG", Error, false, true); break;
- case 0x6D : Fill(Stream_Video , StreamPos_Last, Video_Format, "PNG", Error, false, true); break;
- case 0x6E : Fill(Stream_Video , StreamPos_Last, Video_Format, "MPEG Video", Error, false, true); break;
- case 0xA0 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "EVRC", Error, false, true); Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, 8000, 10, true); Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, 1, 10, true); break;
- case 0xA1 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "SMV", Error, false, true); Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, 8000, 10, true); Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, 1, 10, true); break;
- case 0xA2 : Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), "3GPP2", Error, false, true); break;
- case 0xA3 : Fill(Stream_Video , StreamPos_Last, Video_Format, "VC-1", Error, false, true); break;
- case 0xA4 : Fill(Stream_Video , StreamPos_Last, Video_Format, "Dirac", Error, false, true); break;
- case 0xA5 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "AC-3", Error, false, true); break;
- case 0xA6 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "E-AC-3", Error, false, true); break;
- case 0xA9 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "DTS", Error, false, true); break;
- case 0xAA : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "DTS", Error, false, true); Fill(Stream_Audio, StreamPos_Last, Audio_Format_Profile, "HRA", Error, false, true); break; // DTS-HD High Resolution
- case 0xAB : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "DTS", Error, false, true); Fill(Stream_Audio, StreamPos_Last, Audio_Format_Profile, "MA", Error, false, true); break; // DTS-HD Master Audio
- case 0xAC : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "DTS", Error, false, true); Fill(Stream_Audio, StreamPos_Last, Audio_Format_Profile, "Express", Error, false, true); break; // DTS Express a.k.a. LBR
- case 0xD1 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "EVRC", Error, false, true); Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, 8000, 10, true); Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, 1, 10, true); break;
- case 0xD3 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "AC-3", Error, false, true); break;
- case 0xD4 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "DTS", Error, false, true); break;
- case 0xDD : Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), "Ogg", Error, false, true); break;
- case 0xDE : Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), "Ogg", Error, false, true); break;
- case 0xE1 : Fill(Stream_Audio , StreamPos_Last, Audio_Format, "QCELP", Error, false, true); Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, 8000, 10, true); Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, 1, 10, true); break;
- default: ;
- }
- switch (ObjectTypeId)
- {
- case 0x01 : Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), "System", Error, false, true); break;
- case 0x02 : Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), "System Core", Error, false, true); break;
- case 0x20 : Fill(Stream_Video , StreamPos_Last, Video_Codec, "MPEG-4V", Error, false, true); break;
- case 0x21 : Fill(Stream_Video , StreamPos_Last, Video_Codec, "H264", Error, false, true); break;
- case 0x40 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "AAC", Error, false, true); break; //MPEG-4 AAC
- case 0x60 : Fill(Stream_Video , StreamPos_Last, Video_Codec, "MPEG-2V", Error, false, true); break; //MPEG-2V Simple
- case 0x61 : Fill(Stream_Video , StreamPos_Last, Video_Codec, "MPEG-2V", Error, false, true); break; //MPEG-2V Main
- case 0x62 : Fill(Stream_Video , StreamPos_Last, Video_Codec, "MPEG-2V", Error, false, true); break; //MPEG-2V SNR
- case 0x63 : Fill(Stream_Video , StreamPos_Last, Video_Codec, "MPEG-2V", Error, false, true); break; //MPEG-2V Spatial
- case 0x64 : Fill(Stream_Video , StreamPos_Last, Video_Codec, "MPEG-2V", Error, false, true); break; //MPEG-2V High
- case 0x65 : Fill(Stream_Video , StreamPos_Last, Video_Codec, "MPEG-2V", Error, false, true); break; //MPEG-2V 4:2:2
- case 0x66 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "AAC", Error, false, true); break; //MPEG-2 AAC Main
- case 0x67 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "AAC", Error, false, true); break; //MPEG-2 AAC LC
- case 0x68 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "AAC", Error, false, true); break; //MPEG-2 AAC SSR
- case 0x69 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "MPEG-2A L3", Error, false, true); break;
- case 0x6A : Fill(Stream_Video , StreamPos_Last, Video_Codec, "MPEG-1V", Error, false, true); break;
- case 0x6B : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "MPEG-1A", Error, false, true); break;
- case 0x6C : Fill(Stream_Video , StreamPos_Last, Video_Codec, "JPEG", Error, false, true); break;
- case 0x6D : Fill(Stream_Video , StreamPos_Last, Video_Codec, "PNG", Error, false, true); break;
- case 0x6E : Fill(Stream_Video , StreamPos_Last, Video_Codec, "MPEG-4V", Error, false, true); break;
- case 0xA0 : Fill(Stream_Video , StreamPos_Last, Video_Codec, "EVRC", Error, false, true); break;
- case 0xA1 : Fill(Stream_Video , StreamPos_Last, Video_Codec, "SMV", Error, false, true); break;
- case 0xA2 : Fill(Stream_Video , StreamPos_Last, Video_Codec, "MPEG-4V", Error, false, true); break;
- case 0xA3 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "VC-1", Error, false, true); break;
- case 0xA4 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "Dirac", Error, false, true); break;
- case 0xA5 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "AC3", Error, false, true); break;
- case 0xA6 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "AC3+", Error, false, true); break;
- case 0xA9 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "DTS", Error, false, true); break;
- case 0xAA :
- case 0xAB : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "DTS-HD", Error, false, true); break;
- case 0xAC : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "DTS Express", Error, false, true); break;
- case 0xD1 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "EVRC", Error, false, true); break;
- case 0xD3 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "AC3", Error, false, true); break;
- case 0xD4 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "DTS", Error, false, true); break;
- case 0xDD : Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), "Ogg", Error, false, true); break;
- case 0xDE : Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), "Ogg", Error, false, true); break;
- case 0xE1 : Fill(Stream_Audio , StreamPos_Last, Audio_Codec, "QCELP", Error, false, true); break;
- default: ;
- }
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_CodecID), ObjectTypeId, 16, true);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec_CC), ObjectTypeId, 16, true);
-
- //Bitrate mode
- if (AvgBitrate>0
- && !(bufferSizeDB==AvgBitrate && bufferSizeDB==MaxBitrate && bufferSizeDB==0x1000)) //Some buggy data were found
- {
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_BitRate_Nominal), AvgBitrate);
- if (MaxBitrate<=AvgBitrate*1.005)
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_BitRate_Mode), "CBR");
- else
- {
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_BitRate_Mode), "VBR");
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_BitRate_Maximum), MaxBitrate);
- }
- }
-
- //Creating parser
- delete Parser; Parser=NULL;
- switch (ObjectTypeId)
- {
- case 0x01 : switch (streamType)
- {
- case 0x01 : Parser=new File_Mpeg4_Descriptors; break;
- default : ;
- }
- break;
- case 0x20 : //MPEG-4 Visual
- #if defined(MEDIAINFO_MPEG4V_YES)
- Parser=new File_Mpeg4v;
- ((File_Mpeg4v*)Parser)->Frame_Count_Valid=1;
- ((File_Mpeg4v*)Parser)->FrameIsAlwaysComplete=true;
- #endif
- break;
- case 0x21 : //AVC
- #if defined(MEDIAINFO_AVC_YES)
- Parser=new File_Avc;
- ((File_Avc*)Parser)->MustParse_SPS_PPS=true;
- ((File_Avc*)Parser)->MustSynchronize=false;
- ((File_Avc*)Parser)->SizedBlocks=true;
- #endif
- break;
- case 0x40 : //MPEG-4 AAC
- case 0x66 :
- case 0x67 :
- case 0x68 : //MPEG-2 AAC
- #if defined(MEDIAINFO_AAC_YES)
- Parser=new File_Aac;
- ((File_Aac*)Parser)->Mode=File_Aac::Mode_AudioSpecificConfig;
- ((File_Aac*)Parser)->FrameIsAlwaysComplete=true;
- #endif
- break;
- case 0x60 :
- case 0x61 :
- case 0x62 :
- case 0x63 :
- case 0x64 :
- case 0x65 :
- case 0x6A : //MPEG Video
- #if defined(MEDIAINFO_MPEGV_YES)
- Parser=new File_Mpegv;
- ((File_Mpegv*)Parser)->FrameIsAlwaysComplete=true;
- #endif
- break;
- case 0x69 :
- case 0x6B : //MPEG Audio
- #if defined(MEDIAINFO_MPEGA_YES)
- Parser=new File_Mpega;
- #endif
- break;
- case 0x6C : //JPEG
- #if defined(MEDIAINFO_JPEG_YES)
- Parser=new File_Jpeg;
- ((File_Jpeg*)Parser)->StreamKind=Stream_Video;
- #endif
- break;
- case 0x6D : //PNG
- #if defined(MEDIAINFO_PNG_YES)
- Parser=new File_Png;
- #endif
- break;
- case 0xA3 : //VC-1
- #if defined(MEDIAINFO_VC1_YES)
- Parser=new File_Vc1;
- #endif
- break;
- case 0xA4 : //Dirac
- #if defined(MEDIAINFO_DIRAC_YES)
- Parser=new File_Dirac;
- #endif
- break;
- case 0xA5 : //AC-3
- case 0xA6 : //E-AC-3
- case 0xD3 : //AC-3
- #if defined(MEDIAINFO_AC3_YES)
- Parser=new File_Ac3;
- #endif
- break;
- case 0xA9 : //DTS
- case 0xAA : //DTS HRA
- case 0xAB : //DTS MA
- case 0xAC : //DTS Express
- case 0xD4 : //DTS
- #if defined(MEDIAINFO_DTS_YES)
- Parser=new File_Dts;
- #endif
- break;
- case 0xDD :
- case 0xDE : //OGG
- #if defined(MEDIAINFO_OGG_YES)
- Parser=new File_Ogg;
- Parser->MustSynchronize=false;
- ((File_Ogg*)Parser)->SizedBlocks=true;
- #endif
- break;
- default: ;
- }
-
- Element_Code=(int64u)-1;
- Open_Buffer_Init(Parser);
-
- Element_ThisIsAList();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_Descriptors::Descriptor_05()
-{
- if (ObjectTypeId==0x00 && Parser==NULL) //If no ObjectTypeId detected
- {
- switch (KindOfStream)
- {
- case Stream_Video :
- #if defined(MEDIAINFO_MPEG4V_YES)
- delete Parser; Parser=new File_Mpeg4v;
- ((File_Mpeg4v*)Parser)->FrameIsAlwaysComplete=true;
- #endif
- break;
- case Stream_Audio :
- #if defined(MEDIAINFO_AAC_YES)
- delete Parser; Parser=new File_Aac;
- ((File_Aac*)Parser)->Mode=File_Aac::Mode_AudioSpecificConfig;
- #endif
- break;
- default: ;
- }
-
- Element_Code=(int64u)-1;
- Open_Buffer_Init(Parser);
- }
-
- if (Parser==NULL)
- {
- Skip_XX(Element_Size, "Unknown");
- return;
- }
-
- //Parser configuration before the parsing
- switch (ObjectTypeId)
- {
- case 0x60 :
- case 0x61 :
- case 0x62 :
- case 0x63 :
- case 0x64 :
- case 0x65 :
- case 0x6A : //MPEG Video
- #if defined(MEDIAINFO_MPEGV_YES)
- ((File_Mpegv*)Parser)->TimeCodeIsNotTrustable=true;
- #endif
- break;
- default: ;
- }
-
- //Parsing
- Open_Buffer_Continue(Parser);
-
- //Demux
- #if MEDIAINFO_DEMUX
- if (ObjectTypeId!=0x21 || !Config->Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10_Get()) //0x21 is AVC
- switch (Config->Demux_InitData_Get())
- {
- case 0 : //In demux event
- Demux_Level=2; //Container
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_Header);
- break;
- case 1 : //In field
- {
- std::string Data_Raw((const char*)(Buffer+Buffer_Offset), (size_t)Element_Size);
- std::string Data_Base64(Base64::encode(Data_Raw));
- Parser->Fill(KindOfStream, PosOfStream, "Demux_InitBytes", Data_Base64);
- if (PosOfStream<(*Parser->Stream_More)[KindOfStream].size())
- (*Parser->Stream_More)[KindOfStream][PosOfStream](Ztring().From_Local("Demux_InitBytes"), Info_Options)=__T("N NT");
- }
- break;
- default : ;
- }
- #endif //MEDIAINFO_DEMUX
-
- //Parser configuration after the parsing
- switch (ObjectTypeId)
- {
- case 0x60 :
- case 0x61 :
- case 0x62 :
- case 0x63 :
- case 0x64 :
- case 0x65 :
- case 0x6A : //MPEG Video
- #if defined(MEDIAINFO_MPEGV_YES)
- ((File_Mpegv*)Parser)->TimeCodeIsNotTrustable=false;
- #endif
- break;
- default: ;
- }
-
- //Positionning
- Element_Offset=Element_Size;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_Descriptors::Descriptor_06()
-{
- delete SLConfig; SLConfig=new slconfig;
-
- //Parsing
- int8u predefined;
- Get_B1 (predefined, "predefined"); Param_Info1(Mpeg4_Descriptors_Predefined(predefined));
- switch (predefined)
- {
- case 0x00 :
- {
- BS_Begin();
- Get_SB (SLConfig->useAccessUnitStartFlag, "useAccessUnitStartFlag");
- Get_SB (SLConfig->useAccessUnitEndFlag, "useAccessUnitEndFlag");
- Get_SB (SLConfig->useRandomAccessPointFlag, "useRandomAccessPointFlag");
- Get_SB (SLConfig->hasRandomAccessUnitsOnlyFlag, "hasRandomAccessUnitsOnlyFlag");
- Get_SB (SLConfig->usePaddingFlag, "usePaddingFlag");
- Get_SB (SLConfig->useTimeStampsFlag, "useTimeStampsFlag");
- Get_SB (SLConfig->useIdleFlag, "useIdleFlag");
- Get_SB (SLConfig->durationFlag, "durationFlag");
- BS_End();
- Get_B4 (SLConfig->timeStampResolution, "timeStampResolution");
- Get_B4( SLConfig->OCRResolution, "OCRResolution");
- Get_B1 (SLConfig->timeStampLength, "timeStampLength");
- Get_B1 (SLConfig->OCRLength, "OCRLength");
- Get_B1 (SLConfig->AU_Length, "AU_Length");
- Get_B1 (SLConfig->instantBitrateLength, "instantBitrateLength");
- BS_Begin();
- Get_S1 (4, SLConfig->degradationPriorityLength, "degradationPriorityLength");
- Get_S1 (5, SLConfig->AU_seqNumLength, "AU_seqNumLength");
- Get_S1 (5, SLConfig->packetSeqNumLength, "packetSeqNumLength");
- Skip_S1(2, "reserved");
- BS_End();
- }
- break;
- case 0x01 :
- SLConfig->useAccessUnitStartFlag =false;
- SLConfig->useAccessUnitEndFlag =false;
- SLConfig->useRandomAccessPointFlag =false;
- SLConfig->hasRandomAccessUnitsOnlyFlag =false;
- SLConfig->usePaddingFlag =false;
- SLConfig->useTimeStampsFlag =false;
- SLConfig->useIdleFlag =false;
- SLConfig->durationFlag =false; //-
- SLConfig->timeStampResolution =1000;
- SLConfig->OCRResolution =0; //-
- SLConfig->timeStampLength =32;
- SLConfig->OCRLength =0; //-
- SLConfig->AU_Length =0;
- SLConfig->instantBitrateLength =0; //-
- SLConfig->degradationPriorityLength =0;
- SLConfig->AU_seqNumLength =0;
- SLConfig->packetSeqNumLength =0;
- break;
- case 0x02 :
- SLConfig->useAccessUnitStartFlag =false;
- SLConfig->useAccessUnitEndFlag =false;
- SLConfig->useRandomAccessPointFlag =false;
- SLConfig->hasRandomAccessUnitsOnlyFlag =false;
- SLConfig->usePaddingFlag =false;
- SLConfig->useTimeStampsFlag =true;
- SLConfig->useIdleFlag =false;
- SLConfig->durationFlag =false;
- SLConfig->timeStampResolution =0; //-
- SLConfig->OCRResolution =0; //-
- SLConfig->timeStampLength =0;
- SLConfig->OCRLength =0;
- SLConfig->AU_Length =0;
- SLConfig->instantBitrateLength =0;
- SLConfig->degradationPriorityLength =0;
- SLConfig->AU_seqNumLength =0;
- SLConfig->packetSeqNumLength =0;
- break;
- default :
- SLConfig->useAccessUnitStartFlag =false;
- SLConfig->useAccessUnitEndFlag =false;
- SLConfig->useRandomAccessPointFlag =false;
- SLConfig->hasRandomAccessUnitsOnlyFlag =false;
- SLConfig->usePaddingFlag =false;
- SLConfig->useTimeStampsFlag =false;
- SLConfig->useIdleFlag =false;
- SLConfig->durationFlag =false;
- SLConfig->timeStampResolution =0;
- SLConfig->OCRResolution =0;
- SLConfig->timeStampLength =0;
- SLConfig->AU_Length =0;
- SLConfig->instantBitrateLength =0;
- SLConfig->degradationPriorityLength =0;
- SLConfig->AU_seqNumLength =0;
- SLConfig->packetSeqNumLength =0;
- }
- if (SLConfig->durationFlag)
- {
- Get_B4 (SLConfig->timeScale, "timeScale");
- Get_B2 (SLConfig->accessUnitDuration, "accessUnitDuration");
- Get_B2 (SLConfig->compositionUnitDuration, "compositionUnitDuration");
- }
- else
- {
- SLConfig->timeScale =0; //-
- SLConfig->accessUnitDuration =0; //-
- SLConfig->compositionUnitDuration =0; //-
- }
- if (!SLConfig->useTimeStampsFlag)
- {
- BS_Begin();
- Get_S8 (SLConfig->timeStampLength, SLConfig->startDecodingTimeStamp, "startDecodingTimeStamp");
- Get_S8 (SLConfig->timeStampLength, SLConfig->startCompositionTimeStamp, "startCompositionTimeStamp");
- BS_End();
- }
- else
- {
- SLConfig->startDecodingTimeStamp =0; //-
- SLConfig->startCompositionTimeStamp =0; //-
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_Descriptors::Descriptor_09()
-{
- //Parsing
- Skip_B2( "IPI_ES_Id");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_Descriptors::Descriptor_0E()
-{
- //Parsing
- Skip_B4( "Track_ID"); //ID of the track to use
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_Descriptors::Descriptor_0F()
-{
- //Parsing
- Skip_B2( "ref_index"); //track ref. index of the track to use
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_Descriptors::Descriptor_10()
-{
- Descriptor_02();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_Descriptors::Descriptor_11()
-{
- Descriptor_01();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_MPEG4_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_Descriptors.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_Descriptors.h
deleted file mode 100644
index cb9deb81b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_Descriptors.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about MPEG-4 files, Descriptors
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Mpeg4_DescriptorsH
-#define MediaInfo_Mpeg4_DescriptorsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Mpeg4_Descriptors
-//***************************************************************************
-
-class File_Mpeg4_Descriptors : public File__Analyze
-{
-public :
- //In
- stream_t KindOfStream;
- size_t PosOfStream;
- bool Parser_DoNotFreeIt; //If you want to keep the Parser
- bool SLConfig_DoNotFreeIt; //If you want to keep the SLConfig
-
- //Out
- File__Analyze* Parser;
- int16u ES_ID;
-
- struct slconfig
- {
- bool useAccessUnitStartFlag;
- bool useAccessUnitEndFlag;
- bool useRandomAccessPointFlag;
- bool hasRandomAccessUnitsOnlyFlag;
- bool usePaddingFlag;
- bool useTimeStampsFlag;
- bool useIdleFlag;
- bool durationFlag;
- int32u timeStampResolution;
- int32u OCRResolution;
- int8u timeStampLength;
- int8u OCRLength;
- int8u AU_Length;
- int8u instantBitrateLength;
- int8u degradationPriorityLength;
- int8u AU_seqNumLength;
- int8u packetSeqNumLength;
-
- int32u timeScale;
- int16u accessUnitDuration;
- int16u compositionUnitDuration;
-
- int64u startDecodingTimeStamp;
- int64u startCompositionTimeStamp;
- };
-
- slconfig* SLConfig;
-
-public :
- //Constructor/Destructor
- File_Mpeg4_Descriptors();
- ~File_Mpeg4_Descriptors();
-
-private :
- //Buffer
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Descriptor_00() {Skip_XX(Element_Size, "Data");};
- void Descriptor_01();
- void Descriptor_02() {Descriptor_01();}
- void Descriptor_03();
- void Descriptor_04();
- void Descriptor_05();
- void Descriptor_06();
- void Descriptor_07() {Skip_XX(Element_Size, "Data");};
- void Descriptor_08() {Skip_XX(Element_Size, "Data");};
- void Descriptor_09();
- void Descriptor_0A() {Skip_XX(Element_Size, "Data");};
- void Descriptor_0B() {Skip_XX(Element_Size, "Data");};
- void Descriptor_0C() {Skip_XX(Element_Size, "Data");};
- void Descriptor_0D() {Skip_XX(Element_Size, "Data");};
- void Descriptor_0E();
- void Descriptor_0F();
- void Descriptor_10();
- void Descriptor_11();
- void Descriptor_12() {Skip_XX(Element_Size, "Data");};
- void Descriptor_13() {Skip_XX(Element_Size, "Data");};
- void Descriptor_14() {Skip_XX(Element_Size, "Data");};
- void Descriptor_40() {Skip_XX(Element_Size, "Data");};
- void Descriptor_41() {Skip_XX(Element_Size, "Data");};
- void Descriptor_42() {Skip_XX(Element_Size, "Data");};
- void Descriptor_43() {Skip_XX(Element_Size, "Data");};
- void Descriptor_44() {Skip_XX(Element_Size, "Data");};
- void Descriptor_45() {Skip_XX(Element_Size, "Data");};
- void Descriptor_46() {Skip_XX(Element_Size, "Data");};
- void Descriptor_47() {Skip_XX(Element_Size, "Data");};
- void Descriptor_48() {Skip_XX(Element_Size, "Data");};
- void Descriptor_49() {Skip_XX(Element_Size, "Data");};
- void Descriptor_4A() {Skip_XX(Element_Size, "Data");};
- void Descriptor_4B() {Skip_XX(Element_Size, "Data");};
- void Descriptor_4C() {Skip_XX(Element_Size, "Data");};
- void Descriptor_60() {Skip_XX(Element_Size, "Data");};
- void Descriptor_61() {Skip_XX(Element_Size, "Data");};
- void Descriptor_62() {Skip_XX(Element_Size, "Data");};
- void Descriptor_63() {Skip_XX(Element_Size, "Data");};
- void Descriptor_64() {Skip_XX(Element_Size, "Data");};
- void Descriptor_65() {Skip_XX(Element_Size, "Data");};
- void Descriptor_66() {Skip_XX(Element_Size, "Data");};
- void Descriptor_67() {Skip_XX(Element_Size, "Data");};
- void Descriptor_68() {Skip_XX(Element_Size, "Data");};
- void Descriptor_69() {Skip_XX(Element_Size, "Data");};
-
- //Temp
- int8u ObjectTypeId;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_Elements.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_Elements.cpp
deleted file mode 100644
index dad3df2c8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_Elements.cpp
+++ /dev/null
@@ -1,7246 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_MPEG4_YES
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Mpeg4.h"
-#if defined(MEDIAINFO_DVDIF_YES)
- #include "MediaInfo/Multiple/File_DvDif.h"
-#endif
-#if defined(MEDIAINFO_MXF_YES)
- #include "MediaInfo/Multiple/File_Mxf.h"
-#endif
-#if defined(MEDIAINFO_AIC_YES)
- #include "MediaInfo/Video/File_Aic.h"
-#endif
-#if defined(MEDIAINFO_AVC_YES)
- #include "MediaInfo/Video/File_Avc.h"
-#endif
-#if defined(MEDIAINFO_FFV1_YES)
- #include "MediaInfo/Video/File_Ffv1.h"
-#endif
-#if defined(MEDIAINFO_H263_YES)
- #include "MediaInfo/Video/File_H263.h"
-#endif
-#if defined(MEDIAINFO_HEVC_YES)
- #include "MediaInfo/Video/File_Hevc.h"
-#endif
-#if defined(MEDIAINFO_MPEGV_YES)
- #include "MediaInfo/Video/File_Mpegv.h"
-#endif
-#if defined(MEDIAINFO_PRORES_YES)
- #include "MediaInfo/Video/File_ProRes.h"
-#endif
-#if defined(MEDIAINFO_VC1_YES)
- #include "MediaInfo/Video/File_Vc1.h"
-#endif
-#if defined(MEDIAINFO_VC3_YES)
- #include "MediaInfo/Video/File_Vc3.h"
-#endif
-#if defined(MEDIAINFO_AAC_YES)
- #include "MediaInfo/Audio/File_Aac.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_SMPTEST0337_YES)
- #include "MediaInfo/Audio/File_ChannelGrouping.h"
-#endif
-#if defined(MEDIAINFO_AMR_YES)
- #include "MediaInfo/Audio/File_Amr.h"
-#endif
-#if defined(MEDIAINFO_ADPCM_YES)
- #include "MediaInfo/Audio/File_Adpcm.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if defined(MEDIAINFO_PCM_YES)
- #include "MediaInfo/Audio/File_Pcm.h"
-#endif
-#if defined(MEDIAINFO_SMPTEST0337_YES)
- #include "MediaInfo/Audio/File_SmpteSt0337.h"
-#endif
-#if defined(MEDIAINFO_CDP_YES)
- #include "MediaInfo/Text/File_Cdp.h"
-#endif
-#if defined(MEDIAINFO_CDP_YES)
- #include "MediaInfo/Text/File_Cdp.h"
-#endif
-#if defined(MEDIAINFO_PROPERTYLIST_YES)
- #include "MediaInfo/Tag/File_PropertyList.h"
-#endif
-#if defined(MEDIAINFO_TIMEDTEXT_YES)
- #include "MediaInfo/Text/File_TimedText.h"
-#endif
-#if defined(MEDIAINFO_TTML_YES)
- #include "MediaInfo/Text/File_Ttml.h"
-#endif
-#if defined(MEDIAINFO_JPEG_YES)
- #include "MediaInfo/Image/File_Jpeg.h"
-#endif
-#include "MediaInfo/Multiple/File_Mpeg4_TimeCode.h"
-#include "ZenLib/FileName.h"
-#include "base64.h"
-#include <cmath>
-#include <zlib.h>
-#include <algorithm>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_Meta_Kind(int32u Kind)
-{
- switch (Kind)
- {
- case 0x00 : return "Binary";
- case 0x01 : return "UTF8";
- case 0x02 : return "UTF16";
- case 0x03 : return "Mac String";
- case 0x0E : return "Jpeg";
- case 0x15 : return "Signed Integer"; //the size of the integer is derived from the container size
- case 0x16 : return "Float 32";
- case 0x17 : return "Float 64";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_TypeModifierName(int32u TypeModifierName)
-{
- switch (TypeModifierName)
- {
- case 0x01 : return "Matrix";
- case 0x02 : return "Clip";
- case 0x03 : return "Volume";
- case 0x04 : return "Audio balance";
- case 0x05 : return "Graphic mode";
- case 0x06 : return "Matrix object";
- case 0x07 : return "Graphics mode object";
- case 0x76696465 : return "Image type";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_sample_depends_on[]=
-{
- "",
- "this sample does depend on others (not an I picture)",
- "this sample does not depend on others (I picture)",
- "reserved",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_sample_is_depended_on[]=
-{
- "",
- "other samples depend on this one (not disposable)",
- "no other sample depends on this one (disposable)",
- "reserved",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_sample_has_redundancy[]=
-{
- "",
- "there is redundant coding in this sample",
- "there is no redundant coding in this sample",
- "reserved",
-};
-
-//---------------------------------------------------------------------------
-Ztring Mpeg4_Vendor(int32u Vendor)
-{
- switch (Vendor)
- {
- case 0x46464D50 : return __T("FFMpeg");
- case 0x4D4F544F : return __T("Motorola");
- case 0x50484C50 : return __T("Philips");
- case 0x6170706C : return __T("Apple");
- case 0x6E6F6B69 : return __T("Nokia");
- case 0x6D6F746F : return __T("Motorola");
- default : return Ztring().From_CC4(Vendor);
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_chan(int16u Ordering)
-{
- //Source: http://developer.apple.com/library/mac/#documentation/MusicAudio/Reference/CACoreAudioReference/CoreAudioTypes/CompositePage.html
- //Arbitrary decision (0° = Front):
- //Front = 0°-80°
- //Side = 80°-120°
- //Rear = 120°-180°
- switch(Ordering)
- {
- case 100 : return "Front: C";
- case 101 : return "Front: L R";
- case 102 : return "Front: L R (Headphones)"; //With headphones
- case 103 : return "Front: L R (Matrix)"; //With matrix
- case 104 : return "Front: C S";
- case 105 : return "Front: X Y";
- case 106 : return "Front: L R (Binaural)";
- case 107 : return "Front: W X Y Z";
- case 108 : return "Front: L R, Side: L R";
- case 109 : return "Front: L C R, Rear: L R";
- case 110 : return "Front: L C R, Rear: L C R";
- case 111 : return "Front: L C R, Side: L R, Rear: L C R";
- case 112 : return "Front: L R, TopFront: L R, Rear: L R, TopRear: L R";
- case 113 : return "Front: L C R";
- case 114 : return "Front: L C R";
- case 115 : return "Front: L C R, Rear: C";
- case 116 : return "Front: L C R, Rear: C";
- case 117 : return "Front: L C R, Side: L R";
- case 118 : return "Front: L C R, Side: L R";
- case 119 : return "Front: L C R, Side: L R";
- case 120 : return "Front: L C R, Side: L R";
- case 121 : return "Front: L C R, Side: L R, LFE";
- case 122 : return "Front: L C R, Side: L R, LFE";
- case 123 : return "Front: L C R, Side: L R, LFE";
- case 124 : return "Front: L C R, Side: L R, LFE";
- case 125 : return "Front: L C R, Side: L C R";
- case 126 : return "Front: L Lc C Rc R, Side: L R";
- case 127 : return "Front: L Lc Rc R, Side: L R, LFE";
- case 128 : return "Front: L C R, Side: L R, Rear: L R, LFE";
- case 129 : return "Front: L C R, Side: L R, Rear: L R, LFE";
- case 130 : return "Front: L C R, Side: L R, LF, Front: L R (Matrix)";
- case 131 : return "Front: L R, Rear: C";
- case 132 : return "Front: L R, Side: L R";
- case 133 : return "Front: L R, LFE";
- case 134 : return "Front: L R, Rear: C, LFE";
- case 135 : return "Front: L C R, Side: L R, LFE";
- case 136 : return "Front: L C R, LFE";
- case 137 : return "Front: L C R, Rear: C, LFE";
- case 138 : return "Front: L R, Rear: L R, LFE";
- case 139 : return "Front: L C R, Rear: L R, LFE";
- case 140 : return "Front: L C R, Side: L R, Rear: L R";
- case 141 : return "Front: L C R, Side: L R, Rear: C";
- case 142 : return "Front: L C R, Side: L R, Rear: C, LFE";
- case 143 : return "Front: L C R, Side: L R, Rear: L R";
- case 144 : return "Front: L C R, Side: L R, Rear: L C R";
- case 145 : return "Front: Lw L C R Rw, TopFront: L C R, Side: L R, Rear: L C Cd R, LFE: L R"; //d=direct, all must be confirmed
- case 146 : return "Front: Lw L Lc C Rc R Rw, TopFront: L C R, Side: L R, Rear: L C Cd R, LFE: L R, HI, VI, Haptic"; //d=direct, all must be confirmed
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_chan_Layout(int16u Ordering)
-{
- //Source: http://developer.apple.com/library/mac/#documentation/MusicAudio/Reference/CACoreAudioReference/CoreAudioTypes/CompositePage.html
- // L - left
- // R - right
- // C - center
- // Ls - left surround
- // Rs - right surround
- // Cs - center surround
- // Rls - rear left surround
- // Rrs - rear right surround
- // Lw - left wide
- // Rw - right wide
- // Lsd - left surround direct
- // Rsd - right surround direct
- // Lc - left center
- // Rc - right center
- // Ts - top surround
- // Vhl - vertical height left
- // Vhc - vertical height center
- // Vhr - vertical height right
- // Lt - left matrix total. for matrix encoded stereo.
- // Rt - right matrix total. for matrix encoded stereo.
- switch(Ordering)
- {
- case 100 : return "C";
- case 101 : return "L R";
- case 102 : return "L R"; //With headphones
- case 103 : return "Lt Rt"; //L R with matrix
- case 104 : return "M S";
- case 105 : return "X Y";
- case 106 : return "L R";
- case 107 : return "W X Y Z";
- case 108 : return "L R Ls Rs";
- case 109 : return "L R Lrs Rrs C";
- case 110 : return "L R Lrs Rrs C Cs";
- case 111 : return "L R Lrs Rrs C Crs, Ls, Rs";
- case 112 : return "L R Lrs Rrs Vhl Vhr, Vhlrs, Vhrrs";
- case 113 : return "L R C";
- case 114 : return "C L R";
- case 115 : return "L R C Cs";
- case 116 : return "C L R Cs";
- case 117 : return "L R C Ls Rs";
- case 118 : return "L R Ls Rs C";
- case 119 : return "L C R Ls Rs";
- case 120 : return "C L R Ls Rs";
- case 121 : return "L R C LFE Ls Rs";
- case 122 : return "L R Ls Rs C LFE";
- case 123 : return "L C R Ls Rs LFE";
- case 124 : return "C L R Ls Rs LFE";
- case 125 : return "L R C LFE Ls Rs Cs";
- case 126 : return "L R C LFE Ls Rs Lc Rc";
- case 127 : return "C Lc Rc L R Ls Rs LFE";
- case 128 : return "L R C LFE Ls R Rls Rrs";
- case 129 : return "L R Ls Rs C LFE Lc Rc";
- case 130 : return "L R C LFE Ls Rs Lt Rt";
- case 131 : return "L R Cs";
- case 132 : return "L R Ls Rs";
- case 133 : return "L R LFE";
- case 134 : return "L R LFE Cs";
- case 135 : return "L R LFE Ls Rs";
- case 136 : return "L R C LFE";
- case 137 : return "L R C LFE Cs";
- case 138 : return "L R Ls Rs LFE";
- case 139 : return "L R Ls Rs C Cs";
- case 140 : return "L R Ls Rs C Rls Rrs";
- case 141 : return "C L R Ls Rs Cs ";
- case 142 : return "C L R Ls Rs Cs LFE";
- case 143 : return "C L R Ls Rs Rls Rrs";
- case 144 : return "C L R Ls Rs Rls Rrs Cs";
- case 145 : return "L R C Vhc Lsd Rsd Ls Rs Vhl Vhr Lw Rw Csd Cs LFE1 LFE2";
- case 146 : return "L R C Vhc Lsd Rsd Ls Rs Vhl Vhr Lw Rw Csd Cs LFE1 LFE2 Lc Rc HI VI Haptic";
- case 147 : return "";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-std::string Mpeg4_chan_ChannelDescription (int64u ChannelLabels)
-{
- std::string Text;
- if ((ChannelLabels&0x000E)!=0x0000)
- Text+="Front:";
- if (ChannelLabels&0x0002)
- Text+=" L";
- if (ChannelLabels&0x0008)
- Text+=" C";
- if (ChannelLabels&0x0004)
- Text+=" R";
-
- if ((ChannelLabels&0x0C00)!=0x0000)
- {
- if (!Text.empty())
- Text+=", ";
- Text+="Side:";
- }
- if (ChannelLabels&0x0400)
- Text+=" L";
- if (ChannelLabels&0x0800)
- Text+=" R";
-
- if ((ChannelLabels&0x0260)!=0x0000)
- {
- if (!Text.empty())
- Text+=", ";
- Text+="Back:";
- }
- if (ChannelLabels&0x0020)
- Text+=" L";
- if (ChannelLabels&0x0200)
- Text+=" C";
- if (ChannelLabels&0x0040)
- Text+=" R";
-
- if ((ChannelLabels&0x0010)!=0x0000)
- {
- if (!Text.empty())
- Text+=", ";
- Text+="LFE";
- }
-
- if (ChannelLabels&0x000000C000000000LL)
- {
- if (!Text.empty())
- Text+=", ";
- Text+="Front:";
- }
- if (ChannelLabels&0x0000004000000000LL)
- Text+=" L";
- if (ChannelLabels&0x0000008000000000LL)
- Text+=" R";
- if (ChannelLabels&0x000000C000000000LL)
- Text+=" (Matrix)";
-
- return Text;
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_chan_ChannelDescription_Layout (int32u ChannelLabel)
-{
- switch(ChannelLabel)
- {
- case 1 : return "L";
- case 2 : return "R";
- case 3 : return "C";
- case 4 : return "LFE";
- case 5 : return "Ls";
- case 6 : return "Rs";
- case 7 : return "Lc";
- case 8 : return "Rc";
- case 9 : return "Cs";
- case 10 : return "Lsd";
- case 11 : return "Rsd";
- case 12 : return "Tcs";
- case 13 : return "Vhl";
- case 14 : return "Vhc";
- case 15 : return "Vhr";
- case 16 : return "Trs";
- case 17 : return "Trs";
- case 18 : return "Trs";
- case 33 : return "Lrs";
- case 34 : return "Rrs";
- case 35 : return "Lw";
- case 36 : return "Rw";
- case 37 : return "LFE2";
- case 38 : return "Lt";
- case 39 : return "Rt";
- case 200 : return "W";
- case 201 : return "X";
- case 202 : return "Y";
- case 203 : return "Z";
- case 204 : return "M";
- case 205 : return "S";
- case 206 : return "X";
- case 207 : return "Y";
- case 0x10000 : return "Discrete-0";
- case 0x10001 : return "Discrete-1";
- case 0x10002 : return "Discrete-2";
- case 0x10003 : return "Discrete-3";
- case 0x10004 : return "Discrete-4";
- case 0x10005 : return "Discrete-5";
- case 0x10006 : return "Discrete-6";
- case 0x10007 : return "Discrete-7";
- case 0x10008 : return "Discrete-8";
- case 0x10009 : return "Discrete-9";
- case 0x1000A : return "Discrete-10";
- case 0x1000B : return "Discrete-11";
- case 0x1000C : return "Discrete-12";
- case 0x1000D : return "Discrete-13";
- case 0x1000E : return "Discrete-14";
- case 0x1000F : return "Discrete-15";
- default : return "?";
- }
-}
-
-//---------------------------------------------------------------------------
-std::string Mpeg4_chan_ChannelBitmap (int32u ChannelBitmap)
-{
- std::string Text;
- if ((ChannelBitmap&0x0007)!=0x0000)
- Text+="Front:";
- if (ChannelBitmap&0x0001)
- Text+=" L";
- if (ChannelBitmap&0x0004)
- Text+=" C";
- if (ChannelBitmap&0x0002)
- Text+=" R";
-
- if ((ChannelBitmap&0x0600)!=0x0000)
- Text+=", Side:";
- if (ChannelBitmap&0x0200)
- Text+=" L";
- if (ChannelBitmap&0x0400)
- Text+=" R";
-
- if ((ChannelBitmap&0x0130)!=0x0000)
- Text+=", Back:";
- if (ChannelBitmap&0x0010)
- Text+=" L";
- if (ChannelBitmap&0x0100)
- Text+=" C";
- if (ChannelBitmap&0x0020)
- Text+=" R";
-
- if ((ChannelBitmap&0x0008)!=0x0000)
- Text+=", LFE";
-
- return Text;
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_chan_ChannelBitmap_Layout (int32u ChannelBitmap)
-{
- switch(ChannelBitmap)
- {
- case 0 : return "L"; // Left
- case 1 : return "R"; // Right
- case 2 : return "C"; // Center
- case 3 : return "LFE"; // LFEScreen
- case 4 : return "Ls"; // LeftSurround / Back Left
- case 5 : return "Rs"; // RightSurround / Back Right
- case 6 : return "?"; // LeftCenter
- case 7 : return "?"; // RightCenter
- case 8 : return "Cs"; // CenterSurround / Back Center
- case 9 : return "Lsd"; // LeftSurroundDirect / Side Left
- case 10 : return "Rsd"; // RightSurroundDirect / Side Right
- case 11 : return "?"; // TopCenterSurround
- case 12 : return "?"; // VerticalHeightLeft / Top Front Left
- case 13 : return "?"; // VerticalHeightCenter / Top Front Center
- case 14 : return "?"; // VerticalHeightRight / Top Front Right"
- case 15 : return "?"; // TopBackLeft
- case 16 : return "?"; // TopBackCenter
- case 17 : return "?"; // TopBackRight
- default : return "?";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_jp2h_METH(int8u METH)
-{
- switch (METH)
- {
- case 0x01 : return "Enumerated colourspace";
- case 0x02 : return "Restricted ICC profile";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_jp2h_EnumCS(int32u EnumCS)
-{
- switch (EnumCS)
- {
- case 0x10 : return "RGB"; //sRGB
- case 0x11 : return "Y";
- case 0x12 : return "YUV"; //sYUV
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpegv_colour_primaries(int8u colour_primaries);
-const char* Mpegv_transfer_characteristics(int8u transfer_characteristics);
-const char* Mpegv_matrix_coefficients(int8u matrix_coefficients);
-
-//---------------------------------------------------------------------------
-// DTS
-#if defined(MEDIAINFO_DTS_YES)
- extern const char* DTS_ChannelPositions[16];
- extern const char* DTS_ChannelPositions2[16];
- extern std::string DTS_HD_SpeakerActivityMask (int16u SpeakerActivityMask);
- extern std::string DTS_HD_SpeakerActivityMask2 (int16u SpeakerActivityMask);
-#endif //defined(MEDIAINFO_DTS_YES)
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-namespace Elements
-{
- const int64u bloc=0x626C6F63;
- const int64u cdat=0x63646174;
- const int64u cdt2=0x63647432;
- const int64u free=0x66726565;
- const int64u ftyp=0x66747970;
- const int64u ftyp_qt=0x71742020;
- const int64u ftyp_dash=0x64617368;
- const int64u ftyp_isom=0x69736F6D;
- const int64u ftyp_caqv=0x63617176;
- const int64u idat=0x69646174;
- const int64u idsc=0x69647363;
- const int64u jp2c=0x6A703263;
- const int64u jp2h=0x6A703268;
- const int64u jp2h_ihdr=0x69686472;
- const int64u jp2h_colr=0x636F6C72;
- const int64u mdat=0x6D646174;
- const int64u mfra=0x6D667261;
- const int64u mfra_mfro=0x6D66726F;
- const int64u mfra_tfra=0x74667261;
- const int64u moof=0x6D6F6F66;
- const int64u moof_mfhd=0x6D666864;
- const int64u moof_traf=0x74726166;
- const int64u moof_traf_sdtp=0x73647470;
- const int64u moof_traf_tfhd=0x74666864;
- const int64u moof_traf_trun=0x7472756E;
- const int64u moov=0x6D6F6F76;
- const int64u moov_ainf=0x61696E66;
- const int64u moov_cmov=0x636D6F76;
- const int64u moov_cmov_cmvd=0x636D7664;
- const int64u moov_cmov_dcom=0x64636F6D;
- const int64u moov_cmov_dcom_zlib=0x7A6C6962;
- const int64u moov_ctab=0x63746162;
- const int64u moov_iods=0x696F6473;
- const int64u moov_meta=0x6D657461;
- const int64u moov_meta______=0x2D2D2D2D;
- const int64u moov_meta___day=0xA9646179;
- const int64u moov_meta__disk=0x6469736B;
- const int64u moov_meta__trkn=0x74726B6E;
- const int64u moov_meta__trng=0x74726E67;
- const int64u moov_meta__covr=0x636F7672;
- const int64u moov_meta__gnre=0x676E7265;
- const int64u moov_meta_bxml=0x62786D6C;
- const int64u moov_meta_hdlr=0x68646C72;
- const int64u moov_meta_hdlr_mdir=0x6D646972;
- const int64u moov_meta_hdlr_mdta=0x6D647461;
- const int64u moov_meta_hdlr_mp7b=0x6D703762;
- const int64u moov_meta_hdlr_mp7t=0x6D703774;
- const int64u moov_meta_keys=0x6B657973;
- const int64u moov_meta_keys_mdta=0x6D647461;
- const int64u moov_meta_ilst=0x696C7374;
- const int64u moov_meta_ilst_xxxx_data=0x64617461;
- const int64u moov_meta_ilst_xxxx_mean=0x6D65616E;
- const int64u moov_meta_ilst_xxxx_name=0x6E616D65;
- const int64u moov_meta_xml=0x786D6C20;
- const int64u moov_mvex=0x6D766578;
- const int64u moov_mvex_mehd=0x6D656864;
- const int64u moov_mvex_trex=0x74726578;
- const int64u moov_mvhd=0x6D766864;
- const int64u moov_trak=0x7472616B;
- const int64u moov_trak_edts=0x65647473;
- const int64u moov_trak_edts_elst=0x656C7374;
- const int64u moov_trak_load=0x6C6F6164;
- const int64u moov_trak_mdia=0x6D646961;
- const int64u moov_trak_mdia_hdlr=0x68646C72;
- const int64u moov_trak_mdia_hdlr_alis=0x616C6973;
- const int64u moov_trak_mdia_hdlr_clcp=0x636C6370;
- const int64u moov_trak_mdia_hdlr_data=0x64617461;
- const int64u moov_trak_mdia_hdlr_hint=0x68696E74;
- const int64u moov_trak_mdia_hdlr_MPEG=0x4D504547;
- const int64u moov_trak_mdia_hdlr_ocsm=0x6F63736D;
- const int64u moov_trak_mdia_hdlr_odsm=0x6F64736D;
- const int64u moov_trak_mdia_hdlr_sbtl=0x7362746C;
- const int64u moov_trak_mdia_hdlr_sdsm=0x7364736D;
- const int64u moov_trak_mdia_hdlr_soun=0x736F756E;
- const int64u moov_trak_mdia_hdlr_subt=0x73756274;
- const int64u moov_trak_mdia_hdlr_subp=0x73756270;
- const int64u moov_trak_mdia_hdlr_text=0x74657874;
- const int64u moov_trak_mdia_hdlr_twen=0x7477656E;
- const int64u moov_trak_mdia_hdlr_tmcd=0x746D6364;
- const int64u moov_trak_mdia_hdlr_vide=0x76696465;
- const int64u moov_trak_mdia_imap=0x696D6170;
- const int64u moov_trak_mdia_imap_sean=0x7365616E;
- const int64u moov_trak_mdia_imap_sean___in=0x0000696E;
- const int64u moov_trak_mdia_imap_sean___in___ty=0x00007479;
- const int64u moov_trak_mdia_imap_sean___in_dtst=0x64747374;
- const int64u moov_trak_mdia_imap_sean___in_obid=0x6F626964;
- const int64u moov_trak_mdia_mdhd=0x6D646864;
- const int64u moov_trak_mdia_minf=0x6D696E66;
- const int64u moov_trak_mdia_minf_code=0x636F6465;
- const int64u moov_trak_mdia_minf_code_sean=0x7365616E;
- const int64u moov_trak_mdia_minf_code_sean_RU_A=0x52552A41;
- const int64u moov_trak_mdia_minf_dinf=0x64696E66;
- const int64u moov_trak_mdia_minf_dinf_url_=0x75726C20;
- const int64u moov_trak_mdia_minf_dinf_urn_=0x75726E20;
- const int64u moov_trak_mdia_minf_dinf_dref=0x64726566;
- const int64u moov_trak_mdia_minf_dinf_dref_alis=0x616C6973;
- const int64u moov_trak_mdia_minf_dinf_dref_rsrc=0x72737263;
- const int64u moov_trak_mdia_minf_dinf_dref_url_=0x75726C20;
- const int64u moov_trak_mdia_minf_dinf_derf_urn_=0x75726E20;
- const int64u moov_trak_mdia_minf_gmhd=0x676D6864;
- const int64u moov_trak_mdia_minf_gmhd_gmin=0x676D696E;
- const int64u moov_trak_mdia_minf_gmhd_tmcd=0x746D6364;
- const int64u moov_trak_mdia_minf_gmhd_tmcd_tcmi=0x74636D69;
- const int64u moov_trak_mdia_minf_gmhd_tcmi=0x74636D69;
- const int64u moov_trak_mdia_minf_hint=0x68696E74;
- const int64u moov_trak_mdia_minf_hdlr=0x68646C72;
- const int64u moov_trak_mdia_minf_hmhd=0x686D6864;
- const int64u moov_trak_mdia_minf_nmhd=0x6E6D6864;
- const int64u moov_trak_mdia_minf_smhd=0x736D6864;
- const int64u moov_trak_mdia_minf_stbl=0x7374626C;
- const int64u moov_trak_mdia_minf_stbl_co64=0x636F3634;
- const int64u moov_trak_mdia_minf_stbl_cslg=0x63736C67;
- const int64u moov_trak_mdia_minf_stbl_ctts=0x63747473;
- const int64u moov_trak_mdia_minf_stbl_sdtp=0x73647470;
- const int64u moov_trak_mdia_minf_stbl_stco=0x7374636F;
- const int64u moov_trak_mdia_minf_stbl_stdp=0x73746470;
- const int64u moov_trak_mdia_minf_stbl_stps=0x73747073;
- const int64u moov_trak_mdia_minf_stbl_stsc=0x73747363;
- const int64u moov_trak_mdia_minf_stbl_stsd=0x73747364;
- const int64u moov_trak_mdia_minf_stbl_stsd_alac=0x616C6163;
- const int64u moov_trak_mdia_minf_stbl_stsd_mp4a=0x6D703461;
- const int64u moov_trak_mdia_minf_stbl_stsd_mp4s=0x6D703473;
- const int64u moov_trak_mdia_minf_stbl_stsd_mp4v=0x6D703476;
- const int64u moov_trak_mdia_minf_stbl_stsd_stpp=0x73747070;
- const int64u moov_trak_mdia_minf_stbl_stsd_stpp_btrt=0x62747274;
- const int64u moov_trak_mdia_minf_stbl_stsd_text=0x74657874;
- const int64u moov_trak_mdia_minf_stbl_stsd_tmcd=0x746D6364;
- const int64u moov_trak_mdia_minf_stbl_stsd_tmcd_name=0x6E616D65;
- const int64u moov_trak_mdia_minf_stbl_stsd_tx3g=0x74783367;
- const int64u moov_trak_mdia_minf_stbl_stsd_tx3g_ftab=0x66746162;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_alac=0x616C6163;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_ACLR=0x41434C52;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_APRG=0x41505247;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_ARES=0x41524553;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_avcC=0x61766343;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_bitr=0x62697472;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_btrt=0x62747274;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_clap=0x636C6170;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_chan=0x6368616E;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_colr=0x636F6C72;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_colr_clcn=0x636C636E;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_colr_nclc=0x6E636C63;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_colr_prof=0x70726F66;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_d263=0x64323633;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_dac3=0x64616333;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_damr=0x64616D72;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_dec3=0x64656333;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_ddts=0x64647473;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_dvc1=0x64766331;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_esds=0x65736473;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_fiel=0x6669656C;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_glbl=0x676C626C;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_hvcC=0x68766343;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_idfm=0x6964666D;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_idfm_atom=0x61746F6D;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_idfm_qtat=0x71746174;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_idfm_fxat=0x66786174;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_idfm_priv=0x70726976;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_idfm_subs=0x73756273;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_idfm_cspc=0x63737063;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_jp2h=0x6A703268;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_jp2h_colr=0x636F6C72;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_jp2h_ihdr=0x69686472;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_pasp=0x70617370;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_sinf=0x73696E66;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_frma=0x66726D61;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_imif=0x696D6966;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_schi=0x73636869;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_schm=0x7363686D;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_wave=0x77617665;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_wave_acbf=0x61636266;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_wave_enda=0x656E6461;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_wave_frma=0x66726D61;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_wave_samr=0x73616D72;
- const int64u moov_trak_mdia_minf_stbl_stsd_xxxx_wave_srcq=0x73726371;
- const int64u moov_trak_mdia_minf_stbl_stsh=0x73747368;
- const int64u moov_trak_mdia_minf_stbl_stss=0x73747373;
- const int64u moov_trak_mdia_minf_stbl_stsz=0x7374737A;
- const int64u moov_trak_mdia_minf_stbl_stts=0x73747473;
- const int64u moov_trak_mdia_minf_stbl_stz2=0x73747A32;
- const int64u moov_trak_mdia_minf_sthd=0x73746864;
- const int64u moov_trak_mdia_minf_vmhd=0x766D6864;
- const int64u moov_trak_meta=0x6D657461;
- const int64u moov_trak_meta______=0x2D2D2D2D;
- const int64u moov_trak_meta___day=0xA9646179;
- const int64u moov_trak_meta__disk=0x6469736B;
- const int64u moov_trak_meta__trkn=0x74726B6E;
- const int64u moov_trak_meta__trng=0x74726E67;
- const int64u moov_trak_meta__covr=0x636F7672;
- const int64u moov_trak_meta__gnre=0x676E7265;
- const int64u moov_trak_meta_bxml=0x62786D6C;
- const int64u moov_trak_meta_hdlr=0x68646C72;
- const int64u moov_trak_meta_hdlr_mdir=0x6D646972;
- const int64u moov_trak_meta_hdlr_mdta=0x6D647461;
- const int64u moov_trak_meta_hdlr_mp7b=0x6D703762;
- const int64u moov_trak_meta_hdlr_mp7t=0x6D703774;
- const int64u moov_trak_meta_keys=0x6B657973;
- const int64u moov_trak_meta_keys_mdta=0x6D647461;
- const int64u moov_trak_meta_ilst=0x696C7374;
- const int64u moov_trak_meta_ilst_xxxx_data=0x64617461;
- const int64u moov_trak_meta_ilst_xxxx_mean=0x6D65616E;
- const int64u moov_trak_meta_ilst_xxxx_name=0x6E616D65;
- const int64u moov_trak_meta_xml=0x786D6C20;
- const int64u moov_trak_tapt=0x74617074;
- const int64u moov_trak_tapt_clef=0x636C6566;
- const int64u moov_trak_tapt_enof=0x656E6F66;
- const int64u moov_trak_tapt_prof=0x70726F66;
- const int64u moov_trak_tkhd=0x746B6864;
- const int64u moov_trak_tref=0x74726566;
- const int64u moov_trak_tref_dpnd=0x64706E64;
- const int64u moov_trak_tref_chap=0x63686170;
- const int64u moov_trak_tref_clcp=0x636C6370;
- const int64u moov_trak_tref_fall=0x66616C6C;
- const int64u moov_trak_tref_folw=0x666F6C77;
- const int64u moov_trak_tref_forc=0x666F7263;
- const int64u moov_trak_tref_hint=0x68696E74;
- const int64u moov_trak_tref_ipir=0x69706972;
- const int64u moov_trak_tref_mpod=0x6D706F64;
- const int64u moov_trak_tref_scpt=0x73637074;
- const int64u moov_trak_tref_ssrc=0x73737263;
- const int64u moov_trak_tref_sync=0x73796E63;
- const int64u moov_trak_tref_tmcd=0x746D6364;
- const int64u moov_trak_udta=0x75647461;
- const int64u moov_udta=0x75647461;
- const int64u moov_udta_AllF=0x416C6C46;
- const int64u moov_udta_chpl=0x6368706C;
- const int64u moov_udta_clsf=0x636C7366;
- const int64u moov_udta_DcMD=0x44634D44;
- const int64u moov_udta_DcMD_Cmbo=0x436D626F;
- const int64u moov_udta_DcMD_DcME=0x44634D45;
- const int64u moov_udta_DcMD_DcME_Keyw=0x4B657977;
- const int64u moov_udta_DcMD_DcME_Mtmd=0x4D746D64;
- const int64u moov_udta_DcMD_DcME_Rate=0x52617465;
- const int64u moov_udta_FIEL=0x4649454C;
- const int64u moov_udta_FXTC=0x46585443;
- const int64u moov_udta_hinf=0x68696E66;
- const int64u moov_udta_hinv=0x68696E76;
- const int64u moov_udta_hnti=0x686E7469;
- const int64u moov_udta_hnti_rtp=0x72747020;
- const int64u moov_udta_ID32=0x49443332;
- const int64u moov_udta_kywd=0x6B797764;
- const int64u moov_udta_loci=0x6C6F6369;
- const int64u moov_udta_LOOP=0x4C4F4F50;
- const int64u moov_udta_MCPS=0x4D435053;
- const int64u moov_udta_meta=0x6D657461;
- const int64u moov_udta_meta_hdlr=0x68646C72;
- const int64u moov_udta_meta_ilst=0x696C7374;
- const int64u moov_udta_meta_ilst_xxxx_data=0x64617461;
- const int64u moov_udta_meta_ilst_xxxx_mean=0x6D65616E;
- const int64u moov_udta_meta_ilst_xxxx_name=0x6E616D65;
- const int64u moov_udta_ndrm=0x6E64726D;
- const int64u moov_udta_nsav=0x6E736176;
- const int64u moov_udta_ptv =0x70747620;
- const int64u moov_udta_rtng=0x72746E67;
- const int64u moov_udta_Sel0=0x53656C30;
- const int64u moov_udta_tags=0x74616773;
- const int64u moov_udta_tags_meta=0x6D657461;
- const int64u moov_udta_tags_tseg=0x74736567;
- const int64u moov_udta_tags_tseg_tshd=0x74736864;
- const int64u moov_udta_WLOC=0x574C4F43;
- const int64u moov_udta_XMP_=0x584D505F;
- const int64u moov_udta_yrrc=0x79727263;
- const int64u pdin=0x7064696E;
- const int64u PICT=0x50494354;
- const int64u pckg=0x70636B67;
- const int64u pnot=0x706E6F74;
- const int64u RDAO=0x5244414F;
- const int64u RDAS=0x52444153;
- const int64u RDVO=0x5244564F;
- const int64u RDVS=0x52445653;
- const int64u RED1=0x52454431;
- const int64u REDA=0x52454441;
- const int64u REDV=0x52454456;
- const int64u REOB=0x52454F42;
- const int64u skip=0x736B6970;
- const int64u wide=0x77696465;
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg4_Description(int32u Description)
-{
- switch (Description)
- {
- case Elements::moov_trak_mdia_minf_stbl_stsd_xxxx_idfm_atom : return "Classic atom structure";
- case Elements::moov_trak_mdia_minf_stbl_stsd_xxxx_idfm_qtat : return "QT atom structure";
- case Elements::moov_trak_mdia_minf_stbl_stsd_xxxx_idfm_fxat : return "Effect";
- case Elements::moov_trak_mdia_minf_stbl_stsd_xxxx_idfm_priv : return "Private";
- case Elements::moov_trak_mdia_minf_stbl_stsd_xxxx_idfm_subs : return "Substitute if main codec not available";
- case Elements::moov_trak_mdia_minf_stbl_stsd_xxxx_idfm_cspc : return "Native pixel format";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::Data_Parse()
-{
- //mdat
- if (IsParsing_mdat)
- {
- mdat_xxxx();
- return;
- }
-
- //Padding
- if (!Element_Code && !Element_Size)
- return;
-
- //Parsing
- DATA_BEGIN
- ATOM(bloc)
- ATOM(cdat)
- ATOM(cdt2)
- LIST_SKIP(free)
- ATOM(ftyp)
- ATOM(idat)
- ATOM(idsc)
- ATOM(jp2c)
- LIST(jp2h)
- ATOM_BEGIN
- ATOM(jp2h_colr)
- ATOM(jp2h_ihdr)
- ATOM_END
- LIST(mdat)
- ATOM_DEFAULT_ALONE(mdat_xxxx)
- LIST(mfra)
- ATOM_BEGIN
- ATOM(mfra_mfro)
- ATOM(mfra_tfra)
- ATOM_END
- LIST(moof)
- ATOM_BEGIN
- ATOM(moof_mfhd)
- LIST(moof_traf)
- ATOM_BEGIN
- ATOM(moof_traf_sdtp)
- ATOM(moof_traf_tfhd)
- ATOM(moof_traf_trun)
- ATOM_END
- ATOM_END
- LIST(moov)
- ATOM_BEGIN
- ATOM(moov_ainf)
- LIST(moov_cmov)
- ATOM_BEGIN
- ATOM(moov_cmov_dcom)
- ATOM(moov_cmov_cmvd)
- ATOM_END
- ATOM(moov_ctab)
- ATOM(moov_iods)
- LIST(moov_meta)
- ATOM_BEGIN
- ATOM(moov_meta_bxml)
- LIST(moov_meta_keys)
- ATOM_BEGIN
- ATOM(moov_meta_keys_mdta)
- ATOM_END
- ATOM(moov_meta_hdlr)
- LIST(moov_meta_ilst)
- LIST_DEFAULT_ALONE_BEGIN (moov_meta_ilst_xxxx)
- ATOM_BEGIN
- ATOM (moov_meta_ilst_xxxx_data)
- ATOM (moov_meta_ilst_xxxx_mean)
- ATOM (moov_meta_ilst_xxxx_name)
- ATOM_END
- LIST_DEFAULT_ALONE_END
- ATOM(moov_meta_xml)
- ATOM_END
- LIST(moov_mvex)
- ATOM_BEGIN
- ATOM(moov_mvex_mehd)
- ATOM(moov_mvex_trex)
- ATOM_END
- ATOM(moov_mvhd)
- LIST(moov_trak)
- ATOM_BEGIN
- LIST(moov_trak_edts)
- ATOM_BEGIN
- ATOM(moov_trak_edts_elst)
- ATOM_END
- ATOM(moov_trak_load)
- LIST(moov_trak_mdia)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_hdlr)
- LIST(moov_trak_mdia_imap)
- ATOM_BEGIN
- LIST(moov_trak_mdia_imap_sean)
- ATOM_BEGIN
- LIST(moov_trak_mdia_imap_sean___in)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_imap_sean___in___ty)
- ATOM(moov_trak_mdia_imap_sean___in_dtst)
- ATOM(moov_trak_mdia_imap_sean___in_obid)
- ATOM_END
- ATOM_END
- ATOM_END
- ATOM(moov_trak_mdia_mdhd)
- LIST(moov_trak_mdia_minf)
- ATOM_BEGIN
- LIST(moov_trak_mdia_minf_code)
- ATOM_BEGIN
- LIST(moov_trak_mdia_minf_code_sean)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_minf_code_sean_RU_A)
- ATOM_END
- ATOM_END
- LIST(moov_trak_mdia_minf_dinf)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_minf_dinf_url_)
- ATOM(moov_trak_mdia_minf_dinf_urn_)
- LIST(moov_trak_mdia_minf_dinf_dref)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_minf_dinf_dref_alis)
- ATOM(moov_trak_mdia_minf_dinf_dref_rsrc)
- ATOM(moov_trak_mdia_minf_dinf_url_)
- ATOM(moov_trak_mdia_minf_dinf_urn_)
- ATOM_END
- ATOM_END
- ATOM(moov_trak_mdia_minf_hdlr)
- LIST(moov_trak_mdia_minf_gmhd)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_minf_gmhd_gmin)
- LIST(moov_trak_mdia_minf_gmhd_tmcd)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_minf_gmhd_tmcd_tcmi)
- ATOM_END
- ATOM(moov_trak_mdia_minf_gmhd_tcmi)
- ATOM_END
- ATOM(moov_trak_mdia_minf_hint)
- ATOM(moov_trak_mdia_minf_hmhd)
- ATOM(moov_trak_mdia_minf_nmhd)
- ATOM(moov_trak_mdia_minf_smhd)
- LIST(moov_trak_mdia_minf_stbl)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_minf_stbl_co64)
- ATOM(moov_trak_mdia_minf_stbl_cslg)
- ATOM(moov_trak_mdia_minf_stbl_ctts)
- ATOM(moov_trak_mdia_minf_stbl_sdtp)
- ATOM(moov_trak_mdia_minf_stbl_stco)
- ATOM(moov_trak_mdia_minf_stbl_stdp)
- ATOM(moov_trak_mdia_minf_stbl_stps)
- ATOM(moov_trak_mdia_minf_stbl_stsc)
- LIST(moov_trak_mdia_minf_stbl_stsd)
- ATOM_BEGIN
- LIST(moov_trak_mdia_minf_stbl_stsd_stpp)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_minf_stbl_stsd_stpp_btrt)
- ATOM_END
- ATOM(moov_trak_mdia_minf_stbl_stsd_text)
- LIST(moov_trak_mdia_minf_stbl_stsd_tmcd)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_minf_stbl_stsd_tmcd_name)
- ATOM_END
- LIST(moov_trak_mdia_minf_stbl_stsd_tx3g)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_minf_stbl_stsd_tx3g_ftab)
- ATOM_END
- LIST_DEFAULT(moov_trak_mdia_minf_stbl_stsd_xxxx)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_alac)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_ACLR)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_APRG)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_ARES)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_avcC)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_bitr)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_btrt)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_chan)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_clap)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_colr)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_d263)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_dac3)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_damr)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_dec3)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_ddts)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_dvc1)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_esds)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_fiel)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_glbl)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_hvcC)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_idfm)
- LIST(moov_trak_mdia_minf_stbl_stsd_xxxx_jp2h)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_jp2h_colr)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_jp2h_ihdr)
- ATOM_END
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_pasp)
- LIST(moov_trak_mdia_minf_stbl_stsd_xxxx_sinf)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_frma)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_imif)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_schi)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_schm)
- ATOM_END
- LIST(moov_trak_mdia_minf_stbl_stsd_xxxx_wave)
- ATOM_BEGIN
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_esds)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_wave_acbf)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_wave_enda)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_wave_frma)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_wave_samr)
- ATOM(moov_trak_mdia_minf_stbl_stsd_xxxx_wave_srcq)
- ATOM_DEFAULT(moov_trak_mdia_minf_stbl_stsd_xxxx_wave_xxxx)
- ATOM_END_DEFAULT
- ATOM_END
- ATOM_END_DEFAULT
- ATOM(moov_trak_mdia_minf_stbl_stsh)
- ATOM(moov_trak_mdia_minf_stbl_stss)
- ATOM(moov_trak_mdia_minf_stbl_stsz)
- ATOM(moov_trak_mdia_minf_stbl_stts)
- ATOM(moov_trak_mdia_minf_stbl_stz2)
- ATOM_END
- ATOM(moov_trak_mdia_minf_sthd)
- ATOM(moov_trak_mdia_minf_vmhd)
- ATOM_END
- ATOM_END
- /* Need additional tests
- LIST(moov_trak_meta)
- ATOM_BEGIN
- ATOM(moov_trak_meta_bxml)
- LIST(moov_trak_meta_keys)
- ATOM_BEGIN
- ATOM(moov_trak_meta_keys_mdta)
- ATOM_END
- ATOM(moov_trak_meta_hdlr)
- LIST(moov_trak_meta_ilst)
- ATOM_BEGIN
- LIST_DEFAULT (moov_trak_meta_ilst_xxxx)
- ATOM_BEGIN
- ATOM (moov_trak_meta_ilst_xxxx_data)
- ATOM (moov_trak_meta_ilst_xxxx_mean)
- ATOM (moov_trak_meta_ilst_xxxx_name)
- ATOM_END
- ATOM_END_DEFAULT
- ATOM(moov_trak_meta_xml)
- ATOM_END
- */
- LIST(moov_trak_tapt)
- ATOM_BEGIN
- ATOM(moov_trak_tapt_clef)
- ATOM(moov_trak_tapt_prof)
- ATOM(moov_trak_tapt_enof)
- ATOM_END
- ATOM(moov_trak_tkhd)
- LIST(moov_trak_tref)
- ATOM_BEGIN
- ATOM(moov_trak_tref_chap)
- ATOM(moov_trak_tref_clcp)
- ATOM(moov_trak_tref_dpnd)
- ATOM(moov_trak_tref_fall)
- ATOM(moov_trak_tref_folw)
- ATOM(moov_trak_tref_forc)
- ATOM(moov_trak_tref_ipir)
- ATOM(moov_trak_tref_hint)
- ATOM(moov_trak_tref_mpod)
- ATOM(moov_trak_tref_scpt)
- ATOM(moov_trak_tref_ssrc)
- ATOM(moov_trak_tref_sync)
- ATOM(moov_trak_tref_tmcd)
- ATOM_END
- LIST(moov_trak_udta)
- ATOM_DEFAULT_ALONE (moov_trak_udta_xxxx);
- ATOM_END
- LIST(moov_udta)
- ATOM_BEGIN
- ATOM(moov_udta_AllF)
- ATOM(moov_udta_chpl)
- ATOM(moov_udta_clsf)
- LIST(moov_udta_DcMD)
- ATOM_BEGIN
- ATOM(moov_udta_DcMD_Cmbo)
- LIST(moov_udta_DcMD_DcME)
- ATOM_BEGIN
- ATOM(moov_udta_DcMD_DcME_Keyw)
- ATOM(moov_udta_DcMD_DcME_Mtmd)
- ATOM(moov_udta_DcMD_DcME_Rate)
- ATOM_END
- ATOM_END
- ATOM(moov_udta_FIEL)
- ATOM(moov_udta_FXTC)
- ATOM(moov_udta_hinf)
- ATOM(moov_udta_hinv)
- LIST(moov_udta_hnti)
- ATOM_BEGIN
- ATOM(moov_udta_hnti_rtp)
- ATOM_END
- ATOM(moov_udta_ID32)
- ATOM(moov_udta_kywd)
- ATOM(moov_udta_loci)
- ATOM(moov_udta_LOOP)
- ATOM(moov_udta_MCPS)
- LIST(moov_udta_meta)
- ATOM_BEGIN
- ATOM(moov_udta_meta_hdlr)
- LIST(moov_udta_meta_ilst)
- LIST_DEFAULT_ALONE_BEGIN (moov_udta_meta_ilst_xxxx)
- ATOM_BEGIN
- ATOM (moov_udta_meta_ilst_xxxx_data);
- ATOM (moov_udta_meta_ilst_xxxx_mean);
- ATOM (moov_udta_meta_ilst_xxxx_name);
- ATOM_END
- LIST_DEFAULT_ALONE_END
- ATOM_END
- ATOM(moov_udta_ndrm)
- ATOM(moov_udta_nsav)
- ATOM(moov_udta_ptv )
- ATOM(moov_udta_rtng)
- ATOM(moov_udta_Sel0)
- LIST(moov_udta_tags)
- ATOM_BEGIN
- ATOM(moov_udta_tags_meta)
- LIST(moov_udta_tags_tseg)
- ATOM_BEGIN
- ATOM(moov_udta_tags_tseg_tshd);
- ATOM_END
- ATOM_END
- ATOM(moov_udta_WLOC)
- ATOM(moov_udta_XMP_)
- ATOM(moov_udta_yrrc)
- ATOM_DEFAULT (moov_udta_xxxx); //User data
- ATOM_END_DEFAULT
- ATOM_END
- ATOM(pdin)
- ATOM(PICT)
- ATOM(RDAO)
- ATOM(RDAS)
- ATOM(RDVO)
- ATOM(RDVS)
- ATOM(RED1)
- ATOM(REDA)
- ATOM(REDV)
- ATOM(REOB)
- ATOM(pckg)
- ATOM(pnot)
- LIST_SKIP(skip)
- LIST_SKIP(wide)
- DATA_END
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-#define NAME_VERSION_FLAG(ELEMENT_NAME) \
- Element_Name(ELEMENT_NAME); \
- int32u Flags; \
- int8u Version; \
- { \
- Get_B1(Version, "Version"); \
- Get_B3(Flags, "Flags"); \
- } \
-
-#define INTEGRITY_VERSION(_VERSION) \
- if (Version>_VERSION) \
- { \
- Skip_XX(Element_Size-Element_Offset, "Unknown data"); \
- return; \
- } \
-
-#define INTEGRITY(TOVALIDATE, ERRORTEXT) \
- if (!(TOVALIDATE)) \
- { \
- Trusted_IsNot(ERRORTEXT); \
- return; \
- } \
-
-#define INTEGRITY_SIZE1(ELEMENT_SIZE0) \
- INTEGRITY_VERSION(0); \
- if (Element_Size!=ELEMENT_SIZE0+4) \
- { \
- Trusted_IsNot("Size is wrong"); \
- return; \
- } \
-
-#define INTEGRITY_SIZE2(ELEMENT_SIZE0, ELEMENT_SIZE1) \
- INTEGRITY_VERSION(1); \
- if (Version==0 && Element_Size!=ELEMENT_SIZE0 \
- || Version==1 && Element_Size!=ELEMENT_SIZE1) \
- { \
- Trusted_IsNot("Size is wrong"); \
- return; \
- } \
-
-#define INTEGRITY_SIZE_ATLEAST1(ELEMENT_SIZE0) \
- INTEGRITY_VERSION(0); \
- if (Version==0 && Element_Size<ELEMENT_SIZE0) \
- { \
- Trusted_IsNot("Size is wrong"); \
- return; \
- } \
-
-#define INTEGRITY_SIZE_ATLEAST2(ELEMENT_SIZE0, ELEMENT_SIZE1) \
- INTEGRITY_VERSION(1); \
- if (Version==0 && Element_Size<ELEMENT_SIZE0 \
- || Version==1 && Element_Size<ELEMENT_SIZE1) \
- { \
- Trusted_IsNot("Size is wrong"); \
- return; \
- } \
-
-#define Get_B_DEPENDOFVERSION(_INFO, _NAME) \
- { \
- if (Version==0) \
- { \
- int32u Info; \
- Get_B4(Info, _NAME); \
- _INFO=Info; \
- } \
- else \
- Get_B8(_INFO, _NAME); \
- } \
-
-#define Get_DATE1904_DEPENDOFVERSION(_INFO, _NAME) \
- { \
- if (Version==0) \
- { \
- int32u Temp; \
- Get_B4(Temp, _NAME); \
- _INFO.Date_From_Seconds_1904(Temp); \
- } \
- else \
- { \
- int64u Temp; \
- Get_B8(Temp, _NAME); \
- _INFO.Date_From_Seconds_1904(Temp); \
- } \
- Param_Info1(_INFO); \
- } \
-
-//-------------------------------------------------------------------------
-void File_Mpeg4::bloc()
-{
- NAME_VERSION_FLAG("Base Location");
-
- //Parsing
- Skip_XX(256, "baseLocation");
- Skip_XX(256, "purchaseLocation");
- Skip_XX(512, "Reserved");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::cdat()
-{
- Element_Code=Element_Code==Elements::cdat?1:2;
-
- if (!Status[IsAccepted])
- {
- Accept("EIA-608");
- Fill(Stream_General, 0, General_Format, "Final Cut EIA-608", Unlimited, true, true);
- }
- #ifdef MEDIAINFO_EIA608_YES
- if (Streams[(int32u)Element_Code].Parsers.empty())
- {
- File_Eia608* Parser=new File_Eia608();
- Open_Buffer_Init(Parser);
- Streams[(int32u)Element_Code].Parsers.push_back(Parser);
- }
- #endif //MEDIAINFO_EIA608_YES
-
- Element_Name(Element_Code==1?"EIA-608-1":"EIA-608-2");
-
- #if MEDIAINFO_DEMUX
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- Streams[(int32u)Element_Code].Parsers[0]->FrameInfo.DTS=FrameInfo.DTS;
- Streams[(int32u)Element_Code].Parsers[0]->FrameInfo.DUR=FrameInfo.DUR/(Element_Size/2);
- #endif //MEDIAINFO_DEMUX
- while (Element_Offset+2<=Element_Size)
- {
- Open_Buffer_Continue(Streams[(int32u)Element_Code].Parsers[0], Buffer+Buffer_Offset+(size_t)Element_Offset, 2);
- Element_Offset+=2;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::free()
-{
- Element_Name("Free space");
-
- //Parsing
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- Param("Data", Ztring("(")+Ztring::ToZtring(Element_TotalSize_Get())+Ztring(" bytes)"));
- #endif //MEDIAINFO_TRACE
- #if MEDIAINFO_MD5
- if (MD5==NULL || (!IsSecondPass && FirstMdatPos<FirstMoovPos))
- #endif //MEDIAINFO_MD5
- GoTo(File_Offset+Buffer_Offset+Element_TotalSize_Get()); //Not using Skip_XX() because we want to skip data we don't have, and Skip_XX() does a test on size of buffer
- #if MEDIAINFO_MD5
- else
- Element_Offset=Element_TotalSize_Get();
- #endif //MEDIAINFO_MD5
-
- //ISM
- if (moof_traf_base_data_offset==(int64u)-1 && !data_offset_present)
- Stream->second.stco.push_back(File_Offset+Buffer_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::ftyp()
-{
- Element_Name("File Type");
-
- if (Count_Get(Stream_General))
- {
- Skip_XX(Element_Size, "Duplicate ftyp");
- return;
- }
-
- //Parsing
- std::vector<int32u> ftyps;
- Get_C4 (MajorBrand, "MajorBrand");
- ftyps.push_back(MajorBrand);
- Skip_B4( "MajorBrandVersion");
- while (Element_Offset<Element_Size)
- {
- int32u CompatibleBrand;
- Get_C4 (CompatibleBrand, "CompatibleBrand");
- ftyps.push_back(CompatibleBrand);
- }
-
- FILLING_BEGIN();
- Accept("MPEG-4");
-
- Fill(Stream_General, 0, General_Format, "MPEG-4");
- for (size_t Pos=0; Pos<ftyps.size(); Pos++)
- switch (ftyps[Pos])
- {
- case Elements::ftyp_dash : if (Config->File_Names.size()==1)TestContinuousFileNames(1, __T("m4s")); break;
- case Elements::ftyp_caqv : Fill(StreamKind_Last, StreamPos_Last, "Encoded_Application", "Casio Digital Camera"); break;
- default : ;
- }
- CodecID_Fill(Ztring().From_CC4(MajorBrand), Stream_General, 0, InfoCodecID_Format_Mpeg4);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::idat()
-{
- Element_Name("QTI");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-
- FILLING_BEGIN();
- Accept("QTI");
-
- Fill(Stream_General, 0, General_Format, "MPEG-4");
- CodecID_Fill(__T("QTI"), Stream_General, 0, InfoCodecID_Format_Mpeg4);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::idsc()
-{
- Element_Name("QTI");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-
- FILLING_BEGIN();
- Accept("QTI");
-
- Fill(Stream_General, 0, General_Format, "MPEG-4");
- CodecID_Fill(__T("QTI"), Stream_General, 0, InfoCodecID_Format_Mpeg4);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::jp2c()
-{
- Element_Name("JPEG 2000 content");
-
- #if defined(MEDIAINFO_JPEG_YES)
- //Creating the parser
- File_Jpeg MI;
- if (IsSub || Config->File_Names.size()>1) //If contained in another container or several files, this is a video stream
- MI.StreamKind=Stream_Video;
- Open_Buffer_Init(&MI);
-
- //Demux
- #if MEDIAINFO_DEMUX
- #if MEDIAINFO_EVENTS
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- if (Frame_Count_NotParsedIncluded==(int64u)-1)
- Frame_Count_NotParsedIncluded=0;
- if (Config->Demux_Rate_Get())
- {
- FrameInfo.DTS=float64_int64s(Frame_Count_NotParsedIncluded*1000000000/Config->Demux_Rate_Get());
- FrameInfo.PTS=FrameInfo.DTS;
- FrameInfo.DUR=float64_int64s(1000000000/Config->Demux_Rate_Get());
- }
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- #endif //MEDIAINFO_DEMUX
-
- //Parsing
- Open_Buffer_Continue(&MI);
-
- //Filling
- if (Frame_Count==0)
- {
- Accept("MPEG-4");
-
- Fill(Stream_General, 0, General_Format, "JPEG 2000", Unlimited, true, true);
- Fill(Stream_General, 0, General_Format_Profile, "MPEG-4");
-
- Finish(&MI);
- Merge(MI, MI.StreamKind, 0, 0);
-
- Fill("MPEG-4");
- if (Config->File_Names.size()>1 && File_Size!=(int64u)-1)
- {
- int64u OverHead=Config->File_Sizes[0]-Element_Size;
- Fill(Stream_Video, 0, Video_StreamSize, File_Size-Config->File_Names.size()*OverHead, 10, true);
- }
- if (Config->ParseSpeed<1.0)
- Finish("MPEG-4");
- }
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- #endif
-
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::jp2h()
-{
- Element_Name("JPEG-2000 header");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::jp2h_colr()
-{
- Element_Name("Color");
-
- //Parsing
- int8u METH;
- Get_B1 (METH, "METH - Specification method"); Param_Info1(Mpeg4_jp2h_METH(METH));
- Skip_B1( "PREC - Precedence");
- Skip_B1( "APPROX - Colourspace approximation");
- switch (METH)
- {
- case 0x01 : {
- int32u EnumCS;
- Get_B4 (EnumCS, "EnumCS - Enumerated colourspace"); Param_Info1(Mpeg4_jp2h_EnumCS(EnumCS));
- Fill(StreamKind_Last, 0, "ColorSpace", Mpeg4_jp2h_EnumCS(EnumCS));
- }
- break;
- case 0x02 : Skip_XX(Element_Size-Element_Offset, "PROFILE");
- break;
- default : Skip_XX(Element_Size-Element_Offset, "Unknown");
- return;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::jp2h_ihdr()
-{
- Element_Name("Header");
-
- //Parsing
- Skip_B4( "Height");
- Skip_B4( "Width");
- Skip_B2( "NC - Number of components");
- BS_Begin();
- Skip_SB( "BPC - Bits per component (Sign)");
- Skip_S1(7, "BPC - Bits per component (Value)");
- BS_End();
- Skip_B1( "C - Compression type");
- Skip_B1( "UnkC - Colourspace Unknown");
- Skip_B1( "IPR - Intellectual Property");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::mdat()
-{
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Streams
- #endif //MEDIAINFO_TRACE
-
- if (!Status[IsAccepted])
- {
- Data_Accept("MPEG-4");
-
- Fill(Stream_General, 0, General_Format, "QuickTime");
- }
- Element_Name("Data");
-
- //Sizes
- if (Retrieve(Stream_General, 0, General_HeaderSize).empty())
- {
- Fill(Stream_General, 0, General_HeaderSize, File_Offset+Buffer_Offset-Header_Size);
- Fill(Stream_General, 0, General_DataSize, Element_TotalSize_Get()+Header_Size);
- if (File_Size!=(int64u)-1 && File_Offset+Buffer_Offset+Element_TotalSize_Get()<=File_Size)
- Fill(Stream_General, 0, General_FooterSize, File_Size-(File_Offset+Buffer_Offset+Element_TotalSize_Get()));
- Fill(Stream_General, 0, General_IsStreamable, FirstMoovPos==(int64u)-1?"No":"Yes");
- }
-
- //Trace
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(0); //Container1
- #endif //MEDIAINFO_TRACE
-
- if (IsSecondPass && !mdat_Pos.empty() && mdat_Pos.begin()->Offset<File_Offset+Buffer_Offset+Element_TotalSize_Get())
- {
- //Next piece of data
- mdat_Pos_Temp=&mdat_Pos[0];
- IsParsing_mdat=true;
- mdat_StreamJump();
-
- return; //Only if have something in this mdat
- }
-
- //In case of mdat is before moov
- if (FirstMdatPos==(int64u)-1)
- {
- Buffer_Offset-=(size_t)Header_Size;
- Element_Level--;
- BookMark_Set(); //Remembering this place, for stream parsing in phase 2
- Element_Level++;
- Buffer_Offset+=(size_t)Header_Size;
-
- FirstMdatPos=File_Offset+Buffer_Offset-Header_Size;
- }
- if (File_Offset+Buffer_Offset>LastMdatPos)
- LastMdatPos=File_Offset+Buffer_Offset+Element_TotalSize_Get();
-
- //Parsing
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- Param("Data", Ztring("(")+Ztring::ToZtring(Element_TotalSize_Get())+Ztring(" bytes)"));
- #endif //MEDIAINFO_TRACE
- #if MEDIAINFO_MD5
- if (MD5==NULL || (!IsSecondPass && FirstMdatPos<FirstMoovPos))
- #endif //MEDIAINFO_MD5
- GoTo(File_Offset+Buffer_Offset+Element_TotalSize_Get()); //Not using Skip_XX() because we want to skip data we don't have, and Skip_XX() does a test on size of buffer
- #if MEDIAINFO_MD5
- else
- Element_Offset=Element_TotalSize_Get();
- #endif //MEDIAINFO_MD5
-
- //ISM
- if (moof_traf_base_data_offset==(int64u)-1 && !data_offset_present)
- Stream->second.stco.push_back(File_Offset+Buffer_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::mdat_xxxx()
-{
- if (!Element_IsComplete_Get())
- {
- Element_WaitForMoreData();
- return;
- }
-
- if (!IsSub)
- {
- if (Config->ParseSpeed>=1.0)
- Config->State_Set(((float)Buffer_TotalBytes)/File_Size);
- }
-
- stream &Stream_Temp=Streams[(int32u)Element_Code];
- if (Stream_Temp.Parsers.empty())
- {
- Skip_XX(Element_Size, "Unknown");
- mdat_StreamJump();
- return;
- }
- #if MEDIAINFO_DEMUX
- if (Stream_Temp.StreamKind!=Stream_Other && Stream_Temp.StreamKind!=Stream_Max)
- {
- //DTS
- Frame_Count_NotParsedIncluded=Stream_Temp.stts_FramePos;
- if (Stream_Temp.stts_Durations_Pos<Stream_Temp.stts_Durations.size())
- {
- stream::stts_durations::iterator stts_Duration=Stream_Temp.stts_Durations.begin()+Stream_Temp.stts_Durations_Pos;
- FrameInfo.DTS=TimeCode_DtsOffset+(stts_Duration->DTS_Begin+(((int64u)stts_Duration->SampleDuration)*(Frame_Count_NotParsedIncluded-stts_Duration->Pos_Begin)))*1000000000/Stream_Temp.mdhd_TimeScale;
- FrameInfo.PTS=Stream_Temp.PtsDtsAreSame?FrameInfo.DTS:(int64u)-1;
- FrameInfo.DUR=((int64u)stts_Duration->SampleDuration)*1000000000/Stream_Temp.mdhd_TimeScale;
- Stream_Temp.stts_FramePos++;
- if (Stream_Temp.stts_FramePos>=stts_Duration->Pos_End)
- Stream_Temp.stts_Durations_Pos++;
- if (!Stream_Temp.stss.empty())
- {
- Demux_random_access=false;
- for (size_t Pos=0; Pos<Stream_Temp.stss.size(); Pos++)
- if (Stream_Temp.stss[Pos]==Frame_Count_NotParsedIncluded)
- {
- Demux_random_access=true;
- break;
- }
- }
- else
- Demux_random_access=true;
- }
- else
- {
- FrameInfo.DTS=(int64u)-1;
- FrameInfo.DUR=(int64u)-1;
- Stream_Temp.stts_FramePos++;
- }
-
- Demux_Level=Stream_Temp.Demux_Level;
- Demux(Buffer+Buffer_Offset+Stream_Temp.Demux_Offset, (size_t)(Element_Size-Stream_Temp.Demux_Offset), ContentType_MainStream);
- }
- #endif //MEDIAINFO_DEMUX
-
- for (size_t Pos=0; Pos<Stream_Temp.Parsers.size(); Pos++)
- {
- #if MEDIAINFO_DEMUX
- Stream_Temp.Parsers[Pos]->FrameInfo=FrameInfo;
- #endif //MEDIAINFO_DEMUX
-
- Open_Buffer_Continue(Stream_Temp.Parsers[Pos], Buffer+Buffer_Offset, (size_t)Element_Size);
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent && Config->Demux_Unpacketize_Get())
- Stream_Temp.Demux_EventWasSent=true;
- #endif //MEDIAINFO_DEMUX
- Element_Show();
-
- #if MEDIAINFO_DEMUX
- if (!Stream_Temp.IsFilled && Stream_Temp.Parsers[Pos]->Status[IsFilled])
- {
- if (Stream_Temp.StreamKind==Stream_Other) //If this is a TimeCode track
- {
- if (((File_Mpeg4_TimeCode*)Stream_Temp.Parsers[Pos])->Pos!=(int32u)-1)
- {
- for (std::map<int32u, stream>::iterator StreamTemp=Streams.begin(); StreamTemp!=Streams.end(); ++StreamTemp)
- if (StreamTemp->second.TimeCode_TrackID==(int32u)Element_Code)
- {
- TimeCode_FrameOffset=((File_Mpeg4_TimeCode*)Stream_Temp.Parsers[Pos])->Pos;
- TimeCode_DtsOffset=float64_int64s(((float64)TimeCode_FrameOffset)*1000000000*Stream_Temp.TimeCode->FrameDuration/Stream_Temp.TimeCode->TimeScale);
- }
- }
- }
-
- Stream_Temp.IsFilled=true;
-
- if (Config->ParseSpeed<1)
- {
- bool File_Offset_Next_IsValid;
- int64u File_Offset_Next;
- if (mdat_Pos_Temp!=mdat_Pos_Max)
- {
- File_Offset_Next=mdat_Pos_Temp->Offset;
- File_Offset_Next_IsValid=true;
- }
- else
- {
- File_Offset_Next=(int64u)-1;
- File_Offset_Next_IsValid=false;
- }
- mdat_pos mdat_Pos_New;
- mdat_Pos_Max=mdat_Pos.empty()?NULL:(&mdat_Pos[0]+mdat_Pos.size());
- if (!mdat_Pos.empty())
- {
- for (mdat_Pos_Type* mdat_Pos_Item=&mdat_Pos[0]; mdat_Pos_Item<mdat_Pos_Max; ++mdat_Pos_Item)
- if (mdat_Pos_Item->StreamID!=(int32u)Element_Code)
- mdat_Pos_New.push_back(*mdat_Pos_Item);
- }
- mdat_Pos=mdat_Pos_New;
- std::sort(mdat_Pos.begin(), mdat_Pos.end(), &mdat_pos_sort);
- mdat_Pos_Temp=mdat_Pos.empty()?NULL:&mdat_Pos[0];
- mdat_Pos_Max=mdat_Pos_Temp+mdat_Pos.size();
- if (File_Offset_Next_IsValid)
- for (; mdat_Pos_Temp<mdat_Pos_Max; ++mdat_Pos_Temp)
- {
- if (mdat_Pos_Temp->Offset>=File_Offset_Next)
- break;
- }
- else
- mdat_Pos_Temp=mdat_Pos_Max;
- }
- }
- #endif //MEDIAINFO_DEMUX
-
- //Multiple parsers
- if (Stream_Temp.Parsers.size()>1)
- {
- if (!Stream_Temp.Parsers[Pos]->Status[IsAccepted] && Stream_Temp.Parsers[Pos]->Status[IsFinished])
- {
- delete *(Stream_Temp.Parsers.begin()+Pos);
- Stream_Temp.Parsers.erase(Stream_Temp.Parsers.begin()+Pos);
- Pos--;
- }
- else if (Stream_Temp.Parsers.size()>1 && Stream_Temp.Parsers[Pos]->Status[IsAccepted])
- {
- File__Analyze* Parser=Stream_Temp.Parsers[Pos];
- for (size_t Pos2=0; Pos2<Stream_Temp.Parsers.size(); Pos2++)
- {
- if (Pos2!=Pos)
- delete *(Stream_Temp.Parsers.begin()+Pos2);
- }
- Stream_Temp.Parsers.clear();
- Stream_Temp.Parsers.push_back(Parser);
- }
- }
- }
-
- //Next piece of data
- Element_Offset=Element_Size;
- Element_Show();
- mdat_StreamJump();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::mdat_StreamJump()
-{
- //Finding right file offset
- int64u ToJump=File_Size;
- if (mdat_Pos_Temp!=mdat_Pos_Max)
- {
- ToJump=mdat_Pos_Temp->Offset;
- #if MEDIAINFO_DEMUX
- if (Config->ParseSpeed==1)
- {
- std::map<int64u, int64u>::iterator StreamOffset_Jump_Temp=StreamOffset_Jump.find(ToJump);
- if (StreamOffset_Jump_Temp!=StreamOffset_Jump.end())
- {
- ToJump=StreamOffset_Jump_Temp->second;
- if (!mdat_Pos.empty())
- {
- mdat_Pos_Temp=&mdat_Pos[0];
- while (mdat_Pos_Temp<mdat_Pos_Max && mdat_Pos_Temp->Offset!=ToJump)
- mdat_Pos_Temp++;
- }
- else
- mdat_Pos_Temp=NULL;
- }
- }
- #endif // MEDIAINFO_DEMUX
- }
- if (ToJump>File_Size)
- ToJump=File_Size;
- if (ToJump!=File_Offset+Buffer_Offset+Element_Size)
- {
- if (!Status[IsAccepted])
- Data_Accept("MPEG-4");
- #if MEDIAINFO_MD5
- if (Config->File_Md5_Get() && ((IsSecondPass && mdat_Pos_NormalParsing) || FirstMoovPos<FirstMdatPos))
- Md5_ParseUpTo=ToJump;
- else
- #endif //MEDIAINFO_MD5
- Data_GoTo(ToJump, "MPEG-4"); //Not just after
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::mfra()
-{
- Element_Name("Movie Fragment Random Access");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::mfra_mfro()
-{
- NAME_VERSION_FLAG("Movie Fragment Random Access Offset");
-
- //Parsing
- Skip_B4( "size");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::mfra_tfra()
-{
- NAME_VERSION_FLAG("Track Fragment Random Access");
-
- //Parsing
- int32u number_of_entry;
- int8u length_size_of_traf_num, length_size_of_trun_num, length_size_of_sample_num;
- Skip_B4( "track_ID");
- BS_Begin();
- Skip_S1(26, "reserved");
- Get_S1 (2, length_size_of_traf_num, "length_size_of_traf_num");
- Get_S1 (2, length_size_of_trun_num, "length_size_of_trun_num");
- Get_S1 (2, length_size_of_sample_num, "length_size_of_sample_num");
- BS_End();
- Get_B4(number_of_entry, "number_of_entry");
- for(int32u Pos=0; Pos<number_of_entry; Pos++)
- {
- Element_Begin1("entry");
- int64u time, moof_offset;
- Get_B_DEPENDOFVERSION(time, "time");
- Get_B_DEPENDOFVERSION(moof_offset, "moof_offset");
- switch (length_size_of_traf_num)
- {
- case 0 : Skip_B1( "traf_number"); break;
- case 1 : Skip_B2( "traf_number"); break;
- case 2 : Skip_B3( "traf_number"); break;
- case 3 : Skip_B4( "traf_number"); break;
- default: ;
- }
- switch (length_size_of_trun_num)
- {
- case 0 : Skip_B1( "trun_num"); break;
- case 1 : Skip_B2( "trun_num"); break;
- case 2 : Skip_B3( "trun_num"); break;
- case 3 : Skip_B4( "trun_num"); break;
- default: ;
- }
- switch (length_size_of_sample_num)
- {
- case 0 : Skip_B1( "sample_num"); break;
- case 1 : Skip_B2( "sample_num"); break;
- case 2 : Skip_B3( "sample_num"); break;
- case 3 : Skip_B4( "sample_num"); break;
- default: ;
- }
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moof()
-{
- Element_Name("Movie Fragment");
-
- if (IsSecondPass)
- {
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- Param("Data", Ztring("(")+Ztring::ToZtring(Element_TotalSize_Get())+Ztring(" bytes)"));
- #endif //MEDIAINFO_TRACE
- #if MEDIAINFO_MD5
- if (MD5==NULL || (!IsSecondPass && FirstMdatPos<FirstMoovPos))
- #endif //MEDIAINFO_MD5
- GoTo(File_Offset+Buffer_Offset+Element_TotalSize_Get()); //Not using Skip_XX() because we want to skip data we don't have, and Skip_XX() does a test on size of buffer
- #if MEDIAINFO_MD5
- else
- Element_Offset=Element_TotalSize_Get();
- #endif //MEDIAINFO_MD5
- return;
- }
-
- IsFragmented=true;
- moof_base_data_offset=File_Offset+Buffer_Offset-Header_Size;
- data_offset_present=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moof_mfhd()
-{
- NAME_VERSION_FLAG("Movie Fragment Header");
-
- //Parsing
- Skip_B4( "sequence_number");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moof_traf()
-{
- Element_Name("Track Fragment");
-
- //Filling
- moof_traf_base_data_offset=(int64u)-1;
- if (Streams.empty())
- Streams[(int32u)-1]; //Creating a virtual track in case there is no track
- Stream=Streams.begin(); //Using first track in case there is no track header
- moof_traf_default_sample_duration=Stream->second.mvex_trex_default_sample_duration;
- moof_traf_default_sample_size=Stream->second.mvex_trex_default_sample_size;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moof_traf_sdtp()
-{
- NAME_VERSION_FLAG("Independent and Disposable Samples");
-
- //Parsing
- //for (int32u Pos=0; Pos<sample_count; Pos++) //sample_count should be taken from stsz or stz2
- while (Element_Offset<Element_Size)
- {
- Element_Begin1("sample");
- BS_Begin();
- Skip_S1(2, "reserved");
- Info_S1(2, sample_depends_on, "sample_depends_on"); Param_Info1(Mpeg4_sample_depends_on[sample_depends_on]);
- Info_S1(2, sample_is_depended_on, "sample_is_depended_on"); Param_Info1(Mpeg4_sample_is_depended_on[sample_is_depended_on]);
- Info_S1(2, sample_has_redundancy, "sample_has_redundancy"); Param_Info1(Mpeg4_sample_has_redundancy[sample_has_redundancy]);
- BS_End();
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moof_traf_tfhd()
-{
- NAME_VERSION_FLAG("Track Fragment Header");
-
- //Parsing
- bool base_data_offset_present, sample_description_index_present, default_sample_duration_present, default_sample_size_present, default_sample_flags_present;
- Get_Flags (Flags, 0, base_data_offset_present, "base-data-offset-present");
- Get_Flags (Flags, 1, sample_description_index_present, "sample-description-index-present");
- Get_Flags (Flags, 3, default_sample_duration_present, "default-sample-duration-present");
- Get_Flags (Flags, 4, default_sample_size_present, "default-sample-size-present");
- Get_Flags (Flags, 5, default_sample_flags_present, "default-sample-flags-present");
- Skip_Flags(Flags, 16, "duration-is-empty");
- Get_B4 (moov_trak_tkhd_TrackID, "track_ID");
- if (base_data_offset_present)
- Get_B8 (moof_traf_base_data_offset, "base_data_offset");
- if (sample_description_index_present)
- Skip_B4( "sample_description_index");
- if (default_sample_duration_present)
- Get_B4 (moof_traf_default_sample_duration, "default_sample_duration");
- if (default_sample_size_present)
- Get_B4 (moof_traf_default_sample_size, "default_sample_size");
- if (default_sample_flags_present)
- Skip_B4( "default_sample_flags");
-
- FILLING_BEGIN();
- Stream=Streams.find(moov_trak_tkhd_TrackID);
- if (Stream==Streams.end())
- Stream=Streams.begin();
- if (!default_sample_duration_present)
- moof_traf_default_sample_duration=Stream->second.mvex_trex_default_sample_duration;
- if (!default_sample_size_present)
- moof_traf_default_sample_size=Stream->second.mvex_trex_default_sample_size;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moof_traf_trun()
-{
- NAME_VERSION_FLAG("Track Fragment Run");
-
- //Parsing
- int32u sample_count;
- bool first_sample_flags_present, sample_duration_present, sample_size_present, sample_flags_present, sample_composition_time_offset_present;
- Get_Flags (Flags, 0, data_offset_present, "data-offset-present");
- Get_Flags (Flags, 2, first_sample_flags_present, "first-sample-flags-present");
- Get_Flags (Flags, 8, sample_duration_present, "sample-duration-present");
- Get_Flags (Flags, 9, sample_size_present, "sample-size-present");
- Get_Flags (Flags, 10, sample_flags_present, "sample-flags-present");
- Get_Flags (Flags, 11, sample_composition_time_offset_present, "sample-composition-time-offsets-present");
- Get_B4 (sample_count, "sample_count");
- int64u data_offset_Final=moof_traf_base_data_offset!=(int64u)-1?moof_traf_base_data_offset:moof_base_data_offset;
- if (data_offset_present)
- {
- int32u data_offset;
- Get_B4 (data_offset, "data_offset");
- data_offset_Final+=data_offset;
- }
-
- //Filling
- if (moof_traf_base_data_offset!=(int64u)-1 || data_offset_present)
- Stream->second.stco.push_back(data_offset_Final);
- stream::stsc_struct Stsc;
- if (Stream->second.stsc.empty())
- Stsc.FirstChunk=1;
- else
- Stsc.FirstChunk=Stream->second.stsc[Stream->second.stsc.size()-1].FirstChunk+1;
- Stsc.SamplesPerChunk=sample_count;
- Stream->second.stsc.push_back(Stsc);
- if (!sample_duration_present)
- moov_trak_mdia_minf_stbl_stts_Common(sample_count, moof_traf_default_sample_duration);
- if (!sample_size_present)
- Stream->second.stsz.resize(Stream->second.stsz.size()+sample_count, moof_traf_default_sample_size);
-
- if (first_sample_flags_present)
- Skip_B4( "first_sample_flags");
- for (int32u Pos=0; Pos<sample_count; Pos++)
- {
- Element_Begin1("sample");
- if (sample_duration_present)
- {
- int32u sample_duration;
- Get_B4 (sample_duration, "sample_duration");
-
- moov_trak_mdia_minf_stbl_stts_Common(1, sample_duration);
- }
- if (sample_size_present)
- {
- int32u sample_size;
- Get_B4 (sample_size, "sample_size");
-
- //Filling
- Stream->second.stsz_StreamSize+=sample_size;
- Stream->second.stsz_Total.push_back(sample_size);
- if (Stream->second.stsz.size()<FrameCount_MaxPerStream)
- Stream->second.stsz.push_back(sample_size);
- }
- if (sample_flags_present)
- Skip_B4( "sample_flags");
- if (sample_composition_time_offset_present)
- Skip_B4( "sample_composition_time_offset");
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov()
-{
- if (!Status[IsAccepted])
- {
- Data_Accept("MPEG-4");
-
- Fill(Stream_General, 0, General_Format, "QuickTime"); //If there is no ftyp atom, this is an old Quictime file
- }
- Element_Name("File header");
-
- if (IsSecondPass || FirstMoovPos!=(int64u)-1) //Currently, the 1 moov atom is used
- {
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- Param("Data", Ztring("(")+Ztring::ToZtring(Element_TotalSize_Get())+Ztring(" bytes)"));
- #endif //MEDIAINFO_TRACE
- #if MEDIAINFO_MD5
- if (MD5==NULL || (!IsSecondPass && FirstMdatPos<FirstMoovPos))
- #endif //MEDIAINFO_MD5
- GoTo(File_Offset+Buffer_Offset+Element_TotalSize_Get()); //Not using Skip_XX() because we want to skip data we don't have, and Skip_XX() does a test on size of buffer
- #if MEDIAINFO_MD5
- else
- Element_Offset=Element_TotalSize_Get();
- #endif //MEDIAINFO_MD5
- return;
- }
-
- if (FirstMoovPos==(int64u)-1)
- FirstMoovPos=File_Offset+Buffer_Offset-Header_Size;
- /*
- else
- {
- //In case of more than 1 moov atom, the last one is used (previous ones are trashed)
- Streams.clear();
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- while (Count_Get((stream_t)StreamKind))
- Stream_Erase((stream_t)StreamKind, Count_Get((stream_t)StreamKind)-1);
- }
- */
-}
-
-//-------------------------------------------------------------------------
-void File_Mpeg4::moov_ainf()
-{
- NAME_VERSION_FLAG("Asset Information");
-
- //Parsing
- Skip_C4( "profile_version");
- Skip_String(Element_Size-Element_Offset, "APID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_cmov()
-{
- Element_Name("Compressed file header");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_cmov_cmvd()
-{
- Element_Name("Data");
-
- switch (moov_cmov_dcom_Compressor)
- {
- case Elements::moov_cmov_dcom_zlib : moov_cmov_cmvd_zlib(); break;
- default: Skip_XX(Element_Size, "Data");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_cmov_cmvd_zlib()
-{
- Element_Name("Zlib");
-
- //Parsing
- int32u Dest_Size32;
- Get_B4(Dest_Size32, "Destination size");
-
- FILLING_BEGIN();
- //Sizes
- unsigned long Source_Size=(unsigned long)(Element_Size-Element_Offset);
- unsigned long Dest_Size=Dest_Size32;
-
- //Uncompressing
- int8u* Dest=new int8u[Dest_Size];
- if (uncompress((Bytef*)Dest, &Dest_Size, (const Bytef*)Buffer+Buffer_Offset+4, Source_Size)<0)
- {
- Skip_XX(Element_Size, "Problem during the decompression");
- delete[] Dest; //Dest=NULL;
- return;
- }
-
- //Exiting this element
- Skip_XX(Element_Size-Element_Offset, "Will be parsed");
-
- //Configuring level
- std::vector<int64u> Element_Sizes_Sav;
- size_t Element_Level_Sav=Element_Level;
- while(Element_Level)
- {
- Element_Sizes_Sav.push_back(Element_TotalSize_Get());
- Element_End0();
- }
-
- //Configuring buffer
- const int8u* Buffer_Sav=Buffer;
- size_t Buffer_Size_Sav=Buffer_Size;
- int8u* Buffer_Temp_Sav=Buffer_Temp;
- size_t Buffer_Temp_Size_Sav=Buffer_Temp_Size;
- size_t Buffer_Offset_Sav=Buffer_Offset;
- size_t Buffer_Offset_Temp_Sav=Buffer_Offset_Temp;
- Buffer=NULL;
- Buffer_Size=0;
- Buffer_Temp=NULL;
- Buffer_Temp_Size=0;
- Buffer_Offset=0;
- Buffer_Offset_Temp=0;
-
- //Configuring file size
- int64u File_Offset_Sav=File_Offset;
- int64u File_Size_Sav=File_Size;
- if (File_Size<File_Offset+Buffer_Offset+Element_Offset+Dest_Size)
- File_Size=File_Offset+Buffer_Offset+Element_Offset+Dest_Size;
- Element_Level++;
- Header_Fill_Size(File_Size);
- Element_Level--;
-
- //Configuring some status info
- FirstMoovPos=(int64u)-1;
-
- //Parsing
- Buffer=Dest;
- Buffer_Size=Dest_Size;
- while (Open_Buffer_Continue_Loop());
- delete[] Dest; //Dest=NULL;
-
- //Resetting file info
- File_Offset=File_Offset_Sav;
- File_Size=File_Size_Sav;
-
- //Resetting buffer
- Buffer=Buffer_Sav;
- Buffer_Size=Buffer_Size_Sav;
- Buffer_Temp=Buffer_Temp_Sav;
- Buffer_Temp_Size=Buffer_Temp_Size_Sav;
- Buffer_Offset=Buffer_Offset_Sav;
- Buffer_Offset_Temp=Buffer_Offset_Temp_Sav;
-
- //Configuring level
- while(Element_Level)
- Element_End0();
- Element_Level++;
- Header_Fill_Size(File_Size-(File_Offset+Buffer_Offset));
- Element_Level--;
- while(Element_Level<Element_Level_Sav)
- {
- Element_Begin0();
- Element_Begin0();
- Header_Fill_Size(Element_Sizes_Sav[0]);
- Element_End0();
- }
-
- //Filling
- Fill(Stream_General, 0, General_Format_Settings, "Compressed header");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_ctab()
-{
- Element_Name("Color Table");
-
- //Parsing
- int16u Size;
- Skip_B4( "Color table seed");
- Skip_B2( "Color table flags");
- Get_B2 (Size, "Color table size");
- for (int16u Pos=0; Pos<=Size; Pos++)
- {
- Skip_B2( "Zero");
- Skip_B2( "Red");
- Skip_B2( "Green");
- Skip_B2( "Blue");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_cmov_dcom()
-{
- Element_Name("Data compressor name");
-
- //Parsing
- Get_C4 (moov_cmov_dcom_Compressor, "Value");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_iods()
-{
- NAME_VERSION_FLAG("Initial object descriptor");
- INTEGRITY_VERSION(0);
-
- FILLING_BEGIN();
- Descriptors();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_meta()
-{
- Element_Name("Metadata");
-
- //Filling
- moov_meta_hdlr_Type=0;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_meta_bxml()
-{
- NAME_VERSION_FLAG("Binary XML"); //ISO/IEC 14496-12
- INTEGRITY(moov_meta_hdlr_Type==Elements::moov_meta_hdlr_mp7b, "Bad meta type");
-
- //Parsing
- Skip_XX(Element_Size-Element_Offset, "Binary XML dump");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_meta_hdlr()
-{
- NAME_VERSION_FLAG("Metadata Header"); //ISO/IEC 14496-12 handler
-
- //Parsing
- Skip_C4( "Type (Quicktime)"); //Filled if Quicktime
- Get_C4 (moov_meta_hdlr_Type, "Metadata type");
- if (Element_Offset+12<=Element_Size)
- {
- Skip_C4( "Manufacturer");
- Skip_B4( "Component reserved flags"); //Filled if Quicktime
- Skip_B4( "Component reserved flags mask"); //Filled if Quicktime
- if (Element_Offset<Element_Size)
- Skip_Local(Element_Size-Element_Offset, "Component type name");
- }
- else if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_meta_keys()
-{
- NAME_VERSION_FLAG("Keys");
- INTEGRITY(moov_meta_hdlr_Type==Elements::moov_meta_hdlr_mdta, "Bad meta type");
-
- //Parsing
- Skip_B4( "Count");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_meta_keys_mdta()
-{
- Element_Name("Name");
- INTEGRITY(moov_meta_hdlr_Type==Elements::moov_meta_hdlr_mdta, "Bad meta type");
-
- //Parsing
- std::string Value;
- Get_String(Element_Size, Value, "Value");
-
- //Filling
- moov_udta_meta_keys_List.push_back(Value);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_meta_ilst()
-{
- Element_Name("List");
-
- //Filling
- moov_udta_meta_keys_ilst_Pos=0;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_meta_ilst_xxxx()
-{
- Element_Name("Element");
-
- //Filling
- moov_meta_ilst_xxxx_name_Name.clear(); //useful if metadata type = "mdir"
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_meta_ilst_xxxx_data()
-{
- Element_Name("Data");
-
- //Parsing
- int32u Kind, Language;
- Ztring Value;
- Get_B4(Kind, "Kind"); Param_Info1(Mpeg4_Meta_Kind(Kind));
-
- //Error detection
- switch (Element_Code_Get(Element_Level-1))
- {
- case Elements::moov_meta__disk :
- case Elements::moov_meta__trkn :
- if (Kind)
- {
- //Not normal
- Kind=0x00;
- }
- default : ;
- }
-
- switch (Kind)
- {
- case 0x00 : //Binary
- Get_B4(Language, "Language");
- switch (Element_Code_Get(Element_Level-1))
- {
- case Elements::moov_meta__disk :
- {
- //Parsing
- int16u Position, Total;
- Skip_B2( "Reserved");
- Get_B2(Position, "Position");
- Get_B2(Total, "Total");
- if (Element_Offset+2<=Element_Size)
- Skip_B2( "Reserved"); //Sometimes there are 2 more bytes, unknown
-
- //Filling
- if (Position)
- Fill(Stream_General, 0, General_Part_Position, Position, 10, true);
- if (Total)
- Fill(Stream_General, 0, General_Part_Position_Total, Total, 10, true);
- }
- return;
- case Elements::moov_meta__trkn :
- {
- //Parsing
- int16u Position, Total;
- Skip_B2( "Reserved");
- Get_B2(Position, "Position");
- Get_B2(Total, "Total");
- if (Element_Offset+2<=Element_Size)
- Skip_B2( "Reserved"); //Sometimes there are 2 more bytes, unknown
-
- //Filling
- if (Position)
- Fill(Stream_General, 0, General_Track_Position, Position, 10, true);
- if (Total)
- Fill(Stream_General, 0, General_Track_Position_Total, Total, 10, true);
- }
- return;
- case Elements::moov_meta__covr :
- {
- std::string Data_Raw((const char*)(Buffer+(size_t)(Buffer_Offset+Element_Offset)), (size_t)(Element_Size-Element_Offset));
- std::string Data_Base64(Base64::encode(Data_Raw));
- Skip_XX(Element_Size-Element_Offset, "Data");
-
- //Filling
- Fill(Stream_General, 0, General_Cover_Data, Data_Base64);
- Fill(Stream_General, 0, General_Cover, "Yes");
- }
- return;
- case Elements::moov_meta__gnre :
- {
- if (Element_Size-Element_Offset==2)
- {
- int16u Genre;
- Get_B2(Genre, "Genre");
-
- //Filling
- if (Genre)
- Fill(Stream_General, 0, General_Genre, Genre-1);
- }
- else
- Skip_XX(Element_Size-Element_Offset,"Data");
- }
- return;
- default:
- Skip_XX(Element_Size-Element_Offset,"To decode!");
- Value=__T("(Binary)");
- }
- break;
- case 0x01 : //UTF-8
- Get_B4(Language, "Language");
- switch (Element_Code_Get(Element_Level-1))
- {
- case Elements::moov_meta___day :
- {
- std::string ValueS;
- Get_String(Element_Size-Element_Offset, ValueS, "Value");
- Value.Date_From_String(ValueS.c_str(), ValueS.size());
- }
- break;
- default:
- Get_UTF8(Element_Size-Element_Offset, Value, "Value");
- }
- break;
- case 0x02 : //UTF-16
- Value=__T("UTF-16 encoding not yet supported");
- break;
- case 0x03 : //Mac String
- Get_B4(Language, "Language"); //To confirm
- Get_Local(Element_Size-Element_Offset, Value, "Value");
- break;
- case 0x0D : //JPEG
- Get_B4(Language, "Language");
- switch (Element_Code_Get(Element_Level-1))
- {
- case Elements::moov_meta__covr :
- {
- std::string Data_Raw((const char*)(Buffer+(size_t)(Buffer_Offset+Element_Offset)), (size_t)(Element_Size-Element_Offset));
- std::string Data_Base64(Base64::encode(Data_Raw));
- Skip_XX(Element_Size-Element_Offset, "Data");
-
- //Filling
- Fill(Stream_General, 0, General_Cover_Data, Data_Base64);
- Fill(Stream_General, 0, General_Cover, "Yes");
- }
- return;
- default:
- Value=__T("(Binary)");
- }
- break;
- case 0x0E : //PNG
- Get_B4(Language, "Language");
- switch (Element_Code_Get(Element_Level-1))
- {
- case Elements::moov_meta__covr :
- {
- std::string Data_Raw((const char*)(Buffer+(size_t)(Buffer_Offset+Element_Offset)), (size_t)(Element_Size-Element_Offset));
- std::string Data_Base64(Base64::encode(Data_Raw));
- Skip_XX(Element_Size-Element_Offset, "Data");
-
- //Filling
- Fill(Stream_General, 0, General_Cover_Data, Data_Base64);
- Fill(Stream_General, 0, General_Cover, "Yes");
- }
- return;
- default:
- Value=__T("(Binary)");
- }
- break;
- case 0x15 : //Signed Integer
- {
- Get_B4(Language, "Language");
- switch (Element_Size-Element_Offset)
- {
- case 1 : {int8u ValueI; Get_B1(ValueI, "Value"); Value.From_Number((int8s) ValueI);}; break;
- case 2 : {int16u ValueI; Get_B2(ValueI, "Value"); Value.From_Number((int16s)ValueI);}; break;
- case 4 : {int32u ValueI; Get_B4(ValueI, "Value"); Value.From_Number((int32s)ValueI);}; break;
- case 8 : {int64u ValueI; Get_B8(ValueI, "Value"); Value.From_Number((int64s)ValueI);}; break;
- default : Value=__T("Unknown kind of integer value!");
- }
- }
- break;
- case 0x16 : //Float 32
- Skip_XX(4, "To decode!");
- //Value=__T("Float32 encoding not yet supported");
- break;
- case 0x17 : //Float 64
- Skip_XX(8, "To decode!");
- //Value=__T("Float64 encoding not yet supported");
- break;
- default: Value=__T("Unknown kind of value!");
- }
-
- switch (moov_meta_hdlr_Type)
- {
- case Elements::moov_meta_hdlr_mdir :
- {
- FILLING_BEGIN();
- std::string Parameter;
- if (Element_Code_Get(Element_Level-1)==Elements::moov_meta______)
- {
- if (moov_meta_ilst_xxxx_name_Name=="iTunMOVI" && Element_Size>8)
- {
- File_PropertyList MI;
- Open_Buffer_Init(&MI);
- Open_Buffer_Continue(&MI, Buffer+Buffer_Offset+8, (size_t)(Element_Size-8));
- Open_Buffer_Finalize(&MI);
- Merge(MI, Stream_General, 0, 0);
- }
- else
- Metadata_Get(Parameter, moov_meta_ilst_xxxx_name_Name);
- }
- else
- Metadata_Get(Parameter, Element_Code_Get(Element_Level-1));
- if (Parameter=="Encoded_Application")
- {
- if (Value.find(__T("Nero AAC codec"))==0)
- {
- ZtringList List; List.Separator_Set(0, __T(" / "));
- List.Write(Value);
- Element_Info1(Parameter.c_str());
- Fill(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_Name, List(0), true);
- Fill(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_Version, List(1), true);
- Parameter.clear(); //Set as already filled
- }
- }
- if (Parameter=="cdec")
- {
- if (Value.find(__T("ndaudio "))==0)
- {
- ZtringList List; List.Separator_Set(0, __T(" / "));
- List.Write(Value);
- Element_Info1(Parameter.c_str());
- Fill(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_Name, "Nero AAC codec", Unlimited, true, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_Name, List(0).substr(8, string::npos), true);
- Fill(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_Settings, List(1), true);
- Parameter.clear(); //Set as already filled
- }
- }
- if (Parameter=="Compilation" || Parameter=="HDVideo" || Parameter=="iTunesU" || Parameter=="Podcast")
- {
- if (Value==__T("1"))
- Value=__T("Yes");
- else
- Value.clear(); //This is usually set to 0 even if the user did not explicitely indicated something (default)
- }
- if (Parameter=="BPM")
- {
- if (Value==__T("0"))
- Value.clear();
- }
- if (Parameter=="ContentType")
- {
- if (Value==__T("0")) Value=__T("Movie");
- else if (Value==__T("1")) Value=__T("Music");
- else if (Value==__T("2")) Value=__T("Audiobook");
- else if (Value==__T("5")) Value=__T("Whacked Bookmark");
- else if (Value==__T("6")) Value=__T("Music Video");
- else if (Value==__T("9")) Value=__T("Short Film");
- else if (Value==__T("10")) Value=__T("TV Show");
- else if (Value==__T("11")) Value=__T("Booklet");
- else if (Value==__T("14")) Value=__T("Ringtone");
- else if (Value==__T("21")) Value=__T("Podcast");
- else Value=__T("Unknown Type");
- Fill(Stream_General, 0, General_ContentType, Value);
- }
- if (Parameter=="AppleStoreAccountType")
- {
- if (Value==__T("0"))
- Value=__T("iTunes");
- else
- Value=__T("AOL");
- Fill(Stream_General, 0, General_ServiceName, Value);
- }
- if (Parameter=="Rating")
- {
- if (Value==__T("0")) Value=__T("None");
- else if (Value==__T("2")) Value=__T("Clean");
- else Value=__T("Explicit");
- }
- if (Parameter=="AppleStoreCountry")
- {
- if (Value==__T("143441")) Value=__T("United States");
- else if (Value==__T("143442")) Value=__T("France");
- else if (Value==__T("143443")) Value=__T("Germany");
- else if (Value==__T("143444")) Value=__T("United Kingdom");
- else if (Value==__T("143445")) Value=__T("Austria");
- else if (Value==__T("143446")) Value=__T("Belgium");
- else if (Value==__T("143447")) Value=__T("Finland");
- else if (Value==__T("143448")) Value=__T("Greece");
- else if (Value==__T("143449")) Value=__T("Ireland");
- else if (Value==__T("143450")) Value=__T("Italy");
- else if (Value==__T("143451")) Value=__T("Luxembourg");
- else if (Value==__T("143452")) Value=__T("Netherlands");
- else if (Value==__T("143453")) Value=__T("Portugal");
- else if (Value==__T("143454")) Value=__T("Spain");
- else if (Value==__T("143455")) Value=__T("Canada");
- else if (Value==__T("143456")) Value=__T("Sweden");
- else if (Value==__T("143457")) Value=__T("Norway");
- else if (Value==__T("143458")) Value=__T("Denmark");
- else if (Value==__T("143459")) Value=__T("Switzerland");
- else if (Value==__T("143460")) Value=__T("Australia");
- else if (Value==__T("143461")) Value=__T("New Zealand");
- else if (Value==__T("143462")) Value=__T("Japan");
- else Value=__T("Unknown Country");
- }
- if (!Parameter.empty())
- {
- Element_Info1(Parameter.c_str());
- if (Value!=Retrieve(Stream_General, 0, Parameter.c_str()))
- Fill(Stream_General, 0, Parameter.c_str(), Value);
- }
- FILLING_END();
- }
- break;
- case Elements::moov_meta_hdlr_mdta :
- if(!moov_udta_meta_keys_List.empty())
- {
- FILLING_BEGIN();
- std::string Parameter;
- Metadata_Get(Parameter, moov_udta_meta_keys_List[moov_udta_meta_keys_ilst_Pos<moov_udta_meta_keys_List.size()?moov_udta_meta_keys_ilst_Pos:moov_udta_meta_keys_List.size()-1]);
- if (Parameter=="com.apple.quicktime.version")
- Vendor_Version=Value.SubString(__T(""), __T(" "));
- else if (Parameter=="com.apple.quicktime.player.version")
- Vendor_Version=Value.SubString(__T(""), __T(" "));
- else if (Parameter=="com.apple.quicktime.comment")
- Fill(Stream_General, 0, General_Comment, Value, true);
- else if (Parameter=="com.apple.quicktime.description")
- Fill(Stream_General, 0, General_Description, Value, true);
- else if (Parameter=="com.apple.finalcutstudio.media.uuid")
- Fill(Stream_General, 0, "Media/UUID", Value);
- else if (Parameter=="com.apple.finalcutstudio.media.history.uuid")
- Fill(Stream_General, 0, "Media/History/UUID", Value);
- else if (!Parameter.empty())
- Fill(Stream_General, 0, Parameter.c_str(), Value, true);
- FILLING_END();
- moov_udta_meta_keys_ilst_Pos++;
- }
- else
- Param2("Keys atom is missing!", 0);
- break;
- case Elements::moov_udta_meta :
- {
- FILLING_BEGIN();
- std::string Parameter;
- Metadata_Get(Parameter, (int32u)Element_Code_Get(Element_Level-1));
- if (!Parameter.empty())
- Fill(Stream_General, 0, Parameter.c_str(), Value, true);
- FILLING_END();
- }
- default: ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_meta_ilst_xxxx_mean()
-{
- Element_Name("Mean");
-
- //Parsing
- Skip_B4( "Unknown");
- Skip_Local(Element_Size-Element_Offset, "Value");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_meta_ilst_xxxx_name()
-{
- Element_Name("Name");
-
- //Parsing
- Skip_B4( "Unknown");
- Get_String(Element_Size-Element_Offset, moov_meta_ilst_xxxx_name_Name, "Value");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_meta_xml()
-{
- NAME_VERSION_FLAG("XML"); //ISO/IEC 14496-12
- INTEGRITY(moov_meta_hdlr_Type==Elements::moov_meta_hdlr_mp7t, "Bad meta type");
-
- //Parsing
- Skip_XX(Element_Size-Element_Offset, "XML dump");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_mvex()
-{
- Element_Name("Movie Extends");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_mvex_mehd()
-{
- NAME_VERSION_FLAG("Movie Extends Header");
-
- //Parsing
- int64u fragment_duration;
- Get_B_DEPENDOFVERSION(fragment_duration, "fragment_duration");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_mvex_trex()
-{
- NAME_VERSION_FLAG("Movie Extends Defaults");
-
- //Parsing
- int32u default_sample_duration;
- int32u default_sample_size;
- Get_B4 (moov_trak_tkhd_TrackID, "track_ID");
- Skip_B4( "default_sample_description_index");
- Get_B4 (default_sample_duration, "default_sample_duration");
- Get_B4 (default_sample_size, "default_sample_size");
- Element_Begin1("default_sample_flags");
- BS_Begin();
- Skip_S1(6, "reserved");
- Skip_S1(2, "sample_depends_on");
- Skip_S1(2, "sample_is_depended_on");
- Skip_S1(2, "sample_has_redundancy");
- Skip_S1(3, "sample_padding_value");
- Skip_SB( "sample_is_difference_sample");
- BS_End();
- Skip_B2( "sample_degradation_priority");
- Element_End0();
-
- FILLING_BEGIN();
- Streams[moov_trak_tkhd_TrackID].mvex_trex_default_sample_duration=default_sample_duration;
- Streams[moov_trak_tkhd_TrackID].mvex_trex_default_sample_size=default_sample_size;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_mvhd()
-{
- NAME_VERSION_FLAG("Movie header");
-
- //Parsing
- Ztring Date_Created, Date_Modified;
- int64u Duration;
- float32 a, b, u, c, d, v, x, y, w;
- int32u Rate;
- int16u Volume;
- Get_DATE1904_DEPENDOFVERSION(Date_Created, "Creation time");
- Get_DATE1904_DEPENDOFVERSION(Date_Modified, "Modification time");
- Get_B4(moov_mvhd_TimeScale, "Time scale"); Param_Info1(Ztring::ToZtring(moov_mvhd_TimeScale)+__T(" Hz"));
- Get_B_DEPENDOFVERSION(Duration, "Duration"); Param_Info1C(moov_mvhd_TimeScale, Ztring::ToZtring((int64u)Duration*1000/moov_mvhd_TimeScale)+__T(" ms"));
- Get_B4 (Rate, "Preferred rate"); Param_Info1(Ztring::ToZtring(((float32)Rate)/0x10000));
- Get_B2 (Volume, "Preferred volume"); Param_Info1(Ztring::ToZtring(((float32)Volume)/0x100));
- Skip_XX(10, "Reserved");
- Element_Begin1("Matrix structure");
- Get_BFP4(16, a, "a (width scale)");
- Get_BFP4(16, b, "b (width rotate)");
- Get_BFP4( 2, u, "u (width angle)");
- Get_BFP4(16, c, "c (height rotate)");
- Get_BFP4(16, d, "d (height scale)");
- Get_BFP4( 2, v, "v (height angle)");
- Get_BFP4(16, x, "x (position left)");
- Get_BFP4(16, y, "y (position top)");
- Get_BFP4( 2, w, "w (divider)");
- Element_End0();
- Skip_B4( "Preview time");
- Skip_B4( "Preview duration");
- Skip_B4( "Poster time");
- Skip_B4( "Selection time");
- Skip_B4( "Selection duration");
- Skip_B4( "Current time");
- Skip_B4( "Next track ID");
-
- FILLING_BEGIN();
- //if (moov_mvhd_TimeScale)
- //{
- //int32u Duration=(int32u)(((float)Duration)/TimeScale*1000);
- //Fill("Duration", Duration);
- //}
- if (Date_Created.find(__T('\r'))!=std::string::npos)
- Date_Created.resize(Date_Created.find(__T('\r')));
- if (Date_Created.find(__T('\n'))!=std::string::npos)
- Date_Created.resize(Date_Created.find(__T('\n')));
- Fill(StreamKind_Last, StreamPos_Last, "Encoded_Date", Date_Created);
- if (Date_Modified.find(__T('\r'))!=std::string::npos)
- Date_Modified.resize(Date_Modified.find(__T('\r')));
- if (Date_Modified.find(__T('\n'))!=std::string::npos)
- Date_Modified.resize(Date_Modified.find(__T('\n')));
- Fill(StreamKind_Last, StreamPos_Last, "Tagged_Date", Date_Modified);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak()
-{
- Element_Name("Track");
-
- FILLING_BEGIN();
- Fill_Flush();
- moov_trak_tkhd_TrackID=(int32u)-1;
- moov_trak_tkhd_Width=0;
- moov_trak_tkhd_Height=0;
- moov_trak_tkhd_DisplayAspectRatio=0;
- moov_trak_tkhd_Rotation=0;
- Stream_Prepare(Stream_Max); //clear filling
- Streams.erase((int32u)-1);
- Fill(StreamKind_Last, StreamPos_Last, General_StreamOrder, StreamOrder);
- ++StreamOrder;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_edts()
-{
- Element_Name("Edit");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_edts_elst()
-{
- NAME_VERSION_FLAG("Edit List");
-
- //Parsing
- int32u Count;
- Get_B4 (Count, "Number of entries");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- stream::edts_struct edts;
- Element_Begin1("Entry");
- Get_B4 (edts.Duration, "Track duration"); Param_Info2C(moov_mvhd_TimeScale, (int64u)edts.Duration*1000/moov_mvhd_TimeScale, " ms");
- Get_B4 (edts.Delay, "Media time"); Param_Info2C(moov_mvhd_TimeScale && (edts.Delay!=(int32u)-1), (int64u)edts.Delay*1000/moov_mvhd_TimeScale, " ms");
- Get_B4 (edts.Rate, "Media rate"); Param_Info1(((float)edts.Rate)/0x10000);
- Element_End0();
-
- Streams[moov_trak_tkhd_TrackID].edts.push_back(edts);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_load()
-{
- Element_Name("Preload");
-
- //Parsing
- Info_B4(PreloadTime, "Preload time"); Param_Info2C(moov_mvhd_TimeScale, PreloadTime*1000/moov_mvhd_TimeScale, " ms");
- Info_B4(PreloadFlags, "Flags");
- Skip_Flags(PreloadFlags, 0, "PreloadAlways");
- Skip_Flags(PreloadFlags, 1, "TrackEnabledPreload");
- Info_B4(HintFlags, "Hint flags");
- Skip_Flags(HintFlags, 2, "KeepInBuffer");
- Skip_Flags(HintFlags, 8, "HighQuality");
- Skip_Flags(HintFlags, 20, "SingleFieldPlayback");
- Skip_Flags(HintFlags, 26, "DeinterlaceFields");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia()
-{
- Element_Name("Media");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_hdlr()
-{
- NAME_VERSION_FLAG("Handler Reference");
-
- //Parsing
- Ztring Title;
- int32u Type, SubType, Manufacturer;
- int8u Size;
- Get_C4 (Type, "Component type");
- Get_C4 (SubType, "Component subtype");
- Get_C4 (Manufacturer, "Component manufacturer");
- Skip_B4( "Component flags");
- Skip_B4( "Component flags mask");
- if (Element_Offset<Element_Size)
- {
- Peek_B1(Size);
- if (Element_Offset+1+Size==Element_Size)
- {
- Skip_B1( "Component name size");
- Get_Local(Size, Title, "Component name");
- }
- else
- {
- std::string TitleS;
- Get_String(Element_Size-Element_Offset, TitleS, "Component name");
- Title.From_UTF8(TitleS.c_str());
- if (Title.empty())
- Title.From_Local(TitleS.c_str()); //Trying Local...
- }
- if (Title.find(__T("Handler"))!=std::string::npos || Title.find(__T("handler"))!=std::string::npos || Title.find(__T("vide"))!=std::string::npos || Title.find(__T("soun"))!=std::string::npos || Title==Ztring().From_CC4(SubType))
- Title.clear(); //This is not a Title
- }
-
- FILLING_BEGIN();
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty()) Fill(StreamKind_Last, StreamPos_Last, "Title", Title);
-
- switch (SubType)
- {
- case Elements::moov_trak_mdia_hdlr_clcp :
- if (StreamKind_Last!=Stream_Text)
- {
- Stream_Prepare(Stream_Text);
- }
- break;
- case Elements::moov_trak_mdia_hdlr_data :
- if (StreamKind_Last!=Stream_Other)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Data");
- }
- break;
- case Elements::moov_trak_mdia_hdlr_soun :
- if (StreamKind_Last!=Stream_Audio)
- {
- Stream_Prepare(Stream_Audio);
- }
- break;
- case Elements::moov_trak_mdia_hdlr_vide :
- if (StreamKind_Last!=Stream_Video)
- {
- Stream_Prepare(Stream_Video);
- }
- break;
- case Elements::moov_trak_mdia_hdlr_text :
- case Elements::moov_trak_mdia_hdlr_sbtl :
- if (StreamKind_Last!=Stream_Text)
- {
- if (Streams[moov_trak_tkhd_TrackID].IsChapter)
- Stream_Prepare(Stream_Menu);
- else
- {
- Stream_Prepare(Stream_Text);
- if (SubType!=Elements::moov_trak_mdia_hdlr_text)
- Fill(Stream_Text, StreamPos_Last, Text_MuxingMode, Ztring().From_CC4(SubType));
- }
- }
- break;
- case Elements::moov_trak_mdia_hdlr_twen :
- if (StreamKind_Last!=Stream_Text)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Tween");
- }
- break;
- case Elements::moov_trak_mdia_hdlr_tmcd :
- if (StreamKind_Last!=Stream_Text)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Time code");
- Fill(Stream_Other, StreamPos_Last, Other_Format, "QuickTime TC");
- }
- break;
- case Elements::moov_trak_mdia_hdlr_subp :
- if (StreamKind_Last!=Stream_Text)
- {
- Stream_Prepare(Stream_Text);
- CodecID_Fill(__T("subp"), Stream_Text, StreamPos_Last, InfoCodecID_Format_Mpeg4);
- Fill(StreamKind_Last, StreamPos_Last, Text_Codec, "subp");
- }
- break;
- case Elements::moov_trak_mdia_hdlr_subt :
- if (StreamKind_Last!=Stream_Text)
- {
- Stream_Prepare(Stream_Text);
- }
- break;
- case Elements::moov_trak_mdia_hdlr_MPEG :
- mdat_MustParse=true; //Data is in MDAT
- case Elements::moov_trak_mdia_hdlr_alis :
- //Stream_Prepare(Stream_Other);
- //Fill(Stream_Other, StreamPos_Last, Other_Type, "Alias"); //TODO: what is the meaning of such hdlr?
- break;
- case Elements::moov_trak_mdia_hdlr_hint :
- //Stream_Prepare(Stream_Other);
- //Fill(Stream_Other, StreamPos_Last, Other_Type, "Hint"); //TODO: what is the meaning of such hdlr?
- break;
- case Elements::moov_trak_mdia_hdlr_ocsm :
- if (StreamKind_Last!=Stream_Other)
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Object content information");
- break;
- case Elements::moov_trak_mdia_hdlr_odsm :
- if (StreamKind_Last!=Stream_Other)
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Object description");
- break;
- case Elements::moov_trak_mdia_hdlr_sdsm :
- if (StreamKind_Last!=Stream_Other)
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Scene description");
- break;
- default:
- if (!Streams[moov_trak_tkhd_TrackID].hdlr_SubType) //TODO: check what is the best method to detect SubType (moov_trak_mdia_hdlr vs moov_trak_mdia_minf_hdlr)
- {
- Streams[moov_trak_tkhd_TrackID].hdlr_Type=Type;
- Streams[moov_trak_tkhd_TrackID].hdlr_SubType=SubType;
- Streams[moov_trak_tkhd_TrackID].hdlr_Manufacturer=Manufacturer;
- }
- }
-
- if (StreamKind_Last!=Stream_Max)
- {
- Streams[moov_trak_tkhd_TrackID].StreamKind=StreamKind_Last;
- Streams[moov_trak_tkhd_TrackID].StreamPos=StreamPos_Last;
- }
-
- if (Manufacturer!=0x00000000)
- {
- if (Vendor==0x00000000)
- Vendor=Manufacturer;
- else if (Vendor!=Manufacturer)
- Vendor=0xFFFFFFFF; //Two names, this is two much
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_imap()
-{
- Element_Name("Non-primary source input map");
-
- //Parsing
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_imap_sean()
-{
- //Parsing
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_imap_sean___in()
-{
- Element_Name("Input");
-
- //Parsing
- Skip_B4( "Atom ID");
- Skip_B2( "Zero");
- Skip_B2( "Number of internal atoms");
- Skip_B4( "Zero");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_imap_sean___in___ty()
-{
- Element_Name("Input type");
-
- //Parsing
- Info_B4(TypeModifierName, "Type modifier name"); Param_Info1(Mpeg4_TypeModifierName(TypeModifierName));
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_imap_sean___in_dtst()
-{
- //Parsing
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
- Skip_C4( "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_imap_sean___in_obid()
-{
- Element_Name("Object ID");
-
- //Parsing
- Skip_B4( "Object ID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_mdhd()
-{
- NAME_VERSION_FLAG("Media Header");
-
- //Parsing
- Ztring Date_Created, Date_Modified;
- int64u Duration;
- int32u TimeScale;
- int16u Language;
- Get_DATE1904_DEPENDOFVERSION(Date_Created, "Creation time");
- Get_DATE1904_DEPENDOFVERSION(Date_Modified, "Modification time");
- Get_B4(TimeScale, "Time scale");
- Get_B_DEPENDOFVERSION(Duration, "Duration"); Param_Info2C(TimeScale, Duration*1000/TimeScale, " ms");
- Get_B2 (Language, "Language"); Param_Info1(Language_Get(Language));
- Skip_B2( "Quality");
-
- FILLING_BEGIN();
- Fill(StreamKind_Last, StreamPos_Last, "Language", Language_Get(Language));
- Streams[moov_trak_tkhd_TrackID].mdhd_Duration=Duration;
- Streams[moov_trak_tkhd_TrackID].mdhd_TimeScale=TimeScale;
-
- //Coherency tests
- if (Streams[moov_trak_tkhd_TrackID].tkhd_Duration*1.01>=Duration*0.99 && Streams[moov_trak_tkhd_TrackID].tkhd_Duration*0.99<=Duration*1.01 && TimeScale && moov_mvhd_TimeScale!=TimeScale && moov_mvhd_TimeScale)
- {
- float64 Ratio=((float64)TimeScale)/((float64)moov_mvhd_TimeScale);
- Streams[moov_trak_tkhd_TrackID].tkhd_Duration=float64_int64s(Streams[moov_trak_tkhd_TrackID].tkhd_Duration/Ratio);
- Clear(StreamKind_Last, StreamPos_Last, "Duration_Source");
- Fill(StreamKind_Last, StreamPos_Last, "Duration", float64_int64s(((float64)Streams[moov_trak_tkhd_TrackID].tkhd_Duration)*1000/((float64)moov_mvhd_TimeScale)), 10, true);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf()
-{
- Element_Name("Media Information");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_code()
-{
- Element_Name("code (found in Avid?)");
-
- //Parsing
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_code_sean()
-{
- Element_Name("sean (found in Avid?)");
-
- //Parsing
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_code_sean_RU_A()
-{
- Element_Name("RU*A (found in Avid?)");
-
- //Parsing
- Ztring Path;
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
- Get_Local(Element_Size-Element_Offset, Path, "Path?");
-
- FILLING_BEGIN();
- Streams[moov_trak_tkhd_TrackID].File_Name=Path;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_dinf()
-{
- Element_Name("Data Information");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_dinf_url_()
-{
- NAME_VERSION_FLAG("Data Location");
-
- //Parsing
- Skip_Local(Element_Size-Element_Offset, "location");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_dinf_urn_()
-{
- NAME_VERSION_FLAG("Data Name");
-
- //Parsing
- Skip_Local(Element_Size-Element_Offset, "name TODO location after null string");
- //Skip_Local(Element_Size, location);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_dinf_dref()
-{
- NAME_VERSION_FLAG("Data Reference");
-
- //Parsing
- Skip_B4( "entry_count");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_dinf_dref_alis()
-{
- NAME_VERSION_FLAG("Alias"); //bit 0 = external/internal data
-
- //Often empty
- bool IsInternal;
- Get_Flags (Flags, 0, IsInternal, "IsInternal");
- if (IsInternal)
- return; //Internal stream, no alias
-
- //Parsing
- Ztring file_name_string, volume_name_string, Directory_Name;
- int16u record_size, record_version, alias_kind;
- int8u volume_name_string_length, file_name_string_length;
- Element_Begin1("Mac OS Alias Record");
- Skip_B4( "user type name/app creator code");
- Get_B2 (record_size, "record size");
- Get_B2 (record_version, "record version");
- if (record_version!=2)
- {
- Skip_XX(Element_Size-Element_Offset, "unknown");
- return;
- }
- int64u End=Element_Offset-8+record_size;
- if (End>Element_Size)
- End=Element_Size; //Found one file having record_size = the size of the atom, header included
- Get_B2 (alias_kind, "alias kind"); Param_Info1(alias_kind?"directory":"file");
- Get_B1 (volume_name_string_length, "volume name string length");
- if (volume_name_string_length>27)
- volume_name_string_length=27;
- Get_Local(volume_name_string_length, volume_name_string, "volume name string");
- if (volume_name_string_length<27)
- Skip_XX(27-volume_name_string_length, "volume name string padding");
- Skip_B4( "volume created mac local date"); //seconds since beginning 1904 to 2040
- Skip_B2( "file system type");
- Skip_B2( "drive type");
- Skip_B4( "parent directory ID");
- Get_B1 (file_name_string_length, "file name string length");
- if (file_name_string_length>99)
- file_name_string_length=99;
- Get_Local(file_name_string_length, file_name_string, "file name string");
- if (file_name_string_length<63)
- Skip_XX(63-file_name_string_length, "file name string padding");
- if (file_name_string_length<=63)
- Skip_B4( "file number");
- else if (file_name_string_length<67)
- Skip_XX(67-file_name_string_length, "file name string padding (hack)");
- if (file_name_string_length<=67)
- Skip_B4( "file created mac local date");
- else if (file_name_string_length<71)
- Skip_XX(71-file_name_string_length, "file name string padding (hack)");
- if (file_name_string_length<=71)
- Skip_B4( "file type name");
- else if (file_name_string_length<75)
- Skip_XX(75-file_name_string_length, "file name string padding (hack)");
- if (file_name_string_length<=75)
- Skip_B4( "file creator name");
- else if (file_name_string_length<79)
- Skip_XX(79-file_name_string_length, "file name string padding (hack)");
- if (file_name_string_length<=79)
- Skip_B2( "next level up from alias");
- else if (file_name_string_length<81)
- Skip_XX(81-file_name_string_length, "file name string padding (hack)");
- if (file_name_string_length<=81)
- Skip_B2( "next level down to target");
- else if (file_name_string_length<83)
- Skip_XX(83-file_name_string_length, "file name string padding (hack)");
- if (file_name_string_length<=83)
- Skip_B4( "volume attributes");
- else if (file_name_string_length<87)
- Skip_XX(87-file_name_string_length, "file name string padding (hack)");
- if (file_name_string_length<=87)
- Skip_B2( "volume file system ID");
- else if (file_name_string_length<89)
- Skip_XX(89-file_name_string_length, "file name string padding (hack)");
- if (file_name_string_length<=89)
- Skip_XX(10, "Reserved");
- else if (file_name_string_length<99)
- Skip_XX(99-file_name_string_length, "file name string padding (hack)");
- while(Element_Offset<End)
- {
- Trusted++;
- int16u type, size;
- Get_B2 (type, "type");
- Get_B2 (size, "size");
- switch (type)
- {
- case 0x0000 :
- Get_Local(size, Directory_Name, "Directory Name");
- break;
- case 0x0002 :
- Skip_Local(size, "Absolute Path");
- break;
- case 0xFFFF :
- Skip_XX(End-Element_Offset, "Padding");
- break;
- default :
- Skip_Local(size, "Unknown");
- }
- if (size%2)
- Skip_B1( "Padding");
- }
- Element_End0();
-
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Padding");
-
- FILLING_BEGIN();
- if (Streams[moov_trak_tkhd_TrackID].File_Name.empty()) //Priority to "code" version
- {
- if (!Directory_Name.empty())
- {
- Streams[moov_trak_tkhd_TrackID].File_Name+=Directory_Name;
- Streams[moov_trak_tkhd_TrackID].File_Name+=ZenLib::PathSeparator;
- }
- Streams[moov_trak_tkhd_TrackID].File_Name+=file_name_string;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_dinf_dref_rsrc()
-{
- Element_Name("Resource alias");
-
- //Parsing
- Skip_B4( "Flags"); //bit 0 = external/internal data
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_gmhd()
-{
- Element_Name("Generic Media Header");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_gmhd_gmin()
-{
- NAME_VERSION_FLAG("Generic Media Info");
-
- //Parsing
- Skip_B2( "Graphics mode");
- Skip_B2( "Opcolor (red)");
- Skip_B2( "Opcolor (green)");
- Skip_B2( "Opcolor (blue)");
- Skip_B2( "Balance");
- Skip_B2( "Reserved");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_gmhd_tmcd()
-{
- Element_Name("TimeCode");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_gmhd_tcmi()
-{
- moov_trak_mdia_minf_gmhd_tmcd_tcmi();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_gmhd_tmcd_tcmi()
-{
- NAME_VERSION_FLAG("TimeCode Media Information");
-
- //Parsing
- int8u FontNameSize;
- bool IsVisual;
- Get_Flags (Flags, 0, IsVisual, "IsVisual");
- Skip_B2( "Text font");
- Info_B2(TextFace, "Text face");
- Skip_Flags(TextFace, 0, "Bold");
- Skip_Flags(TextFace, 1, "Italic");
- Skip_Flags(TextFace, 2, "Underline");
- Skip_Flags(TextFace, 3, "Outline");
- Skip_Flags(TextFace, 4, "Shadow");
- Skip_Flags(TextFace, 5, "Condense");
- Skip_Flags(TextFace, 6, "Extend");
- if (Element_Size>=25 && 25+Buffer[Buffer_Offset+24]==Element_Size)
- Skip_BFP4(16, "Text size"); //Non-Standard, but found in several files
- else
- Skip_B2( "Text size");
- Skip_B2( "Text color (red)");
- Skip_B2( "Text color (green)");
- Skip_B2( "Text color (blue)");
- Skip_B2( "Background color (red)");
- Skip_B2( "Background color (green)");
- Skip_B2( "Background color (blue)");
- Get_B1 (FontNameSize, "Font name size");
- Skip_Local(FontNameSize, "Font name");
-
- FILLING_BEGIN();
- Streams[moov_trak_tkhd_TrackID].TimeCode_IsVisual=IsVisual;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_hint()
-{
- NAME_VERSION_FLAG("Hint");
-
- //Parsing
- Skip_B2( "Maximum packet delivery unit");
- Skip_B2( "Average packet delivery unit");
- Skip_B4( "Maximum bit rate");
- Skip_B4( "Average bit rate");
- Skip_B4( "Reserved");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_hdlr()
-{
- moov_trak_mdia_hdlr();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_hmhd()
-{
- NAME_VERSION_FLAG("Hint Media Header");
-
- //Parsing
- Skip_B2( "maxPDUsize");
- Skip_B2( "avgPDUsize");
- Skip_B4( "maxbitrate");
- Skip_B4( "avgbitrate");
- Skip_B4( "reserved");
-
- FILLING_BEGIN();
- if (StreamKind_Last==Stream_Max) //Note: some files have both vmhd and hmhd, I don't know the meaning of such header, so skipping hmhd for the moment
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Hint");
- Streams[moov_trak_tkhd_TrackID].StreamKind=Stream_Other;
- Streams[moov_trak_tkhd_TrackID].StreamPos=StreamPos_Last;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_nmhd()
-{
- NAME_VERSION_FLAG("Null Media Header");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_smhd()
-{
- NAME_VERSION_FLAG("Sound Media Header");
-
- //Parsing
- Skip_B2( "Audio balance");
- Skip_B2( "Reserved");
-
- FILLING_BEGIN();
- if (StreamKind_Last!=Stream_Audio)
- Stream_Prepare(Stream_Audio);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_vmhd()
-{
- NAME_VERSION_FLAG("Video Media Header")
-
- //Parsing
- Skip_B2( "Graphic mode");
- Skip_B2( "Graphic mode color R");
- Skip_B2( "Graphic mode color G");
- Skip_B2( "Graphic mode color B");
-
- FILLING_BEGIN();
- if (StreamKind_Last!=Stream_Video)
- {
- Stream_Prepare(Stream_Video);
- Streams[moov_trak_tkhd_TrackID].StreamKind=Stream_Video;
- Streams[moov_trak_tkhd_TrackID].StreamPos=StreamPos_Last;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_sthd()
-{
- NAME_VERSION_FLAG("Subtitle Media Header")
-
- FILLING_BEGIN();
- if (StreamKind_Last!=Stream_Text)
- {
- Stream_Prepare(Stream_Text);
- Streams[moov_trak_tkhd_TrackID].StreamKind=Stream_Text;
- Streams[moov_trak_tkhd_TrackID].StreamPos=StreamPos_Last;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl()
-{
- Element_Name("Sample Table");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_co64()
-{
- NAME_VERSION_FLAG("Chunk offset");
-
- int64u Offset;
- int32u Count;
- Get_B4 (Count, "Number of entries");
-
- if (Count==0)
- return;
-
- std::vector<int64u> &stco=Streams[moov_trak_tkhd_TrackID].stco;
- stco.resize(Count<FrameCount_MaxPerStream?Count:FrameCount_MaxPerStream);
- int64u* stco_Data=&stco[0];
-
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- //Too much slow
- /*
- Get_B8 (Offset, "Offset");
- */
-
- //Faster
- if (Element_Offset+8>Element_Size)
- break; //Problem
- Offset=BigEndian2int64u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=8;
-
- if (Pos<FrameCount_MaxPerStream)
- {
- (*stco_Data)=Offset;
- stco_Data++;
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_cslg()
-{
- Element_Name("Composition Shift Least Greatest");
-
- //Parsing
- Skip_XX(Element_Size, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_ctts()
-{
- NAME_VERSION_FLAG("Composition Time To Sample");
-
- //Parsing
- int32u entry_count;
- Get_B4 (entry_count, "entry_count");
-
- //Currently no usage
- //for (int32u Pos=0; Pos<entry_count; Pos++)
- {
- //int32u sample_count, sample_offset;
-
- //Too much slow
- /*
- Get_B4 (sample_count, "sample_count");
- Get_B4 (sample_offset, "sample_offset");
- */
-
- //Faster
- /*
- if (Element_Offset+8>Element_Size)
- break; //Problem
- sample_count =BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset );
- sample_offset=BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset+4);
- Element_Offset+=8;
- */
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_sdtp()
-{
- Element_Name("Sample Dependency");
-
- //Parsing
- Skip_XX(Element_Size, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stco()
-{
- NAME_VERSION_FLAG("Chunk offset");
-
- int32u Count, Offset;
- Get_B4 (Count, "Number of entries");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- //Too much slow
- /*
- Get_B4 (Offset, "Offset");
- */
-
- //Faster
- if (Element_Offset+4>Element_Size)
- break; //Problem
- Offset=BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=4;
-
- if (Pos<FrameCount_MaxPerStream)
- Streams[moov_trak_tkhd_TrackID].stco.push_back(Offset);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stdp()
-{
- Element_Name("Degradation Priority");
-
- //Parsing
- int32u sample_count;
- Get_B4 (sample_count, "sample-count");
-
- for (int32u Pos=0; Pos<sample_count; Pos++)
- {
- Skip_B2( "priority");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stps()
-{
- NAME_VERSION_FLAG("Partial Sync Sample");
-
- //Parsing
- int32u sample_count;
- Get_B4 (sample_count, "sample-count");
-
- int32u Offset=1; //By default, begin at 1
- bool stss_PreviouslyEmpty=Streams[moov_trak_tkhd_TrackID].stss.empty();
- for (int32u Pos=0; Pos<sample_count; Pos++)
- {
- int32u sample_number;
-
- //Too much slow
- /*
- Get_B4 (sample_number, "sample-number");
- */
-
- //Faster
- if (Element_Offset+4>Element_Size)
- break; //Problem
- sample_number=BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=4;
-
- //Coherency testing (first frame is 0 or 1)
- if (sample_number==0 && Offset)
- {
- for (size_t Pos=0; Pos<Streams[moov_trak_tkhd_TrackID].stss.size(); Pos++)
- Streams[moov_trak_tkhd_TrackID].stss[Pos]--;
- Offset=0;
- }
-
- Streams[moov_trak_tkhd_TrackID].stss.push_back(sample_number-Offset);
- }
- if (!stss_PreviouslyEmpty)
- std::sort(Streams[moov_trak_tkhd_TrackID].stss.begin(), Streams[moov_trak_tkhd_TrackID].stss.end());
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsc()
-{
- NAME_VERSION_FLAG("Sample To Chunk");
-
- //Parsing
- int32u Count;
- stream::stsc_struct Stsc;
- Get_B4 (Count, "Number of entries");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- //Too much slow
- /*
- Element_Begin1("Entry", 12);
- int32u SampleDescriptionId;
- Get_B4 (Stsc.FirstChunk, "First chunk");
- Get_B4 (Stsc.SamplesPerChunk, "Samples per chunk");
- Get_B4 (SampleDescriptionId, "Sample description ID");
- Element_Info1(Stsc.FirstChunk);
- Element_Info1(Stsc.SamplesPerChunk);
- Element_Info1(SampleDescriptionId);
- Element_End0();
- Streams[moov_trak_tkhd_TrackID].stsc.push_back(Stsc);
- */
-
- //Faster
- if (Pos<FrameCount_MaxPerStream)
- {
- if (Element_Offset+12>Element_Size)
- break; //Problem
- Stsc.FirstChunk =BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset );
- Stsc.SamplesPerChunk=BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset+4);
- Element_Offset+=12;
-
- Streams[moov_trak_tkhd_TrackID].stsc.push_back(Stsc);
- }
- else
- Element_Offset=Element_Size; //No need
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd()
-{
- NAME_VERSION_FLAG("Sample Description");
-
- //Parsing
- Skip_B4( "Count");
-
- //Filling
- moov_trak_mdia_minf_stbl_stsd_Pos=0;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_stpp()
-{
- Element_Name("Subtitle (stpp)");
-
- //Parsing
- string NameSpace;
- Skip_B4( "Reserved");
- Skip_B2( "Reserved");
- Skip_B2( "Data reference index");
- size_t Pos=(size_t)Element_Offset;
- while (Pos<Element_Size)
- {
- if (Buffer[Buffer_Offset+Pos]=='\0')
- break;
- Pos++;
- }
- Get_String(Pos+1-Element_Offset, NameSpace, "namespace");
- Pos=(size_t)Element_Offset;
- while (Pos<Element_Size)
- {
- if (Buffer[Buffer_Offset+Pos]=='\0')
- break;
- Pos++;
- }
- Skip_Local(Pos+1-Element_Offset, "schema_location");
- Pos=(size_t)Element_Offset;
- while (Pos<Element_Size)
- {
- if (Buffer[Buffer_Offset+Pos]=='\0')
- break;
- Pos++;
- }
- Skip_Local(Pos+1-Element_Offset, "image_mime_type");
-
- FILLING_BEGIN();
- CodecID_Fill(__T("stpp"), StreamKind_Last, StreamPos_Last, InfoCodecID_Format_Mpeg4);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), "stpp", Unlimited, true, true);
- if (NameSpace.find("smpte-tt")!=string::npos)
- {
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), "Timed Text", Unlimited, true, true);
-
- #ifdef MEDIAINFO_TIMEDTEXT_YES
- File_TimedText* Parser=new File_TimedText;
- int64u Elemen_Code_Save=Element_Code;
- Element_Code=moov_trak_tkhd_TrackID; //Element_Code is use for stream identifier
- Open_Buffer_Init(Parser);
- Element_Code=Elemen_Code_Save;
- Parser->IsChapter=Streams[moov_trak_tkhd_TrackID].IsChapter;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- mdat_MustParse=true; //Data is in MDAT
- #endif //MEDIAINFO_TIMEDTEXT_YES
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_text()
-{
- Element_Name("Text (Apple)");
-
- //Parsing
- int8u TextName_Size;
- Skip_B4( "Reserved");
- Skip_B2( "Reserved");
- Skip_B2( "Data reference index");
- Info_B4(Flags, "Display flags");
- Skip_Flags(Flags, 1, "Don't auto scale");
- Skip_Flags(Flags, 3, "Use movie background color");
- Skip_Flags(Flags, 5, "Scroll in");
- Skip_Flags(Flags, 6, "Scroll out");
- Skip_Flags(Flags, 7, "Horizontal scroll");
- Skip_Flags(Flags, 8, "Reverse scroll");
- Skip_Flags(Flags, 9, "Continuous scroll");
- Skip_Flags(Flags, 12, "Drop shadow");
- Skip_Flags(Flags, 13, "Anti-alias");
- Skip_Flags(Flags, 14, "Key text");
- Skip_B4( "Text justification");
- Skip_B2( "Background color (Red)");
- Skip_B2( "Background color (Green)");
- Skip_B2( "Background color (Blue)");
- Element_Begin1("Default text box");
- Skip_B2( "top");
- Skip_B2( "left");
- Skip_B2( "bottom");
- Skip_B2( "right");
- Element_End0();
- Skip_B8( "Reserved");
- Skip_B2( "Font number");
- Info_B2(FontFace, "Font face");
- Skip_Flags(FontFace, 0, "Bold");
- Skip_Flags(FontFace, 1, "Italic");
- Skip_Flags(FontFace, 2, "Underline");
- Skip_Flags(FontFace, 3, "Outline");
- Skip_Flags(FontFace, 4, "Shadow");
- Skip_Flags(FontFace, 5, "Condense");
- Skip_Flags(FontFace, 6, "Extend");
- Skip_B1( "Reserved");
- Skip_B1( "Reserved"); //Specs say 16-bits, but not in coherency with my test sample
- Skip_B2( "Foreground color (Red)");
- Skip_B2( "Foreground color (Green)");
- Skip_B2( "Foreground color (Blue)");
- Get_B1 (TextName_Size, "Text name size");
- Skip_Local(TextName_Size, "Text name");
-
- FILLING_BEGIN();
- CodecID_Fill(__T("text"), StreamKind_Last, StreamPos_Last, InfoCodecID_Format_Mpeg4);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), "text", Unlimited, true, true);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), "Timed Text", Unlimited, true, true);
-
- #ifdef MEDIAINFO_TIMEDTEXT_YES
- File_TimedText* Parser=new File_TimedText;
- int64u Elemen_Code_Save=Element_Code;
- Element_Code=moov_trak_tkhd_TrackID; //Element_Code is use for stream identifier
- Open_Buffer_Init(Parser);
- Element_Code=Elemen_Code_Save;
- Parser->IsChapter=Streams[moov_trak_tkhd_TrackID].IsChapter;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- mdat_MustParse=true; //Data is in MDAT
- #endif //MEDIAINFO_TIMEDTEXT_YES
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_tmcd()
-{
- Element_Name("TimeCode");
-
- //Parsing
- stream::timecode *tc=new stream::timecode();
- int32u TimeCodeFlags;
- int8u NumberOfFrames;
- Skip_B4( "Reserved");
- Skip_B2( "Reserved");
- Skip_B2( "Data reference index");
- Skip_B4( "Reserved");
- Get_B4 (TimeCodeFlags, "Flags (timecode)");
- Get_Flags (TimeCodeFlags, 0, tc->DropFrame, "Drop frame");
- Get_Flags (TimeCodeFlags, 1, tc->H24, "24 hour max ");
- Get_Flags (TimeCodeFlags, 2, tc->NegativeTimes, "Negative times OK");
- Skip_Flags(TimeCodeFlags, 3, "Counter");
- Get_B4 (tc->TimeScale, "Time scale");
- Get_B4 (tc->FrameDuration, "Frame duration");
- Get_B1 (NumberOfFrames, "Number of frames");
- if (Element_Size==Element_Offset+3 || (Element_Size>=Element_Offset+7 && Element_Size>=Element_Offset+7+BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset+3)))
- Skip_B3( "Reserved");
- else
- Skip_B1( "Reserved"); //Non-standard but several files are like that
-
- FILLING_BEGIN();
- //Bug in one file
- if (tc->TimeScale==25 && tc->FrameDuration==100)
- tc->TimeScale=2500;
-
- if (StreamKind_Last!=Stream_Other)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Time code");
- Fill(Stream_Other, StreamPos_Last, Other_Format, "QuickTime TC");
- Streams[moov_trak_tkhd_TrackID].StreamKind=Stream_Other;
- Streams[moov_trak_tkhd_TrackID].StreamPos=StreamPos_Last;
- }
-
- //Filling
- Streams[moov_trak_tkhd_TrackID].TimeCode=tc;
-
- //Preparing TimeCode parser
- File_Mpeg4_TimeCode* Parser=new File_Mpeg4_TimeCode;
- Open_Buffer_Init(Parser);
- mdat_Pos_ToParseInPriority_StreamIDs.push_back(moov_trak_tkhd_TrackID);
- Streams[moov_trak_tkhd_TrackID].IsPriorityStream=true;
- ((File_Mpeg4_TimeCode*)Parser)->NumberOfFrames=NumberOfFrames; //tc->FrameDuration?(((float64)tc->TimeScale)/tc->FrameDuration):0;
- ((File_Mpeg4_TimeCode*)Parser)->DropFrame=tc->DropFrame;
- ((File_Mpeg4_TimeCode*)Parser)->NegativeTimes=tc->NegativeTimes;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- mdat_MustParse=true; //Data is in MDAT
- FILLING_ELSE();
- delete tc; //tc=NULL;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_tmcd_name()
-{
- Element_Name("Name (TimeCode)");
-
- //Parsing
- Ztring Value;
- int16u Size, Language;
- Get_B2(Size, "Size");
- Get_B2(Language, "Language"); Param_Info1(Language_Get(Language));
- if (Size)
- {
- int8u Junk;
- Peek_B1(Junk);
- if (Junk<0x20)
- {
- Skip_B1( "Junk");
- Size--;
- }
- }
- Get_Local(Size, Value, "Value");
-
- FILLING_BEGIN();
- Fill(Stream_Other, StreamPos_Last, "Title", Value);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_tx3g()
-{
- Element_Name("Text");
-
- //Parsing
- Skip_B4( "Reserved");
- Skip_B2( "Reserved");
- Skip_B2( "Data reference index");
- Info_B4(Flags, "displayFlags");
- Skip_Flags(Flags, 5, "Scroll in");
- Skip_Flags(Flags, 6, "Scroll out");
- Skip_Flags(Flags, 7, "Horizontal scroll");
- Skip_Flags(Flags, 8, "Reverse scroll");
- Skip_Flags(Flags, 10, "Continuous karaoke");
- Skip_Flags(Flags, 17, "write text vertically");
- Skip_Flags(Flags, 18, "fill text region");
- Skip_B1( "horizontal-justification");
- Skip_B1( "vertical-justification");
- Skip_B1( "background-color-rgba (red)");
- Skip_B1( "background-color-rgba (green)");
- Skip_B1( "background-color-rgba (blue)");
- Skip_B1( "background-color-rgba (alpha)");
- Element_Begin1("default-text-box");
- if (Element_Size>42 && CC4(Buffer+Buffer_Offset+38)==Elements::moov_trak_mdia_minf_stbl_stsd_tx3g_ftab)
- {
- Skip_B1( "top"); //Specs say 16-bits, but not in coherency with a test sample
- Skip_B1( "left"); //Specs say 16-bits, but not in coherency with a test sample
- Skip_B1( "bottom"); //Specs say 16-bits, but not in coherency with a test sample
- Skip_B1( "right"); //Specs say 16-bits, but not in coherency with a test sample
- }
- else
- {
- Skip_B2( "top");
- Skip_B2( "left");
- Skip_B2( "bottom");
- Skip_B2( "right");
- }
- Element_End0();
- Element_Begin1("default-style");
- Skip_B2( "startChar");
- Skip_B2( "endChar");
- Skip_B2( "font-ID");
- Skip_B1( "face-style-flags");
- Skip_B1( "font-size");
- Skip_B1( "text-color-rgba (red)");
- Skip_B1( "text-color-rgba (green)");
- Skip_B1( "text-color-rgba (blue)");
- Skip_B1( "text-color-rgba (alpha)");
- Element_End0();
-
- FILLING_BEGIN();
- CodecID_Fill(__T("tx3g"), StreamKind_Last, StreamPos_Last, InfoCodecID_Format_Mpeg4);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), "tx3g", Unlimited, true, true);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), "Timed Text", Unlimited, true, true);
-
- #ifdef MEDIAINFO_TIMEDTEXT_YES
- File_TimedText* Parser=new File_TimedText;
- int64u Elemen_Code_Save=Element_Code;
- Element_Code=moov_trak_tkhd_TrackID; //Element_Code is use for stream identifier
- Open_Buffer_Init(Parser);
- Element_Code=Elemen_Code_Save;
- Parser->IsChapter=Streams[moov_trak_tkhd_TrackID].IsChapter;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- mdat_MustParse=true; //Data is in MDAT
- #endif //MEDIAINFO_TIMEDTEXT_YES
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_tx3g_ftab()
-{
- Element_Name("Font table");
-
- //Found strange data in one file, but no specs about this
- if (Element_Size==0x17-8 && (BigEndian2int16u(Buffer+Buffer_Offset)!=1 || BigEndian2int16u(Buffer+Buffer_Offset+4)!=0x17-8-5))
- {
- Skip_XX(Element_Size, "Unknown");
- return;
- }
-
- //Parsing
- int16u entry_count;
- Get_B2 (entry_count, "entry-count");
-
- for (int16u Pos=0; Pos<entry_count; Pos++)
- {
- int8u FontName_Length;
- Skip_B2( "font-ID");
- Get_B1 (FontName_Length, "font-name-length");
- Skip_Local(FontName_Length, "font-name");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx()
-{
- //Parsing
- Skip_B6( "Reserved");
- Skip_B2( "Data reference index");
-
- FILLING_BEGIN()
- if (StreamKind_Last==Stream_Max)
- {
- switch (Element_Code)
- {
- case Elements::moov_trak_mdia_minf_stbl_stsd_mp4a : Stream_Prepare(Stream_Audio); break;
- case Elements::moov_trak_mdia_minf_stbl_stsd_mp4v : Stream_Prepare(Stream_Video); break;
- case Elements::moov_trak_mdia_minf_stbl_stsd_mp4s : Stream_Prepare(Stream_Other); break;
- default : ;
- }
-
- Streams[moov_trak_tkhd_TrackID].StreamKind=StreamKind_Last;
- Streams[moov_trak_tkhd_TrackID].StreamPos=StreamPos_Last;
- }
-
- switch (StreamKind_Last)
- {
- case Stream_Video : moov_trak_mdia_minf_stbl_stsd_xxxxVideo(); break;
- case Stream_Audio : moov_trak_mdia_minf_stbl_stsd_xxxxSound(); break;
- case Stream_Text : moov_trak_mdia_minf_stbl_stsd_xxxxText (); break;
- default :
- CodecID_Fill(Ztring().From_CC4((int32u)Element_Code), StreamKind_Last, StreamPos_Last, InfoCodecID_Format_Mpeg4);
- switch (Element_Code)
- {
- case Elements::moov_trak_mdia_minf_stbl_stsd_mp4s : moov_trak_mdia_minf_stbl_stsd_xxxxStream(); break;
- default : Skip_XX(Element_TotalSize_Get()-Element_Offset, "Unknown");
- }
- }
- if (Element_IsWaitingForMoreData())
- return;
-
- if (Streams[moov_trak_tkhd_TrackID].Parsers.size()==1 && !Retrieve(StreamKind_Last, StreamPos_Last, "Encryption").empty())
- {
- Finish(Streams[moov_trak_tkhd_TrackID].Parsers[0]);
- }
- moov_trak_mdia_minf_stbl_stsd_Pos++;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxSound()
-{
- Element_Name("Audio");
-
- int32u SampleRate, Channels, SampleSize, Flags=0;
- int16u Version, ID;
- Get_B2 (Version, "Version");
- Skip_B2( "Revision level");
- Skip_C4( "Vendor");
- if (Version<2) // Version 0 or 1
- {
- int16u Channels16, SampleSize16, SampleRate16;
- Get_B2 (Channels16, "Number of channels");
- Get_B2 (SampleSize16, "Sample size");
- Get_B2 (ID, "Compression ID");
- Skip_B2( "Packet size");
- Get_B2 (SampleRate16, "Sample rate"); Param_Info2(SampleRate16, " Hz");
- Skip_B2( "Reserved");
- if (Version>=1)
- {
- Skip_B4( "Samples per packet");
- Skip_B4( "Bytes per packet");
- Skip_B4( "Bytes per frame");
- Skip_B4( "Bytes per sample");
- }
- Channels=Channels16;
- SampleSize=SampleSize16;
- SampleRate=SampleRate16;
- }
- else if (Version==2)
- {
- float64 SampleRateF64;
- Skip_B2( "Reserved (0x0003)");
- Skip_B2( "Reserved (0x0010)");
- Skip_B2( "Reserved (0xFFFE)");
- Skip_B2( "Reserved (0x0000)");
- Skip_B4( "Reserved (0x00010000)");
- Skip_B4( "Size of Struct");
- Get_BF8(SampleRateF64, "Sample rate");
- Get_B4 (Channels, "Number of channels");
- Skip_B4( "Reserved (0x7F000000)");
- Get_B4 (SampleSize, "Sample size");
- Get_B4 (Flags, "Flags");
- Skip_B4( "Bytes per packet");
- Skip_B4( "Frames per packet");
-
- SampleRate=(int32u)SampleRateF64;
- }
- else
- {
- Skip_XX(Element_Size, "Unknown");
- return;
- }
-
- //Bug found in one file: sample size is 16 with a 24-bit CodecID ("in24")
- if (Element_Code==0x696E3234 && SampleSize==16)
- SampleSize=24; //Correcting the header
- //Bug found in one file: sample size is 16 with a 32-bit CodecID ("fl32")
- if (Element_Code==0x666C3332 && SampleSize==16)
- SampleSize=32; //Correcting the header
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- //samr bug viewed in some files: channels and Sampling rate are wrong
- if (Element_Code==0x73616D72) //"samr"
- {
- SampleRate=8000;
- Channels=1;
- }
-
- //lpcm puts "1" in the SampleRate field and Timescale is the real sample size
- if (Element_Code==0x6C70636D && SampleRate==1) //"lpcm"
- {
- SampleRate=Streams[moov_trak_tkhd_TrackID].mdhd_TimeScale;
- }
-
- std::string Codec;
- Codec.append(1, (char)((Element_Code&0xFF000000)>>24));
- Codec.append(1, (char)((Element_Code&0x00FF0000)>>16));
- if (Codec!="ms") //Normal
- {
- Codec.append(1, (char)((Element_Code&0x0000FF00)>> 8));
- Codec.append(1, (char)((Element_Code&0x000000FF)>> 0));
- if (Codec!="mp4a") //mp4a is for Mpeg4 system
- CodecID_Fill(Ztring(Codec.c_str()), Stream_Audio, StreamPos_Last, InfoCodecID_Format_Mpeg4);
- if (Codec!="raw ")
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Codec, false, true);
- else
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, "PCM", Error, false, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec_CC, Codec, false, true);
- if (Codec=="drms")
- Fill(Stream_Audio, StreamPos_Last, Audio_Encryption, "iTunes");
- if (Codec=="enca")
- Fill(Stream_Audio, StreamPos_Last, Audio_Encryption, "Encrypted");
- }
- else //Microsoft 2CC
- {
- int64u CodecI= ((Element_Code&0x0000FF00ULL)>> 8)
- + ((Element_Code&0x000000FFULL)>> 0); //FormatTag
- Codec=Ztring().From_Number(CodecI, 16).To_Local();
- CodecID_Fill(Ztring::ToZtring(CodecI, 16), Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Codec, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec_CC, Codec, true);
- }
- #if defined(MEDIAINFO_AAC_YES)
- if (Version==2 && Element_Code==Elements::moov_trak_mdia_minf_stbl_stsd_mp4a) //This is not normal, but I don't know where is audioObjectType, default to 2 (AAC LC)
- {
- File_Aac* Parser=new File_Aac;
- Parser->AudioSpecificConfig_OutOfBand(SampleRate, 2);
- Parser->Mode=File_Aac::Mode_raw_data_block;
- Parser->FrameIsAlwaysComplete=true;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_AMR_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("AMR"))
- {
- //Creating the parser
- File_Amr MI;
- MI.Codec=Ztring().From_Local(Codec.c_str());
- Open_Buffer_Init(&MI);
-
- //Parsing
- Open_Buffer_Continue(&MI, 0);
-
- //Filling
- Finish(&MI);
- Merge(MI, StreamKind_Last, 0, StreamPos_Last);
- }
- #endif
- #if defined(MEDIAINFO_ADPCM_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("ADPCM"))
- {
- //Creating the parser
- File_Adpcm MI;
- MI.Codec=Ztring().From_Local(Codec.c_str());
- Open_Buffer_Init(&MI);
-
- //Parsing
- Open_Buffer_Continue(&MI, 0);
-
- //Filling
- Finish(&MI);
- Merge(MI, StreamKind_Last, 0, StreamPos_Last);
- }
- #endif
- #if defined(MEDIAINFO_PCM_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("PCM"))
- {
- //Info of stream size
- Streams[moov_trak_tkhd_TrackID].stsz_Sample_Multiplier=Channels*SampleSize/8;
- #if MEDIAINFO_DEMUX
- Streams[moov_trak_tkhd_TrackID].PtsDtsAreSame=true;
- #endif // MEDIAINFO_DEMUX
-
- //Creating the parser
- if ((Channels==1 && (StreamPos_Last%2)==0)
- || (Streams.find(moov_trak_tkhd_TrackID-1)!=Streams.end() && Streams[moov_trak_tkhd_TrackID-1].IsPcmMono))
- {
- File_ChannelGrouping* Parser=new File_ChannelGrouping;
- if (StreamPos_Last%2 && !Streams[moov_trak_tkhd_TrackID-1].Parsers.empty())
- {
- Parser->Channel_Pos=1;
- Parser->Common=((File_ChannelGrouping*)Streams[moov_trak_tkhd_TrackID-1].Parsers[0])->Common;
- Parser->StreamID=moov_trak_tkhd_TrackID-1;
- Element_Code=moov_trak_tkhd_TrackID-1;
- }
- else
- {
- Parser->Channel_Pos=0;
- Streams[moov_trak_tkhd_TrackID].IsPcmMono=true;
- }
- Parser->Channel_Total=2;
- Parser->SamplingRate=(int16u)SampleRate;
- Parser->BitDepth=(int8u)SampleSize;
-
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
-
- //Specific cases
- #if defined(MEDIAINFO_SMPTEST0337_YES)
- if (Channels==2 && SampleSize<=32 && SampleRate==48000) //Some SMPTE ST 337 streams are hidden in PCM stream
- {
- File_SmpteSt0337* Parser=new File_SmpteSt0337;
- Parser->Container_Bits=(int8u)SampleSize;
- Parser->Endianness=(Flags&0x02)?'B':'L';
- Parser->ShouldContinueParsing=true;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
-
- //PCM parser
- File_Pcm* Parser=new File_Pcm;
- Parser->Channels=(int8u)Channels;
- Parser->SamplingRate=SampleRate;
- Parser->BitDepth=(int8u)SampleSize;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- if (Version==2)
- {
- if (Flags&0x01)
- Parser->Endianness='F';
- else
- {
- Parser->Endianness=(Flags&0x02)?'B':'L';
- Parser->Sign=(Flags&0x04)?'S':'U';
- }
- }
- Parser->Codec=Ztring().From_Local(Codec.c_str());
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- Streams[moov_trak_tkhd_TrackID].IsPcm=true;
-
- #if MEDIAINFO_DEMUX
- Streams[moov_trak_tkhd_TrackID].Demux_Level=4; //Intermediate
- #endif //MEDIAINFO_DEMUX
- }
- #endif
- #if defined(MEDIAINFO_MPEGA_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("MPEG Audio"))
- {
- //Creating the parser
- File_Mpega* Parser=new File_Mpega;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- if (Element_Code==0x6F776D61) //"owma"
- {
- //Parsing
- int32u SamplingRate, BytesPerSec;
- int16u CodecID, Channels, Data_Size, Resolution;
- Get_L2 (CodecID, "Codec ID");
- Get_L2 (Channels, "Number of Channels");
- Get_L4 (SamplingRate, "Samples Per Second");
- Get_L4 (BytesPerSec, "Average Number of Bytes Per Second");
- Skip_L2( "Block Alignment");
- Get_L2 (Resolution, "Bits / Sample");
- Get_L2 (Data_Size, "Codec Specific Data Size");
-
- //Filling
- Ztring Codec; Codec.From_Number(CodecID, 16);
- Codec.MakeUpperCase();
- CodecID_Fill(Codec, Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Codec); //May be replaced by codec parser
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec_CC, Codec);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Channels, 10, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, SamplingRate, 10, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate, BytesPerSec*8, 10, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, Resolution, 10, true);
-
- FILLING_BEGIN();
- //Creating the parser
- if (0);
- #if defined(MEDIAINFO_MPEGA_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Riff, Ztring::ToZtring(CodecID, 16))==__T("MPEG Audio"))
- {
- File_Mpega* Parser=new File_Mpega;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- FILLING_END();
-
- //Parsing
- if (Data_Size>0)
- {
- Element_Begin1("Codec Specific Data");
- switch (CodecID)
- {
- case 0x0161 :
- //Parsing
- Skip_L4( "SamplesPerBlock");
- Skip_L2( "EncodeOptions");
- Skip_L4( "SuperBlockAlign");
- break;
- default : Skip_XX(Data_Size, "Unknown");
- }
- Element_End0();
- }
-
- //Demux
- #if MEDIAINFO_DEMUX
- if (!((MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring().From_CC4((int32u)Element_Code), InfoCodecID_Format)==__T("AVC") && Config->Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10_Get())
- || (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring().From_CC4((int32u)Element_Code), InfoCodecID_Format)==__T("HEVC") && Config->Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Get())))
- switch (Config->Demux_InitData_Get())
- {
- case 0 : //In demux event
- Demux_Level=2; //Container
- Demux(Buffer+Buffer_Offset+Element_Offset-(18+Data_Size), (size_t)(18+Data_Size), ContentType_Header);
- break;
- case 1 : //In field
- {
- std::string Data_Raw((const char*)(Buffer+Buffer_Offset+Element_Offset-(18+Data_Size)), (size_t)(18+Data_Size));
- std::string Data_Base64(Base64::encode(Data_Raw));
- Fill(Stream_Audio, StreamPos_Last, "Demux_InitBytes", Data_Base64);
- (*Stream_More)[Stream_Audio][StreamPos_Last](Ztring().From_Local("Demux_InitBytes"), Info_Options)=__T("N NT");
- }
- break;
- default : ;
- }
- #endif //MEDIAINFO_DEMUX
- }
-
- #if MEDIAINFO_DEMUX
- if (Streams[moov_trak_tkhd_TrackID].Parsers.empty() && Config_Demux)
- {
- File__Analyze* Parser=new File__Analyze; //Only for activating Demux
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif //MEDIAINFO_DEMUX
- for (size_t Pos=0; Pos<Streams[moov_trak_tkhd_TrackID].Parsers.size(); Pos++)
- {
- int64u Elemen_Code_Save=Element_Code;
- Element_Code=moov_trak_tkhd_TrackID; //Element_Code is use for stream identifier
- Open_Buffer_Init(Streams[moov_trak_tkhd_TrackID].Parsers[Pos]);
- Element_Code=Elemen_Code_Save;
- mdat_MustParse=true; //Data is in MDAT
- }
-
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Channels, 10, true);
- if (SampleSize!=0 && Element_Code!=0x6D703461 && (Element_Code&0xFFFF0000)!=0x6D730000 && Retrieve(Stream_Audio, StreamPos_Last, Audio_BitDepth).empty()) //if not mp4a, and not ms*
- Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, SampleSize, 10, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, SampleRate, 10, true);
-
- //Sometimes, more Atoms in this atoms
- if (Element_Offset+8<Element_Size)
- Element_ThisIsAList();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxStream()
-{
- Element_Name("Stream"); //Defined in ISO-IEC 14496-14
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- //Sometimes, more Atoms in this atoms
- if (Element_Offset+8<Element_Size)
- Element_ThisIsAList();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxText()
-{
- Element_Name("Text");
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- Ztring CodecID; CodecID.From_CC4((int32u)Element_Code);
- CodecID_Fill(CodecID, Stream_Text, StreamPos_Last, InfoCodecID_Format_Mpeg4);
-
- if (MediaInfoLib::Config.CodecID_Get(Stream_Text, InfoCodecID_Format_Mpeg4, CodecID, InfoCodecID_Format)==__T("EIA-608"))
- {
- //Creating the parser
- File_Mpeg4* Parser=new File_Mpeg4;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #if defined(MEDIAINFO_CDP_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Text, InfoCodecID_Format_Mpeg4, CodecID, InfoCodecID_Format)==__T("EIA-708"))
- {
- //Creating the parser
- File_Cdp* Parser=new File_Cdp;
- Parser->WithAppleHeader=true;
- Parser->AspectRatio=((float)16)/9; //TODO: this is hardcoded, must adapt it to the real video aspect ratio
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_TTML_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Text, InfoCodecID_Format_Mpeg4, CodecID, InfoCodecID_Format)==__T("TTML"))
- {
- //Creating the parser
- File_Ttml* Parser=new File_Ttml;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- #if MEDIAINFO_DEMUX
- if (Streams[moov_trak_tkhd_TrackID].Parsers.empty() && Config_Demux)
- {
- File__Analyze* Parser=new File__Analyze; //Only for activating Demux
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif //MEDIAINFO_DEMUX
- for (size_t Pos=0; Pos<Streams[moov_trak_tkhd_TrackID].Parsers.size(); Pos++)
- {
- int64u Elemen_Code_Save=Element_Code;
- Element_Code=moov_trak_tkhd_TrackID; //Element_Code is use for stream identifier
- Open_Buffer_Init(Streams[moov_trak_tkhd_TrackID].Parsers[Pos]);
- Element_Code=Elemen_Code_Save;
- mdat_MustParse=true; //Data is in MDAT
- }
-
- //Sometimes, more Atoms in this atoms
- if (Element_Offset+8<Element_Size)
- Element_ThisIsAList();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxVideo()
-{
- Element_Name("Video");
-
- int16u Width, Height, Depth, ColorTableID;
- int8u CompressorName_Size;
- bool IsGreyscale;
- Skip_B2( "Version");
- Skip_B2( "Revision level");
- Skip_C4( "Vendor");
- Skip_B4( "Temporal quality");
- Skip_B4( "Spatial quality");
- Get_B2 (Width, "Width");
- Get_B2 (Height, "Height");
- Skip_B4( "Horizontal resolution");
- Skip_B4( "Vertical resolution");
- Skip_B4( "Data size");
- Skip_B2( "Frame count");
- Peek_B1(CompressorName_Size);
- if (CompressorName_Size<32)
- {
- //This is pascal string
- Skip_B1( "Compressor name size");
- Skip_Local(CompressorName_Size, "Compressor name");
- Skip_XX(32-1-CompressorName_Size, "Padding");
- }
- else
- //this is hard-coded 32-byte string
- Skip_Local(32, "Compressor name");
- Get_B2 (Depth, "Depth");
- if (Depth>0x20 && Depth<0x40)
- {
- Depth-=0x20;
- IsGreyscale=true;
- }
- else if (Depth==1)
- IsGreyscale=true;
- else
- IsGreyscale=false;
- Get_B2 (ColorTableID, "Color table ID");
- if (!IsGreyscale && (Depth>1 && Depth<=8) && !ColorTableID)
- {
- int32u ColorStart;
- int16u ColorEnd;
- Get_B4 (ColorStart, "Color Start");
- Skip_B2( "Color Count");
- Get_B2 (ColorEnd, "Color End");
- for (int32u Color=ColorStart; Color<=ColorEnd; Color++)
- {
- Skip_B2( "Alpha");
- Skip_B2( "Red");
- Skip_B2( "Green");
- Skip_B2( "Blue");
- }
- }
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- std::string Codec;
- Codec.append(1, (char)((Element_Code&0xFF000000)>>24));
- Codec.append(1, (char)((Element_Code&0x00FF0000)>>16));
- Codec.append(1, (char)((Element_Code&0x0000FF00)>> 8));
- Codec.append(1, (char)((Element_Code&0x000000FF)>> 0));
- if (Codec!="mp4v") //mp4v is for Mpeg4 system
- CodecID_Fill(Ztring(Codec.c_str()), Stream_Video, StreamPos_Last, InfoCodecID_Format_Mpeg4);
- Fill(Stream_Video, StreamPos_Last, Video_Codec, Codec, false, true);
- Fill(Stream_Video, StreamPos_Last, Video_Codec_CC, Codec, false, true);
- if (Codec=="drms")
- Fill(Stream_Video, StreamPos_Last, Video_Encryption, "iTunes");
- if (Codec=="encv")
- Fill(Stream_Video, StreamPos_Last, Video_Encryption, "Encrypted");
- if (Width)
- Fill(Stream_Video, StreamPos_Last, Video_Width, Width, 10, true);
- if (Height)
- Fill(Stream_Video, StreamPos_Last, Video_Height, Height, 10, true);
- if (moov_trak_tkhd_DisplayAspectRatio && Height && moov_trak_tkhd_DisplayAspectRatio!=((float32)Width)/Height)
- {
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, moov_trak_tkhd_DisplayAspectRatio, 3, true);
- Fill(Stream_Video, StreamPos_Last, Video_PixelAspectRatio, moov_trak_tkhd_DisplayAspectRatio/Width*Height, 3, true);
- }
- Fill(Stream_Video, StreamPos_Last, Video_Rotation, moov_trak_tkhd_Rotation, 3);
- if (moov_trak_tkhd_Rotation)
- Fill(Stream_Video, StreamPos_Last, Video_Rotation_String, Ztring::ToZtring(moov_trak_tkhd_Rotation, 0)+__T("\xB0")); //degree sign
-
- //Specific cases
- if (Streams[moov_trak_tkhd_TrackID].Parsers.empty())
- {
- #if defined(MEDIAINFO_DVDIF_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("DV"))
- {
- File_DvDif* Parser=new File_DvDif;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_MXF_YES)
- if (Element_Code==0x6D78336E || Element_Code==0x6D783370 || Element_Code==0x6D78356E || Element_Code==0x6D783570) //mx3n, mx3p, mx5n, mx5p
- {
- Fill(Stream_Video, StreamPos_Last, Video_MuxingMode, "MXF");
- File_Mxf* Parser=new File_Mxf;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
-
- #if MEDIAINFO_DEMUX
- Streams[moov_trak_tkhd_TrackID].Demux_Level=4; //Intermediate
- #endif //MEDIAINFO_DEMUX
- }
- #endif
- #if defined(MEDIAINFO_AIC_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring().From_CC4((int32u)Element_Code), InfoCodecID_Format)==__T("AIC"))
- {
- File_Aic* Parser=new File_Aic;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_AVC_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring().From_CC4((int32u)Element_Code), InfoCodecID_Format)==__T("AVC"))
- {
- File_Avc* Parser=new File_Avc;
- Parser->FrameIsAlwaysComplete=true;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10_Get())
- {
- Streams[moov_trak_tkhd_TrackID].Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_FFV1_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring().From_CC4((int32u)Element_Code), InfoCodecID_Format)==__T("FFV1"))
- {
- File_Ffv1* Parser=new File_Ffv1;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_H263_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring().From_CC4((int32u)Element_Code), InfoCodecID_Format)==__T("H.263"))
- {
- File_H263* Parser=new File_H263;
- Parser->FrameIsAlwaysComplete=true;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_HEVC_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring().From_CC4((int32u)Element_Code), InfoCodecID_Format)==__T("HEVC"))
- {
- File_Hevc* Parser=new File_Hevc;
- Parser->FrameIsAlwaysComplete=true;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Get())
- {
- Streams[moov_trak_tkhd_TrackID].Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_MPEGV_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring().From_CC4((int32u)Element_Code), InfoCodecID_Format)==__T("MPEG Video") && Element_Code!=0x6D78336E && Element_Code!=0x6D783370 && Element_Code!=0x6D78356E && Element_Code!=0x6D783570) //mx3n, mx3p, mx5n, mx5p
- {
- File_Mpegv* Parser=new File_Mpegv;
- Parser->FrameIsAlwaysComplete=true;
- #if MEDIAINFO_ADVANCED
- Parser->InitDataNotRepeated_Optional=true;
- #endif // MEDIAINFO_ADVANCED
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_PRORES_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring().From_CC4((int32u)Element_Code), InfoCodecID_Format)==__T("ProRes"))
- {
- File_ProRes* Parser=new File_ProRes;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_VC1_YES)
- if (Element_Code!=0x76632D31 && MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring().From_CC4((int32u)Element_Code), InfoCodecID_Format)==__T("VC-1")) // If "vc-1" CodecID, there is a dvc1 atom, not using the hack with Sequence Header direct search
- {
- File_Vc1* Parser=new File_Vc1;
- Parser->FrameIsAlwaysComplete=true;
- Open_Buffer_Init(Parser);
- Open_Buffer_Continue(Parser);
- Element_Offset=Element_Size;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- mdat_MustParse=true; //Data is in MDAT
- }
- #endif
- #if defined(MEDIAINFO_VC3_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring().From_CC4((int32u)Element_Code), InfoCodecID_Format)==__T("VC-3"))
- {
- File_Vc3* Parser=new File_Vc3;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_JPEG_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("JPEG"))
- {
- File_Jpeg* Parser=new File_Jpeg;
- Parser->StreamKind=Stream_Video;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_MPEG4_YES)
- if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("JPEG 2000"))
- {
- File_Mpeg4* Parser=new File_Mpeg4;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
-
- #if MEDIAINFO_DEMUX
- Streams[moov_trak_tkhd_TrackID].Demux_Level=4; //Intermediate
- #endif //MEDIAINFO_DEMUX
- }
- #endif
-
- #if MEDIAINFO_DEMUX
- if (Streams[moov_trak_tkhd_TrackID].Parsers.empty() && Config_Demux)
- {
- File__Analyze* Parser=new File__Analyze; //Only for activating Demux
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- }
- #endif //MEDIAINFO_DEMUX
- for (size_t Pos=0; Pos<Streams[moov_trak_tkhd_TrackID].Parsers.size(); Pos++)
- if (!Streams[moov_trak_tkhd_TrackID].Parsers[Pos]->Status[IsAccepted])
- {
- int64u Elemen_Code_Save=Element_Code;
- Element_Code=moov_trak_tkhd_TrackID; //Element_Code is use for stream identifier
- Open_Buffer_Init(Streams[moov_trak_tkhd_TrackID].Parsers[Pos]);
- Element_Code=Elemen_Code_Save;
- mdat_MustParse=true; //Data is in MDAT
- }
- }
-
- //RGB(A)
- if (Codec=="raw " || Codec=="rle ")
- {
- if (IsGreyscale)
- {
- Fill(Stream_Video, StreamPos_Last, Video_ColorSpace, "Y", Unlimited, true, true);
- Fill(Stream_Video, StreamPos_Last, Video_BitDepth, Depth);
- }
- else if (Depth==32)
- {
- Fill(Stream_Video, StreamPos_Last, Video_ColorSpace, "RGBA", Unlimited, true, true);
- Fill(Stream_Video, StreamPos_Last, Video_BitDepth, Depth/4);
- }
- else
- Fill(Stream_Video, StreamPos_Last, Video_BitDepth, Depth/3);
- }
-
- //Descriptors or a list (we can see both!)
- if (Element_Offset+8<=Element_Size
- && ((CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+0)>='A' && CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+0)<='z') || (CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+0)>='0' && CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+0)<='9'))
- && ((CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+1)>='A' && CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+1)<='z') || (CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+1)>='0' && CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+1)<='9'))
- && ((CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+2)>='A' && CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+2)<='z') || (CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+2)>='0' && CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+2)<='9'))
- && ((CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+3)>='A' && CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+3)<='z') || (CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+3)>='0' && CC1(Buffer+Buffer_Offset+(size_t)Element_Offset+4+3)<='9')))
- Element_ThisIsAList();
- else if (Element_Offset<Element_Size)
- Descriptors();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Source: http://wiki.multimedia.cx/index.php?title=Apple_Lossless_Audio_Coding
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_alac()
-{
- Element_Name("ALAC");
-
- //Parsing
- int32u bitrate, samplerate;
- int8u sample_size, channels;
- Skip_B4( "?");
- Skip_B4( "max sample per frame");
- Skip_B1( "?");
- Get_B1 (sample_size, "sample size");
- Skip_B1( "rice history mult");
- Skip_B1( "rice initial history");
- Skip_B1( "rice kmodifier");
- Get_B1 (channels, "channels");
- Skip_B1( "?");
- Skip_B1( "?");
- Skip_B4( "max coded frame size");
- Get_B4 (bitrate, "bitrate");
- Get_B4 (samplerate, "samplerate");
-
- FILLING_BEGIN_PRECISE();
- if (sample_size)
- Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, sample_size, 10, true);
- if (channels)
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, channels, 10, true);
- if (bitrate)
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate_Nominal, bitrate, 10, true);
- if (samplerate)
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, samplerate, 10, true);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_ACLR()
-{
- Element_Name("Avid ACLR");
-
- //Parsing
- Skip_C4( "tag");
- Skip_C4( "vers");
- Skip_B4( "yuv range"); //full 1 / normal 2
- Skip_B4( "unknown (always 0?)");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_APRG()
-{
- Element_Name("Avid APRG");
-
- //Parsing
- Skip_C4( "tag");
- Skip_C4( "vers");
- Skip_B4( "unknown (always 1?)");
- Skip_B4( "unknown (always 0?)");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_ARES()
-{
- Element_Name("Avid ARES");
-
- //Parsing
- //Source: http://lists.apple.com/archives/quicktime-api/2012/Mar/msg00039.html
- int32u x1;
- Skip_C4( "tag");
- Skip_C4( "vers");
- Skip_B4( "cid"); //Compression ID, From inspection this is 160 for MPEG 50, 161 for MPEG 40 and 162 for MPEG 30. 171 for raw?
- Skip_B4( "width");
- Skip_B4( "height"); //Of a field
- Get_B4 (x1, "x1"); //1=Progressive, 2=Interlaced
- Skip_B4( "zero");
- Skip_B4( "x2"); //4=Interlaced, 5=Progressive 1080, 6 Progressive not 1080?
-
- switch (x1)
- {
- case 0x01 : Fill(Stream_Video, StreamPos_Last, Video_ScanType, "Progressive", Unlimited, true, true); break;
- case 0x02 : Fill(Stream_Video, StreamPos_Last, Video_ScanType, "Interlaced", Unlimited, true, true); break;
- default : ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_avcC()
-{
- Element_Name("AVC decode");
-
- //Parsing
- int8u Version;
- Get_B1 (Version, "Version");
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- {
- Skip_XX(Element_Size-Element_Offset, "Data not analyzed");
- return; //Handling only the first description
- }
- else if (Version==1)
- {
- #ifdef MEDIAINFO_AVC_YES
- for (size_t Pos=0; Pos<Streams[moov_trak_tkhd_TrackID].Parsers.size(); Pos++) //Removing any previous parser (in case of multiple streams in one track, or dummy parser for demux)
- delete Streams[moov_trak_tkhd_TrackID].Parsers[Pos];
- Streams[moov_trak_tkhd_TrackID].Parsers.clear();
-
- File_Avc* Parser=new File_Avc;
- Parser->FrameIsAlwaysComplete=true;
- #if MEDIAINFO_DEMUX
- Element_Code=moov_trak_tkhd_TrackID;
- if (Config->Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10_Get())
- {
- Streams[moov_trak_tkhd_TrackID].Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- Open_Buffer_Init(Parser);
- Parser->MustParse_SPS_PPS=true;
- Parser->MustSynchronize=false;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- mdat_MustParse=true; //Data is in MDAT
-
- //Demux
- #if MEDIAINFO_DEMUX
- if (!Config->Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10_Get())
- switch (Config->Demux_InitData_Get())
- {
- case 0 : //In demux event
- Demux_Level=2; //Container
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_Header);
- break;
- case 1 : //In field
- {
- std::string Data_Raw((const char*)(Buffer+Buffer_Offset), (size_t)Element_Size);
- std::string Data_Base64(Base64::encode(Data_Raw));
- Fill(Stream_Video, StreamPos_Last, "Demux_InitBytes", Data_Base64);
- (*Stream_More)[Stream_Video][StreamPos_Last](Ztring().From_Local("Demux_InitBytes"), Info_Options)=__T("N NT");
- }
- break;
- default : ;
- }
- #endif //MEDIAINFO_DEMUX
-
- //Parsing
- Open_Buffer_Continue(Parser);
-
- Parser->MustParse_SPS_PPS=false;
- Parser->SizedBlocks=true; //Now this is SizeBlocks
- #else
- Skip_XX(Element_Size, "AVC Data");
- #endif
- }
- else
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_bitr()
-{
- Element_Name("BitRate");
-
- //Parsing
- int32u Avg_Bitrate, Max_Bitrate;
- Get_B4 (Avg_Bitrate, "Avg_Bitrate");
- Get_B4 (Max_Bitrate, "Max_Bitrate");
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- if (Avg_Bitrate)
- Fill(StreamKind_Last, StreamPos_Last, "BitRate", Avg_Bitrate);
- if (Max_Bitrate)
- Fill(StreamKind_Last, StreamPos_Last, "BitRate_Maximum", Max_Bitrate);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_btrt()
-{
- Element_Name("BitRate");
-
- //Parsing
- int32u maxBitrate, avgBitrate;
- Skip_B4( "bufferSizeDB");
- Get_B4 (maxBitrate, "maxBitrate");
- Get_B4 (avgBitrate, "avgBitrate");
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- //if (avgBitrate)
- // Fill(StreamKind_Last, StreamPos_Last, "BitRate", avgBitrate); //Not trustable enough, and we have precise bitrate from stream size with
- if (maxBitrate)
- Fill(StreamKind_Last, StreamPos_Last, "BitRate_Maximum", maxBitrate);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_chan()
-{
- NAME_VERSION_FLAG("Channels");
-
- //Parsing
- //From http://developer.apple.com/mac/library/documentation/MusicAudio/Reference/CAFSpec/CAF_spec/CAF_spec.html
- std::string ChannelDescription_Layout;
- int64u ChannelLabels=0;
- int32u ChannelLayoutTag, ChannelBitmap, NumberChannelDescriptions;
- bool ChannelLabels_Valid=true;
- Get_B4 (ChannelLayoutTag, "ChannelLayoutTag");
- Get_B4 (ChannelBitmap, "ChannelBitmap");
- Get_B4 (NumberChannelDescriptions, "NumberChannelDescriptions");
- if (ChannelLayoutTag==0) //UseChannelDescriptions
- {
- for (int32u Pos=0; Pos<NumberChannelDescriptions; Pos++)
- {
- int32u ChannelLabel;
- Get_B4 (ChannelLabel, "ChannelLabel");
- if (ChannelLabel<64)
- ChannelLabels|=(((int64u)1)<<ChannelLabel);
- else
- ChannelLabels_Valid=false;
- ChannelDescription_Layout+=Mpeg4_chan_ChannelDescription_Layout(ChannelLabel);
- ChannelDescription_Layout+=__T(' ');
- Skip_B4( "ChannelFlags");
- Skip_BF4( "Coordinates (0)");
- Skip_BF4( "Coordinates (1)");
- Skip_BF4( "Coordinates (2)");
- }
- if (!ChannelDescription_Layout.empty())
- ChannelDescription_Layout.resize(ChannelDescription_Layout.size()-1);
- }
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- if (ChannelLayoutTag==0) //UseChannelDescriptions
- {
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelLayout, ChannelDescription_Layout.c_str(), Unlimited, true, true);
- if (ChannelLabels_Valid)
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelPositions, Mpeg4_chan_ChannelDescription(ChannelLabels), true, true);
- else
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelPositions, ChannelDescription_Layout);
- }
- else if (ChannelLayoutTag==0x10000) //UseChannelBitmap
- {
- int8u Channels=0;
- for (size_t Bit=0; Bit<18; Bit++)
- if (ChannelBitmap&(1<<Bit))
- {
- Channels++;
- ChannelDescription_Layout+=Mpeg4_chan_ChannelBitmap_Layout((int32u)(Bit+1));
- ChannelDescription_Layout+=__T(' ');
- }
- if (Channels)
- {
- //Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Channels, 10, true); //Channel count from this atom should not be used as a primary source, it may be wrong
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelPositions, Mpeg4_chan_ChannelBitmap(ChannelBitmap), true, true);
- if (!ChannelDescription_Layout.empty())
- {
- ChannelDescription_Layout.resize(ChannelDescription_Layout.size()-1);
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelLayout, ChannelDescription_Layout.c_str(), Unlimited, true, true);
- }
- }
- }
- else if (ChannelLayoutTag>0x10000)
- {
- //int16u Channels=ChannelLayoutTag&0x0000FFFF;
- int16u Ordering=(ChannelLayoutTag&0xFFFF0000)>>16;
- //Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Channels, 10, true); //Channel count from this atom should not be used as a primary source, it may be wrong
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelPositions, Mpeg4_chan(Ordering), Unlimited, true, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelLayout, Mpeg4_chan_Layout(Ordering));
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_clap()
-{
- Element_Name("Clean Aperture");
-
- //Parsing
- int32u apertureWidth_N, apertureWidth_D, apertureHeight_N, apertureHeight_D;
- Get_B4 (apertureWidth_N, "apertureWidth_N");
- Get_B4 (apertureWidth_D, "apertureWidth_D");
- Get_B4 (apertureHeight_N, "apertureHeight_N");
- Get_B4 (apertureHeight_D, "apertureHeight_D");
- Skip_B4( "horizOff_N");
- Skip_B4( "horizOff_D");
- Skip_B4( "vertOff_N");
- Skip_B4( "vertOff_D");
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- if (apertureWidth_N && apertureWidth_D && apertureHeight_N && apertureHeight_D)
- {
- Streams[moov_trak_tkhd_TrackID].CleanAperture_Width=((float)apertureWidth_N)/apertureWidth_D;
- Streams[moov_trak_tkhd_TrackID].CleanAperture_Height=((float)apertureHeight_N)/apertureHeight_D;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_colr()
-{
- Element_Name("Color Parameter");
-
- //Parsing
- int32u ColorParameterType;
- Get_C4 (ColorParameterType, "Color parameter type");
- switch (ColorParameterType)
- {
- case Elements::moov_trak_mdia_minf_stbl_stsd_xxxx_colr_clcn: moov_trak_mdia_minf_stbl_stsd_xxxx_colr_nclc(true); break;
- case Elements::moov_trak_mdia_minf_stbl_stsd_xxxx_colr_nclc: moov_trak_mdia_minf_stbl_stsd_xxxx_colr_nclc(); break;
- case Elements::moov_trak_mdia_minf_stbl_stsd_xxxx_colr_prof: moov_trak_mdia_minf_stbl_stsd_xxxx_colr_prof(); break;
- default : Skip_XX(Element_Size-Element_Offset, "Unknown");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_colr_nclc(bool LittleEndian)
-{
- //Parsing
- int16u colour_primaries, transfer_characteristics, matrix_coefficients;
- if (LittleEndian)
- Get_L2 (colour_primaries, "Primaries index");
- else
- Get_B2 (colour_primaries, "Primaries index");
- Param_Info1(Mpegv_colour_primaries((int8u)colour_primaries));
- if (LittleEndian)
- Get_L2 (transfer_characteristics, "Transfer function index");
- else
- Get_B2 (transfer_characteristics, "Transfer function index");
- Param_Info1(Mpegv_transfer_characteristics((int8u)transfer_characteristics));
- if (LittleEndian)
- Get_L2 (matrix_coefficients, "Matrix index");
- else
- Get_B2 (matrix_coefficients, "Matrix index");
- Param_Info1(Mpegv_matrix_coefficients((int8u)matrix_coefficients));
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Video, StreamPos_Last, Video_colour_description_present).empty()) //Using only the first one met
- {
- Fill(Stream_Video, StreamPos_Last, Video_colour_description_present, "Yes");
- Fill(Stream_Video, StreamPos_Last, Video_colour_primaries, Mpegv_colour_primaries((int8u)colour_primaries));
- Fill(Stream_Video, StreamPos_Last, Video_transfer_characteristics, Mpegv_transfer_characteristics((int8u)transfer_characteristics));
- Fill(Stream_Video, StreamPos_Last, Video_matrix_coefficients, Mpegv_matrix_coefficients((int8u)matrix_coefficients));
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_colr_prof()
-{
- //Parsing
- Skip_XX(Element_Size-Element_Offset, "ICC profile"); //TODO: parse ICC profile
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_d263()
-{
- Element_Name("H263SpecificBox");
-
- //Parsing
- int32u Vendor;
- int8u Version, H263_Level, H263_Profile;
- Get_C4 (Vendor, "Encoder vendor");
- Get_B1 (Version, "Encoder version");
- Get_B1 (H263_Level, "H263_Level");
- Get_B1 (H263_Profile, "H263_Profile");
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- Ztring ProfileLevel;
- switch (H263_Profile)
- {
- case 0x00 : ProfileLevel=__T("BaseLine"); break;
- default : ProfileLevel.From_Number(H263_Profile);
- }
- ProfileLevel+=__T('@');
- ProfileLevel+=Ztring::ToZtring(((float32)H263_Level)/10, 1);
- Fill(Stream_Video, StreamPos_Last, Video_Format_Profile, ProfileLevel);
- Fill(Stream_Video, StreamPos_Last, Video_Encoded_Library_Name, Mpeg4_Vendor(Vendor));
- Fill(Stream_Video, StreamPos_Last, Video_Encoded_Library_Version, Version);
- Fill(Stream_Video, StreamPos_Last, Video_Encoded_Library, Retrieve(Stream_Video, StreamPos_Last, Video_Encoded_Library_Name)+__T(' ')+Ztring::ToZtring(Version));
- Ztring Encoded_Library_String=Retrieve(Stream_Video, StreamPos_Last, Video_Encoded_Library_Name)+(Version?(__T(" Revision ")+Ztring::ToZtring(Version)):Ztring());
- Fill(Stream_Video, StreamPos_Last, Video_Encoded_Library_String, Encoded_Library_String, true);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_dac3()
-{
- Element_Name("AC3SpecificBox");
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, "", Unlimited, true, true); //Remove the value (is always wrong in the stsd atom)
-
- //Parsing
- if (Retrieve(Stream_Audio, StreamPos_Last, Audio_CodecID)==__T("sac3"))
- {
- Element_Info1("Nero specific");
- int8u Version;
- Get_B1 (Version, "Version");
- if (Version==1)
- {
- int8u bsid;
- Get_B1 (bsid, "bsid");
- Skip_XX(Element_Size-Element_Offset, "unknown");
- #ifdef MEDIAINFO_AC3_YES
- if (Streams[moov_trak_tkhd_TrackID].Parsers.empty())
- {
- File_Ac3* Parser=new File_Ac3;
- Open_Buffer_Init(Parser);
- Parser->Frame_Count_Valid=2;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- mdat_MustParse=true; //Data is in MDAT
- }
- #else
- if (bsid<=0x08)
- Fill(Stream_Audio, StreamKind_Last, Audio_Format, "AC-3");
- if (bsid>0x0A && bsid<=0x10)
- Fill(Stream_Audio, StreamKind_Last, Audio_Format, "E-AC-3");
- #endif
- return;
- }
- else
- {
- Skip_XX(Element_Size, "Data");
- return;
- }
- }
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- #ifdef MEDIAINFO_AC3_YES
- if (Streams[moov_trak_tkhd_TrackID].Parsers.empty())
- {
- File_Ac3* Parser=new File_Ac3;
- Open_Buffer_Init(Parser);
- Parser->MustParse_dac3=true;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- mdat_MustParse=true; //Data is in MDAT
-
- //Parsing
- Open_Buffer_Continue(Parser);
- }
- #else
- Skip_XX(Element_Size, "AC-3 Data");
-
- Fill(Stream_Audio, StreamKind_Last, Audio_Format, "AC-3");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_damr()
-{
- Element_Name("AMR decode config");
-
- //Parsing
- int32u Vendor;
- int8u Version;
- Get_C4 (Vendor, "Encoder vendor");
- Get_B1 (Version, "Encoder version");
- Skip_B2( "Packet modes");
- Skip_B1( "Number of packet mode changes");
- Skip_B1( "Samples per packet");
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- Fill(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_Name, Mpeg4_Vendor(Vendor));
- Fill(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_Version, Version);
- Fill(Stream_Audio, StreamPos_Last, Audio_Encoded_Library, Retrieve(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_Name)+__T(' ')+Ztring::ToZtring(Version));
- Ztring Encoded_Library_String=Retrieve(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_Name)+(Version?(__T(" Revision ")+Ztring::ToZtring(Version)):Ztring());
- Fill(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_String, Encoded_Library_String, true);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_dec3()
-{
- Element_Name("EAC3SpecificBox");
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, "", Unlimited, true, true); //Remove the value (is always wrong in the stsd atom)
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- {
- return; //Handling only the first description
- }
-
- #ifdef MEDIAINFO_AC3_YES
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- {
- Skip_XX(Element_Size, "Data not analyzed");
- return; //Handling only the first description
- }
-
- if (Streams[moov_trak_tkhd_TrackID].Parsers.empty())
- {
- File_Ac3* Parser=new File_Ac3;
- Open_Buffer_Init(Parser);
- Parser->Frame_Count_Valid=2;
- Parser->MustParse_dec3=true;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- mdat_MustParse=true; //Data is in MDAT
-
- //Parsing
- Open_Buffer_Continue(Parser);
- }
- #else
- Skip_XX(Element_Size, "E-AC-3 Data");
-
- Fill(Stream_Audio, StreamKind_Last, Audio_Format, "E-AC-3");
- Fill(Stream_Audio, StreamKind_Last, Audio_Format, "", Unlimited, true, true); //Remove the value (is always wrong in the stsd atom)
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_ddts()
-{
- Element_Name("DTSSpecificBox");
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, "", Unlimited, true, true); //Remove the value (is always wrong in the stsd atom)
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- {
- return; //Handling only the first description
- }
-
- //Comments about the new CodecIDs having this atom:
- //dtsc: DTS Core only
- //dtse: DTS Express, not having DTS Core
- //dtsh: DTS Core + DTS Lossless (MA), mixed
- //dtsl: DTS Lossless (MA), not having DTS Core
-
- int32u DTSSamplingFrequency, maxBitrate, avgBitrate;
- int16u ChannelLayout;
- int8u CoreLayout;
-
- //Parsing
- Get_B4 (DTSSamplingFrequency, "DTSSamplingFrequency");
- Get_B4 (maxBitrate, "maxBitrate");
- Get_B4 (avgBitrate, "avgBitrate");
- Skip_B1( "pcmSampleDepth"); // 16 or 24 bits
- BS_Begin();
- Skip_S1(2, "FrameDuration"); // 0 = 512, 1 = 1024, 2 = 2048, 3 = 4096
- Skip_S1(5, "StreamConstruction");
- Skip_SB( "CoreLFEPresent"); // 0 = none, 1 = LFE exists
- Get_S1 (6, CoreLayout, "CoreLayout");
- Skip_S2(14, "CoreSize");
- Skip_SB( "StereoDownmix"); // 0 = none, 1 = downmix present
- Skip_S1 (3, "RepresentationType");
- Get_S2 (16, ChannelLayout, "ChannelLayout");
- Skip_SB( "MultiAssetFlag"); // 0 = none, 1 = multiple asset
- Skip_SB( "LBRDurationMod"); // 0 = ignore, 1 = Special LBR duration modifier
- Skip_S1(6, "reserved");
- BS_End();
-
- FILLING_BEGIN();
- if (DTSSamplingFrequency)
- Fill(StreamKind_Last, StreamPos_Last, Audio_SamplingRate, DTSSamplingFrequency, 10, true); //This is the maximum sampling frequency
- if (avgBitrate)
- Fill(StreamKind_Last, StreamPos_Last, Audio_BitRate, avgBitrate);
- if (maxBitrate)
- Fill(StreamKind_Last, StreamPos_Last, Audio_BitRate_Maximum, maxBitrate);
- #if defined(MEDIAINFO_DTS_YES)
- if (ChannelLayout)
- {
- Fill(Stream_Audio, 0, Audio_ChannelPositions, DTS_HD_SpeakerActivityMask(ChannelLayout).c_str());
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, DTS_HD_SpeakerActivityMask2(ChannelLayout).c_str());
- }
- if (CoreLayout && CoreLayout<16)
- {
- Fill(Stream_Audio, 0, Audio_ChannelPositions, DTS_ChannelPositions[CoreLayout]);
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, DTS_ChannelPositions2[CoreLayout]);
- }
- #endif //defined(MEDIAINFO_DTS_YES)
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_dvc1()
-{
- Element_Name("VC1SpecificBox");
-
- // Parsing
- int32u hrd_buffer, hrd_rate, framerate=0;
- int8u profile, level, frmrtq_pp, bitrtq_pp, dquant, vtransform, overlap, syncmarker, rangered, maxbframes, quantizer, finterpflag, no_interlace, no_multiple_seq, no_multiple_entry, no_slice_code, no_bframe;
- bool cbr, loopfilter, multires, fastuvmc, extended_mv;
-
- BS_Begin();
- Get_S1 (4, profile, "Profile");
- Get_S1 (3, level, "Level");
- Skip_SB( "reserved");
- BS_End();
-
- switch(profile)
- {
- case 0 : // Simple Profile
- case 4 : // Main Profile
- BS_Begin();
- Get_S1 (3, level, "Level"); // should be the same as above
- Get_SB (cbr, "CBR"); // should be equal to 1 if CBR Mode, 0 otherwhise
- Skip_S1(4, "Reserved"); // should be set to 0
- BS_End();
- Get_B3 (hrd_buffer, "HRD_Buffer"); // Buffer Size of Hypothetical Reference Decoder in ms
- Get_B4 (hrd_rate, "HRD_Rate"); // Peak Transmisson Rate of the Hypothetical Reference Decoder in bps
- Get_B4 (framerate, "FrameRate"); // Rounded FPS of the track
- BS_Begin();
- Get_S1 (4, profile, "Profile"); // should be the same as above
- Get_S1 (3, frmrtq_pp, "Frmrtq_postproc");
- Get_S1 (5, bitrtq_pp, "Bitrtq_postproc");
- Get_SB (loopfilter, "Loopfilter");
- Skip_SB( "Reserved"); // should be set to 0
- Get_SB (multires, "MultiRes");
- Skip_SB( "Reserved"); // should be set to 1
- Get_SB (fastuvmc, "Fastuvmc");
- Get_SB (extended_mv, "Extended_mv");
- Get_S1 (2, dquant, "Dquant");
- Get_S1 (1, vtransform, "Vtransform");
- Skip_SB( "Reserved"); // should be set to 0
- Get_S1 (1, overlap, "Overlap");
- Get_S1 (1, syncmarker, "Syncmarker");
- Get_S1 (1, rangered, "Rangered");
- Get_S1 (3, maxbframes, "MaxBFrames"); // should be equal to 0 with SP
- Get_S1 (2, quantizer, "Quantizer");
- Get_S1 (1, finterpflag, "Finterpflag");
- Skip_SB( "Reserved"); // should be set to 1
- BS_End();
- break;
- case 12 : // Advanced Profile
- BS_Begin();
- Get_S1 (3, level, "Level"); // should be the same as above
- Get_SB (cbr, "CBR"); // should be equal to 1 if CBR Mode, 0 otherwhise
- Skip_S1(6, "Reserved"); // should be set to 0
- Get_S1 (1, no_interlace, "No Interlace"); // should be set to 0 for Interlaced Content
- Get_S1 (1, no_multiple_seq, "No Multiple Sequence");
- Get_S1 (1, no_multiple_entry, "No Multiple Entry");
- Get_S1 (1, no_slice_code, "No Slice Code");
- Get_S1 (1, no_bframe, "No BFrame");
- Skip_SB( "Reserved");
- BS_End();
- Get_B4 (framerate, "FrameRate");
- Element_Begin1("Sequence HDR");
- File_Vc1* Parser=new File_Vc1;
- Parser->FrameIsAlwaysComplete=true;
- Open_Buffer_Init(Parser);
- Open_Buffer_Continue(Parser);
- Element_Offset=Element_Size;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- mdat_MustParse=true; //Data is in MDAT*/
- Element_End0();
- break;
- }
-
- FILLING_BEGIN();
- #if defined(MEDIAINFO_VC1_YES)
- Ztring Profile, Level;
-
- switch (profile)
- {
- case 0 : Profile=__T("Simple"); break;
- case 4 : Profile=__T("Main"); break;
- case 12 : Profile=__T("Advanced"); break;
- default : Profile=__T("");
- }
- Profile+=__T("@");
-
- if (profile == 0) // Simple Profile
- {
- switch (level)
- {
- case 0 : Level=__T("Low"); break;
- case 2 : Level=__T("Medium"); break;
- default : Level=__T("");
- }
- }
- else if (profile == 4) // Main Profile
- {
- switch (level)
- {
- case 0 : Level=__T("Low"); break;
- case 2 : Level=__T("Medium"); break;
- case 4 : Level=__T("High"); break;
- default : Level=__T("");
- }
- }
- else if (profile == 12) // Advanced Profile
- {
- switch (level)
- {
- case 0 : Level=__T("L0"); break;
- case 1 : Level=__T("L1"); break;
- case 2 : Level=__T("L2"); break;
- case 3 : Level=__T("L3"); break;
- case 4 : Level=__T("L4"); break;
- default : Level=__T("");
- }
- }
- Profile+=Level;
- Fill(Stream_Video, StreamPos_Last, Video_Format_Profile, Profile);
- Fill(Stream_Video, StreamPos_Last, Video_Codec_Profile, Profile);
- #endif //defined(MEDIAINFO_VC1_YES)
- if (framerate && framerate!=(int32u)-1)
- Fill(StreamKind_Last, StreamPos_Last, Video_FrameRate, framerate, 3);
- FILLING_END();
-}
-
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_esds()
-{
- NAME_VERSION_FLAG("ES Descriptor");
- INTEGRITY_VERSION(0);
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- Descriptors();
- if (Streams[moov_trak_tkhd_TrackID].Parsers.size()==1 && !Retrieve(StreamKind_Last, StreamPos_Last, "Encryption").empty())
- {
- Finish(Streams[moov_trak_tkhd_TrackID].Parsers[0]);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_fiel()
-{
- //Source: http://developer.apple.com/quicktime/icefloe/dispatch019.html#fiel
- //Source: QuickTimeFileFormat2011.pdf:
- // 1 – T is displayed earliest, T is stored first in the file.
- // 6 – B is displayed earliest, B is stored first in the file.
- // 9 – B is displayed earliest, T is stored first in the file.
- //14 – T is displayed earliest, B is stored first in the file.
- Element_Name("Field/Frame Information");
-
- //Parsing
- int8u fields, detail;
- Get_B1 (fields, "fields");
- Get_B1 (detail, "detail");
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- switch(fields)
- {
- case 0x01 : Fill(Stream_Video, StreamPos_Last, Video_ScanType, "Progressive", Unlimited, true, true); break;
- case 0x02 : Fill(Stream_Video, StreamPos_Last, Video_ScanType, "Interlaced", Unlimited, true, true);
- switch(detail)
- {
- case 1 : // T is displayed earliest, T is stored first in the file.
- case 9 : // B is displayed earliest, T is stored first in the file.
- Fill(Stream_Video, StreamPos_Last, Video_ScanOrder, "TFF", Unlimited, true, true);
- break;
- case 6 : // B is displayed earliest, B is stored first in the file.
- case 14 : // T is displayed earliest, B is stored first in the file.
- Fill(Stream_Video, StreamPos_Last, Video_ScanOrder, "BFF", Unlimited, true, true);
- break;
- default : ;
- }
- // Priorizing https://developer.apple.com/library/mac/technotes/tn2162/_index.html#//apple_ref/doc/uid/DTS40013070-CH1-TNTAG10-THE__FIEL__IMAGEDESCRIPTION_EXTENSION__FIELD_FRAME_INFORMATION
- /*
- switch(detail)
- {
- case 9 : // B is displayed earliest, T is stored first in the file.
- case 14 : // T is displayed earliest, B is stored first in the file.
- Streams[moov_trak_tkhd_TrackID].ScanOrder_StoredDisplayedInverted=true;
- break;
- default : ;
- }
- */
- switch (detail)
- {
- case 1 : // Separated fields, TFF
- case 6 : // Separated fields, BFF
- Fill(Stream_Video, StreamPos_Last, Video_ScanType_StoreMethod_FieldsPerBlock, 2, 10, true);
- Fill(Stream_Video, StreamPos_Last, Video_ScanType_StoreMethod, "SeparatedFields", Unlimited, true, true);
- break;
- case 9 : // Interleaved fields, TFF
- case 14 : // Interleaved fields, BFF
- Fill(Stream_Video, StreamPos_Last, Video_ScanType_StoreMethod, "InterleavedFields", Unlimited, true, true);
- break;
- default : ;
- }
-
- #ifdef MEDIAINFO_JPEG_YES
- if (Retrieve(Stream_Video, StreamPos_Last, Video_Format)==__T("JPEG") && Streams[moov_trak_tkhd_TrackID].Parsers.size()==1)
- ((File_Jpeg*)Streams[moov_trak_tkhd_TrackID].Parsers[0])->Interlaced=true;
- #endif //MEDIAINFO_JPEG_YES
- break;
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_glbl()
-{
- Element_Name("Global");
-
- if (Retrieve(Stream_Video, StreamPos_Last, Video_MuxingMode)==__T("MXF"))
- {
- Clear(Stream_Video, StreamPos_Last, Video_MuxingMode);
- #if defined(MEDIAINFO_MPEGV_YES)
- File_Mpegv* Parser=new File_Mpegv;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
-
- //Re-init
- int64u Elemen_Code_Save=Element_Code;
- Element_Code=moov_trak_tkhd_TrackID; //Element_Code is use for stream identifier
- Open_Buffer_Init(Parser);
- Element_Code=Elemen_Code_Save;
- mdat_MustParse=true; //Data is in MDAT
-
- Open_Buffer_Continue(Parser);
- #endif //defined(MEDIAINFO_MPEGV_YES)
-
- //TODO: demux is not done in this case (2 possibilities: MXF wrapped and it is useless, not MXF wrapped and we may need it but up to now we saw only data in this atom redundant with the raw stream data)
- return;
- }
-
- //Demux
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- #endif //MEDIAINFO_DEMUX
-
- //Parsing
- for (size_t Pos=0; Pos<Streams[moov_trak_tkhd_TrackID].Parsers.size(); Pos++)
- Open_Buffer_Continue(Streams[moov_trak_tkhd_TrackID].Parsers[Pos]);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_hvcC()
-{
- Element_Name("HEVCDecoderConfigurationRecord");
-
- //Parsing
- #ifdef MEDIAINFO_HEVC_YES
- for (size_t Pos=0; Pos<Streams[moov_trak_tkhd_TrackID].Parsers.size(); Pos++) //Removing any previous parser (in case of multiple streams in one track, or dummy parser for demux)
- delete Streams[moov_trak_tkhd_TrackID].Parsers[Pos];
- Streams[moov_trak_tkhd_TrackID].Parsers.clear();
-
- File_Hevc* Parser=new File_Hevc;
- Parser->FrameIsAlwaysComplete=true;
- #if MEDIAINFO_DEMUX
- Element_Code=moov_trak_tkhd_TrackID;
- if (Config->Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Get())
- {
- Streams[moov_trak_tkhd_TrackID].Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- Open_Buffer_Init(Parser);
- Parser->MustParse_VPS_SPS_PPS=true;
- Parser->MustSynchronize=false;
- Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser);
- mdat_MustParse=true; //Data is in MDAT
-
- //Demux
- #if MEDIAINFO_DEMUX
- if (!Config->Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Get())
- switch (Config->Demux_InitData_Get())
- {
- case 0 : //In demux event
- Demux_Level=2; //Container
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_Header);
- break;
- case 1 : //In field
- {
- std::string Data_Raw((const char*)(Buffer+Buffer_Offset), (size_t)Element_Size);
- std::string Data_Base64(Base64::encode(Data_Raw));
- Fill(Stream_Video, StreamPos_Last, "Demux_InitBytes", Data_Base64);
- (*Stream_More)[Stream_Video][StreamPos_Last](Ztring().From_Local("Demux_InitBytes"), Info_Options)=__T("N NT");
- }
- break;
- default : ;
- }
- #endif //MEDIAINFO_DEMUX
-
- //Parsing
- Open_Buffer_Continue(Parser);
-
- Parser->SizedBlocks=true; //Now this is SizeBlocks
- #else
- Skip_XX(Element_Size, "HEVC Data");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_idfm()
-{
- Element_Name("Description");
-
- Info_C4(Description, "Description"); Param_Info1(Mpeg4_Description(Description));
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_pasp()
-{
- Element_Name("Pixel Aspect Ratio");
-
- //Parsing
- int32u hSpacing, vSpacing;
- Get_B4 (hSpacing, "hSpacing");
- Get_B4 (vSpacing, "vSpacing");
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- if (vSpacing)
- {
- float32 PixelAspectRatio=(float32)hSpacing/vSpacing;
- Clear(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio);
- Fill(Stream_Video, StreamPos_Last, Video_PixelAspectRatio, PixelAspectRatio, 3, true);
- Streams[moov_trak_tkhd_TrackID].CleanAperture_PixelAspectRatio=PixelAspectRatio; //This is the PAR of the clean aperture
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_sinf()
-{
- Element_Name("Protection scheme information box");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_frma()
-{
- Element_Name("Original format box");
-
- //Parsing
- std::string Codec;
- Get_String(4, Codec, "data_format");
-
- FILLING_BEGIN();
- CodecID_Fill(Ztring(Codec.c_str()), Stream_Video, StreamPos_Last, InfoCodecID_Format_Mpeg4);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_imif()
-{
- NAME_VERSION_FLAG("IPMP Information box");
-
- //Parsing
- Descriptors();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_schi()
-{
- Element_Name("scheme information box");
-
- //Parsing
- Skip_XX(Element_Size, "scheme_specific_data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_sinf_schm()
-{
- NAME_VERSION_FLAG("scheme type box");
-
- //Parsing
- Skip_C4( "scheme_type");
- Skip_B4( "scheme_version");
- if (Flags&0x000001)
- Skip_UTF8(Element_Size-Element_Offset, "scheme_uri");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_wave()
-{
- Element_Name("Wave");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_wave_acbf()
-{
- Element_Name("Audio Bitrate Control Mode");
-
- //Parsing
- Skip_B4( "Bit Rate Control Mode");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_wave_enda()
-{
- //Parsing
- int16u Endianness;
- Get_B2 (Endianness, "Endianness");
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- if (Streams[moov_trak_tkhd_TrackID].IsPcm)
- {
- if (Streams[moov_trak_tkhd_TrackID].Parsers.size()==1)
- ((File_Pcm*)Streams[moov_trak_tkhd_TrackID].Parsers[0])->Endianness=Endianness?'L':'B';
- if (Streams[moov_trak_tkhd_TrackID].Parsers.size()==2)
- {
- ((File_ChannelGrouping*)Streams[moov_trak_tkhd_TrackID].Parsers[0])->Endianness=Endianness?'L':'B';
- ((File_Pcm*)Streams[moov_trak_tkhd_TrackID].Parsers[1])->Endianness=Endianness?'L':'B';
- }
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_wave_frma()
-{
- Element_Name("Data format");
-
- //Parsing
- int16u Codec_Peek;
- Peek_B2(Codec_Peek);
- if (Codec_Peek==0x6D73) //"ms", Microsoft 2CC
- {
- int16u CodecMS;
- Skip_C2( "Codec_MS");
- Get_B2 (CodecMS, "CC2");
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- Ztring OldFormat=Retrieve(Stream_Audio, StreamPos_Last, Audio_CodecID);
- Ztring NewFormat=Ztring::ToZtring(CodecMS, 16);
- if (OldFormat!=NewFormat)
- {
- Clear(Stream_Audio, StreamPos_Last, Audio_CodecID);
- CodecID_Fill(NewFormat, Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff);
- }
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, CodecMS, 16, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec_CC, CodecMS, 16, true);
- FILLING_END();
- }
- else
- {
- int32u Codec;
- Get_C4(Codec, "Codec");
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- FILLING_BEGIN();
- if (Codec!=0x6D703461) //"mp4a"
- {
- Ztring OldFormat=Retrieve(Stream_Audio, StreamPos_Last, Audio_CodecID);
- Ztring NewFormat=Ztring().From_CC4(Codec);
- if (OldFormat!=NewFormat)
- {
- Clear(Stream_Audio, StreamPos_Last, Audio_CodecID);
- CodecID_Fill(NewFormat, Stream_Audio, StreamPos_Last, InfoCodecID_Format_Mpeg4);
- }
- }
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Ztring().From_CC4(Codec), true);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec_CC, Ztring().From_CC4(Codec), true);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_wave_samr()
-{
- Element_Name("AMR decode config");
-
- //Parsing
- int32u Vendor;
- int8u Version;
- Get_C4 (Vendor, "Encoder vendor");
- Get_B1 (Version, "Encoder version");
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-
- if (moov_trak_mdia_minf_stbl_stsd_Pos>1)
- return; //Handling only the first description
-
- Fill(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_Name, Mpeg4_Vendor(Vendor));
- Fill(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_Version, Version);
- Fill(Stream_Audio, StreamPos_Last, Audio_Encoded_Library, Retrieve(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_Name)+__T(' ')+Ztring::ToZtring(Version));
- Ztring Encoded_Library_String=Retrieve(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_Name)+(Version?(__T("Revision")+Ztring::ToZtring(Version)):Ztring());
- Fill(Stream_Audio, StreamPos_Last, Audio_Encoded_Library_String, Encoded_Library_String, true);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_wave_srcq()
-{
- Element_Name("Source Quality");
-
- //Parsing
- Skip_B4( "Source Quality");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx_wave_xxxx()
-{
- if ((Element_Code&0x6D730000)!=0x6D730000)
- return; //Only msxx format is known
-
- Element_Name("Microsoft Audio");
-
- //Parsing
- int32u SamplesPerSec, AvgBytesPerSec;
- int16u FormatTag, Channels, BitsPerSample;
- Get_L2 (FormatTag, "FormatTag");
- Get_L2 (Channels, "Channels");
- Get_L4 (SamplesPerSec, "SamplesPerSec");
- Get_L4 (AvgBytesPerSec, "AvgBytesPerSec");
- Skip_L2( "BlockAlign");
- Get_L2 (BitsPerSample, "BitsPerSample");
-
- FILLING_BEGIN();
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Channels!=5?Channels:6, 10, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, SamplesPerSec, 10, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate_Nominal, AvgBytesPerSec*8, 10, true);
- FILLING_END();
-
- //Options
- if (Element_Offset+2>Element_Size)
- return; //No options
-
- //Parsing
- int16u Option_Size;
- Get_L2 (Option_Size, "cbSize");
-
- //Filling
- if (Option_Size>0)
- {
- Skip_XX(Option_Size, "Unknown");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsh()
-{
- Element_Name("Shadow Sync Sample");
-
- //Parsing
- int32u entry_count;
- Get_B4 (entry_count, "entry-count");
-
- for (int32u Pos=0; Pos<entry_count; Pos++)
- {
- Skip_B4( "shadowed-sample-number");
- Skip_B4( "sync-sample-number");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stss()
-{
- NAME_VERSION_FLAG("Sync Sample");
-
- Streams[moov_trak_tkhd_TrackID].stss.clear();
-
- //Parsing
- int32u entry_count;
- Get_B4 (entry_count, "entry-count");
-
- int32u Offset=1; //By default, begin at 1
- bool stss_PreviouslyEmpty=Streams[moov_trak_tkhd_TrackID].stss.empty();
- for (int32u Pos=0; Pos<entry_count; Pos++)
- {
- int32u sample_number;
-
- //Too much slow
- /*
- Get_B4 (sample_number, "sample-number");
- */
-
- //Faster
- if (Element_Offset+4>Element_Size)
- break; //Problem
- sample_number=BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset);
- Element_Offset+=4;
-
- //Coherency testing (first frame is 0 or 1)
- if (sample_number==0 && Offset)
- {
- for (size_t Pos=0; Pos<Streams[moov_trak_tkhd_TrackID].stss.size(); Pos++)
- Streams[moov_trak_tkhd_TrackID].stss[Pos]--;
- Offset=0;
- }
-
- Streams[moov_trak_tkhd_TrackID].stss.push_back(sample_number-Offset);
- }
- if (!stss_PreviouslyEmpty)
- std::sort(Streams[moov_trak_tkhd_TrackID].stss.begin(), Streams[moov_trak_tkhd_TrackID].stss.end());
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stsz()
-{
- NAME_VERSION_FLAG("Sample Size")
-
- Stream=Streams.find(moov_trak_tkhd_TrackID);
- int32u Sample_Size, Sample_Count;
- int8u FieldSize;
- if (Element_Code==Elements::moov_trak_mdia_minf_stbl_stsz)
- {
- Get_B4 (Sample_Size, "Sample Size");
- FieldSize=32;
- }
- else
- {
- Skip_B3( "Reserved");
- Get_B1 (FieldSize, "Field size");
- Sample_Size=0;
- }
- Get_B4 (Sample_Count, "Number of entries");
-
- if (Sample_Size>0)
- {
- //Detecting wrong stream size with some PCM streams
- if (StreamKind_Last==Stream_Audio)
- {
- const Ztring &Codec=Retrieve(Stream_Audio, StreamPos_Last, Audio_CodecID);
- if (Codec==__T("raw ")
- || MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Codec).find(__T("PCM"))==0
- || MediaInfoLib::Config.Codec_Get(Codec, InfoCodec_KindofCodec).find(__T("PCM"))==0)
- {
- int64u Duration=Retrieve(StreamKind_Last, StreamPos_Last, Audio_Duration).To_int64u();
- int64u Resolution=Retrieve(StreamKind_Last, StreamPos_Last, Audio_BitDepth).To_int64u();
- int64u SamplingRate=Retrieve(StreamKind_Last, StreamPos_Last, Audio_SamplingRate).To_int64u();
- int64u Channels=Retrieve(StreamKind_Last, StreamPos_Last, Audio_Channel_s_).To_int64u();
- int64u Stream_Size_Theory=Duration*Resolution*SamplingRate*Channels/8/1000;
- int64u Stream_Size_Real=Sample_Size; Stream_Size_Real*=Sample_Count;
- for (int64u Multiplier=1; Multiplier<=32; Multiplier++)
- if (Stream_Size_Real*Multiplier>Stream_Size_Theory*0.995 && Stream_Size_Real*Multiplier<Stream_Size_Theory*1.005)
- {
- Streams[moov_trak_tkhd_TrackID].stsz_Sample_Multiplier=Multiplier;
- break;
- }
- }
- }
-
- Stream->second.stsz_StreamSize=Sample_Size; Stream->second.stsz_StreamSize*=Sample_Count;
- if (Sample_Size==1)
- Stream->second.stsz_StreamSize*=Streams[moov_trak_tkhd_TrackID].stsz_Sample_Multiplier;
- else
- Stream->second.stsz_Sample_Multiplier=1; //Sampe_Size is correct, no need of stsz_Sample_Multiplier
-
- Stream->second.stsz_Sample_Size=Sample_Size;
- Stream->second.stsz_Sample_Count=Sample_Count;
-
- if (Sample_Count>1 && Retrieve(StreamKind_Last, StreamPos_Last, "BitRate_Mode").empty())
- Fill(StreamKind_Last, StreamPos_Last, "BitRate_Mode", "CBR");
-
- }
- else
- {
- int32u Size;
- /*
- if (FieldSize==4)
- BS_Begin(); //Too much slow
- */
- for (int32u Pos=0; Pos<Sample_Count; Pos++)
- {
- //Too much slow
- /*
- switch(FieldSize)
- {
- case 4 : Get_S4 (4, Size, "Size"); break;
- case 8 : {int8u Size1; Get_B1 (Size1, "Size"); Size=Size1;} break;
- case 16 : {int16u Size2; Get_B2 (Size2, "Size"); Size=Size2;} break;
- case 32 : {int32u Size4; Get_B4 (Size4, "Size"); Size=Size4;} break;
- default : return;
- }
- */
-
- //Faster
- if (Element_Offset+4>Element_Size)
- break; //Problem
- switch(FieldSize)
- {
- case 4 : if (Sample_Count%2)
- Size=Buffer[Buffer_Offset+(size_t)Element_Offset]&0x0F;
- else
- {
- Size=Buffer[Buffer_Offset+(size_t)Element_Offset]>>4;
- Element_Offset++;
- }
- break;
- case 8 : Size=BigEndian2int8u (Buffer+Buffer_Offset+(size_t)Element_Offset); Element_Offset++; break;
- case 16 : Size=BigEndian2int16u(Buffer+Buffer_Offset+(size_t)Element_Offset); Element_Offset+=2; break;
- case 32 : Size=BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset); Element_Offset+=4; break;
- default : return;
- }
-
- Stream->second.stsz_StreamSize+=Size;
- Stream->second.stsz_Total.push_back(Size);
- if (Pos<FrameCount_MaxPerStream)
- Stream->second.stsz.push_back(Size);
- }
- /*
- if (FieldSize==4)
- BS_End(); //Too much slow
- */
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stts()
-{
- NAME_VERSION_FLAG("Time to Sample");
-
- //Parsing
- int32u NumberOfEntries;
- Get_B4(NumberOfEntries, "Number of entries");
-
- Stream=Streams.find(moov_trak_tkhd_TrackID);
- Stream->second.stts_Min=(int32u)-1;
- Stream->second.stts_Max=0;
- Stream->second.stts_FrameCount=0;
- #ifdef MEDIAINFO_DVDIF_ANALYZE_YES
- std::map<int32u, int64u> Duration_FrameCount; //key is duration
- int64u Duration_FrameCount_Max=0;
- int32u Duration_FrameCount_Max_Duration=0;
- if (StreamKind_Last==Stream_Video && Retrieve(Stream_Video, StreamPos_Last, "Format")==__T("DV") && Streams[moov_trak_tkhd_TrackID].Parsers[0] && ((File_DvDif*)Streams[moov_trak_tkhd_TrackID].Parsers[0])->Mpeg4_stts==NULL)
- ((File_DvDif*)Streams[moov_trak_tkhd_TrackID].Parsers[0])->Mpeg4_stts=new File_DvDif::stts;
- #endif //MEDIAINFO_DVDIF_ANALYZE_YES
-
- #if MEDIAINFO_DEMUX
- Streams[moov_trak_tkhd_TrackID].stts_Durations.clear();
- #endif //MEDIAINFO_DEMUX
-
- for (int32u Pos=0; Pos<NumberOfEntries; Pos++)
- {
- int32u SampleCount, SampleDuration;
- Get_B4(SampleCount, "Sample Count");
- Get_B4(SampleDuration, "Sample Duration");
-
- moov_trak_mdia_minf_stbl_stts_Common(SampleCount, SampleDuration, Pos, NumberOfEntries);
-
- #ifdef MEDIAINFO_DVDIF_ANALYZE_YES
- if (StreamKind_Last==Stream_Video && Retrieve(Stream_Video, StreamPos_Last, "Format")==__T("DV"))
- {
- File_DvDif::stts_part DV_stts_Part;
- DV_stts_Part.Pos_Begin=Stream->second.stts_FrameCount-SampleCount;
- DV_stts_Part.Pos_End=Stream->second.stts_FrameCount;
- DV_stts_Part.Duration=SampleDuration;
- ((File_DvDif*)Streams[moov_trak_tkhd_TrackID].Parsers[0])->Mpeg4_stts->push_back(DV_stts_Part);
-
- Duration_FrameCount[SampleDuration]+=Stream->second.stts_FrameCount;
- if (Duration_FrameCount_Max<=Duration_FrameCount[SampleDuration])
- {
- Duration_FrameCount_Max=Duration_FrameCount[SampleDuration];
- Duration_FrameCount_Max_Duration=SampleDuration;
- }
- }
- #endif //MEDIAINFO_DVDIF_ANALYZE_YES
- }
-
- FILLING_BEGIN();
- if (StreamKind_Last==Stream_Video)
- {
- Fill(Stream_Video, StreamPos_Last, Video_FrameCount, Stream->second.stts_FrameCount);
-
- #ifdef MEDIAINFO_DVDIF_ANALYZE_YES
- if (StreamKind_Last==Stream_Video && Retrieve(Stream_Video, StreamPos_Last, "Format")==__T("DV"))
- {
- //Clean up the "normal" value
- for (size_t Pos=0; Pos<((File_DvDif*)Streams[moov_trak_tkhd_TrackID].Parsers[0])->Mpeg4_stts->size(); Pos++)
- {
- if (((File_DvDif*)Streams[moov_trak_tkhd_TrackID].Parsers[0])->Mpeg4_stts->at(Pos).Duration==Duration_FrameCount_Max_Duration)
- {
- ((File_DvDif*)Streams[moov_trak_tkhd_TrackID].Parsers[0])->Mpeg4_stts->erase(((File_DvDif*)Streams[moov_trak_tkhd_TrackID].Parsers[0])->Mpeg4_stts->begin()+Pos);
- Pos--;
- }
- }
-
- if (((File_DvDif*)Streams[moov_trak_tkhd_TrackID].Parsers[0])->Mpeg4_stts->empty())
- {delete ((File_DvDif*)Streams[moov_trak_tkhd_TrackID].Parsers[0])->Mpeg4_stts; ((File_DvDif*)Streams[moov_trak_tkhd_TrackID].Parsers[0])->Mpeg4_stts=NULL;}
- }
- #endif //MEDIAINFO_DVDIF_ANALYZE_YES
- }
- FILLING_END();
-}
-
-void File_Mpeg4::moov_trak_mdia_minf_stbl_stts_Common(int32u SampleCount, int32u SampleDuration, int32u Pos, int32u NumberOfEntries)
-{
- FILLING_BEGIN();
- stream::stts_struct Stts;
- Stts.SampleCount=SampleCount;
- Stts.SampleDuration=SampleDuration;
- Stream->second.stts.push_back(Stts);
- if (Pos==1 && NumberOfEntries>=2 && NumberOfEntries<=3 && Stream->second.stts_FrameCount==1 && Stts.SampleDuration!=Stream->second.stts_Max && Stream->second.mdhd_TimeScale)
- {
- Stream->second.stts_Duration_FirstFrame=Stream->second.stts[0].SampleDuration;
- Stream->second.stts_Min=Stts.SampleDuration;
- Stream->second.stts_Max=Stts.SampleDuration;
- }
- if (NumberOfEntries>=2 && NumberOfEntries<=3 && Pos+1==NumberOfEntries && Stts.SampleCount==1 && Stream->second.stts_Min==Stream->second.stts_Max && Stts.SampleDuration!=Stream->second.stts_Max && Stream->second.mdhd_TimeScale)
- {
- Stream->second.stts_Duration_LastFrame=Stts.SampleDuration;
- }
- else
- {
- if (Stts.SampleDuration<Stream->second.stts_Min) Stream->second.stts_Min=Stts.SampleDuration;
- if (Stts.SampleDuration>Stream->second.stts_Max) Stream->second.stts_Max=Stts.SampleDuration;
- }
- Stream->second.stts_FrameCount+=Stts.SampleCount;
- if (Stts.SampleDuration<0x80000000)
- Stream->second.stts_Duration+=Stts.SampleCount*Stts.SampleDuration;
- else
- Stream->second.stts_Duration-=Stts.SampleCount*(((int32u)-1)-Stts.SampleDuration+1); //Negative value
-
- #if MEDIAINFO_DEMUX
- stream::stts_duration stts_Duration;
- stts_Duration.Pos_Begin=Stream->second.stts_FrameCount-Stts.SampleCount;
- stts_Duration.Pos_End=Stream->second.stts_FrameCount;
- stts_Duration.SampleDuration=Stts.SampleDuration;
- if (Streams[moov_trak_tkhd_TrackID].stts_Durations.empty())
- stts_Duration.DTS_Begin=0;
- else
- {
- stream::stts_durations::iterator Previous=Streams[moov_trak_tkhd_TrackID].stts_Durations.end(); --Previous;
- stts_Duration.DTS_Begin=Previous->DTS_End;
- }
- stts_Duration.DTS_End=stts_Duration.DTS_Begin+Stts.SampleCount*Stts.SampleDuration;
- Streams[moov_trak_tkhd_TrackID].stts_Durations.push_back(stts_Duration);
- #endif //MEDIAINFO_DEMUX
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tapt()
-{
- Element_Name("Aperture Mode Dimensions");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tapt_clef()
-{
- NAME_VERSION_FLAG("Clean Aperture Dimensions");
-
- //Parsing
- Skip_BFP4(16, "cleanApertureWidth");
- Skip_BFP4(16, "cleanApertureHeight");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tapt_prof()
-{
- NAME_VERSION_FLAG("Production Aperture Dimensions");
-
- //Parsing
- Skip_BFP4(16, "productionApertureWidth");
- Skip_BFP4(16, "productionApertureHeight");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tapt_enof()
-{
- NAME_VERSION_FLAG("Encoded Pixels Dimensions");
-
- //Parsing
- Skip_BFP4(16, "encodedApertureWidth");
- Skip_BFP4(16, "encodedApertureHeight");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tkhd()
-{
- NAME_VERSION_FLAG("Track Header")
-
- //Parsing
- Ztring Date_Created, Date_Modified;
- float32 a, b, u, c, d, v, x, y, w;
- int64u Duration;
- int16u Volume;
- Skip_Flags(Flags, 0, "Track Enabled");
- Skip_Flags(Flags, 1, "Track in Movie");
- Skip_Flags(Flags, 2, "Track in Preview");
- Skip_Flags(Flags, 3, "Track in Poster");
- Get_DATE1904_DEPENDOFVERSION(Date_Created, "Creation time");
- Get_DATE1904_DEPENDOFVERSION(Date_Modified, "Modification time");
- Get_B4 (moov_trak_tkhd_TrackID, "Track ID"); Element_Info1(moov_trak_tkhd_TrackID);
- Skip_B4( "Reserved");
- Get_B_DEPENDOFVERSION(Duration, "Duration"); if (moov_mvhd_TimeScale) {Param_Info2(Duration*1000/moov_mvhd_TimeScale, " ms"); Element_Info2(Duration*1000/moov_mvhd_TimeScale, " ms");}
- Skip_B4( "Reserved");
- Skip_B4( "Reserved");
- Skip_B2( "Layer");
- Skip_B2( "Alternate group");
- Get_B2 (Volume, "Volume"); Param_Info1(Ztring::ToZtring(((float)Volume)/256));
- Skip_B2( "Reserved");
- Element_Begin1("Matrix structure");
- Get_BFP4(16, a, "a (width scale)");
- Get_BFP4(16, b, "b (width rotate)");
- Get_BFP4( 2, u, "u (width angle)");
- Get_BFP4(16, c, "c (height rotate)");
- Get_BFP4(16, d, "d (height scale)");
- Get_BFP4( 2, v, "v (height angle)");
- Get_BFP4(16, x, "x (position left)");
- Get_BFP4(16, y, "y (position top)");
- Get_BFP4( 2, w, "w (divider)");
- Element_End0();
- Get_BFP4(16, moov_trak_tkhd_Width, "Track width");
- Get_BFP4(16, moov_trak_tkhd_Height, "Track height");
-
- FILLING_BEGIN();
- //Case of header is after main part
- std::map<int32u, stream>::iterator Temp=Streams.find((int32u)-1);
- if (Temp!=Streams.end())
- {
- Streams[moov_trak_tkhd_TrackID]=Temp->second;
- Temp->second.Parsers.clear(); //They are a copy, we don't want that the destructor deletes the Parser
- Streams.erase(Temp);
- }
-
- if (moov_mvhd_TimeScale)
- Fill(StreamKind_Last, StreamPos_Last, "Duration", float64_int64s(((float64)Duration)*1000/moov_mvhd_TimeScale));
- Fill(StreamKind_Last, StreamPos_Last, "Encoded_Date", Date_Created);
- Fill(StreamKind_Last, StreamPos_Last, "Tagged_Date", Date_Modified);
- Fill(StreamKind_Last, StreamPos_Last, General_ID, moov_trak_tkhd_TrackID, 10, true);
- Streams[moov_trak_tkhd_TrackID].tkhd_Duration=Duration;
- if (moov_trak_tkhd_Height*d)
- moov_trak_tkhd_DisplayAspectRatio=(moov_trak_tkhd_Width*a)/(moov_trak_tkhd_Height*d);
- moov_trak_tkhd_Rotation=(float32)(std::atan2(b, a)*180.0/3.14159);
- if (moov_trak_tkhd_Rotation<0)
- moov_trak_tkhd_Rotation+=360;
-
- #if MEDIAINFO_EVENTS
- if (StreamIDs_Size>1 && Config->File_ID_OnlyRoot_Get())
- StreamIDs_Width[StreamIDs_Size-1]=Streams.size()<=1?0:8; //If referenced file and more than 1 stream, referenced ID is discarded, else referenced ID is used
- #endif //MEDIAINFO_EVENTS
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref()
-{
- Element_Name("Track Reference");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref_chap()
-{
- Element_Name("Chapters List");
-
- //Parsing
- int32u TrackID;
- while (Element_Offset<Element_Size)
- {
- Get_B4(TrackID, "track-ID");
-
- FILLING_BEGIN();
- Streams[TrackID].IsChapter=true;
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref_clcp()
-{
- Element_Name("Closed Caption Track");
-
- //Parsing
- while (Element_Offset<Element_Size)
- Skip_B4( "track-ID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref_dpnd()
-{
- Element_Name("MPEG-4 dependency");
-
- //Parsing
- while (Element_Offset<Element_Size)
- Skip_B4( "track-ID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref_fall()
-{
- Element_Name("Audio Track Reference");
-
- //Parsing
- while (Element_Offset<Element_Size)
- Skip_B4( "track-ID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref_folw()
-{
- Element_Name("Default Track");
-
- //Parsing
- while (Element_Offset<Element_Size)
- Skip_B4( "track-ID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref_forc()
-{
- Element_Name("Forced Subtitle Track");
-
- //Parsing
- while (Element_Offset<Element_Size)
- Skip_B4( "track-ID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref_hint()
-{
- Element_Name("original media");
-
- //Parsing
- while (Element_Offset<Element_Size)
- Skip_B4( "track-ID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref_ipir()
-{
- Element_Name("IPI declarations");
-
- //Parsing
- while (Element_Offset<Element_Size)
- Skip_B4( "track-ID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref_mpod()
-{
- Element_Name("included elementary stream");
-
- //Parsing
- while (Element_Offset<Element_Size)
- Skip_B4( "track-ID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref_scpt()
-{
- Element_Name("transcript");
-
- //Parsing
- while (Element_Offset<Element_Size)
- Skip_B4( "track-ID");
-}
-
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref_ssrc()
-{
- Element_Name("non-primary source (used in other track)");
-
- //Parsing
- while (Element_Offset<Element_Size)
- Skip_B4( "track-ID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref_sync()
-{
- Element_Name("synchronization source");
-
- //Parsing
- while (Element_Offset<Element_Size)
- Skip_B4( "track-ID");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_tref_tmcd()
-{
- Element_Name("TimeCode");
-
- //Parsing
- int32u TrackID;
- Get_B4(TrackID, "track-ID");
-
- FILLING_BEGIN();
- Streams[moov_trak_tkhd_TrackID].TimeCode_TrackID=TrackID;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_udta()
-{
- Element_Name("User Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_trak_udta_xxxx()
-{
- moov_udta_xxxx();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta()
-{
- Element_Name("User Data");
-
- moov_trak_tkhd_TrackID=(int32u)-1;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_AllF()
-{
- Element_Name("AllF");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_chpl()
-{
- Element_Name("Chapters");
-
- //Parsing
- Ztring Value;
- std::string ValueS;
- int64u Time;
- int8u Size;
- size_t Pos=0;
- Stream_Prepare(Stream_Menu);
- Skip_B8( "Unknown");
- Skip_B1( "Chapter Count");
- Fill(Stream_Menu, StreamPos_Last, Menu_Chapters_Pos_Begin, Count_Get(Stream_Menu, StreamPos_Last), 10, true);
- while (Element_Offset<Element_Size)
- {
- Get_B8 (Time, "Time");
- Get_B1 (Size, "Text size");
- Get_String(Size, ValueS, "Value");
- Value.From_UTF8(ValueS.c_str());
- if (Value.empty())
- Value.From_Local(ValueS.c_str()); //Trying Local...
-
- FILLING_BEGIN();
- Fill(Stream_Menu, StreamPos_Last, Ztring().Duration_From_Milliseconds(Time/10000).To_Local().c_str(), Value);
- FILLING_END();
-
- //Next
- Pos++;
- }
- Fill(Stream_Menu, StreamPos_Last, Menu_Chapters_Pos_End, Count_Get(Stream_Menu, StreamPos_Last), 10, true);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_clsf()
-{
- NAME_VERSION_FLAG("Classification"); //3GP
-
- //Parsing
- Ztring ClassificationInfo;
- int32u ClassificationEntity;
- int16u Language, ClassificationTable;
- Get_C4(ClassificationEntity, "ClassificationEntity");
- Get_C2(ClassificationTable, "ClassificationTable");
- Get_B2(Language, "Language");
- bool Utf8=true;
- if (Element_Offset+2<=Element_Size)
- {
- int16u Utf16;
- Peek_B2(Utf16);
- if (Utf16==0xFEFF)
- Utf8=false;
- }
- if (Utf8)
- Get_UTF8(Element_Size-Element_Offset, ClassificationInfo, "ClassificationInfo");
- else
- Get_UTF16(Element_Size-Element_Offset, ClassificationInfo, "ClassificationInfo");
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, "Classification", Ztring().From_CC4(ClassificationTable));
- Fill(Stream_General, 0, "Classification_Reason", ClassificationInfo);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_DcMD()
-{
- Element_Name("Kodak MetaData");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_DcMD_Cmbo()
-{
- Element_Name("Camera byte order");
-
- //Parsing
- Skip_C2( "EXIF byte order");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_DcMD_DcME()
-{
- Element_Name("DcME?");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_DcMD_DcME_Keyw()
-{
- Element_Name("Keywords?");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_DcMD_DcME_Mtmd()
-{
- Element_Name("Metadata?");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_DcMD_DcME_Rate()
-{
- Element_Name("Rate?");
-
- //Parsing
- Skip_B2( "Zero");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_FIEL()
-{
- Element_Name("FIEL?");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_FXTC()
-{
- Element_Name("Adobe After Effects?");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_hinf()
-{
- Element_Name("Hint Format");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_hinv()
-{
- Element_Name("Hint Version");
-
- //Parsing
- Skip_Local(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_hnti()
-{
- Element_Name("Hint Info");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_hnti_rtp()
-{
- Element_Name("Real Time");
-
- //Parsing
- Skip_Local(Element_Size, "Value");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_ID32()
-{
- NAME_VERSION_FLAG("ID3v2"); //3GP
-
- //Parsing
- int16u Language;
- Get_B2(Language, "Language");
- Skip_XX(Element_Size-Element_Offset, "ID3v2data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_kywd()
-{
- NAME_VERSION_FLAG("Keywords"); //3GP
-
- //Parsing
- int16u Language;
- int8u KeywordCnt;
- Get_B2(Language, "Language");
- Get_B1(KeywordCnt, "KeywordCnt");
- for (int8u Pos=0; Pos<KeywordCnt; Pos++)
- {
- Ztring KeywordInfo;
- int8u KeywordSize;
- Get_B1(KeywordSize, "KeywordSize");
- bool Utf8=true;
- if (Element_Offset+2<=Element_Size)
- {
- int16u Utf16;
- Peek_B2(Utf16);
- if (Utf16==0xFEFF)
- Utf8=false;
- }
- if (Utf8)
- Get_UTF8(KeywordSize, KeywordInfo, "KeywordInfo");
- else
- Get_UTF16(KeywordSize, KeywordInfo, "KeywordInfo");
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, "Keywords", KeywordInfo);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_loci()
-{
- NAME_VERSION_FLAG("Location Information"); //3GP
-
- //Parsing
- Skip_XX(Element_Size-Element_Offset, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_LOOP()
-{
- Element_Name("LOOP");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_MCPS()
-{
- Element_Name("Mechanical Copyright Protection Society?");
-
- //Parsing
- Ztring Encoder;
- Get_Local(Element_Size, Encoder, "Value");
-
- //Filling
- //Fill(Stream_General, 0, General_Encoded_Library, Encoder);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_meta()
-{
- NAME_VERSION_FLAG("Metadata");
- INTEGRITY_VERSION(0);
-
- //Filling
- moov_meta_hdlr_Type=Elements::moov_udta_meta;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_meta_hdlr()
-{
- moov_meta_hdlr();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_meta_ilst()
-{
- moov_meta_ilst();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_meta_ilst_xxxx()
-{
- moov_meta_ilst_xxxx();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_meta_ilst_xxxx_data()
-{
- moov_meta_ilst_xxxx_data();
-}
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_meta_ilst_xxxx_mean()
-{
- moov_meta_ilst_xxxx_mean();
-}
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_meta_ilst_xxxx_name()
-{
- moov_meta_ilst_xxxx_name();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_ndrm()
-{
- //Parsing
- Skip_XX(Element_Size, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_nsav()
-{
- Element_Name("No Save");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_ptv()
-{
- Element_Name("Print To Video");
-
- //Parsing
- Skip_B2( "Display size");
- Skip_B2( "Reserved");
- Skip_B2( "Reserved");
- Skip_B1( "Slide show");
- Skip_B1( "Play on open");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_rtng()
-{
- NAME_VERSION_FLAG("Rating"); //3GP
-
- //Parsing
- Ztring RatingInfo;
- int32u RatingEntity, RatingCriteria;
- int16u Language;
- Get_C4(RatingEntity, "RatingEntity");
- Get_C4(RatingCriteria, "RatingCriteria");
- Get_B2(Language, "Language");
- bool Utf8=true;
- if (Element_Offset+2<=Element_Size)
- {
- int16u Utf16;
- Peek_B2(Utf16);
- if (Utf16==0xFEFF)
- Utf8=false;
- }
- if (Utf8)
- Get_UTF8(Element_Size-Element_Offset, RatingInfo, "RatingInfo");
- else
- Get_UTF16(Element_Size-Element_Offset, RatingInfo, "RatingInfo");
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, General_LawRating, Ztring().From_CC4(RatingCriteria));
- Fill(Stream_General, 0, General_LawRating_Reason, RatingInfo);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_Sel0()
-{
- Element_Name("Sel0");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_tags()
-{
- Element_Name("Tags");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_tags_meta()
-{
- Element_Name("Metadata");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_tags_tseg()
-{
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_tags_tseg_tshd()
-{
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_WLOC()
-{
- Element_Name("WLOC");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_XMP_()
-{
- Element_Name("eXtensible Metadata Platform");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_yrrc()
-{
- NAME_VERSION_FLAG("Recording Year"); //3GP
-
- //Parsing
- int16u RecordingYear;
- Get_B2 (RecordingYear, "RecordingYear");
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, General_Released_Date, RecordingYear);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::moov_udta_xxxx()
-{
- //Getting the method
- std::string Parameter;
- method Method=Metadata_Get(Parameter, Element_Code);
- Element_Info1(Parameter.c_str());
-
- if (moov_trak_tkhd_TrackID!=(int32u)-1)
- switch (Method)
- {
- case Method_String:
- case Method_String2:
- Method=Method_String3; break;
- default: ;
- }
-
- switch (Method)
- {
- case Method_None :
- {
- Element_Name("Unknown");
- }
- break;
- case Method_Binary :
- {
- Element_Name("Binary");
- Skip_XX(Element_Size, "Unknown");
- return;
- }
- break;
- case Method_String :
- {
- Element_Name("Text");
-
- //Parsing
- Ztring Value;
- int32u Size32=0;
- int16u Size16=0, Language;
- bool IsText=true;
- if (Element_Size<=4)
- IsText=false;
- else
- {
- Peek_B4(Size32);
- if (4+(int64u)Size32>Element_Size)
- {
- Size32=0;
- Peek_B2(Size16);
- if (4+(int64u)Size16>Element_Size)
- IsText=false;
- }
- }
- if (!IsText)
- {
- Skip_XX(Element_Size, "Unknown");
- return;
- }
-
- while(Element_Offset<Element_Size)
- {
- if (Size32)
- {
- Get_Local(Size32, Value, "Value");
- Get_B4 (Size32, "Size");
- }
- else
- {
- Get_B2 (Size16, "Size");
- Get_B2 (Language, "Language"); Param_Info1(Language_Get(Language));
- Get_Local(Size16, Value, "Value");
- }
-
- FILLING_BEGIN();
- if (moov_trak_tkhd_TrackID==(int32u)-1)
- {
- if (Retrieve(Stream_General, 0, Parameter.c_str()).empty())
- Fill(Stream_General, 0, Parameter.c_str(), Value);
- }
- else
- {
- Streams[moov_trak_tkhd_TrackID].Infos[Parameter]=Value;
- }
- FILLING_END();
-
- if (Element_Offset+1==Element_Size)
- {
- int8u Null;
- Peek_B1(Null);
- if (Null==0x00)
- Skip_B1( "NULL");
- }
- if (Element_Offset+4<=Element_Size && Size32)
- {
- int32u Null;
- Peek_B4(Null);
- if (Null==0x00000000)
- Skip_XX(Element_Size-Element_Offset,"Padding");
- }
- if (Element_Offset+2<=Element_Size && Size16)
- {
- int16u Null;
- Peek_B2(Null);
- if (Null==0x0000)
- Skip_XX(Element_Size-Element_Offset,"Padding");
- }
- }
- }
- break;
- case Method_String2 :
- {
- NAME_VERSION_FLAG("Text");
-
- //Parsing
- Ztring Value;
- int16u Language;
- while(Element_Offset<Element_Size)
- {
- Get_B2(Language, "Language"); Param_Info1(Language_Get(Language));
- bool Utf8=true;
- if (Element_Offset+2<=Element_Size)
- {
- int16u Utf16;
- Peek_B2(Utf16);
- if (Utf16==0xFEFF)
- Utf8=false;
- }
- if (Utf8)
- Get_UTF8(Element_Size-Element_Offset, Value, "Value");
- else
- Get_UTF16(Element_Size-Element_Offset, Value, "Value");
-
- FILLING_BEGIN();
- if (moov_trak_tkhd_TrackID==(int32u)-1)
- {
- if (Retrieve(Stream_General, 0, Parameter.c_str()).empty())
- Fill(Stream_General, 0, Parameter.c_str(), Value);
- }
- else
- {
- Streams[moov_trak_tkhd_TrackID].Infos[Parameter]=Value;
- }
- FILLING_END();
- }
- }
- break;
- case Method_String3 :
- {
- if (moov_trak_tkhd_TrackID==(int32u)-1)
- {
- NAME_VERSION_FLAG("Text");
- }
-
- //Parsing
- Ztring Value;
- while(Element_Offset<Element_Size)
- {
- Get_UTF8(Element_Size-Element_Offset, Value,"Value");
-
- FILLING_BEGIN();
- if (moov_trak_tkhd_TrackID==(int32u)-1)
- {
- if (Retrieve(Stream_General, 0, Parameter.c_str()).empty())
- Fill(Stream_General, 0, Parameter.c_str(), Value);
- }
- else
- {
- if (Parameter!="Omud" // Some complex data is in Omud, but nothing interessant found
- && Parameter!="_SGI" // Found "_SGIxV4" with DM_IMAGE_PIXEL_ASPECT, in RLE, ignoring it for the moment
- && Parameter!="hway") // Unknown
- Streams[moov_trak_tkhd_TrackID].Infos[Parameter]=Value;
- }
- FILLING_END();
- }
- }
- break;
- case Method_Integer :
- {
- Element_Name("Integer");
-
- //Parsing
- Skip_XX(4, "Value");
- }
- break;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::pdin()
-{
- NAME_VERSION_FLAG("Progressive Download Information");
-
- //Parsing
- while (Element_Offset<Element_Size)
- {
- Skip_B4( "Rate");
- Skip_B4( "Initial Delay");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::PICT()
-{
- Element_Name("QuickDraw picture");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::pckg()
-{
- Element_Name("QTCA");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-
- FILLING_BEGIN();
- Accept("QTCA");
-
- Fill(Stream_General, 0, General_Format, "MPEG-4");
- CodecID_Fill(__T("QTCA"), Stream_General, 0, InfoCodecID_Format_Mpeg4);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::pnot()
-{
- Element_Name("Preview");
-
- //Parsing
- Info_B4(Date_Modified, "Modification date"); Param_Info1(Ztring().Date_From_Seconds_1904(Date_Modified));
- Skip_B2( "Version number");
- Skip_C4( "Atom type");
- Skip_B2( "Atom index");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::RDAO()
-{
- Element_Name("Audio O?");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::RDAS()
-{
- Element_Name("Audio S?");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::RDVO()
-{
- Element_Name("Video O?");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::RDVS()
-{
- Element_Name("Video S?");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::RED1()
-{
- Element_Name("RED Header");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-
- FILLING_BEGIN();
- Accept("R3D");
-
- Fill(Stream_General, 0, General_Format, "R3D");
- //Source: http://peter.schlaile.de/redcode/
-
- Finish();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::REDA()
-{
- Element_Name("RED Audio");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-
- Finish();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::REDV()
-{
- Element_Name("RED Video");
-
- //Parsing
- /*
- if (Streams[1].Parser==0)
- {
- Streams[1].Parser=new File_Mpeg4();
- Open_Buffer_Init(Streams[1].Parser);
- }
- */
-
- //Parsing
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
- Skip_B4( "Unknown");
- Skip_C4( "CodecID");
- Skip_B4( "Unknown");
- //Open_Buffer_Continue(Streams[1].Parser);
- Skip_XX(Element_Size-Element_Offset, "Data");
-
- Finish();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::REOB()
-{
- Element_Name("OB?");
-
- //Parsing
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::skip()
-{
- Element_Name("Skip");
-
- //Parsing
- Skip_XX(Element_Size, "Free");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4::wide()
-{
- Element_Name("Wide");
-
- //Parsing
- Skip_XX(Element_Size, "Free");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_MPEG4_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_TimeCode.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_TimeCode.cpp
deleted file mode 100644
index 58f91fe2b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_TimeCode.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEG4_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Mpeg4_TimeCode.h"
-#include "MediaInfo/TimeCode.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Mpeg4_TimeCode::File_Mpeg4_TimeCode()
-:File__Analyze()
-{
- //Out
- Pos=(int32u)-1;
-
- NumberOfFrames=0;
- DropFrame=false;
- NegativeTimes=false;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_TimeCode::Streams_Fill()
-{
- if (Pos!=(int32u)-1 && NumberOfFrames)
- {
- int64s Pos_Temp=Pos;
- float64 FrameRate_WithDF=NumberOfFrames;
- if (DropFrame)
- {
- float64 FramesPerHour_NDF=FrameRate_WithDF*60*60;
- FrameRate_WithDF*=(FramesPerHour_NDF-108)/FramesPerHour_NDF;
- }
-
- Fill(Stream_General, 0, "Delay", Pos_Temp*1000/FrameRate_WithDF, 0);
-
- TimeCode TC(Pos_Temp, NumberOfFrames, DropFrame);
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Time code");
- Fill(Stream_Other, StreamPos_Last, Other_TimeCode_FirstFrame, TC.ToString().c_str());
- if (Frame_Count==1)
- Fill(Stream_Other, StreamPos_Last, Other_TimeCode_Striped, "Yes");
- }
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg4_TimeCode::Read_Buffer_Continue()
-{
- //Parsing
- int32u Position=0;
- while (Element_Offset<Element_Size)
- {
- Get_B4 (Position, "Position");
- if (Pos==(int32u)-1) //First time code
- {
- Pos=Position;
- if (NegativeTimes)
- Pos=(int32s)Position;
- }
- }
-
- FILLING_BEGIN();
- Frame_Count+=Element_Size/4;
-
- if (!Status[IsAccepted])
- {
- Accept("TimeCode");
- Fill("TimeCode");
- }
- FILLING_END();
-}
-
-}
-
-#endif //MEDIAINFO_MPEG4_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_TimeCode.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_TimeCode.h
deleted file mode 100644
index 6d91fd2b0..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg4_TimeCode.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Mpeg4_TimeCodeH
-#define MediaInfo_File_Mpeg4_TimeCodeH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Mpeg4_TimeCode
-//***************************************************************************
-
-class File_Mpeg4_TimeCode : public File__Analyze
-{
-public :
- //In
- int8u NumberOfFrames;
- bool DropFrame;
- bool NegativeTimes;
-
- //Out
- int64s Pos;
-
- //Constructor/Destructor
- File_Mpeg4_TimeCode();
-
-protected :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Global
- void Read_Buffer_Continue();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegPs.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegPs.cpp
deleted file mode 100644
index bd5c9dd1f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegPs.cpp
+++ /dev/null
@@ -1,4863 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEGPS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_MpegPs.h"
-#include "MediaInfo/Multiple/File_Mpeg_Psi.h"
-#if defined(MEDIAINFO_AVC_YES)
- #include "MediaInfo/Video/File_Avc.h"
-#endif
-#if defined(MEDIAINFO_HEVC_YES)
- #include "MediaInfo/Video/File_Hevc.h"
-#endif
-#if defined(MEDIAINFO_MPEG4V_YES)
- #include "MediaInfo/Video/File_Mpeg4v.h"
-#endif
-#if defined(MEDIAINFO_MPEGV_YES)
- #include "MediaInfo/Video/File_Mpegv.h"
-#endif
-#if defined(MEDIAINFO_VC1_YES)
- #include "MediaInfo/Video/File_Vc1.h"
-#endif
-#if defined(MEDIAINFO_AVSV_YES)
- #include "MediaInfo/Video/File_AvsV.h"
-#endif
-#if defined(MEDIAINFO_DIRAC_YES)
- #include "MediaInfo/Video/File_Dirac.h"
-#endif
-#if defined(MEDIAINFO_AAC_YES)
- #include "MediaInfo/Audio/File_Aac.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_DTS_YES)
- #include "MediaInfo/Audio/File_Dts.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if defined(MEDIAINFO_PCM_YES)
- #include "MediaInfo/Audio/File_Pcm_M2ts.h"
-#endif
-#if defined(MEDIAINFO_PCM_YES)
- #include "MediaInfo/Audio/File_Pcm_Vob.h"
-#endif
-#if defined(MEDIAINFO_SMPTEST0302_YES)
- #include "MediaInfo/Audio/File_SmpteSt0302.h"
-#endif
-#if defined(MEDIAINFO_PS2A_YES)
- #include "MediaInfo/Audio/File_Ps2Audio.h"
-#endif
-#if defined(MEDIAINFO_RLE_YES)
- #include "MediaInfo/Image/File_Rle.h"
-#endif
-#if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- #include "MediaInfo/Text/File_AribStdB24B37.h"
-#endif
-#if defined(MEDIAINFO_DVBSUBTITLE_YES)
- #include "MediaInfo/Text/File_DvbSubtitle.h"
-#endif
-#if defined(MEDIAINFO_PGS_YES)
- #include "MediaInfo/Text/File_Pgs.h"
-#endif
-#if defined(MEDIAINFO_TELETEXT_YES)
- #include "MediaInfo/Text/File_Teletext.h"
-#endif
-#include "MediaInfo/File_Unknown.h"
-#include <ZenLib/Utils.h>
-#include <algorithm>
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
- #include "MediaInfo/MediaInfo_Events_Internal.h"
-#endif //MEDIAINFO_EVENTS
-#if MEDIAINFO_IBIUSAGE && MEDIAINFO_SEEK
- #include "MediaInfo/Multiple/File_Ibi.h"
-#endif //MEDIAINFO_IBIUSAGE && MEDIAINFO_SEEK
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* MpegPs_System_Fixed[]=
-{
- "CBR",
- "VBR",
-};
-
-//---------------------------------------------------------------------------
-const char* MpegPs_stream_id(int8u Element_Name)
-{
- if (Element_Name>=0xC0
- && Element_Name<=0xDF) return "MPEG Audio";
- else if (Element_Name>=0xE0
- && Element_Name<=0xEF) return "MPEG Video";
- else if (Element_Name==0xB8) return "For all MPEG Audio streams";
- else if (Element_Name==0xB9) return "For all MPEG Video streams";
- else if (Element_Name==0xBD) return "Private 1";
- else if (Element_Name==0xBF) return "Private 2";
- else if (Element_Name==0xFD) return "Private HD";
- else return "";
-}
-
-//---------------------------------------------------------------------------
-const char* MpegPs_Codec(int8u Element_Name)
-{
- if (Element_Name>=0xC0
- && Element_Name<=0xDF) return "MPEG-A";
- else if (Element_Name>=0xE0
- && Element_Name<=0xEF) return "MPEG-V";
- else return "";
-}
-
-//---------------------------------------------------------------------------
-int32u MpegPs_Default_stream_type(int8u Element_Name, int8u Mpeg_Version)
-{
- if (Element_Name>=0xC0
- && Element_Name<=0xDF) return Mpeg_Version==0x02?0x04:0x03;
- else if (Element_Name>=0xE0
- && Element_Name<=0xEF) return Mpeg_Version==0x02?0x02:0x01;
- else return 0x00;
-}
-
-//---------------------------------------------------------------------------
-const char* MpegPs_trick_mode_control_values[8]=
-{
- "Fast forward",
- "Slow motion",
- "Freeze frame",
- "Fast reverse",
- "Slow reverse",
- "Reserved",
- "Reserved",
- "Reserved"
-};
-
-//---------------------------------------------------------------------------
-const char* MpegPs_stream_id_extension(int8u stream_id_extension)
-{
- switch (stream_id_extension)
- {
- case 0x00 : return "IPMP Control Information Streams"; //ISO/IEC 13818-11
- case 0x01 : return "IPMP Streams"; //ISO/IEC 13818-11
- default :
- if (stream_id_extension>=0x02
- && stream_id_extension<=0x11) return "ISO/IEC 14496-17 text Streams";
- else if (stream_id_extension>=0x12
- && stream_id_extension<=0x21) return "ISO/IEC 23002-3 auxiliary video data Streams";
- else if (stream_id_extension>=0x55
- && stream_id_extension<=0x5F) return "VC-1";
- else if (stream_id_extension>=0x60
- && stream_id_extension<=0x6F) return "Dirac";
- else if (stream_id_extension==0x71) return "Audio";
- else if (stream_id_extension==0x72) return "Audio Ext";
- else if (stream_id_extension==0x76) return "Audio";
- else if (stream_id_extension>=0x75
- && stream_id_extension<=0x7F) return "VC-1";
- else return "";
- }
-}
-
-//---------------------------------------------------------------------------
-extern const char* Mpeg_Psi_stream_type_Format(int8u stream_type, int32u format_identifier);
-extern const char* Mpeg_Psi_stream_type_Codec(int8u stream_type, int32u format_identifier);
-extern stream_t Mpeg_Psi_stream_type_StreamKind(int32u stream_type, int32u format_identifier);
-extern const char* Mpeg_Psi_stream_type_Info(int8u stream_type, int32u format_identifier);
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_MpegPs::File_MpegPs()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("MpegPs");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_MpegPs;
- StreamIDs_Width[0]=2;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- #endif //MEDIAINFO_DEMUX
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(0); //Container1
- #endif //MEDIAINFO_TRACE
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
- Buffer_TotalBytes_Fill_Max=(int64u)-1; //Disabling this feature for this format, this is done in the parser
- Trusted_Multiplier=2;
-
- //In
- FromTS=false;
- FromTS_stream_type=0x00; //No info
- FromTS_program_format_identifier=0x00000000; //No info
- FromTS_format_identifier=0x00000000; //No info
- FromTS_descriptor_tag=0x00; //No info
- MPEG_Version=0; //No info
- Searching_TimeStamp_Start=true;
- #ifdef MEDIAINFO_MPEG4_YES
- ParserFromTs=NULL;
- SLConfig=NULL;
- #endif
- #if MEDIAINFO_DEMUX
- SubStream_Demux=NULL;
- Demux_StreamIsBeingParsed_type=(int8u)-1;
- #endif //MEDIAINFO_DEMUX
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- FromAribStdB24B37=false;
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
-
- //Out
- HasTimeStamps=false;
-
- //Temp
- SizeToAnalyze=8*1024*1024;
- video_stream_Unlimited=false;
- Buffer_DataSizeToParse=0;
- #if MEDIAINFO_SEEK
- Seek_Value=(int64u)-1;
- Seek_ID=(int64u)-1;
- Duration_Detected=false;
- #endif //MEDIAINFO_SEEK
-
- //From packets
- program_mux_rate=(int32u)-1;
-
- BookMark_Set(); //for stream parsing in phase 2
-}
-
-//---------------------------------------------------------------------------
-File_MpegPs::~File_MpegPs()
-{
- #if MEDIAINFO_DEMUX
- if (FromTS_stream_type==0x20) //If SubStream, this object owns the demux handler
- delete SubStream_Demux; //SubStream_Demux=NULL;
- #endif //MEDIAINFO_DEMUX
- #ifdef MEDIAINFO_MPEG4_YES
- delete ParserFromTs; //ParserFromTs=NULL;
- delete SLConfig; //SLConfig=NULL;
- #endif
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_MpegPs::Streams_Fill()
-{
- //For each Streams
- for (size_t StreamID=0; StreamID<0x100; StreamID++)
- Streams_Fill_PerStream(StreamID, Streams[StreamID], KindOfStream_Main);
-
- //For each private Streams
- for (size_t StreamID=0; StreamID<0x100; StreamID++)
- Streams_Fill_PerStream(StreamID, Streams_Private1[StreamID], KindOfStream_Private);
-
- //For each extension Streams
- for (size_t StreamID=0; StreamID<0x100; StreamID++)
- {
- Streams_Fill_PerStream(StreamID, Streams_Extension[StreamID], KindOfStream_Extension);
-
- //Special cases
- if ((StreamID==0x71 || StreamID==0x76) && !Streams_Extension[StreamID].Parsers.empty() && Streams_Extension[0x72].StreamIsRegistred) //DTS-HD and TrueHD
- {
- Fill(Stream_Audio, StreamPos_Last, Audio_MuxingMode, "Stream extension");
- if (!IsSub)
- Fill(Stream_Audio, StreamPos_Last, Audio_MuxingMode_MoreInfo, "HD part is in stream extension 114 (0x72)");
- }
- }
-
- //Tags in MPEG Video
- if (Count_Get(Stream_Video)>0)
- Fill(Stream_General, 0, General_Encoded_Library, Retrieve(Stream_Video, 0, Video_Encoded_Library));
-
- //Special case: Video PTS
- if (video_stream_PTS.size()>=2+4*2+1*2 && Retrieve(Stream_Video, 0, Video_FrameRate).To_float64()>30.000) //TODO: Parser all kind of files
- {
- sort(video_stream_PTS.begin(), video_stream_PTS.end());
- video_stream_PTS.erase(video_stream_PTS.begin(), video_stream_PTS.begin()+4); //Removing first frames, they may lack of B/P frames
- video_stream_PTS.resize(video_stream_PTS.size()-4); //Removing last frames, they may lack of B/P frames
-
- //Trying to detect container FPS
- std::vector<int64u> video_stream_PTS_Between;
- for (size_t Pos=1; Pos<video_stream_PTS.size(); Pos++)
- video_stream_PTS_Between.push_back(video_stream_PTS[Pos]-video_stream_PTS[Pos-1]);
- std::sort(video_stream_PTS_Between.begin(), video_stream_PTS_Between.end());
- video_stream_PTS_Between.erase(video_stream_PTS_Between.begin(), video_stream_PTS_Between.begin()+1); //Removing first timec, they may be wrong value due to missing frame
- video_stream_PTS_Between.resize(video_stream_PTS_Between.size()-1); //Removing last frames, they may be wrong value due to missing frame
- if (video_stream_PTS_Between[0]*0.9<video_stream_PTS_Between[video_stream_PTS_Between.size()-1]
- && video_stream_PTS_Between[0]*1.1>video_stream_PTS_Between[video_stream_PTS_Between.size()-1])
- {
- float64 Time=(float)(video_stream_PTS[video_stream_PTS.size()-1]-video_stream_PTS[0])/(video_stream_PTS.size()-1)/90;
- if (Time)
- {
- float64 FrameRate_Container=1000/Time;
- if (Retrieve(Stream_Video, 0, Video_ScanType)==__T("Interlaced"))
- FrameRate_Container/=2; //PTS is per field
- float64 FrameRate_Original=Retrieve(Stream_Video, 0, Video_FrameRate).To_float64();
- if (!(FrameRate_Original>=FrameRate_Container*0.9 && FrameRate_Original<=FrameRate_Container*1.1)
- && !(FrameRate_Container>=FrameRate_Original*0.9 && FrameRate_Container<=FrameRate_Original*1.1))
- {
- Clear(Stream_Video, 0, Video_FrameRate); //Or automatic filling thinks current FrameRate is the container FrameRate (usaly Conatainer FrameRate is filled first, not here)
- Fill(Stream_Video, 0, Video_FrameRate, FrameRate_Container, 3, true);
- if (FrameRate_Original)
- Fill(Stream_Video, 0, Video_FrameRate_Original, FrameRate_Original);
- }
- }
- }
- }
-
- if (Count_Get(Stream_Video)==1 && Retrieve(Stream_Video, 0, Video_Format_Version)==__T("Version 1"))
- Fill(Stream_General, 0, General_InternetMediaType, "video/mpeg", Unlimited, true, true);
-}
-
-//---------------------------------------------------------------------------
-void File_MpegPs::Streams_Fill_PerStream(size_t StreamID, ps_stream &Temp, kindofstream KindOfStream)
-{
- //By the parser
- StreamKind_Last=Stream_Max;
- size_t Count=0;
- if (!Temp.Parsers.empty() && Temp.Parsers[0] && Temp.Parsers[0]->Status[IsAccepted])
- {
- Fill(Temp.Parsers[0]);
-
- if (Temp.Parsers[0]->Count_Get(Stream_Video) && Temp.Parsers[0]->Count_Get(Stream_Text))
- {
- //Special case: Video and Text are together
- Stream_Prepare(Stream_Video);
- Count=Merge(*Temp.Parsers[0], Stream_Video, 0, StreamPos_Last);
- }
- else
- Count=Merge(*Temp.Parsers[0]);
-
- Ztring LawRating=Temp.Parsers[0]->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=Temp.Parsers[0]->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
- }
-
- //By the TS stream_type
- if (StreamKind_Last==Stream_Max)
- {
- //Disabling stream_private_1 if needed (will be done by Streams_Private1 object)
- if (Temp.stream_type!=0 && (StreamID==0xBD /*|| StreamID==0xBF*/))
- {
- bool StreamIsDetected=false;
- for (size_t Pos=0; Pos<Streams_Private1.size(); Pos++)
- if (!Streams_Private1[Pos].Parsers.empty() && Streams_Private1[Pos].Parsers[0])
- StreamIsDetected=true;
- if (StreamIsDetected)
- Temp.stream_type=0;
- }
-
- if (Temp.stream_type!=0)
- {
- Stream_Prepare(Mpeg_Psi_stream_type_StreamKind(Temp.stream_type, 0x00000000));
- Count=1;
- }
- }
-
- //By StreamIsRegistred
- if (StreamKind_Last==Stream_Max)
- {
- if (Temp.StreamIsRegistred>16)
- {
- if (StreamID>=0xC0 && StreamID<=0xDF)
- {
- Stream_Prepare(Stream_Audio);
- Count=1;
- }
- if (StreamID>=0xE0 && StreamID<=0xEF)
- {
- Stream_Prepare(Stream_Video);
- Count=1;
- }
- }
- }
-
- #ifdef MEDIAINFO_MPEG4_YES
- if (StreamKind_Last==Stream_Audio && SLConfig)
- Fill(Stream_Audio, StreamPos_Last, Audio_MuxingMode, "SL");
- #endif //MEDIAINFO_MPEG4_YES
-
- //More info
- for (size_t StreamPos=Count_Get(StreamKind_Last)-Count; StreamPos<Count_Get(StreamKind_Last); StreamPos++)
- {
- ///Saving StreamKind and Stream_Pos
- Temp.StreamKind=StreamKind_Last;
- Temp.StreamPos=Count_Get(StreamKind_Last)-Count;
-
- //Common
- if (KindOfStream==KindOfStream_Main)
- {
- Ztring ID; ID.From_Number(StreamID);
- Ztring ID_String; ID_String.From_Number(StreamID); ID_String+=__T(" (0x"); ID_String+=Ztring::ToZtring(StreamID, 16); ID_String+=__T(")");
- if (!Retrieve(StreamKind_Last, StreamPos, General_ID).empty())
- {
- Fill(StreamKind_Last, StreamPos, General_ID, StreamID);
- Ztring ID_String; ID_String.From_Number(StreamID); ID_String+=__T(" (0x"); ID_String+=Ztring::ToZtring(StreamID, 16); ID_String+=__T(")");
- Fill(StreamKind_Last, StreamPos, General_ID_String, ID_String, true); //TODO: merge with Decimal_Hexa in file_MpegTs
- }
- Fill(StreamKind_Last, StreamPos, General_ID, ID, true);
- Fill(StreamKind_Last, StreamPos, General_ID_String, ID_String, true); //TODO: merge with Decimal_Hexa in file_MpegTs
- }
- else if (KindOfStream==KindOfStream_Private)
- {
- Ztring ID=__T("189");
- if (StreamID)
- ID+=__T("-")+Ztring::ToZtring(StreamID);
- if (!Temp.Parsers[0]->Retrieve(StreamKind_Last, StreamPos, General_ID).empty())
- ID+=__T("-")+Temp.Parsers[0]->Retrieve(StreamKind_Last, StreamPos, General_ID);
- Fill(StreamKind_Last, StreamPos, General_ID, ID, true);
- Ztring ID_String=__T("189 (0xBD)");
- if (StreamID)
- ID_String+=__T("-")+Ztring::ToZtring(StreamID)+__T(" (0x")+Ztring::ToZtring(StreamID, 16)+__T(")");
- if (!Temp.Parsers[0]->Retrieve(StreamKind_Last, StreamPos, General_ID_String).empty())
- ID_String+=__T("-")+Temp.Parsers[0]->Retrieve(StreamKind_Last, StreamPos, General_ID_String);
- else if (!Temp.Parsers[0]->Retrieve(StreamKind_Last, StreamPos, General_ID).empty())
- ID_String+=__T("-")+Temp.Parsers[0]->Retrieve(StreamKind_Last, StreamPos, General_ID);
- Fill(StreamKind_Last, StreamPos, General_ID_String, ID_String, true); //TODO: merge with Decimal_Hexa in file_MpegTs
- if (StreamID)
- Fill(StreamKind_Last, StreamPos, "MuxingMode", "DVD-Video", Unlimited, true, true);
- }
- else if (KindOfStream==KindOfStream_Extension)
- {
- Ztring ID=__T("253");
- if (StreamID)
- ID+=__T("-")+Ztring::ToZtring(StreamID);
- Fill(StreamKind_Last, StreamPos, General_ID, ID, true);
- Ztring ID_String=__T("253 (0xFD)");
- if (StreamID)
- ID_String+=__T("-")+Ztring::ToZtring(StreamID)+__T(" (0x")+Ztring::ToZtring(StreamID, 16)+__T(")");
- Fill(StreamKind_Last, StreamPos, General_ID_String, ID_String, true); //TODO: merge with Decimal_Hexa in file_MpegTs
- }
-
- if (Retrieve(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Format)).empty() && Temp.stream_type!=0)
- Fill(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Format), Mpeg_Psi_stream_type_Format(Temp.stream_type, 0x0000));
- if (Retrieve(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Codec)).empty() && Temp.stream_type!=0)
- Fill(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Codec), Mpeg_Psi_stream_type_Codec(Temp.stream_type, 0x0000));
-
- if (Temp.TimeStamp_Start.PTS.TimeStamp!=(int64u)-1)
- {
- Fill(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Delay_Original), Retrieve(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Delay)), true);
- Clear(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Delay));
- Fill(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Delay_Original_Source), Retrieve(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Delay_Source)), true);
- Clear(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Delay_Source));
- Fill(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Delay_Original_Settings), Retrieve(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Delay_Settings)), true);
- Clear(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Delay_Settings));
-
- Fill(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Delay), ((float64)Temp.TimeStamp_Start.PTS.TimeStamp)/90, 3, true);
- Fill(StreamKind_Last, StreamPos, Fill_Parameter(StreamKind_Last, Generic_Delay_Source), "Container");
- }
-
- //Bitrate calculation
- if (FrameInfo.PTS!=(int64u)-1 && (StreamKind_Last==Stream_Video || StreamKind_Last==Stream_Audio))
- {
- int64u BitRate=Retrieve(StreamKind_Last, StreamPos, "BitRate").To_int64u();
- if (BitRate==0)
- BitRate=Retrieve(StreamKind_Last, StreamPos, "BitRate_Nominal").To_int64u();
- if (BitRate==0)
- FrameInfo.PTS=(int64u)-1;
- else
- FrameInfo.PTS+=BitRate; //Saving global BitRate
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_MpegPs::Streams_Update()
-{
- //For each Streams
- for (size_t StreamID=0; StreamID<0x100; StreamID++)
- for (size_t Pos=0; Pos<Streams[StreamID].Parsers.size(); Pos++)
- Streams[StreamID].Parsers[Pos]->Open_Buffer_Update();
-
- //For each private Streams
- for (size_t StreamID=0; StreamID<0x100; StreamID++)
- for (size_t Pos=0; Pos<Streams_Private1[StreamID].Parsers.size(); Pos++)
- Streams_Private1[StreamID].Parsers[Pos]->Open_Buffer_Update();
-
- //For each extension Streams
- for (size_t StreamID=0; StreamID<0x100; StreamID++)
- for (size_t Pos=0; Pos<Streams_Extension[StreamID].Parsers.size(); Pos++)
- Streams_Extension[StreamID].Parsers[Pos]->Open_Buffer_Update();
-}
-
-//---------------------------------------------------------------------------
-void File_MpegPs::Streams_Finish()
-{
- if (Streams.empty())
- return; //Parsing already done. ToDo: real time
-
- FrameInfo.PTS=0; //Will be used for BitRate calculation
- FrameInfo.DTS=0; //Will be used for Duration calculation
-
- //For each Streams
- for (size_t StreamID=0; StreamID<0x100; StreamID++)
- Streams_Finish_PerStream(StreamID, Streams[StreamID], KindOfStream_Main);
-
- //For each private Streams
- StreamOrder_CountOfPrivateStreams_Temp=0;
- for (size_t StreamID=0; StreamID<0x100; StreamID++)
- Streams_Finish_PerStream(StreamID, Streams_Private1[StreamID], KindOfStream_Private);
-
- //For each extesnion Streams
- for (size_t StreamID=0; StreamID<0x100; StreamID++)
- Streams_Finish_PerStream(StreamID, Streams_Extension[StreamID], KindOfStream_Extension);
-
- //Bitrate coherancy
- if (!IsSub && FrameInfo.PTS>0 && FrameInfo.PTS!=(int64u)-1 && FrameInfo.DTS!=0 && File_Size!=(int64u)-1)
- {
- int64u BitRate_FromDuration=File_Size*8000*90/FrameInfo.DTS;
- int64u BitRate_FromBitRates=FrameInfo.PTS;
-
- if (BitRate_FromDuration>=BitRate_FromBitRates*3
- || BitRate_FromDuration<=BitRate_FromBitRates/20)
- {
- //Clearing durations
- for (size_t StreamKind=0; StreamKind<=Stream_Text; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- Clear((stream_t)StreamKind, StreamPos, (stream_t)Fill_Parameter((stream_t)StreamKind, Generic_Duration));
- if (Count_Get(Stream_Video)==1)
- Clear(Stream_Video, 0, Video_Duration);
- }
- }
-
- #if MEDIAINFO_IBIUSAGE
- if (!IsSub && Config_Ibi_Create)
- {
- for (ibi::streams::iterator IbiStream_Temp=Ibi.Streams.begin(); IbiStream_Temp!=Ibi.Streams.end(); ++IbiStream_Temp)
- {
- if (IbiStream_Temp->second && IbiStream_Temp->second->DtsFrequencyNumerator==1000000000 && IbiStream_Temp->second->DtsFrequencyDenominator==1)
- {
- bool IsOk=true;
- for (size_t Pos=0; Pos<IbiStream_Temp->second->Infos.size(); Pos++)
- if (!IbiStream_Temp->second->Infos[Pos].IsContinuous && Pos+1!=IbiStream_Temp->second->Infos.size())
- IsOk=false;
- if (IsOk) //Only is all items are continuous (partial IBI not yet supported)
- {
- IbiStream_Temp->second->DtsFrequencyNumerator=90000;
- for (size_t Pos=0; Pos<IbiStream_Temp->second->Infos.size(); Pos++)
- {
- int64u Temp=IbiStream_Temp->second->Infos[Pos].Dts*90/1000000;
- IbiStream_Temp->second->Infos[Pos].Dts=Temp;
- }
- }
- }
- }
- }
- #endif //MEDIAINFO_IBIUSAGE
-}
-
-//---------------------------------------------------------------------------
-void File_MpegPs::Streams_Finish_PerStream(size_t StreamID, ps_stream &Temp, kindofstream KindOfStream)
-{
- //By the parser
- if (Temp.StreamKind==Stream_Max && !Temp.Parsers.empty() && Temp.Parsers[0])
- Streams_Fill_PerStream(StreamID, Temp, KindOfStream);
-
- //Init
- if (Temp.StreamKind==Stream_Max)
- return;
- StreamKind_Last=Temp.StreamKind;
- StreamPos_Last=Temp.StreamPos;
-
- //By the parser
- if (!Temp.Parsers.empty() && Temp.Parsers[0])
- {
- if (!Temp.Parsers[0]->Status[IsFinished])
- {
- Temp.Parsers[0]->ShouldContinueParsing=false;
- int64u File_Size_Temp=File_Size;
- File_Size=File_Offset+Buffer_Offset+Element_Offset;
- #if MEDIAINFO_EVENTS
- Temp.Parsers[0]->PES_FirstByte_IsAvailable=false;
- #endif //MEDIAINFO_EVENTS
- Open_Buffer_Continue(Temp.Parsers[0], Buffer, 0, false);
- File_Size=File_Size_Temp;
- Finish(Temp.Parsers[0]);
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return;
- #endif //MEDIAINFO_DEMUX
- }
- Ztring ID=Retrieve(StreamKind_Last, StreamPos_Last, General_ID);
- Ztring ID_String=Retrieve(StreamKind_Last, StreamPos_Last, General_ID_String);
- Merge(*Temp.Parsers[0], StreamKind_Last, 0, StreamPos_Last);
- Fill(StreamKind_Last, StreamPos_Last, General_ID, ID, true);
- Fill(StreamKind_Last, StreamPos_Last, General_ID_String, ID_String, true);
- if (!IsSub)
- {
- switch (KindOfStream)
- {
- case KindOfStream_Private :
- if (Streams[0xBD].StreamOrder!=(size_t)-1)
- Fill(StreamKind_Last, StreamPos_Last, General_StreamOrder, Streams[0xBD].StreamOrder+StreamOrder_CountOfPrivateStreams_Temp);
- if (StreamOrder_CountOfPrivateStreams_Minus1 && StreamOrder_CountOfPrivateStreams_Temp<StreamOrder_CountOfPrivateStreams_Minus1)
- StreamOrder_CountOfPrivateStreams_Temp++;
- break;
- case KindOfStream_Extension :
- if (Streams[0xFD].StreamOrder!=(size_t)-1)
- Fill(StreamKind_Last, StreamPos_Last, General_StreamOrder, Streams[0xFD].StreamOrder);
- break;
- default :
- if (Temp.StreamOrder!=(size_t)-1)
- Fill(StreamKind_Last, StreamPos_Last, General_StreamOrder, Temp.StreamOrder);
- }
- Fill(StreamKind_Last, StreamPos_Last, General_FirstPacketOrder, Temp.FirstPacketOrder);
- }
-
- //Special cases
- if (Temp.Parsers[0]->Count_Get(Stream_Video) && Temp.Parsers[0]->Count_Get(Stream_Text))
- {
- //Video and Text are together
- size_t Text_Count=Temp.Parsers[0]->Count_Get(Stream_Text);
- for (size_t Parser_Pos=0; Parser_Pos<Text_Count; Parser_Pos++)
- {
- Ztring ID=Retrieve(Stream_Video, Temp.StreamPos, Video_ID)+__T("-")+Temp.Parsers[0]->Retrieve(Stream_Text, Parser_Pos, Text_ID);
- StreamPos_Last=(size_t)-1;
- for (size_t Pos=0; Pos<Count_Get(Stream_Text); Pos++)
- if (Retrieve(Stream_Text, Pos, Text_ID)==ID && Retrieve(Stream_Video, Temp.StreamPos, "MuxingMode")==Temp.Parsers[0]->Retrieve(Stream_Text, Parser_Pos, "MuxingMode"))
- {
- StreamPos_Last=Pos;
- break;
- }
- if (StreamPos_Last==(size_t)-1)
- Stream_Prepare(Stream_Text, StreamPos_Last);
- Merge(*Temp.Parsers[0], Stream_Text, Parser_Pos, StreamPos_Last);
-
- if (!IsSub)
- Fill(Stream_Text, StreamPos_Last, "MuxingMode_MoreInfo", __T("Muxed in Video #")+Ztring().From_Number(Temp.StreamPos+1));
- Fill(Stream_Text, StreamPos_Last, Text_ID, ID, true);
- Fill(Stream_Text, StreamPos_Last, Text_ID_String, Retrieve(Stream_Video, Temp.StreamPos, Video_ID_String)+__T("-")+Temp.Parsers[0]->Retrieve(Stream_Text, Parser_Pos, Text_ID), true);
- Fill(Stream_Text, StreamPos_Last, Text_Delay, Retrieve(Stream_Video, Temp.StreamPos, Video_Delay), true);
- if (!IsSub)
- {
- switch (KindOfStream)
- {
- case KindOfStream_Private :
- if (Streams[0xBD].StreamOrder!=(size_t)-1)
- Fill(Stream_Text, StreamPos_Last, General_StreamOrder, Streams[0xBD].StreamOrder);
- break;
- case KindOfStream_Extension :
- if (Streams[0xFD].StreamOrder!=(size_t)-1)
- Fill(Stream_Text, StreamPos_Last, General_StreamOrder, Streams[0xFD].StreamOrder);
- break;
- default :
- if (Temp.StreamOrder!=(size_t)-1)
- Fill(Stream_Text, StreamPos_Last, General_StreamOrder, Temp.StreamOrder);
- }
- Fill(StreamKind_Last, StreamPos_Last, General_FirstPacketOrder, Temp.FirstPacketOrder);
- }
- }
-
- StreamKind_Last=Temp.StreamKind;
- StreamPos_Last=Temp.StreamPos;
- }
-
- //Law rating
- Ztring LawRating=Temp.Parsers[0]->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=Temp.Parsers[0]->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
- }
-
- //Duration if it is missing from the parser
- if (Temp.StreamKind!=Stream_Max && Retrieve(Temp.StreamKind, Temp.StreamPos, Fill_Parameter(Temp.StreamKind, Generic_Duration)).empty())
- {
- StreamKind_Last=Temp.StreamKind;
- StreamPos_Last=Temp.StreamPos;
-
- int64u Start=(int64u)-1, End=(int64u)-1, ByteDifference=(int64u)-1;
- if (Temp.TimeStamp_Start.DTS.TimeStamp!=(int64u)-1 && Temp.TimeStamp_End.DTS.TimeStamp!=(int64u)-1)
- {
- Start=Temp.TimeStamp_Start.DTS.TimeStamp;
- End=Temp.TimeStamp_End.DTS.TimeStamp;
- }
- else if (Temp.TimeStamp_Start.PTS.TimeStamp!=(int64u)-1 && Temp.TimeStamp_End.PTS.TimeStamp!=(int64u)-1)
- {
- Start=Temp.TimeStamp_Start.PTS.TimeStamp;
- End=Temp.TimeStamp_End.PTS.TimeStamp;
- if (Temp.TimeStamp_Start.PTS.File_Pos<Temp.TimeStamp_End.PTS.File_Pos)
- ByteDifference=Temp.TimeStamp_End.PTS.File_Pos-Temp.TimeStamp_Start.PTS.File_Pos;
- }
- if (Start!=(int64u)-1 && End!=(int64u)-1)
- {
- //TimeStamp
- if (End<0x100000000LL && Start>0x100000000LL) //Testing coherancy: no 13 hours long files.
- End+=0x200000000LL; //33 bits, cyclic
- if (Start<End)
- {
- int64u Duration=End-Start;
- if (ByteDifference!=(int64u)-1)
- {
- float BitRate=(ByteDifference*8)/(((float)Duration)/9000);
- if (BitRate>10000000000LL)
- Duration=0;
- }
- if (Duration)
- {
- if (StreamKind_Last==Stream_Video)
- {
- float64 FrameRate=Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate).To_float64();
- if (FrameRate!=0)
- Duration+=Ztring::ToZtring(90*1000/FrameRate, 0).To_int64u(); //We imagine that there is one frame in it
- }
-
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Duration), Duration/90, 10, true);
- }
- }
- }
- }
-
- //Bitrate calculation
- if (FrameInfo.PTS!=(int64u)-1 && (StreamKind_Last==Stream_Video || StreamKind_Last==Stream_Audio))
- {
- int64u BitRate=Retrieve(StreamKind_Last, StreamPos_Last, "BitRate").To_int64u();
- if (BitRate==0)
- BitRate=Retrieve(StreamKind_Last, StreamPos_Last, "BitRate_Nominal").To_int64u();
- if (BitRate==0)
- FrameInfo.PTS=(int64u)-1;
- else
- FrameInfo.PTS+=BitRate; //Saving global BitRate
- }
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_MpegPs::Synchronize()
-{
- //Synchronizing
- while (Buffer_Offset+4<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x01
- || Buffer[Buffer_Offset+3]< 0xB9))
- {
- Buffer_Offset+=2;
- while(Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Buffer_Offset+=2;
- if (Buffer_Offset>=Buffer_Size || Buffer[Buffer_Offset-1]==0x00)
- Buffer_Offset--;
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+4==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x01
- || Buffer[Buffer_Offset+3]< 0xB9))
- Buffer_Offset++;
- if (Buffer_Offset+3==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x01))
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00))
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && Buffer[Buffer_Offset ]!=0x00)
- Buffer_Offset++;
-
- if (Buffer_Offset+3>Buffer_Size)
- return false;
-
- //Synched is OK
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_MpegPs::Synched_Test()
-{
- //Trailing 0xFF
- while(Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]==0xFF)
- Buffer_Offset++;
-
- //Trailing 0x00
- while(Buffer_Offset+3<=Buffer_Size
- && Buffer[Buffer_Offset+2]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset ]==0x00)
- Buffer_Offset++;
-
- //Must have enough buffer for having header
- if (Buffer_Offset+3>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x01)
- Synched=false;
-
- //Quick search
- if (Synched && !Header_Parser_QuickSearch())
- return false;
-
- //We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_MpegPs::Synched_Init()
-{
- //private_stream_1 specific
- private_stream_1_ID=0x00;
- private_stream_1_Offset=0;
- private_stream_1_IsDvdVideo=false;
-
- //Count
- video_stream_Count=(int8u)-1;
- audio_stream_Count=(int8u)-1;
- private_stream_1_Count=(int8u)-1;
- private_stream_2_Count=(int8u)-1;
- extension_stream_Count=(int8u)-1;
- SL_packetized_stream_Count=(int8u)-1;
-
- //From packets
- program_mux_rate=0;
-
- //Default values
- Streams.resize(0x100);
- Streams_Private1.resize(0x100);
- Streams_Extension.resize(0x100);
- Streams[0xBA].Searching_Payload=true;
-
- //Temp
- stream_id_extension=0x55; //Default is set to VC-1, should never happens, but happens sometimes
- FirstPacketOrder_Last=0;
-
- //Case of extraction from MPEG-TS files
- if (File_Offset==0 && Buffer_Size>=4 && ((CC4(Buffer)&0xFFFFFFF0)==0x000001E0 || (CC4(Buffer)&0xFFFFFFE0)==0x000001C0 || CC4(Buffer)==0x000001BD || CC4(Buffer)==0x000001FA || CC4(Buffer)==0x000001FD || CC4(Buffer)==0x000001FE))
- {
- FromTS=true; //We want to anlyze this kind of file
- MPEG_Version=2; //By default, MPEG-TS is version 2
- Streams[Buffer[3]].Searching_Payload=true; //Activating the Streams
- }
-
- //TS specific
- if (FromTS)
- {
- Streams[0xBD].Searching_Payload=true; //private_stream_1
- Streams[0xBD].Searching_TimeStamp_Start=true; //private_stream_1
- Streams[0xBD].Searching_TimeStamp_End=true; //private_stream_1
- Streams[0xBF].Searching_Payload=true; //private_stream_2
- Streams[0xBF].Searching_TimeStamp_Start=true; //private_stream_2
- Streams[0xBF].Searching_TimeStamp_End=true; //private_stream_2
- for (int8u Pos=0xC0; Pos<=0xEF; Pos++)
- {
- Streams[Pos].Searching_Payload=true; //audio_stream or video_stream
- Streams[Pos].Searching_TimeStamp_Start=true; //audio_stream or video_stream
- Streams[Pos].Searching_TimeStamp_End=true; //audio_stream or video_stream
- }
- Streams[0xFA].Searching_Payload=true; //LATM
- Streams[0xFA].Searching_TimeStamp_Start=true; //LATM
- Streams[0xFA].Searching_TimeStamp_End=true; //LATM
- Streams[0xFD].Searching_Payload=true; //extension_stream
- Streams[0xFD].Searching_TimeStamp_Start=true; //extension_stream
- Streams[0xFD].Searching_TimeStamp_End=true; //extension_stream
- Streams[0xFE].Searching_Payload=true; //extension_stream?
- Streams[0xFE].Searching_TimeStamp_Start=true; //extension_stream?
- Streams[0xFE].Searching_TimeStamp_End=true; //extension_stream?
- }
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_MpegPs::Read_Buffer_Init()
-{
- #if MEDIAINFO_DEMUX
- // Demux_UnpacketizeContainer=Config->Demux_Unpacketize_Get();
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_ADVANCED2
-void File_MpegPs::Read_Buffer_SegmentChange()
-{
- if (!Streams.empty())
- for (size_t StreamID=0; StreamID<0x100; StreamID++)
- {
- for (size_t Pos=0; Pos<Streams[StreamID].Parsers.size(); Pos++)
- if (Streams[StreamID].Parsers[Pos])
- Streams[StreamID].Parsers[Pos]->Open_Buffer_SegmentChange();
- for (size_t Pos=0; Pos<Streams_Private1[StreamID].Parsers.size(); Pos++)
- if (Streams_Private1[StreamID].Parsers[Pos])
- Streams_Private1[StreamID].Parsers[Pos]->Open_Buffer_SegmentChange();
- for (size_t Pos=0; Pos<Streams_Extension[StreamID].Parsers.size(); Pos++)
- if (Streams_Extension[StreamID].Parsers[Pos])
- Streams_Extension[StreamID].Parsers[Pos]->Open_Buffer_SegmentChange();
- }
-}
-#endif //MEDIAINFO_ADVANCED2
-
-//---------------------------------------------------------------------------
-void File_MpegPs::Read_Buffer_Unsynched()
-{
- Searching_TimeStamp_Start=false;
-
- if (Streams.empty())
- return;
-
- //No need anymore of this Streams
- Streams[0xBB].Searching_Payload=false; //system_start
-
- //Reactivating interessant PS streams
- for (size_t StreamID=0; StreamID<0x100; StreamID++)
- {
- //End timestamp is out of date
- Streams[StreamID].TimeStamp_End.PTS.File_Pos=(int64u)-1;
- Streams[StreamID].TimeStamp_End.DTS.File_Pos=(int64u)-1;
- Streams[StreamID].TimeStamp_End.PTS.TimeStamp=(int64u)-1;
- Streams[StreamID].TimeStamp_End.DTS.TimeStamp=(int64u)-1;
- Streams[StreamID].Searching_TimeStamp_Start=false;
- for (size_t Pos=0; Pos<Streams[StreamID].Parsers.size(); Pos++)
- if (Streams[StreamID].Parsers[Pos])
- {
- #if MEDIAINFO_SEEK
- if (IsSub)
- Streams[StreamID].Parsers[Pos]->Unsynch_Frame_Count=Frame_Count_NotParsedIncluded;
- #endif //MEDIAINFO_SEEK
- Streams[StreamID].Parsers[Pos]->Open_Buffer_Unsynch();
- }
- Streams_Private1[StreamID].TimeStamp_End.PTS.File_Pos=(int64u)-1;
- Streams_Private1[StreamID].TimeStamp_End.DTS.File_Pos=(int64u)-1;
- Streams_Private1[StreamID].TimeStamp_End.PTS.TimeStamp=(int64u)-1;
- Streams_Private1[StreamID].TimeStamp_End.DTS.TimeStamp=(int64u)-1;
- Streams_Private1[StreamID].Searching_TimeStamp_Start=false;
- for (size_t Pos=0; Pos<Streams_Private1[StreamID].Parsers.size(); Pos++)
- if (Streams_Private1[StreamID].Parsers[Pos])
- {
- #if MEDIAINFO_SEEK
- Streams_Private1[StreamID].Parsers[Pos]->Unsynch_Frame_Count=Unsynch_Frame_Count;
- #endif //MEDIAINFO_SEEK
- Streams_Private1[StreamID].Parsers[Pos]->Open_Buffer_Unsynch();
- }
- Streams_Extension[StreamID].TimeStamp_End.PTS.File_Pos=(int64u)-1;
- Streams_Extension[StreamID].TimeStamp_End.DTS.File_Pos=(int64u)-1;
- Streams_Extension[StreamID].TimeStamp_End.PTS.TimeStamp=(int64u)-1;
- Streams_Extension[StreamID].TimeStamp_End.DTS.TimeStamp=(int64u)-1;
- Streams_Extension[StreamID].Searching_TimeStamp_Start=false;
- for (size_t Pos=0; Pos<Streams_Extension[StreamID].Parsers.size(); Pos++)
- if (Streams_Extension[StreamID].Parsers[Pos])
- {
- #if MEDIAINFO_SEEK
- Streams_Extension[StreamID].Parsers[Pos]->Unsynch_Frame_Count=Unsynch_Frame_Count;
- #endif //MEDIAINFO_SEEK
- Streams_Extension[StreamID].Parsers[Pos]->Open_Buffer_Unsynch();
- }
- }
- #if MEDIAINFO_SEEK
- Unsynch_Frame_Count=(int64u)-1; //We do not use it
- #endif //MEDIAINFO_SEEK
- video_stream_Unlimited=false;
- Buffer_DataSizeToParse=0;
- PES_FirstByte_IsAvailable=false;
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_MpegPs::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- //Reset
- Seek_Value=(int64u)-1;
- Seek_ID=(int64u)-1;
-
- //Init
- if (!Duration_Detected)
- {
- //External IBI
- #if MEDIAINFO_IBIUSAGE
- std::string IbiFile=Config->Ibi_Get();
- if (!IbiFile.empty())
- {
- Ibi.Streams.clear(); //TODO: support IBI data from different inputs
-
- File_Ibi MI;
- Open_Buffer_Init(&MI, IbiFile.size());
- MI.Ibi=&Ibi;
- MI.Open_Buffer_Continue((const int8u*)IbiFile.c_str(), IbiFile.size());
- }
- //Creating base IBI from a quick analysis of the file
- else
- {
- MediaInfo_Internal MI;
- MI.Option(__T("File_KeepInfo"), __T("1"));
- Ztring ParseSpeed_Save=MI.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI.Option(__T("Demux_Get"), __T(""));
- MI.Option(__T("ParseSpeed"), __T("0"));
- MI.Option(__T("Demux"), Ztring());
- size_t MiOpenResult=MI.Open(File_Name);
- MI.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (!MiOpenResult)
- return 0;
- for (ibi::streams::iterator IbiStream_Temp=((File_MpegPs*)MI.Info)->Ibi.Streams.begin(); IbiStream_Temp!=((File_MpegPs*)MI.Info)->Ibi.Streams.end(); ++IbiStream_Temp)
- {
- if (Ibi.Streams[IbiStream_Temp->first]==NULL)
- Ibi.Streams[IbiStream_Temp->first]=new ibi::stream(*IbiStream_Temp->second);
- Ibi.Streams[IbiStream_Temp->first]->Unsynch();
- for (size_t Pos=0; Pos<IbiStream_Temp->second->Infos.size(); Pos++)
- {
- Ibi.Streams[IbiStream_Temp->first]->Add(IbiStream_Temp->second->Infos[Pos]);
- if (!IbiStream_Temp->second->Infos[Pos].IsContinuous)
- Ibi.Streams[IbiStream_Temp->first]->Unsynch();
- }
- Ibi.Streams[IbiStream_Temp->first]->Unsynch();
- }
- if (Ibi.Streams.empty())
- return 4; //Problem during IBI file parsing
- }
- #endif //#if MEDIAINFO_IBIUSAGE
-
- Duration_Detected=true;
- }
-
- //Parsing
- switch (Method)
- {
- case 0 :
- GoTo(Value);
- Open_Buffer_Unsynch();
- return 1;
- case 1 :
- GoTo(File_Size*Value/10000);
- Open_Buffer_Unsynch();
- return 1;
- case 2 : //Timestamp
- #if MEDIAINFO_IBIUSAGE
- {
- ibi::streams::iterator IbiStream_Temp;
- if (ID==(int64u)-1)
- IbiStream_Temp=Ibi.Streams.begin();
- else
- IbiStream_Temp=Ibi.Streams.find(ID);
- if (IbiStream_Temp==Ibi.Streams.end() || IbiStream_Temp->second->Infos.empty())
- return 5; //Invalid ID
-
- if (!(IbiStream_Temp->second->DtsFrequencyNumerator==1000000000 && IbiStream_Temp->second->DtsFrequencyDenominator==1))
- {
- float64 ValueF=(float64)Value;
- ValueF/=1000000000; //Value is in ns
- ValueF/=IbiStream_Temp->second->DtsFrequencyDenominator;
- ValueF*=IbiStream_Temp->second->DtsFrequencyNumerator;
- Value=float64_int64s(ValueF);
- }
-
- for (size_t Pos=0; Pos<IbiStream_Temp->second->Infos.size(); Pos++)
- {
- if (Value<=IbiStream_Temp->second->Infos[Pos].Dts)
- {
- if (Value<IbiStream_Temp->second->Infos[Pos].Dts && Pos)
- Pos--;
-
- //Checking continuity of Ibi
- if (!IbiStream_Temp->second->Infos[Pos].IsContinuous && Pos+1<IbiStream_Temp->second->Infos.size())
- {
- Config->Demux_IsSeeking=true;
- Seek_Value=Value;
- Seek_Value_Maximal=IbiStream_Temp->second->Infos[Pos+1].StreamOffset;
- Seek_ID=IbiStream_Temp->first;
- GoTo((IbiStream_Temp->second->Infos[Pos].StreamOffset+IbiStream_Temp->second->Infos[Pos+1].StreamOffset)/2);
- Open_Buffer_Unsynch();
-
- return 1;
- }
-
- Config->Demux_IsSeeking=false;
- if (!Streams[(size_t)IbiStream_Temp->first].Parsers.empty())
- for (size_t Parser_Pos=0; Parser_Pos<Streams[(size_t)IbiStream_Temp->first].Parsers.size(); Parser_Pos++)
- Streams[(size_t)IbiStream_Temp->first].Parsers[Parser_Pos]->Unsynch_Frame_Count=IbiStream_Temp->second->Infos[Pos].FrameNumber;
- else
- Unsynch_Frame_Counts[(int16u)IbiStream_Temp->first]=IbiStream_Temp->second->Infos[Pos].FrameNumber;
-
- GoTo(IbiStream_Temp->second->Infos[Pos].StreamOffset);
- Open_Buffer_Unsynch();
-
- return 1;
- }
- }
-
- return 2; //Invalid value
- }
- #else //MEDIAINFO_IBIUSAGE
- return (size_t)-2; //Not supported / IBI disabled
- #endif //MEDIAINFO_IBIUSAGE
- case 3 : //FrameNumber
- #if MEDIAINFO_IBIUSAGE
- {
- ibi::streams::iterator IbiStream_Temp;
- if (ID==(int64u)-1)
- IbiStream_Temp=Ibi.Streams.begin();
- else
- IbiStream_Temp=Ibi.Streams.find(ID);
- if (IbiStream_Temp==Ibi.Streams.end() || IbiStream_Temp->second->Infos.empty())
- return 5; //Invalid ID
-
- for (size_t Pos=0; Pos<IbiStream_Temp->second->Infos.size(); Pos++)
- {
- if (Value<=IbiStream_Temp->second->Infos[Pos].FrameNumber)
- {
- if (Value<IbiStream_Temp->second->Infos[Pos].FrameNumber && Pos)
- Pos--;
-
- if (!Streams[(size_t)IbiStream_Temp->first].Parsers.empty())
- for (size_t Parser_Pos=0; Parser_Pos<Streams[(size_t)IbiStream_Temp->first].Parsers.size(); Parser_Pos++)
- Streams[(size_t)IbiStream_Temp->first].Parsers[Parser_Pos]->Unsynch_Frame_Count=IbiStream_Temp->second->Infos[Pos].FrameNumber;
- else
- Unsynch_Frame_Counts[(int16u)IbiStream_Temp->first]=IbiStream_Temp->second->Infos[Pos].FrameNumber;
-
- GoTo(IbiStream_Temp->second->Infos[Pos].StreamOffset);
- Open_Buffer_Unsynch();
-
- return 1;
- }
- }
-
- return 2; //Invalid value
- }
- #else //MEDIAINFO_IBIUSAGE
- return (size_t)-2; //Not supported / IBI disabled
- #endif //MEDIAINFO_IBIUSAGE
- default : return (size_t)-1; //Not supported
- }
-}
-#endif //MEDIAINFO_SEEK
-
-//---------------------------------------------------------------------------
-void File_MpegPs::Read_Buffer_Continue()
-{
- #if MEDIAINFO_DEMUX
- if (Demux_StreamIsBeingParsed_type!=(int8u)-1)
- {
- switch (Demux_StreamIsBeingParsed_type) //TODO: transform the switch() case to a enum with a vector of streams
- {
- case 0 : Open_Buffer_Continue(Streams[Demux_StreamIsBeingParsed_stream_id].Parsers[0], Buffer, 0, false);
- if (IsSub && Streams[Demux_StreamIsBeingParsed_stream_id].Parsers[0]->Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded=Streams[Demux_StreamIsBeingParsed_stream_id].Parsers[0]->Frame_Count_NotParsedIncluded;
- break;
- case 1 : Open_Buffer_Continue(Streams_Private1[Demux_StreamIsBeingParsed_stream_id].Parsers[0], Buffer, 0, false);
- if (IsSub && Streams_Private1[Demux_StreamIsBeingParsed_stream_id].Parsers[0]->Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded=Streams_Private1[Demux_StreamIsBeingParsed_stream_id].Parsers[0]->Frame_Count_NotParsedIncluded;
- break;
- case 2 : Open_Buffer_Continue(Streams_Extension[Demux_StreamIsBeingParsed_stream_id].Parsers[0], Buffer, 0, false);
- if (IsSub && Streams_Extension[Demux_StreamIsBeingParsed_stream_id].Parsers[0]->Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded=Streams_Extension[Demux_StreamIsBeingParsed_stream_id].Parsers[0]->Frame_Count_NotParsedIncluded;
- break;
- default: ;
- }
- if (Config->Demux_EventWasSent)
- return;
- Demux_StreamIsBeingParsed_type=(int8u)-1;
- }
- #endif //MEDIAINFO_DEMUX
-
- if (!IsSub)
- {
- if (Config->ParseSpeed>=1.0)
- Config->State_Set(((float)Buffer_TotalBytes)/File_Size);
- else if (Buffer_TotalBytes>2*SizeToAnalyze)
- Config->State_Set((float)0.99); //Nearly the end
- else
- Config->State_Set(((float)Buffer_TotalBytes)/(2*SizeToAnalyze));
- }
-
- if (Buffer_DataSizeToParse)
- {
- #if MEDIAINFO_EVENTS
- if (FromTS)
- {
- PES_FirstByte_IsAvailable=true;
- PES_FirstByte_Value=false;
- }
- #endif //MEDIAINFO_EVENTS
-
- if (Buffer_Size<=Buffer_DataSizeToParse)
- {
- Element_Size=Buffer_Size; //All the buffer is used
- Buffer_DataSizeToParse-=(int16u)Buffer_Size;
- }
- else
- {
- Element_Size=Buffer_DataSizeToParse;
- Buffer_DataSizeToParse=0;
- }
-
- Element_Begin0();
- Data_Parse();
- Element_Offset=Element_Size;
- Element_End0();
- }
-
- //Video unlimited specific, we didn't wait for the end (because this is... unlimited)
- if (video_stream_Unlimited)
- {
- PES_FirstByte_IsAvailable=true;
- PES_FirstByte_Value=false;
-
- //Look for next Sync word
- size_t Buffer_Offset_Temp=0;
- while (Buffer_Offset_Temp+4<=Buffer_Size
- && (Buffer[Buffer_Offset_Temp ]!=0x00
- || Buffer[Buffer_Offset_Temp+1]!=0x00
- || Buffer[Buffer_Offset_Temp+2]!=0x01
- || Buffer[Buffer_Offset_Temp+3]< 0xB9))
- {
- Buffer_Offset_Temp+=2;
- while(Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp]!=0x00)
- Buffer_Offset_Temp+=2;
- if (Buffer_Offset_Temp>=Buffer_Size || Buffer[Buffer_Offset_Temp-1]==0x00)
- Buffer_Offset_Temp--;
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset_Temp+4==Buffer_Size && (Buffer[Buffer_Offset_Temp ]!=0x00
- || Buffer[Buffer_Offset_Temp+1]!=0x00
- || Buffer[Buffer_Offset_Temp+2]!=0x01))
- Buffer_Offset_Temp++;
- if (Buffer_Offset_Temp+3==Buffer_Size && (Buffer[Buffer_Offset_Temp ]!=0x00
- || Buffer[Buffer_Offset_Temp+1]!=0x00
- || Buffer[Buffer_Offset_Temp+2]!=0x01))
- Buffer_Offset_Temp++;
- if (Buffer_Offset_Temp+2==Buffer_Size && (Buffer[Buffer_Offset_Temp ]!=0x00
- || Buffer[Buffer_Offset_Temp+1]!=0x00))
- Buffer_Offset_Temp++;
- if (Buffer_Offset_Temp+1==Buffer_Size && Buffer[Buffer_Offset_Temp ]!=0x00)
- Buffer_Offset_Temp++;
-
- if (Buffer_Offset_Temp==Buffer_Size)
- {
- Element_Size=Buffer_Size; //All the buffer is used
- }
- else
- {
- Element_Size=Buffer_Offset_Temp;
- if (Buffer_Offset_Temp+4<=Buffer_Size)
- video_stream_Unlimited=false;
- else
- Element_IsWaitingForMoreData(); //We don't know if the next bytes are a stream_id or data
- }
-
- if (Element_Size)
- {
- Element_Begin0();
- Data_Parse();
- Element_Offset=Element_Size;
- Element_End0();
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_MpegPs::Read_Buffer_AfterParsing()
-{
- if (!Status[IsFilled])
- {
- //In case of problem with some streams
- if (Buffer_TotalBytes>Buffer_TotalBytes_FirstSynched+SizeToAnalyze)
- {
- if (!Status[IsAccepted])
- {
- Reject("MPEG-PS");
- return;
- }
-
- video_stream_Count=0;
- audio_stream_Count=0;
- private_stream_1_Count=0;
- private_stream_2_Count=false;
- extension_stream_Count=0;
- SL_packetized_stream_Count=false;
- }
-
- //Jumping only if needed
- if (Streams.empty() || video_stream_Count || audio_stream_Count || private_stream_1_Count || private_stream_2_Count || extension_stream_Count || SL_packetized_stream_Count)
- return;
-
- //Jumping if needed
- if (!Status[IsAccepted])
- {
- Accept("MPEG-PS");
- if (!IsSub)
- Fill(Stream_General, 0, General_Format, "MPEG-PS");
- }
- Fill("MPEG-PS");
- if (!ShouldContinueParsing && File_Offset+Buffer_Size+SizeToAnalyze<File_Size && Config->ParseSpeed<1.0)
- {
- //Jumping
- GoToFromEnd(SizeToAnalyze, "MPEG-PS");
- Open_Buffer_Unsynch();
- }
- }
-}
-
-//***************************************************************************
-// Buffer - Par element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_MpegPs::Header_Parse()
-{
- PES_FirstByte_IsAvailable=true;
- PES_FirstByte_Value=true;
-
- //Reinit
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- {
- FrameInfo.PTS=(int64u)-1;
- FrameInfo.DTS=(int64u)-1;
- }
-
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- //Parsing
- Skip_B3( "synchro");
- Get_B1 (stream_id, "stream_id");
- }
- else
- {
- #endif //MEDIAINFO_TRACE
- //Parsing
- stream_id=Buffer[Buffer_Offset+3];
- Element_Offset+=4;
- #if MEDIAINFO_TRACE
- }
- #endif //MEDIAINFO_TRACE
-
- if (stream_id!=0xB9 && stream_id!=0xBA) //MPEG_program_end or pack_start have no PES
- {
- if (!Header_Parse_PES_packet(stream_id))
- {
- Element_WaitForMoreData();
- return;
- }
- }
- else if (!Header_Parse_Fill_Size()) //MPEG_program_end or pack_start specific
- {
- Element_WaitForMoreData();
- return;
- }
- Header_Fill_Code(stream_id);
-}
-
-//---------------------------------------------------------------------------
-bool File_MpegPs::Header_Parse_Fill_Size()
-{
- //Look for next Sync word
- if (Buffer_Offset_Temp==0) //Buffer_Offset_Temp is not 0 if Header_Parse_Fill_Size() has already parsed first frames
- Buffer_Offset_Temp=Buffer_Offset+4;
- while (Buffer_Offset_Temp+4<=Buffer_Size
- && (Buffer[Buffer_Offset_Temp ]!=0x00
- || Buffer[Buffer_Offset_Temp+1]!=0x00
- || Buffer[Buffer_Offset_Temp+2]!=0x01
- || Buffer[Buffer_Offset_Temp+3]< 0xB9))
- {
- Buffer_Offset_Temp+=2;
- while(Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp]!=0x00)
- Buffer_Offset_Temp+=2;
- if (Buffer_Offset_Temp>=Buffer_Size || Buffer[Buffer_Offset_Temp-1]==0x00)
- Buffer_Offset_Temp--;
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset_Temp+4==Buffer_Size && (Buffer[Buffer_Offset_Temp ]!=0x00
- || Buffer[Buffer_Offset_Temp+1]!=0x00
- || Buffer[Buffer_Offset_Temp+2]!=0x01))
- Buffer_Offset_Temp++;
- if (Buffer_Offset_Temp+3==Buffer_Size && (Buffer[Buffer_Offset_Temp ]!=0x00
- || Buffer[Buffer_Offset_Temp+1]!=0x00
- || Buffer[Buffer_Offset_Temp+2]!=0x01))
- Buffer_Offset_Temp++;
- if (Buffer_Offset_Temp+2==Buffer_Size && (Buffer[Buffer_Offset_Temp ]!=0x00
- || Buffer[Buffer_Offset_Temp+1]!=0x00))
- Buffer_Offset_Temp++;
- if (Buffer_Offset_Temp+1==Buffer_Size && Buffer[Buffer_Offset_Temp ]!=0x00)
- Buffer_Offset_Temp++;
-
- if (Buffer_Offset_Temp+4>Buffer_Size)
- {
- if (File_Offset+Buffer_Size>=File_Size)
- Buffer_Offset_Temp=Buffer_Size; //We are sure that the next bytes are a start
- else
- return false;
- }
-
- //OK, we continue
- Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
- Buffer_Offset_Temp=0;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_MpegPs::Header_Parse_PES_packet(int8u stream_id)
-{
- //Parsing
- int16u PES_packet_length;
- Get_B2 (PES_packet_length, "PES_packet_length");
- #if MEDIAINFO_DEMUX
- if (Demux_UnpacketizeContainer && Buffer_Offset+6+PES_packet_length>Buffer_Size)
- return false;
- #endif //MEDIAINFO_DEMUX
- if (PES_packet_length && File_Offset+Buffer_Offset+6+PES_packet_length>=File_Size)
- PES_packet_length=(int16u)(File_Size-(File_Offset+Buffer_Offset+6));
-
- //Parsing
- switch (stream_id)
- {
- //Header is only Size
- case 0xBB : //system_header_start
- case 0xBC : //program_stream_map
- case 0xBE : //padding_stream
- case 0xBF : //private_stream_2
- case 0xF0 : //ECM
- case 0xF1 : //EMM
- case 0xF2 : //DSMCC Streams
- case 0xF8 : //ITU-T Rec. H .222.1 type E
- case 0xFF : //Program Streams directory
- break;
-
- //Element with PES Header
- default :
- switch (MPEG_Version)
- {
- case 1 : Header_Parse_PES_packet_MPEG1(stream_id); break;
- case 2 : Header_Parse_PES_packet_MPEG2(stream_id); break;
- default : ; //We don't know what to parse...
- }
- }
-
- //Video unlimited specific
- if (PES_packet_length==0)
- {
- if (!Header_Parse_Fill_Size())
- {
- //Return directly if we must unpack the elementary stream;
- #if MEDIAINFO_DEMUX
- if (Demux_UnpacketizeContainer)
- return false;
- #endif //MEDIAINFO_DEMUX
-
- //Next PS packet is not found, we will use all the buffer
- Header_Fill_Size(Buffer_Size-Buffer_Offset); //All the buffer is used
- video_stream_Unlimited=true;
- Buffer_Offset_Temp=0; //We use the buffer
- }
- }
- else
- //Filling
- Header_Fill_Size(6+PES_packet_length);
-
- //Can be cut in small chunks
- if (Element_IsWaitingForMoreData())
- return false;
- if (PES_packet_length!=0 && Element_Offset<Element_Size && (size_t)(6+PES_packet_length)>Buffer_Size-Buffer_Offset
- && ((stream_id&0xE0)==0xC0 || (stream_id&0xF0)==0xE0))
- {
- //Return directly if we must unpack the elementary stream;
- #if MEDIAINFO_DEMUX
- if (Demux_UnpacketizeContainer)
- return false;
- #endif //MEDIAINFO_DEMUX
-
- Header_Fill_Size(Buffer_Size-Buffer_Offset); //All the buffer is used
- Buffer_DataSizeToParse=6+PES_packet_length-(int16u)(Buffer_Size-Buffer_Offset);
- Buffer_Offset_Temp=0; //We use the buffer
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-// Packet header data - MPEG-1
-void File_MpegPs::Header_Parse_PES_packet_MPEG1(int8u stream_id)
-{
- int8u stuffing_byte;
- do
- {
- Peek_B1(stuffing_byte);
- if (stuffing_byte==0xFF)
- Skip_B1( "stuffing_byte");
- }
- while(stuffing_byte==0xFF);
-
- if ((stuffing_byte&0xC0)==0x40)
- {
- BS_Begin();
- Mark_0();
- Mark_1();
- Skip_SB( "STD_buffer_scale");
- Skip_S2(13, "STD_buffer_size");
- BS_End();
- Peek_B1(stuffing_byte);
- }
- if ((stuffing_byte&0xF0)==0x20)
- {
- int16u PTS_29, PTS_14;
- int8u PTS_32;
- Element_Begin1("PTS");
- BS_Begin();
- Mark_0();
- Mark_0();
- Mark_1();
- Mark_0();
- Get_S1 ( 3, PTS_32, "PTS_32");
- Mark_1_NoTrustError(); //Found 0 in one file
- Get_S2 (15, PTS_29, "PTS_29");
- Mark_1();
- Get_S2 (15, PTS_14, "PTS_14");
- Mark_1();
- BS_End();
-
- //Filling
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- FrameInfo.PTS=(((int64u)PTS_32)<<30)
- | (((int64u)PTS_29)<<15)
- | (((int64u)PTS_14));
- if (Streams[stream_id].Searching_TimeStamp_End && stream_id!=0xBD && stream_id!=0xFD) //0xBD and 0xFD can contain multiple streams, TimeStamp management is in Streams management
- {
- if (Streams[stream_id].TimeStamp_End.PTS.TimeStamp==(int64u)-1)
- Streams[stream_id].TimeStamp_End.PTS.TimeStamp=FrameInfo.PTS;
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- while (FrameInfo.PTS+0x100000000LL<Streams[stream_id].TimeStamp_End.PTS.TimeStamp)
- FrameInfo.PTS+=0x200000000LL;
- Streams[stream_id].TimeStamp_End.DTS.File_Pos=Streams[stream_id].TimeStamp_End.PTS.File_Pos=File_Offset+Buffer_Offset;
- Streams[stream_id].TimeStamp_End.DTS.TimeStamp=Streams[stream_id].TimeStamp_End.PTS.TimeStamp=FrameInfo.PTS;
- }
- if (Searching_TimeStamp_Start && Streams[stream_id].Searching_TimeStamp_Start && stream_id!=0xBD && stream_id!=0xFD) //0xBD and 0xFD can contain multiple streams, TimeStamp management is in Streams management
- {
- Streams[stream_id].TimeStamp_Start.DTS.File_Pos=Streams[stream_id].TimeStamp_Start.PTS.File_Pos=File_Offset+Buffer_Offset;
- Streams[stream_id].TimeStamp_Start.DTS.TimeStamp=Streams[stream_id].TimeStamp_Start.PTS.TimeStamp=FrameInfo.PTS;
- Streams[stream_id].Searching_TimeStamp_Start=false;
- }
- Element_Info_From_Milliseconds(float64_int64s(((float64)FrameInfo.PTS)/90));
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- FrameInfo.DTS=FrameInfo.PTS=FrameInfo.PTS*1000000/90; //In ns
- HasTimeStamps=true;
- Element_End0();
- }
- else if ((stuffing_byte&0xF0)==0x30)
- {
- int16u PTS_29, PTS_14, DTS_29, DTS_14;
- int8u PTS_32, DTS_32;
- Element_Begin1("PTS");
- BS_Begin();
- Mark_0();
- Mark_0();
- Mark_1();
- Mark_1();
- Get_S1 ( 3, PTS_32, "PTS_32");
- Mark_1_NoTrustError(); //Found 0 in one file
- Get_S2 (15, PTS_29, "PTS_29");
- Mark_1();
- Get_S2 (15, PTS_14, "PTS_14");
- Mark_1();
- BS_End();
-
- //Filling
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- FrameInfo.PTS=(((int64u)PTS_32)<<30)
- | (((int64u)PTS_29)<<15)
- | (((int64u)PTS_14));
- if (Streams[stream_id].Searching_TimeStamp_End)
- {
- if (Streams[stream_id].TimeStamp_End.PTS.TimeStamp==(int64u)-1)
- Streams[stream_id].TimeStamp_End.PTS.TimeStamp=FrameInfo.PTS;
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- while (FrameInfo.PTS+0x100000000LL<Streams[stream_id].TimeStamp_End.PTS.TimeStamp)
- FrameInfo.PTS+=0x200000000LL;
- Streams[stream_id].TimeStamp_End.PTS.File_Pos=File_Offset+Buffer_Offset;
- Streams[stream_id].TimeStamp_End.PTS.TimeStamp=FrameInfo.PTS;
- }
- if (Searching_TimeStamp_Start && Streams[stream_id].Searching_TimeStamp_Start)
- {
- Streams[stream_id].TimeStamp_Start.PTS.File_Pos=File_Offset+Buffer_Offset;
- Streams[stream_id].TimeStamp_Start.PTS.TimeStamp=FrameInfo.PTS;
- }
- Element_Info_From_Milliseconds(float64_int64s(((float64)FrameInfo.PTS)/90));
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- FrameInfo.PTS=FrameInfo.PTS*1000000/90; //In ns
- Element_End0();
-
- Element_Begin1("DTS");
- BS_Begin();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_1_NoTrustError(); //Is "0" in one sample
- Get_S1 ( 3, DTS_32, "DTS_32");
- Mark_1();
- Get_S2 (15, DTS_29, "DTS_29");
- Mark_1();
- Get_S2 (15, DTS_14, "DTS_14");
- Mark_1();
- BS_End();
-
- //Filling
- FrameInfo.DTS=(((int64u)DTS_32)<<30)
- | (((int64u)DTS_29)<<15)
- | (((int64u)DTS_14));
- if (Frame_Count<16 &&FrameInfo.DTS>=0x100000000LL) //Hack in case DTS is negative (currently not supported by MI). TODO: negative DTS.
- FrameInfo.DTS=0;
- if (Streams[stream_id].Searching_TimeStamp_End)
- {
- if (Streams[stream_id].TimeStamp_End.DTS.TimeStamp==(int64u)-1)
- Streams[stream_id].TimeStamp_End.DTS.TimeStamp=FrameInfo.DTS;
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- while (FrameInfo.DTS+0x100000000LL<Streams[stream_id].TimeStamp_End.DTS.TimeStamp)
- FrameInfo.DTS+=0x200000000LL;
- Streams[stream_id].TimeStamp_End.DTS.File_Pos=File_Offset+Buffer_Offset;
- Streams[stream_id].TimeStamp_End.DTS.TimeStamp=FrameInfo.DTS;
- }
- if (Searching_TimeStamp_Start && Streams[stream_id].Searching_TimeStamp_Start)
- {
- Streams[stream_id].TimeStamp_Start.DTS.TimeStamp=FrameInfo.DTS;
- Streams[stream_id].Searching_TimeStamp_Start=false;
- }
- Element_Info_From_Milliseconds(float64_int64s(((float64)FrameInfo.DTS)/90));
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- FrameInfo.DTS=FrameInfo.DTS*1000000/90; //In ns
- Element_End0();
- }
- else
- {
- BS_Begin();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_1();
- Mark_1();
- Mark_1();
- Mark_1();
- BS_End();
-
- if (!FromTS)
- PES_FirstByte_Value=false;
- }
-}
-
-//---------------------------------------------------------------------------
-// Packet header data - MPEG-2
-void File_MpegPs::Header_Parse_PES_packet_MPEG2(int8u stream_id)
-{
- //Parsing
- int8u PTS_DTS_flags, PES_header_data_length;
- bool ESCR_flag, ES_rate_flag, DSM_trick_mode_flag, additional_copy_info_flag, PES_CRC_flag, PES_extension_flag;
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- BS_Begin();
- Mark_1_NoTrustError();
- Mark_0_NoTrustError();
- Skip_S1(2, "PES_scrambling_control");
- Skip_SB( "PES_priority");
- Skip_SB( "data_alignment_indicator");
- Skip_SB( "copyright");
- Skip_SB( "original_or_copy");
- Get_S1 (2, PTS_DTS_flags, "PTS_DTS_flags");
- Get_SB (ESCR_flag, "ESCR_flag");
- Get_SB (ES_rate_flag, "ES_rate_flag");
- Get_SB (DSM_trick_mode_flag, "DSM_trick_mode_flag");
- Get_SB (additional_copy_info_flag, "additional_copy_info_flag");
- Get_SB (PES_CRC_flag, "PES_CRC_flag");
- Get_SB (PES_extension_flag, "PES_extension_flag");
- BS_End();
- Get_B1 (PES_header_data_length, "PES_header_data_length");
- }
- else
- {
- #endif //MEDIAINFO_TRACE
- if (Element_Offset+3>=Element_Size)
- {
- Trusted_IsNot("");
- return;
- }
- size_t Buffer_Pos_Flags=Buffer_Offset+(size_t)Element_Offset;
- if ((Buffer[Buffer_Pos_Flags]&0xC0)!=0x80) //bit 6 and 7 are 01
- {
- Element_DoNotTrust(""); //Mark bits are wrong
- return;
- }
- Buffer_Pos_Flags++;
- PTS_DTS_flags = Buffer[Buffer_Pos_Flags] >> 6;
- ESCR_flag = (Buffer[Buffer_Pos_Flags] & 0x20) ? true: false;
- ES_rate_flag = (Buffer[Buffer_Pos_Flags] & 0x10) ? true: false;
- DSM_trick_mode_flag = (Buffer[Buffer_Pos_Flags] & 0x08) ? true: false;
- additional_copy_info_flag = (Buffer[Buffer_Pos_Flags] & 0x04) ? true: false;
- PES_CRC_flag = (Buffer[Buffer_Pos_Flags] & 0x02) ? true: false;
- PES_extension_flag = (Buffer[Buffer_Pos_Flags] & 0x01) ? true: false;
- Buffer_Pos_Flags++;
- PES_header_data_length = Buffer[Buffer_Pos_Flags];
- Element_Offset+=3;
- #if MEDIAINFO_TRACE
- }
- #endif //MEDIAINFO_TRACE
- int64u Element_Pos_After_Data=Element_Offset+PES_header_data_length;
- if (Element_Pos_After_Data>Element_Size)
- {
- Element_WaitForMoreData();
- return;
- }
-
- //Options
- if (PTS_DTS_flags==0x2)
- {
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- int16u PTS_29, PTS_14;
- int8u PTS_32;
- Element_Begin1("PTS_DTS_flags");
- Element_Begin1("PTS");
- BS_Begin();
- Mark_0();
- Mark_0();
- Mark_1_NoTrustError(); //Is "0" in one sample
- Mark_0_NoTrustError(); //Is "1" in one sample
- Get_S1 ( 3, PTS_32, "PTS_32");
- Mark_1();
- Get_S2 (15, PTS_29, "PTS_29");
- Mark_1();
- Get_S2 (15, PTS_14, "PTS_14");
- Mark_1();
- BS_End();
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- FrameInfo.PTS=(((int64u)PTS_32)<<30)
- | (((int64u)PTS_29)<<15)
- | (((int64u)PTS_14));
- Element_Info_From_Milliseconds(float64_int64s(((float64)FrameInfo.PTS)/90));
- Element_End0();
- Element_End0();
- }
- else
- {
- #endif //MEDIAINFO_TRACE
- if (Element_Offset+5>Element_Size)
- {
- Element_WaitForMoreData();
- return;
- }
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
- if ((Buffer[Buffer_Pos ]&0xC1)!=0x01 //bit 5 and 4 are not tested because of one sample with wrong mark bits
- || (Buffer[Buffer_Pos+2]&0x01)!=0x01
- || (Buffer[Buffer_Pos+4]&0x01)!=0x01)
- {
- Element_DoNotTrust(""); //Mark bits are wrong
- return;
- }
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- FrameInfo.PTS= ((((int64u)Buffer[Buffer_Pos ]&0x0E))<<29)
- | ( ((int64u)Buffer[Buffer_Pos+1] )<<22)|((((int64u)Buffer[Buffer_Pos+2]&0xFE))<<14)
- | ( ((int64u)Buffer[Buffer_Pos+3] )<< 7)|((((int64u)Buffer[Buffer_Pos+4]&0xFE))>> 1);
- Element_Offset+=5;
- #if MEDIAINFO_TRACE
- }
- #endif //MEDIAINFO_TRACE
-
- //Filling
- if (Streams[stream_id].Searching_TimeStamp_End)
- {
- if (Streams[stream_id].TimeStamp_End.PTS.TimeStamp==(int64u)-1)
- Streams[stream_id].TimeStamp_End.PTS.TimeStamp=FrameInfo.PTS;
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- while (FrameInfo.PTS+0x100000000LL<Streams[stream_id].TimeStamp_End.PTS.TimeStamp)
- FrameInfo.PTS+=0x200000000LL;
- Streams[stream_id].TimeStamp_End.DTS.File_Pos=Streams[stream_id].TimeStamp_End.PTS.File_Pos=File_Offset+Buffer_Offset;
- Streams[stream_id].TimeStamp_End.DTS.TimeStamp=Streams[stream_id].TimeStamp_End.PTS.TimeStamp=FrameInfo.PTS;
- }
- if (Searching_TimeStamp_Start && Streams[stream_id].Searching_TimeStamp_Start)
- {
- Streams[stream_id].TimeStamp_Start.DTS.File_Pos=Streams[stream_id].TimeStamp_Start.PTS.File_Pos=File_Offset+Buffer_Offset;
- Streams[stream_id].TimeStamp_Start.DTS.TimeStamp=Streams[stream_id].TimeStamp_Start.PTS.TimeStamp=FrameInfo.PTS;
- Streams[stream_id].Searching_TimeStamp_Start=false;
- }
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- FrameInfo.DTS=FrameInfo.PTS=FrameInfo.PTS*1000000/90; //In ns
- HasTimeStamps=true;
- }
- else if (PTS_DTS_flags==0x3)
- {
- size_t Buffer_Pos;
- #if MEDIAINFO_TRACE
- int16u PTS_29, PTS_14, DTS_29, DTS_14;
- int8u PTS_32, DTS_32;
- if (Trace_Activated)
- {
- Element_Begin1("PTS_DTS_flags");
- Element_Begin1("PTS");
- BS_Begin();
- Mark_0();
- Mark_0();
- Mark_1_NoTrustError(); //Is "0" in one sample
- Mark_0_NoTrustError(); //Is "1" in one sample
- Get_S1 ( 3, PTS_32, "PTS_32");
- Mark_1();
- Get_S2 (15, PTS_29, "PTS_29");
- Mark_1();
- Get_S2 (15, PTS_14, "PTS_14");
- Mark_1();
- BS_End();
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- FrameInfo.PTS=(((int64u)PTS_32)<<30)
- | (((int64u)PTS_29)<<15)
- | (((int64u)PTS_14));
- Element_Info_From_Milliseconds(float64_int64s(((float64)FrameInfo.PTS)/90));
- Element_End0();
- }
- else
- {
- #endif //MEDIAINFO_TRACE
- if (Element_Offset+5>Element_Size)
- {
- Element_WaitForMoreData();
- return;
- }
- Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
- if ((Buffer[Buffer_Pos ]&0xC1)!=0x01 //bit 5 and 4 are not tested because of one sample with wrong mark bits
- || (Buffer[Buffer_Pos+2]&0x01)!=0x01
- || (Buffer[Buffer_Pos+4]&0x01)!=0x01)
- {
- Element_DoNotTrust(""); //Mark bits are wrong
- return;
- }
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- FrameInfo.PTS= ((((int64u)Buffer[Buffer_Pos ]&0x0E))<<29)
- | ( ((int64u)Buffer[Buffer_Pos+1] )<<22)|((((int64u)Buffer[Buffer_Pos+2]&0xFE))<<14)
- | ( ((int64u)Buffer[Buffer_Pos+3] )<< 7)|((((int64u)Buffer[Buffer_Pos+4]&0xFE))>> 1);
- Element_Offset+=5;
- #if MEDIAINFO_TRACE
- }
- #endif //MEDIAINFO_TRACE
-
- //Filling
- if (Streams[stream_id].Searching_TimeStamp_End)
- {
- if (Streams[stream_id].TimeStamp_End.PTS.TimeStamp==(int64u)-1)
- Streams[stream_id].TimeStamp_End.PTS.TimeStamp=FrameInfo.PTS;
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- while (FrameInfo.PTS+0x100000000LL<Streams[stream_id].TimeStamp_End.PTS.TimeStamp)
- FrameInfo.PTS+=0x200000000LL;
- Streams[stream_id].TimeStamp_End.PTS.File_Pos=File_Offset+Buffer_Offset;
- Streams[stream_id].TimeStamp_End.PTS.TimeStamp=FrameInfo.PTS;
- }
- if (Searching_TimeStamp_Start && Streams[stream_id].Searching_TimeStamp_Start)
- {
- Streams[stream_id].TimeStamp_Start.PTS.File_Pos=File_Offset+Buffer_Offset;
- Streams[stream_id].TimeStamp_Start.PTS.TimeStamp=FrameInfo.PTS;
- //Streams[stream_id].Searching_TimeStamp_Start=false; //Done with DTS
- }
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- FrameInfo.PTS=FrameInfo.PTS*1000000/90; //In ns
-
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- Element_Begin1("DTS");
- BS_Begin();
- Mark_0();
- Mark_0();
- Mark_1_NoTrustError(); //Is "0" in one sample
- Mark_0_NoTrustError(); //Is "1" in one sample
- Get_S1 ( 3, DTS_32, "DTS_32");
- Mark_1();
- Get_S2 (15, DTS_29, "DTS_29");
- Mark_1();
- Get_S2 (15, DTS_14, "DTS_14");
- Mark_1();
- BS_End();
- FrameInfo.DTS=(((int64u)DTS_32)<<30)
- | (((int64u)DTS_29)<<15)
- | (((int64u)DTS_14));
- if (Frame_Count<16 &&FrameInfo.DTS>=0x100000000LL) //Hack in case DTS is negative (currently not supported by MI). TODO: negative DTS.
- FrameInfo.DTS=0;
- Element_Info_From_Milliseconds(float64_int64s(((float64)FrameInfo.DTS)/90));
- Element_End0();
- Element_End0();
- }
- else
- {
- #endif //MEDIAINFO_TRACE
- if (Element_Offset+5>Element_Size)
- {
- Element_WaitForMoreData();
- return;
- }
- Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
- if ((Buffer[Buffer_Pos ]&0xC1)!=0x01 //bit 5 and 4 are not tested because of one sample with wrong mark bits
- || (Buffer[Buffer_Pos+2]&0x01)!=0x01
- || (Buffer[Buffer_Pos+4]&0x01)!=0x01)
- {
- Element_DoNotTrust(""); //Mark bits are wrong
- return;
- }
- FrameInfo.DTS= ((((int64u)Buffer[Buffer_Pos ]&0x0E))<<29)
- | ( ((int64u)Buffer[Buffer_Pos+1] )<<22)|((((int64u)Buffer[Buffer_Pos+2]&0xFE))<<14)
- | ( ((int64u)Buffer[Buffer_Pos+3] )<< 7)|((((int64u)Buffer[Buffer_Pos+4]&0xFE))>> 1);
- Element_Offset+=5;
- if (Frame_Count<16 &&FrameInfo.DTS>=0x100000000LL) //Hack in case DTS is negative (currently not supported by MI). TODO: negative DTS.
- FrameInfo.DTS=0;
- #if MEDIAINFO_TRACE
- }
- #endif //MEDIAINFO_TRACE
-
- //Filling
- if (Streams[stream_id].Searching_TimeStamp_End)
- {
- if (Streams[stream_id].TimeStamp_End.DTS.TimeStamp==(int64u)-1)
- Streams[stream_id].TimeStamp_End.DTS.TimeStamp=FrameInfo.DTS;
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- while (FrameInfo.DTS+0x100000000LL<Streams[stream_id].TimeStamp_End.DTS.TimeStamp)
- FrameInfo.DTS+=0x200000000LL;
- Streams[stream_id].TimeStamp_End.DTS.File_Pos=File_Offset+Buffer_Offset;
- Streams[stream_id].TimeStamp_End.DTS.TimeStamp=FrameInfo.DTS;
- }
- if (Searching_TimeStamp_Start && Streams[stream_id].Searching_TimeStamp_Start)
- {
- Streams[stream_id].TimeStamp_Start.DTS.TimeStamp=FrameInfo.DTS;
- Streams[stream_id].Searching_TimeStamp_Start=false;
- }
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (!FromAribStdB24B37)
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- FrameInfo.DTS=FrameInfo.DTS*1000000/90; //In ns
- HasTimeStamps=true;
- }
- else if (!FromTS)
- PES_FirstByte_Value=false;
- if (ESCR_flag && Element_Offset<Element_Pos_After_Data)
- {
- Element_Begin1("ESCR_flag");
- BS_Begin();
- int16u ESCR_29, ESCR_14, ESCR_extension;
- int8u ESCR_32;
- Skip_S1( 2, "reserved");
- Get_S1 ( 3, ESCR_32, "PTS_32");
- Mark_1();
- Get_S2 (15, ESCR_29, "PTS_29");
- Mark_1();
- Get_S2 (15, ESCR_14, "PTS_14");
- Mark_1();
- Get_S2 (15, ESCR_extension, "ESCR_extension");
- Mark_1();
- BS_End();
- Element_End0();
- }
- if (ES_rate_flag && Element_Offset<Element_Pos_After_Data)
- {
- Element_Begin1("ES_rate_flag");
- BS_Begin();
- int32u ES_rate;
- Mark_1();
- Get_S3 (22, ES_rate, "ES_rate");
- Mark_1();
- BS_End();
- Element_End0();
- }
- if (DSM_trick_mode_flag && Element_Offset<Element_Pos_After_Data)
- {
- Element_Begin1("DSM_trick_mode_flag");
- BS_Begin();
- int8u trick_mode_control;
- Get_S1 (3, trick_mode_control, "trick_mode_control"); Param_Info1(MpegPs_trick_mode_control_values[trick_mode_control]);
- switch (trick_mode_control)
- {
- case 0 :{ //fast_forward
- Skip_S1(2, "field_id");
- Skip_SB( "intra_slice_refresh");
- Skip_S1(2, "frequency_truncation");
- }
- break;
- case 1 :{ //slow_motion
- int8u rep_cntrl;
- Get_S1 (5, rep_cntrl, "rep_cntrl");
- }
- break;
- case 2 :{ //freeze_frame
- Skip_S1(2, "field_id");
- Skip_S1(3, "reserved");
- }
- break;
- case 3 :{ //fast_reverse
- Skip_S1(2, "field_id");
- Skip_SB( "intra_slice_refresh");
- Skip_S1(2, "frequency_truncation");
- }
- break;
- case 4 :{ //slow_reverse
- int8u rep_cntrl;
- Get_S1 (5, rep_cntrl, "rep_cntrl");
- }
- break;
- default:{
- Skip_S1(5, "reserved");
- }
- }
- BS_End();
- Element_End0();
- }
- if (additional_copy_info_flag && Element_Offset<Element_Pos_After_Data)
- {
- Element_Begin1("additional_copy_info_flag");
- BS_Begin();
- Mark_1();
- Skip_S1(7, "additional_copy_info");
- BS_End();
- Element_End0();
- }
- if (PES_CRC_flag && Element_Offset<Element_Pos_After_Data)
- {
- Element_Begin1("PES_CRC_flag");
- Skip_B2( "previous_PES_packet_CRC");
- Element_End0();
- }
- if (PES_extension_flag && Element_Offset<Element_Pos_After_Data)
- {
- bool PES_private_data_flag=false, pack_header_field_flag=false, program_packet_sequence_counter_flag=false, p_STD_buffer_flag=false, PES_extension_flag_2=false;
- Element_Begin1("PES_extension_flag");
- BS_Begin();
- Get_SB (PES_private_data_flag, "PES_private_data_flag");
- Get_SB (pack_header_field_flag, "pack_header_field_flag");
- Get_SB (program_packet_sequence_counter_flag, "program_packet_sequence_counter_flag");
- Get_SB (p_STD_buffer_flag, "P-STD_buffer_flag");
- Skip_S1(3, "reserved");
- Get_SB (PES_extension_flag_2, "PES_extension_flag_2");
- BS_End();
-
- //Integrity test
- if (Element_Offset+(PES_private_data_flag?16:0)+(pack_header_field_flag?1:0)+(program_packet_sequence_counter_flag?2:0)+(p_STD_buffer_flag?2:0)+(PES_extension_flag_2?2:0)>Element_Pos_After_Data)
- {
- //There is a problem
- PES_private_data_flag=false;
- pack_header_field_flag=false;
- program_packet_sequence_counter_flag=false;
- p_STD_buffer_flag=false;
- PES_extension_flag_2=false;
- }
-
- if (PES_private_data_flag)
- {
- Element_Begin1("PES_private_data");
- int32u Code;
- Peek_B4(Code);
- if (Code==0x43434953) // "CCIS"
- {
- if (Streams_Private1[private_stream_1_ID].Parsers.size()>1)
- {
- //Should not happen, this is only in case the previous packet was without CCIS
- Streams_Private1[private_stream_1_ID].Parsers.clear();
- Streams_Private1[private_stream_1_ID].StreamIsRegistred=false;
- }
- if (!Streams_Private1[private_stream_1_ID].StreamIsRegistred)
- {
- Streams_Private1[private_stream_1_ID].Parsers.push_back(ChooseParser_AribStdB24B37(true));
- Open_Buffer_Init(Streams_Private1[private_stream_1_ID].Parsers[0]);
- Streams_Private1[private_stream_1_ID].StreamIsRegistred=true;
- }
-
- if (Streams_Private1[private_stream_1_ID].Parsers.size()==1)
- {
- File_AribStdB24B37* Parser=(File_AribStdB24B37*)Streams_Private1[private_stream_1_ID].Parsers[0];
- Parser->ParseCcis=true;
- Open_Buffer_Continue(Parser, Buffer+Buffer_Offset+(size_t)Element_Offset, 16);
- }
- else
- Skip_B16( "PES_private_data");
- }
- else
- Skip_B16( "PES_private_data");
- Element_End0();
- }
- if (pack_header_field_flag)
- {
- Element_Begin1("pack_header_field_flag");
- int8u pack_field_length;
- Get_B1 (pack_field_length, "pack_field_length");
- Skip_XX(pack_field_length, "pack_header");
- Element_End0();
- }
- if (program_packet_sequence_counter_flag)
- {
- Element_Begin1("program_packet_sequence_counter_flag");
- int8u program_packet_sequence_counter, original_stuff_length;
- bool MPEG1_MPEG2_identifier;
- BS_Begin();
- Mark_1();
- Get_S1 (7, program_packet_sequence_counter, "program_packet_sequence_counter");
- Mark_1();
- Get_SB ( MPEG1_MPEG2_identifier, "MPEG1_MPEG2_identifier");
- Get_S1 (6, original_stuff_length, "original_stuff_length");
- BS_End();
- Element_End0();
- }
- if (p_STD_buffer_flag)
- {
- Element_Begin1("p_STD_buffer_flag");
- bool P_STD_buffer_scale;
- BS_Begin();
- Mark_0();
- Skip_SB( "Should be 1"); //But I saw a file with "0"
- Get_SB ( P_STD_buffer_scale, "P-STD_buffer_scale");
- Skip_S2(13, "P-STD_buffer_size");
- BS_End();
- Element_End0();
- }
- if (PES_extension_flag_2)
- {
- Element_Begin1("PES_extension_flag_2");
- int8u PES_extension_field_length;
- bool stream_id_extension_flag;
- BS_Begin();
- Mark_1();
- Get_S1 (7, PES_extension_field_length, "PES_extension_field_length");
- Get_SB (stream_id_extension_flag, "stream_id_extension_flag");
- if (stream_id_extension_flag==0) //This should be limited to stream_id_extension_flag==0, but I found a file with stream_id_extension_flag=1 and a real code...
- {
- Get_S1 (7, stream_id_extension, "stream_id_extension"); Param_Info1(MpegPs_stream_id_extension(stream_id_extension));
- }
- BS_End();
- if (PES_extension_field_length-1>0)
- Skip_XX(PES_extension_field_length-1, "reserved");
- Element_End0();
- }
- Element_End0();
- }
- if (Element_Pos_After_Data>Element_Offset)
- Skip_XX(Element_Pos_After_Data-Element_Offset, "stuffing_bytes");
-}
-
-//---------------------------------------------------------------------------
-void File_MpegPs::Data_Parse()
-{
- //Counting
- Frame_Count++;
-
- //Needed?
- if (!Streams[stream_id].Searching_Payload)
- {
- Skip_XX(Element_Size, "data");
- Element_DoNotShow();
- return;
- }
-
- //From TS
- if (FromTS && !Status[IsAccepted])
- {
- Data_Accept("MPEG-PS");
- if (!IsSub)
- Fill(Stream_General, 0, General_Format, "MPEG-PS");
- }
-
- //Parsing
- switch (stream_id)
- {
- case 0xB9 : MPEG_program_end(); break;
- case 0xBA : pack_start(); break;
- case 0xBB : system_header_start(); break;
- case 0xBC : program_stream_map(); break;
- case 0xBD : private_stream_1(); break;
- case 0xBE : padding_stream(); break;
- case 0xBF : private_stream_2(); break;
- case 0xF0 : Element_Name("ECM_Stream"); Skip_XX(Element_Size, "Data"); break;
- case 0xF1 : Element_Name("EMM_Stream"); Skip_XX(Element_Size, "Data"); break;
- case 0xF2 : Element_Name("DSMCC_stream"); Skip_XX(Element_Size, "Data"); break;
- case 0xF3 : Element_Name("ISO/IEC_13522_stream"); Skip_XX(Element_Size, "Data"); break;
- case 0xF4 : Element_Name("ITU-T Rec. H.222.1 type A"); Skip_XX(Element_Size, "Data"); break;
- case 0xF5 : Element_Name("ITU-T Rec. H.222.1 type B"); Skip_XX(Element_Size, "Data"); break;
- case 0xF6 : Element_Name("ITU-T Rec. H.222.1 type C"); Skip_XX(Element_Size, "Data"); break;
- case 0xF7 : Element_Name("ITU-T Rec. H.222.1 type D"); Skip_XX(Element_Size, "Data"); break;
- case 0xF8 : Element_Name("ITU-T Rec. H.222.1 type E"); Skip_XX(Element_Size, "Data"); break;
- case 0xF9 : Element_Name("ancillary_stream"); Skip_XX(Element_Size, "Data"); break;
- case 0xFA : SL_packetized_stream(); break;
- case 0xFB : Element_Name("FlexMux_stream"); Skip_XX(Element_Size, "Data"); break;
- case 0xFC : Element_Name("descriptive data stream"); Skip_XX(Element_Size, "Data"); break;
- case 0xFD : extension_stream(); break;
- case 0xFE : video_stream(); break;
- case 0xFF : Element_Name("program_stream_directory"); Skip_XX(Element_Size, "Data"); break;
- default:
- if ((stream_id&0xE0)==0xC0) audio_stream();
- else if ((stream_id&0xF0)==0xE0) video_stream();
- else
- Trusted_IsNot("Unattended element!");
- }
-
- #if MEDIAINFO_EVENTS
- PES_FirstByte_IsAvailable=false;
- #endif //MEDIAINFO_EVENTS
-}
-
-//---------------------------------------------------------------------------
-//Jumping to the last DTS if needed
-bool File_MpegPs::BookMark_Needed()
-{
- if (IsSub || Streams.empty() || Config->ParseSpeed>=1.0)
- return false;
-
- int64u ToJump=(int64u)-1;
- for (size_t StreamID=0; StreamID<0x100; StreamID++)
- {
- //End timestamp is out of date
- if (Streams[StreamID].TimeStamp_End.PTS.File_Pos!=(int64u)-1)
- {
- if (Streams[StreamID].TimeStamp_End.PTS.File_Pos<ToJump)
- ToJump=Streams[StreamID].TimeStamp_End.PTS.File_Pos;
- Streams[StreamID].Searching_Payload=true;
- }
- if (Streams[StreamID].TimeStamp_End.DTS.File_Pos!=(int64u)-1)
- {
- if (Streams[StreamID].TimeStamp_End.DTS.File_Pos<ToJump)
- ToJump=Streams[StreamID].TimeStamp_End.DTS.File_Pos;
- Streams[StreamID].Searching_Payload=true;
- }
- if (Streams_Private1[StreamID].TimeStamp_End.PTS.File_Pos!=(int64u)-1)
- {
- if (Streams_Private1[StreamID].TimeStamp_End.PTS.File_Pos<ToJump)
- ToJump=Streams_Private1[StreamID].TimeStamp_End.PTS.File_Pos;
- Streams_Private1[StreamID].Searching_Payload=true;
- }
- if (Streams_Private1[StreamID].TimeStamp_End.DTS.File_Pos!=(int64u)-1)
- {
- if (Streams_Private1[StreamID].TimeStamp_End.DTS.File_Pos<ToJump)
- ToJump=Streams_Private1[StreamID].TimeStamp_End.DTS.File_Pos;
- Streams_Private1[StreamID].Searching_Payload=true;
- }
- if (Streams_Extension[StreamID].TimeStamp_End.PTS.File_Pos!=(int64u)-1)
- {
- if (Streams_Extension[StreamID].TimeStamp_End.PTS.File_Pos<ToJump)
- ToJump=Streams_Extension[StreamID].TimeStamp_End.PTS.File_Pos;
- Streams_Extension[StreamID].Searching_Payload=true;
- }
- if (Streams_Extension[StreamID].TimeStamp_End.DTS.File_Pos!=(int64u)-1)
- {
- if (Streams_Extension[StreamID].TimeStamp_End.DTS.File_Pos<ToJump)
- ToJump=Streams_Extension[StreamID].TimeStamp_End.DTS.File_Pos;
- Streams_Extension[StreamID].Searching_Payload=true;
- }
- }
-
- return false;
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Packet "B9"
-void File_MpegPs::MPEG_program_end()
-{
- Element_Name("MPEG_program_end");
-}
-
-//---------------------------------------------------------------------------
-// Packet "BA"
-void File_MpegPs::pack_start()
-{
- Element_Name("pack_start");
-
- //Parsing
- int16u SysClock_29, SysClock_14;
- int8u Version, SysClock_32;
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- //Parsing
- BS_Begin();
- Peek_S1( 2, Version);
- }
- else
- {
- #endif //MEDIAINFO_TRACE
- //Parsing
- Version=Buffer[Buffer_Pos]>>6;
- #if MEDIAINFO_TRACE
- }
- #endif //MEDIAINFO_TRACE
- if (Version==1)
- {
- //MPEG-2
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- //Parsing
- int8u Padding;
- Mark_0();
- Mark_1();
- Get_S1 ( 3, SysClock_32, "system_clock_reference_base32");
- Mark_1();
- Get_S2 (15, SysClock_29, "system_clock_reference_base29");
- Mark_1();
- Get_S2 (15, SysClock_14, "system_clock_reference_base14");
-
- //Filling
- Streams[0xBA].TimeStamp_End.PTS.TimeStamp=(((int64u)SysClock_32)<<30)
- | (((int64u)SysClock_29)<<15)
- | (((int64u)SysClock_14));
- if (Searching_TimeStamp_Start && Streams[0xBA].Searching_TimeStamp_Start)
- {
- Streams[0xBA].TimeStamp_Start=Streams[0xBA].TimeStamp_End;
- Streams[0xBA].Searching_TimeStamp_Start=false;
- }
- Param_Info_From_Milliseconds(Streams[0xBA].TimeStamp_End.PTS.TimeStamp/90);
-
- Mark_1();
- Skip_S2( 9, "system_clock_reference_extension");
- Mark_1();
- Get_S3 (22, program_mux_rate, "program_mux_rate"); Param_Info2(program_mux_rate*400, " bps");
- Mark_1();
- Mark_1();
- Skip_S1( 5, "reserved");
- Get_S1 ( 3, Padding, "pack_stuffing_length");
- BS_End();
- if (Padding>0)
- Skip_XX(Padding, "padding");
- }
- else
- {
- #endif //MEDIAINFO_TRACE
- //Parsing
- Streams[0xBA].TimeStamp_End.PTS.TimeStamp=(((int64u)(Buffer[Buffer_Pos ] & 0x38)) << 30)
- | (((int64u)(Buffer[Buffer_Pos ] & 0x03)) << 28)
- | (((int64u)(Buffer[Buffer_Pos + 1] )) << 20)
- | (((int64u)(Buffer[Buffer_Pos + 2] & 0xF8)) << 15)
- | (((int64u)(Buffer[Buffer_Pos + 2] & 0x03)) << 13)
- | (((int64u)(Buffer[Buffer_Pos + 3] )) << 5)
- | (((int64u)(Buffer[Buffer_Pos + 4] & 0xF8)) >> 3);
- if (!Status[IsAccepted])
- {
- program_mux_rate =((Buffer[Buffer_Pos+6] )<<14)
- | ((Buffer[Buffer_Pos+7] )<< 6)
- | ((Buffer[Buffer_Pos+8] )>> 2);
- }
- int8u Padding = Buffer[Buffer_Pos+9]&0x07;
- Element_Offset=10+Padding;
- #if MEDIAINFO_TRACE
- }
- #endif //MEDIAINFO_TRACE
- }
- else
- {
- BS_Begin();
- Mark_0();
- Mark_0();
- Mark_1();
- Mark_0();
- Get_S1 ( 3, SysClock_32, "system_clock_reference_base32");
- Mark_1();
- Get_S2 (15, SysClock_29, "system_clock_reference_base29");
- Mark_1();
- Get_S2 (15, SysClock_14, "system_clock_reference_base14");
-
- //Filling
- Streams[0xBA].TimeStamp_End.PTS.TimeStamp=(((int64u)SysClock_32)<<30)
- | (((int64u)SysClock_29)<<15)
- | (((int64u)SysClock_14));
- if (Searching_TimeStamp_Start && Streams[0xBA].Searching_TimeStamp_Start)
- {
- Streams[0xBA].TimeStamp_Start=Streams[0xBA].TimeStamp_End;
- Streams[0xBA].Searching_TimeStamp_Start=false;
- }
- Param_Info_From_Milliseconds(Streams[0xBA].TimeStamp_End.PTS.TimeStamp/90);
-
- Mark_1();
- Mark_1();
- Get_S3(22, program_mux_rate, "mux_rate"); Param_Info2(program_mux_rate*400, " bps");
- Mark_1();
- BS_End();
- }
-
-
- //Filling
- FILLING_BEGIN_PRECISE();
- if (!Status[IsAccepted])
- {
- Data_Accept("MPEG-PS");
- if (!IsSub)
- Fill(Stream_General, 0, General_Format, "MPEG-PS");
-
- //Autorisation of other streams
- Streams[0xB9].Searching_Payload=true; //MPEG_program_end
- Streams[0xBB].Searching_Payload=true; //system_header_start
- Streams[0xBD].Searching_Payload=true; //private_stream_1
- Streams[0xBD].Searching_TimeStamp_Start=true; //private_stream_1
- Streams[0xBD].Searching_TimeStamp_End=true; //private_stream_1
- Streams[0xBF].Searching_Payload=true; //private_stream_2
- Streams[0xFD].Searching_Payload=true; //private_stream_1 or video_stream
- Streams[0xFD].Searching_TimeStamp_Start=true; //private_stream_1 or video_stream
- Streams[0xFD].Searching_TimeStamp_End=true; //private_stream_1 or video_stream
- for (int8u Pos=0xC0; Pos<=0xEF; Pos++)
- {
- Streams[Pos].Searching_Payload=true; //audio_stream or video_stream
- Streams[Pos].Searching_TimeStamp_Start=true; //audio_stream or video_stream
- Streams[Pos].Searching_TimeStamp_End=true; //audio_stream or video_stream
- }
-
- MPEG_Version=Version==1?2:1;
-
- SizeToAnalyze=((int64u)program_mux_rate)*50*4*(MustExtendParsingDuration?4:1); //standard delay between TimeStamps is 0.7s, we try 4s to be sure
- if (SizeToAnalyze>16*1024*1024)
- SizeToAnalyze=16*1024*1024; //Not too much
- if (SizeToAnalyze<2*1024*1024)
- SizeToAnalyze=2*1024*1024; //Not too less
- }
-
- #if MEDIAINFO_IBIUSAGE
- if (!IsSub)
- Ibi_SynchronizationOffset_Current=File_Offset+Buffer_Offset-Header_Size;
- #endif //MEDIAINFO_IBIUSAGE
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "BB"
-void File_MpegPs::system_header_start()
-{
- Element_Name("system_header_start");
-
- //If there is system_header_start, default value for private sections are false
- private_stream_1_Count=0;
- private_stream_2_Count=0;
- SL_packetized_stream_Count=0;
-
- //StreamOrder
- StreamOrder_CountOfPrivateStreams_Minus1=0;
-
- //Parsing
- int32u rate_bound;
- int8u audio_bound, video_bound;
- BS_Begin();
- Mark_1();
- Get_S3 (22, rate_bound, "rate_bound"); Param_Info2(rate_bound*400, " bps");
- Mark_1();
- Get_S1 ( 6, audio_bound, "audio_bound");
- Info_SB( fixed_flag, "fixed_flag"); Param_Info1(MpegPs_System_Fixed[fixed_flag]);
- Skip_SB( "CSPS_flag");
- Skip_SB( "system_audio_lock_flag");
- Skip_SB( "system_video_lock_flag");
- Mark_1();
- Get_S1 ( 5, video_bound, "video_bound");
- Skip_SB( "packet_rate_restriction_flag");
- Skip_S1( 7, "reserved_byte");
- bool one=false;
- size_t StreamOrder=0;
- if (Element_IsNotFinished())
- Peek_SB(one);
- while (one)
- {
- Element_Begin0();
- int16u STD_buffer_size_bound;
- int8u stream_id, stream_id_extension=0;
- bool STD_buffer_bound_scale;
- Get_S1 ( 8, stream_id, "stream_id"); Param_Info1(MpegPs_stream_id(stream_id));
- Element_Name(Ztring().From_CC1(stream_id));
- Element_Info1(MpegPs_stream_id(stream_id));
- if (stream_id==0xB7)
- {
- Mark_1();
- Mark_1();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- Get_S1 (8, stream_id_extension, "stream_id_extension");
- Mark_1();
- Mark_0();
- Mark_1();
- Mark_1();
- Mark_0();
- Mark_1();
- Mark_1();
- Mark_0();
- }
- Mark_1();
- Mark_1();
- Get_SB ( STD_buffer_bound_scale, "STD_buffer_bound_scale");
- Get_S2 (13, STD_buffer_size_bound, "STD_buffer_size_bound"); Param_Info1(Ztring::ToZtring(STD_buffer_size_bound*(STD_buffer_bound_scale?1024:128)) + __T(" bytes"));
- Element_End0();
-
- FILLING_BEGIN();
- switch (stream_id)
- {
- case 0xBD : private_stream_1_Count=(int8u)-1; break;
- case 0xBF : private_stream_2_Count=(int8u)-1; break;
- case 0xFA : SL_packetized_stream_Count=(int8u)-1; break;
- case 0xFD : extension_stream_Count=(int8u)-1; break;
- default : ;
- }
-
- if (stream_id==0xBD && Streams[stream_id].StreamOrder!=(size_t)-1)
- StreamOrder_CountOfPrivateStreams_Minus1++;
- else if (stream_id>0xB9)
- {
- Streams[stream_id].StreamOrder=StreamOrder;
- StreamOrder++;
- }
- FILLING_END();
-
- if (Element_IsNotFinished())
- Peek_SB(one);
- else
- one=false;
- }
- BS_End();
-
- //Filling
- if (audio_stream_Count==(int8u)-1) //0xBB may be multipart
- audio_stream_Count=0;
- audio_stream_Count+=audio_bound;
- if (video_stream_Count==(int8u)-1) //0xBB may be multipart
- video_stream_Count=0;
- video_stream_Count+=video_bound;
- if (private_stream_1_Count>0 && program_mux_rate*50==SizeToAnalyze)
- SizeToAnalyze*=32; //If there is a private section, this may be DVD, with late data --> 10s minimum
- if (SizeToAnalyze>8*1024*1024)
- SizeToAnalyze=8*1024*1024;
-
- //Autorisation of other streams
- if ((private_stream_1_Count>0 || audio_stream_Count>0) && video_stream_Count>0) //0xBB may be multipart
- Streams[0xBB].Searching_Payload=false;
- Streams[0xBC].Searching_Payload=true; //program_stream_map
-}
-
-//---------------------------------------------------------------------------
-// Packet "BC"
-void File_MpegPs::program_stream_map()
-{
- Element_Name("program_stream_map");
- MPEG_Version=2; //program_stream_map does NOT exist in MPEG-1 specs
-
- File_Mpeg_Psi Parser;
- Parser.From_TS=false;
- Parser.Complete_Stream=new complete_stream;
- Parser.Complete_Stream->Streams.resize(0x100);
- for (size_t StreamID=0; StreamID<0x100; StreamID++)
- Parser.Complete_Stream->Streams[StreamID]=new complete_stream::stream;
- Open_Buffer_Init(&Parser);
- Open_Buffer_Continue(&Parser);
- Finish(&Parser);
-
- FILLING_BEGIN();
- //Time stamps
- Streams[0xBC].TimeStamp_End=Streams[0xBA].TimeStamp_End;
- if (Streams[0xBC].TimeStamp_Start.PTS.TimeStamp==(int64u)-1)
- Streams[0xBC].TimeStamp_Start=Streams[0xBC].TimeStamp_End;
-
- //Registering the streams
- for (int8u Pos=0; Pos<0xFF; Pos++)
- if (Parser.Complete_Stream->Streams[Pos]->stream_type!=(int8u)-1)
- {
- if (!Parser.Complete_Stream->Transport_Streams.empty() && !Parser.Complete_Stream->Transport_Streams.begin()->second.Programs.empty())
- Streams[Pos].program_format_identifier=Parser.Complete_Stream->Transport_Streams.begin()->second.Programs.begin()->second.registration_format_identifier;
- Streams[Pos].format_identifier=Parser.Complete_Stream->Streams[Pos]->registration_format_identifier;
- Streams[Pos].stream_type=Parser.Complete_Stream->Streams[Pos]->stream_type;
- }
- else
- {
- }
- FILLING_END();
-
- delete Parser.Complete_Stream; //Parser.Complete_Stream=NULL;
-}
-
-//---------------------------------------------------------------------------
-// Packet "BD"
-void File_MpegPs::private_stream_1()
-{
- Element_Name("private_stream_1");
-
- if (!FromTS)
- {
- //From PS, trying DVD system
- private_stream_1_ID=0;
- private_stream_1_Offset=0;
- if (!private_stream_1_Choose_DVD_ID())
- {
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- return;
- }
- Element_Info1C(private_stream_1_ID, Ztring::ToZtring(private_stream_1_ID, 16));
- }
-
- if (!Streams_Private1[private_stream_1_ID].StreamIsRegistred)
- {
- //For TS streams, which does not have Start chunk
- if (FromTS)
- {
- if (video_stream_Count==(int8u)-1 && audio_stream_Count==(int8u)-1)
- {
- video_stream_Count=0;
- audio_stream_Count=0;
- private_stream_1_Count=1;
- private_stream_2_Count=0;
- extension_stream_Count=0;
- SL_packetized_stream_Count=0;
- private_stream_1_ID=0;
- private_stream_1_Offset=0;
- Streams_Private1[private_stream_1_ID].stream_type=FromTS_stream_type;
- }
- else if (!IsSub)
- {
- //2 streams in the file, this can not be From TS, we have no idea of the count of streams
- video_stream_Count=(int8u)-1;
- audio_stream_Count=(int8u)-1;
- private_stream_1_Count=(int8u)-1;
- private_stream_2_Count=(int8u)-1;
- extension_stream_Count=(int8u)-1;
- SL_packetized_stream_Count=(int8u)-1;
- FromTS=false;
- }
- }
-
- //Registering
- if (!Status[IsAccepted])
- {
- Data_Accept("MPEG-PS");
- if (!IsSub)
- Fill(Stream_General, 0, General_Format, "MPEG-PS");
- }
- Streams[stream_id].StreamIsRegistred++;
- Streams_Private1[private_stream_1_ID].StreamIsRegistred++;
- Streams_Private1[private_stream_1_ID].Searching_Payload=true;
- Streams_Private1[private_stream_1_ID].Searching_TimeStamp_Start=true;
- Streams_Private1[private_stream_1_ID].Searching_TimeStamp_End=true;
- Streams_Private1[private_stream_1_ID].FirstPacketOrder=FirstPacketOrder_Last;
- FirstPacketOrder_Last++;
-
- //New parsers
- Streams_Private1[private_stream_1_ID].Parsers.push_back(private_stream_1_ChooseParser());
- if (Streams_Private1[private_stream_1_ID].Parsers[Streams_Private1[private_stream_1_ID].Parsers.size()-1]==NULL)
- {
- Streams_Private1[private_stream_1_ID].Parsers.clear();
- #if defined(MEDIAINFO_AC3_YES)
- Streams_Private1[private_stream_1_ID].Parsers.push_back(ChooseParser_AC3());
- #endif
- #if defined(MEDIAINFO_DTS_YES)
- Streams_Private1[private_stream_1_ID].Parsers.push_back(ChooseParser_DTS());
- #endif
- #if defined(MEDIAINFO_SMPTEST0337_YES)
- Streams_Private1[private_stream_1_ID].Parsers.push_back(ChooseParser_SmpteSt0302());
- #endif
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- Streams_Private1[private_stream_1_ID].Parsers.push_back(ChooseParser_AribStdB24B37());
- #endif
- }
- #if MEDIAINFO_EVENTS
- if (private_stream_1_Offset)
- {
- //Multiple substreams in 1 stream
- StreamIDs[StreamIDs_Size-1]=Element_Code;
- Element_Code=private_stream_1_ID; //The upper level ID is filled by Element_Code in the common code
- StreamIDs_Width[StreamIDs_Size]=2;
- ParserIDs[StreamIDs_Size]=MediaInfo_Parser_MpegPs_Ext;
- StreamIDs_Size++;
- }
- #endif //MEDIAINFO_EVENTS
- for (size_t Pos=0; Pos<Streams_Private1[private_stream_1_ID].Parsers.size(); Pos++)
- {
- Streams_Private1[private_stream_1_ID].Parsers[Pos]->CA_system_ID_MustSkipSlices=CA_system_ID_MustSkipSlices;
- Open_Buffer_Init(Streams_Private1[private_stream_1_ID].Parsers[Pos]);
- }
- #if MEDIAINFO_EVENTS
- if (private_stream_1_Offset)
- {
- StreamIDs_Size--;
- Element_Code=StreamIDs[StreamIDs_Size-1];
- }
- #endif //MEDIAINFO_EVENTS
- }
-
- //Demux
- #if MEDIAINFO_DEMUX
- if (Streams_Private1[private_stream_1_ID].Searching_Payload)
- {
- if (private_stream_1_Offset)
- {
- //Multiple substreams in 1 stream
- StreamIDs[StreamIDs_Size-1]=Element_Code;
- Element_Code=private_stream_1_ID; //The upper level ID is filled by Element_Code in the common code
- StreamIDs_Width[StreamIDs_Size]=2;
- ParserIDs[StreamIDs_Size]=MediaInfo_Parser_MpegPs_Ext;
- StreamIDs_Size++;
- Demux(Buffer+Buffer_Offset+private_stream_1_Offset, (size_t)(Element_Size-private_stream_1_Offset), ContentType_MainStream);
- StreamIDs_Size--;
- Element_Code=StreamIDs[StreamIDs_Size-1];
- }
- else
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- }
- #endif //MEDIAINFO_DEMUX
-
- //Parsing
- if (Element_Offset<private_stream_1_Offset)
- Skip_XX(private_stream_1_Offset-Element_Offset, "DVD-Video data");
-
- #if MEDIAINFO_EVENTS
- StreamIDs[StreamIDs_Size-1]=Element_Code;
- if (private_stream_1_Offset)
- {
- //Multiple substreams in 1 stream
- StreamIDs[StreamIDs_Size]=Element_Code=private_stream_1_ID;
- StreamIDs_Width[StreamIDs_Size]=2;
- ParserIDs[StreamIDs_Size]=MediaInfo_Parser_MpegPs_Ext;
- StreamIDs_Size++;
- }
- #endif //MEDIAINFO_EVENTS
- xxx_stream_Parse(Streams_Private1[private_stream_1_ID], private_stream_1_Count);
- #if MEDIAINFO_EVENTS
- if (private_stream_1_Offset)
- {
- StreamIDs_Size--;
- Element_Code=StreamIDs[StreamIDs_Size-1];
- }
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- {
- Demux_StreamIsBeingParsed_type=1;
- Demux_StreamIsBeingParsed_stream_id=private_stream_1_ID;
- }
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-bool File_MpegPs::private_stream_1_Choose_DVD_ID()
-{
- private_stream_1_IsDvdVideo=false;
-
- if (Element_Size<4)
- return false;
-
- //Testing false-positives
- if (CC2(Buffer+Buffer_Offset+(size_t)Element_Offset)==0x0B77)
- return true;
-
- //Parsing
- int8u CodecID;
- Get_B1 (CodecID, "CodecID");
-
- //Testing
- //Subtitles (CVD)
- if (CodecID<=0x0F)
- {
- private_stream_1_IsDvdVideo=true;
- private_stream_1_Offset=1;
- }
- //Subtitles (DVD)
- else if (CodecID>=0x20 && CodecID<=0x3F)
- {
- private_stream_1_IsDvdVideo=true;
- private_stream_1_Offset=1;
- }
- //Subtitles (SVCD)
- else if (CodecID>=0x70 && CodecID<=0x7F)
- {
- private_stream_1_IsDvdVideo=true;
- private_stream_1_Offset=1;
- }
- //AC-3 (OTA?)
- else if (CodecID==0x80 && CC3(Buffer+Buffer_Offset+1)==0x000000)
- {
- private_stream_1_IsDvdVideo=true; //Not sure
- private_stream_1_Offset=4;
- }
- //PCM
- else if (CodecID>=0xA0 && CodecID<=0xAF && Element_Size>=7 && Buffer[Buffer_Offset+6]==0x80)
- {
- private_stream_1_IsDvdVideo=true;
- private_stream_1_Offset=1;
- }
- //PS2-MPG
- else if (CodecID==0xFF)
- {
- int16u StreamID;
- int8u SubID;
- Get_B1 (SubID, "CodecID (part 2)");
- Get_B2 (StreamID, "Stream ID");
-
- if ((SubID&0xFE)==0xA0) //0xFFA0 or 0xFFA1
- {
- //PS2-MPG PCM/ADPCM
- private_stream_1_Offset=4;
- private_stream_1_ID=(int8u)StreamID; //ID is maybe 2 byte long, but private_stream_1_ID is an int8u
- return true;
- }
- else if (SubID==0x90) //0xFF90
- {
- //PS2-MPG AC-3 or subtitles
- private_stream_1_Offset=4;
- private_stream_1_ID=(int8u)StreamID; //ID is maybe 2 byte long, but private_stream_1_ID is an int8u
- return true;
- }
- else
- return false;
- }
- else
- {
- int16u Next;
- int8u Count;
- Get_B1 (Count, "Count of next frame headers");
- Get_B2 (Next, "Next frame offset minus 1");
-
- if (Count>0 && 4+(int64u)Next+4<=Element_Size)
- {
- //Subtitles (CVD)
- // if (CodecID>=0x00 && CodecID<=0x0F)
- // ; //Seems to not work with subtitles, to be confirmed
- //Subtitles (DVD)
- // if (CodecID>=0x20 && CodecID<=0x3F)
- // ; //Seems to not work with subtitles, to be confirmed
- //Subtitles (SVCD)
- // if (CodecID>=0x70 && CodecID<=0x7F)
- // ; //Seems to not work with subtitles, to be confirmed
- //AC3
- if (CodecID>=0x80 && CodecID<=0x87)
- {
- if (CC2(Buffer+Buffer_Offset+4+Next)!=0x0B77 && CC2(Buffer+Buffer_Offset+3+Next)!=0x0B77 && CC2(Buffer+Buffer_Offset+2+Next)!=0x0B77)
- return false;
- }
- //DTS
- else if (CodecID>=0x88 && CodecID<=0x8F)
- {
- if (CC4(Buffer+Buffer_Offset+4+Next)!=0x7FFE8001 && CC4(Buffer+Buffer_Offset+3+Next)!=0x7FFE8001 && CC4(Buffer+Buffer_Offset+2+Next)!=0x7FFE8001)
- return false;
- }
- //DTS
- else if (CodecID>=0x98 && CodecID<=0x9F)
- {
- if (CC4(Buffer+Buffer_Offset+4+Next)!=0x7FFE8001 && CC4(Buffer+Buffer_Offset+3+Next)!=0x7FFE8001 && CC4(Buffer+Buffer_Offset+2+Next)!=0x7FFE8001)
- return false;
- }
- //PCM
- //else if (CodecID>=0xA0 && CodecID<=0xAF)
- // ;
- //MLP
- else if (CodecID>=0xB0 && CodecID<=0xBF)
- {
- if (CC2(Buffer+Buffer_Offset+4+Next)!=0x0B77 && CC2(Buffer+Buffer_Offset+3+Next)!=0x0B77 && CC2(Buffer+Buffer_Offset+2+Next)!=0x0B77)
- return false;
- }
- //AC3+
- else if (CodecID>=0xC0 && CodecID<=0xCF)
- {
- if (CC2(Buffer+Buffer_Offset+4+Next)!=0x0B77 && CC2(Buffer+Buffer_Offset+3+Next)!=0x0B77 && CC2(Buffer+Buffer_Offset+2+Next)!=0x0B77)
- return false;
- }
- else
- return false;
-
- private_stream_1_IsDvdVideo=true;
- private_stream_1_Offset=4;
- }
- }
-
- //Filling
- private_stream_1_ID=CodecID;
- return true;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::private_stream_1_ChooseParser()
-{
- if (FromTS || Streams[stream_id].program_format_identifier || Streams[stream_id].format_identifier || Streams[stream_id].descriptor_tag)
- {
- int32u format_identifier=FromTS?FromTS_format_identifier:Streams[stream_id].format_identifier;
- if (format_identifier==0x42535344) //"BSSD"
- {
- return ChooseParser_SmpteSt0302(); //AES3 (SMPTE 302M)
- }
- int32u stream_type=FromTS?FromTS_stream_type:Streams[stream_id].stream_type;
- switch (stream_type)
- {
- case 0x03 :
- case 0x04 : return ChooseParser_Mpega(); //MPEG Audio
- case 0x0F : return ChooseParser_Adts(); //ADTS
- case 0x11 : return ChooseParser_Latm(); //LATM
- case 0x80 : return ChooseParser_PCM(); //PCM
- case 0x81 :
- case 0x83 :
- case 0x84 :
- case 0x87 :
- case 0xA1 : return ChooseParser_AC3(); //AC3/AC3+
- case 0x82 :
- case 0x85 :
- case 0x86 :
- case 0xA2 : return ChooseParser_DTS(); //DTS
- case 0x90 : return ChooseParser_PGS(); //PGS from Bluray
- case 0xEA : return ChooseParser_NULL(); //VC1()
- default :
- {
- int8u descriptor_tag=FromTS?FromTS_descriptor_tag:Streams[stream_id].descriptor_tag;
- switch (descriptor_tag)
- {
- case 0x56 : return ChooseParser_Teletext(); //Teletext
- case 0x59 : return ChooseParser_DvbSubtitle(); //DVB Subtiles
- case 0x6A :
- case 0x7A :
- case 0x81 : return ChooseParser_AC3(); //AC3/AC3+
- case 0x7B : return ChooseParser_DTS(); //DTS
- case 0x7C : return ChooseParser_AAC(); //AAC
- default : if (Element_Size>2 && CC2(Buffer+Buffer_Offset)==0x0B77)
- return ChooseParser_AC3(); //AC3/AC3+
- else if (Element_Size>4 && CC4(Buffer+Buffer_Offset)==0x7FFE8001)
- return ChooseParser_DTS(); //DTS
- else
- return NULL;
- }
- }
- }
- }
- else if (Element_Code==0xBD && private_stream_1_IsDvdVideo)
- {
- //Subtitles (CVD)
- if (private_stream_1_ID<=0x0F)
- return ChooseParser_RLE();
- //Subtitles (DVD)
- if (private_stream_1_ID>=0x20 && private_stream_1_ID<=0x3F)
- return ChooseParser_RLE();
- //Subtitles (SVCD)
- if (private_stream_1_ID>=0x70 && private_stream_1_ID<=0x7F)
- return ChooseParser_RLE();
- //AC3
- else if (private_stream_1_ID>=0x80 && private_stream_1_ID<=0x87)
- return ChooseParser_AC3();
- //DTS
- else if (private_stream_1_ID>=0x88 && private_stream_1_ID<=0x8F)
- return ChooseParser_DTS();
- //SDDS
- else if (private_stream_1_ID>=0x90 && private_stream_1_ID<=0x97)
- return ChooseParser_DTS();
- //DTS
- else if (private_stream_1_ID>=0x98 && private_stream_1_ID<=0x9F)
- return ChooseParser_DTS();
- //PCM
- else if (private_stream_1_ID>=0xA0 && private_stream_1_ID<=0xAF)
- return ChooseParser_PCM();
- //AC3+
- else if (private_stream_1_ID>=0xC0 && private_stream_1_ID<=0xCF)
- return ChooseParser_AC3();
- else
- return NULL;
- }
- else
- {
- if (Element_Size>2 && CC2(Buffer+Buffer_Offset)==0x0B77)
- return ChooseParser_AC3(); //AC3/AC3+
- else if (Element_Size>4 && CC4(Buffer+Buffer_Offset)==0x7FFE8001)
- return ChooseParser_DTS(); //DTS
- else if (Element_Size>2 && (CC2(Buffer+Buffer_Offset)&0xFFFE)==0xFFA0) //0xFFA0 or 0xFFA1
- return ChooseParser_PS2(); //PS2-MPG PCM/ADPCM
- else if (Element_Size>6 && CC2(Buffer+Buffer_Offset)==0xFF90 && CC2(Buffer+Buffer_Offset+4)==0x0B77)
- return ChooseParser_AC3(); //PS2-MPG AC-3
- else if (Element_Size>6 && CC2(Buffer+Buffer_Offset)==0xFF90 && CC2(Buffer+Buffer_Offset+4)==0x0000)
- return ChooseParser_RLE(); //PS2-MPG Subtitles
- else
- return NULL;
- }
-}
-
-//---------------------------------------------------------------------------
-const ZenLib::Char* File_MpegPs::private_stream_1_ChooseExtension()
-{
- if (FromTS)
- {
- switch (private_stream_1_ID)
- {
- case 0x80 : return __T(".pcm"); //PCM
- case 0x81 : return __T(".ac3"); //AC3
- case 0x83 :
- case 0x87 : return __T(".dd+"); //AC3+
- case 0x86 : return __T(".dts"); //DTS
- case 0xEA : return __T(".vc1"); //DTS
- default : return __T(".raw");
- }
- }
- else
- {
- //Subtitles
- if (private_stream_1_ID>=0x20 && private_stream_1_ID<=0x3F)
- return __T(".sub");
- //AC3
- else if (private_stream_1_ID>=0x80 && private_stream_1_ID<=0x87)
- return __T(".ac3");
- //DTS
- else if (private_stream_1_ID>=0x88 && private_stream_1_ID<=0x8F)
- return __T(".dts");
- //SDDS
- else if (private_stream_1_ID>=0x90 && private_stream_1_ID<=0x97)
- return __T(".sdds");
- //DTS
- else if (private_stream_1_ID>=0x98 && private_stream_1_ID<=0x9F)
- return __T(".dts");
- //PCM
- else if (private_stream_1_ID>=0xA0 && private_stream_1_ID<=0xAF)
- return __T(".pcm");
- //MLP
- else if (private_stream_1_ID>=0xB0 && private_stream_1_ID<=0xBF)
- return __T(".dd+");
- //AC3+
- else if (private_stream_1_ID>=0xC0 && private_stream_1_ID<=0xCF)
- return __T(".dd+");
- else
- return __T(".raw");
- }
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File_MpegPs::private_stream_1_Element_Info1()
-{
- if (FromTS)
- {
- switch (private_stream_1_ID)
- {
- case 0x80 : Element_Info1("PCM"); return;
- case 0x81 : Element_Info1("AC3"); return;
- case 0x83 :
- case 0x87 : Element_Info1("AC3+"); return;
- case 0x86 : Element_Info1("DTS"); return;
- case 0xEA : Element_Info1("VC1"); return;
- default : return;
- }
- }
- else
- {
- //Subtitles
- if (private_stream_1_ID>=0x20 && private_stream_1_ID<=0x3F)
- Element_Info1("RLE");
- //AC3
- else if (private_stream_1_ID>=0x80 && private_stream_1_ID<=0x87)
- Element_Info1("AC3");
- //DTS
- else if (private_stream_1_ID>=0x88 && private_stream_1_ID<=0x8F)
- Element_Info1("DTS");
- //SDDS
- else if (private_stream_1_ID>=0x90 && private_stream_1_ID<=0x97)
- Element_Info1("SDDS");
- //DTS
- else if (private_stream_1_ID>=0x98 && private_stream_1_ID<=0x9F)
- Element_Info1("DTS");
- //PCM
- else if (private_stream_1_ID>=0xA0 && private_stream_1_ID<=0xAF)
- Element_Info1("LPCM");
- //MLP
- else if (private_stream_1_ID>=0xB0 && private_stream_1_ID<=0xBF)
- Element_Info1("MLP");
- //AC3+
- else if (private_stream_1_ID>=0xC0 && private_stream_1_ID<=0xCF)
- Element_Info1("AC3+");
- }
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-// Packet "BE"
-void File_MpegPs::padding_stream()
-{
- Element_Name("padding_stream");
-
- Skip_XX(Element_Size, "stuffing_bytes");
-}
-
-//---------------------------------------------------------------------------
-// Packet "BF"
-void File_MpegPs::private_stream_2()
-{
- Element_Name("private_stream_2");
-
- //Filling
- if (FromTS)
- {
- switch (FromTS_program_format_identifier)
- {
- case 0x54534856 : //TSHV
- switch (FromTS_stream_type)
- {
- case 0xA0 : private_stream_2_TSHV_A0(); break;
- case 0xA1 : private_stream_2_TSHV_A1(); break;
- default : Skip_XX(Element_Size, "Unknown");
- }
- break;
- default : Skip_XX(Element_Size, "Unknown");
- }
-
- //Disabling the program
- if (!Status[IsAccepted])
- Data_Accept("MPEG-PS");
- }
- else //DVD?
- {
- Stream_Prepare(Stream_Menu);
- Fill(Stream_Menu, StreamPos_Last, Menu_Format, "DVD-Video");
- Fill(Stream_Menu, StreamPos_Last, Menu_Codec, "DVD-Video");
-
- //Disabling this Stream
- Streams[0xBF].Searching_Payload=false;
- private_stream_2_Count=0;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_MpegPs::private_stream_2_TSHV_A0()
-{
- Element_Name("DV A0");
-
- //Parsing
- Skip_XX(Element_Size, "Unknown");
-
- //Filling
- Data_Accept("MPEG-PS");
- Finish("MPEG-PS");
-}
-
-//---------------------------------------------------------------------------
-void File_MpegPs::private_stream_2_TSHV_A1()
-{
- Element_Name("DV A1");
-
- //Parsing
- int8u day, month, year, second, minute, hour;
- Skip_XX(31, "Unknown");
- BS_Begin();
- Skip_S1(2, "Unknown");
- Skip_S1(6, "timecode_frame");
- Skip_S1(1, "Unknown");
- Skip_S1(7, "timecode_second");
- Skip_S1(1, "Unknown");
- Skip_S1(7, "timecode_minute");
- Skip_S1(2, "Unknown");
- Skip_S1(6, "timecode_hour");
- Skip_S1(8, "Unknown");
- Skip_S1(2, "Unknown");
- Get_S1 (6, day, "day");
- Skip_S1(3, "Unknown");
- Get_S1 (5, month, "month");
- Get_S1 (8, year, "year");
- Skip_S1(8, "Unknown");
- Skip_S1(1, "Unknown");
- Get_S1 (7, second, "second");
- Skip_S1(1, "Unknown");
- Get_S1 (7, minute, "minute");
- Skip_S1(2, "Unknown");
- Get_S1 (6, hour, "hour");
- Skip_S1(2, "Unknown");
- Skip_S1(1, "scene_start");
- Skip_S1(5, "Unknown");
- BS_End();
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-
- FILLING_BEGIN();
- Ztring Date_Time=Ztring().Date_From_Numbers(year/0x10*10+year%0x10, month/0x10*10+month%0x10, day/0x10*10+day%0x10, hour/0x10*10+hour%0x10, minute/0x10*10+minute%0x10, second/0x10*10+second%0x10);
- if (Retrieve(Stream_General, 0, General_Encoded_Date).empty())
- {
- Fill(Stream_General, 0, General_Encoded_Date, Date_Time);
- Fill(Stream_General, 0, General_Duration_Start, Date_Time);
- }
- Fill(Stream_General, 0, General_Duration_End, Date_Time, true);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_MpegPs::audio_stream()
-{
- Element_Name("Audio");
-
- if (!Streams[stream_id].StreamIsRegistred)
- {
- //For TS streams, which does not have Start chunk
- if (FromTS)
- {
- if (video_stream_Count==(int8u)-1 && audio_stream_Count==(int8u)-1)
- {
- video_stream_Count=0;
- audio_stream_Count=1;
- private_stream_1_Count=0;
- private_stream_2_Count=0;
- extension_stream_Count=0;
- SL_packetized_stream_Count=0;
- Streams[stream_id].stream_type=FromTS_stream_type;
- }
- else if (!IsSub)
- {
- //2 streams in the file, this can not be From TS, we have no idea of the count of streams
- video_stream_Count=(int8u)-1;
- audio_stream_Count=(int8u)-1;
- private_stream_1_Count=(int8u)-1;
- private_stream_2_Count=(int8u)-1;
- extension_stream_Count=(int8u)-1;
- SL_packetized_stream_Count=(int8u)-1;
- FromTS=false;
- }
- }
-
- //If we have no Streams map --> Registering the Streams as MPEG Audio
- if (Streams[stream_id].stream_type==0 && !FromTS)
- {
- if (MPEG_Version==2)
- Streams[stream_id].stream_type=0x04; //MPEG-2 Audio
- else
- Streams[stream_id].stream_type=0x03; //MPEG-1 Audio
- }
-
- //Registering
- if (!Status[IsAccepted])
- {
- Data_Accept("MPEG-PS");
- if (!IsSub)
- Fill(Stream_General, 0, General_Format, "MPEG-PS");
- }
- Streams[stream_id].StreamIsRegistred++;
- Streams[stream_id].FirstPacketOrder=FirstPacketOrder_Last;
- FirstPacketOrder_Last++;
-
- //New parsers
- Streams[stream_id].Parsers.push_back(private_stream_1_ChooseParser());
- if (Streams[stream_id].Parsers[Streams[stream_id].Parsers.size()-1]==NULL)
- {
- Streams[stream_id].Parsers.clear();
- #if defined(MEDIAINFO_MPEGA_YES)
- Streams[stream_id].Parsers.push_back(ChooseParser_Mpega());
- #endif
- #if defined(MEDIAINFO_AC3_YES)
- Streams[stream_id].Parsers.push_back(ChooseParser_AC3());
- #endif
- #if defined(MEDIAINFO_DTS_YES)
- Streams[stream_id].Parsers.push_back(ChooseParser_DTS());
- #endif
- #if defined(MEDIAINFO_AAC_YES)
- Streams[stream_id].Parsers.push_back(ChooseParser_Adts());
- #endif
- #if defined(MEDIAINFO_AAC_YES)
- Streams[stream_id].Parsers.push_back(ChooseParser_Latm());
- #endif
- }
- for (size_t Pos=0; Pos<Streams[stream_id].Parsers.size(); Pos++)
- {
- Streams[stream_id].Parsers[Pos]->CA_system_ID_MustSkipSlices=CA_system_ID_MustSkipSlices;
- Open_Buffer_Init(Streams[stream_id].Parsers[Pos]);
- }
- }
-
- //Demux
- #if MEDIAINFO_DEMUX
- if (Streams[stream_id].Parsers.empty() || !Streams[stream_id].Parsers[0]->Demux_UnpacketizeContainer)
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- #endif //MEDIAINFO_DEMUX
-
- //Parsing
- #if MEDIAINFO_EVENTS
- StreamIDs[StreamIDs_Size-1]=Element_Code;
- #endif //MEDIAINFO_EVENTS
- xxx_stream_Parse(Streams[stream_id], audio_stream_Count);
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- {
- Demux_StreamIsBeingParsed_type=0;
- Demux_StreamIsBeingParsed_stream_id=stream_id;
- }
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-void File_MpegPs::video_stream()
-{
- Element_Name("Video");
-
- if (!Streams[stream_id].StreamIsRegistred)
- {
- //For TS streams, which does not have Start chunk
- if (FromTS)
- {
- if (video_stream_Count==(int8u)-1 && audio_stream_Count==(int8u)-1)
- {
- video_stream_Count=1;
- audio_stream_Count=0;
- private_stream_1_Count=0;
- private_stream_2_Count=0;
- extension_stream_Count=0;
- SL_packetized_stream_Count=0;
- Streams[stream_id].stream_type=FromTS_stream_type;
- }
- else if (!IsSub)
- {
- //2 streams in the file, this can not be From TS, we have no idea of the count of streams
- video_stream_Count=(int8u)-1;
- audio_stream_Count=(int8u)-1;
- private_stream_1_Count=(int8u)-1;
- private_stream_2_Count=(int8u)-1;
- extension_stream_Count=(int8u)-1;
- SL_packetized_stream_Count=(int8u)-1;
- FromTS=false;
- }
- }
-
- //Registering
- if (!Status[IsAccepted])
- {
- Data_Accept("MPEG-PS");
- if (!IsSub)
- Fill(Stream_General, 0, General_Format, "MPEG-PS");
- }
- Streams[stream_id].StreamIsRegistred++;
- Streams[stream_id].FirstPacketOrder=FirstPacketOrder_Last;
- FirstPacketOrder_Last++;
-
- //New parsers
- switch (Streams[stream_id].stream_type)
- {
- case 0x01 :
- case 0x02 :
- case 0x80 : Streams[stream_id].Parsers.push_back(ChooseParser_Mpegv() ); break;
- case 0x10 :
- Streams[stream_id].Parsers.push_back(ChooseParser_Mpeg4v()); break;
- case 0x1B :
- Streams[stream_id].Parsers.push_back(ChooseParser_Avc() ); break;
- case 0x24 :
- case 0x27 : Streams[stream_id].Parsers.push_back(ChooseParser_Hevc() ); break;
- default :
- #if defined(MEDIAINFO_MPEGV_YES)
- Streams[stream_id].Parsers.push_back(ChooseParser_Mpegv());
- #endif
- #if defined(MEDIAINFO_AVC_YES)
- Streams[stream_id].Parsers.push_back(ChooseParser_Avc());
- #endif
- #if defined(MEDIAINFO_HEVC_YES)
- Streams[stream_id].Parsers.push_back(ChooseParser_Hevc());
- #endif
- #if defined(MEDIAINFO_MPEG4V_YES)
- Streams[stream_id].Parsers.push_back(ChooseParser_Mpeg4v());
- #endif
- #if defined(MEDIAINFO_AVSV_YES)
- {
- File_AvsV* Parser=new File_AvsV;
- Streams[stream_id].Parsers.push_back(Parser);
- }
- #endif
- }
- for (size_t Pos=0; Pos<Streams[stream_id].Parsers.size(); Pos++)
- {
- Streams[stream_id].Parsers[Pos]->CA_system_ID_MustSkipSlices=CA_system_ID_MustSkipSlices;
- Open_Buffer_Init(Streams[stream_id].Parsers[Pos]);
- #if MEDIAINFO_IBIUSAGE
- if (FromTS)
- Streams[stream_id].Parsers[Pos]->IbiStream=IbiStream;
- else
- {
- if (Ibi.Streams[stream_id]==NULL)
- Ibi.Streams[stream_id]=new ibi::stream;
- Streams[stream_id].Parsers[Pos]->IbiStream=Ibi.Streams[stream_id];
- }
- #endif //MEDIAINFO_IBIUSAGE
- #if MEDIAINFO_SEEK
- if (Unsynch_Frame_Counts.find(stream_id)!=Unsynch_Frame_Counts.end())
- Streams[stream_id].Parsers[Pos]->Frame_Count_NotParsedIncluded=Unsynch_Frame_Counts[stream_id];
- #endif //MEDIAINFO_SEEK
- }
- #if MEDIAINFO_SEEK
- Unsynch_Frame_Counts.erase(stream_id);
- #endif //MEDIAINFO_SEEK
- }
-
- //Demux
- #if MEDIAINFO_DEMUX
- if (!(FromTS_stream_type==0x20 && SubStream_Demux) && (Streams[stream_id].Parsers.empty() || !Streams[stream_id].Parsers[0]->Demux_UnpacketizeContainer))
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- #endif //MEDIAINFO_DEMUX
-
- //Parsing
- #if MEDIAINFO_EVENTS
- StreamIDs[StreamIDs_Size-1]=Element_Code;
- #endif //MEDIAINFO_EVENTS
- xxx_stream_Parse(Streams[stream_id], video_stream_Count);
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- {
- Demux_StreamIsBeingParsed_type=0;
- Demux_StreamIsBeingParsed_stream_id=stream_id;
- }
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-// Packet "FA"
-void File_MpegPs::SL_packetized_stream()
-{
- Element_Name("SL-packetized_stream");
-
- if (!Streams[stream_id].StreamIsRegistred)
- {
- //For TS streams, which does not have Start chunk
- if (FromTS)
- {
- if (video_stream_Count==(int8u)-1 && audio_stream_Count==(int8u)-1)
- {
- video_stream_Count=0;
- audio_stream_Count=0;
- private_stream_1_Count=0;
- private_stream_2_Count=0;
- extension_stream_Count=0;
- SL_packetized_stream_Count=1;
- Streams[stream_id].stream_type=FromTS_stream_type;
- }
- else if (!IsSub)
- {
- //2 streams in the file, this can not be From TS, we have no idea of the count of streams
- video_stream_Count=(int8u)-1;
- audio_stream_Count=(int8u)-1;
- private_stream_1_Count=(int8u)-1;
- private_stream_2_Count=(int8u)-1;
- extension_stream_Count=(int8u)-1;
- SL_packetized_stream_Count=(int8u)-1;
- FromTS=false;
- }
- }
-
- //Registering
- Streams[stream_id].StreamIsRegistred++;
- Streams[stream_id].FirstPacketOrder=FirstPacketOrder_Last;
- FirstPacketOrder_Last++;
- if (!Status[IsAccepted])
- Data_Accept("MPEG-PS");
- Streams[stream_id].Searching_TimeStamp_Start=true;
-
- //New parsers
- #ifdef MEDIAINFO_MPEG4_YES
- if (ParserFromTs)
- {
- Streams[stream_id].Parsers.push_back(ParserFromTs); ParserFromTs=NULL;
- }
- else
- #endif
- if (FromTS_stream_type)
- switch (FromTS_stream_type)
- {
- case 0x0F :
- Streams[stream_id].Parsers.push_back(ChooseParser_Adts());
- break;
-
- case 0x11 :
- Streams[stream_id].Parsers.push_back(ChooseParser_Latm());
- break;
- default : ;
- }
- else
- {
- #if defined(MEDIAINFO_AAC_YES)
- Streams[stream_id].Parsers.push_back(ChooseParser_Adts());
- #endif
- #if defined(MEDIAINFO_AAC_YES)
- Streams[stream_id].Parsers.push_back(ChooseParser_Latm());
- #endif
- }
- for (size_t Pos=0; Pos<Streams[stream_id].Parsers.size(); Pos++)
- {
- Streams[stream_id].Parsers[Pos]->CA_system_ID_MustSkipSlices=CA_system_ID_MustSkipSlices;
- Open_Buffer_Init(Streams[stream_id].Parsers[Pos]);
- }
- }
-
- //Parsing
- #ifdef MEDIAINFO_MPEG4_YES
- if (SLConfig) //SL
- {
- BS_Begin();
- int8u paddingBits=0;
- bool paddingFlag=false, idleFlag=false, OCRflag=false, accessUnitStartFlag=false;
- if (SLConfig->useAccessUnitStartFlag)
- Get_SB (accessUnitStartFlag, "accessUnitStartFlag");
- if (SLConfig->useAccessUnitEndFlag)
- Skip_SB( "accessUnitEndFlag");
- if (SLConfig->OCRLength>0)
- Get_SB (OCRflag, "OCRflag");
- if (SLConfig->useIdleFlag)
- Get_SB (idleFlag, "idleFlag");
- if (SLConfig->usePaddingFlag)
- Get_SB (paddingFlag, "paddingFlag");
- if (paddingFlag)
- Get_S1(3, paddingBits, "paddingBits");
- if (!idleFlag && (!paddingFlag || paddingBits!=0))
- {
- bool DegPrioflag=false;
- if (SLConfig->packetSeqNumLength>0)
- Skip_S2(SLConfig->packetSeqNumLength, "packetSequenceNumber");
- if (SLConfig->degradationPriorityLength>0)
- Get_SB (DegPrioflag, "DegPrioflag");
- if (DegPrioflag)
- Skip_S2(SLConfig->degradationPriorityLength, "degradationPriority");
- if (OCRflag)
- Skip_S8(SLConfig->OCRLength, "objectClockReference");
- if (accessUnitStartFlag)
- {
- bool decodingTimeStampFlag=false, compositionTimeStampFlag=false, instantBitrateFlag=false;
- if (SLConfig->useRandomAccessPointFlag)
- Skip_SB( "randomAccessPointFlag");
- if (SLConfig->AU_seqNumLength >0)
- Skip_S2(SLConfig->AU_seqNumLength, "AU_sequenceNumber");
- if (SLConfig->useTimeStampsFlag)
- {
- Get_SB (decodingTimeStampFlag, "decodingTimeStampFlag");
- Get_SB (compositionTimeStampFlag, "compositionTimeStampFlag");
- }
- if (SLConfig->instantBitrateLength>0)
- Get_SB (instantBitrateFlag, "instantBitrateFlag");
- if (decodingTimeStampFlag)
- Skip_S2(SLConfig->timeStampLength, "decodingTimeStamp");
- if (compositionTimeStampFlag)
- Skip_S2(SLConfig->timeStampLength, "compositionTimeStamp");
- if (SLConfig->AU_Length > 0)
- Skip_S2(SLConfig->AU_Length, "accessUnitLength");
- if (instantBitrateFlag)
- Skip_S2(SLConfig->instantBitrateLength, "instantBitrate");
- }
- }
- BS_End();
- }
- #else //MEDIAINFO_MPEG4_YES
- Skip_XX(Element_Size, "LATM (not decoded)");
- #endif //MEDIAINFO_MPEG4_YES
-
- //Demux
- /*
- if (Config_Demux)
- {
- int8u A[7];
- //TODO: Only for 24KHz stuff, should be modified... output is ADTS
- A[0]=0xFF;
- A[1]=0xF9;
- A[2]=0x58;
- A[3]=0x80;
- A[4]=0x00;
- A[5]=0x1F;
- A[6]=0xFC;
-
- int32u Size=(int32u)(Element_Size+7);
- Size=Size<<13;
- A[3]=A[3]|((int8u)(Size>>24));
- A[4]=A[4]|((int8u)(Size>>16));
- A[5]=A[5]|((int8u)(Size>>8));
-
- //Demux
- Demux(A, 7, ContentType_Header);
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- }
- */
- #if MEDIAINFO_DEMUX
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- #endif //MEDIAINFO_DEMUX
-
- //Parsing
- #if MEDIAINFO_EVENTS
- StreamIDs[StreamIDs_Size-1]=Element_Code;
- #endif //MEDIAINFO_EVENTS
- xxx_stream_Parse(Streams[stream_id], SL_packetized_stream_Count);
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- {
- Demux_StreamIsBeingParsed_type=0;
- Demux_StreamIsBeingParsed_stream_id=stream_id;
- }
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-// Packet "FD"
-void File_MpegPs::extension_stream()
-{
- Element_Name("With Extension");
- Element_Info1(MpegPs_stream_id_extension(stream_id_extension));
-
- if (!Streams_Extension[stream_id_extension].StreamIsRegistred)
- {
- //For TS streams, which does not have Start chunk
- if (FromTS)
- {
- if (video_stream_Count==(int8u)-1 && audio_stream_Count==(int8u)-1)
- {
- video_stream_Count=0;
- audio_stream_Count=0;
- private_stream_1_Count=0;
- private_stream_2_Count=0;
- extension_stream_Count=1;
- SL_packetized_stream_Count=0;
- Streams_Extension[stream_id_extension].stream_type=FromTS_stream_type;
- }
- else if (!IsSub)
- {
- //2 streams in the file, this can not be From TS, we have no idea of the count of streams
- video_stream_Count=(int8u)-1;
- audio_stream_Count=(int8u)-1;
- private_stream_1_Count=(int8u)-1;
- private_stream_2_Count=(int8u)-1;
- extension_stream_Count=(int8u)-1;
- SL_packetized_stream_Count=(int8u)-1;
- FromTS=false;
- }
- }
-
- //Registering
- if (!Status[IsAccepted])
- Data_Accept("MPEG-PS");
- Streams[stream_id].StreamIsRegistred++;
- Streams_Extension[stream_id_extension].StreamIsRegistred++;
- Streams_Extension[stream_id_extension].Searching_Payload=true;
- Streams_Extension[stream_id_extension].Searching_TimeStamp_Start=true;
- Streams_Extension[stream_id_extension].Searching_TimeStamp_End=true;
- Streams_Extension[stream_id_extension].FirstPacketOrder=FirstPacketOrder_Last;
- FirstPacketOrder_Last++;
-
- //New parsers
- if (Streams_Extension[stream_id_extension].stream_type && Streams_Extension[stream_id_extension].stream_type<0x80) //Standard
- switch (Streams_Extension[stream_id_extension].stream_type)
- {
- case 0x0F : Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_Adts()); break;
- default : ;
- }
- else
- switch (FromTS_format_identifier)
- {
- case 0x41432D33 :
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_AC3());
- break;
- case 0x44545331 :
- case 0x44545332 :
- case 0x44545333 :
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_DTS());
- break;
- case 0x56432D31 :
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_VC1());
- break;
- case 0x64726163 :
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_Dirac());
- break;
- default :
- switch (FromTS_program_format_identifier)
- {
- case 0x48444D56 : //HDMV (BluRay)
- switch (Streams_Extension[stream_id_extension].stream_type)
- {
- case 0x81 :
- case 0x83 :
- case 0x84 :
- case 0xA1 :
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_AC3());
- break;
- case 0x82 :
- case 0x85 :
- case 0x86 :
- case 0xA2 :
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_DTS());
- break;
- case 0xEA :
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_VC1());
- break;
- default : ;
- }
- break;
- default : ;
- if (stream_id_extension==0x00)
- {} //IPMP Control Information stream
- else if (stream_id_extension==0x01)
- {} //IPMP stream
- else if (stream_id_extension>=0x55 && stream_id_extension<=0x5F)
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_VC1());
- else if (stream_id_extension>=0x60 && stream_id_extension<=0x6F)
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_Dirac());
- else if (stream_id_extension==0x71 || stream_id_extension==0x72 || stream_id_extension==0x76)
- {
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_DTS());
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_AC3());
- }
- else if (stream_id_extension==0x75 && stream_id_extension<=0x7F)
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_VC1());
- }
- }
-
- if (Streams_Extension[stream_id_extension].Parsers.empty())
- {
- #if defined(MEDIAINFO_DIRAC_YES)
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_Dirac());
- #endif
- #if defined(MEDIAINFO_VC1_YES)
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_VC1());
- #endif
- #if defined(MEDIAINFO_AC3_YES)
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_AC3());
- #endif
- #if defined(MEDIAINFO_DTS_YES)
- Streams_Extension[stream_id_extension].Parsers.push_back(ChooseParser_DTS());
- #endif
- }
-
- //In case of HD part before Core part
- switch (stream_id_extension)
- {
- case 0x71 :
- case 0x76 :
- for (size_t Pos=0; Pos<Streams_Extension[0x72].Parsers.size(); Pos++)
- delete Streams_Extension[0x72].Parsers[Pos]; //Streams_Extension[0x72].Parsers[Pos]=NULL;
- Streams_Extension[0x72].Parsers.clear();
- break;
- }
-
- //Init
- for (size_t Pos=0; Pos<Streams_Extension[stream_id_extension].Parsers.size(); Pos++)
- {
- Streams_Extension[stream_id_extension].Parsers[Pos]->CA_system_ID_MustSkipSlices=CA_system_ID_MustSkipSlices;
- Open_Buffer_Init(Streams_Extension[stream_id_extension].Parsers[Pos]);
- }
- }
-
- //Demux
- #if MEDIAINFO_DEMUX
- if (Streams_Extension[stream_id_extension].Searching_Payload)
- {
- StreamIDs[StreamIDs_Size-1]=Element_Code;
- if (stream_id_extension==0x72 && !(Streams_Extension[0x71].Parsers.empty() && Streams_Extension[0x76].Parsers.empty()))
- {
- if (!Streams_Extension[0x71].Parsers.empty())
- Element_Code=0x71;
- if (!Streams_Extension[0x76].Parsers.empty())
- Element_Code=0x76;
- }
- else
- Element_Code=stream_id_extension; //The upper level ID is filled by Element_Code in the common code
- StreamIDs_Width[StreamIDs_Size]=2;
- ParserIDs[StreamIDs_Size]=MediaInfo_Parser_MpegPs_Ext;
- StreamIDs_Size++;
- if (stream_id_extension==0x72 && !(Streams_Extension[0x71].Parsers.empty() && Streams_Extension[0x76].Parsers.empty()))
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_SubStream);
- else
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- StreamIDs_Size--;
- Element_Code=StreamIDs[StreamIDs_Size-1];
- }
- #endif //MEDIAINFO_DEMUX
-
- //Parsing
- if (stream_id_extension==0x72 && !(Streams_Extension[0x71].Parsers.empty() && Streams_Extension[0x76].Parsers.empty()))
- {
- if (!Streams_Extension[0x71].Parsers.empty())
- {
- #if MEDIAINFO_EVENTS
- //Multiple substreams in 1 stream
- StreamIDs[StreamIDs_Size-1]=Element_Code;
- StreamIDs[StreamIDs_Size]=Element_Code=0x71;
- StreamIDs_Width[StreamIDs_Size]=2;
- ParserIDs[StreamIDs_Size]=MediaInfo_Parser_MpegPs_Ext;
- StreamIDs_Size++;
- #endif //MEDIAINFO_EVENTS
- xxx_stream_Parse(Streams_Extension[0x71], extension_stream_Count);
- #if MEDIAINFO_EVENTS
- StreamIDs_Size--;
- Element_Code=StreamIDs[StreamIDs_Size-1];
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- {
- Demux_StreamIsBeingParsed_type=2;
- Demux_StreamIsBeingParsed_stream_id=0x71;
- }
- #endif //MEDIAINFO_DEMUX
- }
- if (!Streams_Extension[0x76].Parsers.empty())
- {
- #if MEDIAINFO_EVENTS
- //Multiple substreams in 1 stream
- StreamIDs[StreamIDs_Size-1]=Element_Code;
- StreamIDs[StreamIDs_Size]=Element_Code=0x76;
- StreamIDs_Width[StreamIDs_Size]=2;
- ParserIDs[StreamIDs_Size]=MediaInfo_Parser_MpegPs_Ext;
- StreamIDs_Size++;
- #endif //MEDIAINFO_EVENTS
- xxx_stream_Parse(Streams_Extension[0x76], extension_stream_Count);
- #if MEDIAINFO_EVENTS
- StreamIDs_Size--;
- Element_Code=StreamIDs[StreamIDs_Size-1];
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- {
- Demux_StreamIsBeingParsed_type=2;
- Demux_StreamIsBeingParsed_stream_id=0x76;
- }
- #endif //MEDIAINFO_DEMUX
- }
- }
- else
- {
- #if MEDIAINFO_EVENTS
- //Multiple substreams in 1 stream
- StreamIDs[StreamIDs_Size-1]=Element_Code;
- StreamIDs[StreamIDs_Size]=Element_Code=stream_id_extension;
- StreamIDs_Width[StreamIDs_Size]=2;
- ParserIDs[StreamIDs_Size]=MediaInfo_Parser_MpegPs_Ext;
- StreamIDs_Size++;
- #endif //MEDIAINFO_EVENTS
- xxx_stream_Parse(Streams_Extension[stream_id_extension], extension_stream_Count);
- #if MEDIAINFO_EVENTS
- StreamIDs_Size--;
- Element_Code=StreamIDs[StreamIDs_Size-1];
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- {
- Demux_StreamIsBeingParsed_type=2;
- Demux_StreamIsBeingParsed_stream_id=stream_id_extension;
- }
- #endif //MEDIAINFO_DEMUX
- }
-}
-
-//---------------------------------------------------------------------------
-const ZenLib::Char* File_MpegPs::extension_stream_ChooseExtension()
-{
- //AC3
- if ((stream_id_extension>=0x55 && stream_id_extension<=0x5F)
- || (stream_id_extension==0x75 && stream_id_extension<=0x7F))
- return __T(".vc1");
- //AC3+
- else if (stream_id_extension>=0x60 && stream_id_extension<=0x6F)
- return __T(".dirac");
- else if (stream_id_extension==0x71)
- return private_stream_1_ChooseExtension();
- else
- return __T(".raw");
-}
-
-//***************************************************************************
-// xxx_stream helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_MpegPs::xxx_stream_Parse(ps_stream &Temp, int8u &stream_Count)
-{
- switch (stream_id)
- {
- case 0xBD :
- //case 0xBF :
- case 0xFD :
- //PTS
- if (Streams[stream_id].TimeStamp_End.PTS.TimeStamp!=(int64u)-1)
- {
- if (Streams[stream_id].Searching_TimeStamp_End)
- {
- Temp.TimeStamp_End.PTS.File_Pos=File_Offset+Buffer_Offset;
- Temp.TimeStamp_End.PTS.TimeStamp=Streams[stream_id].TimeStamp_End.PTS.TimeStamp;
- }
- if (Searching_TimeStamp_Start && Temp.Searching_TimeStamp_Start)
- {
- Temp.TimeStamp_Start.PTS.File_Pos=File_Offset+Buffer_Offset;
- Temp.TimeStamp_Start.PTS.TimeStamp=Streams[stream_id].TimeStamp_End.PTS.TimeStamp;
- Temp.Searching_TimeStamp_Start=false;
- }
- }
-
- //DTS
- if (Streams[stream_id].TimeStamp_End.DTS.TimeStamp!=(int64u)-1)
- {
- if (Streams[stream_id].Searching_TimeStamp_End)
- {
- Temp.TimeStamp_End.DTS.File_Pos=File_Offset+Buffer_Offset;
- Temp.TimeStamp_End.DTS.TimeStamp=Streams[stream_id].TimeStamp_End.DTS.TimeStamp;
- }
- if (Searching_TimeStamp_Start && Streams[stream_id].TimeStamp_End.DTS.TimeStamp!=(int64u)-1 && Temp.Searching_TimeStamp_Start)
- {
- Temp.TimeStamp_Start.DTS.TimeStamp=Streams[stream_id].TimeStamp_End.DTS.TimeStamp;
- Temp.Searching_TimeStamp_Start=false;
- }
- }
- default : ;
- }
-
- //Needed?
- if (Temp.Parsers.size()==1 && Temp.Parsers[0]->Status[IsFinished])
- {
- Skip_XX(Element_Size-Element_Offset, "data");
- return;
- }
-
- #if MEDIAINFO_TRACE
- if (stream_id==0xBD /*|| stream_id==0xBF*/)
- private_stream_1_Element_Info1();
- #endif //MEDIAINFO_TRACE
-
- for (size_t Pos=0; Pos<Temp.Parsers.size(); Pos++)
- if (Temp.Parsers[Pos] && !Temp.Parsers[Pos]->Status[IsFinished])
- {
- //PTS/DTS
- if (Temp.Parsers[Pos]->PTS_DTS_Needed)
- {
- if (FrameInfo.PCR!=(int64u)-1)
- Temp.Parsers[Pos]->FrameInfo.PCR=FrameInfo.PCR;
- if (FrameInfo.PTS!=(int64u)-1)
- Temp.Parsers[Pos]->FrameInfo.PTS=FrameInfo.PTS;
- if (FrameInfo.DTS!=(int64u)-1)
- Temp.Parsers[Pos]->FrameInfo.DTS=FrameInfo.DTS;
- }
-
- #if MEDIAINFO_TRACE
- if (Temp.Parsers.size()>1)
- Element_Begin1("Test");
- #endif //MEDIAINFO_TRACE
- #if MEDIAINFO_IBIUSAGE
- Temp.Parsers[Pos]->Ibi_SynchronizationOffset_Current=Ibi_SynchronizationOffset_Current;
- #endif //MEDIAINFO_IBIUSAGE
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- Temp.Parsers[Pos]->ServiceDescriptors=ServiceDescriptors;
- #endif
- Open_Buffer_Continue(Temp.Parsers[Pos], Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset));
- if (IsSub && Temp.Parsers[Pos]->Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded=Temp.Parsers[Pos]->Frame_Count_NotParsedIncluded;
- if (!MustExtendParsingDuration && Temp.Parsers[Pos]->MustExtendParsingDuration)
- {
- SizeToAnalyze*=4; //Normally 4 seconds, now 16 seconds
- MustExtendParsingDuration=true;
- }
- #if MEDIAINFO_TRACE
- if (Temp.Parsers.size()>1)
- Element_End0();
- #endif //MEDIAINFO_TRACE
-
- if (Temp.Parsers.size()>1)
- {
- if (!Temp.Parsers[Pos]->Status[IsAccepted] && Temp.Parsers[Pos]->Status[IsFinished])
- {
- delete *(Temp.Parsers.begin()+Pos);
- Temp.Parsers.erase(Temp.Parsers.begin()+Pos);
- Pos--;
- }
- else if (Temp.Parsers.size()>1 && Temp.Parsers[Pos]->Status[IsAccepted])
- {
- File__Analyze* Parser=Temp.Parsers[Pos];
- for (size_t Pos2=0; Pos2<Temp.Parsers.size(); Pos2++)
- {
- if (Pos2!=Pos)
- delete *(Temp.Parsers.begin()+Pos2);
- }
- Temp.Parsers.clear();
- Temp.Parsers.push_back(Parser);
- }
- }
-
- if (Temp.Parsers.size()==1 && !Temp.IsFilled && Temp.Parsers[0]->Status[IsFilled])
- {
- stream_Count--;
- Temp.IsFilled=true;
- }
-
- //Checking cases with B-frames displayed before the first I-frame
- if (Temp.Parsers.size()==1 && Temp.Parsers[0]->PTS_Begin!=(int64u)-1 && Temp.TimeStamp_Start.PTS.TimeStamp!=(int64u)-1 && float64_int64s(((float64)Temp.Parsers[0]->PTS_Begin)*90/1000000)<Temp.TimeStamp_Start.PTS.TimeStamp)
- {
- Temp.TimeStamp_Start.PTS.File_Pos=File_Offset+Buffer_Offset-Header_Size;
- Temp.TimeStamp_Start.PTS.TimeStamp=float64_int64s(((float64)Temp.Parsers[0]->PTS_Begin)*90/1000000); //TODO: same denominator for the time stamp
- }
- }
- //FrameInfo.PCR=(int64u)-1;
- FrameInfo.DTS=(int64u)-1;
- FrameInfo.PTS=(int64u)-1;
- Element_Show();
-
- #if MEDIAINFO_EVENTS
- if (FrameInfo.DTS==(int64u)-1)
- FrameInfo.DTS=FrameInfo.PTS;
-
- //New PES
- #if MEDIAINFO_DEMUX
- if (PES_FirstByte_IsAvailable && PES_FirstByte_Value)
- {
- //Demux of substream data
- if (FromTS_stream_type==0x1B && SubStream_Demux)
- {
- if (!SubStream_Demux->Buffers.empty() && SubStream_Demux->Buffers[0] && SubStream_Demux->Buffers[0]->DTS<FrameInfo.DTS)
- {
- Demux(SubStream_Demux->Buffers[0]->Buffer, SubStream_Demux->Buffers[0]->Buffer_Size, ContentType_SubStream);
- delete SubStream_Demux->Buffers[0]->Buffer; SubStream_Demux->Buffers[0]->Buffer=NULL;
- SubStream_Demux->Buffers.erase(SubStream_Demux->Buffers.begin()); //Moving 2nd Buffer to 1st position
- }
- }
- }
-
- //Demux of SubStream
- if (FromTS_stream_type==0x20 && SubStream_Demux)
- {
- //Searching an available slot
- size_t Buffers_Pos;
- if (SubStream_Demux->Buffers.empty() || SubStream_Demux->Buffers[SubStream_Demux->Buffers.size()-1]->DTS!=FrameInfo.DTS)
- {
- Buffers_Pos=SubStream_Demux->Buffers.size();
- SubStream_Demux->Buffers.push_back(new demux::buffer);
- }
- else
- {
- Buffers_Pos=SubStream_Demux->Buffers.size()-1;
- }
-
- //Filling buffer
- if (SubStream_Demux->Buffers[Buffers_Pos]->Buffer==NULL)
- {
- SubStream_Demux->Buffers[Buffers_Pos]->DTS=FrameInfo.DTS;
- SubStream_Demux->Buffers[Buffers_Pos]->Buffer_Size_Max=128*1024;
- SubStream_Demux->Buffers[Buffers_Pos]->Buffer_Size=0;
- SubStream_Demux->Buffers[Buffers_Pos]->Buffer=new int8u[SubStream_Demux->Buffers[Buffers_Pos]->Buffer_Size_Max];
- }
- if (SubStream_Demux->Buffers[Buffers_Pos]->Buffer_Size_Max>SubStream_Demux->Buffers[Buffers_Pos]->Buffer_Size+(size_t)(Element_Size-Element_Offset) && SubStream_Demux->Buffers[Buffers_Pos]->Buffer_Size_Max<=16*1024*1024)
- {
- SubStream_Demux->Buffers[Buffers_Pos]->Buffer_Size_Max*=2;
- int8u* Buffer_Demux=SubStream_Demux->Buffers[Buffers_Pos]->Buffer;
- SubStream_Demux->Buffers[Buffers_Pos]->Buffer=new int8u[SubStream_Demux->Buffers[Buffers_Pos]->Buffer_Size_Max];
- std::memcpy(SubStream_Demux->Buffers[Buffers_Pos]->Buffer, Buffer_Demux, SubStream_Demux->Buffers[Buffers_Pos]->Buffer_Size);
- delete[] Buffer_Demux; //Buffer_Demux=NULL;
- }
- if (SubStream_Demux->Buffers[Buffers_Pos]->Buffer_Size+(size_t)(Element_Size-Element_Offset)<=SubStream_Demux->Buffers[Buffers_Pos]->Buffer_Size_Max)
- {
- std::memcpy(SubStream_Demux->Buffers[Buffers_Pos]->Buffer+SubStream_Demux->Buffers[Buffers_Pos]->Buffer_Size, Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset));
- SubStream_Demux->Buffers[Buffers_Pos]->Buffer_Size+=(size_t)(Element_Size-Element_Offset);
- }
- }
- #endif //MEDIAINFO_DEMUX
- #endif //MEDIAINFO_EVENTS
-
- #if MEDIAINFO_SEEK && MEDIAINFO_IBIUSAGE
- if (Seek_ID!=(int64u)-1)
- {
- if (Ibi.Streams[Seek_ID]->IsModified)
- {
- Read_Buffer_Seek(2, Seek_Value, Seek_ID);
- }
- else if (File_Offset+Buffer_Offset>=Seek_Value_Maximal)
- {
- //No intermediate seek point found, going to previous seek point
- for (size_t Pos=1; Pos<Ibi.Streams[Seek_ID]->Infos.size(); Pos++)
- if (Ibi.Streams[Seek_ID]->Infos[Pos].StreamOffset>=Seek_Value_Maximal)
- {
- if (Ibi.Streams[Seek_ID]->IsSynchronized)
- {
- //No intermediate point is possible
- Ibi.Streams[Seek_ID]->Infos[Pos-1].IsContinuous=true;
- Read_Buffer_Seek(2, Seek_Value, Seek_ID);
- }
- else
- {
- //Going to last known seek point
- GoTo(Ibi.Streams[Seek_ID]->Infos[Pos-1].StreamOffset);
- Open_Buffer_Unsynch();
- }
- break;
- }
- }
- }
- #endif //MEDIAINFO_SEEK && MEDIAINFO_IBIUSAGE
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_MpegPs::Header_Parser_QuickSearch()
-{
- while ( Buffer_Offset+4<=Buffer_Size
- && CC3(Buffer+Buffer_Offset)==0x000001)
- {
- //Getting stream_id
- int8u stream_id=Buffer[Buffer_Offset+3];
-
- //Trace config
- #if MEDIAINFO_TRACE
- if (Config_Trace_Level)
- {
- if (stream_id==0xC0 || stream_id==0xE0)
- {
- if (!Trace_Layers[8])
- Trace_Layers_Update(8); //Stream
- }
- else
- Trace_Layers_Update(IsSub?1:0);
- }
- #endif //MEDIAINFO_TRACE
-
- //Searching start
- if (Streams[stream_id].Searching_Payload)
- {
- if (stream_id!=0xBD /*&& stream_id!=0xBF)*/ || !private_stream_1_IsDvdVideo) //Not (private_stream_1 and IsDvdVideo)
- return true;
-
- //private_stream_1 and IsDvdVideo, looking for substream ID
- if (Buffer_Offset+9>=Buffer_Size)
- return false; //Need more data
- size_t Data_Offset=Buffer[Buffer_Offset+8];
- if (Buffer_Offset+9+Data_Offset>=Buffer_Size)
- return false; //Need more data
- int8u private_stream_1_ID=Buffer[Buffer_Offset+9+Data_Offset];
- if (!Streams_Private1[private_stream_1_ID].StreamIsRegistred || Streams_Private1[private_stream_1_ID].Searching_Payload)
- return true;
- }
-
- //Searching TimeStamp_End
- if (Streams[stream_id].Searching_TimeStamp_End)
- {
- switch(stream_id)
- {
- //Element with no PES Header
- case 0xB9 : //MPEG_program_end
- case 0xBA : //pack_start
- case 0xBB : //system_header_start
- case 0xBC : //program_stream_map
- case 0xBE : //padding_stream
- case 0xBF : //private_stream_2
- case 0xF0 : //ECM
- case 0xF1 : //EMM
- case 0xF2 : //DSMCC Streams
- case 0xF8 : //ITU-T Rec. H .222.1 type E
- case 0xFF : //Program Streams directory
- break;
-
- //Element with PES Header
- default :
- if (MPEG_Version==1)
- {
- size_t Buffer_Offset_Temp=Buffer_Offset+6;
- while(Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp]==0xFF)
- {
- Buffer_Offset_Temp++;
- if (Buffer_Offset_Temp+1>=Buffer_Size)
- return false; //Not enough data
- }
- if (Buffer_Offset_Temp+1>=Buffer_Size)
- return false; //Not enough data
- if (Buffer_Offset_Temp<Buffer_Size && (Buffer[Buffer_Offset_Temp]&0xF0)!=0x00)
- return true; //With a PTS
- }
- if (MPEG_Version==2)
- {
- if (Buffer_Offset+8>Buffer_Size)
- return false; //Not enough buffer
- if ((Buffer[Buffer_Offset+7]&0xC0)!=0x00)
- return true; //With a PTS
- }
- }
- }
-
- //Getting size
- switch(stream_id)
- {
- //No size
- case 0xB9 : //MPEG_program_end
- case 0xBA : //pack_start
- Buffer_Offset+=4;
- while(Buffer_Offset+4<=Buffer_Size && !(CC3(Buffer+Buffer_Offset)==0x000001 && Buffer[Buffer_Offset+3]>=0xB9))
- {
- Buffer_Offset+=2;
- while(Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Buffer_Offset+=2;
- if (Buffer_Offset>=Buffer_Size || Buffer[Buffer_Offset-1]==0x00)
- Buffer_Offset--;
- }
- //Parsing last bytes if needed
- if (Buffer_Offset+4>Buffer_Size)
- {
- if (Buffer_Offset+3==Buffer_Size && CC3(Buffer+Buffer_Offset)!=0x000001)
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && CC2(Buffer+Buffer_Offset)!=0x0000)
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && CC1(Buffer+Buffer_Offset)!=0x00)
- Buffer_Offset++;
- }
- break;
-
- //Element with size
- default :
- if (Buffer_Offset+6>=Buffer_Size)
- return false; //Not enough data
- int16u Size=CC2(Buffer+Buffer_Offset+4);
- if (Size>0)
- {
- Buffer_Offset+=6+Size;
-
- //Trailing 0xFF
- while(Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]==0xFF)
- Buffer_Offset++;
-
- //Trailing 0x00
- while(Buffer_Offset+3<=Buffer_Size
- && Buffer[Buffer_Offset+2]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset ]==0x00)
- Buffer_Offset++;
- }
- else
- {
- Buffer_Offset+=6;
- while(Buffer_Offset+4<=Buffer_Size && !(CC3(Buffer+Buffer_Offset)==0x000001 && Buffer[Buffer_Offset+3]>=0xB9))
- Buffer_Offset++;
- if (Buffer_Offset+4>Buffer_Size)
- {
- if (Buffer_Offset+3==Buffer_Size && CC3(Buffer+Buffer_Offset)!=0x000001)
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && CC2(Buffer+Buffer_Offset)!=0x0000)
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && CC1(Buffer+Buffer_Offset)!=0x00)
- Buffer_Offset++;
- }
- }
- }
- }
-
- if (Buffer_Offset+3==Buffer_Size)
- return false; //Sync is OK, but stream_id is not available
- if (Buffer_Offset+4<=Buffer_Size)
- Trusted_IsNot("MPEG-PS, Synchronisation lost");
- Synched=false;
- return Synchronize();
-}
-
-//***************************************************************************
-// Parsers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_Mpegv()
-{
- //Filling
- #if defined(MEDIAINFO_MPEGV_YES)
- File_Mpegv* Parser=new File_Mpegv;
- Parser->MPEG_Version=MPEG_Version;
- Parser->ShouldContinueParsing=true;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Format, "MPEG Video");
- switch (FromTS_stream_type)
- {
- case 0x01 : Parser->Fill(Stream_Video, 0, Video_Codec, "MPEG-1V");
- Parser->Fill(Stream_Video, 0, Video_Format_Version, "Version 1"); break;
- case 0x02 : Parser->Fill(Stream_Video, 0, Video_Codec, "MPEG-2V");
- Parser->Fill(Stream_Video, 0, Video_Format_Version, "Version 2"); break;
- default : Parser->Fill(Stream_Video, 0, Video_Codec, "MPEG-V");
- }
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_Mpeg4v()
-{
- //Filling
- #if defined(MEDIAINFO_MPEG4V_YES)
- File_Mpeg4v* Parser=new File_Mpeg4v;
- Parser->Frame_Count_Valid=1;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Codec, "MPEG-4V");
- Parser->Fill(Stream_Video, 0, Video_Format, "MPEG-4 Visual");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_Avc()
-{
- //Filling
- #if defined(MEDIAINFO_AVC_YES)
- File_Avc* Parser=new File_Avc;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Codec, "AVC");
- Parser->Fill(Stream_Video, 0, Video_Format, "AVC");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_Hevc()
-{
- //Filling
- #if defined(MEDIAINFO_HEVC_YES)
- File_Hevc* Parser=new File_Hevc;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Codec, "HEVC");
- Parser->Fill(Stream_Video, 0, Video_Format, "HEVC");
- #endif
- return Parser;
-}
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_VC1()
-{
- //Filling
- #if defined(MEDIAINFO_VC1_YES)
- File_Vc1* Parser=new File_Vc1;
- Parser->Frame_Count_Valid=30;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Codec, "VC-1");
- Parser->Fill(Stream_Video, 0, Video_Format, "VC-1");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_Dirac()
-{
- //Filling
- #if defined(MEDIAINFO_DIRAC_YES)
- File__Analyze* Parser=new File_Dirac;
- ((File_Dirac*)Parser)->Frame_Count_Valid=1;
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Codec, "Dirac");
- Parser->Fill(Stream_Video, 0, Video_Format, "Dirac");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_Mpega()
-{
- //Filling
- #if defined(MEDIAINFO_MPEGA_YES)
- File_Mpega* Parser=new File_Mpega;
- Parser->Frame_Count_Valid=1;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "MPEG Audio");
- switch (FromTS_stream_type)
- {
- case 0x03 : Parser->Fill(Stream_Audio, 0, Audio_Codec, "MPEG-1A");
- Parser->Fill(Stream_Audio, 0, Audio_Format_Version, "Version 1"); break;
- case 0x04 : Parser->Fill(Stream_Audio, 0, Audio_Codec, "MPEG-2A");
- Parser->Fill(Stream_Audio, 0, Audio_Format_Version, "Version 2"); break;
- default : Parser->Fill(Stream_Audio, 0, Audio_Codec, "MPEG-A"); break;
- }
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_Adts()
-{
- //Filling
- #if defined(MEDIAINFO_AAC_YES)
- File_Aac* Parser=new File_Aac;
- Parser->Mode=File_Aac::Mode_ADTS;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Codec, "AAC");
- Parser->Fill(Stream_Audio, 0, Audio_Format, "AAC");
- Parser->Fill(Stream_Audio, 0, Audio_MuxingMode, "ADTS");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_Latm()
-{
- //Filling
- #if defined(MEDIAINFO_AAC_YES)
- File_Aac* Parser=new File_Aac;
- Parser->Mode=File_Aac::Mode_LATM;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Codec, "AAC");
- Parser->Fill(Stream_Audio, 0, Audio_Format, "AAC");
- Parser->Fill(Stream_Audio, 0, Audio_MuxingMode, "LATM");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_AC3()
-{
- //Filling
- #if defined(MEDIAINFO_AC3_YES)
- File_Ac3* Parser=new File_Ac3();
- Parser->Frame_Count_Valid=2; //2 frames to be sure
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, private_stream_1_ID==0x83?"E-AC-3":"AC-3");
- Parser->Fill(Stream_Audio, 0, Audio_Codec, private_stream_1_ID==0x83?"AC3+":"AC3");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_DTS()
-{
- //Filling
- #if defined(MEDIAINFO_DTS_YES)
- File__Analyze* Parser=new File_Dts();
- ((File_Dts*)Parser)->Frame_Count_Valid=2;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "DTS");
- Parser->Fill(Stream_Audio, 0, Audio_Codec, "DTS");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_SDDS()
-{
- //Filling
- #if defined(MEDIAINFO_SDDS_YES)
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, StreamPos_Last, Audio_Format, "SDDS");
- Parser->Fill(Stream_Audio, StreamPos_Last, Audio_Codec, "SDDS");
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "SDDS");
- Parser->Fill(Stream_Audio, 0, Audio_Codec, "SDDS");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_AAC()
-{
- //Filling
- #if defined(MEDIAINFO_AAC_YES)
- File_Aac* Parser=new File_Aac;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "AAC");
- Parser->Fill(Stream_Audio, 0, Audio_Codec, "AAC");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_PCM()
-{
- //Filling
- #if defined(MEDIAINFO_PCM_YES)
- File__Analyze* Parser;
- switch (FromTS_stream_type)
- {
- case 0x80 :
- Parser=new File_Pcm_M2ts();
- break;
- default :
- Parser=new File_Pcm_Vob();
- }
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "PCM");
- Parser->Fill(Stream_Audio, 0, Audio_Codec, "PCM");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_RLE()
-{
- //Filling
- #if defined(MEDIAINFO_RLE_YES)
- File__Analyze* Parser=new File_Rle();
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Text);
- Parser->Fill(Stream_Text, 0, Text_Format, "RLE");
- Parser->Fill(Stream_Text, 0, Text_Codec, "RLE");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_AribStdB24B37(bool HasCcis)
-{
- //Filling
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- File_AribStdB24B37* Parser=new File_AribStdB24B37();
- Parser->HasCcis=HasCcis;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Text);
- Parser->Fill(Stream_Text, 0, Text_Format, "ARIB STD B24/B37");
- Parser->Fill(Stream_Text, 0, Text_Codec, "ARIB STD B24/B37");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_DvbSubtitle()
-{
- //Filling
- #if defined(MEDIAINFO_DVBSUBTITLE_YES)
- File__Analyze* Parser=new File_DvbSubtitle();
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Text);
- Parser->Fill(Stream_Text, 0, Text_Format, "DVB Subtitle");
- Parser->Fill(Stream_Text, 0, Text_Codec, "DVB Subtitle");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_Teletext()
-{
- //Filling
- #if defined(MEDIAINFO_TELETEXT_YES)
- File_Teletext* Parser=new File_Teletext();
- Parser->FromMpegPs=true;
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Text);
- Parser->Fill(Stream_Text, 0, Text_Format, "Teletext");
- Parser->Fill(Stream_Text, 0, Text_Codec, "Teletext");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_PGS()
-{
- //Filling
- #if defined(MEDIAINFO_PGS_YES)
- File__Analyze* Parser=new File_Pgs();
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Text);
- Parser->Fill(Stream_Text, 0, Text_Format, "PGS");
- Parser->Fill(Stream_Text, 0, Text_Codec, "PGS");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_SmpteSt0302()
-{
- //Filling
- #if defined(MEDIAINFO_SMPTEST0302_YES)
- File_SmpteSt0302* Parser=new File_SmpteSt0302();
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Demux_UnpacketizeContainer=false; //No demux from this parser
- Demux_Level=4; //Intermediate
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "AES3");
- Parser->Fill(Stream_Audio, 0, Audio_Codec, "AES3");
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_PS2()
-{
- //Filling
- #if defined(MEDIAINFO_PS2A_YES)
- File__Analyze* Parser=new File_Ps2Audio();
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- #endif
- return Parser;
-}
-
-//---------------------------------------------------------------------------
-File__Analyze* File_MpegPs::ChooseParser_NULL()
-{
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- return Parser;
-}
-
-//***************************************************************************
-// Output_Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t File_MpegPs::Output_Buffer_Get (const String &Code)
-{
- //Parsing Parsers
- for (size_t Streams_Pos=0; Streams_Pos<Streams.size(); Streams_Pos++)
- for (size_t Pos=0; Pos<Streams[Streams_Pos].Parsers.size(); Pos++)
- if (Streams[Streams_Pos].Parsers[Pos])
- if (size_t Size=Streams[Streams_Pos].Parsers[Pos]->Output_Buffer_Get(Code))
- return Size;
-
- return 0;
-}
-
-//---------------------------------------------------------------------------
-size_t File_MpegPs::Output_Buffer_Get (size_t Pos_)
-{
- //Parsing Parsers
- for (size_t Streams_Pos=0; Streams_Pos<Streams.size(); Streams_Pos++)
- for (size_t Pos=0; Pos<Streams[Streams_Pos].Parsers.size(); Pos++)
- if (Streams[Streams_Pos].Parsers[Pos])
- if (size_t Size=Streams[Streams_Pos].Parsers[Pos]->Output_Buffer_Get(Pos_))
- return Size;
-
- return 0;
-}
-
-} //Namespace
-
-#endif //MEDIAINFO_MPEGPS_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegPs.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegPs.h
deleted file mode 100644
index c15c5a9a7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegPs.h
+++ /dev/null
@@ -1,306 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about MPEG files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_MpegPsH
-#define MediaInfo_MpegPsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/Multiple/File_Mpeg4_Descriptors.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Mpeg
-//***************************************************************************
-
-class File_MpegPs : public File__Analyze
-{
-public :
- //In
- bool FromTS; //Indicate if stream comes from TS
- int8u FromTS_stream_type; //ID from TS
- int32u FromTS_program_format_identifier; //Registration from TS
- int32u FromTS_format_identifier; //Registration from TS
- int8u FromTS_descriptor_tag; //Descriptor from TS
- int8u MPEG_Version; //MPEG Version (or automaticly detected)
- bool Searching_TimeStamp_Start;
- #ifdef MEDIAINFO_MPEG4_YES
- File__Analyze* ParserFromTs;
- File_Mpeg4_Descriptors::slconfig* SLConfig;
- #endif
- #if MEDIAINFO_DEMUX
- struct demux
- {
- struct buffer
- {
- int64u DTS;
- size_t Buffer_Size;
- size_t Buffer_Size_Max;
- int8u* Buffer;
-
- buffer()
- {
- DTS=(int64u)-1;
- Buffer_Size=0;
- Buffer_Size_Max=0;
- Buffer=NULL;
- }
-
- ~buffer()
- {
- delete[] Buffer;
- }
- };
- std::vector<buffer*> Buffers;
-
- demux()
- {
- }
-
- ~demux()
- {
- for (size_t Pos=0; Pos<Buffers.size(); Pos++)
- delete Buffers[Pos]; //Buffers[Pos]=NULL;
- }
- };
- demux* SubStream_Demux;
- int8u Demux_StreamIsBeingParsed_type;
- int8u Demux_StreamIsBeingParsed_stream_id;
- #endif //MEDIAINFO_DEMUX
- #if MEDIAINFO_SEEK
- int64u Unsynch_Frame_Count_Temp;
- #endif //MEDIAINFO_SEEK
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- bool FromAribStdB24B37;
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
-
- //Out
- bool HasTimeStamps;
-
- //Constructor/Destructor
- File_MpegPs();
- ~File_MpegPs();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Update();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin() {return FileHeader_Begin_0x000001();}
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
- void Synched_Init();
-
- //Buffer - Global
- void Read_Buffer_Init ();
- #if MEDIAINFO_ADVANCED2
- void Read_Buffer_SegmentChange();
- #endif //MEDIAINFO_ADVANCED2
- void Read_Buffer_Unsynched();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
- void Read_Buffer_Continue ();
- void Read_Buffer_AfterParsing();
-
- //Buffer - Per element
- void Header_Parse();
- bool Header_Parse_Fill_Size();
- bool Header_Parse_PES_packet(int8u stream_id);
- void Header_Parse_PES_packet_MPEG1(int8u stream_id);
- void Header_Parse_PES_packet_MPEG2(int8u stream_id);
- void Data_Parse();
- bool BookMark_Needed();
-
- //Packet
- void MPEG_program_end(); //0xB9
- void pack_start(); //0xBA
- void system_header_start(); //0xBB
- void program_stream_map(); //0xBC
- void private_stream_1(); //0xBD
- void padding_stream(); //0xBE
- void private_stream_2(); //0xBF
- void audio_stream(); //0xC0 --> 0xDF
- void video_stream(); //0xE0 --> 0xEF
- void SL_packetized_stream();//0xFA
- void extension_stream(); //0xFD
-
- //private_stream_1 specific
- bool private_stream_1_Choose_DVD_ID();
- File__Analyze* private_stream_1_ChooseParser();
- const ZenLib::Char* private_stream_1_ChooseExtension();
- #if MEDIAINFO_TRACE
- void private_stream_1_Element_Info1();
- #endif //MEDIAINFO_TRACE
- int8u private_stream_1_ID;
- size_t private_stream_1_Offset;
- bool private_stream_1_IsDvdVideo;
-
- //private_stream_2 specific
- void private_stream_2_TSHV_A0();
- void private_stream_2_TSHV_A1();
-
- //extension_stream specific
- const ZenLib::Char* extension_stream_ChooseExtension();
-
- //Count
- int8u video_stream_Count;
- int8u audio_stream_Count;
- int8u private_stream_1_Count;
- int8u private_stream_2_Count;
- int8u extension_stream_Count;
- int8u SL_packetized_stream_Count;
-
- //From packets
- int32u program_mux_rate;
-
- //PS
- struct ps_stream
- {
- struct Mpeg_TimeStamp
- {
- struct Mpeg_TimeStamp_TS
- {
- int64u File_Pos;
- int64u TimeStamp;
-
- Mpeg_TimeStamp_TS()
- {
- File_Pos=(int64u)-1;
- TimeStamp=(int64u)-1;
- }
- };
-
- Mpeg_TimeStamp_TS PTS;
- Mpeg_TimeStamp_TS DTS;
- };
-
- stream_t StreamKind;
- size_t StreamPos;
- int8u stream_type;
- int32u program_format_identifier;
- int32u format_identifier;
- int8u descriptor_tag;
- int8u DVD_Identifier;
- std::vector<File__Analyze*> Parsers; //Sometimes, we need to do parallel tests
- Mpeg_TimeStamp TimeStamp_Start;
- Mpeg_TimeStamp TimeStamp_End;
- size_t StreamIsRegistred;
- size_t StreamOrder;
- size_t FirstPacketOrder;
- bool Searching_Payload;
- bool Searching_TimeStamp_Start;
- bool Searching_TimeStamp_End;
- bool IsFilled;
-
- ps_stream()
- {
- StreamKind=Stream_Max;
- StreamPos=0;
- stream_type=0;
- program_format_identifier=0x00000000; //No info
- format_identifier=0x00000000; //No info
- descriptor_tag=0x00; //No info
- DVD_Identifier=0;
- StreamIsRegistred=0;
- StreamOrder=(size_t)-1;
- FirstPacketOrder=(size_t)-1;
- Searching_Payload=false;
- Searching_TimeStamp_Start=false;
- Searching_TimeStamp_End=false;
- IsFilled=false;
- }
-
- ~ps_stream()
- {
- for (size_t Pos=0; Pos<Parsers.size(); Pos++)
- delete Parsers[Pos]; //Parsers[Pos]=NULL;
- }
- };
- std::vector<ps_stream> Streams;
- std::vector<ps_stream> Streams_Private1; //There can have multiple streams in one private stream
- std::vector<ps_stream> Streams_Extension; //There can have multiple streams in one private stream
- int8u stream_id;
-
- //Temp
- int64u SizeToAnalyze; //Total size of a chunk to analyse, it may be changed by the parser
- int8u stream_id_extension;
- bool video_stream_Unlimited;
- int16u Buffer_DataSizeToParse;
- std::vector<int64u> video_stream_PTS;
- size_t StreamOrder_CountOfPrivateStreams_Minus1;
- size_t StreamOrder_CountOfPrivateStreams_Temp;
- size_t FirstPacketOrder_Last;
-
- //Helpers
- bool Header_Parser_QuickSearch();
-
- //Parsers
- File__Analyze* ChooseParser_Mpegv();
- File__Analyze* ChooseParser_Mpeg4v();
- File__Analyze* ChooseParser_Avc();
- File__Analyze* ChooseParser_Hevc();
- File__Analyze* ChooseParser_VC1();
- File__Analyze* ChooseParser_Dirac();
- File__Analyze* ChooseParser_Mpega();
- File__Analyze* ChooseParser_Adts();
- File__Analyze* ChooseParser_Latm();
- File__Analyze* ChooseParser_AC3();
- File__Analyze* ChooseParser_DTS();
- File__Analyze* ChooseParser_SDDS();
- File__Analyze* ChooseParser_AAC();
- File__Analyze* ChooseParser_PCM();
- File__Analyze* ChooseParser_SmpteSt0302();
- File__Analyze* ChooseParser_RLE();
- File__Analyze* ChooseParser_AribStdB24B37(bool HasCcis=false);
- File__Analyze* ChooseParser_DvbSubtitle();
- File__Analyze* ChooseParser_PGS();
- File__Analyze* ChooseParser_Teletext();
- File__Analyze* ChooseParser_PS2();
- File__Analyze* ChooseParser_NULL();
-
- //File__Analyze helpers
- enum kindofstream
- {
- KindOfStream_Main,
- KindOfStream_Private,
- KindOfStream_Extension,
- };
- void Streams_Fill_PerStream(size_t StreamID, ps_stream &Temp, kindofstream KindOfStream);
- void Streams_Finish_PerStream(size_t StreamID, ps_stream &Temp, kindofstream KindOfStream);
- void xxx_stream_Parse(ps_stream &Temp, int8u &stream_Count);
-
- //Output buffer
- size_t Output_Buffer_Get (const String &Value);
- size_t Output_Buffer_Get (size_t Pos);
-
- #if MEDIAINFO_SEEK
- std::map<int16u, int64u> Unsynch_Frame_Counts;
- int64u Seek_Value;
- int64u Seek_Value_Maximal;
- int64u Seek_ID;
- bool Duration_Detected;
- #endif //MEDIAINFO_SEEK
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegTs.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegTs.cpp
deleted file mode 100644
index db0abb821..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegTs.cpp
+++ /dev/null
@@ -1,3375 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEGTS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_MpegTs.h"
-#include "MediaInfo/Multiple/File_MpegPs.h"
-#include "MediaInfo/Multiple/File_Mpeg_Descriptors.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "MediaInfo/MediaInfo.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#include "ZenLib/File.h"
-#include <memory>
-#include <algorithm>
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
- #include "MediaInfo/MediaInfo_Events_Internal.h"
-#endif //MEDIAINFO_EVENTS
-#if MEDIAINFO_IBIUSAGE && MEDIAINFO_SEEK
- #include "MediaInfo/Multiple/File_Ibi.h"
-#endif //MEDIAINFO_IBIUSAGE && MEDIAINFO_SEEK
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-namespace Elements
-{
- const int32u HDMV=0x48444D56; //BluRay
-}
-
-
-#if !MEDIAINFO_ADVANCED
- const float64 Config_VbrDetection_Delta=0;
- const int64u Config_VbrDetection_Occurences=4;
-#endif // MEDIAINFO_ADVANCED
-
-const char* Scte128_tag (int8u tag)
-{
- switch (tag)
- {
- case 0x00: return "Forbidden";
- case 0x01: return "Used by DVB";
- case 0x02: return "AU_Information";
- case 0xDF: return "Registered";
- case 0xFF: return "Reserved";
- default : return tag<0xE0?"Reserved":"User private";
- }
-}
-//***************************************************************************
-// Depends of configuration
-//***************************************************************************
-
-#if !defined(MEDIAINFO_BDAV_YES)
- const size_t BDAV_Size=0;
-#endif
-#if !defined(MEDIAINFO_TSP_YES)
- const size_t TSP_Size=0;
-#endif
-#if !defined(MEDIAINFO_BDAV_YES) && !defined(MEDIAINFO_TSP_YES)
- const size_t TS_Size=188;
-#endif
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//From Mpeg_Psi
-extern const char* Mpeg_Descriptors_registration_format_identifier_Format(int32u format_identifier);
-extern stream_t Mpeg_Descriptors_registration_format_identifier_StreamKind(int32u format_identifier);
-
-extern const char* Mpeg_Psi_stream_type_Format(int8u stream_type, int32u format_identifier);
-extern const char* Mpeg_Psi_stream_type_Codec(int8u stream_type, int32u format_identifier);
-extern stream_t Mpeg_Psi_stream_type_StreamKind(int32u stream_type, int32u format_identifier);
-extern const char* Mpeg_Psi_stream_type_Info(int8u stream_type, int32u format_identifier);
-
-extern const char* Mpeg_Psi_table_id(int8u table_id);
-extern const char* Mpeg_Descriptors_stream_Format(int8u descriptor_tag, int32u format_identifier);
-extern const char* Mpeg_Descriptors_stream_Codec(int8u descriptor_tag, int32u format_identifier);
-extern stream_t Mpeg_Descriptors_stream_Kind(int8u descriptor_tag, int32u format_identifier);
-
-extern const char* Mpeg_Descriptors_CA_system_ID(int16u CA_system_ID);
-
-//---------------------------------------------------------------------------
-//DTS Neural (ETSI EN 300 468 v1.14+)
-const size_t MpegTs_DtsNeural_2_Count=9;
-const size_t MpegTs_DtsNeural_6_Count=4;
-
-const int8u MpegTs_DtsNeural_Channels_2[MpegTs_DtsNeural_2_Count]=
-{
- 0,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 6,
- 7,
-};
-
-const int8u MpegTs_DtsNeural_Channels_6[MpegTs_DtsNeural_6_Count]=
-{
- 0,
- 6,
- 7,
- 8,
-};
-
-const int8u MpegTs_DtsNeural_Channels(int8u Channels, int8u config_id)
-{
- if (config_id==0)
- return 0;
-
- switch (Channels)
- {
- case 2 :
- if (config_id>=MpegTs_DtsNeural_2_Count)
- return 0;
- return MpegTs_DtsNeural_Channels_2[config_id];
- case 6 :
- if (config_id>=MpegTs_DtsNeural_6_Count)
- return 0;
- return MpegTs_DtsNeural_Channels_6[config_id];
- default: return 0;
- }
-}
-
-const char* MpegTs_DtsNeural_ChannelPositions_2[MpegTs_DtsNeural_2_Count]=
-{
- "",
- "Front: L R, LFE",
- "Front: L C R, LFE",
- "Front: L R, Side: L R, LFE",
- "Front: L C R, Side: L R, LFE",
- "Front: L C R, Side: L R, Back: C, LFE",
- "Front: L C R, Side: L R, Back: L R, LFE",
- "Front: L R, Side: L R, Back: C, LFE",
- "Front: L R, Side: L R, Back: L R, LFE",
-};
-
-const char* MpegTs_DtsNeural_ChannelPositions_6[MpegTs_DtsNeural_6_Count]=
-{
- "",
- "Front: L C R, Side: L R",
- "Front: L C R, Side: L R, Back: C",
- "Front: L C R, Side: L R, Back: L R",
-};
-
-const char* MpegTs_DtsNeural_ChannelPositions(int8u Channels, int8u config_id)
-{
- if (config_id==0)
- return "";
-
- switch (Channels)
- {
- case 2 :
- if (config_id>=MpegTs_DtsNeural_2_Count)
- return "";
- return MpegTs_DtsNeural_ChannelPositions_2[config_id];
- case 6 :
- if (config_id>=MpegTs_DtsNeural_6_Count)
- return "";
- return MpegTs_DtsNeural_ChannelPositions_6[config_id];
- default: return "";
- }
-}
-
-const char* MpegTs_DtsNeural_ChannelPositions2_2[MpegTs_DtsNeural_2_Count]=
-{
- "",
- "2/0/0.1",
- "3/0/0.1",
- "2/2/0.1",
- "3/2/0.1",
- "3/2/1.1",
- "3/2/2.1",
- "2/2/1.1",
- "2/2/2.1",
-};
-
-const char* MpegTs_DtsNeural_ChannelPositions2_6[MpegTs_DtsNeural_6_Count]=
-{
- "",
- "3/2/0.1",
- "3/2/1.1",
- "3/2/2.1",
-};
-
-const char* MpegTs_DtsNeural_ChannelPositions2(int8u Channels, int8u config_id)
-{
- if (config_id==0)
- return "";
-
- switch (Channels)
- {
- case 2 :
- if (config_id>=MpegTs_DtsNeural_2_Count)
- return "";
- return MpegTs_DtsNeural_ChannelPositions2_2[config_id];
- case 6 :
- if (config_id>=MpegTs_DtsNeural_6_Count)
- return "";
- return MpegTs_DtsNeural_ChannelPositions2_6[config_id];
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-Ztring Decimal_Hexa(int64u Number)
-{
- Ztring Temp;
- Temp.From_Number(Number);
- Temp+=__T(" (0x");
- Temp+=Ztring::ToZtring(Number, 16);
- Temp+=__T(")");
- return Temp;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_MpegTs::File_MpegTs()
-#if MEDIAINFO_DUPLICATE
-:File__Duplicate()
-#endif //MEDIAINFO_DUPLICATE
-{
- //Configuration
- ParserName=__T("MpegTs");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_MpegTs;
- StreamIDs_Width[0]=4;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Level=4; //Intermediate
- #endif //MEDIAINFO_DEMUX
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
- Buffer_TotalBytes_Fill_Max=(int64u)-1; //Disabling this feature for this format, this is done in the parser
- Trusted_Multiplier=2;
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent_Accept_Specific=true;
- #endif //MEDIAINFO_DEMUX
-
- //Internal config
- #if defined(MEDIAINFO_BDAV_YES)
- BDAV_Size=0; //No BDAV header
- #endif
- #if defined(MEDIAINFO_TSP_YES)
- TSP_Size=0; //No TSP footer
- #endif
- #ifdef MEDIAINFO_ARIBSTDB24B37_YES
- FromAribStdB24B37=false;
- #endif
-
- //Data
- MpegTs_JumpTo_Begin=MediaInfoLib::Config.MpegTs_MaximumOffset_Get();
- MpegTs_JumpTo_End=MediaInfoLib::Config.MpegTs_MaximumOffset_Get()/4;
- Searching_TimeStamp_Start=true;
- Complete_Stream=NULL;
- Begin_MaxDuration=MediaInfoLib::Config.ParseSpeed_Get()>=0.8?(int64u)-1:MediaInfoLib::Config.MpegTs_MaximumScanDuration_Get()*27/1000;
- ForceStreamDisplay=MediaInfoLib::Config.MpegTs_ForceStreamDisplay_Get();
-
- #if MEDIAINFO_SEEK
- Seek_Value=(int64u)-1;
- Seek_ID=(int64u)-1;
- InfiniteLoop_Detect=0;
- Duration_Detected=false;
- #endif //MEDIAINFO_SEEK
-}
-
-File_MpegTs::~File_MpegTs ()
-{
- delete Complete_Stream; Complete_Stream=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Streams_Accept()
-{
- Fill(Stream_General, 0, General_Format, BDAV_Size?"BDAV":(TSP_Size?"MPEG-TS 188+16":"MPEG-TS"), Unlimited, true, true);
-
- #if MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- if (Config->NextPacket_Get() && Config->Event_CallBackFunction_IsSet())
- Config->Demux_EventWasSent=true;
- #endif //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
-
- if (!IsSub)
- {
- #if MEDIAINFO_ADVANCED
- // TODO: temporary disabling theses options for MPEG-TS, because it does not work as expected
- if (Config->File_IgnoreSequenceFileSize_Get())
- Config->File_IgnoreSequenceFileSize_Set(false);
- if (Config->File_IgnoreSequenceFilesCount_Get())
- Config->File_IgnoreSequenceFilesCount_Set(false);
- #endif //MEDIAINFO_ADVANCED
-
- TestContinuousFileNames();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Streams_Fill ()
-{
- Status[User_20]=true;
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Streams_Update()
-{
- if (Status[User_19])
- Streams_Update_Programs();
-
- if (Status[User_18])
- Streams_Update_EPG();
-
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- if (Status[User_16])
- Streams_Update_Duration_Update();
- #endif //MEDIAINFO_MPEGTS_PCR_YES
-
- if (Status[User_17])
- Streams_Update_Duration_End();
-
- if (File_Name.empty() && Config->ParseSpeed>=1.0)
- Fill(Stream_General, 0, General_FileSize, (File_Offset+Buffer_Offset!=File_Size)?Buffer_TotalBytes:File_Size, 10, true);
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Streams_Update_Programs()
-{
- //Per stream
- bool PerStream_AlwaysParse=ForceStreamDisplay;
- if (!PerStream_AlwaysParse)
- {
- size_t Programs_Size=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs.size();
- PerStream_AlwaysParse=true;
- if (Programs_Size<=2)
- {
- //Testing if it is a Blu-ray
- for (complete_stream::transport_stream::programs::iterator Program=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs.begin(); Program!=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs.end(); ++Program)
- if (Program->first!=0x0000 && Program->second.registration_format_identifier!=Elements::HDMV)
- {
- PerStream_AlwaysParse=false;
- break;
- }
- }
- }
- for (std::set<int16u>::iterator StreamID=Complete_Stream->PES_PIDs.begin(); StreamID!=Complete_Stream->PES_PIDs.end(); ++StreamID)
- if (PerStream_AlwaysParse || Complete_Stream->Streams[*StreamID]->IsUpdated_IsRegistered || Complete_Stream->Streams[*StreamID]->IsUpdated_Info)
- {
- Streams_Update_Programs_PerStream(*StreamID);
- Complete_Stream->Streams[*StreamID]->IsUpdated_IsRegistered=false;
- Complete_Stream->Streams[*StreamID]->IsUpdated_Info=false;
- }
-
- //Fill General
- if (Complete_Stream->transport_stream_id_IsValid)
- {
- Fill(Stream_General, 0, General_ID, Complete_Stream->transport_stream_id, 10, true);
- Fill(Stream_General, 0, General_ID_String, Decimal_Hexa(Complete_Stream->transport_stream_id), true);
- }
- if (!Complete_Stream->network_name.empty())
- {
- Fill(Stream_General, 0, General_NetworkName, Complete_Stream->network_name, true);
- Complete_Stream->network_name.clear();
- }
- if (!Complete_Stream->original_network_name.empty())
- {
- Fill(Stream_General, 0, General_OriginalNetworkName, Complete_Stream->original_network_name, true);
- Complete_Stream->original_network_name.clear();
- }
- Ztring Countries;
- Ztring TimeZones;
- for (std::map<Ztring, Ztring>::iterator TimeZone=Complete_Stream->TimeZones.begin(); TimeZone!=Complete_Stream->TimeZones.end(); ++TimeZone)
- {
- Countries+=TimeZone->first+__T(" / ");
- TimeZones+=TimeZone->second+__T(" / ");
- }
- if (!Countries.empty())
- {
- Countries.resize(Countries.size()-3);
- Fill(Stream_General, 0, General_Country, Countries, true);
- Complete_Stream->TimeZones.clear();
- }
- if (!TimeZones.empty())
- {
- TimeZones.resize(TimeZones.size()-3);
- Fill(Stream_General, 0, General_TimeZone, TimeZones, true);
- Complete_Stream->TimeZones.clear();
- }
- if (!Complete_Stream->Duration_Start.empty())
- {
- Fill(Stream_General, 0, General_Duration_Start, Complete_Stream->Duration_Start, true);
- Complete_Stream->Duration_Start.clear();
- }
- complete_stream::transport_streams::iterator Transport_Stream=Complete_Stream->transport_stream_id_IsValid?Complete_Stream->Transport_Streams.find(Complete_Stream->transport_stream_id):Complete_Stream->Transport_Streams.end();
- if (Transport_Stream!=Complete_Stream->Transport_Streams.end())
- {
- //TS info
- for (std::map<std::string, ZenLib::Ztring>::iterator Info=Transport_Stream->second.Infos.begin(); Info!=Transport_Stream->second.Infos.end(); ++Info)
- Fill(Stream_General, 0, Info->first.c_str(), Info->second, true);
- Transport_Stream->second.Infos.clear();
-
- //Per source (ATSC)
- if (Transport_Stream->second.source_id_IsValid)
- {
- complete_stream::sources::iterator Source=Complete_Stream->Sources.find(Transport_Stream->second.source_id);
- if (Source!=Complete_Stream->Sources.end())
- {
- if (!Source->second.texts.empty())
- {
- Ztring Texts;
- for (std::map<int16u, Ztring>::iterator text=Source->second.texts.begin(); text!=Source->second.texts.end(); ++text)
- Texts+=text->second+__T(" - ");
- if (!Texts.empty())
- Texts.resize(Texts.size()-3);
- Fill(Stream_General, 0, General_ServiceProvider, Texts);
- }
- }
- }
-
- //Per program
- for (complete_stream::transport_stream::programs::iterator Program=Transport_Stream->second.Programs.begin(); Program!=Transport_Stream->second.Programs.end(); ++Program)
- {
- if (Program->second.IsParsed)
- {
- //Per pid
- Ztring Languages, Codecs, Formats, StreamKinds, StreamPoss, elementary_PIDs, elementary_PIDs_String, Delay, LawRating, Title;
- for (size_t Pos=0; Pos<Program->second.elementary_PIDs.size(); Pos++)
- {
- int16u elementary_PID=Program->second.elementary_PIDs[Pos];
- if (PerStream_AlwaysParse || Complete_Stream->Streams[elementary_PID]->IsRegistered)
- {
- Ztring Format=Retrieve(Complete_Stream->Streams[elementary_PID]->StreamKind, Complete_Stream->Streams[elementary_PID]->StreamPos, Fill_Parameter(Complete_Stream->Streams[elementary_PID]->StreamKind, Generic_Format));
- if (Format.empty())
- Format=Mpeg_Psi_stream_type_Format(Complete_Stream->Streams[elementary_PID]->stream_type, Program->second.registration_format_identifier);
- if (Format.empty())
- {
- std::map<std::string, Ztring>::iterator Format_FromInfo=Complete_Stream->Streams[elementary_PID]->Infos.find("Format");
- if (Format_FromInfo!=Complete_Stream->Streams[elementary_PID]->Infos.end())
- Format=Format_FromInfo->second;
- }
- if (Format.empty())
- Program->second.HasNotDisplayableStreams=true;
- Formats+=Format+__T(" / ");
- Codecs+=Retrieve(Complete_Stream->Streams[elementary_PID]->StreamKind, Complete_Stream->Streams[elementary_PID]->StreamPos, Fill_Parameter(Complete_Stream->Streams[elementary_PID]->StreamKind, Generic_Codec))+__T(" / ");
- if (Complete_Stream->Streams[elementary_PID]->StreamKind!=Stream_Max)
- {
- StreamKinds+=Ztring::ToZtring(Complete_Stream->Streams[elementary_PID]->StreamKind);
- StreamPoss+=Ztring::ToZtring(Complete_Stream->Streams[elementary_PID]->StreamPos);
- }
- StreamKinds+=__T(" / ");
- StreamPoss+=__T(" / ");
- elementary_PIDs+=Ztring::ToZtring(elementary_PID)+__T(" / ");
- Ztring Language=Retrieve(Complete_Stream->Streams[elementary_PID]->StreamKind, Complete_Stream->Streams[elementary_PID]->StreamPos, "Language/String");
- Languages+=Language+__T(" / ");
- Ztring List_String=Decimal_Hexa(elementary_PID);
- List_String+=__T(" (");
- List_String+=Format;
- if (!Language.empty())
- {
- List_String+=__T(", ");
- List_String+=Language;
- }
- List_String+=__T(")");
- elementary_PIDs_String+=List_String+__T(" / ");
-
- if (Complete_Stream->Streams[elementary_PID]->IsPCR)
- {
- Delay=Ztring::ToZtring(((float64)Complete_Stream->Streams[elementary_PID]->TimeStamp_Start)/27000, 6);
- }
-
- //Law rating
- if (Complete_Stream->Streams[elementary_PID] && Complete_Stream->Streams[elementary_PID]->Parser)
- {
- Ztring LawRating_Temp=Complete_Stream->Streams[elementary_PID]->Parser->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating_Temp.empty())
- LawRating+=LawRating_Temp+__T(" / ");;
- Ztring Title_Temp=Complete_Stream->Streams[elementary_PID]->Parser->Retrieve(Stream_General, 0, General_Title);
- if (!Title_Temp.empty())
- Title+=Title_Temp+__T(" / ");
- }
- }
- }
-
- if (Program->second.Update_Needed_Info || Program->second.Update_Needed_IsRegistered || Program->second.Update_Needed_StreamCount || Program->second.Update_Needed_StreamPos)
- {
- if (!Transport_Stream->second.Programs.empty()
- && (Transport_Stream->second.Programs.size()>1
- || Transport_Stream->second.Programs.begin()->second.HasNotDisplayableStreams
- || !Transport_Stream->second.Programs.begin()->second.Infos.empty()
- || !Transport_Stream->second.Programs.begin()->second.DVB_EPG_Blocks.empty()
- || (Transport_Stream->second.Programs.begin()->second.source_id_IsValid && Complete_Stream->Sources.find(Transport_Stream->second.Programs.begin()->second.source_id)!=Complete_Stream->Sources.end())
- || Config->File_MpegTs_ForceMenu_Get()))
- {
- if (Program->second.StreamPos==(size_t)-1)
- {
- size_t StreamPos=(size_t)-1;
- for (size_t program_number=0; program_number<Complete_Stream->program_number_Order.size(); program_number++)
- if (Program->first<Complete_Stream->program_number_Order[program_number])
- {
- StreamPos=program_number;
- for (size_t program_number2=program_number; program_number2<Complete_Stream->program_number_Order.size(); program_number2++)
- Transport_Stream->second.Programs[Complete_Stream->program_number_Order[program_number2]].StreamPos++;
- Complete_Stream->program_number_Order.insert(Complete_Stream->program_number_Order.begin()+program_number, Program->first);
- break;
- }
- if (StreamPos==(size_t)-1)
- {
- Complete_Stream->program_number_Order.push_back(Program->first);
- }
-
- Stream_Prepare(Stream_Menu, StreamPos);
- Program->second.StreamPos=StreamPos_Last;
- }
- else
- StreamPos_Last=Program->second.StreamPos;
- Fill(Stream_Menu, StreamPos_Last, Menu_ID, Program->second.pid, 10, true);
- Fill(Stream_Menu, StreamPos_Last, Menu_ID_String, Decimal_Hexa(Program->second.pid), true);
- Fill(Stream_Menu, StreamPos_Last, Menu_MenuID, Program->first, 10, true);
- Fill(Stream_Menu, StreamPos_Last, Menu_MenuID_String, Decimal_Hexa(Program->first), true);
- Clear(Stream_Menu, StreamPos_Last, General_StreamOrder);
- for (size_t programs_List_Pos=0; programs_List_Pos<Transport_Stream->second.programs_List.size(); ++programs_List_Pos)
- if (Transport_Stream->second.programs_List[programs_List_Pos]==Program->first)
- Fill(Stream_Menu, StreamPos_Last, General_StreamOrder, programs_List_Pos);
- for (std::map<std::string, ZenLib::Ztring>::iterator Info=Program->second.Infos.begin(); Info!=Program->second.Infos.end(); ++Info)
- Fill(Stream_Menu, StreamPos_Last, Info->first.c_str(), Info->second, true);
- Program->second.Infos.clear();
- for (std::map<std::string, ZenLib::Ztring>::iterator Info=Program->second.ExtraInfos_Content.begin(); Info!=Program->second.ExtraInfos_Content.end(); ++Info)
- Fill(Stream_Menu, StreamPos_Last, Info->first.c_str(), Info->second, true);
- Program->second.ExtraInfos_Content.clear();
- for (std::map<std::string, ZenLib::Ztring>::iterator Info=Program->second.ExtraInfos_Option.begin(); Info!=Program->second.ExtraInfos_Option.end(); ++Info)
- (*Stream_More)[Stream_Menu][StreamPos_Last](Ztring().From_Local(Info->first.c_str()), Info_Options)=Info->second;
- Program->second.ExtraInfos_Option.clear();
-
- if (!Formats.empty())
- Formats.resize(Formats.size()-3);
- Fill(Stream_Menu, StreamPos_Last, Menu_Format, Formats, true);
- if (!Codecs.empty())
- Codecs.resize(Codecs.size()-3);
- Fill(Stream_Menu, StreamPos_Last, Menu_Codec, Codecs, true);
- if (!StreamKinds.empty())
- StreamKinds.resize(StreamKinds.size()-3);
- Fill(Stream_Menu, StreamPos_Last, Menu_List_StreamKind, StreamKinds, true);
- if (!elementary_PIDs_String.empty())
- elementary_PIDs_String.resize(elementary_PIDs_String.size()-3);
- Fill(Stream_Menu, StreamPos_Last, Menu_List_String, elementary_PIDs_String, true);
- if (!elementary_PIDs.empty())
- elementary_PIDs.resize(elementary_PIDs.size()-3);
- Fill(Stream_Menu, StreamPos_Last, Menu_List, elementary_PIDs, true);
- if (!StreamPoss.empty())
- StreamPoss.resize(StreamPoss.size()-3);
- Fill(Stream_Menu, StreamPos_Last, Menu_List_StreamPos, StreamPoss, true);
- if (!Languages.empty())
- Languages.resize(Languages.size()-3);
- Fill(Stream_Menu, StreamPos_Last, Menu_Language, Languages, true);
- if (!LawRating.empty())
- LawRating.resize(LawRating.size()-3);
- Fill(Stream_Menu, StreamPos_Last, "LawRating", LawRating, true);
- if (StreamPos_Last)
- Clear(Stream_General, 0, General_LawRating); //More than 1 menu, can not be in General part
- if (!Title.empty())
- Title.resize(Title.size()-3);
- Fill(Stream_Menu, StreamPos_Last, "Title", Title, true);
- if (StreamPos_Last)
- Clear(Stream_General, 0, General_Title); //More than 1 menu, can not be in General part
- }
- }
-
- //Delay
- if (Program->second.Update_Needed_IsRegistered)
- {
- switch (Count_Get(Stream_Menu))
- {
- case 0 : Fill(Stream_General, 0, General_Delay, Delay, true); break;
- default: Fill(Stream_Menu, StreamPos_Last, Menu_Delay, Delay, true); break;
- }
- Program->second.Update_Needed_IsRegistered=false;
- }
- if (Count_Get(Stream_Menu)==2)
- Clear(Stream_General, 0, General_Delay); //Not valid, multiple menus
- }
- }
- }
-
- //Commercial name
- if (Count_Get(Stream_Video)==1
- && Count_Get(Stream_Audio)==1
- && Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video")
- && Retrieve(Stream_Video, 0, Video_Format_Commercial_IfAny).find(__T("HDV"))==0
- && Retrieve(Stream_Audio, 0, Audio_Format)==__T("MPEG Audio")
- && Retrieve(Stream_Audio, 0, Audio_Format_Version)==__T("Version 1")
- && Retrieve(Stream_Audio, 0, Audio_Format_Profile)==__T("Layer 2")
- && Retrieve(Stream_Audio, 0, Audio_BitRate)==__T("384000"))
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, Retrieve(Stream_Video, 0, Video_Format_Commercial_IfAny));
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Streams_Update_Programs_PerStream(size_t StreamID)
-{
- complete_stream::stream* Temp=Complete_Stream->Streams[StreamID];
-
- //No direct handling of Sub streams;
- if (Temp->stream_type==0x20 && Temp->SubStream_pid) //Stereoscopic is not alone
- return;
-
- if (Temp->Parser)
- Temp->Parser->Open_Buffer_Update();
-
- //Merging from a previous merge
- size_t Count;
- if (Temp->StreamKind != Stream_Max && Temp->StreamPos != (size_t)-1 && Temp->Parser)
- {
- Count=1; //TODO: more than 1
- Merge(*Temp->Parser, Temp->StreamKind, 0, Temp->StreamPos);
- StreamKind_Last=Temp->StreamKind;
- StreamPos_Last=Temp->StreamPos;
- }
- else
- {
- //By the parser
- StreamKind_Last=Stream_Max;
- Count=0;
- if (Temp->Parser && Temp->Parser->Status[IsAccepted])
- {
- if (Temp->SubStream_pid!=0x0000) //With a substream
- Fill(Complete_Stream->Streams[Temp->SubStream_pid]->Parser);
- if (Temp->Parser->Count_Get(Stream_Video) && Temp->Parser->Count_Get(Stream_Text))
- {
- //Special case: Video and Text are together
- Stream_Prepare(Stream_Video);
- Count=Merge(*Temp->Parser, Stream_Video, 0, StreamPos_Last);
- }
- else
- Count=Merge(*Temp->Parser);
-
- //More from the FMC parser
- if (Temp->FMC_ES_ID_IsValid)
- {
- complete_stream::transport_stream::iod_ess::iterator IOD_ES=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].IOD_ESs.find(Temp->FMC_ES_ID);
- if (IOD_ES!=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].IOD_ESs.end() && IOD_ES->second.Parser)
- {
- Finish(IOD_ES->second.Parser);
- Count=Merge(*IOD_ES->second.Parser, StreamKind_Last, StreamPos_Last, 0);
- }
- }
-
- //LATM
- complete_stream::transport_stream::iod_ess::iterator IOD_ES=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].IOD_ESs.find(Complete_Stream->Streams[StreamID]->FMC_ES_ID);
- #ifdef MEDIAINFO_MPEG4_YES
- if (IOD_ES!=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].IOD_ESs.end() && IOD_ES->second.SLConfig && Retrieve(Stream_Audio, StreamPos_Last, Audio_MuxingMode).empty())
- Fill(Stream_Audio, StreamPos_Last, Audio_MuxingMode, "SL");
- #endif
- if (Complete_Stream->Streams[StreamID]->stream_type==0x11 && Retrieve(Stream_Audio, StreamPos_Last, Audio_MuxingMode).empty())
- Fill(Stream_Audio, StreamPos_Last, Audio_MuxingMode, "LATM");
- }
-
- //By the descriptors
- if (StreamKind_Last==Stream_Max && Complete_Stream->transport_stream_id_IsValid && !Temp->program_numbers.empty() && !Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs.empty())
- {
- int32u format_identifier=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Temp->program_numbers[0]].registration_format_identifier;
- if (Temp->IsRegistered
- && Mpeg_Descriptors_registration_format_identifier_StreamKind(format_identifier)!=Stream_Max)
- {
- StreamKind_Last=Mpeg_Descriptors_registration_format_identifier_StreamKind(format_identifier);
- Stream_Prepare(StreamKind_Last);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), Mpeg_Descriptors_registration_format_identifier_Format(format_identifier));
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), Mpeg_Descriptors_registration_format_identifier_Format(format_identifier));
- Count=1;
- }
- }
-
- //By registration_format_identifier
- if (StreamKind_Last==Stream_Max && Temp->registration_format_identifier && Temp->IsRegistered && Mpeg_Descriptors_registration_format_identifier_StreamKind(Temp->registration_format_identifier)!=Stream_Max)
- {
- StreamKind_Last=Mpeg_Descriptors_registration_format_identifier_StreamKind(Temp->registration_format_identifier);
- Stream_Prepare(StreamKind_Last);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), Mpeg_Descriptors_registration_format_identifier_Format(Temp->registration_format_identifier));
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), Mpeg_Descriptors_registration_format_identifier_Format(Temp->registration_format_identifier));
- Count=1;
- }
-
- //By the stream_type
- if (StreamKind_Last==Stream_Max && Complete_Stream->transport_stream_id_IsValid && !Temp->program_numbers.empty() && !Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs.empty())
- {
- int32u format_identifier=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Temp->program_numbers[0]].registration_format_identifier;
- if (Mpeg_Psi_stream_type_StreamKind(Temp->stream_type, format_identifier)!=Stream_Max && (Temp->IsRegistered || ForceStreamDisplay || format_identifier==Elements::HDMV))
- {
- StreamKind_Last=Mpeg_Psi_stream_type_StreamKind(Temp->stream_type, format_identifier);
- if (StreamKind_Last==Stream_General && Temp->Parser) //Only information, no streams
- {
- Merge (*Temp->Parser, Stream_General, 0, 0);
- StreamKind_Last=Stream_Max;
- }
- Stream_Prepare(StreamKind_Last);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), Mpeg_Psi_stream_type_Format(Temp->stream_type, format_identifier));
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), Mpeg_Psi_stream_type_Codec(Temp->stream_type, format_identifier));
- Count=1;
- }
- }
-
- //By the StreamKind
- if (StreamKind_Last==Stream_Max && Temp->StreamKind_FromDescriptor!=Stream_Max && (Temp->IsRegistered || ForceStreamDisplay || (!Temp->program_numbers.empty() && Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Temp->program_numbers[0]].registration_format_identifier==Elements::HDMV)))
- {
- Stream_Prepare(Temp->StreamKind_FromDescriptor);
- Count=1;
- }
- }
-
- //More info
- if (StreamKind_Last!=Stream_Max)
- {
- for (size_t StreamPos=StreamPos_Last+1-Count; StreamPos<=StreamPos_Last; StreamPos++)
- {
- Temp->StreamKind=StreamKind_Last;
- Temp->StreamPos=StreamPos;
-
- //Encryption
- if (Temp->CA_system_ID)
- Fill(StreamKind_Last, StreamPos, "Encryption", Mpeg_Descriptors_CA_system_ID(Temp->CA_system_ID));
- else if (Temp->IsScrambled>16)
- Fill(StreamKind_Last, StreamPos, "Encryption", "Encrypted");
-
- //TS info
- for (std::map<std::string, ZenLib::Ztring>::iterator Info=Temp->Infos.begin(); Info!=Temp->Infos.end(); ++Info)
- {
- if (Retrieve(StreamKind_Last, StreamPos, Info->first.c_str()).empty())
- {
- //Special case : DTS Neural
- if (StreamKind_Last==Stream_Audio && Info->first=="Matrix_ChannelPositions" && Info->second.find(__T("DTS Neural Audio "))==0)
- {
- int8u Channels=Retrieve(Stream_Audio, StreamPos, Audio_Channel_s_).To_int8u();
- if (Channels)
- {
- int8u config_id=Ztring(Info->second.substr(17, string::npos)).To_int8u();
- int8u Matrix_Channels=MpegTs_DtsNeural_Channels(Channels, config_id);
- if (Matrix_Channels)
- {
- Fill(Stream_Audio, StreamPos, Audio_Matrix_Channel_s_, Matrix_Channels);
- Fill(Stream_Audio, StreamPos, Audio_Matrix_ChannelPositions, MpegTs_DtsNeural_ChannelPositions(Channels, config_id));
- Fill(Stream_Audio, StreamPos, Audio_ChannelPositions_String2, MpegTs_DtsNeural_ChannelPositions2(Channels, config_id));
- }
- }
-
- }
- else
- Fill(StreamKind_Last, StreamPos, Info->first.c_str(), Info->second, true);
- }
- }
- Temp->Infos.clear();
- for (std::map<std::string, ZenLib::Ztring>::iterator Info=Temp->Infos_Option.begin(); Info!=Temp->Infos_Option.end(); ++Info)
- (*Stream_More)[StreamKind_Last][StreamPos](Ztring().From_Local(Info->first.c_str()), Info_Options)=Info->second;
- Temp->Infos_Option.clear();
-
- //Common
- if (Temp->SubStream_pid!=0x0000) //Wit a substream
- {
- Ztring Format_Profile=Retrieve(Stream_Video, StreamPos, Video_Format_Profile);
- Fill(Stream_Video, StreamPos, Video_ID, Ztring::ToZtring(Temp->SubStream_pid)+__T(" / ")+Ztring::ToZtring(StreamID), true);
- Fill(Stream_Video, StreamPos, Video_ID_String, Decimal_Hexa(Temp->SubStream_pid)+__T(" / ")+Decimal_Hexa(StreamID), true);
- if (!Format_Profile.empty() && Complete_Stream->Streams[Temp->SubStream_pid] && Complete_Stream->Streams[Temp->SubStream_pid]->Parser)
- Fill(Stream_Video, StreamPos, Video_Format_Profile, Complete_Stream->Streams[Temp->SubStream_pid]->Parser->Retrieve(Stream_Video, 0, Video_Format_Profile)+__T(" / ")+Format_Profile, true);
- }
- else if (Count>1 || (StreamKind_Last==Stream_Text && Retrieve(StreamKind_Last, StreamPos, General_ID).find(__T('-'))!=string::npos))
- {
- Ztring ID=Retrieve(StreamKind_Last, StreamPos, General_ID);
- size_t ID_Pos=ID.find(__T('-'));
- if (ID_Pos!=string::npos)
- ID.erase(ID.begin(), ID.begin()+ID_Pos+1); //Removing the PS part
- Ztring ID_String=Retrieve(StreamKind_Last, StreamPos, General_ID_String);
- size_t ID_String_Pos=ID_String.find(__T('-'));
- if (ID_String_Pos!=string::npos)
- ID_String.erase(ID_String.begin(), ID_String.begin()+ID_String_Pos+1); //Removing the PS part
- #ifdef MEDIAINFO_ARIBSTDB24B37_YES
- if (FromAribStdB24B37)
- {
- Fill(StreamKind_Last, StreamPos, General_ID, ID, true);
- Fill(StreamKind_Last, StreamPos, General_ID_String, ID_String, true);
- }
- else
- #endif //MEDIAINFO_ARIBSTDB24B37_YES
- {
- Fill(StreamKind_Last, StreamPos, General_ID, Ztring::ToZtring(StreamID)+__T('-')+ID, true);
- Fill(StreamKind_Last, StreamPos, General_ID_String, Decimal_Hexa(StreamID)+__T('-')+ID_String, true);
- }
- }
- else
- {
- Fill(StreamKind_Last, StreamPos, General_ID, StreamID, 10, true);
- Fill(StreamKind_Last, StreamPos, General_ID_String, Decimal_Hexa(StreamID), true);
- }
- for (size_t Pos=0; Pos<Temp->program_numbers.size(); Pos++)
- {
- Fill(StreamKind_Last, StreamPos, General_MenuID, Temp->program_numbers[Pos], 10, Pos==0);
- Fill(StreamKind_Last, StreamPos, General_MenuID_String, Decimal_Hexa(Temp->program_numbers[Pos]), Pos==0);
- }
-
- //StreamOrder
- Clear(StreamKind_Last, StreamPos, General_StreamOrder);
- for (size_t program_FromStream=0; program_FromStream<Temp->program_numbers.size(); ++program_FromStream)
- {
- int16u program_number=Temp->program_numbers[program_FromStream];
- std::vector<int16u> &programs_List=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].programs_List;
- size_t programs_List_Pos=0;
- for (; programs_List_Pos<programs_List.size(); ++programs_List_Pos)
- if (programs_List[programs_List_Pos]==program_number)
- break;
- if (programs_List_Pos<programs_List.size())
- {
- complete_stream::transport_stream::program &Program=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number];
- for (size_t elementary_PID_Pos=0; elementary_PID_Pos<Program.elementary_PIDs.size(); ++elementary_PID_Pos)
- if (Program.elementary_PIDs[elementary_PID_Pos]==StreamID)
- Fill(StreamKind_Last, StreamPos, General_StreamOrder, Ztring::ToZtring(programs_List_Pos)+__T('-')+Ztring::ToZtring(elementary_PID_Pos));
- }
- }
-
- //Special cases
- if (StreamKind_Last==Stream_Video && Temp->Parser && Temp->Parser->Count_Get(Stream_Text))
- {
- }
- }
-
- //Special cases
- if (Temp->Parser && Temp->Parser->Count_Get(Stream_Video))
- {
- //Video and Text may be together
- size_t Text_Count=Temp->Parser->Count_Get(Stream_Text);
- for (size_t Text_Pos=0; Text_Pos<Text_Count; Text_Pos++)
- {
- Ztring Parser_ID=Temp->Parser->Retrieve(Stream_Text, Text_Pos, Text_ID);
- if (Parser_ID.find(__T('-'))!=string::npos)
- Parser_ID.erase(Parser_ID.begin(), Parser_ID.begin()+Parser_ID.find(__T('-'))+1);
- Ztring ID=Retrieve(Stream_Video, Temp->StreamPos, Video_ID)+__T('-')+Parser_ID;
- Ztring ID_String=Retrieve(Stream_Video, Temp->StreamPos, Video_ID_String)+__T('-')+Parser_ID;
- StreamPos_Last=(size_t)-1;
- for (size_t Pos=0; Pos<Count_Get(Stream_Text); Pos++)
- if (Retrieve(Stream_Text, Pos, Text_ID)==ID && Retrieve(Stream_Text, Pos, "MuxingMode")==Temp->Parser->Retrieve(Stream_Text, Text_Pos, "MuxingMode"))
- {
- StreamPos_Last=Pos;
- break;
- }
- if (StreamPos_Last==(size_t)-1)
- Stream_Prepare(Stream_Text, StreamPos_Last);
- if (!IsSub)
- Fill(Stream_Text, StreamPos_Last, "MuxingMode_MoreInfo", __T("Muxed in Video #")+Ztring().From_Number(Temp->StreamPos+1), true);
- Merge(*Temp->Parser, Stream_Text, Text_Pos, StreamPos_Last);
-
- Fill(Stream_Text, StreamPos_Last, Text_ID, ID, true);
- Fill(Stream_Text, StreamPos_Last, Text_ID_String, ID_String, true);
- Fill(Stream_Text, StreamPos_Last, Text_StreamOrder, Retrieve(Stream_Video, Temp->StreamPos, Video_StreamOrder), true);
- Fill(Stream_Text, StreamPos_Last, Text_MenuID, Retrieve(Stream_Video, Temp->StreamPos, Video_MenuID), true);
- Fill(Stream_Text, StreamPos_Last, Text_MenuID_String, Retrieve(Stream_Video, Temp->StreamPos, Video_MenuID_String), true);
- Fill(Stream_Text, StreamPos_Last, Text_Duration, Retrieve(Stream_Video, Temp->StreamPos, Video_Duration), true);
- Fill(Stream_Text, StreamPos_Last, Text_Delay, Retrieve(Stream_Video, Temp->StreamPos, Video_Delay), true);
- Fill(Stream_Text, StreamPos_Last, Text_Delay_Source, Retrieve(Stream_Video, Temp->StreamPos, Video_Delay_Source), true);
- }
-
- StreamKind_Last=Temp->StreamKind;
- StreamPos_Last=Temp->StreamPos;
- }
- }
-
- //Teletext
- if (StreamKind_Last==Stream_Max)
- {
- for (std::map<int16u, complete_stream::stream::teletext>::iterator Teletext=Temp->Teletexts.begin(); Teletext!=Temp->Teletexts.end(); ++Teletext)
- {
- Stream_Prepare(Stream_Text);
- Fill(StreamKind_Last, StreamPos_Last, General_ID, Ztring::ToZtring(StreamID)+__T('-')+Ztring::ToZtring(Teletext->first), true);
- Fill(StreamKind_Last, StreamPos_Last, General_ID_String, Decimal_Hexa(StreamID)+__T('-')+Ztring::ToZtring(Teletext->first), true);
-
- for (size_t Pos=0; Pos<Temp->program_numbers.size(); Pos++)
- {
- Fill(StreamKind_Last, StreamPos_Last, General_MenuID, Temp->program_numbers[Pos], 10, Pos==0);
- Fill(StreamKind_Last, StreamPos_Last, General_MenuID_String, Decimal_Hexa(Temp->program_numbers[Pos]), Pos==0);
- }
-
- //TS info
- for (std::map<std::string, ZenLib::Ztring>::iterator Info=Teletext->second.Infos.begin(); Info!=Teletext->second.Infos.end(); ++Info)
- {
- if (Retrieve(StreamKind_Last, StreamPos_Last, Info->first.c_str()).empty())
- Fill(StreamKind_Last, StreamPos_Last, Info->first.c_str(), Info->second);
- }
- Teletext->second.Infos.clear();
- }
- }
-
- //Law rating
- if (Temp->Parser)
- {
- Ztring LawRating=Temp->Parser->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- {
- if (Count_Get(Stream_Menu))
- {
- Ztring MenuID=Retrieve(Temp->StreamKind, Temp->StreamPos, General_MenuID);
- for (size_t Pos=0; Pos<Count_Get(Stream_Menu); Pos++)
- if (Retrieve(Stream_Menu, Pos, General_MenuID)==MenuID)
- Fill(Stream_Menu, Pos, "LawRating", LawRating, true);
- }
- else
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- }
- }
-
- //Title
- if (Temp->Parser)
- {
- Ztring Title=Temp->Parser->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- {
- if (Count_Get(Stream_Menu))
- {
- Ztring MenuID=Retrieve(Temp->StreamKind, Temp->StreamPos, General_MenuID);
- for (size_t Pos=0; Pos<Count_Get(Stream_Menu); Pos++)
- if (Retrieve(Stream_Menu, Pos, General_MenuID)==MenuID)
- Fill(Stream_Menu, Pos, "Title", Title, true);
- }
- else
- Fill(Stream_General, 0, General_Title, Title);
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Streams_Update_EPG()
-{
- //EPG
- complete_stream::transport_streams::iterator Transport_Stream=Complete_Stream->transport_stream_id_IsValid?Complete_Stream->Transport_Streams.find(Complete_Stream->transport_stream_id):Complete_Stream->Transport_Streams.end();
- if (Transport_Stream==Complete_Stream->Transport_Streams.end())
- return;
-
- //Per source (ATSC)
- if (Transport_Stream->second.source_id_IsValid)
- {
- complete_stream::sources::iterator Source=Complete_Stream->Sources.find(Transport_Stream->second.source_id);
- if (Source!=Complete_Stream->Sources.end())
- {
- //EPG
- std::map<Ztring, Ztring> EPGs;
- for (complete_stream::source::atsc_epg_blocks::iterator ATSC_EPG_Block=Source->second.ATSC_EPG_Blocks.begin(); ATSC_EPG_Block!=Source->second.ATSC_EPG_Blocks.end(); ++ATSC_EPG_Block)
- for (complete_stream::source::atsc_epg_block::events::iterator Event=ATSC_EPG_Block->second.Events.begin(); Event!=ATSC_EPG_Block->second.Events.end(); ++Event)
- {
- Ztring Texts;
- for (std::map<int16u, Ztring>::iterator text=Event->second.texts.begin(); text!=Event->second.texts.end(); ++text)
- Texts+=text->second+__T(" - ");
- if (!Texts.empty())
- Texts.resize(Texts.size()-3);
- EPGs[Ztring().Date_From_Seconds_1970(Event->second.start_time+315964800-Complete_Stream->GPS_UTC_offset)]=Event->second.title+__T(" / ")+Texts+__T(" / / / ")+Event->second.duration+__T(" / ");
- }
- if (!EPGs.empty())
- {
- //Trashing old EPG
- size_t Begin=Retrieve(Stream_General, 0, General_EPG_Positions_Begin).To_int32u();
- size_t End=Retrieve(Stream_General, 0, General_EPG_Positions_End).To_int32u();
- if (Begin && End && Begin<End)
- for (size_t Pos=End-1; Pos>=Begin; Pos--)
- Clear(Stream_General, 0, Pos);
-
- //Filling
- Fill(Stream_General, 0, General_EPG_Positions_Begin, Count_Get(Stream_General, 0), 10, true);
- for (std::map<Ztring, Ztring>::iterator EPG=EPGs.begin(); EPG!=EPGs.end(); ++EPG)
- Fill(Stream_General, 0, EPG->first.To_Local().c_str(), EPG->second, true);
- Fill(Stream_General, 0, General_EPG_Positions_End, Count_Get(Stream_General, 0), 10, true);
- }
- }
- }
-
- //Per program
- if (!Transport_Stream->second.Programs.empty()
- && (Transport_Stream->second.Programs.size()>1
- || !Transport_Stream->second.Programs.begin()->second.Infos.empty()
- || !Transport_Stream->second.Programs.begin()->second.DVB_EPG_Blocks.empty()
- || Complete_Stream->Sources.find(Transport_Stream->second.Programs.begin()->second.source_id)!=Complete_Stream->Sources.end()
- || Config->File_MpegTs_ForceMenu_Get()))
- for (complete_stream::transport_stream::programs::iterator Program=Transport_Stream->second.Programs.begin(); Program!=Transport_Stream->second.Programs.end(); ++Program)
- {
- if (Program->second.IsParsed)
- {
- bool EPGs_IsUpdated=false;
- std::map<Ztring, Ztring> EPGs;
-
- //EPG - DVB
- if (Program->second.DVB_EPG_Blocks_IsUpdated)
- {
- for (complete_stream::transport_stream::program::dvb_epg_blocks::iterator DVB_EPG_Block=Program->second.DVB_EPG_Blocks.begin(); DVB_EPG_Block!=Program->second.DVB_EPG_Blocks.end(); ++DVB_EPG_Block)
- for (complete_stream::transport_stream::program::dvb_epg_block::events::iterator Event=DVB_EPG_Block->second.Events.begin(); Event!=DVB_EPG_Block->second.Events.end(); ++Event)
- if (EPGs.find(Event->second.start_time)==EPGs.end() || DVB_EPG_Block->first==0x4E) //Does not exist or "DVB - event_information_section - actual_transport_stream : return present/following"
- EPGs[Event->second.start_time]=Event->second.short_event.event_name+__T(" / ")+Event->second.short_event.text+__T(" / ")+Event->second.content+__T(" / / ")+Event->second.duration+__T(" / ")+Event->second.running_status;
- Program->second.DVB_EPG_Blocks_IsUpdated=false;
- EPGs_IsUpdated=true;
- }
-
- //EPG - ATSC
- if (Program->second.source_id_IsValid)
- {
- complete_stream::sources::iterator Source=Complete_Stream->Sources.find(Program->second.source_id);
- if (Source!=Complete_Stream->Sources.end())
- {
- if (!Source->second.texts.empty())
- {
- Ztring Texts;
- for (std::map<int16u, Ztring>::iterator text=Source->second.texts.begin(); text!=Source->second.texts.end(); ++text)
- Texts+=text->second+__T(" - ");
- if (!Texts.empty())
- Texts.resize(Texts.size()-3);
- if (Program->second.StreamPos==(size_t)-1)
- {
- Complete_Stream->program_number_Order.push_back(Program->first);
- Stream_Prepare(Stream_Menu);
- Program->second.StreamPos=StreamPos_Last;
- }
- Fill(Stream_Menu, Program->second.StreamPos, Menu_ServiceProvider, Texts, true);
- }
- if (Source->second.ATSC_EPG_Blocks_IsUpdated)
- {
- for (complete_stream::source::atsc_epg_blocks::iterator ATSC_EPG_Block=Source->second.ATSC_EPG_Blocks.begin(); ATSC_EPG_Block!=Source->second.ATSC_EPG_Blocks.end(); ++ATSC_EPG_Block)
- for (complete_stream::source::atsc_epg_block::events::iterator Event=ATSC_EPG_Block->second.Events.begin(); Event!=ATSC_EPG_Block->second.Events.end(); ++Event)
- if (Event->second.start_time!=(int32u)-1) //TODO: find the reason when start_time is not set
- {
- Ztring Texts;
- for (std::map<int16u, Ztring>::iterator text=Event->second.texts.begin(); text!=Event->second.texts.end(); ++text)
- Texts+=text->second+__T(" - ");
- if (!Texts.empty())
- Texts.resize(Texts.size()-3);
- EPGs[Ztring().Date_From_Seconds_1970(Event->second.start_time+315964800-Complete_Stream->GPS_UTC_offset)]=Event->second.title+__T(" / ")+Texts+__T(" / / / ")+Event->second.duration+__T(" / ");
- }
- Source->second.ATSC_EPG_Blocks_IsUpdated=false;
- EPGs_IsUpdated=true;
- }
- }
- }
-
- //EPG - Filling
- if (EPGs_IsUpdated)
- {
- if (Program->second.StreamPos==(size_t)-1)
- {
- Complete_Stream->program_number_Order.push_back(Program->first);
- Stream_Prepare(Stream_Menu);
- Program->second.StreamPos=StreamPos_Last;
- }
-
- Program->second.EPGs=EPGs;
- Streams_Update_EPG_PerProgram(Program);
- }
- }
- }
-
- Complete_Stream->Sources_IsUpdated=false;
- Complete_Stream->Programs_IsUpdated=false;
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Streams_Update_EPG_PerProgram(complete_stream::transport_stream::programs::iterator Program)
-{
- size_t Chapters_Pos_Begin=Retrieve(Stream_Menu, Program->second.StreamPos, Menu_Chapters_Pos_Begin).To_int32u();
- size_t Chapters_Pos_End=Retrieve(Stream_Menu, Program->second.StreamPos, Menu_Chapters_Pos_End).To_int32u();
- if (Chapters_Pos_Begin && Chapters_Pos_End)
- {
- for (size_t Pos=Chapters_Pos_End-1; Pos>=Chapters_Pos_Begin; Pos--)
- Clear(Stream_Menu, Program->second.StreamPos, Pos);
- Clear(Stream_Menu, Program->second.StreamPos, Menu_Chapters_Pos_Begin);
- Clear(Stream_Menu, Program->second.StreamPos, Menu_Chapters_Pos_End);
- }
- if (!Program->second.EPGs.empty())
- {
- Fill(Stream_Menu, Program->second.StreamPos, Menu_Chapters_Pos_Begin, Count_Get(Stream_Menu, Program->second.StreamPos), 10, true);
- for (std::map<Ztring, Ztring>::iterator EPG=Program->second.EPGs.begin(); EPG!=Program->second.EPGs.end(); ++EPG)
- Fill(Stream_Menu, Program->second.StreamPos, EPG->first.To_UTF8().c_str(), EPG->second, true);
- Fill(Stream_Menu, Program->second.StreamPos, Menu_Chapters_Pos_End, Count_Get(Stream_Menu, Program->second.StreamPos), 10, true);
- }
-}
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_MPEGTS_PCR_YES
-void File_MpegTs::Streams_Update_Duration_Update()
-{
- bool IsVbr=false;
- bool IsCbr=false;
- #if MEDIAINFO_ADVANCED
- float64 TimeStamp_InstantaneousBitRate_Min_Raw=DBL_MAX;
- float64 TimeStamp_InstantaneousBitRate_Max_Raw=0;
- int64u TimeStamp_Distance_Min=(int64u)-1;
- int64u TimeStamp_Distance_Max=0;
- int64u TimeStamp_Distance_Total=0;
- int64u TimeStamp_Distance_Count=0;
- int64u TimeStamp_HasProblems=0;
- #endif // MEDIAINFO_ADVANCED
-
- for (std::map<int16u, int16u>::iterator PCR_PID=Complete_Stream->PCR_PIDs.begin(); PCR_PID!=Complete_Stream->PCR_PIDs.end(); ++PCR_PID)
- {
- complete_stream::streams::iterator Stream=Complete_Stream->Streams.begin()+PCR_PID->first;
- if (*Stream && (*Stream)->TimeStamp_End_IsUpdated)
- {
- if ((*Stream)->TimeStamp_End<0x100000000LL*300 && (*Stream)->TimeStamp_Start>0x100000000LL*300)
- (*Stream)->TimeStamp_End+=0x200000000LL*300; //33 bits, cyclic
- if ((*Stream)->TimeStamp_Start<(*Stream)->TimeStamp_End)
- {
- int64u Duration=0;
- int64u Bytes=0;
- #if MEDIAINFO_ADVANCED
- if (Config->ParseSpeed>=1 && !(*Stream)->TimeStamp_Intermediate.empty())
- {
- Duration=(*Stream)->TimeStamp_Intermediate[0]-(*Stream)->TimeStamp_Start;
- size_t Last=(*Stream)->TimeStamp_Intermediate.size()-1;
- for (size_t Pos=1; Pos+1<Last; Pos+=2)
- Duration+=(*Stream)->TimeStamp_Intermediate[Pos+1]-(*Stream)->TimeStamp_Intermediate[Pos];
- Duration+=(*Stream)->TimeStamp_End-(*Stream)->TimeStamp_Intermediate[Last];
- }
- else
- #endif // MEDIAINFO_ADVANCED
- {
- Duration=(*Stream)->TimeStamp_End-(*Stream)->TimeStamp_Start;
- }
- Bytes=(*Stream)->TimeStamp_End_Offset-(*Stream)->TimeStamp_Start_Offset;
-
- if (Duration && Bytes)
- {
- Fill(Stream_General, 0, General_Duration, ((float64)Duration)/27000, 6, true);
- Fill(Stream_General, 0, General_OverallBitRate, Bytes*8/(((float64)Duration)/27000000), 0, true);
- }
-
- (*Stream)->TimeStamp_End_IsUpdated=false;
- (*Stream)->IsPCR_Duration=(float64)Duration;
-
- //Filling menu duration
- if (Count_Get(Stream_Menu))
- {
- complete_stream::transport_streams::iterator Transport_Stream=Complete_Stream->transport_stream_id_IsValid?Complete_Stream->Transport_Streams.find(Complete_Stream->transport_stream_id):Complete_Stream->Transport_Streams.end();
- if (Transport_Stream!=Complete_Stream->Transport_Streams.end())
- {
- //Per program
- for (size_t Pos=0; Pos<(*Stream)->program_numbers.size(); Pos++)
- {
- int16u program_number=(*Stream)->program_numbers[Pos];
- if (Transport_Stream->second.Programs[program_number].IsRegistered) //Only if the menu is already displayed
- Fill(Stream_Menu, Transport_Stream->second.Programs[program_number].StreamPos, Menu_Duration, ((float64)Duration)/27000, 6, true);
- }
- }
- }
- }
-
- if ((*Stream)->TimeStamp_InstantaneousBitRate_BitRateMode_IsVbr>=Config_VbrDetection_Occurences)
- IsVbr=true;
- if ((*Stream)->TimeStamp_InstantaneousBitRate_BitRateMode_IsCbr)
- IsCbr=true;
- #if MEDIAINFO_ADVANCED
- if (Config->ParseSpeed>=1)
- {
- if (TimeStamp_InstantaneousBitRate_Min_Raw>(*Stream)->TimeStamp_InstantaneousBitRate_Min_Raw)
- TimeStamp_InstantaneousBitRate_Min_Raw=(*Stream)->TimeStamp_InstantaneousBitRate_Min_Raw;
- if (TimeStamp_InstantaneousBitRate_Max_Raw<(*Stream)->TimeStamp_InstantaneousBitRate_Max_Raw)
- TimeStamp_InstantaneousBitRate_Max_Raw=(*Stream)->TimeStamp_InstantaneousBitRate_Max_Raw;
- TimeStamp_Distance_Total+=(*Stream)->TimeStamp_Distance_Total;
- TimeStamp_Distance_Count+=(*Stream)->TimeStamp_Distance_Count;
- if (TimeStamp_Distance_Min>(*Stream)->TimeStamp_Distance_Min)
- TimeStamp_Distance_Min=(*Stream)->TimeStamp_Distance_Min;
- if (TimeStamp_Distance_Max<(*Stream)->TimeStamp_Distance_Max)
- TimeStamp_Distance_Max=(*Stream)->TimeStamp_Distance_Max;
- TimeStamp_HasProblems+=(*Stream)->TimeStamp_HasProblems;
- }
- #endif // MEDIAINFO_ADVANCED
- }
- }
-
- if (IsVbr)
- Fill(Stream_General, 0, General_OverallBitRate_Mode, "VBR", Unlimited, true, true);
- else if (IsCbr)
- Fill(Stream_General, 0, General_OverallBitRate_Mode, "CBR", Unlimited, true, true);
- else
- Clear(Stream_General, 0, General_OverallBitRate_Mode);
- #if MEDIAINFO_ADVANCED
- if (Config->ParseSpeed>=1)
- {
- if ((IsVbr || !IsCbr) && TimeStamp_InstantaneousBitRate_Min_Raw<DBL_MAX)
- Fill(Stream_General, 0, General_OverallBitRate_Minimum, TimeStamp_InstantaneousBitRate_Min_Raw, 0, true);
- else
- Clear(Stream_General, 0, General_OverallBitRate_Minimum);
- if ((IsVbr || !IsCbr) && TimeStamp_InstantaneousBitRate_Max_Raw)
- Fill(Stream_General, 0, General_OverallBitRate_Maximum, TimeStamp_InstantaneousBitRate_Max_Raw, 0, true);
- else
- Clear(Stream_General, 0, General_OverallBitRate_Maximum);
- if (TimeStamp_Distance_Count)
- {
- Fill(Stream_General, 0, "PCR_Distance_Average", ((float64)TimeStamp_Distance_Total)/27000000/TimeStamp_Distance_Count, 9, true);
- (*Stream_More)[Stream_General][0](Ztring().From_Local("PCR_Distance_Average"), Info_Options)=__T("N NT");
- }
- if (TimeStamp_Distance_Min!=(int64u)-1)
- {
- Fill(Stream_General, 0, "PCR_Distance_Min", ((float64)TimeStamp_Distance_Min)/27000000, 9, true);
- (*Stream_More)[Stream_General][0](Ztring().From_Local("PCR_Distance_Min"), Info_Options)=__T("N NT");
- }
- if (TimeStamp_Distance_Max)
- {
- Fill(Stream_General, 0, "PCR_Distance_Max", ((float64)TimeStamp_Distance_Max)/27000000, 9, true);
- (*Stream_More)[Stream_General][0](Ztring().From_Local("PCR_Distance_Max"), Info_Options)=__T("N NT");
- }
- {
- Fill(Stream_General, 0, "PCR_Invalid_Count", TimeStamp_HasProblems, 10, true);
- (*Stream_More)[Stream_General][0](Ztring().From_Local("PCR_Invalid_Count"), Info_Options)=__T("N NT");
- }
-
- }
- #endif // MEDIAINFO_ADVANCED
-}
-#endif //MEDIAINFO_MPEGTS_PCR_YES
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Streams_Update_Duration_End()
-{
- //General
- Fill(Stream_General, 0, General_Duration_End, Complete_Stream->Duration_End, true);
-
- Complete_Stream->Duration_End_IsUpdated=false;
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Streams_Finish()
-{
- //Per stream
- for (size_t StreamID=0; StreamID<0x2000; StreamID++)
- if (Complete_Stream->Streams[StreamID]->Parser)
- {
- if (!Complete_Stream->Streams[StreamID]->Parser->Status[IsFinished])
- {
- int64u File_Size_Temp=File_Size;
- File_Size=File_Offset+Buffer_Offset+Element_Offset;
- Open_Buffer_Continue(Complete_Stream->Streams[StreamID]->Parser, Buffer, 0, false);
- File_Size=File_Size_Temp;
- Finish(Complete_Stream->Streams[StreamID]->Parser);
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return;
- #endif //MEDIAINFO_DEMUX
- }
- }
-
- #if MEDIAINFO_DUPLICATE
- File__Duplicate_Streams_Finish();
- #endif //MEDIAINFO_DUPLICATE
-
- #if MEDIAINFO_IBICREATE
- if (!IsSub && Config_Ibi_Create)
- {
- for (ibi::streams::iterator IbiStream_Temp=Ibi.Streams.begin(); IbiStream_Temp!=Ibi.Streams.end(); ++IbiStream_Temp)
- {
- if (IbiStream_Temp->second && IbiStream_Temp->second->DtsFrequencyNumerator==1000000000 && IbiStream_Temp->second->DtsFrequencyDenominator==1)
- {
- bool IsOk=true;
- for (size_t Pos=0; Pos<IbiStream_Temp->second->Infos.size(); Pos++)
- if (!IbiStream_Temp->second->Infos[Pos].IsContinuous && Pos+1!=IbiStream_Temp->second->Infos.size())
- IsOk=false;
- if (IsOk) //Only is all items are continuous (partial IBI not yet supported)
- {
- IbiStream_Temp->second->DtsFrequencyNumerator=90000;
- for (size_t Pos=0; Pos<IbiStream_Temp->second->Infos.size(); Pos++)
- {
- int64u Temp=IbiStream_Temp->second->Infos[Pos].Dts*90/1000000;
- IbiStream_Temp->second->Infos[Pos].Dts=Temp;
- }
- }
- }
- }
- }
- #endif //MEDIAINFO_IBIUSAGE
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_MpegTs::Synchronize()
-{
- //Synchronizing
- while ( Buffer_Offset+188*16+BDAV_Size*16+TSP_Size*16<=Buffer_Size
- && !(Buffer[Buffer_Offset+188* 0+BDAV_Size* 1+TSP_Size* 0]==0x47
- && Buffer[Buffer_Offset+188* 1+BDAV_Size* 2+TSP_Size* 1]==0x47
- && Buffer[Buffer_Offset+188* 2+BDAV_Size* 3+TSP_Size* 2]==0x47
- && Buffer[Buffer_Offset+188* 3+BDAV_Size* 4+TSP_Size* 3]==0x47
- && Buffer[Buffer_Offset+188* 4+BDAV_Size* 5+TSP_Size* 4]==0x47
- && Buffer[Buffer_Offset+188* 5+BDAV_Size* 6+TSP_Size* 5]==0x47
- && Buffer[Buffer_Offset+188* 6+BDAV_Size* 7+TSP_Size* 6]==0x47
- && Buffer[Buffer_Offset+188* 7+BDAV_Size* 8+TSP_Size* 7]==0x47
- && Buffer[Buffer_Offset+188* 8+BDAV_Size* 9+TSP_Size* 8]==0x47
- && Buffer[Buffer_Offset+188* 9+BDAV_Size*10+TSP_Size* 9]==0x47
- && Buffer[Buffer_Offset+188*10+BDAV_Size*11+TSP_Size*10]==0x47
- && Buffer[Buffer_Offset+188*11+BDAV_Size*12+TSP_Size*11]==0x47
- && Buffer[Buffer_Offset+188*12+BDAV_Size*13+TSP_Size*12]==0x47
- && Buffer[Buffer_Offset+188*13+BDAV_Size*14+TSP_Size*13]==0x47
- && Buffer[Buffer_Offset+188*14+BDAV_Size*15+TSP_Size*14]==0x47
- && Buffer[Buffer_Offset+188*15+BDAV_Size*16+TSP_Size*15]==0x47))
- {
- Buffer_Offset++;
- while ( Buffer_Offset+BDAV_Size+1<=Buffer_Size
- && Buffer[Buffer_Offset+BDAV_Size]!=0x47)
- Buffer_Offset++;
- }
-
- if (Buffer_Offset+188*16+BDAV_Size*16+TSP_Size*16>=Buffer_Size
- #ifdef MEDIAINFO_ARIBSTDB24B37_YES
- && !FromAribStdB24B37
- #endif
- )
- return false;
-
- //Synched is OK
- if (!Status[IsAccepted])
- {
- Accept();
- }
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_MpegTs::Synched_Test()
-{
- while (Buffer_Offset+TS_Size<=Buffer_Size)
- {
- //Synchro testing
- if (Buffer[Buffer_Offset+BDAV_Size]!=0x47)
- {
- Synched=false;
- #if MEDIAINFO_DUPLICATE
- if (File__Duplicate_Get())
- Trusted++; //We don't want to stop parsing if duplication is requested, TS is not a lot stable, normal...
- #endif //MEDIAINFO_DUPLICATE
- return true;
- }
-
- //Getting pid
- pid=(Buffer[Buffer_Offset+BDAV_Size+1]&0x1F)<<8
- | Buffer[Buffer_Offset+BDAV_Size+2];
-
- complete_stream::stream* Stream=Complete_Stream->Streams[pid];
- if (Stream->Searching)
- {
- //Trace config
- #if MEDIAINFO_TRACE
- if (Config_Trace_Level)
- {
- if (Stream->Kind==complete_stream::stream::pes)
- {
- if (!Trace_Layers[8])
- Trace_Layers_Update(8); //Stream
- }
- else
- Trace_Layers_Update(IsSub?1:0);
- }
- #endif //MEDIAINFO_TRACE
-
- payload_unit_start_indicator=(Buffer[Buffer_Offset+BDAV_Size+1]&0x40)!=0;
- if (payload_unit_start_indicator)
- {
- //Searching start
- if (Stream->Searching_Payload_Start) //payload_unit_start_indicator
- {
- if (Stream->Kind==complete_stream::stream::psi)
- {
- //Searching table_id
- size_t Version_Pos=BDAV_Size
- +4 //standart header
- +((Buffer[Buffer_Offset+BDAV_Size+3]&0x20)?(1+Buffer[Buffer_Offset+BDAV_Size+4]):0); //adaptation_field_control (adaptation) --> adaptation_field_length
- if (Version_Pos>=BDAV_Size+188)
- return true; //There is a problem with this block, accelerated parsing disabled
- Version_Pos+=1+Buffer[Buffer_Offset+Version_Pos]; //pointer_field
- if (Version_Pos>=BDAV_Size+188)
- return true; //There is a problem with this block, accelerated parsing disabled
- int8u table_id=Buffer[Buffer_Offset+Version_Pos]; //table_id
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- Stream->Element_Info1=Mpeg_Psi_table_id(table_id);
- #endif //MEDIAINFO_TRACE
- if (table_id==0xCD) //specifc case for ATSC STT
- {
- if (Config_Trace_TimeSection_OnlyFirstOccurrence)
- {
- if (!TimeSection_FirstOccurrenceParsed)
- TimeSection_FirstOccurrenceParsed=true;
- #if MEDIAINFO_TRACE
- else
- {
- Trace_Layers.reset(); //We do not want to display data about other occurences
- Trace_Layers_Update();
- }
- #endif //MEDIAINFO_TRACE
- }
- return true; //Version has no meaning
- }
- #if MEDIAINFO_IBIUSAGE
- if (table_id==0x00)
- Complete_Stream->Streams[pid]->Ibi_SynchronizationOffset_BeginOfFrame=File_Offset+Buffer_Offset;
- if (table_id==0x02)
- Complete_Stream->Streams[pid]->Ibi_SynchronizationOffset_BeginOfFrame=Complete_Stream->Streams[0x0000]->Ibi_SynchronizationOffset_BeginOfFrame;
- #endif //MEDIAINFO_IBIUSAGE
- complete_stream::stream::table_ids::iterator Table_ID=Stream->Table_IDs.begin()+table_id;
- if (*Table_ID)
- {
- //Searching table_id_extension, version_number, section_number
- if (!(Buffer[Buffer_Offset+Version_Pos+1]&0x80)) //section_syntax_indicator
- {
- if (table_id==0x70 && Config_Trace_TimeSection_OnlyFirstOccurrence)
- {
- if (!TimeSection_FirstOccurrenceParsed)
- TimeSection_FirstOccurrenceParsed=true;
- #if MEDIAINFO_TRACE
- else
- {
- Trace_Layers.reset(); //We do not want to display data about other occurences
- Trace_Layers_Update();
- }
- #endif //MEDIAINFO_TRACE
- }
- return true; //No version
- }
- Version_Pos+=3; //Header size
- if (Version_Pos+5>=BDAV_Size+188)
- return true; //Not able to detect version (too far)
- int16u table_id_extension=(Buffer[Buffer_Offset+Version_Pos]<<8)|Buffer[Buffer_Offset+Version_Pos+1];
- int8u version_number=(Buffer[Buffer_Offset+Version_Pos+2]&0x3F)>>1;
- int8u section_number=Buffer[Buffer_Offset+Version_Pos+3];
- complete_stream::stream::table_id::table_id_extensions::iterator Table_ID_Extension=(*Table_ID)->Table_ID_Extensions.find(table_id_extension);
- if (Table_ID_Extension==(*Table_ID)->Table_ID_Extensions.end())
- {
- if ((*Table_ID)->Table_ID_Extensions_CanAdd)
- {
- (*Table_ID)->Table_ID_Extensions[table_id_extension].version_number=version_number;
- (*Table_ID)->Table_ID_Extensions[table_id_extension].Section_Numbers.resize(0x100);
- (*Table_ID)->Table_ID_Extensions[table_id_extension].Section_Numbers[section_number]=true;
- return true; //table_id_extension is not yet parsed
- }
- }
- else if (Table_ID_Extension->second.version_number!=version_number)
- {
- if (Table_ID_Extension->second.version_number!=(int8u)-1 && Config_Trace_TimeSection_OnlyFirstOccurrence)
- break;
- Table_ID_Extension->second.version_number=version_number;
- Table_ID_Extension->second.Section_Numbers.clear();
- Table_ID_Extension->second.Section_Numbers.resize(0x100);
- Table_ID_Extension->second.Section_Numbers[section_number]=true;
- return true; //version is different
- }
- else if (!Table_ID_Extension->second.Section_Numbers[section_number])
- {
- Table_ID_Extension->second.Section_Numbers[section_number]=true;
- return true; //section is not yet parsed
- }
- else if (table_id==0x02 && Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs_NotParsedCount)
- {
- //PMT is looping, so this is nearly sure that all PMT available in the stream are assigned
- #ifdef MEDIAINFO_MPEGTS_ALLSTREAMS_YES
- for (size_t pid=0x10; pid<0x1FFF; pid++) //Wanting 0x10-->0x2F (DVB), 0x1ABC (cea_osd), 0x1FF7-->0x1FFF (ATSC)
- for (size_t Table_ID=0x00; Table_ID<0xFF; Table_ID++)
- {
- Complete_Stream->Streams[pid]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[pid]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[pid]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[pid]->Table_IDs[Table_ID]=new complete_stream::stream::table_id; //event_information_section - actual_transport_stream, schedule
-
- if (Pos==0x001F)
- Pos=0x1ABB; //Skipping normal data
- if (Pos==0x01ABC)
- Pos=0x1FF6; //Skipping normal data
- }
- #else //MEDIAINFO_MPEGTS_ALLSTREAMS_YES
- if (Complete_Stream->Streams[0x0010]->Kind==complete_stream::stream::unknown)
- {
- Complete_Stream->Streams[0x0010]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x0010]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[0x0010]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[0x0010]->Table_IDs[0x40]=new complete_stream::stream::table_id; //network_information_section - actual_network
- }
- if (Complete_Stream->Streams[0x0011]->Kind==complete_stream::stream::unknown)
- {
- Complete_Stream->Streams[0x0011]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x0011]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[0x0011]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[0x0011]->Table_IDs[0x42]=new complete_stream::stream::table_id; //service_description_section - actual_transport_stream
- }
- if (Complete_Stream->Streams[0x0012]->Kind==complete_stream::stream::unknown)
- {
- Complete_Stream->Streams[0x0012]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x0012]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[0x0012]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[0x0012]->Table_IDs[0x4E]=new complete_stream::stream::table_id; //event_information_section - actual_transport_stream, present/following
- for (size_t Table_ID=0x50; Table_ID<0x60; Table_ID++)
- Complete_Stream->Streams[0x0012]->Table_IDs[Table_ID]=new complete_stream::stream::table_id; //event_information_section - actual_transport_stream, schedule
- }
- if (Complete_Stream->Streams[0x0014]->Kind==complete_stream::stream::unknown)
- {
- Complete_Stream->Streams[0x0014]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x0014]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[0x0014]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[0x0014]->Table_IDs[0x70]=new complete_stream::stream::table_id; //time_date_section
- Complete_Stream->Streams[0x0014]->Table_IDs[0x73]=new complete_stream::stream::table_id; //time_offset_section
- }
- if (Complete_Stream->Streams[0x1FFB]->Kind==complete_stream::stream::unknown)
- {
- Complete_Stream->Streams[0x1FFB]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x1FFB]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[0x1FFB]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[0x1FFB]->Table_IDs[0xC7]=new complete_stream::stream::table_id; //Master Guide Table
- Complete_Stream->Streams[0x1FFB]->Table_IDs[0xCD]=new complete_stream::stream::table_id; //System Time Table
- }
- #endif //MEDIAINFO_MPEGTS_ALLSTREAMS_YES
- }
- }
- }
- else
- return true; //No version in this pid
- }
- }
-
- //Searching continue and parser timestamp
- if (Stream->Searching_Payload_Continue
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- || Stream->Searching_ParserTimeStamp_Start
- || Stream->Searching_ParserTimeStamp_End
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- )
- return true;
-
- //Adaptation layer
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- if (( Stream->Searching_TimeStamp_Start
- || Stream->Searching_TimeStamp_End)
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- && !Stream->Searching_ParserTimeStamp_End
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- )
- {
- if ((Buffer[Buffer_Offset+BDAV_Size+3]&0x20)==0x20) //adaptation_field_control (adaptation)
- {
- int8u adaptation_field_length=Buffer[Buffer_Offset+BDAV_Size+4];
- if (adaptation_field_length>=5) //adaptation_field_length
- {
- bool discontinuity_indicator=(Buffer[Buffer_Offset+BDAV_Size+5]&0x80)!=0;
- bool PCR_flag=(Buffer[Buffer_Offset+BDAV_Size+5]&0x10)!=0;
- if (PCR_flag)
- {
- int64u program_clock_reference=( (((int64u)Buffer[Buffer_Offset+BDAV_Size+6])<<25)
- | (((int64u)Buffer[Buffer_Offset+BDAV_Size+7])<<17)
- | (((int64u)Buffer[Buffer_Offset+BDAV_Size+8])<< 9)
- | (((int64u)Buffer[Buffer_Offset+BDAV_Size+9])<< 1)
- | (((int64u)Buffer[Buffer_Offset+BDAV_Size+10])>>7));
- program_clock_reference*=300;
- program_clock_reference+=( (((int64u)Buffer[Buffer_Offset+BDAV_Size+10]&0x01)<<8)
- | (((int64u)Buffer[Buffer_Offset+BDAV_Size+11]) ));
- if (Complete_Stream->Streams[pid]->Searching_TimeStamp_End
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- && (!Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_End
- || Complete_Stream->Streams[pid]->IsPCR) //If PCR, we always want it.
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- )
- {
- Header_Parse_Events_Duration(program_clock_reference);
- if (program_clock_reference!=Complete_Stream->Streams[pid]->TimeStamp_End) //Some PCRs are buggy (low precision), using the first stream offset in the case of duplicate PCR value
- {
- if (Complete_Stream->Streams[pid]->TimeStamp_End_Offset!=(int64u)-1)
- {
- if (program_clock_reference+0x12c00000000LL<Complete_Stream->Streams[pid]->TimeStamp_End)
- program_clock_reference+=0x25800000000LL; //33 bits and *300
- if (!discontinuity_indicator && program_clock_reference>Complete_Stream->Streams[pid]->TimeStamp_End && program_clock_reference<Complete_Stream->Streams[pid]->TimeStamp_End+10*27000000) //Not before, not after 10 seconds, else there is a problem
- {
- float64 Duration_InstantaneousBitRate_Min=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End-(Config_VbrDetection_Delta?0:810));
- float64 Duration_InstantaneousBitRate_Max=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End+(Config_VbrDetection_Delta?0:810));
- float64 Bytes_InstantaneousBitRate=(float64)(File_Offset+Buffer_Offset-Complete_Stream->Streams[pid]->TimeStamp_End_Offset);
- float64 TimeStamp_InstantaneousBitRate_Current_Min=Bytes_InstantaneousBitRate*8/Duration_InstantaneousBitRate_Max*27000000*(1-Config_VbrDetection_Delta);
- float64 TimeStamp_InstantaneousBitRate_Current_Raw=Bytes_InstantaneousBitRate*8/Duration_InstantaneousBitRate_Min*27000000;
- float64 TimeStamp_InstantaneousBitRate_Current_Max=Bytes_InstantaneousBitRate*8/Duration_InstantaneousBitRate_Min*27000000*(1+Config_VbrDetection_Delta);
- if (Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Min)
- {
- if (TimeStamp_InstantaneousBitRate_Current_Max<Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Min || TimeStamp_InstantaneousBitRate_Current_Min>Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Max)
- {
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_BitRateMode_IsVbr++;
- #if MEDIAINFO_ADVANCED
- if (Config_VbrDetection_GiveUp && Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_BitRateMode_IsVbr>=Config_VbrDetection_Occurences)
- Config->ParseSpeed=0;
- #endif // MEDIAINFO_ADVANCED
- }
- else
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_BitRateMode_IsCbr++;
- }
- float64 Duration_Min=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End-1);
- float64 Duration_Raw=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End);
- float64 Duration_Max=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End+1);
- float64 Bytes=(float64)(File_Offset+Buffer_Offset-Complete_Stream->Streams[pid]->TimeStamp_End_Offset);
- float64 TimeStamp_Min=Bytes*8/Duration_Max*27000000*(1-Config_VbrDetection_Delta);
- float64 TimeStamp_Raw=Bytes*8/Duration_Raw*27000000;
- float64 TimeStamp_Max=Bytes*8/Duration_Min*27000000*(1+Config_VbrDetection_Delta);
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Min=TimeStamp_Min;
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Raw=TimeStamp_Raw;
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Max=TimeStamp_Max;
- #if MEDIAINFO_ADVANCED
- if (Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Min_Raw>TimeStamp_InstantaneousBitRate_Current_Raw)
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Min_Raw=TimeStamp_InstantaneousBitRate_Current_Raw;
- if (Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Max_Raw<TimeStamp_InstantaneousBitRate_Current_Raw)
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Max_Raw=TimeStamp_InstantaneousBitRate_Current_Raw;
- int64u Distance=program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End;
- if (Complete_Stream->Streams[pid]->TimeStamp_Distance_Min>Distance)
- Complete_Stream->Streams[pid]->TimeStamp_Distance_Min=Distance;
- if (Complete_Stream->Streams[pid]->TimeStamp_Distance_Max<Distance)
- Complete_Stream->Streams[pid]->TimeStamp_Distance_Max=Distance;
- Complete_Stream->Streams[pid]->TimeStamp_Distance_Total+=Distance;
- Complete_Stream->Streams[pid]->TimeStamp_Distance_Count++;
- #endif // MEDIAINFO_ADVANCED
- }
- #if MEDIAINFO_ADVANCED
- else
- {
- if (!discontinuity_indicator)
- Complete_Stream->Streams[pid]->TimeStamp_HasProblems++;
- float64 Bytes=(float64)(File_Offset+Buffer_Offset-Complete_Stream->Streams[pid]->TimeStamp_End_Offset);
- int64u TimeToAdd;
- if (Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Raw)
- TimeToAdd=float64_int64s(Bytes*8/Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Raw*27000000);
- else
- TimeToAdd=0;
- Complete_Stream->Streams[pid]->TimeStamp_Intermediate.push_back(Complete_Stream->Streams[pid]->TimeStamp_End+TimeToAdd);
- Complete_Stream->Streams[pid]->TimeStamp_Intermediate.push_back(program_clock_reference);
- }
- #endif // MEDIAINFO_ADVANCED
- }
- Complete_Stream->Streams[pid]->TimeStamp_End=program_clock_reference;
- Complete_Stream->Streams[pid]->TimeStamp_End_IsUpdated=true;
- Complete_Stream->Streams[pid]->TimeStamp_End_Offset=File_Offset+Buffer_Offset;
- {
- Status[IsUpdated]=true;
- Status[User_16]=true;
- }
- }
- }
- if (Complete_Stream->Streams[pid]->Searching_TimeStamp_Start)
- {
- //This is the first PCR
- Complete_Stream->Streams[pid]->TimeStamp_Start=program_clock_reference;
- Complete_Stream->Streams[pid]->TimeStamp_Start_Offset=File_Offset+Buffer_Offset;
- Complete_Stream->Streams[pid]->TimeStamp_End=program_clock_reference;
- Complete_Stream->Streams[pid]->TimeStamp_End_IsUpdated=true;
- Complete_Stream->Streams[pid]->TimeStamp_End_Offset=File_Offset+Buffer_Offset;
- Complete_Stream->Streams[pid]->Searching_TimeStamp_Start_Set(false);
- Complete_Stream->Streams[pid]->Searching_TimeStamp_End_Set(true);
- Complete_Stream->Streams_With_StartTimeStampCount++;
- {
- Status[IsUpdated]=true;
- Status[User_16]=true;
- }
- }
-
- //Test if we can find the TS bitrate
- if (!Complete_Stream->Streams[pid]->EndTimeStampMoreThanxSeconds && Complete_Stream->Streams[pid]->TimeStamp_Start!=(int64u)-1
- && (File_Offset+Buffer_Offset-Buffer_TotalBytes_FirstSynched)*2<File_Size)
- {
- if (program_clock_reference<Complete_Stream->Streams[pid]->TimeStamp_Start)
- program_clock_reference+=0x200000000LL*300; //33 bits, cyclic
- if ((program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_Start)>Begin_MaxDuration)
- {
- Complete_Stream->Streams[pid]->EndTimeStampMoreThanxSeconds=true;
- Complete_Stream->Streams_With_EndTimeStampMoreThanxSecondsCount++;
- if (Complete_Stream->Streams_NotParsedCount
- && Complete_Stream->Streams_With_StartTimeStampCount>0
- && Complete_Stream->Streams_With_StartTimeStampCount==Complete_Stream->Streams_With_EndTimeStampMoreThanxSecondsCount)
- {
- //We are already parsing 16 seconds (for all PCRs), we don't hope to have more info
- MpegTs_JumpTo_Begin=File_Offset+Buffer_Offset-Buffer_TotalBytes_FirstSynched;
- MpegTs_JumpTo_End=MpegTs_JumpTo_Begin;
- if (MpegTs_JumpTo_Begin+MpegTs_JumpTo_End>=File_Size)
- {
- if (MpegTs_JumpTo_Begin+MpegTs_JumpTo_End>File_Size)
- {
- MpegTs_JumpTo_Begin=File_Size;
- MpegTs_JumpTo_End=0;
- }
- else
- MpegTs_JumpTo_Begin=File_Size-MpegTs_JumpTo_End;
- }
- }
- }
- }
- }
- }
- }
- }
- #endif //MEDIAINFO_MPEGTS_PCR_YES
- }
-
- #if MEDIAINFO_DUPLICATE
- if (Stream->ShouldDuplicate)
- {
- Element_Size=TS_Size;
- File__Duplicate_Write();
- }
- #endif //MEDIAINFO_DUPLICATE
-
- Header_Parse_Events();
-
- Buffer_Offset+=TS_Size;
- }
-
- if (File_Offset+Buffer_Size>=File_Size)
- Detect_EOF(); //for TRP files
-
- return false; //Not enough data
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Synched_Init()
-{
- //Config->File_Filter_Set(462);
- //Default values
- Complete_Stream=new complete_stream;
- Complete_Stream->Streams.resize(0x2000);
- for (size_t StreamID=0; StreamID<0x2000; StreamID++)
- Complete_Stream->Streams[StreamID]=new complete_stream::stream;
- Complete_Stream->Streams[0x0000]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x0000]->Kind=complete_stream::stream::psi; // Program Association Table
- Complete_Stream->Streams[0x0000]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[0x0000]->Table_IDs[0x00]=new complete_stream::stream::table_id; // program_association_section
- Complete_Stream->Streams[0x0001]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x0001]->Kind=complete_stream::stream::psi; // Conditional Access Table
- Complete_Stream->Streams[0x0001]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[0x0001]->Table_IDs[0x01]=new complete_stream::stream::table_id; // CA_section
- Complete_Stream->Streams[0x0002]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x0002]->Kind=complete_stream::stream::psi; // Transport Stream Description Table
- Complete_Stream->Streams[0x0002]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[0x0003]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x0003]->Kind=complete_stream::stream::psi; // IPMP Control Information Table
- Complete_Stream->Streams[0x0003]->Table_IDs.resize(0x100);
-
- //Temp
- MpegTs_JumpTo_Begin=(File_Offset_FirstSynched==(int64u)-1?0:Buffer_TotalBytes_LastSynched)+MediaInfoLib::Config.MpegTs_MaximumOffset_Get();
- MpegTs_JumpTo_End=MediaInfoLib::Config.MpegTs_MaximumOffset_Get()/4;
- Buffer_TotalBytes_LastSynched=Buffer_TotalBytes_FirstSynched;
- if (MpegTs_JumpTo_Begin==(int64u)-1 || MpegTs_JumpTo_Begin+MpegTs_JumpTo_End>=File_Size)
- {
- if (MpegTs_JumpTo_Begin+MpegTs_JumpTo_End>File_Size)
- {
- MpegTs_JumpTo_Begin=File_Size;
- MpegTs_JumpTo_End=0;
- }
- else
- MpegTs_JumpTo_Begin=File_Size-MpegTs_JumpTo_End;
- }
-
- //Config
- Config_Trace_TimeSection_OnlyFirstOccurrence=MediaInfoLib::Config.Trace_TimeSection_OnlyFirstOccurrence_Get();
- TimeSection_FirstOccurrenceParsed=false;
- #if MEDIAINFO_ADVANCED
- Config_VbrDetection_Delta=MediaInfoLib::Config.MpegTs_VbrDetection_Delta_Get();
- Config_VbrDetection_Occurences=MediaInfoLib::Config.MpegTs_VbrDetection_Occurences_Get();
- Config_VbrDetection_GiveUp=MediaInfoLib::Config.MpegTs_VbrDetection_GiveUp_Get();
- #endif // MEDIAINFO_ADVANCED
-
- #ifdef MEDIAINFO_ARIBSTDB24B37_YES
- if (FromAribStdB24B37)
- {
- #if MEDIAINFO_EVENTS
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- SetAllToPES();
- }
- #endif //MEDIAINFO_ARIBSTDB24B37_YES
-
- //Continue, again, for Duplicate and Filter
- Option_Manage();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Read_Buffer_Unsynched()
-{
- if (Complete_Stream==NULL || Complete_Stream->Streams.empty())
- return;
-
- for (size_t StreamID=0; StreamID<0x2000; StreamID++)//std::map<int64u, stream>::iterator Stream=Streams.begin(); Stream!=Streams.end(); Stream++)
- {
- //End timestamp is out of date
- #if defined(MEDIAINFO_MPEGTS_PCR_YES) || defined(MEDIAINFO_MPEGTS_PESTIMESTAMP_YES)
- Complete_Stream->Streams[StreamID]->Searching_TimeStamp_Start_Set(false); //No more searching start
- Complete_Stream->Streams[StreamID]->TimeStamp_End=(int64u)-1;
- Complete_Stream->Streams[StreamID]->TimeStamp_End_IsUpdated=false;
- Complete_Stream->Streams[StreamID]->TimeStamp_End_Offset=(int64u)-1;
- if (Complete_Stream->Streams[StreamID]->TimeStamp_Start!=(int64u)-1)
- Complete_Stream->Streams[StreamID]->Searching_TimeStamp_End_Set(true); //Searching only for a start found
- #endif //defined(MEDIAINFO_MPEGTS_PCR_YES) || defined(MEDIAINFO_MPEGTS_PESTIMESTAMP_YES)
- if (Complete_Stream->Streams[StreamID]->Parser)
- {
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- Complete_Stream->Streams[StreamID]->Searching_ParserTimeStamp_Start_Set(false); //No more searching start
- if (((File_MpegPs*)Complete_Stream->Streams[StreamID]->Parser)->HasTimeStamps)
- Complete_Stream->Streams[StreamID]->Searching_ParserTimeStamp_End_Set(true); //Searching only for a start found
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- if (File_GoTo==0)
- Complete_Stream->Streams[StreamID]->Parser->Unsynch_Frame_Count=0;
- Complete_Stream->Streams[StreamID]->Parser->Open_Buffer_Unsynch();
- }
- #if MEDIAINFO_IBIUSAGE
- Complete_Stream->Streams[StreamID]->Ibi_SynchronizationOffset_BeginOfFrame=(int64u)-1;
- for (complete_stream::stream::table_ids::iterator TableID=Complete_Stream->Streams[StreamID]->Table_IDs.begin(); TableID!=Complete_Stream->Streams[StreamID]->Table_IDs.end(); ++TableID)
- if (*TableID)
- for (complete_stream::stream::table_id::table_id_extensions::iterator TableIdExtension=(*TableID)->Table_ID_Extensions.begin(); TableIdExtension!=(*TableID)->Table_ID_Extensions.end(); ++TableIdExtension)
- TableIdExtension->second.version_number=(int8u)-1;
- #endif //MEDIAINFO_IBIUSAGE
- }
- Complete_Stream->Duration_End.clear();
-
- //Clearing durations
- Clear(Stream_General, 0, General_Duration);
- Clear(Stream_General, 0, General_Duration_End);
- for (size_t StreamPos=0; StreamPos<Count_Get(Stream_Menu); StreamPos++)
- Clear(Stream_Menu, StreamPos, Menu_Duration);
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Read_Buffer_Continue()
-{
- if (!IsSub)
- {
- if (Config->ParseSpeed>=1.0)
- Config->State_Set(((float)Buffer_TotalBytes)/File_Size);
- else if (Buffer_TotalBytes>MpegTs_JumpTo_Begin+MpegTs_JumpTo_End)
- Config->State_Set((float)0.99); //Nearly the end
- else
- Config->State_Set(((float)Buffer_TotalBytes)/(MpegTs_JumpTo_Begin+MpegTs_JumpTo_End));
- }
-
- #if MEDIAINFO_DEMUX
- if (Complete_Stream && pid<0x2000 && Complete_Stream->Streams[pid]->Kind==complete_stream::stream::pes && Complete_Stream->Streams[pid]->Parser && ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->Demux_StreamIsBeingParsed_type!=(int8u)-1)
- {
- Open_Buffer_Continue(Complete_Stream->Streams[pid]->Parser, Buffer, 0, false);
- PES_Parse_Finish();
- }
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Read_Buffer_AfterParsing()
-{
- if (Complete_Stream==NULL)
- return; //No synchronization yet
-
- if (!Status[IsFilled])
- {
- //Test if parsing of headers is OK
- if ((Complete_Stream->Streams_NotParsedCount==0 && (Complete_Stream->NoPatPmt || (Complete_Stream->transport_stream_id_IsValid && Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs_NotParsedCount==0)))
- || (Buffer_TotalBytes-Buffer_TotalBytes_FirstSynched>=MpegTs_JumpTo_Begin && Config->ParseSpeed<0.8)
- || File_Offset+Buffer_Size==File_Size)
- {
- //Test if PAT/PMT are missing (ofen in .trp files)
- if (!Complete_Stream->transport_stream_id_IsValid
- && !Complete_Stream->NoPatPmt)
- {
- //Activating all streams as PES
- SetAllToPES();
- Fill(Stream_General, 0, General_Format_Profile, "No PAT/PMT");
- Buffer_TotalBytes=0;
- Buffer_TotalBytes_LastSynched=(int64u)-1;
- Open_Buffer_Unsynch();
- GoTo(0);
- return;
- }
-
- //Filling
- for (std::set<int16u>::iterator StreamID=Complete_Stream->PES_PIDs.begin(); StreamID!=Complete_Stream->PES_PIDs.end(); ++StreamID)
- {
- if (Complete_Stream->Streams[*StreamID]->Parser)
- {
- Fill(Complete_Stream->Streams[*StreamID]->Parser);
-
- Complete_Stream->Streams[*StreamID]->Parser->Status[IsUpdated]=false;
- Complete_Stream->Streams[*StreamID]->IsUpdated_Info=true;
- }
-
- for (size_t Pos=0; Pos<Complete_Stream->Streams[*StreamID]->program_numbers.size(); Pos++)
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Complete_Stream->Streams[*StreamID]->program_numbers[Pos]].Update_Needed_IsRegistered=true;
- }
- Complete_Stream->Streams_NotParsedCount=0;
- Fill();
-
- //Deactivating
- if (Config->File_StopSubStreamAfterFilled_Get())
- for (std::set<int16u>::iterator StreamID=Complete_Stream->PES_PIDs.begin(); StreamID!=Complete_Stream->PES_PIDs.end(); ++StreamID)
- {
- Complete_Stream->Streams[*StreamID]->Searching_Payload_Start_Set(false);
- Complete_Stream->Streams[*StreamID]->Searching_Payload_Continue_Set(false);
- }
-
- //Status
- Status[IsUpdated]=true;
- Status[User_19]=true;
-
- //
- if (!(Buffer_TotalBytes-Buffer_TotalBytes_FirstSynched>=MpegTs_JumpTo_Begin && Config->ParseSpeed<0.8))
- {
- //We are already parsing 16 seconds (for all PCRs), we don't hope to have more info
- MpegTs_JumpTo_Begin=File_Offset+Buffer_Offset-Buffer_TotalBytes_FirstSynched;
- MpegTs_JumpTo_End=MpegTs_JumpTo_Begin;
- if (MpegTs_JumpTo_Begin+MpegTs_JumpTo_End>=File_Size)
- {
- if (MpegTs_JumpTo_Begin+MpegTs_JumpTo_End>File_Size)
- {
- MpegTs_JumpTo_Begin=File_Size;
- MpegTs_JumpTo_End=0;
- }
- else
- MpegTs_JumpTo_Begin=File_Size-MpegTs_JumpTo_End;
- }
- }
-
- //Jumping
- if (Config->ParseSpeed<1.0 && Config->File_IsSeekable_Get()
- #if MEDIAINFO_ADVANCED
- && (!Config->File_IgnoreSequenceFileSize_Get() || Config->File_Names_Pos!=Config->File_Names.size()) // TODO: temporary disabling theses options for MPEG-TS (see above), because it does not work as expected
- #endif //MEDIAINFO_ADVANCED
- && File_Offset+Buffer_Size<File_Size-MpegTs_JumpTo_End && MpegTs_JumpTo_End)
- {
- #if !defined(MEDIAINFO_MPEGTS_PCR_YES) && !defined(MEDIAINFO_MPEGTS_PESTIMESTAMP_YES)
- GoToFromEnd(47); //TODO: Should be changed later (when Finalize stuff will be split)
- #else //!defined(MEDIAINFO_MPEGTS_PCR_YES) && !defined(MEDIAINFO_MPEGTS_PESTIMESTAMP_YES)
- GoToFromEnd(MpegTs_JumpTo_End);
- Searching_TimeStamp_Start=false;
- #endif //!defined(MEDIAINFO_MPEGTS_PCR_YES) && !defined(MEDIAINFO_MPEGTS_PESTIMESTAMP_YES)
- Open_Buffer_Unsynch();
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_MpegTs::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- //Reset
- Seek_Value=(int64u)-1;
- Seek_ID=(int64u)-1;
- InfiniteLoop_Detect=0;
- #if MEDIAINFO_DEMUX
- Config->Demux_IsSeeking=false;
- #endif //MEDIAINFO_DEMUX
-
- //Init
- if (!Duration_Detected)
- {
- //External IBI
- #if MEDIAINFO_IBIUSAGE
- std::string IbiFile=Config->Ibi_Get();
- if (!IbiFile.empty())
- {
- Ibi.Streams.clear(); //TODO: support IBI data from different inputs
-
- File_Ibi MI;
- Open_Buffer_Init(&MI, IbiFile.size());
- MI.Ibi=&Ibi;
- MI.Open_Buffer_Continue((const int8u*)IbiFile.c_str(), IbiFile.size());
- }
- //Creating base IBI from a quick analysis of the file
- else
- {
- MediaInfo_Internal MI;
- MI.Option(__T("File_KeepInfo"), __T("1"));
- Ztring ParseSpeed_Save=MI.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI.Option(__T("Demux_Get"), __T(""));
- MI.Option(__T("ParseSpeed"), __T("0"));
- MI.Option(__T("Demux"), Ztring());
- Config->File_Names.Separator_Set(0, ",");
- Ztring File_Names=Config->File_Names.Read();
- MI.Option(__T("File_FileNameFormat"), __T("CSV"));
- size_t MiOpenResult=MI.Open(File_Names);
- MI.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (!MiOpenResult)
- return (size_t)-1;
- for (ibi::streams::iterator IbiStream_Temp=((File_MpegTs*)MI.Info)->Ibi.Streams.begin(); IbiStream_Temp!=((File_MpegTs*)MI.Info)->Ibi.Streams.end(); ++IbiStream_Temp)
- {
- if (Ibi.Streams[IbiStream_Temp->first]==NULL)
- Ibi.Streams[IbiStream_Temp->first]=new ibi::stream(*IbiStream_Temp->second);
- Ibi.Streams[IbiStream_Temp->first]->Unsynch();
- for (size_t Pos=0; Pos<IbiStream_Temp->second->Infos.size(); Pos++)
- {
- Ibi.Streams[IbiStream_Temp->first]->Add(IbiStream_Temp->second->Infos[Pos]);
- if (!IbiStream_Temp->second->Infos[Pos].IsContinuous)
- Ibi.Streams[IbiStream_Temp->first]->Unsynch();
- }
- Ibi.Streams[IbiStream_Temp->first]->Unsynch();
- }
- if (Ibi.Streams.empty())
- return 4; //Problem during IBI file parsing
- }
- #endif //#if MEDIAINFO_IBIUSAGE
-
- Duration_Detected=true;
- }
-
- //Parsing
- switch (Method)
- {
- case 0 :
- GoTo(Value);
- Open_Buffer_Unsynch();
- return 1;
- case 1 :
- GoTo(File_Size*Value/10000);
- Open_Buffer_Unsynch();
- return 1;
- case 2 : //Timestamp
- #if MEDIAINFO_IBIUSAGE
- {
- ibi::streams::iterator IbiStream_Temp;
- if (ID==(int64u)-1)
- IbiStream_Temp=Ibi.Streams.begin();
- else
- IbiStream_Temp=Ibi.Streams.find(ID);
- if (IbiStream_Temp==Ibi.Streams.end() || IbiStream_Temp->second->Infos.empty())
- {
- for (IbiStream_Temp=Ibi.Streams.begin(); IbiStream_Temp!=Ibi.Streams.end(); ++IbiStream_Temp)
- if (!IbiStream_Temp->second->Infos.empty())
- break;
-
- if (IbiStream_Temp==Ibi.Streams.end())
- return 5; //Invalid ID
- }
-
- if (!(IbiStream_Temp->second->DtsFrequencyNumerator==1000000000 && IbiStream_Temp->second->DtsFrequencyDenominator==1))
- {
- float64 ValueF=(float64)Value;
- ValueF/=1000000000; //Value is in ns
- ValueF/=IbiStream_Temp->second->DtsFrequencyDenominator;
- ValueF*=IbiStream_Temp->second->DtsFrequencyNumerator;
- Value=float64_int64s(ValueF);
- }
-
- for (size_t Pos=0; Pos<IbiStream_Temp->second->Infos.size(); Pos++)
- {
- if (Value<=IbiStream_Temp->second->Infos[Pos].Dts || Pos+1==IbiStream_Temp->second->Infos.size())
- {
- if (Value<IbiStream_Temp->second->Infos[Pos].Dts && Pos)
- Pos--;
-
- //Checking continuity of Ibi
- if (!IbiStream_Temp->second->Infos[Pos].IsContinuous && Pos+1<IbiStream_Temp->second->Infos.size() && InfiniteLoop_Detect<8) //With infinite loop detect
- {
- InfiniteLoop_Detect++;
- Config->Demux_IsSeeking=true;
- Seek_Value=Value;
- Seek_Value_Maximal=IbiStream_Temp->second->Infos[Pos+1].StreamOffset;
- Seek_ID=IbiStream_Temp->first;
- GoTo((IbiStream_Temp->second->Infos[Pos].StreamOffset+IbiStream_Temp->second->Infos[Pos+1].StreamOffset)/2);
- Open_Buffer_Unsynch();
-
- return 1;
- }
-
- InfiniteLoop_Detect=0;
- Config->Demux_IsSeeking=false;
- if (Complete_Stream && Complete_Stream->Streams[(size_t)IbiStream_Temp->first] && Complete_Stream->Streams[(size_t)IbiStream_Temp->first]->Parser)
- Complete_Stream->Streams[(size_t)IbiStream_Temp->first]->Parser->Unsynch_Frame_Count=IbiStream_Temp->second->Infos[Pos].FrameNumber;
- else
- Unsynch_Frame_Counts[(int16u)IbiStream_Temp->first]=IbiStream_Temp->second->Infos[Pos].FrameNumber;
-
- GoTo(IbiStream_Temp->second->Infos[Pos].StreamOffset);
- Open_Buffer_Unsynch();
-
- return 1;
- }
- }
-
- return 2; //Invalid value
- }
- #else //MEDIAINFO_IBIUSAGE
- return (size_t)-2; //Not supported / IBI disabled
- #endif //MEDIAINFO_IBIUSAGE
- case 3 : //FrameNumber
- #if MEDIAINFO_IBIUSAGE
- {
- ibi::streams::iterator IbiStream_Temp;
- if (ID==(int64u)-1)
- IbiStream_Temp=Ibi.Streams.begin();
- else
- IbiStream_Temp=Ibi.Streams.find(ID);
- if (IbiStream_Temp==Ibi.Streams.end() || IbiStream_Temp->second->Infos.empty())
- {
- for (IbiStream_Temp=Ibi.Streams.begin(); IbiStream_Temp!=Ibi.Streams.end(); ++IbiStream_Temp)
- if (!IbiStream_Temp->second->Infos.empty())
- break;
-
- if (IbiStream_Temp==Ibi.Streams.end())
- return 5; //Invalid ID
- }
-
- for (size_t Pos=0; Pos<IbiStream_Temp->second->Infos.size(); Pos++)
- {
- if (Value<=IbiStream_Temp->second->Infos[Pos].FrameNumber || Pos+1==IbiStream_Temp->second->Infos.size())
- {
- if (Value<IbiStream_Temp->second->Infos[Pos].FrameNumber && Pos)
- Pos--;
-
- Config->Demux_IsSeeking=false;
- if (Complete_Stream && Complete_Stream->Streams[(size_t)IbiStream_Temp->first] && Complete_Stream->Streams[(size_t)IbiStream_Temp->first]->Parser)
- Complete_Stream->Streams[(size_t)IbiStream_Temp->first]->Parser->Unsynch_Frame_Count=IbiStream_Temp->second->Infos[Pos].FrameNumber;
- else
- Unsynch_Frame_Counts[(int16u)IbiStream_Temp->first]=IbiStream_Temp->second->Infos[Pos].FrameNumber;
-
- GoTo(IbiStream_Temp->second->Infos[Pos].StreamOffset);
- Open_Buffer_Unsynch();
-
- return 1;
- }
- }
-
- return 2; //Invalid value
- }
- #else //MEDIAINFO_IBIUSAGE
- return (size_t)-2; //Not supported / IBI disabled
- #endif //MEDIAINFO_IBIUSAGE
- default : return (size_t)-1; //Not supported
- }
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_MpegTs::FileHeader_Begin()
-{
- if (Buffer_Size<8)
- return false; //Wait for more data
-
- //False positives detection: detect some headers from other files, DV parser is not smart enough
- if (CC8(Buffer+Buffer_Offset)==0x444C472056312E30LL //DLG
- || CC4(Buffer)==0x52494646 //RIFF
- || CC4(Buffer+4)==0x66747970 //ftyp
- || CC4(Buffer+4)==0x66726565 //free
- || CC4(Buffer+4)==0x6D646174 //mdat
- || CC4(Buffer+4)==0x6D6F6F76 //moov
- || CC4(Buffer+4)==0x736B6970 //skip
- || CC4(Buffer+4)==0x77696465 //wide
- || CC4(Buffer)==0x060E2B34) //MXF begin
- {
- Reject("MPEG-TS");
- return true;
- }
-
- //Configuring
- #if defined(MEDIAINFO_BDAV_YES) || defined(MEDIAINFO_TSP_YES)
- TS_Size=188
- #if defined(MEDIAINFO_BDAV_YES)
- +BDAV_Size
- #endif
- #if defined(MEDIAINFO_TSP_YES)
- +TSP_Size
- #endif
- ;
- #endif
-
- //Configuration
- Option_Manage();
-
- return true;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Header_Parse()
-{
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- //Parsing
- bool adaptation, payload;
- if (BDAV_Size)
- Skip_B4( "BDAV"); //BDAV supplement
- Skip_B1( "sync_byte");
- BS_Begin();
- Skip_SB( "transport_error_indicator");
- Get_SB ( payload_unit_start_indicator, "payload_unit_start_indicator");
- Skip_SB( "transport_priority");
- Get_S2 (13, pid, "pid");
- Get_S1 ( 2, transport_scrambling_control, "transport_scrambling_control");
- Get_SB ( adaptation, "adaptation_field_control (adaptation)");
- Get_SB ( payload, "adaptation_field_control (payload)");
- Skip_S1( 4, "continuity_counter");
- BS_End();
-
- //Info
- /* Trace: used to display program number(s)
- if (!Complete_Stream->Streams[pid]->program_numbers.empty())
- {
- Ztring Program_Numbers;
- for (size_t Pos=0; Pos<Complete_Stream->Streams[pid]->program_numbers.size(); Pos++)
- Program_Numbers+=Ztring::ToZtring_From_CC2(Complete_Stream->Streams[pid]->program_numbers[Pos])+__T('/');
- if (!Program_Numbers.empty())
- Program_Numbers.resize(Program_Numbers.size()-1);
- Data_Info(Program_Numbers);
- }
- else
- Data_Info(" ");
- */
- Data_Info(Complete_Stream->Streams[pid]->Element_Info1);
-
- //Adaptation
- if (adaptation)
- Header_Parse_AdaptationField();
- else
- {
- }
-
- //Data
- if (payload)
- {
- //Encryption
- if (transport_scrambling_control>0)
- Complete_Stream->Streams[pid]->IsScrambled++;
- }
- else if (Element_Offset<TS_Size)
- Skip_XX(TS_Size-Element_Offset, "Junk");
-
- //Filling
- Header_Fill_Code(pid, __T("0x")+Ztring().From_CC2(pid));
- Header_Fill_Size(TS_Size);
-
- Header_Parse_Events();
- }
- else
- {
- #endif //MEDIAINFO_TRACE
- //Parsing
- payload_unit_start_indicator=(Buffer[Buffer_Offset+BDAV_Size+1]&0x40)!=0;
- transport_scrambling_control= Buffer[Buffer_Offset+BDAV_Size+3]&0xC0;
- bool adaptation= (Buffer[Buffer_Offset+BDAV_Size+3]&0x20)!=0;
- bool payload= (Buffer[Buffer_Offset+BDAV_Size+3]&0x10)!=0;
- Element_Offset+=BDAV_Size+4;
-
- //Adaptation
- if (adaptation)
- Header_Parse_AdaptationField();
- else
- {
- }
-
- //Data
- if (payload)
- {
- //Encryption
- if (transport_scrambling_control>0)
- Complete_Stream->Streams[pid]->IsScrambled++;
- }
-
- //Filling
- /*Element[1].Next=File_Offset+Buffer_Offset+TS_Size; //*/Header_Fill_Size(TS_Size);
- //Element[1].IsComplete=true; //Header_Fill_Size(TS_Size);
-
- Header_Parse_Events();
- #if MEDIAINFO_TRACE
- }
- #endif //MEDIAINFO_TRACE
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Header_Parse_AdaptationField()
-{
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- int64u Element_Pos_Save=Element_Offset;
- Element_Begin1("adaptation_field");
- int8u adaptation_field_length;
- Get_B1 (adaptation_field_length, "adaptation_field_length");
- if (adaptation_field_length>188-4-1) //TS size - header - adaptation_field_length
- {
- adaptation_field_length=188-4-1;
- Skip_XX(188-4-1, "stuffing_bytes");
- }
- else if (adaptation_field_length>0)
- {
- bool discontinuity_indicator, PCR_flag, OPCR_flag, splicing_point_flag, transport_private_data_flag, adaptation_field_extension_flag;
- BS_Begin();
- Get_SB ( discontinuity_indicator, "discontinuity_indicator");
- Skip_SB( "random_access_indicator");
- Skip_SB( "elementary_stream_priority_indicator");
- Get_SB ( PCR_flag, "PCR_flag");
- Get_SB ( OPCR_flag, "OPCR_flag");
- Get_SB ( splicing_point_flag, "splicing_point_flag");
- Get_SB ( transport_private_data_flag, "transport_private_data_flag");
- Get_SB ( adaptation_field_extension_flag, "adaptation_field_extension_flag");
- BS_End();
- if (PCR_flag)
- {
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- BS_Begin();
- int64u program_clock_reference_base;
- int16u program_clock_reference_extension;
- Get_S8 (33, program_clock_reference_base, "program_clock_reference_base"); Param_Info_From_Milliseconds(program_clock_reference_base/90);
- Data_Info_From_Milliseconds(program_clock_reference_base/90);
- Skip_S1( 6, "reserved");
- Get_S2 ( 9, program_clock_reference_extension, "program_clock_reference_extension");
- int64u program_clock_reference=program_clock_reference_base*300+program_clock_reference_extension;
- Param_Info1(program_clock_reference);
- BS_End();
- if (Complete_Stream->Streams[pid]->Searching_TimeStamp_End
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- && (!Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_End
- || Complete_Stream->Streams[pid]->IsPCR) //If PCR, we always want it.
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- )
- {
- Header_Parse_Events_Duration(program_clock_reference);
- if (program_clock_reference!=Complete_Stream->Streams[pid]->TimeStamp_End) //Some PCRs are buggy (low precision), using the first stream offset in the case of duplicate PCR value
- {
- if (Complete_Stream->Streams[pid]->TimeStamp_End_Offset!=(int64u)-1)
- {
- if (program_clock_reference+0x12c00000000LL<Complete_Stream->Streams[pid]->TimeStamp_End)
- program_clock_reference+=0x25800000000LL; //33 bits and *300
- if (!discontinuity_indicator && program_clock_reference>Complete_Stream->Streams[pid]->TimeStamp_End && program_clock_reference<Complete_Stream->Streams[pid]->TimeStamp_End+10*27000000) //Not before, not after 10 seconds, else there is a problem
- {
- float64 Duration_InstantaneousBitRate_Min=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End-(Config_VbrDetection_Delta?0:810));
- float64 Duration_InstantaneousBitRate_Max=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End+(Config_VbrDetection_Delta?0:810));
- float64 Bytes_InstantaneousBitRate=(float64)(File_Offset+Buffer_Offset-Complete_Stream->Streams[pid]->TimeStamp_End_Offset);
- float64 TimeStamp_InstantaneousBitRate_Current_Min=Bytes_InstantaneousBitRate*8/Duration_InstantaneousBitRate_Max*27000000*(1-Config_VbrDetection_Delta);
- float64 TimeStamp_InstantaneousBitRate_Current_Raw=Bytes_InstantaneousBitRate*8/Duration_InstantaneousBitRate_Min*27000000;
- float64 TimeStamp_InstantaneousBitRate_Current_Max=Bytes_InstantaneousBitRate*8/Duration_InstantaneousBitRate_Min*27000000*(1+Config_VbrDetection_Delta);
- if (Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Min)
- {
- if (TimeStamp_InstantaneousBitRate_Current_Max<Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Min || TimeStamp_InstantaneousBitRate_Current_Min>Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Max)
- {
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_BitRateMode_IsVbr++;
- #if MEDIAINFO_ADVANCED
- if (Config_VbrDetection_GiveUp && Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_BitRateMode_IsVbr>=Config_VbrDetection_Occurences)
- Config->ParseSpeed=0;
- #endif // MEDIAINFO_ADVANCED
- }
- else
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_BitRateMode_IsCbr++;
- }
- float64 Duration_Min=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End-1);
- float64 Duration_Raw=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End);
- float64 Duration_Max=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End+1);
- float64 Bytes=(float64)(File_Offset+Buffer_Offset-Complete_Stream->Streams[pid]->TimeStamp_End_Offset);
- float64 TimeStamp_Min=Bytes*8/Duration_Max*27000000*(1-Config_VbrDetection_Delta);
- float64 TimeStamp_Raw=Bytes*8/Duration_Raw*27000000;
- float64 TimeStamp_Max=Bytes*8/Duration_Min*27000000*(1+Config_VbrDetection_Delta);
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Min=TimeStamp_Min;
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Raw=TimeStamp_Raw;
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Max=TimeStamp_Max;
- #if MEDIAINFO_ADVANCED
- if (Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Min_Raw>TimeStamp_InstantaneousBitRate_Current_Raw)
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Min_Raw=TimeStamp_InstantaneousBitRate_Current_Raw;
- if (Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Max_Raw<TimeStamp_InstantaneousBitRate_Current_Raw)
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Max_Raw=TimeStamp_InstantaneousBitRate_Current_Raw;
- int64u Distance=program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End;
- if (Complete_Stream->Streams[pid]->TimeStamp_Distance_Min>Distance)
- Complete_Stream->Streams[pid]->TimeStamp_Distance_Min=Distance;
- if (Complete_Stream->Streams[pid]->TimeStamp_Distance_Max<Distance)
- Complete_Stream->Streams[pid]->TimeStamp_Distance_Max=Distance;
- Complete_Stream->Streams[pid]->TimeStamp_Distance_Total+=Distance;
- Complete_Stream->Streams[pid]->TimeStamp_Distance_Count++;
- #endif // MEDIAINFO_ADVANCED
- }
- #if MEDIAINFO_ADVANCED
- else
- {
- if (!discontinuity_indicator)
- Complete_Stream->Streams[pid]->TimeStamp_HasProblems++;
- float64 Bytes=(float64)(File_Offset+Buffer_Offset-Complete_Stream->Streams[pid]->TimeStamp_End_Offset);
- int64u TimeToAdd;
- if (Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Raw)
- TimeToAdd=float64_int64s(Bytes*8/Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Raw*27000000);
- else
- TimeToAdd=0;
- Complete_Stream->Streams[pid]->TimeStamp_Intermediate.push_back(Complete_Stream->Streams[pid]->TimeStamp_End+TimeToAdd);
- Complete_Stream->Streams[pid]->TimeStamp_Intermediate.push_back(program_clock_reference);
- }
- #endif // MEDIAINFO_ADVANCED
- }
- Complete_Stream->Streams[pid]->TimeStamp_End=program_clock_reference;
- Complete_Stream->Streams[pid]->TimeStamp_End_IsUpdated=true;
- Complete_Stream->Streams[pid]->TimeStamp_End_Offset=File_Offset+Buffer_Offset;
- {
- Status[IsUpdated]=true;
- Status[User_16]=true;
- }
- }
- }
- if (Complete_Stream->Streams[pid]->Searching_TimeStamp_Start)
- {
- //This is the first PCR
- Complete_Stream->Streams[pid]->TimeStamp_Start=program_clock_reference;
- Complete_Stream->Streams[pid]->TimeStamp_Start_Offset=File_Offset+Buffer_Offset;
- Complete_Stream->Streams[pid]->TimeStamp_End=program_clock_reference;
- Complete_Stream->Streams[pid]->TimeStamp_End_IsUpdated=true;
- Complete_Stream->Streams[pid]->TimeStamp_End_Offset=File_Offset+Buffer_Offset;
- Complete_Stream->Streams[pid]->Searching_TimeStamp_Start_Set(false);
- Complete_Stream->Streams[pid]->Searching_TimeStamp_End_Set(true);
- Complete_Stream->Streams_With_StartTimeStampCount++;
- {
- Status[IsUpdated]=true;
- Status[User_16]=true;
- }
- }
-
- //Test if we can find the TS bitrate
- if (!Complete_Stream->Streams[pid]->EndTimeStampMoreThanxSeconds && Complete_Stream->Streams[pid]->TimeStamp_Start!=(int64u)-1
- && (File_Offset+Buffer_Offset-Buffer_TotalBytes_FirstSynched)*2<File_Size)
- {
- if (program_clock_reference<Complete_Stream->Streams[pid]->TimeStamp_Start)
- program_clock_reference+=0x200000000LL*300; //33 bits, cyclic
- if ((program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_Start)>Begin_MaxDuration)
- {
- Complete_Stream->Streams[pid]->EndTimeStampMoreThanxSeconds=true;
- Complete_Stream->Streams_With_EndTimeStampMoreThanxSecondsCount++;
- if (Complete_Stream->Streams_NotParsedCount
- && Complete_Stream->Streams_With_StartTimeStampCount>0
- && Complete_Stream->Streams_With_StartTimeStampCount==Complete_Stream->Streams_With_EndTimeStampMoreThanxSecondsCount)
- {
- //We are already parsing 16 seconds (for all PCRs), we don't hope to have more info
- MpegTs_JumpTo_Begin=File_Offset+Buffer_Offset-Buffer_TotalBytes_FirstSynched;
- MpegTs_JumpTo_End=MpegTs_JumpTo_Begin;
- if (MpegTs_JumpTo_Begin+MpegTs_JumpTo_End>=File_Size)
- {
- if (MpegTs_JumpTo_Begin+MpegTs_JumpTo_End>File_Size)
- {
- MpegTs_JumpTo_Begin=File_Size;
- MpegTs_JumpTo_End=0;
- }
- else
- MpegTs_JumpTo_Begin=File_Size-MpegTs_JumpTo_End;
- }
- }
- }
- }
- #else //MEDIAINFO_MPEGTS_PCR_YES
- Skip_B6( "program_clock_reference");
- #endif //MEDIAINFO_MPEGTS_PCR_YES
- }
- if (OPCR_flag)
- {
- BS_Begin();
- Skip_S8(33, "original_program_clock_reference_base");
- Skip_S1( 6, "reserved");
- Skip_S2( 9, "original_program_clock_reference_extension");
- BS_End();
- }
- if (splicing_point_flag)
- {
- Skip_B1( "splice_countdown");
- }
- if (transport_private_data_flag)
- {
- int8u transport_private_data_length;
- Get_B1 (transport_private_data_length, "transport_private_data_length");
- if (Element_Offset+transport_private_data_length<=Element_Pos_Save+1+adaptation_field_length)
- transport_private_data(transport_private_data_length);
- else
- Skip_XX(Element_Pos_Save+1+adaptation_field_length-Element_Offset, "problem");
- }
- if (adaptation_field_extension_flag)
- {
- int8u adaptation_field_extension_length;
- Get_B1 (adaptation_field_extension_length, "adaptation_field_extension_length");
- if (Element_Offset+adaptation_field_extension_length<=Element_Pos_Save+1+adaptation_field_length)
- {
- Element_Begin1("adaptation_field_extension");
- int64u End=Element_Offset+adaptation_field_extension_length;
- bool ltw_flag, piecewise_rate_flag, seamless_splice_flag;
- BS_Begin();
- Get_SB ( ltw_flag, "ltw_flag");
- Get_SB ( piecewise_rate_flag, "piecewise_rate_flag");
- Get_SB ( seamless_splice_flag, "seamless_splice_flag");
- Skip_S1( 5, "reserved");
- if (ltw_flag)
- {
- Skip_SB( "ltw_valid_flag");
- Skip_S2(15, "ltw_offset");
- }
- if (piecewise_rate_flag)
- {
- Skip_S1( 2, "reserved");
- Skip_S3(22, "piecewise_rate");
- }
- if (seamless_splice_flag)
- {
- Skip_S1( 4, "splice_type");
- int16u DTS_29, DTS_14;
- int8u DTS_32;
- Element_Begin1("DTS");
- Get_S1 ( 3, DTS_32, "DTS_32");
- Mark_1();
- Get_S2 (15, DTS_29, "DTS_29");
- Mark_1();
- Get_S2 (15, DTS_14, "DTS_14");
- Mark_1();
-
- //Filling
- int64u DTS;
- DTS=(((int64u)DTS_32)<<30)
- | (((int64u)DTS_29)<<15)
- | (((int64u)DTS_14));
- Element_Info_From_Milliseconds(DTS/90);
- Element_End0();
- }
- BS_End();
- if (Element_Offset<End)
- Skip_XX(End-Element_Offset, "reserved");
- Element_End0();
- }
- else
- Skip_XX(Element_Pos_Save+1+adaptation_field_length-Element_Offset, "problem");
- }
- }
-
- if (Element_Offset<Element_Pos_Save+1+adaptation_field_length)
- Skip_XX(Element_Pos_Save+1+adaptation_field_length-Element_Offset, "stuffing_bytes");
- Element_End0();
- }
- else
- {
- #endif //MEDIAINFO_TRACE
- int8u adaptation_field_length=Buffer[Buffer_Offset+BDAV_Size+4];
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- if (adaptation_field_length>188-4-1) //TS size - header - adaptation_field_length
- adaptation_field_length=188-4-1;
- else if (adaptation_field_length)
- {
- bool discontinuity_indicator=(Buffer[Buffer_Offset+BDAV_Size+5]&0x80)!=0;
- bool PCR_flag=(Buffer[Buffer_Offset+BDAV_Size+5]&0x10)!=0;
- bool OPCR_flag=(Buffer[Buffer_Offset+BDAV_Size+5]&0x08)!=0;
- bool splicing_point_flag=(Buffer[Buffer_Offset+BDAV_Size+5]&0x04)!=0;
- bool transport_private_data_flag=(Buffer[Buffer_Offset+BDAV_Size+5]&0x02)!=0;
- if (PCR_flag)
- {
- int64u program_clock_reference=( (((int64u)Buffer[Buffer_Offset+BDAV_Size+6])<<25)
- | (((int64u)Buffer[Buffer_Offset+BDAV_Size+7])<<17)
- | (((int64u)Buffer[Buffer_Offset+BDAV_Size+8])<< 9)
- | (((int64u)Buffer[Buffer_Offset+BDAV_Size+9])<< 1)
- | (((int64u)Buffer[Buffer_Offset+BDAV_Size+10])>>7));
- program_clock_reference*=300;
- program_clock_reference+=( (((int64u)Buffer[Buffer_Offset+BDAV_Size+10]&0x01)<<8)
- | (((int64u)Buffer[Buffer_Offset+BDAV_Size+11]) ));
- if (Complete_Stream->Streams[pid]->Searching_TimeStamp_End
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- && (!Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_End
- || Complete_Stream->Streams[pid]->IsPCR) //If PCR, we always want it.
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- )
- {
- Header_Parse_Events_Duration(program_clock_reference);
- if (program_clock_reference!=Complete_Stream->Streams[pid]->TimeStamp_End) //Some PCRs are buggy (low precision), using the first stream offset in the case of duplicate PCR value
- {
- if (Complete_Stream->Streams[pid]->TimeStamp_End_Offset!=(int64u)-1)
- {
- if (program_clock_reference+0x12c00000000LL<Complete_Stream->Streams[pid]->TimeStamp_End)
- program_clock_reference+=0x25800000000LL; //33 bits and *300
- if (!discontinuity_indicator && program_clock_reference>Complete_Stream->Streams[pid]->TimeStamp_End && program_clock_reference<Complete_Stream->Streams[pid]->TimeStamp_End+10*27000000) //Not before, not after 10 seconds, else there is a problem
- {
- float64 Duration_InstantaneousBitRate_Min=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End-(Config_VbrDetection_Delta?0:810));
- float64 Duration_InstantaneousBitRate_Max=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End+(Config_VbrDetection_Delta?0:810));
- float64 Bytes_InstantaneousBitRate=(float64)(File_Offset+Buffer_Offset-Complete_Stream->Streams[pid]->TimeStamp_End_Offset);
- float64 TimeStamp_InstantaneousBitRate_Current_Min=Bytes_InstantaneousBitRate*8/Duration_InstantaneousBitRate_Max*27000000*(1-Config_VbrDetection_Delta);
- float64 TimeStamp_InstantaneousBitRate_Current_Max=Bytes_InstantaneousBitRate*8/Duration_InstantaneousBitRate_Min*27000000*(1+Config_VbrDetection_Delta);
- if (Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Min)
- {
- if (TimeStamp_InstantaneousBitRate_Current_Max<Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Min || TimeStamp_InstantaneousBitRate_Current_Min>Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Max)
- {
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_BitRateMode_IsVbr++;
- #if MEDIAINFO_ADVANCED
- if (Config_VbrDetection_GiveUp && Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_BitRateMode_IsVbr>=Config_VbrDetection_Occurences)
- Config->ParseSpeed=0;
- #endif // MEDIAINFO_ADVANCED
- }
- else
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_BitRateMode_IsCbr++;
- }
- float64 Duration_Min=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End-1);
- float64 Duration_Raw=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End);
- float64 Duration_Max=(float64)(program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End+1);
- float64 Bytes=(float64)(File_Offset+Buffer_Offset-Complete_Stream->Streams[pid]->TimeStamp_End_Offset);
- float64 InstantaneousBitRate_Min=Bytes*8/Duration_Max*27000000*(1-Config_VbrDetection_Delta);
- float64 InstantaneousBitRate_Raw=Bytes*8/Duration_Raw*27000000;
- float64 InstantaneousBitRate_Max=Bytes*8/Duration_Min*27000000*(1+Config_VbrDetection_Delta);
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Min=InstantaneousBitRate_Min;
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Raw=InstantaneousBitRate_Raw;
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Max=InstantaneousBitRate_Max;
- #if MEDIAINFO_ADVANCED
- if (Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Min_Raw>InstantaneousBitRate_Raw)
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Min_Raw=InstantaneousBitRate_Raw;
- if (Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Max_Raw<InstantaneousBitRate_Raw)
- Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Max_Raw=InstantaneousBitRate_Raw;
- int64u Distance=program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_End;
- if (Complete_Stream->Streams[pid]->TimeStamp_Distance_Min>Distance)
- Complete_Stream->Streams[pid]->TimeStamp_Distance_Min=Distance;
- if (Complete_Stream->Streams[pid]->TimeStamp_Distance_Max<Distance)
- Complete_Stream->Streams[pid]->TimeStamp_Distance_Max=Distance;
- Complete_Stream->Streams[pid]->TimeStamp_Distance_Total+=Distance;
- Complete_Stream->Streams[pid]->TimeStamp_Distance_Count++;
- #endif // MEDIAINFO_ADVANCED
- }
- #if MEDIAINFO_ADVANCED
- else
- {
- if (!discontinuity_indicator)
- Complete_Stream->Streams[pid]->TimeStamp_HasProblems++;
- float64 Bytes=(float64)(File_Offset+Buffer_Offset-Complete_Stream->Streams[pid]->TimeStamp_End_Offset);
- int64u TimeToAdd;
- if (Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Raw)
- TimeToAdd=float64_int64s(Bytes*8/Complete_Stream->Streams[pid]->TimeStamp_InstantaneousBitRate_Current_Raw*27000000);
- else
- TimeToAdd=0;
- Complete_Stream->Streams[pid]->TimeStamp_Intermediate.push_back(Complete_Stream->Streams[pid]->TimeStamp_End+TimeToAdd);
- Complete_Stream->Streams[pid]->TimeStamp_Intermediate.push_back(program_clock_reference);
- }
- #endif // MEDIAINFO_ADVANCED
- }
- Complete_Stream->Streams[pid]->TimeStamp_End=program_clock_reference;
- Complete_Stream->Streams[pid]->TimeStamp_End_IsUpdated=true;
- Complete_Stream->Streams[pid]->TimeStamp_End_Offset=File_Offset+Buffer_Offset;
- {
- Status[IsUpdated]=true;
- Status[User_16]=true;
- }
- }
- }
- if (Complete_Stream->Streams[pid]->Searching_TimeStamp_Start)
- {
- //This is the first PCR
- Complete_Stream->Streams[pid]->TimeStamp_Start=program_clock_reference;
- Complete_Stream->Streams[pid]->TimeStamp_Start_Offset=File_Offset+Buffer_Offset;
- Complete_Stream->Streams[pid]->TimeStamp_End=program_clock_reference;
- Complete_Stream->Streams[pid]->TimeStamp_End_IsUpdated=true;
- Complete_Stream->Streams[pid]->TimeStamp_End_Offset=File_Offset+Buffer_Offset;
- Complete_Stream->Streams[pid]->Searching_TimeStamp_Start_Set(false);
- Complete_Stream->Streams[pid]->Searching_TimeStamp_End_Set(true);
- Complete_Stream->Streams_With_StartTimeStampCount++;
- {
- Status[IsUpdated]=true;
- Status[User_16]=true;
- }
- }
-
- //Test if we can find the TS bitrate
- if (!Complete_Stream->Streams[pid]->EndTimeStampMoreThanxSeconds && Complete_Stream->Streams[pid]->TimeStamp_Start!=(int64u)-1
- && (File_Offset+Buffer_Offset-Buffer_TotalBytes_FirstSynched)*2<File_Size)
- {
- if (program_clock_reference<Complete_Stream->Streams[pid]->TimeStamp_Start)
- program_clock_reference+=0x200000000LL*300; //33 bits, cyclic
- if ((program_clock_reference-Complete_Stream->Streams[pid]->TimeStamp_Start)>Begin_MaxDuration)
- {
- Complete_Stream->Streams[pid]->EndTimeStampMoreThanxSeconds=true;
- Complete_Stream->Streams_With_EndTimeStampMoreThanxSecondsCount++;
- if (Complete_Stream->Streams_NotParsedCount
- && Complete_Stream->Streams_With_StartTimeStampCount>0
- && Complete_Stream->Streams_With_StartTimeStampCount==Complete_Stream->Streams_With_EndTimeStampMoreThanxSecondsCount)
- {
- //We are already parsing 16 seconds (for all PCRs), we don't hope to have more info
- MpegTs_JumpTo_Begin=File_Offset+Buffer_Offset-Buffer_TotalBytes_FirstSynched;
- MpegTs_JumpTo_End=MpegTs_JumpTo_Begin;
- if (MpegTs_JumpTo_Begin+MpegTs_JumpTo_End>=File_Size)
- {
- if (MpegTs_JumpTo_Begin+MpegTs_JumpTo_End>File_Size)
- {
- MpegTs_JumpTo_Begin=File_Size;
- MpegTs_JumpTo_End=0;
- }
- else
- MpegTs_JumpTo_Begin=File_Size-MpegTs_JumpTo_End;
- }
- }
- }
- }
- }
- if (transport_private_data_flag && adaptation_field_length>1+(PCR_flag?6:0)+(OPCR_flag?6:0)+(splicing_point_flag?1:0)+1)
- {
- int8u transport_private_data_length=Buffer[Buffer_Offset+BDAV_Size+5+1+(PCR_flag?6:0)+(OPCR_flag?6:0)+(splicing_point_flag?1:0)];
- if (1+(PCR_flag?6:0)+(OPCR_flag?6:0)+(splicing_point_flag?1:0)+1+transport_private_data_length<=adaptation_field_length)
- {
- int64u Element_Offset_Save=Element_Offset;
- Element_Offset=5+1+(PCR_flag?6:0)+(OPCR_flag?6:0)+(splicing_point_flag?1:0)+1;
- transport_private_data(transport_private_data_length);
- Element_Offset=Element_Offset_Save;
- }
- }
- }
- #endif //MEDIAINFO_MPEGTS_PCR_YES
- Element_Offset+=1+adaptation_field_length;
- #if MEDIAINFO_TRACE
- }
- #endif //MEDIAINFO_TRACE
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-void File_MpegTs::Header_Parse_Events()
-{
-}
-#endif //MEDIAINFO_EVENTS
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-void File_MpegTs::Header_Parse_Events_Duration(int64u program_clock_reference)
-{
-}
-#endif //MEDIAINFO_EVENTS
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_ADVANCED2
-void File_MpegTs::Read_Buffer_SegmentChange()
-{
- if (Complete_Stream==NULL || Complete_Stream->Streams.empty())
- return;
-
- for (size_t StreamID=0; StreamID<0x2000; StreamID++)//std::map<int64u, stream>::iterator Stream=Streams.begin(); Stream!=Streams.end(); Stream++)
- if (Complete_Stream->Streams[StreamID]->Parser)
- Complete_Stream->Streams[StreamID]->Parser->Open_Buffer_SegmentChange();
-}
-#endif //MEDIAINFO_ADVANCED2
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Data_Parse()
-{
- //Counting
- Frame_Count++;
-
- //TSP specific
- if (TSP_Size && Element_Size>TSP_Size)
- Element_Size-=TSP_Size;
-
- #if MEDIAINFO_DUPLICATE
- if (Complete_Stream->Streams[pid]->ShouldDuplicate)
- File__Duplicate_Write();
- #endif //MEDIAINFO_DUPLICATE
-
- //Parsing
- if (!Complete_Stream->Streams[pid]->Searching_Payload_Start
- && !Complete_Stream->Streams[pid]->Searching_Payload_Continue
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- && !Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_Start
- && !Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_End
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- )
- Skip_XX(Element_Size, "data");
- else
- switch (Complete_Stream->Streams[pid]->Kind)
- {
- case complete_stream::stream::pes : PES(); break;
- case complete_stream::stream::psi : PSI(); break;
- default: ;
- }
-
- //TSP specific
- if (TSP_Size && Element_Size>TSP_Size)
- {
- Element_Size+=TSP_Size;
- Skip_B4( "TSP"); //TSP supplement
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_MpegTs::PES()
-{
- //Info
- DETAILS_INFO(if (Complete_Stream->transport_stream_id_IsValid) Element_Info1(Mpeg_Psi_stream_type_Info(Complete_Stream->Streams[pid]->stream_type, Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Complete_Stream->Streams[pid]->program_numbers[0]].registration_format_identifier));)
-
- //Demux
- #if MEDIAINFO_DEMUX
- Element_Code=pid;
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- #endif //MEDIAINFO_DEMUX
-
- //Exists
- if (!Complete_Stream->Streams[pid]->IsRegistered)
- {
- Complete_Stream->Streams[pid]->IsRegistered=true;
- for (size_t Pos=0; Pos<Complete_Stream->Streams[pid]->program_numbers.size(); Pos++)
- if (!Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Complete_Stream->Streams[pid]->program_numbers[Pos]].IsRegistered)
- {
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Complete_Stream->Streams[pid]->program_numbers[Pos]].Update_Needed_IsRegistered=true;
-
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Complete_Stream->Streams[pid]->program_numbers[Pos]].IsRegistered=true;
- }
-
- Complete_Stream->Streams[pid]->IsUpdated_IsRegistered=true;
- Complete_Stream->PES_PIDs.insert(pid);
-
- Status[IsUpdated]=true;
- Status[User_19]=true;
- }
-
- //Case of encrypted streams
- if (transport_scrambling_control)
- {
- if (!Complete_Stream->Streams[pid]->Searching_Payload_Continue)
- Complete_Stream->Streams[pid]->Searching_Payload_Continue_Set(true); //In order to count the packets
-
- if (Complete_Stream->Streams[pid]->IsScrambled>16)
- {
- //Don't need anymore
- Complete_Stream->Streams[pid]->Searching_Payload_Start_Set(false);
- Complete_Stream->Streams[pid]->Searching_Payload_Continue_Set(false);
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_Start_Set(false);
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- if (!Complete_Stream->Streams[pid]->IsParsed && Complete_Stream->Streams_NotParsedCount)
- {
- Complete_Stream->Streams[pid]->IsParsed=true;
- Complete_Stream->Streams_NotParsedCount--;
- }
- }
- Skip_XX(Element_Size-Element_Offset, "Scrambled data");
-
- return;
- }
- else if (Complete_Stream->Streams[pid]->IsScrambled)
- Complete_Stream->Streams[pid]->IsScrambled--;
-
- //Parser creation
- if (Complete_Stream->Streams[pid]->Parser==NULL)
- {
- //Waiting for first payload_unit_start_indicator
- if (!payload_unit_start_indicator)
- {
- Element_DoNotShow(); //We don't want to show this item because there is no interessant info
- return; //This is not the start of the PES
- }
-
- //If unknown stream_type
- if (Complete_Stream->transport_stream_id_IsValid
- && Mpeg_Psi_stream_type_StreamKind(Complete_Stream->Streams[pid]->stream_type, Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Complete_Stream->Streams[pid]->program_numbers[0]].registration_format_identifier)==Stream_Max
- && Complete_Stream->Streams[pid]->stream_type!=0x06 //Exception for private data
- && Complete_Stream->Streams[pid]->stream_type<=0x7F //Exception for private data
- && Mpeg_Descriptors_registration_format_identifier_StreamKind(Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Complete_Stream->Streams[pid]->program_numbers[0]].registration_format_identifier)==Stream_Max //From Descriptor
- && Config->File_MpegTs_stream_type_Trust_Get())
- {
- Complete_Stream->Streams[pid]->Searching_Payload_Start_Set(false);
- Complete_Stream->Streams[pid]->Searching_Payload_Continue_Set(false);
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_Start_Set(false);
- Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_End_Set(false);
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- if (!Complete_Stream->Streams[pid]->IsParsed && Complete_Stream->Streams_NotParsedCount)
- {
- Complete_Stream->Streams[pid]->IsParsed=true;
- Complete_Stream->Streams_NotParsedCount--;
- }
- return;
- }
-
- //Allocating an handle if needed
- #if defined(MEDIAINFO_MPEGPS_YES)
- Complete_Stream->Streams[pid]->Parser=new File_MpegPs;
- #if MEDIAINFO_SEEK
- if (Unsynch_Frame_Counts.find(pid)!=Unsynch_Frame_Counts.end())
- {
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->Unsynch_Frame_Count_Temp=Unsynch_Frame_Counts[pid];
- Unsynch_Frame_Counts.erase(pid);
- }
- #endif //MEDIAINFO_SEEK
- #if MEDIAINFO_DEMUX
- if (Config_Demux)
- {
- if (Complete_Stream->Streams[pid]->stream_type==0x20 && Complete_Stream->Streams[pid]->SubStream_pid)
- {
- //Creating the demux buffer
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->SubStream_Demux=new File_MpegPs::demux;
- //If main parser is already created, associating the new demux buffer
- if (Complete_Stream->Streams[Complete_Stream->Streams[pid]->SubStream_pid]->Parser)
- ((File_MpegPs*)Complete_Stream->Streams[Complete_Stream->Streams[pid]->SubStream_pid]->Parser)->SubStream_Demux=((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->SubStream_Demux;
- }
- if (Complete_Stream->Streams[pid]->stream_type!=0x20 && Complete_Stream->Streams[pid]->SubStream_pid && (File_MpegPs*)Complete_Stream->Streams[Complete_Stream->Streams[pid]->SubStream_pid]->Parser)
- {
- //If SubStream parser is already created, associating the SubStream demux buffer
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->SubStream_Demux=((File_MpegPs*)Complete_Stream->Streams[Complete_Stream->Streams[pid]->SubStream_pid]->Parser)->SubStream_Demux;
- }
- }
- #endif //MEDIAINFO_DEMUX
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (FromAribStdB24B37)
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->FromAribStdB24B37=true;
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- if (Searching_TimeStamp_Start)
- Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_Start_Set(true);
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->Searching_TimeStamp_Start=Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_Start;
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->FromTS=true;
- if (Config->File_MpegTs_stream_type_Trust_Get())
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->FromTS_stream_type=Complete_Stream->Streams[pid]->stream_type;
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->FromTS_descriptor_tag=Complete_Stream->Streams[pid]->descriptor_tag;
- if (!Complete_Stream->Streams[pid]->program_numbers.empty())
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->FromTS_program_format_identifier=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Complete_Stream->Streams[pid]->program_numbers[0]].registration_format_identifier;
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->FromTS_format_identifier=Complete_Stream->Streams[pid]->registration_format_identifier;
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->MPEG_Version=2;
- complete_stream::transport_stream::iod_ess::iterator IOD_ES=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].IOD_ESs.find(Complete_Stream->Streams[pid]->FMC_ES_ID);
- if (IOD_ES!=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].IOD_ESs.end())
- {
- #ifdef MEDIAINFO_MPEG4_YES
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->ParserFromTs=IOD_ES->second.Parser; IOD_ES->second.Parser=NULL;
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->SLConfig=IOD_ES->second.SLConfig; IOD_ES->second.SLConfig=NULL;
- #endif
- }
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- Complete_Stream->Streams[pid]->Parser->ShouldContinueParsing=true;
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- Complete_Stream->Streams[pid]->Searching_Payload_Continue_Set(true);
- #else
- //Filling
- Streams[pid]->Parser=new File_Unknown();
- #endif
- Complete_Stream->Streams[pid]->Parser->CA_system_ID_MustSkipSlices=Complete_Stream->Streams[pid]->CA_system_ID_MustSkipSlices;
- #if MEDIAINFO_IBIUSAGE
- if (Ibi.Streams[pid]==NULL)
- Ibi.Streams[pid]=new ibi::stream;
- Complete_Stream->Streams[pid]->Parser->IbiStream=Ibi.Streams[pid];
- #endif //MEDIAINFO_IBIUSAGE
- Open_Buffer_Init(Complete_Stream->Streams[pid]->Parser);
- }
-
- //If unsynched, waiting for first payload_unit_start_indicator
- if (!Complete_Stream->Streams[pid]->Parser->Synched && !payload_unit_start_indicator)
- {
- Element_DoNotShow(); //We don't want to show this item because there is no interessant info
- return; //This is not the start of the PES
- }
-
- //Parsing
- if (Complete_Stream->Streams[pid]->IsPCR)
- ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->FrameInfo.PCR=Complete_Stream->Streams[pid]->TimeStamp_End==(int64u)-1?(int64u)-1:Complete_Stream->Streams[pid]->TimeStamp_End*1000/27; //27 MHz
- #if MEDIAINFO_IBIUSAGE
- if (Complete_Stream->transport_stream_id!=(int16u)-1 && !Complete_Stream->Streams[pid]->program_numbers.empty())
- {
- int16u Program_PID=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Complete_Stream->Streams[pid]->program_numbers[0]].pid;
- Complete_Stream->Streams[pid]->Parser->Ibi_SynchronizationOffset_Current=Complete_Stream->Streams[Program_PID]->Ibi_SynchronizationOffset_BeginOfFrame;
- if (Complete_Stream->Streams[pid]->Parser->Ibi_SynchronizationOffset_Current==(int64u)-1)
- return; //Not yet synchronized
- }
- else
- Complete_Stream->Streams[pid]->Parser->Ibi_SynchronizationOffset_Current=File_Offset+Buffer_Offset-Header_Size;
- #endif //MEDIAINFO_IBIUSAGE
-
- #if defined(MEDIAINFO_ARIBSTDB24B37_YES)
- if (FromAribStdB24B37)
- Complete_Stream->Streams[pid]->Parser->FrameInfo=FrameInfo;
- #endif //defined(MEDIAINFO_ARIBSTDB24B37_YES)
-
- //EIA-608/EIA-708 descriptors
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- Complete_Stream->Streams[pid]->Parser->ServiceDescriptors=NULL;
- if (Complete_Stream->Streams[pid]->ServiceDescriptors_IsPresent)
- Complete_Stream->Streams[pid]->Parser->ServiceDescriptors=&Complete_Stream->Streams[pid]->ServiceDescriptors;
- if (Complete_Stream->Streams[pid]->Parser->ServiceDescriptors==NULL)
- {
- for (size_t ProgramPos=0; ProgramPos<Complete_Stream->Streams[pid]->program_numbers.size(); ++ProgramPos)
- {
- Complete_Stream->Streams[pid]->Parser->ServiceDescriptors=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Complete_Stream->Streams[pid]->program_numbers[ProgramPos]].ServiceDescriptors;
- if (Complete_Stream->Streams[pid]->Parser->ServiceDescriptors)
- break;
- }
- }
- if (Complete_Stream->Streams[pid]->Parser->ServiceDescriptors==NULL)
- {
- for (size_t ProgramPos=0; ProgramPos<Complete_Stream->Streams[pid]->program_numbers.size(); ++ProgramPos)
- if (Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Complete_Stream->Streams[pid]->program_numbers[ProgramPos]].source_id_IsValid)
- {
- int16u source_id=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Complete_Stream->Streams[pid]->program_numbers[ProgramPos]].source_id;
- complete_stream::sources::iterator Source=Complete_Stream->Sources.find(source_id);
- if (Source!=Complete_Stream->Sources.end())
- for (complete_stream::source::atsc_epg_blocks::iterator ATSC_EPG_Block=Source->second.ATSC_EPG_Blocks.begin(); ATSC_EPG_Block!=Source->second.ATSC_EPG_Blocks.end(); ++ATSC_EPG_Block)
- for (complete_stream::source::atsc_epg_block::events::iterator Event=ATSC_EPG_Block->second.Events.begin(); Event!=ATSC_EPG_Block->second.Events.end(); ++Event)
- if (Event->second.ServiceDescriptors)
- {
- Complete_Stream->Streams[pid]->Parser->ServiceDescriptors=Event->second.ServiceDescriptors;
- break;
- }
- }
- }
- if (Complete_Stream->Streams[pid]->Parser->ServiceDescriptors==NULL)
- Complete_Stream->Streams[pid]->Parser->ServiceDescriptors=&Complete_Stream->Streams[pid]->ServiceDescriptors; //Default to empty descriptor present in order to say descriptor info is supported
- #endif
-
- Open_Buffer_Continue(Complete_Stream->Streams[pid]->Parser);
- PES_Parse_Finish();
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::PES_Parse_Finish()
-{
- if (Complete_Stream->Streams[pid]->Parser->Status[IsUpdated])
- {
- Complete_Stream->Streams[pid]->Parser->Status[IsUpdated]=false;
- Complete_Stream->Streams[pid]->IsUpdated_Info=true;
- for (size_t Pos=0; Pos<Complete_Stream->Streams[pid]->program_numbers.size(); Pos++)
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[Complete_Stream->Streams[pid]->program_numbers[Pos]].Update_Needed_IsRegistered=true;
-
- Status[IsUpdated]=true;
- Status[User_19]=true;
- }
-
- #if defined(MEDIAINFO_MPEGPS_YES) && defined(MEDIAINFO_MPEGTS_PESTIMESTAMP_YES)
- if (MpegTs_JumpTo_Begin+MpegTs_JumpTo_End>File_Size
- && !Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_End
- && ((File_MpegPs*)Complete_Stream->Streams[pid]->Parser)->HasTimeStamps)
- {
- Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_Start_Set(false);
- Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_End_Set(true);
- }
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
-
- //Need anymore?
- if (Complete_Stream->Streams[pid]->Parser->Status[IsFilled]
- || Complete_Stream->Streams[pid]->Parser->Status[IsFinished])
- {
- if ((Complete_Stream->Streams[pid]->Searching_Payload_Start || Complete_Stream->Streams[pid]->Searching_Payload_Continue) && Config->ParseSpeed<1 && MpegTs_JumpTo_End)
- {
- if (Config->File_StopSubStreamAfterFilled_Get())
- {
- Complete_Stream->Streams[pid]->Searching_Payload_Start_Set(false);
- Complete_Stream->Streams[pid]->Searching_Payload_Continue_Set(false);
- }
- if (!Complete_Stream->Streams[pid]->IsParsed && Complete_Stream->Streams_NotParsedCount)
- {
- Complete_Stream->Streams[pid]->IsParsed=true;
- Complete_Stream->Streams_NotParsedCount--;
- }
- }
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- if (Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_Start)
- Complete_Stream->Streams[pid]->Searching_ParserTimeStamp_Start_Set(false);
- #else //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- if (Config->ParseSpeed<1.0)
- Finish(Complete_Stream->Streams[pid]->Parser);
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- }
-
- #if MEDIAINFO_SEEK && MEDIAINFO_IBIUSAGE
- if (Seek_ID!=(int64u)-1)
- {
- if (Ibi.Streams[Seek_ID]->IsModified)
- {
- Read_Buffer_Seek(2, Seek_Value, Seek_ID);
- }
- else if (Ibi.Streams[Seek_ID]->Infos_Pos>=2 && Ibi.Streams[Seek_ID]->IsSynchronized && Ibi.Streams[Seek_ID]->Infos[Ibi.Streams[Seek_ID]->Infos_Pos-1].StreamOffset>=Seek_Value_Maximal)
- {
- InfiniteLoop_Detect++;
- if (InfiniteLoop_Detect>16)
- {
- //Infinite loop
- Seek_ID=(int64u)-1;
- Seek_Value=(int64u)-1;
- InfiniteLoop_Detect=0;
- Config->Demux_IsSeeking=false;
- }
- else
- {
- //No intermediate seek point found, going to previous seek point
- GoTo(Ibi.Streams[Seek_ID]->Infos[Ibi.Streams[Seek_ID]->Infos_Pos-2].StreamOffset);
- Open_Buffer_Unsynch();
- }
- }
- }
- #endif //MEDIAINFO_SEEK && MEDIAINFO_IBIUSAGE
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::PSI()
-{
- //Initializing
- if (payload_unit_start_indicator)
- {
- delete ((File_Mpeg_Psi*)Complete_Stream->Streams[pid]->Parser); Complete_Stream->Streams[pid]->Parser=new File_Mpeg_Psi;
- Open_Buffer_Init(Complete_Stream->Streams[pid]->Parser);
- ((File_Mpeg_Psi*)Complete_Stream->Streams[pid]->Parser)->Complete_Stream=Complete_Stream;
- ((File_Mpeg_Psi*)Complete_Stream->Streams[pid]->Parser)->pid=pid;
- }
- else if (Complete_Stream->Streams[pid]->Parser==NULL)
- {
- Skip_XX(Element_Size, "data");
- return; //This is not the start of the PSI
- }
-
- //Parsing
- #if MEDIAINFO_IBIUSAGE
- Complete_Stream->Streams[pid]->Parser->Ibi_SynchronizationOffset_Current=File_Offset+Buffer_Offset-Header_Size;
- #endif //MEDIAINFO_IBIUSAGE
- Open_Buffer_Continue(Complete_Stream->Streams[pid]->Parser);
-
- //Filling
- if (Complete_Stream->Streams[pid]->Parser->Status[IsFilled])
- {
- //Accept
- if (!Status[IsAccepted] && pid==0x0000 && Complete_Stream->Streams[pid]->Parser->Status[IsAccepted])
- Accept("MPEG-TS");
-
- //Disabling this pid
- delete Complete_Stream->Streams[pid]->Parser; Complete_Stream->Streams[pid]->Parser=NULL;
- Complete_Stream->Streams[pid]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[pid]->Searching_Payload_Continue_Set(false);
-
- //EPG
- if (Complete_Stream->Sources_IsUpdated || Complete_Stream->Programs_IsUpdated)
- {
- Status[IsUpdated]=true;
- Status[User_18]=true;
- }
-
- //Duration
- if (Complete_Stream->Duration_End_IsUpdated)
- {
- Status[IsUpdated]=true;
- Status[User_17]=true;
- }
-
- //Program change
- if (pid==0x0000)
- {
- Buffer_TotalBytes_LastSynched=Buffer_TotalBytes+Buffer_Offset-Header_Size;
- Status[IsFilled]=false;
-
- Status[IsUpdated]=true;
- Status[User_19]=true;
- }
- if (!Complete_Stream->Streams[pid]->Table_IDs.empty() && Complete_Stream->Streams[pid]->Table_IDs[0x02])
- {
- Buffer_TotalBytes_LastSynched=Buffer_TotalBytes+Buffer_Offset-Header_Size;
- Status[IsFilled]=false;
-
- //Status[IsUpdated]=true;
- //Status[User_19]=true;
- }
-
- //Item removal
- if (pid==0x0000 || (!Complete_Stream->Streams[pid]->Table_IDs.empty() && Complete_Stream->Streams[pid]->Table_IDs[0x02]))
- {
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- if (!Complete_Stream->StreamPos_ToRemove[StreamKind].empty())
- {
- sort(Complete_Stream->StreamPos_ToRemove[StreamKind].begin(), Complete_Stream->StreamPos_ToRemove[StreamKind].end());
- size_t Pos=Complete_Stream->StreamPos_ToRemove[StreamKind].size();
- do
- {
- Pos--;
-
- //Erasing text substreams
- Ztring ID_ToFind=Retrieve((stream_t)StreamKind, Complete_Stream->StreamPos_ToRemove[StreamKind][Pos], General_ID)+__T('-');
- for (size_t TextPos=0; TextPos<Count_Get(Stream_Text); TextPos++)
- if (Retrieve(Stream_Text, TextPos, General_ID).find(ID_ToFind)==0)
- Stream_Erase(Stream_Text, TextPos);
-
- //Erasing the stream
- Stream_Erase((stream_t)StreamKind, Complete_Stream->StreamPos_ToRemove[StreamKind][Pos]);
-
- //Moving other StreamPos
- for (size_t Pos2=Pos+1; Pos2<Complete_Stream->StreamPos_ToRemove[StreamKind].size(); Pos2++)
- Complete_Stream->StreamPos_ToRemove[StreamKind][Pos]--;
-
- //Informing that the menu must be recalculated - TODO: only the related programs
- if (StreamKind!=Stream_Menu)
- {
- for (complete_stream::transport_stream::programs::iterator Program=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs.begin(); Program!=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs.end(); ++Program)
- Program->second.Update_Needed_StreamPos=true;
- }
- else if (Complete_Stream->StreamPos_ToRemove[StreamKind][Pos]<Complete_Stream->program_number_Order.size())
- {
- Complete_Stream->program_number_Order.erase(Complete_Stream->program_number_Order.begin()+Complete_Stream->StreamPos_ToRemove[StreamKind][Pos]);
- }
- }
- while (Pos);
- Complete_Stream->StreamPos_ToRemove[StreamKind].clear();
- }
-
- Status[IsUpdated]=true;
- Status[User_19]=true;
- }
- }
- else
- //Waiting for more data
- Complete_Stream->Streams[pid]->Searching_Payload_Continue_Set(true);
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::SetAllToPES()
-{
- Complete_Stream->Streams_NotParsedCount=(size_t)-1;
- for (size_t StreamID=0; StreamID<0x2000; StreamID++)
- {
- delete Complete_Stream->Streams[StreamID]; Complete_Stream->Streams[StreamID]=new complete_stream::stream;
- }
- #ifdef MEDIAINFO_ARIBSTDB24B37_YES
- size_t StreamID=FromAribStdB24B37?0x00:0x20;
- #else //MEDIAINFO_ARIBSTDB24B37_YES
- size_t StreamID=0x20;
- #endif //MEDIAINFO_ARIBSTDB24B37_YES
- for (; StreamID<0x1FFF; StreamID++)
- {
- Complete_Stream->Streams[StreamID]->Kind=complete_stream::stream::pes;
- Complete_Stream->Streams[StreamID]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[StreamID]->Searching_Payload_Continue_Set(false);
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- Complete_Stream->Streams[StreamID]->Element_Info1="PES";
- #endif //MEDIAINFO_TRACE
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- Complete_Stream->Streams[StreamID]->Searching_TimeStamp_Start_Set(true);
- Complete_Stream->Streams[StreamID]->Searching_TimeStamp_End_Set(false);
- #endif //MEDIAINFO_MPEGTS_PCR_YES
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- Complete_Stream->Streams[StreamID]->Searching_ParserTimeStamp_Start_Set(true);
- Complete_Stream->Streams[StreamID]->Searching_ParserTimeStamp_End_Set(false);
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- }
- Complete_Stream->NoPatPmt=true;
-}
-
-//---------------------------------------------------------------------------
-void File_MpegTs::transport_private_data(int8u transport_private_data_length)
-{
- //Trying SCTE 128
- int64u End=Element_Offset+transport_private_data_length;
- #if MEDIAINFO_TRACE
- bool Trace_Activated_Save=Trace_Activated;
- Trace_Activated=false;
- #endif //MEDIAINFO_TRACE
- Element_Begin1("SCTE 128 coherency test");
- bool IsOk=true;
- while (Element_Offset+2<=End)
- {
- int8u tag, length;
- Get_B1 (tag, "tag");
- Get_B1 (length, "length");
- if (Element_Offset+length>End || (tag==0xDF && length<4))
- {
- Skip_XX(End-Element_Offset, "problem");
- IsOk=false;
- }
- else
- Skip_XX(length, "data");
- }
- if (Element_Offset<End)
- {
- Skip_XX(End-Element_Offset, "problem");
- IsOk=false;
- }
- Element_End0();
- #if MEDIAINFO_TRACE
- Trace_Activated=Trace_Activated_Save;
- #endif //MEDIAINFO_TRACE
- if (IsOk)
- {
- Element_Offset=End-transport_private_data_length;
- while (Element_Offset+2<=End)
- {
- Element_Begin0();
- int8u tag, length;
- Get_B1 (tag, "tag"); Param_Info1(Scte128_tag(tag)); Element_Name(Scte128_tag(tag));
- Get_B1 (length, "length");
- if (tag==0xDF && length>=4)
- {
- int32u format_identifier;
- Get_C4 (format_identifier, "format identifier");
- switch (format_identifier)
- {
- case 0x45425030 : //EBP0
- {
- int64u End2=Element_Offset+length-4;
- Element_Info1("CableLabs - Encoder Boundary Point");
- BS_Begin();
- bool EBP_fragment_flag, EBP_segment_flag, EBP_SAP_flag, EBP_grouping_flag, EBP_time_flag, EBP_concealment_flag, EBP_extension_flag;
- Get_SB (EBP_fragment_flag, "EBP_fragment_flag");
- Get_SB (EBP_segment_flag, "EBP_segment_flag");
- Get_SB (EBP_SAP_flag, "EBP_SAP_flag");
- Get_SB (EBP_grouping_flag, "EBP_grouping_flag");
- Get_SB (EBP_time_flag, "EBP_time_flag");
- Get_SB (EBP_concealment_flag, "EBP_concealment_flag");
- Skip_SB( "Reserved");
- Get_SB (EBP_extension_flag, "EBP_extension_flag");
- if (EBP_extension_flag)
- {
- Skip_SB( "EBP_ext_partition_flag");
- Skip_S1(7, "reserved");
- }
- if (EBP_SAP_flag)
- {
- Skip_S1(3, "EBP_SAP_type");
- Skip_S1(5, "reserved");
- }
- if (EBP_grouping_flag)
- {
- bool EBP_grouping_ext_flag=true;
- while (EBP_grouping_ext_flag && Element_Offset<End2)
- {
- Get_SB (EBP_grouping_ext_flag, "EBP_grouping_ext_flag");
- Skip_S1(7, "EBP_grouping_id");
- }
- }
- BS_End();
- if (EBP_time_flag)
- {
- Element_Begin1("EBP_acquisition_time");
- if (Complete_Stream->Streams[pid] && !Complete_Stream->Streams[pid]->EBP_IsPresent)
- {
- int32u Seconds, Fraction;
- Get_B4 (Seconds, "Seconds"); Param_Info1(Ztring().Date_From_Seconds_1970((int32u)(Seconds-2208988800))); //Param_Info1(Ztring().Date_From_Seconds_1900(Seconds)); //Temp for old ZenLib
- Get_B4 (Fraction, "Fraction"); Param_Info1(Ztring::ToZtring(((float64)Fraction)/0x100000000LL, 9));
- Complete_Stream->Streams[pid]->Infos["EBP_AcquisitionTime"]=Ztring().Date_From_Seconds_1970((int32u)(Seconds-2208988800))+__T('.')+Ztring::ToZtring(((float64)Fraction)/0x100000000LL, 9).substr(2); //.Date_From_Seconds_1900(Seconds)); //Temp for old ZenLib
- Complete_Stream->Streams[pid]->EBP_IsPresent=true;
- }
- else
- {
- Info_B4(Seconds, "Seconds"); Param_Info1(Ztring().Date_From_Seconds_1970((int32u)(Seconds-2208988800))); //Param_Info1(Ztring().Date_From_Seconds_1900(Seconds)); //Temp for old ZenLib
- Info_B4(Fraction, "Fraction"); Param_Info1(Ztring::ToZtring(((float64)Fraction)/0x100000000LL, 9));
- }
- Element_End0();
- }
- if (EBP_concealment_flag)
- {
- Skip_B8( "EBP_ext_partitions");
- }
- if (Element_Offset<End)
- Skip_XX(End-Element_Offset, "EBP_reserved_bytes");
- }
- break;
- default : Skip_XX(length-4, "data");
- }
- }
- else
- Skip_XX(length, "data");
- Element_End0();
- }
- }
- else
- Skip_XX(transport_private_data_length, "transport_private_data");
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_MPEGTS_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegTs.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegTs.h
deleted file mode 100644
index f4080240c..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegTs.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about MPEG Transport Stream files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_MpegTsH
-#define MediaInfo_MpegTsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Duplicate.h"
-#include "MediaInfo/Multiple/File_Mpeg_Psi.h"
-#include "MediaInfo/Duplicate/File__Duplicate_MpegTs.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_MpegTs
-//***************************************************************************
-
-class File_MpegTs :
-#if MEDIAINFO_DUPLICATE
- public File__Duplicate
-#else //MEDIAINFO_DUPLICATE
- public File__Analyze
-#endif //MEDIAINFO_DUPLICATE
-{
-public :
- //In
- #ifdef MEDIAINFO_BDAV_YES
- size_t BDAV_Size;
- #endif
- #ifdef MEDIAINFO_TSP_YES
- size_t TSP_Size;
- #endif
- #ifdef MEDIAINFO_ARIBSTDB24B37_YES
- bool FromAribStdB24B37;
- #endif
-
- //Constructor/Destructor
- File_MpegTs();
- ~File_MpegTs();
-
-private :
- //Streams management
- void Streams_Accept();
- void Streams_Fill();
- void Streams_Update();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
- void Synched_Init();
-
- //Options
- void Option_Manage ();
-
- //Buffer - Global
- void Read_Buffer_Continue();
- void Read_Buffer_AfterParsing ();
- #if MEDIAINFO_ADVANCED2
- void Read_Buffer_SegmentChange();
- #endif //MEDIAINFO_ADVANCED2
- void Read_Buffer_Unsynched();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - Per element
- void Header_Parse();
- void Header_Parse_AdaptationField();
- void Data_Parse();
-
- int16u pid;
- int8u transport_scrambling_control;
- bool payload_unit_start_indicator;
-
- //Global infos
- complete_stream* Complete_Stream;
-
- //Elements
- void PSI();
- void PES();
- void PES_Parse_Finish();
-
- //Helpers
- bool Header_Parser_QuickSearch();
-
- //Temp
- #if defined(MEDIAINFO_BDAV_YES) || defined(MEDIAINFO_TSP_YES)
- size_t TS_Size;
- #endif
- int64u MpegTs_JumpTo_Begin;
- int64u MpegTs_JumpTo_End;
- int64u Begin_MaxDuration; //in 27 MHz
- int64u Buffer_TotalBytes_LastSynched;
- bool ForceStreamDisplay;
- bool Searching_TimeStamp_Start;
-
- #if MEDIAINFO_EVENTS
- void Header_Parse_Events();
- void Header_Parse_Events_Duration(int64u program_clock_reference);
- #else //MEDIAINFO_EVENTS
- inline void Header_Parse_Events() {}
- inline void Header_Parse_Events_Duration(int64u) {}
- #endif //MEDIAINFO_EVENTS
-
- //Helpers
- void Streams_Update_Programs();
- void Streams_Update_Programs_PerStream(size_t StreamID);
- void Streams_Update_EPG();
- void Streams_Update_EPG_PerProgram(complete_stream::transport_stream::programs::iterator Program);
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- void Streams_Update_Duration_Update();
- #if MEDIAINFO_ADVANCED
- float64 Config_VbrDetection_Delta;
- int64u Config_VbrDetection_Occurences;
- bool Config_VbrDetection_GiveUp;
- #endif // MEDIAINFO_ADVANCED
- #endif //MEDIAINFO_MPEGTS_PCR_YES
- void Streams_Update_Duration_End();
- void SetAllToPES();
- void transport_private_data(int8u transport_private_data_length);
-
- #if MEDIAINFO_DUPLICATE
- //File__Duplicate
- void File__Duplicate_Streams_Finish ();
- bool File__Duplicate_Set (const Ztring &Value); //Fill a new File__Duplicate value
- void File__Duplicate_Write ();
-
- //Output buffer
- size_t Output_Buffer_Get (const String &Value);
- size_t Output_Buffer_Get (size_t Pos);
- std::vector<int16u> Output_Buffer_Get_Pos;
- #endif //MEDIAINFO_DUPLICATE
-
- //Config
- bool Config_Trace_TimeSection_OnlyFirstOccurrence;
- bool TimeSection_FirstOccurrenceParsed;
-
- #if MEDIAINFO_SEEK
- std::map<int16u, int64u> Unsynch_Frame_Counts;
- int64u Seek_Value;
- int64u Seek_Value_Maximal;
- int64u Seek_ID;
- size_t InfiniteLoop_Detect;
- bool Duration_Detected;
- #endif //MEDIAINFO_SEEK
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegTs_Duplicate.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegTs_Duplicate.cpp
deleted file mode 100644
index 578189905..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_MpegTs_Duplicate.cpp
+++ /dev/null
@@ -1,348 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Duplication helper for some specific formats
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEGTS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_MpegTs.h"
-#include "MediaInfo/MediaInfo_Config.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "ZenLib/ZtringList.h"
-#include "ZenLib/File.h"
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-#if MEDIAINFO_DUPLICATE
-void File_MpegTs::File__Duplicate_Streams_Finish ()
-{
- if (!File_Name.empty()) //Only if this is not a buffer, with buffer we can have more data
- Complete_Stream->Duplicates_Speed_FromPID.clear();
-}
-#endif //MEDIAINFO_DUPLICATE
-
-//***************************************************************************
-// Options
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_MpegTs::Option_Manage()
-{
- if (Complete_Stream && !Complete_Stream->Streams.empty())
- {
- #if MEDIAINFO_FILTER
- //File_Filter configuration
- if (Config->File_Filter_HasChanged())
- {
- bool Searching_Payload_Start=!Config->File_Filter_Get();
- for (int32u Pos=0x01; Pos<0x10; Pos++)
- Complete_Stream->Streams[Pos]->Searching_Payload_Start_Set(Searching_Payload_Start); //base PID depends of File_Filter configuration
- Complete_Stream->Streams[0x0000]->Searching_Payload_Start_Set(true); //program_map
- }
- #endif //MEDIAINFO_FILTER
-
- #if MEDIAINFO_DUPLICATE
- //File__Duplicate configuration
- if (File__Duplicate_HasChanged())
- {
- for (size_t Pos=0x0000; Pos<0x2000; Pos++)
- Complete_Stream->Streams[Pos]->ShouldDuplicate=false;
- Complete_Stream->Streams[0x0000]->ShouldDuplicate=true;
-
- //For each program
- for (complete_stream::transport_stream::programs::iterator Program=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs.begin(); Program!=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs.end(); ++Program)
- {
- //Do we want this program?
- bool Wanted=false;
- for (std::map<const String, File__Duplicate_MpegTs*>::iterator Duplicate=Complete_Stream->Duplicates.begin(); Duplicate!=Complete_Stream->Duplicates.end(); ++Duplicate)
- {
- if (Duplicate->second->Wanted_program_numbers.find(Program->first)!=Duplicate->second->Wanted_program_numbers.end())
- Wanted=true;
- if (Duplicate->second->Wanted_program_map_PIDs.find(Program->second.pid)!=Duplicate->second->Wanted_program_map_PIDs.end())
- Wanted=true;
- }
-
- //Enabling it if wanted
- if (Wanted)
- {
- Complete_Stream->Streams[Program->second.pid]->ShouldDuplicate=true;
- for (size_t Pos=0; Pos<Program->second.elementary_PIDs.size(); Pos++)
- Complete_Stream->Streams[Program->second.elementary_PIDs[Pos]]->ShouldDuplicate=true;
- }
- }
- }
- #endif //MEDIAINFO_DUPLICATE
- }
-}
-
-//***************************************************************************
-// Set
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DUPLICATE
-bool File_MpegTs::File__Duplicate_Set (const Ztring &Value)
-{
- //Form: "Code;Target" <--Generic
- //Form: "program_number" or <--clear it
- //Form: "program_number;file" or <--the exported filename is filename.program_number
- //Form: "program_number;file://filename" or <--the exported filename is specified by user
- //Form: "program_number;memory" or <--This will be a MediaInfo memory block
- //Form: "program_number;memory://pointer:size" <--Memory block is specified by user
- //WARNING: program_number & pointer must be in ***DECIMAL*** format.
- //Example: "451;memory://123456789:1316"
- ZtringList List(Value);
-
- //Backward compatibility
- bool Orders_ToRemove_Global=false;
-
- //Searching Target
- bool IsForUs=true; //True by default for backward compatibility
- std::vector<ZtringList::iterator> Targets_ToAdd;
- std::vector<ZtringList::iterator> Targets_ToRemove;
- std::vector<ZtringList::iterator> Orders_ToAdd;
- std::vector<ZtringList::iterator> Orders_ToRemove;
- for (ZtringList::iterator Current=List.begin(); Current<List.end(); ++Current)
- {
- //Detecting if we want to remove
- bool ToRemove=false;
- if (Current->find(__T('-'))==0)
- {
- ToRemove=true;
- Current->erase(Current->begin());
- }
-
- //Managing targets
- if (Current->find(__T("file:"))==0
- || Current->find(__T("memory:"))==0)
- (ToRemove?Targets_ToRemove:Targets_ToAdd).push_back(Current);
- //Parser name
- else if (Current->find(__T("parser="))==0)
- {
- if (*Current==__T("parser=MpegTs"))
- IsForUs=true;
- else
- IsForUs=false; //Backward compatibility with missing parser name
- }
- //Backward compatibility with "0"
- else if (*Current==__T("0"))
- Orders_ToRemove_Global=true;
- //Managing orders
- else
- (ToRemove?Orders_ToRemove:Orders_ToAdd).push_back(Current);
- }
-
- //For us?
- if (!IsForUs)
- return false;
-
- //Backward compatibility
- if (Orders_ToRemove_Global) //with "0"
- {
- for (std::vector<ZtringList::iterator>::iterator Order=Orders_ToAdd.begin(); Order<Orders_ToAdd.end(); ++Order)
- Orders_ToRemove.push_back(*Order);
- Orders_ToAdd.clear();
- }
-
- //For each target to add
- for (std::vector<ZtringList::iterator>::iterator Target=Targets_ToAdd.begin(); Target<Targets_ToAdd.end(); ++Target)
- {
- //Adding the target if it does not exist yet
- if (Complete_Stream->Duplicates.find(**Target)==Complete_Stream->Duplicates.end())
- {
- Complete_Stream->Duplicates[**Target]=new File__Duplicate_MpegTs(**Target);
- size_t Pos=Config->File__Duplicate_Memory_Indexes_Get(**Target);
- if (Pos!=Error)
- {
- if (Pos>=Complete_Stream->Duplicates_Speed.size())
- Complete_Stream->Duplicates_Speed.resize(Pos+1);
- Complete_Stream->Duplicates_Speed[Pos]=Complete_Stream->Duplicates[**Target];
- }
- }
-
- //For each order to add
- for (std::vector<ZtringList::iterator>::iterator Order=Orders_ToAdd.begin(); Order<Orders_ToAdd.end(); ++Order)
- Complete_Stream->Duplicates[**Target]->Configure(**Order, false);
-
- //For each order to remove
- for (std::vector<ZtringList::iterator>::iterator Order=Orders_ToRemove.begin(); Order<Orders_ToRemove.end(); ++Order)
- Complete_Stream->Duplicates[**Target]->Configure(**Order, true);
- }
-
- //For each target to remove
- for (std::vector<ZtringList::iterator>::iterator Target=Targets_ToRemove.begin(); Target<Targets_ToRemove.end(); ++Target)
- {
- std::map<const String, File__Duplicate_MpegTs*>::iterator Pointer=Complete_Stream->Duplicates.find(**Target);
- if (Pointer!=Complete_Stream->Duplicates.end())
- {
- //Duplicates_Speed
- for (std::vector<File__Duplicate_MpegTs*>::iterator Duplicate=Complete_Stream->Duplicates_Speed.begin(); Duplicate<Complete_Stream->Duplicates_Speed.end(); ++Duplicate)
- if (*Duplicate==Pointer->second)
- *Duplicate=NULL;
-
- //Duplicates_Speed_FromPID
- for (std::vector<std::vector<File__Duplicate_MpegTs*> >::iterator Duplicate_FromPID=Complete_Stream->Duplicates_Speed_FromPID.begin(); Duplicate_FromPID<Complete_Stream->Duplicates_Speed_FromPID.end(); ++Duplicate_FromPID)
- for (std::vector<File__Duplicate_MpegTs*>::iterator Duplicate=Duplicate_FromPID->begin(); Duplicate<Duplicate_FromPID->end(); ++Duplicate)
- if (*Duplicate==Pointer->second)
- *Duplicate=NULL;
-
- //Duplicate
- Complete_Stream->Duplicates.erase(**Target);
- }
- }
-
- //Informing the status has changed
- Complete_Stream->File__Duplicate_HasChanged_=true;
- if (Complete_Stream->Duplicates_Speed_FromPID.empty())
- Complete_Stream->Duplicates_Speed_FromPID.resize(0x2000);
-
- Complete_Stream->Duplicates_Speed_FromPID[0x00]=Complete_Stream->Duplicates_Speed;
-
- return true;
-}
-#endif //MEDIAINFO_DUPLICATE
-
-//***************************************************************************
-// Write
-//***************************************************************************
-
-#if MEDIAINFO_DUPLICATE
-void File_MpegTs::File__Duplicate_Write ()
-{
- const int8u* ToAdd=Buffer+Buffer_Offset-(size_t)Header_Size;
- size_t ToAdd_Size=(size_t)(Element_Size+Header_Size);
-
- std::vector<File__Duplicate_MpegTs*> &Dup_FromPID=Complete_Stream->Duplicates_Speed_FromPID[pid];
- size_t Duplicates_Speed_FromPID_Size=Complete_Stream->Duplicates_Speed_FromPID[pid].size();
- bool ToUpdate=false;
- for (size_t Pos=0; Pos<Duplicates_Speed_FromPID_Size; Pos++)
- if (Dup_FromPID[Pos] && Dup_FromPID[Pos]->Write(pid, ToAdd, ToAdd_Size))
- ToUpdate=true;
- if (ToUpdate)
- {
- Complete_Stream->Duplicates_Speed_FromPID.clear();
- Complete_Stream->Duplicates_Speed_FromPID.resize(0x2000);
- Complete_Stream->Duplicates_Speed_FromPID[0x0000]=Complete_Stream->Duplicates_Speed;
- size_t Duplicates_Speed_Size=Complete_Stream->Duplicates_Speed.size();
- for (size_t Pos=0; Pos<Duplicates_Speed_Size; Pos++)
- {
- File__Duplicate_MpegTs* Dup=Complete_Stream->Duplicates_Speed[Pos];
- size_t program_map_PIDs_Size=Complete_Stream->Duplicates_Speed[Pos]->program_map_PIDs.size();
- for (size_t program_map_PIDs_Pos=0; program_map_PIDs_Pos<program_map_PIDs_Size; program_map_PIDs_Pos++)
- if (Dup->program_map_PIDs[program_map_PIDs_Pos])
- {
- bool AlreadyPresent=false;
- for (size_t Duplicates_Speed_FromPID_Pos=0; Duplicates_Speed_FromPID_Pos<Complete_Stream->Duplicates_Speed_FromPID[program_map_PIDs_Pos].size(); Duplicates_Speed_FromPID_Pos++)
- if (Complete_Stream->Duplicates_Speed_FromPID[program_map_PIDs_Pos][Duplicates_Speed_FromPID_Pos]==Dup)
- AlreadyPresent=true;
- if (!AlreadyPresent)
- Complete_Stream->Duplicates_Speed_FromPID[program_map_PIDs_Pos].push_back(Dup);
- }
- size_t elementary_PIDs_Size=Complete_Stream->Duplicates_Speed[Pos]->program_map_PIDs.size();
- for (size_t elementary_PIDs_Pos=0; elementary_PIDs_Pos<elementary_PIDs_Size; elementary_PIDs_Pos++)
- if (Dup->elementary_PIDs[elementary_PIDs_Pos])
- {
- bool AlreadyPresent=false;
- for (size_t Duplicates_Speed_FromPID_Pos=0; Duplicates_Speed_FromPID_Pos<Complete_Stream->Duplicates_Speed_FromPID[elementary_PIDs_Pos].size(); Duplicates_Speed_FromPID_Pos++)
- if (Complete_Stream->Duplicates_Speed_FromPID[elementary_PIDs_Pos][Duplicates_Speed_FromPID_Pos]==Dup)
- AlreadyPresent=true;
- if (!AlreadyPresent)
- Complete_Stream->Duplicates_Speed_FromPID[elementary_PIDs_Pos].push_back(Dup);
- }
- }
- }
-}
-#endif //MEDIAINFO_DUPLICATE
-
-//***************************************************************************
-// Output_Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DUPLICATE
-size_t File_MpegTs::Output_Buffer_Get (const String &Code)
-{
- if (Complete_Stream==NULL)
- return 0;
- std::map<const String, File__Duplicate_MpegTs*>::iterator Stream=Complete_Stream->Duplicates.find(Code);
- if (Stream==Complete_Stream->Duplicates.end())
- return 0;
-
- return Stream->second->Output_Buffer_Get();
-
- //Was used for test (AVC output), but is a lot too slow, must find something else
- /*
- if (size_t Size=Stream->second->Output_Buffer_Get())
- return Size;
-
- //Parsing Parsers
- for (size_t Stream_Pos=0; Stream_Pos<Streams.size(); Stream_Pos++)
- if (Streams[Stream_Pos].Parser)
- if (size_t Size=Streams[Stream_Pos].Parser->Output_Buffer_Get(Code))
- return Size;
-
- return 0;
- */
-}
-#endif //MEDIAINFO_DUPLICATE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DUPLICATE
-size_t File_MpegTs::Output_Buffer_Get (size_t Pos)
-{
- if (Complete_Stream!=NULL && Pos<Complete_Stream->Duplicates_Speed.size() && Complete_Stream->Duplicates_Speed[Pos]!=NULL)
- if (size_t Size=Complete_Stream->Duplicates_Speed[Pos]->Output_Buffer_Get())
- return Size;
-
- //Parsing Parsers
- /*
- for (size_t Stream_Pos=0; Stream_Pos<Complete_Stream->Streams.size(); Stream_Pos++)
- if (Complete_Stream->Streams[Stream_Pos].Parser)
- if (size_t Size=Complete_Stream->Streams[Stream_Pos].Parser->Output_Buffer_Get(Pos))
- {
- //Optimization
- //if (Output_Buffer_Get_Pos.size()<=Pos)
- // Output_Buffer_Get_Pos.resize(Pos+1, (int16u)-1);
- //Output_Buffer_Get_Pos[Pos]=Stream_Pos;
-
- return Size;
- }
- */
-
- return 0;
-}
-#endif //MEDIAINFO_DUPLICATE
-
-} //NameSpace
-
-#endif //MEDIAINFO_MPEGTS_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Descriptors.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Descriptors.cpp
deleted file mode 100644
index a6ae0e5ce..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Descriptors.cpp
+++ /dev/null
@@ -1,3466 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEGPS_YES) || defined(MEDIAINFO_MPEGTS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Mpeg_Descriptors.h"
-#ifdef MEDIAINFO_MPEG4_YES
- #include "MediaInfo/Multiple/File_Mpeg4_Descriptors.h"
-#endif
-#include <cmath>
-using namespace std;
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-namespace Elements
-{
- const int32u AC_3=0x41432D33; //Exactly AC-3
- const int32u BSSD=0x42535344; //PCM
- const int32u CUEI=0x43554549; //SCTE
- const int32u DTS1=0x44545331; //DTS
- const int32u DTS2=0x44545332; //DTS
- const int32u DTS3=0x44545333; //DTS
- const int32u GA94=0x47413934; //ATSC - Terrestrial
- const int32u HDMV=0x48444D56; //BluRay
- const int32u HEVC=0x48455643; //HEVC
- const int32u KLVA=0x4B4C5641; //KLV Packets
- const int32u S14A=0x53313441; //ATSC - Satellite
- const int32u SCTE=0x53435445; //SCTE
- const int32u TSHV=0x54534856; //TSHV
- const int32u VC_1=0x56432D31; //Exactly VC-1
- const int32u drac=0x64726163; //Dirac
-
- const int32u MANZ=0x4D414E5A; //Manzanita Systems
-
- const int32u DVB =0x00000001; //Forced value, does not exist is stream
-}
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//Extern
-extern const char* Avc_profile_idc(int8u profile_idc);
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Descriptors_audio_type(int8u ID)
-{
- switch (ID)
- {
- case 0x00 : return "Undefined";
- case 0x01 : return "Clean effects";
- case 0x02 : return "Hearing impaired";
- case 0x03 : return "Visual impaired commentary";
- default : return "Reserved";
- }
-}
-
-const char* Mpeg_Descriptors_alignment_type(int8u alignment_type)
-{
- switch (alignment_type)
- {
- case 0x01 : return "Slice or video access unit (Video), or sync word (Audio)";
- case 0x02 : return "Video access unit";
- case 0x03 : return "GOP, or SEQ";
- case 0x04 : return "SEQ";
- default : return "Reserved";
- }
-}
-
-const char* Mpeg_Descriptors_teletext_type(int8u teletext_type)
-{
- switch (teletext_type)
- {
- case 0x01 : return "Teletext";
- case 0x02 : return "Teletext Subtitle";
- case 0x03 : return "Teletext"; //additional information page
- case 0x04 : return "Teletext"; //programme schedule page
- case 0x05 : return "Teletext Subtitle"; //for hearing impaired people
- default : return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_teletext_type_more(int8u teletext_type)
-{
- switch (teletext_type)
- {
- case 0x03 : return "Additional information page";
- case 0x04 : return "Programme schedule page";
- case 0x05 : return "For hearing impaired people";
- default : return "";
- }
-}
-
-const char* Mpeg_Descriptors_content_nibble_level_1(int8u content_nibble_level_1)
-{
- switch (content_nibble_level_1)
- {
- case 0x00 : return "undefined";
- case 0x01 : return "movie/drama";
- case 0x02 : return "news/current affairs";
- case 0x03 : return "show/game show";
- case 0x04 : return "sports";
- case 0x05 : return "children's/youth programmes";
- case 0x06 : return "music/ballet/dance";
- case 0x07 : return "arts/culture (without music)";
- case 0x08 : return "social/political issues/economics";
- case 0x09 : return "education/science/factual topics";
- case 0x0A : return "leisure hobbies";
- case 0x0B : return "Special characteristics:";
- default :
- if (content_nibble_level_1==0x0F)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_content_nibble_level_2_01(int8u content_nibble_level_2)
-{
- switch (content_nibble_level_2)
- {
- case 0x00 : return "movie/drama";
- case 0x01 : return "detective/thriller";
- case 0x02 : return "adventure/western/war";
- case 0x03 : return "science fiction/fantasy/horror";
- case 0x04 : return "comedy";
- case 0x05 : return "soap/melodrama/folkloric";
- case 0x06 : return "romance";
- case 0x07 : return "serious/classical/religious/historical movie/drama";
- case 0x08 : return "adult movie/drama";
- default :
- if (content_nibble_level_2==0x0F)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_content_nibble_level_2_02(int8u content_nibble_level_2)
-{
- switch (content_nibble_level_2)
- {
- case 0x00 : return "news/current affairs";
- case 0x01 : return "news/weather report";
- case 0x02 : return "news magazine";
- case 0x03 : return "documentary";
- case 0x04 : return "discussion/interview/debate";
- default :
- if (content_nibble_level_2==0x0F)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_content_nibble_level_2_03(int8u content_nibble_level_2)
-{
- switch (content_nibble_level_2)
- {
- case 0x00 : return "show/game show";
- case 0x01 : return "game show/quiz/contest";
- case 0x02 : return "variety show";
- case 0x03 : return "talk show";
- default :
- if (content_nibble_level_2==0x0F)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_content_nibble_level_2_04(int8u content_nibble_level_2)
-{
- switch (content_nibble_level_2)
- {
- case 0x00 : return "sports";
- case 0x01 : return "special events";
- case 0x02 : return "sports magazines";
- case 0x03 : return "football/soccer";
- case 0x04 : return "tennis/squash";
- case 0x05 : return "team sports (excluding football)";
- case 0x06 : return "athletics";
- case 0x07 : return "motor sport";
- case 0x08 : return "water sport";
- case 0x09 : return "winter sports";
- case 0x0A : return "equestrian";
- case 0x0B : return "martial sports";
- default :
- if (content_nibble_level_2==0x0F)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_content_nibble_level_2_05(int8u content_nibble_level_2)
-{
- switch (content_nibble_level_2)
- {
- case 0x00 : return "children's/youth programmes";
- case 0x01 : return "pre-school children's programmes";
- case 0x02 : return "entertainment programmes for 6 to 14";
- case 0x03 : return "entertainment programmes for 10 to 16";
- case 0x04 : return "informational/educational/school programmes";
- case 0x05 : return "cartoons/puppets";
- default :
- if (content_nibble_level_2==0x0F)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_content_nibble_level_2_06(int8u content_nibble_level_2)
-{
- switch (content_nibble_level_2)
- {
- case 0x00 : return "music/ballet/dance";
- case 0x01 : return "rock/pop";
- case 0x02 : return "serious music/classical music";
- case 0x03 : return "folk/traditional music";
- case 0x04 : return "jazz";
- case 0x05 : return "musical/opera";
- case 0x06 : return "ballet";
- default :
- if (content_nibble_level_2==0x0F)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_content_nibble_level_2_07(int8u content_nibble_level_2)
-{
- switch (content_nibble_level_2)
- {
- case 0x00 : return "arts/culture (without music)";
- case 0x01 : return "performing arts";
- case 0x02 : return "fine arts";
- case 0x03 : return "religion";
- case 0x04 : return "popular culture/traditional arts";
- case 0x05 : return "literature";
- case 0x06 : return "film/cinema";
- case 0x07 : return "experimental film/video";
- case 0x08 : return "broadcasting/press";
- case 0x09 : return "new media";
- case 0x0A : return "arts/culture magazines";
- case 0x0B : return "fashion";
- default :
- if (content_nibble_level_2==0x0F)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_content_nibble_level_2_08(int8u content_nibble_level_2)
-{
- switch (content_nibble_level_2)
- {
- case 0x00 : return "social/political issues/economics";
- case 0x01 : return "magazines/reports/documentary";
- case 0x02 : return "economics/social advisory";
- case 0x03 : return "remarkable people";
- default :
- if (content_nibble_level_2==0x0F)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_content_nibble_level_2_09(int8u content_nibble_level_2)
-{
- switch (content_nibble_level_2)
- {
- case 0x00 : return "education/science/factual topics";
- case 0x01 : return "nature/animals/environment";
- case 0x02 : return "technology/natural sciences";
- case 0x03 : return "medicine/physiology/psychology";
- case 0x04 : return "foreign countries/expeditions";
- case 0x05 : return "social/spiritual sciences";
- case 0x06 : return "further education";
- case 0x07 : return "languages";
- default :
- if (content_nibble_level_2==0x0F)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_content_nibble_level_2_0A(int8u content_nibble_level_2)
-{
- switch (content_nibble_level_2)
- {
- case 0x00 : return "leisure hobbies";
- case 0x01 : return "tourism/travel";
- case 0x02 : return "handicraft";
- case 0x03 : return "motoring";
- case 0x04 : return "fitness and health";
- case 0x05 : return "cooking";
- case 0x06 : return "advertisement/shopping";
- case 0x07 : return "gardening";
- default :
- if (content_nibble_level_2==0x0F)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_content_nibble_level_2_0B(int8u content_nibble_level_2)
-{
- switch (content_nibble_level_2)
- {
- case 0x00 : return "original language";
- case 0x01 : return "black and white";
- case 0x02 : return "unpublished";
- case 0x03 : return "live broadcast";
- default :
- if (content_nibble_level_2==0x0F)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_content_nibble_level_2(int8u content_nibble_level_1, int8u content_nibble_level_2)
-{
- switch (content_nibble_level_1)
- {
- case 0x00 : return "undefined";
- case 0x01 : return Mpeg_Descriptors_content_nibble_level_2_01(content_nibble_level_2);
- case 0x02 : return Mpeg_Descriptors_content_nibble_level_2_02(content_nibble_level_2);
- case 0x03 : return Mpeg_Descriptors_content_nibble_level_2_03(content_nibble_level_2);
- case 0x04 : return Mpeg_Descriptors_content_nibble_level_2_04(content_nibble_level_2);
- case 0x05 : return Mpeg_Descriptors_content_nibble_level_2_05(content_nibble_level_2);
- case 0x06 : return Mpeg_Descriptors_content_nibble_level_2_06(content_nibble_level_2);
- case 0x07 : return Mpeg_Descriptors_content_nibble_level_2_07(content_nibble_level_2);
- case 0x08 : return Mpeg_Descriptors_content_nibble_level_2_08(content_nibble_level_2);
- case 0x09 : return Mpeg_Descriptors_content_nibble_level_2_09(content_nibble_level_2);
- case 0x0A : return Mpeg_Descriptors_content_nibble_level_2_0A(content_nibble_level_2);
- case 0x0B : return Mpeg_Descriptors_content_nibble_level_2_0B(content_nibble_level_2);
- default :
- if (content_nibble_level_1==0x0F)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_linkage_type(int8u linkage_type)
-{
- switch (linkage_type)
- {
- case 0x00 : return "reserved for future use";
- case 0x01 : return "information service";
- case 0x02 : return "Electronic Programme Guide (EPG) service";
- case 0x03 : return "CA replacement service";
- case 0x04 : return "transport stream containing complete Network/Bouquet SI";
- case 0x05 : return "service replacement service";
- case 0x06 : return "data broadcast service";
- case 0xFF : return "reserved for future use";
- default :
- if (linkage_type>=0x80)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_dvb_service_type(int8u service_type)
-{
- switch (service_type)
- {
- case 0x01 : return "digital television";
- case 0x02 : return "digital radio";
- case 0x03 : return "teletext";
- case 0x04 : return "NVOD reference";
- case 0x05 : return "NVOD time-shifted";
- case 0x06 : return "Mosaic";
- case 0x0A : return "advanced codec digital radio sound";
- case 0x0B : return "advanced codec mosaic service";
- case 0x0C : return "data broadcast";
- case 0x0D : return "reserved for Common Interface Usage";
- case 0x0E : return "RCS Map";
- case 0x0F : return "RCS FLS";
- case 0x10 : return "DVB MHP";
- case 0x11 : return "MPEG-2 HD digital television";
- case 0x16 : return "advanced codec SD digital television";
- case 0x17 : return "advanced codec SD NVOD time-shifted";
- case 0x18 : return "advanced codec SD NVOD reference";
- case 0x19 : return "advanced codec HD digital television";
- case 0x1A : return "advanced codec HD NVOD time-shifted";
- case 0x1B : return "advanced codec HD NVOD reference";
- case 0xFF : return "reserved for future use";
- default :
- if (service_type>=0x80)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_stream_content(int8u stream_content)
-{
- switch (stream_content)
- {
- case 0x01 : return "MPEG-2 Video";
- case 0x02 : return "MPEG-1 Audio L2";
- case 0x03 : return "Subtitle";
- case 0x04 : return "AC3";
- case 0x05 : return "AVC";
- case 0x06 : return "HE-AAC";
- case 0x07 : return "DTS";
- default :
- if (stream_content>=0x0C)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_component_type_O1(int8u component_type)
-{
- switch (component_type)
- {
- case 0x01 : return "4:3 aspect ratio, 25 Hz";
- case 0x02 : return "16:9 aspect ratio with pan vectors, 25 Hz";
- case 0x03 : return "16:9 aspect ratio without pan vectors, 25 Hz";
- case 0x04 : return ">16:9 aspect ratio, 25 Hz";
- case 0x05 : return "4:3 aspect ratio, 30 Hz";
- case 0x06 : return "16:9 aspect ratio with pan vectors, 30 Hz";
- case 0x07 : return "16:9 aspect ratio without pan vectors, 30 Hz";
- case 0x08 : return ">16:9 aspect ratio, 30 Hz";
- case 0x09 : return "4:3 aspect ratio, 25 Hz (high definition)";
- case 0x0A : return "16:9 aspect ratio with pan vectors, 25 Hz (high definition)";
- case 0x0B : return "16:9 aspect ratio without pan vectors, 25 Hz (high definition)";
- case 0x0C : return ">16:9 aspect ratio, 25 Hz (high definition)";
- case 0x0D : return "4:3 aspect ratio, 30 Hz (high definition)";
- case 0x0E : return "16:9 aspect ratio with pan vectors, 30 Hz (high definition)";
- case 0x0F : return "16:9 aspect ratio without pan vectors, 30 Hz (high definition)";
- case 0x10 : return ">16:9 aspect ratio, 30 Hz (high definition)";
- default :
- if (component_type>=0xB0 && component_type<=0xFE)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_component_type_O2(int8u component_type)
-{
- switch (component_type)
- {
- case 0x01 : return "single mono channel";
- case 0x02 : return "dual mono channel";
- case 0x03 : return "stereo (2 channel)";
- case 0x04 : return "multi-lingual, multi-channel";
- case 0x05 : return "surround sound";
- case 0x40 : return "description for the visually impaired";
- case 0x41 : return "for the hard of hearing";
- case 0x42 : return "receiver-mixed supplementary audio";
- default :
- if (component_type>=0xB0 && component_type<=0xFE)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_component_type_O3(int8u component_type)
-{
- switch (component_type)
- {
- case 0x01 : return "EBU Teletext subtitles";
- case 0x02 : return "associated EBU Teletext";
- case 0x03 : return "VBI data";
- case 0x10 : return "DVB subtitle (normal) with no monitor aspect ratio criticality";
- case 0x11 : return "DVB subtitle (normal) for display on 4:3 aspect ratio monitor";
- case 0x12 : return "DVB subtitle (normal) for display on 16:9 aspect ratio monitor";
- case 0x13 : return "DVB subtitle (normal) for display on 2.21:1 aspect ratio monitor";
- case 0x20 : return "DVB subtitle (for the hard of hearing) with no monitor aspect ratio criticality";
- case 0x21 : return "DVB subtitle (for the hard of hearing) for display on 4:3 aspect ratio monitor";
- case 0x22 : return "DVB subtitle (for the hard of hearing) for display on 16:9 aspect ratio monitor";
- case 0x23 : return "DVB subtitle (for the hard of hearing) for display on 2.21:1 aspect ratio monitor";
- default :
- if (component_type>=0xB0 && component_type<=0xFE)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_component_type_O4(int8u)
-{
- return "Defined by AC3";
-}
-
-const char* Mpeg_Descriptors_component_type_O5(int8u component_type)
-{
- switch (component_type)
- {
- case 0x01 : return "4:3 aspect ratio, 25 Hz";
- case 0x03 : return "16:9 aspect ratio, 25 Hz";
- case 0x04 : return ">16:9 aspect ratio, 25 Hz";
- case 0x05 : return "4:3 aspect ratio, 30 Hz";
- case 0x07 : return "16:9 aspect ratio, 30 Hz";
- case 0x08 : return ">16:9 aspect ratio, 30 Hz";
- case 0x0B : return "16:9 aspect ratio, 25 Hz (high definition)";
- case 0x0C : return ">16:9 aspect ratio, 25 Hz (high definition)";
- case 0x0F : return "16:9 aspect ratio, 30 Hz (high definition)";
- case 0x10 : return ">16:9 aspect ratio, 30 Hz (high definition)";
- default :
- if (component_type>=0xB0 && component_type<=0xFE)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_component_type_O6(int8u component_type)
-{
- switch (component_type)
- {
- case 0x01 : return "single mono channel";
- case 0x03 : return "stereo";
- case 0x05 : return "surround sound";
- case 0x40 : return "description for the visually impaired";
- case 0x41 : return "for the hard of hearing";
- case 0x42 : return "receiver-mixed supplementary audio";
- case 0x43 : return "astereo (v2)";
- case 0x44 : return "description for the visually impaired (v2)";
- case 0x45 : return "for the hard of hearing (v2)";
- case 0x46 : return "receiver-mixed supplementary audio (v2)";
- default :
- if (component_type>=0xB0 && component_type<=0xFE)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_component_type_O7(int8u)
-{
- return "Defined by DTS";
-}
-
-const char* Mpeg_Descriptors_codepage_1(int8u codepage)
-{
- switch (codepage)
- {
- case 0x01 : return "ISO/IEC 8859-5 (Cyrillic)";
- case 0x02 : return "ISO/IEC 8859-6 (Arabic)";
- case 0x03 : return "ISO/IEC 8859-7 (Greek)";
- case 0x04 : return "ISO/IEC 8859-8 (Hebrew)";
- case 0x05 : return "ISO/IEC 8859-9 (Latin)";
- case 0x06 : return "ISO/IEC 8859-10 (Latin)";
- case 0x07 : return "ISO/IEC 8859-11 (Thai)";
- case 0x08 : return "ISO/IEC 8859-12 (Indian)";
- case 0x09 : return "ISO/IEC 8859-13 (Latin)";
- case 0x0A : return "ISO/IEC 8859-14 (Celtic)";
- case 0x0B : return "ISO/IEC 8859-15 (Latin)";
- case 0x11 : return "ISO/IEC 10646-1 (Basic Multilingual Plane)";
- case 0x12 : return "KSC5601-1987 (Korean)";
- case 0x13 : return "GB-2312-1980 (Simplified Chinese)";
- case 0x14 : return "Big5 (Traditional Chinese)";
- case 0x15 : return "UTF-8 (Basic Multilingual Plane)";
- default : return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_component_type(int8u stream_content, int8u component_type)
-{
- switch (stream_content)
- {
- case 0x01 : return Mpeg_Descriptors_component_type_O1(component_type);
- case 0x02 : return Mpeg_Descriptors_component_type_O2(component_type);
- case 0x03 : return Mpeg_Descriptors_component_type_O3(component_type);
- case 0x04 : return Mpeg_Descriptors_component_type_O4(component_type);
- case 0x05 : return Mpeg_Descriptors_component_type_O5(component_type);
- case 0x06 : return Mpeg_Descriptors_component_type_O6(component_type);
- case 0x07 : return Mpeg_Descriptors_component_type_O7(component_type);
- default :
- if (component_type>=0xB0 && component_type<=0xFE)
- return "user defined";
- else
- return "reserved for future use";
- }
-}
-
-const char* Mpeg_Descriptors_registration_format_identifier_Format(int32u format_identifier)
-{
- switch (format_identifier)
- {
- case Elements::AC_3 : return "AC-3";
- case Elements::BSSD : return "PCM"; //AES3
- case Elements::CUEI : return "SCTE 35 2003 - Digital Program Insertion Cueing Message for Cable";
- case Elements::DTS1 : return "DTS"; //512
- case Elements::DTS2 : return "DTS"; //1024
- case Elements::DTS3 : return "DTS"; //2048
- case Elements::GA94 : return "ATSC - Terrestrial";
- case Elements::HDMV : return "Blu-ray";
- case Elements::HEVC : return "HEVC";
- case Elements::KLVA : return "KLV";
- case Elements::S14A : return "ATSC - Satellite";
- case Elements::SCTE : return "SCTE 54 2003 - DV Service Multiplex and Transport System for Cable Television";
- case Elements::TSHV : return "DV";
- case Elements::VC_1 : return "VC-1";
- case Elements::MANZ : return "Manzanita Systems"; //Manzanita Systems
- default : return "";
- }
-}
-
-stream_t Mpeg_Descriptors_registration_format_identifier_StreamKind(int32u format_identifier)
-{
- switch (format_identifier)
- {
- case Elements::AC_3 : return Stream_Audio;
- case Elements::BSSD : return Stream_Audio;
- case Elements::DTS1 : return Stream_Audio;
- case Elements::DTS2 : return Stream_Audio;
- case Elements::DTS3 : return Stream_Audio;
- case Elements::HEVC : return Stream_Video;
- case Elements::VC_1 : return Stream_Video;
- default : return Stream_Max;
- }
-}
-
-const char* Mpeg_Descriptors_stream_Format(int8u descriptor_tag, int32u format_identifier)
-{
- switch (descriptor_tag)
- {
- case 0x02 : return "MPEG Video";
- case 0x03 : return "MPEG Audio";
- case 0x1B : return "MPEG-4 Visual";
- case 0x1C : return "AAC";
- case 0x28 : return "AVC";
- case 0x2B : return "AAC";
- case 0x2D : return "Text";
- default :
- switch (format_identifier)
- {
- case Elements::CUEI :
- case Elements::SCTE : //SCTE
- case Elements::GA94 :
- case Elements::S14A : //ATSC
- switch (descriptor_tag)
- {
- case 0x81 : return "AC-3";
- default : return "";
- }
- case Elements::AC_3 : return "AC-3";
- case Elements::DTS1 : return "DTS";
- case Elements::DTS2 : return "DTS";
- case Elements::DTS3 : return "DTS";
- case Elements::KLVA : return "KLV";
- case Elements::HEVC : return "HEVC";
- case Elements::VC_1 : return "VC-1";
- case Elements::drac : return "Dirac";
- default :
- switch (descriptor_tag)
- {
- case 0x56 : return "Teletext";
- case 0x59 : return "DVB Subtitle";
- case 0x6A : return "AC-3";
- case 0x7A : return "E-AC-3";
- case 0x7B : return "DTS";
- case 0x7C : return "AAC";
- case 0x81 : return "AC-3";
- default : return "";
- }
- }
- }
-}
-
-const char* Mpeg_Descriptors_stream_Codec(int8u descriptor_tag, int32u format_identifier)
-{
- switch (descriptor_tag)
- {
- case 0x02 : return "MPEG-V";
- case 0x03 : return "MPEG-A";
- case 0x1B : return "MPEG-4V";
- case 0x1C : return "AAC";
- case 0x28 : return "AVC";
- case 0x2B : return "AAC";
- case 0x2D : return "Text";
- default :
- switch (format_identifier)
- {
- case Elements::CUEI :
- case Elements::SCTE : //SCTE
- case Elements::GA94 :
- case Elements::S14A : //ATSC
- switch (descriptor_tag)
- {
- case 0x81 : return "AC3";
- default : return "";
- }
- case Elements::AC_3 : return "AC3";
- case Elements::DTS1 : return "DTS";
- case Elements::DTS2 : return "DTS";
- case Elements::DTS3 : return "DTS";
- case Elements::KLVA : return "KLV";
- case Elements::HEVC : return "HEVC";
- case Elements::VC_1 : return "VC-1";
- case Elements::drac : return "Dirac";
- default :
- switch (descriptor_tag)
- {
- case 0x56 : return "Teletext";
- case 0x59 : return "DVB Subtitle";
- case 0x6A : return "AC3";
- case 0x7A : return "AC3+";
- case 0x7B : return "DTS";
- case 0x7C : return "AAC";
- case 0x81 : return "AC3";
- default : return "";
- }
- }
- }
-}
-
-stream_t Mpeg_Descriptors_stream_Kind(int8u descriptor_tag, int32u format_identifier)
-{
- switch (descriptor_tag)
- {
- case 0x02 : return Stream_Video;
- case 0x03 : return Stream_Audio;
- case 0x1B : return Stream_Video;
- case 0x1C : return Stream_Audio;
- case 0x28 : return Stream_Video;
- case 0x2B : return Stream_Audio;
- case 0x2D : return Stream_Text;
- default :
- switch (format_identifier)
- {
- case Elements::CUEI :
- case Elements::SCTE : //SCTE
- case Elements::GA94 :
- case Elements::S14A : //ATSC
- switch (descriptor_tag)
- {
- case 0x81 : return Stream_Audio;
- default : return Stream_Max;
- }
- case Elements::AC_3 : return Stream_Audio;
- case Elements::DTS1 : return Stream_Audio;
- case Elements::DTS2 : return Stream_Audio;
- case Elements::DTS3 : return Stream_Audio;
- case Elements::HEVC : return Stream_Video;
- case Elements::VC_1 : return Stream_Video;
- case Elements::drac : return Stream_Video;
- default :
- switch (descriptor_tag)
- {
- case 0x56 : return Stream_Text;
- case 0x59 : return Stream_Text;
- case 0x6A : return Stream_Audio;
- case 0x7A : return Stream_Audio;
- case 0x7B : return Stream_Audio;
- case 0x7C : return Stream_Audio;
- case 0x81 : return Stream_Audio;
- default : return Stream_Max;
- }
- }
- }
-}
-
-const char* Mpeg_Descriptors_MPEG_4_audio_profile_and_level(int8u MPEG_4_audio_profile_and_level)
-{
- switch (MPEG_4_audio_profile_and_level)
- {
- case 0x10 : return "Main@L1";
- case 0x11 : return "Main@L2";
- case 0x12 : return "Main@L3";
- case 0x13 : return "Main@L4";
- case 0x18 : return "Scalable@L1";
- case 0x19 : return "Scalable@L2";
- case 0x1A : return "Scalable@L3";
- case 0x1B : return "Scalable@L4";
- case 0x20 : return "Speech@L1";
- case 0x21 : return "Speech@L2";
- case 0x28 : return "Synthesis@L1";
- case 0x29 : return "Synthesis@L2";
- case 0x2A : return "Synthesis@L3";
- case 0x30 : return "High quality audio@L1";
- case 0x31 : return "High quality audio@L2";
- case 0x32 : return "High quality audio@L3";
- case 0x33 : return "High quality audio@L4";
- case 0x34 : return "High quality audio@L5";
- case 0x35 : return "High quality audio@L6";
- case 0x36 : return "High quality audio@L7";
- case 0x37 : return "High quality audio@L8";
- case 0x38 : return "Low delay audio@L1";
- case 0x39 : return "Low delay audio@L2";
- case 0x3A : return "Low delay audio@L3";
- case 0x3B : return "Low delay audio@L4";
- case 0x3C : return "Low delay audio@L5";
- case 0x3D : return "Low delay audio@L6";
- case 0x3E : return "Low delay audio@L7";
- case 0x3F : return "Low delay audio@L8";
- case 0x40 : return "Natural audio@L1";
- case 0x41 : return "Natural audio@L2";
- case 0x42 : return "Natural audio@L3";
- case 0x43 : return "Natural audio@L4";
- case 0x48 : return "Mobile audio internetworking@L1";
- case 0x49 : return "Mobile audio internetworking@L2";
- case 0x4A : return "Mobile audio internetworking@L3";
- case 0x4B : return "Mobile audio internetworking@L4";
- case 0x4C : return "Mobile audio internetworking@L5";
- case 0x4D : return "Mobile audio internetworking@L6";
- case 0x50 : return "LC@L1";
- case 0x51 : return "LC@L2";
- case 0x52 : return "LC@L3";
- case 0x53 : return "LC@L4";
- case 0x58 : return "HE-AAC@L2 / LC@L2";
- case 0x59 : return "HE-AAC@L3 / LC@L3";
- case 0x5A : return "HE-AAC@L4 / LC@L4";
- case 0x5B : return "HE-AAC@L5 / LC@L5";
- case 0x60 : return "HE-AACv2@L2 / HE-AAC@L2 / LC@L2";
- case 0x61 : return "HE-AACv2@L3 / HE-AAC@L3 / LC@L3";
- case 0x62 : return "HE-AACv2@L4 / HE-AAC@L4 / LC@L4";
- case 0x63 : return "HE-AACv2@L5 / HE-AAC@L5 / LC@L5";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-extern const float32 Mpegv_frame_rate[]; //In Video/File_Mpegv.cpp
-extern const char* Mpegv_Colorimetry_format[]; //In Video/File_Mpegv.cpp
-extern const char* Mpegv_profile_and_level_indication_profile[]; //In Video/File_Mpegv.cpp
-extern const char* Mpegv_profile_and_level_indication_level[]; //In Video/File_Mpegv.cpp
-
-//---------------------------------------------------------------------------
-extern const char* Mpega_Version[]; //In Audio/File_Mpega.cpp
-extern const char* Mpega_Layer[]; //In Audio/File_Mpega.cpp
-extern const char* Mpega_Format_Profile_Version[]; //In Audio/File_Mpega.cpp
-extern const char* Mpega_Format_Profile_Layer[]; //In Audio/File_Mpega.cpp
-
-//---------------------------------------------------------------------------
-extern const int32u AC3_SamplingRate[]; //In Audio/File_Ac3.cpp
-extern const int16u AC3_BitRate[]; //In Audio/File_Ac3.cpp
-extern const char* AC3_ChannelPositions[]; //In Audio/File_Ac3.cpp
-extern const int8u AC3_Channels[]; //In Audio/File_Ac3.cpp
-extern const char* AC3_Mode[]; //In Audio/File_Ac3.cpp
-extern const char* AC3_Surround[]; //In Audio/File_Ac3.cpp
-
-const char* Mpeg_Descriptors_AC3_Channels[]=
-{
- "1",
- "2",
- "2",
- "2",
- "3+",
- "6+",
- "",
- "",
-};
-
-const char* Mpeg_Descriptors_AC3_Priority[]=
-{
- "",
- "Primary Audio",
- "Other Audio",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Descriptors_bandwidth[]=
-{
- "8 MHz",
- "7 MHz",
- "6 MHz",
- "5 MHz",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Descriptors_constellation[]=
-{
- "QPSK",
- "16-QAM",
- "64-QAM",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Descriptors_hierarchy_information[]=
-{
- "non-hierarchical, native interleaver",
- "1, native interleaver",
- "2, native interleaver",
- "4, native interleaver",
- "non-hierarchical, in-depth interleaver",
- "1, in-depth interleaver",
- "2, in-depth interleaver",
- "4, in-depth interleaver",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Descriptors_code_rate[]=
-{
- "1/2",
- "2/3",
- "3/4",
- "5/6",
- "7/8",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Descriptors_guard_interval[]=
-{
- "1/32",
- "1/16",
- "1/8",
- "1/4",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Descriptors_transmission_mode[]=
-{
- "2k mode",
- "8k mode",
- "4k mode",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Descriptors_original_network_id(int16u original_network_id)
-{
- switch (original_network_id)
- {
- case 0x0001 : return "Astra Satellite Network 19,2'E";
- case 0x0002 : return "Astra Satellite Network 28,2'E";
- case 0x0003 : return "Astra 1";
- case 0x0004 : return "Astra 2";
- case 0x0005 : return "Astra 3";
- case 0x0006 : return "Astra 4";
- case 0x0007 : return "Astra 5";
- case 0x0008 : return "Astra 6";
- case 0x0009 : return "Astra 7";
- case 0x000A : return "Astra 8";
- case 0x000B : return "Astra 9";
- case 0x000C : return "Astra 10";
- case 0x000D : return "Astra 11";
- case 0x000E : return "Astra 12";
- case 0x000F : return "Astra 13";
- case 0x0010 : return "Astra 14";
- case 0x0011 : return "Astra 15";
- case 0x0012 : return "Astra 16";
- case 0x0013 : return "Astra 17";
- case 0x0014 : return "Astra 18";
- case 0x0015 : return "Astra 19";
- case 0x0016 : return "Astra 20";
- case 0x0017 : return "Astra 21";
- case 0x0018 : return "Astra 22";
- case 0x0019 : return "Astra 23";
- case 0x0020 : return "ASTRA";
- case 0x0021 : return "Hispasat Network 1";
- case 0x0022 : return "Hispasat Network 2";
- case 0x0023 : return "Hispasat Network 3";
- case 0x0024 : return "Hispasat Network 4";
- case 0x0025 : return "Hispasat Network 5";
- case 0x0026 : return "Hispasat Network 6";
- case 0x0027 : return "Hispasat 30'W (FSS)";
- case 0x0028 : return "Hispasat 30'W (DBS)";
- case 0x0029 : return "Hispasat 30'W (America)";
- case 0x0030 : return "Canal+ Satellite Network";
- case 0x0031 : return "Hispasat – VIA DIGITAL";
- case 0x0032 : return "Hispasat Network 7";
- case 0x0033 : return "Hispasat Network 8";
- case 0x0034 : return "Hispasat Network 9";
- case 0x0035 : return "Nethold Main Mux System";
- case 0x0037 : return "STENTOR";
- case 0x0040 : return "HPT – Croatian Post and Telecommunications";
- case 0x0041 : return "Mindport";
- case 0x0046 : return "1 degree W (Telenor)";
- case 0x0047 : return "1 degree W (Telenor)";
- case 0x0050 : return "HRT – Croatian Radio and Television";
- case 0x0051 : return "Havas";
- case 0x0052 : return "Osaka Yusen Satellite";
- case 0x0055 : return "Sirius Satellite System";
- case 0x0058 : return "Thiacom 1 & 2 co-located 78.5'E (UBC Thailand)";
- case 0x005E : return "Sirius Satellite System (Nordic Coverage)";
- case 0x005F : return "Sirius Satellite System (FSS)";
- case 0x0060 : return "Deutsche Telekom";
- case 0x0069 : return "Optus B3 156'E";
- case 0x0070 : return "BONUM1 36 Degrees East (NTV+)";
- case 0x007E : return "Eutelsat Satellite System at 7'E";
- case 0x0073 : return "PanAmSat 4 68.5'E";
- case 0x0085 : return "BetaTechnik";
- case 0x0090 : return "TDF";
- case 0x00A0 : return "News Datacom";
- case 0x00A1 : return "News Datacom";
- case 0x00A2 : return "News Datacom";
- case 0x00A3 : return "News Datacom";
- case 0x00A4 : return "News Datacom";
- case 0x00A5 : return "News Datacom";
- case 0x00A6 : return "ART";
- case 0x00A7 : return "Globecast";
- case 0x00A8 : return "Foxtel";
- case 0x00A9 : return "Sky New Zealand";
- case 0x00B0 : return "TPS";
- case 0x00B1 : return "TPS";
- case 0x00B2 : return "TPS";
- case 0x00B3 : return "TPS";
- case 0x00B4 : return "Telesat 107.3'W";
- case 0x00B5 : return "Telesat 111.1'W";
- case 0x00BA : return "Satellite Express – 6 (80'E)";
- case 0x00C0 : return "Canal+";
- case 0x00C1 : return "Canal+";
- case 0x00C2 : return "Canal+";
- case 0x00C3 : return "Canal+";
- case 0x00C4 : return "Canal+";
- case 0x00C5 : return "Canal+";
- case 0x00C6 : return "Canal+";
- case 0x00C7 : return "Canal+";
- case 0x00C8 : return "Canal+";
- case 0x00C9 : return "Canal+";
- case 0x00CA : return "Canal+";
- case 0x00CB : return "Canal+";
- case 0x00CC : return "Canal+";
- case 0x00CD : return "Canal+";
- case 0x0100 : return "ExpressVu Express";
- case 0x010E : return "Eutelsat Satellite System at 10'E";
- case 0x0110 : return "Mediaset";
- case 0x013E : return "Eutelsat Satellite System at 13'E";
- case 0x016E : return "Eutelsat Satellite System at 16'E";
- case 0x029E : return "Eutelsat Satellite System at 29'E";
- case 0x02BE : return "Arabsat Arabsat (Scientific Atlanta, Eutelsat)";
- case 0x036E : return "Eutelsat Satellite System at 36'E";
- case 0x03E8 : return "Telia";
- case 0x048E : return "Eutelsat Satellite System at 48'E";
- case 0x0800 : return "Nilesat 101";
- case 0x0801 : return "Nilesat 101";
- case 0x0880 : return "MEASAT 1, 91.5'E";
- case 0x0882 : return "MEASAT 2, 91.5'E";
- case 0x0883 : return "MEASAT 2, 148.0'E";
- case 0x088F : return "MEASAT 3";
- case 0x1000 : return "Optus B3 156'E Optus Communications";
- case 0x1001 : return "DISH Network Echostar Communications";
- case 0x1002 : return "Dish Network 61.5 W Echostar Communications";
- case 0x1003 : return "Dish Network 83 W Echostar Communications";
- case 0x1004 : return "Dish Network 119 W Echostar Communications";
- case 0x1005 : return "Dish Network 121 W Echostar Communications";
- case 0x1006 : return "Dish Network 148 W Echostar Communications";
- case 0x1007 : return "Dish Network 175 W Echostar Communications";
- case 0x1008 : return "Dish Network W Echostar Communications";
- case 0x1009 : return "Dish Network X Echostar Communications";
- case 0x100A : return "Dish Network Y Echostar Communications";
- case 0x100B : return "Dish Network Z Echostar Communications";
- case 0x2000 : return "Thiacom 1 & 2 co-located 78.5'E";
- case 0x22D4 : return "Spanish Digital Terrestrial Television";
- case 0x22F1 : return "Swedish Digital Terrestrial Television";
- case 0x233A : return "UK Digital Terrestrial Television";
- case 0x2024 : return "Australian Digital Terrestrial Television";
- case 0x2114 : return "German Digital Terrestrial Television";
- case 0x3000 : return "PanAmSat 4 68.5'E";
- case 0x5000 : return "Irdeto Mux System";
- case 0xF000 : return "Small Cable networks";
- case 0xF001 : return "Deutsche Telekom";
- case 0xF010 : return "Telefonica Cable";
- case 0xF020 : return "Cable and Wireless Communication";
- case 0xFBFC : return "MATAV";
- case 0xFBFD : return "Telia Kabel-TV";
- case 0xFBFE : return "TPS";
- case 0xFBFF : return "Stream";
- case 0xFC00 : return "France Telecom Cable";
- case 0xFC10 : return "Rhone Vision Cable";
- case 0xFD00 : return "Lyonnaise Communications";
- case 0xFE00 : return "TeleDenmark Cable TV";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Descriptors_CA_system_ID(int16u CA_system_ID)
-{
- switch (CA_system_ID)
- {
- case 0x0100 : return "Seca Mediaguard 1/2";
- case 0x0101 : return "RusCrypto";
- case 0x0464 : return "EuroDec";
- case 0x0500 : return "TPS-Crypt or Viaccess";
- case 0x0602 :
- case 0x0604 :
- case 0x0606 :
- case 0x0608 :
- case 0x0622 :
- case 0x0626 : return "Irdeto";
- case 0x0700 : return "DigiCipher 2";
- case 0x0911 :
- case 0x0919 :
- case 0x0960 :
- case 0x0961 : return "NDS Videoguard 1/2";
- case 0x0B00 : return "Conax CAS 5 /7";
- case 0x0D00 :
- case 0x0D02 :
- case 0x0D03 :
- case 0x0D05 :
- case 0x0D07 :
- case 0x0D20 : return "Cryptoworks";
- case 0x0E00 : return "PowerVu";
- case 0x1000 : return "RAS (Remote Authorisation System)";
- case 0x1702 :
- case 0x1722 :
- case 0x1762 : return "BetaCrypt 1 or Nagravision";
- case 0x1710 : return "BetaCrypt 2";
- case 0x1800 :
- case 0x1801 :
- case 0x1810 :
- case 0x1830 : return "Nagravision";
- case 0x22F0 : return "Codicrypt";
- case 0x2600 : return "BISS";
- case 0x4800 : return "Accessgate";
- case 0x4900 : return "China Crypt";
- case 0x4A10 : return "EasyCas";
- case 0x4A20 : return "AlphaCrypt";
- case 0x4A60 :
- case 0x4A61 :
- case 0x4A63 : return "SkyCrypt or Neotioncrypt or Neotion SHL";
- case 0x4A70 : return "DreamCrypt";
- case 0x4A80 : return "ThalesCrypt";
- case 0x4AA1 : return "KeyFly";
- case 0x4ABF : return "DG-Crypt";
- case 0x4AD0 :
- case 0x4AD1 : return "X-Crypt";
- case 0x4AD4 : return "OmniCrypt";
- case 0x4AE0 : return "RossCrypt";
- case 0x4B13 : return "PlayReady";
- case 0x5500 : return "Z-Crypt or DRE-Crypt";
- case 0x5501 : return "Griffin";
- default : return "Encrypted";
- }
-}
-
-//---------------------------------------------------------------------------
-bool Mpeg_Descriptors_CA_system_ID_MustSkipSlices(int16u CA_system_ID)
-{
- switch (CA_system_ID)
- {
- case 0x4B13 : // PlayReady
- return true;
- default : return false; //We try, it is not sure
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Mpeg_Descriptors::File_Mpeg_Descriptors()
-{
- //In
- Complete_Stream=NULL;
- transport_stream_id=0x0000;
- pid=0x0000;
- table_id=0x00;
- table_id_extension=0x0000;
- elementary_PID=0x0000;
- program_number=0x0000;
- registration_format_identifier = 0x00000000;
- stream_type=0x00;
- event_id=0x0000;
- elementary_PID_IsValid=false;
- program_number_IsValid=false;
- registration_format_identifier_IsValid = false;
- stream_type_IsValid=false;
- event_id_IsValid=false;
-
- //Out
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::FileHeader_Parse()
-{
- Accept();
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Header_Parse()
-{
- int8u descriptor_tag=0, descriptor_length=0;
- Get_B1 (descriptor_tag, "descriptor_tag");
- Get_B1 (descriptor_length, "descriptor_length");
-
- //Size
- if (Element_Size)
- Header_Fill_Size(Element_Size);
- if (Element_Offset)
- Header_Fill_Size(Element_Offset);
- if (descriptor_length)
- Header_Fill_Size(descriptor_length);
-
- if (Element_Size<Element_Offset+descriptor_length)
- {
- Element_WaitForMoreData();
- return;
- }
-
- //Filling
- Header_Fill_Code(descriptor_tag, Ztring().From_Number(descriptor_tag, 16));
- Header_Fill_Size(2+descriptor_length);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Data_Parse()
-{
- #define ELEMENT_CASE(_NAME, _DETAIL) \
- case 0x##_NAME : Element_Name(_DETAIL); Descriptor_##_NAME(); break;
-
- //Parsing
- if (table_id> 0x00 && table_id<0x40)
- {
- switch (Element_Code)
- {
- ELEMENT_CASE(00, "Reserved");
- ELEMENT_CASE(01, "Reserved");
- ELEMENT_CASE(02, "video_stream");
- ELEMENT_CASE(03, "audio_stream");
- ELEMENT_CASE(04, "hierarchy");
- ELEMENT_CASE(05, "registration");
- ELEMENT_CASE(06, "data_stream_alignment");
- ELEMENT_CASE(07, "target_background_grid");
- ELEMENT_CASE(08, "Video_window");
- ELEMENT_CASE(09, "CA");
- ELEMENT_CASE(0A, "ISO_639_language");
- ELEMENT_CASE(0B, "System_clock");
- ELEMENT_CASE(0C, "Multiplex_buffer_utilization");
- ELEMENT_CASE(0D, "Copyright");
- ELEMENT_CASE(0E, "Maximum_bitrate");
- ELEMENT_CASE(0F, "Private_data_indicator");
- ELEMENT_CASE(10, "Smoothing_buffer");
- ELEMENT_CASE(11, "STD");
- ELEMENT_CASE(12, "IBP");
- ELEMENT_CASE(13, "Defined in ISO/IEC 13818-6");
- ELEMENT_CASE(14, "Defined in ISO/IEC 13818-6");
- ELEMENT_CASE(15, "Defined in ISO/IEC 13818-6");
- ELEMENT_CASE(16, "Defined in ISO/IEC 13818-6");
- ELEMENT_CASE(17, "Defined in ISO/IEC 13818-6");
- ELEMENT_CASE(18, "Defined in ISO/IEC 13818-6");
- ELEMENT_CASE(19, "Defined in ISO/IEC 13818-6");
- ELEMENT_CASE(1A, "Defined in ISO/IEC 13818-6");
- ELEMENT_CASE(1B, "MPEG-4_video");
- ELEMENT_CASE(1C, "MPEG-4_audio");
- ELEMENT_CASE(1D, "IOD");
- ELEMENT_CASE(1E, "SL");
- ELEMENT_CASE(1F, "FMC");
- ELEMENT_CASE(20, "External_ES_ID");
- ELEMENT_CASE(21, "MuxCode");
- ELEMENT_CASE(22, "FmxBufferSize");
- ELEMENT_CASE(23, "multiplexbuffer");
- ELEMENT_CASE(24, "content_labeling");
- ELEMENT_CASE(25, "metadata_pointer");
- ELEMENT_CASE(26, "metadata");
- ELEMENT_CASE(27, "metadata_STD");
- ELEMENT_CASE(28, "AVC video");
- ELEMENT_CASE(29, "IPMP"); //ISO-IEC 13818-11
- ELEMENT_CASE(2A, "AVC timing and HRD");
- ELEMENT_CASE(2B, "MPEG-2 AAC audio");
- ELEMENT_CASE(2C, "FlexMux_Timing");
- ELEMENT_CASE(2D, "MPEG-4_text");
- ELEMENT_CASE(2E, "MPEG-4_audio_extension");
- ELEMENT_CASE(2F, "Auxiliary_video_data");
- ELEMENT_CASE(30, "SVC extension");
- ELEMENT_CASE(31, "MVC extension");
- ELEMENT_CASE(32, "J2K video");
- ELEMENT_CASE(33, "MVC operation point");
- ELEMENT_CASE(34, "MPEG2_stereoscopic_video_format");
- ELEMENT_CASE(35, "Stereoscopic_program_info");
- ELEMENT_CASE(36, "Stereoscopic_video_info");
- ELEMENT_CASE(37, "ODUpdate");
- ELEMENT_CASE(38, "Transport_profile");
- ELEMENT_CASE(39, "HEVC video");
- ELEMENT_CASE(3A, "HEVC timing and HRD");
- ELEMENT_CASE(3F, "Extension");
-
- //Following is in private sections, in case there is not network type detected
- ELEMENT_CASE(40, "DVB - network_name_descriptor");
- ELEMENT_CASE(41, "DVB - service_list_descriptor");
- ELEMENT_CASE(42, "DVB - stuffing_descriptor");
- ELEMENT_CASE(43, "DVB - satellite_delivery_system_descriptor");
- ELEMENT_CASE(44, "DVB - cable_delivery_system_descriptor");
- ELEMENT_CASE(45, "DVB - VBI_data_descriptor");
- ELEMENT_CASE(46, "DVB - VBI_teletext_descriptor");
- ELEMENT_CASE(47, "DVB - bouquet_name_descriptor");
- ELEMENT_CASE(48, "DVB - service_descriptor");
- ELEMENT_CASE(49, "DVB - country_availability_descriptor");
- ELEMENT_CASE(4A, "DVB - linkage_descriptor");
- ELEMENT_CASE(4B, "DVB - NVOD_reference_descriptor");
- ELEMENT_CASE(4C, "DVB - time_shifted_service_descriptor");
- ELEMENT_CASE(4D, "DVB - short_event_descriptor");
- ELEMENT_CASE(4E, "DVB - extended_event_descriptor");
- ELEMENT_CASE(4F, "DVB - time_shifted_event_descriptor");
- ELEMENT_CASE(50, "DVB - component_descriptor");
- ELEMENT_CASE(51, "DVB - mosaic_descriptor");
- ELEMENT_CASE(52, "DVB - stream_identifier_descriptor");
- ELEMENT_CASE(53, "DVB - CA_identifier_descriptor");
- ELEMENT_CASE(54, "DVB - content_descriptor");
- ELEMENT_CASE(55, "DVB - parental_rating_descriptor");
- ELEMENT_CASE(56, "DVB - teletext_descriptor");
- ELEMENT_CASE(57, "DVB - telephone_descriptor");
- ELEMENT_CASE(58, "DVB - local_time_offset_descriptor");
- ELEMENT_CASE(59, "DVB - subtitling_descriptor");
- ELEMENT_CASE(5A, "DVB - terrestrial_delivery_system_descriptor");
- ELEMENT_CASE(5B, "DVB - multilingual_network_name_descriptor");
- ELEMENT_CASE(5C, "DVB - multilingual_bouquet_name_descriptor");
- ELEMENT_CASE(5D, "DVB - multilingual_service_name_descriptor");
- ELEMENT_CASE(5E, "DVB - multilingual_component_descriptor");
- ELEMENT_CASE(5F, "DVB - private_data_specifier_descriptor");
- ELEMENT_CASE(60, "DVB - service_move_descriptor");
- ELEMENT_CASE(61, "DVB - short_smoothing_buffer_descriptor");
- ELEMENT_CASE(62, "DVB - frequency_list_descriptor");
- ELEMENT_CASE(63, "DVB - partial_transport_stream_descriptor");
- ELEMENT_CASE(64, "DVB - data_broadcast_descriptor");
- ELEMENT_CASE(65, "DVB - scrambling_descriptor");
- ELEMENT_CASE(66, "DVB - data_broadcast_id_descriptor");
- ELEMENT_CASE(67, "DVB - transport_stream_descriptor");
- ELEMENT_CASE(68, "DVB - DSNG_descriptor");
- ELEMENT_CASE(69, "DVB - PDC_descriptor");
- ELEMENT_CASE(6A, "DVB - AC-3_descriptor");
- ELEMENT_CASE(6B, "DVB - ancillary_data_descriptor");
- ELEMENT_CASE(6C, "DVB - cell_list_descriptor");
- ELEMENT_CASE(6D, "DVB - cell_frequency_link_descriptor");
- ELEMENT_CASE(6E, "DVB - announcement_support_descriptor");
- ELEMENT_CASE(6F, "DVB - application_signalling_descriptor");
- ELEMENT_CASE(70, "DVB - adaptation_field_data_descriptor");
- ELEMENT_CASE(71, "DVB - service_identifier_descriptor");
- ELEMENT_CASE(72, "DVB - service_availability_descriptor");
- ELEMENT_CASE(73, "DVB - default_authority_descriptor");
- ELEMENT_CASE(74, "DVB - related_content_descriptor");
- ELEMENT_CASE(75, "DVB - TVA_id_descriptor");
- ELEMENT_CASE(76, "DVB - content_identifier_descriptor");
- ELEMENT_CASE(77, "DVB - time_slice_fec_identifier_descriptor");
- ELEMENT_CASE(78, "DVB - ECM_repetition_rate_descriptor");
- ELEMENT_CASE(79, "DVB - S2_satellite_delivery_system_descriptor");
- ELEMENT_CASE(7A, "DVB - enhanced_AC-3_descriptor");
- ELEMENT_CASE(7B, "DVB - DTS descriptor");
- ELEMENT_CASE(7C, "DVB - AAC descriptor");
- ELEMENT_CASE(7D, "DVB - reserved for future use");
- ELEMENT_CASE(7E, "DVB - reserved for future use");
- ELEMENT_CASE(7F, "DVB - extension descriptor");
- ELEMENT_CASE(80, "ATSC - stuffing");
- ELEMENT_CASE(81, "ATSC - AC-3 audio");
- ELEMENT_CASE(86, "ATSC - caption service");
- ELEMENT_CASE(87, "ATSC - content advisory");
- ELEMENT_CASE(A0, "ATSC - extended channel name");
- ELEMENT_CASE(A1, "ATSC - service location");
- ELEMENT_CASE(A2, "ATSC - time-shifted service");
- ELEMENT_CASE(A3, "ATSC - component name");
- ELEMENT_CASE(A8, "ATSC - DCC Departing Request");
- ELEMENT_CASE(A9, "ATSC - DCC Arriving Request");
- ELEMENT_CASE(AA, "ATSC - Redistribution Control");
- ELEMENT_CASE(AB, "ATSC - DCC Location Code");
- ELEMENT_CASE(C1, "ARIB - Digital Copy Control");
- ELEMENT_CASE(C4, "SMPTE - ANC"); //SMPTE ST 2038
- ELEMENT_CASE(C8, "ARIB - Video Decode Control");
- ELEMENT_CASE(DE, "ARIB - Content Availability");
- ELEMENT_CASE(E9, "CableLabs - Encoder Boundary Point");
- ELEMENT_CASE(FC, "ARIB - Emergency Information");
- ELEMENT_CASE(FD, "ARIB - Data Component");
-
- default: if (Element_Code>=0x40)
- Element_Info1("user private");
- else
- Element_Info1("unknown");
- Skip_XX(Element_Size, "Data");
- break;
- }
- }
- else if (table_id>=0x40 && table_id<0x80)
- {
- switch (Element_Code)
- {
- ELEMENT_CASE(40, "DVB - network_name_descriptor");
- ELEMENT_CASE(41, "DVB - service_list_descriptor");
- ELEMENT_CASE(42, "DVB - stuffing_descriptor");
- ELEMENT_CASE(43, "DVB - satellite_delivery_system_descriptor");
- ELEMENT_CASE(44, "DVB - cable_delivery_system_descriptor");
- ELEMENT_CASE(45, "DVB - VBI_data_descriptor");
- ELEMENT_CASE(46, "DVB - VBI_teletext_descriptor");
- ELEMENT_CASE(47, "DVB - bouquet_name_descriptor");
- ELEMENT_CASE(48, "DVB - service_descriptor");
- ELEMENT_CASE(49, "DVB - country_availability_descriptor");
- ELEMENT_CASE(4A, "DVB - linkage_descriptor");
- ELEMENT_CASE(4B, "DVB - NVOD_reference_descriptor");
- ELEMENT_CASE(4C, "DVB - time_shifted_service_descriptor");
- ELEMENT_CASE(4D, "DVB - short_event_descriptor");
- ELEMENT_CASE(4E, "DVB - extended_event_descriptor");
- ELEMENT_CASE(4F, "DVB - time_shifted_event_descriptor");
- ELEMENT_CASE(50, "DVB - component_descriptor");
- ELEMENT_CASE(51, "DVB - mosaic_descriptor");
- ELEMENT_CASE(52, "DVB - stream_identifier_descriptor");
- ELEMENT_CASE(53, "DVB - CA_identifier_descriptor");
- ELEMENT_CASE(54, "DVB - content_descriptor");
- ELEMENT_CASE(55, "DVB - parental_rating_descriptor");
- ELEMENT_CASE(56, "DVB - teletext_descriptor");
- ELEMENT_CASE(57, "DVB - telephone_descriptor");
- ELEMENT_CASE(58, "DVB - local_time_offset_descriptor");
- ELEMENT_CASE(59, "DVB - subtitling_descriptor");
- ELEMENT_CASE(5A, "DVB - terrestrial_delivery_system_descriptor");
- ELEMENT_CASE(5B, "DVB - multilingual_network_name_descriptor");
- ELEMENT_CASE(5C, "DVB - multilingual_bouquet_name_descriptor");
- ELEMENT_CASE(5D, "DVB - multilingual_service_name_descriptor");
- ELEMENT_CASE(5E, "DVB - multilingual_component_descriptor");
- ELEMENT_CASE(5F, "DVB - private_data_specifier_descriptor");
- ELEMENT_CASE(60, "DVB - service_move_descriptor");
- ELEMENT_CASE(61, "DVB - short_smoothing_buffer_descriptor");
- ELEMENT_CASE(62, "DVB - frequency_list_descriptor");
- ELEMENT_CASE(63, "DVB - partial_transport_stream_descriptor");
- ELEMENT_CASE(64, "DVB - data_broadcast_descriptor");
- ELEMENT_CASE(65, "DVB - scrambling_descriptor");
- ELEMENT_CASE(66, "DVB - data_broadcast_id_descriptor");
- ELEMENT_CASE(67, "DVB - transport_stream_descriptor");
- ELEMENT_CASE(68, "DVB - DSNG_descriptor");
- ELEMENT_CASE(69, "DVB - PDC_descriptor");
- ELEMENT_CASE(6A, "DVB - AC-3_descriptor");
- ELEMENT_CASE(6B, "DVB - ancillary_data_descriptor");
- ELEMENT_CASE(6C, "DVB - cell_list_descriptor");
- ELEMENT_CASE(6D, "DVB - cell_frequency_link_descriptor");
- ELEMENT_CASE(6E, "DVB - announcement_support_descriptor");
- ELEMENT_CASE(6F, "DVB - application_signalling_descriptor");
- ELEMENT_CASE(70, "DVB - adaptation_field_data_descriptor");
- ELEMENT_CASE(71, "DVB - service_identifier_descriptor");
- ELEMENT_CASE(72, "DVB - service_availability_descriptor");
- ELEMENT_CASE(73, "DVB - default_authority_descriptor");
- ELEMENT_CASE(74, "DVB - related_content_descriptor");
- ELEMENT_CASE(75, "DVB - TVA_id_descriptor");
- ELEMENT_CASE(76, "DVB - content_identifier_descriptor");
- ELEMENT_CASE(77, "DVB - time_slice_fec_identifier_descriptor");
- ELEMENT_CASE(78, "DVB - ECM_repetition_rate_descriptor");
- ELEMENT_CASE(79, "DVB - S2_satellite_delivery_system_descriptor");
- ELEMENT_CASE(7A, "DVB - enhanced_AC-3_descriptor");
- ELEMENT_CASE(7B, "DVB - DTS descriptor");
- ELEMENT_CASE(7C, "DVB - AAC descriptor");
- ELEMENT_CASE(7D, "DVB - reserved for future use");
- ELEMENT_CASE(7E, "DVB - reserved for future use");
- ELEMENT_CASE(7F, "DVB - extension descriptor");
- default: if (Element_Code>=0x40)
- Element_Info1("user private");
- else
- Element_Info1("unknown");
- Skip_XX(Element_Size, "Data");
- break;
- }
- }
- else if ((table_id>=0xC0 && table_id<0xE0))
- {
- switch (Element_Code)
- {
- ELEMENT_CASE(80, "ATSC - stuffing");
- ELEMENT_CASE(81, "ATSC - AC-3 audio");
- ELEMENT_CASE(86, "ATSC - caption service");
- ELEMENT_CASE(87, "ATSC - content advisory");
- ELEMENT_CASE(A0, "ATSC - extended channel name");
- ELEMENT_CASE(A1, "ATSC - service location");
- ELEMENT_CASE(A2, "ATSC - time-shifted service");
- ELEMENT_CASE(A3, "ATSC - component name");
- ELEMENT_CASE(A8, "ATSC - DCC Departing Request");
- ELEMENT_CASE(A9, "ATSC - DCC Arriving Request");
- ELEMENT_CASE(AA, "ATSC - Redistribution Control");
- ELEMENT_CASE(AB, "ATSC - DCC Location Code");
- default: if (Element_Code>=0x40)
- Element_Info1("user private");
- else
- Element_Info1("unknown");
- Skip_XX(Element_Size, "Data");
- break;
- }
- }
- else if (table_id==0xFC)
- {
- //SCTE 35
- #undef ELEMENT_CASE
- #define ELEMENT_CASE(_NAME, _DETAIL) \
- case 0x##_NAME : Element_Name(_DETAIL); CUEI_##_NAME(); break;
- switch (Element_Code)
- {
- ELEMENT_CASE(00, "SCTE35 - avail_descriptor");
- ELEMENT_CASE(01, "SCTE35 - DTMF_descriptor");
- ELEMENT_CASE(02, "SCTE35 - segmentation_descriptor");
- default: Element_Info1("SCTE35 - Reserved");
- Skip_XX(Element_Size, "Data");
- break;
- }
- }
- else
- {
- if (Element_Code>=0x40)
- Element_Info1("user private");
- else
- Element_Info1("unknown");
- Skip_XX(Element_Size, "Data");
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_02()
-{
- //Parsing
- int8u frame_rate_code;
- bool multiple_frame_rate_flag, MPEG_1_only_flag;
- int8u profile_and_level_indication_profile=4, profile_and_level_indication_level=10, chroma_format=1;
- bool frame_rate_extension_flag=false;
- BS_Begin();
- Get_SB ( multiple_frame_rate_flag, "multiple_frame_rate_flag");
- Get_S1 (4, frame_rate_code, "frame_rate_code"); Param_Info1(Mpegv_frame_rate[frame_rate_code]);
- Get_SB ( MPEG_1_only_flag, "MPEG_1_only_flag");
- Skip_SB( "constrained_parameter_flag");
- Skip_SB( "still_picture_flag");
- if (MPEG_1_only_flag==0)
- {
- Skip_SB( "profile_and_level_indication_escape");
- Get_S1 (3, profile_and_level_indication_profile, "profile_and_level_indication_profile"); Param_Info1(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile]);
- Get_S1 (4, profile_and_level_indication_level, "profile_and_level_indication_level"); Param_Info1(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level]);
- Get_S1 (2, chroma_format, "chroma_format"); Param_Info1(Mpegv_Colorimetry_format[chroma_format]);
- Get_SB ( frame_rate_extension_flag, "frame_rate_extension_flag");
- Skip_S1(5, "reserved");
- }
- BS_End();
-
- //Filling
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- if (!multiple_frame_rate_flag && !frame_rate_extension_flag && frame_rate_code)
- Complete_Stream->Streams[elementary_PID]->Infos["FrameRate"]=Ztring::ToZtring(Mpegv_frame_rate[frame_rate_code]);
- Complete_Stream->Streams[elementary_PID]->Infos["Format_Version"]=MPEG_1_only_flag?__T("Version 1"):__T("Version 2");
- Complete_Stream->Streams[elementary_PID]->Infos["Colorimetry"]=Mpegv_Colorimetry_format[chroma_format];
- if (profile_and_level_indication_profile)
- {
- Complete_Stream->Streams[elementary_PID]->Infos["Format_Profile"]=Ztring().From_Local(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile])+__T("@")+Ztring().From_Local(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level]);
- Complete_Stream->Streams[elementary_PID]->Infos["Codec_Profile"]=Ztring().From_Local(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile])+__T("@")+Ztring().From_Local(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level]);
- }
- }
- break;
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_03()
-{
- //Parsing
- int8u ID, layer;
- bool variable_rate_audio_indicator;
- BS_Begin();
- Skip_SB( "free_format_flag");
- Get_S1 (1, ID, "ID"); Param_Info1(Mpega_Version[2+ID]); //Mpega_Version is with MPEG2.5 hack
- Get_S1 (2, layer, "layer"); Param_Info1(Mpega_Layer[layer]);
- Get_SB ( variable_rate_audio_indicator, "variable_rate_audio_indicator");
- Skip_S1(3, "reserved");
- BS_End();
-
- FILLING_BEGIN();
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->Infos["BitRate_Mode"]=variable_rate_audio_indicator?__T("VBR"):__T("CBR");
- Complete_Stream->Streams[elementary_PID]->Infos["Codec"]=Ztring(Mpega_Version[ID])+Ztring(Mpega_Layer[layer]);
- Complete_Stream->Streams[elementary_PID]->Infos["Format"]=__T("MPEG Audio");
- Complete_Stream->Streams[elementary_PID]->Infos["Format_Version"]=Mpega_Format_Profile_Version[ID];
- Complete_Stream->Streams[elementary_PID]->Infos["Format_Profile"]=Mpega_Format_Profile_Layer[layer];
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_05()
-{
- //Parsing
- int32u format_identifier;
- Get_B4 (format_identifier, "format_identifier"); Element_Info1(Mpeg_Descriptors_registration_format_identifier_Format(format_identifier)); Param_Info1(Mpeg_Descriptors_registration_format_identifier_Format(format_identifier));
- if (Element_Size-Element_Offset>0)
- Skip_XX(Element_Size-Element_Offset, "additional_identification_info");
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- switch (elementary_PID_IsValid)
- {
- case false : //Per program
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[table_id_extension].registration_format_identifier=format_identifier;
- break;
- case true : //Per PES
- Complete_Stream->Streams[elementary_PID]->registration_format_identifier=format_identifier;
- Complete_Stream->Streams[elementary_PID]->Infos["format_identifier"]=Ztring().From_CC4(format_identifier);
- if (Complete_Stream->Streams[elementary_PID]->Infos["format_identifier"].size()!=4)
- {
- Ztring Temp; Temp.From_Number(format_identifier, 16);
- if (Temp.size()<8)
- Temp.insert(0, 8-Temp.size(), __T('0'));
- Complete_Stream->Streams[elementary_PID]->Infos["format_identifier"]=__T("0x")+Temp;
- }
- Complete_Stream->Streams[elementary_PID]->Infos_Option["format_identifier"]=__T("N NT");
- if (format_identifier==Elements::KLVA)
- {
- Complete_Stream->Streams[elementary_PID]->Infos["Format"]=__T("KLV");
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[table_id_extension].HasNotDisplayableStreams=true;
- }
- //Coherency
- if (stream_type==0x81 && Complete_Stream->Streams[elementary_PID]->registration_format_identifier==Elements::BSSD)
- Complete_Stream->Streams[elementary_PID]->registration_format_identifier=0x00000000; //Reseting it, this combinaision is not possible but a stream has it
- break;
- }
- break;
- default : ;
- }
- FILLING_ELSE()
- switch (table_id)
- {
- case 0x02 : //program_map_section
- switch (elementary_PID_IsValid)
- {
- case false : //Per program
- break;
- case true : //Per PES
- Complete_Stream->Streams[elementary_PID]->Infos["format_identifier"]=__T("(INVALID)");
- Complete_Stream->Streams[elementary_PID]->Infos_Option["format_identifier"]=__T("N NT");
- break;
- }
- break;
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_06()
-{
- //Parsing
- Info_B1(alignment_type, "alignment_type"); Param_Info1(Mpeg_Descriptors_alignment_type(alignment_type));
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_07()
-{
- //Parsing
- BS_Begin();
- Skip_S1(14, "horizontal_size");
- Skip_S1(14, "vertical_size");
- Skip_S1( 4, "aspect_ratio_information"); //Same as ISO/IEC 13818-2
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_08()
-{
- //Parsing
- BS_Begin();
- Skip_S1(14, "horizontal_offset");
- Skip_S1(14, "vertical_offset");
- Skip_S1( 4, "window_priority");
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_09()
-{
- //Parsing
- int16u CA_system_ID, CA_PID;
- Get_B2 (CA_system_ID, "CA_system_ID"); Param_Info1(Mpeg_Descriptors_CA_system_ID(CA_system_ID));
- BS_Begin();
- Skip_S1( 3, "reserved");
- Get_S2 (13, CA_PID, "CA_PID");
- BS_End();
- if (Element_Size-Element_Offset>0)
- Skip_XX(Element_Size-Element_Offset, "private_data_byte");
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x01 : //conditional_access_section
- if (Complete_Stream->Streams[CA_PID]->Kind==complete_stream::stream::unknown) //Priority to PES, if this is a PES, we skip the CA
- {
- Complete_Stream->Streams[CA_PID]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[CA_PID]->Table_IDs.resize(0x100);
- #ifdef MEDIAINFO_MPEGTS_ALLSTREAMS_YES
- Complete_Stream->Streams[CA_PID]->Searching_Payload_Start_Set(true);
- #endif
- }
- break;
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->CA_system_ID=CA_system_ID;
- Complete_Stream->Streams[elementary_PID]->CA_system_ID_MustSkipSlices=Mpeg_Descriptors_CA_system_ID_MustSkipSlices(CA_system_ID);
- if (CA_PID<Complete_Stream->Streams.size() && Complete_Stream->Streams[CA_PID]->Kind==complete_stream::stream::unknown) //Priority to PES, if this is a PES, we skip the CA
- {
- Complete_Stream->Streams[CA_PID]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[CA_PID]->Table_IDs.resize(0x100);
- #ifdef MEDIAINFO_MPEGTS_ALLSTREAMS_YES
- Complete_Stream->Streams[CA_PID]->Searching_Payload_Start_Set(true);
- #endif
- }
- }
- break;
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_0A()
-{
- //Parsing
- int32u ISO_639_language_code;
- int8u audio_type;
- Get_C3 (ISO_639_language_code, "ISO_639_language_code");
- Get_B1 (audio_type, "audio_type"); Param_Info1(Mpeg_Descriptors_audio_type(audio_type));
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Ztring ISO_639_2;
- if (ISO_639_language_code)
- ISO_639_2.From_CC3(ISO_639_language_code);
- const Ztring& ISO_639_1=MediaInfoLib::Config.Iso639_1_Get(ISO_639_2);
- Complete_Stream->Streams[elementary_PID]->Infos["Language"]=ISO_639_1.empty()?ISO_639_2:ISO_639_1;
- if (audio_type)
- Complete_Stream->Streams[elementary_PID]->Infos["Language_More"]=Mpeg_Descriptors_audio_type(audio_type);
- }
- break;
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_0B()
-{
- //Parsing
- int8u clock_accuracy_integer, clock_accuracy_exponent;
- BS_Begin();
- Skip_SB( "external_clock_reference_indicator");
- Skip_SB( "reserved");
- Get_S1 (6, clock_accuracy_integer, "clock_accuracy_integer");
- Get_S1 (3, clock_accuracy_exponent, "clock_accuracy_exponent"); Param_Info1(Ztring::ToZtring(clock_accuracy_integer*(int64u)pow(10.0, clock_accuracy_exponent)));
- Skip_S1(5, "reserved");
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_0D()
-{
- //Parsing
- int32u copyright_identifier;
- Get_B4 (copyright_identifier, "copyright_identifier");
- if ((copyright_identifier&0xFF000000)>=0x61000000 && (copyright_identifier&0xFF000000)<=0x7A000000
- && (copyright_identifier&0x00FF0000)>=0x00610000 && (copyright_identifier&0x00FF0000)<=0x007A0000
- && (copyright_identifier&0x0000FF00)>=0x00006100 && (copyright_identifier&0x0000FF00)<=0x00007A00
- && (copyright_identifier&0x000000FF)>=0x00000061 && (copyright_identifier&0x000000FF)<=0x0000007A)
- {
- Param_Info1(Ztring().From_CC4(copyright_identifier));
- Element_Info1(Ztring().From_CC4(copyright_identifier));
- }
- if (copyright_identifier==Elements::MANZ)
- {
- if (Element_Offset<Element_Size)
- Skip_Local(Element_Size-Element_Offset, "Info");
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Infos["Encoded_Library"]=__T("Manzanita Systems");
- }
-
- if (Element_Offset<Element_Size)
- Skip_Local(Element_Size-Element_Offset, "Info");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_0E()
-{
- //Parsing
- int32u maximum_bitrate;
- BS_Begin();
- Skip_S1( 2, "reserved");
- Get_S3 (22, maximum_bitrate, "maximum_bitrate"); Param_Info2(maximum_bitrate*400, " bps");
- BS_End();
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- Complete_Stream->Streams[elementary_PID]->Infos["BitRate_Maximum"]=Ztring::ToZtring(maximum_bitrate*400);
- else
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[table_id_extension].Infos["BitRate_Maximum"]=Ztring::ToZtring(maximum_bitrate*400);
- break;
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_0F()
-{
- //Parsing
- int32u private_data_indicator;
- Get_B4 (private_data_indicator, "private_data_indicator");
- if ((private_data_indicator&0xFF000000)>=0x41000000 && (private_data_indicator&0xFF000000)<=0x7A000000
- && (private_data_indicator&0x00FF0000)>=0x00410000 && (private_data_indicator&0x00FF0000)<=0x007A0000
- && (private_data_indicator&0x0000FF00)>=0x00004100 && (private_data_indicator&0x0000FF00)<=0x00007A00
- && (private_data_indicator&0x000000FF)>=0x00000041 && (private_data_indicator&0x000000FF)<=0x0000007A)
- {
- Param_Info1(Ztring().From_CC4(private_data_indicator));
- Element_Info1(Ztring().From_CC4(private_data_indicator));
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_10()
-{
- //Parsing
- BS_Begin();
- Skip_S1( 2, "reserved");
- Info_S3(22, sb_leak_rate, "sb_leak_rate"); Param_Info2(sb_leak_rate*400, " bps");
- Skip_S1( 2, "reserved");
- Info_S3(22, sb_size, "sb_size"); Param_Info2(sb_size, " bytes");
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_11()
-{
- //Parsing
- BS_Begin();
- Skip_S1( 7, "reserved");
- Skip_SB( "leak_valid_flag");
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_1C()
-{
- //Parsing
- int8u Profile_and_level;
- Get_B1 ( Profile_and_level, "Profile_and_level"); Param_Info1(Mpeg_Descriptors_MPEG_4_audio_profile_and_level(Profile_and_level));
-
- FILLING_BEGIN();
- Complete_Stream->Streams[elementary_PID]->Infos["Format_Profile"]=Mpeg_Descriptors_MPEG_4_audio_profile_and_level(Profile_and_level);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_1D()
-{
- //Parsing
- int8u IOD_label;
- Skip_B1( "Scope_of_IOD_label");
- Get_B1 (IOD_label, "IOD_label");
-
- #ifdef MEDIAINFO_MPEG4_YES
- if (Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].IOD_ESs.find(IOD_label)==Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].IOD_ESs.end())
- {
- File_Mpeg4_Descriptors MI;
- MI.Parser_DoNotFreeIt=true;
- MI.SLConfig_DoNotFreeIt=true;
- Open_Buffer_Init(&MI);
- Open_Buffer_Continue(&MI);
- Finish(&MI);
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].IOD_ESs[MI.ES_ID].Parser=MI.Parser;
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].IOD_ESs[MI.ES_ID].SLConfig=MI.SLConfig;
- }
- #else
- Skip_XX(Element_Size-Element_Offset, "MPEG-4 Descriptor");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_1F()
-{
- //Parsing
- int16u ES_ID;
- while (Element_Offset<Element_Size)
- {
- Element_Begin1("FlexMux");
- Get_B2 (ES_ID, "ES_ID");
- if (Element_Offset!=Element_Size)
- Skip_B1( "FlexMuxChannel");
- Element_End0();
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->FMC_ES_ID=ES_ID;
- Complete_Stream->Streams[elementary_PID]->FMC_ES_ID_IsValid=true;
- }
- break;
- default : ;
- }
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_28()
-{
- //Parsing
- int8u profile_idc, level_idc;
- Get_B1 (profile_idc, "profile_idc"); Param_Info1(Avc_profile_idc(profile_idc));
- BS_Begin();
- Element_Begin1("constraints");
- Skip_SB( "constraint_set0_flag");
- Skip_SB( "constraint_set1_flag");
- Skip_SB( "constraint_set2_flag");
- Skip_SB( "constraint_set3_flag");
- Skip_SB( "reserved_zero_4bits");
- Skip_SB( "reserved_zero_4bits");
- Skip_SB( "reserved_zero_4bits");
- Skip_SB( "reserved_zero_4bits");
- Element_End0();
- BS_End();
- Get_B1 (level_idc, "level_idc");
- BS_Begin();
- Skip_SB( "AVC_still_present");
- Skip_SB( "AVC_24_hour_picture_flag");
- Skip_S1(6, "reserved");
- BS_End();
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->Infos["Format"]=__T("AVC");
- Complete_Stream->Streams[elementary_PID]->Infos["Format_Profile"]=Ztring().From_Local(Avc_profile_idc(profile_idc))+__T("@L")+Ztring().From_Number(((float)level_idc)/10, 1);
- }
- break;
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_2A()
-{
- //Parsing
- BS_Begin();
- Skip_SB( "hrd_management_valid_flag");
- Skip_S1(6, "reserved");
- TEST_SB_SKIP( "picture_and_timing_info_present");
- bool x90kHz_flag;
- Get_SB (x90kHz_flag, "90kHz_flag");
- Skip_S1(7, "reserved");
- BS_End();
- if (x90kHz_flag)
- {
- Skip_B4( "N");
- Skip_B4( "K");
- }
- Skip_B4( "num_units_in_tick");
- BS_Begin();
- TEST_SB_END();
- Skip_SB( "fixed_frame_rate_flag");
- Skip_SB( "temporal_poc_flag");
- Skip_SB( "picture_to_display_conversion_flag");
- Skip_S1(5, "reserved");
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_2F()
-{
- //Parsing
- int8u aux_video_params_length;
- Skip_B1( "aux_video_type"); //ISO/IEC 23002-3
- Get_B1 (aux_video_params_length, "aux_video_params_length");
- Skip_XX(aux_video_params_length, "aux_video_params");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_40()
-{
- //Parsing
- Ztring network_name;
- Get_DVB_Text(Element_Size, network_name, "network_name");
-
- FILLING_BEGIN();
- Complete_Stream->network_name=network_name;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_41()
-{
- //Parsing
- while (Element_Offset<Element_Size)
- {
- Element_Begin1("service");
- int16u service_id;
- int8u service_type;
- Get_B2 (service_id, "service_id"); Element_Info1(Ztring::ToZtring(service_id, 16));
- Get_B1 (service_type, "service_type"); Param_Info1(Mpeg_Descriptors_dvb_service_type(service_type));
- Element_End1(Ztring::ToZtring(service_id));
-
- FILLING_BEGIN();
- Complete_Stream->Transport_Streams[table_id_extension].Programs[service_id].Infos["ServiceType"]=Mpeg_Descriptors_dvb_service_type(service_type);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_43()
-{
- //Parsing
- int32u frequency, symbol_rate;
- int16u orbital_position;
- int8u polarization, roll_off, modulation_type, FEC_inner;
- bool west_east_flag, modulation_system;
- Get_B4 (frequency, "frequency"); Param_Info1(Frequency_DVB__BCD(frequency));
- Get_B2 (orbital_position, "orbital_position"); Param_Info1(OrbitalPosition_DVB__BCD(orbital_position));
- BS_Begin();
- Get_SB ( west_east_flag, "west_east_flag"); Param_Info1(west_east_flag?"E":"W");
- Get_S1 ( 2, polarization, "polarization");
- Get_S1 ( 2, roll_off, "roll_off");
- Get_SB ( modulation_system, "modulation_system");
- Get_S1 ( 2, modulation_type, "modulation_type");
- Get_S4 (28, symbol_rate, "symbol_rate");
- Get_S1 ( 4, FEC_inner, "FEC_inner");
- BS_End();
-
- FILLING_BEGIN();
- Complete_Stream->Transport_Streams[transport_stream_id].Infos["Frequency"]=Frequency_DVB__BCD(frequency);
- Complete_Stream->Transport_Streams[transport_stream_id].Infos["OrbitalPosition"]=OrbitalPosition_DVB__BCD(orbital_position)+(west_east_flag?__T('E'):__T('W'));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_48()
-{
- //Parsing
- Ztring service_provider_name, service_name;
- int8u service_type, service_provider_name_length, service_name_length;
- Get_B1 (service_type, "service_type"); Param_Info1(Mpeg_Descriptors_dvb_service_type(service_type));
- Get_B1 (service_provider_name_length, "service_provider_name_length");
- Get_DVB_Text(service_provider_name_length, service_provider_name, "service_provider_name");
- Get_B1 (service_name_length, "service_name_length");
- Get_DVB_Text(service_name_length, service_name, "service_name");
-
- //Filling
- FILLING_BEGIN();
- if (program_number_IsValid)
- {
- Complete_Stream->Transport_Streams[table_id_extension].Programs[program_number].Infos["ServiceName"]=service_name;
- Complete_Stream->Transport_Streams[table_id_extension].Programs[program_number].Infos["ServiceProvider"]=service_provider_name;
- Complete_Stream->Transport_Streams[table_id_extension].Programs[program_number].Infos["ServiceType"]=Mpeg_Descriptors_dvb_service_type(service_type);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_4A()
-{
- //Parsing
- int8u linkage_type;
- Skip_B2( "transport_stream_id");
- Info_B2(original_network_id, "original_network_id"); Param_Info1(Mpeg_Descriptors_original_network_id(original_network_id));
- Skip_B2( "service_id");
- Get_B1 (linkage_type, "linkage_type"); Param_Info1(Mpeg_Descriptors_linkage_type(linkage_type));
- if (Element_Size>7)
- Skip_XX(Element_Size-7, "private_data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_4D()
-{
- //Parsing
- Ztring event_name, text;
- int32u ISO_639_language_code;
- int8u event_name_length, text_length;
- Get_C3 (ISO_639_language_code, "ISO_639_language_code");
- Get_B1 (event_name_length, "event_name_length");
- Get_DVB_Text(event_name_length, event_name, "event_name"); Element_Info1(event_name);
- Get_B1 (text_length, "text_length");
- Get_DVB_Text(text_length, text, "text");
-
- FILLING_BEGIN();
- if (table_id>=0x4E && table_id<=0x6F) //event_information_section
- {
- if (event_id_IsValid)
- {
- Ztring ISO_639_2; ISO_639_2.From_CC3(ISO_639_language_code);
- const Ztring& ISO_639_1=MediaInfoLib::Config.Iso639_1_Get(ISO_639_2);
- Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks[table_id].Events[event_id].short_event.event_name=(ISO_639_1.empty()?ISO_639_2:ISO_639_1)+__T(':')+event_name;
- Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks[table_id].Events[event_id].short_event.text=(ISO_639_1.empty()?ISO_639_2:ISO_639_1)+__T(':')+text;
- Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks_IsUpdated=true;
- Complete_Stream->Programs_IsUpdated=true;
- }
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_50()
-{
- //Parsing
- int32u ISO_639_language_code;
- int8u stream_content;
- BS_Begin();
- Skip_S1(4, "reserved_future_use");
- Get_S1 (4, stream_content, "stream_content"); Param_Info1(Mpeg_Descriptors_stream_content(stream_content)); Element_Info1(Mpeg_Descriptors_stream_content(stream_content));
- BS_End();
- Info_B1(component_type, "component_type"); Param_Info1(Mpeg_Descriptors_component_type(stream_content, component_type)); Element_Info1(Mpeg_Descriptors_component_type(stream_content, component_type));
- Info_B1(component_tag, "component_tag");
- Get_C3 (ISO_639_language_code, "ISO_639_language_code");
- Skip_DVB_Text(Element_Size-Element_Offset, "text");
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Ztring ISO_639_2; ISO_639_2.From_CC3(ISO_639_language_code);
- const Ztring& ISO_639_1=MediaInfoLib::Config.Iso639_1_Get(ISO_639_2);
- Complete_Stream->Streams[elementary_PID]->Infos["Language"]=ISO_639_1.empty()?ISO_639_2:ISO_639_1;
- }
- break;
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_52()
-{
- //Parsing
- Skip_B1( "component_tag");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_54()
-{
- //Parsing
- while (Element_Offset<Element_Size)
- {
- BS_Begin();
- int8u content_nibble_level_1, content_nibble_level_2;
- Get_S1 (4, content_nibble_level_1, "content_nibble_level_1"); Param_Info1(Mpeg_Descriptors_content_nibble_level_1(content_nibble_level_1)); Element_Info1(Mpeg_Descriptors_content_nibble_level_1(content_nibble_level_1));
- Get_S1 (4, content_nibble_level_2, "content_nibble_level_2"); Param_Info1(Mpeg_Descriptors_content_nibble_level_2(content_nibble_level_1, content_nibble_level_2)); Element_Info1C((content_nibble_level_1==0xB || content_nibble_level_2!=0), Mpeg_Descriptors_content_nibble_level_2(content_nibble_level_1, content_nibble_level_2));
- Skip_S1(4, "user_nibble");
- Skip_S1(4, "user_nibble");
- BS_End();
-
- FILLING_BEGIN();
- if (event_id_IsValid)
- {
- Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks[table_id].Events[event_id].content=Ztring().From_UTF8(Mpeg_Descriptors_content_nibble_level_2(content_nibble_level_1, content_nibble_level_2))+__T(", ");
- Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks_IsUpdated=true;
- Complete_Stream->Programs_IsUpdated=true;
- }
- FILLING_END();
- }
-
- FILLING_BEGIN();
- if (event_id_IsValid)
- {
- if (!Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks[table_id].Events[event_id].content.empty())
- {
- Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks[table_id].Events[event_id].content.resize(Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks[table_id].Events[event_id].content.size()-2);
- Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks_IsUpdated=true;
- Complete_Stream->Programs_IsUpdated=true;
- }
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_55()
-{
- //Parsing
- while (Element_Offset<Element_Size)
- {
- Skip_Local(3, "country_code");
- Info_B1(rating, "rating"); Param_Info2(rating+3, " years old"); Element_Info2(rating+3, " years old");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_56()
-{
- //Parsing
- Ztring Languages;
- while (Element_Offset<Element_Size)
- {
- Element_Begin1("teletext");
- Ztring ISO_639_language_code;
- int8u teletext_type;
- int8u teletext_magazine_number;
- int8u teletext_page_number_1;
- int8u teletext_page_number_2;
- Get_Local(3, ISO_639_language_code, "ISO_639_language_code");
- BS_Begin();
- Get_S1 (5, teletext_type, "teletext_type"); Param_Info1(Mpeg_Descriptors_teletext_type(teletext_type));
- Get_S1 (3, teletext_magazine_number, "teletext_magazine_number");
- Get_S1 (4, teletext_page_number_1, "teletext_page_number_1");
- Get_S1 (4, teletext_page_number_2, "teletext_page_number_2");
- BS_End();
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid /*&& (teletext_type==2 || teletext_type==5)*/) //Subtitles are the only supported format
- {
- int16u ID=(teletext_magazine_number==0?8:teletext_magazine_number)*100+teletext_page_number_1*10+teletext_page_number_2;
- Complete_Stream->Streams[elementary_PID]->descriptor_tag=0x56;
- Complete_Stream->Streams[elementary_PID]->Teletexts[ID].Infos["Language"]=MediaInfoLib::Config.Iso639_1_Get(ISO_639_language_code);
- Complete_Stream->Streams[elementary_PID]->Teletexts[ID].Infos["Language_More"]=Mpeg_Descriptors_teletext_type_more(teletext_type);
- Complete_Stream->Streams[elementary_PID]->Teletexts[ID].Infos["Format"]=Mpeg_Descriptors_teletext_type(teletext_type);
- Complete_Stream->Streams[elementary_PID]->Teletexts[ID].Infos["Codec"]=Mpeg_Descriptors_teletext_type(teletext_type);
- }
- break;
- default : ;
- }
- FILLING_END();
-
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_58()
-{
- //Parsing
- while (Element_Offset<Element_Size)
- {
- int32u country_code;
- int16u local_time_offset;
- int8u country_region_id;
- bool local_time_offset_polarity;
- Get_C3 (country_code, "country_code");
- BS_Begin();
- Get_S1 (6, country_region_id, "country_region_id");
- Skip_SB( "reserved");
- Get_SB (local_time_offset_polarity, "local_time_offset_polarity"); Param_Info1(local_time_offset_polarity?"-":"+");
- BS_End();
- Get_B2 (local_time_offset, "local_time_offset"); Param_Info1(TimeHHMM_BCD(local_time_offset));
- Info_B2(date, "time_of_change (date)"); Param_Info1(Date_MJD(date));
- Info_B3(time, "time_of_change (time)"); Param_Info1(Time_BCD(time));
- Info_B2(next_time_offset, "next_time_offset"); Param_Info1(TimeHHMM_BCD(next_time_offset));
-
- FILLING_BEGIN();
- Ztring Country; Country.From_CC3(country_code);
- if (country_region_id)
- Country+=__T(" (")+Ztring::ToZtring(country_region_id)+__T(")");
- Complete_Stream->TimeZones[Country]=(local_time_offset_polarity?__T('-'):__T('+'))+TimeHHMM_BCD(local_time_offset);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_59()
-{
- //Parsing
- Ztring Languages;
- while (Element_Offset<Element_Size)
- {
- Element_Begin1("subtitle");
- int32u ISO_639_language_code;
- Get_C3 (ISO_639_language_code, "ISO_639_language_code");
- Info_B1(subtitling_type, "subtitling_type"); Param_Info1(Mpeg_Descriptors_component_type_O3(subtitling_type));
- Skip_B2( "composition_page_id");
- Skip_B2( "ancillary_page_id");
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Ztring ISO_639_2; ISO_639_2.From_CC3(ISO_639_language_code);
- const Ztring& ISO_639_1=MediaInfoLib::Config.Iso639_1_Get(ISO_639_2);
- Languages+=(ISO_639_1.empty()?ISO_639_2:ISO_639_1)+__T(" / ");
- //TODO: this stream is teletext. Be careful, multiple stream in a pid
- }
- break;
- default : ;
- }
- FILLING_END();
-
- Element_End0();
- }
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->StreamKind_FromDescriptor=Stream_Text;
- Complete_Stream->Streams[elementary_PID]->descriptor_tag=0x59;
- if (!Languages.empty())
- Languages.resize(Languages.size()-3);
- Complete_Stream->Streams[elementary_PID]->Infos["Language"]=Languages;
- Complete_Stream->Streams[elementary_PID]->Infos["Format"]=__T("DVB Subtitle");
- Complete_Stream->Streams[elementary_PID]->Infos["Codec"]=__T("DVB Subtitle");
- }
- break;
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_5A()
-{
- //Parsing
- Info_B4(centre_frequency, "centre_frequency"); Param_Info2(((int64u)centre_frequency)*10, " Hz");
- BS_Begin();
- Info_S1(3, bandwidth, "bandwidth"); Param_Info1(Mpeg_Descriptors_bandwidth[bandwidth]);
- Info_SB( priority, "priority"); Param_Info1(priority?"HP":"LP");
- Skip_SB( "Time_Slicing_indicator");
- Skip_SB( "MPE-FEC_indicator");
- Skip_S1(2, "reserved");
- Info_S1(2, constellation, "constellation"); Param_Info1(Mpeg_Descriptors_constellation[constellation]);
- Info_S1(3, hierarchy_information, "hierarchy_information"); Param_Info1(Mpeg_Descriptors_hierarchy_information[hierarchy_information]);
- Info_S1(3, code_rate_HP, "code_rate-HP_stream"); Param_Info1(Mpeg_Descriptors_code_rate[code_rate_HP]);
- Info_S1(3, code_rate_LP, "code_rate-LP_stream"); Param_Info1(Mpeg_Descriptors_code_rate[code_rate_LP]);
- Info_S1(2, guard_interval, "guard_interval"); Param_Info1(Mpeg_Descriptors_guard_interval[guard_interval]);
- Info_S1(2, transmission_mode, "transmission_mode"); Param_Info1(Mpeg_Descriptors_transmission_mode[transmission_mode]);
- Skip_SB( "other_frequency_flag");
- BS_End();
- Skip_B4( "reserved");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_5D()
-{
- //Parsing
- Ztring ServiceProvider, ServiceName;
- while (Element_Offset<Element_Size)
- {
- Ztring service_provider_name, service_name;
- int32u ISO_639_language_code;
- int8u service_provider_name_length, service_name_length;
- Get_C3 (ISO_639_language_code, "ISO_639_language_code");
- Get_B1 (service_provider_name_length, "service_provider_name_length");
- Get_DVB_Text(service_provider_name_length, service_provider_name, "service_provider_name");
- Get_B1 (service_name_length, "service_name_length");
- Get_DVB_Text(service_name_length, service_name, "service_name");
-
- //Filling
- FILLING_BEGIN();
- Ztring ISO_639_2=Ztring().From_CC3(ISO_639_language_code);
- const Ztring& ISO_639_1=MediaInfoLib::Config.Iso639_1_Get(ISO_639_2);
- ServiceProvider+=(ISO_639_1.empty()?ISO_639_2:ISO_639_1)+__T(':')+service_provider_name+__T( " - ");
- ServiceName+=(ISO_639_1.empty()?ISO_639_2:ISO_639_1)+__T(':')+service_name+__T( " - ");
- FILLING_END();
- }
-
- if (!ServiceProvider.empty())
- {
- ServiceProvider.resize(ServiceProvider.size()-3);
- if (program_number_IsValid)
- Complete_Stream->Transport_Streams[table_id_extension].Programs[program_number].Infos["ServiceProvider"]=ServiceProvider;
- }
- if (!ServiceName.empty())
- {
- ServiceName.resize(ServiceName.size()-3);
- if (program_number_IsValid)
- Complete_Stream->Transport_Streams[table_id_extension].Programs[program_number].Infos["ServiceName"]=ServiceName;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_5F()
-{
- //Parsing
- Info_B4(private_data_specifier, "private_data_specifier"); Param_Info1(Ztring().From_CC4(private_data_specifier));
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_63()
-{
- //Parsing
- int32u peak_rate;
- BS_Begin();
- Skip_S1( 2, "DVB_reserved_future_use");
- Get_S3 (22, peak_rate, "peak_rate");
- Skip_S1( 2, "DVB_reserved_future_use");
- Skip_S3(22, "minimum_overall_smoothing_rate");
- Skip_S1( 2, "DVB_reserved_future_use");
- Skip_S2(14, "maximum_overall_smoothing_buffer");
- BS_End();
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- Complete_Stream->Streams[elementary_PID]->Infos["OverallBitRate_Maximum"]=Ztring::ToZtring(peak_rate*400);
- break;
- case 0x7F : //selection_information_section
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Infos["OverallBitRate_Maximum"]=Ztring::ToZtring(peak_rate*400);
- break;
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_66()
-{
- //Parsing
- Ztring ISO_639_language_code;
- int8u selector_length, text_length;
- Skip_B2( "data_broadcast_id");
- Skip_B1( "component_tag");
- Get_B1 (selector_length, "selector_length");
- Skip_XX(selector_length, "selector_bytes");
- Get_Local(3, ISO_639_language_code, "ISO_639_language_code");
- Get_B1 (text_length, "text_length");
- Skip_Local(text_length, "text_chars");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_6A()
-{
- //Parsing
- BS_Begin();
- bool component_type_flag, bsid_flag, mainid_flag, asvc_flag, enhanced_ac3=false;
- Get_SB ( component_type_flag, "component_type_flag");
- Get_SB ( bsid_flag, "bsid_flag");
- Get_SB ( mainid_flag, "mainid_flag");
- Get_SB ( asvc_flag, "asvc_flag");
- Skip_SB( "reserved_flag");
- Skip_SB( "reserved_flag");
- Skip_SB( "reserved_flag");
- Skip_SB( "reserved_flag");
- BS_End();
- if (component_type_flag)
- {
- int8u service_type, number_of_channels;
- BS_Begin();
- Get_SB ( enhanced_ac3, "enhanced AC-3");
- Skip_SB( "full_service");
- Get_S1 (3, service_type, "service_type"); Param_Info1(AC3_Mode[service_type]);
- Get_S1 (3, number_of_channels, "number_of_channels"); Param_Info2(Mpeg_Descriptors_AC3_Channels[number_of_channels], " channels");
- BS_End();
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->descriptor_tag=0x6A;
- Complete_Stream->Streams[elementary_PID]->Infos["Channel(s)"]=Ztring().From_Local(Mpeg_Descriptors_AC3_Channels[number_of_channels]);
- }
- break;
- default : ;
- }
- FILLING_END();
- }
- if (bsid_flag)
- {
- BS_Begin();
- Skip_S1(3, "zero");
- Skip_S1(5, "bsid");
- BS_End();
- }
- if (mainid_flag)
- {
- Skip_B1( "mainid");
- }
- if (asvc_flag)
- {
- Skip_B1( "asvc");
- }
-
- FILLING_BEGIN(); //Can be more
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->StreamKind_FromDescriptor=Stream_Audio;
- Complete_Stream->Streams[elementary_PID]->Infos["Format"]=enhanced_ac3?__T("E-AC-3"):__T("AC-3");
- Complete_Stream->Streams[elementary_PID]->Infos["Codec"]=__T("AC3+");
- if (Complete_Stream->Streams[elementary_PID]->registration_format_identifier==Elements::BSSD)
- Complete_Stream->Streams[elementary_PID]->registration_format_identifier=0x00000000; //Reseting it, this combinaision is not possible but an stream has it
- }
- break;
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_7A()
-{
- //Parsing
- bool component_type_flag, bsid_flag, mainid_flag, asvc_flag, mixinfoexists, substream1_flag, substream2_flag, substream3_flag, enhanced_ac3=0;
- BS_Begin();
- Get_SB ( component_type_flag, "component_type_flag");
- Get_SB ( bsid_flag, "bsid_flag");
- Get_SB ( mainid_flag, "mainid_flag");
- Get_SB ( asvc_flag, "asvc_flag");
- Get_SB ( mixinfoexists, "mixinfoexists");
- Get_SB ( substream1_flag, "substream1_flag");
- Get_SB ( substream2_flag, "substream2_flag");
- Get_SB ( substream3_flag, "substream3_flag");
- BS_End();
- if (component_type_flag)
- {
- int8u service_type, number_of_channels;
- BS_Begin();
- Get_SB ( enhanced_ac3, "enhanced AC-3");
- Skip_SB( "full_service");
- Get_S1 (3, service_type, "service_type"); Param_Info1(AC3_Mode[service_type]);
- Get_S1 (3, number_of_channels, "number_of_channels"); Param_Info2(Mpeg_Descriptors_AC3_Channels[number_of_channels], " channels");
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->descriptor_tag=0x7A;
- Complete_Stream->Streams[elementary_PID]->Infos["Channel(s)"]=Ztring().From_Local(Mpeg_Descriptors_AC3_Channels[number_of_channels]);
- }
- break;
- default : ;
- }
- FILLING_END();
- BS_End();
- }
- if (bsid_flag)
- {
- BS_Begin();
- Skip_S1(3, "zero");
- Skip_S1(5, "bsid");
- BS_End();
- }
- if (mainid_flag)
- {
- Skip_B1( "mainid");
- }
- if (asvc_flag)
- {
- Skip_B1( "asvc");
- }
- if (substream1_flag)
- {
- Skip_B1( "substream1");
- }
- if (substream2_flag)
- {
- Skip_B1( "substream2");
- }
- if (substream3_flag)
- {
- Skip_B1( "substream3");
- }
-
- FILLING_BEGIN(); //Can be more
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->StreamKind_FromDescriptor=Stream_Audio;
- Complete_Stream->Streams[elementary_PID]->Infos["Format"]=enhanced_ac3?__T("E-AC-3"):__T("AC-3");
- Complete_Stream->Streams[elementary_PID]->Infos["Codec"]=__T("AC3+");
- }
- break;
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_7B()
-{
- //Parsing
- BS_Begin();
- Skip_S1(6, "bit_rate_code");
- Skip_S2(7, "nblks");
- Skip_S2(14, "fsize");
- Skip_S1(6, "surround_mode");
- Skip_SB( "lfe_flag");
- Skip_S1(2, "extended_surround_flag");
- BS_End();
- //BS_End_CANBEMORE();
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->descriptor_tag=0x7B;
- }
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_7C()
-{
- //Parsing
- int8u Profile_and_level;
- bool AAC_type_flag;
- Get_B1 ( Profile_and_level, "Profile_and_level"); Param_Info1(Mpeg_Descriptors_MPEG_4_audio_profile_and_level(Profile_and_level));
- BS_Begin();
- Get_SB ( AAC_type_flag, "AAC_type_flag");
- Skip_SB( "reserved");
- Skip_SB( "reserved");
- Skip_SB( "reserved");
- Skip_SB( "reserved");
- Skip_SB( "reserved");
- Skip_SB( "reserved");
- Skip_SB( "reserved");
- BS_End();
- if (AAC_type_flag)
- {
- Skip_B1( "AAC_type");
- }
- if (Element_Size-Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->descriptor_tag=0x7C;
- Complete_Stream->Streams[elementary_PID]->Infos["Format_Profile"]=Mpeg_Descriptors_MPEG_4_audio_profile_and_level(Profile_and_level);
- }
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_7F()
-{
- //Parsing
- int8u descriptor_tag_extension;
- Get_B1(descriptor_tag_extension, "descriptor_tag_extension");
- switch (descriptor_tag_extension)
- {
- case 0x0F : Descriptor_7F_0F(); break;
- default : Skip_XX(Element_Size-Element_Offset, "Unknown");
- if (elementary_PID_IsValid)
- {
- Ztring &Temp=Complete_Stream->Streams[elementary_PID]->Infos["descriptor_tag_extension"];
- if (!Temp.empty())
- Temp+=__T(" / ");
- Temp+=Ztring::ToZtring(descriptor_tag_extension);
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_7F_0F()
-{
- //Parsing
- int8u config_id;
- Get_B1(config_id, "config_id");
-
- FILLING_BEGIN();
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->Infos["Matrix_Format"]=__T("DTS Neural Audio");
- Complete_Stream->Streams[elementary_PID]->Infos["Matrix_ChannelPositions"]=__T("DTS Neural Audio ")+Ztring::ToZtring(config_id);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_81()
-{
- //Parsing
- Ztring Text, Language1, Language2;
- int8u sample_rate_code, bit_rate_code, surround_mode, bsmod, num_channels, langcod, textlen, text_code;
- bool language_flag, language_flag_2;
- BS_Begin();
- Get_S1 (3, sample_rate_code, "sample_rate_code"); if (sample_rate_code<4) {Param_Info2(AC3_SamplingRate[sample_rate_code], " Hz");}
- Skip_S1(5, "bsid");
- Get_S1 (6, bit_rate_code, "bit_rate_code"); Param_Info2(AC3_BitRate[bit_rate_code]*1000, " Kbps");
- Get_S1 (2, surround_mode, "surround_mode"); Param_Info1(AC3_Surround[surround_mode]);
- Get_S1 (3, bsmod, "bsmod");
- Get_S1 (4, num_channels, "num_channels"); if (num_channels<8) {Param_Info2(AC3_Channels[num_channels], " channels");}
- Skip_SB( "full_svc");
- BS_End();
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->descriptor_tag=0x81;
- if (sample_rate_code<4)
- Complete_Stream->Streams[elementary_PID]->Infos["SamplingRate"]=Ztring::ToZtring(AC3_SamplingRate[sample_rate_code]);
- Complete_Stream->Streams[elementary_PID]->Infos["BitRate"]=Ztring::ToZtring(AC3_BitRate[bit_rate_code]*1000);
- if (num_channels<8)
- Complete_Stream->Streams[elementary_PID]->Infos["Channel(s)"]=Ztring::ToZtring(AC3_Channels[num_channels]);
- }
- }
- FILLING_END();
-
- //Parsing
- if (Element_Offset==Element_Size) return;
- Get_B1 (langcod, "langcod");
-
- //Parsing
- if (Element_Offset==Element_Size) return;
- if (num_channels==0) //1+1 mode
- Skip_B1( "langcod2");
-
- //Parsing
- if (Element_Offset==Element_Size) return;
- if (bsmod<2)
- {
- BS_Begin();
- Skip_S1(3, "mainid");
- Info_BS(2, priority, "priority"); Param_Info1(Mpeg_Descriptors_AC3_Priority[priority]);
- Skip_S1(3, "reserved");
- BS_End();
- }
- else
- Skip_B1( "asvcflags");
-
- //Parsing
- if (Element_Offset==Element_Size) return;
- BS_Begin();
- Get_S1 (7, textlen, "textlen");
- Get_S1 (1, text_code, "text_code"); Param_Info1C((text_code), "Unicode");
- BS_End();
- if (textlen)
- Get_Local(textlen, Text, "text");
-
- //Parsing
- if (Element_Offset==Element_Size) return;
- BS_Begin();
- Get_SB ( language_flag, "language_flag");
- Get_SB ( language_flag_2, "language_flag_2");
- Skip_S1(6, "reserved");
- BS_End();
-
- //Parsing
- if (Element_Offset==Element_Size) return;
- if (language_flag)
- Get_Local(3, Language1, "language1");
-
- //Parsing
- if (Element_Offset==Element_Size) return;
- if (language_flag_2)
- Get_Local(3, Language2, "language2");
-
- //Parsing
- if (Element_Offset==Element_Size) return;
- Skip_XX(Element_Size-Element_Offset, "additional_info");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_86()
-{
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- if (event_id_IsValid)
- {
- delete Complete_Stream->Sources[table_id_extension].ATSC_EPG_Blocks[Complete_Stream->Streams[pid]->table_type].Events[event_id].ServiceDescriptors;
- Complete_Stream->Sources[table_id_extension].ATSC_EPG_Blocks[Complete_Stream->Streams[pid]->table_type].Events[event_id].ServiceDescriptors=new File__Analyze::servicedescriptors;
- }
- else if (elementary_PID_IsValid)
- {
- //delete Complete_Stream->Streams[elementary_PID]->ServiceDescriptors;
- //Complete_Stream->Streams[elementary_PID]->ServiceDescriptors=new File__Analyze::servicedescriptors;
- Complete_Stream->Streams[elementary_PID]->ServiceDescriptors.ServiceDescriptors608.clear();
- Complete_Stream->Streams[elementary_PID]->ServiceDescriptors.ServiceDescriptors708.clear();
- Complete_Stream->Streams[elementary_PID]->ServiceDescriptors_IsPresent=true;
- }
- else if (program_number_IsValid)
- {
- delete Complete_Stream->Transport_Streams[transport_stream_id].Programs[program_number].ServiceDescriptors;
- Complete_Stream->Transport_Streams[transport_stream_id].Programs[program_number].ServiceDescriptors=new File__Analyze::servicedescriptors;
- }
- #endif
-
- //Parsing
- Ztring Text, Language1, Language2;
- int8u number_of_services;
- BS_Begin();
- Skip_S1(3, "reserved");
- Get_S1 (5, number_of_services, "number_of_services");
- BS_End();
-
- for (int8u Pos=0; Pos<number_of_services; Pos++)
- {
- Element_Begin1("service");
- string language;
- int8u caption_service_number;
- bool digital_cc, line21_field=false;
- Get_String(3, language, "language");
- BS_Begin();
- Get_SB (digital_cc, "digital_cc");
- Skip_SB( "reserved");
- if (digital_cc) //line21
- Get_S1(6, caption_service_number, "caption_service_number");
- else
- {
- Skip_S1(5, "reserved");
- Get_SB ( line21_field, "line21_field");
-
- //Coherency test
- if (line21_field && number_of_services==1)
- line21_field=false; // Wrong info in the descriptor?
- }
- Skip_SB( "easy_reader");
- Skip_SB( "wide_aspect_ratio");
- Skip_S2(14, "reserved");
- BS_End();
- Element_End0();
-
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- if (event_id_IsValid)
- {
- if (digital_cc)
- {
- #if defined(MEDIAINFO_EIA708_YES)
- string &Value=Complete_Stream->Sources[table_id_extension].ATSC_EPG_Blocks[Complete_Stream->Streams[pid]->table_type].Events[event_id].ServiceDescriptors->ServiceDescriptors708[caption_service_number].language;
- if (!Value.empty())
- Value+=", ";
- Value+=language;
- #endif
- }
- else
- {
- #if defined(MEDIAINFO_EIA608_YES)
- string &Value=Complete_Stream->Sources[table_id_extension].ATSC_EPG_Blocks[Complete_Stream->Streams[pid]->table_type].Events[event_id].ServiceDescriptors->ServiceDescriptors608[line21_field?1:0].language;
- if (!Value.empty())
- Value+=", ";
- Value+=language;
- #endif
- }
- }
- else if (elementary_PID_IsValid)
- {
- if (digital_cc)
- {
- #if defined(MEDIAINFO_EIA708_YES)
- string &Value=Complete_Stream->Streams[elementary_PID]->ServiceDescriptors.ServiceDescriptors708[caption_service_number].language;
- if (!Value.empty())
- Value+=", ";
- Value+=language;
- #endif
- }
- else
- {
- #if defined(MEDIAINFO_EIA608_YES)
- string &Value=Complete_Stream->Streams[elementary_PID]->ServiceDescriptors.ServiceDescriptors608[line21_field?1:0].language;
- if (!Value.empty())
- Value+=", ";
- Value+=language;
- #endif
- }
- }
- else if (program_number_IsValid)
- {
- if (digital_cc)
- {
- #if defined(MEDIAINFO_EIA708_YES)
- string &Value=Complete_Stream->Transport_Streams[transport_stream_id].Programs[program_number].ServiceDescriptors->ServiceDescriptors708[caption_service_number].language;
- if (!Value.empty())
- Value+=", ";
- Value+=language;
- #endif
- }
- else
- {
- #if defined(MEDIAINFO_EIA608_YES)
- string &Value=Complete_Stream->Transport_Streams[transport_stream_id].Programs[program_number].ServiceDescriptors->ServiceDescriptors608[line21_field?1:0].language;
- if (!Value.empty())
- Value+=", ";
- Value+=language;
- #endif
- }
- }
- #endif
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_87()
-{
- //Parsing
- int8u rating_region_count;
- BS_Begin();
- Skip_S1(2, "reserved");
- Get_S1 (6, rating_region_count, "rating_region_count");
- BS_End();
- for (int8u rating_region_Pos=0; rating_region_Pos<rating_region_count; rating_region_Pos++)
- {
- Element_Begin1("rating_region");
- int8u rated_dimensions;
- Skip_B1( "rating_region");
- Get_B1 (rated_dimensions, "rated_dimensions");
- for (int8u rated_dimension_Pos=0; rated_dimension_Pos<rated_dimensions; rated_dimension_Pos++)
- {
- Element_Begin1("rated_dimension");
- Skip_B1( "rating_dimension_j");
- BS_Begin();
- Skip_S1(4, "reserved");
- Skip_S1(4, "rating_value");
- BS_End();
- Element_End0();
- }
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_A0()
-{
- //Parsing
- Ztring title;
- ATSC_multiple_string_structure(title, "title");
-
- FILLING_BEGIN(); //Can be more
- switch (table_id)
- {
- case 0xC8 : //TVCT
- case 0xC9 : //CVCT
- case 0xDA : //SVCT
- if (program_number_IsValid)
- if (!title.empty())
- Complete_Stream->Transport_Streams[table_id_extension].Programs[program_number].Infos["ServiceName"]=title;
- break;
- default : ;
- }
- FILLING_END();
- FILLING_BEGIN();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_A1()
-{
- //Parsing
- int8u number_elements;
- BS_Begin();
- Skip_S1( 3, "reserved");
- Skip_S2(13, "PCR_PID");
- BS_End();
- Get_B1 ( number_elements, "number_elements");
- for (int8u Pos=0; Pos<number_elements; Pos++)
- {
- Element_Begin0();
- Ztring Language;
- int16u elementary_PID;
- Skip_B1( "stream_type");
- BS_Begin();
- Skip_S1( 3, "reserved");
- Get_S2 (13, elementary_PID, "elementary_PID");
- BS_End();
- Get_Local(3, Language, "ISO_639_language_code");
- Element_End1(Ztring().From_CC2(elementary_PID));
-
- //Filling
- if (elementary_PID<Complete_Stream->Streams.size() && Complete_Stream->Streams[elementary_PID]->Infos["Language"].empty()) //We use only the first detected value
- Complete_Stream->Streams[elementary_PID]->Infos["Language"]=Language;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_A3()
-{
- //Parsing
- Ztring Value;
- ATSC_multiple_string_structure(Value, "name");
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- if (!Value.empty())
- Complete_Stream->Streams[elementary_PID]->Infos["Name"]=Value;
- break;
- default : ;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_AA()
-{
- //Parsing
- Skip_XX(Element_Size, "rc_information");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_C1()
-{
- // ARIB B15
-
- //Parsing
- int8u copy_control_type;
- bool maximum_bit_rate_flag, component_control_flag;
- BS_Begin();
- Skip_S1(2, "digital_recording_control_data");
- Get_SB ( maximum_bit_rate_flag, "maximum_bit_rate_flag ");
- Get_SB ( component_control_flag, "component_control_flag ");
- Get_S1 (2, copy_control_type, "copy_control_type");
- //Skip_S1(2, (copy_control_type&0x1)?"copy_control_type":"reserved_future_use");
- BS_End();
-
- while (Element_Offset<Element_Size)
- Skip_B1( "(ToDo)");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_C8()
-{
- //Parsing
- Skip_XX(Element_Size, "?");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_DE()
-{
- // ARIB B15
-
- //Parsing
- BS_Begin();
- Skip_SB( "reserved_future_use");
- Skip_SB( "copy_restriction_mode");
- Skip_SB( "image_constraint_token");
- Skip_SB( "retention_mode");
- Skip_S1(3, "retention_state");
- Skip_SB( "encryption_mode");
- BS_End();
-
- while (Element_Offset<Element_Size)
- Skip_B1( "reserved_future_use");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_E9()
-{
- //Parsing
- int64u EBP_distance=(int64u)-1;
- int32u ticks_per_second=1;
- int8u num_partitions, EBP_distance_width_minus_1=0;
- bool timescale_flag;
- if (Element_Size==0)
- return; // It is authorized
- BS_Begin();
- Get_S1 (5, num_partitions, "num_partitions");
- Get_SB ( timescale_flag, "timescale_flag");
- Skip_S1(2, "reserved");
- if (timescale_flag)
- {
- Get_S3 (21, ticks_per_second, "ticks_per_second");
- Get_S1 ( 3, EBP_distance_width_minus_1, "EBP_distance_width_minus_1");
- }
- for (int8u i=0; i<num_partitions; ++i)
- {
- Element_Begin1("partition");
- bool EBP_data_explicit_flag, representation_id_flag;
- Get_SB ( EBP_data_explicit_flag, "EBP_data_explicit_flag");
- Get_SB ( representation_id_flag, "representation_id_flag");
- Skip_S1(5, "partition_id");
- if (EBP_data_explicit_flag)
- {
- bool boundary_flag;
- Get_SB (boundary_flag, "boundary_flag");
- if (EBP_distance_width_minus_1<8)
- Get_S8 (8*(EBP_distance_width_minus_1+1), EBP_distance, "EBP_distance");
- else
- {
- //Not supported
- Skip_S1(8, "EBP_distance");
- Skip_S8(64, "EBP_distance");
- }
- if (boundary_flag)
- {
- Skip_S1(3, "SAP_type_max");
- Skip_S1(4, "reserved");
- }
- else
- {
- Skip_S1(7, "reserved");
- }
- Skip_SB( "acquisition_time_flag");
- }
- else
- {
- Skip_SB( "reserved");
- Skip_S2(13, "EBP_PID");
- Skip_S1( 3, "reserved");
- }
- if (representation_id_flag)
- {
- Skip_S8(64, "representation_id");
- }
- Element_End0();
-
- FILLING_BEGIN();
- Complete_Stream->Streams[elementary_PID]->Infos["EBP_Mode"]=EBP_data_explicit_flag?__T("Explicit"):__T("Implicit");
- if (EBP_distance!=(int64u)-1)
- Complete_Stream->Streams[elementary_PID]->Infos["EBP_Distance"]=ticks_per_second==1?Ztring::ToZtring(EBP_distance):Ztring::ToZtring(((float64)EBP_distance)/ticks_per_second, 3);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_FC()
-{
- //Parsing
- Skip_XX(Element_Size, "?");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Descriptor_FD()
-{
- //Parsing
- int16u data_component_id;
- Get_B2 (data_component_id, "data_component_id");
-
- while (Element_Offset<Element_Size)
- Skip_B1( "?");
-
- if (data_component_id==0x0008)
- {
- //Is maybe ARIB caption
-
- FILLING_BEGIN();
- switch (table_id)
- {
- case 0x02 : //program_map_section
- if (elementary_PID_IsValid)
- {
- Complete_Stream->Streams[elementary_PID]->Infos["Format"]=__T("ARIB STD B24/B37");
- //Complete_Stream->Streams[elementary_PID]->StreamKind=Stream_Text;
- }
- break;
- default : ;
- }
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::CUEI_00()
-{
- Skip_C4( "identifier (\"CUEI\")"); //CUEI
- Skip_B4( "provider_avail_id");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::CUEI_01()
-{
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::CUEI_02()
-{
- //Parsing
- int32u segmentation_event_id;
- bool segmentation_event_cancel_indicator;
- Skip_C4( "identifier (\"CUEI\")"); //CUEI
- Get_B4 (segmentation_event_id, "segmentation_event_id");
- BS_Begin();
- Get_SB ( segmentation_event_cancel_indicator, "segmentation_event_cancel_indicator");
- Skip_S1( 7, "reserved");
- BS_End();
- if (!segmentation_event_cancel_indicator)
- {
- int8u segmentation_upid_length, segmentation_type_id;
- bool program_segmentation_flag, segmentation_duration_flag;
- BS_Begin();
- Get_SB ( program_segmentation_flag, "program_segmentation_flag");
- Get_SB ( segmentation_duration_flag, "segmentation_duration_flag");
- Skip_S1( 6, "reserved");
- BS_End();
- if (!program_segmentation_flag)
- {
- int8u component_count;
- Get_B1 (component_count, "component_count");
- for (int8u Pos=0; Pos<component_count; Pos++)
- {
- Skip_B1( "component_tag");
- BS_Begin();
- Skip_S1( 7, "reserved");
- Skip_S5(33, "pts_offset");
- BS_End();
- }
- }
- if (segmentation_duration_flag)
- {
- Skip_B5( "segmentation_duration");
- }
- Skip_B1( "segmentation_upid_type");
- Get_B1 (segmentation_upid_length, "segmentation_upid_length");
- Skip_XX(segmentation_upid_length, "segmentation_upid"); //TODO
- Get_B1 (segmentation_type_id, "segmentation_type_id");
- Skip_B1( "segment_num");
- Skip_B1( "segments_expected");
-
- FILLING_BEGIN();
- for (size_t Program_Pos=0; Program_Pos<Complete_Stream->Streams[pid]->program_numbers.size(); Program_Pos++)
- {
- complete_stream::transport_stream::program::scte35* Scte35=Complete_Stream->Transport_Streams[transport_stream_id].Programs[Complete_Stream->Streams[pid]->program_numbers[Program_Pos]].Scte35;
- if (Scte35)
- {
- int8u Status=0; //Running
- switch (segmentation_type_id)
- {
- case 0x11 : segmentation_type_id=0x10; Status=1; break; //Program Start/End
- case 0x12 : segmentation_type_id=0x10; Status=2; break; //Program Start/Early Termination
- case 0x14 : segmentation_type_id=0x13; Status=1; break; //Program Breakaway/Resumption
- case 0x21 : segmentation_type_id=0x20; Status=1; break; //Chapter Start/End
- case 0x31 : segmentation_type_id=0x30; Status=1; break; //Provider Advertisement Start/End
- case 0x33 : segmentation_type_id=0x32; Status=1; break; //Distributor Advertisement Start/End
- case 0x41 : segmentation_type_id=0x40; Status=1; break; //Unscheduled Event Start/End
- default : ;
- }
-
- Scte35->Segmentations[segmentation_event_id].Segments[segmentation_type_id].Status=Status;
- }
- }
- FILLING_END();
- }
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::ATSC_multiple_string_structure(Ztring &Value, const char* Name)
-{
- //Parsing
- Ztring string;
- int8u number_strings, number_segments;
- Element_Begin1(Name);
- Get_B1(number_strings, "number_strings");
- for (int8u string_Pos=0; string_Pos<number_strings; string_Pos++)
- {
- Element_Begin1("String");
- int32u ISO_639_language_code;
- Get_C3(ISO_639_language_code, "ISO_639_language_code");
- Get_B1(number_segments, "number_segments");
- for (int8u segment_Pos=0; segment_Pos<number_segments; segment_Pos++)
- {
- Element_Begin1("Segment");
- Ztring segment;
- int8u compression_type, mode, number_bytes;
- Get_B1 (compression_type, "compression_type");
- Get_B1 (mode, "mode");
- Get_B1 (number_bytes, "number_bytes");
- switch (compression_type)
- {
- case 0x00 :
- switch (mode)
- {
- case 0x00 : Get_Local(number_bytes, segment, "string"); break;
- case 0x3F : Get_UTF16B(number_bytes, segment, "string"); break;
- default : Skip_XX(number_bytes, "Unknown");
- segment=__T("(Encoded with mode=0x")+Ztring::ToZtring(mode, 16)+__T(')');
- }
- break;
- default : Skip_XX(number_bytes, "(Compressed)");
- segment=__T("(Compressed)");
- }
- Element_End0();
-
- FILLING_BEGIN();
- if (segment.find_first_not_of(__T("\t\n "))!=std::string::npos)
- string+=segment+__T(" - ");
- FILLING_END();
- }
-
- FILLING_BEGIN();
- if (!string.empty())
- string.resize(string.size()-3);
- Ztring ISO_639_2=Ztring().From_CC3(ISO_639_language_code);
- const Ztring& ISO_639_1=MediaInfoLib::Config.Iso639_1_Get(ISO_639_2);
- Value+=(ISO_639_1.empty()?ISO_639_2:ISO_639_1)+__T(':')+string+__T(" - ");
- FILLING_END();
-
- Element_Info1(string);
- Element_End1("String");
- }
-
- if (!Value.empty())
- Value.resize(Value.size()-3);
-
- Element_Info1(Value);
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Descriptors::Get_DVB_Text(int64u Size, Ztring &Value, const char* Info)
-{
- if (Size<1)
- {
- Get_Local(Size, Value, Info);
- return;
- }
-
- //Testing if there is a codepage
- int8u CodePage1;
- Peek_B1(CodePage1);
- if (CodePage1<0x20)
- {
- Skip_B1( "CodePage"); Param_Info1(Mpeg_Descriptors_codepage_1(CodePage1));
- if (CodePage1!=0x10)
- {
- Get_Local(Size-1, Value, Info);
- }
- else
- {
- if (Size<3)
- {
- Value.clear();
- return;
- }
- int16u CodePage2;
- Get_B2 (CodePage2, "CodePage2");
- if (CodePage2==0x02)
- {
- Get_ISO_8859_2(Size-3, Value, Info);
- }
- else //Unknown
- Get_Local(Size-3, Value, Info);
- }
-
- }
- else
- Get_Local(Size, Value, Info);
-}
-
-//---------------------------------------------------------------------------
-//Modified Julian Date
-Ztring File_Mpeg_Descriptors::Date_MJD(int16u Date_)
-{
- //Calculating
- float64 Date=Date_;
- int Y2=(int)((Date-15078.2)/365.25);
- int M2=(int)(((Date-14956.1) - ((int)(Y2*365.25))) /30.6001);
- int D =(int)(Date-14956 - ((int)(Y2*365.25)) - ((int)(M2*30.6001)));
- int K=0;
- if (M2==14 || M2==15)
- K=1;
- int Y =Y2+K;
- int M =M2-1-K*12;
-
- //Formating
- return Ztring::ToZtring(1900+Y)+__T("-")
- + (M<10?__T("0"):__T(""))+Ztring::ToZtring( M)+__T("-")
- + (D<10?__T("0"):__T(""))+Ztring::ToZtring( D);
-}
-
-//---------------------------------------------------------------------------
-//Form: HHMMSS, BCD
-Ztring File_Mpeg_Descriptors::Time_BCD(int32u Time)
-{
- return (((Time>>16)&0xFF)<10?__T("0"):__T("")) + Ztring::ToZtring((Time>>16)&0xFF, 16)+__T(":") //BCD
- + (((Time>> 8)&0xFF)<10?__T("0"):__T("")) + Ztring::ToZtring((Time>> 8)&0xFF, 16)+__T(":") //BCD
- + (((Time )&0xFF)<10?__T("0"):__T("")) + Ztring::ToZtring((Time )&0xFF, 16); //BCD
-}
-
-//---------------------------------------------------------------------------
-//Form: HHMM, BCD
-Ztring File_Mpeg_Descriptors::TimeHHMM_BCD(int16u Time)
-{
- return (((Time>> 8)&0xFF)<10?__T("0"):__T("")) + Ztring::ToZtring((Time>> 8)&0xFF, 16)+__T(":") //BCD
- + (((Time )&0xFF)<10?__T("0"):__T("")) + Ztring::ToZtring((Time )&0xFF, 16)+__T(":00"); //BCD
-}
-
-//---------------------------------------------------------------------------
-//Form: Frequency in 10 KHz
-Ztring File_Mpeg_Descriptors::Frequency_DVB__BCD(int32u Frequency)
-{
- int64u ToReturn=((((int64u)Frequency)>>28)&0xF)*10000000
- + ((((int64u)Frequency)>>24)&0xF)* 1000000
- + ((((int64u)Frequency)>>20)&0xF)* 100000
- + ((((int64u)Frequency)>>16)&0xF)* 10000
- + ((((int64u)Frequency)>>12)&0xF)* 1000
- + ((((int64u)Frequency)>> 8)&0xF)* 100
- + ((((int64u)Frequency)>> 4)&0xF)* 10
- + ((((int64u)Frequency) )&0xF)* 1;
- return Ztring::ToZtring(ToReturn*10000);
-}
-
-//---------------------------------------------------------------------------
-//Form: Orbital Position
-Ztring File_Mpeg_Descriptors::OrbitalPosition_DVB__BCD(int32u OrbitalPosition)
-{
- int64u ToReturn=((OrbitalPosition>>12)&0xF)* 1000
- + ((OrbitalPosition>> 8)&0xF)* 100
- + ((OrbitalPosition>> 4)&0xF)* 10
- + ((OrbitalPosition )&0xF) ;
- return Ztring::ToZtring(((float)ToReturn)/10, 1);
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_MPEGTS_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Descriptors.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Descriptors.h
deleted file mode 100644
index 56f5c0abe..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Descriptors.h
+++ /dev/null
@@ -1,858 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about MPEG files, Descriptors
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Mpeg_DescriptorsH
-#define MediaInfo_Mpeg_DescriptorsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Mpeg4_Descriptors.h"
-#include "MediaInfo/Duplicate/File__Duplicate_MpegTs.h"
-#if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- #include "MediaInfo/File__Analyze.h"
-#endif
-#include <cfloat>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Global object
-//***************************************************************************
-
-struct complete_stream
-{
- //Global
- int16u transport_stream_id; //The processed transport_stream_id
- bool transport_stream_id_IsValid; //The processed transport_stream_id
- Ztring original_network_name;
- Ztring network_name;
- Ztring Duration_Start;
- Ztring Duration_End;
- bool Duration_End_IsUpdated;
- std::map<Ztring, Ztring> TimeZones; //Key is country code
-
- //Per transport_stream
- struct transport_stream
- {
- bool HasChanged;
- std::map<std::string, Ztring> Infos;
- struct program
- {
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- File__Analyze::servicedescriptors* ServiceDescriptors;
- #endif
- bool HasChanged;
- std::map<std::string, Ztring> Infos;
- std::map<std::string, Ztring> ExtraInfos_Content;
- std::map<std::string, Ztring> ExtraInfos_Option;
- std::map<Ztring, Ztring> EPGs;
- std::vector<int16u> elementary_PIDs;
- size_t StreamPos; //Stream_Menu
- int32u registration_format_identifier;
- int16u pid;
- int16u PCR_PID;
- int16u source_id; //ATSC
- bool source_id_IsValid;
- bool IsParsed;
- bool IsRegistered;
- bool HasNotDisplayableStreams; //e.g. unknown stream, KLV, SCTE 35
- bool Update_Needed_IsRegistered;
- bool Update_Needed_StreamCount;
- bool Update_Needed_StreamPos;
- bool Update_Needed_Info;
-
- //DVB
- struct dvb_epg_block
- {
- struct event
- {
- Ztring start_time;
- Ztring duration;
- struct short_event_
- {
- Ztring event_name;
- Ztring text;
- };
- short_event_ short_event;
- Ztring content;
- Ztring running_status;
- };
-
- typedef std::map<int16u, event> events; //Key is event_id
- events Events; //Key is event_id
- };
- typedef std::map<int8u, dvb_epg_block> dvb_epg_blocks; //Key is table_id
- dvb_epg_blocks DVB_EPG_Blocks; //Key is table_id
- bool DVB_EPG_Blocks_IsUpdated;
-
- //SCTE 35
- struct scte35
- {
- struct segmentation
- {
- struct segment
- {
- int8u Status; //If it is currently in the program: 0=Running, 1=Ended, 2=Early termination
-
- segment()
- {
- Status=(int8u)-1;
- }
- };
-
- typedef std::map<int8u, segment> segments; //Key is segmentation_type_id
- segments Segments;
- ;
- };
-
- typedef std::map<int32u, segmentation> segmentations; //Key is segmentation_event_id
- segmentations Segmentations;
- int16u pid;
-
- scte35()
- {
- pid=(int16u)-1;
- }
- };
- scte35* Scte35;
-
- //Constructor/Destructor
- program()
- :
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- ServiceDescriptors(NULL),
- #endif
- HasChanged(false),
- StreamPos((size_t)-1),
- registration_format_identifier(0x00000000),
- pid(0x00000),
- PCR_PID(0x0000),
- source_id((int16u)-1),
- source_id_IsValid(false),
- IsParsed(false),
- IsRegistered(false),
- HasNotDisplayableStreams(false),
- Update_Needed_IsRegistered(false),
- Update_Needed_StreamCount(false),
- Update_Needed_StreamPos(false),
- Update_Needed_Info(false),
- DVB_EPG_Blocks_IsUpdated(false),
- Scte35(NULL)
- {}
-
- program(const program& p)
- :
- HasChanged(p.HasChanged),
- Infos(p.Infos),
- ExtraInfos_Content(p.ExtraInfos_Content),
- ExtraInfos_Option(p.ExtraInfos_Option),
- EPGs(p.EPGs),
- elementary_PIDs(p.elementary_PIDs),
- StreamPos(p.StreamPos),
- registration_format_identifier(p.registration_format_identifier),
- pid(p.pid),
- PCR_PID(p.PCR_PID),
- source_id(p.source_id),
- source_id_IsValid(p.source_id_IsValid),
- IsParsed(p.IsParsed),
- IsRegistered(p.IsRegistered),
- HasNotDisplayableStreams(p.HasNotDisplayableStreams),
- Update_Needed_IsRegistered(p.Update_Needed_IsRegistered),
- Update_Needed_StreamCount(p.Update_Needed_StreamCount),
- Update_Needed_StreamPos(p.Update_Needed_StreamPos),
- Update_Needed_Info(p.Update_Needed_Info),
- DVB_EPG_Blocks_IsUpdated(p.DVB_EPG_Blocks_IsUpdated),
- Scte35(p.Scte35)
- {
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- if (p.ServiceDescriptors)
- {
- ServiceDescriptors=new File__Analyze::servicedescriptors;
- *ServiceDescriptors=*p.ServiceDescriptors;
- }
- else
- ServiceDescriptors=NULL;
- #endif
- }
-
- program& operator=(const program& p)
- {
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- if (p.ServiceDescriptors)
- {
- ServiceDescriptors=new File__Analyze::servicedescriptors;
- *ServiceDescriptors=*p.ServiceDescriptors;
- }
- else
- ServiceDescriptors=NULL;
- #endif
- HasChanged=p.HasChanged;
- Infos=p.Infos;
- ExtraInfos_Content=p.ExtraInfos_Content;
- ExtraInfos_Option=p.ExtraInfos_Option;
- EPGs=p.EPGs;
- elementary_PIDs=p.elementary_PIDs;
- StreamPos=p.StreamPos;
- registration_format_identifier=p.registration_format_identifier;
- pid=p.pid;
- PCR_PID=p.PCR_PID;
- source_id=p.source_id;
- source_id_IsValid=p.source_id_IsValid;
- IsParsed=p.IsParsed;
- IsRegistered=p.IsRegistered;
- HasNotDisplayableStreams=p.HasNotDisplayableStreams;
- Update_Needed_IsRegistered=p.Update_Needed_IsRegistered;
- Update_Needed_StreamCount=p.Update_Needed_StreamCount;
- Update_Needed_StreamPos=p.Update_Needed_StreamPos;
- Update_Needed_Info=p.Update_Needed_Info;
- DVB_EPG_Blocks_IsUpdated=p.DVB_EPG_Blocks_IsUpdated;
- Scte35=p.Scte35;
-
- return *this;
- }
-
- ~program()
- {
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- delete ServiceDescriptors;
- #endif
- }
- };
- typedef std::map<int16u, program> programs; //Key is program_number
- programs Programs; //Key is program_number
- std::vector<int16u> programs_List;
- size_t Programs_NotParsedCount;
-
- //Per IOD
- struct iod_es
- {
- File__Analyze* Parser;
- #ifdef MEDIAINFO_MPEG4_YES
- File_Mpeg4_Descriptors::slconfig* SLConfig;
- #endif
-
- //Constructor/Destructor
- iod_es()
- {
- Parser=NULL;
- #ifdef MEDIAINFO_MPEG4_YES
- SLConfig=NULL;
- #endif
- }
-
- ~iod_es()
- {
- delete Parser; //Parser=NULL;
- #ifdef MEDIAINFO_MPEG4_YES
- delete SLConfig; //SLConfig=NULL;
- #endif
- }
- };
- typedef std::map<int16u, iod_es> iod_ess; //Key is ES_ID
- std::map<int16u, iod_es> IOD_ESs; //Key is ES_ID
-
- //ATSC
- int16u source_id; //Global
- int16u source_id_IsValid;
-
- transport_stream()
- {
- HasChanged=false;
- source_id=(int16u)-1;
- source_id_IsValid=false;
- Programs_NotParsedCount=(size_t)-1;
- }
- };
- typedef std::map<int16u, transport_stream> transport_streams; //Key is transport_stream_id
- transport_streams Transport_Streams; //Key is transport_stream_id
-
- //Per pid
- struct stream
- {
- File__Analyze* Parser;
-
- enum ts_kind
- {
- //MPEG
- unknown,
- pes,
- psi,
- ts_kind_Max,
- };
- std::vector<int16u> program_numbers;
- struct table_id
- {
- struct table_id_extension
- {
- typedef std::vector<bool> section_numbers; //Key is section_number
- section_numbers Section_Numbers; //Key is section_number
- int8u version_number;
- };
- typedef std::map<int16u, table_id_extension> table_id_extensions; //Key is table_id_extensions
- table_id_extensions Table_ID_Extensions; //Key is table_id_extensions
- bool Table_ID_Extensions_CanAdd;
-
- table_id()
- {
- Table_ID_Extensions_CanAdd=true;
- }
- };
- typedef std::vector<table_id*> table_ids;
- table_ids Table_IDs; //Key is table_id
- std::map<std::string, Ztring> Infos;
- std::map<std::string, Ztring> Infos_Option;
- struct teletext
- {
- std::map<std::string, Ztring> Infos;
- };
- std::map<int16u, teletext> Teletexts; //Key is teletext_magazine_number
- #if MEDIAINFO_TRACE
- Ztring Element_Info1;
- #endif //MEDIAINFO_TRACE
- stream_t StreamKind;
- stream_t StreamKind_FromDescriptor;
- size_t StreamPos;
- ts_kind Kind;
- bool IsParsed;
- bool IsPCR;
- float64 IsPCR_Duration;
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- int64u TimeStamp_Start;
- int64u TimeStamp_Start_Offset;
- int64u TimeStamp_End;
- int64u TimeStamp_End_Offset;
- int16u PCR_PID; //If this pid has no PCR, decide which PCR should be used
- bool TimeStamp_End_IsUpdated;
- float64 TimeStamp_InstantaneousBitRate_Current_Min;
- float64 TimeStamp_InstantaneousBitRate_Current_Raw;
- float64 TimeStamp_InstantaneousBitRate_Current_Max;
- int64u TimeStamp_InstantaneousBitRate_BitRateMode_IsCbr;
- int64u TimeStamp_InstantaneousBitRate_BitRateMode_IsVbr;
- #if MEDIAINFO_ADVANCED
- float64 TimeStamp_InstantaneousBitRate_Min_Raw;
- float64 TimeStamp_InstantaneousBitRate_Max_Raw;
- int64u TimeStamp_Distance_Min;
- int64u TimeStamp_Distance_Max;
- int64u TimeStamp_Distance_Total;
- int64u TimeStamp_Distance_Count;
- int64u TimeStamp_HasProblems;
- std::vector<int64u> TimeStamp_Intermediate;
- #endif // MEDIAINFO_ADVANCED
- #endif //MEDIAINFO_MPEGTS_PCR_YES
- int32u registration_format_identifier;
- int16u FMC_ES_ID;
- int16u table_type; //ATSC
- int8u stream_type;
- int8u descriptor_tag;
- int8u DtsNeural_config_id;
- bool FMC_ES_ID_IsValid;
- bool Searching;
- bool Searching_Payload_Start;
- bool Searching_Payload_Continue;
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- bool Searching_TimeStamp_Start;
- bool Searching_TimeStamp_End;
- #endif //MEDIAINFO_MPEGTS_PCR_YES
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- bool Searching_ParserTimeStamp_Start;
- bool Searching_ParserTimeStamp_End;
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- bool EndTimeStampMoreThanxSeconds;
- bool ShouldDuplicate;
- bool IsRegistered;
- bool IsUpdated_IsRegistered;
- bool IsUpdated_Info;
- bool CA_system_ID_MustSkipSlices;
- bool EBP_IsPresent;
- size_t IsScrambled;
- int16u CA_system_ID;
- int16u SubStream_pid;
- #if MEDIAINFO_IBIUSAGE
- int64u Ibi_SynchronizationOffset_BeginOfFrame;
- #endif //MEDIAINFO_IBIUSAGE
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- File__Analyze::servicedescriptors ServiceDescriptors;
- bool ServiceDescriptors_IsPresent;
- #endif
-
- //Constructor/Destructor
- stream()
- {
- Parser=NULL;
- StreamKind=Stream_Max;
- StreamKind_FromDescriptor=Stream_Max;
- StreamPos=(size_t)-1;
- Kind=unknown;
- IsParsed=false;
- IsPCR=false;
- IsPCR_Duration=0;
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- TimeStamp_Start=(int64u)-1;
- TimeStamp_Start_Offset=(int64u)-1;
- TimeStamp_End=(int64u)-1;
- TimeStamp_End_Offset=(int64u)-1;
- PCR_PID=0x0000;
- TimeStamp_End_IsUpdated=false;
- TimeStamp_InstantaneousBitRate_Current_Min=0;
- TimeStamp_InstantaneousBitRate_Current_Raw=0;
- TimeStamp_InstantaneousBitRate_Current_Max=0;
- TimeStamp_InstantaneousBitRate_BitRateMode_IsCbr=0;
- TimeStamp_InstantaneousBitRate_BitRateMode_IsVbr=0;
- #if MEDIAINFO_ADVANCED
- TimeStamp_InstantaneousBitRate_Min_Raw=DBL_MAX;
- TimeStamp_InstantaneousBitRate_Max_Raw=0;
- TimeStamp_Distance_Min=(int64u)-1;
- TimeStamp_Distance_Max=0;
- TimeStamp_Distance_Total=0;
- TimeStamp_Distance_Count=0;
- TimeStamp_HasProblems=0;
- #endif // MEDIAINFO_ADVANCED
- #endif //MEDIAINFO_MPEGTS_PCR_YES
- registration_format_identifier=0x00000000;
- FMC_ES_ID=0x0000;
- table_type=0x0000;
- stream_type=(int8u)-1;
- descriptor_tag=(int8u)-1;
- DtsNeural_config_id=(int8u)-1;
- FMC_ES_ID_IsValid=false;
- Searching=false;
- Searching_Payload_Start=false;
- Searching_Payload_Continue=false;
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- Searching_TimeStamp_Start=false;
- Searching_TimeStamp_End=false;
- #endif //MEDIAINFO_MPEGTS_PCR_YES
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- Searching_ParserTimeStamp_Start=false;
- Searching_ParserTimeStamp_End=false;
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- EndTimeStampMoreThanxSeconds=false;
- ShouldDuplicate=false;
- IsRegistered=false;
- IsUpdated_IsRegistered=false;
- IsUpdated_Info=false;
- IsScrambled=false;
- CA_system_ID_MustSkipSlices=false;
- CA_system_ID=0x0000;
- EBP_IsPresent=false;
- SubStream_pid=0x0000;
- #if MEDIAINFO_IBIUSAGE
- Ibi_SynchronizationOffset_BeginOfFrame=(int64u)-1;
- #endif //MEDIAINFO_IBIUSAGE
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- ServiceDescriptors_IsPresent=false;
- #endif
- }
-
- ~stream()
- {
- delete Parser; //Parser=NULL;
- for (size_t Pos=0; Pos<Table_IDs.size(); Pos++)
- delete Table_IDs[Pos]; //Table_IDs[Pos]=NULL;
- }
-
- //Helpers
- void Searching_Payload_Start_Set(bool ToSet)
- {
- Searching_Payload_Start=ToSet;
- Searching_Test();
- }
- void Searching_Payload_Continue_Set(bool ToSet)
- {
- Searching_Payload_Continue=ToSet;
- Searching_Test();
- }
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- void Searching_TimeStamp_Start_Set(bool ToSet)
- {
- Searching_TimeStamp_Start=ToSet;
- Searching_Test();
- }
- void Searching_TimeStamp_End_Set(bool ToSet)
- {
- Searching_TimeStamp_End=ToSet;
- Searching_Test();
- }
- #endif //MEDIAINFO_MPEGTS_PCR_YES
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- void Searching_ParserTimeStamp_Start_Set(bool ToSet)
- {
- Searching_ParserTimeStamp_Start=ToSet;
- Searching_Test();
- }
- void Searching_ParserTimeStamp_End_Set(bool ToSet)
- {
- Searching_ParserTimeStamp_End=ToSet;
- Searching_Test();
- }
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- void Searching_Test()
- {
- Searching=Searching_Payload_Start
- | Searching_Payload_Continue
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- | Searching_TimeStamp_Start
- | Searching_TimeStamp_End
- #endif //MEDIAINFO_MPEGTS_PCR_YES
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- | Searching_ParserTimeStamp_Start
- | Searching_ParserTimeStamp_End
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- ;
- }
- };
- typedef std::vector<stream*> streams;
- streams Streams; //Key is pid
- size_t Streams_NotParsedCount;
- size_t Streams_With_StartTimeStampCount;
- size_t Streams_With_EndTimeStampMoreThanxSecondsCount;
-
- //ATSC
- int8u GPS_UTC_offset;
- struct source
- {
- std::map<int16u, Ztring> texts;
- struct atsc_epg_block
- {
- struct event
- {
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- File__Analyze::servicedescriptors* ServiceDescriptors;
- #endif
- int32u start_time;
- Ztring duration;
- Ztring title;
- std::map<int16u, Ztring> texts;
-
- event()
- :
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- ServiceDescriptors(NULL),
- #endif
- start_time((int32u)-1)
- {}
-
- event(const event& e)
- :
- start_time(e.start_time)
- {
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- if (e.ServiceDescriptors)
- {
- ServiceDescriptors=new File__Analyze::servicedescriptors;
- *ServiceDescriptors=*e.ServiceDescriptors;
- }
- else
- ServiceDescriptors=NULL;
- #endif
- }
-
- event& operator=(const event& e)
- {
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- if (e.ServiceDescriptors)
- {
- ServiceDescriptors=new File__Analyze::servicedescriptors;
- *ServiceDescriptors=*e.ServiceDescriptors;
- }
- else
- ServiceDescriptors=NULL;
- #endif
- start_time=e.start_time;
-
- return *this;
- }
-
- ~event()
- {
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- delete ServiceDescriptors;
- #endif
- }
- };
-
- typedef std::map<int16u, event> events; //Key is event_id
- events Events; //Key is event_id
- };
- typedef std::map<int16u, atsc_epg_block> atsc_epg_blocks; //Key is table_id
- atsc_epg_blocks ATSC_EPG_Blocks; //Key is table_id
- bool ATSC_EPG_Blocks_IsUpdated;
-
- source()
- {
- ATSC_EPG_Blocks_IsUpdated=false;
- }
- };
- typedef std::map<int16u, source> sources; //Key is source_id
- sources Sources; //Key is source_id
- bool Sources_IsUpdated; //For EPG ATSC
- bool Programs_IsUpdated; //For EPG DVB
- bool NoPatPmt;
-
- //File__Duplicate
- bool File__Duplicate_HasChanged_;
- size_t Config_File_Duplicate_Get_AlwaysNeeded_Count;
- std::vector<File__Duplicate_MpegTs*> Duplicates_Speed;
- std::vector<std::vector<File__Duplicate_MpegTs*> > Duplicates_Speed_FromPID;
- std::map<const String, File__Duplicate_MpegTs*> Duplicates;
- bool File__Duplicate_Get_From_PID (int16u pid)
- {
- if (Duplicates_Speed_FromPID.empty())
- return false;
- return !Duplicates_Speed_FromPID[pid].empty();
- }
-
- //SpeedUp information
- std::vector<std::vector<size_t> > StreamPos_ToRemove;
- std::map<int16u, int16u> PCR_PIDs; //Key is PCR_PID, value is count of programs using it
- std::set<int16u> PES_PIDs; //Key is pid
- std::vector<int16u> program_number_Order;
-
- //Constructor/Destructor
- complete_stream()
- {
- transport_stream_id=(int16u)-1;
- transport_stream_id_IsValid=false;
- Duration_End_IsUpdated=false;
- Streams_NotParsedCount=(size_t)-1;
- Streams_With_StartTimeStampCount=0;
- Streams_With_EndTimeStampMoreThanxSecondsCount=0;
- GPS_UTC_offset=0;
- Sources_IsUpdated=false;
- Programs_IsUpdated=false;
- NoPatPmt=false;
- StreamPos_ToRemove.resize(Stream_Max);
- File__Duplicate_HasChanged_ = false;
- Config_File_Duplicate_Get_AlwaysNeeded_Count = 0;
- }
-
- ~complete_stream()
- {
- for (size_t StreamID=0; StreamID<Streams.size(); StreamID++)
- delete Streams[StreamID]; //Streams[StreamID]=NULL;
-
- std::map<const String, File__Duplicate_MpegTs*>::iterator Duplicates_Temp=Duplicates.begin();
- while (Duplicates_Temp!=Duplicates.end())
- {
- delete Duplicates_Temp->second; //Duplicates_Temp->second=NULL
- ++Duplicates_Temp;
- }
- }
-};
-
-//***************************************************************************
-// Class File_Mpeg_Descriptors
-//***************************************************************************
-
-class File_Mpeg_Descriptors : public File__Analyze
-{
-public :
- //In
- complete_stream* Complete_Stream;
- int16u transport_stream_id;
- int16u pid;
- int8u table_id;
- int16u table_id_extension;
- int16u elementary_PID;
- int16u program_number;
- int32u registration_format_identifier;
- int8u stream_type;
- int16u event_id;
- bool elementary_PID_IsValid;
- bool program_number_IsValid;
- bool registration_format_identifier_IsValid;
- bool stream_type_IsValid;
- bool event_id_IsValid;
-
- //Out
-
- //Constructor/Destructor
- File_Mpeg_Descriptors();
-
-private :
- //Buffer - File header
- void FileHeader_Parse();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Descriptors();
- void Descriptor();
- void Descriptor_00() {Skip_XX(Element_Size, "Data");};
- void Descriptor_01() {Skip_XX(Element_Size, "Data");};
- void Descriptor_02();
- void Descriptor_03();
- void Descriptor_04() {Skip_XX(Element_Size, "Data");};
- void Descriptor_05();
- void Descriptor_06();
- void Descriptor_07();
- void Descriptor_08();
- void Descriptor_09();
- void Descriptor_0A();
- void Descriptor_0B();
- void Descriptor_0C() {Skip_XX(Element_Size, "Data");};
- void Descriptor_0D();
- void Descriptor_0E();
- void Descriptor_0F();
- void Descriptor_10();
- void Descriptor_11();
- void Descriptor_12() {Skip_XX(Element_Size, "Data");};
- void Descriptor_13() {Skip_XX(Element_Size, "Data");};
- void Descriptor_14() {Skip_XX(Element_Size, "Data");};
- void Descriptor_15() {Skip_XX(Element_Size, "Data");};
- void Descriptor_16() {Skip_XX(Element_Size, "Data");};
- void Descriptor_17() {Skip_XX(Element_Size, "Data");};
- void Descriptor_18() {Skip_XX(Element_Size, "Data");};
- void Descriptor_19() {Skip_XX(Element_Size, "Data");};
- void Descriptor_1A() {Skip_XX(Element_Size, "Data");};
- void Descriptor_1B() {Skip_XX(Element_Size, "Data");};
- void Descriptor_1C();
- void Descriptor_1D();
- void Descriptor_1E() {Skip_XX(Element_Size, "Data");};
- void Descriptor_1F();
- void Descriptor_20() {Skip_XX(Element_Size, "Data");};
- void Descriptor_21() {Skip_XX(Element_Size, "Data");};
- void Descriptor_22() {Skip_XX(Element_Size, "Data");};
- void Descriptor_23() {Skip_XX(Element_Size, "Data");};
- void Descriptor_24() {Skip_XX(Element_Size, "Data");};
- void Descriptor_25() {Skip_XX(Element_Size, "Data");};
- void Descriptor_26() {Skip_XX(Element_Size, "Data");};
- void Descriptor_27() {Skip_XX(Element_Size, "Data");};
- void Descriptor_28();
- void Descriptor_29() {Skip_XX(Element_Size, "Data");};
- void Descriptor_2A();
- void Descriptor_2B() {Skip_XX(Element_Size, "Data");};
- void Descriptor_2C() {Skip_XX(Element_Size, "Data");};
- void Descriptor_2D() {Skip_XX(Element_Size, "Data");};
- void Descriptor_2E() {Skip_XX(Element_Size, "Data");};
- void Descriptor_2F();
- void Descriptor_30() {Skip_XX(Element_Size, "Data");};
- void Descriptor_31() {Skip_XX(Element_Size, "Data");};
- void Descriptor_32() {Skip_XX(Element_Size, "Data");};
- void Descriptor_33() {Skip_XX(Element_Size, "Data");};
- void Descriptor_34() {Skip_XX(Element_Size, "Data");};
- void Descriptor_35() {Skip_XX(Element_Size, "Data");};
- void Descriptor_36() {Skip_XX(Element_Size, "Data");};
- void Descriptor_37() {Skip_XX(Element_Size, "Data");};
- void Descriptor_38() {Skip_XX(Element_Size, "Data");};
- void Descriptor_39() {Skip_XX(Element_Size, "Data");};
- void Descriptor_3A() {Skip_XX(Element_Size, "Data");};
- void Descriptor_3F() {Skip_XX(Element_Size, "Data");};
- void Descriptor_40();
- void Descriptor_41();
- void Descriptor_42() {Skip_XX(Element_Size, "Data");};
- void Descriptor_43();
- void Descriptor_44() {Skip_XX(Element_Size, "Data");};
- void Descriptor_45() {Skip_XX(Element_Size, "Data");};
- void Descriptor_46() {Skip_XX(Element_Size, "Data");};
- void Descriptor_47() {Skip_XX(Element_Size, "Data");};
- void Descriptor_48();
- void Descriptor_49() {Skip_XX(Element_Size, "Data");};
- void Descriptor_4A();
- void Descriptor_4B() {Skip_XX(Element_Size, "Data");};
- void Descriptor_4C() {Skip_XX(Element_Size, "Data");};
- void Descriptor_4D();
- void Descriptor_4E() {Skip_XX(Element_Size, "Data");};
- void Descriptor_4F() {Skip_XX(Element_Size, "Data");};
- void Descriptor_50();
- void Descriptor_51() {Skip_XX(Element_Size, "Data");};
- void Descriptor_52();
- void Descriptor_53() {Skip_XX(Element_Size, "Data");};
- void Descriptor_54();
- void Descriptor_55();
- void Descriptor_56();
- void Descriptor_57() {Skip_XX(Element_Size, "Data");};
- void Descriptor_58();
- void Descriptor_59();
- void Descriptor_5A();
- void Descriptor_5B() {Skip_XX(Element_Size, "Data");};
- void Descriptor_5C() {Skip_XX(Element_Size, "Data");};
- void Descriptor_5D();
- void Descriptor_5E() {Skip_XX(Element_Size, "Data");};
- void Descriptor_5F();
- void Descriptor_60() {Skip_XX(Element_Size, "Data");};
- void Descriptor_61() {Skip_XX(Element_Size, "Data");};
- void Descriptor_62() {Skip_XX(Element_Size, "Data");};
- void Descriptor_63();
- void Descriptor_64() {Skip_XX(Element_Size, "Data");};
- void Descriptor_65() {Skip_XX(Element_Size, "Data");};
- void Descriptor_66();
- void Descriptor_67() {Skip_XX(Element_Size, "Data");};
- void Descriptor_68() {Skip_XX(Element_Size, "Data");};
- void Descriptor_69() {Skip_XX(Element_Size, "Data");};
- void Descriptor_6A();
- void Descriptor_6B() {Skip_XX(Element_Size, "Data");};
- void Descriptor_6C() {Skip_XX(Element_Size, "Data");};
- void Descriptor_6D() {Skip_XX(Element_Size, "Data");};
- void Descriptor_6E() {Skip_XX(Element_Size, "Data");};
- void Descriptor_6F() {Skip_XX(Element_Size, "Data");};
- void Descriptor_70() {Skip_XX(Element_Size, "Data");};
- void Descriptor_71() {Skip_XX(Element_Size, "Data");};
- void Descriptor_72() {Skip_XX(Element_Size, "Data");};
- void Descriptor_73() {Skip_XX(Element_Size, "Data");};
- void Descriptor_74() {Skip_XX(Element_Size, "Data");};
- void Descriptor_75() {Skip_XX(Element_Size, "Data");};
- void Descriptor_76() {Skip_XX(Element_Size, "Data");};
- void Descriptor_77() {Skip_XX(Element_Size, "Data");};
- void Descriptor_78() {Skip_XX(Element_Size, "Data");};
- void Descriptor_79() {Skip_XX(Element_Size, "Data");};
- void Descriptor_7A();
- void Descriptor_7B();
- void Descriptor_7C();
- void Descriptor_7D() {Skip_XX(Element_Size, "Data");};
- void Descriptor_7E() {Skip_XX(Element_Size, "Data");};
- void Descriptor_7F();
- void Descriptor_7F_0F();
- void Descriptor_80() {Skip_XX(Element_Size, "Data");};
- void Descriptor_81();
- void Descriptor_86();
- void Descriptor_87();
- void Descriptor_A0();
- void Descriptor_A1();
- void Descriptor_A2() {Skip_XX(Element_Size, "Data");};
- void Descriptor_A3();
- void Descriptor_A8() {Skip_XX(Element_Size, "Data");};
- void Descriptor_A9() {Skip_XX(Element_Size, "Data");};
- void Descriptor_AA();
- void Descriptor_AB() {Skip_XX(Element_Size, "Data");};
- void Descriptor_C1();
- void Descriptor_C4() {Skip_XX(Element_Size, "Data");};
- void Descriptor_C8();
- void Descriptor_DE();
- void Descriptor_E9();
- void Descriptor_FC();
- void Descriptor_FD();
-
- //SCTE 35
- void CUEI_00();
- void CUEI_01();
- void CUEI_02();
-
- //Helpers
- void ATSC_multiple_string_structure(Ztring &Value, const char* Info);
- void Get_DVB_Text(int64u Size, Ztring &Value, const char* Info);
- void Skip_DVB_Text(int64u Size, const char* Info) {Ztring Temp; Get_DVB_Text(Size, Temp, Info);};
- Ztring Date_MJD(int16u Date);
- Ztring Time_BCD(int32u Time);
- Ztring TimeHHMM_BCD(int16u Time);
- Ztring Frequency_DVB__BCD(int32u Frequency);
- Ztring OrbitalPosition_DVB__BCD(int32u OrbitalPosition);
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Psi.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Psi.cpp
deleted file mode 100644
index 17836f4a9..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Psi.cpp
+++ /dev/null
@@ -1,2633 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEGPS_YES) || defined(MEDIAINFO_MPEGTS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Mpeg_Psi.h"
-#include "MediaInfo/Multiple/File_Mpeg_Descriptors.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#include "ZenLib/Dir.h"
-#include <memory>
-#include <algorithm>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-namespace Elements
-{
- const int32u CUEI=0x43554549; //SCTE
- const int32u GA94=0x47413934; //ATSC - Terrestrial
- const int32u HDMV=0x48444D56; //BluRay
- const int32u S14A=0x53313441; //ATSC - Satellite
- const int32u SCTE=0x53435445; //SCTE
- const int32u TSHV=0x54534856; //TSHV
-}
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Psi_ATSC_table_type(int16u ID)
-{
- switch (ID)
- {
- case 0x0000 : return "Terrestrial VCT with current_next_indicator=1";
- case 0x0001 : return "Terrestrial VCT with current_next_indicator=0";
- case 0x0002 : return "Cable VCT with current_next_indicator=1";
- case 0x0003 : return "Cable VCT with current_next_indicator==0";
- case 0x0004 : return "Channel ETT";
- case 0x0005 : return "DCCSCT";
- case 0x0010 : return "Short-form Virtual Channel Table-VCM Subtyp";
- case 0x0011 : return "Short-form Virtual Channel Table-DCM Subtyp";
- case 0x0012 : return "Short-form Virtual Channel Table-ICM Subtyp";
- case 0x0020 : return "Network Information Table-CDS Table Subtype";
- case 0x0021 : return "Network Information Table-MMS Table Subtype";
- case 0x0030 : return "Network Text Tabl e-SNS Subtype";
- default :
- if (ID>=0x0100
- && ID<=0x017F) return "Event Information Table (EIT)";
- if (ID>=0x0200
- && ID<=0x027F) return "Event Extended Text Table (EETT)";
- if (ID>=0x0300
- && ID<=0x03FF) return "Rating Region Table (RRT)";
- if (ID>=0x0400
- && ID<=0x0FFF) return "User private";
- if (ID>=0x1000
- && ID<=0x10FF) return "Aggregate Event Information Table (AEIT)";
- if (ID>=0x1100
- && ID<=0x11FF) return "Aggregate Extended Text Table (AETT)";
- if (ID>=0x1400
- && ID<=0x14FF) return "DCCT";
- return "Reserved";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Psi_stream_type_Format(int8u stream_type, int32u format_identifier)
-{
- switch (stream_type)
- {
- case 0x01 : return "MPEG Video"; //Version 1
- case 0x02 : return "MPEG Video"; //Version 2
- case 0x03 : return "MPEG Audio"; //Version 1
- case 0x04 : return "MPEG Audio"; //Version 2
- case 0x0F : return "AAC";
- case 0x10 : return "MPEG-4 Visual";
- case 0x11 : return "AAC";
- case 0x1B : return "AVC";
- case 0x1C : return "AAC";
- case 0x1D : return "Timed Text";
- case 0x1E : return "MPEG Video"; //ISO/IEC 23002-3
- case 0x1F : return "AVC";
- case 0x20 : return "AVC";
- case 0x24 :
- case 0x27 : return "HEVC";
- default :
- switch (format_identifier)
- {
- case Elements::CUEI :
- case Elements::SCTE : //SCTE
- case Elements::GA94 :
- case Elements::S14A : //ATSC
- switch (stream_type)
- {
- case 0x80 : return "MPEG Video";
- case 0x81 : return "AC-3";
- case 0x82 : return "Text";
- case 0x86 : return "SCTE 35";
- case 0x87 : return "E-AC-3";
- default : return "";
- }
- case Elements::HDMV : //Bluray
- switch (stream_type)
- {
- case 0x80 : return "PCM";
- case 0x81 : return "AC-3";
- case 0x82 : return "DTS";
- case 0x83 : return "AC-3"; // (TrueHD)"
- case 0x84 : return "E-AC-3";
- case 0x85 : return "DTS"; //" (HD-HRA)"
- case 0x86 : return "DTS"; //" (HD-MA)"
- case 0x90 : return "PGS";
- case 0x91 : return "PGS";
- case 0x92 : return "TEXTST"; //Blu-ray subtitle text
- case 0xA1 : return "AC-3";
- case 0xA2 : return "DTS";
- case 0xEA : return "VC-1";
- default : return "";
- }
- case 0xFFFFFFFF : //Unknown
- return "";
- default :
- switch (stream_type)
- {
- case 0x80 : return "MPEG Video";
- case 0x81 : return "AC-3";
- case 0x87 : return "E-AC-3";
- case 0x88 : return "VC-1";
- case 0xD1 : return "Dirac";
- default : return "";
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Psi_stream_type_Codec(int8u stream_type, int32u format_identifier)
-{
- switch (stream_type)
- {
- case 0x01 : return "MPEG-1V";
- case 0x02 : return "MPEG-2V";
- case 0x03 : return "MPEG-1A";
- case 0x04 : return "MPEG-2A";
- case 0x0F : return "AAC";
- case 0x10 : return "MPEG-4V";
- case 0x11 : return "AAC";
- case 0x1B : return "AVC";
- case 0x1C : return "AAC";
- case 0x1D : return "Text";
- case 0x1E : return "MPEG-2V";
- case 0x1F : return "AVC";
- case 0x20 : return "AVC";
- case 0x24 :
- case 0x27 : return "HEVC";
- default :
- switch (format_identifier)
- {
- case Elements::CUEI :
- case Elements::SCTE : //SCTE
- case Elements::GA94 :
- case Elements::S14A : //ATSC
- switch (stream_type)
- {
- case 0x80 : return "MPEG-2V";
- case 0x81 : return "AC3";
- case 0x82 : return "Text";
- case 0x87 : return "AC3+";
- default : return "";
- }
- case Elements::HDMV : //Bluray
- switch (stream_type)
- {
- case 0x80 : return "PCM";
- case 0x81 : return "AC3";
- case 0x82 : return "DTS";
- case 0x83 : return "AC3+";
- case 0x86 : return "DTS";
- case 0x90 : return "PGS";
- case 0x91 : return "PGS";
- case 0x92 : return "TEXTST"; //Blu-ray Subtitle Text
- case 0xEA : return "VC1";
- default : return "";
- }
- case 0xFFFFFFFF : //Unknown
- return "";
- default :
- switch (stream_type)
- {
- case 0x80 : return "MPEG-2V";
- case 0x81 : return "AC3";
- case 0x87 : return "AC3+";
- case 0x88 : return "VC-1";
- case 0xD1 : return "Dirac";
- default : return "";
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-stream_t Mpeg_Psi_stream_type_StreamKind(int32u stream_type, int32u format_identifier)
-{
- switch (stream_type)
- {
- case 0x01 :
- case 0x02 :
- case 0x10 :
- case 0x1B :
- case 0x1E :
- case 0x1F :
- case 0x20 :
- case 0x24 :
- case 0x27 :
- return Stream_Video;
- case 0x03 :
- case 0x04 :
- case 0x0F :
- case 0x11 :
- case 0x1C :
- return Stream_Audio;
- case 0x1D :
- return Stream_Text;
- default :
- switch (format_identifier)
- {
- case Elements::CUEI :
- case Elements::SCTE : //SCTE
- case Elements::GA94 :
- case Elements::S14A : //ATSC
- switch (stream_type)
- {
- case 0x80 : return Stream_Video;
- case 0x81 : return Stream_Audio;
- case 0x82 : return Stream_Text;
- case 0x87 : return Stream_Audio;
- default : return Stream_Max;
- }
- case Elements::HDMV : //Bluray
- switch (stream_type)
- {
- case 0x80 : return Stream_Audio;
- case 0x81 : return Stream_Audio;
- case 0x82 : return Stream_Audio;
- case 0x83 : return Stream_Audio;
- case 0x84 : return Stream_Audio;
- case 0x85 : return Stream_Audio;
- case 0x86 : return Stream_Audio;
- case 0x90 : return Stream_Text;
- case 0x91 : return Stream_Text;
- case 0x92 : return Stream_Text;
- case 0xA1 : return Stream_Audio;
- case 0xA2 : return Stream_Audio;
- case 0xEA : return Stream_Video;
- default : return Stream_Max;
- }
- case Elements::TSHV : //DV
- switch (stream_type)
- {
- case 0xA0 : return Stream_General;
- case 0xA1 : return Stream_General;
- default : return Stream_Max;
- }
- case 0xFFFFFFFF : //Unknown
- return Stream_Max;
- default :
- switch (stream_type)
- {
- case 0x80 : return Stream_Video;
- case 0x81 : return Stream_Audio;
- case 0x87 : return Stream_Audio;
- case 0x88 : return Stream_Video;
- case 0xD1 : return Stream_Video;
- default : return Stream_Max;
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Psi_stream_type_Info(int8u stream_type, int32u format_identifier)
-{
- switch (stream_type)
- {
- case 0x00 : return "ITU-T | ISO/IEC Reserved";
- case 0x01 : return "ISO/IEC 11172 Video";
- case 0x02 : return "ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream";
- case 0x03 : return "ISO/IEC 11172 Audio";
- case 0x04 : return "ISO/IEC 13818-3 Audio";
- case 0x05 : return "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections";
- case 0x06 : return "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data";
- case 0x07 : return "ISO/IEC 13522 MHEG";
- case 0x08 : return "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Annex A DSM-CC";
- case 0x09 : return "ITU-T Rec. H.222.1";
- case 0x0A : return "ISO/IEC 13818-6 type A";
- case 0x0B : return "ISO/IEC 13818-6 type B";
- case 0x0C : return "ISO/IEC 13818-6 type C";
- case 0x0D : return "ISO/IEC 13818-6 type D";
- case 0x0E : return "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 auxiliary";
- case 0x0F : return "ISO/IEC 13818-7 Audio with ADTS transport syntax";
- case 0x10 : return "ISO/IEC 14496-2 Visual";
- case 0x11 : return "ISO/IEC 14496-3 Audio with the LATM transport syntax as defined in ISO/IEC 14496-3 / AMD 1";
- case 0x12 : return "ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in PES packets";
- case 0x13 : return "ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in ISO/IEC14496_sections.";
- case 0x14 : return "ISO/IEC 13818-6 Synchronized Download Protocol";
- case 0x15 : return "Metadata carried in PES packets";
- case 0x16 : return "Metadata carried in metadata_sections";
- case 0x17 : return "Metadata carried in ISO/IEC 13818-6 Data Carousel";
- case 0x18 : return "Metadata carried in ISO/IEC 13818-6 Object Carousel";
- case 0x19 : return "Metadata carried in ISO/IEC 13818-6 Synchronized Download Protocol";
- case 0x1A : return "IPMP stream (defined in ISO/IEC 13818-11, MPEG-2 IPMP)";
- case 0x1B : return "AVC video stream as defined in ITU-T Rec. H.264 | ISO/IEC 14496-10 Video";
- case 0x1C : return "ISO/IEC 14496-3 Audio, without using any additional transport syntax";
- case 0x1D : return "ISO/IEC 14496-17 Text";
- case 0x1E : return "Auxiliary video data stream as defined in ISO/IEC 23002-3";
- case 0x1F : return "SVC video sub-bitstream of an AVC video stream conforming to one or more profiles defined in Annex G of ITU-T Rec. H.264 | ISO/IEC 14496-10";
- case 0x20 : return "MVC video sub-bitstream of an AVC video stream conforming to one or more profiles defined in Annex H of ITU-T Rec. H.264 | ISO/IEC 14496-10";
- case 0x24 :
- case 0x27 : return "ITU-T Rec. H.265 | ISO/IEC 23008-2 MPEG-H Part 2 / HEVC video stream";
- case 0x7F : return "IPMP stream";
- default :
- if (stream_type<=0x7F) return "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 reserved";
- switch (format_identifier)
- {
- case Elements::CUEI :
- case Elements::GA94 :
- case Elements::S14A : //ATSC
- case Elements::SCTE : //SCTE
- switch (stream_type)
- {
- case 0x80 : return "SCTE - MPEG Video";
- case 0x81 : return "ATSC - AC-3";
- case 0x82 : return "SCTE - Standard Subtitle";
- case 0x83 : return "SCTE - Isochronous Data";
- case 0x84 : return "ATSC - Reserved";
- case 0x85 : return "ATSC - Program Identifier";
- case 0x86 : return "SCTE - Splice";
- case 0x87 : return "ATSC - E-AC-3";
- case 0x90 : return "DVB - stream_type value for Time Slicing / MPE-FEC";
- case 0x95 : return "ATSC - Data Service Table, Network Resources Table";
- default : return "ATSC/SCTE - Unknown";
- }
- case Elements::HDMV : //Bluray
- switch (stream_type)
- {
- case 0x80 : return "BluRay - PCM";
- case 0x81 : return "BluRay - AC-3";
- case 0x82 : return "BluRay - DTS";
- case 0x83 : return "BluRay - AC-3 (TrueHD)";
- case 0x84 : return "BluRay - E-AC-3";
- case 0x85 : return "BluRay - DTS (HD-HRA)";
- case 0x86 : return "BluRay - DTS (HD-MA)";
- case 0x90 : return "BluRay - PGS";
- case 0x91 : return "BluRay - PGS";
- case 0x92 : return "BluRay - TEXTST";
- case 0xA1 : return "BluRay - AC-3";
- case 0xA2 : return "BluRay - DTS";
- case 0xEA : return "BluRay - VC-1";
- default : return "Bluray - Unknown";
- }
- case Elements::TSHV : //DV
- switch (stream_type)
- {
- case 0xA0 : return "DV - Data 0";
- case 0xA1 : return "DV - Data 1";
- default : return "Bluray - Unknown";
- }
- case 0xFFFFFFFF : //Unknown
- return "";
- default :
- switch (stream_type)
- {
- case 0x80 : return "DigiCipher II video";
- case 0x81 : return "AC-3";
- case 0x88 : return "VC-1";
- case 0x87 : return "E-AC-3";
- case 0xD1 : return "Dirac";
- default : return "User Private";
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Psi_table_id(int8u table_id)
-{
- switch (table_id)
- {
- case 0x00 : return "program_association_section";
- case 0x01 : return "conditional_access_section";
- case 0x02 : return "TS_program_map_section";
- case 0x03 : return "TS_description_section";
- case 0x04 : return "ISO_IEC_14496_scene_description_section";
- case 0x05 : return "ISO_IEC_14496_object_descriptor_section";
- case 0x06 : return "Metadata?";
- case 0x38 : return "ISO/IEC 13818-6 reserved";
- case 0x39 : return "DSM-CC addressable section";
- case 0x3A : return "DSM-CC : return MPE";
- case 0x3B : return "DSM-CC : return U-N messages : return except DDM";
- case 0x3C : return "DSM-CC : return DDM";
- case 0x3D : return "DSM-CC : return stream descriptors";
- case 0x3E : return "DSM-CC : return private data : return IP-Datagram";
- case 0x3F : return "DSM-CC addressable section";
- case 0x40 : return "DVB - network_information_section - actual_network";
- case 0x41 : return "DVB - network_information_section - other_network";
- case 0x42 : return "DVB - service_description_section - actual_transport_stream";
- case 0x46 : return "DVB - service_description_section - other_transport_stream";
- case 0x4A : return "DVB - bouquet_association_section";
- case 0x4E : return "DVB - event_information_section - actual_transport_stream : return present/following";
- case 0x4F : return "DVB - event_information_section - other_transport_stream : return present/following";
- case 0x50 :
- case 0x51 :
- case 0x52 :
- case 0x53 :
- case 0x54 :
- case 0x55 :
- case 0x56 :
- case 0x57 :
- case 0x58 :
- case 0x59 :
- case 0x5A :
- case 0x5B :
- case 0x5C :
- case 0x5E :
- case 0x5F : return "DVB - event_information_section - actual_transport_stream : return schedule";
- case 0x60 :
- case 0x61 :
- case 0x62 :
- case 0x63 :
- case 0x64 :
- case 0x65 :
- case 0x66 :
- case 0x67 :
- case 0x68 :
- case 0x69 :
- case 0x6A :
- case 0x6B :
- case 0x6C :
- case 0x6D :
- case 0x6E :
- case 0x6F : return "DVB - event_information_section - other_transport_stream : return schedule";
- case 0x70 : return "DVB - time_date_section";
- case 0x71 : return "DVB - running_status_section";
- case 0x72 : return "DVB - stuffing_section";
- case 0x73 : return "DVB - time_offset_section";
- case 0x74 : return "DVB - application information section";
- case 0x75 : return "DVB - container section";
- case 0x76 : return "DVB - related content section";
- case 0x77 : return "DVB - content identifier section";
- case 0x78 : return "DVB - MPE-FEC section";
- case 0x79 : return "DVB - resolution notification section";
- case 0x7E : return "DVB - discontinuity_information_section";
- case 0x7F : return "DVB - selection_information_section";
- case 0xC0 : return "ATSC - Program Information Message";
- case 0xC1 : return "ATSC - Program Name Message";
- case 0xC2 : return "ATSC/SCTE - Network Information Message";
- case 0xC3 : return "ATSC/SCTE - Network Text Table (NTT)";
- case 0xC4 : return "ATSC/SCTE - Short Form Virtual Channel Table (S-VCT)";
- case 0xC5 : return "ATSC/SCTE - System Time Table (STT)";
- case 0xC6 : return "ATSC/SCTE - Subtitle Message";
- case 0xC7 : return "ATSC - Master Guide Table (MGT)";
- case 0xC8 : return "ATSC - Terrestrial Virtual Channel Table (TVCT)";
- case 0xC9 : return "ATSC - Cable Virtual Channel Table (CVCT) / Long-form Virtual Channel Table (L-VCT)";
- case 0xCA : return "ATSC - Rating Region Table (RRT)";
- case 0xCB : return "ATSC - Event Information Table (EIT)";
- case 0xCC : return "ATSC - Extended Text Table (ETT)";
- case 0xCD : return "ATSC - System Time Table (STT)";
- case 0xCE : return "ATSC - Data Event Table (DET)";
- case 0xCF : return "ATSC - Data Service Table (DST)";
- case 0xD0 : return "ATSC - Program Identifier Table (PIT)";
- case 0xD1 : return "ATSC - Network Resource Table (NRT)";
- case 0xD2 : return "ATSC - Long-term Service Table (L-TST)";
- case 0xD3 : return "ATSC - Directed Channel Change Table (DCCT)";
- case 0xD4 : return "ATSC - DCC Selection Code Table (DCCSCT)";
- case 0xD5 : return "ATSC - Selection Information Table (SIT)";
- case 0xD6 : return "ATSC - Aggregate Event Information Table (AEIT)";
- case 0xD7 : return "ATSC - Aggregate Extended Text Table (AETT)";
- case 0xD8 : return "ATSC - Cable Emergency Alert";
- case 0xD9 : return "ATSC - Aggregate Data Event Table";
- case 0xDA : return "ATSC - Satellite VCT (SVCT)";
- case 0xFC : return "SCTE - Splice";
- default :
- if (table_id>=0x06
- && table_id<=0x37) return "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 reserved";
- if (table_id>=0x40
- && table_id<=0x7F) return "DVB - reserved";
- if (table_id>=0x80
- && table_id<=0x8F) return "CA message";
- if (table_id>=0xC0
- && table_id<=0xDF) return "ATSC/SCTE - reserved";
- if (table_id<=0xFE) return "User Private";
- return "unknown";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Psi_atsc_service_type(int8u service_type)
-{
- switch (service_type)
- {
- case 0x00 : return "reserved";
- case 0x01 : return "Analog television";
- case 0x02 : return "Digital television";
- case 0x03 : return "Digital radio";
- case 0x04 : return "Data";
- default : return "reserved for future use";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Psi_table_id_extension(int8u table_id)
-{
- switch (table_id)
- {
- case 0x00 : return "transport_stream_id";
- case 0x01 : return "reserved";
- case 0x02 : return "program_number";
- case 0x03 : return "reserved";
- case 0x40 : return "network_id";
- case 0x42 :
- case 0x46 : return "transport_stream_id";
- case 0x4E :
- case 0x4F :
- case 0x50 :
- case 0x51 :
- case 0x52 :
- case 0x53 :
- case 0x54 :
- case 0x55 :
- case 0x56 :
- case 0x57 :
- case 0x58 :
- case 0x59 :
- case 0x5A :
- case 0x5B :
- case 0x5C :
- case 0x5E :
- case 0x5F :
- case 0x60 :
- case 0x61 :
- case 0x62 :
- case 0x63 :
- case 0x64 :
- case 0x65 :
- case 0x66 :
- case 0x67 :
- case 0x68 :
- case 0x69 :
- case 0x6A :
- case 0x6B :
- case 0x6C :
- case 0x6D :
- case 0x6E :
- case 0x6F : return "service_id";
- case 0x7F : return "DVB_reserved_for_future_use";
- case 0xC8 :
- case 0xC9 : return "transport_stream_id";
- case 0xCA : return "reserved + rating_region";
- case 0xCB : return "source_id";
- case 0xCC : return "ETT_table_id_extension";
- case 0xD9 : return "AEIT_subtype + MGT_tag";
- case 0xDA : return "SVCT_subtype + SVCT_id";
- default : return "table_id_extension";
- }
-}
-
-//---------------------------------------------------------------------------
-// CRC_32_Table
-// A CRC is computed like this:
-// Init: int32u CRC_32 = 0xFFFFFFFF;
-// for each data byte do
-// CRC_32=(CRC_32<<8) ^ CRC_32_Table[(CRC_32>>24)^(data_byte)];
-int32u Psi_CRC_32_Table[256] =
-{
- 0x00000000, 0x04C11DB7, 0x09823B6E, 0x0D4326D9,
- 0x130476DC, 0x17C56B6B, 0x1A864DB2, 0x1E475005,
- 0x2608EDB8, 0x22C9F00F, 0x2F8AD6D6, 0x2B4BCB61,
- 0x350C9B64, 0x31CD86D3, 0x3C8EA00A, 0x384FBDBD,
- 0x4C11DB70, 0x48D0C6C7, 0x4593E01E, 0x4152FDA9,
- 0x5F15ADAC, 0x5BD4B01B, 0x569796C2, 0x52568B75,
- 0x6A1936C8, 0x6ED82B7F, 0x639B0DA6, 0x675A1011,
- 0x791D4014, 0x7DDC5DA3, 0x709F7B7A, 0x745E66CD,
- 0x9823B6E0, 0x9CE2AB57, 0x91A18D8E, 0x95609039,
- 0x8B27C03C, 0x8FE6DD8B, 0x82A5FB52, 0x8664E6E5,
- 0xBE2B5B58, 0xBAEA46EF, 0xB7A96036, 0xB3687D81,
- 0xAD2F2D84, 0xA9EE3033, 0xA4AD16EA, 0xA06C0B5D,
- 0xD4326D90, 0xD0F37027, 0xDDB056FE, 0xD9714B49,
- 0xC7361B4C, 0xC3F706FB, 0xCEB42022, 0xCA753D95,
- 0xF23A8028, 0xF6FB9D9F, 0xFBB8BB46, 0xFF79A6F1,
- 0xE13EF6F4, 0xE5FFEB43, 0xE8BCCD9A, 0xEC7DD02D,
- 0x34867077, 0x30476DC0, 0x3D044B19, 0x39C556AE,
- 0x278206AB, 0x23431B1C, 0x2E003DC5, 0x2AC12072,
- 0x128E9DCF, 0x164F8078, 0x1B0CA6A1, 0x1FCDBB16,
- 0x018AEB13, 0x054BF6A4, 0x0808D07D, 0x0CC9CDCA,
- 0x7897AB07, 0x7C56B6B0, 0x71159069, 0x75D48DDE,
- 0x6B93DDDB, 0x6F52C06C, 0x6211E6B5, 0x66D0FB02,
- 0x5E9F46BF, 0x5A5E5B08, 0x571D7DD1, 0x53DC6066,
- 0x4D9B3063, 0x495A2DD4, 0x44190B0D, 0x40D816BA,
- 0xACA5C697, 0xA864DB20, 0xA527FDF9, 0xA1E6E04E,
- 0xBFA1B04B, 0xBB60ADFC, 0xB6238B25, 0xB2E29692,
- 0x8AAD2B2F, 0x8E6C3698, 0x832F1041, 0x87EE0DF6,
- 0x99A95DF3, 0x9D684044, 0x902B669D, 0x94EA7B2A,
- 0xE0B41DE7, 0xE4750050, 0xE9362689, 0xEDF73B3E,
- 0xF3B06B3B, 0xF771768C, 0xFA325055, 0xFEF34DE2,
- 0xC6BCF05F, 0xC27DEDE8, 0xCF3ECB31, 0xCBFFD686,
- 0xD5B88683, 0xD1799B34, 0xDC3ABDED, 0xD8FBA05A,
- 0x690CE0EE, 0x6DCDFD59, 0x608EDB80, 0x644FC637,
- 0x7A089632, 0x7EC98B85, 0x738AAD5C, 0x774BB0EB,
- 0x4F040D56, 0x4BC510E1, 0x46863638, 0x42472B8F,
- 0x5C007B8A, 0x58C1663D, 0x558240E4, 0x51435D53,
- 0x251D3B9E, 0x21DC2629, 0x2C9F00F0, 0x285E1D47,
- 0x36194D42, 0x32D850F5, 0x3F9B762C, 0x3B5A6B9B,
- 0x0315D626, 0x07D4CB91, 0x0A97ED48, 0x0E56F0FF,
- 0x1011A0FA, 0x14D0BD4D, 0x19939B94, 0x1D528623,
- 0xF12F560E, 0xF5EE4BB9, 0xF8AD6D60, 0xFC6C70D7,
- 0xE22B20D2, 0xE6EA3D65, 0xEBA91BBC, 0xEF68060B,
- 0xD727BBB6, 0xD3E6A601, 0xDEA580D8, 0xDA649D6F,
- 0xC423CD6A, 0xC0E2D0DD, 0xCDA1F604, 0xC960EBB3,
- 0xBD3E8D7E, 0xB9FF90C9, 0xB4BCB610, 0xB07DABA7,
- 0xAE3AFBA2, 0xAAFBE615, 0xA7B8C0CC, 0xA379DD7B,
- 0x9B3660C6, 0x9FF77D71, 0x92B45BA8, 0x9675461F,
- 0x8832161A, 0x8CF30BAD, 0x81B02D74, 0x857130C3,
- 0x5D8A9099, 0x594B8D2E, 0x5408ABF7, 0x50C9B640,
- 0x4E8EE645, 0x4A4FFBF2, 0x470CDD2B, 0x43CDC09C,
- 0x7B827D21, 0x7F436096, 0x7200464F, 0x76C15BF8,
- 0x68860BFD, 0x6C47164A, 0x61043093, 0x65C52D24,
- 0x119B4BE9, 0x155A565E, 0x18197087, 0x1CD86D30,
- 0x029F3D35, 0x065E2082, 0x0B1D065B, 0x0FDC1BEC,
- 0x3793A651, 0x3352BBE6, 0x3E119D3F, 0x3AD08088,
- 0x2497D08D, 0x2056CD3A, 0x2D15EBE3, 0x29D4F654,
- 0xC5A92679, 0xC1683BCE, 0xCC2B1D17, 0xC8EA00A0,
- 0xD6AD50A5, 0xD26C4D12, 0xDF2F6BCB, 0xDBEE767C,
- 0xE3A1CBC1, 0xE760D676, 0xEA23F0AF, 0xEEE2ED18,
- 0xF0A5BD1D, 0xF464A0AA, 0xF9278673, 0xFDE69BC4,
- 0x89B8FD09, 0x8D79E0BE, 0x803AC667, 0x84FBDBD0,
- 0x9ABC8BD5, 0x9E7D9662, 0x933EB0BB, 0x97FFAD0C,
- 0xAFB010B1, 0xAB710D06, 0xA6322BDF, 0xA2F33668,
- 0xBCB4666D, 0xB8757BDA, 0xB5365D03, 0xB1F740B4
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Psi_running_status[]=
-{
- "",
- "Not running",
- "Starts in a few seconds",
- "Pausing",
- "Running",
- "Reserved",
- "Reserved",
- "Reserved",
-};
-
-//---------------------------------------------------------------------------
-extern const char* Mpeg_Descriptors_original_network_id(int16u original_network_id);
-
-//---------------------------------------------------------------------------
-const char* Mpeg_Psi_splice_command_type(int8u splice_command_type)
-{
- switch (splice_command_type)
- {
- case 0x00 : return "splice_null";
- case 0x04 : return "splice_schedule";
- case 0x05 : return "splice_insert";
- case 0x06 : return "time_signal";
- case 0x07 : return "bandwidth_reservation";
- default : return "Reserved";
- }
-};
-
-
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Mpeg_Psi::File_Mpeg_Psi()
-:File__Analyze()
-{
- //In
- From_TS=true; //Default is from TS
- Complete_Stream=NULL;
- pid=(int16u)-1;
-
- //Temp
- transport_stream_id=0x0000; //Impossible
- CRC_32=0;
- elementary_PID=0x0000;
- program_number=0x0000;
- stream_type=0x00;
- event_id=0x0000;
- elementary_PID_IsValid=false;
- program_number_IsValid=false;
- stream_type_IsValid=false;
- event_id_IsValid=false;
- current_next_indicator=false;
- IsATSC=false;
- ForceStreamDisplay=MediaInfoLib::Config.MpegTs_ForceStreamDisplay_Get();
-}
-
-//---------------------------------------------------------------------------
-File_Mpeg_Psi::~File_Mpeg_Psi()
-{
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::FileHeader_Parse()
-{
- //Parsing
- if (From_TS)
- {
- int8u pointer_field;
- Get_B1 (pointer_field, "pointer_field");
- if (pointer_field)
- Skip_XX(pointer_field, "payload");
- }
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Mpeg_Psi::Header_Begin()
-{
- if (Buffer_Offset) //Not the first one
- {
- Peek_B1(table_id);
- if (table_id==0xFF)
- {
- Accept();
- Fill();
- Finish();
- return false;
- }
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Header_Parse()
-{
- //From Program stream
- if (!From_TS)
- {
- //Filling
- table_id=0xFF; //Make it invalid
- section_syntax_indicator=false;
- Header_Fill_Code((int64u)-1, "program_stream_map"); //(int64u)-1 for precising "out of scope"
- Header_Fill_Size(Element_Size-4);
- return;
- }
-
- //Parsing
- int16u section_length;
- Get_B1 (table_id, "table_id");
- BS_Begin();
- Get_SB ( section_syntax_indicator, "section_syntax_indicator");
- Skip_SB( "private_indicator");
- Skip_S1( 2, "reserved");
- Get_S2 (12, section_length, "section_length");
- BS_End();
-
- //Size
- if ((size_t)section_length<Element_Offset+(section_syntax_indicator?4:0)) //We must have 4 more byte for CRC
- {
- Reject("PSI"); //Error, we exit
- return;
- }
- if (Element_Size<Element_Offset+section_length)
- {
- Element_WaitForMoreData();
- return;
- }
- //Element[Element_Level-1].IsComplete=true;
-
- //CRC32
- if (table_id<=0x06 && !section_syntax_indicator)
- {
- Trusted_IsNot("CRC error");
- CRC_32=0xffffffff;
- Reject();
- return;
- }
- if (section_syntax_indicator || table_id==0xC1)
- {
- CRC_32=0xffffffff;
- const int8u* CRC_32_Buffer=Buffer+Buffer_Offset+(size_t)Element_Offset-3; //table_id position
-
- while(CRC_32_Buffer<Buffer+Buffer_Offset+(size_t)Element_Offset+section_length) //from table_id to the end, CRC_32 included
- {
- CRC_32=(CRC_32<<8) ^ Psi_CRC_32_Table[(CRC_32>>24)^(*CRC_32_Buffer)];
- CRC_32_Buffer++;
- }
-
- if (CRC_32)
- {
- Trusted_IsNot("CRC error");
- Reject();
- return;
- }
- }
-
- //Filling
- Header_Fill_Code(table_id, Ztring().From_Number(table_id, 16));
- Header_Fill_Size(3+section_length);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Data_Parse()
-{
- //Check if OK
- if (table_id<=0x06 && !section_syntax_indicator)
- {
- Skip_XX(Element_Size, "Data (section_syntax_indicator failed)");
- Finish("PSI");
- return;
- }
-
- if (section_syntax_indicator)
- {
- Element_Size-=4; //Reserving size of CRC32
- Get_B2( table_id_extension, Mpeg_Psi_table_id_extension(table_id)); Element_Name(Ztring(Mpeg_Psi_table_id_extension(table_id))+__T("=")+Ztring::ToZtring_From_CC2(table_id_extension));
- BS_Begin();
- Skip_S1( 2, "reserved");
- Get_S1 ( 5, version_number, "version_number"); Element_Info1(__T("Version=")+Ztring::ToZtring(version_number));
- Get_SB ( current_next_indicator, "current_next_indicator");
- BS_End();
- Info_B1( section_number, "section_number"); Element_Info1(__T("Section=")+Ztring::ToZtring(section_number));
- Skip_B1( "last_section_number");
- }
- else if (table_id==0xC1)
- {
- Element_Size-=4; //Reserving size of CRC32
- }
-
- #define ELEMENT_CASE(_NAME, _DETAIL) \
- case 0x##_NAME : Element_Name(_DETAIL); Table_##_NAME(); break;
-
- switch (table_id)
- {
- ELEMENT_CASE(00, "program_association_section");
- ELEMENT_CASE(01, "conditional_access_section");
- ELEMENT_CASE(02, "TS_program_map_section");
- ELEMENT_CASE(03, "TS_description_section");
- ELEMENT_CASE(04, "ISO_IEC_14496_scene_description_section");
- ELEMENT_CASE(05, "ISO_IEC_14496_object_descriptor_section");
- ELEMENT_CASE(06, "Metadata?");
- ELEMENT_CASE(38, "ISO/IEC 13818-6 reserved");
- ELEMENT_CASE(39, "DSM-CC addressable section");
- ELEMENT_CASE(3A, "DSM-CC, MPE");
- ELEMENT_CASE(3B, "DSM-CC, U-N messages, except DDM");
- ELEMENT_CASE(3C, "DSM-CC, DDM");
- ELEMENT_CASE(3D, "DSM-CC, stream descriptors");
- ELEMENT_CASE(3E, "DSM-CC, private data, IP-Datagram");
- ELEMENT_CASE(3F, "DSM-CC addressable section");
- ELEMENT_CASE(40, "DVB - network_information_section - actual_network");
- ELEMENT_CASE(41, "DVB - network_information_section - other_network");
- ELEMENT_CASE(42, "DVB - service_description_section - actual_transport_stream");
- ELEMENT_CASE(46, "DVB - service_description_section - other_transport_stream");
- ELEMENT_CASE(4A, "DVB - bouquet_association_section");
- ELEMENT_CASE(4E, "DVB - event_information_section - actual_transport_stream, present/following");
- ELEMENT_CASE(4F, "DVB - event_information_section - other_transport_stream, present/following");
- case 0x50 :
- case 0x51 :
- case 0x52 :
- case 0x53 :
- case 0x54 :
- case 0x55 :
- case 0x56 :
- case 0x57 :
- case 0x58 :
- case 0x59 :
- case 0x5A :
- case 0x5B :
- case 0x5C :
- case 0x5E :
- ELEMENT_CASE(5F, "DVB - event_information_section - actual_transport_stream, schedule");
- case 0x60 :
- case 0x61 :
- case 0x62 :
- case 0x63 :
- case 0x64 :
- case 0x65 :
- case 0x66 :
- case 0x67 :
- case 0x68 :
- case 0x69 :
- case 0x6A :
- case 0x6B :
- case 0x6C :
- case 0x6D :
- case 0x6E :
- ELEMENT_CASE(6F, "DVB - event_information_section - other_transport_stream, schedule");
- ELEMENT_CASE(70, "DVB - time_date_section");
- ELEMENT_CASE(71, "DVB - running_status_section");
- ELEMENT_CASE(72, "DVB - stuffing_section");
- ELEMENT_CASE(73, "DVB - time_offset_section");
- ELEMENT_CASE(74, "DVB - application information section");
- ELEMENT_CASE(75, "DVB - container section");
- ELEMENT_CASE(76, "DVB - related content section");
- ELEMENT_CASE(77, "DVB - content identifier section");
- ELEMENT_CASE(78, "DVB - MPE-FEC section");
- ELEMENT_CASE(79, "DVB - resolution notification section");
- ELEMENT_CASE(7E, "DVB - discontinuity_information_section");
- ELEMENT_CASE(7F, "DVB - selection_information_section");
- ELEMENT_CASE(C0, "ATSC - Program Information Message");
- ELEMENT_CASE(C1, "ATSC - Program Name Message");
- ELEMENT_CASE(C2, "ATSC/SCTE - Network Information Message");
- ELEMENT_CASE(C3, "ATSC/SCTE - Network Text Table (NTT)");
- ELEMENT_CASE(C4, "ATSC/SCTE - Short Form Virtual Channel Table (S-VCT)");
- ELEMENT_CASE(C5, "ATSC/SCTE - System Time Table (STT)");
- ELEMENT_CASE(C6, "ATSC/SCTE - Subtitle Message");
- ELEMENT_CASE(C7, "ATSC - Master Guide Table (MGT)");
- ELEMENT_CASE(C8, "ATSC - Terrestrial Virtual Channel Table (TVCT)");
- ELEMENT_CASE(C9, "ATSC - Cable Virtual Channel Table (CVCT) / Long-form Virtual Channel Table (L-VCT)");
- ELEMENT_CASE(CA, "ATSC - Rating Region Table (RRT)");
- ELEMENT_CASE(CB, "ATSC - Event Information Table (EIT)");
- ELEMENT_CASE(CC, "ATSC - Extended Text Table (ETT)");
- ELEMENT_CASE(CD, "ATSC - System Time Table (STT)");
- ELEMENT_CASE(CE, "ATSC - Data Event Table (DET)");
- ELEMENT_CASE(CF, "ATSC - Data Service Table (DST)");
- ELEMENT_CASE(D0, "ATSC - Program Identifier Table (PIT)");
- ELEMENT_CASE(D1, "ATSC - Network Resource Table (NRT)");
- ELEMENT_CASE(D2, "ATSC - Long-term Service Table (L-TST)");
- ELEMENT_CASE(D3, "ATSC - Directed Channel Change Table (DCCT)");
- ELEMENT_CASE(D4, "ATSC - DCC Selection Code Table (DCCSCT)");
- ELEMENT_CASE(D5, "ATSC - Selection Information Table (SIT)");
- ELEMENT_CASE(D6, "ATSC - Aggregate Event Information Table (AEIT)");
- ELEMENT_CASE(D7, "ATSC - Aggregate Extended Text Table (AETT)");
- ELEMENT_CASE(D8, "ATSC - Cable Emergency Alert");
- ELEMENT_CASE(D9, "ATSC - Aggregate Data Event Table");
- ELEMENT_CASE(DA, "ATSC - Satellite VCT");
- ELEMENT_CASE(FC, "SCTE - Splice");
- default :
- if (table_id>=0x06
- && table_id<=0x37) {Element_Name("ITU-T Rec. H.222.0 | ISO/IEC 13818-1 reserved"); Skip_XX(Element_Size, "Unknown"); break;}
- if (table_id>=0x40
- && table_id<=0x7F) {Element_Name("DVB - reserved"); Skip_XX(Element_Size, "Unknown"); break;}
- if (table_id>=0x80
- && table_id<=0x8F) {Element_Name("CA message, EMM, ECM"); Skip_XX(Element_Size, "Unknown"); break;}
- if (table_id>=0xC0
- && table_id<=0xDF) {Element_Name("ATSC/SCTE - reserved");Skip_XX(Element_Size, "Unknown"); break;}
- if (table_id<=0xFE) {Element_Name("User Private"); Skip_XX(Element_Size, "Unknown"); break;}
- if (Element_Code==(int64u)-1) {program_stream_map(); break;} //Specific to MPEG-PS
- {Element_Name("forbidden"); Skip_XX(Element_Size, "Unknown"); break;}
- }
-
- if (section_syntax_indicator || table_id==0xC1)
- {
- Element_Size+=4;
- Skip_B4( "CRC32");
- }
-
- if (table_id>=0x40
- && Config->ParseSpeed>=0.5
- && Complete_Stream->Streams_NotParsedCount!=(size_t)-1 && Complete_Stream->Streams_NotParsedCount!=0)
- Complete_Stream->Streams_NotParsedCount=(size_t)-1; //Disabling speed up for detection in case of DVB/ATSC tables, we want all of them.
-
- if (Buffer_Offset+Element_Size==Buffer_Size)
- {
- Accept();
- Fill();
- Finish();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_reserved()
-{
-
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_iso13818_6()
-{
- Element_Info1("Defined in ISO/IEC 13818-6");
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_user_private()
-{
- Element_Info1("user_private");
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_forbidden()
-{
- Element_Info1("forbidden");
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::program_stream_map()
-{
- Element_Name("program_stream_map");
- table_id=0x02; // program_map_section
-
- //Parsing
- int16u elementary_stream_map_length;
- bool single_extension_stream_flag;
- BS_Begin();
- Skip_SB( "current_next_indicator");
- Get_SB (single_extension_stream_flag, "single_extension_stream_flag");
- Skip_SB( "reserved");
- Skip_S1( 5, "program_stream_map_version");
- Skip_S1( 7, "reserved");
- Mark_1 ();
- BS_End();
- Get_B2 (Descriptors_Size, "program_stream_info_length");
- if (Descriptors_Size>0)
- Descriptors();
-
- Get_B2 (elementary_stream_map_length, "elementary_stream_map_length");
- int16u elementary_stream_map_Pos=0;
- while (Element_Offset<Element_Size && elementary_stream_map_Pos<elementary_stream_map_length)
- {
- Element_Begin0();
- int16u ES_info_length;
- int8u stream_type, elementary_stream_id;
- Get_B1 (stream_type, "stream_type"); Param_Info1(Mpeg_Psi_stream_type_Info(stream_type, 0x00000000));
- Get_B1 (elementary_stream_id, "elementary_stream_id");
- Get_B2 (ES_info_length, "ES_info_length");
- Descriptors_Size=ES_info_length;
- Element_Name(Ztring::ToZtring(elementary_stream_id, 16));
- if (elementary_stream_id==0xFD && !single_extension_stream_flag)
- {
- Skip_S1(8, "pseudo_descriptor_tag");
- Skip_S1(8, "pseudo_descriptor_length");
- Mark_1();
- Skip_S1(7, "elementary_stream_id_extension");
- if (Descriptors_Size>=3)
- Descriptors_Size-=3;
- }
- if (Descriptors_Size>0)
- {
- elementary_PID=elementary_stream_id;
- elementary_PID_IsValid=true;
- Descriptors();
- }
- Element_End0();
- elementary_stream_map_Pos+=4+ES_info_length;
-
- FILLING_BEGIN();
- Complete_Stream->Streams[elementary_stream_id]->stream_type=stream_type;
- Complete_Stream->Streams[elementary_stream_id]->Infos["CodecID"].From_Number(stream_type);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_00()
-{
- //transport_stream_id
- if (!Complete_Stream->transport_stream_id_IsValid || table_id_extension!=Complete_Stream->transport_stream_id)
- {
- if (Complete_Stream->Transport_Streams.find(Complete_Stream->transport_stream_id)!=Complete_Stream->Transport_Streams.end())
- while (!Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs.empty())
- {
- program_number=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs.begin()->first;
- program_number_Remove();
- }
-
- Complete_Stream->transport_stream_id=table_id_extension;
- Complete_Stream->transport_stream_id_IsValid=true;
- }
-
- if (Complete_Stream->Transport_Streams[table_id_extension].Programs_NotParsedCount==(size_t)-1)
- Complete_Stream->Transport_Streams[table_id_extension].Programs_NotParsedCount=0;
- Complete_Stream->Transport_Streams[table_id_extension].programs_List.clear();
-
- //Saving previous status
- std::map<int16u, complete_stream::transport_stream::program> program_numbers_Previous=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs;
-
- //Reseting
- std::vector<int16u> Table_ID_Extension_List;
- for (complete_stream::stream::table_id::table_id_extensions::iterator Table_ID_Extension=Complete_Stream->Streams[0x0000]->Table_IDs[0x00]->Table_ID_Extensions.begin(); Table_ID_Extension!=Complete_Stream->Streams[0x0000]->Table_IDs[0x00]->Table_ID_Extensions.end(); ++Table_ID_Extension)
- if (Table_ID_Extension->first!=table_id_extension)
- Table_ID_Extension_List.push_back(Table_ID_Extension->first);
- for (size_t Pos=0; Pos<Table_ID_Extension_List.size(); Pos++)
- Complete_Stream->Streams[0x0000]->Table_IDs[0x00]->Table_ID_Extensions.erase(Table_ID_Extension_List[Pos]);
-
- //Parsing
- while (Element_Offset<Element_Size)
- {
- Element_Begin1("program");
- Get_B2 ( program_number, "program_number");
- BS_Begin();
- Skip_S1( 3, "reserved");
- Get_S2 ( 13, elementary_PID, program_number?"program_map_PID":"network_PID"); Element_Info1(Ztring::ToZtring_From_CC2(elementary_PID));
- BS_End();
- Element_End0();
-
- FILLING_BEGIN();
- if (elementary_PID
- #if MEDIAINFO_FILTER
- && Config->File_Filter_Get(program_number)
- #endif //MEDIAINFO_FILTER
- )
- {
- program_number_Update();
-
- std::map<int16u, complete_stream::transport_stream::program>::iterator program_number_Previous=program_numbers_Previous.find(program_number);
- if (program_number_Previous!=program_numbers_Previous.end())
- program_numbers_Previous.erase(program_number_Previous);
- }
- FILLING_END();
- }
- BS_End();
-
- FILLING_BEGIN();
- //Removing previous elementary_PIDs no more used
- for (std::map<int16u, complete_stream::transport_stream::program>::iterator program_number_Previous=program_numbers_Previous.begin(); program_number_Previous!=program_numbers_Previous.end(); ++program_number_Previous)
- {
- program_number=program_number_Previous->first;
- program_number_Remove();
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_01()
-{
- //Parsing
- if (Element_Offset<Element_Size)
- {
- Descriptors_Size=(int16u)(Element_Size-Element_Offset);
- if (Descriptors_Size>0)
- Descriptors();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_02()
-{
- //Informing PSI is parsed
- if (!Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[table_id_extension].IsParsed && Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs_NotParsedCount)
- {
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs_NotParsedCount--;
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[table_id_extension].IsParsed=true;
- }
-
- //Saving previous status
- std::vector<int16u> elementary_PIDs_Previous=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[table_id_extension].elementary_PIDs;
-
- //Parsing
- int16u PCR_PID;
- BS_Begin();
- Skip_S1( 3, "reserved");
- Get_S2 (13, PCR_PID, "PCR_PID");
- Skip_S1( 4, "reserved");
- Get_S2 (12, Descriptors_Size, "program_info_length");
- BS_End();
-
- //Descriptors
- transport_stream_id=Complete_Stream->transport_stream_id;
- program_number=table_id_extension;
- program_number_IsValid=true;
- if (Descriptors_Size>0)
- Descriptors();
-
- //Parsing
- while (Element_Offset<Element_Size)
- {
- Element_Begin0();
- BS_Begin();
- Get_S1 ( 8, stream_type, "stream_type"); Element_Info1(Mpeg_Psi_stream_type_Info(stream_type, Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].registration_format_identifier)); Param_Info1(Mpeg_Psi_stream_type_Info(stream_type, Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].registration_format_identifier));
- Skip_S1( 3, "reserved");
- Get_S2 (13, elementary_PID, "elementary_PID");
- Skip_S1( 4, "reserved");
- Get_S2 (12, Descriptors_Size, "ES_info_length");
- BS_End();
-
- FILLING_BEGIN();
- //Searching for hidden Stereoscopic stream
- if (stream_type==0x20 && File_Name_WithoutDemux.size()>=4+1+6+1+4+1+10 && Config->File_Bdmv_ParseTargetedFile_Get())
- {
- //Searching the playlist with the pid
- Ztring Name=File_Name_WithoutDemux;
- Name.resize(Name.size()-(4+1+6+1+4+1+10)); //Removing BDMV/STREAM/SSIF/xxxxx.ssif
- ZtringList List=Dir::GetAllFileNames(Name+__T("BDMV")+PathSeparator+__T("PLAYLIST")+PathSeparator+__T("*.mpls"), Dir::Include_Files);
- std::vector<MediaInfo_Internal*> MIs;
- MIs.resize(List.size());
- size_t FileWithRightPID_Pos=(size_t)-1;
- for (size_t Pos=0; Pos<MIs.size(); Pos++)
- {
- MIs[Pos]=new MediaInfo_Internal();
- MIs[Pos]->Option(__T("File_Bdmv_ParseTargetedFile"), __T("0"));
- MIs[Pos]->Open(List[Pos]);
- if (MIs[Pos]->Count_Get(Stream_Video)==1)
- {
- int16u pid=Ztring(MIs[Pos]->Get(Stream_Video, 0, Video_ID)).To_int16u();
- if (pid==elementary_PID)
- {
- FileWithRightPID_Pos=Pos;
- break;
- }
- }
- }
-
- if (FileWithRightPID_Pos!=(size_t)-1)
- {
- ZtringList ID_List;
- ID_List.Separator_Set(0, __T(" / "));
- ID_List.Write(MIs[FileWithRightPID_Pos]->Get(Stream_Video, 0, Video_ID));
- if (ID_List.size()==2)
- {
- Complete_Stream->Streams[ID_List[1].To_int16u()]->SubStream_pid=elementary_PID;
- Complete_Stream->Streams[elementary_PID]->SubStream_pid=ID_List[1].To_int16u();
-
- elementary_PID=ID_List[1].To_int16u();
- stream_type=0x1B;
-
- bool IsAlreadyPresent=false;
- for (size_t Pos=0; Pos<Complete_Stream->Streams[elementary_PID]->program_numbers.size(); Pos++)
- if (Complete_Stream->Streams[elementary_PID]->program_numbers[Pos]==program_number)
- IsAlreadyPresent=true;
- if (!IsAlreadyPresent)
- {
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].elementary_PIDs.push_back(elementary_PID);
- Complete_Stream->Streams[elementary_PID]->program_numbers.push_back(program_number);
- Complete_Stream->Streams[elementary_PID]->registration_format_identifier=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].registration_format_identifier;
- }
- if (Complete_Stream->Streams[elementary_PID]->Kind!=complete_stream::stream::pes)
- {
- if (Complete_Stream->Streams_NotParsedCount==(size_t)-1)
- Complete_Stream->Streams_NotParsedCount=0;
- Complete_Stream->Streams_NotParsedCount++;
- Complete_Stream->Streams[elementary_PID]->Kind=complete_stream::stream::pes;
- Complete_Stream->Streams[elementary_PID]->stream_type=stream_type;
- Complete_Stream->Streams[elementary_PID]->Searching_Payload_Start_Set(true);
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- Complete_Stream->Streams[elementary_PID]->Searching_TimeStamp_Start_Set(true);
- Complete_Stream->Streams[elementary_PID]->PCR_PID=PCR_PID;
- #endif //MEDIAINFO_MPEGTS_PCR_YES
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- //Complete_Stream->Streams[elementary_PID]->Searching_ParserTimeStamp_Start_Set(true);
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- #if MEDIAINFO_TRACE
- Complete_Stream->Streams[elementary_PID]->Element_Info1="PES";
- #endif //MEDIAINFO_TRACE
- if (Complete_Stream->File__Duplicate_Get_From_PID(elementary_PID))
- Complete_Stream->Streams[elementary_PID]->ShouldDuplicate=true;
- }
- }
-
- }
-
- for (size_t Pos=0; Pos<MIs.size(); Pos++)
- delete MIs[Pos]; //MIs[Pos]=NULL;
- }
-
- if (elementary_PID)
- {
- elementary_PID_Update(PCR_PID);
-
- //Removing from the list of previous elementary_PIDs to remove
- for (size_t Pos=0; Pos<elementary_PIDs_Previous.size(); Pos++)
- if (elementary_PIDs_Previous[Pos]==elementary_PID)
- elementary_PIDs_Previous.erase(elementary_PIDs_Previous.begin()+Pos);
- }
- FILLING_END();
-
- //Descriptors
- elementary_PID_IsValid=true;
- if (Descriptors_Size>0)
- Descriptors();
-
- Element_End1(Ztring::ToZtring_From_CC2(elementary_PID));
- }
-
- FILLING_BEGIN();
- //Removing previous elementary_PIDs no more used
- if (Config->File_MpegTs_RealTime_Get())
- {
- for (size_t Pos=0; Pos<elementary_PIDs_Previous.size(); Pos++)
- {
- elementary_PID=elementary_PIDs_Previous[Pos];
- elementary_PID_Remove();
-
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].Update_Needed_StreamCount=true;
- }
- }
-
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- if (PCR_PID!=0x1FFF) //Not padding packet
- {
- Complete_Stream->Streams[PCR_PID]->IsPCR=true;
- Complete_Stream->PCR_PIDs[PCR_PID]++;
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].PCR_PID=PCR_PID;
- if (Complete_Stream->Streams[PCR_PID]->TimeStamp_Start==(int64u)-1)
- Complete_Stream->Streams[PCR_PID]->Searching_TimeStamp_Start_Set(true);
- #if MEDIAINFO_TRACE
- if (Complete_Stream->Streams[PCR_PID]->Kind==complete_stream::stream::unknown)
- Complete_Stream->Streams[PCR_PID]->Element_Info1="PCR";
- #endif //MEDIAINFO_TRACE
- }
- #endif //MEDIAINFO_MPEGTS_PCR_YES
-
- //Handling ATSC/CEA/DVB
- if (!Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs_NotParsedCount)
- {
- //We know what is each pid, so we can try known values
- #ifdef MEDIAINFO_MPEGTS_ALLSTREAMS_YES
- for (size_t pid=0x10; pid<0x1FFF; pid++) //Wanting 0x10-->0x2F (DVB), 0x1ABC (cea_osd), 0x1FF7-->0x1FFF (ATSC)
- for (size_t Table_ID=0x00; Table_ID<0xFF; Table_ID++)
- {
- Complete_Stream->Streams[pid]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[pid]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[pid]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[pid]->Table_IDs[Table_ID]=new complete_stream::stream::table_id; //event_information_section - actual_transport_stream, schedule
-
- if (Pos==0x001F)
- Pos=0x1ABB; //Skipping normal data
- if (Pos==0x01ABC)
- Pos=0x1FF6; //Skipping normal data
- }
- #else //MEDIAINFO_MPEGTS_ALLSTREAMS_YES
- if (Complete_Stream->Streams[0x0010]->Kind==complete_stream::stream::unknown)
- {
- Complete_Stream->Streams[0x0010]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x0010]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[0x0010]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[0x0010]->Table_IDs[0x40]=new complete_stream::stream::table_id; //network_information_section - actual_network
- }
- if (Complete_Stream->Streams[0x0011]->Kind==complete_stream::stream::unknown)
- {
- Complete_Stream->Streams[0x0011]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x0011]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[0x0011]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[0x0011]->Table_IDs[0x42]=new complete_stream::stream::table_id; //service_description_section - actual_transport_stream
- }
- if (Complete_Stream->Streams[0x0012]->Kind==complete_stream::stream::unknown)
- {
- Complete_Stream->Streams[0x0012]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x0012]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[0x0012]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[0x0012]->Table_IDs[0x4E]=new complete_stream::stream::table_id; //event_information_section - actual_transport_stream, present/following
- for (size_t Table_ID=0x50; Table_ID<0x60; Table_ID++)
- Complete_Stream->Streams[0x0012]->Table_IDs[Table_ID]=new complete_stream::stream::table_id; //event_information_section - actual_transport_stream, schedule
- }
- if (Complete_Stream->Streams[0x0014]->Kind==complete_stream::stream::unknown)
- {
- Complete_Stream->Streams[0x0014]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x0014]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[0x0014]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[0x0014]->Table_IDs[0x70]=new complete_stream::stream::table_id; //time_date_section
- Complete_Stream->Streams[0x0014]->Table_IDs[0x73]=new complete_stream::stream::table_id; //time_offset_section
- }
- if (Complete_Stream->Streams[0x1FFB]->Kind==complete_stream::stream::unknown)
- {
- Complete_Stream->Streams[0x1FFB]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[0x1FFB]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[0x1FFB]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[0x1FFB]->Table_IDs[0xC7]=new complete_stream::stream::table_id; //Master Guide Table
- Complete_Stream->Streams[0x1FFB]->Table_IDs[0xCD]=new complete_stream::stream::table_id; //System Time Table
- }
- #endif //MEDIAINFO_MPEGTS_ALLSTREAMS_YES
- }
-
- if (Buffer_Offset>=4)
- {
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].ExtraInfos_Content["pointer_field"].From_Number(Buffer_Offset-4);
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].ExtraInfos_Option["pointer_field"]=__T("N NT");
- }
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].ExtraInfos_Content["section_length"].From_Number(Element_Size+4);
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].ExtraInfos_Option["section_length"]=__T("N NT");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_03()
-{
- //Parsing
- if (Element_Offset<Element_Size)
- {
- Descriptors_Size=(int16u)(Element_Size-Element_Offset);
- if (Descriptors_Size>0)
- Descriptors();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_40()
-{
- if (IsATSC)
- {
- Skip_XX(Element_Size, "Unknown ATSC");
- return;
- }
-
- //Parsing
- BS_Begin();
- Skip_S1( 4, "reserved");
- Get_S2 (12, Descriptors_Size, "network_descriptors_length");
- BS_End();
-
- //Descriptors
- if (Descriptors_Size>0)
- Descriptors();
-
- //Parsing
- int16u transport_stream_loop_length;
- BS_Begin();
- Skip_S1( 4, "reserved");
- Get_S2 (12, transport_stream_loop_length, "transport_stream_loop_length");
- BS_End();
-
- if (Element_Offset<Element_Size)
- {
- int16u original_network_id;
- Element_Begin0();
- Get_B2 (transport_stream_id, "transport_stream_id"); Element_Info1(transport_stream_id);
- Get_B2 (original_network_id, "original_network_id"); Param_Info1(Mpeg_Descriptors_original_network_id(original_network_id));
- BS_Begin();
- Skip_S1( 4, "reserved");
- Get_S2 (12, Descriptors_Size, "transport_descriptors_length");
- BS_End();
-
- //Descriptors
- if (Descriptors_Size>0)
- Descriptors();
-
- Element_End0();
-
- FILLING_BEGIN();
- Complete_Stream->original_network_name=Mpeg_Descriptors_original_network_id(original_network_id);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_42()
-{
- //Parsing
- Skip_B2( "original_network_id");
- Skip_B1( "reserved_future_use");
- while (Element_Offset<Element_Size)
- {
- Element_Begin0();
- int64u Test;
- Peek_B5(Test);
- if (Test!=0xFFFFFFFFFFULL)
- {
- Get_B2 ( program_number, "service_id");
- BS_Begin();
- Skip_S1( 6, "reserved_future_use");
- Skip_SB( "EIT_schedule_flag");
- Skip_SB( "EIT_present_following_flag");
- Info_S1( 3, running_status, "running_status"); Param_Info1(Mpeg_Psi_running_status[running_status]);
- Skip_SB( "free_CA_mode");
- Get_S2 (12, Descriptors_Size, "ES_info_length");
- BS_End();
-
- //Descriptors
- program_number_IsValid=true;
- if (Descriptors_Size>0)
- Descriptors();
-
- Element_End1(Ztring::ToZtring_From_CC2(program_number));
- }
- else
- {
- Skip_XX(Element_Size-Element_Offset, "Junk");
- Element_End1("Junk");
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_46()
-{
- Table_42();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_4E()
-{
- //Clearing
- Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks[table_id].Events.clear();
- Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks_IsUpdated=true;
- Complete_Stream->Programs_IsUpdated=true;
-
- //Parsing
- Get_B2 (transport_stream_id, "transport_stream_id");
- if (table_id==0x4E || (table_id&0xF0)==0x50) //current transport_stream_id
- transport_stream_id=Complete_Stream->transport_stream_id; //On the example I have, transport_stream_id is something else, what?
- Skip_B2( "original_network_id");
- Skip_B1( "segment_last_section_number");
- Skip_B1( "last_table_id");
- if (Element_Offset==Element_Size)
- {
- Element_DoNotShow(); //This is empty!
- return;
- }
- while (Element_Offset<Element_Size)
- {
- Element_Begin0();
- int32u time, duration;
- int16u date;
- int8u running_status;
- Get_B2 (event_id, "event_id");
- Get_B2 (date, "start_time (date)"); Param_Info1(Date_MJD(date));
- Get_B3 (time, "start_time (time)"); Param_Info1(Time_BCD(time));
- Get_B3 (duration, "duration"); Param_Info1(Time_BCD(duration));
- BS_Begin();
- Get_S1 ( 3, running_status, "running_status"); Param_Info1(Mpeg_Psi_running_status[running_status]);
- Skip_SB( "free_CA_mode");
- Get_S2 (12, Descriptors_Size, "descriptors_loop_length");
- BS_End();
-
- //Descriptors
- event_id_IsValid=true;
- if (Descriptors_Size>0)
- Descriptors();
-
- Element_End1(Ztring::ToZtring_From_CC2(event_id));
-
- FILLING_BEGIN();
- Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks[table_id].Events[event_id].start_time=__T("UTC ")+Date_MJD(date)+__T(" ")+Time_BCD(time);
- Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks[table_id].Events[event_id].duration=Time_BCD(duration);
- if (running_status)
- Complete_Stream->Transport_Streams[transport_stream_id].Programs[table_id_extension].DVB_EPG_Blocks[table_id].Events[event_id].running_status=Mpeg_Psi_running_status[running_status];
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_4F()
-{
- Table_4E();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_5F()
-{
- Table_4E();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_6F()
-{
- Table_4F();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_70()
-{
- //Parsing
- int32u time;
- int16u date;
- Get_B2 (date, "UTC_time (date)"); Param_Info1(Date_MJD(date));
- Get_B3 (time, "UTC_time (time)"); Param_Info1(Time_BCD(time));
-
- FILLING_BEGIN();
- if (Complete_Stream->Duration_Start.empty())
- Complete_Stream->Duration_Start=__T("UTC ")+Date_MJD(date)+__T(" ")+Time_BCD(time);
- Complete_Stream->Duration_End=__T("UTC ")+Date_MJD(date)+__T(" ")+Time_BCD(time);
- Complete_Stream->Duration_End_IsUpdated=true;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_73()
-{
- //Parsing
- int32u time;
- int16u date;
- Get_B2 (date, "UTC_time (date)"); Param_Info1(Date_MJD(date));
- Get_B3 (time, "UTC_time (time)"); Param_Info1(Time_BCD(time));
- BS_Begin();
- Skip_S1( 4, "DVB_reserved_for_future_use");
- Get_S2 (12, Descriptors_Size, "transmission_info_loop_length");
- BS_End();
-
- //Descriptors
- if (Descriptors_Size>0)
- Descriptors();
-
- Skip_B4( "CRC32");
-
- FILLING_BEGIN();
- if (Complete_Stream->Duration_Start.empty())
- Complete_Stream->Duration_Start=__T("UTC ")+Date_MJD(date)+__T(" ")+Time_BCD(time);
- Complete_Stream->Duration_End=__T("UTC ")+Date_MJD(date)+__T(" ")+Time_BCD(time);
- Complete_Stream->Duration_End_IsUpdated=true;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_7F()
-{
- //Parsing
- BS_Begin();
- Skip_S1( 4, "DVB_reserved_for_future_use");
- Get_S2 (12, Descriptors_Size, "transmission_info_loop_length");
- BS_End();
-
- //Descriptors
- if (Descriptors_Size>0)
- Descriptors();
-
- while (Element_Offset<Element_Size)
- {
- Element_Begin0();
- Get_B2 ( program_number, "service_id");
- BS_Begin();
- Skip_SB( "DVB_reserved_future_use");
- Info_S1( 3, running_status, "running_status"); Param_Info1(Mpeg_Psi_running_status[running_status]);
- Get_S2 (12, Descriptors_Size, "service_loop_length");
- BS_End();
-
- //Descriptors
- program_number_IsValid=true;
- if (Descriptors_Size>0)
- Descriptors();
-
- Element_End1(Ztring::ToZtring_From_CC2(program_number));
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_C0()
-{
- //TODO
- Skip_XX(Element_Size-Element_Offset, "data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_C1()
-{
- IsATSC=true;
-
- //Parsing
- Ztring program_name, alternate_program_name;
- int8u protocol_version, program_name_length, alternate_program_name_length, package_count;
- BS_Begin();
- Skip_S1(3, "reserved");
- Get_S1 (5, protocol_version, "protocol_version");
- BS_End();
- if (protocol_version!=0)
- {
- Skip_XX(Element_Size-Element_Offset, "data");
- return;
- }
- Skip_C3( "ISO_639_language_code");
- Skip_B2( "program_number");
- Skip_B1( "reserved");
- Skip_B1( "sequence");
- Skip_B1( "program_epoch_number");
- BS_Begin();
- Skip_SB( "display_name_when_not_auth");
- Skip_SB( "use_alt_name_in_purchase_history");
- Skip_SB( "use_alt_name_if_not_auth");
- Skip_SB( "display_ratings");
- Skip_S1(4, "reserved");
- BS_End();
- Get_B1 (program_name_length, "program_name_length");
- SCTE_multilingual_text_string(program_name_length, program_name, "program_name");
- Get_B1 (alternate_program_name_length, "alternate_program_name_length");
- SCTE_multilingual_text_string(alternate_program_name_length, alternate_program_name, "alternate_program_name");
- BS_Begin();
- Skip_S1(3, "reserved");
- Get_S1 (5, package_count, "package_count");
- BS_End();
- for (int8u Pos=0; Pos<package_count; Pos++)
- {
- Ztring package_name;
- int8u package_name_length;
- Get_B1 (package_name_length, "package_name_length");
- SCTE_multilingual_text_string(package_name_length, package_name, "package_name");
- }
-
- if (Element_Offset<Element_Size)
- {
- BS_Begin();
- Skip_S1( 6, "reserved");
- Get_S2 (10, Descriptors_Size, "descriptors_length");
- BS_End();
-
- //Descriptors
- if (Descriptors_Size>0)
- Descriptors();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_C7()
-{
- //Parsing
- int16u tables_defined;
- int8u protocol_version;
- Get_B1 (protocol_version, "protocol_version");
- if (protocol_version!=0)
- {
- Skip_XX(Element_Size-Element_Offset, "data");
- return;
- }
- Get_B2 (tables_defined, "tables_defined");
- for (int16u Pos=0; Pos<tables_defined; Pos++)
- {
- int16u table_type, table_type_PID;
- Element_Begin0();
- Get_B2 ( table_type, "table_type"); Param_Info1(Mpeg_Psi_ATSC_table_type(table_type));
- BS_Begin();
- Skip_S1( 3, "reserved");
- Get_S2 (13, table_type_PID, "table_type_PID");
- Skip_S1( 3, "reserved");
- Skip_S1( 5, "table_type_version_number");
- BS_End();
- Skip_B4( "number_bytes");
- BS_Begin();
- Skip_S1( 4, "reserved");
- Get_S2 (12, Descriptors_Size, "table_type_descriptors_length");
- BS_End();
-
- //Descriptors
- if (Descriptors_Size>0)
- Descriptors();
-
- Element_Info1(Mpeg_Psi_ATSC_table_type(table_type));
- Element_Info1C((table_type>=0x0100), table_type%0x100);
- Element_End1(Ztring::ToZtring_From_CC2(table_type_PID));
-
- FILLING_BEGIN();
- if (Complete_Stream->Streams[table_type_PID]->Kind==complete_stream::stream::unknown && table_type!=0x0001 && table_type!=0x0003) //Not activing current_next_indicator='0'
- {
- Complete_Stream->Streams[table_type_PID]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[table_type_PID]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[table_type_PID]->Table_IDs.resize(0x100);
- }
- #ifdef MEDIAINFO_MPEGTS_ALLSTREAMS_YES
- for (int8u table_id=0x00; table_id<0xFF; table_id++)
- if (Complete_Stream->Streams[table_type_PID].Table_IDs[table_id]==NULL)
- Complete_Stream->Streams[table_type_PID].Table_IDs[table_id]=new complete_stream::stream::table_id; //Master Guide Table
- #else //MEDIAINFO_MPEGTS_ALLSTREAMS_YES
- int8u table_id;
- if (table_type==0x0000) //Terrestrial VCT with current_next_indicator=1
- table_id=0xC8;
- else if (table_type==0x0002) //Cable VCT with current_next_indicator=1
- table_id=0xC9;
- else if (table_type==0x0004) //Channel ETT
- table_id=0xCC;
- else if (table_type>=0x0100 && table_type<=0x017F) //EIT-0 to EIT-127
- table_id=0xCB;
- else if (table_type>=0x0200 && table_type<=0x027F) //Event ETT-0 to event ETT-127
- table_id=0xCC;
- else if (table_type>=0x0301 && table_type<=0x03FF) //RRT with rating_region 1-255
- table_id=0xCA;
- else if (table_type>=0x1000 && table_type<0x10FF) //Aggregate Event Information Table
- table_id=0xD6;
- else if (table_type>=0x1100 && table_type<0x11FF) //Aggregate Extended Text Table
- table_id=0xD7;
- else if (table_type>=0x1600 && table_type<0x16FF) //Satellite Virtual Channel Table
- table_id=0xDA;
- else
- table_id=0xFF;
- if (table_id!=0xFF && Complete_Stream->Streams[table_type_PID]->Table_IDs[table_id]==NULL)
- Complete_Stream->Streams[table_type_PID]->Table_IDs[table_id]=new complete_stream::stream::table_id; //Master Guide Table
- #endif //MEDIAINFO_MPEGTS_ALLSTREAMS_YES
- Complete_Stream->Streams[table_type_PID]->table_type=table_type-((table_type&0x200)?0x100:0); //For having the same table_type for both EIT and ETT
- FILLING_END();
- }
- BS_Begin();
- Skip_S1( 4, "reserved");
- Get_S2 (12, Descriptors_Size, "descriptors_length");
- BS_End();
-
- //Descriptors
- if (Descriptors_Size>0)
- Descriptors();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_C9()
-{
- //Parsing
- Ztring short_name;
- int8u num_channels_in_section;
- Skip_B1( "protocol_version");
- Get_B1 ( num_channels_in_section, "num_channels_in_section");
- BS_End();
- for (int8u Pos=0; Pos<num_channels_in_section; Pos++)
- {
- int16u major_channel_number, minor_channel_number, source_id;
- int8u service_type;
- Element_Begin0();
- Get_UTF16B(table_id==0xDA?16:14, short_name, "short_name"); //8 chars for satellite, else 7 chars
- BS_Begin();
- Skip_S1( 4, "reserved");
- Get_S2 (10, major_channel_number, "major_channel_number");
- Get_S2 (10, minor_channel_number, "minor_channel_number");
- if (table_id==0xDA) //Satellite
- {
- Skip_S1( 6, "modulation_mode");
- Skip_S4(32, "carrier_frequency");
- Skip_S4(32, "carrier_symbol_rate");
- Skip_S1( 2, "polarization");
- BS_End();
- Skip_B1( "FEC_Inner");
- }
- else //Terrestrial and Cable
- {
- BS_End();
- Skip_B1( "modulation_mode");
- Skip_B4( "carrier_frequency");
- }
- Skip_B2( "channel_TSID");
- Get_B2 ( program_number, "program_number");
- BS_Begin();
- Skip_S1( 2, "ETM_location");
- Skip_SB( table_id==0xDA?"reserved":"access_controlled");
- Skip_SB( "hidden");
- if (table_id==0xC8) //Terrestrial
- {
- Skip_SB( "path_select");
- Skip_SB( "out_of_band");
- }
- else //Cable and satellite
- Skip_S1( 2, "reserved");
- Skip_SB( "hide_guide");
- Skip_S1( 3, "reserved");
- Get_S1 ( 6, service_type, "service_type");
- BS_End();
- Get_B2 ( source_id, "source_id");
- if (table_id==0xDA) //Satellite
- Skip_B1( "feed_id");
- BS_Begin();
- Skip_S1( 6, "reserved");
- Get_S2 (10, Descriptors_Size, "descriptors_length");
- BS_End();
-
- FILLING_BEGIN();
- if (!Config->File_MpegTs_Atsc_transport_stream_id_Trust_Get())
- table_id_extension=Complete_Stream->transport_stream_id;
- Ztring Channel=Ztring::ToZtring(major_channel_number);
- if (minor_channel_number)
- Channel+=__T("-")+Ztring::ToZtring(minor_channel_number);
- if (minor_channel_number==0 || program_number==0xFFFF)
- {
- Complete_Stream->Transport_Streams[table_id_extension].Infos["ServiceName"]=short_name;
- Complete_Stream->Transport_Streams[table_id_extension].Infos["ServiceChannel"]=Channel;
- Complete_Stream->Transport_Streams[table_id_extension].Infos["ServiceType"]=Mpeg_Psi_atsc_service_type(service_type);
- Complete_Stream->Transport_Streams[table_id_extension].source_id=source_id;
- Complete_Stream->Transport_Streams[table_id_extension].source_id_IsValid=true;
- }
- else if (program_number<0x2000)
- {
- Complete_Stream->Transport_Streams[table_id_extension].Programs[program_number].Infos["ServiceName"]=short_name;
- Complete_Stream->Transport_Streams[table_id_extension].Programs[program_number].Infos["ServiceChannel"]=Channel;
- Complete_Stream->Transport_Streams[table_id_extension].Programs[program_number].Infos["ServiceType"]=Mpeg_Psi_atsc_service_type(service_type);
- Complete_Stream->Transport_Streams[table_id_extension].Programs[program_number].source_id=source_id;
- Complete_Stream->Transport_Streams[table_id_extension].Programs[program_number].source_id_IsValid=true;
- }
- FILLING_END();
-
- //Descriptors
- program_number_IsValid=true;
- if (Descriptors_Size>0)
- Descriptors();
-
- Element_End1(Ztring::ToZtring_From_CC2(program_number));
- }
-
- BS_Begin();
- Skip_S1( 6, "reserved");
- Get_S2 (10, Descriptors_Size, "additional_descriptors_length");
- BS_End();
-
- //Descriptors
- if (Descriptors_Size>0)
- Descriptors();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_CA()
-{
- //Parsing
- Ztring rating_region_name;
- int8u dimensions_defined;
- Skip_B1( "protocol_version");
- Skip_B1( "rating_region_name_length"); //Not used
- ATSC_multiple_string_structure(rating_region_name, "rating_region_name");
- Get_B1 ( dimensions_defined, "dimensions_defined");
- BS_End();
- for (int8u dimension_Pos=0; dimension_Pos<dimensions_defined; dimension_Pos++)
- {
- Element_Begin1("dimension");
- Ztring dimension_name;
- int8u values_defined;
- Skip_B1( "dimension_name_length"); //Not used
- ATSC_multiple_string_structure(dimension_name, "dimension_name"); Element_Info1(dimension_name);
- BS_Begin();
- Skip_S1( 3, "reserved");
- Skip_SB( "graduated_scale");
- Get_S1 ( 4, values_defined, "values_defined");
- BS_End();
- for (int8u value_Pos=0; value_Pos<values_defined; value_Pos++)
- {
- Element_Begin1("value");
- Ztring abbrev_rating_value, rating_value;
- Skip_B1( "abbrev_rating_value_length"); //Not used
- ATSC_multiple_string_structure(abbrev_rating_value, "abbrev_rating_value"); Element_Info1(abbrev_rating_value);
- Skip_B1( "rating_value_length"); //Not used
- ATSC_multiple_string_structure(rating_value, "rating_value"); Element_Info1(rating_value);
- Element_End0();
- }
- Element_End0();
- }
-
- BS_Begin();
- Skip_S1( 6, "reserved");
- Get_S2 (10, Descriptors_Size, "descriptors_length");
- BS_End();
-
- //Descriptors
- if (Descriptors_Size>0)
- Descriptors();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_CB()
-{
- //Clear
- Complete_Stream->Sources[table_id_extension].ATSC_EPG_Blocks[table_id].Events.clear();
- Complete_Stream->Sources[table_id_extension].ATSC_EPG_Blocks_IsUpdated=true;
- Status[IsUpdated]=true;
-
- //Parsing
- int8u num_events_in_section;
- if (table_id==0xCB) //EIT (not A-EIT)
- Skip_B1( "protocol_version");
- Get_B1 ( num_events_in_section, "num_events_in_section");
- BS_End();
- for (int8u Pos=0; Pos<num_events_in_section; Pos++)
- {
- Ztring title;
- int32u start_time, length_in_seconds;
- Element_Begin0();
- BS_Begin();
- Skip_SB( table_id==0xD9?"off_air":"reserved");
- Skip_SB( "reserved");
- Get_S2 (14, event_id, "event_id");
- BS_End();
- Get_B4 ( start_time, "start_time"); Param_Info1(Ztring().Date_From_Seconds_1970(start_time+315964800)); Element_Info1(Ztring().Date_From_Seconds_1970(start_time+315964800-Complete_Stream->GPS_UTC_offset)); //UTC 1980-01-06 00:00:00
- BS_Begin();
- Skip_S1( 2, "reserved");
- Skip_S1( 2, table_id==0xCB?"ETM_location":"reserved");
- Get_S3 (20, length_in_seconds, "length_in_seconds");
- BS_End();
- Skip_B1 ( "title_length"); //We don't use it for verification
- ATSC_multiple_string_structure(title, "title");
- BS_Begin();
- Skip_S1( 6, "reserved");
- Get_S2 (10, Descriptors_Size, "descriptors_length");
- BS_End();
-
- //Descriptors
- event_id_IsValid=true;
- if (Descriptors_Size>0)
- Descriptors();
-
- Element_End1(Ztring::ToZtring_From_CC2(event_id));
-
- FILLING_BEGIN();
- Complete_Stream->Sources[table_id_extension].ATSC_EPG_Blocks[Complete_Stream->Streams[pid]->table_type].Events[event_id].start_time=start_time;
- Ztring duration =(length_in_seconds<36000?__T("0"):__T(""))+Ztring::ToZtring(length_in_seconds/3600)+__T(":");
- length_in_seconds%=3600;
- duration+=(length_in_seconds< 600?__T("0"):__T(""))+Ztring::ToZtring(length_in_seconds/ 60)+__T(":");
- length_in_seconds%=60;
- duration+=(length_in_seconds< 10?__T("0"):__T(""))+Ztring::ToZtring(length_in_seconds );
- Complete_Stream->Sources[table_id_extension].ATSC_EPG_Blocks[Complete_Stream->Streams[pid]->table_type].Events[event_id].duration=duration;
- Complete_Stream->Sources[table_id_extension].ATSC_EPG_Blocks[Complete_Stream->Streams[pid]->table_type].Events[event_id].title=title;
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_CC()
-{
- //Parsing
- Ztring extended_text_message;
- int16u source_id, event_id;
- Skip_B1( "protocol_version");
- Element_Begin1("ETM_id");
- Get_B2 ( source_id, "source_id");
- BS_Begin();
- Get_S2 (14, event_id, "event_id");
- Skip_S1( 2, "lsb");
- BS_End();
- Element_End0();
- ATSC_multiple_string_structure(extended_text_message, "extended_text_message");
-
- FILLING_BEGIN();
- if (Complete_Stream->Streams[pid]->table_type==4)
- Complete_Stream->Sources[source_id].texts[table_id_extension]=extended_text_message;
- else
- {
- Complete_Stream->Sources[source_id].ATSC_EPG_Blocks[Complete_Stream->Streams[pid]->table_type].Events[event_id].texts[table_id_extension]=extended_text_message;
- Complete_Stream->Sources[source_id].ATSC_EPG_Blocks_IsUpdated=true;
- Complete_Stream->Sources_IsUpdated=true;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_CD()
-{
- //Parsing
- int32u system_time;
- int8u GPS_UTC_offset;
- Skip_B1( "protocol_version");
- Get_B4 (system_time, "system_time"); Param_Info1(Ztring().Date_From_Seconds_1970(system_time+315964800)); //UTC 1980-01-06 00:00:00
- Get_B1 (GPS_UTC_offset, "GPS_UTC_offset");
- Element_Begin1("daylight_savings");
- BS_Begin();
- Skip_SB( "DS_status");
- Skip_SB( "Reserved");
- Skip_SB( "Reserved");
- Skip_S1(5, "DS_day_of_month");
- BS_End();
- Skip_B1( "DS_hour");
- Element_End0();
-
- //Descriptors
- Descriptors_Size=(int16u)(Element_Size-Element_Offset);
- if (Descriptors_Size>0)
- Descriptors();
-
- FILLING_BEGIN();
- if (Complete_Stream->Duration_Start.empty())
- Complete_Stream->Duration_Start=Ztring().Date_From_Seconds_1970(system_time+315964800-GPS_UTC_offset);
- Complete_Stream->Duration_End=Ztring().Date_From_Seconds_1970(system_time+315964800-GPS_UTC_offset);
- Complete_Stream->Duration_End_IsUpdated=true;
- Complete_Stream->GPS_UTC_offset=GPS_UTC_offset;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_D6()
-{
- //Parsing
- if ((table_id_extension&0xFF00)==0x0000)
- {
- int8u num_sources_in_section;
- Get_B1 ( num_sources_in_section, "num_sources_in_section");
- for (int8u Pos=0; Pos<num_sources_in_section; Pos++)
- {
- Get_B2 (table_id_extension, "source_id");
- Table_CB();
- }
- }
- else
- Skip_XX(Element_Size, "reserved");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_FC()
-{
- //Parsing
- int16u splice_command_length;
- int8u splice_command_type;
- bool encrypted_packet;
- Skip_B1( "protocol_version");
- BS_Begin();
- Get_SB ( encrypted_packet, "encrypted_packet");
- Skip_S1( 6, "encryption_algorithm");
- Skip_S5(33, "pts_adjustment");
- Skip_S1( 8, "cw_index");
- Skip_S2(12, "reserved");
- Get_S2 (12, splice_command_length, "splice_command_length");
- if (splice_command_length==0xFFF)
- splice_command_length=(int16u)(Element_Size-4-Element_Offset);
- Get_S1 ( 8, splice_command_type, "splice_command_type"); Param_Info1(Mpeg_Psi_splice_command_type(splice_command_type));
- BS_End();
-
- Element_Begin0();
- #undef ELEMENT_CASE
- #define ELEMENT_CASE(_NAME, _DETAIL) \
- case 0x##_NAME : Element_Name(_DETAIL); Table_FC_##_NAME(); break;
- switch (splice_command_type)
- {
- ELEMENT_CASE (00, "splice_null"); break;
- ELEMENT_CASE (04, "splice_schedule"); break;
- ELEMENT_CASE (05, "splice_insert"); break;
- ELEMENT_CASE (06, "time_signal"); break;
- ELEMENT_CASE (07, "bandwidth_reservation"); break;
- default : Skip_XX(splice_command_length, "Unknown");
- }
- Element_End0();
-
- if (Element_Offset+4<Element_Size)
- {
- Get_B2 (Descriptors_Size, "descriptor_loop_length");
- transport_stream_id=Complete_Stream->transport_stream_id; //SCTE 35 is automaticly linked to the current transport_stream_id
- if (Descriptors_Size>0)
- Descriptors();
- }
-
- if (Element_Offset+4<Element_Size)
- Skip_XX(Element_Size-(Element_Offset+4), "alignment_stuffing");
- if (encrypted_packet)
- Skip_B4( "E_CRC_32");
- Skip_B4( "CRC32");
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_FC_00()
-{
- //Null
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_FC_04()
-{
- //TODO
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_FC_05()
-{
- //Parsing
- bool splice_event_cancel_indicator;
- Skip_B4( "splice_event_id");
- BS_Begin();
- Get_SB ( splice_event_cancel_indicator, "splice_event_cancel_indicator");
- Skip_S1( 7, "reserved");
- BS_End();
- if (!splice_event_cancel_indicator)
- {
- bool program_splice_flag, duration_flag, splice_immediate_flag;
- BS_Begin();
- Skip_SB( "out_of_network_indicator");
- Get_SB ( program_splice_flag, "program_splice_flag");
- Get_SB ( duration_flag, "duration_flag");
- Get_SB ( splice_immediate_flag, "splice_immediate_flag");
- Skip_S1( 4, "reserved");
- BS_End();
- if(program_splice_flag && !splice_immediate_flag)
- Table_FC_05_splice_time();
- if (!program_splice_flag)
- {
- int8u component_count;
- Get_B1(component_count, "component_count");
- for (int8u component=0; component<component_count; component++)
- {
- Skip_B1( "component_tag");
- Table_FC_05_splice_time();
- }
- }
- if(duration_flag)
- Table_FC_05_break_duration();
- Skip_B2( "unique_program_id");
- Skip_B1( "avail_num");
- Skip_B1( "avails_expected");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_FC_05_break_duration()
-{
- Element_Begin1("break_duration");
-
- //Parsing
- BS_Begin();
- Skip_SB( "auto_return");
- Skip_S1( 6, "reserved");
- Skip_S5(33, "duration");
- BS_End();
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_FC_05_splice_time()
-{
- Element_Begin1("splice_time");
-
- //Parsing
- bool time_specified_flag;
- BS_Begin();
- Get_SB ( time_specified_flag, "time_specified_flag");
- if (time_specified_flag)
- {
- Skip_S1( 6, "reserved");
- Skip_S5(33, "pts_time");
-
- }
- else
- Skip_S5(7, "reserved");
- BS_End();
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_FC_06()
-{
- Table_FC_05_splice_time();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Table_FC_07()
-{
- //TODO
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::Descriptors()
-{
- if (Element_Offset+Descriptors_Size>Element_Size)
- {
- Trusted_IsNot("Descriptor size too big");
- return;
- }
-
- //Configuring
- File_Mpeg_Descriptors Descriptors;
- Descriptors.Complete_Stream=Complete_Stream;
- Descriptors.transport_stream_id=transport_stream_id;
- Descriptors.pid=pid;
- Descriptors.table_id=table_id;
- Descriptors.table_id_extension=table_id_extension;
- Descriptors.elementary_PID=elementary_PID;
- Descriptors.program_number=program_number;
- Descriptors.stream_type=stream_type;
- Descriptors.event_id=event_id;
- Descriptors.elementary_PID_IsValid=elementary_PID_IsValid;
- Descriptors.program_number_IsValid=program_number_IsValid;
- Descriptors.stream_type_IsValid=stream_type_IsValid;
- Descriptors.event_id_IsValid=event_id_IsValid;
-
- //Parsing
- if (Descriptors_Size!=0)
- {
- Element_Begin1("Descriptors");
- Open_Buffer_Init(&Descriptors);
- Open_Buffer_Continue(&Descriptors, Descriptors_Size);
- Element_End0();
- }
-
- //Configuring
- elementary_PID_IsValid=false;
- program_number_IsValid=false;
- stream_type_IsValid=false;
- event_id_IsValid=false;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::ATSC_multiple_string_structure(Ztring &Value, const char* Name)
-{
- //Parsing
- Ztring string;
- int8u number_strings, number_segments;
- Element_Begin1(Name);
- Get_B1(number_strings, "number_strings");
- for (int8u string_Pos=0; string_Pos<number_strings; string_Pos++)
- {
- Element_Begin1("String");
- int32u ISO_639_language_code;
- Get_C3(ISO_639_language_code, "ISO_639_language_code");
- Get_B1(number_segments, "number_segments");
- for (int8u segment_Pos=0; segment_Pos<number_segments; segment_Pos++)
- {
- Element_Begin1("Segment");
- Ztring segment;
- int8u compression_type, mode, number_bytes;
- Get_B1 (compression_type, "compression_type");
- Get_B1 (mode, "mode");
- Get_B1 (number_bytes, "number_bytes");
- switch (compression_type)
- {
- case 0x00 :
- switch (mode)
- {
- case 0x00 : Get_Local(number_bytes, segment, "string"); break;
- case 0x3F : Get_UTF16B(number_bytes, segment, "string"); break;
- default : Skip_XX(number_bytes, "Unknown");
- segment=__T("(Encoded with mode=0x")+Ztring::ToZtring(mode, 16)+__T(')');
- }
- break;
- default : Skip_XX(number_bytes, "(Compressed)");
- segment=__T("(Compressed)");
- }
- Element_End0();
-
- FILLING_BEGIN();
- if (segment.find_first_not_of(__T("\t\n "))!=std::string::npos)
- string+=segment+__T(" - ");
- FILLING_END();
- }
-
- FILLING_BEGIN();
- if (!string.empty())
- string.resize(string.size()-3);
- Ztring ISO_639_2=Ztring().From_CC3(ISO_639_language_code);
- const Ztring& ISO_639_1=MediaInfoLib::Config.Iso639_1_Get(ISO_639_2);
- Value+=(ISO_639_1.empty()?ISO_639_2:ISO_639_1)+__T(':')+string+__T(" - ");
- FILLING_END();
-
- Element_Info1(string);
- Element_End1("String");
- }
-
- if (!Value.empty())
- Value.resize(Value.size()-3);
-
- Element_Info1(Value);
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::SCTE_multilingual_text_string(int8u Size, Ztring &Value, const char* Name)
-{
- //Parsing
- Element_Begin1(Name);
- int64u End=Element_Offset+Size;
- while (Element_Offset<End)
- {
- int8u mode;
- Get_B1 (mode, "mode");
- if (mode<0x3F)
- {
- int8u eightbit_string_length;
- Get_B1 (eightbit_string_length, "eightbit_string_length");
- if (mode==0)
- Get_ISO_8859_1(eightbit_string_length, Value, "eightbit_string");
- else
- Skip_XX(eightbit_string_length, "eightbit_string (unsupporeted)");
- }
- else if (mode==0x3F)
- {
- int8u sixteenbit_string_length;
- Get_B1 (sixteenbit_string_length, "sixteenbit_string_length");
- Get_UTF16B(sixteenbit_string_length, Value, "sixteenbit_string");
- }
- else if (mode>=0xA0)
- {
- int8u format_effector_param_length;
- Get_B1 (format_effector_param_length, "format_effector_param_length");
- Skip_XX(format_effector_param_length, "format_effector_data");
- }
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-//Modified Julian Date
-Ztring File_Mpeg_Psi::Date_MJD(int16u Date_)
-{
- //Calculating
- float64 Date=Date_;
- int Y2=(int)((Date-15078.2)/365.25);
- int M2=(int)(((Date-14956.1) - ((int)(Y2*365.25))) /30.6001);
- int D =(int)(Date-14956 - ((int)(Y2*365.25)) - ((int)(M2*30.6001)));
- int K=0;
- if (M2==14 || M2==15)
- K=1;
- int Y =Y2+K;
- int M =M2-1-K*12;
-
- //Formating
- return Ztring::ToZtring(1900+Y)+__T("-")
- + (M<10?__T("0"):__T(""))+Ztring::ToZtring( M)+__T("-")
- + (D<10?__T("0"):__T(""))+Ztring::ToZtring( D);
-}
-
-//---------------------------------------------------------------------------
-//Form: HHMMSS, BCD
-Ztring File_Mpeg_Psi::Time_BCD(int32u Time)
-{
- return (((Time>>16)&0xFF)<10?__T("0"):__T("")) + Ztring::ToZtring((Time>>16)&0xFF, 16)+__T(":") //BCD
- + (((Time>> 8)&0xFF)<10?__T("0"):__T("")) + Ztring::ToZtring((Time>> 8)&0xFF, 16)+__T(":") //BCD
- + (((Time )&0xFF)<10?__T("0"):__T("")) + Ztring::ToZtring((Time )&0xFF, 16); //BCD
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::program_number_Update()
-{
- //Setting the pid as program_map_section
- if (Complete_Stream->Streams[elementary_PID]->Kind!=complete_stream::stream::psi)
- {
- Complete_Stream->Streams[elementary_PID]->Searching_Payload_Start_Set(true);
- Complete_Stream->Streams[elementary_PID]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[elementary_PID]->Table_IDs.resize(0x100);
- if (program_number)
- Complete_Stream->Streams[elementary_PID]->Table_IDs[0x02]=new complete_stream::stream::table_id; //program_map_section
- }
- if (Complete_Stream->File__Duplicate_Get_From_PID(elementary_PID))
- Complete_Stream->Streams[elementary_PID]->ShouldDuplicate=true;
-
- //Handling a program
- if (program_number)
- {
- Complete_Stream->Transport_Streams[table_id_extension].Programs_NotParsedCount++;
- Complete_Stream->Transport_Streams[table_id_extension].Programs[program_number].pid=elementary_PID;
- Complete_Stream->Transport_Streams[table_id_extension].programs_List.push_back(program_number);
- if (Complete_Stream->Streams.size()<0x2000)
- Complete_Stream->Streams.resize(0x2000); //TODO: find the reason this code is called
- Complete_Stream->Streams[elementary_PID]->program_numbers.push_back(program_number);
- if (Complete_Stream->Streams[elementary_PID]->Table_IDs.size()<0x100)
- Complete_Stream->Streams[elementary_PID]->Table_IDs.resize(0x100); //TODO: find the reason this code is called
- if (Complete_Stream->Streams[elementary_PID]->Table_IDs[0x02]==NULL)
- Complete_Stream->Streams[elementary_PID]->Table_IDs[0x02]=new complete_stream::stream::table_id; //TODO: find the reason this code is called
- if (Complete_Stream->Streams[elementary_PID]->Table_IDs[0x02]->Table_ID_Extensions.find(program_number)==Complete_Stream->Streams[elementary_PID]->Table_IDs[0x02]->Table_ID_Extensions.end())
- {
- Complete_Stream->Streams[elementary_PID]->Table_IDs[0x02]->Table_ID_Extensions_CanAdd=false;
- Complete_Stream->Streams[elementary_PID]->Table_IDs[0x02]->Table_ID_Extensions[program_number].version_number=0xFF;
- Complete_Stream->Streams[elementary_PID]->Table_IDs[0x02]->Table_ID_Extensions[program_number].Section_Numbers.clear();
- Complete_Stream->Streams[elementary_PID]->Table_IDs[0x02]->Table_ID_Extensions[program_number].Section_Numbers.resize(0x100);
- }
- }
-
- //Handling a network except basic version
- else if (Complete_Stream->Streams[elementary_PID]->Table_IDs[0x00]==NULL)
- {
- for (size_t Table_ID=1; Table_ID<0x100; Table_ID++)
- {
- if (Complete_Stream->Streams[elementary_PID]->Table_IDs[Table_ID]==NULL)
- Complete_Stream->Streams[elementary_PID]->Table_IDs[Table_ID]=new complete_stream::stream::table_id; //all
-
- if (Table_ID==1)
- Table_ID++; //Skipping TableID 2
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::program_number_Remove()
-{
- //Removing this program_number from the list of program_numbers for each elementary_PID
- for (size_t Pos=0; Pos<Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].elementary_PIDs.size(); Pos++)
- {
- int16u elementary_PID_Temp=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].elementary_PIDs[Pos];
-
- //Removing this program_number from the list of program_numbers for this elementary_PID
- for (size_t Pos=0; Pos<Complete_Stream->Streams[elementary_PID_Temp]->program_numbers.size(); Pos++)
- if (Complete_Stream->Streams[elementary_PID_Temp]->program_numbers[Pos]==program_number)
- Complete_Stream->Streams[elementary_PID_Temp]->program_numbers.erase(Complete_Stream->Streams[elementary_PID_Temp]->program_numbers.begin()+Pos);
-
- //Removing parser if no more program_number
- if (Complete_Stream->Streams[elementary_PID_Temp]->program_numbers.empty())
- {
- stream_t StreamKind=Complete_Stream->Streams[elementary_PID_Temp]->StreamKind;
- size_t StreamPos=Complete_Stream->Streams[elementary_PID_Temp]->StreamPos;
- if (StreamKind!=Stream_Max && StreamPos!=(size_t)-1)
- Complete_Stream->StreamPos_ToRemove[StreamKind].push_back(StreamPos);
-
- if (Complete_Stream->Streams_NotParsedCount!=(size_t)-1 && Complete_Stream->Streams_NotParsedCount && !Complete_Stream->Streams[elementary_PID_Temp]->IsParsed)
- Complete_Stream->Streams_NotParsedCount--; //Not parsed, and no need to parse it now
- delete Complete_Stream->Streams[elementary_PID_Temp]; Complete_Stream->Streams[elementary_PID_Temp]=new complete_stream::stream;
- }
- }
-
- //Removing related PCR
- std::map<int16u, int16u>::iterator PCR_PID=Complete_Stream->PCR_PIDs.find(Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].PCR_PID);
- if (PCR_PID!=Complete_Stream->PCR_PIDs.end())
- {
- PCR_PID->second--;
- if (PCR_PID->second==0)
- Complete_Stream->PCR_PIDs.erase(PCR_PID);
- }
-
- //Removing program_number
- size_t StreamPos=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].StreamPos;
- if (StreamPos!=(size_t)-1)
- {
- Complete_Stream->StreamPos_ToRemove[Stream_Menu].push_back(StreamPos);
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].StreamPos=(size_t)-1;
- }
- int16u program_number_pid=Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].pid;
- if (program_number_pid)
- {
- for (size_t Pos=0; Pos<Complete_Stream->Streams[program_number_pid]->program_numbers.size(); Pos++)
- if (Complete_Stream->Streams[program_number_pid]->program_numbers[Pos]==program_number)
- Complete_Stream->Streams[program_number_pid]->program_numbers.erase(Complete_Stream->Streams[program_number_pid]->program_numbers.begin()+Pos);
- if (Complete_Stream->Streams[program_number_pid]->Table_IDs[0x02])
- Complete_Stream->Streams[program_number_pid]->Table_IDs[0x02]->Table_ID_Extensions.erase(program_number);
- }
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs.erase(program_number);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::elementary_PID_Update(int16u PCR_PID)
-{
- if (Complete_Stream->Streams[elementary_PID]->Kind==complete_stream::stream::psi)
- {
- //A PID can not be PSI and PES at the same time
- return;
- }
-
- //stream_type
- if (stream_type!=Complete_Stream->Streams[elementary_PID]->stream_type && Complete_Stream->Streams[elementary_PID]->stream_type!=(int8u)-1)
- {
- if (Complete_Stream->Streams_NotParsedCount!=(size_t)-1 && Complete_Stream->Streams_NotParsedCount && !Complete_Stream->Streams[elementary_PID]->IsParsed)
- Complete_Stream->Streams_NotParsedCount--; //Not parsed, and no need to parse it now
- delete Complete_Stream->Streams[elementary_PID]; Complete_Stream->Streams[elementary_PID]=new complete_stream::stream;
- Complete_Stream->Streams[elementary_PID]->Kind=complete_stream::stream::unknown;
- }
- if (Complete_Stream->Streams[elementary_PID]->Kind!=complete_stream::stream::pes)
- {
- delete Complete_Stream->Streams[elementary_PID]; Complete_Stream->Streams[elementary_PID]=new complete_stream::stream;
-
- if (Complete_Stream->Streams_NotParsedCount==(size_t)-1)
- Complete_Stream->Streams_NotParsedCount=0;
- Complete_Stream->Streams_NotParsedCount++;
- if (stream_type==0x86 && Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[table_id_extension].registration_format_identifier==Elements::CUEI)
- {
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[table_id_extension].HasNotDisplayableStreams=true;
- Complete_Stream->Streams[elementary_PID]->Kind=complete_stream::stream::psi;
- Complete_Stream->Streams[elementary_PID]->Table_IDs.resize(0x100);
- Complete_Stream->Streams[elementary_PID]->Table_IDs[0xFC]=new complete_stream::stream::table_id; //Splice
- if (Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[table_id_extension].Scte35==NULL)
- {
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[table_id_extension].Scte35=new complete_stream::transport_stream::program::scte35;
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[table_id_extension].Scte35->pid=elementary_PID;
- }
- #if MEDIAINFO_TRACE
- Complete_Stream->Streams[elementary_PID]->Element_Info1="PSI";
- #endif //MEDIAINFO_TRACE
- }
- else
- {
- Complete_Stream->Streams[elementary_PID]->Kind=complete_stream::stream::pes;
- Complete_Stream->Streams[elementary_PID]->Infos["CodecID"].From_Number(stream_type);
- #if MEDIAINFO_TRACE
- Complete_Stream->Streams[elementary_PID]->Element_Info1="PES";
- #endif //MEDIAINFO_TRACE
- }
- Complete_Stream->Streams[elementary_PID]->stream_type=stream_type;
- Complete_Stream->Streams[elementary_PID]->Searching_Payload_Start_Set(true);
- #ifdef MEDIAINFO_MPEGTS_PCR_YES
- Complete_Stream->Streams[elementary_PID]->Searching_TimeStamp_Start_Set(true);
- Complete_Stream->Streams[elementary_PID]->PCR_PID=PCR_PID;
- #endif //MEDIAINFO_MPEGTS_PCR_YES
- #ifdef MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- //Complete_Stream->Streams[elementary_PID]->Searching_ParserTimeStamp_Start_Set(true);
- #endif //MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
- if (Complete_Stream->File__Duplicate_Get_From_PID(elementary_PID))
- Complete_Stream->Streams[elementary_PID]->ShouldDuplicate=true;
- }
-
- //Program information
- bool IsAlreadyPresent=false;
- for (size_t Pos=0; Pos<Complete_Stream->Streams[elementary_PID]->program_numbers.size(); Pos++)
- if (Complete_Stream->Streams[elementary_PID]->program_numbers[Pos]==program_number)
- IsAlreadyPresent=true;
- if (!IsAlreadyPresent)
- {
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].elementary_PIDs.push_back(elementary_PID);
- Complete_Stream->Streams[elementary_PID]->program_numbers.push_back(program_number);
- if (ForceStreamDisplay || (Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].registration_format_identifier==Elements::HDMV && Complete_Stream->Streams[elementary_PID]->stream_type==0x90)) //Testing if forcing display of all streams or if it is a PGS from Blu-ray
- Complete_Stream->PES_PIDs.insert(elementary_PID); //Adding it for sure
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg_Psi::elementary_PID_Remove()
-{
- //Removing this elementary_PID from the list of elementary_PIDs for this program_number
- for (size_t Pos=0; Pos<Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].elementary_PIDs.size(); Pos++)
- if (Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].elementary_PIDs[Pos]==elementary_PID)
- Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].elementary_PIDs.erase(Complete_Stream->Transport_Streams[Complete_Stream->transport_stream_id].Programs[program_number].elementary_PIDs.begin()+Pos);
-
- //Removing this program_number from the list of program_numbers for this elementary_PID
- for (size_t Pos=0; Pos<Complete_Stream->Streams[elementary_PID]->program_numbers.size(); Pos++)
- if (Complete_Stream->Streams[elementary_PID]->program_numbers[Pos]==program_number)
- Complete_Stream->Streams[elementary_PID]->program_numbers.erase(Complete_Stream->Streams[elementary_PID]->program_numbers.begin()+Pos);
-
- //Removing parser if no more program_number
- if (Complete_Stream->Streams[elementary_PID]->program_numbers.empty())
- {
- stream_t StreamKind=Complete_Stream->Streams[elementary_PID]->StreamKind;
- size_t StreamPos=Complete_Stream->Streams[elementary_PID]->StreamPos;
- if (StreamKind!=Stream_Max && StreamPos!=(size_t)-1)
- Complete_Stream->StreamPos_ToRemove[StreamKind].push_back(StreamPos);
-
- if (Complete_Stream->Streams_NotParsedCount!=(size_t)-1 && Complete_Stream->Streams_NotParsedCount && !Complete_Stream->Streams[elementary_PID]->IsParsed)
- Complete_Stream->Streams_NotParsedCount--; //Not parsed, and no need to parse it now
- delete Complete_Stream->Streams[elementary_PID]; Complete_Stream->Streams[elementary_PID]=new complete_stream::stream;
- Complete_Stream->PES_PIDs.erase(elementary_PID);
- }
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_MPEGTS_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Psi.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Psi.h
deleted file mode 100644
index c378e9dc6..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mpeg_Psi.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about MPEG files, Program Map Section
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Mpeg_PsiH
-#define MediaInfo_Mpeg_PsiH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Mpeg_Descriptors.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Mpeg_Psi
-//***************************************************************************
-
-class File_Mpeg_Psi : public File__Analyze
-{
-public :
- //In
- bool From_TS;
- complete_stream* Complete_Stream;
- int16u pid;
-
-public :
- File_Mpeg_Psi();
- ~File_Mpeg_Psi();
-
-private :
- //Buffer - File header
- void FileHeader_Parse();
-
- //Buffer - Per element
- bool Header_Begin();
- void Header_Parse();
- void Data_Parse();
-
- //Elements - Base
- void Table_reserved();
- void Table_iso13818_6();
- void Table_user_private();
- void Table_forbidden();
-
- //Elements - MPEG
- void program_stream_map(); //From PS
- void Table_00();
- void Table_01();
- void Table_02();
- void Table_03();
- void Table_04() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_05() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_06() {Skip_XX(Element_Size-Element_Offset, "Data");};
- //Elements - DVB
- void Table_38() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_39() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_3A() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_3B() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_3C() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_3D() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_3E() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_3F() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_40();
- void Table_41() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_42();
- void Table_46();
- void Table_4A() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_4E();
- void Table_4F();
- void Table_5F(); //50 --> 5F
- void Table_6F(); //60 --> 6F
- void Table_70();
- void Table_71() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_72() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_73();
- void Table_74() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_75() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_76() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_77() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_78() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_79() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_7E() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_7F();
- //Elements - ASTC
- void Table_C0();
- void Table_C1();
- void Table_C2() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_C3() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_C4() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_C5() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_C6() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_C7();
- void Table_C8() {Table_C9();};
- void Table_C9();
- void Table_CA();
- void Table_CB();
- void Table_CC();
- void Table_CD();
- void Table_CE() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_CF() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_D0() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_D1() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_D2() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_D3() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_D4() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_D5() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_D6();
- void Table_D7() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_D8() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_D9() {Skip_XX(Element_Size-Element_Offset, "Data");};
- void Table_DA() {Table_C9();};
- void Table_FC();
- void Table_FC_00();
- void Table_FC_04();
- void Table_FC_05();
- void Table_FC_05_break_duration();
- void Table_FC_05_splice_time();
- void Table_FC_06();
- void Table_FC_07();
-
- //Helpers
- int16u Descriptors_Size;
- void Descriptors();
- void ATSC_multiple_string_structure(Ztring &Value, const char* Info);
- void SCTE_multilingual_text_string(int8u Size, Ztring &Value, const char* Info);
- Ztring Date_MJD(int16u Date);
- Ztring Time_BCD(int32u Time);
-
- //Items removal
- void program_number_Update();
- void program_number_Remove();
- void elementary_PID_Update(int16u PCR_PID);
- void elementary_PID_Remove();
-
- //Data
- int32u CRC_32;
- int16u transport_stream_id;
- int16u table_id_extension;
- int16u elementary_PID;
- int16u program_number;
- int8u stream_type;
- int16u event_id;
- int8u pointer_field;
- int8u table_id;
- int8u version_number;
- bool current_next_indicator;
- bool section_syntax_indicator;
- bool elementary_PID_IsValid;
- bool program_number_IsValid;
- bool stream_type_IsValid;
- bool event_id_IsValid;
- bool IsATSC;
- bool ForceStreamDisplay;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mxf.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mxf.cpp
deleted file mode 100644
index e15fcb7b8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mxf.cpp
+++ /dev/null
@@ -1,15522 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MXF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Mxf.h"
-#if defined(MEDIAINFO_DVDIF_YES)
- #include "MediaInfo/Multiple/File_DvDif.h"
-#endif
-#if defined(MEDIAINFO_DVDIF_YES)
- #include "MediaInfo/Multiple/File_DvDif.h"
-#endif
-#if defined(MEDIAINFO_AVC_YES)
- #include "MediaInfo/Video/File_Avc.h"
-#endif
-#if defined(MEDIAINFO_MPEG4V_YES)
- #include "MediaInfo/Video/File_Mpeg4v.h"
-#endif
-#if defined(MEDIAINFO_MPEGV_YES)
- #include "MediaInfo/Video/File_Mpegv.h"
-#endif
-#if defined(MEDIAINFO_VC3_YES)
- #include "MediaInfo/Video/File_Vc3.h"
-#endif
-#if defined(MEDIAINFO_AAC_YES)
- #include "MediaInfo/Audio/File_Aac.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_SMPTEST0337_YES)
- #include "MediaInfo/Audio/File_ChannelGrouping.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if defined(MEDIAINFO_PCM_YES)
- #include "MediaInfo/Audio/File_Pcm.h"
-#endif
-#if defined(MEDIAINFO_SMPTEST0331_YES)
- #include "MediaInfo/Audio/File_SmpteSt0331.h"
-#endif
-#if defined(MEDIAINFO_SMPTEST0337_YES)
- #include "MediaInfo/Audio/File_SmpteSt0337.h"
-#endif
-#if defined(MEDIAINFO_JPEG_YES)
- #include "MediaInfo/Image/File_Jpeg.h"
-#endif
-#if defined(MEDIAINFO_TTML_YES)
- #include "MediaInfo/Text/File_Ttml.h"
-#endif
-#include "MediaInfo/TimeCode.h"
-#include "MediaInfo/File_Unknown.h"
-#include "ZenLib/File.h"
-#include "ZenLib/FileName.h"
-#include "ZenLib/Dir.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#if defined(MEDIAINFO_REFERENCES_YES)
- #include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#endif //defined(MEDIAINFO_REFERENCES_YES)
-#include "ZenLib/Format/Http/Http_Utils.h"
-#include <cfloat>
-#if MEDIAINFO_SEEK
- #include <algorithm>
-#endif //MEDIAINFO_SEEK
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-//
-// PartitionPack
-// Primer
-// Preface
-// --> ContentStorage
-// --> Packages --> Package (Material, Source)
-// --> Tracks --> Track
-// --> Sequence
-// --> StructuralComponents --> StructuralComponent (Timecode, SourceClip)
-// --> Descriptors --> Descriptor (Multiple, Essence)
-// --> Descriptors --> Descriptor (Essence)
-// --> EssenceContainerData
-// --> Identifications --> Identification
-//
-//***************************************************************************
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-#define UUID(PART1, PART2, PART3, PART4, LOCAL, NORM, NAME, DESCRIPTION) \
- const int32u NAME##1=0x##PART1; \
- const int32u NAME##2=0x##PART2; \
- const int32u NAME##3=0x##PART3; \
- const int32u NAME##4=0x##PART4; \
-
-namespace Elements
-{
- // 01 - Identification and location
- // 01 - Globally Unique Identifiers
- // 15 - Object Identifiers
- UUID(060E2B34, 0101010C, 01011512, 00000000, 0000, "SMPTE ST 429-5", ResourceID, "Resource ID")
-
- // 02 - Globally Unique Locators
- // 01 - Uniform Resource Locators
- UUID(060E2B34, 0101010C, 01020105, 01000000, 0000, "SMPTE ST 429-5", NamespaceURI, "Namespace URI")
-
- // 03 - Locally Unique Identifiers
- // 04 - ?
- UUID(060E2B34, 0101010E, 0103040A, 00000000, 0000, "SMPTE ST 377-4", MCAChannelID, "MCA Channel ID")
-
- // 07 - ?
- // 01 - ?
- UUID(060E2B34, 0101010E, 01030701, 01000000, 0000, "SMPTE ST 377-4", MCALabelDictionaryID, "MCA Label Dictionary ID")
- UUID(060E2B34, 0101010E, 01030701, 02000000, 0000, "SMPTE ST 377-4", MCATagSymbol, "MCA Tag Symbol")
- UUID(060E2B34, 0101010E, 01030701, 03000000, 0000, "SMPTE ST 377-4", MCATagName, "MCA Tag Name")
- UUID(060E2B34, 0101010E, 01030701, 04000000, 0000, "SMPTE ST 377-4", GroupOfSoundfieldGroupsLinkID, "Group Of Soundfield Groups Link ID")
- UUID(060E2B34, 0101010E, 01030701, 05000000, 0000, "SMPTE ST 377-4", MCALinkID, "MCA Link ID")
- UUID(060E2B34, 0101010E, 01030701, 06000000, 0000, "SMPTE ST 377-4", SoundfieldGroupLinkID, "Soundfield Group Link ID")
-
- // 04 - Locally Unique Locators
- // 01 - ?
- // 01 - ?
- UUID(060E2B34, 0101010E, 01040105, 00000000, 0000, "SMPTE ST 377-4", MCAPartitionKind, "MCA Partition Kind")
- UUID(060E2B34, 0101010E, 01040106, 00000000, 0000, "SMPTE ST 377-4", MCAPartitionNumber, "MCA Partition Number")
-
- // 05 - Titles
- UUID(060E2B34, 0101010E, 01051000, 00000000, 0000, "SMPTE ST 377-4", MCATitle, "MCA Title")
- UUID(060E2B34, 0101010E, 01051100, 00000000, 0000, "SMPTE ST 377-4", MCATitleVersion, "MCA Title Version")
- UUID(060E2B34, 0101010E, 01051200, 00000000, 0000, "SMPTE ST 377-4", MCATitleSubVersion, "MCA Title Sub-version")
- UUID(060E2B34, 0101010E, 01051300, 00000000, 0000, "SMPTE ST 377-4", MCAEpisode, "MCA Episode")
-
- // 02 - Administrative
-
- // 03 - Interpretive
- // 01 - Fundamental
- // 01 - Countries and Languages
- // 01 - Country and Region Codes
-
- // 02 - Spoken Language Codes
- UUID(060E2B34, 01010107, 03010102, 03010000, 0000, "", PrimarySpokenLanguage, "")
- UUID(060E2B34, 01010107, 03010102, 03020000, 0000, "", SecondarySpokenLanguage, "")
- UUID(060E2B34, 01010107, 03010102, 03030000, 0000, "", OriginalSpokenLanguage, "")
- UUID(060E2B34, 01010107, 03010102, 03040000, 0000, "", SecondaryOriginalSpokenLanguage, "")
- UUID(060E2B34, 01010107, 03010102, 03110000, 0000, "SMPTE ST 380", PrimaryExtendedSpokenLanguage, "Primary Extended Spoken Language")
- UUID(060E2B34, 01010107, 03010102, 03120000, 0000, "SMPTE ST 380", SecondaryExtendedSpokenLanguage, "Secondary Extended Spoken Language")
- UUID(060E2B34, 01010107, 03010102, 03130000, 0000, "SMPTE ST 380", OriginalExtendedSpokenLanguage, "Original Extended Spoken Language")
- UUID(060E2B34, 01010107, 03010102, 03140000, 0000, "SMPTE ST 380", SecondaryOriginalExtendedSpokenLanguage, "Secondary Original Extended Spoken Language")
- UUID(060E2B34, 0101010D, 03010102, 03150000, 0000, "SMPTE ST 377-4", RFC5646AudioLanguageCode, "RFC 5646 Spoken Language")
-
- // 02 - Data Interpretations and Definitions
- // 0A - Name-Value Construct Interpretations
- UUID(060E2B34, 01010105, 0301020A, 01000000, 0000, "", Ansi_01, "")
- UUID(060E2B34, 01010105, 0301020A, 01010000, 0000, "", UTF16_01, "")
- UUID(060E2B34, 01010105, 0301020A, 02000000, 0000, "", Ansi_02, "")
- UUID(060E2B34, 01010105, 0301020A, 02010000, 0000, "", UTF16_02, "")
-
- // 10 - KLV Interpretations
- UUID(060E2B34, 01010101, 03010210, 01000000, 0000, "", Filler01, "")
- UUID(060E2B34, 01010102, 03010210, 01000000, 0000, "", Filler02, "")
- UUID(060E2B34, 01010102, 03010210, 05000000, 0000, "", TerminatingFiller, "")
-
- // 10 - XML Constructs and Interpretations
- UUID(060E2B34, 01010105, 03010220, 01000000, 0000, "", XmlDocumentText, "")
-
- // 02 - Human Assigned Descriptors
- // 01 - Categorization
- // 01 - Content Classification
-
- // 02 - Cataloging and Indexing
- UUID(060E2B34, 0101010E, 03020102, 20000000, 0000, "", MCAAudioContentKind, "")
- UUID(060E2B34, 0101010E, 03020102, 21000000, 0000, "", MCAAudioElementKind, "")
-
- // 04 - Parametric
- // 01 - Video and Image Essence Characteristics
- // 06 - Digital Video and Image Compression Parameters
- // 02 - MPEG Coding Parameters
- // 01 - MPEG-2 Coding Parameters
- UUID(060E2B34, 01010105, 04010602, 01020000, 0000, "SMPTE ST 381-1", MPEG2VideoDescriptor_SingleSequence, "")
- UUID(060E2B34, 01010105, 04010602, 01030000, 0000, "SMPTE ST 381-1", MPEG2VideoDescriptor_ConstantBFrames, "")
- UUID(060E2B34, 01010105, 04010602, 01040000, 0000, "SMPTE ST 381-1", MPEG2VideoDescriptor_CodedContentType, "")
- UUID(060E2B34, 01010105, 04010602, 01050000, 0000, "SMPTE ST 381-1", MPEG2VideoDescriptor_LowDelay, "")
- UUID(060E2B34, 01010105, 04010602, 01060000, 0000, "SMPTE ST 381-1", MPEG2VideoDescriptor_ClosedGOP, "")
- UUID(060E2B34, 01010105, 04010602, 01070000, 0000, "SMPTE ST 381-1", MPEG2VideoDescriptor_IdenticalGOP, "")
- UUID(060E2B34, 01010105, 04010602, 01080000, 0000, "SMPTE ST 381-1", MPEG2VideoDescriptor_MaxGOP, "")
- UUID(060E2B34, 01010105, 04010602, 01090000, 0000, "SMPTE ST 381-1", MPEG2VideoDescriptor_BPictureCount, "")
- UUID(060E2B34, 01010105, 04010602, 010A0000, 0000, "SMPTE ST 381-1", MPEG2VideoDescriptor_ProfileAndLevel, "")
- UUID(060E2B34, 01010105, 04010602, 010B0000, 0000, "SMPTE ST 381-1", MPEG2VideoDescriptor_BitRate, "")
-
- // 02 - MPEG-4 Visual Coding Parameters
- UUID(060E2B34, 01010105, 04010602, 02020000, 0000, "SMPTE ST 381-2", Mpeg4VisualDescriptor_SingleSequence, "")
- UUID(060E2B34, 01010105, 04010602, 02030000, 0000, "SMPTE ST 381-2", Mpeg4VisualDescriptor_ConstantBFrames, "")
- UUID(060E2B34, 01010105, 04010602, 02040000, 0000, "SMPTE ST 381-2", Mpeg4VisualDescriptor_CodedContentType, "")
- UUID(060E2B34, 01010105, 04010602, 02050000, 0000, "SMPTE ST 381-2", Mpeg4VisualDescriptor_LowDelay, "")
- UUID(060E2B34, 01010105, 04010602, 02060000, 0000, "SMPTE ST 381-2", Mpeg4VisualDescriptor_ClosedGOP, "")
- UUID(060E2B34, 01010105, 04010602, 02070000, 0000, "SMPTE ST 381-2", Mpeg4VisualDescriptor_IdenticalGOP, "")
- UUID(060E2B34, 01010105, 04010602, 02080000, 0000, "SMPTE ST 381-2", Mpeg4VisualDescriptor_MaxGOP, "")
- UUID(060E2B34, 01010105, 04010602, 02090000, 0000, "SMPTE ST 381-2", Mpeg4VisualDescriptor_BPictureCount, "")
- UUID(060E2B34, 01010105, 04010602, 020A0000, 0000, "SMPTE ST 381-2", Mpeg4VisualDescriptor_ProfileAndLevel, "")
- UUID(060E2B34, 01010105, 04010602, 020B0000, 0000, "SMPTE ST 381-2", Mpeg4VisualDescriptor_BitRate, "")
-
- // 02 - JPEG 2000 Coding Parameters
- UUID(060E2B34, 0101010A, 04010603, 01000000, 0000, "", JPEG2000PictureSubDescriptor_Rsiz, "")
- UUID(060E2B34, 0101010A, 04010603, 02000000, 0000, "", JPEG2000PictureSubDescriptor_Xsiz, "")
- UUID(060E2B34, 0101010A, 04010603, 03000000, 0000, "", JPEG2000PictureSubDescriptor_Ysiz, "")
- UUID(060E2B34, 0101010A, 04010603, 04000000, 0000, "", JPEG2000PictureSubDescriptor_XOsiz, "")
- UUID(060E2B34, 0101010A, 04010603, 05000000, 0000, "", JPEG2000PictureSubDescriptor_YOsiz, "")
- UUID(060E2B34, 0101010A, 04010603, 06000000, 0000, "", JPEG2000PictureSubDescriptor_XTsiz, "")
- UUID(060E2B34, 0101010A, 04010603, 07000000, 0000, "", JPEG2000PictureSubDescriptor_YTsiz, "")
- UUID(060E2B34, 0101010A, 04010603, 08000000, 0000, "", JPEG2000PictureSubDescriptor_XTOsiz, "")
- UUID(060E2B34, 0101010A, 04010603, 09000000, 0000, "", JPEG2000PictureSubDescriptor_YTOsiz, "")
- UUID(060E2B34, 0101010A, 04010603, 0A000000, 0000, "", JPEG2000PictureSubDescriptor_Csiz, "")
- UUID(060E2B34, 0101010A, 04010603, 0B000000, 0000, "", JPEG2000PictureSubDescriptor_PictureComponentSizing, "")
- UUID(060E2B34, 0101010A, 04010603, 0C000000, 0000, "", JPEG2000PictureSubDescriptor_CodingStyleDefault, "")
- UUID(060E2B34, 0101010A, 04010603, 0D000000, 0000, "", JPEG2000PictureSubDescriptor_QuantizationDefault, "")
-
- // 02 - Audio Essence Characteristics
- // 04 - Audio Compression Parameters
- // 03 - MPEG Coding Parameters
- // 01 - MPEG-2 Coding Parameters
- UUID(060E2B34, 01010105, 04020403, 01020000, 0000, "SMPTE ST 381-2", MpegAudioDescriptor_BitRate, "")
-
- // 09 - Format Characteristics
- UUID(060E2B34, 0101010C, 04090500, 00000000, 0000, "SMPTE ST 429-5", UCSEncoding, "UCS Encoding")
-
- // 05 - Process
-
- // 06 - Relational
- // 01 - Essence and Metadata Relationships
- // 04 - Essence to Essence Relationships
- UUID(060E2B34, 01010109, 06010104, 06100000, 0000, "", SubDescriptors, "")
-
- // 07 - Spatio-temporal
-
- // 0C - Compound
- // 02 - Metadata sets created at point of creation or capture
- // 01 - Metadata sets associated with a video camera
- // 01 - Frame-based metadata set
- UUID(060E2B34, 02530101, 0C020101, 01010000, 0000, "SMPTE RDD 18", LensUnitMetadata, "")
- UUID(060E2B34, 02530101, 0C020101, 02010000, 0000, "SMPTE RDD 18", CameraUnitMetadata, "")
- UUID(060E2B34, 02530101, 0C020101, 7F010000, 0000, "SMPTE RDD 18", UserDefinedAcquisitionMetadata, "")
-
- // 0D - Organizationally registered for public use
- // 01 - AAF Association
- // 01 - MXF Structural Metadata Sets
- // 01 - Version 1
- // 01 - MXF compatible sets and packs
- UUID(060E2B34, 02530101, 0D010101, 01010100, 0000, "SMPTE ST 377-1", InterchangeObject, "Interchange Object")
- UUID(060E2B34, 02530101, 0D010101, 01010200, 0000, "SMPTE ST 377-1", StructuralComponent, "Structural Component")
- UUID(060E2B34, 02530101, 0D010101, 01010300, 0000, "SMPTE ST 377-1", Segment, "Segment")
- UUID(060E2B34, 02530101, 0D010101, 01010600, 0000, "SMPTE ST 377-1", Event, "Event")
- UUID(060E2B34, 02530101, 0D010101, 01010800, 0000, "SMPTE ST 377-1", CommentMarker, "Comment Marker")
- UUID(060E2B34, 02530101, 0D010101, 01010900, 0000, "SMPTE ST 377-1", Filler53, "")
- UUID(060E2B34, 02530101, 0D010101, 01010F00, 0000, "SMPTE ST 377-1", Sequence, "")
- UUID(060E2B34, 02530101, 0D010101, 01011100, 0000, "SMPTE ST 377-1", SourceClip, "")
- UUID(060E2B34, 02530101, 0D010101, 01011400, 0000, "SMPTE ST 377-1", TimecodeComponent, "")
- UUID(060E2B34, 02530101, 0D010101, 01011800, 0000, "SMPTE ST 377-1", ContentStorage, "")
- UUID(060E2B34, 02530101, 0D010101, 01012300, 0000, "SMPTE ST 377-1", EssenceContainerData, "")
- UUID(060E2B34, 02530101, 0D010101, 01012400, 0000, "SMPTE ST 377-1", GenericDescriptor, "Generic Descriptor")
- UUID(060E2B34, 02530101, 0D010101, 01012500, 0000, "SMPTE ST 377-1", FileDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01012700, 0000, "SMPTE ST 377-1", GenericPictureEssenceDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01012800, 0000, "SMPTE ST 377-1", CDCIEssenceDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01012900, 0000, "SMPTE ST 377-1", RGBAEssenceDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01012F00, 0000, "SMPTE ST 377-1", Preface, "")
- UUID(060E2B34, 02530101, 0D010101, 01013000, 0000, "SMPTE ST 377-1", Identification, "")
- UUID(060E2B34, 02530101, 0D010101, 01013200, 0000, "SMPTE ST 377-1", NetworkLocator, "")
- UUID(060E2B34, 02530101, 0D010101, 01013300, 0000, "SMPTE ST 377-1", TextLocator, "")
- UUID(060E2B34, 02530101, 0D010101, 01013400, 0000, "SMPTE ST 377-1", GenericPackage, "Generic Package")
- UUID(060E2B34, 02530101, 0D010101, 01013600, 0000, "SMPTE ST 377-1", MaterialPackage, "")
- UUID(060E2B34, 02530101, 0D010101, 01013700, 0000, "SMPTE ST 377-1", SourcePackage, "")
- UUID(060E2B34, 02530101, 0D010101, 01013800, 0000, "SMPTE ST 377-1", GenericTrack , "Generic Track")
- UUID(060E2B34, 02530101, 0D010101, 01013900, 0000, "SMPTE ST 377-1", EventTrack, "")
- UUID(060E2B34, 02530101, 0D010101, 01013A00, 0000, "SMPTE ST 377-1", StaticTrack, "")
- UUID(060E2B34, 02530101, 0D010101, 01013B00, 0000, "SMPTE ST 377-1", TimelineTrack, "")
- UUID(060E2B34, 02530101, 0D010101, 01014100, 0000, "SMPTE ST 377-1", DMSegment, "")
- UUID(060E2B34, 02530101, 0D010101, 01014200, 0000, "SMPTE ST 377-1", GenericSoundEssenceDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01014300, 0000, "SMPTE ST 377-1", GenericDataEssenceDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01014400, 0000, "SMPTE ST 377-1", MultipleDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01014500, 0000, "SMPTE ST 377-1", DMSourceClip, "")
- UUID(060E2B34, 02530101, 0D010101, 01014700, 0000, "", AES3PCMDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01014800, 0000, "", WaveAudioDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01015100, 0000, "SMPTE ST 381-1", MPEG2VideoDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01015900, 0000, "SMPTE ST 377-1", SubDescriptor, "Sub Descriptor")
- UUID(060E2B34, 02530101, 0D010101, 01015A00, 0000, "", JPEG2000PictureSubDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01015B00, 0000, "", VbiPacketsDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01015C00, 0000, "", AncPacketsDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01015E00, 0000, "SMPTE ST 381-2", MpegAudioDescriptor, "MPEG Audio Descriptor")
- UUID(060E2B34, 02530101, 0D010101, 01016000, 0000, "SMPTE ST 377-1", PackageMarkerObject, "")
- UUID(060E2B34, 02530101, 0D010101, 01016100, 0000, "SMPTE ST 377-1", ApplicationPlugInObject, "")
- UUID(060E2B34, 02530101, 0D010101, 01016200, 0000, "SMPTE ST 377-1", ApplicationReferencedObject, "")
- UUID(060E2B34, 0253010C, 0D010101, 01016300, 0000, "SMPTE ST 429-10", StereoscopicPictureSubDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01016400, 0000, "SMPTE ST 429-5", TimedTextDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01016500, 0000, "SMPTE ST 429-5", TimedTextResourceSubDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01016600, 0000, "SMPTE ST 377-1", ApplicationObject, "Application Object")
- UUID(060E2B34, 02530101, 0D010101, 01016700, 0000, "SMPTE ST ?", Unknown67SubDescriptor, "Unknown 0x67 Sub-Descriptor")
- UUID(060E2B34, 02530101, 0D010101, 01016800, 0000, "SMPTE ST 381-2", Mpeg4VisualSubDescriptor, "MPEG-4 Visual Sub-Descriptor")
- UUID(060E2B34, 02530101, 0D010101, 01016A00, 0000, "SMPTE ST 377-4", MCALabelSubDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01016B00, 0000, "SMPTE ST 377-4", AudioChannelLabelSubDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01016C00, 0000, "SMPTE ST 377-4", SoundfieldGroupLabelSubDescriptor, "")
- UUID(060E2B34, 02530101, 0D010101, 01016D00, 0000, "SMPTE ST 377-4", GroupOfSoundfieldGroupsLabelSubDescriptor, "")
-
- // 02 - MXF File Structure
- // 01 - Version 1
- // 01 - MXF File Structure sets & packs
- UUID(060E2B34, 02050101, 0D010201, 01020100, 0000, "SMPTE ST 377-1", OpenIncompleteHeaderPartition, "")
- UUID(060E2B34, 02050101, 0D010201, 01020200, 0000, "SMPTE ST 377-1", ClosedIncompleteHeaderPartition, "")
- UUID(060E2B34, 02050101, 0D010201, 01020300, 0000, "SMPTE ST 377-1", OpenCompleteHeaderPartition, "")
- UUID(060E2B34, 02050101, 0D010201, 01020400, 0000, "SMPTE ST 377-1", ClosedCompleteHeaderPartition, "")
- UUID(060E2B34, 02050101, 0D010201, 01030100, 0000, "SMPTE ST 377-1", OpenIncompleteBodyPartition, "")
- UUID(060E2B34, 02050101, 0D010201, 01030200, 0000, "SMPTE ST 377-1", ClosedIncompleteBodyPartition, "")
- UUID(060E2B34, 02050101, 0D010201, 01030300, 0000, "SMPTE ST 377-1", OpenCompleteBodyPartition, "")
- UUID(060E2B34, 02050101, 0D010201, 01030400, 0000, "SMPTE ST 377-1", ClosedCompleteBodyPartition, "")
- UUID(060E2B34, 02050101, 0D010201, 01040100, 0000, "SMPTE ST 377-1", OpenIncompleteFooterPartition, "")
- UUID(060E2B34, 02050101, 0D010201, 01040200, 0000, "SMPTE ST 377-1", ClosedIncompleteFooterPartition, "")
- UUID(060E2B34, 02050101, 0D010201, 01040300, 0000, "SMPTE ST 377-1", OpenCompleteFooterPartition, "")
- UUID(060E2B34, 02050101, 0D010201, 01040400, 0000, "SMPTE ST 377-1", ClosedCompleteFooterPartition, "")
- UUID(060E2B34, 02050101, 0D010201, 01050100, 0000, "SMPTE ST 377-1", Primer, "")
- UUID(060E2B34, 02530101, 0D010201, 01100100, 0000, "SMPTE ST 377-1", IndexTableSegment, "")
- UUID(060E2B34, 02050101, 0D010201, 01110100, 0000, "SMPTE ST 377-1", RandomIndexMetadata, "")
-
- // 03 - ?
- // 01 - ?
- // 00 - Generic
- UUID(060E2B34, 01020101, 0D010301, 00000000, 0000, "", GenericContainer_Aaf, "")
-
- // 04 - SDTI
- UUID(060E2B34, 02050101, 0D010301, 04010100, 0000, "", SDTI_SystemMetadataPack, "")
- UUID(060E2B34, 02430101, 0D010301, 04010200, 0000, "", SDTI_PackageMetadataSet, "")
- UUID(060E2B34, 02430101, 0D010301, 04010300, 0000, "", SDTI_PictureMetadataSet, "")
- UUID(060E2B34, 02430101, 0D010301, 04010400, 0000, "", SDTI_SoundMetadataSet, "")
- UUID(060E2B34, 02430101, 0D010301, 04010500, 0000, "", SDTI_DataMetadataSet, "")
- UUID(060E2B34, 02630101, 0D010301, 04010600, 0000, "", SDTI_ControlMetadataSet, "")
-
- // 14 - System Scheme 1
- UUID(060E2B34, 02530101, 0D010301, 14020000, 0000, "", SystemScheme1, "")
-
- // 04 - ?
- // 01 - ?
- UUID(060E2B34, 02530101, 0D010401, 01010100, 0000, "", DMScheme1, "")
-
- // 07 - AMWA AS-11
- // 01 - ?
- // 0B - ?
- // 01 - AS-11 core metadata framework
- UUID(060E2B34, 02530101, 0D010701, 0B010100, 0000, "AMWA AS-11", AS11_AAF_Core, "")
- UUID(060E2B34, 01010101, 0D010701, 0B010101, 0000, "AMWA AS-11", AS11_Core_SeriesTitle, "")
- UUID(060E2B34, 01010101, 0D010701, 0B010102, 0000, "AMWA AS-11", AS11_Core_ProgrammeTitle, "")
- UUID(060E2B34, 01010101, 0D010701, 0B010103, 0000, "AMWA AS-11", AS11_Core_EpisodeTitleNumber, "")
- UUID(060E2B34, 01010101, 0D010701, 0B010104, 0000, "AMWA AS-11", AS11_Core_ShimName, "")
- UUID(060E2B34, 01010101, 0D010701, 0B010105, 0000, "AMWA AS-11", AS11_Core_AudioTrackLayout, "")
- UUID(060E2B34, 01010101, 0D010701, 0B010106, 0000, "AMWA AS-11", AS11_Core_PrimaryAudioLanguage, "")
- UUID(060E2B34, 01010101, 0D010701, 0B010107, 0000, "AMWA AS-11", AS11_Core_ClosedCaptionsPresent, "")
- UUID(060E2B34, 01010101, 0D010701, 0B010108, 0000, "AMWA AS-11", AS11_Core_ClosedCaptionsType, "")
- UUID(060E2B34, 01010101, 0D010701, 0B010109, 0000, "AMWA AS-11", AS11_Core_ClosedCaptionsLanguage, "")
- UUID(060E2B34, 01010101, 0D010701, 0B01010A, 0000, "AMWA AS-11", AS11_Core_ShimVersion, "")
-
- // 02 - AS-11 segmentation metadata framework
- UUID(060E2B34, 02530101, 0D010701, 0B020100, 0000, "AMWA AS-11", AS11_AAF_Segmentation, "")
- UUID(060E2B34, 01010101, 0D010701, 0B020101, 0000, "AMWA AS-11", AS11_Segment_PartNumber, "")
- UUID(060E2B34, 01010101, 0D010701, 0B020102, 0000, "AMWA AS-11", AS11_Segment_PartTotal, "")
-
- // 0C - BBC
- // 01 - ?
- // 01 - ?
- // 01 - ?
- // 01 - AS-11 UK DPP metadata framework
- UUID(060E2B34, 02530101, 0D0C0101, 01010000, 0000, "AMWA AS-11", AS11_AAF_UKDPP, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010100, 0000, "AMWA AS-11", AS11_UKDPP_ProductionNumber, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010200, 0000, "AMWA AS-11", AS11_UKDPP_Synopsis, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010300, 0000, "AMWA AS-11", AS11_UKDPP_Originator, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010400, 0000, "AMWA AS-11", AS11_UKDPP_CopyrightYear, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010500, 0000, "AMWA AS-11", AS11_UKDPP_OtherIdentifier, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010600, 0000, "AMWA AS-11", AS11_UKDPP_OtherIdentifierType, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010700, 0000, "AMWA AS-11", AS11_UKDPP_Genre, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010800, 0000, "AMWA AS-11", AS11_UKDPP_Distributor, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010900, 0000, "AMWA AS-11", AS11_UKDPP_PictureRatio, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010A00, 0000, "AMWA AS-11", AS11_UKDPP_3D, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010B00, 0000, "AMWA AS-11", AS11_UKDPP_3DType, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010C00, 0000, "AMWA AS-11", AS11_UKDPP_ProductPlacement, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010D00, 0000, "AMWA AS-11", AS11_UKDPP_FpaPass, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010E00, 0000, "AMWA AS-11", AS11_UKDPP_FpaManufacturer, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01010F00, 0000, "AMWA AS-11", AS11_UKDPP_FpaVersion, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011000, 0000, "AMWA AS-11", AS11_UKDPP_VideoComments, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011100, 0000, "AMWA AS-11", AS11_UKDPP_SecondaryAudioLanguage, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011200, 0000, "AMWA AS-11", AS11_UKDPP_TertiaryAudioLanguage, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011300, 0000, "AMWA AS-11", AS11_UKDPP_AudioLoudnessStandard, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011400, 0000, "AMWA AS-11", AS11_UKDPP_AudioComments, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011500, 0000, "AMWA AS-11", AS11_UKDPP_LineUpStart, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011600, 0000, "AMWA AS-11", AS11_UKDPP_IdentClockStart, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011700, 0000, "AMWA AS-11", AS11_UKDPP_TotalNumberOfParts, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011800, 0000, "AMWA AS-11", AS11_UKDPP_TotalProgrammeDuration, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011900, 0000, "AMWA AS-11", AS11_UKDPP_AudioDescriptionPresent, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011A00, 0000, "AMWA AS-11", AS11_UKDPP_AudioDescriptionType, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011B00, 0000, "AMWA AS-11", AS11_UKDPP_OpenCaptionsPresent, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011C00, 0000, "AMWA AS-11", AS11_UKDPP_OpenCaptionsType, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011D00, 0000, "AMWA AS-11", AS11_UKDPP_OpenCaptionsLanguage, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011E00, 0000, "AMWA AS-11", AS11_UKDPP_SigningPresent, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01011F00, 0000, "AMWA AS-11", AS11_UKDPP_SignLanguage, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01012000, 0000, "AMWA AS-11", AS11_UKDPP_CompletionDate, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01012100, 0000, "AMWA AS-11", AS11_UKDPP_TextlessElementsExist, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01012200, 0000, "AMWA AS-11", AS11_UKDPP_ProgrammeHasText, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01012300, 0000, "AMWA AS-11", AS11_UKDPP_ProgrammeTextLanguage, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01012400, 0000, "AMWA AS-11", AS11_UKDPP_ContactEmail, "")
- UUID(060E2B34, 01010101, 0D0C0101, 01012500, 0000, "AMWA AS-11", AS11_UKDPP_ContactTelephoneNumber, "")
-
- // 0E - Organizationally registered for private use
- // 04 - Avid
- UUID(060E2B34, 01020101, 0E040301, 00000000, 0000, "", GenericContainer_Avid, "")
-
- // 06 - Sony
- UUID(060E2B34, 01020101, 0E067F03, 00000000, 0000, "", GenericContainer_Sony, "")
-
- // 0B - Omneon Video Networks
- UUID(060E2B34, 02530105, 0E0B0102, 01010100, 0000, "", Omneon_010201010100, "")
- UUID(060E2B34, 02530105, 0E0B0102, 01020100, 0000, "", Omneon_010201020100, "")
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_Category(int8u Category)
-{
- switch(Category)
- {
- case 0x01 : return "Item";
- case 0x02 : return "Group (Set/Pack)";
- case 0x03 : return "Wrapper";
- case 0x04 : return "Value";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_Registry(int8u Category, int8u Registry)
-{
- switch(Category)
- {
- case 0x01 : //"Item"
- switch(Registry)
- {
- case 0x01 : return "Metadata";
- case 0x02 : return "Essence";
- default : return "";
- }
- case 0x02 : //"Group (Set/Pack)"
- switch(Registry)
- {
- case 0x05 : return "Predefined items";
- case 0x43 : return "1-byte tag, 2-byte length";
- case 0x53 : return "2-byte tag, 2-byte length";
- case 0x63 : return "1-byte tag, 4-byte length";
- default : return "";
- }
- case 0x04 : //"Value"
- switch(Registry)
- {
- case 0x01 : return "Fixed";
- default : return "";
- }
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_Structure(int8u Category, int8u Registry, int8u Structure)
-{
- switch(Category)
- {
- case 0x01 : //"Item"
- switch(Registry)
- {
- case 0x02 : //Essence
- switch(Structure)
- {
- case 0x01 : return "Standard";
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_MPEG2_CodedContentType(int8u CodedContentType)
-{
- switch(CodedContentType)
- {
- case 0x01 : return "Progressive";
- case 0x02 : return "Interlaced";
- case 0x03 : return ""; //Mixed
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_OperationalPattern(const int128u OperationalPattern)
-{
- //Item and Package Complexity
- int32u Code_Compare4=(int32u)OperationalPattern.lo;
- switch ((int8u)(Code_Compare4>>24))
- {
- case 0x01 : switch ((int8u)(Code_Compare4>>16))
- {
- case 0x01 : return "OP-1a";
- case 0x02 : return "OP-1b";
- case 0x03 : return "OP-1c";
- default : return "";
- }
- case 0x02 : switch ((int8u)(Code_Compare4>>16))
- {
- case 0x01 : return "OP-2a";
- case 0x02 : return "OP-2b";
- case 0x03 : return "OP-2c";
- default : return "";
- }
- case 0x03 : switch ((int8u)(Code_Compare4>>16))
- {
- case 0x01 : return "OP-3a";
- case 0x02 : return "OP-3b";
- case 0x03 : return "OP-3c";
- default : return "";
- }
- case 0x10 : return "OP-Atom";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_EssenceElement(const int128u EssenceElement)
-{
- if ((EssenceElement.hi&0xFFFFFFFFFFFFFF00LL)!=0x060E2B3401020100LL)
- return "";
-
- int8u Code1=(int8u)((EssenceElement.lo&0xFF00000000000000LL)>>56);
- int8u Code2=(int8u)((EssenceElement.lo&0x00FF000000000000LL)>>48);
- int8u Code5=(int8u)((EssenceElement.lo&0x00000000FF000000LL)>>24);
- int8u Code7=(int8u)((EssenceElement.lo&0x000000000000FF00LL)>> 8);
-
- switch (Code1)
- {
- case 0x0E : //Private
- switch (Code2)
- {
- case 0x06 : //Sony
- case 0x15 : //GC Picture
- switch (Code5)
- {
- case 0x15 : return "Sony private picture stream";
- default : return "Sony private stream";
- }
- default : return "Unknown private stream";
- }
- default : ;
- }
-
- switch (Code5)
- {
- case 0x05 : //CP Picture (SMPTE 386M)
- switch (Code7)
- {
- case 0x01 : return "D-10 Video";
- default : return "Unknown stream";
- }
- case 0x06 : //CP Sound (SMPTE 386M)
- switch (Code7)
- {
- case 0x10 : return "D-10 Audio";
- default : return "Unknown stream";
- }
- case 0x07 : //CP Data (SMPTE 386M)
- return "";
- case 0x14 : //MXF in MXF?
- switch (Code7)
- {
- case 0x01 : return "MXF in MXF?";
- default : return "Unknown stream";
- }
- case 0x15 : //GC Picture
- switch (Code7)
- {
- case 0x01 : return "RGB";
- case 0x05 : return "MPEG stream (Frame)";
- case 0x06 : return "MPEG stream (Clip)";
- case 0x07 : return "MPEG stream (Custom)";
- case 0x08 : return "JPEG 2000";
- default : return "Unknown stream";
- }
- case 0x16 : //GC Sound
- switch (Code7)
- {
- case 0x01 : return "PCM"; //BWF
- case 0x02 : return "PCM"; //BWF
- case 0x03 : return "PCM"; //DV Audio
- case 0x04 : return "PCM"; //BWF
- case 0x05 : return "MPEG Audio / AC-3";
- case 0x0A : return "A-law";
- default : return "Unknown stream";
- }
- case 0x17 : //GC Data
- switch (Code7)
- {
- case 0x01 : return "VBI"; //Frame-Wrapped VBI Data Element
- case 0x02 : return "ANC"; //Frame-Wrapped ANC Data Element
- case 0x0B : return "Timed Text"; //Clip-Wrapped Timed Text Data Element, SMPTE ST 429-5
- default : return "Unknown stream";
- }
- case 0x18 : //GC Compound
- switch (Code7)
- {
- case 0x01 : return "DV"; //Frame
- case 0x02 : return "DV"; //Clip
- default : return "Unknown stream";
- }
- default : return "Unknown stream";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_EssenceContainer(const int128u EssenceContainer)
-{
- if ((EssenceContainer.hi&0xFFFFFFFFFFFFFF00LL)!=0x060E2B3404010100LL)
- return "";
-
- int8u Code1=(int8u)((EssenceContainer.lo&0xFF00000000000000LL)>>56);
- int8u Code2=(int8u)((EssenceContainer.lo&0x00FF000000000000LL)>>48);
- int8u Code3=(int8u)((EssenceContainer.lo&0x0000FF0000000000LL)>>40);
- int8u Code4=(int8u)((EssenceContainer.lo&0x000000FF00000000LL)>>32);
- int8u Code5=(int8u)((EssenceContainer.lo&0x00000000FF000000LL)>>24);
- int8u Code6=(int8u)((EssenceContainer.lo&0x0000000000FF0000LL)>>16);
- int8u Code7=(int8u)((EssenceContainer.lo&0x000000000000FF00LL)>> 8);
-
- switch (Code1)
- {
- case 0x0D : //Public Use
- switch (Code2)
- {
- case 0x01 : //AAF
- switch (Code3)
- {
- case 0x03 : //Essence Container Application
- switch (Code4)
- {
- case 0x01 : //MXF EC Structure version
- switch (Code5)
- {
- case 0x02 : //Essence container kind
- switch (Code6)
- {
- case 0x01 : return "D-10"; // Video and Audio
- case 0x02 : return "DV";
- case 0x05 : return "Uncompressed pictures";
- case 0x06 : return "PCM";
- case 0x04 : return "MPEG ES mappings with Stream ID";
- case 0x0A : return "A-law";
- case 0x0C : return "JPEG 2000";
- case 0x10 : return "AVC";
- case 0x11 : return "VC-3";
- case 0x13 : return "Timed Text";
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- case 0x0E : //Private Use
- switch (Code2)
- {
- case 0x04 : //Avid
- switch (Code3)
- {
- case 0x03 : //Essence Container Application
- switch (Code4)
- {
- case 0x01 : //MXF EC Structure version
- switch (Code5)
- {
- case 0x02 : //Essence container kind
- switch (Code6)
- {
- case 0x06 : return "VC-3";
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- case 0x06 : //Sony
- switch (Code3)
- {
- case 0x0D :
- switch (Code4)
- {
- case 0x03 :
- switch (Code5)
- {
- case 0x02 :
- switch (Code6)
- {
- case 0x01 :
- switch (Code7)
- {
- case 0x01 : return "Sony RAW?";
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_EssenceContainer_Mapping(int8u Code6, int8u Code7, int8u Code8)
-{
- switch (Code6)
- {
- case 0x01 : //D-10, SMPTE 386M
- return "Frame (D-10)";
- case 0x02 : //DV, SMPTE 383M
- switch (Code8)
- {
- case 0x01 : return "Frame";
- case 0x02 : return "Clip";
- default : return "";
- }
- case 0x04 : //MPEG ES, SMPTE 381M
- case 0x07 : //MPEG PES, SMPTE 381M
- case 0x08 : //MPEG PS, SMPTE 381M
- case 0x09 : //MPEG TS, SMPTE 381M
- case 0x10 : //AVC
- case 0x15 : //YUV
- switch (Code8)
- {
- case 0x01 : return "Frame";
- case 0x02 : return "Clip";
- case 0x03 : return "Custom: Stripe";
- case 0x04 : return "Custom: PES";
- case 0x05 : return "Custom: Fixed Audio Size";
- case 0x06 : return "Custom: Splice";
- case 0x07 : return "Custom: Closed GOP";
- case 0x08 : return "Custom: Slave";
- case 0x7F : return "Custom";
- default : return "";
- }
- case 0x05 : //Uncompressed pictures, SMPTE 384M
- switch (Code8)
- {
- case 0x01 : return "Frame";
- case 0x02 : return "Clip";
- case 0x03 : return "Line";
- default : return "";
- }
- case 0x06 : //AES-PCM, SMPTE 382M
- switch (Code7)
- {
- case 0x01 : return "Frame (BWF)";
- case 0x02 : return "Clip (BWF)";
- case 0x03 : return "Frame (AES)";
- case 0x04 : return "Clip (AES)";
- case 0x08 : return "Custom (BWF)";
- case 0x09 : return "Custom (AES)";
- default : return "";
- }
- case 0x0A : //A-Law
- switch (Code7)
- {
- case 0x01 : return "Frame";
- case 0x02 : return "Clip";
- case 0x03 : return "?";
- case 0x07 : return "Custom";
- default : return "";
- }
- case 0x0C : //JPEG 2000
- switch (Code7)
- {
- case 0x01 : return "Frame";
- case 0x02 : return "Clip";
- default : return "";
- }
- case 0x11 : //VC-3, SMPTE 2019-4
- switch (Code7)
- {
- case 0x01 : return "Frame";
- case 0x02 : return "Clip";
- default : return "";
- }
- case 0x13 : //Timed Text
- return "Clip";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_EssenceCompression(const int128u EssenceCompression)
-{
- if ((EssenceCompression.hi&0xFFFFFFFFFFFFFF00LL)!=0x060E2B3404010100LL || !((EssenceCompression.lo&0xFF00000000000000LL)==0x0400000000000000LL || (EssenceCompression.lo&0xFF00000000000000LL)==0x0E00000000000000LL))
- return "";
-
- int8u Code1=(int8u)((EssenceCompression.lo&0xFF00000000000000LL)>>56);
- int8u Code2=(int8u)((EssenceCompression.lo&0x00FF000000000000LL)>>48);
- int8u Code3=(int8u)((EssenceCompression.lo&0x0000FF0000000000LL)>>40);
- int8u Code4=(int8u)((EssenceCompression.lo&0x000000FF00000000LL)>>32);
- int8u Code5=(int8u)((EssenceCompression.lo&0x00000000FF000000LL)>>24);
- int8u Code6=(int8u)((EssenceCompression.lo&0x0000000000FF0000LL)>>16);
- int8u Code7=(int8u)((EssenceCompression.lo&0x000000000000FF00LL)>> 8);
-
- switch (Code1)
- {
- case 0x04 : //
- switch (Code2)
- {
- case 0x01 : //Picture
- switch (Code3)
- {
- case 0x02 : //Coding characteristics
- switch (Code4)
- {
- case 0x01 : //Uncompressed coding
- switch (Code5)
- {
- case 0x01 : //Uncompressed picture coding
- return "YUV";
- default : return "";
- }
- case 0x02 : //Compressed coding
- switch (Code5)
- {
- case 0x01 : //MPEG Compression
- switch (Code6)
- {
- case 0x00 : return "MPEG Video";
- case 0x01 : return "MPEG Video"; //Version 2
- case 0x02 : return "MPEG Video"; //Version 2
- case 0x03 : return "MPEG Video"; //Version 2
- case 0x04 : return "MPEG Video"; //Version 2
- case 0x11 : return "MPEG Video"; //Version 1
- case 0x20 : return "MPEG-4 Visual";
- case 0x30 :
- case 0x31 :
- case 0x32 :
- case 0x33 :
- case 0x34 :
- case 0x35 :
- case 0x36 :
- case 0x37 :
- case 0x38 :
- case 0x39 :
- case 0x3A :
- case 0x3B :
- case 0x3C :
- case 0x3D :
- case 0x3E :
- case 0x3F : return "AVC";
- default : return "";
- }
- case 0x02 : return "DV";
- case 0x03 : //Individual Picture Coding Schemes
- switch (Code6)
- {
- case 0x01 : return "JPEG 2000";
- default : return "";
- }
- case 0x71 : return "VC-3";
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- case 0x02 : //Sound
- switch (Code3)
- {
- case 0x02 : //Coding characteristics
- switch (Code4)
- {
- case 0x01 : //Uncompressed Sound Coding
- switch (Code5)
- {
- case 0x00 : return "PCM";
- case 0x01 : return "PCM";
- case 0x7E : return "PCM"; //AIFF
- case 0x7F : return "PCM"; // TODO: Undefined
- default : return "";
- }
- case 0x02 : //Compressed coding
- switch (Code5)
- {
- case 0x03 : //Compressed Audio Coding
- switch (Code6)
- {
- case 0x01 : //Compandeded Audio Coding
- switch (Code7)
- {
- case 0x01 : return "A-law";
- case 0x10 : return "DV Audio"; //DV 12-bit
- default : return ""; //Unknown
- }
- case 0x02 : //SMPTE 338M Audio Coding
- switch (Code7)
- {
- case 0x01 : return "AC-3";
- case 0x04 : return "MPEG-1 Audio Layer 1";
- case 0x05 : return "MPEG-1 Audio Layer 2 or 3";
- case 0x06 : return "MPEG-2 Audio Layer 1";
- case 0x1C : return "Dolby E";
- default : return ""; //Unknown
- }
- case 0x03 : //MPEG-2 Coding (not defined in SMPTE 338M)
- switch (Code7)
- {
- case 0x01 : return "AAC version 2";
- default : return ""; //Unknown
- }
- case 0x04 : //MPEG-4 Audio Coding
- switch (Code7)
- {
- case 0x01 : return "MPEG-4 Speech Profile";
- case 0x02 : return "MPEG-4 Synthesis Profile";
- case 0x03 : return "MPEG-4 Scalable Profile";
- case 0x04 : return "MPEG-4 Main Profile";
- case 0x05 : return "MPEG-4 High Quality Audio Profile";
- case 0x06 : return "MPEG-4 Low Delay Audio Profile";
- case 0x07 : return "MPEG-4 Natural Audio Profile";
- case 0x08 : return "MPEG-4 Mobile Audio Internetworking Profile";
- default : return ""; //Unknown
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- case 0x0E : //Private Use
- switch (Code2)
- {
- case 0x04 : //Avid
- switch (Code3)
- {
- case 0x02 : //Essence Compression ?
- switch (Code4)
- {
- case 0x01 : //?
- switch (Code5)
- {
- case 0x02 : //?
- switch (Code6)
- {
- case 0x04 : return "VC-3";
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- case 0x06 : //Sony
- switch (Code3)
- {
- case 0x04 :
- switch (Code4)
- {
- case 0x01 :
- switch (Code5)
- {
- case 0x02 :
- switch (Code6)
- {
- case 0x04 :
- switch (Code7)
- {
- case 0x02 : return "Sony RAW SQ";
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_EssenceCompression_Version(const int128u EssenceCompression)
-{
- int8u Code2=(int8u)((EssenceCompression.lo&0x00FF000000000000LL)>>48);
- int8u Code3=(int8u)((EssenceCompression.lo&0x0000FF0000000000LL)>>40);
- int8u Code4=(int8u)((EssenceCompression.lo&0x000000FF00000000LL)>>32);
- int8u Code5=(int8u)((EssenceCompression.lo&0x00000000FF000000LL)>>24);
- int8u Code6=(int8u)((EssenceCompression.lo&0x0000000000FF0000LL)>>16);
- int8u Code7=(int8u)((EssenceCompression.lo&0x000000000000FF00LL)>> 8);
-
- switch (Code2)
- {
- case 0x01 : //Picture
- switch (Code3)
- {
- case 0x02 : //Coding characteristics
- switch (Code4)
- {
- case 0x02 : //Compressed coding
- switch (Code5)
- {
- case 0x01 : //MPEG Compression
- switch (Code6)
- {
- case 0x01 : return "Version 2";
- case 0x02 : return "Version 2";
- case 0x03 : return "Version 2";
- case 0x04 : return "Version 2";
- case 0x11 : return "Version 1";
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- case 0x02 : //Sound
- switch (Code3)
- {
- case 0x02 : //Coding characteristics
- switch (Code4)
- {
- case 0x02 : //Compressed coding
- switch (Code5)
- {
- case 0x03 : //Compressed Audio Coding
- switch (Code6)
- {
- case 0x02 : //SMPTE 338M Audio Coding
- switch (Code7)
- {
- case 0x04 : return "Version 1"; //Layer 1
- case 0x05 : return "Version 1"; //Layer 2 or 3
- case 0x06 : return "Version 2"; //Layer 1
- default : return ""; //Unknown
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_Sequence_DataDefinition(const int128u DataDefinition)
-{
- int8u Code4=(int8u)((DataDefinition.lo&0x000000FF00000000LL)>>32);
- int8u Code5=(int8u)((DataDefinition.lo&0x00000000FF000000LL)>>24);
-
- switch (Code4)
- {
- case 0x01 :
- switch (Code5)
- {
- case 0x01 :
- case 0x02 :
- case 0x03 : return "Time";
- case 0x10 : return "Descriptive Metadata";
- default : return "";
- }
- case 0x02 :
- switch (Code5)
- {
- case 0x01 : return "Picture";
- case 0x02 : return "Sound";
- case 0x03 : return "Data";
- default : return "";
- }
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_FrameLayout(int8u FrameLayout)
-{
- switch (FrameLayout)
- {
- case 0x00 : return "Full frame";
- case 0x01 : return "Separated fields";
- case 0x02 : return "Single field";
- case 0x03 : return "Mixed fields";
- case 0x04 : return "Segmented frame";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_FrameLayout_ScanType(int8u FrameLayout)
-{
- switch (FrameLayout)
- {
- case 0x01 :
- case 0x04 :
- case 0xFF : //Seen in one file
- return "Interlaced";
- default :
- return "Progressive";
- }
-}
-
-//---------------------------------------------------------------------------
-int8u Mxf_FrameLayout_Multiplier(int8u FrameLayout)
-{
- switch (FrameLayout)
- {
- case 0x01 :
- case 0x04 :
- case 0xFF : //Seen in one file
- return 2;
- default :
- return 1;
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_ColorPrimaries(const int128u ColorPrimaries)
-{
- int32u Code_Compare4=(int32u)ColorPrimaries.lo;
- switch ((int8u)(Code_Compare4>>16))
- {
- case 0x01 : return "BT.601 NTSC";
- case 0x02 : return "BT.470 System B";
- case 0x03 : return "BT.709";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_TransferCharacteristic(const int128u TransferCharacteristic)
-{
- int32u Code_Compare4=(int32u)TransferCharacteristic.lo;
- switch ((int8u)(Code_Compare4>>16))
- {
- case 0x01 : return "BT.470";
- case 0x02 : return "BT.709";
- case 0x03 : return "SMPTE 240M";
- case 0x04 : return "SMPTE 274M";
- case 0x05 : return "BT.1361 extended colour gamut system";
- case 0x06 : return "Linear";
- case 0x07 : return "SMPTE 428M";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_CodingEquations(const int128u CodingEquations)
-{
- int32u Code_Compare4=(int32u)CodingEquations.lo;
- switch ((int8u)(Code_Compare4>>16))
- {
- case 0x01 : return "BT.601";
- case 0x02 : return "BT.709";
- case 0x03 : return "SMPTE 240M";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_ChannelAssignment_ChannelPositions(const int128u ChannelLayout, int32u ChannelsCount)
-{
- //Sound Channel Labeling
- if ((ChannelLayout.hi&0xFFFFFFFFFFFFFF00LL)!=0x060E2B3404010100LL && (ChannelLayout.lo&0xFFFFFFFF00000000LL)!=0x0402021000000000LL)
- return "";
-
- int8u Code5=(int8u)((ChannelLayout.lo&0x00000000FF000000LL)>>24);
- int8u Code6=(int8u)((ChannelLayout.lo&0x0000000000FF0000LL)>>16);
- int8u Code7=(int8u)((ChannelLayout.lo&0x000000000000FF00LL)>> 8);
-
- switch (Code5)
- {
- case 0x03 : //SMPTE 429-2
- switch (Code6)
- {
- case 0x01 : //Sets
- switch (Code7)
- {
- case 0x01 : //Config 1
- switch (ChannelsCount)
- {
- case 6 : return "Front: L C R, Side: L R, LFE";
- default : return "Front: L C R, Side: L R, LFE, HI, VI-N";
- }
- case 0x02 : //Config 2
- switch (ChannelsCount)
- {
- case 6 : return "Front: L C R, Side: L R, LFE";
- case 8 : return "Front: L C R, Side: L R, Back: C, LFE";
- default : return "Front: L C R, Side: L R, Back: C, LFE, HI, VI-N";
- }
- case 0x03 : //Config 3
- switch (ChannelsCount)
- {
- case 6 : return "Front: L C R, Side: L R, LFE";
- case 8 : return "Front: L C R, Side: L R, Back: L R, LFE";
- default : return "Front: L C R, Side: L R, Back: L R, LFE, HI, VI-N";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_ChannelAssignment_ChannelPositions2(const int128u ChannelLayout, int32u ChannelsCount=(int32u)-1)
-{
- //Sound Channel Labeling
- if ((ChannelLayout.hi&0xFFFFFFFFFFFFFF00LL)!=0x060E2B3404010100LL && (ChannelLayout.lo&0xFFFFFFFF00000000LL)!=0x0402021000000000LL)
- return "";
-
- int8u Code5=(int8u)((ChannelLayout.lo&0x00000000FF000000LL)>>24);
- int8u Code6=(int8u)((ChannelLayout.lo&0x0000000000FF0000LL)>>16);
- int8u Code7=(int8u)((ChannelLayout.lo&0x000000000000FF00LL)>> 8);
-
- switch (Code5)
- {
- case 0x03 : //SMPTE 429-2
- switch (Code6)
- {
- case 0x01 : //Sets
- switch (Code7)
- {
- case 0x01 : //Config 1
- switch (ChannelsCount)
- {
- case 6 : return "3/2/0.1";
- default : return "3/2/0.1+2";
- }
- case 0x02 : //Config 2
- switch (ChannelsCount)
- {
- case 6 : return "3/2/0.1";
- case 8 : return "3/2/1.1";
- default : return "3/2/1.1+2";
- }
- case 0x03 : //Config 3
- switch (ChannelsCount)
- {
- case 6 : return "3/2/0.1";
- case 8 : return "3/2/2.1";
- default : return "3/2/2.1+2";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Mxf_ChannelAssignment_ChannelLayout(const int128u ChannelLayout, int32u ChannelsCount=(int32u)-1)
-{
- //Sound Channel Labeling
- if ((ChannelLayout.hi&0xFFFFFFFFFFFFFF00LL)!=0x060E2B3404010100LL && (ChannelLayout.lo&0xFFFFFFFF00000000LL)!=0x0402021000000000LL)
- return "";
-
- int8u Code5=(int8u)((ChannelLayout.lo&0x00000000FF000000LL)>>24);
- int8u Code6=(int8u)((ChannelLayout.lo&0x0000000000FF0000LL)>>16);
- int8u Code7=(int8u)((ChannelLayout.lo&0x000000000000FF00LL)>> 8);
-
- switch (Code5)
- {
- case 0x03 : //SMPTE 429-2
- switch (Code6)
- {
- case 0x01 : //Sets
- switch (Code7)
- {
- case 0x01 : //Config 1
- switch (ChannelsCount)
- {
- case 6 : return "L R C LFE Ls Rs";
- default : return "L R C LFE Ls Rs HI VI-N";
- }
- case 0x02 : //Config 2
- switch (ChannelsCount)
- {
- case 6 : return "L R C LFE Ls Rs";
- case 8 : return "L R C LFE Ls Rs Cs X";
- default : return "L R C LFE Ls Rs Cs X HI VI-N";
- }
- case 0x03 : //Config 3
- switch (ChannelsCount)
- {
- case 6 : return "L R C LFE Ls Rs";
- case 8 : return "L R C LFE Ls Rs Rls Rrs";
- default : return "L R C LFE Ls Rs Rls Rrs HI VI-N";
- }
- default : return "";
- }
- default : return "";
- }
- default : return "";
- }
-}
-const char* Mxf_ChannelAssignment_ChannelLayout(const int128u ChannelLayout)
-{
- return Mxf_ChannelAssignment_ChannelLayout(ChannelLayout, (int32u)-1);
-}
-
-string MXF_MCALabelDictionaryID_ChannelPositions(const std::vector<int128u> &MCALabelDictionaryIDs)
-{
- string ToReturn;
- bitset<8> Front, Side, Back, Lfe;
- bool IsOk=true;
-
- for (size_t Pos=0; Pos<MCALabelDictionaryIDs.size(); Pos++)
- {
- if ((MCALabelDictionaryIDs[Pos].hi&0xFFFFFFFFFFFFFF00LL)==0x060E2B3404010100LL && (MCALabelDictionaryIDs[Pos].lo&0xFF00000000000000LL)==0x0300000000000000LL)
- {
- switch ((MCALabelDictionaryIDs[Pos].lo>>48)&0xFF)
- {
- case 0x01 :
- switch ((MCALabelDictionaryIDs[Pos].lo>>40)&0xFF)
- {
- case 0x01 :
- switch ((MCALabelDictionaryIDs[Pos].lo>>32)&0xFF)
- {
- case 0x01 : Front[0]=true; break; //L
- case 0x02 : Front[1]=true; break; //R
- case 0x03 : Front[2]=true; break; //C
- case 0x04 : Lfe[0]=true; break; //LFE
- case 0x05 : Side[0]=true; break; //Ls
- case 0x06 : Side[1]=true; break; //Rs
- case 0x20 : Front[6]=true; break; //M1 //TODO: split M1 and M2 in 2 services
- case 0x21 : Front[7]=true; break; //M2 //TODO: split M1 and M2 in 2 services
- case 0x22 : Front[4]=true; break; //Lt
- case 0x23 : Front[5]=true; break; //Rt
- default : IsOk=false;
- }
- break;
- default : IsOk=false;
- }
- break;
- case 0x02 :
- switch ((MCALabelDictionaryIDs[Pos].lo>>40)&0xFF)
- {
- case 0x01 :
- switch ((MCALabelDictionaryIDs[Pos].lo>>32)&0xFF)
- {
- case 0x01 : Front[0]=true; break; //L
- case 0x02 : Front[1]=true; break; //R
- case 0x03 : Front[2]=true; break; //C
- case 0x04 : Lfe[0]=true; break; //LFE
- case 0x05 : Side[0]=true; break; //Ls
- case 0x06 : Side[1]=true; break; //Rs
- case 0x20 :
- switch ((MCALabelDictionaryIDs[Pos].lo>>24)&0xFF)
- {
- case 0x03 : Front[4]=true; break; //Lt
- case 0x04 : Front[5]=true; break; //Rt
- default : IsOk=false;
- }
- break;
- default : IsOk=false;
- }
- break;
- default : IsOk=false;
- }
- break;
- default : IsOk=false;
- }
- }
- else
- IsOk=false;
- }
-
- if (IsOk)
- {
- string FrontS, SideS, BackS, LfeS;
- if (Front.any())
- {
- FrontS+="Front: ";
- if (Front[0])
- FrontS+="L ";
- if (Front[2])
- FrontS+="C ";
- if (Front[1])
- FrontS+="R ";
- if (Front[4])
- FrontS+="Lt ";
- if (Front[5])
- FrontS+="Rt ";
- if (Front[6])
- FrontS+="M1 ";
- if (Front[7])
- FrontS+="M2 ";
- FrontS.resize(FrontS.size()-1);
- }
- if (Side.any())
- {
- SideS+="Side: ";
- if (Side[0])
- SideS+="L ";
- if (Side[1])
- SideS+="R ";
- SideS.resize(SideS.size()-1);
- }
- if (Back.any())
- {
- BackS+="Back: ";
- if (Back[0])
- BackS+="L ";
- if (Back[2])
- BackS+="C ";
- if (Back[1])
- BackS+="R ";
- BackS.resize(BackS.size()-1);
- }
- if (Lfe.any())
- {
- if (Lfe[0])
- LfeS+="LFE";
- }
- if (!FrontS.empty())
- ToReturn+=FrontS.c_str();
- if (!SideS.empty())
- {
- if (!ToReturn.empty())
- ToReturn+=", ";
- ToReturn+=SideS.c_str();
- }
- if (!BackS.empty())
- {
- if (!ToReturn.empty())
- ToReturn+=", ";
- ToReturn+=BackS.c_str();
- }
- if (!LfeS.empty())
- {
- if (!ToReturn.empty())
- ToReturn+=", ";
- ToReturn+=LfeS.c_str();
- }
- }
-
- return ToReturn;
-}
-
-string MXF_MCALabelDictionaryID_ChannelLayout(const std::vector<int128u> &MCALabelDictionaryIDs)
-{
- string ToReturn;
-
- for (size_t Pos=0; Pos<MCALabelDictionaryIDs.size(); Pos++)
- {
- const char* Value="";
- if ((MCALabelDictionaryIDs[Pos].hi&0xFFFFFFFFFFFFFF00LL)==0x060E2B3404010100LL && (MCALabelDictionaryIDs[Pos].lo&0xFF00000000000000LL)==0x0300000000000000LL)
- {
- switch ((MCALabelDictionaryIDs[Pos].lo>>48)&0xFF)
- {
- case 0x01 :
- switch ((MCALabelDictionaryIDs[Pos].lo>>40)&0xFF)
- {
- case 0x01 :
- switch ((MCALabelDictionaryIDs[Pos].lo>>32)&0xFF)
- {
- case 0x01 : Value="L"; break;
- case 0x02 : Value="R"; break;
- case 0x03 : Value="C"; break;
- case 0x04 : Value="LFE"; break;
- case 0x05 : Value="Ls"; break;
- case 0x06 : Value="Rs"; break;
- case 0x20 : Value="M1"; break;
- case 0x21 : Value="M2"; break;
- case 0x22 : Value="Lt"; break;
- case 0x23 : Value="Rt"; break;
- default : Value="";
- }
- break;
- default : Value="";
- }
- break;
- case 0x02 :
- switch ((MCALabelDictionaryIDs[Pos].lo>>40)&0xFF)
- {
- case 0x01 :
- switch ((MCALabelDictionaryIDs[Pos].lo>>32)&0xFF)
- {
- case 0x01 : Value="L"; break;
- case 0x02 : Value="R"; break;
- case 0x03 : Value="C"; break;
- case 0x04 : Value="LFE"; break;
- case 0x05 : Value="Ls"; break;
- case 0x06 : Value="Rs"; break;
- case 0x20 :
- switch ((MCALabelDictionaryIDs[Pos].lo>>24)&0xFF)
- {
- case 0x03 : Value="Lt"; break;
- case 0x04 : Value="Rt"; break;
- default : Value="";
- }
- break;
- case 0x22 : Value="Lt"; break;
- case 0x23 : Value="Rt"; break;
- default : Value="";
- }
- break;
- default : Value="";
- }
- break;
- default : Value="";
- }
- }
- if (!ToReturn.empty())
- ToReturn+=' ';
- if (strlen(Value))
- ToReturn+=Value;
- else
- {
- Ztring Value; Value.From_Number(MCALabelDictionaryIDs[Pos].lo>>32, 16);
- if (Value.size()<8)
- Value.insert(0, 8-Value.size(), __T('0'));
- ToReturn+=Value.To_UTF8();
- }
- }
-
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-const size_t Mxf_AS11_ClosedCaptionType_Count=2;
-const char* Mxf_AS11_ClosedCaptionType[Mxf_AS11_ClosedCaptionType_Count]=
-{
- "Hard of Hearing",
- "Translation",
-};
-
-//---------------------------------------------------------------------------
-const size_t Mxf_AS11_AudioTrackLayout_Count=0x35;
-const char* Mxf_AS11_AudioTrackLayout[Mxf_AS11_AudioTrackLayout_Count]=
-{
- "EBU R 48: 1a",
- "EBU R 48: 1b",
- "EBU R 48: 1c",
- "EBU R 48: 2a",
- "EBU R 48: 2b",
- "EBU R 48: 2c",
- "EBU R 48: 3a",
- "EBU R 48: 3b",
- "EBU R 48: 4a",
- "EBU R 48: 4b",
- "EBU R 48: 4c",
- "EBU R 48: 5a",
- "EBU R 48: 5b",
- "EBU R 48: 6a",
- "EBU R 48: 6b",
- "EBU R 48: 7a",
- "EBU R 48: 7b",
- "EBU R 48: 8a",
- "EBU R 48: 8b",
- "EBU R 48: 8c",
- "EBU R 48: 9a",
- "EBU R 48: 9b",
- "EBU R 48: 10a",
- "EBU R 48: 11a",
- "EBU R 48: 11b",
- "EBU R 48: 11c",
- "EBU R 123: 2a",
- "EBU R 123: 4a",
- "EBU R 123: 4b",
- "EBU R 123: 4c",
- "EBU R 123: 8a",
- "EBU R 123: 8b",
- "EBU R 123: 8c",
- "EBU R 123: 8d",
- "EBU R 123: 8e",
- "EBU R 123: 8f",
- "EBU R 123: 8g",
- "EBU R 123: 8h",
- "EBU R 123: 8i",
- "EBU R 123: 12a",
- "EBU R 123: 12b",
- "EBU R 123: 12c",
- "EBU R 123: 12d",
- "EBU R 123: 12e",
- "EBU R 123: 12f",
- "EBU R 123: 12g",
- "EBU R 123: 12h",
- "EBU R 123: 16a",
- "EBU R 123: 16b",
- "EBU R 123: 16c",
- "EBU R 123: 16d",
- "EBU R 123: 16e",
- "EBU R 123: 16f",
-};
-struct mxf_as11_audiotracklayout_assignment
-{
- size_t Count;
- const char* Assign[16];
-};
-const mxf_as11_audiotracklayout_assignment Mxf_AS11_AudioTrackLayout_ChannelPositions[Mxf_AS11_AudioTrackLayout_Count]=
-{
- { 2, "Front: C", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 1a
- { 4, "Front: C", NULL, "Front: C", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 1b
- { 8, "Front: C", NULL, "Front: C", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 1c
- { 2, "Front: L", "Front: R", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 2a
- { 4, "Front: L", "Front: R", "Front: L", "Front: R", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 2b
- { 8, "Front: L", "Front: R", "Front: L", "Front: R", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 2c
- { 4, "Front: L", "Front: R", "Front: L", "Front: R", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 3a
- { 8, "Front: L", "Front: R", "Front: L", "Front: R", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 3b
- { 2, "EBU R 48: 4a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 4b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 4c", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 5a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 5b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 6a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 6b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 7a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 7b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 2, "EBU R 48: 8a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 8b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 8c", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 9a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 9b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 2, "EBU R 48: 10a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 11a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 11b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 11c", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 2, "EBU R 123: 2a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 123: 4a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 123: 4b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 123: 4c", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8c", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8d", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8e", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8f", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8g", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8h", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8i", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12c", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12d", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12e", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12f", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12g", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12h", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 16, "Front: L", "Front: R", "Front: L", "Front: R", "Front: C", "LFE", "Side: L", "Side: R", "Front: L", "Front: R", "Front: L", "Front: R", "Front: C", "LFE", "Side: L", "Side: R", }, //123 16a
- { 16, "Front: L", "Front: R", "Front: C", "LFE", "Side: L", "Side: R", "Front: L", "Front: R", "Front: C", "LFE", "Side: L", "Side: R", }, //123 16b
- { 16, "Front: L", "Front: R", "Front: L", "Front: R", "Front: L", "Front: R", "Front: C", "LFE", "Side: L", "Side: R", "Front: L", "Front: R", "Front: C", "LFE", "Side: L", "Side: R", }, //123 16c
- { 16, "Front: L", "Front: R", "Front: C", "LFE", "Side: L", "Side: R", "Front: L", "Front: R", "Front: L", "Front: R", "Front: C", "LFE", "Side: L", "Side: R", "Front: L", "Front: R", }, //123 16d
- { 16, "Front: L", "Front: R", "Front: C", "LFE", "Side: L", "Side: R", "Front: L", "Front: R", "Front: C", "LFE", "Side: L", "Side: R", "Side: L", "Side: R", "Side: L", "Side: R", }, //123 16e
- { 16, "Front: L", "Front: R", NULL, NULL, "Front: L", "Front: R", NULL, NULL, "Front: L", "Front: R", NULL, NULL, "Front: L", "Front: R", "Front: L", "Front: R", }, //123 16f
-};
-const mxf_as11_audiotracklayout_assignment Mxf_AS11_AudioTrackLayout_ChannelLayout[Mxf_AS11_AudioTrackLayout_Count]=
-{
- { 2, "C", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 1a
- { 4, "C", NULL, "C", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 1b
- { 8, "C", NULL, "C", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 1c
- { 2, "L", "R", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 2a
- { 4, "L", "R", "L", "R", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 2b
- { 8, "L", "R", "L", "R", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 2c
- { 4, "L", "R", "L", "R", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 3a
- { 8, "L", "R", "L", "R", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, //48 3b
- { 2, "EBU R 48: 4a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 4b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 4c", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 5a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 5b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 6a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 6b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 7a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 7b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 2, "EBU R 48: 8a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 8b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 8c", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 9a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 9b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 2, "EBU R 48: 10a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 48: 11a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 11b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 48: 11c", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 2, "EBU R 123: 2a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 123: 4a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 123: 4b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 4, "EBU R 123: 4c", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8c", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8d", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8e", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8f", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8g", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8h", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 8, "EBU R 123: 8i", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12a", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12b", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12c", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12d", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12e", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12f", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12g", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 12, "EBU R 123: 12h", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, },
- { 16, "L", "R", "C", "LFE", "Ls", "Rs", "L", "R", "L", "R", "C", "LFE", "Ls", "Rs", "L", "R", }, //123 16a
- { 16, "L", "R", "L", "R", "C", "LFE", "Ls", "Rs", "L", "R", "L", "R", "C", "LFE", "Ls", "Rs", }, //123 16b
- { 16, "L", "R", "L", "R", "L", "R", "C", "LFE", "Ls", "Rs", "L", "R", "C", "LFE", "Ls", "Rs", }, //123 16c
- { 16, "L", "R", "C", "LFE", "Ls", "Rs", "L", "R", "L", "R", "C", "LFE", "Ls", "Rs", "L", "R", }, //123 16d
- { 16, "L", "R", "C", "LFE", "Ls", "Rs", "L", "R", "C", "LFE", "Ls", "Rs", "L", "R", "L", "R", }, //123 16e
- { 16, "L", "R", NULL, NULL, "L", "R", NULL, NULL, "L", "R", NULL, NULL, "L", "R", "L", "R", }, //123 16f
-};
-
-
-//---------------------------------------------------------------------------
-const size_t Mxf_AS11_FpaPass_Count=3;
-const char* Mxf_AS11_FpaPass[Mxf_AS11_FpaPass_Count]=
-{
- "Yes",
- "No",
- "Not tested",
-};
-
-//---------------------------------------------------------------------------
-const size_t Mxf_AS11_SigningPresent_Count=3;
-const char* Mxf_AS11_SigningPresent[Mxf_AS11_SigningPresent_Count]=
-{
- "Yes",
- "No",
- "Signer only",
-};
-
-//---------------------------------------------------------------------------
-const size_t Mxf_AS11_3D_Type_Count=4;
-const char* Mxf_AS11_3D_Type[Mxf_AS11_3D_Type_Count]=
-{
- "Side by side",
- "Dual",
- "Left eye only",
- "Right eye only",
-};
-
-//---------------------------------------------------------------------------
-const size_t Mxf_AS11_AudioLoudnessStandard_Count=2;
-const char* Mxf_AS11_AudioLoudnessStandard[Mxf_AS11_AudioLoudnessStandard_Count]=
-{
- "",
- "EBU R 128",
-};
-
-//---------------------------------------------------------------------------
-const size_t Mxf_AS11_AudioDescriptionType_Count=2;
-const char* Mxf_AS11_AudioDescriptionType[Mxf_AS11_AudioDescriptionType_Count]=
-{
- "Control data / Narration",
- "AD Mix",
-};
-
-//---------------------------------------------------------------------------
-const size_t Mxf_AS11_OpenCaptionsType_Count=2;
-const char* Mxf_AS11_OpenCaptionsType[Mxf_AS11_OpenCaptionsType_Count]=
-{
- "Hard of Hearing",
- "Translation",
-};
-
-//---------------------------------------------------------------------------
-const size_t Mxf_AS11_SignLanguage_Count=2;
-const char* Mxf_AS11_SignLanguage[Mxf_AS11_SignLanguage_Count]=
-{
- "BSL (British Sign Language)",
- "BSL (Makaton)",
-};
-
-
-//---------------------------------------------------------------------------
-// EBU Tech 3349
-string Mxf_CameraUnitMetadata_GammaforCDL(int8u Value)
-{
- switch(Value)
- {
- case 0x00 : return "Same as Capture Gamma";
- case 0x01 : return "Scene Linear";
- case 0x02 : return "S-Log";
- case 0x03 : return "Cine-Log";
- case 0xFF : return "Undefined";
- default : return Ztring::ToZtring(Value).To_UTF8();
- }
-};
-
-//---------------------------------------------------------------------------
-// EBU Tech 3349
-string Mxf_CameraUnitMetadata_ImageSensorReadoutMode(int8u Value)
-{
- switch(Value)
- {
- case 0x00 : return "Interlaced field";
- case 0x01 : return "Interlaced frame";
- case 0x02 : return "Progressive frame ";
- case 0xFF : return "Undefined";
- default : return Ztring::ToZtring(Value).To_UTF8();
- }
-};
-
-//---------------------------------------------------------------------------
-// EBU Tech 3349
-string Mxf_CameraUnitMetadata_CaptureGammaEquation(int128u Value)
-{
- switch(Value.lo)
- {
- case 0x0401010101020000LL : return "BT.709";
- case 0x0401010101030000LL : return "SMPTE ST 240";
- default :
- {
- Ztring ValueS;
- ValueS.From_Number(Value.lo, 16);
- if (ValueS.size()<16)
- ValueS.insert(0, 16-ValueS.size(), __T('0'));
- return ValueS.To_UTF8();
- }
- }
-};
-
-//---------------------------------------------------------------------------
-extern const char* Mpegv_profile_and_level_indication_profile[];
-extern const char* Mpegv_profile_and_level_indication_level[];
-extern const char* Mpeg4v_Profile_Level(int32u Profile_Level);
-
-//---------------------------------------------------------------------------
-extern const char* AfdBarData_active_format[];
-extern const char* AfdBarData_active_format_4_3[];
-extern const char* AfdBarData_active_format_16_9[];
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Mxf::File_Mxf()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("MXF");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Mxf;
- StreamIDs_Width[0]=8;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- #endif //MEDIAINFO_DEMUX
- MustSynchronize=true;
- DataMustAlwaysBeComplete=false;
- Buffer_TotalBytes_Fill_Max=(int64u)-1; //Disabling this feature for this format, this is done in the parser
- FrameInfo.DTS=0;
- Frame_Count_NotParsedIncluded=0;
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent_Accept_Specific=true;
- #endif //MEDIAINFO_DEMUX
-
- //Temp
- RandomIndexMetadatas_AlreadyParsed=false;
- Streams_Count=(size_t)-1;
- OperationalPattern=0;
- Buffer_Begin=(int64u)-1;
- Buffer_End=0;
- Buffer_End_Unlimited=false;
- Buffer_Header_Size=0;
- Preface_Current.hi=0;
- Preface_Current.lo=0;
- IsParsingMiddle_MaxOffset=(int64u)-1;
- Track_Number_IsAvailable=false;
- IsParsingEnd=false;
- IsCheckingRandomAccessTable=false;
- IsCheckingFooterPartitionAddress=false;
- FooterPartitionAddress_Jumped=false;
- PartitionPack_Parsed=false;
- IdIsAlwaysSame_Offset=0;
- PartitionMetadata_PreviousPartition=(int64u)-1;
- PartitionMetadata_FooterPartition=(int64u)-1;
- DTS_Delay=0;
- StreamPos_StartAtOne=true;
- SDTI_TimeCode_StartTimecode_ms=(int64u)-1;
- SDTI_SizePerFrame=0;
- SDTI_IsPresent=false;
- SDTI_IsInIndexStreamOffset=true;
- SystemScheme1_TimeCodeArray_StartTimecode_ms=(int64u)-1;
- SystemScheme1_FrameRateFromDescriptor=0;
- Essences_FirstEssence_Parsed=false;
- StereoscopicPictureSubDescriptor_IsPresent=false;
- UserDefinedAcquisitionMetadata_UdamSetIdentifier_IsSony=false;
- Essences_UsedForFrameCount=(int32u)-1;
- #if MEDIAINFO_ADVANCED
- Footer_Position=(int64u)-1;
- #endif //MEDIAINFO_ADVANCED
- ReferenceFiles=NULL;
- #if MEDIAINFO_NEXTPACKET
- ReferenceFiles_IsParsing=false;
- #endif //MEDIAINFO_NEXTPACKET
- #if defined(MEDIAINFO_ANCILLARY_YES)
- Ancillary=NULL;
- Ancillary_IsBinded=false;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
-
- #if MEDIAINFO_DEMUX
- Demux_HeaderParsed=false;
- #endif //MEDIAINFO_DEMUX
-
- Partitions_Pos=0;
- Partitions_IsCalculatingHeaderByteCount=false;
- Partitions_IsCalculatingSdtiByteCount=false;
- Partitions_IsFooter=false;
-
- #if MEDIAINFO_SEEK
- IndexTables_Pos=0;
- Clip_Header_Size=0;
- Clip_Begin=(int64u)-1;
- Clip_End=0;
- OverallBitrate_IsCbrForSure=0;
- Duration_Detected=false;
- #endif //MEDIAINFO_SEEK
- #if MEDIAINFO_DEMUX
- DemuxedSampleCount_Total=(int64u)-1;
- DemuxedSampleCount_Current=(int64u)-1;
- DemuxedSampleCount_AddedToFirstFrame=0;
- DemuxedElementSize_AddedToFirstFrame=0;
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-File_Mxf::~File_Mxf()
-{
- #if defined(MEDIAINFO_REFERENCES_YES)
- delete ReferenceFiles;
- #endif //defined(MEDIAINFO_REFERENCES_YES)
- #if defined(MEDIAINFO_ANCILLARY_YES)
- if (!Ancillary_IsBinded)
- delete Ancillary;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Accept()
-{
- //Configuration
- Buffer_MaximumSize=64*1024*1024; //Some big frames are possible (e.g YUV 4:2:2 10 bits 1080p, 4K)
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Fill()
-{
- for (essences::iterator Essence=Essences.begin(); Essence!=Essences.end(); ++Essence)
- for (parsers::iterator Parser=Essence->second.Parsers.begin(); Parser!=Essence->second.Parsers.end(); ++Parser)
- Fill(*Parser);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish()
-{
- #if MEDIAINFO_NEXTPACKET && defined(MEDIAINFO_REFERENCES_YES)
- //Locators only
- if (ReferenceFiles_IsParsing)
- {
- ReferenceFiles->ParseReferences();
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return;
- #endif //MEDIAINFO_DEMUX
-
- Streams_Finish_CommercialNames();
- return;
- }
- #endif //MEDIAINFO_NEXTPACKET && defined(MEDIAINFO_REFERENCES_YES)
-
- //Per stream
- for (essences::iterator Essence=Essences.begin(); Essence!=Essences.end(); ++Essence)
- {
- if (Essence->second.Parsers.size()>1 && Essence->second.StreamKind==Stream_Audio) // Last parser is PCM, impossible to detect with another method if there is only one block
- {
- for (size_t Pos=0; Pos<Essence->second.Parsers.size()-1; Pos++)
- delete Essence->second.Parsers[Pos];
- Essence->second.Parsers.erase(Essence->second.Parsers.begin(), Essence->second.Parsers.begin()+Essence->second.Parsers.size()-1);
- Essence->second.Parsers[0]->Accept();
- Essence->second.Parsers[0]->Fill();
- }
- for (parsers::iterator Parser=Essence->second.Parsers.begin(); Parser!=Essence->second.Parsers.end(); ++Parser)
- {
- if (!(*Parser)->Status[IsFinished])
- {
- if (Config->ParseSpeed>=1)
- {
- int64u File_Size_Temp=File_Size;
- File_Size=File_Offset+Buffer_Offset+Element_Offset;
- Open_Buffer_Continue(*Parser, Buffer, 0);
- File_Size=File_Size_Temp;
- }
- Finish(*Parser);
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return;
- #endif //MEDIAINFO_DEMUX
- }
- }
- }
-
- if (!Track_Number_IsAvailable)
- {
- if (Tracks.empty())
- {
- for (essences::iterator Essence=Essences.begin(); Essence!=Essences.end(); ++Essence)
- for (parsers::iterator Parser=Essence->second.Parsers.begin(); Parser!=Essence->second.Parsers.end(); ++Parser)
- {
- Merge(*(*Parser));
-
- Ztring LawRating=(*Parser)->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=(*Parser)->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
-
- if (IsSub && StreamKind_Last!=Stream_Max && Retrieve(StreamKind_Last, StreamPos_Last, "MuxingMode").empty())
- Fill(StreamKind_Last, StreamPos_Last, "MuxingMode", "MXF");
- }
- }
- else
- for (tracks::iterator Track=Tracks.begin(); Track!=Tracks.end(); ++Track)
- {
- //Searching the corresponding Descriptor
- stream_t StreamKind=Stream_Max;
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- if (Descriptor->second.LinkedTrackID==Track->second.TrackID)
- {
- StreamKind=Descriptor->second.StreamKind;
- break;
- }
- if (StreamKind!=Stream_Max)
- {
- for (essences::iterator Essence=Essences.begin(); Essence!=Essences.end(); ++Essence)
- if (Essence->second.StreamKind==StreamKind && !Essence->second.Track_Number_IsMappedToTrack)
- {
- Track->second.TrackNumber=Essence->first;
- Essence->second.Track_Number_IsMappedToTrack=true;
- break;
- }
- }
- }
- }
-
- File_Size_Total=File_Size;
- StreamKind_Last=Stream_Max;
- StreamPos_Last=(size_t)-1;
-
- Streams_Finish_Preface(Preface_Current);
-
- //OperationalPattern
- Fill(Stream_General, 0, General_Format_Profile, Mxf_OperationalPattern(OperationalPattern));
-
- //Time codes
- if (SDTI_TimeCode_StartTimecode_ms!=(int64u)-1)
- {
- bool IsDuplicate=false;
- for (size_t Pos2=0; Pos2<Count_Get(Stream_Other); Pos2++)
- if (Retrieve(Stream_Other, Pos2, "TimeCode_Source")==__T("SDTI"))
- IsDuplicate=true;
- if (!IsDuplicate)
- {
- Fill_Flush();
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Time code");
- Fill(Stream_Other, StreamPos_Last, Other_Format, "SMPTE TC");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "SDTI");
- Fill(Stream_Other, StreamPos_Last, Other_TimeCode_FirstFrame, SDTI_TimeCode_StartTimecode.c_str());
- }
- }
- if (SystemScheme1_TimeCodeArray_StartTimecode_ms!=(int64u)-1)
- {
- bool IsDuplicate=false;
- for (size_t Pos2=0; Pos2<Count_Get(Stream_Other); Pos2++)
- if (Retrieve(Stream_Other, Pos2, "TimeCode_Source")==__T("System scheme 1"))
- IsDuplicate=true;
- if (!IsDuplicate)
- {
- Fill_Flush();
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Time code");
- Fill(Stream_Other, StreamPos_Last, Other_Format, "SMPTE TC");
- Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "System scheme 1");
- Fill(Stream_Other, StreamPos_Last, Other_TimeCode_FirstFrame, SystemScheme1_TimeCodeArray_StartTimecode.c_str());
- }
- }
-
- //Parsing locators
- Locators_Test();
- #if MEDIAINFO_NEXTPACKET
- if (Config->NextPacket_Get() && ReferenceFiles)
- {
- ReferenceFiles_IsParsing=true;
- return;
- }
- #endif //MEDIAINFO_NEXTPACKET
-
- //Sizes
- #if MEDIAINFO_ADVANCED
- if (Footer_Position!=(int64u)-1)
- Fill(Stream_General, 0, General_FooterSize, File_Size-Footer_Position);
- #endif //MEDIAINFO_ADVANCED
-
- //Commercial names
- Streams_Finish_CommercialNames();
-
- //Handling separate streams
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- if (Retrieve((stream_t)StreamKind, StreamPos, Fill_Parameter((stream_t)StreamKind, Generic_StreamSize_Encoded)).empty() && !Retrieve((stream_t)StreamKind, StreamPos, Fill_Parameter((stream_t)StreamKind, Generic_BitRate_Encoded)).empty() && !Retrieve((stream_t)StreamKind, StreamPos, Fill_Parameter((stream_t)StreamKind, Generic_Duration)).empty())
- {
- float64 BitRate_Encoded=Retrieve((stream_t)StreamKind, StreamPos, Fill_Parameter((stream_t)StreamKind, Generic_BitRate_Encoded)).To_float64();
- float64 Duration=Retrieve((stream_t)StreamKind, StreamPos, Fill_Parameter((stream_t)StreamKind, Generic_Duration)).To_float64();
- if (Duration)
- Fill((stream_t)StreamKind, StreamPos, Fill_Parameter((stream_t)StreamKind, Generic_StreamSize_Encoded), BitRate_Encoded/8*(Duration/1000), 0);
- }
-
- //File size in case of partial file analysis
- if (Config->File_IgnoreEditsBefore || Config->File_IgnoreEditsAfter!=(int64u)-1)
- {
- int64u FrameCount_FromComponent=(int64u)-1;
- for (components::iterator Component=Components.begin(); Component!=Components.end(); ++Component)
- if (FrameCount_FromComponent>Component->second.Duration)
- FrameCount_FromComponent=Component->second.Duration;
- float64 EditRate_FromTrack=DBL_MAX;
- for (tracks::iterator Track=Tracks.begin(); Track!=Tracks.end(); ++Track)
- if (EditRate_FromTrack>Track->second.EditRate)
- EditRate_FromTrack=Track->second.EditRate;
- if (FrameCount_FromComponent!=(int64u)-1 && FrameCount_FromComponent && EditRate_FromTrack!=DBL_MAX && EditRate_FromTrack)
- {
- int64u FrameCount=FrameCount_FromComponent;
- int64u File_IgnoreEditsBefore=Config->File_IgnoreEditsBefore;
- if (File_IgnoreEditsBefore && Config->File_EditRate && (EditRate_FromTrack<Config->File_EditRate*0.9 || EditRate_FromTrack>Config->File_EditRate*1.1)) //In case of problem or EditRate being sampling rate
- File_IgnoreEditsBefore=float64_int64s(((float64)File_IgnoreEditsBefore)/Config->File_EditRate*EditRate_FromTrack);
- int64u File_IgnoreEditsAfter=Config->File_IgnoreEditsAfter;
- if (File_IgnoreEditsAfter!=(int64u)-1 && Config->File_EditRate && (EditRate_FromTrack<Config->File_EditRate*0.9 || EditRate_FromTrack>Config->File_EditRate*1.1)) //In case of problem or EditRate being sampling rate
- File_IgnoreEditsAfter=float64_int64s(((float64)File_IgnoreEditsAfter)/Config->File_EditRate*EditRate_FromTrack);
- if (File_IgnoreEditsAfter<FrameCount)
- FrameCount=File_IgnoreEditsAfter;
- if (FrameCount<File_IgnoreEditsBefore)
- FrameCount=File_IgnoreEditsBefore;
- FrameCount-=File_IgnoreEditsBefore;
-
- float64 File_Size_Temp=(float64)File_Size;
- File_Size_Temp/=FrameCount_FromComponent;
- File_Size_Temp*=FrameCount;
- Fill(Stream_General, 0, General_FileSize, File_Size_Temp, 0, true);
- }
- }
-
- //System scheme 1
- for (systemschemes::iterator SystemScheme=SystemSchemes.begin(); SystemScheme!=SystemSchemes.end(); ++SystemScheme)
- {
- if (!SystemScheme->second.IsTimeCode) //Already done somewhere else
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, "ID", __T("System scheme 1-")+Ztring().From_Number((int8u)(SystemScheme->first>8))+__T('-')+Ztring().From_Number((int8u)(SystemScheme->first&0xFF)));
- Fill(Stream_Other, StreamPos_Last, "MuxingMode", "System scheme 1");
- }
- }
-
- //Primary package info
- bool PrimaryPackageIsSourcePackage=false;
- bool PrimaryPackageIsMaterialPackage=false;
- for (prefaces::iterator Preface=Prefaces.begin(); Preface!=Prefaces.end(); ++Preface)
- {
- for (packages::iterator Package=Packages.begin(); Package!=Packages.end(); ++Package)
- if (Package->first==Preface->second.PrimaryPackage)
- {
- if (Package->second.IsSourcePackage)
- PrimaryPackageIsSourcePackage=true;
- else
- PrimaryPackageIsMaterialPackage=true;
- }
- }
- if (PrimaryPackageIsSourcePackage && !PrimaryPackageIsMaterialPackage)
- {
- Fill(Stream_General, 0, "PrimaryPackage", "Source Package");
- (*Stream_More)[Stream_General][0](Ztring().From_Local("PrimaryPackage"), Info_Options)=__T("N NT");
- }
- if (!PrimaryPackageIsSourcePackage && PrimaryPackageIsMaterialPackage)
- {
- Fill(Stream_General, 0, "PrimaryPackage", "Material Package");
- (*Stream_More)[Stream_General][0](Ztring().From_Local("PrimaryPackage"), Info_Options)=__T("N NT");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Preface (const int128u PrefaceUID)
-{
- prefaces::iterator Preface=Prefaces.find(PrefaceUID);
- if (Preface==Prefaces.end())
- return;
-
- //ContentStorage
- Streams_Finish_ContentStorage(Preface->second.ContentStorage);
-
- //ContenStorage, for AS11
- Streams_Finish_ContentStorage_ForAS11(Preface->second.ContentStorage);
-
- //Identifications
- for (size_t Pos=0; Pos<Preface->second.Identifications.size(); Pos++)
- Streams_Finish_Identification(Preface->second.Identifications[Pos]);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Preface_ForTimeCode (const int128u PrefaceUID)
-{
- prefaces::iterator Preface=Prefaces.find(PrefaceUID);
- if (Preface==Prefaces.end())
- return;
-
- //ContentStorage
- Streams_Finish_ContentStorage_ForTimeCode(Preface->second.ContentStorage);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_ContentStorage (const int128u ContentStorageUID)
-{
- contentstorages::iterator ContentStorage=ContentStorages.find(ContentStorageUID);
- if (ContentStorage==ContentStorages.end())
- return;
-
- for (size_t Pos=0; Pos<ContentStorage->second.Packages.size(); Pos++)
- Streams_Finish_Package(ContentStorage->second.Packages[Pos]);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_ContentStorage_ForTimeCode (const int128u ContentStorageUID)
-{
- contentstorages::iterator ContentStorage=ContentStorages.find(ContentStorageUID);
- if (ContentStorage==ContentStorages.end())
- return;
-
- //Searching the right Time code track first TODO: this is an hack in order to get material or source time code, we need to have something more conform in the future
- // Material Package then Source Package
- for (size_t Pos=0; Pos<ContentStorage->second.Packages.size(); Pos++)
- {
- packages::iterator Package=Packages.find(ContentStorage->second.Packages[Pos]);
- if (Package!=Packages.end() && !Package->second.IsSourcePackage)
- Streams_Finish_Package_ForTimeCode(ContentStorage->second.Packages[Pos]);
- }
- for (size_t Pos=0; Pos<ContentStorage->second.Packages.size(); Pos++)
- {
- packages::iterator Package=Packages.find(ContentStorage->second.Packages[Pos]);
- if (Package!=Packages.end() && Package->second.IsSourcePackage)
- Streams_Finish_Package_ForTimeCode(ContentStorage->second.Packages[Pos]);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_ContentStorage_ForAS11 (const int128u ContentStorageUID)
-{
- contentstorages::iterator ContentStorage=ContentStorages.find(ContentStorageUID);
- if (ContentStorage==ContentStorages.end())
- return;
-
- for (size_t Pos=0; Pos<ContentStorage->second.Packages.size(); Pos++)
- Streams_Finish_Package_ForAS11(ContentStorage->second.Packages[Pos]);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Package (const int128u PackageUID)
-{
- packages::iterator Package=Packages.find(PackageUID);
- if (Package==Packages.end() || !Package->second.IsSourcePackage)
- return;
-
- for (size_t Pos=0; Pos<Package->second.Tracks.size(); Pos++)
- Streams_Finish_Track(Package->second.Tracks[Pos]);
-
- Streams_Finish_Descriptor(Package->second.Descriptor, PackageUID);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Package_ForTimeCode (const int128u PackageUID)
-{
- packages::iterator Package=Packages.find(PackageUID);
- if (Package==Packages.end())
- return;
-
- for (size_t Pos=0; Pos<Package->second.Tracks.size(); Pos++)
- Streams_Finish_Track_ForTimeCode(Package->second.Tracks[Pos], Package->second.IsSourcePackage);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Package_ForAS11 (const int128u PackageUID)
-{
- packages::iterator Package=Packages.find(PackageUID);
- if (Package==Packages.end() || Package->second.IsSourcePackage)
- return;
-
- for (size_t Pos=0; Pos<Package->second.Tracks.size(); Pos++)
- Streams_Finish_Track_ForAS11(Package->second.Tracks[Pos]);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Track(const int128u TrackUID)
-{
- tracks::iterator Track=Tracks.find(TrackUID);
- if (Track==Tracks.end() || Track->second.Stream_Finish_Done)
- return;
-
- StreamKind_Last=Stream_Max;
- StreamPos_Last=(size_t)-1;
-
- Streams_Finish_Essence(Track->second.TrackNumber, TrackUID);
-
- //Sequence
- Streams_Finish_Component(Track->second.Sequence, Track->second.EditRate_Real?Track->second.EditRate_Real:Track->second.EditRate, Track->second.TrackID, Track->second.Origin);
-
- //Done
- Track->second.Stream_Finish_Done=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Track_ForTimeCode(const int128u TrackUID, bool IsSourcePackage)
-{
- tracks::iterator Track=Tracks.find(TrackUID);
- if (Track==Tracks.end() || Track->second.Stream_Finish_Done)
- return;
-
- StreamKind_Last=Stream_Max;
- StreamPos_Last=(size_t)-1;
-
- //Sequence
- Streams_Finish_Component_ForTimeCode(Track->second.Sequence, Track->second.EditRate_Real?Track->second.EditRate_Real:Track->second.EditRate, Track->second.TrackID, Track->second.Origin, IsSourcePackage);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Track_ForAS11(const int128u TrackUID)
-{
- tracks::iterator Track=Tracks.find(TrackUID);
- if (Track==Tracks.end() || Track->second.Stream_Finish_Done)
- return;
-
- StreamKind_Last=Stream_Max;
- StreamPos_Last=(size_t)-1;
-
- //Sequence
- Streams_Finish_Component_ForAS11(Track->second.Sequence, Track->second.EditRate_Real?Track->second.EditRate_Real:Track->second.EditRate, Track->second.TrackID, Track->second.Origin);
-
- //TrackName
- if (StreamKind_Last!=Stream_Max && !Track->second.TrackName.empty())
- Fill(StreamKind_Last, StreamPos_Last, "Title", Track->second.TrackName);
-
- //Done
- Track->second.Stream_Finish_Done=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Essence(int32u EssenceUID, int128u TrackUID)
-{
- essences::iterator Essence=Essences.find(EssenceUID);
- if (Essence==Essences.end() || Essence->second.Stream_Finish_Done)
- return;
-
- if (Essence->second.Parsers.size()!=1)
- return;
- parsers::iterator Parser=Essence->second.Parsers.begin();
-
- //Descriptive Metadata
- std::vector<int128u> DMScheme1s_List;
- int32u TrackID=(int32u)-1;
- tracks::iterator Track=Tracks.find(TrackUID);
- if (Track!=Tracks.end())
- TrackID=Track->second.TrackID;
-
- for (dmsegments::iterator DMSegment=DMSegments.begin(); DMSegment!=DMSegments.end(); ++DMSegment)
- for (size_t Pos=0; Pos<DMSegment->second.TrackIDs.size(); Pos++)
- if (DMSegment->second.TrackIDs[Pos]==TrackID)
- DMScheme1s_List.push_back(DMSegment->second.Framework);
-
- if (Config->ParseSpeed<1.0 && !(*Parser)->Status[IsFinished])
- {
- Fill(*Parser);
- (*Parser)->Open_Buffer_Unsynch();
- }
- Finish(*Parser);
- StreamKind_Last=Stream_Max;
- if ((*Parser)->Count_Get(Stream_Video))
- Stream_Prepare(Stream_Video);
- else if ((*Parser)->Count_Get(Stream_Audio))
- Stream_Prepare(Stream_Audio);
- else if ((*Parser)->Count_Get(Stream_Text))
- Stream_Prepare(Stream_Text);
- else if ((*Parser)->Count_Get(Stream_Other))
- Stream_Prepare(Stream_Other);
- else if (Essence->second.StreamKind!=Stream_Max)
- Stream_Prepare(Essence->second.StreamKind);
- else
- {
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- if (Descriptor->second.LinkedTrackID==Essence->second.TrackID)
- {
- if (Descriptor->second.StreamKind!=Stream_Max)
- {
- Stream_Prepare(Descriptor->second.StreamKind);
- Descriptor->second.StreamPos=StreamPos_Last;
- }
- break;
- }
- if (StreamKind_Last==Stream_Max)
- return; //Not found
- }
- if (IsSub)
- Fill(StreamKind_Last, StreamPos_Last, "MuxingMode", "MXF");
-
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- if (Descriptor->second.LinkedTrackID==Essence->second.TrackID)
- {
- if (Descriptor->second.StreamKind!=Stream_Max)
- Descriptor->second.StreamPos=StreamPos_Last;
- break;
- }
-
- for (std::map<std::string, Ztring>::iterator Info=Essence->second.Infos.begin(); Info!=Essence->second.Infos.end(); ++Info)
- Fill(StreamKind_Last, StreamPos_Last, Info->first.c_str(), Info->second, true);
- if (MxfTimeCodeForDelay.RoundedTimecodeBase && MxfTimeCodeForDelay.StartTimecode!=(int64u)-1)
- {
- float64 TimeCode_StartTimecode_Temp=((float64)(MxfTimeCodeForDelay.StartTimecode+Config->File_IgnoreEditsBefore))/MxfTimeCodeForDelay.RoundedTimecodeBase;
- if (MxfTimeCodeForDelay.DropFrame)
- {
- TimeCode_StartTimecode_Temp*=1001;
- TimeCode_StartTimecode_Temp/=1000;
- }
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay), TimeCode_StartTimecode_Temp*1000, 0, true);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay_Source), "Container");
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay_DropFrame), MxfTimeCodeForDelay.DropFrame?"Yes":"No");
-
- //TimeCode TC(MxfTimeCodeForDelay.StartTimecode, MxfTimeCodeForDelay.RoundedTimecodeBase, MxfTimeCodeForDelay.DropFrame);
- //Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_TimeCode_FirstFrame), TC.ToString().c_str());
- //Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_TimeCode_Source), "Time code track (stripped)");
- }
- if (SDTI_TimeCode_StartTimecode_ms!=(int64u)-1)
- {
- Fill(StreamKind_Last, StreamPos_Last, "Delay_SDTI", SDTI_TimeCode_StartTimecode_ms);
- if (StreamKind_Last!=Stream_Max)
- (*Stream_More)[StreamKind_Last][StreamPos_Last](Ztring().From_Local("Delay_SDTI"), Info_Options)=__T("N NT");
-
- //Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_TimeCode_FirstFrame), SDTI_TimeCode_StartTimecode.c_str());
- //Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_TimeCode_Source), "SDTI");
- }
- if (SystemScheme1_TimeCodeArray_StartTimecode_ms!=(int64u)-1)
- {
- Fill(StreamKind_Last, StreamPos_Last, "Delay_SystemScheme1", SystemScheme1_TimeCodeArray_StartTimecode_ms);
- if (StreamKind_Last!=Stream_Max)
- (*Stream_More)[StreamKind_Last][StreamPos_Last](Ztring().From_Local("Delay_SystemScheme1"), Info_Options)=__T("N NT");
-
- //Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_TimeCode_FirstFrame), SystemScheme1_TimeCodeArray_StartTimecode.c_str());
- //Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_TimeCode_Source), "System scheme 1");
- }
-
- //Special case - Multiple sub-streams in a stream
- if (((*Parser)->Retrieve(Stream_General, 0, General_Format)==__T("ChannelGrouping") || (*Parser)->Count_Get(StreamKind_Last)>1) && (*Parser)->Count_Get(Stream_Audio))
- {
- //Before
- if (StreamKind_Last==Stream_Audio)
- {
- Clear(Stream_Audio, StreamPos_Last, Audio_Format_Settings_Sign);
- }
- ZtringList StreamSave; StreamSave.Write((*File__Analyze::Stream)[StreamKind_Last][StreamPos_Last].Read());
- ZtringListList StreamMoreSave; StreamMoreSave.Write((*Stream_More)[StreamKind_Last][StreamPos_Last].Read());
-
- //Erasing former streams data
- stream_t NewKind=StreamKind_Last;
- size_t NewPos1;
- Ztring ID;
- if ((*Parser)->Retrieve(Stream_General, 0, General_Format)==__T("ChannelGrouping"))
- {
- //Searching second stream
- size_t StreamPos_Difference=Essence->second.StreamPos-Essence->second.StreamPos_Initial;
- essences::iterator Essence1=Essence;
- --Essence1;
- Essence->second.StreamPos=Essence1->second.StreamPos;
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- {
- if (Descriptor->second.LinkedTrackID==Essence1->second.TrackID)
- Descriptor->second.StreamPos=Essence1->second.StreamPos;
- if (Descriptor->second.LinkedTrackID==Essence->second.TrackID)
- Descriptor->second.StreamPos=Essence->second.StreamPos;
- }
-
- //Removing the 2 corresponding streams
- NewPos1=(Essence->second.StreamPos_Initial/2)*2+StreamPos_Difference;
- size_t NewPos2=NewPos1+1;
- ID=Ztring::ToZtring(Essence1->second.TrackID)+__T(" / ")+Ztring::ToZtring(Essence->second.TrackID);
-
- Stream_Erase(NewKind, NewPos2);
- Stream_Erase(NewKind, NewPos1);
- }
- else
- {
- NewPos1=StreamPos_Last;
- ID=Ztring::ToZtring(Essence->second.TrackID);
- Stream_Erase(NewKind, NewPos1);
- }
-
- //After
- for (size_t StreamPos=0; StreamPos<(*Parser)->Count_Get(NewKind); StreamPos++)
- {
- Stream_Prepare(NewKind, NewPos1+StreamPos);
- Merge(*(*Parser), StreamKind_Last, StreamPos, StreamPos_Last);
- Ztring Parser_ID=Retrieve(StreamKind_Last, StreamPos_Last, General_ID);
- Fill(StreamKind_Last, StreamPos_Last, General_ID, ID+(Parser_ID.empty()?Ztring():(__T("-")+Parser_ID)), true);
- for (size_t Pos=0; Pos<StreamSave.size(); Pos++)
- {
- if (Pos==Fill_Parameter(StreamKind_Last, Generic_BitRate) && (*Parser)->Count_Get(NewKind)>1 && (!StreamSave[Pos].empty() || StreamPos))
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_BitRate_Encoded), StreamPos?0:(StreamSave[Pos].To_int64u()*2));
- else if (Pos==Fill_Parameter(StreamKind_Last, Generic_StreamSize) && (*Parser)->Count_Get(NewKind)>1 && (!StreamSave[Pos].empty() || StreamPos))
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_StreamSize_Encoded), StreamPos?0:(StreamSave[Pos].To_int64u()*2));
- else if (Retrieve(StreamKind_Last, StreamPos_Last, Pos).empty())
- Fill(StreamKind_Last, StreamPos_Last, Pos, StreamSave[Pos]);
- }
- for (size_t Pos=0; Pos<StreamMoreSave.size(); Pos++)
- {
- Fill(StreamKind_Last, StreamPos_Last, StreamMoreSave(Pos, 0).To_Local().c_str(), StreamMoreSave(Pos, 1));
- if (StreamMoreSave(Pos, Info_Name)==__T("Delay_SDTI"))
- (*Stream_More)[StreamKind_Last][StreamPos_Last](Ztring().From_Local("Delay_SDTI"), Info_Options)=__T("N NT");
- if (StreamMoreSave(Pos, Info_Name)==__T("Delay_SystemScheme1"))
- (*Stream_More)[StreamKind_Last][StreamPos_Last](Ztring().From_Local("Delay_SystemScheme1"), Info_Options)=__T("N NT");
- }
-
- for (size_t Pos=0; Pos<DMScheme1s_List.size(); Pos++)
- {
- dmscheme1s::iterator DMScheme1=DMScheme1s.find(DMScheme1s_List[Pos]);
- if (DMScheme1!=DMScheme1s.end())
- {
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Language), DMScheme1->second.PrimaryExtendedSpokenLanguage, true);
- }
- }
- }
-
- //Positioning other streams
- for (essences::iterator Essence_Temp=Essence; Essence_Temp!=Essences.end(); ++Essence_Temp)
- if (*(Essence_Temp->second.Parsers.begin()) && (*(Essence_Temp->second.Parsers.begin()))->Count_Get(Stream_Audio))
- {
- Essence_Temp->second.StreamPos-=2; //ChannelGrouping
- Essence_Temp->second.StreamPos+=(*(Essence_Temp->second.Parsers.begin()))->Count_Get(Stream_Audio);
- }
- }
- else //Normal
- {
- //From descriptor
- if ((*Parser)->Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("PCM")) // MXF handles channel count only with PCM, not with compressed data
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- if (Descriptor->second.LinkedTrackID==Essence->second.TrackID && Descriptor->second.StreamKind==Stream_Audio && StreamKind_Last==Stream_Audio && Descriptor->second.ChannelCount!=(int32u)-1)
- {
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Descriptor->second.ChannelCount);
- break;
- }
-
- Merge(*(*Parser), StreamKind_Last, 0, StreamPos_Last);
-
- Ztring LawRating=(*Parser)->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=(*Parser)->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
-
- for (size_t Pos=0; Pos<DMScheme1s_List.size(); Pos++)
- {
- dmscheme1s::iterator DMScheme1=DMScheme1s.find(DMScheme1s_List[Pos]);
- if (DMScheme1!=DMScheme1s.end())
- {
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Language), DMScheme1->second.PrimaryExtendedSpokenLanguage, true);
- }
- }
-
- for (size_t StreamPos=1; StreamPos<(*Parser)->Count_Get(StreamKind_Last); StreamPos++) //If more than 1 stream, TODO: better way to do this
- {
- Stream_Prepare(StreamKind_Last);
- Merge(*(*Parser), StreamKind_Last, StreamPos, StreamPos_Last);
- }
- }
-
- if (Retrieve(StreamKind_Last, StreamPos_Last, General_ID).empty() || StreamKind_Last==Stream_Text || StreamKind_Last==Stream_Other) //TODO: better way to do detect subID
- {
- //Looking for Material package TrackID
- int32u TrackID=(int32u)-1;
- for (packages::iterator SourcePackage=Packages.begin(); SourcePackage!=Packages.end(); ++SourcePackage)
- if (SourcePackage->second.PackageUID.hi.hi) //Looking fo a SourcePackage with PackageUID only
- {
- //Testing if the Track is in this SourcePackage
- for (size_t Tracks_Pos=0; Tracks_Pos<SourcePackage->second.Tracks.size(); Tracks_Pos++)
- if (SourcePackage->second.Tracks[Tracks_Pos]==TrackUID)
- {
- tracks::iterator Track=Tracks.find(SourcePackage->second.Tracks[Tracks_Pos]);
- if (Track!=Tracks.end())
- TrackID=Track->second.TrackID;
- }
- }
-
- Ztring ID;
- Ztring ID_String;
- if (TrackID!=(int32u)-1)
- ID=Ztring::ToZtring(TrackID);
- else if (Tracks[TrackUID].TrackID!=(int32u)-1)
- ID=Ztring::ToZtring(Tracks[TrackUID].TrackID);
- else
- {
- ID=Ztring::ToZtring(Essence->first);
- ID_String=Ztring::ToZtring(Essence->first, 16);
- }
- if (!ID.empty())
- {
- for (size_t StreamPos=StreamPos_Last-((*Parser)->Count_Get(StreamKind_Last)?((*Parser)->Count_Get(StreamKind_Last)-1):0); StreamPos<=StreamPos_Last; StreamPos++) //If more than 1 stream
- {
- Ztring ID_Temp(ID);
- if (!Retrieve(StreamKind_Last, StreamPos, General_ID).empty())
- {
- ID_Temp+=__T("-");
- ID_Temp+=Retrieve(StreamKind_Last, StreamPos, General_ID);
- }
- Fill(StreamKind_Last, StreamPos, General_ID, ID_Temp, true);
- if (!ID_String.empty())
- Fill(StreamKind_Last, StreamPos, General_ID_String, ID_String, true);
- }
- }
- if (!Tracks[TrackUID].TrackName.empty())
- {
- for (size_t StreamPos=StreamPos_Last-((*Parser)->Count_Get(StreamKind_Last)?((*Parser)->Count_Get(StreamKind_Last)-1):0); StreamPos<=StreamPos_Last; StreamPos++) //If more than 1 stream
- Fill(StreamKind_Last, StreamPos, "Title", Tracks[TrackUID].TrackName);
- }
- }
-
- //Special case - DV
- #if defined(MEDIAINFO_DVDIF_YES)
- if (StreamKind_Last==Stream_Video && Retrieve(Stream_Video, StreamPos_Last, Video_Format)==__T("DV"))
- {
- if (Retrieve(Stream_General, 0, General_Recorded_Date).empty())
- Fill(Stream_General, 0, General_Recorded_Date, (*Parser)->Retrieve(Stream_General, 0, General_Recorded_Date));
-
- //Video and Audio are together
- size_t Audio_Count=(*Parser)->Count_Get(Stream_Audio);
- for (size_t Audio_Pos=0; Audio_Pos<Audio_Count; Audio_Pos++)
- {
- Fill_Flush();
- Stream_Prepare(Stream_Audio);
- size_t Pos=Count_Get(Stream_Audio)-1;
- (*Parser)->Finish();
- if (MxfTimeCodeForDelay.RoundedTimecodeBase && MxfTimeCodeForDelay.StartTimecode!=(int64u)-1)
- {
- float64 TimeCode_StartTimecode_Temp=((float64)(MxfTimeCodeForDelay.StartTimecode+Config->File_IgnoreEditsBefore))/MxfTimeCodeForDelay.RoundedTimecodeBase;
- if (MxfTimeCodeForDelay.DropFrame)
- {
- TimeCode_StartTimecode_Temp*=1001;
- TimeCode_StartTimecode_Temp/=1000;
- }
- Fill(Stream_Audio, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay), TimeCode_StartTimecode_Temp*1000, 0, true);
- Fill(Stream_Audio, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay_Source), "Container");
- }
- Merge(*(*Parser), Stream_Audio, Audio_Pos, StreamPos_Last);
- if (Retrieve(Stream_Audio, Pos, Audio_MuxingMode).empty())
- Fill(Stream_Audio, Pos, Audio_MuxingMode, Retrieve(Stream_Video, Essence->second.StreamPos-(StreamPos_StartAtOne?1:0), Video_Format), true);
- else
- Fill(Stream_Audio, Pos, Audio_MuxingMode, Retrieve(Stream_Video, Essence->second.StreamPos-(StreamPos_StartAtOne?1:0), Video_Format)+__T(" / ")+Retrieve(Stream_Audio, Pos, Audio_MuxingMode), true);
- Fill(Stream_Audio, Pos, Audio_Duration, Retrieve(Stream_Video, Essence->second.StreamPos-(StreamPos_StartAtOne?1:0), Video_Duration));
- Fill(Stream_Audio, Pos, Audio_StreamSize_Encoded, 0); //Included in the DV stream size
- Ztring ID=Retrieve(Stream_Audio, Pos, Audio_ID);
- Fill(Stream_Audio, Pos, Audio_ID, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_ID)+__T("-")+ID, true);
- Fill(Stream_Audio, Pos, Audio_ID_String, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_ID_String)+__T("-")+ID, true);
- Fill(Stream_Audio, Pos, Audio_Title, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Title), true);
- }
-
- StreamKind_Last=Stream_Video;
- StreamPos_Last=Essence->second.StreamPos-(StreamPos_StartAtOne?1:0);
- }
- #endif
-
- //Special case - MPEG Video + Captions
- if (StreamKind_Last==Stream_Video && (*Parser)->Count_Get(Stream_Text))
- {
- //Video and Text are together
- size_t Parser_Text_Count=(*Parser)->Count_Get(Stream_Text);
- for (size_t Parser_Text_Pos=0; Parser_Text_Pos<Parser_Text_Count; Parser_Text_Pos++)
- {
- size_t StreamPos_Video=StreamPos_Last;
- Fill_Flush();
- Stream_Prepare(Stream_Text);
- (*Parser)->Finish();
- if (MxfTimeCodeForDelay.RoundedTimecodeBase && MxfTimeCodeForDelay.StartTimecode!=(int64u)-1)
- {
- float64 TimeCode_StartTimecode_Temp=((float64)(MxfTimeCodeForDelay.StartTimecode+Config->File_IgnoreEditsBefore))/MxfTimeCodeForDelay.RoundedTimecodeBase;
- if (MxfTimeCodeForDelay.DropFrame)
- {
- TimeCode_StartTimecode_Temp*=1001;
- TimeCode_StartTimecode_Temp/=1000;
- }
- Fill(Stream_Text, Parser_Text_Pos, Fill_Parameter(StreamKind_Last, Generic_Delay), TimeCode_StartTimecode_Temp*1000, 0, true);
- Fill(Stream_Text, Parser_Text_Pos, Fill_Parameter(StreamKind_Last, Generic_Delay_Source), "Container");
- }
- Merge(*(*Parser), Stream_Text, Parser_Text_Pos, StreamPos_Last);
- Fill(Stream_Text, StreamPos_Last, Text_Duration, Retrieve(Stream_Video, StreamPos_Video, Video_Duration));
- Ztring ID=Retrieve(Stream_Text, StreamPos_Last, Text_ID);
- if (Retrieve(Stream_Text, StreamPos_Last, Text_MuxingMode).find(__T("Ancillary"))!=string::npos)
- {
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- if (Descriptor->second.Type==descriptor::Type_AncPackets)
- {
- Fill(Stream_Text, StreamPos_Last, Text_ID, Ztring::ToZtring(Descriptor->second.LinkedTrackID)+__T("-")+ID, true);
- Fill(Stream_Text, StreamPos_Last, Text_ID_String, Ztring::ToZtring(Descriptor->second.LinkedTrackID)+__T("-")+ID, true);
- Fill(Stream_Text, StreamPos_Last, Text_Title, Tracks[TrackUID].TrackName, true);
- break;
- }
- }
- else
- {
- Fill(Stream_Text, StreamPos_Last, Text_ID, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_ID)+__T("-")+ID, true);
- Fill(Stream_Text, StreamPos_Last, Text_ID_String, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_ID_String)+__T("-")+ID, true);
- Fill(Stream_Text, StreamPos_Last, Text_Title, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Title), true);
- }
-
- for (size_t Pos=0; Pos<DMScheme1s_List.size(); Pos++)
- {
- dmscheme1s::iterator DMScheme1=DMScheme1s.find(DMScheme1s_List[Pos]);
- if (DMScheme1!=DMScheme1s.end())
- {
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Language), DMScheme1->second.PrimaryExtendedSpokenLanguage, true);
- }
- }
- }
-
- Ztring LawRating=(*Parser)->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=(*Parser)->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
-
- StreamKind_Last=Stream_Video;
- StreamPos_Last=Essence->second.StreamPos-(StreamPos_StartAtOne?1:0);
- }
-
- //Stream size
- if (StreamKind_Last!=Stream_Max && Count_Get(Stream_Video)+Count_Get(Stream_Audio)==1 && Essence->second.Stream_Size!=(int64u)-1)
- {
- //TODO: Stream_Size is present only if there is one stream, so it works in most cases. We should find a better way.
- int64u Stream_Size=Essence->second.Stream_Size;
- if (Config->File_IgnoreEditsBefore || Config->File_IgnoreEditsAfter!=(int64u)-1)
- {
- int64u FrameCount_FromComponent=(int64u)-1;
- for (components::iterator Component=Components.begin(); Component!=Components.end(); ++Component)
- if (FrameCount_FromComponent>Component->second.Duration)
- FrameCount_FromComponent=Component->second.Duration;
- float64 EditRate_FromTrack=DBL_MAX;
- for (tracks::iterator Track=Tracks.begin(); Track!=Tracks.end(); ++Track)
- if (EditRate_FromTrack>Track->second.EditRate)
- EditRate_FromTrack=Track->second.EditRate;
- if (FrameCount_FromComponent!=(int64u)-1 && FrameCount_FromComponent && EditRate_FromTrack!=DBL_MAX && EditRate_FromTrack)
- {
- int64u FrameCount=FrameCount_FromComponent;
- int64u File_IgnoreEditsBefore=Config->File_IgnoreEditsBefore;
- if (File_IgnoreEditsBefore && Config->File_EditRate && (EditRate_FromTrack<Config->File_EditRate*0.9 || EditRate_FromTrack>Config->File_EditRate*1.1)) //In case of problem or EditRate being sampling rate
- File_IgnoreEditsBefore=float64_int64s(((float64)File_IgnoreEditsBefore)/Config->File_EditRate*EditRate_FromTrack);
- int64u File_IgnoreEditsAfter=Config->File_IgnoreEditsAfter;
- if (File_IgnoreEditsAfter!=(int64u)-1 && Config->File_EditRate && (EditRate_FromTrack<Config->File_EditRate*0.9 || EditRate_FromTrack>Config->File_EditRate*1.1)) //In case of problem or EditRate being sampling rate
- File_IgnoreEditsAfter=float64_int64s(((float64)File_IgnoreEditsAfter)/Config->File_EditRate*EditRate_FromTrack);
- if (File_IgnoreEditsAfter<FrameCount)
- FrameCount=File_IgnoreEditsAfter;
- if (FrameCount<File_IgnoreEditsBefore)
- FrameCount=File_IgnoreEditsBefore;
- FrameCount-=File_IgnoreEditsBefore;
-
- float64 Stream_Size_Temp=(float64)Stream_Size;
- Stream_Size_Temp/=FrameCount_FromComponent;
- Stream_Size_Temp*=FrameCount;
- Stream_Size=float64_int64s(Stream_Size_Temp);
- }
- }
-
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_StreamSize), Stream_Size);
- }
-
- //Done
- Essence->second.Stream_Finish_Done=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Descriptor(const int128u DescriptorUID, const int128u PackageUID)
-{
- descriptors::iterator Descriptor=Descriptors.find(DescriptorUID);
- if (Descriptor==Descriptors.end())
- return;
-
- //Subs
- if (Descriptor->second.Type==descriptor::type_Mutiple)
- {
- for (size_t Pos=0; Pos<Descriptor->second.SubDescriptors.size(); Pos++)
- Streams_Finish_Descriptor(Descriptor->second.SubDescriptors[Pos], PackageUID);
- return; //Is not a real descriptor
- }
-
- StreamKind_Last=Descriptor->second.StreamKind;
- StreamPos_Last=Descriptor->second.StreamPos;
- if (StreamPos_Last==(size_t)-1)
- {
- for (size_t Pos=0; Pos<Count_Get(StreamKind_Last); Pos++)
- {
- Ztring ID=Retrieve(StreamKind_Last, Pos, General_ID);
- size_t ID_Dash_Pos=ID.find(__T('-'));
- if (ID_Dash_Pos!=string::npos)
- ID.resize(ID_Dash_Pos);
- if (Ztring::ToZtring(Descriptor->second.LinkedTrackID)==ID)
- {
- StreamPos_Last=Pos;
- break;
- }
- }
- }
- if (StreamPos_Last==(size_t)-1)
- {
- if (Descriptors.size()==1)
- StreamPos_Last=0;
- else if (Descriptor->second.LinkedTrackID!=(int32u)-1)
- {
- //Workaround for a specific file with same ID
- if (!Locators.empty())
- for (descriptors::iterator Descriptor1=Descriptors.begin(); Descriptor1!=Descriptor; ++Descriptor1)
- if (Descriptor1->second.LinkedTrackID==Descriptor->second.LinkedTrackID)
- {
- IdIsAlwaysSame_Offset++;
- break;
- }
-
- Stream_Prepare(Descriptor->second.StreamKind);
- Fill(StreamKind_Last, StreamPos_Last, General_ID, Descriptor->second.LinkedTrackID+IdIsAlwaysSame_Offset);
- }
- else
- {
- //Looking for Material package TrackID
- packages::iterator SourcePackage=Packages.find(PackageUID);
- //We have the the right PackageUID, looking for SourceClip from Sequence from Track from MaterialPackage
- for (components::iterator SourceClip=Components.begin(); SourceClip!=Components.end(); ++SourceClip)
- if (SourceClip->second.SourcePackageID.lo==SourcePackage->second.PackageUID.lo) //int256u doesn't support yet ==
- {
- //We have the right SourceClip, looking for the Sequence from Track from MaterialPackage
- for (components::iterator Sequence=Components.begin(); Sequence!=Components.end(); ++Sequence)
- for (size_t StructuralComponents_Pos=0; StructuralComponents_Pos<Sequence->second.StructuralComponents.size(); StructuralComponents_Pos++)
- if (Sequence->second.StructuralComponents[StructuralComponents_Pos]==SourceClip->first)
- {
- //We have the right Sequence, looking for Track from MaterialPackage
- for (tracks::iterator Track=Tracks.begin(); Track!=Tracks.end(); ++Track)
- {
- if (Track->second.Sequence==Sequence->first)
- {
- Ztring ID=Ztring::ToZtring(Track->second.TrackID);
- StreamKind_Last=Stream_Max;
- StreamPos_Last=(size_t)-1;
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- if (ID==Retrieve((stream_t)StreamKind, StreamPos, General_ID))
- {
- StreamKind_Last=(stream_t)StreamKind;
- StreamPos_Last=(stream_t)StreamPos;
- }
- if (StreamPos_Last==(size_t)-1 && !Descriptor->second.Locators.empty()) //TODO: 1 file has a TimeCode stream linked to a video stream, and it is displayed if Locator test is removed. Why? AS02 files streams are not filled if I remove completely this block, why?
- {
- if (Descriptor->second.StreamKind!=Stream_Max)
- Stream_Prepare(Descriptor->second.StreamKind);
- if (Track->second.TrackID!=(int32u)-1)
- {
- if (Descriptor->second.LinkedTrackID==(int32u)-1)
- Descriptor->second.LinkedTrackID=Track->second.TrackID;
- if (Descriptor->second.StreamKind!=Stream_Max)
- {
- Fill(StreamKind_Last, StreamPos_Last, General_ID, ID);
- Fill(StreamKind_Last, StreamPos_Last, "Title", Track->second.TrackName);
- }
- }
- }
- }
- }
- }
- }
- }
- }
-
- //Locators
- size_t Before_Count[Stream_Max];
- for (size_t Pos=0; Pos<Stream_Max; Pos++)
- Before_Count[Pos]=(size_t)-1;
- Before_Count[Stream_Video]=Count_Get(Stream_Video);
- Before_Count[Stream_Audio]=Count_Get(Stream_Audio);
- Before_Count[Stream_Text]=Count_Get(Stream_Text);
- for (size_t Locator_Pos=0; Locator_Pos<Descriptor->second.Locators.size(); Locator_Pos++)
- {
- //Locator
- Streams_Finish_Locator(DescriptorUID, Descriptor->second.Locators[Locator_Pos]);
- }
-
- if (StreamPos_Last==(size_t)-1 && Essences.size()==1)
- {
- //Only one essence, there is sometimes no LinkedTrackID
- if (Count_Get(Stream_Video)==1)
- {
- StreamKind_Last=Stream_Video;
- StreamPos_Last=0;
- }
- else if (Count_Get(Stream_Audio)==1)
- {
- StreamKind_Last=Stream_Audio;
- StreamPos_Last=0;
- }
- }
-
- if (StreamKind_Last!=Stream_Max && StreamPos_Last!=(size_t)-1)
- {
- //Handling buggy files
- if (Descriptor->second.ScanType==__T("Interlaced") && Descriptor->second.Height==1152 && Descriptor->second.Height_Display==1152 && Descriptor->second.Width==720) //Height value is height of the frame instead of the field
- Descriptor->second.Height_Display/=2;
-
- //ID
- if (Descriptor->second.LinkedTrackID!=(int32u)-1 && Retrieve(StreamKind_Last, StreamPos_Last, General_ID).empty())
- {
- for (size_t StreamKind=0; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=Before_Count[StreamKind]; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- {
- Ztring ID=Retrieve((stream_t)StreamKind, StreamPos, General_ID);
- if (ID.empty() || Config->File_ID_OnlyRoot_Get())
- Fill((stream_t)StreamKind, StreamPos, General_ID, Descriptor->second.LinkedTrackID, 10, true);
- else
- Fill((stream_t)StreamKind, StreamPos, General_ID, Ztring::ToZtring(Descriptor->second.LinkedTrackID)+ID, true);
- }
- }
-
- if (Descriptor->second.Width!=(int32u)-1 && Retrieve(Stream_Video, StreamPos_Last, Video_Width).empty())
- Fill(Stream_Video, StreamPos_Last, Video_Width, Descriptor->second.Width, 10, true);
- if (Descriptor->second.Width_Display!=(int32u)-1 && Descriptor->second.Width_Display!=Retrieve(Stream_Video, StreamPos_Last, Video_Width).To_int32u())
- {
- Fill(Stream_Video, StreamPos_Last, Video_Width_Original, Retrieve(Stream_Video, StreamPos_Last, Video_Width), true);
- if (Retrieve(Stream_Video, StreamPos_Last, Video_PixelAspectRatio_Original).empty())
- Fill(Stream_Video, StreamPos_Last, Video_PixelAspectRatio_Original, Retrieve(Stream_Video, StreamPos_Last, Video_PixelAspectRatio), true);
- Clear(Stream_Video, StreamPos_Last, Video_PixelAspectRatio);
- Fill(Stream_Video, StreamPos_Last, Video_Width, Descriptor->second.Width_Display, 10, true);
- if (Descriptor->second.Width_Display_Offset!=(int32u)-1)
- Fill(Stream_Video, StreamPos_Last, Video_Width_Offset, Descriptor->second.Width_Display_Offset, 10, true);
- }
- if (Descriptor->second.Height!=(int32u)-1 && Retrieve(Stream_Video, StreamPos_Last, Video_Height).empty())
- Fill(Stream_Video, StreamPos_Last, Video_Height, Descriptor->second.Height, 10, true);
- if (Descriptor->second.Height_Display!=(int32u)-1 && Descriptor->second.Height_Display!=Retrieve(Stream_Video, StreamPos_Last, Video_Height).To_int32u())
- {
- Fill(Stream_Video, StreamPos_Last, Video_Height_Original, Retrieve(Stream_Video, StreamPos_Last, Video_Height), true);
- if (Retrieve(Stream_Video, StreamPos_Last, Video_PixelAspectRatio_Original).empty())
- Fill(Stream_Video, StreamPos_Last, Video_PixelAspectRatio_Original, Retrieve(Stream_Video, StreamPos_Last, Video_PixelAspectRatio), true);
- Clear(Stream_Video, StreamPos_Last, Video_PixelAspectRatio);
- Fill(Stream_Video, StreamPos_Last, Video_Height, Descriptor->second.Height_Display, 10, true);
- if (Descriptor->second.Height_Display_Offset!=(int32u)-1)
- Fill(Stream_Video, StreamPos_Last, Video_Height_Offset, Descriptor->second.Height_Display_Offset, 10, true);
- }
-
- //Info
- const Ztring &ID=Retrieve(StreamKind_Last, StreamPos_Last, General_ID);
- size_t ID_Dash_Pos=ID.find(__T('-'));
- size_t StreamWithSameID=1;
- if (ID_Dash_Pos!=(size_t)-1)
- {
- Ztring RealID=ID.substr(0, ID_Dash_Pos+1);
- while (StreamPos_Last+StreamWithSameID<Count_Get(StreamKind_Last) && Retrieve(StreamKind_Last, StreamPos_Last+StreamWithSameID, General_ID).find(RealID)==0)
- StreamWithSameID++;
- }
- if (Descriptor->second.SampleRate && StreamKind_Last==Stream_Video)
- {
- float64 SampleRate=Descriptor->second.SampleRate;
- if (StereoscopicPictureSubDescriptor_IsPresent)
- {
- SampleRate/=2;
- Fill(Stream_Video, StreamPos_Last, Video_MultiView_Count, 2, 10, true);
- }
- for (essences::iterator Essence=Essences.begin(); Essence!=Essences.end(); ++Essence)
- if (Essence->second.StreamKind==Stream_Video && Essence->second.StreamPos-(StreamPos_StartAtOne?1:0)==StreamPos_Last)
- {
- if (Essence->second.Field_Count_InThisBlock_1 && !Essence->second.Field_Count_InThisBlock_2)
- SampleRate/=2;
- break;
- }
- Ztring SampleRate_Container; SampleRate_Container.From_Number(SampleRate); //TODO: fill frame rate before the merge with raw stream information
- const Ztring &SampleRate_RawStream=Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate);
- if (!SampleRate_RawStream.empty() && SampleRate_Container!=SampleRate_RawStream)
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate_Original, SampleRate_RawStream);
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, SampleRate, 3, true);
- }
- for (std::map<std::string, Ztring>::iterator Info=Descriptor->second.Infos.begin(); Info!=Descriptor->second.Infos.end(); ++Info)
- if (Retrieve(StreamKind_Last, StreamPos_Last, Info->first.c_str()).empty())
- {
- //Special case
- if (Info->first=="BitRate" && Retrieve(StreamKind_Last, StreamPos_Last, General_ID).find(__T(" / "))!=string::npos)
- {
- if (Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_BitRate)).empty() || Retrieve(StreamKind_Last, StreamPos_Last, General_ID).find(__T("-"))!=string::npos)
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_BitRate_Encoded), Info->second.To_int64u()*2, 10, true);
- else
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_BitRate), Info->second.To_int64u()*2, 10, true);
- }
- else
- {
- for (size_t Pos=0; Pos<StreamWithSameID; Pos++)
- Fill(StreamKind_Last, StreamPos_Last+Pos, Info->first.c_str(), Info->second, true);
- }
- }
- Ztring Format, CodecID;
- if (Descriptor->second.EssenceContainer.hi!=(int64u)-1)
- {
- CodecID.From_Number(Descriptor->second.EssenceContainer.lo, 16);
- if (CodecID.size()<16)
- CodecID.insert(0, 16-CodecID.size(), __T('0'));
- Format.From_Local(Mxf_EssenceContainer(Descriptor->second.EssenceContainer));
- }
- if (Descriptor->second.EssenceCompression.hi!=(int64u)-1)
- {
- if (!CodecID.empty())
- CodecID+=__T('-');
- Ztring EssenceCompression;
- EssenceCompression.From_Number(Descriptor->second.EssenceCompression.lo, 16);
- if (EssenceCompression.size()<16)
- EssenceCompression.insert(0, 16-EssenceCompression.size(), __T('0'));
- CodecID+=EssenceCompression;
- Ztring Format_FromCompression; Format_FromCompression.From_Local(Mxf_EssenceCompression(Descriptor->second.EssenceCompression));
- if (!Format_FromCompression.empty())
- Format=Format_FromCompression; //EssenceCompression has priority
- }
- if (!CodecID.empty())
- for (size_t Pos=0; Pos<StreamWithSameID; Pos++)
- Fill(StreamKind_Last, StreamPos_Last+Pos, Fill_Parameter(StreamKind_Last, Generic_CodecID), CodecID, true);
- if (!Format.empty())
- for (size_t Pos=0; Pos<StreamWithSameID; Pos++)
- if (Retrieve(StreamKind_Last, StreamPos_Last+Pos, Fill_Parameter(StreamKind_Last, Generic_Format)).empty())
- Fill(StreamKind_Last, StreamPos_Last+Pos, Fill_Parameter(StreamKind_Last, Generic_Format), Format);
-
- //Bitrate (PCM)
- if (StreamKind_Last==Stream_Audio && Retrieve(Stream_Audio, StreamPos_Last, Audio_BitRate).empty() && Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("PCM") && Retrieve(Stream_Audio, StreamPos_Last, Audio_Format_Settings_Wrapping).find(__T("D-10"))!=string::npos)
- {
- int64u SamplingRate=Retrieve(Stream_Audio, StreamPos_Last, Audio_SamplingRate).To_int64u();
- if (SamplingRate)
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate, 8*SamplingRate*32);
- }
- if (StreamKind_Last==Stream_Audio && Retrieve(Stream_Audio, StreamPos_Last, Audio_BitRate).empty() && Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("PCM"))
- {
- int64u Channels=Retrieve(Stream_Audio, StreamPos_Last, Audio_Channel_s_).To_int64u();
- int64u SamplingRate=Retrieve(Stream_Audio, StreamPos_Last, Audio_SamplingRate).To_int64u();
- int64u Resolution=Retrieve(Stream_Audio, StreamPos_Last, Audio_BitDepth).To_int64u();
- if (Channels && SamplingRate && Resolution)
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate, Channels*SamplingRate*Resolution);
- }
-
- //Bitrate (Video)
- if (StreamKind_Last==Stream_Video && Retrieve(Stream_Video, StreamPos_Last, Video_BitRate).empty())
- {
- //Until now, I only found CBR files
- Fill(Stream_Video, StreamPos_Last, Video_BitRate, Retrieve(Stream_Video, StreamPos_Last, Video_BitRate_Nominal));
- }
-
- //Display Aspect Ratio
- if (StreamKind_Last==Stream_Video && !Descriptor->second.Infos["DisplayAspectRatio"].empty() && Retrieve(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio)!=Descriptor->second.Infos["DisplayAspectRatio"])
- {
- Ztring DAR=Retrieve(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio);
- Clear(Stream_Video, StreamPos_Last, Video_PixelAspectRatio);
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, Descriptor->second.Infos["DisplayAspectRatio"], true);
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio_Original, DAR);
- float32 Width =Retrieve(Stream_Video, StreamPos_Last, Video_Width ).To_float32();
- float32 Height=Retrieve(Stream_Video, StreamPos_Last, Video_Height ).To_float32();
- float32 DAR_F =DAR.To_float32();
- if (Width && Height && DAR_F)
- {
- float32 PAR =1/(Width/Height/DAR_F);
- if (PAR>(float32)12/(float32)11*0.99 && PAR<(float32)12/(float32)11*1.01)
- PAR=(float32)12/(float32)11;
- if (PAR>(float32)10/(float32)11*0.99 && PAR<(float32)10/(float32)11*1.01)
- PAR=(float32)10/(float32)11;
- if (PAR>(float32)16/(float32)11*0.99 && PAR<(float32)16/(float32)11*1.01)
- PAR=(float32)16/(float32)11;
- if (PAR>(float32)40/(float32)33*0.99 && PAR<(float32)40/(float32)33*1.01)
- PAR=(float32)40/(float32)33;
- if (PAR>(float32)24/(float32)11*0.99 && PAR<(float32)24/(float32)11*1.01)
- PAR=(float32)24/(float32)11;
- if (PAR>(float32)20/(float32)11*0.99 && PAR<(float32)20/(float32)11*1.01)
- PAR=(float32)20/(float32)11;
- if (PAR>(float32)32/(float32)11*0.99 && PAR<(float32)32/(float32)11*1.01)
- PAR=(float32)32/(float32)11;
- if (PAR>(float32)80/(float32)33*0.99 && PAR<(float32)80/(float32)33*1.01)
- PAR=(float32)80/(float32)33;
- if (PAR>(float32)18/(float32)11*0.99 && PAR<(float32)18/(float32)11*1.01)
- PAR=(float32)18/(float32)11;
- if (PAR>(float32)15/(float32)11*0.99 && PAR<(float32)15/(float32)11*1.01)
- PAR=(float32)15/(float32)11;
- if (PAR>(float32)64/(float32)33*0.99 && PAR<(float32)64/(float32)33*1.01)
- PAR=(float32)64/(float32)33;
- if (PAR>(float32)160/(float32)99*0.99 && PAR<(float32)160/(float32)99*1.01)
- PAR=(float32)160/(float32)99;
- if (PAR>(float32)4/(float32)3*0.99 && PAR<(float32)4/(float32)3*1.01)
- PAR=(float32)4/(float32)3;
- if (PAR>(float32)3/(float32)2*0.99 && PAR<(float32)3/(float32)2*1.01)
- PAR=(float32)3/(float32)2;
- if (PAR>(float32)2/(float32)1*0.99 && PAR<(float32)2/(float32)1*1.01)
- PAR=(float32)2;
- if (PAR>(float32)59/(float32)54*0.99 && PAR<(float32)59/(float32)54*1.01)
- PAR=(float32)59/(float32)54;
- }
- }
-
- //ActiveFormatDescriptor
- if (StreamKind_Last==Stream_Video && Descriptor->second.ActiveFormat!=(int8u)-1 && Retrieve(Stream_Video, StreamPos_Last, Video_ActiveFormatDescription).empty())
- {
- Fill(Stream_Video, 0, Video_ActiveFormatDescription, Descriptor->second.ActiveFormat);
- if (Descriptor->second.ActiveFormat<16)
- {
- float32 DAR=Retrieve(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio).To_float32();
- if (DAR>(float32)4/(float32)3*0.99 && DAR<(float32)4/(float32)3*1.01)
- Fill(Stream_Video, 0, Video_ActiveFormatDescription_String, AfdBarData_active_format_4_3[Descriptor->second.ActiveFormat]);
- if (DAR>(float32)16/(float32)9*0.99 && DAR<(float32)16/(float32)9*1.01)
- Fill(Stream_Video, 0, Video_ActiveFormatDescription_String, AfdBarData_active_format_16_9[Descriptor->second.ActiveFormat]);
- }
- if (Retrieve(Stream_Video, 0, Video_ActiveFormatDescription_String).empty())
- Fill(Stream_Video, 0, Video_ActiveFormatDescription_String, Descriptor->second.ActiveFormat);
- }
-
- //ScanType / ScanOrder
- if (StreamKind_Last==Stream_Video && Retrieve(Stream_Video, StreamPos_Last, Video_ScanType_Original).empty())
- {
- //ScanType
- if (!Descriptor->second.ScanType.empty() && (Descriptor->second.ScanType!=Retrieve(Stream_Video, StreamPos_Last, Video_ScanType) && !(Descriptor->second.ScanType==__T("Interlaced") && Retrieve(Stream_Video, StreamPos_Last, Video_ScanType)==__T("MBAFF"))))
- {
- Fill(Stream_Video, StreamPos_Last, Video_ScanType_Original, Retrieve(Stream_Video, StreamPos_Last, Video_ScanType));
- Fill(Stream_Video, StreamPos_Last, Video_ScanType, Descriptor->second.ScanType, true);
- }
-
- //ScanOrder
- Ztring ScanOrder_Temp;
- if ((Descriptor->second.FieldDominance==1 && Descriptor->second.FieldTopness==1) || (Descriptor->second.FieldDominance!=1 && Descriptor->second.FieldTopness==2))
- ScanOrder_Temp.From_UTF8("TFF");
- if ((Descriptor->second.FieldDominance==1 && Descriptor->second.FieldTopness==2) || (Descriptor->second.FieldDominance!=1 && Descriptor->second.FieldTopness==1))
- ScanOrder_Temp.From_UTF8("BFF");
- if ((!ScanOrder_Temp.empty() && ScanOrder_Temp!=Retrieve(Stream_Video, StreamPos_Last, Video_ScanOrder)) || !Retrieve(Stream_Video, StreamPos_Last, Video_ScanType_Original).empty())
- {
- Fill(Stream_Video, StreamPos_Last, Video_ScanOrder_Original, Retrieve(Stream_Video, StreamPos_Last, Video_ScanOrder), true);
- if (ScanOrder_Temp.empty())
- {
- Clear(Stream_Video, StreamPos_Last, Video_ScanOrder);
- Clear(Stream_Video, StreamPos_Last, Video_ScanOrder_String);
- }
- else
- Fill(Stream_Video, StreamPos_Last, Video_ScanOrder, ScanOrder_Temp, true);
- }
- }
-
- //BlockAlignment
- if (StreamKind_Last==Stream_Audio && Descriptor->second.BlockAlign!=(int16u)-1)
- {
- if (Retrieve(Stream_Audio, StreamPos_Last, "BlockAlignment").empty()) //TODO: check the reason it is sometimes call several times.
- Fill(Stream_Audio, StreamPos_Last, "BlockAlignment", Descriptor->second.BlockAlign);
- if (StreamPos_Last<Count_Get(Stream_Audio))
- (*Stream_More)[Stream_Audio][StreamPos_Last](Ztring().From_Local("BlockAlignment"), Info_Options)=__T("N NT");
- }
-
- //Subs and ChannelAssignment
- Ztring ChannelAssignment;
- if (Descriptor->second.ChannelAssignment.lo!=(int64u)-1)
- {
- ChannelAssignment.From_Number(Descriptor->second.ChannelAssignment.lo, 16);
- if (ChannelAssignment.size()<16)
- ChannelAssignment.insert(0, 16-ChannelAssignment.size(), __T('0'));
- }
- if (!Descriptor->second.SubDescriptors.empty())
- {
- std::vector<int128u> AudioChannelLabels_MCALabelDictionaryID;
-
- for (size_t Pos=0; Pos<Descriptor->second.SubDescriptors.size(); Pos++)
- {
- descriptors::iterator SubDescriptor=Descriptors.find(Descriptor->second.SubDescriptors[Pos]);
- if (SubDescriptor!=Descriptors.end())
- {
- switch (SubDescriptor->second.Type)
- {
- case descriptor::Type_AudioChannelLabelSubDescriptor:
- AudioChannelLabels_MCALabelDictionaryID.push_back(SubDescriptor->second.MCALabelDictionaryID);
- break;
- case descriptor::Type_SoundfieldGroupLabelSubDescriptor:
- Fill(Stream_Audio, StreamPos_Last, "MCA Partition kind", SubDescriptor->second.MCAPartitionKind);
- Fill(Stream_Audio, StreamPos_Last, "MCA Partition Number", SubDescriptor->second.MCAPartitionNumber);
- Fill(Stream_Audio, StreamPos_Last, "MCA Title", SubDescriptor->second.MCATitle);
- Fill(Stream_Audio, StreamPos_Last, "MCA Title Version", SubDescriptor->second.MCATitleVersion);
- Fill(Stream_Audio, StreamPos_Last, "MCA Title Sub-Version", SubDescriptor->second.MCATitleSubVersion);
- Fill(Stream_Audio, StreamPos_Last, "MCA Episode", SubDescriptor->second.MCAEpisode);
- Fill(Stream_Audio, StreamPos_Last, "MCA Audio Content Kind", SubDescriptor->second.MCAAudioContentKind);
- Fill(Stream_Audio, StreamPos_Last, "MCA Audio Element Kind", SubDescriptor->second.MCAAudioElementKind);
- //if (SubDescriptor->second.MCALabelDictionaryID.lo!=(int64u)-1)
- //{
- // Ztring ChannelAssignment2;
- // ChannelAssignment2.From_Number(SubDescriptor->second.MCALabelDictionaryID.lo, 16);
- // if (ChannelAssignment2.size()<16)
- // ChannelAssignment2.insert(0, 16-ChannelAssignment2.size(), __T('0'));
- // if (!ChannelAssignment.empty())
- // ChannelAssignment+=__T('-');
- // ChannelAssignment+=ChannelAssignment2;
- //}
- for (std::map<std::string, Ztring>::iterator Info=SubDescriptor->second.Infos.begin(); Info!=SubDescriptor->second.Infos.end(); ++Info)
- Fill(Stream_Audio, StreamPos_Last, Info->first.c_str(), Info->second, true);
- break;
- default: ;
- }
- }
- }
-
- if (!AudioChannelLabels_MCALabelDictionaryID.empty())
- {
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelPositions, MXF_MCALabelDictionaryID_ChannelPositions(AudioChannelLabels_MCALabelDictionaryID));
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelLayout, MXF_MCALabelDictionaryID_ChannelLayout(AudioChannelLabels_MCALabelDictionaryID));
- }
- }
- if (!ChannelAssignment.empty())
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelLayoutID, ChannelAssignment);
- }
-
- //Fallback on partition data if classic methods failed
- if (StreamKind_Last!=Stream_Max && StreamPos_Last!=(size_t)-1 && Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format)).empty() && Descriptors.size()==1 && Count_Get(StreamKind_Last)==1)
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), Mxf_EssenceContainer(EssenceContainer_FromPartitionMetadata));
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Locator(const int128u DescriptorUID, const int128u LocatorUID)
-{
- descriptors::iterator Descriptor=Descriptors.find(DescriptorUID);
- if (Descriptor==Descriptors.end())
- return;
-
- locators::iterator Locator=Locators.find(LocatorUID);
- if (Locator==Locators.end())
- return;
-
- //External file name specific
- if (!Locator->second.IsTextLocator && !Locator->second.EssenceLocator.empty())
- {
- //Preparing
- Locator->second.StreamKind=StreamKind_Last;
- Locator->second.StreamPos=StreamPos_Last;
- Locator->second.LinkedTrackID=Descriptor->second.LinkedTrackID;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_CommercialNames ()
-{
- //Commercial names
- if (Count_Get(Stream_Video)==1)
- {
- Streams_Finish_StreamOnly();
- if (!Retrieve(Stream_Video, 0, Video_Format_Commercial_IfAny).empty())
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, Retrieve(Stream_Video, 0, Video_Format_Commercial_IfAny));
- Fill(Stream_General, 0, General_Format_Commercial, __T("MXF ")+Retrieve(Stream_Video, 0, Video_Format_Commercial_IfAny));
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("DV"))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "DV");
- Fill(Stream_General, 0, General_Format_Commercial, "MXF DV");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("AVC") && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)==__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:0") && Retrieve(Stream_Video, 0, Video_BitRate)==__T("56064000"))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "AVC-Intra 50");
- Fill(Stream_General, 0, General_Format_Commercial, "MXF AVC-Intra 50");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "AVC-Intra 50");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("AVC") && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)==__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:2") && Retrieve(Stream_Video, 0, Video_BitRate)==__T("113664000"))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "AVC-Intra 100");
- Fill(Stream_General, 0, General_Format_Commercial, "MXF AVC-Intra 100");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "AVC-Intra 100");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)==__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:2") && (Retrieve(Stream_Video, 0, Video_BitRate)==__T("30000000") || Retrieve(Stream_Video, 0, Video_BitRate_Nominal)==__T("30000000") || Retrieve(Stream_Video, 0, Video_BitRate_Maximum)==__T("30000000")))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "IMX 30");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "IMX 30");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)==__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:2") && (Retrieve(Stream_Video, 0, Video_BitRate)==__T("40000000") || Retrieve(Stream_Video, 0, Video_BitRate_Nominal)==__T("40000000") || Retrieve(Stream_Video, 0, Video_BitRate_Maximum)==__T("40000000")))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "IMX 40");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "IMX 40");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)==__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:2") && (Retrieve(Stream_Video, 0, Video_BitRate)==__T("50000000") || Retrieve(Stream_Video, 0, Video_BitRate_Nominal)==__T("50000000") || Retrieve(Stream_Video, 0, Video_BitRate_Maximum)==__T("50000000")))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "IMX 50");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "IMX 50");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && !Retrieve(Stream_Video, 0, Video_Format_Settings_GOP).empty() && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)!=__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:0") && (Retrieve(Stream_Video, 0, Video_BitRate)==__T("18000000") || Retrieve(Stream_Video, 0, Video_BitRate_Nominal)==__T("18000000") || Retrieve(Stream_Video, 0, Video_BitRate_Maximum)==__T("18000000")))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "XDCAM HD 18");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "XDCAM HD 18");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && !Retrieve(Stream_Video, 0, Video_Format_Settings_GOP).empty() && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)!=__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:0") && (Retrieve(Stream_Video, 0, Video_BitRate)==__T("25000000") || Retrieve(Stream_Video, 0, Video_BitRate_Nominal)==__T("25000000") || Retrieve(Stream_Video, 0, Video_BitRate_Maximum)==__T("25000000")))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "XDCAM HD 25");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "XDCAM HD 25");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && !Retrieve(Stream_Video, 0, Video_Format_Settings_GOP).empty() && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)!=__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:0") && (Retrieve(Stream_Video, 0, Video_BitRate)==__T("35000000") || Retrieve(Stream_Video, 0, Video_BitRate_Nominal)==__T("35000000") || Retrieve(Stream_Video, 0, Video_BitRate_Maximum)==__T("35000000")))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "XDCAM HD 35");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "XDCAM HD 35");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && !Retrieve(Stream_Video, 0, Video_Format_Settings_GOP).empty() && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)!=__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:2") && (Retrieve(Stream_Video, 0, Video_BitRate)==__T("50000000") || Retrieve(Stream_Video, 0, Video_BitRate_Nominal)==__T("50000000") || Retrieve(Stream_Video, 0, Video_BitRate_Maximum)==__T("50000000")))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "XDCAM HD422");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "XDCAM HD422");
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Component(const int128u ComponentUID, float64 EditRate, int32u TrackID, int64u Origin)
-{
- components::iterator Component=Components.find(ComponentUID);
- if (Component==Components.end())
- return;
-
- //Duration
- if (EditRate && StreamKind_Last!=Stream_Max && Component->second.Duration!=(int64u)-1)
- {
- int64u FrameCount=Component->second.Duration;
- if (StreamKind_Last==Stream_Video || Config->File_EditRate)
- {
- int64u File_IgnoreEditsBefore=Config->File_IgnoreEditsBefore;
- if (File_IgnoreEditsBefore && Config->File_EditRate && (EditRate<Config->File_EditRate*0.9 || EditRate>Config->File_EditRate*1.1)) //In case of problem or EditRate being sampling rate
- File_IgnoreEditsBefore=float64_int64s(((float64)File_IgnoreEditsBefore)/Config->File_EditRate*EditRate);
- int64u File_IgnoreEditsAfter=Config->File_IgnoreEditsAfter;
- if (File_IgnoreEditsAfter!=(int64u)-1 && Config->File_EditRate && (EditRate<Config->File_EditRate*0.9 || EditRate>Config->File_EditRate*1.1)) //In case of problem or EditRate being sampling rate
- File_IgnoreEditsAfter=float64_int64s(((float64)File_IgnoreEditsAfter)/Config->File_EditRate*EditRate);
- if (File_IgnoreEditsAfter<FrameCount)
- FrameCount=File_IgnoreEditsAfter;
- if (FrameCount<File_IgnoreEditsBefore)
- FrameCount=File_IgnoreEditsBefore;
- FrameCount-=File_IgnoreEditsBefore;
- }
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Duration), FrameCount*1000/EditRate, 0, true);
- size_t ID_SubStreamInfo_Pos=Retrieve(StreamKind_Last, StreamPos_Last, General_ID).find(__T("-"));
- if (ID_SubStreamInfo_Pos!=string::npos)
- {
- Ztring ID=Retrieve(StreamKind_Last, StreamPos_Last, General_ID);
- ID.resize(ID_SubStreamInfo_Pos+1);
- size_t StreamPos_Last_Temp=StreamPos_Last;
- while (StreamPos_Last_Temp)
- {
- StreamPos_Last_Temp--;
- if (Retrieve(StreamKind_Last, StreamPos_Last_Temp, General_ID).find(ID)!=0)
- break;
- Fill(StreamKind_Last, StreamPos_Last_Temp, Fill_Parameter(StreamKind_Last, Generic_Duration), FrameCount*1000/EditRate, 0, true);
- }
- }
-
- // Hack, TODO: find a correct method for detecting fiel/frame differene
- if (StreamKind_Last==Stream_Video)
- for (essences::iterator Essence=Essences.begin(); Essence!=Essences.end(); ++Essence)
- if (Essence->second.StreamKind==Stream_Video && Essence->second.StreamPos-(StreamPos_StartAtOne?1:0)==StreamPos_Last)
- {
- if (Essence->second.Field_Count_InThisBlock_1 && !Essence->second.Field_Count_InThisBlock_2)
- FrameCount/=2;
- break;
- }
-
- if (Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_FrameCount)).empty())
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_FrameCount), FrameCount);
-
- if (Retrieve(StreamKind_Last, StreamPos_Last, "FrameRate").empty())
- Fill(StreamKind_Last, StreamPos_Last, "FrameRate", EditRate);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Component_ForTimeCode(const int128u ComponentUID, float64 EditRate, int32u TrackID, int64u Origin, bool IsSourcePackage)
-{
- components::iterator Component=Components.find(ComponentUID);
- if (Component==Components.end())
- return;
-
- //For the sequence, searching Structural componenents
- for (size_t Pos=0; Pos<Component->second.StructuralComponents.size(); Pos++)
- {
- components::iterator Component2=Components.find(Component->second.StructuralComponents[Pos]);
- if (Component2!=Components.end() && Component2->second.MxfTimeCode.StartTimecode!=(int64u)-1 && !Config->File_IsReferenced_Get())
- {
- //Note: Origin is not part of the StartTimecode for the first frame in the source package. From specs: "For a Timecode Track with a single Timecode Component and with origin N, where N greater than 0, the timecode value at the Zero Point of the Track equals the start timecode of the Timecode Component incremented by N units."
- TimeCode TC(Component2->second.MxfTimeCode.StartTimecode+Config->File_IgnoreEditsBefore, (int8u)Component2->second.MxfTimeCode.RoundedTimecodeBase, Component2->second.MxfTimeCode.DropFrame);
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_ID, Ztring::ToZtring(TrackID)+(IsSourcePackage?__T("-Source"):__T("-Material")));
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Time code");
- Fill(Stream_Other, StreamPos_Last, Other_Format, "MXF TC");
- Fill(Stream_Other, StreamPos_Last, Other_TimeCode_FirstFrame, TC.ToString().c_str());
- Fill(Stream_Other, StreamPos_Last, Other_TimeCode_Settings, IsSourcePackage?__T("Source Package"):__T("Material Package"));
- Fill(Stream_Other, StreamPos_Last, Other_TimeCode_Striped, "Yes");
-
- if ((!TimeCodeFromMaterialPackage && IsSourcePackage) || (TimeCodeFromMaterialPackage && !IsSourcePackage))
- {
- MxfTimeCodeForDelay=Component2->second.MxfTimeCode;
-
- DTS_Delay=((float64)MxfTimeCodeForDelay.StartTimecode)/MxfTimeCodeForDelay.RoundedTimecodeBase;
- if (MxfTimeCodeForDelay.DropFrame)
- {
- DTS_Delay*=1001;
- DTS_Delay/=1000;
- }
- FrameInfo.DTS=float64_int64s(DTS_Delay*1000000000);
- #if MEDIAINFO_DEMUX
- Config->Demux_Offset_DTS_FromStream=FrameInfo.DTS;
- #endif //MEDIAINFO_DEMUX
- }
-
- if (!IsSourcePackage)
- {
- MxfTimeCodeMaterial=Component2->second.MxfTimeCode;
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Component_ForAS11(const int128u ComponentUID, float64 EditRate, int32u TrackID, int64u Origin)
-{
- components::iterator Component=Components.find(ComponentUID);
- if (Component==Components.end())
- return;
-
- //Computing frame rate
- int64u TC_Temp=0;
- int8u FrameRate_TempI;
- bool DropFrame_Temp;
- if (MxfTimeCodeMaterial.RoundedTimecodeBase && MxfTimeCodeMaterial.StartTimecode!=(int64u)-1 && MxfTimeCodeMaterial.RoundedTimecodeBase)
- {
- TC_Temp=MxfTimeCodeMaterial.StartTimecode;
- FrameRate_TempI=(int8u)MxfTimeCodeMaterial.RoundedTimecodeBase;
- DropFrame_Temp=MxfTimeCodeMaterial.DropFrame;
- }
- else
- {
- TC_Temp=0;
- Ztring FrameRateS=Retrieve(Stream_Video, 0, Video_FrameRate);
- int32u FrameRate_TempI32=float32_int32s(FrameRateS.To_float32());
- if (FrameRate_TempI32 && FrameRate_TempI32<256)
- {
- FrameRate_TempI=(int8u)FrameRate_TempI32;
- float32 FrameRateF=FrameRateS.To_float32();
- float FrameRateF_Min=((float32)FrameRate_TempI)/((float32)1.002);
- float FrameRateF_Max=(float32)FrameRate_TempI;
- if (FrameRateF>=FrameRateF_Min && FrameRateF<FrameRateF_Max)
- DropFrame_Temp=true;
- else
- DropFrame_Temp=false;
- }
- else
- {
- FrameRate_TempI=25;
- DropFrame_Temp=false;
- }
- }
-
- //For the sequence, searching Structural componenents
- int64u Duration_CurrentPos=0;
- int64u Duration_Programme=0;
- for (size_t Pos=0; Pos<Component->second.StructuralComponents.size(); Pos++)
- {
- // AS-11
- dmsegments::iterator DMSegment=DMSegments.find(Component->second.StructuralComponents[Pos]);
- if (DMSegment!=DMSegments.end())
- {
- as11s::iterator AS11=AS11s.find(DMSegment->second.Framework);
- if (AS11!=AS11s.end())
- {
- if (StreamKind_Last==Stream_Max)
- {
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_ID, TrackID);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Metadata");
- if (AS11->second.Type==as11::Type_Segmentation)
- {
- if (AS11->second.PartTotal!=(int16u)-1)
- Fill(Stream_Other, StreamPos_Last, "PartTotal", AS11->second.PartTotal);
- }
- }
-
- switch (AS11->second.Type)
- {
- case as11::Type_Core:
- Fill(Stream_Other, StreamPos_Last, "Format", "AS-11 Core");
- Fill(Stream_Other, StreamPos_Last, "SeriesTitle", AS11->second.SeriesTitle);
- Fill(Stream_Other, StreamPos_Last, "ProgrammeTitle", AS11->second.ProgrammeTitle);
- Fill(Stream_Other, StreamPos_Last, "EpisodeTitleNumber", AS11->second.EpisodeTitleNumber);
- Fill(Stream_Other, StreamPos_Last, "ShimName", AS11->second.ShimName);
- if (AS11->second.ShimVersion_Major!=(int8u)-1)
- {
- Ztring Version=Ztring::ToZtring(AS11->second.ShimVersion_Major);
- if (AS11->second.ShimVersion_Minor!=(int8u)-1)
- {
- Version+=__T('.');
- Version+=Ztring::ToZtring(AS11->second.ShimVersion_Minor);
- }
- Fill(Stream_Other, StreamPos_Last, "ShimVersion", Version);
- }
- if (AS11->second.AudioTrackLayout<Mxf_AS11_AudioTrackLayout_Count)
- {
- Fill(Stream_Other, StreamPos_Last, "AudioTrackLayout", Mxf_AS11_AudioTrackLayout[AS11->second.AudioTrackLayout]);
-
- //Per track
- const mxf_as11_audiotracklayout_assignment &ChP=Mxf_AS11_AudioTrackLayout_ChannelPositions[AS11->second.AudioTrackLayout];
- const mxf_as11_audiotracklayout_assignment &ChL=Mxf_AS11_AudioTrackLayout_ChannelLayout[AS11->second.AudioTrackLayout];
- if (Count_Get(Stream_Audio)>=ChP.Count)
- for (size_t Pos=0; Pos<ChP.Count; ++Pos)
- {
- if (ChP.Assign[Pos])
- Fill(Stream_Audio, Pos, Audio_ChannelPositions, ChP.Assign[Pos]);
- if (ChL.Assign[Pos])
- Fill(Stream_Audio, Pos, Audio_ChannelLayout, ChL.Assign[Pos]);
- Fill(Stream_Audio, Pos, Audio_ChannelLayoutID, Mxf_AS11_AudioTrackLayout[AS11->second.AudioTrackLayout]);
- }
- }
- Fill(Stream_Other, StreamPos_Last, "PrimaryAudioLanguage", AS11->second.PrimaryAudioLanguage);
- //(*Stream_More)[Stream_Other][StreamPos_Last](Ztring().From_Local("PrimaryAudioLanguage"), Info_Options)=__T("N NT");
- //if (MediaInfoLib::Config.Iso639_Find(AS11->second.PrimaryAudioLanguage).empty())
- // Fill(Stream_Other, StreamPos_Last, "PrimaryAudioLanguage/String", MediaInfoLib::Config.Iso639_Translate(AS11->second.PrimaryAudioLanguage));
- if (AS11->second.ClosedCaptionsPresent<2)
- Fill(Stream_Other, StreamPos_Last, "ClosedCaptionsPresent", AS11->second.ClosedCaptionsPresent?"Yes":"No");
- if (AS11->second.ClosedCaptionsType<Mxf_AS11_ClosedCaptionType_Count)
- Fill(Stream_Other, StreamPos_Last, "ClosedCaptionType", Mxf_AS11_ClosedCaptionType[AS11->second.ClosedCaptionsType]);
- Fill(Stream_Other, StreamPos_Last, "ClosedCaptionsLanguage", AS11->second.ClosedCaptionsLanguage);
- break;
- case as11::Type_Segmentation:
- Fill(Stream_Other, StreamPos_Last, "Format", "AS-11 Segmentation", Unlimited, true, true);
- if (AS11->second.PartNumber!=(int16u)-1 && AS11->second.PartTotal!=(int16u)-1)
- {
- string S;
- S+=TimeCode(TC_Temp+Duration_CurrentPos, FrameRate_TempI, DropFrame_Temp).ToString();
- if (DMSegment->second.Duration!=(int64u)-1)
- {
- S+=" + ";
- S+=TimeCode(DMSegment->second.Duration, FrameRate_TempI, DropFrame_Temp).ToString();
- S+=" = ";
- Duration_CurrentPos+=DMSegment->second.Duration;
- S+=TimeCode(TC_Temp+Duration_CurrentPos, FrameRate_TempI, DropFrame_Temp).ToString();
- Duration_Programme+=DMSegment->second.Duration;
- }
- Fill(Stream_Other, StreamPos_Last, Ztring::ToZtring(AS11->second.PartNumber).To_UTF8().c_str(), S);
- }
- break;
- case as11::Type_UKDPP:
- Fill(Stream_Other, StreamPos_Last, "Format", "AS-11 UKDPP");
- Fill(Stream_Other, StreamPos_Last, "ProductionNumber", AS11->second.ProductionNumber);
- Fill(Stream_Other, StreamPos_Last, "Synopsis", AS11->second.Synopsis);
- Fill(Stream_Other, StreamPos_Last, "Originator", AS11->second.Originator);
- if (AS11->second.CopyrightYear!=(int16u)-1)
- Fill(Stream_Other, StreamPos_Last, "CopyrightYear", AS11->second.CopyrightYear);
- Fill(Stream_Other, StreamPos_Last, "OtherIdentifier", AS11->second.OtherIdentifier);
- Fill(Stream_Other, StreamPos_Last, "OtherIdentifierType", AS11->second.OtherIdentifierType);
- Fill(Stream_Other, StreamPos_Last, "Genre", AS11->second.Genre);
- Fill(Stream_Other, StreamPos_Last, "Distributor", AS11->second.Distributor);
- Fill(Stream_Other, StreamPos_Last, "PictureRatio", Ztring::ToZtring(AS11->second.PictureRatio_N)+__T(':')+Ztring::ToZtring(AS11->second.PictureRatio_D));
- if (AS11->second.ThreeD!=(int8u)-1)
- Fill(Stream_Other, StreamPos_Last, "3D", AS11->second.ThreeD?__T("Yes"):__T("No"));
- if (AS11->second.ThreeDType<Mxf_AS11_3D_Type_Count)
- Fill(Stream_Other, StreamPos_Last, "3DType", Mxf_AS11_3D_Type[AS11->second.ThreeDType]);
- if (AS11->second.ProductPlacement!=(int8u)-1)
- Fill(Stream_Other, StreamPos_Last, "ProductPlacement", AS11->second.ProductPlacement?__T("Yes"):__T("No"));
- if (AS11->second.ThreeDType<Mxf_AS11_FpaPass_Count)
- Fill(Stream_Other, StreamPos_Last, "FpaPass", Mxf_AS11_FpaPass[AS11->second.FpaPass]);
- Fill(Stream_Other, StreamPos_Last, "FpaManufacturer", AS11->second.FpaManufacturer);
- Fill(Stream_Other, StreamPos_Last, "FpaVersion", AS11->second.FpaVersion);
- Fill(Stream_Other, StreamPos_Last, "VideoComments", AS11->second.VideoComments);
- if (AS11->second.SecondaryAudioLanguage!=__T("zxx"))
- Fill(Stream_Other, StreamPos_Last, "SecondaryAudioLanguage", AS11->second.SecondaryAudioLanguage);
- if (AS11->second.TertiaryAudioLanguage!=__T("zxx"))
- Fill(Stream_Other, StreamPos_Last, "TertiaryAudioLanguage", AS11->second.TertiaryAudioLanguage);
- if (AS11->second.AudioLoudnessStandard<Mxf_AS11_AudioLoudnessStandard_Count)
- Fill(Stream_Other, StreamPos_Last, "AudioLoudnessStandard", Mxf_AS11_AudioLoudnessStandard[AS11->second.AudioLoudnessStandard]);
- Fill(Stream_Other, StreamPos_Last, "AudioComments", AS11->second.AudioComments);
- if (AS11->second.LineUpStart!=(int64u)-1)
- Fill(Stream_Other, StreamPos_Last, "LineUpStart", Ztring().From_UTF8(TimeCode(TC_Temp+AS11->second.LineUpStart, FrameRate_TempI, DropFrame_Temp).ToString()));
- if (AS11->second.IdentClockStart!=(int64u)-1)
- Fill(Stream_Other, StreamPos_Last, "IdentClockStart", Ztring().From_UTF8(TimeCode(TC_Temp+AS11->second.IdentClockStart, FrameRate_TempI, DropFrame_Temp).ToString()));
- if (AS11->second.TotalNumberOfParts!=(int16u)-1)
- Fill(Stream_Other, StreamPos_Last, "TotalNumberOfParts", AS11->second.TotalNumberOfParts);
- if (AS11->second.TotalProgrammeDuration!=(int64u)-1)
- Fill(Stream_Other, StreamPos_Last, "TotalProgrammeDuration", Ztring().From_UTF8(TimeCode(AS11->second.TotalProgrammeDuration, FrameRate_TempI, DropFrame_Temp).ToString()));
- if (AS11->second.AudioDescriptionPresent!=(int8u)-1)
- Fill(Stream_Other, StreamPos_Last, "AudioDescriptionPresent", AS11->second.AudioDescriptionPresent?__T("Yes"):__T("No"));
- if (AS11->second.AudioDescriptionType<Mxf_AS11_AudioDescriptionType_Count)
- Fill(Stream_Other, StreamPos_Last, "AudioDescriptionType", Mxf_AS11_AudioLoudnessStandard[AS11->second.AudioDescriptionType]);
- if (AS11->second.OpenCaptionsPresent!=(int8u)-1)
- Fill(Stream_Other, StreamPos_Last, "OpenCaptionsPresent", AS11->second.OpenCaptionsPresent?__T("Yes"):__T("No"));
- if (AS11->second.OpenCaptionsType<Mxf_AS11_OpenCaptionsType_Count)
- Fill(Stream_Other, StreamPos_Last, "OpenCaptionsType", Mxf_AS11_OpenCaptionsType[AS11->second.OpenCaptionsType]);
- Fill(Stream_Other, StreamPos_Last, "OpenCaptionsLanguage", AS11->second.OpenCaptionsLanguage);
- if (AS11->second.SigningPresent<Mxf_AS11_SigningPresent_Count)
- Fill(Stream_Other, StreamPos_Last, "SigningPresent", Mxf_AS11_SigningPresent[AS11->second.SigningPresent]);
- if (AS11->second.SignLanguage<Mxf_AS11_SignLanguage_Count)
- Fill(Stream_Other, StreamPos_Last, "SignLanguage", Mxf_AS11_SignLanguage[AS11->second.SignLanguage]);
- //if (AS11->second.CompletionDate!=(int64u)-1)
- // Fill(Stream_Other, StreamPos_Last, "CompletionDate", Ztring::ToZtring(AS11->second.CompletionDate)+__T(" (TODO: Timestamp translation)")); //TODO: Timestamp
- if (AS11->second.TextlessElementsExist!=(int8u)-1)
- Fill(Stream_Other, StreamPos_Last, "TextlessElementsExist", AS11->second.TextlessElementsExist?__T("Yes"):__T("No"));
- if (AS11->second.ProgrammeHasText!=(int8u)-1)
- Fill(Stream_Other, StreamPos_Last, "ProgrammeHasText", AS11->second.ProgrammeHasText?__T("Yes"):__T("No"));
- Fill(Stream_Other, StreamPos_Last, "ProgrammeTextLanguage", AS11->second.ProgrammeTextLanguage);
- Fill(Stream_Other, StreamPos_Last, "ContactEmail", AS11->second.ContactEmail);
- Fill(Stream_Other, StreamPos_Last, "ContactTelephoneNumber", AS11->second.ContactTelephoneNumber);
- break;
- default: ;
- }
- }
- else if (DMSegment->second.IsAs11SegmentFiller && DMSegment->second.Duration!=(int64u)-1)
- Duration_CurrentPos+=DMSegment->second.Duration;
- }
- }
- if (Duration_Programme)
- Fill(Stream_Other, StreamPos_Last, "TotalProgrammeDuration", TimeCode(Duration_Programme, FrameRate_TempI, DropFrame_Temp).ToString());
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Streams_Finish_Identification (const int128u IdentificationUID)
-{
- identifications::iterator Identification=Identifications.find(IdentificationUID);
- if (Identification==Identifications.end())
- return;
-
- //Product part
- Ztring Encoded_Application_Version=Identification->second.ProductVersion.empty()?Identification->second.VersionString:Identification->second.ProductVersion;
- Ztring Encoded_Application_ProductName(Identification->second.ProductName);
- if (!Identification->second.CompanyName.empty() && Identification->second.CompanyName.size()<Encoded_Application_ProductName.size())
- {
- Ztring ProductName_Begin(Encoded_Application_ProductName.c_str(), Identification->second.CompanyName.size());
- if (Identification->second.CompanyName.Compare(ProductName_Begin) && Encoded_Application_ProductName[Identification->second.CompanyName.size()]==__T(' '))
- Encoded_Application_ProductName.erase(0, Identification->second.CompanyName.size()+1);
- }
- size_t Encoded_Application_ProductName_Pos = Encoded_Application_ProductName.find_last_of(__T(' '));
- if (Encoded_Application_ProductName_Pos!=string::npos)
- {
- Ztring Encoded_Application_ProductName_End(Encoded_Application_ProductName.c_str()+Encoded_Application_ProductName_Pos+1);
- if (Encoded_Application_Version.find(Encoded_Application_ProductName_End)==0)
- Encoded_Application_ProductName.resize(Encoded_Application_ProductName_Pos); //Removing version number from the name (format not conform)
- }
- Fill(Stream_General, 0, General_Encoded_Application_CompanyName, Identification->second.CompanyName, true);
- Fill(Stream_General, 0, General_Encoded_Application_Name, Encoded_Application_ProductName, true);
- Fill(Stream_General, 0, General_Encoded_Application_Version, Encoded_Application_Version, true);
-
- //Platform part
- Ztring Library_Name(Identification->second.Platform);
- size_t Library_Name_Pos = Library_Name.find_last_of(__T(' '));
- if (Library_Name_Pos!=string::npos)
- {
- Ztring Library_Name_End(Library_Name.c_str()+Library_Name_Pos+1);
- if (Identification->second.ToolkitVersion.find(Library_Name_End)==0)
- Library_Name.resize(Library_Name_Pos); //Removing version number from the name (format not conform)
- }
- Fill(Stream_General, 0, General_Encoded_Library_Name, Library_Name, true);
- Fill(Stream_General, 0, General_Encoded_Library_Version, Identification->second.ToolkitVersion, true);
-
- for (std::map<std::string, Ztring>::iterator Info=Identification->second.Infos.begin(); Info!=Identification->second.Infos.end(); ++Info)
- Fill(Stream_General, 0, Info->first.c_str(), Info->second, true);
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mxf::Read_Buffer_Init()
-{
- EssenceContainer_FromPartitionMetadata=0;
- #if MEDIAINFO_DEMUX
- Demux_UnpacketizeContainer=Config->Demux_Unpacketize_Get();
- Demux_Rate=Config->Demux_Rate_Get();
- #endif //MEDIAINFO_DEMUX
-
- //Config
- TimeCodeFromMaterialPackage=Config->File_Mxf_TimeCodeFromMaterialPackage_Get();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Read_Buffer_Continue()
-{
- #if MEDIAINFO_DEMUX
- if (Demux_CurrentParser)
- {
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded--;
- Open_Buffer_Continue(Demux_CurrentParser, Buffer+Buffer_Offset, 0, false);
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- if (Config->Demux_EventWasSent)
- return;
- switch (Demux_CurrentParser->Field_Count_InThisBlock)
- {
- case 1 : Demux_CurrentEssence->second.Field_Count_InThisBlock_1++; break;
- case 2 : Demux_CurrentEssence->second.Field_Count_InThisBlock_2++; break;
- default: ;
- }
- if (Demux_CurrentParser->Buffer_Size)
- Demux_CurrentParser=NULL; //No more need of it
- }
- #endif //MEDIAINFO_DEMUX
-
- if (!IsSub)
- {
- if (Config->ParseSpeed>=1.0)
- {
- bool Buffer_End_IsUpdated=false;
- if (Config->File_IsGrowing && !Config->File_IsNotGrowingAnymore)
- {
- File F;
- F.Open(File_Name);
- std::vector<int8u> SearchingPartitionPack(65536);
- size_t SearchingPartitionPack_Size=F.Read(&SearchingPartitionPack[0], SearchingPartitionPack.size());
- for (size_t Pos=0; Pos+16<SearchingPartitionPack_Size; Pos++)
- if (SearchingPartitionPack[Pos ]==0x06
- && SearchingPartitionPack[Pos+ 1]==0x0E
- && SearchingPartitionPack[Pos+ 2]==0x2B
- && SearchingPartitionPack[Pos+ 3]==0x34
- && SearchingPartitionPack[Pos+ 4]==0x02
- && SearchingPartitionPack[Pos+ 5]==0x05
- && SearchingPartitionPack[Pos+ 6]==0x01
- && SearchingPartitionPack[Pos+ 7]==0x01
- && SearchingPartitionPack[Pos+ 8]==0x0D
- && SearchingPartitionPack[Pos+ 9]==0x01
- && SearchingPartitionPack[Pos+10]==0x02
- && SearchingPartitionPack[Pos+11]==0x01
- && SearchingPartitionPack[Pos+12]==0x01
- && SearchingPartitionPack[Pos+13]==0x02) //Header Partition Pack
- {
- switch (SearchingPartitionPack[Pos+14])
- {
- case 0x02 :
- case 0x04 :
- {
- //Filling duration
- F.Close();
- Config->File_IsNotGrowingAnymore=true;
- MediaInfo_Internal MI;
- Ztring ParseSpeed_Save=MI.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI.Option(__T("Demux_Get"), __T(""));
- MI.Option(__T("ParseSpeed"), __T("0"));
- MI.Option(__T("Demux"), Ztring());
- size_t MiOpenResult=MI.Open(File_Name);
- MI.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (MiOpenResult)
- {
- Fill(Stream_General, 0, General_Format_Settings, MI.Get(Stream_General, 0, General_Format_Settings), true);
- Fill(Stream_General, 0, General_Duration, MI.Get(Stream_General, 0, General_Duration), true);
- Fill(Stream_General, 0, General_FileSize, MI.Get(Stream_General, 0, General_FileSize), true);
- Fill(Stream_General, 0, General_StreamSize, MI.Get(Stream_General, 0, General_StreamSize), true);
- if (Buffer_End_Unlimited)
- {
- Buffer_End=MI.Get(Stream_General, 0, General_FileSize).To_int64u()-MI.Get(Stream_General, 0, General_FooterSize).To_int64u();
- Buffer_End_IsUpdated=true;
- }
- if (!Config->File_IsReferenced_Get() && ReferenceFiles && Retrieve(Stream_General, 0, General_StreamSize).To_int64u())
- {
- //Playlist file size is not correctly modified
- Config->File_Size-=File_Size;
- File_Size=Retrieve(Stream_General, 0, General_StreamSize).To_int64u();
- Config->File_Size+=File_Size;
- }
- }
- }
- break;
- default : ;
- }
- }
-
- if (Buffer_End && Buffer_End_Unlimited && !Buffer_End_IsUpdated)
- Buffer_End=Config->File_Size; //Updating Clip end in case the
- }
-
- Config->State_Set(((float)Buffer_TotalBytes)/Config->File_Size);
- }
- }
-
- if ((IsCheckingRandomAccessTable || IsCheckingFooterPartitionAddress) && File_Offset+Buffer_Offset+16<File_Size)
- {
- if (Buffer_Offset+16>Buffer_Size)
- {
- Element_WaitForMoreData();
- return;
- }
- if (CC4(Buffer+Buffer_Offset)!=0x060E2B34 || CC3(Buffer+Buffer_Offset+4)!=0x020501 || CC3(Buffer+Buffer_Offset+8)!=0x0D0102 || CC1(Buffer+Buffer_Offset+12)!=0x01)
- {
- if (IsCheckingRandomAccessTable || (IsCheckingFooterPartitionAddress && FooterPartitionAddress_Jumped))
- TryToFinish(); //No footer
- else if (IsCheckingFooterPartitionAddress)
- {
- IsParsingEnd=true;
- GoToFromEnd(4); //For random access table
- FooterPartitionAddress_Jumped=true;
- Open_Buffer_Unsynch();
- }
- }
- IsCheckingRandomAccessTable=false;
- IsCheckingFooterPartitionAddress=false;
- }
-
- if (Config->ParseSpeed<1.0 && File_Offset+Buffer_Offset+4==File_Size)
- {
- int32u Length;
- Get_B4 (Length, "Length (Random Index)");
- if (Length>=16+4 && Length<File_Size/2)
- {
- GoToFromEnd(Length); //For random access table
- Open_Buffer_Unsynch();
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Read_Buffer_AfterParsing()
-{
- if (File_GoTo==(int64u)-1 && File_Offset+Buffer_Offset>=IsParsingMiddle_MaxOffset)
- {
- Fill();
- Open_Buffer_Unsynch();
- Finish();
- return;
- }
-
- if (File_Offset+Buffer_Size>=File_Size)
- {
- if (Partitions_IsCalculatingHeaderByteCount)
- {
- Partitions_IsCalculatingHeaderByteCount=false;
- if (Partitions_Pos<Partitions.size())
- Partitions[Partitions_Pos].PartitionPackByteCount=File_Offset+Buffer_Offset-Partitions[Partitions_Pos].StreamOffset;
- }
-
- if (IsParsingEnd)
- {
- if (PartitionMetadata_PreviousPartition && RandomIndexMetadatas.empty() && !RandomIndexMetadatas_AlreadyParsed)
- {
- Partitions_Pos=0;
- while (Partitions_Pos<Partitions.size() && Partitions[Partitions_Pos].StreamOffset!=PartitionMetadata_PreviousPartition)
- Partitions_Pos++;
- if (Partitions_Pos==Partitions.size())
- {
- GoTo(PartitionMetadata_PreviousPartition);
- Open_Buffer_Unsynch();
- return;
- }
- }
- }
-
- //Checking if we want to seek again
- if (File_GoTo==(int64u)-1)
- TryToFinish();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Read_Buffer_Unsynched()
-{
- //Adapting DataSizeToParse
- if (Buffer_End)
- {
- if (File_GoTo>=Buffer_End //Too much late
- || File_GoTo<=Buffer_Begin) //Too much early
- {
- Buffer_Begin=(int64u)-1;
- Buffer_End=0;
- Buffer_End_Unlimited=false;
- Buffer_Header_Size=0;
- MustSynchronize=true;
- Synched=false;
- UnSynched_IsNotJunk=true;
- }
- else
- Synched=true; //Always in clip data
- }
-
- FrameInfo=frame_info();
- FrameInfo.DTS=float64_int64s(DTS_Delay*1000000000);
- Frame_Count_NotParsedIncluded=(int64u)-1;
- #if MEDIAINFO_DEMUX || MEDIAINFO_SEEK
- if (!Tracks.empty() && Tracks.begin()->second.EditRate) //TODO: use the corresponding track instead of the first one
- FrameInfo.DUR=float64_int64s(1000000000/Tracks.begin()->second.EditRate);
- else if (!IndexTables.empty() && IndexTables[0].IndexEditRate)
- FrameInfo.DUR=float64_int64s(1000000000/IndexTables[0].IndexEditRate);
-
- //Calculating the byte count not included in seek information (partition, index...)
- int64u FutureFileOffset=File_GoTo==(int64u)-1?(File_Offset+Buffer_Offset):File_GoTo;
- int64u StreamOffset_Offset=0;
- Partitions_Pos=0;
- while (Partitions_Pos<Partitions.size() && Partitions[Partitions_Pos].StreamOffset<=FutureFileOffset)
- {
- StreamOffset_Offset+=Partitions[Partitions_Pos].PartitionPackByteCount+Partitions[Partitions_Pos].HeaderByteCount+Partitions[Partitions_Pos].IndexByteCount;
- Partitions_Pos++;
- }
-
- if (Partitions_Pos==2 && Partitions[1].StreamOffset==FutureFileOffset && Descriptors.size()==1 && Descriptors.begin()->second.StreamKind==Stream_Text)
- Frame_Count_NotParsedIncluded=0;
-
- if (Descriptors.size()==1 && Descriptors.begin()->second.ByteRate!=(int32u)-1 && Descriptors.begin()->second.SampleRate)
- {
- float64 BytePerFrame=Descriptors.begin()->second.ByteRate/Descriptors.begin()->second.SampleRate;
- float64 Frame_Count_NotParsedIncluded_Precise;
- if (FutureFileOffset>(StreamOffset_Offset+Buffer_Header_Size))
- Frame_Count_NotParsedIncluded_Precise=(FutureFileOffset-(StreamOffset_Offset+Buffer_Header_Size))/BytePerFrame; //In case of audio at frame rate not an integer
- else
- Frame_Count_NotParsedIncluded_Precise=0;
- Frame_Count_NotParsedIncluded=float64_int64s(Frame_Count_NotParsedIncluded_Precise);
- FrameInfo.DTS=float64_int64s(DTS_Delay*1000000000+((float64)Frame_Count_NotParsedIncluded_Precise)*1000000000/Descriptors.begin()->second.SampleRate);
- FrameInfo.PTS=FrameInfo.DTS;
- if (!Tracks.empty() && Tracks.begin()->second.EditRate) //TODO: use the corresponding track instead of the first one
- FrameInfo.DUR=float64_int64s(1000000000/Tracks.begin()->second.EditRate);
- else if (!IndexTables.empty() && IndexTables[0].IndexEditRate)
- FrameInfo.DUR=float64_int64s(1000000000/IndexTables[0].IndexEditRate);
- else
- FrameInfo.DUR=float64_int64s(1000000000/Descriptors.begin()->second.SampleRate);
- Demux_random_access=true;
- }
- else if (!IndexTables.empty() && IndexTables[0].EditUnitByteCount)
- {
- int64u Position=0;
- Frame_Count_NotParsedIncluded=0;
- for (size_t Pos=0; Pos<IndexTables.size(); Pos++)
- {
- if (IndexTables[0].IndexDuration && FutureFileOffset>=((Buffer_End?Buffer_Begin:(StreamOffset_Offset+Buffer_Header_Size))+Position)+IndexTables[Pos].IndexDuration*IndexTables[Pos].EditUnitByteCount) //Considering IndexDuration=0 as unlimited
- {
- Position+=SDTI_SizePerFrame+IndexTables[Pos].EditUnitByteCount*IndexTables[Pos].IndexDuration;
- Frame_Count_NotParsedIncluded+=IndexTables[Pos].IndexDuration;
- }
- else
- {
- int64u FramesToAdd;
- if (FutureFileOffset>((Buffer_End?Buffer_Begin:(StreamOffset_Offset+Buffer_Header_Size))+Position))
- FramesToAdd=(FutureFileOffset-((Buffer_End?Buffer_Begin:(StreamOffset_Offset+Buffer_Header_Size))+Position))/IndexTables[Pos].EditUnitByteCount;
- else
- FramesToAdd=0;
- Position+=(SDTI_SizePerFrame+IndexTables[Pos].EditUnitByteCount)*FramesToAdd;
- if (IndexTables[Pos].IndexEditRate)
- {
- if (Descriptors.size()==1 && Descriptors.begin()->second.SampleRate!=IndexTables[Pos].IndexEditRate)
- {
- float64 Frame_Count_NotParsedIncluded_Precise=((float64)FramesToAdd)/IndexTables[Pos].IndexEditRate*Descriptors.begin()->second.SampleRate;
- Frame_Count_NotParsedIncluded+=float64_int64s(((float64)FramesToAdd)/IndexTables[Pos].IndexEditRate*Descriptors.begin()->second.SampleRate);
- FrameInfo.PTS=FrameInfo.DTS=float64_int64s(DTS_Delay*1000000000+((float64)Frame_Count_NotParsedIncluded_Precise)*1000000000/Descriptors.begin()->second.SampleRate);
- }
- else
- {
- Frame_Count_NotParsedIncluded+=FramesToAdd;
- FrameInfo.PTS=FrameInfo.DTS=float64_int64s(DTS_Delay*1000000000+((float64)Frame_Count_NotParsedIncluded)*1000000000/IndexTables[Pos].IndexEditRate);
- }
- }
- else
- FrameInfo.PTS=FrameInfo.DTS=(int64u)-1;
- Demux_random_access=true;
-
- break;
- }
- }
- }
- else if (!IndexTables.empty() && !IndexTables[0].Entries.empty())
- {
- int64u StreamOffset;
- if (StreamOffset_Offset<FutureFileOffset)
- StreamOffset=FutureFileOffset-StreamOffset_Offset;
- else
- StreamOffset=0;
- for (size_t Pos=0; Pos<IndexTables.size(); Pos++)
- {
- //Searching the right index
- if (!IndexTables[Pos].Entries.empty() && StreamOffset>=IndexTables[Pos].Entries[0].StreamOffset+(IndexTables[Pos].IndexStartPosition)*SDTI_SizePerFrame && (Pos+1>=IndexTables.size() || IndexTables[Pos+1].Entries.empty() || StreamOffset<IndexTables[Pos+1].Entries[0].StreamOffset+(IndexTables[Pos+1].IndexStartPosition)*SDTI_SizePerFrame))
- {
- //Searching the frame pos
- for (size_t EntryPos=0; EntryPos<IndexTables[Pos].Entries.size(); EntryPos++)
- {
- //Testing coherency
- int64u Entry0_StreamOffset=0; //For coherency checking
- int64u Entry_StreamOffset=IndexTables[Pos].Entries[EntryPos].StreamOffset+(IndexTables[Pos].IndexStartPosition+EntryPos)*SDTI_SizePerFrame;
- int64u Entry1_StreamOffset=File_Size; //For coherency checking
- if (EntryPos==0 && Pos && !IndexTables[Pos-1].Entries.empty())
- Entry0_StreamOffset=IndexTables[Pos-1].Entries[IndexTables[Pos-1].Entries.size()-1].StreamOffset+(IndexTables[Pos].IndexStartPosition+EntryPos-1)*SDTI_SizePerFrame;
- else if (EntryPos)
- Entry0_StreamOffset=IndexTables[Pos].Entries[EntryPos-1].StreamOffset+(IndexTables[Pos].IndexStartPosition+EntryPos-1)*SDTI_SizePerFrame;
- if (EntryPos+1<IndexTables[Pos].Entries.size())
- Entry1_StreamOffset=IndexTables[Pos].Entries[EntryPos+1].StreamOffset+(IndexTables[Pos].IndexStartPosition+EntryPos+1)*SDTI_SizePerFrame;
- else if (Pos+1<IndexTables.size() && !IndexTables[Pos+1].Entries.empty())
- Entry1_StreamOffset=IndexTables[Pos+1].Entries[0].StreamOffset+(IndexTables[Pos].IndexStartPosition+EntryPos+1)*SDTI_SizePerFrame;
-
- if (Entry0_StreamOffset>Entry_StreamOffset || Entry_StreamOffset>Entry1_StreamOffset)
- break; //Problem
-
- if (StreamOffset>=Entry_StreamOffset && StreamOffset<Entry1_StreamOffset)
- {
- //Special case: we are not sure the last index is the last frame, doing nothing
- if (Pos+1==IndexTables.size() && EntryPos+1==IndexTables[Pos].Entries.size())
- break;
-
- Frame_Count_NotParsedIncluded=IndexTables[Pos].IndexStartPosition+EntryPos;
- if (IndexTables[Pos].IndexEditRate)
- FrameInfo.DTS=float64_int64s(DTS_Delay*1000000000+((float64)Frame_Count_NotParsedIncluded)/IndexTables[Pos].IndexEditRate*1000000000);
- Demux_random_access=IndexTables[Pos].Entries[EntryPos].Type?false:true;
- break;
- }
- }
- }
- }
- }
- else if (OverallBitrate_IsCbrForSure)
- {
- int64u Begin=Partitions[0].StreamOffset+Partitions[0].PartitionPackByteCount+Partitions[0].HeaderByteCount+Partitions[0].IndexByteCount;
- Frame_Count_NotParsedIncluded=(FutureFileOffset-Begin)/OverallBitrate_IsCbrForSure;
- if (!Descriptors.empty() && Descriptors.begin()->second.SampleRate)
- FrameInfo.PTS=FrameInfo.DTS=float64_int64s(DTS_Delay*1000000000+((float64)Frame_Count_NotParsedIncluded)*1000000000/Descriptors.begin()->second.SampleRate);
- }
- else if (Frame_Count_NotParsedIncluded==0)
- {
- FrameInfo.DTS=float64_int64s(DTS_Delay*1000000000);
- }
-
- #endif //if MEDIAINFO_DEMUX || MEDIAINFO_SEEK
-
- if (!Tracks.empty() && Tracks.begin()->second.EditRate) //TODO: use the corresponding track instead of the first one
- FrameInfo.DUR=float64_int64s(1000000000/Tracks.begin()->second.EditRate);
- #if MEDIAINFO_DEMUX || MEDIAINFO_SEEK
- else if (!IndexTables.empty() && IndexTables[0].IndexEditRate)
- FrameInfo.DUR=float64_int64s(1000000000/IndexTables[0].IndexEditRate);
- #endif //if MEDIAINFO_DEMUX || MEDIAINFO_SEEK
-
- for (essences::iterator Essence=Essences.begin(); Essence!=Essences.end(); ++Essence)
- for (parsers::iterator Parser=Essence->second.Parsers.begin(); Parser!=Essence->second.Parsers.end(); ++Parser)
- {
- (*Parser)->Open_Buffer_Unsynch();
- Essence->second.FrameInfo=FrameInfo;
- Essence->second.Frame_Count_NotParsedIncluded=Frame_Count_NotParsedIncluded;
- }
-
- Partitions_Pos=0;
- if (Partitions_IsCalculatingHeaderByteCount)
- {
- Partitions.erase(Partitions.end()-1);
- Partitions_IsCalculatingHeaderByteCount=false;
- }
- if (Partitions_IsCalculatingSdtiByteCount)
- Partitions_IsCalculatingSdtiByteCount=false;
-
- #if MEDIAINFO_SEEK
- IndexTables_Pos=0;
- #endif //MEDIAINFO_SEEK
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX || MEDIAINFO_SEEK
-bool File_Mxf::DetectDuration ()
-{
- if (Duration_Detected)
- return false;
-
- MediaInfo_Internal MI;
- MI.Option(__T("File_IsDetectingDuration"), __T("1"));
- MI.Option(__T("File_KeepInfo"), __T("1"));
- Ztring ParseSpeed_Save=MI.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI.Option(__T("Demux_Get"), __T(""));
- MI.Option(__T("ParseSpeed"), __T("0"));
- MI.Option(__T("Demux"), Ztring());
- size_t MiOpenResult=MI.Open(File_Name);
- MI.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (!MiOpenResult || MI.Get(Stream_General, 0, General_Format)!=__T("MXF"))
- return false;
- Partitions=((File_Mxf*)MI.Info)->Partitions;
- std::sort(Partitions.begin(), Partitions.end());
- IndexTables=((File_Mxf*)MI.Info)->IndexTables;
- std::sort(IndexTables.begin(), IndexTables.end());
- SDTI_SizePerFrame=((File_Mxf*)MI.Info)->SDTI_SizePerFrame;
- Clip_Begin=((File_Mxf*)MI.Info)->Clip_Begin;
- Clip_End=((File_Mxf*)MI.Info)->Clip_End;
- Clip_Header_Size=((File_Mxf*)MI.Info)->Clip_Header_Size;
- Clip_Code=((File_Mxf*)MI.Info)->Clip_Code;
- Tracks=((File_Mxf*)MI.Info)->Tracks; //In one file (*-009.mxf), the TrackNumber is known only at the end of the file (Open and incomplete header/footer)
- for (tracks::iterator Track=Tracks.begin(); Track!=Tracks.end(); ++Track)
- Track->second.Stream_Finish_Done=false; //Reseting the value, it is not done in this instance
- if (MI.Get(Stream_General, 0, General_OverallBitRate_Mode)==__T("CBR") && Partitions.size()==2 && Partitions[0].FooterPartition==Partitions[1].StreamOffset && !Descriptors.empty())
- {
- //Searching duration
- int64u Duration=0;
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- if (Descriptor->second.Duration!=(int64u)-1 && Descriptor->second.Duration)
- {
- if (Duration && Duration!=Descriptor->second.Duration)
- {
- Duration=0;
- break; //Not supported
- }
- Duration=Descriptor->second.Duration;
- }
-
- //Computing the count of bytes per frame
- if (Duration)
- {
- int64u Begin=Partitions[0].StreamOffset+Partitions[0].PartitionPackByteCount+Partitions[0].HeaderByteCount+Partitions[0].IndexByteCount;
- float64 BytesPerFrameF=((float64)(Partitions[0].FooterPartition-Begin)/Duration);
- OverallBitrate_IsCbrForSure=float64_int64s(BytesPerFrameF);
- if (OverallBitrate_IsCbrForSure!=BytesPerFrameF) //Testing integrity of the computing
- OverallBitrate_IsCbrForSure=0;
- }
- }
- Duration_Detected=true;
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX || MEDIAINFO_SEEK
-
-#if MEDIAINFO_SEEK
-size_t File_Mxf::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- #if defined(MEDIAINFO_REFERENCES_YES)
- if (ReferenceFiles)
- return ReferenceFiles->Seek(Method, Value, ID);
- #endif //defined(MEDIAINFO_REFERENCES_YES)
-
- //Init
- if (!Duration_Detected)
- {
- if (!DetectDuration())
- return 0;
- }
-
- //Config - TODO: merge with the one in Data_Parse()
- if (!Essences_FirstEssence_Parsed)
- {
- //Searching single descriptor if it is the only valid descriptor
- descriptors::iterator SingleDescriptor=Descriptors.end();
- for (descriptors::iterator SingleDescriptor_Temp=Descriptors.begin(); SingleDescriptor_Temp!=Descriptors.end(); ++SingleDescriptor_Temp)
- if (SingleDescriptor_Temp->second.StreamKind!=Stream_Max)
- {
- if (SingleDescriptor!=Descriptors.end())
- {
- SingleDescriptor=Descriptors.end();
- break; // 2 or more descriptors, can not be used
- }
- SingleDescriptor=SingleDescriptor_Temp;
- }
-
- if (SingleDescriptor!=Descriptors.end() && SingleDescriptor->second.StreamKind==Stream_Audio)
- {
- //Configuring bitrate is not available in descriptor
- if (Descriptors.begin()->second.ByteRate==(int32u)-1 && Descriptors.begin()->second.Infos.find("SamplingRate")!=Descriptors.begin()->second.Infos.end())
- {
- int32u SamplingRate=Descriptors.begin()->second.Infos["SamplingRate"].To_int32u();
-
- if (Descriptors.begin()->second.BlockAlign!=(int16u)-1)
- Descriptors.begin()->second.ByteRate=SamplingRate*Descriptors.begin()->second.BlockAlign;
- else if (Descriptors.begin()->second.QuantizationBits!=(int8u)-1)
- Descriptors.begin()->second.ByteRate=SamplingRate*Descriptors.begin()->second.QuantizationBits/8;
- }
- }
-
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- {
- //Configuring EditRate if needed (e.g. audio at 48000 Hz)
- if (Descriptor->second.SampleRate>1000)
- {
- float64 EditRate_FromTrack=DBL_MAX;
- for (tracks::iterator Track=Tracks.begin(); Track!=Tracks.end(); ++Track)
- if (Track->second.EditRate && EditRate_FromTrack>Track->second.EditRate)
- EditRate_FromTrack=Track->second.EditRate;
- if (EditRate_FromTrack>1000)
- EditRate_FromTrack=Demux_Rate; //Default value;
- Descriptor->second.SampleRate=EditRate_FromTrack;
- for (tracks::iterator Track=Tracks.begin(); Track!=Tracks.end(); ++Track)
- if (Track->second.EditRate>EditRate_FromTrack)
- {
- Track->second.EditRate_Real=Track->second.EditRate;
- Track->second.EditRate=EditRate_FromTrack;
- }
- }
- }
-
- Essences_FirstEssence_Parsed=true;
- }
- //Parsing
- switch (Method)
- {
- case 0 :
- {
- if (Config->File_IgnoreEditsBefore && Config->File_EditRate)
- {
- Read_Buffer_Seek(3, 0, (int64u)-1);
- if (File_GoTo!=(int64u)-1)
- Value+=File_GoTo;
- }
-
- //Calculating the byte count not included in seek information (partition, index...)
- Partitions_Pos=0;
- while (Partitions_Pos<Partitions.size() && Partitions[Partitions_Pos].StreamOffset<Value)
- Partitions_Pos++;
- if (Partitions_Pos && (Partitions_Pos==Partitions.size() || Partitions[Partitions_Pos].StreamOffset!=Value))
- Partitions_Pos--; //This is the previous item
- if (Partitions_Pos>=Partitions.size())
- {
- GoTo(0);
- Open_Buffer_Unsynch();
- return 1;
- }
- int64u StreamOffset_Offset=Partitions[Partitions_Pos].StreamOffset-Partitions[Partitions_Pos].BodyOffset+Partitions[Partitions_Pos].PartitionPackByteCount+Partitions[Partitions_Pos].HeaderByteCount+Partitions[Partitions_Pos].IndexByteCount;
-
- //If in header
- if ((Clip_Begin!=(int64u)-1 && Value<Clip_Begin) || Value<StreamOffset_Offset)
- {
- GoTo(StreamOffset_Offset);
- Open_Buffer_Unsynch();
- return 1;
- }
-
- if (Buffer_End
- && Descriptors.size()==1 && Descriptors.begin()->second.ByteRate!=(int32u)-1 && Descriptors.begin()->second.BlockAlign && Descriptors.begin()->second.BlockAlign!=(int16u)-1 && Descriptors.begin()->second.SampleRate)
- {
- if (Value>StreamOffset_Offset)
- {
- float64 BytesPerFrame=Descriptors.begin()->second.ByteRate/Descriptors.begin()->second.SampleRate;
- int64u FrameCount=(int64u)((Value-Buffer_Begin)/BytesPerFrame);
- int64u SizeBlockAligned=float64_int64s(FrameCount*BytesPerFrame);
- SizeBlockAligned/=Descriptors.begin()->second.BlockAlign;
- SizeBlockAligned*=Descriptors.begin()->second.BlockAlign;
-
- GoTo(Buffer_Begin+SizeBlockAligned);
- Open_Buffer_Unsynch();
- return 1;
- }
- }
- else if (Buffer_End
- && !IndexTables.empty() && IndexTables[0].EditUnitByteCount)
- {
- int64u Stream_Offset=0;
- for (size_t Pos=0; Pos<IndexTables.size(); Pos++)
- {
- if (IndexTables[Pos].IndexDuration==0 || Value<StreamOffset_Offset+Stream_Offset+IndexTables[Pos].IndexDuration*IndexTables[Pos].EditUnitByteCount)
- {
- int64u FrameToAdd=(Value-(StreamOffset_Offset+Stream_Offset))/IndexTables[Pos].EditUnitByteCount;
- Stream_Offset+=FrameToAdd*IndexTables[Pos].EditUnitByteCount;
-
- GoTo(Buffer_Begin+Stream_Offset);
- Open_Buffer_Unsynch();
- return 1;
- }
- else
- Stream_Offset+=IndexTables[Pos].IndexDuration*IndexTables[Pos].EditUnitByteCount;
- }
- return 2; //Invalid value
- }
-
- GoTo(Value);
- Open_Buffer_Unsynch();
- return 1;
- }
- case 1 :
- return Read_Buffer_Seek(0, File_Size*Value/10000, ID);
- case 2 : //Timestamp
- {
- //We transform TimeStamp to a frame number
- descriptors::iterator Descriptor;
- for (Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- if (Descriptor->second.SampleRate)
- break;
- if (Descriptor==Descriptors.end())
- return (size_t)-1; //Not supported
-
- else if (MxfTimeCodeForDelay.StartTimecode!=(int64u)-1)
- {
- int64u Delay=float64_int64s(DTS_Delay*1000000000);
- if (Value<Delay)
- return 2; //Invalid value
- Value-=Delay;
- }
- Value=float64_int64s(((float64)Value)/1000000000*Descriptor->second.SampleRate);
- }
- //No break;
- case 3 : //FrameNumber
- Value+=Config->File_IgnoreEditsBefore;
-
- if (Descriptors.size()==1 && Descriptors.begin()->second.ByteRate!=(int32u)-1 && Descriptors.begin()->second.BlockAlign && Descriptors.begin()->second.BlockAlign!=(int16u)-1 && Descriptors.begin()->second.SampleRate)
- {
- if (Descriptors.begin()->second.SampleRate!=Config->File_EditRate && Config->File_IgnoreEditsBefore)
- {
- //Edit rate and Demux rate are different, not well supported for the moment
- Value-=Config->File_IgnoreEditsBefore;
- Value+=float64_int64s(((float64)Config->File_IgnoreEditsBefore)/Config->File_EditRate*Descriptors.begin()->second.SampleRate);
- }
-
- float64 BytesPerFrame=Descriptors.begin()->second.ByteRate/Descriptors.begin()->second.SampleRate;
- int64u StreamOffset=(int64u)(Value*BytesPerFrame);
- StreamOffset/=Descriptors.begin()->second.BlockAlign;
- StreamOffset*=Descriptors.begin()->second.BlockAlign;
-
- //Calculating the byte count not included in seek information (partition, index...)
- int64u StreamOffset_Offset=0;
- Partitions_Pos=0;
- while (Partitions_Pos<Partitions.size() && Partitions[Partitions_Pos].StreamOffset<=StreamOffset_Offset+StreamOffset+Value*SDTI_SizePerFrame)
- {
- StreamOffset_Offset+=Partitions[Partitions_Pos].PartitionPackByteCount+Partitions[Partitions_Pos].HeaderByteCount+Partitions[Partitions_Pos].IndexByteCount;
- Partitions_Pos++;
- }
-
- if (Clip_Begin!=(int64u)-1)
- {
- Buffer_Begin=Clip_Begin;
- Buffer_End=Clip_End;
- Buffer_Header_Size=Clip_Header_Size;
- Code=Clip_Code;
- MustSynchronize=false;
- #if MEDIAINFO_DEMUX
- if (Buffer_End && Demux_UnpacketizeContainer && Essences.size()==1 && Essences.begin()->second.Parsers.size()==1 && (*(Essences.begin()->second.Parsers.begin()))->Demux_UnpacketizeContainer)
- {
- (*(Essences.begin()->second.Parsers.begin()))->Demux_Level=2; //Container
- (*(Essences.begin()->second.Parsers.begin()))->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- }
-
- GoTo(StreamOffset_Offset+Buffer_Header_Size+StreamOffset+Value*SDTI_SizePerFrame);
- Open_Buffer_Unsynch();
- return 1;
- }
- else if (!IndexTables.empty() && IndexTables[0].EditUnitByteCount)
- {
- if (Descriptors.size()==1 && Descriptors.begin()->second.SampleRate!=IndexTables[0].IndexEditRate)
- {
- float64 ValueF=(float64)Value;
- ValueF/=Descriptors.begin()->second.SampleRate;
- ValueF*=IndexTables[0].IndexEditRate;
- Value=float64_int64s(ValueF);
- }
-
- if (IndexTables[IndexTables.size()-1].IndexDuration && IndexTables[IndexTables.size()-1].IndexStartPosition!=(int64u)-1 && Value>=IndexTables[IndexTables.size()-1].IndexStartPosition+IndexTables[IndexTables.size()-1].IndexDuration) //Considering IndexDuration=0 as unlimited
- return 2; //Invalid value
-
- int64u StreamOffset=0;
- for (size_t Pos=0; Pos<IndexTables.size(); Pos++)
- {
- if (IndexTables[Pos].IndexDuration && Value>IndexTables[Pos].IndexStartPosition+IndexTables[Pos].IndexDuration) //Considering IndexDuration=0 as unlimited
- StreamOffset+=IndexTables[Pos].EditUnitByteCount*IndexTables[Pos].IndexDuration;
- else
- {
- StreamOffset+=IndexTables[Pos].EditUnitByteCount*(Value-IndexTables[Pos].IndexStartPosition);
- break;
- }
- }
-
- //Calculating the byte count not included in seek information (partition, index...)
- int64u StreamOffset_Offset=0;
- Partitions_Pos=0;
- while (Partitions_Pos<Partitions.size() && Partitions[Partitions_Pos].StreamOffset<=StreamOffset_Offset+StreamOffset+Value*SDTI_SizePerFrame)
- {
- StreamOffset_Offset+=Partitions[Partitions_Pos].PartitionPackByteCount+Partitions[Partitions_Pos].HeaderByteCount+Partitions[Partitions_Pos].IndexByteCount;
- Partitions_Pos++;
- }
-
- if (Clip_Begin!=(int64u)-1)
- {
- Buffer_Begin=Clip_Begin;
- Buffer_End=Clip_End;
- Buffer_Header_Size=Clip_Header_Size;
- Code=Clip_Code;
- MustSynchronize=false;
- #if MEDIAINFO_DEMUX
- if (Buffer_End && Demux_UnpacketizeContainer && Essences.size()==1 && Essences.begin()->second.Parsers.size()==1 && (*(Essences.begin()->second.Parsers.begin()))->Demux_UnpacketizeContainer)
- {
- (*(Essences.begin()->second.Parsers.begin()))->Demux_Level=2; //Container
- (*(Essences.begin()->second.Parsers.begin()))->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- }
-
- GoTo(StreamOffset_Offset+Buffer_Header_Size+StreamOffset+Value*SDTI_SizePerFrame);
- Open_Buffer_Unsynch();
- return 1;
- }
- else if (!IndexTables.empty() && !IndexTables[0].Entries.empty())
- {
- for (size_t Pos=0; Pos<IndexTables.size(); Pos++)
- {
- if (Value>=IndexTables[Pos].IndexStartPosition && Value<IndexTables[Pos].IndexStartPosition+IndexTables[Pos].IndexDuration)
- {
- while (Value>=IndexTables[Pos].IndexStartPosition && IndexTables[Pos].Entries[(size_t)(Value-IndexTables[Pos].IndexStartPosition)].Type)
- {
- Value--;
- if (Value<IndexTables[Pos].IndexStartPosition)
- {
- if (Pos==0)
- break; //There is a problem
- Pos--; //In previous index
- }
- }
-
- int64u StreamOffset=IndexTables[Pos].Entries[(size_t)(Value-IndexTables[Pos].IndexStartPosition)].StreamOffset;
-
- //Calculating the byte count not included in seek information (partition, index...)
- int64u StreamOffset_Offset=0;
- Partitions_Pos=0;
- while (Partitions_Pos<Partitions.size() && Partitions[Partitions_Pos].StreamOffset<=StreamOffset_Offset+StreamOffset+Value*SDTI_SizePerFrame)
- {
- StreamOffset_Offset+=Partitions[Partitions_Pos].PartitionPackByteCount+Partitions[Partitions_Pos].HeaderByteCount+Partitions[Partitions_Pos].IndexByteCount;
- Partitions_Pos++;
- }
-
- if (Clip_Begin!=(int64u)-1)
- {
- Buffer_Begin=Clip_Begin;
- Buffer_End=Clip_End;
- Buffer_Header_Size=Clip_Header_Size;
- Code=Clip_Code;
- MustSynchronize=false;
- #if MEDIAINFO_DEMUX
- if (Buffer_End && Demux_UnpacketizeContainer && Essences.size()==1 && Essences.begin()->second.Parsers.size()==1 && (*(Essences.begin()->second.Parsers.begin()))->Demux_UnpacketizeContainer)
- {
- (*(Essences.begin()->second.Parsers.begin()))->Demux_Level=2; //Container
- (*(Essences.begin()->second.Parsers.begin()))->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- }
-
- GoTo(StreamOffset_Offset+Buffer_Header_Size+StreamOffset+Value*SDTI_SizePerFrame);
- Open_Buffer_Unsynch();
- return 1;
- }
- }
- return 2; //Invalid value
- }
- else if (OverallBitrate_IsCbrForSure)
- {
- int64u Begin=Partitions[0].StreamOffset+Partitions[0].PartitionPackByteCount+Partitions[0].HeaderByteCount+Partitions[0].IndexByteCount;
- GoTo(Begin+Value*OverallBitrate_IsCbrForSure);
- Open_Buffer_Unsynch();
- return 1;
- }
- else
- return (size_t)-1; //Not supported
- default : return (size_t)-1; //Not supported
- }
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Mxf::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<0x18)
- return false; //Must wait for more data
-
- //AAF has some MXF start codes
- if (Buffer[ 0x0]==0xD0
- && Buffer[ 0x1]==0xCF
- && Buffer[ 0x2]==0x11
- && Buffer[ 0x3]==0xE0
- && Buffer[ 0x4]==0xA1
- && Buffer[ 0x5]==0xB1
- && Buffer[ 0x6]==0x1A
- && Buffer[ 0x7]==0xE1
- && Buffer[ 0x8]==0x41
- && Buffer[ 0x9]==0x41
- && Buffer[ 0xA]==0x46
- && Buffer[ 0xB]==0x42
- && Buffer[ 0xC]==0x0D
- && Buffer[ 0xD]==0x00
- && Buffer[ 0xE]==0x4F
- && Buffer[ 0xF]==0x4D
- && Buffer[0x10]==0x06
- && Buffer[0x11]==0x0E
- && Buffer[0x12]==0x2B
- && Buffer[0x13]==0x34
- && Buffer[0x14]==0x01
- && Buffer[0x15]==0x01
- && Buffer[0x16]==0x01
- && Buffer[0x17]==0xFF)
- {
- Reject("Mxf");
- return false;
- }
-
- //DCA uses buffer interface without filename
- if (File_Name.empty())
- File_Name=Config->File_FileName_Get();
-
- return true;
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Mxf::Synchronize()
-{
- //Synchronizing
- while (Buffer_Offset+4<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x06
- || Buffer[Buffer_Offset+1]!=0x0E
- || Buffer[Buffer_Offset+2]!=0x2B
- || Buffer[Buffer_Offset+3]!=0x34))
- {
- Buffer_Offset++;
- while (Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x06)
- Buffer_Offset++;
- }
-
-
- while (Buffer_Offset+4<=Buffer_Size
- && CC4(Buffer+Buffer_Offset)!=0x060E2B34)
- Buffer_Offset++;
-
- //Parsing last bytes if needed
- if (Buffer_Offset+4>Buffer_Size)
- {
- if (Buffer_Offset+3==Buffer_Size && CC3(Buffer+Buffer_Offset)!=0x060E2B)
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && CC2(Buffer+Buffer_Offset)!=0x060E)
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && CC1(Buffer+Buffer_Offset)!=0x06)
- Buffer_Offset++;
- return false;
- }
-
- if (!Status[IsAccepted])
- {
- Accept();
-
- Fill(Stream_General, 0, General_Format, "MXF");
-
- File_Buffer_Size_Hint_Pointer=Config->File_Buffer_Size_Hint_Pointer_Get();
- }
-
- //Synched is OK
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Mxf::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+16>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (CC4(Buffer+Buffer_Offset)!=0x060E2B34)
- Synched=false;
-
- //Trace config
- #if MEDIAINFO_TRACE
- if (Synched)
- {
- int64u Compare=CC8(Buffer+Buffer_Offset+ 4);
- if (Compare==0x010201010D010301LL //Raw stream
- || (Compare==0x0101010203010210LL && CC1(Buffer+Buffer_Offset+12)==0x01) //Filler
- || (Compare==0x020501010D010301LL && CC3(Buffer+Buffer_Offset+12)==0x040101) //SDTI Package Metadata Pack
- || (Compare==0x024301010D010301LL && CC3(Buffer+Buffer_Offset+12)==0x040102) //SDTI Package Metadata Set
- || (Compare==0x025301010D010301LL && CC3(Buffer+Buffer_Offset+12)==0x140201)) //System Scheme 1
- {
- Trace_Layers_Update(8); //Stream
- }
- else
- {
- Trace_Layers_Update(0); //Container1
- }
- }
- #endif //MEDIAINFO_TRACE
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Mxf::Header_Begin()
-{
- while (Buffer_End)
- {
- #if MEDIAINFO_DEMUX
- //Searching single descriptor if it is the only valid descriptor
- descriptors::iterator SingleDescriptor=Descriptors.end();
- for (descriptors::iterator SingleDescriptor_Temp=Descriptors.begin(); SingleDescriptor_Temp!=Descriptors.end(); ++SingleDescriptor_Temp)
- if (SingleDescriptor_Temp->second.StreamKind!=Stream_Max)
- {
- if (SingleDescriptor!=Descriptors.end())
- {
- SingleDescriptor=Descriptors.end();
- break; // 2 or more descriptors, can not be used
- }
- SingleDescriptor=SingleDescriptor_Temp;
- }
-
- if (Demux_UnpacketizeContainer && SingleDescriptor!=Descriptors.end() && SingleDescriptor->second.ByteRate!=(int32u)-1 && SingleDescriptor->second.BlockAlign && SingleDescriptor->second.BlockAlign!=(int16u)-1 && SingleDescriptor->second.SampleRate)
- {
- float64 BytesPerFrame=((float64)SingleDescriptor->second.ByteRate)/SingleDescriptor->second.SampleRate;
- int64u FramesAlreadyParsed=float64_int64s(((float64)(File_Offset+Buffer_Offset-Buffer_Begin))/BytesPerFrame);
- Element_Size=float64_int64s(SingleDescriptor->second.ByteRate/SingleDescriptor->second.SampleRate*(FramesAlreadyParsed+1));
- #if MEDIAINFO_DEMUX
- Element_Size+=DemuxedElementSize_AddedToFirstFrame;
- #endif //MEDIAINFO_DEMUX
- Element_Size/=SingleDescriptor->second.BlockAlign;
- Element_Size*=SingleDescriptor->second.BlockAlign;
- Element_Size-=File_Offset+Buffer_Offset-Buffer_Begin;
- if (Config->File_IsGrowing && Element_Size && File_Offset+Buffer_Offset+Element_Size>Buffer_End)
- return false; //Waiting for more data
- while (Element_Size && File_Offset+Buffer_Offset+Element_Size>Buffer_End)
- Element_Size-=SingleDescriptor->second.BlockAlign;
- if (Element_Size==0)
- Element_Size=Buffer_End-(File_Offset+Buffer_Offset);
- if (Buffer_Offset+Element_Size>Buffer_Size)
- return false;
-
- #if MEDIAINFO_DEMUX
- if (!DemuxedSampleCount_Total && Config->Demux_Offset_DTS!=(int64u)-1 && Config->File_EditRate)
- {
- //Need to sync to a rounded value compared to the whole stream (including previous files)
- float64 TimeStamp=((float64)Config->Demux_Offset_DTS)/1000000000;
- int64u FramesBeForeThisFileMinusOne=(int64u)(TimeStamp*SingleDescriptor->second.SampleRate);
- if ((((float64)FramesBeForeThisFileMinusOne)/SingleDescriptor->second.SampleRate)!=TimeStamp)
- {
- float64 Delta=(((float64)FramesBeForeThisFileMinusOne+1)/SingleDescriptor->second.SampleRate)-TimeStamp;
- DemuxedSampleCount_AddedToFirstFrame=float64_int64s(Delta*Config->File_EditRate);
- DemuxedElementSize_AddedToFirstFrame=DemuxedSampleCount_AddedToFirstFrame*SingleDescriptor->second.BlockAlign;
- Element_Size+=DemuxedElementSize_AddedToFirstFrame;
- }
- }
- if (DemuxedSampleCount_Total!=(int64u)-1 && Config->File_IgnoreEditsAfter!=(int64u)-1)
- {
- DemuxedSampleCount_Current=Element_Size/SingleDescriptor->second.BlockAlign;
- int64u RealSampleRate=SingleDescriptor->second.Infos["SamplingRate"].To_int64u();
- int64u IgnoreSamplesAfter;
- if (RealSampleRate==Config->File_EditRate)
- IgnoreSamplesAfter=Config->File_IgnoreEditsAfter;
- else
- IgnoreSamplesAfter=float64_int64s(((float64)Config->File_IgnoreEditsAfter)/Config->File_EditRate*RealSampleRate);
- if (DemuxedSampleCount_Total+DemuxedSampleCount_Current>IgnoreSamplesAfter)
- {
- DemuxedSampleCount_Current=Config->File_IgnoreEditsAfter-DemuxedSampleCount_Total;
- Element_Size=DemuxedSampleCount_Current*SingleDescriptor->second.BlockAlign;
- }
- }
- #endif //MEDIAINFO_DEMUX
- }
- else if (Demux_UnpacketizeContainer && !IndexTables.empty() && IndexTables[0].EditUnitByteCount)
- {
- //Calculating the byte count not included in seek information (partition, index...)
- int64u StreamOffset_Offset;
- if (!Partitions.empty())
- {
- while (Partitions_Pos<Partitions.size() && Partitions[Partitions_Pos].StreamOffset<File_Offset+Buffer_Offset-Header_Size)
- Partitions_Pos++;
- if (Partitions_Pos && (Partitions_Pos==Partitions.size() || Partitions[Partitions_Pos].StreamOffset!=File_Offset+Buffer_Offset-Header_Size))
- Partitions_Pos--; //This is the previous item
- StreamOffset_Offset=Partitions[Partitions_Pos].StreamOffset-Partitions[Partitions_Pos].BodyOffset+Partitions[Partitions_Pos].PartitionPackByteCount+Partitions[Partitions_Pos].HeaderByteCount+Partitions[Partitions_Pos].IndexByteCount;
- }
- else
- StreamOffset_Offset=0;
-
- int64u Position=0;
- for (size_t Pos=0; Pos<IndexTables.size(); Pos++)
- {
- if (IndexTables[Pos].IndexDuration && File_Offset+Buffer_Offset>=StreamOffset_Offset+Buffer_Header_Size+Position+IndexTables[Pos].IndexDuration*IndexTables[Pos].EditUnitByteCount) //Considering IndexDuration==0 as unlimited
- Position+=IndexTables[Pos].EditUnitByteCount*IndexTables[Pos].IndexDuration;
- else
- {
- Element_Size=IndexTables[Pos].EditUnitByteCount;
- if (File_Offset+Buffer_Offset+Element_Size>Buffer_End)
- {
- Element_Size=Buffer_End-(File_Offset+Buffer_Offset);
- break; //There is a problem
- }
-
- if (Buffer_Offset+Element_Size>Buffer_Size)
- {
- //Hints
- if (File_Buffer_Size_Hint_Pointer)
- {
- size_t Buffer_Size_Target=(size_t)(Buffer_Offset+Element_Size-Buffer_Size+24); //+24 for next packet header
- if (Buffer_Size_Target<128*1024)
- Buffer_Size_Target=128*1024;
- //if ((*File_Buffer_Size_Hint_Pointer)<Buffer_Size_Target)
- (*File_Buffer_Size_Hint_Pointer)=Buffer_Size_Target;
- }
-
- return false;
- }
- break;
- }
- }
-
- if (Buffer_Offset+(size_t)Element_Size>Buffer_Size)
- Element_Size=Buffer_Size-Buffer_Offset; //There is a problem
- }
- else if (Demux_UnpacketizeContainer && !IndexTables.empty() && !IndexTables[0].Entries.empty())
- {
- //Calculating the byte count not included in seek information (partition, index...)
- int64u StreamOffset_Offset;
- if (!Partitions.empty())
- {
- while (Partitions_Pos<Partitions.size() && Partitions[Partitions_Pos].StreamOffset<File_Offset+Buffer_Offset-Header_Size)
- Partitions_Pos++;
- if (Partitions_Pos && (Partitions_Pos==Partitions.size() || Partitions[Partitions_Pos].StreamOffset!=File_Offset+Buffer_Offset-Header_Size))
- Partitions_Pos--; //This is the previous item
- StreamOffset_Offset=Partitions[Partitions_Pos].StreamOffset-Partitions[Partitions_Pos].BodyOffset+Partitions[Partitions_Pos].PartitionPackByteCount+Partitions[Partitions_Pos].HeaderByteCount+Partitions[Partitions_Pos].IndexByteCount;
- }
- else
- StreamOffset_Offset=0;
-
- int64u StreamOffset=File_Offset+Buffer_Offset-StreamOffset_Offset;
- for (size_t Pos=0; Pos<IndexTables.size(); Pos++)
- {
- //Searching the right index
- if (!IndexTables[Pos].Entries.empty() && StreamOffset>=IndexTables[Pos].Entries[0].StreamOffset+(IndexTables[Pos].IndexStartPosition)*SDTI_SizePerFrame && (Pos+1>=IndexTables.size() || StreamOffset<IndexTables[Pos+1].Entries[0].StreamOffset+(IndexTables[Pos+1].IndexStartPosition)*SDTI_SizePerFrame))
- {
- //Searching the frame pos
- for (size_t EntryPos=0; EntryPos<IndexTables[Pos].Entries.size(); EntryPos++)
- {
- //Testing coherency
- int64u Entry0_StreamOffset=0; //For coherency checking
- int64u Entry_StreamOffset=IndexTables[Pos].Entries[EntryPos].StreamOffset+(IndexTables[Pos].IndexStartPosition+EntryPos)*SDTI_SizePerFrame;
- int64u Entry1_StreamOffset=File_Size; //For coherency checking
- if (EntryPos==0 && Pos && !IndexTables[Pos-1].Entries.empty())
- Entry0_StreamOffset=IndexTables[Pos-1].Entries[IndexTables[Pos-1].Entries.size()-1].StreamOffset+(IndexTables[Pos].IndexStartPosition+EntryPos-1)*SDTI_SizePerFrame;
- else if (EntryPos)
- Entry0_StreamOffset=IndexTables[Pos].Entries[EntryPos-1].StreamOffset+(IndexTables[Pos].IndexStartPosition+EntryPos-1)*SDTI_SizePerFrame;
- if (EntryPos+1<IndexTables[Pos].Entries.size())
- Entry1_StreamOffset=IndexTables[Pos].Entries[EntryPos+1].StreamOffset+(IndexTables[Pos].IndexStartPosition+EntryPos+1)*SDTI_SizePerFrame;
- else if (Pos+1<IndexTables.size() && !IndexTables[Pos+1].Entries.empty())
- Entry1_StreamOffset=IndexTables[Pos+1].Entries[0].StreamOffset+(IndexTables[Pos].IndexStartPosition+EntryPos+1)*SDTI_SizePerFrame;
-
- if (Entry0_StreamOffset>Entry_StreamOffset || Entry_StreamOffset>Entry1_StreamOffset)
- break; //Problem
-
- if (StreamOffset>=Entry_StreamOffset && StreamOffset<Entry1_StreamOffset)
- {
- Element_Size=StreamOffset_Offset+Buffer_Header_Size+Entry1_StreamOffset-(File_Offset+Buffer_Offset);
- if (File_Offset+Buffer_Offset+Element_Size>Buffer_End)
- {
- Element_Size=Buffer_End-(File_Offset+Buffer_Offset);
- break; //There is a problem
- }
-
- if (Buffer_Offset+Element_Size>Buffer_Size)
- {
- //Hints
- if (File_Buffer_Size_Hint_Pointer)
- {
- size_t Buffer_Size_Target=(size_t)(Buffer_Offset+Element_Size-Buffer_Size+24); //+24 for next packet header
- if (Buffer_Size_Target<128*1024)
- Buffer_Size_Target=128*1024;
- //if ((*File_Buffer_Size_Hint_Pointer)<Buffer_Size_Target)
- (*File_Buffer_Size_Hint_Pointer)=Buffer_Size_Target;
- }
-
- return false;
- }
- break;
- }
- }
- }
- }
- }
- else
- #endif //MEDIAINFO_DEMUX
- if (File_Offset+Buffer_Size<=Buffer_End)
- Element_Size=Buffer_Size-Buffer_Offset; //All the buffer is used
- else
- Element_Size=Buffer_End-(File_Offset+Buffer_Offset);
-
- Element_Begin0();
- Data_Parse();
- Buffer_Offset+=(size_t)Element_Size;
- Element_Size-=Element_Offset;
- Element_Offset=0;
- Element_End0();
-
- if (Buffer_End && (File_Offset+Buffer_Offset+Element_Size>=Buffer_End || File_GoTo!=(int64u)-1) )
- {
- Buffer_Begin=(int64u)-1;
- Buffer_End=0;
- Buffer_End_Unlimited=false;
- Buffer_Header_Size=0;
- MustSynchronize=true;
- }
-
- if (Buffer_Offset>=Buffer_Size)
- return false;
-
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return false;
- #endif //MEDIAINFO_DEMUX
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Header_Parse()
-{
- //Parsing
- int64u Length;
- Get_UL(Code, "Code", NULL);
- Get_BER(Length, "Length");
- if (Element_IsWaitingForMoreData())
- return;
-
- if (Length==0
- && ((int32u)Code.hi)==Elements::GenericContainer_Aaf2
- && (((int32u)(Code.lo>>32))==Elements::GenericContainer_Aaf3 || ((int32u)(Code.lo>>32))==Elements::GenericContainer_Avid3)
- && Retrieve(Stream_General, 0, General_Format_Settings).find(__T(" / Incomplete"))!=string::npos
- )
- {
- if (Buffer_Offset+Element_Offset+4>Buffer_Size)
- {
- Element_WaitForMoreData();
- return;
- }
-
- if (BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset)!=0x060E2B34)
- {
- Buffer_End_Unlimited=true;
- Length=File_Size-(File_Offset+Buffer_Offset+Element_Offset);
- }
- }
-
- if (Config->File_IsGrowing && File_Offset+Buffer_Offset+Element_Offset+Length>File_Size)
- {
- Element_WaitForMoreData();
- return;
- }
-
- if (Length==0 && Essences.empty() && Retrieve(Stream_General, 0, General_Format_Settings).find(__T(" / Incomplete"))!=string::npos)
- {
- if (Buffer_Offset+Element_Offset+4>Buffer_Size)
- {
- Element_WaitForMoreData();
- return;
- }
-
- if (BigEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset)!=0x060E2B34)
- {
- Buffer_End_Unlimited=true;
- Length=File_Size-(File_Offset+Buffer_Offset+Element_Offset);
- }
- }
-
- if (Config->File_IsGrowing && File_Offset+Buffer_Offset+Element_Offset+Length>File_Size)
- {
- Element_WaitForMoreData();
- return;
- }
-
- //Filling
- int32u Code_Compare1=Code.hi>>32;
- int32u Code_Compare2=(int32u)Code.hi;
- int32u Code_Compare3=Code.lo>>32;
- int32u Code_Compare4=(int32u)Code.lo;
- if (Partitions_IsCalculatingHeaderByteCount)
- {
- if (!(Code_Compare1==Elements::Filler011
- && (Code_Compare2&0xFFFFFF00)==(Elements::Filler012&0xFFFFFF00)
- && Code_Compare3==Elements::Filler013))
- {
- Partitions_IsCalculatingHeaderByteCount=false;
- if (Partitions_Pos<Partitions.size())
- Partitions[Partitions_Pos].PartitionPackByteCount=File_Offset+Buffer_Offset-Partitions[Partitions_Pos].StreamOffset;
- }
- }
- if (Partitions_IsCalculatingSdtiByteCount)
- {
- if (!((Code_Compare1==Elements::SDTI_SystemMetadataPack1
- && (Code_Compare2&0xFF00FFFF)==(Elements::SDTI_SystemMetadataPack2&0xFF00FFFF) //Independent of Category
- && Code_Compare3==Elements::SDTI_SystemMetadataPack3
- && (Code_Compare4&0xFFFF0000)==(Elements::SDTI_SystemMetadataPack4&0xFFFF0000))
- || ((Code_Compare1==Elements::Filler011
- && (Code_Compare2&0xFFFFFF00)==(Elements::Filler012&0xFFFFFF00)
- && Code_Compare3==Elements::Filler013))))
- {
- if (Partitions_Pos<Partitions.size() && !SDTI_IsInIndexStreamOffset)
- SDTI_SizePerFrame=File_Offset+Buffer_Offset-(Partitions[Partitions_Pos].StreamOffset+Partitions[Partitions_Pos].PartitionPackByteCount+Partitions[Partitions_Pos].HeaderByteCount);
- Partitions_IsCalculatingSdtiByteCount=false;
- }
- }
-
- #if MEDIAINFO_NEXTPACKET && MEDIAINFO_DEMUX
- if (!Demux_HeaderParsed && !Partitions.empty() && Partitions[Partitions.size()-1].StreamOffset+Partitions[Partitions.size()-1].PartitionPackByteCount+Partitions[Partitions.size()-1].HeaderByteCount+Partitions[Partitions.size()-1].IndexByteCount==File_Offset+Buffer_Offset)
- {
- Demux_HeaderParsed=true;
-
- //Testing locators
- Locators_CleanUp();
-
- if (Config->File_IgnoreEditsBefore && !Config->File_IsDetectingDuration_Get())
- Open_Buffer_Seek(3, 0, (int64u)-1); //Forcing seek to Config->File_IgnoreEditsBefore
- if (Config->NextPacket_Get() && Config->Event_CallBackFunction_IsSet())
- {
- if (Locators.empty())
- {
- Config->Demux_EventWasSent=true; //First set is to indicate the user that header is parsed
- return;
- }
- }
- }
- #endif //MEDIAINFO_NEXTPACKET && MEDIAINFO_DEMUX
-
- #if MEDIAINFO_DEMUX || MEDIAINFO_SEEK
- if (IsParsingEnd && PartitionPack_Parsed && !Partitions.empty() && Partitions[Partitions.size()-1].StreamOffset+Partitions[Partitions.size()-1].PartitionPackByteCount+Partitions[Partitions.size()-1].HeaderByteCount+Partitions[Partitions.size()-1].IndexByteCount==File_Offset+Buffer_Offset
- && !(Code_Compare1==Elements::RandomIndexMetadata1 && Code_Compare2==Elements::RandomIndexMetadata2 && Code_Compare3==Elements::RandomIndexMetadata3 && Code_Compare4==Elements::RandomIndexMetadata4))
- {
- if (RandomIndexMetadatas.empty())
- {
- if (!RandomIndexMetadatas_AlreadyParsed)
- {
- Partitions_Pos=0;
- while (Partitions_Pos<Partitions.size() && Partitions[Partitions_Pos].StreamOffset!=PartitionMetadata_PreviousPartition)
- Partitions_Pos++;
- if (Partitions_Pos==Partitions.size())
- {
- GoTo(PartitionMetadata_PreviousPartition);
- Open_Buffer_Unsynch();
- }
- else
- TryToFinish();
- }
- }
- else
- {
- GoTo(RandomIndexMetadatas[0].ByteOffset);
- RandomIndexMetadatas.erase(RandomIndexMetadatas.begin());
- PartitionPack_Parsed=false;
- Open_Buffer_Unsynch();
- }
- return;
- }
- #endif //MEDIAINFO_DEMUX || MEDIAINFO_SEEK
-
- if (Buffer_Offset+Element_Offset+Length>(size_t)-1 || Buffer_Offset+(size_t)(Element_Offset+Length)>Buffer_Size) //Not complete
- {
- if (Length>File_Size/2) //Divided by 2 for testing if this is a big chunk = Clip based and not frames.
- {
- //Calculating the byte count not included in seek information (partition, index...)
- int64u StreamOffset_Offset;
- if (!Partitions.empty())
- {
- while (Partitions_Pos<Partitions.size() && Partitions[Partitions_Pos].StreamOffset<File_Offset+Buffer_Offset-Header_Size)
- Partitions_Pos++;
- if (Partitions_Pos && (Partitions_Pos==Partitions.size() || Partitions[Partitions_Pos].StreamOffset!=File_Offset+Buffer_Offset-Header_Size))
- Partitions_Pos--; //This is the previous item
- StreamOffset_Offset=Partitions[Partitions_Pos].StreamOffset-Partitions[Partitions_Pos].BodyOffset+Partitions[Partitions_Pos].PartitionPackByteCount+Partitions[Partitions_Pos].HeaderByteCount+Partitions[Partitions_Pos].IndexByteCount;
- }
- else
- StreamOffset_Offset=0;
-
- if (StreamOffset_Offset<=File_Offset+Buffer_Offset
- && !Partitions_IsFooter
- && !(Code_Compare1==Elements::OpenIncompleteHeaderPartition1 //Skipping any kind of Partition
- && Code_Compare2==Elements::OpenIncompleteHeaderPartition2
- && Code_Compare3==Elements::OpenIncompleteHeaderPartition3)
- && !(Code_Compare1==Elements::IndexTableSegment1 //Skipping any kind of IndexTableSegment
- && Code_Compare2==Elements::IndexTableSegment2
- && Code_Compare3==Elements::IndexTableSegment3))
- {
- Buffer_Begin=File_Offset+Buffer_Offset+Element_Offset;
- Buffer_End=Buffer_Begin+Length;
- Buffer_Header_Size=Element_Offset;
- MustSynchronize=false;
- Length=0;
- #if MEDIAINFO_DEMUX || MEDIAINFO_SEEK
- Clip_Begin=Buffer_Begin;
- Clip_End=Buffer_End;
- Clip_Header_Size=Buffer_Header_Size;
- Clip_Code=Code;
- #endif //MEDIAINFO_DEMUX || MEDIAINFO_SEEK
- }
- }
-
- if (Buffer_Begin==(int64u)-1)
- {
- if (Length<=File_Size/2) //Divided by 2 for testing if this is a big chunk = Clip based and not frames.))
- {
- if (File_Buffer_Size_Hint_Pointer)
- {
- int64u Buffer_Size_Target=(size_t)(Buffer_Offset+Element_Offset+Length-Buffer_Size+24); //+24 for next packet header
-
- if (Buffer_Size_Target<128*1024)
- Buffer_Size_Target=128*1024;
- //if ((*File_Buffer_Size_Hint_Pointer)<Buffer_Size_Target)
- (*File_Buffer_Size_Hint_Pointer)=(size_t)Buffer_Size_Target;
- }
-
-
- Element_WaitForMoreData();
- return;
- }
- }
- }
-
- #if MEDIAINFO_TRACE
- Header_Fill_Code(0, Ztring::ToZtring(Code.hi, 16)+Ztring::ToZtring(Code.lo, 16));
- #else //MEDIAINFO_TRACE
- Header_Fill_Code(0);
- #endif //MEDIAINFO_TRACE
- Header_Fill_Size(Element_Offset+Length);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Data_Parse()
-{
- //Clearing
- InstanceUID=0;
-
- //Parsing
- int32u Code_Compare1=Code.hi>>32;
- int32u Code_Compare2=(int32u)Code.hi;
- int32u Code_Compare3=Code.lo>>32;
- int32u Code_Compare4=(int32u)Code.lo;
- #undef ELEMENT
- #define ELEMENT(_ELEMENT, _NAME) \
- else if (Code_Compare1==Elements::_ELEMENT##1 \
- && Code_Compare2==Elements::_ELEMENT##2 \
- && Code_Compare3==Elements::_ELEMENT##3 \
- && Code_Compare4==Elements::_ELEMENT##4) \
- { \
- if (!Element_IsComplete_Get()) \
- { \
- if (Buffer_End==0) \
- { \
- Element_WaitForMoreData(); \
- return; \
- } \
- Skip_XX(Element_Size, "Data"); \
- } \
- Element_Name(_NAME); \
- switch (Code_Compare2>>24) \
- { \
- case 0x01 : _ELEMENT(); break; \
- case 0x02 : switch ((int8u)(Code_Compare2>>16)) \
- { \
- case 0x05 : _ELEMENT(); break; \
- case 0x43 : _ELEMENT(); break; \
- case 0x53 : \
- while(Element_Offset<Element_Size) \
- { \
- Element_Begin0(); \
- Element_Begin1("Header"); \
- Get_B2 (Code2, "Code"); \
- Get_B2 (Length2, "Length"); \
- Element_End0(); \
- Element_Name(Ztring().From_CC2(Code2)); \
- \
- int64u End=Element_Offset+Length2; \
- _ELEMENT(); \
- if (Element_Offset<End) \
- Skip_XX(End-Element_Offset, "Unknown"); \
- \
- Element_End0(); \
- } \
- break; \
- case 0x63 : _ELEMENT(); break; \
- default : Skip_XX(Element_Size, "Unknown"); \
- } \
- } \
- } \
-
- //Parsing
- if (0) {}
- ELEMENT(Filler01, "Filler")
- ELEMENT(Filler02, "Padding")
- ELEMENT(TerminatingFiller, "Terminating Filler")
- ELEMENT(XmlDocumentText, "XML Document Text")
- ELEMENT(SubDescriptors, "Sub Descriptors")
- ELEMENT(LensUnitMetadata, "Lens Unit Metadata")
- ELEMENT(CameraUnitMetadata, "Camera Unit Metadata")
- ELEMENT(UserDefinedAcquisitionMetadata, "User Defined Acquisition Metadata")
- ELEMENT(Filler53, "Filler")
- ELEMENT(Sequence, "Sequence")
- ELEMENT(SourceClip, "Source Clip")
- ELEMENT(TimecodeComponent, "Timecode Component")
- ELEMENT(ContentStorage, "Content Storage")
- ELEMENT(EssenceContainerData, "Essence Container Data")
- ELEMENT(GenericPictureEssenceDescriptor, "Generic Picture Essence Descriptor")
- ELEMENT(CDCIEssenceDescriptor, "CDCI Essence Descriptor")
- ELEMENT(RGBAEssenceDescriptor, "RGBA Essence Descriptor")
- ELEMENT(Preface, "Preface")
- ELEMENT(Identification, "Identification")
- ELEMENT(NetworkLocator, "Network Locator")
- ELEMENT(TextLocator, "Text Locator")
- ELEMENT(StereoscopicPictureSubDescriptor, "Stereoscopic Picture Sub Descriptor")
- ELEMENT(MaterialPackage, "Material Package")
- ELEMENT(SourcePackage, "Source Package")
- ELEMENT(EventTrack, "Event track")
- ELEMENT(StaticTrack, "Static Track")
- ELEMENT(TimelineTrack, "Timeline Track")
- ELEMENT(DMSegment, "Descriptive Metadata Segment")
- ELEMENT(GenericSoundEssenceDescriptor, "Generic Sound Essence Descriptor")
- ELEMENT(GenericDataEssenceDescriptor, "Generic Data Essence Descriptor")
- ELEMENT(MultipleDescriptor, "Multiple Descriptor")
- ELEMENT(DMSourceClip, "DM Source Clip")
- ELEMENT(AES3PCMDescriptor, "AES3 Descriptor")
- ELEMENT(WaveAudioDescriptor, "Wave Audio Descriptor")
- ELEMENT(MPEG2VideoDescriptor, "MPEG-2 Video Descriptor")
- ELEMENT(JPEG2000PictureSubDescriptor, "JPEG 2000 Picture Sub Descriptor")
- ELEMENT(VbiPacketsDescriptor, "VBI Descriptor")
- ELEMENT(AncPacketsDescriptor, "ANC Packets Descriptor")
- ELEMENT(MpegAudioDescriptor, "MPEG Audio Descriptor")
- ELEMENT(PackageMarkerObject, "DM Source Clip")
- ELEMENT(ApplicationPlugInObject, "Application Plug-In Object")
- ELEMENT(ApplicationReferencedObject, "Application Referenced Object")
- ELEMENT(MCALabelSubDescriptor, "MCA Label Sub-Descriptor")
- ELEMENT(TimedTextDescriptor, "Timed Text Descriptor")
- ELEMENT(TimedTextResourceSubDescriptor, "Timed Text Resource Sub-Descriptor")
- ELEMENT(Unknown67SubDescriptor, "Unknown 0x67 Sub-Descriptor")
- ELEMENT(Mpeg4VisualSubDescriptor, "MPEG-4 Visual Sub-Descriptor")
- ELEMENT(AudioChannelLabelSubDescriptor, "Audio Channel Label Sub-Descriptor")
- ELEMENT(SoundfieldGroupLabelSubDescriptor, "Soundfield Group Label Sub-Descriptor")
- ELEMENT(GroupOfSoundfieldGroupsLabelSubDescriptor, "Group Of Soundfield Groups Label Sub-Descriptor")
- ELEMENT(OpenIncompleteHeaderPartition, "Open and Incomplete Header Partition Pack")
- ELEMENT(ClosedIncompleteHeaderPartition, "Closed and Iomplete Header Partition Pack")
- ELEMENT(OpenCompleteHeaderPartition, "Open and Complete Header Partition Pack")
- ELEMENT(ClosedCompleteHeaderPartition, "Closed and Complete Header Partition Pack")
- ELEMENT(OpenIncompleteBodyPartition, "Open and Incomplete Body Partition Pack")
- ELEMENT(ClosedIncompleteBodyPartition, "Closed and Iomplete Body Partition Pack")
- ELEMENT(OpenCompleteBodyPartition, "Open and Complete Body Partition Pack")
- ELEMENT(ClosedCompleteBodyPartition, "Closed and Complete Body Partition Pack")
- ELEMENT(OpenIncompleteFooterPartition, "Open and Incomplete Footer Partition Pack")
- ELEMENT(ClosedIncompleteFooterPartition, "Closed and Iomplete Footer Partition Pack")
- ELEMENT(OpenCompleteFooterPartition, "Open and Complete Footer Partition Pack")
- ELEMENT(ClosedCompleteFooterPartition, "Closed and Complete Footer Partition Pack")
- ELEMENT(Primer, "Primer")
- ELEMENT(IndexTableSegment, "Index Table (Segment)")
- ELEMENT(RandomIndexMetadata, "Random Index Metadata")
- ELEMENT(SDTI_SystemMetadataPack, "SDTI System Metadata Pack")
- else if (Code_Compare1==Elements::SDTI_SystemMetadataPack1
- && ((Code_Compare2)&0xFF00FFFF)==(Elements::SDTI_SystemMetadataPack2&0xFF00FFFF)
- && Code_Compare3==Elements::SDTI_SystemMetadataPack3
- && ((Code_Compare4)&0xFFFF0000)==(Elements::SDTI_SystemMetadataPack4&0xFFFF0000))
- {
- Code_Compare4&=0xFFFFFF00; //Remove MetaData Block Count
- if (0) {}
- ELEMENT(SDTI_PackageMetadataSet, "SDTI Package Metadata Set")
- ELEMENT(SDTI_PictureMetadataSet, "SDTI Picture Metadata Set")
- ELEMENT(SDTI_SoundMetadataSet, "SDTI Sound Metadata Set")
- ELEMENT(SDTI_DataMetadataSet, "SDTI Data Metadata Set")
- ELEMENT(SDTI_ControlMetadataSet, "SDTI Control Metadata Set")
- }
- else if (Code_Compare1==Elements::SystemScheme11
- && Code_Compare2==Elements::SystemScheme12
- && Code_Compare3==Elements::SystemScheme13
- && ((Code_Compare4)&0xFFFF0000)==(Elements::SystemScheme14&0xFFFF0000))
- {
- Element_Code=Code.lo;
- Code_Compare4&=0xFFFF0000; //Remove Metadata or Control Element Identifier + Element Number
- if (0) {}
- ELEMENT(SystemScheme1, "SystemScheme1")
- }
- ELEMENT(AS11_AAF_Core, "AS-11 core metadata framework")
- ELEMENT(AS11_AAF_Segmentation, "AS-11 segmentation metadata framework")
- ELEMENT(AS11_AAF_UKDPP, "AS-11 UK DPP metadata framework")
- ELEMENT(DMScheme1, "Descriptive Metadata Scheme 1") //SMPTE 380M
- ELEMENT(Omneon_010201010100, "Omneon .01.02.01.01.01.00")
- ELEMENT(Omneon_010201020100, "Omneon .01.02.01.02.01.00")
- else if (Code_Compare1==Elements::GenericContainer_Aaf1
- && ((Code_Compare2)&0xFFFFFF00)==(Elements::GenericContainer_Aaf2&0xFFFFFF00)
- && (Code_Compare3==Elements::GenericContainer_Aaf3
- || Code_Compare3==Elements::GenericContainer_Avid3
- || Code_Compare3==Elements::GenericContainer_Sony3))
- {
- Element_Name(Mxf_EssenceElement(Code));
-
- //Config
- if (!Essences_FirstEssence_Parsed)
- {
- Streams_Finish_Preface_ForTimeCode(Preface_Current); //Configuring DTS_Delay
-
- #if MEDIAINFO_DEMUX || MEDIAINFO_SEEK
- //Searching single descriptor if it is the only valid descriptor
- descriptors::iterator SingleDescriptor=Descriptors.end();
- for (descriptors::iterator SingleDescriptor_Temp=Descriptors.begin(); SingleDescriptor_Temp!=Descriptors.end(); ++SingleDescriptor_Temp)
- if (SingleDescriptor_Temp->second.StreamKind!=Stream_Max)
- {
- if (SingleDescriptor!=Descriptors.end())
- {
- SingleDescriptor=Descriptors.end();
- break; // 2 or more descriptors, can not be used
- }
- SingleDescriptor=SingleDescriptor_Temp;
- }
-
- if (SingleDescriptor!=Descriptors.end() && SingleDescriptor->second.StreamKind==Stream_Audio)
- {
- //Configuring bitrate is not available in descriptor
- if (SingleDescriptor->second.ByteRate==(int32u)-1 && SingleDescriptor->second.Infos.find("SamplingRate")!=SingleDescriptor->second.Infos.end())
- {
- int32u SamplingRate=SingleDescriptor->second.Infos["SamplingRate"].To_int32u();
-
- if (SingleDescriptor->second.BlockAlign!=(int16u)-1)
- SingleDescriptor->second.ByteRate=SamplingRate*SingleDescriptor->second.BlockAlign;
- else if (SingleDescriptor->second.QuantizationBits!=(int8u)-1)
- SingleDescriptor->second.ByteRate=SamplingRate*SingleDescriptor->second.QuantizationBits/8;
- }
- }
-
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- {
- //Configuring EditRate if needed (e.g. audio at 48000 Hz)
- if (Descriptor->second.SampleRate>1000)
- {
- float64 EditRate_FromTrack=DBL_MAX;
- for (tracks::iterator Track=Tracks.begin(); Track!=Tracks.end(); ++Track)
- if (Track->second.EditRate && EditRate_FromTrack>Track->second.EditRate)
- EditRate_FromTrack=Track->second.EditRate;
- if (EditRate_FromTrack>1000)
- EditRate_FromTrack=Demux_Rate; //Default value;
- Descriptor->second.SampleRate=EditRate_FromTrack;
- DemuxedSampleCount_Total=Config->File_IgnoreEditsBefore;
- for (tracks::iterator Track=Tracks.begin(); Track!=Tracks.end(); ++Track)
- if (Track->second.EditRate>EditRate_FromTrack)
- {
- Track->second.EditRate_Real=Track->second.EditRate;
- Track->second.EditRate=EditRate_FromTrack;
- }
- }
- }
- #endif //MEDIAINFO_DEMUX || MEDIAINFO_SEEK
-
- Essences_FirstEssence_Parsed=true;
- }
-
- if (IsParsingEnd)
- {
- //We have the necessary for indexes, jumping to next index
- Skip_XX(Element_Size, "Data");
- if (RandomIndexMetadatas.empty())
- {
- if (!RandomIndexMetadatas_AlreadyParsed)
- {
- Partitions_Pos=0;
- while (Partitions_Pos<Partitions.size() && Partitions[Partitions_Pos].StreamOffset!=PartitionMetadata_PreviousPartition)
- Partitions_Pos++;
- if (Partitions_Pos==Partitions.size())
- {
- GoTo(PartitionMetadata_PreviousPartition);
- Open_Buffer_Unsynch();
- }
- else
- TryToFinish();
- }
- }
- else
- {
- GoTo(RandomIndexMetadatas[0].ByteOffset);
- RandomIndexMetadatas.erase(RandomIndexMetadatas.begin());
- Open_Buffer_Unsynch();
- }
- return;
- }
-
- essences::iterator Essence=Essences.find(Code_Compare4);
- if (Essence==Essences.end())
- Essence=Essences.insert(make_pair(Code_Compare4,essence())).first;
-
- if (Essence->second.Parsers.empty())
- {
- //Searching single descriptor if it is the only valid descriptor
- descriptors::iterator SingleDescriptor=Descriptors.end();
- for (descriptors::iterator SingleDescriptor_Temp=Descriptors.begin(); SingleDescriptor_Temp!=Descriptors.end(); ++SingleDescriptor_Temp)
- if (SingleDescriptor_Temp->second.StreamKind!=Stream_Max)
- {
- if (SingleDescriptor!=Descriptors.end())
- {
- SingleDescriptor=Descriptors.end();
- break; // 2 or more descriptors, can not be used
- }
- SingleDescriptor=SingleDescriptor_Temp;
- }
-
- //Format_Settings_Wrapping
- if (SingleDescriptor!=Descriptors.end() && (SingleDescriptor->second.Infos.find("Format_Settings_Wrapping")==SingleDescriptor->second.Infos.end() || SingleDescriptor->second.Infos["Format_Settings_Wrapping"].empty()) && (Buffer_End?(Buffer_End-Buffer_Begin):Element_Size)>File_Size/2) //Divided by 2 for testing if this is a big chunk = Clip based and not frames.
- SingleDescriptor->second.Infos["Format_Settings_Wrapping"]=__T("Clip"); //By default, not sure about it, should be from descriptor
-
- //Searching the corresponding Track (for TrackID)
- if (!Essence->second.TrackID_WasLookedFor)
- {
- for (tracks::iterator Track=Tracks.begin(); Track!=Tracks.end(); ++Track)
- if (Track->second.TrackNumber==Code_Compare4)
- Essence->second.TrackID=Track->second.TrackID;
- #if MEDIAINFO_DEMUX || MEDIAINFO_SEEK
- if (Essence->second.TrackID==(int32u)-1 && !Duration_Detected && !Config->File_IsDetectingDuration_Get())
- {
- DetectDuration(); //In one file (*-009.mxf), the TrackNumber is known only at the end of the file (Open and incomplete header/footer)
- for (tracks::iterator Track=Tracks.begin(); Track!=Tracks.end(); ++Track)
- if (Track->second.TrackNumber==Code_Compare4)
- Essence->second.TrackID=Track->second.TrackID;
- }
- #endif //MEDIAINFO_DEMUX || MEDIAINFO_SEEK
-
- // Fallback in case TrackID is not detected, forcing TrackID and TrackNumber
- if (Essence->second.TrackID==(int32u)-1 && SingleDescriptor!=Descriptors.end())
- {
- Essence->second.TrackID=SingleDescriptor->second.LinkedTrackID;
-
- prefaces::iterator Preface=Prefaces.find(Preface_Current);
- if (Preface!=Prefaces.end())
- {
- contentstorages::iterator ContentStorage=ContentStorages.find(Preface->second.ContentStorage);
- if (ContentStorage!=ContentStorages.end())
- {
- for (size_t Pos=0; Pos<ContentStorage->second.Packages.size(); Pos++)
- {
- packages::iterator Package=Packages.find(ContentStorage->second.Packages[Pos]);
- if (Package!=Packages.end() && Package->second.IsSourcePackage)
- {
- for (size_t Pos=0; Pos<Package->second.Tracks.size(); Pos++)
- {
- tracks::iterator Track=Tracks.find(Package->second.Tracks[Pos]);
- if (Track!=Tracks.end())
- {
- if (Track->second.TrackNumber==0 && Track->second.TrackID==Essence->second.TrackID)
- {
- Track->second.TrackNumber=Essence->first;
- Essence->second.Track_Number_IsMappedToTrack=true;
- }
- }
- }
- }
- }
- }
- }
- }
-
- Essence->second.TrackID_WasLookedFor=true;
- }
-
- if ((Code_Compare4&0x000000FF)==0x00000000)
- StreamPos_StartAtOne=false;
-
- //Searching the corresponding Descriptor
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- if (Descriptor==SingleDescriptor || (Descriptor->second.LinkedTrackID==Essence->second.TrackID && Descriptor->second.LinkedTrackID!=(int32u)-1))
- {
- Essence->second.StreamPos_Initial=Essence->second.StreamPos=Code_Compare4&0x000000FF;
-
- if (Descriptor->second.StreamKind==Stream_Audio && Descriptor->second.Infos.find("Format_Settings_Endianness")==Descriptor->second.Infos.end())
- {
- Ztring Format;
- Format.From_Local(Mxf_EssenceCompression(Descriptor->second.EssenceCompression));
- if (Format.empty())
- Format.From_Local(Mxf_EssenceContainer(Descriptor->second.EssenceContainer));
- if (Format.find(__T("PCM"))==0)
- Descriptor->second.Infos["Format_Settings_Endianness"]=__T("Little");
- }
-
- ChooseParser(Essence, Descriptor); //Searching by the descriptor
- if (Essence->second.Parsers.empty())
- ChooseParser__FromEssence(Essence, Descriptor); //Searching by the track identifier
-
- #ifdef MEDIAINFO_VC3_YES
- if (Ztring().From_Local(Mxf_EssenceContainer(Descriptor->second.EssenceContainer))==__T("VC-3"))
- ((File_Vc3*)(*(Essence->second.Parsers.begin())))->FrameRate=Descriptor->second.SampleRate;
- #endif //MEDIAINFO_VC3_YES
- break;
- }
-
- //Searching by the track identifier
- if (Essence->second.Parsers.empty())
- ChooseParser__FromEssence(Essence, Descriptors.end());
-
- //Check of Essence used as a reference for frame count
- if (Essences_UsedForFrameCount==(int32u)-1)
- Essences_UsedForFrameCount=Essence->first;
- else if ((Essence->second.StreamKind==Stream_Audio && Essences[Essences_UsedForFrameCount].StreamKind>Stream_Audio)
- || (Essence->second.StreamKind==Stream_Video && Essences[Essences_UsedForFrameCount].StreamKind>Stream_Video))
- Essences_UsedForFrameCount=Essence->first;
-
- //Demux
- #if MEDIAINFO_DEMUX
- //Configuration
- if (!IsSub) //Updating for MXF only if MXF is not embedded in another container
- {
- Essence->second.Frame_Count_NotParsedIncluded=Frame_Count_NotParsedIncluded;
- if (Essence->second.Frame_Count_NotParsedIncluded!=(int64u)-1 && Essence->second.Frame_Count_NotParsedIncluded && Essence->first!=Essences_UsedForFrameCount)
- Essence->second.Frame_Count_NotParsedIncluded--; //Info is from the first essence parsed, and 1 frame is already parsed
- Essence->second.FrameInfo.DTS=FrameInfo.DTS;
- if (Essence->second.FrameInfo.DTS!=(int64u)-1 && FrameInfo.DUR!=(int64u)-1 && Frame_Count_NotParsedIncluded && Essence->first!=Essences_UsedForFrameCount)
- Essence->second.FrameInfo.DTS-=FrameInfo.DUR; //Info is from the first essence parsed, and 1 frame is already parsed
- if (!Tracks.empty() && Tracks.begin()->second.EditRate) //TODO: use the corresponding track instead of the first one
- Essence->second.FrameInfo.DUR=float64_int64s(1000000000/Tracks.begin()->second.EditRate);
- else if (!IndexTables.empty() && IndexTables[0].IndexEditRate)
- Essence->second.FrameInfo.DUR=float64_int64s(1000000000/IndexTables[0].IndexEditRate);
- #if MEDIAINFO_DEMUX
- if (Buffer_End && Demux_UnpacketizeContainer && Essences.size()==1 && !Essences.begin()->second.Parsers.empty() && !(*(Essences.begin()->second.Parsers.begin()))->Demux_UnpacketizeContainer)
- for (parsers::iterator Parser=Essence->second.Parsers.begin(); Parser!=Essence->second.Parsers.end(); ++Parser)
- {
- (*Parser)->Demux_Level=2; //Container
- (*Parser)->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- }
- if (Essence->second.TrackID!=(int32u)-1)
- Element_Code=Essence->second.TrackID;
- else
- Element_Code=Code.lo;
- #endif //MEDIAINFO_DEMUX
-
- if (Essence->second.Parsers.empty())
- {
- if (Streams_Count>0)
- Streams_Count--;
- }
- else
- {
- Element_Code=Essence->second.TrackID;
- for (parsers::iterator Parser=Essence->second.Parsers.begin(); Parser!=Essence->second.Parsers.end(); ++Parser)
- {
- Open_Buffer_Init(*Parser);
- if ((*Parser)->Status[IsFinished])
- if (Streams_Count>0)
- Streams_Count--;
- }
- }
-
- //Stream size is sometime easy to find
- if ((Buffer_End?(Buffer_End-Buffer_Begin):Element_TotalSize_Get())>=File_Size*0.98) //let imagine: if element size is 98% of file size, this is the only one element in the file
- {
- Essence->second.Stream_Size=Buffer_End?(Buffer_End-Buffer_Begin):Element_TotalSize_Get();
- }
-
- //Compute stream bit rate if there is only one stream
- int64u Stream_Size;
- if (Essence->second.Stream_Size!=(int64u)-1)
- Stream_Size=Essence->second.Stream_Size;
- else
- Stream_Size=File_Size; //TODO: find a way to remove header/footer correctly
- if (Stream_Size!=(int64u)-1)
- {
- //Searching single descriptor if it is the only valid descriptor
- descriptors::iterator SingleDescriptor=Descriptors.end();
- for (descriptors::iterator SingleDescriptor_Temp=Descriptors.begin(); SingleDescriptor_Temp!=Descriptors.end(); ++SingleDescriptor_Temp)
- if (SingleDescriptor_Temp->second.StreamKind!=Stream_Max)
- {
- if (SingleDescriptor!=Descriptors.end())
- {
- SingleDescriptor=Descriptors.end();
- break; // 2 or more descriptors, can not be used
- }
- SingleDescriptor=SingleDescriptor_Temp;
- }
-
- if (SingleDescriptor!=Descriptors.end())
- {
- if (SingleDescriptor->second.ByteRate!=(int32u)-1)
- for (parsers::iterator Parser=Essence->second.Parsers.begin(); Parser!=Essence->second.Parsers.end(); ++Parser)
- (*Parser)->Stream_BitRateFromContainer=SingleDescriptor->second.ByteRate*8;
- else if (SingleDescriptor->second.Infos["Duration"].To_float64())
- for (parsers::iterator Parser=Essences.begin()->second.Parsers.begin(); Parser!=Essences.begin()->second.Parsers.end(); ++Parser)
- (*Parser)->Stream_BitRateFromContainer=((float64)Stream_Size)*8/(SingleDescriptor->second.Infos["Duration"].To_float64()/1000);
- }
- }
- }
-
- //Frame info is specific to the container, and it is not updated
- frame_info FrameInfo_Temp=FrameInfo;
- int64u Frame_Count_NotParsedIncluded_Temp=Frame_Count_NotParsedIncluded;
- if (!IsSub) //Updating for MXF only if MXF is not embedded in another container
- {
- FrameInfo=frame_info();
- Frame_Count_NotParsedIncluded=(int64u)-1;
- }
-
- //Demux
- #if MEDIAINFO_DEMUX
- if (Essence->second.TrackID!=(int32u)-1)
- Element_Code=Essence->second.TrackID;
- else
- Element_Code=Code.lo;
- Demux_Level=(!Essence->second.Parsers.empty() && ((*(Essence->second.Parsers.begin()))->Demux_UnpacketizeContainer || (*(Essence->second.Parsers.begin()))->Demux_Level==2))?4:2; //Intermediate (D-10 Audio) / Container
- if (!IsSub) //Updating for MXF only if MXF is not embedded in another container
- {
- FrameInfo=Essence->second.FrameInfo;
- Frame_Count_NotParsedIncluded=Essence->second.Frame_Count_NotParsedIncluded;
- }
- Demux_random_access=true;
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- #endif //MEDIAINFO_DEMUX
-
- if (!Essence->second.Parsers.empty() && !(*(Essence->second.Parsers.begin()))->Status[IsFinished])
- {
- if ((Code_Compare4&0xFF00FF00)==0x17000100 || (Code_Compare4&0xFF00FF00)==0x17000200)
- {
- if (Element_Size)
- {
- parsers::iterator Parser=Essence->second.Parsers.begin();
-
- //Ancillary with
- int16u Count;
- Get_B2 (Count, "Number of Lines");
- if (Count*14>Element_Size)
- {
- (*Parser)->Finish();
- Skip_XX(Element_Size-2, "Unknown");
- Count=0;
- }
- for (int16u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("Packet");
- int32u Size2, Count2;
- int16u LineNumber, Size;
- Get_B2 (LineNumber, "Line Number");
- Skip_B1( "Wrapping Type");
- Skip_B1( "Payload Sample Coding");
- Get_B2 (Size, "Payload Sample Count");
- Get_B4 (Size2, "Size?");
- Get_B4 (Count2, "Count?");
-
- if (Essence->second.Frame_Count_NotParsedIncluded!=(int64u)-1)
- (*Parser)->Frame_Count_NotParsedIncluded=Essence->second.Frame_Count_NotParsedIncluded;
- if (Essence->second.FrameInfo.DTS!=(int64u)-1)
- (*Parser)->FrameInfo.DTS=Essence->second.FrameInfo.DTS;
- if (Essence->second.FrameInfo.PTS!=(int64u)-1)
- (*Parser)->FrameInfo.PTS=Essence->second.FrameInfo.PTS;
- if (Essence->second.FrameInfo.DUR!=(int64u)-1)
- (*Parser)->FrameInfo.DUR=Essence->second.FrameInfo.DUR;
- #if defined(MEDIAINFO_ANCILLARY_YES)
- if ((*Parser)->ParserName==__T("Ancillary"))
- ((File_Ancillary*)(*Parser))->LineNumber=LineNumber;
- if ((*Parser)->ParserName==__T("Ancillary") && (((File_Ancillary*)(*Parser))->FrameRate==0 || ((File_Ancillary*)(*Parser))->AspectRatio==0))
- {
- //Configuring with video info
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- if (Descriptor->second.StreamKind==Stream_Video)
- {
- ((File_Ancillary*)(*Parser))->HasBFrames=Descriptor->second.HasBFrames;
- ((File_Ancillary*)(*Parser))->AspectRatio=Descriptor->second.DisplayAspectRatio;
- ((File_Ancillary*)(*Parser))->FrameRate=Descriptor->second.SampleRate;
- break;
- }
- }
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
- if (Element_Offset+Size>Element_Size)
- Size=(int16u)(Element_Size-Element_Offset);
- Open_Buffer_Continue((*Parser), Buffer+Buffer_Offset+(size_t)(Element_Offset), Size);
- if ((Code_Compare4&0xFF00FF00)==0x17000100 && LineNumber==21 && (*Parser)->Count_Get(Stream_Text)==0)
- {
- (*Parser)->Accept();
- (*Parser)->Stream_Prepare(Stream_Text);
- (*Parser)->Fill(Stream_Text, StreamPos_Last, Text_Format, "EIA-608");
- (*Parser)->Fill(Stream_Text, StreamPos_Last, Text_MuxingMode, "VBI / Line 21");
- }
- Element_Offset+=Size;
- if (Size<Size2*Count2)
- Skip_XX(Size2*Count2-Size, "Padding");
- Element_End0();
- }
- }
- }
- else
- {
- for (size_t Pos=0; Pos<Essence->second.Parsers.size(); Pos++)
- {
- //Parsing
- if (IsSub)
- {
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Essence->second.Parsers[Pos]->Frame_Count_NotParsedIncluded=Frame_Count_NotParsedIncluded;
- if (FrameInfo.DTS!=(int64u)-1)
- Essence->second.Parsers[Pos]->FrameInfo.DTS=FrameInfo.DTS;
- if (FrameInfo.PTS!=(int64u)-1)
- Essence->second.Parsers[Pos]->FrameInfo.PTS=FrameInfo.PTS;
- if (FrameInfo.DUR!=(int64u)-1)
- Essence->second.Parsers[Pos]->FrameInfo.DUR=FrameInfo.DUR;
- }
- else
- {
- if (Essence->second.Frame_Count_NotParsedIncluded!=(int64u)-1)
- Essence->second.Parsers[Pos]->Frame_Count_NotParsedIncluded=Essence->second.Frame_Count_NotParsedIncluded;
- if (Essence->second.FrameInfo.DTS!=(int64u)-1)
- Essence->second.Parsers[Pos]->FrameInfo.DTS=Essence->second.FrameInfo.DTS;
- if (Essence->second.FrameInfo.PTS!=(int64u)-1)
- Essence->second.Parsers[Pos]->FrameInfo.PTS=Essence->second.FrameInfo.PTS;
- if (Essence->second.FrameInfo.DUR!=(int64u)-1)
- Essence->second.Parsers[Pos]->FrameInfo.DUR=Essence->second.FrameInfo.DUR;
- }
- Open_Buffer_Continue(Essence->second.Parsers[Pos], Buffer+Buffer_Offset, (size_t)Element_Size);
- #if MEDIAINFO_DEMUX
- if (Demux_Level==4 && Config->Demux_EventWasSent && Essence->second.StreamKind==Stream_Video && Essence->second.Parsers[Pos]->ParserIDs[StreamIDs_Size]==MediaInfo_Parser_Jpeg) // Only File_Jpeg. TODO: limit to File_Jpeg instead of video streams
- {
- Demux_CurrentParser=Essence->second.Parsers[Pos];
- Demux_CurrentEssence=Essence;
- }
- #endif //MEDIAINFO_DEMUX
- switch (Essence->second.Parsers[Pos]->Field_Count_InThisBlock)
- {
- case 1 : Essence->second.Field_Count_InThisBlock_1++; break;
- case 2 : Essence->second.Field_Count_InThisBlock_2++; break;
- default: ;
- }
-
- //Multiple parsers
- if (Essence->second.Parsers.size()>1)
- {
- if (!Essence->second.Parsers[Pos]->Status[IsAccepted] && Essence->second.Parsers[Pos]->Status[IsFinished])
- {
- delete *(Essence->second.Parsers.begin()+Pos);
- Essence->second.Parsers.erase(Essence->second.Parsers.begin()+Pos);
- Pos--;
- }
- else if (Essence->second.Parsers.size()>1 && Essence->second.Parsers[Pos]->Status[IsAccepted])
- {
- File__Analyze* Parser=Essence->second.Parsers[Pos];
- for (size_t Pos2=0; Pos2<Essence->second.Parsers.size(); Pos2++)
- {
- if (Pos2!=Pos)
- delete *(Essence->second.Parsers.begin()+Pos2);
- }
- Essence->second.Parsers.clear();
- Essence->second.Parsers.push_back(Parser);
- }
- }
- }
-
- Element_Offset=Element_Size;
- }
-
- if (Essence->second.Parsers.size()==1 && Essence->second.Parsers[0]->Status[IsAccepted] && Essence->second.Frame_Count_NotParsedIncluded==(int64u)-1)
- {
- Essence->second.FrameInfo.DTS=Essence->second.Parsers[0]->FrameInfo.DTS;
- Essence->second.FrameInfo.PTS=Essence->second.Parsers[0]->FrameInfo.PTS;
- Essence->second.FrameInfo.DUR=Essence->second.Parsers[0]->FrameInfo.DUR;
- }
- else if (Buffer_End)
- {
- Essence->second.Frame_Count_NotParsedIncluded=(int64u)-1;
- Essence->second.FrameInfo=frame_info();
- }
- else
- {
- if (Essence->second.Frame_Count_NotParsedIncluded!=(int64u)-1)
- Essence->second.Frame_Count_NotParsedIncluded++;
- if (Essence->second.FrameInfo.DTS!=(int64u)-1 && Essence->second.FrameInfo.DUR!=(int64u)-1)
- Essence->second.FrameInfo.DTS+=Essence->second.FrameInfo.DUR;
- if (Essence->second.FrameInfo.PTS!=(int64u)-1 && Essence->second.FrameInfo.DUR!=(int64u)-1)
- Essence->second.FrameInfo.PTS+=Essence->second.FrameInfo.DUR;
- }
-
- //Disabling this Streams
- if (!Essence->second.IsFilled && Essence->second.Parsers.size()==1 && Essence->second.Parsers[0]->Status[IsFilled])
- {
- if (Streams_Count>0)
- Streams_Count--;
- Essence->second.IsFilled=true;
- if (Config->ParseSpeed<1.0 && IsSub)
- {
- Fill();
- Open_Buffer_Unsynch();
- Finish();
- }
- }
- }
- else
- Skip_XX(Element_Size, "Data");
-
- //Frame info is specific to the container, and it is not updated
- if (Essence->first==Essences_UsedForFrameCount)
- {
- FrameInfo=Essence->second.FrameInfo;
- Frame_Count_NotParsedIncluded=Essence->second.Frame_Count_NotParsedIncluded;
- }
- else
- {
- FrameInfo=FrameInfo_Temp;
- Frame_Count_NotParsedIncluded=Frame_Count_NotParsedIncluded_Temp;
- }
-
- //Ignore tail
- #if MEDIAINFO_DEMUX
- if (DemuxedSampleCount_Total!=(int64u)-1 && DemuxedSampleCount_Current!=(int64u)-1)
- {
- DemuxedSampleCount_Total+=DemuxedSampleCount_Current;
- Frame_Count_NotParsedIncluded=DemuxedSampleCount_Total;
- }
- #endif //MEDIAINFO_DEMUX
- if (Config->ParseSpeed>=1.0 && Frame_Count_NotParsedIncluded!=(int64u)-1 && Config->File_IgnoreEditsAfter!=(int64u)-1)
- {
- descriptors::iterator SingleDescriptor=Descriptors.end();
- for (descriptors::iterator SingleDescriptor_Temp=Descriptors.begin(); SingleDescriptor_Temp!=Descriptors.end(); ++SingleDescriptor_Temp)
- if (SingleDescriptor_Temp->second.StreamKind!=Stream_Max)
- {
- if (SingleDescriptor!=Descriptors.end())
- {
- SingleDescriptor=Descriptors.end();
- break; // 2 or more descriptors, can not be used
- }
- SingleDescriptor=SingleDescriptor_Temp;
- }
-
- int64u RealSampleRate=(SingleDescriptor==Descriptors.end() || SingleDescriptor->second.StreamKind!=Stream_Audio)?((int64u)Config->File_EditRate):SingleDescriptor->second.Infos["SamplingRate"].To_int64u();
- int64u IgnoreSamplesAfter;
- if (!RealSampleRate || RealSampleRate==Config->File_EditRate)
- IgnoreSamplesAfter=Config->File_IgnoreEditsAfter;
- else
- IgnoreSamplesAfter=float64_int64s(((float64)Config->File_IgnoreEditsAfter)/Config->File_EditRate*RealSampleRate);
- if (Frame_Count_NotParsedIncluded>=IgnoreSamplesAfter)
- {
- if (PartitionMetadata_FooterPartition!=(int64u)-1 && PartitionMetadata_FooterPartition>=File_Offset+Buffer_Offset+Element_Size)
- GoTo(PartitionMetadata_FooterPartition);
- else
- GoToFromEnd(0);
- }
- }
- #if MEDIAINFO_DEMUX
- if (DemuxedSampleCount_Total!=(int64u)-1)
- {
- Frame_Count_NotParsedIncluded=(int64u)-1;
- }
- #endif //MEDIAINFO_DEMUX
- }
- else
- Skip_XX(Element_Size, "Unknown");
-
- if (Buffer_End && (File_Offset+Buffer_Offset+Element_Size>=Buffer_End || File_GoTo!=(int64u)-1) )
- {
- Buffer_Begin=(int64u)-1;
- Buffer_End=0;
- Buffer_End_Unlimited=false;
- Buffer_Header_Size=0;
- MustSynchronize=true;
- }
-
- if ((!IsParsingEnd && IsParsingMiddle_MaxOffset==(int64u)-1 && MediaInfoLib::Config.ParseSpeed_Get()<1.0)
- && ((!IsSub && File_Offset>=0x4000000) //TODO: 64 MB by default (security), should be changed
- || (Streams_Count==0 && !Descriptors.empty())))
- {
- Fill();
-
- IsParsingEnd=true;
- if (PartitionMetadata_FooterPartition!=(int64u)-1)
- {
- GoTo(PartitionMetadata_FooterPartition);
- IsCheckingFooterPartitionAddress=true;
- }
- else
- {
- GoToFromEnd(4); //For random access table
- FooterPartitionAddress_Jumped=true;
- }
- Open_Buffer_Unsynch();
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-#undef ELEMENT
-#define ELEMENT(_CODE, _CALL, _NAME) \
- case 0x##_CODE : Element_Name(_NAME); _CALL(); break; \
-
-#define ELEMENT_UUID(_ELEMENT, _NAME) \
-else if (Code_Compare1==Elements::_ELEMENT##1 \
- && (Code_Compare2&0xFFFFFF00)==(Elements::_ELEMENT##2&0xFFFFFF00) \
- && Code_Compare3==Elements::_ELEMENT##3 \
- && Code_Compare4==Elements::_ELEMENT##4) \
-{ \
- Element_Name(_NAME); \
- _ELEMENT(); \
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::AES3PCMDescriptor()
-{
- Descriptors[InstanceUID].IsAes3Descriptor=true;
-
- switch(Code2)
- {
- ELEMENT(3D08, AES3PCMDescriptor_AuxBitsMode, "Use of Auxiliary Bits")
- ELEMENT(3D0D, AES3PCMDescriptor_Emphasis, "Emphasis")
- ELEMENT(3D0F, AES3PCMDescriptor_BlockStartOffset, "Position of first Z preamble in essence stream")
- ELEMENT(3D10, AES3PCMDescriptor_ChannelStatusMode, "Enumerated mode of carriage of channel status data")
- ELEMENT(3D11, AES3PCMDescriptor_FixedChannelStatusData, "Fixed data pattern for channel status data")
- ELEMENT(3D12, AES3PCMDescriptor_UserDataMode, "Mode of carriage of user data")
- ELEMENT(3D13, AES3PCMDescriptor_FixedUserData, "Fixed data pattern for user data")
- default: WaveAudioDescriptor();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::CDCIEssenceDescriptor()
-{
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(SubDescriptors, "Sub Descriptors")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
-
- switch(Code2)
- {
- ELEMENT(3301, CDCIEssenceDescriptor_ComponentDepth, "Active bits per sample")
- ELEMENT(3302, CDCIEssenceDescriptor_HorizontalSubsampling, "Horizontal colour subsampling")
- ELEMENT(3303, CDCIEssenceDescriptor_ColorSiting, "Color siting")
- ELEMENT(3304, CDCIEssenceDescriptor_BlackRefLevel, "Black refernece level")
- ELEMENT(3305, CDCIEssenceDescriptor_WhiteReflevel, "White reference level")
- ELEMENT(3306, CDCIEssenceDescriptor_ColorRange, "Color range")
- ELEMENT(3307, CDCIEssenceDescriptor_PaddingBits, "Bits to round up each pixel to stored size")
- ELEMENT(3308, CDCIEssenceDescriptor_VerticalSubsampling,"Vertical colour subsampling")
- ELEMENT(3309, CDCIEssenceDescriptor_AlphaSampleDepth, "Bits per alpha sample")
- ELEMENT(330B, CDCIEssenceDescriptor_ReversedByteOrder, "Luma followed by Chroma")
- default: GenericPictureEssenceDescriptor();
- }
-
- if (Descriptors[InstanceUID].Infos["ColorSpace"].empty())
- Descriptors[InstanceUID].Infos["ColorSpace"]="YUV";
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::OpenIncompleteHeaderPartition()
-{
- //Parsing
- PartitionMetadata();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ClosedIncompleteHeaderPartition()
-{
- //Parsing
- PartitionMetadata();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::OpenCompleteHeaderPartition()
-{
- //Parsing
- PartitionMetadata();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ClosedCompleteHeaderPartition()
-{
- //Parsing
- PartitionMetadata();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::OpenIncompleteBodyPartition()
-{
- //Parsing
- PartitionMetadata();
-
- #if MEDIAINFO_NEXTPACKET && MEDIAINFO_DEMUX
- if (!Demux_HeaderParsed)
- {
- Demux_HeaderParsed=true;
-
- //Testing locators
- Locators_CleanUp();
-
- if (Config->File_IgnoreEditsBefore && !Config->File_IsDetectingDuration_Get())
- Open_Buffer_Seek(3, 0, (int64u)-1); //Forcing seek to Config->File_IgnoreEditsBefore
- if (Config->NextPacket_Get() && Config->Event_CallBackFunction_IsSet())
- {
- if (Locators.empty())
- {
- Config->Demux_EventWasSent=true; //First set is to indicate the user that header is parsed
- return;
- }
- }
- }
- #endif //MEDIAINFO_NEXTPACKET && MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ClosedIncompleteBodyPartition()
-{
- //Parsing
- PartitionMetadata();
-
- #if MEDIAINFO_NEXTPACKET && MEDIAINFO_DEMUX
- if (!Demux_HeaderParsed)
- {
- Demux_HeaderParsed=true;
-
- //Testing locators
- Locators_CleanUp();
-
- if (Config->File_IgnoreEditsBefore && !Config->File_IsDetectingDuration_Get())
- Open_Buffer_Seek(3, 0, (int64u)-1); //Forcing seek to Config->File_IgnoreEditsBefore
- if (Config->NextPacket_Get() && Config->Event_CallBackFunction_IsSet())
- {
- if (Locators.empty())
- {
- Config->Demux_EventWasSent=true; //First set is to indicate the user that header is parsed
- return;
- }
- }
- }
- #endif //MEDIAINFO_NEXTPACKET && MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::OpenCompleteBodyPartition()
-{
- //Parsing
- PartitionMetadata();
-
- #if MEDIAINFO_NEXTPACKET && MEDIAINFO_DEMUX
- if (!Demux_HeaderParsed)
- {
- Demux_HeaderParsed=true;
-
- //Testing locators
- Locators_CleanUp();
-
- if (Config->File_IgnoreEditsBefore && !Config->File_IsDetectingDuration_Get())
- Open_Buffer_Seek(3, 0, (int64u)-1); //Forcing seek to Config->File_IgnoreEditsBefore
- if (Config->NextPacket_Get() && Config->Event_CallBackFunction_IsSet())
- {
- if (Locators.empty())
- {
- Config->Demux_EventWasSent=true; //First set is to indicate the user that header is parsed
- return;
- }
- }
- }
- #endif //MEDIAINFO_NEXTPACKET && MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ClosedCompleteBodyPartition()
-{
- //Parsing
- PartitionMetadata();
-
- #if MEDIAINFO_NEXTPACKET && MEDIAINFO_DEMUX
- if (!Demux_HeaderParsed)
- {
- Demux_HeaderParsed=true;
-
- //Testing locators
- Locators_CleanUp();
-
- if (Config->File_IgnoreEditsBefore && !Config->File_IsDetectingDuration_Get())
- Open_Buffer_Seek(3, 0, (int64u)-1); //Forcing seek to Config->File_IgnoreEditsBefore
- if (Config->NextPacket_Get() && Config->Event_CallBackFunction_IsSet())
- {
- if (Locators.empty())
- {
- Config->Demux_EventWasSent=true; //First set is to indicate the user that header is parsed
- return;
- }
- }
- }
- #endif //MEDIAINFO_NEXTPACKET && MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::OpenIncompleteFooterPartition()
-{
- //Parsing
- PartitionMetadata();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ClosedIncompleteFooterPartition()
-{
- //Parsing
- PartitionMetadata();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::OpenCompleteFooterPartition()
-{
- //Parsing
- PartitionMetadata();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ClosedCompleteFooterPartition()
-{
- //Parsing
- PartitionMetadata();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ContentStorage()
-{
- switch(Code2)
- {
- ELEMENT(1901, ContentStorage_Packages, "Packages")
- ELEMENT(1902, ContentStorage_EssenceContainerData, "EssenceContainerData")
- default: GenerationInterchangeObject();
- }
-
- if (Code2==0x3C0A && InstanceUID==Prefaces[Preface_Current].ContentStorage) //InstanceIUD
- {
- Element_Level--;
- Element_Info1("Valid from Preface");
- Element_Level++;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::DMSegment()
-{
- switch(Code2)
- {
- ELEMENT(0202, DMSegment_Duration, "Duration")
- ELEMENT(6101, DMSegment_DMFramework, "DM Framework")
- ELEMENT(6102, DMSegment_TrackIDs, "Track IDs")
- default: StructuralComponent();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::EssenceContainerData()
-{
- switch(Code2)
- {
- ELEMENT(2701, EssenceContainerData_LinkedPackageUID, "LinkedPackageUID")
- ELEMENT(3F06, EssenceContainerData_IndexSID, "IndexSID")
- ELEMENT(3F07, EssenceContainerData_BodySID, "BodySID")
- default: GenerationInterchangeObject();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::EventTrack()
-{
- switch(Code2)
- {
- ELEMENT(4901, EventTrack_EventEditRate, "Edit Rate of Event Track")
- ELEMENT(4902, EventTrack_EventOrigin, "Offset used to resolved timeline references to this event track")
- default: GenericTrack();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::FileDescriptor()
-{
- switch(Code2)
- {
- ELEMENT(3001, FileDescriptor_SampleRate, "SampleRate")
- ELEMENT(3002, FileDescriptor_ContainerDuration, "ContainerDuration")
- ELEMENT(3004, FileDescriptor_EssenceContainer, "EssenceContainer")
- ELEMENT(3005, FileDescriptor_Codec, "Codec")
- ELEMENT(3006, FileDescriptor_LinkedTrackID, "LinkedTrackID")
- default: GenericDescriptor();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Identification()
-{
- switch(Code2)
- {
- ELEMENT(3C01, Identification_CompanyName, "CompanyName")
- ELEMENT(3C02, Identification_ProductName, "ProductName")
- ELEMENT(3C03, Identification_ProductVersion, "ProductVersion")
- ELEMENT(3C04, Identification_VersionString, "VersionString")
- ELEMENT(3C05, Identification_ProductUID, "ProductUID")
- ELEMENT(3C06, Identification_ModificationDate , "ModificationDate")
- ELEMENT(3C07, Identification_ToolkitVersion, "ToolkitVersion")
- ELEMENT(3C08, Identification_Platform, "Platform")
- ELEMENT(3C09, Identification_ThisGenerationUID, "ThisGenerationUID")
- default: InterchangeObject();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::IndexTableSegment()
-{
- if (Element_Offset==4)
- {
- #if MEDIAINFO_DEMUX || MEDIAINFO_SEEK
- //Testing if already parsed
- for (size_t Pos=0; Pos<IndexTables.size(); Pos++)
- if (File_Offset+Buffer_Offset-Header_Size==IndexTables[Pos].StreamOffset)
- {
- Element_Offset=Element_Size;
- return;
- }
-
- IndexTables.push_back(indextable());
- IndexTables[IndexTables.size()-1].StreamOffset=File_Offset+Buffer_Offset-Header_Size;
- #endif //MEDIAINFO_DEMUX || MEDIAINFO_SEEK
- }
-
- switch(Code2)
- {
- ELEMENT(3F05, IndexTableSegment_EditUnitByteCount, "Edit Unit Byte Count")
- ELEMENT(3F06, IndexTableSegment_IndexSID, "IndexSID")
- ELEMENT(3F07, IndexTableSegment_BodySID, "BodySID")
- ELEMENT(3F08, IndexTableSegment_SliceCount, "Slice Count")
- ELEMENT(3F09, IndexTableSegment_DeltaEntryArray, "Delta Entry Array")
- ELEMENT(3F0A, IndexTableSegment_IndexEntryArray, "Index Entry Array")
- ELEMENT(3F0B, IndexTableSegment_IndexEditRate, "Index Edit Rate")
- ELEMENT(3F0C, IndexTableSegment_IndexStartPosition, "Index Start Position")
- ELEMENT(3F0D, IndexTableSegment_IndexDuration, "Index Duration")
- ELEMENT(3F0E, IndexTableSegment_PosTableCount, "PosTableCount")
- ELEMENT(8002, IndexTableSegment_8002, "8002?")
- default: InterchangeObject();
- }
-
- if (Code2==0x3C0A) //InstanceIUD
- {
- IndexTable_NSL=0;
- IndexTable_NPE=0;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::GenericDescriptor()
-{
- switch(Code2)
- {
- ELEMENT(2F01, GenericDescriptor_Locators, "Locators")
- default: GenerationInterchangeObject();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::JPEG2000PictureSubDescriptor()
-{
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(JPEG2000PictureSubDescriptor_Rsiz, "Rsiz - Decoder capabilities")
- ELEMENT_UUID(JPEG2000PictureSubDescriptor_Xsiz, "Xsiz - Width")
- ELEMENT_UUID(JPEG2000PictureSubDescriptor_Ysiz, "Ysiz - Height")
- ELEMENT_UUID(JPEG2000PictureSubDescriptor_XOsiz, "XOsiz - Horizontal offset")
- ELEMENT_UUID(JPEG2000PictureSubDescriptor_YOsiz, "YOsiz - Vertical offset")
- ELEMENT_UUID(JPEG2000PictureSubDescriptor_XTsiz, "XTsiz - Width of one reference tile")
- ELEMENT_UUID(JPEG2000PictureSubDescriptor_YTsiz, "YTsiz - Height of one reference tile")
- ELEMENT_UUID(JPEG2000PictureSubDescriptor_XTOsiz, "XTOsiz - Horizontal offset of the first tile")
- ELEMENT_UUID(JPEG2000PictureSubDescriptor_YTOsiz, "YTOsiz - Vertical offset of the first tile")
- ELEMENT_UUID(JPEG2000PictureSubDescriptor_Csiz, "Csiz - Number of components in the picture")
- ELEMENT_UUID(JPEG2000PictureSubDescriptor_PictureComponentSizing, "Picture Component Sizing")
- ELEMENT_UUID(JPEG2000PictureSubDescriptor_CodingStyleDefault, "Coding Style Default")
- ELEMENT_UUID(JPEG2000PictureSubDescriptor_QuantizationDefault, "Quantization Default")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
-
- GenerationInterchangeObject();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::GenerationInterchangeObject()
-{
- //Parsing
- switch(Code2)
- {
- ELEMENT(0102, GenerationInterchangeObject_GenerationUID, "GenerationUID")
- default: InterchangeObject();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::GenericPackage()
-{
- switch(Code2)
- {
- ELEMENT(4401, GenericPackage_PackageUID, "PackageUID")
- ELEMENT(4402, GenericPackage_Name, "Name")
- ELEMENT(4403, GenericPackage_Tracks, "Tracks")
- ELEMENT(4404, GenericPackage_PackageModifiedDate, "PackageModifiedDate")
- ELEMENT(4405, GenericPackage_PackageCreationDate, "PackageCreationDate")
- default: GenerationInterchangeObject();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::GenericPictureEssenceDescriptor()
-{
- switch(Code2)
- {
- ELEMENT(3201, GenericPictureEssenceDescriptor_PictureEssenceCoding, "Identifier of the Picture Compression Scheme")
- ELEMENT(3202, GenericPictureEssenceDescriptor_StoredHeight, "Vertical Field Size")
- ELEMENT(3203, GenericPictureEssenceDescriptor_StoredWidth, "Horizontal Size")
- ELEMENT(3204, GenericPictureEssenceDescriptor_SampledHeight, "Sampled height supplied to codec")
- ELEMENT(3205, GenericPictureEssenceDescriptor_SampledWidth, "Sampled width supplied to codec")
- ELEMENT(3206, GenericPictureEssenceDescriptor_SampledXOffset, "Offset from sampled to stored width")
- ELEMENT(3207, GenericPictureEssenceDescriptor_SampledYOffset, "Offset from sampled to stored height")
- ELEMENT(3208, GenericPictureEssenceDescriptor_DisplayHeight, "Displayed Height placed in Production Aperture")
- ELEMENT(3209, GenericPictureEssenceDescriptor_DisplayWidth, "Displayed Width placed in Production Aperture")
- ELEMENT(320A, GenericPictureEssenceDescriptor_DisplayXOffset,"Horizontal offset from the of the picture as displayed")
- ELEMENT(320B, GenericPictureEssenceDescriptor_DisplayYOffset,"Vertical offset of the picture as displayed")
- ELEMENT(320C, GenericPictureEssenceDescriptor_FrameLayout, "Interlace or Progressive layout")
- ELEMENT(320D, GenericPictureEssenceDescriptor_VideoLineMap, "First active line in each field")
- ELEMENT(320E, GenericPictureEssenceDescriptor_AspectRatio, "Aspect ratio")
- ELEMENT(320F, GenericPictureEssenceDescriptor_AlphaTransparency, "Is Alpha Inverted")
- ELEMENT(3210, GenericPictureEssenceDescriptor_TransferCharacteristic, "Transfer Characteristic")
- ELEMENT(3211, GenericPictureEssenceDescriptor_ImageAlignmentOffset, "Byte Boundary alignment required for Low Level Essence Storage")
- ELEMENT(3212, GenericPictureEssenceDescriptor_FieldDominance,"Number of the field which is considered temporally to come first")
- ELEMENT(3213, GenericPictureEssenceDescriptor_ImageStartOffset, "Unused bytes before start of stored data")
- ELEMENT(3214, GenericPictureEssenceDescriptor_ImageEndOffset,"Unused bytes before start of stored data")
- ELEMENT(3215, GenericPictureEssenceDescriptor_SignalStandard, "Underlying signal standard")
- ELEMENT(3216, GenericPictureEssenceDescriptor_StoredF2Offset, "Topness Adjustment for stored picture")
- ELEMENT(3217, GenericPictureEssenceDescriptor_DisplayF2Offset, "Topness Adjustment for Displayed Picture")
- ELEMENT(3218, GenericPictureEssenceDescriptor_ActiveFormatDescriptor, "Specifies the intended framing of the content within the displayed image")
- ELEMENT(3219, GenericPictureEssenceDescriptor_ColorPrimaries, "Color Primaries")
- ELEMENT(321A, GenericPictureEssenceDescriptor_CodingEquations, "Coding Equations")
- default: FileDescriptor();
- }
-
- if (Descriptors[InstanceUID].StreamKind==Stream_Max)
- {
- Descriptors[InstanceUID].StreamKind=Stream_Video;
- if (Streams_Count==(size_t)-1)
- Streams_Count=0;
- Streams_Count++;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::GenericSoundEssenceDescriptor()
-{
- //Parsing
- switch(Code2)
- {
- ELEMENT(3D01, GenericSoundEssenceDescriptor_QuantizationBits, "QuantizationBits")
- ELEMENT(3D02, GenericSoundEssenceDescriptor_Locked , "Locked")
- ELEMENT(3D03, GenericSoundEssenceDescriptor_AudioSamplingRate, "AudioSamplingRate")
- ELEMENT(3D04, GenericSoundEssenceDescriptor_AudioRefLevel, "AudioRefLevel")
- ELEMENT(3D05, GenericSoundEssenceDescriptor_ElectroSpatialFormulation, "ElectroSpatialFormulation")
- ELEMENT(3D06, GenericSoundEssenceDescriptor_SoundEssenceCompression, "SoundEssenceCompression")
- ELEMENT(3D07, GenericSoundEssenceDescriptor_ChannelCount, "ChannelCount")
- ELEMENT(3D0C, GenericSoundEssenceDescriptor_DialNorm, "DialNorm")
- default: FileDescriptor();
- }
-
- if (Descriptors[InstanceUID].StreamKind==Stream_Max)
- {
- Descriptors[InstanceUID].StreamKind=Stream_Audio;
- if (Streams_Count==(size_t)-1)
- Streams_Count=0;
- Streams_Count++;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::GenericDataEssenceDescriptor()
-{
- //Parsing
- switch(Code2)
- {
- ELEMENT(3E01, GenericDataEssenceDescriptor_DataEssenceCoding, "DataEssenceCoding")
- default: FileDescriptor();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::GenericTrack()
-{
- //Parsing
- switch(Code2)
- {
- ELEMENT(4801, GenericTrack_TrackID, "TrackID")
- ELEMENT(4802, GenericTrack_TrackName, "TrackName")
- ELEMENT(4803, GenericTrack_Sequence, "Sequence")
- ELEMENT(4804, GenericTrack_TrackNumber, "TrackNumber")
- default: GenerationInterchangeObject();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::InterchangeObject()
-{
- //Parsing
- switch(Code2)
- {
- ELEMENT(3C0A, InterchangeObject_InstanceUID, "InstanceUID")
- default: ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MaterialPackage()
-{
- GenericPackage();
-
- if (Code2==0x3C0A)
- {
- if (InstanceUID==Prefaces[Preface_Current].PrimaryPackage) //InstanceIUD
- {
- Element_Level--;
- Element_Info1("Primary package");
- Element_Level++;
- }
- for (contentstorages::iterator ContentStorage=ContentStorages.begin(); ContentStorage!=ContentStorages.end(); ++ContentStorage)
- {
- for (size_t Pos=0; Pos<ContentStorage->second.Packages.size(); Pos++)
- if (InstanceUID==ContentStorage->second.Packages[Pos])
- {
- Element_Level--;
- Element_Info1("Valid from Content storage");
- Element_Level++;
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MPEG2VideoDescriptor()
-{
- Descriptors[InstanceUID].HasMPEG2VideoDescriptor=true;
-
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(MPEG2VideoDescriptor_SingleSequence, "Single sequence")
- ELEMENT_UUID(MPEG2VideoDescriptor_ConstantBFrames, "Number of B frames always constant")
- ELEMENT_UUID(MPEG2VideoDescriptor_CodedContentType, "Coded content type")
- ELEMENT_UUID(MPEG2VideoDescriptor_LowDelay, "Low delay")
- ELEMENT_UUID(MPEG2VideoDescriptor_ClosedGOP, "Closed GOP")
- ELEMENT_UUID(MPEG2VideoDescriptor_IdenticalGOP, "Identical GOP")
- ELEMENT_UUID(MPEG2VideoDescriptor_MaxGOP, "Maximum occurring spacing between I frames")
- ELEMENT_UUID(MPEG2VideoDescriptor_BPictureCount, "Maximum number of B pictures between P or I frames")
- ELEMENT_UUID(MPEG2VideoDescriptor_ProfileAndLevel, "Profile and level")
- ELEMENT_UUID(MPEG2VideoDescriptor_BitRate, "Maximum bit rate")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
-
- CDCIEssenceDescriptor();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MultipleDescriptor()
-{
- if (Descriptors[InstanceUID].Type==descriptor::Type_Unknown)
- Descriptors[InstanceUID].Type=descriptor::type_Mutiple;
-
- /*
- //TODO: check when MPEG-4 Visual subdescriptor, it disabled stream info merge
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(SubDescriptors, "Sub Descriptors")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
- */
-
- switch(Code2)
- {
- ELEMENT(3F01, MultipleDescriptor_SubDescriptorUIDs, "SubDescriptorUIDs")
- default: FileDescriptor();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::DMSourceClip()
-{
- InterchangeObject();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::NetworkLocator()
-{
- switch(Code2)
- {
- ELEMENT(4001, NetworkLocator_URLString, "A URL indicating where the essence may be found.")
- default: GenerationInterchangeObject();
- }
-
- if (Code2==0x3C0A)
- {
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- {
- for (size_t Pos=0; Pos<Descriptor->second.Locators.size(); Pos++)
- if (InstanceUID==Descriptor->second.Locators[Pos])
- {
- Element_Level--;
- Element_Info1("Valid from Descriptor");
- Element_Level++;
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Preface()
-{
- switch(Code2)
- {
- ELEMENT(3B02, Preface_LastModifiedDate, "LastModifiedDate")
- ELEMENT(3B03, Preface_ContentStorage, "ContentStorage")
- ELEMENT(3B05, Preface_Version, "Version")
- ELEMENT(3B06, Preface_Identifications, "Identifications")
- ELEMENT(3B07, Preface_ObjectModelVersion, "ObjectModelVersion")
- ELEMENT(3B08, Preface_PrimaryPackage, "PrimaryPackage")
- ELEMENT(3B09, Preface_OperationalPattern, "OperationalPattern")
- ELEMENT(3B0A, Preface_EssenceContainers, "EssenceContainers")
- ELEMENT(3B0B, Preface_DMSchemes, "DMSchemes")
- default: GenerationInterchangeObject();
- }
-
- if (Code2==0x3C0A) //InstanceIUD
- {
- Preface_Current=InstanceUID;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Primer()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("LocalTagEntryBatch");
- int16u LocalTag;
- int128u UID;
- Get_B2 (LocalTag, "LocalTag"); Element_Info1(Ztring().From_CC2(LocalTag));
- Get_UL (UID, "UID", NULL); Element_Info1(Ztring().From_UUID(UID));
- Element_End0();
-
- FILLING_BEGIN();
- if (LocalTag>=0x8000) //user defined
- Primer_Values[LocalTag]=UID;
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::RGBAEssenceDescriptor()
-{
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(SubDescriptors, "Sub Descriptors")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
-
- switch(Code2)
- {
- ELEMENT(3401, RGBAEssenceDescriptor_PixelLayout, "Pixel Layout")
- ELEMENT(3403, RGBAEssenceDescriptor_Palette, "Palette")
- ELEMENT(3404, RGBAEssenceDescriptor_PaletteLayout, "Palette Layout")
- ELEMENT(3405, RGBAEssenceDescriptor_ScanningDirection, "Enumerated Scanning Direction")
- ELEMENT(3406, RGBAEssenceDescriptor_ComponentMaxRef, "Maximum value for RGB components")
- ELEMENT(3407, RGBAEssenceDescriptor_ComponentMinRef, "Minimum value for RGB components")
- ELEMENT(3408, RGBAEssenceDescriptor_AlphaMaxRef, "Maximum value for alpha component")
- ELEMENT(3409, RGBAEssenceDescriptor_AlphaMinRef, "Minimum value for alpha component")
- default: GenericPictureEssenceDescriptor();
- }
-
- if (Descriptors[InstanceUID].Infos["ColorSpace"].empty())
- Descriptors[InstanceUID].Infos["ColorSpace"]="RGB";
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::RandomIndexMetadata()
-{
- //Parsing
- while (Element_Offset+4<Element_Size)
- {
- Element_Begin1("PartitionArray");
- randomindexmetadata RandomIndexMetadata;
- Get_B4 (RandomIndexMetadata.BodySID, "BodySID"); Element_Info1(RandomIndexMetadata.BodySID);
- Get_B8 (RandomIndexMetadata.ByteOffset, "ByteOffset"); Element_Info1(Ztring::ToZtring(RandomIndexMetadata.ByteOffset, 16));
- Element_End0();
-
- FILLING_BEGIN();
- if (!RandomIndexMetadatas_AlreadyParsed && PartitionPack_AlreadyParsed.find(RandomIndexMetadata.ByteOffset)==PartitionPack_AlreadyParsed.end())
- RandomIndexMetadatas.push_back(RandomIndexMetadata);
- FILLING_END();
- }
- Skip_B4( "Length");
-
- FILLING_BEGIN();
- if (MediaInfoLib::Config.ParseSpeed_Get()<1.0 && !RandomIndexMetadatas_AlreadyParsed && !RandomIndexMetadatas.empty())
- {
- IsParsingEnd=true;
- IsCheckingRandomAccessTable=true;
- GoTo(RandomIndexMetadatas[0].ByteOffset);
- RandomIndexMetadatas.erase(RandomIndexMetadatas.begin());
- Open_Buffer_Unsynch();
- }
- RandomIndexMetadatas_AlreadyParsed=true;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Filler53()
-{
- switch(Code2)
- {
- ELEMENT(0202, DMSegment_Duration, "Duration")
- default: StructuralComponent();
- }
-
- FILLING_BEGIN();
- DMSegments[InstanceUID].IsAs11SegmentFiller=true;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Sequence()
-{
- switch(Code2)
- {
- ELEMENT(1001, Sequence_StructuralComponents, "StructuralComponents")
- default: StructuralComponent();
- }
-
- if (Code2==0x3C0A)
- {
- for (std::map<int128u, track>::iterator Track=Tracks.begin(); Track!=Tracks.end(); ++Track)
- {
- if (InstanceUID==Track->second.Sequence)
- {
- Element_Level--;
- Element_Info1("Valid from track");
- Element_Level++;
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::SourceClip()
-{
- switch(Code2)
- {
- ELEMENT(1101, SourceClip_SourcePackageID, "SourcePackageID")
- ELEMENT(1102, SourceClip_SourceTrackID, "SourceTrackID")
- ELEMENT(1201, SourceClip_StartPosition, "StartPosition")
- default: StructuralComponent();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::SourcePackage()
-{
- switch(Code2)
- {
- //SourcePackage
- ELEMENT(4701, SourcePackage_Descriptor, "Descriptor")
- default: GenericPackage();
- Packages[InstanceUID].IsSourcePackage=true;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::StaticTrack()
-{
- GenericTrack();
-}
-
-//---------------------------------------------------------------------------
-//SMPTE 405M
-void File_Mxf::SystemScheme1()
-{
- systemschemes::iterator SystemScheme=SystemSchemes.find(Element_Code&0xFFFF);
- if (SystemScheme==SystemSchemes.end())
- {
- SystemSchemes[Element_Code&0xFFFF].IsTimeCode=false;
- }
-
- switch(Code2)
- {
- #if MEDIAINFO_TRACE
- ELEMENT(0101, SystemScheme1_FrameCount, "Frame Count")
- #endif //MEDIAINFO_TRACE
- ELEMENT(0102, SystemScheme1_TimeCodeArray, "Time Code Array")
- #if MEDIAINFO_TRACE
- ELEMENT(0103, SystemScheme1_ClipIDArray, "Clip ID Array")
- ELEMENT(0104, SystemScheme1_ExtendedClipIDArray, "Extended Clip ID Array")
- ELEMENT(0105, SystemScheme1_VideoIndexArray, "Video Index Array")
- ELEMENT(0106, SystemScheme1_KLVMetadataSequence, "KLV Metadata Sequence")
- ELEMENT(3001, SystemScheme1_SampleRate, "Sample Rate")
- ELEMENT(4804, SystemScheme1_EssenceTrackNumber, "Essence Track Number")
- ELEMENT(6801, SystemScheme1_EssenceTrackNumberBatch, "Essence TrackNumber Batch")
- ELEMENT(6803, SystemScheme1_ContentPackageIndexArray, "Content Package Index Array")
- #endif //MEDIAINFO_TRACE
- default: InterchangeObject();
- }
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::AS11_AAF_Core()
-{
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(AS11_Core_SeriesTitle, "Series Title")
- ELEMENT_UUID(AS11_Core_ProgrammeTitle, "Programme Title")
- ELEMENT_UUID(AS11_Core_EpisodeTitleNumber, "Episode Title Number")
- ELEMENT_UUID(AS11_Core_ShimName, "Shim Name")
- ELEMENT_UUID(AS11_Core_AudioTrackLayout, "Audio Track Layout")
- ELEMENT_UUID(AS11_Core_PrimaryAudioLanguage, "Primary Audio Language")
- ELEMENT_UUID(AS11_Core_ClosedCaptionsPresent, "Closed Captions Present")
- ELEMENT_UUID(AS11_Core_ClosedCaptionsType, "Closed Captions Type")
- ELEMENT_UUID(AS11_Core_ClosedCaptionsLanguage, "Closed Captions Language")
- ELEMENT_UUID(AS11_Core_ShimVersion, "Shim Version")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
-
- StructuralComponent();
-
- if (Code2==0x3C0A) //InstanceIUD
- AS11s[InstanceUID].Type=as11::Type_Core;
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::AS11_AAF_Segmentation()
-{
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(AS11_Segment_PartNumber, "Part Number")
- ELEMENT_UUID(AS11_Segment_PartTotal, "Part Total")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
-
- StructuralComponent();
-
- if (Code2==0x3C0A) //InstanceIUD
- AS11s[InstanceUID].Type=as11::Type_Segmentation;
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::AS11_AAF_UKDPP()
-{
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(AS11_UKDPP_ProductionNumber, "Production Number")
- ELEMENT_UUID(AS11_UKDPP_Synopsis, "Synopsis")
- ELEMENT_UUID(AS11_UKDPP_Originator, "Originator")
- ELEMENT_UUID(AS11_UKDPP_CopyrightYear, "Copyright Year")
- ELEMENT_UUID(AS11_UKDPP_OtherIdentifier, "Other Identifier")
- ELEMENT_UUID(AS11_UKDPP_OtherIdentifierType, "Other Identifier Type")
- ELEMENT_UUID(AS11_UKDPP_Genre, "Genre")
- ELEMENT_UUID(AS11_UKDPP_Distributor, "Distributor")
- ELEMENT_UUID(AS11_UKDPP_PictureRatio, "Picture Ratio")
- ELEMENT_UUID(AS11_UKDPP_3D, "3D")
- ELEMENT_UUID(AS11_UKDPP_3DType, "3D Type")
- ELEMENT_UUID(AS11_UKDPP_ProductPlacement, "Product Placement")
- ELEMENT_UUID(AS11_UKDPP_FpaPass, "FPA Pass")
- ELEMENT_UUID(AS11_UKDPP_FpaManufacturer, "FPA Manufacturer")
- ELEMENT_UUID(AS11_UKDPP_FpaVersion, "FPA Version")
- ELEMENT_UUID(AS11_UKDPP_VideoComments, "Video Comments")
- ELEMENT_UUID(AS11_UKDPP_SecondaryAudioLanguage, "Secondary Audio Language")
- ELEMENT_UUID(AS11_UKDPP_TertiaryAudioLanguage, "Tertiary Audio Language")
- ELEMENT_UUID(AS11_UKDPP_AudioLoudnessStandard, "Audio Loudness Standard")
- ELEMENT_UUID(AS11_UKDPP_AudioComments, "Audio Comments")
- ELEMENT_UUID(AS11_UKDPP_LineUpStart, "Line Up Start")
- ELEMENT_UUID(AS11_UKDPP_IdentClockStart, "Ident Clock Start")
- ELEMENT_UUID(AS11_UKDPP_TotalNumberOfParts, "Total Number Of Parts")
- ELEMENT_UUID(AS11_UKDPP_TotalProgrammeDuration, "Total Programme Duration")
- ELEMENT_UUID(AS11_UKDPP_AudioDescriptionPresent, "Audio Description Present")
- ELEMENT_UUID(AS11_UKDPP_AudioDescriptionType, "Audio Description Type")
- ELEMENT_UUID(AS11_UKDPP_OpenCaptionsPresent, "Open Captions Present")
- ELEMENT_UUID(AS11_UKDPP_OpenCaptionsType, "Open Captions Type")
- ELEMENT_UUID(AS11_UKDPP_OpenCaptionsLanguage, "Open Captions Language")
- ELEMENT_UUID(AS11_UKDPP_SigningPresent, "Signing Present")
- ELEMENT_UUID(AS11_UKDPP_SignLanguage, "Sign Language")
- ELEMENT_UUID(AS11_UKDPP_CompletionDate, "Completion Date")
- ELEMENT_UUID(AS11_UKDPP_TextlessElementsExist, "Textless Elements Exist")
- ELEMENT_UUID(AS11_UKDPP_ProgrammeHasText, "Programme Has Text")
- ELEMENT_UUID(AS11_UKDPP_ProgrammeTextLanguage, "Programme Text Language")
- ELEMENT_UUID(AS11_UKDPP_ContactEmail, "Contact Email")
- ELEMENT_UUID(AS11_UKDPP_ContactTelephoneNumber, "Contact Telephone Number")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
-
- StructuralComponent();
-
- if (Code2==0x3C0A) //InstanceIUD
- AS11s[InstanceUID].Type=as11::Type_UKDPP;
-}
-
-//---------------------------------------------------------------------------
-//SMPTE 380M
-void File_Mxf::DMScheme1()
-{
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(PrimaryExtendedSpokenLanguage, "Primary Extended Spoken Language")
- ELEMENT_UUID(SecondaryExtendedSpokenLanguage, "Secondary Extended Spoken Language")
- ELEMENT_UUID(OriginalExtendedSpokenLanguage, "Original Extended Spoken Language")
- ELEMENT_UUID(SecondaryOriginalExtendedSpokenLanguage, "Secondary Original Extended Spoken Language")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
-
- InterchangeObject();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::StructuralComponent()
-{
- switch(Code2)
- {
- ELEMENT(0201, StructuralComponent_DataDefinition, "DataDefinition")
- ELEMENT(0202, StructuralComponent_Duration, "Duration")
- default: GenerationInterchangeObject();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::TextLocator()
-{
- switch(Code2)
- {
- ELEMENT(4101, TextLocator_LocatorName, "Human-readable locator text string for manual location of essence")
- default: GenerationInterchangeObject();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::StereoscopicPictureSubDescriptor()
-{
- StereoscopicPictureSubDescriptor_IsPresent=true;
-
- //switch(Code2)
- //{
- // default:
- GenerationInterchangeObject();
- //}
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::TimecodeComponent()
-{
- if (Element_Offset==4)
- {
- MxfTimeCodeForDelay=mxftimecode();
- DTS_Delay=0;
- FrameInfo.DTS=0;
- }
-
- switch(Code2)
- {
- ELEMENT(1501, TimecodeComponent_StartTimecode, "StartTimecode")
- ELEMENT(1502, TimecodeComponent_RoundedTimecodeBase, "RoundedTimecodeBase")
- ELEMENT(1503, TimecodeComponent_DropFrame, "DropFrame")
- default: StructuralComponent();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::WaveAudioDescriptor()
-{
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(SubDescriptors, "Sub Descriptors")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
-
- switch(Code2)
- {
- ELEMENT(3D09, WaveAudioDescriptor_AvgBps, "Average Bytes per second")
- ELEMENT(3D0A, WaveAudioDescriptor_BlockAlign, "Sample Block alignment")
- ELEMENT(3D0B, WaveAudioDescriptor_SequenceOffset, "Frame number of first essence")
- ELEMENT(3D29, WaveAudioDescriptor_PeakEnvelopeVersion, "Peak envelope version information")
- ELEMENT(3D2A, WaveAudioDescriptor_PeakEnvelopeFormat, "Format of a peak point")
- ELEMENT(3D2B, WaveAudioDescriptor_PointsPerPeakValue, "Number of peak points per peak value")
- ELEMENT(3D2C, WaveAudioDescriptor_PeakEnvelopeBlockSize,"Number of audio samples used to generate each peak frame")
- ELEMENT(3D2D, WaveAudioDescriptor_PeakChannels, "Number of peak channels")
- ELEMENT(3D2E, WaveAudioDescriptor_PeakFrames, "Number of peak frames")
- ELEMENT(3D2F, WaveAudioDescriptor_PeakOfPeaksPosition, "Offset to the first audio sample whose absolute value is the maximum value of the entire audio file")
- ELEMENT(3D30, WaveAudioDescriptor_PeakEnvelopeTimestamp,"Time stamp of the creation of the peak data")
- ELEMENT(3D31, WaveAudioDescriptor_PeakEnvelopeData , "Peak envelope data")
- ELEMENT(3D32, WaveAudioDescriptor_ChannelAssignment, "Channel assignment")
- default: GenericSoundEssenceDescriptor();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::VbiPacketsDescriptor()
-{
- //switch(Code2)
- //{
- // default:
- GenericDataEssenceDescriptor();
- //}
-
- if (Descriptors[InstanceUID].Type==descriptor::Type_Unknown)
- {
- Descriptors[InstanceUID].Type=descriptor::Type_AncPackets;
- if (Streams_Count==(size_t)-1)
- Streams_Count=0;
- Streams_Count++;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::AncPacketsDescriptor()
-{
- //switch(Code2)
- //{
- // default:
- GenericDataEssenceDescriptor();
- //}
-
- if (Descriptors[InstanceUID].Type==descriptor::Type_Unknown)
- {
- Descriptors[InstanceUID].Type=descriptor::Type_AncPackets;
- if (Streams_Count==(size_t)-1)
- Streams_Count=0;
- Streams_Count++;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MpegAudioDescriptor()
-{
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(MpegAudioDescriptor_BitRate, "Bit Rate")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
-
- //switch(Code2)
- //{
- // default: GenericSoundEssenceDescriptor();
- //}
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::PackageMarkerObject()
-{
- //switch(Code2)
- //{
- // default:
- GenerationInterchangeObject();
- //}
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ApplicationPlugInObject()
-{
- //switch(Code2)
- //{
- // default:
- GenerationInterchangeObject();
- //}
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ApplicationReferencedObject()
-{
- //switch(Code2)
- //{
- // default:
- GenerationInterchangeObject();
- //}
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCALabelSubDescriptor()
-{
- if (Descriptors[InstanceUID].Type==descriptor::Type_Unknown)
- Descriptors[InstanceUID].Type=descriptor::Type_MCALabelSubDescriptor;
-
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(MCAChannelID, "MCA Channel ID")
- ELEMENT_UUID(MCALabelDictionaryID, "MCA Label Dictionary ID")
- ELEMENT_UUID(MCATagSymbol, "MCA Tag Symbol")
- ELEMENT_UUID(MCATagName, "MCA Tag Name")
- ELEMENT_UUID(GroupOfSoundfieldGroupsLinkID, "Group Of Soundfield Groups Link ID")
- ELEMENT_UUID(MCALinkID, "MCA Link ID")
- ELEMENT_UUID(SoundfieldGroupLinkID, "Soundfield Group Link ID")
- ELEMENT_UUID(MCAPartitionKind, "MCA Partition Kind")
- ELEMENT_UUID(MCAPartitionNumber, "MCA Partition Number")
- ELEMENT_UUID(MCATitle, "MCA Title")
- ELEMENT_UUID(MCATitleVersion, "MCA Title Version")
- ELEMENT_UUID(MCATitleSubVersion, "MCA Title Sub-version")
- ELEMENT_UUID(MCAEpisode, "MCA Episode")
- ELEMENT_UUID(MCAAudioContentKind, "MCA Audio Content Kind")
- ELEMENT_UUID(MCAAudioElementKind, "MCA Audio Element Kind")
- ELEMENT_UUID(RFC5646AudioLanguageCode, "Secondary Original Extended Spoken Language")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
-
- //switch(Code2)
- //{
- // default:
- GenerationInterchangeObject();
- //}
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::TimedTextDescriptor()
-{
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(ResourceID, "Resource ID")
- ELEMENT_UUID(NamespaceURI, "Namespace URI")
- ELEMENT_UUID(UCSEncoding, "UCS Encoding")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
-
- //switch(Code2)
- //{
- // default:
- GenericDataEssenceDescriptor();
- //}
-
- if (Descriptors[InstanceUID].StreamKind==Stream_Max)
- {
- Descriptors[InstanceUID].StreamKind=Stream_Text;
- if (Streams_Count==(size_t)-1)
- Streams_Count=0;
- Streams_Count++;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::TimedTextResourceSubDescriptor()
-{
- //switch(Code2)
- //{
- // default:
- GenerationInterchangeObject();
- //}
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Unknown67SubDescriptor()
-{
- //switch(Code2)
- //{
- // default:
- GenerationInterchangeObject();
- //}
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Mpeg4VisualSubDescriptor()
-{
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(Mpeg4VisualDescriptor_SingleSequence, "Single sequence")
- ELEMENT_UUID(Mpeg4VisualDescriptor_ConstantBFrames, "Number of B frames always constant")
- ELEMENT_UUID(Mpeg4VisualDescriptor_CodedContentType, "Coded content type")
- ELEMENT_UUID(Mpeg4VisualDescriptor_LowDelay, "Low delay")
- ELEMENT_UUID(Mpeg4VisualDescriptor_ClosedGOP, "Closed GOP")
- ELEMENT_UUID(Mpeg4VisualDescriptor_IdenticalGOP, "Identical GOP")
- ELEMENT_UUID(Mpeg4VisualDescriptor_MaxGOP, "Maximum occurring spacing between I frames")
- ELEMENT_UUID(Mpeg4VisualDescriptor_BPictureCount, "Maximum number of B pictures between P or I frames")
- ELEMENT_UUID(Mpeg4VisualDescriptor_ProfileAndLevel, "Profile and level")
- ELEMENT_UUID(Mpeg4VisualDescriptor_BitRate, "Maximum bit rate")
- else
- {
- Element_Info1(Ztring().From_UUID(Primer_Value->second));
- Skip_XX(Length2, "Data");
- }
-
- return;
- }
- }
-
- //switch(Code2)
- //{
- // default:
- GenerationInterchangeObject();
- //}
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ResourceID()
-{
- //Parsing
- Info_UUID(Data, "UUID"); Element_Info1(Ztring().From_UUID(Data));
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::NamespaceURI()
-{
- //Parsing
- Info_UTF16B (Length2, Value, "Value"); Element_Info1(Value);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::UCSEncoding()
-{
- //Parsing
- Info_UTF16B (Length2, Value, "Value"); Element_Info1(Value);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::AudioChannelLabelSubDescriptor()
-{
- if (Descriptors[InstanceUID].Type==descriptor::Type_Unknown)
- Descriptors[InstanceUID].Type=descriptor::Type_AudioChannelLabelSubDescriptor;
-
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(SoundfieldGroupLinkID, "Soundfield Group Link ID")
- else
- MCALabelSubDescriptor();
-
- return;
- }
- }
-
- //switch(Code2)
- //{
- // default:
- MCALabelSubDescriptor();
- //}
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::SoundfieldGroupLabelSubDescriptor()
-{
- if (Descriptors[InstanceUID].Type==descriptor::Type_Unknown)
- Descriptors[InstanceUID].Type=descriptor::Type_SoundfieldGroupLabelSubDescriptor;
-
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- int32u Code_Compare1=Primer_Value->second.hi>>32;
- int32u Code_Compare2=(int32u)Primer_Value->second.hi;
- int32u Code_Compare3=Primer_Value->second.lo>>32;
- int32u Code_Compare4=(int32u)Primer_Value->second.lo;
- if(0);
- ELEMENT_UUID(GroupOfSoundfieldGroupsLinkID, "Group Of Soundfield Groups Link ID")
- else
- MCALabelSubDescriptor();
-
- return;
- }
- }
-
- //switch(Code2)
- //{
- // default:
- MCALabelSubDescriptor();
- //}
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::GroupOfSoundfieldGroupsLabelSubDescriptor()
-{
- if (Descriptors[InstanceUID].Type==descriptor::Type_Unknown)
- Descriptors[InstanceUID].Type=descriptor::Type_GroupOfSoundfieldGroupsLabelSubDescriptor;
-
- if (Code2>=0x8000)
- {
- // Not a short code
- std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(Code2);
- if (Primer_Value!=Primer_Values.end())
- {
- MCALabelSubDescriptor();
-
- return;
- }
- }
-
- //switch(Code2)
- //{
- // default:
- MCALabelSubDescriptor();
- //}
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCAChannelID()
-{
- if (Length2==4)
- {
- Info_B4(Value, "Value"); Element_Info1(Value);
- }
- else
- Skip_XX(Length2, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCALabelDictionaryID()
-{
- //Parsing
- int128u Value;
- Get_UL (Value, "Value", NULL); Element_Info1(Ztring().From_UUID(Value));
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].MCALabelDictionaryID=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCATagSymbol()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B (Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].MCATagSymbol=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCATagName()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B (Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].MCATagName=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::GroupOfSoundfieldGroupsLinkID()
-{
- if (Length2==0)
- return;
-
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- int128u Data;
- Get_UUID(Data, "Value");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCALinkID()
-{
- //Parsing
- int128u Value;
- Get_UUID (Value, "Value"); Element_Info1(Ztring().From_UUID(Value));
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].MCALinkID=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::SoundfieldGroupLinkID()
-{
- //Parsing
- int128u Value;
- Get_UUID (Value, "Value"); Element_Info1(Ztring().From_UUID(Value));
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].SoundfieldGroupLinkID=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCAPartitionKind()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B (Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].MCAPartitionKind=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCAPartitionNumber()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B (Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].MCAPartitionNumber=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCATitle()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B (Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].MCATitle=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCATitleVersion()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B (Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].MCATitleVersion=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCATitleSubVersion()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B (Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].MCATitleSubVersion=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCAEpisode()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B (Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].MCAEpisode=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCAAudioContentKind()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B (Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].MCAAudioContentKind=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::MCAAudioElementKind()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B (Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].MCAAudioElementKind=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Filler()
-{
- Skip_XX(Element_Size, "Junk");
-
- Buffer_PaddingBytes+=Element_Size;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::TerminatingFiller()
-{
- Skip_XX(Element_Size, "Junk");
-
- Buffer_PaddingBytes+=Element_Size;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::XmlDocumentText()
-{
- Skip_XX(Element_Size, "XML data");
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::SubDescriptors()
-{
- Descriptors[InstanceUID].SubDescriptors.clear();
-
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- int128u Data;
- Get_UUID(Data, "Sub Descriptor");
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].SubDescriptors.push_back(Data);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::LensUnitMetadata()
-{
- //switch(Code2)
- //{
- // default:
- GenerationInterchangeObject();
- //}
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::CameraUnitMetadata()
-{
- if (Count_Get(Stream_Other)==0)
- Stream_Prepare(Stream_Other);
-
- switch(Code2)
- {
- ELEMENT(3210, CameraUnitMetadata_CaptureGammaEquation, "Capture Gamma Equation")
- ELEMENT(8103, CameraUnitMetadata_NeutralDensityFilterWheelSetting, "Neutral Density Filter Wheel Setting")
- ELEMENT(8106, CameraUnitMetadata_CaptureFrameRate, "Capture Frame Rate")
- ELEMENT(8107, CameraUnitMetadata_ImageSensorReadoutMode,"Image Sensor Readout Mode")
- ELEMENT(8108, CameraUnitMetadata_ShutterSpeed_Angle, "Shutter Speed (Angle)")
- ELEMENT(810B, CameraUnitMetadata_ISOSensitivity, "ISO Sensitivity")
- ELEMENT(810E, CameraUnitMetadata_WhiteBalance, "White Balance")
- ELEMENT(8114, CameraUnitMetadata_CameraAttributes, "Camera Attributes")
- ELEMENT(8115, CameraUnitMetadata_ExposureIndexofPhotoMeter,"Exposure Index of Photo Meter")
- ELEMENT(8116, CameraUnitMetadata_GammaforCDL, "Gamma for CDL")
- ELEMENT(8117, CameraUnitMetadata_ASCCDLV1_2, "ASC CDL V1.2")
- default:
- GenerationInterchangeObject();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::UserDefinedAcquisitionMetadata()
-{
- if (Count_Get(Stream_Other)==0)
- Stream_Prepare(Stream_Other);
-
- switch(Code2)
- {
- ELEMENT(E000, UserDefinedAcquisitionMetadata_UdamSetIdentifier, "UDAM Set Identifier")
- default:
- if (UserDefinedAcquisitionMetadata_UdamSetIdentifier_IsSony)
- switch(Code2)
- {
- ELEMENT(8007, UserDefinedAcquisitionMetadata_Sony_8007, "Lens Attributes")
- ELEMENT(E101, UserDefinedAcquisitionMetadata_Sony_E101, "Effective Marker Coverage")
- ELEMENT(E102, UserDefinedAcquisitionMetadata_Sony_E102, "Effective Marker Aspect Ratio")
- ELEMENT(E103, UserDefinedAcquisitionMetadata_Sony_E103, "Camera Process Discrimination Code")
- ELEMENT(E104, UserDefinedAcquisitionMetadata_Sony_E104, "Rotary Shutter Mode")
- ELEMENT(E109, UserDefinedAcquisitionMetadata_Sony_E109, "Monitoring Descriptions")
- ELEMENT(E10B, UserDefinedAcquisitionMetadata_Sony_E10B, "E10B")
- ELEMENT(E201, UserDefinedAcquisitionMetadata_Sony_E201, "E201")
- ELEMENT(E202, UserDefinedAcquisitionMetadata_Sony_E202, "E202")
- ELEMENT(E203, UserDefinedAcquisitionMetadata_Sony_E203, "E203")
- default:
- GenerationInterchangeObject();
- }
- else
- GenerationInterchangeObject();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::SDTI_SystemMetadataPack() //SMPTE 385M + 326M
-{
- //Info for SDTI in Index StreamOffset
- if (!SDTI_IsPresent)
- {
- if (!Partitions.empty() && File_Offset+Buffer_Offset<Partitions[Partitions_Pos].StreamOffset+Partitions[Partitions_Pos].BodyOffset)
- SDTI_IsInIndexStreamOffset=false;
- SDTI_IsPresent=true;
- }
-
- //Parsing
- int8u SMB, CPR_Rate, Format;
- bool SMB_UL_Present, SMB_CreationTimeStamp, SMB_UserTimeStamp, CPR_DropFrame;
- Get_B1 (SMB, "System Metadata Bitmap");
- Skip_Flags(SMB, 7, "FEC Active");
- Get_Flags (SMB, 6, SMB_UL_Present, "SMPTE Label");
- Get_Flags (SMB, 5, SMB_CreationTimeStamp, "Creation Date/Time");
- Get_Flags (SMB, 4, SMB_UserTimeStamp, "User Date/Time");
- Skip_Flags(SMB, 3, "Picture item");
- Skip_Flags(SMB, 2, "Sound item");
- Skip_Flags(SMB, 1, "Data item");
- Skip_Flags(SMB, 0, "Control item");
- BS_Begin();
- Element_Begin1("Content Package Rate");
- Skip_S1(2, "Reserved");
- Get_S1 (5, CPR_Rate, "Package Rate"); //See SMPTE 326M
- Get_SB ( CPR_DropFrame, "1.001 Flag");
- Element_End0();
- Element_Begin1("Content Package Type");
- Skip_S1(3, "Stream Status");
- Skip_SB( "Sub-package flag");
- Skip_SB( "Transfer Mode");
- Skip_S1(3, "Timing Mode");
- Element_End0();
- BS_End();
- Skip_B2( "channel handle");
- Skip_B2( "continuity count");
-
- //Some computing
- float64 FrameRate;
- switch (CPR_Rate) //See SMPTE 326M
- {
- case 0x01 : FrameRate=24; break;
- case 0x02 : FrameRate=25; break;
- case 0x03 : FrameRate=30; break;
- case 0x04 : FrameRate=48; break;
- case 0x05 : FrameRate=50; break;
- case 0x06 : FrameRate=60; break;
- case 0x07 : FrameRate=72; break;
- case 0x08 : FrameRate=75; break;
- case 0x09 : FrameRate=90; break;
- case 0x0A : FrameRate=96; break;
- case 0x0B : FrameRate=100; break;
- case 0x0C : FrameRate=120; break;
- default : FrameRate=0; break;
- }
- if (CPR_DropFrame)
- {
- FrameRate*=1000;
- FrameRate/=1001;
- }
-
- //Parsing
- if (SMB_UL_Present)
- Skip_UL( "SMPTE Universal label");
- if (SMB_CreationTimeStamp)
- {
- Get_B1 (Format, "Format"); //0x81=timecode, 0x82=date-timecode
- Skip_B8( "Time stamp");
- Skip_B8( "Zero");
- }
- else
- Skip_XX(17, "Junk");
- if (SMB_UserTimeStamp)
- {
- Get_B1 (Format, "Format"); //0x81=timecode, 0x82=date-timecode, SMPTE 331M
- Element_Begin1("TimeCode");
- int8u Frames_Units, Frames_Tens, Seconds_Units, Seconds_Tens, Minutes_Units, Minutes_Tens, Hours_Units, Hours_Tens;
- bool DropFrame;
- BS_Begin();
-
- Skip_SB( "CF - Color fame");
- Get_SB ( DropFrame, "DP - Drop frame");
- Get_S1 (2, Frames_Tens, "Frames (Tens)");
- Get_S1 (4, Frames_Units, "Frames (Units)");
-
- Skip_SB( "FP - Field Phase / BGF0");
- Get_S1 (3, Seconds_Tens, "Seconds (Tens)");
- Get_S1 (4, Seconds_Units, "Seconds (Units)");
-
- Skip_SB( "BGF0 / BGF2");
- Get_S1 (3, Minutes_Tens, "Minutes (Tens)");
- Get_S1 (4, Minutes_Units, "Minutes (Units)");
-
- Skip_SB( "BGF2 / Field Phase");
- Skip_SB( "BGF1");
- Get_S1 (2, Hours_Tens, "Hours (Tens)");
- Get_S1 (4, Hours_Units, "Hours (Units)");
-
- Skip_S1(4, "BG2");
- Skip_S1(4, "BG1");
-
- Skip_S1(4, "BG4");
- Skip_S1(4, "BG3");
-
- Skip_S1(4, "BG6");
- Skip_S1(4, "BG5");
-
- Skip_S1(4, "BG8");
- Skip_S1(4, "BG7");
-
- BS_End();
-
- int64u TimeCode_ms=(int64u)(Hours_Tens *10*60*60*1000
- + Hours_Units *60*60*1000
- + Minutes_Tens *10*60*1000
- + Minutes_Units *60*1000
- + Seconds_Tens *10*1000
- + Seconds_Units *1000
- + (FrameRate?float64_int32s((Frames_Tens*10+Frames_Units)*1000/FrameRate):0));
-
- Element_Info1(Ztring().Duration_From_Milliseconds(TimeCode_ms));
-
- Element_End0();
-
- Skip_B8( "Zero");
-
- //TimeCode
- if (SDTI_TimeCode_StartTimecode_ms==(int64u)-1)
- {
- SDTI_TimeCode_StartTimecode_ms=TimeCode_ms;
-
- SDTI_TimeCode_StartTimecode+=('0'+Hours_Tens);
- SDTI_TimeCode_StartTimecode+=('0'+Hours_Units);
- SDTI_TimeCode_StartTimecode+=':';
- SDTI_TimeCode_StartTimecode+=('0'+Minutes_Tens);
- SDTI_TimeCode_StartTimecode+=('0'+Minutes_Units);
- SDTI_TimeCode_StartTimecode+=':';
- SDTI_TimeCode_StartTimecode+=('0'+Seconds_Tens);
- SDTI_TimeCode_StartTimecode+=('0'+Seconds_Units);
- SDTI_TimeCode_StartTimecode+=DropFrame?';':':';
- SDTI_TimeCode_StartTimecode+=('0'+Frames_Tens);
- SDTI_TimeCode_StartTimecode+=('0'+Frames_Units);
- }
- }
- else
- Skip_XX(17, "Junk");
-
- //Filling
- if (SDTI_SizePerFrame==0)
- Partitions_IsCalculatingSdtiByteCount=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::SDTI_PackageMetadataSet()
-{
- while (Element_Offset<Element_Size)
- {
- //Parsing
- Element_Begin1("Item");
- int128u Tag;
- int16u Length;
- int8u Type;
- Get_B1 (Type, "Type");
- Get_B2 (Length, "Length");
- int64u End=Element_Offset+Length;
- Get_UL (Tag, "Tag", NULL); //TODO: check 10-byte UL with out_imx.mxf
- switch (Type)
- {
- case 0x83 : //UMID
- {
- Skip_UMID( );
- if (Element_Offset<End)
- Skip_UL ( "Zeroes");
- }
- break;
- case 0x88 : //KLV Metadata
- {
- while (Element_Offset<End)
- {
- int64u Length;
- Get_BER(Length, "Length");
- switch ((Tag.lo>>16)&0xFF)
- {
- case 0x00 : Skip_Local(Length,"Data"); break;
- case 0x01 : Skip_UTF16L(Length,"Data"); break;
- default : Skip_XX(Length, "Data");
- }
- }
- }
- break;
- default : Skip_XX(Length, "Unknown");
- }
- Element_End0();
- }
-
- //Filling
- if (SDTI_SizePerFrame==0)
- Partitions_IsCalculatingSdtiByteCount=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::SDTI_PictureMetadataSet()
-{
- Skip_XX(Element_Size, "Data");
-
- //Filling
- if (SDTI_SizePerFrame==0)
- Partitions_IsCalculatingSdtiByteCount=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::SDTI_SoundMetadataSet()
-{
- Skip_XX(Element_Size, "Data");
-
- //Filling
- if (SDTI_SizePerFrame==0)
- Partitions_IsCalculatingSdtiByteCount=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::SDTI_DataMetadataSet()
-{
- Skip_XX(Element_Size, "Data");
-
- //Filling
- if (SDTI_SizePerFrame==0)
- Partitions_IsCalculatingSdtiByteCount=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::SDTI_ControlMetadataSet()
-{
- Skip_XX(Element_Size, "Data");
-
- //Filling
- if (SDTI_SizePerFrame==0)
- Partitions_IsCalculatingSdtiByteCount=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Omneon_010201010100()
-{
- //Parsing
- switch(Code2)
- {
- ELEMENT(8001, Omneon_010201010100_8001, "Omneon .80.01")
- ELEMENT(8003, Omneon_010201010100_8003, "Omneon .80.03")
- default: GenerationInterchangeObject();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Omneon_010201020100()
-{
- //Parsing
- switch(Code2)
- {
- ELEMENT(8002, Omneon_010201020100_8002, "Omneon .80.02")
- ELEMENT(8003, Omneon_010201020100_8003, "Omneon .80.03")
- ELEMENT(8004, Omneon_010201020100_8004, "Omneon .80.04")
- ELEMENT(8005, Omneon_010201020100_8005, "Omneon .80.05")
- ELEMENT(8006, Omneon_010201020100_8006, "Omneon .80.06")
- default: GenerationInterchangeObject();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::TimelineTrack()
-{
- //Parsing
- switch(Code2)
- {
- ELEMENT(4B01, Track_EditRate, "EditRate")
- ELEMENT(4B02, Track_Origin, "Origin")
- default: GenericTrack();
- }
-
- if (Code2==0x3C0A)
- {
- for (packages::iterator Package=Packages.begin(); Package!=Packages.end(); ++Package)
- {
- if (Package->first==Prefaces[Preface_Current].PrimaryPackage) //InstanceIUD
- {
- Element_Level--;
- Element_Info1("Primary package");
- Element_Level++;
- }
- for (size_t Pos=0; Pos<Package->second.Tracks.size(); Pos++)
- if (InstanceUID==Package->second.Tracks[Pos])
- {
- Element_Level--;
- Element_Info1("Valid from Package");
- Element_Level++;
- }
- }
- }
-}
-
-//***************************************************************************
-// Base
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// 0x3D08
-void File_Mxf::AES3PCMDescriptor_AuxBitsMode()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3D0D
-void File_Mxf::AES3PCMDescriptor_Emphasis()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3D0F
-void File_Mxf::AES3PCMDescriptor_BlockStartOffset()
-{
- //Parsing
- Info_B2(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3D10
-void File_Mxf::AES3PCMDescriptor_ChannelStatusMode()
-{
- //Parsing
- Skip_XX(Length2, "Batch");
-}
-
-//---------------------------------------------------------------------------
-// 0x3D11
-void File_Mxf::AES3PCMDescriptor_FixedChannelStatusData()
-{
- //Parsing
- Skip_XX(Length2, "Data");
-}
-
-//---------------------------------------------------------------------------
-// 0x3D12
-void File_Mxf::AES3PCMDescriptor_UserDataMode()
-{
- //Parsing
- Skip_XX(Length2, "Data");
-}
-
-//---------------------------------------------------------------------------
-// 0x3D13
-void File_Mxf::AES3PCMDescriptor_FixedUserData()
-{
- //Parsing
- Skip_XX(Length2, "Data");
-}
-
-//---------------------------------------------------------------------------
-// 0x3301
-void File_Mxf::CDCIEssenceDescriptor_ComponentDepth()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (!Partitions_IsFooter || Descriptors[InstanceUID].Infos["BitDepth"].empty())
- {
- if (Data)
- Descriptors[InstanceUID].Infos["BitDepth"].From_Number(Data);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3302
-void File_Mxf::CDCIEssenceDescriptor_HorizontalSubsampling()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].SubSampling_Horizontal=Data;
- Subsampling_Compute(Descriptors.find(InstanceUID));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3303
-void File_Mxf::CDCIEssenceDescriptor_ColorSiting()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3304
-void File_Mxf::CDCIEssenceDescriptor_BlackRefLevel()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3305
-void File_Mxf::CDCIEssenceDescriptor_WhiteReflevel()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3306
-void File_Mxf::CDCIEssenceDescriptor_ColorRange()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3307
-void File_Mxf::CDCIEssenceDescriptor_PaddingBits()
-{
- //Parsing
- Info_B2(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3308
-void File_Mxf::CDCIEssenceDescriptor_VerticalSubsampling()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].SubSampling_Vertical=Data;
- Subsampling_Compute(Descriptors.find(InstanceUID));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3309
-void File_Mxf::CDCIEssenceDescriptor_AlphaSampleDepth()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x330B
-void File_Mxf::CDCIEssenceDescriptor_ReversedByteOrder()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x1901
-void File_Mxf::ContentStorage_Packages()
-{
- ContentStorages[InstanceUID].Packages.clear();
-
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- int128u Data;
- Get_UUID(Data, "Package");
-
- FILLING_BEGIN();
- Element_Info1C((Data==Prefaces[Preface_Current].PrimaryPackage), "Primary package");
- ContentStorages[InstanceUID].Packages.push_back(Data);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x1902
-void File_Mxf::ContentStorage_EssenceContainerData()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Skip_UUID( "EssenceContainer");
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x0202
-void File_Mxf::DMSegment_Duration()
-{
- //Parsing
- int64u Data;
- Get_B8 (Data, "Data"); Element_Info1(Data); //units of edit rate
-
- FILLING_BEGIN();
- DMSegments[InstanceUID].Duration=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x6101
-void File_Mxf::DMSegment_DMFramework()
-{
- //Parsing
- int128u Data;
- Get_UUID(Data, "DM Framework"); Element_Info1(Ztring().From_UUID(Data));
-
- FILLING_BEGIN();
- DMSegments[InstanceUID].Framework=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x6101
-void File_Mxf::DMSegment_TrackIDs()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- int32u Data;
- Get_B4 (Data, "Track ID");
-
- FILLING_BEGIN();
- DMSegments[InstanceUID].TrackIDs.push_back(Data);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x2701
-void File_Mxf::EssenceContainerData_LinkedPackageUID()
-{
- //Parsing
- Skip_UMID();
-}
-
-//---------------------------------------------------------------------------
-// 0x3F06
-void File_Mxf::EssenceContainerData_IndexSID()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3F07
-void File_Mxf::EssenceContainerData_BodySID()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x4901
-void File_Mxf::EventTrack_EventEditRate()
-{
- //Parsing
- Info_Rational();
-}
-
-//---------------------------------------------------------------------------
-// 0x4902
-void File_Mxf::EventTrack_EventOrigin()
-{
- //Parsing
- Info_B8(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3001
-void File_Mxf::FileDescriptor_SampleRate()
-{
- //Parsing
- Get_Rational(Descriptors[InstanceUID].SampleRate); Element_Info1(Descriptors[InstanceUID].SampleRate);
-
- FILLING_BEGIN();
- if (Descriptors[InstanceUID].SampleRate && Descriptors[InstanceUID].Duration!=(int64u)-1)
- Descriptors[InstanceUID].Infos["Duration"].From_Number(Descriptors[InstanceUID].Duration/Descriptors[InstanceUID].SampleRate*1000, 0);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3002
-void File_Mxf::FileDescriptor_ContainerDuration()
-{
- //Parsing
- int64u Data;
- Get_B8 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (Data)
- {
- Descriptors[InstanceUID].Duration=Data;
- if (Descriptors[InstanceUID].SampleRate && Descriptors[InstanceUID].Duration!=(int64u)-1)
- Descriptors[InstanceUID].Infos["Duration"].From_Number(Descriptors[InstanceUID].Duration/Descriptors[InstanceUID].SampleRate*1000, 0);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3004
-void File_Mxf::FileDescriptor_EssenceContainer()
-{
- //Parsing
- int128u EssenceContainer;
- Get_UL (EssenceContainer, "EssenceContainer", Mxf_EssenceContainer); Element_Info1(Mxf_EssenceContainer(EssenceContainer));
-
- FILLING_BEGIN();
- int8u Code6=(int8u)((EssenceContainer.lo&0x0000000000FF0000LL)>>16);
- int8u Code7=(int8u)((EssenceContainer.lo&0x000000000000FF00LL)>> 8);
- int8u Code8=(int8u)((EssenceContainer.lo&0x00000000000000FFLL) );
-
- Descriptors[InstanceUID].EssenceContainer=EssenceContainer;
- Descriptors[InstanceUID].Infos["Format_Settings_Wrapping"].From_UTF8(Mxf_EssenceContainer_Mapping(Code6, Code7, Code8));
-
- if (!DataMustAlwaysBeComplete && Descriptors[InstanceUID].Infos["Format_Settings_Wrapping"].find(__T("Frame"))!=string::npos)
- DataMustAlwaysBeComplete=true;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3005
-void File_Mxf::FileDescriptor_Codec()
-{
- //Parsing
- Skip_UL( "UUID");
-}
-
-//---------------------------------------------------------------------------
-// 0x3006
-void File_Mxf::FileDescriptor_LinkedTrackID()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (Descriptors[InstanceUID].LinkedTrackID==(int32u)-1)
- Descriptors[InstanceUID].LinkedTrackID=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3C0A
-void File_Mxf::InterchangeObject_InstanceUID()
-{
- //Parsing
- Get_UUID(InstanceUID, "UUID"); Element_Info1(Ztring().From_UUID(InstanceUID));
-
- FILLING_BEGIN();
- //Putting the right UID for already parsed items
- prefaces::iterator Preface=Prefaces.find(0);
- if (Preface!=Prefaces.end())
- {
- Prefaces[InstanceUID]=Preface->second;
- Prefaces.erase(Preface);
- }
- identifications::iterator Identification=Identifications.find(0);
- if (Identification!=Identifications.end())
- {
- Identifications[InstanceUID]=Identification->second;
- Identifications.erase(Identification);
- }
- contentstorages::iterator ContentStorage=ContentStorages.find(0);
- if (ContentStorage!=ContentStorages.end())
- {
- ContentStorages[InstanceUID]=ContentStorage->second;
- ContentStorages.erase(ContentStorage);
- }
- packages::iterator Package=Packages.find(0);
- if (Package!=Packages.end())
- {
- Packages[InstanceUID]=Package->second;
- Packages.erase(Package);
- }
- tracks::iterator Track=Tracks.find(0);
- if (Track!=Tracks.end())
- {
- Tracks[InstanceUID]=Track->second;
- Tracks.erase(Track);
- }
- descriptors::iterator Descriptor=Descriptors.find(0);
- if (Descriptor!=Descriptors.end())
- {
- descriptors::iterator Descriptor_Previous=Descriptors.find(InstanceUID);
- if (Descriptor_Previous!=Descriptors.end())
- {
- //Merging
- Descriptor->second.Infos.insert(Descriptor_Previous->second.Infos.begin(), Descriptor_Previous->second.Infos.end()); //TODO: better implementation
- }
- Descriptors[InstanceUID]=Descriptor->second;
- Descriptors.erase(Descriptor);
- }
- locators::iterator Locator=Locators.find(0);
- if (Locator!=Locators.end())
- {
- Locators[InstanceUID]=Locator->second;
- Locators.erase(Locator);
- }
- components::iterator Component=Components.find(0);
- if (Component!=Components.end())
- {
- Components[InstanceUID].Update(Component->second);
- Components.erase(Component);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x0102
-void File_Mxf::GenerationInterchangeObject_GenerationUID()
-{
- //Parsing
- Skip_UUID( "UUID");
-}
-
-//---------------------------------------------------------------------------
-// 0x2F01
-void File_Mxf::GenericDescriptor_Locators()
-{
- Descriptors[InstanceUID].Locators.clear();
-
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("Locator");
- int128u UUID;
- Get_UUID(UUID, "UUID");
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].Locators.push_back(UUID);
- FILLING_END();
-
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x4401
-void File_Mxf::GenericPackage_PackageUID()
-{
- //Parsing
- int256u Data;
- Get_UMID (Data, "PackageUID");
-
- FILLING_BEGIN();
- Packages[InstanceUID].PackageUID=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x4402
-void File_Mxf::GenericPackage_Name()
-{
- //Parsing
- Info_UTF16B(Length2, Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x4403
-void File_Mxf::GenericPackage_Tracks()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- int128u Data;
- Get_UUID(Data, "Track");
-
- FILLING_BEGIN();
- Packages[InstanceUID].Tracks.push_back(Data);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x4404
-void File_Mxf::GenericPackage_PackageModifiedDate()
-{
- //Parsing
- Info_Timestamp();
-}
-
-//---------------------------------------------------------------------------
-// 0x4405
-void File_Mxf::GenericPackage_PackageCreationDate()
-{
- //Parsing
- Info_Timestamp();
-}
-
-//---------------------------------------------------------------------------
-// 0x3201
-void File_Mxf::GenericPictureEssenceDescriptor_PictureEssenceCoding()
-{
- //Parsing
- int128u Data;
- Get_UL(Data, "Data", Mxf_EssenceCompression); Element_Info1(Mxf_EssenceCompression(Data));
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].EssenceCompression=Data;
- Descriptors[InstanceUID].StreamKind=Stream_Video;
- Descriptors[InstanceUID].Infos["Format"]=Mxf_EssenceCompression(Data);
- Descriptors[InstanceUID].Infos["Format_Version"]=Mxf_EssenceCompression_Version(Data);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3202
-void File_Mxf::GenericPictureEssenceDescriptor_StoredHeight()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (!Partitions_IsFooter || Descriptors[InstanceUID].Height==(int32u)-1)
- {
- if (Descriptors[InstanceUID].ScanType==__T("Interlaced"))
- Data*=2; //This is per field
- if (Descriptors[InstanceUID].Height==(int32u)-1)
- Descriptors[InstanceUID].Height=Data;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3203
-void File_Mxf::GenericPictureEssenceDescriptor_StoredWidth()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (!Partitions_IsFooter || Descriptors[InstanceUID].Width==(int32u)-1)
- {
- if (Descriptors[InstanceUID].Width==(int32u)-1)
- Descriptors[InstanceUID].Width=Data;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3204
-void File_Mxf::GenericPictureEssenceDescriptor_SampledHeight()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (!Partitions_IsFooter || Descriptors[InstanceUID].Height==(int32u)-1)
- {
- if (Descriptors[InstanceUID].ScanType==__T("Interlaced"))
- Data*=2; //This is per field
- Descriptors[InstanceUID].Height=Data;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3205
-void File_Mxf::GenericPictureEssenceDescriptor_SampledWidth()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].Width=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3206
-void File_Mxf::GenericPictureEssenceDescriptor_SampledXOffset()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3207
-void File_Mxf::GenericPictureEssenceDescriptor_SampledYOffset()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3208
-void File_Mxf::GenericPictureEssenceDescriptor_DisplayHeight()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (!Partitions_IsFooter || Descriptors[InstanceUID].Height_Display!=(int32u)-1)
- {
- if (Descriptors[InstanceUID].ScanType==__T("Interlaced"))
- Data*=2; //This is per field
- Descriptors[InstanceUID].Height_Display=Data;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3209
-void File_Mxf::GenericPictureEssenceDescriptor_DisplayWidth()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].Width_Display=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x320A
-void File_Mxf::GenericPictureEssenceDescriptor_DisplayXOffset()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].Width_Display_Offset=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x320B
-void File_Mxf::GenericPictureEssenceDescriptor_DisplayYOffset()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (!Partitions_IsFooter || Descriptors[InstanceUID].Height_Display_Offset==(int32u)-1)
- {
- if (Descriptors[InstanceUID].ScanType==__T("Interlaced"))
- Data*=2; //This is per field
- Descriptors[InstanceUID].Height_Display_Offset=Data;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x320C
-void File_Mxf::GenericPictureEssenceDescriptor_FrameLayout()
-{
- //Parsing
- int8u Data;
- Get_B1 (Data, "Data"); Element_Info1(Data); Param_Info1(Mxf_FrameLayout(Data)); Element_Info1(Mxf_FrameLayout(Data));
-
- FILLING_BEGIN();
- if (!Partitions_IsFooter || Descriptors[InstanceUID].ScanType.empty())
- {
- if (Descriptors[InstanceUID].ScanType.empty())
- {
- if (Descriptors[InstanceUID].Height!=(int32u)-1) Descriptors[InstanceUID].Height*=Mxf_FrameLayout_Multiplier(Data);
- if (Descriptors[InstanceUID].Height_Display!=(int32u)-1) Descriptors[InstanceUID].Height_Display*=Mxf_FrameLayout_Multiplier(Data);
- if (Descriptors[InstanceUID].Height_Display_Offset!=(int32u)-1) Descriptors[InstanceUID].Height_Display_Offset*=Mxf_FrameLayout_Multiplier(Data);
- }
- Descriptors[InstanceUID].ScanType.From_UTF8(Mxf_FrameLayout_ScanType(Data));
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x320D
-void File_Mxf::GenericPictureEssenceDescriptor_VideoLineMap()
-{
- int64u VideoLineMapEntries_Total=0;
- bool VideoLineMapEntry_IsZero=false;
-
- //Parsing
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- int32u VideoLineMapEntry;
- Get_B4 (VideoLineMapEntry, "VideoLineMapEntry");
-
- if (VideoLineMapEntry)
- VideoLineMapEntries_Total+=VideoLineMapEntry;
- else
- VideoLineMapEntry_IsZero=true;
- }
-
- FILLING_BEGIN();
- // Cryptic formula:
- // odd odd field 2 upper
- // odd even field 1 upper
- // even odd field 1 upper
- // even even field 2 upper
- if (Count==2 && !VideoLineMapEntry_IsZero)
- Descriptors[InstanceUID].FieldTopness=(VideoLineMapEntries_Total%2)?1:2;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x320E
-void File_Mxf::GenericPictureEssenceDescriptor_AspectRatio()
-{
- //Parsing
- float64 Data;
- Get_Rational(Data);
-
- FILLING_BEGIN();
- if (Data)
- {
- Descriptors[InstanceUID].DisplayAspectRatio=Data;
- Descriptors[InstanceUID].Infos["DisplayAspectRatio"].From_Number(Data, 3);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x320F
-void File_Mxf::GenericPictureEssenceDescriptor_AlphaTransparency()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3210
-void File_Mxf::GenericPictureEssenceDescriptor_TransferCharacteristic()
-{
- //Parsing
- int128u Data;
- Get_UL(Data, "Data", Mxf_TransferCharacteristic); Element_Info1(Mxf_TransferCharacteristic(Data));
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].Infos["transfer_characteristics"]=Mxf_TransferCharacteristic(Data);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3211
-void File_Mxf::GenericPictureEssenceDescriptor_ImageAlignmentOffset()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3212
-void File_Mxf::GenericPictureEssenceDescriptor_FieldDominance()
-{
- //Parsing
- int8u Data;
- Get_B1 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].FieldDominance=Data;
- FILLING_END();
- //Parsing
-}
-
-//---------------------------------------------------------------------------
-// 0x3213
-void File_Mxf::GenericPictureEssenceDescriptor_ImageStartOffset()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3214
-void File_Mxf::GenericPictureEssenceDescriptor_ImageEndOffset()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3215
-void File_Mxf::GenericPictureEssenceDescriptor_SignalStandard()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3216
-void File_Mxf::GenericPictureEssenceDescriptor_StoredF2Offset()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3217
-void File_Mxf::GenericPictureEssenceDescriptor_DisplayF2Offset()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3218
-void File_Mxf::GenericPictureEssenceDescriptor_ActiveFormatDescriptor()
-{
- //Parsing
- int8u Data;
- bool Is1dot3=Retrieve(Stream_General, 0, General_Format_Version).To_float32()>=1.3?true:false;
- if (!Is1dot3 && Element_Size && Buffer[(size_t)(Buffer_Offset+Element_Offset)]&0x60)
- Is1dot3=true;
-
- BS_Begin();
- if (Is1dot3)
- {
- Skip_SB( "Reserved");
- Get_S1 (4, Data, "Data"); Element_Info1C((Data<16), AfdBarData_active_format[Data]);
- Skip_SB( "AR");
- Skip_S1(2, "Reserved");
- }
- else
- {
- Skip_S1(3, "Reserved");
- Get_S1 (4, Data, "Data"); Element_Info1C((Data<16), AfdBarData_active_format[Data]);
- Skip_SB( "AR");
- }
- BS_End();
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].ActiveFormat=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3219
-void File_Mxf::GenericPictureEssenceDescriptor_ColorPrimaries()
-{
- //Parsing
- int128u Data;
- Get_UL(Data, "Data", Mxf_ColorPrimaries); Element_Info1(Mxf_ColorPrimaries(Data));
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].Infos["colour_primaries"]=Mxf_ColorPrimaries(Data);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x321A
-void File_Mxf::GenericPictureEssenceDescriptor_CodingEquations()
-{
- //Parsing
- int128u Data;
- Get_UL(Data, "Data", Mxf_CodingEquations); Element_Info1(Mxf_CodingEquations(Data));
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].Infos["matrix_coefficients"]=Mxf_CodingEquations(Data);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3D01
-void File_Mxf::GenericSoundEssenceDescriptor_QuantizationBits()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (Data)
- {
- Descriptors[InstanceUID].Infos["BitDepth"].From_Number(Data);
- Descriptors[InstanceUID].QuantizationBits=Data;
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3D02
-void File_Mxf::GenericSoundEssenceDescriptor_Locked()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data?"Yes":"No");
-}
-
-//---------------------------------------------------------------------------
-// 0x3D03
-void File_Mxf::GenericSoundEssenceDescriptor_AudioSamplingRate()
-{
- //Parsing
- float64 Data;
- Get_Rational(Data); Element_Info1(Data);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].Infos["SamplingRate"].From_Number(Data, 0);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3D04
-void File_Mxf::GenericSoundEssenceDescriptor_AudioRefLevel()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info2(Data, " dB");
-}
-
-//---------------------------------------------------------------------------
-// 0x3D05
-void File_Mxf::GenericSoundEssenceDescriptor_ElectroSpatialFormulation()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data); //Enum
-}
-
-//---------------------------------------------------------------------------
-// 0x3D06
-void File_Mxf::GenericSoundEssenceDescriptor_SoundEssenceCompression()
-{
- //Parsing
- int128u Data;
- Get_UL(Data, "Data", Mxf_EssenceCompression); Element_Info1(Mxf_EssenceCompression(Data));
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].EssenceCompression=Data;
- Descriptors[InstanceUID].StreamKind=Stream_Audio;
- Descriptors[InstanceUID].Infos["Format"]=Mxf_EssenceCompression(Data);
- Descriptors[InstanceUID].Infos["Format_Version"]=Mxf_EssenceCompression_Version(Data);
- if ((Data.lo&0xFFFFFFFFFF000000LL)==0x040202017e000000LL)
- Descriptors[InstanceUID].Infos["Format_Settings_Endianness"]=__T("Big");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3D07
-void File_Mxf::GenericSoundEssenceDescriptor_ChannelCount()
-{
- //Parsing
- int32u Value;
- Get_B4 (Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].ChannelCount=Value;
- Descriptors[InstanceUID].Infos["Channel(s)"].From_Number(Value);
-
- //if (Descriptors[InstanceUID].ChannelAssignment.lo!=(int64u)-1)
- //{
- //Descriptors[InstanceUID].Infos["ChannelLayout"]=Mxf_ChannelAssignment_ChannelLayout(Descriptors[InstanceUID].ChannelAssignment, Value);
- //Ztring ChannelLayoutID;
- //ChannelLayoutID.From_Number(Descriptors[InstanceUID].ChannelAssignment.lo, 16);
- //if (ChannelLayoutID.size()<16)
- // ChannelLayoutID.insert(0, 16-ChannelLayoutID.size(), __T('0'));
- //Descriptors[InstanceUID].Infos["ChannelLayoutID"]=ChannelLayoutID;
- //Descriptors[InstanceUID].Infos["ChannelPositions"]=Mxf_ChannelAssignment_ChannelPositions(Descriptors[InstanceUID].ChannelAssignment, Value);
- //if (Descriptors[InstanceUID].Infos["ChannelPositions"].empty())
- // Descriptors[InstanceUID].Infos["ChannelPositions"]=ChannelLayoutID;
- //Descriptors[InstanceUID].Infos["ChannelPositions/String2"]=Mxf_ChannelAssignment_ChannelPositions2(Descriptors[InstanceUID].ChannelAssignment, Value);
- //}
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3D0C
-void File_Mxf::GenericSoundEssenceDescriptor_DialNorm()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info2(Data, " dB");
-}
-
-//---------------------------------------------------------------------------
-// 0x3E01
-void File_Mxf::GenericDataEssenceDescriptor_DataEssenceCoding()
-{
- //Parsing
- Skip_UL( "UUID");
-}
-
-//---------------------------------------------------------------------------
-// 0x4801
-void File_Mxf::GenericTrack_TrackID()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (Tracks[InstanceUID].TrackID==(int32u)-1)
- Tracks[InstanceUID].TrackID=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x4802
-void File_Mxf::GenericTrack_TrackName()
-{
- //Parsing
- Ztring Data;
- Get_UTF16B (Length2, Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Tracks[InstanceUID].TrackName=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x4803
-void File_Mxf::GenericTrack_Sequence()
-{
- //Parsing
- int128u Data;
- Get_UUID(Data, "Data"); Element_Info1(Ztring::ToZtring(Data, 16));
-
- FILLING_BEGIN();
- Tracks[InstanceUID].Sequence=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x4804
-void File_Mxf::GenericTrack_TrackNumber()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Ztring::ToZtring(Data, 16));
-
- FILLING_BEGIN();
- if (Tracks[InstanceUID].TrackNumber==(int32u)-1 || Data) // In some cases, TrackNumber is 0 for all track and we have replaced with the right value during the parsing
- Tracks[InstanceUID].TrackNumber=Data;
- Track_Number_IsAvailable=true;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3C01
-void File_Mxf::Identification_CompanyName()
-{
- //Parsing
- Ztring Data;
- Get_UTF16B(Length2, Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Identifications[InstanceUID].CompanyName=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3C02
-void File_Mxf::Identification_ProductName()
-{
- //Parsing
- Ztring Data;
- Get_UTF16B(Length2, Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Identifications[InstanceUID].ProductName=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3C03
-void File_Mxf::Identification_ProductVersion()
-{
- //Parsing
- int16u Major, Minor, Patch, Build, Release;
- Get_B2 (Major, "Major");
- Get_B2 (Minor, "Minor");
- Get_B2 (Patch, "Patch");
- Get_B2 (Build, "Build");
- Get_B2 (Release, "Release");
- Ztring Version=Ztring::ToZtring(Major)+__T('.')
- +Ztring::ToZtring(Minor)+__T('.')
- +Ztring::ToZtring(Patch)+__T('.')
- +Ztring::ToZtring(Build)+__T('.')
- +Ztring::ToZtring(Release) ;
- Element_Info1(Version);
-
- FILLING_BEGIN();
- if (Major || Minor || Patch || Build || Release)
- Identifications[InstanceUID].ProductVersion=Version;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3C04
-void File_Mxf::Identification_VersionString()
-{
- //Parsing
- Ztring Data;
- Get_UTF16B(Length2, Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Identifications[InstanceUID].VersionString=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3C05
-void File_Mxf::Identification_ProductUID()
-{
- //Parsing
- Skip_UUID( "UUID");
-}
-
-//---------------------------------------------------------------------------
-// 0x3C06
-void File_Mxf::Identification_ModificationDate()
-{
- //Parsing
- Info_Timestamp();
-}
-
-//---------------------------------------------------------------------------
-// 0x3C07
-void File_Mxf::Identification_ToolkitVersion()
-{
- //Parsing
- int16u Major, Minor, Patch, Build, Release;
- Get_B2 (Major, "Major");
- Get_B2 (Minor, "Minor");
- Get_B2 (Patch, "Patch");
- Get_B2 (Build, "Build");
- Get_B2 (Release, "Release");
- Ztring Version=Ztring::ToZtring(Major)+__T('.')
- +Ztring::ToZtring(Minor)+__T('.')
- +Ztring::ToZtring(Patch)+__T('.')
- +Ztring::ToZtring(Build)+__T('.')
- +Ztring::ToZtring(Release) ;
- Element_Info1(Version);
-
- FILLING_BEGIN();
- if (Major || Minor || Patch || Build || Release)
- Identifications[InstanceUID].ToolkitVersion=Version;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3C08
-void File_Mxf::Identification_Platform()
-{
- //Parsing
- Ztring Data;
- Get_UTF16B(Length2, Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (Data!=__T("Unknown"))
- Identifications[InstanceUID].Platform=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3C09
-void File_Mxf::Identification_ThisGenerationUID()
-{
- //Parsing
- Skip_UUID( "UUID");
-}
-
-//---------------------------------------------------------------------------
-// 0x3F05
-void File_Mxf::IndexTableSegment_EditUnitByteCount()
-{
- //Parsing
- int32u Data;
- Get_B4(Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- #if MEDIAINFO_SEEK
- IndexTables[IndexTables.size()-1].EditUnitByteCount=Data;
- #endif //MEDIAINFO_SEEK
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3F06
-void File_Mxf::IndexTableSegment_IndexSID()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3F07
-void File_Mxf::IndexTableSegment_BodySID()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3F08
-void File_Mxf::IndexTableSegment_SliceCount()
-{
- //Parsing
- int8u Data;
- Get_B1(Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- IndexTable_NSL=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3F09
-void File_Mxf::IndexTableSegment_DeltaEntryArray()
-{
- //Parsing
- int32u NDE, Length;
- Get_B4(NDE, "NDE");
- Get_B4(Length, "Length");
- for (int32u Pos=0; Pos<NDE; Pos++)
- {
- Element_Begin1("Delta Entry");
- Skip_B1( "PosTableIndex");
- Skip_B1( "Slice");
- Skip_B4( "Element Delta");
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x3F0A
-void File_Mxf::IndexTableSegment_IndexEntryArray()
-{
- //Parsing
- int32u NIE, Length;
- Get_B4(NIE, "NIE");
- Get_B4(Length, "Length");
- for (int32u Pos=0; Pos<NIE; Pos++)
- {
- #if MEDIAINFO_SEEK
- indextable::entry Entry;
- int64u Stream_Offset;
- bool forward_rediction_flag, backward_prediction_flag;
- #endif //MEDIAINFO_SEEK
- int8u Flags;
- Element_Begin1("Index Entry");
- Skip_B1( "Temporal Offset");
- Skip_B1( "Key-Frame Offset");
- Get_B1 (Flags, "Flags");
- Skip_Flags(Flags, 7, "Random Access");
- Skip_Flags(Flags, 6, "Sequence Header");
- #if MEDIAINFO_SEEK
- Get_Flags (Flags, 5, forward_rediction_flag, "forward prediction flag");
- Get_Flags (Flags, 4, backward_prediction_flag, "backward prediction flag");
- #else //MEDIAINFO_SEEK
- Skip_Flags(Flags, 5, "forward prediction flag");
- Skip_Flags(Flags, 4, "backward prediction flag");
- #endif //MEDIAINFO_SEEK
- #if MEDIAINFO_SEEK
- Get_B8 (Stream_Offset, "Stream Offset");
- Entry.StreamOffset=Stream_Offset;
- Entry.Type=(forward_rediction_flag?1:0)*2+(backward_prediction_flag?1:0);
- IndexTables[IndexTables.size()-1].Entries.push_back(Entry);
- #else //MEDIAINFO_SEEK
- Skip_B8( "Stream Offset");
- #endif //MEDIAINFO_SEEK
- for (int32u NSL_Pos=0; NSL_Pos<IndexTable_NSL; NSL_Pos++)
- Skip_B4( "SliceOffset");
- for (int32u NPE_Pos=0; NPE_Pos<IndexTable_NPE; NPE_Pos++)
- Skip_B4( "PosTable");
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x3F0B
-void File_Mxf::IndexTableSegment_IndexEditRate()
-{
- //Parsing
- float64 Data;
- Get_Rational(Data);
-
- FILLING_BEGIN();
- #if MEDIAINFO_SEEK
- IndexTables[IndexTables.size()-1].IndexEditRate=Data;
- #endif //MEDIAINFO_SEEK
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3F0C
-void File_Mxf::IndexTableSegment_IndexStartPosition()
-{
- //Parsing
- int64u Data;
- Get_B8 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- #if MEDIAINFO_SEEK
- IndexTables[IndexTables.size()-1].IndexStartPosition=Data;
-
- //Integrity test (in one file, I have 2 indexes with IndexStartPosition=0, the first one is weird (only one frame), or the same index is repeated
- //Integrity test (in one file, I have 2 indexes with IndexStartPosition=0, the second one is weird (only one frame), or the same index is repeated
- for (size_t Pos=0; Pos<IndexTables.size()-1; Pos++)
- if (IndexTables[Pos].IndexStartPosition==Data)
- {
- if (IndexTables[Pos].IndexDuration==1 && Pos!=IndexTables.size()-1)
- IndexTables.erase(IndexTables.begin()+Pos);
- else
- {
- IndexTables.erase(IndexTables.begin()+IndexTables.size()-1);
- Element_Offset=Element_Size;
- }
-
- return;
- }
- #endif //MEDIAINFO_SEEK
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3F0D
-void File_Mxf::IndexTableSegment_IndexDuration()
-{
- //Parsing
- int64u Data;
- Get_B8 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- #if MEDIAINFO_SEEK
- IndexTables[IndexTables.size()-1].IndexDuration=Data;
- #endif //MEDIAINFO_SEEK
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3F0E
-void File_Mxf::IndexTableSegment_PosTableCount()
-{
- //Parsing
- int8u Data;
- Get_B1(Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- IndexTable_NPE=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x8002
-void File_Mxf::IndexTableSegment_8002()
-{
- //Parsing
- Info_B8(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x8001
-void File_Mxf::JPEG2000PictureSubDescriptor_Rsiz()
-{
- //Parsing
- Info_B2(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x8002
-void File_Mxf::JPEG2000PictureSubDescriptor_Xsiz()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x8003
-void File_Mxf::JPEG2000PictureSubDescriptor_Ysiz()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x8004
-void File_Mxf::JPEG2000PictureSubDescriptor_XOsiz()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x8005
-void File_Mxf::JPEG2000PictureSubDescriptor_YOsiz()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x8006
-void File_Mxf::JPEG2000PictureSubDescriptor_XTsiz()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x8007
-void File_Mxf::JPEG2000PictureSubDescriptor_YTsiz()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x8008
-void File_Mxf::JPEG2000PictureSubDescriptor_XTOsiz()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x8009
-void File_Mxf::JPEG2000PictureSubDescriptor_YTOsiz()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x800A
-void File_Mxf::JPEG2000PictureSubDescriptor_Csiz()
-{
- //Parsing
- Info_B2(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x800B
-void File_Mxf::JPEG2000PictureSubDescriptor_PictureComponentSizing()
-{
- //Parsing
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("PictureComponentSize");
- Info_B1(Ssiz, "Component sample precision"); Element_Info1(Ssiz);
- Info_B1(XRsiz, "Horizontal separation of a sample"); Element_Info1(XRsiz);
- Info_B1(YRsiz, "Vertical separation of a sample"); Element_Info1(YRsiz);
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::JPEG2000PictureSubDescriptor_CodingStyleDefault()
-{
- Skip_XX(Length2, "Data");
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::JPEG2000PictureSubDescriptor_QuantizationDefault()
-{
- Skip_XX(Length2, "Data");
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::MpegAudioDescriptor_BitRate()
-{
- Skip_B4( "Data");
-}
-
-//---------------------------------------------------------------------------
-// 0x3B02
-void File_Mxf::Preface_LastModifiedDate()
-{
- //Parsing
- Ztring Value;
- Get_Timestamp(Value); Element_Info1(Value);
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, General_Encoded_Date, Value, true);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::PrimaryExtendedSpokenLanguage()
-{
- //Parsing
- Ztring Data;
- Get_Local (Length2, Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- DMScheme1s[InstanceUID].PrimaryExtendedSpokenLanguage=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::SecondaryExtendedSpokenLanguage()
-{
- //Parsing
- Info_Local(Length2, Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::OriginalExtendedSpokenLanguage()
-{
- //Parsing
- Info_Local(Length2, Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::SecondaryOriginalExtendedSpokenLanguage()
-{
- //Parsing
- Info_Local(Length2, Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::RFC5646AudioLanguageCode()
-{
- bool SizeIsPresent=false;
- if (Length2>=4)
- {
- int32u Size;
- Peek_B4(Size);
- if (Size==((int32u)Length2)-4)
- {
- SizeIsPresent=true;
- Skip_B4( "Value size");
- }
- }
-
- //Parsing
- Ztring Value;
- Get_Local (Length2-(SizeIsPresent?4:0), Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].Infos["Language"]=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::MPEG2VideoDescriptor_SingleSequence()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data?"Yes":"No");
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::MPEG2VideoDescriptor_ConstantBFrames()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data?"Yes":"No");
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::MPEG2VideoDescriptor_CodedContentType()
-{
- //Parsing
- int8u Data;
- Get_B1 (Data, "Data"); Element_Info1(Mxf_MPEG2_CodedContentType(Data));
-
- FILLING_BEGIN();
- if (!Partitions_IsFooter || Descriptors[InstanceUID].ScanType.empty())
- {
- if (Data==2 && Descriptors[InstanceUID].ScanType.empty())
- {
- if (Descriptors[InstanceUID].Height!=(int32u)-1) Descriptors[InstanceUID].Height*=2;
- if (Descriptors[InstanceUID].Height_Display!=(int32u)-1) Descriptors[InstanceUID].Height_Display*=2;
- if (Descriptors[InstanceUID].Height_Display_Offset!=(int32u)-1) Descriptors[InstanceUID].Height_Display_Offset*=2;
- }
- Descriptors[InstanceUID].ScanType.From_UTF8(Mxf_MPEG2_CodedContentType(Data));
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::MPEG2VideoDescriptor_LowDelay()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data?"Yes":"No");
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::MPEG2VideoDescriptor_ClosedGOP()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data?"Yes":"No");
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::MPEG2VideoDescriptor_IdenticalGOP()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data?"Yes":"No");
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::MPEG2VideoDescriptor_MaxGOP()
-{
- //Parsing
- Info_B2(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::MPEG2VideoDescriptor_BPictureCount()
-{
- //Parsing
- int16u Data;
- Get_B2 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].HasBFrames=Data?true:false;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::MPEG2VideoDescriptor_ProfileAndLevel()
-{
- //Parsing
- int8u profile_and_level_indication_profile, profile_and_level_indication_level;
- BS_Begin();
- Skip_SB( "profile_and_level_indication_escape");
- Get_S1 ( 3, profile_and_level_indication_profile, "profile_and_level_indication_profile"); Param_Info1(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile]);
- Get_S1 ( 4, profile_and_level_indication_level, "profile_and_level_indication_level"); Param_Info1(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level]);
- BS_End();
-
- FILLING_BEGIN();
- if (profile_and_level_indication_profile && profile_and_level_indication_level)
- Descriptors[InstanceUID].Infos["Format_Profile"]=Ztring().From_Local(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile])+__T("@")+Ztring().From_Local(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level]);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::Mpeg4VisualDescriptor_ProfileAndLevel()
-{
- //Parsing
- int8u profile_and_level_indication;
- Get_B1 (profile_and_level_indication, "profile_and_level_indication"); Param_Info1(Mpeg4v_Profile_Level(profile_and_level_indication));
-
- FILLING_BEGIN();
- if (profile_and_level_indication)
- Descriptors[InstanceUID].Infos["Format_Profile"]=Ztring().From_Local(Mpeg4v_Profile_Level(profile_and_level_indication));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x
-void File_Mxf::MPEG2VideoDescriptor_BitRate()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].Infos["BitRate"].From_Number(Data);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x4001
-void File_Mxf::NetworkLocator_URLString()
-{
- //Parsing
- Ztring Data;
- Get_UTF16B(Length2, Data, "Essence Locator"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Locators[InstanceUID].EssenceLocator=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3F01
-void File_Mxf::MultipleDescriptor_SubDescriptorUIDs()
-{
- Descriptors[InstanceUID].SubDescriptors.clear();
-
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- //Parsing
- int128u Data;
- Get_UUID(Data, "UUID");
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].SubDescriptors.push_back(Data);
- Descriptors[Data].Infos["StreamOrder"].From_Number(Pos);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::PartitionMetadata()
-{
- //Parsing
- int64u PreviousPartition, FooterPartition, HeaderByteCount, IndexByteCount, BodyOffset;
- int32u IndexSID;
- int32u KAGSize;
- int16u MajorVersion, MinorVersion;
- Get_B2 (MajorVersion, "MajorVersion");
- Get_B2 (MinorVersion, "MinorVersion");
- Get_B4 (KAGSize, "KAGSize");
- Skip_B8( "ThisPartition");
- Get_B8 (PreviousPartition, "PreviousPartition");
- Get_B8 (FooterPartition, "FooterPartition");
- Get_B8 (HeaderByteCount, "HeaderByteCount");
- Get_B8 (IndexByteCount, "IndexByteCount");
- Get_B4 (IndexSID, "IndexSID");
- Get_B8 (BodyOffset, "BodyOffset");
- Skip_B4( "BodySID");
- Get_UL (OperationalPattern, "OperationalPattern", Mxf_OperationalPattern);
-
- Element_Begin1("EssenceContainers"); //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- int128u EssenceContainer;
- Get_UL (EssenceContainer, "EssenceContainer", Mxf_EssenceContainer);
- if (Count==1)
- EssenceContainer_FromPartitionMetadata=EssenceContainer;
- }
- Element_End0();
-
- PartitionPack_Parsed=true;
- Partitions_IsFooter=(Code.lo&0x00FF0000)==0x00040000;
- if (PreviousPartition!=File_Offset+Buffer_Offset-Header_Size)
- PartitionMetadata_PreviousPartition=PreviousPartition;
- if (FooterPartition)
- PartitionMetadata_FooterPartition=FooterPartition;
- bool AlreadyParsed=false;
- for (size_t Pos=0; Pos<Partitions.size(); Pos++)
- if (Partitions[Pos].StreamOffset==File_Offset+Buffer_Offset-Header_Size)
- AlreadyParsed=true;
- if (!AlreadyParsed)
- {
- partition Partition;
- Partition.StreamOffset=File_Offset+Buffer_Offset-Header_Size;
- Partition.FooterPartition=FooterPartition;
- Partition.HeaderByteCount=HeaderByteCount;
- Partition.IndexByteCount=IndexByteCount;
- Partition.BodyOffset=BodyOffset;
- Partitions_Pos=0;
- while (Partitions_Pos<Partitions.size() && Partitions[Partitions_Pos].StreamOffset<Partition.StreamOffset)
- Partitions_Pos++;
- Partitions.insert(Partitions.begin()+Partitions_Pos, Partition);
- Partitions_IsCalculatingHeaderByteCount=true;
- }
-
- Fill(Stream_General, 0, General_Format_Version, Ztring::ToZtring(MajorVersion)+__T('.')+Ztring::ToZtring(MinorVersion), true);
-
- if ((Code.lo&0xFF0000)==0x020000) //If Header Partition Pack
- switch ((Code.lo>>8)&0xFF)
- {
- case 0x01 : Fill(Stream_General, 0, General_Format_Settings, "Open / Incomplete" , Unlimited, true, true);
- if (Config->ParseSpeed>=1.0)
- {
- Config->File_IsGrowing=true;
- #if MEDIAINFO_MD5
- delete MD5; MD5=NULL;
- #endif //MEDIAINFO_MD5
- }
- break;
- case 0x02 : Fill(Stream_General, 0, General_Format_Settings, "Closed / Incomplete", Unlimited, true, true);
- break;
- case 0x03 : Fill(Stream_General, 0, General_Format_Settings, "Open / Complete" , Unlimited, true, true);
- if (Config->ParseSpeed>=1.0)
- {
- Config->File_IsGrowing=true;
- #if MEDIAINFO_MD5
- delete MD5; MD5=NULL;
- #endif //MEDIAINFO_MD5
- }
- break;
- case 0x04 : Fill(Stream_General, 0, General_Format_Settings, "Closed / Complete" , Unlimited, true, true);
- break;
- default : ;
- }
-
- if ((Code.lo&0xFF0000)==0x040000) //If Footer Partition Pack
- {
- switch ((Code.lo>>8)&0xFF)
- {
- case 0x02 :
- case 0x04 :
- Config->File_IsGrowing=false;
- break;
- default : ;
- }
-
- #if MEDIAINFO_ADVANCED
- if (Footer_Position==(int64u)-1)
- Footer_Position=File_Offset+Buffer_Offset-Header_Size;
- #endif //MEDIAINFO_ADVANCED
- }
-
- PartitionPack_AlreadyParsed.insert(File_Offset+Buffer_Offset-Header_Size);
-}
-
-//---------------------------------------------------------------------------
-// 0x3B03
-void File_Mxf::Preface_ContentStorage()
-{
- //Parsing
- int128u Data;
- Get_UUID(Data, "Data"); Element_Info1(Ztring().From_UUID(Data));
-
- FILLING_BEGIN();
- Prefaces[Preface_Current].ContentStorage=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3B05
-void File_Mxf::Preface_Version()
-{
- //Parsing
- Info_B1(Major, "Major"); //1
- Info_B1(Minor, "Minor"); //2
- Element_Info1(Ztring::ToZtring(Major)+__T('.')+Ztring::ToZtring(Minor));
-}
-
-//---------------------------------------------------------------------------
-// 0x3B06
-void File_Mxf::Preface_Identifications()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("Identification");
- int128u Data;
- Get_UUID(Data, "UUID"); Element_Info1(Ztring().From_UUID(Data));
- Element_End0();
-
- FILLING_BEGIN();
- Prefaces[Preface_Current].Identifications.push_back(Data);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x3B07
-void File_Mxf::Preface_ObjectModelVersion()
-{
- //Parsing
- Skip_B4( "Data");
-}
-
-//---------------------------------------------------------------------------
-// 0x3B08
-void File_Mxf::Preface_PrimaryPackage()
-{
- //Parsing
- int128u Data;
- Get_UUID(Data, "Data");
-
- FILLING_BEGIN();
- Prefaces[Preface_Current].PrimaryPackage=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3B09
-void File_Mxf::Preface_OperationalPattern()
-{
- //Parsing
- Get_UL (OperationalPattern, "UUID", Mxf_OperationalPattern); Element_Info1(Mxf_OperationalPattern(OperationalPattern));
-}
-
-//---------------------------------------------------------------------------
-// 0x3B0A
-void File_Mxf::Preface_EssenceContainers()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Info_UL(EssenceContainer, "EssenceContainer", Mxf_EssenceContainer);
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x3B0B
-void File_Mxf::Preface_DMSchemes()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- if (Length==16)
- {
- Info_UL(Data, "DMScheme", NULL); Element_Info1(Ztring().From_UUID(Data));
- }
- else
- Skip_XX(Length, "DMScheme");
-}
-
-//---------------------------------------------------------------------------
-// 0x3401
-void File_Mxf::RGBAEssenceDescriptor_PixelLayout()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3403
-void File_Mxf::RGBAEssenceDescriptor_Palette()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3404
-void File_Mxf::RGBAEssenceDescriptor_PaletteLayout()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3405
-void File_Mxf::RGBAEssenceDescriptor_ScanningDirection()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3406
-void File_Mxf::RGBAEssenceDescriptor_ComponentMaxRef()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3407
-void File_Mxf::RGBAEssenceDescriptor_ComponentMinRef()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3408
-void File_Mxf::RGBAEssenceDescriptor_AlphaMaxRef()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3409
-void File_Mxf::RGBAEssenceDescriptor_AlphaMinRef()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x1001
-void File_Mxf::Sequence_StructuralComponents()
-{
- Components[InstanceUID].StructuralComponents.clear();
-
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- int128u Data;
- Get_UUID (Data, "StructuralComponent");
-
- FILLING_BEGIN();
- Components[InstanceUID].StructuralComponents.push_back(Data);
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x1101
-void File_Mxf::SourceClip_SourcePackageID()
-{
- //Parsing
- int256u Data;
- Get_UMID(Data, "SourcePackageID");
-
- FILLING_BEGIN();
- Components[InstanceUID].SourcePackageID=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x1102
-void File_Mxf::SourceClip_SourceTrackID()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "SourceTrackID"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (Components[InstanceUID].SourceTrackID==(int32u)-1)
- Components[InstanceUID].SourceTrackID=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x1201
-void File_Mxf::SourceClip_StartPosition()
-{
- //Parsing
- Info_B8(Data, "StartPosition"); Element_Info1(Data); //units of edit rate
-}
-
-//---------------------------------------------------------------------------
-// 0x4701
-void File_Mxf::SourcePackage_Descriptor()
-{
- //Parsing
- int128u Data;
- Get_UUID(Data, "Data"); Element_Info1(Ztring().From_UUID(Data));
-
- FILLING_BEGIN();
- Packages[InstanceUID].Descriptor=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x0201
-void File_Mxf::StructuralComponent_DataDefinition()
-{
- //Parsing
- Info_UL(Data, "Data", Mxf_Sequence_DataDefinition); Element_Info1(Mxf_Sequence_DataDefinition(Data));
-}
-
-//---------------------------------------------------------------------------
-// 0x0202
-void File_Mxf::StructuralComponent_Duration()
-{
- //Parsing
- int64u Data;
- Get_B8 (Data, "Data"); Element_Info1(Data); //units of edit rate
-
- FILLING_BEGIN();
- if (Data!=0xFFFFFFFFFFFFFFFFLL)
- Components[InstanceUID].Duration=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x0101
-void File_Mxf::SystemScheme1_FrameCount()
-{
- //Parsing
- Skip_B4( "Value");
-}
-
-//---------------------------------------------------------------------------
-// 0x0102
-void File_Mxf::SystemScheme1_TimeCodeArray()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("TimeCode");
- int8u Frames_Units, Frames_Tens, Seconds_Units, Seconds_Tens, Minutes_Units, Minutes_Tens, Hours_Units, Hours_Tens;
- bool DropFrame;
- BS_Begin();
-
- Skip_SB( "CF - Color fame");
- Get_SB ( DropFrame, "DP - Drop frame");
- Get_S1 (2, Frames_Tens, "Frames (Tens)");
- Get_S1 (4, Frames_Units, "Frames (Units)");
-
- Skip_SB( "FP - Field Phase / BGF0");
- Get_S1 (3, Seconds_Tens, "Seconds (Tens)");
- Get_S1 (4, Seconds_Units, "Seconds (Units)");
-
- Skip_SB( "BGF0 / BGF2");
- Get_S1 (3, Minutes_Tens, "Minutes (Tens)");
- Get_S1 (4, Minutes_Units, "Minutes (Units)");
-
- Skip_SB( "BGF2 / Field Phase");
- Skip_SB( "BGF1");
- Get_S1 (2, Hours_Tens, "Hours (Tens)");
- Get_S1 (4, Hours_Units, "Hours (Units)");
-
- Skip_S1(4, "BG2");
- Skip_S1(4, "BG1");
-
- Skip_S1(4, "BG4");
- Skip_S1(4, "BG3");
-
- Skip_S1(4, "BG6");
- Skip_S1(4, "BG5");
-
- Skip_S1(4, "BG8");
- Skip_S1(4, "BG7");
-
- BS_End();
-
- int64u TimeCode=(int64u)(Hours_Tens *10*60*60*1000
- + Hours_Units *60*60*1000
- + Minutes_Tens *10*60*1000
- + Minutes_Units *60*1000
- + Seconds_Tens *10*1000
- + Seconds_Units *1000
- + (SystemScheme1_FrameRateFromDescriptor?float64_int32s((Frames_Tens*10+Frames_Units)*1000/(float64)SystemScheme1_FrameRateFromDescriptor):0));
-
- Element_Info1(Ztring().Duration_From_Milliseconds(TimeCode));
-
- Element_End0();
-
- //TimeCode
- if (SystemScheme1_TimeCodeArray_StartTimecode_ms==(int64u)-1 && !IsParsingEnd && IsParsingMiddle_MaxOffset==(int64u)-1)
- {
- SystemScheme1_TimeCodeArray_StartTimecode_ms=TimeCode;
-
- SystemScheme1_TimeCodeArray_StartTimecode+=('0'+Hours_Tens);
- SystemScheme1_TimeCodeArray_StartTimecode+=('0'+Hours_Units);
- SystemScheme1_TimeCodeArray_StartTimecode+=':';
- SystemScheme1_TimeCodeArray_StartTimecode+=('0'+Minutes_Tens);
- SystemScheme1_TimeCodeArray_StartTimecode+=('0'+Minutes_Units);
- SystemScheme1_TimeCodeArray_StartTimecode+=':';
- SystemScheme1_TimeCodeArray_StartTimecode+=('0'+Seconds_Tens);
- SystemScheme1_TimeCodeArray_StartTimecode+=('0'+Seconds_Units);
- SystemScheme1_TimeCodeArray_StartTimecode+=DropFrame?';':':';
- SystemScheme1_TimeCodeArray_StartTimecode+=('0'+Frames_Tens);
- SystemScheme1_TimeCodeArray_StartTimecode+=('0'+Frames_Units);
- }
- }
-
- SystemSchemes[Element_Code&0xFFFF].IsTimeCode=true;
-}
-
-//---------------------------------------------------------------------------
-// 0x0103
-void File_Mxf::SystemScheme1_ClipIDArray()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Skip_UMID( );
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x0104
-void File_Mxf::SystemScheme1_ExtendedClipIDArray()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Skip_UMID( ); //ExtUMID (ToDo: merge)
- Skip_UMID( );
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x0105
-void File_Mxf::SystemScheme1_VideoIndexArray()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Skip_XX(Length, "Video Index");
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x0106
-void File_Mxf::SystemScheme1_KLVMetadataSequence()
-{
- Skip_XX(Element_Size, "KLV");
-}
-
-//---------------------------------------------------------------------------
-// 0x3001
-void File_Mxf::SystemScheme1_SampleRate()
-{
- //Parsing
- Skip_B8( "Value");
-}
-
-//---------------------------------------------------------------------------
-// 0x4804
-void File_Mxf::SystemScheme1_EssenceTrackNumber()
-{
- //Parsing
- Skip_B4( "Value");
-}
-
-//---------------------------------------------------------------------------
-// 0x6801
-void File_Mxf::SystemScheme1_EssenceTrackNumberBatch()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Skip_B4( "Track Number");
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x6803
-void File_Mxf::SystemScheme1_ContentPackageIndexArray()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Skip_XX(Length, "Index Entry");
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x4101
-void File_Mxf::TextLocator_LocatorName()
-{
- //Parsing
- Ztring Data;
- Get_UTF16B (Length2, Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Locators[InstanceUID].EssenceLocator=Data;
- Locators[InstanceUID].IsTextLocator=true;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x1501
-void File_Mxf::TimecodeComponent_StartTimecode()
-{
- //Parsing
- int64u Data;
- Get_B8 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (Data!=(int64u)-1)
- {
- MxfTimeCodeForDelay.StartTimecode=Data;
- if (MxfTimeCodeForDelay.RoundedTimecodeBase)
- {
- DTS_Delay=((float64)MxfTimeCodeForDelay.StartTimecode)/MxfTimeCodeForDelay.RoundedTimecodeBase;
- if (MxfTimeCodeForDelay.DropFrame)
- {
- DTS_Delay*=1001;
- DTS_Delay/=1000;
- }
- FrameInfo.DTS=float64_int64s(DTS_Delay*1000000000);
- #if MEDIAINFO_DEMUX
- Config->Demux_Offset_DTS_FromStream=FrameInfo.DTS;
- #endif //MEDIAINFO_DEMUX
- }
- }
-
- Components[InstanceUID].MxfTimeCode.StartTimecode=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x1502
-void File_Mxf::TimecodeComponent_RoundedTimecodeBase()
-{
- //Parsing
- int16u Data;
- Get_B2 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (Data && Data!=(int16u)-1)
- {
- MxfTimeCodeForDelay.RoundedTimecodeBase=Data;
- if (MxfTimeCodeForDelay.StartTimecode!=(int64u)-1)
- {
- DTS_Delay=((float64)MxfTimeCodeForDelay.StartTimecode)/MxfTimeCodeForDelay.RoundedTimecodeBase;
- if (MxfTimeCodeForDelay.DropFrame)
- {
- DTS_Delay*=1001;
- DTS_Delay/=1000;
- }
- FrameInfo.DTS=float64_int64s(DTS_Delay*1000000000);
- #if MEDIAINFO_DEMUX
- Config->Demux_Offset_DTS_FromStream=FrameInfo.DTS;
- #endif //MEDIAINFO_DEMUX
- }
- }
-
- Components[InstanceUID].MxfTimeCode.RoundedTimecodeBase=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x1503
-void File_Mxf::TimecodeComponent_DropFrame()
-{
- //Parsing
- int8u Data;
- Get_B1 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (Data!=(int8u)-1 && Data)
- {
- MxfTimeCodeForDelay.DropFrame=true;
- if (DTS_Delay)
- {
- DTS_Delay*=1001;
- DTS_Delay/=1000;
- }
- FrameInfo.DTS=float64_int64s(DTS_Delay*1000000000);
- #if MEDIAINFO_DEMUX
- Config->Demux_Offset_DTS_FromStream=FrameInfo.DTS;
- #endif //MEDIAINFO_DEMUX
- }
-
- Components[InstanceUID].MxfTimeCode.DropFrame=Data?true:false;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x4B01
-void File_Mxf::Track_EditRate()
-{
- //Parsing
- float64 Data;
- Get_Rational(Data); Element_Info1(Data);
-
- FILLING_BEGIN();
- Tracks[InstanceUID].EditRate=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x4B02
-void File_Mxf::Track_Origin()
-{
- //Parsing
- int64u Data;
- Get_B8 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- if (Data!=(int64u)-1)
- Tracks[InstanceUID].Origin=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3D09
-void File_Mxf::WaveAudioDescriptor_AvgBps()
-{
- //Parsing
- int32u Data;
- Get_B4 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].Infos["BitRate"].From_Number(Data*8);
- Descriptors[InstanceUID].ByteRate=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3D0A
-void File_Mxf::WaveAudioDescriptor_BlockAlign()
-{
- //Parsing
- int16u Data;
- Get_B2 (Data, "Data"); Element_Info1(Data);
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].BlockAlign=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x3D0B
-void File_Mxf::WaveAudioDescriptor_SequenceOffset()
-{
- //Parsing
- Info_B1(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3D29
-void File_Mxf::WaveAudioDescriptor_PeakEnvelopeVersion()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3D2A
-void File_Mxf::WaveAudioDescriptor_PeakEnvelopeFormat()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3D2B
-void File_Mxf::WaveAudioDescriptor_PointsPerPeakValue()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3D2C
-void File_Mxf::WaveAudioDescriptor_PeakEnvelopeBlockSize()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3D2D
-void File_Mxf::WaveAudioDescriptor_PeakChannels()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3D2E
-void File_Mxf::WaveAudioDescriptor_PeakFrames()
-{
- //Parsing
- Info_B4(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3D2F
-void File_Mxf::WaveAudioDescriptor_PeakOfPeaksPosition()
-{
- //Parsing
- Info_B8(Data, "Data"); Element_Info1(Data);
-}
-
-//---------------------------------------------------------------------------
-// 0x3D30
-void File_Mxf::WaveAudioDescriptor_PeakEnvelopeTimestamp()
-{
- //Parsing
- Info_Timestamp();
-}
-
-//---------------------------------------------------------------------------
-// 0x3D31
-void File_Mxf::WaveAudioDescriptor_PeakEnvelopeData()
-{
- //Parsing
- Skip_XX(Length2, "Data");
-}
-
-//---------------------------------------------------------------------------
-// 0x3D32
-void File_Mxf::WaveAudioDescriptor_ChannelAssignment()
-{
- //Parsing
- int128u Value;
- Get_UL (Value, "Value", Mxf_ChannelAssignment_ChannelLayout); Element_Info1(Mxf_ChannelAssignment_ChannelLayout(Value, Descriptors[InstanceUID].ChannelCount));
-
- FILLING_BEGIN();
- Descriptors[InstanceUID].ChannelAssignment=Value;
-
- //Descriptors[InstanceUID].Infos["ChannelLayout"]=Mxf_ChannelAssignment_ChannelLayout(Value, Descriptors[InstanceUID].ChannelCount);
- //Ztring ChannelLayoutID;
- //ChannelLayoutID.From_Number(Value.lo, 16);
- //if (ChannelLayoutID.size()<16)
- // ChannelLayoutID.insert(0, 16-ChannelLayoutID.size(), __T('0'));
- //Descriptors[InstanceUID].Infos["ChannelLayoutID"]=ChannelLayoutID;
- //Descriptors[InstanceUID].Infos["ChannelPositions"]=Mxf_ChannelAssignment_ChannelPositions(Value, Descriptors[InstanceUID].ChannelCount);
- //if (Descriptors[InstanceUID].Infos["ChannelPositions"].empty())
- // Descriptors[InstanceUID].Infos["ChannelPositions"]=ChannelLayoutID;
- //Descriptors[InstanceUID].Infos["ChannelPositions/String2"]=Mxf_ChannelAssignment_ChannelPositions2(Value, Descriptors[InstanceUID].ChannelCount);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::CameraUnitMetadata_CaptureGammaEquation()
-{
- //Parsing
- int128u Value;
- Get_UUID(Value, "Value");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "CaptureGammaEquation").empty())
- Fill(Stream_Other, 0, "CaptureGammaEquation", Mxf_CameraUnitMetadata_CaptureGammaEquation(Value));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::CameraUnitMetadata_NeutralDensityFilterWheelSetting()
-{
- //Parsing
- int16u Value;
- Get_B2(Value, "Value");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "NeutralDensityFilterWheelSetting").empty())
- Fill(Stream_Other, 0, "NeutralDensityFilterWheelSetting", Value);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::CameraUnitMetadata_CaptureFrameRate()
-{
- //Parsing
- float64 Value;
- Get_Rational(Value);
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "CaptureFrameRate").empty())
- Fill(Stream_Other, 0, "CaptureFrameRate", Value);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::CameraUnitMetadata_ImageSensorReadoutMode()
-{
- //Parsing
- int8u Value;
- Get_B1(Value, "Value");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "ImageSensorReadoutMode").empty())
- Fill(Stream_Other, 0, "ImageSensorReadoutMode", Mxf_CameraUnitMetadata_ImageSensorReadoutMode(Value));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::CameraUnitMetadata_ShutterSpeed_Angle()
-{
- //Parsing
- int32u Value;
- Get_B4(Value, "Value");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "ShutterSpeed_Angle").empty())
- Fill(Stream_Other, 0, "ShutterSpeed_Angle", ((float)Value)/60, 1);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::CameraUnitMetadata_ISOSensitivity()
-{
- //Parsing
- int16u Value;
- Get_B2(Value, "Value");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "ISOSensitivity").empty())
- Fill(Stream_Other, 0, "ISOSensitivity", Value);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::CameraUnitMetadata_WhiteBalance()
-{
- //Parsing
- int16u Value;
- Get_B2(Value, "Value");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "WhiteBalance").empty())
- Fill(Stream_Other, 0, "WhiteBalance", Value);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::CameraUnitMetadata_CameraAttributes()
-{
- //Parsing
- Ztring Value;
- Get_UTF8(Length2, Value, "Value");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "CameraAttributes").empty())
- Fill(Stream_Other, 0, "CameraAttributes", Value);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::CameraUnitMetadata_ExposureIndexofPhotoMeter()
-{
- //Parsing
- int16u Value;
- Get_B2(Value, "Value");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "ExposureIndexofPhotoMeter").empty())
- Fill(Stream_Other, 0, "ExposureIndexofPhotoMeter", Value);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::CameraUnitMetadata_GammaforCDL()
-{
- //Parsing
- int8u Value;
- Get_B1(Value, "Value");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "GammaforCDL").empty())
- Fill(Stream_Other, 0, "GammaforCDL", Mxf_CameraUnitMetadata_GammaforCDL(Value));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::CameraUnitMetadata_ASCCDLV1_2()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- if (Count!=10 || Length!=2)
- {
- Skip_XX (Length2-8, "Data");
- return;
- }
- float32 sR, sG, sB, oR, oG, oB, pR, pG, pB, sat;
- Get_BF2(sR, "sR");
- Get_BF2(sG, "sG");
- Get_BF2(sB, "sB");
- Get_BF2(oR, "oR");
- Get_BF2(oG, "oG");
- Get_BF2(oB, "oB");
- Get_BF2(pR, "pR");
- Get_BF2(pG, "pG");
- Get_BF2(pB, "pB");
- Get_BF2(sat, "sat");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "ASCCDLV1_2").empty())
- {
- Ztring ValueS=__T("sR=")+Ztring::ToZtring(sR, 1)+__T(" sG=")+Ztring::ToZtring(sG, 1)+__T(" sB=")+Ztring::ToZtring(sB, 1)+__T(" oR=")+Ztring::ToZtring(oR, 1)+__T(" oG=")+Ztring::ToZtring(oG, 1)+__T(" oB=")+Ztring::ToZtring(oB, 1)+__T(" pR=")+Ztring::ToZtring(pR, 1)+__T(" pG=")+Ztring::ToZtring(pG, 1)+__T(" pB=")+Ztring::ToZtring(pB, 1)+__T(" sat=")+Ztring::ToZtring(sat, 1);
- Fill(Stream_Other, 0, "ASCCDLV1_2", ValueS);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::UserDefinedAcquisitionMetadata_UdamSetIdentifier()
-{
- //Parsing
- int128u Value;
- Get_UUID(Value, "Value");
-
- FILLING_BEGIN();
- if (Value.hi==0x966908004678031CLL && Value.lo==0x20500000F0C01181LL)
- UserDefinedAcquisitionMetadata_UdamSetIdentifier_IsSony=true;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::UserDefinedAcquisitionMetadata_Sony_8007()
-{
- //Parsing
- Ztring Value;
- Get_UTF8(Length2, Value, "Value");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "LensAttributes").empty())
- Fill(Stream_Other, 0, "LensAttributes", Value);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::UserDefinedAcquisitionMetadata_Sony_E101()
-{
- //Parsing
- int32u Width, Height;
- Get_B4 (Width, "Width");
- Get_B4 (Height, "Height");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "EffectiveMarkerCoverage").empty())
- Fill(Stream_Other, 0, "EffectiveMarkerCoverage", Ztring::ToZtring(Width)+__T("x")+Ztring::ToZtring(Height));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::UserDefinedAcquisitionMetadata_Sony_E102()
-{
- //Parsing
- int32u Width, Height;
- Get_B4 (Width, "Width");
- Get_B4 (Height, "Height");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "EffectiveMarkerAspectRatio").empty())
- Fill(Stream_Other, 0, "EffectiveMarkerAspectRatio", Ztring::ToZtring(Width)+__T(":")+Ztring::ToZtring(Height));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::UserDefinedAcquisitionMetadata_Sony_E103()
-{
- //Parsing
- int16u Value;
- Get_B2(Value, "Value");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "CameraProcessDiscriminationCode").empty())
- Fill(Stream_Other, 0, "CameraProcessDiscriminationCode", Value, 16);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::UserDefinedAcquisitionMetadata_Sony_E104()
-{
- //Parsing
- int8u Value;
- Get_B1(Value, "Value");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "RotaryShutterMode").empty())
- Fill(Stream_Other, 0, "RotaryShutterMode", Value?"Yes":"No");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::UserDefinedAcquisitionMetadata_Sony_E109()
-{
- //Parsing
- Ztring Value;
- Get_UTF8(Length2, Value, "Value");
-
- FILLING_BEGIN();
- if (Retrieve(Stream_Other, 0, "MonitoringDescriptions").empty())
- Fill(Stream_Other, 0, "MonitoringDescriptions", Value);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::UserDefinedAcquisitionMetadata_Sony_E10B()
-{
- //Parsing
- Skip_UUID( "Value");
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::UserDefinedAcquisitionMetadata_Sony_E201()
-{
- //Parsing
- Skip_XX(Length2, "Value");
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::UserDefinedAcquisitionMetadata_Sony_E202()
-{
- //Parsing
- Ztring Value;
- Get_UTF8(Length2, Value, "Value");
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Mxf::UserDefinedAcquisitionMetadata_Sony_E203()
-{
- //Parsing
- Skip_B1( "Value");
-}
-
-//---------------------------------------------------------------------------
-// AAF
-void File_Mxf::AS11_Core_SeriesTitle()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].SeriesTitle=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// AAF
-void File_Mxf::AS11_Core_ProgrammeTitle()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].ProgrammeTitle=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// AAF
-void File_Mxf::AS11_Core_EpisodeTitleNumber()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].EpisodeTitleNumber=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// AAF
-void File_Mxf::AS11_Core_ShimName()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].ShimName=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// AAF
-void File_Mxf::AS11_Core_AudioTrackLayout()
-{
- //Parsing
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1C(Value<Mxf_AS11_AudioTrackLayout_Count, Mxf_AS11_AudioTrackLayout[Value]);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].AudioTrackLayout=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// AAF
-void File_Mxf::AS11_Core_PrimaryAudioLanguage()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].PrimaryAudioLanguage=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// AAF
-void File_Mxf::AS11_Core_ClosedCaptionsPresent()
-{
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1(Value?"Yes":"No");
-
- FILLING_BEGIN();
- AS11s[InstanceUID].ClosedCaptionsPresent=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// AAF
-void File_Mxf::AS11_Core_ClosedCaptionsType()
-{
- //Parsing
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1C(Value<Mxf_AS11_ClosedCaptionType_Count, Mxf_AS11_ClosedCaptionType[Value]);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].ClosedCaptionsType=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// AAF
-void File_Mxf::AS11_Core_ClosedCaptionsLanguage()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].ClosedCaptionsLanguage=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// AAF
-void File_Mxf::AS11_Core_ShimVersion()
-{
- //Parsing
- int8u Major, Minor;
- Get_B1 (Major, "Major"); Element_Info1(Major);
- Get_B1 (Minor, "Minor"); Element_Info1(Minor);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].ShimVersion_Major=Major;
- AS11s[InstanceUID].ShimVersion_Minor=Minor;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// AAF
-void File_Mxf::AS11_Segment_PartNumber()
-{
- //Parsing
- int16u Value;
- Get_B2 (Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].PartNumber=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// AAF
-void File_Mxf::AS11_Segment_PartTotal()
-{
- //Parsing
- int16u Value;
- Get_B2 (Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].PartTotal=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010100
-void File_Mxf::AS11_UKDPP_ProductionNumber()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].ProductionNumber=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010200
-void File_Mxf::AS11_UKDPP_Synopsis()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].Synopsis=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010300
-void File_Mxf::AS11_UKDPP_Originator()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].Originator=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010400
-void File_Mxf::AS11_UKDPP_CopyrightYear()
-{
- //Parsing
- int16u Value;
- Get_B2 (Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].CopyrightYear=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010500
-void File_Mxf::AS11_UKDPP_OtherIdentifier()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].OtherIdentifier=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010600
-void File_Mxf::AS11_UKDPP_OtherIdentifierType()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].OtherIdentifierType=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010700
-void File_Mxf::AS11_UKDPP_Genre()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].Genre=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010800
-void File_Mxf::AS11_UKDPP_Distributor()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].Distributor=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010900
-void File_Mxf::AS11_UKDPP_PictureRatio()
-{
- //Parsing
- int32u Numerator, Denominator;
- Get_B4 (Numerator, "Numerator");
- Get_B4 (Denominator, "Denominator");
- Element_Info1(Ztring::ToZtring(Numerator)+__T(':')+Ztring::ToZtring(Denominator));
-
- FILLING_BEGIN();
- AS11s[InstanceUID].PictureRatio_N=Numerator;
- AS11s[InstanceUID].PictureRatio_D=Denominator;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010A00
-void File_Mxf::AS11_UKDPP_3D()
-{
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1(Value?"Yes":"No");
-
- FILLING_BEGIN();
- AS11s[InstanceUID].ThreeD=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010B00
-void File_Mxf::AS11_UKDPP_3DType()
-{
- //Parsing
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1C(Value<Mxf_AS11_3D_Type_Count, Mxf_AS11_3D_Type[Value]);
-
- FILLING_BEGIN();
- if (Value<Mxf_AS11_3D_Type_Count)
- AS11s[InstanceUID].ThreeDType=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010C00
-void File_Mxf::AS11_UKDPP_ProductPlacement()
-{
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1(Value?"Yes":"No");
-
- FILLING_BEGIN();
- AS11s[InstanceUID].ProductPlacement=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010D00
-void File_Mxf::AS11_UKDPP_FpaPass()
-{
- //Parsing
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1C(Value<Mxf_AS11_FpaPass_Count, Mxf_AS11_FpaPass[Value]);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].FpaPass=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010E00
-void File_Mxf::AS11_UKDPP_FpaManufacturer()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].FpaManufacturer=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101010F00
-void File_Mxf::AS11_UKDPP_FpaVersion()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].FpaVersion=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011000
-void File_Mxf::AS11_UKDPP_VideoComments()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].VideoComments=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011100
-void File_Mxf::AS11_UKDPP_SecondaryAudioLanguage()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].SecondaryAudioLanguage=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::AS11_UKDPP_TertiaryAudioLanguage()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].TertiaryAudioLanguage=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011300
-void File_Mxf::AS11_UKDPP_AudioLoudnessStandard()
-{
- //Parsing
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1C(Value<Mxf_AS11_AudioLoudnessStandard_Count, Mxf_AS11_AudioLoudnessStandard[Value]);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].AudioLoudnessStandard=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011400
-void File_Mxf::AS11_UKDPP_AudioComments()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].AudioComments=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011500
-void File_Mxf::AS11_UKDPP_LineUpStart()
-{
- //Parsing
- int64u Value;
- Get_B8 (Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].LineUpStart=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011600
-void File_Mxf::AS11_UKDPP_IdentClockStart()
-{
- //Parsing
- int64u Value;
- Get_B8 (Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].IdentClockStart=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011700
-void File_Mxf::AS11_UKDPP_TotalNumberOfParts()
-{
- //Parsing
- int16u Value;
- Get_B2 (Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].TotalNumberOfParts=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011800
-void File_Mxf::AS11_UKDPP_TotalProgrammeDuration()
-{
- //Parsing
- int64u Value;
- Get_B8 (Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].TotalProgrammeDuration=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011900
-void File_Mxf::AS11_UKDPP_AudioDescriptionPresent()
-{
- //Parsing
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1(Value?"Yes":"No");
-
- FILLING_BEGIN();
- AS11s[InstanceUID].AudioDescriptionPresent=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011A00
-void File_Mxf::AS11_UKDPP_AudioDescriptionType()
-{
- //Parsing
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1C(Value<Mxf_AS11_AudioDescriptionType_Count, Mxf_AS11_AudioDescriptionType[Value]);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].AudioDescriptionType=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011B00
-void File_Mxf::AS11_UKDPP_OpenCaptionsPresent()
-{
- //Parsing
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1(Value?"Yes":"No");
-
- FILLING_BEGIN();
- AS11s[InstanceUID].OpenCaptionsPresent=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011C00
-void File_Mxf::AS11_UKDPP_OpenCaptionsType()
-{
- //Parsing
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1C(Value<Mxf_AS11_OpenCaptionsType_Count, Mxf_AS11_OpenCaptionsType[Value]);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].OpenCaptionsType=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011D00
-void File_Mxf::AS11_UKDPP_OpenCaptionsLanguage()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].OpenCaptionsLanguage=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011E00
-void File_Mxf::AS11_UKDPP_SigningPresent()
-{
- //Parsing
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1C(Value<Mxf_AS11_SigningPresent_Count, Mxf_AS11_SigningPresent[Value]);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].SigningPresent=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101011F00
-void File_Mxf::AS11_UKDPP_SignLanguage()
-{
- //Parsing
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1C(Value<Mxf_AS11_SignLanguage_Count, Mxf_AS11_SignLanguage[Value]);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].SignLanguage=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101012000
-void File_Mxf::AS11_UKDPP_CompletionDate()
-{
- //Parsing
- int64u Value;
- Get_B8 (Value, "Value"); Element_Info1(Value); //TODO: Timestamp
-
- FILLING_BEGIN();
- AS11s[InstanceUID].CompletionDate=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101012100
-void File_Mxf::AS11_UKDPP_TextlessElementsExist()
-{
- //Parsing
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1(Value?"Yes":"No");
-
- FILLING_BEGIN();
- AS11s[InstanceUID].TextlessElementsExist=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101012200
-void File_Mxf::AS11_UKDPP_ProgrammeHasText()
-{
- //Parsing
- int8u Value;
- Get_B1 (Value, "Value"); Element_Info1(Value?"Yes":"No");
-
- FILLING_BEGIN();
- AS11s[InstanceUID].ProgrammeHasText=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101012300
-void File_Mxf::AS11_UKDPP_ProgrammeTextLanguage()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].ProgrammeTextLanguage=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101012400
-void File_Mxf::AS11_UKDPP_ContactEmail()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].ContactEmail=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// DPP .010101012500
-void File_Mxf::AS11_UKDPP_ContactTelephoneNumber()
-{
- //Parsing
- Ztring Value;
- Get_UTF16B(Length2, Value, "Value"); Element_Info1(Value);
-
- FILLING_BEGIN();
- AS11s[InstanceUID].ContactTelephoneNumber=Value;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// 0x8001
-void File_Mxf::Omneon_010201010100_8001()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Skip_UUID( "UUID Omneon_010201020100");
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x8001
-void File_Mxf::Omneon_010201010100_8003()
-{
- //Parsing
- //Vector
- int32u Count, Length;
- Get_B4 (Count, "Count");
- Get_B4 (Length, "Length");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Skip_UUID( "UUID Omneon_010201020100");
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x8003
-void File_Mxf::Omneon_010201020100_8002()
-{
- //Parsing
- Skip_UTF16B(Length2, "Content");
-}
-
-//---------------------------------------------------------------------------
-// 0x8003
-void File_Mxf::Omneon_010201020100_8003()
-{
- //Parsing
- Skip_UTF16B(Length2, "Content");
-}
-
-//---------------------------------------------------------------------------
-// 0x8004
-void File_Mxf::Omneon_010201020100_8004()
-{
- //Parsing
- Skip_XX(Length2, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-// 0x8005
-void File_Mxf::Omneon_010201020100_8005()
-{
- //Parsing
- Skip_UTF16B(Length2, "Content");
-}
-
-//---------------------------------------------------------------------------
-// 0x8006
-void File_Mxf::Omneon_010201020100_8006()
-{
- //Parsing
- Skip_Local(Length2, "Content");
-}
-
-//***************************************************************************
-// Basic types
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mxf::Get_Rational(float64 &Value)
-{
- //Parsing
- int32u N, D;
- Get_B4 (N, "Numerator");
- Get_B4 (D, "Denominator");
- if (D)
- Value=((float32)N)/D;
- else
- Value=0; //Error
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Skip_Rational()
-{
- //Parsing
- Skip_B4( "Numerator");
- Skip_B4( "Denominator");
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Info_Rational()
-{
- //Parsing
- Info_B4(N, "Numerator");
- Info_B4(D, "Denominator");
- Element_Info1C(D, ((float32)N)/D);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Get_UL(int128u &Value, const char* Name, const char* (*Param) (int128u))
-{
- #ifdef MEDIAINFO_MINIMIZE_SIZE
- Skip_UUID();
- #else
- //Parsing
- Element_Begin1(Name);
- int64u Value_hi, Value_lo;
- int8u Category, Registry, Structure;
- Peek_B8(Value_hi);
- Skip_B1( "Start (0x06)");
- Skip_B1( "Length of the remaining key (0x0E)");
- Skip_B1( "ISO, ORG (0x2B)");
- Skip_B1( "SMPTE (0x34)");
- Get_B1 (Category, "Category"); Param_Info1(Mxf_Category(Category));
- Get_B1 (Registry, "Registry"); Param_Info1(Mxf_Registry(Category, Registry));
- Get_B1 (Structure, "Structure"); Param_Info1(Mxf_Structure(Category, Registry, Structure));
- Skip_B1( "Version");
- Peek_B8(Value_lo);
- switch (Category)
- {
- case 0x01 : //Item
- {
- //switch (Registry)
- //{
- // default :
- {
- switch (Structure)
- {
- case 0x01 : //Standard
- Param_Info1("Essence element"); //SMPTE 379M
- Info_UL_01xx01_Items();
- break;
- default :
- Skip_B8( "Unknown");
- }
- }
- //}
- }
- break;
- case 0x02 : //Group
- {
- //switch (Registry)
- //{
- // default :
- {
- switch (Structure)
- {
- case 0x01 :
- Info_UL_02xx01_Groups();
- break;
- default :
- Skip_B8( "Unknown");
- }
- }
- //}
- }
- break;
- case 0x04 : //Value
- {
- switch (Registry)
- {
- case 0x01 :
- {
- Param_Info1("Labels");
- switch (Structure)
- {
- case 0x01 :
- Info_UL_040101_Values();
- break;
- default :
- Skip_B8( "Unknown");
- }
- }
- break;
- default :
- Skip_B8( "Unknown");
- }
- }
- break;
- default :
- Skip_B8( "Unknown");
- }
-
-
- Value.hi=Value_hi;
- Value.lo=Value_lo;
- Element_Info1C((Param), Param(Value));
- Element_End0();
- #endif
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File_Mxf::Info_UL_01xx01_Items()
-{
- Info_B1(Code1, "Item Designator");
- switch (Code1)
- {
- case 0x01 :
- {
- Param_Info1("Identifiers and locators");
- Info_B1(Code2, "Code (2)");
- switch (Code2)
- {
- case 0x01 :
- {
- Param_Info1("GUID");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x0D :
- {
- Param_Info1("UMID Mixed");
- Info_B1(Code4, "Code (4)");
- Info_B1(Code5, "Code (5)");
- Info_B1(Code6, "Code (6)");
- Info_B1(Code7, "Code (7)");
- Info_B1(Code8, "Code (8)");
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- case 0x03 :
- {
- Param_Info1("Locally Unique Identifiers");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x06 :
- {
- Param_Info1("Metadata Identifiers");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("Item Designator ID");
- Info_B1(Code5, "Code (5)");
- //switch (Code5)
- //{
- // default :
- Skip_B3( "Unknown");
- //}
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- case 0x07 :
- {
- Param_Info1("?");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("?");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x01 :
- {
- Param_Info1("MCA Label Dictionary ID");
- Skip_B3( "Reserved");
- }
- break;
- case 0x02 :
- {
- Param_Info1("MCA Tag Symbol");
- Skip_B3( "Reserved");
- }
- break;
- case 0x03 :
- {
- Param_Info1("MCA Tag Name");
- Skip_B3( "Reserved");
- }
- break;
- case 0x04 :
- {
- Param_Info1("Group Of Soundfield Groups Link ID");
- Skip_B3( "Reserved");
- }
- break;
- case 0x05 :
- {
- Param_Info1("MCA Link ID");
- Skip_B3( "Reserved");
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- case 0x05 :
- {
- Param_Info1("Titles");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x10 :
- {
- Param_Info1("MCA Title");
- Skip_B5( "Reserved");
- }
- break;
- case 0x11 :
- {
- Param_Info1("MCA Title Version");
- Skip_B5( "Reserved");
- }
- break;
- case 0x12 :
- {
- Param_Info1("MCA Title Sub-Version");
- Skip_B5( "Reserved");
- }
- break;
- case 0x13 :
- {
- Param_Info1("MCA Episode");
- Skip_B5( "Reserved");
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- default :
- Skip_B6( "Unknown");
- }
- }
- break;
- case 0x03 :
- {
- Param_Info1("Interpretive");
- Info_B1(Code2, "Code (2)");
- switch (Code2)
- {
- case 0x01 :
- {
- Param_Info1("Fundamental");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x01 :
- {
- Param_Info1("Countries and Languages");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x02 :
- {
- Param_Info1("Language Codes");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x03 :
- {
- Param_Info1("Spoken Language Codes");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x01 :
- {
- Param_Info1("Primary Spoken Language Code");
- Skip_B2( "Reserved");
- }
- break;
- case 0x02 :
- {
- Param_Info1("Secondary Spoken Language Code");
- Skip_B2( "Reserved");
- }
- break;
- case 0x03 :
- {
- Param_Info1("Primary Original Language Code");
- Skip_B2( "Reserved");
- }
- break;
- case 0x04 :
- {
- Param_Info1("Secondary Original Language Code");
- Skip_B2( "Reserved");
- }
- break;
- case 0x11 :
- {
- Param_Info1("Primary Extended Spoken Language Code");
- Skip_B2( "Reserved");
- }
- break;
- case 0x12 :
- {
- Param_Info1("Secondary Extended Spoken Language Code");
- Skip_B2( "Reserved");
- }
- break;
- case 0x13 :
- {
- Param_Info1("Original Extended Spoken Primary Language Code");
- Skip_B2( "Reserved");
- }
- break;
- case 0x14 :
- {
- Param_Info1("Secondary Original Extended Spoken Language Code");
- Skip_B2( "Reserved");
- }
- break;
- case 0x15 :
- {
- Param_Info1("RFC 5646 Audio Language Code");
- Skip_B2( "Reserved");
- }
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("Data Interpretations and Definitions");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x0A :
- {
- Param_Info1("Name-Value Construct Interpretations");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x01 :
- case 0x02 :
- {
- Param_Info1("");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x00 :
- {
- Param_Info1("ANSI");
- Info_B1(Code7, "Reserved");
- Info_B1(Code8, "Reserved");
- }
- break;
- case 0x01 :
- {
- Param_Info1("UTF-16");
- Info_B1(Code7, "Reserved");
- Info_B1(Code8, "Reserved");
- }
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- case 0x10 :
- {
- Param_Info1("KLV Interpretations");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x01 :
- {
- Param_Info1("Filler");
- Info_B1(Code6, "Reserved");
- Info_B1(Code7, "Reserved");
- Info_B1(Code8, "Reserved");
- }
- break;
- case 0x05 :
- {
- Param_Info1("Terminating Filler");
- Info_B1(Code6, "Reserved");
- Info_B1(Code7, "Reserved");
- Info_B1(Code8, "Reserved");
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- case 0x20 :
- {
- Param_Info1("XML Constructs and Interpretations");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x01 :
- {
- Param_Info1("XML Document Text");
- Info_B1(Code6, "Reserved");
- Info_B1(Code7, "Reserved");
- Info_B1(Code8, "Reserved");
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("Human Assigned Descriptors");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x01 :
- {
- Param_Info1("Categorization");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x02 :
- {
- Param_Info1("Cataloging and Indexing");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x01 :
- {
- Param_Info1("Catalog Data Status");
- Skip_B3( "Reserved");
- }
- break;
- case 0x02 :
- {
- Param_Info1("Thesaurus Name");
- Skip_B3( "Reserved");
- }
- break;
- case 0x03 :
- {
- Param_Info1("Theme");
- Skip_B3( "Reserved");
- }
- break;
- case 0x04 :
- {
- Param_Info1("Content Classification");
- Skip_B3( "Reserved");
- }
- break;
- case 0x05 :
- {
- Param_Info1("Keywords");
- Skip_B3( "Reserved");
- }
- break;
- case 0x06 :
- {
- Param_Info1("Key Frames");
- Skip_B3( "Reserved");
- }
- break;
- case 0x07 :
- {
- Param_Info1("Key Sounds");
- Skip_B3( "Reserved");
- }
- break;
- case 0x08 :
- {
- Param_Info1("Key Data");
- Skip_B3( "Reserved");
- }
- break;
- case 0x09 :
- {
- Param_Info1("Assigned Category Name");
- Skip_B3( "Reserved");
- }
- break;
- case 0x0A :
- {
- Param_Info1("Assigned Category Value");
- Skip_B3( "Reserved");
- }
- break;
- case 0x0B :
- {
- Param_Info1("Shot List");
- Skip_B3( "Reserved");
- }
- break;
- case 0x0C :
- {
- Param_Info1("Package User Comments");
- Skip_B3( "Reserved");
- }
- break;
- case 0x0D :
- {
- Param_Info1("Cue-In Words");
- Skip_B3( "Reserved");
- }
- break;
- case 0x0E :
- {
- Param_Info1("Cue-Out Words");
- Skip_B3( "Reserved");
- }
- break;
- case 0x0F :
- {
- Param_Info1("Key Frame Sample Count");
- Skip_B3( "Reserved");
- }
- break;
- case 0x10 :
- {
- Param_Info1("Keypoint Kind");
- Skip_B3( "Reserved");
- }
- break;
- case 0x11 :
- {
- Param_Info1("Keypoint Value");
- Skip_B3( "Reserved");
- }
- break;
- case 0x15 :
- {
- Param_Info1("Framework Thesaurus Name");
- Skip_B3( "Reserved");
- }
- break;
- case 0x16 :
- {
- Param_Info1("Component User Comments");
- Skip_B3( "Reserved");
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- default :
- Skip_B6( "Unknown");
- }
- }
- break;
- case 0x04 :
- {
- Param_Info1("Parametric");
- Info_B1(Code2, "Code (2)");
- switch (Code2)
- {
- case 0x01 :
- {
- Param_Info1("Video and Image Essence Characteristics");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x02 :
- {
- Param_Info1("Image Source Characteristics");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("Opto-Electronic Formulation");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x01 :
- {
- Param_Info1("Transfer Characteristics");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x01 :
- {
- Param_Info1("Capture Gamma Equation");
- Info_B1(Code7, "Code (7)");
- switch (Code7)
- {
- case 0x00 :
- {
- Param_Info1("ISO/IEC 646:1991 - ISO 7-Bit Coded Character Set");
- }
- break;
- case 0x01 :
- {
- Param_Info1("Rational");
- }
- break;
- case 0x02 :
- {
- Param_Info1("UL");
- }
- break;
- default :
- Info_B1(Code8, "Unknown");
- }
- Info_B1(Code8, "Reserved");
- }
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- case 0x06 :
- {
- Param_Info1("Digital Video and Image Compression Parameters");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x03 :
- {
- Param_Info1("JPEG 2000 Coding Parameters");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x01 :
- {
- Param_Info1("Rsiz - Decoder capabilities");
- Skip_B3( "Reserved");
- }
- break;
- case 0x02 :
- {
- Param_Info1("Xsiz - Width");
- Skip_B3( "Reserved");
- }
- break;
- case 0x03 :
- {
- Param_Info1("Ysiz - Height");
- Skip_B3( "Reserved");
- }
- break;
- case 0x04 :
- {
- Param_Info1("XOsiz - Horizontal offset");
- Skip_B3( "Reserved");
- }
- break;
- case 0x05 :
- {
- Param_Info1("YOsiz - Vertical offset");
- Skip_B3( "Reserved");
- }
- break;
- case 0x06 :
- {
- Param_Info1("XTsiz - Width of one reference tile");
- Skip_B3( "Reserved");
- }
- break;
- case 0x07 :
- {
- Param_Info1("YTsiz - Height of one reference tile");
- Skip_B3( "Reserved");
- }
- break;
- case 0x08 :
- {
- Param_Info1("XTOsiz - Horizontal offset of the first tile");
- Skip_B3( "Reserved");
- }
- break;
- case 0x09 :
- {
- Param_Info1("YTOsiz - Vertical offset of the first tile");
- Skip_B3( "Reserved");
- }
- break;
- case 0x0A :
- {
- Param_Info1("Csiz - Number of components in the picture");
- Skip_B3( "Reserved");
- }
- break;
- case 0x0B :
- {
- Param_Info1("Picture Component Sizing");
- Skip_B3( "Reserved");
- }
- break;
- case 0x0C :
- {
- Param_Info1("Coding Style Default");
- Skip_B3( "Reserved");
- }
- break;
- case 0x0D :
- {
- Param_Info1("Quantization Default");
- Skip_B3( "Reserved");
- }
- break;
- case 0x0 :
- {
- Param_Info1("");
- Skip_B3( "Reserved");
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("Audio Essence Characteristics");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x01 :
- {
- Param_Info1("Fundamental Audio Characteristics");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("Audio Formulation");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x01 :
- {
- Param_Info1("Electrospatial Formulation");
- Skip_B3( "Reserved");
- }
- break;
- case 0x02 :
- {
- Param_Info1("Filtering Applied");
- Skip_B3( "Reserved");
- }
- break;
- case 0x03 :
- {
- Param_Info1("Audio Reference Level");
- Skip_B3( "Reserved");
- }
- break;
- case 0x04 :
- {
- Param_Info1("Channel Count");
- Skip_B3( "Reserved");
- }
- break;
- case 0x05 :
- {
- Param_Info1("Channel Assignment");
- Skip_B3( "Reserved");
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- default :
- Skip_B6( "Unknown");
- }
- }
- break;
- case 0x06 :
- {
- Param_Info1("Relational");
- Info_B1(Code2, "Code (2)");
- switch (Code2)
- {
- case 0x01 :
- {
- Param_Info1("Essence and Metadata Relationships");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x01 :
- {
- Param_Info1("Essence to Essence Relationships");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x04 :
- {
- Param_Info1("Object to Object Relationships");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x06 :
- {
- Param_Info1("Strong References Arrays");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x10 :
- {
- Param_Info1("Sub-descriptors");
- Skip_B2( "Reserved");
- }
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- default :
- Skip_B6( "Unknown");
- }
- }
- break;
- case 0x0D :
- {
- Param_Info1("User Organisation Registered For Public Use");
- Info_B1(Code2, "Organization");
- switch (Code2)
- {
- case 0x01 :
- {
- Param_Info1("AAF");
- Info_B1(Code3, "Application");
- switch (Code3)
- {
- case 0x03 :
- {
- Param_Info1("MXF Generic Container Keys");
- Info_B1(Code4, "Structure Version");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("Version 1");
- Info_B1(Code5, "Item Type Identifier");
- switch (Code5)
- {
- case 0x05 : Param_Info1("CP Picture (SMPTE 386M)"); break;
- case 0x06 : Param_Info1("CP Sound (SMPTE 386M)"); break;
- case 0x07 : Param_Info1("CP Data (SMPTE 386M)"); break;
- case 0x14 : Param_Info1("MXF in MXF? (To confirm)"); break;
- case 0x15 : Param_Info1("GC Picture"); break;
- case 0x16 : Param_Info1("GC Sound"); break;
- case 0x17 : Param_Info1("GC Data"); break;
- case 0x18 : Param_Info1("GC Compound"); break;
- default : ;
- }
- Info_B1(Code6, "Essence Element Count");
- Info_B1(Code7, "Essence Element Type");
- Info_B1(Code8, "Essence Element Number");
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- default :
- Skip_B6( "Unknown");
- }
- }
- break;
- case 0x0E :
- {
- Param_Info1("User Organisation Registered For Private Use");
- Info_B1(Code2, "Organization");
- switch (Code2)
- {
- case 0x04 :
- {
- Param_Info1("Avid");
- Info_B1(Code3, "Application");
- switch (Code3)
- {
- case 0x03 :
- {
- Param_Info1("Container Keys");
- Info_B1(Code4, "Structure Version");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("Version 1");
- Info_B1(Code5, "Item Type Identifier");
- switch (Code5)
- {
- case 0x15 : Param_Info1("Picture"); break;
- default : ;
- }
- Info_B1(Code6, "Essence Element Count");
- Info_B1(Code7, "Essence Element Type");
- Info_B1(Code8, "Essence Element Number");
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- case 0x06 :
- {
- Param_Info1("Sony");
- Info_B1(Code3, "Application");
- switch (Code3)
- {
- case 0x7F :
- {
- Param_Info1("?");
- Info_B1(Code4, "?");
- switch (Code4)
- {
- case 0x03 :
- {
- Param_Info1("?");
- Info_B1(Code5, "?");
- switch (Code5)
- {
- case 0x15 : Param_Info1("Picture"); break;
- default : ;
- }
- Info_B1(Code6, "Essence Element Count");
- Info_B1(Code7, "Essence Element Type");
- Info_B1(Code8, "Essence Element Number");
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- default :
- Skip_B6( "Unknown");
- }
- }
- break;
- default :
- Skip_B7( "Unknown");
- }
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File_Mxf::Info_UL_02xx01_Groups()
-{
- Info_B1(Code1, "Item Designator");
- switch (Code1)
- {
- case 0x0D :
- {
- Param_Info1("User Organisation Registered For Public Use");
- Info_B1(Code2, "Organization");
- switch (Code2)
- {
- case 0x01 :
- {
- Param_Info1("AAF");
- Info_B1(Code3, "Application");
- switch (Code3)
- {
- case 0x01 :
- {
- Param_Info1("Structural Metadata Sets");
- Info_B1(Code4, "Structure Version");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("Version 1");
- Info_B1(Code5, "Structure Kind");
- switch (Code5)
- {
- case 0x01 :
- {
- Param_Info1("MXF / AAF Association compatible sets & packs");
- Info_B1(Code6, "Set Kind (1)"); //See table 17
- Info_B1(Code7, "Set Kind (2)"); //See table 17
- Info_B1(Code8, "Reserved");
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("MXF File Structure");
- Info_B1(Code4, "Structure Version");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("Version 1");
- Info_B1(Code5, "Structure Kind");
- switch (Code5)
- {
- case 0x01 :
- {
- Param_Info1("MXF File Structure sets & packs");
- Info_B1(Code6, "Set / Pack Kind");
- switch (Code6)
- {
- case 0x02 :
- {
- Param_Info1("Header Partition");
- Info_B1(Code7, "Partition Status");
- Info_B1(Code8, "Reserved");
- }
- break;
- case 0x03 :
- {
- Param_Info1("Body Partition");
- Info_B1(Code7, "Partition Status");
- Info_B1(Code8, "Reserved");
- }
- break;
- case 0x04 :
- {
- Param_Info1("Footer Partition");
- Info_B1(Code7, "Partition Status");
- Info_B1(Code8, "Reserved");
- }
- break;
- case 0x05 :
- {
- Param_Info1("Primer");
- Info_B1(Code7, "Version of the Primer Pack");
- Info_B1(Code8, "Reserved");
- }
- break;
- case 0x10 :
- Param_Info1("Index Table Segment");
- Skip_B1( "Version");
- Skip_B1( "Reserved");
- break;
- case 0x11 :
- Param_Info1("Random Index Pack");
- Skip_B1( "Version");
- Skip_B1( "Reserved");
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- case 0x03 :
- {
- Param_Info1("MXF Generic Container Keys");
- Info_B1(Code4, "Structure Version");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("MXF-GC Version 1");
- Info_B1(Code5, "Item Type Identifier");
- switch (Code5)
- {
- case 0x04 :
- {
- Param_Info1("CP-Compatible System Item"); //SMPTE 379M
- Info_B1(Code6, "System Scheme Identifier");
- switch (Code6)
- {
- case 0x02 :
- {
- Param_Info1("SDTI-CP, version 1"); //SMPTE 385M
- Info_B1(Code7, "Metadata or Control Element Identifier");
- switch (Code7)
- {
- case 0x01 :
- {
- Param_Info1("System Metadata Pack");
- Info_B1(Code8, "Reserved");
- }
- break;
- case 0x02 :
- {
- Param_Info1("Package metadata set");
- Info_B1(Code8, "Metadata Block Count");
- }
- break;
- case 0x03 :
- {
- Param_Info1("Picture metadata set");
- Info_B1(Code8, "Metadata Block Count");
- }
- break;
- case 0x04 :
- {
- Param_Info1("Sound metadata set");
- Info_B1(Code8, "Metadata Block Count");
- }
- break;
- case 0x05 :
- {
- Param_Info1("Data metadata set");
- Info_B1(Code8, "Metadata Block Count");
- }
- break;
- case 0x06 :
- {
- Param_Info1("Control data set");
- Info_B1(Code8, "Metadata Block Count");
- }
- break;
- default :
- Info_B1(Code8, "Metadata Block Count");
- }
- }
- break;
- default :
- Info_B1(Code7, "Metadata or Control Element Identifier");
- Info_B1(Code8, "Reserved");
- }
- }
- break;
- case 0x14 :
- {
- Param_Info1("GC-Compatible System Item"); //SMPTE 379M
- Info_B1(Code6, "System Scheme Identifier");
- switch (Code6)
- {
- case 0x02 :
- {
- Param_Info1("GC System Scheme 1"); //SMPTE 394M
- Info_B1(Code7, "Metadata or Control Element Identifier");
- switch (Code7)
- {
- case 0x01 :
- Param_Info1("First Element");
- break;
- case 0x02 :
- Param_Info1("Subsequent Element");
- break;
- case 0x03 :
- Param_Info1("Picture Item Descriptor");
- break;
- case 0x04 :
- Param_Info1("Sound Item Descriptor");
- break;
- case 0x05 :
- Param_Info1("Data Item Descriptor");
- break;
- case 0x06 :
- Param_Info1("Control Item Descriptor");
- break;
- case 0x07 :
- Param_Info1("Compound Item Descriptor");
- break;
- default : if (Code7>=0x10 && Code7<=0x7F) Param_Info1("Pack coded System Elements (SMPTE 336M)");
- }
- Info_B1(Code8, "Element Number");
- }
- break;
- default :
- Info_B1(Code7, "Metadata or Control Element Identifier");
- Info_B1(Code8, "Unknown");
- }
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- case 0x04 :
- {
- Param_Info1("MXF / AAF Descriptive Metadata sets");
- Info_B1(Code4, "Structure Version");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("Version 1");
- Info_B1(Code5, "Structure / Scheme Kind");
- Info_B1(Code6, "Reserved");
- Info_B1(Code7, "Reserved");
- Info_B1(Code8, "Reserved");
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- default :
- Skip_B6( "Unknown");
- }
- }
- break;
- case 0x0E :
- {
- Param_Info1("User Organisation Registered For Private Use");
- Skip_B7( "Private");
- break;
- }
- default :
- Skip_B7( "Unknown");
- }
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_TRACE
-void File_Mxf::Info_UL_040101_Values()
-{
- Info_B1(Code1, "Item Designator");
- switch (Code1)
- {
- case 0x01 :
- {
- Param_Info1("Identification and location");
- Info_B1(Code2, "Code (2)");
- switch (Code2)
- {
- case 0x01 :
- {
- Param_Info1("Globally Unique Identifiers");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x01 :
- {
- Param_Info1("SDTI Payload Identifiers");
- Skip_B5( "Data");
- }
- break;
- case 0x02 :
- {
- Param_Info1("File Format Identifiers");
- Skip_B5( "Data");
- }
- break;
- case 0x03 :
- {
- Param_Info1("Definition Identifiers");
- Skip_B5( "Data");
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("Globally Unique Locators");
- Info_B1(Code3, "Code (3)");
- Skip_B5( "Unknown");
- }
- break;
- case 0x03 :
- {
- Param_Info1("Locally Unique Identifiers");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x01 :
- {
- Param_Info1("For Information Only Do Not Use");
- Skip_B5( "Unknown");
- }
- break;
- case 0x02 :
- {
- Param_Info1("Track Identifiers");
- Info_B1(Code4, "Kind");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("Metadata Track Kinds");
- Skip_B1( "Unknown");
- Skip_B3( "Unknown");
- }
- break;
- case 0x02 :
- {
- Param_Info1("Essence Track Kinds");
- Skip_B1( "Unknown");
- Skip_B3( "Unknown");
- }
- break;
- case 0x03 :
- {
- Param_Info1("Other Track Kinds");
- Skip_B1( "Unknown");
- Skip_B3( "Unknown");
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- default :
- Skip_B6( "Unknown");
- }
- }
- break;
- case 0x03 :
- {
- Param_Info1("Interpretive");
- Info_B1(Code2, "Code (2)");
- switch (Code2)
- {
- case 0x01 :
- {
- Param_Info1("Per element?");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x01 :
- {
- Param_Info1("Channels?");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("L");
- Skip_B4( "Reserved");
- }
- break;
- case 0x02 :
- {
- Param_Info1("R");
- Skip_B4( "Reserved");
- }
- break;
- case 0x03 :
- {
- Param_Info1("C");
- Skip_B4( "Reserved");
- }
- break;
- case 0x04 :
- {
- Param_Info1("LFE");
- Skip_B4( "Reserved");
- }
- break;
- case 0x05 :
- {
- Param_Info1("Ls");
- Skip_B4( "Reserved");
- }
- break;
- case 0x06 :
- {
- Param_Info1("Rs");
- Skip_B4( "Reserved");
- }
- break;
- case 0x20 :
- {
- Param_Info1("M1");
- Skip_B4( "Reserved");
- }
- break;
- case 0x21 :
- {
- Param_Info1("M2");
- Skip_B4( "Reserved");
- }
- break;
- case 0x22 :
- {
- Param_Info1("Lt");
- Skip_B4( "Reserved");
- }
- break;
- case 0x23 :
- {
- Param_Info1("Rt");
- Skip_B4( "Reserved");
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("Per group?");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("5.1");
- Skip_B4( "Reserved");
- }
- break;
- case 0x11 :
- {
- Param_Info1("Dual Mono");
- Skip_B4( "Reserved");
- }
- break;
- case 0x18 :
- {
- Param_Info1("Lt+Rt");
- Skip_B4( "Reserved");
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("Per element?");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x01 :
- {
- Param_Info1("Channels?");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("L");
- Skip_B4( "Reserved");
- }
- break;
- case 0x02 :
- {
- Param_Info1("R");
- Skip_B4( "Reserved");
- }
- break;
- case 0x03 :
- {
- Param_Info1("C");
- Skip_B4( "Reserved");
- }
- break;
- case 0x04 :
- {
- Param_Info1("LFE");
- Skip_B4( "Reserved");
- }
- break;
- case 0x05 :
- {
- Param_Info1("Ls");
- Skip_B4( "Reserved");
- }
- break;
- case 0x06 :
- {
- Param_Info1("Rs");
- Skip_B4( "Reserved");
- }
- break;
- case 0x20 :
- {
- Param_Info1("Lt+Rt?");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x03 :
- {
- Param_Info1("Lt");
- Skip_B3( "Reserved");
- }
- break;
- case 0x04 :
- {
- Param_Info1("Rt");
- Skip_B3( "Reserved");
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("Per group?");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("5.1");
- Skip_B4( "Reserved");
- }
- break;
- case 0x10 :
- {
- Param_Info1("2.0");
- Skip_B4( "Reserved");
- }
- break;
- case 0x18 :
- {
- Param_Info1("Lt+Rt");
- Skip_B4( "Reserved");
- }
- break;
- case 0x20 :
- {
- Param_Info1("?");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x01 :
- {
- Param_Info1("2.0");
- Skip_B3( "Reserved");
- }
- break;
- case 0x09 :
- {
- Param_Info1("Lt+Rt");
- Skip_B3( "Reserved");
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- default :
- Skip_B6( "Unknown");
- }
- }
- break;
- case 0x04 :
- {
- Param_Info1("Parametric");
- Info_B1(Code2, "Code (2)");
- switch (Code2)
- {
- case 0x01 :
- {
- Param_Info1("Picture essence");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x01 :
- {
- Param_Info1("Fundamental Picture Characteristics");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("Picture Source Characteristics");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x01 :
- {
- Param_Info1("Transfer Characteristic");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x01 :
- Param_Info1("BT.470");
- Skip_B2( "Reserved");
- break;
- case 0x02 :
- Param_Info1("BT.709");
- Skip_B2( "Reserved");
- break;
- case 0x03 :
- Param_Info1("SMPTE 240M");
- Skip_B2( "Reserved");
- break;
- case 0x04 :
- Param_Info1("SMPTE 274M");
- Skip_B2( "Reserved");
- break;
- case 0x05 :
- Param_Info1("BT.1361 extended colour gamut system");
- Skip_B2( "Reserved");
- break;
- case 0x06 :
- Param_Info1("Linear");
- Skip_B2( "Reserved");
- break;
- case 0x07 :
- Param_Info1("SMPTE 428M");
- Skip_B2( "Reserved");
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("Coding Equations");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x01 :
- Param_Info1("BT.601");
- Skip_B2( "Reserved");
- break;
- case 0x02 :
- Param_Info1("BT.709");
- Skip_B2( "Reserved");
- break;
- case 0x03 :
- Param_Info1("SMPTE 240M");
- Skip_B2( "Reserved");
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- case 0x03 :
- {
- Param_Info1("Color Primaries");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x01 :
- Param_Info1("BT.601 NTSC");
- Skip_B2( "Reserved");
- break;
- case 0x02 :
- Param_Info1("BT.470 System B");
- Skip_B2( "Reserved");
- break;
- case 0x03 :
- Param_Info1("BT.709");
- Skip_B2( "Reserved");
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- case 0x02 :
- Param_Info1("Picture Coding Characteristics");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x01 :
- Param_Info1("Uncompressed Picture Coding");
- Skip_B1( "Item Type Identifier"); //if 0x14: SMPTE 384M Uncompressed picture Line wrapped
- Skip_B1( "System Scheme Identifier"); //SMPTE 384M
- Skip_B1( "System Element Identifier"); //SMPTE 384M
- Skip_B1( "Reserved");
- break;
- case 0x02 :
- {
- Param_Info1("Compressed Picture Coding");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x01 :
- {
- Param_Info1("MPEG Compression");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x01 :
- Param_Info1("MPEG-2 MP@ML");
- Skip_B2( "Unknown");
- break;
- case 0x02 :
- Param_Info1("MPEG-2 422P@ML");
- Skip_B2( "Unknown");
- break;
- case 0x03 :
- Param_Info1("MPEG-2 MP@HL");
- Skip_B2( "Unknown");
- break;
- case 0x04 :
- Param_Info1("MPEG-2 422P@HL");
- Skip_B2( "Unknown");
- break;
- case 0x10 :
- Param_Info1("MPEG-1");
- Skip_B2( "Unknown");
- break;
- case 0x20 :
- Param_Info1("MPEG-4 Visual");
- Skip_B2( "Unknown");
- break;
- case 0x32 :
- Param_Info1("AVC");
- Skip_B2( "Unknown");
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("DV Video Compression");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x02 :
- Param_Info1("DV-Based Compression");
- Info_B1(Code7, "DV type (SMPTE 383)");
- Info_B1(Code8, "Mapping Kind"); Param_Info1(Mxf_EssenceContainer_Mapping(Code6, Code7, Code8));
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- case 0x03 :
- {
- Param_Info1("Individual Picture Coding Schemes");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x01 :
- Param_Info1("JPEG 2000");
- Skip_B1( "Unused");
- Skip_B1( "Unused");
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- case 0x71 :
- {
- Param_Info1("VC-3");
- Skip_B1( "Variant");
- Skip_B1( "Unused");
- Skip_B1( "Unused");
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("Sound essence");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x01 :
- Skip_B5( "Sound coding or compression");
- break;
- case 0x02 :
- {
- Param_Info1("Sound Coding Characteristics");
- Info_B1(Code4, "Code (4)");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("Uncompressed Sound Coding");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x7E :
- {
- Param_Info1("PCM (AIFF)");
- Skip_B3( "Reserved");
- }
- break;
- case 0x7F :
- {
- Param_Info1("Undefined");
- Skip_B3( "Reserved");
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("Compressed Sound Coding");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x03 :
- {
- Param_Info1("Compressed Audio Coding");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x01 :
- {
- Param_Info1("Compandeded Audio Coding");
- Info_B1(Code7, "Code (7)");
- switch (Code7)
- {
- case 0x01 :
- Param_Info1("A-law Coded Audio (default)");
- Skip_B1("Unknown");
- break;
- case 0x02 :
- Param_Info1("DV Compressed Audio");
- Skip_B1("Unknown");
- break;
- default :
- Skip_B2("Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("SMPTE 338M Audio Coding");
- Info_B1(Code7, "Code (7)");
- switch (Code7)
- {
- case 0x01 :
- Param_Info1("AC-3");
- Skip_B1("Unknown");
- break;
- case 0x04 :
- Param_Info1("MPEG-1 Audio Layer 1");
- Skip_B1("Unknown");
- break;
- case 0x05 :
- Param_Info1("MPEG-1 Audio Layer 2");
- Skip_B1("Unknown");
- break;
- case 0x06 :
- Param_Info1("MPEG-2 Audio Layer 1");
- Skip_B1("Unknown");
- break;
- case 0x1C :
- Param_Info1("Dolby E");
- Skip_B1("Unknown");
- break;
- default :
- Skip_B2("Unknown");
- }
- }
- break;
- case 0x03 :
- {
- Param_Info1("MPEG-2 Coding (not defined in SMPTE 338M)");
- Info_B1(Code7, "Code (7)");
- switch (Code7)
- {
- case 0x01 :
- Param_Info1("AAC version 2");
- Skip_B1("Unknown");
- break;
- default :
- Skip_B2("Unknown");
- }
- }
- break;
- case 0x04 :
- {
- Param_Info1("MPEG-4 Audio Coding");
- Info_B1(Code7, "Code (7)");
- switch (Code7)
- {
- case 0x01 :
- Param_Info1("MPEG-4 Speech Profile");
- Skip_B1("Unknown");
- break;
- case 0x02 :
- Param_Info1("MPEG-4 Synthesis Profile");
- Skip_B1("Unknown");
- break;
- case 0x03 :
- Param_Info1("MPEG-4 Scalable Profile");
- Skip_B1("Unknown");
- break;
- case 0x04 :
- Param_Info1("MPEG-4 Main Profile");
- Skip_B1("Unknown");
- break;
- case 0x05 :
- Param_Info1("MPEG-4 High Quality Audio Profile");
- Skip_B1("Unknown");
- break;
- case 0x06 :
- Param_Info1("MPEG-4 Low Delay Audio Profile");
- Skip_B1("Unknown");
- break;
- case 0x07 :
- Param_Info1("MPEG-4 Natural Audio Profile");
- Skip_B1("Unknown");
- break;
- case 0x08 :
- Param_Info1("MPEG-4 Mobile Audio Internetworking Profile");
- Skip_B1("Unknown");
- break;
- default :
- Skip_B1("Unknown");
- }
- }
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- case 0x10 :
- {
- Param_Info1("Sound Channel Labeling");
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x03 :
- {
- Param_Info1("Sound Channel Labeling SMPTE 429-2");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x01 :
- {
- Param_Info1("Sound Channel Labeling SMPTE 429-2 Sets");
- Info_B1(Code7, "Code (7)");
- switch (Code7)
- {
- case 0x01 :
- Param_Info1("SMPTE-429-2 Channel Configuration 1");
- Skip_B1("Reserved");
- break;
- default :
- Skip_B1("Unknown");
- }
- }
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- case 0x04 :
- {
- Param_Info1("Sound Channel Labeling SMPTE 2067-2");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x01 :
- {
- Param_Info1("MXF Multichannel Audio Framework");
- Skip_B2( "Reserved");
- }
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- default :
- Skip_B6( "Unknown");
- }
- }
- break;
- case 0x0D :
- {
- Param_Info1("User Organisation Registered For Public Use");
- Info_B1(Code2, "Organization");
- switch (Code2)
- {
- case 0x01 :
- {
- Param_Info1("AAF");
- Info_B1(Code3, "Application");
- switch (Code3)
- {
- case 0x02 :
- {
- Param_Info1("Operational Patterns");
- Info_B1(Code4, "Version");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("Version 1");
- Info_B1(Code5, "Item Complexity");
- Info_B1(Code6, "Package Complexity");
- Info_B1(Code7, "Qualifier");
- Skip_Flags(Code7, 3, "uni/multi-track");
- Skip_Flags(Code7, 2, "stream/non-stream file");
- Skip_Flags(Code7, 1, "internal/external essence");
- Info_B1(Code8, "Reserved");
- }
- break;
- case 0x02 :
- {
- Info_B1(Code5, "Code (5)");
- switch (Code5)
- {
- case 0x01 :
- Skip_B3( "Essence container kind");
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- case 0x03 :
- {
- Param_Info1("Essence Container Application");
- Info_B1(Code4, "Structure Version");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("MXF EC Structure Version 1");
- Info_B1(Code5, "Essence container Kind");
- switch (Code5)
- {
- case 0x01 :
- Param_Info1("Deprecated Essence Container Kind");
- Skip_B3( "Unknown");
- break;
- case 0x02 :
- {
- Param_Info1("Essence Container Kind");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x01 : //SMPTE 386M
- {
- Param_Info1("Type D-10 Mapping");
- Skip_B1( "MPEG Constraints"); //SMPTE 356M
- Skip_B1( "Template Extension");
- }
- break;
- case 0x02 :
- {
- Param_Info1("DV Mappings");
- Skip_B1( "Mapping Kind");
- Skip_B1( "Locally defined");
- }
- break;
- case 0x03 :
- {
- Param_Info1("Type D-11 Mapping");
- Skip_B1( "Mapping Kind");
- Skip_B1( "Locally defined");
- }
- break;
- case 0x04 :
- {
- Param_Info1("MPEG ES mappings");
- Info_B1(Code7, "ISO13818-1 stream_id bits 6..0"); Param_Info1(Ztring::ToZtring(0x80+Code7, 16));
- Info_B1(Code8, "Mapping Kind"); Param_Info1(Mxf_EssenceContainer_Mapping(Code6, Code7, Code8));
- }
- break;
- case 0x05 : //SMPTE 384M
- {
- Param_Info1("Uncompressed Pictures");
- Info_B1(Code7, "Number of lines / field rate combination"); //SMPTE 384M
- Info_B1(Code8, "Mapping Kind"); Param_Info1(Mxf_EssenceContainer_Mapping(Code6, Code7, Code8));
- }
- break;
- case 0x06 :
- {
- Param_Info1("AES-BWF");
- Info_B1(Code7, "Mapping Kind"); Param_Info1(Mxf_EssenceContainer_Mapping(Code6, Code7, 0x00));
- Skip_B1( "Locally defined");
- }
- break;
- case 0x07 :
- {
- Param_Info1("MPEG PES mappings");
- Info_B1(Code7, "ISO13818-1 stream_id bits 6..0"); Param_Info1(Ztring::ToZtring(0x80+Code7, 16));
- Info_B1(Code8, "Mapping Kind"); Param_Info1(Mxf_EssenceContainer_Mapping(Code6, Code7, Code8));
- }
- break;
- case 0x08 :
- {
- Param_Info1("MPEG PS mappings");
- Info_B1(Code7, "ISO13818-1 stream_id bits 6..0"); Param_Info1(Ztring::ToZtring(0x80+Code7, 16));
- Info_B1(Code8, "Mapping Kind"); Param_Info1(Mxf_EssenceContainer_Mapping(Code6, Code7, Code8));
- }
- break;
- case 0x09 :
- {
- Param_Info1("MPEG TS mappings");
- Info_B1(Code7, "ISO13818-1 stream_id bits 6..0"); Param_Info1(Ztring::ToZtring(0x80+Code7, 16));
- Info_B1(Code8, "Mapping Kind"); Param_Info1(Mxf_EssenceContainer_Mapping(Code6, Code7, Code8));
- }
- break;
- case 0x0A :
- {
- Param_Info1("A-law Sound Element Mapping");
- Info_B1(Code7, "Mapping Kind"); Param_Info1(Mxf_EssenceContainer_Mapping(Code6, Code7, 0xFF));
- Skip_B1( "Locally defined");
- }
- break;
- case 0x0B :
- {
- Param_Info1("Encrypted Generic Container");
- Skip_B1( "Mapping Kind");
- Skip_B1( "Locally defined");
- }
- break;
- case 0x0C :
- {
- Param_Info1("JPEG 2000 Picture Mapping");
- Skip_B1( "Mapping Kind");
- Skip_B1( "Locally defined");
- }
- break;
- case 0x11 :
- {
- Param_Info1("VC-3 Picture Element");
- Info_B1(Code7, "Content Kind"); Param_Info1(Mxf_EssenceContainer_Mapping(Code6, Code7, 0xFF));
- Skip_B1( "Reserved");
- }
- break;
- case 0x13 :
- {
- Param_Info1("Timed Text");
- Skip_B1( "Reserved");
- Skip_B1( "Reserved");
- }
- break;
- case 0x16 :
- {
- Param_Info1("AVC Picture Element");
- Skip_B1( "Unknown");
- Skip_B1( "Unknown");
- }
- break;
- case 0x7F :
- {
- Param_Info1("Generic Essence Container Wrapping");
- Skip_B1( "Mapping Kind");
- Skip_B1( "Locally defined");
- }
- break;
- default :
- {
- Skip_B1( "Mapping Kind");
- Skip_B1( "Locally defined");
- }
- }
- }
- break;
- default :
- Skip_B1( "Essence container Kind");
- Skip_B1( "Mapping Kind");
- Skip_B1( "Locally defined");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- case 0x04 :
- {
- Param_Info1("MXF / AAF compatible Descriptive Metadata Labels");
- Info_B1(Code4, "Label Version");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("Version 1");
- Info_B1(Code5, "Scheme Kind");
- Info_B1(Code6, "Reserved");
- Info_B1(Code7, "Reserved");
- Info_B1(Code8, "Reserved");
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- case 0x02 :
- {
- Param_Info1("EBU/UER");
- Skip_B6( "Unknown");
- }
- break;
- case 0x03 :
- {
- Param_Info1("Pro-MPEG Forum");
- Skip_B6( "Unknown");
- }
- break;
- case 0x04 :
- {
- Param_Info1("BBC");
- Skip_B6( "Unknown");
- }
- break;
- case 0x05 :
- {
- Param_Info1("IRT");
- Skip_B6( "Unknown");
- }
- break;
- case 0x06 :
- {
- Param_Info1("ARIB");
- Skip_B6( "Unknown");
- }
- break;
- default :
- Skip_B6( "Unknown");
- }
- }
- break;
- case 0x0E :
- {
- Param_Info1("User Organisation Registered For Private Use");
- Info_B1(Code2, "Code (2)");
- switch (Code2)
- {
- case 0x04 :
- {
- Param_Info1("Avid");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x02 :
- {
- Param_Info1("Essence Compression?");
- Info_B1(Code4, "?");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("?");
- Info_B1(Code5, "?");
- switch (Code5)
- {
- case 0x02 :
- {
- Param_Info1("?");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x04 :
- Param_Info1("VC-3");
- Skip_B2( "Unknown");
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- case 0x03 :
- {
- Param_Info1("Essence Container Application");
- Info_B1(Code4, "Structure Version");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("MXF EC Structure Version 1");
- Info_B1(Code5, "Essence container Kind");
- switch (Code5)
- {
- case 0x02 :
- {
- Param_Info1("Essence Container Kind");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x06 :
- Param_Info1("VC-3");
- Skip_B2( "Unknown");
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Unknown");
- }
- }
- break;
- case 0x06 :
- {
- Param_Info1("Sony");
- Info_B1(Code3, "Code (3)");
- switch (Code3)
- {
- case 0x04 :
- {
- Param_Info1("Essence Compression?");
- Info_B1(Code4, "?");
- switch (Code4)
- {
- case 0x01 :
- {
- Param_Info1("?");
- Info_B1(Code5, "?");
- switch (Code5)
- {
- case 0x02 :
- {
- Param_Info1("?");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x04 :
- {
- Param_Info1("?");
- Info_B1(Code7, "Code (7)");
- switch (Code7)
- {
- case 0x02 :
- Param_Info1("?");
- Info_B1(Code8, "Code (8)");
- switch (Code8)
- {
- case 0x01 :
- Param_Info1("RAW SQ");
- break;
- default :
- ;
- }
- break;
- default :
- Skip_B1( "Unknown");
- }
- }
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- case 0x0D :
- {
- Param_Info1("Essence Container?");
- Info_B1(Code4, "?");
- switch (Code4)
- {
- case 0x03 :
- {
- Param_Info1("?");
- Info_B1(Code5, "?");
- switch (Code5)
- {
- case 0x02 :
- {
- Param_Info1("?");
- Info_B1(Code6, "Code (6)");
- switch (Code6)
- {
- case 0x01 :
- {
- Param_Info1("?");
- Info_B1(Code7, "Code (7)");
- switch (Code7)
- {
- case 0x01 :
- Param_Info1("RAW?");
- Skip_B1( "Unknown");
- break;
- default :
- Skip_B1( "Unknown");
- }
- }
- break;
- default :
- Skip_B2( "Unknown");
- }
- }
- break;
- default :
- Skip_B3( "Unknown");
- }
- }
- break;
- default :
- Skip_B4( "Unknown");
- }
- }
- break;
- default :
- Skip_B5( "Private");
- }
- }
- break;
- default :
- Skip_B6( "Private");
- }
- }
- break;
- default :
- Skip_B7( "Unknown");
- }
-}
-#endif //MEDIAINFO_TRACE
-
-//---------------------------------------------------------------------------
-void File_Mxf::Skip_UL(const char* Name)
-{
- #ifdef MEDIAINFO_MINIMIZE_SIZE
- Skip_UUID();
- #else
- int128u Value;
- Get_UL(Value, Name, NULL);
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Get_UMID(int256u &Value, const char* Name)
-{
- Element_Name(Name);
-
- //Parsing
- Get_UUID (Value.hi, "Fixed");
- Get_UUID (Value.lo, "UUID"); Element_Info1(Ztring().From_UUID(Value.lo));
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Skip_UMID()
-{
- //Parsing
- Skip_UUID( "Fixed");
- Info_UUID(Data, "UUID"); Element_Info1(Ztring().From_UUID(Data));
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Get_Timestamp(Ztring &Value)
-{
- //Parsing
- int16u Year;
- int8u Month, Day, Hours, Minutes, Seconds, Milliseconds;
- Get_B2 (Year, "Year");
- Get_B1 (Month, "Month");
- Get_B1 (Day, "Day");
- Get_B1 (Hours, "Hours");
- Get_B1 (Minutes, "Minutes");
- Get_B1 (Seconds, "Seconds");
- Get_B1 (Milliseconds, "Milliseconds/4"); Param_Info2(Milliseconds*4, " ms");
- Value.From_Number(Year);
- Value+=__T('-');
- Ztring Temp;
- Temp.From_Number(Month);
- if (Temp.size()<2)
- Temp.insert(0, 1, __T('0'));
- Value+=Temp;
- Value+=__T('-');
- Temp.From_Number(Day);
- if (Temp.size()<2)
- Temp.insert(0, 1, __T('0'));
- Value+=Temp;
- Value+=__T(' ');
- Temp.From_Number(Hours);
- if (Temp.size()<2)
- Temp.insert(0, 1, __T('0'));
- Value+=Temp;
- Value+=__T(':');
- Temp.From_Number(Minutes);
- if (Temp.size()<2)
- Temp.insert(0, 1, __T('0'));
- Value+=Temp;
- Value+=__T(':');
- Temp.From_Number(Seconds);
- if (Temp.size()<2)
- Temp.insert(0, 1, __T('0'));
- Value+=Temp;
- Value+=__T('.');
- Temp.From_Number(Milliseconds*4);
- if (Temp.size()<3)
- Temp.insert(0, 3-Temp.size(), __T('0'));
- Value+=Temp;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Skip_Timestamp()
-{
- //Parsing
- Skip_B2( "Year");
- Skip_B1( "Month");
- Skip_B1( "Day");
- Skip_B1( "Hours");
- Skip_B1( "Minutes");
- Skip_B1( "Seconds");
- Info_B1(Milliseconds, "Milliseconds/4"); Param_Info2(Milliseconds*4, " ms");
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Info_Timestamp()
-{
- //Parsing
- Info_B2(Year, "Year");
- Info_B1(Month, "Month");
- Info_B1(Day, "Day");
- Info_B1(Hours, "Hours");
- Info_B1(Minutes, "Minutes");
- Info_B1(Seconds, "Seconds");
- Info_B1(Milliseconds, "Milliseconds/4"); Param_Info2(Milliseconds*4, " ms");
- Element_Info1(Ztring::ToZtring(Year )+__T('-')+
- Ztring::ToZtring(Month )+__T('-')+
- Ztring::ToZtring(Day )+__T(' ')+
- Ztring::ToZtring(Hours )+__T(':')+
- Ztring::ToZtring(Minutes )+__T(':')+
- Ztring::ToZtring(Seconds )+__T('.')+
- Ztring::ToZtring(Milliseconds*4) );
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::Get_BER(int64u &Value, const char* Name)
-{
- int8u Length;
- Get_B1(Length, Name);
- if (Length<0x80)
- {
- Value=Length; //1-byte
- return;
- }
-
- Length&=0x7F;
- switch (Length)
- {
- case 1 :
- {
- int8u Length1;
- Get_B1(Length1, Name);
- Value=Length1;
- break;
- }
- case 2 :
- {
- int16u Length2;
- Get_B2(Length2, Name);
- Value=Length2;
- break;
- }
- case 3 :
- {
- int32u Length3;
- Get_B3(Length3, Name);
- Value=Length3;
- break;
- }
- case 4 :
- {
- int32u Length4;
- Get_B4(Length4, Name);
- Value=Length4;
- break;
- }
- case 5 :
- {
- int64u Length5;
- Get_B5(Length5, Name);
- Value=Length5;
- break;
- }
- case 6 :
- {
- int64u Length6;
- Get_B6(Length6, Name);
- Value=Length6;
- break;
- }
- case 7 :
- {
- int64u Length7;
- Get_B7(Length7, Name);
- Value=Length7;
- break;
- }
- case 8 :
- {
- int64u Length8;
- Get_B8(Length8, Name);
- Value=Length8;
- break;
- }
- default:Value=(int64u)-1; //Problem
- }
-}
-
-//***************************************************************************
-// Parsers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- if ((Descriptor->second.EssenceCompression.hi&0xFFFFFFFFFFFFFF00LL)!=0x060E2B3404010100LL || (Descriptor->second.EssenceCompression.lo&0xFF00000000000000LL)!=0x0400000000000000LL)
- return ChooseParser__FromEssenceContainer (Essence, Descriptor);
-
- int8u Code2=(int8u)((Descriptor->second.EssenceCompression.lo&0x00FF000000000000LL)>>48);
- int8u Code3=(int8u)((Descriptor->second.EssenceCompression.lo&0x0000FF0000000000LL)>>40);
- int8u Code4=(int8u)((Descriptor->second.EssenceCompression.lo&0x000000FF00000000LL)>>32);
- int8u Code5=(int8u)((Descriptor->second.EssenceCompression.lo&0x00000000FF000000LL)>>24);
- int8u Code6=(int8u)((Descriptor->second.EssenceCompression.lo&0x0000000000FF0000LL)>>16);
- int8u Code7=(int8u)((Descriptor->second.EssenceCompression.lo&0x000000000000FF00LL)>> 8);
-
- switch (Code2)
- {
- case 0x01 : //Picture
- switch (Code3)
- {
- case 0x02 : //Coding characteristics
- switch (Code4)
- {
- case 0x01 : //Uncompressed Picture Coding
- switch (Code5)
- {
- case 0x01 : return ChooseParser_Raw(Essence, Descriptor);
- case 0x7F : return ChooseParser_RV24(Essence, Descriptor);
- default : return;
- }
- case 0x02 : //Compressed coding
- switch (Code5)
- {
- case 0x01 : //MPEG Compression
- switch (Code6)
- {
- case 0x01 :
- case 0x02 :
- case 0x03 :
- case 0x04 :
- case 0x11 : return ChooseParser_Mpegv(Essence, Descriptor);
- case 0x20 : return ChooseParser_Mpeg4v(Essence, Descriptor);
- case 0x30 :
- case 0x31 :
- case 0x32 :
- case 0x33 :
- case 0x34 :
- case 0x35 :
- case 0x36 :
- case 0x37 :
- case 0x38 :
- case 0x39 :
- case 0x3A :
- case 0x3B :
- case 0x3C :
- case 0x3D :
- case 0x3E :
- case 0x3F : return ChooseParser_Avc(Essence, Descriptor);
- default : return;
- }
- case 0x02 : return ChooseParser_DV(Essence, Descriptor);
- case 0x03 : //Individual Picture Coding Schemes
- switch (Code6)
- {
- case 0x01 : return ChooseParser_Jpeg2000(Essence, Descriptor);
- default : return;
- }
- case 0x71 : return ChooseParser_Vc3(Essence, Descriptor);
- default : return;
- }
- default : return;
- }
- default : return;
- }
- case 0x02 : //Sound
- switch (Code3)
- {
- case 0x02 : //Coding characteristics
- switch (Code4)
- {
- case 0x01 : //Uncompressed Sound Coding
- ChooseParser__FromEssenceContainer (Essence, Descriptor); //e.g. for D-10 Audio
- if (!Essence->second.Parsers.empty())
- return;
- switch (Code5)
- {
- case 0x01 :
- case 0x7F : if (Descriptor->second.ChannelCount==1) //PCM, but one file is found with Dolby E in it
- ChooseParser_ChannelGrouping(Essence, Descriptor);
- if (Descriptor->second.ChannelCount==2) //PCM, but one file is found with Dolby E in it
- ChooseParser_SmpteSt0337(Essence, Descriptor);
- default : return ChooseParser_Pcm(Essence, Descriptor);
- }
- case 0x02 : //Compressed coding
- switch (Code5)
- {
- case 0x03 : //Compressed Audio Coding
- switch (Code6)
- {
- case 0x01 : //Compandeded Audio Coding
- switch (Code7)
- {
- case 0x01 : if ((Descriptor->second.EssenceContainer.lo&0xFFFF0000)==0x02060000) //Test coherency between container and compression
- return ChooseParser_Pcm(Essence, Descriptor); //Compression is A-Law but Container is PCM, not logic, prioritizing PCM
- else
- return ChooseParser_Alaw(Essence, Descriptor);
- case 0x10 : return ChooseParser_Pcm(Essence, Descriptor); //DV 12-bit
- default : return;
- }
- case 0x02 : //SMPTE 338M Audio Coding
- switch (Code7)
- {
- case 0x01 : if (Descriptor->second.IsAes3Descriptor)
- return ChooseParser_SmpteSt0337(Essence, Descriptor);
- else
- return ChooseParser_Ac3(Essence, Descriptor);
- case 0x04 :
- case 0x05 :
- case 0x06 : if (Descriptor->second.IsAes3Descriptor)
- return ChooseParser_SmpteSt0337(Essence, Descriptor);
- else
- return ChooseParser_Mpega(Essence, Descriptor);
- case 0x1C : if (Descriptor->second.ChannelCount==1)
- return ChooseParser_ChannelGrouping(Essence, Descriptor); //Dolby E (in 2 mono streams)
- else
- return ChooseParser_SmpteSt0337(Essence, Descriptor); //Dolby E (in 1 stereo streams)
- default : return;
- }
- case 0x03 : //MPEG-2 Coding (not defined in SMPTE 338M)
- switch (Code7)
- {
- case 0x01 : return ChooseParser_Aac(Essence, Descriptor);
- default : return;
- }
- case 0x04 : //MPEG-4 Audio Coding
- switch (Code7)
- {
- case 0x01 :
- case 0x02 :
- case 0x03 :
- case 0x04 :
- case 0x05 :
- case 0x06 :
- case 0x07 :
- case 0x08 : return ChooseParser_Aac(Essence, Descriptor);
- default : return;
- }
- default : return;
- }
- default : return;
- }
- default : return;
- }
- default : return;
- }
- default : return;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser__FromEssenceContainer(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int8u Code1=(int8u)((Descriptor->second.EssenceContainer.lo&0xFF00000000000000LL)>>56);
- int8u Code2=(int8u)((Descriptor->second.EssenceContainer.lo&0x00FF000000000000LL)>>48);
- int8u Code3=(int8u)((Descriptor->second.EssenceContainer.lo&0x0000FF0000000000LL)>>40);
- int8u Code4=(int8u)((Descriptor->second.EssenceContainer.lo&0x000000FF00000000LL)>>32);
- int8u Code5=(int8u)((Descriptor->second.EssenceContainer.lo&0x00000000FF000000LL)>>24);
- int8u Code6=(int8u)((Descriptor->second.EssenceContainer.lo&0x0000000000FF0000LL)>>16);
- //int8u Code7=(int8u)((Descriptor->second.EssenceContainer.lo&0x000000000000FF00LL)>> 8);
-
- switch (Code1)
- {
- case 0x0D : //Public Use
- switch (Code2)
- {
- case 0x01 : //AAF
- switch (Code3)
- {
- case 0x03 : //Essence Container Application
- switch (Code4)
- {
- case 0x01 : //MXF EC Structure version
- switch (Code5)
- {
- case 0x02 : //Essence container kind
- switch (Code6)
- {
- case 0x01 : switch(Descriptor->second.StreamKind)
- {
- case Stream_Video : return ChooseParser_Mpegv(Essence, Descriptor);
- case Stream_Audio : return ChooseParser_SmpteSt0331(Essence, Descriptor);
- default : return;
- }
- case 0x02 : return; //DV
- case 0x05 : return ChooseParser_Raw(Essence, Descriptor);
- case 0x06 : if (Descriptor->second.ChannelCount==1) //PCM, but one file is found with Dolby E in it
- ChooseParser_ChannelGrouping(Essence, Descriptor);
- if (Descriptor->second.ChannelCount==2) //PCM, but one file is found with Dolby E in it
- ChooseParser_SmpteSt0337(Essence, Descriptor);
- return ChooseParser_Pcm(Essence, Descriptor);
- case 0x04 : return; //MPEG ES mappings with Stream ID
- case 0x0A : return ChooseParser_Alaw(Essence, Descriptor);
- case 0x0C : return ChooseParser_Jpeg2000(Essence, Descriptor);
- case 0x10 : return ChooseParser_Avc(Essence, Descriptor);
- case 0x11 : return ChooseParser_Vc3(Essence, Descriptor);
- case 0x13 : return ChooseParser_TimedText(Essence, Descriptor);
- default : return;
- }
- default : return;
- }
- default : return;
- }
- default : return;
- }
- default : return;
- }
- case 0x0E : //Private Use
- switch (Code2)
- {
- case 0x04 : //Avid
- switch (Code3)
- {
- case 0x03 : //Essence Container Application
- switch (Code4)
- {
- case 0x01 : //MXF EC Structure version
- switch (Code5)
- {
- case 0x02 : //Essence container kind
- switch (Code6)
- {
- case 0x06 : return ChooseParser_Vc3(Essence, Descriptor);
- default : return;
- }
- default : return;
- }
- default : return;
- }
- default : return;
- }
- default : return;
- }
- default : return;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser__FromEssence(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int32u Code_Compare3=Code.lo>>32;
-
- switch (Code_Compare3)
- {
- case Elements::GenericContainer_Aaf3 : return ChooseParser__Aaf(Essence, Descriptor);
- case Elements::GenericContainer_Avid3 : return ChooseParser__Avid(Essence, Descriptor);
- case Elements::GenericContainer_Sony3 : return ChooseParser__Sony(Essence, Descriptor);
- default : return;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser__Aaf(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int32u Code_Compare4=(int32u)Code.lo;
- int8u Code_Compare4_1=Code_Compare4>>24;
-
- switch (Code_Compare4_1)
- {
- case 0x05 : //CP Picture
- ChooseParser__Aaf_CP_Picture(Essence, Descriptor);
- break;
- case 0x06 : //CP Sound
- ChooseParser__Aaf_CP_Sound(Essence, Descriptor);
- break;
- case 0x07 : //CP Data
- ChooseParser__Aaf_CP_Data(Essence, Descriptor);
- break;
- case 0x14 : //MXF in MXF?
- ChooseParser__Aaf_14(Essence, Descriptor);
- break;
- case 0x15 : //CP Picture
- ChooseParser__Aaf_GC_Picture(Essence, Descriptor);
- break;
- case 0x16 : //CP Sound
- ChooseParser__Aaf_GC_Sound(Essence, Descriptor);
- break;
- case 0x17 : //CP Data
- ChooseParser__Aaf_GC_Data(Essence, Descriptor);
- break;
- case 0x18 : //CP Compound
- ChooseParser__Aaf_GC_Compound(Essence, Descriptor);
- break;
- default : //Unknown
- ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser__Avid(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int32u Code_Compare4=(int32u)Code.lo;
- int8u Code_Compare4_1=Code_Compare4>>24;
-
- switch (Code_Compare4_1)
- {
- case 0x15 : //CP Picture
- ChooseParser__Avid_Picture(Essence, Descriptor);
- break;
- default : //Unknown
- ;
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x05, SMPTE 386M
-void File_Mxf::ChooseParser__Aaf_CP_Picture(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int32u Code_Compare4=(int32u)Code.lo;
- int8u Code_Compare4_3=(int8u)(Code_Compare4>>8);
-
- Essences[Code_Compare4].StreamKind=Stream_Video;
- Essences[Code_Compare4].StreamPos=Code_Compare4&0x000000FF;
-
- switch (Code_Compare4_3)
- {
- case 0x01 : //D-10 Video, SMPTE 386M
- ChooseParser_Mpegv(Essence, Descriptor);
- break;
- default : //Unknown
- ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser__Sony(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int32u Code_Compare4=(int32u)Code.lo;
- int8u Code_Compare4_1=Code_Compare4>>24;
-
- switch (Code_Compare4_1)
- {
- case 0x15 : //CP Picture
- ChooseParser__Sony_Picture(Essence, Descriptor);
- break;
- default : //Unknown
- ;
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x06, SMPTE 386M
-void File_Mxf::ChooseParser__Aaf_CP_Sound(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int32u Code_Compare4=(int32u)Code.lo;
- int8u Code_Compare4_3=(int8u)(Code_Compare4>>8);
-
- Essences[Code_Compare4].StreamKind=Stream_Audio;
- Essences[Code_Compare4].StreamPos=Code_Compare4&0x000000FF;
-
- switch (Code_Compare4_3)
- {
- case 0x10 : //D-10 Audio, SMPTE 386M
- ChooseParser_SmpteSt0331(Essence, Descriptor);
- break;
- default : //Unknown
- ;
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x07, SMPTE 386M
-void File_Mxf::ChooseParser__Aaf_CP_Data(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
-}
-
-//---------------------------------------------------------------------------
-// 0x14
-void File_Mxf::ChooseParser__Aaf_14(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int32u Code_Compare4=(int32u)Code.lo;
- int8u Code_Compare4_3=(int8u)(Code_Compare4>>8);
-
- switch (Code_Compare4_3)
- {
- case 0x01 : //MXF in MXF?
- Essence->second.Parsers.push_back(new File_Mxf());
- break;
- default : ;
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x15
-void File_Mxf::ChooseParser__Aaf_GC_Picture(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int32u Code_Compare4=(int32u)Code.lo;
- int8u Code_Compare4_3=(int8u)(Code_Compare4>>8);
-
- Essences[Code_Compare4].StreamKind=Stream_Video;
- Essences[Code_Compare4].StreamPos=Code_Compare4&0x000000FF;
-
- switch (Code_Compare4_3)
- {
- case 0x01 : //RV24
- ChooseParser_RV24(Essence, Descriptor);
- break;
- case 0x02 : //Raw video
- ChooseParser_Raw(Essence, Descriptor);
- break;
- case 0x05 : //SMPTE 381M, Frame wrapped
- ChooseParser_Mpegv(Essence, Descriptor); //Trying...
- Essences[Code_Compare4].Infos["Format_Settings_Wrapping"]=__T("Frame");
- DataMustAlwaysBeComplete=true;
- break;
- case 0x06 : //SMPTE 381M, Clip wrapped
- ChooseParser_Mpegv(Essence, Descriptor); //Trying...
- Essences[Code_Compare4].Infos["Format_Settings_Wrapping"]=__T("Clip");
- break;
- case 0x07 : //SMPTE 381M, Custom wrapped
- ChooseParser_Mpegv(Essence, Descriptor); //Trying...
- Essences[Code_Compare4].Infos["Format_Settings_Wrapping"]=__T("Custom");
- break;
- case 0x08 : //JPEG 2000
- ChooseParser_Jpeg2000(Essence, Descriptor);
- break;
- case 0x0D : //VC-3
- ChooseParser_Vc3(Essence, Descriptor);
- break;
- default : //Unknown
- ;
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x16
-void File_Mxf::ChooseParser__Aaf_GC_Sound(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int32u Code_Compare4=(int32u)Code.lo;
- int8u Code_Compare4_3=(int8u)(Code_Compare4>>8);
-
- Essences[Code_Compare4].StreamKind=Stream_Audio;
- Essences[Code_Compare4].StreamPos=Code_Compare4&0x000000FF;
-
- switch (Code_Compare4_3)
- {
- case 0x01 : //BWF (PCM)
- case 0x02 : //BWF (PCM)
- case 0x03 : //DV Audio (PCM)
- case 0x04 : //P2 Audio (PCM)
- ChooseParser_Pcm(Essence, Descriptor);
- break;
- case 0x05 : //MPEG Audio
- ChooseParser_Mpega(Essence, Descriptor);
- break;
- case 0x08 : //A-law, Frame wrapped
- ChooseParser_Alaw(Essence, Descriptor);
- Essences[Code_Compare4].Infos["Format_Settings_Wrapping"]=__T("Frame");
- DataMustAlwaysBeComplete=true;
- break;
- case 0x09 : //A-law, Clip wrapped
- ChooseParser_Alaw(Essence, Descriptor);
- Essences[Code_Compare4].Infos["Format_Settings_Wrapping"]=__T("Clip");
- break;
- case 0x0A : //A-law, Custom wrapped
- ChooseParser_Alaw(Essence, Descriptor);
- Essences[Code_Compare4].Infos["Format_Settings_Wrapping"]=__T("Custom");
- break;
- default : //Unknown
- ;
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x17
-void File_Mxf::ChooseParser__Aaf_GC_Data(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int32u Code_Compare4=(int32u)Code.lo;
- int8u Code_Compare4_3=(int8u)(Code_Compare4>>8);
-
- switch (Code_Compare4_3)
- {
- case 0x01 : //VBI, SMPTE ST 436
- Essence->second.Parsers.push_back(new File__Analyze());
- break;
- case 0x02 : //Ancillary
- #if defined(MEDIAINFO_ANCILLARY_YES)
- if (!Ancillary)
- Ancillary=new File_Ancillary();
- Essence->second.Parsers.push_back(Ancillary);
- Ancillary_IsBinded=true;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
- break;
- case 0x08 : //Line Wrapped Data Element, SMPTE 384M
- case 0x09 : //Line Wrapped VANC Data Element, SMPTE 384M
- case 0x0A : //Line Wrapped HANC Data Element, SMPTE 384M
- break;
- case 0x0B : //Timed Text
- ChooseParser_TimedText(Essence, Descriptor);
- break;
- default : //Unknown
- ;
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x18
-void File_Mxf::ChooseParser__Aaf_GC_Compound(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int32u Code_Compare4=(int32u)Code.lo;
- int8u Code_Compare4_3=(int8u)(Code_Compare4>>8);
-
- Essences[Code_Compare4].StreamKind=Stream_Video; //Default to video, audio will be merge later
- Essences[Code_Compare4].StreamPos=Code_Compare4&0x000000FF;
-
- switch (Code_Compare4_3)
- {
- case 0x01 : //DV
- case 0x02 : //DV
- ChooseParser_DV(Essence, Descriptor);
- break;
- default : //Unknown
- ;
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x15
-void File_Mxf::ChooseParser__Avid_Picture(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int32u Code_Compare4=(int32u)Code.lo;
- int8u Code_Compare4_3=(int8u)(Code_Compare4>>8);
-
- Essences[Code_Compare4].StreamKind=Stream_Video;
- Essences[Code_Compare4].StreamPos=Code_Compare4&0x000000FF;
-
- switch (Code_Compare4_3)
- {
- case 0x05 : //VC-1, Frame wrapped
- ChooseParser_Vc3(Essence, Descriptor);
- Essences[Code_Compare4].Infos["Format_Settings_Wrapping"]=__T("Frame");
- DataMustAlwaysBeComplete=true;
- break;
- case 0x06 : //VC-1, Clip wrapped
- ChooseParser_Vc3(Essence, Descriptor);
- Essences[Code_Compare4].Infos["Format_Settings_Wrapping"]=__T("Clip");
- break;
- case 0x07 : //VC-1, Custom wrapped
- ChooseParser_Vc3(Essence, Descriptor);
- Essences[Code_Compare4].Infos["Format_Settings_Wrapping"]=__T("Custom");
- break;
- default : //Unknown
- ;
- }
-}
-
-//---------------------------------------------------------------------------
-// 0x15
-void File_Mxf::ChooseParser__Sony_Picture(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- int32u Code_Compare4=(int32u)Code.lo;
-
- Essences[Code_Compare4].StreamKind=Stream_Video;
- Essences[Code_Compare4].StreamPos=Code_Compare4&0x000000FF;
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_Avc(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Video;
-
- //Filling
- #if defined(MEDIAINFO_AVC_YES)
- File_Avc* Parser=new File_Avc;
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Format, "AVC");
- #endif
- Essence->second.Parsers.push_back(Parser);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_DV(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Video;
-
- //Filling
- #if defined(MEDIAINFO_DVDIF_YES)
- File_DvDif* Parser=new File_DvDif;
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "DV");
- #endif
- Essence->second.Parsers.push_back(Parser);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_Mpeg4v(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Video;
-
- //Filling
- #if defined(MEDIAINFO_MPEG4V_YES)
- File_Mpeg4v* Parser=new File_Mpeg4v;
- Parser->OnlyVOP();
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Format, "MPEG-4 Visual");
- #endif
- Essence->second.Parsers.push_back(Parser);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_Mpegv(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Video;
-
- //Filling
- #if defined(MEDIAINFO_MPEGV_YES)
- File_Mpegv* Parser=new File_Mpegv();
- Parser->Ancillary=&Ancillary;
- #if MEDIAINFO_ADVANCED
- Parser->InitDataNotRepeated_Optional=true;
- #endif // MEDIAINFO_ADVANCED
- #if MEDIAINFO_DEMUX
- if (Demux_UnpacketizeContainer)
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
- #else
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Format, "MPEG Video");
- #endif
- Essence->second.Parsers.push_back(Parser);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_Raw(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Video;
-
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Format, "YUV");
- Essence->second.Parsers.push_back(Parser);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_RV24(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Video;
-
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Format, "RV24");
- Essence->second.Parsers.push_back(Parser);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_Vc3(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Video;
-
- //Filling
- #if defined(MEDIAINFO_VC3_YES)
- File_Vc3* Parser=new File_Vc3;
- if (Descriptor!=Descriptors.end())
- Parser->FrameRate=Descriptor->second.SampleRate;
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Format, "VC-3");
- #endif
- Essence->second.Parsers.push_back(Parser);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_TimedText(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Text;
-
- //Filling
- #if defined(MEDIAINFO_TTML_YES)
- File_Ttml* Parser=new File_Ttml;
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Text);
- Parser->Fill(Stream_Text, 0, Text_Format, "Timed Text");
- #endif
- Essence->second.Parsers.push_back(Parser);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_Aac(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Audio;
-
- //Filling
- #if defined(MEDIAINFO_AAC_YES)
- File_Aac* Parser=new File_Aac;
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "AAC");
- #endif
- Essence->second.Parsers.push_back(Parser);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_Ac3(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Audio;
-
- //Filling
- #if defined(MEDIAINFO_AC3_YES)
- File_Ac3* Parser=new File_Ac3;
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "AC-3");
- #endif
- Essence->second.Parsers.push_back(Parser);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_Alaw(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Audio;
-
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "Alaw");
- Essence->second.Parsers.push_back(Parser);
-}
-
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_ChannelGrouping(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Audio;
-
- #if defined(MEDIAINFO_SMPTEST0337_YES)
-
- //Creating the parser
- if (!((Essence->second.StreamPos-(StreamPos_StartAtOne?1:0))%2 && Essences[Essence->first-1].Parsers.size()<=1))
- {
- File_ChannelGrouping* Parser;
- if ((Essence->second.StreamPos-(StreamPos_StartAtOne?1:0))%2) //If the first half-stream was already rejected, don't try this one
- {
- essences::iterator FirstChannel=Essences.find(Essence->first-1);
- if (FirstChannel==Essences.end() || !FirstChannel->second.IsChannelGrouping)
- return ChooseParser_Pcm(Essence, Descriptor); //Not a channel grouping
-
- Parser=new File_ChannelGrouping;
- Parser->Channel_Pos=1;
- Parser->Common=((File_ChannelGrouping*)Essences[Essence->first-1].Parsers[0])->Common;
- Parser->StreamID=Essence->second.TrackID-1;
- }
- else
- {
- Parser=new File_ChannelGrouping;
- Parser->Channel_Pos=0;
- if (Descriptor!=Descriptors.end() && Descriptor->second.Infos.find("SamplingRate")!=Descriptor->second.Infos.end())
- Parser->SamplingRate=Descriptor->second.Infos["SamplingRate"].To_int16u();
- Essence->second.IsChannelGrouping=true;
- }
- Parser->Channel_Total=2;
- if (Descriptor!=Descriptors.end())
- {
- Parser->BitDepth=(int8u)(Descriptor->second.BlockAlign<=4?(Descriptor->second.BlockAlign*8):(Descriptor->second.BlockAlign*4)); //In one file, BlockAlign is size of the aggregated channelgroup
- if (Descriptor->second.Infos.find("Format_Settings_Endianness")!=Descriptor->second.Infos.end())
- {
- if (Descriptor->second.Infos["Format_Settings_Endianness"]==__T("Big"))
- Parser->Endianness='B';
- else
- Parser->Endianness='L';
- }
- else
- Parser->Endianness='L';
- }
- else
- Parser->Endianness='L';
-
- #if MEDIAINFO_DEMUX
- if (Demux_UnpacketizeContainer)
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
-
- Essence->second.Parsers.push_back(Parser);
- }
- #endif //defined(MEDIAINFO_SMPTEST0337_YES)
-
- //Adding PCM
- ChooseParser_Pcm(Essence, Descriptor);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_Mpega(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Audio;
-
- //Filling
- #if defined(MEDIAINFO_MPEGA_YES)
- File_Mpega* Parser=new File_Mpega;
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Audio);
- Parser->Fill(Stream_Audio, 0, Audio_Format, "MPEG Audio");
- #endif
- Essence->second.Parsers.push_back(Parser);
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_Pcm(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Audio;
-
- int8u Channels=0;
- if (Descriptor!=Descriptors.end())
- {
- if (Descriptor->second.Infos.find("Channel(s)")!=Descriptor->second.Infos.end())
- Channels=Descriptor->second.Infos["Channel(s)"].To_int8u();
-
- //Handling some buggy cases
- if (Channels>1 && Descriptor->second.BlockAlign!=(int16u)-1 && Descriptor->second.QuantizationBits!=(int32u)-1)
- {
- if (((int32u)Descriptor->second.BlockAlign)*8==Descriptor->second.QuantizationBits)
- Descriptor->second.BlockAlign*=Channels; //BlockAlign is by channel, it should be by block.
- }
- }
-
- //Creating the parser
- #if defined(MEDIAINFO_PCM_YES)
- File_Pcm* Parser=new File_Pcm;
- if (Descriptor!=Descriptors.end())
- {
- if (Channels)
- Parser->Channels=Channels;
- if (Descriptor->second.Infos.find("SamplingRate")!=Descriptor->second.Infos.end())
- Parser->SamplingRate=Descriptor->second.Infos["SamplingRate"].To_int16u();
- if (Parser->Channels && Descriptor->second.BlockAlign!=(int16u)-1)
- Parser->BitDepth=(int8u)(Descriptor->second.BlockAlign*8/Parser->Channels);
- else if (Descriptor->second.QuantizationBits<256)
- Parser->BitDepth=(int8u)Descriptor->second.QuantizationBits;
- else if (Descriptor->second.Infos.find("BitDepth")!=Descriptor->second.Infos.end())
- Parser->BitDepth=Descriptor->second.Infos["BitDepth"].To_int8u();
- //Handling of quantization bits not being same as BlockAlign/Channels
- if (Channels && Descriptor->second.BlockAlign!=(int16u)-1 && Descriptor->second.QuantizationBits!=(int32u)-1)
- {
- if (Channels*Descriptor->second.QuantizationBits!=((int32u)Descriptor->second.BlockAlign)*8)
- {
- //Moving Bit depth info to the "Significant" piece of etadata
- if (Descriptor->second.QuantizationBits<256)
- Parser->BitDepth_Significant=(int8u)Descriptor->second.QuantizationBits;
- else
- Parser->BitDepth_Significant=Parser->BitDepth;
- Parser->BitDepth=((int8u)Descriptor->second.BlockAlign)*8/Channels;
- }
- }
- if (Descriptor->second.Infos.find("Format_Settings_Endianness")!=Descriptor->second.Infos.end())
- {
- if (Descriptor->second.Infos["Format_Settings_Endianness"]==__T("Big"))
- Parser->Endianness='B';
- else
- Parser->Endianness='L';
- }
- else
- Parser->Endianness='L';
- }
- else
- Parser->Endianness='L';
-
- #if MEDIAINFO_DEMUX
- if (Demux_UnpacketizeContainer)
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
-
- Essence->second.Parsers.push_back(Parser);
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_SmpteSt0331(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Audio;
-
- //Filling
- #if defined(MEDIAINFO_SMPTEST0331_YES)
- File_SmpteSt0331* Parser=new File_SmpteSt0331;
- if (Descriptor!=Descriptors.end() && Descriptor->second.QuantizationBits!=(int32u)-1)
- Parser->QuantizationBits=Descriptor->second.QuantizationBits;
-
- #if MEDIAINFO_DEMUX
- if (Demux_UnpacketizeContainer)
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
-
- Essence->second.Parsers.push_back(Parser);
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_SmpteSt0337(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Audio;
-
- //Filling
- #if defined(MEDIAINFO_SMPTEST0337_YES)
- File_SmpteSt0337* Parser=new File_SmpteSt0337;
- if (Descriptor!=Descriptors.end())
- {
- if (Descriptor->second.BlockAlign<64)
- Parser->Container_Bits=(int8u)(Descriptor->second.BlockAlign*4);
- else if (Descriptor->second.QuantizationBits!=(int32u)-1)
- Parser->Container_Bits=(int8u)Descriptor->second.QuantizationBits;
- if (Descriptor->second.Infos.find("Format_Settings_Endianness")!=Descriptor->second.Infos.end())
- {
- if (Descriptor->second.Infos["Format_Settings_Endianness"]==__T("Big"))
- Parser->Endianness='B';
- else
- Parser->Endianness='L';
- }
- else
- Parser->Endianness='L';
- }
- else
- Parser->Endianness='L';
- Parser->Aligned=true;
-
- #if MEDIAINFO_DEMUX
- if (Demux_UnpacketizeContainer)
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- }
- #endif //MEDIAINFO_DEMUX
-
- Essence->second.Parsers.push_back(Parser);
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Mxf::ChooseParser_Jpeg2000(const essences::iterator &Essence, const descriptors::iterator &Descriptor)
-{
- Essence->second.StreamKind=Stream_Video;
-
- //Filling
- #if defined(MEDIAINFO_JPEG_YES)
- File_Jpeg* Parser=new File_Jpeg;
- Parser->StreamKind=Stream_Video;
- if (Descriptor!=Descriptors.end())
- {
- Parser->Interlaced=Descriptor->second.ScanType==__T("Interlaced");
- #if MEDIAINFO_DEMUX
- if (Parser->Interlaced)
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- Parser->FrameRate=Descriptor->second.SampleRate;
- }
- #endif //MEDIAINFO_DEMUX
- }
- #else
- //Filling
- File__Analyze* Parser=new File_Unknown();
- Open_Buffer_Init(Parser);
- Parser->Stream_Prepare(Stream_Video);
- Parser->Fill(Stream_Video, 0, Video_Format, "JPEG 2000");
- #endif
- Essence->second.Parsers.push_back(Parser);
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mxf::Subsampling_Compute(descriptors::iterator Descriptor)
-{
- if (Descriptor==Descriptors.end() || (Descriptor->second.SubSampling_Horizontal==(int32u)-1 || Descriptor->second.SubSampling_Vertical==(int32u)-1))
- return;
-
- switch (Descriptor->second.SubSampling_Horizontal)
- {
- case 1 : switch (Descriptor->second.SubSampling_Vertical)
- {
- case 1 : Descriptor->second.Infos["ChromaSubsampling"]=__T("4:4:4"); return;
- default: Descriptor->second.Infos["ChromaSubsampling"].clear(); return;
- }
- case 2 : switch (Descriptor->second.SubSampling_Vertical)
- {
- case 1 : Descriptor->second.Infos["ChromaSubsampling"]=__T("4:2:2"); return;
- case 2 : Descriptor->second.Infos["ChromaSubsampling"]=__T("4:2:0"); return;
- default: Descriptor->second.Infos["ChromaSubsampling"].clear(); return;
- }
- case 4 : switch (Descriptor->second.SubSampling_Vertical)
- {
- case 1 : Descriptor->second.Infos["ChromaSubsampling"]=__T("4:1:1"); return;
- default: Descriptor->second.Infos["ChromaSubsampling"].clear(); return;
- }
- default: return;
- }
-}
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_REFERENCES_YES)
-void File_Mxf::Locators_CleanUp()
-{
- //Testing locators (TODO: check if this is still useful)
- if (Locators.size()==1)
- {
- Locators.clear();
- return;
- }
-
- locators::iterator Locator=Locators.begin();
- while (Locator!=Locators.end())
- {
- bool IsReferenced=false;
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- for (size_t Pos=0; Pos<Descriptor->second.Locators.size(); Pos++)
- if (Locator->first==Descriptor->second.Locators[Pos])
- IsReferenced=true;
- if (!IsReferenced)
- {
- //Deleting current locator
- locators::iterator LocatorToDelete=Locator;
- ++Locator;
- Locators.erase(LocatorToDelete);
- }
- else
- ++Locator;
- }
-
-}
-#endif //defined(MEDIAINFO_REFERENCES_YES)
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_REFERENCES_YES)
-void File_Mxf::Locators_Test()
-{
- Locators_CleanUp();
-
- if (!Locators.empty() && ReferenceFiles==NULL)
- {
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
-
- for (locators::iterator Locator=Locators.begin(); Locator!=Locators.end(); ++Locator)
- if (!Locator->second.IsTextLocator && !Locator->second.EssenceLocator.empty())
- {
- sequence* Sequence=new sequence;
- Sequence->AddFileName(Locator->second.EssenceLocator);
- Sequence->StreamKind=Locator->second.StreamKind;
- Sequence->StreamPos=Locator->second.StreamPos;
- if (Locator->second.LinkedTrackID!=(int32u)-1)
- Sequence->StreamID=Locator->second.LinkedTrackID;
- else if (!Retrieve(Locator->second.StreamKind, Locator->second.StreamPos, General_ID).empty())
- Sequence->StreamID=Retrieve(Locator->second.StreamKind, Locator->second.StreamPos, General_ID).To_int64u();
- Sequence->Delay=float64_int64s(DTS_Delay*1000000000);
-
- //Special cases
- if (Locator->second.StreamKind==Stream_Video)
- {
- //Searching the corresponding frame rate
- for (descriptors::iterator Descriptor=Descriptors.begin(); Descriptor!=Descriptors.end(); ++Descriptor)
- for (size_t LocatorPos=0; LocatorPos<Descriptor->second.Locators.size(); LocatorPos++)
- if (Descriptor->second.Locators[LocatorPos]==Locator->first)
- Sequence->FrameRate_Set(Descriptor->second.SampleRate);
- }
-
- if (Sequence->StreamID!=(int32u)-1)
- {
- //Descriptive Metadata
- std::vector<int128u> DMScheme1s_List;
-
- for (dmsegments::iterator DMSegment=DMSegments.begin(); DMSegment!=DMSegments.end(); ++DMSegment)
- for (size_t Pos=0; Pos<DMSegment->second.TrackIDs.size(); Pos++)
- if (DMSegment->second.TrackIDs[Pos]==Sequence->StreamID)
- DMScheme1s_List.push_back(DMSegment->second.Framework);
-
- for (size_t Pos=0; Pos<DMScheme1s_List.size(); Pos++)
- {
- dmscheme1s::iterator DMScheme1=DMScheme1s.find(DMScheme1s_List[Pos]);
- if (DMScheme1!=DMScheme1s.end())
- {
- Sequence->Infos["Language"]=DMScheme1->second.PrimaryExtendedSpokenLanguage;
- }
- }
- }
-
- ReferenceFiles->AddSequence(Sequence);
- }
- else
- {
- Fill(Stream_General, 0, "UnsupportedSources", Locator->second.EssenceLocator);
- (*Stream_More)[Stream_General][0](Ztring().From_Local("UnsupportedSources"), Info_Options)=__T("N NT");
- }
-
- ReferenceFiles->ParseReferences();
- }
-}
-#endif //defined(MEDIAINFO_REFERENCES_YES)
-
-//---------------------------------------------------------------------------
-void File_Mxf::TryToFinish()
-{
- Frame_Count_NotParsedIncluded=(int64u)-1;
-
- if (!IsSub && IsParsingEnd && File_Size!=(int64u)-1 && Config->ParseSpeed<1 && IsParsingMiddle_MaxOffset==(int64u)-1 && File_Size/2>0x4000000) //TODO: 64 MB by default;
- {
- IsParsingMiddle_MaxOffset=File_Size/2+0x4000000; //TODO: 64 MB by default;
- GoTo(File_Size/2);
- Open_Buffer_Unsynch();
- IsParsingEnd=false;
- Streams_Count=(size_t)-1;
- return;
- }
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_MXF_*
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mxf.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mxf.h
deleted file mode 100644
index 507e229b2..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Mxf.h
+++ /dev/null
@@ -1,1214 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Mxf files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_MxfH
-#define MediaInfo_File_MxfH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#if defined(MEDIAINFO_ANCILLARY_YES)
- #include <MediaInfo/Multiple/File_Ancillary.h>
-#endif //defined(MEDIAINFO_ANCILLARY_YES)
-#include "MediaInfo/MediaInfo_Internal.h"
-#include <vector>
-#include <set>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_Mxf
-//***************************************************************************
-
-class File_Mxf : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Mxf();
- ~File_Mxf();
-
- //int256u
- class int256u
- {
- public:
- // Binary correct representation of signed 256bit integer
- int128u lo;
- int128u hi;
-
- int256u()
- {
- lo.lo=0;
- lo.hi=0;
- hi.lo=0;
- hi.hi=0;
- }
- };
-
-
-protected :
- //Streams management
- void Streams_Accept();
- void Streams_Fill ();
- void Streams_Finish ();
- void Streams_Finish_Preface (const int128u PrefaceUID);
- void Streams_Finish_Preface_ForTimeCode (const int128u PrefaceUID);
- void Streams_Finish_ContentStorage (const int128u ContentStorageUID);
- void Streams_Finish_ContentStorage_ForTimeCode (const int128u ContentStorageUID);
- void Streams_Finish_ContentStorage_ForAS11 (const int128u ContentStorageUID);
- void Streams_Finish_Package (const int128u PackageUID);
- void Streams_Finish_Package_ForTimeCode (const int128u PackageUID);
- void Streams_Finish_Package_ForAS11 (const int128u PackageUID);
- void Streams_Finish_Track (const int128u TrackUID);
- void Streams_Finish_Track_ForTimeCode (const int128u TrackUID, bool IsSourcePackage);
- void Streams_Finish_Track_ForAS11 (const int128u TrackUID);
- void Streams_Finish_Essence (int32u EssenceUID, int128u TrackUID);
- void Streams_Finish_Descriptor (const int128u DescriptorUID, const int128u PackageUID);
- void Streams_Finish_Locator (const int128u DescriptorUID, const int128u LocatorUID);
- void Streams_Finish_Component (const int128u ComponentUID, float64 EditRate, int32u TrackID, int64u Origin);
- void Streams_Finish_Component_ForTimeCode (const int128u ComponentUID, float64 EditRate, int32u TrackID, int64u Origin, bool IsSourcePackage);
- void Streams_Finish_Component_ForAS11 (const int128u ComponentUID, float64 EditRate, int32u TrackID, int64u Origin);
- void Streams_Finish_Identification (const int128u IdentificationUID);
- void Streams_Finish_CommercialNames ();
-
- //Buffer - Global
- void Read_Buffer_Init ();
- void Read_Buffer_Continue ();
- void Read_Buffer_AfterParsing ();
- void Read_Buffer_Unsynched();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
-
- //Buffer - Per element
- bool Header_Begin();
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void MCAChannelID();
- void MCALabelDictionaryID();
- void MCATagSymbol();
- void MCATagName();
- void GroupOfSoundfieldGroupsLinkID();
- void MCALinkID();
- void SoundfieldGroupLinkID();
- void MCAPartitionKind();
- void MCAPartitionNumber();
- void MCATitle();
- void MCATitleVersion();
- void MCATitleSubVersion();
- void MCAEpisode();
- void MCAAudioContentKind();
- void MCAAudioElementKind();
- void ResourceID();
- void NamespaceURI();
- void UCSEncoding();
- void Filler();
- void Filler01() {Filler();}
- void Filler02() {Filler();}
- void TerminatingFiller();
- void XmlDocumentText();
- void SubDescriptors();
- void LensUnitMetadata();
- void CameraUnitMetadata();
- void UserDefinedAcquisitionMetadata();
- void Filler53();
- void Sequence();
- void SourceClip();
- void TimecodeComponent();
- void ContentStorage();
- void EssenceContainerData();
- void CDCIEssenceDescriptor();
- void RGBAEssenceDescriptor();
- void Preface();
- void Identification();
- void NetworkLocator();
- void TextLocator();
- void StereoscopicPictureSubDescriptor();
- void MaterialPackage();
- void SourcePackage();
- void EventTrack();
- void StaticTrack();
- void TimelineTrack();
- void DMSegment();
- void GenericSoundEssenceDescriptor();
- void GenericDataEssenceDescriptor();
- void MultipleDescriptor();
- void DMSourceClip();
- void AES3PCMDescriptor();
- void WaveAudioDescriptor();
- void MPEG2VideoDescriptor();
- void JPEG2000PictureSubDescriptor();
- void VbiPacketsDescriptor();
- void AncPacketsDescriptor();
- void MpegAudioDescriptor();
- void PackageMarkerObject();
- void ApplicationPlugInObject();
- void ApplicationReferencedObject();
- void MCALabelSubDescriptor();
- void TimedTextDescriptor();
- void TimedTextResourceSubDescriptor();
- void Unknown67SubDescriptor();
- void Mpeg4VisualSubDescriptor();
- void AudioChannelLabelSubDescriptor();
- void SoundfieldGroupLabelSubDescriptor();
- void GroupOfSoundfieldGroupsLabelSubDescriptor();
- void OpenIncompleteHeaderPartition();
- void ClosedIncompleteHeaderPartition();
- void OpenCompleteHeaderPartition();
- void ClosedCompleteHeaderPartition();
- void OpenIncompleteBodyPartition();
- void ClosedIncompleteBodyPartition();
- void OpenCompleteBodyPartition();
- void ClosedCompleteBodyPartition();
- void OpenIncompleteFooterPartition();
- void ClosedIncompleteFooterPartition();
- void OpenCompleteFooterPartition();
- void ClosedCompleteFooterPartition();
- void Primer();
- void IndexTableSegment();
- void RandomIndexMetadata();
- void SDTI_SystemMetadataPack();
- void SDTI_PackageMetadataSet();
- void SDTI_PictureMetadataSet();
- void SDTI_SoundMetadataSet();
- void SDTI_DataMetadataSet();
- void SDTI_ControlMetadataSet();
- void SystemScheme1();
- void DMScheme1();
- void AS11_AAF_Core();
- void AS11_AAF_Segmentation();
- void AS11_AAF_UKDPP();
- void Omneon_010201010100();
- void Omneon_010201020100();
-
- //Common
- void GenerationInterchangeObject();
- void InterchangeObject();
- void GenericPictureEssenceDescriptor();
- void PartitionMetadata();
- void GenericTrack();
- void GenericPackage();
- void FileDescriptor();
- void StructuralComponent();
- void GenericDescriptor();
-
- //Complex types
- void AES3PCMDescriptor_AuxBitsMode(); //3D08
- void AES3PCMDescriptor_Emphasis(); //3D0D
- void AES3PCMDescriptor_BlockStartOffset(); //3D0F
- void AES3PCMDescriptor_ChannelStatusMode(); //3D10
- void AES3PCMDescriptor_FixedChannelStatusData(); //3D11
- void AES3PCMDescriptor_UserDataMode(); //3D12
- void AES3PCMDescriptor_FixedUserData(); //3D13
- void CDCIEssenceDescriptor_ComponentDepth(); //3301
- void CDCIEssenceDescriptor_HorizontalSubsampling(); //3302
- void CDCIEssenceDescriptor_ColorSiting(); //3303
- void CDCIEssenceDescriptor_BlackRefLevel(); //3304
- void CDCIEssenceDescriptor_WhiteReflevel(); //3305
- void CDCIEssenceDescriptor_ColorRange(); //3306
- void CDCIEssenceDescriptor_PaddingBits(); //3307
- void CDCIEssenceDescriptor_VerticalSubsampling(); //3308
- void CDCIEssenceDescriptor_AlphaSampleDepth(); //3309
- void CDCIEssenceDescriptor_ReversedByteOrder(); //330B
- void ContentStorage_Packages(); //1901
- void ContentStorage_EssenceContainerData(); //1902
- void DMSegment_Duration(); //0202 (copy of StructuralComponent_Duration) //TODO: merge with StructuralComponent_Duration
- void DMSegment_DMFramework(); //6101
- void DMSegment_TrackIDs(); //6102
- void EssenceContainerData_LinkedPackageUID(); //2701
- void EssenceContainerData_IndexSID(); //3F06
- void EssenceContainerData_BodySID(); //3F07
- void EventTrack_EventEditRate(); //4901
- void EventTrack_EventOrigin(); //4902
- void FileDescriptor_SampleRate(); //3001
- void FileDescriptor_ContainerDuration(); //3002
- void FileDescriptor_EssenceContainer(); //3004
- void FileDescriptor_Codec(); //3005
- void FileDescriptor_LinkedTrackID(); //3006
- void InterchangeObject_InstanceUID(); //3C0A
- void GenerationInterchangeObject_GenerationUID(); //0102
- void GenericDescriptor_Locators(); //2F01
- void GenericPackage_PackageUID(); //4401
- void GenericPackage_Name(); //4402
- void GenericPackage_Tracks(); //4403
- void GenericPackage_PackageModifiedDate(); //4404
- void GenericPackage_PackageCreationDate(); //4405
- void GenericPictureEssenceDescriptor_PictureEssenceCoding();//3201
- void GenericPictureEssenceDescriptor_StoredHeight(); //3202
- void GenericPictureEssenceDescriptor_StoredWidth(); //3203
- void GenericPictureEssenceDescriptor_SampledHeight(); //3204
- void GenericPictureEssenceDescriptor_SampledWidth(); //3205
- void GenericPictureEssenceDescriptor_SampledXOffset(); //3206
- void GenericPictureEssenceDescriptor_SampledYOffset(); //3207
- void GenericPictureEssenceDescriptor_DisplayHeight(); //3208
- void GenericPictureEssenceDescriptor_DisplayWidth(); //3209
- void GenericPictureEssenceDescriptor_DisplayXOffset(); //320A
- void GenericPictureEssenceDescriptor_DisplayYOffset(); //320B
- void GenericPictureEssenceDescriptor_FrameLayout(); //320C
- void GenericPictureEssenceDescriptor_VideoLineMap(); //320D
- void GenericPictureEssenceDescriptor_AspectRatio(); //320E
- void GenericPictureEssenceDescriptor_AlphaTransparency(); //320F
- void GenericPictureEssenceDescriptor_TransferCharacteristic(); //3210
- void GenericPictureEssenceDescriptor_ImageAlignmentOffset();//3211
- void GenericPictureEssenceDescriptor_FieldDominance(); //3212
- void GenericPictureEssenceDescriptor_ImageStartOffset(); //3213
- void GenericPictureEssenceDescriptor_ImageEndOffset(); //3214
- void GenericPictureEssenceDescriptor_SignalStandard(); //3215
- void GenericPictureEssenceDescriptor_StoredF2Offset(); //3216
- void GenericPictureEssenceDescriptor_DisplayF2Offset(); //3217
- void GenericPictureEssenceDescriptor_ActiveFormatDescriptor();//3218
- void GenericPictureEssenceDescriptor_ColorPrimaries(); //3219
- void GenericPictureEssenceDescriptor_CodingEquations(); //321A
- void GenericSoundEssenceDescriptor_QuantizationBits(); //3D01
- void GenericSoundEssenceDescriptor_Locked(); //3D02
- void GenericSoundEssenceDescriptor_AudioSamplingRate(); //3D03
- void GenericSoundEssenceDescriptor_AudioRefLevel(); //3D04
- void GenericSoundEssenceDescriptor_ElectroSpatialFormulation(); //3D05
- void GenericSoundEssenceDescriptor_SoundEssenceCompression(); //3D06
- void GenericSoundEssenceDescriptor_ChannelCount(); //3D07
- void GenericSoundEssenceDescriptor_DialNorm(); //3D0C
- void GenericDataEssenceDescriptor_DataEssenceCoding(); //3E01
- void GenericTrack_TrackID(); //4801
- void GenericTrack_TrackName(); //4802
- void GenericTrack_Sequence(); //4803
- void GenericTrack_TrackNumber(); //4804
- void Identification_CompanyName(); //3C01
- void Identification_ProductName(); //3C02
- void Identification_ProductVersion(); //3C03
- void Identification_VersionString(); //3C04
- void Identification_ProductUID(); //3C05
- void Identification_ModificationDate(); //3C06
- void Identification_ToolkitVersion(); //3C07
- void Identification_Platform(); //3C08
- void Identification_ThisGenerationUID(); //3C09
- void IndexTableSegment_EditUnitByteCount(); //3F05
- void IndexTableSegment_IndexSID(); //3F06
- void IndexTableSegment_BodySID(); //3F07
- void IndexTableSegment_SliceCount(); //3F08
- void IndexTableSegment_DeltaEntryArray(); //3F09
- void IndexTableSegment_IndexEntryArray(); //3F0A
- void IndexTableSegment_IndexEditRate(); //3F0B
- void IndexTableSegment_IndexStartPosition(); //3F0C
- void IndexTableSegment_IndexDuration(); //3F0D
- void IndexTableSegment_PosTableCount(); //3F0E
- void IndexTableSegment_8002(); //8002
- void JPEG2000PictureSubDescriptor_Rsiz(); //8001
- void JPEG2000PictureSubDescriptor_Xsiz(); //8002
- void JPEG2000PictureSubDescriptor_Ysiz(); //8003
- void JPEG2000PictureSubDescriptor_XOsiz(); //8004
- void JPEG2000PictureSubDescriptor_YOsiz(); //8005
- void JPEG2000PictureSubDescriptor_XTsiz(); //8006
- void JPEG2000PictureSubDescriptor_YTsiz(); //8007
- void JPEG2000PictureSubDescriptor_XTOsiz(); //8008
- void JPEG2000PictureSubDescriptor_YTOsiz(); //8009
- void JPEG2000PictureSubDescriptor_Csiz(); //800A
- void JPEG2000PictureSubDescriptor_PictureComponentSizing(); //800B
- void JPEG2000PictureSubDescriptor_CodingStyleDefault(); //
- void JPEG2000PictureSubDescriptor_QuantizationDefault(); //
- void MpegAudioDescriptor_BitRate(); //
- void MultipleDescriptor_SubDescriptorUIDs(); //3F01
- void PrimaryExtendedSpokenLanguage(); //
- void SecondaryExtendedSpokenLanguage(); //
- void OriginalExtendedSpokenLanguage(); //
- void SecondaryOriginalExtendedSpokenLanguage(); //
- void RFC5646AudioLanguageCode(); //
- void MPEG2VideoDescriptor_SingleSequence(); //
- void MPEG2VideoDescriptor_ConstantBFrames(); //
- void MPEG2VideoDescriptor_CodedContentType(); //
- void MPEG2VideoDescriptor_LowDelay(); //
- void MPEG2VideoDescriptor_ClosedGOP(); //
- void MPEG2VideoDescriptor_IdenticalGOP(); //
- void MPEG2VideoDescriptor_MaxGOP(); //
- void MPEG2VideoDescriptor_BPictureCount(); //
- void MPEG2VideoDescriptor_ProfileAndLevel(); //
- void MPEG2VideoDescriptor_BitRate(); //
- void Mpeg4VisualDescriptor_SingleSequence() {MPEG2VideoDescriptor_SingleSequence();}
- void Mpeg4VisualDescriptor_ConstantBFrames() {MPEG2VideoDescriptor_ConstantBFrames();}
- void Mpeg4VisualDescriptor_CodedContentType() {MPEG2VideoDescriptor_CodedContentType();}
- void Mpeg4VisualDescriptor_LowDelay() {MPEG2VideoDescriptor_LowDelay();}
- void Mpeg4VisualDescriptor_ClosedGOP() {MPEG2VideoDescriptor_ClosedGOP();}
- void Mpeg4VisualDescriptor_IdenticalGOP() {MPEG2VideoDescriptor_IdenticalGOP();}
- void Mpeg4VisualDescriptor_MaxGOP() {MPEG2VideoDescriptor_MaxGOP();}
- void Mpeg4VisualDescriptor_BPictureCount() {MPEG2VideoDescriptor_BPictureCount();}
- void Mpeg4VisualDescriptor_ProfileAndLevel(); //
- void Mpeg4VisualDescriptor_BitRate() {MPEG2VideoDescriptor_BitRate();}
- void NetworkLocator_URLString(); //4001
- void Preface_LastModifiedDate(); //3B02
- void Preface_ContentStorage(); //3B03
- void Preface_Version(); //3B05
- void Preface_Identifications(); //3B06
- void Preface_ObjectModelVersion(); //3B07
- void Preface_PrimaryPackage(); //3B08
- void Preface_OperationalPattern(); //3B09
- void Preface_EssenceContainers(); //3B0A
- void Preface_DMSchemes(); //3B0B
- void RGBAEssenceDescriptor_PixelLayout(); //3401
- void RGBAEssenceDescriptor_Palette(); //3403
- void RGBAEssenceDescriptor_PaletteLayout(); //3404
- void RGBAEssenceDescriptor_ScanningDirection(); //3405
- void RGBAEssenceDescriptor_ComponentMaxRef(); //3406
- void RGBAEssenceDescriptor_ComponentMinRef(); //3407
- void RGBAEssenceDescriptor_AlphaMaxRef(); //3408
- void RGBAEssenceDescriptor_AlphaMinRef(); //3409
- void Sequence_StructuralComponents(); //1001
- void SourceClip_SourcePackageID(); //1101
- void SourceClip_SourceTrackID(); //1102
- void SourceClip_StartPosition(); //1201
- void SourcePackage_Descriptor(); //4701
- void StructuralComponent_DataDefinition(); //0201
- void StructuralComponent_Duration(); //0202
- void SystemScheme1_FrameCount(); //0101
- void SystemScheme1_TimeCodeArray(); //0102
- void SystemScheme1_ClipIDArray(); //0103
- void SystemScheme1_ExtendedClipIDArray(); //0104
- void SystemScheme1_VideoIndexArray(); //0105
- void SystemScheme1_KLVMetadataSequence(); //0106
- void SystemScheme1_SampleRate(); //3001
- void SystemScheme1_EssenceTrackNumber(); //4804
- void SystemScheme1_EssenceTrackNumberBatch(); //6801
- void SystemScheme1_ContentPackageIndexArray(); //6803
- void TextLocator_LocatorName(); //4101
- void TimecodeComponent_StartTimecode(); //1501
- void TimecodeComponent_RoundedTimecodeBase(); //1502
- void TimecodeComponent_DropFrame(); //1503
- void Track_EditRate(); //4B01
- void Track_Origin(); //4B02
- void WaveAudioDescriptor_AvgBps(); //3D09
- void WaveAudioDescriptor_BlockAlign(); //3D0A
- void WaveAudioDescriptor_SequenceOffset(); //3D0B
- void WaveAudioDescriptor_PeakEnvelopeVersion(); //3D29
- void WaveAudioDescriptor_PeakEnvelopeFormat(); //3D2A
- void WaveAudioDescriptor_PointsPerPeakValue(); //3D2B
- void WaveAudioDescriptor_PeakEnvelopeBlockSize(); //3D2C
- void WaveAudioDescriptor_PeakChannels(); //3D2D
- void WaveAudioDescriptor_PeakFrames(); //3D2E
- void WaveAudioDescriptor_PeakOfPeaksPosition(); //3D2F
- void WaveAudioDescriptor_PeakEnvelopeTimestamp(); //3D30
- void WaveAudioDescriptor_PeakEnvelopeData(); //3D31
- void WaveAudioDescriptor_ChannelAssignment(); //3D31
- void CameraUnitMetadata_CaptureGammaEquation(); //3210
- void CameraUnitMetadata_NeutralDensityFilterWheelSetting(); //8103
- void CameraUnitMetadata_CaptureFrameRate(); //8106
- void CameraUnitMetadata_ImageSensorReadoutMode(); //8107
- void CameraUnitMetadata_ShutterSpeed_Angle(); //8108
- void CameraUnitMetadata_ISOSensitivity(); //810B
- void CameraUnitMetadata_WhiteBalance(); //800E
- void CameraUnitMetadata_CameraAttributes(); //8114
- void CameraUnitMetadata_ExposureIndexofPhotoMeter(); //8115
- void CameraUnitMetadata_GammaforCDL(); //8116
- void CameraUnitMetadata_ASCCDLV1_2(); //8117
- void UserDefinedAcquisitionMetadata_UdamSetIdentifier(); //E000
- void UserDefinedAcquisitionMetadata_Sony_8007();
- void UserDefinedAcquisitionMetadata_Sony_E101();
- void UserDefinedAcquisitionMetadata_Sony_E102();
- void UserDefinedAcquisitionMetadata_Sony_E103();
- void UserDefinedAcquisitionMetadata_Sony_E104();
- void UserDefinedAcquisitionMetadata_Sony_E109();
- void UserDefinedAcquisitionMetadata_Sony_E10B();
- void UserDefinedAcquisitionMetadata_Sony_E201();
- void UserDefinedAcquisitionMetadata_Sony_E202();
- void UserDefinedAcquisitionMetadata_Sony_E203();
- void AS11_Core_SeriesTitle();
- void AS11_Core_ProgrammeTitle();
- void AS11_Core_EpisodeTitleNumber();
- void AS11_Core_ShimName();
- void AS11_Core_AudioTrackLayout();
- void AS11_Core_PrimaryAudioLanguage();
- void AS11_Core_ClosedCaptionsPresent();
- void AS11_Core_ClosedCaptionsType();
- void AS11_Core_ClosedCaptionsLanguage();
- void AS11_Core_ShimVersion();
- void AS11_Segment_PartNumber();
- void AS11_Segment_PartTotal();
- void AS11_UKDPP_ProductionNumber();
- void AS11_UKDPP_Synopsis();
- void AS11_UKDPP_Originator();
- void AS11_UKDPP_CopyrightYear();
- void AS11_UKDPP_OtherIdentifier();
- void AS11_UKDPP_OtherIdentifierType();
- void AS11_UKDPP_Genre();
- void AS11_UKDPP_Distributor();
- void AS11_UKDPP_PictureRatio();
- void AS11_UKDPP_3D();
- void AS11_UKDPP_3DType();
- void AS11_UKDPP_ProductPlacement();
- void AS11_UKDPP_FpaPass();
- void AS11_UKDPP_FpaManufacturer();
- void AS11_UKDPP_FpaVersion();
- void AS11_UKDPP_VideoComments();
- void AS11_UKDPP_SecondaryAudioLanguage();
- void AS11_UKDPP_TertiaryAudioLanguage();
- void AS11_UKDPP_AudioLoudnessStandard();
- void AS11_UKDPP_AudioComments();
- void AS11_UKDPP_LineUpStart();
- void AS11_UKDPP_IdentClockStart();
- void AS11_UKDPP_TotalNumberOfParts();
- void AS11_UKDPP_TotalProgrammeDuration();
- void AS11_UKDPP_AudioDescriptionPresent();
- void AS11_UKDPP_AudioDescriptionType();
- void AS11_UKDPP_OpenCaptionsPresent();
- void AS11_UKDPP_OpenCaptionsType();
- void AS11_UKDPP_OpenCaptionsLanguage();
- void AS11_UKDPP_SigningPresent();
- void AS11_UKDPP_SignLanguage();
- void AS11_UKDPP_CompletionDate();
- void AS11_UKDPP_TextlessElementsExist();
- void AS11_UKDPP_ProgrammeHasText();
- void AS11_UKDPP_ProgrammeTextLanguage();
- void AS11_UKDPP_ContactEmail();
- void AS11_UKDPP_ContactTelephoneNumber();
- void Omneon_010201010100_8001(); //8001
- void Omneon_010201010100_8003(); //8003
- void Omneon_010201020100_8002(); //8002
- void Omneon_010201020100_8003(); //8003
- void Omneon_010201020100_8004(); //8004
- void Omneon_010201020100_8005(); //8005
- void Omneon_010201020100_8006(); //8006
-
- //Basic types
- void Get_Rational(float64 &Value);
- void Skip_Rational();
- void Info_Rational();
- void Get_Timestamp (Ztring &Value);
- void Skip_Timestamp();
- void Info_Timestamp();
- void Get_UMID (int256u &Value, const char* Name);
- void Skip_UMID ();
-
- void Get_UL (int128u &Value, const char* Name, const char* (*Param) (int128u));
- void Skip_UL(const char* Name);
- void Get_BER(int64u &Value, const char* Name);
- #if MEDIAINFO_TRACE
- void Info_UL_01xx01_Items ();
- void Info_UL_02xx01_Groups ();
- void Info_UL_040101_Values ();
- #define Info_UL(_INFO, _NAME, _PARAM) int128u _INFO; Get_UL(_INFO, _NAME, _PARAM)
- #else //MEDIAINFO_TRACE
- void Info_UL_01xx01_Items () {Element_Offset+=8;};
- void Info_UL_02xx01_Groups () {Element_Offset+=8;};
- void Info_UL_040101_Values () {Element_Offset+=8;};
- #define Info_UL(_INFO, _NAME, _PARAM) int128u _INFO;
- #endif //MEDIAINFO_TRACE
-
- //TimeCode
- struct mxftimecode
- {
- int16u RoundedTimecodeBase;
- int64u StartTimecode;
- bool DropFrame;
-
- mxftimecode()
- : RoundedTimecodeBase(0)
- , StartTimecode((int64u)-1)
- , DropFrame(false)
- {
- }
-
- mxftimecode(int16u RoundedTimecodeBase_, int64u StartTimecode_, bool DropFrame_)
- : RoundedTimecodeBase(RoundedTimecodeBase_)
- , StartTimecode(StartTimecode_)
- , DropFrame(DropFrame_)
- {
- }
- };
-
- // Temp
- struct randomindexmetadata
- {
- int64u ByteOffset;
- int32u BodySID;
- };
- std::vector<randomindexmetadata> RandomIndexMetadatas;
- bool RandomIndexMetadatas_AlreadyParsed;
- std::set<int64u> PartitionPack_AlreadyParsed;
- size_t Streams_Count;
- int128u Code;
- int128u OperationalPattern;
- int128u InstanceUID;
- int64u Buffer_Begin;
- int64u Buffer_End;
- bool Buffer_End_Unlimited;
- int64u Buffer_Header_Size;
- int16u Code2;
- int16u Length2;
- int64u File_Size_Total; //Used only in Finish()
- int64u IsParsingMiddle_MaxOffset;
- bool Track_Number_IsAvailable;
- bool IsParsingEnd;
- bool IsCheckingRandomAccessTable;
- bool IsCheckingFooterPartitionAddress;
- bool FooterPartitionAddress_Jumped;
- bool PartitionPack_Parsed;
- size_t IdIsAlwaysSame_Offset;
-
- //Primer
- std::map<int16u, int128u> Primer_Values;
-
- //Preface
- struct preface
- {
- int128u PrimaryPackage;
- std::vector<int128u> Identifications;
- int128u ContentStorage;
-
- preface()
- {
- PrimaryPackage.hi=(int64u)-1;
- PrimaryPackage.lo=(int64u)-1;
- ContentStorage.hi=(int64u)-1;
- ContentStorage.lo=(int64u)-1;
- }
- };
- typedef std::map<int128u, preface> prefaces; //Key is InstanceUID of preface
- prefaces Prefaces;
- int128u Preface_Current;
-
- //Identification
- struct identification
- {
- Ztring CompanyName;
- Ztring ProductName;
- Ztring ProductVersion;
- Ztring VersionString;
- Ztring ToolkitVersion;
- Ztring Platform;
- std::map<std::string, Ztring> Infos;
- };
- typedef std::map<int128u, identification> identifications; //Key is InstanceUID of identification
- identifications Identifications;
-
- //ContentStorage
- struct contentstorage
- {
- std::vector<int128u> Packages;
- };
- typedef std::map<int128u, contentstorage> contentstorages; //Key is InstanceUID of ContentStorage
- contentstorages ContentStorages;
-
- //Package
- struct package
- {
- int256u PackageUID;
- int128u Descriptor;
- std::vector<int128u> Tracks;
- bool IsSourcePackage;
-
- package()
- {
- Descriptor=0;
- IsSourcePackage=false;
- }
- };
- typedef std::map<int128u, package> packages; //Key is InstanceUID of package
- packages Packages;
-
- //Track
- struct track
- {
- int128u Sequence;
- int32u TrackID;
- Ztring TrackName;
- int32u TrackNumber;
- float64 EditRate_Real; //Before demux adaptation
- float64 EditRate;
- int64u Origin;
- bool Stream_Finish_Done;
-
- track()
- {
- Sequence=0;
- TrackID=(int32u)-1;
- TrackNumber=(int32u)-1;
- EditRate_Real=(float64)0;
- EditRate=(float64)0;
- Origin=0;
- Stream_Finish_Done=false;
- }
- };
- typedef std::map<int128u, track> tracks; //Key is InstanceUID of the track
- tracks Tracks;
-
- //Essence
- typedef std::vector<File__Analyze*> parsers;
- struct essence
- {
- stream_t StreamKind;
- size_t StreamPos;
- size_t StreamPos_Initial;
- parsers Parsers;
- std::map<std::string, Ztring> Infos;
- int64u Stream_Size;
- int32u TrackID;
- bool TrackID_WasLookedFor;
- bool Stream_Finish_Done;
- bool Track_Number_IsMappedToTrack; //if !Track_Number_IsAvailable, is true when it was euristicly mapped
- bool IsFilled;
- bool IsChannelGrouping;
- int64u Field_Count_InThisBlock_1;
- int64u Field_Count_InThisBlock_2;
- int64u Frame_Count_NotParsedIncluded;
- frame_info FrameInfo;
-
- essence()
- {
- StreamKind=Stream_Max;
- StreamPos=(size_t)-1;
- StreamPos_Initial=(size_t)-1;
- Stream_Size=(int64u)-1;
- TrackID=(int32u)-1;
- TrackID_WasLookedFor=false;
- Stream_Finish_Done=false;
- Track_Number_IsMappedToTrack=false;
- IsFilled=false;
- IsChannelGrouping=false;
- Field_Count_InThisBlock_1=0;
- Field_Count_InThisBlock_2=0;
- Frame_Count_NotParsedIncluded=(int64u)-1;
- FrameInfo.DTS=(int64u)-1;
- }
-
- ~essence()
- {
- for (size_t Pos=0; Pos<Parsers.size(); Pos++)
- delete Parsers[Pos];
- }
- };
- typedef std::map<int32u, essence> essences; //Key is TrackNumber
- essences Essences;
-
- //Descriptor
- struct descriptor
- {
- std::vector<int128u> SubDescriptors;
- std::vector<int128u> Locators;
-
- Ztring ScanType;
- stream_t StreamKind;
- size_t StreamPos;
- float64 SampleRate;
- float64 DisplayAspectRatio;
- int128u InstanceUID;
- int128u EssenceContainer;
- int128u EssenceCompression;
- int32u LinkedTrackID;
- int32u Width;
- int32u Width_Display;
- int32u Width_Display_Offset;
- int32u Height;
- int32u Height_Display;
- int32u Height_Display_Offset;
- int32u SubSampling_Horizontal;
- int32u SubSampling_Vertical;
- int32u ChannelCount;
- int128u ChannelAssignment;
- std::map<std::string, Ztring> Infos;
- int16u BlockAlign;
- int32u QuantizationBits;
- int64u Duration;
- int8u ActiveFormat;
- int8u FieldTopness;
- int8u FieldDominance;
- enum type
- {
- Type_Unknown,
- type_Mutiple,
- Type_CDCI,
- Type_RGBA,
- Type_MPEG2Video,
- Type_WaveAudio,
- Type_AES3PCM,
- Type_JPEG2000Picture,
- Type_AncPackets,
- Type_MCALabelSubDescriptor,
- Type_AudioChannelLabelSubDescriptor,
- Type_SoundfieldGroupLabelSubDescriptor,
- Type_GroupOfSoundfieldGroupsLabelSubDescriptor,
- };
- type Type;
- bool HasBFrames;
- bool HasMPEG2VideoDescriptor;
- bool IsAes3Descriptor;
- int32u ByteRate;
-
-
- //MCALabelSubDescriptor specific (including SoundfieldGroupLabelSubDescriptor...)
- int128u MCALabelDictionaryID;
- int128u MCALinkID;
- Ztring MCATagSymbol;
- Ztring MCATagName;
- Ztring MCAPartitionKind;
- Ztring MCAPartitionNumber;
- Ztring MCATitle;
- Ztring MCATitleVersion;
- Ztring MCATitleSubVersion;
- Ztring MCAEpisode;
- Ztring MCAAudioContentKind;
- Ztring MCAAudioElementKind;
-
- //AudioChannelLabelSubDescriptor specific
- int128u SoundfieldGroupLinkID;
-
- descriptor()
- {
- StreamKind=Stream_Max;
- StreamPos=(size_t)-1;
- SampleRate=0;
- DisplayAspectRatio=0;
- InstanceUID.hi=(int64u)-1;
- InstanceUID.lo=(int64u)-1;
- EssenceContainer.hi=(int64u)-1;
- EssenceContainer.lo=(int64u)-1;
- EssenceCompression.hi=(int64u)-1;
- EssenceCompression.lo=(int64u)-1;
- LinkedTrackID=(int32u)-1;
- Width=(int32u)-1;
- Width_Display=(int32u)-1;
- Width_Display_Offset=(int32u)-1;
- Height=(int32u)-1;
- Height_Display=(int32u)-1;
- Height_Display_Offset=(int32u)-1;
- SubSampling_Horizontal=(int32u)-1;
- SubSampling_Vertical=(int32u)-1;
- ChannelCount=(int32u)-1;
- ChannelAssignment.hi=(int64u)-1;
- ChannelAssignment.lo=(int64u)-1;
- BlockAlign=(int16u)-1;
- QuantizationBits=(int32u)-1;
- Duration=(int64u)-1;
- ActiveFormat=(int8u)-1;
- FieldTopness=(int8u)-1; //Field x is upper field
- FieldDominance=1; //Default is field 1 temporaly first
- Type=Type_Unknown;
- HasBFrames=false;
- HasMPEG2VideoDescriptor=false;
- IsAes3Descriptor=false;
- ByteRate=(int32u)-1;
-
- //MCALabelSubDescriptor specific (including SoundfieldGroupLabelSubDescriptor...)
- MCALabelDictionaryID.hi=(int64u)-1;
- MCALabelDictionaryID.lo=(int64u)-1;
- MCALinkID.hi=(int64u)-1;
- MCALinkID.lo=(int64u)-1;
-
- //AudioChannelLabelSubDescriptor specific
- SoundfieldGroupLinkID.hi=(int64u)-1;
- SoundfieldGroupLinkID.lo=(int64u)-1;
- }
- };
- typedef std::map<int128u, descriptor> descriptors; //Key is InstanceUID of Descriptor
- descriptors Descriptors;
-
- //Locator
- struct locator
- {
- Ztring EssenceLocator;
- stream_t StreamKind;
- size_t StreamPos;
- int32u LinkedTrackID;
- bool IsTextLocator;
-
- locator()
- {
- StreamKind=Stream_Max;
- StreamPos=(size_t)-1;
- LinkedTrackID=(int32u)-1;
- IsTextLocator=false;
- }
-
- ~locator()
- {
- }
- };
- typedef std::map<int128u, locator> locators; //Key is InstanceUID of the locator
- locators Locators;
- File__ReferenceFilesHelper* ReferenceFiles;
- #if MEDIAINFO_NEXTPACKET
- bool ReferenceFiles_IsParsing;
- #endif //MEDIAINFO_NEXTPACKET
-
- //Component (Sequence, TimeCode, Source Clip)
- struct component
- {
- int64u Duration;
- int256u SourcePackageID; //Sequence from SourcePackage only
- int32u SourceTrackID;
- std::vector<int128u> StructuralComponents; //Sequence from MaterialPackage only
- mxftimecode MxfTimeCode;
-
- component()
- {
- Duration=(int64u)-1;
- SourceTrackID=(int32u)-1;
- }
-
- void Update (struct component &New)
- {
- if (New.Duration!=(int64u)-1)
- Duration=New.Duration;
- if (New.SourcePackageID.hi || New.SourcePackageID.lo)
- SourcePackageID=New.SourcePackageID;
- if (New.SourceTrackID!=(int32u)-1)
- SourceTrackID=New.SourceTrackID;
- if (!New.StructuralComponents.empty())
- StructuralComponents=New.StructuralComponents;
- if (New.MxfTimeCode.StartTimecode!=(int64u)-1)
- MxfTimeCode.StartTimecode=New.MxfTimeCode.StartTimecode;
- if (New.MxfTimeCode.RoundedTimecodeBase)
- {
- MxfTimeCode.RoundedTimecodeBase=New.MxfTimeCode.RoundedTimecodeBase;
- MxfTimeCode.DropFrame=New.MxfTimeCode.DropFrame;
- }
- }
- };
- typedef std::map<int128u, component> components; //Key is InstanceUID of the component
- components Components;
-
- //Descriptive Metadata - DMSegments
- struct dmsegment
- {
- int128u Framework;
- std::vector<int32u> TrackIDs;
- int64u Duration;
- bool IsAs11SegmentFiller;
-
- dmsegment()
- {
- Framework.lo=(int64u)-1;
- Framework.hi=(int64u)-1;
- Duration=(int64u)-1;
- IsAs11SegmentFiller=false;
- }
-
- ~dmsegment()
- {
- }
- };
- typedef std::map<int128u, dmsegment> dmsegments; //Key is InstanceUID of the DMSegment
- dmsegments DMSegments;
-
- //Descriptive Metadata - DMScheme1
- struct dmscheme1
- {
- Ztring PrimaryExtendedSpokenLanguage;
-
- dmscheme1()
- {
- }
-
- ~dmscheme1()
- {
- }
- };
- typedef std::map<int128u, dmscheme1> dmscheme1s; //Key is InstanceUID of the DMScheme1
- dmscheme1s DMScheme1s;
-
- //Descriptive Metadata - AS11
- struct as11
- {
- enum as11_type
- {
- Type_Unknown,
- Type_Core,
- Type_Segmentation,
- Type_UKDPP,
- };
- as11_type Type;
- Ztring SeriesTitle;
- Ztring ProgrammeTitle;
- Ztring EpisodeTitleNumber;
- Ztring ShimName;
- int8u AudioTrackLayout;
- Ztring PrimaryAudioLanguage;
- int8u ClosedCaptionsPresent;
- int8u ClosedCaptionsType;
- Ztring ClosedCaptionsLanguage;
- int8u ShimVersion_Major;
- int8u ShimVersion_Minor;
- int16u PartNumber;
- int16u PartTotal;
- Ztring ProductionNumber;
- Ztring Synopsis;
- Ztring Originator;
- int16u CopyrightYear;
- Ztring OtherIdentifier;
- Ztring OtherIdentifierType;
- Ztring Genre;
- Ztring Distributor;
- int32u PictureRatio_N;
- int32u PictureRatio_D;
- int8u ThreeD;
- int8u ThreeDType;
- int8u ProductPlacement;
- int8u FpaPass;
- Ztring FpaManufacturer;
- Ztring FpaVersion;
- Ztring VideoComments;
- Ztring SecondaryAudioLanguage;
- Ztring TertiaryAudioLanguage;
- int8u AudioLoudnessStandard;
- Ztring AudioComments;
- int64u LineUpStart;
- int64u IdentClockStart;
- int16u TotalNumberOfParts;
- int64u TotalProgrammeDuration;
- int8u AudioDescriptionPresent;
- int8u AudioDescriptionType;
- int8u OpenCaptionsPresent;
- int8u OpenCaptionsType;
- Ztring OpenCaptionsLanguage;
- int8u SigningPresent;
- int8u SignLanguage;
- int64u CompletionDate;
- int8u TextlessElementsExist;
- int8u ProgrammeHasText;
- Ztring ProgrammeTextLanguage;
- Ztring ContactEmail;
- Ztring ContactTelephoneNumber;
-
- as11()
- {
- Type=Type_Unknown;
- AudioTrackLayout=(int8u)-1;
- ClosedCaptionsPresent=(int8u)-1;
- ClosedCaptionsType=(int8u)-1;
- ShimVersion_Major=(int8u)-1;
- ShimVersion_Minor=(int8u)-1;
- PartNumber=(int16u)-1;
- PartTotal=(int16u)-1;
- CopyrightYear=(int16u)-1;
- PictureRatio_N=(int32u)-1;
- PictureRatio_D=(int32u)-1;
- ThreeD=(int8u)-1;
- ThreeDType=(int8u)-1;
- ProductPlacement=(int8u)-1;
- AudioLoudnessStandard=(int8u)-1;
- LineUpStart=(int64u)-1;
- IdentClockStart=(int64u)-1;
- TotalNumberOfParts=(int16u)-1;
- TotalProgrammeDuration=(int64u)-1;
- AudioDescriptionPresent=(int8u)-1;
- AudioDescriptionType=(int8u)-1;
- OpenCaptionsPresent=(int8u)-1;
- OpenCaptionsType=(int8u)-1;
- SigningPresent=(int8u)-1;
- SignLanguage=(int8u)-1;
- CompletionDate=(int64u)-1;
- TextlessElementsExist=(int8u)-1;
- ProgrammeHasText=(int8u)-1;
- }
-
- ~as11()
- {
- }
- };
- typedef std::map<int128u, as11> as11s; //Key is InstanceUID of the DMScheme1
- as11s AS11s;
-
- //Parsers
- void ChooseParser__FromEssence(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__Aaf(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__Aaf_CP_Picture(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__Aaf_CP_Sound(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__Aaf_CP_Data(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__Aaf_14(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__Aaf_GC_Picture(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__Aaf_GC_Sound(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__Aaf_GC_Data(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__Aaf_GC_Compound(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__Avid(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__Avid_Picture(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__Sony(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__Sony_Picture(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser__FromEssenceContainer(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_Avc(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_DV(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_Mpeg4v(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_Mpegv(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_Raw(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_RV24(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_Vc3(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_TimedText(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_Aac(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_Ac3(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_Alaw(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_ChannelGrouping(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_Mpega(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_Pcm(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_SmpteSt0331(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_SmpteSt0337(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
- void ChooseParser_Jpeg2000(const essences::iterator &Essence, const descriptors::iterator &Descriptor);
-
- //Helpers
- void Subsampling_Compute(descriptors::iterator Descriptor);
- #if defined(MEDIAINFO_REFERENCES_YES)
- void Locators_CleanUp();
- void Locators_Test();
- #else //defined(MEDIAINFO_REFERENCES_YES)
- inline void Locators_CleanUp() {}
- inline void Locators_Test() {}
- #endif //defined(MEDIAINFO_REFERENCES_YES)
- void TryToFinish();
-
- //Temp
- int128u EssenceContainer_FromPartitionMetadata;
- int64u PartitionMetadata_PreviousPartition;
- int64u PartitionMetadata_FooterPartition;
- mxftimecode MxfTimeCodeForDelay;
- mxftimecode MxfTimeCodeMaterial;
- float64 DTS_Delay; //In seconds
- bool StreamPos_StartAtOne; //information about the base of StreamPos (0 or 1, 1 is found in 1 file)
- string SDTI_TimeCode_StartTimecode;
- int64u SDTI_TimeCode_StartTimecode_ms;
- int64u SDTI_SizePerFrame;
- bool SDTI_IsPresent; //Used to test if SDTI packet is used for Index StreamOffset calculation
- bool SDTI_IsInIndexStreamOffset; //Used to test if SDTI packet is used for Index StreamOffset calculation
- string SystemScheme1_TimeCodeArray_StartTimecode;
- int64u SystemScheme1_TimeCodeArray_StartTimecode_ms;
- int64u SystemScheme1_FrameRateFromDescriptor;
- bool Essences_FirstEssence_Parsed;
- bool StereoscopicPictureSubDescriptor_IsPresent;
- bool UserDefinedAcquisitionMetadata_UdamSetIdentifier_IsSony;
- int32u Essences_UsedForFrameCount;
- int32u IndexTable_NSL;
- int32u IndexTable_NPE;
- struct systemscheme
- {
- bool IsTimeCode;
-
- systemscheme()
- {
- IsTimeCode=false;
- }
- };
- typedef std::map<int16u, systemscheme> systemschemes;
- systemschemes SystemSchemes;
- #if MEDIAINFO_ADVANCED
- int64u Footer_Position;
- #endif //MEDIAINFO_ADVANCED
- #if defined(MEDIAINFO_ANCILLARY_YES)
- File_Ancillary* Ancillary;
- bool Ancillary_IsBinded;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
-
- //Hints
- size_t* File_Buffer_Size_Hint_Pointer;
-
- //Partitions
- struct partition
- {
- int64u StreamOffset; //From file, not MXF one
- int64u PartitionPackByteCount; //Fill included
- int64u FooterPartition;
- int64u HeaderByteCount;
- int64u IndexByteCount;
- int64u BodyOffset;
-
- partition()
- {
- StreamOffset=0;
- PartitionPackByteCount=(int64u)-1;
- FooterPartition=0;
- HeaderByteCount=0;
- IndexByteCount=0;
- BodyOffset=0;
- }
-
- bool operator < (const partition& lhs) const
- {
- return StreamOffset<lhs.StreamOffset;
- }
- };
- typedef std::vector<partition> partitions;
- partitions Partitions;
- size_t Partitions_Pos;
- bool Partitions_IsCalculatingHeaderByteCount;
- bool Partitions_IsCalculatingSdtiByteCount;
- bool Partitions_IsFooter;
-
- //Config
- bool TimeCodeFromMaterialPackage;
-
- //Demux
- #if MEDIAINFO_DEMUX
- bool Demux_HeaderParsed;
- essences::iterator Demux_CurrentEssence;
- #endif //MEDIAINFO_DEMUX
-
- #if MEDIAINFO_DEMUX || MEDIAINFO_SEEK
- size_t CountOfLocatorsToParse;
- float64 Demux_Rate;
-
- //IndexTable
- struct indextable
- {
- int64u StreamOffset; //From file, not MXF one
- int64u IndexStartPosition;
- int64u IndexDuration;
- int32u EditUnitByteCount;
- float64 IndexEditRate;
- struct entry
- {
- int64u StreamOffset;
- int8u Type;
- };
- std::vector<entry> Entries;
-
- indextable()
- {
- StreamOffset=(int64u)-1;
- IndexStartPosition=0;
- IndexDuration=0;
- EditUnitByteCount=0;
- IndexEditRate=0;
- }
-
- bool operator < (const indextable& lhs) const
- {
- return IndexStartPosition<lhs.IndexStartPosition;
- }
- };
- typedef std::vector<indextable> indextables;
- indextables IndexTables;
- size_t IndexTables_Pos;
-
- //Other
- int64u Clip_Header_Size;
- int64u Clip_Begin;
- int64u Clip_End;
- int128u Clip_Code;
- int64u OverallBitrate_IsCbrForSure;
- bool Duration_Detected;
- bool DetectDuration();
- int64u DemuxedSampleCount_Total;
- int64u DemuxedSampleCount_Current;
- int64u DemuxedSampleCount_AddedToFirstFrame;
- int64u DemuxedElementSize_AddedToFirstFrame;
- #endif //MEDIAINFO_DEMUX || MEDIAINFO_SEEK
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Nut.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Nut.cpp
deleted file mode 100644
index 014673a3e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Nut.cpp
+++ /dev/null
@@ -1,289 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Source: http://svn.mplayerhq.hu/nut/docs/nut.txt?view=markup
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_NUT_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Nut.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Const
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-namespace Elements
-{
- const int64u main =0x4E4D7A561F5F04ADLL;
- const int64u stream =0x4E5311405BF2F9DBLL;
- const int64u syncpoint =0x4E4BE4ADEECA4569LL;
- const int64u index =0x4E58DD672F23E64ELL;
- const int64u info =0x4E49AB68B596BA78LL;
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Nut::Header_Parse()
-{
- /*
- //Parsing
- int8u N;
- Peek_B1(N);
- if (N==0x4E) //'N'
- {
- //Header
- int64u startcode, forward_ptr;
- Get_B8(startcode, "startcode");
- Get_VS(forward_ptr, "forward_ptr");
- if (forward_ptr>4096)
- Skip_B4( "header_checksum");
-
- Header_Fill_Code(startcode, Ztring().From_Number(startcode, 16)); //Quick filling for CC8 with text
- Header_Fill_Size(Element_Offset+forward_ptr); //4 for cheksum
-
- }
- else
- {
- //Frame
- Header_Fill_Code(0, "Frame");
- Header_Fill_Size(0);
- Finished();
- }
- */
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Nut::FileHeader_Parse()
-{
- //Parsing
- Element_Begin1("Nut header");
- std::string file_id_string;
- Get_String(25, file_id_string, "file_id_string");
- Element_End0();
-
- FILLING_BEGIN();
- //Integrity
- if (file_id_string!="nut/multimedia container")
- {
- Reject("Nut");
- return;
- }
-
- //Filling
- Accept("Nut");
-
- Fill(Stream_General, 0, General_Format, "Nut");
-
- Finish("Nut");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Nut::Data_Parse()
-{
-}
-
-/*
-//---------------------------------------------------------------------------
-void File_Nut::Data_Parse()
-{
- #define ELEMENT_CASE(_NAME) \
- case Elements::_NAME : _NAME(); break;
-
- //Parsing
- #ifndef __BORLANDC__
- switch (Element_Code)
- #else //__BORLANDC__
- switch (Element_Code&0xFFFFFFFF) //Borland does not like int64u for const?
- #endif //__BORLANDC__
- {
- ELEMENT_CASE(main);
- ELEMENT_CASE(stream);
- ELEMENT_CASE(syncpoint);
- ELEMENT_CASE(index);
- ELEMENT_CASE(info);
- default : Skip_XX(Element_Size-4, "Data");
- }
-
- Skip_B4( "cheksum");
-}
-*/
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-/*
-//---------------------------------------------------------------------------
-void File_Nut::main()
-{
- Element_Name("main");
-
- //Parsing
- int64u time_base_count;
- Skip_VS( "version");
- Skip_VS( "stream_count");
- Skip_VS( "max_distance");
- Get_VS (time_base_count, "time_base_count");
- for(int64u i=0; i<time_base_count; i++)
- {
- Skip_VS( "time_base_num");
- Skip_VS( "time_base_denom");
- //time_base[i]= time_base_num/time_base_denom
- }
- int64u tmp_mul=1, tmp_stream=0;
- int64s tmp_pts=0;
- for(int16u i=0; i<256;)
- {
- int64u tmp_fields, tmp_size, tmp_res, count;
- Skip_VS( "tmp_flag");
- Get_VS (tmp_fields, "tmp_fields");
- if(tmp_fields>0)
- Skip_SL( "tmp_pts");
- if(tmp_fields>1)
- Skip_VS( "tmp_mul");
- if(tmp_fields>2)
- Skip_VS( "tmp_stream");
- if(tmp_fields>3)
- Get_VS (tmp_size, "tmp_size");
- else
- tmp_size=0;
- if(tmp_fields>4)
- Get_VS (tmp_res, "tmp_res");
- else
- tmp_res=0;
- if(tmp_fields>5)
- Skip_VS( "count");
- else
- count=tmp_mul-tmp_size;
- for(int64u j=6; j<tmp_fields; j++)
- Skip_VS( "tmp_reserved[i]");
-
- for(int64u j=0; j<count && i<256; j++, i++)
- {
- if (i == 'N')
- {
- //flags[i]= FLAG_INVALID;
- j--;
- continue;
- }
- //flags[i]= tmp_flag;
- //stream_id[i]= tmp_stream;
- //data_size_mul[i]= tmp_mul;
- //data_size_lsb[i]= tmp_size + j;
- //pts_delta[i]= tmp_pts;
- //reserved_count[i]= tmp_res;
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Nut::stream()
-{
- Element_Name("stream");
-
- //Parsing
- int64u stream_class, fourcc_length, codec_specific_data_length;
- Skip_VS( "stream_id");
- Get_VS (stream_class, "stream_class");
- Get_VS (fourcc_length, "fourcc length");
- switch (fourcc_length)
- {
- case 2 : Skip_C2( "fourcc"); break;
- case 4 : Skip_C4( "fourcc"); break;
- default: Skip_XX(fourcc_length, "fourcc");
- }
- Skip_VS( "time_base_id");
- Skip_VS( "msb_pts_shift");
- Skip_VS( "max_pts_distance");
- Skip_VS( "decode_delay");
- Skip_VS( "stream_flags");
- Get_VS (codec_specific_data_length, "codec_specific_data length");
- Skip_XX(codec_specific_data_length, "codec_specific_data");
- switch (stream_class)
- {
- case 0 : //video
- {
- Skip_VS( "width");
- Skip_VS( "height");
- Skip_VS( "sample_width");
- Skip_VS( "sample_height");
- Skip_VS( "colorspace_type");
- }
- break;
- case 1 : //audio
- {
- Skip_VS( "samplerate_num");
- Skip_VS( "samplerate_denom");
- Skip_VS( "channel_count");
- }
- break;
- case 2 : //subtitles
- {
- }
- break;
- case 3 : //userdata
- {
- }
- break;
- default: ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Nut::syncpoint()
-{
- Element_Name("syncpoint");
-}
-
-//---------------------------------------------------------------------------
-void File_Nut::index()
-{
- Element_Name("index");
-}
-
-//---------------------------------------------------------------------------
-void File_Nut::info()
-{
- Element_Name("info");
-}
-
-*/
-
-}
-
-#endif //MEDIAINFO_NUT_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Nut.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Nut.h
deleted file mode 100644
index b7e7c47ab..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Nut.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Nut files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_NutH
-#define MediaInfo_File_NutH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Nut
-//***************************************************************************
-
-class File_Nut : public File__Analyze
-{
-private :
- //Buffer
- void Header_Parse();
- void FileHeader_Parse();
- void Data_Parse();
-
- //Elements
- void main();
- void stream();
- void syncpoint();
- void index();
- void info();
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg.cpp
deleted file mode 100644
index 6332b76f6..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg.cpp
+++ /dev/null
@@ -1,393 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_OGG_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Ogg.h"
-#include "MediaInfo/Multiple/File_Ogg_SubElement.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Ogg::File_Ogg()
-:File__Analyze()
-{
- //Configuration
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
-
- //In
- SizedBlocks=false;
- XiphLacing=false;
-
- //Temp - Global
- StreamsToDo=0;
- Parsing_End=false;
-
- //Temp - Stream
- Chunk_Sizes_Finished=true;
- packet_type=0;
- continued=false;
- eos=false;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ogg::Streams_Fill()
-{
- std::map<int64u, stream>::iterator Stream_Temp=Stream.begin();
- while (Stream_Temp!=Stream.end())
- {
- //Filling
- if (Stream_Temp->second.Parser)
- {
- Stream_Temp->second.Parser->Fill();
- Merge(*Stream_Temp->second.Parser);
- Merge(*Stream_Temp->second.Parser, Stream_General, 0, 0);
- Stream_Temp->second.StreamKind=((File_Ogg_SubElement*)Stream_Temp->second.Parser)->StreamKind;
- Stream_Temp->second.StreamPos=Count_Get(Stream_Temp->second.StreamKind)-1;
- if (!SizedBlocks && !XiphLacing)
- Stream_Temp->second.absolute_granule_position_Resolution=((File_Ogg_SubElement*)Stream_Temp->second.Parser)->absolute_granule_position_Resolution;
- if (Stream_Temp->second.StreamKind==Stream_Audio && Stream_Temp->second.absolute_granule_position_Resolution==0)
- Stream_Temp->second.absolute_granule_position_Resolution=Retrieve(Stream_Audio, Stream_Temp->second.StreamPos, Audio_SamplingRate).To_int64u();
- if (!IsSub && Stream_Temp->second.absolute_granule_position && Stream_Temp->second.absolute_granule_position_Resolution)
- {
- if (Stream_Temp->second.StreamKind==Stream_Audio)
- Fill(Stream_Temp->second.StreamKind, Stream_Temp->second.StreamPos, Fill_Parameter(Stream_Temp->second.StreamKind, Generic_Duration), float64_int64s(((float64)(Stream_Temp->second.absolute_granule_position))*1000/Stream_Temp->second.absolute_granule_position_Resolution), 10, true);
- }
- if (!IsSub)
- {
- if (Stream_Temp->second.StreamKind==Stream_Max)
- {
- Stream_Temp->second.StreamKind=Stream_General;
- Stream_Temp->second.StreamPos=0;
- }
- Fill(Stream_Temp->second.StreamKind, Stream_Temp->second.StreamPos, General_ID, Stream_Temp->first);
- Fill(Stream_Temp->second.StreamKind, Stream_Temp->second.StreamPos, General_ID_String, Ztring::ToZtring(Stream_Temp->first)+__T(" (0x")+Ztring::ToZtring(Stream_Temp->first, 16)+__T(')'), true);
- }
- }
- ++Stream_Temp;
- }
-
- Fill(Stream_General, 0, General_Format, "OGG", Unlimited, true, true);
- if (Count_Get(Stream_Video)==0 && Count_Get(Stream_Image)==0)
- Fill(Stream_General, 0, General_InternetMediaType, "audio/ogg", Unlimited, true, true);
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg::Streams_Finish()
-{
- std::map<int64u, stream>::iterator Stream_Temp=Stream.begin();
- while (Stream_Temp!=Stream.end())
- {
- //Filling
- if (Stream_Temp->second.Parser)
- {
- Finish(Stream_Temp->second.Parser);
- Merge(*Stream_Temp->second.Parser, Stream_Temp->second.StreamKind, 0, Stream_Temp->second.StreamPos);
- Merge(*Stream_Temp->second.Parser, Stream_General, 0, 0);
- }
- ++Stream_Temp;
- }
-
- //No more need
- if (!File_Name.empty()) //Only if this is not a buffer, with buffer we can have more data
- Stream.clear();
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Ogg::FileHeader_Begin()
-{
- //Must have enough buffer for having header
- if (Buffer_Size<4)
- return false; //Must wait for more data
-
- //False positives detection: Detect AVI files, or the parser can synchronize with OggS stream in a AVI chunk
- if (CC4(Buffer)==0x52494646) //"RIFF"
- {
- Finish("OGG");
- return false;
- }
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Ogg::Synchronize()
-{
- //Synchronizing
- while (Buffer_Offset+4<=Buffer_Size)
- {
- while(Buffer_Offset+4<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x4F
- || Buffer[Buffer_Offset+1]!=0x67
- || Buffer[Buffer_Offset+2]!=0x67
- || Buffer[Buffer_Offset+3]!=0x53)) //"OggS"
- {
- Buffer_Offset+=1+2;
- while(Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x67)
- Buffer_Offset+=2;
- if (Buffer_Offset>=Buffer_Size || Buffer[Buffer_Offset-1]==0x67)
- Buffer_Offset--;
- Buffer_Offset--;
- }
-
- if (Buffer_Offset+4<=Buffer_Size) //Testing if size is coherant
- {
- //Retrieving some info
- if (Buffer_Offset+27>Buffer_Size)
- return false; //Need more data
- int8u page_segments=CC1(Buffer+Buffer_Offset+26);
- if (Buffer_Offset+27+page_segments>Buffer_Size)
- return false; //Need more data
- size_t Size=0;
- for (int8u Pos=0; Pos<page_segments; Pos++)
- Size+=CC1(Buffer+Buffer_Offset+27+Pos);
-
- //Testing
- if (Buffer_Offset+27+page_segments+Size+4>Buffer_Size)
- return false; //Need more data
- if (CC4(Buffer+Buffer_Offset+27+page_segments+Size)!=0x4F676753) //"OggS"
- Buffer_Offset++;
- else
- break;
- }
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+4>Buffer_Size)
- {
- if (Buffer_Offset+3==Buffer_Size && CC3(Buffer+Buffer_Offset)!=0x4F6767) //"Ogg"
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && CC2(Buffer+Buffer_Offset)!=0x4F67) //"Og"
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && CC1(Buffer+Buffer_Offset)!=0x4F) //"O"
- Buffer_Offset++;
- return false;
- }
-
- //Synched is OK
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Ogg::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+4>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (CC4(Buffer+Buffer_Offset)!=0x4F676753) //"OggS"
- Synched=false;
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ogg::Header_Parse()
-{
- //Specific case
- if (SizedBlocks)
- {
- int16u Size;
- Get_B2 (Size, "Size");
-
- Chunk_Sizes.clear();
- Chunk_Sizes.push_back(Size);
- Header_Fill_Size(2+Size);
- Header_Fill_Code(0, Ztring::ToZtring(0, 16));
- return;
- }
- if (XiphLacing)
- {
- if (Chunk_Sizes.empty())
- {
- int8u CountMinus1;
- Get_B1 (CountMinus1, "Number of frames minus one");
-
- int64u UsedSize=0;
- for (size_t Pos=0; Pos<CountMinus1; Pos++)
- {
- int32u Size=0;
- int8u Size8;
- do
- {
- Get_B1 (Size8, "Size");
- Size+=Size8;
- }
- while (Size8==0xFF);
- Param_Info1(Size);
- Chunk_Sizes.push_back(Size);
- UsedSize+=Size;
- }
- Chunk_Sizes.push_back((size_t)(Element_Size-UsedSize-1));
- }
-
- Header_Fill_Size(Element_Size);
- Header_Fill_Code(0, Ztring::ToZtring(0, 16));
- return;
- }
-
- //Parsing
- int64u absolute_granule_position;
- int32u stream_serial_number, page_sequence_no;
- int16u total_page_size;
- int8u stream_structure_version, flags, page_segments, packet_lacing_value;
- Skip_C4( "capture_pattern");
- Get_L1 (stream_structure_version, "stream_structure_version");
- Get_L1 (flags, "header_type_flag");
- Get_Flags (flags, 0, continued, "continued packet");
- Skip_Flags(flags, 1, "first page of logical bitstream (bos)");
- Get_Flags (flags, 2, eos, "last page of logical bitstream (eos)");
- Get_L8 (absolute_granule_position, "absolute granule position");
- Get_L4 (stream_serial_number, "stream serial number");
- Get_L4 (page_sequence_no, "page sequence no");
- Skip_L4( "page checksum");
- Get_L1 (page_segments, "page_segments");
- total_page_size=0;
- Chunk_Sizes.clear();
- Chunk_Sizes.push_back(0);
- for (int8u Pos=0; Pos<page_segments; Pos++)
- {
- Get_L1 (packet_lacing_value, "packet lacing value");
- total_page_size+=packet_lacing_value;
- Chunk_Sizes[Chunk_Sizes.size()-1]+=packet_lacing_value;
- if (packet_lacing_value!=0xFF)
- {
- Chunk_Sizes.push_back(0);
- Chunk_Sizes_Finished=true;
- }
- else
- Chunk_Sizes_Finished=false;
- }
- if (Chunk_Sizes_Finished)
- Chunk_Sizes.resize(Chunk_Sizes.size()-1); //Keep out the last value
-
- //Filling
- Header_Fill_Size(27+page_segments+total_page_size);
- Header_Fill_Code(stream_serial_number, Ztring::ToZtring(stream_serial_number, 16));
- Stream[stream_serial_number].absolute_granule_position=absolute_granule_position;
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg::Data_Parse()
-{
- //Counting
- Frame_Count++;
-
- //If first chunk of a stream
- stream& Stream_Item=Stream[Element_Code]; //[+] FlylinkDC++ Team
- if (Stream_Item.Parser==NULL)
- {
- if (Parsing_End)
- return; //Maybe multitracks concatained, not supported
- Stream_Item.Parser=new File_Ogg_SubElement;
- Open_Buffer_Init(Stream_Item.Parser);
- ((File_Ogg_SubElement*)Stream_Item.Parser)->InAnotherContainer=IsSub;
- StreamsToDo++;
- }
- ((File_Ogg_SubElement*)Stream_Item.Parser)->MultipleStreams=Stream.size()>1; //has no sens for the first init, must check allways
-
- //Parsing
- File_Ogg_SubElement* Parser=(File_Ogg_SubElement*)Stream_Item.Parser;
- if (Stream_Item.SearchingPayload)
- //For each chunk
- for (size_t Chunk_Sizes_Pos=0; Chunk_Sizes_Pos<Chunk_Sizes.size(); Chunk_Sizes_Pos++)
- {
- //Info
- if (!continued)
- Peek_L1(packet_type); //Only for information
- Element_Info1(Ztring::ToZtring(packet_type, 16));
- Element_Info1C((continued), "Continue");
-
- //Parsing
- if (continued || Parser->File_Offset!=Parser->File_Size)
- Open_Buffer_Continue(Parser, Buffer+Buffer_Offset+(size_t)Element_Offset, Chunk_Sizes[Chunk_Sizes_Pos]);
- if (Chunk_Sizes_Pos<Chunk_Sizes.size()-1
- || (Chunk_Sizes_Pos==Chunk_Sizes.size()-1 && Chunk_Sizes_Finished))
- {
- Open_Buffer_Continue(Parser, Buffer+Buffer_Offset, 0); //Purge old datas
- }
-
- Element_Offset+=Chunk_Sizes[Chunk_Sizes_Pos];
- continued=false; //If there is another chunk, this can not be a continued chunk
- if (Parser->File_GoTo!=(int64u)-1)
- Chunk_Sizes_Pos=Chunk_Sizes.size();
-
- if (!Status[IsAccepted] && Parser->Status[IsAccepted])
- Accept("OGG");
- if (Parser->Status[IsFinished] || (Element_Offset==Element_Size && eos))
- {
- StreamsToDo--;
- Stream_Item.SearchingPayload=false;
- break;
- }
- }
- else
- Skip_XX(Element_Size, "Data");
-
- //End of stream
- if (!Parsing_End &&
- (StreamsToDo==0 || File_Offset+Buffer_Offset+Element_Offset>256*1024))
- {
- if (IsSub)
- Finish("OGG");
- else
- GoToFromEnd(256*1024, "OGG");
- std::map<int64u, stream>::iterator Stream_Temp=Stream.begin();
- if (File_GoTo!=(int64u)-1)
- while (Stream_Temp!=Stream.end())
- {
- Stream_Temp->second.absolute_granule_position=0;
- ++Stream_Temp;
- }
- Parsing_End=true;
- }
-
- Element_Show();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_OGG_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg.h
deleted file mode 100644
index e1429a8c5..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Ogg files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_OggH
-#define MediaInfo_File_OggH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Ogg
-//***************************************************************************
-
-class File_Ogg : public File__Analyze
-{
-public :
- //In
- bool SizedBlocks;
- bool XiphLacing;
-
- //Constructor/Destructor
- File_Ogg();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
-
- //Buffer - Per element
- void Header_Parse();
- void Header_Parse_AdaptationField();
- void Data_Parse();
-
- //Temp - Global
- int32u StreamsToDo;
- bool Parsing_End;
-
- //Temp - Stream
- struct stream
- {
- File__Analyze* Parser;
- stream_t StreamKind;
- size_t StreamPos;
- bool SearchingPayload;
- bool SearchingTimeCode;
- int64u absolute_granule_position;
- int64u absolute_granule_position_Resolution;
-
- stream()
- {
- Parser=NULL;
- StreamKind=Stream_Max;
- StreamPos=(size_t)-1;
- SearchingPayload=true;
- SearchingTimeCode=true;
- absolute_granule_position=0;
- absolute_granule_position_Resolution=0;
- }
- ~stream()
- {
- delete Parser; //Parser=NULL
- }
- };
-
- int8u packet_type;
- bool continued;
- bool eos;
- bool continued_NextFrame;
- std::map<int64u, stream> Stream;
- std::vector<size_t> Chunk_Sizes;
- bool Chunk_Sizes_Finished;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg_SubElement.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg_SubElement.cpp
deleted file mode 100644
index 3b830ebbb..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg_SubElement.cpp
+++ /dev/null
@@ -1,900 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_OGG_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Ogg_SubElement.h"
-#include "MediaInfo/Tag/File_VorbisCom.h"
-#include "ZenLib/ZtringListList.h"
-#include "ZenLib/BitStream.h"
-#include "ZenLib/Utils.h"
-#include <cmath>
-#include <memory>
-#if defined(MEDIAINFO_DIRAC_YES)
- #include "MediaInfo/Video/File_Dirac.h"
-#endif
-#if defined(MEDIAINFO_MPEG4V_YES)
- #include "MediaInfo/Video/File_Mpeg4v.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_CELT_YES)
- #include "MediaInfo/Audio/File_Celt.h"
-#endif
-#if defined(MEDIAINFO_FLAC_YES)
- #include "MediaInfo/Audio/File_Flac.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if defined(MEDIAINFO_OPUS_YES)
- #include "MediaInfo/Audio/File_Opus.h"
-#endif
-#if defined(MEDIAINFO_SPEEX_YES)
- #include "MediaInfo/Audio/File_Speex.h"
-#endif
-#if defined(MEDIAINFO_THEORA_YES)
- #include "MediaInfo/Video/File_Theora.h"
-#endif
-#if defined(MEDIAINFO_VORBIS_YES)
- #include "MediaInfo/Audio/File_Vorbis.h"
-#endif
-#if defined(MEDIAINFO_CMML_YES)
- #include "MediaInfo/Text/File_Cmml.h"
-#endif
-#if defined(MEDIAINFO_KATE_YES)
- #include "MediaInfo/Text/File_Kate.h"
-#endif
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-#ifdef __BORLANDC__ //Borland converts int64u to int32u without error or warning
- #define OGG_ID(NAME, PART1, PART2, COUNT) \
- const int32u Identifier_##NAME##1=0x##PART1; \
- const int32u Identifier_##NAME##2=0x##PART2; \
- const size_t Identifier_##NAME##3=0x##COUNT; \
-
-#elif defined(WINDOWS) //__BORLANDC__
- #define OGG_ID(NAME, PART1, PART2, COUNT) \
- const int64u Identifier_##NAME=(int64u)0x##PART1##PART2##ULL; \
- const size_t Identifier_##NAME##3=0x##COUNT; \
-
-#else //__BORLANDC__
- #define OGG_ID(NAME, PART1, PART2, COUNT) \
- const int64u Identifier_##NAME=(int64u)0x##PART1##PART2##LL; \
- const size_t Identifier_##NAME##3=0x##COUNT; \
-
-#endif //__BORLANDC__
-
-namespace Elements
-{
- const int32u fLaC=0x664C6143;
-
- //http://wiki.xiph.org/index.php/MIMETypesCodecs
- OGG_ID(CELT, 43454C54, 20202020, 8)
- OGG_ID(CMML, 434D4D4C, 00000000, 8)
- OGG_ID(BBCD, 42, 42434400, 5)
- OGG_ID(FLAC, 7F, 464C4143, 5)
- OGG_ID(JNG, 8B4A4E47, 0D0A1A0A, 8)
- OGG_ID(kate, 806B6174, 65000000, 8)
- OGG_ID(kateTags, 6B617465, 00000000, 8)
- OGG_ID(KW_DIRAC, 4B572D44, 49524143, 8)
- OGG_ID(OggMIDI, 4D67674D, 49444900, 8)
- OGG_ID(MNG, 8A4D4E47, 0D0A1A0A, 8)
- OGG_ID(OpusHead, 4F707573, 48656164, 8)
- OGG_ID(OpusTags, 4F707573, 54616773, 8)
- OGG_ID(PCM, 50434D20, 20202020, 8)
- OGG_ID(PNG, 89504E47, 0D0A1A0A, 8)
- OGG_ID(Speex, 53706565, 78202020, 8)
- OGG_ID(theora, 807468, 656F7261, 7)
- OGG_ID(vorbis, 01766F, 72626973, 7)
- OGG_ID(YUV4MPEG, 59555634, 4D504547, 8)
-
- //Not Xiph registered, but found
- OGG_ID(video, 017669, 64656F00, 7)
- OGG_ID(audio, 016175, 64696F00, 7)
- OGG_ID(text, 017465, 78740000, 7)
- OGG_ID(fLaC, 0, 664C6143, 4)
-
- //Ogg Skeleton
- OGG_ID(fishead, 66697368, 65616400, 8)
- OGG_ID(fisbone, 66697362, 6F6E6500, 8)
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Ogg_SubElement::File_Ogg_SubElement()
-:File__Analyze()
-{
- //In
- StreamKind=Stream_Max;
- MultipleStreams=false;
- InAnotherContainer=false;
- absolute_granule_position_Resolution=0;
-
- //Temp
- Parser=NULL;
- OldSize=0;
- Identified=false;
- WithType=true;
-}
-
-//---------------------------------------------------------------------------
-File_Ogg_SubElement::~File_Ogg_SubElement()
-{
- delete Parser; //Parser=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Streams_Fill()
-{
- if (Parser==NULL)
- return;
-
- Fill(Parser);
- if (Parser->Count_Get(Stream_Video))
- {
- //Hack - Before
- Ztring Codec_Temp=Retrieve(Stream_Video, 0, Video_Codec); //We want to keep the 4CC of AVI
-
- Merge(*Parser, Stream_Video, 0, 0);
-
- //Hacks - After
- if (!Codec_Temp.empty())
- Fill(Stream_Video, StreamPos_Last, Video_Codec, Codec_Temp, true);
- }
- if (Parser->Count_Get(Stream_Audio))
- {
- //Hack - Before
- Ztring Codec_Temp=Retrieve(Stream_Audio, 0, Audio_Codec); //We want to keep the 2CC of AVI
-
- Merge(*Parser, Stream_Audio, 0, 0);
-
- //Hacks - After
- if (!Codec_Temp.empty())
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Codec_Temp, true);
- }
- Merge(*Parser, Stream_Text, 0, 0);
- Merge(*Parser, Stream_Image, 0, 0);
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Streams_Finish()
-{
- if (Parser==NULL)
- return;
-
- Finish(Parser);
- if (Parser->Count_Get(Stream_Video))
- {
- //Hack - Before
- Ztring Codec_Temp=Retrieve(Stream_Video, 0, Video_Codec); //We want to keep the 4CC of AVI
-
- Merge(*Parser, Stream_Video, 0, 0);
-
- //Hacks - After
- if (!Codec_Temp.empty())
- Fill(Stream_Video, StreamPos_Last, Video_Codec, Codec_Temp, true);
- }
- if (Parser->Count_Get(Stream_Audio))
- {
- //Hack - Before
- Ztring Codec_Temp=Retrieve(Stream_Audio, 0, Audio_Codec); //We want to keep the 2CC of AVI
-
- Merge(*Parser, Stream_Audio, 0, 0);
-
- //Hacks - After
- if (!Codec_Temp.empty())
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Codec_Temp, true);
- }
- Merge(*Parser, Stream_Text, 0, 0);
- Merge(*Parser, Stream_Image, 0, 0);
-}
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::FileHeader_Parse()
-{
- Accept("OGG (Sub element)");
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Ogg_SubElement::Header_Begin()
-{
- //Already parsed (there is only one pass)
- if (Buffer_Offset!=0)
- return false;
-
- //We are waiting for the end of the stream, signaled by a empty buffer adding
- if (Buffer_Size!=OldSize)
- {
- OldSize=Buffer_Size;
- return false;
- }
- else
- {
- OldSize=0;
- return true;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Header_Parse()
-{
- //Parsing
- int8u Type;
- if (Identified && WithType)
- {
- bool lenbytes0, lenbytes1, lenbytes2;
- Get_L1 (Type, "Type");
- Skip_Flags(Type, 0, "Indicates data packet");
- Get_Flags (Type, 1, lenbytes2, "Bit 2 of lenbytes");
- Skip_Flags(Type, 2, "unused");
- Skip_Flags(Type, 3, "Keyframe");
- Skip_Flags(Type, 4, "unused");
- Skip_Flags(Type, 5, "unused");
- Get_Flags (Type, 6, lenbytes0, "Bit 0 of lenbytes");
- Get_Flags (Type, 7, lenbytes1, "Bit 1 of lenbytes");
- if ((Type&0x01)==0) //TODO : find a better algo
- {
- if (lenbytes2)
- {
- if (lenbytes1)
- {
- if (lenbytes0)
- Skip_L7( "SamplesCount");
- else
- Skip_L6( "SamplesCount");
- }
- else
- {
- if (lenbytes0)
- Skip_L5( "SamplesCount");
- else
- Skip_L4( "SamplesCount");
- }
- }
- else
- {
- if (lenbytes1)
- {
- if (lenbytes0)
- Skip_L3 ( "SamplesCount");
- else
- Skip_L2 ( "SamplesCount");
- }
- else
- {
- if (lenbytes0)
- Skip_L1 ( "SamplesCount");
- }
- }
- }
- //Filling
- Header_Fill_Code(Type, Ztring::ToZtring(Type, 16));
- }
- else
- //Filling
- Header_Fill_Code(0, "Identification");
-
- //Filling
- Header_Fill_Size(Element_Size);
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Data_Parse()
-{
- //Parsing
- if (!Identified)
- Identification();
- else if (!WithType)
- Default();
- else
- switch (Element_Code&0x7F)
- {
- case 0x01 :
- case 0x03 : Comment(); break;
- case 0x00 :
- case 0x02 :
- case 0x05 :
- case 0x08 : Default(); break;
- default : Skip_XX(Element_Size, "Unknown");
- Finish("OggSubElement");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification()
-{
- Element_Name("Identification");
-
- //Parsing
- int64u ID_Identification;
- if (Element_Size==4)
- {
- int32u ID_Identification_32;
- Peek_B4(ID_Identification_32);
- ID_Identification=((int64u)ID_Identification_32)<<32;
- }
- else
- Peek_B8(ID_Identification);
-
- //Filling
- #undef ELEMENT_CASE
- #ifdef __BORLANDC__ //Borland converts int64u to int32u
- #define ELEMENT_CASE(_NAME) \
- else if (ID_Identification>>(64-8*Elements::Identifier_##_NAME##3)==(((int64u)Elements::Identifier_##_NAME##1)*0x100000000LL+Elements::Identifier_##_NAME##2)) Identification_##_NAME();
-
- #else //__BORLANDC__
- #define ELEMENT_CASE(_NAME) \
- else if (ID_Identification>>(64-8*Elements::Identifier_##_NAME##3)==Elements::Identifier_##_NAME) Identification_##_NAME();
-
- #endif //__BORLANDC__
-
- if (0) ;
- ELEMENT_CASE(CELT)
- ELEMENT_CASE(CMML)
- ELEMENT_CASE(BBCD)
- ELEMENT_CASE(FLAC)
- ELEMENT_CASE(JNG)
- ELEMENT_CASE(kate)
- ELEMENT_CASE(KW_DIRAC)
- ELEMENT_CASE(OggMIDI)
- ELEMENT_CASE(MNG)
- ELEMENT_CASE(OpusHead)
- ELEMENT_CASE(PCM)
- ELEMENT_CASE(PNG)
- ELEMENT_CASE(Speex)
- ELEMENT_CASE(theora)
- ELEMENT_CASE(vorbis)
- ELEMENT_CASE(YUV4MPEG)
- ELEMENT_CASE(video)
- ELEMENT_CASE(audio)
- ELEMENT_CASE(text)
- ELEMENT_CASE(fLaC)
- ELEMENT_CASE(fishead)
- ELEMENT_CASE(fisbone)
- else
- {
- Skip_XX(Element_Size, "Unknown");
- Accept("OggSubElement");
- Finish("OggSubElement");
- return;
- }
- Open_Buffer_Init(Parser);
-
- //Parsing
- Default();
-
- //Filling
- StreamKind=StreamKind_Last;
- if (0) ;
- ELEMENT_CASE(fishead)
- ELEMENT_CASE(fisbone)
- else
- Identified=true;
- Accept("OggSubElement");
- Element_Show();
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_CELT()
-{
- #if defined(MEDIAINFO_CELT_YES)
- StreamKind_Last=Stream_Audio;
- Parser=new File_Celt;
- #else
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "celt");
- Fill(Stream_Audio, 0, Audio_Codec, "celt");
- #endif
- WithType=false;
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_CMML()
-{
- #if defined(MEDIAINFO_CMML_YES)
- StreamKind_Last=Stream_Text;
- Parser=new File_Cmml;
- #else
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Format, "CMML");
- Fill(Stream_Text, 0, Text_Codec, "CMML");
- #endif
- WithType=false;
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_BBCD()
-{
- #if defined(MEDIAINFO_DIRAC_YES)
- StreamKind_Last=Stream_Video;
- Parser=new File_Dirac;
- ((File_Dirac*)Parser)->Ignore_End_of_Sequence=true;
- #else
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "Dirac");
- Fill(Stream_Video, 0, Video_Codec, "Dirac");
- #endif
- WithType=false;
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_FLAC()
-{
- #if defined(MEDIAINFO_FLAC_YES)
- StreamKind_Last=Stream_Audio;
- Parser=new File_Flac;
- ((File_Flac*)Parser)->VorbisHeader=true;
- #else
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "FLAC");
- Fill(Stream_Audio, 0, Audio_Codec, "FLAC");
- #endif
- WithType=false;
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_JNG()
-{
- #if defined(MEDIAINFO__YES)
- StreamKind_Last=Stream_Video;
- Parser=new File_Jng;
- #else
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "JNG");
- Fill(Stream_Video, 0, Video_Codec, "JNG");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_kate()
-{
- #if defined(MEDIAINFO_KATE_YES)
- StreamKind_Last=Stream_Text;
- Parser=new File_Kate;
- #else
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Format, "Kate");
- Fill(Stream_Text, 0, Text_Codec, "Kate");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_KW_DIRAC()
-{
- Identification_BBCD();
- Fill(Stream_Video, 0, Video_CodecID, "KW-DIRAC", Unlimited, true, true);
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_OggMIDI()
-{
- #if defined(MEDIAINFO__YES)
- StreamKind_Last=Stream_Audio;
- Parser=new File_Midi;
- #else
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "Midi");
- Fill(Stream_Audio, 0, Audio_Codec, "Midi");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_OpusHead()
-{
- #if defined(MEDIAINFO_OPUS_YES)
- StreamKind_Last=Stream_Audio;
- Parser=new File_Opus;
- #else
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "Opus");
- Fill(Stream_Audio, 0, Audio_Codec, "Opus");
- #endif
- WithType=false;
- absolute_granule_position_Resolution=48000; // From specs: "It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate."
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_MNG()
-{
- #if defined(MEDIAINFO__YES)
- StreamKind_Last=Stream_Video;
- Parser=new File_Mng;
- #else
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "MNG");
- Fill(Stream_Video, 0, Video_Codec, "MNG");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_PCM()
-{
- #if defined(MEDIAINFO__YES)
- StreamKind_Last=Stream_Audio;
- Parser=new File_Pcm;
- #else
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "PCM");
- Fill(Stream_Audio, 0, Audio_Codec, "PCM");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_PNG()
-{
- #if defined(MEDIAINFO__YES)
- StreamKind_Last=Stream_Video;
- Parser=new File_Png;
- #else
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "PNG");
- Fill(Stream_Video, 0, Video_Codec, "PNG");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_Speex()
-{
- #if defined(MEDIAINFO_SPEEX_YES)
- StreamKind_Last=Stream_Audio;
- Parser=new File_Speex;
- #else
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "Speex");
- Fill(Stream_Audio, 0, Audio_Codec, "Speex");
- #endif
- WithType=false;
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_theora()
-{
- #if defined(MEDIAINFO_THEORA_YES)
- StreamKind_Last=Stream_Video;
- Parser=new File_Theora;
- #else
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Video, 0, Text_Format, "Theora");
- Fill(Stream_Video, 0, Text_Codec, "Theora");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_vorbis()
-{
- #if defined(MEDIAINFO_VORBIS_YES)
- StreamKind_Last=Stream_Audio;
- Parser=new File_Vorbis;
- #else
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Text_Format, "Vorbis");
- Fill(Stream_Audio, 0, Text_Codec, "Vorbis");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_YUV4MPEG()
-{
- #if defined(MEDIAINFO__YES)
- StreamKind_Last=Stream_Video;
- Parser=new File_Yuv;
- #else
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "YUV");
- Fill(Stream_Video, 0, Video_Codec, "YUV");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_video()
-{
- Element_Info1("Video");
-
- //Parsing
- int64u TimeUnit;
- int32u fccHandler, Width, Height;
- Skip_B1 ( "Signature");
- Skip_Local(6, "Signature");
- Skip_L2( "Reserved");
- Get_C4 (fccHandler, "fccHandler");
- Skip_L4( "SizeOfStructure");
- Get_L8 (TimeUnit, "TimeUnit"); //10000000/TimeUnit is stream tick rate in ticks/sec
- Skip_L4( "SamplesPerUnit");
- Skip_L8( "DefaultLengh"); //in media time
- Skip_L4( "BufferSize");
- Skip_L2( "BitsPerSample");
- Skip_L2( "Reserved");
- Get_L4 (Width, "Width");
- Get_L4 (Height, "Height");
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-
- //Filling
- Stream_Prepare(Stream_Video);
- CodecID_Fill(Ztring().From_CC4(fccHandler), Stream_Video, StreamPos_Last, InfoCodecID_Format_Riff);
- Fill(Stream_Video, StreamPos_Last, Video_Codec, Ztring().From_CC4(fccHandler));
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, (float)10000000/(float)TimeUnit, 3);
- Fill(Stream_Video, StreamPos_Last, Video_Width, Width);
- Fill(Stream_Video, StreamPos_Last, Video_Height, Height);
-
- //Creating the parser
- if (0);
- #if defined(MEDIAINFO_MPEG4V_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(fccHandler))==__T("MPEG-4 Visual"))
- {
- Parser=new File_Mpeg4v;
- ((File_Mpeg4v*)Parser)->FrameIsAlwaysComplete=true;
- }
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_audio()
-{
- Element_Info1("Audio");
-
- //Parsing
- int64u TimeUnit, SamplesPerUnit;
- int32u fccHandler, AvgBytesPerSec;
- int16u Channels;
- Skip_B1 ( "Signature");
- Skip_Local(6, "Signature");
- Skip_L2( "Reserved");
- Get_C4 (fccHandler, "fccHandler");
- Skip_L4( "SizeOfStructure");
- Get_L8 (TimeUnit, "TimeUnit"); //10000000/TimeUnit is stream tick rate in ticks/sec
- Get_L8 (SamplesPerUnit, "SamplesPerUnit");
- Skip_L4( "DefaultLengh"); //in media time
- Skip_L4( "BufferSize");
- Skip_L2( "BitsPerSample");
- Skip_L2( "Reserved");
- Get_L2 (Channels, "Channels");
- Skip_L2( "BlockAlign");
- Get_L4 (AvgBytesPerSec, "AvgBytesPerSec");
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-
- //Filling
- Stream_Prepare(Stream_Audio);
- Ztring Codec; Codec.From_CC4(fccHandler);
- Codec.TrimLeft(__T('0'));
- CodecID_Fill(Codec, Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Codec);
- if (AvgBytesPerSec<0x80000000) //This is a signed value, and negative values are not OK
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate, AvgBytesPerSec*8);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Channels==5?6:Channels); //5 channels are 5.1
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, SamplesPerUnit);
- absolute_granule_position_Resolution=SamplesPerUnit;
-
- //Creating the parser
- if (0);
- #if defined(MEDIAINFO_MPEGA_YES)
- else if (MediaInfoLib::Config.Codec_Get(Codec, InfoCodec_KindofCodec).find(__T("MPEG-"))==0)
- {
- Parser=new File_Mpega;
- }
- #endif
- #if defined(MEDIAINFO_AC3_YES)
- else if (fccHandler==0x32303030)
- {
- Parser=new File_Ac3;
- ((File_Ac3*)Parser)->Frame_Count_Valid=2;
- }
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_text()
-{
- Element_Info1("Text");
-
- //Parsing
- Skip_B1 ( "Signature");
- Skip_Local(6, "Signature");
- Skip_L2( "Reserved");
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-
- //Filling
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, StreamPos_Last, Text_Format, "Subrip");
- Fill(Stream_Text, StreamPos_Last, Text_Codec, "Subrip");
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_fLaC()
-{
- #if defined(MEDIAINFO_FLAC_YES)
- Parser=new File_Flac;
- StreamKind_Last=Stream_Audio;
- #endif
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "FLAC");
- Fill(Stream_Audio, 0, Audio_Codec, "FLAC");
- Fill(Stream_Audio, 0, Audio_MuxingMode, "pre-FLAC 1.1.1");
- WithType=false;
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_fishead()
-{
- //Quick workaroud for Identification bool
- if (Element_Offset==Element_Size)
- return;
-
- Element_Info1("Skeleton");
-
- //Parsing
- int16u VersionMajor;
- Skip_Local(7, "Signature");
- Skip_B1 ( "Signature");
- Get_L2 (VersionMajor, "Version major");
- if (VersionMajor==3)
- {
- Skip_L2( "Version minor");
- Skip_L8( "Presentationtime numerator");
- Skip_L8( "Presentationtime denominator");
- Skip_L8( "Basetime numerator");
- Skip_L8( "Basetime denominator");
- Skip_L16( "UTC");
- Skip_L4( "UTC");
- }
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Identification_fisbone()
-{
- //Quick workaroud for Identification bool
- if (Element_Offset==Element_Size)
- return;
-
- Element_Info1("Skeleton");
-
- //Parsing
- int32u Offset;
- Skip_Local(7, "Signature");
- Skip_B1 ( "Signature");
- Get_L4 (Offset, "Offset to message header fields");
- Skip_L4( "Serial number");
- Skip_L4( "Number of header packets");
- Skip_L8( "Granulerate numerator");
- Skip_L8( "Granulerate denominator");
- Skip_L8( "Basegranule");
- Skip_L4( "Preroll");
- Skip_L1( "Granuleshift");
- if (Element_Offset<8+Offset)
- Skip_XX(8+Offset-Element_Offset, "Unknown");
- if (Element_Offset<Element_Size)
- Skip_Local(Element_Size-Element_Offset, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Comment()
-{
- //Integrity
- if (Element_Size<8)
- return;
-
- //Parsing
- int64u ID_Identification;
- Peek_B8(ID_Identification);
-
- #undef ELEMENT_CASE
- #ifdef __BORLANDC__ //Borland converts int64u to int32u
- #define ELEMENT_CASE(_NAME) \
- else if (ID_Identification>>(64-8*Elements::Identifier_##_NAME##3)==(((int64u)Elements::Identifier_##_NAME##1)*0x100000000LL|Elements::Identifier_##_NAME##2))
-
- #else //__BORLANDC__
- #define ELEMENT_CASE(_NAME) \
- else if (ID_Identification>>(64-8*Elements::Identifier_##_NAME##3)==Elements::Identifier_##_NAME)
-
- #endif //__BORLANDC__
-
- int32u ID_Identification_Size;
- if (0) ;
- ELEMENT_CASE(OpusTags) ID_Identification_Size=8;
- else if (WithType)
- {
- if (0) ;
- ELEMENT_CASE(kateTags) ID_Identification_Size=8;
- else
- ID_Identification_Size=6; //Default
- }
- else
- return; //Not a comment
-
- Element_Name("Comment");
-
- Skip_Local(ID_Identification_Size, "ID");
-
- //Preparing
- File_VorbisCom Vorbis;
- Vorbis.StreamKind_Specific=StreamKind;
- Vorbis.StreamKind_Multiple=MultipleStreams?StreamKind:Stream_General;
- Vorbis.StreamKind_Common=InAnotherContainer?StreamKind:Stream_General;
- Open_Buffer_Init(&Vorbis);
-
- //Parsing
- Open_Buffer_Continue(&Vorbis);
-
- //Filling
- Finish(&Vorbis);
- Merge(Vorbis, Stream_General, 0, 0);
- Merge(Vorbis, StreamKind, 0, 0);
- Merge(Vorbis, Stream_Menu, 0, 0);
-
- //Testing if we must continue
- if (Identified && (Parser==NULL || Parser->Status[IsFinished]))
- Finish("OggSubElement");
-}
-
-//---------------------------------------------------------------------------
-void File_Ogg_SubElement::Default()
-{
- Element_Name("Frame");
-
- if (Parser)
- {
- if (!WithType)
- Comment(); //In case of comments
- Open_Buffer_Continue(Parser);
- if (Identified && Parser->Status[IsFilled])
- Finish("OggSubElement");
- }
- else if (Element_Offset<Element_Size)
- {
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- if (Identified)
- Finish("OggSubElement");
- }
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_OGG_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg_SubElement.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg_SubElement.h
deleted file mode 100644
index 904b5d695..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ogg_SubElement.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about MPEG Transport Stream files, Program Map Section
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Ogg_Setup_VorbisH
-#define MediaInfo_Ogg_Setup_VorbisH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Ogg_SubElement
-//***************************************************************************
-
-class File_Ogg_SubElement : public File__Analyze
-{
-public :
- //In
- stream_t StreamKind;
- bool MultipleStreams;
- bool InAnotherContainer;
- int64u absolute_granule_position_Resolution;
-
-protected :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- void FileHeader_Parse ();
-
-public :
- File_Ogg_SubElement();
- ~File_Ogg_SubElement();
-
-private :
- //Buffer
- bool Header_Begin();
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Identification();
- void Identification_CELT();
- void Identification_CMML();
- void Identification_BBCD();
- void Identification_FLAC();
- void Identification_JNG();
- void Identification_kate();
- void Identification_KW_DIRAC();
- void Identification_OggMIDI();
- void Identification_MNG();
- void Identification_OpusHead();
- void Identification_PCM();
- void Identification_PNG();
- void Identification_Speex();
- void Identification_theora();
- void Identification_vorbis();
- void Identification_YUV4MPEG();
- void Identification_video();
- void Identification_audio();
- void Identification_text();
- void Identification_fLaC();
- void Identification_fishead();
- void Identification_fisbone();
- void Comment();
- void Default();
-
- //Temp
- File__Analyze* Parser;
- size_t OldSize;
- bool Identified;
- bool WithType;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_P2_Clip.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_P2_Clip.cpp
deleted file mode 100644
index 706a6a456..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_P2_Clip.cpp
+++ /dev/null
@@ -1,466 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_P2_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_P2_Clip.h"
-#include "MediaInfo/MediaInfo.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#include "ZenLib/Dir.h"
-#include "ZenLib/FileName.h"
-#include "tinyxml2.h"
-using namespace tinyxml2;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_P2_Clip::File_P2_Clip()
-:File__Analyze()
-{
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_None; //TODO
- StreamIDs_Width[0]=sizeof(size_t)*2;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent_Accept_Specific=true;
- #endif //MEDIAINFO_DEMUX
-
- //Temp
- ReferenceFiles=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_P2_Clip::~File_P2_Clip()
-{
- delete ReferenceFiles; //ReferenceFiles=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_P2_Clip::Streams_Finish()
-{
- if (ReferenceFiles==NULL)
- return;
-
- ReferenceFiles->ParseReferences();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_P2_Clip::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- if (ReferenceFiles==NULL)
- return 0;
-
- return ReferenceFiles->Seek(Method, Value, ID);
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_P2_Clip::FileHeader_Begin()
-{
- XMLDocument document;
- if (!FileHeader_Begin_XML(document))
- return false;
-
- {
- XMLElement* Root=document.FirstChildElement("P2Main");
- if (Root)
- {
- Accept("P2_Clip");
- Fill(Stream_General, 0, General_Format, "P2 Clip");
-
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
-
- XMLElement* ClipContent=Root->FirstChildElement("ClipContent");
- if (ClipContent)
- {
- XMLElement* ChildElement;
-
- //ID
- ChildElement=ClipContent->FirstChildElement("GlobalClipID");
- if (ChildElement)
- Fill(Stream_General, 0, General_UniqueID, ChildElement->GetText());
-
- //Duration
- Ztring Duration, EditUnit;
- ChildElement=ClipContent->FirstChildElement("Duration");
- if (ChildElement)
- Duration=ChildElement->GetText();
- ChildElement=ClipContent->FirstChildElement("EditUnit");
- if (ChildElement)
- EditUnit=ChildElement->GetText();
- int64u Duration_Frames=Duration.To_int64u();
- int64u EditUnit_Numerator=EditUnit.SubString(Ztring(), __T("/")).To_int64u();
- int64u EditUnit_Denominator=EditUnit.SubString(__T("/"), Ztring()).To_int64u();
- if (Duration_Frames && EditUnit_Numerator && EditUnit_Denominator)
- Fill(Stream_General, 0, General_Duration, ((float32)Duration_Frames)*1000*EditUnit_Numerator/EditUnit_Denominator, 0);
-
- //EssenceList
- XMLElement* EssenceList=ClipContent->FirstChildElement("EssenceList");
- if (EssenceList)
- {
- XMLElement* Track=EssenceList->FirstChildElement();
- #if defined(MEDIAINFO_MXF_YES)
- size_t Audio_Count=0;
- #endif
- while (Track)
- {
- string Field=Track->Value();
- if (Field=="Video")
- {
- sequence* Sequence=new sequence;
- float64 FrameRate=0;
-
- //FrameRate
- ChildElement=Track->FirstChildElement("FrameRate");
- if (ChildElement)
- {
- Ztring FrameRateS=Ztring(ChildElement->GetText());
- if (FrameRateS.find(__T("23.97"))==0)
- FrameRate=((float64)24)*1000/1001;
- else if (FrameRateS.find(__T("29.97"))==0)
- FrameRate=((float64)30)*1000/1001;
- else if (FrameRateS.find(__T("59.94"))==0)
- FrameRate=((float64)60)*1000/1001;
- else
- FrameRate=FrameRateS.To_float64();
- if (FrameRateS.find('i')!=string::npos)
- FrameRate/=2;
- Sequence->FrameRate_Set(FrameRate);
- }
-
- //StartTimecode
- ChildElement=Track->FirstChildElement("StartTimecode");
- if (ChildElement)
- {
- string Text=ChildElement->GetText();
- if (Text.size()==11)
- {
- int64u ToFill=(Text[0]-'0')*10*60*60*1000
- + (Text[1]-'0') *60*60*1000
- + (Text[3]-'0') *10*60*1000
- + (Text[4]-'0') *60*1000
- + (Text[6]-'0') *10*1000
- + (Text[7]-'0') *1000;
- if (FrameRate)
- ToFill+=float64_int64s(((Text[9]-'0')*10+(Text[10]-'0'))*1000/FrameRate);
- //Fill(Stream_Video, StreamPos_Last, Video_Delay, ToFill);
- //Fill(Stream_Video, StreamPos_Last, Video_Delay_Source, "P2 Clip");
- }
- }
-
- #if defined(MEDIAINFO_MXF_YES)
- if (File_Name.size()>10+1+4+1
- && File_Name[File_Name.size()-10-1]==PathSeparator
- && (File_Name[File_Name.size()-10-2]&(~0x20))==__T('P')
- && (File_Name[File_Name.size()-10-3]&(~0x20))==__T('I')
- && (File_Name[File_Name.size()-10-4]&(~0x20))==__T('L')
- && (File_Name[File_Name.size()-10-5]&(~0x20))==__T('C')
- && File_Name[File_Name.size()-10-6]==PathSeparator)
- {
- Ztring file=File_Name.substr(File_Name.size()-10, 6);
- Ztring MXF_File=__T("..");
- MXF_File+=PathSeparator;
-
- Ztring Path=File_Name.substr(0, File_Name.size()-10-6);
- ZtringList Dirs=Dir::GetAllFileNames(Path, Dir::Include_Dirs);
- bool Exists=false;
- for (size_t Pos=0; Pos<Dirs.size(); Pos++)
- if (Dirs[Pos].size()>6
- && (Dirs[Pos][Dirs[Pos].size()-1]&(~0x20))==__T('O')
- && (Dirs[Pos][Dirs[Pos].size()-2]&(~0x20))==__T('E')
- && (Dirs[Pos][Dirs[Pos].size()-3]&(~0x20))==__T('D')
- && (Dirs[Pos][Dirs[Pos].size()-4]&(~0x20))==__T('I')
- && (Dirs[Pos][Dirs[Pos].size()-5]&(~0x20))==__T('V')
- && Dirs[Pos][Dirs[Pos].size()-6]==PathSeparator)
- {
- MXF_File+=Dirs[Pos].substr(Dirs[Pos].size()-5, 5);
- Exists=true;
- break;
- }
- if (!Exists)
- MXF_File+=__T("AUDIO");
-
- MXF_File+=PathSeparator;
- MXF_File+=file;
-
- Dirs=Dir::GetAllFileNames(File_Name.substr(0, File_Name.size()-10-1)+PathSeparator+MXF_File+__T(".MXF"), Dir::Include_Files);
- Exists=false;
- for (size_t Pos=0; Pos<Dirs.size(); Pos++)
- if (Dirs[Pos].size()>4
- && (Dirs[Pos][Dirs[Pos].size()-1]&(~0x20))==__T('F')
- && (Dirs[Pos][Dirs[Pos].size()-2]&(~0x20))==__T('X')
- && (Dirs[Pos][Dirs[Pos].size()-3]&(~0x20))==__T('M')
- && Dirs[Pos][Dirs[Pos].size()-4]==__T('.'))
- {
- MXF_File+=Dirs[Pos].substr(Dirs[Pos].size()-4, 4);
- Exists=true;
- break;
- }
- if (!Exists)
- MXF_File+=__T(".MXF");
-
- Sequence->AddFileName(MXF_File);
- Sequence->StreamKind=Stream_Video;
- Sequence->StreamID=ReferenceFiles->Sequences_Size()+1;
- ReferenceFiles->AddSequence(Sequence);
- }
- #endif //defined(MEDIAINFO_MXF_YES)
- }
- else if (Field=="Audio")
- {
- #if defined(MEDIAINFO_MXF_YES)
- if (File_Name.size()>10+1+4+1
- && File_Name[File_Name.size()-10-1]==PathSeparator
- && (File_Name[File_Name.size()-10-2]&(~0x20))==__T('P')
- && (File_Name[File_Name.size()-10-3]&(~0x20))==__T('I')
- && (File_Name[File_Name.size()-10-4]&(~0x20))==__T('L')
- && (File_Name[File_Name.size()-10-5]&(~0x20))==__T('C')
- && File_Name[File_Name.size()-10-6]==PathSeparator)
- {
- Ztring file=File_Name.substr(File_Name.size()-10, 6);
- Ztring MXF_File=__T("..");
- MXF_File+=PathSeparator;
-
- Ztring Path=File_Name.substr(0, File_Name.size()-10-6);
- ZtringList Dirs=Dir::GetAllFileNames(Path, Dir::Include_Dirs);
- bool Exists=false;
- for (size_t Pos=0; Pos<Dirs.size(); Pos++)
- if (Dirs[Pos].size()>6
- && (Dirs[Pos][Dirs[Pos].size()-1]&(~0x20))==__T('O')
- && (Dirs[Pos][Dirs[Pos].size()-2]&(~0x20))==__T('I')
- && (Dirs[Pos][Dirs[Pos].size()-3]&(~0x20))==__T('D')
- && (Dirs[Pos][Dirs[Pos].size()-4]&(~0x20))==__T('U')
- && (Dirs[Pos][Dirs[Pos].size()-5]&(~0x20))==__T('A')
- && Dirs[Pos][Dirs[Pos].size()-6]==PathSeparator)
- {
- MXF_File+=Dirs[Pos].substr(Dirs[Pos].size()-5, 5);
- Exists=true;
- break;
- }
- if (!Exists)
- MXF_File+=__T("AUDIO");
-
- MXF_File+=PathSeparator;
- MXF_File+=file;
- Ztring Pos=Ztring::ToZtring(Audio_Count);
- if (Pos.size()<2)
- Pos.insert(0, 1, __T('0'));
- MXF_File+=Pos;
-
- Dirs=Dir::GetAllFileNames(File_Name.substr(0, File_Name.size()-10-1)+PathSeparator+MXF_File+__T(".MXF"), Dir::Include_Files);
- Exists=false;
- for (size_t Pos=0; Pos<Dirs.size(); Pos++)
- if (Dirs[Pos].size()>4
- && (Dirs[Pos][Dirs[Pos].size()-1]&(~0x20))==__T('F')
- && (Dirs[Pos][Dirs[Pos].size()-2]&(~0x20))==__T('X')
- && (Dirs[Pos][Dirs[Pos].size()-3]&(~0x20))==__T('M')
- && Dirs[Pos][Dirs[Pos].size()-4]==__T('.'))
- {
- MXF_File+=Dirs[Pos].substr(Dirs[Pos].size()-4, 4);
- Exists=true;
- break;
- }
- if (!Exists)
- MXF_File+=__T(".MXF");
-
- sequence* Sequence=new sequence;
- Sequence->AddFileName(MXF_File);
- Sequence->StreamKind=Stream_Audio;
- Sequence->StreamID=ReferenceFiles->Sequences_Size()+1;
- ReferenceFiles->AddSequence(Sequence);
-
- Audio_Count++;
- }
- #endif //defined(MEDIAINFO_MXF_YES)
- }
-
- Track=Track->NextSiblingElement();
- }
- }
-
- //ClipMetadata
- XMLElement* ClipMetadata=ClipContent->FirstChildElement("ClipMetadata");
- if (ClipMetadata)
- {
- XMLElement* Access=ClipMetadata->FirstChildElement("Access");
- if (Access)
- {
- //CreationDate
- ChildElement=Access->FirstChildElement("CreationDate");
- if (ChildElement)
- {
- Ztring Content=ChildElement->GetText();
- if (Content.size()>=11 && Content[10]==__T('T'))
- Content[10]=__T(' ');
- if (Content.find(__T("+00:00"))!=string::npos)
- {
- Content.resize(10+1+8);
- Content.insert(0, __T("UTC "));
- }
- Fill(Stream_General, 0, General_Recorded_Date, Content);
- }
-
- //CreationDate
- ChildElement=Access->FirstChildElement("LastUpdateDate");
- if (ChildElement)
- {
- Ztring Content=ChildElement->GetText();
- if (Content.size()>=11 && Content[10]==__T('T'))
- Content[10]=__T(' ');
- if (Content.find(__T("+00:00"))!=string::npos)
- {
- Content.resize(10+1+8);
- Content.insert(0, __T("UTC "));
- }
- Fill(Stream_General, 0, General_Tagged_Date, Content);
- }
- }
-
- XMLElement* Device=ClipMetadata->FirstChildElement("Device");
- if (Device)
- {
- //Manufacturer+ModelName
- XMLElement* Manufacturer=Device->FirstChildElement("Manufacturer");
- XMLElement* ModelName=Device->FirstChildElement("ModelName");
- if (Manufacturer && ModelName)
- Fill(Stream_General, 0, General_Encoded_Application, string(Manufacturer->GetText())+" "+ModelName->GetText());
- }
-
- XMLElement* Shoot=ClipMetadata->FirstChildElement("Shoot");
- if (Shoot)
- {
- //StartDate
- ChildElement=Shoot->FirstChildElement("StartDate");
- if (ChildElement)
- {
- Ztring Content=ChildElement->GetText();
- if (Content.size()>=11 && Content[10]==__T('T'))
- Content[10]=__T(' ');
- if (Content.find(__T("+00:00"))!=string::npos)
- {
- Content.resize(10+1+8);
- Content.insert(0, __T("UTC "));
- }
- Fill(Stream_General, 0, General_Duration_Start, Content);
- }
-
- //EndDate
- ChildElement=Shoot->FirstChildElement("EndDate");
- if (ChildElement)
- {
- Ztring Content=ChildElement->GetText();
- if (Content.size()>=11 && Content[10]==__T('T'))
- Content[10]=__T(' ');
- if (Content.find(__T("+00:00"))!=string::npos)
- {
- Content.resize(10+1+8);
- Content.insert(0, __T("UTC "));
- }
- Fill(Stream_General, 0, General_Duration_End, Content);
- }
-
- //Location
- XMLElement* Location=Shoot->FirstChildElement("Location");
- if (Location)
- {
- //Longitude+Latitude
- XMLElement* Longitude=Location->FirstChildElement("Longitude");
- XMLElement* Latitude=Location->FirstChildElement("Latitude");
- if (Longitude && Latitude)
- Fill(Stream_General, 0, General_Recorded_Location, string(Latitude->GetText())+", "+Longitude->GetText());
- }
- }
-
- XMLElement* Scenario=ClipMetadata->FirstChildElement("Scenario");
- if (Scenario)
- {
- //ProgramName
- ChildElement=Scenario->FirstChildElement("ProgramName");
- if (ChildElement)
- Fill(Stream_General, 0, General_Title, ChildElement->GetText());
-
- //SceneNo.
- ChildElement=Scenario->FirstChildElement("SceneNo.");
- if (ChildElement)
- Fill(Stream_General, 0, "Scene Number", ChildElement->GetText());
-
- //TakeNo.
- ChildElement=Scenario->FirstChildElement("TakeNo.");
- if (ChildElement)
- Fill(Stream_General, 0, "Take Number", ChildElement->GetText());
- }
-
- XMLElement* News=ClipMetadata->FirstChildElement("News");
- if (News)
- {
- //Reporter
- ChildElement=News->FirstChildElement("Reporter");
- if (ChildElement)
- Fill(Stream_General, 0, "Reporter", ChildElement->GetText());
-
- //Purpose
- ChildElement=News->FirstChildElement("Purpose");
- if (ChildElement)
- Fill(Stream_General, 0, "Purpose", ChildElement->GetText());
-
- //Object
- ChildElement=News->FirstChildElement("Object");
- if (ChildElement)
- Fill(Stream_General, 0, "Object", ChildElement->GetText());
- }
- }
- }
- }
- else
- {
- Reject("P2_Clip");
- return false;
- }
- }
-
- Element_Offset=File_Size;
-
- //All should be OK...
- return true;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_P2_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_P2_Clip.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_P2_Clip.h
deleted file mode 100644
index 05e0b473c..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_P2_Clip.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about P2 Clip files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_P2_ClipH
-#define MediaInfo_File_P2_ClipH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_P2_Clip
-//***************************************************************************
-
-class File_P2_Clip : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_P2_Clip();
- ~File_P2_Clip();
-
-private :
- //Streams management
- void Streams_Finish ();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Temp
- File__ReferenceFilesHelper* ReferenceFiles;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Pmp.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Pmp.cpp
deleted file mode 100644
index 0ad36636b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Pmp.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PMP_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Pmp.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Pmp_video_format(int32u video_format)
-{
- switch (video_format)
- {
- case 0 : return "MPEG-4 Visual";
- case 1 : return "AVC";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Pmp_audio_format(int32u audio_format)
-{
- switch (audio_format)
- {
- case 0 : return "MPEG Audio";
- case 1 : return "AAC";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Pmp::FileHeader_Begin()
-{
- //Synchro
- if (4>Buffer_Size)
- return false;
- if (Buffer[0]!=0x70 //"pmpm"
- || Buffer[1]!=0x6D
- || Buffer[2]!=0x70
- || Buffer[3]!=0x6D)
- {
- Reject();
- return false;
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Pmp::FileHeader_Parse()
-{
- //Parsing
- int32u version, video_format=0, nb_frames=0, video_width=0, video_height=0, time_base_num=0, time_base_den=0, audio_format=0, sample_rate=0, channels=0;
-
- Skip_C4( "Signature");
- Get_L4 (version, "Version");
- if (version==1)
- {
- Get_L4 (video_format, "video_format");
- Get_L4 (nb_frames, "number of frames");
- Get_L4 (video_width, "video_width");
- Get_L4 (video_height, "video_height");
- Get_L4 (time_base_num, "time_base_num");
- Get_L4 (time_base_den, "time_base_den");
- Skip_L4( "number of audio streams");
- Get_L4 (audio_format, "audio_format");
- Get_L4 (channels, "channels");
- Skip_L4( "unknown");
- Get_L4 (sample_rate, "sample_rate");
- }
-
- FILLING_BEGIN();
- Accept("PMP");
-
- Fill(Stream_General, 0, General_Format, "PMP");
-
- if (version==1)
- {
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, Pmp_video_format(video_format));
- Fill(Stream_Video, 0, Video_FrameCount, nb_frames);
- Fill(Stream_Video, 0, Video_Width, video_width);
- Fill(Stream_Video, 0, Video_Height, video_height);
- Fill(Stream_Video, 0, Video_FrameRate, (float)time_base_den / 100);
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, Pmp_audio_format(audio_format));
- Fill(Stream_Audio, 0, Audio_Channel_s_, channels);
- Fill(Stream_Audio, 0, Audio_SamplingRate, sample_rate);
- }
-
- //No more need data
- Finish("PMP");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_PMP_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Pmp.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Pmp.h
deleted file mode 100644
index b62fbb4c6..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Pmp.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PMP files
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_PmpH
-#define MediaInfo_File_PmpH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Pmp
-//***************************************************************************
-
-class File_Pmp : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
-private :
- //Buffer
- bool FileHeader_Begin();
- void FileHeader_Parse();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ptx.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ptx.cpp
deleted file mode 100644
index 0b0cee913..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ptx.cpp
+++ /dev/null
@@ -1,640 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PTX_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Ptx.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-using namespace tinyxml2;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Ptx::File_Ptx()
-:File__Analyze()
-{
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Ptx;
- StreamIDs_Width[0]=sizeof(size_t);
- #endif //MEDIAINFO_EVENTS
-
- //Temp
- ReferenceFiles=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_Ptx::~File_Ptx()
-{
- delete ReferenceFiles; //ReferenceFiles=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ptx::Streams_Finish()
-{
- ReferenceFiles->ParseReferences();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_Ptx::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- return ReferenceFiles->Seek(Method, Value, ID);
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Ptx::FileHeader_Begin()
-{
- if (File_Size<0x100)
- {
- Reject("Ptx");
- return false;
- }
-
- //Element_Size
- if (11>Buffer_Size)
- return false; //Must wait for more data
-
- if (Buffer[ 0x0]!=0x03
- || Buffer[ 0x1]!=0x30
- || Buffer[ 0x2]!=0x30
- || Buffer[ 0x3]!=0x31
- || Buffer[ 0x4]!=0x30
- || Buffer[ 0x5]!=0x31
- || Buffer[ 0x6]!=0x31
- || Buffer[ 0x7]!=0x31
- || Buffer[ 0x8]!=0x31
- || Buffer[ 0x9]!=0x30
- || Buffer[ 0xA]!=0x30
- || Buffer[ 0xB]!=0x31
- || Buffer[ 0xC]!=0x30
- || Buffer[ 0xD]!=0x31
- || Buffer[ 0xE]!=0x30
- || Buffer[ 0xF]!=0x31
- || Buffer[0x10]!=0x31)
- {
- Reject("Ptx");
- return false;
- }
-
- //Element_Size
- if (Buffer_Size<File_Size)
- return false; //Must wait for more data
-
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
-
- //All should be OK...
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ptx::Read_Buffer_Continue()
-{
- if (File_Offset || Buffer_Offset)
- {
- if (Buffer_Size)
- Reject(); //Problem
- return;
- }
-
- //Parsing
- ZtringList Names;
- Ztring LibraryName, LibraryVersion, Format, Directory;
- int32u LibraryName_Length, LibraryVersion_Length, LibraryRelease_Length, Format_Length, Platform_Length, Info_Count, Names_Count, Info_Length, Name_Length, FileName_Count, Directory_Length;
- int32u Opaque2_Length, Audio_Count;
- int16u Opaque1_Length;
- Element_Begin1("Header");
- Skip_B1( "Magic");
- Skip_Local(16, "Magic");
- Skip_L2( "0x0500");
- Skip_L1( "Unknown [1]");
- Skip_L1( "0x5A [1]");
- Skip_L2( "0x0001");
- Skip_L2( "0x0004");
- Skip_L2( "0x0000 [1]");
- Skip_L4( "Unknown [2]");
- Skip_L2( "0x035A");
- Skip_L2( "0x6400");
- Skip_L2( "0x0000 [1]");
- Skip_L2( "0x0300");
- Skip_L2( "0x0000 [1]");
- Get_L4 (LibraryName_Length, "WritingLibrary name length");
- Get_UTF8(LibraryName_Length, LibraryName, "Library name");
- Skip_L4( "0x00000003");
- Skip_L4( "Library version, major");
- Skip_L4( "Library version, minor");
- Skip_L4( "Library version, revision");
- Get_L4 (LibraryVersion_Length, "Library version length");
- Get_UTF8(LibraryVersion_Length, LibraryVersion, "Library version");
- Skip_L1( "0x01");
- Get_L4 (LibraryRelease_Length, "Library release length");
- Skip_UTF8(LibraryRelease_Length, "Library release");
- Skip_L1( "0x00 [1]");
- Get_L4 (Format_Length, "Format length");
- Get_UTF8(Format_Length, Format, "Format");
- if (Format!=__T("Pro Tools Session File"))
- {
- Element_End();
- Reject();
- return;
- }
- Skip_L2( "0x0006");
- Get_L4 (Platform_Length, "Platform length");
- Skip_UTF8(Platform_Length, "Platform");
- Skip_L4( "0x00000000");
- Skip_L2( "0x5A05");
- Get_L2 (Opaque1_Length, "Info list, Opaque length"); //0x0006 (10.2-) or 0x0008 (10.3+)
- Skip_L4( "Unknown [3]");
- Skip_L4( "0x00002067");
- Skip_L2( "0x0000 [1]");
- Skip_L2( "0x0000 (once) or 0x002A");
- Skip_L2( "0x0000 [1]");
- Skip_L2( "Unknown [4]");
- Skip_L4( "Unknown [5]");
- Skip_L4( "Unknown [6]");
- Element_End();
- Element_Begin1("Info list");
- Get_L4 (Info_Count, "Info count");
- if (4*Info_Count>Element_Size)
- {
- Element_End();
- Reject();
- return;
- }
- for (int32u Pos=0; Pos<Info_Count; Pos++)
- {
- Element_Begin1("Info");
- Get_L4 (Info_Length, "Info length");
- if (Info_Length)
- {
- Info_UTF8(Info_Length, Info, "Name"); Element_Info1(Info);
- }
- Element_End();
- }
- Element_End();
- Element_Begin1("Unknown");
- Skip_L4( "0x00000000");
- Element_Begin1("Names list 1");
- Get_L4 (Names_Count, "Names count minus 1");
- if (4*Names_Count>Element_Size)
- {
- Element_End();
- Reject();
- return;
- }
- for (int16u Pos=0; Pos<1+Names_Count; Pos++)
- {
- Element_Begin1("Name");
- Get_L4 (Name_Length, "Name length");
- if (Name_Length)
- {
- Info_UTF8(Name_Length, Name, "Name"); Element_Name(Name);
- }
- Element_End();
- }
- Element_End();
- Skip_L4( "0x00000000");
- Skip_L4( "0x00000000 or 0x0000002A");
- Skip_L4( "Unknown [7]");
- Skip_L4( "Unknown [8]");
- Element_Begin1("Names list 2");
- Get_L4 (Names_Count, "Names count");
- if (4*Names_Count>Element_Size)
- {
- Element_End();
- Reject();
- return;
- }
- for (int16u Pos=0; Pos<Names_Count; Pos++)
- {
- Element_Begin1("Name");
- Get_L4 (Name_Length, "Name length");
- if (Name_Length)
- {
- Info_UTF8(Name_Length, Name, "Name"); Element_Name(Name);
- }
- Element_End();
- }
- Element_End();
- Skip_L4( "0x00000000");
- Skip_L4( "0x0000002A [1]");
- Skip_L4( "Unknown [9]");
- Skip_L4( "Unknown [10]");
- Skip_L4( "0x00000000");
- Skip_L1( "0x00 or 0x01 [2]");
- Skip_L1( "0x01");
- Skip_L1( "0x00 or 0x01 or 0x02");
- Skip_L1( "0x00 [2]");
- Skip_L1( "0x01");
- Skip_L1( "0x00 (once) or 0x01");
- Skip_L1( "0x00 or 0x01 (once)");
- Skip_L1( "0x00 or 0x01 (once) or 0x5A");
- if (Opaque1_Length<6)
- {
- if (Opaque1_Length)
- Skip_XX(Opaque1_Length, "Opaque1");
- }
- else
- {
- Skip_L4( "Opaque1 - Unknown [1]");
- Skip_L2( "Opaque1 - Unknown [2]");
- if (Opaque1_Length<8)
- {
- if (Opaque1_Length-6)
- Skip_XX(Opaque1_Length-6, "Opaque1 - Unknown [3]");
- }
- else
- {
- Skip_L2( "Opaque1 - 0x0000");
- if (Opaque1_Length>8)
- Skip_XX(Opaque1_Length-8, "Opaque1 - Unknown [3]");
- }
- }
- Skip_L2( "0x2519");
- Skip_L2( "0x0001");
- Skip_L4( "0x00000000 or B5112287");
- Skip_L4( "0x00000000 or 4037F9DC");
- Skip_L4( "0x00000001 [1]");
- Skip_L2( "0x0003");
- Element_End();
- Get_L4 (Audio_Count, "Audio count");
- if (111*Audio_Count>Element_Size)
- {
- Reject();
- return;
- }
- Element_Begin1("Audio tracks list 1");
- for (int16u Pos=0; Pos<Audio_Count; Pos++)
- {
- Element_Begin1("Name");
- Skip_L2( "0x0000 [New]");
- Get_L4 (Name_Length, "(Same 1/2/3) Name length");
- Info_UTF8(Name_Length, Name, "(Same 1/2/3) Name");
- Skip_L2( "(Same 1/2/3) 0x0000 ");
- Skip_L4( "(Same 1/2/3) 0x00000000");
- Skip_L4( "(Same 1/2/3) 0x0000002A");
- Skip_L4( "(Same 1/2/3) Unknown");
- Skip_L4( "(Same 1/2/3) Unknown");
- Info_L3(Number, "(Same 1/2/3) Ordered number"); Element_Info1(Number);
- Element_Info1(Name);
- Element_End();
-
- if (Name==__T("Lf")) //Exception? Typo?
- Name=__T("Lfe");
- Name.MakeLowerCase();
- Names.push_back(Name);
- }
- Element_End();
- Element_Begin1("Audio tracks list 2");
- for (int16u Pos=0; Pos<Audio_Count; Pos++)
- {
- Element_Begin1("Name");
- int32u Size;
- Skip_L3( "(Same 2/3) 0x00025A [1]");
- Get_L4 (Size, "(Same 2/3) Size");
- Skip_L4( "(Same 2/3) 0x0000251A");
- Get_L4 (Name_Length, "(Same 1/2/3) Name length");
- Info_UTF8(Name_Length, Name, "(Same 1/2/3) Name");
- Skip_L2( "(Same 1/2/3) 0x0000 ");
- Skip_L4( "(Same 1/2/3) 0x00000000");
- Skip_L4( "(Same 1/2/3) 0x0000002A");
- Skip_L4( "(Same 1/2/3) Unknown");
- Skip_L4( "(Same 1/2/3) Unknown");
- Info_L3(Number, "(Same 1/2/3) Ordered number"); Element_Info1(Number);
- Skip_L2( "(Same 2/3) 0x0000");
- Element_Info1(Name);
- if (Name_Length+31!=Size)
- {
- Element_End();
- Element_End();
- Reject();
- return;
- }
- Element_End();
- }
- Element_End();
- Get_L4 (Audio_Count, "Audio count");
- if (4*Audio_Count>Element_Size)
- {
- Reject();
- return;
- }
- Element_Begin1("Audio tracks list 3");
- for (int16u Pos=0; Pos<Audio_Count; Pos++)
- {
- Element_Begin1("Name");
- int32u Size;
- Skip_L3( "(Same 2/3) 0x00025A [2]");
- Get_L4 (Size, "(Same 2/3) Size");
- if (Size>0x10000)
- {
- Element_End();
- Element_End();
- Reject();
- return;
- }
- Skip_L4( "(Same 2/3) 0x0000251A");
- Get_L4 (Name_Length, "(Same 1/2/3) Name length");
- Info_UTF8(Name_Length, Name, "(Same 1/2/3) Name");
- Skip_L2( "(Same 1/2/3) 0x0000 ");
- Skip_L4( "(Same 1/2/3) 0x00000000");
- Skip_L4( "(Same 1/2/3) 0x0000002A");
- Skip_L4( "(Same 1/2/3) Unknown");
- Skip_L4( "(Same 1/2/3) Unknown");
- Info_L3(Number, "(Same 1/2/3) Ordered number"); Element_Info1(Number);
- Skip_L2( "(Same 2/3) 0x0000");
- Element_Info1(Name);
- if (Name_Length+31!=Size)
- {
- Element_End();
- Element_End();
- Reject();
- return;
- }
- Element_End();
- }
- Element_End();
- Skip_L2( "0x0000 [4]");
- Skip_L2( "0x0018");
- Skip_L4( "0x00000001 [2]");
- Skip_L2( "0x0018");
- Skip_L4( "0x00000001 [2]");
- Skip_L2( "0x0001 [3]");
- Skip_L3( "0x00095A");
- Get_L4 (Opaque2_Length, "Opaque2 length");
- Skip_XX(Opaque2_Length, "Opaque2");
- Skip_L1( "0x5A [2]");
- Skip_L2( "0x0003 (10.0) or 0x0004 (10.2+)");
- Get_L4 (Opaque2_Length, "Opaque3 length"); //0x0012 (10.0) or 0x0016 (10.2+)
- if (Opaque2_Length<0x12)
- Skip_XX(Opaque2_Length, "Opaque3");
- else
- {
- Skip_L4( "Opaque3 - 0x06002026");
- Skip_L4( "Opaque3 - 0x00000000 [1]");
- Skip_L2( "Opaque3 - 0x0000");
- Skip_L4( "Opaque3 - Unknown [1]");
- Skip_L4( "Opaque3 - Unknown [2]");
- if (Opaque2_Length<0x16)
- {
- if (Opaque2_Length-0x12)
- Skip_XX(Opaque2_Length-0x12, "Opaque3 - Unknown [3]");
- }
- else
- {
- Skip_L4( "Opaque3 - 0x00000000 [2]");
- if (Opaque2_Length>0x16)
- Skip_XX(Opaque2_Length-0x16, "Opaque3 - Unknown [4]");
- }
- }
- Skip_L3( "0x00025A [3]");
- Get_L4 (Opaque2_Length, "0x00000015 (Opaque4 length?) or something else");
- if (Opaque2_Length==0x00000015)
- {
- Skip_L4( "0x075A2032");
- Skip_L4( "0x00000C00");
- Skip_L4( "0x01204200");
- Skip_L4( "0x00000000 or 0x01000000");
- Skip_L4( "Unknown [13]");
- Skip_L1( "0x00 [3]");
- Skip_L3( "0x00025A [4]");
- Skip_L4( "Unknown [14]");
- }
- Skip_L4( "Unknown [15]");
- Skip_L4( "0x015A0000");
- Skip_L4( "Unknown [16]");
- Skip_L4( "Unknown [17]");
- Skip_L4( "0x01000000");
- Get_L4 (FileName_Count, "File name count");
- if (13*FileName_Count>Element_Size)
- {
- Reject();
- return;
- }
- Get_L4 (Directory_Length, "Directory length");
- Get_UTF8(Directory_Length, Directory, "Directory");
- Skip_L4( "0x00000000 [11]");
- Element_Begin1("File names");
- vector<int8u> Roles;
- vector<Ztring> FileNames;
- vector<Ztring> FileNamesLowerCase;
- vector<int32u> Purposes;
- for (int32u Pos=0; Pos<FileName_Count; Pos++)
- {
- Ztring FileName;
- int32u FileName_Length, Purpose;
- int8u Role; //
- Element_Begin1("File names");
- Get_L1 (Role, "role? (0x02 for WAV files)");
- Skip_L4( "Ordered number except WAV files and -1");
- Get_L4 (FileName_Length, "File Name length");
- Get_UTF8(FileName_Length, FileName, "File Name"); Element_Name(FileName);
- Get_C4 (Purpose, "Purpose (e.g. EVAW for .wav files)"); //Found 1 .wav file without "EWAV".
- Element_End();
-
- Roles.push_back(Role);
- FileNames.push_back(FileName);
- FileName.MakeLowerCase();
- FileNamesLowerCase.push_back(FileName);
- Purposes.push_back(Purpose);
- }
- Element_End();
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-
- FILLING_BEGIN();
- Accept("Ptx"); //Could be Ptf (former format but not supported, so we don't care currently)
- Fill("Ptx");
- Fill(Stream_General, 0, General_Format, "Pro Tools Session");
- Fill(Stream_General, 0, General_Format_Version, "Version 10");
- Fill(Stream_General, 0, General_Encoded_Library_Name, LibraryName);
- Fill(Stream_General, 0, General_Encoded_Library_Version, LibraryVersion);
-
- // Role==2 + Purpose==EWAV + listed
- if (Names.size()>1 || FileNames.size()==1)
- {
- size_t Pos_Offset=0;
- for (int32u Pos=0; Pos<FileName_Count; Pos++)
- {
- if (Roles[Pos]==0x02
- && Purposes[Pos]==0x45564157 //"EWAV"
- && Pos-Pos_Offset<Names.size()
- && FileNames[Pos]!=__T("1 kHz @ -20dB.wav") //Exception?
- && FileNames[Pos]!=__T("1K@-20db.wav") //Exception?
- && FileNames[Pos]!=__T("1K@0VU-20REF.wav") //Exception?
- && FileNames[Pos]!=__T("1k@0vu -20.wav") //Exception?
- && FileNames[Pos]!=__T("1Khz@-20dB.wav") //Exception?
- && FileNames[Pos].find(__T(".1Khz.wav"))==string::npos //Exception?
- && FileNames[Pos].find(__T("_1KTONE_"))==string::npos //Exception?
- && FileNamesLowerCase[Pos].find(Names[Pos-Pos_Offset]+__T(".wav"))!=string::npos
- && FileNamesLowerCase[Pos].find(Names[Pos-Pos_Offset]+__T(".wav"))+Names[Pos-Pos_Offset].size()+4==FileNames[Pos].size())
- {
- sequence* Sequence=new sequence;
- Sequence->StreamKind=Stream_Audio;
- Sequence->AddFileName(Directory+PathSeparator+FileNames[Pos]);
- ReferenceFiles->AddSequence(Sequence);
- }
- else if (!ReferenceFiles->Sequences_Size())
- Pos_Offset++;
- }
-
- if (Names.size()!=ReferenceFiles->Sequences_Size())
- ReferenceFiles->Clear(); //Failed to detect correctly
- }
-
- // Role==2 + listed
- if (!ReferenceFiles->Sequences_Size() && (Names.size()>1 || FileNames.size()==1))
- {
- size_t Pos_Offset=0;
- for (int32u Pos=0; Pos<FileName_Count; Pos++)
- {
- if (Roles[Pos]==0x02
- && Pos-Pos_Offset<Names.size()
- && FileNames[Pos]!=__T("1 kHz @ -20dB.wav") //Exception?
- && FileNames[Pos]!=__T("1K@-20db.wav") //Exception?
- && FileNames[Pos]!=__T("1K@0VU-20REF.wav") //Exception?
- && FileNames[Pos]!=__T("1k@0vu -20.wav") //Exception?
- && FileNames[Pos]!=__T("1Khz@-20dB.wav") //Exception?
- && FileNames[Pos].find(__T(".1Khz.wav"))==string::npos //Exception?
- && FileNames[Pos].find(__T("_1KTONE_"))==string::npos) //Exception?
- {
- Ztring FileName=FileNames[Pos];
- Ztring Name=Names[Pos-Pos_Offset];
- FileName.MakeLowerCase();
- Name.MakeLowerCase();
- if (FileName.find(Name)==0
- || FileName.find(Name+__T(".wav"))+5==Name.size())
- {
- sequence* Sequence=new sequence;
- Sequence->StreamKind=Stream_Audio;
- Sequence->AddFileName(Directory+PathSeparator+FileNames[Pos]);
- ReferenceFiles->AddSequence(Sequence);
- }
- else if (!ReferenceFiles->Sequences_Size())
- Pos_Offset++;
- }
- else if (!ReferenceFiles->Sequences_Size())
- Pos_Offset++;
- }
-
- if (Names.size()!=ReferenceFiles->Sequences_Size())
- ReferenceFiles->Clear(); //Failed to detect correctly
- }
-
- // Role==2 + Purpose==EWAV + listed, special case with specific file names
- if (!ReferenceFiles->Sequences_Size() && (Names.size()>1 || FileNames.size()==1))
- {
- for (int32u Pos=0; Pos<FileName_Count; Pos++)
- {
- if (Roles[Pos]==0x02
- && Purposes[Pos]==0x45564157 //"EWAV"
- && FileNames[Pos]!=__T("1 kHz @ -20dB.wav") //Exception?
- && FileNames[Pos]!=__T("1K@-20db.wav") //Exception?
- && FileNames[Pos]!=__T("1K@0VU-20REF.wav") //Exception?
- && FileNames[Pos]!=__T("1k@0vu -20.wav") //Exception?
- && FileNames[Pos]!=__T("1Khz@-20dB.wav") //Exception?
- && FileNames[Pos].find(__T(".1Khz.wav"))==string::npos //Exception?
- && FileNames[Pos].find(__T("_1KTONE_"))==string::npos) //Exception?
- {
- for (int32u Pos2=0; Pos2<Names.size(); Pos2++)
- if (FileNamesLowerCase[Pos].find(Names[Pos2])==0)
- {
- sequence* Sequence=new sequence;
- Sequence->StreamKind=Stream_Audio;
- Sequence->AddFileName(Directory+PathSeparator+FileNames[Pos]);
- ReferenceFiles->AddSequence(Sequence);
- break;
- }
- }
- }
- }
-
- // Role==2 + Purpose==EWAV
- if (!ReferenceFiles->Sequences_Size())
- {
- for (int32u Pos=0; Pos<FileName_Count; Pos++)
- {
- if (Roles[Pos]==0x02
- && Purposes[Pos]==0x45564157 //"EWAV"
- && FileNames[Pos]!=__T("1 kHz @ -20dB.wav") //Exception?
- && FileNames[Pos]!=__T("1K@-20db.wav") //Exception?
- && FileNames[Pos]!=__T("1K@0VU-20REF.wav") //Exception?
- && FileNames[Pos]!=__T("1k@0vu -20.wav") //Exception?
- && FileNames[Pos]!=__T("1Khz@-20dB.wav") //Exception?
- && FileNames[Pos].find(__T(".1Khz.wav"))==string::npos //Exception?
- && FileNames[Pos].find(__T("_1KTONE_"))==string::npos) //Exception?
- {
- sequence* Sequence=new sequence;
- Sequence->StreamKind=Stream_Audio;
- Sequence->AddFileName(Directory+PathSeparator+FileNames[Pos]);
- ReferenceFiles->AddSequence(Sequence);
- }
- }
- }
-
- // Role==2
- if (!ReferenceFiles->Sequences_Size())
- {
- for (int32u Pos=0; Pos<FileName_Count; Pos++)
- {
- if (Roles[Pos]==0x02
- && FileNames[Pos]!=__T("1 kHz @ -20dB.wav") //Exception?
- && FileNames[Pos]!=__T("1K@-20db.wav") //Exception?
- && FileNames[Pos]!=__T("1K@0VU-20REF.wav") //Exception?
- && FileNames[Pos]!=__T("1k@0vu -20.wav") //Exception?
- && FileNames[Pos]!=__T("1Khz@-20dB.wav") //Exception?
- && FileNames[Pos].find(__T(".1Khz.wav"))==string::npos //Exception?
- && FileNames[Pos].find(__T("_1KTONE_"))==string::npos) //Exception?
- {
- sequence* Sequence=new sequence;
- Sequence->StreamKind=Stream_Audio;
- Sequence->AddFileName(Directory+PathSeparator+FileNames[Pos]);
- ReferenceFiles->AddSequence(Sequence);
- }
- }
- }
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_PTX_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ptx.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ptx.h
deleted file mode 100644
index 3b0748003..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Ptx.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Pro Tools session 10 files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_PtxH
-#define MediaInfo_File_PtxH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_Ptx
-//***************************************************************************
-
-class File_Ptx : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Ptx();
- ~File_Ptx();
-
-private :
- //Streams management
- void Streams_Finish ();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
- void Read_Buffer_Continue ();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Temp
- File__ReferenceFilesHelper* ReferenceFiles;
- bool HasCpl;
- friend class File_DpcCpl; //Theses classes need access to internal structure for optimization. There is recursivity with theses formats
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Riff.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Riff.cpp
deleted file mode 100644
index 0f9a0d5d7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Riff.cpp
+++ /dev/null
@@ -1,1029 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_RIFF_YES
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Riff.h"
-#if defined(MEDIAINFO_MPEG4V_YES)
- #include "MediaInfo/Video/File_Mpeg4v.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_DTS_YES)
- #include "MediaInfo/Audio/File_Dts.h"
-#endif
-#if defined(MEDIAINFO_DVDIF_YES)
- #include "MediaInfo/Multiple/File_DvDif.h"
-#endif
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-#include <ZenLib/File.h>
-#include <ZenLib/Utils.h>
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Const
-//***************************************************************************
-
-namespace Elements
-{
- const int32u AIFF_SSND=0x53534E44;
- const int32u AVI_=0x41564920;
- const int32u AVI__hdlr_strl_strh_txts=0x74787473;
- const int32u FORM=0x464F524D;
- const int32u LIST=0x4C495354;
- const int32u MThd=0x4D546864;
- const int32u ON2_=0x4F4E3220;
- const int32u ON2f=0x4F4E3266;
- const int32u RIFF=0x52494646;
- const int32u riff=0x72696666;
- const int32u RF64=0x52463634;
- const int32u SMV0=0x534D5630;
- const int32u SMV0_xxxx=0x534D563A;
- const int32u W3DI=0x57334449;
- const int32u WAVE=0x57415645;
- const int32u WAVE_data=0x64617461;
- const int32u WAVE_ds64=0x64733634;
-}
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Riff::File_Riff()
-:File__Analyze()
-{
- //Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Riff;
- StreamIDs_Width[0]=4;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- #endif //MEDIAINFO_DEMUX
- DataMustAlwaysBeComplete=false;
-
- //In/Out
- #if defined(MEDIAINFO_ANCILLARY_YES)
- Ancillary=NULL;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
-
- //Data
- Interleaved0_1=0;
- Interleaved0_10=0;
- Interleaved1_1=0;
- Interleaved1_10=0;
-
- //Temp
- WAVE_data_Size=0xFFFFFFFF;
- WAVE_fact_samplesCount=0xFFFFFFFF;
- Buffer_DataToParse_Begin=(int64u)-1;
- Buffer_DataToParse_End=0;
- #if MEDIAINFO_DEMUX
- AvgBytesPerSec=0;
- #endif //!MEDIAINFO_DEMUX
- avih_FrameRate=0;
- avih_TotalFrame=0;
- dmlh_TotalFrame=0;
- Idx1_Offset=(int64u)-1;
- movi_Size=0;
- TimeReference=(int64u)-1;
- SMV_BlockSize=0;
- SamplesPerSec=0;
- stream_Count=0;
- rec__Present=false;
- NeedOldIndex=true;
- IsBigEndian=false;
- IsWave64=false;
- IsRIFF64=false;
- IsWaveBroken=false;
- IsNotWordAligned=false;
- IsNotWordAligned_Tested=false;
- SecondPass=false;
- DV_FromHeader=NULL;
- Kind=Kind_None;
- #if MEDIAINFO_DEMUX
- Demux_Parser=NULL;
- #endif //MEDIAINFO_DEMUX
-
- //Pointers
- Stream_Structure_Temp=Stream_Structure.end();
-}
-
-//---------------------------------------------------------------------------
-File_Riff::~File_Riff()
-{
- #ifdef MEDIAINFO_DVDIF_YES
- delete (File_DvDif*)DV_FromHeader; //DV_FromHeader=NULL
- #endif //MEDIAINFO_DVDIF_YES
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Riff::Streams_Finish ()
-{
- //Ancillary specific
- #if defined(MEDIAINFO_ANCILLARY_YES)
- if (Ancillary && (*Ancillary))
- {
- Clear();
- Stream_Prepare(Stream_General);
- Finish(*Ancillary);
- Merge(**Ancillary);
- Ztring LawRating=(*Ancillary)->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=(*Ancillary)->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
- return;
- }
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
-
- //Global
- if (IsRIFF64)
- Fill(Stream_General, 0, General_Format_Profile, "RF64");
-
- //Time codes
- TimeCode_Fill(__T("ISMP"), INFO_ISMP);
- TimeCode_Fill(__T("Adobe tc_A"), Tdat_tc_A);
- TimeCode_Fill(__T("Adobe tc_O"), Tdat_tc_O);
-
- //For each stream
- std::map<int32u, stream>::iterator Temp=Stream.begin();
- while (Temp!=Stream.end())
- {
- //Preparing
- StreamKind_Last=Temp->second.StreamKind;
- StreamPos_Last=Temp->second.StreamPos;
-
- //StreamSize
- if (Temp->second.StreamSize>0)
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_StreamSize), Temp->second.StreamSize);
-
- //When there are few frames, difficult to detect PCM
- if (Temp->second.IsPcm && !Temp->second.Parsers.empty() && !Temp->second.Parsers[0]->Status[IsAccepted])
- {
- for (size_t Pos=0; Pos<Temp->second.Parsers.size()-1; Pos++)
- delete Temp->second.Parsers[Pos];
- Temp->second.Parsers.erase(Temp->second.Parsers.begin(), Temp->second.Parsers.begin()+Temp->second.Parsers.size()-1);
- Temp->second.Parsers[0]->Accept();
- }
-
- //PAR
- if (PAR && StreamKind_Last==Stream_Video)
- Fill(Stream_Video, StreamPos_Last, Video_PixelAspectRatio, PAR);
-
- Ztring ID;
- if (Temp->first!=(int32u)-1)
- ID.From_Number(((Temp->first>>24)-'0')*10+(((Temp->first>>16)&0xFF)-'0'));
-
- //Parser specific
- if (Temp->second.Parsers.size()==1)
- {
- //Finalizing and Merging (except Video codec and 120 fps hack)
- Temp->second.Parsers[0]->ShouldContinueParsing=false;
-
- //Hack - Before
- Ztring StreamSize, Codec_Temp;
- if (StreamKind_Last==Stream_Video)
- Codec_Temp=Retrieve(Stream_Video, StreamPos_Last, Video_Codec); //We want to keep the 4CC of AVI
- StreamSize=Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_StreamSize)); //We want to keep the 4CC of AVI
-
- //Merging
- if (Config->ParseSpeed<=1.0)
- {
- Fill(Temp->second.Parsers[0]);
- Temp->second.Parsers[0]->Open_Buffer_Unsynch();
- }
- Finish(Temp->second.Parsers[0]);
-
- if (!Temp->second.Parsers.empty() && Temp->second.Parsers[0]->Count_Get(StreamKind_Last))
- {
- //Special case: Compressed audio hidden in PCM
- if (StreamKind_Last==Stream_Audio
- && Temp->second.Compression==1
- && Retrieve(Stream_General, 0, General_Format)==__T("Wave")
- && Temp->second.Parsers[0]->Get(Stream_Audio, 0, Audio_Format)!=__T("PCM")) //Some DTS or SMPTE ST 337 streams are coded "1"
- Clear(Stream_Audio, 0, Audio_Channel_s_);
-
- size_t StreamPos_Base=StreamPos_Last;
- for (size_t Pos=0; Pos<Temp->second.Parsers[0]->Count_Get(StreamKind_Last); Pos++)
- {
- Ztring Temp_ID=ID;
- Ztring Temp_ID_String=ID;
- Merge(*Temp->second.Parsers[0], StreamKind_Last, Pos, StreamPos_Base+Pos);
- if (!Retrieve(StreamKind_Last, StreamPos_Last, General_ID).empty())
- {
- if (!Temp_ID.empty())
- {
- Temp_ID+=__T('-');
- Temp_ID_String+=__T('-');
- }
- Temp_ID+=Retrieve(StreamKind_Last, StreamPos_Last, General_ID);
- Temp_ID_String+=Retrieve(StreamKind_Last, StreamPos_Last, General_ID);
- }
- Fill(StreamKind_Last, StreamPos_Last, General_ID, Temp_ID, true);
- Fill(StreamKind_Last, StreamPos_Last, General_StreamOrder, Temp_ID_String, true);
-
-
- //Special case - MPEG Video + Captions
- if (StreamKind_Last==Stream_Video && Temp->second.Parsers[0]->Count_Get(Stream_Text))
- {
- //Video and Text are together
- size_t Parser_Text_Count=Temp->second.Parsers[0]->Count_Get(Stream_Text);
- for (size_t Parser_Text_Pos=0; Parser_Text_Pos<Parser_Text_Count; Parser_Text_Pos++)
- {
- size_t StreamPos_Video=StreamPos_Last;
- Fill_Flush();
- Stream_Prepare(Stream_Text);
- Temp->second.Parsers[0]->Finish();
- Merge(*Temp->second.Parsers[0], Stream_Text, Parser_Text_Pos, StreamPos_Last);
- Fill(Stream_Text, StreamPos_Last, Text_Duration, Retrieve(Stream_Video, StreamPos_Video, Video_Duration));
- Ztring ID=Retrieve(Stream_Text, StreamPos_Last, Text_ID);
- Fill(Stream_Text, StreamPos_Last, Text_ID, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_ID)+__T("-")+ID, true);
- Fill(Stream_Text, StreamPos_Last, Text_ID_String, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_ID_String)+__T("-")+ID, true);
- Fill(Stream_Text, StreamPos_Last, Text_Title, Retrieve(Stream_Video, Count_Get(Stream_Video)-1, Video_Title), true);
- Fill(Stream_Text, StreamPos_Last, "MuxingMode_MoreInfo", __T("Muxed in Video #")+Ztring().From_Number(Count_Get(Stream_Video)), true);
- }
-
- StreamKind_Last=Stream_Video;
- StreamPos_Last=Count_Get(Stream_Video)-1;
- }
- }
- }
- else
- {
- Fill(StreamKind_Last, StreamPos_Last, General_ID, ID, true);
- Fill(StreamKind_Last, StreamPos_Last, General_StreamOrder, ID, true);
- }
-
- //Hacks - After
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_StreamSize), StreamSize, true);
- if (StreamKind_Last==Stream_Video)
- {
- if (!Codec_Temp.empty())
- Fill(Stream_Video, StreamPos_Last, Video_Codec, Codec_Temp, true);
-
- //120 fps hack
- const Ztring &FrameRate=Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate);
- if (FrameRate.To_int32u()==120)
- {
- float32 FrameRateF=FrameRate.To_float32();
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate_Minimum, FrameRateF/5, 3, true);
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate_Maximum, FrameRateF/4, 3, true);
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate_Mode, "VFR");
- }
- }
-
- //Hack - SMPTE ST 337, RIFF channels count is wrong
- if (StreamKind_Last==Stream_Audio && Retrieve(Stream_Audio, StreamPos_Last, Audio_MuxingMode)==__T("AES3") && Temp->second.Parsers[0]->Get(Stream_Audio, 0, Audio_Channel_s_).empty())
- Clear(Stream_Audio, StreamPos_Last, Audio_Channel_s_);
-
- //Alignment
- if (StreamKind_Last==Stream_Audio && Count_Get(Stream_Video)>0) //Only if this is not a WAV file
- {
- Fill(Stream_Audio, StreamPos_Last, Audio_Alignment, Temp->second.ChunksAreComplete?"Aligned":"Split");
- Fill(Stream_Audio, StreamPos_Last, Audio_Alignment_String, MediaInfoLib::Config.Language_Get(Temp->second.ChunksAreComplete?__T("Alignment_Aligned"):__T("Alignment_Split")));
- }
-
- //Delay
- if (StreamKind_Last==Stream_Audio && Count_Get(Stream_Video)==1 && Temp->second.Rate!=0 && Temp->second.Parsers[0]->Status[IsAccepted])
- {
- float Delay=0;
- bool Delay_IsValid=false;
-
- if (Temp->second.Parsers[0]->Buffer_TotalBytes_FirstSynched==0)
- {
- Delay=0;
- Delay_IsValid=true;
- }
- else if (Temp->second.Rate!=0)
- {
- Delay=((float)Temp->second.Parsers[0]->Buffer_TotalBytes_FirstSynched)*1000/Temp->second.Rate;
- Delay_IsValid=true;
- }
- else if (Temp->second.Parsers[0]->Retrieve(Stream_Audio, 0, Audio_BitRate).To_int64u()!=0)
- {
- Delay=((float)Temp->second.Parsers[0]->Buffer_TotalBytes_FirstSynched)*1000/Temp->second.Parsers[0]->Retrieve(Stream_Audio, 0, Audio_BitRate).To_int64u();
- Delay_IsValid=true;
- }
- else if (Temp->second.Parsers[0]->Retrieve(Stream_Audio, 0, Audio_BitRate_Nominal).To_int64u()!=0)
- {
- Delay=((float)Temp->second.Parsers[0]->Buffer_TotalBytes_FirstSynched)*1000/Temp->second.Parsers[0]->Retrieve(Stream_Audio, 0, Audio_BitRate_Nominal).To_int64u();
- Delay_IsValid=true;
- }
-
- if (Delay_IsValid)
- {
- Delay+=((float)Temp->second.Start)*1000/Temp->second.Rate;
- Fill(Stream_Audio, StreamPos_Last, Audio_Delay, Delay, 0, true);
- Fill(Stream_Audio, StreamPos_Last, Audio_Delay_Source, "Stream", Unlimited, true, true);
- for (size_t StreamPos=0; StreamPos<Count_Get(Stream_Video); StreamPos++)
- Fill(Stream_Video, StreamPos, Video_Delay, 0, 10, true);
- }
- }
-
- //Special case: AAC
- if (StreamKind_Last==Stream_Audio
- && (Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("AAC")
- || Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("MPEG Audio")
- || Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("Vorbis")))
- Clear(Stream_Audio, StreamPos_Last, Audio_BitDepth); //Resolution is not valid for AAC / MPEG Audio / Vorbis
-
- //Format specific
- #if defined(MEDIAINFO_DVDIF_YES)
- if (StreamKind_Last==Stream_Video && (MediaInfoLib::Config.Codec_Get(Ztring().From_CC4(Temp->second.Compression), InfoCodec_KindofCodec).find(__T("DV"))==0
- || Retrieve(Stream_Video, StreamPos_Last, Video_Format)==__T("DV")
- || Retrieve(Stream_Video, StreamPos_Last, Video_Codec)==__T("DV")))
- {
- if (Retrieve(Stream_General, 0, General_Recorded_Date).empty())
- Fill(Stream_General, 0, General_Recorded_Date, Temp->second.Parsers[0]->Retrieve(Stream_General, 0, General_Recorded_Date));
-
- //Video and Audio are together
- size_t Audio_Count=Temp->second.Parsers[0]->Count_Get(Stream_Audio);
- for (size_t Audio_Pos=0; Audio_Pos<Audio_Count; Audio_Pos++)
- {
- Fill_Flush();
- Stream_Prepare(Stream_Audio);
- size_t Pos=Count_Get(Stream_Audio)-1;
- Merge(*Temp->second.Parsers[0], Stream_Audio, Audio_Pos, StreamPos_Last);
- Fill(Stream_Audio, Pos, Audio_MuxingMode, "DV");
- Fill(Stream_Audio, Pos, Audio_Duration, Retrieve(Stream_Video, Temp->second.StreamPos, Video_Duration));
- Fill(Stream_Audio, Pos, "MuxingMode_MoreInfo", __T("Muxed in Video #")+Ztring().From_Number(Temp->second.StreamPos+1));
- Fill(Stream_Audio, Pos, Audio_StreamSize_Encoded, 0); //Included in the DV stream size
- Ztring ID=Retrieve(Stream_Audio, Pos, Audio_ID);
- Fill(Stream_Audio, Pos, Audio_ID, Retrieve(Stream_Video, Temp->second.StreamPos, Video_ID)+__T("-")+ID, true);
- }
-
- StreamKind_Last=Stream_Video;
- StreamPos_Last=Temp->second.StreamPos;
- }
- #endif
- }
- else if (StreamKind_Last!=Stream_General)
- Fill(StreamKind_Last, StreamPos_Last, General_ID, ID);
-
- //Duration
- if (Temp->second.PacketCount>0)
- {
- if (StreamKind_Last==Stream_Video) // && Retrieve(Stream_Video, StreamPos_Last, Video_Duration).empty())
- {
- //Duration in case it is missing from header (malformed header...)
- if (Temp->second.indx_Duration && Temp->second.Rate)
- Fill(Stream_Video, StreamPos_Last, Video_Duration, ((float64)Temp->second.indx_Duration)*1000*Temp->second.Scale/Temp->second.Rate, 0, true);
- else
- Fill(Stream_Video, StreamPos_Last, Video_FrameCount, Temp->second.PacketCount, 10, true);
- }
- if (StreamKind_Last==Stream_Audio)
- {
- //Duration in case it is missing from header (malformed header...)
- int64u SamplingCount=0;
- #if defined(MEDIAINFO_MPEGA_YES)
- if (Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("MPEG Audio"))
- {
- if (Temp->second.Parsers[0] && Temp->second.PacketPos==((File_Mpega*)Temp->second.Parsers[0])->Frame_Count_Valid) //Only for stream with one frame per chunk
- {
- Ztring Version=Retrieve(Stream_Audio, StreamPos_Last, Audio_Format_Version);
- Ztring Layer=Retrieve(Stream_Audio, StreamPos_Last, Audio_Format_Profile);
- if (Version==__T("Version 1") && Layer==__T("Layer 1"))
- SamplingCount = (int64u)Temp->second.PacketCount * 384; //MPEG-1 Layer 1
- else if ((Version==__T("Version 2") || Version==__T("Version 2.5")) && Layer==__T("Layer 1"))
- SamplingCount = (int64u)Temp->second.PacketCount * 192; //MPEG-2 or 2.5 Layer 1
- else if ((Version==__T("Version 2") || Version==__T("Version 2.5")) && Layer==__T("Layer 3"))
- SamplingCount = (int64u)Temp->second.PacketCount * 576; //MPEG-2 or 2.5 Layer 3
- else
- SamplingCount = (int64u)Temp->second.PacketCount * 1152;
- }
- }
- #endif
- if (Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("PCM"))
- {
- int64u Resolution=Retrieve(Stream_Audio, StreamPos_Last, Audio_BitDepth).To_int64u();
- int64u Channels=Retrieve(Stream_Audio, StreamPos_Last, Audio_Channel_s_).To_int64u();
- if (Resolution>0 && Channels>0)
- SamplingCount=Temp->second.StreamSize*8/Resolution/Channels;
- }
- if (Retrieve(Stream_Audio, StreamPos_Last, Audio_Format)==__T("ADPCM"))
- {
- int64u Resolution=Retrieve(Stream_Audio, StreamPos_Last, Audio_BitDepth).To_int64u();
- int64u Channels=Retrieve(Stream_Audio, StreamPos_Last, Audio_Channel_s_).To_int64u();
- if (Resolution>0 && Channels>0)
- SamplingCount=(int64u)(Temp->second.StreamSize*8/Resolution/Channels*0.98); //0.98 is not precise!
-
- //ADPCM estimation is not precise, if container sampling count is around our value, using it rather than the estimation
- float32 SamplingRate=Retrieve(Stream_Audio, StreamPos_Last, Audio_SamplingRate).To_float32();
- if (SamplingRate>0
- && SamplingCount*1000/SamplingRate<((float32)avih_TotalFrame)/avih_FrameRate*1000*1.10
- && SamplingCount*1000/SamplingRate>((float32)avih_TotalFrame)/avih_FrameRate*1000*0.10)
- SamplingCount=0; //Value disabled
- }
- //One AC-3 frame is 32 ms
- //One DTS frame is 21 ms
-
- float32 SamplingRate=Retrieve(Stream_Audio, StreamPos_Last, Audio_SamplingRate).To_float32();
- if (SamplingCount>0 && SamplingRate>0)
- Fill(Stream_Audio, StreamPos_Last, Audio_Duration, SamplingCount*1000/SamplingRate, 0, true);
- else if (Temp->second.indx_Duration && Temp->second.Rate)
- Fill(Stream_Audio, StreamPos_Last, Audio_Duration, ((float64)Temp->second.indx_Duration)*1000*Temp->second.Scale/Temp->second.Rate, 0, true);
- else if (Temp->second.Rate && Temp->second.Scale!=1) //Note: some files with Scale==1 are buggy
- Fill(Stream_Audio, StreamPos_Last, Audio_Duration, ((float64)Temp->second.Length)*1000*Temp->second.Scale/Temp->second.Rate, 0, true);
-
- //Interleave
- if (Stream[0x30300000].PacketCount && Temp->second.PacketCount)
- {
- Fill(Stream_Audio, StreamPos_Last, "Interleave_VideoFrames", (float)Stream[0x30300000].PacketCount/Temp->second.PacketCount, 2);
- if (Retrieve(Stream_Video, 0, Video_FrameRate).To_float32())
- {
- Fill(Stream_Audio, StreamPos_Last, "Interleave_Duration", (float)Stream[0x30300000].PacketCount/Temp->second.PacketCount*1000/Retrieve(Stream_Video, 0, Video_FrameRate).To_float32(), 0);
- Ztring Interleave_Duration_String;
- Interleave_Duration_String+=Retrieve(Stream_Audio, StreamPos_Last, "Interleave_Duration");
- Interleave_Duration_String+=__T(" ");
- Interleave_Duration_String+=MediaInfoLib::Config.Language_Get(__T("ms"));
- if (!Retrieve(Stream_Audio, StreamPos_Last, "Interleave_VideoFrames").empty())
- {
- Interleave_Duration_String+=__T(" (");
- Interleave_Duration_String+=MediaInfoLib::Config.Language_Get(Retrieve(Stream_Audio, StreamPos_Last, "Interleave_VideoFrames"), __T(" video frames"));
- Interleave_Duration_String+=__T(")");
- }
- Fill(Stream_Audio, StreamPos_Last, "Interleave_Duration/String", Interleave_Duration_String);
- }
- int64u Audio_FirstBytes=0;
- for (std::map<int64u, stream_structure>::iterator Stream_Structure_Temp=Stream_Structure.begin(); Stream_Structure_Temp!=Stream_Structure.end(); ++Stream_Structure_Temp)
- {
- if (Stream_Structure_Temp->second.Name==0x30300000)
- break;
- if (Stream_Structure_Temp->second.Name==Temp->first)
- Audio_FirstBytes+=Stream_Structure_Temp->second.Size;
- }
- if (Audio_FirstBytes && Temp->second.AvgBytesPerSec)
- {
- Fill(Stream_Audio, StreamPos_Last, "Interleave_Preload", Audio_FirstBytes*1000/Temp->second.AvgBytesPerSec);
- Fill(Stream_Audio, StreamPos_Last, "Interleave_Preload/String", Retrieve(Stream_Audio, StreamPos_Last, "Interleave_Preload")+__T(" ")+MediaInfoLib::Config.Language_Get(__T("ms")));
- }
- }
- }
-
- //Source duration
- if (Temp->second.PacketCount && Temp->second.Length!=Temp->second.PacketCount)
- {
- if (StreamKind_Last==Stream_Video && Temp->second.Rate)
- Fill(Stream_Video, StreamPos_Last, "Source_Duration", ((float64)Temp->second.PacketCount)*1000*Temp->second.Scale/Temp->second.Rate, 0);
- if (StreamKind_Last==Stream_Audio && Temp->second.Rate)
- {
- float64 Duration_Source=((float64)Temp->second.StreamSize)*1000/Temp->second.AvgBytesPerSec;
- float64 Duration_Header=Retrieve(Stream_Audio, StreamPos_Last, Audio_Duration).To_float64();
- float64 Difference=Duration_Source-Duration_Header;
- if (Temp->second.Scale!=1 && float64_int64s(Duration_Header/Duration_Source)==Temp->second.Scale)
- Fill(Stream_Audio, StreamPos_Last, Audio_Duration, Duration_Source, 0, true); //Found 1 stream with Scale not being right
- else if (Difference<-2 || Difference>2) //+/- 2 ms
- Fill(Stream_Audio, StreamPos_Last, "Source_Duration", Duration_Source, 0);
- }
- }
- }
-
- ++Temp;
- }
-
- //Some work on the first video stream
- if (Count_Get(Stream_Video))
- {
- //ODML
- if (dmlh_TotalFrame!=0 && Retrieve(Stream_Video, 0, Video_Duration).empty())
- for (size_t StreamPos=0; StreamPos<Count_Get(Stream_Video); StreamPos++)
- Fill(Stream_Video, StreamPos, Video_FrameCount, dmlh_TotalFrame, 10, true);
- }
-
- //Rec
- if (rec__Present)
- Fill(Stream_General, 0, General_Format_Settings, "rec");
-
- //Interleaved
- if (Interleaved0_1 && Interleaved0_10 && Interleaved1_1 && Interleaved1_10)
- Fill(Stream_General, 0, General_Interleaved, ((Interleaved0_1<Interleaved1_1 && Interleaved0_10>Interleaved1_1)
- || (Interleaved1_1<Interleaved0_1 && Interleaved1_10>Interleaved0_1))?"Yes":"No");
-
- //MD5
- size_t Pos=0;
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Count_Get((stream_t)StreamKind); StreamPos++)
- if (Pos<MD5s.size())
- {
- Fill((stream_t)StreamKind, StreamPos, "MD5", MD5s[Pos]);
- Pos++;
- }
-
- //Commercial names
- if (Count_Get(Stream_Video)==1)
- {
- Streams_Finish_StreamOnly();
- if (!Retrieve(Stream_Video, 0, Video_Format_Commercial_IfAny).empty())
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, Retrieve(Stream_Video, 0, Video_Format_Commercial_IfAny));
- Fill(Stream_General, 0, General_Format_Commercial, __T("AVI ")+Retrieve(Stream_Video, 0, Video_Format_Commercial_IfAny));
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("DV"))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "DV");
- Fill(Stream_General, 0, General_Format_Commercial, "AVI DV");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)==__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:2") && Retrieve(Stream_Video, 0, Video_BitRate)==__T("30000000"))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "MPEG IMX 30");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "MPEG IMX 30");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)==__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:2") && Retrieve(Stream_Video, 0, Video_BitRate)==__T("40000000"))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "MPEG IMX 40");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "MPEG IMX 40");
- }
- else if (Retrieve(Stream_Video, 0, Video_Format)==__T("MPEG Video") && Retrieve(Stream_Video, 0, Video_Format_Settings_GOP)==__T("N=1") && Retrieve(Stream_Video, 0, Video_Colorimetry)==__T("4:2:2") && Retrieve(Stream_Video, 0, Video_BitRate)==__T("50000000"))
- {
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, "MPEG IMX 50");
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "MPEG IMX 50");
- }
- }
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Riff::Read_Buffer_Init()
-{
- #if MEDIAINFO_DEMUX
- Demux_UnpacketizeContainer=Config->Demux_Unpacketize_Get();
- Demux_Rate=Config->Demux_Rate_Get();
- if (Demux_Rate==0)
- Demux_Rate=25; //Default value
- #endif //MEDIAINFO_DEMUX
-
- PAR=0;
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_Riff::Read_Buffer_Seek (size_t Method, int64u Value, int64u /*ID*/)
-{
- //Only Wave and AIFF
- switch (Kind)
- {
- case Kind_Wave :
- case Kind_Aiff :
- break;
- default : return (size_t)-1;
- }
-
- //Parsing
- switch (Method)
- {
- case 0 :
- if (Value<Buffer_DataToParse_Begin)
- Value=Buffer_DataToParse_Begin;
- if (Value>Buffer_DataToParse_End)
- Value=Buffer_DataToParse_End;
- GoTo(Value);
- Open_Buffer_Unsynch();
- return 1;
- case 1 :
- GoTo(Buffer_DataToParse_Begin+(Buffer_DataToParse_End-Buffer_DataToParse_Begin)*Value/10000);
- Open_Buffer_Unsynch();
- return 1;
- case 2 : //Timestamp
- {
- if (AvgBytesPerSec==0)
- return (size_t)-1;
-
- float64 ValueF=(float64)Value;
- ValueF/=1000000000; //Value is in ns
- ValueF*=AvgBytesPerSec;
- GoTo(Buffer_DataToParse_Begin+float64_int64s(ValueF));
- return 1;
- }
- case 3 : //FrameNumber
- {
- if (AvgBytesPerSec==0 || Demux_Rate==0 || BlockAlign==0)
- return (size_t)-1;
-
- float64 BytesPerFrame=AvgBytesPerSec/Demux_Rate;
- int64u StreamOffset=(int64u)(Value*BytesPerFrame);
- StreamOffset/=BlockAlign;
- StreamOffset*=BlockAlign;
-
- GoTo(Buffer_DataToParse_Begin+StreamOffset);
- return 1;
- }
- default : return (size_t)-1; //Not supported
- }
-}
-#endif //MEDIAINFO_SEEK
-
-//---------------------------------------------------------------------------
-void File_Riff::Read_Buffer_Unsynched()
-{
- for (std::map<int32u, stream>::iterator Stream_Item=Stream.begin(); Stream_Item!=Stream.end(); ++Stream_Item)
- for (size_t Pos=0; Pos<Stream_Item->second.Parsers.size(); Pos++)
- Stream_Item->second.Parsers[Pos]->Open_Buffer_Unsynch();
-
- if (IsSub)
- {
- while(Element_Level)
- Element_End0();
-
- #if defined(MEDIAINFO_ANCILLARY_YES)
- //Ancillary specific
- if (Ancillary && (*Ancillary))
- (*Ancillary)->Open_Buffer_Unsynch();
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
- }
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-void File_Riff::Read_Buffer_Continue()
-{
- if (Demux_Parser)
- {
- Open_Buffer_Continue(Demux_Parser, Buffer+Buffer_Offset, 0, false);
- Demux_Parser=NULL;
- //if (Config->Demux_EventWasSent)
- // return;
- }
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Riff::Header_Begin()
-{
- while (File_Offset+Buffer_Offset<Buffer_DataToParse_End)
- {
- #if MEDIAINFO_DEMUX
- if (AvgBytesPerSec && Demux_Rate && BlockAlign)
- {
- float64 BytesPerFrame=((float64)AvgBytesPerSec)/Demux_Rate;
- Frame_Count_NotParsedIncluded=float64_int64s(((float64)(File_Offset+Buffer_Offset-Buffer_DataToParse_Begin))/BytesPerFrame);
- Element_Size=float64_int64s(BytesPerFrame*(Frame_Count_NotParsedIncluded+1));
- Element_Size/=BlockAlign;
- Element_Size*=BlockAlign;
- Element_Size-=File_Offset+Buffer_Offset-Buffer_DataToParse_Begin;
- FrameInfo.PTS=FrameInfo.DTS=float64_int64s(((float64)Frame_Count_NotParsedIncluded)*1000000000/Demux_Rate);
- while (Element_Size && File_Offset+Buffer_Offset+Element_Size>Buffer_DataToParse_End)
- Element_Size-=BlockAlign;
- if (Element_Size==0)
- Element_Size=BlockAlign;
- if (Buffer_Offset+Element_Size>Buffer_Size)
- return false;
- }
- else
- #endif //MEDIAINFO_DEMUX
- if (File_Offset+Buffer_Size<=Buffer_DataToParse_End)
- Element_Size=Buffer_Size; //All the buffer is used
- else
- {
- Element_Size=Buffer_DataToParse_End-(File_Offset+Buffer_Offset);
- Buffer_DataToParse_End=0;
- }
-
- if (Buffer_Offset+(size_t)Element_Size>Buffer_Size)
- return false;
-
- // Fake header
- Element_Begin0();
- Element_Begin0();
- if (Buffer_DataToParse_End)
- Header_Fill_Size(Buffer_DataToParse_End-(File_Offset+Buffer_Offset));
- else
- Header_Fill_Size(Element_Size);
- Element_End();
-
- switch (Kind)
- {
- case Kind_Wave : WAVE_data_Continue(); break;
- case Kind_Aiff : AIFF_SSND_Continue(); break;
- case Kind_Rmp3 : RMP3_data_Continue(); break;
- default : AVI__movi_xxxx();
- }
-
- if (Config->ParseSpeed<1.0 && File_Offset+Buffer_Offset+Element_Offset-Buffer_DataToParse_Begin>=256*1024)
- {
- File_GoTo=Buffer_DataToParse_End;
- Buffer_Offset=Buffer_Size;
- Element_Size=0;
- }
- else
- {
- Buffer_Offset+=(size_t)Element_Size;
- Element_Size-=Element_Offset;
- }
- Element_Offset=0;
- Element_End0();
-
- if (Status[IsFinished] || (File_GoTo!=(int64u)-1 && (File_GoTo<=Buffer_DataToParse_Begin || File_GoTo>=Buffer_DataToParse_End)))
- {
- Buffer_DataToParse_Begin=(int64u)-1;
- Buffer_DataToParse_End=0;
- return false;
- }
-
- if (Buffer_Offset>=Buffer_Size)
- return false;
-
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- return false;
- #endif //MEDIAINFO_DEMUX
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::Header_Parse()
-{
- //Special case : W3DI tags (unknown format!) are at the end of the file
- if (Element_Level==2 && File_Offset+Buffer_Size==File_Size && Buffer_Size>8)
- {
- if (CC4(Buffer+Buffer_Size-4)==Elements::W3DI)
- {
- int32u Size=LittleEndian2int32u(Buffer+Buffer_Size-8);
- if (Size>8 && Size<=Buffer_Size && Buffer_Offset+Size==Buffer_Size)
- {
- //Filling
- Header_Fill_Code(Elements::W3DI, "W3DI");
- Header_Fill_Size(Size);
- return;
- }
- }
- }
-
- //Special case : SMV file detected
- if (SMV_BlockSize)
- {
- //Filling
- Header_Fill_Code(Elements::SMV0_xxxx, "SMV Block");
- Header_Fill_Size(SMV_BlockSize);
- return;
- }
-
- //Parsing
- int32u Size, Name;
- Get_C4 (Name, "Name");
- if (Name==Elements::SMV0)
- {
- //SMV specific
- //Filling
- Header_Fill_Code(Elements::SMV0, "SMV header");
- Header_Fill_Size(51);
- return;
- }
- if (Name==Elements::riff)
- IsWave64=true;
- if (IsWave64)
- {
- //Wave64 specific
- int64u Size_Complete;
- Skip_XX(12, "Name (GUID)");
- Get_L8 (Size_Complete, "Size");
-
- //Alignment
- if (Name!=Elements::riff && Size_Complete%8)
- {
- Alignement_ExtraByte=Size_Complete%8;
- Size_Complete+=Alignement_ExtraByte; //Always 8-byte aligned
- }
- else
- Alignement_ExtraByte=0;
-
- //Top level chunks
- if (Name==Elements::riff)
- {
- Get_C4 (Name, "Real Name");
- Skip_XX(12, "Real Name (GUID)");
- }
-
- //Special case: we don't need the full data
- if (Name==Elements::WAVE_data)
- {
- Buffer_DataToParse_Begin=File_Offset+Buffer_Offset;
- if (Size_Complete)
- Buffer_DataToParse_End=File_Offset+Buffer_Offset+Size_Complete;
- else
- Buffer_DataToParse_End=File_Size; //Found one file with 0 as size of data part
- Size_Complete=Element_Offset;
- }
-
- //Filling
- Header_Fill_Code(Name, Ztring().From_CC4(Name));
- Header_Fill_Size(Size_Complete);
- return;
- }
- if (Name==Elements::FORM
- || Name==Elements::MThd)
- IsBigEndian=true; //Swap from Little to Big Endian for "FORM" files (AIFF...)
- if (IsBigEndian)
- Get_B4 (Size, "Size");
- else
- {
- Get_L4 (Size, "Size");
-
- //Testing malformed (not word aligned)
- if (!IsNotWordAligned_Tested && Size%2)
- {
- if (File_Offset+Buffer_Offset+8+Size==File_Size)
- IsNotWordAligned=true;
- else if (!File_Name.empty())
- {
- File F(File_Name);
- F.GoTo(File_Offset+Buffer_Offset+8+Size);
- int8u Temp;
- if (F.Read(&Temp, 1))
- {
- if (!((Temp<'A' || Temp>'z') && Temp!=' '))
- IsNotWordAligned=true;
- }
- }
- IsNotWordAligned_Tested=true;
- }
- }
-
- //RF64
- int64u Size_Complete=Size;
- if (Size==0 && Name==Elements::RIFF)
- Size_Complete=File_Size-8;
- else if (Size==0xFFFFFFFF)
- {
- if (Element_Size<0x1C)
- {
- Element_WaitForMoreData();
- return;
- }
- if (Name==Elements::RF64 && CC4(Buffer+Buffer_Offset+0x0C)==Elements::WAVE_ds64)
- {
- Size_Complete=LittleEndian2int64u(Buffer+Buffer_Offset+0x14);
- Param_Info1(Size_Complete);
- }
- else if (Name==Elements::WAVE_data)
- {
- Size_Complete=WAVE_data_Size;
- Param_Info1(Size_Complete);
- }
- }
-
- //Coherency
- if (Stream_Structure_Temp!=Stream_Structure.end() && Stream_Structure_Temp->second.Size==0)
- {
- Name=(int32u)-1;
- Size_Complete=0; //Hack in some indexes with Size==0 (why?), ignoring content of header
- }
- if (File_Offset+Buffer_Offset+8+Size_Complete>File_Size)
- Size_Complete=File_Size-(File_Offset+Buffer_Offset+8);
-
- //Alignment
- if (Size_Complete%2 && !IsNotWordAligned)
- {
- Size_Complete++; //Always 2-byte aligned
- Alignement_ExtraByte=1;
- }
- else
- Alignement_ExtraByte=0;
-
- //Top level chunks
- if (Name==Elements::LIST
- || Name==Elements::RIFF
- || Name==Elements::RF64
- || Name==Elements::ON2_
- || Name==Elements::FORM)
- {
- if (Name==Elements::RF64)
- IsRIFF64=true;
- Get_C4 (Name, "Real Name");
- }
-
- //Integrity
- if (Name==0x00000000)
- {
- //Filling
- Header_Fill_Code(0, "Junk");
- Header_Fill_Size(File_Size-(File_Offset+Buffer_Offset));
- Alignement_ExtraByte=0;
- return;
- }
-
- //Specific
- if (Name==Elements::ON2f)
- Name=Elements::AVI_;
-
- //Tests
- if (Element_Level==2 && Name==Elements::WAVE && !IsRIFF64 && File_Size>0xFFFFFFFF)
- IsWaveBroken=true; //Non standard big files detection
- if (IsWaveBroken && (Name==Elements::WAVE || Name==Elements::WAVE_data))
- Size_Complete=File_Size-(File_Offset+Buffer_Offset+8); //Non standard big files detection
- if (movi_Size && Size_Complete>movi_Size/2 && 8+Size_Complete>1024*1024 && !((Name&0xFFFF0000)==0x69780000 || (Name&0x0000FFFF)==0x00006978) && Element_Level==(rec__Present?(size_t)5:(size_t)4) && Buffer_Offset+8+Size_Complete>Buffer_Size)
- {
- Buffer_DataToParse_End=File_Offset+Buffer_Offset+8+Size_Complete;
- Size_Complete=Buffer_Size-(Buffer_Offset+8);
- }
- if ((Name==Elements::WAVE_data || Name==Elements::AIFF_SSND))
- {
- Buffer_DataToParse_Begin=File_Offset+Buffer_Offset+8;
- if (Size_Complete)
- Buffer_DataToParse_End=File_Offset+Buffer_Offset+8+Size_Complete;
- else
- Buffer_DataToParse_End=File_Size; //Found one file with 0 as size of data part
- Size_Complete=0;
- }
-
- //Filling
- Header_Fill_Code(Name, Ztring().From_CC4(Name));
- Header_Fill_Size(Size_Complete+8);
-}
-
-//---------------------------------------------------------------------------
-bool File_Riff::BookMark_Needed()
-{
- if (!movi_Size || SecondPass)
- return false;
-
- //Go to the first usefull chunk
- if (stream_Count==0 && Stream_Structure.empty())
- return false; //No need
-
- Stream_Structure_Temp=Stream_Structure.begin();
- if (!Stream_Structure.empty())
- {
- #if MEDIAINFO_MD5
- if (Config->File_Md5_Get())
- {
- GoTo(0);
- Md5_ParseUpTo=Stream_Structure_Temp->first;
- }
- else
- #endif //MEDIAINFO_MD5
- GoTo(Stream_Structure_Temp->first);
- }
- NeedOldIndex=false;
- SecondPass=true;
- Index_Pos.clear(); //We didn't succeed to find theses indexes :(
- return true;
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Riff::TimeCode_Fill(const Ztring &Name, const Ztring &Value)
-{
- if (Value.empty())
- return;
-
- for (size_t StreamPos=0; StreamPos<Count_Get(Stream_Video); StreamPos++)
- {
- Fill(Stream_Video, StreamPos, Video_TimeCode_FirstFrame, Value);
- Fill(Stream_Video, StreamPos, Video_TimeCode_Source, Name);
- }
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_RIFF_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Riff.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Riff.h
deleted file mode 100644
index b73c543f1..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Riff.h
+++ /dev/null
@@ -1,333 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about RIFF files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_RiffH
-#define MediaInfo_File_RiffH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#if defined(MEDIAINFO_ANCILLARY_YES)
- #include <MediaInfo/Multiple/File_Ancillary.h>
-#endif //defined(MEDIAINFO_ANCILLARY_YES)
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Riff
-//***************************************************************************
-
-class File_Riff : public File__Analyze
-{
-public :
- //In/Out
- #if defined(MEDIAINFO_ANCILLARY_YES)
- File_Ancillary** Ancillary;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
-
-protected :
- //Streams management
- void Streams_Finish();
-
-public :
- File_Riff();
- ~File_Riff();
-
-private :
- //Buffer - Global
- void Read_Buffer_Init();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
- #if MEDIAINFO_DEMUX
- void Read_Buffer_Continue ();
- #endif //MEDIAINFO_DEMUX
- void Read_Buffer_Unsynched();
-
- //Buffer - Per element
- bool Header_Begin();
- void Header_Parse();
- void Data_Parse();
-
- bool BookMark_Needed();
-
- //Data
- struct stream
- {
- std::vector<File__Analyze*> Parsers;
- int32u fccType;
- int32u fccHandler;
- int32u Scale;
- int32u Rate;
- int32u Start;
- int32u Length;
- int32u Compression;
- stream_t StreamKind;
- size_t StreamPos;
- int32u AvgBytesPerSec;
- size_t PacketPos;
- size_t PacketCount;
- int64u StreamSize;
- int64u indx_Duration;
- bool SearchingPayload;
- bool Specific_IsMpeg4v;
- bool ChunksAreComplete;
- bool IsPcm;
-
- stream()
- {
- fccType=0x00000000;
- fccHandler=0x00000000;
- Scale=0;
- Rate=0;
- Start=0;
- Length=0;
- Compression=0x00000000;
- StreamKind=Stream_Max;
- StreamPos=0;
- AvgBytesPerSec=0;
- PacketPos=0;
- PacketCount=0;
- StreamSize=0;
- indx_Duration=0;
- SearchingPayload=true;
- Specific_IsMpeg4v=false;
- ChunksAreComplete=true;
- IsPcm=false;
- }
-
- ~stream()
- {
- for (size_t Pos=0; Pos<Parsers.size(); Pos++)
- delete Parsers[Pos]; //Parser=NULL;
- }
- };
- std::map<int32u, stream> Stream;
- int32u Stream_ID;
-
- struct stream_structure
- {
- int64u Name;
- int64u Size;
- };
- std::map<int64u, stream_structure> Stream_Structure;
- std::map<int64u, stream_structure>::iterator Stream_Structure_Temp;
- std::map<int64u, int64u> Index_Pos;
- int64u Interleaved0_1;
- int64u Interleaved0_10;
- int64u Interleaved1_1;
- int64u Interleaved1_10;
-
- //Temp
- Ztring INFO_ISMP;
- Ztring Tdat_tc_A;
- Ztring Tdat_tc_O;
- ZtringList MD5s;
- int64u WAVE_data_Size; //RF64 WAVE_data real chunk size
- int64u WAVE_fact_samplesCount; //RF64 WAVE_fact real samplesCount
- int64u Alignement_ExtraByte; //Padding from the container
- int64u Buffer_DataToParse_Begin;
- int64u Buffer_DataToParse_End;
- int32u AvgBytesPerSec;
- int16u BlockAlign;
- float64 PAR;
- float64 Demux_Rate;
- float64 avih_FrameRate; //FrameRate of the first video stream in one MOVI chunk
- int32u avih_TotalFrame; //Count of frames in one MOVI chunk
- int32u dmlh_TotalFrame; //Count of frames in the whole AVI file (with odml too)
- int64u Idx1_Offset; //Pos of the data part (AVI) for Idx1 chunk
- int64u movi_Size; //Size of the data part (AVI and AVIX)
- int64u TimeReference; //Only used by Brodcast extension
- int32u SMV_BlockSize; //Size of a SMV block, 0 if not SMV
- int32u SMV_FrameCount; //Frame count of a SMV block, 0 if not SMV
- int32u SamplesPerSec; //For bext
- int16u BitsPerSample; //For PCM only
- int8u stream_Count; //How many stream we have to parse
- bool rec__Present; //True if synchro element is present
- bool NeedOldIndex;
- bool IsBigEndian;
- bool IsWave64;
- bool IsRIFF64;
- bool IsWaveBroken;
- bool IsNotWordAligned;
- bool IsNotWordAligned_Tested;
- bool SecondPass; //Second pass for streams
- File__Analyze* DV_FromHeader;
- enum kind
- {
- Kind_None,
- Kind_Avi,
- Kind_Wave,
- Kind_Aiff,
- Kind_Rmp3,
- };
- kind Kind;
- #if defined(MEDIAINFO_GXF_YES)
- int32u rcrd_fld__anc__pos__LineNumber;
- #endif //defined(MEDIAINFO_GXF_YES)
-
- void TimeCode_Fill(const Ztring &Name, const Ztring &Value);
-
- //Chunks
- void AIFC ();
- void AIFC_COMM ();
- void AIFC_COMT ();
- void AIFC_FVER ();
- void AIFC_SSND ();
- void AIFF_SSND_Continue();
- void AIFC_xxxx ();
- void AIFF ();
- void AIFF_COMM ();
- void AIFF_COMT ();
- void AIFF_ID3_ () {WAVE_ID3_();}
- void AIFF_SSND ();
- void AIFF_xxxx ();
- void AVI_ ();
- void AVI__cset ();
- void AVI__Cr8r ();
- void AVI__exif ();
- void AVI__exif_xxxx ();
- void AVI__goog ();
- void AVI__goog_GDAT ();
- void AVI__hdlr ();
- void AVI__hdlr_avih ();
- void AVI__hdlr_JUNK ();
- void AVI__hdlr_strl ();
- void AVI__hdlr_strl_indx ();
- void AVI__hdlr_strl_indx_StandardIndex (int32u Entry_Count, int32u ChunkId);
- void AVI__hdlr_strl_indx_FieldIndex (int32u Entry_Count, int32u ChunkId);
- void AVI__hdlr_strl_indx_SuperIndex (int32u Entry_Count, int32u ChunkId);
- void AVI__hdlr_strl_JUNK ();
- void AVI__hdlr_strl_strd ();
- void AVI__hdlr_strl_strf ();
- void AVI__hdlr_strl_strf_auds ();
- void AVI__hdlr_strl_strf_auds_Mpega();
- void AVI__hdlr_strl_strf_auds_Aac();
- void AVI__hdlr_strl_strf_auds_Vorbis();
- void AVI__hdlr_strl_strf_auds_Vorbis2();
- void AVI__hdlr_strl_strf_auds_ExtensibleWave();
- void AVI__hdlr_strl_strf_iavs ();
- void AVI__hdlr_strl_strf_mids ();
- void AVI__hdlr_strl_strf_txts ();
- void AVI__hdlr_strl_strf_vids ();
- void AVI__hdlr_strl_strf_vids_Avc ();
- void AVI__hdlr_strl_strf_vids_Ffv1();
- void AVI__hdlr_strl_strf_vids_HuffYUV(int16u BitCount, int32u Height);
- void AVI__hdlr_strl_strh ();
- void AVI__hdlr_strl_strn ();
- void AVI__hdlr_strl_vprp ();
- void AVI__hdlr_odml ();
- void AVI__hdlr_odml_dmlh ();
- void AVI__hdlr_ON2h ();
- void AVI__hdlr_xxxx ();
- void AVI__idx1 ();
- void AVI__INFO ();
- void AVI__INFO_IID3 ();
- void AVI__INFO_ILYC ();
- void AVI__INFO_IMP3 ();
- void AVI__INFO_JUNK ();
- void AVI__INFO_xxxx ();
- void AVI__JUNK ();
- void AVI__MD5_ ();
- void AVI__movi ();
- void AVI__movi_xxxx ();
- void AVI__movi_xxxx___dc ();
- void AVI__movi_xxxx___tx ();
- void AVI__movi_xxxx___wb ();
- void AVI__movi_rec_ ();
- void AVI__movi_rec__xxxx ();
- void AVI__movi_StreamJump ();
- void AVI__PrmA ();
- void AVI__Tdat ();
- void AVI__Tdat_rn_A ();
- void AVI__Tdat_rn_O ();
- void AVI__Tdat_tc_A ();
- void AVI__Tdat_tc_O ();
- void AVI__GMET ();
- void AVI__xxxx ();
- void AVIX ();
- void AVIX_idx1 ();
- void AVIX_movi ();
- void AVIX_movi_xxxx ();
- void AVIX_movi_rec_ ();
- void AVIX_movi_rec__xxxx ();
- void CADP ();
- void CDDA ();
- void CDDA_fmt_ ();
- void CMJP ();
- void CMP4 ();
- void IDVX ();
- void INDX ();
- void INDX_xxxx ();
- void JUNK ();
- void menu ();
- void MThd ();
- void MTrk ();
- void PAL_ ();
- void QLCM ();
- void QLCM_fmt_ ();
- #if defined(MEDIAINFO_GXF_YES)
- void rcrd ();
- void rcrd_desc ();
- void rcrd_fld_ ();
- void rcrd_fld__anc_ ();
- void rcrd_fld__anc__pos_ ();
- void rcrd_fld__anc__pyld ();
- void rcrd_fld__finf ();
- #endif //defined(MEDIAINFO_GXF_YES)
- void RDIB ();
- void RMID ();
- void RMMP ();
- void RMP3 ();
- void RMP3_data ();
- void RMP3_data_Continue();
- void RMP3_INFO() {AVI__INFO();}
- void RMP3_INFO_IID3() {AVI__INFO_IID3();}
- void RMP3_INFO_ILYC() {AVI__INFO_ILYC();}
- void RMP3_INFO_IMP3() {AVI__INFO_IMP3();}
- void RMP3_INFO_JUNK() {AVI__INFO_JUNK ();}
- void RMP3_INFO_xxxx() {AVI__INFO_xxxx ();}
- void SMV0 ();
- void SMV0_xxxx ();
- void WAVE ();
- void WAVE__pmx ();
- void WAVE_aXML ();
- void WAVE_bext ();
- void WAVE_cue_ ();
- void WAVE_data ();
- void WAVE_data_Continue ();
- void WAVE_ds64 ();
- void WAVE_fact ();
- void WAVE_fmt_ ();
- void WAVE_ID3_ ();
- void WAVE_id3_ () {WAVE_ID3_();}
- void WAVE_INFO() {AVI__INFO();}
- void WAVE_INFO_xxxx() {AVI__INFO_xxxx ();}
- void WAVE_iXML ();
- void wave ();
- void wave_data () {WAVE_data();}
- void wave_fmt_ () {WAVE_fmt_();}
- void W3DI();
-
- //Temp
- #if MEDIAINFO_DEMUX
- File__Analyze* Demux_Parser;
- #endif //MEDIAINFO_DEMUX
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Riff_Elements.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Riff_Elements.cpp
deleted file mode 100644
index c68b15f57..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Riff_Elements.cpp
+++ /dev/null
@@ -1,3786 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Elements part
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_RIFF_YES
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Riff.h"
-#if defined(MEDIAINFO_DVDIF_YES)
- #include "MediaInfo/Multiple/File_DvDif.h"
-#endif
-#if defined(MEDIAINFO_OGG_YES)
- #include "MediaInfo/Multiple/File_Ogg.h"
- #include "MediaInfo/Multiple/File_Ogg_SubElement.h"
-#endif
-#if defined(MEDIAINFO_FFV1_YES)
- #include "MediaInfo/Video/File_Ffv1.h"
-#endif
-#if defined(MEDIAINFO_HUFFYUV_YES)
- #include "MediaInfo/Video/File_HuffYuv.h"
-#endif
-#if defined(MEDIAINFO_MPEG4V_YES)
- #include "MediaInfo/Video/File_Mpeg4v.h"
-#endif
-#if defined(MEDIAINFO_MPEGV_YES)
- #include "MediaInfo/Video/File_Mpegv.h"
-#endif
-#if defined(MEDIAINFO_PRORES_YES)
- #include "MediaInfo/Video/File_ProRes.h"
-#endif
-#if defined(MEDIAINFO_AVC_YES)
- #include "MediaInfo/Video/File_Avc.h"
-#endif
-#if defined(MEDIAINFO_CANOPUS_YES)
- #include "MediaInfo/Video/File_Canopus.h"
-#endif
-#if defined(MEDIAINFO_FRAPS_YES)
- #include "MediaInfo/Video/File_Fraps.h"
-#endif
-#if defined(MEDIAINFO_LAGARITH_YES)
- #include "MediaInfo/Video/File_Lagarith.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if defined(MEDIAINFO_AAC_YES)
- #include "MediaInfo/Audio/File_Aac.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_DTS_YES)
- #include "MediaInfo/Audio/File_Dts.h"
-#endif
-#if defined(MEDIAINFO_JPEG_YES)
- #include "MediaInfo/Image/File_Jpeg.h"
-#endif
-#if defined(MEDIAINFO_SUBRIP_YES)
- #include "MediaInfo/Text/File_SubRip.h"
-#endif
-#if defined(MEDIAINFO_OTHERTEXT_YES)
- #include "MediaInfo/Text/File_OtherText.h"
-#endif
-#if defined(MEDIAINFO_ADPCM_YES)
- #include "MediaInfo/Audio/File_Adpcm.h"
-#endif
-#if defined(MEDIAINFO_PCM_YES)
- #include "MediaInfo/Audio/File_Pcm.h"
-#endif
-#if defined(MEDIAINFO_SMPTEST0337_YES)
- #include "MediaInfo/Audio/File_SmpteSt0337.h"
-#endif
-#if defined(MEDIAINFO_ID3_YES)
- #include "MediaInfo/Tag/File_Id3.h"
-#endif
-#if defined(MEDIAINFO_ID3V2_YES)
- #include "MediaInfo/Tag/File_Id3v2.h"
-#endif
-#if defined(MEDIAINFO_GXF_YES)
- #if defined(MEDIAINFO_CDP_YES)
- #include "MediaInfo/Text/File_Cdp.h"
- #include <cstring>
- #endif
-#endif //MEDIAINFO_GXF_YES
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-std::string ExtensibleWave_ChannelMask (int32u ChannelMask)
-{
- std::string Text;
- if ((ChannelMask&0x0007)!=0x0000)
- Text+="Front:";
- if (ChannelMask&0x0001)
- Text+=" L";
- if (ChannelMask&0x0004)
- Text+=" C";
- if (ChannelMask&0x0002)
- Text+=" R";
-
- if ((ChannelMask&0x0600)!=0x0000)
- Text+=", Side:";
- if (ChannelMask&0x0200)
- Text+=" L";
- if (ChannelMask&0x0400)
- Text+=" R";
-
- if ((ChannelMask&0x0130)!=0x0000)
- Text+=", Back:";
- if (ChannelMask&0x0010)
- Text+=" L";
- if (ChannelMask&0x0100)
- Text+=" C";
- if (ChannelMask&0x0020)
- Text+=" R";
-
- if ((ChannelMask&0x0008)!=0x0000)
- Text+=", LFE";
-
- return Text;
-}
-
-//---------------------------------------------------------------------------
-std::string ExtensibleWave_ChannelMask2 (int32u ChannelMask)
-{
- std::string Text;
- int8u Count=0;
- if (ChannelMask&0x0001)
- Count++;
- if (ChannelMask&0x0004)
- Count++;
- if (ChannelMask&0x0002)
- Count++;
- Text+=Ztring::ToZtring(Count).To_UTF8();
- Count=0;
-
- if (ChannelMask&0x0200)
- Count++;
- if (ChannelMask&0x0400)
- Count++;
- Text+="/"+Ztring::ToZtring(Count).To_UTF8();
- Count=0;
-
- if (ChannelMask&0x0010)
- Count++;
- if (ChannelMask&0x0100)
- Count++;
- if (ChannelMask&0x0020)
- Count++;
- Text+="/"+Ztring::ToZtring(Count).To_UTF8();
- Count=0;
-
- if (ChannelMask&0x0008)
- Text+=".1";
-
- return Text;
-}
-
-//***************************************************************************
-// Const
-//***************************************************************************
-
-namespace Elements
-{
- const int32u FORM=0x464F524D;
- const int32u LIST=0x4C495354;
- const int32u ON2_=0x4F4E3220;
- const int32u RIFF=0x52494646;
- const int32u RF64=0x52463634;
-
- const int32u AIFC=0x41494643;
- const int32u AIFC_COMM=0x434F4D4D;
- const int32u AIFC_COMT=0x434F4D54;
- const int32u AIFC_FVER=0x46564552;
- const int32u AIFC_SSND=0x53534E44;
- const int32u AIFF=0x41494646;
- const int32u AIFF_COMM=0x434F4D4D;
- const int32u AIFF_COMT=0x434F4D54;
- const int32u AIFF_SSND=0x53534E44;
- const int32u AIFF__c__=0x28632920;
- const int32u AIFF_ANNO=0x414E4E4F;
- const int32u AIFF_AUTH=0x41555448;
- const int32u AIFF_NAME=0x4E414D45;
- const int32u AIFF_ID3_=0x49443320;
- const int32u AVI_=0x41564920;
- const int32u AVI__cset=0x63736574;
- const int32u AVI__Cr8r=0x43723872;
- const int32u AVI__exif=0x65786966;
- const int32u AVI__exif_ecor=0x65636F72;
- const int32u AVI__exif_emdl=0x656D646C;
- const int32u AVI__exif_emnt=0x656D6E74;
- const int32u AVI__exif_erel=0x6572656C;
- const int32u AVI__exif_etim=0x6574696D;
- const int32u AVI__exif_eucm=0x6575636D;
- const int32u AVI__exif_ever=0x65766572;
- const int32u AVI__goog=0x676F6F67;
- const int32u AVI__goog_GDAT=0x47444154;
- const int32u AVI__GMET=0x474D4554;
- const int32u AVI__hdlr=0x6864726C;
- const int32u AVI__hdlr_avih=0x61766968;
- const int32u AVI__hdlr_JUNK=0x4A554E4B;
- const int32u AVI__hdlr_strl=0x7374726C;
- const int32u AVI__hdlr_strl_indx=0x696E6478;
- const int32u AVI__hdlr_strl_JUNK=0x4A554E4B;
- const int32u AVI__hdlr_strl_strd=0x73747264;
- const int32u AVI__hdlr_strl_strf=0x73747266;
- const int32u AVI__hdlr_strl_strh=0x73747268;
- const int32u AVI__hdlr_strl_strh_auds=0x61756473;
- const int32u AVI__hdlr_strl_strh_iavs=0x69617673;
- const int32u AVI__hdlr_strl_strh_mids=0x6D696473;
- const int32u AVI__hdlr_strl_strh_vids=0x76696473;
- const int32u AVI__hdlr_strl_strh_txts=0x74787473;
- const int32u AVI__hdlr_strl_strn=0x7374726E;
- const int32u AVI__hdlr_strl_vprp=0x76707270;
- const int32u AVI__hdlr_odml=0x6F646D6C;
- const int32u AVI__hdlr_odml_dmlh=0x646D6C68;
- const int32u AVI__hdlr_ON2h=0x4F4E3268;
- const int32u AVI__idx1=0x69647831;
- const int32u AVI__INFO=0x494E464F;
- const int32u AVI__INFO_IARL=0x4941524C;
- const int32u AVI__INFO_IART=0x49415254;
- const int32u AVI__INFO_IAS1=0x49415331;
- const int32u AVI__INFO_IAS2=0x49415332;
- const int32u AVI__INFO_IAS3=0x49415333;
- const int32u AVI__INFO_IAS4=0x49415334;
- const int32u AVI__INFO_IAS5=0x49415335;
- const int32u AVI__INFO_IAS6=0x49415336;
- const int32u AVI__INFO_IAS7=0x49415337;
- const int32u AVI__INFO_IAS8=0x49415338;
- const int32u AVI__INFO_IAS9=0x49415339;
- const int32u AVI__INFO_ICDS=0x49434453;
- const int32u AVI__INFO_ICMS=0x49434D53;
- const int32u AVI__INFO_ICMT=0x49434D54;
- const int32u AVI__INFO_ICNT=0x49434E54;
- const int32u AVI__INFO_ICOP=0x49434F50;
- const int32u AVI__INFO_ICNM=0x49434E4D;
- const int32u AVI__INFO_ICRD=0x49435244;
- const int32u AVI__INFO_ICRP=0x49435250;
- const int32u AVI__INFO_IDIM=0x4944494D;
- const int32u AVI__INFO_IDIT=0x49444954;
- const int32u AVI__INFO_IDPI=0x49445049;
- const int32u AVI__INFO_IDST=0x49445354;
- const int32u AVI__INFO_IEDT=0x49454454;
- const int32u AVI__INFO_IENG=0x49454E47;
- const int32u AVI__INFO_IFRM=0x4946524D;
- const int32u AVI__INFO_IGNR=0x49474E52;
- const int32u AVI__INFO_IID3=0x49494433;
- const int32u AVI__INFO_IKEY=0x494B4559;
- const int32u AVI__INFO_ILGT=0x494C4754;
- const int32u AVI__INFO_ILNG=0x494C4E47;
- const int32u AVI__INFO_ILYC=0x494C5943;
- const int32u AVI__INFO_IMED=0x494D4544;
- const int32u AVI__INFO_IMP3=0x494D5033;
- const int32u AVI__INFO_IMUS=0x494D5553;
- const int32u AVI__INFO_INAM=0x494E414D;
- const int32u AVI__INFO_IPLT=0x49504C54;
- const int32u AVI__INFO_IPDS=0x49504453;
- const int32u AVI__INFO_IPRD=0x49505244;
- const int32u AVI__INFO_IPRT=0x49505254;
- const int32u AVI__INFO_IPRO=0x4950524F;
- const int32u AVI__INFO_IRTD=0x49525444;
- const int32u AVI__INFO_ISBJ=0x4953424A;
- const int32u AVI__INFO_ISGN=0x4953474E;
- const int32u AVI__INFO_ISTD=0x49535444;
- const int32u AVI__INFO_ISTR=0x49535452;
- const int32u AVI__INFO_ISFT=0x49534654;
- const int32u AVI__INFO_ISHP=0x49534850;
- const int32u AVI__INFO_ISMP=0x49534D50;
- const int32u AVI__INFO_ISRC=0x49535243;
- const int32u AVI__INFO_ISRF=0x49535246;
- const int32u AVI__INFO_ITCH=0x49544348;
- const int32u AVI__INFO_IWEB=0x49574542;
- const int32u AVI__INFO_IWRI=0x49575249;
- const int32u AVI__INFO_JUNK=0x4A554E4B;
- const int32u AVI__JUNK=0x4A554E4B;
- const int32u AVI__MD5_=0x4D443520;
- const int32u AVI__movi=0x6D6F7669;
- const int32u AVI__movi_rec_=0x72656320;
- const int32u AVI__movi_xxxx_____=0x00005F5F;
- const int32u AVI__movi_xxxx___db=0x00006462;
- const int32u AVI__movi_xxxx___dc=0x00006463;
- const int32u AVI__movi_xxxx___sb=0x00007362;
- const int32u AVI__movi_xxxx___tx=0x00007478;
- const int32u AVI__movi_xxxx___wb=0x00007762;
- const int32u AVI__PrmA=0x50726D41;
- const int32u AVI__Tdat=0x54646174;
- const int32u AVI__Tdat_rn_A=0x726E5F41;
- const int32u AVI__Tdat_rn_O=0x726E5F4F;
- const int32u AVI__Tdat_tc_A=0x74635F41;
- const int32u AVI__Tdat_tc_O=0x74635F4F;
- const int32u AVIX=0x41564958;
- const int32u AVIX_idx1=0x69647831;
- const int32u AVIX_movi=0x6D6F7669;
- const int32u AVIX_movi_rec_=0x72656320;
- const int32u CADP=0x43414450;
- const int32u CDDA=0x43444441;
- const int32u CDDA_fmt_=0x666D7420;
- const int32u CMJP=0x434D4A50;
- const int32u CMP4=0x434D5034;
- const int32u IDVX=0x49445658;
- const int32u INDX=0x494E4458;
- const int32u JUNK=0x4A554E4B;
- const int32u menu=0x6D656E75;
- const int32u MThd=0x4D546864;
- const int32u MTrk=0x4D54726B;
- const int32u PAL_=0x50414C20;
- const int32u QLCM=0x514C434D;
- const int32u QLCM_fmt_=0x666D7420;
- const int32u rcrd=0x72637264;
- const int32u rcrd_desc=0x64657363;
- const int32u rcrd_fld_=0x666C6420;
- const int32u rcrd_fld__anc_=0x616E6320;
- const int32u rcrd_fld__anc__pos_=0x706F7320;
- const int32u rcrd_fld__anc__pyld=0x70796C64;
- const int32u rcrd_fld__finf=0x66696E66;
- const int32u RDIB=0x52444942;
- const int32u RMID=0x524D4944;
- const int32u RMMP=0x524D4D50;
- const int32u RMP3=0x524D5033;
- const int32u RMP3_data=0x64617461;
- const int32u RMP3_INFO=0x494E464F;
- const int32u RMP3_INFO_IID3=0x49494433;
- const int32u RMP3_INFO_ILYC=0x494C5943;
- const int32u RMP3_INFO_IMP3=0x494D5033;
- const int32u RMP3_INFO_JUNK=0x4A554E4B;
- const int32u SMV0=0x534D5630;
- const int32u SMV0_xxxx=0x534D563A;
- const int32u WAVE=0x57415645;
- const int32u WAVE__pmx=0x20786D70;
- const int32u WAVE_aXML=0x61584D4C;
- const int32u WAVE_bext=0x62657874;
- const int32u WAVE_cue_=0x63756520;
- const int32u WAVE_data=0x64617461;
- const int32u WAVE_ds64=0x64733634;
- const int32u WAVE_fact=0x66616374;
- const int32u WAVE_fmt_=0x666D7420;
- const int32u WAVE_ID3_=0x49443320;
- const int32u WAVE_id3_=0x69643320;
- const int32u WAVE_INFO=0x494E464F;
- const int32u WAVE_iXML=0x69584D4C;
- const int32u wave=0x77617665;
- const int32u wave_data=0x64617461;
- const int32u wave_fmt_=0x666D7420;
- const int32u W3DI=0x57334449;
-
- #define UUID(NAME, PART1, PART2, PART3, PART4, PART5) \
- const int64u NAME =0x##PART3##PART2##PART1##ULL; \
- const int64u NAME##2=0x##PART4##PART5##ULL; \
-
- UUID(QLCM_QCELP1, 5E7F6D41, B115, 11D0, BA91, 00805FB4B97E)
- UUID(QLCM_QCELP2, 5E7F6D42, B115, 11D0, BA91, 00805FB4B97E)
- UUID(QLCM_EVRC, E689D48D, 9076, 46B5, 91EF, 736A5100CEB4)
- UUID(QLCM_SMV, 8D7C2B75, A797, ED49, 985E, D53C8CC75F84)
-}
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Riff::Data_Parse()
-{
- //Alignement specific
- Element_Size-=Alignement_ExtraByte;
-
- DATA_BEGIN
- LIST(AIFC)
- ATOM_BEGIN
- ATOM(AIFC_COMM)
- ATOM(AIFC_COMT)
- ATOM(AIFC_FVER)
- ATOM(AIFC_SSND)
- ATOM_DEFAULT(AIFC_xxxx)
- ATOM_END_DEFAULT
- LIST(AIFF)
- ATOM_BEGIN
- ATOM(AIFF_COMM)
- ATOM(AIFF_COMT)
- ATOM(AIFF_ID3_)
- LIST_SKIP(AIFF_SSND)
- ATOM_DEFAULT(AIFF_xxxx)
- ATOM_END_DEFAULT
- LIST(AVI_)
- ATOM_BEGIN
- ATOM(AVI__Cr8r);
- ATOM(AVI__cset)
- LIST(AVI__exif)
- ATOM_DEFAULT_ALONE(AVI__exif_xxxx)
- LIST(AVI__goog)
- ATOM_BEGIN
- ATOM(AVI__goog_GDAT)
- ATOM_END
- ATOM(AVI__GMET)
- LIST(AVI__hdlr)
- ATOM_BEGIN
- ATOM(AVI__hdlr_avih)
- ATOM(AVI__hdlr_JUNK)
- LIST(AVI__hdlr_strl)
- ATOM_BEGIN
- ATOM(AVI__hdlr_strl_indx)
- ATOM(AVI__hdlr_strl_JUNK)
- ATOM(AVI__hdlr_strl_strd)
- ATOM(AVI__hdlr_strl_strf)
- ATOM(AVI__hdlr_strl_strh)
- ATOM(AVI__hdlr_strl_strn)
- ATOM(AVI__hdlr_strl_vprp)
- ATOM_END
- LIST(AVI__hdlr_odml)
- ATOM_BEGIN
- ATOM(AVI__hdlr_odml_dmlh)
- ATOM_END
- ATOM(AVI__hdlr_ON2h)
- LIST(AVI__INFO)
- ATOM_BEGIN
- ATOM(AVI__INFO_IID3)
- ATOM(AVI__INFO_ILYC)
- ATOM(AVI__INFO_IMP3)
- ATOM(AVI__INFO_JUNK)
- ATOM_DEFAULT(AVI__INFO_xxxx)
- ATOM_END_DEFAULT
- ATOM_DEFAULT(AVI__hdlr_xxxx)
- ATOM_END_DEFAULT
- ATOM(AVI__idx1)
- LIST(AVI__INFO)
- ATOM_BEGIN
- ATOM(AVI__INFO_IID3)
- ATOM(AVI__INFO_ILYC)
- ATOM(AVI__INFO_IMP3)
- ATOM(AVI__INFO_JUNK)
- ATOM_DEFAULT(AVI__INFO_xxxx)
- ATOM_END_DEFAULT
- ATOM(AVI__JUNK)
- ATOM(AVI__MD5_)
- LIST(AVI__movi)
- ATOM_BEGIN
- LIST(AVI__movi_rec_)
- ATOM_DEFAULT_ALONE(AVI__movi_xxxx)
- ATOM_DEFAULT(AVI__movi_xxxx)
- ATOM_END_DEFAULT
- ATOM(AVI__PrmA);
- LIST(AVI__Tdat)
- ATOM_BEGIN
- ATOM(AVI__Tdat_rn_A)
- ATOM(AVI__Tdat_rn_O)
- ATOM(AVI__Tdat_tc_A)
- ATOM(AVI__Tdat_tc_O)
- ATOM_END
- ATOM_DEFAULT(AVI__xxxx)
- ATOM_END_DEFAULT
- LIST(AVIX) //OpenDML
- ATOM_BEGIN
- ATOM(AVIX_idx1)
- LIST(AVIX_movi)
- ATOM_BEGIN
- LIST(AVIX_movi_rec_)
- ATOM_DEFAULT_ALONE(AVIX_movi_xxxx)
- ATOM_DEFAULT(AVIX_movi_xxxx)
- ATOM_END_DEFAULT
- ATOM_END
- ATOM_PARTIAL(CADP)
- LIST(CDDA)
- ATOM_BEGIN
- ATOM(CDDA_fmt_)
- ATOM_END
- ATOM_PARTIAL(CMJP)
- ATOM(CMP4)
- ATOM(IDVX)
- LIST(INDX)
- ATOM_DEFAULT_ALONE(INDX_xxxx)
- LIST_SKIP(JUNK)
- LIST_SKIP(menu)
- ATOM(MThd)
- LIST_SKIP(MTrk)
- LIST_SKIP(PAL_)
- LIST(QLCM)
- ATOM_BEGIN
- ATOM(QLCM_fmt_)
- ATOM_END
- #if defined(MEDIAINFO_GXF_YES)
- LIST(rcrd)
- ATOM_BEGIN
- ATOM(rcrd_desc)
- LIST(rcrd_fld_)
- ATOM_BEGIN
- LIST(rcrd_fld__anc_)
- ATOM_BEGIN
- ATOM(rcrd_fld__anc__pos_)
- ATOM(rcrd_fld__anc__pyld)
- ATOM_END
- ATOM(rcrd_fld__finf)
- ATOM_END
- ATOM_END
- #endif //defined(MEDIAINFO_GXF_YES)
- LIST_SKIP(RDIB)
- LIST_SKIP(RMID)
- LIST_SKIP(RMMP)
- LIST(RMP3)
- ATOM_BEGIN
- LIST(RMP3_data)
- break;
- LIST(RMP3_INFO)
- ATOM_BEGIN
- ATOM(RMP3_INFO_IID3)
- ATOM(RMP3_INFO_ILYC)
- ATOM(RMP3_INFO_IMP3)
- ATOM(RMP3_INFO_JUNK)
- ATOM_DEFAULT(RMP3_INFO_xxxx)
- ATOM_END_DEFAULT
- ATOM_END
- ATOM(SMV0)
- ATOM(SMV0_xxxx)
- ATOM(W3DI)
- LIST(WAVE)
- ATOM_BEGIN
- ATOM(WAVE__pmx)
- ATOM(WAVE_aXML)
- ATOM(WAVE_bext)
- LIST(WAVE_data)
- break;
- ATOM(WAVE_cue_)
- ATOM(WAVE_ds64)
- ATOM(WAVE_fact)
- ATOM(WAVE_fmt_)
- ATOM(WAVE_ID3_)
- ATOM(WAVE_id3_)
- LIST(WAVE_INFO)
- ATOM_DEFAULT_ALONE(WAVE_INFO_xxxx)
- ATOM(WAVE_iXML)
- ATOM_END
- LIST(wave)
- ATOM_BEGIN
- LIST(wave_data)
- break;
- ATOM(wave_fmt_)
- ATOM_END
- DATA_END
-
- if (Alignement_ExtraByte)
- {
- Element_Size+=Alignement_ExtraByte;
- if (Element_Offset+Alignement_ExtraByte==Element_Size)
- Skip_XX(Alignement_ExtraByte, "Alignement");
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Riff::AIFC()
-{
- Data_Accept("AIFF Compressed");
- Element_Name("AIFF Compressed");
-
- //Filling
- Fill(Stream_General, 0, General_Format, "AIFF");
- Stream_Prepare(Stream_Audio);
- Kind=Kind_Aiff;
- #if MEDIAINFO_EVENTS
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AIFC_COMM()
-{
- AIFF_COMM();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AIFC_COMT()
-{
- AIFF_COMT();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AIFC_FVER()
-{
- Element_Name("Format Version");
-
- //Parsing
- Skip_B4( "Version");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AIFC_SSND()
-{
- AIFF_SSND();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AIFC_xxxx()
-{
- AIFF_xxxx();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AIFF()
-{
- Data_Accept("AIFF");
- Element_Name("AIFF");
-
- //Filling
- Fill(Stream_General, 0, General_Format, "AIFF");
- Stream_Prepare(Stream_Audio);
- Kind=Kind_Aiff;
- #if MEDIAINFO_EVENTS
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AIFF_COMM()
-{
- Element_Name("Common");
-
- int32u numSampleFrames;
- int16u numChannels, sampleSize;
- float80 sampleRate;
- //Parsing
- Get_B2 (numChannels, "numChannels");
- Get_B4 (numSampleFrames, "numSampleFrames");
- Get_B2 (sampleSize, "sampleSize");
- Get_BF10(sampleRate, "sampleRate");
- if (Data_Remain()) //AIFC
- {
- int32u compressionType;
- Get_C4 (compressionType, "compressionType");
- Skip_PA( "compressionName");
-
- //Filling
- CodecID_Fill(Ztring().From_CC4(compressionType), Stream_Audio, StreamPos_Last, InfoCodecID_Format_Mpeg4);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Ztring().From_CC4(compressionType));
- }
- else
- {
- //Filling
- Fill(Stream_Audio, StreamPos_Last, Audio_Format, "PCM");
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, "PCM");
- }
-
- //Filling
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, numChannels);
- Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, sampleSize);
- if (sampleRate)
- Fill(Stream_Audio, StreamPos_Last, Audio_Duration, numSampleFrames/sampleRate*1000);
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, sampleRate, 0);
-
- //Compute the current codec ID
- Element_Code=(int64u)-1;
- Stream_ID=(int32u)-1;
- stream_Count=1;
-
- //Specific cases
- #if defined(MEDIAINFO_SMPTEST0337_YES)
- if (Retrieve(Stream_Audio, 0, Audio_CodecID).empty() && numChannels==2 && sampleSize<=32 && sampleRate==48000) //Some SMPTE ST 337 streams are hidden in PCM stream
- {
- File_SmpteSt0337* Parser=new File_SmpteSt0337;
- Parser->Endianness='B';
- Parser->Container_Bits=(int8u)sampleSize;
- Parser->ShouldContinueParsing=true;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- Demux_Level=4; //Intermediate
- }
- #endif //MEDIAINFO_DEMUX
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
-
- #if defined(MEDIAINFO_PCM_YES)
- File_Pcm* Parser=new File_Pcm;
- Parser->Codec=Retrieve(Stream_Audio, StreamPos_Last, Audio_CodecID);
- if (Parser->Codec.empty() || Parser->Codec==__T("NONE"))
- Parser->Endianness='B';
- Parser->BitDepth=(int8u)sampleSize;
- #if MEDIAINFO_DEMUX
- if (Demux_Rate)
- Parser->Frame_Count_Valid = float64_int64s(Demux_Rate);
- if (Config->Demux_Unpacketize_Get())
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- Demux_Level=4; //Intermediate
- }
- #else //MEDIAINFO_DEMUX
- Parser->Frame_Count_Valid=(int64u)-1; //Disabling it, waiting for SMPTE ST 337 parser reject
- #endif //MEDIAINFO_DEMUX
- Stream[Stream_ID].Parsers.push_back(Parser);
- Stream[Stream_ID].IsPcm=true;
- Stream[Stream_ID].StreamKind=Stream_Audio;
- #endif
- #if MEDIAINFO_DEMUX
- BlockAlign=numChannels*sampleSize/8;
- AvgBytesPerSec=(int32u)float64_int64s(BlockAlign*(float64)sampleRate);
- #endif //MEDIAINFO_DEMUX
-
- Element_Code=(int64u)-1;
- for (size_t Pos=0; Pos<Stream[Stream_ID].Parsers.size(); Pos++)
- Open_Buffer_Init(Stream[Stream_ID].Parsers[Pos]);
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AIFF_COMT()
-{
- //Parsing
- int16u numComments;
- Get_B2(numComments, "numComments");
- for (int16u Pos=0; Pos<=numComments; Pos++)
- {
- Ztring text;
- int16u count;
- Element_Begin1("Comment");
- Skip_B4( "timeStamp");
- Skip_B4( "marker");
- Get_B2 (count, "count");
- count+=count%1; //always even
- Get_Local(count, text, "text");
- Element_End0();
-
- //Filling
- Fill(Stream_General, 0, General_Comment, text);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AIFF_SSND()
-{
- WAVE_data();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AIFF_SSND_Continue()
-{
- WAVE_data_Continue();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AIFF_xxxx()
-{
- #define ELEMENT_CASE(_ELEMENT, _NAME) \
- case Elements::_ELEMENT : Element_Name(_NAME); Name=_NAME; break;
-
- //Known?
- std::string Name;
- switch(Element_Code)
- {
- ELEMENT_CASE(AIFF__c__, "Copyright");
- ELEMENT_CASE(AIFF_ANNO, "Comment");
- ELEMENT_CASE(AIFF_AUTH, "Performer");
- ELEMENT_CASE(AIFF_NAME, "Title");
- default : Skip_XX(Element_Size, "Unknown");
- return;
- }
-
- //Parsing
- Ztring text;
- Get_Local(Element_Size, text, "text");
-
- //Filling
- Fill(Stream_General, 0, Name.c_str(), text);
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI_()
-{
- Element_Name("AVI");
-
- //Test if there is only one AVI chunk
- if (Status[IsAccepted])
- {
- Element_Info1("Problem: 2 AVI chunks, this is not normal");
- Skip_XX(Element_TotalSize_Get(), "Data");
- return;
- }
-
- Data_Accept("AVI");
-
- //Filling
- Fill(Stream_General, 0, General_Format, "AVI");
- Kind=Kind_Avi;
-
- //Configuration
- Buffer_MaximumSize=64*1024*1024; //Some big frames are possible (e.g YUV 4:2:2 10 bits 1080p)
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__Cr8r()
-{
- Element_Name("Adobe Premiere Cr8r");
-
- //Parsing
- Skip_C4( "FourCC");
- Skip_B4( "Size");
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__cset()
-{
- Element_Name("Regional settings");
-
- //Parsing
- Skip_L2( "CodePage"); //TODO: take a look about IBM/MS RIFF/MCI Specification 1.0
- Skip_L2( "CountryCode");
- Skip_L2( "LanguageCode");
- Skip_L2( "Dialect");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__exif()
-{
- Element_Name("Exif (Exchangeable Image File Format)");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__exif_xxxx()
-{
- Element_Name("Value");
-
- //Parsing
- Ztring Value;
- Get_Local(Element_Size, Value, "Value");
-
- //Filling
- switch (Element_Code)
- {
- case Elements::AVI__exif_ecor : Fill(Stream_General, 0, "Make", Value); break;
- case Elements::AVI__exif_emdl : Fill(Stream_General, 0, "Model", Value); break;
- case Elements::AVI__exif_emnt : Fill(Stream_General, 0, "MakerNotes", Value); break;
- case Elements::AVI__exif_erel : Fill(Stream_General, 0, "RelatedImageFile", Value); break;
- case Elements::AVI__exif_etim : Fill(Stream_General, 0, "Written_Date", Value); break;
- case Elements::AVI__exif_eucm : Fill(Stream_General, 0, General_Comment, Value); break;
- case Elements::AVI__exif_ever : break; //Exif version
- default: Fill(Stream_General, 0, Ztring().From_CC4((int32u)Element_Code).To_Local().c_str(), Value);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__goog()
-{
- Element_Name("Google specific");
-
- //Filling
- Fill(Stream_General, 0, General_Format, "Google Video", Unlimited, false, true);
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__goog_GDAT()
-{
- Element_Name("Google datas");
-}
-
-//---------------------------------------------------------------------------
-// Google Metadata
-//
-void File_Riff::AVI__GMET()
-{
- Element_Name("Google Metadatas");
-
- //Parsing
- Ztring Value; Value.From_Local((const char*)(Buffer+Buffer_Offset+0), (size_t)Element_Size);
- ZtringListList List;
- List.Separator_Set(0, __T("\n"));
- List.Separator_Set(1, __T(":"));
- List.Max_Set(1, 2);
- List.Write(Value);
-
- //Details
- #if MEDIAINFO_TRACE
- if (Config_Trace_Level)
- {
- //for (size_t Pos=0; Pos<List.size(); Pos++)
- // Details_Add_Info(Pos, List(Pos, 0).To_Local().c_str(), List(Pos, 1));
- }
- #endif //MEDIAINFO_TRACE
-
- //Filling
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- if (List(Pos, 0)==__T("title")) Fill(Stream_General, 0, General_Title, List(Pos, 1));
- if (List(Pos, 0)==__T("description")) Fill(Stream_General, 0, General_Title_More, List(Pos, 1));
- if (List(Pos, 0)==__T("url")) Fill(Stream_General, 0, General_Title_Url, List(Pos, 1));
- if (List(Pos, 0)==__T("docid")) Fill(Stream_General, 0, General_UniqueID, List(Pos, 1));
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr()
-{
- Element_Name("AVI Header");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_avih()
-{
- Element_Name("File header");
-
- //Parsing
- int32u MicrosecPerFrame, Flags;
- Get_L4 (MicrosecPerFrame, "MicrosecPerFrame");
- Skip_L4( "MaxBytesPerSec");
- Skip_L4( "PaddingGranularity");
- Get_L4 (Flags, "Flags");
- Skip_Flags(Flags, 4, "HasIndex");
- Skip_Flags(Flags, 5, "MustUseIndex");
- Skip_Flags(Flags, 8, "IsInterleaved");
- Skip_Flags(Flags, 9, "UseCKTypeToFindKeyFrames");
- Skip_Flags(Flags, 11, "TrustCKType");
- Skip_Flags(Flags, 16, "WasCaptureFile");
- Skip_Flags(Flags, 17, "Copyrighted");
- Get_L4 (avih_TotalFrame, "TotalFrames");
- Skip_L4( "InitialFrames");
- Skip_L4( "StreamsCount");
- Skip_L4( "SuggestedBufferSize");
- Skip_L4( "Width");
- Skip_L4( "Height");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- if(Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-
- //Filling
- if (MicrosecPerFrame>0)
- avih_FrameRate=1000000.0/MicrosecPerFrame;
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_JUNK()
-{
- Element_Name("Garbage");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_odml()
-{
- Element_Name("OpenDML");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_odml_dmlh()
-{
- Element_Name("OpenDML Header");
-
- //Parsing
- Get_L4(dmlh_TotalFrame, "GrandFrames");
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_ON2h()
-{
- Element_Name("On2 header");
-
- //Parsing
- Skip_XX(Element_Size, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl()
-{
- Element_Name("Stream info");
- Element_Info1(stream_Count);
-
- //Clean up
- StreamKind_Last=Stream_Max;
- StreamPos_Last=(size_t)-1;
-
- //Compute the current codec ID
- Stream_ID=(('0'+stream_Count/10)*0x01000000
- +('0'+stream_Count )*0x00010000);
- stream_Count++;
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_indx()
-{
- Element_Name("Index");
-
- int32u Entry_Count, ChunkId;
- int16u LongsPerEntry;
- int8u IndexType, IndexSubType;
- Get_L2 (LongsPerEntry, "LongsPerEntry"); //Size of each entry in aIndex array
- Get_L1 (IndexSubType, "IndexSubType");
- Get_L1 (IndexType, "IndexType");
- Get_L4 (Entry_Count, "EntriesInUse"); //Index of first unused member in aIndex array
- Get_C4 (ChunkId, "ChunkId"); //FCC of what is indexed
-
- //Depends of size of structure...
- switch (IndexType)
- {
- case 0x01 : //AVI_INDEX_OF_CHUNKS
- switch (IndexSubType)
- {
- case 0x00 : AVI__hdlr_strl_indx_StandardIndex(Entry_Count, ChunkId); break;
- case 0x01 : AVI__hdlr_strl_indx_FieldIndex(Entry_Count, ChunkId); break; //AVI_INDEX_2FIELD
- default: Skip_XX(Element_Size-Element_Offset, "Unknown");
- }
- break;
- case 0x0 : //AVI_INDEX_OF_INDEXES
- switch (IndexSubType)
- {
- case 0x00 :
- case 0x01 : AVI__hdlr_strl_indx_SuperIndex(Entry_Count, ChunkId); break; //AVI_INDEX_2FIELD
- default: Skip_XX(Element_Size-Element_Offset, "Unknown");
- }
- break;
- default: Skip_XX(Element_Size-Element_Offset, "Unknown");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_indx_StandardIndex(int32u Entry_Count, int32u ChunkId)
-{
- Element_Name("Standard Index");
-
- //Parsing
- int64u BaseOffset, StreamSize=0;
- Get_L8 (BaseOffset, "BaseOffset");
- Skip_L4( "Reserved3");
- for (int32u Pos=0; Pos<Entry_Count; Pos++)
- {
- //Is too slow
- /*
- Element_Begin1("Index");
- int32u Offset, Size;
- Get_L4 (Offset, "Offset"); //BaseOffset + this is absolute file offset
- Get_L4 (Size, "Size"); //Bit 31 is set if this is NOT a keyframe
- Element_Info1(Size&0x7FFFFFFF);
- if (Size)
- Element_Info1("KeyFrame");
- Element_End0();
- */
-
- //Faster method
- if (Element_Offset+8>Element_Size)
- break; //Malformed index
- int32u Offset=LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset );
- int32u Size =LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset+4)&0x7FFFFFFF;
- Element_Offset+=8;
-
- //Stream Position and size
- if (Pos<300 || MediaInfoLib::Config.ParseSpeed_Get()==1.00)
- {
- Stream_Structure[BaseOffset+Offset-8].Name=ChunkId&0xFFFF0000;
- Stream_Structure[BaseOffset+Offset-8].Size=Size;
- }
- StreamSize+=(Size&0x7FFFFFFF);
- Stream[ChunkId&0xFFFF0000].PacketCount++;
-
- //Interleaved
- if (Pos== 0 && (ChunkId&0xFFFF0000)==0x30300000 && Interleaved0_1 ==0)
- Interleaved0_1 =BaseOffset+Offset-8;
- if (Pos==Entry_Count/10 && (ChunkId&0xFFFF0000)==0x30300000 && Interleaved0_10==0)
- Interleaved0_10=BaseOffset+Offset-8;
- if (Pos== 0 && (ChunkId&0xFFFF0000)==0x30310000 && Interleaved1_1 ==0)
- Interleaved1_1 =BaseOffset+Offset-8;
- if (Pos==Entry_Count/10 && (ChunkId&0xFFFF0000)==0x30310000 && Interleaved1_10==0)
- Interleaved1_10=BaseOffset+Offset-8;
- }
- Stream[ChunkId&0xFFFF0000].StreamSize+=StreamSize;
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Garbage");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_indx_FieldIndex(int32u Entry_Count, int32u)
-{
- Element_Name("Field Index");
-
- //Parsing
- Skip_L8( "Offset");
- Skip_L4( "Reserved2");
- for (int32u Pos=0; Pos<Entry_Count; Pos++)
- {
- Element_Begin1("Index");
- Skip_L4( "Offset"); //BaseOffset + this is absolute file offset
- Skip_L4( "Size"); //Bit 31 is set if this is NOT a keyframe
- Skip_L4( "OffsetField2"); //Offset to second field
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_indx_SuperIndex(int32u Entry_Count, int32u ChunkId)
-{
- Element_Name("Index of Indexes");
-
- //Parsing
- int64u Offset;
- Skip_L4( "Reserved0");
- Skip_L4( "Reserved1");
- Skip_L4( "Reserved2");
- for (int32u Pos=0; Pos<Entry_Count; Pos++)
- {
- int32u Duration;
- Element_Begin1("Index of Indexes");
- Get_L8 (Offset, "Offset");
- Skip_L4( "Size"); //Size of index chunk at this offset
- Get_L4 (Duration, "Duration"); //time span in stream ticks
- Index_Pos[Offset]=ChunkId;
- Stream[Stream_ID].indx_Duration+=Duration;
- Element_End0();
- }
-
- //We needn't anymore Old version
- NeedOldIndex=false;
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_JUNK()
-{
- Element_Name("Garbage");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strd()
-{
- Element_Name("Stream datas");
-
- //Parsing
- Skip_XX(Element_Size, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf()
-{
- Element_Name("Stream format");
-
- //Parse depending of kind of stream
- switch (Stream[Stream_ID].fccType)
- {
- case Elements::AVI__hdlr_strl_strh_auds : AVI__hdlr_strl_strf_auds(); break;
- case Elements::AVI__hdlr_strl_strh_iavs : AVI__hdlr_strl_strf_iavs(); break;
- case Elements::AVI__hdlr_strl_strh_mids : AVI__hdlr_strl_strf_mids(); break;
- case Elements::AVI__hdlr_strl_strh_txts : AVI__hdlr_strl_strf_txts(); break;
- case Elements::AVI__hdlr_strl_strh_vids : AVI__hdlr_strl_strf_vids(); break;
- default : Element_Info1("Unknown");
- }
-
- //Registering stream
- Stream[Stream_ID].StreamKind=StreamKind_Last;
- Stream[Stream_ID].StreamPos=StreamPos_Last;
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf_auds()
-{
- Element_Info1("Audio");
-
- //Parsing
- #if !MEDIAINFO_DEMUX
- int32u AvgBytesPerSec;
- #endif //!MEDIAINFO_DEMUX
- int16u FormatTag, Channels;
- BitsPerSample=0;
- Get_L2 (FormatTag, "FormatTag");
- Get_L2 (Channels, "Channels");
- Get_L4 (SamplesPerSec, "SamplesPerSec");
- Get_L4 (AvgBytesPerSec, "AvgBytesPerSec");
- #if MEDIAINFO_DEMUX
- Get_L2 (BlockAlign, "BlockAlign");
- #else //MEDIAINFO_DEMUX
- Skip_L2( "BlockAlign");
- #endif //MEDIAINFO_DEMUX
- if (Element_Offset+2<=Element_Size)
- Get_L2 (BitsPerSample, "BitsPerSample");
-
- if (FormatTag==1) //Only for PCM
- {
- //Coherancy
- if (BitsPerSample && SamplesPerSec*BitsPerSample*Channels/8==AvgBytesPerSec*8)
- AvgBytesPerSec*=8; //Found in one file. TODO: Provide information to end user about such error
-
- //Computing of missing value
- if (!BitsPerSample && AvgBytesPerSec && SamplesPerSec && Channels)
- BitsPerSample=(int16u)(AvgBytesPerSec*8/SamplesPerSec/Channels);
- }
-
- //Filling
- Stream_Prepare(Stream_Audio);
- Stream[Stream_ID].Compression=FormatTag;
- Ztring Codec; Codec.From_Number(FormatTag, 16);
- Codec.MakeUpperCase();
- CodecID_Fill(Codec, Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Codec); //May be replaced by codec parser
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec_CC, Codec);
- if (Channels)
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, (Channels!=5 || FormatTag==0xFFFE)?Channels:6);
- if (SamplesPerSec)
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, SamplesPerSec);
- if (AvgBytesPerSec)
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate, AvgBytesPerSec*8);
- if (BitsPerSample)
- Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, BitsPerSample);
- Stream[Stream_ID].AvgBytesPerSec=AvgBytesPerSec; //Saving bitrate for each stream
- if (SamplesPerSec && TimeReference!=(int64u)-1)
- {
- Fill(Stream_Audio, 0, Audio_Delay, float64_int64s(((float64)TimeReference)*1000/SamplesPerSec));
- Fill(Stream_Audio, 0, Audio_Delay_Source, "Container (bext)");
- }
-
- //Specific cases
- #if defined(MEDIAINFO_DTS_YES) || defined(MEDIAINFO_SMPTEST0337_YES)
- if (FormatTag==0x1 && Retrieve(Stream_General, 0, General_Format)==__T("Wave")) //Some DTS or SMPTE ST 337 streams are coded "1"
- {
- #if defined(MEDIAINFO_DTS_YES)
- {
- File_Dts* Parser=new File_Dts;
- Parser->Frame_Count_Valid=2;
- Parser->ShouldContinueParsing=true;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get() && Retrieve(Stream_General, 0, General_Format)==__T("Wave"))
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- Demux_Level=4; //Intermediate
- }
- #endif //MEDIAINFO_DEMUX
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
-
- #if defined(MEDIAINFO_SMPTEST0337_YES)
- {
- File_SmpteSt0337* Parser=new File_SmpteSt0337;
- Parser->Container_Bits=(int8u)BitsPerSample;
- Parser->Aligned=true;
- Parser->ShouldContinueParsing=true;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get() && Retrieve(Stream_General, 0, General_Format)==__T("Wave"))
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- Demux_Level=4; //Intermediate
- }
- #endif //MEDIAINFO_DEMUX
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- }
- #endif
-
- //Creating the parser
- if (0);
- #if defined(MEDIAINFO_MPEGA_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Riff, Codec)==__T("MPEG Audio"))
- {
- File_Mpega* Parser=new File_Mpega;
- Parser->CalculateDelay=true;
- Parser->ShouldContinueParsing=true;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_AC3_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Riff, Codec)==__T("AC-3"))
- {
- File_Ac3* Parser=new File_Ac3;
- Parser->Frame_Count_Valid=2;
- Parser->CalculateDelay=true;
- Parser->ShouldContinueParsing=true;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_DTS_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Riff, Codec)==__T("DTS"))
- {
- File_Dts* Parser=new File_Dts;
- Parser->Frame_Count_Valid=2;
- Parser->ShouldContinueParsing=true;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_AAC_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Riff, Codec)==__T("AAC"))
- {
- File_Aac* Parser=new File_Aac;
- Parser->Mode=File_Aac::Mode_ADTS;
- Parser->Frame_Count_Valid=1;
- Parser->ShouldContinueParsing=true;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_PCM_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Riff, Codec)==__T("PCM"))
- {
- File_Pcm* Parser=new File_Pcm;
- Parser->Codec=Codec;
- Parser->Endianness='L';
- Parser->BitDepth=(int8u)BitsPerSample;
- #if MEDIAINFO_DEMUX
- if (Demux_Rate)
- Parser->Frame_Count_Valid = float64_int64s(Demux_Rate);
- if (Config->Demux_Unpacketize_Get() && Retrieve(Stream_General, 0, General_Format)==__T("Wave"))
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- Demux_Level=4; //Intermediate
- }
- #else //MEDIAINFO_DEMUX
- Parser->Frame_Count_Valid=(int64u)-1; //Disabling it, waiting for SMPTE ST 337 parser reject
- #endif //MEDIAINFO_DEMUX
- Stream[Stream_ID].Parsers.push_back(Parser);
- Stream[Stream_ID].IsPcm=true;
- }
- #endif
- #if defined(MEDIAINFO_ADPCM_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Riff, Codec)==__T("ADPCM"))
- {
- //Creating the parser
- File_Adpcm MI;
- MI.Codec=Codec;
-
- //Parsing
- Open_Buffer_Init(&MI);
- Open_Buffer_Continue(&MI, 0);
-
- //Filling
- Finish(&MI);
- Merge(MI, StreamKind_Last, 0, StreamPos_Last);
- }
- #endif
- #if defined(MEDIAINFO_OGG_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Riff, Codec)==__T("Vorbis")
- && FormatTag!=0x566F) //0x566F has config in this chunk
- {
- File_Ogg* Parser=new File_Ogg;
- Parser->ShouldContinueParsing=true;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- for (size_t Pos=0; Pos<Stream[Stream_ID].Parsers.size(); Pos++)
- Open_Buffer_Init(Stream[Stream_ID].Parsers[Pos]);
-
- //Options
- if (Element_Offset+2>Element_Size)
- return; //No options
-
- //Parsing
- int16u Option_Size;
- Get_L2 (Option_Size, "cbSize");
-
- //Filling
- if (Option_Size>0)
- {
- if (0);
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Riff, Codec)==__T("MPEG Audio"))
- {
- if (Option_Size==12)
- AVI__hdlr_strl_strf_auds_Mpega();
- else
- Skip_XX(Option_Size, "MPEG Audio - Uknown");
- }
- else if (Codec==__T("AAC") || Codec==__T("FF") || Codec==__T("8180"))
- AVI__hdlr_strl_strf_auds_Aac();
- else if (FormatTag==0x566F) //Vorbis with Config in this chunk
- AVI__hdlr_strl_strf_auds_Vorbis();
- else if (FormatTag==0x6750) //Vorbis with Config in this chunk
- AVI__hdlr_strl_strf_auds_Vorbis2();
- else if (FormatTag==0xFFFE) //Extensible Wave
- AVI__hdlr_strl_strf_auds_ExtensibleWave();
- else if (Element_Offset+Option_Size<=Element_Size)
- Skip_XX(Option_Size, "Unknown");
- else if (Element_Offset!=Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Error");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf_auds_Mpega()
-{
- //Parsing
- Element_Begin1("MPEG Audio options");
- Skip_L2( "ID");
- Skip_L4( "Flags");
- Skip_L2( "BlockSize");
- Skip_L2( "FramesPerBlock");
- Skip_L2( "CodecDelay");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf_auds_Aac()
-{
- //Parsing
- Element_Begin1("AAC options");
- #if defined(MEDIAINFO_AAC_YES)
- File_Aac* MI=new File_Aac();
- MI->Mode=File_Aac::Mode_AudioSpecificConfig;
- Open_Buffer_Init(MI);
- Open_Buffer_Continue(MI);
- Finish(MI);
- Merge(*MI, StreamKind_Last, 0, StreamPos_Last);
- delete MI; //MI=NULL;
- #else //MEDIAINFO_MPEG4_YES
- Skip_XX(Element_Size-Element_Offset, "(AudioSpecificConfig)");
- #endif
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf_auds_Vorbis()
-{
- //Parsing
- Element_Begin1("Vorbis options");
- #if defined(MEDIAINFO_OGG_YES)
- File_Ogg_SubElement MI;
- Open_Buffer_Init(&MI);
- Element_Begin1("Element sizes");
- //All elements parsing, except last one
- std::vector<size_t> Elements_Size;
- size_t Elements_TotalSize=0;
- int8u Elements_Count;
- Get_L1(Elements_Count, "Element count");
- Elements_Size.resize(Elements_Count+1); //+1 for the last block
- for (int8u Pos=0; Pos<Elements_Count; Pos++)
- {
- int8u Size;
- Get_L1(Size, "Size");
- Elements_Size[Pos]=Size;
- Elements_TotalSize+=Size;
- }
- Element_End0();
- if (Element_Offset+Elements_TotalSize>Element_Size)
- return;
- //Adding the last block
- Elements_Size[Elements_Count]=(size_t)(Element_Size-(Element_Offset+Elements_TotalSize));
- Elements_Count++;
- //Parsing blocks
- for (int8u Pos=0; Pos<Elements_Count; Pos++)
- {
- Open_Buffer_Continue(&MI, Elements_Size[Pos]);
- Open_Buffer_Continue(&MI, 0);
- Element_Offset+=Elements_Size[Pos];
- }
- //Finalizing
- Finish(&MI);
- Merge(MI, StreamKind_Last, 0, StreamPos_Last);
- Clear(Stream_Audio, StreamPos_Last, Audio_BitDepth); //Resolution is not valid for Vorbis
- Element_Show();
- #else //MEDIAINFO_MPEG4_YES
- Skip_XX(Element_Size-Element_Offset, "(Vorbis headers)");
- #endif
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf_auds_Vorbis2()
-{
- //Parsing
- Skip_XX(8, "Vorbis Unknown");
- Element_Begin1("Vorbis options");
- #if defined(MEDIAINFO_OGG_YES)
- Open_Buffer_Continue(Stream[Stream_ID].Parsers[0]);
- Open_Buffer_Continue(Stream[Stream_ID].Parsers[0], 0);
- Finish(Stream[Stream_ID].Parsers[0]);
- Merge(*Stream[Stream_ID].Parsers[0], StreamKind_Last, 0, StreamPos_Last);
- Element_Show();
- #else //MEDIAINFO_MPEG4_YES
- Skip_XX(Element_Size-Element_Offset, "(Vorbis headers)");
- #endif
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf_auds_ExtensibleWave()
-{
- //Parsing
- int128u SubFormat;
- int32u ChannelMask;
- Skip_L2( "ValidBitsPerSample / SamplesPerBlock");
- Get_L4 (ChannelMask, "ChannelMask");
- Get_GUID(SubFormat, "SubFormat");
-
- FILLING_BEGIN();
- if ((SubFormat.hi&0xFFFFFFFFFFFF0000LL)==0x0010000000000000LL && SubFormat.lo==0x800000AA00389B71LL)
- {
- CodecID_Fill(Ztring().From_Number((int16u)SubFormat.hi, 16), Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff);
- Fill(Stream_Audio, StreamPos_Last, Audio_CodecID, Ztring().From_GUID(SubFormat), true);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, MediaInfoLib::Config.Codec_Get(Ztring().From_Number((int16u)SubFormat.hi, 16)), true);
-
- //Creating the parser
- if (0);
- #if defined(MEDIAINFO_PCM_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Riff, Ztring().From_Number((int16u)SubFormat.hi, 16))==__T("PCM"))
- {
- //Creating the parser
- File_Pcm* Parser=new File_Pcm;
- Parser->Codec=Ztring().From_GUID(SubFormat);
- Parser->Endianness='L';
- Parser->Sign='S';
- Parser->BitDepth=(int8u)BitsPerSample;
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get() && Retrieve(Stream_General, 0, General_Format)==__T("Wave"))
- {
- Parser->Demux_Level=2; //Container
- Parser->Demux_UnpacketizeContainer=true;
- Demux_Level=4; //Intermediate
- }
- #endif //MEDIAINFO_DEMUX
- Stream[Stream_ID].Parsers.push_back(Parser);
- Stream[Stream_ID].IsPcm=true;
- }
- #endif
-
- for (size_t Pos=0; Pos<Stream[Stream_ID].Parsers.size(); Pos++)
- Open_Buffer_Init(Stream[Stream_ID].Parsers[Pos]);
- }
- else
- {
- CodecID_Fill(Ztring().From_GUID(SubFormat), Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff);
- }
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelPositions, ExtensibleWave_ChannelMask(ChannelMask));
- Fill(Stream_Audio, StreamPos_Last, Audio_ChannelPositions_String2, ExtensibleWave_ChannelMask2(ChannelMask));
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf_iavs()
-{
- //Standard video header before Iavs?
- if (Element_Size==72)
- {
- Element_Begin0();
- AVI__hdlr_strl_strf_vids();
- Element_End0();
- }
-
- Element_Info1("Interleaved Audio/Video");
-
- #ifdef MEDIAINFO_DVDIF_YES
- if (Element_Size<8*4)
- return;
-
- //Parsing
- DV_FromHeader=new File_DvDif();
- Open_Buffer_Init(DV_FromHeader);
-
- //DVAAuxSrc
- ((File_DvDif*)DV_FromHeader)->AuxToAnalyze=0x50; //Audio source
- Open_Buffer_Continue(DV_FromHeader, 4);
- //DVAAuxCtl
- ((File_DvDif*)DV_FromHeader)->AuxToAnalyze=0x51; //Audio control
- Open_Buffer_Continue(DV_FromHeader, Buffer+Buffer_Offset+(size_t)Element_Offset, 4);
- Element_Offset+=4;
- //DVAAuxSrc1
- Skip_L4( "DVAAuxSrc1");
- //DVAAuxCtl1
- Skip_L4( "DVAAuxCtl1");
- //DVVAuxSrc
- ((File_DvDif*)DV_FromHeader)->AuxToAnalyze=0x60; //Video source
- Open_Buffer_Continue(DV_FromHeader, 4);
- //DVAAuxCtl
- ((File_DvDif*)DV_FromHeader)->AuxToAnalyze=0x61; //Video control
- Open_Buffer_Continue(DV_FromHeader, 4);
- //Reserved
- if (Element_Offset<Element_Size)
- {
- Skip_L4( "DVReserved");
- Skip_L4( "DVReserved");
- }
-
- Finish(DV_FromHeader);
-
- Stream_Prepare(Stream_Video);
- Stream[Stream_ID].Parsers.push_back(new File_DvDif);
- Open_Buffer_Init(Stream[Stream_ID].Parsers[0]);
-
- #else //MEDIAINFO_DVDIF_YES
- //Parsing
- Skip_L4( "DVAAuxSrc");
- Skip_L4( "DVAAuxCtl");
- Skip_L4( "DVAAuxSrc1");
- Skip_L4( "DVAAuxCtl1");
- Skip_L4( "DVVAuxSrc");
- Skip_L4( "DVVAuxCtl");
- Skip_L4( "DVReserved");
- Skip_L4( "DVReserved");
-
- //Filling
- Ztring Codec; Codec.From_CC4(Stream[Stream_ID].fccHandler);
- Stream_Prepare(Stream_Video);
- float32 FrameRate=Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate).To_float32();
- Fill(Stream_Video, StreamPos_Last, Video_Codec, Codec); //May be replaced by codec parser
- Fill(Stream_Video, StreamPos_Last, Video_Codec_CC, Codec);
- if (Codec==__T("dvsd")
- || Codec==__T("dvsl"))
- {
- Fill(Stream_Video, StreamPos_Last, Video_Width, 720);
- if (FrameRate==25.000) Fill(Stream_Video, StreamPos_Last, Video_Height, 576);
- else if (FrameRate==29.970) Fill(Stream_Video, StreamPos_Last, Video_Height, 480);
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, 4.0/3, 3, true);
- }
- else if (Codec==__T("dvhd"))
- {
- Fill(Stream_Video, StreamPos_Last, Video_Width, 1440);
- if (FrameRate==25.000) Fill(Stream_Video, StreamPos_Last, Video_Height, 1152);
- else if (FrameRate==30.000) Fill(Stream_Video, StreamPos_Last, Video_Height, 960);
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, 4.0/3, 3, true);
- }
- Stream_Prepare(Stream_Audio);
- CodecID_Fill(Codec, Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Codec); //May be replaced by codec parser
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec_CC, Codec);
- #endif //MEDIAINFO_DVDIF_YES
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf_mids()
-{
- Element_Info1("Midi");
-
- //Filling
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format, "MIDI");
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, "Midi");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf_txts()
-{
- Element_Info1("Text");
-
- //Parsing
- Ztring Format;
- if (Element_Size)
- {
- Get_Local(10, Format, "Format");
- Skip_XX(22, "Unknown");
- }
-
- FILLING_BEGIN_PRECISE();
- Stream_Prepare(Stream_Text);
-
- if (Element_Size==0)
- {
- //Creating the parser
- #if defined(MEDIAINFO_SUBRIP_YES)
- Stream[Stream_ID].Parsers.push_back(new File_SubRip);
- #endif
- #if defined(MEDIAINFO_OTHERTEXT_YES)
- Stream[Stream_ID].Parsers.push_back(new File_OtherText); //For SSA
- #endif
-
- for (size_t Pos=0; Pos<Stream[Stream_ID].Parsers.size(); Pos++)
- Open_Buffer_Init(Stream[Stream_ID].Parsers[Pos]);
- }
- else
- {
- Fill(Stream_Text, StreamPos_Last, Text_Format, Format);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf_vids()
-{
- Element_Info1("Video");
-
- //Parsing
- int32u Compression, Width, Height;
- int16u Resolution;
- Skip_L4( "Size");
- Get_L4 (Width, "Width");
- Get_L4 (Height, "Height");
- Skip_L2( "Planes");
- Get_L2 (Resolution, "BitCount"); //Do not use it
- Get_C4 (Compression, "Compression");
- Skip_L4( "SizeImage");
- Skip_L4( "XPelsPerMeter");
- Skip_L4( "YPelsPerMeter");
- Skip_L4( "ClrUsed");
- Skip_L4( "ClrImportant");
-
- //Filling
- Stream[Stream_ID].Compression=Compression;
-
- if (Compression==CC4("DXSB"))
- {
- //Divx.com hack for subtitle, this is a text stream in a DivX Format
- Fill(Stream_General, 0, General_Format, "DivX", Unlimited, true, true);
- Stream_Prepare(Stream_Text);
- }
- else
- Stream_Prepare(Stream_Video);
-
- //Filling
- CodecID_Fill(Ztring().From_CC4(Compression), StreamKind_Last, StreamPos_Last, InfoCodecID_Format_Riff);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), Ztring().From_CC4(Compression).To_Local().c_str()); //FormatTag, may be replaced by codec parser
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec_CC), Ztring().From_CC4(Compression).To_Local().c_str()); //FormatTag
- Fill(StreamKind_Last, StreamPos_Last, "Width", Width, 10, true);
- Fill(StreamKind_Last, StreamPos_Last, "Height", Height>=0x80000000?(-((int32s)Height)):Height, 10, true); // AVI can use negative height for raw to signal that it's coded top-down, not bottom-up
- if (Resolution==32 && Compression==0x74736363) //tscc
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", 8);
- else if (Compression==0x44495633) //DIV3
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", 8);
- else if (MediaInfoLib::Config.CodecID_Get(StreamKind_Last, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression)).find(__T("Canopus"))!=std::string::npos) //Canopus codecs
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", Resolution/3);
- else if (Compression==0x44585342) //DXSB
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", Resolution);
- else if (MediaInfoLib::Config.CodecID_Get(StreamKind_Last, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression), InfoCodecID_ColorSpace).find(__T("RGBA"))!=std::string::npos) //RGB codecs
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", Resolution/4);
- else if (Compression==0x00000000 //RGB
- || MediaInfoLib::Config.CodecID_Get(StreamKind_Last, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression), InfoCodecID_ColorSpace).find(__T("RGB"))!=std::string::npos) //RGB codecs
- {
- if (Resolution==32)
- {
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Format), "RGBA", Unlimited, true, true);
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", Resolution/4); //With Alpha
- }
- else
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", Resolution<=16?8:(Resolution/3)); //indexed or normal
- }
- else if (Compression==0x56503632 //VP62
- || MediaInfoLib::Config.CodecID_Get(StreamKind_Last, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression), InfoCodecID_Format)==__T("H.263") //H.263
- || MediaInfoLib::Config.CodecID_Get(StreamKind_Last, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression), InfoCodecID_Format)==__T("VC-1")) //VC-1
- Fill(StreamKind_Last, StreamPos_Last, "BitDepth", Resolution/3);
- Stream[Stream_ID].StreamKind=StreamKind_Last;
-
- //Creating the parser
- if (0);
- #if defined(MEDIAINFO_FFV1_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression), InfoCodecID_Format)==__T("FFV1"))
- {
- File_Ffv1* Parser=new File_Ffv1;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_HUFFYUV_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression), InfoCodecID_Format)==__T("HuffYUV"))
- {
- File_HuffYuv* Parser=new File_HuffYuv;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_MPEGV_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression), InfoCodecID_Format)==__T("MPEG Video"))
- {
- File_Mpegv* Parser=new File_Mpegv;
- Parser->FrameIsAlwaysComplete=true;
- Parser->TimeCodeIsNotTrustable=true;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_MPEG4V_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression))==__T("MPEG-4 Visual"))
- {
- File_Mpeg4v* Parser=new File_Mpeg4v;
- Stream[Stream_ID].Specific_IsMpeg4v=true;
- Parser->FrameIsAlwaysComplete=true;
- if (MediaInfoLib::Config.ParseSpeed_Get()>=0.5)
- Parser->ShouldContinueParsing=true;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_PRORES_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression), InfoCodecID_Format)==__T("ProRes"))
- {
- File_ProRes* Parser=new File_ProRes;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_AVC_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression))==__T("AVC"))
- {
- File_Avc* Parser=new File_Avc;
- Parser->FrameIsAlwaysComplete=true;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_CANOPUS_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression))==__T("Canopus HQ"))
- {
- File_Canopus* Parser=new File_Canopus;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_JPEG_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression))==__T("JPEG"))
- {
- File_Jpeg* Parser=new File_Jpeg;
- Parser->StreamKind=Stream_Video;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_DVDIF_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression))==__T("DV"))
- {
- File_DvDif* Parser=new File_DvDif;
- Parser->IgnoreAudio=true;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- #if defined(MEDIAINFO_FRAPS_YES)
- else if (Compression==0x46505331) //"FPS1"
- {
- File_Fraps* Parser=new File_Fraps;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- else if (Compression==0x48465955) //"HFUY"
- {
- switch (Resolution)
- {
- case 16 : Fill(Stream_Video, StreamPos_Last, Video_ColorSpace, "YUV"); Fill(Stream_Video, StreamPos_Last, Video_ChromaSubsampling, "4:2:2"); Fill(Stream_Video, StreamPos_Last, Video_BitDepth, 8); break;
- case 24 : Fill(Stream_Video, StreamPos_Last, Video_ColorSpace, "RGB"); Fill(Stream_Video, StreamPos_Last, Video_BitDepth, 8); break;
- case 32 : Fill(Stream_Video, StreamPos_Last, Video_ColorSpace, "RGBA"); Fill(Stream_Video, StreamPos_Last, Video_BitDepth, 8); break;
- default : ;
- }
- }
- #if defined(MEDIAINFO_LAGARITH_YES)
- else if (Compression==0x4C414753) //"LAGS"
- {
- File_Lagarith* Parser=new File_Lagarith;
- Stream[Stream_ID].Parsers.push_back(Parser);
- }
- #endif
- for (size_t Pos=0; Pos<Stream[Stream_ID].Parsers.size(); Pos++)
- Open_Buffer_Init(Stream[Stream_ID].Parsers[Pos]);
-
- //Options
- if (Element_Offset>=Element_Size)
- return; //No options
-
- //Filling
- if (0);
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression))==__T("AVC"))
- AVI__hdlr_strl_strf_vids_Avc();
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression))==__T("FFV1"))
- AVI__hdlr_strl_strf_vids_Ffv1();
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression))==__T("HuffYUV"))
- AVI__hdlr_strl_strf_vids_HuffYUV(Resolution, Height);
- else Skip_XX(Element_Size-Element_Offset, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf_vids_Avc()
-{
- //Parsing
- Element_Begin1("AVC options");
- #if defined(MEDIAINFO_AVC_YES)
- //Can be sized block or with 000001
- File_Avc* Parser=(File_Avc*)Stream[Stream_ID].Parsers[0];
- Parser->MustParse_SPS_PPS=false;
- Parser->SizedBlocks=false;
- Parser->MustSynchronize=true;
- int64u Element_Offset_Save=Element_Offset;
- Open_Buffer_Continue(Parser);
- if (!Parser->Status[IsAccepted])
- {
- Element_Offset=Element_Offset_Save;
- delete Stream[Stream_ID].Parsers[0]; Stream[Stream_ID].Parsers[0]=new File_Avc;
- Parser=(File_Avc*)Stream[Stream_ID].Parsers[0];
- Open_Buffer_Init(Parser);
- Parser->FrameIsAlwaysComplete=true;
- Parser->MustParse_SPS_PPS=true;
- Parser->SizedBlocks=true;
- Parser->MustSynchronize=false;
- Open_Buffer_Continue(Parser);
- Element_Show();
- }
- #else //MEDIAINFO_AVC_YES
- Skip_XX(Element_Size-Element_Offset, "(AVC headers)");
- #endif
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf_vids_Ffv1()
-{
- //Parsing
- Element_Begin1("FFV1 options");
- #if defined(MEDIAINFO_FFV1_YES)
- File_Ffv1* Parser=(File_Ffv1*)Stream[Stream_ID].Parsers[0];
- Parser->IsOutOfBandData=true;
- Open_Buffer_Continue(Parser);
- #else //MEDIAINFO_FFV1_YES
- Skip_XX(Element_Size-Element_Offset, "(FFV1 headers)");
- #endif
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strf_vids_HuffYUV(int16u BitCount, int32u Height)
-{
- //Parsing
- Element_Begin1("HuffYUV options");
- #if defined(MEDIAINFO_HUFFYUV_YES)
- File_HuffYuv* Parser=(File_HuffYuv*)Stream[Stream_ID].Parsers[0];
- Parser->IsOutOfBandData=true;
- Parser->BitCount=BitCount;
- Parser->Height=Height;
- Open_Buffer_Continue(Parser);
- #else //MEDIAINFO_HUFFYUV_YES
- Skip_XX(Element_Size-Element_Offset, "(HuffYUV headers)");
- #endif
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strh()
-{
- Element_Name("Stream header");
-
- //Parsing
- int32u fccType, fccHandler, Scale, Rate, Start, Length;
- int16u Left, Top, Right, Bottom;
- Get_C4 (fccType, "fccType");
- switch (fccType)
- {
- case Elements::AVI__hdlr_strl_strh_auds :
- Get_L4 (fccHandler, "fccHandler");
- break;
- default:
- Get_C4 (fccHandler, "fccHandler");
- }
- Skip_L4( "Flags");
- Skip_L2( "Priority");
- Skip_L2( "Language");
- Skip_L4( "InitialFrames");
- Get_L4 (Scale, "Scale");
- Get_L4 (Rate, "Rate"); //Rate/Scale is stream tick rate in ticks/sec
- Get_L4 (Start, "Start");
- Get_L4 (Length, "Length");
- Skip_L4( "SuggestedBufferSize");
- Skip_L4( "Quality");
- Skip_L4( "SampleSize");
- Get_L2 (Left, "Frame_Left");
- Get_L2 (Top, "Frame_Top");
- Get_L2 (Right, "Frame_Right");
- Get_L2 (Bottom, "Frame_Bottom");
- if(Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-
- //Filling
- float32 FrameRate=0;
- if (Rate>0 && Scale>0)
- {
- //FrameRate (without known value detection)
- FrameRate=((float32)Rate)/Scale;
- if (FrameRate>1)
- {
- float32 Rest=FrameRate-(int32u)FrameRate;
- if (Rest<0.01)
- FrameRate-=Rest;
- else if (Rest>0.99)
- FrameRate+=1-Rest;
- else
- {
- float32 Rest1001=FrameRate*1001/1000-(int32u)(FrameRate*1001/1000);
- if (Rest1001<0.001)
- FrameRate=(float32)((int32u)(FrameRate*1001/1000))*1000/1001;
- if (Rest1001>0.999)
- FrameRate=(float32)((int32u)(FrameRate*1001/1000)+1)*1000/1001;
- }
- }
-
- //Duration
- if (FrameRate)
- {
- int64u Duration=float32_int64s((1000*(float32)Length)/FrameRate);
- if (avih_TotalFrame>0 //avih_TotalFrame is here because some files have a wrong Audio Duration if TotalFrame==0 (which is a bug, of course!)
- && (avih_FrameRate==0 || Duration<((float32)avih_TotalFrame)/avih_FrameRate*1000*1.10) //Some file have a nearly perfect header, except that the value is false, trying to detect it (false if 10% more than 1st video)
- && (avih_FrameRate==0 || Duration>((float32)avih_TotalFrame)/avih_FrameRate*1000*0.90)) //Some file have a nearly perfect header, except that the value is false, trying to detect it (false if 10% less than 1st video)
- {
- Fill(StreamKind_Last, StreamPos_Last, "Duration", Duration);
- }
- }
- }
- switch (fccType)
- {
- case Elements::AVI__hdlr_strl_strh_vids :
- if (FrameRate>0) Fill(Stream_Video, StreamPos_Last, "FrameRate", FrameRate, 3);
- case Elements::AVI__hdlr_strl_strh_txts :
- if (Right-Left>0) Fill(Stream_Text, StreamPos_Last, "Width", Right-Left, 10, true);
- if (Bottom-Top>0) Fill(Stream_Text, StreamPos_Last, "Height", Bottom-Top, 10, true);
- break;
- default: ;
- }
- Stream[Stream_ID].fccType=fccType;
- Stream[Stream_ID].fccHandler=fccHandler;
- Stream[Stream_ID].Scale=Scale;
- Stream[Stream_ID].Rate=Rate;
- Stream[Stream_ID].Start=Start;
- Stream[Stream_ID].Length=Length;
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_strn()
-{
- Element_Name("Stream name");
-
- //Parsing
- Ztring Title;
- Get_Local(Element_Size, Title, "StreamName");
-
- //Filling
- Fill(StreamKind_Last, StreamPos_Last, "Title", Title);
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_strl_vprp()
-{
- Element_Name("Video properties");
-
- //Parsing
- int32u FieldPerFrame;
- int16u FrameAspectRatio_H, FrameAspectRatio_W;
- Skip_L4( "VideoFormatToken");
- Skip_L4( "VideoStandard");
- Skip_L4( "VerticalRefreshRate");
- Skip_L4( "HTotalInT");
- Skip_L4( "VTotalInLines");
- Get_L2 (FrameAspectRatio_H, "FrameAspectRatio Height");
- Get_L2 (FrameAspectRatio_W, "FrameAspectRatio Width");
- Skip_L4( "FrameWidthInPixels");
- Skip_L4( "FrameHeightInLines");
- Get_L4 (FieldPerFrame, "FieldPerFrame");
- for (int32u Pos=0; Pos<FieldPerFrame; Pos++)
- {
- Skip_L4( "CompressedBMHeight");
- Skip_L4( "CompressedBMWidth");
- Skip_L4( "ValidBMHeight");
- Skip_L4( "ValidBMWidth");
- Skip_L4( "ValidBMXOffset");
- Skip_L4( "ValidBMYOffset");
- Skip_L4( "VideoXOffsetInT");
- Skip_L4( "VideoYValidStartLine");
- }
- if(Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-
- FILLING_BEGIN();
- if (FrameAspectRatio_H && FrameAspectRatio_W)
- Fill(Stream_Video, 0, Video_DisplayAspectRatio, ((float32)FrameAspectRatio_W)/FrameAspectRatio_H, 3);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__hdlr_xxxx()
-{
- AVI__INFO_xxxx();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__idx1()
-{
- Element_Name("Index (old)");
-
- //Tests
- if (!NeedOldIndex || Idx1_Offset==(int64u)-1)
- {
- Skip_XX(Element_Size, "Data");
- return;
- }
-
- //Testing malformed index (index is based on start of the file, wrong)
- if (16<=Element_Size && Idx1_Offset+4==LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset+ 8))
- Idx1_Offset=0; //Fixing base of movi atom, the index think it is the start of the file
-
- //Parsing
- while (Element_Offset+16<=Element_Size)
- {
- //Is too slow
- /*
- int32u ChunkID, Offset, Size;
- Element_Begin1("Index");
- Get_C4 (ChunkID, "ChunkID"); //Bit 31 is set if this is NOT a keyframe
- Info_L4(Flags, "Flags");
- Skip_Flags(Flags, 0, "NoTime");
- Skip_Flags(Flags, 1, "Lastpart");
- Skip_Flags(Flags, 2, "Firstpart");
- Skip_Flags(Flags, 3, "Midpart");
- Skip_Flags(Flags, 4, "KeyFrame");
- Get_L4 (Offset, "Offset"); //qwBaseOffset + this is absolute file offset
- Get_L4 (Size, "Size"); //Bit 31 is set if this is NOT a keyframe
- Element_Info1(Ztring().From_CC4(ChunkID));
- Element_Info1(Size);
-
- //Stream Pos and Size
- int32u StreamID=(ChunkID&0xFFFF0000);
- Stream[StreamID].StreamSize+=Size;
- Stream[StreamID].PacketCount++;
- Stream_Structure[Idx1_Offset+Offset].Name=StreamID;
- Stream_Structure[Idx1_Offset+Offset].Size=Size;
- Element_End0();
- */
-
- //Faster method
- int32u StreamID=BigEndian2int32u (Buffer+Buffer_Offset+(size_t)Element_Offset )&0xFFFF0000;
- int32u Offset =LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset+ 8);
- int32u Size =LittleEndian2int32u(Buffer+Buffer_Offset+(size_t)Element_Offset+12);
- stream& Stream_Item=Stream[StreamID];
- Stream_Item.StreamSize+=Size;
- Stream_Item.PacketCount++;
- stream_structure& Stream_Structure_Item=Stream_Structure[Idx1_Offset+Offset];
- Stream_Structure_Item.Name=StreamID;
- Stream_Structure_Item.Size=Size;
- Element_Offset+=16;
- }
-
- //Interleaved
- size_t Pos0=0;
- size_t Pos1=0;
- for (std::map<int64u, stream_structure>::iterator Temp=Stream_Structure.begin(); Temp!=Stream_Structure.end(); ++Temp)
- {
- switch (Temp->second.Name)
- {
- case 0x30300000 :
- if (Interleaved0_1==0) Interleaved0_1=Temp->first;
- if (Interleaved0_10==0)
- {
- Pos0++;
- if (Pos0>1)
- Interleaved0_10=Temp->first;
- }
- break;
- case 0x30310000 :
- if (Interleaved1_1==0) Interleaved1_1=Temp->first;
- if (Interleaved1_10==0)
- {
- Pos1++;
- if (Pos1>1)
- Interleaved1_10=Temp->first;
- }
- break;
- default:;
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__INFO()
-{
- Element_Name("Tags");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__INFO_IID3()
-{
- Element_Name("ID3 Tag");
-
- //Parsing
- #if defined(MEDIAINFO_ID3_YES)
- File_Id3 MI;
- Open_Buffer_Init(&MI);
- Open_Buffer_Continue(&MI);
- Finish(&MI);
- Merge(MI, Stream_General, 0, 0);
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__INFO_ILYC()
-{
- Element_Name("Lyrics");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__INFO_IMP3()
-{
- Element_Name("MP3 Information");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__INFO_JUNK()
-{
- Element_Name("Garbage");
-}
-
-//---------------------------------------------------------------------------
-// List of information atoms
-// Name X bytes, Pos=0
-//
-void File_Riff::AVI__INFO_xxxx()
-{
- //Parsing
- Ztring Value;
- Get_Local(Element_Size, Value, "Value");
-
- //Filling
- stream_t StreamKind=Stream_General;
- size_t StreamPos=0;
- size_t Parameter=(size_t)-1;
- switch (Element_Code)
- {
- case 0x00000000 : Parameter=General_Comment; break;
- case Elements::AVI__INFO_IARL : Parameter=General_Archival_Location; break;
- case Elements::AVI__INFO_IART : Parameter=General_Director; break;
- case Elements::AVI__INFO_IAS1 : Parameter=Audio_Language; StreamKind=Stream_Audio; StreamPos=0; break;
- case Elements::AVI__INFO_IAS2 : Parameter=Audio_Language; StreamKind=Stream_Audio; StreamPos=1; break;
- case Elements::AVI__INFO_IAS3 : Parameter=Audio_Language; StreamKind=Stream_Audio; StreamPos=2; break;
- case Elements::AVI__INFO_IAS4 : Parameter=Audio_Language; StreamKind=Stream_Audio; StreamPos=3; break;
- case Elements::AVI__INFO_IAS5 : Parameter=Audio_Language; StreamKind=Stream_Audio; StreamPos=4; break;
- case Elements::AVI__INFO_IAS6 : Parameter=Audio_Language; StreamKind=Stream_Audio; StreamPos=5; break;
- case Elements::AVI__INFO_IAS7 : Parameter=Audio_Language; StreamKind=Stream_Audio; StreamPos=6; break;
- case Elements::AVI__INFO_IAS8 : Parameter=Audio_Language; StreamKind=Stream_Audio; StreamPos=7; break;
- case Elements::AVI__INFO_IAS9 : Parameter=Audio_Language; StreamKind=Stream_Audio; StreamPos=8; break;
- case Elements::AVI__INFO_ICDS : Parameter=General_CostumeDesigner; break;
- case Elements::AVI__INFO_ICMS : Parameter=General_CommissionedBy; break;
- case Elements::AVI__INFO_ICMT : Parameter=General_Comment; break;
- case Elements::AVI__INFO_ICNM : Parameter=General_DirectorOfPhotography; break;
- case Elements::AVI__INFO_ICNT : Parameter=General_Movie_Country; break;
- case Elements::AVI__INFO_ICOP : Parameter=General_Copyright; break;
- case Elements::AVI__INFO_ICRD : Parameter=General_Recorded_Date; Value.Date_From_String(Value.To_Local().c_str()); break;
- case Elements::AVI__INFO_ICRP : Parameter=General_Cropped; break;
- case Elements::AVI__INFO_IDIM : Parameter=General_Dimensions; break;
- case Elements::AVI__INFO_IDIT : Parameter=General_Mastered_Date; Value.Date_From_String(Value.To_Local().c_str()); break;
- case Elements::AVI__INFO_IDPI : Parameter=General_DotsPerInch; break;
- case Elements::AVI__INFO_IDST : Parameter=General_DistributedBy; break;
- case Elements::AVI__INFO_IEDT : Parameter=General_EditedBy; break;
- case Elements::AVI__INFO_IENG : Parameter=General_EncodedBy; break;
- case Elements::AVI__INFO_IGNR : Parameter=General_Genre; break;
- case Elements::AVI__INFO_IFRM : Parameter=General_Part_Position_Total; break;
- case Elements::AVI__INFO_IKEY : Parameter=General_Keywords; break;
- case Elements::AVI__INFO_ILGT : Parameter=General_Lightness; break;
- case Elements::AVI__INFO_ILNG : Parameter=Audio_Language; StreamKind=Stream_Audio; break;
- case Elements::AVI__INFO_IMED : Parameter=General_OriginalSourceMedium; break;
- case Elements::AVI__INFO_IMUS : Parameter=General_MusicBy; break;
- case Elements::AVI__INFO_INAM : Parameter=General_Title; break;
- case Elements::AVI__INFO_IPDS : Parameter=General_ProductionDesigner; break;
- case Elements::AVI__INFO_IPLT : Parameter=General_OriginalSourceForm_NumColors; break;
- case Elements::AVI__INFO_IPRD : Parameter=General_OriginalSourceForm_Name; break;
- case Elements::AVI__INFO_IPRO : Parameter=General_Producer; break;
- case Elements::AVI__INFO_IPRT : Parameter=General_Part_Position; break;
- case Elements::AVI__INFO_IRTD : Parameter=General_LawRating; break;
- case Elements::AVI__INFO_ISBJ : Parameter=General_Subject; break;
- case Elements::AVI__INFO_ISFT : Parameter=General_Encoded_Application; break;
- case Elements::AVI__INFO_ISGN : Parameter=General_Genre; break;
- case Elements::AVI__INFO_ISHP : Parameter=General_OriginalSourceForm_Sharpness; break;
- case Elements::AVI__INFO_ISRC : Parameter=General_OriginalSourceForm_DistributedBy; break;
- case Elements::AVI__INFO_ISRF : Parameter=General_OriginalSourceForm; break;
- case Elements::AVI__INFO_ISTD : Parameter=General_ProductionStudio; break;
- case Elements::AVI__INFO_ISTR : Parameter=General_Performer; break;
- case Elements::AVI__INFO_ITCH : Parameter=General_EncodedBy; break;
- case Elements::AVI__INFO_IWEB : Parameter=General_Movie_Url; break;
- case Elements::AVI__INFO_IWRI : Parameter=General_WrittenBy; break;
- default : ;
- }
- Element_Name(MediaInfoLib::Config.Info_Get(StreamKind, Parameter, Info_Name));
- Element_Info1(Value);
-
- switch (Element_Code)
- {
- case Elements::AVI__INFO_ISMP : INFO_ISMP=Value;
- break;
- case Elements::AVI__INFO_IGNR :
- {
- Ztring ISGN=Retrieve(Stream_General, 0, General_Genre);
- Clear(Stream_General, 0, General_Genre);
- Fill(StreamKind, StreamPos, General_Genre, Value);
- if (!ISGN.empty())
- Fill(StreamKind, StreamPos, General_Genre, ISGN);
- }
- break;
- default :
- if (!Value.empty())
- {
- if (Parameter!=(size_t)-1)
- Fill(StreamKind, StreamPos, Parameter, Value);
- else
- Fill(StreamKind, StreamPos, Ztring().From_CC4((int32u)Element_Code).To_Local().c_str(), Value, true);
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__JUNK()
-{
- Element_Name("Garbage"); //Library defined size for padding, often used to store library name
-
- if (Element_Size<8)
- {
- Skip_XX(Element_Size, "Junk");
- return;
- }
-
- //Detect DivX files
- if (CC5(Buffer+Buffer_Offset)==CC5("DivX "))
- {
- Fill(Stream_General, 0, General_Format, "DivX", Unlimited, true, true);
- }
- //MPlayer
- else if (CC8(Buffer+Buffer_Offset)==CC8("[= MPlay") && Retrieve(Stream_General, 0, General_Encoded_Library).empty())
- Fill(Stream_General, 0, General_Encoded_Library, "MPlayer");
- //Scenalyzer
- else if (CC8(Buffer+Buffer_Offset)==CC8("scenalyz") && Retrieve(Stream_General, 0, General_Encoded_Library).empty())
- Fill(Stream_General, 0, General_Encoded_Library, "Scenalyzer");
- //FFMpeg broken files detection
- else if (CC8(Buffer+Buffer_Offset)==CC8("odmldmlh"))
- dmlh_TotalFrame=0; //this is not normal to have this string in a JUNK block!!! and in files tested, in this case TotalFrame is broken too
- //VirtualDubMod
- else if (CC8(Buffer+Buffer_Offset)==CC8("INFOISFT"))
- {
- int32u Size=LittleEndian2int32u(Buffer+Buffer_Offset+8);
- if (Size>Element_Size-12)
- Size=(int32u)Element_Size-12;
- Fill(Stream_General, 0, General_Encoded_Library, (const char*)(Buffer+Buffer_Offset+12), Size);
- }
- else if (CC8(Buffer+Buffer_Offset)==CC8("INFOIENG"))
- {
- int32u Size=LittleEndian2int32u(Buffer+Buffer_Offset+8);
- if (Size>Element_Size-12)
- Size=(int32u)Element_Size-12;
- Fill(Stream_General, 0, General_Encoded_Library, (const char*)(Buffer+Buffer_Offset+12), Size);
- }
- //Other libraries?
- else if (CC1(Buffer+Buffer_Offset)>=CC1("A") && CC1(Buffer+Buffer_Offset)<=CC1("z") && Retrieve(Stream_General, 0, General_Encoded_Library).empty())
- Fill(Stream_General, 0, General_Encoded_Library, (const char*)(Buffer+Buffer_Offset), (size_t)Element_Size);
-
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__MD5_()
-{
- //Parsing
- while (Element_Offset<Element_Size)
- {
- int128u MD5Stored;
- Get_L16 (MD5Stored, "MD5");
- Ztring MD5_PerItem;
- MD5_PerItem.From_Number(MD5Stored, 16);
- while (MD5_PerItem.size()<32)
- MD5_PerItem.insert(MD5_PerItem.begin(), '0'); //Padding with 0, this must be a 32-byte string
- MD5_PerItem.MakeLowerCase();
- MD5s.push_back(MD5_PerItem);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__movi()
-{
- Element_Name("Datas");
-
- //Only the first time, no need in AVIX
- if (movi_Size==0)
- {
- Idx1_Offset=File_Offset+Buffer_Offset-4;
- BookMark_Set(); //Remenbering this place, for stream parsing in phase 2
-
- //For each stream
- std::map<int32u, stream>::iterator Temp=Stream.begin();
- while (Temp!=Stream.end())
- {
- if ((Temp->second.Parsers.empty() || Temp->second.Parsers[0]==NULL) && Temp->second.fccType!=Elements::AVI__hdlr_strl_strh_txts)
- {
- Temp->second.SearchingPayload=false;
- stream_Count--;
- }
- ++Temp;
- }
- }
-
- //Probing rec (with index, this is not always tested in the flow
- if (Element_Size<12)
- {
- Element_WaitForMoreData();
- return;
- }
- if (CC4(Buffer+Buffer_Offset+8)==0x72656320) //"rec "
- rec__Present=true;
-
- //Filling
- if (!SecondPass)
- movi_Size+=Element_TotalSize_Get();
-
- //We must parse moov?
- if (NeedOldIndex || (stream_Count==0 && Index_Pos.empty()))
- {
- //Jumping
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- Param("Data", Ztring("(")+Ztring::ToZtring(Element_TotalSize_Get())+Ztring(" bytes)"));
- #endif //MEDIAINFO_TRACE
- Element_Offset=Element_TotalSize_Get(); //Not using Skip_XX() because we want to skip data we don't have, and Skip_XX() does a test on size of buffer
- return;
- }
-
- //Jump to next useful data
- AVI__movi_StreamJump();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__movi_rec_()
-{
- Element_Name("Syncronisation");
-
- rec__Present=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__movi_rec__xxxx()
-{
- AVI__movi_xxxx();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__movi_xxxx()
-{
- if (Element_Code==Elements::AVI__JUNK)
- {
- Skip_XX(Element_Size, "Junk");
- AVI__movi_StreamJump();
- return;
- }
-
- if (Element_Code!=(int64u)-1)
- Stream_ID=(int32u)(Element_Code&0xFFFF0000);
- else
- Stream_ID=(int32u)-1;
-
- if (Stream_ID==0x69780000) //ix..
- {
- //AVI Standard Index Chunk
- AVI__hdlr_strl_indx();
- Stream_ID=(int32u)(Element_Code&0x0000FFFF)<<16;
- AVI__movi_StreamJump();
- return;
- }
- if ((Element_Code&0x0000FFFF)==0x00006978) //..ix (Out of specs, but found in a Adobe After Effects CS4 DV file
- {
- //AVI Standard Index Chunk
- AVI__hdlr_strl_indx();
- Stream_ID=(int32u)(Element_Code&0xFFFF0000);
- AVI__movi_StreamJump();
- return;
- }
-
- #if MEDIAINFO_DEMUX
- if (Stream[Stream_ID].Rate) //AVI
- {
- int64u Element_Code_Old=Element_Code;
- Element_Code=((Element_Code_Old>>24)&0xF)*10+((Element_Code_Old>>16)&0xF);
- Frame_Count_NotParsedIncluded=Stream[Stream_ID].PacketPos;
- FrameInfo.DTS=Frame_Count_NotParsedIncluded*1000000000*Stream[Stream_ID].Scale/Stream[Stream_ID].Rate;
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- Element_Code=Element_Code_Old;
- Frame_Count_NotParsedIncluded=(int64u)-1;
- }
- else //WAV
- {
- //TODO
- }
- #endif //MEDIAINFO_DEMUX
-
- Stream[Stream_ID].PacketPos++;
-
- //Finished?
- if (!Stream[Stream_ID].SearchingPayload)
- {
- Element_DoNotShow();
- AVI__movi_StreamJump();
- return;
- }
-
- #if MEDIAINFO_TRACE
- if (Config_Trace_Level)
- {
- switch (Element_Code&0x0000FFFF) //2 last bytes
- {
- case Elements::AVI__movi_xxxx_____ : Element_Info1("DV"); break;
- case Elements::AVI__movi_xxxx___db :
- case Elements::AVI__movi_xxxx___dc : Element_Info1("Video"); break;
- case Elements::AVI__movi_xxxx___sb :
- case Elements::AVI__movi_xxxx___tx : Element_Info1("Text"); break;
- case Elements::AVI__movi_xxxx___wb : Element_Info1("Audio"); break;
- default : Element_Info1("Unknown"); break;
- }
- Element_Info1(Stream[Stream_ID].PacketPos);
- }
- #endif //MEDIAINFO_TRACE
-
- //Some specific stuff
- switch (Element_Code&0x0000FFFF) //2 last bytes
- {
- case Elements::AVI__movi_xxxx___tx : AVI__movi_xxxx___tx(); break;
- default : ;
- }
-
- //Parsing
- for (size_t Pos=0; Pos<Stream[Stream_ID].Parsers.size(); Pos++)
- if (Stream[Stream_ID].Parsers[Pos])
- {
- if (FrameInfo.PTS!=(int64u)-1)
- Stream[Stream_ID].Parsers[Pos]->FrameInfo.PTS=FrameInfo.PTS;
- if (FrameInfo.DTS!=(int64u)-1)
- Stream[Stream_ID].Parsers[Pos]->FrameInfo.DTS=FrameInfo.DTS;
-
- Open_Buffer_Continue(Stream[Stream_ID].Parsers[Pos], Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset));
- Element_Show();
- if (Stream[Stream_ID].Parsers.size()==1 && Stream[Stream_ID].Parsers[Pos]->Buffer_Size>0)
- Stream[Stream_ID].ChunksAreComplete=false;
-
- if (Stream[Stream_ID].Parsers.size()>1)
- {
- if (!Stream[Stream_ID].Parsers[Pos]->Status[IsAccepted] && Stream[Stream_ID].Parsers[Pos]->Status[IsFinished])
- {
- delete *(Stream[Stream_ID].Parsers.begin()+Pos);
- Stream[Stream_ID].Parsers.erase(Stream[Stream_ID].Parsers.begin()+Pos);
- Pos--;
- }
- else if (Stream[Stream_ID].Parsers.size()>1 && Stream[Stream_ID].Parsers[Pos]->Status[IsAccepted])
- {
- File__Analyze* Parser=Stream[Stream_ID].Parsers[Pos];
- for (size_t Pos2=0; Pos2<Stream[Stream_ID].Parsers.size(); Pos2++)
- {
- if (Pos2!=Pos)
- delete *(Stream[Stream_ID].Parsers.begin()+Pos2);
- }
- Stream[Stream_ID].Parsers.clear();
- Stream[Stream_ID].Parsers.push_back(Parser);
- Pos=0;
- }
- }
-
- #if MEDIAINFO_DEMUX
- if (Config->Demux_EventWasSent)
- {
- Demux_Parser=Stream[Stream_ID].Parsers[Pos];
- return;
- }
- #endif //MEDIAINFO_DEMUX
- }
- Element_Offset=Element_Size;
-
- //Some specific stuff
- switch (Element_Code&0x0000FFFF) //2 last bytes
- {
- case Elements::AVI__movi_xxxx_____ :
- case Elements::AVI__movi_xxxx___db :
- case Elements::AVI__movi_xxxx___dc : AVI__movi_xxxx___dc(); break;
- case Elements::AVI__movi_xxxx___wb : AVI__movi_xxxx___wb(); break;
- default : ;
- }
-
- //We must always parse moov?
- AVI__movi_StreamJump();
-
- Element_Show();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__movi_xxxx___dc()
-{
- //Finish (if requested)
- if (Stream[Stream_ID].Parsers.empty()
- || Stream[Stream_ID].Parsers[0]->Status[IsFinished]
- || (Stream[Stream_ID].PacketPos>=300 && MediaInfoLib::Config.ParseSpeed_Get()<1.00))
- {
- Stream[Stream_ID].SearchingPayload=false;
- stream_Count--;
- return;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__movi_xxxx___tx()
-{
- //Parsing
- int32u Name_Size;
- Ztring Value;
- int32u GAB2;
- Peek_B4(GAB2);
- if (GAB2==0x47414232 && Element_Size>=17)
- {
- Skip_C4( "GAB2");
- Skip_L1( "Zero");
- Skip_L2( "CodePage"); //2=Unicode
- Get_L4 (Name_Size, "Name_Size");
- Skip_UTF16L(Name_Size, "Name");
- Skip_L2( "Four");
- Skip_L4( "File_Size");
-
- if (Element_Offset>Element_Size)
- Element_Offset=Element_Size; //Problem
- }
-
- //Skip it
- Stream[Stream_ID].SearchingPayload=false;
- stream_Count--;
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__movi_xxxx___wb()
-{
- //Finish (if requested)
- if (Stream[Stream_ID].PacketPos>=4 //For having the chunk alignement
- && (Stream[Stream_ID].Parsers.empty()
- || Stream[Stream_ID].Parsers[0]->Status[IsFinished]
- || (Stream[Stream_ID].PacketPos>=300 && MediaInfoLib::Config.ParseSpeed_Get()<1.00)))
- {
- Stream[Stream_ID].SearchingPayload=false;
- stream_Count--;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__movi_StreamJump()
-{
- //Jump to next useful data
- if (!Index_Pos.empty())
- {
- if (Index_Pos.begin()->first<=File_Offset+Buffer_Offset && Element_Code!=Elements::AVI__movi)
- Index_Pos.erase(Index_Pos.begin());
- int64u ToJump=File_Size;
- if (!Index_Pos.empty())
- ToJump=Index_Pos.begin()->first;
- if (ToJump>File_Size)
- ToJump=File_Size;
- if (ToJump>=File_Offset+Buffer_Offset+Element_TotalSize_Get(Element_Level-2)) //We want always Element movi
- {
- #if MEDIAINFO_MD5
- if (Config->File_Md5_Get() && SecondPass)
- Md5_ParseUpTo=File_Offset+Buffer_Offset+Element_TotalSize_Get(Element_Level-2);
- else
- #endif //MEDIAINFO_MD5
- GoTo(File_Offset+Buffer_Offset+Element_TotalSize_Get(Element_Level-2), "AVI"); //Not in this chunk
- }
- else if (ToJump!=File_Offset+Buffer_Offset+(Element_Code==Elements::AVI__movi?0:Element_Size))
- {
- #if MEDIAINFO_MD5
- if (Config->File_Md5_Get() && SecondPass)
- Md5_ParseUpTo=File_Offset+Buffer_Offset+Element_TotalSize_Get(Element_Level-2);
- else
- #endif //MEDIAINFO_MD5
- GoTo(ToJump, "AVI"); //Not just after
- }
- }
- else if (stream_Count==0)
- {
- //Jumping
- Element_Show();
- if (rec__Present)
- Element_End0();
- Info("movi, Jumping to end of chunk");
- if (SecondPass)
- {
- std::map<int32u, stream>::iterator Temp=Stream.begin();
- while (Temp!=Stream.end())
- {
- for (size_t Pos=0; Pos<Temp->second.Parsers.size(); ++Pos)
- {
- Temp->second.Parsers[Pos]->Fill();
- Temp->second.Parsers[Pos]->Open_Buffer_Unsynch();
- }
- ++Temp;
- }
- Finish("AVI"); //The rest is already parsed
- }
- else
- GoTo(File_Offset+Buffer_Offset+Element_TotalSize_Get(), "AVI");
- }
- else if (Stream_Structure_Temp!=Stream_Structure.end())
- {
- do
- Stream_Structure_Temp++;
- while (Stream_Structure_Temp!=Stream_Structure.end() && !(Stream[(int32u)Stream_Structure_Temp->second.Name].SearchingPayload && Config->ParseSpeed<1.0));
- if (Stream_Structure_Temp!=Stream_Structure.end())
- {
- int64u ToJump=Stream_Structure_Temp->first;
- if (ToJump>=File_Offset+Buffer_Offset+Element_TotalSize_Get(Element_Level-2))
- {
- #if MEDIAINFO_MD5
- if (Config->File_Md5_Get() && SecondPass)
- Md5_ParseUpTo=File_Offset+Buffer_Offset+Element_TotalSize_Get(Element_Level-2);
- else
- #endif //MEDIAINFO_MD5
- GoTo(File_Offset+Buffer_Offset+Element_TotalSize_Get(Element_Level-2), "AVI"); //Not in this chunk
- }
- else if (ToJump!=File_Offset+Buffer_Offset+Element_Size)
- {
- #if MEDIAINFO_MD5
- if (Config->File_Md5_Get() && SecondPass)
- Md5_ParseUpTo=ToJump;
- else
- #endif //MEDIAINFO_MD5
- GoTo(ToJump, "AVI"); //Not just after
- }
- }
- else
- Finish("AVI");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__PrmA()
-{
- Element_Name("Adobe Premiere PrmA");
-
- //Parsing
- int32u FourCC, Size;
- Get_C4 (FourCC, "FourCC");
- Get_B4 (Size, "Size");
- switch (FourCC)
- {
- case 0x50415266:
- if (Size==20)
- {
- int32u PAR_X, PAR_Y;
- Skip_B4( "Unknown");
- Get_B4 (PAR_X, "PAR_X");
- Get_B4 (PAR_Y, "PAR_Y");
-
- if (PAR_Y)
- PAR=((float64)PAR_X)/PAR_Y;
- }
- else
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- break;
- default:
- for (int32u Pos=8; Pos<Size; Pos++)
- Skip_B4( "Unknown");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__Tdat()
-{
- Element_Name("Adobe Premiere Tdat");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__Tdat_tc_A()
-{
- Element_Name("tc_A");
-
- //Parsing
- Ztring Value;
- Get_Local(Element_Size, Value, "Unknown");
-
- if (Value.find_first_not_of(__T("0123456789:;"))==string::npos)
- Tdat_tc_A=Value;
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__Tdat_tc_O()
-{
- Element_Name("tc_O");
-
- //Parsing
- Ztring Value;
- Get_Local(Element_Size, Value, "Unknown");
-
- if (Value.find_first_not_of(__T("0123456789:;"))==string::npos)
- Tdat_tc_O=Value;
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__Tdat_rn_A()
-{
- Element_Name("rn_A");
-
- //Parsing
- Skip_Local(Element_Size, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__Tdat_rn_O()
-{
- Element_Name("rn_O");
-
- //Parsing
- Skip_Local(Element_Size, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVI__xxxx()
-{
- Stream_ID=(int32u)(Element_Code&0xFFFF0000);
-
- if (Stream_ID==0x69780000) //ix..
- {
- //AVI Standard Index Chunk
- AVI__hdlr_strl_indx();
- Stream_ID=(int32u)(Element_Code&0x0000FFFF)<<16;
- AVI__movi_StreamJump();
- return;
- }
- if ((Element_Code&0x0000FFFF)==0x00006978) //..ix (Out of specs, but found in a Adobe After Effects CS4 DV file
- {
- //AVI Standard Index Chunk
- AVI__hdlr_strl_indx();
- Stream_ID=(int32u)(Element_Code&0xFFFF0000);
- AVI__movi_StreamJump();
- return;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVIX()
-{
- //Filling
- Fill(Stream_General, 0, General_Format_Profile, "OpenDML", Unlimited, true, true);
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVIX_idx1()
-{
- AVI__idx1();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVIX_movi()
-{
- AVI__movi();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVIX_movi_rec_()
-{
- AVI__movi_rec_();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVIX_movi_rec__xxxx()
-{
- AVIX_movi_xxxx();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::AVIX_movi_xxxx()
-{
- AVI__movi_xxxx();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::CADP()
-{
- Element_Name("CMP4 - ADPCM");
-
- //Testing if we have enough data
- if (Element_Size<4)
- {
- Element_WaitForMoreData();
- return;
- }
-
- //Parsing
- int32u Codec;
- Get_C4 (Codec, "Codec");
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- Param("Data", Ztring("(")+Ztring::ToZtring(Element_TotalSize_Get()-Element_Offset)+Ztring(" bytes)"));
- #endif //MEDIAINFO_TRACE
- Element_Offset=Element_TotalSize_Get(); //Not using Skip_XX() because we want to skip data we don't have, and Skip_XX() does a test on size of buffer
-
- FILLING_BEGIN();
- Stream_Prepare(Stream_Audio);
- if (Codec==0x41647063) //Adpc
- Fill(Stream_Audio, StreamPos_Last, Audio_Format, "ADPCM");
- Fill(Stream_Audio, StreamPos_Last, Audio_StreamSize, Element_TotalSize_Get());
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::CDDA()
-{
- Element_Name("Compact Disc for Digital Audio");
-
- //Filling
- Accept("CDDA");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::CDDA_fmt_()
-{
- //Specs: http://fr.wikipedia.org/wiki/Compact_Disc_Audio_track
- //Specs: http://www.moon-soft.com/program/FORMAT/sound/cda.htm
-
- Element_Name("Stream format");
-
- //Parsing
- int32u id;
- int16u Version, tracknb=1;
- int8u TPositionF=0, TPositionS=0, TPositionM=0, TDurationF=0, TDurationS=0, TDurationM=0;
- Get_L2 (Version, "Version"); // Always 1
- if (Version!=1)
- {
- //Not supported
- Skip_XX(Element_Size-2, "Data");
- return;
- }
- Get_L2 (tracknb, "Number"); // Start at 1
- Get_L4 (id, "id");
- Skip_L4( "offset"); // in frames //Priority of FSM format
- Skip_L4( "Duration"); // in frames //Priority of FSM format
- Get_L1 (TPositionF, "Track_PositionF"); // in frames
- Get_L1 (TPositionS, "Track_PositionS"); // in seconds
- Get_L1 (TPositionM, "Track_PositionM"); // in minutes
- Skip_L1( "empty");
- Get_L1 (TDurationF, "Track_DurationF"); // in frames
- Get_L1 (TDurationS, "Track_DurationS"); // in seconds
- Get_L1 (TDurationM, "Track_DurationM"); // in minutes
- Skip_L1( "empty");
-
- FILLING_BEGIN();
- int32u TPosition=TPositionM*60*75+TPositionS*75+TPositionF;
- int32u TDuration=TDurationM*60*75+TDurationS*75+TDurationF;
-
- Fill(Stream_General, 0, General_Track_Position, tracknb);
- Fill(Stream_General, 0, General_Format, "CDDA");
- Fill(Stream_General, 0, General_Format_Info, "Compact Disc for Digital Audio");
- Fill(Stream_General, 0, General_UniqueID, id);
- Fill(Stream_General, 0, General_FileSize, File_Size+TDuration*2352, 10, true);
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, 0, Audio_Format, "PCM");
- Fill(Stream_Audio, 0, Audio_Format_Settings_Endianness, "Little");
- Fill(Stream_Audio, 0, Audio_BitDepth, 16);
- Fill(Stream_Audio, 0, Audio_Channel_s_, 2);
- Fill(Stream_Audio, 0, Audio_SamplingRate, 44100);
- Fill(Stream_Audio, 0, Audio_FrameRate, 75);
- Fill(Stream_Audio, 0, Audio_BitRate, 1411200);
- Fill(Stream_Audio, 0, Audio_Compression_Mode, "Lossless");
- Fill(Stream_Audio, 0, Audio_FrameCount, TDuration);
- Fill(Stream_Audio, 0, Audio_Duration, float32_int32s(((float32)TDuration)*1000/75));
- Fill(Stream_Audio, 0, Audio_Delay, float32_int32s(((float32)TPosition)*1000/75));
-
- //No more need data
- Finish("CDDA");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::CMJP()
-{
- Element_Name("CMP4 - JPEG");
-
- //Parsing
- #ifdef MEDIAINFO_JPEG_YES
- Stream_ID=0;
- File_Jpeg* Parser=new File_Jpeg;
- Open_Buffer_Init(Parser);
- Parser->StreamKind=Stream_Video;
- Open_Buffer_Continue(Parser);
- Element_Offset=Element_TotalSize_Get(); //Not using Skip_XX() because we want to skip data we don't have, and Skip_XX() does a test on size of buffer
-
- FILLING_BEGIN();
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, StreamPos_Last, Video_StreamSize, Element_TotalSize_Get());
- Finish(Parser);
- Merge(*Parser, StreamKind_Last, 0, StreamPos_Last);
- FILLING_END();
-
- Stream[Stream_ID].Parsers.push_back(Parser);
- #else
- Element_Offset=Element_TotalSize_Get(); //Not using Skip_XX() because we want to skip data we don't have, and Skip_XX() does a test on size of buffer
-
- FILLING_BEGIN();
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, StreamPos_Last, Video_Format, "JPEG");
- Fill(Stream_Video, StreamPos_Last, Video_StreamSize, Element_TotalSize_Get());
- FILLING_END();
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::CMP4()
-{
- Accept("CMP4");
- Element_Name("CMP4 - Header");
-
- //Parsing
- Ztring Title;
- Get_Local(Element_Size, Title, "Title");
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, General_Format, "CMP4");
- Fill(Stream_General, 0, "Title", Title);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::IDVX()
-{
- Element_Name("Tags");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::INDX()
-{
- Element_Name("Index (from which spec?)");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::INDX_xxxx()
-{
- Stream_ID=(int32u)(Element_Code&0xFFFF0000);
-
- if (Stream_ID==0x69780000) //ix..
- {
- //Index
- int32u Entry_Count, ChunkId;
- int16u LongsPerEntry;
- int8u IndexType, IndexSubType;
- Get_L2 (LongsPerEntry, "LongsPerEntry"); //Size of each entry in aIndex array
- Get_L1 (IndexSubType, "IndexSubType");
- Get_L1 (IndexType, "IndexType");
- Get_L4 (Entry_Count, "EntriesInUse"); //Index of first unused member in aIndex array
- Get_C4 (ChunkId, "ChunkId"); //FCC of what is indexed
-
- Skip_L4( "Unknown");
- Skip_L4( "Unknown");
- Skip_L4( "Unknown");
-
- for (int32u Pos=0; Pos<Entry_Count; Pos++)
- {
- Skip_L8( "Offset");
- Skip_L4( "Size");
- Skip_L4( "Frame number?");
- Skip_L4( "Frame number?");
- Skip_L4( "Zero");
- }
- }
-
- //Currently, we do not use the index
- //TODO: use the index
- Stream_Structure.clear();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::JUNK()
-{
- Element_Name("Junk");
-
- //Parse
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- Param("Junk", Ztring("(")+Ztring::ToZtring(Element_TotalSize_Get())+Ztring(" bytes)"));
- #endif //MEDIAINFO_TRACE
- Element_Offset=Element_TotalSize_Get(); //Not using Skip_XX() because we want to skip data we don't have, and Skip_XX() does a test on size of buffer
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::menu()
-{
- Element_Name("DivX Menu");
-
- //Filling
- Stream_Prepare(Stream_Menu);
- Fill(Stream_Menu, StreamPos_Last, Menu_Format, "DivX Menu");
- Fill(Stream_Menu, StreamPos_Last, Menu_Codec, "DivX");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::MThd()
-{
- Element_Name("MIDI header");
-
- //Parsing
- Skip_B2( "format");
- Skip_B2( "ntrks");
- Skip_B2( "division");
-
- FILLING_BEGIN_PRECISE();
- Accept("MIDI");
- Fill(Stream_General, 0, General_Format, "MIDI");
- FILLING_ELSE();
- Reject("MIDI");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::MTrk()
-{
- Element_Name("MIDI Track");
-
- //Parsing
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- Param("Data", Ztring("(")+Ztring::ToZtring(Element_TotalSize_Get())+Ztring(" bytes)"));
- #endif //MEDIAINFO_TRACE
- Element_Offset=Element_TotalSize_Get(); //Not using Skip_XX() because we want to skip data we don't have, and Skip_XX() does a test on size of buffer
-
- FILLING_BEGIN();
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format, "MIDI");
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, "Midi");
-
- Finish("MIDI");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::PAL_()
-{
- Data_Accept("RIFF Palette");
- Element_Name("RIFF Palette");
-
- //Filling
- Fill(Stream_General, 0, General_Format, "RIFF Palette");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::QLCM()
-{
- Data_Accept("QLCM");
- Element_Name("QLCM");
-
- //Filling
- Fill(Stream_General, 0, General_Format, "QLCM");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::QLCM_fmt_()
-{
- //Parsing
- Ztring codec_name;
- int128u codec_guid;
- int32u num_rates;
- int16u codec_version, average_bps, packet_size, block_size, sampling_rate, sample_size;
- int8u major, minor;
- Get_L1 (major, "major");
- Get_L1 (minor, "minor");
- Get_GUID(codec_guid, "codec-guid");
- Get_L2 (codec_version, "codec-version");
- Get_Local(80, codec_name, "codec-name");
- Get_L2 (average_bps, "average-bps");
- Get_L2 (packet_size, "packet-size");
- Get_L2 (block_size, "block-size");
- Get_L2 (sampling_rate, "sampling-rate");
- Get_L2 (sample_size, "sample-size");
- Element_Begin1("rate-map-table");
- Get_L4 (num_rates, "num-rates");
- for (int32u rate=0; rate<num_rates; rate++)
- {
- Skip_L2( "rate-size");
- Skip_L2( "rate-octet");
- }
- Element_End0();
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- if (Element_Offset<Element_Size)
- Skip_L4( "Reserved"); //Some files don't have the 5th reserved dword
-
- FILLING_BEGIN_PRECISE();
- Stream_Prepare (Stream_Audio);
- switch (codec_guid.hi)
- {
- case Elements::QLCM_QCELP1 :
- case Elements::QLCM_QCELP2 : Fill(Stream_Audio, 0, Audio_Format, "QCELP"); Fill(Stream_Audio, 0, Audio_Codec, "QCELP"); break;
- case Elements::QLCM_EVRC : Fill(Stream_Audio, 0, Audio_Format, "EVRC"); Fill(Stream_Audio, 0, Audio_Codec, "EVRC"); break;
- case Elements::QLCM_SMV : Fill(Stream_Audio, 0, Audio_Format, "SMV"); Fill(Stream_Audio, 0, Audio_Codec, "SMV"); break;
- default : ;
- }
- Fill(Stream_Audio, 0, Audio_BitRate, average_bps);
- Fill(Stream_Audio, 0, Audio_SamplingRate, sampling_rate);
- Fill(Stream_Audio, 0, Audio_BitDepth, sample_size);
- Fill(Stream_Audio, 0, Audio_Channel_s_, 1);
- FILLING_END();
-}
-
-#if defined(MEDIAINFO_GXF_YES)
-//---------------------------------------------------------------------------
-void File_Riff::rcrd()
-{
- Data_Accept("Ancillary media packets");
- Element_Name("Ancillary media packets");
-
- //Filling
- if (Retrieve(Stream_General, 0, General_Format).empty())
- Fill(Stream_General, 0, General_Format, "Ancillary media packets"); //GXF, RDD14-2007
-
- //Clearing old data
- if (Ancillary)
- {
- (*Ancillary)->FrameInfo.DTS=FrameInfo.DTS;
- Open_Buffer_Continue(*Ancillary, Buffer, 0);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::rcrd_desc()
-{
- Element_Name("Ancillary media packet description");
-
- //Parsing
- int32u Version;
- Get_L4 (Version, "Version");
- if (Version==2)
- {
- Skip_L4( "Number of fields");
- Skip_L4( "Length of the ancillary data field descriptions");
- Skip_L4( "Byte size of the complete ancillary media packet");
- Skip_L4( "Format of the video");
- }
- else
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::rcrd_fld_()
-{
- Element_Name("Ancillary data field description");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::rcrd_fld__anc_()
-{
- Element_Name("Ancillary data sample description");
-
- rcrd_fld__anc__pos__LineNumber=(int32u)-1;
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::rcrd_fld__anc__pos_()
-{
- Element_Name("Ancillary data sample description");
-
- //Parsing
- Get_L4 (rcrd_fld__anc__pos__LineNumber, "Video line number");
- Skip_L4( "Ancillary video color difference or luma space");
- Skip_L4( "Ancillary video space");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::rcrd_fld__anc__pyld()
-{
- Element_Name("Ancillary data sample payload");
-
- if (Ancillary)
- {
- (*Ancillary)->FrameInfo.DTS=FrameInfo.DTS;
- (*Ancillary)->LineNumber=rcrd_fld__anc__pos__LineNumber;
- Open_Buffer_Continue(*Ancillary);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::rcrd_fld__finf()
-{
- Element_Name("Data field description");
-
- //Parsing
- Skip_L4( "Video field identifier");
-}
-#endif //MEDIAINFO_GXF_YES
-
-//---------------------------------------------------------------------------
-void File_Riff::RDIB()
-{
- Data_Accept("RIFF DIB");
- Element_Name("RIFF DIB");
-
- //Filling
- Fill(Stream_General, 0, General_Format, "RIFF DIB");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::RMID()
-{
- Data_Accept("RIFF MIDI");
- Element_Name("RIFF MIDI");
-
- //Filling
- Fill(Stream_General, 0, General_Format, "RIFF MIDI");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::RMMP()
-{
- Data_Accept("RIFF MMP");
- Element_Name("RIFF MMP");
-
- //Filling
- Fill(Stream_General, 0, General_Format, "RIFF MMP");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::RMP3()
-{
- Data_Accept("RMP3");
- Element_Name("RMP3");
-
- //Filling
- Fill(Stream_General, 0, General_Format, "RMP3");
- Kind=Kind_Rmp3;
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::RMP3_data()
-{
- Element_Name("Raw datas");
-
- Fill(Stream_Audio, 0, Audio_StreamSize, Buffer_DataToParse_End-Buffer_DataToParse_Begin);
- Stream_Prepare(Stream_Audio);
-
- //Creating parser
- #if defined(MEDIAINFO_MPEGA_YES)
- File_Mpega* Parser=new File_Mpega;
- Parser->CalculateDelay=true;
- Parser->ShouldContinueParsing=true;
- Open_Buffer_Init(Parser);
- stream& StreamItem=Stream[(int32u)-1];
- StreamItem.StreamKind=Stream_Audio;
- StreamItem.StreamPos=0;
- StreamItem.Parsers.push_back(Parser);
- #else //MEDIAINFO_MPEG4_YES
- Fill(Stream_Audio, 0, Audio_Format, "MPEG Audio");
- Skip_XX(Buffer_DataToParse_End-Buffer_DataToParse_Begin, "Data");
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::RMP3_data_Continue()
-{
- #if MEDIAINFO_DEMUX
- if (Element_Size)
- {
- Demux_random_access=true;
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- }
- #endif //MEDIAINFO_DEMUX
-
- Element_Code=(int64u)-1;
- AVI__movi_xxxx();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::SMV0()
-{
- Accept("SMV");
-
- //Parsing
- int8u Version;
- Skip_C1( "Identifier (continuing)");
- Get_C1 (Version, "Version");
- Skip_C3( "Identifier (continuing)");
- if (Version=='1')
- {
- int32u Width, Height, FrameRate, BlockSize, FrameCount;
- Get_B3 (Width, "Width");
- Get_B3 (Height, "Height");
- Skip_B3( "0x000010");
- Skip_B3( "0x000001");
- Get_B3 (BlockSize, "Block size");
- Get_B3 (FrameRate, "Frame rate");
- Get_B3 (FrameCount, "Frame count");
- Skip_B3( "0x000000");
- Skip_B3( "0x000000");
- Skip_B3( "0x000000");
- Skip_B3( "0x010101");
- Skip_B3( "0x010101");
- Skip_B3( "0x010101");
- Skip_B3( "0x010101");
-
- //Filling
- Fill(Stream_General, 0, General_Format_Profile, "SMV v1");
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_MuxingMode, "SMV v1");
- Fill(Stream_Video, 0, Video_Width, Width);
- Fill(Stream_Video, 0, Video_Height, Height);
- Fill(Stream_Video, 0, Video_FrameRate, (float)FrameRate);
- Fill(Stream_Video, 0, Video_FrameCount, FrameCount);
-
- Finish("SMV");
- }
- else if (Version=='2')
- {
- int32u Width, Height, FrameRate;
- Get_L3 (Width, "Width");
- Get_L3 (Height, "Height");
- Skip_L3( "0x000010");
- Skip_L3( "0x000001");
- Get_L3 (SMV_BlockSize, "Block size");
- Get_L3 (FrameRate, "Frame rate");
- Get_L3 (SMV_FrameCount, "Frame count");
- Skip_L3( "0x000001");
- Skip_L3( "0x000000");
- Skip_L3( "Frame rate");
- Skip_L3( "0x010101");
- Skip_L3( "0x010101");
- Skip_L3( "0x010101");
- Skip_L3( "0x010101");
-
- //Filling
- SMV_BlockSize+=3;
- SMV_FrameCount++;
- Fill(Stream_General, 0, General_Format_Profile, "SMV v2");
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "JPEG");
- Fill(Stream_Video, 0, Video_Codec, "JPEG");
- Fill(Stream_Video, 0, Video_MuxingMode, "SMV v2");
- Fill(Stream_Video, 0, Video_Width, Width);
- Fill(Stream_Video, 0, Video_Height, Height);
- Fill(Stream_Video, 0, Video_FrameRate, FrameRate);
- Fill(Stream_Video, 0, Video_FrameCount, SMV_FrameCount);
- Fill(Stream_Video, 0, Video_StreamSize, SMV_BlockSize*SMV_FrameCount);
- }
- else
- Finish("SMV");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::SMV0_xxxx()
-{
- //Parsing
- int32u Size;
- Get_L3 (Size, "Size");
- #if defined(MEDIAINFO_JPEG_YES)
- //Creating the parser
- File_Jpeg MI;
- Open_Buffer_Init(&MI);
-
- //Parsing
- Open_Buffer_Continue(&MI, Size);
-
- //Filling
- Finish(&MI);
- Merge(MI, Stream_Video, 0, StreamPos_Last);
-
- //Positioning
- Element_Offset+=Size;
- #else
- //Parsing
- Skip_XX(Size, "JPEG data");
- #endif
- Skip_XX(Element_Size-Element_Offset, "Padding");
-
- //Filling
- #if MEDIAINFO_MD5
- if (Config->File_Md5_Get())
- Element_Offset=Element_Size+(SMV_FrameCount-1)*SMV_BlockSize;
- #endif //MEDIAINFO_MD5
- Data_GoTo(File_Offset+Buffer_Offset+(size_t)Element_Size+(SMV_FrameCount-1)*SMV_BlockSize, "SMV");
- SMV_BlockSize=0;
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::WAVE()
-{
- Data_Accept("Wave");
- Element_Name("Wave");
-
- //Filling
- Fill(Stream_General, 0, General_Format, "Wave");
- Kind=Kind_Wave;
- #if MEDIAINFO_EVENTS
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::WAVE__pmx()
-{
- Element_Name("XMP");
-
- //Parsing
- Ztring XML_Data;
- Get_Local(Element_Size, XML_Data, "XML data");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::WAVE_aXML()
-{
- Element_Name("aXML");
-
- //Parsing
- Skip_Local(Element_Size, "XML data");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::WAVE_bext()
-{
- Element_Name("Broadcast extension");
-
- //Parsing
- Ztring Description, Originator, OriginatorReference, OriginationDate, OriginationTime, History;
- int16u Version;
- Get_Local(256, Description, "Description");
- Get_Local( 32, Originator, "Originator");
- Get_Local( 32, OriginatorReference, "OriginatorReference");
- Get_Local( 10, OriginationDate, "OriginationDate");
- Get_Local( 8, OriginationTime, "OriginationTime");
- Get_L8 ( TimeReference, "TimeReference"); //To be divided by SamplesPerSec
- Get_L2 ( Version, "Version");
- if (Version==1)
- Skip_UUID( "UMID");
- Skip_XX (602-Element_Offset, "Reserved");
- if (Element_Offset<Element_Size)
- Get_Local(Element_Size-Element_Offset, History, "History");
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, General_Description, Description);
- Fill(Stream_General, 0, General_Producer, Originator);
- Fill(Stream_General, 0, "Producer_Reference", OriginatorReference);
- Fill(Stream_General, 0, General_Encoded_Date, OriginationDate+__T(' ')+OriginationTime);
- Fill(Stream_General, 0, General_Encoded_Library_Settings, History);
- if (SamplesPerSec && TimeReference!=(int64u)-1)
- {
- Fill(Stream_Audio, 0, Audio_Delay, float64_int64s(((float64)TimeReference)*1000/SamplesPerSec));
- Fill(Stream_Audio, 0, Audio_Delay_Source, "Container (bext)");
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::WAVE_cue_()
-{
- Element_Name("Cue points");
-
- //Parsing
- int32u numCuePoints;
- Get_L4(numCuePoints, "numCuePoints");
- for (int32u Pos=0; Pos<numCuePoints; Pos++)
- {
- Element_Begin1("Cue point");
- Skip_L4( "ID");
- Skip_L4( "Position");
- Skip_C4( "DataChunkID");
- Skip_L4( "ChunkStart");
- Skip_L4( "BlockStart");
- Skip_L4( "SampleOffset");
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::WAVE_data()
-{
- Element_Name("Raw datas");
-
- if (Buffer_DataToParse_End-Buffer_DataToParse_Begin<100)
- {
- Skip_XX(Buffer_DataToParse_End-Buffer_Offset, "Unknown");
- return; //This is maybe embeded in another container, and there is only the header (What is the junk?)
- }
-
- FILLING_BEGIN();
- Fill(Stream_Audio, 0, Audio_StreamSize, Buffer_DataToParse_End-Buffer_DataToParse_Begin);
- FILLING_END();
-
- //Parsing
- Element_Code=(int64u)-1;
-
- FILLING_BEGIN();
- int64u Duration=Retrieve(Stream_Audio, 0, Audio_Duration).To_int64u();
- int64u BitRate=Retrieve(Stream_Audio, 0, Audio_BitRate).To_int64u();
- if (Duration)
- {
- int64u BitRate_New=(Buffer_DataToParse_End-Buffer_DataToParse_Begin)*8*1000/Duration;
- if (BitRate_New<BitRate*0.95 || BitRate_New>BitRate*1.05)
- Fill(Stream_Audio, 0, Audio_BitRate, BitRate_New, 10, true); //Correcting the bitrate, it was false in the header
- }
- else if (BitRate)
- {
- if (IsSub)
- //Retrieving "data" real size, in case of truncated files and/or wave header in another container
- Duration=((int64u)LittleEndian2int32u(Buffer+Buffer_Offset-4))*8*1000/BitRate; //TODO: RF64 is not handled
- else
- Duration=(Buffer_DataToParse_End-Buffer_DataToParse_Begin)*8*1000/BitRate;
- Fill(Stream_General, 0, General_Duration, Duration, 10, true);
- Fill(Stream_Audio, 0, Audio_Duration, Duration, 10, true);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::WAVE_data_Continue()
-{
- #if MEDIAINFO_DEMUX
- Element_Code=(int64u)-1;
- if (AvgBytesPerSec && Demux_Rate)
- {
- FrameInfo.DTS=float64_int64s((File_Offset+Buffer_Offset-Buffer_DataToParse_Begin)*1000000000.0/AvgBytesPerSec);
- FrameInfo.PTS=FrameInfo.DTS;
- Frame_Count_NotParsedIncluded=float64_int64s(((float64)FrameInfo.DTS)/1000000000.0*Demux_Rate);
- }
- Demux_random_access=true;
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_MainStream);
- Frame_Count_NotParsedIncluded=(int64u)-1;
- #endif //MEDIAINFO_DEMUX
-
- Element_Code=(int64u)-1;
- AVI__movi_xxxx();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::WAVE_ds64()
-{
- Element_Name("DataSize64");
-
- //Parsing
- int32u tableLength;
- Skip_L8( "riffSize"); //Is directly read from the header parser
- Get_L8 (WAVE_data_Size, "dataSize");
- Get_L8 (WAVE_fact_samplesCount, "sampleCount");
- Get_L4 (tableLength, "tableLength");
- for (int32u Pos=0; Pos<tableLength; Pos++)
- Skip_L8( "table[]");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::WAVE_fact()
-{
- Element_Name("Sample count");
-
- //Parsing
- int64u SamplesCount64;
- int32u SamplesCount;
- Get_L4 (SamplesCount, "SamplesCount");
- SamplesCount64=SamplesCount;
- if (SamplesCount64==0xFFFFFFFF)
- SamplesCount64=WAVE_fact_samplesCount;
-
- FILLING_BEGIN();
- int32u SamplingRate=Retrieve(Stream_Audio, 0, Audio_SamplingRate).To_int32u();
- if (SamplingRate)
- {
- //Calculating
- int64u Duration=(SamplesCount64*1000)/SamplingRate;
-
- //Coherency test
- bool IsOK=true;
- if (File_Size!=(int64u)-1)
- {
- int64u BitRate=Retrieve(Stream_Audio, 0, Audio_BitRate).To_int64u();
- if (BitRate)
- {
- int64u Duration_FromBitRate = File_Size * 8 * 1000 / BitRate;
- if (Duration_FromBitRate > Duration*1.10 || Duration_FromBitRate < Duration*0.9)
- IsOK = false;
- }
- }
-
- //Filling
- if (IsOK)
- Fill(Stream_Audio, 0, Audio_Duration, Duration);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::WAVE_fmt_()
-{
- //Compute the current codec ID
- Element_Code=(int64u)-1;
- Stream_ID=(int32u)-1;
- stream_Count=1;
-
- Stream[(int32u)-1].fccType=Elements::AVI__hdlr_strl_strh_auds;
- AVI__hdlr_strl_strf();
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::WAVE_ID3_()
-{
- Element_Name("ID3v2 tags");
-
- //Parsing
- #if defined(MEDIAINFO_ID3V2_YES)
- File_Id3v2 MI;
- Open_Buffer_Init(&MI);
- Open_Buffer_Continue(&MI);
- Finish(&MI);
- Merge(MI, Stream_General, 0, 0);
- #endif
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::WAVE_iXML()
-{
- Element_Name("iXML");
-
- //Parsing
- Skip_Local(Element_Size, "XML data");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::wave()
-{
- Data_Accept("Wave64");
- Element_Name("Wave64");
-
- //Filling
- Fill(Stream_General, 0, General_Format, "Wave64");
-}
-
-//---------------------------------------------------------------------------
-void File_Riff::W3DI()
-{
- Element_Name("IDVX tags (Out of specs!)");
-
- //Parsing
- int32u Size=(int32u)Element_Size;
- Ztring Title, Artist, Album, Unknown, Genre, Comment;
- int32u TrackPos;
- Get_Local(Size, Title, "Title");
- Element_Offset=(int32u)Title.size();
- Size-=(int32u)Title.size();
- if (Size==0) return;
- Skip_L1( "Zero"); Size--; //NULL char
- Get_Local(Size, Artist, "Artist");
- Element_Offset=(int32u)Title.size()+1+(int32u)Artist.size();
- Size-=(int32u)Artist.size();
- if (Size==0) return;
- Skip_L1( "Zero"); Size--; //NULL char
- Get_Local(Size, Album, "Album");
- Element_Offset=(int32u)Title.size()+1+(int32u)Artist.size()+1+(int32u)Album.size();
- Size-=(int32u)Album.size();
- if (Size==0) return;
- Skip_L1( "Zero"); Size--; //NULL char
- Get_Local(Size, Unknown, "Unknown");
- Element_Offset=(int32u)Title.size()+1+(int32u)Artist.size()+1+(int32u)Album.size()+1+(int32u)Unknown.size();
- Size-=(int32u)Unknown.size();
- if (Size==0) return;
- Skip_L1( "Zero"); Size--; //NULL char
- Get_Local(Size, Genre, "Genre");
- Element_Offset=(int32u)Title.size()+1+(int32u)Artist.size()+1+(int32u)Album.size()+1+(int32u)Unknown.size()+1+(int32u)Genre.size();
- Size-=(int32u)Genre.size();
- if (Size==0) return;
- Skip_L1( "Zero"); Size--; //NULL char
- Get_Local(Size, Comment, "Comment");
- Element_Offset=(int32u)Title.size()+1+(int32u)Artist.size()+1+(int32u)Album.size()+1+(int32u)Unknown.size()+1+(int32u)Genre.size()+1+(int32u)Comment.size();
- Size-=(int32u)Comment.size();
- if (Size==0) return;
- Skip_L1( "Zero"); Size--; //NULL char
- Get_L4 (TrackPos, "Track_Position");
- if(Element_Offset+8<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- Element_Begin1("Footer");
- Skip_L4( "Size");
- Skip_C4( "Name");
- Element_End0();
-
- //Filling
- Fill(Stream_General, 0, General_Track, Title);
- Fill(Stream_General, 0, General_Performer, Artist);
- Fill(Stream_General, 0, General_Album, Album);
- Fill(Stream_General, 0, "Unknown", Unknown);
- Fill(Stream_General, 0, General_Genre, Genre);
- Fill(Stream_General, 0, General_Comment, Comment);
- Fill(Stream_General, 0, General_Track_Position, TrackPos);
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_RIFF_YES
-
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Rm.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Rm.cpp
deleted file mode 100644
index 5e14f4cbf..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Rm.cpp
+++ /dev/null
@@ -1,805 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_RM_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include <ZenLib/ZtringListList.h>
-#include <ZenLib/Utils.h>
-#include "MediaInfo/Multiple/File_Rm.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-// https://common.helixcommunity.org/2003/HCS_SDK_r5/htmfiles/rmff.htm
-// http://wiki.multimedia.cx/index.php?title=RealMedia
-
-//***************************************************************************
-// Const
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-namespace Elements
-{
- const int32u RMF=0x2E524D46;
- const int32u CONT=0x434F4E54;
- const int32u DATA=0x44415441;
- const int32u INDX=0x494E4458;
- const int32u MDPR=0x4D445052;
- const int32u PROP=0x50524F50;
- const int32u RJMD=0x524A4D44;
- const int32u RMJE=0x524D4A45;
- const int32u RMMD=0x524D4D44;
- const int32u TAG =0x54414700;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Rm::File_Rm()
-:File__Analyze()
-{
- //In
- FromMKV_StreamType=Stream_Max;
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Rm::FileHeader_Begin()
-{
- if (IsSub)
- return true;
-
- if (4>Buffer_Size)
- return false;
- if (Buffer[0]!=0x2E //".RMF"
- || Buffer[1]!=0x52
- || Buffer[2]!=0x4D
- || Buffer[3]!=0x46)
- {
- Reject();
- return false;
- }
-
- return true;
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Rm::Header_Parse()
-{
- //Specific case
- if (FromMKV_StreamType!=Stream_Max)
- {
- //Filling
- Header_Fill_Code(0, __T("Real Media Header"));
- Header_Fill_Size(Element_Size);
- return;
- }
-
- //Parsing
- int32u Name, Size;
- Get_C4 (Name, "Name");
-
- if (Name==Elements::RMMD)
- {
- Size=8; //Name + Size of the Metadata section (after Version) in bytes.
- }
- else if (Name==Elements::RJMD)
- {
- Skip_B4( "Version");
- Get_B4 (Size, "Size");
- Size+=8; //Name + Version + Size of the section (after Version) in bytes.
- if (Element_Size>=12)
- Element_Offset-=8; //Is valid, so we must keep Version and size in the stream
- }
- else if (Name==Elements::RMJE)
- {
- Size=12;
- }
- else if ((Name&0xFFFFFF00)==Elements::TAG)
- {
- Name=Elements::TAG;
- Element_Offset-=4;
- Size=0;
- }
- else
- {
- Get_B4 (Size, "Size");
- }
-
- //Filling
- Header_Fill_Code(Name, Ztring().From_CC4(Name));
- Header_Fill_Size(Size);
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::Data_Parse()
-{
- //Specific case
- if (FromMKV_StreamType!=Stream_Max)
- {
- switch (FromMKV_StreamType)
- {
- case Stream_Video : MDPR_realvideo(); break;
- case Stream_Audio : MDPR_realaudio(); break;
- default : ;
- }
-
- Finish("RealMedia");
- return;
- }
-
- //Parsing
- DATA_BEGIN
- ATOM( RMF)
- ATOM(CONT)
- LIST_SKIP(DATA)
- ATOM(INDX)
- ATOM(MDPR)
- ATOM(PROP)
- ATOM(RJMD)
- ATOM(RMJE)
- ATOM(RMMD)
- ATOM(TAG)
- DATA_END
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-#define NAME_VERSION(ELEMENT_NAME) \
- Element_Name(ELEMENT_NAME); \
- int16u Version; \
- { \
- Get_B2(Version, "ObjectVersion"); \
- } \
-
-#define INTEGRITY_VERSION(_VERSION) \
- if (Version>_VERSION) \
- { \
- Skip_XX(Element_Size-Element_Offset, "Data"); \
- return; \
- } \
-
-//---------------------------------------------------------------------------
-void File_Rm::RMF()
-{
- NAME_VERSION("Real Media Format");
- INTEGRITY_VERSION(1);
-
- //Parsing
- if (Element_Size==4)
- Skip_B2( "file_version"); //The version of the RealMedia file.
- else
- Skip_B4( "file_version"); //The version of the RealMedia file.
- Skip_B4( "num_headers"); //The number of headers in the header section that follow the RealMedia File Header.
-
- //Filling
- Accept("RealMedia");
- Fill(Stream_General, 0, General_Format, "RealMedia");
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::CONT()
-{
- NAME_VERSION("Content");
- INTEGRITY_VERSION(0);
-
- //Parsing
- Ztring title, author, copyright, comment;
- int16u title_len, author_len, copyright_len, comment_len;
- Get_B2 (title_len, "title_len"); //The length of the title data in bytes.
- Get_Local(title_len, title, "title"); //An array of ASCII characters that represents the title information for the RealMedia file.
- Get_B2 (author_len, "author_len"); //The length of the author data in bytes.
- Get_Local(author_len, author, "author"); //An array of ASCII characters that represents the author information for the RealMedia file.
- Get_B2 (copyright_len, "copyright_len"); //The length of the copyright data in bytes.
- Get_Local(copyright_len, copyright, "copyright"); //An array of ASCII characters that represents the copyright information for the RealMedia file.
- Get_B2 (comment_len, "comment_len"); //The length of the comment data in bytes.
- Get_Local(comment_len, comment, "comment"); //An array of ASCII characters that represents the comment information for the RealMedia file.
-
- //Filling
- Fill(Stream_General, 0, General_Title, title);
- Fill(Stream_General, 0, General_Performer, author);
- Fill(Stream_General, 0, General_Copyright, copyright);
- Fill(Stream_General, 0, General_Comment, comment);
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::DATA()
-{
- NAME_VERSION("Data");
-
- //Currently, we stop here, enough info
- Finish("RealMedia");
- return;
-
- /*
- //Parsing
- int32u num_packets;
- int16u length;
- int8u flags;
- Get_B4 (num_packets, "num_packets"); //Number of packets in the data chunk.
- Skip_B4( "next_data_header"); //Offset from start of file to the next data chunk. A non-zero value refers to the file offset of the next data chunk. A value of zero means there are no more data chunks in this file. This field is not typically used.
- for (int32u Pos=0; Pos<num_packets; Pos++)
- {
- Element_Begin1("packet");
- Get_B2 (Version, "object_version");
- INTEGRITY_VERSION(1);
- Get_B2 (length, "length"); //The length of the packet in bytes.
- if (Version==0)
- Element_Info1("Media_Packet_Header");
- else
- Element_Info1("Media_Packet_Header");
- Skip_B2( "stream_number"); //The 16-bit alias used to associate data packets with their associated Media Properties Header.
- Skip_B4( "timestamp"); //The time stamp of the packet in milliseconds.
- if (Version==0)
- {
- Skip_B1( "packet_group"); //The packet group to which the packet belongs. If packet grouping is not used, set this field to 0 (zero).
- Get_B1 (flags, "flags"); //Flags describing the properties of the packet.
- Skip_Flags(flags, 0, "reliable"); //If this flag is set, the packet is delivered reliably.
- Skip_Flags(flags, 1, "keyframe"); //If this flag is set, the packet is part of a key frame or in some way marks a boundary in your data stream.
- }
- if (Version==1)
- {
- Skip_B2( "asm_rule"); //The ASM rule assigned to this packet.
- Skip_B1( "asm_Flags"); //Contains HX_ flags that dictate stream switching points.
- }
- if (Version==0)
- Skip_XX(length-12, "data");
- else
- Skip_XX(length-13, "data");
-
- //Stopping if too far
- if (Pos>10)
- {
- Pos=num_packets;
- Element_Info1("(...)");
- }
-
- Element_End0();
- }
- */
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::INDX()
-{
- NAME_VERSION("INDeX");
-
- //Parsing
- int32u num_indices;
- Get_B4 (num_indices, "num_indices"); //Number of index records in the index chunk.
- Skip_B2( "stream_number"); //The stream number for which the index records in this index chunk are associated.
- Skip_B4( "next_index_header"); //Offset from start of file to the next index chunk. This member enables RealMedia file format readers to find all the index chunks quickly. A value of zero for this member indicates there are no more index headers in this file.
- for (int32u Pos=0; Pos<num_indices; Pos++)
- {
- Element_Begin1("index");
- Get_B2 (Version, "object_version");
- INTEGRITY_VERSION(0);
- Element_Info1("Media_Packet_Header");
- Skip_B4( "timestamp"); //The time stamp (in milliseconds) associated with this record.
- Skip_B4( "offset"); //The offset from the start of the file at which this packet can be found.
- Skip_B4( "packet_count_for_this_packet"); //The packet number of the packet for this record. This is the same number of packets that would have been seen had the file been played from the beginning to this point.
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::MDPR()
-{
- NAME_VERSION("MeDia PRoperties");
- INTEGRITY_VERSION(0);
-
- //Parsing
- Ztring stream_name;
- std::string mime_type;
- int32u avg_bit_rate, start_time, duration, type_specific_len;
- int16u stream_number;
- int8u stream_name_size, mime_type_size;
- Get_B2 (stream_number, "stream_number"); //Unique value that identifies a physical stream
- Skip_B4( "max_bit_rate"); //The maximum bit rate required to deliver this stream over a network.
- Get_B4 (avg_bit_rate, "avg_bit_rate"); //The average bit rate required to deliver this stream over a network.
- Skip_B4( "max_packet_size"); //The largest packet size (in bytes) in the stream of media data.
- Skip_B4( "avg_packet_size"); //The average packet size (in bytes) in the stream of media data.
- Get_B4 (start_time, "start_time"); //The time offset in milliseconds to add to the time stamp of each packet in a physical stream.
- Skip_B4( "preroll"); //The time offset in milliseconds to subtract from the time stamp of each packet in a physical stream.
- Get_B4 (duration, "duration"); //The duration of the stream in milliseconds.
- Get_B1 (stream_name_size, "stream_name_size"); //The length of the following stream_name member in bytes.
- Get_Local(stream_name_size, stream_name, "stream_name"); //A nonunique alias or name for the stream.
- Get_B1 (mime_type_size, "mime_type_size"); //The length of the following mime_type field in bytes.
- Get_String(mime_type_size, mime_type, "mime_type"); //A nonunique MIME style type/subtype string for data associated with the stream.
- Get_B4 (type_specific_len, "type_specific_len"); //The length of the following type_specific_data in bytes
-
- //Parsing TypeSpecific
- Element_Info1(mime_type.c_str());
- MDPR_IsStream=true;
- if (mime_type=="audio/x-pn-multirate-realaudio")
- MDPR_IsStream=false; //What do we with this?
- else if (mime_type=="audio/X-MP3-draft-00")
- {
- Stream_Prepare(Stream_Audio);
- CodecID_Fill(Ztring(mime_type.c_str()), Stream_Audio, StreamPos_Last, InfoCodecID_Format_Real);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, "MPEG1AL3");
- }
- else if (mime_type=="audio/x-pn-realaudio")
- MDPR_realaudio();
- else if (mime_type=="audio/x-pn-realaudio-encrypted")
- {
- MDPR_realaudio();
- Fill(Stream_Audio, StreamPos_Last, Audio_Encryption, "Y");
- }
- else if (mime_type=="audio/x-ralf-mpeg4")
- {
- Stream_Prepare(Stream_Audio);
- CodecID_Fill(Ztring(mime_type.c_str()), Stream_Audio, StreamPos_Last, InfoCodecID_Format_Real);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, "ralf");
- }
- else if (mime_type=="audio/x-ralf-mpeg4-generic")
- {
- Stream_Prepare(Stream_Audio);
- CodecID_Fill(Ztring(mime_type.c_str()), Stream_Audio, StreamPos_Last, InfoCodecID_Format_Real);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, "ralf");
- }
- else if (mime_type.find("audio/")==0)
- Stream_Prepare(Stream_Audio);
- else if (mime_type=="video/text")
- Stream_Prepare(Stream_Text);
- else if (mime_type=="video/x-pn-multirate-realvideo")
- MDPR_IsStream=false; //What do we with this?
- else if (mime_type=="video/x-pn-realvideo")
- MDPR_realvideo();
- else if (mime_type=="video/x-pn-realvideo-encrypted")
- {
- MDPR_realvideo();
- Fill(Stream_Video, StreamPos_Last, Video_Encryption, "Y");
- }
- else if (mime_type.find("video/")==0)
- Stream_Prepare(Stream_Video);
- else if (mime_type=="logical-audio/x-pn-multirate-realaudio")
- MDPR_IsStream=false; //What do we with this?
- else if (mime_type.find("logical-audio/")==0)
- MDPR_IsStream=false; //What do we with this?
- else if (mime_type=="logical-fileinfo")
- MDPR_fileinfo();
- //else if (mime_type=="logical-video/x-pn-multirate-realvideo")
- // MDPR_IsStream=false; //What do we with this?
- //else if (mime_type.find("logical-video/")==0)
- // MDPR_IsStream=false; //What do we with this?
- else
- MDPR_IsStream=false;
-
- //Filling
- FILLING_BEGIN();
- if (MDPR_IsStream)
- {
- Fill(StreamKind_Last, StreamPos_Last, General_ID, stream_number);
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_BitRate), avg_bit_rate, 10, true);
- //Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay), start_time);
- //Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Delay_Source), "Container");
- Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Duration), duration);
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::MDPR_realvideo()
-{
- //Parsing
- int32u Codec;
- int16u Width, Height, FrameRate;
- Skip_B4( "Size");
- Skip_C4( "FCC");
- Get_C4 (Codec, "Compression");
- Get_B2 (Width, "Width");
- Get_B2 (Height, "Height");
- Skip_B2( "bpp"); //Do not use it
- Skip_B4( "Unknown");
- Get_B2 (FrameRate, "fps");
- Skip_B2( "Unknown");
- Skip_C4( "Type1");
- Skip_C4( "Type2");
-
- //Filling
- if (!Status[IsAccepted])
- Accept("RealMedia"); //Is subs
-
- Stream_Prepare(Stream_Video);
- if (FromMKV_StreamType==Stream_Max) //Using the one from the container
- CodecID_Fill(Ztring().From_CC4(Codec), Stream_Video, StreamPos_Last, InfoCodecID_Format_Real);
- Fill(Stream_Video, StreamPos_Last, Video_Codec, Ztring().From_CC4(Codec));
- Fill(Stream_Video, StreamPos_Last, Video_Width, Width); //Width
- Fill(Stream_Video, StreamPos_Last, Video_Height, Height); //Height
- switch (FrameRate)
- {
- case 23 : Fill(Stream_Video, StreamPos_Last, Video_FrameRate, ((float)24)*1000/1001); break; //Hard-coded frame rate?
- case 29 : Fill(Stream_Video, StreamPos_Last, Video_FrameRate, ((float)30)*1000/1001); break; //Hard-coded frame rate?
- default : Fill(Stream_Video, StreamPos_Last, Video_FrameRate, (float)FrameRate);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::MDPR_realaudio()
-{
- //Parsing
- Ztring FourCC3="lpcJ"; //description of this codec : http://focus.ti.com/lit/an/spra136/spra136.pdf http://en.wikipedia.org/wiki/VSELP
- Ztring FourCC4;
- int32u FourCC5=0, BytesPerMinute=0;
- int16u Version, Samplerate=8000, Samplesize=16, Channels=0;
- Skip_C4( "Header signature");
- Get_B2 (Version, "Version");
- INTEGRITY_VERSION(5);
- if (Version==3)
- {
- Ztring title, author, copyright, comment;
- int32u length;
- int8u title_len, author_len, copyright_len, comment_len;
- Skip_B2( "Header size"); //Header size, after this tag.
- Get_B2 (Channels, "Channels");
- Skip_B4( "Uknown");
- Skip_B4( "Uknown");
- Skip_B4( "Data size");
- Get_B1 (title_len, "title_len"); //The length of the title data in bytes.
- Get_Local(title_len, title, "title"); //An array of ASCII characters that represents the title information for the RealMedia file.
- Get_B1 (author_len, "author_len"); //The length of the author data in bytes.
- Get_Local(author_len, author, "author"); //An array of ASCII characters that represents the author information for the RealMedia file.
- Get_B1 (copyright_len, "copyright_len"); //The length of the copyright data in bytes.
- Get_Local(copyright_len, copyright, "copyright"); //An array of ASCII characters that represents the copyright information for the RealMedia file.
- Get_B1 (comment_len, "comment_len"); //The length of the comment data in bytes.
- Get_Local(comment_len, comment, "comment"); //An array of ASCII characters that represents the comment information for the RealMedia file.
- if (Element_Offset<Element_Size) //Optional
- {
- Skip_B1( "Uknown");
- Get_B4 (length, "Fourcc string length");
- Get_Local(length, FourCC3, "Fourcc string");
- }
-
- //Filling
- Fill(Stream_General, 0, General_Duration, title);
- Fill(Stream_General, 0, General_Performer, author);
- Fill(Stream_General, 0, General_Copyright, copyright);
- Fill(Stream_General, 0, General_Comment, comment);
- }
- if (Version==4 || Version==5)
- {
- Skip_B2( "Unused");
- Skip_C4( "ra signature");
- Skip_B4( "AudioFileSize");
- Skip_B2( "Version2");
- Skip_B4( "Header size");
- Skip_B2( "Codec flavor");
- Skip_B4( "Coded frame size");
- Skip_B4( "AudioBytes");
- Get_B4 (BytesPerMinute, "BytesPerMinute");
- Skip_B4( "Unknown");
- Skip_B2( "Sub packet h");
- Skip_B2( "Frame size");
- Skip_B2( "Subpacket size");
- Skip_B2( "Unknown");
- }
- if (Version==5)
- {
- Skip_B2( "Unknown");
- Skip_B2( "Unknown");
- Skip_B2( "Unknown");
- }
- if (Version==4 || Version==5)
- {
- Get_B2 (Samplerate, "Samplerate");
- Skip_B2( "Unknown");
- Get_B2 (Samplesize, "Samplesize");
- Get_B2 (Channels, "Channels");
- }
- if (Version==4)
- {
- int8u length;
- Get_B1 (length, "Interleaver ID string lengt");
- Skip_Local(length, "Interleaver ID string");
- Get_B1 (length, "FourCC string lengt");
- Get_Local(length, FourCC4, "FourCC string");
- }
- if (Version==5)
- {
- Skip_C4( "Interleaver ID");
- Get_C4 (FourCC5, "FourCC");
- }
- if (Version==4 || Version==5)
- {
- Skip_B1( "Unknown");
- Skip_B1( "Unknown");
- Skip_B1( "Unknown");
- }
- if (Version==5)
- {
- Skip_B1( "Unknown");
- }
- if (Version==4 || Version==5)
- {
- int32u length;
- Get_B4 (length, "Codec extradata length");
- Skip_XX(length, "Codec extradata");
- }
-
- //Filling
- if (!Status[IsAccepted])
- Accept("RealMedia"); //Is subs
-
- Stream_Prepare(Stream_Audio);
- if (Version==3)
- {
- if (FromMKV_StreamType==Stream_Max) //Using the one from the container
- CodecID_Fill(FourCC3, Stream_Audio, StreamPos_Last, InfoCodecID_Format_Real);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, FourCC3);
- }
- if (Version==4)
- {
- if (FromMKV_StreamType==Stream_Max) //Using the one from the container
- CodecID_Fill(FourCC4, Stream_Audio, StreamPos_Last, InfoCodecID_Format_Real);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, FourCC4);
- }
- if (Version==5)
- {
- if (FromMKV_StreamType==Stream_Max) //Using the one from the container
- CodecID_Fill(Ztring().From_CC4(FourCC5), Stream_Audio, StreamPos_Last, InfoCodecID_Format_Real);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Ztring().From_CC4(FourCC5));
- }
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, Samplerate);
- Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, Samplesize);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Channels);
- if (BytesPerMinute)
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate, BytesPerMinute*8/60, 10, true);
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::MDPR_fileinfo()
-{
- MDPR_IsStream=false;
-
- //Parsing
- int16u Version, num_physical_streams, num_rules, num_properties;
- Skip_B4( "size");
- Get_B2 (Version, "object_version");
- INTEGRITY_VERSION(0);
- Get_B2 (num_physical_streams, "num_physical_streams"); //The number of physical streams that make up this logical stream.
- for (int16u Pos=0; Pos<num_physical_streams; Pos++)
- {
- Skip_B2( "physical_stream_numbers"); //The list of physical stream numbers that comprise this logical stream.
- Skip_B4( "data_offsets"); //The list of data offsets indicating the start of the data section for each physical stream.
- }
- Get_B2 (num_rules, "num_rules"); //The number of ASM rules for the logical stream. Each physical stream in the logical stream has at least one ASM rule associated with it or it will never get played. The mapping of ASM rule numbers to physical stream numbers is stored in a list immediately following this member. These physical stream numbers refer to the stream_number field found in the Media Properties Object for each physical stream belonging to this logical stream.
- for (int16u Pos=0; Pos<num_physical_streams; Pos++)
- Skip_B2( "rule_to_physical_stream_number_map"); //The list of physical stream numbers that map to each rule. Each entry in the map corresponds to a 0-based rule number. The value in each entry is set to the physical stream number for the rule.
- Get_B2 (num_properties, "num_properties"); //The number of NameValueProperty structures contained in this structure. These name/value structures can be used to identify properties of this logical stream (for example, language).
-
- //Parsing
- for (int16u Pos=0; Pos<num_properties; Pos++)
- {
- Element_Begin1("property");
- std::string name;
- int32u size, type;
- int16u value_length;
- int8u name_length;
- Peek_B4(size);
- Skip_B4( "size");
- Skip_B2( "object_version");
- Get_B1 (name_length, "name_length"); //The length of the name data.
- Get_String(name_length, name, "name"); //The name string data.
- Get_B4 (type, "type"); //The type of the value data.
- Get_B2 (value_length, "value_length"); //value_length
- switch (type)
- {
- case 0 : //Unsigned integer
- Skip_B4( "value_data"); break; //unsigned integer
- case 2 : //String
- Skip_Local(value_length, "value_data"); break; //string
- default : Skip_XX(value_length, "unknown");
- }
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::PROP()
-{
- NAME_VERSION("PROPerties");
- INTEGRITY_VERSION(0);
-
- //Parsing
- int32u avg_bit_rate, duration;
- int16u flags;
- Skip_B4( "max_bit_rate"); //The maximum bit rate required to deliver this file over a network.
- Get_B4 (avg_bit_rate, "avg_bit_rate"); //The average bit rate required to deliver this file over a network.
- Skip_B4( "max_packet_size"); //The largest packet size (in bytes) in the media data.
- Skip_B4( "avg_packet_size"); //The average packet size (in bytes) in the media data.
- Skip_B4( "num_packets"); //The number of packets in the media data.
- Get_B4 (duration, "duration"); //The duration of the file in milliseconds.
- Skip_B4( "preroll"); //The number of milliseconds to prebuffer before starting playback.
- Skip_B4( "index_offset"); //The offset in bytes from the start of the file to the start of the index header object.
- Skip_B4( "data_offset"); //The offset in bytes from the start of the file to the start of the Data Section. \n Note: There can be a number of Data_Chunk_Headers in a RealMedia file. The data_offset value specifies the offset in bytes to the first Data_Chunk_Header. The offsets to the other Data_Chunk_Headers can be derived from the next_data_header field in a Data_Chunk_Header.
- Skip_B2( "num_streams"); //The total number of media properties headers in the main headers section.
- Get_B2 (flags, "flags"); //Bit mask containing information about this file.
- Skip_Flags(flags, 0, "Save_Enabled"); //If 1, clients are allowed to save this file to disk.
- Skip_Flags(flags, 1, "Perfect_Play"); //If 1, clients are instructed to use extra buffering.
- Skip_Flags(flags, 2, "Live_Broadcast"); //If 1, these streams are from a live broadcast.
- Skip_Flags(flags, 3, "Allow_Download");
-
- //Filling
- Fill(Stream_General, 0, General_OverallBitRate, avg_bit_rate);
- Fill(Stream_General, 0, General_Duration, duration);
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::RJMD()
-{
- Element_Name("Metadata Tag");
-
- //Parsing
- Skip_B4( "object_version");
-
- //Parsing
- RJMD_property(std::string());
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::RJMD_property(std::string Name)
-{
- //Element_Name("Property");
-
- //Parsing
- Ztring value;
- std::string name;
- int32u type, flags, num_subproperties, name_length, value_length;
- Element_Begin1("MetadataProperty");
- Skip_B4( "size");
- Get_B4 (type, "type");
- Get_B4 (flags, "flags");
- Skip_Flags(flags, 0, "readonly"); //Read only, cannot be modified.
- Skip_Flags(flags, 1, "private"); //Private, do not expose to users.
- Skip_Flags(flags, 2, "type_dexcriptor"); //Type descriptor used to further define type of value.
- Skip_B4( "value_offset"); //The offset to the value_length , relative to the beginning of the MetadataProperty structure.
- Skip_B4( "subproperties_offset"); //The offset to the subproperties_list , relative to the beginning of the MetadataProperty structure.
- Get_B4 (num_subproperties, "num_subproperties"); //The number of subproperties for this MetadataProperty structure.
- Get_B4 (name_length, "name_length"); //The length of the name data, including the null-terminator.
- Get_String(name_length, name, "name"); //The name of the property (string data).
- Get_B4 (value_length, "value_length"); //The length of the value data.
- switch(type)
- {
- case 0x00 : //Nothing
- Skip_XX(value_length, "Junk");
- break;
- case 0x01 : //String (text).
- Get_Local(value_length, value, "value"); //String.
- break;
- case 0x02 : //Separated list of strings, separator specified as sub-property/type descriptor.
- Get_Local(value_length, value, "value"); //String.
- break;
- case 0x03 : //Boolean flag—either 1 byte or 4 bytes, check size value.
- switch(value_length)
- {
- case 1 : {
- int8u valueI;
- Get_L1(valueI, "value"); //1-byte boolean.
- value.From_Number(valueI);
- }
- break;
- case 4 : {
- int32u valueI;
- Get_L4(valueI, "value"); //4-byte boolean.
- value.From_Number(valueI);
- }
- break;
- default: Skip_XX(value_length, "Unknown");
- }
- break;
- case 0x04 : //Four-byte integer.
- {
- int32u valueI;
- Get_L4(valueI, "value");
- value.From_Number(valueI);
- }
- break;
- case 0x05 : //Byte stream.
- Skip_XX(value_length, "Byte stream");
- break;
- case 0x06 : //String (URL).
- Get_Local(value_length, value, "value"); //String.
- break;
- case 0x07 : //String representation of the date in the form: YYYYmmDDHHMMSS (m = month, M = minutes).
- Get_Local(value_length, value, "value"); //String.
- break;
- case 0x08 : //String (file name)
- Get_Local(value_length, value, "value"); //String.
- break;
- case 0x09 : //This property has subproperties, but its own value is empty.
- Skip_XX(value_length, "junk");
- break;
- case 0x0A : //Large buffer of data, use sub-properties/type descriptors to identify mime-type.
- Skip_XX(value_length, "data");
- break;
- default : //Unknown
- Skip_XX(value_length, "unknown");
- break;
- }
-
- //Filling
- if (!Name.empty())
- Name+='/';
- Name+=name;
- if (Name!="Track/Comments/DataSize"
- && Name!="Track/Comments/MimeType"
- )
- Fill(Stream_General, 0, Name.c_str(), value);
-
- //Parsing
- for (int32u Pos=0; Pos<num_subproperties; Pos++)
- {
- Element_Begin1("PropListEntry");
- Skip_B4( "offset"); //The offset for this indexed sub-property, relative to the beginning of the containing MetadataProperty.
- Skip_B4( "num_props_for_name"); //The number of sub-properties that share the same name. For example, a lyrics property could have multiple versions as differentiated by the language sub-property type descriptor.
- Element_End0();
- }
- for (int32u Pos=0; Pos<num_subproperties; Pos++)
- {
- RJMD_property(Name);
- }
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::RMJE()
-{
- Element_Name("Metadata Section Footer");
-
- //Parsing
- Skip_B4( "object_version");
- Skip_B4( "size"); //The size of the preceding metadata tag.
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::RMMD()
-{
- Element_Name("Metadata Section Header");
-
- //Parsing
- Skip_B4( "size"); //The size of the full metadata section in bytes.
-}
-
-//---------------------------------------------------------------------------
-void File_Rm::TAG()
-{
- Element_Name("Id3v1 Tag");
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_RM_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Rm.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Rm.h
deleted file mode 100644
index feaf4ec2c..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Rm.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Real Media files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_RmH
-#define MediaInfo_File_RmH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Classe File_Rm
-//***************************************************************************
-
-class File_Rm : public File__Analyze
-{
-public :
- //In
- stream_t FromMKV_StreamType;
-
-public :
- File_Rm();
-
-private :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void RMF();
- void CONT();
- void DATA();
- void INDX();
- void MDPR();
- void MDPR_realvideo();
- void MDPR_realaudio();
- void MDPR_fileinfo();
- void PROP();
- void RJMD();
- void RJMD_property(std::string Name);
- void RMJE();
- void RMMD();
- void TAG ();
-
- //Temp
- bool MDPR_IsStream;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_SequenceInfo.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_SequenceInfo.cpp
deleted file mode 100644
index bc9727e8b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_SequenceInfo.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_SEQUENCEINFO_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_SequenceInfo.h"
-#include "MediaInfo/MediaInfo.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#include "ZenLib/File.h"
-#include "ZenLib/Dir.h"
-#include "ZenLib/FileName.h"
-#include "ZenLib/Format/Http/Http_Utils.h"
-#include "tinyxml2.h"
-using namespace tinyxml2;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_SequenceInfo::File_SequenceInfo()
-:File__Analyze()
-{
- #if MEDIAINFO_DEMUX
- Demux_EventWasSent_Accept_Specific=true;
- #endif //MEDIAINFO_DEMUX
-
- //Temp
- ReferenceFiles=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_SequenceInfo::~File_SequenceInfo()
-{
- delete ReferenceFiles; //ReferenceFiles=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_SequenceInfo::Streams_Finish()
-{
- if (ReferenceFiles==NULL)
- return;
-
- ReferenceFiles->ParseReferences();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_SequenceInfo::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- if (ReferenceFiles==NULL)
- return 0;
-
- return ReferenceFiles->Seek(Method, Value, ID);
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_SequenceInfo::FileHeader_Begin()
-{
- XMLDocument document;
- if (!FileHeader_Begin_XML(document))
- return false;
-
- {
- XMLElement* Root=document.FirstChildElement("SEQUENCEINFO");
- if (Root)
- {
- Accept("SequenceInfo");
- Fill(Stream_General, 0, General_Format, "SequenceInfo");
-
- ReferenceFiles=new File__ReferenceFilesHelper(this, Config);
-
- sequence* Sequence=new sequence;
- Sequence->StreamKind=Stream_Video;
-
- FileName FN(File_Name);
- Ztring Base=FN.Path_Get();
- size_t Pos=Base.rfind(PathSeparator);
- if (Pos!=string::npos)
- {
- Ztring ToAdd=Base.substr(Pos, string::npos);
- Ztring DirectoryBase=Base;
- DirectoryBase+=ToAdd;
- DirectoryBase+=__T('_');
-
- size_t DirNumberCount=1;
- Ztring Directory=DirectoryBase;
- for (; DirNumberCount<9; DirNumberCount++)
- {
- Directory+=__T('0');
- if (Dir::Exists(Directory))
- break;
- }
-
- if (DirNumberCount<9)
- {
- int32u DirNumber=0;
- do
- {
- Ztring Number=Ztring::ToZtring(DirNumber);
- if (Number.size()<DirNumberCount)
- Number.insert(0, DirNumberCount-Number.size(), __T('0'));
-
- Directory=DirectoryBase;
- Directory+=Number;
- if (!Dir::Exists(Directory))
- break;
-
- Ztring FileBase=Directory;
- FileBase+=ToAdd;
- FileBase+=__T('_');
- FileBase+=__T('.');
-
- size_t FileNumberCount=1;
- Ztring FullFile=FileBase;
- Ztring Extension;
- for (; FileNumberCount<10; FileNumberCount++)
- {
- FullFile.insert(FullFile.begin()+FullFile.size()-Extension.size()-1, __T('0'));
- if (Extension.empty())
- {
- ZtringList List=Dir::GetAllFileNames(FullFile+__T('*'));
- if (List.size()>=2)
- {
- FileNumberCount=(size_t)-1; //Problem, which one to choose?
- break;
- }
- else if (List.size()==1)
- {
- FileName Temp(List[0]);
- Extension=Temp.Extension_Get();
- FileBase+=Extension;
- FullFile=FileBase;
- break;
- }
- }
- else if (File::Exists(FullFile))
- break;
- }
- bool FromZero=true;
- if (FileNumberCount>=9)
- {
- //Trying with consecutive file numbers betweens dirs
- Number=Ztring::ToZtring(Sequence->FileNames.size());
- FullFile=FileBase;
- FullFile.insert(FullFile.size()-Extension.size()-1, Number);
- FileNumberCount=Number.size();
- if (!File::Exists(FullFile))
- {
- FileNumberCount++;
- for (; FileNumberCount<10; FileNumberCount++)
- {
- FullFile.insert(FullFile.begin()+FullFile.size()-Extension.size()-Number.size()-1, __T('0'));
- if (File::Exists(FullFile))
- {
- FromZero=false;
- break;
- }
- }
- }
- else
- FromZero=false;
- }
-
- if (FileNumberCount<9)
- {
- size_t FileNumber=FromZero?0:Sequence->FileNames.size();
- do
- {
- Number=Ztring::ToZtring(FileNumber);
- if (Number.size()<FileNumberCount)
- Number.insert(0, FileNumberCount-Number.size(), __T('0'));
-
- FullFile=FileBase;
- FullFile.insert(FullFile.size()-Extension.size()-1, Number);
- if (!File::Exists(FullFile))
- break;
-
- Sequence->AddFileName(FullFile);
-
- FileNumber++;
- }
- while (FileNumber<1000000000);
- }
-
- DirNumber++;
- }
- while (DirNumber<1000000000);
-
- ReferenceFiles->AddSequence(Sequence);
- }
- }
- }
- else
- {
- Reject("SequenceInfo");
- return false;
- }
- }
-
- Element_Offset=File_Size;
-
- //All should be OK...
- return true;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_SEQUENCEINFO_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_SequenceInfo.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_SequenceInfo.h
deleted file mode 100644
index 09e05059d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_SequenceInfo.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about XML files starting with SEQUENCEINFO
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_SequenceInfoH
-#define MediaInfo_File_SequenceInfoH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-
-//***************************************************************************
-// Class File_SequenceInfo
-//***************************************************************************
-
-class File_SequenceInfo : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_SequenceInfo();
- ~File_SequenceInfo();
-
-private :
- //Streams management
- void Streams_Finish ();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Temp
- File__ReferenceFilesHelper* ReferenceFiles;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Skm.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Skm.cpp
deleted file mode 100644
index 43253dd4e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Skm.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_SKM_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Skm.h"
-#if defined(MEDIAINFO_MPEG4V_YES)
- #include "MediaInfo/Video/File_Mpeg4v.h"
-#endif
-#include "ZenLib/Utils.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Skm::File_Skm()
-:File__Analyze()
-{
- //Configuration
- MustSynchronize=true;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Skm::Streams_Finish()
-{
- if (Stream.Parser)
- {
- Finish(Stream.Parser);
- Merge(*Stream.Parser);
- }
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Skm::FileHeader_Begin()
-{
- if (Buffer_Size<5)
- return false;
- if (CC5(Buffer)!=0x444D534B4DLL) //DMSKM
- {
- Reject("SKM");
- return false;
- }
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Skm::FileHeader_Parse()
-{
- Skip_C5( "Signature");
-
- FILLING_BEGIN();
- Accept("SKM");
-
- Fill(Stream_General, 0, General_Format, "SKM");
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Skm::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+3>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (CC3(Buffer+Buffer_Offset)!=0x000001)
- Synched=false;
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Skm::Header_Parse()
-{
- //Parsing
- int32u BodyLength;
- int8u Type;
- Skip_B4( "PreviousTagSize");
- if (File_Offset+Buffer_Offset+4<File_Size)
- {
- Get_B1 (Type, "Type"); //Param_Info1(Type<19?Flv_Type[Type]:__T("Unknown"));
- Get_B3 (BodyLength, "BodyLength");
- Skip_B3( "Timestamp_Base"); //in ms
- Skip_B1( "Timestamp_Extended"); //TimeStamp = Timestamp_Extended*0x01000000+Timestamp_Base
- Skip_B3( "StreamID");
- }
- else
- {
- Type=0;
- BodyLength=0;
- }
-
- //Filling
- Header_Fill_Code(Type, Ztring().From_Number(Type, 16));
- Header_Fill_Size(Element_Offset+BodyLength);
-}
-
-//---------------------------------------------------------------------------
-bool File_Skm::Header_Parse_Fill_Size()
-{
- //Look for next Sync word
- if (Buffer_Offset_Temp==0) //Buffer_Offset_Temp is not 0 if Header_Parse_Fill_Size() has already parsed first frames
- Buffer_Offset_Temp=Buffer_Offset+4;
- while (Buffer_Offset_Temp+4<=Buffer_Size
- && CC3(Buffer+Buffer_Offset_Temp)!=0x000001)
- {
- Buffer_Offset_Temp+=2;
- while(Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp]!=0x00)
- Buffer_Offset_Temp+=2;
- if (Buffer[Buffer_Offset_Temp-1]==0x00)
- Buffer_Offset_Temp--;
- }
-
- //Must wait more data?
- if (Buffer_Offset_Temp+4>Buffer_Size)
- {
- if (File_Offset+Buffer_Size==File_Size)
- Buffer_Offset_Temp=Buffer_Size; //We are sure that the next bytes are a start
- else
- return false;
- }
-
- //OK, we continue
- Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
- Buffer_Offset_Temp=0;
- return true;
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Skm::Data_Parse()
-{
- #if defined(MEDIAINFO_MPEG4V_YES)
- Stream.Parser=new File_Mpeg4v();
- ((File_Mpeg4v*)Stream.Parser)->FrameIsAlwaysComplete=true;
- ((File_Mpeg4v*)Stream.Parser)->OnlyVOP();
- Open_Buffer_Init(Stream.Parser);
- Open_Buffer_Continue(Stream.Parser);
- Finish("SKM");
- #endif
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_SKM_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Skm.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Skm.h
deleted file mode 100644
index eee178596..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Skm.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about SKM (Korean mobilphoner) files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_SkmH
-#define MediaInfo_File_SkmH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Skm
-//***************************************************************************
-
-class File_Skm : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Skm();
-
-private :
- //Streams management
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Synchro
- bool Synchronize() {return Synchronize_0x000001();}
- bool Synched_Test();
-
- //Buffer - Per element
- void Header_Parse();
- bool Header_Parse_Fill_Size();
- void Data_Parse();
-
- //Streams
- struct stream
- {
- File__Analyze* Parser;
-
- stream()
- {
- Parser=NULL;
- }
-
- ~stream()
- {
- delete Parser; //Parser=NULL;
- }
- };
- stream Stream;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Swf.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Swf.cpp
deleted file mode 100644
index cc616ef4c..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Swf.cpp
+++ /dev/null
@@ -1,694 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_SWF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Swf.h"
-#include <zlib.h>
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const int8u Swf_SoundType[]=
-{
- 1,
- 2,
-};
-
-//---------------------------------------------------------------------------
-const int8u Swf_SoundSize[]=
-{
- 8,
- 16,
-};
-
-//---------------------------------------------------------------------------
-const int16u Swf_SoundRate[]=
-{
- 5500,
- 11025,
- 22050,
- 44100,
-};
-
-//---------------------------------------------------------------------------
-const char* Swf_Format_Audio[]=
-{
- "PCM",
- "ADPCM",
- "MPEG Audio",
- "PCM",
- "Nellymoser",
- "Nellymoser",
- "Nellymoser",
- "",
- "",
- "",
- "",
- "Speex",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Swf_Format_Version_Audio[]=
-{
- "",
- "",
- "Version 1",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Swf_Format_Profile_Audio[]=
-{
- "",
- "",
- "Layer 3",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Swf_SoundFormat[]=
-{
- "Uncompressed",
- "SWF ADPCM",
- "MPEG-1L3",
- "Uncompressed Little Endian",
- "",
- "",
- "Nellymoser",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Swf_Format_Video[]=
-{
- "",
- "",
- "H.263",
- "Screen video",
- "VP6",
- "VP6",
- "Screen video 2",
- "AVC",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Swf_Format_Profile_Video[]=
-{
- "",
- "",
- "",
- "",
- "",
- "Alpha channel",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Swf_Codec_Video[]=
-{
- "",
- "",
- "Sorenson H263",
- "Screen video",
- "On2 VP6",
- "On2 VP6 with alpha channel",
- "Screen video 2",
- "AVC",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-namespace Elements
-{
- const int16u End = 0; //V1+
- const int16u ShowFrame = 1; //V1+
- const int16u DefineShape = 2; //V1+
- const int16u PlaceObject = 4; //V1+
- const int16u RemoveObject = 5; //V1+
- const int16u DefineBits = 6; //V1+
- const int16u DefineButton = 7; //V1+
- const int16u JPEGTables = 8; //V1+
- const int16u SetBackgroundColor = 9; //V1+
- const int16u DefineFont = 10; //V1+
- const int16u DefineText = 11; //V1+
- const int16u DoAction = 12; //V3+
- const int16u DefineFontInfo = 13; //V1+
- const int16u DefineSound = 14; //V1+
- const int16u StartSound = 15; //V1+
- const int16u DefineButtonSound = 17; //V2+
- const int16u SoundStreamHead = 18; //V1+
- const int16u SoundStreamBlock = 19; //V1+
- const int16u DefineBitsLossless = 20; //V2+
- const int16u DefineBitsJPEG2 = 21; //V2+
- const int16u DefineShape2 = 22; //V2+
- const int16u DefineCxform = 23; //V2+
- const int16u Protect = 24; //V2+
- const int16u PlaceObject2 = 26; //V3+
- const int16u RemoveObject2 = 28; //V3+
- const int16u DefineShape3 = 32; //V3+
- const int16u DefineText2 = 33; //V3+
- const int16u DefineButton2 = 34; //V3+
- const int16u DefineBitsJPEG3 = 35; //V3+
- const int16u DefineBitsLossless2 = 36; //V3+
- const int16u DefineEditText = 37; //V4+
- const int16u DefineSprite = 39; //V3+
- const int16u FrameLabel = 43; //V3+
- const int16u SoundStreamHead2 = 45; //V3+
- const int16u DefineMorphShape = 46; //V3+
- const int16u DefineFont2 = 48; //V3+
- const int16u ExportAssets = 56; //V5+
- const int16u ImportAssets = 57; //V5+
- const int16u EnableDebugger = 58; //V5
- const int16u DoInitAction = 59; //V6+
- const int16u DefineVideoStream = 60; //V6+
- const int16u DefineVideoFrame = 61; //V6+
- const int16u DefineFontInfo2 = 62; //V6+
- const int16u EnableDebugger2 = 64; //V6+
- const int16u ScriptLimits = 65; //V6+
- const int16u SetTabIndex = 66; //V7+
- const int16u FileAttributes = 69; //V1+
- const int16u PlaceObject3 = 70; //V8+
- const int16u ImportAssets2 = 71; //V8+
- const int16u DefineFontAlignZones = 73; //V8+
- const int16u CSMTextSettings = 74; //V8+
- const int16u DefineFont3 = 75; //V8+
- const int16u SymbolClass = 76; //V9+
- const int16u Metadata = 77; //V1+
- const int16u DefineScalingGrid = 78; //V8+
- const int16u DoABC = 82; //V9+
- const int16u DefineShape4 = 83; //V8+
- const int16u DefineMorphShape2 = 84; //V8+
- const int16u DefineSceneAndFrameLabelData = 86; //V9+
- const int16u DefineBinaryData = 87; //V9+
- const int16u DefineFontName = 88; //V9+
- const int16u StartSound2 = 89; //V9+
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Swf::File_Swf()
-:File__Analyze()
-{
- //In
- Frame_Count_Valid=1024;
- FileLength=0;
- Version=0;
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Swf::FileHeader_Begin()
-{
- //Parsing
- if (Buffer_Size<8)
- return false;
-
- if (CC3(Buffer)!=0x435753) //CWS
- return true;
-
- //Compressed file
- if (File_Size>16*1024*1024)
- return true; //The file is too big, we will not parse all, only say this is SWF
- if (CC4(Buffer+4)<4*16*1024*1024) //FileLength
- return true; //The file is too big, we will not parse all, only say this is SWF
- Buffer_MaximumSize=(size_t)File_Size;
- if (Buffer_Size!=File_Size)
- return false;
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Swf::FileHeader_Parse()
-{
- //Parsing
- int32u Signature;
- if (FileLength==0 && Version==0)
- {
- Element_Begin1("SWF header");
- Get_C3 (Signature, "Signature");
- Get_L1 (Version, "Version");
- Get_L4 (FileLength, "FileLength");
- Element_End0();
- }
- else
- {
- //Was already done by compressed file handling
- Signature=0x465753;
- }
-
- //Compressed file handling
- if (Signature==0x435753) //CWS
- {
- Decompress();
- return;
- }
-
- //Parsing
- //Parsing - BitStream
- float32 FrameRate;
- int32u Xmin, Xmax, Ymin, Ymax;
- int16u FrameCount;
- int8u Nbits;
- BS_Begin();
- Get_S1 (5, Nbits, "Nbits");
- Get_BS (Nbits, Xmin, "Xmin");
- Get_BS (Nbits, Xmax, "Xmax"); Param_Info2((Xmax-Xmin)/20, " pixels");
- Get_BS (Nbits, Ymin, "Ymin");
- Get_BS (Nbits, Ymax, "Ymax"); Param_Info2((Ymax-Ymin)/20, " pixels");
- BS_End();
- if (Version<=7)
- {
- int8u FrameRate_8;
- Skip_L1( "Ignored");
- Get_L1 (FrameRate_8, "FrameRate");
- FrameRate=FrameRate_8;
- }
- else
- {
- int16u FrameRate_8_8;
- Get_L2(FrameRate_8_8, "FrameRate");
- FrameRate=((float32)FrameRate_8_8)/0x0100+(((float32)(FrameRate_8_8&0x00FF))/0x0100); //8.8 format
- Param_Info1(FrameRate);
- }
- Get_L2 (FrameCount, "FrameCount");
-
- FILLING_BEGIN();
- //Integrity
- if (Signature!=0x465753 && Signature!=0x435753) //FWS or CWS
- {
- Reject("SWF");
- return;
- }
-
- //Filling
- Accept("SWF");
-
- if (!IsSub)
- Fill(Stream_General, 0, General_Format, "ShockWave");
-
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Width, (Xmax-Xmin)/20);
- Fill(Stream_Video, 0, Video_Height, (Ymax-Ymin)/20);
- if (FrameRate)
- Fill(Stream_Video, 0, Video_FrameRate, FrameRate);
- if (FrameCount)
- Fill(Stream_Video, 0, Video_FrameCount, FrameCount);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Swf::Header_Parse()
-{
- //Parsing
- int16u TagCodeAndLength;
- Get_L2 (TagCodeAndLength, "TagCodeAndLength");
-
- //Filling
- int16u Tag=(TagCodeAndLength&0xFFC0)>>6; Param_Info1(Tag);
- Header_Fill_Code(Tag, Ztring().From_Number(Tag, 16));
-
- //Size
- int16u Length=TagCodeAndLength&0x003F;
- if (Length<0x003F)
- {
- Param_Info2(Length, " bytes");
-
- //Filling
- Header_Fill_Size(Element_Offset+Length);
- }
- else
- {
- int32u Length2;
- Get_L4(Length2, "Length"); Param_Info2(Length2, " bytes");
-
- //Filling
- Header_Fill_Size(Element_Offset+Length2);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Swf::Data_Parse()
-{
- #define LIS2(_ATOM, _NAME) \
- case Elements::_ATOM : \
- if (Level==Element_Level) \
- { \
- Element_Name(_NAME); \
- _ATOM(); \
- Element_ThisIsAList(); \
- } \
-
- #define ATO2(_ATOM, _NAME) \
- case Elements::_ATOM : \
- if (Level==Element_Level) \
- { \
- if (Element_IsComplete_Get()) \
- { \
- Element_Name(_NAME); \
- _ATOM(); \
- } \
- else \
- { \
- Element_WaitForMoreData(); \
- return; \
- } \
- } \
- break; \
-
- //Parsing
- DATA_BEGIN
- ATO2(End, "End");
- ATO2(ShowFrame, "ShowFrame");
- ATO2(DefineShape, "DefineShape");
- ATO2(PlaceObject, "PlaceObject");
- ATO2(RemoveObject, "RemoveObject");
- ATO2(DefineBits, "DefineBits");
- ATO2(DefineButton, "DefineButton");
- ATO2(JPEGTables, "JPEGTables");
- ATO2(SetBackgroundColor, "SetBackgroundColor");
- ATO2(DefineFont, "DefineFont");
- ATO2(DefineText, "DefineText");
- ATO2(DoAction, "DoAction");
- ATO2(DefineFontInfo, "DefineFontInfo");
- ATO2(DefineSound, "DefineSound");
- ATO2(StartSound, "StartSound");
- ATO2(DefineButtonSound, "DefineButtonSound");
- ATO2(SoundStreamHead, "SoundStreamHead");
- ATO2(SoundStreamBlock, "SoundStreamBlock");
- ATO2(DefineBitsLossless, "DefineBitsLossless");
- ATO2(DefineBitsJPEG2, "DefineBitsJPEG2");
- ATO2(DefineShape2, "DefineShape2");
- ATO2(DefineCxform, "DefineCxform");
- ATO2(Protect, "Protect");
- ATO2(PlaceObject2, "PlaceObject2");
- ATO2(RemoveObject2, "RemoveObject2");
- ATO2(DefineShape3, "DefineShape3");
- ATO2(DefineText2, "DefineText2");
- ATO2(DefineButton2, "DefineButton2");
- ATO2(DefineBitsJPEG3, "DefineBitsJPEG3");
- ATO2(DefineBitsLossless2, "DefineBitsLossless2");
- ATO2(DefineEditText, "DefineEditText");
- LIS2(DefineSprite, "DefineSprite");
- ATOM_BEGIN
- ATO2(ShowFrame, "ShowFrame");
- ATO2(PlaceObject, "PlaceObject");
- ATO2(RemoveObject, "RemoveObject");
- ATO2(StartSound, "StartSound");
- ATO2(SoundStreamHead, "SoundStreamHead");
- ATO2(SoundStreamBlock, "SoundStreamBlock");
- ATO2(PlaceObject2, "PlaceObject2");
- ATO2(RemoveObject2, "RemoveObject2");
- ATO2(FrameLabel, "FrameLabel");
- ATO2(SoundStreamHead2, "SoundStreamHead2");
- ATO2(End, "End");
- ATOM_END
- ATO2(FrameLabel, "FrameLabel");
- ATO2(DefineMorphShape, "DefineMorphShape");
- ATO2(SoundStreamHead2, "SoundStreamHead2");
- ATO2(DefineFont2, "DefineFont2");
- ATO2(ExportAssets, "ExportAssets");
- ATO2(ImportAssets, "ImportAssets");
- ATO2(EnableDebugger, "EnableDebugger");
- ATO2(DoInitAction, "DoInitAction");
- ATO2(DefineVideoStream, "DefineVideoStream");
- ATO2(DefineVideoFrame, "DefineVideoFrame");
- ATO2(DefineFontInfo2, "DefineFontInfo2");
- ATO2(EnableDebugger2, "EnableDebugger2");
- ATO2(ScriptLimits, "ScriptLimits");
- ATO2(SetTabIndex, "SetTabIndex");
- ATO2(FileAttributes, "FileAttributes");
- ATO2(PlaceObject3, "PlaceObject3");
- ATO2(ImportAssets2, "ImportAssets2");
- ATO2(DefineFontAlignZones, "DefineFontAlignZones");
- ATO2(CSMTextSettings, "CSMTextSettings");
- ATO2(DefineFont3, "DefineFont3");
- ATO2(SymbolClass, "SymbolClass");
- ATO2(Metadata, "Metadata");
- ATO2(DefineScalingGrid, "DefineScalingGrid");
- ATO2(DoABC, "DoABC");
- ATO2(DefineShape4, "DefineShape4");
- ATO2(DefineMorphShape2, "DefineMorphShape2");
- ATO2(DefineSceneAndFrameLabelData, "DefineSceneAndFrameLabelData");
- ATO2(DefineBinaryData, "DefineBinaryData");
- ATO2(DefineFontName, "DefineFontName");
- ATO2(StartSound2, "StartSound2");
- DATA_END
-
- Frame_Count++;
- if (Frame_Count>=Frame_Count_Valid)
- Data_Finish("SWF");
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Swf::DefineSound()
-{
- //Parsing
- int16u SoundId;
- int8u SoundFormat, SoundRate, SoundSize, SoundType;
- Get_L2 (SoundId, "SoundId");
- BS_Begin();
- Get_S1 (4, SoundFormat, "SoundFormat"); Param_Info1(Swf_SoundFormat[SoundFormat]);
- Get_S1 (2, SoundRate, "SoundRate"); Param_Info2(Swf_SoundRate[SoundRate], " Hz");
- Get_S1 (1, SoundSize, "SoundSize"); Param_Info2(Swf_SoundSize[SoundSize], " bits");
- Get_S1 (1, SoundType, "SoundType"); Param_Info2(Swf_SoundType[SoundType], " channel(s)");
- BS_End();
- Skip_L4( "SoundSampleCount");
- Skip_XX(Element_Size-Element_Offset, "SoundData");
-
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, StreamPos_Last, Audio_ID, SoundId);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format, Swf_Format_Audio[SoundFormat]);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format_Version, Swf_Format_Version_Audio[SoundFormat]);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format_Profile, Swf_Format_Profile_Audio[SoundFormat]);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Swf_SoundFormat[SoundFormat]);
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, Swf_SoundRate[SoundRate]);
- if (SoundFormat!=2) //SoundSize is not valid for MPEG Audio
- Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, Swf_SoundSize[SoundSize]);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Swf_SoundType[SoundType]);
-}
-
-//---------------------------------------------------------------------------
-void File_Swf::SoundStreamHead()
-{
- //Parsing
- int16u StreamSoundSampleCount;
- int8u StreamSoundCompression, StreamSoundRate, StreamSoundType, StreamSoundSize;
- BS_Begin();
- Skip_S1(4, "Reserved");
- Info_S1(2, PlaybackSoundRate, "PlaybackSoundRate"); Param_Info2(Swf_SoundRate[PlaybackSoundRate], " Hz");
- Info_S1(1, PlaybackSoundSize, "PlaybackSoundSize"); Param_Info2(Swf_SoundSize[PlaybackSoundSize], " bits");
- Info_S1(1, PlaybackSoundType, "PlaybackSoundType"); Param_Info2(Swf_SoundType[PlaybackSoundType], " channel(s)");
- Get_S1 (4, StreamSoundCompression, "StreamSoundCompression"); Param_Info1(Swf_SoundFormat[StreamSoundCompression]);
- Get_S1 (2, StreamSoundRate, "StreamSoundRate"); Param_Info2(Swf_SoundRate[StreamSoundRate], " Hz");
- Get_S1 (1, StreamSoundSize, "StreamSoundSize"); Param_Info2(Swf_SoundSize[StreamSoundSize], " bits");
- Get_S1 (1, StreamSoundType, "StreamSoundType"); Param_Info2(Swf_SoundType[StreamSoundType], " channel(s)");
- BS_End();
- Get_L2 (StreamSoundSampleCount, "StreamSoundSampleCount");
- if (StreamSoundCompression==2)
- Skip_L2( "LatencySeek");
-
- if (StreamSoundSampleCount>0)
- {
- Stream_Prepare(Stream_Audio);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format, Swf_Format_Audio[StreamSoundCompression]);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format_Version, Swf_Format_Version_Audio[StreamSoundCompression]);
- Fill(Stream_Audio, StreamPos_Last, Audio_Format_Profile, Swf_Format_Profile_Audio[StreamSoundCompression]);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Swf_SoundFormat[StreamSoundCompression]);
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, Swf_SoundRate[StreamSoundRate]);
- if (StreamSoundCompression!=2) //SoundSize is not valid for MPEG Audio
- Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, Swf_SoundSize[StreamSoundSize]);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Swf_SoundType[StreamSoundType]);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Swf::DefineSprite()
-{
- //Parsing
- Skip_B2( "Character ID of sprite");
- Skip_B2( "Number of frames in sprite");
-}
-
-//---------------------------------------------------------------------------
-void File_Swf::DefineVideoStream()
-{
- //Parsing
- int16u CharacterID, NumFrames, Width, Height;
- int8u CodecID;
- Get_L2 (CharacterID, "CharacterID");
- Get_L2 (NumFrames, "NumFrames");
- Get_L2 (Width, "Width");
- Get_L2 (Height, "Height");
- BS_Begin();
- Skip_BS(4, "VideoFlagsReserved");
- Skip_BS(3, "VideoFlagsDeblocking");
- Skip_BS(1, "VideoFlagsSmoothing");
- BS_End();
- Get_L1 (CodecID, "CodecID"); Param_Info1C((CodecID<16), Swf_Format_Video[CodecID]);
-
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, StreamPos_Last, Video_ID, CharacterID);
- Fill(Stream_Video, StreamPos_Last, Video_Width, Width);
- Fill(Stream_Video, StreamPos_Last, Video_Height, Height);
- if (CodecID<16)
- {
- Fill(Stream_Video, StreamPos_Last, Video_Format, Swf_Format_Video[CodecID]);
- Fill(Stream_Video, StreamPos_Last, Video_Format_Profile, Swf_Format_Profile_Video[CodecID]);
- Fill(Stream_Video, StreamPos_Last, Video_Codec, Swf_Codec_Video[CodecID]);
- }
- Fill(Stream_Video, StreamPos_Last, Video_FrameCount, NumFrames);
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Swf::Decompress()
-{
- if (Buffer_Size!=File_Size)
- {
- //We must have the complete file in memory, but this is too big (not handled by FileHeader_Begin()), only saying this is SWF
- Fill(Stream_General, 0, General_Format, "ShockWave");
-
- Stream_Prepare(Stream_Video);
-
- Finish("SWF");
- return true;
- }
-
- //Sizes
- unsigned long Source_Size=(unsigned long)(File_Size-8);
- unsigned long Dest_Size=(unsigned long)(FileLength-8);
-
- //Uncompressing
- int8u* Dest=new int8u[Dest_Size];
- if (uncompress((Bytef*)Dest, &Dest_Size, (const Bytef*)Buffer+Buffer_Offset+8, Source_Size)<0)
- {
- delete[] Dest; //Dest=NULL
- Trusted_IsNot("Error while decompressing");
- Reject("SWF");
- return false;
- }
-
- Accept("SWF");
-
- Fill(Stream_General, 0, General_Format, "ShockWave");
-
- File_Swf MI;
- MI.FileLength=FileLength;
- MI.Version=Version;
- Open_Buffer_Init(&MI);
- MI.Open_Buffer_Continue(Dest, FileLength-8);
- MI.Open_Buffer_Finalize();
- Merge(MI, Stream_General, 0, 0);
- Merge(MI);
- delete[] Dest; //Dest=NULL;
-
- Finish("SWF");
- return true;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_SWF_*
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Swf.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Swf.h
deleted file mode 100644
index 760d1592b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Swf.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about SWF files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_SwfH
-#define MediaInfo_File_SwfH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Swf
-//***************************************************************************
-
-class File_Swf : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
- int32u FileLength;
- int8u Version;
-
-public :
- File_Swf();
-
-private :
- //Buffer
- bool FileHeader_Begin();
- void FileHeader_Parse();
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Header();
- void Header_Continue();
- void End() {};
- void ShowFrame() {};
- void DefineShape() {};
- void PlaceObject() {};
- void RemoveObject() {};
- void DefineBits() {};
- void DefineButton() {};
- void JPEGTables() {};
- void SetBackgroundColor() {};
- void DefineFont() {};
- void DefineText() {};
- void DoAction() {};
- void DefineFontInfo() {};
- void DefineSound();
- void StartSound() {};
- void DefineButtonSound() {};
- void SoundStreamHead();
- void SoundStreamBlock() {};
- void DefineBitsLossless() {};
- void DefineBitsJPEG2() {};
- void DefineShape2() {};
- void DefineCxform() {};
- void Protect() {};
- void PlaceObject2() {};
- void RemoveObject2() {};
- void DefineShape3() {};
- void DefineText2() {};
- void DefineButton2() {};
- void DefineBitsJPEG3() {};
- void DefineBitsLossless2() {};
- void DefineEditText() {};
- void DefineSprite();
- void FrameLabel() {};
- void DefineMorphShape() {};
- void SoundStreamHead2() {SoundStreamHead();};
- void DefineFont2() {};
- void ExportAssets() {};
- void ImportAssets() {};
- void EnableDebugger() {};
- void DoInitAction() {};
- void DefineVideoStream();
- void DefineVideoFrame() {};
- void DefineFontInfo2() {};
- void EnableDebugger2() {};
- void ScriptLimits() {};
- void SetTabIndex() {};
- void FileAttributes() {};
- void PlaceObject3() {};
- void ImportAssets2() {};
- void DefineFontAlignZones() {};
- void CSMTextSettings() {};
- void DefineFont3() {};
- void SymbolClass() {};
- void Metadata() {};
- void DefineScalingGrid() {};
- void DoABC() {};
- void DefineShape4() {};
- void DefineMorphShape2() {};
- void DefineSceneAndFrameLabelData() {};
- void DefineBinaryData() {};
- void DefineFontName() {};
- void StartSound2() {};
-
- //Helpers
- bool Decompress();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Umf.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Umf.cpp
deleted file mode 100644
index 1a929c608..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Umf.cpp
+++ /dev/null
@@ -1,240 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_GXF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Umf.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Umf::File_Umf()
-:File__Analyze()
-{
- //In
- #if MEDIAINFO_SEEK || MEDIAINFO_DEMUX
- GopSize=(int64u)-1;
- #endif //MEDIAINFO_SEEK || MEDIAINFO_DEMUX
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Umf::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<2)
- return false; //Must wait for more data
-
- int16u Length=LittleEndian2int16u(Buffer);
- if (Buffer_Size<Length)
- return false; //Must wait for more data
-
- //All should be OK...
- Accept("UMF");
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Umf::Read_Buffer_Continue()
-{
- //Parsing
- int32u Tracks, Segments;
- Element_Begin1("Payload description");
- Skip_L4( "Total length of the UMF data");
- Skip_L4( "Version of this file");
- Get_L4 (Tracks, "Number of tracks in the material");
- Skip_L4( "Offset to track description section");
- Skip_L4( "Size of the track description section");
- Get_L4 (Segments, "Number of segments");
- Skip_L4( "Offset to media description section");
- Skip_L4( "Size of the media description section");
- Skip_L4( "Offset to the user data section");
- Skip_L4( "Size of the user data section");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Element_End0();
-
- Element_Begin1("Material description");
- Skip_L4( "Attributes");
- Skip_L4( "Maximum length of the material in fields");
- Skip_L4( "Minimum length of the material in fields");
- Skip_L4( "Material mark in value in fields");
- Skip_L4( "Material mark out value in fields");
- Skip_L4( "Time code at mark in value");
- Skip_L4( "Time code at mark out value");
- Skip_L4( "last modified time (Most)");
- Skip_L4( "last modified time (Least)");
- Skip_L4( "creation time (Most)");
- Skip_L4( "creation time (Least)");
- Skip_L2( "Reserved");
- Skip_L2( "Reserved");
- Skip_L2( "Number of audio tracks");
- Skip_L2( "Number of time code tracks");
- Skip_L2( "Reserved");
- Skip_L2( "Number of MPEG-1, MPEG-2, and MPEG-2 HD video tracks");
- Element_End0();
-
- for (int32u Pos=0; Pos<Tracks; Pos++)
- {
- Element_Begin1("Track description");
- Skip_C1( "Track information - Track type");
- Skip_C1( "Track information - Track logical number");
- Skip_L2( "Number of segments on this track");
- Element_End0();
-
- if (Element_Offset>=Element_Size)
- break;
- }
-
- for (int32u Pos=0; Pos<Segments; Pos++)
- {
- Element_Begin1("Media description");
- int32u Type;
- int16u Length;
- Get_L2 (Length, "Length of this media description");
- int64u End=Element_Offset+Length-2;
- Skip_C1( "Track information - Track type");
- Skip_C1( "Track information - Track logical number");
- Skip_L2( "Media Sequence number");
- Skip_L2( "Reserved");
- Skip_L4( "Number of fields in segment");
- Skip_L4( "Reserved");
- Skip_L4( "Mark in value for the media file in fields");
- Skip_L4( "Mark out value for the media file in fields");
- Skip_Local(88, "Source device media file name");
- Get_L4 (Type, "Type of media track");
- Skip_L4( "Sampling rates for this track");
- Skip_L4( "Size of sample for audio and time codes");
- Skip_L4( "Reserved");
- switch (Type)
- {
- case 0x00000004 :
- case 0x00000007 :
- case 0x00000009 : //MPEG-Video
- {
- #if MEDIAINFO_SEEK || MEDIAINFO_DEMUX
- int32u P, B;
- #endif //MEDIAINFO_SEEK || MEDIAINFO_DEMUX
- Skip_L4( "Color difference format");
- Skip_L4( "GoP structure");
- Skip_L4( "Frame/field structure");
- Skip_L4( "Target I-pictures per GoP");
- #if MEDIAINFO_SEEK || MEDIAINFO_DEMUX
- Get_L4 (P, "Target P-pictures per I-picture");
- Get_L4 (B, "Target B-pictures per P-picture or I-picture");
- #else //MEDIAINFO_SEEK || MEDIAINFO_DEMUX
- Skip_L4( "Target P-pictures per I-picture");
- Skip_L4( "Target B-pictures per P-picture or I-picture");
- #endif //MEDIAINFO_SEEK || MEDIAINFO_DEMUX
- Skip_L4( "MPEG video attributes");
- Skip_L4( "Reserved");
- #if MEDIAINFO_SEEK || MEDIAINFO_DEMUX
- GopSize=(1+P)*(1+B);
- #endif //MEDIAINFO_SEEK || MEDIAINFO_DEMUX
- }
- break;
- case 0x00000003 : //TimeCode
- Skip_L4( "Time code attributes");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- break;
- case 0x00000002 : //Audio
- //Skip_LF8( "Level at which to play this segment");
- //Skip_LF8( "Level at which to terminate this segment");
- Skip_L8( "Level at which to play this segment");
- Skip_L8( "Level at which to terminate this segment");
- Skip_L4( "Number of fields over which to ramp up");
- Skip_L4( "Number of fields over which to ramp down");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- break;
- case 0x00000005 : //DV25
- case 0x00000006 : //DV50
- Skip_L4( "Attributes"); //With Aspect ratio
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- #if MEDIAINFO_SEEK || MEDIAINFO_DEMUX
- GopSize=1;
- #endif //MEDIAINFO_SEEK || MEDIAINFO_DEMUX
- break;
- default :
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- Skip_L4( "Reserved");
- }
- if (Element_Offset<End)
- Skip_XX(End-Element_Offset, "Unknown");
- Element_End0();
-
- if (Element_Offset>=Element_Size)
- break;
- }
-
- while (Element_Offset<Element_Size)
- {
- Element_Begin1("User data");
- int32u Length;
- Get_L4 (Length, "The length of this user data record");
- Skip_L4( "Position on the material time line");
- Skip_L2( "Track associated with the user data record");
- Skip_L2( "Media Sequence Numbe");
- Skip_L4( "User-defined key");
- if (Length>18)
- Skip_XX(Length-18, "User data");
- else
- Skip_XX(Element_Size-Element_Offset-2, "User data");
- Skip_L1( "NULL byte");
- Skip_L1( "Reserved byte");
- Element_End0();
- }
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_UMF_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Umf.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Umf.h
deleted file mode 100644
index efd7f472f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Umf.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about UMF files
-// Unified Material Format
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_UmfH
-#define MediaInfo_File_UmfH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Umf
-//***************************************************************************
-
-class File_Umf : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Umf();
-
- //Out
- #if MEDIAINFO_SEEK || MEDIAINFO_DEMUX
- int64u GopSize;
- #endif //MEDIAINFO_SEEK || MEDIAINFO_DEMUX
-
-protected :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Wm.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Wm.cpp
deleted file mode 100644
index e9be8625f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Wm.cpp
+++ /dev/null
@@ -1,256 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Main part
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_WM_YES
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Wm.h"
-#if defined(MEDIAINFO_MPEGPS_YES)
- #include "MediaInfo/Multiple/File_MpegPs.h"
-#endif
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-#include "ZenLib/Utils.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Wm::File_Wm()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("Wm");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Wm;
- StreamIDs_Width[0]=2;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Level=2; //Container
- #endif //MEDIAINFO_DEMUX
- DataMustAlwaysBeComplete=false;
-
- //Stream
- Packet_Count=0;
- MaximumDataPacketSize=(int32u)-1;
- Header_ExtendedContentDescription_AspectRatioX=0;
- Header_ExtendedContentDescription_AspectRatioY=0;
- SizeOfMediaObject_BytesAlreadyParsed=0;
- FileProperties_Preroll=0;
- Codec_Description_Count=0;
- Stream_Number=0;
- Data_Parse_Padding=0;
- NumberPayloads=1;
- NumberPayloads_Pos=0;
- Data_Parse_Begin=true;
- IsDvrMs=false;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Wm::Streams_Finish()
-{
- //Encryption management
- /*const Ztring& Encryption=Retrieve(Stream_General, 0, General_Encryption);
- if (!Encryption.empty())
- {
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t Pos=0; Pos<(*Stream[StreamKind]).size(); Pos++)
- Fill ((stream_t)StreamKind, 0, "Encryption", Encryption);
- }
-
- Fill("BitRate", CurrentBitRate[StreamNumber]);
- */
-
- std::map<int16u, stream>::iterator Temp=Stream.begin();
- while (Temp!=Stream.end())
- {
- for (std::map<std::string, ZenLib::Ztring>::iterator Info_Temp=Temp->second.Info.begin(); Info_Temp!=Temp->second.Info.end(); ++Info_Temp)
- Fill(Temp->second.StreamKind, Temp->second.StreamPos, Info_Temp->first.c_str(), Info_Temp->second, true);
-
- //Codec Info
- for (size_t Pos=0; Pos<CodecInfos.size(); Pos++)
- {
- if ((CodecInfos[Pos].Type==1 && Temp->second.StreamKind==Stream_Video)
- || (CodecInfos[Pos].Type==2 && Temp->second.StreamKind==Stream_Audio))
- {
- Fill(Temp->second.StreamKind, Temp->second.StreamPos, "CodecID_Description", CodecInfos[Pos].Info, true);
- Fill(Temp->second.StreamKind, Temp->second.StreamPos, "Codec_Description", CodecInfos[Pos].Info, true);
- }
- }
-
- if (Temp->second.StreamKind==Stream_Video)
- {
- //Some tests about the frame rate
- int32u PresentationTime_Previous=(int32u)-1;
- size_t TimeDiffs_Sum=0;
- std::map<int32u, size_t> TimeDiffs;
- for (std::set<int32u>::iterator PresentationTime=Temp->second.PresentationTimes.begin(); PresentationTime!=Temp->second.PresentationTimes.end(); ++PresentationTime)
- {
- if (PresentationTime_Previous!=(int32u)-1)
- TimeDiffs[*PresentationTime-PresentationTime_Previous]++;
- PresentationTime_Previous=*PresentationTime;
- }
- for (std::map<int32u, size_t>::iterator TimeDiff=TimeDiffs.begin(); TimeDiff!=TimeDiffs.end();)
- {
- if (TimeDiff->second<=2)
- TimeDiffs.erase(TimeDiff++);
- else
- {
- TimeDiffs_Sum+=TimeDiff->second;
- ++TimeDiff;
- }
- }
-
- if (TimeDiffs.empty()
- || (TimeDiffs.size()==1 && TimeDiffs_Sum<16)
- || (TimeDiffs.size()==2 && TimeDiffs_Sum<32)
- || TimeDiffs.begin()->first==1)
- {
- if (Temp->second.AverageTimePerFrame>0)
- Fill(Stream_Video, Temp->second.StreamPos, Video_FrameRate, ((float)10000000)/(Temp->second.AverageTimePerFrame*(Temp->second.Parser && Temp->second.Parser->Retrieve(Stream_Video, 0, Video_ScanType)==__T("Interlaced")?2:1)), 3, true);
- }
- else if (TimeDiffs.size()==1)
- {
- Fill(Stream_Video, Temp->second.StreamPos, Video_FrameRate, 1000/((float64)TimeDiffs.begin()->first), 3, true);
- if (Temp->second.AverageTimePerFrame>0)
- Fill(Stream_Video, Temp->second.StreamPos, Video_FrameRate_Nominal, ((float)10000000)/(Temp->second.AverageTimePerFrame*(Temp->second.Parser && Temp->second.Parser->Retrieve(Stream_Video, 0, Video_ScanType)==__T("Interlaced")?2:1)), 3, true);
- }
- else if (TimeDiffs.size()==2)
- {
- std::map<int32u, size_t>::iterator PresentationTime_Delta_Most=TimeDiffs.begin();
- float64 PresentationTime_Deltas_1_Value=(float64)PresentationTime_Delta_Most->first;
- float64 PresentationTime_Deltas_1_Count=(float64)PresentationTime_Delta_Most->second;
- ++PresentationTime_Delta_Most;
- float64 PresentationTime_Deltas_2_Value=(float64)PresentationTime_Delta_Most->first;
- float64 PresentationTime_Deltas_2_Count=(float64)PresentationTime_Delta_Most->second;
- float64 FrameRate_Real=1000/(((PresentationTime_Deltas_1_Value*PresentationTime_Deltas_1_Count)+(PresentationTime_Deltas_2_Value*PresentationTime_Deltas_2_Count))/(PresentationTime_Deltas_1_Count+PresentationTime_Deltas_2_Count));
- Fill(Temp->second.StreamKind, Temp->second.StreamPos, Video_FrameRate, FrameRate_Real, 3, true);
- if (Temp->second.AverageTimePerFrame>0)
- Fill(Stream_Video, Temp->second.StreamPos, Video_FrameRate_Nominal, ((float)10000000)/(Temp->second.AverageTimePerFrame*(Temp->second.Parser && Temp->second.Parser->Retrieve(Stream_Video, 0, Video_ScanType)==__T("Interlaced")?2:1)), 3, true);
- }
- else
- {
- Fill(Stream_Video, Temp->second.StreamPos, Video_FrameRate_Mode, "VFR");
- if (Temp->second.AverageTimePerFrame>0)
- Fill(Stream_Video, Temp->second.StreamPos, Video_FrameRate_Nominal, ((float)10000000)/(Temp->second.AverageTimePerFrame*(Temp->second.Parser && Temp->second.Parser->Retrieve(Stream_Video, 0, Video_ScanType)==__T("Interlaced")?2:1)), 3, true);
- }
- }
- if (Temp->second.AverageBitRate>0)
- Fill(Temp->second.StreamKind, Temp->second.StreamPos, "BitRate", Temp->second.AverageBitRate, 10, true);
- if (Temp->second.LanguageID!=(int16u)-1 && Temp->second.LanguageID<(int16u)Languages.size())
- Fill(Temp->second.StreamKind, Temp->second.StreamPos, "Language", Languages[Temp->second.LanguageID]);
- else if (!Language_ForAll.empty())
- Fill(Temp->second.StreamKind, Temp->second.StreamPos, "Language", Language_ForAll);
- if (Temp->second.Parser)
- {
- if (Temp->second.StreamKind==Stream_Max)
- if (Temp->second.Parser->Count_Get(Stream_Audio))
- {
- Stream_Prepare(Stream_Audio);
- Temp->second.StreamKind=StreamKind_Last;
- Temp->second.StreamPos=StreamPos_Last;
- }
- Ztring Format_Profile;
- if (Temp->second.StreamKind==Stream_Video)
- Format_Profile=Retrieve(Stream_Video, Temp->second.StreamPos, Video_Format_Profile);
- Finish(Temp->second.Parser);
- if (Temp->second.Parser->Get(Stream_Video, 0, Video_Format)==__T("MPEG Video"))
- {
- //Width/Height are junk
- Clear(Stream_Video, Temp->second.StreamPos, Video_Width);
- Clear(Stream_Video, Temp->second.StreamPos, Video_Height);
- Clear(Stream_Video, Temp->second.StreamPos, Video_PixelAspectRatio);
- Clear(Stream_Video, Temp->second.StreamPos, Video_DisplayAspectRatio);
- }
-
- //Delay (in case of MPEG-PS)
- if (Temp->second.TimeCode_First!=(int64u)-1)
- {
- Fill(Temp->second.StreamKind, Temp->second.StreamPos, Fill_Parameter(Temp->second.StreamKind, Generic_Delay), Temp->second.TimeCode_First, 10);
- Fill(Temp->second.StreamKind, Temp->second.StreamPos, Fill_Parameter(Temp->second.StreamKind, Generic_Delay_Source), "Container");
- }
-
-
- Merge(*Temp->second.Parser, Temp->second.StreamKind, 0, Temp->second.StreamPos);
- if (!Format_Profile.empty() && Format_Profile.find(Retrieve(Stream_Video, Temp->second.StreamPos, Video_Format_Profile))==0)
- Fill(Stream_Video, Temp->second.StreamPos, Video_Format_Profile, Format_Profile, true);
- }
-
- ++Temp;
- }
-
- if (Count_Get(Stream_Video)==0 && Count_Get(Stream_Image)==0)
- Fill(Stream_General, 0, General_InternetMediaType, "audio/x-ms-wma", Unlimited, true, true);
-
- //Purge what is not needed anymore
- if (!File_Name.empty()) //Only if this is not a buffer, with buffer we can have more data
- Stream.clear();
-}
-
-//***************************************************************************
-// Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_Parse()
-{
- if (!MustUseAlternativeParser)
- {
- //Parsing
- int128u Name;
- int64u Size;
- Get_GUID(Name, "Name");
- Get_L8 (Size, "Size");
-
- //Filling
- Header_Fill_Code(Name.hi, Ztring().From_GUID(Name));
- Header_Fill_Size(Size);
- }
- else
- {
- Header_Fill_Code(0, "Packet");
- Header_Fill_Size(MaximumDataPacketSize);
- }
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_WM_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Wm.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Wm.h
deleted file mode 100644
index 66cbc64b4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Wm.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_WmH
-#define MediaInfo_File_WmH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <set>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Wm
-//***************************************************************************
-
-class File_Wm : public File__Analyze
-{
-public :
- File_Wm();
-
-protected :
- //Streams management
- void Streams_Finish();
-
-private :
- //Buffer
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Header();
- void Header_FileProperties();
- void Header_StreamProperties();
- void Header_StreamProperties_Audio();
- void Header_StreamProperties_Audio_WMA();
- void Header_StreamProperties_Audio_AMR();
- void Header_StreamProperties_Video();
- void Header_StreamProperties_JFIF();
- void Header_StreamProperties_DegradableJPEG();
- void Header_StreamProperties_Binary();
- void Header_HeaderExtension();
- void Header_HeaderExtension_ExtendedStreamProperties();
- void Header_HeaderExtension_AdvancedMutualExclusion();
- void Header_HeaderExtension_GroupMutualExclusion();
- void Header_HeaderExtension_StreamPrioritization();
- void Header_HeaderExtension_BandwidthSharing();
- void Header_HeaderExtension_LanguageList();
- void Header_HeaderExtension_Metadata();
- void Header_HeaderExtension_MetadataLibrary();
- void Header_HeaderExtension_IndexParameters();
- void Header_HeaderExtension_MediaIndexParameters();
- void Header_HeaderExtension_TimecodeIndexParameters();
- void Header_HeaderExtension_Compatibility();
- void Header_HeaderExtension_AdvancedContentEncryption();
- void Header_HeaderExtension_IndexPlaceholder();
- void Header_CodecList();
- void Header_ScriptCommand();
- void Header_Marker();
- void Header_BitRateMutualExclusion();
- void Header_ErrorCorrection();
- void Header_ContentDescription();
- void Header_ExtendedContentDescription();
- void Header_ExtendedContentDescription_ASFLeakyBucketPairs(int16u Value_Length);
- void Header_StreamBitRate();
- void Header_ContentBranding();
- void Header_ContentEncryption();
- void Header_ExtendedContentEncryption();
- void Header_DigitalSignature();
- void Header_Padding();
- void Data();
- void Data_Packet();
- void Data_Packet_ReplicatedData(int32u Size);
- void Data_Packet_ReplicatedData_TimeStamp();
- void SimpleIndex();
- void Index();
- void MediaIndex();
- void TimecodeIndex();
-
- //Data
- struct stream
- {
- struct payload_extension_system
- {
- int128u ID;
- int16u Size;
- };
-
- File__Analyze* Parser;
- File__Analyze* Parser2;
- File__Analyze* Parser3;
- stream_t StreamKind;
- size_t StreamPos;
- size_t PacketCount;
- int64u AverageTimePerFrame;
- int32u AverageBitRate;
- int16u LanguageID;
- std::map<std::string, ZenLib::Ztring> Info;
- bool IsCreated; //if Stream_Prepare() is done
- bool SearchingPayload;
- std::set<int32u> PresentationTimes;
- std::vector<payload_extension_system> Payload_Extension_Systems;
- int64u TimeCode_First;
-
- stream()
- {
- Parser=NULL;
- Parser2=NULL;
- Parser3=NULL;
- StreamKind=Stream_Max;
- StreamPos=0;
- PacketCount=0;
- AverageTimePerFrame=0;
- AverageBitRate=0;
- LanguageID=(int16u)-1;
- IsCreated=false;
- SearchingPayload=false;
- TimeCode_First=(int64u)-1;
- }
-
- ~stream()
- {
- delete Parser; //Parser=NULL;
- delete Parser2; //Parser2=NULL
- delete Parser3; //Parser3=NULL
- }
- };
- struct codecinfo
- {
- int16u Type;
- Ztring Info;
- };
- std::map<int16u, stream> Stream;
- int16u Stream_Number; //In header: current pos, in Data: Count of enabled parsers
- std::vector<ZenLib::Ztring> Languages;
- std::vector<codecinfo> CodecInfos;
- Ztring Language_ForAll;
- int32u Data_Parse_Padding;
- int32u MaximumDataPacketSize;
- bool Data_Parse_Begin;
- bool Data_Parse_MultiplePayloads;
- bool Data_Parse_CompressedPayload;
- bool IsDvrMs; //Is DVR-Ms format (for finding MPEG Audio)
-
- //From Data headers
- size_t Codec_Description_Count;
- size_t Packet_Count;
- size_t Streams_Count;
- int64u Header_ExtendedContentDescription_AspectRatioX;
- int64u Header_ExtendedContentDescription_AspectRatioY;
- size_t Header_StreamProperties_StreamOrder;
- int64u Data_AfterTheDataChunk;
- int32u SizeOfMediaObject_BytesAlreadyParsed;
- int32u FileProperties_Preroll;
- int8u ReplicatedDataLengthType;
- int8u OffsetIntoMediaObjectLengthType;
- int8u MediaObjectNumberLengthType;
- int8u StreamNumberLengthType;
- int8u PayloadLengthType;
- int8u NumberPayloads;
- int8u NumberPayloads_Pos;
- bool MultiplePayloadsPresent;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Wm_Elements.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Wm_Elements.cpp
deleted file mode 100644
index 6c1b657f2..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Wm_Elements.cpp
+++ /dev/null
@@ -1,1823 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Elements part
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_WM_YES
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Wm.h"
-#if defined(MEDIAINFO_VC1_YES)
- #include "MediaInfo/Video/File_Vc1.h"
-#endif
-#if defined(MEDIAINFO_MPEGV_YES)
- #include "MediaInfo/Video/File_Mpegv.h"
-#endif
-#if defined(MEDIAINFO_AC3_YES)
- #include "MediaInfo/Audio/File_Ac3.h"
-#endif
-#if defined(MEDIAINFO_MPEGA_YES)
- #include "MediaInfo/Audio/File_Mpega.h"
-#endif
-#if MEDIAINFO_DEMUX
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
- #include "base64.h"
-#endif //MEDIAINFO_DEMUX
-#include "ZenLib/Utils.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-const char* Wm_CodecList_Kind(int32u Kind)
-{
- switch (Kind)
- {
- case 0x01 : return "Video";
- case 0x02 : return "Audio";
- default : return "";
- }
-}
-
-const char* Wm_BannerImageData_Type(int32u Type)
-{
- switch (Type)
- {
- case 0x00 : return "";
- case 0x01 : return "Bitmap";
- case 0x02 : return "JPEG";
- case 0x03 : return "GIF";
- default : return "";
- }
-}
-
-#define UUID(NAME, PART1, PART2, PART3, PART4, PART5) \
- const int64u NAME =0x##PART3##PART2##PART1##ULL; \
- const int64u NAME##2=0x##PART4##PART5##ULL; \
-
-namespace Elements
-{
- UUID(Header, 75B22630, 668E, 11CF, A6D9, 00AA0062CE6C)
- UUID(Header_FileProperties, 8CABDCA1, A947, 11CF, 8EE4, 00C00C205365)
- UUID(Header_StreamProperties, B7DC0791, A9B7, 11CF, 8EE6, 00C00C205365)
- UUID(Header_StreamProperties_Audio, F8699E40, 5B4D, 11CF, A8FD, 00805F5C442B)
- UUID(Header_StreamProperties_Video, BC19EFC0, 5B4D, 11CF, A8FD, 00805F5C442B)
- UUID(Header_StreamProperties_Command, 59DACFC0, 59E6, 11D0, A3AC, 00A0C90348F6)
- UUID(Header_StreamProperties_JFIF, B61BE100, 5B4E, 11CF, A8FD, 00805F5C442B)
- UUID(Header_StreamProperties_DegradableJPEG, 35907DE0, E415, 11CF, A917, 00805F5C442B)
- UUID(Header_StreamProperties_FileTransfer, 91BD222C, F21C, 497A, 8B6D, 5AA86BFC0185)
- UUID(Header_StreamProperties_Binary, 3AFB65E2, 47EF, 40F2, AC2C, 70A90D71D343)
- UUID(Header_StreamProperties_Binary_WebStreamMediaSubType, 776257D4, C627, 41CB, 8F81, 7AC7FF1C40CC)
- UUID(Header_StreamProperties_Binary_WebStreamFormat, DA1E6B13, 8359, 4050, B398, 388E965BF00C)
- UUID(Header_HeaderExtension, 5FBF03B5, A92E, 11CF, 8EE3, 00C00C205365)
- UUID(Header_HeaderExtension_ExtendedStreamProperties, 14E6A5CB, C672, 4332, 8399, A96952065B5A)
- UUID(Header_HeaderExtension_AdvancedMutualExclusion, A08649CF, 4775, 4670, 8A16, 6E35357566CD)
- UUID(Header_HeaderExtension_GroupMutualExclusion, D1465A40, 5A79, 4338, B71B, E36B8FD6C249)
- UUID(Header_HeaderExtension_StreamPrioritization, D4FED15B, 88D3, 454F, 81F0, ED5C45999E24)
- UUID(Header_HeaderExtension_BandwidthSharing, A69609E6, 517B, 11D2, B6AF, 00C04FD908E9)
- UUID(Header_HeaderExtension_LanguageList, 7C4346A9, EFE0, 4BFC, B229, 393EDE415C85)
- UUID(Header_HeaderExtension_Metadata, C5F8CBEA, 5BAF, 4877, 8467, AA8C44FA4CCA)
- UUID(Header_HeaderExtension_MetadataLibrary, 44231C94, 9498, 49D1, A141, 1D134E457054)
- UUID(Header_HeaderExtension_IndexParameters, D6E229DF, 35DA, 11D1, 9034, 00A0C90349BE)
- UUID(Header_HeaderExtension_MediaIndexParameters, 6B203BAD, 3F11, 48E4, ACA8, D7613DE2CFA7)
- UUID(Header_HeaderExtension_TimecodeIndexParameters, F55E496D, 9797, 4B5D, 8C8B, 604DFE9BFB24)
- UUID(Header_HeaderExtension_Compatibility, 26F18B5D, 4584, 47EC, 9F5F, 0E651F0452C9)
- UUID(Header_HeaderExtension_AdvancedContentEncryption, 43058533, 6981, 49E6, 9B74, AD12CB86D58C)
- UUID(Header_HeaderExtension_IndexPlaceholder, D9AADE20, 7C17, 4F9C, BC28, 8555DD98E2A2)
- UUID(Header_CodecList, 86D15240, 311D, 11D0, A3A4, 00ACC90348F6)
- UUID(Header_ScriptCommand, 1EFB1A30, 0B62, 11D0, A39B, 00A0C90348F6)
- UUID(Header_Marker, F487CD01, A951, 11CF, 8EE6, 00C00C205365)
- UUID(Header_BitRateMutualExclusion, D6E229DC, 35DA, 11D1, 9034, 00A0C90349BE)
- UUID(Header_ErrorCorrection, 75B22635, 668E, 11CF, A6D9, 00AA0062CE6C)
- UUID(Header_ContentDescription, 75B22633, 668E, 11CF, A6D9, 00AA0062CE6C)
- UUID(Header_ExtendedContentDescription, D2D0A440, E307, 11D2, 97F0, 00A0C95EA850)
- UUID(Header_StreamBitRate, 7BF875CE, 468D, 11D1, 8D82, 006097C9A2B2)
- UUID(Header_ContentBranding, 2211B3FA, BD23, 11D2, B4B7, 00A0C955FC6E)
- UUID(Header_ContentEncryption, 2211B3FB, BD23, 11D2, B4B7, 00A0C955FC6E)
- UUID(Header_ExtendedContentEncryption, 298AE614, 2622, 4C17, B935, DAE07EE9289C)
- UUID(Header_DigitalSignature, 2211B3FC, BD23, 11D2, B4B7, 00A0C955FC6E)
- UUID(Header_Padding, 1806D474, CADF, 4509, A4BA, 9AABCB96AAE8)
- UUID(Data, 75B22636, 668E, 11CF, A6D9, 00AA0062CE6C)
- UUID(SimpleIndex, 33000890, E5B1, 11CF, 89F4, 00A0C90349CB)
- UUID(Index, D6E229D3, 35DA, 11D1, 9034, 00A0C90349BE)
- UUID(MediaIndex, FEB103F8, 12AD, 4C64, 840F, 2A1D2F7AD48C)
- UUID(TimecodeIndex, 3CB73FD0, 0C4A, 4803, 953D, EDF7B6228F0C)
-
- UUID(Payload_Extension_System_TimeStamp, 1135BEB7, 3A39, 478A, 98D9, 15C76B00EB69);
- UUID(Mutex_Language, D6E22A00, 35DA, 11D1, 9034, 00A0C90349BE);
- UUID(Mutex_Bitrate, D6E22A01, 35DA, 11D1, 9034, 00A0C90349BE);
-}
-
-const char* Wm_StreamType(const int128u Kind)
-{
- switch (Kind.hi)
- {
- case Elements::Header_StreamProperties_Audio : return "Audio";
- case Elements::Header_StreamProperties_Video : return "Video";
- case Elements::Header_StreamProperties_Command : return "Command";
- case Elements::Header_StreamProperties_JFIF : return "JFIF";
- case Elements::Header_StreamProperties_DegradableJPEG : return "Degradable JPEG";
- case Elements::Header_StreamProperties_FileTransfer : return "File Transfer";
- case Elements::Header_StreamProperties_Binary : return "Binary";
- default : return "";
- }
-}
-
-const char* Wm_ExclusionType(const int128u ExclusionType)
-{
- switch (ExclusionType.hi)
- {
- case Elements::Header_StreamProperties_Audio : return "Language";
- case Elements::Header_StreamProperties_Video : return "Bitrate";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Element parse
-//
-void File_Wm::Data_Parse()
-{
- //Parsing
- DATA_BEGIN
- LIST(Header)
- ATOM_BEGIN
- ATOM(Header_FileProperties)
- ATOM(Header_StreamProperties)
- LIST(Header_HeaderExtension)
- ATOM_BEGIN
- ATOM(Header_HeaderExtension_ExtendedStreamProperties)
- ATOM(Header_HeaderExtension_AdvancedMutualExclusion)
- ATOM(Header_HeaderExtension_GroupMutualExclusion)
- ATOM(Header_HeaderExtension_StreamPrioritization)
- ATOM(Header_HeaderExtension_BandwidthSharing)
- ATOM(Header_HeaderExtension_LanguageList)
- ATOM(Header_HeaderExtension_Metadata)
- ATOM(Header_HeaderExtension_MetadataLibrary)
- ATOM(Header_HeaderExtension_IndexParameters)
- ATOM(Header_HeaderExtension_MediaIndexParameters)
- ATOM(Header_HeaderExtension_TimecodeIndexParameters)
- ATOM(Header_HeaderExtension_Compatibility)
- ATOM(Header_HeaderExtension_AdvancedContentEncryption)
- ATOM(Header_HeaderExtension_IndexPlaceholder)
- ATOM(Header_Padding)
- ATOM_END
- ATOM(Header_CodecList)
- ATOM(Header_ScriptCommand)
- ATOM(Header_Marker)
- ATOM(Header_BitRateMutualExclusion)
- ATOM(Header_ErrorCorrection)
- ATOM(Header_ContentDescription)
- ATOM(Header_ExtendedContentDescription)
- ATOM(Header_StreamBitRate)
- ATOM(Header_ContentBranding)
- ATOM(Header_ContentEncryption)
- ATOM(Header_ExtendedContentEncryption)
- ATOM(Header_DigitalSignature)
- ATOM(Header_Padding)
- ATOM_END
- LIST(Data)
- ATOM_DEFAULT_ALONE(Data_Packet)
- LIST_SKIP(SimpleIndex)
- LIST_SKIP(Index)
- ATOM(MediaIndex)
- ATOM(TimecodeIndex)
- DATA_END
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Wm::Header()
-{
- Data_Accept("Windows Media");
- Element_Name("Header");
-
- //Parsing
- Skip_L4( "Number of Header Objects");
- Skip_L1( "Alignment");
- Skip_L1( "Architecture");
-
- FILLING_BEGIN();
- Fill(Stream_General, 0, General_Format, "Windows Media");
- Header_StreamProperties_StreamOrder=0;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_FileProperties()
-{
- Element_Name("File Properties");
-
- //Parsing
- int64u CreationDate, PlayDuration, SendDuration, Preroll;
- int32u Flags, MaximumBitRate;
- Skip_GUID( "File ID");
- Skip_L8( "File Size");
- Get_L8 (CreationDate, "Creation Date"); Param_Info1(Ztring().Date_From_Milliseconds_1601(CreationDate/10000));
- Skip_L8( "Data Packets Count");
- Get_L8 (PlayDuration, "Play Duration"); Param_Info_From_Milliseconds(PlayDuration/10000);
- Get_L8 (SendDuration, "Send Duration"); Param_Info_From_Milliseconds(SendDuration/10000);
- Get_L8 (Preroll, "Preroll"); Param_Info_From_Milliseconds(Preroll);
- Get_L4 (Flags, "Flags");
- Skip_Flags(Flags, 0, "Broadcast");
- Skip_Flags(Flags, 1, "Seekable");
- Skip_Flags(Flags, 2, "Use Packet Template");
- Skip_Flags(Flags, 3, "Live");
- Skip_Flags(Flags, 4, "Recordable");
- Skip_Flags(Flags, 5, "Unknown Data Size");
- Skip_L4( "Minimum Data Packet Size");
- Get_L4 (MaximumDataPacketSize, "Maximum Data Packet Size");
- Get_L4 (MaximumBitRate, "Maximum Bitrate");
-
- //Filling
- if (MaximumBitRate)
- Fill(Stream_General, 0, General_OverallBitRate_Maximum, MaximumBitRate);
- Fill(Stream_General, 0, General_Encoded_Date, Ztring().Date_From_Milliseconds_1601(CreationDate/10000));
- if (PlayDuration/1000>Preroll)
- Fill(Stream_General, 0, General_Duration, PlayDuration/10000-Preroll);
- FileProperties_Preroll=(int32u)(Preroll);
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_StreamProperties ()
-{
- Element_Name("Stream Properties");
-
- //Parsing
- int128u StreamType;
- int32u StreamTypeLength, ErrorCorrectionTypeLength;
- Get_GUID(StreamType, "StreamType"); Param_Info1(Wm_StreamType(StreamType)); Element_Info1(Wm_StreamType(StreamType));
- Skip_GUID( "Error Correction Type");
- Skip_L8( "Time Offset");
- Get_L4 (StreamTypeLength, "Type-Specific Data Length");
- Get_L4 (ErrorCorrectionTypeLength, "Error Correction Data Length");
- Get_L2 (Stream_Number, "Stream Number");
- if (Stream_Number&0x8000)
- {
- Param_Info1("Encrypted Content");
- Stream[Stream_Number&0x007F].Info["Encryption"]=__T("Encrypted");
- }
- Stream_Number&=0x007F; //Only 7bits
- Element_Info1(Stream_Number);
- Skip_L4( "Reserved");
- switch (StreamType.hi)
- {
- case Elements::Header_StreamProperties_Audio : Element_Begin0(); //size is StreamTypeLength
- Header_StreamProperties_Audio();
- Element_End0(); break;
- case Elements::Header_StreamProperties_Video : Element_Begin0(); //size is StreamTypeLength
- Header_StreamProperties_Video();
- Element_End0(); break;
- case Elements::Header_StreamProperties_JFIF : Element_Begin0(); //size is StreamTypeLength
- Header_StreamProperties_JFIF();
- Element_End0(); break;
- case Elements::Header_StreamProperties_DegradableJPEG : Element_Begin0(); //size is StreamTypeLength
- Header_StreamProperties_DegradableJPEG();
- Element_End0(); break;
- case Elements::Header_StreamProperties_FileTransfer :
- case Elements::Header_StreamProperties_Binary : Element_Begin0(); //size is StreamTypeLength
- Header_StreamProperties_Binary();
- StreamKind_Last=Stream_Max; StreamPos_Last=(size_t)-1;
- Element_End0(); break;
- default : if (StreamTypeLength>0)
- Skip_XX(StreamTypeLength, "Type-Specific Data");
- StreamKind_Last=Stream_Max; StreamPos_Last=(size_t)-1;
- }
- if (ErrorCorrectionTypeLength)
- Skip_XX(ErrorCorrectionTypeLength, "Error Correction Data");
-
- //Filling
- Stream[Stream_Number].StreamKind=StreamKind_Last;
- Stream[Stream_Number].StreamPos=StreamPos_Last;
- Stream[Stream_Number].Info["ID"].From_Number(Stream_Number);
- Stream[Stream_Number].Info["StreamOrder"].From_Number(Header_StreamProperties_StreamOrder);
- Header_StreamProperties_StreamOrder++;
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_StreamProperties_Audio ()
-{
- Element_Name("Audio");
-
- //Parsing
- int32u SamplingRate, BytesPerSec;
- int16u CodecID, Channels, Data_Size, Resolution;
- Get_L2 (CodecID, "Codec ID");
- Get_L2 (Channels, "Number of Channels");
- Get_L4 (SamplingRate, "Samples Per Second");
- Get_L4 (BytesPerSec, "Average Number of Bytes Per Second");
- Skip_L2( "Block Alignment");
- Get_L2 (Resolution, "Bits / Sample");
- Get_L2 (Data_Size, "Codec Specific Data Size");
-
- //Filling
- Stream_Prepare(Stream_Audio);
- Stream[Stream_Number].IsCreated=true;
- Ztring Codec; Codec.From_Number(CodecID, 16);
- Codec.MakeUpperCase();
- CodecID_Fill(Codec, Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff);
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Codec); //May be replaced by codec parser
- Fill(Stream_Audio, StreamPos_Last, Audio_Codec_CC, Codec);
- Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, Channels);
- Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, SamplingRate);
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate, BytesPerSec*8);
- Fill(Stream_Audio, StreamPos_Last, Audio_BitDepth, Resolution);
-
- FILLING_BEGIN();
- //Creating the parser
- if (0);
- #if defined(MEDIAINFO_MPEGA_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Riff, Ztring::ToZtring(CodecID, 16))==__T("MPEG Audio"))
- {
- Stream[Stream_Number].Parser=new File_Mpega;
- ((File_Mpega*)Stream[Stream_Number].Parser)->Frame_Count_Valid=8;
- Stream[Stream_Number].Parser->ShouldContinueParsing=true;
- }
- #endif
- Open_Buffer_Init(Stream[Stream_Number].Parser);
- FILLING_END();
-
- //Parsing
- if (Data_Size>0)
- {
- Element_Begin1("Codec Specific Data");
- switch (CodecID)
- {
- case 0x0161 :
- case 0x0162 :
- case 0x0163 : Header_StreamProperties_Audio_WMA(); break;
- case 0x7A21 :
- case 0x7A22 : Header_StreamProperties_Audio_AMR(); break;
- default : Skip_XX(Data_Size, "Unknown");
- }
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_StreamProperties_Audio_WMA ()
-{
- Element_Info1("WMA");
-
- //Demux
- #if MEDIAINFO_DEMUX
- switch (Config->Demux_InitData_Get())
- {
- case 0 : //In demux event
- Demux_Level=2; //Container
- Demux(Buffer+Buffer_Offset, (size_t)Element_Size, ContentType_Header);
- break;
- case 1 : //In field
- {
- std::string Data_Raw((const char*)(Buffer+Buffer_Offset+Element_Offset), (size_t)10);//Element_Size-(Element_Offset));
- std::string Data_Base64(Base64::encode(Data_Raw));
- Fill(Stream_Audio, StreamPos_Last, "Demux_InitBytes", Data_Base64);
- (*Stream_More)[Stream_Audio][StreamPos_Last](Ztring().From_Local("Demux_InitBytes"), Info_Options)=__T("N NT");
- }
- break;
- default : ;
- }
- #endif //MEDIAINFO_DEMUX
-
- //Parsing
- Skip_L4( "SamplesPerBlock");
- Skip_L2( "EncodeOptions");
- Skip_L4( "SuperBlockAlign");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_StreamProperties_Audio_AMR ()
-{
- Element_Info1("AMR");
-
- //Parsing
- int32u Flags;
- bool VBR;
- Get_L4 (Flags, "Flags");
- Skip_Flags(Flags, 0, "SID is used");
- Get_Flags (Flags, 1, VBR, "Varying bitrate");
-
- //Filling
- Fill(Stream_Audio, StreamPos_Last, Audio_BitRate_Mode, VBR?"VBR":"CBR");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_StreamProperties_Video ()
-{
- Element_Name("Video");
-
- //Parsing
- int32u Width, Height, Compression;
- int16u Data_Size, Resolution;
- Get_L4 (Width, "Width");
- Get_L4 (Height, "Height");
- Skip_L1( "Flags");
- Get_L2 (Data_Size, "Format Data Size");
- Skip_L4( "Size");
- Get_L4 (Width, "Width");
- Get_L4 (Height, "Height");
- Skip_L2( "Planes");
- Get_L2 (Resolution, "BitCount");
- Get_C4 (Compression, "Compression");
- Skip_L4( "SizeImage");
- Skip_L4( "XPelsPerMeter");
- Skip_L4( "YPelsPerMeter");
- Skip_L4( "ClrUsed");
- Skip_L4( "ClrImportant");
-
- //Filling
- Stream_Prepare(Stream_Video);
- Stream[Stream_Number].IsCreated=true;
- CodecID_Fill(Ztring().From_CC4(Compression), Stream_Video, StreamPos_Last, InfoCodecID_Format_Riff);
- Fill(Stream_Video, StreamPos_Last, Video_Codec, Ztring().From_CC4(Compression)); //May be replaced by codec parser
- Fill(Stream_Video, StreamPos_Last, Video_Codec_CC, Ztring().From_CC4(Compression));
- Fill(Stream_Video, StreamPos_Last, Video_Width, Width);
- Fill(Stream_Video, StreamPos_Last, Video_Height, Height);
- if (Resolution>0)
- Fill(Stream_Video, StreamPos_Last, Video_BitDepth, (Resolution%3)?Resolution:(Resolution/3)); //If not a multiple of 3, the total resolution is filled
- if (Compression==CC4("DVR "))
- IsDvrMs=true;
-
- //From Content description (we imagine that data is for all video streams...)
- if (Header_ExtendedContentDescription_AspectRatioX && Header_ExtendedContentDescription_AspectRatioY)
- {
- if (Header_ExtendedContentDescription_AspectRatioX==16 && Header_ExtendedContentDescription_AspectRatioY==9)
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, ((float32)16)/9, 3);
- else if (Header_ExtendedContentDescription_AspectRatioX==4 && Header_ExtendedContentDescription_AspectRatioY==3)
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, ((float32)4)/3, 3);
- else
- Fill(Stream_Video, StreamPos_Last, Video_PixelAspectRatio, ((float32)Header_ExtendedContentDescription_AspectRatioX)/Header_ExtendedContentDescription_AspectRatioY, 3, true);
- }
-
- //Creating the parser
- if (0);
- #if defined(MEDIAINFO_VC1_YES)
- else if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Riff, Ztring().From_CC4(Compression), InfoCodecID_Format)==__T("VC-1"))
- {
- Stream[Stream_Number].Parser=new File_Vc1;
- if (Compression==CC4("WMV3"))
- {
- ((File_Vc1*)Stream[Stream_Number].Parser)->From_WMV3=true;
- ((File_Vc1*)Stream[Stream_Number].Parser)->MustSynchronize=false;
- }
- ((File_Vc1*)Stream[Stream_Number].Parser)->FrameIsAlwaysComplete=true; //Warning: this is not always the case, see data parsing
- Open_Buffer_Init(Stream[Stream_Number].Parser);
- if (Data_Size>40)
- {
-
- //Demux
- #if MEDIAINFO_DEMUX
- switch (Config->Demux_InitData_Get())
- {
- case 0 : //In demux event
- Element_Code=Stream_Number;
- Demux_Level=2; //Container
- Demux(Buffer+(size_t)Element_Offset, (size_t)(Data_Size-40), ContentType_Header);
- break;
- case 1 : //In field
- {
- std::string Data_Raw((const char*)(Buffer+(size_t)Element_Offset), (size_t)(Data_Size-40));
- std::string Data_Base64(Base64::encode(Data_Raw));
- Fill(Stream_Video, StreamPos_Last, "Demux_InitBytes", Data_Base64);
- (*Stream_More)[Stream_Video][StreamPos_Last](Ztring().From_Local("Demux_InitBytes"), Info_Options)=__T("N NT");
- }
- break;
- default : ;
- }
- #endif //MEDIAINFO_DEMUX
-
- Open_Buffer_Continue(Stream[Stream_Number].Parser, (size_t)(Data_Size-40));
- if (Stream[Stream_Number].Parser->Status[IsFinished])
- {
- Finish(Stream[Stream_Number].Parser);
- Merge(*Stream[Stream_Number].Parser, Stream_Video, 0, StreamPos_Last);
- delete Stream[Stream_Number].Parser; Stream[Stream_Number].Parser=NULL;
- }
- else
- {
- ((File_Vc1*)Stream[Stream_Number].Parser)->Only_0D=true;
- ((File_Vc1*)Stream[Stream_Number].Parser)->MustSynchronize=false;
- }
- }
- }
- #endif
- #if defined(MEDIAINFO_MPEGV_YES)
- else if (MediaInfoLib::Config.Codec_Get(Ztring().From_CC4(Compression), InfoCodec_KindofCodec).find(__T("MPEG-2"))==0)
- {
- Stream[Stream_Number].Parser=new File_Mpegv;
- ((File_Mpegv*)Stream[Stream_Number].Parser)->Frame_Count_Valid=30; //For searching Pulldown
- Open_Buffer_Init(Stream[Stream_Number].Parser);
- }
- #endif
- else if (Data_Size>40) //TODO: see "The Mummy_e"
- Skip_XX(Data_Size-40, "Codec Specific Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_StreamProperties_JFIF ()
-{
- Element_Name("JFIF");
-
- //Parsing
- int32u Width, Height;
- Get_L4 (Width, "Width");
- Get_L4 (Height, "Height");
- Skip_L4( "Reserved");
-
- //Filling
- Stream_Prepare(Stream_Image);
- Fill(Stream_Video, StreamPos_Last, Video_Format, "JPEG");
- Fill(Stream_Video, StreamPos_Last, Video_Codec, "JPEG");
- Fill(Stream_Video, StreamPos_Last, Video_Width, Width);
- Fill(Stream_Video, StreamPos_Last, Video_Height, Height);
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_StreamProperties_DegradableJPEG ()
-{
- Element_Name("Degradable JPEG");
-
- int32u Width, Height;
- int16u InterchangeDataLength;
- Get_L4 (Width, "Width");
- Get_L4 (Height, "Height");
- Skip_L2( "Reserved");
- Skip_L2( "Reserved");
- Skip_L2( "Reserved");
- Get_L2 (InterchangeDataLength, "Interchange data length");
- if (InterchangeDataLength>0)
- Skip_XX(InterchangeDataLength, "Interchange data");
- else
- Skip_L1( "Zero");
-
- //Filling
- Stream_Prepare(Stream_Image);
- Fill(Stream_Video, StreamPos_Last, Video_Format, "JPEG");
- Fill(Stream_Video, StreamPos_Last, Video_Codec, "JPEG");
- Fill(Stream_Video, StreamPos_Last, Video_Width, Width);
- Fill(Stream_Video, StreamPos_Last, Video_Height, Height);
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_StreamProperties_Binary ()
-{
- Element_Name("Binary");
-
- //Parsing
- int32u FormatDataLength;
- Skip_GUID( "Major media type");
- Skip_GUID( "Media subtype");
- Skip_L4( "Fixed-size samples");
- Skip_L4( "Temporal compression");
- Skip_L4( "Sample size");
- Skip_GUID( "Format type");
- Get_L4 (FormatDataLength, "Format data size");
- if (FormatDataLength>0)
- Skip_XX(FormatDataLength, "Format data");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension()
-{
- Element_Name("Header Extension");
-
- //Parsing
- int32u Size;
- Skip_GUID( "ClockType");
- Skip_L2( "ClockSize");
- Get_L4 (Size, "Extension Data Size");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_ExtendedStreamProperties()
-{
- Element_Name("Extended Stream Properties");
-
- //Parsing
- int64u AverageTimePerFrame;
- int32u DataBitrate, Flags;
- int16u StreamNumber, LanguageID, StreamNameCount, PayloadExtensionSystemCount;
- Info_L8(StartTime, "Start Time"); Param_Info_From_Milliseconds(StartTime);
- Info_L8(EndTime, "End Time"); Param_Info_From_Milliseconds(EndTime);
- Get_L4 (DataBitrate, "Data Bitrate");
- Skip_L4( "Buffer Size");
- Skip_L4( "Initial Buffer Fullness");
- Skip_L4( "Alternate Data Bitrate");
- Skip_L4( "Alternate Buffer Size");
- Skip_L4( "Alternate Initial Buffer Fullness");
- Skip_L4( "Maximum Object Size");
- Get_L4 (Flags, "Flags");
- Skip_Flags(Flags, 0, "Reliable");
- Skip_Flags(Flags, 1, "Seekable");
- Skip_Flags(Flags, 2, "No Cleanpoints");
- Skip_Flags(Flags, 3, "Resend Live Cleanpoints");
- Get_L2 (StreamNumber, "Stream Number"); Element_Info1(StreamNumber);
- Get_L2 (LanguageID, "Stream Language ID Index");
- Get_L8 (AverageTimePerFrame, "Average Time Per Frame");
- Get_L2 (StreamNameCount, "Stream Name Count");
- Get_L2 (PayloadExtensionSystemCount, "Payload Extension System Count");
- for (int16u Pos=0; Pos<StreamNameCount; Pos++)
- {
- Element_Begin1("Stream Name");
- int16u StreamNameLength;
- Skip_L2( "Language ID Index");
- Get_L2 (StreamNameLength, "Stream Name Length");
- Skip_UTF16L(StreamNameLength, "Stream Name");
- Element_End0();
- }
- for (int16u Pos=0; Pos<PayloadExtensionSystemCount; Pos++)
- {
- Element_Begin1("Payload Extension System");
- stream::payload_extension_system Payload_Extension_System;
- int32u ExtensionSystemInfoLength;
- Get_GUID(Payload_Extension_System.ID, "Extension System ID");
- Get_L2 (Payload_Extension_System.Size, "Extension Data Size");
- Get_L4 (ExtensionSystemInfoLength, "Extension System Info Length");
- if (ExtensionSystemInfoLength>0)
- Skip_XX(ExtensionSystemInfoLength, "Extension System Info");
- Element_End0();
-
- //Filling
- Stream[StreamNumber].Payload_Extension_Systems.push_back(Payload_Extension_System);
- }
-
- //Header_StreamProperties
- if (Element_Offset<Element_Size)
- {
- //This could be everything, but in theory this is only Header_StreamProperties
- int128u Name;
- int64u Size;
- Element_Begin1("Stream Properties Object");
- Element_Begin1("Header");
- Get_GUID(Name, "Name");
- Get_L8 (Size, "Size");
- Element_End0();
- if (Size>=24 && Element_Offset+Size-24==Element_Size)
- {
- switch (Name.hi)
- {
- case Elements::Header_StreamProperties : Header_StreamProperties(); break;
- default : Skip_XX(Size-24, "Unknown");
- }
- }
- else
- Skip_XX(Element_Size-Element_Offset, "Problem");
- Element_End0();
- }
-
- //Filling
- Stream[StreamNumber].LanguageID=LanguageID;
- Stream[StreamNumber].AverageBitRate=DataBitrate;
- Stream[StreamNumber].AverageTimePerFrame=AverageTimePerFrame;
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_AdvancedMutualExclusion()
-{
- Element_Name("Advanced Mutual Exclusion");
-
- //Parsing
- int16u Count;
- Info_GUID(ExclusionType, "Exclusion Type"); Param_Info1(Wm_ExclusionType(ExclusionType));
- Get_L2 (Count, "Stream Numbers Count");
- for (int16u Pos=0; Pos<Count; Pos++)
- {
- Info_L2(StreamNumber, "Stream Number"); Element_Info1(StreamNumber);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_GroupMutualExclusion()
-{
- Element_Name("Group Mutual Exclusion");
-
- //Parsing
- Skip_XX(Element_Size, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_StreamPrioritization()
-{
- Element_Name("Stream Prioritization");
-
- //Parsing
- int16u Count;
- Get_L2 (Count, "Stream Numbers Count");
- for (int16u Pos=0; Pos<Count; Pos++)
- {
- int16u Flags;
- Element_Begin1("Stream");
- Info_L2(StreamNumber, "Stream Number"); Element_Info1(StreamNumber);
- Get_L2 (Flags, "Flags");
- Skip_Flags(Flags, 0, "Mandatory");
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_BandwidthSharing()
-{
- Element_Name("Bandwidth Sharing");
-
- //Parsing
- Skip_XX(Element_Size, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_LanguageList()
-{
- Element_Name("Language List");
-
- //Parsing
- Ztring LanguageID;
- int16u Count;
- int8u LanguageID_Length;
- Get_L2 (Count, "Count");
- for (int16u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("Language ID");
- Get_L1 (LanguageID_Length, "Language ID Length");
- if (LanguageID_Length>0)
- {
- Get_UTF16L(LanguageID_Length, LanguageID, "Language ID");
- Element_Info1(LanguageID);
- }
- Element_End0();
-
- //Filling
- Languages.push_back(LanguageID);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_MetadataLibrary()
-{
- Element_Name("Metadata Library");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_Metadata()
-{
- Element_Name("Metadata");
-
- //Parsing
- float32 AspectRatioX=0, AspectRatioY=0;
- int16u Count;
- Get_L2 (Count, "Description Records Count");
- for (int16u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("Description Record");
- Ztring Name, Data;
- int64u Data_Int64=0;
- int32u Data_Length;
- int16u StreamNumber, Name_Length, Data_Type;
- Skip_L2( "Reserved");
- Get_L2 (StreamNumber, "Stream Number");
- Get_L2 (Name_Length, "Name Length");
- Get_L2 (Data_Type, "Data Type");
- Get_L4 (Data_Length, "Data Length");
- Get_UTF16L(Name_Length, Name, "Name Length");
- switch (Data_Type)
- {
- case 0x00 : Get_UTF16L(Data_Length, Data, "Data"); break;
- case 0x01 : Skip_XX(Data_Length, "Data"); Data=__T("(Binary)"); break;
- case 0x02 : {int16u Data_Int; Get_L2 (Data_Int, "Data"); Data=(Data_Int==0)?__T("No"):__T("Yes"); Data_Int64=Data_Int;} break;
- case 0x03 : {int32u Data_Int; Get_L4 (Data_Int, "Data"); Data.From_Number(Data_Int); Data_Int64=Data_Int;} break;
- case 0x04 : {int64u Data_Int; Get_L8 (Data_Int, "Data"); Data.From_Number(Data_Int); Data_Int64=Data_Int;} break;
- case 0x05 : {int16u Data_Int; Get_L2 (Data_Int, "Data"); Data.From_Number(Data_Int); Data_Int64=Data_Int;} break;
- default : Skip_XX(Data_Length, "Data"); Data=__T("(Unknown)"); break;
- }
- Element_Info1(Name);
- Element_Info1(Data);
- Element_End0();
-
- if (Name==__T("IsVBR"))
- Stream[StreamNumber].Info["BitRate_Mode"]=(Data_Int64==0)?"CBR":"VBR";
- else if (Name==__T("AspectRatioX"))
- {
- AspectRatioX=Data.To_float32();
- if (AspectRatioX && AspectRatioY)
- Stream[StreamNumber].Info["PixelAspectRatio"].From_Number(AspectRatioX/AspectRatioY, 3);
- }
- else if (Name==__T("AspectRatioY"))
- {
- AspectRatioY=Data.To_float32();
- if (AspectRatioX && AspectRatioY)
- Stream[StreamNumber].Info["PixelAspectRatio"].From_Number(AspectRatioX/AspectRatioY, 3);
- }
- else if (Name==__T("DeviceConformanceTemplate"))
- {
- if (Data!=__T("@") && Data.find(__T('@'))!=std::string::npos)
- Stream[StreamNumber].Info["Format_Profile"]=Data;
- }
- else if (Name==__T("WM/WMADRCPeakReference")) {}
- else if (Name==__T("WM/WMADRCAverageReference")) {}
- else if (Name==__T("WM/WMADRCAverageTarget")) {}
- else if (Name==__T("WM/WMADRCPeakTarget")) {}
- else
- Stream[StreamNumber].Info[Name.To_Local()]=Data;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_IndexParameters()
-{
- Element_Name("Index Parameters");
-
- //Parsing
- int16u Count;
- Skip_L4( "Index Entry Time Interval");
- Get_L2 (Count, "Index Specifiers Count");
- for (int16u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("Index Specifier");
- int16u IndexType;
- Skip_L2( "Stream Number");
- Get_L2 (IndexType, "Index Type");
- Element_Info1(IndexType);
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_MediaIndexParameters()
-{
- Header_HeaderExtension_IndexParameters();
-
- Element_Name("MediaIndex Parameters");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_TimecodeIndexParameters()
-{
- Header_HeaderExtension_IndexParameters();
-
- Element_Name("Timecode Index Parameters");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_Compatibility()
-{
- Element_Name("Compatibility");
-
- //Parsing
- Skip_L1( "Profile");
- Skip_L1( "Mode");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_AdvancedContentEncryption()
-{
- Element_Name("Advanced Content Encryption");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_HeaderExtension_IndexPlaceholder()
-{
- Element_Name("Index Placeholder");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_CodecList()
-{
- Element_Name("Codec List");
-
- //Parsing
- Ztring CodecName, CodecDescription;
- int32u Count32;
- int16u Count, Type, CodecNameLength, CodecDescriptionLength, CodecInformationLength;
- Skip_GUID( "Reserved");
- Get_L4 (Count32, "Codec Entries Count");
- Count=(int16u)Count32;
- CodecInfos.resize(Count);
- for (int16u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("Codec Entry");
- Get_L2 (Type, "Type"); Param_Info1(Wm_CodecList_Kind(Type));
- Get_L2 (CodecNameLength, "Codec Name Length");
- Get_UTF16L(CodecNameLength*2, CodecName, "Codec Name");
- Get_L2 (CodecDescriptionLength, "Codec Description Length");
- Get_UTF16L(CodecDescriptionLength*2, CodecDescription, "Codec Description");
- Get_L2 (CodecInformationLength, "Codec Information Length");
- if (Type==2 && CodecInformationLength==2) //Audio and 2CC
- Skip_L2( "2CC"); //Not used, we have it elsewhere
- else if (Type==1 && CodecInformationLength==4) //Video and 4CC
- Skip_C4( "4CC"); //Not used, we have it elsewhere
- else
- Skip_XX(CodecInformationLength, "Codec Information");
- Element_End0();
-
- FILLING_BEGIN();
- CodecInfos[Pos].Type=Type;
- CodecInfos[Pos].Info=CodecName;
- if (!CodecDescription.empty())
- {
- CodecInfos[Pos].Info+=__T(" - ");
- CodecInfos[Pos].Info+=CodecDescription;
- }
-
- Codec_Description_Count++;
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_ScriptCommand()
-{
- Element_Name("Script Command");
-
- //Parsing
- Skip_GUID( "Reserved");
- int16u Commands_Count, CommandTypes_Count;
- Get_L2 (Commands_Count, "Commands Count");
- Get_L2 (CommandTypes_Count, "Command Types Count");
- for (int16u Pos=0; Pos<CommandTypes_Count; Pos++)
- {
- Element_Begin1("Command Type");
- int16u Length;
- Get_L2 (Length, "Command Type Length");
- if (Length>0)
- Skip_UTF16L(Length*2, "Command Type");
- Element_End0();
- }
- for (int16u Pos=0; Pos<Commands_Count; Pos++)
- {
- Element_Begin1("Command");
- int16u Length;
- Skip_L2( "Type Index");
- Get_L2 (Length, "Command Length");
- if (Length>0)
- Skip_UTF16L(Length*2, "Command");
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_Marker()
-{
- Element_Name("Markers");
-
- //Parsing
- Skip_GUID( "Reserved");
- int32u Markers_Count;
- int16u Name_Length;
- Get_L4 (Markers_Count, "Markers Count");
- Skip_L2( "Reserved");
- Get_L2 (Name_Length, "Name Length");
- if (Name_Length>0)
- Skip_UTF16L(Name_Length, "Name");
-
- //Filling
- if (Markers_Count>0)
- Stream_Prepare(Stream_Menu);
-
- //Parsing
- for (int32u Pos=0; Pos<Markers_Count; Pos++)
- {
- Element_Begin1("Marker");
- Ztring Marker;
- int32u Marker_Length;
- Skip_L8( "Offset");
- Info_L8(PresentationTime, "Presentation Time"); Param_Info_From_Milliseconds(PresentationTime/10000);
- Skip_L2( "Entry Length");
- Info_L4(SendTime, "Send Time"); Param_Info_From_Milliseconds(SendTime);
- Skip_L4( "Flags");
- Get_L4 (Marker_Length, "Marker Description Length");
- if (Marker_Length>0)
- Get_UTF16L(Marker_Length*2, Marker, "Marker Description");
- Element_End0();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_BitRateMutualExclusion()
-{
- Element_Name("BitRate Mutual Exclusion");
-
- //Parsing
- int16u Count;
- Skip_GUID( "Exclusion Type");
- Get_L2 (Count, "Stream Numbers Count");
- for (int16u Pos=0; Pos<Count; Pos++)
- Skip_L2( "Stream Number");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_ErrorCorrection()
-{
- Element_Name("Error Correction");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_ContentDescription()
-{
- Element_Name("Content Description");
-
- //Parsing
- Ztring Title, Author, Copyright, Description, Rating;
- int16u TitleLength, AuthorLength, CopyrightLength, DescriptionLength, RatingLength;
- Get_L2 (TitleLength, "TitleLength");
- Get_L2 (AuthorLength, "AuthorLength");
- Get_L2 (CopyrightLength, "CopyrightLength");
- Get_L2 (DescriptionLength, "DescriptionLength");
- Get_L2 (RatingLength, "RatingLength");
- if (TitleLength>0)
- Get_UTF16L(TitleLength, Title, "Title");
- if (AuthorLength>0)
- Get_UTF16L(AuthorLength, Author, "Author");
- if (CopyrightLength>0)
- Get_UTF16L(CopyrightLength, Copyright, "Copyright");
- if (DescriptionLength>0)
- Get_UTF16L(DescriptionLength, Description, "Description");
- if (RatingLength>0)
- Get_UTF16L(RatingLength, Rating, "Rating");
-
- //Filling
- Fill(Stream_General, 0, General_Title, Title);
- Fill(Stream_General, 0, General_Performer, Author);
- Fill(Stream_General, 0, General_Copyright, Copyright);
- Fill(Stream_General, 0, General_Comment, Description);
- Fill(Stream_General, 0, General_Rating, Rating);
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_ExtendedContentDescription()
-{
- Element_Name("Extended Content Description");
-
- //Parsing
- int16u Count;
- Get_L2 (Count, "Content Descriptors Count");
- for (int16u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("Content Descriptor");
- Ztring Name, Value;
- int64u Value_Int64=0;
- int16u Name_Length, Value_Type, Value_Length;
- Get_L2 (Name_Length, "Name Length");
- Get_UTF16L(Name_Length, Name, "Name");
- Get_L2 (Value_Type, "Value Data Type");
- Get_L2 (Value_Length, "Value Length");
- switch (Value_Type)
- {
- case 0x00 : Get_UTF16L(Value_Length, Value, "Value"); break;
- case 0x01 :
- if (Name==__T("ASFLeakyBucketPairs")) Header_ExtendedContentDescription_ASFLeakyBucketPairs(Value_Length);
- else {Skip_XX(Value_Length, "Value"); Value=__T("(Binary)");} break;
- case 0x02 : {int32u Value_Int; Get_L4 (Value_Int, "Value"); Value=(Value_Int==0)?__T("No"):__T("Yes"); Value_Int64=Value_Int;} break;
- case 0x03 : {int32u Value_Int; Get_L4 (Value_Int, "Value"); Value.From_Number(Value_Int); Value_Int64=Value_Int;} break;
- case 0x04 : {int64u Value_Int; Get_L8 (Value_Int, "Value"); Value.From_Number(Value_Int); Value_Int64=Value_Int;} break;
- case 0x05 : {int16u Value_Int; Get_L2 (Value_Int, "Value"); Value.From_Number(Value_Int); Value_Int64=Value_Int;} break;
- default : Skip_XX(Value_Length, "Value"); Value=__T("(Unknown)"); break;
- }
- Element_Info1(Name);
- Element_Info1(Value);
- Element_End0();
-
- //Filling
- if (!Value.empty())
- {
- if (Name==__T("Agility FPS")) {}
- else if (Name==__T("ASFLeakyBucketPairs")) {} //Already done elsewhere
- else if (Name==__T("AspectRatioX")) Header_ExtendedContentDescription_AspectRatioX=Value_Int64;
- else if (Name==__T("AspectRatioY")) Header_ExtendedContentDescription_AspectRatioY=Value_Int64;
- else if (Name==__T("Buffer Average")) {}
- else if (Name==__T("DVR Index Granularity")) {}
- else if (Name==__T("DVR File Version")) {}
- else if (Name==__T("IsVBR"))
- Fill(Stream_General, 0, General_OverallBitRate_Mode, Value_Int64==0?"CBR":"VBR");
- else if (Name==__T("VBR Peak")) {} //Already in "Stream Bitrate" chunk
- else if (Name==__T("WMFSDKVersion")) {}
- else if (Name==__T("WMFSDKNeeded")) {}
- else if (Name==__T("WM/AlbumTitle"))
- Fill(Stream_General, 0, General_Album, Value);
- else if (Name==__T("WM/AlbumArtist"))
- {
- Fill(Stream_General, 0, General_Performer, "");
- Fill(Stream_General, 0, General_Performer, Value, true); //Clear last value, like Author (Content Description)
- }
- else if (Name==__T("WM/ArtistSortOrder"))
- Fill(Stream_General, 0, General_Performer_Sort, Value);
- else if (Name==__T("WM/AuthorURL"))
- Fill(Stream_General, 0, "Author/Url", Value);
- else if (Name==__T("WM/BeatsPerMinute"))
- Fill(Stream_General, 0, General_BPM, Value);
- else if (Name==__T("WM/Binary"))
- Fill(Stream_General, 0, General_Cover, "Y");
- else if (Name==__T("WM/Comments"))
- Fill(Stream_General, 0, General_Comment, Value, true); //Clear last value
- else if (Name==__T("WM/Composer"))
- Fill(Stream_General, 0, General_Composer, Value);
- else if (Name==__T("WM/Conductor"))
- Fill(Stream_General, 0, General_Conductor, Value);
- else if (Name==__T("WM/EncodedBy"))
- Fill(Stream_General, 0, General_EncodedBy, Value);
- else if (Name==__T("WM/EncoderSettings"))
- Fill(Stream_General, 0, General_Encoded_Library_Settings, Value);
- else if (Name==__T("WM/EncodingTime"))
- Fill(Stream_General, 0, General_Encoded_Date, Ztring().Date_From_Seconds_1601(Value_Int64));
- else if (Name==__T("WM/Genre"))
- Fill(Stream_General, 0, General_Genre, Value, true); //Clear last value
- else if (Name==__T("WM/GenreID"))
- {
- if (Retrieve(Stream_General, 0, General_Genre).empty())
- Fill(Stream_General, 0, General_Genre, Value);
- }
- else if (Name==__T("WM/Language"))
- Language_ForAll=Value;
- else if (Name==__T("WM/MediaCredits"))
- Fill(Stream_General, 0, General_ThanksTo, Value);
- else if (Name==__T("WM/MediaPrimaryClassID")) {}
- else if (Name==__T("WM/MCDI")) {}
- else if (Name==__T("WM/ModifiedBy"))
- Fill(Stream_General, 0, General_RemixedBy, Value);
- else if (Name==__T("WM/OriginalAlbumTitle"))
- Fill(Stream_General, 0, "Original/Album", Value);
- else if (Name==__T("WM/OriginalReleaseTime"))
- Fill(Stream_General, 0, "Original/Released_Date", Value);
- else if (Name==__T("WM/ParentalRating"))
- Fill(Stream_General, 0, General_LawRating, Value);
- else if (Name==__T("WM/ParentalRatingReason"))
- Fill(Stream_General, 0, General_LawRating_Reason, Value);
- else if (Name==__T("WM/Picture"))
- Fill(Stream_General, 0, General_Cover, "Y");
- else if (Name==__T("WM/Provider"))
- Fill(Stream_General, 0, "Provider", Value);
- else if (Name==__T("WM/Publisher"))
- Fill(Stream_General, 0, General_Publisher, Value);
- else if (Name==__T("WM/RadioStationName"))
- Fill(Stream_General, 0, General_ServiceName, Value);
- else if (Name==__T("WM/RadioStationOwner"))
- Fill(Stream_General, 0, General_ServiceProvider, Value);
- else if (Name==__T("WM/SubTitle"))
- Fill(Stream_General, 0, General_Title_More, Value);
- else if (Name==__T("WM/SubTitleDescription"))
- Fill(Stream_General, 0, General_Title_More, Value);
- else if (Name==__T("WM/ToolName"))
- Fill(Stream_General, 0, General_Encoded_Application, Value);
- else if (Name==__T("WM/ToolVersion"))
- Fill(Stream_General, 0, General_Encoded_Application, Retrieve(Stream_General, 0, General_Encoded_Application)+__T(" ")+Value, true);
- else if (Name==__T("WM/TrackNumber"))
- Fill(Stream_General, 0, General_Track_Position, Value, true); //Clear last value, like WM/Track
- else if (Name==__T("WM/Track"))
- {
- if (Retrieve(Stream_General, 0, General_Track_Position).empty())
- Fill(Stream_General, 0, General_Track_Position, Value.To_int32u()+1);
- }
- else if (Name==__T("WM/UniqueFileIdentifier"))
- {
- if (Value.empty() || Value[0]!=__T(';')) //Test if there is only the separator
- {
- Value.FindAndReplace(__T(";"), MediaInfoLib::Config.TagSeparator_Get());
- Fill(Stream_General, 0, General_UniqueID, Value);
- }
- }
- else if (Name==__T("WM/Writer"))
- Fill(Stream_General, 0, General_WrittenBy, Value);
- else if (Name==__T("WM/Year"))
- Fill(Stream_General, 0, General_Recorded_Date, Value);
- else
- Fill(Stream_General, 0, Name.To_Local().c_str(), Value);
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_ExtendedContentDescription_ASFLeakyBucketPairs(int16u Value_Length)
-{
- Element_Begin1("ASFLeakyBucketPairs");
- Skip_L2( "Reserved");
- for (int16u Pos=2; Pos<Value_Length; Pos+=8)
- {
- Element_Begin1("Bucket");
- Skip_L4( "BitRate");
- Skip_L4( "msBufferWindow");
- Element_End0();
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_StreamBitRate()
-{
- Element_Name("Stream Bitrate");
-
- //Parsing
- int16u Count;
- Get_L2 (Count, "Count");
- for (int16u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("Stream");
- int32u AverageBitRate;
- int16u StreamNumber;
- Get_L2 (StreamNumber, "Stream Number"); Element_Info1(StreamNumber);
- Get_L4 (AverageBitRate, "Average Bitrate"); Element_Info1(AverageBitRate);
- Element_End0();
-
- //Filling
- if (Stream[StreamNumber].AverageBitRate==0) //Prefere Average bitrate of Extended Stream Properties if present
- Stream[StreamNumber].AverageBitRate=AverageBitRate;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_ContentBranding()
-{
- Element_Name("Content Branding");
-
- //Parsing
- Ztring CopyrightURL, BannerImageURL;
- int32u BannerImageData_Type, BannerImageData_Length, BannerImageURL_Length, CopyrightURL_Length;
- Get_L4 (BannerImageData_Type, "Banner Image Data Type"); Param_Info1(Wm_BannerImageData_Type(BannerImageData_Type));
- Get_L4 (BannerImageData_Length, "Banner Image Data Length");
- if (BannerImageData_Length>0)
- Skip_XX(BannerImageData_Length, "Banner Image Data");
- Get_L4 (BannerImageURL_Length, "Banner Image URL Length");
- if (BannerImageURL_Length>0)
- Get_Local(BannerImageURL_Length, BannerImageURL, "Banner Image URL");
- Get_L4 (CopyrightURL_Length, "Copyright URL Length");
- if (CopyrightURL_Length>0)
- Get_Local(CopyrightURL_Length, CopyrightURL, "Copyright URL");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_ContentEncryption()
-{
- Element_Name("Content Encryption");
-
- //Parsing
- Ztring LicenseURL;
- int32u SecretDataLength, ProtectionTypeLength, KeyIDLength, LicenseURLLength;
- Get_L4 (SecretDataLength, "Secret Data Length");
- Skip_XX(SecretDataLength, "Secret Data");
- Get_L4 (ProtectionTypeLength, "Protection Type Length");
- Skip_Local(ProtectionTypeLength, "Protection Type");
- Get_L4 (KeyIDLength, "Key ID Length");
- Skip_Local(KeyIDLength, "Key ID Type");
- Get_L4 (LicenseURLLength, "License URL Length");
- Get_Local(LicenseURLLength, LicenseURL, "License URL");
-
- //Filling
- Fill(Stream_General, 0, "Encryption", LicenseURL);
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_ExtendedContentEncryption()
-{
- Element_Name("Extended Content Encryption");
-
- //Parsing
- int32u DataLength;
- Get_L4 (DataLength, "Data Length");
- Skip_XX(DataLength, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_DigitalSignature()
-{
- Element_Name("Digital Signature");
-
- //Parsing
- int32u DataLength;
- Skip_L4( "Signature Type");
- Get_L4 (DataLength, "Signature Data Length");
- Skip_XX(DataLength, "Signature Data");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Header_Padding()
-{
- Element_Name("Padding");
-
- //Parsing
- Skip_XX(Element_Size, "Padding");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Data()
-{
- Element_Name("Data");
-
- //Parsing
- Skip_GUID( "File ID");
- Skip_L8( "Total Data Packets");
- Skip_L1( "Alignment");
- Skip_L1( "Packet Alignment");
-
- //Filling
- Fill(Stream_General, 0, General_HeaderSize, File_Offset+Buffer_Offset-24);
- Fill(Stream_General, 0, General_DataSize, Element_TotalSize_Get()+24);
-
- //For each stream
- Streams_Count=0;
- std::map<int16u, stream>::iterator Temp=Stream.begin();
- while (Temp!=Stream.end())
- {
- #if defined(MEDIAINFO_MPEGA_YES)
- if (IsDvrMs && !Temp->second.Parser && Temp->second.AverageBitRate>=32768)
- {
- Temp->second.Parser=new File_Mpega; //No stream properties, trying to detect it in datas...
- ((File_Mpega*)Temp->second.Parser)->Frame_Count_Valid=8;
- Open_Buffer_Init(Temp->second.Parser);
- }
- #endif
- if (Temp->second.Parser || Temp->second.StreamKind==Stream_Video) //We need Stream_Video for Frame_Rate computing
- {
- Temp->second.SearchingPayload=true;
- Streams_Count++;
- }
- ++Temp;
- }
-
- //Enabling the alternative parser
- MustUseAlternativeParser=true;
- Data_AfterTheDataChunk=File_Offset+Buffer_Offset+Element_TotalSize_Get();
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Data_Packet()
-{
- //Counting
- Packet_Count++;
- Element_Info1(Packet_Count);
- size_t Element_Show_Count=0;
-
- //Parsing
- int32u PacketLength=0, SizeOfMediaObject=0;
- int8u Flags, ErrorCorrectionData_Length, ErrorCorrectionLengthType, SequenceType, PaddingLengthType, PacketLengthType;
- bool ErrorCorrectionPresent;
- Element_Begin1("Error Correction");
- Get_L1 (Flags, "Flags");
- Get_FlagsM(Flags&0x0F, ErrorCorrectionData_Length, "Error Correction Data Length"); //4 lowest bits
- Skip_Flags(Flags, 4, "Opaque Data Present");
- Get_FlagsM((Flags>>5)&0x03, ErrorCorrectionLengthType, "Error Correction Length Type"); //bits 6 and 7
- Get_Flags (Flags, 7, ErrorCorrectionPresent, "Error Correction Present");
- if (ErrorCorrectionPresent && ErrorCorrectionLengthType==0 && ErrorCorrectionData_Length==2)
- {
- int8u TypeNumber;
- Get_L1 (TypeNumber, "Type/Number");
- Skip_FlagsM((TypeNumber>>4)&0x0F, "Type");
- Skip_FlagsM( TypeNumber &0x0F, "Number");
- Skip_L1( "Cycle");
- }
- Element_End0();
-
- Element_Begin1("Payload Parsing Information");
- Get_L1 (Flags, "Length Type Flags");
- Get_Flags (Flags, 0, MultiplePayloadsPresent, "Multiple Payloads Present");
- Get_FlagsM((Flags>>1)&0x3, SequenceType, "Sequence Type");
- Get_FlagsM((Flags>>3)&0x3, PaddingLengthType, "Padding Length Type");
- Get_FlagsM((Flags>>5)&0x3, PacketLengthType, "Packet Length Type");
- Skip_Flags(Flags, 7, "Error Correction Present");
- Get_L1 (Flags, "Property Flags");
- Get_FlagsM( Flags &0x3, ReplicatedDataLengthType, "Replicated Data Length Type");
- Get_FlagsM((Flags>>2)&0x3, OffsetIntoMediaObjectLengthType, "Offset Into Media Object Length Type");
- Get_FlagsM((Flags>>4)&0x3, MediaObjectNumberLengthType, "Media Object Number Length Type");
- Get_FlagsM((Flags>>6)&0x3, StreamNumberLengthType, "Stream Number Length Type");
- switch (PacketLengthType)
- {
- case 1 : {int8u Data; Get_L1(Data, "Packet Length"); PacketLength=Data;} break;
- case 2 : {int16u Data; Get_L2(Data, "Packet Length"); PacketLength=Data;} break;
- case 3 : Get_L4(PacketLength, "Packet Length"); break;
- default: ;
- }
- switch (SequenceType)
- {
- case 1 : Skip_L1( "Sequence"); break;
- case 2 : Skip_L2( "Sequence"); break;
- case 3 : Skip_L4( "Sequence"); break;
- default: ;
- }
- switch (PaddingLengthType)
- {
- case 1 : {int8u Data; Get_L1(Data, "Padding Length"); Data_Parse_Padding=Data;} break;
- case 2 : {int16u Data; Get_L2(Data, "Padding Length"); Data_Parse_Padding=Data;} break;
- case 3 : Get_L4(Data_Parse_Padding, "Padding Length"); break;
- default: Data_Parse_Padding=0;
- }
- Skip_L4( "Send Time");
- Skip_L2( "Duration");
- Element_End0();
-
- if (MultiplePayloadsPresent)
- {
- //Parsing
- Element_Begin1("Multiple Payloads additional flags");
- int8u AdditionalFlags;
- Get_L1 (AdditionalFlags, "Flags");
- Get_FlagsM( AdditionalFlags &0x3F, NumberPayloads, "Number of Payloads"); //6 bits
- Get_FlagsM((AdditionalFlags>>6)&0x03, PayloadLengthType, "Payload Length Type"); //bits 6 and 7
- Element_End0();
- }
- else
- {
- SizeOfMediaObject=(int32u)(Element_Size-Element_Offset-Data_Parse_Padding);
- NumberPayloads=1;
- }
-
- for (NumberPayloads_Pos=0; NumberPayloads_Pos<NumberPayloads; NumberPayloads_Pos++)
- {
- Element_Begin1("Payload");
- int32u ReplicatedDataLength=0, PayloadLength=0;
- int8u StreamNumber;
- Get_L1 (StreamNumber, "Stream Number");
- Stream_Number=StreamNumber&0x7F; //For KeyFrame
- Element_Info1(Stream_Number);
- switch (MediaObjectNumberLengthType)
- {
- case 1 : Skip_L1( "Media Object Number"); break;
- case 2 : Skip_L2( "Media Object Number"); break;
- case 3 : Skip_L4( "Media Object Number"); break;
- default: Trusted_IsNot("Media Object Number"); return; //Problem
- }
- switch (OffsetIntoMediaObjectLengthType)
- {
- case 1 : Skip_L1( "Offset Into Media Object"); break;
- case 2 : Skip_L2( "Offset Into Media Object"); break;
- case 3 : Skip_L4( "Offset Into Media Object"); break;
- default: Trusted_IsNot("Offset Into Media Object"); return; //Problem
- }
- switch (ReplicatedDataLengthType)
- {
- case 1 : {int8u Data; Get_L1(Data, "Replicated Data Length"); ReplicatedDataLength=Data;} break;
- case 2 : {int16u Data; Get_L2(Data, "Replicated Data Length"); ReplicatedDataLength=Data;} break;
- case 3 : Get_L4(ReplicatedDataLength, "Replicated Data Length"); break;
- default: Trusted_IsNot("Replicated Data Length"); return; //Problem
- }
- if (ReplicatedDataLengthType!=0 && ReplicatedDataLength>0)
- {
- if (ReplicatedDataLength>=8)
- {
- int32u PresentationTime;
- Get_L4 (SizeOfMediaObject, "Size Of Media Object");
- Get_L4 (PresentationTime, "Presentation Time");
- if (ReplicatedDataLength>8)
- Data_Packet_ReplicatedData(ReplicatedDataLength-8);
-
- //Presentation time delta
- std::map<int16u, stream>::iterator Strea=Stream.find(Stream_Number);
- if (Strea!=Stream.end() && Strea->second.StreamKind==Stream_Video)
- {
- Strea->second.PresentationTimes.insert(PresentationTime);
- }
- }
- else if (ReplicatedDataLength==1)
- {
- Skip_L1( "Presentation Time Delta");
- //TODO
- }
- else
- {
- Skip_XX(ReplicatedDataLength, "Replicated Data");
- }
- }
-
- if (MultiplePayloadsPresent)
- {
- switch (PayloadLengthType)
- {
- case 1 : {int8u Data; Get_L1(Data, "Payload Length"); PayloadLength=Data;} break;
- case 2 : {int16u Data; Get_L2(Data, "Payload Length"); PayloadLength=Data;} break;
- case 3 : Get_L4(PayloadLength, "Payload Length"); break;
- default: Trusted_IsNot("Payload Length"); return; //Problem
- }
- }
- else if (Element_Size-Element_Offset>Data_Parse_Padding)
- PayloadLength=(int32u)(Element_Size-(Element_Offset+Data_Parse_Padding));
- else
- {
- Trusted_IsNot("Padding size problem");
- }
- if (Element_Offset+PayloadLength+Data_Parse_Padding>Element_Size)
- {
- Trusted_IsNot("Payload Length problem");
- }
- else
- {
- //Demux
- Element_Code=Stream_Number;
- Demux(Buffer+(size_t)Element_Offset, (size_t)PayloadLength, ContentType_MainStream);
-
- //Analyzing
- if (Stream[Stream_Number].Parser && Stream[Stream_Number].SearchingPayload)
- {
- //Handling of spanned on multiple chunks
- #if defined(MEDIAINFO_VC1_YES)
- bool FrameIsAlwaysComplete=true;
- #endif
- if (PayloadLength!=SizeOfMediaObject)
- {
- if (SizeOfMediaObject_BytesAlreadyParsed==0)
- SizeOfMediaObject_BytesAlreadyParsed=SizeOfMediaObject-PayloadLength;
- else
- SizeOfMediaObject_BytesAlreadyParsed-=PayloadLength;
- if (SizeOfMediaObject_BytesAlreadyParsed==0)
- Element_Show_Count++;
- #if defined(MEDIAINFO_VC1_YES)
- else
- FrameIsAlwaysComplete=false;
- #endif
- }
- else
- Element_Show_Count++;
-
- //Codec specific
- #if defined(MEDIAINFO_VC1_YES)
- if (Retrieve(Stream[Stream_Number].StreamKind, Stream[Stream_Number].StreamPos, Fill_Parameter(Stream[Stream_Number].StreamKind, Generic_Format))==__T("VC-1"))
- ((File_Vc1*)Stream[Stream_Number].Parser)->FrameIsAlwaysComplete=FrameIsAlwaysComplete;
- #endif
-
- Open_Buffer_Continue(Stream[Stream_Number].Parser, (size_t)PayloadLength);
- if (Stream[Stream_Number].Parser->Status[IsFinished]
- || (Stream[Stream_Number].PresentationTimes.size()>=300 && MediaInfoLib::Config.ParseSpeed_Get()<1))
- {
- Stream[Stream_Number].Parser->Open_Buffer_Unsynch();
- Stream[Stream_Number].SearchingPayload=false;
- Streams_Count--;
- }
-
- Element_Show();
- }
- else
- {
- Skip_XX(PayloadLength, "Data");
- if (Stream[Stream_Number].SearchingPayload
- && (Stream[Stream_Number].StreamKind==Stream_Video && Stream[Stream_Number].PresentationTimes.size()>=300))
- {
- Stream[Stream_Number].SearchingPayload=false;
- Streams_Count--;
- }
- }
- }
- Element_End0();
- }
-
- if (Data_Parse_Padding)
- Skip_XX(Data_Parse_Padding, "Padding");
-
- //Jumping if needed
- if (Streams_Count==0 || (Packet_Count>=1000 && MediaInfoLib::Config.ParseSpeed_Get()<1))
- {
- Info("Data, Jumping to end of chunk");
- GoTo(Data_AfterTheDataChunk, "Windows Media");
- }
-
- if (Element_Show_Count>0)
- Element_Show();
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Data_Packet_ReplicatedData(int32u Size)
-{
- Element_Begin1("Replicated Data");
- int64u Element_Offset_Final=Element_Offset+Size;
- for (size_t Pos=0; Pos<Stream[Stream_Number].Payload_Extension_Systems.size(); Pos++)
- {
- Element_Begin0();
- switch (Stream[Stream_Number].Payload_Extension_Systems[Pos].ID.hi)
- {
- case Elements::Payload_Extension_System_TimeStamp : Data_Packet_ReplicatedData_TimeStamp(); break;
- default : //Not enough info to validate this algorithm
- //if (Stream[Stream_Number].Payload_Extension_Systems[Pos].Size!=(int16u)-1)
- //{
- // Element_Name("Unknown");
- // Skip_XX(Stream[Stream_Number].Payload_Extension_Systems[Pos].Size, "Unknown");
- //}
- //else
- Pos=Stream[Stream_Number].Payload_Extension_Systems.size(); //Disabling the rest, all is unknown
- }
- Element_End0();
- }
-
- if (Element_Offset<Element_Offset_Final)
- {
- Element_Begin1("Other chunks");
- Skip_XX(Element_Offset_Final-Element_Offset, "Unknown");
- Element_End0();
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Data_Packet_ReplicatedData_TimeStamp()
-{
- Element_Name("TimeStamp");
-
- //Parsing
- int64u TS0;
- Skip_L2( "Unknown");
- Skip_L4( "Unknown");
- Skip_L4( "Unknown");
- Get_L8 (TS0, "TS0");
- #if MEDIAINFO_TRACE
- if (TS0!=(int64u)-1) Param_Info1(TS0/10000);
- #endif //MEDIAINFO_TRACE
- Info_L8(TS1, "TS1");
- #if MEDIAINFO_TRACE
- if (TS1!=(int64u)-1) Param_Info1(TS1/10000);
- #endif //MEDIAINFO_TRACE
- Skip_L4( "Unknown");
- Skip_L4( "Unknown");
- Skip_L4( "Unknown");
- Skip_L4( "Unknown");
-
- if (Stream[Stream_Number].TimeCode_First==(int64u)-1 && TS0!=(int64u)-1)
- Stream[Stream_Number].TimeCode_First=TS0/10000;
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::SimpleIndex()
-{
- Element_Name("Simple Index");
-
- //Parsing
- /*
- int32u Count;
- Skip_GUID( "File ID");
- Skip_L8( "Index Entry Time Interval");
- Skip_L4( "Maximum Packet Count");
- Get_L4 (Count, "Index Entries Count");
- for (int32u Pos=0; Pos<Count; Pos++)
- {
- Element_Begin1("Index Entry", 6);
- int32u PacketNumber;
- int16u PacketCount;
- Get_L4 (PacketNumber, "Packet Number");
- Get_L2 (PacketCount, "Packet Count");
- Element_End0();
- }
- */
- Skip_XX(Element_TotalSize_Get()-Element_Offset, "Indexes");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::Index()
-{
- Element_Name("Index");
-
- //Parsing
- /*
- int32u Blocks_Count;
- int16u Specifiers_Count;
- Skip_L4( "Index Entry Time Interval");
- Get_L2 (Specifiers_Count, "Index Specifiers Count");
- Get_L4 (Blocks_Count, "Index Blocks Count");
- for (int16u Pos=0; Pos<Specifiers_Count; Pos++)
- {
- Element_Begin1("Specifier");
- Skip_L2( "Stream Number");
- Skip_L2( "Index Type");
- Element_End0();
- }
- for (int32u Pos=0; Pos<Blocks_Count; Pos++)
- {
- Element_Begin1("Block");
- int32u Entry_Count;
- Get_L4 (Entry_Count, "Index Entry Count");
- Element_Begin1("Block Positions");
- for (int16u Pos=0; Pos<Specifiers_Count; Pos++)
- Skip_L4( "Position");
- Element_End0();
- for (int32u Pos=0; Pos<Entry_Count; Pos++)
- {
- Element_Begin1("Entry");
- for (int16u Pos=0; Pos<Specifiers_Count; Pos++)
- Skip_L4( "Offset");
- Element_End0();
- }
- Element_End0();
- }
- */
- Skip_XX(Element_TotalSize_Get()-Element_Offset, "Indexes");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::MediaIndex()
-{
- Element_Name("MediaIndex");
-}
-
-//---------------------------------------------------------------------------
-void File_Wm::TimecodeIndex()
-{
- Element_Name("Timecode Index");
-
- //Parsing
- int32u TimeCode_First=(int32u)-1;
- int32u IndexBlocksCount;
- int16u IndexSpecifiersCount;
- Skip_L4( "Reserved");
- Get_L2 (IndexSpecifiersCount, "Index Specifiers Count");
- Get_L4 (IndexBlocksCount, "Index Blocks Count");
- Element_Begin1("Index Specifiers");
- for (int16u Pos=0; Pos<IndexSpecifiersCount; ++Pos)
- {
- Element_Begin1("Index Specifier");
- Skip_L2( "Stream Number");
- Info_L2(IndexType, "Index Type");
- Element_Info1(IndexType);
- Element_End0();
- }
- Element_End0();
- Element_Begin1("Index Blocks");
- for (int16u Pos=0; Pos<IndexBlocksCount; ++Pos)
- {
- Element_Begin1("Index Block");
- int32u IndexEntryCount;
- Get_L4 (IndexEntryCount, "Index Entry Count");
- Skip_L2( "Timecode Range");
- Element_Begin1("Block Positions");
- for (int16u Pos=0; Pos<IndexSpecifiersCount; ++Pos)
- Skip_L8( "Block Position");
- Element_End0();
- Element_Begin1("Index Entries");
- for (int32u Pos=0; Pos<IndexEntryCount; ++Pos)
- {
- Element_Begin1("Index Entry");
- if (TimeCode_First==(int32u)-1)
- Get_L4 (TimeCode_First, "Timecode");
- else
- Skip_L4( "Timecode");
- for (int16u Pos=0; Pos<IndexSpecifiersCount; ++Pos)
- Skip_L4( "Offsets");
- Element_End0();
- }
- Element_End0();
- Element_End0();
- }
- Element_End0();
-
- FILLING_BEGIN();
- Stream_Prepare(Stream_Other);
- Fill(Stream_Other, StreamPos_Last, Other_Type, "Time code");
- Fill(Stream_Other, StreamPos_Last, Other_Format, "WM TC");
- if (TimeCode_First!=(int32u)-1)
- {
- int8u H1= TimeCode_First>>28;
- int8u H2=(TimeCode_First>>24)&0xF;
- int8u M1=(TimeCode_First>>20)&0xF;
- int8u M2=(TimeCode_First>>16)&0xF;
- int8u S1=(TimeCode_First>>12)&0xF;
- int8u S2=(TimeCode_First>> 8)&0xF;
- int8u F1=(TimeCode_First>> 4)&0xF;
- int8u F2= TimeCode_First &0xF;
- if (H1<10 && H2<10 && M1<10 && M2<10 && S1<10 && S2<10 && F1<10 && F2<10)
- {
- string TC;
- TC+='0'+H1;
- TC+='0'+H2;
- TC+=':';
- TC+='0'+M1;
- TC+='0'+M2;
- TC+=':';
- TC+='0'+S1;
- TC+='0'+S2;
- TC+=':';
- TC+='0'+F1;
- TC+='0'+F2;
- Fill(Stream_Other, StreamPos_Last, Other_TimeCode_FirstFrame, TC.c_str());
- }
- }
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_WM_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Xdcam_Clip.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Xdcam_Clip.cpp
deleted file mode 100644
index 95c3080b5..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Xdcam_Clip.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_XDCAM_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Xdcam_Clip.h"
-#include "MediaInfo/MediaInfo.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#include "ZenLib/Dir.h"
-#include "ZenLib/File.h"
-#include "ZenLib/FileName.h"
-#include "tinyxml2.h"
-using namespace tinyxml2;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Xdcam_Clip::FileHeader_Begin()
-{
- XMLDocument document;
- if (!FileHeader_Begin_XML(document))
- return false;
-
- {
- XMLElement* Root=document.FirstChildElement("NonRealTimeMeta");
- if (Root)
- {
- Accept("Xdcam_Clip");
- Fill(Stream_General, 0, General_Format, "XDCAM Clip");
-
- XMLElement* Element;
-
- //CreationDate
- Element=Root->FirstChildElement("CreationDate");
- if (Element)
- Fill(Stream_General, 0, General_Recorded_Date, Element->Attribute("value"));
-
- //LastUpdate
- Element=Root->FirstChildElement("LastUpdate");
- if (Element)
- Fill(Stream_General, 0, General_Tagged_Date, Element->Attribute("value"));
-
- //Duration
- Ztring Duration, EditUnit;
- Element=Root->FirstChildElement("Duration");
- if (Element)
- Duration=Element->Attribute("value");
- Element=Root->FirstChildElement("LtcChangeTable");
- if (Element)
- EditUnit=Element->Attribute("tcFps");
- int64u Duration_Frames=Duration.To_int64u();
- int64u EditUnit_Denominator=EditUnit.To_int64u();
- if (Duration_Frames && EditUnit_Denominator)
- Fill(Stream_General, 0, General_Duration, ((float32)Duration_Frames)*1000/EditUnit_Denominator, 0);
-
- int64u File_Size_Total=File_Size;
-
- #if defined(MEDIAINFO_MXF_YES)
- if (File_Name.size()>12
- && File_Name[File_Name.size()-7]==__T('M')
- && File_Name[File_Name.size()-6]==__T('0')
- && File_Name[File_Name.size()-5]==__T('1')
- && File_Name[File_Name.size()-4]==__T('.')
- && File_Name[File_Name.size()-3]==__T('X')
- && File_Name[File_Name.size()-2]==__T('M')
- && File_Name[File_Name.size()-1]==__T('L'))
- {
- Ztring file=File_Name.substr(File_Name.size()-12, 5);
- Ztring MXF_File=File_Name;
- MXF_File.resize(MXF_File.size()-12);
- MXF_File+=file;
- if (File::Exists(MXF_File+__T(".MXF")))
- MXF_File+=__T(".MXF");
- if (File::Exists(MXF_File+__T(".MP4")))
- MXF_File+=__T(".MP4");
-
- //int8u ReadByHuman=Ztring(MediaInfo::Option_Static(__T("ReadByHuman_Get"))).To_int8u();
- //MediaInfo::Option_Static(__T("ReadByHuman"), __T("0"));
- MediaInfo_Internal MI;
- MI.Option(__T("File_IsReferenced"), __T("1"));
- if (MI.Open(MXF_File))
- {
- //MediaInfo::Option_Static(__T("ReadByHuman"), ReadByHuman?__T("1"):__T("0"));
- Merge(MI);
- Fill(Stream_Video, StreamPos_Last, "Source", MXF_File);
- File_Size_Total+=Ztring(MI.Get(Stream_General, 0, General_FileSize)).To_int64u();
-
- //Commercial names
- Fill(Stream_General, 0, General_Format_Commercial_IfAny, MI.Get(Stream_General, 0, General_Format_Commercial_IfAny));
- Ztring Format_Commercial=MI.Get(Stream_General, 0, General_Format_Commercial_IfAny);
- if (!Format_Commercial.empty())
- {
- Format_Commercial.FindAndReplace(__T("XDCAM "), Ztring());
- Fill(Stream_General, 0, General_Format_Commercial, __T("XDCAM Clip ")+Format_Commercial, true);
- }
- }
- //else
- // MediaInfo::Option_Static(__T("ReadByHuman"), ReadByHuman?__T("1"):__T("0"));
- }
- #endif //defined(MEDIAINFO_MXF_YES)
-
- //Device
- Element=Root->FirstChildElement("Device");
- if (Element)
- {
- const char* manufacturer=Element->Attribute("manufacturer");
- if (manufacturer)
- {
- string manufacturer_modelName(manufacturer);
- const char* modelName=Element->Attribute("modelName");
- if (modelName)
- {
- manufacturer_modelName+=' ';
- manufacturer_modelName+=modelName;
- }
- Fill(Stream_General, 0, General_Encoded_Application, manufacturer_modelName, true, true);
- }
- }
-
- if (File_Size_Total!=File_Size)
- Fill(Stream_General, 0, General_FileSize, File_Size_Total, 10, true);
- }
- else
- {
- Reject("Xdcam_Clip");
- return false;
- }
- }
-
- Element_Offset=File_Size;
-
- //All should be OK...
- return true;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_XDCAM_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Xdcam_Clip.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Xdcam_Clip.h
deleted file mode 100644
index fc0d8babf..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File_Xdcam_Clip.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about XDCAM Clip Movie files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Xdcam_ClipH
-#define MediaInfo_File_Xdcam_ClipH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Xdcam_Clip
-//***************************************************************************
-
-class File_Xdcam_Clip : public File__Analyze
-{
-private :
- //Buffer - File header
- bool FileHeader_Begin();
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper.cpp
deleted file mode 100644
index 92366519c..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper.cpp
+++ /dev/null
@@ -1,1945 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_REFERENCES_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#include "ZenLib/Dir.h"
-#include "ZenLib/File.h"
-#include "ZenLib/FileName.h"
-#include "ZenLib/Format/Http/Http_Utils.h"
-#include <set>
-#include <algorithm>
-#include <cfloat>
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events_Internal.h"
- #include "MediaInfo/MediaInfo_Config_PerPackage.h"
-#endif //MEDIAINFO_EVENTS
-#if MEDIAINFO_AES
- #include "base64.h"
-#endif //MEDIAINFO_AES
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File__ReferenceFilesHelper::File__ReferenceFilesHelper(File__Analyze* MI_, MediaInfo_Config_MediaInfo* Config_)
-{
- //In
- TestContinuousFileNames=false;
- ContainerHasNoId=false;
- ID_Max=0;
-
- //Private
- Sequences_Current=0;
- MI=MI_;
- Config=Config_;
- Init_Done=false;
- FrameRate=0;
- Duration=0;
- #if MEDIAINFO_DEMUX
- Demux_Interleave=false;
- DTS_Minimal=(int64u)-1;
- #endif //MEDIAINFO_DEMUX
- #if MEDIAINFO_EVENTS
- StreamID_Previous=(int64u)-1;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Offset_Video_DTS=0;
- #endif //MEDIAINFO_DEMUX
-
- //Private
- #if MEDIAINFO_DEMUX
- Common=new rfh_common(&Demux_Interleave, &DTS_Minimal);
- #else //MEDIAINFO_DEMUX
- Common=new rfh_common();
- #endif //MEDIAINFO_DEMUX
- Common->ReferenceFilesHelper=this;
- Common->MI=MI;
- Common->Config=Config;
-
-
-
- //Temp
- FilesForStorage=false;
- HasMainFile=false;
- HasMainFile_Filled=false;
- #if MEDIAINFO_NEXTPACKET
- DTS_Interval=(int64u)-1;
- #endif //MEDIAINFO_NEXTPACKET
-}
-
-//---------------------------------------------------------------------------
-File__ReferenceFilesHelper::~File__ReferenceFilesHelper()
-{
- size_t Sequences_Size=Sequences.size();
- for (size_t Sequences_Pos=0; Sequences_Pos<Sequences_Size; ++Sequences_Pos)
- delete Sequences[Sequences_Pos];
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File__ReferenceFilesHelper_Algo1 (const sequence* Ref1, const sequence* Ref2) { return (Ref1->StreamID<Ref2->StreamID);}
-bool File__ReferenceFilesHelper_Algo2 (const sequence* Ref1, const sequence* Ref2) { return (Ref1->StreamPos<Ref2->StreamPos);}
-bool File__ReferenceFilesHelper_Algo3 (const sequence* Ref1, const sequence* Ref2) { return (Ref1->StreamKind<Ref2->StreamKind);}
-void File__ReferenceFilesHelper_InfoFromFileName (sequences &Sequences)
-{
- ZtringListList List;
- vector<size_t> Iterators;
-
- for (size_t Sequences_Pos=0; Sequences_Pos<Sequences.size(); Sequences_Pos++)
- {
- ZtringList List2;
- List2.Separator_Set(0, __T(" "));
- if (Sequences[Sequences_Pos]->StreamKind==Stream_Audio && !Sequences[Sequences_Pos]->FileNames.empty())
- {
- Ztring Name=Sequences[Sequences_Pos]->FileNames[0];
- while (Name.FindAndReplace(__T("51 "), Ztring()));
- while (Name.FindAndReplace(__T("_"), __T(" ")));
- while (Name.FindAndReplace(__T("."), __T(" ")));
- while (Name.FindAndReplace(__T(" "), __T(" ")));
- size_t PathSeparator_Pos=Name.rfind(PathSeparator);
- if (PathSeparator_Pos!=(size_t)-1)
- Name.erase(0, PathSeparator_Pos+1);
-
- //Removing extension
- if (Name.size()>4 && Name.rfind(__T('.'))==Name.size())
- Name.resize(Name.size()-4);
-
- List2.Write(Name);
- for (size_t Pos=0; Pos<List2.size(); Pos++)
- List2[Pos].MakeLowerCase();
- List.push_back(List2);
- Iterators.push_back(Sequences_Pos);
- }
- }
-
- if (List.size()<2)
- return;
-
- size_t ChannelLayout_Pos=(size_t)-1;
- size_t Language_Pos=(size_t)-1;
- for (size_t Pos2=0; Pos2<List[0].size(); Pos2++)
- {
- bool IsChannelLayout=true;
- bool IsLanguage=true;
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- if (Pos2>=List[Pos].size())
- break; //Maybe begin of title
- const Ztring &Test=List[Pos][List[Pos].size()-1-Pos2];
-
- //ChannelLayout
- if (ChannelLayout_Pos==(size_t)-1
- && Test!=__T("l")
- && Test!=__T("r")
- && Test!=__T("lt")
- && Test!=__T("rt")
- && Test!=__T("c")
- && Test!=__T("lf")
- && Test!=__T("lfe")
- && Test!=__T("sub")
- && Test!=__T("ls")
- && Test!=__T("rs")
- && Test!=__T("b")
- && Test!=__T("mono"))
- IsChannelLayout=false;
-
- //Language
- if (Language_Pos==(size_t)-1
- && Test!=__T("ara")
- && Test!=__T("deu")
- && Test!=__T("eng")
- && Test!=__T("fra")
- && Test!=__T("fre")
- && Test!=__T("ita")
- && Test!=__T("jpn")
- && Test!=__T("rus")
- && Test!=__T("spa"))
- IsLanguage=false;
- }
-
- if (IsChannelLayout && ChannelLayout_Pos==(size_t)-1)
- ChannelLayout_Pos=Pos2;
- if (IsLanguage && Language_Pos==(size_t)-1)
- Language_Pos=Pos2;
- if (ChannelLayout_Pos!=(size_t)-1 && Language_Pos!=(size_t)-1)
- break;
- }
-
- //ChannelLayout
- if (ChannelLayout_Pos!=(size_t)-1)
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- Ztring ChannelPositions, ChannelPositions2, ChannelLayout;
- if (List[Pos][List[Pos].size()-1-ChannelLayout_Pos]==__T("l"))
- {
- ChannelPositions=__T("Front: L");
- ChannelPositions2=__T("1/0/0");
- ChannelLayout=__T("L");
- }
- if (List[Pos][List[Pos].size()-1-ChannelLayout_Pos]==__T("lt"))
- {
- ChannelPositions=__T("Front: Lt");
- ChannelPositions2=__T("1/0/0");
- ChannelLayout=__T("Lt");
- }
- if (List[Pos][List[Pos].size()-1-ChannelLayout_Pos]==__T("rt"))
- {
- ChannelPositions=__T("Front: Rt");
- ChannelPositions2=__T("1/0/0");
- ChannelLayout=__T("Rt");
- }
- if (List[Pos][List[Pos].size()-1-ChannelLayout_Pos]==__T("r"))
- {
- ChannelPositions=__T("Front: R");
- ChannelPositions2=__T("1/0/0");
- ChannelLayout=__T("R");
- }
- if (List[Pos][List[Pos].size()-1-ChannelLayout_Pos]==__T("c") || List[Pos][List[Pos].size()-1-ChannelLayout_Pos]==__T("mono"))
- {
- ChannelPositions=__T("Front: C");
- ChannelPositions2=__T("1/0/0");
- ChannelLayout=__T("C");
- }
- if (List[Pos][List[Pos].size()-1-ChannelLayout_Pos]==__T("lf") || List[Pos][List[Pos].size()-1-ChannelLayout_Pos]==__T("lfe") || List[Pos][List[Pos].size()-1-ChannelLayout_Pos]==__T("sub"))
- {
- ChannelPositions=__T("LFE");
- ChannelPositions2=__T(".1");
- ChannelLayout=__T("LFE");
- }
- if (List[Pos][List[Pos].size()-1-ChannelLayout_Pos]==__T("ls"))
- {
- ChannelPositions=__T("Side: L");
- ChannelPositions2=__T("0/1/0");
- ChannelLayout=__T("Ls");
- }
- if (List[Pos][List[Pos].size()-1-ChannelLayout_Pos]==__T("rs"))
- {
- ChannelPositions=__T("Side: R");
- ChannelPositions2=__T("0/1/0");
- ChannelLayout=__T("Rs");
- }
- if (List[Pos][List[Pos].size()-1-ChannelLayout_Pos]==__T("b"))
- {
- ChannelPositions=__T("Back: C");
- ChannelPositions2=__T("0/0/1");
- ChannelLayout=__T("Cs");
- }
-
- Sequences[Iterators[Pos]]->Infos["ChannelPositions"]=ChannelPositions;
- Sequences[Iterators[Pos]]->Infos["ChannelPositions/String2"]=ChannelPositions2;
- Sequences[Iterators[Pos]]->Infos["ChannelLayout"]=ChannelLayout;
- }
-
- //Language
- if (Language_Pos!=(size_t)-1)
- for (size_t Pos=0; Pos<List.size(); Pos++)
- if (1+Language_Pos<List[Pos].size())
- {
- Ztring Language;
- if (List[Pos][List[Pos].size()-1-Language_Pos]==__T("ara"))
- Language=__T("ar");
- if (List[Pos][List[Pos].size()-1-Language_Pos]==__T("deu"))
- Language=__T("de");
- if (List[Pos][List[Pos].size()-1-Language_Pos]==__T("eng"))
- Language=__T("en");
- if (List[Pos][List[Pos].size()-1-Language_Pos]==__T("fra") || List[Pos][List[Pos].size()-1-Language_Pos]==__T("fre"))
- Language=__T("fr");
- if (List[Pos][List[Pos].size()-1-Language_Pos]==__T("ita"))
- Language=__T("it");
- if (List[Pos][List[Pos].size()-1-Language_Pos]==__T("jpn"))
- Language=__T("ja");
- if (List[Pos][List[Pos].size()-1-Language_Pos]==__T("rus"))
- Language=__T("ru");
- if (List[Pos][List[Pos].size()-1-Language_Pos]==__T("spa"))
- Language=__T("es");
-
- if (!Language.empty())
- Sequences[Iterators[Pos]]->Infos["Language"]=Language;
- }
-}
-
-//***************************************************************************
-// In
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__ReferenceFilesHelper::AddSequence(sequence* NewSequence)
-{
- Common->HasMultipleSequences=!Sequences.empty(); //If not empty, there will be more than 1 sequence just after
-
- NewSequence->Package=Common;
- NewSequence->Common->Package=Common;
-
- Sequences.push_back(NewSequence);
-}
-
-//---------------------------------------------------------------------------
-void File__ReferenceFilesHelper::UpdateFileName(const Ztring& OldFileName, const Ztring& NewFileName)
-{
- size_t Sequences_Size=Sequences.size();
- for (size_t Sequences_Pos=0; Sequences_Pos<Sequences_Size; ++Sequences_Pos)
- {
- sequence* Sequence=Sequences[Sequences_Pos];
-
- Sequence->UpdateFileName(OldFileName, NewFileName);
- }
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-void File__ReferenceFilesHelper::ParseReferences()
-{
- if (!Init_Done)
- {
- #if MEDIAINFO_FILTER
- if (MI->Config->File_Filter_Audio_Get())
- {
- for (size_t Pos=0; Pos<Sequences.size(); Pos++)
- if (Sequences[Pos]->StreamKind!=Stream_Audio)
- {
- Sequences.erase(Sequences.begin()+Pos);
- Pos--;
- }
- CountOfReferencesToParse=Sequences.size();
- }
- #endif //MEDIAINFO_FILTER
-
- //Filling Filenames from the more complete version and Edit rates
- float64 EditRate=DBL_MAX;
- size_t EditRate_Count=0;
- for (Sequences_Current=0; Sequences_Current<Sequences.size(); Sequences_Current++)
- if (Sequences[Sequences_Current]->FileNames.empty())
- for (size_t Pos=0; Pos<Sequences[Sequences_Current]->Resources.size(); Pos++)
- {
- for (size_t Resource_FileNames_Pos=0; Resource_FileNames_Pos<Sequences[Sequences_Current]->Resources[Pos]->FileNames.size(); Resource_FileNames_Pos++)
- Sequences[Sequences_Current]->FileNames.push_back(Sequences[Sequences_Current]->Resources[Pos]->FileNames[Resource_FileNames_Pos]);
- if (Sequences[Sequences_Current]->Resources[Pos]->EditRate && EditRate!=Sequences[Sequences_Current]->Resources[Pos]->EditRate)
- {
- if (EditRate>Sequences[Sequences_Current]->Resources[Pos]->EditRate)
- EditRate=Sequences[Sequences_Current]->Resources[Pos]->EditRate;
- EditRate_Count++;
- }
- }
- if (EditRate_Count>1)
- //Multiple rates, using only one rate
- for (Sequences_Current=0; Sequences_Current<Sequences.size(); Sequences_Current++)
- for (size_t Pos=0; Pos<Sequences[Sequences_Current]->Resources.size(); Pos++)
- if (Sequences[Sequences_Current]->Resources[Pos]->EditRate && EditRate!=Sequences[Sequences_Current]->Resources[Pos]->EditRate)
- {
- if (Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsBefore)
- {
- float64 Temp=(float64)Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsBefore;
- Temp/=Sequences[Sequences_Current]->Resources[Pos]->EditRate;
- Temp*=EditRate;
- Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsBefore=float64_int64s(Temp);
- }
- if (Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfter!=(int64u)-1)
- {
- float64 Temp=(float64)Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfter;
- Temp/=Sequences[Sequences_Current]->Resources[Pos]->EditRate;
- Temp*=EditRate;
- Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfter=float64_int64s(Temp);
- }
- if (Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfterDuration!=(int64u)-1)
- {
- float64 Temp=(float64)Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfterDuration;
- Temp/=Sequences[Sequences_Current]->Resources[Pos]->EditRate;
- Temp*=EditRate;
- Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfterDuration=float64_int64s(Temp);
- }
- Sequences[Sequences_Current]->Resources[Pos]->EditRate=EditRate;
- }
-
- //Testing IDs
- std::set<int64u> StreamList;
- bool StreamList_DuplicatedIds=false;
- for (Sequences_Current=0; Sequences_Current<Sequences.size(); Sequences_Current++)
- if (StreamList.find(Sequences[Sequences_Current]->StreamID)==StreamList.end())
- StreamList.insert(Sequences[Sequences_Current]->StreamID);
- else
- {
- StreamList_DuplicatedIds=true;
- break;
- }
- if (StreamList_DuplicatedIds)
- for (Sequences_Current=0; Sequences_Current<Sequences.size(); Sequences_Current++)
- Sequences[Sequences_Current]->StreamID=Sequences_Current+1;
- if (Sequences.size()==1 && (*Sequences.begin())->StreamID==(int64u)-1)
- {
- ContainerHasNoId=true;
- #if MEDIAINFO_EVENTS
- MI->StreamIDs_Width[MI->StreamIDs_Size-1]=0;
- #endif //MEDIAINFO_EVENTS
- }
- std::sort(Sequences.begin(), Sequences.end(), File__ReferenceFilesHelper_Algo1);
- std::sort(Sequences.begin(), Sequences.end(), File__ReferenceFilesHelper_Algo2);
- std::sort(Sequences.begin(), Sequences.end(), File__ReferenceFilesHelper_Algo3);
-
- //InfoFromFileName
- File__ReferenceFilesHelper_InfoFromFileName(Sequences);
-
- #if MEDIAINFO_EVENTS
- if (MI->Config->Config_PerPackage==NULL)
- {
- MI->Config->Config_PerPackage=new MediaInfo_Config_PerPackage;
- MI->Config->Config_PerPackage->CountOfPackages=Sequences.size();
- }
- #endif //MEDIAINFO_EVENTS
-
- //Configuring file names
- Sequences_Current=0;
- while (Sequences_Current<Sequences.size())
- {
- ZtringList Names=Sequences[Sequences_Current]->FileNames;
- ZtringList AbsoluteNames; AbsoluteNames.Separator_Set(0, ",");
- for (size_t Pos=0; Pos<Names.size(); Pos++)
- {
- if (Names[Pos].find(__T("file:///"))==0)
- {
- Names[Pos].erase(0, 8); //Removing "file:///", this is the default behaviour and this makes comparison easier
- Names[Pos]=ZenLib::Format::Http::URL_Encoded_Decode(Names[Pos]);
- }
- if (Names[Pos].find(__T("file://"))==0)
- {
- Names[Pos].erase(0, 7); //Removing "file://", this is the default behaviour and this makes comparison easier
- Names[Pos]=ZenLib::Format::Http::URL_Encoded_Decode(Names[Pos]);
- }
- if (Names[Pos].find(__T("file:"))==0)
- {
- Names[Pos].erase(0, 5); //Removing "file:", this is the default behaviour and this makes comparison easier
- Names[Pos]=ZenLib::Format::Http::URL_Encoded_Decode(Names[Pos]);
- }
- Ztring AbsoluteName;
- if (Names[Pos].find(__T(':'))!=1 && Names[Pos].find(__T("/"))!=0 && Names[Pos].find(__T("\\\\"))!=0) //If absolute patch
- {
- if (MI->File_Name.find(__T("://"))==string::npos)
- AbsoluteName=ZenLib::FileName::Path_Get(MI->File_Name);
- else
- {
- size_t Pos_Path=MI->File_Name.find_last_of('/');
- if (Pos_Path!=Ztring::npos)
- AbsoluteName=MI->File_Name.substr(0, Pos_Path);
- }
- if (!AbsoluteName.empty())
- AbsoluteName+=ZenLib::PathSeparator;
- }
- AbsoluteName+=Names[Pos];
- #ifdef __WINDOWS__
- if (AbsoluteName.find(__T("://"))==string::npos)
- AbsoluteName.FindAndReplace(__T("/"), __T("\\"), 0, Ztring_Recursive); //Names[Pos] normalization local file
- else
- AbsoluteName.FindAndReplace(__T("\\"), __T("/"), 0, Ztring_Recursive); //Names[Pos] normalization with protocol (so "/" in all cases)
- #endif //__WINDOWS__
- AbsoluteNames.push_back(AbsoluteName);
- }
- if (AbsoluteNames.empty() || !(AbsoluteNames[0].find(__T("://"))!=string::npos || File::Exists(AbsoluteNames[0])))
- {
- AbsoluteNames.clear();
-
- //Configuring file name (this time, we try to force URL decode in all cases)
- for (size_t Pos=0; Pos<Names.size(); Pos++)
- {
- Names[Pos]=ZenLib::Format::Http::URL_Encoded_Decode(Names[Pos]);
- Ztring AbsoluteName;
- if (Names[Pos].find(__T(':'))!=1 && Names[Pos].find(__T("/"))!=0 && Names[Pos].find(__T("\\\\"))!=0) //If absolute patch
- {
- if (MI->File_Name.find(__T("://"))==string::npos)
- AbsoluteName=ZenLib::FileName::Path_Get(MI->File_Name);
- else
- {
- size_t Pos_Path=MI->File_Name.find_last_of('/');
- if (Pos_Path!=Ztring::npos)
- AbsoluteName=MI->File_Name.substr(0, Pos_Path);
- }
- if (!AbsoluteName.empty())
- AbsoluteName+=ZenLib::PathSeparator;
- }
- AbsoluteName+=Names[Pos];
- #ifdef __WINDOWS__
- AbsoluteName.FindAndReplace(__T("/"), __T("\\"), 0, Ztring_Recursive); //Names[Pos] normalization
- #endif //__WINDOWS__
- AbsoluteNames.push_back(AbsoluteName);
- }
-
- if (AbsoluteNames.empty() || !File::Exists(AbsoluteNames[0]))
- {
- AbsoluteNames.clear();
- Names=Sequences[Sequences_Current]->FileNames;
-
- //Configuring file name (this time, we try to test local files)
- size_t PathSeparator_Pos=Names.empty()?string::npos:Names[0].find_last_of(__T("\\/"));
- if (PathSeparator_Pos!=string::npos && PathSeparator_Pos)
- {
- Ztring PathToRemove=Names[0].substr(0, PathSeparator_Pos);
- bool IsOk=true;
- for (size_t Pos=0; Pos<Names.size(); Pos++)
- if (Names[Pos].find(PathToRemove))
- {
- IsOk=false;
- break;
- }
- if (IsOk)
- {
- for (size_t Pos=0; Pos<Names.size(); Pos++)
- {
- Names[Pos].erase(0, PathSeparator_Pos+1);
- Ztring AbsoluteName;
- if (MI->File_Name.find(__T("://"))==string::npos)
- AbsoluteName=ZenLib::FileName::Path_Get(MI->File_Name);
- else
- {
- size_t Pos_Path=MI->File_Name.find_last_of('/');
- if (Pos_Path!=Ztring::npos)
- AbsoluteName=MI->File_Name.substr(0, Pos_Path);
- }
- if (!AbsoluteName.empty())
- AbsoluteName+=ZenLib::PathSeparator;
- AbsoluteName+=Names[Pos];
- #ifdef __WINDOWS__
- if (AbsoluteName.find(__T("://"))==string::npos)
- AbsoluteName.FindAndReplace(__T("/"), __T("\\"), 0, Ztring_Recursive); //Names[Pos] normalization local file
- else
- AbsoluteName.FindAndReplace(__T("\\"), __T("/"), 0, Ztring_Recursive); //Names[Pos] normalization with protocol (so "/" in all cases)
- #endif //__WINDOWS__
- AbsoluteNames.push_back(AbsoluteName);
- }
-
- if (!File::Exists(AbsoluteNames[0]))
- {
- AbsoluteNames.clear();
- Names=Sequences[Sequences_Current]->FileNames;
-
- //Configuring file name (this time, we try to test local files)
- size_t PathSeparator_Pos=Names[0].find_last_of(__T("\\/"));
- if (PathSeparator_Pos!=string::npos && PathSeparator_Pos)
- PathSeparator_Pos=Names[0].find_last_of(__T("\\/"), PathSeparator_Pos-1);
- if (PathSeparator_Pos!=string::npos && PathSeparator_Pos)
- {
- Ztring PathToRemove=Names[0].substr(0, PathSeparator_Pos);
- bool IsOk=true;
- for (size_t Pos=0; Pos<Names.size(); Pos++)
- if (Names[Pos].find(PathToRemove))
- {
- IsOk=false;
- break;
- }
- if (IsOk)
- for (size_t Pos=0; Pos<Names.size(); Pos++)
- {
- Names[Pos].erase(0, PathSeparator_Pos+1);
- Ztring AbsoluteName;
- if (MI->File_Name.find(__T("://"))==string::npos)
- AbsoluteName=ZenLib::FileName::Path_Get(MI->File_Name);
- else
- {
- size_t Pos_Path=MI->File_Name.find_last_of('/');
- if (Pos_Path!=Ztring::npos)
- AbsoluteName=MI->File_Name.substr(0, Pos_Path);
- }
- if (!AbsoluteName.empty())
- AbsoluteName+=ZenLib::PathSeparator;
- AbsoluteName+=Names[Pos];
- #ifdef __WINDOWS__
- AbsoluteName.FindAndReplace(__T("/"), __T("\\"), 0, Ztring_Recursive); //Names[Pos] normalization
- #endif //__WINDOWS__
- AbsoluteNames.push_back(AbsoluteName);
- }
- }
-
- if (!AbsoluteNames.empty() && !File::Exists(AbsoluteNames[0]))
- AbsoluteNames.clear();
- }
- }
- }
- }
- }
- Sequences[Sequences_Current]->Source=Sequences[Sequences_Current]->FileNames.Read(0);
- if (Sequences[Sequences_Current]->StreamKind!=Stream_Max && !Sequences[Sequences_Current]->Source.empty())
- {
- if (Sequences[Sequences_Current]->StreamPos==(size_t)-1)
- Sequences[Sequences_Current]->StreamPos=Stream_Prepare(Sequences[Sequences_Current]->StreamKind);
- MI->Fill(Sequences[Sequences_Current]->StreamKind, Sequences[Sequences_Current]->StreamPos, "Source", Sequences[Sequences_Current]->Source);
- }
- if (!AbsoluteNames.empty())
- Sequences[Sequences_Current]->FileNames=AbsoluteNames;
-
- if (!AbsoluteNames.empty() && AbsoluteNames[0]==MI->File_Name)
- {
- Sequences[Sequences_Current]->IsCircular=true;
- Sequences[Sequences_Current]->FileNames.clear();
- Sequences[Sequences_Current]->Status.set(File__Analyze::IsFinished);
- }
- else if (!AbsoluteNames.empty())
- Sequences[Sequences_Current]->FileNames=AbsoluteNames;
- else
- {
- Sequences[Sequences_Current]->Status.set(File__Analyze::IsFinished);
- if (Sequences[Sequences_Current]->StreamKind!=Stream_Max && !Sequences[Sequences_Current]->Source.empty())
- {
- MI->Fill(Sequences[Sequences_Current]->StreamKind, Sequences[Sequences_Current]->StreamPos, "Source_Info", "Missing");
- if (MI->Retrieve(Sequences[Sequences_Current]->StreamKind, Sequences[Sequences_Current]->StreamPos, General_ID).empty() && Sequences[Sequences_Current]->StreamID!=(int64u)-1)
- MI->Fill(Sequences[Sequences_Current]->StreamKind, Sequences[Sequences_Current]->StreamPos, General_ID, Sequences[Sequences_Current]->StreamID);
- for (std::map<string, Ztring>::iterator Info=Sequences[Sequences_Current]->Infos.begin(); Info!=Sequences[Sequences_Current]->Infos.end(); ++Info)
- {
- if (Info->first=="CodecID")
- MI->CodecID_Fill(Info->second, Sequences[Sequences_Current]->StreamKind, Sequences[Sequences_Current]->StreamPos, InfoCodecID_Format_Mpeg4);
- else
- MI->Fill(Sequences[Sequences_Current]->StreamKind, Sequences[Sequences_Current]->StreamPos, Info->first.c_str(), Info->second);
- }
- }
- }
-
- if (FilesForStorage)
- {
- for (size_t Pos=0; Pos<Sequences[Sequences_Current]->FileNames.size(); Pos++)
- {
- if (Pos==Sequences[Sequences_Current]->Resources.size())
- Sequences[Sequences_Current]->Resources.push_back(new resource);
- Sequences[Sequences_Current]->Resources[Pos]->FileNames.clear();
- Sequences[Sequences_Current]->Resources[Pos]->FileNames.push_back(Sequences[Sequences_Current]->FileNames[Pos]);
- }
- Sequences[Sequences_Current]->FileNames.resize(1);
- }
-
- Sequences_Current++;
- }
-
- #if MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- if (Config->NextPacket_Get())
- {
- Demux_Interleave=Config->File_Demux_Interleave_Get();
- if (Demux_Interleave)
- {
- CountOfReferencesToParse=Sequences.size();
- for (sequences::iterator ReferenceSource=Sequences.begin(); ReferenceSource!=Sequences.end(); ++ReferenceSource)
- if ((*ReferenceSource)->FileNames.empty())
- CountOfReferencesToParse--;
- DTS_Interval=250000000LL; // 250 milliseconds
- }
- }
- else
- Demux_Interleave=false;
-
- //Using the frame rate from the first stream having a frame rate
- if (!FrameRate)
- for (sequences::iterator ReferenceFrameRate=Sequences.begin(); ReferenceFrameRate!=Sequences.end(); ++ReferenceFrameRate)
- if ((*ReferenceFrameRate)->FrameRate)
- {
- FrameRate=(*ReferenceFrameRate)->FrameRate;
- break;
- }
-
- if (Config->NextPacket_Get())
- {
- Sequences_Current=0;
- while (Sequences_Current<Sequences.size())
- {
- ParseReference(); //Init
- Sequences_Current++;
- }
-
- //Cleanup
- for (size_t Pos=0; Pos<Sequences.size(); Pos++)
- if (Sequences[Pos]->Status[File__Analyze::IsFinished])
- {
- Sequences.erase(Sequences.begin()+Pos);
- Pos--;
- }
- CountOfReferencesToParse=Sequences.size();
- if (Sequences.empty())
- return;
-
- //File size handling
- if (MI->Config->File_Size!=MI->File_Size)
- {
- MI->Fill(Stream_General, 0, General_FileSize, MI->Config->File_Size, 10, true);
- MI->Fill(Stream_General, 0, General_StreamSize, MI->File_Size, 10, true);
- }
-
- }
- #endif //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
-
- FileSize_Compute();
- Sequences_Current=0;
- CountOfReferences_ForReadSize=Sequences.size();
- Init_Done=true;
-
- #if MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- if (Config->NextPacket_Get() && MI->Demux_EventWasSent_Accept_Specific)
- {
- MI->Config->Demux_EventWasSent=true;
- return;
- }
- #endif //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- }
-
- while (Sequences_Current<Sequences.size())
- {
- #if MEDIAINFO_NEXTPACKET
- if (!Sequences[Sequences_Current]->Status[File__Analyze::IsFinished])
- #endif //MEDIAINFO_NEXTPACKET
- ParseReference();
-
- //State
- int64u FileSize_Parsed=0;
- #if MEDIAINFO_NEXTPACKET
- DTS_Minimal=(int64u)-1;
- #endif //MEDIAINFO_NEXTPACKET
- for (sequences::iterator ReferenceTemp=Sequences.begin(); ReferenceTemp!=Sequences.end(); ++ReferenceTemp)
- {
- if ((*ReferenceTemp)->MI)
- {
- if ((*ReferenceTemp)->State<10000)
- {
- if ((*ReferenceTemp)->MI)
- (*ReferenceTemp)->State=(*ReferenceTemp)->MI->State_Get();
- if ((*ReferenceTemp)->State && (*ReferenceTemp)->MI->Config.File_Size!=(int64u)-1)
- FileSize_Parsed+=(int64u)((*ReferenceTemp)->MI->Config.File_Size*(((float)(*ReferenceTemp)->State)/10000));
- }
- else
- FileSize_Parsed+=(*ReferenceTemp)->MI->Config.File_Size;
-
- #if MEDIAINFO_NEXTPACKET
- //Minimal DTS
- if (DTS_Interval!=(int64u)-1 && !Sequences[Sequences_Current]->Status[File__Analyze::IsFinished] && ((*ReferenceTemp)->Resources.empty() || (*ReferenceTemp)->Resources_Current<(*ReferenceTemp)->Resources.size()))
- {
- int64u DTS_Temp;
- if (!(*ReferenceTemp)->Resources.empty() && (*ReferenceTemp)->Resources_Current)
- {
- if ((*ReferenceTemp)->Resources[(*ReferenceTemp)->Resources_Current]->MI->Info->FrameInfo.DTS!=(int64u)-1)
- DTS_Temp=(*ReferenceTemp)->Resources[(*ReferenceTemp)->Resources_Current]->MI->Info->FrameInfo.DTS-(*ReferenceTemp)->Resources[(*ReferenceTemp)->Resources_Current]->MI->Info->Config->Demux_Offset_DTS_FromStream;
- else
- DTS_Temp=0;
- }
- else
- {
- if ((*ReferenceTemp)->MI->Info->FrameInfo.DTS!=(int64u)-1)
- DTS_Temp=(*ReferenceTemp)->MI->Info->FrameInfo.DTS-(*ReferenceTemp)->MI->Info->Config->Demux_Offset_DTS_FromStream;
- else
- DTS_Temp=0;
- }
- DTS_Temp+=(*ReferenceTemp)->Resources[(*ReferenceTemp)->Resources_Current]->Demux_Offset_DTS;
- if (DTS_Minimal>DTS_Temp)
- DTS_Minimal=DTS_Temp;
- }
- #endif //MEDIAINFO_NEXTPACKET
- }
- else
- FileSize_Parsed+=(*ReferenceTemp)->FileSize;
- }
- Config->State_Set(((float)FileSize_Parsed)/MI->Config->File_Size);
-
- #if MEDIAINFO_EVENTS
- struct MediaInfo_Event_General_SubFile_End_0 Event;
- MI->Event_Prepare((struct MediaInfo_Event_Generic*)&Event);
- Event.EventCode=MediaInfo_EventCode_Create(0, MediaInfo_Event_General_SubFile_End, 0);
- Event.EventSize=sizeof(struct MediaInfo_Event_General_SubFile_End_0);
-
- MI->Config->Event_Send(NULL, (const int8u*)&Event, Event.EventSize, MI->File_Name);
- #endif //MEDIAINFO_EVENTS
-
- #if MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- if (Demux_Interleave && (Sequences[Sequences_Current]->MI==NULL || Sequences[Sequences_Current]->MI->Info==NULL || Sequences[Sequences_Current]->MI->Info->Demux_CurrentParser==NULL || Sequences[Sequences_Current]->MI->Info->Demux_CurrentParser->Demux_TotalBytes>=Sequences[Sequences_Current]->MI->Info->Demux_CurrentParser->Buffer_TotalBytes+Sequences[Sequences_Current]->MI->Info->Demux_CurrentParser->Buffer_Size))
- {
- size_t Reference_Next=Sequences_Current; ++Reference_Next;
-
- if (Reference_Next==Sequences.size() && Config->NextPacket_Get() && CountOfReferencesToParse)
- Sequences_Current=0;
- else
- Sequences_Current=Reference_Next;
-
- if (Config->Demux_EventWasSent)
- return;
- }
- else
- {
- if (Config->Demux_EventWasSent)
- return;
-
- Sequences_Current++;
- }
- #else //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- Sequences_Current++;
- #endif //MEDIAINFO_DEMUX
- }
-
- //File size handling
- FileSize_Compute();
- if (MI->Config->File_Size!=MI->File_Size
- #if MEDIAINFO_ADVANCED
- && !Config->File_IgnoreSequenceFileSize_Get()
- #endif //MEDIAINFO_ADVANCED
- )
- {
- MI->Fill(Stream_General, 0, General_FileSize, MI->Config->File_Size, 10, true);
- MI->Fill(Stream_General, 0, General_StreamSize, MI->File_Size, 10, true);
- }
- #if MEDIAINFO_ADVANCED
- if (Config->File_IgnoreSequenceFileSize_Get())
- MI->Clear(Stream_General, 0, General_FileSize);
- #endif //MEDIAINFO_ADVANCED
-}
-
-//---------------------------------------------------------------------------
-bool File__ReferenceFilesHelper::ParseReference_Init()
-{
- //Configuration
- Sequences[Sequences_Current]->MI=MI_Create();
- if (Config->ParseSpeed>=1)
- {
- for (size_t Pos=0; Pos<Sequences[Sequences_Current]->Resources.size(); Pos++)
- {
- if (Sequences[Sequences_Current]->Resources[0]->EditRate)
- {
- #if MEDIAINFO_DEMUX
- if (Pos==0)
- {
- Sequences[Sequences_Current]->Resources[0]->Demux_Offset_DTS=0;
- Sequences[Sequences_Current]->Resources[0]->Demux_Offset_Frame=0;
- }
- if (Pos+1<Sequences[Sequences_Current]->Resources.size())
- {
- Sequences[Sequences_Current]->Resources[Pos+1]->Demux_Offset_DTS=float64_int64s(Sequences[Sequences_Current]->Resources[Pos]->Demux_Offset_DTS+(Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfter-Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsBefore)/Sequences[Sequences_Current]->Resources[0]->EditRate*1000000000);
- Sequences[Sequences_Current]->Resources[Pos+1]->Demux_Offset_Frame=Sequences[Sequences_Current]->Resources[Pos]->Demux_Offset_Frame+Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfter-Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsBefore;
- }
- #endif //MEDIAINFO_DEMUX
- }
- else
- {
- MediaInfo_Internal MI2;
- MI2.Option(__T("File_KeepInfo"), __T("1"));
- Ztring ParseSpeed_Save=MI2.Option(__T("ParseSpeed_Get"), __T("0"));
- Ztring Demux_Save=MI2.Option(__T("Demux_Get"), __T(""));
- MI2.Option(__T("ParseSpeed"), __T("0"));
- MI2.Option(__T("Demux"), Ztring());
- Sequences[Sequences_Current]->Resources[Pos]->FileNames.Separator_Set(0, ",");
- size_t MiOpenResult=MI2.Open(Sequences[Sequences_Current]->Resources[Pos]->FileNames.Read());
- MI2.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI2.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (MiOpenResult)
- {
- #if MEDIAINFO_DEMUX
- int64u Duration=MI2.Get(Sequences[Sequences_Current]->StreamKind, 0, __T("Duration")).To_int64u()*1000000;
- int64u FrameCount=MI2.Get(Sequences[Sequences_Current]->StreamKind, 0, __T("FrameCount")).To_int64u();
- if (Pos==0)
- {
- int64u Delay=MI2.Get(Stream_Video, 0, Video_Delay).To_int64u()*1000000;
- if (Sequences[Sequences_Current]->StreamKind==Stream_Video && Offset_Video_DTS==0)
- Offset_Video_DTS=Delay;
- Sequences[Sequences_Current]->Resources[0]->Demux_Offset_DTS=Offset_Video_DTS;
- Sequences[Sequences_Current]->Resources[0]->Demux_Offset_Frame=0;
- }
- if (Pos+1<Sequences[Sequences_Current]->Resources.size())
- {
- Sequences[Sequences_Current]->Resources[Pos+1]->Demux_Offset_DTS=Sequences[Sequences_Current]->Resources[Pos]->Demux_Offset_DTS+Duration;
- Sequences[Sequences_Current]->Resources[Pos+1]->Demux_Offset_Frame=Sequences[Sequences_Current]->Resources[Pos]->Demux_Offset_Frame+FrameCount;
- }
- else
- Duration=Sequences[Sequences_Current]->Resources[Pos]->Demux_Offset_DTS+Duration-Sequences[Sequences_Current]->Resources[0]->Demux_Offset_DTS;
- #endif //MEDIAINFO_DEMUX
- }
- }
-
- if (Pos)
- {
- Sequences[Sequences_Current]->Resources[Pos]->MI=MI_Create();
- Sequences[Sequences_Current]->Resources[Pos]->MI->Config.File_IgnoreEditsBefore=Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsBefore;
- if (Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfter==(int64u)-1 && Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfterDuration!=(int64u)-1)
- Sequences[Sequences_Current]->Resources[Pos]->MI->Config.File_IgnoreEditsAfter=Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsBefore+Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfterDuration;
- else
- Sequences[Sequences_Current]->Resources[Pos]->MI->Config.File_IgnoreEditsAfter=Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfter;
- Sequences[Sequences_Current]->Resources[Pos]->MI->Config.File_EditRate=Sequences[Sequences_Current]->Resources[Pos]->EditRate;
- #if MEDIAINFO_DEMUX
- Sequences[Sequences_Current]->Resources[Pos]->MI->Config.Demux_Offset_Frame=Sequences[Sequences_Current]->Resources[Pos]->Demux_Offset_Frame;
- Sequences[Sequences_Current]->Resources[Pos]->MI->Config.Demux_Offset_DTS=Sequences[Sequences_Current]->Resources[Pos]->Demux_Offset_DTS;
- #endif //MEDIAINFO_DEMUX
- }
- }
- if (!Sequences[Sequences_Current]->Resources.empty())
- {
- Sequences[Sequences_Current]->MI->Config.File_IgnoreEditsBefore=Sequences[Sequences_Current]->Resources[0]->IgnoreEditsBefore;
- if (Sequences[Sequences_Current]->Resources[0]->IgnoreEditsAfter==(int64u)-1 && Sequences[Sequences_Current]->Resources[0]->IgnoreEditsAfterDuration!=(int64u)-1)
- Sequences[Sequences_Current]->MI->Config.File_IgnoreEditsAfter=Sequences[Sequences_Current]->Resources[0]->IgnoreEditsBefore+Sequences[Sequences_Current]->Resources[0]->IgnoreEditsAfterDuration;
- else
- Sequences[Sequences_Current]->MI->Config.File_IgnoreEditsAfter=Sequences[Sequences_Current]->Resources[0]->IgnoreEditsAfter;
- Sequences[Sequences_Current]->MI->Config.File_EditRate=Sequences[Sequences_Current]->Resources[0]->EditRate;
- #if MEDIAINFO_DEMUX
- Sequences[Sequences_Current]->MI->Config.Demux_Offset_Frame=Sequences[Sequences_Current]->Resources[0]->Demux_Offset_Frame;
- Sequences[Sequences_Current]->MI->Config.Demux_Offset_DTS=Sequences[Sequences_Current]->Resources[0]->Demux_Offset_DTS;
- #endif //MEDIAINFO_DEMUX
- }
- }
-
- if (Sequences[Sequences_Current]->IsCircular)
- {
- MI->Fill(Sequences[Sequences_Current]->StreamKind, Sequences[Sequences_Current]->StreamPos, "Source_Info", "Circular");
- if (!Config->File_KeepInfo_Get())
- {
- #if MEDIAINFO_DEMUX
- if (CountOfReferencesToParse)
- CountOfReferencesToParse--;
- #endif //MEDIAINFO_DEMUX
- Sequences[Sequences_Current]->StreamKind=Stream_Max;
- Sequences[Sequences_Current]->StreamPos=(size_t)-1;
- Sequences[Sequences_Current]->FileSize=Sequences[Sequences_Current]->MI->Config.File_Size;
- delete Sequences[Sequences_Current]->MI; Sequences[Sequences_Current]->MI=NULL;
- }
- Sequences[Sequences_Current]->FileNames.clear();
- Sequences[Sequences_Current]->Status.set(File__Analyze::IsFinished);
- }
- else
- {
- //Run
- #if MEDIAINFO_EVENTS
- SubFile_Start();
- #endif //MEDIAINFO_EVENTS
- if (!Sequences[Sequences_Current]->MI->Open(Sequences[Sequences_Current]->FileNames.Read()))
- {
- if (Sequences[Sequences_Current]->StreamKind!=Stream_Max)
- MI->Fill(Sequences[Sequences_Current]->StreamKind, Sequences[Sequences_Current]->StreamPos, "Source_Info", "Missing", Unlimited, true, true);
- if (!Config->File_KeepInfo_Get())
- {
- #if MEDIAINFO_DEMUX
- if (CountOfReferencesToParse)
- CountOfReferencesToParse--;
- #endif //MEDIAINFO_DEMUX
- Sequences[Sequences_Current]->StreamKind=Stream_Max;
- Sequences[Sequences_Current]->StreamPos=(size_t)-1;
- Sequences[Sequences_Current]->FileSize=Sequences[Sequences_Current]->MI->Config.File_Size;
- delete Sequences[Sequences_Current]->MI; Sequences[Sequences_Current]->MI=NULL;
- }
- Sequences[Sequences_Current]->Status.set(File__Analyze::IsFinished);
- }
-
- if (Config->ParseSpeed>=1)
- for (size_t Pos=1; Pos<Sequences[Sequences_Current]->Resources.size(); Pos++)
- {
- Sequences[Sequences_Current]->Resources[Pos]->FileNames.Separator_Set(0, ",");
- Sequences[Sequences_Current]->Resources[Pos]->MI->Open(Sequences[Sequences_Current]->Resources[Pos]->FileNames.Read());
- }
-
- #if MEDIAINFO_NEXTPACKET && MEDIAINFO_DEMUX
- if (Config->NextPacket_Get())
- return false;
- #endif //MEDIAINFO_NEXTPACKET
- }
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File__ReferenceFilesHelper::ParseReference()
-{
- if (Sequences[Sequences_Current]->MI==NULL && !Sequences[Sequences_Current]->FileNames.empty())
- {
- if (!ParseReference_Init())
- return;
- }
-
- if (Sequences[Sequences_Current]->MI)
- {
- #if MEDIAINFO_EVENTS && MEDIAINFO_NEXTPACKET
- if (DTS_Interval!=(int64u)-1 && !Sequences[Sequences_Current]->Status[File__Analyze::IsFinished] && Sequences[Sequences_Current]->MI->Info->FrameInfo.DTS!=(int64u)-1 && DTS_Minimal!=(int64u)-1 && (Sequences[Sequences_Current]->Resources.empty() || Sequences[Sequences_Current]->Resources_Current<Sequences[Sequences_Current]->Resources.size()))
- {
- int64u DTS_Temp;
- if (!Sequences[Sequences_Current]->Resources.empty() && Sequences[Sequences_Current]->Resources_Current)
- {
- if (Sequences[Sequences_Current]->Resources[Sequences[Sequences_Current]->Resources_Current]->MI->Info->FrameInfo.DTS!=(int64u)-1)
- DTS_Temp=Sequences[Sequences_Current]->Resources[Sequences[Sequences_Current]->Resources_Current]->MI->Info->FrameInfo.DTS-Sequences[Sequences_Current]->Resources[Sequences[Sequences_Current]->Resources_Current]->MI->Info->Config->Demux_Offset_DTS_FromStream;
- else
- DTS_Temp=0;
- }
- else
- {
- if (Sequences[Sequences_Current]->MI->Info->FrameInfo.DTS!=(int64u)-1)
- DTS_Temp=Sequences[Sequences_Current]->MI->Info->FrameInfo.DTS-Sequences[Sequences_Current]->MI->Info->Config->Demux_Offset_DTS_FromStream;
- else
- DTS_Temp=0;
- }
- DTS_Temp+=Sequences[Sequences_Current]->Resources[Sequences[Sequences_Current]->Resources_Current]->Demux_Offset_DTS;
- if (!Sequences[Sequences_Current]->Resources.empty() && Sequences[Sequences_Current]->Resources_Current<Sequences[Sequences_Current]->Resources.size() && Sequences[Sequences_Current]->Resources[Sequences[Sequences_Current]->Resources_Current]->EditRate && Sequences[Sequences_Current]->Resources[Sequences[Sequences_Current]->Resources_Current]->IgnoreEditsBefore)
- {
- int64u TimeOffset=float64_int64s(((float64)Sequences[Sequences_Current]->Resources[Sequences[Sequences_Current]->Resources_Current]->IgnoreEditsBefore)/Sequences[Sequences_Current]->Resources[Sequences[Sequences_Current]->Resources_Current]->EditRate*1000000000);
- if (DTS_Temp>TimeOffset)
- DTS_Temp-=TimeOffset;
- else
- DTS_Temp=0;
- }
- if (DTS_Temp>DTS_Minimal+DTS_Interval)
- return;
- }
- if (Config->Event_CallBackFunction_IsSet() && !Sequences[Sequences_Current]->Status[File__Analyze::IsFinished])
- {
- #if MEDIAINFO_DEMUX
- SubFile_Start();
- if (Sequences[Sequences_Current]->Resources_Current==0)
- {
- while ((Sequences[Sequences_Current]->Status=Sequences[Sequences_Current]->MI->Open_NextPacket())[8])
- {
- if (!Sequences[Sequences_Current]->FileSize_IsPresent && Sequences[Sequences_Current]->MI->Config.File_Size!=(int64u)-1)
- {
- Sequences[Sequences_Current]->FileSize_IsPresent=true;
- if (CountOfReferences_ForReadSize)
- {
- CountOfReferences_ForReadSize--;
- if (!CountOfReferences_ForReadSize)
- CountOfReferences_ForReadSize_Run();
- }
- }
-
- if (Config->Event_CallBackFunction_IsSet())
- {
- Config->Demux_EventWasSent=true;
- return;
- }
- }
- Sequences[Sequences_Current]->Resources_Current++;
- if (Sequences[Sequences_Current]->Resources_Current<Sequences[Sequences_Current]->Resources.size() && Sequences[Sequences_Current]->Resources[Sequences[Sequences_Current]->Resources_Current]->MI)
- Sequences[Sequences_Current]->Resources[Sequences[Sequences_Current]->Resources_Current]->MI->Open_Buffer_Seek(0, 0, (int64u)-1);
- }
-
- #if MEDIAINFO_NEXTPACKET && MEDIAINFO_DEMUX
- if (Config->ParseSpeed<1.0)
- Sequences[Sequences_Current]->Resources_Current=Sequences[Sequences_Current]->Resources.size(); //No need to parse all files
- #endif //MEDIAINFO_NEXTPACKET
-
- while (Sequences[Sequences_Current]->Resources_Current<Sequences[Sequences_Current]->Resources.size())
- {
- while ((Sequences[Sequences_Current]->Status=Sequences[Sequences_Current]->Resources[Sequences[Sequences_Current]->Resources_Current]->MI->Open_NextPacket())[8])
- {
- if (!Sequences[Sequences_Current]->FileSize_IsPresent && Sequences[Sequences_Current]->MI->Config.File_Size!=(int64u)-1)
- {
- Sequences[Sequences_Current]->FileSize_IsPresent=true;
- if (CountOfReferences_ForReadSize)
- {
- CountOfReferences_ForReadSize--;
- if (!CountOfReferences_ForReadSize)
- CountOfReferences_ForReadSize_Run();
- }
- }
-
- if (Config->Event_CallBackFunction_IsSet())
- {
- Config->Demux_EventWasSent=true;
- return;
- }
- }
- Sequences[Sequences_Current]->Resources_Current++;
- if (Sequences[Sequences_Current]->Resources_Current<Sequences[Sequences_Current]->Resources.size() && Sequences[Sequences_Current]->Resources[Sequences[Sequences_Current]->Resources_Current]->MI)
- Sequences[Sequences_Current]->Resources[Sequences[Sequences_Current]->Resources_Current]->MI->Open_Buffer_Seek(0, 0, (int64u)-1);
- }
- if (CountOfReferencesToParse)
- CountOfReferencesToParse--;
- #endif //MEDIAINFO_DEMUX
- }
- #endif //MEDIAINFO_EVENTS && MEDIAINFO_NEXTPACKET
- ParseReference_Finalize();
- if (!Config->File_KeepInfo_Get())
- {
- Sequences[Sequences_Current]->StreamKind=Stream_Max;
- Sequences[Sequences_Current]->StreamPos=(size_t)-1;
- Sequences[Sequences_Current]->State=10000;
- if (Sequences[Sequences_Current]->Resources.empty())
- Sequences[Sequences_Current]->FileSize=Sequences[Sequences_Current]->MI->Config.File_Size;
- else if (Sequences[Sequences_Current]->FileSize==(int64u)-1)
- {
- Sequences[Sequences_Current]->FileSize=0;
- for (size_t Pos=0; Pos<Sequences[Sequences_Current]->Resources.size(); Pos++)
- for (size_t Resource_FileNames_Pos=0; Resource_FileNames_Pos<Sequences[Sequences_Current]->Resources[Pos]->FileNames.size(); Resource_FileNames_Pos++)
- Sequences[Sequences_Current]->FileSize+=File::Size_Get(Sequences[Sequences_Current]->Resources[Pos]->FileNames[Resource_FileNames_Pos]);
- }
- delete Sequences[Sequences_Current]->MI; Sequences[Sequences_Current]->MI=NULL;
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File__ReferenceFilesHelper::ParseReference_Finalize ()
-{
- //Removing wrong initial value
- if (Sequences[Sequences_Current]->MI->Count_Get(Sequences[Sequences_Current]->StreamKind)==0 && Sequences[Sequences_Current]->StreamPos!=(size_t)-1
- && Sequences[Sequences_Current]->MI->Count_Get(Stream_Video)+Sequences[Sequences_Current]->MI->Count_Get(Stream_Audio)+Sequences[Sequences_Current]->MI->Count_Get(Stream_Image)+Sequences[Sequences_Current]->MI->Count_Get(Stream_Text)+Sequences[Sequences_Current]->MI->Count_Get(Stream_Other))
- {
- MI->Stream_Erase(Sequences[Sequences_Current]->StreamKind, Sequences[Sequences_Current]->StreamPos);
- for (sequences::iterator ReferenceTemp=Sequences.begin(); ReferenceTemp!=Sequences.end(); ++ReferenceTemp)
- if ((*ReferenceTemp)->StreamKind==Sequences[Sequences_Current]->StreamKind && (*ReferenceTemp)->StreamPos!=(size_t)-1 && (*ReferenceTemp)->StreamPos>Sequences[Sequences_Current]->StreamPos)
- (*ReferenceTemp)->StreamPos--;
- Sequences[Sequences_Current]->StreamPos=(size_t)-1;
- }
-
- bool StreamFound=false;
- for (size_t StreamKind=Stream_General+1; StreamKind<Stream_Max; StreamKind++)
- for (size_t StreamPos=0; StreamPos<Sequences[Sequences_Current]->MI->Count_Get((stream_t)StreamKind); StreamPos++)
- {
- StreamKind_Last=(stream_t)StreamKind;
- if (Sequences[Sequences_Current]->StreamPos!=(size_t)-1 && StreamKind_Last==Sequences[Sequences_Current]->StreamKind && StreamPos==0)
- {
- StreamPos_To=Sequences[Sequences_Current]->StreamPos;
- StreamFound=true;
- }
- else
- {
- size_t ToInsert=(size_t)-1;
- for (sequences::iterator ReferencePos=Sequences.begin(); ReferencePos!=Sequences.end(); ++ReferencePos)
- if ((*ReferencePos)->StreamKind==StreamKind_Last && Sequences[Sequences_Current]->StreamID<(*ReferencePos)->StreamID)
- {
- ToInsert=(*ReferencePos)->StreamPos;
- break;
- }
-
- StreamPos_To=Stream_Prepare((stream_t)StreamKind, ToInsert);
- }
- StreamPos_From=StreamPos;
-
- ParseReference_Finalize_PerStream();
- }
-
- if (!StreamFound && Sequences[Sequences_Current]->StreamKind!=Stream_Max && Sequences[Sequences_Current]->StreamPos!=(size_t)-1 && Sequences[Sequences_Current]->MI->Info)
- {
- Ztring MuxingMode=MI->Retrieve(Sequences[Sequences_Current]->StreamKind, Sequences[Sequences_Current]->StreamPos, "MuxingMode");
- if (!MuxingMode.empty())
- MuxingMode.insert(0, __T(" / "));
- MI->Fill(Sequences[Sequences_Current]->StreamKind, Sequences[Sequences_Current]->StreamPos, "MuxingMode", Sequences[Sequences_Current]->MI->Info->Get(Stream_General, 0, General_Format)+MuxingMode, true);
- }
-}
-
-//---------------------------------------------------------------------------
-void File__ReferenceFilesHelper::ParseReference_Finalize_PerStream ()
-{
- //Hacks - Before
- Ztring CodecID=MI->Retrieve(StreamKind_Last, StreamPos_To, MI->Fill_Parameter(StreamKind_Last, Generic_CodecID));
- Ztring ID_Base;
- if (HasMainFile_Filled && !Sequences[Sequences_Current]->IsMain)
- {
- ID_Base=Ztring::ToZtring(ID_Max+Sequences[Sequences_Current]->StreamID-1);
- MI->Fill(StreamKind_Last, StreamPos_To, "SideCar_FilePos", Sequences[Sequences_Current]->StreamID-1);
- (*MI->Stream_More)[StreamKind_Last][StreamPos_To](Ztring().From_Local("SideCar_FilePos"), Info_Options)=__T("N NT");
- }
- else if (Sequences[Sequences_Current]->StreamID!=(int64u)-1)
- ID_Base=Ztring::ToZtring(Sequences[Sequences_Current]->StreamID);
- Ztring ID=ID_Base;
- Ztring ID_String=ID_Base;
- Ztring MenuID;
- Ztring MenuID_String;
-
- if (!HasMainFile_Filled && Sequences[Sequences_Current]->IsMain)
- {
- MI->Fill(Stream_General, 0, General_Format, Sequences[Sequences_Current]->MI->Get(Stream_General, 0, General_Format) , true);
- MI->Fill(Stream_General, 0, General_CompleteName, Sequences[Sequences_Current]->MI->Get(Stream_General, 0, General_CompleteName) , true);
- MI->Fill(Stream_General, 0, General_FileExtension, Sequences[Sequences_Current]->MI->Get(Stream_General, 0, General_FileExtension) , true);
- HasMainFile=true;
- HasMainFile_Filled=true;
- }
- if (Sequences[Sequences_Current]->IsMain)
- {
- int64u ID_New=Sequences[Sequences_Current]->MI->Get(StreamKind_Last, StreamPos_From, General_ID).To_int64u();
- if (ID_Max<ID_New)
- ID_Max=ID_New;
- }
-
- MI->Clear(StreamKind_Last, StreamPos_To, General_ID);
-
- MI->Merge(*Sequences[Sequences_Current]->MI->Info, StreamKind_Last, StreamPos_From, StreamPos_To);
-
- if (!Sequences[Sequences_Current]->Resources.empty())
- {
- MI->Clear(StreamKind_Last, StreamPos_To, MI->Fill_Parameter(StreamKind_Last, Generic_BitRate));
- MI->Clear(StreamKind_Last, StreamPos_To, MI->Fill_Parameter(StreamKind_Last, Generic_Duration));
- MI->Clear(StreamKind_Last, StreamPos_To, MI->Fill_Parameter(StreamKind_Last, Generic_FrameCount));
- MI->Clear(StreamKind_Last, StreamPos_To, MI->Fill_Parameter(StreamKind_Last, Generic_StreamSize));
-
- float64 BitRate_Before=0;
- int64u Duration_Temp=0;
- int64u FrameCount_Temp=0;
- int64u StreamSize_Temp=0;
- int64u FileSize_Temp=0;
- for (size_t Pos=0; Pos<Sequences[Sequences_Current]->Resources.size(); Pos++)
- {
- MediaInfo_Internal MI2;
- MI2.Option(__T("File_KeepInfo"), __T("1"));
- Ztring ParseSpeed_Save=MI2.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI2.Option(__T("Demux_Get"), __T(""));
- MI2.Option(__T("ParseSpeed"), __T("0"));
- MI2.Option(__T("Demux"), Ztring());
- MI2.Config.File_IgnoreEditsBefore=Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsBefore;
- if (Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfter==(int64u)-1 && Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfterDuration!=(int64u)-1)
- MI2.Config.File_IgnoreEditsAfter=Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsBefore+Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfterDuration;
- else
- MI2.Config.File_IgnoreEditsAfter=Sequences[Sequences_Current]->Resources[Pos]->IgnoreEditsAfter;
- MI2.Config.File_EditRate=Sequences[Sequences_Current]->Resources[Pos]->EditRate;
- Sequences[Sequences_Current]->Resources[Pos]->FileNames.Separator_Set(0, ",");
- size_t MiOpenResult=MI2.Open(Sequences[Sequences_Current]->Resources[Pos]->FileNames.Read());
- MI2.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI2.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (MiOpenResult)
- {
- BitRate_Before=MI2.Get(StreamKind_Last, StreamPos_From, MI->Fill_Parameter(StreamKind_Last, Generic_BitRate)).To_float64();
- Ztring Duration_Temp2=MI2.Get(StreamKind_Last, StreamPos_From, MI->Fill_Parameter(StreamKind_Last, Generic_Duration));
- if (!Duration_Temp2.empty() && Duration_Temp!=(int64u)-1)
- Duration_Temp+=Duration_Temp2.To_int64u();
- else
- Duration_Temp=(int64u)-1;
- Ztring FrameCount_Temp2=MI2.Get(StreamKind_Last, StreamPos_From, MI->Fill_Parameter(StreamKind_Last, Generic_FrameCount));
- if (!FrameCount_Temp2.empty() && FrameCount_Temp!=(int64u)-1)
- FrameCount_Temp+=FrameCount_Temp2.To_int64u();
- else
- FrameCount_Temp=(int64u)-1;
- Ztring StreamSize_Temp2=MI2.Get(StreamKind_Last, StreamPos_From, MI->Fill_Parameter(StreamKind_Last, Generic_StreamSize));
- if (!StreamSize_Temp2.empty() && StreamSize_Temp!=(int64u)-1)
- StreamSize_Temp+=StreamSize_Temp2.To_int64u();
- else
- StreamSize_Temp=(int64u)-1;
- Ztring FileSize_Temp2=MI2.Get(Stream_General, 0, General_FileSize);
- if (!FileSize_Temp2.empty() && FileSize_Temp!=(int64u)-1)
- FileSize_Temp+=FileSize_Temp2.To_int64u();
- else
- FileSize_Temp=(int64u)-1;
- }
- else
- {
- Duration_Temp=(int64u)-1;
- FrameCount_Temp=(int64u)-1;
- StreamSize_Temp=(int64u)-1;
- FileSize_Temp=(int64u)-1;
- break;
- }
- }
-
- if (Duration_Temp!=(int64u)-1)
- MI->Fill(StreamKind_Last, StreamPos_To, MI->Fill_Parameter(StreamKind_Last, Generic_Duration), Duration_Temp, 10, true);
- if (FrameCount_Temp!=(int64u)-1)
- MI->Fill(StreamKind_Last, StreamPos_To, MI->Fill_Parameter(StreamKind_Last, Generic_FrameCount), FrameCount_Temp, 10, true);
- if (StreamSize_Temp!=(int64u)-1)
- MI->Fill(StreamKind_Last, StreamPos_To, MI->Fill_Parameter(StreamKind_Last, Generic_StreamSize), StreamSize_Temp, 10, true);
- if (FileSize_Temp!=(int64u)-1)
- Sequences[Sequences_Current]->FileSize=FileSize_Temp;
- if (BitRate_Before && Duration_Temp)
- {
- float64 BitRate_After=((float64)StreamSize_Temp)*8000/Duration_Temp;
- if (BitRate_Before>BitRate_After*0.999 && BitRate_Before<BitRate_After*1.001)
- MI->Fill(StreamKind_Last, StreamPos_To, MI->Fill_Parameter(StreamKind_Last, Generic_BitRate), BitRate_Before, 0, true); //In case of similar bitrate, there is great chance hte compute bit rate is different due to aproximation errors only, using the previous one. TODO: find a better way to detect it
- }
- }
-
- //Frame rate if available from container
- if (StreamKind_Last==Stream_Video && Sequences[Sequences_Current]->FrameRate)
- MI->Fill(Stream_Video, StreamPos_To, Video_FrameRate, Sequences[Sequences_Current]->FrameRate, 3 , true);
-
- //Hacks - After
- if (!Sequences[Sequences_Current]->IsMain && CodecID!=MI->Retrieve(StreamKind_Last, StreamPos_To, MI->Fill_Parameter(StreamKind_Last, Generic_CodecID)))
- {
- if (!CodecID.empty())
- CodecID+=__T(" / ");
- CodecID+=MI->Retrieve(StreamKind_Last, StreamPos_To, MI->Fill_Parameter(StreamKind_Last, Generic_CodecID));
- MI->Fill(StreamKind_Last, StreamPos_To, MI->Fill_Parameter(StreamKind_Last, Generic_CodecID), CodecID, true);
- }
- if (!Sequences[Sequences_Current]->IsMain && Sequences[Sequences_Current]->MI->Count_Get(Stream_Video)+Sequences[Sequences_Current]->MI->Count_Get(Stream_Audio)>1 && Sequences[Sequences_Current]->MI->Get(Stream_Video, 0, Video_Format)!=__T("DV"))
- {
- if (StreamKind_Last==Stream_Menu)
- {
- ZtringList List; List.Separator_Set(0, __T(" / ")); List.Write(MI->Retrieve(StreamKind_Last, StreamPos_To, "List"));
- ZtringList List_String; List_String.Separator_Set(0, __T(" / ")); List_String.Write(MI->Retrieve(StreamKind_Last, StreamPos_To, "List/String"));
- if (!ID_Base.empty())
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- List[Pos].insert(0, ID_Base+__T("-"));
- List_String[Pos].insert(0, ID_Base+__T("-"));
- }
- MI->Fill(Stream_Menu, StreamPos_To, Menu_List, List.Read(), true);
- MI->Fill(Stream_Menu, StreamPos_To, Menu_List_String, List_String.Read(), true);
- }
- else if (Sequences.size()>1 && Sequences[Sequences_Current]->MI->Count_Get(Stream_Menu)==0)
- {
- if (Sequences[Sequences_Current]->MenuPos==(size_t)-1)
- {
- Sequences[Sequences_Current]->MenuPos=MI->Stream_Prepare(Stream_Menu);
- MI->Fill(Stream_Menu, Sequences[Sequences_Current]->MenuPos, General_ID, ID_Base);
- MI->Fill(Stream_Menu, Sequences[Sequences_Current]->StreamPos, "Source", Sequences[Sequences_Current]->Source);
- }
- Ztring List=Sequences[Sequences_Current]->MI->Get(StreamKind_Last, StreamPos_From, General_ID);
- Ztring List_String=Sequences[Sequences_Current]->MI->Get(StreamKind_Last, StreamPos_From, General_ID_String);
- if (!ID_Base.empty())
- {
- List.insert(0, ID_Base+__T("-"));
- List_String.insert(0, ID_Base+__T("-"));
- }
- MI->Fill(Stream_Menu, Sequences[Sequences_Current]->MenuPos, Menu_List, List);
- MI->Fill(Stream_Menu, Sequences[Sequences_Current]->MenuPos, Menu_List_String, List_String);
- }
- }
- if (!Sequences[Sequences_Current]->IsMain && (ContainerHasNoId || !Config->File_ID_OnlyRoot_Get() || Sequences[Sequences_Current]->MI->Get(Stream_General, 0, General_Format)==__T("SCC") || Sequences[Sequences_Current]->MI->Count_Get(Stream_Video)+Sequences[Sequences_Current]->MI->Count_Get(Stream_Audio)>1) && !MI->Retrieve(StreamKind_Last, StreamPos_To, General_ID).empty())
- {
- if (!ID.empty())
- ID+=__T('-');
- ID+=MI->Retrieve(StreamKind_Last, StreamPos_To, General_ID);
- if (!ID_String.empty())
- ID_String+=__T('-');
- ID_String+=MI->Retrieve(StreamKind_Last, StreamPos_To, General_ID_String);
- if (!MI->Retrieve(StreamKind_Last, StreamPos_To, "MenuID").empty())
- {
- if (!ID_Base.empty())
- MenuID=ID_Base+__T('-');
- MenuID+=MI->Retrieve(StreamKind_Last, StreamPos_To, "MenuID");
- if (!ID_Base.empty())
- MenuID_String=ID_Base+__T('-');
- MenuID_String+=MI->Retrieve(StreamKind_Last, StreamPos_To, "MenuID/String");
- }
- else if (Sequences[Sequences_Current]->MenuPos!=(size_t)-1)
- {
- MenuID=ID_Base;
- MenuID_String=ID_Base;
- }
- }
- if (!Sequences[Sequences_Current]->IsMain)
- {
- MI->Fill(StreamKind_Last, StreamPos_To, General_ID, ID, true);
- MI->Fill(StreamKind_Last, StreamPos_To, General_ID_String, ID_String, true);
- MI->Fill(StreamKind_Last, StreamPos_To, "MenuID", MenuID, true);
- MI->Fill(StreamKind_Last, StreamPos_To, "MenuID/String", MenuID_String, true);
- if (!MI->Retrieve(StreamKind_Last, StreamPos_To, "Source").empty())
- {
- if (MI->Retrieve(StreamKind_Last, StreamPos_To, "Source_Original").empty() && Sequences[Sequences_Current]->Source!=MI->Retrieve(StreamKind_Last, StreamPos_To, "Source")) // TODO: better handling
- {
- MI->Fill(StreamKind_Last, StreamPos_To, "Source_Original", MI->Retrieve(StreamKind_Last, StreamPos_To, "Source"));
- MI->Fill(StreamKind_Last, StreamPos_To, "Source_Original_Kind", MI->Retrieve(StreamKind_Last, StreamPos_To, "Source_Kind"));
- MI->Fill(StreamKind_Last, StreamPos_To, "Source_Original_Info", MI->Retrieve(StreamKind_Last, StreamPos_To, "Source_Info"));
- }
- MI->Clear(StreamKind_Last, StreamPos_To, "Source");
- MI->Clear(StreamKind_Last, StreamPos_To, "Source_Kind");
- MI->Clear(StreamKind_Last, StreamPos_To, "Source_Info");
- }
- MI->Fill(StreamKind_Last, StreamPos_To, "Source", Sequences[Sequences_Current]->Source);
- }
- for (std::map<string, Ztring>::iterator Info=Sequences[Sequences_Current]->Infos.begin(); Info!=Sequences[Sequences_Current]->Infos.end(); ++Info)
- if (MI->Retrieve(StreamKind_Last, StreamPos_To, Info->first.c_str()).empty())
- MI->Fill(StreamKind_Last, StreamPos_To, Info->first.c_str(), Info->second);
-
- //Others
- if (!Sequences[Sequences_Current]->IsMain && Sequences[Sequences_Current]->MI->Info && MI->Retrieve(StreamKind_Last, StreamPos_To, Sequences[Sequences_Current]->MI->Info->Fill_Parameter(StreamKind_Last, Generic_Format))!=Sequences[Sequences_Current]->MI->Info->Get(Stream_General, 0, General_Format))
- {
- Ztring MuxingMode=MI->Retrieve(StreamKind_Last, StreamPos_To, "MuxingMode");
- if (!MuxingMode.empty())
- MuxingMode.insert(0, __T(" / "));
- MI->Fill(StreamKind_Last, StreamPos_To, "MuxingMode", Sequences[Sequences_Current]->MI->Info->Get(Stream_General, 0, General_Format)+MuxingMode, true);
- }
-
- //Lists
- #if MEDIAINFO_ADVANCED || MEDIAINFO_MD5
- if (!Sequences[Sequences_Current]->List_Compute_Done && (Sequences[Sequences_Current]->MI->Count_Get(Stream_Menu)==0 || StreamKind_Last==Stream_Menu))
- {
- List_Compute();
- Sequences[Sequences_Current]->List_Compute_Done=true;
- }
- #endif //MEDIAINFO_ADVANCED || MEDIAINFO_MD5
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_ADVANCED || MEDIAINFO_MD5
-void File__ReferenceFilesHelper::List_Compute()
-{
- stream_t StreamKind=Sequences.size()>1?StreamKind_Last:Stream_General;
- size_t StreamPos=Sequences.size()>1?StreamPos_To:0;
-
- stream_t StreamKind_Target=Sequences[Sequences_Current]->MenuPos==(size_t)-1?StreamKind:Stream_Menu;
- size_t StreamPos_Target=Sequences[Sequences_Current]->MenuPos==(size_t)-1?StreamPos:Sequences[Sequences_Current]->MenuPos;
-
- //MD5
- #if MEDIAINFO_MD5
- if (!HasMainFile && Config->File_Md5_Get())
- {
- if (!Sequences[Sequences_Current]->MI->Get(Stream_General, 0, __T("MD5_Generated")).empty())
- {
- if (Sequences[Sequences_Current]->MI->Config.File_Names.size()==1)
- {
- if (MI->Retrieve(StreamKind_Target, StreamPos_Target, "Source").empty())
- {
- Ztring SourcePath;
- Ztring SourceName=MI->Retrieve(Stream_General, 0, General_CompleteName);
- if (SourceName.find(__T("://"))==string::npos)
- SourcePath=ZenLib::FileName::Path_Get(SourceName);
- else
- {
- size_t Pos_Path=SourceName.find_last_of('/');
- if (Pos_Path!=Ztring::npos)
- SourcePath=SourceName.substr(0, Pos_Path);
- }
- size_t SourcePath_Size=SourcePath.size()+1; //Path size + path separator size
- Ztring Temp=Sequences[Sequences_Current]->MI->Config.File_Names[0];
- if (!Config->File_IsReferenced_Get())
- Temp.erase(0, SourcePath_Size);
- MI->Fill(StreamKind_Target, StreamPos_Target, "Source", Temp);
- }
- MI->Fill(StreamKind_Target, StreamPos_Target, "Source_MD5_Generated", Sequences[Sequences_Current]->MI->Get(Stream_General, 0, __T("MD5_Generated")));
- (*MI->Stream_More)[StreamKind_Target][StreamPos_Target](Ztring().From_Local("Source_MD5_Generated"), Info_Options)=__T("N NT");
- }
- MI->Fill(StreamKind_Target, StreamPos_Target, "Source_List_MD5_Generated", Sequences[Sequences_Current]->MI->Get(Stream_General, 0, __T("MD5_Generated")));
- (*MI->Stream_More)[StreamKind_Target][StreamPos_Target](Ztring().From_Local("Source_List_MD5_Generated"), Info_Options)=__T("N NT");
- }
- if (!Sequences[Sequences_Current]->MI->Get(Stream_General, 0, __T("Source_List_MD5_Generated")).empty())
- {
- MI->Fill(StreamKind_Target, StreamPos_Target, "Source_List_MD5_Generated", Sequences[Sequences_Current]->MI->Get(Stream_General, 0, __T("Source_List_MD5_Generated")));
- (*MI->Stream_More)[StreamKind_Target][StreamPos_Target](Ztring().From_Local("Source_List_MD5_Generated"), Info_Options)=__T("N NT");
- }
- else if (!Sequences[Sequences_Current]->MI->Get(StreamKind, StreamPos, __T("Source_List_MD5_Generated")).empty())
- {
- MI->Fill(StreamKind_Target, StreamPos_Target, "Source_List_MD5_Generated", Sequences[Sequences_Current]->MI->Get(StreamKind, StreamPos, __T("Source_List_MD5_Generated")));
- (*MI->Stream_More)[StreamKind_Target][StreamPos_Target](Ztring().From_Local("Source_List_MD5_Generated"), Info_Options)=__T("N NT");
- }
- }
- #endif //MEDIAINFO_MD5
-
- //Source_List
- #if MEDIAINFO_ADVANCED
- if (!HasMainFile && Config->File_Source_List_Get())
- {
- Ztring SourcePath;
- Ztring SourceName=MI->Retrieve(Stream_General, 0, General_CompleteName);
- if (SourceName.find(__T("://"))==string::npos)
- SourcePath=ZenLib::FileName::Path_Get(SourceName);
- else
- {
- size_t Pos_Path=SourceName.find_last_of('/');
- if (Pos_Path!=Ztring::npos)
- SourcePath=SourceName.substr(0, Pos_Path);
- }
- size_t SourcePath_Size=SourcePath.size()+1; //Path size + path separator size
- for (size_t Pos=0; Pos<Sequences[Sequences_Current]->FileNames.size(); Pos++)
- {
- Ztring Temp=Sequences[Sequences_Current]->FileNames[Pos];
- if (!Config->File_IsReferenced_Get())
- Temp.erase(0, SourcePath_Size);
- MI->Fill(StreamKind_Target, StreamPos_Target, "Source_List", Temp);
- }
- if (!Sequences[Sequences_Current]->MI->Get(Stream_General, 0, __T("Source_List")).empty())
- {
- ZtringList List;
- List.Separator_Set(0, __T(" / "));
- List.Write(Sequences[Sequences_Current]->MI->Get(Stream_General, 0, __T("Source_List")));
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- Ztring Temp=List[Pos];
- if (!Config->File_IsReferenced_Get())
- Temp.erase(0, SourcePath_Size);
- MI->Fill(StreamKind_Target, StreamPos_Target, "Source_List", Temp);
- }
- }
- (*MI->Stream_More)[StreamKind_Target][StreamPos_Target](Ztring().From_Local("Source_List"), Info_Options)=__T("N NT");
- }
- #endif //MEDIAINFO_ADVANCED
-}
-#endif //defined(MEDIAINFO_ADVANCED) || defined(MEDIAINFO_MD5)
-
-//---------------------------------------------------------------------------
-MediaInfo_Internal* File__ReferenceFilesHelper::MI_Create()
-{
- //Configuration
- MediaInfo_Internal* MI_Temp=new MediaInfo_Internal();
- MI_Temp->Option(__T("File_IsReferenced"), __T("1"));
- MI_Temp->Option(__T("File_FileNameFormat"), __T("CSV"));
- MI_Temp->Option(__T("File_KeepInfo"), __T("1"));
- MI_Temp->Option(__T("File_ID_OnlyRoot"), Config->File_ID_OnlyRoot_Get()?__T("1"):__T("0"));
- MI_Temp->Option(__T("File_DvDif_DisableAudioIfIsInContainer"), Config->File_DvDif_DisableAudioIfIsInContainer_Get()?__T("1"):__T("0"));
- if ((Sequences.size()>1 || Config->File_MpegTs_ForceMenu_Get()) && !Sequences[Sequences_Current]->IsMain && !HasMainFile)
- MI_Temp->Option(__T("File_MpegTs_ForceMenu"), __T("1"));
- #if MEDIAINFO_AES
- MI_Temp->Option(__T("File_Encryption_Format"), MI->Retrieve(Stream_General, 0, "Encryption_Format"));
- MI_Temp->Option(__T("File_Encryption_Key"), Ztring().From_UTF8(Base64::encode(MI->Config->Encryption_Key_Get())));
- MI_Temp->Option(__T("File_Encryption_Method"), MI->Retrieve(Stream_General, 0, "Encryption_Method"));
- MI_Temp->Option(__T("File_Encryption_Mode"), MI->Retrieve(Stream_General, 0, "Encryption_Mode"));
- MI_Temp->Option(__T("File_Encryption_Padding"), MI->Retrieve(Stream_General, 0, "Encryption_Padding"));
- MI_Temp->Option(__T("File_Encryption_InitializationVector"), MI->Retrieve(Stream_General, 0, "Encryption_InitializationVector"));
- #endif //AES
- #if MEDIAINFO_NEXTPACKET
- if (Config->NextPacket_Get())
- MI_Temp->Option(__T("File_NextPacket"), __T("1"));
- if (Config->File_Demux_Interleave_Get())
- MI_Temp->Option(__T("File_Demux_Interleave"), __T("1"));
- #endif //MEDIAINFO_NEXTPACKET
- #if MEDIAINFO_ADVANCED
- if (Config->File_IgnoreSequenceFileSize_Get())
- MI_Temp->Option(__T("File_IgnoreSequenceFileSize"), __T("1"));
- if (Config->File_IgnoreSequenceFilesCount_Get())
- MI_Temp->Option(__T("File_IgnoreSequenceFilesCount"), __T("1"));
- if (Config->File_Source_List_Get())
- MI_Temp->Option(__T("File_Source_List"), __T("1"));
- #endif //MEDIAINFO_ADVANCED
- #if MEDIAINFO_MD5
- if (Config->File_Md5_Get())
- MI_Temp->Option(__T("File_MD5"), __T("1"));
- #endif //MEDIAINFO_MD5
- #if MEDIAINFO_EVENTS
- MI_Temp->Config.Config_PerPackage=Config->Config_PerPackage;
- if (Config->Event_CallBackFunction_IsSet())
- {
- MI_Temp->Option(__T("File_Event_CallBackFunction"), Config->Event_CallBackFunction_Get());
- MI_Temp->Config.Config_PerPackage->Event_CallBackFunction_Set(Config->Event_CallBackFunction_Get());
- }
- MI_Temp->Config.File_Names_RootDirectory=FileName(MI->File_Name).Path_Get();
- if (Sequences[Sequences_Current]->FileNames.size()>1)
- MI_Temp->Option(__T("File_TestContinuousFileNames"), __T("0"));
- ZtringListList SubFile_IDs;
- if (Sequences[Sequences_Current]->IsMain)
- HasMainFile=true;
- if (HasMainFile && !Sequences[Sequences_Current]->IsMain)
- {
- ZtringList ID;
- ID.push_back(Ztring::ToZtring((((int64u)MediaInfo_Parser_SideCar)<<56)|Sequences[Sequences_Current]->StreamID-1));
- ID.push_back(Ztring::ToZtring(16));
- ID.push_back(Ztring::ToZtring(MediaInfo_Parser_SideCar));
- SubFile_IDs.push_back(ID);
- }
- else if (!Sequences[Sequences_Current]->IsMain)
- for (size_t Pos=0; Pos<MI->StreamIDs_Size; Pos++)
- {
- ZtringList ID;
- if (MI->StreamIDs_Width[Pos]==0)
- ID.push_back(Ztring::ToZtring(-1));
- else if (Pos+1==MI->StreamIDs_Size)
- ID.push_back(Ztring::ToZtring(Sequences[Sequences_Current]->StreamID));
- else
- ID.push_back(Ztring::ToZtring(MI->StreamIDs[Pos]));
- ID.push_back(Ztring::ToZtring(MI->StreamIDs_Width[Pos]));
- ID.push_back(Ztring::ToZtring(MI->ParserIDs[Pos]));
- SubFile_IDs.push_back(ID);
- }
- if (!SubFile_IDs.empty())
- {
- SubFile_IDs.Separator_Set(0, EOL);
- SubFile_IDs.Separator_Set(1, __T(","));
- MI_Temp->Option(__T("File_SubFile_IDs_Set"), SubFile_IDs.Read());
- }
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- if (Config->Demux_Unpacketize_Get())
- MI_Temp->Option(__T("File_Demux_Unpacketize"), __T("1"));
- if (Config->Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10_Get())
- MI_Temp->Option(__T("File_Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10"), __T("1"));
- if (Config->Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Get())
- MI_Temp->Option(__T("File_Demux_Hevc_Transcode_Iso14496_15_to_AnnexB"), __T("1"));
- if (FrameRate)
- MI_Temp->Option(__T("File_Demux_Rate"), Ztring::ToZtring(FrameRate));
- else if (!Sequences[Sequences_Current]->Resources.empty() && Sequences[Sequences_Current]->Resources[0]->EditRate) //TODO: per Pos
- MI_Temp->Option(__T("File_Demux_Rate"), Ztring::ToZtring(Sequences[Sequences_Current]->Resources[0]->EditRate));
- switch (Config->Demux_InitData_Get())
- {
- case 0 : MI_Temp->Option(__T("File_Demux_InitData"), __T("Event")); break;
- case 1 : MI_Temp->Option(__T("File_Demux_InitData"), __T("Field")); break;
- default: ;
- }
- #endif //MEDIAINFO_DEMUX
- #if MEDIAINFO_IBIUSAGE
- if (!Sequences[Sequences_Current]->IbiStream.Infos.empty())
- {
- ibi Ibi;
- Ibi.Streams[(int64u)-1]=new ibi::stream(Sequences[Sequences_Current]->IbiStream);
-
- //IBI Creation
- File_Ibi_Creation IbiCreation(Ibi);
- Ztring IbiText=IbiCreation.Finish();
- if (!IbiText.empty())
- MI_Temp->Option(__T("File_Ibi"), IbiText);
- }
- #endif //MEDIAINFO_IBIUSAGE
-
- return MI_Temp;
-}
-
-//---------------------------------------------------------------------------
-void File__ReferenceFilesHelper::Read_Buffer_Unsynched()
-{
- MI->Open_Buffer_Unsynch();
- for (size_t Sequences_Pos=0; Sequences_Pos<Sequences.size(); Sequences_Pos++)
- if (Sequences[Sequences_Pos]->MI)
- Sequences[Sequences_Pos]->MI->Open_Buffer_Unsynch();
-
- #if MEDIAINFO_DEMUX
- DTS_Minimal=(int64u)-1;
- Config->Demux_EventWasSent=true; //We want not try to read new data from the file
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File__ReferenceFilesHelper::Seek (size_t Method, int64u Value, int64u ID)
-{
- for (Sequences_Current=0; Sequences_Current<Sequences.size(); Sequences_Current++)
- if (Sequences[Sequences_Current]->MI==NULL && !Sequences[Sequences_Current]->FileNames.empty())
- ParseReference_Init();
-
- //Parsing
- switch (Method)
- {
- case 0 :
- #if MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- {
- if (Value)
- {
- if (Value>MI->Config->File_Size)
- return 2; //Invalid value
-
- //Init
- if (!Duration)
- {
- MediaInfo_Internal MI2;
- MI2.Option(__T("File_KeepInfo"), __T("1"));
- Ztring ParseSpeed_Save=MI2.Option(__T("ParseSpeed_Get"), __T(""));
- Ztring Demux_Save=MI2.Option(__T("Demux_Get"), __T(""));
- MI2.Option(__T("ParseSpeed"), __T("0"));
- MI2.Option(__T("Demux"), Ztring());
- size_t MiOpenResult=MI2.Open(MI->File_Name);
- MI2.Option(__T("ParseSpeed"), ParseSpeed_Save); //This is a global value, need to reset it. TODO: local value
- MI2.Option(__T("Demux"), Demux_Save); //This is a global value, need to reset it. TODO: local value
- if (!MiOpenResult)
- return (size_t)-1;
- Duration=MI2.Get(Stream_General, 0, General_Duration).To_float64()/1000;
- }
-
- //Time percentage
- float64 DurationF=Duration;
- DurationF*=Value;
- DurationF/=MI->Config->File_Size;
- size_t DurationM=(size_t)(DurationF*1000);
- Ztring DurationS;
- DurationS+=L'0'+(Char)(DurationM/(10*60*60*1000)); DurationM%=10*60*60*1000;
- DurationS+=L'0'+(Char)(DurationM/( 60*60*1000)); DurationM%= 60*60*1000;
- DurationS+=L':';
- DurationS+=L'0'+(Char)(DurationM/( 10*60*1000)); DurationM%= 10*60*1000;
- DurationS+=L'0'+(Char)(DurationM/( 60*1000)); DurationM%= 60*1000;
- DurationS+=L':';
- DurationS+=L'0'+(Char)(DurationM/( 10*1000)); DurationM%= 10*1000;
- DurationS+=L'0'+(Char)(DurationM/( 1000)); DurationM%= 1000;
- DurationS+=L'.';
- DurationS+=L'0'+(Char)(DurationM/( 100)); DurationM%= 100;
- DurationS+=L'0'+(Char)(DurationM/( 10)); DurationM%= 10;
- DurationS+=L'0'+(Char)(DurationM);
-
- CountOfReferencesToParse=Sequences.size();
- bool HasProblem=false;
- for (Sequences_Current=0; Sequences_Current<Sequences.size(); Sequences_Current++)
- {
- if (Sequences[Sequences_Current]->MI)
- {
- Ztring Result;
- if (Sequences[Sequences_Current]->Resources.size()<=1 || DurationM<Sequences[Sequences_Current]->Resources[1]->Demux_Offset_DTS)
- {
- Sequences[Sequences_Current]->Resources_Current=0;
- Result=Sequences[Sequences_Current]->MI->Option(__T("File_Seek"), DurationS);
- }
- else
- {
- size_t Resources_Current_Temp=1;
- while (Resources_Current_Temp<Sequences[Sequences_Current]->Resources.size() && DurationM>=Sequences[Sequences_Current]->Resources[Resources_Current_Temp]->Demux_Offset_DTS)
- Resources_Current_Temp++;
- Resources_Current_Temp--;
- Result=Sequences[Sequences_Current]->Resources[Resources_Current_Temp]->MI->Option(__T("File_Seek"), DurationS);
- if (Result.empty())
- Sequences[Sequences_Current]->Resources_Current=Resources_Current_Temp;
- }
- if (!Result.empty())
- HasProblem=true;
- }
- Sequences[Sequences_Current]->Status.reset();
- }
- Sequences_Current=0;
- Open_Buffer_Unsynch();
- return HasProblem?(size_t)-1:1; //Not supported value if there is a problem (TODO: better info)
- }
-
- CountOfReferencesToParse=Sequences.size();
- bool HasProblem=false;
- for (Sequences_Current=0; Sequences_Current<Sequences.size(); Sequences_Current++)
- {
- if (Sequences[Sequences_Current]->MI)
- {
- Sequences[Sequences_Current]->Resources_Current=0;
- Ztring Result=Sequences[Sequences_Current]->MI->Option(__T("File_Seek"), Ztring::ToZtring(Value));
- if (!Result.empty())
- HasProblem=true;
- }
- Sequences[Sequences_Current]->Status.reset();
- }
- Sequences_Current=0;
- Open_Buffer_Unsynch();
- return HasProblem?(size_t)-1:1; //Not supported value if there is a problem (TODO: better info)
- }
- #else //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- return (size_t)-1; //Not supported
- #endif //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- case 1 :
- #if MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- {
- //Time percentage
- int64u Duration=MI->Get(Stream_General, 0, General_Duration).To_int64u();
- Ztring DurationS;
- if (Duration)
- {
- Duration*=Value;
- Duration/=10000;
- DurationS+=L'0'+(Char)(Duration/(10*60*60*1000)); Duration%=10*60*60*1000;
- DurationS+=L'0'+(Char)(Duration/( 60*60*1000)); Duration%= 60*60*1000;
- DurationS+=L':';
- DurationS+=L'0'+(Char)(Duration/( 10*60*1000)); Duration%= 10*60*1000;
- DurationS+=L'0'+(Char)(Duration/( 60*1000)); Duration%= 60*1000;
- DurationS+=L':';
- DurationS+=L'0'+(Char)(Duration/( 10*1000)); Duration%= 10*1000;
- DurationS+=L'0'+(Char)(Duration/( 1000)); Duration%= 1000;
- DurationS+=L'.';
- DurationS+=L'0'+(Char)(Duration/( 100)); Duration%= 100;
- DurationS+=L'0'+(Char)(Duration/( 10)); Duration%= 10;
- DurationS+=L'0'+(Char)(Duration);
- }
- else
- DurationS=Ztring::ToZtring(((float64)Value)/100)+__T('%');
-
- CountOfReferencesToParse=Sequences.size();
- bool HasProblem=false;
- for (Sequences_Current=0; Sequences_Current<Sequences.size(); Sequences_Current++)
- {
- if (Sequences[Sequences_Current]->MI)
- {
- Ztring Result;
- if (Sequences[Sequences_Current]->Resources.empty() || Duration<Sequences[Sequences_Current]->Resources[1]->Demux_Offset_DTS)
- {
- Sequences[Sequences_Current]->Resources_Current=0;
- Result=Sequences[Sequences_Current]->MI->Option(__T("File_Seek"), DurationS);
- }
- else
- {
- size_t Resources_Current_Temp=1;
- while (Resources_Current_Temp<Sequences[Sequences_Current]->Resources.size() && Duration>=Sequences[Sequences_Current]->Resources[Resources_Current_Temp]->Demux_Offset_DTS)
- Resources_Current_Temp++;
- Resources_Current_Temp--;
- Result=Sequences[Sequences_Current]->Resources[Resources_Current_Temp]->MI->Option(__T("File_Seek"), DurationS);
- if (Result.empty())
- Sequences[Sequences_Current]->Resources_Current=Resources_Current_Temp;
- }
- if (!Result.empty())
- HasProblem=true;
- }
- Sequences[Sequences_Current]->Status.reset();
- }
- Sequences_Current=0;
- Open_Buffer_Unsynch();
- return HasProblem?2:1; //Invalid value if there is a problem (TODO: better info)
- }
- #else //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- return (size_t)-1; //Not supported
- #endif //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- case 2 : //Timestamp
- #if MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- {
- CountOfReferencesToParse=Sequences.size();
- Ztring Time; Time.Duration_From_Milliseconds(Value/1000000);
- for (Sequences_Current=0; Sequences_Current<Sequences.size(); Sequences_Current++)
- {
- if (Sequences[Sequences_Current]->MI)
- {
- Ztring Result;
- if (Sequences[Sequences_Current]->Resources.size()<2 || Value<Sequences[Sequences_Current]->Resources[1]->Demux_Offset_DTS)
- {
- Sequences[Sequences_Current]->Resources_Current=0;
- Result=Sequences[Sequences_Current]->MI->Option(__T("File_Seek"), Time);
- }
- else
- {
- size_t Resources_Current_Temp=1;
- while (Resources_Current_Temp<Sequences[Sequences_Current]->Resources.size() && Value>=Sequences[Sequences_Current]->Resources[Resources_Current_Temp]->Demux_Offset_DTS)
- Resources_Current_Temp++;
- Resources_Current_Temp--;
- Result=Sequences[Sequences_Current]->Resources[Resources_Current_Temp]->MI->Option(__T("File_Seek"), Time);
- if (Result.empty())
- Sequences[Sequences_Current]->Resources_Current=Resources_Current_Temp;
- }
- if (!Result.empty())
- return 2; //Invalid value
- }
- else
- {
- //There was a problem, removing Sequence
- Sequences.clear();
- return Seek(Method, Value, ID);
- }
- Sequences[Sequences_Current]->Status.reset();
- }
- Sequences_Current=0;
- Open_Buffer_Unsynch();
- return 1;
- }
- #else //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- return (size_t)-1; //Not supported
- #endif //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- case 3 : //FrameNumber
- #if MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- CountOfReferencesToParse=Sequences.size();
- for (Sequences_Current=0; Sequences_Current<Sequences.size(); Sequences_Current++)
- {
- if (Sequences[Sequences_Current]->MI)
- {
- Ztring Result;
- if (Sequences[Sequences_Current]->Resources.size()<2 || Value<Sequences[Sequences_Current]->Resources[1]->Demux_Offset_Frame)
- {
- Sequences[Sequences_Current]->Resources_Current=0;
- Result=Sequences[Sequences_Current]->MI->Option(__T("File_Seek"), __T("Frame=")+Ztring::ToZtring(Value));
- }
- else
- {
- size_t Resources_Current_Temp=1;
- while (Resources_Current_Temp<Sequences[Sequences_Current]->Resources.size() && Value>=Sequences[Sequences_Current]->Resources[Resources_Current_Temp]->Demux_Offset_Frame)
- Resources_Current_Temp++;
- Resources_Current_Temp--;
- Result=Sequences[Sequences_Current]->Resources[Resources_Current_Temp]->MI->Option(__T("File_Seek"), __T("Frame=")+Ztring::ToZtring(Value-Sequences[Sequences_Current]->Resources[Resources_Current_Temp]->Demux_Offset_Frame));
- if (Result.empty())
- Sequences[Sequences_Current]->Resources_Current=Resources_Current_Temp;
- }
- if (!Result.empty())
- return 2; //Invalid value
- }
- Sequences[Sequences_Current]->Status.reset();
- }
- Sequences_Current=0;
- Open_Buffer_Unsynch();
- return 1;
- #else //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- return (size_t)-1; //Not supported
- #endif //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- default : return 0;
- }
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t File__ReferenceFilesHelper::Stream_Prepare (stream_t StreamKind, size_t StreamPos)
-{
- size_t StreamPos_Last=MI->Stream_Prepare(StreamKind, StreamPos);
-
- for (sequences::iterator ReferencePos=Sequences.begin(); ReferencePos!=Sequences.end(); ++ReferencePos)
- if ((*ReferencePos)->StreamKind==StreamKind && (*ReferencePos)->StreamPos>=StreamPos_Last)
- if ((*ReferencePos)->StreamPos!=(size_t)-1)
- (*ReferencePos)->StreamPos++;
-
- return StreamPos_Last;
-}
-
-//---------------------------------------------------------------------------
-void File__ReferenceFilesHelper::FileSize_Compute ()
-{
- if (MI->Config==NULL)
- return;
-
- MI->Config->File_Size=MI->File_Size;
-
- for (size_t Sequences_Pos=0; Sequences_Pos<Sequences.size(); Sequences_Pos++)
- {
- if (Sequences[Sequences_Pos]->FileSize!=(int64u)-1)
- MI->Config->File_Size+=Sequences[Sequences_Pos]->FileSize;
- else if (Sequences[Sequences_Pos]->MI && Sequences[Sequences_Pos]->MI->Config.File_Size!=(int64u)-1)
- {
- MI->Config->File_Size+=Sequences[Sequences_Pos]->MI->Config.File_Size;
- #if MEDIAINFO_ADVANCED
- if (!Config->File_IgnoreSequenceFileSize_Get())
- #endif //MEDIAINFO_ADVANCED
- {
- if (!Sequences[Sequences_Pos]->Resources.empty())
- for (size_t Pos=1; Pos<Sequences[Sequences_Pos]->Resources.size(); Pos++)
- for (size_t Resource_FileNames_Pos=0; Resource_FileNames_Pos<Sequences[Sequences_Pos]->Resources[Pos]->FileNames.size(); Resource_FileNames_Pos++)
- MI->Config->File_Size+=File::Size_Get(Sequences[Sequences_Pos]->Resources[Pos]->FileNames[Resource_FileNames_Pos]);
- }
- }
- else
- {
- #if MEDIAINFO_ADVANCED
- if (!Config->File_IgnoreSequenceFileSize_Get())
- #endif //MEDIAINFO_ADVANCED
- {
- if (Sequences[Sequences_Pos]->Resources.empty())
- for (size_t Pos=0; Pos<Sequences[Sequences_Pos]->FileNames.size(); Pos++)
- MI->Config->File_Size+=File::Size_Get(Sequences[Sequences_Pos]->FileNames[Pos]);
- else
- for (size_t Pos=0; Pos<Sequences[Sequences_Pos]->Resources.size(); Pos++)
- for (size_t Resource_FileNames_Pos=0; Resource_FileNames_Pos<Sequences[Sequences_Pos]->Resources[Pos]->FileNames.size(); Resource_FileNames_Pos++)
- MI->Config->File_Size+=File::Size_Get(Sequences[Sequences_Pos]->Resources[Pos]->FileNames[Resource_FileNames_Pos]);
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File__ReferenceFilesHelper::CountOfReferences_ForReadSize_Run ()
-{
- //Computing read buffer size
- int64u File_Size_Total=0;
- int64u Buffer_Read_Size_Total=MI->Config->File_Buffer_Read_Size_Get();
- for (sequences::iterator Reference_Temp=Sequences.begin(); Reference_Temp!=Sequences.end(); ++Reference_Temp)
- if ((*Reference_Temp)->MI && (*Reference_Temp)->MI->Config.File_Size!=(int64u)-1)
- File_Size_Total+=(*Reference_Temp)->MI->Config.File_Size;
- if (File_Size_Total)
- for (sequences::iterator Reference_Temp=Sequences.begin(); Reference_Temp!=Sequences.end(); ++Reference_Temp)
- if ((*Reference_Temp)->MI)
- {
- int64u Buffer_Read_Size_Temp=float64_int64s(((float64)(*Reference_Temp)->MI->Config.File_Size)/File_Size_Total*Buffer_Read_Size_Total);
- int64u Buffer_Read_Size=1;
- while (Buffer_Read_Size<Buffer_Read_Size_Temp)
- Buffer_Read_Size<<=1;
- (*Reference_Temp)->MI->Config.File_Buffer_Read_Size_Set((size_t)Buffer_Read_Size);
- }
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_EVENTS
-void File__ReferenceFilesHelper::SubFile_Start()
-{
- if (Sequences[Sequences_Current]->StreamID!=StreamID_Previous)
- {
- Ztring FileName_Absolute, FileName_Relative;
- if (Sequences[Sequences_Current]->MI && Sequences[Sequences_Current]->MI->Config.File_Names_Pos && Sequences[Sequences_Current]->MI->Config.File_Names_Pos<Sequences[Sequences_Current]->MI->Config.File_Names.size())
- FileName_Absolute=Sequences[Sequences_Current]->MI->Config.File_Names[Sequences[Sequences_Current]->MI->Config.File_Names_Pos-1];
- else if (!Sequences[Sequences_Current]->FileNames.empty())
- FileName_Absolute=Sequences[Sequences_Current]->FileNames[0];
- else
- FileName_Absolute=Sequences[Sequences_Current]->Source.c_str();
-
- Sequences[Sequences_Current]->MI->Config.Event_SubFile_Start(FileName_Absolute);
- StreamID_Previous=Sequences[Sequences_Current]->StreamID;
- }
-}
-#endif //MEDIAINFO_EVENTS
-
-} //NameSpace
-
-#endif //MEDIAINFO_REFERENCES_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper.h
deleted file mode 100644
index ce11f95bb..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef File__ReferenceFilesHelperH
-#define File__ReferenceFilesHelperH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper_Common.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File__ReferenceFilesHelper
-//***************************************************************************
-
-class File__ReferenceFilesHelper
-{
-public :
- //Constructor / Destructor
- File__ReferenceFilesHelper(File__Analyze* MI, MediaInfo_Config_MediaInfo* Config);
- ~File__ReferenceFilesHelper();
-
- //In
- void AddSequence(sequence* NewSequence);
- void UpdateFileName(const Ztring& OldFileName, const Ztring& NewFileName);
- bool TestContinuousFileNames;
- bool ContainerHasNoId;
- int64u ID_Max;
-
- //Streams management
- void ParseReferences();
-
-private :
- sequences Sequences;
- size_t Sequences_Current;
-
- //Temp
- rfh_common* Common;
-
-
-
-public:
- size_t Sequences_Size() {return Sequences.size();}
- void Clear() {Sequences.clear();}
- bool FilesForStorage;
- bool HasMainFile;
- bool HasMainFile_Filled;
-
- //Streams management
- bool ParseReference_Init();
-
- #if MEDIAINFO_SEEK
- size_t Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
-private :
- //Streams management
- void ParseReference ();
- void ParseReference_Finalize ();
- void ParseReference_Finalize_PerStream ();
- void Open_Buffer_Unsynch() {Read_Buffer_Unsynched();}
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
-
- //temp
- File__Analyze* MI;
- MediaInfo_Config_MediaInfo* Config;
- bool Init_Done;
- bool Demux_Interleave;
- size_t CountOfReferencesToParse;
- size_t CountOfReferences_ForReadSize;
- float64 FrameRate;
- float64 Duration;
- stream_t StreamKind_Last;
- size_t StreamPos_From;
- size_t StreamPos_To;
- #if MEDIAINFO_NEXTPACKET
- int64u DTS_Minimal;
- int64u DTS_Interval;
- #endif //MEDIAINFO_NEXTPACKET
-
- //Helpers
- size_t Stream_Prepare(stream_t StreamKind, size_t StreamPos=(size_t)-1);
- void FileSize_Compute();
- void CountOfReferences_ForReadSize_Run();
- MediaInfo_Internal* MI_Create();
- #if MEDIAINFO_ADVANCED || MEDIAINFO_MD5
- void List_Compute();
- #endif //MEDIAINFO_ADVANCED || MEDIAINFO_MD5
- #if MEDIAINFO_EVENTS
- void SubFile_Start();
- int64u StreamID_Previous;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- int64u Offset_Video_DTS;
- #endif //MEDIAINFO_DEMUX
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Common.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Common.h
deleted file mode 100644
index d798faaa4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Common.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef File__ReferenceFilesHelper_CommonH
-#define File__ReferenceFilesHelper_CommonH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class File__ReferenceFilesHelper;
-class File__Analyze;
-class MediaInfo_Config_MediaInfo;
-
-//***************************************************************************
-// Class resource
-//***************************************************************************
-
-class rfh_common
-{
-public:
- #if MEDIAINFO_DEMUX
- rfh_common(bool* Demux_Interleave_p, int64u* DTS_Minimal):
- #else //MEDIAINFO_DEMUX
- rfh_common():
- #endif //MEDIAINFO_DEMUX
- MI(NULL),
- Config(NULL),
- FileSize((int64u)-1),
- HasMultipleSequences(false),
- HasMainFile(false),
- HasMainFile_Filled(false),
- ContainerHasNoId(false)
- #if MEDIAINFO_DEMUX
- ,
- Demux_Interleave(Demux_Interleave_p),
- DTS_Minimal(DTS_Minimal)
- #endif //MEDIAINFO_DEMUX
- {
- }
-
- //Data
- File__ReferenceFilesHelper* ReferenceFilesHelper;
- File__Analyze* MI;
- MediaInfo_Config_MediaInfo* Config;
- int64u FileSize;
- bool HasMultipleSequences;
- bool HasMainFile;
- bool HasMainFile_Filled;
- bool ContainerHasNoId;
- #if MEDIAINFO_DEMUX
- const bool Demux_Interleave_Get() {return *Demux_Interleave;}
- void Demux_Interleave_Set(bool Demux_Interleave_n) {*Demux_Interleave=Demux_Interleave_n;}
- const int64u DTS_Minimal_Get() {return *DTS_Minimal;}
- void DTS_Minimal_Set(size_t DTS_Minimal_n) {*DTS_Minimal=DTS_Minimal_n;}
- #endif //MEDIAINFO_DEMUX
-
-private:
- #if MEDIAINFO_DEMUX
- bool* Demux_Interleave;
- int64u* DTS_Minimal;
- #endif //MEDIAINFO_DEMUX
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Resource.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Resource.cpp
deleted file mode 100644
index a49fa828a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Resource.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_REFERENCES_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence_Common.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper_Common.h"
-#include "ZenLib/FileName.h"
-#include "ZenLib/Format/Http/Http_Utils.h"
-#if MEDIAINFO_AES
- #include "base64.h"
-#endif //MEDIAINFO_AES
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events_Internal.h"
- #include "MediaInfo/MediaInfo_Config_PerPackage.h"
-#endif //MEDIAINFO_EVENTS
-using namespace std;
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-resource::resource()
-{
- //In
- FileNames.Separator_Set(0, __T(","));
- EditRate=0;
- IgnoreEditsBefore=0;
- IgnoreEditsAfter=(int64u)-1;
-
- //Config
- Sequence=NULL;
- #if MEDIAINFO_NEXTPACKET
- Demux_Offset_Frame=(int64u)-1;
- Demux_Offset_DTS=(int64u)-1;
- #endif //MEDIAINFO_NEXTPACKET
-
- //Private
- MI=NULL;
-
-
-
- IgnoreEditsAfterDuration=(int64u)-1;
- #if MEDIAINFO_DEMUX
- Demux_Offset_FileSize=0;
- #endif //MEDIAINFO_DEMUX
-}
-
-resource::~resource()
-{
- delete MI;
-}
-
-//***************************************************************************
-// In
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void resource::UpdateFileName(const Ztring& OldFileName, const Ztring& NewFileName)
-{
- size_t FileNames_Size=FileNames.size();
- for (size_t Pos=0; Pos<FileNames_Size; Pos++)
- if (FileNames[Pos]==OldFileName)
- FileNames[Pos]=NewFileName;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_REFERENCES_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Resource.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Resource.h
deleted file mode 100644
index c7674a928..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Resource.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef File__ReferenceFilesHelper_ResourceH
-#define File__ReferenceFilesHelper_ResourceH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/MediaInfo_Internal.h"
-#include <vector>
-#if MEDIAINFO_EVENTS
- #include <set>
-#endif //MEDIAINFO_EVENTS
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class rfhs_common;
-
-class resource
-{
-public:
- //Constructor/Desctructor
- resource();
- ~resource();
-
- //In
- void UpdateFileName(const Ztring& OldFileName, const Ztring& NewFileName);
- ZtringList FileNames; //Source file name (relative path)
- float64 EditRate;
- int64u IgnoreEditsBefore;
- int64u IgnoreEditsAfter;
-
- //Config
- rfhs_common* Sequence;
- #if MEDIAINFO_NEXTPACKET
- int64u Demux_Offset_Frame;
- int64u Demux_Offset_DTS;
- #endif //MEDIAINFO_NEXTPACKET
-
- MediaInfo_Internal* MI;
-
-
-
- int64u IgnoreEditsAfterDuration; //temporary value, some formats have duration instead of frame position
- #if MEDIAINFO_DEMUX
- int64u Demux_Offset_FileSize;
- #endif //MEDIAINFO_DEMUX
-};
-
-typedef std::vector<resource*> resources;
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence.cpp b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence.cpp
deleted file mode 100644
index cd4bf45b3..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_REFERENCES_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper_Common.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-sequence::sequence()
-{
- //In
- StreamKind=Stream_Max;
- StreamPos=(size_t)-1;
- StreamID=(int64u)-1;
- MenuPos=(size_t)-1;
- Enabled=true;
- IsMain=false;
- //MenuPos=(size_t)-1;
-
- //Out
- State=0;
- IsCircular=false;
- #if MEDIAINFO_ADVANCED || MEDIAINFO_MD5
- List_Compute_Done=false;
- #endif //MEDIAINFO_ADVANCED || MEDIAINFO_MD5
-
- //Config
- Package=NULL;
-
- //Private
- Resources_Current=0;
- Common=new rfhs_common(&StreamKind, &StreamPos, &StreamID, NULL, &Enabled, &IsMain);
-
-
-
-
- FileNames.Separator_Set(0, __T(","));
- FrameRate=0;
- Delay=0;
- FileSize=(int64u)-1;
- IsMain=false;
- FileSize_IsPresent=false;
- #if MEDIAINFO_ADVANCED || MEDIAINFO_MD5
- List_Compute_Done=false;
- #endif //MEDIAINFO_ADVANCED || MEDIAINFO_MD5
- MI=NULL;
-}
-
-//---------------------------------------------------------------------------
-sequence::~sequence()
-{
- delete MI;
-}
-
-//***************************************************************************
-// In
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void sequence::AddFileName(const Ztring& FileName, size_t Pos)
-{
- FileNames.push_back(FileName);
-}
-
-//---------------------------------------------------------------------------
-void sequence::AddResource(resource* NewResource, size_t Pos)
-{
- NewResource->Sequence=Common;
-
- #if MEDIAINFO_DEMUX
- if (Resources.empty())
- {
- NewResource->Demux_Offset_DTS=0;
- }
- #endif //MEDIAINFO_DEMUX
-
- if (Pos>=Resources.size())
- Resources.push_back(NewResource);
- else
- Resources.insert(Resources.begin()+Pos, NewResource);
-}
-
-//---------------------------------------------------------------------------
-void sequence::UpdateFileName(const Ztring& OldFileName, const Ztring& NewFileName)
-{
- size_t Resources_Size=Resources.size();
- for (size_t Resources_Pos=0; Resources_Pos<Resources_Size; ++Resources_Pos)
- {
- resource* Resource=Resources[Resources_Pos];
-
- Resource->UpdateFileName(OldFileName, NewFileName);
-
- for (size_t Pos=0; Pos<Resource->FileNames.size(); Pos++)
- if (Resource->FileNames[Pos]==NewFileName)
- Infos["UniqueID"]=OldFileName;
- }
-}
-
-//---------------------------------------------------------------------------
-void sequence::FrameRate_Set(float64 NewFrameRate)
-{
- FrameRate=NewFrameRate;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_REFERENCES_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence.h
deleted file mode 100644
index d6a4e4bbb..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef File__ReferenceFilesHelper_SequenceH
-#define File__ReferenceFilesHelper_SequenceH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper_Resource.h"
-#include "MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence_Common.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class resource;
-typedef std::vector<resource*> resources;
-
-class rfhs_common;
-
-//***************************************************************************
-// Class sequence
-//***************************************************************************
-
-class sequence
-{
-public:
- //Constructor/Desctructor
- sequence();
- ~sequence();
-
- //In
- void AddFileName(const Ztring& FileName, size_t Pos=(size_t)-1);
- void AddResource(resource* NewResource, size_t Pos=(size_t)-1);
- void UpdateFileName(const Ztring& OldFileName, const Ztring& NewFileName);
- stream_t StreamKind;
- size_t StreamPos;
- int64u StreamID;
- size_t MenuPos;
- bool Enabled;
- bool IsMain;
- std::map<std::string, Ztring> Infos;
- void FrameRate_Set(float64 NewFrameRate);
-
- //Out
- bool IsFinished() {return !Enabled || Resources_Current>=Resources.size();}
- size_t State;
- bool IsCircular;
- #if MEDIAINFO_ADVANCED || MEDIAINFO_MD5
- bool List_Compute_Done;
- #endif //MEDIAINFO_ADVANCED || MEDIAINFO_MD5
-
- //Config
- rfh_common* Package;
- #if MEDIAINFO_NEXTPACKET && MEDIAINFO_IBIUSAGE
- ibi::stream IbiStream;
- #endif //MEDIAINFO_NEXTPACKET && MEDIAINFO_IBIUSAGE
-
- resources Resources;
- size_t Resources_Current;
-
-public:
- rfhs_common* Common;
-
-
-
-public:
- ZtringList FileNames;
- Ztring Source; //Source file name (relative path)
- float64 FrameRate;
- int64u Delay;
- int64u FileSize;
- bool FileSize_IsPresent; //TODO: merge with FileSize after regression tests
- MediaInfo_Internal* MI;
- std::bitset<32> Status;
-};
-
-typedef std::vector<sequence*> sequences;
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence_Common.h b/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence_Common.h
deleted file mode 100644
index 1fe322be5..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence_Common.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef File__ReferenceFilesHelper_Sequence_CommonH
-#define File__ReferenceFilesHelper_Sequence_CommonH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Const.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-class rfh_common;
-
-//***************************************************************************
-// Class resource
-//***************************************************************************
-
-class rfhs_common
-{
-public:
- rfhs_common(stream_t* StreamKind_p, size_t* StreamPos_p, int64u* StreamID_p, int64u* DTS_p, bool* Enabled_p, bool* IsMain_p):
- Package(NULL),
- FileSize((int64u)-1),
- Edits((int64u)-1),
- DemuxRate(0),
- HasMultipleResources(false),
- StreamKind(StreamKind_p),
- StreamPos(StreamPos_p),
- StreamID(StreamID_p),
- DTS(DTS_p),
- Enabled(Enabled_p),
- IsMain(IsMain_p)
- {
- }
-
- //Data
- rfh_common* Package;
- int64u FileSize;
- int64u Edits;
- float64 DemuxRate;
- bool HasMultipleResources;
- const stream_t StreamKind_Get() {return *StreamKind;}
- void StreamKind_Set(stream_t StreamKind_n) {*StreamKind=StreamKind_n;}
- const size_t StreamPos_Get() {return *StreamPos;}
- void StreamPos_Set(size_t StreamPos_n) {*StreamPos=StreamPos_n;}
- const int64u StreamID_Get() {return *StreamID;}
- void StreamID_Set(int64u StreamID_n) {*StreamID=StreamID_n;}
- const int64u DTS_Get() {return *DTS;}
- void DTS_Set(int64u DTS_n) {*DTS=DTS_n;}
- const bool Enabled_Get() {return *Enabled;}
- const bool IsMain_Get() {return *IsMain;}
-
-private:
- stream_t* StreamKind;
- size_t* StreamPos;
- int64u* StreamID;
- int64u* DTS;
- bool* Enabled;
- bool* IsMain;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/PreComp.cpp b/src/thirdparty/MediaInfo/MediaInfo/PreComp.cpp
deleted file mode 100644
index d5ae78e9c..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/PreComp.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Helpers for compilers (precompilation)
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/PreComp.h"
-//---------------------------------------------------------------------------
diff --git a/src/thirdparty/MediaInfo/MediaInfo/PreComp.h b/src/thirdparty/MediaInfo/MediaInfo/PreComp.h
deleted file mode 100644
index 1b7c4545d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/PreComp.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Helpers for compilers (precompilation)
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_PreCompH
-#define MediaInfo_PreCompH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(_MSC_VER) || defined(__BORLANDC__)
- #include "MediaInfo/Setup.h"
- #include "MediaInfo/File__Analyze.h"
-#endif //_MSC_VER
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_Directory.cpp b/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_Directory.cpp
deleted file mode 100644
index b2267b853..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_Directory.cpp
+++ /dev/null
@@ -1,231 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DIRECTORY_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Reader/Reader_Directory.h"
-#include "ZenLib/Dir.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-size_t Reader_Directory::Format_Test(MediaInfo_Internal* MI, String File_Name)
-{
- #ifdef MEDIAINFO_BDMV_YES
- if (Dir::Exists(File_Name) && File_Name.find(Ztring(1, PathSeparator)+__T("BDMV"))+5==File_Name.size())
- return Bdmv_Format_Test(MI, File_Name);
- #endif //MEDIAINFO_BDMV_YES
-
- #ifdef MEDIAINFO_P2_YES
- if (Dir::Exists(File_Name) && File_Name.rfind(Ztring(1, PathSeparator)+__T("CONTENT"))+8==File_Name.size())
- return P2_Format_Test(MI, File_Name);
- #endif //MEDIAINFO_P2_YES
-
- #ifdef MEDIAINFO_XDCAM_YES
- if (Dir::Exists(File_Name) && File_Name.rfind(Ztring(1, PathSeparator)+__T("XDCAM"))+5==File_Name.size())
- return Xdcam_Format_Test(MI, File_Name);
- #endif //MEDIAINFO_XDCAM_YES
-
- return 0;
-}
-
-//---------------------------------------------------------------------------
-void Reader_Directory::Directory_Cleanup(ZtringList &List)
-{
- #ifdef MEDIAINFO_BDMV_YES
- Bdmv_Directory_Cleanup(List);
- #endif //MEDIAINFO_BDMV_YES
-
- #ifdef MEDIAINFO_P2_YES
- P2_Directory_Cleanup(List);
- #endif //MEDIAINFO_P2_YES
-
- #ifdef MEDIAINFO_XDCAM_YES
- Xdcam_Directory_Cleanup(List);
- #endif //MEDIAINFO_XDCAM_YES
-}
-
-//***************************************************************************
-// Blu-ray stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_BDMV_YES
-int Reader_Directory::Bdmv_Format_Test(MediaInfo_Internal* MI, const String &File_Name)
-{
- if (!MI->SelectFromExtension(__T("Bdmv")))
- return 0;
-
- MI->Open_Buffer_Init(0, File_Name);
-
- MI->Open_Buffer_Continue(NULL, 0);
-
- MI->Open_Buffer_Finalize();
-
- return 1;
-}
-#endif //MEDIAINFO_BDMV_YES
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_BDMV_YES
-void Reader_Directory::Bdmv_Directory_Cleanup(ZtringList &List)
-{
- //if there is a BDMV folder, this is blu-ray
- Ztring ToSearch=Ztring(1, PathSeparator)+__T("BDMV")+PathSeparator+__T("index.bdmv"); //"\BDMV\index.bdmv"
- for (size_t File_Pos=0; File_Pos<List.size(); File_Pos++)
- {
- size_t BDMV_Pos=List[File_Pos].find(ToSearch);
- if (BDMV_Pos!=string::npos && BDMV_Pos!=0 && BDMV_Pos+16==List[File_Pos].size())
- {
- //This is a BDMV index, parsing the directory only if index and movie objects are BOTH present
- ToSearch=List[File_Pos];
- ToSearch.resize(ToSearch.size()-10);
- ToSearch+=__T("MovieObject.bdmv"); //"%CompletePath%\BDMV\MovieObject.bdmv"
- if (List.Find(ToSearch)!=string::npos)
- {
- //We want the folder instead of the files
- List[File_Pos].resize(List[File_Pos].size()-11); //only %CompletePath%\BDMV
- ToSearch=List[File_Pos];
-
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- if (List[Pos].find(ToSearch)==0 && List[Pos]!=ToSearch) //Remove all subdirs of ToSearch but not ToSearch
- {
- //Removing the file in the blu-ray directory
- List.erase(List.begin()+Pos);
- Pos--;
- }
- }
- }
- }
- }
-}
-#endif //MEDIAINFO_BDMV_YES
-
-//***************************************************************************
-// P2 stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_P2_YES
-int Reader_Directory::P2_Format_Test(MediaInfo_Internal* MI, const String &File_Name)
-{
- if (!MI->SelectFromExtension(__T("P2_Clip")))
- return 0;
-
- MI->Open(File_Name+__T("CLIP")+PathSeparator+__T("0013MM.XML"));
-
- return 1;
-}
-#endif //MEDIAINFO_P2_YES
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_P2_YES
-void Reader_Directory::P2_Directory_Cleanup(ZtringList &List)
-{
- //if there is a CONTENTS/CLIP folder, this is P2
- Ztring ToSearch=Ztring(1, PathSeparator)+__T("CONTENTS")+PathSeparator+__T("CLIP")+PathSeparator; //"/CONTENTS/CLIP/"
- for (size_t File_Pos=0; File_Pos<List.size(); File_Pos++)
- {
- size_t P2_Pos=List[File_Pos].find(ToSearch);
- if (P2_Pos!=string::npos && P2_Pos!=0 && P2_Pos+1+8+1+4+1+10==List[File_Pos].size())
- {
- //This is a P2 CLIP
- Ztring Path_Begin=List[File_Pos];
- Path_Begin.resize(Path_Begin.size()-(1+8+1+4+1+10));
- Path_Begin+=Ztring(1, PathSeparator);
- bool HasChanged=false;
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- if (List[Pos].find(Path_Begin)==0 && List[Pos].find(Path_Begin+__T("CONTENTS")+PathSeparator+__T("CLIP")+PathSeparator)==string::npos) //Remove all subdirs of Path_Begin but not with CLIP
- {
- //Removing the file in the P2 directory
- List.erase(List.begin()+Pos);
- Pos--;
- HasChanged=true;
- }
- }
- if (HasChanged)
- File_Pos=0;
- }
- }
-}
-#endif //MEDIAINFO_P2_YES
-
-//***************************************************************************
-// P2 stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_XDCAM_YES
-int Reader_Directory::Xdcam_Format_Test(MediaInfo_Internal* MI, const String &File_Name)
-{
- if (!MI->SelectFromExtension(__T("Xdcam_Clip")))
- return 0;
-
- MI->Open(File_Name+__T("CLIP")+PathSeparator+__T("0013MM.XML"));
-
- return 1;
-}
-#endif //MEDIAINFO_XDCAM_YES
-
-//---------------------------------------------------------------------------
-#ifdef MEDIAINFO_XDCAM_YES
-void Reader_Directory::Xdcam_Directory_Cleanup(ZtringList &List)
-{
- //if there is a XDCAM/Clip folder, this is Xdcam
- Ztring ToSearch=Ztring(1, PathSeparator)+__T("Clip")+PathSeparator; //"/Clip/"
- for (size_t File_Pos=0; File_Pos<List.size(); File_Pos++)
- {
- size_t Xdcam_Pos=List[File_Pos].find(ToSearch);
- if (Xdcam_Pos!=string::npos && Xdcam_Pos!=0 && Xdcam_Pos+1+4+1+12==List[File_Pos].size())
- {
- //This is a XDCAM CLIP
- Ztring Path_Begin=List[File_Pos];
- Path_Begin.resize(Path_Begin.size()-(1+4+1+12));
- Path_Begin+=Ztring(1, PathSeparator);
- if (Dir::Exists(Path_Begin+__T("Edit")) && Dir::Exists(Path_Begin+__T("General")) && Dir::Exists(Path_Begin+__T("Sub")))
- {
- bool HasChanged=false;
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- if (List[Pos].find(Path_Begin)==0 && (List[Pos].find(Path_Begin+__T("Clip")+PathSeparator)==string::npos || (List[Pos].find(__T(".XML"))!=List[Pos].size()-4))) //Remove all subdirs of Path_Begin but not with the right XML
- {
- //Removing the file in the XDCAM directory
- List.erase(List.begin()+Pos);
- Pos--;
- HasChanged=true;
- }
- }
- if (HasChanged)
- File_Pos=0;
- }
- }
- }
-}
-#endif //MEDIAINFO_XDCAM_YES
-
-} //NameSpace
-
-#endif //MEDIAINFO_DIRECTORY_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_Directory.h b/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_Directory.h
deleted file mode 100644
index e87eddb62..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_Directory.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Give information about a lot of media files
-// Dispatch the file to be tested by all containers
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef Reader_DirectoryH
-#define Reader_DirectoryH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Reader/Reader__Base.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-/// @brief Reader_Directory
-//***************************************************************************
-
-class Reader_Directory : public Reader__Base
-{
-public :
- //Constructor/Destructor
- virtual ~Reader_Directory() {}
-
- //Format testing
- size_t Format_Test(MediaInfo_Internal* MI, String File_Name);
-
- //For the list
- void Directory_Cleanup(ZtringList &List);
-
-private :
- //Bdmv
- int Bdmv_Format_Test(MediaInfo_Internal* MI, const String &File_Name);
- void Bdmv_Directory_Cleanup(ZtringList &List);
-
- //P2
- int P2_Format_Test(MediaInfo_Internal* MI, const String &File_Name);
- void P2_Directory_Cleanup(ZtringList &List);
-
- //XDCAM
- int Xdcam_Format_Test(MediaInfo_Internal* MI, const String &File_Name);
- void Xdcam_Directory_Cleanup(ZtringList &List);
-};
-
-} //NameSpace
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_File.cpp b/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_File.cpp
deleted file mode 100644
index efec90876..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_File.cpp
+++ /dev/null
@@ -1,799 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// For user: you can disable or enable it
-//#define MEDIAINFO_DEBUG
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Reader/Reader_File.h"
-#include "MediaInfo/File__Analyze.h"
-#include "ZenLib/FileName.h"
-#ifdef WINDOWS
- #undef __TEXT
- #include "Windows.h"
-#endif //WINDOWS
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-// Debug stuff
-#ifdef MEDIAINFO_DEBUG
- int64u Reader_File_Offset=0;
- int64u Reader_File_BytesRead_Total=0;
- int64u Reader_File_BytesRead=0;
- int64u Reader_File_Count=1;
- #include <iostream>
-#endif // MEDIAINFO_DEBUG
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-#if MEDIAINFO_READTHREAD
-void Reader_File_Thread::Entry()
-{
- ReadSize_Max=Base->Buffer_Max>>3;
-
- for (;;)
- {
- Base->CS.Enter();
- if (Base->Buffer_Begin==Base->Buffer_Max)
- {
- Base->IsLooping=false;
- Base->Buffer_End=Base->Buffer_End2;
- Base->Buffer_End2=0;
- Base->Buffer_Begin=0;
- }
-
- size_t ToRead;
- size_t Buffer_ToReadOffset;
- if (Base->IsLooping)
- {
- ToRead=Base->Buffer_Begin-Base->Buffer_End2;
- Buffer_ToReadOffset=Base->Buffer_End2;
- }
- else
- {
- ToRead=Base->Buffer_Max-Base->Buffer_End;
- Buffer_ToReadOffset=Base->Buffer_End;
- }
- Base->CS.Leave();
-
- if (ToRead)
- {
- if (ToRead>ReadSize_Max)
- ToRead=ReadSize_Max;
- size_t BytesRead=Base->F.Read(Base->Buffer+Buffer_ToReadOffset, ToRead);
- if (!BytesRead)
- break;
-
- Base->CS.Enter();
- if (Base->IsLooping)
- {
- Base->Buffer_End2+=BytesRead;
- }
- else
- {
- Base->Buffer_End+=BytesRead;
- if (Base->Buffer_End==Base->Buffer_Max)
- {
- Base->IsLooping=true;
- }
- }
- Base->CS.Leave();
-
- #ifdef WINDOWS
- SetEvent(Base->Condition_WaitingForMoreData);
- #endif //WINDOWS
- }
- #ifdef WINDOWS
- else
- WaitForSingleObject(Base->Condition_WaitingForMorePlace, INFINITE);
- #endif //WINDOWS
-
- if (IsTerminating())
- break;
- Yield();
- }
-
- #ifdef WINDOWS
- SetEvent(Base->Condition_WaitingForMoreData); //Sending the last event in case the main threading is waiting for more data
- #endif //WINDOWS
-}
-#endif //MEDIAINFO_READTHREAD
-
-const size_t Buffer_NoJump=128*1024;
-
-//---------------------------------------------------------------------------
-Reader_File::~Reader_File()
-{
- #if MEDIAINFO_READTHREAD
- if (ThreadInstance)
- {
- ThreadInstance->RequestTerminate();
- SetEvent(Condition_WaitingForMorePlace);
- while (!ThreadInstance->IsExited())
- Sleep(0);
- #ifdef WINDOWS
- CloseHandle(Condition_WaitingForMorePlace);
- CloseHandle(Condition_WaitingForMoreData);
- #endif //WINDOWS
- delete ThreadInstance;
-
- MI_Internal->Config.File_Buffer=NULL;
- MI_Internal->Config.File_Buffer_Size=0;
- MI_Internal->Config.File_Buffer_Size_Max=0;
- delete[] Buffer;
- }
- #endif //MEDIAINFO_READTHREAD
-}
-
-//---------------------------------------------------------------------------
-size_t Reader_File::Format_Test(MediaInfo_Internal* MI, String File_Name)
-{
- //std::cout<<Ztring(File_Name).To_Local().c_str()<<std::endl;
- #if MEDIAINFO_EVENTS
- {
- string File_Name_Local=Ztring(File_Name).To_Local();
- wstring File_Name_Unicode=Ztring(File_Name).To_Unicode();
- struct MediaInfo_Event_General_Start_0 Event;
- memset(&Event, 0xFF, sizeof(struct MediaInfo_Event_Generic));
- Event.EventCode=MediaInfo_EventCode_Create(MediaInfo_Parser_None, MediaInfo_Event_General_Start, 0);
- Event.EventSize=sizeof(struct MediaInfo_Event_General_Start_0);
- Event.StreamIDs_Size=0;
- Event.Stream_Size=File::Size_Get(File_Name);
- Event.FileName=File_Name_Local.c_str();
- Event.FileName_Unicode=File_Name_Unicode.c_str();
- MI->Config.Event_Send(NULL, (const int8u*)&Event, sizeof(MediaInfo_Event_General_Start_0));
- }
- #endif //MEDIAINFO_EVENTS
-
- //With Parser MultipleParsing
- /*
- MI->Open_Buffer_Init((int64u)-1, File_Name);
- if (Format_Test_PerParser(MI, File_Name))
- return 1;
- return 0; //There is a problem
- */
-
- //Get the Extension
- Ztring Extension=FileName::Extension_Get(File_Name);
- Extension.MakeLowerCase();
-
- //Search the theorical format from extension
- InfoMap &FormatList=MediaInfoLib::Config.Format_Get();
- InfoMap::iterator Format=FormatList.end();
- if (!MI->Config.File_ForceParser_Get().empty())
- Format=FormatList.find(MI->Config.File_ForceParser_Get());
- if (Format==FormatList.end())
- {
- Format=FormatList.begin();
- while (Format!=FormatList.end())
- {
- const Ztring &Extensions=FormatList.Get(Format->first, InfoFormat_Extensions);
- if (Extensions.find(Extension)!=Error)
- {
- if(Extension.size()==Extensions.size())
- break; //Only one extenion in the list
- if(Extensions.find(Extension+__T(" "))!=Error
- || Extensions.find(__T(" ")+Extension)!=Error)
- break;
- }
- ++Format;
- }
- }
- if (Format!=FormatList.end())
- {
- const Ztring &Parser=Format->second(InfoFormat_Parser);
- if (MI->SelectFromExtension(Parser))
- {
- //Test the theorical format
- if (Format_Test_PerParser(MI, File_Name)>0)
- return 1;
- }
- }
-
- size_t ToReturn=MI->ListFormats(File_Name);
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-size_t Reader_File::Format_Test_PerParser(MediaInfo_Internal* MI, const String &File_Name)
-{
- //Init
- MI_Internal=MI;
- #if MEDIAINFO_READTHREAD
- ThreadInstance=NULL;
- Buffer_End2=0; //Is also used for counting bytes before activating the thread
- #endif //MEDIAINFO_READTHREAD
-
- //Opening the file
- F.Open(File_Name);
- if (!F.Opened_Get())
- return 0;
-
- //Info
- Status=0;
- MI->Config.File_Size=F.Size_Get();
- MI->Config.File_Current_Offset=0;
- MI->Config.File_Current_Size=MI->Config.File_Size;
- MI->Config.File_Sizes.clear();
- MI->Config.File_Sizes.push_back(MI->Config.File_Size);
- if (MI->Config.File_Names.size()>1)
- {
- #if MEDIAINFO_ADVANCED
- if (MI->Config.File_IgnoreSequenceFileSize_Get())
- {
- MI->Config.File_Size=(int64u)-1;
- }
- else
- #endif //MEDIAINFO_ADVANCED
- {
- for (size_t Pos=1; Pos<MI->Config.File_Names.size(); Pos++)
- {
- int64u Size=File::Size_Get(MI->Config.File_Names[Pos]);
- MI->Config.File_Sizes.push_back(Size);
- MI->Config.File_Size+=Size;
- }
- }
- }
-
- //Partial file handling
- Ztring Config_Partial_Begin=MI->Config.File_Partial_Begin_Get();
- if (!Config_Partial_Begin.empty() && Config_Partial_Begin[0]>=__T('0') && Config_Partial_Begin[0]<=__T('9'))
- {
- if (Config_Partial_Begin.find(__T('%'))==Config_Partial_Begin.size()-1)
- Partial_Begin=float64_int64s(MI->Config.File_Size*Config_Partial_Begin.To_float64()/100);
- else
- Partial_Begin=Config_Partial_Begin.To_int64u();
- if (Partial_Begin)
- F.GoTo(Partial_Begin);
- }
- else
- Partial_Begin=0;
- Ztring Config_Partial_End=MI->Config.File_Partial_End_Get();
- if (!Config_Partial_End.empty() && Config_Partial_End[0]>=__T('0') && Config_Partial_End[0]<=__T('9'))
- {
- if (Config_Partial_End.find(__T('%'))==Config_Partial_End.size()-1)
- Partial_End=float64_int64s(MI->Config.File_Size*Config_Partial_End.To_float64()/100);
- else
- Partial_End=Config_Partial_End.To_int64u();
- }
- else
- Partial_End=(int64u)-1;
- if (Partial_Begin>MI->Config.File_Size)
- Partial_Begin=0; //Wrong value
- if (Partial_Begin>Partial_End)
- Partial_Begin=0; //Wrong value
-
- //Parser
- MI->Open_Buffer_Init((Partial_End<=MI->Config.File_Size?Partial_End:MI->Config.File_Size)-Partial_Begin, File_Name);
-
- //Buffer
- MI->Option(__T("File_Buffer_Size_Hint_Pointer"), Ztring::ToZtring((size_t)(&MI->Config.File_Buffer_Size_ToRead)));
- MI->Config.File_Buffer_Repeat_IsSupported=true;
-
- //Test the format with buffer
- return Format_Test_PerParser_Continue(MI);
-}
-
-//---------------------------------------------------------------------------
-size_t Reader_File::Format_Test_PerParser_Continue (MediaInfo_Internal* MI)
-{
- if (MI == NULL)
- return 0;
-
- bool StopAfterFilled=MI->Config.File_StopAfterFilled_Get();
- bool ShouldContinue=true;
- if (MI->Info)
- Status=MI->Info->Status;
-
- //Previous data
- if (MI->Config.File_Buffer_Repeat)
- {
- MI->Config.File_Buffer_Repeat=false;
- #if MEDIAINFO_DEMUX
- MI->Config.Demux_EventWasSent=false;
- #endif //MEDIAINFO_DEMUX
-
- Status=MI->Open_Buffer_Continue(MI->Config.File_Buffer, MI->Config.File_Buffer_Size);
-
- #if MEDIAINFO_READTHREAD
- if (ThreadInstance && !MI->Config.File_Buffer_Repeat)
- {
- CS.Enter();
- Buffer_Begin+=MI->Config.File_Buffer_Size;
- #ifdef WINDOWS
- if (Buffer_Begin==Buffer_Max)
- {
- CS.Leave();
- SetEvent(Condition_WaitingForMorePlace);
- }
- else
- #endif //WINDOWS
- CS.Leave();
- }
- #endif //MEDIAINFO_READTHREAD
-
- #if MEDIAINFO_DEMUX
- //Demux
- if (MI->Config.Demux_EventWasSent)
- return 2; //Must return immediately
- #endif //MEDIAINFO_DEMUX
-
- //Threading
- if (MI->IsTerminating())
- return 1; //Termination is requested
-
- if (Status[File__Analyze::IsFinished] || (StopAfterFilled && Status[File__Analyze::IsFilled]))
- ShouldContinue=false;
- }
-
- #if MEDIAINFO_DEMUX
- //PerPacket
- if (ShouldContinue && MI->Config.Demux_EventWasSent)
- {
- MI->Config.Demux_EventWasSent=false;
-
- Status=MI->Open_Buffer_Continue(NULL, 0);
-
- //Demux
- if (MI->Config.Demux_EventWasSent)
- return 2; //Must return immediately
-
- //Threading
- if (MI->IsTerminating())
- return 1; //Termination is requested
-
- if (Status[File__Analyze::IsFinished] || (StopAfterFilled && Status[File__Analyze::IsFilled]))
- ShouldContinue=false;
- }
- #endif //MEDIAINFO_DEMUX
-
- if (ShouldContinue)
- {
- //Test the format with buffer
- while (!(Status[File__Analyze::IsFinished] || (StopAfterFilled && Status[File__Analyze::IsFilled])))
- {
- //Seek (if needed)
- if (MI->Open_Buffer_Continue_GoTo_Get()!=(int64u)-1)
- {
- #ifdef MEDIAINFO_DEBUG
- std::cout<<std::hex<<Reader_File_Offset<<" - "<<Reader_File_Offset+Reader_File_BytesRead<<" : "<<std::dec<<Reader_File_BytesRead<<" bytes"<<std::endl;
- Reader_File_Offset=MI->Open_Buffer_Continue_GoTo_Get();
- Reader_File_BytesRead=0;
- Reader_File_Count++;
- #endif //MEDIAINFO_DEBUG
-
- #if MEDIAINFO_READTHREAD
- if (ThreadInstance)
- {
- ThreadInstance->RequestTerminate();
- SetEvent(Condition_WaitingForMorePlace);
- while (!ThreadInstance->IsExited())
- Sleep(0);
- #ifdef WINDOWS
- CloseHandle(Condition_WaitingForMorePlace);
- CloseHandle(Condition_WaitingForMoreData);
- #endif //WINDOWS
- delete ThreadInstance; ThreadInstance=NULL;
-
- MI->Config.File_Buffer=NULL;
- MI->Config.File_Buffer_Size=0;
- MI->Config.File_Buffer_Size_Max=0;
- Buffer_Max=0;
- delete[] Buffer; Buffer=NULL;
- Buffer_Begin=0;
- Buffer_End=0;
- Buffer_End2=0;
- IsLooping=false;
- }
- if (Buffer_End2!=(size_t)-1)
- Buffer_End2=0;
- #endif //MEDIAINFO_READTHREAD
-
- int64u GoTo=Partial_Begin+MI->Open_Buffer_Continue_GoTo_Get();
- MI->Config.File_Current_Offset=0;
- int64u Buffer_NoJump_Temp=Buffer_NoJump;
- if (MI->Config.File_Names.size()>1)
- {
- size_t Pos;
- #if MEDIAINFO_SEEK
- if (MI->Config.File_GoTo_IsFrameOffset)
- {
- Pos=(size_t)MI->Open_Buffer_Continue_GoTo_Get(); //File_GoTo is the frame offset in that case
- MI->Info->File_GoTo=(int64u)-1;
- MI->Config.File_GoTo_IsFrameOffset=false;
- GoTo=0;
- }
- else
- #endif //MEDIAINFO_SEEK
- {
- for (Pos=0; Pos<MI->Config.File_Names.size(); Pos++)
- {
- if (Pos==MI->Config.File_Sizes.size())
- MI->Config.File_Sizes.push_back(F.Size_Get());
- else if (MI->Config.File_Sizes[Pos]==(int64u)-1)
- MI->Config.File_Sizes[Pos]=F.Size_Get();
-
- if (Pos>=MI->Config.File_Sizes.size() || MI->Config.File_Sizes[Pos]==(int64u)-1)
- break;
-
- if (GoTo<MI->Config.File_Sizes[Pos])
- break;
-
- GoTo-=MI->Config.File_Sizes[Pos];
- MI->Config.File_Current_Offset+=MI->Config.File_Sizes[Pos];
- }
- if (Pos>=MI->Config.File_Sizes.size())
- break;
- }
- if (Pos!=MI->Config.File_Names_Pos-1)
- {
- F.Close();
- F.Open(MI->Config.File_Names[Pos]);
- if (Pos>=MI->Config.File_Sizes.size())
- {
- MI->Config.File_Sizes.resize(Pos, (int64u)-1);
- MI->Config.File_Sizes.push_back(F.Size_Get());
- }
- MI->Config.File_Names_Pos=Pos+1;
- MI->Config.File_Current_Size=MI->Config.File_Current_Offset+F.Size_Get();
- Buffer_NoJump_Temp=0;
- }
- }
-
- if (GoTo>=F.Size_Get())
- break; //Seek requested, but on a file bigger in theory than what is in the real file, we can't do this
- if (!(GoTo>F.Position_Get() && GoTo<F.Position_Get()+Buffer_NoJump_Temp)) //No smal jumps
- {
- if (!F.GoTo(GoTo))
- break; //File is not seekable
-
- MI->Open_Buffer_Init((int64u)-1, MI->Config.File_Current_Offset+F.Position_Get()-Partial_Begin);
- }
- }
-
- #if MEDIAINFO_READTHREAD
- if (ThreadInstance==NULL && Buffer_End2!=(size_t)-1 && Buffer_End2>=16*1024*1024)
- {
- if (!MI->Config.File_IsGrowing && MI->Config.File_Names.size()==1)
- {
- delete[] MI->Config.File_Buffer; MI->Config.File_Buffer=NULL;
- MI->Config.File_Buffer_Size_Max=0;
- Buffer_Max=MI->Config.File_Buffer_Read_Size_Get();
- Buffer=new int8u[Buffer_Max];
- Buffer_Begin=0;
- Buffer_End=0;
- Buffer_End2=0;
- IsLooping=false;
- #ifdef WINDOWS
- Condition_WaitingForMorePlace=CreateEvent(NULL, FALSE, FALSE, NULL);
- Condition_WaitingForMoreData=CreateEvent(NULL, FALSE, FALSE, NULL);
- #endif //WINDOWS
- ThreadInstance=new Reader_File_Thread();
- ThreadInstance->Base=this;
- ThreadInstance->Run();
- }
- else
- Buffer_End2=(size_t)-1;
- }
- #endif //MEDIAINFO_READTHREAD
-
- //Handling of hints
- if (MI->Config.File_Buffer_Size_ToRead==0)
- break; //Problem while config
- if (
- #if MEDIAINFO_READTHREAD
- ThreadInstance==NULL &&
- #endif //MEDIAINFO_READTHREAD
- MI->Config.File_Buffer_Size_ToRead>MI->Config.File_Buffer_Size_Max)
- {
- delete[] MI->Config.File_Buffer;
- if (MI->Config.File_Buffer_Size_Max==0)
- MI->Config.File_Buffer_Size_Max=1;
- while (MI->Config.File_Buffer_Size_ToRead>MI->Config.File_Buffer_Size_Max)
- MI->Config.File_Buffer_Size_Max*=2;
- MI->Config.File_Buffer=new int8u[MI->Config.File_Buffer_Size_Max];
- }
-
- //Testing multiple file per stream
- if (
- #if MEDIAINFO_READTHREAD
- ThreadInstance==NULL &&
- #endif //MEDIAINFO_READTHREAD
- F.Position_Get()>=F.Size_Get())
- {
- #if MEDIAINFO_ADVANCED2
- MI->Open_Buffer_SegmentChange();
- #endif //MEDIAINFO_ADVANCED2
- if (MI->Config.File_Names_Pos && MI->Config.File_Names_Pos<MI->Config.File_Names.size())
- {
- MI->Config.File_Current_Offset+=MI->Config.File_Names_Pos<=MI->Config.File_Sizes.size()?MI->Config.File_Sizes[MI->Config.File_Names_Pos-1]:F.Size_Get();
- F.Close();
- #if MEDIAINFO_EVENTS
- MI->Config.Event_SubFile_Start(MI->Config.File_Names[MI->Config.File_Names_Pos]);
- #endif //MEDIAINFO_EVENTS
- F.Open(MI->Config.File_Names[MI->Config.File_Names_Pos]);
- while (!F.Opened_Get())
- {
- if (MI->Config.File_Names_Pos+1<MI->Config.File_Names.size())
- {
- MI->Config.File_Names_Pos++;
- F.Open(MI->Config.File_Names[MI->Config.File_Names_Pos]);
- }
- }
- if (MI->Config.File_Names_Pos>=MI->Config.File_Sizes.size())
- {
- MI->Config.File_Sizes.resize(MI->Config.File_Names_Pos, 0);
- MI->Config.File_Sizes.push_back(F.Size_Get());
- }
- MI->Config.File_Names_Pos++;
- MI->Config.File_Current_Size+=F.Size_Get();
- }
- }
-
- #if MEDIAINFO_READTHREAD
- if (ThreadInstance)
- {
- CS.Enter();
- #ifdef WINDOWS
- if (Buffer_End2+Buffer_End-Buffer_Begin<Buffer_Max/8*7)
- {
- CS.Leave();
- SetEvent(Condition_WaitingForMorePlace);
- CS.Enter();
- }
- #endif //WINDOWS
-
- for (;;)
- {
- MI->Config.File_Buffer_Size=Buffer_End-Buffer_Begin;
-
- if (MI->Config.File_Buffer_Size)
- break;
-
- if (!ThreadInstance->IsExited())
- {
- CS.Leave();
- #ifdef WINDOWS
- WaitForSingleObject(Condition_WaitingForMoreData, INFINITE);
- #else //WINDOWS
- Sleep(0);
- #endif //WINDOWS
- CS.Enter();
- }
- else
- {
- if (IsLooping)
- {
- IsLooping=false;
- Buffer_End=Buffer_End2;
- Buffer_End2=0;
- Buffer_Begin=0;
- }
-
- MI->Config.File_Buffer_Size=Buffer_End-Buffer_Begin;
- break;
- }
- }
- MI->Config.File_Buffer=Buffer+Buffer_Begin;
- CS.Leave();
- if (MI->Config.File_Buffer_Size>MI->Config.File_Buffer_Size_ToRead)
- MI->Config.File_Buffer_Size=MI->Config.File_Buffer_Size_ToRead;
- }
- else
- #endif //MEDIAINFO_READTHREAD
- {
- MI->Config.File_Buffer_Size=F.Read(MI->Config.File_Buffer, (F.Position_Get()+MI->Config.File_Buffer_Size_ToRead<(Partial_End<=MI->Config.File_Size?Partial_End:MI->Config.File_Size))?MI->Config.File_Buffer_Size_ToRead:((size_t)((Partial_End<=MI->Config.File_Size?Partial_End:MI->Config.File_Size)-F.Position_Get())));
- #if MEDIAINFO_READTHREAD
- if (ThreadInstance==NULL && Buffer_End2!=(size_t)-1)
- Buffer_End2+=MI->Config.File_Buffer_Size;
- #endif //MEDIAINFO_READTHREAD
- }
-
- /* High CPU usage
- #if MEDIAINFO_EVENTS
- if (MI->Config.File_Buffer_Size)
- {
- struct MediaInfo_Event_Global_BytesRead_0 Event;
- memset(&Event, 0xFF, sizeof(struct MediaInfo_Event_Generic));
- Event.EventCode=MediaInfo_EventCode_Create(MediaInfo_Parser_None, MediaInfo_Event_Global_BytesRead, 0);
- Event.EventSize=sizeof(struct MediaInfo_Event_Global_BytesRead_0);
- Event.StreamIDs_Size=0;
- Event.StreamOffset=F.Position_Get()-MI->Config.File_Buffer_Size;
- Event.Content_Size=MI->Config.File_Buffer_Size;
- Event.Content=MI->Config.File_Buffer;
- MI->Config.Event_Send(NULL, (const int8u*)&Event, sizeof(MediaInfo_Event_Global_BytesRead_0));
- }
- #endif //MEDIAINFO_EVENTS
- */
-
- //Testing growing files
- int64u Growing_Temp=(int64u)-1;
- if (MI->Config.ParseSpeed>=1.0 && !MI->Config.File_IsGrowing && MI->Config.File_Current_Offset+F.Position_Get()>=MI->Config.File_Size)
- {
- if (MI->Config.File_Names.size()==1)
- {
- Growing_Temp=F.Size_Get();
- if (MI->Config.File_Size!=Growing_Temp)
- MI->Config.File_IsGrowing=true;
- }
- else if (MI->Config.File_TestContinuousFileNames_Get())
- {
- Growing_Temp=MI->Config.File_Names.size();
- MI->TestContinuousFileNames();
- if (MI->Config.File_Names.size()!=Growing_Temp)
- MI->Config.File_IsGrowing=true;
- }
- }
- if (MI->Config.File_IsNotGrowingAnymore)
- {
- MI->Config.File_Current_Size=MI->Config.File_Size=F.Size_Get();
- MI->Open_Buffer_Init(MI->Config.File_Size, F.Position_Get()-MI->Config.File_Buffer_Size);
- MI->Config.File_IsGrowing=false;
- MI->Config.File_IsNotGrowingAnymore=false;
- }
- if (MI->Config.File_IsGrowing && (Growing_Temp!=(int64u)-1 || MI->Config.File_Current_Offset+F.Position_Get()>=MI->Config.File_Size))
- {
- for (size_t CountOfSeconds=0; CountOfSeconds<(size_t)MI->Config.File_GrowingFile_Delay_Get(); CountOfSeconds++)
- {
- if (MI->Config.File_Names.size()==1)
- {
- Growing_Temp=F.Size_Get();
- if (MI->Config.File_Size!=Growing_Temp)
- {
- MI->Config.File_Current_Size=MI->Config.File_Size=Growing_Temp;
- MI->Open_Buffer_Init(MI->Config.File_Size, MI->Config.File_Current_Offset+F.Position_Get()-MI->Config.File_Buffer_Size);
- break;
- }
- }
- else
- {
- Growing_Temp=MI->Config.File_Names.size();
- MI->TestContinuousFileNames();
- if (MI->Config.File_Names.size()!=Growing_Temp)
- {
- MI->Open_Buffer_Init(MI->Config.File_Size, MI->Config.File_Current_Offset+F.Position_Get()-MI->Config.File_Buffer_Size);
- break;
- }
- }
- #ifdef WINDOWS
- Sleep(1000);
- #endif //WINDOWS
- }
- }
-
- #ifdef MEDIAINFO_DEBUG
- Reader_File_BytesRead_Total+=MI->Config.File_Buffer_Size;
- Reader_File_BytesRead+=MI->Config.File_Buffer_Size;
- #endif //MEDIAINFO_DEBUG
-
- //Parser
- Status=MI->Open_Buffer_Continue(MI->Config.File_Buffer, MI->Config.File_Buffer_Size);
-
- #if MEDIAINFO_READTHREAD
- if (ThreadInstance && !MI->Config.File_Buffer_Repeat)
- {
- CS.Enter();
- Buffer_Begin+=MI->Config.File_Buffer_Size;
- #ifdef WINDOWS
- if (Buffer_Begin==Buffer_Max)
- {
- CS.Leave();
- SetEvent(Condition_WaitingForMorePlace);
- }
- else
- #endif //WINDOWS
- CS.Leave();
- }
- #endif //MEDIAINFO_READTHREAD
-
- if (MI->Config.File_Buffer_Size==0)
- {
- #if MEDIAINFO_EVENTS
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0xF0F00101, "File read error");
- #endif //MEDIAINFO_EVENTS
- break;
- }
-
- #if MEDIAINFO_DEMUX
- if (MI->Config.Demux_EventWasSent)
- return 2; //Must return immediately
- #endif //MEDIAINFO_DEMUX
-
- //Threading
- if (MI->IsTerminating())
- break; //Termination is requested
- }
- }
-
- //Deleting buffer
- #if MEDIAINFO_READTHREAD
- if (ThreadInstance)
- {
- ThreadInstance->RequestTerminate();
- SetEvent(Condition_WaitingForMorePlace);
- while (!ThreadInstance->IsExited())
- Sleep(0);
- #ifdef WINDOWS
- CloseHandle(Condition_WaitingForMorePlace);
- CloseHandle(Condition_WaitingForMoreData);
- #endif //WINDOWS
- delete ThreadInstance; ThreadInstance=NULL;
-
- MI->Config.File_Buffer=NULL;
- MI->Config.File_Buffer_Size=0;
- MI->Config.File_Buffer_Size_Max=0;
- Buffer_Max=0;
- delete[] Buffer; Buffer=NULL;
- Buffer_Begin=0;
- Buffer_End=0;
- Buffer_End2=0;
- IsLooping=false;
- }
- else
- #endif //MEDIAINFO_READTHREAD
- {
- delete[] MI->Config.File_Buffer; MI->Config.File_Buffer=NULL;
- MI->Config.File_Buffer_Size_Max=0;
- }
-
- #ifdef MEDIAINFO_DEBUG
- std::cout<<std::hex<<Reader_File_Offset<<" - "<<Reader_File_Offset+Reader_File_BytesRead<<" : "<<std::dec<<Reader_File_BytesRead<<" bytes"<<std::endl;
- std::cout<<"Total: "<<std::dec<<Reader_File_BytesRead_Total<<" bytes in "<<Reader_File_Count<<" blocks"<<std::endl;
- #endif //MEDIAINFO_DEBUG
-
- if (!MI->Config.File_KeepInfo_Get())
- {
- //File
- F.Close();
- }
-
- //Is this file detected?
- if (!Status[File__Analyze::IsAccepted])
- return 0;
-
- MI->Open_Buffer_Finalize();
-
- #if MEDIAINFO_DEMUX
- if (MI->Config.Demux_EventWasSent)
- return 2; //Must return immediately
- #endif //MEDIAINFO_DEMUX
-
- return 1;
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t Reader_File::Format_Test_PerParser_Seek (MediaInfo_Internal* MI, size_t Method, int64u Value, int64u ID)
-{
- size_t ToReturn=MI->Open_Buffer_Seek(Method, Value, ID);
-
- if (ToReturn==0 || ToReturn==1)
- {
- //Reset
- Status=0;
- }
-
- return ToReturn;
-}
-#endif //MEDIAINFO_SEEK
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_File.h b/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_File.h
deleted file mode 100644
index 3210ccca4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_File.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Give information about a lot of media files
-// Dispatch the file to be tested by all containers
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef Reader_FileH
-#define Reader_FileH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Reader/Reader__Base.h"
-#include "ZenLib/File.h"
-#include "ZenLib/Thread.h"
-#include "ZenLib/CriticalSection.h"
-#if MEDIAINFO_READTHREAD
- #ifdef WINDOWS
- #undef __TEXT
- #include "Windows.h"
- #endif //WINDOWS
-#endif //MEDIAINFO_READTHREAD
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-/// @brief Reader_File
-//***************************************************************************
-
-#if MEDIAINFO_READTHREAD
-class Reader_File;
-class Reader_File_Thread : public Thread
-{
-public:
- Reader_File* Base;
- size_t ReadSize_Max;
- void Entry();
-};
-#endif //MEDIAINFO_READTHREAD
-
-class Reader_File : public Reader__Base
-{
-public :
- //Constructor/Destructor
- virtual ~Reader_File();
-
- //Format testing
- size_t Format_Test(MediaInfo_Internal* MI, String File_Name);
- size_t Format_Test_PerParser(MediaInfo_Internal* MI, const String &File_Name);
- size_t Format_Test_PerParser_Continue (MediaInfo_Internal* MI);
- size_t Format_Test_PerParser_Seek (MediaInfo_Internal* MI, size_t Method, int64u Value, int64u ID);
-
- ZenLib::File F;
- std::bitset<32> Status;
- int64u Partial_Begin;
- int64u Partial_End;
-
- //Thread
- #if MEDIAINFO_READTHREAD
- Reader_File_Thread* ThreadInstance;
- int8u* Buffer;
- size_t Buffer_Max;
- size_t Buffer_Begin;
- size_t Buffer_End;
- size_t Buffer_End2; //Is also used for counting bytes before activating the thread
- bool IsLooping;
- #ifdef WINDOWS
- HANDLE Condition_WaitingForMorePlace;
- HANDLE Condition_WaitingForMoreData;
- #endif //WINDOWS
- #endif //MEDIAINFO_READTHREAD
- CriticalSection CS;
- MediaInfo_Internal* MI_Internal;
-};
-
-} //NameSpace
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader__Base.h b/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader__Base.h
deleted file mode 100644
index b6071c58a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader__Base.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Give information about a lot of media files
-// Dispatch the file to be tested by all containers
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef Reader__BaseH
-#define Reader__BaseH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/MediaInfo_Internal.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-/// @brief Reader__Base
-//***************************************************************************
-
-class Reader__Base
-{
-public :
- //Constructor/Destructor
- virtual ~Reader__Base() {}
-
- //Format testing
- virtual size_t Format_Test(MediaInfo_Internal* MI, String File_Name)=0;
- virtual size_t Format_Test_PerParser_Continue (MediaInfo_Internal* /*MI*/) {return 0;};
- #if MEDIAINFO_SEEK
- virtual size_t Format_Test_PerParser_Seek (MediaInfo_Internal*, size_t, int64u, int64u) {return 0;};
- #endif //MEDIAINFO_SEEK
-};
-
-} //NameSpace
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libcurl.cpp b/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libcurl.cpp
deleted file mode 100644
index a654d6e99..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libcurl.cpp
+++ /dev/null
@@ -1,863 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// For user: you can disable or enable it
-//#define MEDIAINFO_DEBUG
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_LIBCURL_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Reader/Reader_libcurl.h"
-#include "MediaInfo/File__Analyze.h"
-#if defined MEDIAINFO_LIBCURL_DLL_RUNTIME
- //Copy of cURL include files
- #include "MediaInfo/Reader/Reader_libcurl_Include.h"
-#else
- #define CURL_STATICLIB
- #undef __TEXT
- #include "curl/curl.h"
-#endif
-#include <ctime>
-#include "ZenLib/File.h"
-using namespace ZenLib;
-using namespace std;
-#ifdef MEDIAINFO_DEBUG
- #include <iostream>
-#endif // MEDIAINFO_DEBUG
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// libcurl stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-struct Reader_libcurl::curl_data
-{
- MediaInfo_Internal* MI;
- CURL* Curl;
- char ErrorBuffer[CURL_ERROR_SIZE];
- #if MEDIAINFO_NEXTPACKET
- CURLM* CurlM;
- #endif //MEDIAINFO_NEXTPACKET
- struct curl_slist* HttpHeader;
- std::bitset<32> Status;
- String File_Name;
- std::string Ssl_CertificateFileName;
- std::string Ssl_CertificateFormat;
- std::string Ssl_PrivateKeyFileName;
- std::string Ssl_PrivateKeyFormat;
- std::string Ssl_CertificateAuthorityFileName;
- std::string Ssl_CertificateAuthorityPath;
- std::string Ssl_CertificateRevocationListFileName;
- bool Ssl_IgnoreSecurity;
- std::string Ssh_KnownHostsFileName;
- std::string Ssh_PublicKeyFileName;
- std::string Ssh_PrivateKeyFileName;
- bool Ssh_IgnoreSecurity;
- bool Init_AlreadyDone;
- bool Init_NotAFile;
- #if MEDIAINFO_NEXTPACKET
- bool NextPacket;
- #endif //MEDIAINFO_NEXTPACKET
- time_t Time_Max;
- #ifdef MEDIAINFO_DEBUG
- int64u Debug_BytesRead_Total;
- int64u Debug_BytesRead;
- int64u Debug_Count;
- #endif // MEDIAINFO_DEBUG
- #if MEDIAINFO_EVENTS
- int64u Stream_Offset;
- #endif //MEDIAINFO_EVENTS
-
- curl_data()
- {
- MI=NULL;
- Curl=NULL;
- ErrorBuffer[0]='\0';
- #if MEDIAINFO_NEXTPACKET
- CurlM=NULL;
- #endif //MEDIAINFO_NEXTPACKET
- HttpHeader=NULL;
- Ssl_IgnoreSecurity=false;
- Ssh_IgnoreSecurity=false;
- Init_AlreadyDone=false;
- Init_NotAFile=false;
- #if MEDIAINFO_NEXTPACKET
- NextPacket=false;
- #endif //MEDIAINFO_NEXTPACKET
- Time_Max=0;
- #ifdef MEDIAINFO_DEBUG
- Debug_BytesRead_Total=0;
- Debug_BytesRead=0;
- Debug_Count=1;
- #endif // MEDIAINFO_DEBUG
- #if MEDIAINFO_EVENTS
- Stream_Offset=(int64u)-1;
- #endif //MEDIAINFO_EVENTS
- }
-};
-
-//---------------------------------------------------------------------------
-size_t libcurl_WriteData_CallBack(void *ptr, size_t size, size_t nmemb, void *data)
-{
- #ifdef MEDIAINFO_DEBUG
- ((Reader_libcurl::curl_data*)data)->Debug_BytesRead_Total+=size*nmemb;
- ((Reader_libcurl::curl_data*)data)->Debug_BytesRead+=size*nmemb;
- #endif //MEDIAINFO_DEBUG
-
- //Init
- if (!((Reader_libcurl::curl_data*)data)->Init_AlreadyDone)
- {
- double File_SizeD;
- CURLcode Result=curl_easy_getinfo(((Reader_libcurl::curl_data*)data)->Curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &File_SizeD);
- if (Result==CURLE_OK && File_SizeD==0)
- {
- ((Reader_libcurl::curl_data*)data)->Init_NotAFile=true;
- return 0; //Great chances it is FTP file listing due to interogation mark in the file name
- }
- else if (Result==CURLE_OK && File_SizeD!=-1)
- {
- ((Reader_libcurl::curl_data*)data)->MI->Open_Buffer_Init((int64u)File_SizeD, ((Reader_libcurl::curl_data*)data)->File_Name);
- }
- else
- ((Reader_libcurl::curl_data*)data)->MI->Open_Buffer_Init((int64u)-1, ((Reader_libcurl::curl_data*)data)->File_Name);
- #if MEDIAINFO_EVENTS
- ((Reader_libcurl::curl_data*)data)->Stream_Offset=0;
- #endif //MEDIAINFO_EVENTS
- ((Reader_libcurl::curl_data*)data)->Init_AlreadyDone=true;
- }
-
- #if MEDIAINFO_EVENTS
- if (size*nmemb)
- {
- struct MediaInfo_Event_Global_BytesRead_0 Event;
- memset(&Event, 0xFF, sizeof(struct MediaInfo_Event_Generic));
- Event.EventCode=MediaInfo_EventCode_Create(MediaInfo_Parser_None, MediaInfo_Event_Global_BytesRead, 0);
- Event.EventSize=sizeof(struct MediaInfo_Event_Global_BytesRead_0);
- Event.StreamIDs_Size=0;
- Event.StreamOffset=((Reader_libcurl::curl_data*)data)->Stream_Offset;
- Event.Content_Size=size*nmemb;
- Event.Content=(int8u*)ptr;
- ((Reader_libcurl::curl_data*)data)->MI->Config.Event_Send(NULL, (const int8u*)&Event, sizeof(MediaInfo_Event_Global_BytesRead_0));
- ((Reader_libcurl::curl_data*)data)->Stream_Offset+=size*nmemb;
- }
- #endif //MEDIAINFO_EVENTS
-
- //Continue
- ((Reader_libcurl::curl_data*)data)->Status=((Reader_libcurl::curl_data*)data)->MI->Open_Buffer_Continue((int8u*)ptr, size*nmemb);
- time_t CurrentTime = time(0);
-
- if (((Reader_libcurl::curl_data*)data)->Status[File__Analyze::IsFinished] || (((Reader_libcurl::curl_data*)data)->Time_Max && CurrentTime>=((Reader_libcurl::curl_data*)data)->Time_Max))
- {
- return 0;
- }
-
- //GoTo
- if (((Reader_libcurl::curl_data*)data)->MI->Open_Buffer_Continue_GoTo_Get()!=(int64u)-1)
- {
- return 0;
- }
-
- //Continue parsing
- return size*nmemb;
-}
-
-Ztring Reader_libcurl_FileNameWithoutPassword(const Ztring &FileName)
-{
- Ztring FileName_Modified(FileName);
- size_t Begin=FileName_Modified.find(__T(':'), 6);
- size_t End=FileName_Modified.find(__T('@'));
- if (Begin!=string::npos && End!=string::npos && Begin<End)
- FileName_Modified.erase(Begin, End-Begin);
- return FileName_Modified;
-}
-
-bool Reader_libcurl_HomeIsSet()
-{
- return getenv("HOME")?true:false;
-}
-
-Ztring Reader_libcurl_ExpandFileName(const Ztring &FileName)
-{
- Ztring FileName_Modified(FileName);
- if (FileName_Modified.find(__T("$HOME"))==0)
- {
- char* env=getenv("HOME");
- if (env)
- FileName_Modified.FindAndReplace(__T("$HOME"), Ztring().From_Local(env));
- }
- if (FileName_Modified.find(__T("~"))==0)
- {
- char* env=getenv("HOME");
- if (env)
- FileName_Modified.FindAndReplace(__T("~"), Ztring().From_Local(env));
- }
- return FileName_Modified;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Reader_libcurl::Reader_libcurl ()
-{
- Curl_Data=NULL;
-}
-
-//---------------------------------------------------------------------------
-Reader_libcurl::~Reader_libcurl ()
-{
- if (Curl_Data==NULL)
- return;
-
- //Cleanup
- #if MEDIAINFO_NEXTPACKET
- if (Curl_Data->CurlM)
- {
- curl_multi_remove_handle(Curl_Data->CurlM, Curl_Data->Curl);
- curl_multi_cleanup(Curl_Data->CurlM);
- }
- #endif //MEDIAINFO_NEXTPACKET
- if (Curl_Data->Curl)
- curl_easy_cleanup(Curl_Data->Curl);
- if (Curl_Data->HttpHeader)
- curl_slist_free_all(Curl_Data->HttpHeader);
- delete Curl_Data; //Curl_Data=NULL;
-}
-
-//***************************************************************************
-//
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t Reader_libcurl::Format_Test(MediaInfo_Internal* MI, String File_Name)
-{
- #if defined MEDIAINFO_LIBCURL_DLL_RUNTIME
- if (libcurl_Module_Count==0)
- {
- size_t Errors=0;
-
- /* Load library */
- #ifdef MEDIAINFO_GLIBC
- libcurl_Module=g_module_open(MEDIAINFODLL_NAME, G_MODULE_BIND_LAZY);
- #elif defined (_WIN32) || defined (WIN32)
- libcurl_Module=LoadLibrary(MEDIAINFODLL_NAME);
- #else
- libcurl_Module=dlopen(MEDIAINFODLL_NAME, RTLD_LAZY);
- if (!libcurl_Module)
- libcurl_Module=dlopen("./" MEDIAINFODLL_NAME, RTLD_LAZY);
- if (!libcurl_Module)
- libcurl_Module=dlopen("/usr/local/lib/" MEDIAINFODLL_NAME, RTLD_LAZY);
- if (!libcurl_Module)
- libcurl_Module=dlopen("/usr/local/lib64/" MEDIAINFODLL_NAME, RTLD_LAZY);
- if (!libcurl_Module)
- libcurl_Module=dlopen("/usr/lib/" MEDIAINFODLL_NAME, RTLD_LAZY);
- if (!libcurl_Module)
- libcurl_Module=dlopen("/usr/lib64/" MEDIAINFODLL_NAME, RTLD_LAZY);
- #endif
- if (!libcurl_Module)
- {
- #if MEDIAINFO_EVENTS
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", Libcurl library is not found"));
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
-
- /* Load methods */
- MEDIAINFO_ASSIGN (curl_easy_init, "curl_easy_init")
- MEDIAINFO_ASSIGN (curl_easy_setopt, "curl_easy_setopt")
- MEDIAINFO_ASSIGN (curl_easy_perform, "curl_easy_perform")
- MEDIAINFO_ASSIGN (curl_easy_cleanup, "curl_easy_cleanup")
- MEDIAINFO_ASSIGN (curl_easy_getinfo, "curl_easy_getinfo")
- MEDIAINFO_ASSIGN (curl_slist_append, "curl_slist_append")
- MEDIAINFO_ASSIGN (curl_slist_free_all, "curl_slist_free_all")
- MEDIAINFO_ASSIGN (curl_easy_duphandle, "curl_easy_duphandle")
- MEDIAINFO_ASSIGN (curl_easy_strerror, "curl_easy_strerror")
- MEDIAINFO_ASSIGN (curl_version_info, "curl_version_info")
- MEDIAINFO_ASSIGN (curl_multi_init, "curl_multi_init")
- MEDIAINFO_ASSIGN (curl_multi_add_handle, "curl_multi_add_handle")
- MEDIAINFO_ASSIGN (curl_multi_remove_handle, "curl_multi_remove_handle")
- MEDIAINFO_ASSIGN (curl_multi_perform, "curl_multi_perform")
- MEDIAINFO_ASSIGN (curl_multi_cleanup, "curl_multi_cleanup")
- if (Errors>0)
- {
- #if MEDIAINFO_EVENTS
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", Libcurl library is not correctly loaded"));
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
-
- libcurl_Module_Count++;
- }
- #endif //defined MEDIAINFO_LIBCURL_DLL_RUNTIME
-
- #if MEDIAINFO_EVENTS
- {
- string File_Name_Local=Ztring(File_Name).To_Local();
- wstring File_Name_Unicode=Ztring(File_Name).To_Unicode();
- struct MediaInfo_Event_General_Start_0 Event;
- memset(&Event, 0xFF, sizeof(struct MediaInfo_Event_General_Start_0));
- Event.StreamIDs_Size=0;
- Event.EventCode=MediaInfo_EventCode_Create(MediaInfo_Parser_None, MediaInfo_Event_General_Start, 0);
- Event.Stream_Size=(int64u)-1;
- Event.FileName=File_Name_Local.c_str();
- Event.FileName_Unicode=File_Name_Unicode.c_str();
- MI->Config.Event_Send(NULL, (const int8u*)&Event, sizeof(MediaInfo_Event_General_Start_0));
- }
- #endif //MEDIAINFO_EVENTS
-
- //With Parser MultipleParsing
- return Format_Test_PerParser(MI, File_Name);
-}
-
-//---------------------------------------------------------------------------
-size_t Reader_libcurl::Format_Test_PerParser(MediaInfo_Internal* MI, const String &File_Name)
-{
- #if defined MEDIAINFO_LIBCURL_DLL_RUNTIME
- if (libcurl_Module_Count==0)
- return 0; //No libcurl library
- #endif //defined MEDIAINFO_LIBCURL_DLL_RUNTIME
-
- Curl_Data=new curl_data();
- Curl_Data->Ssl_CertificateFileName=MediaInfoLib::Config.Ssl_CertificateFileName_Get().To_Local();
- Curl_Data->Ssl_CertificateFormat=MediaInfoLib::Config.Ssl_CertificateFormat_Get().To_Local();
- Curl_Data->Ssl_PrivateKeyFileName=MediaInfoLib::Config.Ssl_PrivateKeyFileName_Get().To_Local();
- Curl_Data->Ssl_PrivateKeyFormat=MediaInfoLib::Config.Ssl_PrivateKeyFormat_Get().To_Local();
- Curl_Data->Ssl_CertificateAuthorityFileName=MediaInfoLib::Config.Ssl_CertificateAuthorityFileName_Get().To_Local();
- Curl_Data->Ssl_CertificateAuthorityPath=MediaInfoLib::Config.Ssl_CertificateAuthorityPath_Get().To_Local();
- Curl_Data->Ssl_CertificateRevocationListFileName=MediaInfoLib::Config.Ssl_CertificateRevocationListFileName_Get().To_Local();
- Curl_Data->Ssl_IgnoreSecurity=MediaInfoLib::Config.Ssl_IgnoreSecurity_Get();
- Curl_Data->Ssh_PublicKeyFileName=Reader_libcurl_ExpandFileName(MediaInfoLib::Config.Ssh_PublicKeyFileName_Get()).To_Local();
- if (Curl_Data->Ssh_PublicKeyFileName.empty())
- {
- if (Reader_libcurl_HomeIsSet())
- {
- Ztring Temp=Reader_libcurl_ExpandFileName(__T("$HOME/.ssh/id_rsa.pub"));
- if (File::Exists(Temp))
- Curl_Data->Ssh_PublicKeyFileName=Temp.To_Local();
- }
- else
- {
- if (File::Exists(__T("id_rsa.pub")))
- Curl_Data->Ssh_PublicKeyFileName="id_rsa.pub";
- }
- }
- Curl_Data->Ssh_PrivateKeyFileName=Reader_libcurl_ExpandFileName(MediaInfoLib::Config.Ssh_PrivateKeyFileName_Get()).To_Local();
- if (Curl_Data->Ssh_PrivateKeyFileName.empty())
- {
- if (Reader_libcurl_HomeIsSet())
- {
- Ztring Temp=Reader_libcurl_ExpandFileName(__T("$HOME/.ssh/id_rsa"));
- if (File::Exists(Temp))
- Curl_Data->Ssh_PrivateKeyFileName=Temp.To_Local();
- }
- else
- {
- if (File::Exists(__T("id_rsa")))
- Curl_Data->Ssh_PrivateKeyFileName = "id_rsa";
- }
- }
- Curl_Data->Ssh_KnownHostsFileName=Reader_libcurl_ExpandFileName(MediaInfoLib::Config.Ssh_KnownHostsFileName_Get()).To_Local();
- if (Curl_Data->Ssh_KnownHostsFileName.empty())
- {
- if (Reader_libcurl_HomeIsSet())
- Curl_Data->Ssh_KnownHostsFileName=Reader_libcurl_ExpandFileName(__T("$HOME/.ssh/known_hosts")).To_Local();
- else
- Curl_Data->Ssh_KnownHostsFileName="known_hosts";
- }
- Curl_Data->Ssh_IgnoreSecurity=MediaInfoLib::Config.Ssh_IgnoreSecurity_Get();
- Curl_Data->Curl=curl_easy_init();
- if (Curl_Data->Curl==NULL)
- return 0;
- #if MEDIAINFO_NEXTPACKET
- if (MI->Config.NextPacket_Get())
- {
- Curl_Data->CurlM=curl_multi_init( );
- if (Curl_Data->CurlM==NULL)
- return 0;
- CURLMcode CodeM=curl_multi_add_handle(Curl_Data->CurlM, Curl_Data->Curl);
- if (CodeM!=CURLM_OK)
- return 0;
- Curl_Data->NextPacket=true;
- }
- #endif //MEDIAINFO_NEXTPACKET
- Curl_Data->MI=MI;
- Curl_Data->File_Name=File_Name;
- string FileName_String=Ztring(Curl_Data->File_Name).To_UTF8();
- if (MI->Config.File_TimeToLive_Get())
- Curl_Data->Time_Max=time(0)+(time_t)MI->Config.File_TimeToLive_Get();
- if (!MI->Config.File_Curl_Get(__T("UserAgent")).empty())
- curl_easy_setopt(Curl_Data->Curl, CURLOPT_USERAGENT, MI->Config.File_Curl_Get(__T("UserAgent")).To_Local().c_str());
- if (!MI->Config.File_Curl_Get(__T("Proxy")).empty())
- curl_easy_setopt(Curl_Data->Curl, CURLOPT_PROXY, MI->Config.File_Curl_Get(__T("Proxy")).To_Local().c_str());
- if (!MI->Config.File_Curl_Get(__T("HttpHeader")).empty())
- {
- ZtringList HttpHeaderStrings; HttpHeaderStrings.Separator_Set(0, EOL); //End of line is set depending of the platform: \n on Linux, \r on Mac, or \r\n on Windows
- HttpHeaderStrings.Write(MI->Config.File_Curl_Get(__T("HttpHeader")));
- for (size_t Pos=0; Pos<HttpHeaderStrings.size(); Pos++)
- curl_slist_append(Curl_Data->HttpHeader, HttpHeaderStrings[Pos].To_Local().c_str());
- curl_easy_setopt(Curl_Data->Curl, CURLOPT_HTTPHEADER, Curl_Data->HttpHeader);
- }
- curl_easy_setopt(Curl_Data->Curl, CURLOPT_URL, FileName_String.c_str());
- curl_easy_setopt(Curl_Data->Curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(Curl_Data->Curl, CURLOPT_MAXREDIRS, 3);
- curl_easy_setopt(Curl_Data->Curl, CURLOPT_WRITEFUNCTION, &libcurl_WriteData_CallBack);
- curl_easy_setopt(Curl_Data->Curl, CURLOPT_WRITEDATA, Curl_Data);
- curl_easy_setopt(Curl_Data->Curl, CURLOPT_ERRORBUFFER, Curl_Data->ErrorBuffer);
- size_t Protocol_Limit=File_Name.find(__T(":"));
- if (Protocol_Limit!=string::npos)
- {
- Ztring Protocol=File_Name;
- Protocol.resize(Protocol_Limit);
- Protocol.MakeLowerCase();
-
- if (Protocol==__T("sftp") || Protocol==__T("scp"))
- {
- if (!Curl_Data->Ssh_PublicKeyFileName.empty())
- {
- CURLcode Result=curl_easy_setopt(Curl_Data->Curl, CURLOPT_SSH_PUBLIC_KEYFILE, Curl_Data->Ssh_PublicKeyFileName.c_str());
- if (Result)
- {
- #if MEDIAINFO_EVENTS
- if (Result==CURLE_UNKNOWN_TELNET_OPTION)
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0xF1010101, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", The Curl library you use has no support for secure connections."));
- else
- {
- Ztring MessageString;
- MessageString.From_Local(Curl_Data->ErrorBuffer);
- if (MessageString.empty())
- MessageString.From_Local(curl_easy_strerror(Result));
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", ")+MessageString);
- }
- Curl_Data->ErrorBuffer[0]='\0';
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
- }
-
- if (!Curl_Data->Ssh_PrivateKeyFileName.empty())
- {
- CURLcode Result=curl_easy_setopt(Curl_Data->Curl, CURLOPT_SSH_PRIVATE_KEYFILE, Curl_Data->Ssh_PrivateKeyFileName.c_str());
- if (Result)
- {
- #if MEDIAINFO_EVENTS
- if (Result==CURLE_UNKNOWN_TELNET_OPTION)
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0xF1010101, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", The Curl library you use has no support for secure connections."));
- else
- {
- Ztring MessageString;
- MessageString.From_Local(Curl_Data->ErrorBuffer);
- if (MessageString.empty())
- MessageString.From_Local(curl_easy_strerror(Result));
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", ")+MessageString);
- }
- Curl_Data->ErrorBuffer[0]='\0';
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
- }
-
- if (!Curl_Data->Ssh_IgnoreSecurity)
- {
- CURLcode Result=curl_easy_setopt(Curl_Data->Curl, CURLOPT_SSH_KNOWNHOSTS, Curl_Data->Ssh_KnownHostsFileName.c_str());
- if (Result)
- {
- #if MEDIAINFO_EVENTS
- if (Result==CURLE_UNKNOWN_TELNET_OPTION)
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0xF1010102, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", The Curl library you use has no support for known_host security file, transfer would not be secure."));
- else
- {
- Ztring MessageString;
- MessageString.From_Local(Curl_Data->ErrorBuffer);
- if (MessageString.empty())
- MessageString.From_Local(curl_easy_strerror(Result));
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", ")+MessageString);
- }
- Curl_Data->ErrorBuffer[0]='\0';
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
- }
- }
-
- if (Protocol==__T("ftps"))
- {
- if (!Curl_Data->Ssl_CertificateFileName.empty())
- {
- CURLcode Result=curl_easy_setopt(Curl_Data->Curl, CURLOPT_SSLCERT, Curl_Data->Ssl_CertificateFileName.c_str());
- if (Result)
- {
- #if MEDIAINFO_EVENTS
- Ztring MessageString;
- MessageString.From_Local(Curl_Data->ErrorBuffer);
- if (MessageString.empty())
- MessageString.From_Local(curl_easy_strerror(Result));
- Curl_Data->ErrorBuffer[0]='\0';
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", ")+MessageString);
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
- }
-
- if (!Curl_Data->Ssl_CertificateFormat.empty())
- {
- CURLcode Result=curl_easy_setopt(Curl_Data->Curl, CURLOPT_SSLCERTTYPE, Curl_Data->Ssl_CertificateFormat.c_str());
- if (Result)
- {
- #if MEDIAINFO_EVENTS
- Ztring MessageString;
- MessageString.From_Local(Curl_Data->ErrorBuffer);
- if (MessageString.empty())
- MessageString.From_Local(curl_easy_strerror(Result));
- Curl_Data->ErrorBuffer[0]='\0';
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", ")+MessageString);
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
- }
-
- if (!Curl_Data->Ssl_PrivateKeyFileName.empty())
- {
- CURLcode Result=curl_easy_setopt(Curl_Data->Curl, CURLOPT_SSLKEY, Curl_Data->Ssl_PrivateKeyFileName.c_str());
- if (Result)
- {
- #if MEDIAINFO_EVENTS
- Ztring MessageString;
- MessageString.From_Local(Curl_Data->ErrorBuffer);
- if (MessageString.empty())
- MessageString.From_Local(curl_easy_strerror(Result));
- Curl_Data->ErrorBuffer[0]='\0';
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", ")+MessageString);
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
- }
-
- if (!Curl_Data->Ssl_PrivateKeyFormat.empty())
- {
- CURLcode Result=curl_easy_setopt(Curl_Data->Curl, CURLOPT_SSLKEYTYPE, Curl_Data->Ssl_PrivateKeyFormat.c_str());
- if (Result)
- {
- #if MEDIAINFO_EVENTS
- Ztring MessageString;
- MessageString.From_Local(Curl_Data->ErrorBuffer);
- if (MessageString.empty())
- MessageString.From_Local(curl_easy_strerror(Result));
- Curl_Data->ErrorBuffer[0]='\0';
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", ")+MessageString);
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
- }
-
- if (!Curl_Data->Ssl_CertificateAuthorityFileName.empty())
- {
- CURLcode Result=curl_easy_setopt(Curl_Data->Curl, CURLOPT_CAINFO, Curl_Data->Ssl_CertificateAuthorityFileName.c_str());
- if (Result)
- {
- #if MEDIAINFO_EVENTS
- Ztring MessageString;
- MessageString.From_Local(Curl_Data->ErrorBuffer);
- if (MessageString.empty())
- MessageString.From_Local(curl_easy_strerror(Result));
- Curl_Data->ErrorBuffer[0]='\0';
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", ")+MessageString);
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
- }
-
- if (!Curl_Data->Ssl_CertificateAuthorityPath.empty())
- {
- CURLcode Result=curl_easy_setopt(Curl_Data->Curl, CURLOPT_CAPATH, Curl_Data->Ssl_CertificateAuthorityPath.c_str());
- if (Result)
- {
- #if MEDIAINFO_EVENTS
- Ztring MessageString;
- MessageString.From_Local(Curl_Data->ErrorBuffer);
- if (MessageString.empty())
- MessageString.From_Local(curl_easy_strerror(Result));
- Curl_Data->ErrorBuffer[0]='\0';
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", ")+MessageString);
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
- }
-
- if (!Curl_Data->Ssl_CertificateRevocationListFileName.empty())
- {
- CURLcode Result=curl_easy_setopt(Curl_Data->Curl, CURLOPT_CRLFILE, Curl_Data->Ssl_CertificateRevocationListFileName.c_str());
- if (Result)
- {
- #if MEDIAINFO_EVENTS
- Ztring MessageString;
- MessageString.From_Local(Curl_Data->ErrorBuffer);
- if (MessageString.empty())
- MessageString.From_Local(curl_easy_strerror(Result));
- Curl_Data->ErrorBuffer[0]='\0';
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", ")+MessageString);
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
- }
-
- if (Curl_Data->Ssl_IgnoreSecurity)
- {
- CURLcode Result=curl_easy_setopt(Curl_Data->Curl, CURLOPT_SSL_VERIFYPEER, 0);
- if (Result)
- {
- #if MEDIAINFO_EVENTS
- Ztring MessageString;
- MessageString.From_Local(Curl_Data->ErrorBuffer);
- if (MessageString.empty())
- MessageString.From_Local(curl_easy_strerror(Result));
- Curl_Data->ErrorBuffer[0]='\0';
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", ")+MessageString);
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
-
- Result=curl_easy_setopt(Curl_Data->Curl, CURLOPT_SSL_VERIFYHOST, 0);
- if (Result)
- {
- #if MEDIAINFO_EVENTS
- Ztring MessageString;
- MessageString.From_Local(Curl_Data->ErrorBuffer);
- if (MessageString.empty())
- MessageString.From_Local(curl_easy_strerror(Result));
- Curl_Data->ErrorBuffer[0]='\0';
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, 0, Reader_libcurl_FileNameWithoutPassword(File_Name)+__T(", ")+MessageString);
- #endif //MEDIAINFO_EVENTS
- return 0;
- }
- }
- }
- }
-
- //Test the format with buffer
- return Format_Test_PerParser_Continue(MI);
-}
-
-//---------------------------------------------------------------------------
-size_t Reader_libcurl::Format_Test_PerParser_Continue (MediaInfo_Internal* MI)
-{
- bool StopAfterFilled=MI->Config.File_StopAfterFilled_Get();
- bool ShouldContinue=true;
-
- #if MEDIAINFO_DEMUX
- //PerPacket
- if (ShouldContinue && MI->Config.Demux_EventWasSent)
- {
- MI->Config.Demux_EventWasSent=false;
-
- Curl_Data->Status=MI->Open_Buffer_Continue(NULL, 0);
-
- //Demux
- if (MI->Config.Demux_EventWasSent)
- return 2; //Must return immediately
-
- //Threading
- if (MI->IsTerminating())
- return 1; //Termination is requested
-
- if (Curl_Data->Status[File__Analyze::IsFinished] || (StopAfterFilled && Curl_Data->Status[File__Analyze::IsFilled]))
- ShouldContinue=false;
- }
- #endif //MEDIAINFO_DEMUX
-
- if (ShouldContinue)
- {
- CURLcode Result=CURLE_WRITE_ERROR;
- while ((!(Curl_Data->Status[File__Analyze::IsFinished] || (StopAfterFilled && Curl_Data->Status[File__Analyze::IsFilled]))) && Result==CURLE_WRITE_ERROR)
- {
- //GoTo
- if (Curl_Data->MI->Open_Buffer_Continue_GoTo_Get()!=(int64u)-1)
- {
- #ifdef MEDIAINFO_DEBUG
- std::cout<<std::hex<<Curl_Data->File_Offset-Curl_Data->Debug_BytesRead<<" - "<<Curl_Data->File_Offset<<" : "<<std::dec<<Curl_Data->Debug_BytesRead<<" bytes"<<std::endl;
- Curl_Data->Debug_BytesRead=0;
- Curl_Data->Debug_Count++;
- #endif //MEDIAINFO_DEBUG
- CURLcode Code;
- CURL* Temp=curl_easy_duphandle(Curl_Data->Curl);
- if (Temp==0)
- return 0;
- #if MEDIAINFO_NEXTPACKET
- if (Curl_Data->CurlM)
- curl_multi_remove_handle(Curl_Data->CurlM, Curl_Data->Curl);
- #endif //MEDIAINFO_NEXTPACKET
- curl_easy_cleanup(Curl_Data->Curl); Curl_Data->Curl=Temp;
- #if MEDIAINFO_NEXTPACKET
- if (Curl_Data->CurlM)
- curl_multi_add_handle(Curl_Data->CurlM, Curl_Data->Curl);
- #endif //MEDIAINFO_NEXTPACKET
- if (Curl_Data->MI->Open_Buffer_Continue_GoTo_Get()<0x80000000)
- {
- //We do NOT use large version if we can, because some version (tested: 7.15 linux) do NOT like large version (error code 18)
- long File_GoTo_Long=(long)Curl_Data->MI->Open_Buffer_Continue_GoTo_Get();
- Code=curl_easy_setopt(Curl_Data->Curl, CURLOPT_RESUME_FROM, File_GoTo_Long);
- }
- else
- {
- curl_off_t File_GoTo_Off=(curl_off_t)Curl_Data->MI->Open_Buffer_Continue_GoTo_Get();
- Code=curl_easy_setopt(Curl_Data->Curl, CURLOPT_RESUME_FROM_LARGE, File_GoTo_Off);
- }
- if (Code==CURLE_OK)
- {
- #if MEDIAINFO_EVENTS
- Curl_Data->Stream_Offset=Curl_Data->MI->Open_Buffer_Continue_GoTo_Get();
- #endif //MEDIAINFO_EVENTS
- MI->Open_Buffer_Init((int64u)-1, Curl_Data->MI->Open_Buffer_Continue_GoTo_Get());
- }
- }
-
- //Parsing
- #if MEDIAINFO_NEXTPACKET
- if (Curl_Data->NextPacket)
- {
- int running_handles=0;
- do
- {
- CURLMcode CodeM=curl_multi_perform(Curl_Data->CurlM, &running_handles);
- if (Result==CURLE_WRITE_ERROR && Curl_Data->Init_NotAFile)
- {
- //Not possible to get the file with UTF-8, trying local code page
- Curl_Data->Init_NotAFile=false;
- string FileName_String=Ztring(Curl_Data->File_Name).To_Local();
- curl_easy_setopt(Curl_Data->Curl, CURLOPT_URL, FileName_String.c_str());
- CodeM=curl_multi_perform(Curl_Data->CurlM, &running_handles);
- }
- if (CodeM!=CURLM_OK && CodeM!=CURLM_CALL_MULTI_PERFORM)
- break; //There is a problem
- #if MEDIAINFO_DEMUX
- if (MI->Config.Demux_EventWasSent)
- return 2; //Must return immediately
- #endif //MEDIAINFO_DEMUX
- if (running_handles==0)
- break; //cUrl has finished
- }
- while (running_handles);
- if (running_handles==0 && Curl_Data->MI->Open_Buffer_Continue_GoTo_Get()==(int64u)-1)
- break; //cUrl has finished
- Result=CURLE_WRITE_ERROR; //Configuring as if classic method is used
- }
- else
- #endif //MEDIAINFO_NEXTPACKET
- {
- Result=curl_easy_perform(Curl_Data->Curl);
- if (Result==CURLE_WRITE_ERROR && Curl_Data->Init_NotAFile)
- {
- //Not possible to get the file with UTF-8, trying local code page
- Curl_Data->Init_NotAFile=false;
- string FileName_String=Ztring(Curl_Data->File_Name).To_Local();
- curl_easy_setopt(Curl_Data->Curl, CURLOPT_URL, FileName_String.c_str());
- Result=curl_easy_perform(Curl_Data->Curl);
- }
- }
-
- if (Result!=CURLE_OK && Result!=CURLE_WRITE_ERROR)
- {
- #if MEDIAINFO_EVENTS
- Ztring MessageString;
- int32u MessageCode=0;
- MessageString.From_Local(Curl_Data->ErrorBuffer);
- if (MessageString.empty())
- MessageString.From_Local(curl_easy_strerror(Result));
- if (Result==CURLE_PEER_FAILED_VERIFICATION)
- {
- size_t Protocol_Limit=Curl_Data->File_Name.find(__T(":"));
- if (Protocol_Limit!=string::npos)
- {
- Ztring Protocol=Curl_Data->File_Name;
- Protocol.resize(Protocol_Limit);
- Protocol.MakeLowerCase();
- if (Protocol==__T("sftp") || Protocol==__T("scp"))
- {
- MessageString=__T("The remote server's SSH fingerprint was deemed not OK (not in your known_host file).");
- MessageCode=0xF1010103;
- }
- else if (Protocol==__T("https") || Protocol==__T("ftps"))
- {
- MessageString=__T("The remote server's SSL certificate was deemed not OK.");
- MessageCode=0xF1010104;
- }
- }
- }
- Curl_Data->ErrorBuffer[0]='\0';
- MediaInfoLib::Config.Log_Send(0xC0, 0xFF, MessageCode, Reader_libcurl_FileNameWithoutPassword(Curl_Data->File_Name)+__T(", ")+MessageString);
- #endif //MEDIAINFO_EVENTS
- }
-
- #if MEDIAINFO_DEMUX
- if (MI->Config.Demux_EventWasSent)
- return 2; //Must return immediately
- #endif //MEDIAINFO_DEMUX
-
- //Threading
- if (MI->IsTerminating())
- break; //Termination is requested
- }
- }
-
- #ifdef MEDIAINFO_DEBUG
- std::cout<<std::hex<<Curl_Data->File_Offset-Curl_Data->Debug_BytesRead<<" - "<<Curl_Data->File_Offset<<" : "<<std::dec<<Curl_Data->Debug_BytesRead<<" bytes"<<std::endl;
- std::cout<<"Total: "<<std::dec<<Curl_Data->Debug_BytesRead_Total<<" bytes in "<<Curl_Data->Debug_Count<<" blocks"<<std::endl;
- #endif //MEDIAINFO_DEBUG
-
- //Is this file detected?
- if (!Curl_Data->Status[File__Analyze::IsAccepted])
- return 0;
-
- MI->Open_Buffer_Finalize();
-
- #if MEDIAINFO_DEMUX
- if (MI->Config.Demux_EventWasSent)
- return 2; //Must return immediately
- #endif //MEDIAINFO_DEMUX
-
- return 1;
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t Reader_libcurl::Format_Test_PerParser_Seek (MediaInfo_Internal* MI, size_t Method, int64u Value, int64u ID)
-{
- size_t ToReturn=MI->Open_Buffer_Seek(Method, Value, ID);
-
- if (ToReturn==0 || ToReturn==1)
- {
- //Reset
- Curl_Data->Status=0;
- }
-
- return ToReturn;
-}
-#endif //MEDIAINFO_SEEK
-
-} //NameSpace
-
-#endif //MEDIAINFO_LIBCURL_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libcurl.h b/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libcurl.h
deleted file mode 100644
index 4271251ce..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libcurl.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Give information about a lot of media files
-// Dispatch the file to be tested by all containers
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef Reader_libcurlH
-#define Reader_libcurlH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Reader/Reader__Base.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-/// @brief Reader_libcurl
-//***************************************************************************
-
-class Reader_libcurl : public Reader__Base
-{
-public :
- //Constructor/Destructor
- Reader_libcurl ();
- virtual ~Reader_libcurl();
-
- //Format testing
- size_t Format_Test(MediaInfo_Internal* MI, String File_Name);
- size_t Format_Test_PerParser(MediaInfo_Internal* MI, const String &File_Name);
- size_t Format_Test_PerParser_Continue (MediaInfo_Internal* MI);
- size_t Format_Test_PerParser_Seek (MediaInfo_Internal* MI, size_t Method, int64u Value, int64u ID);
-
-public:
- struct curl_data;
-
-private :
- curl_data* Curl_Data;
-};
-
-} //NameSpace
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libcurl_Include.h b/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libcurl_Include.h
deleted file mode 100644
index 32e8cc4b3..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libcurl_Include.h
+++ /dev/null
@@ -1,975 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Reader_libcurl_IncludeH
-#define MediaInfo_Reader_libcurl_IncludeH
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Copy of curl include files - Easy interface
-//***************************************************************************
-
-typedef void CURL;
-
-typedef enum {
- CURLE_OK = 0,
- CURLE_UNSUPPORTED_PROTOCOL, /* 1 */
- CURLE_FAILED_INIT, /* 2 */
- CURLE_URL_MALFORMAT, /* 3 */
- CURLE_OBSOLETE4, /* 4 - NOT USED */
- CURLE_COULDNT_RESOLVE_PROXY, /* 5 */
- CURLE_COULDNT_RESOLVE_HOST, /* 6 */
- CURLE_COULDNT_CONNECT, /* 7 */
- CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */
- CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server
- due to lack of access - when login fails
- this is not returned. */
- CURLE_OBSOLETE10, /* 10 - NOT USED */
- CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */
- CURLE_OBSOLETE12, /* 12 - NOT USED */
- CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */
- CURLE_FTP_WEIRD_227_FORMAT, /* 14 */
- CURLE_FTP_CANT_GET_HOST, /* 15 */
- CURLE_OBSOLETE16, /* 16 - NOT USED */
- CURLE_FTP_COULDNT_SET_TYPE, /* 17 */
- CURLE_PARTIAL_FILE, /* 18 */
- CURLE_FTP_COULDNT_RETR_FILE, /* 19 */
- CURLE_OBSOLETE20, /* 20 - NOT USED */
- CURLE_QUOTE_ERROR, /* 21 - quote command failure */
- CURLE_HTTP_RETURNED_ERROR, /* 22 */
- CURLE_WRITE_ERROR, /* 23 */
- CURLE_OBSOLETE24, /* 24 - NOT USED */
- CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */
- CURLE_READ_ERROR, /* 26 - couldn't open/read from file */
- CURLE_OUT_OF_MEMORY, /* 27 */
- /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error
- instead of a memory allocation error if CURL_DOES_CONVERSIONS
- is defined
- */
- CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */
- CURLE_OBSOLETE29, /* 29 - NOT USED */
- CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */
- CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */
- CURLE_OBSOLETE32, /* 32 - NOT USED */
- CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */
- CURLE_HTTP_POST_ERROR, /* 34 */
- CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */
- CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */
- CURLE_FILE_COULDNT_READ_FILE, /* 37 */
- CURLE_LDAP_CANNOT_BIND, /* 38 */
- CURLE_LDAP_SEARCH_FAILED, /* 39 */
- CURLE_OBSOLETE40, /* 40 - NOT USED */
- CURLE_FUNCTION_NOT_FOUND, /* 41 */
- CURLE_ABORTED_BY_CALLBACK, /* 42 */
- CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */
- CURLE_OBSOLETE44, /* 44 - NOT USED */
- CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */
- CURLE_OBSOLETE46, /* 46 - NOT USED */
- CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */
- CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */
- CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */
- CURLE_OBSOLETE50, /* 50 - NOT USED */
- CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint
- wasn't verified fine */
- CURLE_GOT_NOTHING, /* 52 - when this is a specific error */
- CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */
- CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as
- default */
- CURLE_SEND_ERROR, /* 55 - failed sending network data */
- CURLE_RECV_ERROR, /* 56 - failure in receiving network data */
- CURLE_OBSOLETE57, /* 57 - NOT IN USE */
- CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */
- CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */
- CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */
- CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */
- CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */
- CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */
- CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */
- CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind
- that failed */
- CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */
- CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not
- accepted and we failed to login */
- CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */
- CURLE_TFTP_PERM, /* 69 - permission problem on server */
- CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */
- CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */
- CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */
- CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */
- CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */
- CURLE_CONV_FAILED, /* 75 - conversion failed */
- CURLE_CONV_REQD, /* 76 - caller must register conversion
- callbacks using curl_easy_setopt options
- CURLOPT_CONV_FROM_NETWORK_FUNCTION,
- CURLOPT_CONV_TO_NETWORK_FUNCTION, and
- CURLOPT_CONV_FROM_UTF8_FUNCTION */
- CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing
- or wrong format */
- CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */
- CURLE_SSH, /* 79 - error from the SSH layer, somewhat
- generic so the error message will be of
- interest when this has happened */
-
- CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL
- connection */
- CURLE_AGAIN, /* 81 - socket is not ready for send/recv,
- wait till it's ready and try again (Added
- in 7.18.2) */
- CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or
- wrong format (Added in 7.19.0) */
- CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in
- 7.19.0) */
- CURL_LAST /* never use! */
-} CURLcode;
-
-#define CURLINFO_STRING 0x100000
-#define CURLINFO_LONG 0x200000
-#define CURLINFO_DOUBLE 0x300000
-#define CURLINFO_SLIST 0x400000
-#define CURLINFO_MASK 0x0fffff
-#define CURLINFO_TYPEMASK 0xf00000
-
-typedef enum {
- CURLINFO_NONE, /* first, never use this */
- CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1,
- CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2,
- CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3,
- CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4,
- CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5,
- CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,
- CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7,
- CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8,
- CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9,
- CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10,
- CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11,
- CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12,
- CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13,
- CURLINFO_FILETIME = CURLINFO_LONG + 14,
- CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15,
- CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16,
- CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,
- CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18,
- CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19,
- CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20,
- CURLINFO_PRIVATE = CURLINFO_STRING + 21,
- CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22,
- CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23,
- CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24,
- CURLINFO_OS_ERRNO = CURLINFO_LONG + 25,
- CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26,
- CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27,
- CURLINFO_COOKIELIST = CURLINFO_SLIST + 28,
- CURLINFO_LASTSOCKET = CURLINFO_LONG + 29,
- CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30,
- CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31,
- CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32,
- CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33,
- CURLINFO_CERTINFO = CURLINFO_SLIST + 34,
- CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35,
- /* Fill in new entries below here! */
-
- CURLINFO_LASTONE = 35
-} CURLINFO;
-
-/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */
-#define CURLPROTO_HTTP (1<<0)
-#define CURLPROTO_HTTPS (1<<1)
-#define CURLPROTO_FTP (1<<2)
-#define CURLPROTO_FTPS (1<<3)
-#define CURLPROTO_SCP (1<<4)
-#define CURLPROTO_SFTP (1<<5)
-#define CURLPROTO_TELNET (1<<6)
-#define CURLPROTO_LDAP (1<<7)
-#define CURLPROTO_LDAPS (1<<8)
-#define CURLPROTO_DICT (1<<9)
-#define CURLPROTO_FILE (1<<10)
-#define CURLPROTO_TFTP (1<<11)
-#define CURLPROTO_ALL (~0) /* enable everything */
-
-/* long may be 32 or 64 bits, but we should never depend on anything else
- but 32 */
-#define CURLOPTTYPE_LONG 0
-#define CURLOPTTYPE_OBJECTPOINT 10000
-#define CURLOPTTYPE_FUNCTIONPOINT 20000
-#define CURLOPTTYPE_OFF_T 30000
-
-#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number
-
-/*
- * This macro-mania below setups the CURLOPT_[what] enum, to be used with
- * curl_easy_setopt(). The first argument in the CINIT() macro is the [what]
- * word.
- */
-
-typedef enum {
- /* This is the FILE * or void * the regular output should be written to. */
- CINIT(FILE, OBJECTPOINT, 1),
-
- /* The full URL to get/put */
- CINIT(URL, OBJECTPOINT, 2),
-
- /* Port number to connect to, if other than default. */
- CINIT(PORT, LONG, 3),
-
- /* Name of proxy to use. */
- CINIT(PROXY, OBJECTPOINT, 4),
-
- /* "name:password" to use when fetching. */
- CINIT(USERPWD, OBJECTPOINT, 5),
-
- /* "name:password" to use with proxy. */
- CINIT(PROXYUSERPWD, OBJECTPOINT, 6),
-
- /* Range to get, specified as an ASCII string. */
- CINIT(RANGE, OBJECTPOINT, 7),
-
- /* not used */
-
- /* Specified file stream to upload from (use as input): */
- CINIT(INFILE, OBJECTPOINT, 9),
-
- /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE
- * bytes big. If this is not used, error messages go to stderr instead: */
- CINIT(ERRORBUFFER, OBJECTPOINT, 10),
-
- /* Function that will be called to store the output (instead of fwrite). The
- * parameters will use fwrite() syntax, make sure to follow them. */
- CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11),
-
- /* Function that will be called to read the input (instead of fread). The
- * parameters will use fread() syntax, make sure to follow them. */
- CINIT(READFUNCTION, FUNCTIONPOINT, 12),
-
- /* Time-out the read operation after this amount of seconds */
- CINIT(TIMEOUT, LONG, 13),
-
- /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about
- * how large the file being sent really is. That allows better error
- * checking and better verifies that the upload was successful. -1 means
- * unknown size.
- *
- * For large file support, there is also a _LARGE version of the key
- * which takes an off_t type, allowing platforms with larger off_t
- * sizes to handle larger files. See below for INFILESIZE_LARGE.
- */
- CINIT(INFILESIZE, LONG, 14),
-
- /* POST static input fields. */
- CINIT(POSTFIELDS, OBJECTPOINT, 15),
-
- /* Set the referrer page (needed by some CGIs) */
- CINIT(REFERER, OBJECTPOINT, 16),
-
- /* Set the FTP PORT string (interface name, named or numerical IP address)
- Use i.e '-' to use default address. */
- CINIT(FTPPORT, OBJECTPOINT, 17),
-
- /* Set the User-Agent string (examined by some CGIs) */
- CINIT(USERAGENT, OBJECTPOINT, 18),
-
- /* If the download receives less than "low speed limit" bytes/second
- * during "low speed time" seconds, the operations is aborted.
- * You could i.e if you have a pretty high speed connection, abort if
- * it is less than 2000 bytes/sec during 20 seconds.
- */
-
- /* Set the "low speed limit" */
- CINIT(LOW_SPEED_LIMIT, LONG, 19),
-
- /* Set the "low speed time" */
- CINIT(LOW_SPEED_TIME, LONG, 20),
-
- /* Set the continuation offset.
- *
- * Note there is also a _LARGE version of this key which uses
- * off_t types, allowing for large file offsets on platforms which
- * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE.
- */
- CINIT(RESUME_FROM, LONG, 21),
-
- /* Set cookie in request: */
- CINIT(COOKIE, OBJECTPOINT, 22),
-
- /* This points to a linked list of headers, struct curl_slist kind */
- CINIT(HTTPHEADER, OBJECTPOINT, 23),
-
- /* This points to a linked list of post entries, struct curl_httppost */
- CINIT(HTTPPOST, OBJECTPOINT, 24),
-
- /* name of the file keeping your private SSL-certificate */
- CINIT(SSLCERT, OBJECTPOINT, 25),
-
- /* password for the SSL or SSH private key */
- CINIT(KEYPASSWD, OBJECTPOINT, 26),
-
- /* send TYPE parameter? */
- CINIT(CRLF, LONG, 27),
-
- /* send linked-list of QUOTE commands */
- CINIT(QUOTE, OBJECTPOINT, 28),
-
- /* send FILE * or void * to store headers to, if you use a callback it
- is simply passed to the callback unmodified */
- CINIT(WRITEHEADER, OBJECTPOINT, 29),
-
- /* point to a file to read the initial cookies from, also enables
- "cookie awareness" */
- CINIT(COOKIEFILE, OBJECTPOINT, 31),
-
- /* What version to specifically try to use.
- See CURL_SSLVERSION defines below. */
- CINIT(SSLVERSION, LONG, 32),
-
- /* What kind of HTTP time condition to use, see defines */
- CINIT(TIMECONDITION, LONG, 33),
-
- /* Time to use with the above condition. Specified in number of seconds
- since 1 Jan 1970 */
- CINIT(TIMEVALUE, LONG, 34),
-
- /* 35 = OBSOLETE */
-
- /* Custom request, for customizing the get command like
- HTTP: DELETE, TRACE and others
- FTP: to use a different list command
- */
- CINIT(CUSTOMREQUEST, OBJECTPOINT, 36),
-
- /* HTTP request, for odd commands like DELETE, TRACE and others */
- CINIT(STDERR, OBJECTPOINT, 37),
-
- /* 38 is not used */
-
- /* send linked-list of post-transfer QUOTE commands */
- CINIT(POSTQUOTE, OBJECTPOINT, 39),
-
- /* Pass a pointer to string of the output using full variable-replacement
- as described elsewhere. */
- CINIT(WRITEINFO, OBJECTPOINT, 40),
-
- CINIT(VERBOSE, LONG, 41), /* talk a lot */
- CINIT(HEADER, LONG, 42), /* throw the header out too */
- CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */
- CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */
- CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */
- CINIT(UPLOAD, LONG, 46), /* this is an upload */
- CINIT(POST, LONG, 47), /* HTTP POST method */
- CINIT(DIRLISTONLY, LONG, 48), /* return bare names when listing directories */
-
- CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */
-
- /* Specify whether to read the user+password from the .netrc or the URL.
- * This must be one of the CURL_NETRC_* enums below. */
- CINIT(NETRC, LONG, 51),
-
- CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */
-
- CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */
- CINIT(PUT, LONG, 54), /* HTTP PUT */
-
- /* 55 = OBSOLETE */
-
- /* Function that will be called instead of the internal progress display
- * function. This function should be defined as the curl_progress_callback
- * prototype defines. */
- CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56),
-
- /* Data passed to the progress callback */
- CINIT(PROGRESSDATA, OBJECTPOINT, 57),
-
- /* We want the referrer field set automatically when following locations */
- CINIT(AUTOREFERER, LONG, 58),
-
- /* Port of the proxy, can be set in the proxy string as well with:
- "[host]:[port]" */
- CINIT(PROXYPORT, LONG, 59),
-
- /* size of the POST input data, if strlen() is not good to use */
- CINIT(POSTFIELDSIZE, LONG, 60),
-
- /* tunnel non-http operations through a HTTP proxy */
- CINIT(HTTPPROXYTUNNEL, LONG, 61),
-
- /* Set the interface string to use as outgoing network interface */
- CINIT(INTERFACE, OBJECTPOINT, 62),
-
- /* Set the krb4/5 security level, this also enables krb4/5 awareness. This
- * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string
- * is set but doesn't match one of these, 'private' will be used. */
- CINIT(KRBLEVEL, OBJECTPOINT, 63),
-
- /* Set if we should verify the peer in ssl handshake, set 1 to verify. */
- CINIT(SSL_VERIFYPEER, LONG, 64),
-
- /* The CApath or CAfile used to validate the peer certificate
- this option is used only if SSL_VERIFYPEER is true */
- CINIT(CAINFO, OBJECTPOINT, 65),
-
- /* 66 = OBSOLETE */
- /* 67 = OBSOLETE */
-
- /* Maximum number of http redirects to follow */
- CINIT(MAXREDIRS, LONG, 68),
-
- /* Pass a long set to 1 to get the date of the requested document (if
- possible)! Pass a zero to shut it off. */
- CINIT(FILETIME, LONG, 69),
-
- /* This points to a linked list of telnet options */
- CINIT(TELNETOPTIONS, OBJECTPOINT, 70),
-
- /* Max amount of cached alive connections */
- CINIT(MAXCONNECTS, LONG, 71),
-
- /* What policy to use when closing connections when the cache is filled
- up */
- CINIT(CLOSEPOLICY, LONG, 72),
-
- /* 73 = OBSOLETE */
-
- /* Set to explicitly use a new connection for the upcoming transfer.
- Do not use this unless you're absolutely sure of this, as it makes the
- operation slower and is less friendly for the network. */
- CINIT(FRESH_CONNECT, LONG, 74),
-
- /* Set to explicitly forbid the upcoming transfer's connection to be re-used
- when done. Do not use this unless you're absolutely sure of this, as it
- makes the operation slower and is less friendly for the network. */
- CINIT(FORBID_REUSE, LONG, 75),
-
- /* Set to a file name that contains random data for libcurl to use to
- seed the random engine when doing SSL connects. */
- CINIT(RANDOM_FILE, OBJECTPOINT, 76),
-
- /* Set to the Entropy Gathering Daemon socket pathname */
- CINIT(EGDSOCKET, OBJECTPOINT, 77),
-
- /* Time-out connect operations after this amount of seconds, if connects
- are OK within this time, then fine... This only aborts the connect
- phase. [Only works on unix-style/SIGALRM operating systems] */
- CINIT(CONNECTTIMEOUT, LONG, 78),
-
- /* Function that will be called to store headers (instead of fwrite). The
- * parameters will use fwrite() syntax, make sure to follow them. */
- CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79),
-
- /* Set this to force the HTTP request to get back to GET. Only really usable
- if POST, PUT or a custom request have been used first.
- */
- CINIT(HTTPGET, LONG, 80),
-
- /* Set if we should verify the Common name from the peer certificate in ssl
- * handshake, set 1 to check existence, 2 to ensure that it matches the
- * provided hostname. */
- CINIT(SSL_VERIFYHOST, LONG, 81),
-
- /* Specify which file name to write all known cookies in after completed
- operation. Set file name to "-" (dash) to make it go to stdout. */
- CINIT(COOKIEJAR, OBJECTPOINT, 82),
-
- /* Specify which SSL ciphers to use */
- CINIT(SSL_CIPHER_LIST, OBJECTPOINT, 83),
-
- /* Specify which HTTP version to use! This must be set to one of the
- CURL_HTTP_VERSION* enums set below. */
- CINIT(HTTP_VERSION, LONG, 84),
-
- /* Specifically switch on or off the FTP engine's use of the EPSV command. By
- default, that one will always be attempted before the more traditional
- PASV command. */
- CINIT(FTP_USE_EPSV, LONG, 85),
-
- /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
- CINIT(SSLCERTTYPE, OBJECTPOINT, 86),
-
- /* name of the file keeping your private SSL-key */
- CINIT(SSLKEY, OBJECTPOINT, 87),
-
- /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */
- CINIT(SSLKEYTYPE, OBJECTPOINT, 88),
-
- /* crypto engine for the SSL-sub system */
- CINIT(SSLENGINE, OBJECTPOINT, 89),
-
- /* set the crypto engine for the SSL-sub system as default
- the param has no meaning...
- */
- CINIT(SSLENGINE_DEFAULT, LONG, 90),
-
- /* Non-zero value means to use the global dns cache */
- CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */
-
- /* DNS cache timeout */
- CINIT(DNS_CACHE_TIMEOUT, LONG, 92),
-
- /* send linked-list of pre-transfer QUOTE commands */
- CINIT(PREQUOTE, OBJECTPOINT, 93),
-
- /* set the debug function */
- CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94),
-
- /* set the data for the debug function */
- CINIT(DEBUGDATA, OBJECTPOINT, 95),
-
- /* mark this as start of a cookie session */
- CINIT(COOKIESESSION, LONG, 96),
-
- /* The CApath directory used to validate the peer certificate
- this option is used only if SSL_VERIFYPEER is true */
- CINIT(CAPATH, OBJECTPOINT, 97),
-
- /* Instruct libcurl to use a smaller receive buffer */
- CINIT(BUFFERSIZE, LONG, 98),
-
- /* Instruct libcurl to not use any signal/alarm handlers, even when using
- timeouts. This option is useful for multi-threaded applications.
- See libcurl-the-guide for more background information. */
- CINIT(NOSIGNAL, LONG, 99),
-
- /* Provide a CURLShare for mutexing non-ts data */
- CINIT(SHARE, OBJECTPOINT, 100),
-
- /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
- CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */
- CINIT(PROXYTYPE, LONG, 101),
-
- /* Set the Accept-Encoding string. Use this to tell a server you would like
- the response to be compressed. */
- CINIT(ENCODING, OBJECTPOINT, 102),
-
- /* Set pointer to private data */
- CINIT(PRIVATE, OBJECTPOINT, 103),
-
- /* Set aliases for HTTP 200 in the HTTP Response header */
- CINIT(HTTP200ALIASES, OBJECTPOINT, 104),
-
- /* Continue to send authentication (user+password) when following locations,
- even when hostname changed. This can potentially send off the name
- and password to whatever host the server decides. */
- CINIT(UNRESTRICTED_AUTH, LONG, 105),
-
- /* Specifically switch on or off the FTP engine's use of the EPRT command ( it
- also disables the LPRT attempt). By default, those ones will always be
- attempted before the good old traditional PORT command. */
- CINIT(FTP_USE_EPRT, LONG, 106),
-
- /* Set this to a bitmask value to enable the particular authentications
- methods you like. Use this in combination with CURLOPT_USERPWD.
- Note that setting multiple bits may cause extra network round-trips. */
- CINIT(HTTPAUTH, LONG, 107),
-
- /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx
- in second argument. The function must be matching the
- curl_ssl_ctx_callback proto. */
- CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108),
-
- /* Set the userdata for the ssl context callback function's third
- argument */
- CINIT(SSL_CTX_DATA, OBJECTPOINT, 109),
-
- /* FTP Option that causes missing dirs to be created on the remote server.
- In 7.19.4 we introduced the convenience enums for this option using the
- CURLFTP_CREATE_DIR prefix.
- */
- CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110),
-
- /* Set this to a bitmask value to enable the particular authentications
- methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.
- Note that setting multiple bits may cause extra network round-trips. */
- CINIT(PROXYAUTH, LONG, 111),
-
- /* FTP option that changes the timeout, in seconds, associated with
- getting a response. This is different from transfer timeout time and
- essentially places a demand on the FTP server to acknowledge commands
- in a timely manner. */
- CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112),
-
- /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
- tell libcurl to resolve names to those IP versions only. This only has
- affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */
- CINIT(IPRESOLVE, LONG, 113),
-
- /* Set this option to limit the size of a file that will be downloaded from
- an HTTP or FTP server.
-
- Note there is also _LARGE version which adds large file support for
- platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */
- CINIT(MAXFILESIZE, LONG, 114),
-
- /* See the comment for INFILESIZE above, but in short, specifies
- * the size of the file being uploaded. -1 means unknown.
- */
- CINIT(INFILESIZE_LARGE, OFF_T, 115),
-
- /* Sets the continuation offset. There is also a LONG version of this;
- * look above for RESUME_FROM.
- */
- CINIT(RESUME_FROM_LARGE, OFF_T, 116),
-
- /* Sets the maximum size of data that will be downloaded from
- * an HTTP or FTP server. See MAXFILESIZE above for the LONG version.
- */
- CINIT(MAXFILESIZE_LARGE, OFF_T, 117),
-
- /* Set this option to the file name of your .netrc file you want libcurl
- to parse (using the CURLOPT_NETRC option). If not set, libcurl will do
- a poor attempt to find the user's home directory and check for a .netrc
- file in there. */
- CINIT(NETRC_FILE, OBJECTPOINT, 118),
-
- /* Enable SSL/TLS for FTP, pick one of:
- CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise
- CURLFTPSSL_CONTROL - SSL for the control connection or fail
- CURLFTPSSL_ALL - SSL for all communication or fail
- */
- CINIT(USE_SSL, LONG, 119),
-
- /* The _LARGE version of the standard POSTFIELDSIZE option */
- CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),
-
- /* Enable/disable the TCP Nagle algorithm */
- CINIT(TCP_NODELAY, LONG, 121),
-
- /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
- /* 123 OBSOLETE. Gone in 7.16.0 */
- /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
- /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
- /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
- /* 127 OBSOLETE. Gone in 7.16.0 */
- /* 128 OBSOLETE. Gone in 7.16.0 */
-
- /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option
- can be used to change libcurl's default action which is to first try
- "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK
- response has been received.
-
- Available parameters are:
- CURLFTPAUTH_DEFAULT - let libcurl decide
- CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS
- CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL
- */
- CINIT(FTPSSLAUTH, LONG, 129),
-
- CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130),
- CINIT(IOCTLDATA, OBJECTPOINT, 131),
-
- /* 132 OBSOLETE. Gone in 7.16.0 */
- /* 133 OBSOLETE. Gone in 7.16.0 */
-
- /* zero terminated string for pass on to the FTP server when asked for
- "account" info */
- CINIT(FTP_ACCOUNT, OBJECTPOINT, 134),
-
- /* feed cookies into cookie engine */
- CINIT(COOKIELIST, OBJECTPOINT, 135),
-
- /* ignore Content-Length */
- CINIT(IGNORE_CONTENT_LENGTH, LONG, 136),
-
- /* Set to non-zero to skip the IP address received in a 227 PASV FTP server
- response. Typically used for FTP-SSL purposes but is not restricted to
- that. libcurl will then instead use the same IP address it used for the
- control connection. */
- CINIT(FTP_SKIP_PASV_IP, LONG, 137),
-
- /* Select "file method" to use when doing FTP, see the curl_ftpmethod
- above. */
- CINIT(FTP_FILEMETHOD, LONG, 138),
-
- /* Local port number to bind the socket to */
- CINIT(LOCALPORT, LONG, 139),
-
- /* Number of ports to try, including the first one set with LOCALPORT.
- Thus, setting it to 1 will make no additional attempts but the first.
- */
- CINIT(LOCALPORTRANGE, LONG, 140),
-
- /* no transfer, set up connection and let application use the socket by
- extracting it with CURLINFO_LASTSOCKET */
- CINIT(CONNECT_ONLY, LONG, 141),
-
- /* Function that will be called to convert from the
- network encoding (instead of using the iconv calls in libcurl) */
- CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142),
-
- /* Function that will be called to convert to the
- network encoding (instead of using the iconv calls in libcurl) */
- CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143),
-
- /* Function that will be called to convert from UTF8
- (instead of using the iconv calls in libcurl)
- Note that this is used only for SSL certificate processing */
- CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144),
-
- /* if the connection proceeds too quickly then need to slow it down */
- /* limit-rate: maximum number of bytes per second to send or receive */
- CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145),
- CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146),
-
- /* Pointer to command string to send if USER/PASS fails. */
- CINIT(FTP_ALTERNATIVE_TO_USER, OBJECTPOINT, 147),
-
- /* callback function for setting socket options */
- CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148),
- CINIT(SOCKOPTDATA, OBJECTPOINT, 149),
-
- /* set to 0 to disable session ID re-use for this transfer, default is
- enabled (== 1) */
- CINIT(SSL_SESSIONID_CACHE, LONG, 150),
-
- /* allowed SSH authentication methods */
- CINIT(SSH_AUTH_TYPES, LONG, 151),
-
- /* Used by scp/sftp to do public/private key authentication */
- CINIT(SSH_PUBLIC_KEYFILE, OBJECTPOINT, 152),
- CINIT(SSH_PRIVATE_KEYFILE, OBJECTPOINT, 153),
-
- /* Send CCC (Clear Command Channel) after authentication */
- CINIT(FTP_SSL_CCC, LONG, 154),
-
- /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */
- CINIT(TIMEOUT_MS, LONG, 155),
- CINIT(CONNECTTIMEOUT_MS, LONG, 156),
-
- /* set to zero to disable the libcurl's decoding and thus pass the raw body
- data to the application even when it is encoded/compressed */
- CINIT(HTTP_TRANSFER_DECODING, LONG, 157),
- CINIT(HTTP_CONTENT_DECODING, LONG, 158),
-
- /* Permission used when creating new files and directories on the remote
- server for protocols that support it, SFTP/SCP/FILE */
- CINIT(NEW_FILE_PERMS, LONG, 159),
- CINIT(NEW_DIRECTORY_PERMS, LONG, 160),
-
- /* Set the behaviour of POST when redirecting. Values must be set to one
- of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
- CINIT(POSTREDIR, LONG, 161),
-
- /* used by scp/sftp to verify the host's public key */
- CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162),
-
- /* Callback function for opening socket (instead of socket(2)). Optionally,
- callback is able change the address or refuse to connect returning
- CURL_SOCKET_BAD. The callback should have type
- curl_opensocket_callback */
- CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163),
- CINIT(OPENSOCKETDATA, OBJECTPOINT, 164),
-
- /* POST volatile input fields. */
- CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165),
-
- /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
- CINIT(PROXY_TRANSFER_MODE, LONG, 166),
-
- /* Callback function for seeking in the input stream */
- CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167),
- CINIT(SEEKDATA, OBJECTPOINT, 168),
-
- /* CRL file */
- CINIT(CRLFILE, OBJECTPOINT, 169),
-
- /* Issuer certificate */
- CINIT(ISSUERCERT, OBJECTPOINT, 170),
-
- /* (IPv6) Address scope */
- CINIT(ADDRESS_SCOPE, LONG, 171),
-
- /* Collect certificate chain info and allow it to get retrievable with
- CURLINFO_CERTINFO after the transfer is complete. (Unfortunately) only
- working with OpenSSL-powered builds. */
- CINIT(CERTINFO, LONG, 172),
-
- /* "name" and "pwd" to use when fetching. */
- CINIT(USERNAME, OBJECTPOINT, 173),
- CINIT(PASSWORD, OBJECTPOINT, 174),
-
- /* "name" and "pwd" to use with Proxy when fetching. */
- CINIT(PROXYUSERNAME, OBJECTPOINT, 175),
- CINIT(PROXYPASSWORD, OBJECTPOINT, 176),
-
- /* Comma separated list of hostnames defining no-proxy zones. These should
- match both hostnames directly, and hostnames within a domain. For
- example, local.com will match local.com and www.local.com, but NOT
- notlocal.com or www.notlocal.com. For compatibility with other
- implementations of this, .local.com will be considered to be the same as
- local.com. A single * is the only valid wildcard, and effectively
- disables the use of proxy. */
- CINIT(NOPROXY, OBJECTPOINT, 177),
-
- /* block size for TFTP transfers */
- CINIT(TFTP_BLKSIZE, LONG, 178),
-
- /* Socks Service */
- CINIT(SOCKS5_GSSAPI_SERVICE, OBJECTPOINT, 179),
-
- /* Socks Service */
- CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),
-
- /* set the bitmask for the protocols that are allowed to be used for the
- transfer, which thus helps the app which takes URLs from users or other
- external inputs and want to restrict what protocol(s) to deal
- with. Defaults to CURLPROTO_ALL. */
- CINIT(PROTOCOLS, LONG, 181),
-
- /* set the bitmask for the protocols that libcurl is allowed to follow to,
- as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
- to be set in both bitmasks to be allowed to get redirected to. Defaults
- to all protocols except FILE and SCP. */
- CINIT(REDIR_PROTOCOLS, LONG, 182),
-
- /* set the SSH knownhost file name to use */
- CINIT(SSH_KNOWNHOSTS, OBJECTPOINT, 183),
-
- /* set the SSH host key callback, must point to a curl_sshkeycallback
- function */
- CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184),
-
- /* set the SSH host key callback custom pointer */
- CINIT(SSH_KEYDATA, OBJECTPOINT, 185),
-
- CURLOPT_LASTENTRY /* the last unused */
-} CURLoption;
-
- /* three convenient "aliases" that follow the name scheme better */
-#define CURLOPT_WRITEDATA CURLOPT_FILE
-#define CURLOPT_READDATA CURLOPT_INFILE
-#define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER
-
-typedef int64u curl_off_t;
-
-//***************************************************************************
-// Copy of curl include files - Multi interface
-//***************************************************************************
-
-typedef void CURLM;
-
-typedef enum {
- CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or
- curl_multi_socket*() soon */
- CURLM_OK,
- CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */
- CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */
- CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */
- CURLM_INTERNAL_ERROR, /* this is a libcurl bug */
- CURLM_BAD_SOCKET, /* the passed in socket argument did not match */
- CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */
- CURLM_LAST
-} CURLMcode;
-
-typedef enum {
- CURLVERSION_FIRST,
- CURLVERSION_SECOND,
- CURLVERSION_THIRD,
- CURLVERSION_FOURTH,
- CURLVERSION_LAST /* never actually use this */
-} CURLversion;
-
-#define CURLVERSION_NOW CURLVERSION_FOURTH
-
-typedef struct {
- CURLversion age; /* age of the returned struct */
- const char *version; /* LIBCURL_VERSION */
- unsigned int version_num; /* LIBCURL_VERSION_NUM */
- const char *host; /* OS/host/cpu/machine when configured */
- int features; /* bitmask, see defines below */
- const char *ssl_version; /* human readable string */
- long ssl_version_num; /* not used anymore, always 0 */
- const char *libz_version; /* human readable string */
- /* protocols is terminated by an entry with a NULL protoname */
- const char * const *protocols;
-
- /* The fields below this were added in CURLVERSION_SECOND */
- const char *ares;
- int ares_num;
-
- /* This field was added in CURLVERSION_THIRD */
- const char *libidn;
-
- /* These field were added in CURLVERSION_FOURTH */
-
- /* Same as '_libiconv_version' if built with HAVE_ICONV */
- int iconv_ver_num;
-
- const char *libssh_version; /* human readable string */
-
-} curl_version_info_data;
-
-#define CURL_ERROR_SIZE 256
-
-//***************************************************************************
-// Dynamic load stuff
-//***************************************************************************
-
-extern "C"
-{
-
-#if defined (_WIN32) || defined (WIN32)
- #ifdef _UNICODE
- #define MEDIAINFODLL_NAME L"libcurl.dll"
- #else //_UNICODE
- #define MEDIAINFODLL_NAME "libcurl.dll"
- #endif //_UNICODE
-#elif defined(__APPLE__) && defined(__MACH__)
- #define MEDIAINFODLL_NAME "libcurl.0.dylib"
- #define __stdcall
-#else
- #define MEDIAINFODLL_NAME "libcurl.so.0"
- #define __stdcall
-#endif //!defined(_WIN32) || defined (WIN32)
-
-#ifdef MEDIAINFO_GLIBC
- #include <gmodule.h>
- static GModule* libcurl_Module=NULL;
-#elif defined (_WIN32) || defined (WIN32)
- #undef __TEXT
- #include <windows.h>
- static HMODULE libcurl_Module=NULL;
-#else
- #include <dlfcn.h>
- static void* libcurl_Module=NULL;
-#endif
-
-size_t libcurl_Module_Count=0;
-
-#ifdef MEDIAINFO_GLIBC
-#define MEDIAINFO_ASSIGN(_Name,_Name2) \
- if (!g_module_symbol (libcurl_Module, _Name2, (gpointer*)&_Name)) \
- Errors++;
-#elif defined (_WIN32) || defined (WIN32)
-#define MEDIAINFO_ASSIGN(_Name,_Name2) \
- _Name=(LIBCURL_##_Name)GetProcAddress(libcurl_Module, _Name2); \
- if (_Name==NULL) Errors++;
-#else
-#define MEDIAINFO_ASSIGN(_Name,_Name2) \
- _Name=(LIBCURL_##_Name)dlsym(libcurl_Module, _Name2); \
- if (_Name==NULL) Errors++;
-#endif
-
-//---------------------------------------------------------------------------
-// Easy interface
-typedef CURL* (*LIBCURL_curl_easy_init) (); static LIBCURL_curl_easy_init curl_easy_init;
-typedef CURLcode (*LIBCURL_curl_easy_setopt) (CURL *curl, CURLoption option, ...); static LIBCURL_curl_easy_setopt curl_easy_setopt;
-typedef CURLcode (*LIBCURL_curl_easy_perform)(CURL *curl); static LIBCURL_curl_easy_perform curl_easy_perform;
-typedef void (*LIBCURL_curl_easy_cleanup)(CURL *curl); static LIBCURL_curl_easy_cleanup curl_easy_cleanup;
-typedef CURLcode (*LIBCURL_curl_easy_getinfo)(CURL *curl, CURLINFO info, ...); static LIBCURL_curl_easy_getinfo curl_easy_getinfo;
-typedef struct curl_slist* (*LIBCURL_curl_slist_append) (struct curl_slist *, const char *); static LIBCURL_curl_slist_append curl_slist_append;
-typedef void (*LIBCURL_curl_slist_free_all) (struct curl_slist *); static LIBCURL_curl_slist_free_all curl_slist_free_all;
-typedef CURL* (*LIBCURL_curl_easy_duphandle)(CURL *curl); static LIBCURL_curl_easy_duphandle curl_easy_duphandle;
-typedef const char* (*LIBCURL_curl_easy_strerror)(CURLcode curlcode); static LIBCURL_curl_easy_strerror curl_easy_strerror;
-typedef curl_version_info_data* (*LIBCURL_curl_version_info)(CURLversion version); static LIBCURL_curl_version_info curl_version_info;
-
-//---------------------------------------------------------------------------
-// Multi interface
-typedef CURLM* (*LIBCURL_curl_multi_init) (); static LIBCURL_curl_multi_init curl_multi_init;
-typedef CURLMcode (*LIBCURL_curl_multi_add_handle) (CURLM *multi_handle, CURL *curl_handle); static LIBCURL_curl_multi_add_handle curl_multi_add_handle;
-typedef CURLMcode (*LIBCURL_curl_multi_remove_handle) (CURLM *multi_handle, CURL *curl_handle); static LIBCURL_curl_multi_remove_handle curl_multi_remove_handle;
-typedef CURLMcode (*LIBCURL_curl_multi_perform)(CURLM *curl, int *running_handles); static LIBCURL_curl_multi_perform curl_multi_perform;
-typedef void (*LIBCURL_curl_multi_cleanup)(CURLM *curl); static LIBCURL_curl_multi_cleanup curl_multi_cleanup;
-
-}
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libmms.cpp b/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libmms.cpp
deleted file mode 100644
index 7c18dafe7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libmms.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-// Config
-#ifndef MEDIAINFO_LIBMMS_DESCRIBE_SUPPORT //If not defined by the compiler
- #define MEDIAINFO_LIBMMS_DESCRIBE_SUPPORT 0 //0=without, 1=with libmms customized version containing DESCRIBE only API
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_LIBMMS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Reader/Reader_libmms.h"
-#include "MediaInfo/File__Analyze.h"
-#if defined LIBMMS_DLL_RUNTIME
-#elif defined LIBMMS_DLL_STATIC
-#else
- #ifdef MEDIAINFO_LIBMMS_FROMSOURCE
- #include "mmsx.h"
- #include "mmsh.h"
- #else //MEDIAINFO_LIBMMS_FROMSOURCE
- #include "libmms/mmsx.h"
- #include "libmms/mmsh.h"
- #endif //MEDIAINFO_LIBMMS_FROMSOURCE
-#endif
-#include <iostream>
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-const size_t Buffer_NormalSize=64*1024;
-
-//***************************************************************************
-// libmms stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t Reader_libmms::Format_Test(MediaInfo_Internal* MI, String File_Name)
-{
- mmsx_t* Handle;
-
- //Opening the file
- #if MEDIAINFO_LIBMMS_DESCRIBE_SUPPORT
- if (MI->Config.File_Mmsh_Describe_Only_Get())
- {
- // Use MMSH & Send a DESCRIBE request
- mmsh_t* MmshHandle;
-
- MmshHandle=mmsh_describe_request(0, 0, Ztring(File_Name).To_Local().c_str());
- if (MmshHandle==NULL)
- return 0;
-
- Handle=mmsx_set_mmsh_handle(MmshHandle);
- if (Handle==NULL)
- {
- mmsh_close(MmshHandle);
- return 0;
- }
- }
- else
- #endif //MEDIAINFO_LIBMMS_DESCRIBE_SUPPORT
- {
- // Use MMS or MMSH (Send a DESCRIBE & PLAY request)
- Handle=mmsx_connect(0, 0, Ztring(File_Name).To_Local().c_str(), (int)-1);
- if (Handle==NULL)
- return 0;
- }
-
- //Init
- size_t Buffer_Size_Max;
- uint32_t Length;
- if (!MI->Config.File_Mmsh_Describe_Only_Get())
- {
- //Buffer
- Buffer_Size_Max=Buffer_NormalSize;
-
- //MediaInfo init
- mms_off_t Offset=mmsx_seek(0, Handle, 0, SEEK_SET);
- uint32_t Length=mmsx_get_length(Handle);
- MI->Open_Buffer_Init(Length, File_Name);
- }
- else
- {
- //Buffer
- Buffer_Size_Max=mmsx_get_asf_header_len(Handle);
-
- //MediaInfo init
- Length=(uint32_t)-1;
- MI->Open_Buffer_Init((int64u)-1, File_Name);
- }
- int8u* Buffer=new int8u[Buffer_Size_Max];
-
- //Test the format with buffer
- bool StopAfterFilled=MI->Config.File_StopAfterFilled_Get();
- std::bitset<32> Status;
- do
- {
- //Seek (if needed)
- if (MI->Open_Buffer_Continue_GoTo_Get()!=(int64u)-1)
- {
- if (MI->Open_Buffer_Continue_GoTo_Get()>=Length)
- break; //Seek requested, but on a file bigger in theory than what is in the real file, we can't do this
- if (mmsx_seek(0, Handle, mms_off_t(MI->Open_Buffer_Continue_GoTo_Get()), SEEK_SET)!=MI->Open_Buffer_Continue_GoTo_Get())
- break; //File is not seekable
-
- MI->Open_Buffer_Init((int64u)-1, MI->Open_Buffer_Continue_GoTo_Get());
- }
-
- //Buffering
- size_t Buffer_Size;
- if (!MI->Config.File_Mmsh_Describe_Only_Get())
- Buffer_Size=mmsx_read(0, Handle, (char*)Buffer, (int)Buffer_Size_Max);
- else
- Buffer_Size=mmsx_peek_header(Handle, (char*)Buffer, (int)Buffer_Size_Max);
-
- //Parser
- Status=MI->Open_Buffer_Continue(Buffer, Buffer_Size);
- if (Buffer_Size==0 || MI->Config.File_Mmsh_Describe_Only_Get())
- break;
- }
- while (!(Status[File__Analyze::IsFinished] || (StopAfterFilled && Status[File__Analyze::IsFilled])));
-
- //File
- mmsx_close(Handle);
-
- //Buffer
- delete[] Buffer; //Buffer=NULL;
-
- //Is this file detected?
- if (!Status[File__Analyze::IsAccepted])
- return 0;
-
- MI->Open_Buffer_Finalize();
-
- return 1;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_LIBMMS_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libmms.h b/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libmms.h
deleted file mode 100644
index 4079a04e2..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Reader/Reader_libmms.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Give information about a lot of media files
-// Dispatch the file to be tested by all containers
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef Reader_libmmsH
-#define Reader_libmmsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Reader/Reader__Base.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-/// @brief Reader_libmms
-//***************************************************************************
-
-class Reader_libmms : public Reader__Base
-{
-public :
- //Constructor/Destructor
- virtual ~Reader_libmms() {}
-
- //Format testing
- size_t Format_Test(MediaInfo_Internal* MI, String File_Name);
-};
-
-} //NameSpace
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Setup.h b/src/thirdparty/MediaInfo/MediaInfo/Setup.h
deleted file mode 100644
index f6cefdc9f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Setup.h
+++ /dev/null
@@ -1,863 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// All compilation definitions
-// Helpers for compilers (precompilation)
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_SetupH
-#define MediaInfo_SetupH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-//Needed in the whole library
-#include "ZenLib/Conf.h"
-
-//***************************************************************************
-// General configuration
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Legacy
-#if defined(MEDIAINFO_MINIMIZESIZE)
- #if !defined (MEDIAINFO_TRACE_NO) && !defined (MEDIAINFO_TRACE_YES)
- #define MEDIAINFO_TRACE_NO
- #endif
- //#if !defined (MEDIAINFO_FILTER_NO) && !defined (MEDIAINFO_FILTER_YES)
- // #define MEDIAINFO_FILTER_NO
- //#endif
- //#if !defined (MEDIAINFO_DUPLICATE_NO) && !defined (MEDIAINFO_DUPLICATE_YES)
- // #define MEDIAINFO_DUPLICATE_NO
- //#endif
- #if !defined (MEDIAINFO_MACROBLOCKS_NO) && !defined (MEDIAINFO_MACROBLOCKS_YES)
- #define MEDIAINFO_MACROBLOCKS_NO
- #endif
- #if !defined (MEDIAINFO_NEXTPACKET_NO) && !defined (MEDIAINFO_NEXTPACKET_YES)
- #define MEDIAINFO_NEXTPACKET_NO
- #endif
- #if !defined (MEDIAINFO_SEEK_NO) && !defined (MEDIAINFO_SEEK_YES)
- #define MEDIAINFO_SEEK_NO
- #endif
- #if !defined (MEDIAINFO_EVENTS_NO) && !defined (MEDIAINFO_EVENTS_YES)
- #define MEDIAINFO_EVENTS_NO
- #endif
- #if !defined (MEDIAINFO_DEMUX_NO) && !defined (MEDIAINFO_DEMUX_YES)
- #define MEDIAINFO_DEMUX_NO
- #endif
- #if !defined (MEDIAINFO_IBI_NO) && !defined (MEDIAINFO_IBI_YES)
- #define MEDIAINFO_IBI_NO
- #endif
-#endif
-#if defined(MEDIAINFO_EVENTS)
- #undef MEDIAINFO_EVENTS
- #if !defined (MEDIAINFO_EVENTS_NO) && !defined (MEDIAINFO_EVENTS_YES)
- #define MEDIAINFO_EVENTS_YES
- #endif
-#endif
-
-//---------------------------------------------------------------------------
-// Special configurations
-#if defined(MEDIAINFO_MINIMAL_YES)
- #if !defined (MEDIAINFO_TRACE_NO) && !defined (MEDIAINFO_TRACE_YES)
- #define MEDIAINFO_TRACE_NO
- #endif
- #if !defined (MEDIAINFO_FILTER_NO) && !defined (MEDIAINFO_FILTER_YES)
- #define MEDIAINFO_FILTER_NO
- #endif
- #if !defined (MEDIAINFO_DUPLICATE_NO) && !defined (MEDIAINFO_DUPLICATE_YES)
- #define MEDIAINFO_DUPLICATE_NO
- #endif
- #if !defined (MEDIAINFO_MACROBLOCKS_NO) && !defined (MEDIAINFO_MACROBLOCKS_YES)
- #define MEDIAINFO_MACROBLOCKS_NO
- #endif
- #if !defined (MEDIAINFO_NEXTPACKET_NO) && !defined (MEDIAINFO_NEXTPACKET_YES)
- #define MEDIAINFO_NEXTPACKET_NO
- #endif
- #if !defined (MEDIAINFO_SEEK_NO) && !defined (MEDIAINFO_SEEK_YES)
- #define MEDIAINFO_SEEK_NO
- #endif
- #if !defined (MEDIAINFO_EVENTS_NO) && !defined (MEDIAINFO_EVENTS_YES)
- #define MEDIAINFO_EVENTS_NO
- #endif
- #if !defined (MEDIAINFO_DEMUX_NO) && !defined (MEDIAINFO_DEMUX_YES)
- #define MEDIAINFO_DEMUX_NO
- #endif
- #if !defined (MEDIAINFO_IBI_NO) && !defined (MEDIAINFO_IBI_YES)
- #define MEDIAINFO_IBI_NO
- #endif
- #if !defined (MEDIAINFO_DIRECTORY_NO) && !defined (MEDIAINFO_DIRECTORY_YES)
- #define MEDIAINFO_DIRECTORY_NO
- #endif
- #if !defined (MEDIAINFO_LIBCURL_NO) && !defined (MEDIAINFO_LIBCURL_YES)
- #define MEDIAINFO_LIBCURL_NO
- #endif
- #if !defined (MEDIAINFO_LIBMMS_NO) && !defined (MEDIAINFO_LIBMM_YES)
- #define MEDIAINFO_LIBMMS_NO
- #endif
- #if !defined (MEDIAINFO_DVDIF_ANALYZE_NO) && !defined (MEDIAINFO_DVDIF_ANALYZE_YES)
- #define MEDIAINFO_DVDIF_ANALYZE_NO
- #endif
- #if !defined (MEDIAINFO_MPEGTS_DUPLICATE_NO) && !defined (MEDIAINFO_MPEGTS_DUPLICATE_YES)
- #define MEDIAINFO_MPEGTS_DUPLICATE_NO
- #endif
- #if !defined (MEDIAINFO_READTHREAD_NO) && !defined (MEDIAINFO_READTHREAD_YES)
- #define MEDIAINFO_READTHREAD_NO
- #endif
- #if !defined (MEDIAINFO_MD5_NO) && !defined (MEDIAINFO_MD5_YES)
- #define MEDIAINFO_MD5_NO
- #endif
- #if !defined (MEDIAINFO_AES_NO) && !defined (MEDIAINFO_AES_YES)
- #define MEDIAINFO_AES_NO
- #endif
- #if !defined (MEDIAINFO_EXPORT_NO) && !defined (MEDIAINFO_EXPORT_YES)
- #define MEDIAINFO_EXPORT_NO
- #endif
-#endif
-
-//---------------------------------------------------------------------------
-// Optional features
-#if !defined(MEDIAINFO_TRACE)
- #if defined(MEDIAINFO_TRACE_NO) && defined(MEDIAINFO_TRACE_YES)
- #undef MEDIAINFO_TRACE_NO //MEDIAINFO_TRACE_YES has priority
- #endif
- #if defined(MEDIAINFO_TRACE_NO)
- #define MEDIAINFO_TRACE 0
- #else
- #define MEDIAINFO_TRACE 1
- #endif
-#endif
-#if !defined(MEDIAINFO_FILTER)
- #if defined(MEDIAINFO_FILTER_NO) && defined(MEDIAINFO_FILTER_YES)
- #undef MEDIAINFO_FILTER_NO //MEDIAINFO_FILTER_YES has priority
- #endif
- #if defined(MEDIAINFO_FILTER_NO)
- #define MEDIAINFO_FILTER 0
- #else
- #define MEDIAINFO_FILTER 1
- #endif
-#endif
-#if !defined(MEDIAINFO_DUPLICATE)
- #if defined(MEDIAINFO_DUPLICATE_NO) && defined(MEDIAINFO_DUPLICATE_YES)
- #undef MEDIAINFO_DUPLICATE_NO //MEDIAINFO_DUPLICATE_YES has priority
- #endif
- #if defined(MEDIAINFO_DUPLICATE_NO)
- #define MEDIAINFO_DUPLICATE 0
- #else
- #define MEDIAINFO_DUPLICATE 1
- #endif
-#endif
-#if !defined(MEDIAINFO_MACROBLOCKS)
- #if defined(MEDIAINFO_MACROBLOCKS_NO) && defined(MEDIAINFO_MACROBLOCKS_YES)
- #undef MEDIAINFO_MACROBLOCKS_NO //MEDIAINFO_MACROBLOCKS_YES has priority
- #endif
- #if defined(MEDIAINFO_MACROBLOCKS_NO)
- #define MEDIAINFO_MACROBLOCKS 0
- #else
- #define MEDIAINFO_MACROBLOCKS 1
- #endif
-#endif
-#if !defined(MEDIAINFO_AES)
- #if defined(MEDIAINFO_AES_NO) && defined(MEDIAINFO_AES_YES)
- #undef MEDIAINFO_AES_NO //MEDIAINFO_AES_YES has priority
- #endif
- #if defined(MEDIAINFO_AES_NO)
- #define MEDIAINFO_AES 0
- #else
- #define MEDIAINFO_AES 1
- #endif
-#endif
-#if !defined(MEDIAINFO_NEXTPACKET)
- #if defined(MEDIAINFO_NEXTPACKET_NO) && defined(MEDIAINFO_NEXTPACKET_YES)
- #undef MEDIAINFO_NEXTPACKET_NO //MEDIAINFO_NEXTPACKET_YES has priority
- #endif
- #if defined(MEDIAINFO_NEXTPACKET_NO)
- #define MEDIAINFO_NEXTPACKET 0
- #else
- #define MEDIAINFO_NEXTPACKET 1
- #endif
-#endif
-#if !defined(MEDIAINFO_SEEK)
- #if defined(MEDIAINFO_SEEK_NO) && defined(MEDIAINFO_SEEK_YES)
- #undef MEDIAINFO_SEEK_NO //MEDIAINFO_SEEK_YES has priority
- #endif
- #if defined(MEDIAINFO_SEEK_NO)
- #define MEDIAINFO_SEEK 0
- #else
- #define MEDIAINFO_SEEK 1
- #endif
-#endif
-#if !defined(MEDIAINFO_EVENTS)
- #if defined(MEDIAINFO_EVENTS_NO) && defined(MEDIAINFO_EVENTS_YES)
- #undef MEDIAINFO_EVENTS_NO //MEDIAINFO_EVENTS_YES has priority
- #endif
- #if defined(MEDIAINFO_EVENTS_NO)
- #define MEDIAINFO_EVENTS 0
- #else
- #define MEDIAINFO_EVENTS 1
- #endif
-#endif
-#if !defined(MEDIAINFO_ADVANCED)
- #if defined(MEDIAINFO_ADVANCED_NO) && defined(MEDIAINFO_ADVANCED_YES)
- #undef MEDIAINFO_ADVANCED_NO //MEDIAINFO_ADVANCED_YES has priority
- #endif
- #if defined(MEDIAINFO_ADVANCED_NO)
- #define MEDIAINFO_ADVANCED 0
- #else
- #define MEDIAINFO_ADVANCED 1
- #endif
-#endif
-#if !defined(MEDIAINFO_ADVANCED2) //ADVANCED2 is for optional build during defualt build
- #if defined(MEDIAINFO_ADVANCED2_NO) && defined(MEDIAINFO_ADVANCED2_YES)
- #undef MEDIAINFO_ADVANCED2_NO //MEDIAINFO_ADVANCED2_YES has priority
- #endif
- #if defined(MEDIAINFO_ADVANCED2_YES)
- #define MEDIAINFO_ADVANCED2 1
- #else
- #define MEDIAINFO_ADVANCED2 0
- #endif
-#endif
-#if !defined(MEDIAINFO_MD5)
- #if defined(MEDIAINFO_MD5_NO) && defined(MEDIAINFO_MD5_YES)
- #undef MEDIAINFO_MD5_NO //MEDIAINFO_MD5_YES has priority
- #endif
- #if defined(MEDIAINFO_MD5_NO)
- #define MEDIAINFO_MD5 0
- #else
- #define MEDIAINFO_MD5 1
- #endif
-#endif
-#if !defined(MEDIAINFO_DEMUX)
- #if !defined(MEDIAINFO_DEMUX_NO) && !defined(MEDIAINFO_DEMUX_YES) && !MEDIAINFO_EVENTS
- #define MEDIAINFO_DEMUX_NO //MEDIAINFO_DEMUX is disabled by default if MEDIAINFO_EVENTS is set to 0
- #endif
- #if defined(MEDIAINFO_DEMUX_NO) && defined(MEDIAINFO_DEMUX_YES)
- #undef MEDIAINFO_DEMUX_NO //MEDIAINFO_DEMUX_YES has priority
- #endif
- #if defined(MEDIAINFO_DEMUX_NO)
- #define MEDIAINFO_DEMUX 0
- #else
- #define MEDIAINFO_DEMUX 1
- #endif
-#endif
-#if MEDIAINFO_DEMUX && !MEDIAINFO_EVENTS
- pragma error MEDIAINFO_DEMUX can be set to 1 only if MEDIAINFO_EVENTS is set to 1
-#endif
-#if !defined(MEDIAINFO_IBI)
- #if defined(MEDIAINFO_IBI_NO) && defined(MEDIAINFO_IBI_YES)
- #undef MEDIAINFO_IBI_NO //MEDIAINFO_IBI_YES has priority
- #endif
- #if defined(MEDIAINFO_IBI_NO)
- #define MEDIAINFO_IBI 0
- #else
- #define MEDIAINFO_IBI 1
- #endif
-#endif
-#if !defined(MEDIAINFO_IBIUSAGE)
- #if defined(MEDIAINFO_IBIUSAGE_NO) && defined(MEDIAINFO_IBIUSAGE_YES)
- #undef MEDIAINFO_IBIUSAGE_NO //MEDIAINFO_IBIUSAGE_YES has priority
- #endif
- #if defined(MEDIAINFO_IBIUSAGE_NO)
- #define MEDIAINFO_IBIUSAGE 0
- #else
- #if MEDIAINFO_ADVANCED2
- #define MEDIAINFO_IBIUSAGE 1
- #else //MEDIAINFO_ADVANCED2
- #define MEDIAINFO_IBIUSAGE 0
- #endif //MEDIAINFO_ADVANCED2
- #endif
-#endif
-#if !defined(MEDIAINFO_READTHREAD)
- #if defined(MEDIAINFO_READTHREAD_NO) && defined(MEDIAINFO_READTHREAD_YES)
- #undef MEDIAINFO_READTHREAD_NO //MEDIAINFO_READTHREAD_YES has priority
- #endif
- #if defined(MEDIAINFO_READTHREAD_NO) || !defined(WINDOWS) //Currently supported only on Windows TODO: add support of non Windows OS
- #define MEDIAINFO_READTHREAD 0
- #else
- #define MEDIAINFO_READTHREAD 1
- #endif
-#endif
-
-//***************************************************************************
-// Precise configuration
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Readers
-#if !defined(MEDIAINFO_READER_NO) && !defined(MEDIAINFO_DIRECTORY_NO) && !defined(MEDIAINFO_DIRECTORY_YES)
- #define MEDIAINFO_DIRECTORY_YES
-#endif
-#if !defined(MEDIAINFO_READER_NO) && !defined(MEDIAINFO_FILE_NO) && !defined(MEDIAINFO_FILE_YES)
- #define MEDIAINFO_FILE_YES
-#endif
-#if !defined(MEDIAINFO_READER_NO) && !defined(MEDIAINFO_LIBCURL_NO) && !defined(MEDIAINFO_LIBCURL_YES)
- #define MEDIAINFO_LIBCURL_YES
-#endif
-#if !defined(MEDIAINFO_READER_NO) && !defined(MEDIAINFO_LIBMMS_NO) && !defined(MEDIAINFO_LIBMMS_YES)
- #ifndef WINDOWS
- #define MEDIAINFO_LIBMMS_YES
- #endif //WINDOWS
-#endif
-
-//---------------------------------------------------------------------------
-// Export
-#if !defined(MEDIAINFO_EXPORT_NO) && !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_TEXT_YES)
- #define MEDIAINFO_TEXT_YES
-#endif
-#if !defined(MEDIAINFO_EXPORT_NO) && !defined(MEDIAINFO_HTML_NO) && !defined(MEDIAINFO_HTML_YES)
- #define MEDIAINFO_HTML_YES
-#endif
-#if !defined(MEDIAINFO_EXPORT_NO) && !defined(MEDIAINFO_XML_NO) && !defined(MEDIAINFO_XML_YES)
- #define MEDIAINFO_XML_YES
-#endif
-#if !defined(MEDIAINFO_EXPORT_NO) && !defined(MEDIAINFO_CSV_NO) && !defined(MEDIAINFO_CSV_YES)
- #define MEDIAINFO_CSV_YES
-#endif
-#if !defined(MEDIAINFO_EXPORT_NO) && !defined(MEDIAINFO_CUSTOM_NO) && !defined(MEDIAINFO_CUSTOM_YES)
- #define MEDIAINFO_CUSTOM_YES
-#endif
-#if !defined(MEDIAINFO_EXPORT_NO) && !defined(MEDIAINFO_EBUCORE_NO) && !defined(MEDIAINFO_EBUCORE_YES)
- #define MEDIAINFO_EBUCORE_YES
-#endif
-#if !defined(MEDIAINFO_EXPORT_NO) && !defined(MEDIAINFO_MPEG7_NO) && !defined(MEDIAINFO_MPEG7_YES)
- #define MEDIAINFO_MPEG7_YES
-#endif
-#if !defined(MEDIAINFO_EXPORT_NO) && !defined(MEDIAINFO_PBCORE_NO) && !defined(MEDIAINFO_PBCORE_YES)
- #define MEDIAINFO_PBCORE_YES
-#endif
-#if !defined(MEDIAINFO_EXPORT_NO) && !defined(MEDIAINFO_REVTMD_NO) && !defined(MEDIAINFO_REVTMD_YES)
- #define MEDIAINFO_REVTMD_YES
-#endif
-
-//---------------------------------------------------------------------------
-// All in one for no parsers
-#if defined(MEDIAINFO_ALL_NO) && !defined(MEDIAINFO_MULTI_NO)
- #define MEDIAINFO_MULTI_NO
-#endif
-#if defined(MEDIAINFO_ALL_NO) && !defined(MEDIAINFO_VIDEO_NO)
- #define MEDIAINFO_VIDEO_NO
-#endif
-#if defined(MEDIAINFO_ALL_NO) && !defined(MEDIAINFO_AUDIO_NO)
- #define MEDIAINFO_AUDIO_NO
-#endif
-#if defined(MEDIAINFO_ALL_NO) && !defined(MEDIAINFO_TEXT_NO)
- #define MEDIAINFO_TEXT_NO
-#endif
-#if defined(MEDIAINFO_ALL_NO) && !defined(MEDIAINFO_IMAGE_NO)
- #define MEDIAINFO_IMAGE_NO
-#endif
-#if defined(MEDIAINFO_ALL_NO) && !defined(MEDIAINFO_ARCHIVE_NO)
- #define MEDIAINFO_ARCHIVE_NO
-#endif
-#if defined(MEDIAINFO_ALL_NO) && !defined(MEDIAINFO_TAG_NO)
- #define MEDIAINFO_TAG_NO
-#endif
-
-//---------------------------------------------------------------------------
-// Multiple
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_REFERENCES_NO) && !defined(MEDIAINFO_REFERENCES_YES)
- #define MEDIAINFO_REFERENCES_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_AAF_NO) && !defined(MEDIAINFO_AAF_YES)
- #define MEDIAINFO_AAF_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_ANCILLARY_NO) && !defined(MEDIAINFO_ANCILLARY_YES)
- #define MEDIAINFO_ANCILLARY_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_BDAV_NO) && !defined(MEDIAINFO_BDAV_YES)
- #define MEDIAINFO_BDAV_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_BDMV_NO) && !defined(MEDIAINFO_BDMV_YES)
- #define MEDIAINFO_BDMV_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_CDXA_NO) && !defined(MEDIAINFO_CDXA_YES)
- #define MEDIAINFO_CDXA_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_DASHMPD_NO) && !defined(MEDIAINFO_DASHMPD_YES)
- #define MEDIAINFO_DASHMPD_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_DCP_NO) && !defined(MEDIAINFO_DCP_YES)
- #define MEDIAINFO_DCP_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_DVDIF_NO) && !defined(MEDIAINFO_DVDIF_YES)
- #define MEDIAINFO_DVDIF_YES
-#endif
-#if defined(MEDIAINFO_DVDIF_YES) && !defined(MEDIAINFO_DVDIF_ANALYZE_NO) && !defined(MEDIAINFO_DVDIF_ANALYZE_YES)
- #define MEDIAINFO_DVDIF_ANALYZE_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_DVDV_NO) && !defined(MEDIAINFO_DVDV_YES)
- #define MEDIAINFO_DVDV_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_DXW_NO) && !defined(MEDIAINFO_DXW_YES)
- #define MEDIAINFO_DXW_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_FLV_NO) && !defined(MEDIAINFO_FLV_YES)
- #define MEDIAINFO_FLV_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_GXF_NO) && !defined(MEDIAINFO_GXF_YES)
- #define MEDIAINFO_GXF_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_HDSF4M_NO) && !defined(MEDIAINFO_HDSF4M_YES)
- #define MEDIAINFO_HDSF4M_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_HLS_NO) && !defined(MEDIAINFO_HLS_YES)
- #define MEDIAINFO_HLS_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_ISM_NO) && !defined(MEDIAINFO_ISM_YES)
- #define MEDIAINFO_ISM_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_IVF_NO) && !defined(MEDIAINFO_IVF_YES)
- #define MEDIAINFO_IVF_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_IBI_NO) && !defined(MEDIAINFO_IBI_YES)
- #define MEDIAINFO_IBI_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_LXF_NO) && !defined(MEDIAINFO_LXF_YES)
- #define MEDIAINFO_LXF_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_MK_NO) && !defined(MEDIAINFO_MK_YES)
- #define MEDIAINFO_MK_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_MPEG4_NO) && !defined(MEDIAINFO_MPEG4_YES)
- #define MEDIAINFO_MPEG4_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_MPEGPS_NO) && !defined(MEDIAINFO_MPEGPS_YES)
- #define MEDIAINFO_MPEGPS_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_MPEGTS_NO) && !defined(MEDIAINFO_MPEGTS_YES)
- #define MEDIAINFO_MPEGTS_YES
-#endif
-#if defined(MEDIAINFO_MPEGTS_YES) && !defined(MEDIAINFO_MPEGTS_PCR_NO) && !defined(MEDIAINFO_MPEGTS_PCR_YES)
- #define MEDIAINFO_MPEGTS_PCR_YES
-#endif
-#if defined(MEDIAINFO_MPEGTS_YES) && !defined(MEDIAINFO_MPEGTS_PESTIMESTAMP_NO) && !defined(MEDIAINFO_MPEGTS_PESTIMESTAMP_YES)
- #define MEDIAINFO_MPEGTS_PESTIMESTAMP_YES
-#endif
-#if defined(MEDIAINFO_MPEGTS_YES) && !defined(MEDIAINFO_MPEGTS_DUPLICATE_NO) && !defined(MEDIAINFO_MPEGTS_DUPLICATE_YES)
- #define MEDIAINFO_MPEGTS_DUPLICATE_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_MXF_NO) && !defined(MEDIAINFO_MXF_YES)
- #define MEDIAINFO_MXF_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_NUT_NO) && !defined(MEDIAINFO_NUT_YES)
- #define MEDIAINFO_NUT_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_OGG_NO) && !defined(MEDIAINFO_OGG_YES)
- #define MEDIAINFO_OGG_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_P2_NO) && !defined(MEDIAINFO_P2_YES)
- #define MEDIAINFO_P2_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_PMP_NO) && !defined(MEDIAINFO_PMP_YES)
- #define MEDIAINFO_PMP_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_PTX_NO) && !defined(MEDIAINFO_PTX_YES)
- #define MEDIAINFO_PTX_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_RIFF_NO) && !defined(MEDIAINFO_RIFF_YES)
- #define MEDIAINFO_RIFF_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_RM_NO) && !defined(MEDIAINFO_RM_YES)
- #define MEDIAINFO_RM_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_SEQUENCEINFO_NO) && !defined(MEDIAINFO_SEQUENCEINFO_YES)
- #define MEDIAINFO_SEQUENCEINFO_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_SKM_NO) && !defined(MEDIAINFO_SKM_YES)
- #define MEDIAINFO_SKM_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_SWF_NO) && !defined(MEDIAINFO_SWF_YES)
- #define MEDIAINFO_SWF_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_TSP_NO) && !defined(MEDIAINFO_TSP_YES)
- #define MEDIAINFO_TSP_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_UMF_NO) && !defined(MEDIAINFO_UMF_YES)
- #define MEDIAINFO_UMF_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_WM_NO) && !defined(MEDIAINFO_WM_YES)
- #define MEDIAINFO_WM_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_XDCAM_NO) && !defined(MEDIAINFO_XDCAM_YES)
- #define MEDIAINFO_XDCAM_YES
-#endif
-#if !defined(MEDIAINFO_MULTI_NO) && !defined(MEDIAINFO_DPG_NO) && !defined(MEDIAINFO_DPG_YES)
- #define MEDIAINFO_DPG_YES
-#endif
-
-//---------------------------------------------------------------------------
-// Video
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_AIC_NO) && !defined(MEDIAINFO_AIC_YES)
- #define MEDIAINFO_AIC_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_AFDBARDATA_NO) && !defined(MEDIAINFO_AFDBARDATA_YES)
- #define MEDIAINFO_AFDBARDATA_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_AVC_NO) && !defined(MEDIAINFO_AVC_YES)
- #define MEDIAINFO_AVC_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_AVSV_NO) && !defined(MEDIAINFO_AVSV_YES)
- #define MEDIAINFO_AVSV_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_CANOPUS_NO) && !defined(MEDIAINFO_CANOPUS_YES)
- #define MEDIAINFO_CANOPUS_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_DIRAC_NO) && !defined(MEDIAINFO_DIRAC_YES)
- #define MEDIAINFO_DIRAC_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_FFV1_NO) && !defined(MEDIAINFO_FFV1_YES)
- #define MEDIAINFO_FFV1_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_FLIC_NO) && !defined(MEDIAINFO_FLIC_YES)
- #define MEDIAINFO_FLIC_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_FRAPS_NO) && !defined(MEDIAINFO_FRAPS_YES)
- #define MEDIAINFO_FRAPS_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_H263_NO) && !defined(MEDIAINFO_H263_YES)
- #define MEDIAINFO_H263_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_HEVC_NO) && !defined(MEDIAINFO_HEVC_YES)
- #define MEDIAINFO_HEVC_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_HUFFYUV_NO) && !defined(MEDIAINFO_HUFFYUV_YES)
- #define MEDIAINFO_HUFFYUV_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_LAGARITH_NO) && !defined(MEDIAINFO_LAGARITH_YES)
- #define MEDIAINFO_LAGARITH_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_MPEG4V_NO) && !defined(MEDIAINFO_MPEG4V_YES)
- #define MEDIAINFO_MPEG4V_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_MPEGV_NO) && !defined(MEDIAINFO_MPEGV_YES)
- #define MEDIAINFO_MPEGV_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_PRORES_NO) && !defined(MEDIAINFO_PRORES_YES)
- #define MEDIAINFO_PRORES_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_VC1_NO) && !defined(MEDIAINFO_VC1_YES)
- #define MEDIAINFO_VC1_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_VC3_NO) && !defined(MEDIAINFO_VC3_YES)
- #define MEDIAINFO_VC3_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_TIMECODE_NO) && !defined(MEDIAINFO_TIMECODE_YES)
- #define MEDIAINFO_TIMECODE_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_THEORA_NO) && !defined(MEDIAINFO_THEORA_YES)
- #define MEDIAINFO_THEORA_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_VP8_NO) && !defined(MEDIAINFO_VP8_YES)
- #define MEDIAINFO_VP8_YES
-#endif
-#if !defined(MEDIAINFO_VIDEO_NO) && !defined(MEDIAINFO_Y4M_NO) && !defined(MEDIAINFO_Y4M_YES)
- #define MEDIAINFO_Y4M_YES
-#endif
-
-//---------------------------------------------------------------------------
-// Audio
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_AAC_NO) && !defined(MEDIAINFO_AAC_YES)
- #define MEDIAINFO_AAC_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_AC3_NO) && !defined(MEDIAINFO_AC3_YES)
- #define MEDIAINFO_AC3_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_ADPCM_NO) && !defined(MEDIAINFO_ADPCM_YES)
- #define MEDIAINFO_ADPCM_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_ALS_NO) && !defined(MEDIAINFO_ALS_YES)
- #define MEDIAINFO_ALS_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_LATM_NO) && !defined(MEDIAINFO_LATM_YES)
- #define MEDIAINFO_LATM_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_AMR_NO) && !defined(MEDIAINFO_AMR_YES)
- #define MEDIAINFO_AMR_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_AMV_NO) && !defined(MEDIAINFO_AMV_YES)
- #define MEDIAINFO_AMV_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_APE_NO) && !defined(MEDIAINFO_APE_YES)
- #define MEDIAINFO_APE_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_AU_NO) && !defined(MEDIAINFO_AU_YES)
- #define MEDIAINFO_AU_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_CAF_NO) && !defined(MEDIAINFO_CAF_YES)
- #define MEDIAINFO_CAF_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_CELT_NO) && !defined(MEDIAINFO_CELT_YES)
- #define MEDIAINFO_CELT_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_DOLBYE_NO) && !defined(MEDIAINFO_DOLBYE_YES)
- #define MEDIAINFO_DOLBYE_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_DTS_NO) && !defined(MEDIAINFO_DTS_YES)
- #define MEDIAINFO_DTS_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_FLAC_NO) && !defined(MEDIAINFO_FLAC_YES)
- #define MEDIAINFO_FLAC_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_IT_NO) && !defined(MEDIAINFO_IT_YES)
- #define MEDIAINFO_IT_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_LA_NO) && !defined(MEDIAINFO_LA_YES)
- #define MEDIAINFO_LA_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_MIDO_NO) && !defined(MEDIAINFO_MIDO_YES)
- #define MEDIAINFO_MIDI_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_MOD_NO) && !defined(MEDIAINFO_MOD_YES)
- #define MEDIAINFO_MOD_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_MPC_NO) && !defined(MEDIAINFO_MPC_YES)
- #define MEDIAINFO_MPC_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_MPCSV8_NO) && !defined(MEDIAINFO_MPCSV8_YES)
- #define MEDIAINFO_MPCSV8_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_MPEGA_NO) && !defined(MEDIAINFO_MPEGA_YES)
- #define MEDIAINFO_MPEGA_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_OPENMG_NO) && !defined(MEDIAINFO_OPENMG_YES)
- #define MEDIAINFO_OPENMG_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_OPUS_NO) && !defined(MEDIAINFO_OPUS_YES)
- #define MEDIAINFO_OPUS_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_PCM_NO) && !defined(MEDIAINFO_PCM_YES)
- #define MEDIAINFO_PCM_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_PCMM2TS_NO) && !defined(MEDIAINFO_PCMM2TS_YES)
- #define MEDIAINFO_PCMM2TS_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_PCMVOB_NO) && !defined(MEDIAINFO_PCMVOB_YES)
- #define MEDIAINFO_PCMVOB_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_PS2A_NO) && !defined(MEDIAINFO_PS2A_YES)
- #define MEDIAINFO_PS2A_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_RKAU_NO) && !defined(MEDIAINFO_RKAU_YES)
- #define MEDIAINFO_RKAU_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_S3M_NO) && !defined(MEDIAINFO_S3M_YES)
- #define MEDIAINFO_S3M_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_SPEEX_NO) && !defined(MEDIAINFO_SPEEX_YES)
- #define MEDIAINFO_SPEEX_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_SMPTEST0302_NO) && !defined(MEDIAINFO_SMPTEST0302_YES)
- #define MEDIAINFO_SMPTEST0302_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_SMPTEST0331_NO) && !defined(MEDIAINFO_SMPTEST0331_YES)
- #define MEDIAINFO_SMPTEST0331_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_SMPTEST0337_NO) && !defined(MEDIAINFO_SMPTEST0337_YES)
- #define MEDIAINFO_SMPTEST0337_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_TAK_NO) && !defined(MEDIAINFO_TAK_YES)
- #define MEDIAINFO_TAK_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_TTA_NO) && !defined(MEDIAINFO_TTA_YES)
- #define MEDIAINFO_TTA_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_TWINVQ_NO) && !defined(MEDIAINFO_TWINVQ_YES)
- #define MEDIAINFO_TWINVQ_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_VORBIS_NO) && !defined(MEDIAINFO_VORBIS_YES)
- #define MEDIAINFO_VORBIS_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_WVPK_NO) && !defined(MEDIAINFO_WVPK_YES)
- #define MEDIAINFO_WVPK_YES
-#endif
-#if !defined(MEDIAINFO_AUDIO_NO) && !defined(MEDIAINFO_XM_NO) && !defined(MEDIAINFO_XM_YES)
- #define MEDIAINFO_XM_YES
-#endif
-
-//---------------------------------------------------------------------------
-// Text
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_ARIBSTDB24B37_NO) && !defined(MEDIAINFO_ARIBSTDB24B37_YES)
- #define MEDIAINFO_ARIBSTDB24B37_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_CDP_NO) && !defined(MEDIAINFO_CDP_YES)
- #define MEDIAINFO_CDP_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_CMML_NO) && !defined(MEDIAINFO_CMML_YES)
- #define MEDIAINFO_CMML_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_DVBSUBTITLE_NO) && !defined(MEDIAINFO_DVBSUBTITLE_YES)
- #define MEDIAINFO_DVBSUBTITLE_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_DTVCCTRANSPORT_NO) && !defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- #define MEDIAINFO_DTVCCTRANSPORT_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_EIA608_NO) && !defined(MEDIAINFO_EIA608_YES)
- #define MEDIAINFO_EIA608_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_EIA708_NO) && !defined(MEDIAINFO_EIA708_YES)
- #define MEDIAINFO_EIA708_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_N19_NO) && !defined(MEDIAINFO_N19_YES)
- #define MEDIAINFO_N19_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_KATE_NO) && !defined(MEDIAINFO_KATE_YES)
- #define MEDIAINFO_KATE_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_PDF_NO) && !defined(MEDIAINFO_PDF_YES)
- #define MEDIAINFO_PDF_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_PGS_NO) && !defined(MEDIAINFO_PGS_YES)
- #define MEDIAINFO_PGS_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_SCC_NO) && !defined(MEDIAINFO_SCC_YES)
- #define MEDIAINFO_SCC_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_SCTE20_NO) && !defined(MEDIAINFO_SCTE20_YES)
- #define MEDIAINFO_SCTE20_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_SDP_NO) && !defined(MEDIAINFO_SDP_YES)
- #define MEDIAINFO_SDP_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_SUBRIP_NO) && !defined(MEDIAINFO_SUBRIP_YES)
- #define MEDIAINFO_SUBRIP_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_TELETEXT_NO) && !defined(MEDIAINFO_TELETEXT_YES)
- #define MEDIAINFO_TELETEXT_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_TIMEDTEXT_NO) && !defined(MEDIAINFO_TIMEDTEXT_YES)
- #define MEDIAINFO_TIMEDTEXT_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_TTML_NO) && !defined(MEDIAINFO_TTML_YES)
- #define MEDIAINFO_TTML_YES
-#endif
-#if !defined(MEDIAINFO_TEXT_NO) && !defined(MEDIAINFO_OTHERTEXT_NO) && !defined(MEDIAINFO_OTHERTEXT_YES)
- #define MEDIAINFO_OTHERTEXT_YES
-#endif
-
-//---------------------------------------------------------------------------
-// Image
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_ARRIRAW_NO) && !defined(MEDIAINFO_ARRIRAW_YES)
- #define MEDIAINFO_ARRIRAW_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_BMP_NO) && !defined(MEDIAINFO_BMP_YES)
- #define MEDIAINFO_BMP_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_BPG_NO) && !defined(MEDIAINFO_BPG_YES)
- #define MEDIAINFO_BPG_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_DDS_NO) && !defined(MEDIAINFO_DDS_YES)
- #define MEDIAINFO_DDS_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_DPX_NO) && !defined(MEDIAINFO_DPX_YES)
- #define MEDIAINFO_DPX_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_EXR_NO) && !defined(MEDIAINFO_EXR_YES)
- #define MEDIAINFO_EXR_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_GIF_NO) && !defined(MEDIAINFO_GIF_YES)
- #define MEDIAINFO_GIF_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_ICO_NO) && !defined(MEDIAINFO_ICO_YES)
- #define MEDIAINFO_ICO_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_JPEG_NO) && !defined(MEDIAINFO_JPEG_YES)
- #define MEDIAINFO_JPEG_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_PCX_NO) && !defined(MEDIAINFO_PCX_YES)
- #define MEDIAINFO_PCX_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_PNG_NO) && !defined(MEDIAINFO_PNG_YES)
- #define MEDIAINFO_PNG_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_PSD_NO) && !defined(MEDIAINFO_PSD_YES)
- #define MEDIAINFO_PSD_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_RLE_NO) && !defined(MEDIAINFO_RLE_YES)
- #define MEDIAINFO_RLE_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_TIFF_NO) && !defined(MEDIAINFO_TIFF_YES)
- #define MEDIAINFO_TIFF_YES
-#endif
-#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_TGA_NO) && !defined(MEDIAINFO_TGA_YES)
- #define MEDIAINFO_TGA_YES
-#endif
-
-//---------------------------------------------------------------------------
-// Archive
-#if !defined(MEDIAINFO_ARCHIVE_NO) && !defined(MEDIAINFO_7Z_NO) && !defined(MEDIAINFO_7Z_YES)
- #define MEDIAINFO_7Z_YES
-#endif
-#if !defined(MEDIAINFO_ARCHIVE_NO) && !defined(MEDIAINFO_ACE_NO) && !defined(MEDIAINFO_ACE_YES)
- #define MEDIAINFO_ACE_YES
-#endif
-#if !defined(MEDIAINFO_ARCHIVE_NO) && !defined(MEDIAINFO_BZIP2_NO) && !defined(MEDIAINFO_BZIP2_YES)
- #define MEDIAINFO_BZIP2_YES
-#endif
-#if !defined(MEDIAINFO_ARCHIVE_NO) && !defined(MEDIAINFO_ELF_NO) && !defined(MEDIAINFO_ELF_YES)
- #define MEDIAINFO_ELF_YES
-#endif
-#if !defined(MEDIAINFO_ARCHIVE_NO) && !defined(MEDIAINFO_GZIP_NO) && !defined(MEDIAINFO_GZIP_YES)
- #define MEDIAINFO_GZIP_YES
-#endif
-#if !defined(MEDIAINFO_ARCHIVE_NO) && !defined(MEDIAINFO_ISO9660_NO) && !defined(MEDIAINFO_ISO9660_YES)
- #define MEDIAINFO_ISO9660_YES
-#endif
-#if !defined(MEDIAINFO_ARCHIVE_NO) && !defined(MEDIAINFO_MZ_NO) && !defined(MEDIAINFO_MZ_YES)
- #define MEDIAINFO_MZ_YES
-#endif
-#if !defined(MEDIAINFO_ARCHIVE_NO) && !defined(MEDIAINFO_RAR_NO) && !defined(MEDIAINFO_RAR_YES)
- #define MEDIAINFO_RAR_YES
-#endif
-#if !defined(MEDIAINFO_ARCHIVE_NO) && !defined(MEDIAINFO_TAR_NO) && !defined(MEDIAINFO_TAR_YES)
- #define MEDIAINFO_TAR_YES
-#endif
-#if !defined(MEDIAINFO_ARCHIVE_NO) && !defined(MEDIAINFO_ZIP_NO) && !defined(MEDIAINFO_ZIP_YES)
- #define MEDIAINFO_ZIP_YES
-#endif
-
-//---------------------------------------------------------------------------
-// Tag
-#if !defined(MEDIAINFO_TAG_NO) && !defined(MEDIAINFO_TAG_NO) && !defined(MEDIAINFO_TAG_YES)
- #define MEDIAINFO_TAG_YES
-#endif
-#if !defined(MEDIAINFO_TAG_NO) && !defined(MEDIAINFO_APETAG_NO) && !defined(MEDIAINFO_APETAG_YES)
- #define MEDIAINFO_APETAG_YES
-#endif
-#if !defined(MEDIAINFO_TAG_NO) && !defined(MEDIAINFO_ID3_NO) && !defined(MEDIAINFO_ID3_YES)
- #define MEDIAINFO_ID3_YES
-#endif
-#if !defined(MEDIAINFO_TAG_NO) && !defined(MEDIAINFO_ID3V2_NO) && !defined(MEDIAINFO_ID3V2_YES)
- #define MEDIAINFO_ID3V2_YES
-#endif
-#if !defined(MEDIAINFO_TAG_NO) && !defined(MEDIAINFO_LYRICS3_NO) && !defined(MEDIAINFO_LYRICS3_YES)
- #define MEDIAINFO_LYRICS3_YES
-#endif
-#if !defined(MEDIAINFO_TAG_NO) && !defined(MEDIAINFO_LYRICS3V2_NO) && !defined(MEDIAINFO_LYRICS3V2_YES)
- #define MEDIAINFO_LYRICS3V2_YES
-#endif
-#if !defined(MEDIAINFO_TAG_NO) && !defined(MEDIAINFO_PROPERTYLIST_NO) && !defined(MEDIAINFO_PROPERTYLIST_YES)
- #define MEDIAINFO_PROPERTYLIST_YES
-#endif
-#if !defined(MEDIAINFO_TAG_NO) && !defined(MEDIAINFO_VORBISCOM_NO) && !defined(MEDIAINFO_VORBISCOM_YES)
- #define MEDIAINFO_VORBISCOM_YES
-#endif
-
-//---------------------------------------------------------------------------
-// Other
-#if !defined(MEDIAINFO_DUMMY_NO)
- //#define MEDIAINFO_DUMMY_YES
-#endif
-#if !defined(MEDIAINFO_OTHER_NO)
- #define MEDIAINFO_OTHER_YES
-#endif
-#if !defined(MEDIAINFO_UNKNOWN_NO)
- #define MEDIAINFO_UNKNOWN_YES
-#endif
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_ApeTag.cpp b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_ApeTag.cpp
deleted file mode 100644
index 97b49e906..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_ApeTag.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_APETAG_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File_ApeTag.h"
-#include <algorithm>
-#include <ctime>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_ApeTag::FileHeader_Parse()
-{
- //Parsing
- int64u Signature;
- Peek_B8(Signature);
- if (Signature==0x4150455441474558LL) //"APETAGEX"
- HeaderFooter(); //v2
-
- FILLING_BEGIN();
- Accept("ApeTag");
-
- Stream_Prepare(Stream_General);
-
- Stream_Prepare(Stream_Audio);
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_ApeTag::Header_Begin()
-{
- if (Buffer_Size<0x20)
- return false; //At least 32 bytes are needed for footer
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_ApeTag::Header_Parse()
-{
- //Testing if begin or end of tags
- if (CC8(Buffer+Buffer_Offset)==0x4150455441474558LL) //"APETAGEX"
- {
- //Filling
- Header_Fill_Code((int64u)-1, "File Footer");
- Header_Fill_Size(0x20);
- return;
- }
-
- //Parsing
- Ztring Value;
- int32u Flags, Length;
- Get_L4 (Length, "Length");
- Get_L4 (Flags, "Flags");
- Skip_Flags(Flags, 0, "Read Only");
- Skip_Flags(Flags, 1, "Binary");
- Skip_Flags(Flags, 2, "Locator of external stored information");
- Skip_Flags(Flags, 29, "Is the header");
- Skip_Flags(Flags, 30, "Contains a footer");
- Skip_Flags(Flags, 31, "Contains a header");
- size_t Pos=(size_t)Element_Offset;
- for (; Pos<Element_Size; Pos++)
- if (Buffer[Buffer_Offset+Pos]==0x00)
- break;
- if (Pos==Element_Size)
- {
- Element_WaitForMoreData();
- return;
- }
- Get_String(Pos-Element_Offset, Key, "Key");
- Skip_L1( "0x00");
-
- //Filling
- Header_Fill_Code(0, Key.c_str());
- Header_Fill_Size(Element_Offset+Length);
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_ApeTag::HeaderFooter()
-{
- //Parsing
- int32u Flags;
- Skip_C8( "Preamble");
- Skip_L4( "Version");
- Skip_L4( "Size");
- Skip_L4( "Count");
- Get_L4 (Flags, "Flags");
- Skip_Flags(Flags, 0, "Read Only");
- Skip_Flags(Flags, 1, "Binary");
- Skip_Flags(Flags, 2, "Locator of external stored information");
- Skip_Flags(Flags, 29, "Is the header");
- Skip_Flags(Flags, 30, "Contains a footer");
- Skip_Flags(Flags, 31, "Contains a header");
- Skip_L8( "Reserved");
-}
-
-//---------------------------------------------------------------------------
-void File_ApeTag::Data_Parse()
-{
- //If footer
- if (Element_Code==(int64u)-1)
- {
- HeaderFooter();
- Finish("ApeTag");
- return;
- }
-
- //Parsing
- Ztring Value;
- Get_UTF8(Element_Size, Value, "Value"); Element_Info1(Value);
-
- //Filling
- transform(Key.begin(), Key.end(), Key.begin(), (int(*)(int))toupper); //(int(*)(int)) is a patch for unix
- if (Key=="ALBUM") Fill(Stream_General, 0, General_Album, Value);
- else if (Key=="ARTIST") Fill(Stream_General, 0, General_Performer, Value);
- else if (Key=="AUTHOR") Fill(Stream_General, 0, General_WrittenBy, Value);
- else if (Key=="BAND") Fill(Stream_General, 0, General_Performer, Value);
- else if (Key=="COMMENT") Fill(Stream_General, 0, General_Comment, Value);
- else if (Key=="COMMENTS") Fill(Stream_General, 0, General_Comment, Value);
- else if (Key=="COMPOSER") Fill(Stream_General, 0, General_Composer, Value);
- else if (Key=="CONTENTGROUP") Fill(Stream_General, 0, General_Genre, Value);
- else if (Key=="COPYRIGHT") Fill(Stream_General, 0, General_Copyright, Value);
- else if (Key=="DISK")
- {
- if (Value.find(__T("/"))!=Error)
- {
- Fill(Stream_General, 0, General_Part_Position_Total, Value.SubString(__T("/"), __T("")));
- Fill(Stream_General, 0, General_Part_Position, Value.SubString(__T(""), __T("/")));
- }
- else
- Fill(Stream_General, 0, General_Track_Position, Value);
- }
- else if (Key=="ENCODEDBY") Fill(Stream_General, 0, General_EncodedBy, Value);
- else if (Key=="GENRE") Fill(Stream_General, 0, General_Genre, Value);
- else if (Key=="ORIGARTIST") Fill(Stream_General, 0, General_Original_Performer, Value);
- else if (Key=="TITLE") Fill(Stream_General, 0, General_Title, Value);
- else if (Key=="TRACK")
- {
- if (Value.find(__T("/"))!=Error)
- {
- Fill(Stream_General, 0, General_Track_Position_Total, Value.SubString(__T("/"), __T("")));
- Fill(Stream_General, 0, General_Track_Position, Value.SubString(__T(""), __T("/")));
- }
- else
- Fill(Stream_General, 0, General_Track_Position, Value);
- }
- else if (Key=="UNSYNCEDLYRICS") Fill(Stream_General, 0, General_Lyrics, Value);
- else if (Key=="WWW") Fill(Stream_General, 0, General_Title_Url, Value);
- else if (Key=="YEAR") Fill(Stream_General, 0, General_Recorded_Date, Value);
- else if (Key=="CONTENT GROUP DESCRIPTION") Fill(Stream_General, 0, General_Title, Value);
- else if (Key=="ORIGINAL ALBUM/MOVIE/SHOW TITLE") Fill(Stream_General, 0, General_Original_Album, Value);
- else if (Key=="ORIGINAL ARTIST(S)/PERFORMER(S)") Fill(Stream_General, 0, General_Original_Performer, Value);
- else if (Key=="MP3GAIN_MINMAX") Fill(Stream_Audio, 0, "MP3Gain, Min/Max", Value);
- else if (Key=="MP3GAIN_UNDO") Fill(Stream_Audio, 0, "MP3Gain, Undo", Value);
- else if (Key=="REPLAYGAIN_TRACK_GAIN") Fill(Stream_Audio, 0, Audio_ReplayGain_Gain, Value.To_float64(), 2, true);
- else if (Key=="REPLAYGAIN_TRACK_PEAK") Fill(Stream_Audio, 0, Audio_ReplayGain_Peak, Value.To_float64(), 6, true);
- else Fill(Stream_General, 0, Key.c_str(), Value);
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_APETAG_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_ApeTag.h b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_ApeTag.h
deleted file mode 100644
index a8b030472..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_ApeTag.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about APETAG tagged files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_ApeTagH
-#define MediaInfo_File_ApeTagH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_ApeTag
-//***************************************************************************
-
-class File_ApeTag : public File__Analyze
-{
-private :
- //Buffer - File header
- void FileHeader_Parse();
-
- //Buffer - Per element
- bool Header_Begin();
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void HeaderFooter();
-
- //Temp
- std::string Key;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3.cpp b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3.cpp
deleted file mode 100644
index 5e0e98161..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_ID3_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File_Id3.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Id3::Read_Buffer_Continue()
-{
- //Buffer size
- if (Buffer_Size<128)
- return;
-
- int32u Magic;
- Peek_B4(Magic);
- Ztring TitleAddition;
- Ztring ArtistAddition;
- Ztring AlbumAddition;
- Ztring GenreAddition;
- if (Magic==0x5441472B)
- {
- if (Buffer_Size<227+128)
- return;
-
- Skip_C4 ( "ID");
- Get_Local (60, TitleAddition, "Title");
- Get_Local (60, ArtistAddition, "Artist");
- Get_Local (60, AlbumAddition, "Album");
- Skip_B1 ( "Speed");
- Get_Local (30, GenreAddition, "Genre");
- Skip_Local(6, "Start time"); //mmm:ss
- Skip_Local(6, "End time"); //mmm:ss
-
- TitleAddition.TrimRight();
- ArtistAddition.TrimRight();
- AlbumAddition.TrimRight();
- GenreAddition.TrimRight();
- }
-
- //Parsing
- Ztring Title, Artist, Album, Year, Comment;
- int8u Track=0, Genre;
- Skip_C3 ( "ID");
- Get_Local (30, Title, "Title");
- Get_Local (30, Artist, "Artist");
- Get_Local (30, Album, "Album");
- Get_Local ( 4, Year, "Year");
- Get_Local (30, Comment, "Comment");
- if (Comment.size()<29) //Id3v1.1 specifications : Track number addition
- {
- Element_Offset-=2;
- int8u Zero;
- Peek_B1(Zero);
- if (Zero==0)
- {
- Skip_B1( "Zero");
- Get_B1 (Track, "Track");
- }
- else
- Element_Offset+=2;
- }
- Get_B1 (Genre, "Genre");
-
- FILLING_BEGIN();
- if (TitleAddition.empty())
- Title.TrimRight();
- if (ArtistAddition.empty())
- Artist.TrimRight();
- if (AlbumAddition.empty())
- Album.TrimRight();
- Year.TrimRight();
- Comment.TrimRight();
-
- Accept("Id3");
-
- Stream_Prepare(Stream_General);
- Fill(Stream_General, 0, General_Album, Album+AlbumAddition);
- Fill(Stream_General, 0, General_Track, Title+TitleAddition);
- Fill(Stream_General, 0, General_Performer, Artist+ArtistAddition);
- if (Comment.find(__T("ExactAudioCopy"))==0)
- Fill(Stream_General, 0, General_Encoded_Application, Comment);
- else
- Fill(Stream_General, 0, General_Comment, Comment);
- Fill(Stream_General, 0, General_Recorded_Date, Year);
- if (GenreAddition.empty())
- Fill(Stream_General, 0, General_Genre, GenreAddition);
- if (Genre && Genre!=(int8u)-1)
- Fill(Stream_General, 0, General_Genre, Genre);
- if (Track)
- Fill(Stream_General, 0, General_Track_Position, Track);
-
- Finish("Id3");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_ID3_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3.h b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3.h
deleted file mode 100644
index 093b65d68..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about ID3 tagged files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Id3H
-#define MediaInfo_File_Id3H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Id3
-//***************************************************************************
-
-class File_Id3 : public File__Analyze
-{
-private :
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3v2.cpp b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3v2.cpp
deleted file mode 100644
index 0af6ccbf7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3v2.cpp
+++ /dev/null
@@ -1,1416 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos (Common)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_ID3V2_YES) || defined(MEDIAINFO_FLAC_YES) || defined(MEDIAINFO_VORBISCOM_YES) || defined(MEDIAINFO_OGG_YES)
-//---------------------------------------------------------------------------
-
-#include "ZenLib/Conf.h"
-using namespace ZenLib;
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-extern const char* Id3v2_PictureType(int8u Type)
-{
- switch (Type)
- {
- case 0x01 :
- case 0x02 : return "File icon";
- case 0x03 : return "Cover (front)";
- case 0x04 : return "Cover (back)";
- case 0x05 : return "Leaflet page";
- case 0x06 : return "Media";
- case 0x07 :
- case 0x08 : return "Performer";
- case 0x09 : return "Conductor";
- case 0x0A : return "Performer";
- case 0x0B : return "Composer";
- case 0x0C : return "Lyricist";
- case 0x0D : return "Recording Location";
- case 0x0E : return "During recording";
- case 0x0F : return "During performance";
- case 0x10 : return "Screen capture";
- case 0x12 : return "Illustration";
- case 0x13 : return "Performer logo";
- case 0x14 : return "Publisher logo";
- default : return "";
- }
-}
-
-} //NameSpace
-
-//---------------------------------------------------------------------------
-#endif //...
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-//
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_ID3V2_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File_Id3v2.h"
-#include "ZenLib/ZtringListList.h"
-#include "ZenLib/Utils.h"
-#include "base64.h"
-#include <cstring>
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Id3v2_TextEnc[]=
-{
- "ISO 8859-1",
- "UTF-16",
- "UTF-16BE",
- "UTF-8",
-};
-
-//---------------------------------------------------------------------------
-const char* Id3v2_RGAD_Name_code[]=
-{
- "",
- "Radio Gain Adjustment",
- "Audiophile Gain Adjustment",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Id3v2_RGAD_Originator_code[]=
-{
- "",
- "Pre-set by artist/producer/mastering engineer",
- "Set by user",
- "Determined automatically",
- "",
- "",
- "",
- "",
-};
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-namespace Elements
-{
- const int32u AENC=0x41454E47;
- const int32u APIC=0x41504943;
- const int32u ASPI=0x41535049;
- const int32u COMM=0x434F4D4D;
- const int32u COMR=0x434F4D52;
- const int32u ENCR=0x454E4352;
- const int32u EQU2=0x45515532;
- const int32u EQUA=0x45515541;
- const int32u ETCO=0x4554434F;
- const int32u GEOB=0x47454F42;
- const int32u GRID=0x47524944;
- const int32u IPLS=0x49504C53;
- const int32u LINK=0x4C494E4B;
- const int32u MCDI=0x4D434449;
- const int32u MLLT=0x4D4C4C54;
- const int32u OWNE=0x4F574E45;
- const int32u PCNT=0x50434E58;
- const int32u POPM=0x504F504D;
- const int32u POSS=0x504F5353;
- const int32u PRIV=0x50524956;
- const int32u RBUF=0x52425546;
- const int32u RGAD=0x52474144;
- const int32u RVA2=0x52564132;
- const int32u RVRB=0x52565242;
- const int32u SEEK=0x5345454B;
- const int32u SIGN=0x5349474E;
- const int32u SYLT=0x53594C54;
- const int32u SYTC=0x53595443;
- const int32u TALB=0x54414C42;
- const int32u TBPM=0x5442504D;
- const int32u TCMP=0x54434D50;
- const int32u TCOM=0x54434F4D;
- const int32u TCON=0x54434F4E;
- const int32u TCOP=0x54434F50;
- const int32u TDAT=0x54444154;
- const int32u TDEN=0x5444454E;
- const int32u TDLY=0x54444C59;
- const int32u TDOR=0x54444F52;
- const int32u TDRC=0x54445243;
- const int32u TDRL=0x5444524C;
- const int32u TDTG=0x54445447;
- const int32u TENC=0x54454E43;
- const int32u TEXT=0x54455854;
- const int32u TFLT=0x54464C54;
- const int32u TIME=0x54494D45;
- const int32u TIPL=0x5449504C;
- const int32u TIT1=0x54495431;
- const int32u TIT2=0x54495432;
- const int32u TIT3=0x54495433;
- const int32u TKEY=0x544B4559;
- const int32u TLAN=0x544C414E;
- const int32u TLEN=0x544C454E;
- const int32u TMCL=0x544D434C;
- const int32u TMED=0x544D4544;
- const int32u TMOO=0x544D4F4F;
- const int32u TOAL=0x544F414C;
- const int32u TOFN=0x544F464E;
- const int32u TOLY=0x544F4C59;
- const int32u TOPE=0x544F5045;
- const int32u TORY=0x544F5259;
- const int32u TOWN=0x544F574E;
- const int32u TPE1=0x54504531;
- const int32u TPE2=0x54504532;
- const int32u TPE3=0x54504533;
- const int32u TPE4=0x54504534;
- const int32u TPOS=0x54504F53;
- const int32u TPRO=0x5450524F;
- const int32u TPUB=0x54505542;
- const int32u TRCK=0x5452434B;
- const int32u TRDA=0x54524441;
- const int32u TRSN=0x5452534E;
- const int32u TRSO=0x5452534F;
- const int32u TSIZ=0x5453495A;
- const int32u TSO2=0x54534F32;
- const int32u TSOA=0x54534F41;
- const int32u TSOC=0x54534F43;
- const int32u TSOP=0x54534F50;
- const int32u TSOT=0x54534F54;
- const int32u TSRC=0x54535243;
- const int32u TSSE=0x54535345;
- const int32u TSST=0x54535354;
- const int32u TXXX=0x54585858;
- const int32u TYER=0x54594552;
- const int32u UFID=0x55464944;
- const int32u USER=0x55534552;
- const int32u USLT=0x55534C54;
- const int32u WCOM=0x57434F4D;
- const int32u WCOP=0x57434F50;
- const int32u WOAF=0x574F4146;
- const int32u WOAR=0x574F4152;
- const int32u WOAS=0x574F4153;
- const int32u WORS=0x574F5253;
- const int32u WPAY=0x57504159;
- const int32u WPUB=0x57505542;
- const int32u WXXX=0x57585858;
- const int32u XRVA=0x58525641;
- const int32u BUF=0x425546;
- const int32u CNT=0x434E56;
- const int32u COM=0x434F4D;
- const int32u CRA=0x435241;
- const int32u CRM=0x43524D;
- const int32u EQU=0x455155;
- const int32u ETC=0x455443;
- const int32u GEO=0x47454F;
- const int32u IPL=0x49504C;
- const int32u LNK=0x4C4E4B;
- const int32u MCI=0x4D4349;
- const int32u MLL=0x4D4C4C;
- const int32u PIC_=0x504943; //PIC is used by shared libs in GCC
- const int32u POP=0x504F50;
- const int32u REV=0x524556;
- const int32u RVA=0x525641;
- const int32u SLT=0x534C54;
- const int32u STC=0x535443;
- const int32u TAL=0x54414C;
- const int32u TBP=0x544250;
- const int32u TCM=0x54434D;
- const int32u TCO=0x54434F;
- const int32u TCP=0x544350;
- const int32u TCR=0x544352;
- const int32u TDA=0x544441;
- const int32u TDY=0x544459;
- const int32u TEN=0x54454E;
- const int32u TFT=0x544654;
- const int32u TIM=0x54494D;
- const int32u TKE=0x544B45;
- const int32u TLA=0x544C41;
- const int32u TLE=0x544C45;
- const int32u TMT=0x544D54;
- const int32u TOA=0x544F41;
- const int32u TOF=0x544F46;
- const int32u TOL=0x544F4C;
- const int32u TOR=0x544F52;
- const int32u TOT=0x544F54;
- const int32u TP1=0x545031;
- const int32u TP2=0x545032;
- const int32u TP3=0x545033;
- const int32u TP4=0x545034;
- const int32u TPA=0x545041;
- const int32u TPB=0x545042;
- const int32u TRC=0x545243;
- const int32u TRD=0x545244;
- const int32u TRK=0x54524B;
- const int32u TSI=0x545349;
- const int32u TSS=0x545353;
- const int32u TT1=0x545431;
- const int32u TT2=0x545432;
- const int32u TT3=0x545433;
- const int32u TXT=0x545854;
- const int32u TXX=0x545858;
- const int32u TYE=0x545945;
- const int32u UFI=0x554649;
- const int32u ULT=0x554C54;
- const int32u WAF=0x574146;
- const int32u WAR=0x574152;
- const int32u WAS=0x574153;
- const int32u WCM=0x57434D;
- const int32u WCP=0x574350;
- const int32u WPB=0x575042;
- const int32u WXX=0x575858;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Id3v2::File_Id3v2()
-:File__Analyze()
-{
- //Temp
- Id3v2_Size=0;
-}
-
-//***************************************************************************
-// Static stuff
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Id3v2::Static_Synchronize_Tags(const int8u* Buffer, size_t Buffer_Offset, size_t Buffer_Size, bool &Tag_Found)
-{
- //Buffer size
- if (Buffer_Offset+3>Buffer_Size)
- return false;
-
- //ID
- if ((Buffer[Buffer_Offset ]==0x49 // "ID3"
- && Buffer[Buffer_Offset+1]==0x44
- && Buffer[Buffer_Offset+2]==0x33)
- || (Buffer[Buffer_Offset ]==0x65 // "ea3", found in OpenMG
- && Buffer[Buffer_Offset+1]==0x61
- && Buffer[Buffer_Offset+2]==0x33))
- Tag_Found=true;
- else
- Tag_Found=false;
-
- //Continue
- return true;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Id3v2::Streams_Fill()
-{
- if (Count_Get(Stream_General)==0)
- return;
-
- //Specific formats (multiple Id3v2 tags for one MI tag)
- if (Retrieve(Stream_General, 0, General_Recorded_Date).empty() && !Year.empty())
- {
- Ztring Recorded_Date=Year;
- if (!Month.empty())
- {
- Recorded_Date+=__T('-');
- Recorded_Date+=Month;
- if (!Day.empty())
- {
- Recorded_Date+=__T('-');
- Recorded_Date+=Day;
- if (!Hour.empty())
- {
- Recorded_Date+=__T(' ');
- Recorded_Date+=Hour;
- if (!Minute.empty())
- {
- Recorded_Date+=__T(':');
- Recorded_Date+=Minute;
- }
- }
- }
- }
- Fill(Stream_General, 0, General_Recorded_Date, Recorded_Date);
- }
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Id3v2::FileHeader_Parse()
-{
- //Parsing
- int32u Size;
- int8u Flags;
- bool ExtendedHeader;
- Skip_C3( "identifier");
- Get_B1 (Id3v2_Version, "version_major");
- Skip_B1( "version_revision");
- Get_B1 (Flags, "flags");
- Get_Flags (Flags, 7, Unsynchronisation_Global, "Unsynchronisation");
- Get_Flags (Flags, 6, ExtendedHeader, "Extended header");
- Skip_Flags(Flags, 5, "Experimental indicator");
- Get_B4 (Size, "Size");
- Id3v2_Size=((Size>>0)&0x7F)
- | ((Size>>1)&0x3F80)
- | ((Size>>2)&0x1FC000)
- | ((Size>>3)&0x0FE00000);
- Param_Info1(Id3v2_Size);
- if (ExtendedHeader)
- {
- Element_Begin1("Extended header");
- int32u Size_Extended;
- Get_B4 (Size_Extended, "Size");
- Skip_XX(Size_Extended, "Extended header");
- Element_End0();
- }
-
- FILLING_BEGIN();
- //Versions
- switch (Id3v2_Version)
- {
- case 2 : break;
- case 3 : break;
- case 4 : break;
- default :
- Skip_XX(Id3v2_Size, "Data");
- return;
- }
-
- Accept("Id3v2");
- Stream_Prepare(Stream_General);
-
- Stream_Prepare(Stream_Audio);
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Id3v2::Header_Parse()
-{
- Unsynchronisation_Frame=false;
- DataLengthIndicator=false;
-
- if (Id3v2_Size<10) //first 10 is minimum size of a tag, Second 10 is ID3v2 header size
- {
- //Not enough place for a tag, must be padding
- Header_Fill_Code((int64u)-1, "Padding");
- Header_Fill_Size(Id3v2_Size);
- return;
- }
-
- if (Buffer_Offset+10>Buffer_Size)
- {
- Element_WaitForMoreData();
- return; //Not enough buffer
- }
-
- //Testing padding
- int32u Frame_ID, Size;
- Frame_ID=CC1(Buffer+Buffer_Offset);
- if (Frame_ID==0x00)
- {
- //This is the padding
- Header_Fill_Code(0xFFFFFFFF, "Padding");
- Header_Fill_Size(Id3v2_Size);
- return;
- }
-
- //Parsing
- if (Id3v2_Version==2)
- {
- Get_C3 (Frame_ID, "Frame ID");
- Get_B3 (Size, "Size");
- }
- else
- {
- int16u Flags;
- Get_C4 (Frame_ID, "Frame ID");
- if (!(Frame_ID&0xFF))
- Frame_ID>>=8;
- Get_B4 (Size, "Size");
- if (Id3v2_Version!=3)
- {
- Size=((Size>>0)&0x7F)
- | ((Size>>1)&0x3F80)
- | ((Size>>2)&0x1FC000)
- | ((Size>>3)&0x0FE00000);
- Param_Info2(Size, " bytes");
- }
- Get_B2 (Flags, "Flags");
- if (Id3v2_Version==3)
- {
- Skip_Flags(Flags, 15, "Tag alter preservation");
- Skip_Flags(Flags, 14, "File alter preservation");
- Skip_Flags(Flags, 13, "Read only");
- Skip_Flags(Flags, 7, "Compression");
- Skip_Flags(Flags, 6, "Encryption");
- Skip_Flags(Flags, 5, "Grouping identity");
- }
- if (Id3v2_Version==4)
- {
- Skip_Flags(Flags, 14, "Tag alter preservation");
- Skip_Flags(Flags, 13, "File alter preservation");
- Skip_Flags(Flags, 12, "Read only");
- Skip_Flags(Flags, 6, "Grouping identity");
- Skip_Flags(Flags, 3, "Compression");
- Skip_Flags(Flags, 2, "Encryption");
- Get_Flags (Flags, 1, Unsynchronisation_Frame, "Unsynchronisation");
- Get_Flags (Flags, 0, DataLengthIndicator, "Data length indicator");
- }
- }
-
- //Hanlding Unsynchronisation
- if (Unsynchronisation_Global || Unsynchronisation_Frame)
- {
- if (Buffer_Offset+(size_t)Element_Offset+Size>Buffer_Size)
- {
- Element_WaitForMoreData();
- return;
- }
- for (size_t Element_Offset_Unsynch=0; Element_Offset_Unsynch+2<Element_Offset+Size; Element_Offset_Unsynch++)
- if (CC2(Buffer+Buffer_Offset+Element_Offset_Unsynch)==0xFF00)
- {
- Size++;
- if (Buffer_Offset+(size_t)Element_Offset+Size>Buffer_Size)
- {
- Element_WaitForMoreData();
- return;
- }
- }
- }
-
- //Filling
- Ztring ToShow;
- if (Id3v2_Version==2)
- ToShow.From_CC3(Frame_ID);
- else
- ToShow.From_CC4(Frame_ID);
- Header_Fill_Code(Frame_ID, ToShow);
- Header_Fill_Size(Element_Offset+Size);
-}
-
-//---------------------------------------------------------------------------
-void File_Id3v2::Data_Parse()
-{
- Id3v2_Size-=Header_Size+Element_Size;
-
- int32u DataLength=(int32u)-1;
- if (DataLengthIndicator)
- {
- Get_B4 (DataLength, "Data length");
- DataLength=((DataLength>>0)&0x7F)
- | ((DataLength>>1)&0x3F80)
- | ((DataLength>>2)&0x1FC000)
- | ((DataLength>>3)&0x0FE00000);
- Param_Info2(DataLength, " bytes");
- }
-
- //Unsynchronisation
- int8u* Buffer_Unsynch=NULL;
- const int8u* Save_Buffer=Buffer;
- int64u Save_File_Offset=File_Offset;
- size_t Save_Buffer_Offset=Buffer_Offset;
- int64u Save_Element_Size=Element_Size;
- int64u Element_Offset_Unsynch=Element_Offset;
- std::vector<size_t> Unsynch_List;
- if (Unsynchronisation_Global || Unsynchronisation_Frame)
- {
- while (Element_Offset_Unsynch+2<Element_Size)
- {
- if (CC2(Buffer+Buffer_Offset+(size_t)Element_Offset_Unsynch)==0xFF00)
- Unsynch_List.push_back((size_t)(Element_Offset_Unsynch+1));
- Element_Offset_Unsynch++;
- }
- if (DataLength!=(int32u)-1 && 4+DataLength!=Element_Size-Unsynch_List.size())
- {
- Skip_XX(Element_Size-Element_Offset, "Size coherency issue");
- return;
- }
- if (!Unsynch_List.empty())
- {
- //We must change the buffer for keeping out
- File_Offset=Save_File_Offset+Buffer_Offset;
- Element_Size=Save_Element_Size-Unsynch_List.size();
- Buffer_Offset=0;
- Buffer_Unsynch=new int8u[(size_t)Element_Size];
- for (size_t Pos=0; Pos<=Unsynch_List.size(); Pos++)
- {
- size_t Pos0=(Pos==Unsynch_List.size())?(size_t)Save_Element_Size:(Unsynch_List[Pos]);
- size_t Pos1=(Pos==0)?0:(Unsynch_List[Pos-1]+1);
- size_t Buffer_Unsynch_Begin=Pos1-Pos;
- size_t Save_Buffer_Begin =Pos1;
- size_t Size= Pos0-Pos1;
- std::memcpy(Buffer_Unsynch+Buffer_Unsynch_Begin, Save_Buffer+Save_Buffer_Offset+Save_Buffer_Begin, Size);
- }
- Buffer=Buffer_Unsynch;
- }
- }
-
- #define CASE_INFO(_NAME, _DETAIL) \
- case Elements::_NAME : Element_Info1(_DETAIL); _NAME(); break;
-
- //Parsing
- Element_Value.clear();
- Element_Values.clear();
- switch (Element_Code)
- {
- CASE_INFO(AENC, "Audio encryption");
- CASE_INFO(APIC, "Attached picture");
- CASE_INFO(ASPI, "Audio seek point index");
- CASE_INFO(COMM, "Comments");
- CASE_INFO(COMR, "Commercial frame");
- CASE_INFO(ENCR, "Encryption method registration");
- CASE_INFO(EQU2, "Equalisation (2)");
- CASE_INFO(EQUA, "Equalization");
- CASE_INFO(ETCO, "Event timing codes");
- CASE_INFO(GEOB, "General encapsulated object");
- CASE_INFO(GRID, "Group identification registration");
- CASE_INFO(IPLS, "Involved people list");
- CASE_INFO(LINK, "Linked information");
- CASE_INFO(MCDI, "Music CD identifier");
- CASE_INFO(MLLT, "MPEG location lookup table");
- CASE_INFO(OWNE, "Ownership frame");
- CASE_INFO(PCNT, "Play counter");
- CASE_INFO(POPM, "Popularimeter");
- CASE_INFO(POSS, "Position synchronisation frame");
- CASE_INFO(PRIV, "Private frame");
- CASE_INFO(RBUF, "Recommended buffer size");
- CASE_INFO(RGAD, "Replay Gain Adjustment");
- CASE_INFO(RVA2, "Relative volume adjustment (2)");
- CASE_INFO(RVRB, "Reverb");
- CASE_INFO(SEEK, "Seek frame");
- CASE_INFO(SIGN, "Signature frame");
- CASE_INFO(SYLT, "Synchronised lyric/text");
- CASE_INFO(SYTC, "Synchronised tempo codes");
- CASE_INFO(TALB, "Album/Movie/Show title");
- CASE_INFO(TBPM, "BPM (beats per minute)");
- CASE_INFO(TCMP, "iTunes Compilation Flag");
- CASE_INFO(TCOM, "Composer");
- CASE_INFO(TCON, "Content type");
- CASE_INFO(TCOP, "Copyright message");
- CASE_INFO(TDAT, "Date");
- CASE_INFO(TDEN, "Encoding time");
- CASE_INFO(TDLY, "Playlist delay");
- CASE_INFO(TDOR, "Original release time");
- CASE_INFO(TDRC, "Recording time");
- CASE_INFO(TDRL, "Release time");
- CASE_INFO(TDTG, "Tagging time");
- CASE_INFO(TENC, "Encoded by");
- CASE_INFO(TEXT, "Lyricist/Text writer");
- CASE_INFO(TFLT, "File type");
- CASE_INFO(TIME, "Time");
- CASE_INFO(TIPL, "Involved people list");
- CASE_INFO(TIT1, "Content group description");
- CASE_INFO(TIT2, "Title/songname/content description");
- CASE_INFO(TIT3, "Subtitle/Description refinement");
- CASE_INFO(TKEY, "Initial key");
- CASE_INFO(TLAN, "Language(s)");
- CASE_INFO(TLEN, "Length");
- CASE_INFO(TMCL, "Musician credits list");
- CASE_INFO(TMED, "Media type");
- CASE_INFO(TMOO, "Mood");
- CASE_INFO(TOAL, "Original album/movie/show title");
- CASE_INFO(TOFN, "Original filename");
- CASE_INFO(TOLY, "Original lyricist(s)/text writer(s)");
- CASE_INFO(TOPE, "Original artist(s)/performer(s)");
- CASE_INFO(TORY, "Original release year");
- CASE_INFO(TOWN, "File owner/licensee");
- CASE_INFO(TPE1, "Lead performer(s)/Soloist(s)");
- CASE_INFO(TPE2, "Band/orchestra/accompaniment");
- CASE_INFO(TPE3, "Conductor/performer refinement");
- CASE_INFO(TPE4, "Interpreted, remixed, or otherwise modified by");
- CASE_INFO(TPOS, "Part of a set");
- CASE_INFO(TPRO, "Produced notice");
- CASE_INFO(TPUB, "Publisher");
- CASE_INFO(TRCK, "Track number/Position in set");
- CASE_INFO(TRDA, "Recording dates");
- CASE_INFO(TRSN, "Internet radio station name");
- CASE_INFO(TRSO, "Internet radio station owner");
- CASE_INFO(TSIZ, "Size");
- CASE_INFO(TSO2, "Performer order");
- CASE_INFO(TSOA, "Album sort order");
- CASE_INFO(TSOC, "Composer sort order");
- CASE_INFO(TSOP, "Performer sort order");
- CASE_INFO(TSOT, "Title sort order");
- CASE_INFO(TSRC, "ISRC (international standard recording code)");
- CASE_INFO(TSSE, "Software/Hardware and settings used for encoding");
- CASE_INFO(TSST, "Set subtitle");
- CASE_INFO(TXXX, "User defined text information frame");
- CASE_INFO(TYER, "Year");
- CASE_INFO(UFID, "Unique file identifier");
- CASE_INFO(USER, "Terms of use");
- CASE_INFO(USLT, "Unsynchronised lyric/text transcription");
- CASE_INFO(WCOM, "Commercial information");
- CASE_INFO(WCOP, "Copyright/Legal information");
- CASE_INFO(WOAF, "Official audio file webpage");
- CASE_INFO(WOAR, "Official artist/performer webpage");
- CASE_INFO(WOAS, "Official audio source webpage");
- CASE_INFO(WORS, "Official Internet radio station homepage");
- CASE_INFO(WPAY, "Payment");
- CASE_INFO(WPUB, "Publishers official webpage");
- CASE_INFO(WXXX, "User defined URL link frame");
- CASE_INFO(XRVA, "Relative volume adjustment (2)");
- CASE_INFO(BUF, "Recommended buffer size");
- CASE_INFO(CNT, "Play counter");
- CASE_INFO(COM, "Comments");
- CASE_INFO(CRA, "Audio encryption");
- CASE_INFO(CRM, "Encrypted meta frame");
- CASE_INFO(EQU, "Equalization");
- CASE_INFO(ETC, "Event timing codes");
- CASE_INFO(GEO, "General encapsulated object");
- CASE_INFO(IPL, "Involved people list");
- CASE_INFO(LNK, "Linked information");
- CASE_INFO(MCI, "Music CD Identifier");
- CASE_INFO(MLL, "MPEG location lookup table");
- CASE_INFO(PIC_, "Attached picture");
- CASE_INFO(POP, "Popularimeter");
- CASE_INFO(REV, "Reverb");
- CASE_INFO(RVA, "Relative volume adjustment");
- CASE_INFO(SLT, "Synchronized lyric/text");
- CASE_INFO(STC, "Synced tempo codes");
- CASE_INFO(TAL, "Album/Movie/Show title");
- CASE_INFO(TBP, "BPM (Beats Per Minute)");
- CASE_INFO(TCM, "Composer");
- CASE_INFO(TCO, "Content type");
- CASE_INFO(TCP, "iTunes Compilation Flag");
- CASE_INFO(TCR, "Copyright message");
- CASE_INFO(TDA, "Date");
- CASE_INFO(TDY, "Playlist delay");
- CASE_INFO(TEN, "Encoded by");
- CASE_INFO(TFT, "File type");
- CASE_INFO(TIM, "Time");
- CASE_INFO(TKE, "Initial key");
- CASE_INFO(TLA, "Language(s)");
- CASE_INFO(TLE, "Length");
- CASE_INFO(TMT, "Media type");
- CASE_INFO(TOA, "Original artist(s)/performer(s)");
- CASE_INFO(TOF, "Original filename");
- CASE_INFO(TOL, "Original Lyricist(s)/text writer(s)");
- CASE_INFO(TOR, "Original release year");
- CASE_INFO(TOT, "Original album/Movie/Show title");
- CASE_INFO(TP1, "Lead artist(s)/Lead performer(s)/Soloist(s)/Performing group");
- CASE_INFO(TP2, "Band/Orchestra/Accompaniment");
- CASE_INFO(TP3, "Conductor/Performer refinement");
- CASE_INFO(TP4, "Interpreted, remixed, or otherwise modified by");
- CASE_INFO(TPA, "Part of a set");
- CASE_INFO(TPB, "Publisher");
- CASE_INFO(TRC, "ISRC (International Standard Recording Code)");
- CASE_INFO(TRD, "Recording dates");
- CASE_INFO(TRK, "Track number/Position in set");
- CASE_INFO(TSI, "Size");
- CASE_INFO(TSS, "Software/hardware and settings used for encoding");
- CASE_INFO(TT1, "Content group description");
- CASE_INFO(TT2, "Title/Songname/Content description");
- CASE_INFO(TT3, "Subtitle/Description refinement");
- CASE_INFO(TXT, "Lyricist/text writer");
- CASE_INFO(TXX, "User defined text information frame");
- CASE_INFO(TYE, "Year");
- CASE_INFO(UFI, "Unique file identifier");
- CASE_INFO(ULT, "Unsychronized lyric/text transcription");
- CASE_INFO(WAF, "Official audio file webpage");
- CASE_INFO(WAR, "Official artist/performer webpage");
- CASE_INFO(WAS, "Official audio source webpage");
- CASE_INFO(WCM, "Commercial information");
- CASE_INFO(WCP, "Copyright/Legal information");
- CASE_INFO(WPB, "Publishers official webpage");
- CASE_INFO(WXX, "User defined URL link frame");
- default : Skip_XX(Element_Size, "Data");
- }
-
- if (!Unsynch_List.empty())
- {
- //We must change the buffer for keeping out
- File_Offset=Save_File_Offset;
- Element_Size=Save_Element_Size;
- Buffer_Offset=Save_Buffer_Offset;
- delete[] Buffer; Buffer=Save_Buffer;
- Buffer_Unsynch=NULL; //Same as Buffer...
- Element_Offset+=Unsynch_List.size();
- }
-
- if (!Id3v2_Size)
- Finish("Id3v2");
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//
-void File_Id3v2::T___()
-{
- int8u Encoding;
- Get_B1 (Encoding, "Text_encoding");
- switch (Encoding)
- {
- case 0 : Get_ISO_8859_1 (Element_Size-Element_Offset, Element_Value, "Information"); break;
- case 1 : Get_UTF16 (Element_Size-Element_Offset, Element_Value, "Information"); break;
- case 2 : Get_UTF16B (Element_Size-Element_Offset, Element_Value, "Information"); break;
- case 3 : Get_UTF8 (Element_Size-Element_Offset, Element_Value, "Information"); break;
- default : ;
- }
-
- //Exceptions
- if (Element_Code==Elements::TCMP || Element_Code==Elements::TCP)
- {
- if (Element_Value==__T("0")) Element_Value.clear(); //This is usually set to 0 even if the user did not explicitely indicated something (default)
- if (Element_Value==__T("1")) Element_Value=__T("Yes");
- }
-
- //Filling
- if (Element_Value.empty())
- return;
- Fill_Name();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Id3v2::T__X()
-{
- //Integrity
- if (Element_Size<(Elements::TXXX?4:1))
- {
- Element_Values(1).clear();
- Element_Values(0).clear();
- return;
- }
-
- int8u Encoding;
- Get_B1 (Encoding, "Text_encoding");
- if (Element_Code!=Elements::TXXX)
- Skip_C3( "Language");
- size_t Value0_Size=0;
- switch (Encoding)
- {
- case 0 :
- case 3 : //1-byte char
- while (Element_Offset+Value0_Size<Element_Size && Buffer[Buffer_Offset+(size_t)Element_Offset+Value0_Size]!='\0')
- Value0_Size++;
- if (Element_Offset+Value0_Size>=Element_Size)
- return; //Problem
- switch (Encoding)
- {
- case 0 : Get_ISO_8859_1 (Value0_Size, Element_Values(0), "Short_content_descrip"); break;
- case 3 : Get_UTF8 (Value0_Size, Element_Values(0), "Short_content_descrip"); break;
- default : ;
- }
- Skip_B1( "Null");
- switch (Encoding)
- {
- case 0 : Get_ISO_8859_1 (Element_Size-Element_Offset, Element_Values(1), "The_actual_text"); break;
- case 3 : Get_UTF8 (Element_Size-Element_Offset, Element_Values(1), "The_actual_text"); break;
- default : ;
- }
- break;
- case 1 :
- case 2 : //2-byte char
- while (Element_Offset+Value0_Size+1<Element_Size
- && !(Buffer[Buffer_Offset+(size_t)Element_Offset+Value0_Size ]=='\0'
- && Buffer[Buffer_Offset+(size_t)Element_Offset+Value0_Size+1]=='\0')) //2-byte zero
- Value0_Size+=2;
- if (Element_Offset+Value0_Size>=Element_Size)
- return; //Problem
- switch (Encoding)
- {
- case 1 : Get_UTF16 (Value0_Size, Element_Values(0), "Short_content_descrip"); break;
- case 2 : Get_UTF16B(Value0_Size, Element_Values(0), "Short_content_descrip"); break;
- default : ;
- }
- Skip_B2( "Null");
- switch (Encoding)
- {
- case 1 : Get_UTF16 (Element_Size-Element_Offset, Element_Values(1), "The_actual_text"); break;
- case 2 : Get_UTF16B(Element_Size-Element_Offset, Element_Values(1), "The_actual_text"); break;
- default : ;
- }
- break;
- default: //Unknown
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Id3v2::W___()
-{
- Get_ISO_8859_1(Element_Size, Element_Value, "URL");
-
- //Filling
- Fill_Name();
-}
-
-//---------------------------------------------------------------------------
-void File_Id3v2::W__X()
-{
- if (Element_Size<1)
- return; //Problem
-
- int8u Encoding;
- Get_B1 (Encoding, "Text_encoding");
- switch (Encoding)
- {
- case 0 : Get_ISO_8859_1 (Element_Size-1, Element_Values(0), "Description"); break;
- case 1 : Get_UTF16 (Element_Size-1, Element_Values(0), "Description"); break;
- case 2 : Get_UTF16B (Element_Size-1, Element_Values(0), "Description"); break;
- case 3 : Get_UTF8 (Element_Size-1, Element_Values(0), "Description"); break;
- default : ;
- }
- Element_Offset=1;
- switch (Encoding)
- {
- case 0 : Element_Offset+=Element_Values(0).size()+1; break; //NULL
- case 1 : Element_Offset+=Element_Values(0).size()*2+4; break; //UTF-16 BOM + UTF-16 NULL
- case 2 : Element_Offset+=Element_Values(0).size()*2+2; break; //UTF-16 NULL
- case 3 : Element_Offset+=Element_Values(0).To_UTF8().size()+1; break; //UTF-8 NULL
- default : ;
- }
- if (Element_Offset<Element_Size)
- Get_ISO_8859_1(Element_Size-Element_Offset, Element_Values(1), "URL");
-}
-
-//---------------------------------------------------------------------------
-void File_Id3v2::APIC()
-{
- int8u Encoding, PictureType;
- Ztring Mime, Description;
- Get_B1 (Encoding, "Text_encoding");
- if (Id3v2_Version==2)
- {
- int32u Image_format;
- Get_C3(Image_format, "Image_format");
- switch (Image_format)
- {
- case 0x504E47 : Mime="image/png"; break;
- case 0x4A5047 : Mime="image/jpeg"; break;
- default : ;
- }
- }
- else
- {
- int64u Element_Offset_Real=Element_Offset;
- Get_ISO_8859_1(Element_Size-Element_Offset, Mime, "MIME_type");
- Element_Offset=Element_Offset_Real+Mime.size()+1;
- }
- Get_B1 (PictureType, "Picture_type"); Element_Info1(Id3v2_PictureType(PictureType));
- int64u Element_Offset_Real=Element_Offset;
- switch (Encoding)
- {
- case 0 : Get_ISO_8859_1 (Element_Size-Element_Offset, Description, "Description"); break;
- case 1 : Get_UTF16 (Element_Size-Element_Offset, Description, "Description"); break;
- case 2 : Get_UTF16B (Element_Size-Element_Offset, Description, "Description"); break;
- case 3 : Get_UTF8 (Element_Size-Element_Offset, Description, "Description"); break;
- default : ;
- }
- Element_Offset=Element_Offset_Real;
- switch (Encoding)
- {
- case 0 : Element_Offset+=Description.size()+1; break; //NULL
- case 1 : Element_Offset+=Description.size()*2+4; break; //UTF-16 BOM + UTF-16 NULL
- case 2 : Element_Offset+=Description.size()*2+2; break; //UTF-16 NULL
- case 3 : Element_Offset+=Description.To_UTF8().size()+1; break; //UTF-8 NULL
- default : ;
- }
- if (Element_Offset>Element_Size)
- return; //There is a problem
- std::string Data_Raw((const char*)(Buffer+(size_t)(Buffer_Offset+Element_Offset)), (size_t)(Element_Size-Element_Offset));
- std::string Data_Base64(Base64::encode(Data_Raw));
-
- //Filling
- Fill_Name();
- Fill(Stream_General, 0, General_Cover_Description, Description);
- Fill(Stream_General, 0, General_Cover_Type, Id3v2_PictureType(PictureType));
- Fill(Stream_General, 0, General_Cover_Mime, Mime);
- Fill(Stream_General, 0, General_Cover_Data, Data_Base64);
-}
-
-//---------------------------------------------------------------------------
-void File_Id3v2::COMM()
-{
- T__X();
-
- //Testing
- if (Element_Values(0)==__T("iTunes_CDDB_IDs")) return;
- else if (Element_Values(0)==__T("iTunNORM")) return;
- else if (Element_Values(0)==__T("iTunSMPB")) return;
- else if (Element_Values(0)==__T("Songs-DB_Tempo")) return;
- else if (Element_Values(0)==__T("Songs-DB_Preference")) return;
- else if (Element_Values(0)==__T("MusicMatch_Tempo")) return;
- else if (Element_Values(0)==__T("MusicMatch_Mood"))
- {
- if (Retrieve(Stream_General, 0, General_Mood).empty())
- Element_Values(0)==__T("Mood");
- else
- return;
- }
- else if (Element_Values(0)==__T("MusicMatch_Preference")) return;
-
- //Filling
- if (Element_Values(0).empty())
- {
- if (Element_Values(1).find(__T("ExactAudioCopy"))==0)
- {
- Fill(Stream_General, 0, General_Encoded_Application, Element_Values(1));
- return;
- }
-
- Element_Values(0)=__T("Comment");
- }
- Fill_Name();
-}
-
-//---------------------------------------------------------------------------
-void File_Id3v2::RGAD()
-{
- //Parsing
- float32 Peak_Amplitude;
- Get_BF4 (Peak_Amplitude, "Peak Amplitude");
- while (Element_Offset+2<=Element_Size)
- {
- Element_Begin1("Gain Adjustement");
- int16u Replay_Gain_Adjustment;
- int8u Name_code;
- bool Sign_bit;
- BS_Begin();
- Get_S1 (3, Name_code, "Name code"); Param_Info1(Id3v2_RGAD_Name_code[Name_code]);
- Info_S1(3, Originator_code, "Originator code"); Param_Info1(Id3v2_RGAD_Originator_code[Originator_code]);
- Get_SB (Sign_bit, "Sign bit");
- Get_S2 (9, Replay_Gain_Adjustment, "Replay Gain Adjustment"); Param_Info3 ((Sign_bit?-1:1)*(float)Replay_Gain_Adjustment/10, 1, " dB");
- BS_End();
- Element_End0();
-
- FILLING_BEGIN();
- switch (Name_code)
- {
- case 1 : if (Retrieve(Stream_Audio, 0, Audio_ReplayGain_Gain).empty()) //this tag is not precise, we prefer other RG tags
- Fill(Stream_Audio, 0, Audio_ReplayGain_Gain, (Sign_bit?-1:1)*(float)Replay_Gain_Adjustment/10, 1);
- break;
- case 2 : if (Retrieve(Stream_General, 0, General_Album_ReplayGain_Gain).empty()) //this tag is not precise, we prefer other RG tags
- Fill(Stream_General, 0, General_Album_ReplayGain_Gain, (Sign_bit?-1:1)*(float)Replay_Gain_Adjustment/10, 1);
- break;
- default: ;
- }
- FILLING_END();
- }
-
- FILLING_BEGIN();
- if (Peak_Amplitude && Retrieve(Stream_Audio, 0, Audio_ReplayGain_Peak).empty()) //this tag is not precise, we prefer other RG tags
- Fill(Stream_Audio, 0, Audio_ReplayGain_Peak, Peak_Amplitude, 6);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Id3v2::PRIV()
-{
- //Parsing
- //Ztring Owner;
- //Get_ISO_8859_1(Element_Size, Owner, "Owner identifier");
- string Owner;
- size_t Owner_Size=0;
- while (Element_Offset+Owner_Size<Element_Size && Buffer[Buffer_Offset+(size_t)Element_Offset+Owner_Size]!='\0')
- Owner_Size++;
- if (Owner_Size==0 || Element_Offset+Owner_Size>=Element_Size)
- {
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- return;
- }
- Get_String(Owner_Size, Owner, "Owner identifier");
- Skip_B1( "Null");
- if (Owner=="com.apple.streaming.transportStreamTimestamp")
- {
- //http://tools.ietf.org/html/draft-pantos-http-live-streaming-13
- int64u DTS;
- Get_B8 (DTS, "DTS");
-
- FILLING_BEGIN();
- if (DTS>=0x200000000LL) //33 bits
- {
- Fill(Stream_Audio, 0, Audio_Delay, DTS/90);
- FrameInfo.DTS=DTS*1000000/90;
- }
- FILLING_END();
- }
- else
- {
- Skip_XX(Element_Size-Element_Offset, "Data");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Id3v2::USLT()
-{
- T__X();
-
- //Filling
- if (!Element_Values(0).empty())
- Element_Values(1)=Element_Values(0)+MediaInfoLib::Config.Language_Get(__T(": "))+Element_Values(1);
- Element_Values(0)=__T("Lyrics");
-
- Fill_Name();
-}
-
-//---------------------------------------------------------------------------
-void File_Id3v2::TXXX()
-{
- T__X();
-
- //Filling
- if (Element_Values(0).empty())
- Element_Values(0)=__T("Comment");
- Fill_Name();
-}
-
-//---------------------------------------------------------------------------
-void File_Id3v2::SYLT()
-{
- if (Element_Size<6)
- {
- Skip_XX(Element_Size, "(Problem)");
- return;
- }
-
- int8u Encoding;
- Get_B1 (Encoding, "Text encoding");
- Skip_C3( "Language");
- Skip_B1( "Time_stamp_format");
- Skip_B1( "Content_type");
- switch (Encoding)
- {
- case 0 : Get_ISO_8859_1 (Element_Size-6, Element_Value, "Short_content_descrip"); break;
- case 1 : Get_UTF16 (Element_Size-6, Element_Value, "Short_content_descrip"); break;
- case 2 : Get_UTF16B (Element_Size-6, Element_Value, "Short_content_descrip"); break;
- case 3 : Get_UTF8 (Element_Size-6, Element_Value, "Short_content_descrip"); break;
- default : ;
- }
-
- //Filling
- Fill_Name();
-}
-
-//---------------------------------------------------------------------------
-void File_Id3v2::WXXX()
-{
- W__X();
-
- //Filling
- if (Element_Values(1).empty())
- return;
- if (Element_Values(0).empty())
- Element_Values(0)=__T("URL");
- Fill_Name();
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Id3v2::Fill_Name()
-{
- Ztring Value=Ztring().From_CC4((int32u)Element_Code);
- if (MediaInfoLib::Config.CustomMapping_IsPresent(__T("Id3v2"), Value))
- {
- Fill(Stream_General, 0, MediaInfoLib::Config.CustomMapping_Get(__T("Id3v2"), Value).To_Local().c_str(), Element_Value);
- return;
- }
-
- switch (Element_Code)
- {
- case Elements::AENC : break;
- case Elements::APIC : Fill(Stream_General, 0, General_Cover, "Yes"); break;
- case Elements::ASPI : break;
- case Elements::COMM : Fill(Stream_General, 0, Element_Values(0).To_UTF8().c_str(), Element_Values(1)); break;
- case Elements::COMR : Fill(Stream_General, 0, "Commercial frame", Element_Value); break;
- case Elements::ENCR : break;
- case Elements::EQU2 : break;
- case Elements::EQUA : break;
- case Elements::ETCO : break;
- case Elements::GEOB : break;
- case Elements::GRID : Fill(Stream_General, 0, "Group identification registration", Element_Value); break;
- case Elements::IPLS : Fill(Stream_General, 0, "Involved people list", Element_Value); break;
- case Elements::LINK : Fill(Stream_General, 0, "Linked information", Element_Value); break;
- case Elements::MCDI : Fill(Stream_General, 0, "MCDI", "Yes"); break;
- case Elements::MLLT : break;
- case Elements::OWNE : Fill(Stream_General, 0, General_Owner, Element_Value); break;
- case Elements::PCNT : break;
- case Elements::POPM : break;
- case Elements::POSS : break;
- case Elements::PRIV : break;
- case Elements::RBUF : break;
- case Elements::RVA2 : break;
- case Elements::RVRB : break;
- case Elements::SEEK : break;
- case Elements::SIGN : break;
- case Elements::SYLT : Fill(Stream_General, 0, General_Lyrics, Element_Value); break;
- case Elements::SYTC : break;
- case Elements::TALB : Fill(Stream_General, 0, General_Album, Element_Value); break;
- case Elements::TBPM : Fill(Stream_General, 0, General_BPM, Element_Value); break;
- case Elements::TCMP : Fill(Stream_General, 0, General_Compilation, Element_Value); break;
- case Elements::TCOM : Fill(Stream_General, 0, General_Composer, Element_Value); break;
- case Elements::TCON :
- {
- if (Element_Value.find(__T("("))==0)
- Element_Value=Element_Value.SubString(__T("("), __T(")")); //Replace (nn) by nn
- if (Element_Value==__T("0") || Element_Value==__T("255"))
- Element_Value.clear();
- Fill(Stream_General, 0, General_Genre, Element_Value);
- }
- break;
- case Elements::TCOP : Fill(Stream_General, 0, General_Copyright, Element_Value); break;
- case Elements::TDA :
- case Elements::TDAT : if (Element_Value.size()==4)
- {
- Month.assign(Element_Value.c_str(), 0, 2);
- Day.assign (Element_Value.c_str(), 2, 2); break;
- }
- case Elements::TDEN : Normalize_Date(Element_Value); Fill(Stream_General, 0, "Encoded_Date", Element_Value); break;
- case Elements::TDLY : break;
- case Elements::TDOR : Normalize_Date(Element_Value); Fill(Stream_General, 0, "Original/Released_Date", Element_Value); break;
- case Elements::TDRC : Normalize_Date(Element_Value); Fill(Stream_General, 0, General_Recorded_Date, Element_Value); break;
- case Elements::TDRL : Normalize_Date(Element_Value); Fill(Stream_General, 0, General_Released_Date, Element_Value); break;
- case Elements::TDTG : Normalize_Date(Element_Value); Fill(Stream_General, 0, General_Tagged_Date, Element_Value); break;
- case Elements::TENC : Fill(Stream_General, 0, General_EncodedBy, Element_Value); break;
- case Elements::TEXT : Fill(Stream_General, 0, General_Lyricist, Element_Value); break;
- case Elements::TFLT : Fill(Stream_General, 0, "File type", Element_Value); break;
- case Elements::TIM :
- case Elements::TIME : if (Element_Value.size()==4)
- {
- Hour.assign (Element_Value.c_str(), 0, 2);
- Minute.assign(Element_Value.c_str(), 2, 2); break;
- }
- case Elements::TIPL : Fill(Stream_General, 0, General_ThanksTo, Element_Value); break;
- case Elements::TIT1 : Fill(Stream_General, 0, General_Grouping, Element_Value); break;
- case Elements::TIT2 : Fill(Stream_General, 0, General_Track, Element_Value); break;
- case Elements::TIT3 : Fill(Stream_General, 0, General_Track_More, Element_Value); break;
- case Elements::TKEY : Fill(Stream_General, 0, "Initial key", Element_Value); break;
- case Elements::TLAN : Fill(Stream_Audio, 0, Audio_Language, Element_Value); break;
- case Elements::TLEN : break; //Fill(Stream_General, 0, "Length", Element_Value); break;
- case Elements::TMCL : Fill(Stream_General, 0, "Musician Credit List", Element_Value); break;
- case Elements::TMED : Fill(Stream_General, 0, "Media Type", Element_Value); break;
- case Elements::TMOO : Fill(Stream_General, 0, "Mood", Element_Value); break;
- case Elements::TOAL : Fill(Stream_General, 0, "Original/Album", Element_Value); break;
- case Elements::TOFN : Fill(Stream_General, 0, "Original/FileName", Element_Value); break;
- case Elements::TOLY : Fill(Stream_General, 0, "Original/Lyricist", Element_Value); break;
- case Elements::TOPE : Fill(Stream_General, 0, "Original/Performer", Element_Value); break;
- case Elements::TORY : Normalize_Date(Element_Value); Fill(Stream_General, 0, "Original/Released_Date", Element_Value); break;
- case Elements::TOWN : Fill(Stream_General, 0, General_Owner, Element_Value); break;
- case Elements::TPE1 : Fill(Stream_General, 0, General_Performer, Element_Value); break;
- case Elements::TPE2 : Fill(Stream_General, 0, General_Album_Performer, Element_Value); break;
- case Elements::TPE3 : Fill(Stream_General, 0, General_Conductor, Element_Value); break;
- case Elements::TPE4 : Fill(Stream_General, 0, General_RemixedBy, Element_Value); break;
- case Elements::TPOS :
- {
- ZtringList List; List.Separator_Set(0, __T("/")); List.Write(Element_Value);
- if (!List(0).empty())
- Fill(Stream_General, 0, General_Part_Position, List(0));
- if (!List(1).empty())
- Fill(Stream_General, 0, General_Part_Position_Total, List(1));
- }
- break;
- case Elements::TPRO : Fill(Stream_General, 0, General_Producer_Copyright, Element_Value); break;
- case Elements::TPUB : Fill(Stream_General, 0, General_Publisher, Element_Value); break;
- case Elements::TRCK :
- {
- ZtringList List; List.Separator_Set(0, __T("/")); List.Write(Element_Value);
- if (!List(0).empty())
- Fill(Stream_General, 0, General_Track_Position, List(0));
- if (!List(1).empty())
- Fill(Stream_General, 0, General_Track_Position_Total, List(1));
- }
- break;
- case Elements::TRDA : Normalize_Date(Element_Value); Fill(Stream_General, 0, "Recorded_Date", Element_Value); break;
- case Elements::TRSN : Fill(Stream_General, 0, General_ServiceName, Element_Value); break;
- case Elements::TRSO : Fill(Stream_General, 0, General_ServiceProvider, Element_Value); break;
- case Elements::TSIZ : Fill(Stream_General, 0, "Size", Element_Value); break;
- case Elements::TSO2 : Fill(Stream_General, 0, General_Performer_Sort, Element_Value); break;
- case Elements::TSOA : Fill(Stream_General, 0, General_Album_Sort, Element_Value); break;
- case Elements::TSOC : Fill(Stream_General, 0, "Composer/Sort", Element_Value); break;
- case Elements::TSOP : Fill(Stream_General, 0, General_Performer_Sort, Element_Value); break;
- case Elements::TSOT : Fill(Stream_General, 0, General_Track_Sort, Element_Value); break;
- case Elements::TSRC : Fill(Stream_General, 0, General_ISRC, Element_Value); break;
- case Elements::TSSE : Fill(Stream_General, 0, General_Encoded_Library, Element_Value); break;
- case Elements::TSST : Fill(Stream_General, 0, "Set subtitle", Element_Value); break;
- case Elements::TXXX : if (Element_Values(0)==__T("AccurateRipResult")) ;
- else if (Element_Values(0)==__T("AccurateRipDiscID")) ;
- else if (Element_Values(0)==__T("CT_GAPLESS_DATA")) ;
- else if (Element_Values(0)==__T("DISCNUMBER")) Fill(Stream_General, 0, General_Part_Position, Element_Values(1), true);
- else if (Element_Values(0)==__T("DISCTOTAL")) Fill(Stream_General, 0, General_Part_Position_Total, Element_Values(1), true);
- else if (Element_Values(0)==__T("first_played_timestamp")) Fill(Stream_General, 0, General_Played_First_Date, Ztring().Date_From_Milliseconds_1601(Element_Values(1).To_int64u()/10000));
- else if (Element_Values(0)==__T("last_played_timestamp")) Fill(Stream_General, 0, General_Played_Last_Date, Ztring().Date_From_Milliseconds_1601(Element_Values(1).To_int64u()/10000));
- else if (Element_Values(0)==__T("play_count")) Fill(Stream_General, 0, General_Played_Count, Element_Values(1).To_int64u());
- else if (Element_Values(0)==__T("added_timestamp")) Fill(Stream_General, 0, General_Added_Date, Ztring().Date_From_Milliseconds_1601(Element_Values(1).To_int64u()/10000));
- else if (Element_Values(0)==__T("replaygain_album_gain")) Fill(Stream_General, 0, General_Album_ReplayGain_Gain, Element_Values(1).To_float64(), 2, true);
- else if (Element_Values(0)==__T("replaygain_album_peak")) Fill(Stream_General, 0, General_Album_ReplayGain_Peak, Element_Values(1).To_float64(), 6, true);
- else if (Element_Values(0)==__T("replaygain_track_gain")) Fill(Stream_Audio, 0, Audio_ReplayGain_Gain, Element_Values(1).To_float64(), 2, true);
- else if (Element_Values(0)==__T("replaygain_track_peak")) Fill(Stream_Audio, 0, Audio_ReplayGain_Peak, Element_Values(1).To_float64(), 6, true);
- else if (Element_Values(0)==__T("TRACKTOTAL")) Fill(Stream_General, 0, General_Track_Position_Total, Element_Values(1), true);
- else if (Element_Values(0)==__T("OMG_AGENR")) ; //Duplicate of Genre
- else if (Element_Values(0)==__T("OMG_ALBMS")) ; //Duplicate of Album
- else if (Element_Values(0)==__T("OMG_ASGTM")) ; //?
- else if (Element_Values(0)==__T("OMG_ATPE1")) ; //Duplicate of Title
- else if (Element_Values(0)==__T("OMG_TIT2S")) ; //Duplicate of Title
- else if (Element_Values(0)==__T("OMG_TPE1S")) ; //Duplicate of Artist
- else if (Element_Values(0)==__T("OMG_TRACK")) Fill(Stream_General, 0, General_Track_Position, Element_Values(1), true);
- else if (Element_Values(0)==__T("OMG_TRLDA")) ; //Duplicate of Date
- else
- Fill(Stream_General, 0, Element_Values(0).To_UTF8().c_str(), Element_Values(1));
- break;
- case Elements::TYER : Year=Element_Value; break;
- case Elements::UFID : Fill(Stream_Audio, 0, "UID", Element_Value); break;
- case Elements::USER : Fill(Stream_General, 0, General_TermsOfUse, Element_Value); break;
- case Elements::USLT : Fill(Stream_General, 0, Element_Values(0).To_UTF8().c_str(), Element_Values(1)); break;
- case Elements::WCOM : Fill(Stream_General, 0, "Commercial information", Element_Value); break;
- case Elements::WCOP : Fill(Stream_General, 0, "Copyright/Legal information", Element_Value); break;
- case Elements::WOAF : Fill(Stream_General, 0, "Official audio file webpage", Element_Value); break;
- case Elements::WOAR : Fill(Stream_General, 0, "Performer/Url", Element_Value); break;
- case Elements::WOAS : Fill(Stream_General, 0, "Official audio source webpage", Element_Value); break;
- case Elements::WORS : Fill(Stream_General, 0, General_Service_Url, Element_Value); break;
- case Elements::WPAY : Fill(Stream_General, 0, "Payment", Element_Value); break;
- case Elements::WPUB : Fill(Stream_General, 0, "Publisher/Url", Element_Value); break;
- case Elements::WXXX : Fill(Stream_General, 0, Element_Values(0).To_UTF8().c_str(), Element_Values(1)); break;
- case Elements::BUF : break;
- case Elements::CNT : break;
- case Elements::COM : Fill(Stream_General, 0, Element_Values(0).To_UTF8().c_str(), Element_Values(1)); break;
- case Elements::CRA : break;
- case Elements::CRM : break;
- case Elements::EQU : break;
- case Elements::ETC : break;
- case Elements::GEO : break;
- case Elements::IPL : Fill(Stream_General, 0, "Involved people list", Element_Value); break;
- case Elements::LNK : Fill(Stream_General, 0, "Linked information,", Element_Value); break;
- case Elements::MCI : Fill(Stream_General, 0, "MCDI", Element_Value); break;
- case Elements::MLL : break;
- case Elements::PIC_ : Fill(Stream_General, 0, "Cover", "Yes"); break;
- case Elements::POP : break;
- case Elements::REV : break;
- case Elements::RVA : break;
- case Elements::SLT : break;
- case Elements::STC : break;
- case Elements::TAL : Fill(Stream_General, 0, "Album", Element_Value); break;
- case Elements::TBP : Fill(Stream_General, 0, "BPM", Element_Value); break;
- case Elements::TCM : Fill(Stream_General, 0, "Composer", Element_Value); break;
- case Elements::TCO :
- {
- if (Element_Value.find(__T("("))==0)
- Element_Value=Element_Value.SubString(__T("("), __T(")")); //Replace (nn) by nn
- if (Element_Value==__T("0") || Element_Value==__T("255"))
- Element_Value.clear();
- if (!Element_Value.empty())
- Fill(Stream_General, 0, General_Genre, Element_Value);
- }
- break;
- case Elements::TCR : Fill(Stream_General, 0, "Copyright", Element_Value); break;
- case Elements::TDY : break;
- case Elements::TEN : Fill(Stream_General, 0, "Encoded_Library", Element_Value); break;
- case Elements::TFT : Fill(Stream_General, 0, "File type", Element_Value); break;
- case Elements::TKE : Fill(Stream_General, 0, "Initial key", Element_Value); break;
- case Elements::TLA : Fill(Stream_Audio, 0, Audio_Language, Element_Value); break;
- case Elements::TLE : break;
- case Elements::TMT : Fill(Stream_General, 0, "Media type", Element_Value); break;
- case Elements::TOA : Fill(Stream_General, 0, "Original/Performer", Element_Value); break;
- case Elements::TOF : Fill(Stream_General, 0, "Original/FileName", Element_Value); break;
- case Elements::TOL : Fill(Stream_General, 0, "Original/Lyricist", Element_Value); break;
- case Elements::TOR : Normalize_Date(Element_Value); Fill(Stream_General, 0, "Original/Released_Date", Element_Value); break;
- case Elements::TOT : Fill(Stream_General, 0, "Original/Album", Element_Value); break;
- case Elements::TP1 : Fill(Stream_General, 0, "Performer", Element_Value); break;
- case Elements::TP2 : Fill(Stream_General, 0, "Accompaniment", Element_Value); break;
- case Elements::TP3 : Fill(Stream_General, 0, "Conductor", Element_Value); break;
- case Elements::TP4 : Fill(Stream_General, 0, "RemixedBy", Element_Value); break;
- case Elements::TPA :
- {
- ZtringList List; List.Separator_Set(0, __T("/")); List.Write(Element_Value);
- if (!List(0).empty())
- Fill(Stream_General, 0, General_Part_Position, List(0));
- if (!List(1).empty())
- Fill(Stream_General, 0, General_Part_Position_Total, List(1));
- }
- break;
- case Elements::TPB : Fill(Stream_General, 0, "Publisher", Element_Value); break;
- case Elements::TRC : Fill(Stream_General, 0, "ISRC", Element_Value); break;
- case Elements::TRD : Normalize_Date(Element_Value); Fill(Stream_General, 0, "Recorded_Date", Element_Value); break;
- case Elements::TRK :
- {
- ZtringList List; List.Separator_Set(0, __T("/")); List.Write(Element_Value);
- if (!List(0).empty())
- Fill(Stream_General, 0, General_Track_Position, List(0));
- if (!List(1).empty())
- Fill(Stream_General, 0, General_Track_Position_Total, List(1));
- }
- break;
- case Elements::TSI : break;
- case Elements::TSS : break;
- case Elements::TT1 : Fill(Stream_General, 0, "Grouping", Element_Value); break;
- case Elements::TT2 : Fill(Stream_General, 0, "Track", Element_Value); break;
- case Elements::TT3 : Fill(Stream_General, 0, "Track/More", Element_Value); break;
- case Elements::TXT : Fill(Stream_General, 0, "Lyricist", Element_Value); break;
- case Elements::TXX : Fill(Stream_General, 0, Element_Values(0).To_UTF8().c_str(), Element_Values(1)); break;
- case Elements::TYE : Year=Element_Value; break;
- case Elements::UFI : Fill(Stream_Audio, 0, "UID", Element_Value); break;
- case Elements::ULT : Fill(Stream_General, 0, Element_Values(0).To_UTF8().c_str(), Element_Values(1)); break;
- case Elements::WAF : break;
- case Elements::WAR : Fill(Stream_General, 0, General_Service_Url, Element_Value); break;
- case Elements::WAS : Fill(Stream_General, 0, "Official audio source webpage", Element_Value); break;
- case Elements::WCM : Fill(Stream_General, 0, "Commercial information", Element_Value); break;
- case Elements::WCP : Fill(Stream_General, 0, "Copyright/Legal information", Element_Value); break;
- case Elements::WPB : Fill(Stream_General, 0, "Publisher/Url", Element_Value); break;
- case Elements::WXX : Fill(Stream_General, 0, Element_Values(0).To_UTF8().c_str(), Element_Values(1)); break;
- default : ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Id3v2::Normalize_Date(Ztring& Date)
-{
- if (Date.size()<=8)
- return; //Format unknown
- Date[8]=__T(' '); //could be "T"
- Date=Ztring(__T("UTC "))+Date; //Id3v2 specify a UTC date
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_MPEGA_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3v2.h b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3v2.h
deleted file mode 100644
index a17fc6e01..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Id3v2.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about ID3v2 tagged files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Id3v2H
-#define MediaInfo_File_Id3v2H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-///***************************************************************************
-// Class File_Id3v2
-//***************************************************************************
-
-class File_Id3v2 : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Id3v2();
-
- //Static stuff
- static bool Static_Synchronize_Tags (const int8u* Buffer, size_t Buffer_Offset, size_t Buffer_Size, bool &Tag_Found);
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - File header
- void FileHeader_Parse ();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- #ifdef TEXT
- #undef TEXT
- #endif
- void T___();
- void T__X();
- void W___();
- void W__X();
- void AENC() {Skip_XX(Element_Size, "Data");}
- void APIC();
- void ASPI() {Skip_XX(Element_Size, "Data");}
- void COMM();
- void COMR() {Skip_XX(Element_Size, "Data");}
- void ENCR() {Skip_XX(Element_Size, "Data");}
- void EQU2() {Skip_XX(Element_Size, "Data");}
- void EQUA() {Skip_XX(Element_Size, "Data");}
- void ETCO() {Skip_XX(Element_Size, "Data");}
- void GEOB() {Skip_XX(Element_Size, "Data");}
- void GRID() {Skip_XX(Element_Size, "Data");}
- void IPLS() {Skip_XX(Element_Size, "Data");}
- void LINK() {Skip_XX(Element_Size, "Data");}
- void MCDI() {T___();}
- void MLLT() {Skip_XX(Element_Size, "Data");}
- void OWNE() {Skip_XX(Element_Size, "Data");}
- void PCNT() {Skip_XX(Element_Size, "Data");}
- void POPM() {Skip_XX(Element_Size, "Data");}
- void POSS() {Skip_XX(Element_Size, "Data");}
- void PRIV();
- void RBUF() {Skip_XX(Element_Size, "Data");}
- void RGAD();
- void RVA2() {Skip_XX(Element_Size, "Data");}
- void RVRB() {Skip_XX(Element_Size, "Data");}
- void SEEK() {Skip_XX(Element_Size, "Data");}
- void SIGN() {Skip_XX(Element_Size, "Data");}
- void SYLT();
- void SYTC() {Skip_XX(Element_Size, "Data");}
- void TALB() {T___();}
- void TBPM() {T___();}
- void TCMP() {T___();}
- void TCOM() {T___();}
- void TCON() {T___();}
- void TCOP() {T___();}
- void TDAT() {T___();}
- void TDEN() {T___();}
- void TDLY() {T___();}
- void TDOR() {T___();}
- void TDRC() {T___();}
- void TDRL() {T___();}
- void TDTG() {T___();}
- void TENC() {T___();}
- void TEXT() {T___();}
- void TFLT() {T___();}
- void TIME() {T___();}
- void TIPL() {T___();}
- void TIT1() {T___();}
- void TIT2() {T___();}
- void TIT3() {T___();}
- void TKEY() {T___();}
- void TLAN() {T___();}
- void TLEN() {T___();}
- void TMCL() {T___();}
- void TMED() {T___();}
- void TMOO() {T___();}
- void TOAL() {T___();}
- void TOFN() {T___();}
- void TOLY() {T___();}
- void TOPE() {T___();}
- void TORY() {T___();}
- void TOWN() {T___();}
- void TPE1() {T___();}
- void TPE2() {T___();}
- void TPE3() {T___();}
- void TPE4() {T___();}
- void TPOS() {T___();}
- void TPRO() {T___();}
- void TPUB() {T___();}
- void TRCK() {T___();}
- void TRDA() {T___();}
- void TRSN() {T___();}
- void TRSO() {T___();}
- void TSIZ() {T___();}
- void TSO2() {T___();}
- void TSOA() {T___();}
- void TSOC() {T___();}
- void TSOP() {T___();}
- void TSOT() {T___();}
- void TSRC() {T___();}
- void TSSE() {T___();}
- void TSST() {T___();}
- void TXXX();
- void TYER() {T___();}
- void UFID() {Skip_XX(Element_Size, "Data");}
- void USER() {Skip_XX(Element_Size, "Data");}
- void USLT();
- void WCOM() {W___();}
- void WCOP() {W___();}
- void WOAF() {W___();}
- void WOAR() {W___();}
- void WOAS() {W___();}
- void WORS() {W___();}
- void WPAY() {W___();}
- void WPUB() {W___();}
- void WXXX();
- void BUF() {Skip_XX(Element_Size, "Data");}
- void CNT() {Skip_XX(Element_Size, "Data");}
- void COM() {COMM();}
- void CRA() {Skip_XX(Element_Size, "Data");}
- void CRM() {Skip_XX(Element_Size, "Data");}
- void EQU() {Skip_XX(Element_Size, "Data");}
- void ETC() {Skip_XX(Element_Size, "Data");}
- void GEO() {Skip_XX(Element_Size, "Data");}
- void IPL() {Skip_XX(Element_Size, "Data");}
- void LNK() {Skip_XX(Element_Size, "Data");}
- void MCI() {Skip_XX(Element_Size, "Data");}
- void MLL() {Skip_XX(Element_Size, "Data");}
- void PIC_() {APIC();}
- void POP() {Skip_XX(Element_Size, "Data");}
- void REV() {Skip_XX(Element_Size, "Data");}
- void RVA() {Skip_XX(Element_Size, "Data");}
- void SLT() {Skip_XX(Element_Size, "Data");}
- void STC() {Skip_XX(Element_Size, "Data");}
- void TAL() {T___();}
- void TBP() {T___();}
- void TCM() {T___();}
- void TCO() {T___();}
- void TCP() {Skip_XX(Element_Size, "Data");}
- void TCR() {T___();}
- void TDA() {T___();}
- void TDY() {T___();}
- void TEN() {T___();}
- void TFT() {T___();}
- void TIM() {T___();}
- void TKE() {T___();}
- void TLA() {T___();}
- void TLE() {T___();}
- void TMT() {T___();}
- void TOA() {T___();}
- void TOF() {T___();}
- void TOL() {T___();}
- void TOR() {T___();}
- void TOT() {T___();}
- void TP1() {T___();}
- void TP2() {T___();}
- void TP3() {T___();}
- void TP4() {T___();}
- void TPA() {T___();}
- void TPB() {T___();}
- void TRC() {T___();}
- void TRD() {T___();}
- void TRK() {T___();}
- void TSI() {T___();}
- void TSS() {T___();}
- void TT1() {T___();}
- void TT2() {T___();}
- void TT3() {T___();}
- void TXT() {T___();}
- void TXX() {TXXX();}
- void TYE() {T___();}
- void UFI() {Skip_XX(Element_Size, "Data");}
- void ULT() {USLT();}
- void WAF() {W___();}
- void WAR() {W___();}
- void WAS() {W___();}
- void WCM() {W___();}
- void WCP() {W___();}
- void WPB() {W___();}
- void WXX() {WXXX();}
- void XRVA() {RVA2();}
-
- //Temp
- ZtringList Element_Values;
- Ztring Element_Value;
- Ztring Year, Month, Day, Hour, Minute;
- stream_t StreamKind;
- int64u Id3v2_Size;
- int8u Id3v2_Version;
- bool Unsynchronisation_Global;
- bool Unsynchronisation_Frame;
- bool DataLengthIndicator;
-
- //Helpers
- void Fill_Name();
- void Normalize_Date (Ztring& Date);
-};
-
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3.cpp b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3.cpp
deleted file mode 100644
index 3576707e7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_LYRICS3_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File_Lyrics3.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Lyrics3::File_Lyrics3()
-:File__Analyze()
-{
- //Configuration
- TotalSize=(int64u)-1;
-}
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Lyrics3::Read_Buffer_Continue()
-{
- if (TotalSize==(int64u)-1)
- TotalSize=Buffer_Size;
-
- //Coherency
- if (TotalSize<20)
- {
- Reject("Lyrics3");
- return;
- }
-
- //Buffer size
- if (Buffer_Size<TotalSize)
- return;
-
- //Parsing
- Element_Offset=0;
- Element_Size=TotalSize;
- Skip_Local(11, "Signature");
- Skip_Local(TotalSize-20, "Lyrics");
- Skip_Local(9, "Signature");
-
- //Filling
- Accept("Lyric3");
-
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Codec, "Lyrics3");
-
- Finish("Lyrics3");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_LYRICS3_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3.h b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3.h
deleted file mode 100644
index a93141daa..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Lyrics3 tagged files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Lyrics3H
-#define MediaInfo_File_Lyrics3H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Lyrics3
-//***************************************************************************
-
-class File_Lyrics3 : public File__Analyze
-{
-public :
- //In
- int64u TotalSize;
-
- //Constructor/Destructor
- File_Lyrics3();
-
-private :
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3v2.cpp b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3v2.cpp
deleted file mode 100644
index 51bef8675..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3v2.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_LYRICS3V2_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File_Lyrics3v2.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-namespace Elements
-{
- const int32u AUT=0x415554;
- const int32u CRC=0x435243;
- const int32u EAL=0x45414C;
- const int32u EAR=0x454152;
- const int32u ETT=0x455454;
- const int32u IMG=0x494D47;
- const int32u IND=0x494E44;
- const int32u INF=0x494E46;
- const int32u LYR=0x4C5952;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Lyrics3v2::File_Lyrics3v2()
-:File__Analyze()
-{
- //Configuration
- TotalSize=(int64u)-1;
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Lyrics3v2::FileHeader_Parse()
-{
- if (TotalSize==(int64u)-1)
- TotalSize=Buffer_Size;
-
- //Parsing
- Skip_Local(11, "Signature");
-
- FILLING_BEGIN();
- Accept("Lyrics3v2");
-
- TotalSize-=11;
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Lyrics3v2::Header_Parse()
-{
- if (TotalSize<=15) //First 10 is minimum size of a tag, Second 10 is ID3v2 header size
- {
- //Place for footer
- Header_Fill_Code((int64u)-1, "File Footer");
- Header_Fill_Size(TotalSize);
- return;
- }
-
- //Parsing
- Ztring SizeT;
- int64u Size;
- int32u Field;
- Get_C3 (Field, "Field");
- Get_Local(5, SizeT, "Size");
- Size=8+SizeT.To_int64u();
-
- //Filling
- if (Size+15>TotalSize)
- Size=TotalSize-15;
- Header_Fill_Code(Field, Ztring().From_CC3(Field));
- Header_Fill_Size(Size);
- TotalSize-=Size;
-}
-
-//---------------------------------------------------------------------------
-void File_Lyrics3v2::Data_Parse()
-{
- #define CASE_INFO(_NAME, _DETAIL) \
- case Elements::_NAME : Element_Info1(_DETAIL); _NAME(); break;
-
- //Parsing
- switch (Element_Code)
- {
- CASE_INFO(AUT, "Lyrics Author Name");
- CASE_INFO(CRC, "CRC");
- CASE_INFO(EAL, "Extended Album name");
- CASE_INFO(EAR, "Extended Artist name");
- CASE_INFO(ETT, "Extended Track Title");
- CASE_INFO(IMG, "Image location");
- CASE_INFO(IND, "Indications field");
- CASE_INFO(INF, "Additional information");
- CASE_INFO(LYR, "Lyrics");
- case (int64u)-1 : Footer(); break;
- default : Skip_XX(Element_Size, "Data");
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Lyrics3v2::Footer()
-{
- //Parsing
- Skip_Local(6, "Size");
- Skip_Local(9, "Signature");
-
- Finish("Lyrics3v2");
-}
-
-//---------------------------------------------------------------------------
-void File_Lyrics3v2::EAL()
-{
- //Parsing
- Ztring Value;
- Get_Local(Element_Size, Value, "Value");
-
- //Filling
- Fill(Stream_General, 0, General_Album, Value);
-}
-
-//---------------------------------------------------------------------------
-void File_Lyrics3v2::EAR()
-{
- //Parsing
- Ztring Value;
- Get_Local(Element_Size, Value, "Value");
-
- //Filling
- Fill(Stream_General, 0, General_Performer, Value);
-}
-
-//---------------------------------------------------------------------------
-void File_Lyrics3v2::ETT()
-{
- //Parsing
- Ztring Value;
- Get_Local(Element_Size, Value, "Value");
-
- //Filling
- Fill(Stream_General, 0, General_Title, Value);
-}
-
-//---------------------------------------------------------------------------
-void File_Lyrics3v2::IND()
-{
- //Parsing
- if (Element_Size>=1)
- Skip_Local(1, "lyrics present");
- if (Element_Size>=2)
- Skip_Local(1, "timestamp in lyrics");
- if (Element_Size>=3)
- Skip_Local(1, "inhibits tracks for random selection");
- while (Element_Offset<Element_Size)
- Skip_Local(1, "unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Lyrics3v2::INF()
-{
- //Parsing
- Ztring Value;
- Get_Local(Element_Size, Value, "Value");
-
- //Filling
- Fill(Stream_General, 0, General_Comment, Value);
-}
-
-//---------------------------------------------------------------------------
-void File_Lyrics3v2::LYR()
-{
- //Parsing
- Skip_XX(Element_Size, "Value");
-
- //Filling
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Codec, "Lyrics3v2");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_LYRICS3V2_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3v2.h b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3v2.h
deleted file mode 100644
index f495323de..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Lyrics3v2.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Lyrics3v2 tagged files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Lyrics3v2H
-#define MediaInfo_File_Lyrics3v2H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Lyrics3v2
-//***************************************************************************
-
-class File_Lyrics3v2 : public File__Analyze
-{
-public :
- //In
- int64u TotalSize;
-
- //Constructor/Destructor
- File_Lyrics3v2();
-
-private :
- //Buffer - File header
- void FileHeader_Parse();
-
- //Buffer - Per element
- void Header_Parse ();
- void Data_Parse ();
-
- //Elements
- void Header();
- void Footer();
- void AUT() {Skip_Local(Element_Size, "Value");}
- void CRC() {Skip_Local(Element_Size, "Value");}
- void EAL();
- void EAR();
- void ETT();
- void IMG() {Skip_Local(Element_Size, "Value");}
- void IND();
- void INF();
- void LYR();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_PropertyList.cpp b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_PropertyList.cpp
deleted file mode 100644
index 7a983f3c8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_PropertyList.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PROPERTYLIST_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File_PropertyList.h"
-#include <cstring>
-#include "tinyxml2.h"
-using namespace tinyxml2;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* PropertyList_key(const string &key)
-{
- if (key=="director" || key=="directors")
- return "Director";
- if (key=="codirector" || key=="codirectors")
- return "CoDirector";
- if (key=="producer" || key=="producers")
- return "Producer";
- if (key=="coproducer" || key=="coproducers")
- return "CoProducer";
- if (key=="screenwriter" || key=="screenwriters")
- return "ScreenplayBy";
- if (key=="studio" || key=="studios")
- return "ProductionStudio";
- if (key=="cast")
- return "Actor";
- return key.c_str();
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_PropertyList::FileHeader_Begin()
-{
- XMLDocument document;
- if (!FileHeader_Begin_XML(document))
- return false;
-
- XMLElement* plist=document.FirstChildElement("plist");
- if (!plist)
- {
- Reject("XMP");
- return false;
- }
-
- XMLElement* dict=plist->FirstChildElement("dict");
- if (!dict)
- {
- Reject("XMP");
- return false;
- }
-
- Accept("PropertyList");
-
- string key;
- for (XMLElement* dict_Item=dict->FirstChildElement(); dict_Item; dict_Item=dict_Item->NextSiblingElement())
- {
- //key
- if (!strcmp(dict_Item->Value(), "key"))
- {
- const char* Text=dict_Item->GetText();
- if (Text)
- key=Text;
- }
-
- //string
- if (!strcmp(dict_Item->Value(), "string"))
- {
- const char* Text=dict_Item->GetText();
- if (Text)
- Fill(Stream_General, 0, PropertyList_key(key), Text);
-
- key.clear();
- }
-
- //string
- if (!strcmp(dict_Item->Value(), "array"))
- {
- for (XMLElement* array_Item=dict_Item->FirstChildElement(); array_Item; array_Item=array_Item->NextSiblingElement())
- {
- //dict
- if (!strcmp(array_Item->Value(), "dict"))
- {
- string key2;
- for (XMLElement* dict2_Item=array_Item->FirstChildElement(); dict2_Item; dict2_Item=dict2_Item->NextSiblingElement())
- {
- //key
- if (!strcmp(dict2_Item->Value(), "key"))
- {
- const char* Text=dict2_Item->GetText();
- if (Text)
- key2=Text;
- }
-
- //string
- if (!strcmp(dict2_Item->Value(), "string"))
- {
- const char* Text2=dict2_Item->GetText();
- if (Text2)
- Fill(Stream_General, 0, key2=="name"?PropertyList_key(key):((string(PropertyList_key(key))+", "+key2).c_str()), Text2);
-
- key2.clear();
- }
- }
- }
- }
-
- key.clear();
- }
- }
-
- Finish();
- return true;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_PROPERTYLIST_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_PropertyList.h b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_PropertyList.h
deleted file mode 100644
index eebbb6ca2..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_PropertyList.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PropertyList files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_PropertyListH
-#define MediaInfo_File_PropertyListH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_PropertyList
-//***************************************************************************
-
-class File_PropertyList : public File__Analyze
-{
-private :
- //Buffer - File header
- bool FileHeader_Begin();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_VorbisCom.cpp b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_VorbisCom.cpp
deleted file mode 100644
index 677bb2403..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_VorbisCom.cpp
+++ /dev/null
@@ -1,344 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_VORBISCOM_YES) || defined(MEDIAINFO_OGG_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File_VorbisCom.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-extern const char* Id3v2_PictureType(int8u Type); //In Tag/File_Id3v2.cpp
-extern std::string ExtensibleWave_ChannelMask (int32u ChannelMask); //In Multiple/File_Riff_Elements.cpp
-extern std::string ExtensibleWave_ChannelMask2 (int32u ChannelMask); //In Multiple/File_Riff_Elements.cpp
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_VorbisCom::File_VorbisCom()
-:File__Analyze()
-{
- //In
- StreamKind_Specific=Stream_General;
- StreamKind_Multiple=Stream_General;
- StreamKind_Common =Stream_General;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_VorbisCom::Streams_Fill()
-{
- if (!Performers.empty())
- {
- Artists.Separator_Set(0, __T(" / "));
- Fill(StreamKind_Common, 0, "Performer", Performers.Read());
- }
-
- if (!Artists.empty() && Artists!=Performers)
- {
- Artists.Separator_Set(0, __T(" / "));
- Fill(StreamKind_Common, 0, Performers.empty()?"Performer":"Composer", Artists.Read());
- }
-
- if (!Accompaniments.empty() && Accompaniments!=Artists && Accompaniments!=Performers)
- {
- Artists.Separator_Set(0, __T(" / "));
- Fill(StreamKind_Common, 0, "Accompaniment", Accompaniments.Read());
- }
-
- if (!AlbumArtists.empty())
- {
- AlbumArtists.Separator_Set(0, __T(" / "));
- Fill(StreamKind_Common, 0, (Performers==Artists || Performers.empty())?"Album/Performer":"Album/Composer", AlbumArtists.Read());
- }
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_VorbisCom::FileHeader_Parse()
-{
- //Parsing
- Ztring vendor_string;
- int32u vendor_length;
- Get_L4 (vendor_length, "vendor_length");
- Get_Local(vendor_length, vendor_string, "vendor_string");
- Get_L4 (user_comment_list_length, "user_comment_list_length");
-
- FILLING_BEGIN();
- Accept("VorbisCom");
-
- if (Count_Get(Stream_General)==0)
- Stream_Prepare(Stream_General);
- if (StreamKind_Specific!=Stream_General)
- Stream_Prepare(StreamKind_Specific);
- if (StreamKind_Multiple!=Stream_General && StreamKind_Multiple!=StreamKind_Specific)
- Stream_Prepare(StreamKind_Multiple);
-
- //vendor_string
- if (StreamKind_Specific!=Stream_Audio && vendor_string.find(__T("Xiph.Org libVorbis"))==0)
- vendor_string.clear(); //string was set "by default"
- Ztring Library_Name, Library_Version, Library_Date;
- Ztring vendor_string_Without=vendor_string; vendor_string_Without.FindAndReplace(__T(";"), __T(""), 0, Ztring_Recursive);
- Library_Version=MediaInfoLib::Config.Library_Get(InfoLibrary_Format_VorbisCom, vendor_string_Without, InfoLibrary_Version);
- Library_Date=MediaInfoLib::Config.Library_Get(InfoLibrary_Format_VorbisCom, vendor_string_Without, InfoLibrary_Date);
- if (Library_Version.empty())
- {
- if (vendor_string.find(__T(" I "))!=std::string::npos)
- {
- Library_Name=vendor_string.SubString(__T(""), __T(" I "));
- Library_Date=vendor_string.SubString(__T(" I "), __T(""));
- if (Library_Date.size()>9)
- {
- Library_Version=Library_Date.substr(9, std::string::npos);
- if (Library_Version.find(__T("("))==std::string::npos)
- {
- Library_Version.FindAndReplace(__T(" "), __T("."), 0, Ztring_Recursive);
- Library_Date.resize(8);
- }
- }
- }
- else if (vendor_string.size()>9 && Ztring(vendor_string.substr(vendor_string.size()-8, std::string::npos)).To_int32u()>20000000)
- {
- Library_Name=vendor_string.substr(0, vendor_string.size()-9);
- Library_Date=vendor_string.substr(vendor_string.size()-8, std::string::npos);
- if (!Library_Name.empty())
- {
- std::string::size_type Pos=Library_Name.rfind(__T(' '));
- if (Pos<Library_Name.size()-2 && Library_Name[Pos+1]>=__T('0') && Library_Name[Pos+1]<=__T('9'))
- {
- Library_Version=Library_Name.substr(Pos+1, std::string::npos);
- Library_Name.resize(Pos);
- }
- }
- }
- else if (vendor_string.find(__T("aoTuV "))!=std::string::npos)
- {
- Library_Name=__T("aoTuV");
- Library_Version=vendor_string.SubString(__T("aoTuV "), __T("["));
- Library_Date=vendor_string.SubString(__T("["), __T("]"));
- }
- else if (vendor_string.find(__T("Lancer "))!=std::string::npos)
- {
- Library_Name=__T("Lancer");
- Library_Date=vendor_string.SubString(__T("["), __T("]"));
- }
- if (Library_Version.empty())
- Library_Version=Library_Date;
- if (Library_Date.size()==8)
- {
- Library_Date.insert(6, 1, __T('-'));
- Library_Date.insert(4, 1, __T('-'));
- Library_Date.insert(0, __T("UTC "));
- }
- }
- if (vendor_string.find(__T("libFLAC"))!=std::string::npos) Library_Name="libFLAC";
- if (vendor_string.find(__T("libVorbis I"))!=std::string::npos) Library_Name="libVorbis";
- if (vendor_string.find(__T("libTheora I"))!=std::string::npos) Library_Name="libTheora";
- if (vendor_string.find(__T("AO; aoTuV"))==0) Library_Name="aoTuV";
- if (vendor_string.find(__T("BS; Lancer"))==0) Library_Name="Lancer";
-
- Fill(StreamKind_Specific, 0, "Encoded_Library", vendor_string);
- Fill(StreamKind_Specific, 0, "Encoded_Library_Name", Library_Name);
- Fill(StreamKind_Specific, 0, "Encoded_Library_Version", Library_Version);
- Fill(StreamKind_Specific, 0, "Encoded_Library_Date", Library_Date);
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_VorbisCom::Header_Parse()
-{
- //Parsing
- int32u user_comment_length;
- Get_L4 (user_comment_length, "length");
-
- //Filling
- Header_Fill_Size(Element_Offset+user_comment_length);
-}
-
-//---------------------------------------------------------------------------
-void File_VorbisCom::Data_Parse()
-{
- user_comment_list_length--;
-
- //Parsing
- Ztring comment;
- Get_UTF8(Element_Size, comment, "comment");
- if (Element_Size && comment.empty())
- {
- Element_Offset=0; //Retry
- Get_Local(Element_Size, comment, "comment");
- }
- Element_Name(comment);
-
- FILLING_BEGIN_PRECISE();
- Ztring Key=comment.SubString(__T(""), __T("="));
- Key.MakeUpperCase();
- Ztring Value=comment.SubString(__T("="), __T(""));
-
- if (Key==__T("ADDED_TIMESTAMP")) Fill(StreamKind_Common, 0, "Added_Date", Ztring().Date_From_Milliseconds_1601(Value.To_int64u()/1000));
- else if (Key==__T("ALBUM ARTIST")) AlbumArtists.push_back(Value);
- else if (Key==__T("ALBUM")) Fill(StreamKind_Common, 0, "Album", Value);
- else if (Key==__T("ALBUM_COMMENT")) Fill(StreamKind_Common, 0, "Comment", Value);
- else if (Key==__T("ALBUMARTIST")) AlbumArtists.push_back(Value);
- else if (Key==__T("ARTIST")) Artists.push_back(Value);
- else if (Key==__T("AUTHOR")) Fill(StreamKind_Common, 0, "WrittenBy", Value);
- else if (Key==__T("BUYCDURL")) {}
- else if (Key==__T("CLASS")) Fill(StreamKind_Common, 0, "ContentType", Value);
- else if (Key==__T("COMPOSER")) Fill(StreamKind_Common, 0, "Composer", Value);
- else if (Key==__T("COMMENT")) Fill(StreamKind_Common, 0, "Comment", Value);
- else if (Key==__T("COMMENTS")) Fill(StreamKind_Common, 0, "Comment", Value);
- else if (Key==__T("CONDUCTOR")) Fill(StreamKind_Common, 0, "Conductor", Value);
- else if (Key==__T("CONTACT")) Fill(StreamKind_Common, 0, "Publisher", Value);
- else if (Key==__T("COPYRIGHT")) Fill(StreamKind_Common, 0, "Copyright", Value);
- else if (Key==__T("DATE")) Fill(StreamKind_Common, 0, "Recorded_Date", Value, true);
- else if (Key==__T("DESCRIPTION")) Fill(StreamKind_Common, 0, "Description", Value);
- else if (Key==__T("DISC")) Fill(StreamKind_Common, 0, "Part", Value, true);
- else if (Key==__T("DISCID")) {}
- else if (Key==__T("DISCNUMBER")) Fill(StreamKind_Common, 0, "Part", Value, true);
- else if (Key==__T("DISCTOTAL")) Fill(StreamKind_Common, 0, "Part/Position_Total", Value);
- else if (Key==__T("ENCODEDBY")) Fill(StreamKind_Common, 0, "EncodedBy", Value);
- else if (Key==__T("ENCODED-BY")) Fill(StreamKind_Common, 0, "EncodedBy", Value);
- else if (Key==__T("ENCODER")) Fill(StreamKind_Common, 0, "Encoded_Application", Value);
- else if (Key==__T("ENCODED_USING")) Fill(StreamKind_Common, 0, "Encoded_Application", Value);
- else if (Key==__T("ENCODER_URL")) Fill(StreamKind_Common, 0, "Encoded_Application/Url", Value);
- else if (Key==__T("ENSEMBLE")) Accompaniments.push_back(Value);
- else if (Key==__T("GENRE")) Fill(StreamKind_Common, 0, "Genre", Value);
- else if (Key==__T("FIRST_PLAYED_TIMESTAMP")) Fill(StreamKind_Common, 0, "Played_First_Date", Ztring().Date_From_Milliseconds_1601(Value.To_int64u()/10000));
- else if (Key==__T("ISRC")) Fill(StreamKind_Multiple, 0, "ISRC", Value);
- else if (Key==__T("LABEL")) Fill(StreamKind_Common, 0, "Label", Value);
- else if (Key==__T("LANGUAGE")) {if (Value.find(__T("Director"))==0) Fill(StreamKind_Specific, 0, "Language_More", Value); else if (!Value.SubString(__T("["), __T("]")).empty()) Fill(StreamKind_Specific, 0, "Language", Value.SubString(__T("["), __T("]"))); else Fill(StreamKind_Specific, 0, "Language", Value);}
- else if (Key==__T("LAST_PLAYED_TIMESTAMP")) Fill(StreamKind_Multiple, 0, "Played_Last_Date", Ztring().Date_From_Milliseconds_1601(Value.To_int64u()/10000));
- else if (Key==__T("LICENCE")) Fill(StreamKind_Common, 0, "TermsOfUse", Value);
- else if (Key==__T("LICENSE")) Fill(StreamKind_Common, 0, "TermsOfUse", Value);
- else if (Key==__T("LYRICS")) Fill(StreamKind_Common, 0, "Lyrics", Value);
- else if (Key==__T("LWING_GAIN")) Fill(StreamKind_Multiple, 0, "ReplayGain_Gain", Value.To_float64(), 2);
- else if (Key==__T("LOCATION")) Fill(StreamKind_Common, 0, "Recorded/Location", Value);
- else if (Key==__T("MUSICBRAINZ_ALBUMID")) {}
- else if (Key==__T("MUSICBRAINZ_ALBUMARTISTID")) {}
- else if (Key==__T("MUSICBRAINZ_ARTISTID")) {}
- else if (Key==__T("MUSICBRAINZ_TRACKID")) {}
- else if (Key==__T("MUSICBRAINZ_SORTNAME")) Fill(StreamKind_Common, 0, "Performer/Sort", Value);
- else if (Key==__T("MUSICBRAINZ_DISCID")) {}
- else if (Key==__T("ORGANIZATION")) Fill(StreamKind_Common, 0, "Producer", Value);
- else if (Key==__T("PERFORMER")) Performers.push_back(Value);
- else if (Key==__T("PLAY_COUNT")) Fill(StreamKind_Multiple, 0, "Played_Count", Value.To_int64u());
- else if (Key==__T("RATING")) Fill(StreamKind_Multiple, 0, "Rating", Value);
- else if (Key==__T("REPLAYGAIN_ALBUM_GAIN")) Fill(StreamKind_Common, 0, "Album_ReplayGain_Gain", Value.To_float64(), 2);
- else if (Key==__T("REPLAYGAIN_ALBUM_PEAK")) Fill(StreamKind_Common, 0, "Album_ReplayGain_Peak", Value.To_float64(), 6);
- else if (Key==__T("REPLAYGAIN_REFERENCE_LOUDNESS")) {}
- else if (Key==__T("REPLAYGAIN_TRACK_GAIN")) Fill(StreamKind_Specific, 0, "ReplayGain_Gain", Value.To_float64(), 2);
- else if (Key==__T("REPLAYGAIN_TRACK_PEAK")) Fill(StreamKind_Specific, 0, "ReplayGain_Peak", Value.To_float64(), 6);
- else if (Key==__T("TITLE")) Fill(StreamKind_Common, 0, "Title", Value);
- else if (Key==__T("TOTALTRACKS")) Fill(StreamKind_Common, 0, "Track/Position_Total", Value);
- else if (Key==__T("TOTALDISCS")) Fill(StreamKind_Common, 0, "Part/Position_Total", Value);
- else if (Key==__T("TRACK_COMMENT")) Fill(StreamKind_Multiple, 0, "Comment", Value);
- else if (Key==__T("TRACKNUMBER")) Fill(StreamKind_Multiple, 0, "Track/Position", Value);
- else if (Key==__T("TRACKTOTAL")) Fill(StreamKind_Multiple, 0, "Track/Position_Total", Value);
- else if (Key==__T("VERSION")) Fill(StreamKind_Common, 0, "Track/More", Value);
- else if (Key==__T("BPM")) Fill(StreamKind_Common, 0, "BPM", Value);
- else if (Key==__T("WAVEFORMATEXTENSIBLE_CHANNEL_MASK"))
- {
- //This is an hexadecimal value
- if (Value.size()>2 && Value[0]==__T('0') && Value[1]==__T('x'))
- {
- int16u ValueI=0;
- for (size_t Pos=2; Pos<Value.size(); Pos++)
- {
- ValueI*=16;
- if (Value[Pos]>=__T('0') && Value[Pos]<=__T('9'))
- ValueI+=Value[Pos]-__T('0');
- else if (Value[Pos]>=__T('A') && Value[Pos]<=__T('F'))
- ValueI+=10+Value[Pos]-__T('A');
- else if (Value[Pos]>=__T('a') && Value[Pos]<=__T('f'))
- ValueI+=10+Value[Pos]-__T('a');
- else
- break;
- }
- Fill(Stream_Audio, 0, Audio_ChannelPositions, ExtensibleWave_ChannelMask(ValueI));
- Fill(Stream_Audio, 0, Audio_ChannelPositions_String2, ExtensibleWave_ChannelMask2(ValueI));
- }
- }
- else if (Key==__T("YEAR")) {if (Value!=Retrieve(StreamKind_Common, 0, "Recorded_Date")) Fill(StreamKind_Common, 0, "Recorded_Date", Value);}
- else if (Key.find(__T("COVERART"))==0)
- {
- if (Key==__T("COVERARTCOUNT"))
- ;
- else if (Key.find(__T("COVERARTMIME"))==0)
- Fill(Stream_General, 0, General_Cover_Mime, Value);
- else if (Key.find(__T("COVERARTFILELINK"))==0)
- Fill(Stream_General, 0, General_Cover_Data, __T("file://")+Value);
- else if (Key.find(__T("COVERARTTYPE"))==0)
- Fill(Stream_General, 0, General_Cover_Type, Id3v2_PictureType(Value.To_int8u()));
- }
- else if (Key.find(__T("CHAPTER"))==0)
- {
- if (Count_Get(Stream_Menu)==0)
- {
- Stream_Prepare(Stream_Menu);
- Fill(Stream_Menu, StreamPos_Last, Menu_Chapters_Pos_Begin, Count_Get(Stream_Menu, StreamPos_Last), 10, true);
- }
- if (Key.find(__T("NAME"))==Error)
- {
- Chapter_Pos=Key.SubString(__T("CHAPTER"), __T(""));
- Chapter_Time=Value;
- }
- else
- {
- Value.FindAndReplace(__T("\n"), __T(""), Count_Get(Stream_Text)-1); //Some chapters names have extra characters, not needed
- Value.FindAndReplace(__T("\r"), __T(""), Count_Get(Stream_Text)-1); //Some chapters names have extra characters, not needed
- Value.FindAndReplace(__T(" "), __T(""), Count_Get(Stream_Text)-1); //Some chapters names have extra characters, not needed
- Fill(Stream_Menu, 0, Chapter_Time.To_UTF8().c_str(), Value);
- }
- Fill(Stream_Menu, StreamPos_Last, Menu_Chapters_Pos_End, Count_Get(Stream_Menu, StreamPos_Last), 10, true);
- }
- else Fill(Stream_General, 0, comment.SubString(__T(""), __T("=")).To_Local().c_str(), Value);
- FILLING_END();
-
- if (user_comment_list_length==0)
- Finish("VorbisCom");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_VORBISCOM_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_VorbisCom.h b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_VorbisCom.h
deleted file mode 100644
index a27942f01..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_VorbisCom.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Vorbis comments
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_VorbisComH
-#define MediaInfo_File_VorbisComH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "ZenLib/ZtringList.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_VorbisCom
-//***************************************************************************
-
-class File_VorbisCom : public File__Analyze
-{
-public :
- //In
- stream_t StreamKind_Specific; //Always in this stream kind whatever is the configuration
- stream_t StreamKind_Multiple; //Specific stream kind depend if there is multiple streams or not
- stream_t StreamKind_Common; //Stream kind for common values
-
- //Constructor/Destructor
- File_VorbisCom();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - File header
- void FileHeader_Parse();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Temp
- int32u user_comment_list_length;
- Ztring Chapter_Pos;
- Ztring Chapter_Time;
- ZtringList Performers;
- ZtringList Artists;
- ZtringList Accompaniments;
- ZtringList AlbumArtists;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Xmp.cpp b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Xmp.cpp
deleted file mode 100644
index 9ececa92a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Xmp.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PDF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File_Xmp.h"
-#include <cstring>
-#include "tinyxml2.h"
-using namespace tinyxml2;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Xmp::FileHeader_Begin()
-{
- XMLDocument document;
- if (!FileHeader_Begin_XML(document))
- return false;
-
- std::string NameSpace;
- XMLElement* XmpMeta=document.FirstChildElement("xmpmeta");
- if (XmpMeta==NULL)
- {
- NameSpace="x:";
- XmpMeta=document.FirstChildElement((NameSpace+"xmpmeta").c_str());
- }
- if (!XmpMeta)
- {
- Reject("XMP");
- return false;
- }
-
- XMLElement* Rdf=XmpMeta->FirstChildElement("RDF");
- if (Rdf==NULL)
- {
- NameSpace="rdf:";
- Rdf=XmpMeta->FirstChildElement((NameSpace+"RDF").c_str());
- }
- if (!Rdf)
- {
- Reject("XMP");
- return false;
- }
-
- Accept("XMP");
-
- for (XMLElement* Rdf_Item=Rdf->FirstChildElement(); Rdf_Item; Rdf_Item=Rdf_Item->NextSiblingElement())
- {
- //RDF item
- if (!strcmp(Rdf_Item->Value(), (NameSpace+"Description").c_str()))
- {
- const char* Attribute;
-
- Attribute=Rdf_Item->Attribute("xmlns:pdfaid");
- if (Attribute)
- {
- string Profile;
-
- if (strcmp(Attribute, "http://www.aiim.org/pdfa/ns/id/"))
- Profile=Attribute;
- else
- {
- Profile+="A";
-
- Attribute=Rdf_Item->Attribute("pdfaid:part");
- if (Attribute)
- {
- Profile+='-';
- Profile+=Attribute;
-
- Attribute=Rdf_Item->Attribute("pdfaid:conformance");
- if (Attribute)
- {
- string Conformance(Attribute);
- if (Conformance.size()==1 && Conformance[0]>='A' && Conformance[0]<='Z')
- Conformance[0]+=0x20; // From "A" to "a"
- Profile+=Conformance;
- }
- }
- }
-
- Fill(Stream_General, 0, General_Format_Profile, Profile);
- }
- }
- }
-
- Finish();
- return true;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_PDF_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Xmp.h b/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Xmp.h
deleted file mode 100644
index 38e0a6d80..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File_Xmp.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about XMP files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_XmpH
-#define MediaInfo_File_XmpH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Sami
-//***************************************************************************
-
-class File_Xmp : public File__Analyze
-{
-private :
- //Buffer - File header
- bool FileHeader_Begin();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File__Tags.cpp b/src/thirdparty/MediaInfo/MediaInfo/Tag/File__Tags.cpp
deleted file mode 100644
index 4d6aee0cf..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File__Tags.cpp
+++ /dev/null
@@ -1,655 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Tag/File__Tags.h"
-#if defined(MEDIAINFO_APETAG_YES)
- #include "MediaInfo/Tag/File_ApeTag.h"
-#endif //MEDIAINFO_APETAG_YES
-#if defined(MEDIAINFO_ID3_YES)
- #include "MediaInfo/Tag/File_Id3.h"
-#endif //MEDIAINFO_ID3_YES
-#if defined(MEDIAINFO_ID3V2_YES)
- #include "MediaInfo/Tag/File_Id3v2.h"
-#endif //MEDIAINFO_ID3V2_YES
-#if defined(MEDIAINFO_LYRICS3_YES)
- #include "MediaInfo/Tag/File_Lyrics3.h"
-#endif //MEDIAINFO_LYRICS3_YES
-#if defined(MEDIAINFO_LYRICS3V2_YES)
- #include "MediaInfo/Tag/File_Lyrics3v2.h"
-#endif //MEDIAINFO_LYRICS3V2_YES
- #include "MediaInfo/File_Unknown.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File__Tags_Helper::File__Tags_Helper()
-{
- //In
- Base=NULL;
-
- //Out
- TagsSize=0;
- File_BeginTagSize=0;
- File_EndTagSize=0;
-
- //Temp
- Parser=NULL;
- Id3v1_Offset=(int64u)-1;
- Lyrics3_Offset=(int64u)-1;
- Lyrics3v2_Offset=(int64u)-1;
- ApeTag_Offset=(int64u)-1;
- JumpTo_WantedByParser=(int64u)-1;
- Id3v1_Size=0;
- Lyrics3_Size=0;
- Lyrics3v2_Size=0;
- ApeTag_Size=0;
- TagSizeIsFinal=false;
- SearchingForEndTags=false;
-}
-
-//---------------------------------------------------------------------------
-File__Tags_Helper::~File__Tags_Helper()
-{
- delete Parser; //Parser=NULL;
- for (size_t Pos=0; Pos<Parser_Streams_Fill.size(); Pos++)
- delete Parser_Streams_Fill[Pos]; //Parser_Streams_Fill[Pos]=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Tags_Helper::Streams_Fill()
-{
- for (size_t Pos=0; Pos<Parser_Streams_Fill.size(); Pos++)
- {
- if (Parser_Streams_Fill[Pos] && Parser_Streams_Fill[Pos]->Status[File__Analyze::IsAccepted])
- {
- #ifndef MEDIAINFO_ID3V2_YES
- const bool Priority=false;
- #else
- bool Priority=Parser_Streams_Fill_Priority[Pos];
- #endif
-
- Parser_Streams_Fill[Pos]->Read_Buffer_Finalize();
- Base->Merge(*(Parser_Streams_Fill[Pos]), Stream_General, 0, 0, Priority);
- Base->Merge(*(Parser_Streams_Fill[Pos]), Stream_Audio , 0, 0, Priority);
- }
- delete Parser_Streams_Fill[Pos]; //Parser_Streams_Fill[Pos]=NULL;
- }
- Parser_Streams_Fill.clear();
-}
-
-//---------------------------------------------------------------------------
-void File__Tags_Helper::Streams_Finish()
-{
- if (!Base->IsSub)
- {
- Base->Fill(Stream_General, 0, General_StreamSize, TagsSize+Base->Retrieve(Stream_General, 0, General_StreamSize).To_int64u(), 10, true);
- if (Base->Retrieve(Stream_Audio, 0, Audio_StreamSize).empty())
- Base->Fill(Stream_Audio, 0, Audio_StreamSize, Base->File_Size-TagsSize);
- }
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File__Tags_Helper::Read_Buffer_Continue()
-{
- //Tags
- bool Tag_Found;
- if (File__Tags_Helper::Synchronize(Tag_Found) && Tag_Found)
- File__Tags_Helper::Synched_Test();
- return true;
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File__Tags_Helper::Synchronize(bool &Tag_Found, size_t Synchro_Offset)
-{
- //Buffer size
- if (Parser)
- {
- Synched_Test();
- if (Parser)
- return false;
- }
-
- if (SearchingForEndTags)
- {
- GoTo(0, "Tags detected");
- return false;
- }
-
- if (!Synchro_Offset)
- {
- if (!Synched_Test()) //Handling begin/intermediate Id3v2
- return false;
- }
-
- //ID
- if (Base->Buffer_Offset+Synchro_Offset+8>Base->Buffer_Size)
- return false;
- int32u ID3=CC3(Base->Buffer+Base->Buffer_Offset+Synchro_Offset);
- int64u ID8=CC8(Base->Buffer+Base->Buffer_Offset+Synchro_Offset);
- if (ID3==0x494433 //"ID3"
- || ID8==0x4150455441474558LL //"APETAGEX"
- || ID8==0x4C59524943534245LL //"LYRICSBE"
- || ID3==0x544147) //"TAG" / "TAG+"
- Tag_Found=true;
- else
- Tag_Found=false;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File__Tags_Helper::Synched_Test()
-{
- if (SearchingForEndTags)
- return true;
-
- for (;;)
- {
- #ifdef MEDIAINFO_ID3V2_YES
- bool Priority=false;
- #else
- const bool Priority=false;
- #endif
-
- if (!Parser)
- {
- //Must have enough buffer for having header
- if (Base->Buffer_Offset+8>Base->Buffer_Size)
- return Base->IsSub; //If IsSub, we consider this is a complete block
-
- //Quick test of synchro
- int32u ID=CC3(Base->Buffer+Base->Buffer_Offset);
- int32u ID4=CC4(Base->Buffer+Base->Buffer_Offset);
- int64u ID8=CC8(Base->Buffer+Base->Buffer_Offset);
- if (ID==0x494433 || ID==0x656133) //"ID3" and "ea3" (found in OpenMG)
- {
- if (Base->Buffer_Offset+10>Base->Buffer_Size)
- return false;
- int32u Size=BigEndian2int32u(Base->Buffer+Base->Buffer_Offset+6);
- Parser_Buffer_Size=(((Size>>0)&0x7F)
- | ((Size>>1)&0x3F80)
- | ((Size>>2)&0x1FC000)
- | ((Size>>3)&0x0FE00000))
- +10;
- if (Base->Buffer_Offset+Parser_Buffer_Size>Base->Buffer_Size)
- return false;
- if (!TagSizeIsFinal)
- File_BeginTagSize+=Parser_Buffer_Size;
- if (Base->File_Offset_FirstSynched==(int64u)-1)
- Base->Buffer_TotalBytes_FirstSynched_Max+=Parser_Buffer_Size;
- #ifdef MEDIAINFO_ID3V2_YES
- Parser=new File_Id3v2;
- Priority=true;
- #else
- Parser=new File_Unknown;
- #endif
- Base->Element_Begin1("Id3v2");
- }
- else if (ID8==0x4150455441474558LL) //"APETAGEX"
- {
- if (Base->Buffer_Offset+16>Base->Buffer_Size)
- return false;
- Parser_Buffer_Size=LittleEndian2int32u(Base->Buffer+Base->Buffer_Offset+12);
- if (LittleEndian2int32u(Base->Buffer+Base->Buffer_Offset+8))
- Parser_Buffer_Size+=32;
- if (Base->Buffer_Offset+Parser_Buffer_Size>Base->Buffer_Size)
- return false;
- if (!TagSizeIsFinal)
- File_BeginTagSize+=Parser_Buffer_Size;
- if (Base->File_Offset_FirstSynched==(int64u)-1)
- Base->Buffer_TotalBytes_FirstSynched_Max+=Parser_Buffer_Size;
- #ifdef MEDIAINFO_APETAG_YES
- Parser=new File_ApeTag;
- #else
- Parser=new File_Unknown;
- #endif
- Base->Element_Begin1("ApeTag");
- }
- else if (ID8==0x4C59524943534245LL) //"LYRICSBE"
- {
- if (Base->Buffer_Offset+16>Base->Buffer_Size)
- return false;
- //Searching for "LYRICS200"
- std::string Buf((const char*)(Base->Buffer+Base->Buffer_Offset), Base->Buffer_Size-Base->Buffer_Offset);
- size_t Pos2=Buf.find("LYRICS200");
- size_t Pos1=std::string::npos;
- if (Pos2==std::string::npos)
- Pos1=Buf.find("LYRICSEND");
- if (Pos2!=std::string::npos)
- Parser_Buffer_Size=Pos2+9;
- else if (Pos1!=std::string::npos)
- Parser_Buffer_Size=Pos1+9;
- else
- Parser_Buffer_Size=(size_t)(Base->File_Size-(Base->File_Offset+Base->Buffer_Offset));
- if (Base->Buffer_Offset+Parser_Buffer_Size>Base->Buffer_Size)
- return false;
- if (!TagSizeIsFinal)
- File_BeginTagSize+=Parser_Buffer_Size;
- if (Base->File_Offset_FirstSynched==(int64u)-1)
- Base->Buffer_TotalBytes_FirstSynched_Max+=Parser_Buffer_Size;
- if (Pos2!=std::string::npos)
- {
- #ifdef MEDIAINFO_LYRICS3V2_YES
- Parser=new File_Lyrics3v2;
- ((File_Lyrics3v2*)Parser)->TotalSize=Parser_Buffer_Size;
- #else
- Parser=new File_Unknown;
- #endif
- Base->Element_Begin1("Lyrics2");
- }
- else if (Pos1!=std::string::npos)
- {
- #ifdef MEDIAINFO_LYRICS3_YES
- Parser=new File_Lyrics3;
- ((File_Lyrics3*)Parser)->TotalSize=Parser_Buffer_Size;
- #else
- Parser=new File_Unknown;
- #endif
- Base->Element_Begin1("Lyrics");
- }
- else
- {
- Parser=new File_Unknown;
- Base->Element_Begin1("Problem");
- }
- }
- else if (ID4==0x5441472B) //"TAG+"
- {
- #ifdef MEDIAINFO_ID3_YES
- Parser=new File_Id3;
- #else
- Parser=new File_Unknown;
- #endif
- Parser_Buffer_Size=227+128;
- Base->Element_Begin1("Id3+");
- }
- else if (ID==0x544147) //"TAG"
- {
- #ifdef MEDIAINFO_ID3_YES
- Parser=new File_Id3;
- #else
- Parser=new File_Unknown;
- #endif
- Parser_Buffer_Size=128;
- if (!TagSizeIsFinal)
- File_BeginTagSize+=Parser_Buffer_Size;
- Base->Element_Begin1("Id3");
- }
- else if (Base->File_Offset+Base->Buffer_Offset==Lyrics3_Offset)
- {
- #ifdef MEDIAINFO_LYRICS3_YES
- Parser=new File_Lyrics3;
- ((File_Lyrics3*)Parser)->TotalSize=Lyrics3_Size;
- #else
- Parser=new File__Analyze;
- #endif
- Parser_Buffer_Size=(size_t)Lyrics3_Size;
- if (!TagSizeIsFinal)
- File_BeginTagSize+=Parser_Buffer_Size;
- Base->Element_Begin1("Lyrics3");
- }
- else if (Base->File_Offset+Base->Buffer_Offset==Lyrics3v2_Offset)
- {
- #ifdef MEDIAINFO_LYRICS3V2_YES
- Parser=new File_Lyrics3v2;
- ((File_Lyrics3v2*)Parser)->TotalSize=Lyrics3v2_Size;
- #else
- Parser=new File_Unknown;
- #endif
- Parser_Buffer_Size=(size_t)Lyrics3v2_Size;
- if (!TagSizeIsFinal)
- File_BeginTagSize+=Parser_Buffer_Size;
- Base->Element_Begin1("Lyrics3v2");
- }
- else if (Base->File_Offset+Base->Buffer_Offset==ApeTag_Offset)
- {
- #ifdef MEDIAINFO_APETAG_YES
- Parser=new File_ApeTag;
- #else
- Parser=new File_Unknown;
- #endif
- if (!TagSizeIsFinal)
- File_BeginTagSize+=Parser_Buffer_Size;
- Parser_Buffer_Size=(size_t)ApeTag_Size;
- Base->Element_Begin1("ApeTag");
- }
- else
- break;
- Base->Open_Buffer_Init(Parser);
- }
-
- //We continue
- if (Parser)
- {
- if (!Parser_Buffer_Size)
- {
- delete Parser; Parser=NULL;
- return false; //Probably stuck in a loop, exit
- }
- int64u Size_ToParse=(Parser_Buffer_Size<Base->Buffer_Size-Base->Buffer_Offset)?Parser_Buffer_Size:(Base->Buffer_Size-Base->Buffer_Offset);
- Base->Open_Buffer_Continue(Parser, Base->Buffer+Base->Buffer_Offset, (size_t)Size_ToParse);
- Base->Buffer_Offset+=(size_t)Size_ToParse;
- TagsSize+=Size_ToParse;
- Parser_Buffer_Size-=(size_t)Size_ToParse;
- if (Parser->Status[File__Analyze::IsFinished] || Parser_Buffer_Size==0)
- {
- if (Base->Status[File__Analyze::IsAccepted] && Parser->Count_Get(Stream_General)>0)
- {
- if (!Base->Status[File__Analyze::IsFilled])
- Base->Fill();
- Parser->Read_Buffer_Finalize();
- Base->Merge(*Parser, Stream_General, 0, 0, Priority);
- Base->Merge(*Parser, Stream_Audio , 0, 0, Priority);
- delete Parser; Parser=NULL;
- }
- else
- {
- Parser_Streams_Fill.push_back(Parser);
- #ifdef MEDIAINFO_ID3V2_YES
- Parser_Streams_Fill_Priority.push_back(Priority);
- #endif
- Parser=NULL;
- }
- if (Parser_Buffer_Size)
- Base->Skip_XX(Parser_Buffer_Size, "Data continued");
- Base->Element_Show();
- Base->Element_End0();
- }
- else
- break;
- }
- }
-
- return true;
-}
-
-//***************************************************************************
-// Streams
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t File__Tags_Helper::Stream_Prepare(stream_t StreamKind)
-{
- if (Base->Count_Get(StreamKind))
- return 1; //Only one is permited
- return Base->Stream_Prepare(StreamKind);
-}
-
-//***************************************************************************
-// End
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File__Tags_Helper::GoTo (int64u GoTo, const char* ParserName)
-{
- if (Base->IsSub)
- {
- Base->GoTo(GoTo, ParserName);
- return;
- }
-
- //Normal Data_GoTo;
-
- //Configuring
- if (!SearchingForEndTags)
- {
- if (GoTo==(int64u)-1)
- JumpTo_WantedByParser=Base->File_Offset+Base->Buffer_Offset;
- else
- JumpTo_WantedByParser=GoTo;
- SearchingForEndTags=true;
- }
-
- //Trying to parse tags
- while (!TagSizeIsFinal && DetectBeginOfEndTags_Test());
-
- //If a jump is requested
- if (!TagSizeIsFinal)
- return;
-
- //Positionning (if finnished)
- if (TagSizeIsFinal)
- {
- if (JumpTo_WantedByParser!=(int64u)-1)
- {
- if (JumpTo_WantedByParser<Id3v1_Size+Lyrics3_Size+Lyrics3v2_Size+ApeTag_Size)
- Base->GoTo(JumpTo_WantedByParser, ParserName);
- else
- Base->GoTo(JumpTo_WantedByParser-Id3v1_Size-Lyrics3_Size-Lyrics3v2_Size-ApeTag_Size, ParserName);
- }
- SearchingForEndTags=false;
- }
- else
- Base->GoTo(GoTo, ParserName);
-}
-
-//---------------------------------------------------------------------------
-void File__Tags_Helper::GoToFromEnd (int64u GoToFromEnd, const char* ParserName)
-{
- if (GoToFromEnd>Base->File_Size)
- {
- if (ParserName)
- {
- bool MustElementBegin=Base->Element_Level?true:false;
- if (Base->Element_Level>0)
- Base->Element_End0(); //Element
- Base->Info(Ztring(ParserName)+__T(", wants to go to somewhere, but not valid"));
- if (MustElementBegin)
- Base->Element_Level++;
- }
- Finish(ParserName);
- return;
- }
-
- GoTo(Base->File_Size-GoToFromEnd, ParserName);
-}
-
-//---------------------------------------------------------------------------
-void File__Tags_Helper::Accept (const char* ParserName)
-{
- Base->Accept(ParserName);
-}
-
-//---------------------------------------------------------------------------
-void File__Tags_Helper::Reject (const char* ParserName)
-{
- Base->Reject(ParserName);
-}
-
-//---------------------------------------------------------------------------
-void File__Tags_Helper::Finish (const char* ParserName)
-{
- if (ParserName)
- {
- bool MustElementBegin=Base->Element_Level?true:false;
- if (Base->Element_Level>0)
- Base->Element_End0(); //Element
- Base->Info(Ztring(ParserName)+__T(", finished but searching tags"));
- if (MustElementBegin)
- Base->Element_Level++;
- }
-
- GoToFromEnd(0, ParserName);
-}
-
-//---------------------------------------------------------------------------
-bool File__Tags_Helper::DetectBeginOfEndTags_Test()
-{
- TagSizeIsFinal=true;
-
- //Id3v1
- if (Id3v1_Size==0 && File_EndTagSize==0 && Base->File_Size>=128) //Only one, at the end, larger than 128 bytes
- {
- if (Base->File_Offset>Base->File_Size-128-32) //Must be at least at the end less 128 bytes
- {
- Base->GoTo(Base->File_Size-128-32, "Tags detection"); //32 to be able to quickly see another tag system
- TagSizeIsFinal=false;
- return false;
- }
-
- if (Base->File_Offset+Base->Buffer_Size<Base->File_Size) //Must be at least at the end less 128 bytes of tags
- {
- if (Base->File_Offset<Base->File_Size-128-32)
- Base->GoTo(Base->File_Size-128-32, "Tags detection");
- TagSizeIsFinal=false;
- return false;
- }
-
- if (CC3(Base->Buffer+((size_t)((Base->File_Size-128)-Base->File_Offset)))==CC3("TAG"))
- {
- Id3v1_Size=128;
- File_EndTagSize+=128;
- Id3v1_Offset=Base->File_Size-File_EndTagSize;
- TagSizeIsFinal=false;
- }
- }
-
- //Lyrics3
- if (Lyrics3_Size==0 && Base->File_Size>=File_EndTagSize+9) //Only one, larger than File_EndTagSize+15 bytes
- {
- if (Base->File_Offset>Base->File_Size-File_EndTagSize-9) //Must be at the end less 15 bytes
- {
- Base->GoTo(Base->File_Size-File_EndTagSize-9, "Tags");
- TagSizeIsFinal=false;
- return false;
- }
-
- if (Base->File_Offset+Base->Buffer_Size<Base->File_Size-File_EndTagSize) //Must be at the end less File_EndTagSize+9 bytes plus 9 bytes of tags
- {
- if (Base->File_Offset!=Base->File_Size-File_EndTagSize)
- Base->GoTo(Base->File_Size-File_EndTagSize, "Tags");
- TagSizeIsFinal=false;
- return false;
- }
-
- if (CC8(Base->Buffer+((size_t)((Base->File_Size-File_EndTagSize-9)-Base->File_Offset)))==CC8("LYRICSEN"))
- {
- //Must find the beginning, 5100 bytes before
- if (Base->File_Offset>Base->File_Size-File_EndTagSize-5100) //Must be at the end less 15 bytes
- {
- Base->GoTo(Base->File_Size-File_EndTagSize-5100, "Tags");
- TagSizeIsFinal=false;
- return false;
- }
-
- if (Base->File_Offset+Base->Buffer_Size<Base->File_Size-File_EndTagSize) //Must be at the end less File_EndTagSize
- {
- if (Base->File_Offset!=Base->File_Size-File_EndTagSize)
- Base->GoTo(Base->File_Size-File_EndTagSize, "Tags");
- TagSizeIsFinal=false;
- return false;
- }
-
- //Searching for "LYRICSBEGIN"
- std::string Buf((const char*)(Base->Buffer+Base->Buffer_Offset), Base->Buffer_Size-Base->Buffer_Offset);
- size_t Pos=Buf.find("LYRICSBEGIN");
- if (Pos!=std::string::npos)
- {
- Lyrics3_Size=Base->File_Size-File_EndTagSize-(Base->File_Offset+Base->Buffer_Offset+Pos);
- File_EndTagSize+=Lyrics3_Size;
- Lyrics3_Offset=Base->File_Size-File_EndTagSize;
- TagSizeIsFinal=false;
- }
- }
- }
-
- //Lyrics3v2
- if (Lyrics3v2_Size==0 && Base->File_Size>=File_EndTagSize+15) //Only one, larger than File_EndTagSize+15 bytes
- {
- if (Base->File_Offset>Base->File_Size-File_EndTagSize-15) //Must be at the end less 15 bytes
- {
- Base->GoTo(Base->File_Size-File_EndTagSize-15, "Tags");
- TagSizeIsFinal=false;
- return false;
- }
-
- if (Base->File_Offset+Base->Buffer_Size<Base->File_Size-File_EndTagSize) //Must be at the end less File_EndTagSize
- {
- if (Base->File_Offset!=Base->File_Size-File_EndTagSize)
- Base->GoTo(Base->File_Size-File_EndTagSize, "Tags");
- TagSizeIsFinal=false;
- return false;
- }
-
- if (CC8(Base->Buffer+((size_t)((Base->File_Size-File_EndTagSize-15+6)-Base->File_Offset)))==CC8("LYRICS20"))
- {
- Lyrics3v2_Size=Ztring((const char*)(Base->Buffer+((size_t)((Base->File_Size-File_EndTagSize-15)-Base->File_Offset))), 6).To_int32u()+15;
- File_EndTagSize+=Lyrics3v2_Size;
- Lyrics3v2_Offset=Base->File_Size-File_EndTagSize;
- TagSizeIsFinal=false;
- }
- }
-
- //ApeTag
- if (ApeTag_Size==0 && Base->File_Size>=File_EndTagSize+32) //Only one, larger than File_EndTagSize+32 bytes
- {
- if (Base->File_Offset>Base->File_Size-File_EndTagSize-32) //Must be at the end less 32 bytes
- {
- Base->GoTo(Base->File_Size-File_EndTagSize-32, "Tags");
- TagSizeIsFinal=false;
- return false;
- }
-
- if (Base->File_Offset+Base->Buffer_Size<Base->File_Size-File_EndTagSize) //Must be at the end less File_EndTagSize+15 bytes plus 15 bytes of tags
- {
- if (Base->File_Offset!=Base->File_Size-File_EndTagSize-32)
- Base->GoTo(Base->File_Size-File_EndTagSize-32, "Tags");
- TagSizeIsFinal=false;
- return false;
- }
-
- if (CC8(Base->Buffer+((size_t)((Base->File_Size-File_EndTagSize-32)-Base->File_Offset)))==CC8("APETAGEX"))
- {
- ApeTag_Size=LittleEndian2int32u(Base->Buffer+((size_t)((Base->File_Size-File_EndTagSize-32+12)-Base->File_Offset)));
- if (LittleEndian2int32u(Base->Buffer+((size_t)((Base->File_Size-File_EndTagSize-32+8)-Base->File_Offset)))==2000)
- ApeTag_Size+=32;
- File_EndTagSize+=ApeTag_Size;
- ApeTag_Offset=Base->File_Size-File_EndTagSize;
- TagSizeIsFinal=false;
- }
- }
-
- //Finished
- return true;
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Tag/File__Tags.h b/src/thirdparty/MediaInfo/MediaInfo/Tag/File__Tags.h
deleted file mode 100644
index 7347ec8d4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Tag/File__Tags.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about all kind of framed tags tagged files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File__TagsH
-#define MediaInfo_File__TagsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File__Tags_Helper
-//***************************************************************************
-
-class File__Tags_Helper
-{
-public :
- //In
- File__Analyze* Base;
-
- //Out
- int64u TagsSize;
- int64u File_BeginTagSize;
- int64u File_EndTagSize;
-
- //Constructor/Destructor
- File__Tags_Helper();
- ~File__Tags_Helper();
-
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin() {return Synched_Test();}
-
- //Buffer - Synchro
- bool Synchronize(bool &Tag_Found, size_t Synchro_Offset=0);
- bool Synched_Test();
-
- //Buffer - Global
- bool Read_Buffer_Continue ();
-
- //Per element
- bool Header_Begin() {return Synched_Test();}
-
- //Streams
- size_t Stream_Prepare(stream_t StreamKind);
-
- //End
- void GoTo (int64u GoTo, const char* ParserName=NULL);
- void GoToFromEnd (int64u GoToFromEnd=0, const char* ParserName=NULL);
- void Accept (const char* ParserName=NULL);
- void Reject (const char* ParserName=NULL);
- void Finish (const char* ParserName=NULL);
-
-private :
- //Temp
- File__Analyze* Parser;
- vector<File__Analyze*> Parser_Streams_Fill; //Parser to merge when filling
- #ifdef MEDIAINFO_ID3V2_YES
- vector<bool> Parser_Streams_Fill_Priority; //Parser to merge when filling
- #endif
- size_t Parser_Buffer_Size;
- int64u Id3v1_Offset;
- int64u Lyrics3_Offset;
- int64u Lyrics3v2_Offset;
- int64u ApeTag_Offset;
- int64u JumpTo_WantedByParser;
- int64u Id3v1_Size;
- int64u Lyrics3_Size;
- int64u Lyrics3v2_Size;
- int64u ApeTag_Size;
- bool TagSizeIsFinal;
- bool SearchingForEndTags;
-
- //Helpers
- bool DetectBeginOfEndTags(); //return true if we can continue, false if want return
- bool DetectBeginOfEndTags_Test();
-
-};} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_AribStdB24B37.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_AribStdB24B37.cpp
deleted file mode 100644
index 049c81549..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_AribStdB24B37.cpp
+++ /dev/null
@@ -1,1483 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_ARIBSTDB24B37_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_AribStdB24B37.h"
-#if defined(MEDIAINFO_MPEGTS_YES)
- #include "MediaInfo/Multiple/File_MpegTs.h"
-#endif
-#include <vector>
-#ifdef __WINDOWS__
- #undef __TEXT
- #include "windows.h"
-#endif // __WINDOWS__
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* AribStdB24B37_Caption_conversion_type(int8u Caption_conversion_type)
-{
- switch (Caption_conversion_type)
- {
- case 0 : return "Analog";
- case 1 : return "HD side panel";
- case 2 : return "SD (4:3)";
- case 3 : return "SD wide side panel";
- case 4 : return "Mobile closed caption";
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* AribStdB24B37_Caption_DataIdentifier(int8u DataIdentifier)
-{
- switch (DataIdentifier)
- {
- case 0 : return "Exchange format data (closed caption data label)";
- case 1 : return "Exchange format data (program management information)";
- case 2 : return "Exchange format data (page information 1)";
- case 3 : return "Exchange format data (page information 2)";
- case 4 : return "Short form data (closed caption management data)";
- case 5 : return "Short form data (closed caption text data)";
- case 6 : return "Undefined";
- case 7 : return "Dummy data";
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* AribStdB24B37_DRCS_conversion_type(int8u DRCS_conversion_type)
-{
- switch (DRCS_conversion_type)
- {
- case 0 : return "DRCS conversion mode A";
- case 1 : return "DRCS conversion mode B";
- case 2 : return "Mobile DRCS";
- case 3 : return "DRCS conversion not possible";
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* AribStdB24B37_data_group_id(int8u data_group_id)
-{
- switch (data_group_id)
- {
- case 0 : return "Caption management";
- case 1 : return "Caption statement (1st)";
- case 2 : return "Caption statement (2nd)";
- case 3 : return "Caption statement (3rd)";
- case 4 : return "Caption statement (4th)";
- case 5 : return "Caption statement (5th)";
- case 6 : return "Caption statement (6th)";
- case 7 : return "Caption statement (7th)";
- case 8 : return "Caption statement (8th)";
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* AribStdB24B37_TMD(int8u TMD)
-{
- switch (TMD)
- {
- case 0 : return "Free";
- case 1 : return "Real time";
- case 2 : return "Offset time";
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* AribStdB24B37_DMF_reception(int8u DMF_reception)
-{
- switch (DMF_reception)
- {
- case 0 : return "Automatic display when received";
- case 1 : return "Non-displayed automatically when received";
- case 2 : return "Selectable display when received";
- case 3 : return "Automatic display/non-display under specific condition when received";
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* AribStdB24B37_DMF_recording(int8u DMF_recording)
-{
- switch (DMF_recording)
- {
- case 0 : return "Automatic display when recording and playback";
- case 1 : return "Non- displayed automatically when recording and playback";
- case 2 : return "Selectable display when recording and playback";
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* AribStdB24B37_format(int8u format)
-{
- switch (format)
- {
- case 0 : return "Horizontal writing in standard density";
- case 1 : return "Vertical writing in standard density";
- case 2 : return "Horizontal writing in high density";
- case 3 : return "Vertical writing in high density";
- case 4 : return "Horizontal writing of Western language";
- case 5 : return "Horizontal writing in 1920 x 1080";
- case 6 : return "Vertical writing in 1920 x 1080";
- case 7 : return "Horizontal writing in 960 x 540";
- case 8 : return "Vertical writing in 960 x 540";
- case 9 : return "Horizontal writing in 1280 x 720";
- case 10 : return "Vertical writing in 1280 x 720";
- case 11 : return "Horizontal writing in 720 x 480";
- case 12 : return "Vertical writing in 720 x 480";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* AribStdB24B37_TCS(int8u TCS)
-{
- switch (TCS)
- {
- case 0 : return "8-bit character codes";
- case 1 : return "UCS";
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* AribStdB24B37_rollup_mode(int8u rollup_mode)
-{
- switch (rollup_mode)
- {
- case 0 : return "Non-roll up";
- case 1 : return "Roll up";
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* AribStdB24B37_data_unit_parameter(int8u data_unit_parameter)
-{
- switch (data_unit_parameter)
- {
- case 0x20 : return "Texts";
- case 0x28 : return "Geometric graphics";
- case 0x2C : return "Synthesized sound";
- case 0x30 : return "1 byte DRCS";
- case 0x31 : return "2 byte DRCS";
- case 0x34 : return "color map";
- case 0x35 : return "Bit map";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-// Table 7-18 Default macro code strings
-static const int8u AribStdB24B37_DefaultMacros[][19] =
-{
- { 0x1B, 0x24, 0x42, 0x1B, 0x29, 0x4A, 0x1B, 0x2A, 0x30, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x24, 0x42, 0x1B, 0x29, 0x31, 0x1B, 0x2A, 0x30, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x24, 0x42, 0x1B, 0x29, 0x20, 0x41, 0x1B, 0x2A, 0x30, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x28, 0x32, 0x1B, 0x29, 0x34, 0x1B, 0x2A, 0x35, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x28, 0x32, 0x1B, 0x29, 0x33, 0x1B, 0x2A, 0x35, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x28, 0x32, 0x1B, 0x29, 0x20, 0x41, 0x1B, 0x2A, 0x35, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x28, 0x20, 0x41, 0x1B, 0x29, 0x20, 0x42, 0x1B, 0x2A, 0x20, 0x43, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x28, 0x20, 0x44, 0x1B, 0x29, 0x20, 0x45, 0x1B, 0x2A, 0x20, 0x46, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x28, 0x20, 0x47, 0x1B, 0x29, 0x20, 0x48, 0x1B, 0x2A, 0x20, 0x49, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x28, 0x20, 0x4A, 0x1B, 0x29, 0x20, 0x4B, 0x1B, 0x2A, 0x20, 0x4C, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x28, 0x20, 0x4D, 0x1B, 0x29, 0x20, 0x4E, 0x1B, 0x2A, 0x20, 0x4F, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x24, 0x42, 0x1B, 0x29, 0x20, 0x42, 0x1B, 0x2A, 0x30, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x24, 0x42, 0x1B, 0x29, 0x20, 0x43, 0x1B, 0x2A, 0x30, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x24, 0x42, 0x1B, 0x29, 0x20, 0x44, 0x1B, 0x2A, 0x30, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x28, 0x31, 0x1B, 0x29, 0x30, 0x1B, 0x2A, 0x4A, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
- { 0x1B, 0x28, 0x4A, 0x1B, 0x29, 0x32, 0x1B, 0x2A, 0x20, 0x41, 0x1B, 0x2B, 0x20, 0x70, 0x0F, 0x1B, 0x7D },
-};
-
-//---------------------------------------------------------------------------
-static const int8u AribStdB24B37_DefaultMacros_size[] =
-{
- 16,
- 16,
- 17,
- 16,
- 16,
- 17,
- 19,
- 19,
- 19,
- 19,
- 19,
- 17,
- 17,
- 17,
- 16,
- 17,
-};
-
-//---------------------------------------------------------------------------
-// CRC_CCIT_Xmodem_Table
-// A CRC is computed like this:
-// Init: int16u CRC_CCIT_Xmodem = 0x0000;
-// for each data byte do
-// CRC_CCIT_Xmodem=(CRC_CCIT_Xmodem<<8) ^ CRC_CCIT_Xmodem_Table[(CRC_CCIT_Xmodem>>8)^(data_byte)];
-// Array built with the help of http://www.sanity-free.com/133/crc_16_ccitt_in_csharp.html
-int16u AribStdB24B37_CRC_CCIT_Xmodem_Table[256] =
-{
- 0x0000, 0x1021, 0x2042, 0x3063,
- 0x4084, 0x50A5, 0x60C6, 0x70E7,
- 0x8108, 0x9129, 0xA14A, 0xB16B,
- 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
- 0x1231, 0x0210, 0x3273, 0x2252,
- 0x52B5, 0x4294, 0x72F7, 0x62D6,
- 0x9339, 0x8318, 0xB37B, 0xA35A,
- 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
- 0x2462, 0x3443, 0x0420, 0x1401,
- 0x64E6, 0x74C7, 0x44A4, 0x5485,
- 0xA56A, 0xB54B, 0x8528, 0x9509,
- 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
- 0x3653, 0x2672, 0x1611, 0x0630,
- 0x76D7, 0x66F6, 0x5695, 0x46B4,
- 0xB75B, 0xA77A, 0x9719, 0x8738,
- 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
- 0x48C4, 0x58E5, 0x6886, 0x78A7,
- 0x0840, 0x1861, 0x2802, 0x3823,
- 0xC9CC, 0xD9ED, 0xE98E, 0xF9AF,
- 0x8948, 0x9969, 0xA90A, 0xB92B,
- 0x5AF5, 0x4AD4, 0x7AB7, 0x6A96,
- 0x1A71, 0x0A50, 0x3A33, 0x2A12,
- 0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E,
- 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
- 0x6CA6, 0x7C87, 0x4CE4, 0x5CC5,
- 0x2C22, 0x3C03, 0x0C60, 0x1C41,
- 0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD,
- 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
- 0x7E97, 0x6EB6, 0x5ED5, 0x4EF4,
- 0x3E13, 0x2E32, 0x1E51, 0x0E70,
- 0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC,
- 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
- 0x9188, 0x81A9, 0xB1CA, 0xA1EB,
- 0xD10C, 0xC12D, 0xF14E, 0xE16F,
- 0x1080, 0x00A1, 0x30C2, 0x20E3,
- 0x5004, 0x4025, 0x7046, 0x6067,
- 0x83B9, 0x9398, 0xA3FB, 0xB3DA,
- 0xC33D, 0xD31C, 0xE37F, 0xF35E,
- 0x02B1, 0x1290, 0x22F3, 0x32D2,
- 0x4235, 0x5214, 0x6277, 0x7256,
- 0xB5EA, 0xA5CB, 0x95A8, 0x8589,
- 0xF56E, 0xE54F, 0xD52C, 0xC50D,
- 0x34E2, 0x24C3, 0x14A0, 0x0481,
- 0x7466, 0x6447, 0x5424, 0x4405,
- 0xA7DB, 0xB7FA, 0x8799, 0x97B8,
- 0xE75F, 0xF77E, 0xC71D, 0xD73C,
- 0x26D3, 0x36F2, 0x0691, 0x16B0,
- 0x6657, 0x7676, 0x4615, 0x5634,
- 0xD94C, 0xC96D, 0xF90E, 0xE92F,
- 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
- 0x5844, 0x4865, 0x7806, 0x6827,
- 0x18C0, 0x08E1, 0x3882, 0x28A3,
- 0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E,
- 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
- 0x4A75, 0x5A54, 0x6A37, 0x7A16,
- 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
- 0xFD2E, 0xED0F, 0xDD6C, 0xCD4D,
- 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
- 0x7C26, 0x6C07, 0x5C64, 0x4C45,
- 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
- 0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C,
- 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
- 0x6E17, 0x7E36, 0x4E55, 0x5E74,
- 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0,
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_AribStdB24B37::File_AribStdB24B37()
-:File__Analyze()
-{
- //Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_AribStdB24B37;
- StreamIDs_Width[0]=1;
- #endif //MEDIAINFO_EVENTS
- PTS_DTS_Needed=true;
-
- //In
- HasCcis=false;
- ParseCcis=false;
- IsAncillaryData=false;
-
- //Config
- Caption_conversion_type=(int8u)-1;
-
- //Ancillary
- #if defined(MEDIAINFO_MPEGTS_YES)
- Parser=NULL;
- #endif
-}
-
-//---------------------------------------------------------------------------
-File_AribStdB24B37::~File_AribStdB24B37()
-{
- #if defined(MEDIAINFO_MPEGTS_YES)
- delete Parser;
- #endif
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::Streams_Fill()
-{
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- {
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, StreamPos_Last, Text_ID, Pos+1);
- Fill(Stream_Text, StreamPos_Last, Text_Format, "ARIB STD B24/B37");
- if (HasCcis)
- {
- Fill(Stream_Text, StreamPos_Last, Text_MuxingMode, "CCIS");
- Fill(Stream_Text, StreamPos_Last, Text_Format_Profile, AribStdB24B37_Caption_conversion_type(Caption_conversion_type));
- }
- Fill(Stream_Text, StreamPos_Last, Text_StreamSize, 0);
- Fill(Stream_Text, StreamPos_Last, Text_BitRate_Mode, "CBR");
- Fill(Stream_Text, StreamPos_Last, Text_Language, Streams[Pos].ISO_639_language_code);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::Streams_Finish()
-{
- #if defined(MEDIAINFO_MPEGTS_YES)
- if (Parser)
- {
- Finish(Parser);
- Merge(*Parser);
- }
- #endif
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::Read_Buffer_Continue()
-{
- if (Buffer_Size==0)
- return;
-
- if (IsAncillaryData)
- {
- if (!Status[IsAccepted])
- Accept();
- int8u DataIdentifier;
- BS_Begin();
- Skip_SB( "Error correction");
- Skip_SB( "Undefined");
- Skip_SB( "Undefined");
- Skip_SB( "Undefined");
- Skip_S1(4, "Continuity Index");
- Skip_S1(8, "Undefined");
- Skip_SB( "Undefined");
- Skip_SB( "Start packet flag");
- Skip_SB( "End packet flag");
- Skip_SB( "Send mode");
- Info_S1(4, Caption_conversion_type, "Format identifier"); Param_Info1(AribStdB24B37_Caption_conversion_type(Caption_conversion_type));
- Skip_S1(2, "Undefined");
- Get_S1 (3, DataIdentifier, "Closed caption data identifier"); Param_Info1(AribStdB24B37_Caption_DataIdentifier(DataIdentifier));
- Info_S1(3, data_group_id, "Language identifier"); if (DataIdentifier) {Param_Info1(AribStdB24B37_data_group_id(data_group_id));}
- BS_End();
-
- if (DataIdentifier>6)
- {
- Skip_XX(245, "Dummy");
- }
- else if (DataIdentifier<4)
- {
- Skip_XX(245, "Exchange format data, not supported");
- }
- else
- {
- Element_Begin1("Short form data");
- int8u LEN, Label_01, Label_3A, Data_Length;
- Get_B1(LEN, "LEN");
- Element_Begin1("display timing");
- Get_B1(Label_01, "Label (01)");
- BS_Begin();
- Skip_S1(6, "Undefined");
- Skip_S1(2, "Data-type identifier");
- Skip_S1(6, "Undefined");
- Skip_S1(2, "Timing-type identifier");
- Skip_S1(6, "Undefined");
- Skip_S1(2, "Timing-direction identifier");
- Skip_B5( "Display timing value");
- BS_End();
- Element_End0();
- Element_Begin1("closed caption data");
- Get_B1(Label_3A, "Label (3A)");
- Get_B1(Data_Length, "Data Length");
- #if defined(MEDIAINFO_MPEGTS_YES)
- if (Parser==NULL)
- {
- Parser=new File_MpegTs;
- ((File_MpegTs*)Parser)->FromAribStdB24B37=true;
- Open_Buffer_Init(Parser);
- }
- if (FrameInfo.PTS==(int64u)-1)
- FrameInfo.PTS=FrameInfo.DTS;
- Parser->FrameInfo=FrameInfo;
- Open_Buffer_Continue(Parser, Buffer+Buffer_Offset+(size_t)Element_Offset, 188);
- Element_Offset+=188;
- #else
- Skip_XX(188, "TS data");
- #endif
- if (Data_Length==192)
- {
- Skip_B2( "Group-A CRC");
- Skip_B2( "Group-B CRC");
- }
- else if (Data_Length>188)
- Skip_XX(Data_Length-188, "Unknown");
- Element_End0();
- if (LEN>203)
- Skip_XX(LEN-204, "User Data");
- if (LEN<244)
- Skip_XX(244-LEN, "Unused");
- Skip_XX(Element_Size-Element_Offset-6, "Format data");
- Element_End0();
- }
-
- Skip_B6( "ECC");
- return;
- }
-
-
- if (ParseCcis)
- {
- int32u CCIS_code;
- Get_C4 ( CCIS_code, "CCIS_code");
- if (CCIS_code==0xFFFFFFFF)
- {
- Skip_XX(Element_Size, "?");
- return;
- }
- Get_B1 ( Caption_conversion_type, "Caption_conversion_type"); Param_Info1(AribStdB24B37_Caption_conversion_type(Caption_conversion_type));
- BS_Begin();
- Info_S1(2, DRCS_conversion_type, "DRCS_conversion_type"); Param_Info1(AribStdB24B37_DRCS_conversion_type(DRCS_conversion_type));
- Skip_S1(6, "reserved");
- BS_End();
- Skip_B2( "reserved");
- Skip_B8( "reserved");
- ParseCcis=false;
- return;
- }
-
- Skip_B1( "Data_identifier");
- Skip_B1( "Private_stream_id");
- BS_Begin();
- Skip_S1(4, "reserved");
- Skip_S1(4, "PES_data_packet_header_length");
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::Read_Buffer_Unsynched()
-{
- #if defined(MEDIAINFO_MPEGTS_YES)
- if (Parser)
- Parser->Open_Buffer_Unsynch();
- #endif
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::Header_Parse()
-{
- //Parsing
- int16u data_group_size;
- int8u data_group_id;
- BS_Begin();
- Skip_SB( "data_group_id (update part)");
- Get_S1 (5, data_group_id, "data_group_id"); Param_Info1(AribStdB24B37_data_group_id(data_group_id));
- Skip_S1(2, "data_group_version");
- BS_End();
- Skip_B1( "data_group_link_number");
- Skip_B1( "last_data_group_link_number");
- Get_B2 (data_group_size, "data_group_size");
-
- //Filling
- Header_Fill_Code(data_group_id, AribStdB24B37_data_group_id(data_group_id));
- Header_Fill_Size(Element_Offset+data_group_size+2);
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::Data_Parse()
-{
- //CRC
- int16u CRC_CCIT_Xmodem=0x0000;
- const int8u* CRC_CCIT_Xmodem_Buffer=Buffer+Buffer_Offset-Header_Size; //data_group_id position
- while(CRC_CCIT_Xmodem_Buffer<Buffer+Buffer_Offset+(size_t)Element_Size) //from data_group_id to the end, CRC included
- {
- CRC_CCIT_Xmodem=(CRC_CCIT_Xmodem<<8) ^ AribStdB24B37_CRC_CCIT_Xmodem_Table[(CRC_CCIT_Xmodem>>8)^(*CRC_CCIT_Xmodem_Buffer)];
- CRC_CCIT_Xmodem_Buffer++;
- }
- if (CRC_CCIT_Xmodem)
- {
- Skip_XX(Element_Size, "Data");
- Trusted_IsNot("CRC error");
- return;
- }
-
- Element_Size-=2;
-
- switch (Element_Code)
- {
- case 0 :
- caption_management(); break;
- case 1 :
- case 2 :
- case 3 :
- case 4 :
- case 5 :
- case 6 :
- case 7 :
- case 8 :
- if (Streams.empty())
- {
- Skip_XX(Element_Size, "Waiting for caption_management");
- break;
- }
- if (Element_Code>Streams.size())
- {
- Skip_XX(Element_Size, "Unknown service");
- Trusted_IsNot("Invalid service number");
- break;
- }
-
- Streams[(size_t)(Element_Code-1)].Line.clear();
- caption_statement();
- Streams[(size_t)(Element_Code-1)].Line.clear();
- break;
- default: Skip_XX(Element_Size, "Unknown");
- }
-
- Element_Size+=2;
- Skip_B2( "CRC_16");
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::caption_management() //caption_management_data()
-{
- //Parsing
- int32u data_unit_loop_length;
- int8u TMD, num_languages;
- BS_Begin();
- Get_S1 (2, TMD, "TMD"); Param_Info1(AribStdB24B37_TMD(TMD));
- Skip_S1(6, "Reserved");
- if (TMD==2)
- {
- Skip_S5(36, "OTM"); //Note: time offset (HHMMSSmmm in BCD format) is currently not supported
- Skip_S5( 4, "Reserved");
- }
- BS_End();
- Get_B1 (num_languages, "num_languages");
-
- Streams.clear();
- Streams.resize(num_languages);
- for (int8u pos_languages=0; pos_languages<num_languages; pos_languages++)
- {
- int8u DMF_reception, Format;
- string ISO_639_language_code;
- Element_Begin1("language");
- BS_Begin();
- Skip_S1(3, "language_tag");
- Skip_SB( "Reserved");
- Get_S1 (2, DMF_reception, "DMF (reception)"); Param_Info1(AribStdB24B37_DMF_reception(DMF_reception)); //Note: Display Method is currently not supported (all is displayed immediatly)
- Info_S1(2, DMF_recording, "DMF (recording)"); Param_Info1(AribStdB24B37_DMF_recording(DMF_recording));
- BS_End();
- if (DMF_reception==3)
- Skip_B1( "DC");
- Get_String(3, ISO_639_language_code, "ISO_639_language_code");
- BS_Begin();
- Get_S1 (4, Format, "Format"); Param_Info1(AribStdB24B37_format(Format));
- Info_S1(2, TCS, "TCS"); Param_Info1(AribStdB24B37_TCS(TCS));
- Info_S1(2, rollup_mode, "rollup_mode"); Param_Info1(AribStdB24B37_rollup_mode(rollup_mode));
- BS_End();
- Element_End0();
-
- FILLING_BEGIN();
- Streams[pos_languages].ISO_639_language_code=ISO_639_language_code;
- Streams[pos_languages].DMF_reception=DMF_reception;
- Streams[pos_languages].Format=Format;
-
- // Special case
- if (ISO_639_language_code=="por")
- {
- Streams[pos_languages].G[0]=GS_Alphanumeric; //GS_Kanji;
- Streams[pos_languages].G[1]=GS_Alphanumeric;
- Streams[pos_languages].G[2]=GS_Alphanumeric; //GS_Hiragana;
- Streams[pos_languages].G[3]=GS_Alphanumeric; //GS_DRCS|GS_Macro;
- Streams[pos_languages].G_Width[0]=2;
- Streams[pos_languages].G_Width[1]=1;
- Streams[pos_languages].G_Width[2]=1;
- Streams[pos_languages].G_Width[3]=1;
- }
- FILLING_END();
- }
- Get_B3 (data_unit_loop_length, "data_unit_loop_length");
- if (data_unit_loop_length)
- Skip_XX(data_unit_loop_length, "data_unit");
-
- FILLING_BEGIN();
- if (!Status[IsAccepted])
- Accept();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::caption_statement() //caption_data()
-{
- if (Streams[(size_t)(Element_Code-1)].ISO_639_language_code!="jpn")
- {
- Skip_XX(Element_Size-Element_Offset, "Data");
- return; //Not supported (e.g. Portuguese from Brazil, ISDB-Tb)
- }
-
- //Parsing
- int32u data_unit_loop_length;
- int8u TMD;
- BS_Begin();
- Get_S1 (2, TMD, "TMD"); Param_Info1(AribStdB24B37_TMD(TMD));
- Skip_S1(6, "Reserved");
- if (TMD==2)
- {
- Skip_S5(36, "STM"); //Note: start time (HHMMSSmmm in BCD format) is currently not supported (and is applicable only if out of band PTS is not avaialble)
- Skip_S5( 4, "Reserved");
- }
- BS_End();
- Get_B3 (data_unit_loop_length, "data_unit_loop_length");
-
- if (Element_Offset+data_unit_loop_length!=Element_Size)
- {
- Skip_XX(Element_Size-Element_Offset, "Problem");
- return;
- }
-
- while (Element_Offset<Element_Size)
- {
- Element_Begin1("data_unit");
- int8u unit_separator;
- Get_B1 (unit_separator, "unit_separator"); // Should always be 0x1F?
- if (unit_separator==0x1F)
- {
- int32u data_unit_size;
- int8u data_unit_parameter;
- Get_B1 (data_unit_parameter, "data_unit_parameter"); Param_Info1(AribStdB24B37_data_unit_parameter(data_unit_parameter));
- Get_B3 (data_unit_size, "data_unit_size");
- switch (data_unit_parameter)
- {
- case 0x20 : data_unit_data(Element_Offset+data_unit_size); break;
- default : Skip_XX(data_unit_size, "(Not implemented)");
- }
- }
- Element_End0();
- }
-
- Frame_Count++;
- Frame_Count_NotParsedIncluded++;
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::data_unit_data(int64u End)
-{
- Element_Begin1("data_unit_data");
-
- //data_unit_data_byte
- while (Element_Offset<End)
- {
- int8u header;
- Peek_B1(header);
- if (header&0x60) // Not C0 or C1
- {
- if ((header&0x7F)==0x20
- || (header&0x7F)==0x7F)
- {
- Skip_C1 ( "Character");
- Add((Char)header);
- }
- else if (header&0x80) // GR //TODO: buffer check //Note about Caption_conversion_type == Mobile closed caption: see B37 Figure 3-4 Code Ranges for Mobile Closed Caption
- Character(Caption_conversion_type==4?GS_Kanji:Streams[(size_t)(Element_Code-1)].G[Streams[(size_t)(Element_Code-1)].GR],
- Streams[(size_t)(Element_Code-1)].GR,
- Buffer[Buffer_Offset+Element_Offset]&0x7F,
- Buffer[Buffer_Offset+Element_Offset+1]&0x7F);
- else // GL
- {
- Character(Caption_conversion_type==4?GS_DRCS:Streams[(size_t)(Element_Code-1)].G[Streams[(size_t)(Element_Code-1)].GL_SS?Streams[(size_t)(Element_Code-1)].GL_SS:Streams[(size_t)(Element_Code-1)].GL],
- Streams[(size_t)(Element_Code-1)].GL_SS?Streams[(size_t)(Element_Code-1)].GL_SS:Streams[(size_t)(Element_Code-1)].GL,
- Buffer[Buffer_Offset+Element_Offset],
- Buffer[Buffer_Offset+Element_Offset+1]);
- Streams[(size_t)(Element_Code-1)].GL_SS=0;
- }
- }
- else
- control_code(); // C0 or C1
- }
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::JIS (int8u Row, int8u Column)
-{
- // Encoding is JIS, but we have only Shift-JIS to Unicode algo, we transform JIS to Shift-JIS (Windows-31J)
- // See http://en.wikipedia.org/wiki/Shift_JIS for the formula
-
- if (Column<32)
- return; // Problem
-
- #ifdef __WINDOWS__
- char ShiftJIS[2];
- ShiftJIS[0]=((Row+1)>>1) + (Row<=94?112:176);
- if (Row%2)
- ShiftJIS[1]=Column+31+(Column>=96);
- else
- ShiftJIS[1]=Column+126;
-
- wchar_t Temp[2];
- int CharSize=MultiByteToWideChar(932, 0, ShiftJIS, 2, Temp, 2); //932 = Shift-JIS (Windows-31J)
- if (CharSize>0)
- {
- Temp[CharSize]=__T('\0');
- Param_Info1(Ztring().From_Unicode(Temp));
- Add (Ztring().From_Unicode(Temp));
- }
- #else // __WINDOWS__
- //TODO
- #endif // __WINDOWS__
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::Add (Char Character)
-{
- Streams[(size_t)(Element_Code-1)].Line+=Character;
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::Add (Ztring Character)
-{
- Streams[(size_t)(Element_Code-1)].Line+=Character;
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::DefaultMacro()
-{
- Element_Begin1("Default Macro");
- int8u control_code;
- Get_B1 (control_code, "control_code");
-
- if ((control_code&0xF0)==0x60) //Known macros
- {
- //Buffer
- const int8u* Save_Buffer=Buffer;
- size_t Save_Buffer_Offset=Buffer_Offset;
- size_t Save_Buffer_Size=Buffer_Size;
- int64u Save_Element_Offset=Element_Offset;
- int64u Save_Element_Size=Element_Size;
-
- Buffer=AribStdB24B37_DefaultMacros[control_code&0x0F];
- Buffer_Offset=0;
- Buffer_Size=AribStdB24B37_DefaultMacros_size[control_code&0x0F];
- Element_Offset=0;
- Element_Size=Buffer_Size;
-
- data_unit_data(Element_Size);
-
- Buffer=Save_Buffer; Save_Buffer=NULL;
- Buffer_Offset=Save_Buffer_Offset;
- Buffer_Size=Save_Buffer_Size;
- Element_Offset=Save_Element_Offset;
- Element_Size=Save_Element_Size;
- }
- else
- {
- Element_Info1("Unknown");
- Param_Info1("Unknown");
- }
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::Character (int16u CharacterSet, int8u G_Value, int8u FirstByte, int8u SecondByte)
-{
- int16u Value=(FirstByte<<8) | SecondByte;
-
- //ARIB STD B24/B37 provide numbers with 2 number (Row and Colupmn) a shift of 32 (b00100000)
- #define Compute(f,s) (((f+32)<<8) | (s+32))
-
- switch (CharacterSet)
- {
- case GS_Kanji:
- Skip_B2( "Character");
- if (Value<=Compute(84, 6))
- JIS(FirstByte, SecondByte);
- else
- switch (Value)
- {
- case Compute(92, 1): JIS( 35, 42); break;
- case Compute(92, 2): JIS( 35, 43); break;
- case Compute(92, 3): JIS( 35, 44); break;
- case Compute(92, 4): JIS( 35, 45); break;
- case Compute(93, 79): JIS( 40, 110); break;
- case Compute(93, 88): Param_Info1(Ztring().From_UTF8("\xE2\x99\xAB")+__T(" (not exact)")); Add (Ztring().From_UTF8("\xE2\x99\xAB")); break; //Ending music note?
- case Compute(93, 89): Param_Info1(Ztring().From_UTF8("\xE2\x99\xAB")+__T(" (not exact)")); Add (Ztring().From_UTF8("\xE2\x99\xAB")); break; //Opening music note?
- case Compute(93, 90): Param_Info1(Ztring().From_UTF8("\xE2\x99\xAB")); Add (Ztring().From_UTF8("\xE2\x99\xAB")); break; //Music note
- default: Param_Info1("(Unsupported)"); //empty in spec or not yet mapped
- }
- break;
- case GS_Hiragana:
- case GS_PropHiragana:
- Skip_C1( "Character");
- switch (FirstByte)
- {
- case 0x74:
- case 0x75:
- case 0x76:
- Param_Info1("(Unsupported)");
- break; //empty in spec
- case 0x77: JIS( 33, 53); break;
- case 0x78: JIS( 33, 54); break;
- case 0x79: JIS( 33, 60); break;
- case 0x7A: JIS( 33, 35); break;
- case 0x7B: JIS( 33, 86); break;
- case 0x7C: JIS( 33, 87); break;
- case 0x7D: JIS( 33, 34); break;
- case 0x7E: JIS( 33, 38); break;
- default : JIS( 36, FirstByte);
- }
- break;
- case GS_Katakana:
- case GS_PropKatakana:
- Skip_C1( "Character");
- switch (FirstByte)
- {
- case 0x77: JIS( 33, 41); break;
- case 0x78: JIS( 33, 42); break;
- case 0x79: JIS( 33, 51); break;
- case 0x7A: JIS( 33, 33); break;
- case 0x7B: JIS( 33, 86); break;
- case 0x7C: JIS( 33, 87); break;
- case 0x7D: JIS( 33, 34); break;
- case 0x7E: JIS( 33, 38); break;
- default : JIS( 37, FirstByte); break;
- }
- break;
- case GS_Alphanumeric:
- case GS_PropAscii:
- Skip_C1( "Character");
- Add(FirstByte);
- break;
- case GS_DRCS|GS_Macro :
- DefaultMacro();
- break;
- default : ;
- switch (Streams[(size_t)(Element_Code-1)].G_Width[G_Value])
- {
- case 1 : Skip_C1("Character (unsupported)"); break;
- case 2 : Skip_C2("Character (unsupported)"); break;
- default: Skip_XX(Streams[(size_t)(Element_Code-1)].G_Width[G_Value], "Character (unsupported)");
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::control_code()
-{
- int8u control_code;
- Peek_B1(control_code);
-
- switch (control_code)
- {
- // Table 7-15 C0 control set
- case 0x00 : NUL(); break;
- case 0x07 : BEL(); break;
- case 0x08 : APB(); break;
- case 0x09 : APF(); break;
- case 0x0A : APD(); break;
- case 0x0B : APU(); break;
- case 0x0C : CS(); break;
- case 0x0D : APR(); break;
- case 0x0E : LS1(); break;
- case 0x0F : LS0(); break;
- case 0x16 : PAPF(); break;
- case 0x18 : CAN(); break;
- case 0x19 : SS2(); break;
- case 0x1B : ESC(); break;
- case 0x1C : APS(); break;
- case 0x1D : SS3(); break;
- case 0x1E : RS(); break;
- case 0x1F : US(); break;
-
- // Table 7-16 C1 control set
- case 0x80: //BKF
- case 0x81: //RDF
- case 0x82: //GRF
- case 0x83: //YLF
- case 0x84: //BLF
- case 0x85: //MGF
- case 0x86: //CNF
- case 0x87: //WHF
- xxF(); break;
- case 0x88: //SSZ
- case 0x89: //MSZ
- case 0x8A: //NSZ
- xxZ(); break;
- case 0x8B : SZX(); break;
- case 0x90 : COL(); break;
- case 0x91 : FLC(); break;
- case 0x92 : CDC(); break;
- case 0x93 : POL(); break;
- case 0x94 : WMM(); break;
- case 0x95 : MACRO(); break;
- case 0x97 : HLC(); break;
- case 0x98 : RPC(); break;
- case 0x99 : SPL(); break;
- case 0x9A : STL(); break;
- case 0x9B : CSI(); break;
- case 0x9D : TIME(); break;
-
- // Unknown
- default : Skip_XX(Element_Size-Element_Offset, "Unknown");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::NUL()
-{
- Element_Begin1("NUL - Empty");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::BEL()
-{
- Element_Begin1("BEL - Bell");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::APB()
-{
- Element_Begin1("APB - Active position backward");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::APF()
-{
- Element_Begin1("APF - Active position forwards");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::APD()
-{
- Element_Begin1("APD - Active position down");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::APU()
-{
- Element_Begin1("APU - Active position up");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::CS()
-{
- Element_Begin1("CS - Clear Screen");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::APR()
-{
- Element_Begin1("APR - Line return at operation position");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::LS1()
-{
- Element_Begin1("LS1 - Locking shift 1");
- Skip_B1( "control_code");
- Element_End0();
-
- Streams[(size_t)(Element_Code-1)].GL=1;
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::LS0()
-{
- Element_Begin1("LS0 - Locking shift 0");
- Skip_B1( "control_code");
- Element_End0();
-
- Streams[(size_t)(Element_Code-1)].GL=0;
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::PAPF()
-{
- Element_Begin1("PAPF - Move forwards at specified operation position");
- Skip_B1( "control_code");
- Skip_B1( "P1");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::CAN()
-{
- Element_Begin1("CAN - Cancel");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::SS2()
-{
- Element_Begin1("SS2 - Single shift 2");
- Skip_B1( "control_code");
- Element_End0();
-
- Streams[(size_t)(Element_Code-1)].GL_SS=3;
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::ESC()
-{
- Element_Begin1("ESC - Escape");
- int8u P1;
- Skip_B1( "control_code");
- Get_B1 (P1, "P1");
-
- switch (P1)
- {
- // Table 7-2 Designation of graphic sets
- case 0x24 :
- {
- int8u P2;
- Get_B1 (P2, "P2");
- switch (P2)
- {
- case 0x28 :
- {
- int8u P3;
- Get_B1 (P3, "P3");
- switch (P3)
- {
- case 0x20 :
- {
- int8u P4;
- Get_B1 (P4, "P4");
- Streams[(size_t)(Element_Code-1)].G[0]=GS_DRCS|P4;
- Streams[(size_t)(Element_Code-1)].G_Width[0]=2;
- }
- break;
- case 0x29 :
- case 0x2A :
- case 0x2B :
- default :
- Streams[(size_t)(Element_Code-1)].G[0]=P2;
- Streams[(size_t)(Element_Code-1)].G_Width[0]=2;
- }
- }
- break;
- case 0x29 :
- case 0x2A :
- case 0x2B :
- {
- int8u P3;
- Get_B1 (P3, "P3");
- if (P3==0x20)
- {
- int8u P4;
- Get_B1 (P4, "P4");
- Streams[(size_t)(Element_Code-1)].G[P2-0x28]=GS_DRCS|P4;
- }
- else
- Streams[(size_t)(Element_Code-1)].G[P2 - 0x28]=P3;
- Streams[(size_t)(Element_Code-1)].G_Width[P2-0x28]=2;
- }
- break;
- default :
- Streams[(size_t)(Element_Code-1)].G[0]=P2;
- Streams[(size_t)(Element_Code-1)].G_Width[0]=2;
- }
- }
- break;
- case 0x28 :
- case 0x29 :
- case 0x2A :
- case 0x2B :
- {
- int8u P2;
- Get_B1 (P2, "P2");
- if (P2==0x20)
- {
- int8u P3;
- Get_B1 (P3, "P3");
- Streams[(size_t)(Element_Code-1)].G[P1-0x28]=GS_DRCS|P3;
- }
- else
- Streams[(size_t)(Element_Code-1)].G[P1 - 0x28]=P2;
- Streams[(size_t)(Element_Code-1)].G_Width[P1-0x28]=1;
- }
- break;
-
- // Table 7-1 Invocation of code elements (locking shift)
- case 0x6E : Streams[(size_t)(Element_Code-1)].GL=2; break;
- case 0x6F : Streams[(size_t)(Element_Code-1)].GL=3; break;
- case 0x7C : Streams[(size_t)(Element_Code-1)].GR=3; break;
- case 0x7D : Streams[(size_t)(Element_Code-1)].GR=2; break;
- case 0x7E : Streams[(size_t)(Element_Code-1)].GR=1; break;
-
- default : ; //Problem?
- }
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::APS()
-{
- Element_Begin1("APS - Specify operation position");
- Skip_B1( "control_code");
- Skip_B1( "P1");
- Skip_B1( "P2");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::SS3()
-{
- Element_Begin1("SS3 - Single shift 3");
- Skip_B1( "control_code");
- Element_End0();
-
- Streams[(size_t)(Element_Code-1)].GL_SS=3;
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::RS()
-{
- Element_Begin1("RS - Record separator");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::US()
-{
- Element_Begin1("US - Unit separator");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::xxF()
-{
- Element_Begin1("xxF - foreground");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::xxZ()
-{
- Element_Begin1("xxZ - size");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::SZX()
-{
- Element_Begin1("SZX - Specified size");
- Skip_B1( "control_code");
- Skip_B1( "P1");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::COL()
-{
- Element_Begin1("COL - Color specification");
- int8u P1;
- Skip_B1( "control_code");
- Get_B1 (P1, "P1");
- if (P1==0x20)
- Skip_B1( "P2");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::FLC()
-{
- Element_Begin1("FLC - Flashing control");
- Skip_B1( "control_code");
- Skip_B1( "P1");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::CDC()
-{
- Element_Begin1("CDC - Conceal Display Controls");
- int8u P1;
- Skip_B1( "control_code");
- Get_B1 (P1, "P1");
- if (P1==0x20)
- Skip_B1( "P2");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::POL()
-{
- Element_Begin1("POL - Pattern polarity");
- Skip_B1( "control_code");
- Skip_B1( "P1");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::WMM()
-{
- Element_Begin1("WMM - Modification of write mode");
- Skip_B1( "control_code");
- Skip_B1( "P1");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::MACRO()
-{
- Element_Begin1("MACRO - Macro specification");
- Skip_B1( "control_code");
- Skip_B1( "P1");
- Element_End0();
-
- //TODO: save macros
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::HLC()
-{
- Element_Begin1("HLC - Enclosure control");
- Skip_B1( "control_code");
- Skip_B1( "P1");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::RPC()
-{
- Element_Begin1("RPC - Character repeat");
- Skip_B1( "control_code");
- Skip_B1( "P1");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::SPL()
-{
- Element_Begin1("SPL - End of underline and mosaic separation");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::STL()
-{
- Element_Begin1("STL - Start of underline and mosaic separation");
- Skip_B1( "control_code");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::CSI()
-{
- Element_Begin1("CSI - Extended Control Codes");
- Skip_B1( "control_code");
-
- vector<int64u> Params;
- Params.push_back(0);
- size_t Pos=0;
-
- while (Element_Offset+Pos<=Element_Size)
- {
- int8u Value=Buffer[Buffer_Offset+Element_Offset+Pos];
- Pos++;
- if (Value==0x3B)
- Params.push_back(0);
- else if (Value>=0x30 && Value<0x3A)
- {
- Params[Params.size()-1]*=10;
- Params[Params.size()-1]+=Value&0x0F;
- }
- else if (Value>=0x40 && Value<0x80)
- {
- Pos--;
- Skip_Local(Pos, "Values");
- Get_B1(Value, "Delimiter");
- switch (Value)
- {
- case 0x3B:
- Element_Info1("SRC - Raster Colour Designation");
- break;
- case 0x42:
- Element_Info1("GSM - Character deformation");
- break;
- case 0x53:
- Element_Info1("SWF - Set Writing Format");
- if (!Params.empty() && Params[0]<0x100)
- Streams[(size_t)(Element_Code-1)].Format=(int8u)Params[0];
- break;
- case 0x54:
- Element_Info1("CCC - Composite Character Composition");
- break;
- case 0x56:
- Element_Info1("SDF - Set Display Format");
- break;
- case 0x57:
- Element_Info1("SSM - Character composition dot designation");
- break;
- case 0x58:
- Element_Info1("SHS - Set Horizontal Spacing");
- break;
- case 0x59:
- Element_Info1("SVS - Set Vertical Spacing");
- break;
- case 0x5B:
- Element_Info1("PLD - Partially Line Down");
- break;
- case 0x5C:
- Element_Info1("PLU - Partialyl Line Up");
- break;
- case 0x5D:
- Element_Info1("GAA - Colouring block");
- break;
- case 0x5F:
- Element_Info1("SDF - Set Display Position");
- break;
- case 0x61:
- Element_Info1("ACPS - Active Coordinate Position Set");
- //TODO: positioning
- break;
- case 0x62:
- Element_Info1("TCC - Switching control"); // Also Table 5-3
- break;
- case 0x63:
- Element_Info1("ORN - Ornament Control");
- break;
- case 0x64:
- Element_Info1("MDF - Font");
- break;
- case 0x65:
- Element_Info1("CFS - Character Font Set");
- break;
- case 0x66:
- Element_Info1("XCS - External Character Set");
- break;
- case 0x67:
- Element_Info1("SCR - Scroll designation"); // Also Table 5-4
- break;
- case 0x68:
- Element_Info1("PRA - Built-in sound replay");
- break;
- case 0x69:
- Element_Info1("ACS - Alternative Character Set");
- break;
- case 0x6E:
- Element_Info1("RCS - Raster Colour command");
- break;
- case 0x6F:
- Element_Info1("SCS - Skip Character Set");
- break;
- default: ; //Unknown
- }
- break;
- }
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AribStdB24B37::TIME()
-{
- Element_Begin1("TIME - Time");
- Skip_B1( "control_code");
- Skip_B1( "P1");
- Skip_B1( "P2");
- Element_End0();
-
- // if P1 is 0x20, there should be a delay
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_ARIBSTDB24B37_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_AribStdB24B37.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_AribStdB24B37.h
deleted file mode 100644
index 3e9afcf0b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_AribStdB24B37.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DVB Subtitle streams
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_AribStdB24B37H
-#define MediaInfo_File_AribStdB24B37H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_AribStdB24B37
-//***************************************************************************
-
-class File_AribStdB24B37 : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_AribStdB24B37();
- ~File_AribStdB24B37();
-
- //In
- bool HasCcis;
- bool ParseCcis;
- bool IsAncillaryData;
-
- //enums
- enum graphic_set
- {
- // Table 7-3 Classification of code set and Final Byte
- GS_Kanji = 0x42, //2-byte
- GS_Alphanumeric = 0x4A,
- GS_Hiragana = 0x30,
- GS_Katakana = 0x31,
- GS_Mosaic_A = 0x32,
- GS_Mosaic_B = 0x33,
- GS_Mosaic_C = 0x34,
- GS_Mosaic_D = 0x35,
- GS_PropAscii = 0x36,
- GS_PropHiragana = 0x37,
- GS_PropKatakana = 0x38,
- GS_JisX0201_Katakana = 0x49,
- GS_Jis_Kanji_Plane1 = 0x39, //2-byte
- GS_Jis_Kanji_Plane2 = 0x3A, //2-byte
- GS_AddSymbols = 0x3B, //2-byte
- GS_Macro = 0x70,
-
- GS_G = 0x0000, // G set
- GS_DRCS = 0x0100, // DRCS set
- };
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - Per element
- void Read_Buffer_Continue();
- void Read_Buffer_Unsynched();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void caption_management();
- void caption_statement();
- void data_unit_data(int64u End);
- void Character(int16u CharacterSet, int8u G_Value, int8u FirstByte, int8u SecondByte);
- void Add(Char Character);
- void Add(Ztring Character);
- void DefaultMacro();
- void control_code();
- void NUL();
- void BEL();
- void APB();
- void APF();
- void APD();
- void APU();
- void CS();
- void APR();
- void LS1();
- void LS0();
- void PAPF();
- void CAN();
- void SS2();
- void ESC();
- void APS();
- void SS3();
- void RS();
- void US();
- void xxF();
- void xxZ();
- void SZX();
- void COL();
- void FLC();
- void CDC();
- void POL();
- void WMM();
- void MACRO();
- void HLC();
- void RPC();
- void SPL();
- void STL();
- void CSI();
- void TIME();
-
- //Stream
- struct stream
- {
- string ISO_639_language_code;
- int8u DMF_reception;
- int8u Format;
-
- int16u G[4];
- int8u G_Width[4];
- int8u GL; // Locked
- int8u GL_SS; // Single
- int8u GR; // Locked
-
- Ztring Line;
-
- stream()
- {
- DMF_reception=(int8u)-1;
- Format=(int8u)-1;
-
- // Table 8-2 Initial status
- G[0]=GS_Kanji;
- G[1]=GS_Alphanumeric;
- G[2]=GS_Hiragana;
- G[3]=GS_DRCS|GS_Macro;
- G_Width[0]=2;
- G_Width[1]=1;
- G_Width[2]=1;
- G_Width[3]=1;
- GL=0;
- GL_SS=0;
- GR=2;
- }
- };
- typedef std::vector<stream> streams;
- streams Streams;
-
- //Temp
- void JIS (int8u Row, int8u Column);
-
- //Config
- int8u Caption_conversion_type;
-
- //Ancillary
- #if defined(MEDIAINFO_MPEGTS_YES)
- File__Analyze* Parser;
- #endif
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Cdp.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Cdp.cpp
deleted file mode 100644
index 6307fdc89..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Cdp.cpp
+++ /dev/null
@@ -1,598 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_CDP_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_Cdp.h"
-#if defined(MEDIAINFO_EIA608_YES)
- #include "MediaInfo/Text/File_Eia608.h"
-#endif
-#if MEDIAINFO_ADVANCED
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#endif //MEDIAINFO_ADVANCED
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-using namespace std;
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-namespace MediaInfoLib
-{
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Cdp_cc_type(int8u cc_type)
-{
- switch (cc_type)
- {
- case 0 : return "CEA-608 line 21 field 1 closed captions"; //closed caption 3 if this is second field
- case 1 : return "CEA-608 line 21 field 2 closed captions"; //closed caption 4 if this is second field
- case 2 : return "DTVCC Channel Packet Data";
- case 3 : return "DTVCC Channel Packet Start";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-float32 Cdp_cdp_frame_rate(int8u cdp_frame_rate)
-{
- switch (cdp_frame_rate)
- {
- case 1 : return (float32)23.976;
- case 2 : return (float32)24.000;
- case 3 : return (float32)25.000;
- case 4 : return (float32)29.970;
- case 5 : return (float32)30.000;
- case 6 : return (float32)50.000;
- case 7 : return (float32)59.940;
- case 8 : return (float32)60.000;
- default : return (float32) 0.000;
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Cdp::File_Cdp()
-:File__Analyze()
-{
- //Config
- PTS_DTS_Needed=true;
-
- //In
- AspectRatio=0;
-
- //Temp
- ParserName=__T("CDP");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Cdp;
- StreamIDs_Width[0]=1;
- #endif //MEDIAINFO_EVENTS
- Streams.resize(3); //CEA-608 Field 1, CEA-608 Field 2, CEA-708 Channel
- Streams_Count=0;
-
- //In
- WithAppleHeader=false;
- AspectRatio=0;
-
- //Temp
- cdp_frame_rate=(int8u)-1;
-
- //Descriptors
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- ServiceDescriptors=new File__Analyze::servicedescriptors;
- #endif
-
- //cdp_length
- cdp_length_Min=(int8u)-1;
- cdp_length_Max=0;
-}
-
-//---------------------------------------------------------------------------
-File_Cdp::~File_Cdp()
-{
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- delete Streams[Pos]; //Streams[Pos]=NULL
-
- //EIA-708 descriptors
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- delete ServiceDescriptors;
- #endif
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Cdp::Streams_Accept()
-{
- Fill(Stream_General, 0, General_Format, WithAppleHeader?"Final Cut CDP":"CDP");
-}
-
-//---------------------------------------------------------------------------
-void File_Cdp::Streams_Update()
-{
- Clear(Stream_Text);
-
- //Per stream
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- if (Streams[Pos] && Streams[Pos]->Parser && Streams[Pos]->Parser->Status[IsFilled] /*&& Streams[Pos]->Parser->Status[IsUpdated]*/ && Streams[Pos]->Parser->Count_Get(Stream_Text))
- Streams_Update_PerStream(Pos);
-}
-
-//---------------------------------------------------------------------------
-void File_Cdp::Streams_Update_PerStream(size_t Pos)
-{
- if (Streams[Pos]==NULL)
- return;
-
- Update(Streams[Pos]->Parser);
-
- if (Streams[Pos]->Parser)
- {
- for (size_t Pos2=0; Pos2<Streams[Pos]->Parser->Count_Get(Stream_Text); Pos2++)
- {
- Stream_Prepare(Stream_Text);
- Merge(*Streams[Pos]->Parser, Stream_Text, Pos2, StreamPos_Last);
- if (WithAppleHeader)
- Fill(Stream_Text, StreamPos_Last, "MuxingMode", "Final Cut");
- Fill(Stream_Text, StreamPos_Last, "MuxingMode", "CDP");
- if (cdp_frame_rate!=(int8u)-1)
- Fill(Stream_Text, StreamPos_Last, Text_FrameRate, Cdp_cdp_frame_rate(cdp_frame_rate));
- Fill(Stream_Text, StreamPos_Last, Text_ID, Streams[Pos]->Parser->Retrieve(Stream_Text, Pos2, Text_ID), true);
-
- //cdp_length
- if (cdp_length_Min<=cdp_length_Max)
- {
- Fill(Stream_Text, StreamPos_Last, "cdp_length_Min", cdp_length_Min, 10, true);
- Fill(Stream_Text, StreamPos_Last, "cdp_length_Max", cdp_length_Max, 10, true);
- (*Stream_More)[Stream_Text][StreamPos_Last](Ztring().From_Local("cdp_length_Min"), Info_Options)=__T("N NT");
- (*Stream_More)[Stream_Text][StreamPos_Last](Ztring().From_Local("cdp_length_Max"), Info_Options)=__T("N NT");
- }
- }
-
- Ztring LawRating=Streams[Pos]->Parser->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=Streams[Pos]->Parser->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Cdp::Streams_Finish()
-{
- Clear(Stream_Text);
-
- //Per stream
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- if (Streams[Pos] && Streams[Pos]->Parser && Streams[Pos]->Parser->Status[IsAccepted] /*&& Streams[Pos]->Parser->Status[IsUpdated]*/)
- {
- Finish(Streams[Pos]->Parser);
- Streams_Update_PerStream(Pos);
- }
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Cdp::Read_Buffer_Unsynched()
-{
- //Parsing
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- if (Streams[Pos] && Streams[Pos]->Parser)
- Streams[Pos]->Parser->Open_Buffer_Unsynch();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Cdp::Read_Buffer_Continue()
-{
- if (Buffer_Size==0)
- return;
-
- if (WithAppleHeader)
- {
- int32u Size, Magic;
- Get_B4 (Size, "Size");
- Get_B4 (Magic, "Magic");
-
- FILLING_BEGIN();
- if (Magic!=0x63636470)
- {
- Reject("CDP");
- return;
- }
- FILLING_END();
- }
-
- //CRC
- int8u CRC=0;
- for (size_t Pos=WithAppleHeader?8:0; Pos<Buffer_Size; Pos++)
- CRC+=Buffer[Pos];
- if (CRC)
- {
- Skip_XX(Element_Size-Element_Offset, "Invalid data (CRC fails)");
- return;
- }
-
- cdp_header();
- while(Element_Offset<Element_Size)
- {
- int8u section_id;
- Peek_L1(section_id);
- switch (section_id)
- {
- case 0x71 : time_code_section(); break;
- case 0x72 : ccdata_section(); break;
- case 0x73 : ccsvcinfo_section(); break;
- case 0x74 : cdp_footer(); break;
- case 0xFF : Skip_B1("Padding?"); break;
- default : if (section_id>=0x75 && section_id<=0xEF)
- future_section();
- else
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- }
- }
-}
-
-//***************************************************************************
-// Functions
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Cdp::cdp_header()
-{
- Element_Begin1("cdp_header");
- int16u cdp_identifier;
- int8u cdp_length;
- Get_B2 ( cdp_identifier, "cdp_identifier");
- Get_B1 ( cdp_length, "cdp_length");
- BS_Begin();
- Get_S1 (4, cdp_frame_rate, "cdp_frame_rate"); Param_Info1(Ztring::ToZtring(Cdp_cdp_frame_rate(cdp_frame_rate))+__T(" fps"));
- Skip_S1(4, "Reserved");
- Skip_SB( "time_code_present");
- Skip_SB( "ccdata_present");
- Skip_SB( "svcinfo_present");
- Skip_SB( "svc_info_start");
- Skip_SB( "svc_info_change");
- Skip_SB( "svc_info_complete");
- Skip_SB( "caption_service_active");
- Skip_SB( "Reserved");
- BS_End();
- Skip_B2( "cdp_hdr_sequence_cntr");
- Element_End0();
-
- FILLING_BEGIN();
- if (!Status[IsAccepted])
- {
- if (cdp_identifier!=0x9669)
- {
- Reject("CDP");
- return;
- }
-
- Accept("CDP");
- }
-
- //cdp_length
- if (cdp_length>cdp_length_Max)
- cdp_length_Max=cdp_length;
- if (cdp_length<cdp_length_Min)
- cdp_length_Min=cdp_length;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Cdp::time_code_section()
-{
- Element_Begin1("time_code_section");
- Skip_B1( "time_code_section_id");
- BS_Begin();
- Mark_1();
- Mark_1();
- Skip_S1(2, "tc_10hrs");
- Skip_S1(4, "tc_1hrs");
- Mark_1();
- Skip_S1(3, "tc_10min");
- Skip_S1(4, "tc_1min");
- Skip_SB( "tc_field_flag");
- Skip_S1(3, "tc_10sec");
- Skip_S1(4, "tc_1sec");
- Skip_SB( "drop_frame_flag");
- Mark_0();
- Skip_S1(2, "tc_10fr");
- Skip_S1(4, "tc_1fr");
- BS_End();
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Cdp::ccdata_section()
-{
- //Parsing
- int8u cc_count;
- Element_Begin1("ccdata_section");
- Skip_B1( "ccdata_id");
- BS_Begin();
- Mark_1();
- Mark_1();
- Mark_1();
- Get_S1 (5, cc_count, "cc_count");
- BS_End();
- for (int8u Pos=0; Pos<cc_count; Pos++)
- {
- Element_Begin1("cc");
- int8u cc_type;
- bool cc_valid;
- BS_Begin();
- Mark_1();
- Mark_1();
- Mark_1();
- Mark_1();
- Mark_1();
- Get_SB ( cc_valid, "cc_valid");
- Get_S1 (2, cc_type, "cc_type"); Param_Info1(Cdp_cc_type(cc_type));
- BS_End();
-
- #if MEDIAINFO_ADVANCED
- if (cc_type>=2 && !Streams[2] && Config->File_Eia708_DisplayEmptyStream_Get())
- CreateStream(2);
- #endif //MEDIAINFO_ADVANCED
-
- if (cc_valid)
- {
- Element_Begin1("cc_data");
- //Calculating the parser position
- int8u Parser_Pos=cc_type==3?2:cc_type; //cc_type 2 and 3 are for the same text
-
- //Stream creation
- if (Streams[Parser_Pos]==NULL)
- CreateStream(Parser_Pos);
-
- //Parsing
- #if MEDIAINFO_DEMUX
- Element_Code=Parser_Pos;
- Demux(Buffer+(size_t)(Buffer_Offset+Element_Offset), 2, ContentType_MainStream);
- #endif //MEDIAINFO_DEMUX
- if (!Streams[Parser_Pos]->Parser->Status[IsFinished])
- {
- if (Streams[Parser_Pos]->Parser->PTS_DTS_Needed)
- {
- Streams[Parser_Pos]->Parser->FrameInfo.PCR=FrameInfo.PCR;
- Streams[Parser_Pos]->Parser->FrameInfo.PTS=FrameInfo.PTS;
- Streams[Parser_Pos]->Parser->FrameInfo.DTS=FrameInfo.DTS;
- }
- if (Parser_Pos==2)
- {
- #if defined(MEDIAINFO_EIA708_YES)
- ((File_Eia708*)Streams[2]->Parser)->cc_type=cc_type;
- if (AspectRatio)
- ((File_Eia708*)Streams[2]->Parser)->AspectRatio=AspectRatio;
- #endif //defined(MEDIAINFO_EIA708_YES)
- }
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- Streams[Parser_Pos]->Parser->ServiceDescriptors=ServiceDescriptors;
- #endif
- Open_Buffer_Continue(Streams[Parser_Pos]->Parser, Buffer+(size_t)(Buffer_Offset+Element_Offset), 2);
- Element_Offset+=2;
-
- //Filled
- if (!Streams[Parser_Pos]->IsFilled && Streams[Parser_Pos]->Parser->Status[IsFilled])
- {
- if (Count_Get(Stream_General)==0)
- Accept("CDP");
- Streams_Count++;
- if (Streams_Count==3)
- Fill("CDP");
- Streams[Parser_Pos]->IsFilled=true;
- }
- }
- else
- Skip_XX(2, "Data");
- Element_End0();
- }
- else
- Skip_XX(2, "Junk");
- Element_End0();
- }
- Element_End0();
-
- Frame_Count++;
- Frame_Count_InThisBlock++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
-}
-
-//---------------------------------------------------------------------------
-void File_Cdp::ccsvcinfo_section()
-{
- //Parsing
- int8u svc_count;
- Element_Begin1("ccsvcinfo_section");
- Skip_B1( "ccsvcinfo_id");
- BS_Begin();
- Skip_SB( "reserved");
- Skip_SB( "svc_info_start");
- Skip_SB( "svc_info_change");
- Skip_SB( "svc_info_complete");
- Get_S1 (4, svc_count, "svc_count");
- BS_End();
- for (int8u Pos=0; Pos<svc_count; Pos++)
- {
- Element_Begin1("svc");
- bool csn_size;
- BS_Begin();
- Skip_SB( "reserved");
- Get_SB ( csn_size, "csn_size");
- if (csn_size)
- {
- Skip_SB( "reserved");
- Skip_S1(5, "caption_service_number");
- }
- else
- Skip_S1(6, "caption_service_number");
- BS_End();
-
- //svc_data_byte - caption_service_descriptor
- Element_Begin1("service");
- string language;
- int8u caption_service_number=0;
- bool digital_cc, line21_field=false;
- Get_String(3, language, "language");
- BS_Begin();
- Get_SB (digital_cc, "digital_cc");
- Skip_SB( "reserved");
- if (digital_cc) //line21
- Get_S1 (6, caption_service_number, "caption_service_number");
- else
- {
- Skip_S1(5, "reserved");
- Get_SB ( line21_field, "line21_field");
-
- //Coherency test
- if (line21_field && svc_count==1)
- line21_field=false; // Wrong info in the descriptor?
- }
- Skip_SB( "easy_reader");
- Skip_SB( "wide_aspect_ratio");
- Skip_S2(14, "reserved");
- BS_End();
- Element_End0();
- Element_End0();
-
- FILLING_BEGIN();
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- if (digital_cc)
- {
- #if defined(MEDIAINFO_EIA708_YES)
- ServiceDescriptors->ServiceDescriptors708[caption_service_number].language=language;
- #endif
- }
- else
- {
- #if defined(MEDIAINFO_EIA708_YES)
- ServiceDescriptors->ServiceDescriptors608[line21_field?1:0].language=language;
- #endif
- }
- #endif
-
- //Stream creation
- int8u Parser_Pos;
- if (digital_cc) //line21
- Parser_Pos = 2;
- else
- Parser_Pos= (line21_field ? 1 : 0); //cc_type 2 and 3 are for the same text
- if (Streams[Parser_Pos]==NULL)
- CreateStream(Parser_Pos);
- FILLING_END();
- }
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Cdp::cdp_footer()
-{
- Element_Begin1("cdp_footer");
- Skip_B1( "cdp_footer_id");
- Skip_B2( "cdp_ftr_sequence_cntr");
- Skip_B1( "packet_checksum");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Cdp::future_section()
-{
- //Parsing
- int8u length;
- Element_Begin1("future_section");
- Skip_B1( "future_section_id");
- Get_B1 (length, "length");
- Skip_XX(length, "Unknown");
- Element_End0();
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Cdp::CreateStream(int8u Parser_Pos)
-{
- if (Streams[Parser_Pos])
- return; //Already done
-
- //Parsing
- #if MEDIAINFO_DEMUX
- Element_Code=Parser_Pos;
- #endif //MEDIAINFO_DEMUX
-
- //Creation of the parser
- Streams[Parser_Pos]=new stream;
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- if (Parser_Pos<2)
- {
- #if defined(MEDIAINFO_EIA608_YES)
- Streams[Parser_Pos]->Parser=new File_Eia608();
- ((File_Eia608*)Streams[Parser_Pos]->Parser)->cc_type=Parser_Pos;
- #else //defined(MEDIAINFO_EIA608_YES)
- Streams[Parser_Pos]->Parser=new File__Analyze();
- #endif //defined(MEDIAINFO_EIA608_YES)
- }
- else
- {
- #if defined(MEDIAINFO_EIA708_YES)
- Streams[Parser_Pos]->Parser=new File_Eia708();
- #else //defined(MEDIAINFO_EIA708_YES)
- Streams[Parser_Pos]->Parser=new File__Analyze();
- #endif //defined(MEDIAINFO_EIA708_YES)
- }
- #else //defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- Streams[Parser_Pos]->Parser=new File__Analyze();
- #endif //defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
-
- //Init
- Streams[Parser_Pos]->Parser->ServiceDescriptors=ServiceDescriptors;
- Open_Buffer_Init(Streams[Parser_Pos]->Parser);
- Streams[Parser_Pos]->Parser->Accept();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_CDP_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Cdp.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Cdp.h
deleted file mode 100644
index a7f04ff1f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Cdp.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Caption Distribution Packet files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_CdpH
-#define MediaInfo_File_CdpH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#if defined(MEDIAINFO_EIA608_YES)
- #include "MediaInfo/Text/File_Eia608.h"
-#endif
-#if defined(MEDIAINFO_EIA708_YES)
- #include "MediaInfo/Text/File_Eia708.h"
-#endif
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Cdp
-//***************************************************************************
-
-class File_Cdp : public File__Analyze
-{
-public :
- //In
- bool WithAppleHeader;
- float64 AspectRatio;
-
- //Constructor/Destructor
- File_Cdp();
- ~File_Cdp();
-
-private :
- //Streams management
- void Streams_Accept();
- void Streams_Update();
- void Streams_Update_PerStream(size_t Pos);
- void Streams_Finish();
-
- //Synchro
- void Read_Buffer_Unsynched();
-
- //Buffer - Global
- void Read_Buffer_Continue();
-
- //Elements
- void cdp_header();
- void time_code_section();
- void ccdata_section();
- void ccsvcinfo_section();
- void cdp_footer();
- void future_section();
-
- //Stream
- struct stream
- {
- File__Analyze* Parser;
- size_t StreamPos;
- bool IsFilled;
-
- stream()
- {
- Parser=NULL;
- StreamPos=(size_t)-1;
- IsFilled=false;
- }
-
- ~stream()
- {
- delete Parser; //Parser=NULL;
- }
- };
- std::vector<stream*> Streams;
- size_t Streams_Count;
-
- //Temp
- int8u cdp_frame_rate;
-
- //Helpers
- void CreateStream(int8u Parser_Pos);
-
- //Tests
- int8u cdp_length_Min;
- int8u cdp_length_Max;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Cmml.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Cmml.cpp
deleted file mode 100644
index 15a44f6f5..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Cmml.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Note : the buffer must be given in ONE call
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_CMML_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_Cmml.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Cmml::Header_Parse()
-{
- //Filling
- Header_Fill_Code(0, "Cmml");
- Header_Fill_Size(Element_Size);
-}
-
-//---------------------------------------------------------------------------
-void File_Cmml::Data_Parse()
-{
- //Parsing
- if (Status[IsAccepted])
- Configuration();
- else
- Identification();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Cmml::Identification()
-{
- Element_Name("Identification");
-
- //Parsing
- int16u VersionMajor, VersionMinor;
- Skip_Local(8, "Signature");
- Get_L2 (VersionMajor, "version major");
- Get_L2 (VersionMinor, "version minor");
- Skip_L8( "granule rate numerator");
- Skip_L8( "granule rate denominator");
- Skip_L1( "granule shift");
-
- FILLING_BEGIN();
- Accept("CMML");
-
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Format, "CMML");
- Fill(Stream_Text, 0, Text_Codec, "CMML");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Cmml::Configuration()
-{
- Element_Name("Configuration");
-
- //Parsing
- Ztring Data;
- Get_UTF8(Element_Size, Data, "Data");
-
- FILLING_BEGIN();
- Ztring Value;
- Value=Data.SubString(__T("<head>"), __T("</head>"));
- if (!Value.empty())
- Fill(Stream_Text, 0, Text_Title, Value.SubString(__T("<title>"), __T("</title>")));
- if (Data.find(__T("<clip"))!=string::npos)
- Finish("CMML");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_CMML_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Cmml.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Cmml.h
deleted file mode 100644
index b20f0b592..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Cmml.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Cmml files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_CmmlH
-#define MediaInfo_File_CmmlH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Cmml
-//***************************************************************************
-
-class File_Cmml : public File__Analyze
-{
-private :
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Identification();
- void Configuration();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_DtvccTransport.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_DtvccTransport.cpp
deleted file mode 100644
index e4c85a9c0..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_DtvccTransport.cpp
+++ /dev/null
@@ -1,384 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_DtvccTransport.h"
-#if defined(MEDIAINFO_EIA608_YES)
- #include "MediaInfo/Text/File_Eia608.h"
-#endif
-#if defined(MEDIAINFO_EIA708_YES)
- #include "MediaInfo/Text/File_Eia708.h"
-#endif
-#if MEDIAINFO_ADVANCED
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#endif //MEDIAINFO_ADVANCED
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-namespace MediaInfoLib
-{
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* DtvccTransport_cc_type (int8u cc_type)
-{
- switch (cc_type)
- {
- case 0 : return "CEA-608 line 21 field 1 closed captions"; //closed caption 3 if this is second field
- case 1 : return "CEA-608 line 21 field 2 closed captions"; //closed caption 4 if this is second field
- case 2 : return "DTVCC Channel Packet Data";
- case 3 : return "DTVCC Channel Packet Start";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_DtvccTransport::File_DtvccTransport()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("DTVCC Transport");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_DtvccTransport;
- StreamIDs_Width[0]=1;
- #endif //MEDIAINFO_EVENTS
- PTS_DTS_Needed=true;
-
- //In
- Format=Format_Unknown;
- AspectRatio=0;
-
- //Temp
- Streams.resize(3); //CEA-608 Field 1, CEA-608 Field 2, CEA-708 Channel
-}
-
-//---------------------------------------------------------------------------
-File_DtvccTransport::~File_DtvccTransport()
-{
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- delete Streams[Pos]; //Streams[Pos]=NULL
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DtvccTransport::Streams_Update()
-{
- Clear(Stream_Text);
-
- //Per stream
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- if (Streams[Pos] && Streams[Pos]->Parser && Streams[Pos]->Parser->Status[IsFilled] /*&& Streams[Pos]->Parser->Status[IsUpdated]*/ && Streams[Pos]->Parser->Count_Get(Stream_Text))
- Streams_Update_PerStream(Pos);
-}
-
-//---------------------------------------------------------------------------
-void File_DtvccTransport::Streams_Update_PerStream(size_t Pos)
-{
- if (Streams[Pos]==NULL)
- return;
-
- Update(Streams[Pos]->Parser);
-
- if (Streams[Pos]->Parser)
- {
- for (size_t Pos2=0; Pos2<Streams[Pos]->Parser->Count_Get(Stream_Text); Pos2++)
- {
- Stream_Prepare(Stream_Text);
- Merge(*Streams[Pos]->Parser, Stream_Text, Pos2, StreamPos_Last);
- Fill(Stream_Text, StreamPos_Last, "MuxingMode", Format==Format_DVD?__T("DVD-Video"):__T("DTVCC Transport"));
- Fill(Stream_Text, StreamPos_Last, Text_ID, Streams[Pos]->Parser->Retrieve(Stream_Text, Pos2, Text_ID), true);
- }
-
- Ztring LawRating=Streams[Pos]->Parser->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=Streams[Pos]->Parser->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_DtvccTransport::Streams_Finish()
-{
- Clear(Stream_Text);
-
- if (ServiceDescriptors)
- {
- if (ServiceDescriptors->ServiceDescriptors608.find(0)!=ServiceDescriptors->ServiceDescriptors608.end())
- CreateStream(0);
- if (ServiceDescriptors->ServiceDescriptors608.find(1)!=ServiceDescriptors->ServiceDescriptors608.end())
- CreateStream(1);
- if (!ServiceDescriptors->ServiceDescriptors708.empty())
- CreateStream(2);
- }
-
- //Per stream
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- if (Streams[Pos] && Streams[Pos]->Parser && Streams[Pos]->Parser->Status[IsAccepted] /*&& Streams[Pos]->Parser->Status[IsUpdated]*/)
- {
- Finish(Streams[Pos]->Parser);
- Streams_Update_PerStream(Pos);
- }
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DtvccTransport::Read_Buffer_Unsynched()
-{
- //Parsing
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- if (Streams[Pos] && Streams[Pos]->Parser)
- Streams[Pos]->Parser->Open_Buffer_Unsynch();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DtvccTransport::Read_Buffer_Continue()
-{
- //Parsing
- Element_Begin1(Format==Format_DVD?"DVD Captions":"DTVCC Transport");
- int8u cc_count;
- bool process_cc_data_flag, additional_data_flag;
- BS_Begin();
- if (Format==Format_DVD)
- {
- //Modified DTVCC Transport from DVD
- Skip_SB( "field 1 then field 2");
- Get_S1 (7, cc_count, "cc_count");
- process_cc_data_flag=true;
- additional_data_flag=false;
- }
- else
- {
- //Normal DTVCC Transport
- bool process_em_data_flag;
- Get_SB (process_em_data_flag, "process_em_data_flag");
- Get_SB (process_cc_data_flag, "process_cc_data_flag");
- Get_SB (additional_data_flag, "additional_data_flag");
- Get_S1 (5, cc_count, "cc_count");
- Skip_S1(8, process_em_data_flag?"em_data":"reserved"); //Emergency message
- }
- BS_End();
- if (process_cc_data_flag)
- {
- for (int8u Pos=0; Pos<cc_count; Pos++)
- {
- if (Element_Offset+3>Element_Size)
- break; //Found one stream with bad cc_count, we discard cc_count without flagging the stream as untrusted for the moment
-
- Element_Begin1("cc");
- int8u cc_type;
- bool cc_valid;
- BS_Begin();
- Mark_1();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- if (Format==Format_DVD)
- {
- //Modified DTVCC Transport from DVD
- Mark_1();
- Mark_1();
- Get_S1 (1, cc_type, "cc_type"); Param_Info1(DtvccTransport_cc_type(cc_type));
- cc_valid=true;
- }
- else
- {
- //Normal DTVCC Transport
- Get_SB ( cc_valid, "cc_valid");
- Get_S1 (2, cc_type, "cc_type"); Param_Info1(DtvccTransport_cc_type(cc_type));
- }
- BS_End();
-
- #if MEDIAINFO_ADVANCED
- if (cc_type>=2 && !Streams[2] && Config->File_Eia708_DisplayEmptyStream_Get())
- CreateStream(2);
- #endif //MEDIAINFO_ADVANCED
-
- if (cc_valid)
- {
- Element_Begin1("cc_data");
- //Calculating the parser position
- int8u Parser_Pos=cc_type==3?2:cc_type; //cc_type 2 and 3 are for the same text
-
- //Stream creation
- if (Streams[Parser_Pos]==NULL)
- CreateStream(Parser_Pos);
-
- //Parsing
- #if MEDIAINFO_DEMUX
- Element_Code=Parser_Pos;
- Demux(Buffer+(size_t)(Buffer_Offset+Element_Offset), 2, ContentType_MainStream);
- #endif //MEDIAINFO_DEMUX
- if (!Streams[Parser_Pos]->Parser->Status[IsFinished])
- {
- //Parsing
- if (Streams[Parser_Pos]->Parser->PTS_DTS_Needed)
- {
- Streams[Parser_Pos]->Parser->FrameInfo.PCR=FrameInfo.PCR;
- Streams[Parser_Pos]->Parser->FrameInfo.PTS=FrameInfo.PTS;
- Streams[Parser_Pos]->Parser->FrameInfo.DTS=FrameInfo.DTS;
- }
- if (Parser_Pos==2)
- {
- #if defined(MEDIAINFO_EIA708_YES)
- ((File_Eia708*)Streams[2]->Parser)->cc_type=cc_type;
- if (AspectRatio)
- ((File_Eia708*)Streams[2]->Parser)->AspectRatio=AspectRatio;
- #endif
- if (cc_type==3)
- {
- ((File_Eia708*)Streams[2]->Parser)->cc_type=4; //Magic value saying that the buffer must be kept (this is only a point of synchro from the undelying layer)
- Open_Buffer_Continue(Streams[Parser_Pos]->Parser, Buffer+(size_t)(Buffer_Offset+Element_Offset), 0);
- ((File_Eia708*)Streams[2]->Parser)->cc_type=3;
- }
- }
- else
- {
- }
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- Streams[Parser_Pos]->Parser->ServiceDescriptors=ServiceDescriptors;
- #endif
- Open_Buffer_Continue(Streams[Parser_Pos]->Parser, Buffer+(size_t)(Buffer_Offset+Element_Offset), 2);
- Element_Show();
- Element_Offset+=2;
- }
- else
- Skip_XX(2, "Data");
- Element_End0();
- }
- else
- Skip_XX(2, "Junk");
- Element_End0();
- }
-
- FILLING_BEGIN();
- if (!Status[IsAccepted])
- Accept("DTVCC Transport");
- FILLING_END();
- }
- else
- Skip_XX(cc_count*2, "Junk");
-
- if (Format==Format_A53_4_GA94_03)
- {
- //Normal DTVCC Transport
- BS_Begin();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- BS_End();
-
- if (additional_data_flag)
- {
- Skip_XX(Element_Size-Element_Offset, "additional_user_data");
- }
-
- while (Element_Offset<Element_Size)
- {
- Skip_B1( "Zero"); //TODO: test Zero
- }
- }
-
- Element_End0();
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DtvccTransport::CreateStream(int8u Parser_Pos)
-{
- if (Streams[Parser_Pos])
- return; //Already done
-
- //Parsing
- #if MEDIAINFO_DEMUX
- Element_Code=Parser_Pos;
- #endif //MEDIAINFO_DEMUX
-
- //Creation of the parser
- Streams[Parser_Pos]=new stream;
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- if (Parser_Pos<2)
- {
- #if defined(MEDIAINFO_EIA608_YES)
- Streams[Parser_Pos]->Parser=new File_Eia608();
- ((File_Eia608*)Streams[Parser_Pos]->Parser)->cc_type=Parser_Pos;
- #else //defined(MEDIAINFO_EIA608_YES)
- Streams[Parser_Pos]->Parser=new File__Analyze();
- #endif //defined(MEDIAINFO_EIA608_YES)
- }
- else
- {
- #if defined(MEDIAINFO_EIA708_YES)
- Streams[Parser_Pos]->Parser=new File_Eia708();
- #else //defined(MEDIAINFO_EIA708_YES)
- Streams[Parser_Pos]->Parser=new File__Analyze();
- #endif //defined(MEDIAINFO_EIA708_YES)
- }
- #else //defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- Streams[Parser_Pos]->Parser=new File__Analyze();
- #endif //defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
-
- //Init
- Streams[Parser_Pos]->Parser->ServiceDescriptors=ServiceDescriptors;
- Open_Buffer_Init(Streams[Parser_Pos]->Parser);
- Streams[Parser_Pos]->Parser->Accept();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_DTVCCTRANSPORT_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_DtvccTransport.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_DtvccTransport.h
deleted file mode 100644
index 200cb450a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_DtvccTransport.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Bar Data files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_DtvccTransportH
-#define MediaInfo_DtvccTransportH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_DtvccTransport
-//***************************************************************************
-
-class File_DtvccTransport : public File__Analyze
-{
-public :
- //In
- enum format
- {
- Format_Unknown,
- Format_A53_4_GA94_03, //MPEG_cc_data
- Format_DVD, //Unknown standard
- };
- format Format;
- float64 AspectRatio;
-
- //Constructor/Destructor
- File_DtvccTransport();
- ~File_DtvccTransport();
-
-private :
- //Streams management
- void Streams_Update();
- void Streams_Update_PerStream(size_t Pos);
- void Streams_Finish();
-
- //Synchro
- void Read_Buffer_Unsynched();
-
- //Buffer - Global
- void Read_Buffer_Continue();
-
- //Temp
- struct stream
- {
- File__Analyze* Parser;
-
- stream()
- {
- Parser=NULL;
- }
-
- ~stream()
- {
- delete Parser; //Parser=NULL;
- }
- };
- std::vector<stream*> Streams;
-
- //Helpers
- void CreateStream(int8u Parser_Pos);
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_DvbSubtitle.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_DvbSubtitle.cpp
deleted file mode 100644
index 4d17c99c8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_DvbSubtitle.cpp
+++ /dev/null
@@ -1,468 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DVBSUBTITLE_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_DvbSubtitle.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-const int8u DvbSubtitle_region_depth[8]=
-{
- 0,
- 2,
- 4,
- 8,
- 0,
- 0,
- 0,
- 0,
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_DvbSubtitle::File_DvbSubtitle()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("DVB Subtitle");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_DvbSubtitle;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- PTS_DTS_Needed=true;
- IsRawStream=true;
- MustSynchronize=true;
-
- //In
- Frame_Count_Valid=MediaInfoLib::Config.ParseSpeed_Get()>=0.3?32:2;
-
- //Temp
- MustFindDvbHeader=true;
-}
-
-//---------------------------------------------------------------------------
-File_DvbSubtitle::~File_DvbSubtitle()
-{
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::Streams_Fill()
-{
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Format, "DVB Subtitle");
-
- for (std::map<int8u, subtitle_stream_data>::iterator subtitle_stream=subtitle_streams.begin(); subtitle_stream!=subtitle_streams.end(); ++subtitle_stream)
- for (std::map<int16u, page_data>::iterator page=subtitle_stream->second.pages.begin(); page!=subtitle_stream->second.pages.end(); ++page)
- for (std::map<int8u, region_data>::iterator region=page->second.regions.begin(); region!=page->second.regions.end(); ++region)
- {
- Fill(Stream_Text, 0, "subtitle_stream_id", subtitle_stream->first);
- (*Stream_More)[Stream_Text][0](Ztring().From_Local("subtitle_stream_id"), Info_Options)=__T("N NI");
- Fill(Stream_Text, 0, "page_id", page->first);
- (*Stream_More)[Stream_Text][0](Ztring().From_Local("page_id"), Info_Options)=__T("N NI");
- Fill(Stream_Text, 0, "region_id", region->first);
- (*Stream_More)[Stream_Text][0](Ztring().From_Local("region_id"), Info_Options)=__T("N NI");
- Fill(Stream_Text, 0, "region_horizontal_address", region->second.page_composition_segment?Ztring::ToZtring(region->second.region_horizontal_address):Ztring());
- (*Stream_More)[Stream_Text][0](Ztring().From_Local("region_horizontal_address"), Info_Options)=__T("N NI");
- Fill(Stream_Text, 0, "region_vertical_address", region->second.page_composition_segment?Ztring::ToZtring(region->second.region_vertical_address):Ztring());
- (*Stream_More)[Stream_Text][0](Ztring().From_Local("region_vertical_address"), Info_Options)=__T("N NI");
- Fill(Stream_Text, 0, "region_width", region->second.region_composition_segment?Ztring::ToZtring(region->second.region_width):Ztring());
- (*Stream_More)[Stream_Text][0](Ztring().From_Local("region_width"), Info_Options)=__T("N NI");
- Fill(Stream_Text, 0, "region_height", region->second.region_composition_segment?Ztring::ToZtring(region->second.region_height):Ztring());
- (*Stream_More)[Stream_Text][0](Ztring().From_Local("region_height"), Info_Options)=__T("N NI");
- Fill(Stream_Text, 0, "region_depth", region->second.region_composition_segment?Ztring::ToZtring(DvbSubtitle_region_depth[region->second.region_depth]):Ztring());
- (*Stream_More)[Stream_Text][0](Ztring().From_Local("region_depth"), Info_Options)=__T("N NI");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::Streams_Finish()
-{
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_DvbSubtitle::Synchronize()
-{
- //Synchronizing
- if (MustFindDvbHeader)
- {
- while(Buffer_Offset+3<=Buffer_Size)
- {
- if (Buffer[Buffer_Offset]==0x20
- && Buffer[Buffer_Offset+1]==0x00
- && (Buffer[Buffer_Offset+2]==0x0F
- || Buffer[Buffer_Offset+1]==0xFF))
- break;
- Buffer_Offset++;
- }
-
- if (Buffer_Offset+3>Buffer_Size)
- return false;
-
- Accept();
- }
- else
- {
- while(Buffer_Offset<Buffer_Size)
- {
- if (Buffer[Buffer_Offset]==0x0F
- || Buffer[Buffer_Offset]==0xFF)
- break;
- Buffer_Offset++;
- }
-
- if (Buffer_Offset>=Buffer_Size)
- return false;
- }
-
- //Synched is OK
- Synched=true;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_DvbSubtitle::Synched_Test()
-{
- if (MustFindDvbHeader)
- {
- //Must have enough buffer for having header
- if (Buffer_Offset+1>Buffer_Size)
- return false;
-
- if (CC2(Buffer+Buffer_Offset)!=0x2000)
- {
- Synched=false;
- return true;
- }
-
- //Displaying it
- Element_Size=2;
- Skip_B1( "data_identifier");
- Get_B1 (subtitle_stream_id, "subtitle_stream_id");
- Buffer_Offset+=2;
- MustFindDvbHeader=false;
- }
-
- //Must have enough buffer for having header
- if (Buffer_Offset+1>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset]!=0x0F
- && Buffer[Buffer_Offset]!=0xFF)
- {
- Synched=false;
- return true;
- }
-
- //We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::Read_Buffer_Unsynched()
-{
- MustParseTheHeaderFile=true;
- Synched=false;
-}
-
-//***************************************************************************
-// Buffer - Demux
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-bool File_DvbSubtitle::Demux_UnpacketizeContainer_Test()
-{
- if (Demux_Offset==0)
- {
- Demux_Offset=Buffer_Offset;
- }
- while (Demux_Offset<Buffer_Size)
- {
- bool MustBreak;
- switch (Buffer[Demux_Offset])
- {
- case 0xFF :
- MustBreak=true; break; //0xFF is not in the demuxed frame
- default : MustBreak=false;
- }
- if (MustBreak)
- break; //while() loop
-
- if (Demux_Offset+6>Buffer_Size)
- return false; //No complete frame
-
- int16u segment_length=BigEndian2int16u(Buffer+Demux_Offset+4);
- Demux_Offset+=6+segment_length;
-
- if (Demux_Offset>=Buffer_Size)
- return false; //No complete frame
- }
-
- if (Demux_Offset>=Buffer_Size)
- return false; //No complete frame
-
- Demux_UnpacketizeContainer_Demux();
-
- Demux_TotalBytes++; //0xFF is not demuxed
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::Header_Parse()
-{
- //Parsing
- int8u sync_byte;
- Get_B1 (sync_byte, "sync_byte");
- switch (sync_byte)
- {
- case 0xFF : //Stuffing
- MustFindDvbHeader=true;
-
- //Filling
- Header_Fill_Code(0xFF, "end of PES data field marker");
- Header_Fill_Size(1);
- return;
- default : ; //Normal (0x0F)
- }
-
- int16u segment_length;
- int8u segment_type;
- Get_B1 (segment_type, "segment_type");
- Get_B2 (page_id, "page_id");
- Get_B2 (segment_length, "segment_length");
-
- //Filling
- Header_Fill_Code(segment_type);
- Header_Fill_Size(Element_Offset+segment_length);
-}
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::Data_Parse()
-{
- switch (Element_Code)
- {
- case 0x10 : page_composition_segment(); break;
- case 0x11 : region_composition_segment(); break;
- case 0x12 : CLUT_definition_segment(); break;
- case 0x13 : object_data_segment(); break;
- case 0x14 : display_definition_segment(); break;
- case 0x80 : end_of_display_set_segment(); break;
- case 0xFF : end_of_PES_data_field_marker(); return;
- default :
- if (Element_Code>=0x40 && Element_Code<=0x7F)
- reserved_for_future_use();
- else if (Element_Code>=0x81 && Element_Code<=0xEF)
- private_data();
- else if (Element_Size)
- Skip_XX(Element_Size, "Unknown");
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::page_composition_segment()
-{
- Element_Name("page composition segment");
-
- //Parsing
- Skip_B1( "page_time_out");
- BS_Begin();
- Skip_S1(4, "page_version_number");
- Skip_S1(2, "page_state");
- Skip_S1(2, "reserved");
- BS_End();
- while(Element_Offset<Element_Size)
- {
- Element_Begin1("Region");
- int16u region_horizontal_address, region_vertical_address;
- int8u region_id;
- Get_B1 (region_id, "region_id");
- Skip_B1( "reserved");
- Get_B2 (region_horizontal_address, "region_horizontal_address");
- Get_B2 (region_vertical_address, "region_vertical_address");
- Element_End0();
-
- FILLING_BEGIN();
- subtitle_streams[subtitle_stream_id].pages[page_id].regions[region_id].page_composition_segment=true;
- subtitle_streams[subtitle_stream_id].pages[page_id].regions[region_id].region_horizontal_address=region_horizontal_address;
- subtitle_streams[subtitle_stream_id].pages[page_id].regions[region_id].region_vertical_address=region_vertical_address;
- FILLING_END();
- }
-}
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::region_composition_segment()
-{
- Element_Name("region composition segment");
-
- //Parsing
- int16u region_width, region_height;
- int8u region_id, region_depth;
- Get_B1 ( region_id, "region_id");
- BS_Begin();
- Skip_S1(4, "region_version_number");
- Skip_S1(1, "region_fill_flag");
- Skip_S1(3, "reserved");
- BS_End();
- Get_B2 ( region_width, "region_width");
- Get_B2 ( region_height, "region_height");
- BS_Begin();
- Skip_S1(3, "region_level_of_compatibility");
- Get_S1 (3, region_depth, "region_depth"); Param_Info2(DvbSubtitle_region_depth[region_depth], " bits");
- Skip_S1(2, "reserved");
- BS_End();
- Skip_B1( "CLUT_id");
- Skip_B1( "region_8-bit_pixel_code");
- BS_Begin();
- Skip_S1(4, "region_4-bit_pixel-code");
- Skip_S1(2, "region_2-bit_pixel-code");
- Skip_S1(2, "reserved");
- BS_End();
- while(Element_Offset<Element_Size)
- {
- Element_Begin1("Object");
- int8u object_type;
- Skip_B2( "object_id");
- BS_Begin();
- Get_S1 ( 2, object_type, "object_type");
- Skip_S1( 2, "object_provider_flag");
- Skip_S1(12, "object_horizontal_position");
- Skip_S1( 4, "reserved");
- Skip_S1(12, "object_vertical_position");
- BS_End();
- switch (object_type)
- {
- case 0x01 :
- case 0x02 :
- Skip_B2( "foreground_pixel_code");
- Skip_B2( "background_pixel_code");
- break;
- default : ;
- }
- }
- Element_End0();
-
- FILLING_BEGIN();
- subtitle_streams[subtitle_stream_id].pages[page_id].regions[region_id].region_composition_segment=true;
- subtitle_streams[subtitle_stream_id].pages[page_id].regions[region_id].region_width=region_width;
- subtitle_streams[subtitle_stream_id].pages[page_id].regions[region_id].region_height=region_height;
- subtitle_streams[subtitle_stream_id].pages[page_id].regions[region_id].region_depth=region_depth;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::CLUT_definition_segment()
-{
- Element_Name("CLUT definition segment");
-
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::object_data_segment()
-{
- Element_Name("object data segment");
-
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::display_definition_segment()
-{
- Element_Name("display definition segment");
-
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::reserved_for_future_use()
-{
- Element_Name("reserved for future use");
-
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::end_of_display_set_segment()
-{
- Element_Name("end of display set segment");
-
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::private_data()
-{
- Element_Name("private data");
-
- Skip_XX(Element_Size, "Data");
-}
-
-//---------------------------------------------------------------------------
-void File_DvbSubtitle::end_of_PES_data_field_marker()
-{
- Frame_Count++;
- if (!Status[IsFilled] && Frame_Count>Frame_Count_Valid)
- {
- Fill();
- Finish();
- }
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_DVBSUBTITLE_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_DvbSubtitle.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_DvbSubtitle.h
deleted file mode 100644
index 15cda5921..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_DvbSubtitle.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about DVB Subtitle streams
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DvbSubtitleH
-#define MediaInfo_File_DvbSubtitleH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_DvbSubtitle
-//***************************************************************************
-
-class File_DvbSubtitle : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
-
- //Constructor/Destructor
- File_DvbSubtitle();
- ~File_DvbSubtitle();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
- void Read_Buffer_Unsynched();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test();
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void page_composition_segment();
- void region_composition_segment();
- void CLUT_definition_segment();
- void object_data_segment();
- void display_definition_segment();
- void reserved_for_future_use();
- void end_of_display_set_segment();
- void private_data();
- void end_of_PES_data_field_marker();
-
- //Temp
- bool MustFindDvbHeader;
- int16u page_id;
- int8u subtitle_stream_id;
- struct region_data
- {
- int16u region_horizontal_address;
- int16u region_vertical_address;
-
- int16u region_width;
- int16u region_height;
- int16u region_depth;
-
- bool page_composition_segment;
- bool region_composition_segment;
-
- region_data()
- {
- page_composition_segment=false;
- region_composition_segment=false;
- }
- };
- struct page_data
- {
- std::map<int8u, region_data> regions; //Key is region_id
- };
- struct subtitle_stream_data
- {
- std::map<int16u, page_data> pages; //Key is page_id
- };
- std::map<int8u, subtitle_stream_data> subtitle_streams; //Key is subtitle_stream_id
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia608.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia608.cpp
deleted file mode 100644
index f107766b4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia608.cpp
+++ /dev/null
@@ -1,1102 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_EIA608_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_Eia608.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// CAE-608-E section F.1.1.5
-static const int8u Eia608_PAC_Row[]=
-{
- 10,
- 0, //or 1
- 2, //or 3
- 11, //or 12
- 13, //or 14
- 4, //or 5
- 6, //or 7
- 8 //or 9
-};
-
-//***************************************************************************
-//
-//***************************************************************************
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Eia608::File_Eia608()
-:File__Analyze()
-{
- //Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Eia608;
- StreamIDs_Width[0]=1;
- #endif //MEDIAINFO_EVENTS
- ParserName=__T("EIA-608");
- PTS_DTS_Needed=true;
-
- //In
- cc_type=(int8u)-1;
-
- //Temp
- XDS_Level=(size_t)-1;
- TextMode=false;
- DataChannelMode=false;
- cc_data_1_Old=0x00;
- cc_data_2_Old=0x00;
- HasContent=false;
-}
-
-//---------------------------------------------------------------------------
-File_Eia608::~File_Eia608()
-{
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- delete Streams[Pos];
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Eia608::Streams_Fill()
-{
- if (Config->File_Eia608_DisplayEmptyStream_Get() && Streams.size()<2)
- Streams.resize(2);
-
- if (!HasContent && ServiceDescriptors && ServiceDescriptors->ServiceDescriptors608.find(cc_type)!=ServiceDescriptors->ServiceDescriptors608.end())
- {
- TextMode=0;
- DataChannelMode=0;
- Special_14(0x20); //CC1/CC3 fake RCL - Resume Caption Loading
- }
-
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- if (Streams[Pos] || (Pos<2 && Config->File_Eia608_DisplayEmptyStream_Get()))
- {
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, StreamPos_Last, Text_Format, "EIA-608");
- Fill(Stream_Text, StreamPos_Last, Text_StreamSize, 0);
- Fill(Stream_Text, StreamPos_Last, Text_BitRate_Mode, "CBR");
- if (cc_type!=(int8u)-1)
- {
- string ID=Pos<2?"CC":"T";
- ID+='1'+(cc_type*2)+(Pos%2);
- Fill(Stream_Text, StreamPos_Last, Text_ID, ID);
- Fill(Stream_Text, StreamPos_Last, "CaptionServiceName", ID);
- (*Stream_More)[StreamKind_Last][StreamPos_Last](Ztring().From_Local("CaptionServiceName"), Info_Options)=__T("N NT");
- }
- if (Config->ParseSpeed>=1.0)
- {
- Fill(Stream_Text, StreamPos_Last, "CaptionServiceContent_IsPresent", DataDetected[Pos+1]?"Yes":"No", Unlimited, true, true); //1 bit per service, starting at 1
- (*Stream_More)[Stream_Text][StreamPos_Last](Ztring().From_Local("CaptionServiceContent_IsPresent"), Info_Options)=__T("N NT");
- }
- if (ServiceDescriptors)
- {
- servicedescriptors608::iterator ServiceDescriptor=ServiceDescriptors->ServiceDescriptors608.find(cc_type);
- if (ServiceDescriptor!=ServiceDescriptors->ServiceDescriptors608.end())
- {
- if (Pos==0 && Retrieve(Stream_Text, StreamPos_Last, Text_Language).empty()) //Only CC1/CC3
- Fill(Stream_Text, StreamPos_Last, Text_Language, ServiceDescriptor->second.language, true);
- Fill(Stream_Text, StreamPos_Last, "CaptionServiceDescriptor_IsPresent", "Yes", Unlimited, true, true);
- (*Stream_More)[Stream_Text][StreamPos_Last](Ztring().From_Local("CaptionServiceDescriptor_IsPresent"), Info_Options)=__T("N NT");
- }
- else //ServiceDescriptors pointer is for the support by the transport layer of the info
- {
- Fill(Stream_Text, StreamPos_Last, "CaptionServiceDescriptor_IsPresent", "No", Unlimited, true, true);
- (*Stream_More)[Stream_Text][StreamPos_Last](Ztring().From_Local("CaptionServiceDescriptor_IsPresent"), Info_Options)=__T("N NT");
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::Streams_Finish()
-{
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Eia608::Read_Buffer_Unsynched()
-{
- for (size_t StreamPos=0; StreamPos<Streams.size(); StreamPos++)
- if (Streams[StreamPos])
- {
- for (size_t Pos_Y=0; Pos_Y<Streams[StreamPos]->CC_Displayed.size(); Pos_Y++)
- {
- for (size_t Pos_X=0; Pos_X<Streams[StreamPos]->CC_Displayed[Pos_Y].size(); Pos_X++)
- if (Streams[StreamPos])
- {
- Streams[StreamPos]->CC_Displayed[Pos_Y][Pos_X].Value=L' ';
- Streams[StreamPos]->CC_Displayed[Pos_Y][Pos_X].Attribute=0;
- if (StreamPos<2)
- {
- Streams[StreamPos]->CC_NonDisplayed[Pos_Y][Pos_X].Value=L' ';
- Streams[StreamPos]->CC_NonDisplayed[Pos_Y][Pos_X].Attribute=0;
- }
- }
- }
- Streams[StreamPos]->Synched=false;
- }
-
- XDS_Data.clear();
- XDS_Level=(size_t)-1;
-
- #if MEDIAINFO_EVENTS
- TextMode=true; DataChannelMode=true;
- HasChanged();
- TextMode=true; DataChannelMode=false;
- HasChanged();
- TextMode=false; DataChannelMode=true;
- HasChanged();
- TextMode=false; DataChannelMode=false;
- HasChanged();
- #endif //MEDIAINFO_EVENTS
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Eia608::Read_Buffer_Init()
-{
- #if MEDIAINFO_DEMUX
- if (Frame_Count_NotParsedIncluded==(int64u)-1)
- Frame_Count_NotParsedIncluded=Config->Demux_FirstFrameNumber_Get();
- if (FrameInfo.DUR==(int64u)-1 && Config->Demux_Rate_Get())
- FrameInfo.DUR=float64_int64s(((float64)1000000000)/Config->Demux_Rate_Get());
- if (FrameInfo.DTS==(int64u)-1)
- FrameInfo.DTS=Config->Demux_FirstDts_Get();
- #endif //MEDIAINFO_DEMUX
- if (FrameInfo.DUR!=(int64u)-1)
- {
- if (FrameInfo.DTS==(int64u)-1)
- FrameInfo.DTS=0;
- if (FrameInfo.PTS==(int64u)-1)
- FrameInfo.PTS=0;
- }
-
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::Read_Buffer_AfterParsing()
-{
- Frame_Count++;
- Frame_Count_InThisBlock++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- if (FrameInfo.DUR!=(int64u)-1)
- {
- FrameInfo.DTS+=FrameInfo.DUR;
- FrameInfo.PTS=FrameInfo.DTS;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::Read_Buffer_Continue()
-{
- FrameInfo.PTS=FrameInfo.DTS;
-
- if (!Status[IsAccepted])
- Accept("EIA-608");
-
- int8u cc_data_1, cc_data_2;
- Get_B1 (cc_data_1, "cc_data");
- Get_B1 (cc_data_2, "cc_data");
-
- //Removing checksume
- cc_data_1&=0x7F;
- cc_data_2&=0x7F;
-
- //Test if non-printing chars (0x10-0x1F) are repeated (CEA-608-E section D.2)
- if (cc_data_1_Old)
- {
- if (cc_data_1_Old==cc_data_1 && cc_data_2_Old==cc_data_2)
- {
- //This is duplicate
- cc_data_1_Old=0x00;
- cc_data_2_Old=0x00;
- return; //Nothing to do
- }
- else if (cc_type==0) // Field 1 only
- {
- //They should be duplicated, there is a problem
- }
- cc_data_1_Old=0x00;
- cc_data_2_Old=0x00;
- }
-
- if ((cc_data_1 && cc_data_1<0x10) || (XDS_Level!=(size_t)-1 && cc_data_1>=0x20)) //XDS
- {
- XDS(cc_data_1, cc_data_2);
- }
- else if (cc_data_1>=0x20) //Basic characters
- {
- size_t StreamPos=TextMode*2+DataChannelMode;
- if (StreamPos>=Streams.size() || Streams[StreamPos]==NULL || !Streams[StreamPos]->Synched)
- return; //Not synched
-
- Standard(cc_data_1);
- if ((cc_data_2&0x7F)>=0x20)
- Standard(cc_data_2);
- }
- else if (cc_data_1) //Special
- Special(cc_data_1, cc_data_2);
-}
-
-//***************************************************************************
-// Functions
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Eia608::XDS(int8u cc_data_1, int8u cc_data_2)
-{
- if (cc_data_1 && cc_data_1<0x10 && cc_data_1%2==0)
- {
- // Continue
- cc_data_1--;
- for (XDS_Level=0; XDS_Level<XDS_Data.size(); XDS_Level++)
- if (XDS_Data[XDS_Level].size()>=2 && XDS_Data[XDS_Level][0]==cc_data_1 && XDS_Data[XDS_Level][1]==cc_data_2)
- break;
- if (XDS_Level>=XDS_Data.size())
- XDS_Level=(size_t)-1; // There is a problem
-
- return;
- }
- else if (cc_data_1 && cc_data_1<0x0F)
- {
- // Start
- for (XDS_Level=0; XDS_Level<XDS_Data.size(); XDS_Level++)
- if (XDS_Data[XDS_Level].size()>=2 && XDS_Data[XDS_Level][0]==cc_data_1 && XDS_Data[XDS_Level][1]==cc_data_2)
- break;
- if (XDS_Level>=XDS_Data.size())
- {
- XDS_Level=XDS_Data.size();
- XDS_Data.resize(XDS_Level+1);
- }
- else
- XDS_Data[XDS_Level].clear(); // There is a problem, erasing the previous item
- }
-
- if (XDS_Level==(size_t)-1)
- return; //There is a problem
-
- XDS_Data[XDS_Level].push_back(cc_data_1);
- XDS_Data[XDS_Level].push_back(cc_data_2);
- if (cc_data_1==0x0F)
- XDS();
- if (XDS_Level!=(size_t)-1 && XDS_Data[XDS_Level].size()>=36)
- XDS_Data[XDS_Level].clear(); // Clear, this is a security
- TextMode=0; // This is CC
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::XDS()
-{
- if (XDS_Data[XDS_Level].size()<4)
- {
- XDS_Data.erase(XDS_Data.begin()+XDS_Level);
- XDS_Level=(size_t)-1;
- return; //There is a problem
- }
-
- switch (XDS_Data[XDS_Level][0])
- {
- case 0x01 : XDS_Current(); break;
- case 0x05 : XDS_Channel(); break;
- case 0x09 : XDS_PublicService(); break;
- default : ;
- }
-
- XDS_Data.erase(XDS_Data.begin()+XDS_Level);
- XDS_Level=(size_t)-1;
-
- DataDetected[5]=true; //bit 5=XDS
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::XDS_Current()
-{
- switch (XDS_Data[XDS_Level][1])
- {
- case 0x03 : XDS_Current_ProgramName(); break;
- case 0x05 : XDS_Current_ContentAdvisory(); break;
- case 0x08 : XDS_Current_CopyAndRedistributionControlPacket(); break;
- default : ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::XDS_Current_ContentAdvisory()
-{
- if (XDS_Data[XDS_Level].size()!=6)
- {
- return; //There is a problem
- }
-
- Clear(Stream_General, 0, General_LawRating);
-
- int8u a1a0=(XDS_Data[XDS_Level][2]>>3)&0x3;
- const char* ContentAdvisory=NULL;
- string ContentDescriptors;
- switch (a1a0)
- {
- case 0:
- case 2:
- switch (XDS_Data[XDS_Level][2]&0x7) //r2r1r0
- {
- case 0 : ContentAdvisory="N/A"; break;
- case 1 : ContentAdvisory="G"; break;
- case 2 : ContentAdvisory="PG"; break;
- case 3 : ContentAdvisory="PG-13"; break;
- case 4 : ContentAdvisory="R"; break;
- case 5 : ContentAdvisory="NC-17"; break;
- case 6 : ContentAdvisory="C"; break;
- default: ;
- }
- break;
- case 1:
- switch (XDS_Data[XDS_Level][3]&0x7) //g2g1g0
- {
- case 0 : ContentAdvisory="None"; break;
- case 1 : ContentAdvisory="TV-Y"; break;
- case 2 : ContentAdvisory="TV-Y7"; break;
- case 3 : ContentAdvisory="TV-G"; break;
- case 4 : ContentAdvisory="TV-PG"; break;
- case 5 : ContentAdvisory="TV-14"; break;
- case 6 : ContentAdvisory="TV-MA"; break;
- case 7 : ContentAdvisory="None"; break;
- default: ;
- }
- if (XDS_Data[XDS_Level][2]&0x20) //Suggestive dialogue
- ContentDescriptors+='D';
- if (XDS_Data[XDS_Level][3]&0x8) //Coarse language
- ContentDescriptors+='L';
- if (XDS_Data[XDS_Level][3]&0x10) //Sexual content
- ContentDescriptors+='S';
- if (XDS_Data[XDS_Level][3]&0x20) //Violence
- {
- if ((XDS_Data[XDS_Level][3]&0x7)==2) //"TV-Y7" --> Fantasy Violence
- ContentDescriptors+="FV";
- else
- ContentDescriptors+='V';
- }
- break;
- case 3:
- if (XDS_Data[XDS_Level][3]&0x8) //a3
- {
- ContentAdvisory="(Reserved)";
- }
- else
- {
- if (XDS_Data[XDS_Level][2]&0x20) //a2
- switch (XDS_Data[XDS_Level][3]&0x7) //g2g1g0
- {
- case 0 : ContentAdvisory="E"; break;
- case 1 : ContentAdvisory="G"; break;
- case 2 : ContentAdvisory="8+"; break;
- case 3 : ContentAdvisory="13+"; break;
- case 4 : ContentAdvisory="16+"; break;
- case 5 : ContentAdvisory="18+"; break;
- default: ;
- }
- else
- switch (XDS_Data[XDS_Level][3]&0x7) //g2g1g0
- {
- case 0 : ContentAdvisory="E"; break;
- case 1 : ContentAdvisory="C"; break;
- case 2 : ContentAdvisory="C8+"; break;
- case 3 : ContentAdvisory="G"; break;
- case 4 : ContentAdvisory="PG"; break;
- case 5 : ContentAdvisory="14+"; break;
- case 6 : ContentAdvisory="18+"; break;
- default: ;
- }
- }
- break;
- default: ;
- }
-
- if (ContentAdvisory)
- {
- string ContentAdvisory_String=ContentAdvisory;
- if (!ContentDescriptors.empty())
- ContentAdvisory_String+=" ("+ContentDescriptors+')';
- Fill(Stream_General, 0, General_LawRating, ContentAdvisory_String.c_str());
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::XDS_Current_ProgramName()
-{
- string ValueS;
- for (size_t Pos=2; Pos<XDS_Data[XDS_Level].size()-2; Pos++)
- ValueS.append(1, (const char)(XDS_Data[XDS_Level][Pos]));
- Ztring Value;
- Value.From_UTF8(ValueS.c_str());
- Element_Info1(__T("Program Name=")+Value);
- if (Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Value);
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::XDS_Current_CopyAndRedistributionControlPacket()
-{
- if (XDS_Data[XDS_Level].size()!=6)
- {
- return; //There is a problem
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::XDS_Channel()
-{
- switch (XDS_Data[XDS_Level][1])
- {
- case 0x01 : XDS_Channel_NetworkName(); break;
- default : ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::XDS_Channel_NetworkName()
-{
- string ValueS;
- for (size_t Pos=2; Pos<XDS_Data[XDS_Level].size()-2; Pos++)
- ValueS.append(1, (const char)(XDS_Data[XDS_Level][Pos]));
- Ztring Value;
- Value.From_UTF8(ValueS.c_str());
- Element_Info1(__T("Network Name=")+Value);
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::XDS_PublicService()
-{
- switch (XDS_Data[XDS_Level][1])
- {
- case 0x01 : XDS_PublicService_NationalWeatherService(); break;
- default : ;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::XDS_PublicService_NationalWeatherService()
-{
- if (XDS_Data[XDS_Level].size()!=20)
- {
- return; //There is a problem
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::Special(int8u cc_data_1, int8u cc_data_2)
-{
- //Data channel check
- DataChannelMode=(cc_data_1&0x08)!=0; //bit3 is the Data Channel number
-
- //Field check
- if (cc_type==(int8u)-1)
- {
- if ((cc_data_1==0x14 || cc_data_1==0x1C) && (cc_data_2&0xF0)==0x20)
- cc_type=0;
- if ((cc_data_1==0x15 || cc_data_1==0x1D) && (cc_data_2&0xF0)==0x20)
- cc_type=1;
- }
-
- cc_data_1&=0xF7;
- if (cc_data_1==0x15 && (cc_data_2&0xF0)==0x20)
- cc_data_1=0x14;
-
- if (cc_data_1>=0x10 && cc_data_1<=0x17 && cc_data_2>=0x40)
- {
- PreambleAddressCode(cc_data_1, cc_data_2);
- }
- else
- {
- switch (cc_data_1)
- {
- case 0x10 : Special_10(cc_data_2); break;
- case 0x11 : Special_11(cc_data_2); break;
- case 0x12 : Special_12(cc_data_2); break;
- case 0x13 : Special_13(cc_data_2); break;
- case 0x14 : Special_14(cc_data_2); break;
- case 0x17 : Special_17(cc_data_2); break;
- default : Illegal(cc_data_1, cc_data_2);
- }
- }
-
- //Saving data, for repetition of the code
- cc_data_1_Old=cc_data_1;
- cc_data_2_Old=cc_data_2;
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::PreambleAddressCode(int8u cc_data_1, int8u cc_data_2)
-{
- //CEA-608-E, Section F.1.1.5
-
- size_t StreamPos=TextMode*2+DataChannelMode;
- if (StreamPos>=Streams.size() || Streams[StreamPos]==NULL || !Streams[StreamPos]->Synched)
- return; //Not synched
- Streams[StreamPos]->x=0; //I am not sure of this, specifications are not precise
-
- //Horizontal position
- if (!TextMode)
- {
- Streams[StreamPos]->y=Eia608_PAC_Row[cc_data_1&0x07]+((cc_data_2&0x20)?1:0);
- if (Streams[StreamPos]->y>=Eia608_Rows)
- {
- Streams[StreamPos]->y=Eia608_Rows-1;
- }
- }
-
- //Attributes (except Underline)
- if (cc_data_2&0x10) //0x5x and 0x7x
- {
- Streams[StreamPos]->x=(((size_t)cc_data_2)&0x0E)<<1;
- Streams[StreamPos]->Attribute_Current=Attribute_Color_White;
- }
- else if ((cc_data_2&0x0E)==0x0E) //0x4E, 0x4F, 0x6E, 0x6F
- {
- Streams[StreamPos]->Attribute_Current=Attribute_Color_White|Attribute_Italic;
- }
- else //0x40-0x4D, 0x60-0x6D
- Streams[StreamPos]->Attribute_Current=(cc_data_2&0x0E)>>1;
-
- //Underline
- if (cc_data_2&0x01)
- Streams[StreamPos]->Attribute_Current|=Attribute_Underline;
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::Special_10(int8u cc_data_2)
-{
- switch (cc_data_2)
- {
- //CEA-608-E, Section 6.2
- case 0x20 : break; //Background White, Opaque
- case 0x21 : break; //Background White, Semi-transparent
- case 0x22 : break; //
- case 0x23 : break; //
- case 0x24 : break; //
- case 0x25 : break; //
- case 0x26 : break; //
- case 0x27 : break; //
- case 0x28 : break; //
- case 0x29 : break; //
- case 0x2A : break; //
- case 0x2B : break; //
- case 0x2C : break; //
- case 0x2D : break; //
- case 0x2E : break; //
- case 0x2F : break; //
- default : Illegal(0x10, cc_data_2);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::Special_11(int8u cc_data_2)
-{
- size_t StreamPos=TextMode*2+DataChannelMode;
- if (StreamPos>=Streams.size() || Streams[StreamPos]==NULL || !Streams[StreamPos]->Synched)
- return; //Not synched
-
- switch (cc_data_2)
- {
- //CEA-608-E, Section F.1.1.3
- case 0x20 : //White
- case 0x21 : //White Underline
- case 0x22 : //
- case 0x23 : //
- case 0x24 : //
- case 0x25 : //
- case 0x26 : //
- case 0x27 : //
- case 0x28 : //
- case 0x29 : //
- case 0x2A : //
- case 0x2B : //
- case 0x2C : //
- case 0x2D : //
- case 0x2E : //
- case 0x2F : //
- //Color or Italic
- if ((cc_data_2&0xFE)==0x2E) //Italic
- Streams[StreamPos]->Attribute_Current|=Attribute_Italic;
- else //Other attributes
- Streams[StreamPos]->Attribute_Current=(cc_data_2&0x0F)>>1;
-
- //Underline
- if (cc_data_2&0x01)
- Streams[StreamPos]->Attribute_Current|=Attribute_Underline;
-
- break;
- //CEA-608-E, Section F.1.1.1
- case 0x30 : Character_Fill(L'\x2122'); break; //Registered mark symbol
- case 0x31 : Character_Fill(L'\xB0' ); break; //Degree sign
- case 0x32 : Character_Fill(L'\xBD' ); break; //1/2
- case 0x33 : Character_Fill(L'\xBF' ); break; //interogation mark inverted
- case 0x34 : Character_Fill(L'\xA9' ); break; //Trademark symbol
- case 0x35 : Character_Fill(L'\xA2' ); break; //Cents sign
- case 0x36 : Character_Fill(L'\xA3' ); break; //Pounds Sterling sign
- case 0x37 : Character_Fill(L'\x266A'); break; //Music note
- case 0x38 : Character_Fill(L'\xE0' ); break; //a grave
- case 0x39 : Character_Fill(L' ' ); break; //Transparent space
- case 0x3A : Character_Fill(L'\xE8' ); break; //e grave
- case 0x3B : Character_Fill(L'\xE2' ); break; //a circumflex
- case 0x3C : Character_Fill(L'\xEA' ); break; //e circumflex
- case 0x3D : Character_Fill(L'\xEE' ); break; //i circumflex
- case 0x3E : Character_Fill(L'\xF4' ); break; //o circumflex
- case 0x3F : Character_Fill(L'\xFB' ); break; //u circumflex
- default : Illegal(0x11, cc_data_2);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::Special_12(int8u cc_data_2)
-{
- size_t StreamPos=TextMode*2+DataChannelMode;
- if (StreamPos>=Streams.size() || Streams[StreamPos]==NULL || !Streams[StreamPos]->Synched)
- return; //Not synched
-
- if (Streams[StreamPos]->x && cc_data_2>=0x20 && cc_data_2<0x40)
- Streams[StreamPos]->x--; //Erasing previous character
-
- switch (cc_data_2)
- {
- //CEA-608-E, Section 6.4.2
- case 0x20 : Character_Fill(L'A' ); break; //A with acute
- case 0x21 : Character_Fill(L'E' ); break; //E with acute
- case 0x22 : Character_Fill(L'O' ); break; //O with acute
- case 0x23 : Character_Fill(L'U' ); break; //U with acute
- case 0x24 : Character_Fill(L'U' ); break; //U withdiaeresis or umlaut
- case 0x25 : Character_Fill(L'u' ); break; //u with diaeresis or umlaut
- case 0x26 : Character_Fill(L'\'' ); break; //opening single quote
- case 0x27 : Character_Fill(L'!' ); break; //inverted exclamation mark
- case 0x28 : Character_Fill(L'*' ); break; //Asterisk
- case 0x29 : Character_Fill(L'\'' ); break; //plain single quote
- case 0x2A : Character_Fill(L'_' ); break; //em dash
- case 0x2B : Character_Fill(L'C' ); break; //Copyright
- case 0x2C : Character_Fill(L'S' ); break; //Servicemark
- case 0x2D : Character_Fill(L'x' ); break; //round bullet
- case 0x2E : Character_Fill(L'\"' ); break; //opening double quotes
- case 0x2F : Character_Fill(L'\"' ); break; //closing double quotes
- case 0x30 : Character_Fill(L'A' ); break; //A with grave accent
- case 0x31 : Character_Fill(L'A' ); break; //A with circumflex accent
- case 0x32 : Character_Fill(L'C' ); break; //C with cedilla
- case 0x33 : Character_Fill(L'E' ); break; //E with grave accent
- case 0x34 : Character_Fill(L'E' ); break; //E with circumflex accent
- case 0x35 : Character_Fill(L'E' ); break; //E with diaeresis or umlaut mark
- case 0x36 : Character_Fill(L'e' ); break; //e with diaeresis or umlaut mark
- case 0x37 : Character_Fill(L'I' ); break; //I with circumflex accent
- case 0x38 : Character_Fill(L'I' ); break; //I with diaeresis or umlaut mark
- case 0x39 : Character_Fill(L'i' ); break; //i with diaeresis or umlaut mark
- case 0x3A : Character_Fill(L'O' ); break; //O with circumflex
- case 0x3B : Character_Fill(L'U' ); break; //U with grave accent
- case 0x3C : Character_Fill(L'u' ); break; //u with grave accent
- case 0x3D : Character_Fill(L'U' ); break; //U with circumflex accent
- case 0x3E : Character_Fill(L'\"' ); break; //opening guillemets
- case 0x3F : Character_Fill(L'\"' ); break; //closing guillemets
- default : Illegal(0x12, cc_data_2);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::Special_13(int8u cc_data_2)
-{
- size_t StreamPos=TextMode*2+DataChannelMode;
- if (StreamPos>=Streams.size() || Streams[StreamPos]==NULL || !Streams[StreamPos]->Synched)
- return; //Not synched
-
- if (Streams[StreamPos]->x && cc_data_2>=0x20 && cc_data_2<0x40)
- Streams[StreamPos]->x--; //Erasing previous character
-
- switch (cc_data_2)
- {
- //CEA-608-E, Section 6.4.2
- case 0x20 : Character_Fill(L'A' ); break; //A with tilde
- case 0x21 : Character_Fill(L'a' ); break; //a with tilde
- case 0x22 : Character_Fill(L'I' ); break; //I with acute accent
- case 0x23 : Character_Fill(L'I' ); break; //I with grave accent
- case 0x24 : Character_Fill(L'i' ); break; //i with grave accent
- case 0x25 : Character_Fill(L'O' ); break; //O with grave accent
- case 0x26 : Character_Fill(L'o' ); break; //o with grave accent
- case 0x27 : Character_Fill(L'O' ); break; //O with tilde
- case 0x28 : Character_Fill(L'o' ); break; //o with tilde
- case 0x29 : Character_Fill(L'{' ); break; //opening brace
- case 0x2A : Character_Fill(L'}' ); break; //closing brace
- case 0x2B : Character_Fill(L'\\' ); break; //backslash
- case 0x2C : Character_Fill(L'^' ); break; //caret
- case 0x2D : Character_Fill(L'_' ); break; //Underbar
- case 0x2E : Character_Fill(L'|' ); break; //pipe
- case 0x2F : Character_Fill(L'~' ); break; //tilde
- case 0x30 : Character_Fill(L'A' ); break; //A with diaeresis or umlaut mark
- case 0x31 : Character_Fill(L'a' ); break; //a with diaeresis or umlaut mark
- case 0x32 : Character_Fill(L'O' ); break; //o with diaeresis or umlaut mark
- case 0x33 : Character_Fill(L'o' ); break; //o with diaeresis or umlaut mark
- case 0x34 : Character_Fill(L's' ); break; //eszett (mall sharp s)
- case 0x35 : Character_Fill(L'Y' ); break; //yen
- case 0x36 : Character_Fill(L' ' ); break; //non-specific currency sign
- case 0x37 : Character_Fill(L'|' ); break; //Vertical bar
- case 0x38 : Character_Fill(L'A' ); break; //I with diaeresis or umlaut mark
- case 0x39 : Character_Fill(L'a' ); break; //i with diaeresis or umlaut mark
- case 0x3A : Character_Fill(L'O' ); break; //O with ring
- case 0x3B : Character_Fill(L'o' ); break; //a with ring
- case 0x3C : Character_Fill(L' ' ); break; //upper left corner
- case 0x3D : Character_Fill(L' ' ); break; //upper right corner
- case 0x3E : Character_Fill(L' ' ); break; //lower left corner
- case 0x3F : Character_Fill(L' ' ); break; //lower right corner
- default : Illegal(0x13, cc_data_2);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::Special_14(int8u cc_data_2)
-{
- size_t StreamPos=TextMode*2+DataChannelMode;
-
- switch (cc_data_2)
- {
- case 0x20 : //RCL - Resume Caption Loading
- case 0x25 : //RU2 - Roll-Up Captions–2 Rows
- case 0x26 : //RU3 - Roll-Up Captions–3 Rows
- case 0x27 : //RU4 - Roll-Up Captions–4 Rows
- case 0x29 : //RDC - Resume Direct Captioning
- case 0x2A : //TR - Text Restart
- case 0x2B : //RTD - Resume Text Display
- case 0x2C : //EDM - Erase Displayed Memory
- TextMode=(cc_data_2&0xFE)==0x2A;
- XDS_Level=(size_t)-1; // No more XDS
- StreamPos=TextMode*2+DataChannelMode;
-
- //Alloc
- if (StreamPos>=Streams.size())
- Streams.resize(StreamPos+1);
- if (Streams[StreamPos]==NULL)
- {
- Streams[StreamPos]=new stream();
- Streams[StreamPos]->CC_Displayed.resize(Eia608_Rows);
- for (size_t Pos=0; Pos<Streams[StreamPos]->CC_Displayed.size(); Pos++)
- Streams[StreamPos]->CC_Displayed[Pos].resize(Eia608_Columns);
- if (StreamPos<2) //CC only, not in Text
- {
- Streams[StreamPos]->CC_NonDisplayed.resize(Eia608_Rows);
- for (size_t Pos=0; Pos<Streams[StreamPos]->CC_NonDisplayed.size(); Pos++)
- Streams[StreamPos]->CC_NonDisplayed[Pos].resize(Eia608_Columns);
- }
- }
- Streams[StreamPos]->Synched=true;
-
- break;
- case 0x2F : //EOC - end of Caption
- TextMode=false;
- StreamPos=TextMode*2+DataChannelMode;
- default: ;
- }
-
- if (StreamPos>=Streams.size() || Streams[StreamPos]==NULL || !Streams[StreamPos]->Synched)
- return; //Not synched
-
- switch (cc_data_2)
- {
- case 0x20 : TextMode=false;
- Streams[StreamPos]->InBack=true;
- break; //RCL - Resume Caption Loading (Select pop-on style)
- case 0x21 : if (Streams[StreamPos]->x)
- Streams[StreamPos]->x--;
- (Streams[StreamPos]->InBack?Streams[StreamPos]->CC_NonDisplayed:Streams[StreamPos]->CC_Displayed)[Streams[StreamPos]->y][Streams[StreamPos]->x].Value=L' '; //Clear the character
- if (!Streams[StreamPos]->InBack)
- HasChanged();
- break; //BS - Backspace
- case 0x22 : Special_14(0x2D); //Found 1 file with AOF and non CR
- break; //AOF - Alarm Off
- case 0x23 : break; //AON - Alarm On
- case 0x24 : for (size_t Pos=Streams[StreamPos]->x; Pos<Eia608_Columns; Pos++)
- (Streams[StreamPos]->InBack?Streams[StreamPos]->CC_NonDisplayed:Streams[StreamPos]->CC_Displayed)[Streams[StreamPos]->y][Pos].Value=L' '; //Clear up to the end of line
- if (!Streams[StreamPos]->InBack)
- HasChanged();
- break; //DER - Delete to End of Row
- case 0x25 : //RU2 - Roll-Up Captions–2 Rows
- case 0x26 : //RU3 - Roll-Up Captions–3 Rows
- case 0x27 : //RU4 - Roll-Up Captions–4 Rows
- Streams[StreamPos]->RollUpLines=cc_data_2-0x25+2;
- Streams[StreamPos]->InBack=false;
- break; //RUx - Roll-Up Captions–x Rows
- case 0x28 : break; //FON - Flash On
- case 0x29 : Streams[StreamPos]->InBack=false;
- break; //RDC - Resume Direct Captioning (paint-on style)
- case 0x2A : TextMode=true;
- Streams[StreamPos]->RollUpLines=Eia608_Rows; //Roll up all the lines
- Streams[StreamPos]->y=Eia608_Rows-1; //Base is the bottom line
- Streams[StreamPos]->Attribute_Current=0; //Reset all attributes
- Special_14(0x2D); //Next line
- break; //TR - Text Restart (clear Text, but not boxes)
- case 0x2B : TextMode=true;
- break; //RTD - Resume Text Display
- case 0x2C :
- if (StreamPos<Streams.size() && Streams[StreamPos])
- {
- bool HasChanged_=false;
- for (size_t Pos_Y=0; Pos_Y<Eia608_Rows; Pos_Y++)
- for (size_t Pos_X=0; Pos_X<Eia608_Columns; Pos_X++)
- if (Streams[StreamPos]->CC_Displayed[Pos_Y][Pos_X].Value!=L' ')
- {
- Streams[StreamPos]->CC_Displayed[Pos_Y][Pos_X].Value=L' ';
- Streams[StreamPos]->CC_Displayed[Pos_Y][Pos_X].Attribute=0;
- HasChanged_=true;
- }
- if (HasChanged_)
- HasChanged();
- }
- break; //EDM - Erase Displayed Memory
- case 0x2D : for (size_t Pos=1; Pos<Streams[StreamPos]->RollUpLines; Pos++)
- {
- if (Streams[StreamPos]->y>=Streams[StreamPos]->RollUpLines-Pos && Streams[StreamPos]->y-Streams[StreamPos]->RollUpLines+Pos+1<Eia608_Rows)
- Streams[StreamPos]->CC_Displayed[Streams[StreamPos]->y-Streams[StreamPos]->RollUpLines+Pos]=Streams[StreamPos]->CC_Displayed[Streams[StreamPos]->y-Streams[StreamPos]->RollUpLines+Pos+1];
- }
- for (size_t Pos_X=0; Pos_X<Eia608_Columns; Pos_X++)
- {
- Streams[StreamPos]->CC_Displayed[Streams[StreamPos]->y][Pos_X].Value=L' ';
- Streams[StreamPos]->CC_Displayed[Streams[StreamPos]->y][Pos_X].Attribute=0;
- }
- if (!Streams[StreamPos]->InBack)
- HasChanged();
- Streams[StreamPos]->x=0;
- break; //CR - Carriage Return
- case 0x2E : for (size_t Pos_Y=0; Pos_Y<Streams[StreamPos]->CC_NonDisplayed.size(); Pos_Y++)
- for (size_t Pos_X=0; Pos_X<Streams[StreamPos]->CC_NonDisplayed[Pos_Y].size(); Pos_X++)
- {
- Streams[StreamPos]->CC_NonDisplayed[Pos_Y][Pos_X].Value=L' ';
- Streams[StreamPos]->CC_NonDisplayed[Pos_Y][Pos_X].Attribute=0;
- }
- break; //ENM - Erase Non-Displayed Memory
- case 0x2F : Streams[StreamPos]->CC_Displayed.swap(Streams[StreamPos]->CC_NonDisplayed);
- HasChanged();
- Streams[StreamPos]->Synched=false;
- break; //EOC - End of Caption
- default : Illegal(0x14, cc_data_2);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::Special_17(int8u cc_data_2)
-{
- size_t StreamPos=TextMode*2+DataChannelMode;
- if (StreamPos>=Streams.size() || Streams[StreamPos]==NULL || !Streams[StreamPos]->Synched)
- return; //Not synched
-
- switch (cc_data_2)
- {
- //CEA-608-E, section B.4
- case 0x21 : //TO1 - Tab Offset 1 Column
- case 0x22 : //TO2 - Tab Offset 2 Columns
- case 0x23 : //TO3 - Tab Offset 3 Columns
- Streams[StreamPos]->x+=cc_data_2&0x03;
- if (Streams[StreamPos]->x>=Eia608_Columns)
- Streams[StreamPos]->x=Eia608_Columns-1;
- break;
- //CEA-608-E, section 6.3
- case 0x24 : break; //Select the standard line 21 character set in normal size
- case 0x25 : break; //Select the standard line 21 character set in double size
- case 0x26 : break; //Select the first private character set
- case 0x27 : break; //Select the second private character set
- case 0x28 : break; //Select the People's Republic of China character set: GB 2312-80
- case 0x29 : break; //Select the Korean Standard character set: KSC 5601-1987
- case 0x2A : break; //Select the first registered character set
- //CEA-608-E, section 6.2
- case 0x2D : break; //Background Transparent
- case 0x2E : break; //Foreground Black
- case 0x2F : break; //Foreground Black Underline
- default : Illegal(0x17, cc_data_2);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::Standard(int8u Character)
-{
- switch (Character)
- {
- //CEA-608-E, Section F.1.1.2
- case 0x20 : Character_Fill(L' ' ); break;
- case 0x21 : Character_Fill(L'!' ); break;
- case 0x22 : Character_Fill(L'"' ); break;
- case 0x23 : Character_Fill(L'#' ); break;
- case 0x24 : Character_Fill(L'$' ); break;
- case 0x25 : Character_Fill(L'%' ); break;
- case 0x26 : Character_Fill(L'&' ); break;
- case 0x27 : Character_Fill(L'\'' ); break;
- case 0x28 : Character_Fill(L'(' ); break;
- case 0x29 : Character_Fill(L')' ); break;
- case 0x2A : Character_Fill(L'\xE1' ); break; //a acute
- case 0x2B : Character_Fill(L'+' ); break;
- case 0x2C : Character_Fill(L',' ); break;
- case 0x2D : Character_Fill(L'-' ); break;
- case 0x2E : Character_Fill(L'.' ); break;
- case 0x2F : Character_Fill(L'/' ); break;
- case 0x30 : Character_Fill(L'0' ); break;
- case 0x31 : Character_Fill(L'1' ); break;
- case 0x32 : Character_Fill(L'2' ); break;
- case 0x33 : Character_Fill(L'3' ); break;
- case 0x34 : Character_Fill(L'4' ); break;
- case 0x35 : Character_Fill(L'5' ); break;
- case 0x36 : Character_Fill(L'6' ); break;
- case 0x37 : Character_Fill(L'7' ); break;
- case 0x38 : Character_Fill(L'8' ); break;
- case 0x39 : Character_Fill(L'9' ); break;
- case 0x3A : Character_Fill(L':' ); break;
- case 0x3B : Character_Fill(L';' ); break;
- case 0x3C : Character_Fill(L'<' ); break;
- case 0x3E : Character_Fill(L'>' ); break;
- case 0x3F : Character_Fill(L'?' ); break;
- case 0x40 : Character_Fill(L'@' ); break;
- case 0x41 : Character_Fill(L'A' ); break;
- case 0x42 : Character_Fill(L'B' ); break;
- case 0x43 : Character_Fill(L'C' ); break;
- case 0x44 : Character_Fill(L'D' ); break;
- case 0x45 : Character_Fill(L'E' ); break;
- case 0x46 : Character_Fill(L'F' ); break;
- case 0x47 : Character_Fill(L'G' ); break;
- case 0x48 : Character_Fill(L'H' ); break;
- case 0x49 : Character_Fill(L'I' ); break;
- case 0x4A : Character_Fill(L'J' ); break;
- case 0x4B : Character_Fill(L'K' ); break;
- case 0x4C : Character_Fill(L'L' ); break;
- case 0x4D : Character_Fill(L'M' ); break;
- case 0x4E : Character_Fill(L'N' ); break;
- case 0x4F : Character_Fill(L'O' ); break;
- case 0x50 : Character_Fill(L'P' ); break;
- case 0x51 : Character_Fill(L'Q' ); break;
- case 0x52 : Character_Fill(L'R' ); break;
- case 0x53 : Character_Fill(L'S' ); break;
- case 0x54 : Character_Fill(L'T' ); break;
- case 0x55 : Character_Fill(L'U' ); break;
- case 0x56 : Character_Fill(L'V' ); break;
- case 0x57 : Character_Fill(L'W' ); break;
- case 0x58 : Character_Fill(L'X' ); break;
- case 0x59 : Character_Fill(L'Y' ); break;
- case 0x5A : Character_Fill(L'Z' ); break;
- case 0x5B : Character_Fill(L'[' ); break;
- case 0x5C : Character_Fill(L'\xE9' ); break; //e acute
- case 0x5D : Character_Fill(L']' ); break;
- case 0x5E : Character_Fill(L'\xED' ); break; //i acute
- case 0x5F : Character_Fill(L'\xF3' ); break; //o acute
- case 0x60 : Character_Fill(L'\xFA' ); break; //u acute
- case 0x61 : Character_Fill(L'a' ); break;
- case 0x62 : Character_Fill(L'b' ); break;
- case 0x63 : Character_Fill(L'c' ); break;
- case 0x64 : Character_Fill(L'd' ); break;
- case 0x65 : Character_Fill(L'e' ); break;
- case 0x66 : Character_Fill(L'f' ); break;
- case 0x67 : Character_Fill(L'g' ); break;
- case 0x68 : Character_Fill(L'h' ); break;
- case 0x69 : Character_Fill(L'i' ); break;
- case 0x6A : Character_Fill(L'j' ); break;
- case 0x6B : Character_Fill(L'k' ); break;
- case 0x6C : Character_Fill(L'l' ); break;
- case 0x6D : Character_Fill(L'm' ); break;
- case 0x6E : Character_Fill(L'n' ); break;
- case 0x6F : Character_Fill(L'o' ); break;
- case 0x70 : Character_Fill(L'p' ); break;
- case 0x71 : Character_Fill(L'q' ); break;
- case 0x72 : Character_Fill(L'r' ); break;
- case 0x73 : Character_Fill(L's' ); break;
- case 0x74 : Character_Fill(L't' ); break;
- case 0x75 : Character_Fill(L'u' ); break;
- case 0x76 : Character_Fill(L'v' ); break;
- case 0x77 : Character_Fill(L'w' ); break;
- case 0x78 : Character_Fill(L'x' ); break;
- case 0x79 : Character_Fill(L'y' ); break;
- case 0x7A : Character_Fill(L'z' ); break;
- case 0x7B : Character_Fill(L'\xE7' ); break; //c with cedilla
- case 0x7C : Character_Fill(L'\xF7' ); break; //division symbol
- case 0x7D : Character_Fill(L'\xD1' ); break; //N tilde
- case 0x7E : Character_Fill(L'\xF1' ); break; //n tilde
- case 0x7F : Character_Fill(L'\x25A0'); break; //Solid block
- default : Illegal(0x00, Character);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::Character_Fill(wchar_t Character)
-{
- size_t StreamPos=TextMode*2+DataChannelMode;
- if (StreamPos>=Streams.size() || Streams[StreamPos]==NULL || !Streams[StreamPos]->Synched)
- return; //Not synched
-
- if (Streams[StreamPos]->x==Eia608_Columns)
- {
- Streams[StreamPos]->x--; //There is a problem
-
- //TODO: Put it at the end, for the conversion
- //TODO: Handle special chars
- }
-
- if (Streams[StreamPos]->InBack)
- Streams[StreamPos]->CC_NonDisplayed[Streams[StreamPos]->y][Streams[StreamPos]->x].Value=Character;
- else
- Streams[StreamPos]->CC_Displayed[Streams[StreamPos]->y][Streams[StreamPos]->x].Value=Character;
-
- Streams[StreamPos]->x++;
-
- if (TextMode || !Streams[StreamPos]->InBack)
- HasChanged();
-
- if (!HasContent)
- HasContent=true;
- DataDetected[1+StreamPos]=true;
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::HasChanged()
-{
-}
-
-//---------------------------------------------------------------------------
-void File_Eia608::Illegal(int8u cc_data_1, int8u cc_data_2)
-{
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_EIA608_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia608.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia608.h
deleted file mode 100644
index f4a270da7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia608.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PGS files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Eia608H
-#define MediaInfo_File_Eia608H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-#include <bitset>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Eia608
-//***************************************************************************
-
-static const int8u Eia608_Rows=15; //Screen size, specified by the standard
-static const int8u Eia608_Columns=32; //Screen size, specified by the standard
-class File_Eia608 : public File__Analyze
-{
-public :
- //In
- int8u cc_type;
-
- //Constructor/Destructor
- File_Eia608();
- ~File_Eia608();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Synchro
- void Read_Buffer_Unsynched();
-
- //Buffer - Global
- void Read_Buffer_Init();
- void Read_Buffer_Continue();
- void Read_Buffer_AfterParsing();
-
- //Function
- void Standard (int8u Character);
-
- std::vector<std::vector<int8u> > XDS_Data;
- size_t XDS_Level;
- bool TextMode; //CC or T
- bool DataChannelMode; //if true, CC2/CC4/T2/T4
-
- void XDS(int8u cc_data_1, int8u cc_data_2);
- void XDS();
- void XDS_Current();
- void XDS_Current_ProgramName();
- void XDS_Current_ContentAdvisory();
- void XDS_Current_CopyAndRedistributionControlPacket();
- void XDS_PublicService();
- void XDS_PublicService_NationalWeatherService();
- void XDS_Channel();
- void XDS_Channel_NetworkName();
- void Special(int8u cc_data_1, int8u cc_data_2);
- void Special_10(int8u cc_data_2);
- void Special_11(int8u cc_data_2);
- void Special_12(int8u cc_data_2);
- void Special_13(int8u cc_data_2);
- void Special_14(int8u cc_data_2);
- void Special_17(int8u cc_data_2);
- void PreambleAddressCode(int8u cc_data_1, int8u cc_data_2);
-
- //An attribute consists of Attribute_Color_*, optionally OR'd with Attribute_Underline and/or Attribute_Italic
- enum attributes
- {
- Attribute_Color_White =0x00,
- Attribute_Color_Green =0x01,
- Attribute_Color_Blue =0x02,
- Attribute_Color_Cyan =0x03,
- Attribute_Color_Red =0x04,
- Attribute_Color_Yellow =0x05,
- Attribute_Color_Magenta =0x06,
- Attribute_Underline =0x10,
- Attribute_Italic =0x20,
- };
-
- struct character
- {
- wchar_t Value;
- int8u Attribute;
-
- character()
- :
- Value(L' '),
- Attribute(0x00)
- {
- }
- };
- void Character_Fill(wchar_t Character);
- void HasChanged();
- void Illegal(int8u cc_data_1, int8u cc_data_2);
- struct stream
- {
- vector<vector<character> > CC_Displayed;
- vector<vector<character> > CC_NonDisplayed;
- bool InBack; //The back buffer is written
- size_t x;
- size_t y;
- int8u Attribute_Current;
- size_t RollUpLines;
- bool Synched;
-
- stream()
- {
- InBack=false;
- x=0;
- y=Eia608_Rows-1;
- Attribute_Current=0;
- RollUpLines=0;
- Synched=false;
- }
- };
- std::vector<stream*> Streams;
-
- int8u cc_data_1_Old;
- int8u cc_data_2_Old;
- bool HasContent;
- std::bitset<8> DataDetected; //1=CC1, 2=CC2, 3=T1, 4=T2, 5=XDS
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia708.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia708.cpp
deleted file mode 100644
index 81b229415..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia708.cpp
+++ /dev/null
@@ -1,1418 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_EIA708_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_Eia708.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Eia708::File_Eia708()
-:File__Analyze()
-{
- //Config
- PTS_DTS_Needed=true;
- MustSynchronize=true;
-
- //In
- cc_type=(int8u)-1;
- AspectRatio=((float32)4)/3; //Default to 4:3
- ParserName=__T("EIA-708");
-
- //Stream
- service_number=(int8u)-1;
-
- //Temp
- StandAloneCommand=false;
- HasContent=false;
- DataDetected=0x0000000000000000LL;
-}
-
-//---------------------------------------------------------------------------
-File_Eia708::~File_Eia708()
-{
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- delete Streams[Pos]; //Streams[Pos]=NULL
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Eia708::Streams_Fill()
-{
- if (Config->File_Eia708_DisplayEmptyStream_Get() && Streams.size()<2)
- Streams.resize(2);
-
- if (ServiceDescriptors)
- {
- for (servicedescriptors708::iterator ServiceDescriptor=ServiceDescriptors->ServiceDescriptors708.begin(); ServiceDescriptor!=ServiceDescriptors->ServiceDescriptors708.end(); ++ServiceDescriptor)
- {
- service_number=ServiceDescriptor->first;
- block_size=0;
- Service();
- }
- }
-
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- if (Streams[Pos] || (Pos && Pos<2 && Config->File_Eia708_DisplayEmptyStream_Get()))
- {
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, StreamPos_Last, Text_ID, Pos);
- Fill(Stream_Text, StreamPos_Last, "CaptionServiceName", Pos);
- (*Stream_More)[StreamKind_Last][StreamPos_Last](Ztring().From_Local("CaptionServiceName"), Info_Options)=__T("N NT");
- Fill(Stream_Text, StreamPos_Last, Text_Format, "EIA-708");
- Fill(Stream_Text, StreamPos_Last, Text_StreamSize, 0);
- Fill(Stream_Text, StreamPos_Last, Text_BitRate_Mode, "CBR");
- if (Config->ParseSpeed>=1.0)
- {
- Fill(Stream_Text, StreamPos_Last, "CaptionServiceContent_IsPresent", (DataDetected&((int64u)1)<<Pos)?"Yes":"No", Unlimited, true, true); //1 bit per service
- (*Stream_More)[Stream_Text][StreamPos_Last](Ztring().From_Local("CaptionServiceContent_IsPresent"), Info_Options)=__T("N NT");
- }
- if (ServiceDescriptors)
- {
- servicedescriptors708::iterator ServiceDescriptor=ServiceDescriptors->ServiceDescriptors708.find((int8u)Pos);
- if (ServiceDescriptor!=ServiceDescriptors->ServiceDescriptors708.end())
- {
- Fill(Stream_Text, StreamPos_Last, Text_Language, ServiceDescriptor->second.language, true);
- Fill(Stream_Text, StreamPos_Last, "CaptionServiceDescriptor_IsPresent", "Yes", Unlimited, true, true);
- (*Stream_More)[Stream_Text][StreamPos_Last](Ztring().From_Local("CaptionServiceDescriptor_IsPresent"), Info_Options)=__T("N NT");
- }
- else //ServiceDescriptors pointer is for the support by the transport layer of the info
- {
- Fill(Stream_Text, StreamPos_Last, "CaptionServiceDescriptor_IsPresent", "No", Unlimited, true, true);
- (*Stream_More)[Stream_Text][StreamPos_Last](Ztring().From_Local("CaptionServiceDescriptor_IsPresent"), Info_Options)=__T("N NT");
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia708::Streams_Finish()
-{
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Eia708::Synchronize()
-{
- if (cc_type!=3)
- return false; //Waiting for sync from underlying layer
-
- if (!Status[IsAccepted])
- Accept("EIA-708");
-
- //Synched is OK
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Eia708::Synched_Test()
-{
- if (cc_type==4) //Magic value saying that the buffer must be kept (this is only a point of synchro from the undelying layer)
- Buffer_Offset=Buffer_Size; //Sync point
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Eia708::Read_Buffer_Init()
-{
-}
-
-//---------------------------------------------------------------------------
-void File_Eia708::Read_Buffer_Continue()
-{
- FrameInfo.PTS=FrameInfo.DTS;
-}
-
-//---------------------------------------------------------------------------
-void File_Eia708::Read_Buffer_Unsynched()
-{
- for (service_number=1; service_number<Streams.size(); service_number++)
- if (Streams[service_number])
- {
- //Per window
- for (size_t WindowID=0; WindowID<Streams[service_number]->Windows.size(); WindowID++)
- {
- window* Window=Streams[service_number]->Windows[WindowID];
- if (Window)
- for (size_t Pos_Y=0; Pos_Y<Window->Minimal.CC.size(); Pos_Y++)
- {
- for (size_t Pos_X=0; Pos_X<Window->Minimal.CC[Pos_Y].size(); Pos_X++)
- {
- Window->Minimal.CC[Pos_Y][Pos_X].Value=L' ';
- Window->Minimal.CC[Pos_Y][Pos_X].Attribute=0;
- }
- }
- }
-
- //Global display
- for (size_t Pos_Y=0; Pos_Y<Streams[service_number]->Minimal.CC.size(); Pos_Y++)
- {
- for (size_t Pos_X=0; Pos_X<Streams[service_number]->Minimal.CC[Pos_Y].size(); Pos_X++)
- {
- Streams[service_number]->Minimal.CC[Pos_Y][Pos_X].Value=L' ';
- Streams[service_number]->Minimal.CC[Pos_Y][Pos_X].Attribute=0;
- }
- }
- }
-
- #if MEDIAINFO_EVENTS
- for (service_number=1; service_number<Streams.size(); service_number++)
- if (Streams[service_number])
- HasChanged();
- #endif //MEDIAINFO_EVENTS
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Eia708::Header_Parse()
-{
- //Parsing
- int8u packet_size, sequence_number;
- BS_Begin();
- Get_S1(2, sequence_number, "sequence_number");
- Get_S1(6, packet_size, "packet_size_code");
- BS_End();
-
- Header_Fill_Code(0, __T("DTVCC packet"));
- Header_Fill_Size(packet_size==0?128:(packet_size*2));
-}
-
-//---------------------------------------------------------------------------
-void File_Eia708::Data_Parse()
-{
- //Parsing
- while (Element_Offset<Element_Size)
- {
- BS_Begin();
- Get_S1(3, service_number, "service_number");
- Get_S1(5, block_size, "block_size");
- if (service_number==7)
- {
- Mark_0();
- Mark_0();
- Get_S1(6, service_number, "extended_service_number");
- }
- BS_End();
-
- if (service_number)
- {
- Element_Begin1("Service Block Packet");
- Service();
- Element_End0();
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Eia708::Service()
-{
- if (service_number>=Streams.size())
- Streams.resize(service_number+1);
- if (Streams[service_number]==NULL)
- {
- Streams[service_number]=new stream;
- Streams[service_number]->Minimal.CC.resize(15);
- for (int8u Pos_Y=0; Pos_Y<15; Pos_Y++)
- Streams[service_number]->Minimal.CC[Pos_Y].resize((size_t)(24*AspectRatio));
- Streams[service_number]->Windows.resize(8);
- }
-
- for (int8u Pos=0; Pos<block_size; Pos++)
- {
- int8u cc_data_1;
- Get_B1(cc_data_1, "cc_data");
- switch (cc_data_1)
- {
- //CEA-708-D, Section 7.1.4 (C0)
- case 0x00 : NUL(); break; //NUL
- case 0x03 : ETX(); break; //End Of Text
- case 0x08 : BS(); break; //BackSpace
- case 0x0C : FF(); break; //Form Feed
- case 0x0D : CR(); break; //Carriage Return
- case 0x0E : HCR(); break; //Horizontal Carriage Return
- case 0x01 :
- case 0x02 :
- case 0x04 :
- case 0x05 :
- case 0x06 :
- case 0x07 :
- case 0x09 :
- case 0x0A :
- case 0x0B :
- case 0x0F : break; //1-byte long undefined code
- case 0x10 : //EXT1
- {
- int8u cc_data_2;
- Get_B1(cc_data_2, "cc_data");
- Pos++;
- switch (cc_data_2)
- {
- //CEA-708-D, Section 7.1.8 (G2)
- case 0x20 : Character_Fill(L' ' ); break;
- case 0x21 : Character_Fill(L' ' ); break;
- case 0x25 : Character_Fill(L'.' ); Character_Fill(L'.'); Character_Fill(L'.'); break;
- case 0x2A : Character_Fill(L'S' ); break;
- case 0x2C : Character_Fill(L'O' ); Character_Fill(L'E'); break;
- case 0x30 : Character_Fill(L' ' ); break; //(Solid Block)
- case 0x31 : Character_Fill(L'\'' ); break;
- case 0x32 : Character_Fill(L'\'' ); break;
- case 0x33 : Character_Fill(L'\'' ); break;
- case 0x34 : Character_Fill(L'\'' ); break;
- case 0x35 : Character_Fill(L'.' ); break;
- case 0x39 : Character_Fill(L'_' ); break; //TM
- case 0x3A : Character_Fill(L's' ); break;
- case 0x3C : Character_Fill(L'_' ); break; //oe
- case 0x3D : Character_Fill(L'_' ); break; //SM
- case 0x3F : Character_Fill(L'Y' ); break;
- case 0x76 : Character_Fill(L'_' ); break; //1/8
- case 0x77 : Character_Fill(L'_' ); break; //3/8
- case 0x78 : Character_Fill(L'_' ); break; //5/8
- case 0x79 : Character_Fill(L'_' ); break; //7/8
- case 0x7A : Character_Fill(L'+' ); break;
- case 0x7B : Character_Fill(L'+' ); break;
- case 0x7C : Character_Fill(L'+' ); break;
- case 0x7D : Character_Fill(L'+' ); break;
- case 0x7E : Character_Fill(L'+' ); break;
- case 0x7F : Character_Fill(L'+' ); break;
- //CEA-708-D, Section 7.1.9 (G3)
- case 0x80 : Character_Fill(L'_' ); break; //(CC)
- default :
- //CEA-708-D, Section 7.1.10 (C2)
- if (cc_data_2>=0x08 && cc_data_2<0x10)
- {
- Skip_B1( "EXT1 1 byte");
- Pos++;
- }
- else if (cc_data_2>=0x10 && cc_data_2<0x18)
- {
- Skip_B2( "EXT1 2 byte");
- Pos+=2;
- }
- else if (cc_data_2>=0x18 && cc_data_2<0x20)
- {
- Skip_B3( "EXT1 3 byte");
- Pos+=3;
- }
- //CEA-708-D, Section 7.1.11 (C3)
- else if (cc_data_2>=0x80 && cc_data_2<0x88)
- {
- Skip_B4( "EXT1 4 byte");
- Pos+=4;
- }
- else if (cc_data_2>=0x88 && cc_data_2<0x90)
- {
- Skip_B5( "EXT1 5 byte");
- Pos+=5;
- }
- else if (cc_data_2>=0x90 && cc_data_2<0xA0)
- {
- //CEA-708-D, Section 7.1.11.2 (Variable Length Codes)
- int8u Length;
- BS_Begin();
- Skip_S1(2, "Type");
- Mark_0();
- Get_S1 (5, Length, "Length");
- Skip_XX(Length, "Data");
- Pos+=1+Length;
- }
- //CEA-708-D, Section 7.1.9 (G3)
- else
- Character_Fill(L'_' );
- }
- }
- break;
- case 0x11 :
- case 0x12 :
- case 0x13 :
- case 0x14 :
- case 0x15 :
- case 0x16 :
- case 0x17 : //2-byte long undefined
- {
- Skip_B1( "Undefined");
- Pos++;
- }
- break;
- case 0x18 : //P16
- {
- Skip_B2( "P16");
- Pos+=2;
- }
- break;
- case 0x19 :
- case 0x1A :
- case 0x1B :
- case 0x1C :
- case 0x1D :
- case 0x1E :
- case 0x1F : //3-byte long undefined
- {
- Skip_B2( "Undefined");
- Pos+=2;
- }
- break;
- //CEA-708-D, Section 7.1.6 (G0)
- case 0x20 : Character_Fill(L' ' ); break;
- case 0x21 : Character_Fill(L'!' ); break;
- case 0x22 : Character_Fill(L'"' ); break;
- case 0x23 : Character_Fill(L'#' ); break;
- case 0x24 : Character_Fill(L'$' ); break;
- case 0x25 : Character_Fill(L'%' ); break;
- case 0x26 : Character_Fill(L'&' ); break;
- case 0x27 : Character_Fill(L'\'' ); break;
- case 0x28 : Character_Fill(L'(' ); break;
- case 0x29 : Character_Fill(L')' ); break;
- case 0x2A : Character_Fill(L'*' ); break;
- case 0x2B : Character_Fill(L'+' ); break;
- case 0x2C : Character_Fill(L',' ); break;
- case 0x2D : Character_Fill(L'-' ); break;
- case 0x2E : Character_Fill(L'.' ); break;
- case 0x2F : Character_Fill(L'/' ); break;
- case 0x30 : Character_Fill(L'0' ); break;
- case 0x31 : Character_Fill(L'1' ); break;
- case 0x32 : Character_Fill(L'2' ); break;
- case 0x33 : Character_Fill(L'3' ); break;
- case 0x34 : Character_Fill(L'4' ); break;
- case 0x35 : Character_Fill(L'5' ); break;
- case 0x36 : Character_Fill(L'6' ); break;
- case 0x37 : Character_Fill(L'7' ); break;
- case 0x38 : Character_Fill(L'8' ); break;
- case 0x39 : Character_Fill(L'9' ); break;
- case 0x3A : Character_Fill(L':' ); break;
- case 0x3B : Character_Fill(L';' ); break;
- case 0x3C : Character_Fill(L'<' ); break;
- case 0x3E : Character_Fill(L'>' ); break;
- case 0x3F : Character_Fill(L'?' ); break;
- case 0x40 : Character_Fill(L'@' ); break;
- case 0x41 : Character_Fill(L'A' ); break;
- case 0x42 : Character_Fill(L'B' ); break;
- case 0x43 : Character_Fill(L'C' ); break;
- case 0x44 : Character_Fill(L'D' ); break;
- case 0x45 : Character_Fill(L'E' ); break;
- case 0x46 : Character_Fill(L'F' ); break;
- case 0x47 : Character_Fill(L'G' ); break;
- case 0x48 : Character_Fill(L'H' ); break;
- case 0x49 : Character_Fill(L'I' ); break;
- case 0x4A : Character_Fill(L'J' ); break;
- case 0x4B : Character_Fill(L'K' ); break;
- case 0x4C : Character_Fill(L'L' ); break;
- case 0x4D : Character_Fill(L'M' ); break;
- case 0x4E : Character_Fill(L'N' ); break;
- case 0x4F : Character_Fill(L'O' ); break;
- case 0x50 : Character_Fill(L'P' ); break;
- case 0x51 : Character_Fill(L'Q' ); break;
- case 0x52 : Character_Fill(L'R' ); break;
- case 0x53 : Character_Fill(L'S' ); break;
- case 0x54 : Character_Fill(L'T' ); break;
- case 0x55 : Character_Fill(L'U' ); break;
- case 0x56 : Character_Fill(L'V' ); break;
- case 0x57 : Character_Fill(L'W' ); break;
- case 0x58 : Character_Fill(L'X' ); break;
- case 0x59 : Character_Fill(L'Y' ); break;
- case 0x5A : Character_Fill(L'Z' ); break;
- case 0x5B : Character_Fill(L'[' ); break;
- case 0x5C : Character_Fill(L'\\' ); break;
- case 0x5D : Character_Fill(L']' ); break;
- case 0x5E : Character_Fill(L'^' ); break;
- case 0x5F : Character_Fill(L'_' ); break;
- case 0x60 : Character_Fill(L'`' ); break;
- case 0x61 : Character_Fill(L'a' ); break;
- case 0x62 : Character_Fill(L'b' ); break;
- case 0x63 : Character_Fill(L'c' ); break;
- case 0x64 : Character_Fill(L'd' ); break;
- case 0x65 : Character_Fill(L'e' ); break;
- case 0x66 : Character_Fill(L'f' ); break;
- case 0x67 : Character_Fill(L'g' ); break;
- case 0x68 : Character_Fill(L'h' ); break;
- case 0x69 : Character_Fill(L'i' ); break;
- case 0x6A : Character_Fill(L'j' ); break;
- case 0x6B : Character_Fill(L'k' ); break;
- case 0x6C : Character_Fill(L'l' ); break;
- case 0x6D : Character_Fill(L'm' ); break;
- case 0x6E : Character_Fill(L'n' ); break;
- case 0x6F : Character_Fill(L'o' ); break;
- case 0x70 : Character_Fill(L'p' ); break;
- case 0x71 : Character_Fill(L'q' ); break;
- case 0x72 : Character_Fill(L'r' ); break;
- case 0x73 : Character_Fill(L's' ); break;
- case 0x74 : Character_Fill(L't' ); break;
- case 0x75 : Character_Fill(L'u' ); break;
- case 0x76 : Character_Fill(L'v' ); break;
- case 0x77 : Character_Fill(L'w' ); break;
- case 0x78 : Character_Fill(L'x' ); break;
- case 0x79 : Character_Fill(L'y' ); break;
- case 0x7A : Character_Fill(L'z' ); break;
- case 0x7B : Character_Fill(L'{' ); break;
- case 0x7C : Character_Fill(L'|' ); break;
- case 0x7D : Character_Fill(L'}' ); break;
- case 0x7E : Character_Fill(L'~' ); break;
- case 0x7F : Character_Fill(L'\x266A'); break;
- //CEA-708-D, Section 7.1.5 (C1)
- case 0x80 : //CW0
- case 0x81 : //CW1
- case 0x82 : //CW2
- case 0x83 : //CW3
- case 0x84 : //CW4
- case 0x85 : //CW5
- case 0x86 : //CW6
- case 0x87 : //CW7
- CWx(cc_data_1-0x80); break; //SetCurrentWindow
- case 0x88 : CLW(); Pos+=1; break; //ClearWindows
- case 0x89 : DSW(); Pos+=1; break; //DisplayWindows
- case 0x8A : HDW(); Pos+=1; break; //HideWindows
- case 0x8B : TGW(); Pos+=1; break; //ToggleWindows
- case 0x8C : DLW(); Pos+=1; break; //DeleteWindows
- case 0x8D : DLY(); Pos+=1; break; //Delay
- case 0x8E : DLC(); break; //Delay Cancel
- case 0x8F : RST(); break; //Reset
- case 0x90 : SPA(); Pos+=2; break; //SetPenAttributes
- case 0x91 : SPC(); Pos+=3; break; //SetPenColor
- case 0x92 : SPL(); Pos+=2; break; //SetPenLocation
- case 0x97 : SWA(); Pos+=5; break; //SetWindowAttributes
- case 0x98 : //DF0
- case 0x99 : //DF1
- case 0x9A : //DF2
- case 0x9B : //DF3
- case 0x9C : //DF4
- case 0x9D : //DF5
- case 0x9E : //DF6
- case 0x9F : //DF7
- DFx(cc_data_1-0x98); Pos+=6; break; //DefineWindow
- //CEA-708-D, Section 7.1.6 (G1)
- case 0xA0 : Character_Fill(L'\xA0' ); break;
- case 0xA1 : Character_Fill(L'\xA1' ); break;
- case 0xA2 : Character_Fill(L'\xA2' ); break;
- case 0xA3 : Character_Fill(L'\xA3' ); break;
- case 0xA4 : Character_Fill(L'\xA4' ); break;
- case 0xA5 : Character_Fill(L'\xA5' ); break;
- case 0xA6 : Character_Fill(L'\xA6' ); break;
- case 0xA7 : Character_Fill(L'\xA7' ); break;
- case 0xA8 : Character_Fill(L'\xA8' ); break;
- case 0xA9 : Character_Fill(L'\xA9' ); break;
- case 0xAA : Character_Fill(L'\xAA' ); break;
- case 0xAB : Character_Fill(L'\xAB' ); break;
- case 0xAC : Character_Fill(L'\xAC' ); break;
- case 0xAD : Character_Fill(L'\xAD' ); break;
- case 0xAE : Character_Fill(L'\xAE' ); break;
- case 0xAF : Character_Fill(L'\xAF' ); break;
- case 0xB0 : Character_Fill(L'\xB0' ); break;
- case 0xB1 : Character_Fill(L'\xB1' ); break;
- case 0xB2 : Character_Fill(L'\xB2' ); break;
- case 0xB3 : Character_Fill(L'\xB3' ); break;
- case 0xB4 : Character_Fill(L'\xB4' ); break;
- case 0xB5 : Character_Fill(L'\xB5' ); break;
- case 0xB6 : Character_Fill(L'\xB6' ); break;
- case 0xB7 : Character_Fill(L'\xB7' ); break;
- case 0xB8 : Character_Fill(L'\xB8' ); break;
- case 0xB9 : Character_Fill(L'\xB9' ); break;
- case 0xBA : Character_Fill(L'\xBA' ); break;
- case 0xBB : Character_Fill(L'\xBB' ); break;
- case 0xBC : Character_Fill(L'\xBC' ); break;
- case 0xBD : Character_Fill(L'\xBD' ); break;
- case 0xBE : Character_Fill(L'\xBE' ); break;
- case 0xBF : Character_Fill(L'\xBF' ); break;
- case 0xC0 : Character_Fill(L'\xC0' ); break;
- case 0xC1 : Character_Fill(L'\xC1' ); break;
- case 0xC2 : Character_Fill(L'\xC2' ); break;
- case 0xC3 : Character_Fill(L'\xC3' ); break;
- case 0xC4 : Character_Fill(L'\xC4' ); break;
- case 0xC5 : Character_Fill(L'\xC5' ); break;
- case 0xC6 : Character_Fill(L'\xC6' ); break;
- case 0xC7 : Character_Fill(L'\xC7' ); break;
- case 0xC8 : Character_Fill(L'\xC8' ); break;
- case 0xC9 : Character_Fill(L'\xC9' ); break;
- case 0xCA : Character_Fill(L'\xCA' ); break;
- case 0xCB : Character_Fill(L'\xCB' ); break;
- case 0xCC : Character_Fill(L'\xCC' ); break;
- case 0xCD : Character_Fill(L'\xCD' ); break;
- case 0xCE : Character_Fill(L'\xCE' ); break;
- case 0xCF : Character_Fill(L'\xCF' ); break;
- case 0xD0 : Character_Fill(L'\xD0' ); break;
- case 0xD1 : Character_Fill(L'\xD1' ); break;
- case 0xD2 : Character_Fill(L'\xD2' ); break;
- case 0xD3 : Character_Fill(L'\xD3' ); break;
- case 0xD4 : Character_Fill(L'\xD4' ); break;
- case 0xD5 : Character_Fill(L'\xD5' ); break;
- case 0xD6 : Character_Fill(L'\xD6' ); break;
- case 0xD7 : Character_Fill(L'\xD7' ); break;
- case 0xD8 : Character_Fill(L'\xD8' ); break;
- case 0xD9 : Character_Fill(L'\xD9' ); break;
- case 0xDA : Character_Fill(L'\xDA' ); break;
- case 0xDB : Character_Fill(L'\xDB' ); break;
- case 0xDC : Character_Fill(L'\xDC' ); break;
- case 0xDD : Character_Fill(L'\xDD' ); break;
- case 0xDE : Character_Fill(L'\xDE' ); break;
- case 0xDF : Character_Fill(L'\xDF' ); break;
- case 0xE0 : Character_Fill(L'\xE0' ); break;
- case 0xE1 : Character_Fill(L'\xE1' ); break;
- case 0xE2 : Character_Fill(L'\xE2' ); break;
- case 0xE3 : Character_Fill(L'\xE3' ); break;
- case 0xE4 : Character_Fill(L'\xE4' ); break;
- case 0xE5 : Character_Fill(L'\xE5' ); break;
- case 0xE6 : Character_Fill(L'\xE6' ); break;
- case 0xE7 : Character_Fill(L'\xE7' ); break;
- case 0xE8 : Character_Fill(L'\xE8' ); break;
- case 0xE9 : Character_Fill(L'\xE9' ); break;
- case 0xEA : Character_Fill(L'\xEA' ); break;
- case 0xEB : Character_Fill(L'\xEB' ); break;
- case 0xEC : Character_Fill(L'\xEC' ); break;
- case 0xED : Character_Fill(L'\xED' ); break;
- case 0xEE : Character_Fill(L'\xEE' ); break;
- case 0xEF : Character_Fill(L'\xEF' ); break;
- case 0xF0 : Character_Fill(L'\xF0' ); break;
- case 0xF1 : Character_Fill(L'\xF1' ); break;
- case 0xF2 : Character_Fill(L'\xF2' ); break;
- case 0xF3 : Character_Fill(L'\xF3' ); break;
- case 0xF4 : Character_Fill(L'\xF4' ); break;
- case 0xF5 : Character_Fill(L'\xF5' ); break;
- case 0xF6 : Character_Fill(L'\xF6' ); break;
- case 0xF7 : Character_Fill(L'\xF7' ); break;
- case 0xF8 : Character_Fill(L'\xF8' ); break;
- case 0xF9 : Character_Fill(L'\xF9' ); break;
- case 0xFA : Character_Fill(L'\xFA' ); break;
- case 0xFB : Character_Fill(L'\xFB' ); break;
- case 0xFC : Character_Fill(L'\xFC' ); break;
- case 0xFD : Character_Fill(L'\xFD' ); break;
- case 0xFE : Character_Fill(L'\xFE' ); break;
- case 0xFF : Character_Fill(L'\xFF' ); break;
- default : Illegal(1, cc_data_1);
- }
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//NUL
-void File_Eia708::NUL()
-{
-}
-
-//---------------------------------------------------------------------------
-//End Of Text
-void File_Eia708::ETX()
-{
-}
-
-//---------------------------------------------------------------------------
-//Backspace
-void File_Eia708::BS()
-{
- Param_Info1("Backspace");
-
- int8u WindowID=Streams[service_number]->WindowID;
- if (WindowID==(int8u)-1)
- return; //Must wait for the corresponding CWx
- window* Window=Streams[service_number]->Windows[WindowID];
- if (Window==NULL)
- return; //Must wait for the corresponding DFx
-
- if (Window->Minimal.x)
- {
- //Clearing window
- Window->Minimal.x--;
- Window->Minimal.CC[Window->Minimal.y][Window->Minimal.x]=character();
-
- if (Window->visible)
- {
- //Clearing global area
- if (Window->Minimal.Window_y+Window->Minimal.y<(int8u)Streams[service_number]->Minimal.CC.size() && Window->Minimal.Window_x+Window->Minimal.x<(int8u)Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Window->Minimal.y].size())
- Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Window->Minimal.y][Window->Minimal.Window_x+Window->Minimal.x]=character();
-
- //Has changed
- Window_HasChanged();
- HasChanged();
- }
- }
-}
-
-//---------------------------------------------------------------------------
-//Form Feed
-void File_Eia708::FF()
-{
- Param_Info1("Form Feed");
-
- int8u WindowID=Streams[service_number]->WindowID;
- if (WindowID==(int8u)-1)
- return; //Must wait for the corresponding CWx
- window* Window=Streams[service_number]->Windows[WindowID];
- if (Window==NULL)
- return; //Must wait for the corresponding DFx
-
- for (size_t Pos_Y=0; Pos_Y<Window->row_count; Pos_Y++)
- for (size_t Pos_X=0; Pos_X<Window->column_count; Pos_X++)
- {
- //Clearing window
- Streams[service_number]->Windows[Streams[service_number]->WindowID]->Minimal.CC[Pos_Y][Pos_X]=character();
-
- if (Window->visible)
- {
- //Clearing global area
- if (Window->Minimal.Window_y+Pos_Y<Streams[service_number]->Minimal.CC.size() && Window->Minimal.Window_x+Pos_X<Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Pos_Y].size())
- Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Pos_Y][Window->Minimal.Window_x+Pos_X]=character();
- }
- }
-
- if (Window->visible)
- {
- //Has changed
- Window_HasChanged();
- HasChanged();
- }
-
- //SetPenLocation
- Window->Minimal.x=0;
- Window->Minimal.y=0;
-}
-
-//---------------------------------------------------------------------------
-//Carriage return
-void File_Eia708::CR()
-{
- Param_Info1("Carriage return");
-
- int8u WindowID=Streams[service_number]->WindowID;
- if (WindowID==(int8u)-1)
- return; //Must wait for the corresponding CWx
- window* Window=Streams[service_number]->Windows[WindowID];
- if (Window==NULL)
- return; //Must wait for the corresponding DFx
- int8u y=Window->Minimal.y;
-
- y++;
- if (y>=Window->row_count)
- {
- //Rolling up window
- for (int8u Pos_Y=0; Pos_Y<Window->row_count-1; Pos_Y++)
- Window->Minimal.CC[Pos_Y]=Window->Minimal.CC[Pos_Y+1];
-
- //SetPenLocation
- y=Window->row_count-1;
-
- //Clearing last line of window
- for (int8u Pos_X=0; Pos_X<Window->column_count; Pos_X++)
- Window->Minimal.CC[y][Pos_X]=character();
-
- if (Window->visible)
- {
- //Updating global area
- for (int8u Pos_Y=0; Pos_Y<Window->row_count; Pos_Y++)
- for (int8u Pos_X=0; Pos_X<Window->column_count; Pos_X++)
- if (Window->Minimal.Window_y+Pos_Y<(int8u)Streams[service_number]->Minimal.CC.size() && Window->Minimal.Window_x+Pos_X<(int8u)Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Pos_Y].size())
- Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Pos_Y][Window->Minimal.Window_x+Pos_X]=Window->Minimal.CC[Pos_Y][Pos_X];
-
- //Has changed
- Window_HasChanged();
- HasChanged();
- }
- }
-
- //SetPenLocation
- Window->Minimal.x=0;
- Window->Minimal.y=y;
-}
-
-//---------------------------------------------------------------------------
-//Horizontal Carriage Return
-void File_Eia708::HCR()
-{
- Param_Info1("Horizontal Carriage Return");
-
- int8u WindowID=Streams[service_number]->WindowID;
- if (WindowID==(int8u)-1)
- return; //Must wait for the corresponding CWx
- window* Window=Streams[service_number]->Windows[WindowID];
- if (Window==NULL)
- return; //Must wait for the corresponding DFx
- int8u y=Window->Minimal.y;
-
- for (int8u Pos_X=0; Pos_X<Window->column_count; Pos_X++)
- {
- //Clearing window
- Streams[service_number]->Windows[Streams[service_number]->WindowID]->Minimal.CC[y][Pos_X]=character();
-
- if (Window->visible)
- {
- //Clearing global area
- if (Window->Minimal.Window_y+y<(int8u)Streams[service_number]->Minimal.CC.size() && Window->Minimal.Window_x+Pos_X<(int8u)Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Window->Minimal.y].size())
- Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+y][Window->Minimal.Window_x+Pos_X]=character();
-
- //Has changed
- Window_HasChanged();
- HasChanged();
- }
- }
-
- //SetPenLocation
- Window->Minimal.x=0;
-}
-
-//---------------------------------------------------------------------------
-//SetCurrentWindow
-void File_Eia708::CWx(int8u WindowID)
-{
- Param_Info1("SetCurrentWindow"); Param_Info1(WindowID);
-
- Streams[service_number]->WindowID=WindowID;
-}
-
-//---------------------------------------------------------------------------
-//ClearWindows
-void File_Eia708::CLW()
-{
- Param_Info1("ClearWindows");
-
- int8u Save_WindowID=Streams[service_number]->WindowID;
- bool Save_StandAloneCommand=StandAloneCommand;
- StandAloneCommand=false;
-
- Element_Begin1("ClearWindows");
- BS_Begin();
- int8u WindowID=8;
- bool HasChanged_=false;
- do
- {
- WindowID--;
- bool IsSet;
- Get_SB ( IsSet, Ztring(__T("window ")+Ztring::ToZtring(WindowID)).To_Local().c_str());
-
- if (IsSet)
- {
- Streams[service_number]->WindowID=WindowID;
- window* Window=Streams[service_number]->Windows[WindowID];
-
- //ClearWindow is like Form Feed
- FF();
-
- if (Window && Window->visible)
- {
- //Has changed
- HasChanged_=true;
- Window_HasChanged();
- }
- }
- }
- while (WindowID>0);
- BS_End();
- Element_End0();
-
- Streams[service_number]->WindowID=Save_WindowID;
- StandAloneCommand=Save_StandAloneCommand;
-
- if (HasChanged_)
- {
- //Has changed
- HasChanged();
- }
-}
-
-//---------------------------------------------------------------------------
-//DisplayWindows
-void File_Eia708::DSW()
-{
- Param_Info1("DisplayWindows");
-
- int8u Save_WindowID=Streams[service_number]->WindowID;
- bool Save_StandAloneCommand=StandAloneCommand;
- StandAloneCommand=false;
-
- Element_Begin1("DisplayWindows");
- BS_Begin();
- int8u WindowID=8;
- bool HasChanged_=false;
- do
- {
- WindowID--;
- bool IsSet;
- Get_SB ( IsSet, Ztring(__T("window ")+Ztring::ToZtring(WindowID)).To_Local().c_str());
-
- if (IsSet)
- {
- window* Window=Streams[service_number]->Windows[WindowID];
-
- if (Window && !Window->visible)
- {
- Window->visible=true;
-
- //Filling global area
- for (size_t Pos_Y=0; Pos_Y<Window->row_count; Pos_Y++)
- for (size_t Pos_X=0; Pos_X<Window->column_count; Pos_X++)
- {
- if (Window->Minimal.Window_y+Pos_Y<Streams[service_number]->Minimal.CC.size() && Window->Minimal.Window_x+Pos_X<Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Pos_Y].size())
- Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Pos_Y][Window->Minimal.Window_x+Pos_X]=Window->Minimal.CC[Pos_Y][Pos_X];
- }
-
- //Has changed
- HasChanged_=true;
- Window_HasChanged();
- }
- }
- }
- while (WindowID>0);
- BS_End();
- Element_End0();
-
- Streams[service_number]->WindowID=Save_WindowID;
- StandAloneCommand=Save_StandAloneCommand;
-
- if (HasChanged_)
- {
- //Has changed
- HasChanged();
- }
-}
-
-//---------------------------------------------------------------------------
-//HideWindows
-void File_Eia708::HDW()
-{
- Param_Info1("HideWindows");
-
- int8u Save_WindowID=Streams[service_number]->WindowID;
- bool Save_StandAloneCommand=StandAloneCommand;
- StandAloneCommand=false;
-
- Element_Begin1("HideWindows");
- BS_Begin();
- int8u WindowID=8;
- bool HasChanged_=false;
- do
- {
- WindowID--;
-
- bool IsSet;
- Get_SB ( IsSet, Ztring(__T("window ")+Ztring::ToZtring(WindowID)).To_Local().c_str());
-
- if (IsSet)
- {
- window* Window=Streams[service_number]->Windows[WindowID];
-
- if (Window && Window->visible)
- {
- Window->visible=false;
-
- for (size_t Pos_Y=0; Pos_Y<Window->row_count; Pos_Y++)
- for (size_t Pos_X=0; Pos_X<Window->column_count; Pos_X++)
- {
- //Clearing window
- Window->Minimal.CC[Pos_Y][Pos_X]=character();
-
- //Filling global area
- if (Window->Minimal.Window_y+Pos_Y<Streams[service_number]->Minimal.CC.size() && Window->Minimal.Window_x+Pos_X<Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Pos_Y].size())
- Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Pos_Y][Window->Minimal.Window_x+Pos_X]=character();
- }
-
- //Has changed
- HasChanged_=true;
- Window_HasChanged();
- }
- }
- }
- while (WindowID>0);
- BS_End();
- Element_End0();
-
- Streams[service_number]->WindowID=Save_WindowID;
- StandAloneCommand=Save_StandAloneCommand;
-
- if (HasChanged_)
- {
- //Has changed
- HasChanged();
- }
-}
-
-//---------------------------------------------------------------------------
-//ToggleWindows
-void File_Eia708::TGW()
-{
- Param_Info1("ToggleWindows");
-
- int8u Save_WindowID=Streams[service_number]->WindowID;
- bool Save_StandAloneCommand=StandAloneCommand;
- StandAloneCommand=false;
-
- Element_Begin1("ToggleWindows");
- BS_Begin();
- int8u WindowID=8;
- bool HasChanged_=false;
- do
- {
- WindowID--;
- bool IsSet;
- Get_SB ( IsSet, Ztring(__T("window ")+Ztring::ToZtring(WindowID)).To_Local().c_str());
-
- if (IsSet)
- {
- window* Window=Streams[service_number]->Windows[WindowID];
-
- if (Window)
- {
- Window->visible=!Window->visible;
-
- //Filling global area
- for (size_t Pos_Y=0; Pos_Y<Window->row_count; Pos_Y++)
- for (size_t Pos_X=0; Pos_X<Window->column_count; Pos_X++)
- {
- if (Window->Minimal.Window_y+Pos_Y<Streams[service_number]->Minimal.CC.size() && Window->Minimal.Window_x+Pos_X<Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Pos_Y].size())
- Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Pos_Y][Window->Minimal.Window_x+Pos_X]=Window->visible?Window->Minimal.CC[Pos_Y][Pos_X]:character();
- }
-
- //Has changed
- HasChanged_=true;
- Window_HasChanged();
- }
- }
- }
- while (WindowID>0);
- BS_End();
- Element_End0();
-
- Streams[service_number]->WindowID=Save_WindowID;
- StandAloneCommand=Save_StandAloneCommand;
-
- if (HasChanged_)
- {
- //Has changed
- HasChanged();
- }
-}
-
-//---------------------------------------------------------------------------
-//DeleteWindows
-void File_Eia708::DLW()
-{
- Param_Info1("DeleteWindows");
-
- int8u Save_WindowID=Streams[service_number]->WindowID;
- bool Save_StandAloneCommand=StandAloneCommand;
- StandAloneCommand=false;
-
- //Bug in some files
- bool Bug_WindowOffset=false;
-
- Element_Begin1("DeleteWindows");
- BS_Begin();
- int8u WindowID=8;
- bool HasChanged_=false;
- do
- {
- WindowID--;
- bool IsSet;
- Get_SB ( IsSet, Ztring(__T("window ")+Ztring::ToZtring(WindowID)).To_Local().c_str());
-
- //Bug in some files
- if (IsSet && WindowID==1 && Streams[service_number]->Windows[0]!=NULL && Streams[service_number]->Windows[1]==NULL) //Mix between Windows 0 and 1
- Bug_WindowOffset=true;
- if (!IsSet && WindowID==0 && Bug_WindowOffset)
- IsSet=true;
-
- if (IsSet)
- {
- window* Window=Streams[service_number]->Windows[WindowID];
-
- if (Window && Window->visible)
- {
- //Filling global area
- for (size_t Pos_Y=0; Pos_Y<Window->row_count; Pos_Y++)
- for (size_t Pos_X=0; Pos_X<Window->column_count; Pos_X++)
- {
- //Clearing window
- Window->Minimal.CC[Pos_Y][Pos_X]=character();
-
- //Filling global area
- if (Window->Minimal.Window_y+Pos_Y<Streams[service_number]->Minimal.CC.size() && Window->Minimal.Window_x+Pos_X<Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Pos_Y].size())
- Streams[service_number]->Minimal.CC[Window->Minimal.Window_y+Pos_Y][Window->Minimal.Window_x+Pos_X]=character();
- }
-
- //Has changed
- HasChanged_=true;
- Window_HasChanged();
- }
-
- //Removing the window
- delete Streams[service_number]->Windows[WindowID]; Streams[service_number]->Windows[WindowID]=NULL;
- if (WindowID==Save_WindowID)
- Save_WindowID=(int8u)-1;
- }
- }
- while (WindowID>0);
- BS_End();
- Element_End0();
-
- Streams[service_number]->WindowID=Save_WindowID;
- StandAloneCommand=Save_StandAloneCommand;
-
- if (HasChanged_)
- {
- //Has changed
- HasChanged();
- }
-}
-
-//---------------------------------------------------------------------------
-//Delay
-void File_Eia708::DLY()
-{
- Param_Info1("Delay");
- Element_Begin1("Delay");
- Skip_B1( "tenths of seconds");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-//Delay Cancel
-void File_Eia708::DLC()
-{
- Param_Info1("Delay Cancel");
-}
-
-//---------------------------------------------------------------------------
-//Reset
-void File_Eia708::RST()
-{
- //TODO: Should clear all buffers
- Param_Info1("Reset");
-}
-
-//---------------------------------------------------------------------------
-//Set Pen Attributes
-void File_Eia708::SPA()
-{
- Param_Info1("Set Pen Attributes");
- Element_Begin1("Set Pen Attributes");
- BS_Begin();
- Skip_S1(4, "text tag");
- Skip_S1(2, "offset");
- Skip_S1(2, "pen size");
- Skip_SB( "italics");
- Skip_SB( "underline");
- Skip_S1(3, "edge type");
- Skip_S1(3, "font style");
- BS_End();
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-//Set Pen Color
-void File_Eia708::SPC()
-{
- Param_Info1("Set Pen Color");
- Element_Begin1("Set Pen Color");
- BS_Begin();
- Skip_S1(2, "foreground opacity");
- Skip_S1(2, "foreground red");
- Skip_S1(2, "foreground green");
- Skip_S1(2, "foreground blue");
- Skip_S1(2, "background opacity");
- Skip_S1(2, "background red");
- Skip_S1(2, "background green");
- Skip_S1(2, "background blue");
- Mark_0();
- Mark_0();
- Skip_S1(2, "edge red");
- Skip_S1(2, "edge green");
- Skip_S1(2, "edge blue");
- BS_End();
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-//SetPenLocation
-void File_Eia708::SPL()
-{
- Param_Info1("SetPenLocation");
- Element_Begin1("SetPenLocation");
- int8u row, column;
- BS_Begin();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- Get_S1 (4, row, "row");
- Mark_0();
- Mark_0();
- Get_S1 (6, column, "column");
- BS_End();
- Element_End0();
-
- int8u WindowID=Streams[service_number]->WindowID;
- if (WindowID==(int8u)-1)
- return; //Must wait for the corresponding CWx
- window* Window=Streams[service_number]->Windows[WindowID];
- if (Window==NULL)
- return; //Must wait for the corresponding DFx
-
- if (row<Window->Minimal.CC.size() && column<Window->Minimal.CC[Window->Minimal.y].size())
- {
- Window->Minimal.x=column;
- Window->Minimal.y=row;
- }
- else
- {
- // There is a problem, resetting pen location
- Window->Minimal.x=0;
- Window->Minimal.y=0;
- }
-}
-
-//---------------------------------------------------------------------------
-//SetWindowAttributes
-void File_Eia708::SWA()
-{
- Param_Info1("SetWindowAttributes");
- Element_Begin1("SetWindowAttributes");
- BS_Begin();
- Skip_S1(2, "fill opacity");
- Skip_S1(2, "fill red");
- Skip_S1(2, "fill green");
- Skip_S1(2, "fill blue");
- Skip_S1(2, "border type (low)");
- Skip_S1(2, "border red");
- Skip_S1(2, "border green");
- Skip_S1(2, "border blue");
- Skip_SB( "border type (high)");
- Skip_SB( "wordwrap");
- Skip_S1(2, "print direction");
- Skip_S1(2, "scroll direction");
- Skip_S1(2, "justify");
- Skip_S1(4, "effect speed");
- Skip_S1(2, "effect direction");
- Skip_S1(2, "display effect");
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Skip_S1(2, "edge red");
- Skip_S1(2, "edge green");
- Skip_S1(2, "edge blue");
- BS_End();
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-//DefineWindow
-void File_Eia708::DFx(int8u WindowID)
-{
- Param_Info1("DefineWindow"); Param_Info1(WindowID);
- Element_Begin1("DefineWindow");
- int8u anchor_vertical, anchor_horizontal, anchor_point, row_count, column_count;
- bool visible, relative_positioning;
- BS_Begin();
- Mark_0();
- Mark_0();
- Get_SB ( visible, "visible");
- Skip_SB( "row lock");
- Skip_SB( "column lock");
- Skip_S1(3, "priority");
- Get_SB ( relative_positioning, "relative positioning");
- Get_S1 (7, anchor_vertical, "anchor vertical"); //Top left
- Get_S1 (8, anchor_horizontal, "anchor horizontal"); //Top left
- Get_S1 (4, anchor_point, "anchor point");
- Get_S1 (4, row_count, "row count"); //Maximum=14
- Mark_0();
- Mark_0();
- Get_S1 (6, column_count, "column count"); //Maximum=31
- Mark_0();
- Mark_0();
- Skip_S1(4, "window style");
- Skip_S1(2, "pen style ID");
- BS_End();
- Element_End0();
-
- Streams[service_number]->WindowID=WindowID;
- if (Streams[service_number]->Windows[WindowID]==NULL)
- Streams[service_number]->Windows[WindowID]=new window;
- window* Window=Streams[service_number]->Windows[WindowID];
- Window->visible=visible;
- Window->relative_positioning=relative_positioning;
- if (relative_positioning)
- {
- Window->Minimal.Window_y=(int8u)(((float)15)*anchor_vertical/100);
- Window->Minimal.Window_x=(int8u)(24*AspectRatio*anchor_horizontal/100);;
- }
- else
- {
- Window->Minimal.Window_y=anchor_vertical/5;
- Window->Minimal.Window_x=anchor_horizontal/5;
- }
- int8u offset_y;
- switch (anchor_point)
- {
- case 0 :
- case 1 :
- case 2 :
- offset_y=0;
- break;
- case 3 :
- case 4 :
- case 5 :
- offset_y=(row_count+1)/2;
- break;
- case 6 :
- case 7 :
- case 8 :
- offset_y=(row_count+1);
- break;
- default: offset_y=0; //Not valid
- }
- if (offset_y<Window->Minimal.Window_y)
- Window->Minimal.Window_y-=offset_y;
- int8u offset_x;
- switch (anchor_point)
- {
- case 0 :
- case 3 :
- case 6 :
- offset_x=0;
- break;
- case 1 :
- case 4 :
- case 7 :
- offset_x=(column_count+1)/2;
- break;
- case 2 :
- case 5 :
- case 8 :
- offset_x=(column_count+1);
- break;
- default: offset_x=0; //Not valid
- }
- if (offset_x<Window->Minimal.Window_x)
- Window->Minimal.Window_x-=offset_x;
- Window->row_count=row_count+1;
- Window->column_count=column_count+1;
- Window->Minimal.x=0;
- Window->Minimal.y=0;
-
- if (Window->row_count>15)
- {
- Window->row_count=15; //Limitation of specifications
- }
- if (AspectRatio && Window->column_count>(int8u)(24*AspectRatio))
- {
- Window->column_count=(int8u)(24*AspectRatio); //Limitation of specifications
- }
- Window->Minimal.CC.resize(Window->row_count);
- for (int8u Pos_Y=0; Pos_Y<Window->row_count; Pos_Y++)
- Window->Minimal.CC[Pos_Y].resize(Window->column_count);
-
- if (Window->Minimal.Window_y+Window->row_count>15 || (AspectRatio && Window->Minimal.Window_x+Window->column_count>(int8u)(24*AspectRatio)))
- {
- //Correcting
- if (Window->Minimal.Window_y+Window->row_count>15)
- Window->Minimal.Window_y=15-Window->row_count;
- if (AspectRatio && Window->Minimal.Window_x+Window->column_count>(int8u)(24*AspectRatio))
- Window->Minimal.Window_x=(int8u)(24*AspectRatio)-Window->column_count;
- }
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Eia708::Character_Fill(wchar_t Character)
-{
- Param_Info1(Ztring().From_Unicode(&Character, 1)); //(Character) after new ZenLib release
-
- int8u WindowID=Streams[service_number]->WindowID;
- if (WindowID==(int8u)-1)
- return; //Must wait for the corresponding CWx
- window* Window=Streams[service_number]->Windows[WindowID];
- if (Window==NULL)
- return; //Must wait for the corresponding DFx
-
- int8u x=Window->Minimal.x;
- int8u y=Window->Minimal.y;
- int8u Window_x=Window->Minimal.Window_x;
- int8u Window_y=Window->Minimal.Window_y;
-
- if (x<Window->column_count && y<Window->row_count)
- {
- //Filling window
- Window->Minimal.CC[y][x].Value=Character;
-
- if (Window->visible)
- {
- //Filling global area
- if (Window_y+y<(int8u)Streams[service_number]->Minimal.CC.size() && Window_x+x<(int8u)Streams[service_number]->Minimal.CC[Window_y+y].size())
- Streams[service_number]->Minimal.CC[Window_y+y][Window_x+x].Value=Character;
-
- //Has changed
- Window_HasChanged();
- HasChanged();
- }
-
- x++;
- Window->Minimal.x=x;
- }
-
- if (!HasContent)
- HasContent=true;
- DataDetected|=((int64u)1)<<service_number; //1 bit per service
-}
-
-//---------------------------------------------------------------------------
-void File_Eia708::Window_HasChanged()
-{
-}
-
-//---------------------------------------------------------------------------
-void File_Eia708::HasChanged()
-{
-}
-
-//---------------------------------------------------------------------------
-void File_Eia708::Illegal(int8u Size, int8u cc_data_1, int8u cc_data_2, int8u cc_data_3, int8u cc_data_4, int8u cc_data_5, int8u cc_data_6)
-{
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_EIA708_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia708.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia708.h
deleted file mode 100644
index 029707d27..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Eia708.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PGS files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_Eia708H
-#define MediaInfo_File_Eia708H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-#include <string>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Eia708
-//***************************************************************************
-
-class File_Eia708 : public File__Analyze
-{
-public :
- //In
- int8u cc_type;
- float64 AspectRatio;
-
- //Constructor/Destructor
- File_Eia708();
- ~File_Eia708();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
-
- //Buffer - Global
- void Read_Buffer_Init();
- void Read_Buffer_Continue();
- void Read_Buffer_Unsynched();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Temp
- struct character
- {
- wchar_t Value;
- int8u Attribute;
-
- character()
- :
- Value(L' '),
- Attribute(0x00)
- {
- }
- };
- struct window
- {
- enum scroll_direction
- {
- Scroll_Direction_Unknown,
- Scroll_Direction_LeftToRight,
- Scroll_Direction_RightToLeft,
- Scroll_Direction_TopToBottom,
- };
- bool visible;
- scroll_direction Scroll_Direction;
- int8u row_count;
- int8u column_count;
- bool relative_positioning;
- int8u anchor_vertical;
- int8u anchor_horizontal;
- struct data
- {
- vector<vector<character> > CC;
- int8u Window_x; //x of the Windows, relative to the global area
- int8u Window_y;
- int8u x;
- int8u y;
-
- data()
- {
- Window_x=0;
- Window_y=0;
- x=0;
- y=0;
- }
- };
- data Minimal; //In characters
- int8u PenSize;
-
- window()
- {
- visible=false;
- Scroll_Direction=Scroll_Direction_Unknown;
- row_count=(int8u)-1;
- column_count=(int8u)-1;
- relative_positioning=false;
- anchor_vertical=(int8u)-1;
- anchor_horizontal=(int8u)-1;
- PenSize=1; //Standard
- }
- };
- struct stream
- {
- std::vector<window*> Windows;
- struct data
- {
- vector<vector<character> > CC;
- };
- data Minimal;
- int8u WindowID;
-
- stream()
- {
- WindowID=(int8u)-1;
- }
-
- ~stream()
- {
- for (size_t Pos=0; Pos<Windows.size(); Pos++)
- delete Windows[Pos]; //Windows[Pos]=NULL;
- }
- };
- std::vector<stream*> Streams;
- int8u service_number;
- int8u block_size;
- bool HasContent;
- int64u DataDetected; //1 service per bit
-
- //Elements
- void NUL(); //NUL
- void ETX(); //End Of Text
- void BS(); //Backspace
- void FF(); //Form Feed
- void CR(); //Carriage Return
- void HCR(); //Horizontal Carriage Return
- void CWx(int8u WindowID); //SetCurrentWindow
- void CLW(); //ClearWindows
- void DSW(); //DisplayWindows
- void HDW(); //HideWindows
- void TGW(); //ToggleWindows
- void DLW(); //DeleteWindows
- void DLY(); //Delay
- void DLC(); //Delay Cancel
- void RST(); //Reset
- void SPA(); //SetPenAttributes
- void SPC(); //SetPenColor
- void SPL(); //SetPenLocation
- void SWA(); //SetWindowAttributes
- void DFx(int8u WindowID); //DefineWindow
-
- //Temp
- bool StandAloneCommand; //If this is a command simulated from another command
-
- //Helpers
- void Service();
- void Character_Fill(wchar_t Character);
- void HasChanged();
- void Window_HasChanged();
- void Illegal(int8u Size, int8u cc_data_1, int8u cc_data_2=(int8u)-1, int8u cc_data_3=(int8u)-1, int8u cc_data_4=(int8u)-1, int8u cc_data_5=(int8u)-1, int8u cc_data_6=(int8u)-1);
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Kate.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Kate.cpp
deleted file mode 100644
index cad475547..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Kate.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Note : the buffer must be given in ONE call
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_KATE_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_Kate.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Ztring Kate_Category(const Ztring &Category)
-{
- //http://wiki.xiph.org/index.php/OggText#Categories_of_Text_Codecs
- if (Category==__T("CC"))
- return __T("Closed caption");
- if (Category==__T("SUB"))
- return __T("Subtitles");
- if (Category==__T("TAD"))
- return __T("Textual audio descriptions");
- if (Category==__T("KTV"))
- return __T("Karaoke");
- if (Category==__T("TIK"))
- return __T("Ticker text");
- if (Category==__T("AR"))
- return __T("Active regions");
- if (Category==__T("NB"))
- return __T("Semantic annotations");
- if (Category==__T("META"))
- return __T("Metadata, mostly machine-readable");
- if (Category==__T("TRX"))
- return __T("Transcript");
- if (Category==__T("LRC"))
- return __T("Lyrics");
- if (Category==__T("LIN"))
- return __T("Linguistic markup");
- if (Category==__T("CUE"))
- return __T("Cue points");
-
- //From Kate
- if (Category==__T("K-SLD-I"))
- return __T("Slides, as images");
- if (Category==__T("K-SLD-T"))
- return __T("Slides, as text");
- return Category;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Kate::Data_Parse()
-{
- //Parsing
- Identification();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Kate::Identification()
-{
- Element_Name("Identification");
-
- //Parsing
- Ztring Language, Category;
- int16u Width, Height;
- int8u VersionMajor, VersionMinor, NumHeaders, TextEncoding;
- Skip_B1 ( "Signature");
- Skip_Local(7, "Signature");
- Skip_L1( "Reserved");
- Get_L1 (VersionMajor, "version major");
- Get_L1 (VersionMinor, "version minor");
- Get_L1 (NumHeaders, "num headers");
- Get_L1 (TextEncoding, "text encoding");
- Skip_L1( "directionality");
- Skip_L1( "Reserved");
- Skip_L1( "granule shift");
- Skip_L4( "Reserved");
- Get_L2 (Width, "cw sh + canvas width");
- Get_L2 (Height, "ch sh + canvas height");
- /*
- BS_Begin();
- Skip_BS( 4, "cw sh");
- Get_BS (12, Width, "canvas width");
- Skip_BS( 4, "ch sh");
- Get_BS (12, Height, "canvas height");
- BS_End();
- */
- Skip_L4( "granule rate numerator");
- Skip_L4( "granule rate denominator");
- Get_UTF8(16, Language, "Language");
- Get_UTF8(16, Category, "Category");
-
- FILLING_BEGIN();
- Accept("Kate");
-
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Format, "Kate");
- Fill(Stream_Text, 0, Text_Codec, "Kate");
- Fill(Stream_Text, 0, Text_Language, Language);
- Fill(Stream_Text, 0, Text_Language_More, Kate_Category(Category));
-
- Finish("Kate");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_KATE_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Kate.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Kate.h
deleted file mode 100644
index 8e92cf8ef..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Kate.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Kate files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_KateH
-#define MediaInfo_File_KateH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Kate
-//***************************************************************************
-
-class File_Kate : public File__Analyze
-{
-private :
- //Buffer - Per element
- void Data_Parse();
-
- //Elements
- void Identification();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_N19.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_N19.cpp
deleted file mode 100644
index 7bc738d68..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_N19.cpp
+++ /dev/null
@@ -1,440 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_N19_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_N19.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events_Internal.h"
-#endif //MEDIAINFO_EVENTS
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* N19_CodePageNumber(int32u CPN)
-{
- switch (CPN)
- {
- case 0x343337 : return "United States";
- case 0x383530 : return "Multilingual";
- case 0x383630 : return "Portugal";
- case 0x383633 : return "Canada-French";
- case 0x383635 : return "Nordic";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* N19_CharacterCodeTable(int16u CCT)
-{
- switch (CCT)
- {
- case 0x3030 : return "Latin, ISO 6937-2";
- case 0x3031 : return "Latin/Cyrillic, ISO 8859-5";
- case 0x3032 : return "Latin/Arabic, ISO 8859-6";
- case 0x3033 : return "Latin/Greek, ISO 8859-7";
- case 0x3034 : return "Latin/Hebrew, ISO 8859-8";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-float32 N19_DiskFormatCode_FrameRate(int64u DFC)
-{
- switch (DFC)
- {
- case 0x53544C32352E3031LL : return 25.000;
- case 0x53544C33302E3031LL : return 30.000;
- default : return 0.000;
- }
-}
-
-//---------------------------------------------------------------------------
-const char* N19_DisplayStandardCode(int8u DSC)
-{
- switch (DSC)
- {
- case 0x30 : return "Open subtitling";
- case 0x31 : return "Level-1 teletext";
- case 0x32 : return "Level-2 teletext";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* N19_LanguageCode(int16u LC)
-{
- switch (LC)
- {
- case 0x3030 : return "";
- case 0x3031 : return "sq";
- case 0x3032 : return "br";
- case 0x3033 : return "ca";
- case 0x3034 : return "hr";
- case 0x3035 : return "cy";
- case 0x3036 : return "cs";
- case 0x3037 : return "da";
- case 0x3038 : return "de";
- case 0x3039 : return "en";
- case 0x3041 : return "es";
- case 0x3042 : return "eo";
- case 0x3043 : return "et";
- case 0x3044 : return "eu";
- case 0x3045 : return "fo";
- case 0x3046 : return "fr";
- case 0x3130 : return "fy";
- case 0x3131 : return "ga";
- case 0x3132 : return "gd";
- case 0x3133 : return "gl";
- case 0x3134 : return "is";
- case 0x3135 : return "it";
- case 0x3136 : return "Lappish";
- case 0x3137 : return "la";
- case 0x3138 : return "lv";
- case 0x3139 : return "lb";
- case 0x3141 : return "lt";
- case 0x3142 : return "hu";
- case 0x3143 : return "mt";
- case 0x3144 : return "nl";
- case 0x3145 : return "no";
- case 0x3146 : return "oc";
- case 0x3230 : return "pl";
- case 0x3231 : return "pt";
- case 0x3232 : return "ro";
- case 0x3233 : return "Romansh";
- case 0x3234 : return "sr";
- case 0x3235 : return "sk";
- case 0x3236 : return "sl";
- case 0x3237 : return "fi";
- case 0x3238 : return "sv";
- case 0x3239 : return "tr";
- case 0x3241 : return "Flemish";
- case 0x3242 : return "wa";
- case 0x3435 : return "zu";
- case 0x3436 : return "vi";
- case 0x3437 : return "uz";
- case 0x3438 : return "ur";
- case 0x3439 : return "uk";
- case 0x3441 : return "th";
- case 0x3442 : return "te";
- case 0x3443 : return "tt";
- case 0x3444 : return "ta";
- case 0x3445 : return "Tadzhik";
- case 0x3446 : return "sw";
- case 0x3530 : return "Sranan Tongo";
- case 0x3531 : return "so";
- case 0x3532 : return "si";
- case 0x3533 : return "sn";
- case 0x3534 : return "sr";
- case 0x3535 : return "Ruthenian";
- case 0x3536 : return "ru";
- case 0x3537 : return "qu";
- case 0x3538 : return "ps";
- case 0x3539 : return "Punjabi";
- case 0x3541 : return "fa";
- case 0x3542 : return "Papamiento";
- case 0x3543 : return "or";
- case 0x3544 : return "ne";
- case 0x3545 : return "nr";
- case 0x3546 : return "mr";
- case 0x3630 : return "mo";
- case 0x3631 : return "ms";
- case 0x3632 : return "mg";
- case 0x3633 : return "mk";
- case 0x3634 : return "Laotian";
- case 0x3635 : return "kr";
- case 0x3636 : return "km";
- case 0x3637 : return "kk";
- case 0x3638 : return "kn";
- case 0x3639 : return "jp";
- case 0x3641 : return "id";
- case 0x3642 : return "hi";
- case 0x3643 : return "he";
- case 0x3644 : return "ha";
- case 0x3645 : return "Gurani";
- case 0x3646 : return "Gujurati";
- case 0x3730 : return "hr";
- case 0x3731 : return "ka";
- case 0x3732 : return "ff";
- case 0x3733 : return "Dari";
- case 0x3734 : return "Churash";
- case 0x3735 : return "zh";
- case 0x3736 : return "my";
- case 0x3737 : return "bg";
- case 0x3738 : return "bn";
- case 0x3739 : return "be";
- case 0x3741 : return "bm";
- case 0x3742 : return "az";
- case 0x3743 : return "as";
- case 0x3744 : return "hy";
- case 0x3745 : return "ar";
- case 0x3746 : return "am";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_N19::File_N19()
-:File__Analyze()
-{
- //Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_N19;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_N19::FileHeader_Begin()
-{
- //Element_Size
- if (Buffer_Size<11)
- return false; //Must wait for more data
-
- int64u DiskFormatCode=CC8(Buffer+3);
- if (DiskFormatCode!=0x53544C32352E3031LL
- && DiskFormatCode!=0x53544C33302E3031LL)
- {
- Reject("N19");
- return false;
- }
-
- //Element_Size
- if (Buffer_Size<1024)
- return false; //Must wait for more data about GSI
-
- //All should be OK...
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_N19::FileHeader_Parse()
-{
- Element_Name("General Subtitle Information");
-
- //Parsing
- Ztring OPT, RD, TNS, MNC, MNR, CO, EN;
- string TCP;
- int16u LC;
- int8u TCS;
- Info_C3 ( CPN, "CPN - Code Page Number"); Param_Info1(N19_CodePageNumber(CPN));
- Get_C8 ( DFC, "DFC - Disk Format Code"); Param_Info1(N19_DiskFormatCode_FrameRate(DFC));
- Info_C1 ( DSC, "DSC - Display Standard Code"); Param_Info1(N19_DisplayStandardCode(DSC));
- Get_C2 ( CCT, "CCT - Character Code Table number"); Param_Info1(N19_CharacterCodeTable(CCT));
- Get_C2 ( LC, "LC - Language Code"); Param_Info1(N19_LanguageCode(LC));
- Get_Local (32, OPT, "OPT - Original Programme Title");
- Skip_Local(32, "OET - Original Episode Title");
- Skip_Local(32, "TPT - Translated Programme");
- Skip_Local(32, "TET - Translated Episode");
- Skip_Local(32, "TN - Translator's Name");
- Skip_Local(32, "TCD - Translator's Contact Details");
- Skip_Local(16, "SLR - Subtitle List Reference Code");
- Skip_Local( 6, "CD - Creation Date");
- Get_Local ( 6, RD, "RD - Revision Date");
- Skip_C2 ( "RN - Revision number");
- Skip_C5 ( "TNB - Total Number of Text and Timing Information (TTI) blocks");
- Get_Local ( 5, TNS, "TNS - Total Number of Subtitles");
- Skip_C3 ( "TNG - Total Number of Subtitle Groups");
- Get_Local ( 2, MNC, "MNC - Maximum Number of Displayable Characters in any text row");
- Get_Local ( 2, MNR, "MNR - Maximum Number of Displayable Rows");
- Get_C1 ( TCS, "TCS - Time Code: Status");
- Get_String( 8, TCP, "TCP - Time Code: Start-of-Programme");
- Skip_Local( 8, "TCF - Time Code: First In-Cue");
- Skip_C1 ( "TND - Total Number of Disks");
- Skip_C1 ( "DSN - Disk Sequence Number");
- Get_Local ( 3, CO, "CO - Country of Origin");
- Skip_Local(32, "PUB - Publisher");
- Get_Local (32, EN, "EN - Editor's Name");
- Skip_Local(32, "ECD - Editor's Contact Details");
- Skip_XX(75, "Spare Bytes");
- Skip_XX(576, "UDA - User-Defined Area");
-
- FILLING_BEGIN();
- Accept("N19");
-
- Fill(Stream_General, 0, General_Format, "N19");
- Fill(Stream_General, 0, General_Title, OPT);
- RD.insert(0, __T("20"));
- RD.insert(4, __T("-"));
- RD.insert(7, __T("-"));
- Fill(Stream_General, 0, General_Recorded_Date, RD);
- Fill(Stream_General, 0, General_Country, Ztring(CO).MakeLowerCase());
- Fill(Stream_General, 0, General_DistributedBy, EN);
-
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Format, "N19");
- if (N19_DiskFormatCode_FrameRate(DFC))
- {
- Fill(Stream_Text, 0, "FrameRate", N19_DiskFormatCode_FrameRate(DFC));
- if (TCS==0x31 && TCP.size()==8
- && TCP[0]>='0' && TCP[0]<='9'
- && TCP[1]>='0' && TCP[1]<='9'
- && TCP[2]>='0' && TCP[2]<='6'
- && TCP[3]>='0' && TCP[3]<='9'
- && TCP[4]>='0' && TCP[4]<='6'
- && TCP[5]>='0' && TCP[5]<='9'
- && TCP[6]>='0' && TCP[6]<='2'
- && TCP[7]>='0' && TCP[7]<='9')
- {
- int32u Delay=0;
- Delay+=(((int32u)TCP[0])-'0')*10*60*60*1000;
- Delay+=(((int32u)TCP[1])-'0')* 60*60*1000;
- Delay+=(((int32u)TCP[2])-'0')* 10*60*1000;
- Delay+=(((int32u)TCP[3])-'0')* 60*1000;
- Delay+=(((int32u)TCP[4])-'0')* 10*1000;
- Delay+=(((int32u)TCP[5])-'0')* 1000;
- int8u Frames=0;
- Frames+=(((int8u)TCP[6])-'0')*10;
- Frames+=(((int8u)TCP[7])-'0');
- Delay+=float32_int32s(Frames*1000/N19_DiskFormatCode_FrameRate(DFC));
- //Fill(Stream_Text, 0, Text_Delay, Delay); //TODO is 0???
- /*TCP.insert(':', 2);
- TCP.insert(':', 5);
- TCP.insert(':', 8);
- Fill(Stream_Text, 0, "Delay/String4", TCP);*/
- }
- }
- Fill(Stream_Text, 0, Text_Width, MNC.To_int32u());
- Fill(Stream_Text, 0, Text_Height, MNR.To_int32u());
- Fill(Stream_Text, 0, Text_Language, N19_LanguageCode(LC));
-
- //Init
- FirstFrame_TCI=(int64u)-1;
- #if MEDIAINFO_DEMUX
- Frame_Count=0;
- TCO_Latest=(int64u)-1;
- #endif //MEDIAINFO_DEMUX
- FILLING_END();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_N19::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- #if MEDIAINFO_DEMUX
- TCO_Latest=(int64u)-1;
- #endif //MEDIAINFO_DEMUX
-
- GoTo(0x400);
- Open_Buffer_Unsynch();
- return 1;
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_N19::Header_Parse()
-{
- //Filling
- Header_Fill_Size(128);
- Header_Fill_Code(0, __T("TTI"));
-}
-
-//---------------------------------------------------------------------------
-void File_N19::Data_Parse()
-{
- //Parsing
- Ztring TF;
- int32u TCI, TCO;
- Skip_B1 ( "SGN - Subtitle Group Number");
- Skip_B2 ( "SN - Subtitle Number");
- Skip_B1 ( "EBN - Extension Block Number");
- Skip_B1 ( "CS - Cumulative Status");
- Get_B4 (TCI, "TCI - Time Code In");
- TCI=((TCI>>24)&0xFF)*60*60*1000
- + ((TCI>>16)&0xFF) *60*1000
- + ((TCI>>8 )&0xFF) *1000
- + float32_int32s((TCI &0xFF) *1000/N19_DiskFormatCode_FrameRate(DFC));
- Param_Info1(Ztring().Duration_From_Milliseconds((int64u)TCI));
- Get_B4 (TCO, "TCO - Time Code Out");
- TCO=((TCO>>24)&0xFF)*60*60*1000
- + ((TCO>>16)&0xFF) *60*1000
- + ((TCO>>8 )&0xFF) *1000
- + float32_int32s((TCO &0xFF) *1000/N19_DiskFormatCode_FrameRate(DFC));
- Param_Info1(Ztring().Duration_From_Milliseconds((int64u)TCO));
- Skip_B1 ( "VP - Vertical Position");
- Skip_B1 ( "JC - Justification Code");
- Skip_B1 ( "CF - Comment Flag");
- switch (CCT)
- {
- case 0x3030 : //Latin ISO 6937-2
- Get_ISO_6937_2(112, TF, "TF - Text Field");
- break;
- case 0x3031 : //Latin ISO 8859-5
- Get_ISO_8859_5(112, TF, "TF - Text Field");
- break;
- default:
- //Not yet supported, basic default
- Get_ISO_8859_1(112, TF, "TF - Text Field");
- }
- #if MEDIAINFO_TRACE
- TF.FindAndReplace(__T("\x8A"), EOL, 0, Ztring_Recursive);
- TF.FindAndReplace(__T("\x8F"), Ztring(), 0, Ztring_Recursive);
- Param_Info1(TF);
- #endif //MEDIAINFO_TRACE
-
- FILLING_BEGIN();
- if (FirstFrame_TCI==(int64u)-1)
- {
- FirstFrame_TCI=TCI;
- Fill(Stream_Text, 0, Text_Delay, TCI);
- Fill(Stream_Text, 0, Text_Delay_Source, "Container");
- }
- if (File_Offset+Buffer_Offset+Element_Size+128>File_Size)
- {
- Fill(Stream_Text, 0, Text_Duration, TCO-FirstFrame_TCI);
- }
- else if (Config->ParseSpeed<1.0)
- //Jumping
- GoToFromEnd(128, "N19");
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_N19_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_N19.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_N19.h
deleted file mode 100644
index 3c79dbcde..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_N19.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about N19 files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_N19H
-#define MediaInfo_File_N19H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_N19
-//***************************************************************************
-
-class File_N19 : public File__Analyze
-{
-public :
- File_N19();
-
-private :
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Temp
- int64u FirstFrame_TCI;
- int64u DFC;
- int16u CCT;
- #if MEDIAINFO_DEMUX
- int64u TCO_Latest;
- #endif //MEDIAINFO_DEMUX
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_OtherText.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_OtherText.cpp
deleted file mode 100644
index 824f5925e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_OtherText.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_OTHERTEXT_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_OtherText.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Functions
-//***************************************************************************
-
-void File_OtherText::Read_Buffer_Continue()
-{
- if (Buffer_Size<0x200)
- {
- Element_WaitForMoreData();
- return;
- }
-
- Element_Offset=File_Size-(File_Offset+Buffer_Offset);
-
- Ztring Format, FormatMore, Codec;
- Ztring File;
- ZtringList Lines;
-
- //Feed File and Lines
- File.From_UTF8((const char*)Buffer, Buffer_Size>65536?65536:Buffer_Size);
- if (File.empty())
- File.From_Local((const char*)Buffer, Buffer_Size>65536?65536:Buffer_Size); // Trying from local code page
- if (File.size()<0x100)
- {
- File.From_Unicode((wchar_t*)Buffer, 0, Buffer_Size/sizeof(wchar_t)); //Unicode with BOM
- //TODO: Order of bytes (big or Little endian)
- if (File.size()<0x100)
- {
- Reject("Other text");
- return;
- }
- }
- if (File.size()>0x1000)
- File.resize(0x1000); //Do not work on too big
- File.FindAndReplace(__T("\r\n"), __T("\n"), 0, Ztring_Recursive);
- File.FindAndReplace(__T("\r"), __T("\n"), 0, Ztring_Recursive);
- Lines.Separator_Set(0, __T("\n"));
- Lines.Write(File);
- Lines.resize(0x20);
-
- if (Lines[0]==__T("[Script Info]")
- && (Lines.Find(__T("ScriptType: v4.00"))!=Error || Lines.Find(__T("Script Type: V4.00"))!=Error)
- && Lines.Find(__T("[V4 Styles]"))!=Error
- )
- {
- Format=__T("SSA");
- FormatMore=__T("SubStation Alpha");
- Codec=__T("SSA");
- }
- else if (Lines[0]==__T("[Script Info]")
- && (Lines.Find(__T("ScriptType: v4.00+"))!=Error || Lines.Find(__T("Script Type: V4.00+"))!=Error)
- && Lines.Find(__T("[V4+ Styles]"))!=Error
- )
- {
- Format=__T("ASS");
- FormatMore=__T("Advanced SubStation Alpha");
- Codec=__T("ASS");
- }
- else if (Lines[0].size()>24
- && Lines[0][ 0]==__T('0') && Lines[0][ 1]==__T('0')
- && Lines[0][ 2]==__T(':') && Lines[0][ 5]==__T(':') && Lines[0][ 8]==__T(':')
- && Lines[0][11]==__T(' ')
- && Lines[0][12]==__T('0') && Lines[0][13]==__T('0')
- && Lines[0][14]==__T(':') && Lines[0][17]==__T(':') && Lines[0][20]==__T(':')
- && Lines[0][23]==__T(' ')
- )
- {
- Format=__T("Adobe encore DVD");
- Codec=__T("Adobe");
- }
- else if (Lines[0].size()==11
- && Lines[0][0]==__T('-') && Lines[0][1]==__T('-') && Lines[0][2]==__T('>') && Lines[0][3]==__T('>') && Lines[0][4]==__T(' ')
- && Lines[0][5]==__T('0')
- && Lines[1].empty()!=true
- )
- {
- Format=__T("AQTitle");
- Codec=__T("AQTitle");
- }
- else if (Lines[0].size()>28
- && Lines[0][ 0]==__T('0') && Lines[0][ 1]==__T('0')
- && Lines[0][ 2]==__T(':') && Lines[0][ 5]==__T(':') && Lines[0][ 8]==__T(':')
- && Lines[0][11]==__T(' ') && Lines[0][12]==__T(',') && Lines[0][13]==__T(' ')
- && Lines[0][14]==__T('0') && Lines[0][15]==__T('0')
- && Lines[0][16]==__T(':') && Lines[0][19]==__T(':') && Lines[0][22]==__T(':')
- && Lines[0][25]==__T(' ') && Lines[0][16]==__T(',') && Lines[0][27]==__T(' ')
- )
- {
- Format=__T("Captions 32");
- Codec=__T("Caption 32");
- }
- else if (Lines[0].size()==23
- && Lines[0]==__T("*Timecode type: PAL/EBU")
- && Lines[1].empty()
- && Lines[2].size()==23
- && Lines[2][ 0]==__T('0') && Lines[2][ 1]==__T('0')
- && Lines[2][ 2]==__T(':') && Lines[2][ 5]==__T(':') && Lines[2][ 8]==__T(':')
- && Lines[2][11]==__T(' ')
- && Lines[2][12]==__T('0') && Lines[2][13]==__T('0')
- && Lines[2][14]==__T(':') && Lines[2][17]==__T(':') && Lines[2][20]==__T(':')
- && Lines[2].size()>0
- )
- {
- Format=__T("Captions Inc");
- Codec=__T("Captions inc");
- }
- else if (Lines[0].size()>1
- && Lines[0][0]==__T('*')
- && Lines.Find(__T("** Caption Number 1"))!=Error
- )
- {
- Format=__T("Cheeta");
- }
- else if (Lines[0].size()>10
- && Lines[0][0]==__T('~') && Lines[0][1]==__T('C') && Lines[0][2]==__T('P') && Lines[0][3]==__T('C') && Lines[0][9]==__T('~')
- && Lines[1][ 0]==__T('0') && Lines[1][ 1]==__T('0')
- && Lines[1][ 2]==__T(':') && Lines[1][ 5]==__T(':') && Lines[1][ 8]==__T(':')
- )
- {
- Format=__T("CPC Captioning");
- Codec=__T("CPC Captioning");
- }
- else if (Lines[0].find(__T("<SAMI>"))==0)
- {
- Format=__T("SAMI");
- }
- else
- return;
-
- if (Format.empty())
- return;
-
- Accept("Other text");
-
- if (!IsSub)
- {
- Fill(Stream_General, 0, General_Format, Format);
- Fill(Stream_General, 0, General_Format_Info, FormatMore, true);
- }
-
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, Text_Format, Format);
- Fill(Stream_Text, 0, Text_Codec, Codec);
-
- //No more need data
- Element_Begin1(Format);
- Element_End0();
- Finish("Other text");
-}
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_OtherText.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_OtherText.h
deleted file mode 100644
index fcc129296..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_OtherText.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Use magic number to detect only the format (Text)
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_OtherTextH
-#define MediaInfo_File_OtherTextH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_OtherText
-//***************************************************************************
-
-class File_OtherText : public File__Analyze
-{
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Pdf.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Pdf.cpp
deleted file mode 100644
index ed97ff96e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Pdf.cpp
+++ /dev/null
@@ -1,683 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PDF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_Pdf.h"
-#include "MediaInfo/Tag/File_Xmp.h"
-#include <cstdlib>
-#include <algorithm>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Pdf::File_Pdf()
-:File__Analyze()
-{
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Pdf::Streams_Accept()
-{
- Fill(Stream_General, 0, General_Format, "PDF");
-
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, "Format", "PDF");
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Pdf::FileHeader_Begin()
-{
- //Synchro
- if (5>Buffer_Size)
- return false;
- if (Buffer[0]!=0x25 //"%PDF-"
- || Buffer[1]!=0x50
- || Buffer[2]!=0x44
- || Buffer[3]!=0x46
- || Buffer[4]!=0x2D)
- {
- Reject();
- return false;
- }
-
- Accept();
-
- //Temp
- Catalog_Level=0;
- Offsets_Max=0;
-
- //All should be OK...
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Pdf::FileHeader_Parse()
-{
- string PdfHeader;
- Get_String(SizeOfLine(), PdfHeader, "Header");
- for (;;)
- {
- int64u CommentSize=SizeOfLine();
- if (Buffer_Offset+Element_Offset>=Buffer_Size)
- {
- Element_WaitForMoreData();
- return;
- }
- if (Buffer[Buffer_Offset+Element_Offset]!='%')
- break;
- Skip_String(CommentSize, "Comment");
- }
-
- //Filling
- Fill(Stream_General, 0, General_Format_Version, PdfHeader.substr(5));
-
- GoToFromEnd(9+2+10+2+5+2); // "startxref" + EOL + 10max digits + EOL + "%%EOF" + EOL
- State=State_Parsing_startxref;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Pdf::Read_Buffer_Continue()
-{
- switch (State)
- {
- case State_Parsing_xref : xref(); if (!Element_IsWaitingForMoreData()) trailer(); break;
- case State_Parsing_startxref : eof(); startxref(); break;
- case State_Parsing_object : break; //Using elements
- default : Finish();
- }
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Pdf::Header_Begin()
-{
- //Offsets_Current=Offsets.find(Objects_Current->second.Offset);
- //offsets::iterator Offsets_Next=Offsets_Current;
- //Offsets_Next++;
- //if (Offsets_Next!=Offsets.end() && Offsets_Next->first>File_Offset+Buffer_Size)
- //{
- // Element_WaitForMoreData();
- // return false;
- //}
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Pdf::Header_Parse()
-{
- offsets::iterator Offsets_Next=upper_bound(Offsets.begin(), Offsets.end(), (int32u)(File_Offset+Buffer_Offset));
- if (Offsets_Next!=Offsets.end() && *Offsets_Next>File_Offset+Buffer_Size)
- {
- Element_WaitForMoreData();
- return;
- }
-
- int64u Size;
- //if (Offsets_Current==Offsets.end())
- // Size=Offsets_Max-(File_Offset+Buffer_Offset);
- //else
- // Size=Offsets_Current->first-(File_Offset+Buffer_Offset);
- if (Offsets_Next==Offsets.end())
- Size=Offsets_Max-(File_Offset+Buffer_Offset);
- else
- Size=*Offsets_Next-(File_Offset+Buffer_Offset);
-
- Header_Fill_Size(Size);
-}
-
-//---------------------------------------------------------------------------
-void File_Pdf::Data_Parse()
-{
- Element_Name("Object");
-
- string Line;
- Get_String(SizeOfLine(), Line, "Header");
-
- size_t Space_Pos=Line.find(' ');
- int32u ObjectNumber=Ztring().From_UTF8(Line.substr(0, Space_Pos)).To_int32u();
- Element_Info1(ObjectNumber);
- objects::iterator Object=Objects.find(ObjectNumber);
- if (Object==Objects.end())
- Skip_XX(Element_Size-Element_Offset, "Data");
- else
- switch(Object->second.Type)
- {
- case Type_Root : Object_Root(); break;
- case Type_Info : Object_Info(); break;
- case Type_Metadata : Object_Metadata(); break;
- default : Skip_XX(Element_Size-Element_Offset, "Data");
- }
-
- for (;;)
- {
- Objects_Current->second.BottomPos++;
- if (Objects_Current->second.BottomPos>=Objects_Current->second.Bottoms.size())
- {
- if (Objects_Current->first==(int32u)-1)
- {
- //No more to parse
- Objects_Current=Objects.end();
- Objects.clear();
- Finish();
- break;
- }
-
- Objects_Current=Objects.find(Objects_Current->second.TopObject);
- continue;
- }
-
- Objects_Current=Objects.find(Objects_Current->second.Bottoms[Objects_Current->second.BottomPos]);
- GoTo(Objects_Current->second.Offset);
- break;
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Pdf::xref()
-{
- //Parsing
- Element_Begin1("Cross-Reference Table");
-
- Element_Begin1("Cross-Reference Section");
-
- string FirstLine;
- Skip_String(SizeOfLine(), "Object name");
- Element_Begin1("Cross-Reference SubSection");
- Get_String(SizeOfLine(), FirstLine, "Header");
- size_t FirstLine_Space=FirstLine.find(' ');
- int32u Base=atoi((const char*)FirstLine.c_str());
- int32u Count=0;
- if (FirstLine_Space!=string::npos)
- Count=atoi((const char*)FirstLine.c_str()+FirstLine_Space+1);
-
- if (0x10000+20*Count>Buffer_Size && File_Offset+Buffer_Size<File_Size)
- {
- // We wait for more data
- Buffer_Offset=0;
- Element_Offset=0;
- Element_DoNotShow();
- Element_End0();
- Element_End0();
- Element_End0();
- Element_WaitForMoreData();
- return;
- }
-
- while (Element_Offset<Element_Size && (Buffer[Buffer_Offset+(size_t)Element_Offset]=='\r' || Buffer[Buffer_Offset+(size_t)Element_Offset]=='\n'))
- Element_Offset++;
- const int8u* Buffer_Temp=Buffer+Buffer_Offset+(size_t)Element_Offset+17;
- for (int32u Pos=0; Pos<Count; ++Pos)
- {
- if (*Buffer_Temp=='n')
- {
- int32u Offset=(int32u)atoi((const char*)(Buffer_Temp-17));
- Objects[Base+Pos].Offset=Offset;
- //Offsets[Offset]=Base+Pos;
- Offsets.push_back(Offset);
- }
- Buffer_Temp+=20;
- if (Pos>100)
- Element_Offset+=20;
- else
- {
- Skip_String(18, "Entry"); Param_Info1(Base+Pos);
- Element_Offset+=2; //Skipping spaces at end and line return
- }
- }
- Element_End0();
-
- Element_End0();
-
- Element_End0();
-
- if (File_Offset+Buffer_Offset>Offsets_Max)
- Offsets_Max=(int32u)(File_Offset+Buffer_Offset);
-}
-
-//---------------------------------------------------------------------------
-void File_Pdf::trailer()
-{
- Element_Begin1("Trailer");
-
- //Parsing
- int32u Prev=(int32u)-1;
- string Key;
- Ztring Value;
- Skip_String(SizeOfLine(), "Object name");
- while (Element_Offset<Element_Size)
- {
- if (Get_Next(Key, Value))
- {
- for (;;)
- {
- Get_Next(Key, Value);
- if (Key.empty())
- break;
- else if (Key=="Root")
- {
- int32u ObjectNumber=Value.To_int32u();
- Objects[ObjectNumber].Type=Type_Root;
- Objects[ObjectNumber].TopObject=(int32u)-1;
- Objects[(int32u)-1].Bottoms.push_back(ObjectNumber);
- Param_Info1(__T("Document Catalog is at offset 0x"+Ztring().From_Number(Objects[ObjectNumber].Offset, 16)));
- }
- else if (Key=="Info")
- {
- int32u ObjectNumber=Value.To_int32u();
- Objects[ObjectNumber].Type=Type_Info;
- Objects[ObjectNumber].TopObject=(int32u)-1;
- Objects[(int32u)-1].Bottoms.push_back(ObjectNumber);
- Param_Info1(__T("Info is at offset 0x"+Ztring().From_Number(Objects[ObjectNumber].Offset, 16)));
- }
- else if (Key=="Prev")
- {
- Prev=Value.To_int32u();
- Param_Info1(__T("Previous Cross-Reference Table is at offset 0x"+Ztring().From_Number(Prev, 16)));
- }
- }
-
- continue;
- }
-
- if (Key.empty())
- break;
- }
-
- Element_End0();
-
- //Previous Cross-Reference Table
- if (Prev!=(int32u)-1)
- {
- GoTo(Prev);
- return;
- }
-
- objects::iterator Object_Top=Objects.find((int32u)-1);
- if (Offsets.empty() || Object_Top==Objects.end())
- {
- Finish();
- return;
- }
-
- sort(Offsets.begin(), Offsets.end());
-
- //Offsets_Current=Offsets.end(); //No more used for the moment
- Objects[(int32u)-1].BottomPos=0;
- Objects_Current=Objects.find(Object_Top->second.Bottoms[0]);
- GoTo(Objects_Current->second.Offset);
- State=State_Parsing_object;
-}
-
-//---------------------------------------------------------------------------
-void File_Pdf::startxref()
-{
- //We need to find the exact begin
- Buffer_Offset=Buffer_Size-1;
- while (Buffer_Offset && (Buffer[Buffer_Offset]=='\r' || Buffer[Buffer_Offset]=='\n'))
- Buffer_Offset--;
- Buffer_Offset-=5; // "%%EOF"
- while (Buffer_Offset && (Buffer[Buffer_Offset]=='\r' || Buffer[Buffer_Offset]=='\n'))
- Buffer_Offset--;
- while (Buffer_Offset && Buffer[Buffer_Offset]>='0' && Buffer[Buffer_Offset]<='9') // Value
- Buffer_Offset--;
- while (Buffer_Offset && (Buffer[Buffer_Offset]=='\r' || Buffer[Buffer_Offset]=='\n'))
- Buffer_Offset--;
-
- Buffer_Offset-=8;
-
- //Parsing
- Element_Begin1("Cross-Reference Table Offset");
-
- string xrefOffsetS;
- Skip_String(SizeOfLine(), "Object name");
- Get_String (SizeOfLine(), xrefOffsetS, "xref Offset");
- while (Buffer_Offset<Buffer_Size && (Buffer[Buffer_Offset]=='\r' || Buffer[Buffer_Offset]=='\n'))
- ++Buffer_Offset;
- int32u xref_Offset=atoi(xrefOffsetS.c_str());
-
- Element_End0();
-
- //Going to xref
- if (xref_Offset>Offsets_Max)
- Offsets_Max=xref_Offset;
- GoTo (xref_Offset);
- State=State_Parsing_xref;
-}
-
-//---------------------------------------------------------------------------
-void File_Pdf::eof()
-{
- if (File_Size!=(int64u)-1 && File_Offset+Buffer_Size<File_Size)
- {
- Element_WaitForMoreData();
- return;
- }
-
- //We need to find the exact begin
- Buffer_Offset=Buffer_Size-1;
- while (Buffer_Offset && (Buffer[Buffer_Offset]=='\r' || Buffer[Buffer_Offset]=='\n'))
- Buffer_Offset--;
-
- Buffer_Offset-=5;
-
- //Parsing
- Element_Begin1("End Of File");
-
- Skip_String(SizeOfLine(), "Object name");
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Pdf::Object_Root()
-{
- Element_Info1("Document Catalog");
-
- //Parsing
- string Key;
- Ztring Value;
- while (Element_Offset<Element_Size)
- {
- if (Get_Next(Key, Value))
- {
- for (;;)
- {
- Get_Next(Key, Value);
- if (Key.empty())
- break;
- else if (Key=="Metadata")
- {
- int32u ObjectNumber=Value.To_int32u();
- Objects[ObjectNumber].Type=Type_Metadata;
- Objects[ObjectNumber].TopObject=Objects_Current->first;
- Objects[Objects_Current->first].Bottoms.push_back(ObjectNumber);
- Param_Info1(__T("Metadata is at offset 0x"+Ztring().From_Number(Objects[ObjectNumber].Offset)));
- }
- }
-
- continue;
- }
-
- if (Key.empty())
- break;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Pdf::Object_Info()
-{
- Element_Info1("Info");
-
- //Parsing
- string Key;
- Ztring Value;
- while (Element_Offset<Element_Size)
- {
- if (Get_Next(Key, Value))
- {
- for (;;)
- {
- Get_Next(Key, Value);
- if (Key.empty())
- break;
- }
-
- continue;
- }
-
- if (Key.empty())
- break;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Pdf::Object_Metadata()
-{
- Element_Info1("Metadata");
-
- //Parsing
- string Key;
- Ztring Value;
- int32u Length=0;
- while (Element_Offset<Element_Size)
- {
- if (Get_Next(Key, Value))
- {
- for (;;)
- {
- Get_Next(Key, Value);
- if (Key.empty())
- break;
- else if (Key=="Length")
- {
- Length=Value.To_int32u();
- }
- }
-
- continue;
- }
-
- if (Key.empty())
- break;
- else if (Key=="stream")
- {
- //Removig end of lines
- if (Element_Offset<Element_Size && Buffer[Buffer_Offset+(size_t)Element_Offset]=='\r')
- Element_Offset++;
- if (Element_Offset<Element_Size && Buffer[Buffer_Offset+(size_t)Element_Offset]=='\n')
- Element_Offset++;
-
- File_Xmp MI;
- Open_Buffer_Init(&MI, Length);
- Open_Buffer_Continue(&MI, Buffer+Buffer_Offset+(size_t)Element_Offset, Length);
- Skip_XX(Length, "Stream, Data");
- Open_Buffer_Finalize(&MI);
- Merge(MI, Stream_General, 0, 0);
- }
- }
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-int64u File_Pdf::SizeOfLine()
-{
- //while (Element_Offset<Element_Size && (Buffer[Buffer_Offset+(size_t)Element_Offset]=='\r' || Buffer[Buffer_Offset+(size_t)Element_Offset]=='\n' || Buffer[Buffer_Offset+(size_t)Element_Offset]=='<' || Buffer[Buffer_Offset+(size_t)Element_Offset]=='>'))
- while (Element_Offset<Element_Size && (Buffer[Buffer_Offset+(size_t)Element_Offset]=='\r' || Buffer[Buffer_Offset+(size_t)Element_Offset]=='\n' || Buffer[Buffer_Offset+(size_t)Element_Offset]==' '))
- Element_Offset++;
- size_t End=Buffer_Offset+(size_t)Element_Offset;
- while (End<Buffer_Size && Buffer[End]!='\r' && Buffer[End]!='\n' && !(End+1<Buffer_Size && Buffer[End]=='<' && Buffer[End+1]=='<') && !(End+1<Buffer_Size && Buffer[End]=='>' && Buffer[End+1]=='>'))
- End++;
- return End-(Buffer_Offset+(size_t)Element_Offset);
-}
-
-//---------------------------------------------------------------------------
-bool File_Pdf::Get_Next(string &Key, Ztring &Value)
-{
- Key.clear();
- Value.clear();
-
- string Line;
-
- //Removig end of lines
- while (Element_Offset<Element_Size && (Buffer[Buffer_Offset+(size_t)Element_Offset]=='\r' || Buffer[Buffer_Offset+(size_t)Element_Offset]=='\n' || Buffer[Buffer_Offset+(size_t)Element_Offset]==' '))
- Element_Offset++;
-
- //End
- if (Element_Offset>=Element_Size)
- return true;
-
- //Testing Catalog
- Peek_String (2, Line);
- if (Line=="<<")
- {
- Element_Offset+=2;
- Catalog_Level++;
- return true;
- }
- else if (Line==">>")
- {
- Element_Offset+=2;
- Catalog_Level--;
- return true;
- }
-
- //Getting a complete line
- Peek_String (SizeOfLine(), Line);
-
- //Testing Catalog
- size_t Catalog_End=Line.find(">>");
- if (Catalog_End!=String::npos)
- Line.resize(Catalog_End);
-
- //Testing stream
- if (Line=="stream")
- {
- Skip_String(Line.size(), "Stream, Header");
- Key=Line;
- return false;
- }
- if (Line=="endstream")
- {
- Skip_String(Line.size(), "Stream, Footer");
- Key=Line;
- return false;
- }
-
- //Testing object
- if (Line=="endobj")
- {
- Skip_String(Line.size(), "Footer");
- Key=Line;
- return false;
- }
-
- //Base
- int64u Line_Base=Element_Offset;
-
- //Testing next key
- size_t Line_End=0;
- size_t Line_Begin=Line_End;
-
- // Key-Value
- if (Line_Begin<Line.size() && Line[Line_Begin]=='/')
- {
- Line_End= Line_Begin+1;
- size_t HasParenthesis=0;
- size_t HasBracket=0;
- size_t HasSpace=0;
- size_t HasValue=0;
- for (;;)
- {
- if (Line_End==Line.size())
- break;
-
- if (!HasParenthesis && !HasBracket && HasValue && Line[Line_End]=='<' && Line_End+1<Line.size() && Line[Line_End+1]=='<')
- break;
- if (!HasParenthesis && !HasBracket && HasValue && Line[Line_End]=='/')
- break;
- else if (!HasValue && Line[Line_End]=='/')
- ++HasValue;
- else if (!HasValue && HasSpace)
- ++HasValue;
-
- if (Line[Line_End]==' ')
- ++HasSpace;
-
- if (Line[Line_End]=='(')
- ++HasParenthesis;
- if (HasParenthesis && Line[Line_End]==')')
- --HasParenthesis;
-
- if (Line[Line_End]=='[')
- ++HasBracket;
- if (HasBracket && Line[Line_End]==']')
- --HasBracket;
-
- ++Line_End;
- }
- while(Line_End && Line[Line_End-1]==' ')
- Line_End--; //Removing trailing spaces
-
- Element_Offset=Line_Base+Line_Begin;
- string KeyValue;
- Get_String(Line_End-Line_Begin, KeyValue, "Key-Value");
-
- size_t Key_Max=KeyValue.find_first_of(" (");
- if (Key_Max==string::npos)
- Key_Max=KeyValue.size();
- Key=KeyValue.substr(1, Key_Max-1);
- size_t Value_Min=Key_Max;
- while (Value_Min<KeyValue.size() && KeyValue[Value_Min]==' ')
- ++Value_Min;
- if (Value_Min<KeyValue.size() && KeyValue[Value_Min]=='(')
- {
- ++Value_Min;
- size_t Value_Max=KeyValue.find(')', Value_Min);
- if (Value_Max!=string::npos)
- {
- //TODO
- Value.From_UTF8(KeyValue.c_str()+Value_Min, Value_Max-Value_Min);
- }
- else
- Value.From_UTF8(KeyValue.c_str()+Value_Min);
- }
- else
- Value.From_UTF8(KeyValue.c_str()+Value_Min);
- return false;
- }
-
- return false;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_PDF_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Pdf.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Pdf.h
deleted file mode 100644
index 2edf064e5..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Pdf.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PDF files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_PdfH
-#define MediaInfo_File_PdfH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Sami
-//***************************************************************************
-
-class File_Pdf : public File__Analyze
-{
-public :
- File_Pdf();
-
-private :
- //Streams management
- void Streams_Accept();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Global
- void Read_Buffer_Continue();
-
- //Buffer - Per element
- bool Header_Begin();
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void obj();
- void xref();
- void trailer();
- void startxref();
- void eof();
- void Object_Root();
- void Object_Info();
- void Object_Metadata();
-
- //Helpers
- int64u SizeOfLine();
- bool Get_Next(string &Key, Ztring &Value); //Returns true if it is an array
-
- //Temp
- enum state
- {
- State_ParsingElements,
- State_Parsing_xref,
- State_Parsing_startxref,
- State_Parsing_object,
- };
- state State;
- //typedef std::map<int32u, int32u> offsets;
- //offsets Offsets; //Key is offset
- //offsets::iterator Offsets_Current;
- typedef std::vector<int32u> offsets;
- offsets Offsets;
- int32u Offsets_Max;
- enum type
- {
- Type_Root,
- Type_Info,
- Type_Metadata,
- Type_Other,
- };
- struct object
- {
- int32u Offset;
- type Type;
- int32u TopObject;
- size_t BottomPos;
- std::vector<int32u> Bottoms;
-
- object()
- :
- Offset((int32u)-1),
- #ifdef __BORLANDC__
- Type(type::Type_Other),
- #else
- Type(Type_Other),
- #endif
- TopObject((int32u)-1),
- BottomPos((size_t)-1)
- {
- }
-
- };
- typedef std::map<int32u, object> objects;
- objects Objects; //Key is object number
- objects::iterator Objects_Current;
-
- size_t Catalog_Level;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Pgs.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Pgs.cpp
deleted file mode 100644
index 5aa012ecd..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Pgs.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PGS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_Pgs.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Pgs::Streams_Fill()
-{
- Stream_Prepare(Stream_Text); //TODO: This is currenlty only text
- Fill(Stream_Text, 0, Text_Format, "PGS");
- Fill(Stream_Text, 0, Text_Codec, "PGS");
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Pgs::Read_Buffer_Continue()
-{
- Skip_XX(Element_Size, "PGS data");
-
- if (!Status[IsAccepted])
- {
- Accept("PGS");
- Finish("PGS");
- }
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_PGS_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Pgs.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Pgs.h
deleted file mode 100644
index 779f571d6..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Pgs.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about PGS files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_PgsH
-#define MediaInfo_File_PgsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Pgs
-//***************************************************************************
-
-class File_Pgs : public File__Analyze
-{
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Global
- void Read_Buffer_Continue();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Scc.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Scc.cpp
deleted file mode 100644
index dcebeae85..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Scc.cpp
+++ /dev/null
@@ -1,275 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_SCC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_Scc.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "MediaInfo/Text/File_Eia608.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Utils
-//***************************************************************************
-
-int64u Scc_str2timecode(const char* Value)
-{
- size_t Length=strlen(Value);
- if (Length==11
- && Value[0]>='0' && Value[0]<='9'
- && Value[1]>='0' && Value[1]<='9'
- && Value[2]==':'
- && Value[3]>='0' && Value[3]<='9'
- && Value[4]>='0' && Value[4]<='9'
- && Value[5]==':'
- && Value[6]>='0' && Value[6]<='9'
- && Value[7]>='0' && Value[7]<='9'
- && (Value[8]==':' || Value[8]==';')
- && Value[9]>='0' && Value[9]<='9'
- && Value[10]>='0' && Value[10]<='9')
- {
- int64u ToReturn=(int64u)(Value[0]-'0')*10*60*60*1000000000
- +(int64u)(Value[1]-'0') *60*60*1000000000
- +(int64u)(Value[3]-'0') *10*60*1000000000
- +(int64u)(Value[4]-'0') *60*1000000000
- +(int64u)(Value[6]-'0') *10*1000000000
- +(int64u)(Value[7]-'0') *1000000000
- +(int64u)(Value[9]-'0') * 333333333
- +(int64u)(Value[10]-'0') * 33333333;
-
- return ToReturn;
- }
- else
- return (int64u)-1;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Scc::File_Scc()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("SCC");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Scc;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- PTS_DTS_Needed=true;
-
- //Temp
- Parser=NULL;
-}
-
-//---------------------------------------------------------------------------
-File_Scc::~File_Scc()
-{
- delete Parser; //Parser=NULL;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_Scc::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- GoTo(0);
- Open_Buffer_Unsynch();
- return 1;
-}
-#endif //MEDIAINFO_SEEK
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-void File_Scc::Read_Buffer_Unsynched()
-{
- if (Parser)
- Parser->Open_Buffer_Unsynch();
-}
-#endif //MEDIAINFO_SEEK
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-void File_Scc::Read_Buffer_AfterParsing()
-{
- if (Parser && File_Offset+Buffer_Size==File_Size)
- Parser->Open_Buffer_Unsynch();
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Scc::Streams_Finish()
-{
- if (Parser && Parser->Status[IsAccepted])
- {
- Finish(Parser);
- for (size_t Pos2=0; Pos2<Parser->Count_Get(Stream_Text); Pos2++)
- {
- Stream_Prepare(Stream_Text);
- Merge(*Parser, Stream_Text, StreamPos_Last, Pos2);
- Fill(Stream_Text, StreamPos_Last, Text_ID, Parser->Retrieve(Stream_Text, Pos2, Text_ID), true);
- }
- }
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Scc::FileHeader_Begin()
-{
- //Element_Size
- if (File_Size<22)
- {
- Reject("N19");
- return false;
- }
- if (Buffer_Size<22)
- return false; //Must wait for more data
-
- if (Buffer[ 0]!=0x53
- || Buffer[ 1]!=0x63
- || Buffer[ 2]!=0x65
- || Buffer[ 3]!=0x6E
- || Buffer[ 4]!=0x61
- || Buffer[ 5]!=0x72
- || Buffer[ 6]!=0x69
- || Buffer[ 7]!=0x73
- || Buffer[ 8]!=0x74
- || Buffer[ 9]!=0x5F
- || Buffer[10]!=0x53
- || Buffer[11]!=0x43
- || Buffer[12]!=0x43
- || Buffer[13]!=0x20
- || Buffer[14]!=0x56
- || Buffer[15]!=0x31
- || Buffer[16]!=0x2E
- || Buffer[17]!=0x30
- )
- {
- Reject("SCC");
- return false;
- }
-
- //Element_Size
- if (Buffer_Size<File_Size)
- return false; //Must wait for more data
-
- //All should be OK...
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Scc::FileHeader_Parse()
-{
- Skip_String(18, "Magic");
- while (Element_Offset<Buffer_Size)
- {
- if (Buffer[(size_t)Element_Offset]!=0x0D && Buffer[(size_t)Element_Offset]!=0x0A)
- break;
- Element_Offset++;
- }
-
- Accept();
- Fill(Stream_General, 0, General_Format, "SCC");
-
- //Init
- Parser=new File_Eia608();
- Open_Buffer_Init(Parser);
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Scc::Header_Parse()
-{
- size_t End=Buffer_Offset;
-
- //Content
- while (End<Buffer_Size)
- {
- if (Buffer[End]==0x0D || Buffer[End]==0x0A)
- break;
- End++;
- }
-
- //EOL
- while (End<Buffer_Size)
- {
- if (Buffer[End]!=0x0D && Buffer[End]!=0x0A)
- break;
- End++;
- }
-
- //Filling
- Header_Fill_Size(End-Buffer_Offset);
- Header_Fill_Code(0, __T("Block"));
-}
-
-//---------------------------------------------------------------------------
-void File_Scc::Data_Parse()
-{
- while (Element_Offset<Element_Size && (Buffer[Buffer_Offset+(size_t)Element_Offset]==0x0D || Buffer[Buffer_Offset+(size_t)Element_Offset]==0x0A))
- Element_Offset++;
- if (Element_Offset==Element_Size)
- return;
-
- //Parsing
- string TimeStamp;
- Get_String(11, TimeStamp, "TimeStamp");
- Parser->FrameInfo.DTS=Scc_str2timecode(TimeStamp.c_str());
- while (Element_Offset+5<=Element_Size)
- {
- int8u Buffer_Temp[2];
- Buffer_Temp[0]=(Buffer[Buffer_Offset+(size_t)Element_Offset+1]-(Buffer[Buffer_Offset+(size_t)Element_Offset+1]>='a'?('a'-10):'0'))<<4
- | (Buffer[Buffer_Offset+(size_t)Element_Offset+2]-(Buffer[Buffer_Offset+(size_t)Element_Offset+2]>='a'?('a'-10):'0'));
- Buffer_Temp[1]=(Buffer[Buffer_Offset+(size_t)Element_Offset+3]-(Buffer[Buffer_Offset+(size_t)Element_Offset+3]>='a'?('a'-10):'0'))<<4
- | (Buffer[Buffer_Offset+(size_t)Element_Offset+4]-(Buffer[Buffer_Offset+(size_t)Element_Offset+4]>='a'?('a'-10):'0'));
- Open_Buffer_Continue(Parser, Buffer_Temp, 2);
- Element_Offset+=5;
- if (Parser->FrameInfo.DTS!=(int64u)-1)
- Parser->FrameInfo.DTS+=33333333;
- }
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_SCC_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Scc.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Scc.h
deleted file mode 100644
index d393c95ee..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Scc.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about SCC (Scenarist Closed Captioning) files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_SccH
-#define MediaInfo_File_SccH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Scc
-//***************************************************************************
-
-class File_Scc : public File__Analyze
-{
-public :
- File_Scc();
- ~File_Scc();
-
-private :
- //Streams management
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- void Read_Buffer_Unsynched ();
- void Read_Buffer_AfterParsing ();
- #endif //MEDIAINFO_SEEK
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Temp
- File__Analyze* Parser;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Scte20.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Scte20.cpp
deleted file mode 100644
index 71d089419..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Scte20.cpp
+++ /dev/null
@@ -1,278 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_SCTE20_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_Scte20.h"
-#if defined(MEDIAINFO_EIA608_YES)
- #include "MediaInfo/Text/File_Eia608.h"
-#endif
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
-#endif //MEDIAINFO_EVENTS
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-namespace MediaInfoLib
-{
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Scte20_field_number (int8u field_number)
-{
- switch (field_number)
- {
- case 0 : return "Forbidden";
- case 1 : return "1st display field";
- case 2 : return "2nd display field";
- case 3 : return "3rd display field";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Scte20::File_Scte20()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("SCTE 20");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Scte20;
- StreamIDs_Width[0]=1;
- #endif //MEDIAINFO_EVENTS
- PTS_DTS_Needed=true;
-
- //In
- picture_structure=(int8u)-1;
- progressive_sequence=false;
- progressive_frame=false;
- top_field_first=false;
- repeat_first_field=false;
-
- //Temp
- Streams.resize(2); //CEA-608 Field 1, CEA-608 Field 2
- Streams_Count=0;
-}
-
-//---------------------------------------------------------------------------
-File_Scte20::~File_Scte20()
-{
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- delete Streams[Pos]; //Streams[Pos]=NULL
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Scte20::Streams_Update()
-{
- Clear(Stream_Text);
-
- //Per stream
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- if (Streams[Pos] && Streams[Pos]->Parser && Streams[Pos]->Parser->Status[IsFilled] /*&& Streams[Pos]->Parser->Status[IsUpdated]*/ && Streams[Pos]->Parser->Count_Get(Stream_Text))
- Streams_Update_PerStream(Pos);
-}
-
-//---------------------------------------------------------------------------
-void File_Scte20::Streams_Update_PerStream(size_t Pos)
-{
- if (Streams[Pos]==NULL)
- return;
-
- Update(Streams[Pos]->Parser);
-
- if (Streams[Pos]->Parser)
- {
- for (size_t Pos2=0; Pos2<Streams[Pos]->Parser->Count_Get(Stream_Text); Pos2++)
- {
- Stream_Prepare(Stream_Text);
- Merge(*Streams[Pos]->Parser, Stream_Text, Pos2, StreamPos_Last);
- Fill(Stream_Text, StreamPos_Last, "MuxingMode", "SCTE 20");
- Fill(Stream_Text, StreamPos_Last, Text_ID, Streams[Pos]->Parser->Retrieve(Stream_Text, Pos2, Text_ID), true);
- }
-
- Ztring LawRating=Streams[Pos]->Parser->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=Streams[Pos]->Parser->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Scte20::Streams_Finish()
-{
- Clear(Stream_Text);
-
- //Per stream
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- if (Streams[Pos] && Streams[Pos]->Parser && Streams[Pos]->Parser->Status[IsAccepted] /*&& Streams[Pos]->Parser->Status[IsUpdated]*/)
- {
- Finish(Streams[Pos]->Parser);
- Streams_Update_PerStream(Pos);
- }
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Scte20::Read_Buffer_Unsynched()
-{
- //Parsing
- for (size_t Pos=0; Pos<Streams.size(); Pos++)
- if (Streams[Pos] && Streams[Pos]->Parser)
- Streams[Pos]->Parser->Open_Buffer_Unsynch();
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-static inline int8u ReverseBits(int8u c)
-{
- // Input: bit order is 76543210
- //Output: bit order is 01234567
- c = (c & 0x0F) << 4 | (c & 0xF0) >> 4;
- c = (c & 0x33) << 2 | (c & 0xCC) >> 2;
- c = (c & 0x55) << 1 | (c & 0xAA) >> 1;
- return c;
-}
-
-//---------------------------------------------------------------------------
-void File_Scte20::Read_Buffer_Continue()
-{
- //Parsing
- Element_Begin1("SCTE 20");
- int8u cc_count;
- bool vbi_data_flag;
- BS_Begin();
- Mark_1_NoTrustError();
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Get_SB (vbi_data_flag, "vbi_data_flag");
- if (vbi_data_flag)
- {
- Get_S1 (5, cc_count, "cc_count");
- for (int8u Pos=0; Pos<cc_count; Pos++)
- {
- Element_Begin1("cc");
- int8u cc_data[2];
- int8u field_number, cc_data_1, cc_data_2;
- Skip_S1(2, "cc_priority");
- Get_S1 (2, field_number, "field_number"); Param_Info1(Scte20_field_number(field_number));
- Skip_S1(5, "line_offset");
- Get_S1 (8, cc_data_1, "cc_data_1");
- cc_data[0]=ReverseBits(cc_data_1);
- Param_Info1(Ztring::ToZtring(cc_data[0], 16));
- Get_S1 (8, cc_data_2, "cc_data_2");
- cc_data[1]=ReverseBits(cc_data_2);
- Param_Info1(Ztring::ToZtring(cc_data[1], 16));
- Mark_1_NoTrustError();
- if (field_number!=0 && picture_structure!=(int8u)-1 && picture_structure!=0)
- {
- Element_Begin1("cc_data");
-
- //Finding the corresponding cc_type (CEA-608 1st field or 2nd field)
- int8u cc_type;
- if (progressive_sequence)
- cc_type=0;
- else if (picture_structure!=3)
- cc_type=picture_structure-1;
- else if (field_number==2)
- cc_type=top_field_first?1:0;
- else //if (field_number==1 || field_number==3)
- cc_type=top_field_first?0:1;
-
- //Parsing
- #if MEDIAINFO_DEMUX
- Element_Code=cc_type;
- #endif //MEDIAINFO_DEMUX
- if (Streams[cc_type]==NULL)
- Streams[cc_type]=new stream;
- if (Streams[cc_type]->Parser==NULL)
- {
- #if defined(MEDIAINFO_EIA608_YES)
- Streams[cc_type]->Parser=new File_Eia608();
- ((File_Eia608*)Streams[cc_type]->Parser)->cc_type=cc_type;
- #else //defined(MEDIAINFO_EIA608_YES)
- Streams[cc_type]->Parser=new File__Analyze();
- #endif //defined(MEDIAINFO_EIA608_YES)
- Open_Buffer_Init(Streams[cc_type]->Parser);
- }
- Demux(cc_data, 2, ContentType_MainStream);
- if (!Streams[cc_type]->Parser->Status[IsFinished])
- {
- //Parsing
- if (Streams[cc_type]->Parser->PTS_DTS_Needed)
- {
- Streams[cc_type]->Parser->FrameInfo.PCR=FrameInfo.PCR;
- Streams[cc_type]->Parser->FrameInfo.PTS=FrameInfo.PTS;
- Streams[cc_type]->Parser->FrameInfo.DTS=FrameInfo.DTS;
- }
- Open_Buffer_Continue(Streams[cc_type]->Parser, cc_data, 2);
- Element_Show();
-
- //Filled
- if (!Status[IsAccepted])
- Accept("SCTE 20");
- }
- else
- Skip_XX(2, "Data");
- Element_End0();
- }
- Element_End0();
- }
- }
- Skip_S1(4, "non_real_time_video_count");
- BS_End();
-
- if (Element_Size-Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "non_real_time_video + reserved");
- Element_End0();
- Element_Show();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_SCTE20_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Scte20.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Scte20.h
deleted file mode 100644
index 1f9f71976..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Scte20.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about SCTE 20 streams
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Scte20H
-#define MediaInfo_Scte20H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Scte20
-//***************************************************************************
-
-class File_Scte20 : public File__Analyze
-{
-public :
- //In
- int8u picture_structure;
- bool progressive_sequence;
- bool progressive_frame;
- bool top_field_first;
- bool repeat_first_field;
-
- //Constructor/Destructor
- File_Scte20();
- ~File_Scte20();
-
-private :
- //Streams management
- void Streams_Update();
- void Streams_Update_PerStream(size_t Pos);
- void Streams_Finish();
-
- //Synchro
- void Read_Buffer_Unsynched();
-
- //Buffer - Global
- void Read_Buffer_Continue();
-
- //Temp
- struct stream
- {
- File__Analyze* Parser;
- size_t StreamPos;
- bool IsFilled;
-
- stream()
- {
- Parser=NULL;
- StreamPos=(size_t)-1;
- IsFilled=false;
- }
-
- ~stream()
- {
- delete Parser; //Parser=NULL;
- }
- };
- std::vector<stream*> Streams;
- size_t Streams_Count;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Sdp.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Sdp.cpp
deleted file mode 100644
index 9df379a60..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Sdp.cpp
+++ /dev/null
@@ -1,258 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_SDP_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_Sdp.h"
-#include "MediaInfo/Text/File_Teletext.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Sdp::File_Sdp()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("SDP");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Sdp;
- StreamIDs_Width[0]=2;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- PTS_DTS_Needed=true;
- MustSynchronize=true;
-}
-
-//---------------------------------------------------------------------------
-File_Sdp::~File_Sdp()
-{
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Sdp::Streams_Fill()
-{
- Fill(Stream_General, 0, General_Format, "SDP");
-}
-
-//---------------------------------------------------------------------------
-void File_Sdp::Streams_Finish()
-{
- for (streams::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- {
- if (Stream->second.Parser && Stream->first<0x80) //For the moment, we filter and use only field 1)
- {
- Finish(Stream->second.Parser);
- Merge(*Stream->second.Parser);
- //Fill(Stream_Text, StreamPos_Last, Text_ID, Ztring::ToZtring((Stream->first&0x80)?2:1)+__T('-')+Ztring::ToZtring(Stream->first&0x1F)+__T("-")+Stream->second.Parser->Get(Stream_Text, 0, Text_ID), true);
- Fill(Stream_Text, StreamPos_Last, Text_ID, Stream->second.Parser->Get(Stream_Text, 0, Text_ID), true);
- }
- }
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Sdp::Synchronize()
-{
- //Synchronizing
- while (Buffer_Offset+2<Buffer_Size)
- {
- while (Buffer_Offset+2<Buffer_Size)
- {
- if (Buffer[Buffer_Offset ]==0x51
- && Buffer[Buffer_Offset+1]==0x15)
- break; //while()
-
- Buffer_Offset++;
- }
-
- if (IsSub)
- break; // Found one file with unknown bytes at the end of the stream, so removing this integrity test for the moment
-
- if (Buffer_Offset+2<Buffer_Size) //Testing if size is coherant
- {
- if (Buffer_Offset+Buffer[Buffer_Offset+2]==Buffer_Size)
- break;
-
- if (Buffer_Offset+Buffer[Buffer_Offset+2]+3>Buffer_Size)
- return false; //Wait for more data
-
- if (Buffer[Buffer_Offset+Buffer[Buffer_Offset+2] ]==0x51
- && Buffer[Buffer_Offset+Buffer[Buffer_Offset+2]+1]==0x15)
- break; //while()
-
- Buffer_Offset++;
- }
- }
-
- //Must have enough buffer for having header
- if (Buffer_Offset+2>=Buffer_Size)
- return false;
-
- //Synched is OK
- if (!Status[IsAccepted])
- {
- //For the moment, we accept only if the file is in sync, the test is not strict enough
- if (Buffer_Offset)
- {
- Reject();
- return false;
- }
-
- Accept();
- }
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Sdp::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+3>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset ]!=0x51
- || Buffer[Buffer_Offset+1]!=0x15)
- {
- Synched=false;
- return true;
- }
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Sdp::Read_Buffer_Unsynched()
-{
- for (streams::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- {
- if (Stream->second.Parser)
- {
- Stream->second.Parser->Open_Buffer_Unsynch();
- }
- }
-}
-
-//***************************************************************************
-// Buffer - Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Sdp::Header_Parse()
-{
- //Parsing
- int8u Length, FormatCode;
- Skip_B2( "Identifier");
- Get_B1 (Length, "Length");
- Get_B1 (FormatCode, "Format Code");
- for (int8u Pos=0; Pos<5; Pos++)
- {
- FieldLines[Pos]=0;
- #if MEDIAINFO_TRACE
- Element_Begin1("Field/Line");
- BS_Begin();
- Info_SB( Field, "Field Number");
- Info_S1(2, Reserved, "Reserved");
- Info_S1(5, Line, "Line Number");
- BS_End();
- FieldLines[Pos]=((Field?1:0)<<7) |(Reserved<<5) | Line; //Removing field information ((Field?1:0)<<7) |
- if (FieldLines[Pos])
- {
- Element_Info1(Field?2:1);
- Element_Info1(Line);
- }
- else
- Element_Info1("None");
- Element_End0();
- #else //MEDIAINFO_TRACE
- Get_B1(FieldLines[Pos], "Field/Line");
- FieldLines[Pos]&=0x7F; //Removing field information
- #endif //MEDIAINFO_TRACE
- }
-
- if (IsSub)
- Header_Fill_Size(Buffer_Size);
- else
- Header_Fill_Size(Length);
-}
-
-//---------------------------------------------------------------------------
-void File_Sdp::Data_Parse()
-{
- Element_Name("Packet");
-
- for (int8u Pos=0; Pos<5; Pos++)
- {
- if (FieldLines[Pos])
- {
- Element_Code=FieldLines[Pos];
- stream &Stream=Streams[FieldLines[Pos]];
- if (Stream.Parser==NULL)
- {
- Stream.Parser=new File_Teletext();
- Stream.Parser->IsSubtitle=true;
- Open_Buffer_Init(Stream.Parser);
- }
- if (Stream.Parser->PTS_DTS_Needed)
- Stream.Parser->FrameInfo=FrameInfo;
- Demux(Buffer+Buffer_Offset+Element_Offset, 45, ContentType_MainStream);
- Open_Buffer_Continue(Stream.Parser, Buffer+Buffer_Offset+Element_Offset, 45);
- Element_Offset+=45;
- }
- }
-
- Element_Begin1("SDP Footer");
- Skip_B1( "Footer ID");
- Skip_B2( "Footer Sequence number");
- Skip_B1( "SDP Cheksum");
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Unknown, out of specs");
- Element_End0();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_SDP_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Sdp.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Sdp.h
deleted file mode 100644
index 2ecba06b2..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Sdp.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about SDP streams
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_SdpH
-#define MediaInfo_File_SdpH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Sdp
-//***************************************************************************
-
-class File_Teletext;
-
-class File_Sdp : public File__Analyze
-{
-public :
- File_Sdp();
- ~File_Sdp();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Temp
- struct stream
- {
- File_Teletext* Parser;
-
- stream()
- :
- Parser(NULL)
- {
- }
- };
- typedef std::map<int8u, stream> streams;
- streams Streams;
- int8u FieldLines[5];
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_SubRip.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_SubRip.cpp
deleted file mode 100644
index 35140bbf1..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_SubRip.cpp
+++ /dev/null
@@ -1,256 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_SUBRIP_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_SubRip.h"
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
- #include "MediaInfo/MediaInfo_Events_Internal.h"
-#endif //MEDIAINFO_EVENTS
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Utils
-//***************************************************************************
-
-int64u SubRip_str2timecode(const char* Value)
-{
- size_t Length=strlen(Value);
- if (Length>=8
- && Value[0]>='0' && Value[0]<='9'
- && Value[1]>='0' && Value[1]<='9'
- && Value[2]==':'
- && Value[3]>='0' && Value[3]<='9'
- && Value[4]>='0' && Value[4]<='9'
- && Value[5]==':'
- && Value[6]>='0' && Value[6]<='9'
- && Value[7]>='0' && Value[7]<='9')
- {
- int64u ToReturn=(int64u)(Value[0]-'0')*10*60*60*1000000000
- +(int64u)(Value[1]-'0') *60*60*1000000000
- +(int64u)(Value[3]-'0') *10*60*1000000000
- +(int64u)(Value[4]-'0') *60*1000000000
- +(int64u)(Value[6]-'0') *10*1000000000
- +(int64u)(Value[7]-'0') *1000000000;
- if (Length>=9 && (Value[8]=='.' || Value[8]==','))
- {
- if (Length>9+9)
- Length=9+9; //Nanoseconds max
- const char* Value_End=Value+Length;
- Value+=9;
- int64u Multiplier=100000000;
- while (Value<Value_End)
- {
- ToReturn+=(int64u)(*Value-'0')*Multiplier;
- Multiplier/=10;
- Value++;
- }
- }
-
- return ToReturn;
- }
- else if (Length>=2
- && Value[Length-1]=='s')
- {
- return (int64u)(atof(Value)*1000000000);
- }
- else
- return (int64u)-1;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_SubRip::File_SubRip()
-:File__Analyze()
-{
- //Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_SubRip;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
-
- //Init
- Frame_Count=0;
-
- //Temp
- IsVTT=false;
- HasBOM=false;
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_SubRip::FileHeader_Begin()
-{
- if (!IsSub && (Buffer_Size<File_Size && Buffer_Size<65536))
- {
- Element_WaitForMoreData();
- return false;
- }
-
- ZtringListList List;
- List.Separator_Set(0, __T("\n\n"));
- List.Separator_Set(1, __T("\n"));
-
- if (Buffer[0]==0xEF
- && Buffer[1]==0xBB
- && Buffer[2]==0xBF)
- HasBOM=true;
- bool IsLocal=false;
- Ztring Temp;
- Temp.From_UTF8((const char*)Buffer+(HasBOM?3:0), (Buffer_Size>65536?65536:Buffer_Size)-(HasBOM?3:0));
- if (Temp.empty())
- {
- Temp.From_Local((const char*)Buffer+(HasBOM?3:0), (Buffer_Size>65536?65536:Buffer_Size)-(HasBOM?3:0)); // Trying from local code page
- IsLocal=true;
- }
- Temp.FindAndReplace(__T("\r\n"), __T("\n"), 0, Ztring_Recursive);
- Temp.FindAndReplace(__T("\r"), __T("\n"), 0, Ztring_Recursive);
- List.Write(Temp);
-
- if (List(0, 0)==__T("WEBVTT FILE") || List(0, 0)==__T("WEBVTT"))
- IsVTT=true;
-
- if (!IsVTT)
- {
- size_t IsOk=0;
- size_t IsNok=0;
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- if (List(Pos, 0).To_int64u()==Pos+1)
- IsOk++;
- else
- IsNok++;
-
- if (List(Pos, 1).size()>22 && List(Pos, 1)[2]==__T(':') && List(Pos, 1)[5]==__T(':') && List(Pos, 1).find(__T(" --> "))!=string::npos)
- IsOk++;
- else
- IsNok++;
- }
-
- if (!IsOk || IsNok>IsOk/2)
- {
- Reject();
- return true;
- }
- }
-
- if (!IsSub && File_Size!=(int64u)-1 && Buffer_Size!=File_Size)
- {
- Element_WaitForMoreData();
- return false;
- }
-
- if (!Status[IsAccepted])
- {
- Accept();
- Fill(Stream_General, 0, General_Format, IsVTT?"WebVTT":"SubRip");
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, "Format", IsVTT?"WebVTT":"SubRip");
- Fill(Stream_Text, 0, "Codec", IsVTT?"WebVTT":"SubRip");
- }
-
- if (IsLocal)
- Temp.From_Local((const char*)Buffer+(HasBOM?3:0), Buffer_Size-(HasBOM?3:0));
- else
- Temp.From_UTF8((const char*)Buffer+(HasBOM?3:0), Buffer_Size-(HasBOM?3:0));
- Temp.FindAndReplace(__T("\r\n"), __T("\n"), 0, Ztring_Recursive);
- Temp.FindAndReplace(__T("\r"), __T("\n"), 0, Ztring_Recursive);
- List.Write(Temp);
-
- #if MEDIAINFO_DEMUX
- size_t Pos=0;
- for (;;)
- {
- if (Pos>=List.size())
- break;
-
- if (List[Pos].size()>=3 || (IsVTT && List[Pos].size()>=2))
- {
- Ztring PTS_Begin_String=List[Pos][IsVTT?0:1].SubString(Ztring(), __T(" --> "));
- Ztring PTS_End_String=List[Pos][IsVTT?0:1].SubString(__T(" --> "), Ztring());
- if (IsVTT)
- {
- size_t Extra_Pos=PTS_End_String.find(__T(' '));
- if (Extra_Pos!=string::npos)
- PTS_End_String.resize(Extra_Pos); //Discarding positioning
- }
- item Item;
- Item.PTS_Begin=SubRip_str2timecode(PTS_Begin_String.To_UTF8().c_str());
- Item.PTS_End=SubRip_str2timecode(PTS_End_String.To_UTF8().c_str());
- for (size_t Pos2=IsVTT?1:2; Pos2<List[Pos].size(); Pos2++)
- {
- List[Pos][Pos2].Trim();
- Item.Content+=List[Pos][Pos2];
- if (Pos2+1<List[Pos].size())
- Item.Content+=EOL;
- }
- Items.push_back(Item);
- }
-
- Pos++;
- }
- #endif //MEDIAINFO_DEMUX
-
- return true;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_SubRip::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- GoTo(0);
- Open_Buffer_Unsynch();
- return 1;
-}
-#endif //MEDIAINFO_SEEK
-
-//---------------------------------------------------------------------------
-void File_SubRip::Read_Buffer_Continue()
-{
- #if MEDIAINFO_DEMUX
- Demux(Buffer+(HasBOM?3:0), Buffer_Size-((HasBOM && Buffer_Size>=3)?3:0), ContentType_MainStream);
- #endif //MEDIAINFO_DEMUX
-
- Buffer_Offset=Buffer_Size;
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_SUBRIP_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_SubRip.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_SubRip.h
deleted file mode 100644
index aeff2f773..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_SubRip.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about SubRip files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_SubRipH
-#define MediaInfo_File_SubRipH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_SubRip
-//***************************************************************************
-
-class File_SubRip : public File__Analyze
-{
-public :
- File_SubRip();
-
-private :
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
- void Read_Buffer_Continue();
-
- //Temp
- bool IsVTT;
- bool HasBOM;
- #if MEDIAINFO_DEMUX
- struct item
- {
- int64u PTS_Begin;
- int64u PTS_End;
- Ztring Content;
- };
- std::vector<item> Items;
- #endif //MEDIAINFO_DEMUX
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Teletext.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Teletext.cpp
deleted file mode 100644
index b382bfcbc..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Teletext.cpp
+++ /dev/null
@@ -1,619 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_TELETEXT_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_Teletext.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events_Internal.h"
-#endif //MEDIAINFO_EVENTS
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Teletext::File_Teletext()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("Teletext");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Teletext;
- StreamIDs_Width[0]=2;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- PTS_DTS_Needed=true;
- IsRawStream=true;
- MustSynchronize=true;
-
- //In
- #if defined(MEDIAINFO_MPEGPS_YES)
- FromMpegPs=false;
- Parser=NULL;
- #endif
- IsSubtitle=false;
-}
-
-//---------------------------------------------------------------------------
-File_Teletext::~File_Teletext()
-{
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Teletext::Streams_Fill()
-{
-}
-
-//---------------------------------------------------------------------------
-void File_Teletext::Streams_Finish()
-{
- for (streams::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- {
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, StreamPos_Last, Text_Format, IsSubtitle?"Teletext Subtitle":"Teletext");
- Fill(Stream_Text, StreamPos_Last, Text_ID, Ztring::ToZtring(Stream->first, 16));
- }
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Teletext::Synchronize()
-{
- //Synchronizing
- while (Buffer_Offset+3<=Buffer_Size)
- {
- while (Buffer_Offset+3<=Buffer_Size)
- {
- if (Buffer[Buffer_Offset ]==0x55
- && Buffer[Buffer_Offset+1]==0x55
- && Buffer[Buffer_Offset+2]==0x27)
- break; //while()
-
- Buffer_Offset++;
- }
-
- if (Buffer_Offset+3<=Buffer_Size) //Testing if size is coherant
- {
- if (Buffer_Offset+45==Buffer_Size)
- break;
-
- if (Buffer_Offset+45+3>Buffer_Size)
- return false; //Wait for more data
-
- if (Buffer[Buffer_Offset ]==0x55
- && Buffer[Buffer_Offset+1]==0x55
- && Buffer[Buffer_Offset+2]==0x27)
- break; //while()
-
- Buffer_Offset++;
- }
- }
-
- //Must have enough buffer for having header
- if (Buffer_Offset+3>=Buffer_Size)
- return false;
-
- //Synched is OK
- if (!Status[IsAccepted])
- {
- //For the moment, we accept only if the file is in sync, the test is not strict enough
- if (Buffer_Offset)
- {
- Reject();
- return false;
- }
-
- Accept();
- }
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Teletext::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+3>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset ]!=0x55
- || Buffer[Buffer_Offset+1]!=0x55
- || Buffer[Buffer_Offset+2]!=0x27)
- {
- Synched=false;
- return true;
- }
-
- //We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Teletext::Synched_Init()
-{
- //Stream
- Stream_HasChanged=0;
-
- //Temp
- PageNumber=0xFF;
- SubCode=0x3F7F;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Teletext::Read_Buffer_Unsynched()
-{
- for (streams::iterator Stream=Streams.begin(); Stream!=Streams.end(); ++Stream)
- {
- Stream_HasChanged=0;
- for (size_t PosY=0; PosY<26; ++PosY)
- for (size_t PosX=0; PosX<40; ++PosX)
- if (Stream->second.CC_Displayed_Values[PosY][PosX]!=L' ')
- {
- Stream->second.CC_Displayed_Values[PosY][PosX]=L' ';
- Stream_HasChanged=Stream->first;
- }
-
- if (Stream_HasChanged)
- {
- HasChanged();
- Stream_HasChanged=0;
- }
- }
-}
-
-static inline int8u ReverseBits(int8u c)
-{
- // Input: bit order is 76543210
- //Output: bit order is 01234567
- c = (c & 0x0F) << 4 | (c & 0xF0) >> 4;
- c = (c & 0x33) << 2 | (c & 0xCC) >> 2;
- c = (c & 0x55) << 1 | (c & 0xAA) >> 1;
- return c;
-}
-
-//---------------------------------------------------------------------------
-void File_Teletext::Read_Buffer_Continue()
-{
- #if defined(MEDIAINFO_MPEGPS_YES)
- if (FromMpegPs)
- {
- if (!Status[IsAccepted])
- Accept();
-
- Skip_B1( "data_identifier");
- while (Element_Offset<Element_Size)
- {
- int8u data_unit_id, data_unit_length;
- Get_B1 (data_unit_id, "data_unit_id");
- Get_B1 (data_unit_length, "data_unit_length");
- Skip_B1( "field/line");
- if (data_unit_id==0x03 && data_unit_length==0x2C)
- {
- int8u Data[43];
- for (int8u Pos=0; Pos<43; ++Pos)
- Data[Pos]=ReverseBits(Buffer[Buffer_Offset+(size_t)Element_Offset+Pos]);
-
- if (Parser==NULL)
- {
- Parser=new File_Teletext();
- Parser->MustSynchronize=false;
- Open_Buffer_Init(Parser);
- }
- Element_Code=data_unit_id;
- int8u Temp[2];
- Temp[0]=0x55;
- Temp[1]=0x55;
- Demux(Temp, 2, ContentType_MainStream);
- Demux(Data, 43, ContentType_MainStream);
- Open_Buffer_Continue(Parser, Data, 43);
- Element_Offset+=43;
- }
- else
- Skip_XX(data_unit_length-1, "Data");
- }
- }
- #endif
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Teletext::Header_Parse()
-{
- //Parsing
- if (MustSynchronize)
- Skip_B2( "Clock run-in");
- Skip_B1( "Framing code");
-
- //Magazine and Packet Number (for all packets)
- X=0, Y=0;
- bool P1, D1, P2, D2, P3, D3, P4, D4;
- bool B;
- BS_Begin_LE();
- Element_Begin1("Magazine (X or M)");
- Get_TB (P1, "Hamming 8/4");
- Get_TB (D1, "Magazine 0");
- if (D1)
- X|=1<<0;
- Get_TB (P2, "Hamming 8/4");
- Get_TB (D2, "Magazine 1");
- if (D2)
- X|=1<<1;
- Get_TB (P3, "Hamming 8/4");
- Get_TB (D3, "Magazine 2");
- if (D3)
- X|=1<<2;
- Element_Info1(X);
- Element_End0();
- Element_Begin1("Packet Number (Y)");
- Get_TB (P4, "Hamming 8/4");
- Get_TB (D4, "Packet Number 0");
- if (D4)
- Y|=1<<0;
- /*
- {
- //Hamming 8/4
- bool A=P1^D1^D3^D4;
- bool B=D1^P2^D2^D4;
- bool C=D1^D2^P3^D3;
- bool D=P1^D1^P2^D2^P3^D3^P4^D4;
- if (A && B && C && D)
- {
- }
- else
- {
- }
- }
- */
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "Packet Number 1");
- if (B)
- Y|=1<<1;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "Packet Number 2");
- if (B)
- Y|=1<<2;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "Packet Number 3");
- if (B)
- Y|=1<<3;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "Packet Number 4");
- if (B)
- Y|=1<<4;
- if (X==0)
- X=8; // A packet with a magazine value of 0 is referred to as belonging to magazine 8
- Element_Info1(Y);
- Element_End0();
-
- //Page header
- if (Y==0)
- {
- C.reset();
-
- Element_Begin1("Page header");
- int8u PU=0, PT=0;
- bool B;
- Element_Begin1("Page Units");
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "Page Units 0");
- if (B)
- PU|=1<<0;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "Page Units 1");
- if (B)
- PU|=1<<1;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "Page Units 2");
- if (B)
- PU|=1<<2;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "Page Units 3");
- if (B)
- PU|=1<<3;
- Element_Info1(PU);
- Element_End0();
- Element_Begin1("Page Tens");
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "Page Tens 0");
- if (B)
- PT|=1<<0;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "Page Tens 1");
- if (B)
- PT|=1<<1;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "Page Tens 2");
- if (B)
- PT|=1<<2;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "Page Tens 3");
- if (B)
- PT|=1<<3;
- Element_Info1(PT);
- Element_End0();
- PageNumber=(PT<<4)|PU;
- Element_Info1(Ztring::ToZtring(PageNumber, 16));
-
- int8u S1=0, S2=0, S3=0, S4=0;
- Element_Begin1("Page sub-code 1");
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "S1 0");
- if (B)
- S1|=1<<0;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "S1 1");
- if (B)
- S1|=1<<1;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "S1 2");
- if (B)
- S1|=1<<2;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "S1 3");
- if (B)
- S1|=1<<3;
- Element_Info1(S1);
- Element_End0();
- Element_Begin1("Page sub-code 2");
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "S2 0");
- if (B)
- S2|=1<<0;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "S2 1");
- if (B)
- S2|=1<<1;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "S2 2");
- if (B)
- S2|=1<<2;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "C4 - Erase Page");
- if (B)
- C[4]=true;
- Element_Info1(S2);
- Element_End0();
- Element_Begin1("Page sub-code 3");
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "S3 0");
- if (B)
- S3|=1<<0;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "S3 1");
- if (B)
- S3|=1<<1;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "S3 2");
- if (B)
- S3|=1<<2;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "S3 3");
- if (B)
- S3|=1<<3;
- Element_Info1(S3);
- Element_End0();
- Element_Begin1("Page sub-code 4");
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "S4 0");
- if (B)
- S4|=1<<0;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "S4 1");
- if (B)
- S4|=1<<1;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "C5 - Newsflash");
- if (B)
- C[5]=true;
- #if MEDIAINFO_TRACE
- if (B)
- Element_Info1("Newsflash");
- #endif //MEDIAINFO_TRACE
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "C6 - Subtitle");
- if (B)
- C[6]=true;
- Element_Info1(S4);
- Element_End0();
- Element_Begin1("Control bits");
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "C7 - Suppress Header");
- if (B)
- C[7]=true;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "C8 - Update Indicator");
- if (B)
- C[8]=true;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "C9 - Interrupted Sequence");
- if (B)
- C[9]=true;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "C10 - Inhibit Display");
- if (B)
- C[10]=true;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "C11 - Magazine Serial");
- if (B)
- C[11]=true;
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "C12 - Character Subset");
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "C13 - Character Subset");
- Skip_TB( "Hamming 8/4");
- Get_TB (B, "C14 - Character Subset");
- Element_End0();
-
- SubCode=(S4<<12)|(S3<<8)|(S2<<4)|S1;
-
- Element_End0();
- }
- BS_End_LE();
-
- #if MEDIAINFO_TRACE
- if (C[4])
- Element_Info1("Erase Page");
- if (C[5])
- Element_Info1("Newsflash");
- if (C[6])
- Element_Info1("Subtitle");
- if (C[7])
- Element_Info1("Suppress Header");
- if (C[8])
- Element_Info1("Update Indicator");
- if (C[9])
- Element_Info1("Interrupted Sequence");
- if (C[10])
- Element_Info1("Inhibit Display");
- if (C[11])
- Element_Info1("Magazine Serial");
- Element_Info1(Ztring::ToZtring((X<<8)|PageNumber, 16)+__T(':')+Ztring().From_CC2(SubCode));
- Element_Info1(Y);
- #endif // MEDIAINFO_TRACE
-
- Header_Fill_Size(45);
-
- if (Y==0)
- {
- if (Stream_HasChanged)
- {
- HasChanged();
- Stream_HasChanged=0;
- }
-
- if (C[4])
- {
- stream &Stream=Streams[(X<<8)|PageNumber];
- for (size_t PosY=0; PosY<26; ++PosY)
- for (size_t PosX=0; PosX<40; ++PosX)
- if (Stream.CC_Displayed_Values[PosY][PosX]!=L' ')
- {
- Stream.CC_Displayed_Values[PosY][PosX]=L' ';
- Stream_HasChanged=(X<<8)|PageNumber;
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Teletext::Data_Parse()
-{
- if (PageNumber==0xFF)
- {
- Skip_XX(Y?40:32, "Junk");
- }
- else if (Y>=26)
- {
- Skip_XX(40, "Special commands");
- }
- else
- {
- Element_Begin1("Data bytes");
- stream &Stream=Streams[(X<<8)|PageNumber];
- size_t PosX=Y?0:8;
- for (; PosX<40; ++PosX)
- {
- int8u byte;
- Get_B1(byte, "Byte");
- byte&=0x7F;
- if (byte<0x20)
- byte=0x20;
- Param_Info1(Ztring().From_Local((const char*)&byte, 1));
- if (byte!=Stream.CC_Displayed_Values[Y][PosX] && (!C[7] || Y)) // C[7] is "Suppress Header", to be tested when Y==0
- {
- Stream.CC_Displayed_Values[Y][PosX]=byte;
- Stream_HasChanged=(X<<8)|PageNumber;
- }
- }
- Element_End0();
- }
-
- #if MEDIAINFO_TRACE
- if (PageNumber==0xFF)
- {
- Element_Name("Skip");
- }
- else
- {
- Element_Name(Ztring::ToZtring((X<<8)|PageNumber, 16)+__T(':')+Ztring().From_CC2(SubCode));
- Element_Info1(Y);
- if (Y<26)
- {
- Element_Info1(Streams[(X<<8)|PageNumber].CC_Displayed_Values[Y].c_str());
- if (Y==0)
- {
- if (C[4])
- Element_Info1("Erase Page");
- if (C[5])
- Element_Info1("Newsflash");
- if (C[6])
- Element_Info1("Subtitle");
- if (C[7])
- Element_Info1("Suppress Header");
- if (C[8])
- Element_Info1("Update Indicator");
- if (C[9])
- Element_Info1("Interrupted Sequence");
- if (C[10])
- Element_Info1("Inhibit Display");
- if (C[11])
- Element_Info1("Magazine Serial");
- }
- }
- }
- #endif //MEDIAINFO_TRACE
-}
-
-//---------------------------------------------------------------------------
-void File_Teletext::HasChanged()
-{
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_TELETEXT_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Teletext.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Teletext.h
deleted file mode 100644
index b0c4da035..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Teletext.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Teletext streams
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_TeletextH
-#define MediaInfo_File_TeletextH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include <bitset>
-#include <string>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Teletext
-//***************************************************************************
-
-class File_Teletext : public File__Analyze
-{
-public :
- File_Teletext();
- ~File_Teletext();
-
- //In
- #if defined(MEDIAINFO_MPEGPS_YES)
- bool FromMpegPs;
- #endif
- bool IsSubtitle;
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
- void Synched_Init();
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
- void Read_Buffer_Continue();
-
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Character_Fill(wchar_t Character);
- void HasChanged();
-
- //Streams
- struct stream
- {
- vector<std::wstring> CC_Displayed_Values;
-
- stream()
- {
- CC_Displayed_Values.resize(26);
- for (size_t PosY=0; PosY<26; ++PosY)
- CC_Displayed_Values[PosY].resize(40, L' ');
- }
-
- void Clear()
- {
- for (size_t PosY=0; PosY<26; ++PosY)
- for (size_t PosX=0; PosX<40; ++PosX)
- CC_Displayed_Values[PosY][PosX]=L' ';
- }
-
- };
- typedef map<int16u, stream> streams; //Key is Magazine+PageNumber
- streams Streams;
- int16u Stream_HasChanged;
-
- //Temp
- int8u X;
- int8u Y;
- std::bitset<16> C;
- int8u PageNumber;
- int16u SubCode;
- int64u End;
-
- //Ancillary
- #if defined(MEDIAINFO_MPEGPS_YES)
- File_Teletext* Parser;
- #endif
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_TimedText.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_TimedText.cpp
deleted file mode 100644
index 9a0890073..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_TimedText.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_TIMEDTEXT_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_TimedText.h"
-#include "tinyxml2.h"
-using namespace tinyxml2;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_TimedText::File_TimedText()
-{
- //Configuration
- ParserName=__T("Timed Text");
-
- //Temp
- #ifdef MEDIAINFO_MPEG4_YES
- IsChapter=false;
- #endif //MEDIAINFO_MPEG4_YES
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_TimedText::Header_Parse()
-{
- //Parsing
- int16u Size;
- Get_B2 (Size, "Size");
-
- //Filling
- Header_Fill_Code(0, "Block");
- Header_Fill_Size(Element_Offset+Size);
-
- //TODO: if IsChapter, it may be UTF-16 (with BOM), it may also be followed by an encd atom (e.g. for UTF-8 00 00 00 0C 65 6E 63 64 00 00 01 00)
-}
-
-//---------------------------------------------------------------------------
-void File_TimedText::Data_Parse()
-{
- //Parsing
- Ztring Value;
- Get_UTF8 (Element_Size, Value, "Value");
-
- FILLING_BEGIN();
- if (!Status[IsAccepted])
- {
- Accept();
- #ifdef MEDIAINFO_MPEG4_YES
- if (IsChapter)
- {
- Stream_Prepare(Stream_Menu);
- }
- else
- #endif //MEDIAINFO_MPEG4_YES
- {
- Stream_Prepare(Stream_Text);
- }
- Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Format), "Timed Text");
- }
- #ifdef MEDIAINFO_MPEG4_YES
- if (IsChapter)
- {
- }
- else
- #endif //MEDIAINFO_MPEG4_YES
- {
- Finish();
- }
-
- #ifdef MEDIAINFO_MPEG4_YES
- if (IsChapter && FrameInfo.DTS!=(int64u)-1 && Buffer_Offset==2)
- Fill(Stream_Menu, 0, Ztring().Duration_From_Milliseconds(FrameInfo.DTS/1000000).To_UTF8().c_str(), Value);
- #endif //MEDIAINFO_MPEG4_YES
- FILLING_END();
-
- Element_Offset=Buffer_Size-Buffer_Offset; //Buffer can also contain atoms after the text, ignoring them
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_TIMEDTEXT_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_TimedText.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_TimedText.h
deleted file mode 100644
index 31420b4ed..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_TimedText.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Timed Text (MPEG-4 Part 17)
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_TimedTextH
-#define MediaInfo_File_TimedTextH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Sami
-//***************************************************************************
-
-class File_TimedText : public File__Analyze
-{
-public:
- //Constructor/Destructor
- File_TimedText();
-
- #ifdef MEDIAINFO_MPEG4_YES
- bool IsChapter;
- #endif //MEDIAINFO_MPEG4_YES
-
-private :
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Ttml.cpp b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Ttml.cpp
deleted file mode 100644
index 26592d195..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Ttml.cpp
+++ /dev/null
@@ -1,256 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_TTML_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Text/File_Ttml.h"
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
- #include "MediaInfo/MediaInfo_Events_Internal.h"
-#endif //MEDIAINFO_EVENTS
-#include "tinyxml2.h"
-#include <cstring>
-using namespace tinyxml2;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Utils
-//***************************************************************************
-
-int64u Ttml_str2timecode(const char* Value)
-{
- size_t Length=strlen(Value);
- if (Length>=8
- && Value[0]>='0' && Value[0]<='9'
- && Value[1]>='0' && Value[1]<='9'
- && Value[2]==':'
- && Value[3]>='0' && Value[3]<='9'
- && Value[4]>='0' && Value[4]<='9'
- && Value[5]==':'
- && Value[6]>='0' && Value[6]<='9'
- && Value[7]>='0' && Value[7]<='9')
- {
- int64u ToReturn=(int64u)(Value[0]-'0')*10*60*60*1000000000
- +(int64u)(Value[1]-'0') *60*60*1000000000
- +(int64u)(Value[3]-'0') *10*60*1000000000
- +(int64u)(Value[4]-'0') *60*1000000000
- +(int64u)(Value[6]-'0') *10*1000000000
- +(int64u)(Value[7]-'0') *1000000000;
- if (Length>=9 && (Value[8]=='.' || Value[8]==','))
- {
- if (Length>9+9)
- Length=9+9; //Nanoseconds max
- const char* Value_End=Value+Length;
- Value+=9;
- int64u Multiplier=100000000;
- while (Value<Value_End)
- {
- ToReturn+=(int64u)(*Value-'0')*Multiplier;
- Multiplier/=10;
- Value++;
- }
- }
-
- return ToReturn;
- }
- else if (Length>=2
- && Value[Length-1]=='s')
- {
- return (int64u)(atof(Value)*1000000000);
- }
- else
- return (int64u)-1;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Ttml::File_Ttml()
-:File__Analyze()
-{
- //Configuration
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Ttml;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
-
- //Init
- Frame_Count=0;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ttml::Streams_Accept()
-{
- Fill(Stream_General, 0, General_Format, "TTML");
-
- Stream_Prepare(Stream_Text);
- Fill(Stream_Text, 0, "Format", "TTML");
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ttml::Read_Buffer_Unsynched()
-{
- GoTo(0);
-}
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_SEEK
-size_t File_Ttml::Read_Buffer_Seek (size_t Method, int64u Value, int64u ID)
-{
- Open_Buffer_Unsynch();
- return 1;
-}
-#endif //MEDIAINFO_SEEK
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Ttml::FileHeader_Begin()
-{
- //All should be OK...
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Ttml::Read_Buffer_Continue()
-{
- tinyxml2::XMLDocument document;
-
- if (!FileHeader_Begin_XML(document))
- return;
-
- XMLElement* Root=document.FirstChildElement("tt");
- if (!Root)
- {
- Reject();
- return;
- }
-
- if (!Status[IsAccepted])
- {
- Accept();
-
- #if MEDIAINFO_EVENTS
- MuxingMode=(int8u)-1;
- if (StreamIDs_Size>=2 && ParserIDs[StreamIDs_Size-2]==MediaInfo_Parser_Mpeg4)
- MuxingMode=11; //MPEG-4
- if (StreamIDs_Size>2 && ParserIDs[StreamIDs_Size-2]==MediaInfo_Parser_Mxf) //Only if referenced MXF
- MuxingMode=13; //MXF
- #endif //MEDIAINFO_EVENTS
-
- #if MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- if (Config->NextPacket_Get() && Config->Event_CallBackFunction_IsSet())
- return; // Waiting for NextPacket
- #endif //MEDIAINFO_DEMUX && MEDIAINFO_NEXTPACKET
- }
-
- tinyxml2::XMLElement* div=NULL;
- #if MEDIAINFO_EVENTS
- tinyxml2::XMLElement* p=NULL;
- #endif //MEDIAINFO_EVENTS
- for (XMLElement* tt_element=Root->FirstChildElement(); tt_element; tt_element=tt_element->NextSiblingElement())
- {
- //body
- if (!strcmp(tt_element->Value(), "body"))
- {
- for (XMLElement* body_element=tt_element->FirstChildElement(); body_element; body_element=body_element->NextSiblingElement())
- {
- //div
- if (!strcmp(body_element->Value(), "div"))
- {
- for (XMLElement* div_element=body_element->FirstChildElement(); div_element; div_element=div_element->NextSiblingElement())
- {
- //p
- if (!strcmp(div_element->Value(), "p"))
- {
- div=body_element;
- #if MEDIAINFO_EVENTS
- p=div_element;
- #endif //MEDIAINFO_EVENTS
- break;
- }
- }
-
- if (div)
- break;
- }
- }
-
- if (div)
- break;
- }
- }
-
- #if MEDIAINFO_DEMUX
- Demux(Buffer, Buffer_Size, ContentType_MainStream);
- #endif //MEDIAINFO_DEMUX
-
- // Output
- #if MEDIAINFO_EVENTS
- for (; p; p=p->NextSiblingElement())
- {
- //p
- if (!strcmp(p->Value(), "p"))
- {
- const char* Attribute;
-
- int64u DTS_Begin=(int64u)-1;
- Attribute=p->Attribute("begin");
- if (Attribute)
- DTS_Begin=Ttml_str2timecode(Attribute);
- int64u DTS_End=(int64u)-1;
- Attribute=p->Attribute("end");
- if (Attribute)
- DTS_End=Ttml_str2timecode(Attribute);
- string ContentUtf8;
- XMLPrinter printer;
- p->Accept(&printer);
- ContentUtf8+=printer.CStr();
- while (!ContentUtf8.empty() && (ContentUtf8[ContentUtf8.size()-1]=='\r' || ContentUtf8[ContentUtf8.size()-1]=='\n'))
- ContentUtf8.resize(ContentUtf8.size()-1);
- Ztring Content; if (p->FirstChild()) Content.From_UTF8(p->FirstChild()->Value());
- Frame_Count++;
- }
- }
- #endif //MEDIAINFO_EVENTS
-
- Buffer_Offset=Buffer_Size;
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_TTML_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Ttml.h b/src/thirdparty/MediaInfo/MediaInfo/Text/File_Ttml.h
deleted file mode 100644
index d4e9f5606..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Text/File_Ttml.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about TTML files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_TtmlH
-#define MediaInfo_File_TtmlH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace tinyxml2
-{
- class XMLDocument;
- class XMLElement;
-}
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Sami
-//***************************************************************************
-
-class File_Ttml : public File__Analyze
-{
-public :
- File_Ttml();
-
- #if MEDIAINFO_EVENTS
- int8u MuxingMode;
- #endif //MEDIAINFO_EVENTS
-
-private :
- //Streams management
- void Streams_Accept();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
- #if MEDIAINFO_SEEK
- size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
- #endif //MEDIAINFO_SEEK
- void Read_Buffer_Continue();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/TimeCode.cpp b/src/thirdparty/MediaInfo/MediaInfo/TimeCode.cpp
deleted file mode 100644
index a8c6a0796..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/TimeCode.cpp
+++ /dev/null
@@ -1,229 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/TimeCode.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-TimeCode::TimeCode ()
-: Hours((int8u)-1),
- Minutes((int8u)-1),
- Seconds((int8u)-1),
- Frames((int8u)-1),
- FramesPerSecond(0),
- DropFrame(false),
- MustUseSecondField(false),
- IsSecondField(false),
- IsNegative(false)
-{
-}
-
-//---------------------------------------------------------------------------
-TimeCode::TimeCode (int8u Hours_, int8u Minutes_, int8u Seconds_, int8u Frames_, int8u FramesPerSecond_, bool DropFrame_, bool MustUseSecondField_, bool IsSecondField_)
-: Hours(Hours_),
- Minutes(Minutes_),
- Seconds(Seconds_),
- Frames(Frames_),
- FramesPerSecond(FramesPerSecond_),
- DropFrame(DropFrame_),
- MustUseSecondField(MustUseSecondField_),
- IsSecondField(IsSecondField_),
- IsNegative(false)
-{
-}
-
-//---------------------------------------------------------------------------
-TimeCode::TimeCode (int64s Frames_, int8u FramesPerSecond_, bool DropFrame_, bool MustUseSecondField_, bool IsSecondField_)
-: FramesPerSecond(FramesPerSecond_),
- DropFrame(DropFrame_),
- MustUseSecondField(MustUseSecondField_),
- IsSecondField(IsSecondField_)
-{
- if (Frames_<0)
- {
- IsNegative=true;
- Frames_=-Frames_;
- }
- else
- IsNegative=false;
-
- int8u Dropped=0;
- if (DropFrame_)
- {
- Dropped=2;
- if (FramesPerSecond_>30)
- Dropped+=2;
- if (FramesPerSecond_>60)
- Dropped+=2;
- if (FramesPerSecond_>90)
- Dropped+=2;
- if (FramesPerSecond_>120)
- Dropped+=2;
- }
-
- int64u Minutes_Tens = Frames_/(600*FramesPerSecond_-Dropped*9); //Count of 10 minutes
- int64u Minutes_Units = (Frames_-Minutes_Tens*(600*FramesPerSecond_-Dropped*9))/(60*FramesPerSecond_-Dropped);
-
- Frames_ += 9*Dropped*Minutes_Tens+Dropped*Minutes_Units;
- if (Minutes_Units && ((Frames_/FramesPerSecond_)%60)==0 && (Frames_%FramesPerSecond_)<Dropped) // If Minutes_Tens is not 0 (drop) but count of remaining seconds is 0 and count of remaining frames is less than 2, 1 additional drop was actually counted, removing it
- Frames_-=Dropped;
-
- Frames = Frames_ % FramesPerSecond_;
- Seconds = (Frames_ / FramesPerSecond_) % 60;
- Minutes = ((Frames_ / FramesPerSecond_) / 60) % 60;
- Hours = (((Frames_ / FramesPerSecond_) / 60) / 60) % 24;
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void TimeCode::PlusOne()
-{
- //TODO: negative values
-
- if (FramesPerSecond==0)
- return;
- if (MustUseSecondField)
- {
- if (IsSecondField)
- {
- Frames++;
- IsSecondField=false;
- }
- else
- IsSecondField=true;
- }
- else
- Frames++;
- if (Frames>=FramesPerSecond)
- {
- Seconds++;
- Frames=0;
- if (Seconds>=60)
- {
- Seconds=0;
- Minutes++;
-
- if (DropFrame && Minutes%10)
- Frames=2; //frames 0 and 1 are dropped for every minutes except 00 10 20 30 40 50
-
- if (Minutes>=60)
- {
- Minutes=0;
- Hours++;
- if (Hours>=24)
- {
- Hours=0;
- }
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void TimeCode::MinusOne()
-{
- //TODO: negative values
-
- if (FramesPerSecond==0)
- return;
- if (MustUseSecondField && IsSecondField)
- IsSecondField=false;
- else
- {
- if (Frames==0 || (DropFrame && Minutes%10 && Frames<=2))
- {
- Frames=FramesPerSecond;
- if (Seconds==0)
- {
- Seconds=60;
- if (Minutes==0)
- {
- Minutes=60;
- if (Hours==0)
- Hours=24;
- Hours--;
- }
- Minutes--;
- }
- Seconds--;
- }
- Frames--;
-
- if (MustUseSecondField)
- IsSecondField=true;
- }
-}
-
-//---------------------------------------------------------------------------
-string TimeCode::ToString()
-{
- string TC;
- if (IsNegative)
- TC+='-';
- TC+=('0'+Hours/10);
- TC+=('0'+Hours%10);
- TC+=':';
- TC+=('0'+Minutes/10);
- TC+=('0'+Minutes%10);
- TC+=':';
- TC+=('0'+Seconds/10);
- TC+=('0'+Seconds%10);
- TC+=DropFrame?';':':';
- TC+=('0'+Frames/10);
- TC+=('0'+Frames%10);
-
- return TC;
-}
-
-//---------------------------------------------------------------------------
-int64s TimeCode::ToFrames()
-{
- if (!FramesPerSecond)
- return 0;
-
- int64s TC=(int64s(Hours) *3600
- + int64s(Minutes) * 60
- + int64s(Seconds) )*int64s(FramesPerSecond)
- + int64s(Frames);
-
- if (DropFrame)
- {
- TC-= int64s(Hours) *108
- + (int64s(Minutes)/10)*18
- + (int64s(Minutes)%10)*2;
- }
-
- return IsNegative?-TC:TC;
-}
-
-//***************************************************************************
-//
-//***************************************************************************
-
-} //NameSpace
diff --git a/src/thirdparty/MediaInfo/MediaInfo/TimeCode.h b/src/thirdparty/MediaInfo/MediaInfo/TimeCode.h
deleted file mode 100644
index 0e8d48253..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/TimeCode.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_TimeCodeH
-#define MediaInfo_TimeCodeH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Unknown
-//***************************************************************************
-
-class TimeCode
-{
-public:
- //constructor/Destructor
- TimeCode ();
- TimeCode (int8u Hours, int8u Minutes, int8u Seconds, int8u Frames, int8u FramesPerSecond, bool DropFrame, bool MustUseSecondField=false, bool IsSecondField=false);
- TimeCode (int64s Frames, int8u FramesPerSecond, bool DropFrame, bool MustUseSecondField=false, bool IsSecondField_=false);
-
- //Operators
- TimeCode &operator ++()
- {
- PlusOne();
- return *this;
- }
- TimeCode operator ++(int)
- {
- PlusOne();
- return *this;
- }
- TimeCode &operator --()
- {
- MinusOne();
- return *this;
- }
- TimeCode operator --(int)
- {
- MinusOne();
- return *this;
- }
- bool operator== (const TimeCode &tc) const
- {
- return Hours ==tc.Hours
- && Minutes ==tc.Minutes
- && Seconds ==tc.Seconds
- && Frames ==tc.Frames
- && FramesPerSecond ==tc.FramesPerSecond
- && DropFrame ==tc.DropFrame
- && MustUseSecondField ==tc.MustUseSecondField
- && IsSecondField ==tc.IsSecondField;
- }
- bool operator!= (const TimeCode &tc) const
- {
- return Hours !=tc.Hours
- || Minutes !=tc.Minutes
- || Seconds !=tc.Seconds
- || Frames !=tc.Frames
- || FramesPerSecond !=tc.FramesPerSecond
- || DropFrame !=tc.DropFrame
- || MustUseSecondField !=tc.MustUseSecondField
- || IsSecondField !=tc.IsSecondField;
- }
-
- //Helpers
- bool IsValid() const
- {
- return FramesPerSecond?true:false;
- }
- void PlusOne();
- void MinusOne();
- string ToString();
- int64s ToFrames();
-
-public:
- int8u Hours;
- int8u Minutes;
- int8u Seconds;
- int8u Frames;
- int8u FramesPerSecond;
- bool DropFrame;
- bool MustUseSecondField;
- bool IsSecondField;
- bool IsNegative;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_AfdBarData.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_AfdBarData.cpp
deleted file mode 100644
index 7f87e7443..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_AfdBarData.cpp
+++ /dev/null
@@ -1,355 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AFDBARDATA_YES) || defined(MEDIAINFO_MXF_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-namespace MediaInfoLib
-{
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* AfdBarData_active_format[]=
-{
- //1st value is for 4:3, 2nd is for 16:9
- "", //Undefined
- "Reserved",
- "Not recommended",
- "Not recommended",
- "Aspect ratio greater than 16:9", //Use GA94
- "Reserved",
- "Reserved",
- "Reserved",
- "4:3 full frame image / 16:9 full frame image",
- "4:3 full frame image / 4:3 pillarbox image",
- "16:9 letterbox image / 16:9 full frame image",
- "14:9 letterbox image / 14:9 pillarbox image",
- "Reserved",
- "4:3 full frame image, alternative 14:9 center / 4:3 pillarbox image, alternative 14:9 center",
- "16:9 letterbox image, alternative 14:9 center / 16:9 full frame image, alternative 14:9 center",
- "16:9 letterbox image, alternative 4:3 center / 16:9 full frame image, alternative 4:3 center",
-};
-
-//---------------------------------------------------------------------------
-const char* AfdBarData_active_format_4_3[]=
-{
- "", //Undefined
- "Reserved",
- "Letterbox 16:9 image (top)",
- "Letterbox 14:9 image (top)",
- "Letterbox image with an aspect ratio greater than 16:9",
- "Reserved",
- "Reserved",
- "Reserved",
- "Full frame 4:3 image",
- "Full frame 4:3 image",
- "Letterbox 16:9 image",
- "Letterbox 14:9 image",
- "Reserved",
- "Full frame 4:3 image, with alternative 14:9 center",
- "Letterbox 16:9 image, with alternative 14:9 center",
- "Letterbox 16:9 image, with alternative 4:3 center",
-};
-
-//---------------------------------------------------------------------------
-const char* AfdBarData_active_format_16_9[]=
-{
- "", //Undefined
- "Reserved",
- "Letterbox 16:9 image (top)",
- "Pillarbox 14:9 image (top)",
- "Letterbox image with an aspect ratio greater than 16:9",
- "Reserved",
- "Reserved",
- "Reserved",
- "Full frame 16:9 image",
- "Pillarbox 4:3 image",
- "Letterbox 16:9 image",
- "Pillarbox 14:9 image",
- "Reserved",
- "Full frame 4:3 image, with alternative 14:9 center",
- "Letterbox 16:9 image, with alternative 14:9 center",
- "Letterbox 16:9 image, with alternative 4:3 center",
-};
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //defined(MEDIAINFO_AFDBARDATA_YES) || defined(MEDIAINFO_MXF_YES)
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AFDBARDATA_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_AfdBarData.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-namespace MediaInfoLib
-{
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* AfdBarData_aspect_ratio[]=
-{
- "4:3",
- "16:9",
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_AfdBarData::File_AfdBarData()
-:File__Analyze()
-{
- //Configuration
- PTS_DTS_Needed=true;
-
- //In
- Format=Format_Unknown;
- aspect_ratio_FromContainer=(int8u)-1;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_AfdBarData::Streams_Fill()
-{
- //Filling
- Stream_Prepare(Stream_Video);
- if (active_format!=(int8u)-1)
- {
- Fill(Stream_Video, 0, Video_ActiveFormatDescription, Stream.active_format);
- if (aspect_ratio==(int8u)-1)
- aspect_ratio=aspect_ratio_FromContainer;
- if (aspect_ratio!=(int8u)-1)
- {
- Fill(Stream_Video, 0, Video_ActiveFormatDescription_String, Stream.aspect_ratio?AfdBarData_active_format_16_9[Stream.active_format]:AfdBarData_active_format_4_3[Stream.active_format]);
- switch (Format)
- {
- case Format_A53_4_DTG1 : Fill(Stream_Video, 0, Video_ActiveFormatDescription_MuxingMode, "A/53"); break;
- case Format_S2016_3 : Fill(Stream_Video, 0, Video_ActiveFormatDescription_MuxingMode, "SMPTE ST 2016-3"); break;
- default :
- Skip_XX(Element_Size, "Unknown");
- return;
- }
- }
- }
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_AfdBarData::Read_Buffer_Continue()
-{
- //Default
- line_number_end_of_top_bar=(int16u)-1;
- line_number_start_of_bottom_bar=(int16u)-1;
- pixel_number_end_of_left_bar=(int16u)-1;
- pixel_number_start_of_right_bar=(int16u)-1;
- active_format=(int8u)-1;
- aspect_ratio=(int8u)-1;
-
- //Parsing
- switch (Format)
- {
- case Format_A53_4_DTG1 :
- afd_data();
- break;
- case Format_A53_4_GA94_06 :
- bar_data();
- break;
- case Format_S2016_3 :
- afd_data();
- Skip_B1( "Reserved");
- Skip_B1( "Reserved");
- bar_data();
- break;
- default :
- Skip_XX(Element_Size, "Unknown");
- return;
- }
-
- FILLING_BEGIN();
- //Filling
- Stream.line_number_end_of_top_bar=line_number_end_of_top_bar;
- Stream.line_number_start_of_bottom_bar=line_number_start_of_bottom_bar;
- Stream.pixel_number_end_of_left_bar=pixel_number_end_of_left_bar;
- Stream.pixel_number_start_of_right_bar=pixel_number_start_of_right_bar;
- Stream.active_format=active_format;
- Stream.aspect_ratio=aspect_ratio;
-
- if (!Status[IsAccepted])
- {
- Accept("AfdBarData");
- Fill("AfdBarData");
- }
- if (MediaInfoLib::Config.ParseSpeed_Get()<1)
- Finish("AfdBarData");
- FILLING_END();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_AfdBarData::afd_data()
-{
- //Parsing
- Element_Begin1("Active Format Description");
- BS_Begin();
- if (Format==Format_S2016_3)
- {
- Mark_0_NoTrustError();
- Get_S1 (4, active_format, "active_format"); Param_Info1(AfdBarData_active_format[active_format]);
- Get_S1 (1, aspect_ratio, "aspect_ratio"); Param_Info1(AfdBarData_aspect_ratio[aspect_ratio]);
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- }
- else
- {
- bool active_format_flag;
- Mark_0();
- Get_SB (active_format_flag, "active_format_flag");
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_1_NoTrustError();
- if (active_format_flag)
- {
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Get_S1 (4, active_format, "active_format"); Param_Info1(AfdBarData_active_format[active_format]);
- }
- }
- BS_End();
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_AfdBarData::bar_data()
-{
- //Parsing
- Element_Begin1("bar_data");
- bool top_bar_flag, bottom_bar_flag, left_bar_flag, right_bar_flag;
- BS_Begin();
- Get_SB (top_bar_flag, "top_bar_flag");
- Get_SB (bottom_bar_flag, "bottom_bar_flag");
- Get_SB (left_bar_flag, "left_bar_flag");
- Get_SB (right_bar_flag, "right_bar_flag");
- if (Format==Format_S2016_3)
- {
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- }
- else
- {
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- }
- if (top_bar_flag)
- {
- Mark_1();
- Mark_1();
- Get_S2 (14, line_number_end_of_top_bar, "line_number_end_of_top_bar");
- }
- if (bottom_bar_flag)
- {
- Mark_1();
- Mark_1();
- Get_S2 (14, line_number_start_of_bottom_bar, "line_number_start_of_bottom_bar");
- }
- if (left_bar_flag)
- {
- Mark_1();
- Mark_1();
- Get_S2 (14, pixel_number_end_of_left_bar, "pixel_number_end_of_left_bar");
- }
- if (right_bar_flag)
- {
- Mark_1();
- Mark_1();
- Get_S2 (14, pixel_number_start_of_right_bar, "pixel_number_start_of_right_bar");
- }
- if (!top_bar_flag && !bottom_bar_flag && !left_bar_flag && !right_bar_flag)
- {
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Skip_S2(14, "reserved");
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Skip_S2(14, "reserved");
- }
- BS_End();
- Element_End0();
-
- if (Format==Format_A53_4_DTG1)
- {
- BS_Begin();
- Mark_1();
- Mark_1();
- Mark_1();
- Mark_1();
- Mark_1();
- Mark_1();
- Mark_1();
- Mark_1();
- BS_End();
-
- if (Element_Size-Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "additional_bar_data");
- }
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_AFDBARDATA_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_AfdBarData.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_AfdBarData.h
deleted file mode 100644
index 05c145f4f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_AfdBarData.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about AFD and Bar Data files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_AfdBarDataH
-#define MediaInfo_AfdBarDataH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_AfdBarData
-//***************************************************************************
-
-class File_AfdBarData : public File__Analyze
-{
-public :
- //In
- enum format
- {
- Format_Unknown,
- Format_A53_4_DTG1, //Active Format Description
- Format_A53_4_GA94_06, //Bar Data
- Format_S2016_3, //Active Format Description & Bar Data
- };
- format Format;
- int8u aspect_ratio_FromContainer; //May come from the containing parser
-
- //Constructor/Destructor
- File_AfdBarData();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Global
- void Read_Buffer_Continue();
-
- //Elements
- void afd_data();
- void bar_data();
-
- //Sream
- struct stream
- {
- int16u line_number_end_of_top_bar;
- int16u line_number_start_of_bottom_bar;
- int16u pixel_number_end_of_left_bar;
- int16u pixel_number_start_of_right_bar;
- int8u active_format;
- int8u aspect_ratio;
-
- stream()
- {
- line_number_end_of_top_bar=(int16u)-1;
- line_number_start_of_bottom_bar=(int16u)-1;
- pixel_number_end_of_left_bar=(int16u)-1;
- pixel_number_start_of_right_bar=(int16u)-1;
- active_format=(int8u)-1;
- aspect_ratio=(int8u)-1;
- }
- };
- stream Stream;
-
- //Temp
- int16u line_number_end_of_top_bar;
- int16u line_number_start_of_bottom_bar;
- int16u pixel_number_end_of_left_bar;
- int16u pixel_number_start_of_right_bar;
- int8u active_format;
- int8u aspect_ratio;
-};
-
-} //NameSpace
-
-#endif
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Aic.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Aic.cpp
deleted file mode 100644
index c9a80b67d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Aic.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AIC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Aic.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aic::Streams_Fill()
-{
- //Filling
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "AIC");
- Fill(Stream_Video, 0, Video_Width, Width);
- Fill(Stream_Video, 0, Video_Height, Height);
- Fill(Stream_Video, 0, Video_BitDepth, 8);
- //Fill(Stream_Video, 0, Video_ColorSpace, "YUV");
- //Fill(Stream_Video, 0, Video_ChromaSubsampling, "4:2:0");
- switch (FieldFrame)
- {
- case 0 : Fill(Stream_Video, 0, Video_ScanType, "Progressive"); break;
- case 3 : Fill(Stream_Video, 0, Video_ScanType, "Interlaced"); break;
- default: ;
- }
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Aic::Header_Parse()
-{
- //Parsing
- int32u Size;
- int16u Sync;
- Get_B2 (Sync, "Sync");
- Get_B4 (Size, "Size");
- if (Sync!=0x0116 || Size<24 || Size!=Buffer_Size)
- {
- Reject("AIC");
- return;
- }
- Get_B2 (Width, "Width");
- Get_B2 (Height, "Height");
- Skip_B2( "Width again?");
- Skip_B2( "Height again?");
- Skip_B2( "Unknown");
- BS_Begin();
- Get_S1 (4, FieldFrame, "field/Frame info?");
- Skip_S1(4, "Unknown");
- Skip_S1(4, "Unknown");
- Skip_S1(4, "Unknown");
- BS_End();
- Skip_B3( "Unknown");
- Skip_B3( "Unknown");
-
- Header_Fill_Code(0, "Frame");
- Header_Fill_Size(Size);
-}
-
-//---------------------------------------------------------------------------
-void File_Aic::Data_Parse()
-{
- //Parsing
- Skip_XX(Element_Size, "Data");
-
- FILLING_BEGIN();
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- if (!Status[IsFilled])
- {
- Accept("AIC");
- Finish("AIC");
- }
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_AIC_*
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Aic.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Aic.h
deleted file mode 100644
index 985e8761b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Aic.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Apple Intermediate Codec video streams
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_AicH
-#define MediaInfo_AicH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Aic
-//***************************************************************************
-
-class File_Aic : public File__Analyze
-{
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Per element
- void Header_Parse ();
- void Data_Parse ();
-
- //Temp
- int16u Width;
- int16u Height;
- int8u FieldFrame;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Avc.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Avc.cpp
deleted file mode 100644
index 32f932371..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Avc.cpp
+++ /dev/null
@@ -1,3951 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AVC_YES) || defined(MEDIAINFO_MPEGPS_YES) || defined(MEDIAINFO_MPEGTS_YES)
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-#include "ZenLib/Conf.h"
-using namespace ZenLib;
-
-//---------------------------------------------------------------------------
-const char* Avc_profile_idc(int8u profile_idc)
-{
- switch (profile_idc)
- {
- case 44 : return "CAVLC 4:4:4 Intra";
- case 66 : return "Baseline";
- case 77 : return "Main";
- case 83 : return "Scalable Baseline";
- case 86 : return "Scalable High";
- case 88 : return "Extended";
- case 100 : return "High";
- case 110 : return "High 10";
- case 118 : return "Multiview High";
- case 122 : return "High 4:2:2";
- case 128 : return "Stereo High";
- case 138 : return "Multiview Depth High";
- case 144 : return "High 4:4:4";
- case 244 : return "High 4:4:4 Predictive";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-} //NameSpace
-
-//---------------------------------------------------------------------------
-#endif //...
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-//
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AVC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Avc.h"
-#if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- #include "MediaInfo/Text/File_DtvccTransport.h"
-#endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
-#if MEDIAINFO_ADVANCED2
- #include "base64.h"
-#endif //MEDIAINFO_ADVANCED2
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
- #include "MediaInfo/MediaInfo_Events.h"
- #include "MediaInfo/MediaInfo_Events_Internal.h"
-#endif //MEDIAINFO_EVENTS
-#include <cstring>
-#include <algorithm>
-using namespace std;
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const size_t Avc_Errors_MaxCount=32;
-
-//---------------------------------------------------------------------------
-extern const int8u Avc_PixelAspectRatio_Size=17;
-extern const float32 Avc_PixelAspectRatio[Avc_PixelAspectRatio_Size]=
-{
- (float32)1, //Reserved
- (float32)1,
- (float32)12/(float32)11,
- (float32)10/(float32)11,
- (float32)16/(float32)11,
- (float32)40/(float32)33,
- (float32)24/(float32)11,
- (float32)20/(float32)11,
- (float32)32/(float32)11,
- (float32)80/(float32)33,
- (float32)18/(float32)11,
- (float32)15/(float32)11,
- (float32)64/(float32)33,
- (float32)160/(float32)99,
- (float32)4/(float32)3,
- (float32)3/(float32)2,
- (float32)2,
-};
-
-//---------------------------------------------------------------------------
-extern const char* Avc_video_format[]=
-{
- "Component",
- "PAL",
- "NTSC",
- "SECAM",
- "MAC",
- "",
- "Reserved",
- "Reserved",
-};
-
-//---------------------------------------------------------------------------
-extern const char* Avc_video_full_range[]=
-{
- "Limited",
- "Full",
-};
-
-//---------------------------------------------------------------------------
-const char* Avc_primary_pic_type[]=
-{
- "I",
- "I, P",
- "I, P, B",
- "SI",
- "SI, SP",
- "I, SI",
- "I, SI, P, SP",
- "I, SI, P, SP, B",
-};
-
-//---------------------------------------------------------------------------
-const char* Avc_slice_type[]=
-{
- "P",
- "B",
- "I",
- "SP",
- "SI",
- "P",
- "B",
- "I",
- "SP",
- "SI",
-};
-
-//---------------------------------------------------------------------------
-const int8u Avc_pic_struct_Size=9;
-const char* Avc_pic_struct[]=
-{
- "frame",
- "top field",
- "bottom field",
- "top field, bottom field",
- "bottom field, top field",
- "top field, bottom field, top field repeated",
- "bottom field, top field, bottom field repeated",
- "frame doubling",
- "frame tripling",
-};
-
-//---------------------------------------------------------------------------
-const int8u Avc_NumClockTS[]=
-{
- 1,
- 1,
- 1,
- 2,
- 2,
- 3,
- 3,
- 2,
- 3,
-};
-
-//---------------------------------------------------------------------------
-const char* Avc_ct_type[]=
-{
- "Progressive",
- "Interlaced",
- "Unknown",
- "Reserved",
-};
-
-//---------------------------------------------------------------------------
-const char* Avc_Colorimetry_format_idc[]=
-{
- "monochrome",
- "4:2:0",
- "4:2:2",
- "4:4:4",
-};
-
-//---------------------------------------------------------------------------
-const int8u Avc_SubWidthC[]=
-{
- 1,
- 2,
- 2,
- 1,
-};
-
-//---------------------------------------------------------------------------
-const int8u Avc_SubHeightC[]=
-{
- 1,
- 2,
- 1,
- 1,
-};
-
-//---------------------------------------------------------------------------
-const char* Avc_user_data_DTG1_active_format[]=
-{
- //1st value is for 4:3, 2nd is for 16:9
- "", //Undefined
- "Reserved",
- "Not recommended",
- "Not recommended",
- "Aspect ratio greater than 16:9", //Use GA94
- "Reserved",
- "Reserved",
- "Reserved",
- "4:3 full frame image / 16:9 full frame image",
- "4:3 full frame image / 4:3 pillarbox image",
- "16:9 letterbox image / 16:9 full frame image",
- "14:9 letterbox image / 14:9 pillarbox image",
- "Reserved",
- "4:3 full frame image, alternative 14:9 center / 4:3 pillarbox image, alternative 14:9 center",
- "16:9 letterbox image, alternative 14:9 center / 16:9 full frame image, alternative 14:9 center",
- "16:9 letterbox image, alternative 4:3 center / 16:9 full frame image, alternative 4:3 center",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpegv_colour_primaries(int8u colour_primaries);
-const char* Mpegv_transfer_characteristics(int8u transfer_characteristics);
-const char* Mpegv_matrix_coefficients(int8u matrix_coefficients);
-
-//---------------------------------------------------------------------------
-const char* Avc_user_data_GA94_cc_type(int8u cc_type)
-{
- switch (cc_type)
- {
- case 0 : return "CEA-608 line 21 field 1 closed captions"; //closed caption 3 if this is second field
- case 1 : return "CEA-608 line 21 field 2 closed captions"; //closed caption 4 if this is second field
- case 2 : return "DTVCC Channel Packet Data";
- case 3 : return "DTVCC Channel Packet Start";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-int32u Avc_MaxDpbMbs(int8u level)
-{
- switch (level)
- {
- case 10 : return 1485;
- case 11 : return 3000;
- case 12 : return 6000;
- case 13 :
- case 20 : return 11880;
- case 21 : return 19800;
- case 22 : return 20250;
- case 30 : return 40500;
- case 31 : return 108000;
- case 32 : return 216000;
- case 40 :
- case 41 : return 245760;
- case 42 : return 522240;
- case 50 : return 589824;
- case 51 : return 983040;
- default : return 0;
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Avc::File_Avc()
-#if MEDIAINFO_DUPLICATE
-:File__Duplicate()
-#endif //MEDIAINFO_DUPLICATE
-{
- //Config
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Avc;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
- PTS_DTS_Needed=true;
- IsRawStream=true;
- Frame_Count_NotParsedIncluded=0;
-
- //In
- Frame_Count_Valid=MediaInfoLib::Config.ParseSpeed_Get()>=0.3?512:2;
- FrameIsAlwaysComplete=false;
- MustParse_SPS_PPS=false;
- SizedBlocks=false;
-
- //Temporal references
- TemporalReferences_DelayedElement=NULL;
-
- //Text
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- GA94_03_Parser=NULL;
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
-}
-
-//---------------------------------------------------------------------------
-File_Avc::~File_Avc()
-{
- for (size_t Pos=0; Pos<TemporalReferences.size(); Pos++)
- delete TemporalReferences[Pos]; //TemporalReferences[Pos]=NULL;
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- delete GA94_03_Parser; //GA94_03_Parser=NULL;
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
-
- for (size_t Pos=0; Pos<seq_parameter_sets.size(); Pos++)
- delete seq_parameter_sets[Pos]; //TemporalReferences[Pos]=NULL;
-
- for (size_t Pos=0; Pos<subset_seq_parameter_sets.size(); Pos++)
- delete subset_seq_parameter_sets[Pos]; //TemporalReferences[Pos]=NULL;
-
- for (size_t Pos=0; Pos<pic_parameter_sets.size(); Pos++)
- delete pic_parameter_sets[Pos]; //TemporalReferences[Pos]=NULL;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Avc::Streams_Fill()
-{
- for (std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item=seq_parameter_sets.begin(); seq_parameter_set_Item!=seq_parameter_sets.end(); ++seq_parameter_set_Item)
- if ((*seq_parameter_set_Item))
- Streams_Fill(seq_parameter_set_Item);
- for (std::vector<seq_parameter_set_struct*>::iterator subset_seq_parameter_set_Item=subset_seq_parameter_sets.begin(); subset_seq_parameter_set_Item!=subset_seq_parameter_sets.end(); ++subset_seq_parameter_set_Item)
- if ((*subset_seq_parameter_set_Item))
- {
- if (seq_parameter_sets.empty())
- Streams_Fill(subset_seq_parameter_set_Item);
- else
- Streams_Fill_subset(subset_seq_parameter_set_Item);
- Fill(Stream_Video, 0, Video_MultiView_Count, (*subset_seq_parameter_set_Item)->num_views_minus1+1);
- }
-
- #if MEDIAINFO_ADVANCED2
- for (size_t Pos = 0; Pos<Dump_SPS.size(); Pos++)
- Fill(Stream_Video, 0, "Dump_seq_parameter_set", Dump_SPS[Pos].c_str());
- for (size_t Pos = 0; Pos<Dump_PPS.size(); Pos++)
- Fill(Stream_Video, 0, "Dump_pic_parameter_set", Dump_PPS[Pos].c_str());
- #endif //MEDIAINFO_ADVANCED2
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::Streams_Fill(std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item)
-{
- //Calculating - Pixels
- int32u Width =((*seq_parameter_set_Item)->pic_width_in_mbs_minus1 +1)*16;
- int32u Height=((*seq_parameter_set_Item)->pic_height_in_map_units_minus1+1)*16*(2-(*seq_parameter_set_Item)->frame_mbs_only_flag);
- int32u CropUnitX=Avc_SubWidthC [(*seq_parameter_set_Item)->ChromaArrayType()];
- int32u CropUnitY=Avc_SubHeightC[(*seq_parameter_set_Item)->ChromaArrayType()]*(2-(*seq_parameter_set_Item)->frame_mbs_only_flag);
- Width -=((*seq_parameter_set_Item)->frame_crop_left_offset+(*seq_parameter_set_Item)->frame_crop_right_offset )*CropUnitX;
- Height-=((*seq_parameter_set_Item)->frame_crop_top_offset +(*seq_parameter_set_Item)->frame_crop_bottom_offset)*CropUnitY;
-
- //From vui_parameters
- float64 PixelAspectRatio=1;
- if ((*seq_parameter_set_Item)->vui_parameters)
- {
- if ((*seq_parameter_set_Item)->vui_parameters->aspect_ratio_info_present_flag)
- {
- if ((*seq_parameter_set_Item)->vui_parameters->aspect_ratio_idc<Avc_PixelAspectRatio_Size)
- PixelAspectRatio=Avc_PixelAspectRatio[(*seq_parameter_set_Item)->vui_parameters->aspect_ratio_idc];
- else if ((*seq_parameter_set_Item)->vui_parameters->aspect_ratio_idc==0xFF && (*seq_parameter_set_Item)->vui_parameters->sar_height)
- PixelAspectRatio=((float64)(*seq_parameter_set_Item)->vui_parameters->sar_width)/(*seq_parameter_set_Item)->vui_parameters->sar_height;
- }
- if ((*seq_parameter_set_Item)->vui_parameters->timing_info_present_flag)
- {
- if (!(*seq_parameter_set_Item)->vui_parameters->fixed_frame_rate_flag)
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate_Mode, "VFR");
- else if ((*seq_parameter_set_Item)->vui_parameters->timing_info_present_flag && (*seq_parameter_set_Item)->vui_parameters->time_scale && (*seq_parameter_set_Item)->vui_parameters->num_units_in_tick)
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, (float64)(*seq_parameter_set_Item)->vui_parameters->time_scale/(*seq_parameter_set_Item)->vui_parameters->num_units_in_tick/((*seq_parameter_set_Item)->frame_mbs_only_flag?2:((*seq_parameter_set_Item)->pic_order_cnt_type==2?1:2))/FrameRate_Divider);
- }
-
- //Colour description
- if ((*seq_parameter_set_Item)->vui_parameters->video_signal_type_present_flag)
- {
- Fill(Stream_Video, 0, Video_Standard, Avc_video_format[(*seq_parameter_set_Item)->vui_parameters->video_format]);
- Fill(Stream_Video, 0, Video_colour_range, Avc_video_full_range[(*seq_parameter_set_Item)->vui_parameters->video_full_range_flag]);
- if ((*seq_parameter_set_Item)->vui_parameters->colour_description_present_flag)
- {
- Fill(Stream_Video, 0, Video_colour_description_present, "Yes");
- Fill(Stream_Video, 0, Video_colour_primaries, Mpegv_colour_primaries((*seq_parameter_set_Item)->vui_parameters->colour_primaries));
- Fill(Stream_Video, 0, Video_transfer_characteristics, Mpegv_transfer_characteristics((*seq_parameter_set_Item)->vui_parameters->transfer_characteristics));
- Fill(Stream_Video, 0, Video_matrix_coefficients, Mpegv_matrix_coefficients((*seq_parameter_set_Item)->vui_parameters->matrix_coefficients));
- }
- }
-
- //hrd_parameter_sets
- int64u bit_rate_value=(int64u)-1;
- bool bit_rate_value_IsValid=true;
- bool cbr_flag=false;
- bool cbr_flag_IsSet=false;
- bool cbr_flag_IsValid=true;
- seq_parameter_set_struct::vui_parameters_struct::xxl* NAL=(*seq_parameter_set_Item)->vui_parameters->NAL;
- if (NAL)
- for (size_t Pos=0; Pos<NAL->SchedSel.size(); Pos++)
- {
- if (NAL->SchedSel[Pos].cpb_size_value!=(int32u)-1)
- Fill(Stream_Video, 0, Video_BufferSize, NAL->SchedSel[Pos].cpb_size_value);
- if (bit_rate_value!=(int64u)-1 && bit_rate_value!=NAL->SchedSel[Pos].bit_rate_value)
- bit_rate_value_IsValid=false;
- if (bit_rate_value==(int64u)-1)
- bit_rate_value=NAL->SchedSel[Pos].bit_rate_value;
- if (cbr_flag_IsSet==true && cbr_flag!=NAL->SchedSel[Pos].cbr_flag)
- cbr_flag_IsValid=false;
- if (cbr_flag_IsSet==0)
- {
- cbr_flag=NAL->SchedSel[Pos].cbr_flag;
- cbr_flag_IsSet=true;
- }
- }
- seq_parameter_set_struct::vui_parameters_struct::xxl* VCL=(*seq_parameter_set_Item)->vui_parameters->VCL;
- if (VCL)
- for (size_t Pos=0; Pos<VCL->SchedSel.size(); Pos++)
- {
- Fill(Stream_Video, 0, Video_BufferSize, VCL->SchedSel[Pos].cpb_size_value);
- if (bit_rate_value!=(int64u)-1 && bit_rate_value!=VCL->SchedSel[Pos].bit_rate_value)
- bit_rate_value_IsValid=false;
- if (bit_rate_value==(int64u)-1)
- bit_rate_value=VCL->SchedSel[Pos].bit_rate_value;
- if (cbr_flag_IsSet==true && cbr_flag!=VCL->SchedSel[Pos].cbr_flag)
- cbr_flag_IsValid=false;
- if (cbr_flag_IsSet==0)
- {
- cbr_flag=VCL->SchedSel[Pos].cbr_flag;
- cbr_flag_IsSet=true;
- }
- }
- if (cbr_flag_IsSet && cbr_flag_IsValid)
- {
- Fill(Stream_Video, 0, Video_BitRate_Mode, cbr_flag?"CBR":"VBR");
- if (bit_rate_value!=(int64u)-1 && bit_rate_value_IsValid)
- Fill(Stream_Video, 0, cbr_flag?Video_BitRate_Nominal:Video_BitRate_Maximum, bit_rate_value);
- }
- }
-
- if (Count_Get(Stream_Video)==0)
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "AVC");
- Fill(Stream_Video, 0, Video_Codec, "AVC");
-
- Ztring Profile=Ztring().From_Local(Avc_profile_idc((*seq_parameter_set_Item)->profile_idc));
- switch ((*seq_parameter_set_Item)->profile_idc)
- {
- case 44 : // CAVLC 4:4:4 Intra
- case 100 : // High
- case 110 : // High 10
- case 122 : // High 4:2:2"
- case 244 : // High 4:4:4 Predictive
- if ((*seq_parameter_set_Item)->constraint_set3_flag)
- Profile+=__T(" Intra");
- }
- Profile+=__T("@L")+Ztring().From_Number(((float)(*seq_parameter_set_Item)->level_idc)/10, ((*seq_parameter_set_Item)->level_idc%10)?1:0);
- Fill(Stream_Video, 0, Video_Format_Profile, Profile);
- Fill(Stream_Video, 0, Video_Codec_Profile, Profile);
- Fill(Stream_Video, StreamPos_Last, Video_Width, Width);
- Fill(Stream_Video, StreamPos_Last, Video_Height, Height);
- Fill(Stream_Video, 0, Video_PixelAspectRatio, PixelAspectRatio, 3, true);
- Fill(Stream_Video, 0, Video_DisplayAspectRatio, Width*PixelAspectRatio/Height, 3, true); //More precise
- if (FrameRate_Divider==2)
- {
- Fill(Stream_Video, StreamPos_Last, Video_Format_Settings_FrameMode, "Frame doubling");
- Fill(Stream_Video, StreamPos_Last, Video_Format_Settings, "Frame doubling");
- }
- if (FrameRate_Divider==3)
- {
- Fill(Stream_Video, StreamPos_Last, Video_Format_Settings_FrameMode, "Frame tripling");
- Fill(Stream_Video, StreamPos_Last, Video_Format_Settings, "Frame tripling");
- }
-
- //Interlacement
- if ((*seq_parameter_set_Item)->mb_adaptive_frame_field_flag && Structure_Frame>0) //Interlaced macro-block
- {
- Fill(Stream_Video, 0, Video_ScanType, "MBAFF");
- Fill(Stream_Video, 0, Video_Interlacement, "MBAFF");
- }
- else if ((*seq_parameter_set_Item)->frame_mbs_only_flag || (Structure_Frame>0 && Structure_Field==0)) //No interlaced frame
- {
- Fill(Stream_Video, 0, Video_ScanType, "Progressive");
- Fill(Stream_Video, 0, Video_Interlacement, "PPF");
- }
- else if (Structure_Field>0)
- {
- Fill(Stream_Video, 0, Video_ScanType, "Interlaced");
- Fill(Stream_Video, 0, Video_Interlacement, "Interlaced");
- }
- std::string ScanOrders, PictureTypes(PictureTypes_PreviousFrames);
- ScanOrders.reserve(TemporalReferences.size());
- for (size_t Pos=0; Pos<TemporalReferences.size(); Pos++)
- if (TemporalReferences[Pos])
- {
- ScanOrders+=TemporalReferences[Pos]->IsTop?'T':'B';
- if ((Pos%2)==0)
- PictureTypes+=Avc_slice_type[TemporalReferences[Pos]->slice_type];
- }
- else if (!PictureTypes.empty()) //Only if stream already started
- {
- ScanOrders+=' ';
- if ((Pos%2)==0)
- PictureTypes+=' ';
- }
- Fill(Stream_Video, 0, Video_ScanOrder, ScanOrder_Detect(ScanOrders));
- { //Legacy
- string Result=ScanOrder_Detect(ScanOrders);
- if (!Result.empty())
- Fill(Stream_Video, 0, Video_Interlacement, Result, true, true);
- else
- {
- switch ((*seq_parameter_set_Item)->pic_struct_FirstDetected)
- {
- case 1 :
- case 3 :
- Fill(Stream_Video, 0, Video_ScanOrder, (string) "TFF");
- break;
- case 2 :
- case 4 :
- Fill(Stream_Video, 0, Video_ScanOrder, (string) "BFF");
- break;
- default : ;
- }
- }
- }
- Fill(Stream_Video, 0, Video_Format_Settings_GOP, GOP_Detect(PictureTypes));
-
- Fill(Stream_General, 0, General_Encoded_Library, Encoded_Library);
- Fill(Stream_General, 0, General_Encoded_Library_Name, Encoded_Library_Name);
- Fill(Stream_General, 0, General_Encoded_Library_Version, Encoded_Library_Version);
- Fill(Stream_General, 0, General_Encoded_Library_Settings, Encoded_Library_Settings);
- Fill(Stream_Video, 0, Video_Encoded_Library, Encoded_Library);
- Fill(Stream_Video, 0, Video_Encoded_Library_Name, Encoded_Library_Name);
- Fill(Stream_Video, 0, Video_Encoded_Library_Version, Encoded_Library_Version);
- Fill(Stream_Video, 0, Video_Encoded_Library_Settings, Encoded_Library_Settings);
- Fill(Stream_Video, 0, Video_BitRate_Nominal, BitRate_Nominal);
- Fill(Stream_Video, 0, Video_MuxingMode, MuxingMode);
- for (std::vector<pic_parameter_set_struct*>::iterator pic_parameter_set_Item=pic_parameter_sets.begin(); pic_parameter_set_Item!=pic_parameter_sets.end(); ++pic_parameter_set_Item)
- if (*pic_parameter_set_Item && (*pic_parameter_set_Item)->seq_parameter_set_id==seq_parameter_set_Item-(seq_parameter_sets.empty()?subset_seq_parameter_sets.begin():seq_parameter_sets.begin()))
- {
- if ((*pic_parameter_set_Item)->entropy_coding_mode_flag)
- {
- Fill(Stream_Video, 0, Video_Format_Settings, "CABAC");
- Fill(Stream_Video, 0, Video_Format_Settings_CABAC, "Yes");
- Fill(Stream_Video, 0, Video_Codec_Settings, "CABAC");
- Fill(Stream_Video, 0, Video_Codec_Settings_CABAC, "Yes");
- }
- else
- {
- Fill(Stream_Video, 0, Video_Format_Settings_CABAC, "No");
- Fill(Stream_Video, 0, Video_Codec_Settings_CABAC, "No");
- }
- break; //TODO: currently, testing only the first pic_parameter_set
- }
- if ((*seq_parameter_set_Item)->max_num_ref_frames>0)
- {
- Fill(Stream_Video, 0, Video_Format_Settings, Ztring::ToZtring((*seq_parameter_set_Item)->max_num_ref_frames)+__T(" Ref Frames"));
- Fill(Stream_Video, 0, Video_Codec_Settings, Ztring::ToZtring((*seq_parameter_set_Item)->max_num_ref_frames)+__T(" Ref Frames"));
- Fill(Stream_Video, 0, Video_Format_Settings_RefFrames, (*seq_parameter_set_Item)->max_num_ref_frames);
- Fill(Stream_Video, 0, Video_Codec_Settings_RefFrames, (*seq_parameter_set_Item)->max_num_ref_frames);
- }
- if ((*seq_parameter_set_Item)->vui_parameters && (*seq_parameter_set_Item)->vui_parameters->matrix_coefficients == 0)
- Fill(Stream_Video, 0, Video_ColorSpace, "RGB");
- else
- Fill(Stream_Video, 0, Video_ColorSpace, "YUV");
- Fill(Stream_Video, 0, Video_Colorimetry, Avc_Colorimetry_format_idc[(*seq_parameter_set_Item)->chroma_format_idc]);
- if ((*seq_parameter_set_Item)->bit_depth_luma_minus8==(*seq_parameter_set_Item)->bit_depth_chroma_minus8)
- Fill(Stream_Video, 0, Video_BitDepth, (*seq_parameter_set_Item)->bit_depth_luma_minus8+8);
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::Streams_Fill_subset(const std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item)
-{
- Ztring Profile=Ztring().From_Local(Avc_profile_idc((*seq_parameter_set_Item)->profile_idc))+__T("@L")+Ztring().From_Number(((float)(*seq_parameter_set_Item)->level_idc)/10, 1);
- Ztring Profile_Base=Retrieve(Stream_Video, 0, Video_Format_Profile);
- Fill(Stream_Video, 0, Video_Format_Profile, Profile, true);
- if (!Profile_Base.empty())
- Fill(Stream_Video, 0, Video_Format_Profile, Profile_Base);
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::Streams_Finish()
-{
- if (PTS_End!=(int64u)-1 && (IsSub || File_Offset+Buffer_Offset+Element_Size==File_Size))
- {
- if (PTS_End>PTS_Begin)
- Fill(Stream_Video, 0, Video_Duration, float64_int64s(((float64)(PTS_End-PTS_Begin))/1000000));
- }
-
- //GA94 captions
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- if (GA94_03_Parser && GA94_03_Parser->Status[IsAccepted])
- {
- Clear(Stream_Text);
-
- Finish(GA94_03_Parser);
- Merge(*GA94_03_Parser);
-
- Ztring LawRating=GA94_03_Parser->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=GA94_03_Parser->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
-
- for (size_t Pos=0; Pos<Count_Get(Stream_Text); Pos++)
- {
- Ztring MuxingMode=Retrieve(Stream_Text, Pos, "MuxingMode");
- Fill(Stream_Text, Pos, "MuxingMode", __T("SCTE 128 / ")+MuxingMode, true);
- }
- }
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
-
- #if MEDIAINFO_IBIUSAGE
- if (seq_parameter_sets.size()==1 && (*seq_parameter_sets.begin())->vui_parameters && (*seq_parameter_sets.begin())->vui_parameters->timing_info_present_flag && (*seq_parameter_sets.begin())->vui_parameters->fixed_frame_rate_flag)
- Ibi_Stream_Finish((*seq_parameter_sets.begin())->vui_parameters->time_scale, (*seq_parameter_sets.begin())->vui_parameters->num_units_in_tick);
- #endif //MEDIAINFO_IBIUSAGE
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Avc::FileHeader_Begin()
-{
- if (!File__Analyze::FileHeader_Begin_0x000001())
- return false;
-
- if (!MustSynchronize)
- {
- Synched_Init();
- Buffer_TotalBytes_FirstSynched=0;
- File_Offset_FirstSynched=File_Offset;
- }
-
- //All should be OK
- return true;
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Avc::Synchronize()
-{
- //Synchronizing
- size_t Buffer_Offset_Min=Buffer_Offset;
- while(Buffer_Offset+4<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x01))
- {
- Buffer_Offset+=2;
- while(Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Buffer_Offset+=2;
- if (Buffer_Offset>=Buffer_Size || Buffer[Buffer_Offset-1]==0x00)
- Buffer_Offset--;
- }
- if (Buffer_Offset>Buffer_Offset_Min && Buffer[Buffer_Offset-1]==0x00)
- Buffer_Offset--;
-
- //Parsing last bytes if needed
- if (Buffer_Offset+4==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x00
- || Buffer[Buffer_Offset+3]!=0x01))
- Buffer_Offset++;
- if (Buffer_Offset+3==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x01))
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00))
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && Buffer[Buffer_Offset ]!=0x00)
- Buffer_Offset++;
-
- if (Buffer_Offset+4>Buffer_Size)
- return false;
-
- //Synched is OK
- Synched=true;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Avc::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+6>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || (Buffer[Buffer_Offset+2]!=0x01 && (Buffer[Buffer_Offset+2]!=0x00 || Buffer[Buffer_Offset+3]!=0x01)))
- {
- Synched=false;
- return true;
- }
-
- //Quick search
- if (!Header_Parser_QuickSearch())
- return false;
-
- #if MEDIAINFO_IBIUSAGE
- bool zero_byte=Buffer[Buffer_Offset+2]==0x00;
- bool RandomAccess=(Buffer[Buffer_Offset+(zero_byte?4:3)]&0x1F)==0x07 || ((Buffer[Buffer_Offset+(zero_byte?4:3)]&0x1F)==0x09 && ((Buffer[Buffer_Offset+(zero_byte?5:4)]&0xE0)==0x00 || (Buffer[Buffer_Offset+(zero_byte?5:4)]&0xE0)==0xA0)); //seq_parameter_set or access_unit_delimiter with value=0 or 5 (3 bits)
- if (RandomAccess)
- Ibi_Add();
- #endif //MEDIAINFO_IBIUSAGE
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Demux
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-bool File_Avc::Demux_UnpacketizeContainer_Test()
-{
- const int8u* Buffer_Temp=NULL;
- size_t Buffer_Temp_Size=0;
- bool RandomAccess=true; //Default, in case of problem
-
- if ((MustParse_SPS_PPS || SizedBlocks) && Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10)
- {
- if (MustParse_SPS_PPS)
- return true; //Wait for SPS and PPS
-
- //Random access check
- RandomAccess=false;
-
- //Computing final size
- size_t TranscodedBuffer_Size=0;
- while (Buffer_Offset+SizeOfNALU_Minus1+1+1<=Buffer_Size)
- {
- size_t Size;
- switch (SizeOfNALU_Minus1)
- {
- case 0: Size=Buffer[Buffer_Offset];
- TranscodedBuffer_Size+=2;
- break;
- case 1: Size=BigEndian2int16u(Buffer+Buffer_Offset);
- TranscodedBuffer_Size++;
- break;
- case 2: Size=BigEndian2int24u(Buffer+Buffer_Offset);
- break;
- case 3: Size=BigEndian2int32u(Buffer+Buffer_Offset);
- TranscodedBuffer_Size--;
- break;
- default: return true; //Problem
- }
- Size+=SizeOfNALU_Minus1+1;
-
- //Coherency checking
- if (Size==0 || Buffer_Offset+Size>Buffer_Size || (Buffer_Offset+Size!=Buffer_Size && Buffer_Offset+Size+SizeOfNALU_Minus1+1>Buffer_Size))
- Size=Buffer_Size-Buffer_Offset;
-
- //Random access check
- if (!RandomAccess && Buffer_Offset+SizeOfNALU_Minus1+1<Buffer_Size && (Buffer[Buffer_Offset+SizeOfNALU_Minus1+1]&0x1F) && (Buffer[Buffer_Offset+SizeOfNALU_Minus1+1]&0x1F)<=5) //Is a slice
- {
- int32u slice_type;
- Element_Offset=SizeOfNALU_Minus1+1+1;
- Element_Size=Size;
- BS_Begin();
- Skip_UE("first_mb_in_slice");
- Get_UE (slice_type, "slice_type");
- BS_End();
- Element_Offset=0;
-
- switch (slice_type)
- {
- case 2 :
- case 7 :
- RandomAccess=true;
- }
- }
-
- TranscodedBuffer_Size+=Size;
- Buffer_Offset+=Size;
- }
- Buffer_Offset=0;
-
- //Adding SPS/PPS sizes
- if (RandomAccess)
- {
- for (seq_parameter_set_structs::iterator Data_Item=seq_parameter_sets.begin(); Data_Item!=seq_parameter_sets.end(); ++Data_Item)
- TranscodedBuffer_Size+=(*Data_Item)->Iso14496_10_Buffer_Size;
- for (seq_parameter_set_structs::iterator Data_Item=subset_seq_parameter_sets.begin(); Data_Item!=subset_seq_parameter_sets.end(); ++Data_Item)
- TranscodedBuffer_Size+=(*Data_Item)->Iso14496_10_Buffer_Size;
- for (pic_parameter_set_structs::iterator Data_Item=pic_parameter_sets.begin(); Data_Item!=pic_parameter_sets.end(); ++Data_Item)
- TranscodedBuffer_Size+=(*Data_Item)->Iso14496_10_Buffer_Size;
- }
-
- //Copying
- int8u* TranscodedBuffer=new int8u[TranscodedBuffer_Size+100];
- size_t TranscodedBuffer_Pos=0;
- if (RandomAccess)
- {
- for (seq_parameter_set_structs::iterator Data_Item=seq_parameter_sets.begin(); Data_Item!=seq_parameter_sets.end(); ++Data_Item)
- {
- std::memcpy(TranscodedBuffer+TranscodedBuffer_Pos, (*Data_Item)->Iso14496_10_Buffer, (*Data_Item)->Iso14496_10_Buffer_Size);
- TranscodedBuffer_Pos+=(*Data_Item)->Iso14496_10_Buffer_Size;
- }
- for (seq_parameter_set_structs::iterator Data_Item=subset_seq_parameter_sets.begin(); Data_Item!=subset_seq_parameter_sets.end(); ++Data_Item)
- {
- std::memcpy(TranscodedBuffer+TranscodedBuffer_Pos, (*Data_Item)->Iso14496_10_Buffer, (*Data_Item)->Iso14496_10_Buffer_Size);
- TranscodedBuffer_Pos+=(*Data_Item)->Iso14496_10_Buffer_Size;
- }
- for (pic_parameter_set_structs::iterator Data_Item=pic_parameter_sets.begin(); Data_Item!=pic_parameter_sets.end(); ++Data_Item)
- {
- std::memcpy(TranscodedBuffer+TranscodedBuffer_Pos, (*Data_Item)->Iso14496_10_Buffer, (*Data_Item)->Iso14496_10_Buffer_Size);
- TranscodedBuffer_Pos+=(*Data_Item)->Iso14496_10_Buffer_Size;
- }
- }
- while (Buffer_Offset<Buffer_Size)
- {
- //Sync layer
- TranscodedBuffer[TranscodedBuffer_Pos]=0x00;
- TranscodedBuffer_Pos++;
- TranscodedBuffer[TranscodedBuffer_Pos]=0x00;
- TranscodedBuffer_Pos++;
- TranscodedBuffer[TranscodedBuffer_Pos]=0x01;
- TranscodedBuffer_Pos++;
-
- //Block
- size_t Size;
- switch (SizeOfNALU_Minus1)
- {
- case 0: Size=Buffer[Buffer_Offset];
- Buffer_Offset++;
- break;
- case 1: Size=BigEndian2int16u(Buffer+Buffer_Offset);
- Buffer_Offset+=2;
- break;
- case 2: Size=BigEndian2int24u(Buffer+Buffer_Offset);
- Buffer_Offset+=3;
- break;
- case 3: Size=BigEndian2int32u(Buffer+Buffer_Offset);
- Buffer_Offset+=4;
- break;
- default: //Problem
- delete [] TranscodedBuffer;
- return false;
- }
-
- //Coherency checking
- if (Size==0 || Buffer_Offset+Size>Buffer_Size || (Buffer_Offset+Size!=Buffer_Size && Buffer_Offset+Size+SizeOfNALU_Minus1+1>Buffer_Size))
- Size=Buffer_Size-Buffer_Offset;
-
- std::memcpy(TranscodedBuffer+TranscodedBuffer_Pos, Buffer+Buffer_Offset, Size);
- TranscodedBuffer_Pos+=Size;
- Buffer_Offset+=Size;
- }
- Buffer_Offset=0;
-
- Buffer_Temp=Buffer;
- Buffer=TranscodedBuffer;
- Buffer_Temp_Size=Buffer_Size;
- Buffer_Size=TranscodedBuffer_Size;
- Demux_Offset=Buffer_Size;
- }
- else
- {
- bool zero_byte=Buffer[Buffer_Offset+2]==0x00;
- if (!(((Buffer[Buffer_Offset+(zero_byte?4:3)]&0x1B)==0x01 && (Buffer[Buffer_Offset+(zero_byte?5:4)]&0x80)!=0x80)
- || (Buffer[Buffer_Offset+(zero_byte?4:3)]&0x1F)==0x0C))
- {
- if (Demux_Offset==0)
- {
- Demux_Offset=Buffer_Offset;
- Demux_IntermediateItemFound=false;
- }
- while (Demux_Offset+6<=Buffer_Size)
- {
- //Synchronizing
- while(Demux_Offset+6<=Buffer_Size && (Buffer[Demux_Offset ]!=0x00
- || Buffer[Demux_Offset+1]!=0x00
- || Buffer[Demux_Offset+2]!=0x01))
- {
- Demux_Offset+=2;
- while(Demux_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Demux_Offset+=2;
- if (Demux_Offset>=Buffer_Size || Buffer[Demux_Offset-1]==0x00)
- Demux_Offset--;
- }
-
- if (Demux_Offset+6>Buffer_Size)
- {
- if (File_Offset+Buffer_Size==File_Size)
- Demux_Offset=Buffer_Size;
- break;
- }
-
- zero_byte=Buffer[Demux_Offset+2]==0x00;
- if (Demux_IntermediateItemFound)
- {
- if (!(((Buffer[Demux_Offset+(zero_byte?4:3)]&0x1B)==0x01 && (Buffer[Demux_Offset+(zero_byte?5:4)]&0x80)!=0x80)
- || (Buffer[Demux_Offset+(zero_byte?4:3)]&0x1F)==0x0C))
- break;
- }
- else
- {
- if ((Buffer[Demux_Offset+(zero_byte?4:3)]&0x1B)==0x01 && (Buffer[Demux_Offset+(zero_byte?5:4)]&0x80)==0x80)
- Demux_IntermediateItemFound=true;
- }
-
- Demux_Offset++;
- }
-
- if (Demux_Offset+6>Buffer_Size && !FrameIsAlwaysComplete && File_Offset+Buffer_Size<File_Size)
- return false; //No complete frame
-
- if (Demux_Offset && Buffer[Demux_Offset-1]==0x00)
- Demux_Offset--;
-
- zero_byte=Buffer[Buffer_Offset+2]==0x00;
- size_t Buffer_Offset_Random=Buffer_Offset;
- if ((Buffer[Buffer_Offset_Random+(zero_byte?4:3)]&0x1F)==0x09)
- {
- Buffer_Offset_Random++;
- if (zero_byte)
- Buffer_Offset_Random++;
- while(Buffer_Offset_Random+6<=Buffer_Size && (Buffer[Buffer_Offset_Random ]!=0x00
- || Buffer[Buffer_Offset_Random+1]!=0x00
- || Buffer[Buffer_Offset_Random+2]!=0x01))
- Buffer_Offset_Random++;
- zero_byte=Buffer[Buffer_Offset_Random+2]==0x00;
- }
- RandomAccess=Buffer_Offset_Random+6<=Buffer_Size && (Buffer[Buffer_Offset_Random+(zero_byte?4:3)]&0x1F)==0x07; //seq_parameter_set
- }
- }
-
- if (!Status[IsAccepted])
- {
- if (Config->Demux_EventWasSent)
- return false;
- File_Avc* MI=new File_Avc;
- Open_Buffer_Init(MI);
- Open_Buffer_Continue(MI, Buffer, Buffer_Size);
- bool IsOk=MI->Status[IsAccepted];
- delete MI;
- if (!IsOk)
- return false;
- }
-
- if (IFrame_Count || RandomAccess)
- {
- bool Frame_Count_NotParsedIncluded_PlusOne=false;
- int64u PTS_Temp=FrameInfo.PTS;
- if (!IsSub)
- FrameInfo.PTS=(int64u)-1;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1 && Interlaced_Top!=Interlaced_Bottom)
- {
- Frame_Count_NotParsedIncluded--;
- Frame_Count_NotParsedIncluded_PlusOne=true;
- }
- Demux_UnpacketizeContainer_Demux(RandomAccess);
- if (!IsSub)
- FrameInfo.PTS=PTS_Temp;
- if (Frame_Count_NotParsedIncluded_PlusOne)
- Frame_Count_NotParsedIncluded++;
- }
- else
- Demux_UnpacketizeContainer_Demux_Clear();
-
- if (Buffer_Temp)
- {
- Demux_TotalBytes-=Buffer_Size;
- Demux_TotalBytes+=Buffer_Temp_Size;
- delete[] Buffer;
- Buffer=Buffer_Temp;
- Buffer_Size=Buffer_Temp_Size;
- }
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX
-
-//---------------------------------------------------------------------------
-void File_Avc::Synched_Init()
-{
- //FrameInfo
- PTS_End=0;
- if (FrameInfo.DTS==(int64u)-1)
- FrameInfo.DTS=0; //No DTS in container
- DTS_Begin=FrameInfo.DTS;
- DTS_End=FrameInfo.DTS;
-
- //Temporal references
- TemporalReferences_DelayedElement=NULL;
- TemporalReferences_Min=0;
- TemporalReferences_Max=0;
- TemporalReferences_Reserved=0;
- TemporalReferences_Offset=0;
- TemporalReferences_Offset_pic_order_cnt_lsb_Last=0;
- TemporalReferences_pic_order_cnt_Min=0;
-
- //Text
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- GA94_03_IsPresent=false;
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
-
- //File specific
- SizeOfNALU_Minus1=(int8u)-1;
-
- //Status
- IFrame_Count=0;
- prevPicOrderCntMsb=0;
- prevPicOrderCntLsb=(int32u)-1;
- prevTopFieldOrderCnt=(int32u)-1;
- prevFrameNum=(int32u)-1;
- prevFrameNumOffset=(int32u)-1;
-
- //Count of a Packets
- Block_Count=0;
- Interlaced_Top=0;
- Interlaced_Bottom=0;
- Structure_Field=0;
- Structure_Frame=0;
-
- //Temp
- FrameRate_Divider=1;
- FirstPFrameInGop_IsParsed=false;
- tc=0;
-
- //Default values
- Streams.resize(0x100);
- Streams[0x06].Searching_Payload=true; //sei
- Streams[0x07].Searching_Payload=true; //seq_parameter_set
- Streams[0x09].Searching_Payload=true; //access_unit_delimiter
- Streams[0x0F].Searching_Payload=true; //subset_seq_parameter_set
- for (int8u Pos=0xFF; Pos>=0xB9; Pos--)
- Streams[Pos].Searching_Payload=true; //Testing MPEG-PS
-
- //Options
- Option_Manage();
-
- //Specific cases
- #if MEDIAINFO_EVENTS
- if (Config->ParseUndecodableFrames_Get())
- {
- Accept(); //In some case, we must accept the stream very quickly and before the sequence header is detected
- Streams[0x01].Searching_Payload=true; //slice_header
- Streams[0x05].Searching_Payload=true; //slice_header
- }
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_DEMUX
- Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10=Config->Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10_Get();
- #endif //MEDIAINFO_DEMUX
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_ADVANCED2
-void File_Avc::Read_Buffer_SegmentChange()
-{
-}
-#endif //MEDIAINFO_ADVANCED2
-
-//---------------------------------------------------------------------------
-void File_Avc::Read_Buffer_Unsynched()
-{
- //Temporal references
- for (size_t Pos=0; Pos<TemporalReferences.size(); Pos++)
- delete TemporalReferences[Pos]; //TemporalReferences[Pos]=NULL;
- TemporalReferences.clear();
- delete TemporalReferences_DelayedElement; TemporalReferences_DelayedElement=NULL;
- TemporalReferences_Min=0;
- TemporalReferences_Max=0;
- TemporalReferences_Reserved=0;
- TemporalReferences_Offset=0;
- TemporalReferences_Offset_pic_order_cnt_lsb_Last=0;
- TemporalReferences_pic_order_cnt_Min=0;
-
- //Text
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- if (GA94_03_Parser)
- GA94_03_Parser->Open_Buffer_Unsynch();
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
-
- //parameter_sets
- if (SizedBlocks) //If sized blocks, it is not a broadcasted stream so SPS/PPS are only in container header, we must not disable them.
- {
- //Rebuilding immediatly TemporalReferences
- for (std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item=seq_parameter_sets.begin(); seq_parameter_set_Item!=seq_parameter_sets.end(); ++seq_parameter_set_Item)
- if ((*seq_parameter_set_Item))
- {
- size_t MaxNumber;
- switch ((*seq_parameter_set_Item)->pic_order_cnt_type)
- {
- case 0 : MaxNumber=(*seq_parameter_set_Item)->MaxPicOrderCntLsb; break;
- case 2 : MaxNumber=(*seq_parameter_set_Item)->MaxFrameNum*2; break;
- default: Trusted_IsNot("Not supported"); return;
- }
-
- TemporalReferences.resize(4*MaxNumber);
- TemporalReferences_Reserved=MaxNumber;
- }
- }
- else
- {
- seq_parameter_sets.clear();
- subset_seq_parameter_sets.clear();
- pic_parameter_sets.clear();
- }
-
- //Status
- Interlaced_Top=0;
- Interlaced_Bottom=0;
- prevPicOrderCntMsb=0;
- prevPicOrderCntLsb=(int32u)-1;
- prevTopFieldOrderCnt=(int32u)-1;
- prevFrameNum=(int32u)-1;
- prevFrameNumOffset=(int32u)-1;
-
- //Temp
- FrameRate_Divider=1;
- FirstPFrameInGop_IsParsed=false;
- tc=0;
-
- //Impossible to know TimeStamps now
- PTS_End=0;
- DTS_End=0;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Avc::Header_Parse()
-{
- //Specific case
- if (MustParse_SPS_PPS)
- {
- Header_Fill_Size(Element_Size);
- Header_Fill_Code((int64u)-1, "Specific");
- return;
- }
-
- //Parsing
- int8u nal_unit_type;
- if (!SizedBlocks)
- {
- if (Buffer[Buffer_Offset+2]==0x00)
- Skip_B1( "zero_byte");
- Skip_B3( "start_code_prefix_one_3bytes");
- BS_Begin();
- Mark_0 ();
- Get_S1 ( 2, nal_ref_idc, "nal_ref_idc");
- Get_S1 ( 5, nal_unit_type, "nal_unit_type");
- BS_End();
- if (!Header_Parser_Fill_Size())
- {
- Element_WaitForMoreData();
- return;
- }
- }
- else
- {
- int32u Size;
- switch (SizeOfNALU_Minus1)
- {
- case 0: {
- int8u Size_;
- Get_B1 (Size_, "size");
- Size=Size_;
- }
- break;
- case 1: {
- int16u Size_;
- Get_B2 (Size_, "size");
- Size=Size_;
- }
- break;
- case 2: {
- int32u Size_;
- Get_B3 (Size_, "size");
- Size=Size_;
- }
- break;
- case 3: Get_B4 (Size, "size");
- break;
- default: Trusted_IsNot("No size of NALU defined");
- Size=(int32u)(Buffer_Size-Buffer_Offset);
- }
- BS_Begin();
- Mark_0 ();
- Get_S1 ( 2, nal_ref_idc, "nal_ref_idc");
- Get_S1 ( 5, nal_unit_type, "nal_unit_type");
- BS_End();
-
- FILLING_BEGIN();
- Header_Fill_Size(Size?(Element_Offset-1+Size):(Buffer_Size-Buffer_Offset)); //If Size is 0, it is not normal, we skip the complete frame
- FILLING_END();
- }
-
- //Filling
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- Header_Fill_Code(nal_unit_type, Ztring().From_CC1(nal_unit_type));
- else
- #endif //MEDIAINFO_TRACE
- Header_Fill_Code(nal_unit_type);
-}
-
-//---------------------------------------------------------------------------
-bool File_Avc::Header_Parser_Fill_Size()
-{
- //Look for next Sync word
- if (Buffer_Offset_Temp==0) //Buffer_Offset_Temp is not 0 if Header_Parse_Fill_Size() has already parsed first frames
- Buffer_Offset_Temp=Buffer_Offset+4;
- while (Buffer_Offset_Temp+5<=Buffer_Size
- && CC3(Buffer+Buffer_Offset_Temp)!=0x000001)
- {
- Buffer_Offset_Temp+=2;
- while(Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp]!=0x00)
- Buffer_Offset_Temp+=2;
- if (Buffer_Offset_Temp>=Buffer_Size || Buffer[Buffer_Offset_Temp-1]==0x00)
- Buffer_Offset_Temp--;
- }
-
- //Must wait more data?
- if (Buffer_Offset_Temp+5>Buffer_Size)
- {
- if (FrameIsAlwaysComplete || File_Offset+Buffer_Size>=File_Size)
- Buffer_Offset_Temp=Buffer_Size; //We are sure that the next bytes are a start
- else
- return false;
- }
-
- if (Buffer[Buffer_Offset_Temp-1]==0x00)
- Buffer_Offset_Temp--;
-
- //OK, we continue
- Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
- Buffer_Offset_Temp=0;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Avc::Header_Parser_QuickSearch()
-{
- while ( Buffer_Offset+6<=Buffer_Size
- && Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && (Buffer[Buffer_Offset+2]==0x01
- || (Buffer[Buffer_Offset+2]==0x00 && Buffer[Buffer_Offset+3]==0x01)))
- {
- //Getting start_code
- int8u start_code;
- if (Buffer[Buffer_Offset+2]==0x00)
- start_code=CC1(Buffer+Buffer_Offset+4)&0x1F;
- else
- start_code=CC1(Buffer+Buffer_Offset+3)&0x1F;
-
- //Searching start
- if (Streams[start_code].Searching_Payload
- || Streams[start_code].ShouldDuplicate)
- return true;
-
- //Synchronizing
- Buffer_Offset+=4;
- Synched=false;
- if (!Synchronize())
- {
- UnSynched_IsNotJunk=true;
- return false;
- }
-
- if (Buffer_Offset+6>Buffer_Size)
- {
- UnSynched_IsNotJunk=true;
- return false;
- }
- }
-
- Trusted_IsNot("AVC, Synchronisation lost");
- return Synchronize();
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::Data_Parse()
-{
- //Specific case
- if (Element_Code==(int64u)-1)
- {
- SPS_PPS();
- return;
- }
-
- //Trailing zeroes
- int64u Element_Size_SaveBeforeZeroes=Element_Size;
- if (Element_Size)
- {
- while (Element_Size && Buffer[Buffer_Offset+(size_t)Element_Size-1]==0)
- Element_Size--;
- }
-
- //Dump of the SPS/PPS - Init
- #if MEDIAINFO_ADVANCED2
- size_t spspps_Size=0;
- if (true) //TODO: add an option for activating this extra piece of information in the output
- {
- switch (Element_Code)
- {
- case 0x07 : //seq_parameter_set();
- spspps_Size = seq_parameter_sets.size();
- break;
- case 0x08 : //pic_parameter_set();
- spspps_Size = pic_parameter_sets.size();
- break;
- default: ;
- }
- }
- #endif //MEDIAINFO_ADVANCED2
-
- //svc_extension
- bool svc_extension_flag=false;
- if (Element_Code==0x0E || Element_Code==0x14)
- {
- BS_Begin();
- Get_SB (svc_extension_flag, "svc_extension_flag");
- if (svc_extension_flag)
- nal_unit_header_svc_extension();
- else
- nal_unit_header_mvc_extension();
- BS_End();
- }
-
- //Searching emulation_prevention_three_byte
- int8u* Buffer_3Bytes=NULL;
- const int8u* Save_Buffer=Buffer;
- int64u Save_File_Offset=File_Offset;
- size_t Save_Buffer_Offset=Buffer_Offset;
- int64u Save_Element_Size=Element_Size;
- size_t Element_Offset_3Bytes=(size_t)Element_Offset;
- std::vector<size_t> ThreeByte_List;
- while (Element_Offset_3Bytes+3<=Element_Size)
- {
- if (CC3(Buffer+Buffer_Offset+(size_t)Element_Offset_3Bytes)==0x000003)
- ThreeByte_List.push_back(Element_Offset_3Bytes+2);
- Element_Offset_3Bytes+=2;
- while(Element_Offset_3Bytes<Element_Size && Buffer[Buffer_Offset+(size_t)Element_Offset_3Bytes]!=0x00)
- Element_Offset_3Bytes+=2;
- if (Element_Offset_3Bytes>=Element_Size || Buffer[Buffer_Offset+(size_t)Element_Offset_3Bytes-1]==0x00)
- Element_Offset_3Bytes--;
- }
-
- if (!ThreeByte_List.empty())
- {
- //We must change the buffer for keeping out
- Element_Size=Save_Element_Size-ThreeByte_List.size();
- File_Offset+=Buffer_Offset;
- Buffer_Offset=0;
- Buffer_3Bytes=new int8u[(size_t)Element_Size];
- for (size_t Pos=0; Pos<=ThreeByte_List.size(); Pos++)
- {
- size_t Pos0=(Pos==ThreeByte_List.size())?(size_t)Save_Element_Size:(ThreeByte_List[Pos]);
- size_t Pos1=(Pos==0)?0:(ThreeByte_List[Pos-1]+1);
- size_t Buffer_3bytes_Begin=Pos1-Pos;
- size_t Save_Buffer_Begin =Pos1;
- size_t Size= Pos0-Pos1;
- std::memcpy(Buffer_3Bytes+Buffer_3bytes_Begin, Save_Buffer+Save_Buffer_Offset+Save_Buffer_Begin, Size);
- }
- Buffer=Buffer_3Bytes;
- }
-
- //Parsing
- switch (Element_Code)
- {
- case 0x00 : Element_Name("unspecified"); Skip_XX(Element_Size-Element_Offset, "Data"); break;
- case 0x01 : slice_layer_without_partitioning_non_IDR(); break;
- case 0x02 : Element_Name("slice_data_partition_a_layer"); Skip_XX(Element_Size-Element_Offset, "Data"); break;
- case 0x03 : Element_Name("slice_data_partition_b_layer"); Skip_XX(Element_Size-Element_Offset, "Data"); break;
- case 0x04 : Element_Name("slice_data_partition_c_layer"); Skip_XX(Element_Size-Element_Offset, "Data"); break;
- case 0x05 : slice_layer_without_partitioning_IDR(); break;
- case 0x06 : sei(); break;
- case 0x07 : seq_parameter_set(); break;
- case 0x08 : pic_parameter_set(); break;
- case 0x09 : access_unit_delimiter(); break;
- case 0x0A : Element_Name("end_of_seq"); Skip_XX(Element_Size-Element_Offset, "Data"); break;
- case 0x0B : Element_Name("end_of_stream"); Skip_XX(Element_Size-Element_Offset, "Data"); break;
- case 0x0C : filler_data(); break;
- case 0x0D : Element_Name("seq_parameter_set_extension"); Skip_XX(Element_Size-Element_Offset, "Data"); break;
- case 0x0E : prefix_nal_unit(svc_extension_flag); break;
- case 0x0F : subset_seq_parameter_set(); break;
- case 0x13 : Element_Name("slice_layer_without_partitioning"); Skip_XX(Element_Size-Element_Offset, "Data"); break;
- case 0x14 : slice_layer_extension(svc_extension_flag); break;
- default :
- if (Element_Code<0x18)
- Element_Name("reserved");
- else
- Element_Name("unspecified");
- Skip_XX(Element_Size-Element_Offset, "Data");
- }
-
- if (!ThreeByte_List.empty())
- {
- //We must change the buffer for keeping out
- Element_Size=Save_Element_Size;
- File_Offset=Save_File_Offset;
- Buffer_Offset=Save_Buffer_Offset;
- delete[] Buffer; Buffer=Save_Buffer;
- Buffer_3Bytes=NULL; //Same as Buffer...
- Element_Offset+=ThreeByte_List.size();
- }
-
- //Duplicate
- #if MEDIAINFO_DUPLICATE
- if (!Streams.empty() && Streams[(size_t)Element_Code].ShouldDuplicate)
- File__Duplicate_Write(Element_Code);
- #endif //MEDIAINFO_DUPLICATE
-
- #if MEDIAINFO_DEMUX
- if (Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10)
- {
- if (Element_Code==0x07)
- {
- std::vector<seq_parameter_set_struct*>::iterator Data_Item=seq_parameter_sets.begin();
- if (Data_Item!=seq_parameter_sets.end() && (*Data_Item))
- {
- delete[] (*Data_Item)->Iso14496_10_Buffer;
- (*Data_Item)->Iso14496_10_Buffer_Size=(size_t)(Element_Size+4);
- (*Data_Item)->Iso14496_10_Buffer=new int8u[(*Data_Item)->Iso14496_10_Buffer_Size];
- (*Data_Item)->Iso14496_10_Buffer[0]=0x00;
- (*Data_Item)->Iso14496_10_Buffer[1]=0x00;
- (*Data_Item)->Iso14496_10_Buffer[2]=0x01;
- (*Data_Item)->Iso14496_10_Buffer[3]=0x67;
- std::memcpy((*Data_Item)->Iso14496_10_Buffer+4, Buffer+Buffer_Offset, (size_t)Element_Size);
- }
- }
- if (Element_Code==0x08)
- {
- std::vector<pic_parameter_set_struct*>::iterator Data_Item=pic_parameter_sets.begin();
- if (Data_Item!=pic_parameter_sets.end() && (*Data_Item))
- {
- delete[] (*Data_Item)->Iso14496_10_Buffer;
- (*Data_Item)->Iso14496_10_Buffer_Size=(size_t)(Element_Size+4);
- (*Data_Item)->Iso14496_10_Buffer=new int8u[(*Data_Item)->Iso14496_10_Buffer_Size];
- (*Data_Item)->Iso14496_10_Buffer[0]=0x00;
- (*Data_Item)->Iso14496_10_Buffer[1]=0x00;
- (*Data_Item)->Iso14496_10_Buffer[2]=0x01;
- (*Data_Item)->Iso14496_10_Buffer[3]=0x68;
- std::memcpy((*Data_Item)->Iso14496_10_Buffer+4, Buffer+Buffer_Offset, (size_t)Element_Size);
- }
- }
- if (Element_Code==0x0F)
- {
- std::vector<seq_parameter_set_struct*>::iterator Data_Item=subset_seq_parameter_sets.begin();
- if (Data_Item!=subset_seq_parameter_sets.end() && (*Data_Item))
- {
- SizeOfNALU_Minus1=0;
- delete[] (*Data_Item)->Iso14496_10_Buffer;
- (*Data_Item)->Iso14496_10_Buffer_Size=(size_t)(Element_Size+4);
- (*Data_Item)->Iso14496_10_Buffer=new int8u[(*Data_Item)->Iso14496_10_Buffer_Size];
- (*Data_Item)->Iso14496_10_Buffer[0]=0x00;
- (*Data_Item)->Iso14496_10_Buffer[1]=0x00;
- (*Data_Item)->Iso14496_10_Buffer[2]=0x01;
- (*Data_Item)->Iso14496_10_Buffer[3]=0x6F;
- std::memcpy((*Data_Item)->Iso14496_10_Buffer+4, Buffer+Buffer_Offset, (size_t)Element_Size);
- }
- }
- }
- #endif //MEDIAINFO_DEMUX
-
- //Dump of the SPS/PPS - Fill
- #if MEDIAINFO_ADVANCED2
- if (false) //TODO: add an option for activating this extra piece of information in the output
- {
- switch (Element_Code)
- {
- case 0x07 : //seq_parameter_set();
- if (spspps_Size != seq_parameter_sets.size() && !Status[IsFilled])
- {
- std::string Data_Raw((const char*)(Buffer+(size_t)(Buffer_Offset-1)), (size_t)(Element_Size+1)); //Including the last byte in the header
- Dump_SPS.push_back(Base64::encode(Data_Raw));
- }
- break;
- case 0x08 : //pic_parameter_set();
- if (spspps_Size != pic_parameter_sets.size() && !Status[IsFilled])
- {
- std::string Data_Raw((const char*)(Buffer+(size_t)(Buffer_Offset-1)), (size_t)(Element_Size+1)); //Including the last byte in the header
- Dump_PPS.push_back(Base64::encode(Data_Raw));
- }
- break;
- default: ;
- }
- }
- #endif //MEDIAINFO_ADVANCED2
-
- //Trailing zeroes
- Element_Size=Element_Size_SaveBeforeZeroes;
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Packet "01"
-void File_Avc::slice_layer_without_partitioning_non_IDR()
-{
- Element_Name("slice_layer_without_partitioning (non-IDR)");
-
- //Parsing
- BS_Begin();
- slice_header();
- slice_data(true);
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-// Packet "05"
-void File_Avc::slice_layer_without_partitioning_IDR()
-{
- Element_Name("slice_layer_without_partitioning (IDR)");
-
- //Parsing
- BS_Begin();
- slice_header();
- slice_data(true);
- BS_End();
-
- FILLING_BEGIN_PRECISE();
- //NextCode
- for (int8u Pos=0x01; Pos<=0x05; Pos++)
- NextCode_Add(Pos);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Avc::slice_header()
-{
- //Encryption management
- if (CA_system_ID_MustSkipSlices)
- {
- //Is not decodable
- Skip_BS(Data_BS_Remain(), "Data");
- Finish("AVC");
- return;
- }
-
- Element_Begin1("slice_header");
-
- //Parsing
- int32u slice_type, pic_order_cnt_lsb=(int32u)-1;
- int32u first_mb_in_slice, pic_parameter_set_id, frame_num, num_ref_idx_l0_active_minus1, num_ref_idx_l1_active_minus1, disable_deblocking_filter_idc, num_slice_groups_minus1, slice_group_map_type;
- int32s delta_pic_order_cnt_bottom=0;
- bool field_pic_flag=false, bottom_field_flag=false;
- Get_UE (first_mb_in_slice, "first_mb_in_slice");
- Get_UE (slice_type, "slice_type"); Param_Info1C((slice_type<10), Avc_slice_type[slice_type]);
- #if MEDIAINFO_EVENTS
- {
- EVENT_BEGIN (Video, SliceInfo, 0)
- Event.FieldPosition=Field_Count;
- Event.SlicePosition=Element_IsOK()?first_mb_in_slice:(int64u)-1;
- switch (slice_type)
- {
- case 0 :
- case 3 :
- case 5 :
- case 8 :
- Event.SliceType=1; break;
- case 1 :
- case 6 :
- Event.SliceType=2; break;
- case 2 :
- case 4 :
- case 7 :
- case 9 :
- Event.SliceType=0; break;
- default:
- Event.SliceType=(int8u)-1;
- }
- Event.Flags=0;
- EVENT_END ()
- }
- #endif //MEDIAINFO_EVENTS
- if (slice_type>=10)
- {
- Skip_BS(Data_BS_Remain(), "Data");
- Element_End0();
- return;
- }
- Get_UE (pic_parameter_set_id, "pic_parameter_set_id");
- std::vector<pic_parameter_set_struct*>::iterator pic_parameter_set_Item;
- if (pic_parameter_set_id>=pic_parameter_sets.size() || (*(pic_parameter_set_Item=pic_parameter_sets.begin()+pic_parameter_set_id))==NULL)
- {
- //Not yet present
- Skip_BS(Data_BS_Remain(), "Data (pic_parameter_set is missing)");
- Element_End0();
- return;
- }
- std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item;
- if ((*pic_parameter_set_Item)->seq_parameter_set_id>=seq_parameter_sets.size() || (*(seq_parameter_set_Item=seq_parameter_sets.begin()+(*pic_parameter_set_Item)->seq_parameter_set_id))==NULL)
- {
- if ((*pic_parameter_set_Item)->seq_parameter_set_id>=subset_seq_parameter_sets.size() || (*(seq_parameter_set_Item=subset_seq_parameter_sets.begin()+(*pic_parameter_set_Item)->seq_parameter_set_id))==NULL)
- {
- //Not yet present
- Skip_BS(Data_BS_Remain(), "Data (seq_parameter_set is missing)");
- Element_End0();
- return;
- }
- }
- if ((*seq_parameter_set_Item)->separate_colour_plane_flag==1)
- Skip_S1(2, "color_plane_id");
- num_ref_idx_l0_active_minus1=(*pic_parameter_set_Item)->num_ref_idx_l0_default_active_minus1; //Default
- num_ref_idx_l1_active_minus1=(*pic_parameter_set_Item)->num_ref_idx_l1_default_active_minus1; //Default
- Get_BS ((*seq_parameter_set_Item)->log2_max_frame_num_minus4+4, frame_num, "frame_num");
- if (!(*seq_parameter_set_Item)->frame_mbs_only_flag)
- {
- TEST_SB_GET(field_pic_flag, "field_pic_flag");
- Get_SB (bottom_field_flag, "bottom_field_flag");
- TEST_SB_END();
- }
- if (Element_Code==5) //IdrPicFlag
- Skip_UE( "idr_pic_id");
- if ((*seq_parameter_set_Item)->pic_order_cnt_type==0)
- {
- Get_BS ((*seq_parameter_set_Item)->log2_max_pic_order_cnt_lsb_minus4+4, pic_order_cnt_lsb, "pic_order_cnt_lsb");
- if ((*pic_parameter_set_Item)->bottom_field_pic_order_in_frame_present_flag && !field_pic_flag)
- Get_SE (delta_pic_order_cnt_bottom, "delta_pic_order_cnt_bottom");
- }
- if ((*seq_parameter_set_Item)->pic_order_cnt_type==1 && !(*seq_parameter_set_Item)->delta_pic_order_always_zero_flag )
- {
- Skip_SE( "delta_pic_order_cnt[0]");
- if((*pic_parameter_set_Item)->bottom_field_pic_order_in_frame_present_flag && !field_pic_flag)
- Skip_SE( "delta_pic_order_cnt[1]");
- }
- if((*pic_parameter_set_Item)->redundant_pic_cnt_present_flag)
- Skip_UE( "redundant_pic_cnt");
- if (slice_type==1 || slice_type==6) //B-Frame
- Skip_SB( "direct_spatial_mv_pred_flag");
- switch (slice_type)
- {
- case 0 : //P-Frame
- case 1 : //B-Frame
- case 3 : //SP-Frame
- case 5 : //P-Frame
- case 6 : //B-Frame
- case 8 : //SP-Frame
- TEST_SB_SKIP( "num_ref_idx_active_override_flag");
- Get_UE (num_ref_idx_l0_active_minus1, "num_ref_idx_l0_active_minus1");
- switch (slice_type)
- {
- case 1 : //B-Frame
- case 6 : //B-Frame
- Get_UE (num_ref_idx_l1_active_minus1, "num_ref_idx_l1_active_minus1");
- break;
- default: ;
- }
- TEST_SB_END();
- break;
- default: ;
- }
- ref_pic_list_modification(slice_type, Element_Code==20); //nal_unit_type==20 --> ref_pic_list_mvc_modification()
- if (((*pic_parameter_set_Item)->weighted_pred_flag && (slice_type==0 || slice_type==3 || slice_type==5 || slice_type==8))
- || ((*pic_parameter_set_Item)->weighted_bipred_idc==1 && (slice_type==1 || slice_type==6)))
- pred_weight_table(num_ref_idx_l0_active_minus1, num_ref_idx_l1_active_minus1, (*seq_parameter_set_Item)->ChromaArrayType());
- std::vector<int8u> memory_management_control_operations;
- if (nal_ref_idc)
- dec_ref_pic_marking(memory_management_control_operations);
-
- if ((*pic_parameter_set_Item)->entropy_coding_mode_flag &&
- (slice_type!=2 && slice_type!=7 && //I-Frames
- slice_type!=4 && slice_type!=9)) //SI-Frames
- Skip_UE( "cabac_init_idc");
- Skip_SE( "slice_qp_delta");
- switch (slice_type)
- {
- case 3 : //SP-Frame
- case 4 : //SI-Frame
- case 8 : //SP-Frame
- case 9 : //SI-Frame
- switch (slice_type)
- {
- case 3 : //SP-Frame
- case 8 : //SP-Frame
- Skip_SB( "sp_for_switch_flag");
- break;
- default: ;
- }
- Skip_SE ( "slice_qs_delta");
- break;
- default: ;
- }
- if ((*pic_parameter_set_Item)->deblocking_filter_control_present_flag)
- {
- Get_UE(disable_deblocking_filter_idc, "disable_deblocking_filter_idc");
- if (disable_deblocking_filter_idc!=1)
- {
- Skip_SE( "slice_alpha_c0_offset_div2");
- Skip_SE( "slice_beta_offset_div2");
- }
- }
- num_slice_groups_minus1=(*pic_parameter_set_Item)->num_slice_groups_minus1; //Default
- slice_group_map_type=(*pic_parameter_set_Item)->slice_group_map_type; //Default
- //if (num_slice_groups_minus1 > 0 && slice_group_map_type >=3 && slice_group_map_type <=5)
- // Get_BS ((*seq_parameter_set_Item)->log2_max_slice_group_change_cycle_minus4+4, slice_group_change_cycle, "slice_group_change_cycle");
-
- Element_End0();
-
- FILLING_BEGIN();
- //Count of I-Frames
- if (first_mb_in_slice==0 && Element_Code!=20 && (slice_type==2 || slice_type==7)) //Not slice_layer_extension, I-Frame
- IFrame_Count++;
-
- //pic_struct
- if (field_pic_flag && (*seq_parameter_set_Item)->pic_struct_FirstDetected==(int8u)-1)
- (*seq_parameter_set_Item)->pic_struct_FirstDetected=bottom_field_flag?2:1; //2=BFF, 1=TFF
-
- //Saving some info
- int32s TemporalReferences_Offset_pic_order_cnt_lsb_Diff=0;
- if ((*seq_parameter_set_Item)->pic_order_cnt_type!=1 && first_mb_in_slice==0 && (Element_Code!=0x14 || seq_parameter_sets.empty())) //Not slice_layer_extension except if MVC only
- {
- if (field_pic_flag)
- {
- Structure_Field++;
- if (bottom_field_flag)
- Interlaced_Bottom++;
- else
- Interlaced_Top++;
- }
- else
- Structure_Frame++;
-
- //Frame order detection
- int64s pic_order_cnt=0;
- switch ((*seq_parameter_set_Item)->pic_order_cnt_type)
- {
- case 0 :
- {
- if (Element_Code==5) //IDR
- {
- prevPicOrderCntMsb=0;
- prevPicOrderCntLsb=0;
- TemporalReferences_Offset=TemporalReferences_Max;
- if (TemporalReferences_Offset%2)
- TemporalReferences_Offset++;
- TemporalReferences_pic_order_cnt_Min=0;
- }
- else
- {
- bool Has5=false;
- for (std::vector<int8u>::iterator Temp=memory_management_control_operations.begin(); Temp!=memory_management_control_operations.end(); ++Temp)
- if ((*Temp)==5)
- {
- Has5=true;
- break;
- }
- if (Has5)
- {
- prevPicOrderCntMsb=0;
- if (bottom_field_flag)
- prevPicOrderCntLsb=0;
- else
- prevPicOrderCntLsb=prevTopFieldOrderCnt;
- }
- }
- int32s PicOrderCntMsb;
- if (prevPicOrderCntLsb==(int32u)-1)
- {
- PicOrderCntMsb=0;
- if ((int32u)(2*((*seq_parameter_set_Item)->max_num_ref_frames+3))<pic_order_cnt_lsb)
- TemporalReferences_Min=pic_order_cnt_lsb-2*((*seq_parameter_set_Item)->max_num_ref_frames+3);
- }
- else if (pic_order_cnt_lsb<prevPicOrderCntLsb && prevPicOrderCntLsb-pic_order_cnt_lsb>=(*seq_parameter_set_Item)->MaxPicOrderCntLsb/2)
- PicOrderCntMsb=prevPicOrderCntMsb+(*seq_parameter_set_Item)->MaxPicOrderCntLsb;
- else if (pic_order_cnt_lsb>prevPicOrderCntLsb && pic_order_cnt_lsb-prevPicOrderCntLsb>(*seq_parameter_set_Item)->MaxPicOrderCntLsb/2)
- PicOrderCntMsb=prevPicOrderCntMsb-(*seq_parameter_set_Item)->MaxPicOrderCntLsb;
- else
- PicOrderCntMsb=prevPicOrderCntMsb;
-
- int32s TopFieldOrderCnt=PicOrderCntMsb+pic_order_cnt_lsb;
- int32s BottomFieldOrderCnt;
- if (field_pic_flag)
- BottomFieldOrderCnt=TopFieldOrderCnt+delta_pic_order_cnt_bottom;
- else
- BottomFieldOrderCnt=PicOrderCntMsb+pic_order_cnt_lsb;
-
- prevPicOrderCntMsb=PicOrderCntMsb;
- prevPicOrderCntLsb=pic_order_cnt_lsb;
- prevTopFieldOrderCnt=TopFieldOrderCnt;
-
- pic_order_cnt=bottom_field_flag?BottomFieldOrderCnt:TopFieldOrderCnt;
- }
- break;
- case 2 :
- {
- bool Has5=false;
- for (std::vector<int8u>::iterator Temp=memory_management_control_operations.begin(); Temp!=memory_management_control_operations.end(); ++Temp)
- if ((*Temp)==5)
- {
- Has5=true;
- break;
- }
- if (Has5)
- prevFrameNumOffset=0;
- int32u FrameNumOffset;
-
- if (Element_Code==5) //IdrPicFlag
- {
- TemporalReferences_Offset=TemporalReferences_Max;
- if (TemporalReferences_Offset%2)
- TemporalReferences_Offset++;
- FrameNumOffset=0;
- }
- else if (prevFrameNumOffset==(int32u)-1)
- FrameNumOffset=0;
- else if (prevFrameNum>frame_num)
- FrameNumOffset=prevFrameNumOffset+(*seq_parameter_set_Item)->MaxFrameNum;
- else
- FrameNumOffset=prevFrameNumOffset;
-
- int32u tempPicOrderCnt;
- if (Element_Code==5) //IdrPicFlag
- tempPicOrderCnt=0;
- else
- {
- tempPicOrderCnt=2*(FrameNumOffset+frame_num);
- if (!nal_ref_idc && tempPicOrderCnt) //Note: if nal_ref_idc is 0, tempPicOrderCnt is not expected to be 0 but it may be the case with invalid streams
- tempPicOrderCnt--;
- }
-
- pic_order_cnt=tempPicOrderCnt;
-
- prevFrameNum=frame_num;
- prevFrameNumOffset=FrameNumOffset;
-
- pic_order_cnt_lsb=frame_num;
- }
- break;
- default: ;
- }
-
- if (pic_order_cnt<TemporalReferences_pic_order_cnt_Min)
- {
- if (pic_order_cnt<0)
- {
- size_t Base=(size_t)(TemporalReferences_Offset+TemporalReferences_pic_order_cnt_Min);
- size_t ToInsert=(size_t)(TemporalReferences_pic_order_cnt_Min-pic_order_cnt);
- if (Base+ToInsert>=4*TemporalReferences_Reserved || Base>=4*TemporalReferences_Reserved || ToInsert+TemporalReferences_Max>=4*TemporalReferences_Reserved || TemporalReferences_Max>=4*TemporalReferences_Reserved || TemporalReferences_Max-Base>=4*TemporalReferences_Reserved)
- {
- Trusted_IsNot("Problem in temporal references");
- return;
- }
- Element_Info1(__T("Offset of ")+Ztring::ToZtring(ToInsert));
- TemporalReferences.insert(TemporalReferences.begin()+Base, ToInsert, NULL);
- TemporalReferences_Offset+=ToInsert;
- TemporalReferences_Max+=ToInsert;
- TemporalReferences_pic_order_cnt_Min=pic_order_cnt;
- }
- else if (TemporalReferences_Min>(size_t)(TemporalReferences_Offset+pic_order_cnt))
- TemporalReferences_Min=(size_t)(TemporalReferences_Offset+pic_order_cnt);
- }
-
- if (pic_order_cnt<0 && TemporalReferences_Offset<(size_t)(-pic_order_cnt)) //Found in playreadyEncryptedBlowUp.ts without encryption test
- {
- Trusted_IsNot("Problem in temporal references");
- return;
- }
-
- if ((size_t)(TemporalReferences_Offset+pic_order_cnt)>=3*TemporalReferences_Reserved)
- {
- size_t Offset=TemporalReferences_Max-TemporalReferences_Offset;
- if (Offset%2)
- Offset++;
- if (Offset>=TemporalReferences_Reserved && pic_order_cnt>=(int64s)TemporalReferences_Reserved)
- {
- TemporalReferences_Offset+=TemporalReferences_Reserved;
- pic_order_cnt-=TemporalReferences_Reserved;
- switch ((*seq_parameter_set_Item)->pic_order_cnt_type)
- {
- case 0 :
- prevPicOrderCntMsb-=(int32u)TemporalReferences_Reserved;
- break;
- case 2 :
- prevFrameNumOffset-=(int32u)TemporalReferences_Reserved/2;
- break;
- default:;
- }
- }
- else if (Offset && Offset<=2) //Only I-frames
- TemporalReferences_Offset+=2;
- while (TemporalReferences_Offset+pic_order_cnt>=3*TemporalReferences_Reserved)
- {
- for (size_t Pos=0; Pos<TemporalReferences_Reserved; Pos++)
- {
- if (TemporalReferences[Pos])
- {
- if ((Pos%2)==0)
- PictureTypes_PreviousFrames+=Avc_slice_type[TemporalReferences[Pos]->slice_type];
- }
- else if (!PictureTypes_PreviousFrames.empty()) //Only if stream already started
- {
- if ((Pos%2)==0)
- PictureTypes_PreviousFrames+=' ';
- }
- delete TemporalReferences[Pos];
- }
- if (PictureTypes_PreviousFrames.size()>=8*TemporalReferences.size())
- PictureTypes_PreviousFrames.erase(PictureTypes_PreviousFrames.begin(), PictureTypes_PreviousFrames.begin()+PictureTypes_PreviousFrames.size()-TemporalReferences.size());
- TemporalReferences.erase(TemporalReferences.begin(), TemporalReferences.begin()+TemporalReferences_Reserved);
- TemporalReferences.resize(4*TemporalReferences_Reserved);
- if (TemporalReferences_Reserved<TemporalReferences_Offset)
- TemporalReferences_Offset-=TemporalReferences_Reserved;
- else
- TemporalReferences_Offset=0;
- if (TemporalReferences_Reserved<TemporalReferences_Min)
- TemporalReferences_Min-=TemporalReferences_Reserved;
- else
- TemporalReferences_Min=0;
- if (TemporalReferences_Reserved<TemporalReferences_Max)
- TemporalReferences_Max-=TemporalReferences_Reserved;
- else
- TemporalReferences_Max=0;
- }
- }
-
- TemporalReferences_Offset_pic_order_cnt_lsb_Diff=(int32s)((int32s)(TemporalReferences_Offset+pic_order_cnt)-TemporalReferences_Offset_pic_order_cnt_lsb_Last);
- TemporalReferences_Offset_pic_order_cnt_lsb_Last=(size_t)(TemporalReferences_Offset+pic_order_cnt);
- if (TemporalReferences_Max<=TemporalReferences_Offset_pic_order_cnt_lsb_Last)
- TemporalReferences_Max=TemporalReferences_Offset_pic_order_cnt_lsb_Last+((*seq_parameter_set_Item)->frame_mbs_only_flag?2:1);
- if (TemporalReferences_Min>TemporalReferences_Offset_pic_order_cnt_lsb_Last)
- TemporalReferences_Min=TemporalReferences_Offset_pic_order_cnt_lsb_Last;
- if (TemporalReferences_DelayedElement)
- {
- delete TemporalReferences[TemporalReferences_Offset_pic_order_cnt_lsb_Last]; TemporalReferences[TemporalReferences_Offset_pic_order_cnt_lsb_Last]=TemporalReferences_DelayedElement;
- }
- if (TemporalReferences[TemporalReferences_Offset_pic_order_cnt_lsb_Last]==NULL)
- TemporalReferences[TemporalReferences_Offset_pic_order_cnt_lsb_Last]=new temporal_reference();
- TemporalReferences[TemporalReferences_Offset_pic_order_cnt_lsb_Last]->frame_num=frame_num;
- TemporalReferences[TemporalReferences_Offset_pic_order_cnt_lsb_Last]->slice_type=(int8u)slice_type;
- TemporalReferences[TemporalReferences_Offset_pic_order_cnt_lsb_Last]->IsTop=!bottom_field_flag;
- TemporalReferences[TemporalReferences_Offset_pic_order_cnt_lsb_Last]->IsField=field_pic_flag;
- if (TemporalReferences_DelayedElement)
- {
- TemporalReferences_DelayedElement=NULL;
- sei_message_user_data_registered_itu_t_t35_GA94_03_Delayed((*pic_parameter_set_Item)->seq_parameter_set_id);
- }
- }
-
- if ((*seq_parameter_set_Item)->vui_parameters && (*seq_parameter_set_Item)->vui_parameters->timing_info_present_flag && (*seq_parameter_set_Item)->vui_parameters->num_units_in_tick)
- tc=float64_int64s(((float64)1000000000)/((float64)(*seq_parameter_set_Item)->vui_parameters->time_scale/(*seq_parameter_set_Item)->vui_parameters->num_units_in_tick/((*seq_parameter_set_Item)->pic_order_cnt_type==2?1:2)/FrameRate_Divider)/((!(*seq_parameter_set_Item)->frame_mbs_only_flag && field_pic_flag)?2:1));
- if (first_mb_in_slice==0)
- {
- if (Frame_Count==0)
- {
- if (FrameInfo.PTS==(int64u)-1)
- FrameInfo.PTS=FrameInfo.DTS+tc*(TemporalReferences_Offset_pic_order_cnt_lsb_Diff?2:1)*((!(*seq_parameter_set_Item)->frame_mbs_only_flag && field_pic_flag)?2:1); //No PTS in container
- PTS_Begin=FrameInfo.PTS;
- }
- #if MEDIAINFO_ADVANCED2
- if (PTS_Begin_Segment==(int64u)-1 && File_Offset>=Config->File_Current_Offset)
- {
- PTS_Begin_Segment=FrameInfo.PTS;
- }
- #endif //MEDIAINFO_ADVANCED2
- if (slice_type==2 || slice_type==7) //IFrame
- FirstPFrameInGop_IsParsed=false;
- }
- else
- {
- if (FrameInfo.PTS!=(int64u)-1)
- FrameInfo.PTS-=tc;
- if (FrameInfo.DTS!=(int64u)-1)
- FrameInfo.DTS-=tc;
- }
-
- //Frame pos
- if (Frame_Count!=(int64u)-1 && Frame_Count && ((!(*seq_parameter_set_Item)->frame_mbs_only_flag && Interlaced_Top==Interlaced_Bottom && field_pic_flag) || first_mb_in_slice!=0 || (Element_Code==0x14 && !seq_parameter_sets.empty())))
- {
- Frame_Count--;
- if (IFrame_Count && Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded--;
- Frame_Count_InThisBlock--;
- }
- else if (first_mb_in_slice==0)
- {
- if ((*seq_parameter_set_Item)->pic_order_cnt_type!=1 && (Element_Code!=0x14 || seq_parameter_sets.empty())) //Not slice_layer_extension except if MVC only
- {
- if ((!IsSub || Frame_Count_InThisBlock) && TemporalReferences_Offset_pic_order_cnt_lsb_Diff && TemporalReferences_Offset_pic_order_cnt_lsb_Diff!=2)
- FrameInfo.PTS+=(TemporalReferences_Offset_pic_order_cnt_lsb_Diff-(field_pic_flag?1:2))/((!(*seq_parameter_set_Item)->frame_mbs_only_flag && field_pic_flag)?1:2)*(int64s)tc;
- }
-
- if (!FirstPFrameInGop_IsParsed && (slice_type==0 || slice_type==5)) //P-Frame
- {
- FirstPFrameInGop_IsParsed=true;
-
- //Testing if we have enough to test GOP
- if (Frame_Count<=Frame_Count_Valid)
- {
- std::string PictureTypes(PictureTypes_PreviousFrames);
- PictureTypes.reserve(TemporalReferences.size());
- for (size_t Pos=0; Pos<TemporalReferences.size(); Pos++)
- if (TemporalReferences[Pos])
- {
- if ((Pos%2)==0)
- PictureTypes+=Avc_slice_type[TemporalReferences[Pos]->slice_type];
- }
- else if (!PictureTypes.empty()) //Only if stream already started
- {
- if ((Pos%2)==0)
- PictureTypes+=' ';
- }
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- if (!GOP_Detect(PictureTypes).empty() && !GA94_03_IsPresent)
- Frame_Count_Valid=Frame_Count; //We have enough frames
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- }
- }
- }
-
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- Element_Info1(TemporalReferences_Offset_pic_order_cnt_lsb_Last);
- Element_Info1((((*seq_parameter_set_Item)->frame_mbs_only_flag || !field_pic_flag)?__T("Frame "):(bottom_field_flag?__T("Field (Bottom) "):__T("Field (Top) ")))+Ztring::ToZtring(Frame_Count));
- if (slice_type<9)
- Element_Info1(__T("slice_type ")+Ztring().From_Local(Avc_slice_type[slice_type]));
- Element_Info1(__T("frame_num ")+Ztring::ToZtring(frame_num));
- if ((*seq_parameter_set_Item)->vui_parameters && (*seq_parameter_set_Item)->vui_parameters->fixed_frame_rate_flag)
- {
- if (FrameInfo.PCR!=(int64u)-1)
- Element_Info1(__T("PCR ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.PCR)/1000000)));
- if (FrameInfo.DTS!=(int64u)-1)
- Element_Info1(__T("DTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.DTS)/1000000)));
- if (FrameInfo.PTS!=(int64u)-1)
- Element_Info1(__T("PTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.PTS)/1000000)));
- }
- if ((*seq_parameter_set_Item)->pic_order_cnt_type==0)
- Element_Info1(__T("pic_order_cnt_lsb ")+Ztring::ToZtring(pic_order_cnt_lsb));
- if (first_mb_in_slice)
- Element_Info1(__T("first_mb_in_slice ")+Ztring::ToZtring(first_mb_in_slice));
- }
- #endif //MEDIAINFO_TRACE
-
- //Counting
- if (Frame_Count!=(int64u)-1)
- {
- if (File_Offset+Buffer_Offset+Element_Size==File_Size)
- Frame_Count_Valid=Frame_Count; //Finish frames in case of there are less than Frame_Count_Valid frames
- Frame_Count++;
- if (IFrame_Count && Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- Frame_Count_InThisBlock++;
- }
- if ((*seq_parameter_set_Item)->pic_order_cnt_type==0 && field_pic_flag)
- {
- Field_Count++;
- Field_Count_InThisBlock++;
- }
- if (FrameInfo.PTS!=(int64u)-1)
- FrameInfo.PTS+=tc;
- if (FrameInfo.DTS!=(int64u)-1)
- FrameInfo.DTS+=tc;
- if (FrameInfo.PTS!=(int64u)-1 && (FrameInfo.PTS>PTS_End || (PTS_End>1000000000 && FrameInfo.PTS<=PTS_End-1000000000))) //More than current PTS_End or less than current PTS_End minus 1 second (there is a problem?)
- PTS_End=FrameInfo.PTS;
-
- #if MEDIAINFO_DUPLICATE
- if (Streams[(size_t)Element_Code].ShouldDuplicate)
- File__Duplicate_Write(Element_Code, (*seq_parameter_set_Item)->pic_order_cnt_type==0?pic_order_cnt_lsb:frame_num);
- #endif //MEDIAINFO_DUPLICATE
-
- //Filling only if not already done
- if (Frame_Count==1 && !Status[IsAccepted])
- Accept("AVC");
- if (!Status[IsFilled])
- {
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- if (!GA94_03_IsPresent && IFrame_Count>=8)
- Frame_Count_Valid=Frame_Count; //We have enough frames
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- if (Frame_Count>=Frame_Count_Valid)
- {
- Fill("AVC");
- if (!IsSub && !Streams[(size_t)Element_Code].ShouldDuplicate && MediaInfoLib::Config.ParseSpeed_Get()<1.0)
- Finish("AVC");
- }
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Avc::slice_data(bool AllCategories)
-{
- Element_Begin1("slice_data");
-
- Skip_BS(Data_BS_Remain(), "(ToDo)");
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Avc::ref_pic_list_modification(int32u slice_type, bool mvc)
-{
- if ((slice_type%5)!=2 && (slice_type%5)!=4)
- {
- TEST_SB_SKIP( "ref_pic_list_modification_flag_l0");
- int32u modification_of_pic_nums_idc;
- do
- {
- Get_UE (modification_of_pic_nums_idc, "modification_of_pic_nums_idc");
- if (modification_of_pic_nums_idc<2)
- Skip_UE( "abs_diff_pic_num_minus1");
- else if (modification_of_pic_nums_idc==2)
- Skip_UE( "long_term_pic_num");
- else if (mvc && (modification_of_pic_nums_idc==4 || modification_of_pic_nums_idc==5)) //ref_pic_list_mvc_modification only
- Skip_UE( "abs_diff_view_idx_minus1");
- else if (modification_of_pic_nums_idc!=3)
- {
- Trusted_IsNot("ref_pic_list_modification_flag_l0");
- Skip_BS(Data_BS_Remain(), "(Remaining bits)");
- }
- }
- while (modification_of_pic_nums_idc!=3 && Data_BS_Remain());
- TEST_SB_END();
- }
- if ((slice_type%5)==1)
- {
- TEST_SB_SKIP( "ref_pic_list_modification_flag_l1");
- int32u modification_of_pic_nums_idc;
- do
- {
- Get_UE (modification_of_pic_nums_idc, "modification_of_pic_nums_idc");
- if (modification_of_pic_nums_idc<2)
- Skip_UE( "abs_diff_pic_num_minus1");
- else if (modification_of_pic_nums_idc==2)
- Skip_UE( "long_term_pic_num");
- else if (mvc && (modification_of_pic_nums_idc==4 || modification_of_pic_nums_idc==5)) //ref_pic_list_mvc_modification only
- Skip_UE( "abs_diff_view_idx_minus1");
- else if (modification_of_pic_nums_idc!=3)
- {
- Trusted_IsNot("ref_pic_list_modification_flag_l1");
- Skip_BS(Data_BS_Remain(), "(Remaining bits)");
- }
- }
- while (modification_of_pic_nums_idc!=3 && Data_BS_Remain());
- TEST_SB_END();
- }
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Avc::pred_weight_table(int32u num_ref_idx_l0_active_minus1, int32u num_ref_idx_l1_active_minus1, int8u ChromaArrayType)
-{
- Skip_UE( "luma_log2_weight_denom");
- if (ChromaArrayType)
- Skip_UE( "chroma_log2_weight_denom");
- for(int32u i=0; i<=num_ref_idx_l0_active_minus1; i++)
- {
- TEST_SB_SKIP( "luma_weight_l0_flag");
- Skip_SE( "luma_weight_l0");
- Skip_SE( "luma_offset_l0");
- TEST_SB_END();
- }
- if (ChromaArrayType)
- {
- TEST_SB_SKIP( "chroma_weight_l0_flag");
- Skip_SE( "chroma_weight_l0");
- Skip_SE( "chroma_offset_l0");
- TEST_SB_END();
- }
-}
-
-//---------------------------------------------------------------------------
-//
-void File_Avc::dec_ref_pic_marking(std::vector<int8u> &memory_management_control_operations)
-{
- if (Element_Code==5) //IdrPicFlag
- {
- Skip_SB( "no_output_of_prior_pics_flag");
- Skip_SB( "long_term_reference_flag");
- }
- else
- {
- TEST_SB_SKIP( "adaptive_ref_pic_marking_mode_flag");
- int32u memory_management_control_operation;
- do
- {
- Get_UE (memory_management_control_operation, "memory_management_control_operation");
- switch (memory_management_control_operation)
- {
- case 1 :
- Skip_UE( "difference_of_pic_nums_minus1");
- break;
- case 2 :
- Skip_UE( "long_term_pic_num");
- break;
- case 3 :
- Skip_UE( "difference_of_pic_nums_minus1");
- //break; 3 --> difference_of_pic_nums_minus1 then long_term_frame_idx
- case 6 :
- Skip_UE( "long_term_frame_idx");
- break;
- case 4 :
- Skip_UE( "max_long_term_frame_idx_plus1");
- break;
- }
- memory_management_control_operations.push_back((int8u)memory_management_control_operation);
- }
- while (Data_BS_Remain() && memory_management_control_operation);
- TEST_SB_END()
- }
-}
-
-//---------------------------------------------------------------------------
-// Packet "06"
-void File_Avc::sei()
-{
- Element_Name("sei");
-
- //Parsing
- int32u seq_parameter_set_id=(int32u)-1;
- while(Element_Offset+1<Element_Size)
- {
- Element_Begin1("sei message");
- sei_message(seq_parameter_set_id);
- Element_End0();
- }
- BS_Begin();
- Mark_1( );
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::sei_message(int32u &seq_parameter_set_id)
-{
- //Parsing
- int32u payloadType=0, payloadSize=0;
- int8u payload_type_byte, payload_size_byte;
- Element_Begin1("sei message header");
- do
- {
- Get_B1 (payload_type_byte, "payload_type_byte");
- payloadType+=payload_type_byte;
- }
- while(payload_type_byte==0xFF);
- do
- {
- Get_B1 (payload_size_byte, "payload_size_byte");
- payloadSize+=payload_size_byte;
- }
- while(payload_size_byte==0xFF);
- Element_End0();
-
- int64u Element_Offset_Save=Element_Offset+payloadSize;
- if (Element_Offset_Save>Element_Size)
- {
- Trusted_IsNot("Wrong size");
- Skip_XX(Element_Size-Element_Offset, "unknown");
- return;
- }
- int64u Element_Size_Save=Element_Size;
- Element_Size=Element_Offset_Save;
- switch (payloadType)
- {
- case 0 : sei_message_buffering_period(seq_parameter_set_id); break;
- case 1 : sei_message_pic_timing(payloadSize, seq_parameter_set_id); break;
- case 4 : sei_message_user_data_registered_itu_t_t35(); break;
- case 5 : sei_message_user_data_unregistered(payloadSize); break;
- case 6 : sei_message_recovery_point(); break;
- case 32 : sei_message_mainconcept(payloadSize); break;
- default :
- Element_Info1("unknown");
- Skip_XX(payloadSize, "data");
- }
- Element_Offset=Element_Offset_Save; //Positionning in the right place.
- Element_Size=Element_Size_Save; //Positionning in the right place.
-}
-
-//---------------------------------------------------------------------------
-// SEI - 0
-void File_Avc::sei_message_buffering_period(int32u &seq_parameter_set_id)
-{
- Element_Info1("buffering_period");
-
- //Parsing
- if (Element_Offset==Element_Size)
- return; //Nothing to do
- BS_Begin();
- Get_UE (seq_parameter_set_id, "seq_parameter_set_id");
- std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item;
- if (seq_parameter_set_id>=seq_parameter_sets.size() || (*(seq_parameter_set_Item=seq_parameter_sets.begin()+seq_parameter_set_id))==NULL)
- {
- //Not yet present
- Skip_BS(Data_BS_Remain(), "Data (seq_parameter_set is missing)");
- BS_End();
- return;
- }
- if ((*seq_parameter_set_Item)->NalHrdBpPresentFlag())
- sei_message_buffering_period_xxl((*seq_parameter_set_Item)->vui_parameters->NAL);
- if ((*seq_parameter_set_Item)->VclHrdBpPresentFlag())
- sei_message_buffering_period_xxl((*seq_parameter_set_Item)->vui_parameters->VCL);
- BS_End();
-}
-
-void File_Avc::sei_message_buffering_period_xxl(seq_parameter_set_struct::vui_parameters_struct::xxl* xxl)
-{
- if (xxl==NULL)
- return;
- for (int32u SchedSelIdx=0; SchedSelIdx<xxl->SchedSel.size(); SchedSelIdx++)
- {
- //Get_S4 (xxl->initial_cpb_removal_delay_length_minus1+1, xxl->SchedSel[SchedSelIdx].initial_cpb_removal_delay, "initial_cpb_removal_delay"); Param_Info2(xxl->SchedSel[SchedSelIdx].initial_cpb_removal_delay/90, " ms");
- //Get_S4 (xxl->initial_cpb_removal_delay_length_minus1+1, xxl->SchedSel[SchedSelIdx].initial_cpb_removal_delay_offset, "initial_cpb_removal_delay_offset"); Param_Info2(xxl->SchedSel[SchedSelIdx].initial_cpb_removal_delay_offset/90, " ms");
- Info_S4 (xxl->initial_cpb_removal_delay_length_minus1+1, initial_cpb_removal_delay, "initial_cpb_removal_delay"); Param_Info2(initial_cpb_removal_delay/90, " ms");
- Info_S4 (xxl->initial_cpb_removal_delay_length_minus1+1, initial_cpb_removal_delay_offset, "initial_cpb_removal_delay_offset"); Param_Info2(initial_cpb_removal_delay_offset/90, " ms");
- }
-}
-
-//---------------------------------------------------------------------------
-// SEI - 1
-void File_Avc::sei_message_pic_timing(int32u /*payloadSize*/, int32u seq_parameter_set_id)
-{
- Element_Info1("pic_timing");
-
- //Testing if we can parsing it now. TODO: handle case seq_parameter_set_id is unknown (buffering of message, decoding in slice parsing)
- if (seq_parameter_set_id==(int32u)-1 && seq_parameter_sets.size()==1)
- seq_parameter_set_id=0;
- std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item;
- if (seq_parameter_set_id>=seq_parameter_sets.size() || (*(seq_parameter_set_Item=seq_parameter_sets.begin()+seq_parameter_set_id))==NULL)
- {
- //Not yet present
- Skip_BS(Data_BS_Remain(), "Data (seq_parameter_set is missing)");
- return;
- }
-
- //Parsing
- int8u pic_struct=(int8u)-1;
- BS_Begin();
- if ((*seq_parameter_set_Item)->CpbDpbDelaysPresentFlag())
- {
- int8u cpb_removal_delay_length_minus1=(*seq_parameter_set_Item)->vui_parameters->NAL?(*seq_parameter_set_Item)->vui_parameters->NAL->cpb_removal_delay_length_minus1:(*seq_parameter_set_Item)->vui_parameters->VCL->cpb_removal_delay_length_minus1; //Spec is not precise, I am not sure
- int8u dpb_output_delay_length_minus1=(*seq_parameter_set_Item)->vui_parameters->NAL?(*seq_parameter_set_Item)->vui_parameters->NAL->dpb_output_delay_length_minus1:(*seq_parameter_set_Item)->vui_parameters->VCL->dpb_output_delay_length_minus1; //Spec is not precise, I am not sure
- Skip_S4(cpb_removal_delay_length_minus1+1, "cpb_removal_delay");
- Skip_S4(dpb_output_delay_length_minus1+1, "dpb_output_delay");
- }
- if ((*seq_parameter_set_Item)->vui_parameters && (*seq_parameter_set_Item)->vui_parameters->pic_struct_present_flag)
- {
- Get_S1 (4, pic_struct, "pic_struct");
- switch (pic_struct)
- {
- case 0 :
- case 1 :
- case 2 :
- case 3 :
- case 4 :
- case 5 :
- case 6 : break;
- case 7 : FrameRate_Divider=2; break;
- case 8 : FrameRate_Divider=3; break;
- default : Param_Info1("Reserved"); return; //NumClockTS is unknown
- }
- Param_Info1(Avc_pic_struct[pic_struct]);
- int8u NumClockTS=Avc_NumClockTS[pic_struct];
- int8u seconds_value=0, minutes_value=0, hours_value=0; //Here because theses values can be reused in later ClockTSs.
- for (int8u i=0; i<NumClockTS; i++)
- {
- Element_Begin1("ClockTS");
- TEST_SB_SKIP( "clock_timestamp_flag");
- Ztring TimeStamp;
- int32u time_offset=0;
- int8u n_frames;
- bool full_timestamp_flag, nuit_field_based_flag;
- Info_S1(2, ct_type, "ct_type"); Param_Info1(Avc_ct_type[ct_type]);
- Get_SB ( nuit_field_based_flag, "nuit_field_based_flag");
- Skip_S1(5, "counting_type");
- Get_SB ( full_timestamp_flag, "full_timestamp_flag");
- Skip_SB( "discontinuity_flag");
- Skip_SB( "cnt_dropped_flag");
- Get_S1 (8, n_frames, "n_frames");
- if (full_timestamp_flag)
- {
- Get_S1 (6, seconds_value, "seconds_value");
- Get_S1 (6, minutes_value, "minutes_value");
- Get_S1 (5, hours_value, "hours_value");
- }
- else
- {
- TEST_SB_SKIP( "seconds_flag");
- Get_S1 (6, seconds_value, "seconds_value");
- TEST_SB_SKIP( "minutes_flag");
- Get_S1 (6, minutes_value, "minutes_value");
- TEST_SB_SKIP( "hours_flag");
- Get_S1 (5, hours_value, "hours_value");
- TEST_SB_END();
- TEST_SB_END();
- TEST_SB_END();
- }
- TimeStamp=Ztring::ToZtring(hours_value)+__T(':')+Ztring::ToZtring(minutes_value)+__T(':')+Ztring::ToZtring(seconds_value);
- if ((*seq_parameter_set_Item)->CpbDpbDelaysPresentFlag())
- {
- int8u time_offset_length=(*seq_parameter_set_Item)->vui_parameters->NAL?(*seq_parameter_set_Item)->vui_parameters->NAL->time_offset_length:(*seq_parameter_set_Item)->vui_parameters->VCL->time_offset_length; //Spec is not precise, I am not sure
- if (time_offset_length)
- Get_S4 (time_offset_length, time_offset, "time_offset");
- }
- if ((*seq_parameter_set_Item)->vui_parameters && (*seq_parameter_set_Item)->vui_parameters->timing_info_present_flag && (*seq_parameter_set_Item)->vui_parameters->time_scale)
- {
- float32 Milliseconds=((float32)(n_frames*((*seq_parameter_set_Item)->vui_parameters->num_units_in_tick*(1+(nuit_field_based_flag?1:0)))+time_offset))/(*seq_parameter_set_Item)->vui_parameters->time_scale;
- TimeStamp+=__T('.');
- TimeStamp+=Ztring::ToZtring(Milliseconds);
- }
- Param_Info1(TimeStamp);
- TEST_SB_END();
- Element_End0();
- }
- }
- BS_End();
-
- FILLING_BEGIN();
- if ((*seq_parameter_set_Item)->pic_struct_FirstDetected==(int8u)-1 && (*seq_parameter_set_Item)->vui_parameters && (*seq_parameter_set_Item)->vui_parameters->pic_struct_present_flag)
- (*seq_parameter_set_Item)->pic_struct_FirstDetected=pic_struct;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// SEI - 5
-void File_Avc::sei_message_user_data_registered_itu_t_t35()
-{
- Element_Info1("user_data_registered_itu_t_t35");
-
- //Parsing
- int8u itu_t_t35_country_code;
- Get_B1 (itu_t_t35_country_code, "itu_t_t35_country_code");
- if (itu_t_t35_country_code==0xFF)
- Skip_B1( "itu_t_t35_country_code_extension_byte");
- if (itu_t_t35_country_code!=0xB5 || Element_Offset+2>=Element_Size)
- {
- if (Element_Size-Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- return;
- }
-
- //United-States
- int16u id;
- Get_B2 (id, "id?");
- if (id!=0x0031 || Element_Offset+4>=Element_Size)
- {
- if (Element_Size-Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- return;
- }
-
- int32u Identifier;
- Peek_B4(Identifier);
- switch (Identifier)
- {
- case 0x44544731 : sei_message_user_data_registered_itu_t_t35_DTG1(); return;
- case 0x47413934 : sei_message_user_data_registered_itu_t_t35_GA94(); return;
- default : if (Element_Size-Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- }
-}
-
-//---------------------------------------------------------------------------
-// SEI - 5 - DTG1
-void File_Avc::sei_message_user_data_registered_itu_t_t35_DTG1()
-{
- Element_Info1("Active Format Description");
-
- //Parsing
- bool active_format_flag;
- Skip_C4( "afd_identifier");
- BS_Begin();
- Mark_0();
- Get_SB (active_format_flag, "active_format_flag");
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_0_NoTrustError();
- Mark_1_NoTrustError();
- if (active_format_flag)
- {
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Info_S1(4, active_format, "active_format"); Param_Info1(Avc_user_data_DTG1_active_format[active_format]);
- }
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-// SEI - 5 - GA94
-void File_Avc::sei_message_user_data_registered_itu_t_t35_GA94()
-{
- //Parsing
- int8u user_data_type_code;
- Skip_B4( "GA94_identifier");
- Get_B1 (user_data_type_code, "user_data_type_code");
- switch (user_data_type_code)
- {
- case 0x03 : sei_message_user_data_registered_itu_t_t35_GA94_03(); break;
- case 0x06 : sei_message_user_data_registered_itu_t_t35_GA94_06(); break;
- default : Skip_XX(Element_Size-Element_Offset, "GA94_reserved_user_data");
- }
-}
-
-//---------------------------------------------------------------------------
-// SEI - 5 - GA94 - 0x03
-void File_Avc::sei_message_user_data_registered_itu_t_t35_GA94_03()
-{
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- GA94_03_IsPresent=true;
- MustExtendParsingDuration=true;
- Buffer_TotalBytes_Fill_Max=(int64u)-1; //Disabling this feature for this format, this is done in the parser
-
- Element_Info1("DTVCC Transport");
-
- //Coherency
- delete TemporalReferences_DelayedElement; TemporalReferences_DelayedElement=new temporal_reference();
-
- TemporalReferences_DelayedElement->GA94_03=new temporal_reference::buffer_data;
- TemporalReferences_DelayedElement->GA94_03->Size=(size_t)(Element_Size-Element_Offset);
- delete[] TemporalReferences_DelayedElement->GA94_03->Data;
- TemporalReferences_DelayedElement->GA94_03->Data=new int8u[(size_t)(Element_Size-Element_Offset)];
- std::memcpy(TemporalReferences_DelayedElement->GA94_03->Data, Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset));
-
- //Parsing
- Skip_XX(Element_Size-Element_Offset, "CC data");
- #else //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- Skip_XX(Element_Size-Element_Offset, "DTVCC Transport data");
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
-}
-
-void File_Avc::sei_message_user_data_registered_itu_t_t35_GA94_03_Delayed(int32u seq_parameter_set_id)
-{
- // Skipping missing frames
- if (TemporalReferences_Max-TemporalReferences_Min>(size_t)(4*(seq_parameter_sets[seq_parameter_set_id]->max_num_ref_frames+3))) // max_num_ref_frames ref frame maximum
- {
- TemporalReferences_Min=TemporalReferences_Max-4*(seq_parameter_sets[seq_parameter_set_id]->max_num_ref_frames+3);
- while (TemporalReferences[TemporalReferences_Min]==NULL)
- TemporalReferences_Min++;
- }
-
- // Parsing captions
- while (TemporalReferences[TemporalReferences_Min] && TemporalReferences_Min+2*seq_parameter_sets[seq_parameter_set_id]->max_num_ref_frames<TemporalReferences_Max)
- {
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- Element_Begin1("Reordered DTVCC Transport");
-
- //Parsing
- #if MEDIAINFO_DEMUX
- int64u Element_Code_Old=Element_Code;
- Element_Code=0x4741393400000003LL;
- #endif //MEDIAINFO_DEMUX
- if (GA94_03_Parser==NULL)
- {
- GA94_03_Parser=new File_DtvccTransport;
- Open_Buffer_Init(GA94_03_Parser);
- ((File_DtvccTransport*)GA94_03_Parser)->Format=File_DtvccTransport::Format_A53_4_GA94_03;
- }
- if (((File_DtvccTransport*)GA94_03_Parser)->AspectRatio==0)
- {
- float64 PixelAspectRatio=1;
- std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item=seq_parameter_sets.begin();
- for (; seq_parameter_set_Item!=seq_parameter_sets.end(); ++seq_parameter_set_Item)
- if ((*seq_parameter_set_Item))
- break;
- if (seq_parameter_set_Item!=seq_parameter_sets.end())
- {
- if ((*seq_parameter_set_Item)->vui_parameters->aspect_ratio_info_present_flag)
- {
- if ((*seq_parameter_set_Item)->vui_parameters->aspect_ratio_idc<Avc_PixelAspectRatio_Size)
- PixelAspectRatio=Avc_PixelAspectRatio[(*seq_parameter_set_Item)->vui_parameters->aspect_ratio_idc];
- else if ((*seq_parameter_set_Item)->vui_parameters->aspect_ratio_idc==0xFF && (*seq_parameter_set_Item)->vui_parameters->sar_height)
- PixelAspectRatio=((float64)(*seq_parameter_set_Item)->vui_parameters->sar_width)/(*seq_parameter_set_Item)->vui_parameters->sar_height;
- }
- int32u Width =((*seq_parameter_set_Item)->pic_width_in_mbs_minus1 +1)*16;
- int32u Height=((*seq_parameter_set_Item)->pic_height_in_map_units_minus1+1)*16*(2-(*seq_parameter_set_Item)->frame_mbs_only_flag);
- ((File_DtvccTransport*)GA94_03_Parser)->AspectRatio=Width*PixelAspectRatio/Height;
- }
- }
- if (GA94_03_Parser->PTS_DTS_Needed)
- {
- GA94_03_Parser->FrameInfo.PCR=FrameInfo.PCR;
- GA94_03_Parser->FrameInfo.PTS=FrameInfo.PTS;
- GA94_03_Parser->FrameInfo.DTS=FrameInfo.DTS;
- }
- #if MEDIAINFO_DEMUX
- if (TemporalReferences[TemporalReferences_Min]->GA94_03)
- {
- int8u Demux_Level_Save=Demux_Level;
- Demux_Level=8; //Ancillary
- Demux(TemporalReferences[TemporalReferences_Min]->GA94_03->Data, TemporalReferences[TemporalReferences_Min]->GA94_03->Size, ContentType_MainStream);
- Demux_Level=Demux_Level_Save;
- }
- Element_Code=Element_Code_Old;
- #endif //MEDIAINFO_DEMUX
- if (TemporalReferences[TemporalReferences_Min]->GA94_03)
- {
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- GA94_03_Parser->ServiceDescriptors=ServiceDescriptors;
- #endif
- Open_Buffer_Continue(GA94_03_Parser, TemporalReferences[TemporalReferences_Min]->GA94_03->Data, TemporalReferences[TemporalReferences_Min]->GA94_03->Size);
- }
-
- Element_End0();
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
-
- TemporalReferences_Min+=((seq_parameter_sets[seq_parameter_set_id]->frame_mbs_only_flag | !TemporalReferences[TemporalReferences_Min]->IsField)?2:1);
- }
-}
-
-//---------------------------------------------------------------------------
-// SEI - 5 - GA94 - 0x03
-void File_Avc::sei_message_user_data_registered_itu_t_t35_GA94_06()
-{
- Element_Info1("Bar data");
-
- //Parsing
- bool top_bar_flag, bottom_bar_flag, left_bar_flag, right_bar_flag;
- BS_Begin();
- Get_SB (top_bar_flag, "top_bar_flag");
- Get_SB (bottom_bar_flag, "bottom_bar_flag");
- Get_SB (left_bar_flag, "left_bar_flag");
- Get_SB (right_bar_flag, "right_bar_flag");
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- BS_End();
- if (top_bar_flag)
- {
- Mark_1();
- Mark_1();
- Skip_S2(14, "line_number_end_of_top_bar");
- }
- if (bottom_bar_flag)
- {
- Mark_1();
- Mark_1();
- Skip_S2(14, "line_number_start_of_bottom_bar");
- }
- if (left_bar_flag)
- {
- Mark_1();
- Mark_1();
- Skip_S2(14, "pixel_number_end_of_left_bar");
- }
- if (right_bar_flag)
- {
- Mark_1();
- Mark_1();
- Skip_S2(14, "pixel_number_start_of_right_bar");
- }
- Mark_1();
- Mark_1();
- Mark_1();
- Mark_1();
- Mark_1();
- Mark_1();
- Mark_1();
- Mark_1();
- BS_End();
-
- if (Element_Size-Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "additional_bar_data");
-}
-
-//---------------------------------------------------------------------------
-// SEI - 5
-void File_Avc::sei_message_user_data_unregistered(int32u payloadSize)
-{
- Element_Info1("user_data_unregistered");
-
- //Parsing
- int128u uuid_iso_iec_11578;
- Get_GUID(uuid_iso_iec_11578, "uuid_iso_iec_11578");
-
- switch (uuid_iso_iec_11578.hi)
- {
- case 0xB748D9E6BDE945DCLL : Element_Info1("x264");
- sei_message_user_data_unregistered_x264(payloadSize-16); break;
- case 0x684E92AC604A57FBLL : Element_Info1("eavc");
- sei_message_user_data_unregistered_x264(payloadSize-16); break;
- case 0xD9114Df8608CEE17LL : Element_Info1("Blu-ray");
- sei_message_user_data_unregistered_bluray(payloadSize-16); break;
- default :
- Element_Info1("unknown");
- Skip_XX(payloadSize-16, "data");
- }
-}
-
-//---------------------------------------------------------------------------
-// SEI - 5 - x264
-void File_Avc::sei_message_user_data_unregistered_x264(int32u payloadSize)
-{
- //Parsing
- Ztring Data;
- Peek_Local(payloadSize, Data);
- if (Data.size()!=payloadSize && Data.size()+1!=payloadSize)
- {
- Skip_XX(payloadSize, "Unknown");
- return; //This is not a text string
- }
- size_t Data_Pos_Before=0;
- size_t Loop=0;
- do
- {
- size_t Data_Pos=Data.find(__T(" - "), Data_Pos_Before);
- if (Data_Pos==std::string::npos)
- Data_Pos=Data.size();
- if (Data.find(__T("options: "), Data_Pos_Before)==Data_Pos_Before)
- {
- Element_Begin1("options");
- size_t Options_Pos_Before=Data_Pos_Before;
- Encoded_Library_Settings.clear();
- do
- {
- size_t Options_Pos=Data.find(__T(" "), Options_Pos_Before);
- if (Options_Pos==std::string::npos)
- Options_Pos=Data.size();
- Ztring option;
- Get_Local (Options_Pos-Options_Pos_Before, option, "option");
- Options_Pos_Before=Options_Pos;
- do
- {
- Ztring Separator;
- Peek_Local(1, Separator);
- if (Separator==__T(" "))
- {
- Skip_Local(1, "separator");
- Options_Pos_Before+=1;
- }
- else
- break;
- }
- while (Options_Pos_Before!=Data.size());
-
- //Filling
- if (option!=__T("options:"))
- {
- if (!Encoded_Library_Settings.empty())
- Encoded_Library_Settings+=__T(" / ");
- Encoded_Library_Settings+=option;
- if (option.find(__T("bitrate="))==0)
- BitRate_Nominal=option.substr(8)+__T("000"); //After "bitrate="
- }
- }
- while (Options_Pos_Before!=Data.size());
- Element_End0();
- }
- else
- {
- Ztring Value;
- Get_Local(Data_Pos-Data_Pos_Before, Value, "data");
-
- //Saving
- if (Loop==0)
- {
- //Cleaning a little the value
- while (!Value.empty() && Value[0]<0x30)
- Value.erase(Value.begin());
- while (!Value.empty() && Value[Value.size()-1]<0x30)
- Value.erase(Value.end()-1);
- Encoded_Library=Value;
- }
- if (Loop==1 && Encoded_Library.find(__T("x264"))==0)
- {
- Encoded_Library+=__T(" - ");
- Encoded_Library+=Value;
- }
- }
- Data_Pos_Before=Data_Pos;
- if (Data_Pos_Before+3<=Data.size())
- {
- Skip_Local(3, "separator");
- Data_Pos_Before+=3;
- }
-
- Loop++;
- }
- while (Data_Pos_Before!=Data.size());
-
- //Encoded_Library
- if (Encoded_Library.find(__T("eavc "))==0)
- {
- Encoded_Library_Name=__T("eavc");
- Encoded_Library_Version=Encoded_Library.SubString(__T("eavc "), __T(""));
- }
- else if (Encoded_Library.find(__T("x264 - "))==0)
- {
- Encoded_Library_Name=__T("x264");
- Encoded_Library_Version=Encoded_Library.SubString(__T("x264 - "), __T(""));
- }
- else if (Encoded_Library.find(__T("SUPER(C) by eRightSoft "))==0)
- {
- Encoded_Library_Name=__T("SUPER(C) by eRightSoft");
- Encoded_Library_Date=Ztring(__T("UTC "))+Encoded_Library.SubString(__T("2000-"), __T(" "));
- }
- else
- Encoded_Library_Name=Encoded_Library;
-}
-
-//---------------------------------------------------------------------------
-// SEI - 5 - x264
-void File_Avc::sei_message_user_data_unregistered_bluray(int32u payloadSize)
-{
- if (payloadSize<4)
- {
- Skip_XX(payloadSize, "Unknown");
- return;
- }
- int32u Identifier;
- Get_B4 (Identifier, "Identifier");
- switch (Identifier)
- {
- case 0x47413934 : sei_message_user_data_registered_itu_t_t35_GA94_03(); return;
- default : Skip_XX(Element_Size-Element_Offset, "Unknown");
- }
-}
-
-//---------------------------------------------------------------------------
-// SEI - 6
-void File_Avc::sei_message_recovery_point()
-{
- Element_Info1("recovery_point");
-
- //Parsing
- BS_Begin();
- Skip_UE( "recovery_frame_cnt");
- Skip_SB( "exact_match_flag");
- Skip_SB( "broken_link_flag");
- Skip_S1(2, "changing_slice_group_idc");
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-// SEI - 32
-void File_Avc::sei_message_mainconcept(int32u payloadSize)
-{
- Element_Info1("MainConcept text");
-
- //Parsing
- Ztring Text;
- Get_Local(payloadSize, Text, "text");
-
- if (Text.find(__T("produced by MainConcept H.264/AVC Codec v"))!=std::string::npos)
- {
- Encoded_Library=Text.SubString(__T("produced by "), __T(" MainConcept AG"));
- Encoded_Library_Name=__T("MainConcept H.264/AVC Codec");
- Encoded_Library_Version=Text.SubString(__T("produced by MainConcept H.264/AVC Codec v"), __T(" (c) "));
- Encoded_Library_Date=MediaInfoLib::Config.Library_Get(InfoLibrary_Format_MainConcept_Avc, Encoded_Library_Version, InfoLibrary_Date);
- }
-}
-
-//---------------------------------------------------------------------------
-// Packet "07"
-void File_Avc::seq_parameter_set()
-{
- Element_Name("seq_parameter_set");
-
- //parsing
- int32u seq_parameter_set_id;
- seq_parameter_set_struct* Data_Item_New=seq_parameter_set_data(seq_parameter_set_id);
- if (!Data_Item_New)
- return;
- Mark_1( );
- size_t BS_bits=Data_BS_Remain()%8;
- while (BS_bits)
- {
- Mark_0( );
- BS_bits--;
- }
- BS_End();
-
- //Hack for 00003.m2ts: There is a trailing 0x89, why?
- if (Element_Offset+1==Element_Size)
- {
- int8u ToTest;
- Peek_B1(ToTest);
- if (ToTest==0x98)
- Skip_B1( "Unknown");
-
- }
-
- //Hack for : There is a trailing data, why?
- if (Element_Offset+4==Element_Size)
- {
- int32u ToTest;
- Peek_B4(ToTest);
- if (ToTest==0xE30633C0)
- Skip_B4( "Unknown");
- }
-
- //NULL bytes
- while (Element_Offset<Element_Size)
- {
- int8u Null;
- Get_B1 (Null, "NULL byte");
- if (Null)
- Trusted_IsNot("Should be NULL byte");
- }
-
- FILLING_BEGIN_PRECISE();
- //NextCode
- NextCode_Clear();
- NextCode_Add(0x08);
-
- //Add
- seq_parameter_set_data_Add(seq_parameter_sets, seq_parameter_set_id, Data_Item_New);
-
- //Autorisation of other streams
- Streams[0x08].Searching_Payload=true; //pic_parameter_set
- if (Streams[0x07].ShouldDuplicate)
- Streams[0x08].ShouldDuplicate=true; //pic_parameter_set
- Streams[0x0A].Searching_Payload=true; //end_of_seq
- if (Streams[0x07].ShouldDuplicate)
- Streams[0x0A].ShouldDuplicate=true; //end_of_seq
- Streams[0x0B].Searching_Payload=true; //end_of_stream
- if (Streams[0x07].ShouldDuplicate)
- Streams[0x0B].ShouldDuplicate=true; //end_of_stream
- FILLING_END();
-}
-
-void File_Avc::seq_parameter_set_data_Add(std::vector<seq_parameter_set_struct*> &Data, const int32u Data_id, seq_parameter_set_struct* Data_Item_New)
-{
- //Creating Data
- if (Data_id>=Data.size())
- Data.resize(Data_id+1);
- std::vector<seq_parameter_set_struct*>::iterator Data_Item=Data.begin()+Data_id;
- delete *Data_Item; *Data_Item=Data_Item_New;
-
- //Computing values (for speed)
- size_t MaxNumber;
- switch (Data_Item_New->pic_order_cnt_type)
- {
- case 0 :
- MaxNumber=Data_Item_New->MaxPicOrderCntLsb;
- break;
- case 1 :
- case 2 :
- MaxNumber=Data_Item_New->MaxFrameNum*2;
- break;
- default:
- MaxNumber = 0;
- }
-
- if (MaxNumber>TemporalReferences_Reserved)
- {
- TemporalReferences.resize(4*MaxNumber);
- TemporalReferences_Reserved=MaxNumber;
- }
-}
-
-//---------------------------------------------------------------------------
-// Packet "08"
-void File_Avc::pic_parameter_set()
-{
- Element_Name("pic_parameter_set");
-
- //Parsing
- int32u pic_parameter_set_id, seq_parameter_set_id, num_slice_groups_minus1, num_ref_idx_l0_default_active_minus1, num_ref_idx_l1_default_active_minus1, slice_group_map_type=0;
- int8u weighted_bipred_idc=0;
- bool entropy_coding_mode_flag,bottom_field_pic_order_in_frame_present_flag, redundant_pic_cnt_present_flag, weighted_pred_flag, deblocking_filter_control_present_flag;
- BS_Begin();
- Get_UE (pic_parameter_set_id, "pic_parameter_set_id");
- Get_UE (seq_parameter_set_id, "seq_parameter_set_id");
- std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item;
- if (seq_parameter_set_id>=seq_parameter_sets.size() || (*(seq_parameter_set_Item=seq_parameter_sets.begin()+seq_parameter_set_id))==NULL)
- {
- if (seq_parameter_set_id>=subset_seq_parameter_sets.size() || (*(seq_parameter_set_Item=subset_seq_parameter_sets.begin()+seq_parameter_set_id))==NULL)
- {
- //Not yet present
- Skip_BS(Data_BS_Remain(), "Data (seq_parameter_set is missing)");
- return;
- }
- }
- Get_SB (entropy_coding_mode_flag, "entropy_coding_mode_flag");
- Get_SB (bottom_field_pic_order_in_frame_present_flag, "bottom_field_pic_order_in_frame_present_flag");
- Get_UE (num_slice_groups_minus1, "num_slice_groups_minus1");
- if (num_slice_groups_minus1>7)
- {
- Trusted_IsNot("num_slice_groups_minus1 too high");
- num_slice_groups_minus1=0;
- }
- if (num_slice_groups_minus1>0)
- {
- Get_UE (slice_group_map_type, "slice_group_map_type");
- if (slice_group_map_type==0)
- {
- for (int32u Pos=0; Pos<=num_slice_groups_minus1; Pos++)
- Skip_UE( "run_length_minus1");
- }
- else if (slice_group_map_type==2)
- {
- for (int32u Pos=0; Pos<num_slice_groups_minus1; Pos++)
- {
- Skip_UE( "top_left");
- Skip_UE( "bottom_right");
- }
- }
- else if (slice_group_map_type==3
- || slice_group_map_type==4
- || slice_group_map_type==5)
- {
- Skip_SB( "slice_group_change_direction_flag");
- Skip_UE( "slice_group_change_rate_minus1");
- }
- else if (slice_group_map_type==6)
- {
- int32u pic_size_in_map_units_minus1;
- Get_UE (pic_size_in_map_units_minus1, "pic_size_in_map_units_minus1");
- if(pic_size_in_map_units_minus1>((*seq_parameter_set_Item)->pic_width_in_mbs_minus1+1)*((*seq_parameter_set_Item)->pic_height_in_map_units_minus1+1))
- {
- Trusted_IsNot("pic_size_in_map_units_minus1 too high");
- return;
- }
- #if defined (__mips__) || defined (__mipsel__)
- int32u slice_group_id_Size=(int32u)(std::ceil(std::log((double)(num_slice_groups_minus1+1))/std::log((double)10))); //std::log is natural logarithm
- #else
- int32u slice_group_id_Size=(int32u)(std::ceil(std::log((float32)(num_slice_groups_minus1+1))/std::log((float32)10))); //std::log is natural logarithm
- #endif
- for (int32u Pos=0; Pos<=pic_size_in_map_units_minus1; Pos++)
- Skip_BS(slice_group_id_Size, "slice_group_id");
- }
- }
- Get_UE (num_ref_idx_l0_default_active_minus1, "num_ref_idx_l0_default_active_minus1");
- Get_UE (num_ref_idx_l1_default_active_minus1, "num_ref_idx_l1_default_active_minus1");
- Get_SB (weighted_pred_flag, "weighted_pred_flag");
- Get_S1 (2, weighted_bipred_idc, "weighted_bipred_idc");
- Skip_SE( "pic_init_qp_minus26");
- Skip_SE( "pic_init_qs_minus26");
- Skip_SE( "chroma_qp_index_offset");
- Get_SB (deblocking_filter_control_present_flag, "deblocking_filter_control_present_flag");
- Skip_SB( "constrained_intra_pred_flag");
- Get_SB (redundant_pic_cnt_present_flag, "redundant_pic_cnt_present_flag");
- bool more_rbsp_data=false;
- if (Element_Size)
- {
- int64u Offset=Element_Size-1;
- while (Offset && Buffer[Buffer_Offset+(size_t)Offset]==0x00) //Searching if there are NULL bytes at the end of the data
- Offset--;
- size_t Bit_Pos=7;
- while (Bit_Pos && !(Buffer[Buffer_Offset+(size_t)Offset]&(1<<(7-Bit_Pos))))
- Bit_Pos--;
- if (Data_BS_Remain()>1+(7-Bit_Pos)+(Element_Size-Offset-1)*8)
- more_rbsp_data=true;
- }
- if (more_rbsp_data)
- {
- bool transform_8x8_mode_flag;
- Get_SB (transform_8x8_mode_flag, "transform_8x8_mode_flag");
- TEST_SB_SKIP( "pic_scaling_matrix_present_flag");
- for (int8u Pos=0; Pos<6+(transform_8x8_mode_flag?((*seq_parameter_set_Item)->chroma_format_idc!=3?2:6):0); Pos++ )
- {
- TEST_SB_SKIP( "pic_scaling_list_present_flag");
- scaling_list(Pos<6?16:64);
- TEST_SB_END();
- }
- TEST_SB_END();
- Skip_SE( "second_chroma_qp_index_offset");
- }
- Mark_1( );
- BS_End();
-
- while (Element_Offset<Element_Size) //Not always removed from the stream, ie in MPEG-4
- {
- int8u Padding;
- Peek_B1(Padding);
- if (!Padding)
- Skip_B1( "Padding");
- else
- break;
- }
-
- FILLING_BEGIN_PRECISE();
- //Integrity
- if (pic_parameter_set_id>=256)
- {
- Trusted_IsNot("pic_parameter_set_id not valid");
- return; //Problem, not valid
- }
- if (seq_parameter_set_id>=32)
- {
- Trusted_IsNot("seq_parameter_set_id not valid");
- return; //Problem, not valid
- }
-
- //NextCode
- NextCode_Clear();
- NextCode_Add(0x05);
- NextCode_Add(0x06);
- if (!subset_seq_parameter_sets.empty())
- NextCode_Add(0x14); //slice_layer_extension
-
- //Filling
- if (pic_parameter_set_id>=pic_parameter_sets.size())
- pic_parameter_sets.resize(pic_parameter_set_id+1);
- std::vector<pic_parameter_set_struct*>::iterator pic_parameter_sets_Item=pic_parameter_sets.begin()+pic_parameter_set_id;
- delete *pic_parameter_sets_Item; *pic_parameter_sets_Item = new pic_parameter_set_struct(
- (int8u)seq_parameter_set_id,
- (int8u)num_ref_idx_l0_default_active_minus1,
- (int8u)num_ref_idx_l1_default_active_minus1,
- weighted_bipred_idc,
- num_slice_groups_minus1,
- slice_group_map_type,
- entropy_coding_mode_flag,
- bottom_field_pic_order_in_frame_present_flag,
- weighted_pred_flag,
- redundant_pic_cnt_present_flag,
- deblocking_filter_control_present_flag
- );
-
- //Autorisation of other streams
- if (!seq_parameter_sets.empty())
- {
- for (int8u Pos=0x01; Pos<=0x06; Pos++)
- {
- Streams[Pos].Searching_Payload=true; //Coded slice...
- if (Streams[0x08].ShouldDuplicate)
- Streams[Pos].ShouldDuplicate=true;
- }
- }
- if (!subset_seq_parameter_sets.empty())
- {
- Streams[0x14].Searching_Payload=true; //slice_layer_extension
- if (Streams[0x08].ShouldDuplicate)
- Streams[0x14].ShouldDuplicate=true; //slice_layer_extension
- }
-
- //Setting as OK
- if (!Status[IsAccepted])
- Accept("AVC");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "09"
-void File_Avc::access_unit_delimiter()
-{
- Element_Name("access_unit_delimiter");
-
- int8u primary_pic_type;
- BS_Begin();
- Get_S1 ( 3, primary_pic_type, "primary_pic_type"); Param_Info1(Avc_primary_pic_type[primary_pic_type]);
- Mark_1_NoTrustError( ); //Found 1 file without this bit
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-// Packet "09"
-void File_Avc::filler_data()
-{
- Element_Name("filler_data");
-
- while (Element_Offset<Element_Size)
- {
- int8u FF;
- Peek_B1(FF);
- if (FF!=0xFF)
- break;
- Element_Offset++;
- }
- BS_Begin();
- Mark_1( );
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-// Packet "0E"
-void File_Avc::prefix_nal_unit(bool svc_extension_flag)
-{
- Element_Name("prefix_nal_unit");
-
- //Parsing
- if (svc_extension_flag)
- {
- Skip_XX(Element_Size-Element_Offset, "prefix_nal_unit_svc");
- }
-}
-
-//---------------------------------------------------------------------------
-// Packet "0F"
-void File_Avc::subset_seq_parameter_set()
-{
- Element_Name("subset_seq_parameter_set");
-
- //Parsing
- int32u subset_seq_parameter_set_id;
- seq_parameter_set_struct* Data_Item_New=seq_parameter_set_data(subset_seq_parameter_set_id);
- if (!Data_Item_New)
- return;
- if (Data_Item_New->profile_idc==83 || Data_Item_New->profile_idc==86)
- {
- //bool svc_vui_parameters_present_flag;
- seq_parameter_set_svc_extension();
- /* The rest is not yet implemented
- Get_SB (svc_vui_parameters_present_flag, "svc_vui_parameters_present_flag");
- if (svc_vui_parameters_present_flag)
- svc_vui_parameters_extension();
- */
- }
- else if (Data_Item_New->profile_idc==118 || Data_Item_New->profile_idc==128)
- {
- //bool mvc_vui_parameters_present_flag, additional_extension2_flag;
- Mark_1();
- seq_parameter_set_mvc_extension(Data_Item_New);
- /* The rest is not yet implemented
- Get_SB (mvc_vui_parameters_present_flag, "mvc_vui_parameters_present_flag");
- if (mvc_vui_parameters_present_flag)
- mvc_vui_parameters_extension();
- Get_SB (additional_extension2_flag, "additional_extension2_flag");
- if (additional_extension2_flag)
- {
- //Not handled, should skip all bits except 1
- BS_End();
- return;
- }
- */
- }
- /* The rest is not yet implemented
- Mark_1( );
- */
- BS_End();
-
- FILLING_BEGIN();
- //NextCode
- NextCode_Clear();
- NextCode_Add(0x08);
-
- //Add
- seq_parameter_set_data_Add(subset_seq_parameter_sets, subset_seq_parameter_set_id, Data_Item_New);
-
- //Autorisation of other streams
- Streams[0x08].Searching_Payload=true; //pic_parameter_set
- if (Streams[0x0F].ShouldDuplicate)
- Streams[0x08].ShouldDuplicate=true; //pic_parameter_set
- Streams[0x0A].Searching_Payload=true; //end_of_seq
- if (Streams[0x0F].ShouldDuplicate)
- Streams[0x0A].ShouldDuplicate=true; //end_of_seq
- Streams[0x0B].Searching_Payload=true; //end_of_stream
- if (Streams[0x0F].ShouldDuplicate)
- Streams[0x0B].ShouldDuplicate=true; //end_of_stream
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "14"
-void File_Avc::slice_layer_extension(bool svc_extension_flag)
-{
- Element_Name("slice_layer_extension");
-
- //Parsing
- if (svc_extension_flag)
- {
- Skip_XX(Element_Size-Element_Offset, "slice_header_in_scalable_extension + slice_data_in_scalable_extension");
- }
- else
- {
- BS_Begin();
- slice_header();
- slice_data(true);
- BS_End();
- }
-}
-
-//***************************************************************************
-// SubElements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Avc::seq_parameter_set_struct* File_Avc::seq_parameter_set_data(int32u &Data_id)
-{
- //Parsing
- seq_parameter_set_struct::vui_parameters_struct* vui_parameters_Item=NULL;
- int32u chroma_format_idc=1, bit_depth_luma_minus8=0, bit_depth_chroma_minus8=0, log2_max_frame_num_minus4, pic_order_cnt_type, log2_max_pic_order_cnt_lsb_minus4=(int32u)-1, max_num_ref_frames, pic_width_in_mbs_minus1, pic_height_in_map_units_minus1, frame_crop_left_offset=0, frame_crop_right_offset=0, frame_crop_top_offset=0, frame_crop_bottom_offset=0;
- int8u profile_idc, level_idc;
- bool constraint_set3_flag, separate_colour_plane_flag=false, delta_pic_order_always_zero_flag=false, frame_mbs_only_flag, mb_adaptive_frame_field_flag=false;
- Get_B1 (profile_idc, "profile_idc");
- BS_Begin();
- Element_Begin1("constraints");
- Skip_SB( "constraint_set0_flag");
- Skip_SB( "constraint_set1_flag");
- Skip_SB( "constraint_set2_flag");
- Get_SB (constraint_set3_flag, "constraint_set3_flag");
- Skip_SB( "constraint_set4_flag");
- Skip_SB( "constraint_set5_flag");
- Skip_BS(2, "reserved_zero_2bits");
- Element_End0();
- Get_S1 ( 8, level_idc, "level_idc");
- Get_UE ( Data_id, "seq_parameter_set_id");
- switch (profile_idc)
- {
- case 100 :
- case 110 :
- case 122 :
- case 244 :
- case 44 :
- case 83 :
- case 86 :
- case 118 :
- case 128 : //High profiles
- case 138 :
- Element_Begin1("high profile specific");
- Get_UE (chroma_format_idc, "chroma_format_idc"); Param_Info1C((chroma_format_idc<3), Avc_Colorimetry_format_idc[chroma_format_idc]);
- if (chroma_format_idc==3)
- Get_SB (separate_colour_plane_flag, "separate_colour_plane_flag");
- Get_UE (bit_depth_luma_minus8, "bit_depth_luma_minus8");
- Get_UE (bit_depth_chroma_minus8, "bit_depth_chroma_minus8");
- Skip_SB( "qpprime_y_zero_transform_bypass_flag");
- TEST_SB_SKIP( "seq_scaling_matrix_present_flag");
- for (int32u Pos=0; Pos<(int32u)((chroma_format_idc!=3) ? 8 : 12); Pos++)
- {
- TEST_SB_SKIP( "seq_scaling_list_present_flag");
- scaling_list(Pos<6?16:64);
- TEST_SB_END();
- }
- TEST_SB_END();
- Element_End0();
- break;
- default : ;
- }
- Get_UE (log2_max_frame_num_minus4, "log2_max_frame_num_minus4");
- Get_UE (pic_order_cnt_type, "pic_order_cnt_type");
- if (pic_order_cnt_type==0)
- Get_UE (log2_max_pic_order_cnt_lsb_minus4, "log2_max_pic_order_cnt_lsb_minus4");
- else if (pic_order_cnt_type==1)
- {
- int32u num_ref_frames_in_pic_order_cnt_cycle;
- Get_SB (delta_pic_order_always_zero_flag, "delta_pic_order_always_zero_flag");
- Skip_SE( "offset_for_non_ref_pic");
- Skip_SE( "offset_for_top_to_bottom_field");
- Get_UE (num_ref_frames_in_pic_order_cnt_cycle, "num_ref_frames_in_pic_order_cnt_cycle");
- if (num_ref_frames_in_pic_order_cnt_cycle>=256)
- {
- Trusted_IsNot("num_ref_frames_in_pic_order_cnt_cycle too high");
- return NULL;
- }
- for(int32u Pos=0; Pos<num_ref_frames_in_pic_order_cnt_cycle; Pos++)
- Skip_SE( "offset_for_ref_frame");
- }
- else if (pic_order_cnt_type > 2)
- {
- Trusted_IsNot("pic_order_cnt_type not supported");
- return NULL;
- }
- Get_UE (max_num_ref_frames, "max_num_ref_frames");
- Skip_SB( "gaps_in_frame_num_value_allowed_flag");
- Get_UE (pic_width_in_mbs_minus1, "pic_width_in_mbs_minus1");
- Get_UE (pic_height_in_map_units_minus1, "pic_height_in_map_units_minus1");
- Get_SB (frame_mbs_only_flag, "frame_mbs_only_flag");
- if (!frame_mbs_only_flag)
- Get_SB (mb_adaptive_frame_field_flag, "mb_adaptive_frame_field_flag");
- Skip_SB( "direct_8x8_inference_flag");
- TEST_SB_SKIP( "frame_cropping_flag");
- Get_UE (frame_crop_left_offset, "frame_crop_left_offset");
- Get_UE (frame_crop_right_offset, "frame_crop_right_offset");
- Get_UE (frame_crop_top_offset, "frame_crop_top_offset");
- Get_UE (frame_crop_bottom_offset, "frame_crop_bottom_offset");
- TEST_SB_END();
- TEST_SB_SKIP( "vui_parameters_present_flag");
- vui_parameters(vui_parameters_Item);
- TEST_SB_END();
-
- FILLING_BEGIN();
- //Integrity
- if (Data_id>=32)
- {
- Trusted_IsNot("seq_parameter_set_id not valid");
- delete (seq_parameter_set_struct::vui_parameters_struct*)vui_parameters_Item;
- return NULL; //Problem, not valid
- }
- if (pic_order_cnt_type==0 && log2_max_pic_order_cnt_lsb_minus4>12)
- {
- Trusted_IsNot("log2_max_pic_order_cnt_lsb_minus4 not valid");
- delete (seq_parameter_set_struct::vui_parameters_struct*)vui_parameters_Item;
- return NULL; //Problem, not valid
- }
- if (log2_max_frame_num_minus4>12)
- {
- Trusted_IsNot("log2_max_frame_num_minus4 not valid");
- delete (seq_parameter_set_struct::vui_parameters_struct*)vui_parameters_Item;
- return NULL; //Problem, not valid
- }
-
- //Creating Data
- return new seq_parameter_set_struct(
- vui_parameters_Item,
- pic_width_in_mbs_minus1,
- pic_height_in_map_units_minus1,
- frame_crop_left_offset,
- frame_crop_right_offset,
- frame_crop_top_offset,
- frame_crop_bottom_offset,
- (int8u)chroma_format_idc,
- profile_idc,
- level_idc,
- (int8u)bit_depth_luma_minus8,
- (int8u)bit_depth_chroma_minus8,
- (int8u)log2_max_frame_num_minus4,
- (int8u)pic_order_cnt_type,
- (int8u)log2_max_pic_order_cnt_lsb_minus4,
- (int8u)max_num_ref_frames,
- constraint_set3_flag,
- separate_colour_plane_flag,
- delta_pic_order_always_zero_flag,
- frame_mbs_only_flag,
- mb_adaptive_frame_field_flag
- );
- FILLING_ELSE();
- delete vui_parameters_Item; //vui_parameters_Item=NULL;
- return NULL;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::scaling_list(int32u ScalingList_Size)
-{
- //From http://mpeg4ip.cvs.sourceforge.net/mpeg4ip/mpeg4ip/util/h264/main.cpp?revision=1.17&view=markup
- int32u lastScale=8, nextScale=8;
- for (int32u Pos=0; Pos<ScalingList_Size; Pos++)
- {
- if (nextScale!=0)
- {
- int32s delta_scale;
- Get_SE (delta_scale, "scale_delta");
- nextScale=(lastScale+delta_scale+256)%256;
- }
- if (nextScale)
- lastScale=nextScale;
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::vui_parameters(seq_parameter_set_struct::vui_parameters_struct* &vui_parameters_Item_)
-{
- //Parsing
- seq_parameter_set_struct::vui_parameters_struct::xxl *NAL=NULL, *VCL=NULL;
- seq_parameter_set_struct::vui_parameters_struct::bitstream_restriction_struct* bitstream_restriction=NULL;
- int32u num_units_in_tick=(int32u)-1, time_scale=(int32u)-1;
- int16u sar_width=(int16u)-1, sar_height=(int16u)-1;
- int8u aspect_ratio_idc=0, video_format=5, video_full_range_flag = 0, colour_primaries=2, transfer_characteristics=2, matrix_coefficients=2;
- bool aspect_ratio_info_present_flag, video_signal_type_present_flag, colour_description_present_flag=false, timing_info_present_flag, fixed_frame_rate_flag=false, nal_hrd_parameters_present_flag, vcl_hrd_parameters_present_flag, pic_struct_present_flag;
- TEST_SB_GET (aspect_ratio_info_present_flag, "aspect_ratio_info_present_flag");
- Get_S1 (8, aspect_ratio_idc, "aspect_ratio_idc"); Param_Info1C((aspect_ratio_idc<Avc_PixelAspectRatio_Size), Avc_PixelAspectRatio[aspect_ratio_idc]);
- if (aspect_ratio_idc==0xFF)
- {
- Get_S2 (16, sar_width, "sar_width");
- Get_S2 (16, sar_height, "sar_height");
- }
- TEST_SB_END();
- TEST_SB_SKIP( "overscan_info_present_flag");
- Skip_SB( "overscan_appropriate_flag");
- TEST_SB_END();
- TEST_SB_GET (video_signal_type_present_flag, "video_signal_type_present_flag");
- Get_S1 (3, video_format, "video_format"); Param_Info1(Avc_video_format[video_format]);
- Get_S1 (1, video_full_range_flag, "video_full_range_flag"); Param_Info1(Avc_video_full_range[video_full_range_flag]);
- TEST_SB_GET (colour_description_present_flag, "colour_description_present_flag");
- Get_S1 (8, colour_primaries, "colour_primaries"); Param_Info1(Mpegv_colour_primaries(colour_primaries));
- Get_S1 (8, transfer_characteristics, "transfer_characteristics"); Param_Info1(Mpegv_transfer_characteristics(transfer_characteristics));
- Get_S1 (8, matrix_coefficients, "matrix_coefficients"); Param_Info1(Mpegv_matrix_coefficients(matrix_coefficients));
- TEST_SB_END();
- TEST_SB_END();
- TEST_SB_SKIP( "chroma_loc_info_present_flag");
- Skip_UE( "chroma_sample_loc_type_top_field");
- Skip_UE( "chroma_sample_loc_type_bottom_field");
- TEST_SB_END();
- TEST_SB_GET (timing_info_present_flag, "timing_info_present_flag");
- Get_S4 (32, num_units_in_tick, "num_units_in_tick");
- Get_S4 (32, time_scale, "time_scale");
- Get_SB ( fixed_frame_rate_flag, "fixed_frame_rate_flag");
- TEST_SB_END();
- TEST_SB_GET (nal_hrd_parameters_present_flag, "nal_hrd_parameters_present_flag");
- hrd_parameters(NAL);
- TEST_SB_END();
- TEST_SB_GET (vcl_hrd_parameters_present_flag, "vcl_hrd_parameters_present_flag");
- hrd_parameters(VCL);
- TEST_SB_END();
- if (nal_hrd_parameters_present_flag || vcl_hrd_parameters_present_flag)
- Skip_SB( "low_delay_hrd_flag");
- Get_SB ( pic_struct_present_flag, "pic_struct_present_flag");
- TEST_SB_SKIP( "bitstream_restriction_flag");
- int32u max_num_reorder_frames;
- Skip_SB( "motion_vectors_over_pic_boundaries_flag");
- Skip_UE( "max_bytes_per_pic_denom");
- Skip_UE( "max_bits_per_mb_denom");
- Skip_UE( "log2_max_mv_length_horizontal");
- Skip_UE( "log2_max_mv_length_vertical");
- Get_UE (max_num_reorder_frames, "max_num_reorder_frames");
- Skip_UE( "max_dec_frame_buffering");
- if (max_num_reorder_frames<256)
- bitstream_restriction=new seq_parameter_set_struct::vui_parameters_struct::bitstream_restriction_struct(
- (int8u)max_num_reorder_frames
- );
- TEST_SB_END();
-
- FILLING_BEGIN();
- vui_parameters_Item_=new seq_parameter_set_struct::vui_parameters_struct(
- NAL,
- VCL,
- bitstream_restriction,
- num_units_in_tick,
- time_scale,
- sar_width,
- sar_height,
- aspect_ratio_idc,
- video_format,
- video_full_range_flag,
- colour_primaries,
- transfer_characteristics,
- matrix_coefficients,
- aspect_ratio_info_present_flag,
- video_signal_type_present_flag,
- colour_description_present_flag,
- timing_info_present_flag,
- fixed_frame_rate_flag,
- pic_struct_present_flag
- );
- FILLING_ELSE();
- delete NAL;
- delete VCL;
- delete bitstream_restriction;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::hrd_parameters(seq_parameter_set_struct::vui_parameters_struct::xxl* &hrd_parameters_Item_)
-{
- //Parsing
- int32u cpb_cnt_minus1;
- int8u bit_rate_scale, cpb_size_scale, initial_cpb_removal_delay_length_minus1, cpb_removal_delay_length_minus1, dpb_output_delay_length_minus1, time_offset_length;
- Get_UE ( cpb_cnt_minus1, "cpb_cnt_minus1");
- Get_S1 (4, bit_rate_scale, "bit_rate_scale");
- Get_S1 (4, cpb_size_scale, "cpb_size_scale");
- if (cpb_cnt_minus1>31)
- {
- Trusted_IsNot("cpb_cnt_minus1 too high");
- cpb_cnt_minus1=0;
- }
- vector<seq_parameter_set_struct::vui_parameters_struct::xxl::xxl_data> SchedSel;
- SchedSel.reserve(cpb_cnt_minus1+1);
- for (int8u SchedSelIdx = 0; SchedSelIdx <= cpb_cnt_minus1; ++SchedSelIdx)
- {
- Element_Begin1("ShedSel");
- int64u bit_rate_value, cpb_size_value;
- int32u bit_rate_value_minus1, cpb_size_value_minus1;
- bool cbr_flag;
- Get_UE (bit_rate_value_minus1, "bit_rate_value_minus1");
- bit_rate_value=(int64u)((bit_rate_value_minus1+1)*pow(2.0, 6+bit_rate_scale)); Param_Info2(bit_rate_value, " bps");
- Get_UE (cpb_size_value_minus1, "cpb_size_value_minus1");
- cpb_size_value=(int64u)((cpb_size_value_minus1+1)*pow(2.0, 4+cpb_size_scale)); Param_Info2(cpb_size_value, " bits");
- Get_SB (cbr_flag, "cbr_flag");
- Element_End0();
-
- FILLING_BEGIN();
- SchedSel.push_back(seq_parameter_set_struct::vui_parameters_struct::xxl::xxl_data(
- bit_rate_value,
- cpb_size_value,
- cbr_flag
- ));
- FILLING_END();
- }
- Get_S1 (5, initial_cpb_removal_delay_length_minus1, "initial_cpb_removal_delay_length_minus1");
- Get_S1 (5, cpb_removal_delay_length_minus1, "cpb_removal_delay_length_minus1");
- Get_S1 (5, dpb_output_delay_length_minus1, "dpb_output_delay_length_minus1");
- Get_S1 (5, time_offset_length, "time_offset_length");
-
- //Validity test
- if (!Element_IsOK() || (SchedSel.size() == 1 && SchedSel[0].bit_rate_value == 64))
- {
- return; //We do not trust this kind of data
- }
-
- //Filling
- hrd_parameters_Item_=new seq_parameter_set_struct::vui_parameters_struct::xxl(
- SchedSel,
- initial_cpb_removal_delay_length_minus1,
- cpb_removal_delay_length_minus1,
- dpb_output_delay_length_minus1,
- time_offset_length
- );
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::nal_unit_header_svc_extension()
-{
- //Parsing
- Element_Begin1("nal_unit_header_svc_extension");
- Skip_SB( "idr_flag");
- Skip_S1( 6, "priority_id");
- Skip_SB( "no_inter_layer_pred_flag");
- Skip_S1( 3, "dependency_id");
- Skip_S1( 4, "quality_id");
- Skip_S1( 3, "temporal_id");
- Skip_SB( "use_ref_base_pic_flag");
- Skip_SB( "discardable_flag");
- Skip_SB( "output_flag");
- Skip_S1( 2, "reserved_three_2bits");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::nal_unit_header_mvc_extension()
-{
- //Parsing
- Element_Begin1("nal_unit_header_mvc_extension");
- Skip_SB( "non_idr_flag");
- Skip_S1( 6, "priority_id");
- Skip_S1(10, "view_id");
- Skip_S1( 3, "temporal_id");
- Skip_SB( "anchor_pic_flag");
- Skip_SB( "inter_view_flag");
- Skip_SB( "reserved_one_bit");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::seq_parameter_set_svc_extension()
-{
- //Parsing
- Element_Begin1("seq_parameter_set_svc_extension");
- //Skip_SB( "");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::svc_vui_parameters_extension()
-{
- //Parsing
- Element_Begin1("svc_vui_parameters_extension");
- //Skip_SB( "");
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::seq_parameter_set_mvc_extension(seq_parameter_set_struct* Data_Item)
-{
- //Parsing
- Element_Begin1("seq_parameter_set_mvc_extension");
- int32u num_views_minus1;
- Get_UE (num_views_minus1, "num_views_minus1");
- //(Not implemented)
- Element_End0();
-
- FILLING_BEGIN();
- Data_Item->num_views_minus1 = (int16u)num_views_minus1;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Avc::mvc_vui_parameters_extension()
-{
- //Parsing
- Element_Begin1("mvc_vui_parameters_extension");
- Skip_SB( "");
- Element_End0();
-}
-
-//***************************************************************************
-// Specific
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Avc::SPS_PPS()
-{
- //Parsing
- int8u Profile, Level, seq_parameter_set_count, pic_parameter_set_count;
- if (SizedBlocks)
- Skip_B1( "Version");
- Get_B1 (Profile, "Profile");
- Skip_B1( "Compatible profile");
- Get_B1 (Level, "Level");
- BS_Begin();
- Skip_S1(6, "Reserved");
- Get_S1 (2, SizeOfNALU_Minus1, "Size of NALU length minus 1");
- Skip_S1(3, "Reserved");
- Get_S1 (5, seq_parameter_set_count, "seq_parameter_set count");
- BS_End();
- for (int8u Pos=0; Pos<seq_parameter_set_count; Pos++)
- {
- Element_Begin1("seq_parameter_set");
- int16u Size;
- Get_B2 (Size, "Size");
- BS_Begin();
- Mark_0 ();
- Skip_S1( 2, "nal_ref_idc");
- Skip_S1( 5, "nal_unit_type");
- BS_End();
- if (Element_Offset+Size-1>Element_Size)
- {
- Trusted_IsNot("Size is wrong");
- break; //There is an error
- }
- int64u Element_Offset_Save=Element_Offset;
- int64u Element_Size_Save=Element_Size;
- Buffer_Offset+=(size_t)Element_Offset_Save;
- Element_Offset=0;
- Element_Size=Size-(Size?1:0);
- Element_Code=0x07; //seq_parameter_set
- Data_Parse();
- Buffer_Offset-=(size_t)Element_Offset_Save;
- Element_Offset=Element_Offset_Save+Size-1;
- Element_Size=Element_Size_Save;
- Element_End0();
- }
- Get_B1 (pic_parameter_set_count, "pic_parameter_set count");
- for (int8u Pos=0; Pos<pic_parameter_set_count; Pos++)
- {
- Element_Begin1("pic_parameter_set");
- int16u Size;
- Get_B2 (Size, "Size");
- BS_Begin();
- Mark_0 ();
- Skip_S1( 2, "nal_ref_idc");
- Skip_S1( 5, "nal_unit_type");
- BS_End();
- int64u Element_Offset_Save=Element_Offset;
- int64u Element_Size_Save=Element_Size;
- Buffer_Offset+=(size_t)Element_Offset_Save;
- Element_Offset=0;
- Element_Size=Size-1;
- if (Element_Size>Element_Size_Save-Element_Offset_Save)
- break; //There is an error
- Element_Code=0x08; //pic_parameter_set
- Data_Parse();
- Buffer_Offset-=(size_t)Element_Offset_Save;
- Element_Offset=Element_Offset_Save+Size-1;
- Element_Size=Element_Size_Save;
- Element_End0();
- }
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Padding?");
-
- //Filling
- FILLING_BEGIN_PRECISE();
- //Detection of some bugs in the file
- if (!seq_parameter_sets.empty() && seq_parameter_sets[0] && (Profile!=seq_parameter_sets[0]->profile_idc || Level!=seq_parameter_sets[0]->level_idc))
- MuxingMode=Ztring("Container profile=")+Ztring().From_Local(Avc_profile_idc(Profile))+__T("@")+Ztring().From_Number(((float)Level)/10, 1);
-
- MustParse_SPS_PPS=false;
- if (!Status[IsAccepted])
- Accept("AVC");
- FILLING_END();
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-std::string File_Avc::GOP_Detect (std::string PictureTypes)
-{
- //Finding a string without blanks
- size_t PictureTypes_Limit=PictureTypes.find(' ');
- if (PictureTypes_Limit!=string::npos)
- {
- if (PictureTypes_Limit>PictureTypes.size()/2)
- PictureTypes.resize(PictureTypes_Limit);
- else
- {
- //Trim
- size_t TrimPos;
- TrimPos=PictureTypes.find_first_not_of(' ');
- if (TrimPos!=string::npos)
- PictureTypes.erase(0, TrimPos);
- TrimPos=PictureTypes.find_last_not_of(' ');
- if (TrimPos!=string::npos)
- PictureTypes.erase(TrimPos+1);
-
- //Finding the longest string
- ZtringList List; List.Separator_Set(0, __T(" "));
- List.Write(Ztring().From_Local(PictureTypes));
- size_t MaxLength=0;
- size_t MaxLength_Pos=0;
- for (size_t Pos=0; Pos<List.size(); Pos++)
- if (List[Pos].size()>MaxLength)
- {
- MaxLength=List[Pos].size();
- MaxLength_Pos=Pos;
- }
- PictureTypes=List[MaxLength_Pos].To_Local();
-
- }
- }
-
- //Creating all GOP values
- std::vector<Ztring> GOPs;
- size_t GOP_Frame_Count=0;
- size_t GOP_BFrames_Max=0;
- size_t I_Pos1=PictureTypes.find('I');
- while (I_Pos1!=std::string::npos)
- {
- size_t I_Pos2=PictureTypes.find('I', I_Pos1+1);
- if (I_Pos2!=std::string::npos)
- {
- std::vector<size_t> P_Positions;
- size_t P_Position=I_Pos1;
- do
- {
- P_Position=PictureTypes.find('P', P_Position+1);
- if (P_Position<I_Pos2)
- P_Positions.push_back(P_Position);
- }
- while (P_Position<I_Pos2);
- if (P_Positions.size()>1 && P_Positions[0]>I_Pos1+1 && P_Positions[P_Positions.size()-1]==I_Pos2-1)
- P_Positions.resize(P_Positions.size()-1); //Removing last P-Frame for next test, this is often a terminating P-Frame replacing a B-Frame
- Ztring GOP;
- bool IsOK=true;
- if (!P_Positions.empty())
- {
- size_t Delta=P_Positions[0]-I_Pos1;
- for (size_t Pos=1; Pos<P_Positions.size(); Pos++)
- if (P_Positions[Pos]-P_Positions[Pos-1]!=Delta)
- {
- IsOK=false;
- break;
- }
- if (IsOK)
- {
- GOP+=__T("M=")+Ztring::ToZtring(P_Positions[0]-I_Pos1)+__T(", ");
- if (P_Positions[0]-I_Pos1>GOP_BFrames_Max)
- GOP_BFrames_Max=P_Positions[0]-I_Pos1;
- }
- }
- if (IsOK)
- {
- GOP+=__T("N=")+Ztring::ToZtring(I_Pos2-I_Pos1);
- GOPs.push_back(GOP);
- }
- else
- GOPs.push_back(Ztring()); //There is a problem, blank
- GOP_Frame_Count+=I_Pos2-I_Pos1;
- }
- I_Pos1=I_Pos2;
- }
-
- //Some clean up
- if (GOP_Frame_Count+GOP_BFrames_Max>Frame_Count && !GOPs.empty())
- GOPs.resize(GOPs.size()-1); //Removing the last one, there may have uncomplete B-frame filling
- if (GOPs.size()>4)
- GOPs.erase(GOPs.begin()); //Removing the first one, it is sometime different and we have enough to deal with
-
- //Filling
- if (GOPs.size()>=4)
- {
- bool IsOK=true;
- for (size_t Pos=1; Pos<GOPs.size(); Pos++)
- if (GOPs[Pos]!=GOPs[0])
- {
- IsOK=false;
- break;
- }
- if (IsOK)
- return GOPs[0].To_Local();
- }
-
- return string();
-}
-
-//---------------------------------------------------------------------------
-std::string File_Avc::ScanOrder_Detect (std::string ScanOrders)
-{
- //Finding a string without blanks
- size_t ScanOrders_Limit=ScanOrders.find(' ');
- if (ScanOrders_Limit!=string::npos)
- {
- if (ScanOrders_Limit>ScanOrders.size()/2)
- ScanOrders.resize(ScanOrders_Limit);
- else
- {
- //Trim
- size_t TrimPos;
- TrimPos=ScanOrders.find_first_not_of(' ');
- if (TrimPos!=string::npos)
- ScanOrders.erase(0, TrimPos);
- TrimPos=ScanOrders.find_last_not_of(' ');
- if (TrimPos!=string::npos)
- ScanOrders.erase(TrimPos+1);
-
- //Finding the longest string
- ZtringList List; List.Separator_Set(0, __T(" "));
- List.Write(Ztring().From_Local(ScanOrders));
- size_t MaxLength=0;
- size_t MaxLength_Pos=0;
- for (size_t Pos=0; Pos<List.size(); Pos++)
- if (List[Pos].size()>MaxLength)
- {
- MaxLength=List[Pos].size();
- MaxLength_Pos=Pos;
- }
- ScanOrders=List[MaxLength_Pos].To_Local();
-
- }
- }
-
- //Filling
- if (ScanOrders.find("TBTBTBTB")==0)
- return ("TFF");
- if (ScanOrders.find("BTBTBTBT")==0)
- return ("BFF");
- return string();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_AVC_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Avc.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Avc.h
deleted file mode 100644
index 0b1dca944..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Avc.h
+++ /dev/null
@@ -1,571 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_AvcH
-#define MediaInfo_AvcH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/File__Duplicate.h"
-#include <cmath>
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Avc
-//***************************************************************************
-
-class File_Avc :
-#if MEDIAINFO_DUPLICATE
- public File__Duplicate
-#else //MEDIAINFO_DUPLICATE
- public File__Analyze
-#endif //MEDIAINFO_DUPLICATE
-{
-public :
- //In
- int64u Frame_Count_Valid;
- bool FrameIsAlwaysComplete;
- bool MustParse_SPS_PPS;
- bool SizedBlocks;
-
- //Constructor/Destructor
- File_Avc();
- ~File_Avc();
-
-private :
- File_Avc(const File_Avc &File_Avc); //No copy
-
- //Structures - seq_parameter_set
- struct seq_parameter_set_struct
- {
- struct vui_parameters_struct
- {
- struct xxl
- {
- struct xxl_data
- {
- //HRD configuration
- int64u bit_rate_value;
- int64u cpb_size_value;
- bool cbr_flag;
-
- //sei_message_buffering_period
- //int32u initial_cpb_removal_delay;
- //int32u initial_cpb_removal_delay_offset;
-
- xxl_data(int64u bit_rate_value_, int64u cpb_size_value_, bool cbr_flag_) //int32u initial_cpb_removal_delay_, int32u initial_cpb_removal_delay_offset_)
- :
- bit_rate_value(bit_rate_value_),
- cpb_size_value(cpb_size_value_),
- cbr_flag(cbr_flag_)
- //initial_cpb_removal_delay(initial_cpb_removal_delay_),
- //initial_cpb_removal_delay_offset(initial_cpb_removal_delay_offset_)
- {
- }
-
- xxl_data &operator=(const xxl_data &x)
- {
- bit_rate_value=x.bit_rate_value;
- cpb_size_value=x.cpb_size_value;
- cbr_flag=x.cbr_flag;
- //initial_cpb_removal_delay=x.initial_cpb_removal_delay;
- //initial_cpb_removal_delay_offset=x.initial_cpb_removal_delay_offset;
- return *this;
- }
-
- private:
- xxl_data();
- };
- vector<xxl_data> SchedSel;
- int8u initial_cpb_removal_delay_length_minus1;
- int8u cpb_removal_delay_length_minus1;
- int8u dpb_output_delay_length_minus1;
- int8u time_offset_length;
-
- xxl(const vector<xxl_data> &SchedSel_, int8u initial_cpb_removal_delay_length_minus1_, int8u cpb_removal_delay_length_minus1_, int8u dpb_output_delay_length_minus1_, int8u time_offset_length_)
- :
- SchedSel(SchedSel_),
- initial_cpb_removal_delay_length_minus1(initial_cpb_removal_delay_length_minus1_),
- cpb_removal_delay_length_minus1(cpb_removal_delay_length_minus1_),
- dpb_output_delay_length_minus1(dpb_output_delay_length_minus1_),
- time_offset_length(time_offset_length_)
- {
- }
-
- xxl &operator=(const xxl &x)
- {
- SchedSel=x.SchedSel;
- initial_cpb_removal_delay_length_minus1=x.initial_cpb_removal_delay_length_minus1;
- cpb_removal_delay_length_minus1=x.cpb_removal_delay_length_minus1;
- dpb_output_delay_length_minus1=x.dpb_output_delay_length_minus1;
- time_offset_length=x.time_offset_length;
-
- return *this;
- }
-
- private:
- xxl();
- };
- struct bitstream_restriction_struct
- {
- int8u max_num_reorder_frames;
-
- bitstream_restriction_struct(int8u max_num_reorder_frames_)
- :
- max_num_reorder_frames(max_num_reorder_frames_)
- {
- }
-
- bitstream_restriction_struct &operator=(const bitstream_restriction_struct &b)
- {
- max_num_reorder_frames=b.max_num_reorder_frames;
-
- return *this;
- }
-
- private:
- bitstream_restriction_struct();
- };
- xxl* NAL;
- xxl* VCL;
- bitstream_restriction_struct* bitstream_restriction;
- int32u num_units_in_tick;
- int32u time_scale;
- int16u sar_width;
- int16u sar_height;
- int8u aspect_ratio_idc;
- int8u video_format;
- int8u video_full_range_flag;
- int8u colour_primaries;
- int8u transfer_characteristics;
- int8u matrix_coefficients;
- bool aspect_ratio_info_present_flag;
- bool video_signal_type_present_flag;
- bool colour_description_present_flag;
- bool timing_info_present_flag;
- bool fixed_frame_rate_flag;
- bool pic_struct_present_flag;
-
- vui_parameters_struct(xxl* NAL_, xxl* VCL_, bitstream_restriction_struct* bitstream_restriction_, int32u num_units_in_tick_, int32u time_scale_, int16u sar_width_, int16u sar_height_, int8u aspect_ratio_idc_, int8u video_format_, int8u video_full_range_flag_, int8u colour_primaries_, int8u transfer_characteristics_, int8u matrix_coefficients_, bool aspect_ratio_info_present_flag_, bool video_signal_type_present_flag_, bool colour_description_present_flag_, bool timing_info_present_flag_, bool fixed_frame_rate_flag_, bool pic_struct_present_flag_)
- :
- NAL(NAL_),
- VCL(VCL_),
- bitstream_restriction(bitstream_restriction_),
- num_units_in_tick(num_units_in_tick_),
- time_scale(time_scale_),
- sar_width(sar_width_),
- sar_height(sar_height_),
- aspect_ratio_idc(aspect_ratio_idc_),
- video_format(video_format_),
- video_full_range_flag(video_full_range_flag_),
- colour_primaries(colour_primaries_),
- transfer_characteristics(transfer_characteristics_),
- matrix_coefficients(matrix_coefficients_),
- aspect_ratio_info_present_flag(aspect_ratio_info_present_flag_),
- video_signal_type_present_flag(video_signal_type_present_flag_),
- colour_description_present_flag(colour_description_present_flag_),
- timing_info_present_flag(timing_info_present_flag_),
- fixed_frame_rate_flag(fixed_frame_rate_flag_),
- pic_struct_present_flag(pic_struct_present_flag_)
- {
- }
-
- ~vui_parameters_struct()
- {
- delete NAL; //NAL=NULL;
- delete VCL; //VCL=NULL;
- delete bitstream_restriction; //bitstream_restriction=NULL;
- }
-
- private:
- vui_parameters_struct &operator=(const vui_parameters_struct &v);
- vui_parameters_struct();
- };
- vui_parameters_struct* vui_parameters;
- #if MEDIAINFO_DEMUX
- int8u* Iso14496_10_Buffer;
- size_t Iso14496_10_Buffer_Size;
- #endif //MEDIAINFO_DEMUX
- int32u pic_width_in_mbs_minus1;
- int32u pic_height_in_map_units_minus1;
- int32u frame_crop_left_offset;
- int32u frame_crop_right_offset;
- int32u frame_crop_top_offset;
- int32u frame_crop_bottom_offset;
- int32u MaxPicOrderCntLsb; //Computed value (for speed)
- int32u MaxFrameNum; //Computed value (for speed)
- int16u num_views_minus1; //MultiView specific field
- int8u chroma_format_idc;
- int8u profile_idc;
- int8u level_idc;
- int8u bit_depth_luma_minus8;
- int8u bit_depth_chroma_minus8;
- int8u log2_max_frame_num_minus4;
- int8u pic_order_cnt_type;
- int8u log2_max_pic_order_cnt_lsb_minus4;
- int8u max_num_ref_frames;
- int8u pic_struct_FirstDetected; //For stats only
- bool constraint_set3_flag;
- bool separate_colour_plane_flag;
- bool delta_pic_order_always_zero_flag;
- bool frame_mbs_only_flag;
- bool mb_adaptive_frame_field_flag;
-
- //Computed values
- bool NalHrdBpPresentFlag() {return vui_parameters && vui_parameters->NAL;}
- bool VclHrdBpPresentFlag() {return vui_parameters && vui_parameters->VCL;}
- bool CpbDpbDelaysPresentFlag() {return vui_parameters && (vui_parameters->NAL || vui_parameters->VCL);}
- int8u ChromaArrayType() {return separate_colour_plane_flag?0:chroma_format_idc;}
-
- //Constructor/Destructor
- seq_parameter_set_struct(vui_parameters_struct* vui_parameters_, int32u pic_width_in_mbs_minus1_, int32u pic_height_in_map_units_minus1_, int32u frame_crop_left_offset_, int32u frame_crop_right_offset_, int32u frame_crop_top_offset_, int32u frame_crop_bottom_offset_, int8u chroma_format_idc_, int8u profile_idc_, int8u level_idc_, int8u bit_depth_luma_minus8_, int8u bit_depth_chroma_minus8_, int8u log2_max_frame_num_minus4_, int8u pic_order_cnt_type_, int8u log2_max_pic_order_cnt_lsb_minus4_, int8u max_num_ref_frames_, bool constraint_set3_flag_, bool separate_colour_plane_flag_, bool delta_pic_order_always_zero_flag_, bool frame_mbs_only_flag_, bool mb_adaptive_frame_field_flag_)
- :
- vui_parameters(vui_parameters_),
- #if MEDIAINFO_DEMUX
- Iso14496_10_Buffer(NULL),
- Iso14496_10_Buffer_Size(0),
- #endif //MEDIAINFO_DEMUX
- pic_width_in_mbs_minus1(pic_width_in_mbs_minus1_),
- pic_height_in_map_units_minus1(pic_height_in_map_units_minus1_),
- frame_crop_left_offset(frame_crop_left_offset_),
- frame_crop_right_offset(frame_crop_right_offset_),
- frame_crop_top_offset(frame_crop_top_offset_),
- frame_crop_bottom_offset(frame_crop_bottom_offset_),
- num_views_minus1(0),
- chroma_format_idc(chroma_format_idc_),
- profile_idc(profile_idc_),
- level_idc(level_idc_),
- bit_depth_luma_minus8(bit_depth_luma_minus8_),
- bit_depth_chroma_minus8(bit_depth_chroma_minus8_),
- log2_max_frame_num_minus4(log2_max_frame_num_minus4_),
- pic_order_cnt_type(pic_order_cnt_type_),
- log2_max_pic_order_cnt_lsb_minus4(log2_max_pic_order_cnt_lsb_minus4_),
- max_num_ref_frames(max_num_ref_frames_),
- pic_struct_FirstDetected((int8u)-1), //For stats only, init
- constraint_set3_flag(constraint_set3_flag_),
- separate_colour_plane_flag(separate_colour_plane_flag_),
- delta_pic_order_always_zero_flag(delta_pic_order_always_zero_flag_),
- frame_mbs_only_flag(frame_mbs_only_flag_),
- mb_adaptive_frame_field_flag(mb_adaptive_frame_field_flag_)
- {
- switch (pic_order_cnt_type)
- {
- case 0 :
- MaxPicOrderCntLsb = (int32u)std::pow(2.0, (int)(log2_max_pic_order_cnt_lsb_minus4 + 4));
- MaxFrameNum = (int32u)-1; //Unused
- break;
- case 1 :
- case 2 :
- MaxPicOrderCntLsb = (int32u)-1; //Unused
- MaxFrameNum = (int32u)std::pow(2.0, (int)(log2_max_frame_num_minus4 + 4));
- break;
- default:
- MaxFrameNum = (int32u)-1; //Unused
- MaxPicOrderCntLsb = (int32u)-1; //Unused
- }
- }
-
- ~seq_parameter_set_struct()
- {
- delete vui_parameters; //vui_parameters=NULL;
- #if MEDIAINFO_DEMUX
- delete[] Iso14496_10_Buffer;
- #endif //MEDIAINFO_DEMUX
- }
-
- private:
- seq_parameter_set_struct &operator=(const seq_parameter_set_struct &v);
- seq_parameter_set_struct();
- };
- typedef vector<seq_parameter_set_struct*> seq_parameter_set_structs;
-
- //Structures - pic_parameter_set
- struct pic_parameter_set_struct
- {
- #if MEDIAINFO_DEMUX
- int8u* Iso14496_10_Buffer;
- size_t Iso14496_10_Buffer_Size;
- #endif //MEDIAINFO_DEMUX
- int8u seq_parameter_set_id;
- int8u num_ref_idx_l0_default_active_minus1;
- int8u num_ref_idx_l1_default_active_minus1;
- int8u weighted_bipred_idc;
- int32u num_slice_groups_minus1;
- int32u slice_group_map_type;
- bool entropy_coding_mode_flag;
- bool bottom_field_pic_order_in_frame_present_flag;
- bool weighted_pred_flag;
- bool redundant_pic_cnt_present_flag;
- bool deblocking_filter_control_present_flag;
-
- //Constructor/Destructor
- pic_parameter_set_struct(int8u seq_parameter_set_id_, int8u num_ref_idx_l0_default_active_minus1_, int8u num_ref_idx_l1_default_active_minus1_, int8u weighted_bipred_idc_, int32u num_slice_groups_minus1_, int32u slice_group_map_type_, bool entropy_coding_mode_flag_, bool bottom_field_pic_order_in_frame_present_flag_, bool weighted_pred_flag_, bool redundant_pic_cnt_present_flag_, bool deblocking_filter_control_present_flag_)
- :
- #if MEDIAINFO_DEMUX
- Iso14496_10_Buffer(NULL),
- Iso14496_10_Buffer_Size(0),
- #endif //MEDIAINFO_DEMUX
- seq_parameter_set_id(seq_parameter_set_id_),
- num_ref_idx_l0_default_active_minus1(num_ref_idx_l0_default_active_minus1_),
- num_ref_idx_l1_default_active_minus1(num_ref_idx_l1_default_active_minus1_),
- weighted_bipred_idc(weighted_bipred_idc_),
- num_slice_groups_minus1(num_slice_groups_minus1_),
- slice_group_map_type(slice_group_map_type_),
- entropy_coding_mode_flag(entropy_coding_mode_flag_),
- bottom_field_pic_order_in_frame_present_flag(bottom_field_pic_order_in_frame_present_flag_),
- weighted_pred_flag(weighted_pred_flag_),
- redundant_pic_cnt_present_flag(redundant_pic_cnt_present_flag_),
- deblocking_filter_control_present_flag(deblocking_filter_control_present_flag_)
- {
- }
-
- ~pic_parameter_set_struct()
- {
- #if MEDIAINFO_DEMUX
- delete[] Iso14496_10_Buffer;
- #endif //MEDIAINFO_DEMUX
- }
-
- private:
- pic_parameter_set_struct &operator=(const pic_parameter_set_struct &v);
- pic_parameter_set_struct();
- };
- typedef vector<pic_parameter_set_struct*> pic_parameter_set_structs;
-
- //Streams management
- void Streams_Fill();
- void Streams_Fill(vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item);
- void Streams_Fill_subset(vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item);
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
- void Synched_Init();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test();
- bool Demux_Avc_Transcode_Iso14496_15_to_Iso14496_10;
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Global
- #if MEDIAINFO_ADVANCED2
- void Read_Buffer_SegmentChange();
- #endif //MEDIAINFO_ADVANCED2
- void Read_Buffer_Unsynched();
-
- //Buffer - Per element
- void Header_Parse();
- bool Header_Parser_QuickSearch();
- bool Header_Parser_Fill_Size();
- void Data_Parse();
-
- #if MEDIAINFO_DUPLICATE
- //Output buffer
- size_t Output_Buffer_Get (const String &Value);
- size_t Output_Buffer_Get (size_t Pos);
- #endif //MEDIAINFO_DUPLICATE
-
- //Options
- void Option_Manage ();
-
- //Elements
- void slice_layer_without_partitioning_IDR();
- void slice_layer_without_partitioning_non_IDR();
- void slice_header();
- void slice_data (bool AllCategories);
- void seq_parameter_set();
- void pic_parameter_set();
- void sei();
- void sei_message(int32u &seq_parameter_set_id);
- void sei_message_buffering_period(int32u &seq_parameter_set_id);
- void sei_message_buffering_period_xxl(seq_parameter_set_struct::vui_parameters_struct::xxl* xxl);
- void sei_message_pic_timing(int32u payloadSize, int32u seq_parameter_set_id);
- void sei_message_user_data_registered_itu_t_t35();
- void sei_message_user_data_registered_itu_t_t35_DTG1();
- void sei_message_user_data_registered_itu_t_t35_GA94();
- void sei_message_user_data_registered_itu_t_t35_GA94_03();
- void sei_message_user_data_registered_itu_t_t35_GA94_03_Delayed(int32u seq_parameter_set_id);
- void sei_message_user_data_registered_itu_t_t35_GA94_06();
- void sei_message_user_data_unregistered(int32u payloadSize);
- void sei_message_user_data_unregistered_x264(int32u payloadSize);
- void sei_message_user_data_unregistered_bluray(int32u payloadSize);
- void sei_message_recovery_point();
- void sei_message_mainconcept(int32u payloadSize);
- void access_unit_delimiter();
- void filler_data();
- void prefix_nal_unit(bool svc_extension_flag);
- void subset_seq_parameter_set();
- void slice_layer_extension(bool svc_extension_flag);
-
- //Packets - SubElements
- seq_parameter_set_struct* seq_parameter_set_data(int32u &Data_id);
- void seq_parameter_set_data_Add(vector<seq_parameter_set_struct*> &Data, const int32u Data_id, seq_parameter_set_struct* Data_Item_New);
- void seq_parameter_set_svc_extension();
- void seq_parameter_set_mvc_extension(seq_parameter_set_struct* Data_Item);
- void scaling_list(int32u ScalingList_Size);
- void vui_parameters(seq_parameter_set_struct::vui_parameters_struct* &vui_parameters_Item);
- void svc_vui_parameters_extension();
- void mvc_vui_parameters_extension();
- void hrd_parameters(seq_parameter_set_struct::vui_parameters_struct::xxl* &hrd_parameters_Item);
- void nal_unit_header_svc_extension();
- void nal_unit_header_mvc_extension();
- void ref_pic_list_modification(int32u slice_type, bool mvc);
- void pred_weight_table(int32u num_ref_idx_l0_active_minus1, int32u num_ref_idx_l1_active_minus1, int8u ChromaArrayType);
- void dec_ref_pic_marking(vector<int8u> &memory_management_control_operations);
-
- //Packets - Specific
- void SPS_PPS();
-
- //Streams
- struct stream
- {
- bool Searching_Payload;
- bool ShouldDuplicate;
-
- stream()
- :
- Searching_Payload(false),
- ShouldDuplicate(false)
- {
- }
- };
- vector<stream> Streams;
-
- //Temporal references
- struct temporal_reference
- {
- struct buffer_data
- {
- size_t Size;
- int8u* Data;
-
- buffer_data()
- {
- Size=0;
- Data=NULL;
- }
-
- ~buffer_data()
- {
- delete[] Data; //Data=NULL;
- }
- };
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- buffer_data* GA94_03;
- #endif //MEDIAINFO_DTVCCTRANSPORT_YES
-
- int32u frame_num;
- int8u slice_type;
- bool IsTop;
- bool IsField;
-
- temporal_reference()
- {
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- GA94_03=NULL;
- #endif //MEDIAINFO_DTVCCTRANSPORT_YES
- slice_type=(int8u)-1;
- }
-
- ~temporal_reference()
- {
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- delete GA94_03; //GA94_03=NULL;
- #endif //MEDIAINFO_DTVCCTRANSPORT_YES
- }
- };
- typedef vector<temporal_reference*> temporal_references;
- temporal_references TemporalReferences; //per pic_order_cnt_lsb
- temporal_reference* TemporalReferences_DelayedElement;
- size_t TemporalReferences_Min;
- size_t TemporalReferences_Max;
- size_t TemporalReferences_Reserved;
- size_t TemporalReferences_Offset;
- size_t TemporalReferences_Offset_pic_order_cnt_lsb_Last;
- int64s TemporalReferences_pic_order_cnt_Min;
-
- //Text
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- File__Analyze* GA94_03_Parser;
- bool GA94_03_IsPresent;
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
-
- //Replacement of File__Analyze buffer
- const int8u* Buffer_ToSave;
- size_t Buffer_Size_ToSave;
-
- //parameter_sets
- seq_parameter_set_structs seq_parameter_sets;
- seq_parameter_set_structs subset_seq_parameter_sets;
- pic_parameter_set_structs pic_parameter_sets;
-
- //File specific
- int8u SizeOfNALU_Minus1;
-
- //Status
- size_t IFrame_Count;
- int32s prevPicOrderCntMsb;
- int32u prevPicOrderCntLsb;
- int32u prevTopFieldOrderCnt;
- int32u prevFrameNum;
- int32u prevFrameNumOffset;
- vector<int8u> prevMemoryManagementControlOperations;
-
- //Count of a Packets
- size_t Block_Count;
- size_t Interlaced_Top;
- size_t Interlaced_Bottom;
- size_t Structure_Field;
- size_t Structure_Frame;
-
- //Temp
- Ztring Encoded_Library;
- Ztring Encoded_Library_Name;
- Ztring Encoded_Library_Version;
- Ztring Encoded_Library_Date;
- Ztring Encoded_Library_Settings;
- Ztring BitRate_Nominal;
- Ztring MuxingMode;
- string PictureTypes_PreviousFrames;
- int64u tc;
- int32u Firstpic_order_cnt_lsbInBlock;
- int8u nal_ref_idc;
- int8u FrameRate_Divider;
- bool FirstPFrameInGop_IsParsed;
- #if MEDIAINFO_ADVANCED2
- std::vector<std::string> Dump_SPS;
- std::vector<std::string> Dump_PPS;
- #endif //MEDIAINFO_ADVANCED2
-
- //Helpers
- string GOP_Detect (string PictureTypes);
- string ScanOrder_Detect (string ScanOrders);
-
- #if MEDIAINFO_DUPLICATE
- bool File__Duplicate_Set (const Ztring &Value); //Fill a new File__Duplicate value
- void File__Duplicate_Write (int64u Element_Code, int32u frame_num=(int32u)-1);
- File__Duplicate__Writer Writer;
- int8u Duplicate_Buffer[1024*1024];
- size_t Duplicate_Buffer_Size;
- size_t frame_num_Old;
- bool SPS_PPS_AlreadyDone;
- bool FLV;
- #endif //MEDIAINFO_DUPLICATE
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Avc_Duplicate.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Avc_Duplicate.cpp
deleted file mode 100644
index da39b510b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Avc_Duplicate.cpp
+++ /dev/null
@@ -1,263 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Duplication helper for some specific formats
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AVC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Avc.h"
-#include "MediaInfo/MediaInfo_Config.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "ZenLib/ZtringList.h"
-#include "ZenLib/File.h"
-#include <cstring>
-using namespace ZenLib;
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Options
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Avc::Option_Manage()
-{
- #if MEDIAINFO_DUPLICATE
- //File__Duplicate configuration
- if (File__Duplicate_HasChanged())
- {
- //Autorisation of other streams
- Streams[0x07].ShouldDuplicate=true;
- }
- #endif //MEDIAINFO_DUPLICATE
-}
-
-//***************************************************************************
-// Set
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DUPLICATE
-bool File_Avc::File__Duplicate_Set (const Ztring &Value)
-{
- ZtringList List(Value);
-
- //Searching Target
- bool IsForUs=false;
- std::vector<ZtringList::iterator> Targets_ToAdd;
- std::vector<ZtringList::iterator> Targets_ToRemove;
- std::vector<ZtringList::iterator> Orders_ToAdd;
- std::vector<ZtringList::iterator> Orders_ToRemove;
- for (ZtringList::iterator Current=List.begin(); Current<List.end(); ++Current)
- {
- //Detecting if we want to remove
- bool ToRemove=false;
- if (Current->find(__T('-'))==0)
- {
- ToRemove=true;
- Current->erase(Current->begin());
- }
-
- //Managing targets
- if (Current->find(__T("file:"))==0
- || Current->find(__T("memory:"))==0)
- (ToRemove?Targets_ToRemove:Targets_ToAdd).push_back(Current);
- //Parser name
- else if (Current->find(__T("parser=Avc"))==0)
- IsForUs=true;
- //Managing orders
- else
- (ToRemove?Orders_ToRemove:Orders_ToAdd).push_back(Current);
- }
-
- //For us?
- if (!IsForUs)
- return false;
-
- //Configuration of initial values
- frame_num_Old=(int32u)-1;
- Duplicate_Buffer_Size=0;
- SPS_PPS_AlreadyDone=false;
- FLV=false;
-
- //For each target to add
- for (std::vector<ZtringList::iterator>::iterator Target=Targets_ToAdd.begin(); Target<Targets_ToAdd.end(); ++Target)
- Writer.Configure(**Target);
-
- //For each order to add
- for (std::vector<ZtringList::iterator>::iterator Order=Orders_ToAdd.begin(); Order<Orders_ToAdd.end(); ++Order)
- if ((**Order)==__T("format=Flv"))
- FLV=true;
-
- return true;
-}
-#endif //MEDIAINFO_DUPLICATE
-
-//***************************************************************************
-// Write
-//***************************************************************************
-
-#if MEDIAINFO_DUPLICATE
-void File_Avc::File__Duplicate_Write (int64u Element_Code, int32u frame_num)
-{
- const int8u* ToAdd=Buffer+Buffer_Offset-(size_t)Header_Size+3;
- size_t ToAdd_Size=(size_t)(Element_Size+Header_Size-3);
-
- if (!SPS_PPS_AlreadyDone)
- {
- if (Element_Code==7)
- {
- std::memcpy(Duplicate_Buffer, ToAdd, ToAdd_Size);
- Duplicate_Buffer_Size=ToAdd_Size;
-
- }
- else if (Element_Code==8)
- {
-
- // Form:
- // 8 bytes : PTS
- // 8 bytes : DTS
- // 8 bytes : Size (without header)
- // 1 byte : Type (0=Frame, 1=Header);
- // 7 bytes : Reserved
- size_t Extra;
- if (FLV)
- Extra=1; //FLV
- else
- Extra=0; //MPEG-4
- int8u Header[32];
- int64u2BigEndian(Header+ 0, FrameInfo.PTS);
- int64u2BigEndian(Header+ 8, FrameInfo.DTS);
- int64u2BigEndian(Header+16, 5+Extra+2+Duplicate_Buffer_Size+1+2+ToAdd_Size); //5+Extra for SPS_SQS header, 2 for SPS size, 1 for PPS count, 2 for PPS size
- Header[24]=1;
- int56u2BigEndian(Header+25, 0);
- Writer.Write(Header, 32);
-
- //SPS_PPS
- int8u* SPS_SQS=new int8u[5+Extra];
- if (Extra==1)
- {
- SPS_SQS[0]=0x01; //Profile FLV
- SPS_SQS[1]=(!seq_parameter_sets.empty() && seq_parameter_sets[0])?seq_parameter_sets[0]->profile_idc:0x00; //Compatible Profile. TODO: Handling more than 1 seq_parameter_set
- SPS_SQS[2]=0x00; //Reserved
- }
- else
- {
- SPS_SQS[0]=(!seq_parameter_sets.empty() && seq_parameter_sets[0])?seq_parameter_sets[0]->profile_idc:0x00; //Profile MPEG-4. TODO: Handling more than 1 seq_parameter_set
- SPS_SQS[1]=0x00; //Compatible Profile
- }
- SPS_SQS[2+Extra]=(!seq_parameter_sets.empty() && seq_parameter_sets[0])?seq_parameter_sets[0]->level_idc:0x00; //Level. TODO: Handling more than 1 seq_parameter_set
- SPS_SQS[3+Extra]=0xFF; //Reserved + Size of NALU length minus 1
- SPS_SQS[4+Extra]=0xE1; //Reserved + seq_parameter_set count
- Writer.Write(SPS_SQS, 5+Extra);
-
- //NALU
- int8u NALU[2];
- NALU[0]=((Duplicate_Buffer_Size)>> 8)&0xFF;
- NALU[1]=((Duplicate_Buffer_Size)>> 0)&0xFF;
- Writer.Write(NALU, 2);
-
- //SPS
- Writer.Write(Duplicate_Buffer, Duplicate_Buffer_Size);
- Duplicate_Buffer_Size=0;
-
- //PPS count
- SPS_SQS[0]=0x01; //pic_parameter_set count
- Writer.Write(SPS_SQS, 1);
- delete[] SPS_SQS;
-
- //NALU
- NALU[0]=((ToAdd_Size)>> 8)&0xFF;
- NALU[1]=((ToAdd_Size)>> 0)&0xFF;
- Writer.Write(NALU, 2);
-
- //PPS
- Writer.Write(ToAdd, ToAdd_Size);
-
- SPS_PPS_AlreadyDone=true;
- }
- }
- else if (frame_num!=(int32u)-1)
- {
- if (frame_num!=frame_num_Old && frame_num_Old!=(int32u)-1 && frame_num!=(int32u)-1)
- {
- // Form:
- // 8 bytes : PTS
- // 8 bytes : DTS
- // 8 bytes : Size (without header)
- // 1 byte : Type (0=Frame, 1=Header);
- // 7 bytes : Reserved
- int8u Header[32];
- int64u2BigEndian(Header+ 0, FrameInfo.PTS);
- int64u2BigEndian(Header+ 8, FrameInfo.DTS);
- int64u2BigEndian(Header+16, Duplicate_Buffer_Size);
- Header[24]=0;
- int56u2BigEndian(Header+25, 0);
- Writer.Write(Header, 32);
-
- Writer.Write(Duplicate_Buffer, Duplicate_Buffer_Size);
- Duplicate_Buffer_Size=0;
- }
-
-
- //NALU
- int32u2BigEndian(Duplicate_Buffer+Duplicate_Buffer_Size, (int32u)ToAdd_Size); //4 bytes for NALU header
- Duplicate_Buffer_Size+=4;
-
- //Frame (partial)
- std::memcpy(Duplicate_Buffer+Duplicate_Buffer_Size, ToAdd, ToAdd_Size);
- Duplicate_Buffer_Size+=ToAdd_Size;
- frame_num_Old=frame_num;
- }
-}
-#endif //MEDIAINFO_DUPLICATE
-
-//***************************************************************************
-// Output_Buffer
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DUPLICATE
-size_t File_Avc::Output_Buffer_Get (const String &)
-{
- return Writer.Output_Buffer_Get();
-}
-#endif //MEDIAINFO_DUPLICATE
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DUPLICATE
-size_t File_Avc::Output_Buffer_Get (size_t)
-{
- return Writer.Output_Buffer_Get();
-}
-#endif //MEDIAINFO_DUPLICATE
-
-} //NameSpace
-
-#endif //MEDIAINFO_AVC_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_AvsV.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_AvsV.cpp
deleted file mode 100644
index 3178f9ff0..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_AvsV.cpp
+++ /dev/null
@@ -1,827 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_AVSV_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_AvsV.h"
-#undef FILLING_BEGIN
-#define FILLING_BEGIN() \
- while (Element_Offset<Element_Size && Buffer[Buffer_Offset+(size_t)Element_Offset]==0x00) \
- Element_Offset++; \
- if (Element_Offset!=Element_Size) \
- Trusted_IsNot("Size error"); \
- else if (Element_IsOK()) \
- {
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Ztring AvsV_profile(int8u profile_id)
-{
- switch (profile_id)
- {
- case 0x20 : return "Base";
- default :
- return Ztring::ToZtring(profile_id);
- }
-}
-
-//---------------------------------------------------------------------------
-Ztring AvsV_level(int8u level_id)
-{
- switch (level_id)
- {
- case 0x00 : return Ztring();
- case 0x10 : return "@2.0";
- case 0x20 : return "@4.0";
- case 0x22 : return "@4.2";
- case 0x40 : return "@6.0";
- case 0x42 : return "@6.2";
- default :
- return __T('@')+Ztring::ToZtring(level_id);
- }
-}
-
-//---------------------------------------------------------------------------
-const float32 AvsV_frame_rate[]=
-{
- (float32)0,
- ((float32)24000)/1001,
- (float32)24,
- (float32)25,
- ((float32)30000)/1001,
- (float32)30,
- (float32)50,
- ((float32)60000)/1001,
- (float32)60,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
-};
-
-//---------------------------------------------------------------------------
-const char* AvsV_chroma_format[]=
-{
- "",
- "4:2:0",
- "4:2:2",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* AvsV_extension_start_code_identifier[]=
-{
- "",
- "",
- "sequence_display",
- "",
- "copyright",
- "",
- "",
- "picture_display",
- "",
- "",
- "",
- "camera_parameters",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* AvsV_video_format[]=
-{
- "Component",
- "PAL",
- "NTSC",
- "SECAM",
- "MAC",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const float32 AvsV_aspect_ratio[]=
-{
- (float32)0,
- (float32)1,
- (float32)4/(float32)3,
- (float32)16/(float32)9,
- (float32)2.21,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
-};
-
-//---------------------------------------------------------------------------
-const char* AvsV_picture_coding_type[]=
-{
- "",
- "P",
- "B",
- "",
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_AvsV::File_AvsV()
-:File__Analyze()
-{
- //Config
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
-
- //In
- Frame_Count_Valid=30;
- FrameIsAlwaysComplete=false;
-
- //Temp
- video_sequence_start_IsParsed=false;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_AvsV::Streams_Fill()
-{
- //Filling
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "AVS Video");
- Fill(Stream_Video, 0, Video_Codec, "AVS Video");
-
- //From sequence header
- Fill(Stream_Video, 0, Video_Format_Profile, AvsV_profile(profile_id)+AvsV_level(level_id));
- Fill(Stream_Video, 0, Video_Codec_Profile, AvsV_profile(profile_id)+AvsV_level(level_id));
- Fill(Stream_Video, StreamPos_Last, Video_Width, horizontal_size);
- Fill(Stream_Video, StreamPos_Last, Video_Height, vertical_size);
- Fill(Stream_Video, 0, Video_FrameRate, AvsV_frame_rate[frame_rate_code]/(progressive_sequence?1:2));
- if (aspect_ratio==0)
- ;//Forbidden
- else if (aspect_ratio==1)
- Fill(Stream_Video, 0, Video_PixelAspectRatio, 1.000, 3, true);
- else if (display_horizontal_size && display_vertical_size)
- {
- if (vertical_size && AvsV_aspect_ratio[aspect_ratio])
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, (float)horizontal_size/vertical_size
- *AvsV_aspect_ratio[aspect_ratio]/((float)display_horizontal_size/display_vertical_size), 3, true);
- }
- else if (AvsV_aspect_ratio[aspect_ratio])
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, AvsV_aspect_ratio[aspect_ratio], 3, true);
- Fill(Stream_Video, 0, Video_Colorimetry, AvsV_chroma_format[chroma_format]);
- if (progressive_frame_Count && progressive_frame_Count!=Frame_Count)
- {
- //This is mixed
- }
- else if (Frame_Count>0) //Only if we have at least one progressive_frame definition
- {
- if (progressive_sequence || progressive_frame_Count==Frame_Count)
- {
- Fill(Stream_Video, 0, Video_ScanType, "Progressive");
- Fill(Stream_Video, 0, Video_Interlacement, "PPF");
- }
- else
- {
- Fill(Stream_Video, 0, Video_ScanType, "Interlaced");
- if ((Interlaced_Top && Interlaced_Bottom) || (!Interlaced_Top && !Interlaced_Bottom))
- Fill(Stream_Video, 0, Video_Interlacement, "Interlaced");
- else
- {
- Fill(Stream_Video, 0, Video_ScanOrder, Interlaced_Top?"TFF":"BFF");
- Fill(Stream_Video, 0, Video_Interlacement, Interlaced_Top?"TFF":"BFF");
- }
- }
- }
- Fill(Stream_Video, 0, Video_BitRate_Nominal, bit_rate*8);
-
- //From extensions
- Fill(Stream_Video, 0, Video_Standard, AvsV_video_format[video_format]);
-
- //Library name
- if (!Library.empty())
- {
- Fill(Stream_Video, 0, Video_Encoded_Library, Library);
- Fill(Stream_Video, 0, Video_Encoded_Library_Name, Library_Name);
- Fill(Stream_Video, 0, Video_Encoded_Library_Version, Library_Version);
- Fill(Stream_Video, 0, Video_Encoded_Library_Date, Library_Date);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_AvsV::Streams_Finish()
-{
- //Purge what is not needed anymore
- if (!File_Name.empty()) //Only if this is not a buffer, with buffer we can have more data
- Streams.clear();
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_AvsV::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+3>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (CC3(Buffer+Buffer_Offset)!=0x000001)
- Synched=false;
-
- //Quick search
- if (Synched && !Header_Parser_QuickSearch())
- return false;
-
- //We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_AvsV::Synched_Init()
-{
- //Count of a Packets
- progressive_frame_Count=0;
- Interlaced_Top=0;
- Interlaced_Bottom=0;
-
- //Temp
- bit_rate=0;
- horizontal_size=0;
- vertical_size=0;
- display_horizontal_size=0;
- display_vertical_size=0;
- profile_id=0;
- level_id=0;
- chroma_format=0;
- aspect_ratio=0;
- frame_rate_code=0;
- video_format=5; //Unspecified video format
- progressive_sequence=false;
- low_delay=false;
-
- //Default stream values
- Streams.resize(0x100);
- Streams[0xB0].Searching_Payload=true; //video_sequence_start
- for (int8u Pos=0xFF; Pos>=0xB9; Pos--)
- Streams[Pos].Searching_Payload=true; //Testing MPEG-PS
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_AvsV::Header_Parse()
-{
- //Parsing
- int8u start_code;
- Skip_B3( "synchro");
- Get_B1 (start_code, "start_code");
- if (!Header_Parser_Fill_Size())
- {
- Element_WaitForMoreData();
- return;
- }
-
- //Filling
- Header_Fill_Code(start_code, Ztring().From_CC1(start_code));
-}
-
-//---------------------------------------------------------------------------
-bool File_AvsV::Header_Parser_QuickSearch()
-{
- while ( Buffer_Offset+4<=Buffer_Size
- && Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0x01)
- {
- //Getting start_code
- int8u start_code=Buffer[Buffer_Offset+3];
-
- //Searching start or timestamp
- if (Streams[start_code].Searching_Payload)
- return true;
-
- //Synchronizing
- Buffer_Offset+=4;
- Synched=false;
- if (!Synchronize_0x000001())
- {
- UnSynched_IsNotJunk=true;
- return false;
- }
- }
-
- if (Buffer_Offset+3==Buffer_Size)
- return false; //Sync is OK, but start_code is not available
- Trusted_IsNot("AVS Video, Synchronisation lost");
- return Synchronize();
-}
-
-//---------------------------------------------------------------------------
-bool File_AvsV::Header_Parser_Fill_Size()
-{
- //Look for next Sync word
- if (Buffer_Offset_Temp==0) //Buffer_Offset_Temp is not 0 if Header_Parse_Fill_Size() has already parsed first frames
- Buffer_Offset_Temp=Buffer_Offset+4;
- while (Buffer_Offset_Temp+4<=Buffer_Size
- && CC3(Buffer+Buffer_Offset_Temp)!=0x000001)
- {
- Buffer_Offset_Temp+=2;
- while(Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp]!=0x00)
- Buffer_Offset_Temp+=2;
- if (Buffer_Offset_Temp>=Buffer_Size || Buffer[Buffer_Offset_Temp-1]==0x00)
- Buffer_Offset_Temp--;
- }
-
- //Must wait more data?
- if (Buffer_Offset_Temp+4>Buffer_Size)
- {
- if (FrameIsAlwaysComplete || File_Offset+Buffer_Size==File_Size)
- Buffer_Offset_Temp=Buffer_Size; //We are sure that the next bytes are a start
- else
- return false;
- }
-
- //OK, we continue
- Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
- Buffer_Offset_Temp=0;
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_AvsV::Data_Parse()
-{
- //Parsing
- switch (Element_Code)
- {
- case 0xB0: video_sequence_start(); break;
- case 0xB1: video_sequence_end(); break;
- case 0xB2: user_data_start(); break;
- case 0xB5: extension_start(); break;
- case 0xB3:
- case 0xB6: picture_start(); break;
- case 0xB7: video_edit(); break;
- case 0xB4:
- case 0xB8: reserved(); break;
- default:
- if (Element_Code<=0xAF)
- slice();
- else
- {
- if (Frame_Count==0 && Buffer_TotalBytes>Buffer_TotalBytes_FirstSynched_Max)
- Trusted=0;
- Trusted_IsNot("Unattended element");
-
- }
- }
-
- if (File_Offset+Buffer_Offset+Element_Size==File_Size && Frame_Count>0 && Count_Get(Stream_Video)==0) //Finalize frames in case of there are less than Frame_Count_Valid frames
- {
- //No need of more
- Accept("AVS Video");
- Finish("AVS Video");
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Packet "00" to "AF"
-void File_AvsV::slice()
-{
- Element_Name("Slice");
-
- //Parsing
- Skip_XX(Element_Size, "Unknown");
-
- FILLING_BEGIN();
- //NextCode
- NextCode_Test();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B0"
-void File_AvsV::video_sequence_start()
-{
- Element_Name("video_sequence_start");
-
- //Parsing
- int32u bit_rate_upper, bit_rate_lower;
- Get_B1 ( profile_id, "profile_id");
- Get_B1 ( level_id, "level_id");
- BS_Begin();
- Get_SB ( progressive_sequence, "progressive_sequence");
- Get_S2 (14, horizontal_size, "horizontal_size");
- Get_S2 (14, vertical_size, "vertical_size");
- Get_S1 ( 2, chroma_format, "chroma_format");
- Skip_S1( 3, "sample_precision");
- Get_S1 ( 4, aspect_ratio, "aspect_ratio"); Param_Info1(AvsV_aspect_ratio[aspect_ratio]);
- Get_S1 ( 4, frame_rate_code, "frame_rate_code"); Param_Info1(AvsV_frame_rate[frame_rate_code]);
- Get_S3 (18, bit_rate_lower, "bit_rate_lower");
- Mark_1 ();
- Get_S3 (12, bit_rate_upper, "bit_rate_upper");
- bit_rate=(bit_rate_upper<<18)+bit_rate_lower; Param_Info2(bit_rate*8, " bps");
- Get_SB ( low_delay, "low_delay");
- Mark_1 ();
- Skip_S3(18, "bbv_buffer_size");
- Skip_SB( "reserved");
- Skip_SB( "reserved");
- Skip_SB( "reserved");
- BS_End();
-
- //Not sure, but the 3 first official files have this
- if (Element_Size-Element_Offset)
- {
- BS_Begin();
- Mark_1();
- BS_End();
- }
-
- FILLING_BEGIN();
- //NextCode
- NextCode_Clear();
- NextCode_Add(0xB2); //user_data_start
- NextCode_Add(0xB3); //picture_start (I)
- NextCode_Add(0xB5); //extension_start
-
- //Autorisation of other streams
- Streams[0xB1].Searching_Payload=true, //video_sequence_end
- Streams[0xB2].Searching_Payload=true; //user_data_start
- Streams[0xB3].Searching_Payload=true, //picture_start (I)
- Streams[0xB4].Searching_Payload=true, //reserved
- Streams[0xB5].Searching_Payload=true; //extension_start
- Streams[0xB6].Searching_Payload=true, //picture_start (P or B)
- Streams[0xB7].Searching_Payload=true; //video_edit
- Streams[0xB8].Searching_Payload=true, //reserved
-
- video_sequence_start_IsParsed=true;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B1"
-void File_AvsV::video_sequence_end()
-{
- Element_Name("video_sequence_start");
-
- FILLING_BEGIN();
- //NextCode
- NextCode_Clear();
- NextCode_Add(0xB0); //SeqenceHeader
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B2", User defined size, this is often used of library name
-void File_AvsV::user_data_start()
-{
- Element_Name("user_data_start");
-
- //Rejecting junk from the end
- size_t Library_End_Offset=(size_t)Element_Size;
- while (Library_End_Offset>0
- && (Buffer[Buffer_Offset+Library_End_Offset-1]<0x20
- || Buffer[Buffer_Offset+Library_End_Offset-1]>0x7D
- || (Buffer[Buffer_Offset+Library_End_Offset-1]>=0x3A
- && Buffer[Buffer_Offset+Library_End_Offset-1]<=0x40)))
- Library_End_Offset--;
- if (Library_End_Offset==0)
- return; //No good info
-
- //Accepting good data after junk
- size_t Library_Start_Offset=Library_End_Offset-1;
- while (Library_Start_Offset>0 && (Buffer[Buffer_Offset+Library_Start_Offset-1]>=0x20 && Buffer[Buffer_Offset+Library_Start_Offset-1]<=0x7D))
- Library_Start_Offset--;
-
- //But don't accept non-alpha caracters at the beginning (except for "3ivx")
- if (Library_End_Offset-Library_Start_Offset!=4 || CC4(Buffer+Buffer_Offset+Library_Start_Offset)!=0x33697678) //3ivx
- while (Library_Start_Offset<Element_Size && Buffer[Buffer_Offset+Library_Start_Offset]<=0x40)
- Library_Start_Offset++;
-
- //Parsing
- Ztring Temp;
- if (Library_Start_Offset>0)
- Skip_XX(Library_Start_Offset, "junk");
- if (Library_End_Offset-Library_Start_Offset)
- Get_Local(Library_End_Offset-Library_Start_Offset, Temp,"data");
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "junk");
-
- FILLING_BEGIN();
- //NextCode
- NextCode_Test();
-
- if (Temp.size()>=4)
- Library=Temp;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B5"
-void File_AvsV::extension_start()
-{
- Element_Name("Extension");
-
- //Parsing
- int8u extension_start_code_identifier;
- BS_Begin();
- Get_S1 ( 4, extension_start_code_identifier, "extension_start_code_identifier"); Param_Info1(AvsV_extension_start_code_identifier[extension_start_code_identifier]);
- Element_Info1(AvsV_extension_start_code_identifier[extension_start_code_identifier]);
-
- switch (extension_start_code_identifier)
- {
- case 2 : //sequence_display
- {
- //Parsing
- Get_S1 ( 3, video_format, "video_format"); Param_Info1(AvsV_video_format[video_format]);
- Skip_SB( "sample_range");
- TEST_SB_SKIP( "colour_description");
- Skip_S1( 8, "colour_primaries");
- Skip_S1( 8, "transfer_characteristics");
- Skip_S1( 8, "matrix_coefficients");
- TEST_SB_END();
- Get_S2 (14, display_horizontal_size, "display_horizontal_size");
- Mark_1 ();
- Get_S2 (14, display_vertical_size, "display_vertical_size");
- Skip_SB( "reserved");
- Skip_SB( "reserved");
- BS_End();
- }
- break;
- case 4 : //copyright
- {
- //Parsing
- Skip_SB( "copyright_flag");
- Skip_S1( 8, "copyright_id");
- Skip_SB( "original_or_copy");
- Skip_S1( 7, "reserved");
- Mark_1 ();
- Info_S3(20, copyright_number_1, "copyright_number_1");
- Mark_1 ();
- Info_S3(22, copyright_number_2, "copyright_number_2");
- Mark_1 ();
- Info_S3(22, copyright_number_3, "copyright_number_3"); Param_Info1(Ztring::ToZtring(((int64u)copyright_number_1<<44)+((int64u)copyright_number_2<<22)+(int64u)copyright_number_3, 16));
- BS_End();
- }
- break;
- case 11 : //camera_parameters
- {
- //Parsing
- Skip_SB( "reserved");
- Skip_S1( 7, "camera_id");
- Mark_1 ();
- Skip_S3(22, "height_of_image_device");
- Mark_1 ();
- Skip_S3(22, "focal_length");
- Mark_1 ();
- Skip_S3(22, "f_number");
- Mark_1 ();
- Skip_S3(22, "vertical_angle_of_view");
- Mark_1 ();
- Skip_S3(16, "camera_position_x_upper");
- Mark_1 ();
- Skip_S3(16, "camera_position_x_lower");
- Mark_1 ();
- Skip_S3(16, "camera_position_y_upper");
- Mark_1 ();
- Skip_S3(16, "camera_position_y_lower");
- Mark_1 ();
- Skip_S3(16, "camera_position_z_upper");
- Mark_1 ();
- Skip_S3(16, "camera_position_z_lower");
- Mark_1 ();
- Skip_S3(22, "camera_direction_x");
- Mark_1 ();
- Skip_S3(22, "camera_direction_y");
- Mark_1 ();
- Skip_S3(22, "camera_direction_z");
- Mark_1 ();
- Skip_S3(22, "camera_plane_vertical_x");
- Mark_1 ();
- Skip_S3(22, "camera_plane_vertical_y");
- Mark_1 ();
- Skip_S3(22, "camera_plane_vertical_z");
- Mark_1 ();
- Skip_S4(32, "reserved");
- BS_End();
- }
- break;
- default :
- {
- //Parsing
- Skip_S1(4, "data");
- BS_End();
- Skip_XX(Element_Size-Element_Offset, "data");
- }
- }
-
- //Not sure, but the 3 first official files have this
- if (Element_Size-Element_Offset)
- {
- BS_Begin();
- Mark_1();
- BS_End();
- }
-
- FILLING_BEGIN();
- //NextCode
- NextCode_Test();
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B3" or "B6"
-void File_AvsV::picture_start()
-{
- //Counting
- if (File_Offset+Buffer_Offset+Element_Size==File_Size)
- Frame_Count_Valid=Frame_Count; //Finalize frames in case of there are less than Frame_Count_Valid frames
- Frame_Count++;
-
- //Name
- Element_Name("picture_start");
- Element_Info1(Ztring::ToZtring(Frame_Count));
- Element_Info1C((Element_Code==0xB3), __T("I"));
-
- //Parsing
- int8u picture_coding_type=(int8u)-1;
- bool time_code_flag, progressive_frame, picture_structure=true, top_field_first, repeat_first_field, skip_mode_flag=false, loop_filter_disable;
- Skip_B2( "bbv_delay");
- BS_Begin();
- if (Element_Code==0xB3) //Only I
- {
- Get_SB ( time_code_flag, "time_code_flag");
- if (time_code_flag)
- {
- Skip_SB( "time_code_dropframe");
- Skip_S1(5, "time_code_hours");
- Skip_S1(6, "time_code_minutes");
- Skip_S1(6, "time_code_seconds");
- Skip_S1(6, "time_code_pictures");
- }
- }
- if (Element_Code==0xB6) //Only P or B
- {
- Get_S1 ( 2, picture_coding_type, "picture_coding_type"); Element_Info1(AvsV_picture_coding_type[picture_coding_type]);
- }
- Skip_S1( 8, "picture_distance");
- if (low_delay)
- Skip_UE( "bbv_check_times");
- Get_SB ( progressive_frame, "progressive_frame");
- if (!progressive_frame)
- {
- Get_SB( picture_structure, "picture_structure");
- if (Element_Code==0xB6) //Only P or B
- {
- if (picture_structure)
- Skip_SB( "advanced_pred_mode_disable");
- }
- }
- Get_SB ( top_field_first, "top_field_first");
- Get_SB ( repeat_first_field, "repeat_first_field");
- Skip_SB( "fixed_picture_qp");
- Skip_S1( 6, "picture_qp");
- if (Element_Code==0xB3) //Only I
- {
- if (!progressive_frame && !picture_structure)
- Get_SB( skip_mode_flag, "skip_mode_flag");
- }
- if (Element_Code==0xB6) //Only P or B
- {
- if (picture_coding_type!=2 || !picture_structure)
- Skip_SB( "picture_reference_flag");
- }
- Skip_SB( "reserved");
- Skip_SB( "reserved");
- Skip_SB( "reserved");
- Skip_SB( "reserved");
- if (Element_Code==0xB6) //Only P or B
- {
- Get_SB( skip_mode_flag, "skip_mode_flag");
- }
- Get_SB ( loop_filter_disable, "loop_filter_disable");
- if (!loop_filter_disable)
- {
- bool loop_filter_parameter_flag;
- Get_SB ( loop_filter_parameter_flag, "loop_filter_parameter_flag");
- if (loop_filter_parameter_flag)
- {
- Skip_SE( "alpha_c_offset");
- Skip_SE( "beta_offset");
- }
- }
- BS_End();
-
- if (Element_Size-Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "Unknown");
-
- FILLING_BEGIN();
- if (progressive_frame==false)
- {
- if (picture_structure==true) //Frame
- {
- if (top_field_first)
- Interlaced_Top++;
- else
- Interlaced_Bottom++;
- }
- }
- else
- progressive_frame_Count++;
-
- //NextCode
- NextCode_Test();
- NextCode_Clear();
- for (int8u Pos=0x00; Pos<=0xAF; Pos++)
- NextCode_Add(Pos); //slice
- NextCode_Add(0xB0); //video_sequence_start
- NextCode_Add(0xB3); //picture_start
- NextCode_Add(0xB6); //picture_start
-
- //Autorisation of other streams
- for (int8u Pos=0x00; Pos<=0xAF; Pos++)
- Streams[Pos].Searching_Payload=true; //slice
-
- //Filling only if not already done
- if (Frame_Count>=Frame_Count_Valid && Count_Get(Stream_Video)==0)
- {
- //No need of more
- Accept("AVS Video");
- Finish("AVS Video");
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B7"
-void File_AvsV::video_edit()
-{
- Element_Name("video_edit");
-}
-
-//---------------------------------------------------------------------------
-// Packet "B4" and "B8"
-void File_AvsV::reserved()
-{
- Element_Name("reserved");
-
- //Parsing
- if (Element_Size)
- Skip_XX(Element_Size, "reserved");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_AVSV_*
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_AvsV.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_AvsV.h
deleted file mode 100644
index 985ff5d7d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_AvsV.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about AVS Video files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_AvsVH
-#define MediaInfo_AvsVH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/Multiple/File_Mpeg4.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Avs
-//***************************************************************************
-
-class File_AvsV : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
- bool FrameIsAlwaysComplete;
-
- //constructor/Destructor
- File_AvsV();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin() {return FileHeader_Begin_0x000001();}
-
- //Buffer - Synchro
- bool Synchronize() {return Synchronize_0x000001();}
- bool Synched_Test();
- void Synched_Init();
-
- //Buffer - Per element
- void Header_Parse();
- bool Header_Parser_QuickSearch();
- bool Header_Parser_Fill_Size();
- void Data_Parse();
-
- //Elements
- void slice();
- void video_sequence_start();
- void video_sequence_end();
- void user_data_start();
- void extension_start();
- void picture_start();
- void video_edit();
- void reserved();
-
- //Count of a Packets
- size_t progressive_frame_Count;
- size_t Interlaced_Top;
- size_t Interlaced_Bottom;
-
- //From user_data
- Ztring Library;
- Ztring Library_Name;
- Ztring Library_Version;
- Ztring Library_Date;
-
- //Temp
- int32u bit_rate; //From video_sequence_start
- int16u horizontal_size; //From video_sequence_start
- int16u vertical_size; //From video_sequence_start
- int16u display_horizontal_size; //From sequence_display
- int16u display_vertical_size; //From sequence_display
- int8u profile_id; //From video_sequence_start
- int8u level_id; //From video_sequence_start
- int8u chroma_format; //From video_sequence_start
- int8u aspect_ratio; //From video_sequence_start
- int8u frame_rate_code; //From video_sequence_start
- int8u video_format; //From sequence_display
- bool progressive_sequence; //From video_sequence_start
- bool low_delay; //From video_sequence_start
- bool video_sequence_start_IsParsed; //From video_sequence_start
-
- //Streams
- struct stream
- {
- bool Searching_Payload;
-
- stream()
- {
- Searching_Payload=false;
- }
- };
- std::vector<stream> Streams;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Canopus.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Canopus.cpp
deleted file mode 100644
index c35a74696..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Canopus.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_CANOPUS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Canopus.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Canopus::File_Canopus()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("Canopus");
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Canopus::Streams_Fill()
-{
- Stream_Prepare(Stream_Video);
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Canopus::Read_Buffer_Continue()
-{
- //Parsing
- int32u PAR_X=0, PAR_Y=0, FieldOrder=(int32u)-1;
- while (Element_Offset<Element_Size)
- {
- Element_Begin0();
- int32u FourCC;
- Get_C4 (FourCC, "FourCC");
- switch (FourCC)
- {
- case 0x494E464F : // "INFO"
- {
- Element_Name("Information");
- int32u Info_Size;
- Get_L4 (Info_Size, "Size");
- int64u Info_End=Element_Offset+Info_Size;
- if (Info_Size<16 || Info_End>Element_Size)
- {
- Skip_XX(Element_Size-Element_Offset, "Problem");
- Element_End0();
- return;
- }
- Skip_L4( "Unknown");
- Skip_L4( "Unknown");
- Get_L4 (PAR_X, "PAR_X");
- Get_L4 (PAR_Y, "PAR_Y");
- while (Element_Offset<Info_End)
- {
- Element_Begin0();
- Get_C4 (FourCC, "FourCC");
- switch (FourCC)
- {
- case 0x4649454C : // "FIEL"
- {
- Element_Name("Field information?");
- int32u FIEL_Size;
- Get_L4 (FIEL_Size, "Size");
- int64u FIEL_End=Element_Offset+FIEL_Size;
- if (FIEL_End>Info_End)
- {
- Skip_XX(Info_End-Element_Offset, "Problem");
- break;
- }
- if (Element_Offset<FIEL_End)
- Get_L4(FieldOrder, "Field order");
- while (Element_Offset<FIEL_End)
- Skip_L4( "Unknown");
- }
- break;
- case 0x52445254 : // "RDRT"
- {
- Element_Name("RDRT?");
- int32u RDRT_Size;
- Get_L4 (RDRT_Size, "Size");
- int64u RDRT_End=Element_Offset+RDRT_Size;
- if (RDRT_End>Info_End)
- {
- Skip_XX(Info_End-Element_Offset, "Problem");
- break;
- }
- while (Element_Offset<RDRT_End)
- Skip_L4( "Unknown");
- }
- break;
- default: Element_Name("Unknown");
- Skip_XX(Info_End-Element_Offset, "Unknown");
- }
- Element_End0();
- }
- }
- break;
- case 0x55564307 : // "UVC" 7
- Element_Name("Data?");
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- break;
- default: Element_Name("Unknown");
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- }
- Element_End0();
- }
-
- FILLING_BEGIN();
- if (!Status[IsAccepted])
- {
- Accept();
- Fill();
-
- //Info
- if (PAR_X && PAR_Y)
- Fill(Stream_Video, 0, Video_PixelAspectRatio, ((float32)PAR_X)/PAR_Y, 3);
- switch (FieldOrder)
- {
- case 0 :
- Fill(Stream_Video, 0, Video_ScanType, "Interlaced");
- Fill(Stream_Video, 0, Video_ScanOrder, "TFF");
- break;
- case 1 :
- Fill(Stream_Video, 0, Video_ScanType, "Interlaced");
- Fill(Stream_Video, 0, Video_ScanOrder, "BFF");
- break;
- case 2 :
- Fill(Stream_Video, 0, Video_ScanType, "Progressive");
- break;
- default : ;
- }
-
- if (Config->ParseSpeed<1.0)
- Finish();
- }
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-
-} //NameSpace
-
-#endif //MEDIAINFO_CANOPUS_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Canopus.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Canopus.h
deleted file mode 100644
index 8d352f7d1..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Canopus.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Canopus streams
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_CanopusH
-#define MediaInfo_File_CanopusH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Theora
-//***************************************************************************
-
-class File_Canopus : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Canopus();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Dirac.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Dirac.cpp
deleted file mode 100644
index 23d2df9b4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Dirac.cpp
+++ /dev/null
@@ -1,889 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_DIRAC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Dirac.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-const char* Dirac_base_video_format(intu base_video_format)
-{
- switch (base_video_format)
- {
- case 1 : return "QSIF525";
- case 2 : return "QCIF";
- case 3 : return "SIF525";
- case 4 : return "CIF";
- case 5 : return "4SIF525";
- case 6 : return "4CIF";
- case 7 : return "480i60";
- case 8 : return "576i50";
- case 9 : return "720p50";
- case 10 : return "720p60";
- case 11 : return "1080i60";
- case 12 : return "1080i50";
- case 13 : return "1080p60";
- case 14 : return "1080p60";
- case 15 : return "2K-24";
- case 16 : return "4K-24";
- case 17 : return "4K-60";
- case 18 : return "4K-50";
- case 19 : return "8K-60";
- case 20 : return "8K-50";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-float32 Dirac_frame_rate(int32u frame_rate_index)
-{
- switch (frame_rate_index)
- {
- case 0 : return (float32)0; //Reserved
- case 1 : return (float32)24000/(float32)1001;
- case 2 : return (float32)24;
- case 3 : return (float32)25;
- case 4 : return (float32)30000/(float32)1001;
- case 5 : return (float32)30;
- case 6 : return (float32)50;
- case 7 : return (float32)60000/(float32)1001;
- case 8 : return (float32)60;
- case 9 : return (float32)15000/(float32)1001;
- case 10 : return (float32)12.5;
- default : return (float32)0; //Unknown
- }
-}
-
-//---------------------------------------------------------------------------
-float32 Dirac_pixel_aspect_ratio(int32u pixel_aspect_ratio_index)
-{
- switch (pixel_aspect_ratio_index)
- {
- case 0 : return (float32)0; //Reserved
- case 1 : return (float32)1; //Reserved
- case 2 : return (float32)10/(float32)11;
- case 3 : return (float32)12/(float32)11;
- case 4 : return (float32)40/(float32)33;
- case 5 : return (float32)16/(float32)11;
- case 6 : return (float32) 4/(float32) 3;
- default : return (float32)0; //Unknown
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Dirac_picture_coding_mode(int32u picture_coding_mode)
-{
- switch (picture_coding_mode)
- {
- case 0 : return "PPF";
- case 1 : return "Interlaced";
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Dirac_source_sampling(int32u source_sampling)
-{
- switch (source_sampling)
- {
- case 0 : return "Progressive";
- case 1 : return "Interlaced";
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Dirac_source_sampling_Codec(int32u source_sampling)
-{
- switch (source_sampling)
- {
- case 0 : return "PPF";
- case 1 : return "Interlaced";
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Dirac_chroma_format(int32u chroma_format)
-{
- switch (chroma_format)
- {
- case 0 : return "4:4:4";
- case 1 : return "4:2:2";
- case 2 : return "4:2:0";
- default: return "";
- }
-}
-
-//---------------------------------------------------------------------------
-void Dirac_base_video_format(int32u base_video_format,
- int32u &frame_width,
- int32u &frame_height,
- int32u &chroma_format,
- int32u &source_sampling,
- int32u &clean_width,
- int32u &clean_height,
- int32u &clean_left_offset,
- int32u &clean_top_offset,
- float32 &frame_rate,
- float32 &pixel_aspect_ratio)
-{
- switch (base_video_format)
- {
- case 0 : frame_width=640;
- frame_height=480;
- chroma_format=2;
- source_sampling=0;
- clean_width=640;
- clean_height=480;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(1);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(1);
- return;
- case 1 : frame_width=176;
- frame_height=120;
- chroma_format=2;
- source_sampling=0;
- clean_width=176;
- clean_height=144;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(9);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(2);
- return;
- case 2 : frame_width=176;
- frame_height=144;
- chroma_format=2;
- source_sampling=0;
- clean_width=176;
- clean_height=144;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(10);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(3);
- return;
- case 3 : frame_width=352;
- frame_height=240;
- chroma_format=2;
- source_sampling=0;
- clean_width=352;
- clean_height=240;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(9);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(2);
- return;
- case 4 : frame_width=352;
- frame_height=288;
- chroma_format=2;
- source_sampling=0;
- clean_width=352;
- clean_height=288;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(10);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(3);
- return;
- case 5 : frame_width=704;
- frame_height=480;
- chroma_format=2;
- source_sampling=0;
- clean_width=704;
- clean_height=480;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(9);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(2);
- return;
- case 6 : frame_width=704;
- frame_height=576;
- chroma_format=2;
- source_sampling=0;
- clean_width=704;
- clean_height=576;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(10);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(3);
- return;
- case 7 : frame_width=720;
- frame_height=480;
- chroma_format=1;
- source_sampling=1;
- clean_width=704;
- clean_height=480;
- clean_left_offset=8;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(4);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(2);
- return;
- case 8 : frame_width=720;
- frame_height=576;
- chroma_format=1;
- source_sampling=1;
- clean_width=704;
- clean_height=576;
- clean_left_offset=8;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(3);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(3);
- return;
- case 9 : frame_width=1280;
- frame_height=720;
- chroma_format=1;
- source_sampling=0;
- clean_width=1280;
- clean_height=720;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(7);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(1);
- return;
- case 10 : frame_width=1280;
- frame_height=720;
- chroma_format=1;
- source_sampling=0;
- clean_width=1280;
- clean_height=720;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(6);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(1);
- return;
- case 11 : frame_width=1920;
- frame_height=1080;
- chroma_format=1;
- source_sampling=1;
- clean_width=1920;
- clean_height=1080;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(4);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(1);
- return;
- case 12 : frame_width=1920;
- frame_height=1080;
- chroma_format=1;
- source_sampling=1;
- clean_width=1920;
- clean_height=1080;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(3);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(1);
- return;
- case 13 : frame_width=1920;
- frame_height=1080;
- chroma_format=1;
- source_sampling=0;
- clean_width=1920;
- clean_height=1080;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(7);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(1);
- return;
- case 14 : frame_width=1920;
- frame_height=1080;
- chroma_format=1;
- source_sampling=0;
- clean_width=1920;
- clean_height=1080;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(6);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(1);
- return;
- case 15 : frame_width=2048;
- frame_height=1080;
- chroma_format=0;
- source_sampling=0;
- clean_width=2048;
- clean_height=1080;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(2);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(1);
- return;
- case 16 : frame_width=4096;
- frame_height=2160;
- chroma_format=0;
- source_sampling=0;
- clean_width=4096;
- clean_height=2160;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(2);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(1);
- return;
- case 17 : frame_width=3840;
- frame_height=2160;
- chroma_format=0;
- source_sampling=0;
- clean_width=3840;
- clean_height=2160;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(7);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(1);
- return;
- case 18 : frame_width=3840;
- frame_height=2160;
- chroma_format=0;
- source_sampling=0;
- clean_width=3840;
- clean_height=2160;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(6);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(1);
- return;
- case 19 : frame_width=7680;
- frame_height=4320;
- chroma_format=0;
- source_sampling=0;
- clean_width=7680;
- clean_height=4320;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(7);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(1);
- return;
- case 20 : frame_width=7680;
- frame_height=4320;
- chroma_format=0;
- source_sampling=0;
- clean_width=7680;
- clean_height=4320;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate(6);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(1);
- return;
- default : frame_width=0;
- frame_height=0;
- chroma_format=(int32u)-1;
- source_sampling=(int32u)-1;
- clean_width=0;
- clean_height=0;
- clean_left_offset=0;
- clean_top_offset=0;
- frame_rate=Dirac_frame_rate((int32u)-1);
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio((int32u)-1);
- return;
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Dirac::File_Dirac()
-:File__Analyze()
-{
- //Configuration
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
-
- //In
- Frame_Count_Valid=1;
- Ignore_End_of_Sequence=false;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dirac::Streams_Fill()
-{
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "Dirac");
- Fill(Stream_Video, 0, Video_Codec, "Dirac");
-
- if (clean_width)
- Fill(Stream_Video, StreamPos_Last, Video_Width, clean_width);
- if (clean_height)
- Fill(Stream_Video, StreamPos_Last, Video_Height, clean_height);
- if (pixel_aspect_ratio)
- {
- Fill(Stream_Video, 0, Video_PixelAspectRatio, pixel_aspect_ratio, 3, true);
- if (clean_height!=0)
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, ((float)clean_width)/clean_height*pixel_aspect_ratio, 3, true);
- }
- if (frame_rate)
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, frame_rate);
- Fill(Stream_Video, 0, Video_Colorimetry, Dirac_chroma_format(chroma_format));
- Fill(Stream_Video, 0, Video_ScanType, Dirac_source_sampling(source_sampling));
- Fill(Stream_Video, 0, Video_Interlacement, Dirac_source_sampling_Codec(source_sampling));
-}
-
-//---------------------------------------------------------------------------
-void File_Dirac::Streams_Finish()
-{
- //Purge what is not needed anymore
- if (!File_Name.empty()) //Only if this is not a buffer, with buffer we can have more data
- Streams.clear();
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Dirac::Synchronize()
-{
- //Synchronizing
- while(Buffer_Offset+4<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x42
- || Buffer[Buffer_Offset+1]!=0x42
- || Buffer[Buffer_Offset+2]!=0x43
- || Buffer[Buffer_Offset+3]!=0x44)) //"BBCD"
- {
- Buffer_Offset+=2;
- while(Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x42)
- Buffer_Offset+=2;
- if (Buffer_Offset>=Buffer_Size || Buffer[Buffer_Offset-1]==0x42)
- Buffer_Offset--;
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+4>Buffer_Size)
- {
- if (Buffer_Offset+3==Buffer_Size && CC3(Buffer+Buffer_Offset)!=0x424243) //"BBC"
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && CC2(Buffer+Buffer_Offset)!=0x4242) //"BB"
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && CC1(Buffer+Buffer_Offset)!=0x42) //"B"
- Buffer_Offset++;
- return false;
- }
-
- //Synched is OK
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Dirac::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+4>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (CC4(Buffer+Buffer_Offset)!=0x42424344) //"BBCD"
- Synched=false;
-
- //Quick search
- if (Synched && !Header_Parser_QuickSearch())
- return false;
-
- //We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Dirac::Synched_Init()
-{
- //Temp
- Dirac_base_video_format((int32u)-1, frame_width, frame_height, chroma_format, source_sampling,
- clean_width, clean_height, clean_left_offset, clean_top_offset,
- frame_rate, pixel_aspect_ratio);
-
- //Default stream values
- Streams.resize(0x100);
- Streams[0x00].Searching_Payload=true; //Sequence header
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Dirac::Header_Parse()
-{
- //Parsing
- int32u Next_Parse_Offset, Previous_Parse_Offset;
- int8u Parse_Code;
- Skip_C4( "Parse Info Prefix");
- Get_B1 (Parse_Code, "Parse Code");
- Get_B4 (Next_Parse_Offset, "Next Parse Offset");
- Get_B4 (Previous_Parse_Offset, "Previous Parse Offset");
-
- //Filling
- Header_Fill_Code(Parse_Code, Ztring().From_CC1(Parse_Code));
- Header_Fill_Size((Parse_Code==0x10 && Next_Parse_Offset==0)?13:Next_Parse_Offset); //Speacial case if this is the End Of Sequence
-}
-
-//---------------------------------------------------------------------------
-bool File_Dirac::Header_Parser_QuickSearch()
-{
- while ( Buffer_Offset+5<=Buffer_Size
- && Buffer[Buffer_Offset ]==0x42
- && Buffer[Buffer_Offset+1]==0x42
- && Buffer[Buffer_Offset+2]==0x43
- && Buffer[Buffer_Offset+3]==0x44) //"BBCD"
- {
- //Getting start_code
- int8u start_code=CC1(Buffer+Buffer_Offset+4);
-
- //Searching start
- if (Streams[start_code].Searching_Payload)
- return true;
-
- //Getting size
- Buffer_Offset+=BigEndian2int32u(Buffer+Buffer_Offset+5);
- }
-
- if (Buffer_Offset+4==Buffer_Size)
- return false; //Sync is OK, but start_code is not available
- if (Buffer_Offset+5<=Buffer_Size)
- Trusted_IsNot("Dirac, Synchronisation lost");
- Synched=false;
- return Synchronize();
-}
-
-//---------------------------------------------------------------------------
-void File_Dirac::Data_Parse()
-{
- //Parsing
- switch (Element_Code)
- {
- case 0x00 : Sequence_header(); break;
- case 0x10 : End_of_Sequence(); break;
- case 0x20 : Auxiliary_data(); break;
- case 0x30 : Padding_data(); break;
- case 0x0C : Intra_Reference_Picture(); break;
- case 0x08 : Intra_Non_Reference_Picture(); break;
- case 0x4C : Intra_Reference_Picture_No(); break;
- case 0x48 : Intra_Non_Reference_Picture_No(); break;
- case 0x0D : Inter_Reference_Picture_1(); break;
- case 0x0E : Inter_Reference_Picture_2(); break;
- case 0x09 : Inter_Non_Reference_Picture_1(); break;
- case 0x0A : Inter_Non_Reference_Picture_2(); break;
- case 0xCC : Reference_Picture_Low(); break;
- case 0xC8 : Intra_Non_Reference_Picture_Low(); break;
- default : Reserved();
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Packet "00"
-void File_Dirac::Sequence_header()
-{
- Element_Name("Sequence header");
-
- //Parsing
- int32u version_major, version_minor, profile, level, base_video_format;
- BS_Begin();
- Get_UI(version_major, "version major");
- Get_UI(version_minor, "version minor");
- Get_UI(profile, "profile");
- Get_UI(level, "level");
-
- if (version_major<=2)
- {
- Get_UI(base_video_format, "base video format"); //Param_Info1(Dirac_base_video_format(base_video_format));
- Dirac_base_video_format(base_video_format, frame_width, frame_height, chroma_format, source_sampling,
- clean_width, clean_height, clean_left_offset, clean_top_offset,
- frame_rate, pixel_aspect_ratio);
- TEST_SB_SKIP( "custom dimensions flag");
- Get_UI (frame_width, "frame width");
- Get_UI (frame_height, "frame height");
- TEST_SB_END();
- TEST_SB_SKIP( "custom chroma format flag");
- Get_UI (chroma_format, "chroma format"); Param_Info1(Dirac_chroma_format(chroma_format));
- TEST_SB_END();
- TEST_SB_SKIP( "custom scan format flag");
- Get_UI (source_sampling, "source sampling"); Param_Info1(Dirac_source_sampling(source_sampling));
- TEST_SB_END();
- TEST_SB_SKIP( "frame rate flag");
- int32u frame_rate_index;
- Get_UI (frame_rate_index, "index"); Param_Info1(Dirac_frame_rate(frame_rate_index));
- if (frame_rate_index==0)
- {
- int32u frame_rate_numer, frame_rate_denom;
- Get_UI (frame_rate_numer, "frame rate numer");
- Get_UI (frame_rate_denom, "frame rate denom");
- frame_rate=((float32)frame_rate_numer)/((float32)frame_rate_denom);
- }
- else
- frame_rate=Dirac_frame_rate(frame_rate_index);
- TEST_SB_END();
- TEST_SB_SKIP( "pixel aspect ratio flag");
- int32u pixel_aspect_ratio_index;
- Get_UI (pixel_aspect_ratio_index, "index"); Param_Info1(Dirac_pixel_aspect_ratio(pixel_aspect_ratio_index));
- if (pixel_aspect_ratio_index==0)
- {
- int32u pixel_aspect_ratio_numer, pixel_aspect_ratio_denom;
- Get_UI (pixel_aspect_ratio_numer, "pixel aspect ratio numer");
- Get_UI (pixel_aspect_ratio_denom, "pixel aspect ratio denom");
- pixel_aspect_ratio=((float32)pixel_aspect_ratio_numer)/((float32)pixel_aspect_ratio_denom);
- }
- else
- pixel_aspect_ratio=Dirac_pixel_aspect_ratio(pixel_aspect_ratio_index);
- TEST_SB_END();
- TESTELSE_SB_SKIP( "custom clean area flag");
- Get_UI (clean_width, "clean width");
- Get_UI (clean_height, "clean height");
- Get_UI (clean_left_offset, "clean left offset");
- Get_UI (clean_top_offset, "clean top offset");
- TESTELSE_SB_ELSE( "custom clean area flag");
- clean_width=frame_width;
- clean_height=frame_height;
- TESTELSE_SB_END();
- TEST_SB_SKIP( "custom signal range flag");
- int32u custom_signal_range_index;
- Get_UI(custom_signal_range_index, "index");
- if (custom_signal_range_index==0)
- {
- Skip_UI( "luma offset");
- Skip_UI( "luma excursion");
- Skip_UI( "chroma offset");
- Skip_UI( "chroma excursion");
- }
- TEST_SB_END();
- TEST_SB_SKIP( "custom colour spec flag");
- int32u custom_colour_spec_index;
- Get_UI(custom_colour_spec_index, "index");
- if (custom_colour_spec_index==0)
- {
- TEST_SB_SKIP( "custom colour primaries flag");
- Skip_UI( "custom colour primaries index");
- TEST_SB_END();
- TEST_SB_SKIP( "colour matrix flag");
- Skip_UI( "colour matrix index");
- TEST_SB_END();
- TEST_SB_SKIP( "custom transfer function flag");
- Skip_UI( "custom transfer function index");
- TEST_SB_END();
- }
- TEST_SB_END();
- Info_UI(picture_coding_mode, "picture coding mode"); Param_Info1(Dirac_picture_coding_mode(picture_coding_mode));
- }
- else
- {
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- }
-
- FILLING_BEGIN();
- //Autorisation of other streams
- Streams[0x10].Searching_Payload=true; //End_of_Sequence
- Streams[0x20].Searching_Payload=true; //Auxiliary_data
- Streams[0x30].Searching_Payload=true; //Padding_data
- Streams[0x0C].Searching_Payload=true; //Intra_Reference_Picture
- Streams[0x08].Searching_Payload=true; //Intra_Non_Reference_Picture
- Streams[0x4C].Searching_Payload=true; //Intra_Reference_Picture_No
- Streams[0x48].Searching_Payload=true; //Intra_Non_Reference_Picture_No
- Streams[0x0D].Searching_Payload=true; //Inter_Reference_Picture_1
- Streams[0x0E].Searching_Payload=true; //Inter_Reference_Picture_2
- Streams[0x09].Searching_Payload=true; //Inter_Non_Reference_Picture_1
- Streams[0x0A].Searching_Payload=true; //Inter_Non_Reference_Picture_2
- Streams[0xCC].Searching_Payload=true; //Reference_Picture_Low
- Streams[0xC8].Searching_Payload=true; //Intra_Non_Reference_Picture_Low
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "10"
-void File_Dirac::End_of_Sequence()
-{
- Element_Name("End of Sequence");
-
- //Parsing
- if (!Ignore_End_of_Sequence)
- {
- NextCode_Clear();
- Accept("Dirac");
- Finish("Dirac");
- }
-}
-
-//---------------------------------------------------------------------------
-// Packet "20"
-void File_Dirac::Auxiliary_data()
-{
- Element_Name("Auxiliary data");
-
- //Parsing
- Skip_XX(Element_Size, "Auxiliary data");
-}
-
-//---------------------------------------------------------------------------
-// Packet "30"
-void File_Dirac::Padding_data()
-{
- Element_Name("Padding data");
-
- //Parsing
- Skip_XX(Element_Size, "Padding data");
-}
-
-//---------------------------------------------------------------------------
-// Packet "0C"
-void File_Dirac::Intra_Reference_Picture()
-{
- Element_Name("Intra Reference Picture");
-
- //Parsing
- picture();
-}
-
-//---------------------------------------------------------------------------
-// Packet "08"
-void File_Dirac::Intra_Non_Reference_Picture()
-{
- Element_Name("Intra Non Reference Picture");
-
- //Parsing
- picture();
-}
-
-//---------------------------------------------------------------------------
-// Packet "4C"
-void File_Dirac::Intra_Reference_Picture_No()
-{
- Element_Name("Intra Reference Picture (no arithmetic coding)");
-
- //Parsing
- picture();
-}
-
-//---------------------------------------------------------------------------
-// Packet "48"
-void File_Dirac::Intra_Non_Reference_Picture_No()
-{
- Element_Name("Intra Non Reference Picture (no arithmetic coding)");
-
- //Parsing
- picture();
-}
-
-//---------------------------------------------------------------------------
-// Packet "0D"
-void File_Dirac::Inter_Reference_Picture_1()
-{
- Element_Name("Inter Reference Picture (1 picture)");
-
- //Parsing
- picture();
-}
-
-//---------------------------------------------------------------------------
-// Packet "0E"
-void File_Dirac::Inter_Reference_Picture_2()
-{
- Element_Name("Inter Reference Picture (2 pictures)");
-
- //Parsing
- picture();
-}
-
-//---------------------------------------------------------------------------
-// Packet "09"
-void File_Dirac::Inter_Non_Reference_Picture_1()
-{
- Element_Name("Inter Non Reference Picture (1 picture)");
-
- //Parsing
- picture();
-}
-
-//---------------------------------------------------------------------------
-// Packet "0A"
-void File_Dirac::Inter_Non_Reference_Picture_2()
-{
- Element_Name("Inter Non Reference Picture (2 pictures)");
-
- //Parsing
- picture();
-}
-
-//---------------------------------------------------------------------------
-// Packet "CC"
-void File_Dirac::Reference_Picture_Low()
-{
- Element_Name("Reference Picture (low-delay)");
-
- //Parsing
- picture();
-}
-
-//---------------------------------------------------------------------------
-// Packet "C8"
-void File_Dirac::Intra_Non_Reference_Picture_Low()
-{
- Element_Name("Intra Non Reference Picture (low-delay)");
-
- //Parsing
- picture();
-}
-
-//---------------------------------------------------------------------------
-void File_Dirac::Reserved()
-{
- Element_Name("Reserved");
-
- Skip_XX(Element_Size, "Unknown");
-}
-
-//---------------------------------------------------------------------------
-void File_Dirac::picture()
-{
- //Parsing
- Skip_XX(Element_Size, "Data");
-
- FILLING_BEGIN();
- //Counting
- if (File_Offset+Buffer_Offset+Element_Size==File_Size)
- Frame_Count_Valid=Frame_Count; //Finalize frames in case of there are less than Frame_Count_Valid frames
-
- //Name
- Element_Info1(Ztring::ToZtring(Frame_Count));
-
- //Filling only if not already done
- Frame_Count++;
- Frame_Count_InThisBlock++;
- if (Frame_Count>=Frame_Count_Valid && Count_Get(Stream_Video)==0)
- {
- NextCode_Clear();
- Accept("Dirac");
- Finish("Dirac");
- }
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_DIRAC_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Dirac.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Dirac.h
deleted file mode 100644
index b3a6fe539..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Dirac.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Dirac files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_DiracH
-#define MediaInfo_File_DiracH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Dirac
-//***************************************************************************
-
-class File_Dirac : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
- bool Ignore_End_of_Sequence;
-
- //Constructor/Destructor
- File_Dirac();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin() {return FileHeader_Begin_0x000001();}
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
- void Synched_Init();
-
- //Buffer - Per element
- void Header_Parse();
- bool Header_Parser_QuickSearch();
- bool Header_Parser_Fill_Size();
- void Data_Parse();
-
- //Elements
- void Sequence_header();
- void End_of_Sequence();
- void Auxiliary_data();
- void Padding_data();
- void Intra_Reference_Picture();
- void Intra_Non_Reference_Picture();
- void Intra_Reference_Picture_No();
- void Intra_Non_Reference_Picture_No();
- void Inter_Reference_Picture_1();
- void Inter_Reference_Picture_2();
- void Inter_Non_Reference_Picture_1();
- void Inter_Non_Reference_Picture_2();
- void Reference_Picture_Low();
- void Intra_Non_Reference_Picture_Low();
- void Reserved();
- void picture();
-
- //Streams
- struct stream
- {
- bool Searching_Payload;
-
- stream()
- {
- Searching_Payload=false;
- }
- };
- std::vector<stream> Streams;
-
- //Temp
- int32u frame_width;
- int32u frame_height;
- int32u chroma_format;
- int32u source_sampling;
- int32u clean_width;
- int32u clean_height;
- int32u clean_left_offset;
- int32u clean_top_offset;
- float32 frame_rate;
- float32 pixel_aspect_ratio;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Ffv1.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Ffv1.cpp
deleted file mode 100644
index bd68d894f..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Ffv1.cpp
+++ /dev/null
@@ -1,491 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// http://www.ffmpeg.org/~michael/ffv1.html
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_FFV1_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Ffv1.h"
-#include "ZenLib/BitStream.h"
-//---------------------------------------------------------------------------
-
-#include <algorithm>
-using namespace std;
-
-//---------------------------------------------------------------------------
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// RangeCoder
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-RangeCoder::RangeCoder (const int8u* Buffer, size_t Buffer_Size, const state_transitions default_state_transition)
-{
- //Assign buffer
- Buffer_Cur=Buffer;
- Buffer_End=Buffer+Buffer_Size;
-
- //Init
- if (Buffer_Size>=2)
- {
- Current=BigEndian2int16u(Buffer_Cur);
- Buffer_Cur+=2;
- Mask=0xFF00;
- }
- else
- {
- Current=0;
- Mask=0;
- }
-
- //Assign StateTransitions
- std::memcpy (one_state, default_state_transition, state_transitions_size);
- zero_state[0]=0;
- for (size_t i=1; i<state_transitions_size; i++)
- zero_state[i]=-one_state[state_transitions_size-i];
-}
-
-//---------------------------------------------------------------------------
-bool RangeCoder::get_rac(int8u States[])
-{
- //Here is some black magic... But it works. TODO: better understanding of the algorithm and maybe optimization
- int16u Mask2=(int16u)((((int32u)Mask) * (*States)) >> 8);
- Mask-=Mask2;
- bool Value;
- if (Current<Mask)
- {
- *States=zero_state[*States];
- Value=false;
- }
- else
- {
- Current-=Mask;
- Mask=Mask2;
- *States=one_state[*States];
- Value=true;
- }
-
- // Next byte
- if (Mask<0x100)
- {
- if (Buffer_Cur >= Buffer_End)
- {
- //Problem
- Current=0;
- Mask=0;
- return false;
- }
- Mask<<=8;
- Current<<=8;
- Current|=*Buffer_Cur;
- Buffer_Cur++;
- }
-
- return Value;
-}
-
-//---------------------------------------------------------------------------
-int8u RangeCoder::get_symbol_u(states &States)
-{
- if (get_rac(States))
- return 0;
-
- int8u e=0;
- while (get_rac((States+1+min(e, (int8u)9)))) // 1..10
- e++;
-
- int8u a=1;
- if (e)
- {
- do
- {
- --e;
- a<<=1;
- if (get_rac((States+22+min(e, (int8u)9)))) // 22..31
- ++a;
- }
- while (e);
- }
- return a;
-}
-
-//---------------------------------------------------------------------------
-int8u RangeCoder::get_symbol_s(states &States)
-{
- if (get_rac(States))
- return 0;
-
- int8u e=0;
- while (get_rac(States+1+min(e, (int8u)9))) // 1..10
- e++;
-
- int8u a=1;
- if (e)
- {
- int8u i = e;
- do
- {
- --i;
- a<<=1;
- if (get_rac((States+22+min(i, (int8u)9)))) // 22..31
- ++a;
- }
- while (i);
- }
-
- if (get_rac((States+11+min(e, (int8u)10)))) // 11..21
- return -((int8s)a);
- else
- return a;
-}
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-const char* Ffv1_coder_type(int8u coder_type)
-{
- switch (coder_type)
- {
- case 0 :
- return "Golomb Rice";
- case 1 :
- case 2 :
- return "Range Coder";
- default:
- return "";
- }
-}
-
-const string Ffv1_colorspace_type(int8u colorspace_type, bool chroma_planes, bool alpha_plane)
-{
- string ToReturn;
- switch (colorspace_type)
- {
- case 0 :
- ToReturn=chroma_planes?"YUV":"Y";
- break;
- case 1 : ToReturn="RGB"; break;
- default: return string();
- }
-
- if (alpha_plane)
- ToReturn+='A';
-
- return ToReturn;
-}
-
-const state_transitions Ffv1_default_state_transition =
-{
- 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
- 89, 90, 91, 92, 93, 94, 94, 95, 96, 97, 98, 99,100,101,102,103,
- 104,105,106,107,108,109,110,111,112,113,114,114,115,116,117,118,
- 119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,133,
- 134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,
- 150,151,152,152,153,154,155,156,157,158,159,160,161,162,163,164,
- 165,166,167,168,169,170,171,171,172,173,174,175,176,177,178,179,
- 180,181,182,183,184,185,186,187,188,189,190,190,191,192,194,194,
- 195,196,197,198,199,200,201,202,202,204,205,206,207,208,209,209,
- 210,211,212,213,215,215,216,217,218,219,220,220,222,223,224,225,
- 226,227,227,229,229,230,231,232,234,234,235,236,237,238,239,240,
- 241,242,243,244,245,246,247,248,248, 0, 0, 0, 0, 0, 0, 0,
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Ffv1::File_Ffv1()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("FFV1");
- IsRawStream=true;
-
- //In
- IsOutOfBandData=false;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ffv1::Streams_Accept()
-{
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "FFV1");
-}
-
-//***************************************************************************
-// RangeCoder
-//***************************************************************************
-
-#if MEDIAINFO_TRACE
-//---------------------------------------------------------------------------
-void File_Ffv1::Get_RC (states &States, bool &Info, const char* Name)
-{
- Info=RC->get_rac(States);
-
- if (Trace_Activated)
- {
- Element_Offset=RC->Buffer_Cur-Buffer;
- Param(Name, Info);
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Ffv1::Get_RU (states &States, int8u &Info, const char* Name)
-{
- Info=RC->get_symbol_u(States);
-
- if (Trace_Activated)
- Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File_Ffv1::Get_RS (states &States, int8s &Info, const char* Name)
-{
- Info=RC->get_symbol_s(States);
-
- if (Trace_Activated)
- Param(Name, Info);
-}
-
-//---------------------------------------------------------------------------
-void File_Ffv1::Skip_RC (states &States, const char* Name)
-{
- if (Trace_Activated)
- {
- int8u Info=RC->get_rac(States);
- Element_Offset=RC->Buffer_Cur-Buffer;
- Param(Name, Info);
- }
- else
- RC->get_rac(States);
-}
-
-//---------------------------------------------------------------------------
-void File_Ffv1::Skip_RU (states &States, const char* Name)
-{
- if (Trace_Activated)
- Param(Name, RC->get_symbol_u(States));
- else
- RC->get_symbol_u(States);
-}
-
-//---------------------------------------------------------------------------
-void File_Ffv1::Skip_RS (states &States, const char* Name)
-{
- if (Trace_Activated)
- Param(Name, RC->get_symbol_s(States));
- else
- RC->get_symbol_s(States);
-}
-
-#else //MEDIAINFO_TRACE
-//---------------------------------------------------------------------------
-void File_Ffv1::Get_RC_ (states &States, bool &Info)
-{
- Info=RC->get_rac(States);
-}
-
-//---------------------------------------------------------------------------
-void File_Ffv1::Get_RU_ (states &States, int8u &Info)
-{
- Info=RC->get_symbol_u(States);
-}
-
-//---------------------------------------------------------------------------
-void File_Ffv1::Get_RS_ (states &States, int8s &Info)
-{
- Info=RC->get_symbol_s(States);
-}
-
-//---------------------------------------------------------------------------
-void File_Ffv1::Skip_RC_ (states &States)
-{
- RC->get_rac(States);
-}
-
-//---------------------------------------------------------------------------
-void File_Ffv1::Skip_RU_ (states &States)
-{
- RC->get_symbol_u(States);
-}
-
-//---------------------------------------------------------------------------
-void File_Ffv1::Skip_RS_ (states &States)
-{
- RC->get_symbol_s(States);
-}
-
-#endif //MEDIAINFO_TRACE
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ffv1::Read_Buffer_Continue()
-{
- if (Buffer_Size<2)
- {
- Reject();
- return;
- }
-
- Accept();
-
-
-
- RC = new RangeCoder(Buffer, Buffer_Size, Ffv1_default_state_transition);
- states KeyStates;
- memset(KeyStates, 128, states_size);
-
- if (!IsOutOfBandData)
- {
- bool keyframe;
- Get_RC (KeyStates, keyframe, "keyframe");
- }
-
- FrameHeader();
-
- Skip_XX(Element_Size-Element_Offset, "Other data");
-
- Frame_Count++;
- Finish();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Ffv1::FrameHeader()
-{
- //Parsing
- states States;
- memset(States, 128, states_size);
- int8u version, micro_version=0, coder_type, colorspace_type, bits_per_raw_sample=8, chroma_h_shift, chroma_v_shift, num_h_slices_minus1=0, num_v_slices_minus1=0;
- bool chroma_planes, alpha_plane;
- Get_RU (States, version, "version");
- if (( IsOutOfBandData && version<=1)
- || (!IsOutOfBandData && version> 1))
- {
- Trusted_IsNot("Invalid version in global header");
- return;
- }
- if (version>2)
- {
- RC->Buffer_End-=4;
- Get_RU (States, micro_version, "micro_version");
- }
- Get_RU (States, coder_type, "coder_type");
- if (coder_type == 2) //Range coder with custom state transition table
- {
- for (int16u i = 1; i < state_transitions_size; i++)
- {
- Info_RS(States, StateTransition, "state_transition_delta"); Param_Info1(StateTransition+RC->one_state[i]);
- }
- }
- Get_RU (States, colorspace_type, "colorspace_type");
- if (version)
- {
- Get_RU (States, bits_per_raw_sample, "bits_per_raw_sample");
- if (bits_per_raw_sample==0)
- bits_per_raw_sample=8; //I don't know the reason, 8-bit is coded 0 and 10-bit coded 10 (not 2?).
- }
- Get_RC (States, chroma_planes, "chroma_planes");
- Get_RU (States, chroma_h_shift, "log2(h_chroma_subsample)");
- Get_RU (States, chroma_v_shift, "log2(v_chroma_subsample)");
- Get_RC (States, alpha_plane, "alpha_plane");
- if (version>1)
- {
- Get_RU (States, num_h_slices_minus1, "num_h_slices_minus1");
- Get_RU (States, num_v_slices_minus1, "num_v_slices_minus1");
- IsOutOfBandData=false;
- }
-
- if (Frame_Count==0)
- {
- Ztring Version=__T("Version ")+Ztring::ToZtring(version);
- if (version>2)
- {
- Version+=__T('.');
- Version+=Ztring::ToZtring(micro_version);
- }
- Fill(Stream_Video, 0, Video_Format_Version, Version);
- Fill(Stream_Video, 0, Video_BitDepth, bits_per_raw_sample);
- Fill(Stream_Video, 0, "coder_type", Ffv1_coder_type(coder_type));
- Fill(Stream_Video, 0, Video_ColorSpace, Ffv1_colorspace_type(colorspace_type, chroma_planes, alpha_plane));
- if (colorspace_type==0 && chroma_planes)
- {
- string ChromaSubsampling;
- switch (chroma_h_shift)
- {
- case 0 :
- switch (chroma_v_shift)
- {
- case 0 : ChromaSubsampling="4:4:4"; break;
- default: ;
- }
- break;
- case 1 :
- switch (chroma_v_shift)
- {
- case 0 : ChromaSubsampling="4:2:2"; break;
- case 1 : ChromaSubsampling="4:2:0"; break;
- default: ;
- }
- break;
- case 2 :
- switch (chroma_v_shift)
- {
- case 0 : ChromaSubsampling="4:1:1"; break;
- case 1 : ChromaSubsampling="4:1:0"; break;
- case 2 : ChromaSubsampling="4:1:0 (4x4)"; break;
- default: ;
- }
- break;
- default: ;
- }
- if (!ChromaSubsampling.empty() && alpha_plane)
- ChromaSubsampling+=":4";
- Fill(Stream_Video, 0, Video_ChromaSubsampling, ChromaSubsampling);
- }
- }
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_FFV1_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Ffv1.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Ffv1.h
deleted file mode 100644
index bdea0e0c4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Ffv1.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about FFV1 files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Ffv1H
-#define MediaInfo_Ffv1H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class RangeCoder
-//***************************************************************************
-
-const size_t states_size=32;
-const size_t state_transitions_size=256;
-typedef int8u states[states_size];
-typedef int8u state_transitions[state_transitions_size];
-
-class RangeCoder
-{
-public :
- RangeCoder(const int8u* Buffer, size_t Buffer_Size, const state_transitions default_state_transition);
-
- bool get_rac(int8u States[]);
- int8u get_symbol_u(states &States);
- int8u get_symbol_s(states &States);
-
- int16u Current;
- int16u Mask;
- state_transitions zero_state;
-public : //Temp
- state_transitions one_state;
- const int8u* Buffer_Cur;
- const int8u* Buffer_End;
-
-};
-
-//***************************************************************************
-// Class File_Ffv1
-//***************************************************************************
-
-class File_Ffv1 : public File__Analyze
-{
-public :
- //In
- bool IsOutOfBandData;
-
- //Constructor/Destructor
- File_Ffv1();
-
-private :
- //Streams management
- void Streams_Accept();
-
- //Buffer - Global
- void Read_Buffer_Continue();
-
- //Elements
- void FrameHeader();
-
- //Range coder
- #if MEDIAINFO_TRACE
- void Get_RC (states &state, bool &Info, const char* Name);
- void Get_RU (states &State, int8u &Info, const char* Name);
- void Get_RS (states &State, int8s &Info, const char* Name);
- void Skip_RC(states &state, const char* Name);
- void Skip_RU(states &State, const char* Name);
- void Skip_RS(states &State, const char* Name);
- #define Info_RC(_STATE, _INFO, _NAME) bool _INFO; Get_RC (_STATE, _INFO, _NAME)
- #define Info_RU(_STATE, _INFO, _NAME) int8u _INFO; Get_RU (_STATE, _INFO, _NAME)
- #define Info_RS(_STATE, _INFO, _NAME) int8s _INFO; Get_RS (_STATE, _INFO, _NAME)
- #else //MEDIAINFO_TRACE
- void Get_RC_ (states &state, bool &Info);
- void Get_RU_ (states &State, int8u &Info);
- void Get_RS_ (states &State, int8s &Info);
- #define Get_RC(Bits, Info, Name) Get_RC_(Bits, Info)
- #define Get_RU(Bits, Info, Name) Get_RU_(Bits, Info)
- #define Get_RS(Bits, Info, Name) Get_RS_(Bits, Info)
- void Skip_RC_(states &state);
- void Skip_RU_(states &State);
- void Skip_RS_(states &State);
- #define Skip_RC(Bits, Name) Skip_RC_(Bits)
- #define Skip_RU(Bits, Name) Skip_RU_(Bits)
- #define Skip_RS(Bits, Name) Skip_RS_(Bits)
- #define Info_RC(_STATE, _INFO, _NAME) Skip_RC_(_STATE)
- #define Info_RU(_STATE, _INFO, _NAME) Skip_RU_(_STATE)
- #define Info_RS(_STATE, _INFO, _NAME) Skip_RS_(_STATE)
- #endif //MEDIAINFO_TRACE
- RangeCoder* RC;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Flic.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Flic.cpp
deleted file mode 100644
index 1570106ab..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Flic.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// From : http://www.compuphase.com/flic.htm
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_FLIC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Flic.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Flic::FileHeader_Parse()
-{
- //Parsing
- int32u DelayBetweenFrames;
- int16u Type, Frames, Width, Height, BitsPerPixel, AspectX=0, AspectY=0;
- Skip_L4( "Size of FLIC including this header");
- Get_L2 (Type, "File type");
- Get_L2 (Frames, "Number of frames in first segment");
- Get_L2 (Width, "Width");
- Get_L2 (Height, "Height");
- Get_L2 (BitsPerPixel, "Bits per pixel");
- Skip_L2( "Flags");
- Get_L4 (DelayBetweenFrames, "Delay between frames");
- if (Type!=0xAF11)
- {
- Skip_L2( "Reserved");
- Skip_L4( "Date of Creation)");
- Skip_L4( "Serial number or compiler id");
- Skip_L4( "Date of FLIC update");
- Skip_L4( "Serial number");
- Get_L2 (AspectX, "Width of square rectangle");
- Get_L2 (AspectY, "Height of square rectangle");
- }
- else
- Skip_XX(22, "Reserved");
- Skip_L2( "EGI: flags for specific EGI extensions");
- Skip_L2( "EGI: key-image frequency");
- Skip_L2( "EGI: total number of frames (segments)");
- Skip_L4( "EGI: maximum chunk size (uncompressed)");
- Skip_L2( "EGI: max. number of regions in a CHK_REGION chunk");
- Skip_L2( "EGI: number of transparent levels");
- if (Type!=0xAF11)
- {
- Skip_XX(24, "Reserved");
- Skip_L4( "Offset to frame 1");
- Skip_L4( "Offset to frame 2");
- Skip_XX(40, "Reserved");
- }
- else
- Skip_XX(72, "Reserved");
-
- //Filling
- FILLING_BEGIN();
- switch (Type)
- {
- case 0xAF11 :
- case 0xAF12 :
- case 0xAF30 :
- case 0xAF31 :
- case 0xAF44 :
- break;
- default :
- Reject("FLIC");
- return;
- }
-
- //Filling
- Accept("FLIC");
-
- Fill(Stream_General, 0, General_Format, "FLIC");
-
- Stream_Prepare(Stream_Video);
- if (Type==0xAF11)
- {
- Fill(Stream_Video, 0, Video_Format, "FLI");
- Fill(Stream_Video, 0, Video_Codec, "FLI");
- if (DelayBetweenFrames)
- {
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, 1000.0/(DelayBetweenFrames*70)); //multiple of 1/70 per frame
- Fill(Stream_Video, 0, Video_Duration, Frames*DelayBetweenFrames*70);
- }
- }
- else
- {
- Fill(Stream_Video, 0, Video_Format, "FLC");
- Fill(Stream_Video, 0, Video_Codec, "FLC");
- if (DelayBetweenFrames)
- {
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, 1000.0/DelayBetweenFrames); //ms per frame
- Fill(Stream_Video, 0, Video_Duration, Frames*DelayBetweenFrames);
- }
- if (AspectY>0)
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, AspectX/AspectY, 3, true);
- }
- Fill(Stream_Video, 0, Video_FrameCount, Frames);
- Fill(Stream_Video, StreamPos_Last, Video_Width, Width);
- Fill(Stream_Video, StreamPos_Last, Video_Height, Height);
- Fill(Stream_Video, 0, Video_BitDepth, (BitsPerPixel%3)?BitsPerPixel:(BitsPerPixel/3), 10, true); //If not a multiple of 3, the total resolution is filled
- //No more need data
- Finish("FLIC");
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_FLIC_*
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Flic.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Flic.h
deleted file mode 100644
index f8cd53a76..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Flic.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Flic files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_FlicH
-#define MediaInfo_FlicH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Flic
-//***************************************************************************
-
-class File_Flic : public File__Analyze
-{
-private :
- //Buffer
- void FileHeader_Parse();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Fraps.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Fraps.cpp
deleted file mode 100644
index 396cf35f9..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Fraps.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_FRAPS_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Fraps.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Fraps::File_Fraps()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("Fraps");
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Fraps::Streams_Fill()
-{
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "Fraps");
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Fraps::Read_Buffer_Continue()
-{
- //Parsing
- int8u version, flags;
- Get_L1 (version, "version");
- Skip_L2( "unknown");
- Get_L1 (flags, "flags");
- if (flags&0x40)
- Skip_L4( "unknown");
- switch (version)
- {
- case 0x00 :
- Version0(); break;
- case 0x01 :
- Version1(); break;
- case 0x02 :
- case 0x04 :
- Version2(); break;
- default : Skip_XX(Element_Size-Element_Offset, "data");
- }
-
- Finish();
-}
-
-//---------------------------------------------------------------------------
-void File_Fraps::Version0()
-{
- //Parsing
- Skip_XX(Element_Size-Element_Offset, "data");
-
- FILLING_BEGIN();
- Accept();
- Fill();
- Fill(Stream_Video, 0, Video_ColorSpace, "YUV");
- Fill(Stream_Video, 0, Video_ChromaSubsampling, "4:2:0");
- Fill(Stream_Video, 0, Video_BitDepth, 8);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Fraps::Version1()
-{
- //Parsing
- Skip_XX(Element_Size-Element_Offset, "data");
-
- FILLING_BEGIN();
- Accept();
- Fill();
- Fill(Stream_Video, 0, Video_ColorSpace, "RGB");
- Fill(Stream_Video, 0, Video_BitDepth, 8);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Fraps::Version2()
-{
- //Parsing
- if (Element_Size>8) //Else this is a repeat frame
- {
- Skip_C4( "FPSx");
- Skip_L4( "offset to the Y plane (minus 8)");
- Skip_L4( "offset to the U plane (minus 8)");
- Skip_L4( "offset to the V plane (minus 8)");
- Skip_XX(Element_Size-Element_Offset, "data");
- }
-
- FILLING_BEGIN();
- Accept();
- Fill();
- Fill(Stream_Video, 0, Video_ColorSpace, "YUV");
- Fill(Stream_Video, 0, Video_BitDepth, 8);
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_FRAPS_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Fraps.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Fraps.h
deleted file mode 100644
index 13cf73552..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Fraps.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Fraps files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_FrapsH
-#define MediaInfo_File_FrapsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Fraps
-//***************************************************************************
-
-class File_Fraps : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Fraps();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-
- //Elements
- void Version0();
- void Version1();
- void Version2();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_H263.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_H263.cpp
deleted file mode 100644
index 5be034025..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_H263.cpp
+++ /dev/null
@@ -1,421 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_H263_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_H263.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "ZenLib/BitStream.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-namespace MediaInfoLib
-{
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* H263_Source_Format[]=
-{
- "",
- "sub-QCIF",
- "QCIF",
- "CIF",
- "4CIF",
- "16CIF",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const int16u H263_Source_Format_Width[]=
-{
- 0,
- 128,
- 176,
- 352,
- 704,
- 1408,
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-const int16u H263_Source_Format_Height[]=
-{
- 0,
- 96,
- 144,
- 288,
- 576,
- 1152,
- 0,
- 0,
-};
-
-//---------------------------------------------------------------------------
-const int8u H263_PAR_W[]=
-{
- 0,
- 12,
- 10,
- 16,
- 40,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-const int8u H263_PAR_H[]=
-{
- 0,
- 11,
- 11,
- 11,
- 33,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_H263::File_H263()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("H.263");
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
- IsRawStream=true;
-
- //In
- Frame_Count_Valid=MediaInfoLib::Config.ParseSpeed_Get()>=0.3?8:2;
- FrameIsAlwaysComplete=false;
-}
-
-//---------------------------------------------------------------------------
-File_H263::~File_H263()
-{
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_H263::Streams_Accept()
-{
- Stream_Prepare(Stream_Video);
-}
-
-//---------------------------------------------------------------------------
-void File_H263::Streams_Update()
-{
-}
-
-//---------------------------------------------------------------------------
-void File_H263::Streams_Fill()
-{
- Fill(Stream_General, 0, General_Format_Version, "H.263");
- Fill(Stream_Video, 0, Video_Format, "H.263");
- Fill(Stream_Video, 0, Video_Codec, "H.263");
-
- Fill(Stream_Video, 0, Video_Width, H263_Source_Format_Width[Source_Format]);
- Fill(Stream_Video, 0, Video_Height, H263_Source_Format_Height[Source_Format]);
- Fill(Stream_Video, 0, Video_ColorSpace, "YUV");
- Fill(Stream_Video, 0, Video_Colorimetry, "4:2:0");
- Fill(Stream_Video, 0, Video_BitDepth, 8);
- Fill(Stream_Video, 0, Video_PixelAspectRatio, ((float32)PAR_W)/PAR_H, 3);
-}
-
-//---------------------------------------------------------------------------
-void File_H263::Streams_Finish()
-{
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_H263::Synchronize()
-{
- //Synchronizing
- while(Buffer_Offset+3<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || (Buffer[Buffer_Offset+2]&0xFC)!=0x80))
- {
- Buffer_Offset+=2;
- while(Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Buffer_Offset+=2;
- if ((Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset-1]==0x00) || Buffer_Offset>=Buffer_Size)
- Buffer_Offset--;
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+3==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || (Buffer[Buffer_Offset+2]&0xFC)!=0x80))
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00))
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && Buffer[Buffer_Offset ]!=0x00)
- Buffer_Offset++;
-
- if (Buffer_Offset+3>Buffer_Size)
- return false;
-
- //Synched is OK
- Synched=true;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_H263::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+4>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || (Buffer[Buffer_Offset+2]&0xFC)!=0x80)
- {
- Synched=false;
- return true;
- }
-
- //We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_H263::Synched_Init()
-{
- //Temp
- PAR_W=12;
- PAR_H=11;
- Temporal_Reference_IsValid=false;
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_H263::Read_Buffer_Unsynched()
-{
- Temporal_Reference_IsValid=false;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_H263::Header_Parse()
-{
- Header_Fill_Code(0x00, "Frame");
- Header_Parser_Fill_Size();
-}
-
-//---------------------------------------------------------------------------
-bool File_H263::Header_Parser_Fill_Size()
-{
- //Look for next Sync word
- if (Buffer_Offset_Temp==0) //Buffer_Offset_Temp is not 0 if Header_Parse_Fill_Size() has already parsed first frames
- Buffer_Offset_Temp=Buffer_Offset+3;
- while (Buffer_Offset_Temp+3<=Buffer_Size
- && (Buffer[Buffer_Offset_Temp ]!=0x00
- || Buffer[Buffer_Offset_Temp+1]!=0x00
- || (Buffer[Buffer_Offset_Temp+2]&0xFC)!=0x80))
- {
- Buffer_Offset_Temp+=2;
- while(Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp]!=0x00)
- Buffer_Offset_Temp+=2;
- if (Buffer_Offset_Temp>=Buffer_Size || Buffer[Buffer_Offset_Temp-1]==0x00)
- Buffer_Offset_Temp--;
- }
-
- //Must wait more data?
- if (Buffer_Offset_Temp+3>Buffer_Size)
- {
- if (FrameIsAlwaysComplete || File_Offset+Buffer_Size==File_Size)
- Buffer_Offset_Temp=Buffer_Size; //We are sure that the next bytes are a start
- else
- return false;
- }
-
- //OK, we continue
- Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
- Buffer_Offset_Temp=0;
- return true;
-
-}
-
-//---------------------------------------------------------------------------
-void File_H263::Data_Parse()
-{
- //Parsing
- int8u Temporal_Reference_Temp;
- BS_Begin();
- Skip_S3(22, "Picture Start Code (PSC)");
- Get_S1 ( 8, Temporal_Reference_Temp, "Temporal Reference (TR)");
- if (!Temporal_Reference_IsValid)
- {
- Temporal_Reference=Temporal_Reference_Temp;
- Temporal_Reference_IsValid=true;
- }
- else
- Temporal_Reference++;
- if (Temporal_Reference_Temp!=Temporal_Reference)
- {
- Trusted_IsNot("Out of Order");
- Open_Buffer_Unsynch();
- return;
- }
- Element_Begin1("Type Information (PTYPE)");
- Mark_1();
- Mark_0();
- Skip_SB( "Split screen indicator");
- Skip_SB( "Document camera indicator");
- Skip_SB( "Full Picture Freeze Release");
- Get_S1 (3, Source_Format, "Source Format"); Param_Info1(H263_Source_Format[Source_Format]);
- if (Source_Format!=7)
- {
- Skip_SB( "Picture Coding Type");
- Skip_SB( "Unrestricted Motion Vector mode");
- Skip_SB( "Syntax-based Arithmetic Coding mode");
- Skip_SB( "Advanced Prediction mode");
- Skip_SB( "PB-frames mode");
- }
- Element_End0();
- if (Source_Format==7) // Extended PTYPE
- {
- Element_Begin1("Plus PTYPE (PLUSPTYPE)");
- int8u Ufep, PixelAspectRatioCode=0, Width=0, Height=0;
- Get_S1 ( 3, Ufep, "Update Full Extended PTYPE (UFEP)");
- switch (Ufep)
- {
- case 0 :
- break;
- case 1 :
- Element_Begin1("Optional Part of PLUSPTYPE (OPPTYPE)");
- Get_S1 (3, Source_Format, "Source Format"); Param_Info1(H263_Source_Format[Source_Format]);
- Skip_SB( "Custom PCF");
- Skip_SB( "Unrestricted Motion Vector (UMV) mode");
- Skip_SB( "Syntax-based Arithmetic Coding (SAC) mode");
- Skip_SB( "Advanced Prediction (AP) mode");
- Skip_SB( "Advanced INTRA Coding (AIC) mode");
- Skip_SB( "Deblocking Filter (DF) mode");
- Skip_SB( "Slice Structured (SS) mode");
- Skip_SB( "Reference Picture Selection (RPS) mode");
- Skip_SB( "Independent Segment Decoding (ISD) mode");
- Skip_SB( "Alternative INTER VLC (AIV) mode");
- Skip_SB( "Modified Quantization (MQ) mode");
- Mark_1();
- Mark_0();
- Mark_0();
- Mark_0();
- Element_End0();
- break;
- default :
- BS_End();
- Skip_XX(Element_Size-Element_Offset, "Unknown");
- return; //TODO: frame count...
- }
- Element_Begin1("mandatory part of PLUSPTYPE when PLUSPTYPE present (MPPTYPE)");
- Skip_S1(3, "Picture Type Code");
- Skip_SB( "Reference Picture Resampling (RPR) mode");
- Skip_SB( "Reduced-Resolution Update (RRU) mode");
- Skip_SB( "Rounding Type (RTYPE)");
- Mark_0();
- Mark_0();
- Mark_1();
- Element_End0();
- Element_End0();
- Skip_SB( "CPM");
- Skip_S1(2, "PSBI");
- Element_Begin1("Custom Picture Format (CPFMT)");
- Get_S1 (4, PixelAspectRatioCode, "Pixel Aspect Ratio Code");
- Get_S1 (4, Width, "Picture Width Indication");
- Width++; Width<<=2; Param_Info2(Width, " pixels");
- Mark_1();
- Get_S1 (4, Height, "Picture Height Indication");
- Height<<=2; Param_Info2(Height, " pixels");
- Element_End0();
- if (PixelAspectRatioCode==0xF)
- {
- Element_Begin1("Extended Pixel Aspect Ratio (EPAR)");
- Get_S1 (8, PAR_W, "PAR Width");
- Get_S1 (8, PAR_H, "PAR Height");
- Element_End0();
- }
- else
- {
- PAR_W=H263_PAR_W[PixelAspectRatioCode];
- PAR_H=H263_PAR_H[PixelAspectRatioCode];
- }
- }
- BS_End();
- Skip_XX(Element_Size-Element_Offset, "Other data");
-
- FILLING_BEGIN();
- Element_Info1(Frame_Count);
- Frame_Count++;
-
- //Filling
- if (!Status[IsFilled] && Frame_Count>=Frame_Count_Valid)
- {
- Accept("H.263");
- Finish("H.263");
- }
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_H263_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_H263.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_H263.h
deleted file mode 100644
index 5d1339cf7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_H263.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about h.263 files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_H263H
-#define MediaInfo_H263H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_H263
-//***************************************************************************
-
-class File_H263 : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
- bool FrameIsAlwaysComplete;
-
- //Constructor/Destructor
- File_H263();
- ~File_H263();
-
-private :
- //Streams management
- void Streams_Accept();
- void Streams_Update();
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
- void Synched_Init();
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
-
- //Buffer - Per element
- void Header_Parse();
- bool Header_Parser_Fill_Size();
- void Data_Parse();
-
- //Elements
-
- //Temp
- int8u Temporal_Reference;
- int8u Source_Format;
- int8u PAR_W;
- int8u PAR_H;
- bool Temporal_Reference_IsValid;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Hevc.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Hevc.cpp
deleted file mode 100644
index c52c7eb5b..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Hevc.cpp
+++ /dev/null
@@ -1,2746 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Contributor: Lionel Duchateau, kurtnoise@free.fr
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_HEVC_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Hevc.h"
-#include <cmath>
-#include <algorithm>
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
- #include "MediaInfo/MediaInfo_Events.h"
- #include "MediaInfo/MediaInfo_Events_Internal.h"
-#endif //MEDIAINFO_EVENTS
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const int8u Hevc_SubWidthC[]=
-{
- 1,
- 2,
- 2,
- 1,
-};
-
-//---------------------------------------------------------------------------
-const int8u Hevc_SubHeightC[]=
-{
- 1,
- 2,
- 1,
- 1,
-};
-
-//---------------------------------------------------------------------------
-const char* Hevc_tier_flag(bool tier_flag)
-{
- switch (tier_flag)
- {
- case true : return "High";
- default : return "Main";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Hevc_profile_idc(int32u profile_idc)
-{
- switch (profile_idc)
- {
- case 0 : return "No profile";
- case 1 : return "Main";
- case 2 : return "Main 10";
- case 3 : return "Main Still";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Hevc_chroma_format_idc(int8u chroma_format_idc)
-{
- switch (chroma_format_idc)
- {
- case 0 : return "monochrome";
- case 1 : return "4:2:0";
- case 2 : return "4:2:2";
- case 3 : return "4:4:4";
- default : return "Unknown";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Hevc_pic_type[]=
-{
- "I",
- "I, P",
- "I, P, B",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Hevc_slice_type(int32u slice_type)
-{
- switch (slice_type)
- {
- case 0 : return "P";
- case 1 : return "B";
- case 2 : return "I";
- default: return "";
- }
-};
-
-//---------------------------------------------------------------------------
-extern const char* Mpegv_colour_primaries(int8u colour_primaries);
-extern const char* Mpegv_transfer_characteristics(int8u transfer_characteristics);
-extern const char* Mpegv_matrix_coefficients(int8u matrix_coefficients);
-
-//---------------------------------------------------------------------------
-extern const int8u Avc_PixelAspectRatio_Size;
-extern const float32 Avc_PixelAspectRatio[];
-extern const char* Avc_video_format[];
-extern const char* Avc_video_full_range[];
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Hevc::File_Hevc()
-{
- //Config
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Hevc;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
- PTS_DTS_Needed=true;
- IsRawStream=true;
- Frame_Count_NotParsedIncluded=0;
-
- //In
- Frame_Count_Valid=MediaInfoLib::Config.ParseSpeed_Get()>=0.3?16:16; //Note: should be replaced by "512:2" when I-frame/GOP detection is OK
- FrameIsAlwaysComplete=false;
- MustParse_VPS_SPS_PPS=false;
- MustParse_VPS_SPS_PPS_FromMatroska=false;
- MustParse_VPS_SPS_PPS_FromFlv=false;
- SizedBlocks=false;
-
- //File specific
- lengthSizeMinusOne=(int8u)-1;
-}
-
-//---------------------------------------------------------------------------
-File_Hevc::~File_Hevc()
-{
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Hevc::Streams_Fill()
-{
- if (MustParse_VPS_SPS_PPS_FromFlv)
- return;
-
- if (Count_Get(Stream_Video)==0)
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "HEVC");
- Fill(Stream_Video, 0, Video_Codec, "HEVC");
-
- for (std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item=seq_parameter_sets.begin(); seq_parameter_set_Item!=seq_parameter_sets.end(); ++seq_parameter_set_Item)
- if ((*seq_parameter_set_Item))
- Streams_Fill(seq_parameter_set_Item);
-
- //Library name
- Fill(Stream_General, 0, General_Encoded_Library, Encoded_Library);
- Fill(Stream_General, 0, General_Encoded_Library_Name, Encoded_Library_Name);
- Fill(Stream_General, 0, General_Encoded_Library_Version, Encoded_Library_Version);
- Fill(Stream_General, 0, General_Encoded_Library_Settings, Encoded_Library_Settings);
- Fill(Stream_Video, 0, Video_Encoded_Library, Encoded_Library);
- Fill(Stream_Video, 0, Video_Encoded_Library_Name, Encoded_Library_Name);
- Fill(Stream_Video, 0, Video_Encoded_Library_Version, Encoded_Library_Version);
- Fill(Stream_Video, 0, Video_Encoded_Library_Settings, Encoded_Library_Settings);
-}
-
-//---------------------------------------------------------------------------
-void File_Hevc::Streams_Fill(std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item)
-{
- int32u Width = (*seq_parameter_set_Item)->pic_width_in_luma_samples;
- int32u Height= (*seq_parameter_set_Item)->pic_height_in_luma_samples;
- int32u CropUnitX=Hevc_SubWidthC [(*seq_parameter_set_Item)->ChromaArrayType()];
- int32u CropUnitY=Hevc_SubHeightC[(*seq_parameter_set_Item)->ChromaArrayType()];
- Width -=((*seq_parameter_set_Item)->conf_win_left_offset+(*seq_parameter_set_Item)->conf_win_right_offset)*CropUnitX;
- Height-=((*seq_parameter_set_Item)->conf_win_top_offset +(*seq_parameter_set_Item)->conf_win_bottom_offset)*CropUnitY;
-
- Ztring Profile;
- if ((*seq_parameter_set_Item)->profile_space==0)
- {
- if ((*seq_parameter_set_Item)->profile_idc)
- Profile=Ztring().From_Local(Hevc_profile_idc((*seq_parameter_set_Item)->profile_idc));
- if ((*seq_parameter_set_Item)->level_idc)
- {
- if ((*seq_parameter_set_Item)->profile_idc)
- Profile+=__T('@');
- Profile+=__T('L')+Ztring().From_Number(((float)(*seq_parameter_set_Item)->level_idc)/30, ((*seq_parameter_set_Item)->level_idc%10)?1:0);
- Profile+=__T('@');
- Profile+=Ztring().From_Local(Hevc_tier_flag((*seq_parameter_set_Item)->tier_flag));
- }
- }
- Fill(Stream_Video, 0, Video_Format_Profile, Profile);
- Fill(Stream_Video, 0, Video_Codec_Profile, Profile);
- Fill(Stream_Video, StreamPos_Last, Video_Width, Width);
- Fill(Stream_Video, StreamPos_Last, Video_Height, Height);
-
- Fill(Stream_Video, 0, Video_ColorSpace, "YUV");
- Fill(Stream_Video, 0, Video_Colorimetry, Hevc_chroma_format_idc((*seq_parameter_set_Item)->chroma_format_idc));
- if ((*seq_parameter_set_Item)->bit_depth_luma_minus8==(*seq_parameter_set_Item)->bit_depth_chroma_minus8)
- Fill(Stream_Video, 0, Video_BitDepth, (*seq_parameter_set_Item)->bit_depth_luma_minus8+8);
-
- if ((*seq_parameter_set_Item)->vui_parameters)
- {
- if ((*seq_parameter_set_Item)->vui_parameters->timing_info_present_flag)
- {
- if ((*seq_parameter_set_Item)->vui_parameters->time_scale && (*seq_parameter_set_Item)->vui_parameters->num_units_in_tick)
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, (float64)(*seq_parameter_set_Item)->vui_parameters->time_scale / (*seq_parameter_set_Item)->vui_parameters->num_units_in_tick);
- }
-
- if ((*seq_parameter_set_Item)->vui_parameters->aspect_ratio_info_present_flag)
- {
- float64 PixelAspectRatio = 1;
- if ((*seq_parameter_set_Item)->vui_parameters->aspect_ratio_idc<Avc_PixelAspectRatio_Size)
- PixelAspectRatio = Avc_PixelAspectRatio[(*seq_parameter_set_Item)->vui_parameters->aspect_ratio_idc];
- else if ((*seq_parameter_set_Item)->vui_parameters->aspect_ratio_idc == 0xFF && (*seq_parameter_set_Item)->vui_parameters->sar_height)
- PixelAspectRatio = ((float64) (*seq_parameter_set_Item)->vui_parameters->sar_width) / (*seq_parameter_set_Item)->vui_parameters->sar_height;
-
- Fill(Stream_Video, 0, Video_PixelAspectRatio, PixelAspectRatio, 3, true);
- Fill(Stream_Video, 0, Video_DisplayAspectRatio, Width*PixelAspectRatio/Height, 3, true); //More precise
- }
-
- //Colour description
- if ((*seq_parameter_set_Item)->vui_parameters->video_signal_type_present_flag)
- {
- Fill(Stream_Video, 0, Video_Standard, Avc_video_format[(*seq_parameter_set_Item)->vui_parameters->video_format]);
- Fill(Stream_Video, 0, Video_colour_range, Avc_video_full_range[(*seq_parameter_set_Item)->vui_parameters->video_full_range_flag]);
- if ((*seq_parameter_set_Item)->vui_parameters->colour_description_present_flag)
- {
- Fill(Stream_Video, 0, Video_colour_description_present, "Yes");
- Fill(Stream_Video, 0, Video_colour_primaries, Mpegv_colour_primaries((*seq_parameter_set_Item)->vui_parameters->colour_primaries));
- Fill(Stream_Video, 0, Video_transfer_characteristics, Mpegv_transfer_characteristics((*seq_parameter_set_Item)->vui_parameters->transfer_characteristics));
- Fill(Stream_Video, 0, Video_matrix_coefficients, Mpegv_matrix_coefficients((*seq_parameter_set_Item)->vui_parameters->matrix_coefficients));
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Hevc::Streams_Finish()
-{
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Hevc::FileHeader_Begin()
-{
- if (!File__Analyze::FileHeader_Begin_0x000001())
- return false;
-
- if (!MustSynchronize)
- {
- Synched_Init();
- Buffer_TotalBytes_FirstSynched=0;
- File_Offset_FirstSynched=File_Offset;
- }
-
- //All should be OK
- return true;
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Hevc::Synchronize()
-{
- //Synchronizing
- size_t Buffer_Offset_Min=Buffer_Offset;
- while(Buffer_Offset+4<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x01))
- {
- Buffer_Offset+=2;
- while(Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Buffer_Offset+=2;
- if (Buffer_Offset>=Buffer_Size || Buffer[Buffer_Offset-1]==0x00)
- Buffer_Offset--;
- }
- if (Buffer_Offset>Buffer_Offset_Min && Buffer[Buffer_Offset-1]==0x00)
- Buffer_Offset--;
-
- //Parsing last bytes if needed
- if (Buffer_Offset+4==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x00
- || Buffer[Buffer_Offset+3]!=0x01))
- Buffer_Offset++;
- if (Buffer_Offset+3==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x01))
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00))
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && Buffer[Buffer_Offset ]!=0x00)
- Buffer_Offset++;
-
- if (Buffer_Offset+4>Buffer_Size)
- return false;
-
- if (File_Offset==0 && Buffer_Offset==0 && (Buffer[3]==0xE0 || Buffer[3]==0xFE))
- {
- //It is from MPEG-PS
- Reject();
- return false;
- }
-
- //Synched is OK
- Synched=true;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Hevc::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+6>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || (Buffer[Buffer_Offset+2]!=0x01 && (Buffer[Buffer_Offset+2]!=0x00 || Buffer[Buffer_Offset+3]!=0x01)))
- {
- Synched=false;
- return true;
- }
-
- //Quick search
- if (!Header_Parser_QuickSearch())
- return false;
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Demux
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-bool File_Hevc::Demux_UnpacketizeContainer_Test()
-{
- const int8u* Buffer_Temp=NULL;
- size_t Buffer_Temp_Size=0;
- bool RandomAccess=true; //Default, in case of problem
-
- if ((MustParse_VPS_SPS_PPS || SizedBlocks) && Demux_Transcode_Iso14496_15_to_AnnexB)
- {
- if (MustParse_VPS_SPS_PPS)
- return true; //Wait for SPS and PPS
-
- //Random access check
- RandomAccess=false;
-
- //Computing final size
- size_t TranscodedBuffer_Size=0;
- while (Buffer_Offset+lengthSizeMinusOne+1+1<=Buffer_Size)
- {
- size_t Size;
- switch (lengthSizeMinusOne)
- {
- case 0: Size=Buffer[Buffer_Offset];
- TranscodedBuffer_Size+=2;
- break;
- case 1: Size=BigEndian2int16u(Buffer+Buffer_Offset);
- TranscodedBuffer_Size++;
- break;
- case 2: Size=BigEndian2int24u(Buffer+Buffer_Offset);
- break;
- case 3: Size=BigEndian2int32u(Buffer+Buffer_Offset);
- TranscodedBuffer_Size--;
- break;
- default: return true; //Problem
- }
- Size+=lengthSizeMinusOne+1;
-
- //Coherency checking
- if (Size==0 || Buffer_Offset+Size>Buffer_Size || (Buffer_Offset+Size!=Buffer_Size && Buffer_Offset+Size+lengthSizeMinusOne+1>Buffer_Size))
- Size=Buffer_Size-Buffer_Offset;
-
- //Random access check
- if (!RandomAccess && Buffer_Offset+lengthSizeMinusOne+1<Buffer_Size && (Buffer[Buffer_Offset+lengthSizeMinusOne+1]&0x40)==0) //Is a slice
- {
- Element_Offset=lengthSizeMinusOne+1+2;
- Element_Size=Size;
-
- BS_Begin();
- Get_SB ( first_slice_segment_in_pic_flag, "first_slice_segment_in_pic_flag");
- if (first_slice_segment_in_pic_flag)
- {
- Element_Code=(Buffer[Buffer_Offset+lengthSizeMinusOne+1]&0x3E)>>1; //nal_unit_type
- RapPicFlag=Element_Code>=16 && Element_Code<=23;
- if (RapPicFlag)
- Skip_SB( "no_output_of_prior_pics_flag");
- Get_UE ( slice_pic_parameter_set_id, "slice_pic_parameter_set_id");
- int8u num_extra_slice_header_bits=(int8u)-1;
- std::vector<pic_parameter_set_struct*>::iterator pic_parameter_set_Item;
- if (MustParse_VPS_SPS_PPS_FromFlv)
- num_extra_slice_header_bits=0; // We bet it is old, so without num_extra_slice_header_bits
- else if (!(slice_pic_parameter_set_id>=pic_parameter_sets.size() || (*(pic_parameter_set_Item=pic_parameter_sets.begin()+slice_pic_parameter_set_id))==NULL))
- {
- num_extra_slice_header_bits=(*pic_parameter_set_Item)->num_extra_slice_header_bits;
- }
- if (num_extra_slice_header_bits!=(int8u)-1)
- {
- int32u slice_type;
- Skip_S1(num_extra_slice_header_bits, "slice_reserved_flags");
- Get_UE (slice_type, "slice_type");
-
- switch (slice_type)
- {
- case 2 :
- case 7 :
- RandomAccess=true;
- }
- }
- }
- BS_End();
- }
-
- TranscodedBuffer_Size+=Size;
- Buffer_Offset+=Size;
- }
- Buffer_Offset=0;
-
- //Adding VPS/SPS/PPS sizes
- if (RandomAccess)
- {
- for (video_parameter_set_structs::iterator Data_Item=video_parameter_sets.begin(); Data_Item!=video_parameter_sets.end(); ++Data_Item)
- TranscodedBuffer_Size+=(*Data_Item)->AnnexB_Buffer_Size;
- for (seq_parameter_set_structs::iterator Data_Item=seq_parameter_sets.begin(); Data_Item!=seq_parameter_sets.end(); ++Data_Item)
- TranscodedBuffer_Size+=(*Data_Item)->AnnexB_Buffer_Size;
- for (pic_parameter_set_structs::iterator Data_Item=pic_parameter_sets.begin(); Data_Item!=pic_parameter_sets.end(); ++Data_Item)
- TranscodedBuffer_Size+=(*Data_Item)->AnnexB_Buffer_Size;
- }
-
- //Copying
- int8u* TranscodedBuffer=new int8u[TranscodedBuffer_Size+100];
- size_t TranscodedBuffer_Pos=0;
- if (RandomAccess)
- {
- for (video_parameter_set_structs::iterator Data_Item=video_parameter_sets.begin(); Data_Item!=video_parameter_sets.end(); ++Data_Item)
- {
- std::memcpy(TranscodedBuffer+TranscodedBuffer_Pos, (*Data_Item)->AnnexB_Buffer, (*Data_Item)->AnnexB_Buffer_Size);
- TranscodedBuffer_Pos+=(*Data_Item)->AnnexB_Buffer_Size;
- }
- for (seq_parameter_set_structs::iterator Data_Item=seq_parameter_sets.begin(); Data_Item!=seq_parameter_sets.end(); ++Data_Item)
- {
- std::memcpy(TranscodedBuffer+TranscodedBuffer_Pos, (*Data_Item)->AnnexB_Buffer, (*Data_Item)->AnnexB_Buffer_Size);
- TranscodedBuffer_Pos+=(*Data_Item)->AnnexB_Buffer_Size;
- }
- for (pic_parameter_set_structs::iterator Data_Item=pic_parameter_sets.begin(); Data_Item!=pic_parameter_sets.end(); ++Data_Item)
- {
- std::memcpy(TranscodedBuffer+TranscodedBuffer_Pos, (*Data_Item)->AnnexB_Buffer, (*Data_Item)->AnnexB_Buffer_Size);
- TranscodedBuffer_Pos+=(*Data_Item)->AnnexB_Buffer_Size;
- }
- }
- while (Buffer_Offset<Buffer_Size)
- {
- //Sync layer
- TranscodedBuffer[TranscodedBuffer_Pos]=0x00;
- TranscodedBuffer_Pos++;
- TranscodedBuffer[TranscodedBuffer_Pos]=0x00;
- TranscodedBuffer_Pos++;
- TranscodedBuffer[TranscodedBuffer_Pos]=0x01;
- TranscodedBuffer_Pos++;
-
- //Block
- size_t Size;
- switch (lengthSizeMinusOne)
- {
- case 0: Size=Buffer[Buffer_Offset];
- Buffer_Offset++;
- break;
- case 1: Size=BigEndian2int16u(Buffer+Buffer_Offset);
- Buffer_Offset+=2;
- break;
- case 2: Size=BigEndian2int24u(Buffer+Buffer_Offset);
- Buffer_Offset+=3;
- break;
- case 3: Size=BigEndian2int32u(Buffer+Buffer_Offset);
- Buffer_Offset+=4;
- break;
- default: //Problem
- delete [] TranscodedBuffer;
- return false;
- }
-
- //Coherency checking
- if (Size==0 || Buffer_Offset+Size>Buffer_Size || (Buffer_Offset+Size!=Buffer_Size && Buffer_Offset+Size+lengthSizeMinusOne+1>Buffer_Size))
- Size=Buffer_Size-Buffer_Offset;
-
- std::memcpy(TranscodedBuffer+TranscodedBuffer_Pos, Buffer+Buffer_Offset, Size);
- TranscodedBuffer_Pos+=Size;
- Buffer_Offset+=Size;
- }
- Buffer_Offset=0;
-
- Buffer_Temp=Buffer;
- Buffer=TranscodedBuffer;
- Buffer_Temp_Size=Buffer_Size;
- Buffer_Size=TranscodedBuffer_Size;
- Demux_Offset=Buffer_Size;
- }
- else
- {
- bool zero_byte=Buffer[Buffer_Offset+2]==0x00;
- if (!(((Buffer[Buffer_Offset+(zero_byte?4:3)]&0x40)==0 && (Buffer[Buffer_Offset+(zero_byte?6:5)]&0x80)!=0x80)
- || (Buffer[Buffer_Offset+(zero_byte?4:3)]&0x7E)==(38<<1)))
- {
- if (Demux_Offset==0)
- {
- Demux_Offset=Buffer_Offset;
- Demux_IntermediateItemFound=false;
- }
- while (Demux_Offset+6<=Buffer_Size)
- {
- //Synchronizing
- while(Demux_Offset+6<=Buffer_Size && (Buffer[Demux_Offset ]!=0x00
- || Buffer[Demux_Offset+1]!=0x00
- || Buffer[Demux_Offset+2]!=0x01))
- {
- Demux_Offset+=2;
- while(Demux_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Demux_Offset+=2;
- if (Demux_Offset>=Buffer_Size || Buffer[Demux_Offset-1]==0x00)
- Demux_Offset--;
- }
-
- if (Demux_Offset+6>Buffer_Size)
- {
- if (File_Offset+Buffer_Size==File_Size)
- Demux_Offset=Buffer_Size;
- break;
- }
-
- zero_byte=Buffer[Demux_Offset+2]==0x00;
- if (Demux_IntermediateItemFound)
- {
- if (!(((Buffer[Demux_Offset+(zero_byte?4:3)]&0x40)==0 && (Buffer[Demux_Offset+(zero_byte?6:5)]&0x80)!=0x80)
- || (Buffer[Demux_Offset+(zero_byte?4:3)]&0x7E)==(38<<1)))
- break;
- }
- else
- {
- if ((Buffer[Demux_Offset+(zero_byte?4:3)]&0x40)==0 && (Buffer[Demux_Offset+(zero_byte?6:5)]&0x80)==0x80)
- Demux_IntermediateItemFound=true;
- }
-
- Demux_Offset++;
- }
-
- if (Demux_Offset+6>Buffer_Size && !FrameIsAlwaysComplete && File_Offset+Buffer_Size<File_Size)
- return false; //No complete frame
-
- if (Demux_Offset && Buffer[Demux_Offset-1]==0x00)
- Demux_Offset--;
-
- zero_byte=Buffer[Buffer_Offset+2]==0x00;
- size_t Buffer_Offset_Random=Buffer_Offset;
- if ((Buffer[Buffer_Offset_Random+(zero_byte?4:3)]&0x7E)==(35<<1))
- {
- Buffer_Offset_Random++;
- if (zero_byte)
- Buffer_Offset_Random++;
- while(Buffer_Offset_Random+6<=Buffer_Size && (Buffer[Buffer_Offset_Random ]!=0x00
- || Buffer[Buffer_Offset_Random+1]!=0x00
- || Buffer[Buffer_Offset_Random+2]!=0x01))
- Buffer_Offset_Random++;
- zero_byte=Buffer[Buffer_Offset_Random+2]==0x00;
- }
- RandomAccess=Buffer_Offset_Random+6<=Buffer_Size && (Buffer[Buffer_Offset_Random+(zero_byte?4:3)]&0x7E)==(32<<1); //video_parameter_set
- }
- }
-
- if (!Status[IsAccepted])
- {
- if (Config->Demux_EventWasSent)
- return false;
- File_Hevc* MI=new File_Hevc;
- Open_Buffer_Init(MI);
- Open_Buffer_Continue(MI, Buffer, Buffer_Size);
- bool IsOk=MI->Status[IsAccepted];
- delete MI;
- if (!IsOk)
- return false;
- }
-
- if (IFrame_Count || RandomAccess)
- {
- int64u PTS_Temp=FrameInfo.PTS;
- if (!IsSub)
- FrameInfo.PTS=(int64u)-1;
- Demux_UnpacketizeContainer_Demux(RandomAccess);
- if (!IsSub)
- FrameInfo.PTS=PTS_Temp;
- }
- else
- Demux_UnpacketizeContainer_Demux_Clear();
-
- if (Buffer_Temp)
- {
- Demux_TotalBytes-=Buffer_Size;
- Demux_TotalBytes+=Buffer_Temp_Size;
- delete[] Buffer;
- Buffer=Buffer_Temp;
- Buffer_Size=Buffer_Temp_Size;
- }
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX
-
-//---------------------------------------------------------------------------
-void File_Hevc::Synched_Init()
-{
- //FrameInfo
- PTS_End=0;
- if (FrameInfo.DTS==(int64u)-1)
- FrameInfo.DTS=0; //No DTS in container
- DTS_Begin=FrameInfo.DTS;
- DTS_End=FrameInfo.DTS;
-
- //Status
- IFrame_Count=0;
-
- //Temp
-
- //Default values
- Streams.resize(0x100);
- Streams[32].Searching_Payload=true; //video_parameter_set
- Streams[35].Searching_Payload=true; //access_unit_delimiter
- Streams[39].Searching_Payload=true; //sei
- for (int8u Pos=0xFF; Pos>=48; Pos--)
- Streams[Pos].Searching_Payload=true; //unspecified
-
- #if MEDIAINFO_DEMUX
- Demux_Transcode_Iso14496_15_to_AnnexB=Config->Demux_Hevc_Transcode_Iso14496_15_to_AnnexB_Get();
- #endif //MEDIAINFO_DEMUX
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Hevc::Read_Buffer_Unsynched()
-{
- //Impossible to know TimeStamps now
- PTS_End=0;
- DTS_End=0;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Hevc::Header_Parse()
-{
- //Specific case
- if (MustParse_VPS_SPS_PPS)
- {
- Header_Fill_Size(Element_Size);
- Header_Fill_Code((int64u)-1, "Specific");
- return;
- }
-
- //Parsing
- int8u nal_unit_type, nuh_temporal_id_plus1;
- if (!SizedBlocks)
- {
- if (Buffer[Buffer_Offset+2]==0x00)
- Skip_B1( "zero_byte");
- Skip_B3( "start_code_prefix_one_3bytes");
- BS_Begin();
- Mark_0 ();
- Get_S1 (6, nal_unit_type, "nal_unit_type");
- Get_S1 (6, nuh_layer_id, "nuh_layer_id");
- Get_S1 (3, nuh_temporal_id_plus1, "nuh_temporal_id_plus1");
- BS_End();
-
- if (!Header_Parser_Fill_Size())
- {
- Element_WaitForMoreData();
- return;
- }
-
- if (nuh_temporal_id_plus1==0)
- Trusted_IsNot("nuh_temporal_id_plus1");
- }
- else
- {
- int32u Size;
- switch (lengthSizeMinusOne)
- {
- case 0: {
- int8u Size_;
- Get_B1 (Size_, "size");
- Size=Size_;
- }
- break;
- case 1: {
- int16u Size_;
- Get_B2 (Size_, "size");
- Size=Size_;
- }
- break;
- case 2: {
- int32u Size_;
- Get_B3 (Size_, "size");
- Size=Size_;
- }
- break;
- case 3: Get_B4 (Size, "size");
- break;
- default: Trusted_IsNot("No size of NALU defined");
- Size=(int32u)(Buffer_Size-Buffer_Offset);
- }
- BS_Begin();
- Mark_0 ();
- Get_S1 (6, nal_unit_type, "nal_unit_type");
- Get_S1 (6, nuh_layer_id, "nuh_layer_id");
- Get_S1 (3, nuh_temporal_id_plus1, "nuh_temporal_id_plus1");
- BS_End();
-
- if (nuh_temporal_id_plus1==0)
- Trusted_IsNot("nuh_temporal_id_plus1");
-
- FILLING_BEGIN();
- Header_Fill_Size(Size?(Element_Offset-2+Size):(Buffer_Size-Buffer_Offset)); //If Size is 0, it is not normal, we skip the complete frame
- FILLING_END();
- }
-
- //Filling
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- Header_Fill_Code(nal_unit_type, Ztring().From_CC1(nal_unit_type));
- else
- #endif //MEDIAINFO_TRACE
- Header_Fill_Code(nal_unit_type);
-}
-
-//---------------------------------------------------------------------------
-bool File_Hevc::Header_Parser_Fill_Size()
-{
- //Look for next Sync word
- if (Buffer_Offset_Temp==0) //Buffer_Offset_Temp is not 0 if Header_Parse_Fill_Size() has already parsed first frames
- Buffer_Offset_Temp=Buffer_Offset+4;
- while (Buffer_Offset_Temp+5<=Buffer_Size
- && CC3(Buffer+Buffer_Offset_Temp)!=0x000001)
- {
- Buffer_Offset_Temp+=2;
- while(Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp]!=0x00)
- Buffer_Offset_Temp+=2;
- if (Buffer_Offset_Temp>=Buffer_Size || Buffer[Buffer_Offset_Temp-1]==0x00)
- Buffer_Offset_Temp--;
- }
-
- //Must wait more data?
- if (Buffer_Offset_Temp+5>Buffer_Size)
- {
- if (FrameIsAlwaysComplete || File_Offset+Buffer_Size>=File_Size)
- Buffer_Offset_Temp=Buffer_Size; //We are sure that the next bytes are a start
- else
- return false;
- }
-
- if (Buffer[Buffer_Offset_Temp-1]==0x00)
- Buffer_Offset_Temp--;
-
- //OK, we continue
- Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
- Buffer_Offset_Temp=0;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Hevc::Header_Parser_QuickSearch()
-{
- while ( Buffer_Offset+6<=Buffer_Size
- && Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && (Buffer[Buffer_Offset+2]==0x01
- || (Buffer[Buffer_Offset+2]==0x00 && Buffer[Buffer_Offset+3]==0x01)))
- {
- //Getting start_code
- int8u nal_unit_type;
- if (Buffer[Buffer_Offset+2]==0x00)
- nal_unit_type=(CC1(Buffer+Buffer_Offset+4)&0x7E)>>1;
- else
- nal_unit_type=(CC1(Buffer+Buffer_Offset+3)&0x7E)>>1;
-
- //Searching start
- if (Streams[nal_unit_type].Searching_Payload)
- return true;
-
- //Synchronizing
- Buffer_Offset+=4;
- Synched=false;
- if (!Synchronize())
- {
- UnSynched_IsNotJunk=true;
- return false;
- }
-
- if (Buffer_Offset+6>Buffer_Size)
- {
- UnSynched_IsNotJunk=true;
- return false;
- }
- }
-
- Trusted_IsNot("HEVC, Synchronisation lost");
- return Synchronize();
-}
-
-//---------------------------------------------------------------------------
-void File_Hevc::Data_Parse()
-{
- //Specific case
- if (Element_Code==(int64u)-1)
- {
- VPS_SPS_PPS();
- return;
- }
-
- if (nuh_layer_id)
- {
- //Skip_XX(Element_Size, "(Extension)");
- //return;
- }
-
- //Trailing zeroes
- int64u Element_Size_SaveBeforeZeroes=Element_Size;
- if (Element_Size)
- {
- while (Element_Size && Buffer[Buffer_Offset+(size_t)Element_Size-1]==0)
- Element_Size--;
- }
-
- //Searching emulation_prevention_three_byte
- int8u* Buffer_3Bytes=NULL;
- const int8u* Save_Buffer=Buffer;
- int64u Save_File_Offset=File_Offset;
- size_t Save_Buffer_Offset=Buffer_Offset;
- int64u Save_Element_Size=Element_Size;
- size_t Element_Offset_3Bytes=(size_t)Element_Offset;
- std::vector<size_t> ThreeByte_List;
- while (Element_Offset_3Bytes+3<=Element_Size)
- {
- if (CC3(Buffer+Buffer_Offset+(size_t)Element_Offset_3Bytes)==0x000003)
- ThreeByte_List.push_back(Element_Offset_3Bytes+2);
- Element_Offset_3Bytes+=2;
- while(Element_Offset_3Bytes<Element_Size && Buffer[Buffer_Offset+(size_t)Element_Offset_3Bytes]!=0x00)
- Element_Offset_3Bytes+=2;
- if (Element_Offset_3Bytes>=Element_Size || Buffer[Buffer_Offset+(size_t)Element_Offset_3Bytes-1]==0x00)
- Element_Offset_3Bytes--;
- }
-
- if (!ThreeByte_List.empty())
- {
- //We must change the buffer for keeping out
- Element_Size=Save_Element_Size-ThreeByte_List.size();
- File_Offset+=Buffer_Offset;
- Buffer_Offset=0;
- Buffer_3Bytes=new int8u[(size_t)Element_Size];
- for (size_t Pos=0; Pos<=ThreeByte_List.size(); Pos++)
- {
- size_t Pos0=(Pos==ThreeByte_List.size())?(size_t)Save_Element_Size:(ThreeByte_List[Pos]);
- size_t Pos1=(Pos==0)?0:(ThreeByte_List[Pos-1]+1);
- size_t Buffer_3bytes_Begin=Pos1-Pos;
- size_t Save_Buffer_Begin =Pos1;
- size_t Size= Pos0-Pos1;
- std::memcpy(Buffer_3Bytes+Buffer_3bytes_Begin, Save_Buffer+Save_Buffer_Offset+Save_Buffer_Begin, Size);
- }
- Buffer=Buffer_3Bytes;
- }
-
- //Parsing
- switch (Element_Code)
- {
- case 0 :
- case 1 :
- case 2 :
- case 3 :
- case 16 :
- case 17 :
- case 18 :
- case 19 :
- case 20 :
- case 21 :
- slice_segment_layer(); break;
- case 4 :
- case 5 :
- case 6 :
- case 7 :
- case 8 :
- case 9 :
- slice_layer(); break;
- case 32 : video_parameter_set(); break;
- case 33 : seq_parameter_set(); break;
- case 34 : pic_parameter_set(); break;
- case 35 : access_unit_delimiter(); break;
- case 36 : end_of_seq(); break;
- case 37 : end_of_bitstream(); break;
- case 38 : filler_data(); break;
- case 39 :
- case 40 :
- sei(); break;
- default :
- Skip_XX(Element_Size-Element_Offset, "Data");
- if (Element_Code>=48)
- Trusted_IsNot("Unspecified");
- }
-
- if (!ThreeByte_List.empty())
- {
- //We must change the buffer for keeping out
- Element_Size=Save_Element_Size;
- File_Offset=Save_File_Offset;
- Buffer_Offset=Save_Buffer_Offset;
- delete[] Buffer; Buffer=Save_Buffer;
- Buffer_3Bytes=NULL; //Same as Buffer...
- Element_Offset+=ThreeByte_List.size();
- }
-
- #if MEDIAINFO_DEMUX
- if (Demux_Transcode_Iso14496_15_to_AnnexB)
- {
- if (Element_Code==32)
- {
- std::vector<video_parameter_set_struct*>::iterator Data_Item=video_parameter_sets.begin();
- if (Data_Item!=video_parameter_sets.end() && (*Data_Item))
- {
- delete[] (*Data_Item)->AnnexB_Buffer;
- (*Data_Item)->AnnexB_Buffer_Size=(size_t)(Element_Size+5);
- (*Data_Item)->AnnexB_Buffer=new int8u[(*Data_Item)->AnnexB_Buffer_Size];
- (*Data_Item)->AnnexB_Buffer[0]=0x00;
- (*Data_Item)->AnnexB_Buffer[1]=0x00;
- (*Data_Item)->AnnexB_Buffer[2]=0x01;
- (*Data_Item)->AnnexB_Buffer[3]=Buffer[Buffer_Offset-2];
- (*Data_Item)->AnnexB_Buffer[4]=Buffer[Buffer_Offset-1];
- std::memcpy((*Data_Item)->AnnexB_Buffer+5, Buffer+Buffer_Offset, (size_t)Element_Size);
- }
- }
- if (Element_Code==33)
- {
- std::vector<seq_parameter_set_struct*>::iterator Data_Item=seq_parameter_sets.begin();
- if (Data_Item!=seq_parameter_sets.end() && (*Data_Item))
- {
- delete[] (*Data_Item)->AnnexB_Buffer;
- (*Data_Item)->AnnexB_Buffer_Size=(size_t)(Element_Size+5);
- (*Data_Item)->AnnexB_Buffer=new int8u[(*Data_Item)->AnnexB_Buffer_Size];
- (*Data_Item)->AnnexB_Buffer[0]=0x00;
- (*Data_Item)->AnnexB_Buffer[1]=0x00;
- (*Data_Item)->AnnexB_Buffer[2]=0x01;
- (*Data_Item)->AnnexB_Buffer[3]=Buffer[Buffer_Offset-2];
- (*Data_Item)->AnnexB_Buffer[4]=Buffer[Buffer_Offset-1];
- std::memcpy((*Data_Item)->AnnexB_Buffer+5, Buffer+Buffer_Offset, (size_t)Element_Size);
- }
- }
- if (Element_Code==34)
- {
- std::vector<pic_parameter_set_struct*>::iterator Data_Item=pic_parameter_sets.begin();
- if (Data_Item!=pic_parameter_sets.end() && (*Data_Item))
- {
- delete[] (*Data_Item)->AnnexB_Buffer;
- (*Data_Item)->AnnexB_Buffer_Size=(size_t)(Element_Size+5);
- (*Data_Item)->AnnexB_Buffer=new int8u[(*Data_Item)->AnnexB_Buffer_Size];
- (*Data_Item)->AnnexB_Buffer[0]=0x00;
- (*Data_Item)->AnnexB_Buffer[1]=0x00;
- (*Data_Item)->AnnexB_Buffer[2]=0x01;
- (*Data_Item)->AnnexB_Buffer[3]=Buffer[Buffer_Offset-2];
- (*Data_Item)->AnnexB_Buffer[4]=Buffer[Buffer_Offset-1];
- std::memcpy((*Data_Item)->AnnexB_Buffer+5, Buffer+Buffer_Offset, (size_t)Element_Size);
- }
- }
- }
- #endif //MEDIAINFO_DEMUX
-
- //Trailing zeroes
- Element_Size=Element_Size_SaveBeforeZeroes;
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Packets
-void File_Hevc::slice_segment_layer()
-{
- #if MEDIAINFO_TRACE
- Element_Name("slice_segment_layer");
- switch (Element_Code)
- {
- case 0 :
- case 1 : break;
- case 2 :
- case 3 : Element_Info("TSA"); break;
- case 16 :
- case 17 :
- case 18 : Element_Info("BLA"); break;
- case 19 :
- case 20 : Element_Info("IDR"); break;
- case 21 : Element_Info("CRA"); break;
- default: ;
- }
- #endif //MEDIAINFO_TRACE
-
- //Parsing
- RapPicFlag=Element_Code>=16 && Element_Code<=23;
- BS_Begin();
- slice_segment_header();
- BS_End();
- Skip_XX(Element_Size-Element_Offset, "(ToDo)");
-
- FILLING_BEGIN();
- if (slice_pic_parameter_set_id==(int32u)-1)
- return;
-
- //Count of I-Frames
- if (first_slice_segment_in_pic_flag && (Element_Code==19 || Element_Code==20))
- IFrame_Count++;
-
- if (first_slice_segment_in_pic_flag)
- {
- //Frame_Count
- Frame_Count++;
- if (IFrame_Count && Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- Frame_Count_InThisBlock++;
-
- //Filling only if not already done
- if (Frame_Count==1 && !Status[IsAccepted])
- Accept("HEVC");
- if (!Status[IsFilled])
- {
- if (IFrame_Count>=8)
- Frame_Count_Valid=Frame_Count; //We have enough frames
- if (Frame_Count>=Frame_Count_Valid)
- {
- Fill("HEVC");
- if (!IsSub && MediaInfoLib::Config.ParseSpeed_Get()<1.0)
- Finish("HEVC");
- }
- }
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packets
-void File_Hevc::slice_layer()
-{
- #if MEDIAINFO_TRACE
- Element_Name("slice_layer");
- switch (Element_Code)
- {
- case 4 :
- case 5 : Element_Info("STSA"); break;
- case 6 :
- case 7 : Element_Info("RADL"); break;
- case 8 :
- case 9 : Element_Info("RASL"); break;
- default: ;
- }
- #endif //MEDIAINFO_TRACE
-
- //Parsing
- Skip_XX(Element_Size-Element_Offset, "(ToDo)");
-}
-
-//---------------------------------------------------------------------------
-// Packet "32"
-void File_Hevc::video_parameter_set()
-{
- Element_Name("video_parameter_set");
-
- //Parsing
- int32u vps_num_layer_sets_minus1;
- int8u vps_video_parameter_set_id, vps_max_sub_layers_minus1, vps_max_layer_id;
- bool vps_temporal_id_nesting_flag, vps_sub_layer_ordering_info_present_flag;
- BS_Begin();
- Get_S1 (4, vps_video_parameter_set_id, "vps_video_parameter_set_id");
- if (MustParse_VPS_SPS_PPS_FromFlv)
- {
- BS_End();
- Skip_XX(Element_Size-Element_Offset, "Data");
-
- //Creating Data
- if (vps_video_parameter_set_id>=video_parameter_sets.size())
- video_parameter_sets.resize(vps_video_parameter_set_id+1);
- std::vector<video_parameter_set_struct*>::iterator Data_Item=video_parameter_sets.begin()+vps_video_parameter_set_id;
- delete *Data_Item; *Data_Item=new video_parameter_set_struct(
- 0 //TODO: check which code is intended here
- );
-
- //NextCode
- NextCode_Clear();
- NextCode_Add(33);
-
- //Autorisation of other streams
- Streams[33].Searching_Payload=true; //seq_parameter_set
- Streams[36].Searching_Payload=true; //end_of_seq
- Streams[37].Searching_Payload=true; //end_of_bitstream
- Streams[38].Searching_Payload=true; //filler_data
-
- return;
- }
- Skip_S1(2, "vps_reserved_three_2bits");
- Skip_S1(6, "vps_reserved_zero_6bits");
- Get_S1 (3, vps_max_sub_layers_minus1, "vps_max_sub_layers_minus1");
- if (vps_max_sub_layers_minus1>6)
- {
- Trusted_IsNot("vps_max_sub_layers_minus1 not valid");
- BS_End();
- return; //Problem, not valid
- }
- Get_SB ( vps_temporal_id_nesting_flag, "vps_temporal_id_nesting_flag");
- //if (vps_max_sub_layers_minus1==0 && !vps_temporal_id_nesting_flag)
- //{
- // Trusted_IsNot("vps_temporal_id_nesting_flag not valid");
- // BS_End();
- // return; //Problem, not valid
- //}
- Skip_S2(16, "vps_reserved_0xffff_16bits");
- profile_tier_level(vps_max_sub_layers_minus1);
- Get_SB ( vps_sub_layer_ordering_info_present_flag, "vps_sub_layer_ordering_info_present_flag");
- for (int32u SubLayerPos=(vps_sub_layer_ordering_info_present_flag?0:vps_max_sub_layers_minus1); SubLayerPos<=vps_max_sub_layers_minus1; SubLayerPos++)
- {
- Element_Begin1("SubLayer");
- Skip_UE( "vps_max_dec_pic_buffering_minus1");
- Skip_UE( "vps_max_num_reorder_pics");
- Skip_UE( "vps_max_latency_increase_plus1");
- Element_End0();
- }
- Get_S1 ( 6, vps_max_layer_id, "vps_max_layer_id");
- Get_UE ( vps_num_layer_sets_minus1, "vps_num_layer_sets_minus1");
- if (vps_num_layer_sets_minus1>=1024)
- {
- Trusted_IsNot("vps_num_layer_sets_minus1 not valid");
- BS_End();
- return; //Problem, not valid
- }
- for (int32u LayerSetPos=1; LayerSetPos<=vps_num_layer_sets_minus1; LayerSetPos++)
- for (int8u LayerId=0; LayerId<=vps_max_layer_id; LayerId++)
- Skip_SB( "layer_id_included_flag");
- TEST_SB_SKIP( "vps_timing_info_present_flag");
- int32u vps_time_scale, vps_num_hrd_parameters;
- Skip_S4(32, "vps_num_units_in_tick");
- Get_S4 (32, vps_time_scale, "vps_time_scale");
- if (vps_time_scale==0)
- {
- Trusted_IsNot("vps_time_scale not valid");
- Element_End0();
- BS_End();
- return; //Problem, not valid
- }
- TEST_SB_SKIP( "vps_poc_proportional_to_timing_flag");
- Skip_UE( "vps_num_ticks_poc_diff_one_minus1");
- TEST_SB_END();
- Get_UE ( vps_num_hrd_parameters, "vps_num_hrd_parameters");
- if (vps_num_hrd_parameters>1024)
- {
- Trusted_IsNot("vps_num_hrd_parameters not valid");
- vps_num_hrd_parameters=0;
- }
- for (int32u HrdPos=0; HrdPos<vps_num_hrd_parameters; HrdPos++)
- {
- int32u hrd_layer_set_idx;
- Get_UE ( hrd_layer_set_idx, "hrd_layer_set_idx");
- if (hrd_layer_set_idx>=1024)
- Trusted_IsNot("hrd_layer_set_idx not valid");
- if (HrdPos)
- Skip_SB( "cprms_present_flag");
- Trusted_IsNot("hrd_parameters not supported");
- //hrd_parameters
- }
- TEST_SB_END();
- TESTELSE_SB_SKIP( "vps_extension_flag");
- Skip_BS(Data_BS_Remain(), "vps_extension_data");
- Trusted_IsNot("(Not supported)"); // Should be skipped, but the detection is too sensible in that case, do not remove it until the detection is adapted
- TESTELSE_SB_ELSE( "vps_extension_flag");
- Mark_1();
- while (Data_BS_Remain())
- Mark_0();
- TESTELSE_SB_END();
- BS_End();
-
- FILLING_BEGIN_PRECISE();
- //Creating Data
- if (vps_video_parameter_set_id>=video_parameter_sets.size())
- video_parameter_sets.resize(vps_video_parameter_set_id+1);
- std::vector<video_parameter_set_struct*>::iterator Data_Item=video_parameter_sets.begin()+vps_video_parameter_set_id;
- delete *Data_Item; *Data_Item=new video_parameter_set_struct(
- vps_max_sub_layers_minus1
- );
-
- //NextCode
- NextCode_Clear();
- NextCode_Add(33);
-
- //Autorisation of other streams
- Streams[33].Searching_Payload=true; //seq_parameter_set
- Streams[36].Searching_Payload=true; //end_of_seq
- Streams[37].Searching_Payload=true; //end_of_bitstream
- Streams[38].Searching_Payload=true; //filler_data
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "33"
-void File_Hevc::seq_parameter_set()
-{
- Element_Name("seq_parameter_set");
-
- //Parsing
- seq_parameter_set_struct::vui_parameters_struct* vui_parameters_Item=NULL;
- int32u sps_seq_parameter_set_id, chroma_format_idc, pic_width_in_luma_samples, pic_height_in_luma_samples, bit_depth_luma_minus8, bit_depth_chroma_minus8, log2_max_pic_order_cnt_lsb_minus4, num_short_term_ref_pic_sets;
- int32u conf_win_left_offset=0, conf_win_right_offset=0, conf_win_top_offset=0, conf_win_bottom_offset=0;
- int8u video_parameter_set_id, max_sub_layers_minus1;
- bool separate_colour_plane_flag=false, sps_sub_layer_ordering_info_present_flag;
- BS_Begin();
- Get_S1 (4, video_parameter_set_id, "sps_video_parameter_set_id");
- std::vector<video_parameter_set_struct*>::iterator video_parameter_set_Item;
- if (video_parameter_set_id >= video_parameter_sets.size() || (*(video_parameter_set_Item = video_parameter_sets.begin() + video_parameter_set_id)) == NULL)
- {
- //Not yet present
- Skip_BS(Data_BS_Remain(), "Data (video_parameter_set is missing)");
- BS_End();
- return;
- }
- Get_S1 (3, max_sub_layers_minus1, "sps_max_sub_layers_minus1");
- Skip_SB( "sps_temporal_id_nesting_flag");
- profile_tier_level(max_sub_layers_minus1);
- Get_UE ( sps_seq_parameter_set_id, "sps_seq_parameter_set_id");
- if (MustParse_VPS_SPS_PPS_FromFlv)
- {
- BS_End();
- Skip_XX(Element_Size-Element_Offset, "Data");
-
- //Creating Data
- if (sps_seq_parameter_set_id>=seq_parameter_sets.size())
- seq_parameter_sets.resize(sps_seq_parameter_set_id+1);
- std::vector<seq_parameter_set_struct*>::iterator Data_Item=seq_parameter_sets.begin()+sps_seq_parameter_set_id;
- delete *Data_Item; *Data_Item=new seq_parameter_set_struct(
- NULL, //TODO: check which code is intended here
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- false,
- false,
- false
- );
-
- //NextCode
- NextCode_Clear();
- NextCode_Add(34);
-
- //Autorisation of other streams
- Streams[34].Searching_Payload=true; //pic_parameter_set
-
- return;
- }
- Get_UE ( chroma_format_idc, "chroma_format_idc"); Param_Info1(Hevc_chroma_format_idc((int8u)chroma_format_idc));
- if (chroma_format_idc>=4)
- {
- Trusted_IsNot("chroma_format_idc not valid");
- BS_End();
- return; //Problem, not valid
- }
- if (chroma_format_idc==3)
- Get_SB (separate_colour_plane_flag, "separate_colour_plane_flag");
- Get_UE ( pic_width_in_luma_samples, "pic_width_in_luma_samples");
- Get_UE ( pic_height_in_luma_samples, "pic_height_in_luma_samples");
- TEST_SB_SKIP( "conformance_window_flag");
- Get_UE (conf_win_left_offset, "conf_win_left_offset");
- Get_UE (conf_win_right_offset, "conf_win_right_offset");
- Get_UE (conf_win_top_offset, "conf_win_top_offset");
- Get_UE (conf_win_bottom_offset, "conf_win_bottom_offset");
- TEST_SB_END();
- Get_UE ( bit_depth_luma_minus8, "bit_depth_luma_minus8");
- if (bit_depth_luma_minus8>6)
- {
- Trusted_IsNot("bit_depth_luma_minus8 not valid");
- return; //Problem, not valid
- }
- Get_UE ( bit_depth_chroma_minus8, "bit_depth_chroma_minus8");
- if (bit_depth_chroma_minus8>6)
- {
- Trusted_IsNot("bit_depth_chroma_minus8 not valid");
- return; //Problem, not valid
- }
- Get_UE ( log2_max_pic_order_cnt_lsb_minus4, "log2_max_pic_order_cnt_lsb_minus4");
- if (log2_max_pic_order_cnt_lsb_minus4>12)
- {
- Trusted_IsNot("log2_max_pic_order_cnt_lsb_minus4 not valid");
- return; //Problem, not valid
- }
- Get_SB ( sps_sub_layer_ordering_info_present_flag, "sps_sub_layer_ordering_info_present_flag");
- for (int32u SubLayerPos = (sps_sub_layer_ordering_info_present_flag ? 0 : max_sub_layers_minus1); SubLayerPos <= max_sub_layers_minus1; SubLayerPos++)
- {
- Element_Begin1("SubLayer");
- Skip_UE( "sps_max_dec_pic_buffering_minus1");
- Skip_UE( "sps_max_num_reorder_pics");
- Skip_UE( "sps_max_latency_increase_plus1");
- Element_End0();
- }
- Skip_UE( "log2_min_luma_coding_block_size_minus3");
- Skip_UE( "log2_diff_max_min_luma_coding_block_size");
- Skip_UE( "log2_min_transform_block_size_minus2");
- Skip_UE( "log2_diff_max_min_transform_block_size");
- Skip_UE( "max_transform_hierarchy_depth_inter");
- Skip_UE( "max_transform_hierarchy_depth_intra");
- TEST_SB_SKIP( "scaling_list_enabled_flag");
- TEST_SB_SKIP( "sps_scaling_list_data_present_flag");
- scaling_list_data();
- TEST_SB_END();
- TEST_SB_END();
- Skip_SB( "amp_enabled_flag");
- Skip_SB( "sample_adaptive_offset_enabled_flag");
- TEST_SB_SKIP( "pcm_enabled_flag");
- Element_Begin1("pcm");
- Skip_S1(4, "pcm_sample_bit_depth_luma_minus1");
- Skip_S1(4, "pcm_sample_bit_depth_chroma_minus1");
- Skip_UE( "log2_min_pcm_luma_coding_block_size_minus3");
- Skip_UE( "log2_diff_max_min_pcm_luma_coding_block_size");
- Skip_SB( "pcm_loop_filter_disabled_flag");
- Element_End0();
- TEST_SB_END();
- Get_UE ( num_short_term_ref_pic_sets, "num_short_term_ref_pic_sets");
- if (num_short_term_ref_pic_sets>64)
- {
- BS_End();
- Trusted_IsNot("num_short_term_ref_pic_sets not valid");
- return; //Problem, not valid
- }
- short_term_ref_pic_sets((int8u)num_short_term_ref_pic_sets);
- TEST_SB_SKIP( "long_term_ref_pics_present_flag");
- Element_Begin1("long_term_ref_pics");
- int32u num_long_term_ref_pics_sps;
- Get_UE (num_long_term_ref_pics_sps, "num_long_term_ref_pics_sps");
- for (int32u long_term_ref_pics_sps_pos=0; long_term_ref_pics_sps_pos<num_long_term_ref_pics_sps; long_term_ref_pics_sps_pos++)
- {
- Skip_BS(log2_max_pic_order_cnt_lsb_minus4+4, "lt_ref_pic_poc_lsb_sps");
- Skip_SB( "used_by_curr_pic_lt_sps_flag");
- }
- Element_End0();
- TEST_SB_END();
- Skip_SB( "sps_temporal_mvp_enabled_flag");
- Skip_SB( "strong_intra_smoothing_enabled_flag");
- TEST_SB_SKIP( "vui_parameters_present_flag");
- vui_parameters(video_parameter_set_Item, vui_parameters_Item);
- TEST_SB_END();
- TESTELSE_SB_SKIP( "sps_extension_flag");
- Skip_BS(Data_BS_Remain(), "sps_extension_data");
- Trusted_IsNot("(Not supported)"); // Should be skipped, but the detection is too sensible in that case, do not remove it until the detection is adapted
- TESTELSE_SB_ELSE( "sps_extension_flag");
- Mark_1();
- while (Data_BS_Remain())
- Mark_0();
- TESTELSE_SB_END();
- BS_End();
-
- FILLING_BEGIN_PRECISE();
- //Creating Data
- if (sps_seq_parameter_set_id>=seq_parameter_sets.size())
- seq_parameter_sets.resize(sps_seq_parameter_set_id+1);
- std::vector<seq_parameter_set_struct*>::iterator Data_Item=seq_parameter_sets.begin()+sps_seq_parameter_set_id;
- delete *Data_Item; *Data_Item=new seq_parameter_set_struct(
- vui_parameters_Item,
- profile_space,
- tier_flag,
- profile_idc,
- level_idc,
- pic_width_in_luma_samples,
- pic_height_in_luma_samples,
- conf_win_left_offset,
- conf_win_right_offset,
- conf_win_top_offset,
- conf_win_bottom_offset,
- (int8u)video_parameter_set_id,
- (int8u)chroma_format_idc,
- separate_colour_plane_flag,
- (int8u)log2_max_pic_order_cnt_lsb_minus4,
- (int8u)bit_depth_luma_minus8,
- (int8u)bit_depth_chroma_minus8,
- general_progressive_source_flag,
- general_interlaced_source_flag,
- general_frame_only_constraint_flag
- );
-
- //NextCode
- NextCode_Clear();
- NextCode_Add(34);
-
- //Autorisation of other streams
- Streams[34].Searching_Payload=true; //pic_parameter_set
- FILLING_ELSE();
- delete vui_parameters_Item; //vui_parameters_Item=NULL;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "34"
-void File_Hevc::pic_parameter_set()
-{
- Element_Name("pic_parameter_set");
-
- //Parsing
- int32u pps_pic_parameter_set_id, pps_seq_parameter_set_id, num_ref_idx_l0_default_active_minus1, num_ref_idx_l1_default_active_minus1;
- int8u num_extra_slice_header_bits;
- bool tiles_enabled_flag, dependent_slice_segments_enabled_flag;
- BS_Begin();
- Get_UE ( pps_pic_parameter_set_id, "pps_pic_parameter_set_id");
- if (pps_pic_parameter_set_id>=64)
- {
- Trusted_IsNot("pic_parameter_set_id not valid");
- BS_End();
- return; //Problem, not valid
- }
- Get_UE ( pps_seq_parameter_set_id, "pps_seq_parameter_set_id");
- if (pps_seq_parameter_set_id>=16)
- {
- Trusted_IsNot("seq_parameter_set_id not valid");
- return; //Problem, not valid
- }
- //std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item;
- if (pps_seq_parameter_set_id>=seq_parameter_sets.size() || (*(seq_parameter_sets.begin()+pps_seq_parameter_set_id))==NULL) //(seq_parameter_set_Item=seq_parameter_sets.begin()+pps_seq_parameter_set_id) not usd for the moment
- {
- //Not yet present
- Skip_BS(Data_BS_Remain(), "Data (seq_parameter_set is missing)");
- BS_End();
- return;
- }
- if (MustParse_VPS_SPS_PPS_FromFlv)
- {
- BS_End();
- Skip_XX(Element_Size-Element_Offset, "Data");
-
- //Filling
- if (pps_pic_parameter_set_id>=pic_parameter_sets.size())
- pic_parameter_sets.resize(pps_pic_parameter_set_id+1);
- std::vector<pic_parameter_set_struct*>::iterator pic_parameter_sets_Item=pic_parameter_sets.begin()+pps_pic_parameter_set_id;
- delete *pic_parameter_sets_Item; *pic_parameter_sets_Item=new pic_parameter_set_struct(
- 0,
- 0,
- 0,
- 0,
- false
- );
-
- //NextCode
- NextCode_Clear();
-
- //Autorisation of other streams
- Streams[ 0].Searching_Payload=true; //slice_segment_layer
- Streams[ 1].Searching_Payload=true; //slice_segment_layer
- Streams[ 2].Searching_Payload=true; //slice_segment_layer
- Streams[ 3].Searching_Payload=true; //slice_segment_layer
- Streams[ 4].Searching_Payload=true; //slice_layer
- Streams[ 5].Searching_Payload=true; //slice_layer
- Streams[ 6].Searching_Payload=true; //slice_layer
- Streams[ 7].Searching_Payload=true; //slice_layer
- Streams[ 8].Searching_Payload=true; //slice_layer
- Streams[ 9].Searching_Payload=true; //slice_layer
- Streams[16].Searching_Payload=true; //slice_segment_layer
- Streams[17].Searching_Payload=true; //slice_segment_layer
- Streams[18].Searching_Payload=true; //slice_segment_layer
- Streams[19].Searching_Payload=true; //slice_segment_layer
- Streams[20].Searching_Payload=true; //slice_segment_layer
- Streams[21].Searching_Payload=true; //slice_segment_layer
-
- return;
- }
- Get_SB ( dependent_slice_segments_enabled_flag, "dependent_slice_segments_enabled_flag");
- Skip_SB( "output_flag_present_flag");
- Get_S1 (3, num_extra_slice_header_bits, "num_extra_slice_header_bits");
- Skip_SB( "sign_data_hiding_flag");
- Skip_SB( "cabac_init_present_flag");
- Get_UE ( num_ref_idx_l0_default_active_minus1, "num_ref_idx_l0_default_active_minus1");
- Get_UE ( num_ref_idx_l1_default_active_minus1, "num_ref_idx_l1_default_active_minus1");
- Skip_SE( "init_qp_minus26");
- Skip_SB( "constrained_intra_pred_flag");
- Skip_SB( "transform_skip_enabled_flag");
- TEST_SB_SKIP( "cu_qp_delta_enabled_flag");
- Skip_UE( "diff_cu_qp_delta_depth");
- TEST_SB_END();
- Skip_SE( "pps_cb_qp_offset");
- Skip_SE( "pps_cr_qp_offset");
- Skip_SB( "pps_slice_chroma_qp_offsets_present_flag");
- Skip_SB( "weighted_pred_flag");
- Skip_SB( "weighted_bipred_flag");
- Skip_SB( "transquant_bypass_enable_flag");
- Get_SB ( tiles_enabled_flag, "tiles_enabled_flag");
- Skip_SB( "entropy_coding_sync_enabled_flag");
- if (tiles_enabled_flag)
- {
- Element_Begin1("tiles");
- int32u num_tile_columns_minus1, num_tile_rows_minus1;
- bool uniform_spacing_flag;
- Get_UE ( num_tile_columns_minus1, "num_tile_columns_minus1");
- Get_UE ( num_tile_rows_minus1, "num_tile_rows_minus1");
- Get_SB ( uniform_spacing_flag, "uniform_spacing_flag");
- if (!uniform_spacing_flag)
- {
- for (int32u tile_pos=0; tile_pos<num_tile_columns_minus1; tile_pos++)
- Skip_UE( "column_width_minus1");
- for (int32u tile_pos=0; tile_pos<num_tile_rows_minus1; tile_pos++)
- Skip_UE( "row_height_minus1");
- }
- Skip_SB( "loop_filter_across_tiles_enabled_flag");
- Element_End0();
- }
- Skip_SB( "pps_loop_filter_across_slices_enabled_flag");
- TEST_SB_SKIP( "deblocking_filter_control_present_flag");
- bool pps_disable_deblocking_filter_flag;
- Skip_SB( "deblocking_filter_override_enabled_flag");
- Get_SB ( pps_disable_deblocking_filter_flag, "pps_disable_deblocking_filter_flag");
- if (!pps_disable_deblocking_filter_flag)
- {
- Skip_SE( "pps_beta_offset_div2");
- Skip_SE( "pps_tc_offset_div2");
- }
- TEST_SB_END();
- TEST_SB_SKIP( "pps_scaling_list_data_present_flag ");
- scaling_list_data();
- TEST_SB_END();
- Skip_SB( "lists_modification_present_flag");
- Skip_UE( "log2_parallel_merge_level_minus2");
- Skip_SB( "slice_segment_header_extension_present_flag");
- TESTELSE_SB_SKIP( "pps_extension_flag");
- Skip_BS(Data_BS_Remain(), "pps_extension_data");
- Trusted_IsNot("(Not supported)"); // Should be skipped, but the detection is too sensible in that case, do not remove it until the detection is adapted
- TESTELSE_SB_ELSE( "pps_extension_flag");
- Mark_1();
- while (Data_BS_Remain())
- Mark_0();
- TESTELSE_SB_END();
- BS_End();
-
- FILLING_BEGIN_PRECISE();
- //NextCode
- //NextCode_Clear();
- //NextCode_Add(0x05);
- //NextCode_Add(0x06);
-
- //Filling
- if (pps_pic_parameter_set_id>=pic_parameter_sets.size())
- pic_parameter_sets.resize(pps_pic_parameter_set_id+1);
- std::vector<pic_parameter_set_struct*>::iterator pic_parameter_sets_Item=pic_parameter_sets.begin()+pps_pic_parameter_set_id;
- delete *pic_parameter_sets_Item; *pic_parameter_sets_Item = new pic_parameter_set_struct(
- (int8u)pps_seq_parameter_set_id,
- (int8u)num_ref_idx_l0_default_active_minus1,
- (int8u)num_ref_idx_l1_default_active_minus1,
- num_extra_slice_header_bits,
- dependent_slice_segments_enabled_flag
- );
- //Autorisation of other streams
- //if (!seq_parameter_sets.empty())
- //{
- // for (int8u Pos=0x01; Pos<=0x06; Pos++)
- // {
- // Streams[Pos].Searching_Payload=true; //Coded slice...
- // if (Streams[0x08].ShouldDuplicate)
- // Streams[Pos].ShouldDuplicate=true;
- // }
- //}
-
- //NextCode
- NextCode_Clear();
-
- //Autorisation of other streams
- Streams[ 0].Searching_Payload=true; //slice_segment_layer
- Streams[ 1].Searching_Payload=true; //slice_segment_layer
- Streams[ 2].Searching_Payload=true; //slice_segment_layer
- Streams[ 3].Searching_Payload=true; //slice_segment_layer
- Streams[ 4].Searching_Payload=true; //slice_layer
- Streams[ 5].Searching_Payload=true; //slice_layer
- Streams[ 6].Searching_Payload=true; //slice_layer
- Streams[ 7].Searching_Payload=true; //slice_layer
- Streams[ 8].Searching_Payload=true; //slice_layer
- Streams[ 9].Searching_Payload=true; //slice_layer
- Streams[16].Searching_Payload=true; //slice_segment_layer
- Streams[17].Searching_Payload=true; //slice_segment_layer
- Streams[18].Searching_Payload=true; //slice_segment_layer
- Streams[19].Searching_Payload=true; //slice_segment_layer
- Streams[20].Searching_Payload=true; //slice_segment_layer
- Streams[21].Searching_Payload=true; //slice_segment_layer
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "35"
-void File_Hevc::access_unit_delimiter()
-{
- Element_Name("access_unit_delimiter");
-
- //Parsing
- BS_Begin();
- Info_S1( 3, pic_type, "pic_type"); Param_Info1(Hevc_pic_type[pic_type]);
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-// Packet "36"
-void File_Hevc::end_of_seq()
-{
- Element_Name("end_of_seq");
-}
-
-//---------------------------------------------------------------------------
-// Packet "37"
-void File_Hevc::end_of_bitstream()
-{
- Element_Name("end_of_bitstream");
-}
-
-//---------------------------------------------------------------------------
-// Packet "38"
-void File_Hevc::filler_data()
-{
- Element_Name("filler_data");
-
- //Parsing
- Skip_XX(Element_Size, "ff_bytes");
-}
-
-//---------------------------------------------------------------------------
-// Packet "39" or "40
-void File_Hevc::sei()
-{
- Element_Name("sei");
-
- //Parsing
- int32u seq_parameter_set_id=(int32u)-1;
- while(Element_Offset+1<Element_Size)
- {
- Element_Begin1("sei message");
- sei_message(seq_parameter_set_id);
- Element_End0();
- }
- BS_Begin();
- Mark_1( );
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-void File_Hevc::sei_message(int32u &seq_parameter_set_id)
-{
- //Parsing
- int32u payloadType=0, payloadSize=0;
- int8u payload_type_byte, payload_size_byte;
- Element_Begin1("sei message header");
- do
- {
- Get_B1 (payload_type_byte, "payload_type_byte");
- payloadType+=payload_type_byte;
- }
- while(payload_type_byte==0xFF);
- do
- {
- Get_B1 (payload_size_byte, "payload_size_byte");
- payloadSize+=payload_size_byte;
- }
- while(payload_size_byte==0xFF);
- Element_End0();
-
- int64u Element_Offset_Save=Element_Offset+payloadSize;
- if (Element_Offset_Save>Element_Size)
- {
- Trusted_IsNot("Wrong size");
- Skip_XX(Element_Size-Element_Offset, "unknown");
- return;
- }
- int64u Element_Size_Save=Element_Size;
- Element_Size=Element_Offset_Save;
- switch (payloadType)
- {
- case 0 : sei_message_buffering_period(seq_parameter_set_id, payloadSize); break;
- case 1 : sei_message_pic_timing(seq_parameter_set_id, payloadSize); break;
- //case 4 : sei_message_user_data_registered_itu_t_t35(); break;
- case 5 : sei_message_user_data_unregistered(payloadSize); break;
- //case 6 : sei_message_recovery_point(); break;
- //case 32 : sei_message_mainconcept(payloadSize); break;
- case 129 : sei_message_active_parameter_sets(); break;
- case 132 : sei_message_decoded_picture_hash(payloadSize); break;
- default :
- Element_Info1("unknown");
- Skip_XX(payloadSize, "data");
- }
- Element_Offset=Element_Offset_Save; //Positionning in the right place.
- Element_Size=Element_Size_Save; //Positionning in the right place.
-}
-
-//---------------------------------------------------------------------------
-// SEI - 0
-void File_Hevc::sei_message_buffering_period(int32u &seq_parameter_set_id, int32u payloadSize)
-{
- Element_Info1("buffering_period");
-
- //Parsing
- if (Element_Offset==Element_Size)
- return; //Nothing to do
- BS_Begin();
- Get_UE (seq_parameter_set_id, "seq_parameter_set_id");
- std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item;
- if (seq_parameter_set_id>=seq_parameter_sets.size() || (*(seq_parameter_set_Item=seq_parameter_sets.begin()+seq_parameter_set_id))==NULL)
- {
- //Not yet present
- Skip_BS(Data_BS_Remain(), "Data (seq_parameter_set is missing)");
- BS_End();
- return;
- }
- bool sub_pic_hrd_params_present_flag=false; //Default
- bool irap_cpb_params_present_flag=((*seq_parameter_set_Item)->vui_parameters && (*seq_parameter_set_Item)->vui_parameters->xxL_Common)?(*seq_parameter_set_Item)->vui_parameters->xxL_Common->sub_pic_hrd_params_present_flag:false;
- if (!sub_pic_hrd_params_present_flag)
- Get_SB (irap_cpb_params_present_flag, "irap_cpb_params_present_flag");
- int8u au_cpb_removal_delay_length_minus1=((*seq_parameter_set_Item)->vui_parameters && (*seq_parameter_set_Item)->vui_parameters->xxL_Common)?(*seq_parameter_set_Item)->vui_parameters->xxL_Common->au_cpb_removal_delay_length_minus1:23;
- int8u dpb_output_delay_length_minus1=((*seq_parameter_set_Item)->vui_parameters && (*seq_parameter_set_Item)->vui_parameters->xxL_Common)?(*seq_parameter_set_Item)->vui_parameters->xxL_Common->dpb_output_delay_length_minus1:23;
- if (irap_cpb_params_present_flag)
- {
- Skip_S4(au_cpb_removal_delay_length_minus1+1, "cpb_delay_offset");
- Skip_S4(dpb_output_delay_length_minus1+1, "dpb_delay_offset");
- }
- Skip_SB( "concatenation_flag");
- Skip_S4(au_cpb_removal_delay_length_minus1+1, "au_cpb_removal_delay_delta_minus1");
- if ((*seq_parameter_set_Item)->NalHrdBpPresentFlag())
- sei_message_buffering_period_xxl((*seq_parameter_set_Item)->vui_parameters?(*seq_parameter_set_Item)->vui_parameters->xxL_Common:NULL, irap_cpb_params_present_flag, (*seq_parameter_set_Item)->vui_parameters->NAL);
- if ((*seq_parameter_set_Item)->VclHrdBpPresentFlag())
- sei_message_buffering_period_xxl((*seq_parameter_set_Item)->vui_parameters?(*seq_parameter_set_Item)->vui_parameters->xxL_Common:NULL, irap_cpb_params_present_flag, (*seq_parameter_set_Item)->vui_parameters->VCL);
- BS_End();
-}
-
-void File_Hevc::sei_message_buffering_period_xxl(seq_parameter_set_struct::vui_parameters_struct::xxl_common* xxL_Common, bool irap_cpb_params_present_flag, seq_parameter_set_struct::vui_parameters_struct::xxl* xxl)
-{
- if (xxL_Common==NULL || xxl==NULL)
- {
- //Problem?
- Skip_BS(Data_BS_Remain(), "Problem?");
- return;
- }
- for (int32u SchedSelIdx=0; SchedSelIdx<xxl->SchedSel.size(); SchedSelIdx++)
- {
- //Get_S4 (xxl->SchedSel[SchedSelIdx].initial_cpb_removal_delay_length_minus1+1, xxl->SchedSel[SchedSelIdx].initial_cpb_removal_delay, "initial_cpb_removal_delay"); Param_Info2(xxl->SchedSel[SchedSelIdx].initial_cpb_removal_delay/90, " ms");
- //Get_S4 (xxl->SchedSel[SchedSelIdx].initial_cpb_removal_delay_length_minus1+1, xxl->SchedSel[SchedSelIdx].initial_cpb_removal_delay_offset, "initial_cpb_removal_delay_offset"); Param_Info2(xxl->SchedSel[SchedSelIdx].initial_cpb_removal_delay_offset/90, " ms");
- Info_S4 (xxL_Common->initial_cpb_removal_delay_length_minus1+1, initial_cpb_removal_delay, "initial_cpb_removal_delay"); Param_Info2(initial_cpb_removal_delay/90, " ms");
- Info_S4 (xxL_Common->initial_cpb_removal_delay_length_minus1+1, initial_cpb_removal_delay_offset, "initial_cpb_removal_delay_offset"); Param_Info2(initial_cpb_removal_delay_offset/90, " ms");
- if (xxL_Common->sub_pic_hrd_params_present_flag || irap_cpb_params_present_flag)
- {
- Info_S4 (xxL_Common->initial_cpb_removal_delay_length_minus1+1, initial_alt_cpb_removal_delay, "initial_alt_cpb_removal_delay"); Param_Info2(initial_alt_cpb_removal_delay/90, " ms");
- Info_S4 (xxL_Common->initial_cpb_removal_delay_length_minus1+1, initial_alt_cpb_removal_delay_offset, "initial_alt_cpb_removal_delay_offset"); Param_Info2(initial_alt_cpb_removal_delay_offset/90, " ms");
- }
- }
-}
-
-//---------------------------------------------------------------------------
-// SEI - 1
-void File_Hevc::sei_message_pic_timing(int32u &seq_parameter_set_id, int32u payloadSize)
-{
- Element_Info1("pic_timing");
-
- //Testing if we can parsing it now. TODO: handle case seq_parameter_set_id is unknown (buffering of message, decoding in slice parsing)
- if (seq_parameter_set_id==(int32u)-1 && seq_parameter_sets.size()==1)
- seq_parameter_set_id=0;
- std::vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item;
- if (seq_parameter_set_id>=seq_parameter_sets.size() || (*(seq_parameter_set_Item=seq_parameter_sets.begin()+seq_parameter_set_id))==NULL)
- {
- //Not yet present
- Skip_BS(Data_BS_Remain(), "Data (seq_parameter_set is missing)");
- return;
- }
-
- //Parsing
- BS_Begin();
- if ((*seq_parameter_set_Item)->vui_parameters?(*seq_parameter_set_Item)->vui_parameters->frame_field_info_present_flag:((*seq_parameter_set_Item)->general_progressive_source_flag && (*seq_parameter_set_Item)->general_interlaced_source_flag))
- {
- Skip_S1(4, "pic_struct");
- Skip_S1(2, "source_scan_type");
- Skip_SB( "duplicate_flag");
- }
- if ((*seq_parameter_set_Item)->CpbDpbDelaysPresentFlag())
- {
- int8u au_cpb_removal_delay_length_minus1=(*seq_parameter_set_Item)->vui_parameters->xxL_Common->au_cpb_removal_delay_length_minus1;
- int8u dpb_output_delay_length_minus1=(*seq_parameter_set_Item)->vui_parameters->xxL_Common->dpb_output_delay_length_minus1;
- bool sub_pic_hrd_params_present_flag=(*seq_parameter_set_Item)->vui_parameters->xxL_Common->sub_pic_hrd_params_present_flag;
- Skip_S4(au_cpb_removal_delay_length_minus1+1, "au_cpb_removal_delay_minus1");
- Skip_S4(dpb_output_delay_length_minus1+1, "pic_dpb_output_delay");
- if (sub_pic_hrd_params_present_flag)
- {
- int8u dpb_output_delay_du_length_minus1=(*seq_parameter_set_Item)->vui_parameters->xxL_Common->dpb_output_delay_du_length_minus1;
- Skip_S4(dpb_output_delay_du_length_minus1+1, "pic_dpb_output_du_delay");
- }
- }
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-// SEI - 5
-void File_Hevc::sei_message_user_data_unregistered(int32u payloadSize)
-{
- Element_Info1("user_data_unregistered");
-
- //Parsing
- int128u uuid_iso_iec_11578;
- Get_GUID(uuid_iso_iec_11578, "uuid_iso_iec_11578");
-
- switch (uuid_iso_iec_11578.hi)
- {
- case 0x214892b89bCC7f42LL : Element_Info1("Ateme");
- sei_message_user_data_unregistered_Ateme(payloadSize-16); break;
- case 0xDB4717b509DEA22CLL : Element_Info1("x265");
- sei_message_user_data_unregistered_x265(payloadSize-16); break;
- default :
- Element_Info1("unknown");
- Skip_XX(payloadSize-16, "data");
- }
-}
-
-//---------------------------------------------------------------------------
-// SEI - 5 - Ateme
-void File_Hevc::sei_message_user_data_unregistered_Ateme(int32u payloadSize)
-{
- //Parsing
- Get_Local(payloadSize, Encoded_Library, "Library name");
-
- //Encoded_Library
- if (Encoded_Library.find(__T("ATEME "))==0)
- {
- size_t Pos=Encoded_Library.find_first_of(__T("0123456789"));
- if (Pos && Encoded_Library[Pos-1]==__T(' '))
- {
- Encoded_Library_Name=Encoded_Library.substr(0, Pos-1);
- Encoded_Library_Version=Encoded_Library.substr(Pos);
- }
- }
-}
-
-//---------------------------------------------------------------------------
-// SEI - 5 - x265
-void File_Hevc::sei_message_user_data_unregistered_x265(int32u payloadSize)
-{
- //Parsing
- Ztring Data;
- Peek_Local(payloadSize, Data);
- if (Data.size()!=payloadSize && Data.size()+1!=payloadSize)
- {
- Skip_XX(payloadSize, "Unknown");
- return; //This is not a text string
- }
- size_t Data_Pos_Before=0;
- size_t Loop=0;
- do
- {
- size_t Data_Pos=Data.find(__T(" - "), Data_Pos_Before);
- if (Data_Pos==std::string::npos)
- Data_Pos=Data.size();
- if (Data.find(__T("options: "), Data_Pos_Before)==Data_Pos_Before)
- {
- Element_Begin1("options");
- size_t Options_Pos_Before=Data_Pos_Before;
- Encoded_Library_Settings.clear();
- while (Options_Pos_Before!=Data.size())
- {
- size_t Options_Pos=Data.find(__T(" "), Options_Pos_Before);
- if (Options_Pos==std::string::npos)
- Options_Pos=Data.size();
- Ztring option;
- Get_Local (Options_Pos-Options_Pos_Before, option, "option");
- Options_Pos_Before=Options_Pos;
- while (Options_Pos_Before!=Data.size())
- {
- Ztring Separator;
- Peek_Local(1, Separator);
- if (Separator==__T(" "))
- {
- Skip_Local(1, "separator");
- Options_Pos_Before+=1;
- }
- else
- break;
- }
-
- //Filling
- if (option!=__T("options:") && !(!option.empty() && option[0]>=__T('0') && option[0]<=__T('9')) && option.find(__T("fps="))!=0 && option.find(__T("bitdepth="))!=0) //Ignoring redundant information e.g. width, height, frame rate, bit depth
- {
- if (!Encoded_Library_Settings.empty())
- Encoded_Library_Settings+=__T(" / ");
- Encoded_Library_Settings+=option;
- }
- }
- Element_End0();
- }
- else
- {
- Ztring Value;
- Get_Local(Data_Pos-Data_Pos_Before, Value, "data");
-
- //Saving
- if (Loop==0)
- {
- //Cleaning a little the value
- while (!Value.empty() && Value[0]<0x30)
- Value.erase(Value.begin());
- while (!Value.empty() && Value[Value.size()-1]<0x30)
- Value.erase(Value.end()-1);
- size_t Value_Pos=Value.find(__T(" "));
- if (Value_Pos!=string::npos)
- Value.resize(Value_Pos);
- Encoded_Library=Value;
- }
- if (Loop==1 && Encoded_Library.find(__T("x265"))==0)
- {
- size_t Value_Pos=Value.find(__T(" 8bpp"));
- if (Value_Pos!=string::npos)
- Value.resize(Value_Pos);
-
- Encoded_Library+=__T(" - ");
- Encoded_Library+=Value;
- }
- }
- Data_Pos_Before=Data_Pos;
- if (Data_Pos_Before+3<=Data.size())
- {
- Skip_Local(3, "separator");
- Data_Pos_Before+=3;
- }
-
- Loop++;
- }
- while (Data_Pos_Before!=Data.size());
-
- //Encoded_Library
- if (Encoded_Library.find(__T("x265 - "))==0)
- {
- Encoded_Library_Name=__T("x265");
- Encoded_Library_Version=Encoded_Library.SubString(__T("x265 - "), Ztring());
- }
- else
- Encoded_Library_Name=Encoded_Library;
-}
-
-//---------------------------------------------------------------------------
-void File_Hevc::sei_message_active_parameter_sets()
-{
- Element_Info1("active_parameter_sets");
-
- //Parsing
- int32u num_sps_ids_minus1;
- BS_Begin();
- Skip_S1(4, "active_video_parameter_set_id");
- Skip_SB( "self_contained_cvs_flag");
- Skip_SB( "no_parameter_set_update_flag");
- Get_UE ( num_sps_ids_minus1, "num_sps_ids_minus1");
- for (int32u i=0; i<=num_sps_ids_minus1; ++i)
- {
- Skip_UE( "active_seq_parameter_set_id");
- }
- BS_End();
-}
-
-//---------------------------------------------------------------------------
-void File_Hevc::sei_message_decoded_picture_hash(int32u payloadSize)
-{
- Element_Info1("decoded_picture_hash");
-
- //Parsing
- int8u hash_type;
- Get_B1 (hash_type, "hash_type");
- for (int8u cIdx=0; cIdx<(chroma_format_idc?3:1); cIdx++)
- switch (hash_type)
- {
- case 0 : // md5
- Skip_XX(16, "md5");
- break;
- case 1 : // crc
- Skip_XX( 2, "crc");
- break;
- case 2 : // checksum
- Skip_XX( 4, "checksum");
- break;
- default : //
- Skip_XX((Element_Size-1)/(chroma_format_idc?1:3), "unknown");
- break;
- }
-}
-
-//***************************************************************************
-// Sub-elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Hevc::slice_segment_header()
-{
- Element_Begin1("slice_segment_header");
-
- //Parsing
- bool dependent_slice_segment_flag=false;
- Get_SB ( first_slice_segment_in_pic_flag, "first_slice_segment_in_pic_flag");
- if (RapPicFlag)
- Skip_SB( "no_output_of_prior_pics_flag");
- Get_UE ( slice_pic_parameter_set_id, "slice_pic_parameter_set_id");
- std::vector<pic_parameter_set_struct*>::iterator pic_parameter_set_Item;
- if (slice_pic_parameter_set_id>=pic_parameter_sets.size() || (*(pic_parameter_set_Item=pic_parameter_sets.begin()+slice_pic_parameter_set_id))==NULL)
- {
- //Not yet present
- Skip_BS(Data_BS_Remain(), "Data (pic_parameter_set is missing)");
- Element_End0();
- slice_pic_parameter_set_id=(int32u)-1;
- slice_type=(int32u)-1;
- return;
- }
- if (!first_slice_segment_in_pic_flag)
- {
- if (!MustParse_VPS_SPS_PPS_FromFlv && (*pic_parameter_set_Item)->dependent_slice_segments_enabled_flag)
- Get_SB (dependent_slice_segment_flag, "dependent_slice_segment_flag");
- //Skip_BS(Ceil( Log2( PicSizeInCtbsY ) ), "slice_segment_address");
- Skip_BS(Data_BS_Remain(), "(ToDo)");
- Element_End0();
- slice_type=(int32u)-1;
- return;
- }
- if (!dependent_slice_segment_flag)
- {
- if (!MustParse_VPS_SPS_PPS_FromFlv)
- Skip_S1((*pic_parameter_set_Item)->num_extra_slice_header_bits, "slice_reserved_flags");
- Get_UE (slice_type, "slice_type"); Param_Info1(Hevc_slice_type(slice_type));
- }
- //TODO...
- Skip_BS(Data_BS_Remain(), "(ToDo)");
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Hevc::profile_tier_level(int8u maxNumSubLayersMinus1)
-{
- Element_Begin1("profile_tier_level");
-
- //Parsing
- std::vector<bool>sub_layer_profile_present_flags, sub_layer_level_present_flags;
- Get_S1 (2, profile_space, "general_profile_space");
- Get_SB ( tier_flag, "general_tier_flag");
- Get_S1 (5, profile_idc, "general_profile_idc");
- Element_Begin1("general_profile_compatibility_flags");
- for (int8u profile_pos=0; profile_pos<32; profile_pos++)
- if (profile_pos==profile_idc)
- {
- bool general_profile_compatibility_flag;
- Get_SB ( general_profile_compatibility_flag, "general_profile_compatibility_flag");
- //if (!general_profile_compatibility_flag && !profile_space) //found some files without this flag, ignoring the test for the moment (not really important)
- // Trusted_IsNot("general_profile_compatibility_flag not valid");
- }
- else
- Skip_SB( "general_profile_compatibility_flag");
- Element_End0();
- Get_SB ( general_progressive_source_flag, "general_progressive_source_flag");
- Get_SB ( general_interlaced_source_flag, "general_interlaced_source_flag");
- Skip_SB( "general_non_packed_constraint_flag");
- Get_SB ( general_frame_only_constraint_flag, "general_frame_only_constraint_flag");
- Skip_S8(44, "general_reserved_zero_44bits");
- Get_S1 (8, level_idc, "general_level_idc");
- for (int32u SubLayerPos=0; SubLayerPos<maxNumSubLayersMinus1; SubLayerPos++)
- {
- Element_Begin1("SubLayer");
- bool sub_layer_profile_present_flag, sub_layer_level_present_flag;
- Get_SB ( sub_layer_profile_present_flag, "sub_layer_profile_present_flag");
- Get_SB ( sub_layer_level_present_flag, "sub_layer_level_present_flag");
- sub_layer_profile_present_flags.push_back(sub_layer_profile_present_flag);
- sub_layer_level_present_flags.push_back(sub_layer_level_present_flag);
- Element_End0();
- }
- if (maxNumSubLayersMinus1)
- for(int32u SubLayerPos=maxNumSubLayersMinus1; SubLayerPos<8; SubLayerPos++)
- Skip_S1(2, "reserved_zero_2bits");
- for (int32u SubLayerPos=0; SubLayerPos<maxNumSubLayersMinus1; SubLayerPos++)
- {
- Element_Begin1("SubLayer");
- if (sub_layer_profile_present_flags[SubLayerPos])
- {
- Skip_S1(2, "sub_layer_profile_space");
- Skip_SB( "sub_layer_tier_flag");
- Skip_S1(5, "sub_layer_profile_idc");
- Skip_S4(32, "sub_layer_profile_compatibility_flags");
- Skip_SB( "sub_layer_progressive_source_flag");
- Skip_SB( "sub_layer_interlaced_source_flag");
- Skip_SB( "sub_layer_non_packed_constraint_flag");
- Skip_SB( "sub_layer_frame_only_constraint_flag");
- Skip_S8(44, "sub_layer_reserved_zero_44bits");
- }
- if (sub_layer_level_present_flags[SubLayerPos])
- {
- Skip_S1(8, "sub_layer_level_idc");
- }
- Element_End0();
- }
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Hevc::short_term_ref_pic_sets(int8u num_short_term_ref_pic_sets)
-{
- Element_Begin1("short_term_ref_pic_sets");
- int32u num_pics=0;
-
- for (int32u stRpsIdx=0; stRpsIdx<num_short_term_ref_pic_sets; stRpsIdx++)
- {
- Element_Begin1("short_term_ref_pic_set");
- bool inter_ref_pic_set_prediction_flag=false;
- if (stRpsIdx)
- Get_SB (inter_ref_pic_set_prediction_flag, "inter_ref_pic_set_prediction_flag");
- if (inter_ref_pic_set_prediction_flag)
- {
- int32u delta_idx_minus1=0, abs_delta_rps_minus1;
- bool delta_rps_sign;
- if (stRpsIdx==num_short_term_ref_pic_sets)
- Get_UE (delta_idx_minus1, "delta_idx_minus1");
- if (delta_idx_minus1+1>stRpsIdx)
- {
- Skip_BS(Data_BS_Remain(), "(Problem)");
- Element_End0();
- Element_End0();
- return;
- }
- Get_SB ( delta_rps_sign, "delta_rps_sign");
- Get_UE ( abs_delta_rps_minus1, "abs_delta_rps_minus1");
- int32u num_pics_new=0;
- for(int32u pic_pos=0 ; pic_pos<=num_pics; pic_pos++)
- {
- TESTELSE_SB_SKIP( "used_by_curr_pic_flag");
- num_pics_new++;
- TESTELSE_SB_ELSE( "used_by_curr_pic_flag");
- bool use_delta_flag;
- Get_SB (use_delta_flag, "use_delta_flag");
- if (use_delta_flag)
- num_pics_new++;
- TESTELSE_SB_END();
- }
- num_pics=num_pics_new;
- }
- else
- {
- int32u num_negative_pics, num_positive_pics;
- Get_UE (num_negative_pics, "num_negative_pics");
- Get_UE (num_positive_pics, "num_positive_pics");
- num_pics=num_negative_pics+num_positive_pics;
- for (int32u i=0; i<num_negative_pics; i++)
- {
- Skip_UE( "delta_poc_s0_minus1");
- Skip_SB( "used_by_curr_pic_s0_flag");
- }
- for (int32u i=0; i<num_positive_pics; i++)
- {
- Skip_UE( "delta_poc_s1_minus1");
- Skip_SB( "used_by_curr_pic_s1_flag");
- }
- }
- Element_End0();
- }
-
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Hevc::vui_parameters(std::vector<video_parameter_set_struct*>::iterator video_parameter_set_Item, seq_parameter_set_struct::vui_parameters_struct* &vui_parameters_Item_)
-{
- //Parsing
- seq_parameter_set_struct::vui_parameters_struct::xxl_common *xxL_Common=NULL;
- seq_parameter_set_struct::vui_parameters_struct::xxl *NAL = NULL, *VCL = NULL;
- int32u num_units_in_tick = (int32u)-1, time_scale = (int32u)-1;
- int16u sar_width=(int16u)-1, sar_height=(int16u)-1;
- int8u aspect_ratio_idc=0, video_format=5, video_full_range_flag=0, colour_primaries=2, transfer_characteristics=2, matrix_coefficients=2;
- bool aspect_ratio_info_present_flag, video_signal_type_present_flag, frame_field_info_present_flag, colour_description_present_flag=false, timing_info_present_flag;
- TEST_SB_GET (aspect_ratio_info_present_flag, "aspect_ratio_info_present_flag");
- Get_S1 (8, aspect_ratio_idc, "aspect_ratio_idc"); Param_Info1C((aspect_ratio_idc<Avc_PixelAspectRatio_Size), Avc_PixelAspectRatio[aspect_ratio_idc]);
- if (aspect_ratio_idc==0xFF)
- {
- Get_S2 (16, sar_width, "sar_width");
- Get_S2 (16, sar_height, "sar_height");
- }
- TEST_SB_END();
- TEST_SB_SKIP( "overscan_info_present_flag");
- Skip_SB( "overscan_appropriate_flag");
- TEST_SB_END();
- TEST_SB_GET (video_signal_type_present_flag, "video_signal_type_present_flag");
- Get_S1 (3, video_format, "video_format"); Param_Info1(Avc_video_format[video_format]);
- Get_S1 (1, video_full_range_flag, "video_full_range_flag"); Param_Info1(Avc_video_full_range[video_full_range_flag]);
- TEST_SB_GET (colour_description_present_flag, "colour_description_present_flag");
- Get_S1 (8, colour_primaries, "colour_primaries"); Param_Info1(Mpegv_colour_primaries(colour_primaries));
- Get_S1 (8, transfer_characteristics, "transfer_characteristics"); Param_Info1(Mpegv_transfer_characteristics(transfer_characteristics));
- Get_S1 (8, matrix_coefficients, "matrix_coefficients"); Param_Info1(Mpegv_matrix_coefficients(matrix_coefficients));
- TEST_SB_END();
- TEST_SB_END();
- TEST_SB_SKIP( "chroma_loc_info_present_flag");
- Skip_UE( "chroma_sample_loc_type_top_field");
- Skip_UE( "chroma_sample_loc_type_bottom_field");
- TEST_SB_END();
- Skip_SB( "neutral_chroma_indication_flag");
- Skip_SB( "field_seq_flag");
- Get_SB ( frame_field_info_present_flag, "frame_field_info_present_flag");
- TEST_SB_SKIP( "default_display_window_flag ");
- Skip_UE( "def_disp_win_left_offset");
- Skip_UE( "def_disp_win_right_offset");
- Skip_UE( "def_disp_win_top_offset");
- Skip_UE( "def_disp_win_bottom_offset");
- TEST_SB_END();
- TEST_SB_GET (timing_info_present_flag, "timing_info_present_flag");
- Get_S4 (32, num_units_in_tick, "num_units_in_tick");
- Get_S4 (32, time_scale, "time_scale");
- TEST_SB_SKIP( "vui_poc_proportional_to_timing_flag");
- Skip_UE( "vui_num_ticks_poc_diff_one_minus1");
- TEST_SB_END();
- TEST_SB_SKIP( "hrd_parameters_present_flag");
- hrd_parameters(true, (*video_parameter_set_Item)->vps_max_sub_layers_minus1, xxL_Common, NAL, VCL);
- TEST_SB_END();
- TEST_SB_END();
- TEST_SB_SKIP( "bitstream_restriction_flag");
- Skip_SB( "tiles_fixed_structure_flag");
- Skip_SB( "motion_vectors_over_pic_boundaries_flag");
- Skip_SB( "restricted_ref_pic_lists_flag");
- Skip_UE( "min_spatial_segmentation_idc");
- Skip_UE( "max_bytes_per_pic_denom");
- Skip_UE( "max_bits_per_min_cu_denom");
- Skip_UE( "log2_max_mv_length_horizontal");
- Skip_UE( "log2_max_mv_length_vertical");
- TEST_SB_END();
-
- FILLING_BEGIN();
- vui_parameters_Item_ = new seq_parameter_set_struct::vui_parameters_struct(
- NAL,
- VCL,
- xxL_Common,
- num_units_in_tick,
- time_scale,
- sar_width,
- sar_height,
- aspect_ratio_idc,
- video_format,
- video_full_range_flag,
- colour_primaries,
- transfer_characteristics,
- matrix_coefficients,
- aspect_ratio_info_present_flag,
- video_signal_type_present_flag,
- frame_field_info_present_flag,
- colour_description_present_flag,
- timing_info_present_flag
- );
- FILLING_ELSE();
- delete xxL_Common;
- delete NAL;
- delete VCL;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Hevc::hrd_parameters(bool commonInfPresentFlag, int8u maxNumSubLayersMinus1, seq_parameter_set_struct::vui_parameters_struct::xxl_common* &xxL_Common, seq_parameter_set_struct::vui_parameters_struct::xxl* &NAL, seq_parameter_set_struct::vui_parameters_struct::xxl* &VCL)
-{
- //Parsing
- int8u bit_rate_scale=0, cpb_size_scale=0, du_cpb_removal_delay_increment_length_minus1=0, dpb_output_delay_du_length_minus1=0, initial_cpb_removal_delay_length_minus1=0, au_cpb_removal_delay_length_minus1=0, dpb_output_delay_length_minus1=0;
- bool nal_hrd_parameters_present_flag=false, vcl_hrd_parameters_present_flag=false, sub_pic_hrd_params_present_flag=false;
- if (commonInfPresentFlag)
- {
- Get_SB (nal_hrd_parameters_present_flag, "nal_hrd_parameters_present_flag");
- Get_SB (vcl_hrd_parameters_present_flag, "vcl_hrd_parameters_present_flag");
- if (nal_hrd_parameters_present_flag || vcl_hrd_parameters_present_flag)
- {
- TEST_SB_GET (sub_pic_hrd_params_present_flag, "sub_pic_hrd_params_present_flag");
- Skip_S1(8, "tick_divisor_minus2");
- Get_S1 (5, du_cpb_removal_delay_increment_length_minus1, "du_cpb_removal_delay_increment_length_minus1");
- Skip_SB( "sub_pic_cpb_params_in_pic_timing_sei_flag");
- Get_S1 (5, dpb_output_delay_du_length_minus1, "dpb_output_delay_du_length_minus1");
- TEST_SB_END();
- Get_S1 (4, bit_rate_scale, "bit_rate_scale");
- Get_S1 (4, cpb_size_scale, "cpb_size_scale");
- if (sub_pic_hrd_params_present_flag)
- Skip_S1(4, "cpb_size_du_scale");
- Get_S1 (5, initial_cpb_removal_delay_length_minus1, "initial_cpb_removal_delay_length_minus1");
- Get_S1 (5, au_cpb_removal_delay_length_minus1, "au_cpb_removal_delay_length_minus1");
- Get_S1 (5, dpb_output_delay_length_minus1, "dpb_output_delay_length_minus1");
- }
- }
-
- for (int8u NumSubLayer=0; NumSubLayer<=maxNumSubLayersMinus1; NumSubLayer++)
- {
- int32u cpb_cnt_minus1=0;
- bool fixed_pic_rate_general_flag, fixed_pic_rate_within_cvs_flag=true, low_delay_hrd_flag=false;
- Get_SB (fixed_pic_rate_general_flag, "fixed_pic_rate_general_flag");
- if (!fixed_pic_rate_general_flag)
- Get_SB (fixed_pic_rate_within_cvs_flag, "fixed_pic_rate_within_cvs_flag");
- if (fixed_pic_rate_within_cvs_flag)
- Skip_UE( "elemental_duration_in_tc_minus1");
- else
- Get_SB (low_delay_hrd_flag, "low_delay_hrd_flag");
- if (!low_delay_hrd_flag)
- {
- Get_UE (cpb_cnt_minus1, "cpb_cnt_minus1");
- if (cpb_cnt_minus1>31)
- {
- Trusted_IsNot("cpb_cnt_minus1 too high");
- cpb_cnt_minus1=0;
- return;
- }
- }
- if (nal_hrd_parameters_present_flag || vcl_hrd_parameters_present_flag)
- xxL_Common=new seq_parameter_set_struct::vui_parameters_struct::xxl_common(
- sub_pic_hrd_params_present_flag,
- du_cpb_removal_delay_increment_length_minus1,
- dpb_output_delay_du_length_minus1,
- initial_cpb_removal_delay_length_minus1,
- au_cpb_removal_delay_length_minus1,
- dpb_output_delay_length_minus1
- );
- if (nal_hrd_parameters_present_flag)
- sub_layer_hrd_parameters(xxL_Common, bit_rate_scale, cpb_size_scale, cpb_cnt_minus1, NAL); //TODO: save HRD per NumSubLayer
- if (vcl_hrd_parameters_present_flag)
- sub_layer_hrd_parameters(xxL_Common, bit_rate_scale, cpb_size_scale, cpb_cnt_minus1, VCL); //TODO: save HRD per NumSubLayer
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Hevc::sub_layer_hrd_parameters(seq_parameter_set_struct::vui_parameters_struct::xxl_common* xxL_Common, int8u bit_rate_scale, int8u cpb_size_scale, int32u cpb_cnt_minus1, seq_parameter_set_struct::vui_parameters_struct::xxl* &hrd_parameters_Item_)
-{
- //Parsing
- vector<seq_parameter_set_struct::vui_parameters_struct::xxl::xxl_data> SchedSel;
- SchedSel.reserve(cpb_cnt_minus1 + 1);
- for (int8u SchedSelIdx = 0; SchedSelIdx <= cpb_cnt_minus1; ++SchedSelIdx)
- {
- Element_Begin1("ShedSel");
- int64u bit_rate_value, cpb_size_value;
- int32u bit_rate_value_minus1, cpb_size_value_minus1;
- bool cbr_flag;
- Get_UE (bit_rate_value_minus1, "bit_rate_value_minus1");
- bit_rate_value = (int64u)((bit_rate_value_minus1 + 1)*pow(2.0, 6 + bit_rate_scale)); Param_Info2(bit_rate_value, " bps");
- Get_UE (cpb_size_value_minus1, "cpb_size_value_minus1");
- cpb_size_value = (int64u)((cpb_size_value_minus1 + 1)*pow(2.0, 4 + cpb_size_scale)); Param_Info2(cpb_size_value, " bits");
- if (xxL_Common->sub_pic_hrd_params_present_flag)
- {
- Skip_UE( "cpb_size_du_value_minus1");
- Skip_UE( "bit_rate_du_value_minus1");
- }
- Get_SB (cbr_flag, "cbr_flag");
- Element_End0();
-
- FILLING_BEGIN();
- SchedSel.push_back(seq_parameter_set_struct::vui_parameters_struct::xxl::xxl_data(
- bit_rate_value,
- cpb_size_value,
- cbr_flag
- ));
- FILLING_END();
- }
-
- //Validity test
- if (!Element_IsOK() || (SchedSel.size() == 1 && SchedSel[0].bit_rate_value == 64))
- {
- return; //We do not trust this kind of data
- }
-
- //Filling
- hrd_parameters_Item_=new seq_parameter_set_struct::vui_parameters_struct::xxl(
- SchedSel
- );
-}
-
-//---------------------------------------------------------------------------
-void File_Hevc::scaling_list_data()
-{
- for(int8u sizeId=0; sizeId<4; sizeId++)
- for (int8u matrixId = 0; matrixId<((sizeId == 3) ? 2 : 6); matrixId++)
- {
- bool scaling_list_pred_mode_flag;
- Get_SB (scaling_list_pred_mode_flag, "scaling_list_pred_mode_flag");
- if(!scaling_list_pred_mode_flag)
- Skip_UE( "scaling_list_pred_matrix_id_delta");
- else
- {
- //nextCoef = 8
- size_t coefNum=std::min(64, (1<<(4+(sizeId<<1))));
- if( sizeId > 1 )
- {
- Skip_SE( "scaling_list_dc_coef_minus8"); //[ sizeId ? 2 ][ matrixId ] se(v)
- //nextCoef = scaling_list_dc_coef_minus8[ sizeId ? 2 ][ matrixId ] + 8
- }
- for(size_t i=0; i<coefNum; i++)
- {
- Skip_SE( "scaling_list_delta_coef");
- //nextCoef = ( nextCoef + scaling_list_delta_coef + 256 ) % 256
- //ScalingList[ sizeId ][ matrixId ][ i ] = nextCoef
- }
- }
- }
-}
-
-//***************************************************************************
-// Specific
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Hevc::VPS_SPS_PPS()
-{
- if (MustParse_VPS_SPS_PPS_FromMatroska || MustParse_VPS_SPS_PPS_FromFlv)
- {
- if (Element_Size>=5
- && Buffer[Buffer_Offset ]==0x01
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0x00
- && Buffer[Buffer_Offset+3]==0x00
- && Buffer[Buffer_Offset+4]==0xFF) //Trying to detect old proposal of the form of Matroska implementation
- return VPS_SPS_PPS_FromMatroska();
-
- MustParse_VPS_SPS_PPS_FromMatroska=false;
- MustParse_VPS_SPS_PPS_FromFlv=false;
- }
-
- //Parsing
- int64u general_constraint_indicator_flags;
- int32u general_profile_compatibility_flags;
- int8u configurationVersion;
- int8u chromaFormat, bitDepthLumaMinus8, bitDepthChromaMinus8;
- int8u general_profile_space, general_profile_idc, general_level_idc;
- int8u numOfArrays, constantFrameRate, numTemporalLayers;
- bool general_tier_flag, temporalIdNested;
- Get_B1 (configurationVersion, "configurationVersion");
- BS_Begin();
- Get_S1 (2, general_profile_space, "general_profile_space");
- Get_SB ( general_tier_flag, "general_tier_flag");
- Get_S1 (5, general_profile_idc, "general_profile_idc");
- BS_End();
- Get_B4 (general_profile_compatibility_flags, "general_profile_compatibility_flags");
- Get_B6 (general_constraint_indicator_flags, "general_constraint_indicator_flags");
- Get_B1 (general_level_idc, "general_level_idc");
- BS_Begin();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Skip_S2(12, "min_spatial_segmentation_idc");
- BS_End();
- BS_Begin();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Skip_S1(2, "parallelismType");
- BS_End();
- BS_Begin();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Get_S1 (2, chromaFormat, "chromaFormat");
- BS_End();
- BS_Begin();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Get_S1 (3, bitDepthLumaMinus8, "bitDepthLumaMinus8");
- BS_End();
- BS_Begin();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Mark_1_NoTrustError();
- Get_S1 (3, bitDepthChromaMinus8, "bitDepthChromaMinus8");
- BS_End();
- Skip_B2( "avgFrameRate");
- BS_Begin();
- Get_S1 (2, constantFrameRate, "constantFrameRate");
- Get_S1 (3, numTemporalLayers, "numTemporalLayers");
- Get_SB ( temporalIdNested, "temporalIdNested");
- Get_S1 (2, lengthSizeMinusOne, "lengthSizeMinusOne");
- BS_End();
- Get_B1 (numOfArrays, "numOfArrays");
- for (size_t ArrayPos=0; ArrayPos<numOfArrays; ArrayPos++)
- {
- Element_Begin1("Array");
- int16u numNalus;
- int8u NAL_unit_type;
- BS_Begin();
- Skip_SB( "array_completeness");
- Mark_0_NoTrustError();
- Get_S1 (6, NAL_unit_type, "NAL_unit_type");
- BS_End();
- Get_B2 (numNalus, "numNalus");
- for (size_t NaluPos=0; NaluPos<numNalus; NaluPos++)
- {
- Element_Begin1("nalUnit");
- int16u nalUnitLength;
- Get_B2 (nalUnitLength, "nalUnitLength");
- if (nalUnitLength<2 || Element_Offset+nalUnitLength>Element_Size)
- {
- Trusted_IsNot("Size is wrong");
- break; //There is an error
- }
-
- //Header
- int8u nal_unit_type, nuh_temporal_id_plus1;
- BS_Begin();
- Mark_0 ();
- Get_S1 (6, nal_unit_type, "nal_unit_type");
- Get_S1 (6, nuh_layer_id, "nuh_layer_id");
- Get_S1 (3, nuh_temporal_id_plus1, "nuh_temporal_id_plus1");
- if (nuh_temporal_id_plus1==0)
- Trusted_IsNot("nuh_temporal_id_plus1 is invalid");
- BS_End();
-
- //Data
- int64u Element_Offset_Save=Element_Offset;
- int64u Element_Size_Save=Element_Size;
- Buffer_Offset+=(size_t)Element_Offset_Save;
- Element_Offset=0;
- Element_Size=nalUnitLength-2;
- Element_Code=nal_unit_type;
- Data_Parse();
- Buffer_Offset-=(size_t)Element_Offset_Save;
- Element_Offset=Element_Offset_Save+nalUnitLength-2;
- Element_Size=Element_Size_Save;
-
- Element_End0();
- }
- Element_End0();
- }
-
- MustParse_VPS_SPS_PPS=false;
- FILLING_BEGIN_PRECISE();
- Accept("HEVC");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Hevc::VPS_SPS_PPS_FromMatroska()
-{
- //Parsing
- int8u Profile, Level, vid_parameter_set_count, seq_parameter_set_count, pic_parameter_set_count;
- if (SizedBlocks)
- Skip_B1( "Version");
- Get_B1 (Profile, "Profile");
- Skip_B1( "Compatible profile");
- Get_B1 (Level, "Level");
- BS_Begin();
- Skip_S1(6, "Reserved");
- Get_S1 (2, lengthSizeMinusOne, "Size of NALU length minus 1");
- Skip_S1(3, "Reserved");
- Get_S1 (5, vid_parameter_set_count, MustParse_VPS_SPS_PPS_FromFlv?"vid_parameter_set+seq_parameter_set count":"vid_parameter_set count");
- BS_End();
- for (int8u Pos=0; Pos<vid_parameter_set_count; Pos++)
- {
- Element_Begin1("nalUnit");
- int16u nalUnitLength;
- Get_B2 (nalUnitLength, "nalUnitLength");
- if (nalUnitLength<2 || Element_Offset+nalUnitLength>Element_Size)
- {
- Trusted_IsNot("Size is wrong");
- break; //There is an error
- }
-
- //Header
- int8u nal_unit_type, nuh_temporal_id_plus1;
- BS_Begin();
- Mark_0 ();
- Get_S1 (6, nal_unit_type, "nal_unit_type");
- Get_S1 (6, nuh_layer_id, "nuh_layer_id");
- Get_S1 (3, nuh_temporal_id_plus1, "nuh_temporal_id_plus1");
- if (nuh_temporal_id_plus1==0)
- Trusted_IsNot("nuh_temporal_id_plus1 is invalid");
- BS_End();
-
- //Data
- int64u Element_Offset_Save=Element_Offset;
- int64u Element_Size_Save=Element_Size;
- Buffer_Offset+=(size_t)Element_Offset_Save;
- Element_Offset=0;
- Element_Size=nalUnitLength-2;
- Element_Code=nal_unit_type;
- Data_Parse();
- Buffer_Offset-=(size_t)Element_Offset_Save;
- Element_Offset=Element_Offset_Save+nalUnitLength-2;
- Element_Size=Element_Size_Save;
-
- Element_End0();
- }
- if (MustParse_VPS_SPS_PPS_FromFlv)
- seq_parameter_set_count=0;
- else
- {
- BS_Begin();
- Skip_S1(3, "Reserved");
- Get_S1 (5, seq_parameter_set_count, "seq_parameter_set count");
- BS_End();
- }
- for (int8u Pos=0; Pos<seq_parameter_set_count; Pos++)
- {
- Element_Begin1("nalUnit");
- int16u nalUnitLength;
- Get_B2 (nalUnitLength, "nalUnitLength");
- if (nalUnitLength<2 || Element_Offset+nalUnitLength>Element_Size)
- {
- Trusted_IsNot("Size is wrong");
- break; //There is an error
- }
-
- //Header
- int8u nal_unit_type, nuh_temporal_id_plus1;
- BS_Begin();
- Mark_0 ();
- Get_S1 (6, nal_unit_type, "nal_unit_type");
- Get_S1 (6, nuh_layer_id, "nuh_layer_id");
- Get_S1 (3, nuh_temporal_id_plus1, "nuh_temporal_id_plus1");
- if (nuh_temporal_id_plus1==0)
- Trusted_IsNot("nuh_temporal_id_plus1 is invalid");
- BS_End();
-
- //Data
- int64u Element_Offset_Save=Element_Offset;
- int64u Element_Size_Save=Element_Size;
- Buffer_Offset+=(size_t)Element_Offset_Save;
- Element_Offset=0;
- Element_Size=nalUnitLength-2;
- Element_Code=nal_unit_type;
- Data_Parse();
- Buffer_Offset-=(size_t)Element_Offset_Save;
- Element_Offset=Element_Offset_Save+nalUnitLength-2;
- Element_Size=Element_Size_Save;
-
- Element_End0();
- }
- Get_B1 (pic_parameter_set_count, "pic_parameter_set count");
- for (int8u Pos=0; Pos<pic_parameter_set_count; Pos++)
- {
- Element_Begin1("nalUnit");
- int16u nalUnitLength;
- Get_B2 (nalUnitLength, "nalUnitLength");
- if (nalUnitLength<2 || Element_Offset+nalUnitLength>Element_Size)
- {
- Trusted_IsNot("Size is wrong");
- break; //There is an error
- }
-
- //Header
- int8u nal_unit_type, nuh_temporal_id_plus1;
- BS_Begin();
- Mark_0 ();
- Get_S1 (6, nal_unit_type, "nal_unit_type");
- Get_S1 (6, nuh_layer_id, "nuh_layer_id");
- Get_S1 (3, nuh_temporal_id_plus1, "nuh_temporal_id_plus1");
- if (nuh_temporal_id_plus1==0)
- Trusted_IsNot("nuh_temporal_id_plus1 is invalid");
- BS_End();
-
- //Data
- int64u Element_Offset_Save=Element_Offset;
- int64u Element_Size_Save=Element_Size;
- Buffer_Offset+=(size_t)Element_Offset_Save;
- Element_Offset=0;
- Element_Size=nalUnitLength-2;
- Element_Code=nal_unit_type;
- Data_Parse();
- Buffer_Offset-=(size_t)Element_Offset_Save;
- Element_Offset=Element_Offset_Save+nalUnitLength-2;
- Element_Size=Element_Size_Save;
-
- Element_End0();
- }
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "Padding?");
-
- //Filling
- MustParse_VPS_SPS_PPS=false;
- FILLING_BEGIN_PRECISE();
- Accept("HEVC");
- FILLING_END();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_HEVC_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Hevc.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Hevc.h
deleted file mode 100644
index e47d29caf..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Hevc.h
+++ /dev/null
@@ -1,451 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_HevcH
-#define MediaInfo_HevcH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Hevc
-//***************************************************************************
-
-class File_Hevc : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
- bool FrameIsAlwaysComplete;
- bool MustParse_VPS_SPS_PPS;
- bool MustParse_VPS_SPS_PPS_FromMatroska;
- bool MustParse_VPS_SPS_PPS_FromFlv;
- bool SizedBlocks;
-
- //Constructor/Destructor
- File_Hevc();
- ~File_Hevc();
-
-private :
- File_Hevc(const File_Hevc &File_Hevc); //No copy
-
- //Structures - video_parameter_set
- struct video_parameter_set_struct
- {
- #if MEDIAINFO_DEMUX
- int8u* AnnexB_Buffer;
- size_t AnnexB_Buffer_Size;
- #endif //MEDIAINFO_DEMUX
- int8u vps_max_sub_layers_minus1;
-
- //Constructor/Destructor
- video_parameter_set_struct(int8u vps_max_sub_layers_minus1_)
- :
- #if MEDIAINFO_DEMUX
- AnnexB_Buffer(NULL),
- AnnexB_Buffer_Size(0),
- #endif //MEDIAINFO_DEMUX
- vps_max_sub_layers_minus1(vps_max_sub_layers_minus1_)
- {
- }
-
- ~video_parameter_set_struct()
- {
- #if MEDIAINFO_DEMUX
- delete[] AnnexB_Buffer;
- #endif //MEDIAINFO_DEMUX
- }
-
- private:
- video_parameter_set_struct &operator=(const video_parameter_set_struct &v);
- video_parameter_set_struct();
- };
- typedef vector<video_parameter_set_struct*> video_parameter_set_structs;
-
- //Structures - seq_parameter_set
- struct seq_parameter_set_struct
- {
- struct vui_parameters_struct
- {
- struct xxl
- {
- struct xxl_data
- {
- //HRD configuration
- int64u bit_rate_value;
- int64u cpb_size_value;
- bool cbr_flag;
-
- //sei_message_buffering_period
- //int32u initial_cpb_removal_delay;
- //int32u initial_cpb_removal_delay_offset;
-
- xxl_data(int64u bit_rate_value_, int64u cpb_size_value_, bool cbr_flag_) //int32u initial_cpb_removal_delay_, int32u initial_cpb_removal_delay_offset_)
- :
- bit_rate_value(bit_rate_value_),
- cpb_size_value(cpb_size_value_),
- cbr_flag(cbr_flag_)
- //initial_cpb_removal_delay(initial_cpb_removal_delay_),
- //initial_cpb_removal_delay_offset(initial_cpb_removal_delay_offset_)
- {
- }
-
- xxl_data &operator=(const xxl_data &x)
- {
- bit_rate_value = x.bit_rate_value;
- cpb_size_value = x.cpb_size_value;
- cbr_flag = x.cbr_flag;
- //initial_cpb_removal_delay=x.initial_cpb_removal_delay;
- //initial_cpb_removal_delay_offset=x.initial_cpb_removal_delay_offset;
- return *this;
- }
-
- private:
- xxl_data();
- };
- vector<xxl_data> SchedSel;
-
- xxl(const vector<xxl_data> &SchedSel_)
- :
- SchedSel(SchedSel_)
- {
- }
-
- xxl &operator=(const xxl &x)
- {
- SchedSel = x.SchedSel;
-
- return *this;
- }
-
- private:
- xxl();
- };
- struct xxl_common
- {
- //Common to all xxl
- bool sub_pic_hrd_params_present_flag;
- int8u du_cpb_removal_delay_increment_length_minus1;
- int8u dpb_output_delay_du_length_minus1;
- int8u initial_cpb_removal_delay_length_minus1;
- int8u au_cpb_removal_delay_length_minus1;
- int8u dpb_output_delay_length_minus1;
-
- xxl_common(bool sub_pic_hrd_params_present_flag_, int8u du_cpb_removal_delay_increment_length_minus1_, int8u dpb_output_delay_du_length_minus1_, int8u initial_cpb_removal_delay_length_minus1_, int8u au_cpb_removal_delay_length_minus1_, int8u dpb_output_delay_length_minus1_)
- :
- sub_pic_hrd_params_present_flag(sub_pic_hrd_params_present_flag_),
- du_cpb_removal_delay_increment_length_minus1(du_cpb_removal_delay_increment_length_minus1_),
- dpb_output_delay_du_length_minus1(dpb_output_delay_du_length_minus1_),
- initial_cpb_removal_delay_length_minus1(initial_cpb_removal_delay_length_minus1_),
- au_cpb_removal_delay_length_minus1(au_cpb_removal_delay_length_minus1_),
- dpb_output_delay_length_minus1(dpb_output_delay_length_minus1_)
- {
- }
-
- xxl_common &operator=(const xxl_common &x)
- {
- sub_pic_hrd_params_present_flag = x.sub_pic_hrd_params_present_flag;
- du_cpb_removal_delay_increment_length_minus1 = x.du_cpb_removal_delay_increment_length_minus1;
- dpb_output_delay_du_length_minus1 = x.dpb_output_delay_du_length_minus1;
- initial_cpb_removal_delay_length_minus1 = x.initial_cpb_removal_delay_length_minus1;
- au_cpb_removal_delay_length_minus1 = x.au_cpb_removal_delay_length_minus1;
- dpb_output_delay_length_minus1 = x.dpb_output_delay_length_minus1;
-
- return *this;
- }
-
- private:
- xxl_common();
- };
- xxl* NAL;
- xxl* VCL;
- xxl_common* xxL_Common;
- int32u num_units_in_tick;
- int32u time_scale;
- int16u sar_width;
- int16u sar_height;
- int8u aspect_ratio_idc;
- int8u video_format;
- int8u video_full_range_flag;
- int8u colour_primaries;
- int8u transfer_characteristics;
- int8u matrix_coefficients;
- bool aspect_ratio_info_present_flag;
- bool video_signal_type_present_flag;
- bool frame_field_info_present_flag;
- bool colour_description_present_flag;
- bool timing_info_present_flag;
-
- vui_parameters_struct(xxl* NAL_, xxl* VCL_, xxl_common* xxL_Common_, int32u num_units_in_tick_, int32u time_scale_, int16u sar_width_, int16u sar_height_, int8u aspect_ratio_idc_, int8u video_format_, int8u video_full_range_flag_, int8u colour_primaries_, int8u transfer_characteristics_, int8u matrix_coefficients_, bool aspect_ratio_info_present_flag_, bool video_signal_type_present_flag_, bool frame_field_info_present_flag_, bool colour_description_present_flag_, bool timing_info_present_flag_)
- :
- NAL(NAL_),
- VCL(VCL_),
- xxL_Common(xxL_Common_),
- num_units_in_tick(num_units_in_tick_),
- time_scale(time_scale_),
- sar_width(sar_width_),
- sar_height(sar_height_),
- aspect_ratio_idc(aspect_ratio_idc_),
- video_format(video_format_),
- video_full_range_flag(video_full_range_flag_),
- colour_primaries(colour_primaries_),
- transfer_characteristics(transfer_characteristics_),
- matrix_coefficients(matrix_coefficients_),
- aspect_ratio_info_present_flag(aspect_ratio_info_present_flag_),
- video_signal_type_present_flag(video_signal_type_present_flag_),
- frame_field_info_present_flag(frame_field_info_present_flag_),
- colour_description_present_flag(colour_description_present_flag_),
- timing_info_present_flag(timing_info_present_flag_)
- {
- }
-
- ~vui_parameters_struct()
- {
- delete NAL; //NAL=NULL;
- delete VCL; //VCL=NULL;
- delete xxL_Common; //xxL_Common=NULL
- }
-
- private:
- vui_parameters_struct &operator=(const vui_parameters_struct &v);
- vui_parameters_struct();
- };
- vui_parameters_struct* vui_parameters;
- #if MEDIAINFO_DEMUX
- int8u* AnnexB_Buffer;
- size_t AnnexB_Buffer_Size;
- #endif //MEDIAINFO_DEMUX
- int32u profile_space;
- bool tier_flag;
- int32u profile_idc;
- int32u level_idc;
- int32u pic_width_in_luma_samples;
- int32u pic_height_in_luma_samples;
- int32u conf_win_left_offset;
- int32u conf_win_right_offset;
- int32u conf_win_top_offset;
- int32u conf_win_bottom_offset;
- int8u video_parameter_set_id;
- int8u chroma_format_idc;
- bool separate_colour_plane_flag;
- int8u log2_max_pic_order_cnt_lsb_minus4;
- int8u bit_depth_luma_minus8;
- int8u bit_depth_chroma_minus8;
- bool general_progressive_source_flag;
- bool general_interlaced_source_flag;
- bool general_frame_only_constraint_flag;
-
- //Computed value
- bool NalHrdBpPresentFlag() {return vui_parameters && vui_parameters->NAL;}
- bool VclHrdBpPresentFlag() {return vui_parameters && vui_parameters->VCL;}
- bool CpbDpbDelaysPresentFlag() {return vui_parameters && vui_parameters->xxL_Common;} //xxL_Common is present if NAL or VCL
- int8u ChromaArrayType() {return separate_colour_plane_flag?0:chroma_format_idc;}
-
- //Constructor/Destructor
- seq_parameter_set_struct(vui_parameters_struct* vui_parameters_, int32u profile_space_, bool tier_flag_, int32u profile_idc_, int32u level_idc_, int32u pic_width_in_luma_samples_, int32u pic_height_in_luma_samples_, int32u conf_win_left_offset_, int32u conf_win_right_offset_, int32u conf_win_top_offset_, int32u conf_win_bottom_offset_, int8u video_parameter_set_id_, int8u chroma_format_idc_, bool separate_colour_plane_flag_, int8u log2_max_pic_order_cnt_lsb_minus4_, int8u bit_depth_luma_minus8_, int8u bit_depth_chroma_minus8_, bool general_progressive_source_flag_, bool general_interlaced_source_flag_, bool general_frame_only_constraint_flag_)
- :
- vui_parameters(vui_parameters_),
- #if MEDIAINFO_DEMUX
- AnnexB_Buffer(NULL),
- AnnexB_Buffer_Size(0),
- #endif //MEDIAINFO_DEMUX
- profile_space(profile_space_),
- profile_idc(profile_idc_),
- tier_flag(tier_flag_),
- level_idc(level_idc_),
- pic_width_in_luma_samples(pic_width_in_luma_samples_),
- pic_height_in_luma_samples(pic_height_in_luma_samples_),
- conf_win_left_offset(conf_win_left_offset_),
- conf_win_right_offset(conf_win_right_offset_),
- conf_win_top_offset(conf_win_top_offset_),
- conf_win_bottom_offset(conf_win_bottom_offset_),
- video_parameter_set_id(video_parameter_set_id_),
- chroma_format_idc(chroma_format_idc_),
- separate_colour_plane_flag(separate_colour_plane_flag_),
- log2_max_pic_order_cnt_lsb_minus4(log2_max_pic_order_cnt_lsb_minus4_),
- bit_depth_luma_minus8(bit_depth_luma_minus8_),
- bit_depth_chroma_minus8(bit_depth_chroma_minus8_),
- general_progressive_source_flag(general_progressive_source_flag_),
- general_interlaced_source_flag(general_interlaced_source_flag_),
- general_frame_only_constraint_flag(general_frame_only_constraint_flag_)
- {
- }
-
- ~seq_parameter_set_struct()
- {
- delete vui_parameters; //vui_parameters=NULL;
- #if MEDIAINFO_DEMUX
- delete[] AnnexB_Buffer;
- #endif //MEDIAINFO_DEMUX
- }
-
- private:
- seq_parameter_set_struct &operator=(const seq_parameter_set_struct &v);
- seq_parameter_set_struct();
- };
- typedef vector<seq_parameter_set_struct*> seq_parameter_set_structs;
-
- //Structures - pic_parameter_set
- struct pic_parameter_set_struct
- {
- #if MEDIAINFO_DEMUX
- int8u* AnnexB_Buffer;
- size_t AnnexB_Buffer_Size;
- #endif //MEDIAINFO_DEMUX
- int8u seq_parameter_set_id;
- int8u num_ref_idx_l0_default_active_minus1;
- int8u num_ref_idx_l1_default_active_minus1;
- int8u num_extra_slice_header_bits;
- bool dependent_slice_segments_enabled_flag;
-
- //Constructor/Destructor
- pic_parameter_set_struct(int8u seq_parameter_set_id_, int8u num_ref_idx_l0_default_active_minus1_, int8u num_ref_idx_l1_default_active_minus1_, int8u num_extra_slice_header_bits_, bool dependent_slice_segments_enabled_flag_)
- :
- #if MEDIAINFO_DEMUX
- AnnexB_Buffer(NULL),
- AnnexB_Buffer_Size(0),
- #endif //MEDIAINFO_DEMUX
- seq_parameter_set_id(seq_parameter_set_id_),
- num_ref_idx_l0_default_active_minus1(num_ref_idx_l0_default_active_minus1_),
- num_ref_idx_l1_default_active_minus1(num_ref_idx_l1_default_active_minus1_),
- num_extra_slice_header_bits(num_extra_slice_header_bits_),
- dependent_slice_segments_enabled_flag(dependent_slice_segments_enabled_flag_)
- {
- }
-
- ~pic_parameter_set_struct()
- {
- #if MEDIAINFO_DEMUX
- delete[] AnnexB_Buffer;
- #endif //MEDIAINFO_DEMUX
- }
-
- private:
- pic_parameter_set_struct &operator=(const pic_parameter_set_struct &v);
- pic_parameter_set_struct();
- };
- typedef vector<pic_parameter_set_struct*> pic_parameter_set_structs;
-
- //Streams management
- void Streams_Fill();
- void Streams_Fill(vector<seq_parameter_set_struct*>::iterator seq_parameter_set_Item);
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
- void Synched_Init();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test();
- bool Demux_Transcode_Iso14496_15_to_AnnexB;
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
-
- //Buffer - Per element
- void Header_Parse();
- bool Header_Parser_QuickSearch();
- bool Header_Parser_Fill_Size();
- void Data_Parse();
-
- //Elements
- void slice_segment_layer();
- void slice_layer();
- void video_parameter_set();
- void seq_parameter_set();
- void pic_parameter_set();
- void access_unit_delimiter();
- void end_of_seq();
- void end_of_bitstream();
- void filler_data();
- void sei();
- void sei_message(int32u &seq_parameter_set_id);
- void sei_message_buffering_period(int32u &seq_parameter_set_id, int32u payloadSize);
- void sei_message_buffering_period_xxl(seq_parameter_set_struct::vui_parameters_struct::xxl_common* xxL_Common, bool irap_cpb_params_present_flag, seq_parameter_set_struct::vui_parameters_struct::xxl* xxl);
- void sei_message_pic_timing(int32u &seq_parameter_set_id, int32u payloadSize);
- void sei_message_user_data_unregistered(int32u payloadSize);
- void sei_message_user_data_unregistered_Ateme(int32u payloadSize);
- void sei_message_user_data_unregistered_x265(int32u payloadSize);
- void sei_message_active_parameter_sets();
- void sei_message_decoded_picture_hash(int32u payloadSize);
-
- //Packets - SubElements
- void slice_segment_header();
- void profile_tier_level(int8u maxNumSubLayersMinus1);
- void short_term_ref_pic_sets(int8u num_short_term_ref_pic_sets);
- void vui_parameters(std::vector<video_parameter_set_struct*>::iterator video_parameter_set_Item, seq_parameter_set_struct::vui_parameters_struct* &vui_parameters_Item);
- void hrd_parameters(bool commonInfPresentFlag, int8u maxNumSubLayersMinus1, seq_parameter_set_struct::vui_parameters_struct::xxl_common* &xxL_Common, seq_parameter_set_struct::vui_parameters_struct::xxl* &NAL, seq_parameter_set_struct::vui_parameters_struct::xxl* &VCL);
- void sub_layer_hrd_parameters(seq_parameter_set_struct::vui_parameters_struct::xxl_common* xxL_Common, int8u bit_rate_scale, int8u cpb_size_scale, int32u cpb_cnt_minus1, seq_parameter_set_struct::vui_parameters_struct::xxl* &hrd_parameters_Item);
- void scaling_list_data();
-
- //Packets - Specific
- void VPS_SPS_PPS();
- void VPS_SPS_PPS_FromMatroska();
-
- //Streams
- struct stream
- {
- bool Searching_Payload;
-
- stream()
- :
- Searching_Payload(false)
- {
- }
- };
- vector<stream> Streams;
-
- //Replacement of File__Analyze buffer
- const int8u* Buffer_ToSave;
- size_t Buffer_Size_ToSave;
-
- //parameter_sets
- video_parameter_set_structs video_parameter_sets;
- seq_parameter_set_structs seq_parameter_sets;
- pic_parameter_set_structs pic_parameter_sets;
-
- //File specific
- int8u lengthSizeMinusOne;
-
- //File specific
- size_t IFrame_Count;
-
- //Temp
- Ztring Encoded_Library;
- Ztring Encoded_Library_Name;
- Ztring Encoded_Library_Version;
- Ztring Encoded_Library_Date;
- Ztring Encoded_Library_Settings;
- int32u chroma_format_idc;
- int32u slice_pic_parameter_set_id;
- int32u slice_type;
- int8u nuh_layer_id;
- int8u profile_space;
- int8u profile_idc;
- int8u level_idc;
- bool tier_flag;
- bool general_progressive_source_flag;
- bool general_interlaced_source_flag;
- bool general_frame_only_constraint_flag;
- bool RapPicFlag;
- bool first_slice_segment_in_pic_flag;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_HuffYuv.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_HuffYuv.cpp
deleted file mode 100644
index b1d1864f7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_HuffYuv.cpp
+++ /dev/null
@@ -1,309 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// http://multimedia.cx/huffyuv.txt
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_HUFFYUV_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_HuffYuv.h"
-#include "ZenLib/BitStream.h"
-//---------------------------------------------------------------------------
-
-#include <algorithm>
-using namespace std;
-
-//---------------------------------------------------------------------------
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Info
-//***************************************************************************
-
-const char* HuffYUV_ColorSpace (int16u BitCount)
-{
- switch (BitCount&0xFFF8)
- {
- case 8 :
- case 16 : return "YUV";
- case 24 : return "RGB";
- case 32 : return "RGBA";
- default : return "";
- }
-}
-
-const char* HuffYUV_ChromaSubsampling (int16u BitCount)
-{
- switch (BitCount&0xFFF8)
- {
- case 8 : return "4:2:0";
- case 16 : return "4:2:2";
- default : return "";
- }
-}
-
-const string HuffYUV_ColorSpace(bool rgb, bool chroma, bool alpha)
-{
- string ToReturn;
- switch (rgb)
- {
- case false :
- ToReturn=chroma?"YUV":"Y";
- break;
- case true :
- ToReturn="RGB";
- break;
- }
-
- if (alpha)
- ToReturn+='A';
-
- return ToReturn;
-}
-
-const char* HuffYUV_method (int16u BitCount, int8u method)
-{
- switch (BitCount&0x0007)
- {
- case 0 :
- switch (method)
- {
- case 0xFE : return "old";
- case 0 : return "left";
- case 1 : return "gradient";
- case 2 : return "median";
- case 64 : return "left with decorrelation";
- case 65 : return "gradient with decorrelation";
- default : return "";
- }
- case 1 : return "left";
- case 2 : return "left with decorrelation";
- case 3 :
- switch (BitCount&0xFFF8)
- {
- case 16 : return "gradient";
- case 24 :
- case 32 : return "gradient with decorrelation";
- default : return "";
- }
- case 4 : return "median";
- default : return "";
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_HuffYuv::File_HuffYuv()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("HuffYUV");
- IsRawStream=true;
-
- //In
- IsOutOfBandData=false;
- BitCount=0;
- Height=0;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_HuffYuv::Streams_Accept()
-{
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "HuffYUV");
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_HuffYuv::Read_Buffer_Continue()
-{
- Accept();
-
- if (IsOutOfBandData)
- {
- FrameHeader();
- }
- else if (Frame_Count==0)
- Fill(Stream_Video, 0, Video_Format_Version, "Version 1");
-
- Skip_XX(Element_Size-Element_Offset, "Other data");
-
- Frame_Count++;
- Finish();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_HuffYuv::FrameHeader()
-{
- //Version
- if (Element_Size<4)
- {
- Reject();
- return;
- }
- int8u Version;
- if (Buffer[3]==0)
- {
- Version=Element_Size>4?2:1;
- }
- else
- Version=3;
-
- //Parsing
- int8u bpp_override=0, chroma_v_shift=0, chroma_h_shift=0, interlace;
- bool alpha=false, chroma=false, rgb=false;
- Element_Begin1("method");
- BS_Begin();
- Skip_SB( "unknown");
- Skip_SB( "decorrelate");
- Skip_S1(6, "predictor");
- Element_End0();
- if (Version<=2)
- {
- Get_S1 (8, bpp_override, "bpp_override");
- }
- else
- {
- Get_S1 (4, bpp_override, "bit_depth"); Param_Info2(bpp_override+1, "bits");
- Get_S1 (2, chroma_v_shift, "chroma_v_shift");
- Get_S1 (2, chroma_h_shift, "chroma_h_shift");
- }
- Skip_SB( "unknown");
- Skip_SB( "context");
- Get_S1 (2, interlace, "interlace");
- if (Version<=2)
- {
- Skip_S1(4, "unknown");
- Skip_S1(8, "zero");
- }
- else
- {
- Skip_SB( "unknown");
- Get_SB ( alpha, "alpha");
- Get_SB ( rgb, "rgb");
- if (rgb)
- Skip_SB( "unused");
- else
- Get_SB ( chroma, "chroma");
- Skip_S1(7, "unused");
- Skip_SB( "version 3+ indicator");
- }
- BS_End();
-
- if (Frame_Count==0)
- {
- if (Version==2)
- {
- //BiCount;
- if (bpp_override)
- BitCount=bpp_override;
- Fill(Stream_Video, 0, Video_BitDepth, 8);
- }
- else
- {
- Fill(Stream_Video, 0, Video_BitDepth, bpp_override+1);
- }
-
- Fill(Stream_Video, 0, Video_Format_Version, __T("Version ")+Ztring::ToZtring(Version));
-
- if (Version==2)
- {
- Fill(Stream_Video, 0, Video_ColorSpace, HuffYUV_ColorSpace(BitCount));
- Fill(Stream_Video, 0, Video_ChromaSubsampling, HuffYUV_ChromaSubsampling(BitCount));
- }
- else
- {
- Fill(Stream_Video, 0, Video_ColorSpace, HuffYUV_ColorSpace(rgb, chroma, alpha));
- string ChromaSubsampling;
- if (chroma)
- {
- switch (chroma_h_shift)
- {
- case 0 :
- switch (chroma_v_shift)
- {
- case 0 : ChromaSubsampling="4:4:4"; break;
- default: ;
- }
- break;
- case 1 :
- switch (chroma_v_shift)
- {
- case 0 : ChromaSubsampling="4:2:2"; break;
- case 1 : ChromaSubsampling="4:2:0"; break;
- default: ;
- }
- break;
- case 2 :
- switch (chroma_v_shift)
- {
- case 0 : ChromaSubsampling="4:1:1"; break;
- case 1 : ChromaSubsampling="4:1:0"; break;
- case 2 : ChromaSubsampling="4:1:0 (4x4)"; break;
- default: ;
- }
- break;
- default: ;
- }
- }
- if (!ChromaSubsampling.empty() && alpha)
- ChromaSubsampling+=":4";
- Fill(Stream_Video, 0, Video_ChromaSubsampling, ChromaSubsampling);
- }
-
- switch (interlace)
- {
- case 0 :
- if (Version<=2 && Height)
- Fill(Stream_Video, 0, Video_ScanType, Height>288?"Interlaced":"Progressive");
- break;
- case 1 :
- Fill(Stream_Video, 0, Video_ScanType, "Interlaced");
- break;
- case 2 :
- Fill(Stream_Video, 0, Video_ScanType, "Progressive");
- break;
- default:;
- }
- }
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_HUFFYUV_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_HuffYuv.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_HuffYuv.h
deleted file mode 100644
index 05e78d6a7..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_HuffYuv.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about HUFFYUV files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_HuffYUVH
-#define MediaInfo_HuffYUVH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_HuffYuv
-//***************************************************************************
-
-class File_HuffYuv : public File__Analyze
-{
-public :
- //In
- bool IsOutOfBandData;
- int16u BitCount;
- int32u Height;
-
- //Constructor/Destructor
- File_HuffYuv();
-
-private :
- //Streams management
- void Streams_Accept();
-
- //Buffer - Global
- void Read_Buffer_Continue();
-
- //Elements
- void FrameHeader();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Lagarith.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Lagarith.cpp
deleted file mode 100644
index 1c2b8fa10..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Lagarith.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_LAGARITH_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Lagarith.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Lagarith::File_Lagarith()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("Lagarith");
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Lagarith::Streams_Fill()
-{
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "Lagarith");
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Lagarith::Read_Buffer_Continue()
-{
- //Parsing
- int8u version;
- Get_L1 (version, "version");
- Skip_XX(Element_Size-Element_Offset, "data");
-
- FILLING_BEGIN();
- Accept();
- Fill();
- switch (version)
- {
- case 0x02 :
- case 0x04 : Fill(Stream_Video, 0, Video_ColorSpace, "RGB"); Fill(Stream_Video, 0, Video_BitDepth, 8); break;
- case 0x03 : Fill(Stream_Video, 0, Video_ColorSpace, "YUV"); Fill(Stream_Video, 0, Video_ChromaSubsampling, "4:2:2"); Fill(Stream_Video, 0, Video_BitDepth, 8); break;
- case 0x05 : Fill(Stream_Video, 0, Video_ColorSpace, "Y"); break;
- case 0x06 :
- case 0x07 : Fill(Stream_Video, 0, Video_ColorSpace, "RGB"); break;
- case 0x08 :
- case 0x09 : Fill(Stream_Video, 0, Video_ColorSpace, "RGBA"); break;
- case 0x0A :
- case 0x0B : Fill(Stream_Video, 0, Video_ColorSpace, "YUV"); Fill(Stream_Video, 0, Video_ChromaSubsampling, "4:2:0"); Fill(Stream_Video, 0, Video_BitDepth, 8); break;
- default : ;
- }
-
- FILLING_END();
- Finish();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_LAGARITH_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Lagarith.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Lagarith.h
deleted file mode 100644
index 8e317b5df..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Lagarith.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Lagarith files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_LagarithH
-#define MediaInfo_File_LagarithH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Lagarith
-//***************************************************************************
-
-class File_Lagarith : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Lagarith();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpeg4v.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpeg4v.cpp
deleted file mode 100644
index 67c1f7afc..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpeg4v.cpp
+++ /dev/null
@@ -1,1864 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Constants (Common)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEG4V_YES) || defined(MEDIAINFO_MPEG4_YES)
-//---------------------------------------------------------------------------
-
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events_Internal.h"
-#endif //MEDIAINFO_EVENTS
-#include "ZenLib/Conf.h"
-#include "ZenLib/Utils.h"
-using namespace ZenLib;
-
-namespace MediaInfoLib
-{
-
-//---------------------------------------------------------------------------
-const char* Mpeg4v_Profile_Level(int32u Profile_Level)
-{
- switch (Profile_Level)
- {
- case B8(00000001) : return "Simple@L1";
- case B8(00000010) : return "Simple@L2";
- case B8(00000011) : return "Simple@L3";
- case B8(00000100) : return "Simple@L4a";
- case B8(00000101) : return "Simple@L5";
- case B8(00000110) : return "Simple@L6";
- case B8(00001000) : return "Simple@L0";
- case B8(00001001) : return "Simple@L0b";
- case B8(00010000) : return "Simple Scalable@L0";
- case B8(00010001) : return "Simple Scalable@L1";
- case B8(00010010) : return "Simple Scalable@L2";
- case B8(00010101) : return "AVC"; //For descriptors
- case B8(00100001) : return "Core@L1";
- case B8(00100010) : return "Core@L2";
- case B8(00110010) : return "Main@L2";
- case B8(00110011) : return "Main@L3";
- case B8(00110100) : return "Main@L4";
- case B8(01000010) : return "N-bit@L2";
- case B8(01010001) : return "Scalable Texture@L1";
- case B8(01100001) : return "Simple Face Animation@L1";
- case B8(01100010) : return "Simple Face Animation@L2";
- case B8(01100011) : return "Simple FBA@L1";
- case B8(01100100) : return "Simple FBA@L2";
- case B8(01110001) : return "Basic Animated Texture@L1";
- case B8(01110010) : return "Basic Animated Texture@L2";
- case B8(01111111) : return "AVC"; //For descriptors
- case B8(10000001) : return "Hybrid@L1";
- case B8(10000010) : return "Hybrid@L2";
- case B8(10010001) : return "Advanced Real Time Simple@L1";
- case B8(10010010) : return "Advanced Real Time Simple@L2";
- case B8(10010011) : return "Advanced Real Time Simple@L3";
- case B8(10010100) : return "Advanced Real Time Simple@L4";
- case B8(10100001) : return "Core Scalable@L1";
- case B8(10100010) : return "Core Scalable@L2";
- case B8(10100011) : return "Core Scalable@L3";
- case B8(10110001) : return "Advanced Coding Efficiency@L1";
- case B8(10110010) : return "Advanced Coding Efficiency@L2";
- case B8(10110011) : return "Advanced Coding Efficiency@L3";
- case B8(10110100) : return "Advanced Coding Efficiency@L4";
- case B8(11000001) : return "Advanced Core@L1";
- case B8(11000010) : return "Advanced Core@L2";
- case B8(11010001) : return "Advanced Scalable Texture@L1";
- case B8(11010010) : return "Advanced Scalable Texture@L2";
- case B8(11010011) : return "Advanced Scalable Texture@L3";
- case B8(11100001) : return "Simple Studio@L1";
- case B8(11100010) : return "Simple Studio@L2";
- case B8(11100011) : return "Simple Studio@L3";
- case B8(11100100) : return "Simple Studio@L4";
- case B8(11100101) : return "Core Studio@L1";
- case B8(11100110) : return "Core Studio@L2";
- case B8(11100111) : return "Core Studio@L3";
- case B8(11101000) : return "Core Studio@L4";
- case B8(11110000) : return "Advanced Simple@L0";
- case B8(11110001) : return "Advanced Simple@L1";
- case B8(11110010) : return "Advanced Simple@L2";
- case B8(11110011) : return "Advanced Simple@L3";
- case B8(11110100) : return "Advanced Simple@L4";
- case B8(11110101) : return "Advanced Simple@L5";
- case B8(11110111) : return "Advanced Simple@L3b";
- case B8(11111000) : return "Fine Granularity Scalable@L0";
- case B8(11111001) : return "Fine Granularity Scalable@L1";
- case B8(11111010) : return "Fine Granularity Scalable@L2";
- case B8(11111011) : return "Fine Granularity Scalable@L3";
- case B8(11111100) : return "Fine Granularity Scalable@L4";
- case B8(11111101) : return "Fine Granularity Scalable@L5";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-} //NameSpace
-
-//---------------------------------------------------------------------------
-#endif //...
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-//
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEG4V_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Mpeg4v.h"
-#include "ZenLib/BitStream.h"
-#include "ZenLib/Utils.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Constants
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Mpeg4v_Colorimetry[]=
-{
- "",
- "4:2:0",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg4v_visual_object_type[]=
-{
- "",
- "video",
- "still texture",
- "mesh",
- "FBA",
- "3D mesh",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg4v_visual_object_verid[]=
-{
- "",
- "ISO/IEC 14496-2",
- "ISO/IEC 14496-2 AMD 1",
- "ISO/IEC 14496-2 AMD 2",
- "ISO/IEC 14496-2 AMD 3 (Studio)",
- "ISO/IEC 14496-2 AMD 4 (SVP)",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg4v_video_object_layer_verid[]=
-{
- "",
- "ISO/IEC 14496-2",
- "ISO/IEC 14496-2 AMD 1",
- "ISO/IEC 14496-2 AMD 2",
- "ISO/IEC 14496-2 AMD 3 (Studio)",
- "ISO/IEC 14496-2 AMD 4 (SVP)",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpeg4v_vop_coding_type[]=
-{
- "I",
- "P",
- "B",
- "S",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpegv_colour_primaries(int8u colour_primaries);
-const char* Mpegv_transfer_characteristics(int8u transfer_characteristics);
-const char* Mpegv_matrix_coefficients(int8u matrix_coefficients);
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Mpeg4v::File_Mpeg4v()
-:File__Analyze()
-{
- //Config
- Trusted_Multiplier=2;
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
- PTS_DTS_Needed=true;
- IsRawStream=true;
-
- //In
- Frame_Count_Valid=MediaInfoLib::Config.ParseSpeed_Get()>=0.3?30:2;
- FrameIsAlwaysComplete=false;
-
- //Temp
- video_object_layer_start_IsParsed=false;
- colour_description=false;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4v::OnlyVOP()
-{
- //Default stream values
- Synched_Init();
- Streams[0xB3].Searching_Payload=true; //group_of_vop_start
- Streams[0xB6].Searching_Payload=true; //vop_start
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Mpeg4v::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+4>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x01)
- {
- Synched=false;
- return true;
- }
-
- //Quick search
- if (!Header_Parser_QuickSearch())
- return false;
-
- #if MEDIAINFO_IBIUSAGE
- bool RandomAccess=Buffer[Buffer_Offset+3]==0xB0; //SequenceHeader
- if (RandomAccess)
- Ibi_Add();
- #endif //MEDIAINFO_IBIUSAGE
-
- //We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4v::Synched_Init()
-{
- //Count of a Packets
- IVOP_Count=0;
- PVOP_Count=0;
- BVOP_Count=0;
- BVOP_Count_Max=0;
- SVOP_Count=0;
- NVOP_Count=0;
- Interlaced_Top=0;
- Interlaced_Bottom=0;
- Frame_Count_InThisBlock_Max=0;
- if (Frame_Count_NotParsedIncluded==(int64u)-1)
- Frame_Count_NotParsedIncluded=0; //No Frame_Count_NotParsedIncluded in the container
-
- //From VOL, needed in VOP
- fixed_vop_time_increment=0;
- Time_Begin_Seconds=(int32u)-1;
- Time_End_Seconds=(int32u)-1;
- Time_Begin_MilliSeconds=(int16u)-1;
- Time_End_MilliSeconds=(int16u)-1;
- object_layer_width=0;
- object_layer_height=0;
- vop_time_increment_resolution=0;
- visual_object_verid=1;
- profile_and_level_indication=0;
- no_of_sprite_warping_points=0;
- aspect_ratio_info=0;
- par_width=0;
- par_height=0;
- bits_per_pixel=8;
- shape=0;
- sprite_enable=0;
- estimation_method=0;
- chroma_format=(int8u)-1;
- colour_primaries=(int8u)-1;
- transfer_characteristics=(int8u)-1;
- matrix_coefficients=(int8u)-1;
- quarter_sample=false;
- low_delay=false;
- load_intra_quant_mat=false;
- load_nonintra_quant_mat=false;
- load_intra_quant_mat_grayscale=false;
- load_nonintra_quant_mat_grayscale=false;
- interlaced=false;
- newpred_enable=0;
- time_size=0;
- reduced_resolution_vop_enable=0;
- scalability=0;
- enhancement_type=0;
- complexity_estimation_disable=false;
- opaque=false;
- transparent=false;
- intra_cae=false;
- inter_cae=false;
- no_update=false;
- upsampling=false;
- intra_blocks=false;
- inter_blocks=false;
- inter4v_blocks=false;
- not_coded_blocks=false;
- dct_coefs=false;
- dct_lines=false;
- vlc_symbols=false;
- vlc_bits=false;
- apm=false;
- npm=false;
- interpolate_mc_q=false;
- forw_back_mc_q=false;
- halfpel2=false;
- halfpel4=false;
- sadct=false;
- quarterpel=false;
- quant_type=false;
-
- if (!IsSub)
- FrameInfo.DTS=0;
-
- //Default stream values
- Streams.resize(0x100);
- Streams[0x00].Searching_Payload=true; //video_object_start
- Streams[0x20].Searching_Payload=true; //video_object_layer_start
- Streams[0xB0].Searching_Payload=true; //visual_object_sequence_start
- Streams[0xB5].Searching_Payload=true; //visual_object_start
- NextCode_Add(0x20); //video_object_layer_start
- for (int8u Pos=0xFF; Pos>=0xB9; Pos--)
- Streams[Pos].Searching_Payload=true; //Testing MPEG-PS
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg4v::Streams_Fill()
-{
- //Filling
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "MPEG-4 Visual");
- Fill(Stream_Video, 0, Video_Codec, "MPEG-4V");
-
- if (profile_and_level_indication>0)
- {
- Fill(Stream_Video, 0, Video_Format_Profile, Mpeg4v_Profile_Level(profile_and_level_indication));
- Fill(Stream_Video, 0, Video_Codec_Profile, Mpeg4v_Profile_Level(profile_and_level_indication));
- }
-
- if (fixed_vop_time_increment && vop_time_increment_resolution)
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, ((float)vop_time_increment_resolution)/fixed_vop_time_increment);
- if (object_layer_height)
- {
- Fill(Stream_Video, StreamPos_Last, Video_Width, object_layer_width);
- Fill(Stream_Video, StreamPos_Last, Video_Height, object_layer_height);
- float32 PixelAspectRatio_Value=1.0;
- if (aspect_ratio_info==0x01) PixelAspectRatio_Value=(float32)1;
- if (aspect_ratio_info==0x02) PixelAspectRatio_Value=(float32)12/(float32)11;
- else if (aspect_ratio_info==0x03) PixelAspectRatio_Value=(float32)10/(float32)11;
- else if (aspect_ratio_info==0x04) PixelAspectRatio_Value=(float32)16/(float32)11;
- else if (aspect_ratio_info==0x05) PixelAspectRatio_Value=(float32)40/(float32)33;
- else if (aspect_ratio_info==0x0F && par_height) PixelAspectRatio_Value=((float32)par_width)/par_height;
- Fill(Stream_Video, 0, Video_PixelAspectRatio, PixelAspectRatio_Value, 3, true);
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, ((float)object_layer_width)/object_layer_height*PixelAspectRatio_Value, 3, true);
- }
- Fill(Stream_Video, 0, Video_ColorSpace, "YUV");
- Fill(Stream_Video, 0, Video_BitDepth, bits_per_pixel);
- if (chroma_format<4)
- Fill(Stream_Video, 0, Video_Colorimetry, Mpeg4v_Colorimetry[chroma_format]);
- if (colour_description)
- {
- Fill(Stream_Video, 0, Video_colour_description_present, "Yes");
- Fill(Stream_Video, 0, Video_colour_primaries, Mpegv_colour_primaries(colour_primaries));
- Fill(Stream_Video, 0, Video_transfer_characteristics, Mpegv_transfer_characteristics(transfer_characteristics));
- Fill(Stream_Video, 0, Video_matrix_coefficients, Mpegv_matrix_coefficients(matrix_coefficients));
- }
- if (low_delay)
- {
- Fill(Stream_Video, 0, Video_Format_Settings_BVOP, "No");
- Fill(Stream_Video, 0, Video_Codec_Settings_BVOP, "No");
- }
- else
- {
- Fill(Stream_Video, 0, Video_Format_Settings, "BVOP");
- Fill(Stream_Video, 0, Video_Format_Settings_BVOP, "Yes");
- Fill(Stream_Video, 0, Video_Codec_Settings, "BVOP");
- Fill(Stream_Video, 0, Video_Codec_Settings_BVOP, "Yes");
- }
- if (no_of_sprite_warping_points)
- {
- Fill(Stream_Video, 0, Video_Format_Settings, Ztring(__T("GMC"))+Ztring::ToZtring(no_of_sprite_warping_points));
- Fill(Stream_Video, 0, Video_Format_Settings_GMC, no_of_sprite_warping_points);
- Fill(Stream_Video, 0, Video_Codec_Settings, Ztring(__T("GMC"))+Ztring::ToZtring(no_of_sprite_warping_points));
- Fill(Stream_Video, 0, Video_Codec_Settings_GMC, no_of_sprite_warping_points);
- }
- else
- {
- Fill(Stream_Video, 0, Video_Format_Settings_GMC, 0);
- Fill(Stream_Video, 0, Video_Codec_Settings_GMC, 0);
- }
- if (quarter_sample)
- {
- Fill(Stream_Video, 0, Video_Format_Settings, "QPel");
- Fill(Stream_Video, 0, Video_Format_Settings_QPel, "Yes");
- Fill(Stream_Video, 0, Video_Codec_Settings, "QPel");
- Fill(Stream_Video, 0, Video_Codec_Settings_QPel, "Yes");
- }
- else
- {
- Fill(Stream_Video, 0, Video_Format_Settings_QPel, "No");
- Fill(Stream_Video, 0, Video_Codec_Settings_QPel, "No");
- }
- if (!quant_type)
- {
- Fill(Stream_Video, 0, Video_Format_Settings_Matrix, "Default (H.263)");
- Fill(Stream_Video, 0, Video_Codec_Settings_Matrix, "Default (H.263)");
- }
- else if (load_intra_quant_mat_grayscale || load_nonintra_quant_mat_grayscale)
- {
- Fill(Stream_Video, 0, Video_Format_Settings, "Custom Matrix (Gray)");
- Fill(Stream_Video, 0, Video_Format_Settings_Matrix, "Custom (Gray)");
- Fill(Stream_Video, 0, Video_Codec_Settings, "Custom Matrix (Gray)");
- Fill(Stream_Video, 0, Video_Codec_Settings_Matrix, "Custom (Gray)");
- }
- else if (load_intra_quant_mat || load_nonintra_quant_mat)
- {
- Fill(Stream_Video, 0, Video_Format_Settings, "Custom Matrix");
- Fill(Stream_Video, 0, Video_Format_Settings_Matrix, "Custom");
- Fill(Stream_Video, 0, Video_Format_Settings_Matrix_Data, Matrix_intra);
- Fill(Stream_Video, 0, Video_Format_Settings_Matrix_Data, Matrix_nonintra);
- Fill(Stream_Video, 0, Video_Codec_Settings, "Custom Matrix");
- Fill(Stream_Video, 0, Video_Codec_Settings_Matrix, "Custom");
- }
- else
- {
- Fill(Stream_Video, 0, Video_Format_Settings_Matrix, "Default (MPEG)");
- Fill(Stream_Video, 0, Video_Codec_Settings_Matrix, "Default (MPEG)");
- }
- if (interlaced)
- {
- Fill(Stream_Video, 0, Video_ScanType, "Interlaced");
- if ((Interlaced_Top && Interlaced_Bottom) || (!Interlaced_Top && !Interlaced_Bottom))
- Fill(Stream_Video, 0, Video_Interlacement, "Interlaced");
- else
- {
- Fill(Stream_Video, 0, Video_ScanOrder, Interlaced_Top?"TFF":"BFF");
- Fill(Stream_Video, 0, Video_Interlacement, Interlaced_Top?"TFF":"BFF");
- }
- }
- else
- {
- Fill(Stream_Video, 0, Video_ScanType, "Progressive");
- Fill(Stream_Video, 0, Video_Interlacement, "PPF");
- }
- if (!Library.empty())
- {
- Fill(Stream_Video, 0, Video_Encoded_Library, Library);
- Fill(Stream_Video, 0, Video_Encoded_Library_Name, Library_Name);
- Fill(Stream_Video, 0, Video_Encoded_Library_Version, Library_Version);
- Fill(Stream_Video, 0, Video_Encoded_Library_Date, Library_Date);
- }
- for (size_t Pos=0; Pos<user_data_start_SNC_Data.size(); Pos++)
- {
- if (user_data_start_SNC_Data[Pos][0]==__T("CamTim"))
- Fill(Stream_General, 0, General_Recorded_Date, Ztring().Date_From_String(user_data_start_SNC_Data[Pos][1].To_UTF8().c_str()));
- if (user_data_start_SNC_Data[Pos][0]==__T("FrmRate"))
- Fill(Stream_Video, 0, Video_FrameRate, user_data_start_SNC_Data[Pos][1].To_float32(), 3);
- if (user_data_start_SNC_Data[Pos][0]==__T("TimStamp"))
- {
- Fill(Stream_Video, 0, Video_Delay, user_data_start_SNC_Data[Pos][1].To_int64u());
- Fill(Stream_Video, 0, Video_Delay_Source, "Stream");
- }
- if (user_data_start_SNC_Data[Pos][0]==__T("CamPos") && user_data_start_SNC_Data[Pos][1].size()==16)
- {
- Fill(Stream_Video, 0, "Pan / Tilt / Zoom / Status", Ztring(user_data_start_SNC_Data[Pos][1].substr( 3, 4)).To_int8u(16));
- Fill(Stream_Video, 0, "Pan / Tilt / Zoom / Status", Ztring(user_data_start_SNC_Data[Pos][1].substr( 7, 4)).To_int8u(16));
- Fill(Stream_Video, 0, "Pan / Tilt / Zoom / Status", Ztring(user_data_start_SNC_Data[Pos][1].substr(11, 4)).To_int8u(16));
- if (user_data_start_SNC_Data[Pos][1][15]==__T('M'))
- Fill(Stream_Video, 0, "Pan / Tilt / Zoom / Status", __T("Move"));
- else if (user_data_start_SNC_Data[Pos][1][15]==__T('S'))
- Fill(Stream_Video, 0, "Pan / Tilt / Zoom / Status", __T("Stop"));
- else
- Fill(Stream_Video, 0, "Pan / Tilt / Zoom / Status", user_data_start_SNC_Data[Pos][1][15]);
- }
- if (user_data_start_SNC_Data[Pos][0]==__T("AlmEvent") && user_data_start_SNC_Data[Pos][1].size()==16)
- Fill(Stream_Video, 0, "Alarm event", user_data_start_SNC_Data[Pos][1]);
- }
- if (video_object_layer_start_IsParsed && shape!=2 && !complexity_estimation_disable)
- {
- Fill(Stream_Video, 0, "data_partitioned", data_partitioned?"Yes":"No");
- (*Stream_More)[Stream_Video][0](Ztring().From_Local("data_partitioned"), Info_Options)=__T("N NT");
- if (data_partitioned)
- {
- Fill(Stream_Video, 0, "reversible_vlc", reversible_vlc?"Yes":"No");
- (*Stream_More)[Stream_Video][0](Ztring().From_Local("reversible_vlc"), Info_Options)=__T("N NT");
- }
- }
-
- //BVOPs
- if (BVOP_Count_Max)
- {
- Ztring Format_Settings=Retrieve(Stream_Video, 0, Video_Format_Settings);
- Format_Settings.FindAndReplace(__T("BVOP"), __T("BVOP")+Ztring::ToZtring(BVOP_Count_Max));
- Fill(Stream_Video, 0, Video_Format_Settings, Format_Settings, true);
- Fill(Stream_Video, 0, Video_Format_Settings_BVOP, BVOP_Count_Max, 10, true);
- }
-
- //Packed Bitstream
- if (Frame_Count_InThisBlock_Max==2)
- {
- Fill(Stream_Video, 0, Video_MuxingMode, MediaInfoLib::Config.Language_Get("MuxingMode_PackedBitstream"));
- Fill(Stream_Video, 0, Video_Codec_Settings, "Packed Bitstream");
- Fill(Stream_Video, 0, Video_Codec_Settings_PacketBitStream, "Yes");
- }
- else
- {
- Fill(Stream_Video, 0, Video_Codec_Settings_PacketBitStream, "No");
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4v::Streams_Finish()
-{
- //Duration
- if (!IsSub && Time_End_Seconds!=(int32u)-1 && Time_Begin_Seconds!=(int32u)-1)
- {
- int32u Duration=(Time_End_Seconds-Time_Begin_Seconds)*1000+Time_End_MilliSeconds-Time_Begin_MilliSeconds;
- if (fixed_vop_time_increment && vop_time_increment_resolution)
- Duration+=(float32_int32s)(((float)1000)/(((float)vop_time_increment_resolution)/fixed_vop_time_increment));
- Fill(Stream_Video, 0, Video_Duration, Duration);
- }
-
- #if MEDIAINFO_IBIUSAGE
- if (fixed_vop_time_increment)
- Ibi_Stream_Finish(vop_time_increment_resolution, fixed_vop_time_increment);
- #endif //MEDIAINFO_IBIUSAGE
-}
-//***************************************************************************
-// Buffer - Demux
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-bool File_Mpeg4v::Demux_UnpacketizeContainer_Test()
-{
- if ((Demux_IntermediateItemFound && Buffer[Buffer_Offset+3]==0xB0) || Buffer[Buffer_Offset+3]==0xB3 || Buffer[Buffer_Offset+3]==0xB6)
- {
- if (Demux_Offset==0)
- {
- Demux_Offset=Buffer_Offset;
- Demux_IntermediateItemFound=false;
- }
- while (Demux_Offset+4<=Buffer_Size)
- {
- //Synchronizing
- while(Demux_Offset+3<=Buffer_Size && (Buffer[Demux_Offset ]!=0x00
- || Buffer[Demux_Offset+1]!=0x00
- || Buffer[Demux_Offset+2]!=0x01))
- {
- Demux_Offset+=2;
- while(Demux_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Demux_Offset+=2;
- if (Demux_Offset>=Buffer_Size || Buffer[Demux_Offset-1]==0x00)
- Demux_Offset--;
- }
-
- if (Demux_Offset+4<=Buffer_Size)
- {
- if (Demux_IntermediateItemFound)
- {
- bool MustBreak;
- switch (Buffer[Demux_Offset+3])
- {
- case 0xB0 :
- case 0xB3 :
- case 0xB6 :
- MustBreak=true; break;
- default :
- Demux_Offset+=3;
- MustBreak=false;
- }
- if (MustBreak)
- break; //while() loop
- }
- else
- {
- if (Buffer[Demux_Offset+3]==0xB6)
- Demux_IntermediateItemFound=true;
- }
- }
- Demux_Offset++;
- }
-
- if (Demux_Offset+4>Buffer_Size && File_Offset+Buffer_Size!=File_Size)
- return false; //No complete frame
-
- if (!Status[IsAccepted])
- {
- if (Config->Demux_EventWasSent)
- return false;
- File_Mpeg4v* MI=new File_Mpeg4v;
- Open_Buffer_Init(MI);
- Open_Buffer_Continue(MI, Buffer, Buffer_Size);
- bool IsOk=MI->Status[IsAccepted];
- delete MI;
- if (!IsOk)
- return false;
- }
-
- Demux_UnpacketizeContainer_Demux(Buffer[Buffer_Offset+3]==0xB0);
- }
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg4v::Read_Buffer_Unsynched()
-{
- Time_End_Seconds=(int32u)-1;
- Time_End_MilliSeconds=(int16u)-1;
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpeg4v::Header_Parse()
-{
- //Parsing
- int8u start_code;
- Skip_B3( "synchro");
- Get_B1 (start_code, "start_code");
- if (!Header_Parser_Fill_Size())
- {
- Element_WaitForMoreData();
- return;
- }
-
- //Filling
- Header_Fill_Code(start_code, Ztring().From_CC1(start_code));
-}
-
-//---------------------------------------------------------------------------
-bool File_Mpeg4v::Header_Parser_Fill_Size()
-{
- //Look for next Sync word
- if (Buffer_Offset_Temp==0) //Buffer_Offset_Temp is not 0 if Header_Parse_Fill_Size() has already parsed first frames
- Buffer_Offset_Temp=Buffer_Offset+4;
- while (Buffer_Offset_Temp+4<=Buffer_Size
- && CC3(Buffer+Buffer_Offset_Temp)!=0x000001)
- {
- Buffer_Offset_Temp+=2;
- while(Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp]!=0x00)
- Buffer_Offset_Temp+=2;
- if (Buffer_Offset_Temp>=Buffer_Size || Buffer[Buffer_Offset_Temp-1]==0x00)
- Buffer_Offset_Temp--;
- }
-
- //Must wait more data?
- if (Buffer_Offset_Temp+4>Buffer_Size)
- {
- if (FrameIsAlwaysComplete || File_Offset+Buffer_Size==File_Size)
- Buffer_Offset_Temp=Buffer_Size; //We are sure that the next bytes are a start
- else
- return false;
- }
-
- //OK, we continue
- Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
- Buffer_Offset_Temp=0;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Mpeg4v::Header_Parser_QuickSearch()
-{
- while ( Buffer_Offset+4<=Buffer_Size
- && Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0x01)
- {
- //Getting start_code
- int8u start_code=CC1(Buffer+Buffer_Offset+3);
-
- //Searching start
- if (Streams[start_code].Searching_Payload)
- return true;
-
- //Synchronizing
- Buffer_Offset+=4;
- Synched=false;
- if (!Synchronize())
- {
- UnSynched_IsNotJunk=true;
- return false;
- }
-
- if (Buffer_Offset+4>Buffer_Size)
- {
- UnSynched_IsNotJunk=true;
- return false;
- }
- }
-
- if (Buffer_Offset+3==Buffer_Size)
- return false; //Sync is OK, but start_code is not available
- Trusted_IsNot("MPEG-4 Visual, Synchronisation lost");
- return Synchronize();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpeg4v::Data_Parse()
-{
- //Parsing
- switch (Element_Code)
- {
- case 0xB0: visual_object_sequence_start(); break;
- case 0xB1: visual_object_sequence_end(); break;
- case 0xB2: user_data_start(); break;
- case 0xB3: group_of_vop_start(); break;
- case 0xB4: video_session_error(); break;
- case 0xB5: visual_object_start(); break;
- case 0xB6: vop_start(); break;
- case 0xB7: slice_start(); break;
- case 0xB8: extension_start(); break;
- case 0xB9: fgs_vop_start(); break;
- case 0xBA: fba_object_start(); break;
- case 0xBB: fba_object_plane_start(); break;
- case 0xBC: mesh_object_start(); break;
- case 0xBD: mesh_object_plane_start(); break;
- case 0xBE: still_texture_object_start(); break;
- case 0xBF: texture_spatial_layer_start(); break;
- case 0xC0: texture_snr_layer_start(); break;
- case 0xC1: texture_tile_start(); break;
- case 0xC2: texture_shape_layer_start(); break;
- case 0xC3: stuffing_start(); break;
- default:
- if (Element_Code<=0x1F) video_object_start();
- else if (Element_Code>=0x20
- && Element_Code<=0x2F) video_object_layer_start();
- else if (Element_Code>=0x40
- && Element_Code<=0x4F) fgs_bp_start();
- else if (Element_Code<=0xC5) reserved();
- else
- {
- if (Frame_Count==0 && Buffer_TotalBytes>Buffer_TotalBytes_FirstSynched_Max)
- Trusted=0;
- Trusted_IsNot("Unattended element!");
- }
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Packet "00"
-void File_Mpeg4v::video_object_start()
-{
- Element_Name("video_object_start");
-
- //Integrity
- if (Element_Size>0)
- {
- Trusted_IsNot("size is wrong");
- return;
- }
-}
-
-//---------------------------------------------------------------------------
-// Packet "20"
-void File_Mpeg4v::video_object_layer_start()
-{
- Element_Name("video_object_layer_start");
-
- //Default
- Matrix_intra.clear();
- Matrix_nonintra.clear();
-
- //Parsing
- int8u video_object_layer_verid=visual_object_verid;
- int8u shape_extension=0;
- int32u aux_comp_count=0;
- BS_Begin();
- Skip_SB( "random_accessible_vol");
- Skip_S1(8, "video_object_type_indication");
- TEST_SB_SKIP( "is_object_layer_identifier");
- Get_S1 (4, video_object_layer_verid, "video_object_layer_verid"); Param_Info1(Mpeg4v_video_object_layer_verid[video_object_layer_verid]);
- Skip_S1(3, "video_object_layer_priority");
- TEST_SB_END();
- Get_S1 (4, aspect_ratio_info, "aspect_ratio_info");
- if (aspect_ratio_info==0x0F)
- {
- Get_S1 (8, par_width, "par_width");
- Get_S1 (8, par_height, "par_height");
- }
- TEST_SB_SKIP( "vol_control_parameters");
- Get_S1 (2, chroma_format, "chroma_format");
- Get_SB ( low_delay, "low_delay");
- TEST_SB_SKIP( "vbv_parameters");
- Skip_S2(15, "first_half_bit_rate");
- Mark_1 ();
- Skip_S2(15, "latter_half_bit_rate");
- Mark_1 ();
- Skip_S2(15, "first_half_vbv_Element_Size");
- Mark_1 ();
- Skip_S1( 3, "latter_half_vbv_Element_Size");
- Skip_S2(11, "first_half_vbv_occupancy");
- Mark_1 ();
- Skip_S2(15, "latter_half_vbv_occupancy");
- Mark_1 ();
- TEST_SB_END();
- TEST_SB_END();
- Get_S1 (2, shape, "video_object_layer_shape");
- if (shape==3 && video_object_layer_verid!=1) //Shape=GrayScale
- Get_S1 (4, shape_extension, "video_object_layer_shape_extension");
- switch (shape_extension)
- {
- case 0 :
- case 1 :
- case 5 :
- case 7 :
- case 8 :
- aux_comp_count=1; break;
- case 2 :
- case 3 :
- case 6 :
- case 9 :
- case 11 :
- aux_comp_count=2; break;
- case 4 :
- case 10 :
- case 12 :
- aux_comp_count=3; break;
- default : ;
- }
- Mark_1 ();
- Get_S2 (16, vop_time_increment_resolution, "vop_time_increment_resolution");
- int32u PowerOf2=1;
- for (time_size=0; time_size<=16; time_size++)
- {
- if ((int32u)vop_time_increment_resolution<PowerOf2)
- break;
- PowerOf2<<=1;
- }
- Mark_1 ();
- TEST_SB_SKIP( "fixed_vop_rate");
- Get_BS (time_size, fixed_vop_time_increment, "fixed_vop_time_increment"); Param_Info2C((vop_time_increment_resolution), fixed_vop_time_increment*1000/vop_time_increment_resolution, " ms");
- TEST_SB_END();
- if (shape!=2) //Shape!=BinaryOnly
- {
- if (shape==0) //Shape=Rectangular
- {
- Mark_1 ();
- Get_S2 (13, object_layer_width, "object_layer_width");
- Mark_1 ();
- Get_S2 (13, object_layer_height, "object_layer_height");
- Mark_1 ();
- }
- Get_SB (interlaced, "interlaced");
- Skip_SB( "obmc_disable");
- if (video_object_layer_verid==1)
- Get_S1 (1, sprite_enable, "sprite_enable");
- else
- Get_S1 (2, sprite_enable, "sprite_enable");
- if (sprite_enable==1 || sprite_enable==2 ) //static or GMC
- {
- if (sprite_enable!=2) //No GMC
- {
- Skip_S2(13, "sprite_width");
- Mark_1 ();
- Skip_S2(13, "sprite_height");
- Mark_1 ();
- Skip_S2(13, "sprite_top_coordinate");
- Mark_1 ();
- Skip_S2(13, "sprite_left_coordinate");
- Mark_1 ();
- }
- Get_S1 (6, no_of_sprite_warping_points, "no_of_sprite_warping_points");
- Skip_S1(2, "sprite_warping_accuracy");
- Skip_SB( "sprite_brightness_change");
- if (sprite_enable!=2) //No GMC
- Skip_SB( "low_latency_sprite_enable");
- }
- if (video_object_layer_verid!=1 && shape!=0) //Shape!=Rectangular
- Skip_SB( "sadct_disable");
- TEST_SB_SKIP( "bits_per_pixel_not_8_bit");
- Skip_S1(4, "quant_precision");
- Get_S1 (4, bits_per_pixel, "bits_per_pixel");
- TEST_SB_END();
- if (shape==3) //Shape=GrayScale
- {
- Skip_SB( "no_gray_quant_update");
- Skip_SB( "composition_method");
- Skip_SB( "linear_composition");
- }
- TEST_SB_GET (quant_type, "quant_type");
- Get_SB (load_intra_quant_mat, "load_intra_quant_mat");
- if(load_intra_quant_mat)
- for (int16u Pos=0; Pos<64; Pos++)
- {
- int8u intra_quant_mat;
- Get_S1 (8, intra_quant_mat, "intra_quant_mat");
- if (!intra_quant_mat)
- {
- if (Matrix_intra.size()<2)
- break; //There is a problem
- Ztring Value=Matrix_intra.substr(Matrix_intra.size()-2, 2);
- for (;Pos<64; Pos++)
- Matrix_intra+=Value;
- }
- else
- {
- Ztring Value=Ztring::ToZtring(intra_quant_mat, 16);
- if (Value.size()==1)
- Value.insert(0, __T("0"));
- Matrix_intra+=Value;
- }
- }
- else
- Matrix_intra="Default";
- Get_SB (load_nonintra_quant_mat, "load_nonintra_quant_mat");
- if(load_nonintra_quant_mat)
- for (int16u Pos=0; Pos<64; Pos++)
- {
- int8u nonintra_quant_mat;
- Get_S1 (8, nonintra_quant_mat, "nonintra_quant_mat");
- if (!nonintra_quant_mat)
- {
- if (Matrix_nonintra.size()<2)
- break; //There is a problem
- Ztring Value=Matrix_nonintra.substr(Matrix_nonintra.size()-2, 2);
- for (;Pos<64; Pos++)
- Matrix_nonintra+=Value;
- }
- else
- {
- Ztring Value=Ztring::ToZtring(nonintra_quant_mat, 16);
- if (Value.size()==1)
- Value.insert(0, __T("0"));
- Matrix_nonintra+=Value;
- }
- }
- else
- Matrix_nonintra="Default";
- if(shape==3) //Shape=GrayScale
- {
- for(size_t aux_comp_Pos=0; aux_comp_Pos<aux_comp_count; aux_comp_Pos++)
- {
- Get_SB (load_intra_quant_mat_grayscale, "load_intra_quant_mat_grayscale");
- if(load_intra_quant_mat_grayscale)
- for (int16u Pos=0; Pos<64; Pos++)
- {
- int8u intra_quant_mat_grayscale;
- Get_S1 (8, intra_quant_mat_grayscale, "intra_quant_mat_grayscale");
- if (!intra_quant_mat_grayscale)
- break;
- }
- Get_SB (load_nonintra_quant_mat_grayscale, "load_nonintra_quant_mat_grayscale");
- if(load_nonintra_quant_mat_grayscale)
- for (int16u Pos=0; Pos<64; Pos++)
- {
- int8u nonintra_quant_mat_grayscale;
- Get_S1 (8, nonintra_quant_mat_grayscale, "nonintra_quant_mat_grayscale");
- if (!nonintra_quant_mat_grayscale)
- break;
- }
- }
- }
- TEST_SB_END();
- if (video_object_layer_verid!=1)
- {
- Get_SB (quarter_sample, "quarter_sample");
- }
- Get_SB (complexity_estimation_disable, "complexity_estimation_disable");
- if (!complexity_estimation_disable)
- {
- Get_S1 (2, estimation_method, "estimation_method");
- if (estimation_method==0 || estimation_method==1)
- {
- TEST_SB_SKIP( "shape_complexity_estimation_disable");
- Get_SB (opaque, "opaque");
- Get_SB (transparent, "transparent");
- Get_SB (intra_cae, "intra_cae");
- Get_SB (inter_cae, "inter_cae");
- Get_SB (no_update, "no_update");
- Get_SB (upsampling, "upsampling");
- TEST_SB_END();
- TEST_SB_SKIP( "texture_complexity_estimation_set_1_disable");
- Get_SB (intra_blocks, "intra_blocks");
- Get_SB (inter_blocks, "inter_blocks");
- Get_SB (inter4v_blocks, "inter4v_blocks");
- Get_SB (not_coded_blocks, "not_coded_blocks");
- TEST_SB_END();
- Mark_1 ();
- TEST_SB_SKIP( "texture_complexity_estimation_set_2_disable");
- Get_SB (dct_coefs, "dct_coefs");
- Get_SB (dct_lines, "dct_lines");
- Get_SB (vlc_symbols, "vlc_symbols");
- Get_SB (vlc_bits, "vlc_bits");
- TEST_SB_END();
- TEST_SB_SKIP( "motion_compensation_complexity_disable");
- Get_SB (apm, "apm");
- Get_SB (npm, "npm");
- Get_SB (interpolate_mc_q, "interpolate_mc_q");
- Get_SB (forw_back_mc_q, "forw_back_mc_q");
- Get_SB (halfpel2, "halfpel2");
- Get_SB (halfpel4, "halfpel4");
- TEST_SB_END();
- Mark_1 ();
- if (estimation_method==1)
- {
- TEST_SB_SKIP( "version2_complexity_estimation_disable");
- Get_SB (sadct, "sadct");
- Get_SB (quarterpel, "quarterpel");
- TEST_SB_END();
- }
- }
- }
- Skip_SB( "resync_marker_disable");
- TEST_SB_GET( data_partitioned, "data_partitioned");
- Get_SB ( reversible_vlc, "reversible_vlc");
- TEST_SB_END();
- if (video_object_layer_verid!=1)
- {
- Get_SB (newpred_enable, "newpred_enable");
- if (newpred_enable)
- {
- Skip_S1(2, "requested_upstream_message_type");
- Skip_SB( "newpred_segment_type");
- }
- Get_SB (reduced_resolution_vop_enable, "reduced_resolution_vop_enable");
- }
- Get_SB (scalability, "scalability");
- if (scalability==1)
- {
- bool Hierarchy;
- Get_SB ( Hierarchy, "hierarchy_type");
- Skip_S1(4, "ref_layer_id");
- Skip_SB( "ref_layer_sampling_direc");
- Skip_S1(5, "hor_sampling_factor_n");
- Skip_S1(5, "hor_sampling_factor_m");
- Skip_S1(5, "vert_sampling_factor_n");
- Skip_S1(5, "vert_sampling_factor_m");
- Get_SB ( enhancement_type, "enhancement_type");
- if (shape==1 && Hierarchy==0) //Shape=Binary
- {
- Skip_SB( "use_ref_shape");
- Skip_SB( "use_ref_texture");
- Skip_S1(5, "shape_hor_sampling_factor_n");
- Skip_S1(5, "shape_hor_sampling_factor_m");
- Skip_S1(5, "shape_vert_sampling_factor_n");
- Skip_S1(5, "shape_vert_sampling_factor_m");
- }
- }
- }
- else
- {
- if (video_object_layer_verid!=1)
- {
- TEST_SB_SKIP( "scalability");
- Skip_S1(4, "ref_layer_id");
- Skip_S1(5, "shape_hor_sampling_factor_n");
- Skip_S1(5, "shape_hor_sampling_factor_m");
- Skip_S1(5, "shape_vert_sampling_factor_n");
- Skip_S1(5, "shape_vert_sampling_factor_m");
- TEST_SB_END();
- }
- Skip_SB( "resync_marker_disable");
- }
- BS_End();
-
- //Coherancy
- if (object_layer_width==0 || object_layer_height==0 || ((float32)object_layer_width)/object_layer_height<((float32)0.1) || object_layer_width/object_layer_height>10)
- Trusted_IsNot("Problem with width and height!");
-
- FILLING_BEGIN();
- //NextCode
- NextCode_Test();
- NextCode_Clear();
- NextCode_Add(0xB2); //user_data
- NextCode_Add(0xB3); //group_of_vop_start
- NextCode_Add(0xB6); //vop_start
- for (int8u Pos=0x00; Pos<0x1F; Pos++)
- NextCode_Add(Pos); //video_object_start
-
- //Autorisation of other streams
- Streams[0xB2].Searching_Payload=true; //user_data
- Streams[0xB3].Searching_Payload=true; //group_of_vop_start
- Streams[0xB6].Searching_Payload=true; //vop_start
-
- //Setting as OK
- video_object_layer_start_IsParsed=true;
- if (!Status[IsAccepted])
- Accept("MPEG-4 Visual");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "40"
-//
-void File_Mpeg4v::fgs_bp_start()
-{
- Element_Name("fgs_bp_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "B0"
-void File_Mpeg4v::visual_object_sequence_start()
-{
- Element_Name("visual_object_sequence_start");
-
- //Parsing
- Get_B1 (profile_and_level_indication, "profile_and_level_indication"); Param_Info1(Mpeg4v_Profile_Level(profile_and_level_indication));
-
- //Integrity
- if (Element_Size>1)
- {
- Trusted_IsNot("Size is wrong");
- return;
- }
-
- FILLING_BEGIN();
- //NextCode
- NextCode_Clear();
- NextCode_Add(0xB1); //visual_object_sequence_end
- NextCode_Add(0xB2); //user_data
- NextCode_Add(0xB5); //visual_object_start
-
- //Autorisation of other streams
- Streams[0xB1].Searching_Payload=true, //visual_object_sequence_end
- Streams[0xB2].Searching_Payload=true; //user_data
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B1"
-void File_Mpeg4v::visual_object_sequence_end()
-{
- Element_Name("visual_object_sequence_end");
-
- FILLING_BEGIN();
- //NextCode
- NextCode_Clear();
- NextCode_Add(0xB0); //visual_object_sequence_start
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B2", User defined size, this is often used of library name
-void File_Mpeg4v::user_data_start()
-{
- Element_Name("user_data_start");
-
- //Sony SNC files (security video)
- if (Element_Size>=120 && Element_Size<=140)
- {
- int64u SNC_Identifier;
- Peek_B8(SNC_Identifier);
- if (SNC_Identifier==0x43616D54696D3A20ULL)
- {
- user_data_start_SNC();
- return;
- }
- }
-
- //Rejecting junk at the begin
- size_t Library_Start_Offset=0;
- while (Library_Start_Offset+4<=Element_Size)
- {
- bool OK=true;
- for (size_t Pos=0; Pos<4; Pos++)
- {
- if (!((Buffer[Buffer_Offset+Library_Start_Offset+Pos]==0x20 && Pos)
- || Buffer[Buffer_Offset+Library_Start_Offset+Pos]==0x22
- || Buffer[Buffer_Offset+Library_Start_Offset+Pos]==0x27
- || Buffer[Buffer_Offset+Library_Start_Offset+Pos]==0x28
- || (Buffer[Buffer_Offset+Library_Start_Offset+Pos]==0x29 && Pos)
- || (Buffer[Buffer_Offset+Library_Start_Offset+Pos]>=0x30 && Buffer[Buffer_Offset+Library_Start_Offset+Pos]<=0x3F)
- || (Buffer[Buffer_Offset+Library_Start_Offset+Pos]>=0x41 && Buffer[Buffer_Offset+Library_Start_Offset+Pos]<=0x7D)))
- {
- OK=false;
- break;
- }
- }
- if (OK)
- break;
- Library_Start_Offset++;
- }
- if (Library_Start_Offset+4>Element_Size)
- {
- Skip_XX(Element_Size, "junk");
- return; //No good info
- }
-
- //Accepting good data after junk
- size_t Library_End_Offset=Library_Start_Offset+4;
- while (Library_End_Offset<Element_Size
- && (Buffer[Buffer_Offset+Library_End_Offset]==0x0D
- || Buffer[Buffer_Offset+Library_End_Offset]==0x0A
- || (Buffer[Buffer_Offset+Library_End_Offset]>=0x20 && Buffer[Buffer_Offset+Library_End_Offset]<=0x3F)
- || (Buffer[Buffer_Offset+Library_End_Offset]>=0x41 && Buffer[Buffer_Offset+Library_End_Offset]<=0x7D)))
- Library_End_Offset++;
-
- //Parsing
- Ztring Temp;
- if (Library_Start_Offset>0)
- Skip_XX(Library_Start_Offset, "junk");
- if (Library_End_Offset-Library_Start_Offset)
- Get_Local(Library_End_Offset-Library_Start_Offset, Temp,"data");
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "junk");
-
- //Cleanup
- while(Temp.size()>3 && Temp[1]==__T('e') && Temp[2]==__T('n') && Temp[3]==__T('c'))
- Temp.erase(0, 1);
- while(Temp.size()>5 && Temp[3]==__T('M') && Temp[4]==__T('P') && Temp[5]==__T('E'))
- Temp.erase(0, 1);
-
- FILLING_BEGIN();
- if (Temp.size()>=4)
- {
- if (Temp.find(__T("build"))==0)
- Library+=Ztring(__T(" "))+Temp;
- else
- Library=Temp;
-
- //Library
- if (Library.find(__T("DivX50"))==0)
- {
- Library_Name=__T("DivX");
- Ztring Version=Library.SubString(__T("Build"), __T(""));
- if (Version.empty())
- Version=Library.SubString(__T("b"), __T("p"));
- if (Version.empty())
- Version=Library.SubString(__T("b"), __T(""));
- Library_Version=MediaInfoLib::Config.Library_Get(InfoLibrary_Format_DivX, Version, InfoLibrary_Version);
- if (Library_Version.empty())
- Library_Version=Version;
- Library_Date=MediaInfoLib::Config.Library_Get(InfoLibrary_Format_DivX, Version, InfoLibrary_Date);
- }
- if (Library.find(__T("XviD"))==0)
- {
- Library_Name=__T("XviD");
- if (Library.find(__T("build="))==std::string::npos)
- {
- Ztring Version=Library.SubString(__T("XviD"), __T(""));
- Version.FindAndReplace(__T("C"), __T(""));
- Version.TrimLeft(__T('0'));
- Library_Version=MediaInfoLib::Config.Library_Get(InfoLibrary_Format_XviD, Version, InfoLibrary_Version);
- if (Library_Version.empty())
- Library_Version=Version;
- Library_Date=MediaInfoLib::Config.Library_Get(InfoLibrary_Format_XviD, Version, InfoLibrary_Date);
- }
- else
- {
- Library_Version=Library.SubString(__T("XviD"), __T(""));
- Ztring Date=Library.SubString(__T(" build="), __T(""));
- if (Date.size()==10)
- {
- Date[4]=__T('-');
- Date[7]=__T('-');
- Library_Date=__T("UTC ")+Date;
- }
- }
- }
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B2", SNC (From Sony SNC surveillance video)
-void File_Mpeg4v::user_data_start_SNC()
-{
- Element_Info1("Sony SNC");
-
- if (!user_data_start_SNC_Data.empty())
- {
- Skip_XX(Element_Size, "Value");
- return;
- }
-
- //Parsing
- Ztring Value;
- Get_Local(Element_Size, Value, "Value");
- ZtringListList List;
- List.Separator_Set(0, __T("\r\n"));
- List.Separator_Set(1, __T(": "));
- List.Write(Value);
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- if (List[Pos].size()==2)
- user_data_start_SNC_Data(List[Pos][0])=List[Pos][1];
- }
-}
-
-//---------------------------------------------------------------------------
-// Packet "B3"
-void File_Mpeg4v::group_of_vop_start()
-{
- Element_Name("group_of_vop_start");
-
- //Parsing
- int8u Hours, Minutes, Seconds;
- bool closed_gop, broken_link;
- BS_Begin();
- Get_S1 ( 5, Hours, "time_code_hours");
- Get_S1 ( 6, Minutes, "time_code_minutes");
- Mark_1();
- Get_S1 ( 6, Seconds, "time_code_seconds");
- Get_SB ( closed_gop, "closed_gop");
- Get_SB ( broken_link, "broken_link");
- BS_End();
- Ztring Time;
- Time+=Ztring::ToZtring(Hours);
- Time+=__T(':');
- Time+=Ztring::ToZtring(Minutes);
- Time+=__T(':');
- Time+=Ztring::ToZtring(Seconds);
- Time+=__T(".000");
- Element_Info1(Time);
-
- FILLING_BEGIN();
- //Calculating
- if (Time_Begin_Seconds==(int32u)-1)
- Time_Begin_Seconds=60*60*Hours+60*Minutes+Seconds;
- Time_End_Seconds=60*60*Hours+60*Minutes+Seconds;
- Time_End_MilliSeconds=(int16u)-1;
-
- //NextCode
- NextCode_Test();
- NextCode_Clear();
- for (int8u Pos=0x00; Pos<0x1F; Pos++)
- NextCode_Add(Pos); //video_object_start
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B4"
-void File_Mpeg4v::video_session_error()
-{
- Element_Name("video_session_error");
-}
-
-//---------------------------------------------------------------------------
-// Packet "B5"
-void File_Mpeg4v::visual_object_start()
-{
- Element_Name("visual_object_start");
-
- //Parsing
- int8u visual_object_type;
- BS_Begin();
- TEST_SB_SKIP( "is_visual_object_identifier");
- Get_S1 ( 4, visual_object_verid, "visual_object_verid"); Param_Info1(Mpeg4v_visual_object_verid[visual_object_verid]);
- Skip_BS( 3, "visual_object_priority");
- TEST_SB_END();
- Get_S1 ( 4, visual_object_type, "visual_object_type"); Param_Info1(Mpeg4v_visual_object_type[visual_object_type]);
- if (visual_object_type==1 || visual_object_type==2)
- {
- TEST_SB_SKIP( "video_signal_type");
- Skip_S1(3, "video_format");
- Skip_SB( "video_range");
- TEST_SB_GET ( colour_description, "colour_description");
- Get_S1 (8, colour_primaries, "colour_primaries"); Param_Info1(Mpegv_colour_primaries(colour_primaries));
- Get_S1 (8, transfer_characteristics, "transfer_characteristics"); Param_Info1(Mpegv_transfer_characteristics(transfer_characteristics));
- Get_S1 (8, matrix_coefficients, "matrix_coefficients"); Param_Info1(Mpegv_matrix_coefficients(matrix_coefficients));
- TEST_SB_END();
- TEST_SB_END();
- BS_End();
-
- //Integrity
- if (Element_Offset<Element_Size)
- Trusted_IsNot("Size is wrong");
- }
-
- FILLING_BEGIN();
- //NextCode
- NextCode_Clear();
- NextCode_Add(0xB2); //user_data
- for (int8u Pos=0x00; Pos<0x2F; Pos++)
- NextCode_Add(Pos); //video_object_start and video_object_layer_start
-
- //Autorisation of other streams
- Streams[0xB2].Searching_Payload=true;
- for (int8u Pos=0x00; Pos<0x25; Pos++)
- Streams[Pos].Searching_Payload=true; //video_object_start and video_object_layer_start
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B6"
-void File_Mpeg4v::vop_start()
-{
- Element_Info1C( (FrameInfo.DTS!=(int64u)-1), __T("DTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.DTS)/1000000)));
-
- //Counting
- if (File_Offset+Buffer_Offset+Element_Size==File_Size)
- Frame_Count_Valid=Frame_Count; //Finish frames in case of there are less than Frame_Count_Valid frames
- Frame_Count++;
- Frame_Count_InThisBlock++;
- if (Frame_Count_InThisBlock>Frame_Count_InThisBlock_Max)
- Frame_Count_InThisBlock_Max=Frame_Count_InThisBlock;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
-
- //Name
- Element_Name("vop_start");
- Element_Info1(Ztring(__T("Frame ")+Ztring::ToZtring(Frame_Count)));
-
- //Parsing
- int32u vop_time_increment;
- int8u vop_coding_type;
- bool vop_coded;
- BS_Begin();
- Get_S1 (2, vop_coding_type, "vop_coding_type"); Param_Info1(Mpeg4v_vop_coding_type[vop_coding_type]);
- Element_Info1(Mpeg4v_vop_coding_type[vop_coding_type]);
- bool modulo_time_base_Continue;
- int8u modulo_time_base=0;
- do
- {
- Get_SB (modulo_time_base_Continue, "modulo_time_base");
- if (modulo_time_base_Continue)
- modulo_time_base++;
- }
- while (modulo_time_base_Continue);
- Mark_1 ();
-
- FILLING_BEGIN();
- if (time_size==0)
- {
- //Filling only if not already done
- if (Frame_Count>=Frame_Count_Valid && Count_Get(Stream_Video)==0)
- {
- Accept("MPEG-4 Visual");
- Finish("MPEG-4 Visual");
- }
- return;
- }
- FILLING_END();
-
- Get_S4 (time_size, vop_time_increment, "vop_time_increment"); Param_Info2C((vop_time_increment_resolution), vop_time_increment*1000/vop_time_increment_resolution, " ms");
- Mark_1 ();
- Get_SB (vop_coded, "vop_coded");
- if (vop_coded)
- {
- if (newpred_enable)
- {
- Skip_S3(time_size+3<15?time_size+3:15, "vop_id");
- TEST_SB_SKIP( "vop_id_for_prediction_indication");
- Skip_BS(time_size+3<15?time_size+3:15, "vop_id_for_prediction");
- TEST_SB_END();
- Mark_1 ();
- }
-
- if (shape!=2 //Shape!=BinaryOnly
- && (vop_coding_type==1 //Type=P
- || (vop_coding_type==3 //Type=S
- && sprite_enable==2))) //Sprite_Enable=GMC
- Skip_SB( "vop_rounding_type");
- if (reduced_resolution_vop_enable==1
- && shape==0 //Shape=Rectangular
- && (vop_coding_type==1 //Type=P
- || vop_coding_type==0)) //Type=I
- Skip_SB( "vop_reduced_resolution");
- if (shape!=0) //Shape!=Rectangular
- {
- if (sprite_enable==1 //Sprite_Enable=Static
- && vop_coding_type==0) //Type=I
- {
- Skip_S2(13, "vop_width");
- Mark_1 ();
- Skip_S2(13, "vop_height");
- Mark_1 ();
- Skip_S2(13, "vop_horizontal_mc_spatial_ref");
- Mark_1 ();
- Skip_S2(13, "vop_vertical_mc_spatial_ref");
- Mark_1 ();
- }
- if (shape!=2 //Shape=BinaryOnly
- && scalability==1
- && enhancement_type==1)
- Skip_SB( "background_composition");
- Skip_SB( "change_conv_ratio_disable");
- TEST_SB_SKIP( "vop_constant_alpha");
- Skip_S1(8, "vop_constant_alpha_value");
- TEST_SB_END();
- }
-
- if (shape!=2) //Shape=BinaryOnly
- if (complexity_estimation_disable==0)
- {
- if (estimation_method==0)
- {
- if (vop_coding_type==0) //I
- {
- if (opaque) Skip_S1(8, "dcecs_opaque");
- if (transparent) Skip_S1(8, "dcecs_transparent");
- if (intra_cae) Skip_S1(8, "dcecs_intra_cae");
- if (inter_cae) Skip_S1(8, "dcecs_inter_cae");
- if (no_update) Skip_S1(8, "dcecs_no_update");
- if (upsampling) Skip_S1(8, "dcecs_upsampling");
- if (intra_blocks) Skip_S1(8, "dcecs_intra_blocks");
- if (not_coded_blocks) Skip_S1(8, "dcecs_not_coded_blocks");
- if (dct_coefs) Skip_S1(8, "dcecs_dct_coefs");
- if (dct_lines) Skip_S1(8, "dcecs_dct_lines");
- if (vlc_symbols) Skip_S1(8, "dcecs_vlc_symbols");
- if (vlc_bits) Skip_S1(4, "dcecs_vlc_bits");
- if (sadct) Skip_S1(8, "dcecs_sadct");
- }
- if (vop_coding_type==1) //P
- {
- if (opaque) Skip_S1(8, "dcecs_opaque");
- if (transparent) Skip_S1(8, "dcecs_transparent");
- if (intra_cae) Skip_S1(8, "dcecs_intra_cae");
- if (inter_cae) Skip_S1(8, "dcecs_inter_cae");
- if (no_update) Skip_S1(8, "dcecs_no_update");
- if (upsampling) Skip_S1(8, "dcecs_upsampling");
- if (intra_blocks) Skip_S1(8, "dcecs_intra_blocks");
- if (not_coded_blocks) Skip_S1(8, "dcecs_not_coded_blocks");
- if (dct_coefs) Skip_S1(8, "dcecs_dct_coefs");
- if (dct_lines) Skip_S1(8, "dcecs_dct_lines");
- if (vlc_symbols) Skip_S1(8, "dcecs_vlc_symbols");
- if (vlc_bits) Skip_S1(4, "dcecs_vlc_bits");
- if (inter_blocks) Skip_S1(8, "dcecs_inter_blocks");
- if (inter4v_blocks) Skip_S1(8, "dcecs_inter4v_blocks");
- if (apm) Skip_S1(8, "dcecs_apm");
- if (npm) Skip_S1(8, "dcecs_npm");
- if (forw_back_mc_q) Skip_S1(8, "dcecs_forw_back_mc_q");
- if (halfpel2) Skip_S1(8, "dcecs_halfpel2");
- if (halfpel4) Skip_S1(8, "dcecs_halfpel4");
- if (sadct) Skip_S1(8, "dcecs_sadct");
- if (quarterpel) Skip_S1(8, "dcecs_quarterpel");
- }
- if (vop_coding_type==2) //B
- {
- if (opaque) Skip_S1(8, "dcecs_opaque");
- if (transparent) Skip_S1(8, "dcecs_transparent");
- if (intra_cae) Skip_S1(8, "dcecs_intra_cae");
- if (inter_cae) Skip_S1(8, "dcecs_inter_cae");
- if (no_update) Skip_S1(8, "dcecs_no_update");
- if (upsampling) Skip_S1(8, "dcecs_upsampling");
- if (intra_blocks) Skip_S1(8, "dcecs_intra_blocks");
- if (not_coded_blocks) Skip_S1(8, "dcecs_not_coded_blocks");
- if (dct_coefs) Skip_S1(8, "dcecs_dct_coefs");
- if (dct_lines) Skip_S1(8, "dcecs_dct_lines");
- if (vlc_symbols) Skip_S1(8, "dcecs_vlc_symbols");
- if (vlc_bits) Skip_S1(4, "dcecs_vlc_bits");
- if (inter_blocks) Skip_S1(8, "dcecs_inter_blocks");
- if (inter4v_blocks) Skip_S1(8, "dcecs_inter4v_blocks");
- if (apm) Skip_S1(8, "dcecs_apm");
- if (npm) Skip_S1(8, "dcecs_npm");
- if (forw_back_mc_q) Skip_S1(8, "dcecs_forw_back_mc_q");
- if (halfpel2) Skip_S1(8, "dcecs_halfpel2");
- if (halfpel4) Skip_S1(8, "dcecs_halfpel4");
- if (interpolate_mc_q) Skip_S1(8, "dcecs_interpolate_mc_q");
- if (sadct) Skip_S1(8, "dcecs_sadct");
- if (quarterpel) Skip_S1(8, "dcecs_sadct");
- }
- if (vop_coding_type==3 && sprite_enable==1) //B and static
- {
- if (intra_blocks) Skip_S1(8, "dcecs_intra_blocks");
- if (not_coded_blocks) Skip_S1(8, "dcecs_not_coded_blocks");
- if (dct_coefs) Skip_S1(8, "dcecs_dct_coefs");
- if (dct_lines) Skip_S1(8, "dcecs_dct_lines");
- if (vlc_symbols) Skip_S1(8, "dcecs_vlc_symbols");
- if (vlc_bits) Skip_S1(4, "dcecs_vlc_bits");
- if (inter_blocks) Skip_S1(8, "dcecs_inter_blocks");
- if (inter4v_blocks) Skip_S1(8, "dcecs_inter4v_blocks");
- if (apm) Skip_S1(8, "dcecs_apm");
- if (npm) Skip_S1(8, "dcecs_npm");
- if (forw_back_mc_q) Skip_S1(8, "dcecs_forw_back_mc_q");
- if (halfpel2) Skip_S1(8, "dcecs_halfpel2");
- if (halfpel4) Skip_S1(8, "dcecs_halfpel4");
- if (interpolate_mc_q) Skip_S1(8, "dcecs_interpolate_mc_q");
- }
- }
- }
- if (shape!=2) //Shape!=BinaryOnly
- {
- Skip_S1(3, "intra_dc_vlc_thr");
- if (interlaced)
- {
- bool top_field_first;
- Get_SB (top_field_first, "top_field_first");
- Skip_SB( "alternate_vertical_scan_flag");
-
- //Filling
- if (top_field_first)
- Interlaced_Top++;
- else
- Interlaced_Bottom++;
- }
- }
- //...
- }
-
- if (!vop_coded) //VOP with no data
- NVOP_Count++;
- else if (vop_coding_type==0) //Type I
- {
- IVOP_Count++;
- PVOP_Count=0;
- BVOP_Count=0;
- }
- else if (vop_coding_type==1) //Type P
- {
- PVOP_Count++;
- BVOP_Count=0;
- }
- else if (vop_coding_type==2) //Type B
- {
- BVOP_Count++;
- if (BVOP_Count>BVOP_Count_Max)
- BVOP_Count_Max=BVOP_Count;
- }
- else if (vop_coding_type==3)
- {
- SVOP_Count++; //Type S
- BVOP_Count=0;
- }
-
- FILLING_BEGIN();
- //Duration
- if (vop_time_increment_resolution)
- {
- int16u Time=modulo_time_base*1000+(int16u)vop_time_increment*1000/vop_time_increment_resolution;
- while (Time_End_MilliSeconds!=(int16u)-1 && Time+500<Time_End_MilliSeconds)
- Time+=1000;
- Time_End_MilliSeconds=Time;
- if (Time_Begin_MilliSeconds==(int16u)-1)
- Time_Begin_MilliSeconds=Time_End_MilliSeconds;
-
- Element_Info1C((Time_End_Seconds!=(int32u)-1), Ztring().Duration_From_Milliseconds((int64u)(Time_End_Seconds*1000+Time_End_MilliSeconds)));
-
- if (FrameInfo.DTS!=(int64u)-1)
- {
- if (fixed_vop_time_increment && vop_time_increment_resolution)
- FrameInfo.DTS+=((int64u)fixed_vop_time_increment)*1000000000/vop_time_increment_resolution;
- else
- FrameInfo.DTS=(int64u)-1;
- }
- }
-
- //NextCode
- NextCode_Test();
- NextCode_Clear();
- for (int8u Pos=0x00; Pos<0x2F; Pos++)
- NextCode_Add(Pos); //video_object_start and video_object_layer_start
- NextCode_Add(0xB1); //visual_object_sequence_end
- NextCode_Add(0xB3); //group_of_vop_start_code
- NextCode_Add(0xB5); //visual_object_start
- NextCode_Add(0xB6); //vop_start
-
- //Filling only if not already done
- if (Frame_Count==2 && !Status[IsAccepted])
- Accept("MPEG-4 Visual");
- if (Frame_Count>=Frame_Count_Valid && Count_Get(Stream_Video)==0)
- {
- //TODO: better handling of the difference
- if (IsSub)
- Finish("MPEG-4 Visual");
- else
- {
- Fill("MPEG-4 Visual");
- if (Config->ParseSpeed<1.0)
- {
- if (!IsSub)
- Open_Buffer_Unsynch();
- GoToFromEnd(1024*1024, "MPEG-4 Visual");
- }
- }
- }
-
- #if MEDIAINFO_EVENTS
- {
- EVENT_BEGIN (Video, SliceInfo, 0)
- Event.FieldPosition=Field_Count;
- Event.SlicePosition=0;
- switch (vop_coding_type)
- {
- case 0 :
- Event.SliceType=0; break;
- case 1 :
- Event.SliceType=1; break;
- case 2 :
- Event.SliceType=2; break;
- case 3 :
- Event.SliceType=3; break;
- default:
- Event.SliceType=(int8u)-1;
- }
- Event.Flags=0;
- EVENT_END ()
- }
- #endif //MEDIAINFO_EVENTS
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B7"
-void File_Mpeg4v::slice_start()
-{
- Element_Name("slice_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "B8"
-void File_Mpeg4v::extension_start()
-{
- Element_Name("extension_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "B9"
-void File_Mpeg4v::fgs_vop_start()
-{
- Element_Name("fgs_vop_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "BA"
-void File_Mpeg4v::fba_object_start()
-{
- Element_Name("fba_object_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "BB"
-void File_Mpeg4v::fba_object_plane_start()
-{
- Element_Name("fba_object_plane_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "BC"
-void File_Mpeg4v::mesh_object_start()
-{
- Element_Name("mesh_object_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "BD"
-void File_Mpeg4v::mesh_object_plane_start()
-{
- Element_Name("mesh_object_plane_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "BE"
-void File_Mpeg4v::still_texture_object_start()
-{
- Element_Name("still_texture_object_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "BF"
-void File_Mpeg4v::texture_spatial_layer_start()
-{
- Element_Name("texture_spatial_layer_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "C0"
-void File_Mpeg4v::texture_snr_layer_start()
-{
- Element_Name("texture_snr_layer_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "C1"
-void File_Mpeg4v::texture_tile_start()
-{
- Element_Name("texture_tile_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "C2"
-void File_Mpeg4v::texture_shape_layer_start()
-{
- Element_Name("texture_shape_layer_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "C3"
-void File_Mpeg4v::stuffing_start()
-{
- Element_Name("stuffing_start");
-}
-
-//---------------------------------------------------------------------------
-// Packet "C4" and C5"
-void File_Mpeg4v::reserved()
-{
- Element_Name("reserved");
-}
-
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_MPEG4V_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpeg4v.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpeg4v.h
deleted file mode 100644
index 330d49bb8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpeg4v.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about MPEG-4 Visual files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Mpeg4vH
-#define MediaInfo_Mpeg4vH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Multiple/File_Mpeg4.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Mpeg4v
-//***************************************************************************
-
-class File_Mpeg4v : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
- bool FrameIsAlwaysComplete;
- void OnlyVOP(); //Data has only VOPs in it (configuration is elsewhere)
-
- //Constructor/Destructor
- File_Mpeg4v();
-
-private :
- //Streams management
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin() {return FileHeader_Begin_0x000001();}
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
-
- //Buffer - Synchro
- bool Synchronize() {return Synchronize_0x000001();}
- bool Synched_Test();
- void Synched_Init();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test();
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Per element
- void Header_Parse();
- bool Header_Parser_QuickSearch();
- bool Header_Parser_Fill_Size();
- void Data_Parse();
-
- //Elements
- void video_object_start();
- void video_object_layer_start();
- void fgs_bp_start();
- void visual_object_sequence_start();
- void visual_object_sequence_end();
- void user_data_start();
- void user_data_start_SNC();
- void group_of_vop_start();
- void video_session_error();
- void visual_object_start();
- void vop_start();
- void slice_start();
- void extension_start();
- void fgs_vop_start();
- void fba_object_start();
- void fba_object_plane_start();
- void mesh_object_start();
- void mesh_object_plane_start();
- void still_texture_object_start();
- void texture_spatial_layer_start();
- void texture_snr_layer_start();
- void texture_tile_start();
- void texture_shape_layer_start();
- void stuffing_start();
- void reserved();
-
- //Streams
- struct stream
- {
- bool Searching_Payload;
-
- stream()
- {
- Searching_Payload=false;
- }
- };
- std::vector<stream> Streams;
-
- //Count of a Packets
- size_t IVOP_Count;
- size_t PVOP_Count;
- size_t BVOP_Count;
- size_t BVOP_Count_Max;
- size_t SVOP_Count;
- size_t NVOP_Count;
- size_t Interlaced_Top;
- size_t Interlaced_Bottom;
- int64u Frame_Count_InThisBlock_Max;
-
- //From video_object_layer
- int32u fixed_vop_time_increment;
- int32u Time_Begin_Seconds;
- int32u Time_End_Seconds;
- int16u Time_Begin_MilliSeconds;
- int16u Time_End_MilliSeconds;
- int16u object_layer_width;
- int16u object_layer_height;
- int16u vop_time_increment_resolution;
- int8u time_size;
- int8u visual_object_verid;
- int8u profile_and_level_indication;
- int8u no_of_sprite_warping_points;
- int8u aspect_ratio_info;
- int8u par_width;
- int8u par_height;
- int8u bits_per_pixel;
- int8u shape;
- int8u sprite_enable;
- int8u estimation_method;
- int8u chroma_format;
- int8u colour_primaries;
- int8u transfer_characteristics;
- int8u matrix_coefficients;
- bool quarter_sample;
- bool low_delay;
- bool load_intra_quant_mat;
- bool load_nonintra_quant_mat;
- bool load_intra_quant_mat_grayscale;
- bool load_nonintra_quant_mat_grayscale;
- bool interlaced;
- bool newpred_enable;
- bool reduced_resolution_vop_enable;
- bool scalability;
- bool enhancement_type;
- bool complexity_estimation_disable;
- bool opaque;
- bool transparent;
- bool intra_cae;
- bool inter_cae;
- bool no_update;
- bool upsampling;
- bool intra_blocks;
- bool inter_blocks;
- bool inter4v_blocks;
- bool not_coded_blocks;
- bool dct_coefs;
- bool dct_lines;
- bool vlc_symbols;
- bool vlc_bits;
- bool apm;
- bool npm;
- bool interpolate_mc_q;
- bool forw_back_mc_q;
- bool halfpel2;
- bool halfpel4;
- bool sadct;
- bool quarterpel;
- bool video_object_layer_start_IsParsed;
- bool quant_type;
- bool data_partitioned;
- bool reversible_vlc;
- bool colour_description;
-
- //From user_data
- Ztring Library;
- Ztring Library_Name;
- Ztring Library_Version;
- Ztring Library_Date;
- Ztring Matrix_intra;
- Ztring Matrix_nonintra;
- ZtringListList user_data_start_SNC_Data;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpegv.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpegv.cpp
deleted file mode 100644
index 46b5cc35e..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpegv.cpp
+++ /dev/null
@@ -1,4093 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos (Global)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEGV_YES) || defined(MEDIAINFO_MPEG4V_YES) || defined(MEDIAINFO_AVC_YES) || defined(MEDIAINFO_MPEG4_YES) || defined(MEDIAINFO_PRORES_YES)
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-#include "ZenLib/Conf.h"
-using namespace ZenLib;
-
-//---------------------------------------------------------------------------
-extern const char* Mpegv_colour_primaries(int8u colour_primaries)
-{
- switch (colour_primaries)
- {
- case 1 : return "BT.709";
- case 4 : return "BT.470 System M";
- case 5 : return "BT.601 PAL";
- case 6 : return "BT.601 NTSC";
- case 7 : return "SMPTE 240M"; //Same as BT.601 NTSC
- case 8 : return "Generic film";
- case 9 : return "BT.2020"; //Added in HEVC
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-extern const char* Mpegv_transfer_characteristics(int8u transfer_characteristics)
-{
- switch (transfer_characteristics)
- {
- case 1 : return "BT.709"; //Same as BT.609
- case 4 : return "BT.470 System M";
- case 5 : return "BT.470 System B, BT.470 System G";
- case 6 : return "BT.601";
- case 7 : return "SMPTE 240M";
- case 8 : return "Linear";
- case 9 : return "Logarithmic (100:1)"; //Added in MPEG-4 Visual
- case 10 : return "Logarithmic (316.22777:1)"; //Added in MPEG-4 Visual
- case 11 : return "IEC 61966-2-4"; //Added in AVC
- case 12 : return "BT.1361 extended colour gamut system"; //Added in AVC
- case 13 : return "sYCC"; //Added in HEVC
- case 14 : return "BT.2020"; //Added in HEVC
- case 15 : return "BT.2020"; //Added in HEVC
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-extern const char* Mpegv_matrix_coefficients(int8u matrix_coefficients)
-{
- switch (matrix_coefficients)
- {
- case 0 : return "RGB"; //Added in AVC
- case 1 : return "BT.709";
- case 4 : return "FCC 73.682";
- case 5 : return "BT.601";
- case 6 : return "BT.601";
- case 7 : return "SMPTE 240M";
- case 8 : return "YCgCo"; //Added in AVC
- case 9 : return "BT.2020 non-constant"; //Added in HEVC
- case 10 : return "BT.2020 constant"; //Added in HEVC
- default : return "";
- }
-}
-
-} //NameSpace
-
-#if !MEDIAINFO_ADVANCED
- const int64u Config_VariableGopDetection_Occurences=4;
-#endif // MEDIAINFO_ADVANCED
-//---------------------------------------------------------------------------
-#endif //...
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos (Global)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEGV_YES) || defined(MEDIAINFO_MPEGTS_YES) || defined(MEDIAINFO_MPEGPS_YES) || defined(MEDIAINFO_MXF_YES)
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-#include "ZenLib/Conf.h"
-using namespace ZenLib;
-
-//---------------------------------------------------------------------------
-extern const float32 Mpegv_frame_rate[16]=
-{
- (float32) 0,
- (float32)24000/(float32)1001,
- (float32)24,
- (float32)25,
- (float32)30000/(float32)1001,
- (float32)30,
- (float32)50,
- (float32)60000/(float32)1001,
- (float32)60,
- (float32) 0,
- (float32) 0,
- (float32) 0,
- (float32) 0,
- (float32) 0,
- (float32) 0,
- (float32) 0,
-};
-
-//---------------------------------------------------------------------------
-const char* Mpegv_Colorimetry_format[4]=
-{
- "",
- "4:2:0",
- "4:2:2",
- "4:4:4",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpegv_profile_and_level_indication (int8u profile_and_level_indication)
-{
- switch (profile_and_level_indication)
- {
- case 0x82 : return "4:2:2@High";
- case 0x85 : return "4:2:2@Main";
- case 0x8A : return "Multi-view@High";
- case 0x8B : return "Multi-view@High-1440";
- case 0x8D : return "Multi-view@Main";
- case 0x8E : return "Multi-view@Low";
- default : return "";
- }
-};
-
-//---------------------------------------------------------------------------
-const char* Mpegv_profile_and_level_indication_profile[]=
-{
- "0",
- "High",
- "Spatially Scalable",
- "SNR Scalable",
- "Main",
- "Simple",
- "6",
- "7",
-}; //4:2:2 Profile?
-
-//---------------------------------------------------------------------------
-const char* Mpegv_profile_and_level_indication_level[]=
-{
- "0",
- "1",
- "2",
- "3",
- "High",
- "4",
- "High 1440",
- "5",
- "Main",
- "6",
- "Low",
- "7",
- "8",
- "9",
- "10",
- "11",
-};
-
-} //NameSpace
-
-//---------------------------------------------------------------------------
-#endif //...
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_MPEGV_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Mpegv.h"
-#include "MediaInfo/TimeCode.h"
-#include "ZenLib/BitStream.h"
-#include "ZenLib/Utils.h"
-#if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- #include "MediaInfo/Text/File_DtvccTransport.h"
-#endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
-#if defined(MEDIAINFO_SCTE20_YES)
- #include "MediaInfo/Text/File_Scte20.h"
-#endif //defined(MEDIAINFO_SCTE20_YES)
-#if defined(MEDIAINFO_CDP_YES)
- #include "MediaInfo/Text/File_Cdp.h"
- #include <cstring>
-#endif //defined(MEDIAINFO_CDP_YES)
-#if defined(MEDIAINFO_AFDBARDATA_YES)
- #include "MediaInfo/Video/File_AfdBarData.h"
- #include <cstring>
-#endif //defined(MEDIAINFO_AFDBARDATA_YES)
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Events.h"
- #include "MediaInfo/MediaInfo_Events_Internal.h"
-#endif //MEDIAINFO_EVENTS
-#include <cmath>
-using namespace ZenLib;
-using namespace std;
-
-#undef FILLING_BEGIN
-#define FILLING_BEGIN() \
- while (Element_Offset<Element_Size && Buffer[Buffer_Offset+(size_t)Element_Offset]==0x00) \
- Element_Offset++; \
- if (Element_Offset!=Element_Size) \
- Trusted_IsNot("Size error"); \
- else if (Element_IsOK()) \
- { \
-
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-namespace MediaInfoLib
-{
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const float32 Mpegv_aspect_ratio1[]=
-{
- (float32)0,
- (float32)1,
- (float32)0.6735,
- (float32)0.7031, //16/9 PAL
- (float32)0.7615,
- (float32)0.8055,
- (float32)0.8437, //16/9 NTSC
- (float32)0.8935,
- (float32)0.9375, //4/3 PAL
- (float32)0.9815,
- (float32)1.0255,
- (float32)1.0695,
- (float32)1.1250, //4/3 NTSC
- (float32)1.1575,
- (float32)1.2015,
- (float32)0,
-};
-
-//---------------------------------------------------------------------------
-const float32 Mpegv_aspect_ratio2[]=
-{
- (float32)0,
- (float32)1,
- (float32)4/(float32)3,
- (float32)16/(float32)9,
- (float32)2.21,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
- (float32)0,
-};
-
-//---------------------------------------------------------------------------
-const char* Mpegv_video_format[]=
-{
- "Component",
- "PAL",
- "NTSC",
- "SECAM",
- "MAC",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Mpegv_picture_structure[]=
-{
- "",
- "T", //Top Field
- "B", //Bottom Field
- "F", //Frame
-};
-
-const char* Mpegv_picture_coding_type[]=
-{
- "",
- "I",
- "P",
- "B",
- "D",
- "",
- "",
- "",
-};
-
-const char* Mpegv_extension_start_code_identifier[]=
-{
- "",
- "Sequence",
- "Sequence Display",
- "Quant Matrix",
- "Copyright",
- "Sequence Scalable",
- "",
- "Picture Display",
- "Picture Coding",
- "Picture Spatial Scalable",
- "Picture Temporal Scalable",
- "Camera Parameters",
- "ITU-T",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_MACROBLOCKS
-const int8u Mpegv_block_count[4]=
-{
- 0,
- 6,
- 8,
- 12,
-};
-
-const File__Analyze::vlc Mpegv_macroblock_address_increment[]=
-{
- // macroblock_address_increment
- { 1 , 1 , 0 , 0 , 1 },
- { 2 , 2 , 0 , 0 , 3 },
- { 3 , 0 , 0 , 0 , 2 },
- { 2 , 1 , 0 , 0 , 5 },
- { 3 , 0 , 0 , 0 , 4 },
- { 2 , 1 , 0 , 0 , 7 },
- { 3 , 0 , 0 , 0 , 6 },
- { 6 , 2 , 0 , 0 , 9 },
- { 7 , 0 , 0 , 0 , 8 },
- { 6 , 1 , 0 , 0 , 15 },
- { 7 , 0 , 0 , 0 , 14 },
- { 8 , 0 , 0 , 0 , 13 },
- { 9 , 0 , 0 , 0 , 12 },
- { 10 , 0 , 0 , 0 , 11 },
- { 11 , 0 , 0 , 0 , 10 },
- { 18 , 2 , 0 , 0 , 21 },
- { 19 , 0 , 0 , 0 , 20 },
- { 20 , 0 , 0 , 0 , 19 },
- { 21 , 0 , 0 , 0 , 18 },
- { 22 , 0 , 0 , 0 , 17 },
- { 23 , 0 , 0 , 0 , 16 },
- { 8 , 1 , 2 , 0 , 33 }, //Escape
- { 24 , 0 , 0 , 0 , 33 },
- { 25 , 0 , 0 , 0 , 32 },
- { 26 , 0 , 0 , 0 , 31 },
- { 27 , 0 , 0 , 0 , 30 },
- { 28 , 0 , 0 , 0 , 29 },
- { 29 , 0 , 0 , 0 , 28 },
- { 30 , 0 , 0 , 0 , 27 },
- { 31 , 0 , 0 , 0 , 26 },
- { 32 , 0 , 0 , 0 , 25 },
- { 33 , 0 , 0 , 0 , 24 },
- { 34 , 0 , 0 , 0 , 23 },
- { 35 , 0 , 0 , 0 , 22 },
- VLC_END
-};
-const File__Analyze::vlc Mpegv_dct_dc_size_luminance[]=
-{
- { 0, 2, 0, 0, 1},
- { 1, 0, 0, 0, 2},
- { 4, 1, 0, 0, 0},
- { 5, 0, 0, 0, 3},
- { 6, 0, 0, 0, 4},
- { 14, 1, 0, 0, 5},
- { 30, 1, 0, 0, 6},
- { 62, 1, 0, 0, 7},
- { 126, 1, 0, 0, 8},
- { 254, 1, 0, 0, 9},
- { 510, 1, 0, 0, 10},
- { 511, 0, 0, 0, 11},
- VLC_END
-};
-
-const File__Analyze::vlc Mpegv_dct_dc_size_chrominance[]=
-{
- { 0, 2, 0, 0, 0},
- { 1, 0, 0, 0, 1},
- { 2, 0, 0, 0, 2},
- { 6, 1, 0, 0, 3},
- { 14, 1, 0, 0, 4},
- { 30, 1, 0, 0, 5},
- { 62, 1, 0, 0, 6},
- { 126, 1, 0, 0, 7},
- { 254, 1, 0, 0, 8},
- { 510, 1, 0, 0, 9},
- { 1022, 1, 0, 0, 10},
- { 1023, 0, 0, 0, 11},
- VLC_END
-};
-
-const File__Analyze::vlc Mpegv_dct_coefficients_0[]=
-{
- // Run Level
- { 2 , 2 , 3 , 0 , 1 }, // End of Block (others) or Run=0/Level=1 (first DCT)
- { 3 , 0 , 3 , 0 , -1 }, // End of Block (others) or Run=0/Level=1 (first DCT)
- { 6 , 2 , 0 , 1 , 1 },
- { 7 , 0 , 0 , 1 , -1 },
- { 8 , 1 , 0 , 0 , 2 },
- { 9 , 0 , 0 , 0 , -2 },
- { 10 , 0 , 0 , 2 , 1 },
- { 11 , 0 , 0 , 2 , -1 },
- { 1 , 1 , 2 , 0 , 0 }, // Escape
- { 10 , 0 , 0 , 0 , 3 },
- { 11 , 0 , 0 , 0 , -3 },
- { 12 , 0 , 0 , 4 , 1 },
- { 13 , 0 , 0 , 4 , -1 },
- { 14 , 0 , 0 , 3 , 1 },
- { 15 , 0 , 0 , 3 , -1 },
- { 8 , 1 , 0 , 7 , 1 },
- { 9 , 0 , 0 , 7 , -1 },
- { 10 , 0 , 0 , 6 , 1 },
- { 11 , 0 , 0 , 6 , -1 },
- { 12 , 0 , 0 , 1 , 2 },
- { 13 , 0 , 0 , 1 , -2 },
- { 14 , 0 , 0 , 5 , 1 },
- { 15 , 0 , 0 , 5 , -1 },
- { 8 , 1 , 0 , 2 , 2 },
- { 9 , 0 , 0 , 2 , -2 },
- { 10 , 0 , 0 , 9 , 1 },
- { 11 , 0 , 0 , 9 , -1 },
- { 12 , 0 , 0 , 0 , 4 },
- { 13 , 0 , 0 , 0 , -4 },
- { 14 , 0 , 0 , 8 , 1 },
- { 15 , 0 , 0 , 8 , -1 },
- { 64 , 1 , 0 , 13 , 1 },
- { 65 , 0 , 0 , 13 , -1 },
- { 66 , 0 , 0 , 0 , 6 },
- { 67 , 0 , 0 , 0 , -6 },
- { 68 , 0 , 0 , 12 , 1 },
- { 69 , 0 , 0 , 12 , -1 },
- { 70 , 0 , 0 , 11 , 1 },
- { 71 , 0 , 0 , 11 , -1 },
- { 72 , 0 , 0 , 3 , 2 },
- { 73 , 0 , 0 , 3 , -2 },
- { 74 , 0 , 0 , 1 , 3 },
- { 75 , 0 , 0 , 1 , -3 },
- { 76 , 0 , 0 , 0 , 5 },
- { 77 , 0 , 0 , 0 , -5 },
- { 78 , 0 , 0 , 10 , 1 },
- { 79 , 0 , 0 , 10 , -1 },
- { 16 , 2 , 0 , 16 , 1 },
- { 17 , 0 , 0 , 16 , -1 },
- { 18 , 0 , 0 , 5 , 2 },
- { 19 , 0 , 0 , 5 , -2 },
- { 20 , 0 , 0 , 0 , 7 },
- { 21 , 0 , 0 , 0 , -7 },
- { 22 , 0 , 0 , 2 , 3 },
- { 23 , 0 , 0 , 2 , -3 },
- { 24 , 0 , 0 , 1 , 4 },
- { 25 , 0 , 0 , 1 , -4 },
- { 26 , 0 , 0 , 15 , 1 },
- { 27 , 0 , 0 , 15 , -1 },
- { 28 , 0 , 0 , 14 , 1 },
- { 29 , 0 , 0 , 14 , -1 },
- { 30 , 0 , 0 , 4 , 2 },
- { 31 , 0 , 0 , 4 , -2 },
- { 32 , 2 , 0 , 0 , 11 },
- { 33 , 0 , 0 , 0 , -11 },
- { 34 , 0 , 0 , 8 , 2 },
- { 35 , 0 , 0 , 8 , -2 },
- { 36 , 0 , 0 , 4 , 3 },
- { 37 , 0 , 0 , 4 , -3 },
- { 38 , 0 , 0 , 0 , 10 },
- { 39 , 0 , 0 , 0 , -10 },
- { 40 , 0 , 0 , 2 , 4 },
- { 41 , 0 , 0 , 2 , -4 },
- { 42 , 0 , 0 , 7 , 2 },
- { 43 , 0 , 0 , 7 , -2 },
- { 44 , 0 , 0 , 21 , 1 },
- { 45 , 0 , 0 , 21 , -1 },
- { 46 , 0 , 0 , 20 , 1 },
- { 47 , 0 , 0 , 20 , -1 },
- { 48 , 0 , 0 , 0 , 9 },
- { 49 , 0 , 0 , 0 , -9 },
- { 50 , 0 , 0 , 19 , 1 },
- { 51 , 0 , 0 , 19 , -1 },
- { 52 , 0 , 0 , 18 , 1 },
- { 53 , 0 , 0 , 18 , -1 },
- { 54 , 0 , 0 , 1 , 5 },
- { 55 , 0 , 0 , 1 , -5 },
- { 56 , 0 , 0 , 3 , 3 },
- { 57 , 0 , 0 , 3 , -3 },
- { 58 , 0 , 0 , 0 , 8 },
- { 59 , 0 , 0 , 0 , -8 },
- { 60 , 0 , 0 , 6 , 2 },
- { 61 , 0 , 0 , 6 , -2 },
- { 62 , 0 , 0 , 17 , 1 },
- { 63 , 0 , 0 , 17 , -1 },
- { 32 , 1 , 0 , 10 , 2 },
- { 33 , 0 , 0 , 10 , -2 },
- { 34 , 0 , 0 , 9 , 2 },
- { 35 , 0 , 0 , 9 , -2 },
- { 36 , 0 , 0 , 5 , 3 },
- { 37 , 0 , 0 , 5 , -3 },
- { 38 , 0 , 0 , 3 , 4 },
- { 39 , 0 , 0 , 3 , -4 },
- { 40 , 0 , 0 , 2 , 5 },
- { 41 , 0 , 0 , 2 , -5 },
- { 42 , 0 , 0 , 1 , 7 },
- { 43 , 0 , 0 , 1 , -7 },
- { 44 , 0 , 0 , 1 , 6 },
- { 45 , 0 , 0 , 1 , -6 },
- { 46 , 0 , 0 , 0 , 15 },
- { 47 , 0 , 0 , 0 , -15 },
- { 48 , 0 , 0 , 0 , 14 },
- { 49 , 0 , 0 , 0 , -14 },
- { 50 , 0 , 0 , 0 , 13 },
- { 51 , 0 , 0 , 0 , -13 },
- { 52 , 0 , 0 , 0 , 12 },
- { 53 , 0 , 0 , 0 , -12 },
- { 54 , 0 , 0 , 26 , 1 },
- { 55 , 0 , 0 , 26 , -1 },
- { 56 , 0 , 0 , 25 , 1 },
- { 57 , 0 , 0 , 25 , -1 },
- { 58 , 0 , 0 , 24 , 1 },
- { 59 , 0 , 0 , 24 , -1 },
- { 60 , 0 , 0 , 23 , 1 },
- { 61 , 0 , 0 , 23 , -1 },
- { 62 , 0 , 0 , 22 , 1 },
- { 63 , 0 , 0 , 22 , -1 },
- { 32 , 1 , 0 , 0 , 31 },
- { 33 , 0 , 0 , 0 , -31 },
- { 34 , 0 , 0 , 0 , 30 },
- { 35 , 0 , 0 , 0 , -30 },
- { 36 , 0 , 0 , 0 , 29 },
- { 37 , 0 , 0 , 0 , -29 },
- { 38 , 0 , 0 , 0 , 28 },
- { 39 , 0 , 0 , 0 , -28 },
- { 40 , 0 , 0 , 0 , 27 },
- { 41 , 0 , 0 , 0 , -27 },
- { 42 , 0 , 0 , 0 , 26 },
- { 43 , 0 , 0 , 0 , -26 },
- { 44 , 0 , 0 , 0 , 25 },
- { 45 , 0 , 0 , 0 , -25 },
- { 46 , 0 , 0 , 0 , 24 },
- { 47 , 0 , 0 , 0 , -24 },
- { 48 , 0 , 0 , 0 , 23 },
- { 49 , 0 , 0 , 0 , -23 },
- { 50 , 0 , 0 , 0 , 22 },
- { 51 , 0 , 0 , 0 , -22 },
- { 52 , 0 , 0 , 0 , 21 },
- { 53 , 0 , 0 , 0 , -21 },
- { 54 , 0 , 0 , 0 , 20 },
- { 55 , 0 , 0 , 0 , -20 },
- { 56 , 0 , 0 , 0 , 19 },
- { 57 , 0 , 0 , 0 , -19 },
- { 58 , 0 , 0 , 0 , 18 },
- { 59 , 0 , 0 , 0 , -18 },
- { 60 , 0 , 0 , 0 , 17 },
- { 61 , 0 , 0 , 0 , -17 },
- { 62 , 0 , 0 , 0 , 16 },
- { 63 , 0 , 0 , 0 , -16 },
- { 32 , 1 , 0 , 0 , 40 },
- { 33 , 0 , 0 , 0 , -40 },
- { 34 , 0 , 0 , 0 , 39 },
- { 35 , 0 , 0 , 0 , -39 },
- { 36 , 0 , 0 , 0 , 38 },
- { 37 , 0 , 0 , 0 , -38 },
- { 38 , 0 , 0 , 0 , 37 },
- { 39 , 0 , 0 , 0 , -37 },
- { 40 , 0 , 0 , 0 , 36 },
- { 41 , 0 , 0 , 0 , -36 },
- { 42 , 0 , 0 , 0 , 35 },
- { 43 , 0 , 0 , 0 , -35 },
- { 44 , 0 , 0 , 0 , 34 },
- { 45 , 0 , 0 , 0 , -34 },
- { 46 , 0 , 0 , 0 , 33 },
- { 47 , 0 , 0 , 0 , -33 },
- { 48 , 0 , 0 , 0 , 32 },
- { 49 , 0 , 0 , 0 , -32 },
- { 50 , 0 , 0 , 1 , 14 },
- { 51 , 0 , 0 , 1 , -14 },
- { 52 , 0 , 0 , 1 , 13 },
- { 53 , 0 , 0 , 1 , -13 },
- { 54 , 0 , 0 , 1 , 12 },
- { 55 , 0 , 0 , 1 , -12 },
- { 56 , 0 , 0 , 1 , 11 },
- { 57 , 0 , 0 , 1 , -11 },
- { 58 , 0 , 0 , 1 , 10 },
- { 59 , 0 , 0 , 1 , -10 },
- { 60 , 0 , 0 , 1 , 9 },
- { 61 , 0 , 0 , 1 , -9 },
- { 62 , 0 , 0 , 1 , 8 },
- { 63 , 0 , 0 , 1 , -8 },
- { 32 , 1 , 0 , 1 , 18 },
- { 33 , 0 , 0 , 1 , -18 },
- { 34 , 0 , 0 , 1 , 17 },
- { 35 , 0 , 0 , 1 , -17 },
- { 36 , 0 , 0 , 1 , 16 },
- { 37 , 0 , 0 , 1 , -16 },
- { 38 , 0 , 0 , 1 , 15 },
- { 39 , 0 , 0 , 1 , -15 },
- { 40 , 0 , 0 , 6 , 3 },
- { 41 , 0 , 0 , 6 , -3 },
- { 42 , 0 , 0 , 16 , 2 },
- { 43 , 0 , 0 , 16 , -2 },
- { 44 , 0 , 0 , 15 , 2 },
- { 45 , 0 , 0 , 15 , -2 },
- { 46 , 0 , 0 , 14 , 2 },
- { 47 , 0 , 0 , 14 , -2 },
- { 48 , 0 , 0 , 13 , 2 },
- { 49 , 0 , 0 , 13 , -2 },
- { 50 , 0 , 0 , 12 , 2 },
- { 51 , 0 , 0 , 12 , -2 },
- { 52 , 0 , 0 , 11 , 2 },
- { 53 , 0 , 0 , 11 , -2 },
- { 54 , 0 , 0 , 31 , 1 },
- { 55 , 0 , 0 , 31 , -1 },
- { 56 , 0 , 0 , 30 , 1 },
- { 57 , 0 , 0 , 30 , -1 },
- { 58 , 0 , 0 , 29 , 1 },
- { 59 , 0 , 0 , 29 , -1 },
- { 60 , 0 , 0 , 28 , 1 },
- { 61 , 0 , 0 , 28 , -1 },
- { 62 , 0 , 0 , 27 , 1 },
- { 63 , 0 , 0 , 27 , -1 },
- {(int32u)-1, (int8u)-1, 1, -1, -1} //
-};
-
-const File__Analyze::vlc Mpegv_dct_coefficients_1[]=
-{
- // Run Level
- { 4 , 3 , 0 , 0 , 1 },
- { 5 , 0 , 0 , 0 , -1 },
- { 4 , 1 , 0 , 1 , 1 },
- { 5 , 0 , 0 , 1 , -1 },
- { 6 , 0 , 1 , 0 , 0 },
- { 12 , 0 , 0 , 0 , 2 },
- { 13 , 0 , 0 , 0 , -2 },
- { 14 , 1 , 0 , 0 , 3 },
- { 15 , 0 , 0 , 0 , -3 },
- { 1 , 1 , 2 , 0 , 0 },
- { 10 , 0 , 0 , 2 , 1 },
- { 11 , 0 , 0 , 2 , -1 },
- { 12 , 0 , 0 , 1 , 2 },
- { 13 , 0 , 0 , 1 , -2 },
- { 14 , 0 , 0 , 3 , 1 },
- { 15 , 0 , 0 , 3 , -1 },
- { 56 , 0 , 0 , 0 , 4 },
- { 57 , 0 , 0 , 0 , -4 },
- { 58 , 0 , 0 , 0 , 5 },
- { 59 , 0 , 0 , 0 , -5 },
- { 8 , 1 , 0 , 0 , 7 },
- { 9 , 0 , 0 , 0 , -7 },
- { 10 , 0 , 0 , 0 , 6 },
- { 11 , 0 , 0 , 0 , -6 },
- { 12 , 0 , 0 , 4 , 1 },
- { 13 , 0 , 0 , 4 , -1 },
- { 14 , 0 , 0 , 5 , 1 },
- { 15 , 0 , 0 , 5 , -1 },
- { 8 , 1 , 0 , 7 , 1 },
- { 9 , 0 , 0 , 7 , -1 },
- { 10 , 0 , 0 , 8 , 1 },
- { 11 , 0 , 0 , 8 , -1 },
- { 12 , 0 , 0 , 6 , 1 },
- { 13 , 0 , 0 , 6 , -1 },
- { 14 , 0 , 0 , 2 , 2 },
- { 15 , 0 , 0 , 2 , -2 },
- { 240 , 0 , 0 , 9 , 1 },
- { 241 , 0 , 0 , 9 , -1 },
- { 242 , 0 , 0 , 1 , 3 },
- { 243 , 0 , 0 , 1 , -3 },
- { 244 , 0 , 0 , 10 , 1 },
- { 245 , 0 , 0 , 10 , -1 },
- { 246 , 0 , 0 , 0 , 8 },
- { 247 , 0 , 0 , 0 , -8 },
- { 248 , 0 , 0 , 0 , 9 },
- { 249 , 0 , 0 , 0 , -9 },
- { 64 , 1 , 0 , 1 , 5 },
- { 65 , 0 , 0 , 1 , -5 },
- { 66 , 0 , 0 , 11 , 1 },
- { 67 , 0 , 0 , 11 , -1 },
- { 68 , 0 , 0 , 0 , 11 },
- { 69 , 0 , 0 , 0 , -11 },
- { 70 , 0 , 0 , 0 , 10 },
- { 71 , 0 , 0 , 0 , -10 },
- { 72 , 0 , 0 , 13 , 1 },
- { 73 , 0 , 0 , 13 , -1 },
- { 74 , 0 , 0 , 12 , 1 },
- { 75 , 0 , 0 , 12 , -1 },
- { 76 , 0 , 0 , 3 , 2 },
- { 77 , 0 , 0 , 3 , -2 },
- { 78 , 0 , 0 , 1 , 4 },
- { 79 , 0 , 0 , 1 , -4 },
- { 500 , 0 , 0 , 0 , 12 },
- { 501 , 0 , 0 , 0 , -12 },
- { 502 , 0 , 0 , 0 , 13 },
- { 503 , 0 , 0 , 0 , -13 },
- { 504 , 0 , 0 , 2 , 3 },
- { 505 , 0 , 0 , 2 , -3 },
- { 506 , 0 , 0 , 4 , 2 },
- { 507 , 0 , 0 , 4 , -2 },
- { 508 , 0 , 0 , 0 , 14 },
- { 509 , 0 , 0 , 0 , -14 },
- { 510 , 0 , 0 , 0 , 15 },
- { 511 , 0 , 0 , 0 , -15 },
- { 8 , 1 , 0 , 5 , 2 },
- { 9 , 0 , 0 , 5 , -2 },
- { 10 , 0 , 0 , 14 , 1 },
- { 11 , 0 , 0 , 14 , -1 },
- { 14 , 0 , 0 , 15 , 1 },
- { 15 , 0 , 0 , 15 , -1 },
- { 24 , 1 , 0 , 2 , 4 },
- { 25 , 0 , 0 , 2 , -4 },
- { 26 , 0 , 0 , 16 , 1 },
- { 27 , 0 , 0 , 16 , -1 },
- { 34 , 2 , 0 , 8 , 2 },
- { 35 , 0 , 0 , 8 , -2 },
- { 36 , 0 , 0 , 4 , 3 },
- { 37 , 0 , 0 , 4 , -3 },
- { 42 , 0 , 0 , 7 , 2 },
- { 43 , 0 , 0 , 7 , -2 },
- { 44 , 0 , 0 , 21 , 1 },
- { 45 , 0 , 0 , 21 , -1 },
- { 46 , 0 , 0 , 20 , 1 },
- { 47 , 0 , 0 , 20 , -1 },
- { 50 , 0 , 0 , 19 , 1 },
- { 51 , 0 , 0 , 19 , -1 },
- { 52 , 0 , 0 , 18 , 1 },
- { 53 , 0 , 0 , 18 , -1 },
- { 56 , 0 , 0 , 3 , 3 },
- { 57 , 0 , 0 , 3 , -3 },
- { 60 , 0 , 0 , 6 , 2 },
- { 61 , 0 , 0 , 6 , -2 },
- { 62 , 0 , 0 , 17 , 1 },
- { 63 , 0 , 0 , 17 , -1 },
- { 32 , 1 , 0 , 10 , 2 },
- { 33 , 0 , 0 , 10 , -2 },
- { 34 , 0 , 0 , 9 , 2 },
- { 35 , 0 , 0 , 9 , -2 },
- { 36 , 0 , 0 , 5 , 3 },
- { 37 , 0 , 0 , 5 , -3 },
- { 38 , 0 , 0 , 3 , 4 },
- { 39 , 0 , 0 , 3 , -4 },
- { 40 , 0 , 0 , 2 , 5 },
- { 41 , 0 , 0 , 2 , -5 },
- { 42 , 0 , 0 , 1 , 7 },
- { 43 , 0 , 0 , 1 , -7 },
- { 44 , 0 , 0 , 1 , 6 },
- { 45 , 0 , 0 , 1 , -6 },
- { 54 , 0 , 0 , 26 , 1 },
- { 55 , 0 , 0 , 26 , -1 },
- { 56 , 0 , 0 , 25 , 1 },
- { 57 , 0 , 0 , 25 , -1 },
- { 58 , 0 , 0 , 24 , 1 },
- { 59 , 0 , 0 , 24 , -1 },
- { 60 , 0 , 0 , 23 , 1 },
- { 61 , 0 , 0 , 23 , -1 },
- { 62 , 0 , 0 , 22 , 1 },
- { 63 , 0 , 0 , 22 , -1 },
- { 32 , 1 , 0 , 0 , 31 },
- { 33 , 0 , 0 , 0 , -31 },
- { 34 , 0 , 0 , 0 , 30 },
- { 35 , 0 , 0 , 0 , -30 },
- { 36 , 0 , 0 , 0 , 29 },
- { 37 , 0 , 0 , 0 , -29 },
- { 38 , 0 , 0 , 0 , 28 },
- { 39 , 0 , 0 , 0 , -28 },
- { 40 , 0 , 0 , 0 , 27 },
- { 41 , 0 , 0 , 0 , -27 },
- { 42 , 0 , 0 , 0 , 26 },
- { 43 , 0 , 0 , 0 , -26 },
- { 44 , 0 , 0 , 0 , 25 },
- { 45 , 0 , 0 , 0 , -25 },
- { 46 , 0 , 0 , 0 , 24 },
- { 47 , 0 , 0 , 0 , -24 },
- { 48 , 0 , 0 , 0 , 23 },
- { 49 , 0 , 0 , 0 , -23 },
- { 50 , 0 , 0 , 0 , 22 },
- { 51 , 0 , 0 , 0 , -22 },
- { 52 , 0 , 0 , 0 , 21 },
- { 53 , 0 , 0 , 0 , -21 },
- { 54 , 0 , 0 , 0 , 20 },
- { 55 , 0 , 0 , 0 , -20 },
- { 56 , 0 , 0 , 0 , 19 },
- { 57 , 0 , 0 , 0 , -19 },
- { 58 , 0 , 0 , 0 , 18 },
- { 59 , 0 , 0 , 0 , -18 },
- { 60 , 0 , 0 , 0 , 17 },
- { 61 , 0 , 0 , 0 , -17 },
- { 62 , 0 , 0 , 0 , 16 },
- { 63 , 0 , 0 , 0 , -16 },
- { 32 , 1 , 0 , 0 , 40 },
- { 33 , 0 , 0 , 0 , -40 },
- { 34 , 0 , 0 , 0 , 39 },
- { 35 , 0 , 0 , 0 , -39 },
- { 36 , 0 , 0 , 0 , 38 },
- { 37 , 0 , 0 , 0 , -38 },
- { 38 , 0 , 0 , 0 , 37 },
- { 39 , 0 , 0 , 0 , -37 },
- { 40 , 0 , 0 , 0 , 36 },
- { 41 , 0 , 0 , 0 , -36 },
- { 42 , 0 , 0 , 0 , 35 },
- { 43 , 0 , 0 , 0 , -35 },
- { 44 , 0 , 0 , 0 , 34 },
- { 45 , 0 , 0 , 0 , -34 },
- { 46 , 0 , 0 , 0 , 33 },
- { 47 , 0 , 0 , 0 , -33 },
- { 48 , 0 , 0 , 0 , 32 },
- { 49 , 0 , 0 , 0 , -32 },
- { 50 , 0 , 0 , 1 , 14 },
- { 51 , 0 , 0 , 1 , -14 },
- { 52 , 0 , 0 , 1 , 13 },
- { 53 , 0 , 0 , 1 , -13 },
- { 54 , 0 , 0 , 1 , 12 },
- { 55 , 0 , 0 , 1 , -12 },
- { 56 , 0 , 0 , 1 , 11 },
- { 57 , 0 , 0 , 1 , -11 },
- { 58 , 0 , 0 , 1 , 10 },
- { 59 , 0 , 0 , 1 , -10 },
- { 60 , 0 , 0 , 1 , 9 },
- { 61 , 0 , 0 , 1 , -9 },
- { 62 , 0 , 0 , 1 , 8 },
- { 63 , 0 , 0 , 1 , -8 },
- { 32 , 1 , 0 , 1 , 18 },
- { 33 , 0 , 0 , 1 , -18 },
- { 34 , 0 , 0 , 1 , 17 },
- { 35 , 0 , 0 , 1 , -17 },
- { 36 , 0 , 0 , 1 , 16 },
- { 37 , 0 , 0 , 1 , -16 },
- { 38 , 0 , 0 , 1 , 15 },
- { 39 , 0 , 0 , 1 , -15 },
- { 40 , 0 , 0 , 6 , 3 },
- { 41 , 0 , 0 , 6 , -3 },
- { 42 , 0 , 0 , 16 , 2 },
- { 43 , 0 , 0 , 16 , -2 },
- { 44 , 0 , 0 , 15 , 2 },
- { 45 , 0 , 0 , 15 , -2 },
- { 46 , 0 , 0 , 14 , 2 },
- { 47 , 0 , 0 , 14 , -2 },
- { 48 , 0 , 0 , 13 , 2 },
- { 49 , 0 , 0 , 13 , -2 },
- { 50 , 0 , 0 , 12 , 2 },
- { 51 , 0 , 0 , 12 , -2 },
- { 52 , 0 , 0 , 11 , 2 },
- { 53 , 0 , 0 , 11 , -2 },
- { 54 , 0 , 0 , 31 , 1 },
- { 55 , 0 , 0 , 31 , -1 },
- { 56 , 0 , 0 , 30 , 1 },
- { 57 , 0 , 0 , 30 , -1 },
- { 58 , 0 , 0 , 29 , 1 },
- { 59 , 0 , 0 , 29 , -1 },
- { 60 , 0 , 0 , 28 , 1 },
- { 61 , 0 , 0 , 28 , -1 },
- { 62 , 0 , 0 , 27 , 1 },
- { 63 , 0 , 0 , 27 , -1 },
- {(int32u)-1, (int8u)-1, 1, -1, -1} //
-};
-
-const File__Analyze::vlc Mpegv_macroblock_type_I[]=
-{
- { 1, 1, 0, 0, 0x02},
- { 1, 1, 0, 0, 0x22},
- VLC_END
-};
-
-const File__Analyze::vlc Mpegv_macroblock_type_P[]=
-{
- { 1, 1, 0, 0, 0x14},
- { 1, 1, 0, 0, 0x04},
- { 1, 1, 0, 0, 0x10},
- { 3, 2, 0, 0, 0x02},
- { 2, 0, 0, 0, 0x34},
- { 1, 0, 0, 0, 0x24},
- { 1, 1, 0, 0, 0x22},
- {(int32u)-1,(int8u)-1, 0, 0, 0}
-};
-
-const File__Analyze::vlc Mpegv_macroblock_type_B[]=
-{
- { 2 , 2 , 0 , 0 , 0x18 },
- { 3 , 0 , 0 , 0 , 0x1C },
- { 2 , 1 , 0 , 0 , 0x08 },
- { 3 , 0 , 0 , 0 , 0x0C },
- { 2 , 1 , 0 , 0 , 0x10 },
- { 3 , 0 , 0 , 0 , 0x14 },
- { 3 , 1 , 0 , 0 , 0x02 },
- { 2 , 0 , 0 , 0 , 0x3C },
- { 3 , 1 , 0 , 0 , 0x34 },
- { 2 , 0 , 0 , 0 , 0x2C },
- { 1 , 0 , 0 , 0 , 0x22 },
- VLC_END
-};
-
-const File__Analyze::vlc Mpegv_motion_code[]=
-{
- { 1 , 1 , 0 , 0 , 0 },
- { 1 , 1 , 0 , 0 , 1 },
- { 1 , 1 , 0 , 0 , 2 },
- { 1 , 1 , 0 , 0 , 3 },
- { 3 , 2 , 0 , 0 , 4 },
- { 5 , 1 , 0 , 0 , 5 },
- { 4 , 0 , 0 , 0 , 6 },
- { 3 , 0 , 0 , 0 , 7 },
- { 11 , 2 , 0 , 0 , 8 },
- { 10 , 0 , 0 , 0 , 9 },
- { 9 , 0 , 0 , 0 , 10 },
- { 17 , 1 , 0 , 0 , 11 },
- { 16 , 0 , 0 , 0 , 12 },
- { 15 , 0 , 0 , 0 , 13 },
- { 14 , 0 , 0 , 0 , 14 },
- { 13 , 0 , 0 , 0 , 15 },
- { 12 , 0 , 0 , 0 , 16 },
-
- VLC_END
-};
-
-const File__Analyze::vlc Mpegv_dmvector[]=
-{
- { 0 , 1 , 0 , 0 , 0 },
- { 2 , 1 , 0 , 0 , 1 },
- { 3 , 0 , 0 , 0 , -1 },
- VLC_END
-};
-
-const File__Analyze::vlc Mpegv_coded_block_pattern[]=
-{
- // cbp
- { 7 , 3 , 0 , 0 , 60 },
- { 13 , 1 , 0 , 0 , 4 },
- { 12 , 0 , 0 , 0 , 8 },
- { 11 , 0 , 0 , 0 , 16 },
- { 10 , 0 , 0 , 0 , 32 },
- { 19 , 1 , 0 , 0 , 12 },
- { 18 , 0 , 0 , 0 , 48 },
- { 17 , 0 , 0 , 0 , 20 },
- { 16 , 0 , 0 , 0 , 40 },
- { 15 , 0 , 0 , 0 , 28 },
- { 14 , 0 , 0 , 0 , 44 },
- { 13 , 0 , 0 , 0 , 52 },
- { 12 , 0 , 0 , 0 , 56 },
- { 11 , 0 , 0 , 0 , 1 },
- { 10 , 0 , 0 , 0 , 61 },
- { 9 , 0 , 0 , 0 , 2 },
- { 8 , 0 , 0 , 0 , 62 },
- { 15 , 1 , 0 , 0 , 24 },
- { 14 , 0 , 0 , 0 , 36 },
- { 13 , 0 , 0 , 0 , 3 },
- { 12 , 0 , 0 , 0 , 63 },
- { 23 , 1 , 0 , 0 , 5 },
- { 22 , 0 , 0 , 0 , 9 },
- { 21 , 0 , 0 , 0 , 17 },
- { 20 , 0 , 0 , 0 , 33 },
- { 19 , 0 , 0 , 0 , 6 },
- { 18 , 0 , 0 , 0 , 10 },
- { 17 , 0 , 0 , 0 , 18 },
- { 16 , 0 , 0 , 0 , 34 },
- { 31 , 1 , 0 , 0 , 7 },
- { 30 , 0 , 0 , 0 , 11 },
- { 29 , 0 , 0 , 0 , 19 },
- { 28 , 0 , 0 , 0 , 35 },
- { 27 , 0 , 0 , 0 , 13 },
- { 26 , 0 , 0 , 0 , 49 },
- { 25 , 0 , 0 , 0 , 21 },
- { 24 , 0 , 0 , 0 , 41 },
- { 23 , 0 , 0 , 0 , 14 },
- { 22 , 0 , 0 , 0 , 50 },
- { 21 , 0 , 0 , 0 , 22 },
- { 20 , 0 , 0 , 0 , 42 },
- { 19 , 0 , 0 , 0 , 15 },
- { 18 , 0 , 0 , 0 , 51 },
- { 17 , 0 , 0 , 0 , 23 },
- { 16 , 0 , 0 , 0 , 43 },
- { 15 , 0 , 0 , 0 , 25 },
- { 14 , 0 , 0 , 0 , 37 },
- { 13 , 0 , 0 , 0 , 26 },
- { 12 , 0 , 0 , 0 , 38 },
- { 11 , 0 , 0 , 0 , 29 },
- { 10 , 0 , 0 , 0 , 45 },
- { 9 , 0 , 0 , 0 , 53 },
- { 8 , 0 , 0 , 0 , 57 },
- { 7 , 0 , 0 , 0 , 30 },
- { 6 , 0 , 0 , 0 , 46 },
- { 5 , 0 , 0 , 0 , 54 },
- { 4 , 0 , 0 , 0 , 58 },
- { 7 , 1 , 0 , 0 , 31 },
- { 6 , 0 , 0 , 0 , 47 },
- { 5 , 0 , 0 , 0 , 55 },
- { 4 , 0 , 0 , 0 , 59 },
- { 3 , 0 , 0 , 0 , 27 },
- { 2 , 0 , 0 , 0 , 39 },
- { 1 , 0 , 0 , 0 , 0 },
- VLC_END
-};
-
-#endif //MEDIAINFO_MACROBLOCKS
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Mpegv::File_Mpegv()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("MPEG Video");
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Mpegv;
- StreamIDs_Width[0]=16;
- #endif //MEDIAINFO_EVENTS
- #if MEDIAINFO_TRACE
- Trace_Layers_Update(8); //Stream
- #endif //MEDIAINFO_TRACE
- Trusted_Multiplier=2;
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
- PTS_DTS_Needed=true;
- IsRawStream=true;
- Frame_Count_NotParsedIncluded=0;
-
- //In
- MPEG_Version=1;
- Frame_Count_Valid=MediaInfoLib::Config.ParseSpeed_Get()>=0.3?512:2;
- FrameIsAlwaysComplete=false;
- TimeCodeIsNotTrustable=false;
- #if defined(MEDIAINFO_ANCILLARY_YES)
- Ancillary=NULL;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
- #if MEDIAINFO_ADVANCED
- InitDataNotRepeated_Optional=false;
- #endif // MEDIAINFO_ADVANCED
-
- //temporal_reference
- TemporalReference_Offset=0;
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- GA94_03_Parser=NULL;
- GA94_03_TemporalReference_Offset=0;
- GA94_03_IsPresent=false;
- Text_Positions.push_back(text_position(GA94_03_Parser));
- CC___Parser=NULL;
- CC___IsPresent=false;
- Text_Positions.push_back(text_position(CC___Parser));
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- #if defined(MEDIAINFO_SCTE20_YES)
- Scte_Parser=NULL;
- Scte_TemporalReference_Offset=0;
- Scte_IsPresent=false;
- Text_Positions.push_back(text_position(Scte_Parser));
- #endif //defined(MEDIAINFO_SCTE20_YES)
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- DTG1_Parser=NULL;
- GA94_06_Parser=NULL;
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
- #if defined(MEDIAINFO_CDP_YES)
- Cdp_Parser=NULL;
- Cdp_IsPresent=false;
- Text_Positions.push_back(text_position(Cdp_Parser));
- #endif //defined(MEDIAINFO_CDP_YES)
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- AfdBarData_Parser=NULL;
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
-
- //Temp
- SizeToAnalyse_Begin=1*1024*1024;
- SizeToAnalyse_End=1*1024*1024;
- Frame_Count_LastIFrame=(int64u)-1;
- Searching_TimeStamp_Start_DoneOneTime=false;
- sequence_header_IsParsed=false;
- FrameInfo.DTS=0;
- Parsing_End_ForDTS=false;
-
- //Macroblocks
- #if MEDIAINFO_MACROBLOCKS
- Macroblocks_Parse=false;
- #endif //MEDIAINFO_MACROBLOCKS
-
- #if MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
- Slices_Count=0;
- Has_sequence_header=false;
- Has_sequence_extension=false;
- #endif // MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
-}
-
-//---------------------------------------------------------------------------
-File_Mpegv::~File_Mpegv()
-{
- for (size_t Pos=0; Pos<TemporalReference.size(); Pos++)
- delete TemporalReference[Pos]; //TemporalReference[Pos]=NULL;
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- delete GA94_03_Parser; //GA94_03_Parser=NULL;
- delete CC___Parser; //CC___Parser=NULL;
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- #if defined(MEDIAINFO_SCTE20_YES)
- delete Scte_Parser; //Scte_Parser=NULL;
- #endif //defined(MEDIAINFO_SCTE20_YES)
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- delete DTG1_Parser; //DTG1_Parser=NULL;
- delete GA94_06_Parser; //GA94_06_Parser=NULL;
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
-
- //Macroblocks
- #if MEDIAINFO_MACROBLOCKS
- if (Macroblocks_Parse)
- {
- delete[] macroblock_address_increment_Vlc.Array; //macroblock_address_increment_Vlc.Array=NULL;
- delete[] macroblock_address_increment_Vlc.BitsToSkip; //macroblock_address_increment_Vlc.Size=NULL;
- delete[] dct_dc_size_luminance.Array; //dct_dc_size_luminance.Array=NULL;
- delete[] dct_dc_size_luminance.BitsToSkip; //dct_dc_size_luminance.Size=NULL;
- delete[] dct_dc_size_chrominance.Array; //dct_dc_size_chrominance.Array=NULL;
- delete[] dct_dc_size_chrominance.BitsToSkip; //dct_dc_size_chrominance.Size=NULL;
- delete[] dct_coefficients_0.Array; //dct_coefficients_0.Array=NULL;
- delete[] dct_coefficients_0.BitsToSkip; //dct_coefficients_0.Size=NULL;
- delete[] dct_coefficients_1.Array; //dct_coefficients_1.Array=NULL;
- delete[] dct_coefficients_1.BitsToSkip; //dct_coefficients_1.Size=NULL;
- }
- #endif //MEDIAINFO_MACROBLOCKS
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpegv::Streams_Accept()
-{
- Stream_Prepare(Stream_Video);
-}
-
-//---------------------------------------------------------------------------
-void File_Mpegv::Streams_Update()
-{
- for (size_t Text_Positions_Pos=0; Text_Positions_Pos<Text_Positions.size(); Text_Positions_Pos++)
- {
- if (*Text_Positions[Text_Positions_Pos].Parser && (*Text_Positions[Text_Positions_Pos].Parser)->Status[IsUpdated])
- {
- Update(*Text_Positions[Text_Positions_Pos].Parser);
- for (size_t Pos=0; Pos<(*Text_Positions[Text_Positions_Pos].Parser)->Count_Get(Stream_Text); Pos++)
- {
- //Saving previous Muxing mode
- Ztring MuxingMode=Retrieve(Stream_Text, Text_Positions[Text_Positions_Pos].StreamPos+Pos, "MuxingMode");
-
- bool IsNewStream=false;
- if (Retrieve(Stream_Text, Text_Positions[Text_Positions_Pos].StreamPos+Pos, Text_ID)!=(*Text_Positions[Text_Positions_Pos].Parser)->Get(Stream_Text, Pos, Text_ID))
- {
- Stream_Prepare(Stream_Text, Text_Positions[Text_Positions_Pos].StreamPos+Pos);
- for (size_t Text_Positions_Pos2=Text_Positions_Pos+1; Text_Positions_Pos2<Text_Positions.size(); Text_Positions_Pos2++)
- Text_Positions[Text_Positions_Pos2].StreamPos++;
- IsNewStream=true;
- }
- Merge(*(*Text_Positions[Text_Positions_Pos].Parser), Stream_Text, Pos, Text_Positions[Text_Positions_Pos].StreamPos+Pos);
- Ztring LawRating=(*Text_Positions[Text_Positions_Pos].Parser)->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=(*Text_Positions[Text_Positions_Pos].Parser)->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
-
- if (IsNewStream)
- {
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- if ((*Text_Positions[Text_Positions_Pos].Parser)==GA94_03_Parser)
- MuxingMode=__T("A/53 / ")+Retrieve(Stream_Text, Text_Positions[Text_Positions_Pos].StreamPos+Pos, "MuxingMode");
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- #if defined(MEDIAINFO_SCTE20_YES)
- if ((*Text_Positions[Text_Positions_Pos].Parser)==Scte_Parser)
- MuxingMode=Retrieve(Stream_Text, Text_Positions[Text_Positions_Pos].StreamPos+Pos, "MuxingMode");
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- #if defined(MEDIAINFO_GXF_YES) && defined(MEDIAINFO_CDP_YES)
- if ((*Text_Positions[Text_Positions_Pos].Parser)==Cdp_Parser)
- MuxingMode=__T("Ancillary data / ")+Retrieve(Stream_Text, Text_Positions[Text_Positions_Pos].StreamPos+Pos, "MuxingMode");
- #endif //defined(MEDIAINFO_GXF_YES) && defined(MEDIAINFO_CDP_YES)
- }
- Fill(Stream_Text, Text_Positions[Text_Positions_Pos].StreamPos+Pos, "MuxingMode", MuxingMode, true);
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpegv::Streams_Fill()
-{
- //Version
- if (MPEG_Version==2)
- {
- Fill(Stream_General, 0, General_Format_Version, "Version 2");
- Fill(Stream_Video, 0, Video_Format, "MPEG Video");
- Fill(Stream_Video, 0, Video_Format_Version, "Version 2");
- Fill(Stream_Video, 0, Video_Format_Commercial, "MPEG-2 Video");
- Fill(Stream_Video, 0, Video_Codec, "MPEG-2V");
- Fill(Stream_Video, 0, Video_Codec_String, "MPEG-2 Video", Unlimited, true, true);
- }
- else
- {
- Fill(Stream_General, 0, General_Format_Version, "Version 1");
- Fill(Stream_Video, 0, Video_Format, "MPEG Video");
- Fill(Stream_Video, 0, Video_Format_Version, "Version 1");
- Fill(Stream_Video, 0, Video_Format_Commercial, "MPEG-1 Video");
- Fill(Stream_Video, 0, Video_Codec, "MPEG-1V");
- Fill(Stream_Video, 0, Video_Codec_String, "MPEG-1 Video", Unlimited, true, true);
- }
-
- Fill(Stream_Video, 0, Video_Width, 0x1000*horizontal_size_extension+horizontal_size_value);
- Fill(Stream_Video, 0, Video_Height, 0x1000*vertical_size_extension+vertical_size_value);
- Fill(Stream_Video, 0, Video_Colorimetry, Mpegv_Colorimetry_format[chroma_format]);
- Fill(Stream_Video, 0, Video_ColorSpace, "YUV");
- Fill(Stream_Video, 0, Video_BitDepth, 8);
-
- //AspectRatio
- if (MPEG_Version==2)
- {
- if (aspect_ratio_information==0)
- ;//Forbidden
- else if (aspect_ratio_information==1)
- Fill(Stream_Video, 0, Video_PixelAspectRatio, 1.000, 3, true);
- else if (display_horizontal_size && display_vertical_size)
- {
- if (vertical_size_value && Mpegv_aspect_ratio2[aspect_ratio_information])
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, (float)(0x1000*horizontal_size_extension+horizontal_size_value)/(0x1000*vertical_size_extension+vertical_size_value)
- *Mpegv_aspect_ratio2[aspect_ratio_information]/((float)display_horizontal_size/display_vertical_size), 3, true);
- }
- else if (Mpegv_aspect_ratio2[aspect_ratio_information])
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, Mpegv_aspect_ratio2[aspect_ratio_information], 3, true);
- }
- else //Version 1
- {
- if (vertical_size_value && Mpegv_aspect_ratio1[aspect_ratio_information])
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, (float)(0x1000*horizontal_size_extension+horizontal_size_value)/(0x1000*vertical_size_extension+vertical_size_value)/Mpegv_aspect_ratio1[aspect_ratio_information], 3, true);
- }
-
- //FrameRate
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, (float)(Mpegv_frame_rate[frame_rate_code] * (frame_rate_extension_n + 1)) / (float)(frame_rate_extension_d + 1));
-
- //BitRate
- if (vbv_delay==0xFFFF || (MPEG_Version==1 && bit_rate_value==0x3FFFF))
- Fill(Stream_Video, 0, Video_BitRate_Mode, "VBR");
- if (bit_rate_value_IsValid && (bit_rate_extension>0 || bit_rate_value!=0x3FFFF))
- Fill(Stream_Video, 0, Video_BitRate_Maximum, ((((int32u)bit_rate_extension<<12))+bit_rate_value)*400);
-
- //Interlacement
- if (MPEG_Version==1)
- {
- Fill(Stream_Video, 0, Video_ScanType, "Progressive");
- Fill(Stream_Video, 0, Video_Interlacement, "PPF");
- }
- else if (progressive_frame_Count && progressive_frame_Count!=Frame_Count && progressive_frame_Count!=Frame_Count+1) //In case the stream is cut before a slice
- {
- //This is mixed
- }
- else if (Frame_Count>0) //Only if we have at least one progressive_frame definition
- {
- if (progressive_sequence || progressive_frame_Count==Frame_Count || progressive_frame_Count==Frame_Count+1)
- {
- Fill(Stream_Video, 0, Video_ScanType, "Progressive");
- Fill(Stream_Video, 0, Video_Interlacement, "PPF");
- if (!progressive_sequence && !(Interlaced_Top && Interlaced_Bottom) && !(!Interlaced_Top && !Interlaced_Bottom))
- Fill(Stream_Video, 0, Video_ScanOrder, Interlaced_Top?"TFF":"BFF");
- }
- else
- {
- Fill(Stream_Video, 0, Video_ScanType, "Interlaced");
- if ((Interlaced_Top && Interlaced_Bottom) || (!Interlaced_Top && !Interlaced_Bottom))
- Fill(Stream_Video, 0, Video_Interlacement, "Interlaced");
- else
- {
- Fill(Stream_Video, 0, Video_ScanOrder, Interlaced_Top?"TFF":"BFF");
- Fill(Stream_Video, 0, Video_Interlacement, Interlaced_Top?"TFF":"BFF");
- }
- if (!(PictureStructure_Field && PictureStructure_Frame) && !(!PictureStructure_Field && !PictureStructure_Frame))
- Fill(Stream_Video, 0, Video_Format_Settings_PictureStructure, PictureStructure_Field?"Field":"Frame");
- }
- std::string TempRef;
- for (size_t Pos=0; Pos<TemporalReference.size(); Pos++)
- if (TemporalReference[Pos] && TemporalReference[Pos]->HasPictureCoding)
- {
- TempRef+=TemporalReference[Pos]->top_field_first?"T":"B";
- TempRef+=TemporalReference[Pos]->repeat_first_field?"3":"2";
- }
- if (TempRef.find('3')!=std::string::npos)
- {
- if (TempRef.find("T2T3B2B3T2T3B2B3")!=std::string::npos
- || TempRef.find("B2B3T2T3B2B3T2T3")!=std::string::npos)
- {
- Fill(Stream_Video, 0, Video_ScanOrder, "2:3 Pulldown", Unlimited, true, true);
- Fill(Stream_Video, 0, Video_FrameRate, FrameRate*24/30, 3, true); //Real framerate
- Fill(Stream_Video, 0, Video_ScanType, "Progressive", Unlimited, true, true);
- Fill(Stream_Video, 0, Video_Interlacement, "PPF", Unlimited, true, true);
- }
- if (TempRef.find("T2T2T2T2T2T2T2T2T2T2T2T3B2B2B2B2B2B2B2B2B2B2B2B3")!=std::string::npos
- || TempRef.find("B2B2B2B2B2B2B2B2B2B2B2B3T2T2T2T2T2T2T2T2T2T2T2T3")!=std::string::npos)
- {
- Fill(Stream_Video, 0, Video_ScanOrder, "2:2:2:2:2:2:2:2:2:2:2:3 Pulldown", Unlimited, true, true);
- Fill(Stream_Video, 0, Video_FrameRate, FrameRate*24/25, 3, true); //Real framerate
- Fill(Stream_Video, 0, Video_ScanType, "Progressive", Unlimited, true, true);
- Fill(Stream_Video, 0, Video_Interlacement, "PPF", Unlimited, true, true);
- }
- }
- }
-
- //Profile
- if (!profile_and_level_indication_escape && profile_and_level_indication_profile!=(int8u)-1 && profile_and_level_indication_level!=(int8u)-1)
- {
- Fill(Stream_Video, 0, Video_Format_Profile, Ztring().From_Local(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile])+__T("@")+Ztring().From_Local(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level]));
- Fill(Stream_Video, 0, Video_Codec_Profile, Ztring().From_Local(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile])+__T("@")+Ztring().From_Local(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level]));
- }
- else if (profile_and_level_indication_escape)
- {
- Fill(Stream_Video, 0, Video_Format_Profile, Ztring().From_Local(Mpegv_profile_and_level_indication(profile_and_level_indication)));
- Fill(Stream_Video, 0, Video_Codec_Profile, Ztring().From_Local(Mpegv_profile_and_level_indication(profile_and_level_indication)));
- }
-
- //Standard
- Fill(Stream_Video, 0, Video_Standard, Mpegv_video_format[video_format]);
- if (colour_description)
- {
- Fill(Stream_Video, 0, Video_colour_description_present, "Yes");
- Fill(Stream_Video, 0, Video_colour_primaries, Mpegv_colour_primaries(colour_primaries));
- Fill(Stream_Video, 0, Video_transfer_characteristics, Mpegv_transfer_characteristics(transfer_characteristics));
- Fill(Stream_Video, 0, Video_matrix_coefficients, Mpegv_matrix_coefficients(matrix_coefficients));
- }
-
- //Matrix
- if (load_intra_quantiser_matrix || load_non_intra_quantiser_matrix)
- {
- Fill(Stream_Video, 0, Video_Format_Settings, "CustomMatrix");
- Fill(Stream_Video, 0, Video_Format_Settings_Matrix, "Custom");
- Fill(Stream_Video, 0, Video_Format_Settings_Matrix_Data, Matrix_intra);
- Fill(Stream_Video, 0, Video_Format_Settings_Matrix_Data, Matrix_nonintra);
- Fill(Stream_Video, 0, Video_Codec_Settings, "CustomMatrix");
- Fill(Stream_Video, 0, Video_Codec_Settings_Matrix, "Custom");
- }
- else
- {
- Fill(Stream_Video, 0, Video_Format_Settings_Matrix, "Default");
- Fill(Stream_Video, 0, Video_Codec_Settings_Matrix, "Default");
- }
-
- //library
- if (Library.size()>=8)
- {
- Fill(Stream_Video, 0, Video_Encoded_Library, Library);
- Fill(Stream_Video, 0, Video_Encoded_Library_Name, Library_Name);
- Fill(Stream_Video, 0, Video_Encoded_Library_Version, Library_Version);
- Fill(Stream_General, 0, General_Encoded_Library, Library);
- Fill(Stream_General, 0, General_Encoded_Library_Name, Library_Name);
- Fill(Stream_General, 0, General_Encoded_Library_Version, Library_Version);
- }
-
- //Delay
- if (group_start_FirstPass && !TimeCodeIsNotTrustable && Time_Begin_Seconds!=Error)
- {
- float64 Time_Begin=((float64)Time_Begin_Seconds)*1000;
- if (FrameRate)
- Time_Begin+=((float64)Time_Begin_Frames)*1000/FrameRate;
- Fill(Stream_Video, 0, Video_Delay, Time_Begin, 0);
- Fill(Stream_Video, 0, Video_Delay_Settings, Ztring(__T("drop_frame_flag="))+(group_start_drop_frame_flag?__T("1"):__T("0")));
- Fill(Stream_Video, 0, Video_Delay_Settings, Ztring(__T("closed_gop="))+(group_start_closed_gop?__T("1"):__T("0")));
- Fill(Stream_Video, 0, Video_Delay_Settings, Ztring(__T("broken_link="))+(group_start_broken_link?__T("1"):__T("0")));
- Fill(Stream_Video, 0, Video_Delay_Source, "Stream");
- Fill(Stream_Video, 0, Video_Delay_DropFrame, group_start_drop_frame_flag?"Yes":"No");
-
- if (group_start_closed_gop_Closed+group_start_closed_gop_Open>=4
- && ((group_start_closed_gop && group_start_closed_gop_Closed==1)
- || group_start_closed_gop_Closed==0
- || group_start_closed_gop_Open==0)) // Testing a couple of GOPs, and coherant
- {
- if (group_start_closed_gop_Open)
- {
- Fill(Stream_Video, 0, "Gop_OpenClosed", "Open");
- if (group_start_closed_gop)
- Fill(Stream_Video, 0, "Gop_OpenClosed_FirstFrame", "Closed");
- }
- else
- {
- Fill(Stream_Video, 0, "Gop_OpenClosed", "Closed");
- }
- }
-
- Fill(Stream_Video, 0, Video_TimeCode_FirstFrame, TimeCode_FirstFrame.c_str());
- if (IsSub)
- Fill(Stream_Video, 0, Video_TimeCode_Source, "Group of pictures header");
- }
-
- //BVOP
- if (BVOP_Count>0)
- {
- Fill(Stream_Video, 0, Video_Format_Settings, "BVOP");
- Fill(Stream_Video, 0, Video_Format_Settings_BVOP, "Yes");
- }
- else
- Fill(Stream_Video, 0, Video_Format_Settings_BVOP, "No");
-
- //Buffer
- Fill(Stream_Video, 0, Video_BufferSize, 2*1024*((((int32u)vbv_buffer_size_extension)<<10)+vbv_buffer_size_value));
-
- //Autorisation of other streams
- if (!Status[IsAccepted])
- {
- NextCode_Clear();
- NextCode_Add(0x00);
- NextCode_Add(0xB8);
- }
- #if MEDIAINFO_MACROBLOCKS
- if (!Macroblocks_Parse)
- #endif //MEDIAINFO_MACROBLOCKS
- for (int8u Pos=0x01; Pos<=0xAF; Pos++)
- Streams[Pos].Searching_Payload=false;
- Streams[0xB8].Searching_TimeStamp_End=true;
- if (IsSub)
- {
- Streams[0xB3].Searching_TimeStamp_End=true;
- Streams[0x00].Searching_TimeStamp_End=true;
- }
-
- //Caption may be in user_data, must be activated if full parsing is requested
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES) || defined(MEDIAINFO_SCTE20_YES) || (defined(MEDIAINFO_GXF_YES) && defined(MEDIAINFO_CDP_YES))
- Streams[0x00].Searching_Payload=GA94_03_IsPresent || Cdp_IsPresent;
- Streams[0xB2].Searching_Payload=GA94_03_IsPresent || CC___IsPresent || Scte_IsPresent;
- Streams[0xB3].Searching_Payload=GA94_03_IsPresent || Cdp_IsPresent;
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES) || defined(MEDIAINFO_SCTE20_YES) || (defined(MEDIAINFO_GXF_YES) && defined(MEDIAINFO_CDP_YES))
- if (Config->ParseSpeed>=1)
- {
- Streams[0x00].Searching_Payload=true;
- Streams[0xB2].Searching_Payload=true;
- Streams[0xB3].Searching_Payload=true;
- Streams[0xB5].Searching_Payload=true;
- }
-
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- if (DTG1_Parser)
- Merge(*DTG1_Parser, Stream_Video, 0, 0);
- if (GA94_06_Parser)
- {
- Merge(*GA94_06_Parser, Stream_Video, 0, 0);
- Ztring LawRating=GA94_06_Parser->Retrieve(Stream_General, 0, General_LawRating);
- if (!LawRating.empty())
- Fill(Stream_General, 0, General_LawRating, LawRating, true);
- Ztring Title=GA94_06_Parser->Retrieve(Stream_General, 0, General_Title);
- if (!Title.empty() && Retrieve(Stream_General, 0, General_Title).empty())
- Fill(Stream_General, 0, General_Title, Title);
- }
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- if (AfdBarData_Parser)
- Merge(*AfdBarData_Parser, Stream_Video, 0, 0);
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
-
- //extra
- if (intra_dc_precision!=(int8u)-1)
- {
- Fill(Stream_Video, 0, "intra_dc_precision", 8+intra_dc_precision);
- (*Stream_More)[Stream_Video][0](Ztring().From_Local("intra_dc_precision"), Info_Options)=__T("N NT");
- }
-
- //Commercial name
- if (Retrieve(Stream_Video, 0, Video_Format_Version)==__T("Version 2")
- && Retrieve(Stream_Video, 0, Video_DisplayAspectRatio)==__T("1.778")
- && Retrieve(Stream_Video, 0, Video_BitDepth)==__T("8")
- && Retrieve(Stream_Video, 0, Video_ChromaSubsampling)==__T("4:2:0"))
- {
- //HDV1
- if (Retrieve(Stream_Video, 0, Video_Width)==__T("1280")
- && Retrieve(Stream_Video, 0, Video_Height)==__T("720")
- && Retrieve(Stream_Video, 0, Video_ScanType)==__T("Progressive")
- && (Retrieve(Stream_Video, 0, Video_FrameRate)==__T("60.000") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("59.940") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("30.000") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("29.970") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("24.000") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("23.976") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("50.000") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("25.000"))
- && (Retrieve(Stream_Video, 0, Video_Format_Profile)==__T("Main@High") || Retrieve(Stream_Video, 0, Video_Format_Profile)==__T("Main@High 1440"))
- && Retrieve(Stream_Video, 0, Video_BitRate).To_int64u()<20000000 && Retrieve(Stream_Video, 0, Video_BitRate_Maximum).To_int64u()<20000000)
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "HDV 720p");
-
- //HDV2
- if (Retrieve(Stream_Video, 0, Video_Width)==__T("1440")
- && Retrieve(Stream_Video, 0, Video_Height)==__T("1080")
- && Retrieve(Stream_Video, 0, Video_Format_Profile)==__T("Main@High 1440")
- && Retrieve(Stream_Video, 0, Video_BitRate).To_int64u()<27000000 && Retrieve(Stream_Video, 0, Video_BitRate_Maximum).To_int64u()<27000000)
- {
- //Interlaced
- if (Retrieve(Stream_Video, 0, Video_ScanType)==__T("Interlaced")
- && (Retrieve(Stream_Video, 0, Video_FrameRate)==__T("30.000") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("29.970") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("50.000") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("25.000")))
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "HDV 1080i");
-
- //Progressive
- if (Retrieve(Stream_Video, 0, Video_ScanType)==__T("Progressive")
- && (Retrieve(Stream_Video, 0, Video_FrameRate)==__T("30.000") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("29.970") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("24.000") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("23.976") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("50.000") || Retrieve(Stream_Video, 0, Video_FrameRate)==__T("25.000")))
- Fill(Stream_Video, 0, Video_Format_Commercial_IfAny, "HDV 1080p");
- }
- }
-}
-
-//---------------------------------------------------------------------------
-void File_Mpegv::Streams_Finish()
-{
- //Duration
- if (PTS_End>PTS_Begin)
- {
- if (PTS_End_temporal_reference<temporal_reference_Max)
- {
- int64u tc_ToAdd=tc/((progressive_sequence || picture_structure==3)?1:2); //Progressive of Frame
- PTS_End+=tc_ToAdd*(temporal_reference_Max-PTS_End_temporal_reference-1); //TODO: handle cases with 3:2 Pulldown (different progressive_sequence / picture_structure)
- }
- Fill(Stream_Video, 0, Video_Duration, float64_int64s(((float64)(PTS_End-PTS_Begin))/1000000));
- }
- else if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- {
- Fill(Stream_Video, 0, Video_FrameCount, Frame_Count_NotParsedIncluded);
- if (FrameRate)
- Fill(Stream_Video, 0, Video_Duration, Frame_Count_NotParsedIncluded/FrameRate*1000, 0);
- }
- else if (!TimeCodeIsNotTrustable && Time_End_Seconds!=Error && FrameRate)
- {
- TimeCode Time_Begin_TC;
- Time_Begin_TC.FramesPerSecond=(int8u)ceil(FrameRate);
- Time_Begin_TC.DropFrame=group_start_IsParsed?group_start_drop_frame_flag:((FrameRate-ceil(FrameRate))?true:false);
- Time_Begin_TC.Hours=(int8u)(Time_Begin_Seconds/3600);
- Time_Begin_TC.Minutes=(int8u)((Time_Begin_Seconds%3600)/60);
- Time_Begin_TC.Seconds=(int8u)(Time_Begin_Seconds%60);
- Time_Begin_TC.Frames=(int8u)Time_Begin_Frames;
- TimeCode Time_End_TC;
- Time_End_TC.FramesPerSecond=(int8u)ceil(FrameRate);
- Time_End_TC.DropFrame=Time_Begin_TC.DropFrame;
- Time_End_TC.Hours=(int8u)(Time_End_Seconds/3600);
- Time_End_TC.Minutes=(int8u)((Time_End_Seconds%3600)/60);
- Time_End_TC.Seconds=(int8u)(Time_End_Seconds%60);
- Time_End_TC.Frames=(int8u)Time_End_Frames;
- int64u Time_Begin_FrameCount=Time_Begin_TC.ToFrames();
- int64u Time_End_FrameCount = Time_End_TC.ToFrames();
- Fill(Stream_Video, 0, Video_FrameCount, Time_End_FrameCount-Time_Begin_FrameCount, 0);
- Fill(Stream_Video, 0, Video_Duration, (Time_End_FrameCount-Time_Begin_FrameCount)/FrameRate*1000, 0);
- }
-
- //picture_coding_types
- if (!picture_coding_types.empty())
- {
- int64u MaxCount=0;
- int64u Total=0;
- string MaxCount_type;
- for (std::map<std::string, int64u>::iterator Temp=picture_coding_types.begin(); Temp!=picture_coding_types.end(); ++Temp)
- {
- if (Temp->second>MaxCount)
- {
- MaxCount=Temp->second;
- MaxCount_type=Temp->first;
- }
- Total+=Temp->second;
- }
-
- if (Total>=4)
- {
- int64u Count=0;
- for (std::map<std::string, int64u>::iterator Temp=picture_coding_types.begin(); Temp!=picture_coding_types.end(); ++Temp)
- if (Temp->first!=MaxCount_type)
- Count+=Temp->second;
-
- if (Count<Total/2 && Count<Config_VariableGopDetection_Occurences)
- {
- size_t M=1;
- size_t M_Max=1;
- for (size_t Pos=1; Pos<MaxCount_type.size(); Pos++)
- if (MaxCount_type[Pos]==__T('B'))
- {
- M++;
- if (M>M_Max)
- M_Max=M;
- }
- else
- M=1;
- Ztring GOP;
- if (M_Max>1)
- {
- GOP+=__T("M=");
- GOP+=Ztring::ToZtring(M_Max);
- GOP+=__T(", ");
- }
- GOP+=__T("N=");
- GOP+=Ztring::ToZtring(MaxCount_type.size());
- Fill(Stream_Video, 0, Video_Format_Settings_GOP, GOP, true);
- }
- else
- Fill(Stream_Video, 0, Video_Format_Settings_GOP, "Variable", Unlimited, true, true);
- }
- }
-
- //InitDataNotRepeated
- #if MEDIAINFO_ADVANCED
- if (!InitDataNotRepeated_Optional && Config_InitDataNotRepeated_Occurences!=(int64u)-1)
- Fill(Stream_Video, 0, "InitDataRepeated", InitDataNotRepeated>=Config_InitDataNotRepeated_Occurences?"No":"Yes", Unlimited, true, true);
- #endif // MEDIAINFO_ADVANCED
-
- //Other parsers
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- if (GA94_03_Parser && !GA94_03_Parser->Status[IsFinished] && GA94_03_Parser->Status[IsAccepted])
- Finish(GA94_03_Parser);
- if (CC___Parser && !CC___Parser->Status[IsFinished] && CC___Parser->Status[IsAccepted])
- Finish(CC___Parser);
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- #if defined(MEDIAINFO_SCTE20_YES)
- if (Scte_Parser && !Scte_Parser->Status[IsFinished] && Scte_Parser->Status[IsAccepted])
- Finish(Scte_Parser);
- #endif //defined(MEDIAINFO_SCTE20_YES)
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- if (DTG1_Parser && !DTG1_Parser->Status[IsFinished] && DTG1_Parser->Status[IsAccepted])
- {
- Finish(DTG1_Parser);
- Merge(*DTG1_Parser, Stream_Video, 0, 0);
- }
- if (GA94_06_Parser && !GA94_06_Parser->Status[IsFinished] && GA94_06_Parser->Status[IsAccepted])
- {
- Finish(GA94_06_Parser);
- Merge(*GA94_06_Parser, Stream_Video, 0, 0);
- }
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
- #if defined(MEDIAINFO_CDP_YES)
- if (Cdp_Parser && !Cdp_Parser->Status[IsFinished] && Cdp_Parser->Status[IsAccepted])
- Finish(Cdp_Parser);
- #endif //defined(MEDIAINFO_CDP_YES)
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- if (AfdBarData_Parser && !AfdBarData_Parser->Status[IsFinished] && AfdBarData_Parser->Status[IsAccepted])
- {
- Finish(AfdBarData_Parser);
- Merge(*AfdBarData_Parser, Stream_Video, 0, 0);
- }
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
-
- #if MEDIAINFO_IBIUSAGE
- int64u Numerator=0, Denominator=0;
- switch (frame_rate_code)
- {
- case 1 : Numerator=24000; Denominator=1001; break;
- case 2 : Numerator=24; Denominator=1; break;
- case 3 : Numerator=25; Denominator=1; break;
- case 4 : Numerator=30000; Denominator=1001; break;
- case 5 : Numerator=30; Denominator=1; break;
- case 6 : Numerator=50; Denominator=1; break;
- case 7 : Numerator=60000; Denominator=1001; break;
- case 8 : Numerator=60; Denominator=1; break;
- default: ;
- }
- if (Numerator)
- {
- Numerator*=frame_rate_extension_n+1;
- Denominator*=frame_rate_extension_d+1;
- Ibi_Stream_Finish(Numerator, Denominator);
- }
- #endif //MEDIAINFO_IBIUSAGE
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Mpegv::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+4>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x01)
- {
- Synched=false;
- return true;
- }
-
- //Quick search
- if (!Header_Parser_QuickSearch())
- return false;
-
- #if MEDIAINFO_IBIUSAGE
- if ((Ibi_SliceParsed && (Buffer[Buffer_Offset+3]==0x00)) || Buffer[Buffer_Offset+3]==0xB3) // picture_start without sequence_header or sequence_header
- {
- if (Buffer_Offset+6>Buffer_Size)
- return false;
- bool RandomAccess=(Buffer[Buffer_Offset+5]&0x38)==0x08 || Buffer[Buffer_Offset+3]==0xB3; //picture_start with I-Frame || sequence_header
- if (RandomAccess)
- Ibi_Add();
-
- Ibi_SliceParsed=false;
- }
- #endif //MEDIAINFO_IBIUSAGE
-
- //We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Mpegv::Synched_Init()
-{
- //Temp
- BVOP_Count=0;
- progressive_frame_Count=0;
- Interlaced_Top=0;
- Interlaced_Bottom=0;
- PictureStructure_Field=0;
- PictureStructure_Frame=0;
- display_horizontal_size=0;
- display_vertical_size=0;
- vbv_delay=0;
- vbv_buffer_size_value=0;
- Time_Current_Seconds=Error;
- Time_Current_Frames=(int8u)-1;
- Time_Begin_Seconds=Error;
- Time_Begin_Frames=(int8u)-1;
- Time_End_Seconds=Error;
- Time_End_Frames=(int8u)-1;
- picture_coding_type=(int8u)-1;
- bit_rate_value=0;
- FrameRate=0;
- horizontal_size_value=0;
- vertical_size_value=0;
- bit_rate_extension=0;
- temporal_reference_Old=(int16u)-1;
- temporal_reference_Max=0;
- aspect_ratio_information=0;
- frame_rate_code=0;
- profile_and_level_indication_profile=(int8u)-1;
- profile_and_level_indication_level=(int8u)-1;
- chroma_format=1; //Default is 4:2:0
- horizontal_size_extension=0;
- vertical_size_extension=0;
- frame_rate_extension_n=0;
- frame_rate_extension_d=0;
- video_format=5; //Unspecified video format
- colour_primaries=(int8u)-1;
- transfer_characteristics=(int8u)-1;
- matrix_coefficients=(int8u)-1;
- vbv_buffer_size_extension=0;
- intra_dc_precision=(int8u)-1;
- load_intra_quantiser_matrix=false;
- load_non_intra_quantiser_matrix=false;
- progressive_sequence=true; //progressive by default
- top_field_first=false;
- repeat_first_field=false;
- FirstFieldFound=false;
- group_start_IsParsed=false;
- group_start_FirstPass=false;
- PTS_LastIFrame=(int64u)-1;
- PTS_End_temporal_reference=(int16u)-1;
- bit_rate_value_IsValid=false;
- profile_and_level_indication_escape=false;
- colour_description=false;
- low_delay=false;
- RefFramesCount=0;
- BVOPsSinceLastRefFrames=0;
- temporal_reference_LastIFrame=0;
- tc=0;
- IFrame_IsParsed=false;
- IFrame_Count=0;
- #if MEDIAINFO_IBIUSAGE
- Ibi_SliceParsed=true;
- #endif //MEDIAINFO_IBIUSAGE
- #if MEDIAINFO_ADVANCED
- Config_VariableGopDetection_Occurences=MediaInfoLib::Config.VariableGopDetection_Occurences_Get();
- Config_VariableGopDetection_GiveUp=MediaInfoLib::Config.VariableGopDetection_GiveUp_Get();
- InitDataNotRepeated=0;
- Config_InitDataNotRepeated_Occurences=MediaInfoLib::Config.InitDataNotRepeated_Occurences_Get();
- Config_InitDataNotRepeated_GiveUp=MediaInfoLib::Config.InitDataNotRepeated_GiveUp_Get();
- #endif //MEDIAINFO_ADVANCED
-
- //Default stream values
- Streams.resize(0x100);
- Streams[0xB3].Searching_Payload=true;
- for (int8u Pos=0xFF; Pos>=0xB9; Pos--)
- Streams[Pos].Searching_Payload=true; //Testing MPEG-PS
-
- //Macroblocks
- #if MEDIAINFO_MACROBLOCKS
- Macroblocks_Parse=Config->File_Macroblocks_Parse_Get();
- if (Macroblocks_Parse)
- {
- macroblock_address_increment_Vlc.Array=NULL;
- macroblock_address_increment_Vlc.Vlc=Mpegv_macroblock_address_increment;
- macroblock_address_increment_Vlc.Size=11;
- Get_VL_Prepare(macroblock_address_increment_Vlc);
- dct_dc_size_luminance.Array=NULL;
- dct_dc_size_luminance.Vlc=Mpegv_dct_dc_size_luminance;
- dct_dc_size_luminance.Size=9;
- Get_VL_Prepare(dct_dc_size_luminance);
- dct_dc_size_chrominance.Array=NULL;
- dct_dc_size_chrominance.Vlc=Mpegv_dct_dc_size_chrominance;
- dct_dc_size_chrominance.Size=10;
- Get_VL_Prepare(dct_dc_size_chrominance);
- dct_coefficients_0.Array=NULL;
- dct_coefficients_0.Vlc=Mpegv_dct_coefficients_0;
- dct_coefficients_0.Size=17;
- Get_VL_Prepare(dct_coefficients_0);
- dct_coefficients_1.Array=NULL;
- dct_coefficients_1.Vlc=Mpegv_dct_coefficients_1;
- dct_coefficients_1.Size=17;
- Get_VL_Prepare(dct_coefficients_1);
- macroblock_type_I.Array=NULL;
- macroblock_type_I.Vlc=Mpegv_macroblock_type_I;
- macroblock_type_I.Size=2;
- Get_VL_Prepare(macroblock_type_I);
- macroblock_type_P.Array=NULL;
- macroblock_type_P.Vlc=Mpegv_macroblock_type_P;
- macroblock_type_P.Size=6;
- Get_VL_Prepare(macroblock_type_P);
- macroblock_type_B.Array=NULL;
- macroblock_type_B.Vlc=Mpegv_macroblock_type_B;
- macroblock_type_B.Size=6;
- Get_VL_Prepare(macroblock_type_B);
- motion_code.Array=NULL;
- motion_code.Vlc=Mpegv_motion_code;
- motion_code.Size=11;
- Get_VL_Prepare(motion_code);
- dmvector.Array=NULL;
- dmvector.Vlc=Mpegv_dmvector;
- dmvector.Size=2;
- Get_VL_Prepare(dmvector);
- coded_block_pattern.Array=NULL;
- coded_block_pattern.Vlc=Mpegv_coded_block_pattern;
- coded_block_pattern.Size=9;
- Get_VL_Prepare(coded_block_pattern);
- }
- #endif //MEDIAINFO_MACROBLOCKS
-}
-
-//***************************************************************************
-// Buffer - Demux
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-bool File_Mpegv::Demux_UnpacketizeContainer_Test()
-{
- if ((Demux_IntermediateItemFound && Buffer[Buffer_Offset+3]==0x00) || Buffer[Buffer_Offset+3]==0xB3)
- {
- if (Demux_Offset==0)
- {
- Demux_Offset=Buffer_Offset;
- Demux_IntermediateItemFound=false;
- }
- if (IsSub && ParserIDs[0]==MediaInfo_Parser_Mxf) //TODO: find a better way to demux, currently implemeted this way because we need I-frame status info from MXF
- {
- Demux_Offset=Buffer_Size;
- Demux_IntermediateItemFound=true;
- }
- else
- {
- while (Demux_Offset+4<=Buffer_Size)
- {
- //Synchronizing
- while(Demux_Offset+4<=Buffer_Size && (Buffer[Demux_Offset ]!=0x00
- || Buffer[Demux_Offset+1]!=0x00
- || Buffer[Demux_Offset+2]!=0x01))
- {
- Demux_Offset+=2;
- while(Demux_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Demux_Offset+=2;
- if (Demux_Offset>=Buffer_Size || Buffer[Demux_Offset-1]==0x00)
- Demux_Offset--;
- }
- if (Demux_Offset+4>Buffer_Size)
- {
- if (File_Offset+Buffer_Size==File_Size)
- Demux_Offset=Buffer_Size;
- break;
- }
-
- if (Demux_IntermediateItemFound)
- {
- bool MustBreak;
- switch (Buffer[Demux_Offset+3])
- {
- case 0x00 :
- case 0xB3 :
- MustBreak=true; break;
- default :
- Demux_Offset+=3;
- MustBreak=false;
- }
- if (MustBreak)
- break; //while() loop
- }
- else
- {
- if (!Buffer[Demux_Offset+3])
- Demux_IntermediateItemFound=true;
- }
-
- Demux_Offset++;
- }
-
- if (Demux_Offset+4>Buffer_Size && File_Offset+Buffer_Size!=File_Size)
- return false; //No complete frame
- }
-
- bool RandomAccess=Buffer[Buffer_Offset+3]==0xB3;
- if (!Status[IsAccepted])
- {
- if (Config->Demux_EventWasSent)
- return false;
- File_Mpegv* MI=new File_Mpegv;
- Open_Buffer_Init(MI);
- Open_Buffer_Continue(MI, Buffer, Buffer_Size);
- bool IsOk=MI->Status[IsAccepted];
- delete MI;
- if (!IsOk)
- return false;
- }
- if (IFrame_IsParsed || RandomAccess)
- Demux_UnpacketizeContainer_Demux(RandomAccess);
- else
- Demux_UnpacketizeContainer_Demux_Clear();
- }
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpegv::Read_Buffer_Unsynched()
-{
- for (int8u Pos=0x00; Pos<0xB9; Pos++)
- {
- Streams[Pos].Searching_Payload=false;
- Streams[Pos].Searching_TimeStamp_Start=false;
- Streams[Pos].Searching_TimeStamp_End=false;
- }
- Streams[0xB3].Searching_TimeStamp_End=true; //sequence_header
- Streams[0xB8].Searching_TimeStamp_End=true; //group_start
- Time_End_Seconds=Error;
- Time_End_Frames=(int8u)-1;
- RefFramesCount=0;
- sequence_header_IsParsed=false;
- group_start_IsParsed=false;
- PTS_LastIFrame=(int64u)-1;
- IFrame_IsParsed=false;
- picture_coding_types_Current.clear();
- #if MEDIAINFO_IBIUSAGE
- Ibi_SliceParsed=true;
- #endif //MEDIAINFO_IBIUSAGE
- #if MEDIAINFO_MACROBLOCKS
- if (Macroblocks_Parse)
- {
- macroblock_x_PerFrame=0;
- macroblock_y_PerFrame=0;
- }
- #endif //MEDIAINFO_MACROBLOCKS
-
- temporal_reference_Old=(int16u)-1;
- for (size_t Pos=0; Pos<TemporalReference.size(); Pos++)
- delete TemporalReference[Pos]; //TemporalReference[Pos]=NULL;
- TemporalReference.clear();
- TemporalReference_Offset=0;
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- GA94_03_TemporalReference_Offset=0;
- if (GA94_03_Parser)
- GA94_03_Parser->Open_Buffer_Unsynch();
- if (CC___Parser)
- CC___Parser->Open_Buffer_Unsynch();
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- #if defined(MEDIAINFO_SCTE20_YES)
- Scte_TemporalReference_Offset=0;
- if (Scte_Parser)
- Scte_Parser->Open_Buffer_Unsynch();
- #endif //defined(MEDIAINFO_SCTE20_YES)
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- if (DTG1_Parser)
- DTG1_Parser->Open_Buffer_Unsynch();
- if (GA94_06_Parser)
- GA94_06_Parser->Open_Buffer_Unsynch();
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
- #if defined(MEDIAINFO_CDP_YES)
- if (Cdp_Parser)
- Cdp_Parser->Open_Buffer_Unsynch();
- #endif //defined(MEDIAINFO_CDP_YES)
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- if (AfdBarData_Parser)
- AfdBarData_Parser->Open_Buffer_Unsynch();
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
-
- #if defined(MEDIAINFO_ANCILLARY_YES)
- if (Ancillary && *Ancillary && (*Ancillary)->Cdp_Data.empty())
- (*Ancillary)->AspectRatio=0;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
-
- //NextCode
- if (!Status[IsAccepted])
- {
- NextCode_Clear();
- NextCode_Add(0xB3);
- NextCode_Add(0xB8);
- }
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpegv::Header_Parse()
-{
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- //Parsing
- int8u start_code;
- Skip_B3( "synchro");
- Get_B1 (start_code, "start_code");
- if (!Header_Parser_Fill_Size())
- {
- Element_WaitForMoreData();
- return;
- }
-
- //Filling
- Header_Fill_Code(start_code, Ztring().From_CC1(start_code));
- }
- else
- {
- #endif //MEDIAINFO_TRACE
- //Parsing
- int8u start_code=Buffer[Buffer_Offset+3];
- Element_Offset+=4;
- if (!Header_Parser_Fill_Size())
- {
- Element_WaitForMoreData();
- return;
- }
-
- //Filling
- Header_Fill_Code(start_code, Ztring().From_CC1(start_code));
- #if MEDIAINFO_TRACE
- }
- #endif //MEDIAINFO_TRACE
-}
-
-//---------------------------------------------------------------------------
-bool File_Mpegv::Header_Parser_Fill_Size()
-{
- //Look for next Sync word
- if (Buffer_Offset_Temp==0) //Buffer_Offset_Temp is not 0 if Header_Parse_Fill_Size() has already parsed first frames
- Buffer_Offset_Temp=Buffer_Offset+4;
- while (Buffer_Offset_Temp+4<=Buffer_Size
- && CC3(Buffer+Buffer_Offset_Temp)!=0x000001)
- {
- Buffer_Offset_Temp+=2;
- while(Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp]!=0x00)
- Buffer_Offset_Temp+=2;
- if (Buffer_Offset_Temp>=Buffer_Size || Buffer[Buffer_Offset_Temp-1]==0x00)
- Buffer_Offset_Temp--;
- }
-
- //Must wait more data?
- if (Buffer_Offset_Temp+4>Buffer_Size)
- {
- if (FrameIsAlwaysComplete || File_Offset+Buffer_Size==File_Size)
- Buffer_Offset_Temp=Buffer_Size; //We are sure that the next bytes are a start
- else
- return false;
- }
-
- //OK, we continue
- Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
- Buffer_Offset_Temp=0;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Mpegv::Header_Parser_QuickSearch()
-{
- while ( Buffer_Offset+4<=Buffer_Size
- && Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0x01)
- {
- //Getting start_code
- int8u start_code=Buffer[Buffer_Offset+3];
-
- //Searching start or timestamp
- if (Streams[start_code].Searching_Payload
- || Streams[start_code].Searching_TimeStamp_Start
- || Streams[start_code].Searching_TimeStamp_End)
- return true;
-
- #if MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
- if (start_code==0xB3) // sequence_header
- {
- //
- Has_sequence_header=true;
- }
- if (start_code==0xB5) // extension_start
- {
- if (Buffer_Offset+5>Buffer_Size)
- return false;
-
- if ((Buffer[Buffer_Offset+4]&0xF0)==0x10) // sequence_extension
- Has_sequence_extension=true;
- }
- #endif // MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
-
- //Synchronizing
- Buffer_Offset+=4;
- Synched=false;
- if (!Synchronize())
- {
- UnSynched_IsNotJunk=true;
- return false;
- }
-
- if (Buffer_Offset+4>Buffer_Size)
- {
- UnSynched_IsNotJunk=true;
- return false;
- }
- }
-
- Trusted_IsNot("MPEG Video, Synchronisation lost");
- return Synchronize();
-}
-
-//---------------------------------------------------------------------------
-void File_Mpegv::Data_Parse()
-{
- //Parsing
- switch (Element_Code)
- {
- case 0x00: picture_start(); break;
- case 0xB0: Skip_XX(Element_Size, "Unknown"); break;
- case 0xB1: Skip_XX(Element_Size, "Unknown"); break;
- case 0xB2: user_data_start(); break;
- case 0xB3: sequence_header(); break;
- case 0xB4: sequence_error(); break;
- case 0xB5: extension_start(); break;
- case 0xB6: Skip_XX(Element_Size, "Unknown"); break;
- case 0xB7: sequence_end(); break;
- case 0xB8: group_start(); break;
- default:
- if (Element_Code>=0x01
- && Element_Code<=0xAF) slice_start();
- else
- Trusted_IsNot("Unattended element");
- }
-}
-
-//***************************************************************************
-// EOF
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Mpegv::Detect_EOF()
-{
- if ((IsSub && Status[IsFilled])
- || (!IsSub && File_Size>SizeToAnalyse_Begin+SizeToAnalyse_End && File_Offset+Buffer_Offset+Element_Offset>SizeToAnalyse_Begin && File_Offset+Buffer_Offset+Element_Offset<File_Size-SizeToAnalyse_End && Config->ParseSpeed<=0.5))
- {
- if (MustExtendParsingDuration && Frame_Count<Frame_Count_Valid
- && !(!IsSub && File_Size>SizeToAnalyse_Begin*10+SizeToAnalyse_End*10 && File_Offset+Buffer_Offset+Element_Offset>SizeToAnalyse_Begin*10 && File_Offset+Buffer_Offset+Element_Offset<File_Size-SizeToAnalyse_End*10))
- {
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES) || defined(MEDIAINFO_SCTE20_YES) || (defined(MEDIAINFO_GXF_YES) && defined(MEDIAINFO_CDP_YES))
- Streams[0x00].Searching_Payload=GA94_03_IsPresent || Cdp_IsPresent;
- Streams[0xB2].Searching_Payload=GA94_03_IsPresent || CC___IsPresent || Scte_IsPresent;
- Streams[0xB3].Searching_Payload=GA94_03_IsPresent || Cdp_IsPresent;
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES) || defined(MEDIAINFO_SCTE20_YES) || (defined(MEDIAINFO_GXF_YES) && defined(MEDIAINFO_CDP_YES))
- return;
- }
-
- //
- Time_End_Seconds=Error;
- Time_End_Frames=(int8u)-1;
-
- //Autorisation of other streams
- if (!IsSub)
- Streams[0x00].Searching_TimeStamp_End=false;
-
- //Jumping
- if (!Status[IsFilled])
- Fill("MPEG Video");
-
- if (!IsSub)
- Open_Buffer_Unsynch();
- GoToFromEnd(SizeToAnalyse_End, "MPEG Video");
- EOF_AlreadyDetected=true; //Sometimes called from Filling
- }
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Packet "00"
-void File_Mpegv::picture_start()
-{
- Element_Name("picture_start");
-
- //Coherency
- if (!Status[IsAccepted])
- {
- if (!NextCode_Test())
- return;
- }
-
- //Parsing
- int8u picture_coding_type_Old=picture_coding_type;
- BS_Begin();
- Get_S2 (10, temporal_reference, "temporal_reference");
- Get_S1 ( 3, picture_coding_type, "picture_coding_type"); Param_Info1(Mpegv_picture_coding_type[picture_coding_type]);
- Get_S2 (16, vbv_delay, "vbv_delay");
- if (picture_coding_type==2 || picture_coding_type==3) //P or B
- {
- Skip_S1(1, "full_pel_forward_vector");
- Skip_S1(3, "forward_f_code");
- }
- if (picture_coding_type==3) //B
- {
- Skip_S1(1, "full_pel_backward_vector");
- Skip_S1(3, "backward_f_code");
- }
- bool extra_bit_picture;
- do
- {
- Peek_SB(extra_bit_picture);
- if (extra_bit_picture)
- {
- Skip_S1(1, "extra_bit_picture");
- Skip_S1(8, "extra_information_picture");
- }
- }
- while (extra_bit_picture);
- BS_End();
-
- FILLING_BEGIN();
- if (picture_coding_type==1)
- Frame_Count_LastIFrame=Frame_Count_NotParsedIncluded;
-
- #if MEDIAINFO_MACROBLOCKS
- if (Macroblocks_Parse)
- {
- macroblock_x_PerFrame=0;
- macroblock_y_PerFrame=0;
- }
- #endif //MEDIAINFO_MACROBLOCKS
-
- #if MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
- Slices_Count=0;
- #endif // MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
- #if MEDIAINFO_EVENTS
- {
- EVENT_BEGIN (Video, SliceInfo, 0)
- Event.FieldPosition=Field_Count;
- Event.SlicePosition=0;
- switch (picture_coding_type)
- {
- case 1 :
- Event.SliceType=0; break;
- case 2 :
- Event.SliceType=1; break;
- case 3 :
- Event.SliceType=2; break;
- default:
- Event.SliceType=(int8u)-1;
- }
- Event.Flags=0;
- EVENT_END ()
- }
- #endif //MEDIAINFO_EVENTS
-
- //Detection of first I-Frame
- if (!IFrame_IsParsed)
- {
- if (picture_coding_type==1 || picture_coding_type==4) //I-Frame or D-Frame
- IFrame_IsParsed=true;
- }
-
- if (Frame_Count_LastIFrame!=(int64u)-1)
- FrameNumber_PresentationOrder=Frame_Count_LastIFrame+temporal_reference;
-
- //Config
- progressive_frame=true;
- picture_structure=3; //Frame is default
- #if MEDIAINFO_MACROBLOCKS
- if (Macroblocks_Parse)
- {
- spatial_temporal_weight_code_table_index=0;
- f_code[0][0]=0;
- f_code[0][1]=0;
- f_code[1][0]=0;
- f_code[1][1]=0;
- sequence_scalable_extension_Present=false;
- frame_pred_frame_dct=false;
- concealment_motion_vectors=false;
- intra_vlc_format=false;
- }
- #endif //MEDIAINFO_MACROBLOCKS
-
- //Temporal reference
- if (TemporalReference_Offset+temporal_reference>=TemporalReference.size())
- TemporalReference.resize(TemporalReference_Offset+temporal_reference+1);
- if (TemporalReference[TemporalReference_Offset+temporal_reference]==NULL)
- TemporalReference[TemporalReference_Offset+temporal_reference]=new temporalreference;
- TemporalReference[TemporalReference_Offset+temporal_reference]->IsValid=true;
-
- //picture_coding_types
- if (picture_coding_type==1) //I-Frame
- {
- if (!picture_coding_types_Current.empty())
- {
- picture_coding_types[picture_coding_types_Current]++;
-
- #if MEDIAINFO_ADVANCED
- // Testing if we must give up
- if (Config_VariableGopDetection_GiveUp && picture_coding_types.size()>1)
- {
- int64u MaxCount=0;
- string MaxCount_type;
- for (std::map<std::string, int64u>::iterator Temp=picture_coding_types.begin(); Temp!=picture_coding_types.end(); ++Temp)
- if (Temp->second>MaxCount)
- {
- MaxCount=Temp->second;
- MaxCount_type=Temp->first;
- }
- int64u Count=0;
- for (std::map<std::string, int64u>::iterator Temp=picture_coding_types.begin(); Temp!=picture_coding_types.end(); ++Temp)
- if (Temp->first!=MaxCount_type)
- Count+=Temp->second;
- if (Count>=Config_VariableGopDetection_Occurences)
- Config->ParseSpeed=0; // Give up
- }
- #endif // MEDIAINFO_ADVANCED
- }
- picture_coding_types_Current='I';
- }
- else if (!picture_coding_types_Current.empty()) //If an I-Frame is already found
- picture_coding_types_Current+=Mpegv_picture_coding_type[picture_coding_type];
-
- //Detecting streams with only I-Frames
- if (picture_coding_type==1 && picture_coding_type_Old==1 && !FirstFieldFound)
- temporal_reference_Old=(int16u)-1; //Resetting temporal_reference_Old
-
- //NextCode
- if (!Status[IsAccepted])
- {
- NextCode_Clear();
- for (int64u Element_Name_Next=0x01; Element_Name_Next<=0xAF; Element_Name_Next++)
- NextCode_Add(Element_Name_Next);
- NextCode_Add(0xB2);
- NextCode_Add(0xB5);
- NextCode_Add(0xB8);
- }
-
- //Autorisation of other streams
- for (int8u Pos=0x01; Pos<=0xAF; Pos++)
- Streams[Pos].Searching_Payload=true;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "01" --> "AF"
-void File_Mpegv::slice_start()
-{
- //Encryption management
- if (CA_system_ID_MustSkipSlices)
- {
- //Is not decodable
- Finish("MPEG Video");
- return;
- }
-
- if (!Status[IsAccepted])
- {
- if (!NextCode_Test())
- return;
- }
- Element_Name("slice_start");
-
- //Parsing
- #if MEDIAINFO_MACROBLOCKS
- if (Macroblocks_Parse && MPEG_Version==2)
- {
- BS_Begin();
-
- bool intra_slice_flag;
- if (0x1000*vertical_size_extension+vertical_size_value>2800) //vertical_size
- Skip_S1(3, "slice_vertical_position_extension");
- if (sequence_scalable_extension_Present)
- Skip_S1(7, "priority_breakpoint");
- Skip_S1(5, "quantiser_scale_code");
- Peek_SB(intra_slice_flag);
- if (intra_slice_flag)
- {
- Skip_SB( "intra_slice_flag");
- Skip_SB( "intra_slice");
- Skip_S1(7, "reserved_bits");
- for (;;)
- {
- bool extra_bit_slice;
- Peek_SB(extra_bit_slice);
- if (extra_bit_slice)
- {
- Skip_S1(8, "extra_information_slice");
- }
- else
- break;
- if (!Data_BS_Remain())
- {
- Trusted_IsNot("extra_bit_slice is missing");
- return;
- }
- }
- }
- Skip_SB( "extra_bit_slice (must be 0)");
-
- macroblock_x=(int64u)-1;
- while (Synched) //Synched: testing if this is still valid
- {
- int8u Remain;
- if (Data_BS_Remain()%8)
- Peek_S1(Data_BS_Remain()%8, Remain);
- else if (Data_Remain())
- Remain=Buffer[Buffer_Offset+(size_t)(Element_Size-Data_Remain())];
- else
- Remain=0;
- if (Remain==0)
- {
- int32u Remain3;
- size_t Bits=Data_BS_Remain();
- if (Bits>23)
- Bits=23;
- Peek_S3((int8u)Bits, Remain3);
- if (Remain3==0)
- break;
- }
- slice_start_macroblock();
- }
-
- if (Data_BS_Remain())
- Skip_BS(Data_BS_Remain(), "padding");
- BS_End();
- }
- else
- #endif //MEDIAINFO_MACROBLOCK
- Skip_XX(Element_Size, "data");
-
- FILLING_BEGIN();
- int64u tc_ToAdd=tc/((progressive_sequence || picture_structure==3)?1:2); //Progressive of Frame
-
- //Timestamp
- if (!TimeCodeIsNotTrustable && group_start_FirstPass && (Time_Begin_Seconds==Error || (Frame_Count<16 && Time_Current_Seconds*FrameRate+Time_Current_Frames+temporal_reference<Time_Begin_Seconds*FrameRate+Time_Begin_Frames))) //Accepting a lower time code at the beginning of the stream
- {
- Time_Begin_Seconds=Time_Current_Seconds;
- Time_Begin_Frames =Time_Current_Frames+(int8u)temporal_reference;
- }
- if (!TimeCodeIsNotTrustable && (Time_Current_Seconds<Time_Begin_Seconds || (Time_Current_Seconds==Time_Begin_Seconds && Time_Current_Frames+(int8u)temporal_reference<Time_Begin_Frames)))
- {
- //Time code loop
- TimeCodeIsNotTrustable=true;
- Time_End_Seconds=(size_t)-1;
- }
- if (!TimeCodeIsNotTrustable && (picture_coding_type==1 || picture_coding_type==2)) //IFrame or PFrame
- {
- Time_End_Seconds=Time_Current_Seconds;
- Time_End_Frames =Time_Current_Frames+(int8u)temporal_reference;
- }
-
- if (temporal_reference==temporal_reference_Old)
- {
- Frame_Count--;
- if (IFrame_IsParsed && Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded--;
- Frame_Count_InThisBlock--;
- if (FrameInfo.DTS!=(int64u)-1)
- FrameInfo.DTS-=tc_ToAdd;
- if (FrameInfo.PTS!=(int64u)-1)
- FrameInfo.PTS-=tc_ToAdd;
- }
- else
- {
- temporal_reference_Old=temporal_reference;
- if (temporal_reference_Max<temporal_reference)
- temporal_reference_Max=temporal_reference;
- }
-
- if (picture_coding_type==1) //IFrame
- {
- temporal_reference_LastIFrame=temporal_reference;
- PTS_LastIFrame=FrameInfo.PTS;
- IFrame_Count++;
- }
- if (PTS_LastIFrame!=(int64u)-1)
- {
- FrameInfo.PTS=PTS_LastIFrame+(temporal_reference-temporal_reference_LastIFrame)*tc;
- if ((PTS_Begin==(int64u)-1 && picture_coding_type==1) //IFrame
- || (IFrame_Count<2 && group_start_IsParsed && group_start_closed_gop && FrameInfo.PTS<PTS_Begin))
- PTS_Begin=FrameInfo.PTS;
- }
-
- //Info
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- Element_Info1(__T("Frame (decoding order) ")+Ztring::ToZtring(Frame_Count));
- if (Frame_Count_LastIFrame!=(int64u)-1)
- Element_Info1(__T("Frame (presentation order) ")+Ztring::ToZtring(Frame_Count_LastIFrame+temporal_reference));
- Element_Info1(__T("picture_coding_type ")+Ztring().From_Local(Mpegv_picture_coding_type[picture_coding_type]));
- Element_Info1(__T("temporal_reference ")+Ztring::ToZtring(temporal_reference));
- if (FrameInfo.PTS!=(int64u)-1)
- Element_Info1(__T("PTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.PTS)/1000000)));
- if (FrameInfo.DTS!=(int64u)-1)
- Element_Info1(__T("DTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.DTS)/1000000)));
- if (Time_End_Seconds!=Error)
- {
- int64u Time_End =Time_End_Seconds *1000;
- if (FrameRate)
- Time_End +=float32_int32s((Time_Current_Frames+temporal_reference)*1000/FrameRate);
- size_t Hours =(size_t) Time_End/60/60/1000;
- size_t Minutes=(size_t)(Time_End-(Hours*60*60*1000))/60/1000;
- size_t Seconds=(size_t)(Time_End-(Hours*60*60*1000)-(Minutes*60*1000))/1000;
- size_t Milli =(size_t)(Time_End-(Hours*60*60*1000)-(Minutes*60*1000)-(Seconds*1000));
-
- Ztring Time;
- Time+=Ztring::ToZtring(Hours);
- Time+=__T(':');
- Time+=Ztring::ToZtring(Minutes);
- Time+=__T(':');
- Time+=Ztring::ToZtring(Seconds);
- if (FrameRate!=0)
- {
- Time+=__T('.');
- Time+=Ztring::ToZtring(Milli);
- }
- Element_Info1(__T("time_code ")+Time);
- }
- }
- #endif //MEDIAINFO_TRACE
-
- //CDP
- #if defined(MEDIAINFO_CDP_YES)
- if (Ancillary)
- {
- Cdp_IsPresent=true;
- MustExtendParsingDuration=true;
- Buffer_TotalBytes_Fill_Max=(int64u)-1; //Disabling this feature for this format, this is done in the parser
-
- Element_Trace_Begin1("CDP");
- if ((*Ancillary)==NULL)
- (*Ancillary)=new File_Ancillary();
- (*Ancillary)->AspectRatio=MPEG_Version==1?Mpegv_aspect_ratio1[aspect_ratio_information]:Mpegv_aspect_ratio2[aspect_ratio_information];
- (*Ancillary)->FrameRate=((float)(Mpegv_frame_rate[frame_rate_code] * (frame_rate_extension_n + 1)) / (float)(frame_rate_extension_d + 1));
- if ((*Ancillary)->PTS_DTS_Needed)
- (*Ancillary)->FrameInfo.DTS=FrameInfo.DTS;
- if ((*Ancillary)->Status[IsAccepted]) //In order to test if there is a parser using ancillary data
- Open_Buffer_Continue((*Ancillary), Buffer+Buffer_Offset, 0);
- Element_Trace_End0();
- }
- #endif //defined(MEDIAINFO_CDP_YES)
-
- //Active Format Description & Bar Data
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- if (Ancillary && *Ancillary && !(*Ancillary)->AfdBarData_Data.empty())
- {
- Element_Trace_Begin1("Active Format Description & Bar Data");
-
- //Parsing
- if (AfdBarData_Parser==NULL)
- {
- AfdBarData_Parser=new File_AfdBarData;
- Open_Buffer_Init(AfdBarData_Parser);
- ((File_AfdBarData*)AfdBarData_Parser)->Format=File_AfdBarData::Format_S2016_3;
- }
- if (AfdBarData_Parser->PTS_DTS_Needed)
- AfdBarData_Parser->FrameInfo.DTS=FrameInfo.DTS;
- if (!AfdBarData_Parser->Status[IsFinished])
- Open_Buffer_Continue(AfdBarData_Parser, (*Ancillary)->AfdBarData_Data[0]->Data, (*Ancillary)->AfdBarData_Data[0]->Size);
-
- //Removing data from stack
- delete (*Ancillary)->AfdBarData_Data[0]; //(*Ancillary)->AfdBarData_Data[0]=NULL;
- (*Ancillary)->AfdBarData_Data.erase((*Ancillary)->AfdBarData_Data.begin());
-
- Element_Trace_End0();
- }
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
-
- //Counting
- if (!MustExtendParsingDuration && File_Offset+Buffer_Offset+Element_Size==File_Size)
- Frame_Count_Valid=Frame_Count; //Finish frames in case of there are less than Frame_Count_Valid frames
- if (!TimeCodeIsNotTrustable && (picture_coding_type==1 || picture_coding_type==2)) //IFrame or PFrame
- {
- Time_End_Frames++; //One frame
- if (progressive_sequence && repeat_first_field)
- {
- Time_End_Frames++; //Frame repeated a second time
- if (top_field_first)
- Time_End_Frames++; //Frame repeated a third time
- }
- }
- Frame_Count++;
- Frame_Count_InThisBlock++;
- if (IFrame_IsParsed && Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- if (!(progressive_sequence || picture_structure==3))
- {
- Field_Count++;
- Field_Count_InThisBlock++;
- }
- if (picture_coding_type==3)
- BVOP_Count++;
- else
- BVOPsSinceLastRefFrames=0;
- if (RefFramesCount<2 && (picture_coding_type==1 || picture_coding_type==2))
- RefFramesCount++;
- if (repeat_first_field)
- {
- if (progressive_sequence)
- {
- tc_ToAdd+=tc;
- if (top_field_first)
- tc_ToAdd+=tc;
- }
- else
- tc_ToAdd+=tc/2;
- }
- if (FrameInfo.DTS!=(int64u)-1)
- {
- FrameInfo.DTS+=tc_ToAdd;
- if (DTS_End<FrameInfo.DTS)
- DTS_End=FrameInfo.DTS;
- }
- if (FrameInfo.PTS!=(int64u)-1)
- {
- if (FrameInfo.PTS+tc_ToAdd>PTS_End || (PTS_End>1000000000 && FrameInfo.PTS+tc_ToAdd<=PTS_End-1000000000)) //More than current PTS_End or less than current PTS_End minus 1 second (there is a problem?)
- {
- PTS_End=FrameInfo.PTS+tc_ToAdd;
- PTS_End_temporal_reference=temporal_reference;
- }
- if (low_delay)
- FrameInfo.PTS+=tc_ToAdd;
- else
- FrameInfo.PTS=(int64u)-1; //With repeat_first_field option, it is impossible to know what is the next PTS
- }
-
- //NextCode
- if (!Status[IsAccepted])
- {
- NextCode_Clear();
- NextCode_Add(0x00);
- NextCode_Add(0xB3);
- NextCode_Add(0xB8);
- }
-
- //Autorisation of other streams
- #if MEDIAINFO_MACROBLOCKS
- if (!Macroblocks_Parse)
- #endif //MEDIAINFO_MACROBLOCKS
- for (int8u Pos=0x01; Pos<=0xAF; Pos++)
- Streams[Pos].Searching_Payload=false;
-
- //Filling only if not already done
- if (!Status[IsAccepted])
- Accept("MPEG Video");
- if (!MustExtendParsingDuration && IFrame_Count==8)
- Frame_Count_Valid=Frame_Count; //We have enough frames
- if (!Status[IsFilled] && Frame_Count>=Frame_Count_Valid)
- {
- Fill("MPEG Video");
- if (File_Size==(int64u)-1)
- Finish("MPEG Video");
- else if (!IsSub && 2*(File_Offset+Buffer_Size+SizeToAnalyse_End)<File_Size && Config->ParseSpeed<1.0)
- {
- Open_Buffer_Unsynch();
- GoToFromEnd(SizeToAnalyse_End);
- }
- }
-
- //Skipping slices (if already unpacketized)
- #if MEDIAINFO_DEMUX
- if (Demux_UnpacketizeContainer && Buffer_TotalBytes+Buffer_Offset<Demux_TotalBytes
- #if MEDIAINFO_MACROBLOCKS
- && !Macroblocks_Parse
- #endif //MEDIAINFO_MACROBLOCKS
- )
- {
- Element_Offset=Demux_TotalBytes-(Buffer_TotalBytes+Buffer_Offset);
- }
- #endif //MEDIAINFO_DEMUX
-
- #if MEDIAINFO_IBIUSAGE
- Ibi_SliceParsed=true;
- #endif //MEDIAINFO_IBIUSAGE
- #if MEDIAINFO_MACROBLOCKS
- if (Macroblocks_Parse)
- {
- macroblock_x++;
- Element_Info1(Ztring::ToZtring(macroblock_x)+__T(" macroblocks"));
- macroblock_x_PerFrame+=macroblock_x;
- macroblock_y_PerFrame++;
- }
- #endif //MEDIAINFO_MACROBLOCKS
-
- #if MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
- if (Slices_Count)
- return;
- Slices_Count++;
-
- //sequence_header
- if (picture_coding_type==1 && (!Has_sequence_header || !Has_sequence_extension))
- {
- #if MEDIAINFO_ADVANCED
- if (!InitDataNotRepeated_Optional && !Has_sequence_header) //Currently we test only sequence_header
- {
- InitDataNotRepeated++;
-
- //Testing if we must give up
- if (Config_InitDataNotRepeated_GiveUp && InitDataNotRepeated>=Config_InitDataNotRepeated_Occurences)
- Config->ParseSpeed=0; // Give up
- }
- #endif // MEDIAINFO_ADVANCED
- }
- #endif // MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
-
- #if MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
- //Packets
- Has_sequence_header=false;
- Has_sequence_extension=false;
- #endif // MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet Packet "01" --> "AF", slice_start, macroblock
-#if MEDIAINFO_MACROBLOCKS
-enum Mpegv_macroblock_type_config //bitwise
-{
- spatial_temporal_weight_code_flag =0x01,
- macroblock_intra =0x02,
- macroblock_pattern =0x04,
- macroblock_motion_backward =0x08,
- macroblock_motion_forward =0x10,
- macroblock_quant =0x20,
-};
-void File_Mpegv::slice_start_macroblock()
-{
- frame_motion_type=(int8u)-1;
- spatial_temporal_weight_code=0;
-
- Element_Trace_Begin1("macroblock");
-
- size_t macroblock_address_increment;
- do
- {
- Get_VL(macroblock_address_increment_Vlc, macroblock_address_increment, "macroblock_address_increment");
- Element_Info1(__T("macroblock_address_increment=")+Ztring::ToZtring(Mpegv_macroblock_address_increment[macroblock_address_increment].mapped_to3));
- if (macroblock_x!=(int64u)-1)
- macroblock_x+=Mpegv_macroblock_address_increment[macroblock_address_increment].mapped_to3;
- }
- while (Mpegv_macroblock_address_increment[macroblock_address_increment].mapped_to1==2); //Escape code
- if (macroblock_x==(int64u)-1)
- macroblock_x=0;
- Element_Info1(__T("macroblock_x=")+Ztring::ToZtring(macroblock_x));
- Element_Trace_Begin1("macroblock_modes");
- vlc_fast* macroblock_type_X;
- switch(picture_coding_type)
- {
- case 1: macroblock_type_X=&macroblock_type_I; break;
- case 2: macroblock_type_X=&macroblock_type_P; break;
- case 3: macroblock_type_X=&macroblock_type_B; break;
- default : Element_DoNotTrust("Wrong picture_coding_type");
- Element_Trace_End0();
- Element_Trace_End0();
- return;
- }
- size_t macroblock_type_offset;
- Get_VL(*macroblock_type_X, macroblock_type_offset, "macroblock_type");
- macroblock_type=macroblock_type_X->Vlc[macroblock_type_offset].mapped_to3;
- if (!Synched)
- {
- BS_End();
- Element_Offset=Element_Size;
- return;
- }
- Element_Info1(__T("macroblock_quant=")+Ztring::ToZtring(macroblock_type&macroblock_quant));
- Element_Info1(__T("macroblock_motion_forward=")+Ztring::ToZtring(macroblock_type&macroblock_motion_forward));
- Element_Info1(__T("macroblock_motion_backward=")+Ztring::ToZtring(macroblock_type&macroblock_motion_backward));
- Element_Info1(__T("macroblock_pattern=")+Ztring::ToZtring(macroblock_type&macroblock_pattern));
- Element_Info1(__T("macroblock_intra=")+Ztring::ToZtring(macroblock_type&macroblock_intra));
- Element_Info1(__T("spatial_temporal_weight_code_flag=")+Ztring::ToZtring(macroblock_type&spatial_temporal_weight_code_flag));
- if (macroblock_type&spatial_temporal_weight_code_flag
- && spatial_temporal_weight_code_table_index)
- Get_S1 (2, spatial_temporal_weight_code, "spatial_temporal_weight_code");
- if (macroblock_type&macroblock_intra
- && concealment_motion_vectors)
- frame_motion_type=2;
- if (macroblock_type&macroblock_motion_forward
- || macroblock_type&macroblock_motion_backward)
- {
- if (picture_structure==3) //Frame
- {
- if (!frame_pred_frame_dct)
- Get_S1(2, frame_motion_type, "frame_motion_type");
- else
- frame_motion_type=2;
- }
- else
- Get_S1 (2, field_motion_type, "field_motion_type");
- }
- if (picture_structure==3 //Frame
- && !frame_pred_frame_dct
- && (macroblock_type&macroblock_intra
- || macroblock_type&macroblock_pattern))
- Skip_SB( "dct_type");
- Element_Trace_End0();
- if (macroblock_type&macroblock_quant)
- Skip_S1(5, "quantiser_scale_code");
- if (macroblock_type&macroblock_motion_forward
- || (macroblock_type&macroblock_intra
- && concealment_motion_vectors))
- slice_start_macroblock_motion_vectors(false);
- if (macroblock_type&macroblock_motion_backward)
- slice_start_macroblock_motion_vectors(true);
- if (macroblock_type&macroblock_intra
- && concealment_motion_vectors)
- Mark_1();
- if (macroblock_type&macroblock_pattern)
- slice_start_macroblock_coded_block_pattern();
- for (int8u i=0; i<block_count; i++)
- slice_start_macroblock_block(i);
- Element_Trace_End0();
-}
-#endif //MEDIAINFO_MACROBLOCKS
-
-//---------------------------------------------------------------------------
-// Packet Packet "01" --> "AF", slice_start, macroblock, motion_vectors
-#if MEDIAINFO_MACROBLOCKS
-void File_Mpegv::slice_start_macroblock_motion_vectors(bool s)
-{
- Element_Trace_Begin1("motion_vectors");
- int8u motion_vector_count;
- switch (frame_motion_type)
- {
- case 1 :
- switch (spatial_temporal_weight_code)
- {
- case 0 :
- case 1 :
- motion_vector_count=2;
- break;
- case 2 :
- case 3 :
- motion_vector_count=1;
- break;
- default: Trusted_IsNot("spatial_temporal_weight_code problem");
- Element_Trace_End0();
- return;
- }
- break;
- case 2 :
- motion_vector_count=1;
- break;
- case 3 :
- switch (spatial_temporal_weight_code)
- {
- case 1 :
- Trusted_IsNot("spatial_temporal_weight_code problem");
- Element_Trace_End0();
- return;
- default:
- motion_vector_count=1;
- break;
- }
- break;
- default : Trusted_IsNot("frame_motion_type problem");
- Element_Trace_End0();
- return;
- }
- if (motion_vector_count==1)
- {
- if (!(picture_structure==3 //Frame
- && frame_motion_type==2) //mv_format==Frame
- && frame_motion_type!=3) //dmv!=1
- Skip_SB( "motion_vertical_field_select[0][s]");
- slice_start_macroblock_motion_vectors_motion_vector(false, s);
- }
- else
- {
- Skip_SB( "motion_vertical_field_select[0][s]");
- slice_start_macroblock_motion_vectors_motion_vector(false, s);
- Skip_SB( "motion_vertical_field_select[1][s]");
- slice_start_macroblock_motion_vectors_motion_vector(true, s);
- }
- Element_Trace_End0();
-}
-#endif //MEDIAINFO_MACROBLOCKS
-
-//---------------------------------------------------------------------------
-// Packet Packet "01" --> "AF", slice_start, macroblock, motion_vectors, motion_vector
-#if MEDIAINFO_MACROBLOCKS
-void File_Mpegv::slice_start_macroblock_motion_vectors_motion_vector(bool r, bool s)
-{
- Element_Trace_Begin1("motion_vector");
- size_t motion_code_;
-
- Get_VL(motion_code, motion_code_, "motion_code[r][s][0]"); Param_Info1(Mpegv_motion_code[motion_code_].mapped_to3);
- if (Mpegv_motion_code[motion_code_].mapped_to3)
- Skip_SB( "motion_code[r][s][0] sign");
- if (f_code[s][0]>1 && Mpegv_motion_code[motion_code_].mapped_to3)
- Skip_S1(f_code[s][0]-1, "motion_residual[r][s][0]");
- if (frame_motion_type==3) //dmv==1
- {
- Info_VL(dmvector, dmvector_, "dmvector[0]"); Param_Info1(Mpegv_dmvector[dmvector_].mapped_to3);
- }
-
- Get_VL(motion_code, motion_code_, "motion_code[r][s][1]"); Param_Info1(Mpegv_motion_code[motion_code_].mapped_to3);
- if (Mpegv_motion_code[motion_code_].mapped_to3)
- Skip_SB( "motion_code[r][s][1] sign");
- if (f_code[s][1]>1 && Mpegv_motion_code[motion_code_].mapped_to3)
- Skip_S1(f_code[s][1]-1, "motion_residual[r][s][1]");
- if (frame_motion_type==3) //dmv==1
- {
- Info_VL(dmvector, dmvector_, "dmvector[1]"); Param_Info1(Mpegv_dmvector[dmvector_].mapped_to3);
- }
-
- Element_Trace_End0();
-}
-#endif //MEDIAINFO_MACROBLOCKS
-
-//---------------------------------------------------------------------------
-// Packet Packet "01" --> "AF", slice_start, macroblock, coded_block_pattern
-#if MEDIAINFO_MACROBLOCKS
-void File_Mpegv::slice_start_macroblock_coded_block_pattern()
-{
- Element_Trace_Begin1("coded_block_pattern");
- size_t coded_block_pattern_;
- Get_VL(coded_block_pattern, coded_block_pattern_, "coded_block_pattern_420");
- cbp=Mpegv_coded_block_pattern[coded_block_pattern_].mapped_to3;
- switch (chroma_format)
- {
- case 2 : //4:2:2
- {
- int8u coded_block_pattern_1;
- Get_S1 (2, coded_block_pattern_1, "coded_block_pattern_1");
- cbp<<=2;
- cbp|=coded_block_pattern_1;
- }
- break;
- case 3 : //4:4:4
- {
- int8u coded_block_pattern;
- Get_S1 (8, coded_block_pattern, "coded_block_pattern_1/2");
- cbp<<=8;
- cbp|=coded_block_pattern;
- }
- break;
- default : ;
- }
- Element_Info1(Ztring::ToZtring((int16u)cbp, 2));
- Element_Trace_End0();
-}
-#endif //MEDIAINFO_MACROBLOCKS
-
-//---------------------------------------------------------------------------
-// Packet Packet "01" --> "AF", slice_start, macroblock, block
-#if MEDIAINFO_MACROBLOCKS
-void File_Mpegv::slice_start_macroblock_block(int8u i)
-{
- //pattern_code
- if (!(macroblock_type&macroblock_intra) && !((macroblock_type&macroblock_pattern) && (cbp&(1<<(block_count-1-i)))))
- return;
-
- Element_Trace_Begin1("block"); Element_Info1(i);
- bool IsFirst;
- const vlc* Mpegv_dct_coefficients;
- vlc_fast* Mpegv_dct_coefficients2;
- if (macroblock_type&macroblock_intra)
- {
- IsFirst=false;
- Mpegv_dct_coefficients=intra_vlc_format?Mpegv_dct_coefficients_1:Mpegv_dct_coefficients_0;
- Mpegv_dct_coefficients2=&(intra_vlc_format?dct_coefficients_1:dct_coefficients_0);
- if (i<4)
- {
- size_t dct_dc_size_luminance_;
- Get_VL(dct_dc_size_luminance, dct_dc_size_luminance_, "dct_dc_size_luminance"); Param_Info1(Mpegv_dct_dc_size_luminance[dct_dc_size_luminance_].mapped_to3);
- if (Mpegv_dct_dc_size_luminance[dct_dc_size_luminance_].mapped_to3)
- Skip_S2(Mpegv_dct_dc_size_luminance[dct_dc_size_luminance_].mapped_to3, "dct_dc_differential");
- }
- else
- {
- size_t dct_dc_size_chrominance_;
- Get_VL(dct_dc_size_chrominance, dct_dc_size_chrominance_, "dct_dc_size_chrominance"); Param_Info1(Mpegv_dct_dc_size_chrominance[dct_dc_size_chrominance_].mapped_to3);
- if (Mpegv_dct_dc_size_chrominance[dct_dc_size_chrominance_].mapped_to3)
- Skip_S2((int8u)dct_dc_size_chrominance_, "dct_dc_differential");
- }
- }
- else
- {
- IsFirst=true;
- Mpegv_dct_coefficients=Mpegv_dct_coefficients_0;
- Mpegv_dct_coefficients2=&dct_coefficients_0;
- }
-
- for (;;)
- {
- Element_Trace_Begin1("dct_coefficient");
- size_t dct_coefficient;
- Get_VL(*Mpegv_dct_coefficients2, dct_coefficient, "dct_coefficient");
- switch (Mpegv_dct_coefficients[dct_coefficient].mapped_to1)
- {
- case 1 :
- Element_Trace_End1("End of block");
- Element_Trace_End0();
- return;
- case 2 :
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- Info_S1( 6, Run, "Run"); Element_Info1(Run);
- Info_S2(12, Level, "Level"); Element_Info1(Level-(Level>0x800?4096:0));
- }
- else
- #endif //MEDIAINFO_MACROBLOCKS
- Skip_S3(18, "Run + Level");
- break;
- case 3 :
- if (!IsFirst)
- {
- if (Mpegv_dct_coefficients[dct_coefficient].bit_increment)
- {
- Element_Trace_End1("End of block");
- Element_Trace_End0();
- return;
- }
- Skip_SB( "dct_coefficient sign");
- }
- default:
- Element_Info1(Mpegv_dct_coefficients[dct_coefficient].mapped_to2);
- Element_Info1(Mpegv_dct_coefficients[dct_coefficient].mapped_to3);
- }
- if (IsFirst)
- IsFirst=false;
- Element_Trace_End0();
- }
-}
-#endif //MEDIAINFO_MACROBLOCKS
-
-//---------------------------------------------------------------------------
-// Packet "B2"
-void File_Mpegv::user_data_start()
-{
- Element_Name("user_data_start");
-
- //GA94 stuff
- if (Element_Size>=4)
- {
- int32u GA94_Identifier;
- Peek_B4(GA94_Identifier);
- switch (GA94_Identifier)
- {
- case 0x434301F8 : user_data_start_CC(); return;
- case 0x44544731 : user_data_start_DTG1(); return;
- case 0x47413934 : user_data_start_GA94(); return;
- default : {
- int8u SCTE20_Identifier;
- Peek_B1(SCTE20_Identifier);
- if (SCTE20_Identifier==0x03)
- {
- user_data_start_3();
- return;
- }
- }
- }
- }
-
- //Rejecting junk at the begin
- size_t Library_Start_Offset=0;
- while (Library_Start_Offset+4<=Element_Size)
- {
- bool OK=true;
- for (size_t Pos=0; Pos<4; Pos++)
- {
- if (!((Buffer[Buffer_Offset+Library_Start_Offset+Pos]==0x20 && Pos)
- || Buffer[Buffer_Offset+Library_Start_Offset+Pos]==0x22
- || Buffer[Buffer_Offset+Library_Start_Offset+Pos]==0x27
- || Buffer[Buffer_Offset+Library_Start_Offset+Pos]==0x28
- || (Buffer[Buffer_Offset+Library_Start_Offset+Pos]==0x29 && Pos)
- || (Buffer[Buffer_Offset+Library_Start_Offset+Pos]>=0x30
- && Buffer[Buffer_Offset+Library_Start_Offset+Pos]<=0x3F)
- || (Buffer[Buffer_Offset+Library_Start_Offset+Pos]>=0x41
- && Buffer[Buffer_Offset+Library_Start_Offset+Pos]<=0x7D)))
- {
- OK=false;
- break;
- }
- }
- if (OK)
- break;
- Library_Start_Offset++;
- }
- if (Library_Start_Offset+4>Element_Size)
- {
- Skip_XX(Element_Size, "junk");
- return; //No good info
- }
-
- //Accepting good data after junk
- size_t Library_End_Offset=Library_Start_Offset+4;
- while (Library_End_Offset<Element_Size
- && (Buffer[Buffer_Offset+Library_End_Offset]==0x0D
- || Buffer[Buffer_Offset+Library_End_Offset]==0x0A
- || (Buffer[Buffer_Offset+Library_End_Offset]>=0x20 && Buffer[Buffer_Offset+Library_End_Offset]<=0x3F)
- || (Buffer[Buffer_Offset+Library_End_Offset]>=0x41 && Buffer[Buffer_Offset+Library_End_Offset]<=0x7D)))
- Library_End_Offset++;
-
- //Parsing
- Ztring Temp;
- if (Library_Start_Offset>0)
- Skip_XX(Library_Start_Offset, "junk");
- if (Library_End_Offset-Library_Start_Offset)
- Get_Local(Library_End_Offset-Library_Start_Offset, Temp,"data");
- if (Element_Offset<Element_Size)
- Skip_XX(Element_Size-Element_Offset, "junk");
-
- //Cleanup
- while(Temp.size()>3 && Temp[1]==__T('e') && Temp[2]==__T('n') && Temp[3]==__T('c'))
- Temp.erase(0, 1);
- while(Temp.size()>5 && Temp[3]==__T('M') && Temp[4]==__T('P') && Temp[5]==__T('E'))
- Temp.erase(0, 1);
-
- //Cleanup
- while(!Temp.empty() && Temp[0]==__T('0'))
- Temp.erase(0, 1);
-
- FILLING_BEGIN();
- if (!Temp.empty())
- {
- if (Temp.find(__T("build"))==0)
- Library+=Ztring(__T(" "))+Temp;
- else
- Library=Temp;
-
- //Library
- if (Temp.find(__T("Created with Nero"))==0)
- {
- Library_Name=__T("Ahead Nero");
- }
- else if (Library.find(__T("encoded by avi2mpg1 ver "))==0)
- {
- Library_Name=__T("avi2mpg1");
- Library_Version=Library.SubString(__T("encoded by avi2mpg1 ver "), __T(""));
- }
- else if (Library.find(__T("encoded by TMPGEnc (ver. "))==0)
- {
- Library_Name=__T("TMPGEnc");
- Library_Version=Library.SubString(__T("encoded by TMPGEnc (ver. "), __T(")"));
- }
- else if (Library.find(__T("encoded by TMPGEnc 4.0 XPress Version. "))==0)
- {
- Library_Name=__T("TMPGEnc XPress");
- Library_Version=Library.SubString(__T("encoded by TMPGEnc 4.0 XPress Version. "), __T(""));
- }
- else if (Library.find(__T("encoded by TMPGEnc MPEG Editor "))==0)
- {
- Library_Name=__T("TMPGEnc MPEG Editor");
- Library_Version=Library.SubString(__T("Version. "), __T(""));
- }
- else if (Library.find(__T("encoded by TMPGEnc "))==0)
- {
- Library_Name=__T("TMPGEnc");
- Library_Version=Library.SubString(__T("encoded by TMPGEnc "), __T(""));
- }
- else if (Library.find(__T("MPEG Encoder v"))==0)
- {
- Library_Name=__T("MPEG Encoder by Tristan Savatier");
- Library_Version=Library.SubString(__T("MPEG Encoder v"), __T(" by"));
- }
- else
- Library_Name=Library;
-
- }
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B2", CC (From DVD)
-void File_Mpegv::user_data_start_CC()
-{
- Skip_B4( "identifier");
-
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- Element_Info1("DVD Captions");
-
- //Parsing
- #if MEDIAINFO_DEMUX
- Element_Code=0x434301F800000000LL;
- #endif //MEDIAINFO_DEMUX
- if (CC___Parser==NULL)
- {
- CC___IsPresent=true;
- MustExtendParsingDuration=true;
- Buffer_TotalBytes_Fill_Max=(int64u)-1; //Disabling this feature for this format, this is done in the parser
- CC___Parser=new File_DtvccTransport;
- Open_Buffer_Init(CC___Parser);
- ((File_DtvccTransport*)CC___Parser)->Format=File_DtvccTransport::Format_DVD;
- }
- if (CC___Parser->PTS_DTS_Needed)
- {
- CC___Parser->FrameInfo.PCR=FrameInfo.PCR;
- CC___Parser->FrameInfo.PTS=FrameInfo.PTS;
- CC___Parser->FrameInfo.DTS=FrameInfo.DTS;
- }
- #if MEDIAINFO_DEMUX
- int8u Demux_Level_Save=Demux_Level;
- Demux_Level=8; //Ancillary
- Demux(Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset), ContentType_MainStream);
- Demux_Level=Demux_Level_Save;
- #endif // MEDIAINFO_DEMUX
- Open_Buffer_Continue(CC___Parser, Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset));
- Element_Offset=Element_Size;
- #else //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- Skip_XX(Element_Size-Element_Offset, "DVD Captions");
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
-}
-
-//---------------------------------------------------------------------------
-// Packet "B2", 0x03 (SCTE20)
-void File_Mpegv::user_data_start_3()
-{
- Skip_B1( "identifier");
-
- #if defined(MEDIAINFO_SCTE20_YES)
- Scte_IsPresent=true;
- MustExtendParsingDuration=true;
- Buffer_TotalBytes_Fill_Max=(int64u)-1; //Disabling this feature for this format, this is done in the parser
-
- Element_Info1("SCTE 20");
-
- //Coherency
- if (TemporalReference_Offset+temporal_reference>=TemporalReference.size())
- return;
-
- //Purging too old orphelins
- if (Scte_TemporalReference_Offset+8<TemporalReference_Offset+temporal_reference)
- {
- size_t Pos=TemporalReference_Offset+temporal_reference;
- do
- {
- if (TemporalReference[Pos]==NULL || !TemporalReference[Pos]->IsValid || TemporalReference[Pos]->Scte.empty())
- break;
- Pos--;
- }
- while (Pos>0);
- Scte_TemporalReference_Offset=Pos+1;
- }
-
- if (TemporalReference_Offset+temporal_reference>=TemporalReference.size())
- TemporalReference.resize(TemporalReference_Offset+temporal_reference+1);
- if (TemporalReference[TemporalReference_Offset+temporal_reference]==NULL)
- TemporalReference[TemporalReference_Offset+temporal_reference]=new temporalreference;
- temporalreference::buffer_data* BufferData=new temporalreference::buffer_data;
- BufferData->Size=(size_t)(Element_Size-Element_Offset);
- BufferData->Data=new int8u[(size_t)(Element_Size-Element_Offset)];
- std::memcpy(BufferData->Data, Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset));
- TemporalReference[TemporalReference_Offset+temporal_reference]->Scte.push_back(BufferData);
- TemporalReference[TemporalReference_Offset+temporal_reference]->Scte_Parsed.push_back(false);
- if (TemporalReference[TemporalReference_Offset+temporal_reference]->Scte_Parsed.size()>=2 && TemporalReference[TemporalReference_Offset+temporal_reference]->Scte_Parsed[TemporalReference[TemporalReference_Offset+temporal_reference]->Scte_Parsed.size()-2] && Scte_TemporalReference_Offset==TemporalReference_Offset+temporal_reference+1)
- Scte_TemporalReference_Offset--;
-
- //Parsing
- Skip_XX(Element_Size-Element_Offset, "SCTE 20 data");
-
- //Parsing Captions after reordering
- bool CanBeParsed=true;
- size_t FirstSize=(size_t)-1;
- for (size_t Scte20_Pos=Scte_TemporalReference_Offset; Scte20_Pos<TemporalReference.size(); Scte20_Pos++)
- {
- if (TemporalReference[Scte20_Pos]==NULL || !TemporalReference[Scte20_Pos]->IsValid || TemporalReference[Scte20_Pos]->Scte.empty())
- CanBeParsed=false; //There is a missing field/frame
- if (CanBeParsed)
- {
- if (FirstSize==(size_t)-1)
- FirstSize=TemporalReference[Scte20_Pos]->Scte.size();
- else if (!progressive_sequence && !TemporalReference[Scte20_Pos]->progressive_frame && TemporalReference[Scte20_Pos]->picture_structure==3 && TemporalReference[Scte20_Pos]->Scte.size()!=FirstSize)
- CanBeParsed=false; //There is a missing field in a frame duo
- }
- }
- if (CanBeParsed)
- {
- for (size_t Scte20_Pos=Scte_TemporalReference_Offset; Scte20_Pos<TemporalReference.size(); Scte20_Pos++)
- {
- Element_Begin1("Reordered SCTE 20");
-
- //Parsing
- #if MEDIAINFO_DEMUX
- Element_Code=0x0000000300000000LL;
- #endif //MEDIAINFO_DEMUX
- if (Scte_Parser==NULL)
- {
- Scte_Parser=new File_Scte20;
- Open_Buffer_Init(Scte_Parser);
- }
- //((File_Scte20*)Scte_Parser)->AspectRatio=MPEG_Version==1?Mpegv_aspect_ratio1[aspect_ratio_information]:Mpegv_aspect_ratio2[aspect_ratio_information];
- ((File_Scte20*)Scte_Parser)->picture_structure=TemporalReference[Scte20_Pos]->picture_structure;
- ((File_Scte20*)Scte_Parser)->progressive_sequence=progressive_sequence;
- ((File_Scte20*)Scte_Parser)->progressive_frame=TemporalReference[Scte20_Pos]->progressive_frame;
- ((File_Scte20*)Scte_Parser)->top_field_first=TemporalReference[Scte20_Pos]->top_field_first;
- ((File_Scte20*)Scte_Parser)->repeat_first_field=TemporalReference[Scte20_Pos]->repeat_first_field;
- for (size_t Pos=0; Pos<TemporalReference[Scte20_Pos]->Scte.size(); Pos++)
- if (!TemporalReference[Scte20_Pos]->Scte_Parsed[Pos])
- {
- if (Scte_Parser->PTS_DTS_Needed)
- {
- Scte_Parser->FrameInfo.PCR=FrameInfo.PCR;
- Scte_Parser->FrameInfo.PTS=FrameInfo.PTS-(TemporalReference.size()-1-Scte20_Pos)*tc;
- Scte_Parser->FrameInfo.DTS=FrameInfo.DTS-(TemporalReference.size()-1-Scte20_Pos)*tc;
- }
- #if MEDIAINFO_DEMUX
- int8u Demux_Level_Save=Demux_Level;
- Demux_Level=8; //Ancillary
- Demux(TemporalReference[Scte20_Pos]->Scte[Pos]->Data, TemporalReference[Scte20_Pos]->Scte[Pos]->Size, ContentType_MainStream);
- Demux_Level=Demux_Level_Save;
- #endif // MEDIAINFO_DEMUX
- Open_Buffer_Continue(Scte_Parser, TemporalReference[Scte20_Pos]->Scte[Pos]->Data, TemporalReference[Scte20_Pos]->Scte[Pos]->Size);
- TemporalReference[Scte20_Pos]->Scte_Parsed[Pos]=true;
- }
-
- Element_End0();
- }
- Scte_TemporalReference_Offset=TemporalReference.size();
- }
- #else //defined(MEDIAINFO_SCTE20_YES)
- Skip_XX(Element_Size-Element_Offset, "SCTE 20 data");
- #endif //defined(MEDIAINFO_SCTE20_YES)
-}
-
-//---------------------------------------------------------------------------
-// Packet "B2", DTG1
-void File_Mpegv::user_data_start_DTG1()
-{
- Skip_B4( "identifier");
-
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- Element_Info1("Active Format Description");
-
- //Parsing
- if (DTG1_Parser==NULL)
- {
- DTG1_Parser=new File_AfdBarData;
- Open_Buffer_Init(DTG1_Parser);
- ((File_AfdBarData*)DTG1_Parser)->Format=File_AfdBarData::Format_A53_4_DTG1;
-
- //Aspect ratio for AFD
- float32 DAR=0;
- if (MPEG_Version==2)
- {
- if (aspect_ratio_information==0)
- ; //Forbidden
- else if (aspect_ratio_information==1)
- DAR=((float32)(0x1000*horizontal_size_extension+horizontal_size_value))/(0x1000*vertical_size_extension+vertical_size_value);
- else if (display_horizontal_size && display_vertical_size)
- {
- if (vertical_size_value && Mpegv_aspect_ratio2[aspect_ratio_information])
- DAR=((float32)(0x1000*horizontal_size_extension+horizontal_size_value))/(0x1000*vertical_size_extension+vertical_size_value)
- *Mpegv_aspect_ratio2[aspect_ratio_information]/((float32)display_horizontal_size/display_vertical_size);
- }
- else if (Mpegv_aspect_ratio2[aspect_ratio_information])
- DAR=Mpegv_aspect_ratio2[aspect_ratio_information];
- }
- else //Version 1
- {
- if (vertical_size_value && Mpegv_aspect_ratio1[aspect_ratio_information])
- DAR=((float32)(0x1000*horizontal_size_extension+horizontal_size_value))/(0x1000*vertical_size_extension+vertical_size_value)/Mpegv_aspect_ratio1[aspect_ratio_information];
- }
- if (DAR>=1.330 && DAR<1.336) ((File_AfdBarData*)DTG1_Parser)->aspect_ratio_FromContainer=0; //4/3
- if (DAR>=1.774 && DAR<1.780) ((File_AfdBarData*)DTG1_Parser)->aspect_ratio_FromContainer=1; //16/9
- }
- if (DTG1_Parser->PTS_DTS_Needed)
- {
- DTG1_Parser->FrameInfo.PCR=FrameInfo.PCR;
- DTG1_Parser->FrameInfo.PTS=FrameInfo.PTS;
- DTG1_Parser->FrameInfo.DTS=FrameInfo.DTS;
- }
- Open_Buffer_Continue(DTG1_Parser, Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset));
- Element_Offset=Element_Size;
- #else //defined(MEDIAINFO_AFDBARDATA_YES)
- Skip_XX(Element_Size-Element_Offset, "Active Format Description");
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
-}
-
-//---------------------------------------------------------------------------
-// Packet "B2", GA94
-void File_Mpegv::user_data_start_GA94()
-{
- //Parsing
- int8u user_data_type_code;
- Skip_B4( "GA94_identifier");
- Get_B1 (user_data_type_code, "user_data_type_code");
- switch (user_data_type_code)
- {
- case 0x03 : user_data_start_GA94_03(); break;
- case 0x06 : user_data_start_GA94_06(); break;
- default : Skip_XX(Element_Size-Element_Offset, "GA94_reserved_user_data");
- }
-}
-
-//---------------------------------------------------------------------------
-// Packet "B2", GA94 0x03 (styled captioning)
-void File_Mpegv::user_data_start_GA94_03()
-{
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- GA94_03_IsPresent=true;
- MustExtendParsingDuration=true;
- Buffer_TotalBytes_Fill_Max=(int64u)-1; //Disabling this feature for this format, this is done in the parser
-
- Element_Info1("DTVCC Transport");
-
- //Coherency
- if (TemporalReference_Offset+temporal_reference>=TemporalReference.size())
- return;
-
- //Purging too old orphelins
- if (GA94_03_TemporalReference_Offset+8<TemporalReference_Offset+temporal_reference)
- {
- size_t Pos=TemporalReference_Offset+temporal_reference;
- do
- {
- if (TemporalReference[Pos]==NULL || !TemporalReference[Pos]->IsValid || TemporalReference[Pos]->GA94_03==NULL)
- break;
- Pos--;
- }
- while (Pos>0);
- GA94_03_TemporalReference_Offset=Pos+1;
- }
-
- if (TemporalReference_Offset+temporal_reference>=TemporalReference.size())
- TemporalReference.resize(TemporalReference_Offset+temporal_reference+1);
- if (TemporalReference[TemporalReference_Offset+temporal_reference]==NULL)
- TemporalReference[TemporalReference_Offset+temporal_reference]=new temporalreference;
- if (TemporalReference[TemporalReference_Offset+temporal_reference]->GA94_03==NULL)
- TemporalReference[TemporalReference_Offset+temporal_reference]->GA94_03=new temporalreference::buffer_data;
- TemporalReference[TemporalReference_Offset+temporal_reference]->GA94_03->Size=(size_t)(Element_Size-Element_Offset);
- delete[] TemporalReference[TemporalReference_Offset+temporal_reference]->GA94_03->Data;
- TemporalReference[TemporalReference_Offset+temporal_reference]->GA94_03->Data=new int8u[(size_t)(Element_Size-Element_Offset)];
- std::memcpy(TemporalReference[TemporalReference_Offset+temporal_reference]->GA94_03->Data, Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset));
-
- //Parsing
- Skip_XX(Element_Size-Element_Offset, "CC data");
-
- //Parsing Captions after reordering
- bool CanBeParsed=true;
- for (size_t GA94_03_Pos=GA94_03_TemporalReference_Offset; GA94_03_Pos<TemporalReference.size(); GA94_03_Pos++)
- if (TemporalReference[GA94_03_Pos]==NULL || !TemporalReference[GA94_03_Pos]->IsValid || TemporalReference[GA94_03_Pos]->GA94_03==NULL)
- CanBeParsed=false; //There is a missing field/frame
- if (CanBeParsed)
- {
- for (size_t GA94_03_Pos=GA94_03_TemporalReference_Offset; GA94_03_Pos<TemporalReference.size(); GA94_03_Pos++)
- {
- Element_Begin1("Reordered DTVCC Transport");
-
- //Parsing
- #if MEDIAINFO_DEMUX
- Element_Code=0x4741393400000003LL;
- #endif //MEDIAINFO_DEMUX
- if (GA94_03_Parser==NULL)
- {
- GA94_03_Parser=new File_DtvccTransport;
- Open_Buffer_Init(GA94_03_Parser);
- ((File_DtvccTransport*)GA94_03_Parser)->Format=File_DtvccTransport::Format_A53_4_GA94_03;
- }
- if (GA94_03_Parser->PTS_DTS_Needed)
- {
- GA94_03_Parser->FrameInfo.PCR=FrameInfo.PCR;
- GA94_03_Parser->FrameInfo.PTS=FrameInfo.PTS-(FrameInfo.PTS!=(int64u)-1?((TemporalReference.size()-1-GA94_03_Pos)*tc):0);
- GA94_03_Parser->FrameInfo.DTS=FrameInfo.DTS-(FrameInfo.DTS!=(int64u)-1?((TemporalReference.size()-1-GA94_03_Pos)*tc):0);
- }
- #if MEDIAINFO_DEMUX
- int8u Demux_Level_Save=Demux_Level;
- Demux_Level=8; //Ancillary
- Demux(TemporalReference[GA94_03_Pos]->GA94_03->Data, TemporalReference[GA94_03_Pos]->GA94_03->Size, ContentType_MainStream);
- Demux_Level=Demux_Level_Save;
- #endif // MEDIAINFO_DEMUX
- #if defined(MEDIAINFO_EIA608_YES) || defined(MEDIAINFO_EIA708_YES)
- GA94_03_Parser->ServiceDescriptors=ServiceDescriptors;
- #endif
- ((File_DtvccTransport*)GA94_03_Parser)->AspectRatio=MPEG_Version==1?Mpegv_aspect_ratio1[aspect_ratio_information]:Mpegv_aspect_ratio2[aspect_ratio_information];
- Open_Buffer_Continue(GA94_03_Parser, TemporalReference[GA94_03_Pos]->GA94_03->Data, TemporalReference[GA94_03_Pos]->GA94_03->Size);
-
- Element_End0();
- }
- GA94_03_TemporalReference_Offset=TemporalReference.size();
- }
- #else //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- Skip_XX(Element_Size-Element_Offset, "DTVCC Transport data");
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
-}
-
-//---------------------------------------------------------------------------
-// Packet "B2", GA94 0x06 (bar data)
-void File_Mpegv::user_data_start_GA94_06()
-{
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- Element_Info1("Bar Data");
-
- //Parsing
- if (GA94_06_Parser==NULL)
- {
- GA94_06_Parser=new File_AfdBarData;
- Open_Buffer_Init(GA94_06_Parser);
- ((File_AfdBarData*)GA94_06_Parser)->Format=File_AfdBarData::Format_A53_4_GA94_06;
- }
- if (GA94_06_Parser->PTS_DTS_Needed)
- {
- GA94_06_Parser->FrameInfo.PCR=FrameInfo.PCR;
- GA94_06_Parser->FrameInfo.PTS=FrameInfo.PTS;
- GA94_06_Parser->FrameInfo.DTS=FrameInfo.DTS;
- }
- Open_Buffer_Init(GA94_06_Parser);
- Open_Buffer_Continue(GA94_06_Parser, Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset));
- Element_Offset=Element_Size;
- #else //defined(MEDIAINFO_AFDBARDATA_YES)
- Skip_XX(Element_Size-Element_Offset, "Bar Data");
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
-}
-
-//---------------------------------------------------------------------------
-// Packet "B3"
-void File_Mpegv::sequence_header()
-{
- Element_Name("sequence_header");
-
- //Reset
- display_horizontal_size=0;
- display_vertical_size=0;
-
- //Reading
- int32u bit_rate_value_temp;
- BS_Begin();
- Get_S2 (12, horizontal_size_value, "horizontal_size_value");
- Get_S2 (12, vertical_size_value, "vertical_size_value");
- Get_S1 ( 4, aspect_ratio_information, "aspect_ratio_information"); Param_Info1C((vertical_size_value && Mpegv_aspect_ratio1[aspect_ratio_information]), (float)horizontal_size_value/vertical_size_value/Mpegv_aspect_ratio1[aspect_ratio_information]); Param_Info1(Mpegv_aspect_ratio2[aspect_ratio_information]);
- Get_S1 ( 4, frame_rate_code, "frame_rate_code"); Param_Info1(Mpegv_frame_rate[frame_rate_code]);
- Get_S3 (18, bit_rate_value_temp, "bit_rate_value"); Param_Info1(bit_rate_value_temp*400);
- Mark_1 ();
- Get_S2 (10, vbv_buffer_size_value, "vbv_buffer_size_value"); Param_Info2(2*1024*((int32u)vbv_buffer_size_value), " bytes");
- Skip_SB( "constrained_parameters_flag");
- TEST_SB_GET(load_intra_quantiser_matrix, "load_intra_quantiser_matrix");
- bool FillMatrix=Matrix_intra.empty();
- for (size_t Pos=0; Pos<64; Pos++)
- {
- int8u intra_quantiser;
- Get_S1 (8, intra_quantiser, "intra_quantiser");
- if (FillMatrix)
- {
- Ztring Value=Ztring::ToZtring(intra_quantiser, 16);
- if (Value.size()==1)
- Value.insert(0, __T("0"));
- Matrix_intra+=Value;
- }
- }
- TEST_SB_END();
- TEST_SB_GET(load_non_intra_quantiser_matrix, "load_non_intra_quantiser_matrix");
- bool FillMatrix=Matrix_nonintra.empty();
- for (size_t Pos=0; Pos<64; Pos++)
- {
- int8u non_intra_quantiser;
- Get_S1 (8, non_intra_quantiser, "non_intra_quantiser");
- if (FillMatrix)
- {
- Ztring Value=Ztring::ToZtring(non_intra_quantiser, 16);
- if (Value.size()==1)
- Value.insert(0, __T("0"));
- Matrix_nonintra+=Value;
- }
- }
- TEST_SB_END();
- BS_End();
-
- //0x00 at the end
- if (Element_Offset<Element_Size)
- {
- int64u NullBytes_Begin=Element_Size-1;
- while (NullBytes_Begin>Element_Offset && Buffer[Buffer_Offset+(size_t)NullBytes_Begin]==0x00)
- NullBytes_Begin--;
-
- if (NullBytes_Begin==Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "Padding");
- }
-
- FILLING_BEGIN_PRECISE();
- temporal_reference_Adapt(); //TODO: this line should not exist but some streams do not have group_start and/or do not start from temporal_reference 0, fast and dirty patch
-
- //Bit_rate
- if (bit_rate_value_IsValid && bit_rate_value_temp!=bit_rate_value)
- bit_rate_value_IsValid=false; //two bit_rate_values, not handled.
- else if (bit_rate_value==0)
- {
- bit_rate_value=bit_rate_value_temp;
- bit_rate_value_IsValid=true;
- }
-
- //NextCode
- if (!Status[IsAccepted])
- {
- NextCode_Clear();
- NextCode_Add(0x00);
- NextCode_Add(0xB2);
- NextCode_Add(0xB5);
- NextCode_Add(0xB8);
- }
-
- //Autorisation of other streams
- Streams[0x00].Searching_Payload=true;
- Streams[0xB2].Searching_Payload=true;
- Streams[0xB5].Searching_Payload=true;
- if (Frame_Count==0)
- Streams[0xB8].Searching_TimeStamp_Start=true;
- Streams[0xB8].Searching_TimeStamp_End=true;
-
- //Temp
- if (Mpegv_frame_rate[frame_rate_code])
- tc=float64_int64s(((float64)1000000000)/Mpegv_frame_rate[frame_rate_code]);
- if (Frame_Count<Frame_Count_Valid)
- {
- FrameRate=Mpegv_frame_rate[frame_rate_code];
- SizeToAnalyse_Begin=((int64u)bit_rate_value)*50*2; //standard delay between TimeStamps is 0.7s, we try 2s to be sure to have at least 2 timestamps (for integrity checking)
- SizeToAnalyse_End=((int64u)bit_rate_value)*50*2; //standard delay between TimeStamps is 0.7s, we try 2s to be sure
- }
-
- #if MEDIAINFO_MACROBLOCKS
- if (Macroblocks_Parse)
- block_count=6; //chroma_format default to 4:2:0
- #endif //MEDIAINFO_MACROBLOCKS
-
- //Setting as OK
- sequence_header_IsParsed=true;
- if (Frame_Count==0 && FrameInfo.DTS==(int64u)-1)
- FrameInfo.DTS=0; //No DTS in container
-
- #if MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
- //
- Has_sequence_header=true;
- #endif // MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "B4"
-void File_Mpegv::sequence_error()
-{
- Element_Name("sequence_error");
-}
-
-//---------------------------------------------------------------------------
-// Packet "B5"
-void File_Mpegv::extension_start()
-{
- Element_Name("extension_start");
- MPEG_Version=2; //extension_start only exists in MPEG-2 specs
-
- //Parsing
- int8u extension_start_code_identifier;
- BS_Begin();
- Get_S1 ( 4, extension_start_code_identifier, "extension_start_code_identifier"); Param_Info1(Mpegv_extension_start_code_identifier[extension_start_code_identifier]);
- Element_Info1(Mpegv_extension_start_code_identifier[extension_start_code_identifier]);
-
- switch (extension_start_code_identifier)
- {
- case 1 : //Sequence
- {
- //Parsing
- Peek_SB(profile_and_level_indication_escape);
- if (profile_and_level_indication_escape)
- {
- Get_S1 ( 8, profile_and_level_indication, "profile_and_level_indication"); Param_Info1(Mpegv_profile_and_level_indication(profile_and_level_indication));
- }
- else
- {
- Skip_SB( "profile_and_level_indication_escape");
- Get_S1 ( 3, profile_and_level_indication_profile, "profile_and_level_indication_profile"); Param_Info1(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile]);
- Get_S1 ( 4, profile_and_level_indication_level, "profile_and_level_indication_level"); Param_Info1(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level]);
- }
- Get_SB ( progressive_sequence, "progressive_sequence");
- Get_S1 ( 2, chroma_format, "chroma_format"); Param_Info1(Mpegv_Colorimetry_format[chroma_format]);
- Get_S1 ( 2, horizontal_size_extension, "horizontal_size_extension");
- Get_S1 ( 2, vertical_size_extension, "vertical_size_extension");
- Get_S2 (12, bit_rate_extension, "bit_rate_extension");
- Mark_1 ();
- Get_S1 ( 8, vbv_buffer_size_extension, "vbv_buffer_size_extension"); Param_Info2(2*1024*((((int32u)vbv_buffer_size_extension)<<10)+vbv_buffer_size_value), " bytes");
- Get_SB ( low_delay, "low_delay");
- Get_S1 ( 2, frame_rate_extension_n, "frame_rate_extension_n");
- Get_S1 ( 5, frame_rate_extension_d, "frame_rate_extension_d");
- BS_End();
-
- FILLING_BEGIN();
- if (frame_rate_extension_d)
- FrameRate=(float)frame_rate_extension_n/frame_rate_extension_d;
- #if MEDIAINFO_MACROBLOCKS
- if (Macroblocks_Parse)
- block_count=Mpegv_block_count[chroma_format];
- #endif //MEDIAINFO_MACROBLOCKS
-
- #if MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
- //
- Has_sequence_extension=true;
- #endif // MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
- FILLING_END();
- }
- break;
- case 2 : //Sequence Display
- {
- //Parsing
- Get_S1 ( 3, video_format, "video_format"); Param_Info1(Mpegv_video_format[video_format]);
- TEST_SB_GET ( colour_description, "colour_description");
- Get_S1 (8, colour_primaries, "colour_primaries"); Param_Info1(Mpegv_colour_primaries(colour_primaries));
- Get_S1 (8, transfer_characteristics, "transfer_characteristics"); Param_Info1(Mpegv_transfer_characteristics(transfer_characteristics));
- Get_S1 (8, matrix_coefficients, "matrix_coefficients"); Param_Info1(Mpegv_matrix_coefficients(matrix_coefficients));
- TEST_SB_END();
- Get_S2 (14, display_horizontal_size, "display_horizontal_size");
- Mark_1 ();
- Get_S2 (14, display_vertical_size, "display_vertical_size");
- BS_End();
- }
- break;
- case 5 : //Sequence Scalable Extension
- {
- //Parsing
- Skip_S2(10, "lower_layer_temporal_reference");
- Mark_1();
- Skip_S2(15, "lower_layer_horizontal_offset");
- Mark_1();
- Skip_S2(15, "lower_layer_vertical_offset");
- #if MEDIAINFO_MACROBLOCKS
- if (Macroblocks_Parse)
- {
- sequence_scalable_extension_Present=true;
- Get_S1 ( 2, spatial_temporal_weight_code_table_index, "spatial_temporal_weight_code_table_index");
- }
- else
- #endif //MEDIAINFO_MACROBLOCKS
- Skip_S1( 2, "spatial_temporal_weight_code_table_index");
- Skip_SB( "lower_layer_progressive_frame");
- Skip_SB( "lower_layer_deinterlaced_field_select");
- BS_End();
- }
- break;
- case 8 : //Picture Coding
- {
- //Parsing
- #if MEDIAINFO_MACROBLOCKS
- if (Macroblocks_Parse)
- {
- Get_S1 ( 4, f_code[0][0], "f_code_forward_horizontal");
- Get_S1 ( 4, f_code[0][1], "f_code_forward_vertical");
- Get_S1 ( 4, f_code[1][0], "f_code_backward_horizontal");
- Get_S1 ( 4, f_code[1][1], "f_code_backward_vertical");
- }
- else
- #endif //MEDIAINFO_MACROBLOCKS
- {
- Skip_S1( 4, "f_code_forward_horizontal");
- Skip_S1( 4, "f_code_forward_vertical");
- Skip_S1( 4, "f_code_backward_horizontal");
- Skip_S1( 4, "f_code_backward_vertical");
- }
- Get_S1 ( 2, intra_dc_precision, "intra_dc_precision");
- Get_S1 ( 2, picture_structure, "picture_structure"); Param_Info1(Mpegv_picture_structure[picture_structure]);
- Get_SB ( top_field_first, "top_field_first");
- #if MEDIAINFO_MACROBLOCKS
- if (Macroblocks_Parse)
- {
- Get_SB ( frame_pred_frame_dct, "frame_pred_frame_dct");
- Get_SB ( concealment_motion_vectors, "concealment_motion_vectors");
- }
- else
- #endif //MEDIAINFO_MACROBLOCKS
- {
- Skip_SB( "frame_pred_frame_dct");
- Skip_SB( "concealment_motion_vectors");
- }
- Skip_SB( "q_scale_type");
- #if MEDIAINFO_MACROBLOCKS
- if (Macroblocks_Parse)
- {
- Get_SB ( intra_vlc_format, "intra_vlc_format");
- }
- else
- #endif //MEDIAINFO_MACROBLOCKS
- {
- Skip_SB( "intra_vlc_format");
- }
- Skip_SB( "alternate_scan");
- Get_SB ( repeat_first_field, "repeat_first_field");
- Skip_SB( "chroma_420_type");
- Get_SB ( progressive_frame, "progressive_frame");
- TEST_SB_SKIP( "composite_display_flag");
- Skip_SB( "v_axis");
- Skip_S1( 3, "field_sequence");
- Skip_SB( "sub_carrier");
- Skip_S1( 7, "burst_amplitude");
- Skip_S1( 8, "sub_carrier_phase");
- TEST_SB_END();
- BS_End();
- }
-
- FILLING_BEGIN();
- if (progressive_frame==false)
- {
- if (picture_structure==3) //Frame
- {
- if (top_field_first)
- Interlaced_Top++;
- else
- Interlaced_Bottom++;
- PictureStructure_Frame++;
- FirstFieldFound=false;
- if (TemporalReference_Offset+temporal_reference>=TemporalReference.size())
- TemporalReference.resize(TemporalReference_Offset+temporal_reference+1);
- if (TemporalReference[TemporalReference_Offset+temporal_reference]==NULL)
- TemporalReference[TemporalReference_Offset+temporal_reference]=new temporalreference;
- TemporalReference[TemporalReference_Offset+temporal_reference]->picture_coding_type=picture_coding_type;
- TemporalReference[TemporalReference_Offset+temporal_reference]->progressive_frame=progressive_frame;
- TemporalReference[TemporalReference_Offset+temporal_reference]->picture_structure=picture_structure;
- TemporalReference[TemporalReference_Offset+temporal_reference]->top_field_first=top_field_first;
- TemporalReference[TemporalReference_Offset+temporal_reference]->repeat_first_field=repeat_first_field;
- TemporalReference[TemporalReference_Offset+temporal_reference]->HasPictureCoding=true;
- }
- else //Field
- {
- if (!FirstFieldFound)
- {
- if (picture_structure==1) //-Top
- Interlaced_Top++;
- else //-Bottom
- Interlaced_Bottom++;
- }
- FirstFieldFound=!FirstFieldFound;
- PictureStructure_Field++;
- }
- }
- else
- {
- progressive_frame_Count++;
- if (top_field_first)
- Interlaced_Top++;
- else
- Interlaced_Bottom++;
- PictureStructure_Frame++;
- if (picture_structure==3) //Frame
- {
- if (TemporalReference_Offset+temporal_reference>=TemporalReference.size())
- TemporalReference.resize(TemporalReference_Offset+temporal_reference+1);
- if (TemporalReference[TemporalReference_Offset+temporal_reference]==NULL)
- TemporalReference[TemporalReference_Offset+temporal_reference]=new temporalreference;
- TemporalReference[TemporalReference_Offset+temporal_reference]->picture_coding_type=picture_coding_type;
- TemporalReference[TemporalReference_Offset+temporal_reference]->progressive_frame=progressive_frame;
- TemporalReference[TemporalReference_Offset+temporal_reference]->picture_structure=picture_structure;
- TemporalReference[TemporalReference_Offset+temporal_reference]->top_field_first=top_field_first;
- TemporalReference[TemporalReference_Offset+temporal_reference]->repeat_first_field=repeat_first_field;
- TemporalReference[TemporalReference_Offset+temporal_reference]->HasPictureCoding=true;
- }
- }
- FILLING_END();
- break;
- case 9 : //Picture Spatial Scalable Extension
- {
- //Parsing
- Skip_S1(4, "data");
- BS_End();
- Skip_XX(Element_Size-Element_Offset, "data");
- }
- break;
- case 10 : //Picture Temporal Scalable Extension
- {
- //Parsing
- Skip_S1(4, "data");
- BS_End();
- Skip_XX(Element_Size-Element_Offset, "data");
- }
- break;
- default :
- {
- //Parsing
- Skip_S1(4, "data");
- BS_End();
- Skip_XX(Element_Size-Element_Offset, "data");
- }
- }
-}
-
-//---------------------------------------------------------------------------
-// Packet "B7"
-void File_Mpegv::sequence_end()
-{
- Element_Name("sequence_end");
-
- if (!Status[IsFilled] && sequence_header_IsParsed)
- {
- //End of file, and we have some frames
- Accept("MPEG Video");
- Finish("MPEG Video");
- }
-}
-
-//---------------------------------------------------------------------------
-// Packet "B8"
-void File_Mpegv::group_start()
-{
- if (!Status[IsAccepted])
- {
- if (!NextCode_Test())
- return;
- }
- Element_Name("group_start");
-
- //Reading
- int8u Hours, Minutes, Seconds, Frames;
- bool drop_frame_flag, closed_gop, broken_link;
- #if MEDIAINFO_TRACE
- if (Trace_Activated)
- {
- //Parsing
- BS_Begin();
- Get_SB ( drop_frame_flag, "time_code_drop_frame_flag");
- Get_S1 ( 5, Hours, "time_code_time_code_hours");
- Get_S1 ( 6, Minutes, "time_code_time_code_minutes");
- Mark_1();
- Get_S1 ( 6, Seconds, "time_code_time_code_seconds");
- Get_S1 ( 6, Frames, "time_code_time_code_pictures");
- Get_SB ( closed_gop, "closed_gop");
- Get_SB ( broken_link, "broken_link");
- BS_End();
- Ztring Time;
- Time+=Ztring::ToZtring(Hours);
- Time+=__T(':');
- Time+=Ztring::ToZtring(Minutes);
- Time+=__T(':');
- Time+=Ztring::ToZtring(Seconds);
- if (FrameRate!=0)
- {
- Time+=__T('.');
- Time+=Ztring::ToZtring(Frames*1000/FrameRate, 0);
- }
- Element_Info1(Time);
- }
- else
- {
- #endif //MEDIAINFO_TRACE
- //Parsing
- size_t Buffer_Pos=Buffer_Offset+(size_t)Element_Offset;
- drop_frame_flag = (Buffer[Buffer_Pos ]&0x80)?true:false;
- Hours =((Buffer[Buffer_Pos ]&0x7C)>> 2);
- Minutes =((Buffer[Buffer_Pos ]&0x03)<< 4)
- | ((Buffer[Buffer_Pos+1] )>> 4);
- Seconds =((Buffer[Buffer_Pos+1]&0x07)<< 3)
- | ((Buffer[Buffer_Pos+2] )>> 5);
- Frames =((Buffer[Buffer_Pos+2]&0x1F)<< 1)
- | ((Buffer[Buffer_Pos+3] )>> 7);
- closed_gop = (Buffer[Buffer_Pos+3]&0x40)?true:false;
- broken_link = (Buffer[Buffer_Pos+3]&0x20)?true:false;
- Element_Offset+=4;
- #if MEDIAINFO_TRACE
- }
- #endif //MEDIAINFO_TRACE
-
- FILLING_BEGIN();
- temporal_reference_Adapt();
-
- //NextCode
- if (!Status[IsAccepted])
- {
- NextCode_Clear();
- NextCode_Add(0x00);
- NextCode_Add(0xB2);
- NextCode_Add(0xB5);
- NextCode_Add(0xB8);
- }
-
- if (TimeCodeIsNotTrustable)
- return;
-
- if (Time_Current_Seconds==0 && Time_Current_Frames==0 && Hours==0 && Minutes==0 && Seconds==0 && Frames==0)
- {
- //Time code is always 0
- TimeCodeIsNotTrustable=true;
- Time_End_Seconds=(size_t)-1;
- TimeCode_FirstFrame.clear();
- return;
- }
-
- //Calculating
- Time_Current_Seconds=60*60*Hours+60*Minutes+Seconds;
- Time_Current_Frames =Frames;
-
- if (!group_start_IsParsed)
- group_start_IsParsed=true;
- if (!group_start_FirstPass)
- {
- group_start_FirstPass=true;
- group_start_drop_frame_flag=drop_frame_flag;
- group_start_closed_gop=closed_gop;
- group_start_broken_link=broken_link;
-
- TimeCode_FirstFrame+=('0'+Hours/10);
- TimeCode_FirstFrame+=('0'+Hours%10);
- TimeCode_FirstFrame+=':';
- TimeCode_FirstFrame+=('0'+Minutes/10);
- TimeCode_FirstFrame+=('0'+Minutes%10);
- TimeCode_FirstFrame+=':';
- TimeCode_FirstFrame+=('0'+Seconds/10);
- TimeCode_FirstFrame+=('0'+Seconds%10);
- TimeCode_FirstFrame+=drop_frame_flag?';':':';
- TimeCode_FirstFrame+=('0'+Frames/10);
- TimeCode_FirstFrame+=('0'+Frames%10);
-
- group_start_closed_gop_Closed=0;
- group_start_closed_gop_Open=0;
- }
-
- if (closed_gop)
- group_start_closed_gop_Closed++;
- else
- group_start_closed_gop_Open++;
-
- RefFramesCount=0;
-
- //Autorisation of other streams
- if (Searching_TimeStamp_Start_DoneOneTime)
- Streams[0xB8].Searching_TimeStamp_Start=false; //group_start
- else
- Searching_TimeStamp_Start_DoneOneTime=true;
- Streams[0x00].Searching_TimeStamp_End=true; //picture_start
- FILLING_END();
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Packet "B8"
-void File_Mpegv::temporal_reference_Adapt()
-{
- //Temporal reference
- temporal_reference_Old=(int16u)-1;
- temporal_reference_Max=0;
- TemporalReference_Offset=TemporalReference.size();
- if (TemporalReference_Offset>=0x800)
- {
- for (size_t Pos=0; Pos<0x400; Pos++)
- delete TemporalReference[Pos]; //TemporalReference[Pos]=NULL;
- TemporalReference.erase(TemporalReference.begin(), TemporalReference.begin()+0x400);
- if (0x400<TemporalReference_Offset)
- TemporalReference_Offset-=0x400;
- else
- TemporalReference_Offset=0;
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- if (0x400<GA94_03_TemporalReference_Offset)
- GA94_03_TemporalReference_Offset-=0x400;
- else
- GA94_03_TemporalReference_Offset=0;
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- #if defined(MEDIAINFO_SCTE20_YES)
- if (0x400<Scte_TemporalReference_Offset)
- Scte_TemporalReference_Offset-=0x400;
- else
- Scte_TemporalReference_Offset=0;
- #endif //defined(MEDIAINFO_SCTE20_YES)
- }
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_MPEGV_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpegv.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpegv.h
deleted file mode 100644
index c9b54248a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Mpegv.h
+++ /dev/null
@@ -1,364 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about MPEG Video files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_MpegvH
-#define MediaInfo_MpegvH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#if defined(MEDIAINFO_ANCILLARY_YES)
- #include <MediaInfo/Multiple/File_Ancillary.h>
-#endif //defined(MEDIAINFO_ANCILLARY_YES)
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Mpegv
-//***************************************************************************
-
-class File_Mpegv : public File__Analyze
-{
-public :
- //In
- int8u MPEG_Version;
- int64u Frame_Count_Valid;
- bool FrameIsAlwaysComplete;
- bool TimeCodeIsNotTrustable;
- #if defined(MEDIAINFO_ANCILLARY_YES)
- File_Ancillary** Ancillary;
- #endif //defined(MEDIAINFO_ANCILLARY_YES)
- #if MEDIAINFO_ADVANCED
- bool InitDataNotRepeated_Optional;
- #endif // MEDIAINFO_ADVANCED
-
- //Constructor/Destructor
- File_Mpegv();
- ~File_Mpegv();
-
-private :
- //Streams management
- void Streams_Accept();
- void Streams_Update();
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin() {return FileHeader_Begin_0x000001();}
-
- //Buffer - Synchro
- bool Synchronize() {return Synchronize_0x000001();}
- bool Synched_Test();
- void Synched_Init();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test();
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
-
- //Buffer - Per element
- void Header_Parse();
- bool Header_Parser_QuickSearch();
- bool Header_Parser_Fill_Size();
- void Data_Parse();
-
- //EOF
- void Detect_EOF();
-
- //Elements
- void picture_start();
- void slice_start();
- #if MEDIAINFO_MACROBLOCKS
- void slice_start_macroblock();
- void slice_start_macroblock_motion_vectors(bool s);
- void slice_start_macroblock_motion_vectors_motion_vector(bool r, bool s);
- void slice_start_macroblock_coded_block_pattern();
- void slice_start_macroblock_block(int8u i);
- #endif //MEDIAINFO_MACROBLOCKS
- void user_data_start();
- void user_data_start_3();
- void user_data_start_CC();
- void user_data_start_DTG1();
- void user_data_start_GA94();
- void user_data_start_GA94_03();
- void user_data_start_GA94_06();
- void sequence_header();
- void sequence_error();
- void extension_start();
- void sequence_end();
- void group_start();
-
-
- //Helpers
- void temporal_reference_Adapt();
-
- //Streams
- struct stream
- {
- bool Searching_Payload;
- bool Searching_TimeStamp_Start;
- bool Searching_TimeStamp_End;
-
- stream()
- {
- Searching_Payload=false;
- Searching_TimeStamp_Start=false;
- Searching_TimeStamp_End=false;
- }
- };
- std::vector<stream> Streams;
-
- //Temporal reference
- struct temporalreference
- {
- struct buffer_data
- {
- size_t Size;
- int8u* Data;
-
- buffer_data()
- {
- Size=0;
- Data=NULL;
- }
-
- ~buffer_data()
- {
- delete[] Data; //Data=NULL;
- }
- };
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- buffer_data* GA94_03;
- #endif //MEDIAINFO_DTVCCTRANSPORT_YES
- #if defined(MEDIAINFO_SCTE20_YES)
- std::vector<buffer_data*> Scte;
- std::vector<bool> Scte_Parsed;
- #endif //MEDIAINFO_SCTE20_YES
-
- int8u picture_coding_type;
- int8u picture_structure;
-
- bool IsValid;
- bool HasPictureCoding;
-
- bool progressive_frame;
- bool top_field_first;
- bool repeat_first_field;
-
- temporalreference()
- {
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- GA94_03=NULL;
- #endif //MEDIAINFO_DTVCCTRANSPORT_YES
- picture_coding_type=(int8u)-1;
- picture_structure=(int8u)-1;
- IsValid=false;
- HasPictureCoding=false;
- }
-
- ~temporalreference()
- {
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- delete GA94_03; //GA94_03=NULL;
- #endif //MEDIAINFO_DTVCCTRANSPORT_YES
- #if defined(MEDIAINFO_SCTE20_YES)
- for (size_t Pos=0; Pos<Scte.size(); Pos++)
- delete Scte[Pos]; //Scte[Pos]=NULL;
- #endif //MEDIAINFO_SCTE20_YES
- }
- };
- std::vector<temporalreference*> TemporalReference; //per temporal_reference
- size_t TemporalReference_Offset;
- struct text_position
- {
- File__Analyze** Parser;
- size_t StreamPos;
-
- text_position()
- {
- Parser=NULL;
- StreamPos=(size_t)-1;
- }
-
- text_position(File__Analyze* &Parser_)
- {
- Parser=&Parser_;
- StreamPos=0;
- }
- };
- std::vector<text_position> Text_Positions;
- #if defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- File__Analyze* GA94_03_Parser;
- size_t GA94_03_TemporalReference_Offset;
- bool GA94_03_IsPresent;
- File__Analyze* CC___Parser;
- bool CC___IsPresent;
- #endif //defined(MEDIAINFO_DTVCCTRANSPORT_YES)
- #if defined(MEDIAINFO_SCTE20_YES)
- File__Analyze* Scte_Parser;
- size_t Scte_TemporalReference_Offset;
- bool Scte_IsPresent;
- #endif //defined(MEDIAINFO_SCTE20_YES)
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- File__Analyze* DTG1_Parser;
- File__Analyze* GA94_06_Parser;
- #endif //defined(MEDIAINFO_AFDBARDATA_YES)
- #if defined(MEDIAINFO_CDP_YES)
- File__Analyze* Cdp_Parser;
- bool Cdp_IsPresent;
- #endif //defined(MEDIAINFO_GXF_YES) && defined(MEDIAINFO_CDP_YES)
- #if defined(MEDIAINFO_AFDBARDATA_YES)
- File__Analyze* AfdBarData_Parser;
- #endif //defined(MEDIAINFO_GXF_YES) && defined(MEDIAINFO_AFDBARDATA_YES)
-
- //Temp
- Ztring Library;
- Ztring Library_Name;
- Ztring Library_Version;
- Ztring Matrix_intra;
- Ztring Matrix_nonintra;
- string TimeCode_FirstFrame;
- size_t BVOP_Count;
- size_t progressive_frame_Count;
- size_t Interlaced_Top;
- size_t Interlaced_Bottom;
- size_t PictureStructure_Field;
- size_t PictureStructure_Frame;
- size_t Time_Current_Seconds;
- size_t Time_Begin_Seconds;
- size_t Time_End_Seconds;
- int64u SizeToAnalyse_Begin; //Total size of a chunk to analyse, it may be changed by the parser
- int64u SizeToAnalyse_End; //Total size of a chunk to analyse, it may be changed by the parser
- int64u Frame_Count_LastIFrame;
- int32u bit_rate_value;
- float32 FrameRate;
- int16u horizontal_size_value;
- int16u vertical_size_value;
- int16u bit_rate_extension;
- int16u temporal_reference;
- int16u temporal_reference_Old;
- int16u temporal_reference_Max;
- int16u display_horizontal_size;
- int16u display_vertical_size;
- int16u vbv_delay;
- int16u vbv_buffer_size_value;
- int8u Time_Current_Frames;
- int8u Time_Begin_Frames;
- int8u Time_End_Frames;
- int8u picture_coding_type;
- int8u aspect_ratio_information;
- int8u frame_rate_code;
- int8u profile_and_level_indication;
- int8u profile_and_level_indication_profile;
- int8u profile_and_level_indication_level;
- int8u chroma_format;
- int8u horizontal_size_extension;
- int8u vertical_size_extension;
- int8u frame_rate_extension_n;
- int8u frame_rate_extension_d;
- int8u video_format;
- int8u colour_primaries;
- int8u transfer_characteristics;
- int8u matrix_coefficients;
- int8u picture_structure;
- int8u vbv_buffer_size_extension;
- int8u intra_dc_precision;
- bool load_intra_quantiser_matrix;
- bool load_non_intra_quantiser_matrix;
- bool progressive_sequence;
- bool progressive_frame;
- bool top_field_first;
- bool repeat_first_field;
- bool FirstFieldFound;
- bool sequence_header_IsParsed;
- bool group_start_IsParsed;
- bool group_start_FirstPass;
- bool group_start_drop_frame_flag;
- bool group_start_closed_gop;
- size_t group_start_closed_gop_Closed;
- size_t group_start_closed_gop_Open;
- bool group_start_broken_link;
- bool Searching_TimeStamp_Start_DoneOneTime;
- bool Parsing_End_ForDTS;
- bool bit_rate_value_IsValid;
- bool profile_and_level_indication_escape;
- bool colour_description;
- bool low_delay;
- int8u RefFramesCount;
- int8u BVOPsSinceLastRefFrames;
- int16u temporal_reference_LastIFrame;
- int64u PTS_LastIFrame;
- int16u PTS_End_temporal_reference;
- int64u tc;
- bool IFrame_IsParsed;
- size_t IFrame_Count;
- std::map<std::string, int64u> picture_coding_types; //per picture_coding_type value ("IPBB..."), updated at each I-frame
- std::string picture_coding_types_Current; //Current picture_coding_type value ("IPBB..."), updated at each frame
-
- #if MEDIAINFO_MACROBLOCKS
- int64u macroblock_x;
- int64u macroblock_x_PerFrame;
- int64u macroblock_y_PerFrame;
- int16u cbp;
- int8u frame_motion_type;
- int8u field_motion_type;
- int8u spatial_temporal_weight_code;
- int8u block_count; //Computed from chroma_format
- int8u macroblock_type; //Temp
- int8u spatial_temporal_weight_code_table_index;
- int8u f_code[2][2];
- bool Macroblocks_Parse;
- bool sequence_scalable_extension_Present;
- bool frame_pred_frame_dct;
- bool concealment_motion_vectors;
- bool intra_vlc_format;
- vlc_fast macroblock_address_increment_Vlc;
- vlc_fast dct_dc_size_luminance;
- vlc_fast dct_dc_size_chrominance;
- vlc_fast dct_coefficients_0;
- vlc_fast dct_coefficients_1;
- vlc_fast macroblock_type_I;
- vlc_fast macroblock_type_P;
- vlc_fast macroblock_type_B;
- vlc_fast motion_code;
- vlc_fast dmvector;
- vlc_fast coded_block_pattern;
- #endif //MEDIAINFO_MACROBLOCKS
-
- #if MEDIAINFO_IBIUSAGE
- bool Ibi_SliceParsed;
- #endif //MEDIAINFO_IBIUSAGE
-
- #if MEDIAINFO_ADVANCED
- int64u InitDataNotRepeated;
- int64u Config_InitDataNotRepeated_Occurences;
- bool Config_InitDataNotRepeated_GiveUp;
- int64u Config_VariableGopDetection_Occurences;
- bool Config_VariableGopDetection_GiveUp;
- #endif // MEDIAINFO_ADVANCED
-
- #if MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
- size_t Slices_Count;
- bool Has_sequence_header;
- bool Has_sequence_extension;
- #endif // MEDIAINFO_ADVANCED || MEDIAINFO_EVENTS
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_ProRes.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_ProRes.cpp
deleted file mode 100644
index 89e8611a4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_ProRes.cpp
+++ /dev/null
@@ -1,246 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_PRORES_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_ProRes.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Mpegv_colour_primaries(int8u colour_primaries);
-const char* Mpegv_transfer_characteristics(int8u transfer_characteristics);
-const char* Mpegv_matrix_coefficients(int8u matrix_coefficients);
-
-//---------------------------------------------------------------------------
-const char* ProRes_chrominance_factor(int8u chrominance_factor)
-{
- switch (chrominance_factor)
- {
- case 0x02 : return "4:2:2";
- case 0x03 : return "4:4:4";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* ProRes_frame_type_ScanType(int8u frame_type)
-{
- switch (frame_type)
- {
- case 0x00 : return "Progressive";
- case 0x01 :
- case 0x02 : return "Interlaced";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const char* ProRes_frame_type_ScanOrder(int8u frame_type)
-{
- switch (frame_type)
- {
- case 0x01 : return "TFF";
- case 0x02 : return "BFF";
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-Ztring ProRes_creatorID(int32u creatorID)
-{
- switch (creatorID)
- {
- case 0x61706C30 : return __T("Apple"); //apl0
- case 0x61727269 : return __T("Arnold & Richter Cine Technik"); //arri
- case 0x616A6130 : return __T("AJA Kona Hardware"); //aja0
- default : return Ztring().From_CC4(creatorID);
- }
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_ProRes::File_ProRes()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("ProRes");
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_ProRes::Streams_Fill()
-{
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "ProRes");
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_ProRes::Read_Buffer_Continue()
-{
- //Parsing
- int32u Name, creatorID;
- int16u hdrSize, version, frameWidth, frameHeight;
- int8u chrominance_factor, frame_type, primaries, transf_func, colorMatrix;
- bool IsOk=true, luma, chroma;
- Element_Begin1("Header");
- Skip_B4( "Size");
- Get_C4 (Name, "Name");
- Element_End();
- Element_Begin1("Frame header");
- Get_B2 (hdrSize, "hdrSize");
- Get_B2 (version, "version");
- Get_C4 (creatorID, "creatorID");
- Get_B2 (frameWidth, "frameWidth");
- Get_B2 (frameHeight, "frameHeight");
- BS_Begin();
- Get_S1 (2, chrominance_factor, "chrominance factor"); Param_Info1(ProRes_chrominance_factor(chrominance_factor));
- Skip_S1(2, "reserved");
- Get_S1 (2, frame_type, "frame type"); Param_Info1(ProRes_frame_type_ScanType(frame_type)); Param_Info1(ProRes_frame_type_ScanOrder(frame_type));
- Skip_S1(2, "reserved");
- BS_End();
- Skip_B1( "reserved");
- Get_B1 (primaries, "primaries"); Param_Info1(Mpegv_colour_primaries(primaries));
- Get_B1 (transf_func, "transf_func"); Param_Info1(Mpegv_transfer_characteristics(transf_func));
- Get_B1 (colorMatrix, "colorMatrix"); Param_Info1(Mpegv_matrix_coefficients(colorMatrix));
- BS_Begin();
- Skip_S1(4, "src_pix_fmt");
- Skip_S1(4, "alpha_info");
- BS_End();
- Skip_B1( "reserved");
- BS_Begin();
- Skip_S1(6, "reserved");
- Get_SB (luma, "custom luma quant matrix present");
- Get_SB (chroma, "custom chroma quant matrix present");
- BS_End();
- if (luma)
- Skip_XX(64, "QMatLuma");
- if (chroma)
- Skip_XX(64, "QMatChroma");
- Element_End();
- if (Element_Offset!=8+hdrSize)
- IsOk=false;
- for (int8u PictureNumber=0; PictureNumber<(frame_type?2:1); PictureNumber++)
- {
- Element_Begin1("Picture layout");
- int16u total_slices;
- vector<int16u> slices_size;
- Element_Begin1("Picture header");
- int64u pic_hdr_End, pic_data_End;
- int32u pic_data_size;
- int8u pic_hdr_size;
- Get_B1 (pic_hdr_size, "pic_hdr_size");
- if (pic_hdr_size<64)
- {
- Trusted_IsNot("pic_hdr_size");
- Element_End();
- Element_End();
- return;
- }
- pic_hdr_End=Element_Offset+pic_hdr_size/8-((pic_hdr_size%8)?0:1);
- Get_B4 (pic_data_size, "pic_data_size");
- if (pic_data_size<8)
- {
- Trusted_IsNot("pic_data_size");
- Element_End();
- Element_End();
- return;
- }
- pic_data_End=Element_Offset+pic_data_size-5;
- Get_B2 (total_slices, "total_slices");
- BS_Begin();
- Skip_S1(4, "slice_width_factor");
- Skip_S1(4, "slice_height_factor");
- BS_End();
- if (Element_Offset<pic_hdr_End)
- Skip_XX(pic_hdr_End-Element_Offset, "Unknown");
- Element_End();
- Element_Begin1("Slice index table");
- for (int16u Pos=0; Pos<total_slices; Pos++)
- {
- int16u slice_size;
- Get_B2 (slice_size, "slice_size");
- slices_size.push_back(slice_size);
- }
- Element_End();
- for (int16u Pos=0; Pos<slices_size.size(); Pos++)
- {
- Skip_XX(slices_size[Pos], "slice data");
- }
- if (Element_Offset<pic_data_End)
- Skip_XX(pic_data_End-Element_Offset, "Unknown");
- Element_End();
- }
- bool IsZeroes=true;
- for (size_t Pos=(size_t)Element_Offset; Pos<(size_t)Element_Size; Pos++)
- if (Buffer[Buffer_Offset+Pos])
- {
- IsZeroes=false;
- break;
- }
- Skip_XX(Element_Size-Element_Offset, IsZeroes?"Zeroes":"Unknown");
-
- FILLING_BEGIN();
- if (IsOk && Name==0x69637066 && !Status[IsAccepted]) //icpf
- {
- Accept();
- Fill();
-
- Fill(Stream_Video, 0, Video_Format_Version, __T("Version ")+Ztring::ToZtring(version));
- Fill(Stream_Video, 0, Video_Width, frameWidth);
- Fill(Stream_Video, 0, Video_Height, frameHeight);
- Fill(Stream_Video, 0, Video_Encoded_Library, ProRes_creatorID(creatorID));
- Fill(Stream_Video, 0, Video_ChromaSubsampling, ProRes_chrominance_factor(chrominance_factor));
- Fill(Stream_Video, 0, Video_ScanType, ProRes_frame_type_ScanType(frame_type));
- Fill(Stream_Video, 0, Video_ScanOrder, ProRes_frame_type_ScanOrder(frame_type));
- Fill(Stream_Video, 0, Video_colour_description_present, "Yes");
- Fill(Stream_Video, 0, Video_colour_primaries, Mpegv_colour_primaries(primaries));
- Fill(Stream_Video, 0, Video_transfer_characteristics, Mpegv_transfer_characteristics(transf_func));
- Fill(Stream_Video, 0, Video_matrix_coefficients, Mpegv_matrix_coefficients(colorMatrix));
-
- Finish();
- }
- FILLING_END();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_PRORES_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_ProRes.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_ProRes.h
deleted file mode 100644
index 4fd79d3c8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_ProRes.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about ProRes files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_ProResH
-#define MediaInfo_File_ProResH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Lagarith
-//***************************************************************************
-
-class File_ProRes : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_ProRes();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Global
- void Read_Buffer_Continue ();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Theora.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Theora.cpp
deleted file mode 100644
index 35af44602..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Theora.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Note : the buffer must be given in ONE call
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_THEORA_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Theora.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Format
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Theora::Header_Parse()
-{
- //Filling
- Header_Fill_Code(0, "Theora");
- Header_Fill_Size(Element_Size);
-}
-
-//---------------------------------------------------------------------------
-void File_Theora::Data_Parse()
-{
- //Parsing
- if (Status[IsAccepted])
- Setup();
- else
- Identification();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Theora::Identification()
-{
- Element_Name("Identification");
-
- //Parsing
- int32u Version, PICW=0, PICH=0, FRN=0, FRD=0, PARN=0, PARD=0, NOMBR=0;
- Skip_B1 ( "Signature");
- Skip_Local(6, "Signature");
- Get_B3 (Version, "Version");
- if ((Version&0x030200)==0x030200) //Version 3.2.x
- {
- Skip_B2( "FMBW");
- Skip_B2( "FMBH");
- Get_B3 (PICW, "PICW");
- Get_B3 (PICH, "PICH");
- Skip_B1( "PICX");
- Skip_B1( "PICY");
- Get_B4 (FRN, "FRN");
- Get_B4 (FRD, "FRD");
- Get_B3 (PARN, "PARN");
- Get_B3 (PARD, "PARD");
- Skip_B1( "CS"); // //0=4:2:0, 2=4:2:2, 3=4:4:4
- Get_B3 (NOMBR, "NOMBR"); //The nominal bitrate of the stream
- BS_Begin();
- Skip_BS( 6, "QUAL"); //The quality hint.
- Skip_BS( 5, "KFGSHIFT");
- Skip_BS( 2, "PF"); //The Pixel Format
- Skip_BS( 3, "Reserved");
- BS_End();
- }
-
- //Filling
- FILLING_BEGIN();
- Accept("Theora");
-
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, StreamPos_Last, Video_Format, "Theora");
- Fill(Stream_Video, StreamPos_Last, Video_Codec, "Theora");
- if ((Version&0x030200)!=0x030200) //Version 3.2.x
- return;
- if (FRN && FRD)
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, ((float)FRN)/FRD, 3);
- float PixelRatio=1;
- if (PARN && PARD)
- PixelRatio=((float)PARN)/(float)PARD;
- Fill(Stream_Video, StreamPos_Last, Video_Width, PICW);
- Fill(Stream_Video, StreamPos_Last, Video_Height, PICH);
- Fill(Stream_Video, StreamPos_Last, Video_DisplayAspectRatio, ((float)PICW)/((float)PICH)*PixelRatio, 3, true);
- if (NOMBR)
- Fill(Stream_Video, StreamPos_Last, Video_BitRate_Nominal, NOMBR);
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Theora::Setup()
-{
- Element_Name("Setup");
-
- //Parsing
- Skip_XX(Element_Size, "Unknown");
-
- Finish("Theora");
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_THEORA_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Theora.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Theora.h
deleted file mode 100644
index e813cf85d..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Theora.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about Theora files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_File_TheoraH
-#define MediaInfo_File_TheoraH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Theora
-//***************************************************************************
-
-class File_Theora : public File__Analyze
-{
-private :
- //Buffer - Per element
- void Header_Parse();
- void Data_Parse();
-
- //Elements
- void Identification();
- void Setup();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc1.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc1.cpp
deleted file mode 100644
index 1aa639b63..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc1.cpp
+++ /dev/null
@@ -1,1222 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_VC1_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Vc1.h"
-#include "ZenLib/BitStream.h"
-#undef FILLING_BEGIN
-#define FILLING_BEGIN() \
- while (Element_Offset<Element_Size && Buffer[Buffer_Offset+(size_t)Element_Offset]==0x00) \
- Element_Offset++; \
- if (Element_Offset!=Element_Size) \
- Trusted_IsNot("Size error"); \
- else if (Element_IsOK()) \
- {
-#include <cmath>
-#if MEDIAINFO_EVENTS
- #include "MediaInfo/MediaInfo_Config_MediaInfo.h"
- #include "MediaInfo/MediaInfo_Events.h"
- #include "MediaInfo/MediaInfo_Events_Internal.h"
-#endif //MEDIAINFO_EVENTS
-#if MEDIAINFO_DEMUX
- #include <cstring>
- #include "base64.h"
-#endif //MEDIAINFO_DEMUX
-using namespace std;
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const char* Vc1_Profile[]=
-{
- "Simple",
- "Main",
- "Complex",
- "Advanced",
-};
-
-//---------------------------------------------------------------------------
-const char* Vc1_ColorimetryFormat[]=
-{
- "",
- "4:2:0",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const float32 Vc1_PixelAspectRatio[]=
-{
- (float32)1, //Reserved
- (float32)1,
- (float32)12/(float32)11,
- (float32)10/(float32)11,
- (float32)16/(float32)11,
- (float32)40/(float32)33,
- (float32)24/(float32)11,
- (float32)20/(float32)11,
- (float32)32/(float32)11,
- (float32)80/(float32)33,
- (float32)18/(float32)11,
- (float32)15/(float32)11,
- (float32)64/(float32)33,
- (float32)160/(float32)99,
- (float32)1, //Reserved
- (float32)1, //Custom
-};
-
-//---------------------------------------------------------------------------
-float32 Vc1_FrameRate_enr(int8u Code)
-{
- switch (Code)
- {
- case 0x01 : return (float32)24000;
- case 0x02 : return (float32)25000;
- case 0x03 : return (float32)30000;
- case 0x04 : return (float32)50000;
- case 0x05 : return (float32)60000;
- case 0x06 : return (float32)48000;
- case 0x07 : return (float32)72000;
- default : return (float32)0;
- }
-}
-
-//---------------------------------------------------------------------------
-float32 Vc1_FrameRate_dr(int8u Code)
-{
- switch (Code)
- {
- case 0x01 : return (float32)1000;
- case 0x02 : return (float32)1001;
- default : return (float32)0;
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Vc1_Type[]=
-{
- "I",
- "P",
- "B",
- "BI",
- "Skipped",
-};
-
-//---------------------------------------------------------------------------
-const char* Vc1_PictureFormat[]=
-{
- "Progressive frame",
- "Interlaced frame",
- "Two interlaced fields",
- "",
-};
-
-//---------------------------------------------------------------------------
-const int8u Vc1_FieldTypeTable[][2]=
-{
- {0, 0},
- {0, 1},
- {1, 0},
- {1, 1},
- {2, 2},
- {2, 3},
- {3, 2},
- {3, 3},
-};
-
-//---------------------------------------------------------------------------
-const File__Analyze::vlc Vc1_ptype[]=
-{
- // macroblock_address_increment
- { 0 , 1 , 0 , 0 , 1 },
- { 2 , 1 , 0 , 0 , 2 },
- { 6 , 1 , 0 , 0 , 0 },
- { 14 , 1 , 0 , 0 , 3 },
- { 15 , 0 , 0 , 0 , 4 },
- VLC_END
-};
-
-//---------------------------------------------------------------------------
-int32u Vc1_bfraction(int8u Size, int32u Value)
-{
- switch (Size)
- {
- case 3 :
- switch (Value)
- {
- case 0x00 : return 0x00;
- case 0x01 : return 0x01;
- case 0x02 : return 0x02;
- case 0x03 : return 0x03;
- case 0x04 : return 0x04;
- case 0x05 : return 0x05;
- case 0x06 : return 0x06;
- default : return (int32u)-1;
- }
- case 7 :
- switch (Value)
- {
- case 0x70 : return 0x70;
- case 0x71 : return 0x71;
- case 0x72 : return 0x72;
- case 0x73 : return 0x73;
- case 0x74 : return 0x74;
- case 0x75 : return 0x75;
- case 0x76 : return 0x76;
- case 0x77 : return 0x77;
- case 0x78 : return 0x78;
- case 0x79 : return 0x79;
- case 0x7A : return 0x7A;
- case 0x7B : return 0x7B;
- case 0x7C : return 0x7C;
- case 0x7D : return 0x7D;
- case 0x7E : return 0x7E;
- case 0x7F : return 0x7F;
- default : return (int32u)-1;
- }
- default: return (int32u)-1;
- }
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Vc1::File_Vc1()
-:File__Analyze()
-{
- //Config
- #if MEDIAINFO_EVENTS
- ParserIDs[0]=MediaInfo_Parser_Vc1;
- StreamIDs_Width[0]=0;
- #endif //MEDIAINFO_EVENTS
- MustSynchronize=true;
- Buffer_TotalBytes_FirstSynched_Max=64*1024;
- PTS_DTS_Needed=true;
- IsRawStream=true;
- Frame_Count_NotParsedIncluded=0;
-
- //In
- Frame_Count_Valid=30;
- FrameIsAlwaysComplete=false;
- From_WMV3=false;
- Only_0D=false;
-
- //Temp
- EntryPoint_Parsed=false;
- FrameRate=0;
- RefFramesCount=0;
-
- #if MEDIAINFO_DEMUX
- InitData_Buffer=NULL;
- InitData_Buffer_Size=0;
- #endif //MEDIAINFO_DEMUX
-}
-
-//---------------------------------------------------------------------------
-File_Vc1::~File_Vc1()
-{
- #if MEDIAINFO_DEMUX
- delete[] InitData_Buffer;
- #endif //MEDIAINFO_DEMUX
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Vc1::Streams_Accept()
-{
- //Filling
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "VC-1");
- Fill(Stream_Video, 0, Video_Codec, From_WMV3?"WMV3":"VC-1"); //For compatibility with the old reaction
- Fill(Stream_Video, 0, Video_BitDepth, 8);
-}
-
-//---------------------------------------------------------------------------
-void File_Vc1::Streams_Fill()
-{
- //Calculating - PixelAspectRatio
- float32 PixelAspectRatio;
- if (AspectRatio!=0x0F)
- PixelAspectRatio=Vc1_PixelAspectRatio[AspectRatio];
- else if (AspectRatioY)
- PixelAspectRatio=((float)AspectRatioX)/((float)AspectRatioY);
- else
- PixelAspectRatio=1; //Unknown
-
- Ztring Profile;
- if (profile!=(int8u)-1)
- Profile=Vc1_Profile[profile];
- if (profile==3 && level!=(int8u)-1)
- Profile+=__T("@L")+Ztring::ToZtring(level);
- Fill(Stream_Video, 0, Video_Format_Profile, Profile);
- Fill(Stream_Video, 0, Video_Codec_Profile, Profile);
- Fill(Stream_Video, 0, Video_ColorSpace, "YUV");
- Fill(Stream_Video, 0, Video_Colorimetry, Vc1_ColorimetryFormat[colordiff_format]);
- if (coded_width && coded_height)
- {
- Fill(Stream_Video, StreamPos_Last, Video_Width, (coded_width+1)*2);
- Fill(Stream_Video, StreamPos_Last, Video_Height, (coded_height+1)*2);
- }
- if (PixelAspectRatio!=0)
- Fill(Stream_Video, 0, Video_PixelAspectRatio, PixelAspectRatio, 3, true);
- if (FrameRate!=0)
- Fill(Stream_Video, StreamPos_Last, Video_FrameRate, FrameRate);
-
- //Interlacement
- if (!interlace || (PictureFormat_Count[1]==0 && PictureFormat_Count[2]==0)) //No interlaced frame/field
- {
- Fill(Stream_Video, 0, Video_ScanType, "Progressive");
- Fill(Stream_Video, 0, Video_Interlacement, "PPF");
- }
- else if (PictureFormat_Count[0]>0) //Interlaced and non interlaced frames/fields
- {
- Fill(Stream_Video, 0, Video_ScanType, "Mixed");
- Fill(Stream_Video, 0, Video_Interlacement, "Mixed");
- }
- else
- {
- Fill(Stream_Video, 0, Video_ScanType, "Interlaced");
- Fill(Stream_Video, 0, Video_Interlacement, "Interlaced");
- }
- if (Frame_Count>0 && interlace)
- Fill(Stream_Video, 0, Video_ScanOrder, Interlaced_Bottom?"BFF":"TFF");
- std::string TempRef;
- for (std::map<int16u, temporalreference>::iterator Temp=TemporalReference.begin(); Temp!=TemporalReference.end(); ++Temp)
- {
- TempRef+=Temp->second.top_field_first?"T":"B";
- TempRef+=Temp->second.repeat_first_field?"3":"2";
- }
- if (TempRef.find('3')!=std::string::npos) //A pulldown maybe is detected
- {
- if (TempRef.find("T2T3B2B3T2T3B2B3")!=std::string::npos
- || TempRef.find("B2B3T2T3B2B3T2T3")!=std::string::npos)
- {
- Fill(Stream_Video, 0, Video_ScanOrder, "2:3 Pulldown", Unlimited, true, true);
- Fill(Stream_Video, 0, Video_FrameRate, FrameRate*24/30, 3, true); //Real framerate
- Fill(Stream_Video, 0, Video_ScanType, "Progressive", Unlimited, true, true);
- Fill(Stream_Video, 0, Video_Interlacement, "PPF", Unlimited, true, true);
- }
- if (TempRef.find("T2T2T2T2T2T2T2T2T2T2T2T3B2B2B2B2B2B2B2B2B2B2B2B3")!=std::string::npos
- || TempRef.find("B2B2B2B2B2B2B2B2B2B2B2B3T2T2T2T2T2T2T2T2T2T2T2T3")!=std::string::npos)
- {
- Fill(Stream_Video, 0, Video_ScanOrder, "2:2:2:2:2:2:2:2:2:2:2:3 Pulldown", Unlimited, true, true);
- Fill(Stream_Video, 0, Video_FrameRate, FrameRate*24/25, 3, true); //Real framerate
- Fill(Stream_Video, 0, Video_ScanType, "Progressive", Unlimited, true, true);
- Fill(Stream_Video, 0, Video_Interlacement, "PPF", Unlimited, true, true);
- }
- }
-
- //Buffer
- for (size_t Pos=0; Pos<hrd_buffers.size(); Pos++)
- Fill(Stream_Video, 0, Video_BufferSize, hrd_buffers[Pos]);
-}
-
-//---------------------------------------------------------------------------
-void File_Vc1::Streams_Finish()
-{
- if (PTS_End>PTS_Begin)
- Fill(Stream_Video, 0, Video_Duration, float64_int64s(((float64)(PTS_End-PTS_Begin))/1000000));
-
- #if MEDIAINFO_IBIUSAGE
- int64u Numerator=0, Denominator=0;
- if (framerate_present)
- {
- if (framerate_form)
- {
- Numerator=framerateexp+1;
- Denominator=32;
- }
- else if (Vc1_FrameRate_dr(frameratecode_dr))
- {
- Numerator=(int64u)Vc1_FrameRate_enr(frameratecode_enr);
- Denominator=(int64u)Vc1_FrameRate_dr(frameratecode_dr);
- }
- }
- if (Numerator)
- Ibi_Stream_Finish(Numerator, Denominator);
- #endif //MEDIAINFO_IBIUSAGE
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Vc1::FileHeader_Begin()
-{
- if (!File__Analyze::FileHeader_Begin_0x000001())
- return false;
-
- if (!MustSynchronize)
- {
- Synched_Init();
- Buffer_TotalBytes_FirstSynched+=0;
- File_Offset_FirstSynched=File_Offset;
- }
-
- //All should be OK
- return true;
-}
-
-//***************************************************************************
-// Buffer - Synchro
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Vc1::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+4>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x01)
- {
- Synched=false;
- return true;
- }
-
- //Quick search
- if (!Header_Parser_QuickSearch())
- return false;
-
- #if MEDIAINFO_IBIUSAGE
- bool RandomAccess=Buffer[Buffer_Offset+3]==0x0F; //SequenceHeader
- if (RandomAccess)
- Ibi_Add();
- #endif //MEDIAINFO_IBIUSAGE
-
- //We continue
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Vc1::Synched_Init()
-{
- //Count
- Interlaced_Top=0;
- Interlaced_Bottom=0;
- PictureFormat_Count.resize(4);
- if (Frame_Count_NotParsedIncluded==(int64u)-1)
- Frame_Count_NotParsedIncluded=0; //No Frame_Count_NotParsedIncluded in the container
-
- //Temp
- coded_width=0;
- coded_height=0;
- framerateexp=0;
- frameratecode_enr=0;
- frameratecode_dr=0;
- profile=(int8u)-1;
- level=(int8u)-1;
- colordiff_format=1; //Default is 4:2:0
- AspectRatio=0;
- AspectRatioX=0;
- AspectRatioY=0;
- hrd_num_leaky_buckets=0;
- max_b_frames=7; //Default for advanced profile
- interlace=false;
- tfcntrflag=false;
- framerate_present=false;
- framerate_form=false;
- hrd_param_flag=false;
- finterpflag=false;
- rangered=false;
- psf=false;
- pulldown=false;
- panscan_flag=false;
- #if MEDIAINFO_DEMUX
- Demux_IntermediateItemFound=true;
- #endif //MEDIAINFO_DEMUX
-
- TemporalReference_Offset=0;
-
- if (!IsSub)
- FrameInfo.DTS=0;
-
- //Default stream values
- Streams.resize(0x100);
- Streams[0x0F].Searching_Payload=true;
-}
-
-//***************************************************************************
-// Buffer - Demux
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-bool File_Vc1::Demux_UnpacketizeContainer_Test()
-{
- if ((Demux_IntermediateItemFound && Buffer[Buffer_Offset+3]==0x0D) || Buffer[Buffer_Offset+3]==0x0F)
- {
- if (Demux_Offset==0)
- {
- Demux_Offset=Buffer_Offset;
- Demux_IntermediateItemFound=false;
- }
- while (Demux_Offset+4<=Buffer_Size)
- {
- //Synchronizing
- while(Demux_Offset+3<=Buffer_Size && (Buffer[Demux_Offset ]!=0x00
- || Buffer[Demux_Offset+1]!=0x00
- || Buffer[Demux_Offset+2]!=0x01))
- {
- Demux_Offset+=2;
- while(Demux_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Demux_Offset+=2;
- if (Demux_Offset>=Buffer_Size || Buffer[Demux_Offset-1]==0x00)
- Demux_Offset--;
- }
-
- if (Demux_Offset+4<=Buffer_Size)
- {
- if (Demux_IntermediateItemFound)
- {
- bool MustBreak;
- switch (Buffer[Demux_Offset+3])
- {
- case 0x0D :
- case 0x0F :
- MustBreak=true; break;
- default :
- Demux_Offset+=3;
- MustBreak=false;
- }
- if (MustBreak)
- break; //while() loop
- }
- else
- {
- if (Buffer[Demux_Offset+3]==0x0D)
- Demux_IntermediateItemFound=true;
- }
- }
- Demux_Offset++;
- }
-
- if (Demux_Offset+4>Buffer_Size && File_Offset+Buffer_Size!=File_Size)
- return false; //No complete frame
-
- if (!Status[IsAccepted])
- {
- Accept("VC-1");
- if (Config->Demux_EventWasSent)
- return false;
- }
-
- //Demux
- #if MEDIAINFO_DEMUX
- if (InitData_Buffer_Size && Buffer[Buffer_Offset+3]==0x0F) //First SequenceHeader
- {
- //Searching begin of frame (after SequenceHeader/EntryPointHeader)
- size_t Header_End=4;
- for (; Header_End<Demux_Offset; Header_End++)
- if (Buffer[Header_End ]==0x00
- && Buffer[Header_End+1]==0x00
- && Buffer[Header_End+2]==0x01
- && Buffer[Header_End+2]==0x0D)
- break;
-
- switch (Config->Demux_InitData_Get())
- {
- case 0 : //In demux event
- break; //Will be done in the first demux event
- case 1 : //In field
- {
- std::string Data_Raw((const char*)(Buffer+Buffer_Offset), (size_t)(Header_End-Buffer_Offset));
- std::string Data_Base64(Base64::encode(Data_Raw));
- Fill(Stream_Video, StreamPos_Last, "Demux_InitBytes", Data_Base64);
- (*Stream_More)[Stream_Video][StreamPos_Last](Ztring().From_Local("Demux_InitBytes"), Info_Options)=__T("N NT");
- }
- break;
- default : ;
- }
-
- delete[] InitData_Buffer; InitData_Buffer=NULL;
- InitData_Buffer_Size=0;
- }
- #endif //MEDIAINFO_DEMUX
-
- Demux_UnpacketizeContainer_Demux(Buffer[Buffer_Offset+3]==0x0F);
- }
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Vc1::Read_Buffer_Unsynched()
-{
- RefFramesCount=0;
- #if MEDIAINFO_DEMUX
- Demux_IntermediateItemFound=true;
- #endif //MEDIAINFO_DEMUX
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Vc1::Header_Parse()
-{
- //Specific
- if (From_WMV3 || Only_0D)
- {
- Header_Fill_Size(Buffer_Size);
- Header_Fill_Code(From_WMV3?0x0F:0x0D, Ztring().From_CC1(From_WMV3?0x0F:0x0D));
- return;
- }
-
- //Parsing
- Skip_B3( "synchro");
- Get_B1 (start_code, "start_code");
- if (!Header_Parser_Fill_Size())
- {
- Element_WaitForMoreData();
- return;
- }
-
- //Filling
- Header_Fill_Code(start_code, Ztring().From_CC1(start_code));
-}
-
-//---------------------------------------------------------------------------
-void File_Vc1::Data_Parse()
-{
- //Parse
- switch (Element_Code)
- {
- case 0x0A: EndOfSequence(); break;
- case 0x0B: Slice(); break;
- case 0x0C: Field(); break;
- case 0x0D: FrameHeader(); break;
- case 0x0E: EntryPointHeader(); break;
- case 0x0F: SequenceHeader(); break;
- case 0x1B: UserDefinedSlice(); break;
- case 0x1C: UserDefinedField(); break;
- case 0x1D: UserDefinedFrameHeader(); break;
- case 0x1E: UserDefinedEntryPointHeader(); break;
- case 0x1F: UserDefinedSequenceHeader(); break;
- default:
- Trusted_IsNot("Unattended element!");
- }
-}
-
-//---------------------------------------------------------------------------
-bool File_Vc1::Header_Parser_Fill_Size()
-{
- //Look for next Sync word
- if (Buffer_Offset_Temp==0) //Buffer_Offset_Temp is not 0 if Header_Parse_Fill_Size() has already parsed first frames
- Buffer_Offset_Temp=Buffer_Offset+4;
- while (Buffer_Offset_Temp+4<=Buffer_Size
- && CC3(Buffer+Buffer_Offset_Temp)!=0x000001)
- {
- Buffer_Offset_Temp+=2;
- while(Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp]!=0x00)
- Buffer_Offset_Temp+=2;
- if (Buffer_Offset_Temp>=Buffer_Size || Buffer[Buffer_Offset_Temp-1]==0x00)
- Buffer_Offset_Temp--;
-
- if (start_code==0x0D) //FrameHeader, we need only few bytes
- {
- if (Buffer_Offset_Temp-Buffer_Offset>20)
- {
- //OK, we continue, we have enough for a slice
- Header_Fill_Size(16);
- Buffer_Offset_Temp=0;
- return true;
- }
- }
- }
-
- //Must wait more data?
- if (Buffer_Offset_Temp+4>Buffer_Size)
- {
- if (FrameIsAlwaysComplete || File_Offset+Buffer_Size==File_Size)
- Buffer_Offset_Temp=Buffer_Size; //We are sure that the next bytes are a start
- else
- return false;
- }
-
- //OK, we continue
- Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
- Buffer_Offset_Temp=0;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Vc1::Header_Parser_QuickSearch()
-{
- while ( Buffer_Offset+4<=Buffer_Size
- && Buffer[Buffer_Offset ]==0x00
- && Buffer[Buffer_Offset+1]==0x00
- && Buffer[Buffer_Offset+2]==0x01)
- {
- //Getting start_code
- int8u start_code=CC1(Buffer+Buffer_Offset+3);
-
- //Searching start
- if (Streams[start_code].Searching_Payload)
- return true;
-
- //Synchronizing
- Buffer_Offset+=4;
- Synched=false;
- if (!Synchronize())
- {
- UnSynched_IsNotJunk=true;
- return false;
- }
-
- if (Buffer_Offset+4>Buffer_Size)
- {
- UnSynched_IsNotJunk=true;
- return false;
- }
- }
-
- if (Buffer_Offset+3==Buffer_Size)
- return false; //Sync is OK, but start_code is not available
- Trusted_IsNot("VC-1, Synchronisation lost");
- return Synchronize();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Packet "0A"
-void File_Vc1::EndOfSequence()
-{
- Element_Name("EndOfSequence");
-}
-
-//---------------------------------------------------------------------------
-// Packet "0B"
-void File_Vc1::Slice()
-{
- Element_Name("Slice");
-}
-
-//---------------------------------------------------------------------------
-// Packet "0C"
-void File_Vc1::Field()
-{
- Element_Name("Field");
-}
-
-//---------------------------------------------------------------------------
-// Packet "0D"
-void File_Vc1::FrameHeader()
-{
- //Name
- Element_Name("FrameHeader");
- Element_Info1(Ztring(__T("Frame ")+Ztring::ToZtring(Frame_Count)));
- if (FrameRate)
- {
- Element_Info1C((FrameInfo.PTS!=(int64u)-1), __T("PTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.PTS)/1000000+Frame_Count_InThisBlock*1000/FrameRate)));
- Element_Info1C((FrameInfo.DTS!=(int64u)-1), __T("DTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.DTS)/1000000)));
- }
-
- //Counting
- if (File_Offset+Buffer_Offset+Element_Size==File_Size)
- Frame_Count_Valid=Frame_Count; //Finish frames in case of there are less than Frame_Count_Valid frames
- Frame_Count++;
- Frame_Count_InThisBlock++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
-
- //Parsing
- BS_Begin();
- int8u ptype=(int8u)-1;
- if (profile==3) //Advanced
- {
- int8u PictureFormat=0; //Default=Progressive frame
- if (interlace)
- {
- bool fcm_1;
- Get_SB ( fcm_1, "fcm_1");
- if (fcm_1)
- {
- bool fcm_2;
- Get_SB ( fcm_2, "fcm_2");
- PictureFormat=fcm_2?2:1; //Interlaced Field : Interlaced Frame
- }
- }
- Param_Info1(Vc1_PictureFormat[PictureFormat]);
- PictureFormat_Count[PictureFormat]++;
-
- if (PictureFormat==2) //Interlaced Field
- {
- int8u ptype_;
- Get_S1 ( 3, ptype_, "ptype");
- if (ptype_<5)
- {
- Param_Info1(Vc1_Type[Vc1_FieldTypeTable[ptype_][0]]); Element_Info1(Vc1_Type[Vc1_FieldTypeTable[ptype_][0]]); //First field
- Param_Info1(Vc1_Type[Vc1_FieldTypeTable[ptype_][1]]); Element_Info1(Vc1_Type[Vc1_FieldTypeTable[ptype_][1]]); //Second field
- ptype=Vc1_FieldTypeTable[ptype_][0]; //Saving the ptype from the first field
- }
- else
- {
- Trusted_IsNot("ptype is out of range");
- ptype=0; //Error
- }
- }
- else
- {
- size_t ptype_;
- Get_VL (Vc1_ptype, ptype_, "ptype"); if (ptype_<5) {Param_Info1(Vc1_Type[Vc1_ptype[ptype_].mapped_to3]); Element_Info1(Vc1_Type[Vc1_ptype[ptype_].mapped_to3]);}
- ptype=(int8u)Vc1_ptype[ptype_].mapped_to3;
- }
- if (RefFramesCount<2 && (ptype==0 || ptype==1))
- RefFramesCount++;
- if (FrameInfo.DTS!=(int64u)-1)
- {
- if (framerate_present)
- FrameInfo.DTS+=float64_int64s(((float64)1000000000)/FrameRate);
- }
- if (FrameInfo.PTS!=(int64u)-1)
- {
- if (PTS_Begin==(int64u)-1 && ptype==0) //IFrame
- PTS_Begin=FrameInfo.PTS;
- if ((ptype==0 || ptype==1) && Frame_Count_InThisBlock<=1) //IFrame or PFrame
- PTS_End=FrameInfo.PTS;
- if ((ptype==0 || ptype==1) || (Frame_Count_InThisBlock>=2 && RefFramesCount>=2)) //IFrame or PFrame or more than 2 RefFrame for BFrames
- {
- if (framerate_present)
- PTS_End+=float64_int64s(((float64)1000000000)/FrameRate);
- }
- }
-
- if (ptype!=4) //!=Skipping
- {
- if (tfcntrflag)
- {
- Skip_S1( 8, "tfcntr - frame counter");
- }
- }
-
- if (interlace && !psf)
- {
- bool tff=true, rff=false;
- if (pulldown)
- {
- Get_SB (tff, "tff - top field first");
- Get_SB (rff, "rff - repeat first field");
- if (tff)
- Interlaced_Top++;
- else
- Interlaced_Bottom++;
-
- if (TemporalReference.size()<30)
- {
- if (ptype!=2 && ptype!=3 //if not B and BI-frame
- && !TemporalReference_Waiting.empty()) //We must have 2 I or P pictures to be sure not having B picture later
- {
- //We have 2 I or P pictures
- for (size_t Pos=1; Pos<TemporalReference_Waiting.size(); Pos++) //All B frames (not the first frame, which is I or P)
- {
- TemporalReference_Offset++;
- TemporalReference[TemporalReference_Offset]=TemporalReference_Waiting[Pos];
- }
- TemporalReference_Offset++;
- TemporalReference[TemporalReference_Offset]=TemporalReference_Waiting[0];
- TemporalReference_Waiting.clear();
- }
-
- //We must wait for having another I or P picture
- temporalreference Temp;
- Temp.top_field_first=tff;
- Temp.repeat_first_field=rff;
- TemporalReference_Waiting.push_back(Temp);
- }
- }
- }
- else
- {
- int8u rptfrm=0;
- if (pulldown)
- {
- Get_S1 ( 2, rptfrm, "rptfrm - repeate frame");
- }
- }
-
- /*
- if (panscan_flag)
- {
- //TODO
- }
-
- if (ptype!=4) //!=Skipping
- {
- bool rndctrl;
- Get_SB( rndctrl, "rndctrl - rounding control");
- if (rndctrl && (ptype==0 || ptype==3)) //I or BI type
- Trusted_IsNot("Should not be true!");
-
- if (interlace)
- Skip_SB( "uvsamp - uv sampling mode");
-
- if (finterpflag && PictureFormat==0) //Progressive frame
- Skip_SB( "interrpfrm");
-
- if (PictureFormat!=1) //!=Interlaced frame
- {
- if (ptype==2 //Type B
- || (ptype==3 && PictureFormat==2)) //Type BI and Interlaced field
- Skip_VL(Vc1_bfraction, "bfraction");
- }
- }
- */
- }
- BS_End();
- if (Element_Size-Element_Offset)
- Skip_XX(Element_Size-Element_Offset, "Data");
-
- FILLING_BEGIN();
- //NextCode
- NextCode_Test();
- NextCode_Clear();
- NextCode_Add(0x0D);
- NextCode_Add(0x0F);
-
- //Autorisation of other streams
- Streams[0x0D].Searching_Payload=true;
- Streams[0x0F].Searching_Payload=true;
-
- //Filling only if not already done
- if (!Status[IsFilled] && Frame_Count>=Frame_Count_Valid)
- {
- Fill("VC-1");
-
- if (!IsSub && MediaInfoLib::Config.ParseSpeed_Get()<1)
- Finish("VC-1");
- }
-
- #if MEDIAINFO_EVENTS
- {
- EVENT_BEGIN (Video, SliceInfo, 0)
- Event.FieldPosition=Field_Count;
- Event.SlicePosition=0;
- switch (ptype)
- {
- case 0 :
- Event.SliceType=0; break;
- case 1 :
- Event.SliceType=1; break;
- case 2 :
- case 3 :
- Event.SliceType=2; break;
- case 4 :
- Event.SliceType=3; break;
- default:
- Event.SliceType=(int8u)-1;
- }
- Event.Flags=0;
- EVENT_END ()
- }
- #endif //MEDIAINFO_EVENTS
- FILLING_END();
-
- Synched=false; //We do not have the complete FrameHeader
-}
-
-//---------------------------------------------------------------------------
-// Packet "0E"
-void File_Vc1::EntryPointHeader()
-{
- Element_Name("EntryPointHeader");
-
- //Parsing
- bool extended_mv;
- BS_Begin();
- Skip_SB( "broken_link");
- Skip_SB( "closed_entry");
- Get_SB ( panscan_flag, "panscan_flag");
- Skip_SB( "refdist_flag");
- Skip_SB( "loopfilter");
- Skip_SB( "fastuvmc");
- Get_SB ( extended_mv, "extended_mv");
- Skip_S1( 2, "dquant");
- Skip_SB( "vstransform");
- Skip_SB( "overlap");
- Skip_S1( 2, "quantizer");
- if (hrd_param_flag)
- for (int8u Pos=0; Pos<hrd_num_leaky_buckets; Pos++)
- {
- Element_Begin1("leaky_bucket");
- Skip_S1( 8, "hrd_full");
- Element_End0();
- }
- TEST_SB_SKIP( "coded_size_flag");
- Info_S2(12, coded_width, "coded_width"); Param_Info2((coded_width+1)*2, " pixels");
- Info_S2(12, coded_height, "coded_height"); Param_Info2((coded_height+1)*2, " pixels");
- TEST_SB_END();
- if (extended_mv)
- Skip_SB( "extended_dmv");
- TEST_SB_SKIP( "range_mapy_flag");
- Skip_S1( 3, "range_mapy");
- TEST_SB_END();
- TEST_SB_SKIP( "range_mapuv_flag");
- Skip_S1( 3, "range_mapuv");
- TEST_SB_END();
- Mark_1();
- BS_End();
-
- FILLING_BEGIN();
- //NextCode
- NextCode_Test();
- NextCode_Clear();
- NextCode_Add(0x0D);
-
- //Autorisation of other streams
- Streams[0x0D].Searching_Payload=true;
-
- EntryPoint_Parsed=true;
- if (!Status[IsAccepted])
- Accept("VC-1");
-
- #if MEDIAINFO_DEMUX
- if (InitData_Buffer_Size)
- {
- size_t InitData_Buffer_Temp_Size=InitData_Buffer_Size+(size_t)(Header_Size+Element_Size);
- int8u* InitData_Buffer_Temp=new int8u[InitData_Buffer_Temp_Size];
- std::memcpy(InitData_Buffer_Temp, InitData_Buffer, InitData_Buffer_Size);
- std::memcpy(InitData_Buffer_Temp+InitData_Buffer_Size, Buffer+Buffer_Offset-(size_t)Header_Size, (size_t)(Header_Size+Element_Size));
-
- switch (Config->Demux_InitData_Get())
- {
- case 0 : //In demux event
- break; //Will be done in the first demux event
- case 1 : //In field
- {
- std::string Data_Raw((char*)InitData_Buffer_Temp, InitData_Buffer_Temp_Size);
- std::string Data_Base64(Base64::encode(Data_Raw));
- Fill(Stream_Video, StreamPos_Last, "Demux_InitBytes", Data_Base64);
- (*Stream_More)[Stream_Video][StreamPos_Last](Ztring().From_Local("Demux_InitBytes"), Info_Options)=__T("N NT");
- }
- break;
- default : ;
- }
-
- delete[] InitData_Buffer; InitData_Buffer=NULL;
- delete[] InitData_Buffer_Temp; //InitData_Buffer_Temp=NULL;
- InitData_Buffer_Size=0;
- }
- #endif //MEDIAINFO_DEMUX
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "0F"
-void File_Vc1::SequenceHeader()
-{
- Element_Name("SequenceHeader");
-
- //Parsing
- BS_Begin();
- Get_S1 ( 2, profile, "profile"); Param_Info1(Vc1_Profile[profile]);
- if (profile==0 || profile==1) //Simple or Main
- {
- Skip_S1( 2, "res_sm");
- Skip_S1( 3, "frmrtq_postproc");
- Skip_S1( 5, "bitrtq_postproc");
- Skip_SB( "loopfilter");
- Skip_SB( "res_x8");
- Skip_SB( "multires");
- Skip_SB( "res_fasttx");
- Skip_SB( "fastuvmc");
- Skip_SB( "extended_mv");
- Skip_S1( 2, "dquant");
- Skip_SB( "vtransform");
- Skip_SB( "res_transtab");
- Skip_SB( "overlap");
- Skip_SB( "syncmarker");
- Skip_SB( "rangered");
- Skip_S1( 2, "maxbframes");
- Skip_S1( 2, "quantizer");
- Skip_SB( "finterpflag");
- Skip_SB( "res_rtm_flag");
- }
- else if (profile==3) //Advanced
- {
- Get_S1 ( 3, level, "level");
- Get_S1 ( 2, colordiff_format, "colordiff_format"); Param_Info1(Vc1_ColorimetryFormat[colordiff_format]);
- Skip_S1( 3, "frmrtq_postproc");
- Skip_S1( 5, "bitrtq_postproc");
- Skip_SB( "postprocflag");
- Get_S2 (12, coded_width, "max_coded_width"); Param_Info2((coded_width+1)*2, " pixels");
- Get_S2 (12, coded_height, "max_coded_height"); Param_Info2((coded_height+1)*2, " pixels");
- Get_SB ( pulldown, "pulldown");
- Get_SB ( interlace, "interlace");
- Get_SB ( tfcntrflag, "tfcntrflag - frame counter");
- Get_SB ( finterpflag, "finterpflag");
- Skip_SB( "reserved");
- Get_SB ( psf, "psf - progressive segmented frame");
- TEST_SB_SKIP( "display_ext");
- Info_S2(14, display_x, "display_horiz_size"); Param_Info2(display_x+1, " pixels");
- Info_S2(14, display_y, "display_vert_size"); Param_Info2(display_y+1, " pixels");
- TEST_SB_SKIP( "aspectratio_flag");
- Get_S1 ( 4, AspectRatio, "aspect_ratio"); Param_Info1(Vc1_PixelAspectRatio[AspectRatio]);
- if (AspectRatio==0x0F)
- {
- Get_S1 ( 8, AspectRatioX, "aspect_horiz_size");
- Get_S1 ( 8, AspectRatioY, "aspect_vert_size");
- }
- TEST_SB_END();
- TEST_SB_GET(framerate_present, "framerate_flag");
- TESTELSE_SB_GET(framerate_form, "framerateind");
- Get_S2 (16, framerateexp, "framerateexp"); Param_Info3((float32)((framerateexp+1)/32.0), 3, " fps");
- TESTELSE_SB_ELSE( "framerateind");
- Get_S1 ( 8, frameratecode_enr, "frameratenr"); Param_Info1(Vc1_FrameRate_enr(frameratecode_enr));
- Get_S1 ( 4, frameratecode_dr, "frameratedr"); Param_Info1(Vc1_FrameRate_dr(frameratecode_dr));
- TESTELSE_SB_END();
- TEST_SB_END();
- TEST_SB_SKIP( "color_format_flag");
- Skip_S1( 8, "color_prim");
- Skip_S1( 8, "transfer_char");
- Skip_S1( 8, "matrix_coef");
- TEST_SB_END();
- TEST_SB_END();
- TEST_SB_GET (hrd_param_flag, "hrd_param_flag");
- int8u buffer_size_exponent;
- Get_S1 ( 5, hrd_num_leaky_buckets, "hrd_num_leaky_buckets");
- Skip_S1( 4, "bitrate_exponent");
- Get_S1 ( 4, buffer_size_exponent, "buffer_size_exponent");
- hrd_buffers.clear();
- for (int8u Pos=0; Pos<hrd_num_leaky_buckets; Pos++)
- {
- Element_Begin1("leaky_bucket");
- int16u hrd_buffer;
- Skip_S2(16, "hrd_rate");
- Get_S2(16, hrd_buffer, "hrd_buffer");
- int32u hrd_buffer_value=(int32u)((hrd_buffer+1)*pow(2.0, 1+buffer_size_exponent)); Param_Info2(hrd_buffer_value, " bytes");
- Element_End0();
-
- //Filling
- hrd_buffers.push_back(hrd_buffer_value);
- }
- TEST_SB_END();
- }
- else //forbidden
- {
- Element_DoNotTrust("Forbidden value");
- }
- Mark_1();
- BS_End();
-
- FILLING_BEGIN();
- //NextCode
- NextCode_Clear();
- NextCode_Add(0x0D);
- NextCode_Add(0x0E);
-
- //Autorisation of other streams
- Streams[0x0D].Searching_Payload=true;
- Streams[0x0E].Searching_Payload=true;
-
- //Frame rate
- if (framerate_present)
- {
- if (framerate_form)
- FrameRate=((float32)(framerateexp+1))/(float32)32;
- else if (Vc1_FrameRate_dr(frameratecode_dr))
- FrameRate=Vc1_FrameRate_enr(frameratecode_enr)/Vc1_FrameRate_dr(frameratecode_dr);
- }
-
- if (From_WMV3)
- {
- if (!Status[IsAccepted])
- Accept("VC-1");
- Finish("VC-1");
- }
-
- #if MEDIAINFO_DEMUX
- if (InitData_Buffer_Size)
- {
- InitData_Buffer_Size=(size_t)(Header_Size+Element_Size);
- InitData_Buffer=new int8u[InitData_Buffer_Size];
- std::memcpy(InitData_Buffer, Buffer+Buffer_Offset-(size_t)Header_Size, (size_t)(Header_Size+Element_Size));
- }
- #endif //MEDIAINFO_DEMUX
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-// Packet "1B"
-void File_Vc1::UserDefinedSlice()
-{
- Element_Name("UserDefinedSlice");
-}
-
-//---------------------------------------------------------------------------
-// Packet "1C"
-void File_Vc1::UserDefinedField()
-{
- Element_Name("UserDefinedField");
-}
-
-//---------------------------------------------------------------------------
-// Packet "1D"
-void File_Vc1::UserDefinedFrameHeader()
-{
- Element_Name("UserDefinedFrameHeader");
-}
-
-//---------------------------------------------------------------------------
-// Packet "1E"
-void File_Vc1::UserDefinedEntryPointHeader()
-{
- Element_Name("UserDefinedEntryPointHeader");
-}
-
-//---------------------------------------------------------------------------
-// Packet "1F"
-void File_Vc1::UserDefinedSequenceHeader()
-{
- Element_Name("UserDefinedSequenceHeader");
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_VC1_YES
-
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc1.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc1.h
deleted file mode 100644
index 0a7c3e5a4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc1.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about MPEG Video files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Vc1H
-#define MediaInfo_Vc1H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Vc1
-//***************************************************************************
-
-class File_Vc1 : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
- bool FrameIsAlwaysComplete;
- bool From_WMV3;
- bool Only_0D;
-
- //Constructor/Destructor
- File_Vc1();
- ~File_Vc1();
-
-private :
- //Streams management
- void Streams_Accept();
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - File header
- bool FileHeader_Begin();
-
- //Buffer - Synchro
- bool Synchronize() {return Synchronize_0x000001();}
- bool Synched_Test();
- void Synched_Init();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test();
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Global
- void Read_Buffer_Unsynched();
-
- //Buffer - Per element
- void Header_Parse();
- bool Header_Parser_QuickSearch();
- bool Header_Parser_Fill_Size();
- void Data_Parse();
-
- //Elements
- void EndOfSequence();
- void Slice();
- void Field();
- void FrameHeader();
- void EntryPointHeader();
- void SequenceHeader();
- void UserDefinedSlice();
- void UserDefinedField();
- void UserDefinedFrameHeader();
- void UserDefinedEntryPointHeader();
- void UserDefinedSequenceHeader();
-
- //Count
- size_t Interlaced_Top;
- size_t Interlaced_Bottom;
- std::vector<size_t> PictureFormat_Count;
-
- //From SequenceHeader
- std::vector<int32u> hrd_buffers;
- int16u coded_width;
- int16u coded_height;
- int16u framerateexp;
- int8u frameratecode_enr;
- int8u frameratecode_dr;
- int8u profile;
- int8u level;
- int8u colordiff_format;
- int8u AspectRatio;
- int8u AspectRatioX;
- int8u AspectRatioY;
- int8u hrd_num_leaky_buckets;
- int8u max_b_frames;
- bool interlace;
- bool tfcntrflag;
- bool framerate_present;
- bool framerate_form;
- bool hrd_param_flag;
- bool finterpflag;
- bool rangered;
- bool psf;
- bool pulldown;
- bool panscan_flag;
-
- //Stream
- struct stream
- {
- bool Searching_Payload;
- bool Searching_TimeStamp_Start;
- bool Searching_TimeStamp_End;
-
- stream()
- {
- Searching_Payload=false;
- Searching_TimeStamp_Start=false;
- Searching_TimeStamp_End=false;
- }
- };
- std::vector<stream> Streams;
-
- //Temporal reference
- struct temporalreference
- {
- bool top_field_first;
- bool repeat_first_field;
- };
- std::map<int16u, temporalreference> TemporalReference; //int32u is the reference
- std::vector<temporalreference> TemporalReference_Waiting; //First must be I and P-frames, other B-frames
- int16u TemporalReference_Offset;
-
- //Temp
- size_t Width;
- size_t Height;
- size_t RatioValue;
- size_t BitRate;
- int8u start_code;
- bool EntryPoint_Parsed;
- float32 FrameRate;
- size_t RefFramesCount;
-
- //Error controls
- std::vector<int8u> Frame_ShouldBe;
-
- #if MEDIAINFO_DEMUX
- int8u* InitData_Buffer;
- size_t InitData_Buffer_Size;
- #endif //MEDIAINFO_DEMUX
-
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc3.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc3.cpp
deleted file mode 100644
index fdf0c41c8..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc3.cpp
+++ /dev/null
@@ -1,708 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_VC3_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Vc3.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const bool Vc3_FromCID_IsSupported (int32u CompressionID)
-{
- switch (CompressionID)
- {
- case 1235 :
- case 1237 :
- case 1238 :
- case 1241 :
- case 1242 :
- case 1243 :
- case 1250 :
- case 1251 :
- case 1252 :
- case 1253 :
- case 1256 :
- case 1258 :
- case 1259 :
- case 1260 :
- return true;
- default : return false;
- }
-}
-
-//---------------------------------------------------------------------------
-const int32u Vc3_CompressedFrameSize(int32u CompressionID)
-{
- switch (CompressionID)
- {
- case 1235 : return 917504;
- case 1237 : return 606208;
- case 1238 : return 917504;
- case 1241 : return 917504;
- case 1242 : return 606208;
- case 1243 : return 917504;
- case 1244 : return 606208;
- case 1250 : return 458752;
- case 1251 : return 458752;
- case 1252 : return 303104;
- case 1253 : return 188416;
- case 1256 : return 1835008;
- case 1258 : return 212992;
- case 1259 : return 417792;
- case 1260 : return 417792;
- default : return 0;
- }
-};
-
-//---------------------------------------------------------------------------
-const int8u Vc3_SBD(int32u SBD) //Sample Bit Depth
-{
- switch (SBD)
- {
- case 1 : return 8;
- case 2 : return 10;
- default: return 0;
- }
-};
-
-//---------------------------------------------------------------------------
-const int8u Vc3_SBD_FromCID (int32u CompressionID)
-{
- switch (CompressionID)
- {
- case 1237 :
- case 1238 :
- case 1242 :
- case 1243 :
- case 1251 :
- case 1252 :
- case 1253 :
- case 1258 :
- case 1259 :
- case 1260 :
- return 8;
- case 1235 :
- case 1241 :
- case 1250 :
- case 1256 :
- return 10;
- default : return 0;
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Vc3_FFC[4]=
-{
- "",
- "Progressive",
- "Interlaced",
- "Interlaced",
-};
-
-//---------------------------------------------------------------------------
-const char* Vc3_FFC_ScanOrder[4]=
-{
- "",
- "",
- "TFF",
- "BFF",
-};
-
-//---------------------------------------------------------------------------
-const char* Vc3_FFE[2]=
-{
- "Interlaced",
- "Progressive",
-};
-
-//---------------------------------------------------------------------------
-const char* Vc3_SST[2]=
-{
- "Progressive",
- "Interlaced",
-};
-
-//---------------------------------------------------------------------------
-const char* Vc3_SST_FromCID (int32u CompressionID)
-{
- switch (CompressionID)
- {
- case 1235 :
- case 1237 :
- case 1238 :
- case 1250 :
- case 1251 :
- case 1252 :
- case 1253 :
- return Vc3_SST[0];
- case 1241 :
- case 1242 :
- case 1243 :
- return Vc3_SST[1];
- default : return "";
- }
-}
-
-//---------------------------------------------------------------------------
-const int16u Vc3_SPL_FromCID (int32u CompressionID)
-{
- switch (CompressionID)
- {
- case 1250 :
- case 1251 :
- case 1252 :
- return 1280;
- case 1235 :
- case 1237 :
- case 1238 :
- case 1241 :
- case 1242 :
- case 1243 :
- case 1253 :
- return 1920;
- default : return 0;
- }
-}
-
-//---------------------------------------------------------------------------
-const int16u Vc3_ALPF_PerFrame_FromCID (int32u CompressionID)
-{
- switch (CompressionID)
- {
- case 1250 :
- case 1251 :
- case 1252 :
- return 720;
- case 1235 :
- case 1237 :
- case 1238 :
- case 1241 :
- case 1242 :
- case 1243 :
- case 1253 :
- return 1080;
- default : return 0;
- }
-}
-
-//---------------------------------------------------------------------------
-const char* Vc3_CLR[8]=
-{
- "YUV",
- "RGB",
- "",
- "",
- "",
- "",
- "",
- "",
-};
-
-//---------------------------------------------------------------------------
-const char* Vc3_CLR_FromCID (int32u CompressionID)
-{
- switch (CompressionID)
- {
- case 1235 :
- case 1237 :
- case 1238 :
- case 1241 :
- case 1242 :
- case 1243 :
- case 1250 :
- case 1251 :
- case 1252 :
- case 1253 :
- case 1258 :
- case 1259 :
- case 1260 :
- return Vc3_CLR[0];
- case 1256 :
- return Vc3_CLR[1];
- default : return "";
- }
-};
-
-//---------------------------------------------------------------------------
-const char* Vc3_SSC[2]=
-{
- "4:2:2",
- "", // 4:4:4
-};
-
-//---------------------------------------------------------------------------
-const char* Vc3_SSC_FromCID (int32u CompressionID)
-{
- switch (CompressionID)
- {
- case 1235 :
- case 1237 :
- case 1238 :
- case 1241 :
- case 1242 :
- case 1243 :
- case 1250 :
- case 1251 :
- case 1252 :
- case 1253 :
- case 1258 :
- case 1259 :
- case 1260 :
- return Vc3_SSC[0];
- case 1256 :
- return Vc3_SSC[1];
- default : return "";
- }
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Vc3::File_Vc3()
-:File__Analyze()
-{
- //Configuration
- MustSynchronize=true;
-
- //In
- Frame_Count_Valid=2;
- FrameRate=0;
-
- //Temp
- FFC_FirstFrame=(int8u)-1;
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Vc3::Streams_Fill()
-{
- //Filling
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "VC-3");
- Fill(Stream_Video, 0, Video_BitRate_Mode, "CBR");
- if (FrameRate && Vc3_CompressedFrameSize(CID))
- Fill(Stream_Video, 0, Video_BitRate, Vc3_CompressedFrameSize(CID)*8*FrameRate, 0);
- Fill(Stream_Video, 0, Video_Format_Version, __T("Version ")+Ztring::ToZtring(HVN));
- if (Vc3_FromCID_IsSupported(CID))
- {
- if (Vc3_SPL_FromCID(CID))
- Fill(Stream_Video, 0, Video_Width, Vc3_SPL_FromCID(CID));
- if (Vc3_ALPF_PerFrame_FromCID(CID))
- Fill(Stream_Video, 0, Video_Height, Vc3_ALPF_PerFrame_FromCID(CID));
- if (Vc3_SBD_FromCID(CID))
- Fill(Stream_Video, 0, Video_BitDepth, Vc3_SBD_FromCID(CID));
- Fill(Stream_Video, 0, Video_ScanType, Vc3_SST_FromCID(CID));
- Fill(Stream_Video, 0, Video_ColorSpace, Vc3_CLR_FromCID(CID));
- Fill(Stream_Video, 0, Video_ChromaSubsampling, Vc3_SSC_FromCID(CID));
- }
- else
- {
- Fill(Stream_Video, 0, Video_Width, SPL);
- Fill(Stream_Video, 0, Video_Height, ALPF*(SST?2:1));
- Fill(Stream_Video, 0, Video_BitDepth, Vc3_SBD(SBD));
- Fill(Stream_Video, 0, Video_ScanType, Vc3_SST[SST]);
- Fill(Stream_Video, 0, Video_ColorSpace, Vc3_CLR[SSC]);
- Fill(Stream_Video, 0, Video_ChromaSubsampling, Vc3_SSC[CLR]);
- }
- if (FFC_FirstFrame!=(int8u)-1)
- Fill(Stream_Video, 0, Video_ScanOrder, Vc3_FFC_ScanOrder[FFC_FirstFrame]);
-}
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Vc3::Synchronize()
-{
- //Synchronizing
- while (Buffer_Offset+5<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x02
- || Buffer[Buffer_Offset+3]!=0x80
- || Buffer[Buffer_Offset+4]==0x00))
- {
- Buffer_Offset+=2;
- while (Buffer_Offset<Buffer_Size && Buffer[Buffer_Offset]!=0x00)
- Buffer_Offset+=2;
- if (Buffer_Offset>=Buffer_Size || Buffer[Buffer_Offset-1]==0x00)
- Buffer_Offset--;
- }
-
- //Parsing last bytes if needed
- if (Buffer_Offset+4==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x02
- || Buffer[Buffer_Offset+3]!=0x80))
- Buffer_Offset++;
- if (Buffer_Offset+3==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x02))
- Buffer_Offset++;
- if (Buffer_Offset+2==Buffer_Size && (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00))
- Buffer_Offset++;
- if (Buffer_Offset+1==Buffer_Size && Buffer[Buffer_Offset ]!=0x00)
- Buffer_Offset++;
-
- if (Buffer_Offset+5>Buffer_Size)
- return false;
-
- //Synched is OK
- Synched=true;
- return true;
-}
-
-//---------------------------------------------------------------------------
-bool File_Vc3::Synched_Test()
-{
- //Must have enough buffer for having header
- if (Buffer_Offset+5>Buffer_Size)
- return false;
-
- //Quick test of synchro
- if (Buffer[Buffer_Offset ]!=0x00
- || Buffer[Buffer_Offset+1]!=0x00
- || Buffer[Buffer_Offset+2]!=0x02
- || Buffer[Buffer_Offset+3]!=0x80
- || Buffer[Buffer_Offset+4]==0x00)
- {
- Synched=false;
- return true;
- }
-
- //We continue
- return true;
-}
-
-//***************************************************************************
-// Buffer - Demux
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#if MEDIAINFO_DEMUX
-bool File_Vc3::Demux_UnpacketizeContainer_Test()
-{
- if (Buffer_Offset+0x2C>Buffer_Size)
- return false;
-
- int32u CompressionID=BigEndian2int32u(Buffer+Buffer_Offset+0x28);
- size_t Size=Vc3_CompressedFrameSize(CompressionID);
- if (!Size)
- {
- if (!IsSub)
- {
- Reject();
- return false;
- }
- Size=Buffer_Size; //Hoping that the packet is complete. TODO: add a flag in the container parser saying if the packet is complete
- }
- Demux_Offset=Buffer_Offset+Size;
-
- if (Demux_Offset>Buffer_Size && File_Offset+Buffer_Size!=File_Size)
- return false; //No complete frame
-
- Demux_UnpacketizeContainer_Demux();
-
- return true;
-}
-#endif //MEDIAINFO_DEMUX
-
-//***************************************************************************
-// Buffer - Per element
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Vc3::Header_Begin()
-{
- if (Buffer_Offset+0x2C>Buffer_Size)
- return false;
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-void File_Vc3::Header_Parse()
-{
- int32u CompressionID=BigEndian2int32u(Buffer+Buffer_Offset+0x28);
-
- Header_Fill_Code(0, "Frame");
- size_t Size=Vc3_CompressedFrameSize(CompressionID);
- if (!Size)
- {
- if (!IsSub)
- {
- Reject();
- return;
- }
- Size=Buffer_Size; //Hoping that the packet is complete. TODO: add a flag in the container parser saying if the packet is complete
- }
- Header_Fill_Size(Size);
-}
-
-//---------------------------------------------------------------------------
-void File_Vc3::Data_Parse()
-{
- //Parsing
- if (Status[IsFilled])
- {
- Skip_XX(Element_Size, "Data");
- }
- else
- {
- Element_Info1(Frame_Count+1);
- HeaderPrefix();
- if (HVN <= 2)
- {
- CodingControlA();
- Skip_XX(16, "Reserved");
- ImageGeometry();
- Skip_XX( 5, "Reserved");
- CompressionID();
- CodingControlB();
- Skip_XX( 3, "Reserved");
- TimeCode();
-
- Skip_XX(640-Element_Offset, "ToDo");
- }
- Skip_XX(Element_Size-Element_Offset, "Data");
- }
-
- FILLING_BEGIN();
- Frame_Count++;
- if (Frame_Count_NotParsedIncluded!=(int64u)-1)
- Frame_Count_NotParsedIncluded++;
- if (FrameRate)
- {
- FrameInfo.PTS=FrameInfo.DTS+=float64_int64s(1000000000/FrameRate);
- FrameInfo.DUR=float64_int64s(1000000000/FrameRate);
- }
- else
- {
- FrameInfo.PTS=FrameInfo.DTS=FrameInfo.DUR=(int64u)-1;
- }
- if (!Status[IsFilled] && Frame_Count>=Frame_Count_Valid)
- { Fill("VC-3");
-
- if (!IsSub && Config->ParseSpeed<1)
- Finish("VC-1");
- }
- FILLING_END();
-}
-
-//***************************************************************************
-// Elements
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Vc3::HeaderPrefix()
-{
- //Parsing
- Element_Begin1("Header Prefix");
- int32u Data;
- Get_B4 (Data, "Magic number");
- Get_B1 (HVN, "HVN: Header Version Number");
- Element_End0();
-
- FILLING_BEGIN();
- if (Data==0x00000280LL)
- Accept("VC-3");
- else
- Reject("VC-3");
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Vc3::CodingControlA()
-{
- //Parsing
- Element_Begin1("Coding Control A");
- BS_Begin();
-
- int8u FFC;
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- Get_S1 (2, FFC, "Field/Frame Count"); Param_Info1(Vc3_FFC[FFC]);
-
- Mark_1();
- Mark_0();
- if (HVN==1)
- Mark_0();
- else
- Skip_SB( "MACF: Macroblock Adaptive Control Flag");
- Get_SB ( CRCF, "CRC flag");
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
-
- Mark_1();
- Mark_0();
- Mark_1();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
-
- BS_End();
- Element_End0();
-
- FILLING_BEGIN();
- if (FFC_FirstFrame==(int8u)-1)
- FFC_FirstFrame=FFC;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Vc3::ImageGeometry()
-{
- //Parsing
- Element_Begin1("Image Geometry");
- Get_B2 (ALPF, "Active lines-per-frame");
- Get_B2 (SPL, "Samples-per-line");
- Skip_B1( "Zero");
- Skip_B2( "Number of active lines");
- Skip_B2( "Zero");
-
- BS_Begin();
-
- Get_S1 (3, SBD, "Sample bit depth");
- Mark_1();
- Mark_1();
- Mark_0();
- Mark_0();
- Mark_0();
-
- Mark_1();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_1();
- Get_SB ( SST, "Source scan type"); Param_Info1(Vc3_SST[SST]);
- Mark_0();
- Mark_0();
-
- BS_End();
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Vc3::CompressionID()
-{
- //Parsing
- Element_Begin1("Compression ID");
- int32u Data;
- Get_B4 (Data, "Compression ID");
- Element_End0();
-
- FILLING_BEGIN();
- CID=Data;
- FILLING_END();
-}
-
-//---------------------------------------------------------------------------
-void File_Vc3::CodingControlB()
-{
- //Parsing
- Element_Begin1("Coding Control B");
- BS_Begin();
-
- Info_S1(1, FFE, "Field/Frame Count"); Param_Info1(Vc3_FFE[FFE]);
- if (HVN==1)
- {
- Mark_0();
- SSC=false;
- }
- else
- {
- Get_SB (SSC, "SSC: Sub Sampling Control"); Param_Info1(Vc3_SSC[SSC]);
- }
- Mark_0();
- Mark_0();
- Mark_0();
- if (HVN==1)
- {
- Mark_0();
- Mark_0();
- Mark_0();
- CLR=0;
- }
- else
- {
- Get_S1 (3, CLR, "CLR: Color"); Param_Info1(Vc3_CLR[CLR]);
- }
-
- BS_End();
- Element_End0();
-}
-
-//---------------------------------------------------------------------------
-void File_Vc3::TimeCode()
-{
- //Parsing
- Element_Begin1("Time Code");
- bool TCP;
-
- BS_Begin();
- Get_SB ( TCP, "TCP: Time Code Present");
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- Mark_0();
- BS_End();
-
- if (TCP)
- {
- Skip_B8( "Time Code");
- }
- else
- Skip_B8( "Junk");
-
- Element_End0();
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //NameSpace
-
-#endif //MEDIAINFO_VC3_*
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc3.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc3.h
deleted file mode 100644
index 9627ca6e4..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vc3.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about VC-3 video streams
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Vc3H
-#define MediaInfo_Vc3H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-#include "MediaInfo/Multiple/File_Mpeg4.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Avs
-//***************************************************************************
-
-class File_Vc3 : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
- float64 FrameRate;
-
- //constructor/Destructor
- File_Vc3();
-
-private :
- //Streams management
- void Streams_Fill();
-
- //Buffer - Synchro
- bool Synchronize();
- bool Synched_Test();
-
- //Buffer - Demux
- #if MEDIAINFO_DEMUX
- bool Demux_UnpacketizeContainer_Test();
- #endif //MEDIAINFO_DEMUX
-
- //Buffer - Per element
- bool Header_Begin ();
- void Header_Parse ();
- void Data_Parse ();
-
- //Elements
- void HeaderPrefix();
- void CodingControlA();
- void ImageGeometry();
- void CompressionID();
- void CodingControlB();
- void TimeCode();
- void UserData();
- void MacroblockScanIndices();
-
- //Temp
- int32u CID;
- bool CRCF;
- int16u ALPF;
- int16u SPL;
- int8u SBD;
- int8u FFC_FirstFrame;
- int8u HVN;
- int8u CLR;
- bool SST;
- bool SSC;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vp8.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vp8.cpp
deleted file mode 100644
index 21aa8826a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vp8.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_VP8_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Vp8.h"
-#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
-#include "ZenLib/BitStream.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-namespace MediaInfoLib
-{
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Vp8::File_Vp8()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("VP8");
- IsRawStream=true;
-
- //In
- Frame_Count_Valid=MediaInfoLib::Config.ParseSpeed_Get()>=0.3?32:4;
-}
-
-//---------------------------------------------------------------------------
-File_Vp8::~File_Vp8()
-{
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Vp8::Streams_Accept()
-{
- Stream_Prepare(Stream_Video);
-}
-
-//---------------------------------------------------------------------------
-void File_Vp8::Streams_Update()
-{
-}
-
-//---------------------------------------------------------------------------
-void File_Vp8::Streams_Fill()
-{
- Fill(Stream_Video, 0, Video_Format, "VP8");
- Fill(Stream_Video, 0, Video_Codec, "VP8");
-}
-
-//---------------------------------------------------------------------------
-void File_Vp8::Streams_Finish()
-{
-}
-
-//***************************************************************************
-// Buffer - Global
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Vp8::Read_Buffer_Continue()
-{
- Accept();
-
- BS_Begin_LE(); //VP8 bitstream is Little Endian
- bool frame_type;
- Get_TB ( frame_type, "frame type");
- Skip_T1( 3, "version number");
- Skip_TB( "show_frame flag");
- Skip_T4(19, "size of the first data partition");
- BS_End();
-
- if (!frame_type) //I-Frame
- {
- Skip_B3( "0x9D012A");
- Skip_L2( "Width");
- Skip_L2( "Height");
- }
- Skip_XX(Element_Size-Element_Offset, "Other data");
-
- Frame_Count++;
- if (Frame_Count>=Frame_Count_Valid)
- Finish();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_VP8_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vp8.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vp8.h
deleted file mode 100644
index 6294a8b3a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Vp8.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about VP8 files
-// http://datatracker.ietf.org/doc/rfc6386/?include_text=1
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Vp8H
-#define MediaInfo_Vp8H
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Vp8
-//***************************************************************************
-
-class File_Vp8 : public File__Analyze
-{
-public :
- //In
- int64u Frame_Count_Valid;
-
- //Constructor/Destructor
- File_Vp8();
- ~File_Vp8();
-
-private :
- //Streams management
- void Streams_Accept();
- void Streams_Update();
- void Streams_Fill();
- void Streams_Finish();
-
- //Buffer - Global
- void Read_Buffer_Continue();
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Y4m.cpp b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Y4m.cpp
deleted file mode 100644
index 727b16058..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Y4m.cpp
+++ /dev/null
@@ -1,229 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-//
-// Source:
-// http://wiki.multimedia.cx/index.php?title=YUV4MPEG2
-//
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-// Pre-compilation
-#include "MediaInfo/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Setup.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(MEDIAINFO_Y4M_YES)
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/Video/File_Y4m.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-namespace MediaInfoLib
-{
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Infos
-//***************************************************************************
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File_Y4m::File_Y4m()
-:File__Analyze()
-{
- //Configuration
- ParserName=__T("YUV4MPEG2");
- IsRawStream=true;
- Frame_Count_NotParsedIncluded=0;
-
- //Temp
- HeaderEnd=0;
-}
-
-//---------------------------------------------------------------------------
-File_Y4m::~File_Y4m()
-{
-}
-
-//***************************************************************************
-// Streams management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void File_Y4m::Streams_Accept()
-{
- Fill(Stream_General, 0, General_Format, "YUV4MPEG2");
-
- Stream_Prepare(Stream_Video);
- Fill(Stream_Video, 0, Video_Format, "YUV");
- Fill(Stream_Video, 0, Video_ColorSpace, "YUV");
-}
-
-//---------------------------------------------------------------------------
-void File_Y4m::Streams_Fill()
-{
-}
-
-//***************************************************************************
-// Buffer - File header
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File_Y4m::FileHeader_Begin()
-{
- if (Buffer_Size<10)
- return false;
-
- if (!(Buffer[0]==0x59
- && Buffer[1]==0x55
- && Buffer[2]==0x56
- && Buffer[3]==0x34
- && Buffer[4]==0x4D
- && Buffer[5]==0x50
- && Buffer[6]==0x45
- && Buffer[7]==0x47
- && Buffer[8]==0x32
- && Buffer[9]==0x20))
- {
- Reject();
- return false;
- }
-
- for (; HeaderEnd<Buffer_Size; HeaderEnd++)
- {
- if (Buffer[HeaderEnd]==0x0A)
- {
- Accept();
- return true;
- }
- }
-
- return false;
-}
-
-//---------------------------------------------------------------------------
-void File_Y4m::FileHeader_Parse()
-{
- //Parsing
- Ztring Header;
- Get_Local(HeaderEnd, Header, "Data");
-
- ZtringList List; List.Separator_Set(0, " ");
- List.Write(Header);
- int64u Width=0, Height=0, Multiplier=0, Divisor=1;
- float64 FrameRate=0;
- for (size_t Pos=1; Pos<List.size(); Pos++)
- {
- if (!List[Pos].empty())
- {
- switch (List[Pos][0])
- {
- case 'A' : //Pixel aspect ratio
- {
- ZtringList Value; Value.Separator_Set(0, ":");
- Value.Write(List[Pos].substr(1));
- if (Value.size()==2)
- {
- float64 x=Value[0].To_float64();
- float64 y=Value[1].To_float64();
- if (x && y)
- Fill(Stream_Video, 0, Video_PixelAspectRatio, x/y, 3);
- }
- }
- break;
- case 'C' : //Color space
- if (List[Pos]==__T("C420jpeg") || List[Pos]==__T("C420paldv") || List[Pos]==__T("C420"))
- {
- Fill(Stream_Video, 0, Video_ChromaSubsampling, "4:2:0");
- Multiplier=3;
- Divisor=2;
- }
- if (List[Pos]==__T("C422"))
- {
- Fill(Stream_Video, 0, Video_ChromaSubsampling, "4:2:2");
- Multiplier=2;
- }
- if (List[Pos]==__T("C444"))
- {
- Fill(Stream_Video, 0, Video_ChromaSubsampling, "4:4:4");
- Multiplier=3;
- }
- break;
- case 'F' : //Frame rate
- {
- ZtringList Value; Value.Separator_Set(0, ":");
- Value.Write(List[Pos].substr(1));
- if (Value.size()==2)
- {
- float64 N=Value[0].To_float64();
- float64 D=Value[1].To_float64();
- if (N && D)
- {
- FrameRate=N/D;
- Fill(Stream_Video, 0, Video_FrameRate, FrameRate, 3);
- }
- }
- }
- break;
- case 'H' : //Height
- {
- Ztring Value=List[Pos].substr(1);
- Height=Value.To_int64u();
- Fill(Stream_Video, 0, Video_Height, Height); break;
- }
- break;
- case 'I' : //Interlacing
- if (List[Pos].size()==2)
- switch (List[Pos][1])
- {
- case 'p' : Fill(Stream_Video, 0, Video_ScanType, "Progressive"); break;
- case 't' : Fill(Stream_Video, 0, Video_ScanType, "Progressive"); Fill(Stream_Video, 0, Video_ScanOrder, "TFF"); break;
- case 'b' : Fill(Stream_Video, 0, Video_ScanType, "Progressive"); Fill(Stream_Video, 0, Video_ScanOrder, "BFF"); break;
- case 'm' : Fill(Stream_Video, 0, Video_ScanType, "Mixed"); break;
- default : ;
- }
- break;
- case 'W' : //Width
- {
- Ztring Value=List[Pos].substr(1);
- Width=Value.To_int64u();
- Fill(Stream_Video, 0, Video_Width, Width); break;
- }
- break;
- default : ;
- }
- }
- }
-
- //Duration (we expect no meta per frame)
- if (Width && Height && Multiplier)
- {
- int64u Frame_ByteSize=6+Width*Height*Multiplier/Divisor; //5 for "FRAME\0"
- Fill(Stream_Video, 0, Video_FrameCount, File_Size/Frame_ByteSize);
- if (FrameRate)
- Fill(Stream_Video, 0, Video_BitRate, Width*Height*Multiplier/Divisor*8*FrameRate);
- }
-
- Finish();
-}
-
-} //NameSpace
-
-#endif //MEDIAINFO_Y4M_YES
diff --git a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Y4m.h b/src/thirdparty/MediaInfo/MediaInfo/Video/File_Y4m.h
deleted file mode 100644
index 8055c5d8a..000000000
--- a/src/thirdparty/MediaInfo/MediaInfo/Video/File_Y4m.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license that can
- * be found in the License.html file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Information about YUV4MPEG2 files
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef MediaInfo_Y4mH
-#define MediaInfo_Y4mH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "MediaInfo/File__Analyze.h"
-//---------------------------------------------------------------------------
-
-namespace MediaInfoLib
-{
-
-//***************************************************************************
-// Class File_Y4m
-//***************************************************************************
-
-class File_Y4m : public File__Analyze
-{
-public :
- //Constructor/Destructor
- File_Y4m();
- ~File_Y4m();
-
-private :
- //Streams management
- void Streams_Accept();
- void Streams_Fill();
-
- //Buffer - File header
- bool FileHeader_Begin();
- void FileHeader_Parse();
-
- //Temp
- size_t HeaderEnd;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj b/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj
index a824e93c3..dcb796fe4 100644
--- a/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj
+++ b/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj
@@ -68,448 +68,448 @@
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
- <AdditionalIncludeDirectories>.;ThirdParty\base64;ThirdParty\tinyxml2;..\ZenLib;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>library\Source;library\Source\ThirdParty\base64;library\Source\ThirdParty\tinyxml2;..\ZenLib\library\Source;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;CURL_STATICLIB;MEDIAINFO_ADVANCED_NO;MEDIAINFO_ARCHIVE_NO;MEDIAINFO_DEMUX_NO;MEDIAINFO_DVDIF_ANALYZE_NO;MEDIAINFO_EVENTS_NO;MEDIAINFO_LIBCURL_NO;MEDIAINFO_LIBMMS_NO;MEDIAINFO_MD5_NO;MEDIAINFO_MINIMAL_YES;MEDIAINFO_MPEGTS_DUPLICATE_NO;MEDIAINFO_N19_NO;MEDIAINFO_OTHERTEXT_NO;MEDIAINFO_TRACE_NO;MEDIAINFO_READTHREAD_NO;MEDIAINFO_EXPORT_NO;MEDIAINFO_TEXT_YES;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>MediaInfo/PreComp.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
- <AdditionalIncludeDirectories>.;ThirdParty\base64;ThirdParty\tinyxml2;..\ZenLib;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>library\Source;library\Source\ThirdParty\base64;library\Source\ThirdParty\tinyxml2;..\ZenLib\library\Source;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;CURL_STATICLIB;MEDIAINFO_ADVANCED_NO;MEDIAINFO_ARCHIVE_NO;MEDIAINFO_DEMUX_NO;MEDIAINFO_DVDIF_ANALYZE_NO;MEDIAINFO_EVENTS_NO;MEDIAINFO_LIBCURL_NO;MEDIAINFO_LIBMMS_NO;MEDIAINFO_MD5_NO;MEDIAINFO_MINIMAL_YES;MEDIAINFO_MPEGTS_DUPLICATE_NO;MEDIAINFO_N19_NO;MEDIAINFO_OTHERTEXT_NO;MEDIAINFO_TRACE_NO;MEDIAINFO_READTHREAD_NO;MEDIAINFO_EXPORT_NO;MEDIAINFO_TEXT_YES;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>MediaInfo/PreComp.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <AdditionalIncludeDirectories>.;ThirdParty\base64;ThirdParty\tinyxml2;..\ZenLib;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>library\Source;library\Source\ThirdParty\base64;library\Source\ThirdParty\tinyxml2;..\ZenLib\library\Source;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;CURL_STATICLIB;MEDIAINFO_ADVANCED_NO;MEDIAINFO_ARCHIVE_NO;MEDIAINFO_DEMUX_NO;MEDIAINFO_DVDIF_ANALYZE_NO;MEDIAINFO_EVENTS_NO;MEDIAINFO_LIBCURL_NO;MEDIAINFO_LIBMMS_NO;MEDIAINFO_MD5_NO;MEDIAINFO_MINIMAL_YES;MEDIAINFO_MPEGTS_DUPLICATE_NO;MEDIAINFO_N19_NO;MEDIAINFO_OTHERTEXT_NO;MEDIAINFO_TRACE_NO;MEDIAINFO_READTHREAD_NO;MEDIAINFO_EXPORT_NO;MEDIAINFO_TEXT_YES;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>MediaInfo/PreComp.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <AdditionalIncludeDirectories>.;ThirdParty\base64;ThirdParty\tinyxml2;..\ZenLib;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>library\Source;library\Source\ThirdParty\base64;library\Source\ThirdParty\tinyxml2;..\ZenLib\library\Source;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;CURL_STATICLIB;MEDIAINFO_ADVANCED_NO;MEDIAINFO_ARCHIVE_NO;MEDIAINFO_DEMUX_NO;MEDIAINFO_DVDIF_ANALYZE_NO;MEDIAINFO_EVENTS_NO;MEDIAINFO_LIBCURL_NO;MEDIAINFO_LIBMMS_NO;MEDIAINFO_MD5_NO;MEDIAINFO_MINIMAL_YES;MEDIAINFO_MPEGTS_DUPLICATE_NO;MEDIAINFO_N19_NO;MEDIAINFO_OTHERTEXT_NO;MEDIAINFO_TRACE_NO;MEDIAINFO_READTHREAD_NO;MEDIAINFO_EXPORT_NO;MEDIAINFO_TEXT_YES;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>MediaInfo/PreComp.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
- <ClInclude Include="MediaInfo\Export\Export_EbuCore.h" />
- <ClInclude Include="MediaInfo\Export\Export_PBCore2.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Aaf.h" />
- <ClInclude Include="MediaInfo\Multiple\File_DashMpd.h" />
- <ClInclude Include="MediaInfo\Multiple\File_DcpAm.h" />
- <ClInclude Include="MediaInfo\Multiple\File_DcpCpl.h" />
- <ClInclude Include="MediaInfo\Multiple\File_DcpPkl.h" />
- <ClInclude Include="MediaInfo\Multiple\File_HdsF4m.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Pmp.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Ptx.h" />
- <ClInclude Include="MediaInfo\Tag\File_PropertyList.h" />
- <ClInclude Include="MediaInfo\Tag\File_Xmp.h" />
- <ClInclude Include="MediaInfo\Text\File_Pdf.h" />
- <ClInclude Include="MediaInfo\Text\File_Sdp.h" />
- <ClInclude Include="MediaInfo\Text\File_SubRip.h" />
- <ClInclude Include="MediaInfo\Text\File_TimedText.h" />
- <ClInclude Include="MediaInfo\Text\File_Ttml.h" />
- <ClInclude Include="MediaInfo\Video\File_Ffv1.h" />
- <ClInclude Include="MediaInfo\Video\File_Hevc.h" />
- <ClInclude Include="MediaInfo\Video\File_HuffYuv.h" />
- <ClInclude Include="ThirdParty\base64\base64.h" />
- <ClInclude Include="ThirdParty\tinyxml2\tinyxml2.h" />
- <ClInclude Include="MediaInfo\Archive\File_7z.h" />
- <ClInclude Include="MediaInfo\Archive\File_Ace.h" />
- <ClInclude Include="MediaInfo\Archive\File_Bzip2.h" />
- <ClInclude Include="MediaInfo\Archive\File_Elf.h" />
- <ClInclude Include="MediaInfo\Archive\File_Gzip.h" />
- <ClInclude Include="MediaInfo\Archive\File_Iso9660.h" />
- <ClInclude Include="MediaInfo\Archive\File_Mz.h" />
- <ClInclude Include="MediaInfo\Archive\File_Rar.h" />
- <ClInclude Include="MediaInfo\Archive\File_Tar.h" />
- <ClInclude Include="MediaInfo\Archive\File_Zip.h" />
- <ClInclude Include="MediaInfo\Audio\File_Aac.h" />
- <ClInclude Include="MediaInfo\Audio\File_Aac_GeneralAudio.h" />
- <ClInclude Include="MediaInfo\Audio\File_Aac_GeneralAudio_Sbr.h" />
- <ClInclude Include="MediaInfo\Audio\File_Aac_GeneralAudio_Sbr_Ps.h" />
- <ClInclude Include="MediaInfo\Audio\File_Ac3.h" />
- <ClInclude Include="MediaInfo\Audio\File_Adpcm.h" />
- <ClInclude Include="MediaInfo\Audio\File_Als.h" />
- <ClInclude Include="MediaInfo\Audio\File_Amr.h" />
- <ClInclude Include="MediaInfo\Audio\File_Amv.h" />
- <ClInclude Include="MediaInfo\Audio\File_Ape.h" />
- <ClInclude Include="MediaInfo\Audio\File_Au.h" />
- <ClInclude Include="MediaInfo\Audio\File_Caf.h" />
- <ClInclude Include="MediaInfo\Audio\File_Celt.h" />
- <ClInclude Include="MediaInfo\Audio\File_ChannelGrouping.h" />
- <ClInclude Include="MediaInfo\Audio\File_DolbyE.h" />
- <ClInclude Include="MediaInfo\Audio\File_Dts.h" />
- <ClInclude Include="MediaInfo\Audio\File_ExtendedModule.h" />
- <ClInclude Include="MediaInfo\Audio\File_Flac.h" />
- <ClInclude Include="MediaInfo\Audio\File_ImpulseTracker.h" />
- <ClInclude Include="MediaInfo\Audio\File_La.h" />
- <ClInclude Include="MediaInfo\Audio\File_Midi.h" />
- <ClInclude Include="MediaInfo\Audio\File_Module.h" />
- <ClInclude Include="MediaInfo\Audio\File_Mpc.h" />
- <ClInclude Include="MediaInfo\Audio\File_MpcSv8.h" />
- <ClInclude Include="MediaInfo\Audio\File_Mpega.h" />
- <ClInclude Include="MediaInfo\Audio\File_OpenMG.h" />
- <ClInclude Include="MediaInfo\Audio\File_Opus.h" />
- <ClInclude Include="MediaInfo\Audio\File_Pcm.h" />
- <ClInclude Include="MediaInfo\Audio\File_Pcm_M2ts.h" />
- <ClInclude Include="MediaInfo\Audio\File_Pcm_Vob.h" />
- <ClInclude Include="MediaInfo\Audio\File_Ps2Audio.h" />
- <ClInclude Include="MediaInfo\Audio\File_Rkau.h" />
- <ClInclude Include="MediaInfo\Audio\File_ScreamTracker3.h" />
- <ClInclude Include="MediaInfo\Audio\File_SmpteSt0302.h" />
- <ClInclude Include="MediaInfo\Audio\File_SmpteSt0331.h" />
- <ClInclude Include="MediaInfo\Audio\File_SmpteSt0337.h" />
- <ClInclude Include="MediaInfo\Audio\File_Speex.h" />
- <ClInclude Include="MediaInfo\Audio\File_Tak.h" />
- <ClInclude Include="MediaInfo\Audio\File_Tta.h" />
- <ClInclude Include="MediaInfo\Audio\File_TwinVQ.h" />
- <ClInclude Include="MediaInfo\Audio\File_Vorbis.h" />
- <ClInclude Include="MediaInfo\Audio\File_Wvpk.h" />
- <ClInclude Include="MediaInfo\Duplicate\File__Duplicate_MpegTs.h" />
- <ClInclude Include="MediaInfo\Duplicate\File__Duplicate__Base.h" />
- <ClInclude Include="MediaInfo\Duplicate\File__Duplicate__Writer.h" />
- <ClInclude Include="MediaInfo\Export\Export_Mpeg7.h" />
- <ClInclude Include="MediaInfo\Export\Export_PBCore.h" />
- <ClInclude Include="MediaInfo\File_Dummy.h" />
- <ClInclude Include="MediaInfo\File_Other.h" />
- <ClInclude Include="MediaInfo\File_Unknown.h" />
- <ClInclude Include="MediaInfo\File__Analyse_Automatic.h" />
- <ClInclude Include="MediaInfo\File__Analyze.h" />
- <ClInclude Include="MediaInfo\File__Analyze_MinimizeSize.h" />
- <ClInclude Include="MediaInfo\File__Base.h" />
- <ClInclude Include="MediaInfo\File__Duplicate.h" />
- <ClInclude Include="MediaInfo\File__MultipleParsing.h" />
- <ClInclude Include="MediaInfo\Image\File_ArriRaw.h" />
- <ClInclude Include="MediaInfo\Image\File_Bmp.h" />
- <ClInclude Include="MediaInfo\Image\File_Bpg.h" />
- <ClInclude Include="MediaInfo\Image\File_Dds.h" />
- <ClInclude Include="MediaInfo\Image\File_Dpx.h" />
- <ClInclude Include="MediaInfo\Image\File_Exr.h" />
- <ClInclude Include="MediaInfo\Image\File_Gif.h" />
- <ClInclude Include="MediaInfo\Image\File_Ico.h" />
- <ClInclude Include="MediaInfo\Image\File_Jpeg.h" />
- <ClInclude Include="MediaInfo\Image\File_Pcx.h" />
- <ClInclude Include="MediaInfo\Image\File_Png.h" />
- <ClInclude Include="MediaInfo\Image\File_Psd.h" />
- <ClInclude Include="MediaInfo\Image\File_Rle.h" />
- <ClInclude Include="MediaInfo\Image\File_Tga.h" />
- <ClInclude Include="MediaInfo\Image\File_Tiff.h" />
- <ClInclude Include="MediaInfo\MediaInfo.h" />
- <ClInclude Include="MediaInfo\MediaInfoList.h" />
- <ClInclude Include="MediaInfo\MediaInfoList_Internal.h" />
- <ClInclude Include="MediaInfo\MediaInfo_Config.h" />
- <ClInclude Include="MediaInfo\MediaInfo_Config_MediaInfo.h" />
- <ClInclude Include="MediaInfo\MediaInfo_Config_PerPackage.h" />
- <ClInclude Include="MediaInfo\MediaInfo_Const.h" />
- <ClInclude Include="MediaInfo\MediaInfo_Events.h" />
- <ClInclude Include="MediaInfo\MediaInfo_Events_Internal.h" />
- <ClInclude Include="MediaInfo\MediaInfo_Internal.h" />
- <ClInclude Include="MediaInfo\MediaInfo_Internal_Const.h" />
- <ClInclude Include="MediaInfo\Multiple\File__ReferenceFilesHelper.h" />
- <ClInclude Include="MediaInfo\Multiple\File__ReferenceFilesHelper_Common.h" />
- <ClInclude Include="MediaInfo\Multiple\File__ReferenceFilesHelper_Resource.h" />
- <ClInclude Include="MediaInfo\Multiple\File__ReferenceFilesHelper_Sequence.h" />
- <ClInclude Include="MediaInfo\Multiple\File__ReferenceFilesHelper_Sequence_Common.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Ancillary.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Bdmv.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Cdxa.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Dpg.h" />
- <ClInclude Include="MediaInfo\Multiple\File_DvDif.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Dvdv.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Dxw.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Flv.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Gxf.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Gxf_TimeCode.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Hls.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Ibi.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Ibi_Creation.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Ism.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Ivf.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Lxf.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Mk.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Mpeg4.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Mpeg4_Descriptors.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Mpeg4_TimeCode.h" />
- <ClInclude Include="MediaInfo\Multiple\File_MpegPs.h" />
- <ClInclude Include="MediaInfo\Multiple\File_MpegTs.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Mpeg_Descriptors.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Mpeg_Psi.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Mxf.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Nut.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Ogg.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Ogg_SubElement.h" />
- <ClInclude Include="MediaInfo\Multiple\File_P2_Clip.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Riff.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Rm.h" />
- <ClInclude Include="MediaInfo\Multiple\File_SequenceInfo.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Skm.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Swf.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Umf.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Wm.h" />
- <ClInclude Include="MediaInfo\Multiple\File_Xdcam_Clip.h" />
- <ClInclude Include="MediaInfo\PreComp.h" />
- <ClInclude Include="MediaInfo\Reader\Reader_Directory.h" />
- <ClInclude Include="MediaInfo\Reader\Reader_File.h" />
- <ClInclude Include="MediaInfo\Reader\Reader_libcurl.h" />
- <ClInclude Include="MediaInfo\Reader\Reader_libcurl_Include.h" />
- <ClInclude Include="MediaInfo\Reader\Reader_libmms.h" />
- <ClInclude Include="MediaInfo\Reader\Reader__Base.h" />
- <ClInclude Include="MediaInfo\Setup.h" />
- <ClInclude Include="MediaInfo\TimeCode.h" />
- <ClInclude Include="MediaInfo\Tag\File_ApeTag.h" />
- <ClInclude Include="MediaInfo\Tag\File_Id3.h" />
- <ClInclude Include="MediaInfo\Tag\File_Id3v2.h" />
- <ClInclude Include="MediaInfo\Tag\File_Lyrics3.h" />
- <ClInclude Include="MediaInfo\Tag\File_Lyrics3v2.h" />
- <ClInclude Include="MediaInfo\Tag\File_VorbisCom.h" />
- <ClInclude Include="MediaInfo\Tag\File__Tags.h" />
- <ClInclude Include="MediaInfo\Text\File_AribStdB24B37.h" />
- <ClInclude Include="MediaInfo\Text\File_Cdp.h" />
- <ClInclude Include="MediaInfo\Text\File_Cmml.h" />
- <ClInclude Include="MediaInfo\Text\File_DtvccTransport.h" />
- <ClInclude Include="MediaInfo\Text\File_DvbSubtitle.h" />
- <ClInclude Include="MediaInfo\Text\File_Eia608.h" />
- <ClInclude Include="MediaInfo\Text\File_Eia708.h" />
- <ClInclude Include="MediaInfo\Text\File_Kate.h" />
- <ClInclude Include="MediaInfo\Text\File_N19.h" />
- <ClInclude Include="MediaInfo\Text\File_OtherText.h" />
- <ClInclude Include="MediaInfo\Text\File_Pgs.h" />
- <ClInclude Include="MediaInfo\Text\File_Scc.h" />
- <ClInclude Include="MediaInfo\Text\File_Scte20.h" />
- <ClInclude Include="MediaInfo\Text\File_Teletext.h" />
- <ClInclude Include="MediaInfo\Video\File_AfdBarData.h" />
- <ClInclude Include="MediaInfo\Video\File_Aic.h" />
- <ClInclude Include="MediaInfo\Video\File_Avc.h" />
- <ClInclude Include="MediaInfo\Video\File_AvsV.h" />
- <ClInclude Include="MediaInfo\Video\File_Canopus.h" />
- <ClInclude Include="MediaInfo\Video\File_Dirac.h" />
- <ClInclude Include="MediaInfo\Video\File_Flic.h" />
- <ClInclude Include="MediaInfo\Video\File_Fraps.h" />
- <ClInclude Include="MediaInfo\Video\File_H263.h" />
- <ClInclude Include="MediaInfo\Video\File_Lagarith.h" />
- <ClInclude Include="MediaInfo\Video\File_Mpeg4v.h" />
- <ClInclude Include="MediaInfo\Video\File_Mpegv.h" />
- <ClInclude Include="MediaInfo\Video\File_ProRes.h" />
- <ClInclude Include="MediaInfo\Video\File_Theora.h" />
- <ClInclude Include="MediaInfo\Video\File_Vc1.h" />
- <ClInclude Include="MediaInfo\Video\File_Vc3.h" />
- <ClInclude Include="MediaInfo\Video\File_Vp8.h" />
- <ClInclude Include="MediaInfo\Video\File_Y4m.h" />
+ <ClInclude Include="library\Source\MediaInfo\Export\Export_EbuCore.h" />
+ <ClInclude Include="library\Source\MediaInfo\Export\Export_PBCore2.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Aaf.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_DashMpd.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_DcpAm.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_DcpCpl.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_DcpPkl.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_HdsF4m.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Pmp.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ptx.h" />
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_PropertyList.h" />
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_Xmp.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Pdf.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Sdp.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_SubRip.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_TimedText.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Ttml.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Ffv1.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Hevc.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_HuffYuv.h" />
+ <ClInclude Include="library\Source\ThirdParty\base64\base64.h" />
+ <ClInclude Include="library\Source\ThirdParty\tinyxml2\tinyxml2.h" />
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_7z.h" />
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Ace.h" />
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Bzip2.h" />
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Elf.h" />
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Gzip.h" />
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Iso9660.h" />
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Mz.h" />
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Rar.h" />
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Tar.h" />
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Zip.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Aac.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Aac_GeneralAudio.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Aac_GeneralAudio_Sbr.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Aac_GeneralAudio_Sbr_Ps.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Ac3.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Adpcm.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Als.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Amr.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Amv.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Ape.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Au.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Caf.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Celt.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_ChannelGrouping.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_DolbyE.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Dts.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_ExtendedModule.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Flac.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_ImpulseTracker.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_La.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Midi.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Module.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Mpc.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_MpcSv8.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Mpega.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_OpenMG.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Opus.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Pcm.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Pcm_M2ts.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Pcm_Vob.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Ps2Audio.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Rkau.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_ScreamTracker3.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_SmpteSt0302.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_SmpteSt0331.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_SmpteSt0337.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Speex.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Tak.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Tta.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_TwinVQ.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Vorbis.h" />
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Wvpk.h" />
+ <ClInclude Include="library\Source\MediaInfo\Duplicate\File__Duplicate_MpegTs.h" />
+ <ClInclude Include="library\Source\MediaInfo\Duplicate\File__Duplicate__Base.h" />
+ <ClInclude Include="library\Source\MediaInfo\Duplicate\File__Duplicate__Writer.h" />
+ <ClInclude Include="library\Source\MediaInfo\Export\Export_Mpeg7.h" />
+ <ClInclude Include="library\Source\MediaInfo\Export\Export_PBCore.h" />
+ <ClInclude Include="library\Source\MediaInfo\File_Dummy.h" />
+ <ClInclude Include="library\Source\MediaInfo\File_Other.h" />
+ <ClInclude Include="library\Source\MediaInfo\File_Unknown.h" />
+ <ClInclude Include="library\Source\MediaInfo\File__Analyse_Automatic.h" />
+ <ClInclude Include="library\Source\MediaInfo\File__Analyze.h" />
+ <ClInclude Include="library\Source\MediaInfo\File__Analyze_MinimizeSize.h" />
+ <ClInclude Include="library\Source\MediaInfo\File__Base.h" />
+ <ClInclude Include="library\Source\MediaInfo\File__Duplicate.h" />
+ <ClInclude Include="library\Source\MediaInfo\File__MultipleParsing.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_ArriRaw.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Bmp.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Bpg.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Dds.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Dpx.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Exr.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Gif.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Ico.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Jpeg.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Pcx.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Png.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Psd.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Rle.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Tga.h" />
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Tiff.h" />
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo.h" />
+ <ClInclude Include="library\Source\MediaInfo\MediaInfoList.h" />
+ <ClInclude Include="library\Source\MediaInfo\MediaInfoList_Internal.h" />
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Config.h" />
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Config_MediaInfo.h" />
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Config_PerPackage.h" />
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Const.h" />
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Events.h" />
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Events_Internal.h" />
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Internal.h" />
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Internal_Const.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper_Common.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper_Resource.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper_Sequence.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper_Sequence_Common.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ancillary.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Bdmv.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Cdxa.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Dpg.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_DvDif.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Dvdv.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Dxw.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Flv.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Gxf.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Gxf_TimeCode.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Hls.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ibi.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ibi_Creation.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ism.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ivf.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Lxf.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mk.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mpeg4.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mpeg4_Descriptors.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mpeg4_TimeCode.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_MpegPs.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_MpegTs.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mpeg_Descriptors.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mpeg_Psi.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mxf.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Nut.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ogg.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ogg_SubElement.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_P2_Clip.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Riff.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Rm.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_SequenceInfo.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Skm.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Swf.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Umf.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Wm.h" />
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Xdcam_Clip.h" />
+ <ClInclude Include="library\Source\MediaInfo\PreComp.h" />
+ <ClInclude Include="library\Source\MediaInfo\Reader\Reader_Directory.h" />
+ <ClInclude Include="library\Source\MediaInfo\Reader\Reader_File.h" />
+ <ClInclude Include="library\Source\MediaInfo\Reader\Reader_libcurl.h" />
+ <ClInclude Include="library\Source\MediaInfo\Reader\Reader_libcurl_Include.h" />
+ <ClInclude Include="library\Source\MediaInfo\Reader\Reader_libmms.h" />
+ <ClInclude Include="library\Source\MediaInfo\Reader\Reader__Base.h" />
+ <ClInclude Include="library\Source\MediaInfo\Setup.h" />
+ <ClInclude Include="library\Source\MediaInfo\TimeCode.h" />
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_ApeTag.h" />
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_Id3.h" />
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_Id3v2.h" />
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_Lyrics3.h" />
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_Lyrics3v2.h" />
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_VorbisCom.h" />
+ <ClInclude Include="library\Source\MediaInfo\Tag\File__Tags.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_AribStdB24B37.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Cdp.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Cmml.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_DtvccTransport.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_DvbSubtitle.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Eia608.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Eia708.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Kate.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_N19.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_OtherText.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Pgs.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Scc.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Scte20.h" />
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Teletext.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_AfdBarData.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Aic.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Avc.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_AvsV.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Canopus.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Dirac.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Flic.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Fraps.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_H263.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Lagarith.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Mpeg4v.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Mpegv.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_ProRes.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Theora.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Vc1.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Vc3.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Vp8.h" />
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Y4m.h" />
</ItemGroup>
<ItemGroup>
- <ClCompile Include="MediaInfo\Archive\File_7z.cpp" />
- <ClCompile Include="MediaInfo\Archive\File_Ace.cpp" />
- <ClCompile Include="MediaInfo\Archive\File_Bzip2.cpp" />
- <ClCompile Include="MediaInfo\Archive\File_Elf.cpp" />
- <ClCompile Include="MediaInfo\Archive\File_Gzip.cpp" />
- <ClCompile Include="MediaInfo\Archive\File_Iso9660.cpp" />
- <ClCompile Include="MediaInfo\Archive\File_Mz.cpp" />
- <ClCompile Include="MediaInfo\Archive\File_Rar.cpp" />
- <ClCompile Include="MediaInfo\Archive\File_Tar.cpp" />
- <ClCompile Include="MediaInfo\Archive\File_Zip.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Aac.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Aac_GeneralAudio.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Aac_GeneralAudio_Sbr.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Aac_GeneralAudio_Sbr_Ps.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Aac_Main.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Aac_Others.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Ac3.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Adpcm.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Als.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Amr.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Amv.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Ape.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Au.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Caf.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Celt.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_ChannelGrouping.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_DolbyE.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Dts.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_ExtendedModule.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Flac.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_ImpulseTracker.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_La.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Midi.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Module.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Mpc.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_MpcSv8.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Mpega.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_OpenMG.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Opus.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Pcm.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Pcm_M2ts.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Pcm_Vob.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Ps2Audio.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Rkau.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_ScreamTracker3.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_SmpteSt0302.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_SmpteSt0331.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_SmpteSt0337.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Speex.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Tak.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Tta.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_TwinVQ.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Vorbis.cpp" />
- <ClCompile Include="MediaInfo\Audio\File_Wvpk.cpp" />
- <ClCompile Include="MediaInfo\Duplicate\File__Duplicate_MpegTs.cpp" />
- <ClCompile Include="MediaInfo\Duplicate\File__Duplicate__Base.cpp" />
- <ClCompile Include="MediaInfo\Duplicate\File__Duplicate__Writer.cpp" />
- <ClCompile Include="MediaInfo\Export\Export_EbuCore.cpp" />
- <ClCompile Include="MediaInfo\Export\Export_Mpeg7.cpp" />
- <ClCompile Include="MediaInfo\Export\Export_PBCore.cpp" />
- <ClCompile Include="MediaInfo\Export\Export_PBCore2.cpp" />
- <ClCompile Include="MediaInfo\File_Dummy.cpp" />
- <ClCompile Include="MediaInfo\File_Other.cpp" />
- <ClCompile Include="MediaInfo\File_Unknown.cpp" />
- <ClCompile Include="MediaInfo\File__Analyze.cpp" />
- <ClCompile Include="MediaInfo\File__Analyze_Buffer.cpp" />
- <ClCompile Include="MediaInfo\File__Analyze_Buffer_MinimizeSize.cpp" />
- <ClCompile Include="MediaInfo\File__Analyze_Streams.cpp" />
- <ClCompile Include="MediaInfo\File__Analyze_Streams_Finish.cpp" />
- <ClCompile Include="MediaInfo\File__Base.cpp" />
- <ClCompile Include="MediaInfo\File__Duplicate.cpp" />
- <ClCompile Include="MediaInfo\File__MultipleParsing.cpp" />
- <ClCompile Include="MediaInfo\Image\File_ArriRaw.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Bmp.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Bpg.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Dds.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Dpx.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Exr.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Gif.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Ico.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Jpeg.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Pcx.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Png.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Psd.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Rle.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Tga.cpp" />
- <ClCompile Include="MediaInfo\Image\File_Tiff.cpp" />
- <ClCompile Include="MediaInfo\MediaInfo.cpp" />
- <ClCompile Include="MediaInfo\MediaInfoList.cpp" />
- <ClCompile Include="MediaInfo\MediaInfoList_Internal.cpp" />
- <ClCompile Include="MediaInfo\MediaInfo_Config.cpp" />
- <ClCompile Include="MediaInfo\MediaInfo_Config_Automatic.cpp" />
- <ClCompile Include="MediaInfo\MediaInfo_Config_MediaInfo.cpp" />
- <ClCompile Include="MediaInfo\MediaInfo_Config_PerPackage.cpp" />
- <ClCompile Include="MediaInfo\MediaInfo_File.cpp" />
- <ClCompile Include="MediaInfo\MediaInfo_Inform.cpp" />
- <ClCompile Include="MediaInfo\MediaInfo_Internal.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Aaf.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_DashMpd.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_DcpAm.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_DcpCpl.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_DcpPkl.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_HdsF4m.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Pmp.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Ptx.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File__ReferenceFilesHelper.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File__ReferenceFilesHelper_Resource.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File__ReferenceFilesHelper_Sequence.cpp" />
- <ClCompile Include="MediaInfo\PreComp.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_7z.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Ace.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Bzip2.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Elf.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Gzip.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Iso9660.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Mz.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Rar.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Tar.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Zip.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Aac.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Aac_GeneralAudio.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Aac_GeneralAudio_Sbr.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Aac_GeneralAudio_Sbr_Ps.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Aac_Main.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Aac_Others.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Ac3.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Adpcm.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Als.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Amr.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Amv.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Ape.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Au.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Caf.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Celt.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_ChannelGrouping.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_DolbyE.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Dts.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_ExtendedModule.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Flac.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_ImpulseTracker.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_La.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Midi.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Module.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Mpc.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_MpcSv8.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Mpega.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_OpenMG.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Opus.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Pcm.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Pcm_M2ts.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Pcm_Vob.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Ps2Audio.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Rkau.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_ScreamTracker3.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_SmpteSt0302.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_SmpteSt0331.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_SmpteSt0337.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Speex.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Tak.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Tta.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_TwinVQ.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Vorbis.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Wvpk.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Duplicate\File__Duplicate_MpegTs.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Duplicate\File__Duplicate__Base.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Duplicate\File__Duplicate__Writer.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Export\Export_EbuCore.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Export\Export_Mpeg7.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Export\Export_PBCore.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Export\Export_PBCore2.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\File_Dummy.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\File_Other.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\File_Unknown.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\File__Analyze.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\File__Analyze_Buffer.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\File__Analyze_Buffer_MinimizeSize.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\File__Analyze_Streams.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\File__Analyze_Streams_Finish.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\File__Base.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\File__Duplicate.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\File__MultipleParsing.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_ArriRaw.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Bmp.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Bpg.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Dds.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Dpx.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Exr.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Gif.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Ico.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Jpeg.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Pcx.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Png.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Psd.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Rle.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Tga.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Tiff.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\MediaInfoList.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\MediaInfoList_Internal.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_Config.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_Config_Automatic.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_Config_MediaInfo.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_Config_PerPackage.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_File.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_Inform.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_Internal.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Aaf.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_DashMpd.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_DcpAm.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_DcpCpl.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_DcpPkl.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_HdsF4m.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Pmp.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ptx.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper_Resource.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper_Sequence.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\PreComp.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
- <ClCompile Include="MediaInfo\Tag\File_PropertyList.cpp" />
- <ClCompile Include="MediaInfo\Tag\File_Xmp.cpp" />
- <ClCompile Include="MediaInfo\Text\File_Pdf.cpp" />
- <ClCompile Include="MediaInfo\Text\File_Sdp.cpp" />
- <ClCompile Include="MediaInfo\Text\File_SubRip.cpp" />
- <ClCompile Include="MediaInfo\Text\File_TimedText.cpp" />
- <ClCompile Include="MediaInfo\Text\File_Ttml.cpp" />
- <ClCompile Include="MediaInfo\TimeCode.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Ancillary.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Bdmv.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Cdxa.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Dpg.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_DvDif.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_DvDif_Analysis.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Dvdv.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Dxw.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Flv.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Gxf.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Gxf_TimeCode.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Hls.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Ibi.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Ibi_Creation.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Ism.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Ivf.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Lxf.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Mk.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Mpeg4.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Mpeg4_Descriptors.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Mpeg4_Elements.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Mpeg4_TimeCode.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_MpegPs.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_MpegTs.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_MpegTs_Duplicate.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Mpeg_Descriptors.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Mpeg_Psi.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Mxf.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Nut.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Ogg.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Ogg_SubElement.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_P2_Clip.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Riff.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Riff_Elements.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Rm.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_SequenceInfo.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Skm.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Swf.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Umf.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Wm.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Wm_Elements.cpp" />
- <ClCompile Include="MediaInfo\Multiple\File_Xdcam_Clip.cpp" />
- <ClCompile Include="MediaInfo\Reader\Reader_Directory.cpp" />
- <ClCompile Include="MediaInfo\Reader\Reader_File.cpp" />
- <ClCompile Include="MediaInfo\Reader\Reader_libcurl.cpp" />
- <ClCompile Include="MediaInfo\Reader\Reader_libmms.cpp" />
- <ClCompile Include="MediaInfo\Tag\File_ApeTag.cpp" />
- <ClCompile Include="MediaInfo\Tag\File_Id3.cpp" />
- <ClCompile Include="MediaInfo\Tag\File_Id3v2.cpp" />
- <ClCompile Include="MediaInfo\Tag\File_Lyrics3.cpp" />
- <ClCompile Include="MediaInfo\Tag\File_Lyrics3v2.cpp" />
- <ClCompile Include="MediaInfo\Tag\File_VorbisCom.cpp" />
- <ClCompile Include="MediaInfo\Tag\File__Tags.cpp" />
- <ClCompile Include="MediaInfo\Text\File_AribStdB24B37.cpp" />
- <ClCompile Include="MediaInfo\Text\File_Cdp.cpp" />
- <ClCompile Include="MediaInfo\Text\File_Cmml.cpp" />
- <ClCompile Include="MediaInfo\Text\File_DtvccTransport.cpp" />
- <ClCompile Include="MediaInfo\Text\File_DvbSubtitle.cpp" />
- <ClCompile Include="MediaInfo\Text\File_Eia608.cpp" />
- <ClCompile Include="MediaInfo\Text\File_Eia708.cpp" />
- <ClCompile Include="MediaInfo\Text\File_Kate.cpp" />
- <ClCompile Include="MediaInfo\Text\File_N19.cpp" />
- <ClCompile Include="MediaInfo\Text\File_OtherText.cpp" />
- <ClCompile Include="MediaInfo\Text\File_Pgs.cpp" />
- <ClCompile Include="MediaInfo\Text\File_Scc.cpp" />
- <ClCompile Include="MediaInfo\Text\File_Scte20.cpp" />
- <ClCompile Include="MediaInfo\Text\File_Teletext.cpp" />
- <ClCompile Include="MediaInfo\Video\File_AfdBarData.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Aic.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Avc.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Avc_Duplicate.cpp" />
- <ClCompile Include="MediaInfo\Video\File_AvsV.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Canopus.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Dirac.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Ffv1.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Flic.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Fraps.cpp" />
- <ClCompile Include="MediaInfo\Video\File_H263.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Hevc.cpp" />
- <ClCompile Include="MediaInfo\Video\File_HuffYuv.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Lagarith.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Mpeg4v.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Mpegv.cpp" />
- <ClCompile Include="MediaInfo\Video\File_ProRes.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Theora.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Vc1.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Vc3.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Vp8.cpp" />
- <ClCompile Include="MediaInfo\Video\File_Y4m.cpp" />
- <ClCompile Include="ThirdParty\tinyxml2\tinyxml2.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_PropertyList.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_Xmp.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Pdf.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Sdp.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_SubRip.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_TimedText.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Ttml.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\TimeCode.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ancillary.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Bdmv.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Cdxa.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Dpg.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_DvDif.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_DvDif_Analysis.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Dvdv.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Dxw.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Flv.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Gxf.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Gxf_TimeCode.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Hls.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ibi.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ibi_Creation.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ism.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ivf.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Lxf.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mk.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mpeg4.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mpeg4_Descriptors.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mpeg4_Elements.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mpeg4_TimeCode.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_MpegPs.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_MpegTs.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_MpegTs_Duplicate.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mpeg_Descriptors.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mpeg_Psi.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mxf.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Nut.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ogg.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ogg_SubElement.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_P2_Clip.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Riff.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Riff_Elements.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Rm.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_SequenceInfo.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Skm.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Swf.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Umf.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Wm.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Wm_Elements.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Xdcam_Clip.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Reader\Reader_Directory.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Reader\Reader_File.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Reader\Reader_libcurl.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Reader\Reader_libmms.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_ApeTag.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_Id3.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_Id3v2.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_Lyrics3.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_Lyrics3v2.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_VorbisCom.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Tag\File__Tags.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_AribStdB24B37.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Cdp.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Cmml.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_DtvccTransport.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_DvbSubtitle.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Eia608.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Eia708.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Kate.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_N19.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_OtherText.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Pgs.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Scc.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Scte20.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Teletext.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_AfdBarData.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Aic.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Avc.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Avc_Duplicate.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_AvsV.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Canopus.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Dirac.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Ffv1.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Flic.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Fraps.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_H263.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Hevc.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_HuffYuv.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Lagarith.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Mpeg4v.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Mpegv.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_ProRes.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Theora.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Vc1.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Vc3.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Vp8.cpp" />
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Y4m.cpp" />
+ <ClCompile Include="library\Source\ThirdParty\tinyxml2\tinyxml2.cpp">
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
</ItemGroup>
diff --git a/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj.filters b/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj.filters
index 2e1a09366..324986cde 100644
--- a/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj.filters
+++ b/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj.filters
@@ -74,1239 +74,1239 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClInclude Include="ThirdParty\base64\base64.h">
+ <ClInclude Include="library\Source\ThirdParty\base64\base64.h">
<Filter>extra</Filter>
</ClInclude>
- <ClInclude Include="ThirdParty\tinyxml2\tinyxml2.h">
+ <ClInclude Include="library\Source\ThirdParty\tinyxml2\tinyxml2.h">
<Filter>extra</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\File__Analyse_Automatic.h">
+ <ClInclude Include="library\Source\MediaInfo\File__Analyse_Automatic.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\File__Analyze.h">
+ <ClInclude Include="library\Source\MediaInfo\File__Analyze.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\File__Analyze_MinimizeSize.h">
+ <ClInclude Include="library\Source\MediaInfo\File__Analyze_MinimizeSize.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\File__Base.h">
+ <ClInclude Include="library\Source\MediaInfo\File__Base.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\File__Duplicate.h">
+ <ClInclude Include="library\Source\MediaInfo\File__Duplicate.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\File__MultipleParsing.h">
+ <ClInclude Include="library\Source\MediaInfo\File__MultipleParsing.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\File_Dummy.h">
+ <ClInclude Include="library\Source\MediaInfo\File_Dummy.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\File_Other.h">
+ <ClInclude Include="library\Source\MediaInfo\File_Other.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\File_Unknown.h">
+ <ClInclude Include="library\Source\MediaInfo\File_Unknown.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\MediaInfo.h">
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\MediaInfo_Config.h">
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Config.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\MediaInfo_Config_MediaInfo.h">
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Config_MediaInfo.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\MediaInfo_Config_PerPackage.h">
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Config_PerPackage.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\MediaInfo_Const.h">
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Const.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\MediaInfo_Events.h">
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Events.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\MediaInfo_Events_Internal.h">
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Events_Internal.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\MediaInfo_Internal.h">
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Internal.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\MediaInfo_Internal_Const.h">
+ <ClInclude Include="library\Source\MediaInfo\MediaInfo_Internal_Const.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\MediaInfoList.h">
+ <ClInclude Include="library\Source\MediaInfo\MediaInfoList.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\MediaInfoList_Internal.h">
+ <ClInclude Include="library\Source\MediaInfo\MediaInfoList_Internal.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\PreComp.h">
+ <ClInclude Include="library\Source\MediaInfo\PreComp.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Setup.h">
+ <ClInclude Include="library\Source\MediaInfo\Setup.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\TimeCode.h">
+ <ClInclude Include="library\Source\MediaInfo\TimeCode.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Archive\File_7z.h">
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_7z.h">
<Filter>Header Files\Archive</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Archive\File_Ace.h">
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Ace.h">
<Filter>Header Files\Archive</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Archive\File_Bzip2.h">
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Bzip2.h">
<Filter>Header Files\Archive</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Archive\File_Elf.h">
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Elf.h">
<Filter>Header Files\Archive</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Archive\File_Gzip.h">
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Gzip.h">
<Filter>Header Files\Archive</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Archive\File_Mz.h">
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Mz.h">
<Filter>Header Files\Archive</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Archive\File_Rar.h">
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Rar.h">
<Filter>Header Files\Archive</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Archive\File_Tar.h">
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Tar.h">
<Filter>Header Files\Archive</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Archive\File_Zip.h">
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Zip.h">
<Filter>Header Files\Archive</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Duplicate\File__Duplicate__Base.h">
+ <ClInclude Include="library\Source\MediaInfo\Duplicate\File__Duplicate__Base.h">
<Filter>Header Files\Duplicate</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Duplicate\File__Duplicate__Writer.h">
+ <ClInclude Include="library\Source\MediaInfo\Duplicate\File__Duplicate__Writer.h">
<Filter>Header Files\Duplicate</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Duplicate\File__Duplicate_MpegTs.h">
+ <ClInclude Include="library\Source\MediaInfo\Duplicate\File__Duplicate_MpegTs.h">
<Filter>Header Files\Duplicate</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Export\Export_Mpeg7.h">
+ <ClInclude Include="library\Source\MediaInfo\Export\Export_Mpeg7.h">
<Filter>Header Files\Export</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Export\Export_PBCore.h">
+ <ClInclude Include="library\Source\MediaInfo\Export\Export_PBCore.h">
<Filter>Header Files\Export</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_ArriRaw.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_ArriRaw.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Bmp.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Bmp.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Bpg.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Bpg.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Dds.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Dds.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Dpx.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Dpx.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Exr.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Exr.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Gif.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Gif.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Ico.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Ico.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Jpeg.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Jpeg.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Pcx.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Pcx.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Png.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Png.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Psd.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Psd.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Rle.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Rle.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Tiff.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Tiff.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File__ReferenceFilesHelper.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File__ReferenceFilesHelper_Common.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper_Common.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File__ReferenceFilesHelper_Resource.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper_Resource.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File__ReferenceFilesHelper_Sequence.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper_Sequence.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File__ReferenceFilesHelper_Sequence_Common.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper_Sequence_Common.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Ancillary.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ancillary.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Bdmv.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Bdmv.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Cdxa.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Cdxa.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Dpg.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Dpg.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_DvDif.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_DvDif.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Dvdv.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Dvdv.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Dxw.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Dxw.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Flv.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Flv.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Gxf.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Gxf.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Gxf_TimeCode.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Gxf_TimeCode.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Hls.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Hls.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Ivf.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ivf.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Lxf.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Lxf.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Mk.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mk.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Mpeg_Descriptors.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mpeg_Descriptors.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Mpeg_Psi.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mpeg_Psi.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Mpeg4.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mpeg4.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Mpeg4_Descriptors.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mpeg4_Descriptors.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Mpeg4_TimeCode.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mpeg4_TimeCode.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_MpegPs.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_MpegPs.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_MpegTs.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_MpegTs.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Mxf.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Mxf.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Nut.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Nut.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Ogg.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ogg.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Ogg_SubElement.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ogg_SubElement.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_P2_Clip.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_P2_Clip.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Riff.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Riff.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Rm.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Rm.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Skm.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Skm.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Swf.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Swf.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Umf.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Umf.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Wm.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Wm.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Xdcam_Clip.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Xdcam_Clip.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Reader\Reader__Base.h">
+ <ClInclude Include="library\Source\MediaInfo\Reader\Reader__Base.h">
<Filter>Header Files\Reader</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Reader\Reader_Directory.h">
+ <ClInclude Include="library\Source\MediaInfo\Reader\Reader_Directory.h">
<Filter>Header Files\Reader</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Reader\Reader_File.h">
+ <ClInclude Include="library\Source\MediaInfo\Reader\Reader_File.h">
<Filter>Header Files\Reader</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Reader\Reader_libcurl.h">
+ <ClInclude Include="library\Source\MediaInfo\Reader\Reader_libcurl.h">
<Filter>Header Files\Reader</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Reader\Reader_libcurl_Include.h">
+ <ClInclude Include="library\Source\MediaInfo\Reader\Reader_libcurl_Include.h">
<Filter>Header Files\Reader</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Reader\Reader_libmms.h">
+ <ClInclude Include="library\Source\MediaInfo\Reader\Reader_libmms.h">
<Filter>Header Files\Reader</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Tag\File__Tags.h">
+ <ClInclude Include="library\Source\MediaInfo\Tag\File__Tags.h">
<Filter>Header Files\Tag</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Tag\File_ApeTag.h">
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_ApeTag.h">
<Filter>Header Files\Tag</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Tag\File_Id3.h">
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_Id3.h">
<Filter>Header Files\Tag</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Tag\File_Id3v2.h">
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_Id3v2.h">
<Filter>Header Files\Tag</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Tag\File_Lyrics3.h">
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_Lyrics3.h">
<Filter>Header Files\Tag</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Tag\File_Lyrics3v2.h">
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_Lyrics3v2.h">
<Filter>Header Files\Tag</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Tag\File_VorbisCom.h">
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_VorbisCom.h">
<Filter>Header Files\Tag</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_AribStdB24B37.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_AribStdB24B37.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_Cdp.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Cdp.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_Cmml.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Cmml.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_DtvccTransport.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_DtvccTransport.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_DvbSubtitle.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_DvbSubtitle.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_Eia608.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Eia608.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_Eia708.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Eia708.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_Kate.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Kate.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_N19.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_N19.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_OtherText.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_OtherText.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_Pgs.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Pgs.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_Scc.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Scc.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_Scte20.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Scte20.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_Teletext.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Teletext.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_AfdBarData.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_AfdBarData.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Aic.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Aic.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Avc.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Avc.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_AvsV.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_AvsV.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Canopus.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Canopus.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Dirac.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Dirac.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Flic.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Flic.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Fraps.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Fraps.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_H263.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_H263.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Lagarith.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Lagarith.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Mpeg4v.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Mpeg4v.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Mpegv.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Mpegv.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_ProRes.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_ProRes.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Theora.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Theora.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Vc1.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Vc1.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Vc3.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Vc3.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Vp8.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Vp8.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Y4m.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Y4m.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Aac.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Aac.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Aac_GeneralAudio.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Aac_GeneralAudio.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Aac_GeneralAudio_Sbr.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Aac_GeneralAudio_Sbr.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Aac_GeneralAudio_Sbr_Ps.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Aac_GeneralAudio_Sbr_Ps.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Ac3.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Ac3.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Adpcm.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Adpcm.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Als.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Als.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Amr.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Amr.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Amv.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Amv.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Ape.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Ape.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Au.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Au.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Caf.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Caf.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Celt.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Celt.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_DolbyE.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_DolbyE.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Dts.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Dts.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_ExtendedModule.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_ExtendedModule.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Flac.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Flac.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_ImpulseTracker.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_ImpulseTracker.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_La.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_La.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Midi.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Midi.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Module.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Module.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Mpc.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Mpc.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_MpcSv8.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_MpcSv8.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Mpega.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Mpega.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_OpenMG.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_OpenMG.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Opus.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Opus.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Pcm.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Pcm.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Pcm_M2ts.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Pcm_M2ts.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Pcm_Vob.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Pcm_Vob.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Ps2Audio.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Ps2Audio.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Rkau.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Rkau.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_ScreamTracker3.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_ScreamTracker3.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_SmpteSt0331.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_SmpteSt0331.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_SmpteSt0337.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_SmpteSt0337.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Speex.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Speex.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Tak.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Tak.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Tta.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Tta.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_TwinVQ.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_TwinVQ.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Vorbis.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Vorbis.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_Wvpk.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_Wvpk.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Archive\File_Iso9660.h">
+ <ClInclude Include="library\Source\MediaInfo\Archive\File_Iso9660.h">
<Filter>Header Files\Archive</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_ChannelGrouping.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_ChannelGrouping.h">
<Filter>Header Files\Audio</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Ibi.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ibi.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Ibi_Creation.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ibi_Creation.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Ism.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ism.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Image\File_Tga.h">
+ <ClInclude Include="library\Source\MediaInfo\Image\File_Tga.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_SequenceInfo.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_SequenceInfo.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Audio\File_SmpteSt0302.h">
+ <ClInclude Include="library\Source\MediaInfo\Audio\File_SmpteSt0302.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Pmp.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Pmp.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_SubRip.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_SubRip.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_TimedText.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_TimedText.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_Ttml.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Ttml.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Hevc.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Hevc.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_DashMpd.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_DashMpd.h">
<Filter>Source Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_DcpAm.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_DcpAm.h">
<Filter>Source Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_DcpCpl.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_DcpCpl.h">
<Filter>Source Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_DcpPkl.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_DcpPkl.h">
<Filter>Source Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_HdsF4m.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_HdsF4m.h">
<Filter>Source Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Export\Export_EbuCore.h">
+ <ClInclude Include="library\Source\MediaInfo\Export\Export_EbuCore.h">
<Filter>Header Files\Export</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Aaf.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Aaf.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Multiple\File_Ptx.h">
+ <ClInclude Include="library\Source\MediaInfo\Multiple\File_Ptx.h">
<Filter>Header Files\Multiple</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Tag\File_Xmp.h">
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_Xmp.h">
<Filter>Header Files\Tag</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_Pdf.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Pdf.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_Ffv1.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_Ffv1.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Video\File_HuffYuv.h">
+ <ClInclude Include="library\Source\MediaInfo\Video\File_HuffYuv.h">
<Filter>Header Files\Video</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Export\Export_PBCore2.h">
+ <ClInclude Include="library\Source\MediaInfo\Export\Export_PBCore2.h">
<Filter>Header Files\Export</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Tag\File_PropertyList.h">
+ <ClInclude Include="library\Source\MediaInfo\Tag\File_PropertyList.h">
<Filter>Header Files\Tag</Filter>
</ClInclude>
- <ClInclude Include="MediaInfo\Text\File_Sdp.h">
+ <ClInclude Include="library\Source\MediaInfo\Text\File_Sdp.h">
<Filter>Header Files\Text</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="ThirdParty\tinyxml2\tinyxml2.cpp">
+ <ClCompile Include="library\Source\ThirdParty\tinyxml2\tinyxml2.cpp">
<Filter>extra</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\File__Analyze.cpp">
+ <ClCompile Include="library\Source\MediaInfo\File__Analyze.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\File__Analyze_Buffer.cpp">
+ <ClCompile Include="library\Source\MediaInfo\File__Analyze_Buffer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\File__Analyze_Buffer_MinimizeSize.cpp">
+ <ClCompile Include="library\Source\MediaInfo\File__Analyze_Buffer_MinimizeSize.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\File__Analyze_Streams.cpp">
+ <ClCompile Include="library\Source\MediaInfo\File__Analyze_Streams.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\File__Analyze_Streams_Finish.cpp">
+ <ClCompile Include="library\Source\MediaInfo\File__Analyze_Streams_Finish.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\File__Base.cpp">
+ <ClCompile Include="library\Source\MediaInfo\File__Base.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\File__Duplicate.cpp">
+ <ClCompile Include="library\Source\MediaInfo\File__Duplicate.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\File__MultipleParsing.cpp">
+ <ClCompile Include="library\Source\MediaInfo\File__MultipleParsing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\File_Dummy.cpp">
+ <ClCompile Include="library\Source\MediaInfo\File_Dummy.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\File_Other.cpp">
+ <ClCompile Include="library\Source\MediaInfo\File_Other.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\File_Unknown.cpp">
+ <ClCompile Include="library\Source\MediaInfo\File_Unknown.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\MediaInfo.cpp">
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\MediaInfo_Config.cpp">
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_Config.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\MediaInfo_Config_Automatic.cpp">
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_Config_Automatic.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\MediaInfo_Config_MediaInfo.cpp">
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_Config_MediaInfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\MediaInfo_Config_PerPackage.cpp">
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_Config_PerPackage.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\MediaInfo_File.cpp">
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_File.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\MediaInfo_Inform.cpp">
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_Inform.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\MediaInfo_Internal.cpp">
+ <ClCompile Include="library\Source\MediaInfo\MediaInfo_Internal.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\MediaInfoList.cpp">
+ <ClCompile Include="library\Source\MediaInfo\MediaInfoList.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\MediaInfoList_Internal.cpp">
+ <ClCompile Include="library\Source\MediaInfo\MediaInfoList_Internal.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\PreComp.cpp">
+ <ClCompile Include="library\Source\MediaInfo\PreComp.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\TimeCode.cpp">
+ <ClCompile Include="library\Source\MediaInfo\TimeCode.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Archive\File_7z.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_7z.cpp">
<Filter>Source Files\Archive</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Archive\File_Ace.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Ace.cpp">
<Filter>Source Files\Archive</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Archive\File_Bzip2.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Bzip2.cpp">
<Filter>Source Files\Archive</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Archive\File_Elf.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Elf.cpp">
<Filter>Source Files\Archive</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Archive\File_Gzip.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Gzip.cpp">
<Filter>Source Files\Archive</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Archive\File_Mz.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Mz.cpp">
<Filter>Source Files\Archive</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Archive\File_Rar.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Rar.cpp">
<Filter>Source Files\Archive</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Archive\File_Tar.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Tar.cpp">
<Filter>Source Files\Archive</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Archive\File_Zip.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Zip.cpp">
<Filter>Source Files\Archive</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_ArriRaw.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_ArriRaw.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Bmp.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Bmp.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Bpg.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Bpg.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Dds.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Dds.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Dpx.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Dpx.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Exr.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Exr.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Gif.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Gif.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Ico.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Ico.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Jpeg.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Jpeg.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Pcx.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Pcx.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Png.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Png.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Psd.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Psd.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Rle.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Rle.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Tiff.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Tiff.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File__ReferenceFilesHelper.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File__ReferenceFilesHelper_Resource.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper_Resource.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File__ReferenceFilesHelper_Sequence.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File__ReferenceFilesHelper_Sequence.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Ancillary.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ancillary.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Bdmv.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Bdmv.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Cdxa.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Cdxa.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Dpg.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Dpg.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_DvDif.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_DvDif.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_DvDif_Analysis.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_DvDif_Analysis.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Dvdv.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Dvdv.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Dxw.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Dxw.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Flv.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Flv.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Gxf.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Gxf.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Gxf_TimeCode.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Gxf_TimeCode.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Hls.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Hls.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Ivf.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ivf.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Lxf.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Lxf.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Mk.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mk.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Mpeg_Descriptors.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mpeg_Descriptors.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Mpeg_Psi.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mpeg_Psi.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Mpeg4.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mpeg4.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Mpeg4_Descriptors.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mpeg4_Descriptors.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Mpeg4_Elements.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mpeg4_Elements.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Mpeg4_TimeCode.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mpeg4_TimeCode.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_MpegPs.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_MpegPs.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_MpegTs.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_MpegTs.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_MpegTs_Duplicate.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_MpegTs_Duplicate.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Mxf.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Mxf.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Nut.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Nut.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Ogg.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ogg.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Ogg_SubElement.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ogg_SubElement.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_P2_Clip.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_P2_Clip.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Riff.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Riff.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Riff_Elements.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Riff_Elements.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Rm.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Rm.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Skm.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Skm.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Swf.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Swf.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Umf.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Umf.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Wm.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Wm.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Wm_Elements.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Wm_Elements.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Xdcam_Clip.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Xdcam_Clip.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Duplicate\File__Duplicate__Base.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Duplicate\File__Duplicate__Base.cpp">
<Filter>Source Files\Duplicate</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Duplicate\File__Duplicate__Writer.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Duplicate\File__Duplicate__Writer.cpp">
<Filter>Source Files\Duplicate</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Duplicate\File__Duplicate_MpegTs.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Duplicate\File__Duplicate_MpegTs.cpp">
<Filter>Source Files\Duplicate</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Export\Export_Mpeg7.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Export\Export_Mpeg7.cpp">
<Filter>Source Files\Export</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Export\Export_PBCore.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Export\Export_PBCore.cpp">
<Filter>Source Files\Export</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_AfdBarData.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_AfdBarData.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Aic.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Aic.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Avc.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Avc.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Avc_Duplicate.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Avc_Duplicate.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_AvsV.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_AvsV.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Canopus.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Canopus.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Dirac.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Dirac.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Flic.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Flic.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Fraps.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Fraps.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_H263.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_H263.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Lagarith.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Lagarith.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Mpeg4v.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Mpeg4v.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Mpegv.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Mpegv.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_ProRes.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_ProRes.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Theora.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Theora.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Vc1.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Vc1.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Vc3.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Vc3.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Vp8.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Vp8.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Y4m.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Y4m.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_AribStdB24B37.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_AribStdB24B37.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_Cdp.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Cdp.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_Cmml.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Cmml.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_DtvccTransport.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_DtvccTransport.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_DvbSubtitle.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_DvbSubtitle.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_Eia608.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Eia608.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_Eia708.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Eia708.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_Kate.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Kate.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_N19.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_N19.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_OtherText.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_OtherText.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_Pgs.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Pgs.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_Scc.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Scc.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_Scte20.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Scte20.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_Teletext.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Teletext.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Reader\Reader_Directory.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Reader\Reader_Directory.cpp">
<Filter>Source Files\Reader</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Reader\Reader_File.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Reader\Reader_File.cpp">
<Filter>Source Files\Reader</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Reader\Reader_libcurl.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Reader\Reader_libcurl.cpp">
<Filter>Source Files\Reader</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Reader\Reader_libmms.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Reader\Reader_libmms.cpp">
<Filter>Source Files\Reader</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Tag\File__Tags.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Tag\File__Tags.cpp">
<Filter>Source Files\Tag</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Tag\File_ApeTag.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_ApeTag.cpp">
<Filter>Source Files\Tag</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Tag\File_Id3.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_Id3.cpp">
<Filter>Source Files\Tag</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Tag\File_Id3v2.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_Id3v2.cpp">
<Filter>Source Files\Tag</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Tag\File_Lyrics3.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_Lyrics3.cpp">
<Filter>Source Files\Tag</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Tag\File_Lyrics3v2.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_Lyrics3v2.cpp">
<Filter>Source Files\Tag</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Tag\File_VorbisCom.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_VorbisCom.cpp">
<Filter>Source Files\Tag</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Aac.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Aac.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Aac_GeneralAudio.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Aac_GeneralAudio.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Aac_GeneralAudio_Sbr.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Aac_GeneralAudio_Sbr.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Aac_GeneralAudio_Sbr_Ps.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Aac_GeneralAudio_Sbr_Ps.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Aac_Main.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Aac_Main.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Aac_Others.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Aac_Others.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Ac3.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Ac3.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Adpcm.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Adpcm.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Als.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Als.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Amr.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Amr.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Amv.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Amv.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Ape.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Ape.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Au.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Au.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Caf.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Caf.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Celt.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Celt.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_DolbyE.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_DolbyE.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Dts.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Dts.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_ExtendedModule.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_ExtendedModule.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Flac.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Flac.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_ImpulseTracker.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_ImpulseTracker.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_La.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_La.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Midi.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Midi.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Module.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Module.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Mpc.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Mpc.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_MpcSv8.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_MpcSv8.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Mpega.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Mpega.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_OpenMG.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_OpenMG.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Opus.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Opus.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Pcm.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Pcm.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Pcm_M2ts.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Pcm_M2ts.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Pcm_Vob.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Pcm_Vob.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Ps2Audio.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Ps2Audio.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Rkau.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Rkau.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_ScreamTracker3.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_ScreamTracker3.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_SmpteSt0331.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_SmpteSt0331.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_SmpteSt0337.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_SmpteSt0337.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Speex.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Speex.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Tak.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Tak.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Tta.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Tta.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_TwinVQ.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_TwinVQ.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Vorbis.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Vorbis.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_Wvpk.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_Wvpk.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Archive\File_Iso9660.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Archive\File_Iso9660.cpp">
<Filter>Source Files\Archive</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_ChannelGrouping.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_ChannelGrouping.cpp">
<Filter>Source Files\Audio</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Image\File_Tga.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Image\File_Tga.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Ibi.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ibi.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Ibi_Creation.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ibi_Creation.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Ism.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ism.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_SequenceInfo.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_SequenceInfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Audio\File_SmpteSt0302.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Audio\File_SmpteSt0302.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Pmp.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Pmp.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_SubRip.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_SubRip.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_TimedText.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_TimedText.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_Ttml.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Ttml.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Hevc.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Hevc.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_DashMpd.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_DashMpd.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_DcpAm.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_DcpAm.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_DcpCpl.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_DcpCpl.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_DcpPkl.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_DcpPkl.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_HdsF4m.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_HdsF4m.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Export\Export_EbuCore.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Export\Export_EbuCore.cpp">
<Filter>Source Files\Export</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Aaf.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Aaf.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Multiple\File_Ptx.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Multiple\File_Ptx.cpp">
<Filter>Source Files\Multiple</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Tag\File_Xmp.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_Xmp.cpp">
<Filter>Source Files\Tag</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_Pdf.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Pdf.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_Ffv1.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_Ffv1.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Video\File_HuffYuv.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Video\File_HuffYuv.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Text\File_Sdp.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Text\File_Sdp.cpp">
<Filter>Source Files\Text</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Tag\File_PropertyList.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Tag\File_PropertyList.cpp">
<Filter>Source Files\Tag</Filter>
</ClCompile>
- <ClCompile Include="MediaInfo\Export\Export_PBCore2.cpp">
+ <ClCompile Include="library\Source\MediaInfo\Export\Export_PBCore2.cpp">
<Filter>Source Files\Export</Filter>
</ClCompile>
</ItemGroup>
diff --git a/src/thirdparty/MediaInfo/ThirdParty/base64/base64.h b/src/thirdparty/MediaInfo/ThirdParty/base64/base64.h
deleted file mode 100644
index 40a340c61..000000000
--- a/src/thirdparty/MediaInfo/ThirdParty/base64/base64.h
+++ /dev/null
@@ -1,158 +0,0 @@
-//  //
-// #### ### ## -= Base64 library =-  //
-// # # # # # Base64.h - Base64 encoder/decoder  //
-// #### #### # #  //
-// # # # # ##### Encodes and decodes base64 strings  //
-// # # # # # Ideas taken from work done by Bob Withers  //
-// #### ### # R1 2002-05-07 by Markus Ewald  //
-//  //
-#ifndef B64_BASE64_H
-#define B64_BASE64_H
-
-#include <string>
-
-namespace Base64 {
-
- /// Encode string to base64
- inline std::string encode(const std::string &sString);
- /// Encode base64 into string
- inline std::string decode(const std::string &sString);
-
-}; // namespace Base64
-
-// ####################################################################### //
-// # Base64::encode() # //
-// ####################################################################### //
-/** Encodes the specified string to base64
-
- @param sString String to encode
- @return Base64 encoded string
-*/
-inline std::string Base64::encode(const std::string &sString) {
- static const std::string sBase64Table(
- // 0000000000111111111122222222223333333333444444444455555555556666
- // 0123456789012345678901234567890123456789012345678901234567890123
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
- );
- static const char cFillChar = '=';
- std::string::size_type nLength = sString.length();
- std::string sResult;
-
- // Allocate memory for the converted string
- sResult.reserve(nLength * 8 / 6 + 1);
-
- for(std::string::size_type nPos = 0; nPos < nLength; nPos++) {
- char cCode;
-
- // Encode the first 6 bits
- cCode = (sString[nPos] >> 2) & 0x3f;
- sResult.append(1, sBase64Table[cCode]);
-
- // Encode the remaining 2 bits with the next 4 bits (if present)
- cCode = (sString[nPos] << 4) & 0x3f;
- if(++nPos < nLength)
- cCode |= (sString[nPos] >> 4) & 0x0f;
- sResult.append(1, sBase64Table[cCode]);
-
- if(nPos < nLength) {
- cCode = (sString[nPos] << 2) & 0x3f;
- if(++nPos < nLength)
- cCode |= (sString[nPos] >> 6) & 0x03;
-
- sResult.append(1, sBase64Table[cCode]);
- } else {
- ++nPos;
- sResult.append(1, cFillChar);
- }
-
- if(nPos < nLength) {
- cCode = sString[nPos] & 0x3f;
- sResult.append(1, sBase64Table[cCode]);
- } else {
- sResult.append(1, cFillChar);
- }
- }
-
- return sResult;
-}
-
-// ####################################################################### //
-// # Base64::decode() # //
-// ####################################################################### //
-/** Decodes the specified base64 string
-
- @param sString Base64 string to decode
- @return Decoded string
-*/
-inline std::string Base64::decode(const std::string &sString) {
- static const std::string::size_type np = std::string::npos;
- static const std::string::size_type DecodeTable[] = {
- // 0 1 2 3 4 5 6 7 8 9
- np, np, np, np, np, np, np, np, np, np, // 0 - 9
- np, np, np, np, np, np, np, np, np, np, // 10 - 19
- np, np, np, np, np, np, np, np, np, np, // 20 - 29
- np, np, np, np, np, np, np, np, np, np, // 30 - 39
- np, np, np, 62, np, np, np, 63, 52, 53, // 40 - 49
- 54, 55, 56, 57, 58, 59, 60, 61, np, np, // 50 - 59
- np, np, np, np, np, 0, 1, 2, 3, 4, // 60 - 69
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, // 70 - 79
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // 80 - 89
- 25, np, np, np, np, np, np, 26, 27, 28, // 90 - 99
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, // 100 - 109
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, // 110 - 119
- 49, 50, 51, np, np, np, np, np, np, np, // 120 - 129
- np, np, np, np, np, np, np, np, np, np, // 130 - 139
- np, np, np, np, np, np, np, np, np, np, // 140 - 149
- np, np, np, np, np, np, np, np, np, np, // 150 - 159
- np, np, np, np, np, np, np, np, np, np, // 160 - 169
- np, np, np, np, np, np, np, np, np, np, // 170 - 179
- np, np, np, np, np, np, np, np, np, np, // 180 - 189
- np, np, np, np, np, np, np, np, np, np, // 190 - 199
- np, np, np, np, np, np, np, np, np, np, // 200 - 209
- np, np, np, np, np, np, np, np, np, np, // 210 - 219
- np, np, np, np, np, np, np, np, np, np, // 220 - 229
- np, np, np, np, np, np, np, np, np, np, // 230 - 239
- np, np, np, np, np, np, np, np, np, np, // 240 - 249
- np, np, np, np, np, np // 250 - 256
- };
- static const char cFillChar = '=';
-
- std::string::size_type nLength = sString.length();
- std::string sResult;
-
- sResult.reserve(nLength);
-
- for(std::string::size_type nPos = 0; nPos < nLength; nPos++) {
- unsigned char c, c1;
-
- c = (char) DecodeTable[(unsigned char)sString[nPos]];
- nPos++;
- c1 = (char) DecodeTable[(unsigned char)sString[nPos]];
- c = (c << 2) | ((c1 >> 4) & 0x3);
- sResult.append(1, c);
-
- if(++nPos < nLength) {
- c = sString[nPos];
- if(cFillChar == c)
- break;
-
- c = (char) DecodeTable[(unsigned char)sString[nPos]];
- c1 = ((c1 << 4) & 0xf0) | ((c >> 2) & 0xf);
- sResult.append(1, c1);
- }
-
- if(++nPos < nLength) {
- c1 = sString[nPos];
- if(cFillChar == c1)
- break;
-
- c1 = (char) DecodeTable[(unsigned char)sString[nPos]];
- c = ((c << 6) & 0xc0) | c1;
- sResult.append(1, c);
- }
- }
-
- return sResult;
-}
-
-#endif // B64_BASE64_H
diff --git a/src/thirdparty/MediaInfo/ThirdParty/md5/md5.c b/src/thirdparty/MediaInfo/ThirdParty/md5/md5.c
deleted file mode 100644
index 44e7e0660..000000000
--- a/src/thirdparty/MediaInfo/ThirdParty/md5/md5.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * This code implements the MD5 message-digest algorithm.
- * The algorithm is due to Ron Rivest. This code was
- * written by Colin Plumb in 1993, no copyright is claimed.
- * This code is in the public domain; do with it what you wish.
- *
- * Equivalent code is available from RSA Data Security, Inc.
- * This code has been tested against that, and is equivalent,
- * except that you don't need to include two pages of legalese
- * with every copy.
- *
- * To compute the message digest of a chunk of bytes, declare an
- * MD5Context structure, pass it to MD5Init, call MD5Update as
- * needed on buffers full of bytes, and then call MD5Final, which
- * will fill a supplied 16-byte array with the digest.
- */
-
-#include <md5.h>
-#include <string.h>
-
-#if defined(__sparc__) || defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__)
-#define byteReverse(buf, len) /* Nothing */
-#else
-void byteReverse(unsigned char *buf, unsigned longs);
-
-#ifndef ASM_MD5
-/*
- * Note: this code is harmless on little-endian machines.
- */
-void byteReverse(unsigned char *buf, unsigned longs)
-{
- uint32_t t;
- do {
- t = (uint32_t) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
- ((unsigned) buf[1] << 8 | buf[0]);
- *(uint32_t *) buf = t;
- buf += 4;
- } while (--longs);
-}
-#endif
-#endif
-
-/*
- * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
- * initialization constants.
- */
-void MD5Init(struct MD5Context *ctx)
-{
- ctx->buf[0] = 0x67452301;
- ctx->buf[1] = 0xefcdab89;
- ctx->buf[2] = 0x98badcfe;
- ctx->buf[3] = 0x10325476;
-
- ctx->bits[0] = 0;
- ctx->bits[1] = 0;
-}
-
-/*
- * Update context to reflect the concatenation of another buffer full
- * of bytes.
- */
-void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
-{
- uint32_t t;
-
- /* Update bitcount */
-
- t = ctx->bits[0];
- if ((ctx->bits[0] = t + ((uint32_t) len << 3)) < t)
- ctx->bits[1]++; /* Carry from low to high */
- ctx->bits[1] += len >> 29;
-
- t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */
-
- /* Handle any leading odd-sized chunks */
-
- if (t) {
- unsigned char *p = (unsigned char *) ctx->in + t;
-
- t = 64 - t;
- if (len < t) {
- memcpy(p, buf, len);
- return;
- }
- memcpy(p, buf, t);
- byteReverse(ctx->in, 16);
- MD5Transform(ctx->buf, (uint32_t *) ctx->in);
- buf += t;
- len -= t;
- }
- /* Process data in 64-byte chunks */
-
- while (len >= 64) {
- memcpy(ctx->in, buf, 64);
- byteReverse(ctx->in, 16);
- MD5Transform(ctx->buf, (uint32_t *) ctx->in);
- buf += 64;
- len -= 64;
- }
-
- /* Handle any remaining bytes of data. */
-
- memcpy(ctx->in, buf, len);
-}
-
-/*
- * Final wrapup - pad to 64-byte boundary with the bit pattern
- * 1 0* (64-bit count of bits processed, MSB-first)
- */
-void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
-{
- unsigned count;
- unsigned char *p;
-
- /* Compute number of bytes mod 64 */
- count = (ctx->bits[0] >> 3) & 0x3F;
-
- /* Set the first char of padding to 0x80. This is safe since there is
- always at least one byte free */
- p = ctx->in + count;
- *p++ = 0x80;
-
- /* Bytes of padding needed to make 64 bytes */
- count = 64 - 1 - count;
-
- /* Pad out to 56 mod 64 */
- if (count < 8) {
- /* Two lots of padding: Pad the first block to 64 bytes */
- memset(p, 0, count);
- byteReverse(ctx->in, 16);
- MD5Transform(ctx->buf, (uint32_t *) ctx->in);
-
- /* Now fill the next block with 56 bytes */
- memset(ctx->in, 0, 56);
- } else {
- /* Pad block to 56 bytes */
- memset(p, 0, count - 8);
- }
- byteReverse(ctx->in, 14);
-
- /* Append length in bits and transform */
- ((uint32_t *) ctx->in)[14] = ctx->bits[0];
- ((uint32_t *) ctx->in)[15] = ctx->bits[1];
-
- MD5Transform(ctx->buf, (uint32_t *) ctx->in);
- byteReverse((unsigned char *) ctx->buf, 4);
- memcpy(digest, ctx->buf, 16);
- memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
-}
-
-#ifndef ASM_MD5
-
-/* The four core functions - F1 is optimized somewhat */
-
-/* #define F1(x, y, z) (x & y | ~x & z) */
-#define F1(x, y, z) (z ^ (x & (y ^ z)))
-#define F2(x, y, z) F1(z, x, y)
-#define F3(x, y, z) (x ^ y ^ z)
-#define F4(x, y, z) (y ^ (x | ~z))
-
-/* This is the central step in the MD5 algorithm. */
-#define MD5STEP(f, w, x, y, z, data, s) \
- ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x )
-
-/*
- * The core of the MD5 algorithm, this alters an existing MD5 hash to
- * reflect the addition of 16 longwords of new data. MD5Update blocks
- * the data and converts bytes into longwords for this routine.
- */
-void MD5Transform(uint32_t buf[4], uint32_t const in[16])
-{
- register uint32_t a, b, c, d;
-
- a = buf[0];
- b = buf[1];
- c = buf[2];
- d = buf[3];
-
- MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
- MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
- MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
- MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
- MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
- MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
- MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17);
- MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22);
- MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7);
- MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
- MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
- MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
- MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
- MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
- MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
- MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
-
- MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
- MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
- MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
- MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
- MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
- MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
- MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
- MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
- MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
- MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
- MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
- MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
- MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
- MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
- MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
- MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
-
- MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
- MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
- MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
- MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
- MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
- MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
- MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
- MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
- MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
- MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
- MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
- MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23);
- MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
- MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
- MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
- MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
-
- MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
- MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
- MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
- MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
- MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
- MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
- MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
- MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
- MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
- MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
- MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15);
- MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
- MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
- MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
- MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
- MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
-
- buf[0] += a;
- buf[1] += b;
- buf[2] += c;
- buf[3] += d;
-}
-
-#endif
diff --git a/src/thirdparty/MediaInfo/ThirdParty/md5/md5.h b/src/thirdparty/MediaInfo/ThirdParty/md5/md5.h
deleted file mode 100644
index 485452540..000000000
--- a/src/thirdparty/MediaInfo/ThirdParty/md5/md5.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef MD5_H
-#define MD5_H
-
-#if defined(_MSC_VER) && _MSC_VER < 1600
- typedef unsigned __int32 uint32_t;
-#else
- #include <stdint.h>
-#endif
-
-struct MD5Context {
- uint32_t buf[4];
- uint32_t bits[2];
- unsigned char in[64];
-};
-
-void MD5Init(struct MD5Context *context);
-void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len);
-void MD5Final(unsigned char digest[16], struct MD5Context *context);
-void MD5Transform(uint32_t buf[4], uint32_t const in[16]);
-
-#endif /* !MD5_H */
diff --git a/src/thirdparty/MediaInfo/ThirdParty/tinyxml2/tinyxml2.cpp b/src/thirdparty/MediaInfo/ThirdParty/tinyxml2/tinyxml2.cpp
deleted file mode 100644
index c273ebef6..000000000
--- a/src/thirdparty/MediaInfo/ThirdParty/tinyxml2/tinyxml2.cpp
+++ /dev/null
@@ -1,2212 +0,0 @@
-/*
-Original code by Lee Thomason (www.grinninglizard.com)
-
-This software is provided 'as-is', without any express or implied
-warranty. In no event will the authors be held liable for any
-damages arising from the use of this software.
-
-Permission is granted to anyone to use this software for any
-purpose, including commercial applications, and to alter it and
-redistribute it freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented; you must
-not claim that you wrote the original software. If you use this
-software in a product, an acknowledgment in the product documentation
-would be appreciated but is not required.
-
-2. Altered source versions must be plainly marked as such, and
-must not be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source
-distribution.
-*/
-
-#include "tinyxml2.h"
-
-#include <new> // yes, this one new style header, is in the Android SDK.
-# ifdef ANDROID_NDK
-# include <stddef.h>
-#else
-# include <cstddef>
-#endif
-
-static const char LINE_FEED = (char)0x0a; // all line endings are normalized to LF
-static const char LF = LINE_FEED;
-static const char CARRIAGE_RETURN = (char)0x0d; // CR gets filtered out
-static const char CR = CARRIAGE_RETURN;
-static const char SINGLE_QUOTE = '\'';
-static const char DOUBLE_QUOTE = '\"';
-
-// Bunch of unicode info at:
-// http://www.unicode.org/faq/utf_bom.html
-// ef bb bf (Microsoft "lead bytes") - designates UTF-8
-
-static const unsigned char TIXML_UTF_LEAD_0 = 0xefU;
-static const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;
-static const unsigned char TIXML_UTF_LEAD_2 = 0xbfU;
-
-
-#define DELETE_NODE( node ) { \
- if ( node ) { \
- MemPool* pool = node->_memPool; \
- node->~XMLNode(); \
- pool->Free( node ); \
- } \
- }
-#define DELETE_ATTRIBUTE( attrib ) { \
- if ( attrib ) { \
- MemPool* pool = attrib->_memPool; \
- attrib->~XMLAttribute(); \
- pool->Free( attrib ); \
- } \
- }
-
-namespace tinyxml2
-{
-
-struct Entity {
- const char* pattern;
- int length;
- char value;
-};
-
-static const int NUM_ENTITIES = 5;
-static const Entity entities[NUM_ENTITIES] = {
- { "quot", 4, DOUBLE_QUOTE },
- { "amp", 3, '&' },
- { "apos", 4, SINGLE_QUOTE },
- { "lt", 2, '<' },
- { "gt", 2, '>' }
-};
-
-
-StrPair::~StrPair()
-{
- Reset();
-}
-
-
-void StrPair::Reset()
-{
- if ( _flags & NEEDS_DELETE ) {
- delete [] _start;
- }
- _flags = 0;
- _start = 0;
- _end = 0;
-}
-
-
-void StrPair::SetStr( const char* str, int flags )
-{
- Reset();
- size_t len = strlen( str );
- _start = new char[ len+1 ];
- memcpy( _start, str, len+1 );
- _end = _start + len;
- _flags = flags | NEEDS_DELETE;
-}
-
-
-char* StrPair::ParseText( char* p, const char* endTag, int strFlags )
-{
- TIXMLASSERT( endTag && *endTag );
-
- char* start = p;
- char endChar = *endTag;
- size_t length = strlen( endTag );
-
- // Inner loop of text parsing.
- while ( *p ) {
- if ( *p == endChar && strncmp( p, endTag, length ) == 0 ) {
- Set( start, p, strFlags );
- return p + length;
- }
- ++p;
- }
- return 0;
-}
-
-
-char* StrPair::ParseName( char* p )
-{
- char* start = p;
-
- if ( !start || !(*start) ) {
- return 0;
- }
-
- while( *p && ( p == start ? XMLUtil::IsNameStartChar( *p ) : XMLUtil::IsNameChar( *p ) )) {
- ++p;
- }
-
- if ( p > start ) {
- Set( start, p, 0 );
- return p;
- }
- return 0;
-}
-
-
-void StrPair::CollapseWhitespace()
-{
- // Adjusting _start would cause undefined behavior on delete[]
- TIXMLASSERT( ( _flags & NEEDS_DELETE ) == 0 );
- // Trim leading space.
- _start = XMLUtil::SkipWhiteSpace( _start );
-
- if ( _start && *_start ) {
- char* p = _start; // the read pointer
- char* q = _start; // the write pointer
-
- while( *p ) {
- if ( XMLUtil::IsWhiteSpace( *p )) {
- p = XMLUtil::SkipWhiteSpace( p );
- if ( *p == 0 ) {
- break; // don't write to q; this trims the trailing space.
- }
- *q = ' ';
- ++q;
- }
- *q = *p;
- ++q;
- ++p;
- }
- *q = 0;
- }
-}
-
-
-const char* StrPair::GetStr()
-{
- if ( _flags & NEEDS_FLUSH ) {
- *_end = 0;
- _flags ^= NEEDS_FLUSH;
-
- if ( _flags ) {
- char* p = _start; // the read pointer
- char* q = _start; // the write pointer
-
- while( p < _end ) {
- if ( (_flags & NEEDS_NEWLINE_NORMALIZATION) && *p == CR ) {
- // CR-LF pair becomes LF
- // CR alone becomes LF
- // LF-CR becomes LF
- if ( *(p+1) == LF ) {
- p += 2;
- }
- else {
- ++p;
- }
- *q++ = LF;
- }
- else if ( (_flags & NEEDS_NEWLINE_NORMALIZATION) && *p == LF ) {
- if ( *(p+1) == CR ) {
- p += 2;
- }
- else {
- ++p;
- }
- *q++ = LF;
- }
- else if ( (_flags & NEEDS_ENTITY_PROCESSING) && *p == '&' ) {
- // Entities handled by tinyXML2:
- // - special entities in the entity table [in/out]
- // - numeric character reference [in]
- // &#20013; or &#x4e2d;
-
- if ( *(p+1) == '#' ) {
- const int buflen = 10;
- char buf[buflen] = { 0 };
- int len = 0;
- p = const_cast<char*>( XMLUtil::GetCharacterRef( p, buf, &len ) );
- TIXMLASSERT( 0 <= len && len <= buflen );
- TIXMLASSERT( q + len <= p );
- memcpy( q, buf, len );
- q += len;
- }
- else {
- int i=0;
- for(; i<NUM_ENTITIES; ++i ) {
- if ( strncmp( p+1, entities[i].pattern, entities[i].length ) == 0
- && *(p+entities[i].length+1) == ';' ) {
- // Found an entity convert;
- *q = entities[i].value;
- ++q;
- p += entities[i].length + 2;
- break;
- }
- }
- if ( i == NUM_ENTITIES ) {
- // fixme: treat as error?
- ++p;
- ++q;
- }
- }
- }
- else {
- *q = *p;
- ++p;
- ++q;
- }
- }
- *q = 0;
- }
- // The loop below has plenty going on, and this
- // is a less useful mode. Break it out.
- if ( _flags & COLLAPSE_WHITESPACE ) {
- CollapseWhitespace();
- }
- _flags = (_flags & NEEDS_DELETE);
- }
- return _start;
-}
-
-
-
-
-// --------- XMLUtil ----------- //
-
-const char* XMLUtil::ReadBOM( const char* p, bool* bom )
-{
- *bom = false;
- const unsigned char* pu = reinterpret_cast<const unsigned char*>(p);
- // Check for BOM:
- if ( *(pu+0) == TIXML_UTF_LEAD_0
- && *(pu+1) == TIXML_UTF_LEAD_1
- && *(pu+2) == TIXML_UTF_LEAD_2 ) {
- *bom = true;
- p += 3;
- }
- return p;
-}
-
-
-void XMLUtil::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length )
-{
- const unsigned long BYTE_MASK = 0xBF;
- const unsigned long BYTE_MARK = 0x80;
- const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
-
- if (input < 0x80) {
- *length = 1;
- }
- else if ( input < 0x800 ) {
- *length = 2;
- }
- else if ( input < 0x10000 ) {
- *length = 3;
- }
- else if ( input < 0x200000 ) {
- *length = 4;
- }
- else {
- *length = 0; // This code won't covert this correctly anyway.
- return;
- }
-
- output += *length;
-
- // Scary scary fall throughs.
- switch (*length) {
- case 4:
- --output;
- *output = (char)((input | BYTE_MARK) & BYTE_MASK);
- input >>= 6;
- case 3:
- --output;
- *output = (char)((input | BYTE_MARK) & BYTE_MASK);
- input >>= 6;
- case 2:
- --output;
- *output = (char)((input | BYTE_MARK) & BYTE_MASK);
- input >>= 6;
- case 1:
- --output;
- *output = (char)(input | FIRST_BYTE_MARK[*length]);
- default:
- break;
- }
-}
-
-
-const char* XMLUtil::GetCharacterRef( const char* p, char* value, int* length )
-{
- // Presume an entity, and pull it out.
- *length = 0;
-
- if ( *(p+1) == '#' && *(p+2) ) {
- unsigned long ucs = 0;
- ptrdiff_t delta = 0;
- unsigned mult = 1;
-
- if ( *(p+2) == 'x' ) {
- // Hexadecimal.
- if ( !*(p+3) ) {
- return 0;
- }
-
- const char* q = p+3;
- q = strchr( q, ';' );
-
- if ( !q || !*q ) {
- return 0;
- }
-
- delta = q-p;
- --q;
-
- while ( *q != 'x' ) {
- if ( *q >= '0' && *q <= '9' ) {
- ucs += mult * (*q - '0');
- }
- else if ( *q >= 'a' && *q <= 'f' ) {
- ucs += mult * (*q - 'a' + 10);
- }
- else if ( *q >= 'A' && *q <= 'F' ) {
- ucs += mult * (*q - 'A' + 10 );
- }
- else {
- return 0;
- }
- mult *= 16;
- --q;
- }
- }
- else {
- // Decimal.
- if ( !*(p+2) ) {
- return 0;
- }
-
- const char* q = p+2;
- q = strchr( q, ';' );
-
- if ( !q || !*q ) {
- return 0;
- }
-
- delta = q-p;
- --q;
-
- while ( *q != '#' ) {
- if ( *q >= '0' && *q <= '9' ) {
- ucs += mult * (*q - '0');
- }
- else {
- return 0;
- }
- mult *= 10;
- --q;
- }
- }
- // convert the UCS to UTF-8
- ConvertUTF32ToUTF8( ucs, value, length );
- return p + delta + 1;
- }
- return p+1;
-}
-
-
-void XMLUtil::ToStr( int v, char* buffer, int bufferSize )
-{
- TIXML_SNPRINTF( buffer, bufferSize, "%d", v );
-}
-
-
-void XMLUtil::ToStr( unsigned v, char* buffer, int bufferSize )
-{
- TIXML_SNPRINTF( buffer, bufferSize, "%u", v );
-}
-
-
-void XMLUtil::ToStr( bool v, char* buffer, int bufferSize )
-{
- TIXML_SNPRINTF( buffer, bufferSize, "%d", v ? 1 : 0 );
-}
-
-/*
- ToStr() of a number is a very tricky topic.
- https://github.com/leethomason/tinyxml2/issues/106
-*/
-void XMLUtil::ToStr( float v, char* buffer, int bufferSize )
-{
- TIXML_SNPRINTF( buffer, bufferSize, "%.8g", v );
-}
-
-
-void XMLUtil::ToStr( double v, char* buffer, int bufferSize )
-{
- TIXML_SNPRINTF( buffer, bufferSize, "%.17g", v );
-}
-
-
-bool XMLUtil::ToInt( const char* str, int* value )
-{
- if ( TIXML_SSCANF( str, "%d", value ) == 1 ) {
- return true;
- }
- return false;
-}
-
-bool XMLUtil::ToUnsigned( const char* str, unsigned *value )
-{
- if ( TIXML_SSCANF( str, "%u", value ) == 1 ) {
- return true;
- }
- return false;
-}
-
-bool XMLUtil::ToBool( const char* str, bool* value )
-{
- int ival = 0;
- if ( ToInt( str, &ival )) {
- *value = (ival==0) ? false : true;
- return true;
- }
- if ( StringEqual( str, "true" ) ) {
- *value = true;
- return true;
- }
- else if ( StringEqual( str, "false" ) ) {
- *value = false;
- return true;
- }
- return false;
-}
-
-
-bool XMLUtil::ToFloat( const char* str, float* value )
-{
- if ( TIXML_SSCANF( str, "%f", value ) == 1 ) {
- return true;
- }
- return false;
-}
-
-bool XMLUtil::ToDouble( const char* str, double* value )
-{
- if ( TIXML_SSCANF( str, "%lf", value ) == 1 ) {
- return true;
- }
- return false;
-}
-
-
-char* XMLDocument::Identify( char* p, XMLNode** node )
-{
- XMLNode* returnNode = 0;
- char* start = p;
- p = XMLUtil::SkipWhiteSpace( p );
- if( !p || !*p ) {
- return p;
- }
-
- // What is this thing?
- // These strings define the matching patters:
- static const char* xmlHeader = { "<?" };
- static const char* commentHeader = { "<!--" };
- static const char* dtdHeader = { "<!" };
- static const char* cdataHeader = { "<![CDATA[" };
- static const char* elementHeader = { "<" }; // and a header for everything else; check last.
-
- static const int xmlHeaderLen = 2;
- static const int commentHeaderLen = 4;
- static const int dtdHeaderLen = 2;
- static const int cdataHeaderLen = 9;
- static const int elementHeaderLen = 1;
-
-#if defined(_MSC_VER)
-#pragma warning ( push )
-#pragma warning ( disable : 4127 )
-#endif
- TIXMLASSERT( sizeof( XMLComment ) == sizeof( XMLUnknown ) ); // use same memory pool
- TIXMLASSERT( sizeof( XMLComment ) == sizeof( XMLDeclaration ) ); // use same memory pool
-#if defined(_MSC_VER)
-#pragma warning (pop)
-#endif
- if ( XMLUtil::StringEqual( p, xmlHeader, xmlHeaderLen ) ) {
- returnNode = new (_commentPool.Alloc()) XMLDeclaration( this );
- returnNode->_memPool = &_commentPool;
- p += xmlHeaderLen;
- }
- else if ( XMLUtil::StringEqual( p, commentHeader, commentHeaderLen ) ) {
- returnNode = new (_commentPool.Alloc()) XMLComment( this );
- returnNode->_memPool = &_commentPool;
- p += commentHeaderLen;
- }
- else if ( XMLUtil::StringEqual( p, cdataHeader, cdataHeaderLen ) ) {
- XMLText* text = new (_textPool.Alloc()) XMLText( this );
- returnNode = text;
- returnNode->_memPool = &_textPool;
- p += cdataHeaderLen;
- text->SetCData( true );
- }
- else if ( XMLUtil::StringEqual( p, dtdHeader, dtdHeaderLen ) ) {
- returnNode = new (_commentPool.Alloc()) XMLUnknown( this );
- returnNode->_memPool = &_commentPool;
- p += dtdHeaderLen;
- }
- else if ( XMLUtil::StringEqual( p, elementHeader, elementHeaderLen ) ) {
- returnNode = new (_elementPool.Alloc()) XMLElement( this );
- returnNode->_memPool = &_elementPool;
- p += elementHeaderLen;
- }
- else {
- returnNode = new (_textPool.Alloc()) XMLText( this );
- returnNode->_memPool = &_textPool;
- p = start; // Back it up, all the text counts.
- }
-
- *node = returnNode;
- return p;
-}
-
-
-bool XMLDocument::Accept( XMLVisitor* visitor ) const
-{
- if ( visitor->VisitEnter( *this ) ) {
- for ( const XMLNode* node=FirstChild(); node; node=node->NextSibling() ) {
- if ( !node->Accept( visitor ) ) {
- break;
- }
- }
- }
- return visitor->VisitExit( *this );
-}
-
-
-// --------- XMLNode ----------- //
-
-XMLNode::XMLNode( XMLDocument* doc ) :
- _document( doc ),
- _parent( 0 ),
- _firstChild( 0 ), _lastChild( 0 ),
- _prev( 0 ), _next( 0 ),
- _memPool( 0 )
-{
-}
-
-
-XMLNode::~XMLNode()
-{
- DeleteChildren();
- if ( _parent ) {
- _parent->Unlink( this );
- }
-}
-
-const char* XMLNode::Value() const
-{
- return _value.GetStr();
-}
-
-void XMLNode::SetValue( const char* str, bool staticMem )
-{
- if ( staticMem ) {
- _value.SetInternedStr( str );
- }
- else {
- _value.SetStr( str );
- }
-}
-
-
-void XMLNode::DeleteChildren()
-{
- while( _firstChild ) {
- XMLNode* node = _firstChild;
- Unlink( node );
-
- DELETE_NODE( node );
- }
- _firstChild = _lastChild = 0;
-}
-
-
-void XMLNode::Unlink( XMLNode* child )
-{
- if ( child == _firstChild ) {
- _firstChild = _firstChild->_next;
- }
- if ( child == _lastChild ) {
- _lastChild = _lastChild->_prev;
- }
-
- if ( child->_prev ) {
- child->_prev->_next = child->_next;
- }
- if ( child->_next ) {
- child->_next->_prev = child->_prev;
- }
- child->_parent = 0;
-}
-
-
-void XMLNode::DeleteChild( XMLNode* node )
-{
- TIXMLASSERT( node->_parent == this );
- DELETE_NODE( node );
-}
-
-
-XMLNode* XMLNode::InsertEndChild( XMLNode* addThis )
-{
- if (addThis->_document != _document)
- return 0;
-
- if (addThis->_parent)
- addThis->_parent->Unlink( addThis );
- else
- addThis->_memPool->SetTracked();
-
- if ( _lastChild ) {
- TIXMLASSERT( _firstChild );
- TIXMLASSERT( _lastChild->_next == 0 );
- _lastChild->_next = addThis;
- addThis->_prev = _lastChild;
- _lastChild = addThis;
-
- addThis->_next = 0;
- }
- else {
- TIXMLASSERT( _firstChild == 0 );
- _firstChild = _lastChild = addThis;
-
- addThis->_prev = 0;
- addThis->_next = 0;
- }
- addThis->_parent = this;
- return addThis;
-}
-
-
-XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis )
-{
- if (addThis->_document != _document)
- return 0;
-
- if (addThis->_parent)
- addThis->_parent->Unlink( addThis );
- else
- addThis->_memPool->SetTracked();
-
- if ( _firstChild ) {
- TIXMLASSERT( _lastChild );
- TIXMLASSERT( _firstChild->_prev == 0 );
-
- _firstChild->_prev = addThis;
- addThis->_next = _firstChild;
- _firstChild = addThis;
-
- addThis->_prev = 0;
- }
- else {
- TIXMLASSERT( _lastChild == 0 );
- _firstChild = _lastChild = addThis;
-
- addThis->_prev = 0;
- addThis->_next = 0;
- }
- addThis->_parent = this;
- return addThis;
-}
-
-
-XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis )
-{
- if (addThis->_document != _document)
- return 0;
-
- TIXMLASSERT( afterThis->_parent == this );
-
- if ( afterThis->_parent != this ) {
- return 0;
- }
-
- if ( afterThis->_next == 0 ) {
- // The last node or the only node.
- return InsertEndChild( addThis );
- }
- if (addThis->_parent)
- addThis->_parent->Unlink( addThis );
- else
- addThis->_memPool->SetTracked();
- addThis->_prev = afterThis;
- addThis->_next = afterThis->_next;
- afterThis->_next->_prev = addThis;
- afterThis->_next = addThis;
- addThis->_parent = this;
- return addThis;
-}
-
-
-
-
-const XMLElement* XMLNode::FirstChildElement( const char* value ) const
-{
- for( XMLNode* node=_firstChild; node; node=node->_next ) {
- XMLElement* element = node->ToElement();
- if ( element ) {
- if ( !value || XMLUtil::StringEqual( element->Name(), value ) ) {
- return element;
- }
- }
- }
- return 0;
-}
-
-
-const XMLElement* XMLNode::LastChildElement( const char* value ) const
-{
- for( XMLNode* node=_lastChild; node; node=node->_prev ) {
- XMLElement* element = node->ToElement();
- if ( element ) {
- if ( !value || XMLUtil::StringEqual( element->Name(), value ) ) {
- return element;
- }
- }
- }
- return 0;
-}
-
-
-const XMLElement* XMLNode::NextSiblingElement( const char* value ) const
-{
- for( XMLNode* node=this->_next; node; node = node->_next ) {
- const XMLElement* element = node->ToElement();
- if ( element
- && (!value || XMLUtil::StringEqual( value, node->Value() ))) {
- return element;
- }
- }
- return 0;
-}
-
-
-const XMLElement* XMLNode::PreviousSiblingElement( const char* value ) const
-{
- for( XMLNode* node=_prev; node; node = node->_prev ) {
- const XMLElement* element = node->ToElement();
- if ( element
- && (!value || XMLUtil::StringEqual( value, node->Value() ))) {
- return element;
- }
- }
- return 0;
-}
-
-
-char* XMLNode::ParseDeep( char* p, StrPair* parentEnd )
-{
- // This is a recursive method, but thinking about it "at the current level"
- // it is a pretty simple flat list:
- // <foo/>
- // <!-- comment -->
- //
- // With a special case:
- // <foo>
- // </foo>
- // <!-- comment -->
- //
- // Where the closing element (/foo) *must* be the next thing after the opening
- // element, and the names must match. BUT the tricky bit is that the closing
- // element will be read by the child.
- //
- // 'endTag' is the end tag for this node, it is returned by a call to a child.
- // 'parentEnd' is the end tag for the parent, which is filled in and returned.
-
- while( p && *p ) {
- XMLNode* node = 0;
-
- p = _document->Identify( p, &node );
- if ( p == 0 || node == 0 ) {
- break;
- }
-
- StrPair endTag;
- p = node->ParseDeep( p, &endTag );
- if ( !p ) {
- DELETE_NODE( node );
- node = 0;
- if ( !_document->Error() ) {
- _document->SetError( XML_ERROR_PARSING, 0, 0 );
- }
- break;
- }
-
- XMLElement* ele = node->ToElement();
- // We read the end tag. Return it to the parent.
- if ( ele && ele->ClosingType() == XMLElement::CLOSING ) {
- if ( parentEnd ) {
- *parentEnd = static_cast<XMLElement*>(node)->_value;
- }
- node->_memPool->SetTracked(); // created and then immediately deleted.
- DELETE_NODE( node );
- return p;
- }
-
- // Handle an end tag returned to this level.
- // And handle a bunch of annoying errors.
- if ( ele ) {
- if ( endTag.Empty() && ele->ClosingType() == XMLElement::OPEN ) {
- _document->SetError( XML_ERROR_MISMATCHED_ELEMENT, node->Value(), 0 );
- p = 0;
- }
- else if ( !endTag.Empty() && ele->ClosingType() != XMLElement::OPEN ) {
- _document->SetError( XML_ERROR_MISMATCHED_ELEMENT, node->Value(), 0 );
- p = 0;
- }
- else if ( !endTag.Empty() ) {
- if ( !XMLUtil::StringEqual( endTag.GetStr(), node->Value() )) {
- _document->SetError( XML_ERROR_MISMATCHED_ELEMENT, node->Value(), 0 );
- p = 0;
- }
- }
- }
- if ( p == 0 ) {
- DELETE_NODE( node );
- node = 0;
- }
- if ( node ) {
- this->InsertEndChild( node );
- }
- }
- return 0;
-}
-
-// --------- XMLText ---------- //
-char* XMLText::ParseDeep( char* p, StrPair* )
-{
- const char* start = p;
- if ( this->CData() ) {
- p = _value.ParseText( p, "]]>", StrPair::NEEDS_NEWLINE_NORMALIZATION );
- if ( !p ) {
- _document->SetError( XML_ERROR_PARSING_CDATA, start, 0 );
- }
- return p;
- }
- else {
- int flags = _document->ProcessEntities() ? StrPair::TEXT_ELEMENT : StrPair::TEXT_ELEMENT_LEAVE_ENTITIES;
- if ( _document->WhitespaceMode() == COLLAPSE_WHITESPACE ) {
- flags |= StrPair::COLLAPSE_WHITESPACE;
- }
-
- p = _value.ParseText( p, "<", flags );
- if ( !p ) {
- _document->SetError( XML_ERROR_PARSING_TEXT, start, 0 );
- }
- if ( p && *p ) {
- return p-1;
- }
- }
- return 0;
-}
-
-
-XMLNode* XMLText::ShallowClone( XMLDocument* doc ) const
-{
- if ( !doc ) {
- doc = _document;
- }
- XMLText* text = doc->NewText( Value() ); // fixme: this will always allocate memory. Intern?
- text->SetCData( this->CData() );
- return text;
-}
-
-
-bool XMLText::ShallowEqual( const XMLNode* compare ) const
-{
- return ( compare->ToText() && XMLUtil::StringEqual( compare->ToText()->Value(), Value() ));
-}
-
-
-bool XMLText::Accept( XMLVisitor* visitor ) const
-{
- return visitor->Visit( *this );
-}
-
-
-// --------- XMLComment ---------- //
-
-XMLComment::XMLComment( XMLDocument* doc ) : XMLNode( doc )
-{
-}
-
-
-XMLComment::~XMLComment()
-{
-}
-
-
-char* XMLComment::ParseDeep( char* p, StrPair* )
-{
- // Comment parses as text.
- const char* start = p;
- p = _value.ParseText( p, "-->", StrPair::COMMENT );
- if ( p == 0 ) {
- _document->SetError( XML_ERROR_PARSING_COMMENT, start, 0 );
- }
- return p;
-}
-
-
-XMLNode* XMLComment::ShallowClone( XMLDocument* doc ) const
-{
- if ( !doc ) {
- doc = _document;
- }
- XMLComment* comment = doc->NewComment( Value() ); // fixme: this will always allocate memory. Intern?
- return comment;
-}
-
-
-bool XMLComment::ShallowEqual( const XMLNode* compare ) const
-{
- const XMLComment* comment = compare->ToComment();
- return ( comment && XMLUtil::StringEqual( comment->Value(), Value() ));
-}
-
-
-bool XMLComment::Accept( XMLVisitor* visitor ) const
-{
- return visitor->Visit( *this );
-}
-
-
-// --------- XMLDeclaration ---------- //
-
-XMLDeclaration::XMLDeclaration( XMLDocument* doc ) : XMLNode( doc )
-{
-}
-
-
-XMLDeclaration::~XMLDeclaration()
-{
- //printf( "~XMLDeclaration\n" );
-}
-
-
-char* XMLDeclaration::ParseDeep( char* p, StrPair* )
-{
- // Declaration parses as text.
- const char* start = p;
- p = _value.ParseText( p, "?>", StrPair::NEEDS_NEWLINE_NORMALIZATION );
- if ( p == 0 ) {
- _document->SetError( XML_ERROR_PARSING_DECLARATION, start, 0 );
- }
- return p;
-}
-
-
-XMLNode* XMLDeclaration::ShallowClone( XMLDocument* doc ) const
-{
- if ( !doc ) {
- doc = _document;
- }
- XMLDeclaration* dec = doc->NewDeclaration( Value() ); // fixme: this will always allocate memory. Intern?
- return dec;
-}
-
-
-bool XMLDeclaration::ShallowEqual( const XMLNode* compare ) const
-{
- const XMLDeclaration* declaration = compare->ToDeclaration();
- return ( declaration && XMLUtil::StringEqual( declaration->Value(), Value() ));
-}
-
-
-
-bool XMLDeclaration::Accept( XMLVisitor* visitor ) const
-{
- return visitor->Visit( *this );
-}
-
-// --------- XMLUnknown ---------- //
-
-XMLUnknown::XMLUnknown( XMLDocument* doc ) : XMLNode( doc )
-{
-}
-
-
-XMLUnknown::~XMLUnknown()
-{
-}
-
-
-char* XMLUnknown::ParseDeep( char* p, StrPair* )
-{
- // Unknown parses as text.
- const char* start = p;
-
- p = _value.ParseText( p, ">", StrPair::NEEDS_NEWLINE_NORMALIZATION );
- if ( !p ) {
- _document->SetError( XML_ERROR_PARSING_UNKNOWN, start, 0 );
- }
- return p;
-}
-
-
-XMLNode* XMLUnknown::ShallowClone( XMLDocument* doc ) const
-{
- if ( !doc ) {
- doc = _document;
- }
- XMLUnknown* text = doc->NewUnknown( Value() ); // fixme: this will always allocate memory. Intern?
- return text;
-}
-
-
-bool XMLUnknown::ShallowEqual( const XMLNode* compare ) const
-{
- const XMLUnknown* unknown = compare->ToUnknown();
- return ( unknown && XMLUtil::StringEqual( unknown->Value(), Value() ));
-}
-
-
-bool XMLUnknown::Accept( XMLVisitor* visitor ) const
-{
- return visitor->Visit( *this );
-}
-
-// --------- XMLAttribute ---------- //
-
-const char* XMLAttribute::Name() const
-{
- return _name.GetStr();
-}
-
-const char* XMLAttribute::Value() const
-{
- return _value.GetStr();
-}
-
-char* XMLAttribute::ParseDeep( char* p, bool processEntities )
-{
- // Parse using the name rules: bug fix, was using ParseText before
- p = _name.ParseName( p );
- if ( !p || !*p ) {
- return 0;
- }
-
- // Skip white space before =
- p = XMLUtil::SkipWhiteSpace( p );
- if ( !p || *p != '=' ) {
- return 0;
- }
-
- ++p; // move up to opening quote
- p = XMLUtil::SkipWhiteSpace( p );
- if ( *p != '\"' && *p != '\'' ) {
- return 0;
- }
-
- char endTag[2] = { *p, 0 };
- ++p; // move past opening quote
-
- p = _value.ParseText( p, endTag, processEntities ? StrPair::ATTRIBUTE_VALUE : StrPair::ATTRIBUTE_VALUE_LEAVE_ENTITIES );
- return p;
-}
-
-
-void XMLAttribute::SetName( const char* n )
-{
- _name.SetStr( n );
-}
-
-
-XMLError XMLAttribute::QueryIntValue( int* value ) const
-{
- if ( XMLUtil::ToInt( Value(), value )) {
- return XML_NO_ERROR;
- }
- return XML_WRONG_ATTRIBUTE_TYPE;
-}
-
-
-XMLError XMLAttribute::QueryUnsignedValue( unsigned int* value ) const
-{
- if ( XMLUtil::ToUnsigned( Value(), value )) {
- return XML_NO_ERROR;
- }
- return XML_WRONG_ATTRIBUTE_TYPE;
-}
-
-
-XMLError XMLAttribute::QueryBoolValue( bool* value ) const
-{
- if ( XMLUtil::ToBool( Value(), value )) {
- return XML_NO_ERROR;
- }
- return XML_WRONG_ATTRIBUTE_TYPE;
-}
-
-
-XMLError XMLAttribute::QueryFloatValue( float* value ) const
-{
- if ( XMLUtil::ToFloat( Value(), value )) {
- return XML_NO_ERROR;
- }
- return XML_WRONG_ATTRIBUTE_TYPE;
-}
-
-
-XMLError XMLAttribute::QueryDoubleValue( double* value ) const
-{
- if ( XMLUtil::ToDouble( Value(), value )) {
- return XML_NO_ERROR;
- }
- return XML_WRONG_ATTRIBUTE_TYPE;
-}
-
-
-void XMLAttribute::SetAttribute( const char* v )
-{
- _value.SetStr( v );
-}
-
-
-void XMLAttribute::SetAttribute( int v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- _value.SetStr( buf );
-}
-
-
-void XMLAttribute::SetAttribute( unsigned v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- _value.SetStr( buf );
-}
-
-
-void XMLAttribute::SetAttribute( bool v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- _value.SetStr( buf );
-}
-
-void XMLAttribute::SetAttribute( double v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- _value.SetStr( buf );
-}
-
-void XMLAttribute::SetAttribute( float v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- _value.SetStr( buf );
-}
-
-
-// --------- XMLElement ---------- //
-XMLElement::XMLElement( XMLDocument* doc ) : XMLNode( doc ),
- _closingType( 0 ),
- _rootAttribute( 0 )
-{
-}
-
-
-XMLElement::~XMLElement()
-{
- while( _rootAttribute ) {
- XMLAttribute* next = _rootAttribute->_next;
- DELETE_ATTRIBUTE( _rootAttribute );
- _rootAttribute = next;
- }
-}
-
-
-XMLAttribute* XMLElement::FindAttribute( const char* name )
-{
- XMLAttribute* a = 0;
- for( a=_rootAttribute; a; a = a->_next ) {
- if ( XMLUtil::StringEqual( a->Name(), name ) ) {
- return a;
- }
- }
- return 0;
-}
-
-
-const XMLAttribute* XMLElement::FindAttribute( const char* name ) const
-{
- XMLAttribute* a = 0;
- for( a=_rootAttribute; a; a = a->_next ) {
- if ( XMLUtil::StringEqual( a->Name(), name ) ) {
- return a;
- }
- }
- return 0;
-}
-
-
-const char* XMLElement::Attribute( const char* name, const char* value ) const
-{
- const XMLAttribute* a = FindAttribute( name );
- if ( !a ) {
- return 0;
- }
- if ( !value || XMLUtil::StringEqual( a->Value(), value )) {
- return a->Value();
- }
- return 0;
-}
-
-
-const char* XMLElement::GetText() const
-{
- if ( FirstChild() && FirstChild()->ToText() ) {
- return FirstChild()->ToText()->Value();
- }
- return 0;
-}
-
-
-void XMLElement::SetText( const char* inText )
-{
- if ( FirstChild() && FirstChild()->ToText() )
- FirstChild()->SetValue( inText );
- else {
- XMLText* theText = GetDocument()->NewText( inText );
- InsertFirstChild( theText );
- }
-}
-
-
-void XMLElement::SetText( int v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- SetText( buf );
-}
-
-
-void XMLElement::SetText( unsigned v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- SetText( buf );
-}
-
-
-void XMLElement::SetText( bool v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- SetText( buf );
-}
-
-
-void XMLElement::SetText( float v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- SetText( buf );
-}
-
-
-void XMLElement::SetText( double v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- SetText( buf );
-}
-
-
-XMLError XMLElement::QueryIntText( int* ival ) const
-{
- if ( FirstChild() && FirstChild()->ToText() ) {
- const char* t = FirstChild()->ToText()->Value();
- if ( XMLUtil::ToInt( t, ival ) ) {
- return XML_SUCCESS;
- }
- return XML_CAN_NOT_CONVERT_TEXT;
- }
- return XML_NO_TEXT_NODE;
-}
-
-
-XMLError XMLElement::QueryUnsignedText( unsigned* uval ) const
-{
- if ( FirstChild() && FirstChild()->ToText() ) {
- const char* t = FirstChild()->ToText()->Value();
- if ( XMLUtil::ToUnsigned( t, uval ) ) {
- return XML_SUCCESS;
- }
- return XML_CAN_NOT_CONVERT_TEXT;
- }
- return XML_NO_TEXT_NODE;
-}
-
-
-XMLError XMLElement::QueryBoolText( bool* bval ) const
-{
- if ( FirstChild() && FirstChild()->ToText() ) {
- const char* t = FirstChild()->ToText()->Value();
- if ( XMLUtil::ToBool( t, bval ) ) {
- return XML_SUCCESS;
- }
- return XML_CAN_NOT_CONVERT_TEXT;
- }
- return XML_NO_TEXT_NODE;
-}
-
-
-XMLError XMLElement::QueryDoubleText( double* dval ) const
-{
- if ( FirstChild() && FirstChild()->ToText() ) {
- const char* t = FirstChild()->ToText()->Value();
- if ( XMLUtil::ToDouble( t, dval ) ) {
- return XML_SUCCESS;
- }
- return XML_CAN_NOT_CONVERT_TEXT;
- }
- return XML_NO_TEXT_NODE;
-}
-
-
-XMLError XMLElement::QueryFloatText( float* fval ) const
-{
- if ( FirstChild() && FirstChild()->ToText() ) {
- const char* t = FirstChild()->ToText()->Value();
- if ( XMLUtil::ToFloat( t, fval ) ) {
- return XML_SUCCESS;
- }
- return XML_CAN_NOT_CONVERT_TEXT;
- }
- return XML_NO_TEXT_NODE;
-}
-
-
-
-XMLAttribute* XMLElement::FindOrCreateAttribute( const char* name )
-{
- XMLAttribute* last = 0;
- XMLAttribute* attrib = 0;
- for( attrib = _rootAttribute;
- attrib;
- last = attrib, attrib = attrib->_next ) {
- if ( XMLUtil::StringEqual( attrib->Name(), name ) ) {
- break;
- }
- }
- if ( !attrib ) {
- attrib = new (_document->_attributePool.Alloc() ) XMLAttribute();
- attrib->_memPool = &_document->_attributePool;
- if ( last ) {
- last->_next = attrib;
- }
- else {
- _rootAttribute = attrib;
- }
- attrib->SetName( name );
- attrib->_memPool->SetTracked(); // always created and linked.
- }
- return attrib;
-}
-
-
-void XMLElement::DeleteAttribute( const char* name )
-{
- XMLAttribute* prev = 0;
- for( XMLAttribute* a=_rootAttribute; a; a=a->_next ) {
- if ( XMLUtil::StringEqual( name, a->Name() ) ) {
- if ( prev ) {
- prev->_next = a->_next;
- }
- else {
- _rootAttribute = a->_next;
- }
- DELETE_ATTRIBUTE( a );
- break;
- }
- prev = a;
- }
-}
-
-
-char* XMLElement::ParseAttributes( char* p )
-{
- const char* start = p;
- XMLAttribute* prevAttribute = 0;
-
- // Read the attributes.
- while( p ) {
- p = XMLUtil::SkipWhiteSpace( p );
- if ( !p || !(*p) ) {
- _document->SetError( XML_ERROR_PARSING_ELEMENT, start, Name() );
- return 0;
- }
-
- // attribute.
- if (XMLUtil::IsNameStartChar( *p ) ) {
- XMLAttribute* attrib = new (_document->_attributePool.Alloc() ) XMLAttribute();
- attrib->_memPool = &_document->_attributePool;
- attrib->_memPool->SetTracked();
-
- p = attrib->ParseDeep( p, _document->ProcessEntities() );
- if ( !p || Attribute( attrib->Name() ) ) {
- DELETE_ATTRIBUTE( attrib );
- _document->SetError( XML_ERROR_PARSING_ATTRIBUTE, start, p );
- return 0;
- }
- // There is a minor bug here: if the attribute in the source xml
- // document is duplicated, it will not be detected and the
- // attribute will be doubly added. However, tracking the 'prevAttribute'
- // avoids re-scanning the attribute list. Preferring performance for
- // now, may reconsider in the future.
- if ( prevAttribute ) {
- prevAttribute->_next = attrib;
- }
- else {
- _rootAttribute = attrib;
- }
- prevAttribute = attrib;
- }
- // end of the tag
- else if ( *p == '/' && *(p+1) == '>' ) {
- _closingType = CLOSED;
- return p+2; // done; sealed element.
- }
- // end of the tag
- else if ( *p == '>' ) {
- ++p;
- break;
- }
- else {
- _document->SetError( XML_ERROR_PARSING_ELEMENT, start, p );
- return 0;
- }
- }
- return p;
-}
-
-
-//
-// <ele></ele>
-// <ele>foo<b>bar</b></ele>
-//
-char* XMLElement::ParseDeep( char* p, StrPair* strPair )
-{
- // Read the element name.
- p = XMLUtil::SkipWhiteSpace( p );
- if ( !p ) {
- return 0;
- }
-
- // The closing element is the </element> form. It is
- // parsed just like a regular element then deleted from
- // the DOM.
- if ( *p == '/' ) {
- _closingType = CLOSING;
- ++p;
- }
-
- p = _value.ParseName( p );
- if ( _value.Empty() ) {
- return 0;
- }
-
- p = ParseAttributes( p );
- if ( !p || !*p || _closingType ) {
- return p;
- }
-
- p = XMLNode::ParseDeep( p, strPair );
- return p;
-}
-
-
-
-XMLNode* XMLElement::ShallowClone( XMLDocument* doc ) const
-{
- if ( !doc ) {
- doc = _document;
- }
- XMLElement* element = doc->NewElement( Value() ); // fixme: this will always allocate memory. Intern?
- for( const XMLAttribute* a=FirstAttribute(); a; a=a->Next() ) {
- element->SetAttribute( a->Name(), a->Value() ); // fixme: this will always allocate memory. Intern?
- }
- return element;
-}
-
-
-bool XMLElement::ShallowEqual( const XMLNode* compare ) const
-{
- const XMLElement* other = compare->ToElement();
- if ( other && XMLUtil::StringEqual( other->Value(), Value() )) {
-
- const XMLAttribute* a=FirstAttribute();
- const XMLAttribute* b=other->FirstAttribute();
-
- while ( a && b ) {
- if ( !XMLUtil::StringEqual( a->Value(), b->Value() ) ) {
- return false;
- }
- a = a->Next();
- b = b->Next();
- }
- if ( a || b ) {
- // different count
- return false;
- }
- return true;
- }
- return false;
-}
-
-
-bool XMLElement::Accept( XMLVisitor* visitor ) const
-{
- if ( visitor->VisitEnter( *this, _rootAttribute ) ) {
- for ( const XMLNode* node=FirstChild(); node; node=node->NextSibling() ) {
- if ( !node->Accept( visitor ) ) {
- break;
- }
- }
- }
- return visitor->VisitExit( *this );
-}
-
-
-// --------- XMLDocument ----------- //
-XMLDocument::XMLDocument( bool processEntities, Whitespace whitespace ) :
- XMLNode( 0 ),
- _writeBOM( false ),
- _processEntities( processEntities ),
- _errorID( XML_NO_ERROR ),
- _whitespace( whitespace ),
- _errorStr1( 0 ),
- _errorStr2( 0 ),
- _charBuffer( 0 )
-{
- _document = this; // avoid warning about 'this' in initializer list
-}
-
-
-XMLDocument::~XMLDocument()
-{
- DeleteChildren();
- delete [] _charBuffer;
-
-#if 0
- _textPool.Trace( "text" );
- _elementPool.Trace( "element" );
- _commentPool.Trace( "comment" );
- _attributePool.Trace( "attribute" );
-#endif
-
-#ifdef DEBUG
- if ( Error() == false ) {
- TIXMLASSERT( _elementPool.CurrentAllocs() == _elementPool.Untracked() );
- TIXMLASSERT( _attributePool.CurrentAllocs() == _attributePool.Untracked() );
- TIXMLASSERT( _textPool.CurrentAllocs() == _textPool.Untracked() );
- TIXMLASSERT( _commentPool.CurrentAllocs() == _commentPool.Untracked() );
- }
-#endif
-}
-
-
-void XMLDocument::Clear()
-{
- DeleteChildren();
-
- _errorID = XML_NO_ERROR;
- _errorStr1 = 0;
- _errorStr2 = 0;
-
- delete [] _charBuffer;
- _charBuffer = 0;
-}
-
-
-XMLElement* XMLDocument::NewElement( const char* name )
-{
- XMLElement* ele = new (_elementPool.Alloc()) XMLElement( this );
- ele->_memPool = &_elementPool;
- ele->SetName( name );
- return ele;
-}
-
-
-XMLComment* XMLDocument::NewComment( const char* str )
-{
- XMLComment* comment = new (_commentPool.Alloc()) XMLComment( this );
- comment->_memPool = &_commentPool;
- comment->SetValue( str );
- return comment;
-}
-
-
-XMLText* XMLDocument::NewText( const char* str )
-{
- XMLText* text = new (_textPool.Alloc()) XMLText( this );
- text->_memPool = &_textPool;
- text->SetValue( str );
- return text;
-}
-
-
-XMLDeclaration* XMLDocument::NewDeclaration( const char* str )
-{
- XMLDeclaration* dec = new (_commentPool.Alloc()) XMLDeclaration( this );
- dec->_memPool = &_commentPool;
- dec->SetValue( str ? str : "xml version=\"1.0\" encoding=\"UTF-8\"" );
- return dec;
-}
-
-
-XMLUnknown* XMLDocument::NewUnknown( const char* str )
-{
- XMLUnknown* unk = new (_commentPool.Alloc()) XMLUnknown( this );
- unk->_memPool = &_commentPool;
- unk->SetValue( str );
- return unk;
-}
-
-static FILE* callfopen( const char* filepath, const char* mode )
-{
-#if defined(_MSC_VER) && (_MSC_VER >= 1400 ) && (!defined WINCE)
- FILE* fp = 0;
- errno_t err = fopen_s( &fp, filepath, mode );
- if ( err ) {
- return 0;
- }
-#else
- FILE* fp = fopen( filepath, mode );
-#endif
- return fp;
-}
-
-XMLError XMLDocument::LoadFile( const char* filename )
-{
- Clear();
- FILE* fp = callfopen( filename, "rb" );
- if ( !fp ) {
- SetError( XML_ERROR_FILE_NOT_FOUND, filename, 0 );
- return _errorID;
- }
- LoadFile( fp );
- fclose( fp );
- return _errorID;
-}
-
-
-XMLError XMLDocument::LoadFile( FILE* fp )
-{
- Clear();
-
- fseek( fp, 0, SEEK_SET );
- if ( fgetc( fp ) == EOF && ferror( fp ) != 0 ) {
- SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 );
- return _errorID;
- }
-
- fseek( fp, 0, SEEK_END );
- const long filelength = ftell( fp );
- fseek( fp, 0, SEEK_SET );
- if ( filelength == -1L ) {
- SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 );
- return _errorID;
- }
-
- const size_t size = filelength;
- if ( size == 0 ) {
- SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
- return _errorID;
- }
-
- _charBuffer = new char[size+1];
- size_t read = fread( _charBuffer, 1, size, fp );
- if ( read != size ) {
- SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 );
- return _errorID;
- }
-
- _charBuffer[size] = 0;
-
- const char* p = _charBuffer;
- p = XMLUtil::SkipWhiteSpace( p );
- p = XMLUtil::ReadBOM( p, &_writeBOM );
- if ( !p || !*p ) {
- SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
- return _errorID;
- }
-
- ParseDeep( _charBuffer + (p-_charBuffer), 0 );
- return _errorID;
-}
-
-
-XMLError XMLDocument::SaveFile( const char* filename, bool compact )
-{
- FILE* fp = callfopen( filename, "w" );
- if ( !fp ) {
- SetError( XML_ERROR_FILE_COULD_NOT_BE_OPENED, filename, 0 );
- return _errorID;
- }
- SaveFile(fp, compact);
- fclose( fp );
- return _errorID;
-}
-
-
-XMLError XMLDocument::SaveFile( FILE* fp, bool compact )
-{
- XMLPrinter stream( fp, compact );
- Print( &stream );
- return _errorID;
-}
-
-
-XMLError XMLDocument::Parse( const char* p, size_t len )
-{
- const char* start = p;
- Clear();
-
- if ( len == 0 || !p || !*p ) {
- SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
- return _errorID;
- }
- if ( len == (size_t)(-1) ) {
- len = strlen( p );
- }
- _charBuffer = new char[ len+1 ];
- memcpy( _charBuffer, p, len );
- _charBuffer[len] = 0;
-
- p = XMLUtil::SkipWhiteSpace( p );
- p = XMLUtil::ReadBOM( p, &_writeBOM );
- if ( !p || !*p ) {
- SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
- return _errorID;
- }
-
- ptrdiff_t delta = p - start; // skip initial whitespace, BOM, etc.
- ParseDeep( _charBuffer+delta, 0 );
- return _errorID;
-}
-
-
-void XMLDocument::Print( XMLPrinter* streamer ) const
-{
- XMLPrinter stdStreamer( stdout );
- if ( !streamer ) {
- streamer = &stdStreamer;
- }
- Accept( streamer );
-}
-
-
-void XMLDocument::SetError( XMLError error, const char* str1, const char* str2 )
-{
- _errorID = error;
- _errorStr1 = str1;
- _errorStr2 = str2;
-}
-
-
-void XMLDocument::PrintError() const
-{
- if ( _errorID ) {
- static const int LEN = 20;
- char buf1[LEN] = { 0 };
- char buf2[LEN] = { 0 };
-
- if ( _errorStr1 ) {
- TIXML_SNPRINTF( buf1, LEN, "%s", _errorStr1 );
- }
- if ( _errorStr2 ) {
- TIXML_SNPRINTF( buf2, LEN, "%s", _errorStr2 );
- }
-
- printf( "XMLDocument error id=%d str1=%s str2=%s\n",
- _errorID, buf1, buf2 );
- }
-}
-
-
-XMLPrinter::XMLPrinter( FILE* file, bool compact, int depth ) :
- _elementJustOpened( false ),
- _firstElement( true ),
- _fp( file ),
- _depth( depth ),
- _textDepth( -1 ),
- _processEntities( true ),
- _compactMode( compact )
-{
- for( int i=0; i<ENTITY_RANGE; ++i ) {
- _entityFlag[i] = false;
- _restrictedEntityFlag[i] = false;
- }
- for( int i=0; i<NUM_ENTITIES; ++i ) {
- TIXMLASSERT( entities[i].value < ENTITY_RANGE );
- if ( entities[i].value < ENTITY_RANGE ) {
- _entityFlag[ (int)entities[i].value ] = true;
- }
- }
- _restrictedEntityFlag[(int)'&'] = true;
- _restrictedEntityFlag[(int)'<'] = true;
- _restrictedEntityFlag[(int)'>'] = true; // not required, but consistency is nice
- _buffer.Push( 0 );
-}
-
-
-void XMLPrinter::Print( const char* format, ... )
-{
- va_list va;
- va_start( va, format );
-
- if ( _fp ) {
- vfprintf( _fp, format, va );
- }
- else {
-#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
- #if defined(WINCE)
- int len = 512;
- do {
- len = len*2;
- char* str = new char[len]();
- len = _vsnprintf(str, len, format, va);
- delete[] str;
- }while (len < 0);
- #else
- int len = _vscprintf( format, va );
- #endif
-#else
- int len = vsnprintf( 0, 0, format, va );
-#endif
- // Close out and re-start the va-args
- va_end( va );
- va_start( va, format );
- char* p = _buffer.PushArr( len ) - 1; // back up over the null terminator.
-#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
- #if defined(WINCE)
- _vsnprintf( p, len+1, format, va );
- #else
- vsnprintf_s( p, len+1, _TRUNCATE, format, va );
- #endif
-#else
- vsnprintf( p, len+1, format, va );
-#endif
- }
- va_end( va );
-}
-
-
-void XMLPrinter::PrintSpace( int depth )
-{
- for( int i=0; i<depth; ++i ) {
- Print( " " );
- }
-}
-
-
-void XMLPrinter::PrintString( const char* p, bool restricted )
-{
- // Look for runs of bytes between entities to print.
- const char* q = p;
- const bool* flag = restricted ? _restrictedEntityFlag : _entityFlag;
-
- if ( _processEntities ) {
- while ( *q ) {
- // Remember, char is sometimes signed. (How many times has that bitten me?)
- if ( *q > 0 && *q < ENTITY_RANGE ) {
- // Check for entities. If one is found, flush
- // the stream up until the entity, write the
- // entity, and keep looking.
- if ( flag[(unsigned)(*q)] ) {
- while ( p < q ) {
- Print( "%c", *p );
- ++p;
- }
- for( int i=0; i<NUM_ENTITIES; ++i ) {
- if ( entities[i].value == *q ) {
- Print( "&%s;", entities[i].pattern );
- break;
- }
- }
- ++p;
- }
- }
- ++q;
- }
- }
- // Flush the remaining string. This will be the entire
- // string if an entity wasn't found.
- if ( !_processEntities || (q-p > 0) ) {
- Print( "%s", p );
- }
-}
-
-
-void XMLPrinter::PushHeader( bool writeBOM, bool writeDec )
-{
- if ( writeBOM ) {
- static const unsigned char bom[] = { TIXML_UTF_LEAD_0, TIXML_UTF_LEAD_1, TIXML_UTF_LEAD_2, 0 };
- Print( "%s", bom );
- }
- if ( writeDec ) {
- PushDeclaration( "xml version=\"1.0\"" );
- }
-}
-
-
-void XMLPrinter::OpenElement( const char* name, bool compactMode )
-{
- if ( _elementJustOpened ) {
- SealElement();
- }
- _stack.Push( name );
-
- if ( _textDepth < 0 && !_firstElement && !compactMode ) {
- Print( "\n" );
- }
- if ( !compactMode ) {
- PrintSpace( _depth );
- }
-
- Print( "<%s", name );
- _elementJustOpened = true;
- _firstElement = false;
- ++_depth;
-}
-
-
-void XMLPrinter::PushAttribute( const char* name, const char* value )
-{
- TIXMLASSERT( _elementJustOpened );
- Print( " %s=\"", name );
- PrintString( value, false );
- Print( "\"" );
-}
-
-
-void XMLPrinter::PushAttribute( const char* name, int v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- PushAttribute( name, buf );
-}
-
-
-void XMLPrinter::PushAttribute( const char* name, unsigned v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- PushAttribute( name, buf );
-}
-
-
-void XMLPrinter::PushAttribute( const char* name, bool v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- PushAttribute( name, buf );
-}
-
-
-void XMLPrinter::PushAttribute( const char* name, double v )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( v, buf, BUF_SIZE );
- PushAttribute( name, buf );
-}
-
-
-void XMLPrinter::CloseElement( bool compactMode )
-{
- --_depth;
- const char* name = _stack.Pop();
-
- if ( _elementJustOpened ) {
- Print( "/>" );
- }
- else {
- if ( _textDepth < 0 && !compactMode) {
- Print( "\n" );
- PrintSpace( _depth );
- }
- Print( "</%s>", name );
- }
-
- if ( _textDepth == _depth ) {
- _textDepth = -1;
- }
- if ( _depth == 0 && !compactMode) {
- Print( "\n" );
- }
- _elementJustOpened = false;
-}
-
-
-void XMLPrinter::SealElement()
-{
- _elementJustOpened = false;
- Print( ">" );
-}
-
-
-void XMLPrinter::PushText( const char* text, bool cdata )
-{
- _textDepth = _depth-1;
-
- if ( _elementJustOpened ) {
- SealElement();
- }
- if ( cdata ) {
- Print( "<![CDATA[" );
- Print( "%s", text );
- Print( "]]>" );
- }
- else {
- PrintString( text, true );
- }
-}
-
-void XMLPrinter::PushText( int value )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( value, buf, BUF_SIZE );
- PushText( buf, false );
-}
-
-
-void XMLPrinter::PushText( unsigned value )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( value, buf, BUF_SIZE );
- PushText( buf, false );
-}
-
-
-void XMLPrinter::PushText( bool value )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( value, buf, BUF_SIZE );
- PushText( buf, false );
-}
-
-
-void XMLPrinter::PushText( float value )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( value, buf, BUF_SIZE );
- PushText( buf, false );
-}
-
-
-void XMLPrinter::PushText( double value )
-{
- char buf[BUF_SIZE];
- XMLUtil::ToStr( value, buf, BUF_SIZE );
- PushText( buf, false );
-}
-
-
-void XMLPrinter::PushComment( const char* comment )
-{
- if ( _elementJustOpened ) {
- SealElement();
- }
- if ( _textDepth < 0 && !_firstElement && !_compactMode) {
- Print( "\n" );
- PrintSpace( _depth );
- }
- _firstElement = false;
- Print( "<!--%s-->", comment );
-}
-
-
-void XMLPrinter::PushDeclaration( const char* value )
-{
- if ( _elementJustOpened ) {
- SealElement();
- }
- if ( _textDepth < 0 && !_firstElement && !_compactMode) {
- Print( "\n" );
- PrintSpace( _depth );
- }
- _firstElement = false;
- Print( "<?%s?>", value );
-}
-
-
-void XMLPrinter::PushUnknown( const char* value )
-{
- if ( _elementJustOpened ) {
- SealElement();
- }
- if ( _textDepth < 0 && !_firstElement && !_compactMode) {
- Print( "\n" );
- PrintSpace( _depth );
- }
- _firstElement = false;
- Print( "<!%s>", value );
-}
-
-
-bool XMLPrinter::VisitEnter( const XMLDocument& doc )
-{
- _processEntities = doc.ProcessEntities();
- if ( doc.HasBOM() ) {
- PushHeader( true, false );
- }
- return true;
-}
-
-
-bool XMLPrinter::VisitEnter( const XMLElement& element, const XMLAttribute* attribute )
-{
- const XMLElement* parentElem = element.Parent()->ToElement();
- bool compactMode = parentElem ? CompactMode(*parentElem) : _compactMode;
- OpenElement( element.Name(), compactMode );
- while ( attribute ) {
- PushAttribute( attribute->Name(), attribute->Value() );
- attribute = attribute->Next();
- }
- return true;
-}
-
-
-bool XMLPrinter::VisitExit( const XMLElement& element )
-{
- CloseElement( CompactMode(element) );
- return true;
-}
-
-
-bool XMLPrinter::Visit( const XMLText& text )
-{
- PushText( text.Value(), text.CData() );
- return true;
-}
-
-
-bool XMLPrinter::Visit( const XMLComment& comment )
-{
- PushComment( comment.Value() );
- return true;
-}
-
-bool XMLPrinter::Visit( const XMLDeclaration& declaration )
-{
- PushDeclaration( declaration.Value() );
- return true;
-}
-
-
-bool XMLPrinter::Visit( const XMLUnknown& unknown )
-{
- PushUnknown( unknown.Value() );
- return true;
-}
-
-} // namespace tinyxml2
-
diff --git a/src/thirdparty/MediaInfo/ThirdParty/tinyxml2/tinyxml2.h b/src/thirdparty/MediaInfo/ThirdParty/tinyxml2/tinyxml2.h
deleted file mode 100644
index 61c15f694..000000000
--- a/src/thirdparty/MediaInfo/ThirdParty/tinyxml2/tinyxml2.h
+++ /dev/null
@@ -1,2076 +0,0 @@
-/*
-Original code by Lee Thomason (www.grinninglizard.com)
-
-This software is provided 'as-is', without any express or implied
-warranty. In no event will the authors be held liable for any
-damages arising from the use of this software.
-
-Permission is granted to anyone to use this software for any
-purpose, including commercial applications, and to alter it and
-redistribute it freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented; you must
-not claim that you wrote the original software. If you use this
-software in a product, an acknowledgment in the product documentation
-would be appreciated but is not required.
-
-
-2. Altered source versions must be plainly marked as such, and
-must not be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source
-distribution.
-*/
-
-#ifndef TINYXML2_INCLUDED
-#define TINYXML2_INCLUDED
-
-#if defined(ANDROID_NDK) || defined(__BORLANDC__)
-# include <ctype.h>
-# include <limits.h>
-# include <stdio.h>
-# include <stdlib.h>
-# include <string.h>
-# include <stdarg.h>
-#else
-# include <cctype>
-# include <climits>
-# include <cstdio>
-# include <cstdlib>
-# include <cstring>
-# include <cstdarg>
-#endif
-
-/*
- TODO: intern strings instead of allocation.
-*/
-/*
- gcc:
- g++ -Wall -DDEBUG tinyxml2.cpp xmltest.cpp -o gccxmltest.exe
-
- Formatting, Artistic Style:
- AStyle.exe --style=1tbs --indent-switches --break-closing-brackets --indent-preprocessor tinyxml2.cpp tinyxml2.h
-*/
-
-#if defined( _DEBUG ) || defined( DEBUG ) || defined (__DEBUG__)
-# ifndef DEBUG
-# define DEBUG
-# endif
-#endif
-
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable: 4251)
-#endif
-
-#ifdef _WIN32
-# ifdef TINYXML2_EXPORT
-# define TINYXML2_LIB __declspec(dllexport)
-# elif defined(TINYXML2_IMPORT)
-# define TINYXML2_LIB __declspec(dllimport)
-# else
-# define TINYXML2_LIB
-# endif
-#else
-# define TINYXML2_LIB
-#endif
-
-
-#if defined(DEBUG)
-# if defined(_MSC_VER)
-# define TIXMLASSERT( x ) if ( !(x)) { __debugbreak(); } //if ( !(x)) WinDebugBreak()
-# elif defined (ANDROID_NDK)
-# include <android/log.h>
-# define TIXMLASSERT( x ) if ( !(x)) { __android_log_assert( "assert", "grinliz", "ASSERT in '%s' at %d.", __FILE__, __LINE__ ); }
-# else
-# include <assert.h>
-# define TIXMLASSERT assert
-# endif
-# else
-# define TIXMLASSERT( x ) {}
-#endif
-
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1400 ) && (!defined WINCE)
-// Microsoft visual studio, version 2005 and higher.
-/*int _snprintf_s(
- char *buffer,
- size_t sizeOfBuffer,
- size_t count,
- const char *format [,
- argument] ...
-);*/
-inline int TIXML_SNPRINTF( char* buffer, size_t size, const char* format, ... )
-{
- va_list va;
- va_start( va, format );
- int result = vsnprintf_s( buffer, size, _TRUNCATE, format, va );
- va_end( va );
- return result;
-}
-#define TIXML_SSCANF sscanf_s
-#elif defined WINCE
-#define TIXML_SNPRINTF _snprintf
-#define TIXML_SSCANF sscanf
-#else
-// GCC version 3 and higher
-//#warning( "Using sn* functions." )
-#define TIXML_SNPRINTF snprintf
-#define TIXML_SSCANF sscanf
-#endif
-
-/* Versioning, past 1.0.14:
- http://semver.org/
-*/
-static const int TIXML2_MAJOR_VERSION = 2;
-static const int TIXML2_MINOR_VERSION = 1;
-static const int TIXML2_PATCH_VERSION = 0;
-
-namespace tinyxml2
-{
-class XMLDocument;
-class XMLElement;
-class XMLAttribute;
-class XMLComment;
-class XMLText;
-class XMLDeclaration;
-class XMLUnknown;
-class XMLPrinter;
-
-/*
- A class that wraps strings. Normally stores the start and end
- pointers into the XML file itself, and will apply normalization
- and entity translation if actually read. Can also store (and memory
- manage) a traditional char[]
-*/
-class StrPair
-{
-public:
- enum {
- NEEDS_ENTITY_PROCESSING = 0x01,
- NEEDS_NEWLINE_NORMALIZATION = 0x02,
- COLLAPSE_WHITESPACE = 0x04,
-
- TEXT_ELEMENT = NEEDS_ENTITY_PROCESSING | NEEDS_NEWLINE_NORMALIZATION,
- TEXT_ELEMENT_LEAVE_ENTITIES = NEEDS_NEWLINE_NORMALIZATION,
- ATTRIBUTE_NAME = 0,
- ATTRIBUTE_VALUE = NEEDS_ENTITY_PROCESSING | NEEDS_NEWLINE_NORMALIZATION,
- ATTRIBUTE_VALUE_LEAVE_ENTITIES = NEEDS_NEWLINE_NORMALIZATION,
- COMMENT = NEEDS_NEWLINE_NORMALIZATION
- };
-
- StrPair() : _flags( 0 ), _start( 0 ), _end( 0 ) {}
- ~StrPair();
-
- void Set( char* start, char* end, int flags ) {
- Reset();
- _start = start;
- _end = end;
- _flags = flags | NEEDS_FLUSH;
- }
-
- const char* GetStr();
-
- bool Empty() const {
- return _start == _end;
- }
-
- void SetInternedStr( const char* str ) {
- Reset();
- _start = const_cast<char*>(str);
- }
-
- void SetStr( const char* str, int flags=0 );
-
- char* ParseText( char* in, const char* endTag, int strFlags );
- char* ParseName( char* in );
-
-private:
- void Reset();
- void CollapseWhitespace();
-
- enum {
- NEEDS_FLUSH = 0x100,
- NEEDS_DELETE = 0x200
- };
-
- // After parsing, if *_end != 0, it can be set to zero.
- int _flags;
- char* _start;
- char* _end;
-};
-
-
-/*
- A dynamic array of Plain Old Data. Doesn't support constructors, etc.
- Has a small initial memory pool, so that low or no usage will not
- cause a call to new/delete
-*/
-template <class T, int INIT>
-class DynArray
-{
-public:
- DynArray< T, INIT >() {
- _mem = _pool;
- _allocated = INIT;
- _size = 0;
- }
-
- ~DynArray() {
- if ( _mem != _pool ) {
- delete [] _mem;
- }
- }
-
- void Clear() {
- _size = 0;
- }
-
- void Push( T t ) {
- EnsureCapacity( _size+1 );
- _mem[_size++] = t;
- }
-
- T* PushArr( int count ) {
- EnsureCapacity( _size+count );
- T* ret = &_mem[_size];
- _size += count;
- return ret;
- }
-
- T Pop() {
- return _mem[--_size];
- }
-
- void PopArr( int count ) {
- TIXMLASSERT( _size >= count );
- _size -= count;
- }
-
- bool Empty() const {
- return _size == 0;
- }
-
- T& operator[](int i) {
- TIXMLASSERT( i>= 0 && i < _size );
- return _mem[i];
- }
-
- const T& operator[](int i) const {
- TIXMLASSERT( i>= 0 && i < _size );
- return _mem[i];
- }
-
- const T& PeekTop() const {
- TIXMLASSERT( _size > 0 );
- return _mem[ _size - 1];
- }
-
- int Size() const {
- return _size;
- }
-
- int Capacity() const {
- return _allocated;
- }
-
- const T* Mem() const {
- return _mem;
- }
-
- T* Mem() {
- return _mem;
- }
-
-private:
- void EnsureCapacity( int cap ) {
- if ( cap > _allocated ) {
- int newAllocated = cap * 2;
- T* newMem = new T[newAllocated];
- memcpy( newMem, _mem, sizeof(T)*_size ); // warning: not using constructors, only works for PODs
- if ( _mem != _pool ) {
- delete [] _mem;
- }
- _mem = newMem;
- _allocated = newAllocated;
- }
- }
-
- T* _mem;
- T _pool[INIT];
- int _allocated; // objects allocated
- int _size; // number objects in use
-};
-
-
-/*
- Parent virtual class of a pool for fast allocation
- and deallocation of objects.
-*/
-class MemPool
-{
-public:
- MemPool() {}
- virtual ~MemPool() {}
-
- virtual int ItemSize() const = 0;
- virtual void* Alloc() = 0;
- virtual void Free( void* ) = 0;
- virtual void SetTracked() = 0;
-};
-
-
-/*
- Template child class to create pools of the correct type.
-*/
-template< int SIZE >
-class MemPoolT : public MemPool
-{
-public:
- MemPoolT() : _root(0), _currentAllocs(0), _nAllocs(0), _maxAllocs(0), _nUntracked(0) {}
- ~MemPoolT() {
- // Delete the blocks.
- for( int i=0; i<_blockPtrs.Size(); ++i ) {
- delete _blockPtrs[i];
- }
- }
-
- virtual int ItemSize() const {
- return SIZE;
- }
- int CurrentAllocs() const {
- return _currentAllocs;
- }
-
- virtual void* Alloc() {
- if ( !_root ) {
- // Need a new block.
- Block* block = new Block();
- _blockPtrs.Push( block );
-
- for( int i=0; i<COUNT-1; ++i ) {
- block->chunk[i].next = &block->chunk[i+1];
- }
- block->chunk[COUNT-1].next = 0;
- _root = block->chunk;
- }
- void* result = _root;
- _root = _root->next;
-
- ++_currentAllocs;
- if ( _currentAllocs > _maxAllocs ) {
- _maxAllocs = _currentAllocs;
- }
- _nAllocs++;
- _nUntracked++;
- return result;
- }
- virtual void Free( void* mem ) {
- if ( !mem ) {
- return;
- }
- --_currentAllocs;
- Chunk* chunk = static_cast<Chunk*>( mem );
-#ifdef DEBUG
- memset( chunk, 0xfe, sizeof(Chunk) );
-#endif
- chunk->next = _root;
- _root = chunk;
- }
- void Trace( const char* name ) {
- printf( "Mempool %s watermark=%d [%dk] current=%d size=%d nAlloc=%d blocks=%d\n",
- name, _maxAllocs, _maxAllocs*SIZE/1024, _currentAllocs, SIZE, _nAllocs, _blockPtrs.Size() );
- }
-
- void SetTracked() {
- _nUntracked--;
- }
-
- int Untracked() const {
- return _nUntracked;
- }
-
- // This number is perf sensitive. 4k seems like a good tradeoff on my machine.
- // The test file is large, 170k.
- // Release: VS2010 gcc(no opt)
- // 1k: 4000
- // 2k: 4000
- // 4k: 3900 21000
- // 16k: 5200
- // 32k: 4300
- // 64k: 4000 21000
- enum { COUNT = (4*1024)/SIZE }; // Some compilers do not accept to use COUNT in private part if COUNT is private
-
-private:
- union Chunk {
- Chunk* next;
- char mem[SIZE];
- };
- struct Block {
- Chunk chunk[COUNT];
- };
- DynArray< Block*, 10 > _blockPtrs;
- Chunk* _root;
-
- int _currentAllocs;
- int _nAllocs;
- int _maxAllocs;
- int _nUntracked;
-};
-
-
-
-/**
- Implements the interface to the "Visitor pattern" (see the Accept() method.)
- If you call the Accept() method, it requires being passed a XMLVisitor
- class to handle callbacks. For nodes that contain other nodes (Document, Element)
- you will get called with a VisitEnter/VisitExit pair. Nodes that are always leafs
- are simply called with Visit().
-
- If you return 'true' from a Visit method, recursive parsing will continue. If you return
- false, <b>no children of this node or its siblings</b> will be visited.
-
- All flavors of Visit methods have a default implementation that returns 'true' (continue
- visiting). You need to only override methods that are interesting to you.
-
- Generally Accept() is called on the XMLDocument, although all nodes support visiting.
-
- You should never change the document from a callback.
-
- @sa XMLNode::Accept()
-*/
-class TINYXML2_LIB XMLVisitor
-{
-public:
- virtual ~XMLVisitor() {}
-
- /// Visit a document.
- virtual bool VisitEnter( const XMLDocument& /*doc*/ ) {
- return true;
- }
- /// Visit a document.
- virtual bool VisitExit( const XMLDocument& /*doc*/ ) {
- return true;
- }
-
- /// Visit an element.
- virtual bool VisitEnter( const XMLElement& /*element*/, const XMLAttribute* /*firstAttribute*/ ) {
- return true;
- }
- /// Visit an element.
- virtual bool VisitExit( const XMLElement& /*element*/ ) {
- return true;
- }
-
- /// Visit a declaration.
- virtual bool Visit( const XMLDeclaration& /*declaration*/ ) {
- return true;
- }
- /// Visit a text node.
- virtual bool Visit( const XMLText& /*text*/ ) {
- return true;
- }
- /// Visit a comment node.
- virtual bool Visit( const XMLComment& /*comment*/ ) {
- return true;
- }
- /// Visit an unknown node.
- virtual bool Visit( const XMLUnknown& /*unknown*/ ) {
- return true;
- }
-};
-
-
-/*
- Utility functionality.
-*/
-class XMLUtil
-{
-public:
- // Anything in the high order range of UTF-8 is assumed to not be whitespace. This isn't
- // correct, but simple, and usually works.
- static const char* SkipWhiteSpace( const char* p ) {
- while( !IsUTF8Continuation(*p) && isspace( *reinterpret_cast<const unsigned char*>(p) ) ) {
- ++p;
- }
- return p;
- }
- static char* SkipWhiteSpace( char* p ) {
- while( !IsUTF8Continuation(*p) && isspace( *reinterpret_cast<unsigned char*>(p) ) ) {
- ++p;
- }
- return p;
- }
- static bool IsWhiteSpace( char p ) {
- return !IsUTF8Continuation(p) && isspace( static_cast<unsigned char>(p) );
- }
-
- inline static bool IsNameStartChar( unsigned char ch ) {
- return ( ( ch < 128 ) ? isalpha( ch ) : 1 )
- || ch == ':'
- || ch == '_';
- }
-
- inline static bool IsNameChar( unsigned char ch ) {
- return IsNameStartChar( ch )
- || isdigit( ch )
- || ch == '.'
- || ch == '-';
- }
-
- inline static bool StringEqual( const char* p, const char* q, int nChar=INT_MAX ) {
- int n = 0;
- if ( p == q ) {
- return true;
- }
- while( *p && *q && *p == *q && n<nChar ) {
- ++p;
- ++q;
- ++n;
- }
- if ( (n == nChar) || ( *p == 0 && *q == 0 ) ) {
- return true;
- }
- return false;
- }
-
- inline static int IsUTF8Continuation( const char p ) {
- return p & 0x80;
- }
-
- static const char* ReadBOM( const char* p, bool* hasBOM );
- // p is the starting location,
- // the UTF-8 value of the entity will be placed in value, and length filled in.
- static const char* GetCharacterRef( const char* p, char* value, int* length );
- static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length );
-
- // converts primitive types to strings
- static void ToStr( int v, char* buffer, int bufferSize );
- static void ToStr( unsigned v, char* buffer, int bufferSize );
- static void ToStr( bool v, char* buffer, int bufferSize );
- static void ToStr( float v, char* buffer, int bufferSize );
- static void ToStr( double v, char* buffer, int bufferSize );
-
- // converts strings to primitive types
- static bool ToInt( const char* str, int* value );
- static bool ToUnsigned( const char* str, unsigned* value );
- static bool ToBool( const char* str, bool* value );
- static bool ToFloat( const char* str, float* value );
- static bool ToDouble( const char* str, double* value );
-};
-
-
-/** XMLNode is a base class for every object that is in the
- XML Document Object Model (DOM), except XMLAttributes.
- Nodes have siblings, a parent, and children which can
- be navigated. A node is always in a XMLDocument.
- The type of a XMLNode can be queried, and it can
- be cast to its more defined type.
-
- A XMLDocument allocates memory for all its Nodes.
- When the XMLDocument gets deleted, all its Nodes
- will also be deleted.
-
- @verbatim
- A Document can contain: Element (container or leaf)
- Comment (leaf)
- Unknown (leaf)
- Declaration( leaf )
-
- An Element can contain: Element (container or leaf)
- Text (leaf)
- Attributes (not on tree)
- Comment (leaf)
- Unknown (leaf)
-
- @endverbatim
-*/
-class TINYXML2_LIB XMLNode
-{
- friend class XMLDocument;
- friend class XMLElement;
-public:
-
- /// Get the XMLDocument that owns this XMLNode.
- const XMLDocument* GetDocument() const {
- return _document;
- }
- /// Get the XMLDocument that owns this XMLNode.
- XMLDocument* GetDocument() {
- return _document;
- }
-
- /// Safely cast to an Element, or null.
- virtual XMLElement* ToElement() {
- return 0;
- }
- /// Safely cast to Text, or null.
- virtual XMLText* ToText() {
- return 0;
- }
- /// Safely cast to a Comment, or null.
- virtual XMLComment* ToComment() {
- return 0;
- }
- /// Safely cast to a Document, or null.
- virtual XMLDocument* ToDocument() {
- return 0;
- }
- /// Safely cast to a Declaration, or null.
- virtual XMLDeclaration* ToDeclaration() {
- return 0;
- }
- /// Safely cast to an Unknown, or null.
- virtual XMLUnknown* ToUnknown() {
- return 0;
- }
-
- virtual const XMLElement* ToElement() const {
- return 0;
- }
- virtual const XMLText* ToText() const {
- return 0;
- }
- virtual const XMLComment* ToComment() const {
- return 0;
- }
- virtual const XMLDocument* ToDocument() const {
- return 0;
- }
- virtual const XMLDeclaration* ToDeclaration() const {
- return 0;
- }
- virtual const XMLUnknown* ToUnknown() const {
- return 0;
- }
-
- /** The meaning of 'value' changes for the specific type.
- @verbatim
- Document: empty
- Element: name of the element
- Comment: the comment text
- Unknown: the tag contents
- Text: the text string
- @endverbatim
- */
- const char* Value() const;
-
- /** Set the Value of an XML node.
- @sa Value()
- */
- void SetValue( const char* val, bool staticMem=false );
-
- /// Get the parent of this node on the DOM.
- const XMLNode* Parent() const {
- return _parent;
- }
-
- XMLNode* Parent() {
- return _parent;
- }
-
- /// Returns true if this node has no children.
- bool NoChildren() const {
- return !_firstChild;
- }
-
- /// Get the first child node, or null if none exists.
- const XMLNode* FirstChild() const {
- return _firstChild;
- }
-
- XMLNode* FirstChild() {
- return _firstChild;
- }
-
- /** Get the first child element, or optionally the first child
- element with the specified name.
- */
- const XMLElement* FirstChildElement( const char* value=0 ) const;
-
- XMLElement* FirstChildElement( const char* value=0 ) {
- return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->FirstChildElement( value ));
- }
-
- /// Get the last child node, or null if none exists.
- const XMLNode* LastChild() const {
- return _lastChild;
- }
-
- XMLNode* LastChild() {
- return const_cast<XMLNode*>(const_cast<const XMLNode*>(this)->LastChild() );
- }
-
- /** Get the last child element or optionally the last child
- element with the specified name.
- */
- const XMLElement* LastChildElement( const char* value=0 ) const;
-
- XMLElement* LastChildElement( const char* value=0 ) {
- return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->LastChildElement(value) );
- }
-
- /// Get the previous (left) sibling node of this node.
- const XMLNode* PreviousSibling() const {
- return _prev;
- }
-
- XMLNode* PreviousSibling() {
- return _prev;
- }
-
- /// Get the previous (left) sibling element of this node, with an optionally supplied name.
- const XMLElement* PreviousSiblingElement( const char* value=0 ) const ;
-
- XMLElement* PreviousSiblingElement( const char* value=0 ) {
- return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->PreviousSiblingElement( value ) );
- }
-
- /// Get the next (right) sibling node of this node.
- const XMLNode* NextSibling() const {
- return _next;
- }
-
- XMLNode* NextSibling() {
- return _next;
- }
-
- /// Get the next (right) sibling element of this node, with an optionally supplied name.
- const XMLElement* NextSiblingElement( const char* value=0 ) const;
-
- XMLElement* NextSiblingElement( const char* value=0 ) {
- return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->NextSiblingElement( value ) );
- }
-
- /**
- Add a child node as the last (right) child.
- If the child node is already part of the document,
- it is moved from its old location to the new location.
- Returns the addThis argument or 0 if the node does not
- belong to the same document.
- */
- XMLNode* InsertEndChild( XMLNode* addThis );
-
- XMLNode* LinkEndChild( XMLNode* addThis ) {
- return InsertEndChild( addThis );
- }
- /**
- Add a child node as the first (left) child.
- If the child node is already part of the document,
- it is moved from its old location to the new location.
- Returns the addThis argument or 0 if the node does not
- belong to the same document.
- */
- XMLNode* InsertFirstChild( XMLNode* addThis );
- /**
- Add a node after the specified child node.
- If the child node is already part of the document,
- it is moved from its old location to the new location.
- Returns the addThis argument or 0 if the afterThis node
- is not a child of this node, or if the node does not
- belong to the same document.
- */
- XMLNode* InsertAfterChild( XMLNode* afterThis, XMLNode* addThis );
-
- /**
- Delete all the children of this node.
- */
- void DeleteChildren();
-
- /**
- Delete a child of this node.
- */
- void DeleteChild( XMLNode* node );
-
- /**
- Make a copy of this node, but not its children.
- You may pass in a Document pointer that will be
- the owner of the new Node. If the 'document' is
- null, then the node returned will be allocated
- from the current Document. (this->GetDocument())
-
- Note: if called on a XMLDocument, this will return null.
- */
- virtual XMLNode* ShallowClone( XMLDocument* document ) const = 0;
-
- /**
- Test if 2 nodes are the same, but don't test children.
- The 2 nodes do not need to be in the same Document.
-
- Note: if called on a XMLDocument, this will return false.
- */
- virtual bool ShallowEqual( const XMLNode* compare ) const = 0;
-
- /** Accept a hierarchical visit of the nodes in the TinyXML-2 DOM. Every node in the
- XML tree will be conditionally visited and the host will be called back
- via the XMLVisitor interface.
-
- This is essentially a SAX interface for TinyXML-2. (Note however it doesn't re-parse
- the XML for the callbacks, so the performance of TinyXML-2 is unchanged by using this
- interface versus any other.)
-
- The interface has been based on ideas from:
-
- - http://www.saxproject.org/
- - http://c2.com/cgi/wiki?HierarchicalVisitorPattern
-
- Which are both good references for "visiting".
-
- An example of using Accept():
- @verbatim
- XMLPrinter printer;
- tinyxmlDoc.Accept( &printer );
- const char* xmlcstr = printer.CStr();
- @endverbatim
- */
- virtual bool Accept( XMLVisitor* visitor ) const = 0;
-
- // internal
- virtual char* ParseDeep( char*, StrPair* );
-
-protected:
- XMLNode( XMLDocument* );
- virtual ~XMLNode();
- XMLNode( const XMLNode& ); // not supported
- XMLNode& operator=( const XMLNode& ); // not supported
-
- XMLDocument* _document;
- XMLNode* _parent;
- mutable StrPair _value;
-
- XMLNode* _firstChild;
- XMLNode* _lastChild;
-
- XMLNode* _prev;
- XMLNode* _next;
-
-private:
- MemPool* _memPool;
- void Unlink( XMLNode* child );
-};
-
-
-/** XML text.
-
- Note that a text node can have child element nodes, for example:
- @verbatim
- <root>This is <b>bold</b></root>
- @endverbatim
-
- A text node can have 2 ways to output the next. "normal" output
- and CDATA. It will default to the mode it was parsed from the XML file and
- you generally want to leave it alone, but you can change the output mode with
- SetCData() and query it with CData().
-*/
-class TINYXML2_LIB XMLText : public XMLNode
-{
- friend class XMLBase;
- friend class XMLDocument;
-public:
- virtual bool Accept( XMLVisitor* visitor ) const;
-
- virtual XMLText* ToText() {
- return this;
- }
- virtual const XMLText* ToText() const {
- return this;
- }
-
- /// Declare whether this should be CDATA or standard text.
- void SetCData( bool isCData ) {
- _isCData = isCData;
- }
- /// Returns true if this is a CDATA text element.
- bool CData() const {
- return _isCData;
- }
-
- char* ParseDeep( char*, StrPair* endTag );
- virtual XMLNode* ShallowClone( XMLDocument* document ) const;
- virtual bool ShallowEqual( const XMLNode* compare ) const;
-
-protected:
- XMLText( XMLDocument* doc ) : XMLNode( doc ), _isCData( false ) {}
- virtual ~XMLText() {}
- XMLText( const XMLText& ); // not supported
- XMLText& operator=( const XMLText& ); // not supported
-
-private:
- bool _isCData;
-};
-
-
-/** An XML Comment. */
-class TINYXML2_LIB XMLComment : public XMLNode
-{
- friend class XMLDocument;
-public:
- virtual XMLComment* ToComment() {
- return this;
- }
- virtual const XMLComment* ToComment() const {
- return this;
- }
-
- virtual bool Accept( XMLVisitor* visitor ) const;
-
- char* ParseDeep( char*, StrPair* endTag );
- virtual XMLNode* ShallowClone( XMLDocument* document ) const;
- virtual bool ShallowEqual( const XMLNode* compare ) const;
-
-protected:
- XMLComment( XMLDocument* doc );
- virtual ~XMLComment();
- XMLComment( const XMLComment& ); // not supported
- XMLComment& operator=( const XMLComment& ); // not supported
-
-private:
-};
-
-
-/** In correct XML the declaration is the first entry in the file.
- @verbatim
- <?xml version="1.0" standalone="yes"?>
- @endverbatim
-
- TinyXML-2 will happily read or write files without a declaration,
- however.
-
- The text of the declaration isn't interpreted. It is parsed
- and written as a string.
-*/
-class TINYXML2_LIB XMLDeclaration : public XMLNode
-{
- friend class XMLDocument;
-public:
- virtual XMLDeclaration* ToDeclaration() {
- return this;
- }
- virtual const XMLDeclaration* ToDeclaration() const {
- return this;
- }
-
- virtual bool Accept( XMLVisitor* visitor ) const;
-
- char* ParseDeep( char*, StrPair* endTag );
- virtual XMLNode* ShallowClone( XMLDocument* document ) const;
- virtual bool ShallowEqual( const XMLNode* compare ) const;
-
-protected:
- XMLDeclaration( XMLDocument* doc );
- virtual ~XMLDeclaration();
- XMLDeclaration( const XMLDeclaration& ); // not supported
- XMLDeclaration& operator=( const XMLDeclaration& ); // not supported
-};
-
-
-/** Any tag that TinyXML-2 doesn't recognize is saved as an
- unknown. It is a tag of text, but should not be modified.
- It will be written back to the XML, unchanged, when the file
- is saved.
-
- DTD tags get thrown into XMLUnknowns.
-*/
-class TINYXML2_LIB XMLUnknown : public XMLNode
-{
- friend class XMLDocument;
-public:
- virtual XMLUnknown* ToUnknown() {
- return this;
- }
- virtual const XMLUnknown* ToUnknown() const {
- return this;
- }
-
- virtual bool Accept( XMLVisitor* visitor ) const;
-
- char* ParseDeep( char*, StrPair* endTag );
- virtual XMLNode* ShallowClone( XMLDocument* document ) const;
- virtual bool ShallowEqual( const XMLNode* compare ) const;
-
-protected:
- XMLUnknown( XMLDocument* doc );
- virtual ~XMLUnknown();
- XMLUnknown( const XMLUnknown& ); // not supported
- XMLUnknown& operator=( const XMLUnknown& ); // not supported
-};
-
-
-enum XMLError {
- XML_NO_ERROR = 0,
- XML_SUCCESS = 0,
-
- XML_NO_ATTRIBUTE,
- XML_WRONG_ATTRIBUTE_TYPE,
-
- XML_ERROR_FILE_NOT_FOUND,
- XML_ERROR_FILE_COULD_NOT_BE_OPENED,
- XML_ERROR_FILE_READ_ERROR,
- XML_ERROR_ELEMENT_MISMATCH,
- XML_ERROR_PARSING_ELEMENT,
- XML_ERROR_PARSING_ATTRIBUTE,
- XML_ERROR_IDENTIFYING_TAG,
- XML_ERROR_PARSING_TEXT,
- XML_ERROR_PARSING_CDATA,
- XML_ERROR_PARSING_COMMENT,
- XML_ERROR_PARSING_DECLARATION,
- XML_ERROR_PARSING_UNKNOWN,
- XML_ERROR_EMPTY_DOCUMENT,
- XML_ERROR_MISMATCHED_ELEMENT,
- XML_ERROR_PARSING,
-
- XML_CAN_NOT_CONVERT_TEXT,
- XML_NO_TEXT_NODE
-};
-
-
-/** An attribute is a name-value pair. Elements have an arbitrary
- number of attributes, each with a unique name.
-
- @note The attributes are not XMLNodes. You may only query the
- Next() attribute in a list.
-*/
-class TINYXML2_LIB XMLAttribute
-{
- friend class XMLElement;
-public:
- /// The name of the attribute.
- const char* Name() const;
-
- /// The value of the attribute.
- const char* Value() const;
-
- /// The next attribute in the list.
- const XMLAttribute* Next() const {
- return _next;
- }
-
- /** IntValue interprets the attribute as an integer, and returns the value.
- If the value isn't an integer, 0 will be returned. There is no error checking;
- use QueryIntValue() if you need error checking.
- */
- int IntValue() const {
- int i=0;
- QueryIntValue( &i );
- return i;
- }
- /// Query as an unsigned integer. See IntValue()
- unsigned UnsignedValue() const {
- unsigned i=0;
- QueryUnsignedValue( &i );
- return i;
- }
- /// Query as a boolean. See IntValue()
- bool BoolValue() const {
- bool b=false;
- QueryBoolValue( &b );
- return b;
- }
- /// Query as a double. See IntValue()
- double DoubleValue() const {
- double d=0;
- QueryDoubleValue( &d );
- return d;
- }
- /// Query as a float. See IntValue()
- float FloatValue() const {
- float f=0;
- QueryFloatValue( &f );
- return f;
- }
-
- /** QueryIntValue interprets the attribute as an integer, and returns the value
- in the provided parameter. The function will return XML_NO_ERROR on success,
- and XML_WRONG_ATTRIBUTE_TYPE if the conversion is not successful.
- */
- XMLError QueryIntValue( int* value ) const;
- /// See QueryIntValue
- XMLError QueryUnsignedValue( unsigned int* value ) const;
- /// See QueryIntValue
- XMLError QueryBoolValue( bool* value ) const;
- /// See QueryIntValue
- XMLError QueryDoubleValue( double* value ) const;
- /// See QueryIntValue
- XMLError QueryFloatValue( float* value ) const;
-
- /// Set the attribute to a string value.
- void SetAttribute( const char* value );
- /// Set the attribute to value.
- void SetAttribute( int value );
- /// Set the attribute to value.
- void SetAttribute( unsigned value );
- /// Set the attribute to value.
- void SetAttribute( bool value );
- /// Set the attribute to value.
- void SetAttribute( double value );
- /// Set the attribute to value.
- void SetAttribute( float value );
-
-private:
- enum { BUF_SIZE = 200 };
-
- XMLAttribute() : _next( 0 ), _memPool( 0 ) {}
- virtual ~XMLAttribute() {}
-
- XMLAttribute( const XMLAttribute& ); // not supported
- void operator=( const XMLAttribute& ); // not supported
- void SetName( const char* name );
-
- char* ParseDeep( char* p, bool processEntities );
-
- mutable StrPair _name;
- mutable StrPair _value;
- XMLAttribute* _next;
- MemPool* _memPool;
-};
-
-
-/** The element is a container class. It has a value, the element name,
- and can contain other elements, text, comments, and unknowns.
- Elements also contain an arbitrary number of attributes.
-*/
-class TINYXML2_LIB XMLElement : public XMLNode
-{
- friend class XMLBase;
- friend class XMLDocument;
-public:
- /// Get the name of an element (which is the Value() of the node.)
- const char* Name() const {
- return Value();
- }
- /// Set the name of the element.
- void SetName( const char* str, bool staticMem=false ) {
- SetValue( str, staticMem );
- }
-
- virtual XMLElement* ToElement() {
- return this;
- }
- virtual const XMLElement* ToElement() const {
- return this;
- }
- virtual bool Accept( XMLVisitor* visitor ) const;
-
- /** Given an attribute name, Attribute() returns the value
- for the attribute of that name, or null if none
- exists. For example:
-
- @verbatim
- const char* value = ele->Attribute( "foo" );
- @endverbatim
-
- The 'value' parameter is normally null. However, if specified,
- the attribute will only be returned if the 'name' and 'value'
- match. This allow you to write code:
-
- @verbatim
- if ( ele->Attribute( "foo", "bar" ) ) callFooIsBar();
- @endverbatim
-
- rather than:
- @verbatim
- if ( ele->Attribute( "foo" ) ) {
- if ( strcmp( ele->Attribute( "foo" ), "bar" ) == 0 ) callFooIsBar();
- }
- @endverbatim
- */
- const char* Attribute( const char* name, const char* value=0 ) const;
-
- /** Given an attribute name, IntAttribute() returns the value
- of the attribute interpreted as an integer. 0 will be
- returned if there is an error. For a method with error
- checking, see QueryIntAttribute()
- */
- int IntAttribute( const char* name ) const {
- int i=0;
- QueryIntAttribute( name, &i );
- return i;
- }
- /// See IntAttribute()
- unsigned UnsignedAttribute( const char* name ) const {
- unsigned i=0;
- QueryUnsignedAttribute( name, &i );
- return i;
- }
- /// See IntAttribute()
- bool BoolAttribute( const char* name ) const {
- bool b=false;
- QueryBoolAttribute( name, &b );
- return b;
- }
- /// See IntAttribute()
- double DoubleAttribute( const char* name ) const {
- double d=0;
- QueryDoubleAttribute( name, &d );
- return d;
- }
- /// See IntAttribute()
- float FloatAttribute( const char* name ) const {
- float f=0;
- QueryFloatAttribute( name, &f );
- return f;
- }
-
- /** Given an attribute name, QueryIntAttribute() returns
- XML_NO_ERROR, XML_WRONG_ATTRIBUTE_TYPE if the conversion
- can't be performed, or XML_NO_ATTRIBUTE if the attribute
- doesn't exist. If successful, the result of the conversion
- will be written to 'value'. If not successful, nothing will
- be written to 'value'. This allows you to provide default
- value:
-
- @verbatim
- int value = 10;
- QueryIntAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10
- @endverbatim
- */
- XMLError QueryIntAttribute( const char* name, int* value ) const {
- const XMLAttribute* a = FindAttribute( name );
- if ( !a ) {
- return XML_NO_ATTRIBUTE;
- }
- return a->QueryIntValue( value );
- }
- /// See QueryIntAttribute()
- XMLError QueryUnsignedAttribute( const char* name, unsigned int* value ) const {
- const XMLAttribute* a = FindAttribute( name );
- if ( !a ) {
- return XML_NO_ATTRIBUTE;
- }
- return a->QueryUnsignedValue( value );
- }
- /// See QueryIntAttribute()
- XMLError QueryBoolAttribute( const char* name, bool* value ) const {
- const XMLAttribute* a = FindAttribute( name );
- if ( !a ) {
- return XML_NO_ATTRIBUTE;
- }
- return a->QueryBoolValue( value );
- }
- /// See QueryIntAttribute()
- XMLError QueryDoubleAttribute( const char* name, double* value ) const {
- const XMLAttribute* a = FindAttribute( name );
- if ( !a ) {
- return XML_NO_ATTRIBUTE;
- }
- return a->QueryDoubleValue( value );
- }
- /// See QueryIntAttribute()
- XMLError QueryFloatAttribute( const char* name, float* value ) const {
- const XMLAttribute* a = FindAttribute( name );
- if ( !a ) {
- return XML_NO_ATTRIBUTE;
- }
- return a->QueryFloatValue( value );
- }
-
-
- /** Given an attribute name, QueryAttribute() returns
- XML_NO_ERROR, XML_WRONG_ATTRIBUTE_TYPE if the conversion
- can't be performed, or XML_NO_ATTRIBUTE if the attribute
- doesn't exist. It is overloaded for the primitive types,
- and is a generally more convenient replacement of
- QueryIntAttribute() and related functions.
-
- If successful, the result of the conversion
- will be written to 'value'. If not successful, nothing will
- be written to 'value'. This allows you to provide default
- value:
-
- @verbatim
- int value = 10;
- QueryAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10
- @endverbatim
- */
- int QueryAttribute( const char* name, int* value ) const {
- return QueryIntAttribute( name, value );
- }
-
- int QueryAttribute( const char* name, unsigned int* value ) const {
- return QueryUnsignedAttribute( name, value );
- }
-
- int QueryAttribute( const char* name, bool* value ) const {
- return QueryBoolAttribute( name, value );
- }
-
- int QueryAttribute( const char* name, double* value ) const {
- return QueryDoubleAttribute( name, value );
- }
-
- int QueryAttribute( const char* name, float* value ) const {
- return QueryFloatAttribute( name, value );
- }
-
- /// Sets the named attribute to value.
- void SetAttribute( const char* name, const char* value ) {
- XMLAttribute* a = FindOrCreateAttribute( name );
- a->SetAttribute( value );
- }
- /// Sets the named attribute to value.
- void SetAttribute( const char* name, int value ) {
- XMLAttribute* a = FindOrCreateAttribute( name );
- a->SetAttribute( value );
- }
- /// Sets the named attribute to value.
- void SetAttribute( const char* name, unsigned value ) {
- XMLAttribute* a = FindOrCreateAttribute( name );
- a->SetAttribute( value );
- }
- /// Sets the named attribute to value.
- void SetAttribute( const char* name, bool value ) {
- XMLAttribute* a = FindOrCreateAttribute( name );
- a->SetAttribute( value );
- }
- /// Sets the named attribute to value.
- void SetAttribute( const char* name, double value ) {
- XMLAttribute* a = FindOrCreateAttribute( name );
- a->SetAttribute( value );
- }
- /// Sets the named attribute to value.
- void SetAttribute( const char* name, float value ) {
- XMLAttribute* a = FindOrCreateAttribute( name );
- a->SetAttribute( value );
- }
-
- /**
- Delete an attribute.
- */
- void DeleteAttribute( const char* name );
-
- /// Return the first attribute in the list.
- const XMLAttribute* FirstAttribute() const {
- return _rootAttribute;
- }
- /// Query a specific attribute in the list.
- const XMLAttribute* FindAttribute( const char* name ) const;
-
- /** Convenience function for easy access to the text inside an element. Although easy
- and concise, GetText() is limited compared to getting the XMLText child
- and accessing it directly.
-
- If the first child of 'this' is a XMLText, the GetText()
- returns the character string of the Text node, else null is returned.
-
- This is a convenient method for getting the text of simple contained text:
- @verbatim
- <foo>This is text</foo>
- const char* str = fooElement->GetText();
- @endverbatim
-
- 'str' will be a pointer to "This is text".
-
- Note that this function can be misleading. If the element foo was created from
- this XML:
- @verbatim
- <foo><b>This is text</b></foo>
- @endverbatim
-
- then the value of str would be null. The first child node isn't a text node, it is
- another element. From this XML:
- @verbatim
- <foo>This is <b>text</b></foo>
- @endverbatim
- GetText() will return "This is ".
- */
- const char* GetText() const;
-
- /** Convenience function for easy access to the text inside an element. Although easy
- and concise, SetText() is limited compared to creating an XMLText child
- and mutating it directly.
-
- If the first child of 'this' is a XMLText, SetText() sets its value to
- the given string, otherwise it will create a first child that is an XMLText.
-
- This is a convenient method for setting the text of simple contained text:
- @verbatim
- <foo>This is text</foo>
- fooElement->SetText( "Hullaballoo!" );
- <foo>Hullaballoo!</foo>
- @endverbatim
-
- Note that this function can be misleading. If the element foo was created from
- this XML:
- @verbatim
- <foo><b>This is text</b></foo>
- @endverbatim
-
- then it will not change "This is text", but rather prefix it with a text element:
- @verbatim
- <foo>Hullaballoo!<b>This is text</b></foo>
- @endverbatim
-
- For this XML:
- @verbatim
- <foo />
- @endverbatim
- SetText() will generate
- @verbatim
- <foo>Hullaballoo!</foo>
- @endverbatim
- */
- void SetText( const char* inText );
- /// Convenience method for setting text inside and element. See SetText() for important limitations.
- void SetText( int value );
- /// Convenience method for setting text inside and element. See SetText() for important limitations.
- void SetText( unsigned value );
- /// Convenience method for setting text inside and element. See SetText() for important limitations.
- void SetText( bool value );
- /// Convenience method for setting text inside and element. See SetText() for important limitations.
- void SetText( double value );
- /// Convenience method for setting text inside and element. See SetText() for important limitations.
- void SetText( float value );
-
- /**
- Convenience method to query the value of a child text node. This is probably best
- shown by example. Given you have a document is this form:
- @verbatim
- <point>
- <x>1</x>
- <y>1.4</y>
- </point>
- @endverbatim
-
- The QueryIntText() and similar functions provide a safe and easier way to get to the
- "value" of x and y.
-
- @verbatim
- int x = 0;
- float y = 0; // types of x and y are contrived for example
- const XMLElement* xElement = pointElement->FirstChildElement( "x" );
- const XMLElement* yElement = pointElement->FirstChildElement( "y" );
- xElement->QueryIntText( &x );
- yElement->QueryFloatText( &y );
- @endverbatim
-
- @returns XML_SUCCESS (0) on success, XML_CAN_NOT_CONVERT_TEXT if the text cannot be converted
- to the requested type, and XML_NO_TEXT_NODE if there is no child text to query.
-
- */
- XMLError QueryIntText( int* ival ) const;
- /// See QueryIntText()
- XMLError QueryUnsignedText( unsigned* uval ) const;
- /// See QueryIntText()
- XMLError QueryBoolText( bool* bval ) const;
- /// See QueryIntText()
- XMLError QueryDoubleText( double* dval ) const;
- /// See QueryIntText()
- XMLError QueryFloatText( float* fval ) const;
-
- // internal:
- enum {
- OPEN, // <foo>
- CLOSED, // <foo/>
- CLOSING // </foo>
- };
- int ClosingType() const {
- return _closingType;
- }
- char* ParseDeep( char* p, StrPair* endTag );
- virtual XMLNode* ShallowClone( XMLDocument* document ) const;
- virtual bool ShallowEqual( const XMLNode* compare ) const;
-
-private:
- XMLElement( XMLDocument* doc );
- virtual ~XMLElement();
- XMLElement( const XMLElement& ); // not supported
- void operator=( const XMLElement& ); // not supported
-
- XMLAttribute* FindAttribute( const char* name );
- XMLAttribute* FindOrCreateAttribute( const char* name );
- //void LinkAttribute( XMLAttribute* attrib );
- char* ParseAttributes( char* p );
-
- enum { BUF_SIZE = 200 };
- int _closingType;
- // The attribute list is ordered; there is no 'lastAttribute'
- // because the list needs to be scanned for dupes before adding
- // a new attribute.
- XMLAttribute* _rootAttribute;
-};
-
-
-enum Whitespace {
- PRESERVE_WHITESPACE,
- COLLAPSE_WHITESPACE
-};
-
-
-/** A Document binds together all the functionality.
- It can be saved, loaded, and printed to the screen.
- All Nodes are connected and allocated to a Document.
- If the Document is deleted, all its Nodes are also deleted.
-*/
-class TINYXML2_LIB XMLDocument : public XMLNode
-{
- friend class XMLElement;
-public:
- /// constructor
- XMLDocument( bool processEntities = true, Whitespace = PRESERVE_WHITESPACE );
- ~XMLDocument();
-
- virtual XMLDocument* ToDocument() {
- return this;
- }
- virtual const XMLDocument* ToDocument() const {
- return this;
- }
-
- /**
- Parse an XML file from a character string.
- Returns XML_NO_ERROR (0) on success, or
- an errorID.
-
- You may optionally pass in the 'nBytes', which is
- the number of bytes which will be parsed. If not
- specified, TinyXML-2 will assume 'xml' points to a
- null terminated string.
- */
- XMLError Parse( const char* xml, size_t nBytes=(size_t)(-1) );
-
- /**
- Load an XML file from disk.
- Returns XML_NO_ERROR (0) on success, or
- an errorID.
- */
- XMLError LoadFile( const char* filename );
-
- /**
- Load an XML file from disk. You are responsible
- for providing and closing the FILE*.
-
- Returns XML_NO_ERROR (0) on success, or
- an errorID.
- */
- XMLError LoadFile( FILE* );
-
- /**
- Save the XML file to disk.
- Returns XML_NO_ERROR (0) on success, or
- an errorID.
- */
- XMLError SaveFile( const char* filename, bool compact = false );
-
- /**
- Save the XML file to disk. You are responsible
- for providing and closing the FILE*.
-
- Returns XML_NO_ERROR (0) on success, or
- an errorID.
- */
- XMLError SaveFile( FILE* fp, bool compact = false );
-
- bool ProcessEntities() const {
- return _processEntities;
- }
- Whitespace WhitespaceMode() const {
- return _whitespace;
- }
-
- /**
- Returns true if this document has a leading Byte Order Mark of UTF8.
- */
- bool HasBOM() const {
- return _writeBOM;
- }
- /** Sets whether to write the BOM when writing the file.
- */
- void SetBOM( bool useBOM ) {
- _writeBOM = useBOM;
- }
-
- /** Return the root element of DOM. Equivalent to FirstChildElement().
- To get the first node, use FirstChild().
- */
- XMLElement* RootElement() {
- return FirstChildElement();
- }
- const XMLElement* RootElement() const {
- return FirstChildElement();
- }
-
- /** Print the Document. If the Printer is not provided, it will
- print to stdout. If you provide Printer, this can print to a file:
- @verbatim
- XMLPrinter printer( fp );
- doc.Print( &printer );
- @endverbatim
-
- Or you can use a printer to print to memory:
- @verbatim
- XMLPrinter printer;
- doc.Print( &printer );
- // printer.CStr() has a const char* to the XML
- @endverbatim
- */
- void Print( XMLPrinter* streamer=0 ) const;
- virtual bool Accept( XMLVisitor* visitor ) const;
-
- /**
- Create a new Element associated with
- this Document. The memory for the Element
- is managed by the Document.
- */
- XMLElement* NewElement( const char* name );
- /**
- Create a new Comment associated with
- this Document. The memory for the Comment
- is managed by the Document.
- */
- XMLComment* NewComment( const char* comment );
- /**
- Create a new Text associated with
- this Document. The memory for the Text
- is managed by the Document.
- */
- XMLText* NewText( const char* text );
- /**
- Create a new Declaration associated with
- this Document. The memory for the object
- is managed by the Document.
-
- If the 'text' param is null, the standard
- declaration is used.:
- @verbatim
- <?xml version="1.0" encoding="UTF-8"?>
- @endverbatim
- */
- XMLDeclaration* NewDeclaration( const char* text=0 );
- /**
- Create a new Unknown associated with
- this Document. The memory for the object
- is managed by the Document.
- */
- XMLUnknown* NewUnknown( const char* text );
-
- /**
- Delete a node associated with this document.
- It will be unlinked from the DOM.
- */
- void DeleteNode( XMLNode* node ) {
- node->_parent->DeleteChild( node );
- }
-
- void SetError( XMLError error, const char* str1, const char* str2 );
-
- /// Return true if there was an error parsing the document.
- bool Error() const {
- return _errorID != XML_NO_ERROR;
- }
- /// Return the errorID.
- XMLError ErrorID() const {
- return _errorID;
- }
- /// Return a possibly helpful diagnostic location or string.
- const char* GetErrorStr1() const {
- return _errorStr1;
- }
- /// Return a possibly helpful secondary diagnostic location or string.
- const char* GetErrorStr2() const {
- return _errorStr2;
- }
- /// If there is an error, print it to stdout.
- void PrintError() const;
-
- /// Clear the document, resetting it to the initial state.
- void Clear();
-
- // internal
- char* Identify( char* p, XMLNode** node );
-
- virtual XMLNode* ShallowClone( XMLDocument* /*document*/ ) const {
- return 0;
- }
- virtual bool ShallowEqual( const XMLNode* /*compare*/ ) const {
- return false;
- }
-
-private:
- XMLDocument( const XMLDocument& ); // not supported
- void operator=( const XMLDocument& ); // not supported
-
- bool _writeBOM;
- bool _processEntities;
- XMLError _errorID;
- Whitespace _whitespace;
- const char* _errorStr1;
- const char* _errorStr2;
- char* _charBuffer;
-
- MemPoolT< sizeof(XMLElement) > _elementPool;
- MemPoolT< sizeof(XMLAttribute) > _attributePool;
- MemPoolT< sizeof(XMLText) > _textPool;
- MemPoolT< sizeof(XMLComment) > _commentPool;
-};
-
-
-/**
- A XMLHandle is a class that wraps a node pointer with null checks; this is
- an incredibly useful thing. Note that XMLHandle is not part of the TinyXML-2
- DOM structure. It is a separate utility class.
-
- Take an example:
- @verbatim
- <Document>
- <Element attributeA = "valueA">
- <Child attributeB = "value1" />
- <Child attributeB = "value2" />
- </Element>
- </Document>
- @endverbatim
-
- Assuming you want the value of "attributeB" in the 2nd "Child" element, it's very
- easy to write a *lot* of code that looks like:
-
- @verbatim
- XMLElement* root = document.FirstChildElement( "Document" );
- if ( root )
- {
- XMLElement* element = root->FirstChildElement( "Element" );
- if ( element )
- {
- XMLElement* child = element->FirstChildElement( "Child" );
- if ( child )
- {
- XMLElement* child2 = child->NextSiblingElement( "Child" );
- if ( child2 )
- {
- // Finally do something useful.
- @endverbatim
-
- And that doesn't even cover "else" cases. XMLHandle addresses the verbosity
- of such code. A XMLHandle checks for null pointers so it is perfectly safe
- and correct to use:
-
- @verbatim
- XMLHandle docHandle( &document );
- XMLElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).FirstChild().NextSibling().ToElement();
- if ( child2 )
- {
- // do something useful
- @endverbatim
-
- Which is MUCH more concise and useful.
-
- It is also safe to copy handles - internally they are nothing more than node pointers.
- @verbatim
- XMLHandle handleCopy = handle;
- @endverbatim
-
- See also XMLConstHandle, which is the same as XMLHandle, but operates on const objects.
-*/
-class TINYXML2_LIB XMLHandle
-{
-public:
- /// Create a handle from any node (at any depth of the tree.) This can be a null pointer.
- XMLHandle( XMLNode* node ) {
- _node = node;
- }
- /// Create a handle from a node.
- XMLHandle( XMLNode& node ) {
- _node = &node;
- }
- /// Copy constructor
- XMLHandle( const XMLHandle& ref ) {
- _node = ref._node;
- }
- /// Assignment
- XMLHandle& operator=( const XMLHandle& ref ) {
- _node = ref._node;
- return *this;
- }
-
- /// Get the first child of this handle.
- XMLHandle FirstChild() {
- return XMLHandle( _node ? _node->FirstChild() : 0 );
- }
- /// Get the first child element of this handle.
- XMLHandle FirstChildElement( const char* value=0 ) {
- return XMLHandle( _node ? _node->FirstChildElement( value ) : 0 );
- }
- /// Get the last child of this handle.
- XMLHandle LastChild() {
- return XMLHandle( _node ? _node->LastChild() : 0 );
- }
- /// Get the last child element of this handle.
- XMLHandle LastChildElement( const char* _value=0 ) {
- return XMLHandle( _node ? _node->LastChildElement( _value ) : 0 );
- }
- /// Get the previous sibling of this handle.
- XMLHandle PreviousSibling() {
- return XMLHandle( _node ? _node->PreviousSibling() : 0 );
- }
- /// Get the previous sibling element of this handle.
- XMLHandle PreviousSiblingElement( const char* _value=0 ) {
- return XMLHandle( _node ? _node->PreviousSiblingElement( _value ) : 0 );
- }
- /// Get the next sibling of this handle.
- XMLHandle NextSibling() {
- return XMLHandle( _node ? _node->NextSibling() : 0 );
- }
- /// Get the next sibling element of this handle.
- XMLHandle NextSiblingElement( const char* _value=0 ) {
- return XMLHandle( _node ? _node->NextSiblingElement( _value ) : 0 );
- }
-
- /// Safe cast to XMLNode. This can return null.
- XMLNode* ToNode() {
- return _node;
- }
- /// Safe cast to XMLElement. This can return null.
- XMLElement* ToElement() {
- return ( ( _node == 0 ) ? 0 : _node->ToElement() );
- }
- /// Safe cast to XMLText. This can return null.
- XMLText* ToText() {
- return ( ( _node == 0 ) ? 0 : _node->ToText() );
- }
- /// Safe cast to XMLUnknown. This can return null.
- XMLUnknown* ToUnknown() {
- return ( ( _node == 0 ) ? 0 : _node->ToUnknown() );
- }
- /// Safe cast to XMLDeclaration. This can return null.
- XMLDeclaration* ToDeclaration() {
- return ( ( _node == 0 ) ? 0 : _node->ToDeclaration() );
- }
-
-private:
- XMLNode* _node;
-};
-
-
-/**
- A variant of the XMLHandle class for working with const XMLNodes and Documents. It is the
- same in all regards, except for the 'const' qualifiers. See XMLHandle for API.
-*/
-class TINYXML2_LIB XMLConstHandle
-{
-public:
- XMLConstHandle( const XMLNode* node ) {
- _node = node;
- }
- XMLConstHandle( const XMLNode& node ) {
- _node = &node;
- }
- XMLConstHandle( const XMLConstHandle& ref ) {
- _node = ref._node;
- }
-
- XMLConstHandle& operator=( const XMLConstHandle& ref ) {
- _node = ref._node;
- return *this;
- }
-
- const XMLConstHandle FirstChild() const {
- return XMLConstHandle( _node ? _node->FirstChild() : 0 );
- }
- const XMLConstHandle FirstChildElement( const char* value=0 ) const {
- return XMLConstHandle( _node ? _node->FirstChildElement( value ) : 0 );
- }
- const XMLConstHandle LastChild() const {
- return XMLConstHandle( _node ? _node->LastChild() : 0 );
- }
- const XMLConstHandle LastChildElement( const char* _value=0 ) const {
- return XMLConstHandle( _node ? _node->LastChildElement( _value ) : 0 );
- }
- const XMLConstHandle PreviousSibling() const {
- return XMLConstHandle( _node ? _node->PreviousSibling() : 0 );
- }
- const XMLConstHandle PreviousSiblingElement( const char* _value=0 ) const {
- return XMLConstHandle( _node ? _node->PreviousSiblingElement( _value ) : 0 );
- }
- const XMLConstHandle NextSibling() const {
- return XMLConstHandle( _node ? _node->NextSibling() : 0 );
- }
- const XMLConstHandle NextSiblingElement( const char* _value=0 ) const {
- return XMLConstHandle( _node ? _node->NextSiblingElement( _value ) : 0 );
- }
-
-
- const XMLNode* ToNode() const {
- return _node;
- }
- const XMLElement* ToElement() const {
- return ( ( _node == 0 ) ? 0 : _node->ToElement() );
- }
- const XMLText* ToText() const {
- return ( ( _node == 0 ) ? 0 : _node->ToText() );
- }
- const XMLUnknown* ToUnknown() const {
- return ( ( _node == 0 ) ? 0 : _node->ToUnknown() );
- }
- const XMLDeclaration* ToDeclaration() const {
- return ( ( _node == 0 ) ? 0 : _node->ToDeclaration() );
- }
-
-private:
- const XMLNode* _node;
-};
-
-
-/**
- Printing functionality. The XMLPrinter gives you more
- options than the XMLDocument::Print() method.
-
- It can:
- -# Print to memory.
- -# Print to a file you provide.
- -# Print XML without a XMLDocument.
-
- Print to Memory
-
- @verbatim
- XMLPrinter printer;
- doc.Print( &printer );
- SomeFunction( printer.CStr() );
- @endverbatim
-
- Print to a File
-
- You provide the file pointer.
- @verbatim
- XMLPrinter printer( fp );
- doc.Print( &printer );
- @endverbatim
-
- Print without a XMLDocument
-
- When loading, an XML parser is very useful. However, sometimes
- when saving, it just gets in the way. The code is often set up
- for streaming, and constructing the DOM is just overhead.
-
- The Printer supports the streaming case. The following code
- prints out a trivially simple XML file without ever creating
- an XML document.
-
- @verbatim
- XMLPrinter printer( fp );
- printer.OpenElement( "foo" );
- printer.PushAttribute( "foo", "bar" );
- printer.CloseElement();
- @endverbatim
-*/
-class TINYXML2_LIB XMLPrinter : public XMLVisitor
-{
-public:
- /** Construct the printer. If the FILE* is specified,
- this will print to the FILE. Else it will print
- to memory, and the result is available in CStr().
- If 'compact' is set to true, then output is created
- with only required whitespace and newlines.
- */
- XMLPrinter( FILE* file=0, bool compact = false, int depth = 0 );
- virtual ~XMLPrinter() {}
-
- /** If streaming, write the BOM and declaration. */
- void PushHeader( bool writeBOM, bool writeDeclaration );
- /** If streaming, start writing an element.
- The element must be closed with CloseElement()
- */
- void OpenElement( const char* name, bool compactMode=false );
- /// If streaming, add an attribute to an open element.
- void PushAttribute( const char* name, const char* value );
- void PushAttribute( const char* name, int value );
- void PushAttribute( const char* name, unsigned value );
- void PushAttribute( const char* name, bool value );
- void PushAttribute( const char* name, double value );
- /// If streaming, close the Element.
- virtual void CloseElement( bool compactMode=false );
-
- /// Add a text node.
- void PushText( const char* text, bool cdata=false );
- /// Add a text node from an integer.
- void PushText( int value );
- /// Add a text node from an unsigned.
- void PushText( unsigned value );
- /// Add a text node from a bool.
- void PushText( bool value );
- /// Add a text node from a float.
- void PushText( float value );
- /// Add a text node from a double.
- void PushText( double value );
-
- /// Add a comment
- void PushComment( const char* comment );
-
- void PushDeclaration( const char* value );
- void PushUnknown( const char* value );
-
- virtual bool VisitEnter( const XMLDocument& /*doc*/ );
- virtual bool VisitExit( const XMLDocument& /*doc*/ ) {
- return true;
- }
-
- virtual bool VisitEnter( const XMLElement& element, const XMLAttribute* attribute );
- virtual bool VisitExit( const XMLElement& element );
-
- virtual bool Visit( const XMLText& text );
- virtual bool Visit( const XMLComment& comment );
- virtual bool Visit( const XMLDeclaration& declaration );
- virtual bool Visit( const XMLUnknown& unknown );
-
- /**
- If in print to memory mode, return a pointer to
- the XML file in memory.
- */
- const char* CStr() const {
- return _buffer.Mem();
- }
- /**
- If in print to memory mode, return the size
- of the XML file in memory. (Note the size returned
- includes the terminating null.)
- */
- int CStrSize() const {
- return _buffer.Size();
- }
- /**
- If in print to memory mode, reset the buffer to the
- beginning.
- */
- void ClearBuffer() {
- _buffer.Clear();
- _buffer.Push(0);
- }
-
-protected:
- virtual bool CompactMode( const XMLElement& ) { return _compactMode; }
-
- /** Prints out the space before an element. You may override to change
- the space and tabs used. A PrintSpace() override should call Print().
- */
- virtual void PrintSpace( int depth );
- void Print( const char* format, ... );
-
- void SealElement();
- bool _elementJustOpened;
- DynArray< const char*, 10 > _stack;
-
-private:
- void PrintString( const char*, bool restrictedEntitySet ); // prints out, after detecting entities.
-
- bool _firstElement;
- FILE* _fp;
- int _depth;
- int _textDepth;
- bool _processEntities;
- bool _compactMode;
-
- enum {
- ENTITY_RANGE = 64,
- BUF_SIZE = 200
- };
- bool _entityFlag[ENTITY_RANGE];
- bool _restrictedEntityFlag[ENTITY_RANGE];
-
- DynArray< char, 20 > _buffer;
-};
-
-
-} // tinyxml2
-
-#if defined(_MSC_VER)
-# pragma warning(pop)
-#endif
-
-#endif // TINYXML2_INCLUDED
diff --git a/src/thirdparty/MediaInfo/library b/src/thirdparty/MediaInfo/library
new file mode 160000
+Subproject 91168ceca6f620dc3931eaeb21fc23b1a81b2c7
diff --git a/src/thirdparty/RARFileSource/RARFileSource.vcxproj b/src/thirdparty/RARFileSource/RARFileSource.vcxproj
index 42a7f1e8e..628bcb9c7 100644
--- a/src/thirdparty/RARFileSource/RARFileSource.vcxproj
+++ b/src/thirdparty/RARFileSource/RARFileSource.vcxproj
@@ -1,151 +1,151 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{2B7F22D7-1750-47C5-8709-1A3688B62499}</ProjectGuid>
- <RootNamespace>RARFileSource</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- <ProjectName>RARFileSource</ProjectName>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{2B7F22D7-1750-47C5-8709-1A3688B62499}</ProjectGuid>
+ <RootNamespace>RARFileSource</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>RARFileSource</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <Import Project="..\..\platform.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\common.props" />
- <Import Project="..\..\common-3rd-party.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\common-3rd-party.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\common.props" />
- <Import Project="..\..\common-3rd-party.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\common-3rd-party.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\common.props" />
- <Import Project="..\..\common-3rd-party.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\common-3rd-party.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\common.props" />
- <Import Project="..\..\common-3rd-party.props" />
- </ImportGroup>
+ <Import Project="..\..\common-3rd-party.props" />
+ </ImportGroup>
<PropertyGroup Label="UserMacros">
<NOMINMAX>False</NOMINMAX>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>library;..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- <ResourceCompile>
- <ResourceOutputFileName>$(OutDir)$(ProjectName).res</ResourceOutputFileName>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>library;..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- <ResourceCompile>
- <ResourceOutputFileName>$(OutDir)$(ProjectName).res</ResourceOutputFileName>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>library;..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- <ResourceCompile>
- <ResourceOutputFileName>$(OutDir)$(ProjectName).res</ResourceOutputFileName>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>library;..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- <ResourceCompile>
- <ResourceOutputFileName>$(OutDir)$(ProjectName).res</ResourceOutputFileName>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="library\File.cpp" />
- <ClCompile Include="library\List.cpp">
- <ExcludedFromBuild>true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="library\Mediatype.cpp" />
- <ClCompile Include="library\OutputPin.cpp" />
- <ClCompile Include="library\RAR.cpp" />
- <ClCompile Include="library\RFS.cpp" />
- <ClCompile Include="library\Utils.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library\Anchor.h" />
- <ClInclude Include="library\File.h" />
- <ClInclude Include="library\List.h" />
- <ClInclude Include="library\Mediatype.h" />
- <ClInclude Include="library\OutputPin.h" />
- <ClInclude Include="library\RAR.h" />
- <ClInclude Include="library\RAR_defines.h" />
- <ClInclude Include="library\resource.h" />
- <ClInclude Include="library\RFS.h" />
- <ClInclude Include="library\Utils.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="library\RFS.def" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="library\RFS.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\filters\Filters.vcxproj">
- <Project>{273b3149-3192-4b75-a791-470320b90812}</Project>
- </ProjectReference>
- <ProjectReference Include="..\BaseClasses\BaseClasses.vcxproj">
- <Project>{e8a3f6fa-ae1c-4c8e-a0b6-9c8480324eaa}</Project>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>library;..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ </ClCompile>
+ <ResourceCompile>
+ <ResourceOutputFileName>$(OutDir)$(ProjectName).res</ResourceOutputFileName>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>library;..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ </ClCompile>
+ <ResourceCompile>
+ <ResourceOutputFileName>$(OutDir)$(ProjectName).res</ResourceOutputFileName>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>library;..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ </ClCompile>
+ <ResourceCompile>
+ <ResourceOutputFileName>$(OutDir)$(ProjectName).res</ResourceOutputFileName>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>library;..\BaseClasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ </ClCompile>
+ <ResourceCompile>
+ <ResourceOutputFileName>$(OutDir)$(ProjectName).res</ResourceOutputFileName>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="library\File.cpp" />
+ <ClCompile Include="library\List.cpp">
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="library\Mediatype.cpp" />
+ <ClCompile Include="library\OutputPin.cpp" />
+ <ClCompile Include="library\RAR.cpp" />
+ <ClCompile Include="library\RFS.cpp" />
+ <ClCompile Include="library\Utils.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="library\Anchor.h" />
+ <ClInclude Include="library\File.h" />
+ <ClInclude Include="library\List.h" />
+ <ClInclude Include="library\Mediatype.h" />
+ <ClInclude Include="library\OutputPin.h" />
+ <ClInclude Include="library\RAR.h" />
+ <ClInclude Include="library\RAR_defines.h" />
+ <ClInclude Include="library\resource.h" />
+ <ClInclude Include="library\RFS.h" />
+ <ClInclude Include="library\Utils.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="library\RFS.def" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="library\RFS.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\filters\Filters.vcxproj">
+ <Project>{273b3149-3192-4b75-a791-470320b90812}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\BaseClasses\BaseClasses.vcxproj">
+ <Project>{e8a3f6fa-ae1c-4c8e-a0b6-9c8480324eaa}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project> \ No newline at end of file
diff --git a/src/thirdparty/SoundTouch/SoundTouch.vcxproj b/src/thirdparty/SoundTouch/SoundTouch.vcxproj
new file mode 100644
index 000000000..e82487e88
--- /dev/null
+++ b/src/thirdparty/SoundTouch/SoundTouch.vcxproj
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{4C7A1953-CBC4-42D5-A12F-BB512C64B547}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <Import Project="..\..\platform.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\common.props" />
+ <Import Project="..\..\common-3rd-party.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>soundtouch\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="soundtouch\source\SoundTouch\AAFilter.cpp" />
+ <ClCompile Include="soundtouch\source\SoundTouch\BPMDetect.cpp" />
+ <ClCompile Include="soundtouch\source\SoundTouch\cpu_detect_x86.cpp" />
+ <ClCompile Include="soundtouch\source\SoundTouch\FIFOSampleBuffer.cpp" />
+ <ClCompile Include="soundtouch\source\SoundTouch\FIRFilter.cpp" />
+ <ClCompile Include="soundtouch\source\SoundTouch\InterpolateCubic.cpp" />
+ <ClCompile Include="soundtouch\source\SoundTouch\InterpolateLinear.cpp" />
+ <ClCompile Include="soundtouch\source\SoundTouch\InterpolateShannon.cpp" />
+ <ClCompile Include="soundtouch\source\SoundTouch\PeakFinder.cpp" />
+ <ClCompile Include="soundtouch\source\SoundTouch\RateTransposer.cpp" />
+ <ClCompile Include="soundtouch\source\SoundTouch\SoundTouch.cpp" />
+ <ClCompile Include="soundtouch\source\SoundTouch\sse_optimized.cpp" />
+ <ClCompile Include="soundtouch\source\SoundTouch\TDStretch.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="soundtouch\include\BPMDetect.h" />
+ <ClInclude Include="soundtouch\include\FIFOSampleBuffer.h" />
+ <ClInclude Include="soundtouch\include\FIFOSamplePipe.h" />
+ <ClInclude Include="soundtouch\include\SoundTouch.h" />
+ <ClInclude Include="soundtouch\include\STTypes.h" />
+ <ClInclude Include="soundtouch\source\SoundTouch\AAFilter.h" />
+ <ClInclude Include="soundtouch\source\SoundTouch\cpu_detect.h" />
+ <ClInclude Include="soundtouch\source\SoundTouch\FIRFilter.h" />
+ <ClInclude Include="soundtouch\source\SoundTouch\InterpolateCubic.h" />
+ <ClInclude Include="soundtouch\source\SoundTouch\InterpolateLinear.h" />
+ <ClInclude Include="soundtouch\source\SoundTouch\InterpolateShannon.h" />
+ <ClInclude Include="soundtouch\source\SoundTouch\PeakFinder.h" />
+ <ClInclude Include="soundtouch\source\SoundTouch\RateTransposer.h" />
+ <ClInclude Include="soundtouch\source\SoundTouch\TDStretch.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/thirdparty/SoundTouch/include/BPMDetect.h b/src/thirdparty/SoundTouch/include/BPMDetect.h
deleted file mode 100644
index f07cf54d7..000000000
--- a/src/thirdparty/SoundTouch/include/BPMDetect.h
+++ /dev/null
@@ -1,164 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Beats-per-minute (BPM) detection routine.
-///
-/// The beat detection algorithm works as follows:
-/// - Use function 'inputSamples' to input a chunks of samples to the class for
-/// analysis. It's a good idea to enter a large sound file or stream in smallish
-/// chunks of around few kilosamples in order not to extinguish too much RAM memory.
-/// - Input sound data is decimated to approx 500 Hz to reduce calculation burden,
-/// which is basically ok as low (bass) frequencies mostly determine the beat rate.
-/// Simple averaging is used for anti-alias filtering because the resulting signal
-/// quality isn't of that high importance.
-/// - Decimated sound data is enveloped, i.e. the amplitude shape is detected by
-/// taking absolute value that's smoothed by sliding average. Signal levels that
-/// are below a couple of times the general RMS amplitude level are cut away to
-/// leave only notable peaks there.
-/// - Repeating sound patterns (e.g. beats) are detected by calculating short-term
-/// autocorrelation function of the enveloped signal.
-/// - After whole sound data file has been analyzed as above, the bpm level is
-/// detected by function 'getBpm' that finds the highest peak of the autocorrelation
-/// function, calculates it's precise location and converts this reading to bpm's.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2012-08-30 19:53:44 +0000 (Thu, 30 Aug 2012) $
-// File revision : $Revision: 4 $
-//
-// $Id: BPMDetect.h 150 2012-08-30 19:53:44Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef _BPMDetect_H_
-#define _BPMDetect_H_
-
-#include "STTypes.h"
-#include "FIFOSampleBuffer.h"
-
-namespace soundtouch
-{
-
-/// Minimum allowed BPM rate. Used to restrict accepted result above a reasonable limit.
-#define MIN_BPM 29
-
-/// Maximum allowed BPM rate. Used to restrict accepted result below a reasonable limit.
-#define MAX_BPM 200
-
-
-/// Class for calculating BPM rate for audio data.
-class BPMDetect
-{
-protected:
- /// Auto-correlation accumulator bins.
- float *xcorr;
-
- /// Amplitude envelope sliding average approximation level accumulator
- double envelopeAccu;
-
- /// RMS volume sliding average approximation level accumulator
- double RMSVolumeAccu;
-
- /// Sample average counter.
- int decimateCount;
-
- /// Sample average accumulator for FIFO-like decimation.
- soundtouch::LONG_SAMPLETYPE decimateSum;
-
- /// Decimate sound by this coefficient to reach approx. 500 Hz.
- int decimateBy;
-
- /// Auto-correlation window length
- int windowLen;
-
- /// Number of channels (1 = mono, 2 = stereo)
- int channels;
-
- /// sample rate
- int sampleRate;
-
- /// Beginning of auto-correlation window: Autocorrelation isn't being updated for
- /// the first these many correlation bins.
- int windowStart;
-
- /// FIFO-buffer for decimated processing samples.
- soundtouch::FIFOSampleBuffer *buffer;
-
- /// Updates auto-correlation function for given number of decimated samples that
- /// are read from the internal 'buffer' pipe (samples aren't removed from the pipe
- /// though).
- void updateXCorr(int process_samples /// How many samples are processed.
- );
-
- /// Decimates samples to approx. 500 Hz.
- ///
- /// \return Number of output samples.
- int decimate(soundtouch::SAMPLETYPE *dest, ///< Destination buffer
- const soundtouch::SAMPLETYPE *src, ///< Source sample buffer
- int numsamples ///< Number of source samples.
- );
-
- /// Calculates amplitude envelope for the buffer of samples.
- /// Result is output to 'samples'.
- void calcEnvelope(soundtouch::SAMPLETYPE *samples, ///< Pointer to input/output data buffer
- int numsamples ///< Number of samples in buffer
- );
-
- /// remove constant bias from xcorr data
- void removeBias();
-
-public:
- /// Constructor.
- BPMDetect(int numChannels, ///< Number of channels in sample data.
- int sampleRate ///< Sample rate in Hz.
- );
-
- /// Destructor.
- virtual ~BPMDetect();
-
- /// Inputs a block of samples for analyzing: Envelopes the samples and then
- /// updates the autocorrelation estimation. When whole song data has been input
- /// in smaller blocks using this function, read the resulting bpm with 'getBpm'
- /// function.
- ///
- /// Notice that data in 'samples' array can be disrupted in processing.
- void inputSamples(const soundtouch::SAMPLETYPE *samples, ///< Pointer to input/working data buffer
- int numSamples ///< Number of samples in buffer
- );
-
-
- /// Analyzes the results and returns the BPM rate. Use this function to read result
- /// after whole song data has been input to the class by consecutive calls of
- /// 'inputSamples' function.
- ///
- /// \return Beats-per-minute rate, or zero if detection failed.
- float getBpm();
-};
-
-}
-
-#endif // _BPMDetect_H_
diff --git a/src/thirdparty/SoundTouch/include/FIFOSampleBuffer.h b/src/thirdparty/SoundTouch/include/FIFOSampleBuffer.h
deleted file mode 100644
index f04c6747b..000000000
--- a/src/thirdparty/SoundTouch/include/FIFOSampleBuffer.h
+++ /dev/null
@@ -1,184 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// A buffer class for temporarily storaging sound samples, operates as a
-/// first-in-first-out pipe.
-///
-/// Samples are added to the end of the sample buffer with the 'putSamples'
-/// function, and are received from the beginning of the buffer by calling
-/// the 'receiveSamples' function. The class automatically removes the
-/// output samples from the buffer as well as grows the storage size
-/// whenever necessary.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2014-01-05 21:40:22 +0000 (Sun, 05 Jan 2014) $
-// File revision : $Revision: 4 $
-//
-// $Id: FIFOSampleBuffer.h 177 2014-01-05 21:40:22Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef FIFOSampleBuffer_H
-#define FIFOSampleBuffer_H
-
-#include "FIFOSamplePipe.h"
-
-namespace soundtouch
-{
-
-/// Sample buffer working in FIFO (first-in-first-out) principle. The class takes
-/// care of storage size adjustment and data moving during input/output operations.
-///
-/// Notice that in case of stereo audio, one sample is considered to consist of
-/// both channel data.
-class FIFOSampleBuffer : public FIFOSamplePipe
-{
-private:
- /// Sample buffer.
- SAMPLETYPE *buffer;
-
- // Raw unaligned buffer memory. 'buffer' is made aligned by pointing it to first
- // 16-byte aligned location of this buffer
- SAMPLETYPE *bufferUnaligned;
-
- /// Sample buffer size in bytes
- uint sizeInBytes;
-
- /// How many samples are currently in buffer.
- uint samplesInBuffer;
-
- /// Channels, 1=mono, 2=stereo.
- uint channels;
-
- /// Current position pointer to the buffer. This pointer is increased when samples are
- /// removed from the pipe so that it's necessary to actually rewind buffer (move data)
- /// only new data when is put to the pipe.
- uint bufferPos;
-
- /// Rewind the buffer by moving data from position pointed by 'bufferPos' to real
- /// beginning of the buffer.
- void rewind();
-
- /// Ensures that the buffer has capacity for at least this many samples.
- void ensureCapacity(uint capacityRequirement);
-
- /// Returns current capacity.
- uint getCapacity() const;
-
-public:
-
- /// Constructor
- FIFOSampleBuffer(int numChannels = 2 ///< Number of channels, 1=mono, 2=stereo.
- ///< Default is stereo.
- );
-
- /// destructor
- ~FIFOSampleBuffer();
-
- /// Returns a pointer to the beginning of the output samples.
- /// This function is provided for accessing the output samples directly.
- /// Please be careful for not to corrupt the book-keeping!
- ///
- /// When using this function to output samples, also remember to 'remove' the
- /// output samples from the buffer by calling the
- /// 'receiveSamples(numSamples)' function
- virtual SAMPLETYPE *ptrBegin();
-
- /// Returns a pointer to the end of the used part of the sample buffer (i.e.
- /// where the new samples are to be inserted). This function may be used for
- /// inserting new samples into the sample buffer directly. Please be careful
- /// not corrupt the book-keeping!
- ///
- /// When using this function as means for inserting new samples, also remember
- /// to increase the sample count afterwards, by calling the
- /// 'putSamples(numSamples)' function.
- SAMPLETYPE *ptrEnd(
- uint slackCapacity ///< How much free capacity (in samples) there _at least_
- ///< should be so that the caller can succesfully insert the
- ///< desired samples to the buffer. If necessary, the function
- ///< grows the buffer size to comply with this requirement.
- );
-
- /// Adds 'numSamples' pcs of samples from the 'samples' memory position to
- /// the sample buffer.
- virtual void putSamples(const SAMPLETYPE *samples, ///< Pointer to samples.
- uint numSamples ///< Number of samples to insert.
- );
-
- /// Adjusts the book-keeping to increase number of samples in the buffer without
- /// copying any actual samples.
- ///
- /// This function is used to update the number of samples in the sample buffer
- /// when accessing the buffer directly with 'ptrEnd' function. Please be
- /// careful though!
- virtual void putSamples(uint numSamples ///< Number of samples been inserted.
- );
-
- /// Output samples from beginning of the sample buffer. Copies requested samples to
- /// output buffer and removes them from the sample buffer. If there are less than
- /// 'numsample' samples in the buffer, returns all that available.
- ///
- /// \return Number of samples returned.
- virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples.
- uint maxSamples ///< How many samples to receive at max.
- );
-
- /// Adjusts book-keeping so that given number of samples are removed from beginning of the
- /// sample buffer without copying them anywhere.
- ///
- /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
- /// with 'ptrBegin' function.
- virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
- );
-
- /// Returns number of samples currently available.
- virtual uint numSamples() const;
-
- /// Sets number of channels, 1 = mono, 2 = stereo.
- void setChannels(int numChannels);
-
- /// Get number of channels
- int getChannels()
- {
- return channels;
- }
-
- /// Returns nonzero if there aren't any samples available for outputting.
- virtual int isEmpty() const;
-
- /// Clears all the samples.
- virtual void clear();
-
- /// allow trimming (downwards) amount of samples in pipeline.
- /// Returns adjusted amount of samples
- uint adjustAmountOfSamples(uint numSamples);
-};
-
-}
-
-#endif
diff --git a/src/thirdparty/SoundTouch/include/FIFOSamplePipe.h b/src/thirdparty/SoundTouch/include/FIFOSamplePipe.h
deleted file mode 100644
index ab8a9791a..000000000
--- a/src/thirdparty/SoundTouch/include/FIFOSamplePipe.h
+++ /dev/null
@@ -1,234 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// 'FIFOSamplePipe' : An abstract base class for classes that manipulate sound
-/// samples by operating like a first-in-first-out pipe: New samples are fed
-/// into one end of the pipe with the 'putSamples' function, and the processed
-/// samples are received from the other end with the 'receiveSamples' function.
-///
-/// 'FIFOProcessor' : A base class for classes the do signal processing with
-/// the samples while operating like a first-in-first-out pipe. When samples
-/// are input with the 'putSamples' function, the class processes them
-/// and moves the processed samples to the given 'output' pipe object, which
-/// may be either another processing stage, or a fifo sample buffer object.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2012-06-13 19:29:53 +0000 (Wed, 13 Jun 2012) $
-// File revision : $Revision: 4 $
-//
-// $Id: FIFOSamplePipe.h 143 2012-06-13 19:29:53Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef FIFOSamplePipe_H
-#define FIFOSamplePipe_H
-
-#include <assert.h>
-#include <stdlib.h>
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-/// Abstract base class for FIFO (first-in-first-out) sample processing classes.
-class FIFOSamplePipe
-{
-public:
- // virtual default destructor
- virtual ~FIFOSamplePipe() {}
-
-
- /// Returns a pointer to the beginning of the output samples.
- /// This function is provided for accessing the output samples directly.
- /// Please be careful for not to corrupt the book-keeping!
- ///
- /// When using this function to output samples, also remember to 'remove' the
- /// output samples from the buffer by calling the
- /// 'receiveSamples(numSamples)' function
- virtual SAMPLETYPE *ptrBegin() = 0;
-
- /// Adds 'numSamples' pcs of samples from the 'samples' memory position to
- /// the sample buffer.
- virtual void putSamples(const SAMPLETYPE *samples, ///< Pointer to samples.
- uint numSamples ///< Number of samples to insert.
- ) = 0;
-
-
- // Moves samples from the 'other' pipe instance to this instance.
- void moveSamples(FIFOSamplePipe &other ///< Other pipe instance where from the receive the data.
- )
- {
- int oNumSamples = other.numSamples();
-
- putSamples(other.ptrBegin(), oNumSamples);
- other.receiveSamples(oNumSamples);
- };
-
- /// Output samples from beginning of the sample buffer. Copies requested samples to
- /// output buffer and removes them from the sample buffer. If there are less than
- /// 'numsample' samples in the buffer, returns all that available.
- ///
- /// \return Number of samples returned.
- virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples.
- uint maxSamples ///< How many samples to receive at max.
- ) = 0;
-
- /// Adjusts book-keeping so that given number of samples are removed from beginning of the
- /// sample buffer without copying them anywhere.
- ///
- /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
- /// with 'ptrBegin' function.
- virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
- ) = 0;
-
- /// Returns number of samples currently available.
- virtual uint numSamples() const = 0;
-
- // Returns nonzero if there aren't any samples available for outputting.
- virtual int isEmpty() const = 0;
-
- /// Clears all the samples.
- virtual void clear() = 0;
-
- /// allow trimming (downwards) amount of samples in pipeline.
- /// Returns adjusted amount of samples
- virtual uint adjustAmountOfSamples(uint numSamples) = 0;
-
-};
-
-
-
-/// Base-class for sound processing routines working in FIFO principle. With this base
-/// class it's easy to implement sound processing stages that can be chained together,
-/// so that samples that are fed into beginning of the pipe automatically go through
-/// all the processing stages.
-///
-/// When samples are input to this class, they're first processed and then put to
-/// the FIFO pipe that's defined as output of this class. This output pipe can be
-/// either other processing stage or a FIFO sample buffer.
-class FIFOProcessor :public FIFOSamplePipe
-{
-protected:
- /// Internal pipe where processed samples are put.
- FIFOSamplePipe *output;
-
- /// Sets output pipe.
- void setOutPipe(FIFOSamplePipe *pOutput)
- {
- assert(output == NULL);
- assert(pOutput != NULL);
- output = pOutput;
- }
-
-
- /// Constructor. Doesn't define output pipe; it has to be set be
- /// 'setOutPipe' function.
- FIFOProcessor()
- {
- output = NULL;
- }
-
-
- /// Constructor. Configures output pipe.
- FIFOProcessor(FIFOSamplePipe *pOutput ///< Output pipe.
- )
- {
- output = pOutput;
- }
-
-
- /// Destructor.
- virtual ~FIFOProcessor()
- {
- }
-
-
- /// Returns a pointer to the beginning of the output samples.
- /// This function is provided for accessing the output samples directly.
- /// Please be careful for not to corrupt the book-keeping!
- ///
- /// When using this function to output samples, also remember to 'remove' the
- /// output samples from the buffer by calling the
- /// 'receiveSamples(numSamples)' function
- virtual SAMPLETYPE *ptrBegin()
- {
- return output->ptrBegin();
- }
-
-public:
-
- /// Output samples from beginning of the sample buffer. Copies requested samples to
- /// output buffer and removes them from the sample buffer. If there are less than
- /// 'numsample' samples in the buffer, returns all that available.
- ///
- /// \return Number of samples returned.
- virtual uint receiveSamples(SAMPLETYPE *outBuffer, ///< Buffer where to copy output samples.
- uint maxSamples ///< How many samples to receive at max.
- )
- {
- return output->receiveSamples(outBuffer, maxSamples);
- }
-
-
- /// Adjusts book-keeping so that given number of samples are removed from beginning of the
- /// sample buffer without copying them anywhere.
- ///
- /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
- /// with 'ptrBegin' function.
- virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
- )
- {
- return output->receiveSamples(maxSamples);
- }
-
-
- /// Returns number of samples currently available.
- virtual uint numSamples() const
- {
- return output->numSamples();
- }
-
-
- /// Returns nonzero if there aren't any samples available for outputting.
- virtual int isEmpty() const
- {
- return output->isEmpty();
- }
-
- /// allow trimming (downwards) amount of samples in pipeline.
- /// Returns adjusted amount of samples
- virtual uint adjustAmountOfSamples(uint numSamples)
- {
- return output->adjustAmountOfSamples(numSamples);
- }
-
-};
-
-}
-
-#endif
diff --git a/src/thirdparty/SoundTouch/include/STTypes.h b/src/thirdparty/SoundTouch/include/STTypes.h
deleted file mode 100644
index 238ebbc1a..000000000
--- a/src/thirdparty/SoundTouch/include/STTypes.h
+++ /dev/null
@@ -1,189 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Common type definitions for SoundTouch audio processing library.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2015-05-18 15:25:07 +0000 (Mon, 18 May 2015) $
-// File revision : $Revision: 3 $
-//
-// $Id: STTypes.h 215 2015-05-18 15:25:07Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef STTypes_H
-#define STTypes_H
-
-typedef unsigned int uint;
-typedef unsigned long ulong;
-
-// Patch for MinGW: on Win64 long is 32-bit
-#ifdef _WIN64
- typedef unsigned long long ulongptr;
-#else
- typedef ulong ulongptr;
-#endif
-
-
-// Helper macro for aligning pointer up to next 16-byte boundary
-#define SOUNDTOUCH_ALIGN_POINTER_16(x) ( ( (ulongptr)(x) + 15 ) & ~(ulongptr)15 )
-
-
-#if (defined(__GNUC__) && !defined(ANDROID))
- // In GCC, include soundtouch_config.h made by config scritps.
- // Skip this in Android compilation that uses GCC but without configure scripts.
- #include "soundtouch_config.h"
-#endif
-
-
-namespace soundtouch
-{
- /// Activate these undef's to overrule the possible sampletype
- /// setting inherited from some other header file:
- //#undef SOUNDTOUCH_INTEGER_SAMPLES
- //#undef SOUNDTOUCH_FLOAT_SAMPLES
-
- /// If following flag is defined, always uses multichannel processing
- /// routines also for mono and stero sound. This is for routine testing
- /// purposes; output should be same with either routines, yet disabling
- /// the dedicated mono/stereo processing routines will result in slower
- /// runtime performance so recommendation is to keep this off.
- // #define USE_MULTICH_ALWAYS
-
- #if (defined(__SOFTFP__) && defined(ANDROID))
- // For Android compilation: Force use of Integer samples in case that
- // compilation uses soft-floating point emulation - soft-fp is way too slow
- #undef SOUNDTOUCH_FLOAT_SAMPLES
- #define SOUNDTOUCH_INTEGER_SAMPLES 1
- #endif
-
- #if !(SOUNDTOUCH_INTEGER_SAMPLES || SOUNDTOUCH_FLOAT_SAMPLES)
-
- /// Choose either 32bit floating point or 16bit integer sampletype
- /// by choosing one of the following defines, unless this selection
- /// has already been done in some other file.
- ////
- /// Notes:
- /// - In Windows environment, choose the sample format with the
- /// following defines.
- /// - In GNU environment, the floating point samples are used by
- /// default, but integer samples can be chosen by giving the
- /// following switch to the configure script:
- /// ./configure --enable-integer-samples
- /// However, if you still prefer to select the sample format here
- /// also in GNU environment, then please #undef the INTEGER_SAMPLE
- /// and FLOAT_SAMPLE defines first as in comments above.
-
- // MPC-HC patch: define SOUNDTOUCH_INTEGER_SAMPLES
- // the default is SOUNDTOUCH_FLOAT_SAMPLES
- #define SOUNDTOUCH_INTEGER_SAMPLES 1 //< 16bit integer samples
- //#define SOUNDTOUCH_FLOAT_SAMPLES 1 //< 32bit float samples
-
- #endif
-
- #if (_M_IX86 || __i386__ || __x86_64__) /* MPC-HC patch: don't use optimizations for x64 (_M_X64);
- The __m64 data type is not supported on x64 processors */
- /// Define this to allow X86-specific assembler/intrinsic optimizations.
- /// Notice that library contains also usual C++ versions of each of these
- /// these routines, so if you're having difficulties getting the optimized
- /// routines compiled for whatever reason, you may disable these optimizations
- /// to make the library compile.
-
- #define SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS 1
-
- /// In GNU environment, allow the user to override this setting by
- /// giving the following switch to the configure script:
- /// ./configure --disable-x86-optimizations
- /// ./configure --enable-x86-optimizations=no
- #ifdef SOUNDTOUCH_DISABLE_X86_OPTIMIZATIONS
- #undef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
- #endif
- #else
- /// Always disable optimizations when not using a x86 systems.
- #undef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
-
- #endif
-
- // If defined, allows the SIMD-optimized routines to take minor shortcuts
- // for improved performance. Undefine to require faithfully similar SIMD
- // calculations as in normal C implementation.
- #define SOUNDTOUCH_ALLOW_NONEXACT_SIMD_OPTIMIZATION 1
-
-
- #ifdef SOUNDTOUCH_INTEGER_SAMPLES
- // 16bit integer sample type
- typedef short SAMPLETYPE;
- // data type for sample accumulation: Use 32bit integer to prevent overflows
- typedef long LONG_SAMPLETYPE;
-
- #ifdef SOUNDTOUCH_FLOAT_SAMPLES
- // check that only one sample type is defined
- #error "conflicting sample types defined"
- #endif // SOUNDTOUCH_FLOAT_SAMPLES
-
- #ifdef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
- // Allow MMX optimizations
- #define SOUNDTOUCH_ALLOW_MMX 1
- #endif
-
- #else
-
- // floating point samples
- typedef float SAMPLETYPE;
- // data type for sample accumulation: Use double to utilize full precision.
- typedef double LONG_SAMPLETYPE;
-
- #ifdef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
- // Allow SSE optimizations
- #define SOUNDTOUCH_ALLOW_SSE 1
- #endif
-
- #endif // SOUNDTOUCH_INTEGER_SAMPLES
-
-};
-
-// define ST_NO_EXCEPTION_HANDLING switch to disable throwing std exceptions:
-// #define ST_NO_EXCEPTION_HANDLING 1
-#ifdef ST_NO_EXCEPTION_HANDLING
- // Exceptions disabled. Throw asserts instead if enabled.
- #include <assert.h>
- #define ST_THROW_RT_ERROR(x) {assert((const char *)x);}
-#else
- // use c++ standard exceptions
- #include <stdexcept>
- #include <string>
- #define ST_THROW_RT_ERROR(x) {throw std::runtime_error(x);}
-#endif
-
-// When this #define is active, eliminates a clicking sound when the "rate" or "pitch"
-// parameter setting crosses from value <1 to >=1 or vice versa during processing.
-// Default is off as such crossover is untypical case and involves a slight sound
-// quality compromise.
-//#define SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER 1
-
-#endif
diff --git a/src/thirdparty/SoundTouch/include/SoundTouch.h b/src/thirdparty/SoundTouch/include/SoundTouch.h
deleted file mode 100644
index e4a0b4165..000000000
--- a/src/thirdparty/SoundTouch/include/SoundTouch.h
+++ /dev/null
@@ -1,277 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-///
-/// SoundTouch - main class for tempo/pitch/rate adjusting routines.
-///
-/// Notes:
-/// - Initialize the SoundTouch object instance by setting up the sound stream
-/// parameters with functions 'setSampleRate' and 'setChannels', then set
-/// desired tempo/pitch/rate settings with the corresponding functions.
-///
-/// - The SoundTouch class behaves like a first-in-first-out pipeline: The
-/// samples that are to be processed are fed into one of the pipe by calling
-/// function 'putSamples', while the ready processed samples can be read
-/// from the other end of the pipeline with function 'receiveSamples'.
-///
-/// - The SoundTouch processing classes require certain sized 'batches' of
-/// samples in order to process the sound. For this reason the classes buffer
-/// incoming samples until there are enough of samples available for
-/// processing, then they carry out the processing step and consequently
-/// make the processed samples available for outputting.
-///
-/// - For the above reason, the processing routines introduce a certain
-/// 'latency' between the input and output, so that the samples input to
-/// SoundTouch may not be immediately available in the output, and neither
-/// the amount of outputtable samples may not immediately be in direct
-/// relationship with the amount of previously input samples.
-///
-/// - The tempo/pitch/rate control parameters can be altered during processing.
-/// Please notice though that they aren't currently protected by semaphores,
-/// so in multi-thread application external semaphore protection may be
-/// required.
-///
-/// - This class utilizes classes 'TDStretch' for tempo change (without modifying
-/// pitch) and 'RateTransposer' for changing the playback rate (that is, both
-/// tempo and pitch in the same ratio) of the sound. The third available control
-/// 'pitch' (change pitch but maintain tempo) is produced by a combination of
-/// combining the two other controls.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2015-05-18 15:28:41 +0000 (Mon, 18 May 2015) $
-// File revision : $Revision: 4 $
-//
-// $Id: SoundTouch.h 216 2015-05-18 15:28:41Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef SoundTouch_H
-#define SoundTouch_H
-
-#include "FIFOSamplePipe.h"
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-/// Soundtouch library version string
-#define SOUNDTOUCH_VERSION "1.9.0"
-
-/// SoundTouch library version id
-#define SOUNDTOUCH_VERSION_ID (10900)
-
-//
-// Available setting IDs for the 'setSetting' & 'get_setting' functions:
-
-/// Enable/disable anti-alias filter in pitch transposer (0 = disable)
-#define SETTING_USE_AA_FILTER 0
-
-/// Pitch transposer anti-alias filter length (8 .. 128 taps, default = 32)
-#define SETTING_AA_FILTER_LENGTH 1
-
-/// Enable/disable quick seeking algorithm in tempo changer routine
-/// (enabling quick seeking lowers CPU utilization but causes a minor sound
-/// quality compromising)
-#define SETTING_USE_QUICKSEEK 2
-
-/// Time-stretch algorithm single processing sequence length in milliseconds. This determines
-/// to how long sequences the original sound is chopped in the time-stretch algorithm.
-/// See "STTypes.h" or README for more information.
-#define SETTING_SEQUENCE_MS 3
-
-/// Time-stretch algorithm seeking window length in milliseconds for algorithm that finds the
-/// best possible overlapping location. This determines from how wide window the algorithm
-/// may look for an optimal joining location when mixing the sound sequences back together.
-/// See "STTypes.h" or README for more information.
-#define SETTING_SEEKWINDOW_MS 4
-
-/// Time-stretch algorithm overlap length in milliseconds. When the chopped sound sequences
-/// are mixed back together, to form a continuous sound stream, this parameter defines over
-/// how long period the two consecutive sequences are let to overlap each other.
-/// See "STTypes.h" or README for more information.
-#define SETTING_OVERLAP_MS 5
-
-
-/// Call "getSetting" with this ID to query nominal average processing sequence
-/// size in samples. This value tells approcimate value how many input samples
-/// SoundTouch needs to gather before it does DSP processing run for the sample batch.
-///
-/// Notices:
-/// - This is read-only parameter, i.e. setSetting ignores this parameter
-/// - Returned value is approximate average value, exact processing batch
-/// size may wary from time to time
-/// - This parameter value is not constant but may change depending on
-/// tempo/pitch/rate/samplerate settings.
-#define SETTING_NOMINAL_INPUT_SEQUENCE 6
-
-
-/// Call "getSetting" with this ID to query nominal average processing output
-/// size in samples. This value tells approcimate value how many output samples
-/// SoundTouch outputs once it does DSP processing run for a batch of input samples.
-///
-/// Notices:
-/// - This is read-only parameter, i.e. setSetting ignores this parameter
-/// - Returned value is approximate average value, exact processing batch
-/// size may wary from time to time
-/// - This parameter value is not constant but may change depending on
-/// tempo/pitch/rate/samplerate settings.
-#define SETTING_NOMINAL_OUTPUT_SEQUENCE 7
-
-class SoundTouch : public FIFOProcessor
-{
-private:
- /// Rate transposer class instance
- class RateTransposer *pRateTransposer;
-
- /// Time-stretch class instance
- class TDStretch *pTDStretch;
-
- /// Virtual pitch parameter. Effective rate & tempo are calculated from these parameters.
- float virtualRate;
-
- /// Virtual pitch parameter. Effective rate & tempo are calculated from these parameters.
- float virtualTempo;
-
- /// Virtual pitch parameter. Effective rate & tempo are calculated from these parameters.
- float virtualPitch;
-
- /// Flag: Has sample rate been set?
- bool bSrateSet;
-
- /// Calculates effective rate & tempo valuescfrom 'virtualRate', 'virtualTempo' and
- /// 'virtualPitch' parameters.
- void calcEffectiveRateAndTempo();
-
-protected :
- /// Number of channels
- uint channels;
-
- /// Effective 'rate' value calculated from 'virtualRate', 'virtualTempo' and 'virtualPitch'
- float rate;
-
- /// Effective 'tempo' value calculated from 'virtualRate', 'virtualTempo' and 'virtualPitch'
- float tempo;
-
-public:
- SoundTouch();
- virtual ~SoundTouch();
-
- /// Get SoundTouch library version string
- static const char *getVersionString();
-
- /// Get SoundTouch library version Id
- static uint getVersionId();
-
- /// Sets new rate control value. Normal rate = 1.0, smaller values
- /// represent slower rate, larger faster rates.
- void setRate(float newRate);
-
- /// Sets new tempo control value. Normal tempo = 1.0, smaller values
- /// represent slower tempo, larger faster tempo.
- void setTempo(float newTempo);
-
- /// Sets new rate control value as a difference in percents compared
- /// to the original rate (-50 .. +100 %)
- void setRateChange(float newRate);
-
- /// Sets new tempo control value as a difference in percents compared
- /// to the original tempo (-50 .. +100 %)
- void setTempoChange(float newTempo);
-
- /// Sets new pitch control value. Original pitch = 1.0, smaller values
- /// represent lower pitches, larger values higher pitch.
- void setPitch(float newPitch);
-
- /// Sets pitch change in octaves compared to the original pitch
- /// (-1.00 .. +1.00)
- void setPitchOctaves(float newPitch);
-
- /// Sets pitch change in semi-tones compared to the original pitch
- /// (-12 .. +12)
- void setPitchSemiTones(int newPitch);
- void setPitchSemiTones(float newPitch);
-
- /// Sets the number of channels, 1 = mono, 2 = stereo
- void setChannels(uint numChannels);
-
- /// Sets sample rate.
- void setSampleRate(uint srate);
-
- /// Flushes the last samples from the processing pipeline to the output.
- /// Clears also the internal processing buffers.
- //
- /// Note: This function is meant for extracting the last samples of a sound
- /// stream. This function may introduce additional blank samples in the end
- /// of the sound stream, and thus it's not recommended to call this function
- /// in the middle of a sound stream.
- void flush();
-
- /// Adds 'numSamples' pcs of samples from the 'samples' memory position into
- /// the input of the object. Notice that sample rate _has_to_ be set before
- /// calling this function, otherwise throws a runtime_error exception.
- virtual void putSamples(
- const SAMPLETYPE *samples, ///< Pointer to sample buffer.
- uint numSamples ///< Number of samples in buffer. Notice
- ///< that in case of stereo-sound a single sample
- ///< contains data for both channels.
- );
-
- /// Clears all the samples in the object's output and internal processing
- /// buffers.
- virtual void clear();
-
- /// Changes a setting controlling the processing system behaviour. See the
- /// 'SETTING_...' defines for available setting ID's.
- ///
- /// \return 'true' if the setting was succesfully changed
- bool setSetting(int settingId, ///< Setting ID number. see SETTING_... defines.
- int value ///< New setting value.
- );
-
- /// Reads a setting controlling the processing system behaviour. See the
- /// 'SETTING_...' defines for available setting ID's.
- ///
- /// \return the setting value.
- int getSetting(int settingId ///< Setting ID number, see SETTING_... defines.
- ) const;
-
- /// Returns number of samples currently unprocessed.
- virtual uint numUnprocessedSamples() const;
-
-
- /// Other handy functions that are implemented in the ancestor classes (see
- /// classes 'FIFOProcessor' and 'FIFOSamplePipe')
- ///
- /// - receiveSamples() : Use this function to receive 'ready' processed samples from SoundTouch.
- /// - numSamples() : Get number of 'ready' samples that can be received with
- /// function 'receiveSamples()'
- /// - isEmpty() : Returns nonzero if there aren't any 'ready' samples.
- /// - clear() : Clears all samples from ready/processing buffers.
-};
-
-}
-#endif
diff --git a/src/thirdparty/SoundTouch/soundtouch b/src/thirdparty/SoundTouch/soundtouch
new file mode 160000
+Subproject adb60efd61648d9e5068c0ec1fa13c9dbbe728b
diff --git a/src/thirdparty/SoundTouch/source/AAFilter.cpp b/src/thirdparty/SoundTouch/source/AAFilter.cpp
deleted file mode 100644
index d6c0e1ec9..000000000
--- a/src/thirdparty/SoundTouch/source/AAFilter.cpp
+++ /dev/null
@@ -1,236 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// FIR low-pass (anti-alias) filter with filter coefficient design routine and
-/// MMX optimization.
-///
-/// Anti-alias filter is used to prevent folding of high frequencies when
-/// transposing the sample rate with interpolation.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2014-01-05 21:40:22 +0000 (Sun, 05 Jan 2014) $
-// File revision : $Revision: 4 $
-//
-// $Id: AAFilter.cpp 177 2014-01-05 21:40:22Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include <memory.h>
-#include <assert.h>
-#include <math.h>
-#include <stdlib.h>
-#include "AAFilter.h"
-#include "FIRFilter.h"
-
-using namespace soundtouch;
-
-#define PI M_PI // MPC-HC custom: define PI to M_PI from math.h
-#define TWOPI (2 * PI)
-
-// define this to save AA filter coefficients to a file
-// #define _DEBUG_SAVE_AAFILTER_COEFFICIENTS 1
-
-#ifdef _DEBUG_SAVE_AAFILTER_COEFFICIENTS
- #include <stdio.h>
-
- static void _DEBUG_SAVE_AAFIR_COEFFS(SAMPLETYPE *coeffs, int len)
- {
- FILE *fptr = fopen("aa_filter_coeffs.txt", "wt");
- if (fptr == NULL) return;
-
- for (int i = 0; i < len; i ++)
- {
- double temp = coeffs[i];
- fprintf(fptr, "%lf\n", temp);
- }
- fclose(fptr);
- }
-
-#else
- #define _DEBUG_SAVE_AAFIR_COEFFS(x, y)
-#endif
-
-
-/*****************************************************************************
- *
- * Implementation of the class 'AAFilter'
- *
- *****************************************************************************/
-
-AAFilter::AAFilter(uint len)
-{
- pFIR = FIRFilter::newInstance();
- cutoffFreq = 0.5;
- setLength(len);
-}
-
-
-
-AAFilter::~AAFilter()
-{
- delete pFIR;
-}
-
-
-
-// Sets new anti-alias filter cut-off edge frequency, scaled to
-// sampling frequency (nyquist frequency = 0.5).
-// The filter will cut frequencies higher than the given frequency.
-void AAFilter::setCutoffFreq(double newCutoffFreq)
-{
- cutoffFreq = newCutoffFreq;
- calculateCoeffs();
-}
-
-
-
-// Sets number of FIR filter taps
-void AAFilter::setLength(uint newLength)
-{
- length = newLength;
- calculateCoeffs();
-}
-
-
-
-// Calculates coefficients for a low-pass FIR filter using Hamming window
-void AAFilter::calculateCoeffs()
-{
- uint i;
- double cntTemp, temp, tempCoeff,h, w;
- double wc;
- double scaleCoeff, sum;
- double *work;
- SAMPLETYPE *coeffs;
-
- assert(length >= 2);
- assert(length % 4 == 0);
- assert(cutoffFreq >= 0);
- assert(cutoffFreq <= 0.5);
-
- work = new double[length];
- coeffs = new SAMPLETYPE[length];
-
- wc = 2.0 * PI * cutoffFreq;
- tempCoeff = TWOPI / (double)length;
-
- sum = 0;
- for (i = 0; i < length; i ++)
- {
- cntTemp = (double)i - (double)(length / 2);
-
- temp = cntTemp * wc;
- if (temp != 0)
- {
- h = sin(temp) / temp; // sinc function
- }
- else
- {
- h = 1.0;
- }
- w = 0.54 + 0.46 * cos(tempCoeff * cntTemp); // hamming window
-
- temp = w * h;
- work[i] = temp;
-
- // calc net sum of coefficients
- sum += temp;
- }
-
- // ensure the sum of coefficients is larger than zero
- assert(sum > 0);
-
- // ensure we've really designed a lowpass filter...
- assert(work[length/2] > 0);
- assert(work[length/2 + 1] > -1e-6);
- assert(work[length/2 - 1] > -1e-6);
-
- // Calculate a scaling coefficient in such a way that the result can be
- // divided by 16384
- scaleCoeff = 16384.0f / sum;
-
- for (i = 0; i < length; i ++)
- {
- temp = work[i] * scaleCoeff;
-//#if SOUNDTOUCH_INTEGER_SAMPLES
- // scale & round to nearest integer
- temp += (temp >= 0) ? 0.5 : -0.5;
- // ensure no overfloods
- assert(temp >= -32768 && temp <= 32767);
-//#endif
- coeffs[i] = (SAMPLETYPE)temp;
- }
-
- // Set coefficients. Use divide factor 14 => divide result by 2^14 = 16384
- pFIR->setCoefficients(coeffs, length, 14);
-
- _DEBUG_SAVE_AAFIR_COEFFS(coeffs, length);
-
- delete[] work;
- delete[] coeffs;
-}
-
-
-// Applies the filter to the given sequence of samples.
-// Note : The amount of outputted samples is by value of 'filter length'
-// smaller than the amount of input samples.
-uint AAFilter::evaluate(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels) const
-{
- return pFIR->evaluate(dest, src, numSamples, numChannels);
-}
-
-
-/// Applies the filter to the given src & dest pipes, so that processed amount of
-/// samples get removed from src, and produced amount added to dest
-/// Note : The amount of outputted samples is by value of 'filter length'
-/// smaller than the amount of input samples.
-uint AAFilter::evaluate(FIFOSampleBuffer &dest, FIFOSampleBuffer &src) const
-{
- SAMPLETYPE *pdest;
- const SAMPLETYPE *psrc;
- uint numSrcSamples;
- uint result;
- int numChannels = src.getChannels();
-
- assert(numChannels == dest.getChannels());
-
- numSrcSamples = src.numSamples();
- psrc = src.ptrBegin();
- pdest = dest.ptrEnd(numSrcSamples);
- result = pFIR->evaluate(pdest, psrc, numSrcSamples, numChannels);
- src.receiveSamples(result);
- dest.putSamples(result);
-
- return result;
-}
-
-
-uint AAFilter::getLength() const
-{
- return pFIR->getLength();
-}
diff --git a/src/thirdparty/SoundTouch/source/AAFilter.h b/src/thirdparty/SoundTouch/source/AAFilter.h
deleted file mode 100644
index 4016c0f23..000000000
--- a/src/thirdparty/SoundTouch/source/AAFilter.h
+++ /dev/null
@@ -1,100 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Sampled sound tempo changer/time stretch algorithm. Changes the sound tempo
-/// while maintaining the original pitch by using a time domain WSOLA-like method
-/// with several performance-increasing tweaks.
-///
-/// Anti-alias filter is used to prevent folding of high frequencies when
-/// transposing the sample rate with interpolation.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2014-01-07 19:41:23 +0000 (Tue, 07 Jan 2014) $
-// File revision : $Revision: 4 $
-//
-// $Id: AAFilter.h 187 2014-01-07 19:41:23Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef AAFilter_H
-#define AAFilter_H
-
-#include "STTypes.h"
-#include "FIFOSampleBuffer.h"
-
-namespace soundtouch
-{
-
-class AAFilter
-{
-protected:
- class FIRFilter *pFIR;
-
- /// Low-pass filter cut-off frequency, negative = invalid
- double cutoffFreq;
-
- /// num of filter taps
- uint length;
-
- /// Calculate the FIR coefficients realizing the given cutoff-frequency
- void calculateCoeffs();
-public:
- AAFilter(uint length);
-
- ~AAFilter();
-
- /// Sets new anti-alias filter cut-off edge frequency, scaled to sampling
- /// frequency (nyquist frequency = 0.5). The filter will cut off the
- /// frequencies than that.
- void setCutoffFreq(double newCutoffFreq);
-
- /// Sets number of FIR filter taps, i.e. ~filter complexity
- void setLength(uint newLength);
-
- uint getLength() const;
-
- /// Applies the filter to the given sequence of samples.
- /// Note : The amount of outputted samples is by value of 'filter length'
- /// smaller than the amount of input samples.
- uint evaluate(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- uint numSamples,
- uint numChannels) const;
-
- /// Applies the filter to the given src & dest pipes, so that processed amount of
- /// samples get removed from src, and produced amount added to dest
- /// Note : The amount of outputted samples is by value of 'filter length'
- /// smaller than the amount of input samples.
- uint evaluate(FIFOSampleBuffer &dest,
- FIFOSampleBuffer &src) const;
-
-};
-
-}
-
-#endif
diff --git a/src/thirdparty/SoundTouch/source/BPMDetect.cpp b/src/thirdparty/SoundTouch/source/BPMDetect.cpp
deleted file mode 100644
index b77898ac8..000000000
--- a/src/thirdparty/SoundTouch/source/BPMDetect.cpp
+++ /dev/null
@@ -1,371 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Beats-per-minute (BPM) detection routine.
-///
-/// The beat detection algorithm works as follows:
-/// - Use function 'inputSamples' to input a chunks of samples to the class for
-/// analysis. It's a good idea to enter a large sound file or stream in smallish
-/// chunks of around few kilosamples in order not to extinguish too much RAM memory.
-/// - Inputted sound data is decimated to approx 500 Hz to reduce calculation burden,
-/// which is basically ok as low (bass) frequencies mostly determine the beat rate.
-/// Simple averaging is used for anti-alias filtering because the resulting signal
-/// quality isn't of that high importance.
-/// - Decimated sound data is enveloped, i.e. the amplitude shape is detected by
-/// taking absolute value that's smoothed by sliding average. Signal levels that
-/// are below a couple of times the general RMS amplitude level are cut away to
-/// leave only notable peaks there.
-/// - Repeating sound patterns (e.g. beats) are detected by calculating short-term
-/// autocorrelation function of the enveloped signal.
-/// - After whole sound data file has been analyzed as above, the bpm level is
-/// detected by function 'getBpm' that finds the highest peak of the autocorrelation
-/// function, calculates it's precise location and converts this reading to bpm's.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2015-02-21 21:24:29 +0000 (Sat, 21 Feb 2015) $
-// File revision : $Revision: 4 $
-//
-// $Id: BPMDetect.cpp 202 2015-02-21 21:24:29Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include <math.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include "FIFOSampleBuffer.h"
-#include "PeakFinder.h"
-#include "BPMDetect.h"
-
-using namespace soundtouch;
-
-#define INPUT_BLOCK_SAMPLES 2048
-#define DECIMATED_BLOCK_SAMPLES 256
-
-/// decay constant for calculating RMS volume sliding average approximation
-/// (time constant is about 10 sec)
-const float avgdecay = 0.99986f;
-
-/// Normalization coefficient for calculating RMS sliding average approximation.
-const float avgnorm = (1 - avgdecay);
-
-
-////////////////////////////////////////////////////////////////////////////////
-
-// Enable following define to create bpm analysis file:
-
-// #define _CREATE_BPM_DEBUG_FILE
-
-#ifdef _CREATE_BPM_DEBUG_FILE
-
- #define DEBUGFILE_NAME "c:\\temp\\soundtouch-bpm-debug.txt"
-
- static void _SaveDebugData(const float *data, int minpos, int maxpos, double coeff)
- {
- FILE *fptr = fopen(DEBUGFILE_NAME, "wt");
- int i;
-
- if (fptr)
- {
- printf("\n\nWriting BPM debug data into file " DEBUGFILE_NAME "\n\n");
- for (i = minpos; i < maxpos; i ++)
- {
- fprintf(fptr, "%d\t%.1lf\t%f\n", i, coeff / (double)i, data[i]);
- }
- fclose(fptr);
- }
- }
-#else
- #define _SaveDebugData(a,b,c,d)
-#endif
-
-////////////////////////////////////////////////////////////////////////////////
-
-
-BPMDetect::BPMDetect(int numChannels, int aSampleRate)
-{
- this->sampleRate = aSampleRate;
- this->channels = numChannels;
-
- decimateSum = 0;
- decimateCount = 0;
-
- envelopeAccu = 0;
-
- // Initialize RMS volume accumulator to RMS level of 1500 (out of 32768) that's
- // safe initial RMS signal level value for song data. This value is then adapted
- // to the actual level during processing.
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
- // integer samples
- RMSVolumeAccu = (1500 * 1500) / avgnorm;
-#else
- // float samples, scaled to range [-1..+1[
- RMSVolumeAccu = (0.045f * 0.045f) / avgnorm;
-#endif
-
- // choose decimation factor so that result is approx. 1000 Hz
- decimateBy = sampleRate / 1000;
- assert(decimateBy > 0);
- assert(INPUT_BLOCK_SAMPLES < decimateBy * DECIMATED_BLOCK_SAMPLES);
-
- // Calculate window length & starting item according to desired min & max bpms
- windowLen = (60 * sampleRate) / (decimateBy * MIN_BPM);
- windowStart = (60 * sampleRate) / (decimateBy * MAX_BPM);
-
- assert(windowLen > windowStart);
-
- // allocate new working objects
- xcorr = new float[windowLen];
- memset(xcorr, 0, windowLen * sizeof(float));
-
- // allocate processing buffer
- buffer = new FIFOSampleBuffer();
- // we do processing in mono mode
- buffer->setChannels(1);
- buffer->clear();
-}
-
-
-
-BPMDetect::~BPMDetect()
-{
- delete[] xcorr;
- delete buffer;
-}
-
-
-
-/// convert to mono, low-pass filter & decimate to about 500 Hz.
-/// return number of outputted samples.
-///
-/// Decimation is used to remove the unnecessary frequencies and thus to reduce
-/// the amount of data needed to be processed as calculating autocorrelation
-/// function is a very-very heavy operation.
-///
-/// Anti-alias filtering is done simply by averaging the samples. This is really a
-/// poor-man's anti-alias filtering, but it's not so critical in this kind of application
-/// (it'd also be difficult to design a high-quality filter with steep cut-off at very
-/// narrow band)
-int BPMDetect::decimate(SAMPLETYPE *dest, const SAMPLETYPE *src, int numsamples)
-{
- int count, outcount;
- LONG_SAMPLETYPE out;
-
- assert(channels > 0);
- assert(decimateBy > 0);
- outcount = 0;
- for (count = 0; count < numsamples; count ++)
- {
- int j;
-
- // convert to mono and accumulate
- for (j = 0; j < channels; j ++)
- {
- decimateSum += src[j];
- }
- src += j;
-
- decimateCount ++;
- if (decimateCount >= decimateBy)
- {
- // Store every Nth sample only
- out = (LONG_SAMPLETYPE)(decimateSum / (decimateBy * channels));
- decimateSum = 0;
- decimateCount = 0;
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
- // check ranges for sure (shouldn't actually be necessary)
- if (out > 32767)
- {
- out = 32767;
- }
- else if (out < -32768)
- {
- out = -32768;
- }
-#endif // SOUNDTOUCH_INTEGER_SAMPLES
- dest[outcount] = (SAMPLETYPE)out;
- outcount ++;
- }
- }
- return outcount;
-}
-
-
-
-// Calculates autocorrelation function of the sample history buffer
-void BPMDetect::updateXCorr(int process_samples)
-{
- int offs;
- SAMPLETYPE *pBuffer;
-
- assert(buffer->numSamples() >= (uint)(process_samples + windowLen));
-
- pBuffer = buffer->ptrBegin();
- #pragma omp parallel for
- for (offs = windowStart; offs < windowLen; offs ++)
- {
- LONG_SAMPLETYPE sum;
- int i;
-
- sum = 0;
- for (i = 0; i < process_samples; i ++)
- {
- sum += pBuffer[i] * pBuffer[i + offs]; // scaling the sub-result shouldn't be necessary
- }
-// xcorr[offs] *= xcorr_decay; // decay 'xcorr' here with suitable coefficients
- // if it's desired that the system adapts automatically to
- // various bpms, e.g. in processing continouos music stream.
- // The 'xcorr_decay' should be a value that's smaller than but
- // close to one, and should also depend on 'process_samples' value.
-
- xcorr[offs] += (float)sum;
- }
-}
-
-
-// Calculates envelope of the sample data
-void BPMDetect::calcEnvelope(SAMPLETYPE *samples, int numsamples)
-{
- const static double decay = 0.7f; // decay constant for smoothing the envelope
- const static double norm = (1 - decay);
-
- int i;
- LONG_SAMPLETYPE out;
- double val;
-
- for (i = 0; i < numsamples; i ++)
- {
- // calc average RMS volume
- RMSVolumeAccu *= avgdecay;
- val = (float)fabs((float)samples[i]);
- RMSVolumeAccu += val * val;
-
- // cut amplitudes that are below cutoff ~2 times RMS volume
- // (we're interested in peak values, not the silent moments)
- if (val < 0.5 * sqrt(RMSVolumeAccu * avgnorm))
- {
- val = 0;
- }
-
- // smooth amplitude envelope
- envelopeAccu *= decay;
- envelopeAccu += val;
- out = (LONG_SAMPLETYPE)(envelopeAccu * norm);
-
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
- // cut peaks (shouldn't be necessary though)
- if (out > 32767) out = 32767;
-#endif // SOUNDTOUCH_INTEGER_SAMPLES
- samples[i] = (SAMPLETYPE)out;
- }
-}
-
-
-
-void BPMDetect::inputSamples(const SAMPLETYPE *samples, int numSamples)
-{
- SAMPLETYPE decimated[DECIMATED_BLOCK_SAMPLES];
-
- // iterate so that max INPUT_BLOCK_SAMPLES processed per iteration
- while (numSamples > 0)
- {
- int block;
- int decSamples;
-
- block = (numSamples > INPUT_BLOCK_SAMPLES) ? INPUT_BLOCK_SAMPLES : numSamples;
-
- // decimate. note that converts to mono at the same time
- decSamples = decimate(decimated, samples, block);
- samples += block * channels;
- numSamples -= block;
-
- // envelope new samples and add them to buffer
- calcEnvelope(decimated, decSamples);
- buffer->putSamples(decimated, decSamples);
- }
-
- // when the buffer has enought samples for processing...
- if ((int)buffer->numSamples() > windowLen)
- {
- int processLength;
-
- // how many samples are processed
- processLength = (int)buffer->numSamples() - windowLen;
-
- // ... calculate autocorrelations for oldest samples...
- updateXCorr(processLength);
- // ... and remove them from the buffer
- buffer->receiveSamples(processLength);
- }
-}
-
-
-
-void BPMDetect::removeBias()
-{
- int i;
- float minval = 1e12f; // arbitrary large number
-
- for (i = windowStart; i < windowLen; i ++)
- {
- if (xcorr[i] < minval)
- {
- minval = xcorr[i];
- }
- }
-
- for (i = windowStart; i < windowLen; i ++)
- {
- xcorr[i] -= minval;
- }
-}
-
-
-float BPMDetect::getBpm()
-{
- double peakPos;
- double coeff;
- PeakFinder peakFinder;
-
- coeff = 60.0 * ((double)sampleRate / (double)decimateBy);
-
- // save bpm debug analysis data if debug data enabled
- _SaveDebugData(xcorr, windowStart, windowLen, coeff);
-
- // remove bias from xcorr data
- removeBias();
-
- // find peak position
- peakPos = peakFinder.detectPeak(xcorr, windowStart, windowLen);
-
- assert(decimateBy != 0);
- if (peakPos < 1e-9) return 0.0; // detection failed.
-
- // calculate BPM
- return (float) (coeff / peakPos);
-}
diff --git a/src/thirdparty/SoundTouch/source/FIFOSampleBuffer.cpp b/src/thirdparty/SoundTouch/source/FIFOSampleBuffer.cpp
deleted file mode 100644
index be6060e3c..000000000
--- a/src/thirdparty/SoundTouch/source/FIFOSampleBuffer.cpp
+++ /dev/null
@@ -1,274 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// A buffer class for temporarily storaging sound samples, operates as a
-/// first-in-first-out pipe.
-///
-/// Samples are added to the end of the sample buffer with the 'putSamples'
-/// function, and are received from the beginning of the buffer by calling
-/// the 'receiveSamples' function. The class automatically removes the
-/// outputted samples from the buffer, as well as grows the buffer size
-/// whenever necessary.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2012-11-08 18:53:01 +0000 (Thu, 08 Nov 2012) $
-// File revision : $Revision: 4 $
-//
-// $Id: FIFOSampleBuffer.cpp 160 2012-11-08 18:53:01Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include <stdlib.h>
-#include <memory.h>
-#include <string.h>
-#include <assert.h>
-
-#include "FIFOSampleBuffer.h"
-
-using namespace soundtouch;
-
-// Constructor
-FIFOSampleBuffer::FIFOSampleBuffer(int numChannels)
-{
- assert(numChannels > 0);
- sizeInBytes = 0; // reasonable initial value
- buffer = NULL;
- bufferUnaligned = NULL;
- samplesInBuffer = 0;
- bufferPos = 0;
- channels = (uint)numChannels;
- ensureCapacity(32); // allocate initial capacity
-}
-
-
-// destructor
-FIFOSampleBuffer::~FIFOSampleBuffer()
-{
- delete[] bufferUnaligned;
- bufferUnaligned = NULL;
- buffer = NULL;
-}
-
-
-// Sets number of channels, 1 = mono, 2 = stereo
-void FIFOSampleBuffer::setChannels(int numChannels)
-{
- uint usedBytes;
-
- assert(numChannels > 0);
- usedBytes = channels * samplesInBuffer;
- channels = (uint)numChannels;
- samplesInBuffer = usedBytes / channels;
-}
-
-
-// if output location pointer 'bufferPos' isn't zero, 'rewinds' the buffer and
-// zeroes this pointer by copying samples from the 'bufferPos' pointer
-// location on to the beginning of the buffer.
-void FIFOSampleBuffer::rewind()
-{
- if (buffer && bufferPos)
- {
- memmove(buffer, ptrBegin(), sizeof(SAMPLETYPE) * channels * samplesInBuffer);
- bufferPos = 0;
- }
-}
-
-
-// Adds 'numSamples' pcs of samples from the 'samples' memory position to
-// the sample buffer.
-void FIFOSampleBuffer::putSamples(const SAMPLETYPE *samples, uint nSamples)
-{
- memcpy(ptrEnd(nSamples), samples, sizeof(SAMPLETYPE) * nSamples * channels);
- samplesInBuffer += nSamples;
-}
-
-
-// Increases the number of samples in the buffer without copying any actual
-// samples.
-//
-// This function is used to update the number of samples in the sample buffer
-// when accessing the buffer directly with 'ptrEnd' function. Please be
-// careful though!
-void FIFOSampleBuffer::putSamples(uint nSamples)
-{
- uint req;
-
- req = samplesInBuffer + nSamples;
- ensureCapacity(req);
- samplesInBuffer += nSamples;
-}
-
-
-// Returns a pointer to the end of the used part of the sample buffer (i.e.
-// where the new samples are to be inserted). This function may be used for
-// inserting new samples into the sample buffer directly. Please be careful!
-//
-// Parameter 'slackCapacity' tells the function how much free capacity (in
-// terms of samples) there _at least_ should be, in order to the caller to
-// succesfully insert all the required samples to the buffer. When necessary,
-// the function grows the buffer size to comply with this requirement.
-//
-// When using this function as means for inserting new samples, also remember
-// to increase the sample count afterwards, by calling the
-// 'putSamples(numSamples)' function.
-SAMPLETYPE *FIFOSampleBuffer::ptrEnd(uint slackCapacity)
-{
- ensureCapacity(samplesInBuffer + slackCapacity);
- return buffer + samplesInBuffer * channels;
-}
-
-
-// Returns a pointer to the beginning of the currently non-outputted samples.
-// This function is provided for accessing the output samples directly.
-// Please be careful!
-//
-// When using this function to output samples, also remember to 'remove' the
-// outputted samples from the buffer by calling the
-// 'receiveSamples(numSamples)' function
-SAMPLETYPE *FIFOSampleBuffer::ptrBegin()
-{
- assert(buffer);
- return buffer + bufferPos * channels;
-}
-
-
-// Ensures that the buffer has enought capacity, i.e. space for _at least_
-// 'capacityRequirement' number of samples. The buffer is grown in steps of
-// 4 kilobytes to eliminate the need for frequently growing up the buffer,
-// as well as to round the buffer size up to the virtual memory page size.
-void FIFOSampleBuffer::ensureCapacity(uint capacityRequirement)
-{
- SAMPLETYPE *tempUnaligned, *temp;
-
- if (capacityRequirement > getCapacity())
- {
- // enlarge the buffer in 4kbyte steps (round up to next 4k boundary)
- sizeInBytes = (capacityRequirement * channels * sizeof(SAMPLETYPE) + 4095) & (uint)-4096;
- assert(sizeInBytes % 2 == 0);
- tempUnaligned = new SAMPLETYPE[sizeInBytes / sizeof(SAMPLETYPE) + 16 / sizeof(SAMPLETYPE)];
- if (tempUnaligned == NULL)
- {
- ST_THROW_RT_ERROR("Couldn't allocate memory!\n");
- }
- // Align the buffer to begin at 16byte cache line boundary for optimal performance
- temp = (SAMPLETYPE *)SOUNDTOUCH_ALIGN_POINTER_16(tempUnaligned);
- if (samplesInBuffer)
- {
- memcpy(temp, ptrBegin(), samplesInBuffer * channels * sizeof(SAMPLETYPE));
- }
- delete[] bufferUnaligned;
- buffer = temp;
- bufferUnaligned = tempUnaligned;
- bufferPos = 0;
- }
- else
- {
- // simply rewind the buffer (if necessary)
- rewind();
- }
-}
-
-
-// Returns the current buffer capacity in terms of samples
-uint FIFOSampleBuffer::getCapacity() const
-{
- return sizeInBytes / (channels * sizeof(SAMPLETYPE));
-}
-
-
-// Returns the number of samples currently in the buffer
-uint FIFOSampleBuffer::numSamples() const
-{
- return samplesInBuffer;
-}
-
-
-// Output samples from beginning of the sample buffer. Copies demanded number
-// of samples to output and removes them from the sample buffer. If there
-// are less than 'numsample' samples in the buffer, returns all available.
-//
-// Returns number of samples copied.
-uint FIFOSampleBuffer::receiveSamples(SAMPLETYPE *output, uint maxSamples)
-{
- uint num;
-
- num = (maxSamples > samplesInBuffer) ? samplesInBuffer : maxSamples;
-
- memcpy(output, ptrBegin(), channels * sizeof(SAMPLETYPE) * num);
- return receiveSamples(num);
-}
-
-
-// Removes samples from the beginning of the sample buffer without copying them
-// anywhere. Used to reduce the number of samples in the buffer, when accessing
-// the sample buffer with the 'ptrBegin' function.
-uint FIFOSampleBuffer::receiveSamples(uint maxSamples)
-{
- if (maxSamples >= samplesInBuffer)
- {
- uint temp;
-
- temp = samplesInBuffer;
- samplesInBuffer = 0;
- return temp;
- }
-
- samplesInBuffer -= maxSamples;
- bufferPos += maxSamples;
-
- return maxSamples;
-}
-
-
-// Returns nonzero if the sample buffer is empty
-int FIFOSampleBuffer::isEmpty() const
-{
- return (samplesInBuffer == 0) ? 1 : 0;
-}
-
-
-// Clears the sample buffer
-void FIFOSampleBuffer::clear()
-{
- samplesInBuffer = 0;
- bufferPos = 0;
-}
-
-
-/// allow trimming (downwards) amount of samples in pipeline.
-/// Returns adjusted amount of samples
-uint FIFOSampleBuffer::adjustAmountOfSamples(uint numSamples)
-{
- if (numSamples < samplesInBuffer)
- {
- samplesInBuffer = numSamples;
- }
- return samplesInBuffer;
-}
-
diff --git a/src/thirdparty/SoundTouch/source/FIRFilter.cpp b/src/thirdparty/SoundTouch/source/FIRFilter.cpp
deleted file mode 100644
index 6a6f46384..000000000
--- a/src/thirdparty/SoundTouch/source/FIRFilter.cpp
+++ /dev/null
@@ -1,328 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// General FIR digital filter routines with MMX optimization.
-///
-/// Note : MMX optimized functions reside in a separate, platform-specific file,
-/// e.g. 'mmx_win.cpp' or 'mmx_gcc.cpp'
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2015-02-21 21:24:29 +0000 (Sat, 21 Feb 2015) $
-// File revision : $Revision: 4 $
-//
-// $Id: FIRFilter.cpp 202 2015-02-21 21:24:29Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include <memory.h>
-#include <assert.h>
-#include <math.h>
-#include <stdlib.h>
-#include "FIRFilter.h"
-#include "cpu_detect.h"
-
-using namespace soundtouch;
-
-/*****************************************************************************
- *
- * Implementation of the class 'FIRFilter'
- *
- *****************************************************************************/
-
-FIRFilter::FIRFilter()
-{
- resultDivFactor = 0;
- resultDivider = 0;
- length = 0;
- lengthDiv8 = 0;
- filterCoeffs = NULL;
-}
-
-
-FIRFilter::~FIRFilter()
-{
- delete[] filterCoeffs;
-}
-
-// Usual C-version of the filter routine for stereo sound
-uint FIRFilter::evaluateFilterStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples) const
-{
- int j, end;
-#ifdef SOUNDTOUCH_FLOAT_SAMPLES
- // when using floating point samples, use a scaler instead of a divider
- // because division is much slower operation than multiplying.
- double dScaler = 1.0 / (double)resultDivider;
-#endif
-
- assert(length != 0);
- assert(src != NULL);
- assert(dest != NULL);
- assert(filterCoeffs != NULL);
-
- end = 2 * (numSamples - length);
-
- #pragma omp parallel for
- for (j = 0; j < end; j += 2)
- {
- const SAMPLETYPE *ptr;
- LONG_SAMPLETYPE suml, sumr;
- uint i;
-
- suml = sumr = 0;
- ptr = src + j;
-
- for (i = 0; i < length; i += 4)
- {
- // loop is unrolled by factor of 4 here for efficiency
- suml += ptr[2 * i + 0] * filterCoeffs[i + 0] +
- ptr[2 * i + 2] * filterCoeffs[i + 1] +
- ptr[2 * i + 4] * filterCoeffs[i + 2] +
- ptr[2 * i + 6] * filterCoeffs[i + 3];
- sumr += ptr[2 * i + 1] * filterCoeffs[i + 0] +
- ptr[2 * i + 3] * filterCoeffs[i + 1] +
- ptr[2 * i + 5] * filterCoeffs[i + 2] +
- ptr[2 * i + 7] * filterCoeffs[i + 3];
- }
-
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
- suml >>= resultDivFactor;
- sumr >>= resultDivFactor;
- // saturate to 16 bit integer limits
- suml = (suml < -32768) ? -32768 : (suml > 32767) ? 32767 : suml;
- // saturate to 16 bit integer limits
- sumr = (sumr < -32768) ? -32768 : (sumr > 32767) ? 32767 : sumr;
-#else
- suml *= dScaler;
- sumr *= dScaler;
-#endif // SOUNDTOUCH_INTEGER_SAMPLES
- dest[j] = (SAMPLETYPE)suml;
- dest[j + 1] = (SAMPLETYPE)sumr;
- }
- return numSamples - length;
-}
-
-
-
-
-// Usual C-version of the filter routine for mono sound
-uint FIRFilter::evaluateFilterMono(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples) const
-{
- int j, end;
-#ifdef SOUNDTOUCH_FLOAT_SAMPLES
- // when using floating point samples, use a scaler instead of a divider
- // because division is much slower operation than multiplying.
- double dScaler = 1.0 / (double)resultDivider;
-#endif
-
- assert(length != 0);
-
- end = numSamples - length;
- #pragma omp parallel for
- for (j = 0; j < end; j ++)
- {
- const SAMPLETYPE *pSrc = src + j;
- LONG_SAMPLETYPE sum;
- uint i;
-
- sum = 0;
- for (i = 0; i < length; i += 4)
- {
- // loop is unrolled by factor of 4 here for efficiency
- sum += pSrc[i + 0] * filterCoeffs[i + 0] +
- pSrc[i + 1] * filterCoeffs[i + 1] +
- pSrc[i + 2] * filterCoeffs[i + 2] +
- pSrc[i + 3] * filterCoeffs[i + 3];
- }
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
- sum >>= resultDivFactor;
- // saturate to 16 bit integer limits
- sum = (sum < -32768) ? -32768 : (sum > 32767) ? 32767 : sum;
-#else
- sum *= dScaler;
-#endif // SOUNDTOUCH_INTEGER_SAMPLES
- dest[j] = (SAMPLETYPE)sum;
- }
- return end;
-}
-
-
-uint FIRFilter::evaluateFilterMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels)
-{
- int j, end;
-
-#ifdef SOUNDTOUCH_FLOAT_SAMPLES
- // when using floating point samples, use a scaler instead of a divider
- // because division is much slower operation than multiplying.
- double dScaler = 1.0 / (double)resultDivider;
-#endif
-
- assert(length != 0);
- assert(src != NULL);
- assert(dest != NULL);
- assert(filterCoeffs != NULL);
- assert(numChannels < 16);
-
- end = numChannels * (numSamples - length);
-
- #pragma omp parallel for
- for (j = 0; j < end; j += numChannels)
- {
- const SAMPLETYPE *ptr;
- LONG_SAMPLETYPE sums[16];
- uint c, i;
-
- for (c = 0; c < numChannels; c ++)
- {
- sums[c] = 0;
- }
-
- ptr = src + j;
-
- for (i = 0; i < length; i ++)
- {
- SAMPLETYPE coef=filterCoeffs[i];
- for (c = 0; c < numChannels; c ++)
- {
- sums[c] += ptr[0] * coef;
- ptr ++;
- }
- }
-
- for (c = 0; c < numChannels; c ++)
- {
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
- sums[c] >>= resultDivFactor;
-#else
- sums[c] *= dScaler;
-#endif // SOUNDTOUCH_INTEGER_SAMPLES
- dest[j+c] = (SAMPLETYPE)sums[c];
- }
- }
- return numSamples - length;
-}
-
-
-// Set filter coeffiecients and length.
-//
-// Throws an exception if filter length isn't divisible by 8
-void FIRFilter::setCoefficients(const SAMPLETYPE *coeffs, uint newLength, uint uResultDivFactor)
-{
- assert(newLength > 0);
- if (newLength % 8) ST_THROW_RT_ERROR("FIR filter length not divisible by 8");
-
- lengthDiv8 = newLength / 8;
- length = lengthDiv8 * 8;
- assert(length == newLength);
-
- resultDivFactor = uResultDivFactor;
- resultDivider = (SAMPLETYPE)::pow(2.0, (int)resultDivFactor);
-
- delete[] filterCoeffs;
- filterCoeffs = new SAMPLETYPE[length];
- memcpy(filterCoeffs, coeffs, length * sizeof(SAMPLETYPE));
-}
-
-
-uint FIRFilter::getLength() const
-{
- return length;
-}
-
-
-
-// Applies the filter to the given sequence of samples.
-//
-// Note : The amount of outputted samples is by value of 'filter_length'
-// smaller than the amount of input samples.
-uint FIRFilter::evaluate(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels)
-{
- assert(length > 0);
- assert(lengthDiv8 * 8 == length);
-
- if (numSamples < length) return 0;
-
-#ifndef USE_MULTICH_ALWAYS
- if (numChannels == 1)
- {
- return evaluateFilterMono(dest, src, numSamples);
- }
- else if (numChannels == 2)
- {
- return evaluateFilterStereo(dest, src, numSamples);
- }
- else
-#endif // USE_MULTICH_ALWAYS
- {
- assert(numChannels > 0);
- return evaluateFilterMulti(dest, src, numSamples, numChannels);
- }
-}
-
-
-
-// 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)
-{
- // Notice! don't use "new FIRFilter" directly, use "newInstance" to create a new instance instead!
- ST_THROW_RT_ERROR("Error in FIRFilter::new: Don't use 'new FIRFilter', use 'newInstance' member instead!");
- return newInstance();
-}
-
-
-FIRFilter * FIRFilter::newInstance()
-{
- uint uExtensions;
-
- uExtensions = detectCPUextensions();
-
- // Check if MMX/SSE instruction set extensions supported by CPU
-
-#ifdef SOUNDTOUCH_ALLOW_MMX
- // MMX routines available only with integer sample types
- if (uExtensions & SUPPORT_MMX)
- {
- return ::new FIRFilterMMX;
- }
- else
-#endif // SOUNDTOUCH_ALLOW_MMX
-
-#ifdef SOUNDTOUCH_ALLOW_SSE
- if (uExtensions & SUPPORT_SSE)
- {
- // SSE support
- return ::new FIRFilterSSE;
- }
- else
-#endif // SOUNDTOUCH_ALLOW_SSE
-
- {
- // ISA optimizations not supported, use plain C version
- return ::new FIRFilter;
- }
-}
diff --git a/src/thirdparty/SoundTouch/source/FIRFilter.h b/src/thirdparty/SoundTouch/source/FIRFilter.h
deleted file mode 100644
index ce719629e..000000000
--- a/src/thirdparty/SoundTouch/source/FIRFilter.h
+++ /dev/null
@@ -1,146 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// General FIR digital filter routines with MMX optimization.
-///
-/// Note : MMX optimized functions reside in a separate, platform-specific file,
-/// e.g. 'mmx_win.cpp' or 'mmx_gcc.cpp'
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2015-02-21 21:24:29 +0000 (Sat, 21 Feb 2015) $
-// File revision : $Revision: 4 $
-//
-// $Id: FIRFilter.h 202 2015-02-21 21:24:29Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef FIRFilter_H
-#define FIRFilter_H
-
-#include <stddef.h>
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-class FIRFilter
-{
-protected:
- // Number of FIR filter taps
- uint length;
- // Number of FIR filter taps divided by 8
- uint lengthDiv8;
-
- // Result divider factor in 2^k format
- uint resultDivFactor;
-
- // Result divider value.
- SAMPLETYPE resultDivider;
-
- // Memory for filter coefficients
- SAMPLETYPE *filterCoeffs;
-
- virtual uint evaluateFilterStereo(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- uint numSamples) const;
- virtual uint evaluateFilterMono(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- uint numSamples) const;
- virtual uint evaluateFilterMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels);
-
-public:
- FIRFilter();
- virtual ~FIRFilter();
-
- /// Operator 'new' is overloaded so that it automatically creates a suitable instance
- /// depending on if we've a MMX-capable CPU available or not.
- static void * operator new(size_t s);
-
- static FIRFilter *newInstance();
-
- /// Applies the filter to the given sequence of samples.
- /// Note : The amount of outputted samples is by value of 'filter_length'
- /// smaller than the amount of input samples.
- ///
- /// \return Number of samples copied to 'dest'.
- uint evaluate(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- uint numSamples,
- uint numChannels);
-
- uint getLength() const;
-
- virtual void setCoefficients(const SAMPLETYPE *coeffs,
- uint newLength,
- uint uResultDivFactor);
-};
-
-
-// Optional subclasses that implement CPU-specific optimizations:
-
-#ifdef SOUNDTOUCH_ALLOW_MMX
-
-/// Class that implements MMX optimized functions exclusive for 16bit integer samples type.
- class FIRFilterMMX : public FIRFilter
- {
- protected:
- short *filterCoeffsUnalign;
- short *filterCoeffsAlign;
-
- virtual uint evaluateFilterStereo(short *dest, const short *src, uint numSamples) const;
- public:
- FIRFilterMMX();
- ~FIRFilterMMX();
-
- virtual void setCoefficients(const short *coeffs, uint newLength, uint uResultDivFactor);
- };
-
-#endif // SOUNDTOUCH_ALLOW_MMX
-
-
-#ifdef SOUNDTOUCH_ALLOW_SSE
- /// Class that implements SSE optimized functions exclusive for floating point samples type.
- class FIRFilterSSE : public FIRFilter
- {
- protected:
- float *filterCoeffsUnalign;
- float *filterCoeffsAlign;
-
- virtual uint evaluateFilterStereo(float *dest, const float *src, uint numSamples) const;
- public:
- FIRFilterSSE();
- ~FIRFilterSSE();
-
- virtual void setCoefficients(const float *coeffs, uint newLength, uint uResultDivFactor);
- };
-
-#endif // SOUNDTOUCH_ALLOW_SSE
-
-}
-
-#endif // FIRFilter_H
diff --git a/src/thirdparty/SoundTouch/source/InterpolateCubic.cpp b/src/thirdparty/SoundTouch/source/InterpolateCubic.cpp
deleted file mode 100644
index 8aa7374c7..000000000
--- a/src/thirdparty/SoundTouch/source/InterpolateCubic.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Cubic interpolation routine.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// $Id: InterpolateCubic.cpp 179 2014-01-06 18:41:42Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include <stddef.h>
-#include <math.h>
-#include "InterpolateCubic.h"
-#include "STTypes.h"
-
-using namespace soundtouch;
-
-// cubic interpolation coefficients
-static const float _coeffs[]=
-{ -0.5f, 1.0f, -0.5f, 0.0f,
- 1.5f, -2.5f, 0.0f, 1.0f,
- -1.5f, 2.0f, 0.5f, 0.0f,
- 0.5f, -0.5f, 0.0f, 0.0f};
-
-
-InterpolateCubic::InterpolateCubic()
-{
- fract = 0;
-}
-
-
-void InterpolateCubic::resetRegisters()
-{
- fract = 0;
-}
-
-
-/// Transpose mono audio. Returns number of produced output samples, and
-/// updates "srcSamples" to amount of consumed source samples
-int InterpolateCubic::transposeMono(SAMPLETYPE *pdest,
- const SAMPLETYPE *psrc,
- int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 4;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- float out;
- const float x3 = 1.0f;
- const float x2 = (float)fract; // x
- const float x1 = x2*x2; // x^2
- const float x0 = x1*x2; // x^3
- float y0, y1, y2, y3;
-
- assert(fract < 1.0);
-
- y0 = _coeffs[0] * x0 + _coeffs[1] * x1 + _coeffs[2] * x2 + _coeffs[3] * x3;
- y1 = _coeffs[4] * x0 + _coeffs[5] * x1 + _coeffs[6] * x2 + _coeffs[7] * x3;
- y2 = _coeffs[8] * x0 + _coeffs[9] * x1 + _coeffs[10] * x2 + _coeffs[11] * x3;
- y3 = _coeffs[12] * x0 + _coeffs[13] * x1 + _coeffs[14] * x2 + _coeffs[15] * x3;
-
- out = y0 * psrc[0] + y1 * psrc[1] + y2 * psrc[2] + y3 * psrc[3];
-
- pdest[i] = (SAMPLETYPE)out;
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- psrc += whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
-
-
-/// Transpose stereo audio. Returns number of produced output samples, and
-/// updates "srcSamples" to amount of consumed source samples
-int InterpolateCubic::transposeStereo(SAMPLETYPE *pdest,
- const SAMPLETYPE *psrc,
- int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 4;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- const float x3 = 1.0f;
- const float x2 = (float)fract; // x
- const float x1 = x2*x2; // x^2
- const float x0 = x1*x2; // x^3
- float y0, y1, y2, y3;
- float out0, out1;
-
- assert(fract < 1.0);
-
- y0 = _coeffs[0] * x0 + _coeffs[1] * x1 + _coeffs[2] * x2 + _coeffs[3] * x3;
- y1 = _coeffs[4] * x0 + _coeffs[5] * x1 + _coeffs[6] * x2 + _coeffs[7] * x3;
- y2 = _coeffs[8] * x0 + _coeffs[9] * x1 + _coeffs[10] * x2 + _coeffs[11] * x3;
- y3 = _coeffs[12] * x0 + _coeffs[13] * x1 + _coeffs[14] * x2 + _coeffs[15] * x3;
-
- out0 = y0 * psrc[0] + y1 * psrc[2] + y2 * psrc[4] + y3 * psrc[6];
- out1 = y0 * psrc[1] + y1 * psrc[3] + y2 * psrc[5] + y3 * psrc[7];
-
- pdest[2*i] = (SAMPLETYPE)out0;
- pdest[2*i+1] = (SAMPLETYPE)out1;
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- psrc += 2*whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
-
-
-/// Transpose multi-channel audio. Returns number of produced output samples, and
-/// updates "srcSamples" to amount of consumed source samples
-int InterpolateCubic::transposeMulti(SAMPLETYPE *pdest,
- const SAMPLETYPE *psrc,
- int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 4;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- const float x3 = 1.0f;
- const float x2 = (float)fract; // x
- const float x1 = x2*x2; // x^2
- const float x0 = x1*x2; // x^3
- float y0, y1, y2, y3;
-
- assert(fract < 1.0);
-
- y0 = _coeffs[0] * x0 + _coeffs[1] * x1 + _coeffs[2] * x2 + _coeffs[3] * x3;
- y1 = _coeffs[4] * x0 + _coeffs[5] * x1 + _coeffs[6] * x2 + _coeffs[7] * x3;
- y2 = _coeffs[8] * x0 + _coeffs[9] * x1 + _coeffs[10] * x2 + _coeffs[11] * x3;
- y3 = _coeffs[12] * x0 + _coeffs[13] * x1 + _coeffs[14] * x2 + _coeffs[15] * x3;
-
- for (int c = 0; c < numChannels; c ++)
- {
- float out;
- out = y0 * psrc[c] + y1 * psrc[c + numChannels] + y2 * psrc[c + 2 * numChannels] + y3 * psrc[c + 3 * numChannels];
- pdest[0] = (SAMPLETYPE)out;
- pdest ++;
- }
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- psrc += numChannels*whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
diff --git a/src/thirdparty/SoundTouch/source/InterpolateCubic.h b/src/thirdparty/SoundTouch/source/InterpolateCubic.h
deleted file mode 100644
index e0e302b23..000000000
--- a/src/thirdparty/SoundTouch/source/InterpolateCubic.h
+++ /dev/null
@@ -1,67 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Cubic interpolation routine.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// $Id: InterpolateCubic.h 179 2014-01-06 18:41:42Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef _InterpolateCubic_H_
-#define _InterpolateCubic_H_
-
-#include "RateTransposer.h"
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-class InterpolateCubic : public TransposerBase
-{
-protected:
- virtual void resetRegisters();
- virtual int transposeMono(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples);
- virtual int transposeStereo(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples);
- virtual int transposeMulti(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples);
-
- float fract;
-
-public:
- InterpolateCubic();
-};
-
-}
-
-#endif
diff --git a/src/thirdparty/SoundTouch/source/InterpolateLinear.cpp b/src/thirdparty/SoundTouch/source/InterpolateLinear.cpp
deleted file mode 100644
index ae26e69a1..000000000
--- a/src/thirdparty/SoundTouch/source/InterpolateLinear.cpp
+++ /dev/null
@@ -1,299 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Linear interpolation algorithm.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// $Id: InterpolateLinear.cpp 180 2014-01-06 19:16:02Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include <assert.h>
-#include <stdlib.h>
-#include "InterpolateLinear.h"
-
-using namespace soundtouch;
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// InterpolateLinearInteger - integer arithmetic implementation
-//
-
-/// fixed-point interpolation routine precision
-#define SCALE 65536
-
-
-// Constructor
-InterpolateLinearInteger::InterpolateLinearInteger() : TransposerBase()
-{
- // Notice: use local function calling syntax for sake of clarity,
- // to indicate the fact that C++ constructor can't call virtual functions.
- resetRegisters();
- setRate(1.0f);
-}
-
-
-void InterpolateLinearInteger::resetRegisters()
-{
- iFract = 0;
-}
-
-
-// Transposes the sample rate of the given samples using linear interpolation.
-// 'Mono' version of the routine. Returns the number of samples returned in
-// the "dest" buffer
-int InterpolateLinearInteger::transposeMono(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 1;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- LONG_SAMPLETYPE temp;
-
- assert(iFract < SCALE);
-
- temp = (SCALE - iFract) * src[0] + iFract * src[1];
- dest[i] = (SAMPLETYPE)(temp / SCALE);
- i++;
-
- iFract += iRate;
-
- int iWhole = iFract / SCALE;
- iFract -= iWhole * SCALE;
- srcCount += iWhole;
- src += iWhole;
- }
- srcSamples = srcCount;
-
- return i;
-}
-
-
-// Transposes the sample rate of the given samples using linear interpolation.
-// 'Stereo' version of the routine. Returns the number of samples returned in
-// the "dest" buffer
-int InterpolateLinearInteger::transposeStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 1;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- LONG_SAMPLETYPE temp0;
- LONG_SAMPLETYPE temp1;
-
- assert(iFract < SCALE);
-
- temp0 = (SCALE - iFract) * src[0] + iFract * src[2];
- temp1 = (SCALE - iFract) * src[1] + iFract * src[3];
- dest[0] = (SAMPLETYPE)(temp0 / SCALE);
- dest[1] = (SAMPLETYPE)(temp1 / SCALE);
- dest += 2;
- i++;
-
- iFract += iRate;
-
- int iWhole = iFract / SCALE;
- iFract -= iWhole * SCALE;
- srcCount += iWhole;
- src += 2*iWhole;
- }
- srcSamples = srcCount;
-
- return i;
-}
-
-
-int InterpolateLinearInteger::transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 1;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- LONG_SAMPLETYPE temp, vol1;
-
- assert(iFract < SCALE);
- vol1 = (SCALE - iFract);
- for (int c = 0; c < numChannels; c ++)
- {
- temp = vol1 * src[c] + iFract * src[c + numChannels];
- dest[0] = (SAMPLETYPE)(temp / SCALE);
- dest ++;
- }
- i++;
-
- iFract += iRate;
-
- int iWhole = iFract / SCALE;
- iFract -= iWhole * SCALE;
- srcCount += iWhole;
- src += iWhole * numChannels;
- }
- srcSamples = srcCount;
-
- return i;
-}
-
-
-// Sets new target iRate. Normal iRate = 1.0, smaller values represent slower
-// iRate, larger faster iRates.
-void InterpolateLinearInteger::setRate(float newRate)
-{
- iRate = (int)(newRate * SCALE + 0.5f);
- TransposerBase::setRate(newRate);
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// InterpolateLinearFloat - floating point arithmetic implementation
-//
-//////////////////////////////////////////////////////////////////////////////
-
-
-// Constructor
-InterpolateLinearFloat::InterpolateLinearFloat() : TransposerBase()
-{
- // Notice: use local function calling syntax for sake of clarity,
- // to indicate the fact that C++ constructor can't call virtual functions.
- resetRegisters();
- setRate(1.0f);
-}
-
-
-void InterpolateLinearFloat::resetRegisters()
-{
- fract = 0;
-}
-
-
-// Transposes the sample rate of the given samples using linear interpolation.
-// 'Mono' version of the routine. Returns the number of samples returned in
-// the "dest" buffer
-int InterpolateLinearFloat::transposeMono(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 1;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- double out;
- assert(fract < 1.0);
-
- out = (1.0 - fract) * src[0] + fract * src[1];
- dest[i] = (SAMPLETYPE)out;
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- src += whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
-
-
-// Transposes the sample rate of the given samples using linear interpolation.
-// 'Mono' version of the routine. Returns the number of samples returned in
-// the "dest" buffer
-int InterpolateLinearFloat::transposeStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 1;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- double out0, out1;
- assert(fract < 1.0);
-
- out0 = (1.0 - fract) * src[0] + fract * src[2];
- out1 = (1.0 - fract) * src[1] + fract * src[3];
- dest[2*i] = (SAMPLETYPE)out0;
- dest[2*i+1] = (SAMPLETYPE)out1;
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- src += 2*whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
-
-
-int InterpolateLinearFloat::transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 1;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- float temp, vol1;
-
- vol1 = (1.0f- fract);
- for (int c = 0; c < numChannels; c ++)
- {
- temp = vol1 * src[c] + fract * src[c + numChannels];
- *dest = (SAMPLETYPE)temp;
- dest ++;
- }
- i++;
-
- fract += rate;
-
- int iWhole = (int)fract;
- fract -= iWhole;
- srcCount += iWhole;
- src += iWhole * numChannels;
- }
- srcSamples = srcCount;
-
- return i;
-}
diff --git a/src/thirdparty/SoundTouch/source/InterpolateLinear.h b/src/thirdparty/SoundTouch/source/InterpolateLinear.h
deleted file mode 100644
index b76299f88..000000000
--- a/src/thirdparty/SoundTouch/source/InterpolateLinear.h
+++ /dev/null
@@ -1,92 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Linear interpolation routine.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// $Id: InterpolateLinear.h 179 2014-01-06 18:41:42Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef _InterpolateLinear_H_
-#define _InterpolateLinear_H_
-
-#include "RateTransposer.h"
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-/// Linear transposer class that uses integer arithmetics
-class InterpolateLinearInteger : public TransposerBase
-{
-protected:
- int iFract;
- int iRate;
-
- virtual void resetRegisters();
-
- virtual int transposeMono(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples);
- virtual int transposeStereo(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples);
- virtual int transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples);
-public:
- InterpolateLinearInteger();
-
- /// Sets new target rate. Normal rate = 1.0, smaller values represent slower
- /// rate, larger faster rates.
- virtual void setRate(float newRate);
-};
-
-
-/// Linear transposer class that uses floating point arithmetics
-class InterpolateLinearFloat : public TransposerBase
-{
-protected:
- float fract;
-
- virtual void resetRegisters();
-
- virtual int transposeMono(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples);
- virtual int transposeStereo(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples);
- virtual int transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples);
-
-public:
- InterpolateLinearFloat();
-};
-
-}
-
-#endif
diff --git a/src/thirdparty/SoundTouch/source/InterpolateShannon.cpp b/src/thirdparty/SoundTouch/source/InterpolateShannon.cpp
deleted file mode 100644
index 93f5980c9..000000000
--- a/src/thirdparty/SoundTouch/source/InterpolateShannon.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Sample interpolation routine using 8-tap band-limited Shannon interpolation
-/// with kaiser window.
-///
-/// Notice. This algorithm is remarkably much heavier than linear or cubic
-/// interpolation, and not remarkably better than cubic algorithm. Thus mostly
-/// for experimental purposes
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// $Id: InterpolateShannon.cpp 195 2014-04-06 15:57:21Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include <math.h>
-#include "InterpolateShannon.h"
-#include "STTypes.h"
-
-using namespace soundtouch;
-
-
-/// Kaiser window with beta = 2.0
-/// Values scaled down by 5% to avoid overflows
-static const double _kaiser8[8] =
-{
- 0.41778693317814,
- 0.64888025049173,
- 0.83508562409944,
- 0.93887857733412,
- 0.93887857733412,
- 0.83508562409944,
- 0.64888025049173,
- 0.41778693317814
-};
-
-
-InterpolateShannon::InterpolateShannon()
-{
- fract = 0;
-}
-
-
-void InterpolateShannon::resetRegisters()
-{
- fract = 0;
-}
-
-
-// #define PI 3.1415926536
-#define PI M_PI // MPC-HC custom: define PI to M_PI from math.h
-#define sinc(x) (sin(PI * (x)) / (PI * (x)))
-
-/// Transpose mono audio. Returns number of produced output samples, and
-/// updates "srcSamples" to amount of consumed source samples
-int InterpolateShannon::transposeMono(SAMPLETYPE *pdest,
- const SAMPLETYPE *psrc,
- int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 8;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- double out;
- assert(fract < 1.0);
-
- out = psrc[0] * sinc(-3.0 - fract) * _kaiser8[0];
- out += psrc[1] * sinc(-2.0 - fract) * _kaiser8[1];
- out += psrc[2] * sinc(-1.0 - fract) * _kaiser8[2];
- if (fract < 1e-6)
- {
- out += psrc[3] * _kaiser8[3]; // sinc(0) = 1
- }
- else
- {
- out += psrc[3] * sinc(- fract) * _kaiser8[3];
- }
- out += psrc[4] * sinc( 1.0 - fract) * _kaiser8[4];
- out += psrc[5] * sinc( 2.0 - fract) * _kaiser8[5];
- out += psrc[6] * sinc( 3.0 - fract) * _kaiser8[6];
- out += psrc[7] * sinc( 4.0 - fract) * _kaiser8[7];
-
- pdest[i] = (SAMPLETYPE)out;
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- psrc += whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
-
-
-/// Transpose stereo audio. Returns number of produced output samples, and
-/// updates "srcSamples" to amount of consumed source samples
-int InterpolateShannon::transposeStereo(SAMPLETYPE *pdest,
- const SAMPLETYPE *psrc,
- int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 8;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- double out0, out1, w;
- assert(fract < 1.0);
-
- w = sinc(-3.0 - fract) * _kaiser8[0];
- out0 = psrc[0] * w; out1 = psrc[1] * w;
- w = sinc(-2.0 - fract) * _kaiser8[1];
- out0 += psrc[2] * w; out1 += psrc[3] * w;
- w = sinc(-1.0 - fract) * _kaiser8[2];
- out0 += psrc[4] * w; out1 += psrc[5] * w;
- w = _kaiser8[3] * ((fract < 1e-5) ? 1.0 : sinc(- fract)); // sinc(0) = 1
- out0 += psrc[6] * w; out1 += psrc[7] * w;
- w = sinc( 1.0 - fract) * _kaiser8[4];
- out0 += psrc[8] * w; out1 += psrc[9] * w;
- w = sinc( 2.0 - fract) * _kaiser8[5];
- out0 += psrc[10] * w; out1 += psrc[11] * w;
- w = sinc( 3.0 - fract) * _kaiser8[6];
- out0 += psrc[12] * w; out1 += psrc[13] * w;
- w = sinc( 4.0 - fract) * _kaiser8[7];
- out0 += psrc[14] * w; out1 += psrc[15] * w;
-
- pdest[2*i] = (SAMPLETYPE)out0;
- pdest[2*i+1] = (SAMPLETYPE)out1;
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- psrc += 2*whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
-
-
-/// Transpose stereo audio. Returns number of produced output samples, and
-/// updates "srcSamples" to amount of consumed source samples
-int InterpolateShannon::transposeMulti(SAMPLETYPE *pdest,
- const SAMPLETYPE *psrc,
- int &srcSamples)
-{
- // not implemented
- assert(false);
- return 0;
-}
diff --git a/src/thirdparty/SoundTouch/source/InterpolateShannon.h b/src/thirdparty/SoundTouch/source/InterpolateShannon.h
deleted file mode 100644
index 701640f7d..000000000
--- a/src/thirdparty/SoundTouch/source/InterpolateShannon.h
+++ /dev/null
@@ -1,72 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Sample interpolation routine using 8-tap band-limited Shannon interpolation
-/// with kaiser window.
-///
-/// Notice. This algorithm is remarkably much heavier than linear or cubic
-/// interpolation, and not remarkably better than cubic algorithm. Thus mostly
-/// for experimental purposes
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// $Id: InterpolateShannon.h 179 2014-01-06 18:41:42Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef _InterpolateShannon_H_
-#define _InterpolateShannon_H_
-
-#include "RateTransposer.h"
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-class InterpolateShannon : public TransposerBase
-{
-protected:
- void resetRegisters();
- int transposeMono(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples);
- int transposeStereo(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples);
- int transposeMulti(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples);
-
- float fract;
-
-public:
- InterpolateShannon();
-};
-
-}
-
-#endif
diff --git a/src/thirdparty/SoundTouch/source/PeakFinder.cpp b/src/thirdparty/SoundTouch/source/PeakFinder.cpp
deleted file mode 100644
index eadf5314e..000000000
--- a/src/thirdparty/SoundTouch/source/PeakFinder.cpp
+++ /dev/null
@@ -1,286 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Peak detection routine.
-///
-/// The routine detects highest value on an array of values and calculates the
-/// precise peak location as a mass-center of the 'hump' around the peak value.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2015-05-18 15:22:02 +0000 (Mon, 18 May 2015) $
-// File revision : $Revision: 4 $
-//
-// $Id: PeakFinder.cpp 213 2015-05-18 15:22:02Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include <math.h>
-#include <assert.h>
-
-#include "PeakFinder.h"
-
-using namespace soundtouch;
-
-#define max(x, y) (((x) > (y)) ? (x) : (y))
-
-
-PeakFinder::PeakFinder()
-{
- minPos = maxPos = 0;
-}
-
-
-// Finds real 'top' of a peak hump from neighnourhood of the given 'peakpos'.
-int PeakFinder::findTop(const float *data, int peakpos) const
-{
- int i;
- int start, end;
- float refvalue;
-
- refvalue = data[peakpos];
-
- // seek within ±10 points
- start = peakpos - 10;
- if (start < minPos) start = minPos;
- end = peakpos + 10;
- if (end > maxPos) end = maxPos;
-
- for (i = start; i <= end; i ++)
- {
- if (data[i] > refvalue)
- {
- peakpos = i;
- refvalue = data[i];
- }
- }
-
- // failure if max value is at edges of seek range => it's not peak, it's at slope.
- if ((peakpos == start) || (peakpos == end)) return 0;
-
- return peakpos;
-}
-
-
-// Finds 'ground level' of a peak hump by starting from 'peakpos' and proceeding
-// to direction defined by 'direction' until next 'hump' after minimum value will
-// begin
-int PeakFinder::findGround(const float *data, int peakpos, int direction) const
-{
- int lowpos;
- int pos;
- int climb_count;
- float refvalue;
- float delta;
-
- climb_count = 0;
- refvalue = data[peakpos];
- lowpos = peakpos;
-
- pos = peakpos;
-
- while ((pos > minPos+1) && (pos < maxPos-1))
- {
- int prevpos;
-
- prevpos = pos;
- pos += direction;
-
- // calculate derivate
- delta = data[pos] - data[prevpos];
- if (delta <= 0)
- {
- // going downhill, ok
- if (climb_count)
- {
- climb_count --; // decrease climb count
- }
-
- // check if new minimum found
- if (data[pos] < refvalue)
- {
- // new minimum found
- lowpos = pos;
- refvalue = data[pos];
- }
- }
- else
- {
- // going uphill, increase climbing counter
- climb_count ++;
- if (climb_count > 5) break; // we've been climbing too long => it's next uphill => quit
- }
- }
- return lowpos;
-}
-
-
-// Find offset where the value crosses the given level, when starting from 'peakpos' and
-// proceeds to direction defined in 'direction'
-int PeakFinder::findCrossingLevel(const float *data, float level, int peakpos, int direction) const
-{
- float peaklevel;
- int pos;
-
- peaklevel = data[peakpos];
- assert(peaklevel >= level);
- pos = peakpos;
- while ((pos >= minPos) && (pos < maxPos))
- {
- if (data[pos + direction] < level) return pos; // crossing found
- pos += direction;
- }
- return -1; // not found
-}
-
-
-// Calculates the center of mass location of 'data' array items between 'firstPos' and 'lastPos'
-double PeakFinder::calcMassCenter(const float *data, int firstPos, int lastPos) const
-{
- int i;
- float sum;
- float wsum;
-
- sum = 0;
- wsum = 0;
- for (i = firstPos; i <= lastPos; i ++)
- {
- sum += (float)i * data[i];
- wsum += data[i];
- }
-
- if (wsum < 1e-6) return 0;
- return sum / wsum;
-}
-
-
-
-/// get exact center of peak near given position by calculating local mass of center
-double PeakFinder::getPeakCenter(const float *data, int peakpos) const
-{
- float peakLevel; // peak level
- int crosspos1, crosspos2; // position where the peak 'hump' crosses cutting level
- float cutLevel; // cutting value
- float groundLevel; // ground level of the peak
- int gp1, gp2; // bottom positions of the peak 'hump'
-
- // find ground positions.
- gp1 = findGround(data, peakpos, -1);
- gp2 = findGround(data, peakpos, 1);
-
- peakLevel = data[peakpos];
-
- if (gp1 == gp2)
- {
- // avoid rounding errors when all are equal
- assert(gp1 == peakpos);
- cutLevel = groundLevel = peakLevel;
- } else {
- // get average of the ground levels
- groundLevel = 0.5f * (data[gp1] + data[gp2]);
-
- // calculate 70%-level of the peak
- cutLevel = 0.70f * peakLevel + 0.30f * groundLevel;
- }
-
- // find mid-level crossings
- crosspos1 = findCrossingLevel(data, cutLevel, peakpos, -1);
- crosspos2 = findCrossingLevel(data, cutLevel, peakpos, 1);
-
- if ((crosspos1 < 0) || (crosspos2 < 0)) return 0; // no crossing, no peak..
-
- // calculate mass center of the peak surroundings
- return calcMassCenter(data, crosspos1, crosspos2);
-}
-
-
-
-double PeakFinder::detectPeak(const float *data, int aminPos, int amaxPos)
-{
-
- int i;
- int peakpos; // position of peak level
- double highPeak, peak;
-
- this->minPos = aminPos;
- this->maxPos = amaxPos;
-
- // find absolute peak
- peakpos = minPos;
- peak = data[minPos];
- for (i = minPos + 1; i < maxPos; i ++)
- {
- if (data[i] > peak)
- {
- peak = data[i];
- peakpos = i;
- }
- }
-
- // Calculate exact location of the highest peak mass center
- highPeak = getPeakCenter(data, peakpos);
- peak = highPeak;
-
- // Now check if the highest peak were in fact harmonic of the true base beat peak
- // - sometimes the highest peak can be Nth harmonic of the true base peak yet
- // just a slightly higher than the true base
-
- for (i = 3; i < 10; i ++)
- {
- double peaktmp, harmonic;
- int i1,i2;
-
- harmonic = (double)i * 0.5;
- peakpos = (int)(highPeak / harmonic + 0.5f);
- if (peakpos < minPos) break;
- peakpos = findTop(data, peakpos); // seek true local maximum index
- if (peakpos == 0) continue; // no local max here
-
- // calculate mass-center of possible harmonic peak
- peaktmp = getPeakCenter(data, peakpos);
-
- // accept harmonic peak if
- // (a) it is found
- // (b) is within ±4% of the expected harmonic interval
- // (c) has at least half x-corr value of the max. peak
-
- double diff = harmonic * peaktmp / highPeak;
- if ((diff < 0.96) || (diff > 1.04)) continue; // peak too afar from expected
-
- // now compare to highest detected peak
- i1 = (int)(highPeak + 0.5);
- i2 = (int)(peaktmp + 0.5);
- if (data[i2] >= 0.4*data[i1])
- {
- // The harmonic is at least half as high primary peak,
- // thus use the harmonic peak instead
- peak = peaktmp;
- }
- }
-
- return peak;
-}
diff --git a/src/thirdparty/SoundTouch/source/PeakFinder.h b/src/thirdparty/SoundTouch/source/PeakFinder.h
deleted file mode 100644
index e94a554ed..000000000
--- a/src/thirdparty/SoundTouch/source/PeakFinder.h
+++ /dev/null
@@ -1,97 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// The routine detects highest value on an array of values and calculates the
-/// precise peak location as a mass-center of the 'hump' around the peak value.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2011-12-30 20:33:46 +0000 (Fri, 30 Dec 2011) $
-// File revision : $Revision: 4 $
-//
-// $Id: PeakFinder.h 132 2011-12-30 20:33:46Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef _PeakFinder_H_
-#define _PeakFinder_H_
-
-namespace soundtouch
-{
-
-class PeakFinder
-{
-protected:
- /// Min, max allowed peak positions within the data vector
- int minPos, maxPos;
-
- /// Calculates the mass center between given vector items.
- double calcMassCenter(const float *data, ///< Data vector.
- int firstPos, ///< Index of first vector item beloging to the peak.
- int lastPos ///< Index of last vector item beloging to the peak.
- ) const;
-
- /// Finds the data vector index where the monotoniously decreasing signal crosses the
- /// given level.
- int findCrossingLevel(const float *data, ///< Data vector.
- float level, ///< Goal crossing level.
- int peakpos, ///< Peak position index within the data vector.
- int direction /// Direction where to proceed from the peak: 1 = right, -1 = left.
- ) const;
-
- // Finds real 'top' of a peak hump from neighnourhood of the given 'peakpos'.
- int findTop(const float *data, int peakpos) const;
-
-
- /// Finds the 'ground' level, i.e. smallest level between two neighbouring peaks, to right-
- /// or left-hand side of the given peak position.
- int findGround(const float *data, /// Data vector.
- int peakpos, /// Peak position index within the data vector.
- int direction /// Direction where to proceed from the peak: 1 = right, -1 = left.
- ) const;
-
- /// get exact center of peak near given position by calculating local mass of center
- double getPeakCenter(const float *data, int peakpos) const;
-
-public:
- /// Constructor.
- PeakFinder();
-
- /// Detect exact peak position of the data vector by finding the largest peak 'hump'
- /// and calculating the mass-center location of the peak hump.
- ///
- /// \return The location of the largest base harmonic peak hump.
- double detectPeak(const float *data, /// Data vector to be analyzed. The data vector has
- /// to be at least 'maxPos' items long.
- int minPos, ///< Min allowed peak location within the vector data.
- int maxPos ///< Max allowed peak location within the vector data.
- );
-};
-
-}
-
-#endif // _PeakFinder_H_
diff --git a/src/thirdparty/SoundTouch/source/RateTransposer.cpp b/src/thirdparty/SoundTouch/source/RateTransposer.cpp
deleted file mode 100644
index d158596b9..000000000
--- a/src/thirdparty/SoundTouch/source/RateTransposer.cpp
+++ /dev/null
@@ -1,302 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Sample rate transposer. Changes sample rate by using linear interpolation
-/// together with anti-alias filtering (first order interpolation with anti-
-/// alias filtering should be quite adequate for this application)
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2014-04-06 15:57:21 +0000 (Sun, 06 Apr 2014) $
-// File revision : $Revision: 4 $
-//
-// $Id: RateTransposer.cpp 195 2014-04-06 15:57:21Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include <memory.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include "RateTransposer.h"
-#include "InterpolateLinear.h"
-#include "InterpolateCubic.h"
-#include "InterpolateShannon.h"
-#include "AAFilter.h"
-
-using namespace soundtouch;
-
-// Define default interpolation algorithm here
-TransposerBase::ALGORITHM TransposerBase::algorithm = TransposerBase::CUBIC;
-
-
-// Constructor
-RateTransposer::RateTransposer() : FIFOProcessor(&outputBuffer)
-{
- bUseAAFilter = true;
-
- // Instantiates the anti-alias filter
- pAAFilter = new AAFilter(64);
- pTransposer = TransposerBase::newInstance();
-}
-
-
-
-RateTransposer::~RateTransposer()
-{
- delete pAAFilter;
- delete pTransposer;
-}
-
-
-
-/// Enables/disables the anti-alias filter. Zero to disable, nonzero to enable
-void RateTransposer::enableAAFilter(bool newMode)
-{
- bUseAAFilter = newMode;
-}
-
-
-/// Returns nonzero if anti-alias filter is enabled.
-bool RateTransposer::isAAFilterEnabled() const
-{
- return bUseAAFilter;
-}
-
-
-AAFilter *RateTransposer::getAAFilter()
-{
- return pAAFilter;
-}
-
-
-
-// Sets new target iRate. Normal iRate = 1.0, smaller values represent slower
-// iRate, larger faster iRates.
-void RateTransposer::setRate(float newRate)
-{
- double fCutoff;
-
- pTransposer->setRate(newRate);
-
- // design a new anti-alias filter
- if (newRate > 1.0f)
- {
- fCutoff = 0.5f / newRate;
- }
- else
- {
- fCutoff = 0.5f * newRate;
- }
- pAAFilter->setCutoffFreq(fCutoff);
-}
-
-
-// Adds 'nSamples' pcs of samples from the 'samples' memory position into
-// the input of the object.
-void RateTransposer::putSamples(const SAMPLETYPE *samples, uint nSamples)
-{
- processSamples(samples, nSamples);
-}
-
-
-// Transposes sample rate by applying anti-alias filter to prevent folding.
-// Returns amount of samples returned in the "dest" buffer.
-// The maximum amount of samples that can be returned at a time is set by
-// the 'set_returnBuffer_size' function.
-void RateTransposer::processSamples(const SAMPLETYPE *src, uint nSamples)
-{
- uint count;
-
- if (nSamples == 0) return;
-
- // Store samples to input buffer
- inputBuffer.putSamples(src, nSamples);
-
- // If anti-alias filter is turned off, simply transpose without applying
- // the filter
- if (bUseAAFilter == false)
- {
- count = pTransposer->transpose(outputBuffer, inputBuffer);
- return;
- }
-
- assert(pAAFilter);
-
- // Transpose with anti-alias filter
- if (pTransposer->rate < 1.0f)
- {
- // If the parameter 'Rate' value is smaller than 1, first transpose
- // the samples and then apply the anti-alias filter to remove aliasing.
-
- // Transpose the samples, store the result to end of "midBuffer"
- pTransposer->transpose(midBuffer, inputBuffer);
-
- // Apply the anti-alias filter for transposed samples in midBuffer
- pAAFilter->evaluate(outputBuffer, midBuffer);
- }
- else
- {
- // If the parameter 'Rate' value is larger than 1, first apply the
- // anti-alias filter to remove high frequencies (prevent them from folding
- // over the lover frequencies), then transpose.
-
- // Apply the anti-alias filter for samples in inputBuffer
- pAAFilter->evaluate(midBuffer, inputBuffer);
-
- // Transpose the AA-filtered samples in "midBuffer"
- pTransposer->transpose(outputBuffer, midBuffer);
- }
-}
-
-
-// Sets the number of channels, 1 = mono, 2 = stereo
-void RateTransposer::setChannels(int nChannels)
-{
- assert(nChannels > 0);
-
- if (pTransposer->numChannels == nChannels) return;
- pTransposer->setChannels(nChannels);
-
- inputBuffer.setChannels(nChannels);
- midBuffer.setChannels(nChannels);
- outputBuffer.setChannels(nChannels);
-}
-
-
-// Clears all the samples in the object
-void RateTransposer::clear()
-{
- outputBuffer.clear();
- midBuffer.clear();
- inputBuffer.clear();
-}
-
-
-// Returns nonzero if there aren't any samples available for outputting.
-int RateTransposer::isEmpty() const
-{
- int res;
-
- res = FIFOProcessor::isEmpty();
- if (res == 0) return 0;
- return inputBuffer.isEmpty();
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// TransposerBase - Base class for interpolation
-//
-
-// static function to set interpolation algorithm
-void TransposerBase::setAlgorithm(TransposerBase::ALGORITHM a)
-{
- TransposerBase::algorithm = a;
-}
-
-
-// Transposes the sample rate of the given samples using linear interpolation.
-// Returns the number of samples returned in the "dest" buffer
-int TransposerBase::transpose(FIFOSampleBuffer &dest, FIFOSampleBuffer &src)
-{
- int numSrcSamples = src.numSamples();
- int sizeDemand = (int)((float)numSrcSamples / rate) + 8;
- int numOutput;
- SAMPLETYPE *psrc = src.ptrBegin();
- SAMPLETYPE *pdest = dest.ptrEnd(sizeDemand);
-
-#ifndef USE_MULTICH_ALWAYS
- if (numChannels == 1)
- {
- numOutput = transposeMono(pdest, psrc, numSrcSamples);
- }
- else if (numChannels == 2)
- {
- numOutput = transposeStereo(pdest, psrc, numSrcSamples);
- }
- else
-#endif // USE_MULTICH_ALWAYS
- {
- assert(numChannels > 0);
- numOutput = transposeMulti(pdest, psrc, numSrcSamples);
- }
- dest.putSamples(numOutput);
- src.receiveSamples(numSrcSamples);
- return numOutput;
-}
-
-
-TransposerBase::TransposerBase()
-{
- numChannels = 0;
- rate = 1.0f;
-}
-
-
-TransposerBase::~TransposerBase()
-{
-}
-
-
-void TransposerBase::setChannels(int channels)
-{
- numChannels = channels;
- resetRegisters();
-}
-
-
-void TransposerBase::setRate(float newRate)
-{
- rate = newRate;
-}
-
-
-// static factory function
-TransposerBase *TransposerBase::newInstance()
-{
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
- // Notice: For integer arithmetics support only linear algorithm (due to simplest calculus)
- return ::new InterpolateLinearInteger;
-#else
- switch (algorithm)
- {
- case LINEAR:
- return new InterpolateLinearFloat;
-
- case CUBIC:
- return new InterpolateCubic;
-
- case SHANNON:
- return new InterpolateShannon;
-
- default:
- assert(false);
- return NULL;
- }
-#endif
-}
diff --git a/src/thirdparty/SoundTouch/source/RateTransposer.h b/src/thirdparty/SoundTouch/source/RateTransposer.h
deleted file mode 100644
index 51fc36fc5..000000000
--- a/src/thirdparty/SoundTouch/source/RateTransposer.h
+++ /dev/null
@@ -1,179 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Sample rate transposer. Changes sample rate by using linear interpolation
-/// together with anti-alias filtering (first order interpolation with anti-
-/// alias filtering should be quite adequate for this application).
-///
-/// Use either of the derived classes of 'RateTransposerInteger' or
-/// 'RateTransposerFloat' for corresponding integer/floating point tranposing
-/// algorithm implementation.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2014-04-06 15:57:21 +0000 (Sun, 06 Apr 2014) $
-// File revision : $Revision: 4 $
-//
-// $Id: RateTransposer.h 195 2014-04-06 15:57:21Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef RateTransposer_H
-#define RateTransposer_H
-
-#include <stddef.h>
-#include "AAFilter.h"
-#include "FIFOSamplePipe.h"
-#include "FIFOSampleBuffer.h"
-
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-/// Abstract base class for transposer implementations (linear, advanced vs integer, float etc)
-class TransposerBase
-{
-public:
- enum ALGORITHM {
- LINEAR = 0,
- CUBIC,
- SHANNON
- };
-
-protected:
- virtual void resetRegisters() = 0;
-
- virtual int transposeMono(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) = 0;
- virtual int transposeStereo(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) = 0;
- virtual int transposeMulti(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) = 0;
-
- static ALGORITHM algorithm;
-
-public:
- float rate;
- int numChannels;
-
- TransposerBase();
- virtual ~TransposerBase();
-
- virtual int transpose(FIFOSampleBuffer &dest, FIFOSampleBuffer &src);
- virtual void setRate(float newRate);
- virtual void setChannels(int channels);
-
- // static factory function
- static TransposerBase *newInstance();
-
- // static function to set interpolation algorithm
- static void setAlgorithm(ALGORITHM a);
-};
-
-
-/// A common linear samplerate transposer class.
-///
-class RateTransposer : public FIFOProcessor
-{
-protected:
- /// Anti-alias filter object
- AAFilter *pAAFilter;
- TransposerBase *pTransposer;
-
- /// Buffer for collecting samples to feed the anti-alias filter between
- /// two batches
- FIFOSampleBuffer inputBuffer;
-
- /// Buffer for keeping samples between transposing & anti-alias filter
- FIFOSampleBuffer midBuffer;
-
- /// Output sample buffer
- FIFOSampleBuffer outputBuffer;
-
- bool bUseAAFilter;
-
-
- /// Transposes sample rate by applying anti-alias filter to prevent folding.
- /// Returns amount of samples returned in the "dest" buffer.
- /// The maximum amount of samples that can be returned at a time is set by
- /// the 'set_returnBuffer_size' function.
- void processSamples(const SAMPLETYPE *src,
- uint numSamples);
-
-public:
- RateTransposer();
- virtual ~RateTransposer();
-
- /// Operator 'new' is overloaded so that it automatically creates a suitable instance
- /// depending on if we're to use integer or floating point arithmetics.
-// static void *operator new(size_t s);
-
- /// Use this function instead of "new" operator to create a new instance of this class.
- /// This function automatically chooses a correct implementation, depending on if
- /// integer ot floating point arithmetics are to be used.
-// static RateTransposer *newInstance();
-
- /// Returns the output buffer object
- FIFOSamplePipe *getOutput() { return &outputBuffer; };
-
- /// Returns the store buffer object
-// FIFOSamplePipe *getStore() { return &storeBuffer; };
-
- /// Return anti-alias filter object
- AAFilter *getAAFilter();
-
- /// Enables/disables the anti-alias filter. Zero to disable, nonzero to enable
- void enableAAFilter(bool newMode);
-
- /// Returns nonzero if anti-alias filter is enabled.
- bool isAAFilterEnabled() const;
-
- /// Sets new target rate. Normal rate = 1.0, smaller values represent slower
- /// rate, larger faster rates.
- virtual void setRate(float newRate);
-
- /// Sets the number of channels, 1 = mono, 2 = stereo
- void setChannels(int channels);
-
- /// Adds 'numSamples' pcs of samples from the 'samples' memory position into
- /// the input of the object.
- void putSamples(const SAMPLETYPE *samples, uint numSamples);
-
- /// Clears all the samples in the object
- void clear();
-
- /// Returns nonzero if there aren't any samples available for outputting.
- int isEmpty() const;
-};
-
-}
-
-#endif
diff --git a/src/thirdparty/SoundTouch/source/SoundTouch.cpp b/src/thirdparty/SoundTouch/source/SoundTouch.cpp
deleted file mode 100644
index afa3774cb..000000000
--- a/src/thirdparty/SoundTouch/source/SoundTouch.cpp
+++ /dev/null
@@ -1,504 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-///
-/// SoundTouch - main class for tempo/pitch/rate adjusting routines.
-///
-/// Notes:
-/// - Initialize the SoundTouch object instance by setting up the sound stream
-/// parameters with functions 'setSampleRate' and 'setChannels', then set
-/// desired tempo/pitch/rate settings with the corresponding functions.
-///
-/// - The SoundTouch class behaves like a first-in-first-out pipeline: The
-/// samples that are to be processed are fed into one of the pipe by calling
-/// function 'putSamples', while the ready processed samples can be read
-/// from the other end of the pipeline with function 'receiveSamples'.
-///
-/// - The SoundTouch processing classes require certain sized 'batches' of
-/// samples in order to process the sound. For this reason the classes buffer
-/// incoming samples until there are enough of samples available for
-/// processing, then they carry out the processing step and consequently
-/// make the processed samples available for outputting.
-///
-/// - For the above reason, the processing routines introduce a certain
-/// 'latency' between the input and output, so that the samples input to
-/// SoundTouch may not be immediately available in the output, and neither
-/// the amount of outputtable samples may not immediately be in direct
-/// relationship with the amount of previously input samples.
-///
-/// - The tempo/pitch/rate control parameters can be altered during processing.
-/// Please notice though that they aren't currently protected by semaphores,
-/// so in multi-thread application external semaphore protection may be
-/// required.
-///
-/// - This class utilizes classes 'TDStretch' for tempo change (without modifying
-/// pitch) and 'RateTransposer' for changing the playback rate (that is, both
-/// tempo and pitch in the same ratio) of the sound. The third available control
-/// 'pitch' (change pitch but maintain tempo) is produced by a combination of
-/// combining the two other controls.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2014-10-08 15:26:57 +0000 (Wed, 08 Oct 2014) $
-// File revision : $Revision: 4 $
-//
-// $Id: SoundTouch.cpp 201 2014-10-08 15:26:57Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include <assert.h>
-#include <stdlib.h>
-#include <memory.h>
-#include <math.h>
-#include <stdio.h>
-
-#include "SoundTouch.h"
-#include "TDStretch.h"
-#include "RateTransposer.h"
-#include "cpu_detect.h"
-
-using namespace soundtouch;
-
-/// test if two floating point numbers are equal
-#define TEST_FLOAT_EQUAL(a, b) (fabs(a - b) < 1e-10)
-
-
-/// Print library version string for autoconf
-extern "C" void soundtouch_ac_test()
-{
- printf("SoundTouch Version: %s\n",SOUNDTOUCH_VERSION);
-}
-
-
-SoundTouch::SoundTouch()
-{
- // Initialize rate transposer and tempo changer instances
-
- pRateTransposer = new RateTransposer();
- pTDStretch = TDStretch::newInstance();
-
- setOutPipe(pTDStretch);
-
- rate = tempo = 0;
-
- virtualPitch =
- virtualRate =
- virtualTempo = 1.0;
-
- calcEffectiveRateAndTempo();
-
- channels = 0;
- bSrateSet = false;
-}
-
-
-
-SoundTouch::~SoundTouch()
-{
- delete pRateTransposer;
- delete pTDStretch;
-}
-
-
-
-/// Get SoundTouch library version string
-const char *SoundTouch::getVersionString()
-{
- static const char *_version = SOUNDTOUCH_VERSION;
-
- return _version;
-}
-
-
-/// Get SoundTouch library version Id
-uint SoundTouch::getVersionId()
-{
- return SOUNDTOUCH_VERSION_ID;
-}
-
-
-// Sets the number of channels, 1 = mono, 2 = stereo
-void SoundTouch::setChannels(uint numChannels)
-{
- /*if (numChannels != 1 && numChannels != 2)
- {
- //ST_THROW_RT_ERROR("Illegal number of channels");
- return;
- }*/
- channels = numChannels;
- pRateTransposer->setChannels((int)numChannels);
- pTDStretch->setChannels((int)numChannels);
-}
-
-
-
-// Sets new rate control value. Normal rate = 1.0, smaller values
-// represent slower rate, larger faster rates.
-void SoundTouch::setRate(float newRate)
-{
- virtualRate = newRate;
- calcEffectiveRateAndTempo();
-}
-
-
-
-// Sets new rate control value as a difference in percents compared
-// to the original rate (-50 .. +100 %)
-void SoundTouch::setRateChange(float newRate)
-{
- virtualRate = 1.0f + 0.01f * newRate;
- calcEffectiveRateAndTempo();
-}
-
-
-
-// Sets new tempo control value. Normal tempo = 1.0, smaller values
-// represent slower tempo, larger faster tempo.
-void SoundTouch::setTempo(float newTempo)
-{
- virtualTempo = newTempo;
- calcEffectiveRateAndTempo();
-}
-
-
-
-// Sets new tempo control value as a difference in percents compared
-// to the original tempo (-50 .. +100 %)
-void SoundTouch::setTempoChange(float newTempo)
-{
- virtualTempo = 1.0f + 0.01f * newTempo;
- calcEffectiveRateAndTempo();
-}
-
-
-
-// Sets new pitch control value. Original pitch = 1.0, smaller values
-// represent lower pitches, larger values higher pitch.
-void SoundTouch::setPitch(float newPitch)
-{
- virtualPitch = newPitch;
- calcEffectiveRateAndTempo();
-}
-
-
-
-// Sets pitch change in octaves compared to the original pitch
-// (-1.00 .. +1.00)
-void SoundTouch::setPitchOctaves(float newPitch)
-{
- virtualPitch = (float)exp(0.69314718056f * newPitch);
- calcEffectiveRateAndTempo();
-}
-
-
-
-// Sets pitch change in semi-tones compared to the original pitch
-// (-12 .. +12)
-void SoundTouch::setPitchSemiTones(int newPitch)
-{
- setPitchOctaves((float)newPitch / 12.0f);
-}
-
-
-
-void SoundTouch::setPitchSemiTones(float newPitch)
-{
- setPitchOctaves(newPitch / 12.0f);
-}
-
-
-// Calculates 'effective' rate and tempo values from the
-// nominal control values.
-void SoundTouch::calcEffectiveRateAndTempo()
-{
- float oldTempo = tempo;
- float oldRate = rate;
-
- tempo = virtualTempo / virtualPitch;
- rate = virtualPitch * virtualRate;
-
- if (!TEST_FLOAT_EQUAL(rate,oldRate)) pRateTransposer->setRate(rate);
- if (!TEST_FLOAT_EQUAL(tempo, oldTempo)) pTDStretch->setTempo(tempo);
-
-#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
- if (rate <= 1.0f)
- {
- if (output != pTDStretch)
- {
- FIFOSamplePipe *tempoOut;
-
- assert(output == pRateTransposer);
- // move samples in the current output buffer to the output of pTDStretch
- tempoOut = pTDStretch->getOutput();
- tempoOut->moveSamples(*output);
- // move samples in pitch transposer's store buffer to tempo changer's input
- // deprecated : pTDStretch->moveSamples(*pRateTransposer->getStore());
-
- output = pTDStretch;
- }
- }
- else
-#endif
- {
- if (output != pRateTransposer)
- {
- FIFOSamplePipe *transOut;
-
- assert(output == pTDStretch);
- // move samples in the current output buffer to the output of pRateTransposer
- transOut = pRateTransposer->getOutput();
- transOut->moveSamples(*output);
- // move samples in tempo changer's input to pitch transposer's input
- pRateTransposer->moveSamples(*pTDStretch->getInput());
-
- output = pRateTransposer;
- }
- }
-}
-
-
-// Sets sample rate.
-void SoundTouch::setSampleRate(uint srate)
-{
- bSrateSet = true;
- // set sample rate, leave other tempo changer parameters as they are.
- pTDStretch->setParameters((int)srate);
-}
-
-
-// Adds 'numSamples' pcs of samples from the 'samples' memory position into
-// the input of the object.
-void SoundTouch::putSamples(const SAMPLETYPE *samples, uint nSamples)
-{
- if (bSrateSet == false)
- {
- ST_THROW_RT_ERROR("SoundTouch : Sample rate not defined");
- }
- else if (channels == 0)
- {
- ST_THROW_RT_ERROR("SoundTouch : Number of channels not defined");
- }
-
- // Transpose the rate of the new samples if necessary
- /* Bypass the nominal setting - can introduce a click in sound when tempo/pitch control crosses the nominal value...
- if (rate == 1.0f)
- {
- // The rate value is same as the original, simply evaluate the tempo changer.
- assert(output == pTDStretch);
- if (pRateTransposer->isEmpty() == 0)
- {
- // yet flush the last samples in the pitch transposer buffer
- // (may happen if 'rate' changes from a non-zero value to zero)
- pTDStretch->moveSamples(*pRateTransposer);
- }
- pTDStretch->putSamples(samples, nSamples);
- }
- */
-#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
- else if (rate <= 1.0f)
- {
- // transpose the rate down, output the transposed sound to tempo changer buffer
- assert(output == pTDStretch);
- pRateTransposer->putSamples(samples, nSamples);
- pTDStretch->moveSamples(*pRateTransposer);
- }
- else
-#endif
- {
- // evaluate the tempo changer, then transpose the rate up,
- assert(output == pRateTransposer);
- pTDStretch->putSamples(samples, nSamples);
- pRateTransposer->moveSamples(*pTDStretch);
- }
-}
-
-
-// Flushes the last samples from the processing pipeline to the output.
-// Clears also the internal processing buffers.
-//
-// Note: This function is meant for extracting the last samples of a sound
-// stream. This function may introduce additional blank samples in the end
-// of the sound stream, and thus it's not recommended to call this function
-// in the middle of a sound stream.
-void SoundTouch::flush()
-{
- int i;
- int nUnprocessed;
- int nOut;
- SAMPLETYPE *buff = new SAMPLETYPE[64 * channels];
-
- // check how many samples still await processing, and scale
- // that by tempo & rate to get expected output sample count
- nUnprocessed = numUnprocessedSamples();
- nUnprocessed = (int)((double)nUnprocessed / (tempo * rate) + 0.5);
-
- nOut = numSamples(); // ready samples currently in buffer ...
- nOut += nUnprocessed; // ... and how many we expect there to be in the end
-
- memset(buff, 0, 64 * channels * sizeof(SAMPLETYPE));
- // "Push" the last active samples out from the processing pipeline by
- // feeding blank samples into the processing pipeline until new,
- // processed samples appear in the output (not however, more than
- // 8ksamples in any case)
- for (i = 0; i < 128; i ++)
- {
- putSamples(buff, 64);
- if ((int)numSamples() >= nOut)
- {
- // Enough new samples have appeared into the output!
- // As samples come from processing with bigger chunks, now truncate it
- // back to maximum "nOut" samples to improve duration accuracy
- adjustAmountOfSamples(nOut);
-
- // finish
- break;
- }
- }
-
- delete[] buff;
-
- // Clear working buffers
- pRateTransposer->clear();
- pTDStretch->clearInput();
- // yet leave the 'tempoChanger' output intouched as that's where the
- // flushed samples are!
-}
-
-
-// Changes a setting controlling the processing system behaviour. See the
-// 'SETTING_...' defines for available setting ID's.
-bool SoundTouch::setSetting(int settingId, int value)
-{
- int sampleRate, sequenceMs, seekWindowMs, overlapMs;
-
- // read current tdstretch routine parameters
- pTDStretch->getParameters(&sampleRate, &sequenceMs, &seekWindowMs, &overlapMs);
-
- switch (settingId)
- {
- case SETTING_USE_AA_FILTER :
- // enables / disabless anti-alias filter
- pRateTransposer->enableAAFilter((value != 0) ? true : false);
- return true;
-
- case SETTING_AA_FILTER_LENGTH :
- // sets anti-alias filter length
- pRateTransposer->getAAFilter()->setLength(value);
- return true;
-
- case SETTING_USE_QUICKSEEK :
- // enables / disables tempo routine quick seeking algorithm
- pTDStretch->enableQuickSeek((value != 0) ? true : false);
- return true;
-
- case SETTING_SEQUENCE_MS:
- // change time-stretch sequence duration parameter
- pTDStretch->setParameters(sampleRate, value, seekWindowMs, overlapMs);
- return true;
-
- case SETTING_SEEKWINDOW_MS:
- // change time-stretch seek window length parameter
- pTDStretch->setParameters(sampleRate, sequenceMs, value, overlapMs);
- return true;
-
- case SETTING_OVERLAP_MS:
- // change time-stretch overlap length parameter
- pTDStretch->setParameters(sampleRate, sequenceMs, seekWindowMs, value);
- return true;
-
- default :
- return false;
- }
-}
-
-
-// Reads a setting controlling the processing system behaviour. See the
-// 'SETTING_...' defines for available setting ID's.
-//
-// Returns the setting value.
-int SoundTouch::getSetting(int settingId) const
-{
- int temp;
-
- switch (settingId)
- {
- case SETTING_USE_AA_FILTER :
- return (uint)pRateTransposer->isAAFilterEnabled();
-
- case SETTING_AA_FILTER_LENGTH :
- return pRateTransposer->getAAFilter()->getLength();
-
- case SETTING_USE_QUICKSEEK :
- return (uint) pTDStretch->isQuickSeekEnabled();
-
- case SETTING_SEQUENCE_MS:
- pTDStretch->getParameters(NULL, &temp, NULL, NULL);
- return temp;
-
- case SETTING_SEEKWINDOW_MS:
- pTDStretch->getParameters(NULL, NULL, &temp, NULL);
- return temp;
-
- case SETTING_OVERLAP_MS:
- pTDStretch->getParameters(NULL, NULL, NULL, &temp);
- return temp;
-
- case SETTING_NOMINAL_INPUT_SEQUENCE :
- return pTDStretch->getInputSampleReq();
-
- case SETTING_NOMINAL_OUTPUT_SEQUENCE :
- return pTDStretch->getOutputBatchSize();
-
- default :
- return 0;
- }
-}
-
-
-// Clears all the samples in the object's output and internal processing
-// buffers.
-void SoundTouch::clear()
-{
- pRateTransposer->clear();
- pTDStretch->clear();
-}
-
-
-
-/// Returns number of samples currently unprocessed.
-uint SoundTouch::numUnprocessedSamples() const
-{
- FIFOSamplePipe * psp;
- if (pTDStretch)
- {
- psp = pTDStretch->getInput();
- if (psp)
- {
- return psp->numSamples();
- }
- }
- return 0;
-}
diff --git a/src/thirdparty/SoundTouch/source/SoundTouch.vcxproj b/src/thirdparty/SoundTouch/source/SoundTouch.vcxproj
deleted file mode 100644
index 68684235a..000000000
--- a/src/thirdparty/SoundTouch/source/SoundTouch.vcxproj
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{68A5DD20-7057-448B-8FE0-B6AC8D205509}</ProjectGuid>
- <RootNamespace>SoundTouch</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- <ProjectName>SoundTouch</ProjectName>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- <Import Project="..\..\..\common-3rd-party.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- <Import Project="..\..\..\common-3rd-party.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- <Import Project="..\..\..\common-3rd-party.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- <Import Project="..\..\..\common-3rd-party.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\include\BPMDetect.h" />
- <ClInclude Include="..\include\FIFOSampleBuffer.h" />
- <ClInclude Include="..\include\FIFOSamplePipe.h" />
- <ClInclude Include="..\include\SoundTouch.h" />
- <ClInclude Include="..\include\STTypes.h" />
- <ClInclude Include="AAFilter.h" />
- <ClInclude Include="cpu_detect.h" />
- <ClInclude Include="FIRFilter.h" />
- <ClInclude Include="InterpolateCubic.h" />
- <ClInclude Include="InterpolateLinear.h" />
- <ClInclude Include="InterpolateShannon.h" />
- <ClInclude Include="PeakFinder.h" />
- <ClInclude Include="RateTransposer.h" />
- <ClInclude Include="TDStretch.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="AAFilter.cpp" />
- <ClCompile Include="BPMDetect.cpp" />
- <ClCompile Include="cpu_detect_x86.cpp" />
- <ClCompile Include="FIFOSampleBuffer.cpp" />
- <ClCompile Include="FIRFilter.cpp" />
- <ClCompile Include="InterpolateCubic.cpp" />
- <ClCompile Include="InterpolateLinear.cpp" />
- <ClCompile Include="InterpolateShannon.cpp" />
- <ClCompile Include="mmx_optimized.cpp">
- <ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="PeakFinder.cpp" />
- <ClCompile Include="RateTransposer.cpp" />
- <ClCompile Include="SoundTouch.cpp" />
- <ClCompile Include="sse_optimized.cpp">
- <ExcludedFromBuild>true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="TDStretch.cpp" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/src/thirdparty/SoundTouch/source/SoundTouch.vcxproj.filters b/src/thirdparty/SoundTouch/source/SoundTouch.vcxproj.filters
deleted file mode 100644
index 217841b0c..000000000
--- a/src/thirdparty/SoundTouch/source/SoundTouch.vcxproj.filters
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{aa41e207-7b47-4245-a2c6-c1d9d0c87ed8}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Source Files\bpm">
- <UniqueIdentifier>{1e81f342-0386-4ea9-b3d5-cf6ebb95efc3}</UniqueIdentifier>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{c3316316-e027-4a82-9d8d-fdd5846add8c}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="AAFilter.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="cpu_detect.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="FIRFilter.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="PeakFinder.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="RateTransposer.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="TDStretch.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\include\BPMDetect.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\include\FIFOSampleBuffer.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\include\FIFOSamplePipe.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\include\SoundTouch.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\include\STTypes.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="InterpolateCubic.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="InterpolateLinear.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="InterpolateShannon.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="BPMDetect.cpp">
- <Filter>Source Files\bpm</Filter>
- </ClCompile>
- <ClCompile Include="PeakFinder.cpp">
- <Filter>Source Files\bpm</Filter>
- </ClCompile>
- <ClCompile Include="AAFilter.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="cpu_detect_x86.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="FIFOSampleBuffer.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="FIRFilter.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="mmx_optimized.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="RateTransposer.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="SoundTouch.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="sse_optimized.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="TDStretch.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="InterpolateCubic.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="InterpolateLinear.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="InterpolateShannon.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/src/thirdparty/SoundTouch/source/TDStretch.cpp b/src/thirdparty/SoundTouch/source/TDStretch.cpp
deleted file mode 100644
index 9f9f40aa4..000000000
--- a/src/thirdparty/SoundTouch/source/TDStretch.cpp
+++ /dev/null
@@ -1,964 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Sampled sound tempo changer/time stretch algorithm. Changes the sound tempo
-/// while maintaining the original pitch by using a time domain WSOLA-like
-/// method with several performance-increasing tweaks.
-///
-/// Note : MMX optimized functions reside in a separate, platform-specific
-/// file, e.g. 'mmx_win.cpp' or 'mmx_gcc.cpp'
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2015-02-22 15:07:12 +0000 (Sun, 22 Feb 2015) $
-// File revision : $Revision: 1.12 $
-//
-// $Id: TDStretch.cpp 205 2015-02-22 15:07:12Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include <string.h>
-#include <limits.h>
-#include <assert.h>
-#include <math.h>
-#include <float.h>
-
-#include "STTypes.h"
-#include "cpu_detect.h"
-#include "TDStretch.h"
-
-using namespace soundtouch;
-
-#define max(x, y) (((x) > (y)) ? (x) : (y))
-
-
-/*****************************************************************************
- *
- * Constant definitions
- *
- *****************************************************************************/
-
-// Table for the hierarchical mixing position seeking algorithm
-static const short _scanOffsets[5][24]={
- { 124, 186, 248, 310, 372, 434, 496, 558, 620, 682, 744, 806,
- 868, 930, 992, 1054, 1116, 1178, 1240, 1302, 1364, 1426, 1488, 0},
- {-100, -75, -50, -25, 25, 50, 75, 100, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { -20, -15, -10, -5, 5, 10, 15, 20, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { -4, -3, -2, -1, 1, 2, 3, 4, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 121, 114, 97, 114, 98, 105, 108, 32, 104, 99, 117, 111,
- 116, 100, 110, 117, 111, 115, 0, 0, 0, 0, 0, 0}};
-
-/*****************************************************************************
- *
- * Implementation of the class 'TDStretch'
- *
- *****************************************************************************/
-
-
-TDStretch::TDStretch() : FIFOProcessor(&outputBuffer)
-{
- bQuickSeek = false;
- channels = 2;
-
- pMidBuffer = NULL;
- pMidBufferUnaligned = NULL;
- overlapLength = 0;
-
- bAutoSeqSetting = true;
- bAutoSeekSetting = true;
-
-// outDebt = 0;
- skipFract = 0;
-
- tempo = 1.0f;
- setParameters(44100, DEFAULT_SEQUENCE_MS, DEFAULT_SEEKWINDOW_MS, DEFAULT_OVERLAP_MS);
- setTempo(1.0f);
-
- clear();
-}
-
-
-
-TDStretch::~TDStretch()
-{
- delete[] pMidBufferUnaligned;
-}
-
-
-
-// Sets routine control parameters. These control are certain time constants
-// defining how the sound is stretched to the desired duration.
-//
-// 'sampleRate' = sample rate of the sound
-// 'sequenceMS' = one processing sequence length in milliseconds (default = 82 ms)
-// 'seekwindowMS' = seeking window length for scanning the best overlapping
-// position (default = 28 ms)
-// 'overlapMS' = overlapping length (default = 12 ms)
-
-void TDStretch::setParameters(int aSampleRate, int aSequenceMS,
- int aSeekWindowMS, int aOverlapMS)
-{
- // accept only positive parameter values - if zero or negative, use old values instead
- if (aSampleRate > 0) this->sampleRate = aSampleRate;
- if (aOverlapMS > 0) this->overlapMs = aOverlapMS;
-
- if (aSequenceMS > 0)
- {
- this->sequenceMs = aSequenceMS;
- bAutoSeqSetting = false;
- }
- else if (aSequenceMS == 0)
- {
- // if zero, use automatic setting
- bAutoSeqSetting = true;
- }
-
- if (aSeekWindowMS > 0)
- {
- this->seekWindowMs = aSeekWindowMS;
- bAutoSeekSetting = false;
- }
- else if (aSeekWindowMS == 0)
- {
- // if zero, use automatic setting
- bAutoSeekSetting = true;
- }
-
- calcSeqParameters();
-
- calculateOverlapLength(overlapMs);
-
- // set tempo to recalculate 'sampleReq'
- setTempo(tempo);
-}
-
-
-
-/// Get routine control parameters, see setParameters() function.
-/// Any of the parameters to this function can be NULL, in such case corresponding parameter
-/// value isn't returned.
-void TDStretch::getParameters(int *pSampleRate, int *pSequenceMs, int *pSeekWindowMs, int *pOverlapMs) const
-{
- if (pSampleRate)
- {
- *pSampleRate = sampleRate;
- }
-
- if (pSequenceMs)
- {
- *pSequenceMs = (bAutoSeqSetting) ? (USE_AUTO_SEQUENCE_LEN) : sequenceMs;
- }
-
- if (pSeekWindowMs)
- {
- *pSeekWindowMs = (bAutoSeekSetting) ? (USE_AUTO_SEEKWINDOW_LEN) : seekWindowMs;
- }
-
- if (pOverlapMs)
- {
- *pOverlapMs = overlapMs;
- }
-}
-
-
-// Overlaps samples in 'midBuffer' with the samples in 'pInput'
-void TDStretch::overlapMono(SAMPLETYPE *pOutput, const SAMPLETYPE *pInput) const
-{
- int i;
- SAMPLETYPE m1, m2;
-
- m1 = (SAMPLETYPE)0;
- m2 = (SAMPLETYPE)overlapLength;
-
- for (i = 0; i < overlapLength ; i ++)
- {
- pOutput[i] = (pInput[i] * m1 + pMidBuffer[i] * m2 ) / overlapLength;
- m1 += 1;
- m2 -= 1;
- }
-}
-
-
-
-void TDStretch::clearMidBuffer()
-{
- memset(pMidBuffer, 0, channels * sizeof(SAMPLETYPE) * overlapLength);
-}
-
-
-void TDStretch::clearInput()
-{
- inputBuffer.clear();
- clearMidBuffer();
-}
-
-
-// Clears the sample buffers
-void TDStretch::clear()
-{
- outputBuffer.clear();
- clearInput();
-}
-
-
-
-// Enables/disables the quick position seeking algorithm. Zero to disable, nonzero
-// to enable
-void TDStretch::enableQuickSeek(bool enable)
-{
- bQuickSeek = enable;
-}
-
-
-// Returns nonzero if the quick seeking algorithm is enabled.
-bool TDStretch::isQuickSeekEnabled() const
-{
- return bQuickSeek;
-}
-
-
-// Seeks for the optimal overlap-mixing position.
-int TDStretch::seekBestOverlapPosition(const SAMPLETYPE *refPos)
-{
- if (bQuickSeek)
- {
- return seekBestOverlapPositionQuick(refPos);
- }
- else
- {
- return seekBestOverlapPositionFull(refPos);
- }
-}
-
-
-// Overlaps samples in 'midBuffer' with the samples in 'pInputBuffer' at position
-// of 'ovlPos'.
-inline void TDStretch::overlap(SAMPLETYPE *pOutput, const SAMPLETYPE *pInput, uint ovlPos) const
-{
-#ifndef USE_MULTICH_ALWAYS
- if (channels == 1)
- {
- // mono sound.
- overlapMono(pOutput, pInput + ovlPos);
- }
- else if (channels == 2)
- {
- // stereo sound
- overlapStereo(pOutput, pInput + 2 * ovlPos);
- }
- else
-#endif // USE_MULTICH_ALWAYS
- {
- assert(channels > 0);
- overlapMulti(pOutput, pInput + channels * ovlPos);
- }
-}
-
-
-
-// Seeks for the optimal overlap-mixing position. The 'stereo' version of the
-// routine
-//
-// The best position is determined as the position where the two overlapped
-// sample sequences are 'most alike', in terms of the highest cross-correlation
-// value over the overlapping period
-int TDStretch::seekBestOverlapPositionFull(const SAMPLETYPE *refPos)
-{
- int bestOffs;
- double bestCorr;
- int i;
- double norm;
-
- bestCorr = FLT_MIN;
- bestOffs = 0;
-
- // Scans for the best correlation value by testing each possible position
- // over the permitted range.
- bestCorr = calcCrossCorr(refPos, pMidBuffer, norm);
-
- #pragma omp parallel for
- for (i = 1; i < seekLength; i ++)
- {
- double corr;
- // Calculates correlation value for the mixing position corresponding to 'i'
-#ifdef _OPENMP
- // in parallel OpenMP mode, can't use norm accumulator version as parallel executor won't
- // iterate the loop in sequential order
- corr = calcCrossCorr(refPos + channels * i, pMidBuffer, norm);
-#else
- // In non-parallel version call "calcCrossCorrAccumulate" that is otherwise same
- // as "calcCrossCorr", but saves time by reusing & updating previously stored
- // "norm" value
- corr = calcCrossCorrAccumulate(refPos + channels * i, pMidBuffer, norm);
-#endif
- // heuristic rule to slightly favour values close to mid of the range
- double tmp = (double)(2 * i - seekLength) / (double)seekLength;
- corr = ((corr + 0.1) * (1.0 - 0.25 * tmp * tmp));
-
- // Checks for the highest correlation value
- if (corr > bestCorr)
- {
- // For optimal performance, enter critical section only in case that best value found.
- // in such case repeat 'if' condition as it's possible that parallel execution may have
- // updated the bestCorr value in the mean time
- #pragma omp critical
- if (corr > bestCorr)
- {
- bestCorr = corr;
- bestOffs = i;
- }
- }
- }
- // clear cross correlation routine state if necessary (is so e.g. in MMX routines).
- clearCrossCorrState();
-
- return bestOffs;
-}
-
-
-// Seeks for the optimal overlap-mixing position. The 'stereo' version of the
-// routine
-//
-// The best position is determined as the position where the two overlapped
-// sample sequences are 'most alike', in terms of the highest cross-correlation
-// value over the overlapping period
-int TDStretch::seekBestOverlapPositionQuick(const SAMPLETYPE *refPos)
-{
- int j;
- int bestOffs;
- double bestCorr, corr;
- int scanCount, corrOffset, tempOffset;
-
- bestCorr = FLT_MIN;
- bestOffs = _scanOffsets[0][0];
- corrOffset = 0;
- tempOffset = 0;
-
- // Scans for the best correlation value using four-pass hierarchical search.
- //
- // The look-up table 'scans' has hierarchical position adjusting steps.
- // In first pass the routine searhes for the highest correlation with
- // relatively coarse steps, then rescans the neighbourhood of the highest
- // correlation with better resolution and so on.
- for (scanCount = 0;scanCount < 4; scanCount ++)
- {
- j = 0;
- while (_scanOffsets[scanCount][j])
- {
- double norm;
- tempOffset = corrOffset + _scanOffsets[scanCount][j];
- if (tempOffset >= seekLength) break;
-
- // Calculates correlation value for the mixing position corresponding
- // to 'tempOffset'
- corr = (double)calcCrossCorr(refPos + channels * tempOffset, pMidBuffer, norm);
- // heuristic rule to slightly favour values close to mid of the range
- double tmp = (double)(2 * tempOffset - seekLength) / seekLength;
- corr = ((corr + 0.1) * (1.0 - 0.25 * tmp * tmp));
-
- // Checks for the highest correlation value
- if (corr > bestCorr)
- {
- bestCorr = corr;
- bestOffs = tempOffset;
- }
- j ++;
- }
- corrOffset = bestOffs;
- }
- // clear cross correlation routine state if necessary (is so e.g. in MMX routines).
- clearCrossCorrState();
-
- return bestOffs;
-}
-
-
-
-/// clear cross correlation routine state if necessary
-void TDStretch::clearCrossCorrState()
-{
- // default implementation is empty.
-}
-
-
-/// Calculates processing sequence length according to tempo setting
-void TDStretch::calcSeqParameters()
-{
- // Adjust tempo param according to tempo, so that variating processing sequence length is used
- // at varius tempo settings, between the given low...top limits
- #define AUTOSEQ_TEMPO_LOW 0.5 // auto setting low tempo range (-50%)
- #define AUTOSEQ_TEMPO_TOP 2.0 // auto setting top tempo range (+100%)
-
- // sequence-ms setting values at above low & top tempo
- #define AUTOSEQ_AT_MIN 125.0
- #define AUTOSEQ_AT_MAX 50.0
- #define AUTOSEQ_K ((AUTOSEQ_AT_MAX - AUTOSEQ_AT_MIN) / (AUTOSEQ_TEMPO_TOP - AUTOSEQ_TEMPO_LOW))
- #define AUTOSEQ_C (AUTOSEQ_AT_MIN - (AUTOSEQ_K) * (AUTOSEQ_TEMPO_LOW))
-
- // seek-window-ms setting values at above low & top tempo
- #define AUTOSEEK_AT_MIN 25.0
- #define AUTOSEEK_AT_MAX 15.0
- #define AUTOSEEK_K ((AUTOSEEK_AT_MAX - AUTOSEEK_AT_MIN) / (AUTOSEQ_TEMPO_TOP - AUTOSEQ_TEMPO_LOW))
- #define AUTOSEEK_C (AUTOSEEK_AT_MIN - (AUTOSEEK_K) * (AUTOSEQ_TEMPO_LOW))
-
- #define CHECK_LIMITS(x, mi, ma) (((x) < (mi)) ? (mi) : (((x) > (ma)) ? (ma) : (x)))
-
- double seq, seek;
-
- if (bAutoSeqSetting)
- {
- seq = AUTOSEQ_C + AUTOSEQ_K * tempo;
- seq = CHECK_LIMITS(seq, AUTOSEQ_AT_MAX, AUTOSEQ_AT_MIN);
- sequenceMs = (int)(seq + 0.5);
- }
-
- if (bAutoSeekSetting)
- {
- seek = AUTOSEEK_C + AUTOSEEK_K * tempo;
- seek = CHECK_LIMITS(seek, AUTOSEEK_AT_MAX, AUTOSEEK_AT_MIN);
- seekWindowMs = (int)(seek + 0.5);
- }
-
- // Update seek window lengths
- seekWindowLength = (sampleRate * sequenceMs) / 1000;
- if (seekWindowLength < 2 * overlapLength)
- {
- seekWindowLength = 2 * overlapLength;
- }
- seekLength = (sampleRate * seekWindowMs) / 1000;
-}
-
-
-
-// Sets new target tempo. Normal tempo = 'SCALE', smaller values represent slower
-// tempo, larger faster tempo.
-void TDStretch::setTempo(float newTempo)
-{
- int intskip;
-
- tempo = newTempo;
-
- // Calculate new sequence duration
- calcSeqParameters();
-
- // Calculate ideal skip length (according to tempo value)
- nominalSkip = tempo * (seekWindowLength - overlapLength);
- intskip = (int)(nominalSkip + 0.5f);
-
- // Calculate how many samples are needed in the 'inputBuffer' to
- // process another batch of samples
- //sampleReq = max(intskip + overlapLength, seekWindowLength) + seekLength / 2;
- sampleReq = max(intskip + overlapLength, seekWindowLength) + seekLength;
-}
-
-
-
-// Sets the number of channels, 1 = mono, 2 = stereo
-void TDStretch::setChannels(int numChannels)
-{
- assert(numChannels > 0);
- if (channels == numChannels) return;
-// assert(numChannels == 1 || numChannels == 2);
-
- channels = numChannels;
- inputBuffer.setChannels(channels);
- outputBuffer.setChannels(channels);
-
- // re-init overlap/buffer
- overlapLength=0;
- setParameters(sampleRate);
-}
-
-
-// nominal tempo, no need for processing, just pass the samples through
-// to outputBuffer
-/*
-void TDStretch::processNominalTempo()
-{
- assert(tempo == 1.0f);
-
- if (bMidBufferDirty)
- {
- // If there are samples in pMidBuffer waiting for overlapping,
- // do a single sliding overlapping with them in order to prevent a
- // clicking distortion in the output sound
- if (inputBuffer.numSamples() < overlapLength)
- {
- // wait until we've got overlapLength input samples
- return;
- }
- // Mix the samples in the beginning of 'inputBuffer' with the
- // samples in 'midBuffer' using sliding overlapping
- overlap(outputBuffer.ptrEnd(overlapLength), inputBuffer.ptrBegin(), 0);
- outputBuffer.putSamples(overlapLength);
- inputBuffer.receiveSamples(overlapLength);
- clearMidBuffer();
- // now we've caught the nominal sample flow and may switch to
- // bypass mode
- }
-
- // Simply bypass samples from input to output
- outputBuffer.moveSamples(inputBuffer);
-}
-*/
-
-
-// Processes as many processing frames of the samples 'inputBuffer', store
-// the result into 'outputBuffer'
-void TDStretch::processSamples()
-{
- int ovlSkip, offset;
- int temp;
-
- /* Removed this small optimization - can introduce a click to sound when tempo setting
- crosses the nominal value
- if (tempo == 1.0f)
- {
- // tempo not changed from the original, so bypass the processing
- processNominalTempo();
- return;
- }
- */
-
- // Process samples as long as there are enough samples in 'inputBuffer'
- // to form a processing frame.
- while ((int)inputBuffer.numSamples() >= sampleReq)
- {
- // If tempo differs from the normal ('SCALE'), scan for the best overlapping
- // position
- offset = seekBestOverlapPosition(inputBuffer.ptrBegin());
-
- // Mix the samples in the 'inputBuffer' at position of 'offset' with the
- // samples in 'midBuffer' using sliding overlapping
- // ... first partially overlap with the end of the previous sequence
- // (that's in 'midBuffer')
- overlap(outputBuffer.ptrEnd((uint)overlapLength), inputBuffer.ptrBegin(), (uint)offset);
- outputBuffer.putSamples((uint)overlapLength);
-
- // ... then copy sequence samples from 'inputBuffer' to output:
-
- // length of sequence
- temp = (seekWindowLength - 2 * overlapLength);
-
- // crosscheck that we don't have buffer overflow...
- if ((int)inputBuffer.numSamples() < (offset + temp + overlapLength * 2))
- {
- continue; // just in case, shouldn't really happen
- }
-
- outputBuffer.putSamples(inputBuffer.ptrBegin() + channels * (offset + overlapLength), (uint)temp);
-
- // Copies the end of the current sequence from 'inputBuffer' to
- // 'midBuffer' for being mixed with the beginning of the next
- // processing sequence and so on
- assert((offset + temp + overlapLength * 2) <= (int)inputBuffer.numSamples());
- memcpy(pMidBuffer, inputBuffer.ptrBegin() + channels * (offset + temp + overlapLength),
- channels * sizeof(SAMPLETYPE) * overlapLength);
-
- // Remove the processed samples from the input buffer. Update
- // the difference between integer & nominal skip step to 'skipFract'
- // in order to prevent the error from accumulating over time.
- skipFract += nominalSkip; // real skip size
- ovlSkip = (int)skipFract; // rounded to integer skip
- skipFract -= ovlSkip; // maintain the fraction part, i.e. real vs. integer skip
- inputBuffer.receiveSamples((uint)ovlSkip);
- }
-}
-
-
-// Adds 'numsamples' pcs of samples from the 'samples' memory position into
-// the input of the object.
-void TDStretch::putSamples(const SAMPLETYPE *samples, uint nSamples)
-{
- // Add the samples into the input buffer
- inputBuffer.putSamples(samples, nSamples);
- // Process the samples in input buffer
- processSamples();
-}
-
-
-
-/// Set new overlap length parameter & reallocate RefMidBuffer if necessary.
-void TDStretch::acceptNewOverlapLength(int newOverlapLength)
-{
- int prevOvl;
-
- assert(newOverlapLength >= 0);
- prevOvl = overlapLength;
- overlapLength = newOverlapLength;
-
- if (overlapLength > prevOvl)
- {
- delete[] pMidBufferUnaligned;
-
- pMidBufferUnaligned = new SAMPLETYPE[overlapLength * channels + 16 / sizeof(SAMPLETYPE)];
- // ensure that 'pMidBuffer' is aligned to 16 byte boundary for efficiency
- pMidBuffer = (SAMPLETYPE *)SOUNDTOUCH_ALIGN_POINTER_16(pMidBufferUnaligned);
-
- clearMidBuffer();
- }
-}
-
-
-// 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)
-{
- // Notice! don't use "new TDStretch" directly, use "newInstance" to create a new instance instead!
- ST_THROW_RT_ERROR("Error in TDStretch::new: Don't use 'new TDStretch' directly, use 'newInstance' member instead!");
- return newInstance();
-}
-
-
-TDStretch * TDStretch::newInstance()
-{
- uint uExtensions;
-
- uExtensions = detectCPUextensions();
-
- // Check if MMX/SSE instruction set extensions supported by CPU
-
-#ifdef SOUNDTOUCH_ALLOW_MMX
- // MMX routines available only with integer sample types
- if (uExtensions & SUPPORT_MMX)
- {
- return ::new TDStretchMMX;
- }
- else
-#endif // SOUNDTOUCH_ALLOW_MMX
-
-
-#ifdef SOUNDTOUCH_ALLOW_SSE
- if (uExtensions & SUPPORT_SSE)
- {
- // SSE support
- return ::new TDStretchSSE;
- }
- else
-#endif // SOUNDTOUCH_ALLOW_SSE
-
- {
- // ISA optimizations not supported, use plain C version
- return ::new TDStretch;
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Integer arithmetics specific algorithm implementations.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
-
-// Overlaps samples in 'midBuffer' with the samples in 'input'. The 'Stereo'
-// version of the routine.
-void TDStretch::overlapStereo(short *poutput, const short *input) const
-{
- int i;
- short temp;
- int cnt2;
-
- for (i = 0; i < overlapLength ; i ++)
- {
- temp = (short)(overlapLength - i);
- cnt2 = 2 * i;
- poutput[cnt2] = (input[cnt2] * i + pMidBuffer[cnt2] * temp ) / overlapLength;
- poutput[cnt2 + 1] = (input[cnt2 + 1] * i + pMidBuffer[cnt2 + 1] * temp ) / overlapLength;
- }
-}
-
-
-// Overlaps samples in 'midBuffer' with the samples in 'input'. The 'Multi'
-// version of the routine.
-void TDStretch::overlapMulti(SAMPLETYPE *poutput, const SAMPLETYPE *input) const
-{
- SAMPLETYPE m1=(SAMPLETYPE)0;
- SAMPLETYPE m2;
- int i=0;
-
- for (m2 = (SAMPLETYPE)overlapLength; m2; m2 --)
- {
- for (int c = 0; c < channels; c ++)
- {
- poutput[i] = (input[i] * m1 + pMidBuffer[i] * m2) / overlapLength;
- i++;
- }
-
- m1++;
- }
-}
-
-// Calculates the x having the closest 2^x value for the given value
-static int _getClosest2Power(double value)
-{
- return (int)(log(value) / log(2.0) + 0.5);
-}
-
-
-/// Calculates overlap period length in samples.
-/// Integer version rounds overlap length to closest power of 2
-/// for a divide scaling operation.
-void TDStretch::calculateOverlapLength(int aoverlapMs)
-{
- int newOvl;
-
- assert(aoverlapMs >= 0);
-
- // calculate overlap length so that it's power of 2 - thus it's easy to do
- // integer division by right-shifting. Term "-1" at end is to account for
- // the extra most significatnt bit left unused in result by signed multiplication
- overlapDividerBits = _getClosest2Power((sampleRate * aoverlapMs) / 1000.0) - 1;
- if (overlapDividerBits > 9) overlapDividerBits = 9;
- if (overlapDividerBits < 3) overlapDividerBits = 3;
- newOvl = (int)pow(2.0, (int)overlapDividerBits + 1); // +1 => account for -1 above
-
- acceptNewOverlapLength(newOvl);
-
- // calculate sloping divider so that crosscorrelation operation won't
- // overflow 32-bit register. Max. sum of the crosscorrelation sum without
- // divider would be 2^30*(N^3-N)/3, where N = overlap length
- slopingDivider = (newOvl * newOvl - 1) / 3;
-}
-
-
-double TDStretch::calcCrossCorr(const short *mixingPos, const short *compare, double &norm) const
-{
- long corr;
- long lnorm;
- int i;
-
- corr = lnorm = 0;
- // Same routine for stereo and mono. For stereo, unroll loop for better
- // efficiency and gives slightly better resolution against rounding.
- // For mono it same routine, just unrolls loop by factor of 4
- for (i = 0; i < channels * overlapLength; i += 4)
- {
- corr += (mixingPos[i] * compare[i] +
- mixingPos[i + 1] * compare[i + 1]) >> overlapDividerBits; // notice: do intermediate division here to avoid integer overflow
- corr += (mixingPos[i + 2] * compare[i + 2] +
- mixingPos[i + 3] * compare[i + 3]) >> overlapDividerBits;
- lnorm += (mixingPos[i] * mixingPos[i] +
- mixingPos[i + 1] * mixingPos[i + 1]) >> overlapDividerBits; // notice: do intermediate division here to avoid integer overflow
- lnorm += (mixingPos[i + 2] * mixingPos[i + 2] +
- mixingPos[i + 3] * mixingPos[i + 3]) >> overlapDividerBits;
- }
-
- // Normalize result by dividing by sqrt(norm) - this step is easiest
- // done using floating point operation
- norm = (double)lnorm;
- return (double)corr / sqrt((norm < 1e-9) ? 1.0 : norm);
-}
-
-
-/// Update cross-correlation by accumulating "norm" coefficient by previously calculated value
-double TDStretch::calcCrossCorrAccumulate(const short *mixingPos, const short *compare, double &norm) const
-{
- long corr;
- long lnorm;
- int i;
-
- // cancel first normalizer tap from previous round
- lnorm = 0;
- for (i = 1; i <= channels; i ++)
- {
- lnorm -= (mixingPos[-i] * mixingPos[-i]) >> overlapDividerBits;
- }
-
- corr = 0;
- // Same routine for stereo and mono. For stereo, unroll loop for better
- // efficiency and gives slightly better resolution against rounding.
- // For mono it same routine, just unrolls loop by factor of 4
- for (i = 0; i < channels * overlapLength; i += 4)
- {
- corr += (mixingPos[i] * compare[i] +
- mixingPos[i + 1] * compare[i + 1]) >> overlapDividerBits; // notice: do intermediate division here to avoid integer overflow
- corr += (mixingPos[i + 2] * compare[i + 2] +
- mixingPos[i + 3] * compare[i + 3]) >> overlapDividerBits;
- }
-
- // update normalizer with last samples of this round
- for (int j = 0; j < channels; j ++)
- {
- i --;
- lnorm += (mixingPos[i] * mixingPos[i]) >> overlapDividerBits;
- }
- norm += (double)lnorm;
-
- // Normalize result by dividing by sqrt(norm) - this step is easiest
- // done using floating point operation
- return (double)corr / sqrt((norm < 1e-9) ? 1.0 : norm);
-}
-
-#endif // SOUNDTOUCH_INTEGER_SAMPLES
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Floating point arithmetics specific algorithm implementations.
-//
-
-#ifdef SOUNDTOUCH_FLOAT_SAMPLES
-
-// Overlaps samples in 'midBuffer' with the samples in 'pInput'
-void TDStretch::overlapStereo(float *pOutput, const float *pInput) const
-{
- int i;
- float fScale;
- float f1;
- float f2;
-
- fScale = 1.0f / (float)overlapLength;
-
- f1 = 0;
- f2 = 1.0f;
-
- for (i = 0; i < 2 * (int)overlapLength ; i += 2)
- {
- pOutput[i + 0] = pInput[i + 0] * f1 + pMidBuffer[i + 0] * f2;
- pOutput[i + 1] = pInput[i + 1] * f1 + pMidBuffer[i + 1] * f2;
-
- f1 += fScale;
- f2 -= fScale;
- }
-}
-
-
-// Overlaps samples in 'midBuffer' with the samples in 'input'.
-void TDStretch::overlapMulti(float *pOutput, const float *pInput) const
-{
- int i;
- float fScale;
- float f1;
- float f2;
-
- fScale = 1.0f / (float)overlapLength;
-
- f1 = 0;
- f2 = 1.0f;
-
- i=0;
- for (int i2 = 0; i2 < overlapLength; i2 ++)
- {
- // note: Could optimize this slightly by taking into account that always channels > 2
- for (int c = 0; c < channels; c ++)
- {
- pOutput[i] = pInput[i] * f1 + pMidBuffer[i] * f2;
- i++;
- }
- f1 += fScale;
- f2 -= fScale;
- }
-}
-
-
-/// Calculates overlapInMsec period length in samples.
-void TDStretch::calculateOverlapLength(int overlapInMsec)
-{
- int newOvl;
-
- assert(overlapInMsec >= 0);
- newOvl = (sampleRate * overlapInMsec) / 1000;
- if (newOvl < 16) newOvl = 16;
-
- // must be divisible by 8
- newOvl -= newOvl % 8;
-
- acceptNewOverlapLength(newOvl);
-}
-
-
-/// Calculate cross-correlation
-double TDStretch::calcCrossCorr(const float *mixingPos, const float *compare, double &anorm) const
-{
- double corr;
- double norm;
- int i;
-
- corr = norm = 0;
- // Same routine for stereo and mono. For Stereo, unroll by factor of 2.
- // For mono it's same routine yet unrollsd by factor of 4.
- for (i = 0; i < channels * overlapLength; i += 4)
- {
- corr += mixingPos[i] * compare[i] +
- mixingPos[i + 1] * compare[i + 1];
-
- norm += mixingPos[i] * mixingPos[i] +
- mixingPos[i + 1] * mixingPos[i + 1];
-
- // unroll the loop for better CPU efficiency:
- corr += mixingPos[i + 2] * compare[i + 2] +
- mixingPos[i + 3] * compare[i + 3];
-
- norm += mixingPos[i + 2] * mixingPos[i + 2] +
- mixingPos[i + 3] * mixingPos[i + 3];
- }
-
- anorm = norm;
- return corr / sqrt((norm < 1e-9 ? 1.0 : norm));
-}
-
-
-/// Update cross-correlation by accumulating "norm" coefficient by previously calculated value
-double TDStretch::calcCrossCorrAccumulate(const float *mixingPos, const float *compare, double &norm) const
-{
- double corr;
- int i;
-
- corr = 0;
-
- // cancel first normalizer tap from previous round
- for (i = 1; i <= channels; i ++)
- {
- norm -= mixingPos[-i] * mixingPos[-i];
- }
-
- // Same routine for stereo and mono. For Stereo, unroll by factor of 2.
- // For mono it's same routine yet unrollsd by factor of 4.
- for (i = 0; i < channels * overlapLength; i += 4)
- {
- corr += mixingPos[i] * compare[i] +
- mixingPos[i + 1] * compare[i + 1] +
- mixingPos[i + 2] * compare[i + 2] +
- mixingPos[i + 3] * compare[i + 3];
- }
-
- // update normalizer with last samples of this round
- for (int j = 0; j < channels; j ++)
- {
- i --;
- norm += mixingPos[i] * mixingPos[i];
- }
-
- return corr / sqrt((norm < 1e-9 ? 1.0 : norm));
-}
-
-
-#endif // SOUNDTOUCH_FLOAT_SAMPLES
diff --git a/src/thirdparty/SoundTouch/source/TDStretch.h b/src/thirdparty/SoundTouch/source/TDStretch.h
deleted file mode 100644
index 93f726f1f..000000000
--- a/src/thirdparty/SoundTouch/source/TDStretch.h
+++ /dev/null
@@ -1,272 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Sampled sound tempo changer/time stretch algorithm. Changes the sound tempo
-/// while maintaining the original pitch by using a time domain WSOLA-like method
-/// with several performance-increasing tweaks.
-///
-/// Note : MMX/SSE optimized functions reside in separate, platform-specific files
-/// 'mmx_optimized.cpp' and 'sse_optimized.cpp'
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2014-04-06 15:57:21 +0000 (Sun, 06 Apr 2014) $
-// File revision : $Revision: 4 $
-//
-// $Id: TDStretch.h 195 2014-04-06 15:57:21Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef TDStretch_H
-#define TDStretch_H
-
-#include <stddef.h>
-#include "STTypes.h"
-#include "RateTransposer.h"
-#include "FIFOSamplePipe.h"
-
-namespace soundtouch
-{
-
-/// Default values for sound processing parameters:
-/// Notice that the default parameters are tuned for contemporary popular music
-/// processing. For speech processing applications these parameters suit better:
-/// #define DEFAULT_SEQUENCE_MS 40
-/// #define DEFAULT_SEEKWINDOW_MS 15
-/// #define DEFAULT_OVERLAP_MS 8
-///
-
-/// Default length of a single processing sequence, in milliseconds. This determines to how
-/// long sequences the original sound is chopped in the time-stretch algorithm.
-///
-/// The larger this value is, the lesser sequences are used in processing. In principle
-/// a bigger value sounds better when slowing down tempo, but worse when increasing tempo
-/// and vice versa.
-///
-/// Increasing this value reduces computational burden & vice versa.
-//#define DEFAULT_SEQUENCE_MS 40
-#define DEFAULT_SEQUENCE_MS USE_AUTO_SEQUENCE_LEN
-
-/// Giving this value for the sequence length sets automatic parameter value
-/// according to tempo setting (recommended)
-#define USE_AUTO_SEQUENCE_LEN 0
-
-/// Seeking window default length in milliseconds for algorithm that finds the best possible
-/// overlapping location. This determines from how wide window the algorithm may look for an
-/// optimal joining location when mixing the sound sequences back together.
-///
-/// The bigger this window setting is, the higher the possibility to find a better mixing
-/// position will become, but at the same time large values may cause a "drifting" artifact
-/// because consequent sequences will be taken at more uneven intervals.
-///
-/// If there's a disturbing artifact that sounds as if a constant frequency was drifting
-/// around, try reducing this setting.
-///
-/// Increasing this value increases computational burden & vice versa.
-//#define DEFAULT_SEEKWINDOW_MS 15
-#define DEFAULT_SEEKWINDOW_MS USE_AUTO_SEEKWINDOW_LEN
-
-/// Giving this value for the seek window length sets automatic parameter value
-/// according to tempo setting (recommended)
-#define USE_AUTO_SEEKWINDOW_LEN 0
-
-/// Overlap length in milliseconds. When the chopped sound sequences are mixed back together,
-/// to form a continuous sound stream, this parameter defines over how long period the two
-/// consecutive sequences are let to overlap each other.
-///
-/// This shouldn't be that critical parameter. If you reduce the DEFAULT_SEQUENCE_MS setting
-/// by a large amount, you might wish to try a smaller value on this.
-///
-/// Increasing this value increases computational burden & vice versa.
-#define DEFAULT_OVERLAP_MS 8
-
-
-/// Class that does the time-stretch (tempo change) effect for the processed
-/// sound.
-class TDStretch : public FIFOProcessor
-{
-protected:
- int channels;
- int sampleReq;
- float tempo;
-
- SAMPLETYPE *pMidBuffer;
- SAMPLETYPE *pMidBufferUnaligned;
- int overlapLength;
- int seekLength;
- int seekWindowLength;
- int overlapDividerBits;
- int slopingDivider;
- float nominalSkip;
- float skipFract;
- FIFOSampleBuffer outputBuffer;
- FIFOSampleBuffer inputBuffer;
- bool bQuickSeek;
-
- int sampleRate;
- int sequenceMs;
- int seekWindowMs;
- int overlapMs;
- bool bAutoSeqSetting;
- bool bAutoSeekSetting;
-
- void acceptNewOverlapLength(int newOverlapLength);
-
- virtual void clearCrossCorrState();
- void calculateOverlapLength(int overlapMs);
-
- virtual double calcCrossCorr(const SAMPLETYPE *mixingPos, const SAMPLETYPE *compare, double &norm) const;
- virtual double calcCrossCorrAccumulate(const SAMPLETYPE *mixingPos, const SAMPLETYPE *compare, double &norm) const;
-
- virtual int seekBestOverlapPositionFull(const SAMPLETYPE *refPos);
- virtual int seekBestOverlapPositionQuick(const SAMPLETYPE *refPos);
- int seekBestOverlapPosition(const SAMPLETYPE *refPos);
-
- virtual void overlapStereo(SAMPLETYPE *output, const SAMPLETYPE *input) const;
- virtual void overlapMono(SAMPLETYPE *output, const SAMPLETYPE *input) const;
- virtual void overlapMulti(SAMPLETYPE *output, const SAMPLETYPE *input) const;
-
- void clearMidBuffer();
- void overlap(SAMPLETYPE *output, const SAMPLETYPE *input, uint ovlPos) const;
-
- void calcSeqParameters();
-
- /// Changes the tempo of the given sound samples.
- /// Returns amount of samples returned in the "output" buffer.
- /// The maximum amount of samples that can be returned at a time is set by
- /// the 'set_returnBuffer_size' function.
- void processSamples();
-
-public:
- TDStretch();
- virtual ~TDStretch();
-
- /// 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.
- static void *operator new(size_t s);
-
- /// Use this function instead of "new" operator to create a new instance of this class.
- /// This function automatically chooses a correct feature set depending on if the CPU
- /// supports MMX/SSE/etc extensions.
- static TDStretch *newInstance();
-
- /// Returns the output buffer object
- FIFOSamplePipe *getOutput() { return &outputBuffer; };
-
- /// Returns the input buffer object
- FIFOSamplePipe *getInput() { return &inputBuffer; };
-
- /// Sets new target tempo. Normal tempo = 'SCALE', smaller values represent slower
- /// tempo, larger faster tempo.
- void setTempo(float newTempo);
-
- /// Returns nonzero if there aren't any samples available for outputting.
- virtual void clear();
-
- /// Clears the input buffer
- void clearInput();
-
- /// Sets the number of channels, 1 = mono, 2 = stereo
- void setChannels(int numChannels);
-
- /// Enables/disables the quick position seeking algorithm. Zero to disable,
- /// nonzero to enable
- void enableQuickSeek(bool enable);
-
- /// Returns nonzero if the quick seeking algorithm is enabled.
- bool isQuickSeekEnabled() const;
-
- /// Sets routine control parameters. These control are certain time constants
- /// defining how the sound is stretched to the desired duration.
- //
- /// 'sampleRate' = sample rate of the sound
- /// 'sequenceMS' = one processing sequence length in milliseconds
- /// 'seekwindowMS' = seeking window length for scanning the best overlapping
- /// position
- /// 'overlapMS' = overlapping length
- void setParameters(int sampleRate, ///< Samplerate of sound being processed (Hz)
- int sequenceMS = -1, ///< Single processing sequence length (ms)
- int seekwindowMS = -1, ///< Offset seeking window length (ms)
- int overlapMS = -1 ///< Sequence overlapping length (ms)
- );
-
- /// Get routine control parameters, see setParameters() function.
- /// Any of the parameters to this function can be NULL, in such case corresponding parameter
- /// value isn't returned.
- void getParameters(int *pSampleRate, int *pSequenceMs, int *pSeekWindowMs, int *pOverlapMs) const;
-
- /// Adds 'numsamples' pcs of samples from the 'samples' memory position into
- /// the input of the object.
- virtual void putSamples(
- const SAMPLETYPE *samples, ///< Input sample data
- uint numSamples ///< Number of samples in 'samples' so that one sample
- ///< contains both channels if stereo
- );
-
- /// return nominal input sample requirement for triggering a processing batch
- int getInputSampleReq() const
- {
- return (int)(nominalSkip + 0.5);
- }
-
- /// return nominal output sample amount when running a processing batch
- int getOutputBatchSize() const
- {
- return seekWindowLength - overlapLength;
- }
-};
-
-
-
-// Implementation-specific class declarations:
-
-#ifdef SOUNDTOUCH_ALLOW_MMX
- /// Class that implements MMX optimized routines for 16bit integer samples type.
- class TDStretchMMX : public TDStretch
- {
- protected:
- double calcCrossCorr(const short *mixingPos, const short *compare, double &norm) const;
- double calcCrossCorrAccumulate(const short *mixingPos, const short *compare, double &norm) const;
- virtual void overlapStereo(short *output, const short *input) const;
- virtual void clearCrossCorrState();
- };
-#endif /// SOUNDTOUCH_ALLOW_MMX
-
-
-#ifdef SOUNDTOUCH_ALLOW_SSE
- /// Class that implements SSE optimized routines for floating point samples type.
- class TDStretchSSE : public TDStretch
- {
- protected:
- double calcCrossCorr(const float *mixingPos, const float *compare, double &norm) const;
- double calcCrossCorrAccumulate(const float *mixingPos, const float *compare, double &norm) const;
- };
-
-#endif /// SOUNDTOUCH_ALLOW_SSE
-
-}
-#endif /// TDStretch_H
diff --git a/src/thirdparty/SoundTouch/source/cpu_detect.h b/src/thirdparty/SoundTouch/source/cpu_detect.h
deleted file mode 100644
index dc285e90f..000000000
--- a/src/thirdparty/SoundTouch/source/cpu_detect.h
+++ /dev/null
@@ -1,62 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// A header file for detecting the Intel MMX instructions set extension.
-///
-/// Please see 'mmx_win.cpp', 'mmx_cpp.cpp' and 'mmx_non_x86.cpp' for the
-/// routine implementations for x86 Windows, x86 gnu version and non-x86
-/// platforms, respectively.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2008-02-10 16:26:55 +0000 (Sun, 10 Feb 2008) $
-// File revision : $Revision: 4 $
-//
-// $Id: cpu_detect.h 11 2008-02-10 16:26:55Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef _CPU_DETECT_H_
-#define _CPU_DETECT_H_
-
-#include "STTypes.h"
-
-#define SUPPORT_MMX 0x0001
-#define SUPPORT_3DNOW 0x0002
-#define SUPPORT_ALTIVEC 0x0004
-#define SUPPORT_SSE 0x0008
-#define SUPPORT_SSE2 0x0010
-
-/// Checks which instruction set extensions are supported by the CPU.
-///
-/// \return A bitmask of supported extensions, see SUPPORT_... defines.
-uint detectCPUextensions(void);
-
-/// Disables given set of instruction extensions. See SUPPORT_... defines.
-void disableExtensions(uint wDisableMask);
-
-#endif // _CPU_DETECT_H_
diff --git a/src/thirdparty/SoundTouch/source/cpu_detect_x86.cpp b/src/thirdparty/SoundTouch/source/cpu_detect_x86.cpp
deleted file mode 100644
index 2db790f53..000000000
--- a/src/thirdparty/SoundTouch/source/cpu_detect_x86.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Generic version of the x86 CPU extension detection routine.
-///
-/// This file is for GNU & other non-Windows compilers, see 'cpu_detect_x86_win.cpp'
-/// for the Microsoft compiler version.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2014-01-07 18:24:28 +0000 (Tue, 07 Jan 2014) $
-// File revision : $Revision: 4 $
-//
-// $Id: cpu_detect_x86.cpp 183 2014-01-07 18:24:28Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include "cpu_detect.h"
-#include "STTypes.h"
-
-
-#if defined(SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS)
-
- #if defined(__GNUC__) && defined(__i386__)
- // gcc
- #include "cpuid.h"
- #elif defined(_M_IX86)
- // windows non-gcc
- #include <intrin.h>
- #endif
-
- #define bit_MMX (1 << 23)
- #define bit_SSE (1 << 25)
- #define bit_SSE2 (1 << 26)
-#endif
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// processor instructions extension detection routines
-//
-//////////////////////////////////////////////////////////////////////////////
-
-// Flag variable indicating whick ISA extensions are disabled (for debugging)
-static uint _dwDisabledISA = 0x00; // 0xffffffff; //<- use this to disable all extensions
-
-// Disables given set of instruction extensions. See SUPPORT_... defines.
-void disableExtensions(uint dwDisableMask)
-{
- _dwDisabledISA = dwDisableMask;
-}
-
-
-
-/// Checks which instruction set extensions are supported by the CPU.
-uint detectCPUextensions(void)
-{
-/// If building for a 64bit system (no Itanium) and the user wants optimizations.
-/// Return the OR of SUPPORT_{MMX,SSE,SSE2}. 11001 or 0x19.
-/// Keep the _dwDisabledISA test (2 more operations, could be eliminated).
-#if ((defined(__GNUC__) && defined(__x86_64__)) \
- || defined(_M_X64)) \
- && defined(SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS)
- return 0x19 & ~_dwDisabledISA;
-
-/// If building for a 32bit system and the user wants optimizations.
-/// Keep the _dwDisabledISA test (2 more operations, could be eliminated).
-#elif ((defined(__GNUC__) && defined(__i386__)) \
- || defined(_M_IX86)) \
- && defined(SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS)
-
- if (_dwDisabledISA == 0xffffffff) return 0;
-
- uint res = 0;
-
-#if defined(__GNUC__)
- // GCC version of cpuid. Requires GCC 4.3.0 or later for __cpuid intrinsic support.
- uint eax, ebx, ecx, edx; // unsigned int is the standard type. uint is defined by the compiler and not guaranteed to be portable.
-
- // Check if no cpuid support.
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx)) return 0; // always disable extensions.
-
- if (edx & bit_MMX) res = res | SUPPORT_MMX;
- if (edx & bit_SSE) res = res | SUPPORT_SSE;
- if (edx & bit_SSE2) res = res | SUPPORT_SSE2;
-
-#else
- // Window / VS version of cpuid. Notice that Visual Studio 2005 or later required
- // for __cpuid intrinsic support.
- int reg[4] = {-1};
-
- // Check if no cpuid support.
- __cpuid(reg,0);
- if ((unsigned int)reg[0] == 0) return 0; // always disable extensions.
-
- __cpuid(reg,1);
- if ((unsigned int)reg[3] & bit_MMX) res = res | SUPPORT_MMX;
- if ((unsigned int)reg[3] & bit_SSE) res = res | SUPPORT_SSE;
- if ((unsigned int)reg[3] & bit_SSE2) res = res | SUPPORT_SSE2;
-
-#endif
-
- return res & ~_dwDisabledISA;
-
-#else
-
-/// One of these is true:
-/// 1) We don't want optimizations.
-/// 2) Using an unsupported compiler.
-/// 3) Running on a non-x86 platform.
- return 0;
-
-#endif
-}
diff --git a/src/thirdparty/SoundTouch/source/mmx_optimized.cpp b/src/thirdparty/SoundTouch/source/mmx_optimized.cpp
deleted file mode 100644
index c4ff80ed6..000000000
--- a/src/thirdparty/SoundTouch/source/mmx_optimized.cpp
+++ /dev/null
@@ -1,385 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// MMX optimized routines. All MMX optimized functions have been gathered into
-/// this single source code file, regardless to their class or original source
-/// code file, in order to ease porting the library to other compiler and
-/// processor platforms.
-///
-/// The MMX-optimizations are programmed using MMX compiler intrinsics that
-/// are supported both by Microsoft Visual C++ and GCC compilers, so this file
-/// should compile with both toolsets.
-///
-/// NOTICE: If using Visual Studio 6.0, you'll need to install the "Visual C++
-/// 6.0 processor pack" update to support compiler intrinsic syntax. The update
-/// is available for download at Microsoft Developers Network, see here:
-/// http://msdn.microsoft.com/en-us/vstudio/aa718349.aspx
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2015-02-22 15:10:38 +0000 (Sun, 22 Feb 2015) $
-// File revision : $Revision: 4 $
-//
-// $Id: mmx_optimized.cpp 206 2015-02-22 15:10:38Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include "STTypes.h"
-
-#ifdef SOUNDTOUCH_ALLOW_MMX
-// MMX routines available only with integer sample type
-
-using namespace soundtouch;
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// implementation of MMX optimized functions of class 'TDStretchMMX'
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include "TDStretch.h"
-#include <mmintrin.h>
-#include <limits.h>
-#include <math.h>
-
-
-// Calculates cross correlation of two buffers
-double TDStretchMMX::calcCrossCorr(const short *pV1, const short *pV2, double &dnorm) const
-{
- const __m64 *pVec1, *pVec2;
- __m64 shifter;
- __m64 accu, normaccu;
- long corr, norm;
- int i;
-
- pVec1 = (__m64*)pV1;
- pVec2 = (__m64*)pV2;
-
- shifter = _m_from_int(overlapDividerBits);
- normaccu = accu = _mm_setzero_si64();
-
- // Process 4 parallel sets of 2 * stereo samples or 4 * mono samples
- // during each round for improved CPU-level parallellization.
- for (i = 0; i < channels * overlapLength / 16; i ++)
- {
- __m64 temp, temp2;
-
- // dictionary of instructions:
- // _m_pmaddwd : 4*16bit multiply-add, resulting two 32bits = [a0*b0+a1*b1 ; a2*b2+a3*b3]
- // _mm_add_pi32 : 2*32bit add
- // _m_psrad : 32bit right-shift
-
- temp = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[0], pVec2[0]), shifter),
- _mm_sra_pi32(_mm_madd_pi16(pVec1[1], pVec2[1]), shifter));
- temp2 = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[0], pVec1[0]), shifter),
- _mm_sra_pi32(_mm_madd_pi16(pVec1[1], pVec1[1]), shifter));
- accu = _mm_add_pi32(accu, temp);
- normaccu = _mm_add_pi32(normaccu, temp2);
-
- temp = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[2], pVec2[2]), shifter),
- _mm_sra_pi32(_mm_madd_pi16(pVec1[3], pVec2[3]), shifter));
- temp2 = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[2], pVec1[2]), shifter),
- _mm_sra_pi32(_mm_madd_pi16(pVec1[3], pVec1[3]), shifter));
- accu = _mm_add_pi32(accu, temp);
- normaccu = _mm_add_pi32(normaccu, temp2);
-
- pVec1 += 4;
- pVec2 += 4;
- }
-
- // copy hi-dword of mm0 to lo-dword of mm1, then sum mmo+mm1
- // and finally store the result into the variable "corr"
-
- accu = _mm_add_pi32(accu, _mm_srli_si64(accu, 32));
- corr = _m_to_int(accu);
-
- normaccu = _mm_add_pi32(normaccu, _mm_srli_si64(normaccu, 32));
- norm = _m_to_int(normaccu);
-
- // Clear MMS state
- _m_empty();
-
- // Normalize result by dividing by sqrt(norm) - this step is easiest
- // done using floating point operation
- dnorm = (double)norm;
-
- return (double)corr / sqrt(dnorm < 1e-9 ? 1.0 : dnorm);
- // Note: Warning about the missing EMMS instruction is harmless
- // as it'll be called elsewhere.
-}
-
-
-/// Update cross-correlation by accumulating "norm" coefficient by previously calculated value
-double TDStretchMMX::calcCrossCorrAccumulate(const short *pV1, const short *pV2, double &dnorm) const
-{
- const __m64 *pVec1, *pVec2;
- __m64 shifter;
- __m64 accu;
- long corr, lnorm;
- int i;
-
- // cancel first normalizer tap from previous round
- lnorm = 0;
- for (i = 1; i <= channels; i ++)
- {
- lnorm -= (pV1[-i] * pV1[-i]) >> overlapDividerBits;
- }
-
- pVec1 = (__m64*)pV1;
- pVec2 = (__m64*)pV2;
-
- shifter = _m_from_int(overlapDividerBits);
- accu = _mm_setzero_si64();
-
- // Process 4 parallel sets of 2 * stereo samples or 4 * mono samples
- // during each round for improved CPU-level parallellization.
- for (i = 0; i < channels * overlapLength / 16; i ++)
- {
- __m64 temp;
-
- // dictionary of instructions:
- // _m_pmaddwd : 4*16bit multiply-add, resulting two 32bits = [a0*b0+a1*b1 ; a2*b2+a3*b3]
- // _mm_add_pi32 : 2*32bit add
- // _m_psrad : 32bit right-shift
-
- temp = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[0], pVec2[0]), shifter),
- _mm_sra_pi32(_mm_madd_pi16(pVec1[1], pVec2[1]), shifter));
- accu = _mm_add_pi32(accu, temp);
-
- temp = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[2], pVec2[2]), shifter),
- _mm_sra_pi32(_mm_madd_pi16(pVec1[3], pVec2[3]), shifter));
- accu = _mm_add_pi32(accu, temp);
-
- pVec1 += 4;
- pVec2 += 4;
- }
-
- // copy hi-dword of mm0 to lo-dword of mm1, then sum mmo+mm1
- // and finally store the result into the variable "corr"
-
- accu = _mm_add_pi32(accu, _mm_srli_si64(accu, 32));
- corr = _m_to_int(accu);
-
- // Clear MMS state
- _m_empty();
-
- // update normalizer with last samples of this round
- pV1 = (short *)pVec1;
- for (int j = 1; j <= channels; j ++)
- {
- lnorm += (pV1[-j] * pV1[-j]) >> overlapDividerBits;
- }
- dnorm += (double)lnorm;
-
- // Normalize result by dividing by sqrt(norm) - this step is easiest
- // done using floating point operation
- return (double)corr / sqrt((dnorm < 1e-9) ? 1.0 : dnorm);
-}
-
-
-void TDStretchMMX::clearCrossCorrState()
-{
- // Clear MMS state
- _m_empty();
- //_asm EMMS;
-}
-
-
-
-// MMX-optimized version of the function overlapStereo
-void TDStretchMMX::overlapStereo(short *output, const short *input) const
-{
- const __m64 *pVinput, *pVMidBuf;
- __m64 *pVdest;
- __m64 mix1, mix2, adder, shifter;
- int i;
-
- pVinput = (const __m64*)input;
- pVMidBuf = (const __m64*)pMidBuffer;
- pVdest = (__m64*)output;
-
- // mix1 = mixer values for 1st stereo sample
- // mix1 = mixer values for 2nd stereo sample
- // adder = adder for updating mixer values after each round
-
- mix1 = _mm_set_pi16(0, overlapLength, 0, overlapLength);
- adder = _mm_set_pi16(1, -1, 1, -1);
- mix2 = _mm_add_pi16(mix1, adder);
- adder = _mm_add_pi16(adder, adder);
-
- // Overlaplength-division by shifter. "+1" is to account for "-1" deduced in
- // overlapDividerBits calculation earlier.
- shifter = _m_from_int(overlapDividerBits + 1);
-
- for (i = 0; i < overlapLength / 4; i ++)
- {
- __m64 temp1, temp2;
-
- // load & shuffle data so that input & mixbuffer data samples are paired
- temp1 = _mm_unpacklo_pi16(pVMidBuf[0], pVinput[0]); // = i0l m0l i0r m0r
- temp2 = _mm_unpackhi_pi16(pVMidBuf[0], pVinput[0]); // = i1l m1l i1r m1r
-
- // temp = (temp .* mix) >> shifter
- temp1 = _mm_sra_pi32(_mm_madd_pi16(temp1, mix1), shifter);
- temp2 = _mm_sra_pi32(_mm_madd_pi16(temp2, mix2), shifter);
- pVdest[0] = _mm_packs_pi32(temp1, temp2); // pack 2*2*32bit => 4*16bit
-
- // update mix += adder
- mix1 = _mm_add_pi16(mix1, adder);
- mix2 = _mm_add_pi16(mix2, adder);
-
- // --- second round begins here ---
-
- // load & shuffle data so that input & mixbuffer data samples are paired
- temp1 = _mm_unpacklo_pi16(pVMidBuf[1], pVinput[1]); // = i2l m2l i2r m2r
- temp2 = _mm_unpackhi_pi16(pVMidBuf[1], pVinput[1]); // = i3l m3l i3r m3r
-
- // temp = (temp .* mix) >> shifter
- temp1 = _mm_sra_pi32(_mm_madd_pi16(temp1, mix1), shifter);
- temp2 = _mm_sra_pi32(_mm_madd_pi16(temp2, mix2), shifter);
- pVdest[1] = _mm_packs_pi32(temp1, temp2); // pack 2*2*32bit => 4*16bit
-
- // update mix += adder
- mix1 = _mm_add_pi16(mix1, adder);
- mix2 = _mm_add_pi16(mix2, adder);
-
- pVinput += 2;
- pVMidBuf += 2;
- pVdest += 2;
- }
-
- _m_empty(); // clear MMS state
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// implementation of MMX optimized functions of class 'FIRFilter'
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include "FIRFilter.h"
-
-
-FIRFilterMMX::FIRFilterMMX() : FIRFilter()
-{
- filterCoeffsAlign = NULL;
- filterCoeffsUnalign = NULL;
-}
-
-
-FIRFilterMMX::~FIRFilterMMX()
-{
- delete[] filterCoeffsUnalign;
-}
-
-
-// (overloaded) Calculates filter coefficients for MMX routine
-void FIRFilterMMX::setCoefficients(const short *coeffs, uint newLength, uint uResultDivFactor)
-{
- uint i;
- FIRFilter::setCoefficients(coeffs, newLength, uResultDivFactor);
-
- // Ensure that filter coeffs array is aligned to 16-byte boundary
- delete[] filterCoeffsUnalign;
- filterCoeffsUnalign = new short[2 * newLength + 8];
- filterCoeffsAlign = (short *)SOUNDTOUCH_ALIGN_POINTER_16(filterCoeffsUnalign);
-
- // rearrange the filter coefficients for mmx routines
- for (i = 0;i < length; i += 4)
- {
- filterCoeffsAlign[2 * i + 0] = coeffs[i + 0];
- filterCoeffsAlign[2 * i + 1] = coeffs[i + 2];
- filterCoeffsAlign[2 * i + 2] = coeffs[i + 0];
- filterCoeffsAlign[2 * i + 3] = coeffs[i + 2];
-
- filterCoeffsAlign[2 * i + 4] = coeffs[i + 1];
- filterCoeffsAlign[2 * i + 5] = coeffs[i + 3];
- filterCoeffsAlign[2 * i + 6] = coeffs[i + 1];
- filterCoeffsAlign[2 * i + 7] = coeffs[i + 3];
- }
-}
-
-
-
-// mmx-optimized version of the filter routine for stereo sound
-uint FIRFilterMMX::evaluateFilterStereo(short *dest, const short *src, uint numSamples) const
-{
- // Create stack copies of the needed member variables for asm routines :
- uint i, j;
- __m64 *pVdest = (__m64*)dest;
-
- if (length < 2) return 0;
-
- for (i = 0; i < (numSamples - length) / 2; i ++)
- {
- __m64 accu1;
- __m64 accu2;
- const __m64 *pVsrc = (const __m64*)src;
- const __m64 *pVfilter = (const __m64*)filterCoeffsAlign;
-
- accu1 = accu2 = _mm_setzero_si64();
- for (j = 0; j < lengthDiv8 * 2; j ++)
- {
- __m64 temp1, temp2;
-
- temp1 = _mm_unpacklo_pi16(pVsrc[0], pVsrc[1]); // = l2 l0 r2 r0
- temp2 = _mm_unpackhi_pi16(pVsrc[0], pVsrc[1]); // = l3 l1 r3 r1
-
- accu1 = _mm_add_pi32(accu1, _mm_madd_pi16(temp1, pVfilter[0])); // += l2*f2+l0*f0 r2*f2+r0*f0
- accu1 = _mm_add_pi32(accu1, _mm_madd_pi16(temp2, pVfilter[1])); // += l3*f3+l1*f1 r3*f3+r1*f1
-
- temp1 = _mm_unpacklo_pi16(pVsrc[1], pVsrc[2]); // = l4 l2 r4 r2
-
- accu2 = _mm_add_pi32(accu2, _mm_madd_pi16(temp2, pVfilter[0])); // += l3*f2+l1*f0 r3*f2+r1*f0
- accu2 = _mm_add_pi32(accu2, _mm_madd_pi16(temp1, pVfilter[1])); // += l4*f3+l2*f1 r4*f3+r2*f1
-
- // accu1 += l2*f2+l0*f0 r2*f2+r0*f0
- // += l3*f3+l1*f1 r3*f3+r1*f1
-
- // accu2 += l3*f2+l1*f0 r3*f2+r1*f0
- // l4*f3+l2*f1 r4*f3+r2*f1
-
- pVfilter += 2;
- pVsrc += 2;
- }
- // accu >>= resultDivFactor
- accu1 = _mm_srai_pi32(accu1, resultDivFactor);
- accu2 = _mm_srai_pi32(accu2, resultDivFactor);
-
- // pack 2*2*32bits => 4*16 bits
- pVdest[0] = _mm_packs_pi32(accu1, accu2);
- src += 4;
- pVdest ++;
- }
-
- _m_empty(); // clear emms state
-
- return (numSamples & 0xfffffffe) - length;
-}
-
-#endif // SOUNDTOUCH_ALLOW_MMX
diff --git a/src/thirdparty/SoundTouch/source/sse_optimized.cpp b/src/thirdparty/SoundTouch/source/sse_optimized.cpp
deleted file mode 100644
index 962dff056..000000000
--- a/src/thirdparty/SoundTouch/source/sse_optimized.cpp
+++ /dev/null
@@ -1,372 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// SSE optimized routines for Pentium-III, Athlon-XP and later CPUs. All SSE
-/// optimized functions have been gathered into this single source
-/// code file, regardless to their class or original source code file, in order
-/// to ease porting the library to other compiler and processor platforms.
-///
-/// The SSE-optimizations are programmed using SSE compiler intrinsics that
-/// are supported both by Microsoft Visual C++ and GCC compilers, so this file
-/// should compile with both toolsets.
-///
-/// NOTICE: If using Visual Studio 6.0, you'll need to install the "Visual C++
-/// 6.0 processor pack" update to support SSE instruction set. The update is
-/// available for download at Microsoft Developers Network, see here:
-/// http://msdn.microsoft.com/en-us/vstudio/aa718349.aspx
-///
-/// If the above URL is expired or removed, go to "http://msdn.microsoft.com" and
-/// perform a search with keywords "processor pack".
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// Last changed : $Date: 2015-02-21 21:24:29 +0000 (Sat, 21 Feb 2015) $
-// File revision : $Revision: 4 $
-//
-// $Id: sse_optimized.cpp 202 2015-02-21 21:24:29Z oparviai $
-//
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include "cpu_detect.h"
-#include "STTypes.h"
-
-using namespace soundtouch;
-
-#ifdef SOUNDTOUCH_ALLOW_SSE
-
-// SSE routines available only with float sample type
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// implementation of SSE optimized functions of class 'TDStretchSSE'
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include "TDStretch.h"
-#include <xmmintrin.h>
-#include <math.h>
-
-// Calculates cross correlation of two buffers
-double TDStretchSSE::calcCrossCorr(const float *pV1, const float *pV2, double &anorm) const
-{
- int i;
- const float *pVec1;
- const __m128 *pVec2;
- __m128 vSum, vNorm;
-
- // Note. It means a major slow-down if the routine needs to tolerate
- // unaligned __m128 memory accesses. It's way faster if we can skip
- // unaligned slots and use _mm_load_ps instruction instead of _mm_loadu_ps.
- // This can mean up to ~ 10-fold difference (incl. part of which is
- // due to skipping every second round for stereo sound though).
- //
- // Compile-time define SOUNDTOUCH_ALLOW_NONEXACT_SIMD_OPTIMIZATION is provided
- // for choosing if this little cheating is allowed.
-
-#ifdef SOUNDTOUCH_ALLOW_NONEXACT_SIMD_OPTIMIZATION
- // Little cheating allowed, return valid correlation only for
- // aligned locations, meaning every second round for stereo sound.
-
- #define _MM_LOAD _mm_load_ps
-
- if (((ulongptr)pV1) & 15) return -1e50; // skip unaligned locations
-
-#else
- // No cheating allowed, use unaligned load & take the resulting
- // performance hit.
- #define _MM_LOAD _mm_loadu_ps
-#endif
-
- // ensure overlapLength is divisible by 8
- assert((overlapLength % 8) == 0);
-
- // Calculates the cross-correlation value between 'pV1' and 'pV2' vectors
- // Note: pV2 _must_ be aligned to 16-bit boundary, pV1 need not.
- pVec1 = (const float*)pV1;
- pVec2 = (const __m128*)pV2;
- vSum = vNorm = _mm_setzero_ps();
-
- // Unroll the loop by factor of 4 * 4 operations. Use same routine for
- // stereo & mono, for mono it just means twice the amount of unrolling.
- for (i = 0; i < channels * overlapLength / 16; i ++)
- {
- __m128 vTemp;
- // vSum += pV1[0..3] * pV2[0..3]
- vTemp = _MM_LOAD(pVec1);
- vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp ,pVec2[0]));
- vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
-
- // vSum += pV1[4..7] * pV2[4..7]
- vTemp = _MM_LOAD(pVec1 + 4);
- vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[1]));
- vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
-
- // vSum += pV1[8..11] * pV2[8..11]
- vTemp = _MM_LOAD(pVec1 + 8);
- vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[2]));
- vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
-
- // vSum += pV1[12..15] * pV2[12..15]
- vTemp = _MM_LOAD(pVec1 + 12);
- vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[3]));
- vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
-
- pVec1 += 16;
- pVec2 += 4;
- }
-
- // return value = vSum[0] + vSum[1] + vSum[2] + vSum[3]
- float *pvNorm = (float*)&vNorm;
- float norm = (pvNorm[0] + pvNorm[1] + pvNorm[2] + pvNorm[3]);
- anorm = norm;
-
- float *pvSum = (float*)&vSum;
- return (double)(pvSum[0] + pvSum[1] + pvSum[2] + pvSum[3]) / sqrt(norm < 1e-9 ? 1.0 : norm);
-
- /* This is approximately corresponding routine in C-language yet without normalization:
- double corr, norm;
- uint i;
-
- // Calculates the cross-correlation value between 'pV1' and 'pV2' vectors
- corr = norm = 0.0;
- for (i = 0; i < channels * overlapLength / 16; i ++)
- {
- corr += pV1[0] * pV2[0] +
- pV1[1] * pV2[1] +
- pV1[2] * pV2[2] +
- pV1[3] * pV2[3] +
- pV1[4] * pV2[4] +
- pV1[5] * pV2[5] +
- pV1[6] * pV2[6] +
- pV1[7] * pV2[7] +
- pV1[8] * pV2[8] +
- pV1[9] * pV2[9] +
- pV1[10] * pV2[10] +
- pV1[11] * pV2[11] +
- pV1[12] * pV2[12] +
- pV1[13] * pV2[13] +
- pV1[14] * pV2[14] +
- pV1[15] * pV2[15];
-
- for (j = 0; j < 15; j ++) norm += pV1[j] * pV1[j];
-
- pV1 += 16;
- pV2 += 16;
- }
- return corr / sqrt(norm);
- */
-}
-
-
-
-double TDStretchSSE::calcCrossCorrAccumulate(const float *pV1, const float *pV2, double &norm) const
-{
- // call usual calcCrossCorr function because SSE does not show big benefit of
- // accumulating "norm" value, and also the "norm" rolling algorithm would get
- // complicated due to SSE-specific alignment-vs-nonexact correlation rules.
- return calcCrossCorr(pV1, pV2, norm);
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// implementation of SSE optimized functions of class 'FIRFilter'
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include "FIRFilter.h"
-
-FIRFilterSSE::FIRFilterSSE() : FIRFilter()
-{
- filterCoeffsAlign = NULL;
- filterCoeffsUnalign = NULL;
-}
-
-
-FIRFilterSSE::~FIRFilterSSE()
-{
- delete[] filterCoeffsUnalign;
- filterCoeffsAlign = NULL;
- filterCoeffsUnalign = NULL;
-}
-
-
-// (overloaded) Calculates filter coefficients for SSE routine
-void FIRFilterSSE::setCoefficients(const float *coeffs, uint newLength, uint uResultDivFactor)
-{
- uint i;
- float fDivider;
-
- FIRFilter::setCoefficients(coeffs, newLength, uResultDivFactor);
-
- // Scale the filter coefficients so that it won't be necessary to scale the filtering result
- // also rearrange coefficients suitably for SSE
- // Ensure that filter coeffs array is aligned to 16-byte boundary
- delete[] filterCoeffsUnalign;
- filterCoeffsUnalign = new float[2 * newLength + 4];
- filterCoeffsAlign = (float *)SOUNDTOUCH_ALIGN_POINTER_16(filterCoeffsUnalign);
-
- fDivider = (float)resultDivider;
-
- // rearrange the filter coefficients for mmx routines
- for (i = 0; i < newLength; i ++)
- {
- filterCoeffsAlign[2 * i + 0] =
- filterCoeffsAlign[2 * i + 1] = coeffs[i + 0] / fDivider;
- }
-}
-
-
-
-// SSE-optimized version of the filter routine for stereo sound
-uint FIRFilterSSE::evaluateFilterStereo(float *dest, const float *source, uint numSamples) const
-{
- int count = (int)((numSamples - length) & (uint)-2);
- int j;
-
- assert(count % 2 == 0);
-
- if (count < 2) return 0;
-
- assert(source != NULL);
- assert(dest != NULL);
- assert((length % 8) == 0);
- assert(filterCoeffsAlign != NULL);
- assert(((ulongptr)filterCoeffsAlign) % 16 == 0);
-
- // filter is evaluated for two stereo samples with each iteration, thus use of 'j += 2'
- #pragma omp parallel for
- for (j = 0; j < count; j += 2)
- {
- const float *pSrc;
- float *pDest;
- const __m128 *pFil;
- __m128 sum1, sum2;
- uint i;
-
- pSrc = (const float*)source + j * 2; // source audio data
- pDest = dest + j * 2; // destination audio data
- pFil = (const __m128*)filterCoeffsAlign; // filter coefficients. NOTE: Assumes coefficients
- // are aligned to 16-byte boundary
- sum1 = sum2 = _mm_setzero_ps();
-
- for (i = 0; i < length / 8; i ++)
- {
- // Unroll loop for efficiency & calculate filter for 2*2 stereo samples
- // at each pass
-
- // sum1 is accu for 2*2 filtered stereo sound data at the primary sound data offset
- // sum2 is accu for 2*2 filtered stereo sound data for the next sound sample offset.
-
- sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc) , pFil[0]));
- sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 2), pFil[0]));
-
- sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 4), pFil[1]));
- sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 6), pFil[1]));
-
- sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 8) , pFil[2]));
- sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 10), pFil[2]));
-
- sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 12), pFil[3]));
- sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 14), pFil[3]));
-
- pSrc += 16;
- pFil += 4;
- }
-
- // Now sum1 and sum2 both have a filtered 2-channel sample each, but we still need
- // to sum the two hi- and lo-floats of these registers together.
-
- // post-shuffle & add the filtered values and store to dest.
- _mm_storeu_ps(pDest, _mm_add_ps(
- _mm_shuffle_ps(sum1, sum2, _MM_SHUFFLE(1,0,3,2)), // s2_1 s2_0 s1_3 s1_2
- _mm_shuffle_ps(sum1, sum2, _MM_SHUFFLE(3,2,1,0)) // s2_3 s2_2 s1_1 s1_0
- ));
- }
-
- // Ideas for further improvement:
- // 1. If it could be guaranteed that 'source' were always aligned to 16-byte
- // boundary, a faster aligned '_mm_load_ps' instruction could be used.
- // 2. If it could be guaranteed that 'dest' were always aligned to 16-byte
- // boundary, a faster '_mm_store_ps' instruction could be used.
-
- return (uint)count;
-
- /* original routine in C-language. please notice the C-version has differently
- organized coefficients though.
- double suml1, suml2;
- double sumr1, sumr2;
- uint i, j;
-
- for (j = 0; j < count; j += 2)
- {
- const float *ptr;
- const float *pFil;
-
- suml1 = sumr1 = 0.0;
- suml2 = sumr2 = 0.0;
- ptr = src;
- pFil = filterCoeffs;
- for (i = 0; i < lengthLocal; i ++)
- {
- // unroll loop for efficiency.
-
- suml1 += ptr[0] * pFil[0] +
- ptr[2] * pFil[2] +
- ptr[4] * pFil[4] +
- ptr[6] * pFil[6];
-
- sumr1 += ptr[1] * pFil[1] +
- ptr[3] * pFil[3] +
- ptr[5] * pFil[5] +
- ptr[7] * pFil[7];
-
- suml2 += ptr[8] * pFil[0] +
- ptr[10] * pFil[2] +
- ptr[12] * pFil[4] +
- ptr[14] * pFil[6];
-
- sumr2 += ptr[9] * pFil[1] +
- ptr[11] * pFil[3] +
- ptr[13] * pFil[5] +
- ptr[15] * pFil[7];
-
- ptr += 16;
- pFil += 8;
- }
- dest[0] = (float)suml1;
- dest[1] = (float)sumr1;
- dest[2] = (float)suml2;
- dest[3] = (float)sumr2;
-
- src += 4;
- dest += 4;
- }
- */
-}
-
-#endif // SOUNDTOUCH_ALLOW_SSE
diff --git a/src/thirdparty/ZenLib/ZenLib.vcxproj b/src/thirdparty/ZenLib/ZenLib.vcxproj
index 620696eba..f673071e7 100644
--- a/src/thirdparty/ZenLib/ZenLib.vcxproj
+++ b/src/thirdparty/ZenLib/ZenLib.vcxproj
@@ -68,92 +68,92 @@
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
- <AdditionalIncludeDirectories>.;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>library\Source;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>ZenLib/PreComp.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
- <AdditionalIncludeDirectories>.;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>library\Source;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>ZenLib/PreComp.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <AdditionalIncludeDirectories>.;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>library\Source;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>ZenLib/PreComp.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <AdditionalIncludeDirectories>.;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>library\Source;..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>ZenLib/PreComp.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="ZenLib\Conf.cpp" />
- <ClCompile Include="ZenLib\CriticalSection.cpp" />
- <ClCompile Include="ZenLib\Dir.cpp" />
- <ClCompile Include="ZenLib\File.cpp" />
- <ClCompile Include="ZenLib\FileName.cpp" />
- <ClCompile Include="ZenLib\HTTP_Client.cpp" />
- <ClCompile Include="ZenLib\InfoMap.cpp" />
- <ClCompile Include="ZenLib\int128s.cpp" />
- <ClCompile Include="ZenLib\int128u.cpp" />
- <ClCompile Include="ZenLib\MemoryDebug.cpp" />
- <ClCompile Include="ZenLib\OS_Utils.cpp" />
- <ClCompile Include="ZenLib\PreComp.cpp">
+ <ClCompile Include="library\Source\ZenLib\Conf.cpp" />
+ <ClCompile Include="library\Source\ZenLib\CriticalSection.cpp" />
+ <ClCompile Include="library\Source\ZenLib\Dir.cpp" />
+ <ClCompile Include="library\Source\ZenLib\File.cpp" />
+ <ClCompile Include="library\Source\ZenLib\FileName.cpp" />
+ <ClCompile Include="library\Source\ZenLib\HTTP_Client.cpp" />
+ <ClCompile Include="library\Source\ZenLib\InfoMap.cpp" />
+ <ClCompile Include="library\Source\ZenLib\int128s.cpp" />
+ <ClCompile Include="library\Source\ZenLib\int128u.cpp" />
+ <ClCompile Include="library\Source\ZenLib\MemoryDebug.cpp" />
+ <ClCompile Include="library\Source\ZenLib\OS_Utils.cpp" />
+ <ClCompile Include="library\Source\ZenLib\PreComp.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
- <ClCompile Include="ZenLib\Thread.cpp" />
- <ClCompile Include="ZenLib\Translation.cpp" />
- <ClCompile Include="ZenLib\Utils.cpp" />
- <ClCompile Include="ZenLib\Ztring.cpp" />
- <ClCompile Include="ZenLib\ZtringList.cpp" />
- <ClCompile Include="ZenLib\ZtringListList.cpp" />
- <ClCompile Include="ZenLib\ZtringListListF.cpp" />
- <ClCompile Include="ZenLib\Format\Http\Http_Cookies.cpp" />
- <ClCompile Include="ZenLib\Format\Http\Http_Handler.cpp" />
- <ClCompile Include="ZenLib\Format\Http\Http_Request.cpp" />
- <ClCompile Include="ZenLib\Format\Http\Http_Utils.cpp" />
- <ClCompile Include="ZenLib\Format\Html\Html_Handler.cpp" />
- <ClCompile Include="ZenLib\Format\Html\Html_Request.cpp" />
+ <ClCompile Include="library\Source\ZenLib\Thread.cpp" />
+ <ClCompile Include="library\Source\ZenLib\Translation.cpp" />
+ <ClCompile Include="library\Source\ZenLib\Utils.cpp" />
+ <ClCompile Include="library\Source\ZenLib\Ztring.cpp" />
+ <ClCompile Include="library\Source\ZenLib\ZtringList.cpp" />
+ <ClCompile Include="library\Source\ZenLib\ZtringListList.cpp" />
+ <ClCompile Include="library\Source\ZenLib\ZtringListListF.cpp" />
+ <ClCompile Include="library\Source\ZenLib\Format\Http\Http_Cookies.cpp" />
+ <ClCompile Include="library\Source\ZenLib\Format\Http\Http_Handler.cpp" />
+ <ClCompile Include="library\Source\ZenLib\Format\Http\Http_Request.cpp" />
+ <ClCompile Include="library\Source\ZenLib\Format\Http\Http_Utils.cpp" />
+ <ClCompile Include="library\Source\ZenLib\Format\Html\Html_Handler.cpp" />
+ <ClCompile Include="library\Source\ZenLib\Format\Html\Html_Request.cpp" />
</ItemGroup>
<ItemGroup>
- <ClInclude Include="ZenLib\BitStream.h" />
- <ClInclude Include="ZenLib\BitStream_Fast.h" />
- <ClInclude Include="ZenLib\BitStream_LE.h" />
- <ClInclude Include="ZenLib\Conf.h" />
- <ClInclude Include="ZenLib\CriticalSection.h" />
- <ClInclude Include="ZenLib\Dir.h" />
- <ClInclude Include="ZenLib\File.h" />
- <ClInclude Include="ZenLib\FileName.h" />
- <ClInclude Include="ZenLib\HTTP_Client.h" />
- <ClInclude Include="ZenLib\InfoMap.h" />
- <ClInclude Include="ZenLib\int128s.h" />
- <ClInclude Include="ZenLib\int128u.h" />
- <ClInclude Include="ZenLib\MemoryDebug.h" />
- <ClInclude Include="ZenLib\MemoryUtils.h" />
- <ClInclude Include="ZenLib\OS_Utils.h" />
- <ClInclude Include="ZenLib\PreComp.h" />
- <ClInclude Include="ZenLib\Thread.h" />
- <ClInclude Include="ZenLib\Trace.h" />
- <ClInclude Include="ZenLib\Translation.h" />
- <ClInclude Include="ZenLib\Utils.h" />
- <ClInclude Include="ZenLib\Ztring.h" />
- <ClInclude Include="ZenLib\ZtringList.h" />
- <ClInclude Include="ZenLib\ZtringListList.h" />
- <ClInclude Include="ZenLib\ZtringListListF.h" />
- <ClInclude Include="ZenLib\Format\Html\Html_Handler.h" />
- <ClInclude Include="ZenLib\Format\Html\Html_Request.h" />
- <ClInclude Include="ZenLib\Format\Http\Http_Cookies.h" />
- <ClInclude Include="ZenLib\Format\Http\Http_Handler.h" />
- <ClInclude Include="ZenLib\Format\Http\Http_Request.h" />
- <ClInclude Include="ZenLib\Format\Http\Http_Utils.h" />
+ <ClInclude Include="library\Source\ZenLib\BitStream.h" />
+ <ClInclude Include="library\Source\ZenLib\BitStream_Fast.h" />
+ <ClInclude Include="library\Source\ZenLib\BitStream_LE.h" />
+ <ClInclude Include="library\Source\ZenLib\Conf.h" />
+ <ClInclude Include="library\Source\ZenLib\CriticalSection.h" />
+ <ClInclude Include="library\Source\ZenLib\Dir.h" />
+ <ClInclude Include="library\Source\ZenLib\File.h" />
+ <ClInclude Include="library\Source\ZenLib\FileName.h" />
+ <ClInclude Include="library\Source\ZenLib\HTTP_Client.h" />
+ <ClInclude Include="library\Source\ZenLib\InfoMap.h" />
+ <ClInclude Include="library\Source\ZenLib\int128s.h" />
+ <ClInclude Include="library\Source\ZenLib\int128u.h" />
+ <ClInclude Include="library\Source\ZenLib\MemoryDebug.h" />
+ <ClInclude Include="library\Source\ZenLib\MemoryUtils.h" />
+ <ClInclude Include="library\Source\ZenLib\OS_Utils.h" />
+ <ClInclude Include="library\Source\ZenLib\PreComp.h" />
+ <ClInclude Include="library\Source\ZenLib\Thread.h" />
+ <ClInclude Include="library\Source\ZenLib\Trace.h" />
+ <ClInclude Include="library\Source\ZenLib\Translation.h" />
+ <ClInclude Include="library\Source\ZenLib\Utils.h" />
+ <ClInclude Include="library\Source\ZenLib\Ztring.h" />
+ <ClInclude Include="library\Source\ZenLib\ZtringList.h" />
+ <ClInclude Include="library\Source\ZenLib\ZtringListList.h" />
+ <ClInclude Include="library\Source\ZenLib\ZtringListListF.h" />
+ <ClInclude Include="library\Source\ZenLib\Format\Html\Html_Handler.h" />
+ <ClInclude Include="library\Source\ZenLib\Format\Html\Html_Request.h" />
+ <ClInclude Include="library\Source\ZenLib\Format\Http\Http_Cookies.h" />
+ <ClInclude Include="library\Source\ZenLib\Format\Http\Http_Handler.h" />
+ <ClInclude Include="library\Source\ZenLib\Format\Http\Http_Request.h" />
+ <ClInclude Include="library\Source\ZenLib\Format\Http\Http_Utils.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/src/thirdparty/ZenLib/ZenLib.vcxproj.filters b/src/thirdparty/ZenLib/ZenLib.vcxproj.filters
index 41f0c28c8..5815ba73b 100644
--- a/src/thirdparty/ZenLib/ZenLib.vcxproj.filters
+++ b/src/thirdparty/ZenLib/ZenLib.vcxproj.filters
@@ -29,168 +29,168 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="ZenLib\Conf.cpp">
+ <ClCompile Include="library\Source\ZenLib\Conf.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\CriticalSection.cpp">
+ <ClCompile Include="library\Source\ZenLib\CriticalSection.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\Dir.cpp">
+ <ClCompile Include="library\Source\ZenLib\Dir.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\File.cpp">
+ <ClCompile Include="library\Source\ZenLib\File.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\FileName.cpp">
+ <ClCompile Include="library\Source\ZenLib\FileName.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\HTTP_Client.cpp">
+ <ClCompile Include="library\Source\ZenLib\HTTP_Client.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\InfoMap.cpp">
+ <ClCompile Include="library\Source\ZenLib\InfoMap.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\int128s.cpp">
+ <ClCompile Include="library\Source\ZenLib\int128s.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\int128u.cpp">
+ <ClCompile Include="library\Source\ZenLib\int128u.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\MemoryDebug.cpp">
+ <ClCompile Include="library\Source\ZenLib\MemoryDebug.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\OS_Utils.cpp">
+ <ClCompile Include="library\Source\ZenLib\OS_Utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\Thread.cpp">
+ <ClCompile Include="library\Source\ZenLib\Thread.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\Translation.cpp">
+ <ClCompile Include="library\Source\ZenLib\Translation.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\Utils.cpp">
+ <ClCompile Include="library\Source\ZenLib\Utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\Ztring.cpp">
+ <ClCompile Include="library\Source\ZenLib\Ztring.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\ZtringList.cpp">
+ <ClCompile Include="library\Source\ZenLib\ZtringList.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\ZtringListList.cpp">
+ <ClCompile Include="library\Source\ZenLib\ZtringListList.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\ZtringListListF.cpp">
+ <ClCompile Include="library\Source\ZenLib\ZtringListListF.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\Format\Http\Http_Cookies.cpp">
+ <ClCompile Include="library\Source\ZenLib\Format\Http\Http_Cookies.cpp">
<Filter>Source Files\Format\Http</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\Format\Http\Http_Handler.cpp">
+ <ClCompile Include="library\Source\ZenLib\Format\Http\Http_Handler.cpp">
<Filter>Source Files\Format\Http</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\Format\Http\Http_Request.cpp">
+ <ClCompile Include="library\Source\ZenLib\Format\Http\Http_Request.cpp">
<Filter>Source Files\Format\Http</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\Format\Http\Http_Utils.cpp">
+ <ClCompile Include="library\Source\ZenLib\Format\Http\Http_Utils.cpp">
<Filter>Source Files\Format\Http</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\Format\Html\Html_Handler.cpp">
+ <ClCompile Include="library\Source\ZenLib\Format\Html\Html_Handler.cpp">
<Filter>Source Files\Format\Html</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\Format\Html\Html_Request.cpp">
+ <ClCompile Include="library\Source\ZenLib\Format\Html\Html_Request.cpp">
<Filter>Source Files\Format\Html</Filter>
</ClCompile>
- <ClCompile Include="ZenLib\PreComp.cpp">
+ <ClCompile Include="library\Source\ZenLib\PreComp.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
- <ClInclude Include="ZenLib\BitStream.h">
+ <ClInclude Include="library\Source\ZenLib\BitStream.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\BitStream_Fast.h">
+ <ClInclude Include="library\Source\ZenLib\BitStream_Fast.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\BitStream_LE.h">
+ <ClInclude Include="library\Source\ZenLib\BitStream_LE.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\Conf.h">
+ <ClInclude Include="library\Source\ZenLib\Conf.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\CriticalSection.h">
+ <ClInclude Include="library\Source\ZenLib\CriticalSection.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\Dir.h">
+ <ClInclude Include="library\Source\ZenLib\Dir.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\File.h">
+ <ClInclude Include="library\Source\ZenLib\File.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\FileName.h">
+ <ClInclude Include="library\Source\ZenLib\FileName.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\HTTP_Client.h">
+ <ClInclude Include="library\Source\ZenLib\HTTP_Client.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\InfoMap.h">
+ <ClInclude Include="library\Source\ZenLib\InfoMap.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\int128s.h">
+ <ClInclude Include="library\Source\ZenLib\int128s.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\int128u.h">
+ <ClInclude Include="library\Source\ZenLib\int128u.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\MemoryDebug.h">
+ <ClInclude Include="library\Source\ZenLib\MemoryDebug.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\OS_Utils.h">
+ <ClInclude Include="library\Source\ZenLib\OS_Utils.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\Thread.h">
+ <ClInclude Include="library\Source\ZenLib\Thread.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\Trace.h">
+ <ClInclude Include="library\Source\ZenLib\Trace.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\Translation.h">
+ <ClInclude Include="library\Source\ZenLib\Translation.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\Utils.h">
+ <ClInclude Include="library\Source\ZenLib\Utils.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\Ztring.h">
+ <ClInclude Include="library\Source\ZenLib\Ztring.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\ZtringList.h">
+ <ClInclude Include="library\Source\ZenLib\ZtringList.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\ZtringListList.h">
+ <ClInclude Include="library\Source\ZenLib\ZtringListList.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\ZtringListListF.h">
+ <ClInclude Include="library\Source\ZenLib\ZtringListListF.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\Format\Html\Html_Handler.h">
+ <ClInclude Include="library\Source\ZenLib\Format\Html\Html_Handler.h">
<Filter>Header Files\Format\Html</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\Format\Html\Html_Request.h">
+ <ClInclude Include="library\Source\ZenLib\Format\Html\Html_Request.h">
<Filter>Header Files\Format\Html</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\Format\Http\Http_Cookies.h">
+ <ClInclude Include="library\Source\ZenLib\Format\Http\Http_Cookies.h">
<Filter>Header Files\Format\Http</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\Format\Http\Http_Handler.h">
+ <ClInclude Include="library\Source\ZenLib\Format\Http\Http_Handler.h">
<Filter>Header Files\Format\Http</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\Format\Http\Http_Request.h">
+ <ClInclude Include="library\Source\ZenLib\Format\Http\Http_Request.h">
<Filter>Header Files\Format\Http</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\Format\Http\Http_Utils.h">
+ <ClInclude Include="library\Source\ZenLib\Format\Http\Http_Utils.h">
<Filter>Header Files\Format\Http</Filter>
</ClInclude>
- <ClInclude Include="ZenLib\PreComp.h">
+ <ClInclude Include="library\Source\ZenLib\PreComp.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
diff --git a/src/thirdparty/ZenLib/ZenLib/BitStream.h b/src/thirdparty/ZenLib/ZenLib/BitStream.h
deleted file mode 100644
index f00e04a06..000000000
--- a/src/thirdparty/ZenLib/ZenLib/BitStream.h
+++ /dev/null
@@ -1,352 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Read a stream bit per bit
-// Can read up to 32 bits at once
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenBitStreamH
-#define ZenBitStreamH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-#ifndef MIN
- #define MIN(a, b) (((a) < (b)) ? (a) : (b))
-#endif
-
-class BitStream
-{
-public:
- BitStream () {Buffer=NULL;
- Buffer_Size=Buffer_Size_Init=Buffer_Size_BeforeLastCall=0;
- LastByte_Size=0;
- BufferUnderRun=true;
- BookMark=false;}
- BitStream (const int8u* Buffer_, size_t Size_) {Buffer=Buffer_;
- Buffer_Size=Buffer_Size_Init=Buffer_Size_BeforeLastCall=Size_*8; //Size is in bits
- LastByte_Size=0;
- BufferUnderRun=Buffer_Size?false:true;
- BookMark=false;}
- virtual ~BitStream () {};
-
- virtual void Attach(const int8u* Buffer_, size_t Size_)
- {
- if (Buffer_==Buffer)
- return; //Nothing to do
- Buffer=Buffer_;
- Buffer_Size=Buffer_Size_Init=Buffer_Size_BeforeLastCall=Size_*8; //Size is in bits
- LastByte_Size=0;
- BufferUnderRun=Buffer_Size?false:true;
- BookMark=false;
- };
-
- virtual int32u Get (size_t HowMany)
- {
- size_t ToReturn;
- static const int32u Mask[33]={
- 0x00000000,
- 0x00000001, 0x00000003, 0x00000007, 0x0000000f,
- 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff,
- 0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff,
- 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff,
- 0x0001ffff, 0x0003ffff, 0x0007ffff, 0x000fffff,
- 0x001fffff, 0x003fffff, 0x007fffff, 0x00ffffff,
- 0x01ffffff, 0x03ffffff, 0x07ffffff, 0x0fffffff,
- 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff,
- };
-
- if (HowMany==0 || HowMany>32)
- return 0;
- if ((size_t)HowMany>Buffer_Size+LastByte_Size)
- {
- Buffer_Size=0;
- LastByte_Size=0;
- BufferUnderRun=true;
- return 0;
- }
-
- Buffer_Size_BeforeLastCall=Buffer_Size+LastByte_Size;
-
- if (HowMany<=LastByte_Size)
- {
- LastByte_Size-=HowMany;
- ToReturn=LastByte>>LastByte_Size;
- }
- else
- {
- size_t NewBits=HowMany-LastByte_Size;
- if (NewBits==32)
- ToReturn=0;
- else
- ToReturn=LastByte<<NewBits;
- switch ((NewBits-1)/8)
- {
- case 3 : NewBits-=8;
- ToReturn |= ((size_t)*Buffer) << NewBits;
- Buffer++;
- Buffer_Size-=8;
- case 2 : NewBits-=8;
- ToReturn |= ((size_t)*Buffer) << NewBits;
- Buffer++;
- Buffer_Size-=8;
- case 1 : NewBits-=8;
- ToReturn |= ((size_t)*Buffer) << NewBits;
- Buffer++;
- Buffer_Size-=8;
- case 0 :
- LastByte=*Buffer;
- Buffer++;
- }
- LastByte_Size=MIN(8, Buffer_Size)-NewBits;
- Buffer_Size -=MIN(8, Buffer_Size);
- ToReturn|=(LastByte>>LastByte_Size)&Mask[NewBits];
- }
- return (int32u)(ToReturn&Mask[HowMany]);
- };
-
- bool GetB ()
- {
- return Get(1)?true:false;
- }
-
- int8u Get1 (size_t HowMany)
- {
- return (int8u )Get(HowMany);
- }
-
- int16u Get2 (size_t HowMany)
- {
- return (int16u)Get(HowMany);
- }
-
- int32u Get4 (size_t HowMany)
- {
- return (int32u)Get(HowMany);
- }
-
- int64u Get8 (size_t HowMany)
- {
- if (HowMany>64)
- return 0; //Not supported
- size_t HowMany1, HowMany2;
- int64u Value1, Value2;
- if (HowMany>32)
- HowMany1=HowMany-32;
- else
- HowMany1=0;
- HowMany2=HowMany-HowMany1;
- Value1=Get(HowMany1);
- Value2=Get(HowMany2);
- if (BufferUnderRun)
- return 0;
- return Value1*0x100000000LL+Value2;
- }
-
- virtual void Skip (size_t HowMany)
- {
- if (HowMany==0)
- return;
- if (HowMany>32) //Algorithm is only for <=32 bits
- {
- do
- {
- Skip(32);
- HowMany-=32;
- }
- while(HowMany>32);
- if (HowMany)
- Skip(HowMany);
- return;
- }
- if ((size_t)HowMany>Buffer_Size+LastByte_Size)
- {
- Buffer_Size=0;
- LastByte_Size=0;
- BufferUnderRun=true;
- return;
- }
-
- Buffer_Size_BeforeLastCall=Buffer_Size+LastByte_Size;
-
- if (HowMany<=LastByte_Size)
- LastByte_Size-=HowMany;
- else
- {
- size_t NewBits=HowMany-LastByte_Size;
- switch ((NewBits-1)/8)
- {
- case 3 : NewBits-=8;
- Buffer++;
- Buffer_Size-=8;
- case 2 : NewBits-=8;
- Buffer++;
- Buffer_Size-=8;
- case 1 : NewBits-=8;
- Buffer++;
- Buffer_Size-=8;
- case 0 :
- LastByte=*Buffer;
- Buffer++;
- }
- LastByte_Size=MIN(8, Buffer_Size)-NewBits;
- Buffer_Size -=MIN(8, Buffer_Size);
- }
- };
-
- void SkipB ()
- {
- Skip(1);
- }
-
- void Skip1 (size_t HowMany)
- {
- Skip(HowMany);
- }
-
- void Skip2 (size_t HowMany)
- {
- Skip(HowMany);
- }
-
- void Skip4 (size_t HowMany)
- {
- Skip(HowMany);
- }
-
- void Skip8 (size_t HowMany)
- {
- if (HowMany>64)
- return; //Not supported
- size_t HowMany1, HowMany2;
- if (HowMany>32)
- HowMany1=HowMany-32;
- else
- HowMany1=0;
- HowMany2=HowMany-HowMany1;
- Skip(HowMany1);
- Skip(HowMany2);
- }
-
- int32u Peek(size_t HowMany)
- {
- BookMarkPos(true);
- int32u ToReturn=Get(HowMany);
- BookMarkPos(false);
- return ToReturn;
- }
-
- bool PeekB()
- {
- return Peek(1)?true:false;
- }
-
- int8u Peek1(size_t HowMany)
- {
- return (int8u )Peek(HowMany);
- }
-
- int16u Peek2(size_t HowMany)
- {
- return (int16u)Peek(HowMany);
- }
-
- int32u Peek4(size_t HowMany)
- {
- return (int32u)Peek(HowMany);
- }
-
- int32u Peek3(size_t HowMany)
- {
- return (int32u)Peek(HowMany);
- }
-
- int64u Peek8(size_t HowMany)
- {
- return (int64u)Peek(HowMany);
- }
-
- void BookMarkPos(bool ToSet)
- {
- if (ToSet)
- {
- BookMark=1;
- Buffer_BookMark=Buffer;
- Buffer_Size_BookMark=Buffer_Size;
- LastByte_BookMark=LastByte;
- LastByte_Size_BookMark=LastByte_Size;
- BufferUnderRun_BookMark=BufferUnderRun;
- }
- else
- {
- BookMark=0;
- Buffer=Buffer_BookMark;
- Buffer_Size=Buffer_Size_BookMark;
- LastByte=LastByte_BookMark;
- LastByte_Size=LastByte_Size_BookMark;
- BufferUnderRun=BufferUnderRun_BookMark;
- }
- };
-
- virtual int32u Remain () //How many bits remain?
- {
- return (int32u)(Buffer_Size+LastByte_Size);
- };
-
- virtual void Byte_Align()
- {
- Get(LastByte_Size);
- };
-
- virtual size_t Offset_Get()
- {
- if (BufferUnderRun)
- return 0;
- return (Buffer_Size_Init-Buffer_Size)/8;
- };
-
- virtual size_t BitOffset_Get()
- {
- if (BufferUnderRun)
- return 0;
- return LastByte_Size;
- };
-
- virtual size_t OffsetBeforeLastCall_Get()
- {
- if (BufferUnderRun)
- return 0;
- return (Buffer_Size_Init-Buffer_Size_BeforeLastCall)/8;
- };
-
-private :
- const int8u* Buffer;
- size_t Buffer_Size;
- size_t Buffer_Size_Init;
- size_t Buffer_Size_BeforeLastCall;
- size_t LastByte;
- size_t LastByte_Size;
- bool BufferUnderRun;
-
- bool BookMark;
- const int8u* Buffer_BookMark;
- size_t Buffer_Size_BookMark;
- size_t LastByte_BookMark;
- size_t LastByte_Size_BookMark;
- bool BufferUnderRun_BookMark;
-};
-
-} //namespace ZenLib
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/BitStream_Fast.h b/src/thirdparty/ZenLib/ZenLib/BitStream_Fast.h
deleted file mode 100644
index c0b8fac8a..000000000
--- a/src/thirdparty/ZenLib/ZenLib/BitStream_Fast.h
+++ /dev/null
@@ -1,420 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Read a stream bit per bit
-// Can read up to 32 bits at once
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenBitStream_FastH
-#define ZenBitStream_FastH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-#ifndef MIN
- #define MIN(a, b) (((a) < (b)) ? (a) : (b))
-#endif
-
-class BitStream_Fast
-{
-public:
- BitStream_Fast () {Buffer=NULL;
- Buffer_Size=Buffer_Size_Init=0;
- BufferUnderRun=false;}
- BitStream_Fast (const int8u* Buffer_, size_t Size_) {Buffer=Buffer_;
- Buffer_Size=Buffer_Size_Init=Size_*8; //Size is in bits
- BufferUnderRun=false;}
- ~BitStream_Fast () {}
-
- void Attach(const int8u* Buffer_, size_t Size_)
- {
- Buffer=Buffer_;
- Buffer_Size=Buffer_Size_Init=Size_*8; //Size is in bits
- BufferUnderRun=false;
- }
-
- bool GetB ()
- {
- if (Buffer_Size%8)
- {
- Buffer_Size--;
- return ((LastByte>>(Buffer_Size%8))&0x1)?true:false;
- }
-
- if (!Buffer_Size)
- {
- Buffer_Size=0;
- BufferUnderRun=true;
- return false;
- }
-
- LastByte=*Buffer;
- Buffer++;
- Buffer_Size--;
- return (LastByte&0x80)?true:false;
- }
-
- int8u Get1 (int8u HowMany)
- {
- int8u ToReturn;
- static const int8u Mask[9]=
- {
- 0x00,
- 0x01, 0x03, 0x07, 0x0f,
- 0x1f, 0x3f, 0x7f, 0xff,
- };
-
- if (HowMany<=(Buffer_Size%8))
- {
- Buffer_Size-=HowMany;
- return (LastByte>>(Buffer_Size%8))&Mask[HowMany];
- }
-
- if (HowMany>Buffer_Size)
- {
- Buffer_Size=0;
- BufferUnderRun=true;
- return 0;
- }
-
- int8u NewBits=HowMany-(Buffer_Size%8);
- if (NewBits==8)
- ToReturn=0;
- else
- ToReturn=LastByte<<NewBits;
- LastByte=*Buffer;
- Buffer++;
- Buffer_Size-=HowMany;
- ToReturn|=(LastByte>>(Buffer_Size%8))&Mask[NewBits];
- return ToReturn&Mask[HowMany];
- }
-
- int16u Get2 (int8u HowMany)
- {
- int16u ToReturn;
- static const int16u Mask[17]=
- {
- 0x0000,
- 0x0001, 0x0003, 0x0007, 0x000f,
- 0x001f, 0x003f, 0x007f, 0x00ff,
- 0x01ff, 0x03ff, 0x07ff, 0x0fff,
- 0x1fff, 0x3fff, 0x7fff, 0xffff,
- };
-
- if (HowMany<=(Buffer_Size%8))
- {
- Buffer_Size-=HowMany;
- return (LastByte>>(Buffer_Size%8))&Mask[HowMany];
- }
-
- if (HowMany>Buffer_Size)
- {
- Buffer_Size=0;
- BufferUnderRun=true;
- return 0;
- }
-
- int8u NewBits=HowMany-(Buffer_Size%8);
- if (NewBits==16)
- ToReturn=0;
- else
- ToReturn=LastByte<<NewBits;
- if ((NewBits-1)>>3)
- {
- NewBits-=8;
- ToReturn|=*Buffer<<NewBits;
- Buffer++;
- }
- LastByte=*Buffer;
- Buffer++;
- Buffer_Size-=HowMany;
- ToReturn|=(LastByte>>(Buffer_Size%8))&Mask[NewBits];
- return ToReturn&Mask[HowMany];
- }
-
- int32u Get4 (int8u HowMany)
- {
- int32u ToReturn;
- static const int32u Mask[33]=
- {
- 0x00000000,
- 0x00000001, 0x00000003, 0x00000007, 0x0000000f,
- 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff,
- 0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff,
- 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff,
- 0x0001ffff, 0x0003ffff, 0x0007ffff, 0x000fffff,
- 0x001fffff, 0x003fffff, 0x007fffff, 0x00ffffff,
- 0x01ffffff, 0x03ffffff, 0x07ffffff, 0x0fffffff,
- 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff,
- };
-
- if (HowMany<=(Buffer_Size%8))
- {
- Buffer_Size-=HowMany;
- return (LastByte>>(Buffer_Size%8))&Mask[HowMany];
- }
-
- if (HowMany>Buffer_Size)
- {
- Buffer_Size=0;
- BufferUnderRun=true;
- return 0;
- }
-
- int8u NewBits=HowMany-(Buffer_Size%8);
- if (NewBits==32)
- ToReturn=0;
- else
- ToReturn=LastByte<<NewBits;
- switch ((NewBits-1)>>3)
- {
- case 3 : NewBits-=8;
- ToReturn|=*Buffer<<NewBits;
- Buffer++;
- case 2 : NewBits-=8;
- ToReturn|=*Buffer<<NewBits;
- Buffer++;
- case 1 : NewBits-=8;
- ToReturn|=*Buffer<<NewBits;
- Buffer++;
- default: ;
- }
- LastByte=*Buffer;
- Buffer++;
- Buffer_Size-=HowMany;
- ToReturn|=(LastByte>>(Buffer_Size%8))&Mask[NewBits];
- return ToReturn&Mask[HowMany];
- }
-
- int64u Get8 (int8u HowMany)
- {
- if (HowMany>64)
- return 0; //Not supported
- int8u HowMany1, HowMany2;
- int64u Value1, Value2;
- if (HowMany>32)
- HowMany1=HowMany-32;
- else
- HowMany1=0;
- HowMany2=HowMany-HowMany1;
- Value1=Get4(HowMany1);
- Value2=Get4(HowMany2);
- if (BufferUnderRun)
- return 0;
- return Value1*0x100000000LL+Value2;
- }
-
- void Skip (size_t HowMany)
- {
- if (HowMany<=(Buffer_Size%8))
- {
- Buffer_Size-=HowMany;
- return;
- }
-
- if (HowMany>Buffer_Size)
- {
- Buffer_Size=0;
- BufferUnderRun=true;
- return;
- }
-
- Buffer+=(HowMany-(Buffer_Size%8)-1)>>3;
- LastByte=*Buffer;
- Buffer++;
- Buffer_Size-=HowMany;
- }
-
- bool PeekB()
- {
- if (Buffer_Size%8)
- return ((LastByte>>((Buffer_Size-1)%8))&0x1)?true:false;
-
- if (!Buffer_Size)
- {
- Buffer_Size=0;
- BufferUnderRun=true;
- return false;
- }
-
- return ((*Buffer)&0x80)?true:false;
- }
-
- int8u Peek1(int8u HowMany)
- {
- int8u ToReturn;
- static const int8u Mask[9]=
- {
- 0x00,
- 0x01, 0x03, 0x07, 0x0f,
- 0x1f, 0x3f, 0x7f, 0xff,
- };
-
- if (HowMany<=(Buffer_Size%8))
- return (LastByte>>((Buffer_Size-HowMany)%8))&Mask[HowMany];
-
- if (HowMany>Buffer_Size)
- {
- Buffer_Size=0;
- BufferUnderRun=true;
- return 0;
- }
-
- int8u NewBits=HowMany-(Buffer_Size%8);
- if (NewBits==8)
- ToReturn=0;
- else
- ToReturn=LastByte<<NewBits;
- ToReturn|=((*Buffer)>>((Buffer_Size-HowMany)%8))&Mask[NewBits];
-
- return ToReturn&Mask[HowMany];
- }
-
- int16u Peek2(int8u HowMany)
- {
- int16u ToReturn;
- static const int16u Mask[17]=
- {
- 0x0000,
- 0x0001, 0x0003, 0x0007, 0x000f,
- 0x001f, 0x003f, 0x007f, 0x00ff,
- 0x01ff, 0x03ff, 0x07ff, 0x0fff,
- 0x1fff, 0x3fff, 0x7fff, 0xffff,
- };
-
- if (HowMany<=(Buffer_Size%8))
- return (LastByte>>((Buffer_Size-HowMany)%8))&Mask[HowMany];
-
- if (HowMany>Buffer_Size)
- {
- Buffer_Size=0;
- BufferUnderRun=true;
- return 0;
- }
-
- const int8u* Buffer_Save=Buffer;
-
- int8u NewBits=HowMany-(Buffer_Size%8);
- if (NewBits==16)
- ToReturn=0;
- else
- ToReturn=LastByte<<NewBits;
- if ((NewBits-1)>>3)
- {
- NewBits-=8;
- ToReturn|=*Buffer<<NewBits;
- Buffer++;
- }
- ToReturn|=((*Buffer)>>((Buffer_Size-HowMany)%8))&Mask[NewBits];
-
- Buffer=Buffer_Save;
-
- return ToReturn&Mask[HowMany];
- }
-
- int32u Peek4(int8u HowMany)
- {
- int32u ToReturn;
- static const int32u Mask[33]=
- {
- 0x00000000,
- 0x00000001, 0x00000003, 0x00000007, 0x0000000f,
- 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff,
- 0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff,
- 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff,
- 0x0001ffff, 0x0003ffff, 0x0007ffff, 0x000fffff,
- 0x001fffff, 0x003fffff, 0x007fffff, 0x00ffffff,
- 0x01ffffff, 0x03ffffff, 0x07ffffff, 0x0fffffff,
- 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff,
- };
-
- if (HowMany<=(Buffer_Size%8))
- return (LastByte>>((Buffer_Size-HowMany)%8))&Mask[HowMany];
-
- if (HowMany>Buffer_Size)
- {
- Buffer_Size=0;
- BufferUnderRun=true;
- return 0;
- }
-
- const int8u* Buffer_Save=Buffer;
-
- int8u NewBits=HowMany-(Buffer_Size%8);
- if (NewBits==32)
- ToReturn=0;
- else
- ToReturn=LastByte<<NewBits;
- switch ((NewBits-1)>>3)
- {
- case 3 : NewBits-=8;
- ToReturn|=*Buffer<<NewBits;
- Buffer++;
- case 2 : NewBits-=8;
- ToReturn|=*Buffer<<NewBits;
- Buffer++;
- case 1 : NewBits-=8;
- ToReturn|=*Buffer<<NewBits;
- Buffer++;
- default: ;
- }
- ToReturn|=((*Buffer)>>((Buffer_Size-HowMany)%8))&Mask[NewBits];
-
- Buffer=Buffer_Save;
-
- return ToReturn&Mask[HowMany];
- }
-
- int64u Peek8(int8u HowMany)
- {
- return (int64u)Peek4(HowMany); //Not yet implemented
- }
-
- inline size_t Remain () const //How many bits remain?
- {
- return Buffer_Size;
- }
-
- inline void Byte_Align()
- {
- Skip (Buffer_Size%8);
- }
-
- inline size_t Offset_Get() const
- {
- return (Buffer_Size_Init-Buffer_Size)/8;
- }
-
- inline size_t BitOffset_Get() const
- {
- return Buffer_Size%8;
- }
-
- inline size_t OffsetBeforeLastCall_Get() const //No more valid
- {
- return Buffer_Size%8;
- }
-
-private :
- const int8u* Buffer;
- size_t Buffer_Size;
- size_t Buffer_Size_Init;
- int8u LastByte;
-public :
- bool BufferUnderRun;
-};
-
-} //namespace ZenLib
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/BitStream_LE.h b/src/thirdparty/ZenLib/ZenLib/BitStream_LE.h
deleted file mode 100644
index 362427fbb..000000000
--- a/src/thirdparty/ZenLib/ZenLib/BitStream_LE.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Read a stream bit per bit, Little Endian version (rarely used!!!)
-// Can read up to 32 bits at once
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenBitStream_LEH
-#define ZenBitStream_LEH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/BitStream.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-class BitStream_LE : public BitStream
-{
-public:
- BitStream_LE () :BitStream() {};
- BitStream_LE (const int8u* Buffer_, size_t Size_) :BitStream(Buffer_, Size_) {};
-
- void Attach(const int8u* Buffer_, size_t Size_)
- {
- endbyte=0;
- endbit=0;
- buffer=Buffer_;
- ptr=Buffer_;
- storage=(long)Size_;
- };
-
- int32u Get (size_t HowMany)
- {
- ptr_BeforeLastCall=ptr;
-
- long ret;
- static const int32u Mask[33]={
- 0x00000000,
- 0x00000001, 0x00000003, 0x00000007, 0x0000000f,
- 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff,
- 0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff,
- 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff,
- 0x0001ffff, 0x0003ffff, 0x0007ffff, 0x000fffff,
- 0x001fffff, 0x003fffff, 0x007fffff, 0x00ffffff,
- 0x01ffffff, 0x03ffffff, 0x07ffffff, 0x0fffffff,
- 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff,
- };
- unsigned long m=Mask[HowMany];
-
- HowMany+=endbit;
-
- if(endbyte+4>=storage){
- ret=-1L;
- if(endbyte*8+(long)HowMany>storage*8){
- Attach(NULL, 0);
- goto overflow;
- }
- }
-
- ret=ptr[0]>>endbit;
- if(HowMany>8){
- ret|=ptr[1]<<(8-endbit);
- if(HowMany>16){
- ret|=ptr[2]<<(16-endbit);
- if(HowMany>24){
- ret|=ptr[3]<<(24-endbit);
- if(HowMany>32 && endbit){
- ret|=ptr[4]<<(32-endbit);
- }
- }
- }
- }
- ret&=m;
-
- ptr+=HowMany/8;
- endbyte+=(long)HowMany/8;
- endbit=(long)HowMany&7;
-
- overflow:
-
- return(ret);
- };
-
- void Skip(size_t bits)
- {
- Get(bits);
- }
-
- int32u Remain () //How many bits remain?
- {
- return storage*8-(endbyte*8+endbit);
- };
-
- void Byte_Align()
- {
- };
-
- size_t Offset_Get()
- {
- return ptr-buffer;
- };
-
- size_t BitOffset_Get()
- {
- return endbit;
- };
-
- size_t OffsetBeforeLastCall_Get()
- {
- return ptr_BeforeLastCall-buffer;
- };
-
-private :
- long endbyte;
- int endbit;
-
- const unsigned char *buffer;
- const unsigned char *ptr;
- const unsigned char *ptr_BeforeLastCall;
- long storage;
-};
-
-} //namespace ZenLib
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/Conf.cpp b/src/thirdparty/ZenLib/ZenLib/Conf.cpp
deleted file mode 100644
index 0251d33a7..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Conf.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// Platform differences
-//***************************************************************************
-
-//End of line
-#ifdef WINDOWS
- const Char* EOL=__T("\r\n");
- const Char PathSeparator=__T('\\');
-#endif
-#ifdef UNIX
- const Char* EOL=__T("\n");
- const Char PathSeparator=__T('/');
-#endif
-#if defined (MACOS) || defined (MACOSX)
- const Char* EOL=__T("\n");
- const Char PathSeparator=__T('/');
-#endif
-
-//***************************************************************************
-//
-//***************************************************************************
-
-} //namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/Conf.h b/src/thirdparty/ZenLib/ZenLib/Conf.h
deleted file mode 100644
index b1d67c54e..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Conf.h
+++ /dev/null
@@ -1,350 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef ZenConfH
-#define ZenConfH
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Platforms
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//Win32
-#if defined(__NT__) || defined(_WIN32) || defined(WIN32)
- #ifndef WIN32
- #define WIN32
- #endif
- #ifndef _WIN32
- #define _WIN32
- #endif
- #ifndef __WIN32__
- #define __WIN32__ 1
- #endif
-#endif
-
-//---------------------------------------------------------------------------
-//Win64
-#if defined(_WIN64) || defined(WIN64)
- #ifndef WIN64
- #define WIN64
- #endif
- #ifndef _WIN64
- #define _WIN64
- #endif
- #ifndef __WIN64__
- #define __WIN64__ 1
- #endif
-#endif
-
-//---------------------------------------------------------------------------
-//Windows
-#if defined(WIN32) || defined(WIN64)
- #ifndef WINDOWS
- #define WINDOWS
- #endif
- #ifndef _WINDOWS
- #define _WINDOWS
- #endif
- #ifndef __WINDOWS__
- #define __WINDOWS__ 1
- #endif
-#endif
-
-//---------------------------------------------------------------------------
-//Unix (Linux, HP, Sun, BeOS...)
-#if defined(UNIX) || defined(_UNIX) || defined(__UNIX__) \
- || defined(__unix) || defined(__unix__) \
- || defined(____SVR4____) || defined(__LINUX__) || defined(__sgi) \
- || defined(__hpux) || defined(sun) || defined(__SUN__) || defined(_AIX) \
- || defined(__EMX__) || defined(__VMS) || defined(__BEOS__)
- #ifndef UNIX
- #define UNIX
- #endif
- #ifndef _UNIX
- #define _UNIX
- #endif
- #ifndef __UNIX__
- #define __UNIX__ 1
- #endif
-#endif
-
-//---------------------------------------------------------------------------
-//MacOS Classic
-#if defined(macintosh)
- #ifndef MACOS
- #define MACOS
- #endif
- #ifndef _MACOS
- #define _MACOS
- #endif
- #ifndef __MACOS__
- #define __MACOS__ 1
- #endif
-#endif
-
-//---------------------------------------------------------------------------
-//MacOS X
-#if defined(__APPLE__) && defined(__MACH__)
- #ifndef MACOSX
- #define MACOSX
- #endif
- #ifndef _MACOSX
- #define _MACOSX
- #endif
- #ifndef __MACOSX__
- #define __MACOSX__ 1
- #endif
-#endif
-
-//Test of targets
-#if defined(WINDOWS) && defined(UNIX) && defined(MACOS) && defined(MACOSX)
- #pragma message Multiple platforms???
-#endif
-
-#if !defined(WIN32) && !defined(UNIX) && !defined(MACOS) && !defined(MACOSX)
- #pragma message No known platforms, assume default
-#endif
-
-//***************************************************************************
-// Internationnal
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//Unicode
-#if defined(_UNICODE) || defined(UNICODE) || defined(__UNICODE__)
- #ifndef _UNICODE
- #define _UNICODE
- #endif
- #ifndef UNICODE
- #define UNICODE
- #endif
- #ifndef __UNICODE__
- #define __UNICODE__ 1
- #endif
-#endif
-
-//---------------------------------------------------------------------------
-//wchar_t stuff
-#if defined(MACOS) || defined(MACOSX)
- #include <wchar.h>
-#endif
-
-//***************************************************************************
-// Compiler bugs/unuseful warning
-//***************************************************************************
-
-//MSVC6 : for(int t=0; t<10; ++t) { do something }; for(int t=0; t<10; ++t) { do something }
-#if defined(_MSC_VER) && _MSC_VER <= 1200
- #define for if(true)for
- #pragma warning(disable:4786) // MSVC6 doesn't like typenames longer than 255 chars (which generates an enormous amount of warnings).
-#endif
-
-//MSVC2005 : "deprecated" warning (replacement functions are not in MinGW32 or Borland!)
-#if defined(_MSC_VER) && _MSC_VER >= 1400
- #pragma warning(disable : 4996)
-#endif
-
-//***************************************************************************
-// (Without Namespace)
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-#include <limits.h>
-
-//---------------------------------------------------------------------------
-#if defined(ZENLIB_DEBUG) && (defined(DEBUG) || defined(_DEBUG))
- #include "ZenLib/MemoryDebug.h"
-#endif // defined(ZENLIB_DEBUG) && (defined(DEBUG) || defined(_DEBUG))
-
-//***************************************************************************
-// Compiler helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//Macro to cut down on compiler warnings
-#ifndef UNUSED
- #define UNUSED(Identifier)
-#endif
-//---------------------------------------------------------------------------
-//If we need size_t specific integer conversion
-#if !defined(SIZE_T_IS_LONG) && (defined(__LP64__) || defined(MACOSX))
- #define SIZE_T_IS_LONG
-#endif
-
-//---------------------------------------------------------------------------
-//(-1) is known to be the MAX of an unsigned int but GCC complains about it
-#ifdef __cplusplus
- #include <new> //for size_t
-#else /* __cplusplus */
- #include <stddef.h> //for size_t
-#endif /* __cplusplus */
-#include <cstring> //size_t
-namespace ZenLib
-{
- const std::size_t Error=((std::size_t)(-1));
- const std::size_t All=((std::size_t)(-1));
- const std::size_t Unlimited=((std::size_t)(-1));
-}
-
-//***************************************************************************
-// (With namespace)
-//***************************************************************************
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// International
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//Char types
-#if defined(__UNICODE__)
- #if defined (_MSC_VER) && !defined (_NATIVE_WCHAR_T_DEFINED)
- #pragma message Native wchar_t is not defined, not tested, you should put /Zc:wchar_t in compiler options
- #endif
- typedef wchar_t Char;
- #undef __T
- #define __T(__x) L ## __x
-#else // defined(__UNICODE__)
- typedef char Char;
- #undef __T
- #define __T(__x) __x
-#endif // defined(__UNICODE__)
-#ifdef wchar_t
- typedef wchar_t wchar;
-#endif // wchar_t
-
-//***************************************************************************
-// Platform differences
-//***************************************************************************
-
-//End of line
-extern const Char* EOL;
-extern const Char PathSeparator;
-
-//***************************************************************************
-// Types
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//int
-typedef signed int ints;
-typedef unsigned int intu;
-
-//---------------------------------------------------------------------------
-//8-bit int
-#if UCHAR_MAX==0xff
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 8
- typedef signed char int8s;
- typedef unsigned char int8u;
-#else
- #pragma message This machine has no 8-bit integertype?
-#endif
-
-//---------------------------------------------------------------------------
-//16-bit int
-#if UINT_MAX == 0xffff
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 16
- typedef signed int int16s;
- typedef unsigned int int16u;
-#elif USHRT_MAX == 0xffff
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 16
- typedef signed short int16s;
- typedef unsigned short int16u;
-#else
- #pragma message This machine has no 16-bit integertype?
-#endif
-
-//---------------------------------------------------------------------------
-//32-bit int
-#if UINT_MAX == 0xfffffffful
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 32
- typedef signed int int32s;
- typedef unsigned int int32u;
-#elif ULONG_MAX == 0xfffffffful
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 32
- typedef signed long int32s;
- typedef unsigned long int32u;
-#elif USHRT_MAX == 0xfffffffful
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 32
- typedef signed short int32s;
- typedef unsigned short int32u;
-#else
- #pragma message This machine has no 32-bit integer type?
-#endif
-
-//---------------------------------------------------------------------------
-//64-bit int
-#if defined(__MINGW32__) || defined(__CYGWIN32__) || defined(__UNIX__) || defined(__MACOSX__)
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 64
- typedef signed long long int64s;
- typedef unsigned long long int64u;
-#elif defined(__WIN32__)
- #undef MAXTYPE_INT
- #define MAXTYPE_INT 64
- typedef signed __int64 int64s;
- typedef unsigned __int64 int64u;
-#else
- #pragma message This machine has no 64-bit integer type?
-#endif
-
-//---------------------------------------------------------------------------
-//32-bit float
-#if defined(WINDOWS) || defined(UNIX) || defined(MACOSX)
- #undef MAXTYPE_FLOAT
- #define MAXTYPE_FLOAT 32
- typedef float float32;
-#else
- #pragma message This machine has no 32-bit float type?
-#endif
-
-//---------------------------------------------------------------------------
-//64-bit float
-#if defined(WINDOWS) || defined(UNIX) || defined(MACOSX)
- #undef MAXTYPE_FLOAT
- #define MAXTYPE_FLOAT 64
- typedef double float64;
-#else
- #pragma message This machine has no 64-bit float type?
-#endif
-
-//---------------------------------------------------------------------------
-//80-bit float
-#if defined(WINDOWS) || defined(UNIX) || defined(MACOSX)
- #undef MAXTYPE_FLOAT
- #define MAXTYPE_FLOAT 80
- typedef long double float80;
-#else
- #pragma message This machine has no 80-bit float type?
-#endif
-
-//***************************************************************************
-// Nested functions
-//***************************************************************************
-
-//Unices
-#if defined (UNIX)
- #define snwprintf swprintf
-#endif
-
-//Windows - MSVC
-#if defined (_MSC_VER)
- #define snprintf _snprintf
- #define snwprintf _snwprintf
-#endif
-
-} //namespace
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/Conf_Internal.h b/src/thirdparty/ZenLib/ZenLib/Conf_Internal.h
deleted file mode 100644
index a6574ff8d..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Conf_Internal.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef ZenConf_InternalH
-#define ZenConf_InternalH
-//---------------------------------------------------------------------------
-
-#include "ZenLib/Conf.h"
-
-//***************************************************************************
-// Choice of method
-//***************************************************************************
-
-#ifndef ZENLIB_USEWX
- #ifndef WINDOWS
- #define ZENLIB_STANDARD //We select the C/C++ standard as much as possible
- #endif
-#endif //ZENLIB_USEWX
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/CriticalSection.cpp b/src/thirdparty/ZenLib/ZenLib/CriticalSection.cpp
deleted file mode 100644
index 9574dce24..000000000
--- a/src/thirdparty/ZenLib/ZenLib/CriticalSection.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/CriticalSection.h"
-//---------------------------------------------------------------------------
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// ZENLIB_USEWX
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-#ifdef ZENLIB_USEWX
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#include <wx/thread.h>
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-CriticalSection::CriticalSection()
-{
- CritSect=new wxCriticalSection();
-}
-
-//---------------------------------------------------------------------------
-CriticalSection::~CriticalSection()
-{
- delete ((wxCriticalSection*)CritSect); //CritSect=NULL;
-}
-
-//***************************************************************************
-// Enter/Leave
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void CriticalSection::Enter()
-{
- ((wxCriticalSection*)CritSect)->Enter();
-}
-
-//---------------------------------------------------------------------------
-void CriticalSection::Leave()
-{
- ((wxCriticalSection*)CritSect)->Leave();
-}
-
-} //Namespace
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// WINDOWS
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-#else //ZENLIB_USEWX
-#ifdef WINDOWS
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#undef __TEXT
-#include <windows.h>
-//---------------------------------------------------------------------------
-
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-CriticalSection::CriticalSection()
-{
- CritSect=new CRITICAL_SECTION;
- InitializeCriticalSection((CRITICAL_SECTION*)CritSect);
-}
-
-//---------------------------------------------------------------------------
-CriticalSection::~CriticalSection()
-{
- DeleteCriticalSection((CRITICAL_SECTION*)CritSect);
- delete ((CRITICAL_SECTION*)CritSect); //CritSect=NULL;
-}
-
-//***************************************************************************
-// Enter/Leave
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void CriticalSection::Enter()
-{
- EnterCriticalSection((CRITICAL_SECTION*)CritSect);
-}
-
-//---------------------------------------------------------------------------
-void CriticalSection::Leave()
-{
- LeaveCriticalSection((CRITICAL_SECTION*)CritSect);
-}
-
-} //Namespace
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// UNIX
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-#else //WINDOWS
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#include <pthread.h>
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-CriticalSection::CriticalSection()
-{
- CritSect=new pthread_mutex_t;
- pthread_mutex_init((pthread_mutex_t*)CritSect, NULL);
-}
-
-//---------------------------------------------------------------------------
-CriticalSection::~CriticalSection()
-{
- pthread_mutex_destroy((pthread_mutex_t*)CritSect);
- delete (pthread_mutex_t*)CritSect;
-}
-
-//***************************************************************************
-// Enter/Leave
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void CriticalSection::Enter()
-{
- pthread_mutex_lock((pthread_mutex_t*)CritSect);
-}
-
-//---------------------------------------------------------------------------
-void CriticalSection::Leave()
-{
- pthread_mutex_unlock((pthread_mutex_t*)CritSect);
-}
-
-} //Namespace
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-#endif //WINDOWS
-#endif //ZENLIB_USEWX
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/src/thirdparty/ZenLib/ZenLib/CriticalSection.h b/src/thirdparty/ZenLib/ZenLib/CriticalSection.h
deleted file mode 100644
index d9e044ca9..000000000
--- a/src/thirdparty/ZenLib/ZenLib/CriticalSection.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// CriticalSection functions
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_CriticalSectionH
-#define ZenLib_CriticalSectionH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef CS
- #undef CS //Solaris defines this somewhere
-#endif
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-/// @brief CriticalSection manipulation
-//***************************************************************************
-
-class CriticalSection
-{
-public :
- //Constructor/Destructor
- CriticalSection ();
- ~CriticalSection ();
-
- //Enter/Leave
- void Enter();
- void Leave();
-
-private :
- void* CritSect;
-};
-
-//***************************************************************************
-/// @brief CriticalSectionLocker helper
-//***************************************************************************
-
-class CriticalSectionLocker
-{
-public:
- CriticalSectionLocker (ZenLib::CriticalSection &CS)
- {
- CritSec=&CS;
- CritSec->Enter();
- }
-
- ~CriticalSectionLocker ()
- {
- CritSec->Leave();
- }
-
-private:
- ZenLib::CriticalSection *CritSec;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/Dir.cpp b/src/thirdparty/ZenLib/ZenLib/Dir.cpp
deleted file mode 100644
index dca9dc7c8..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Dir.cpp
+++ /dev/null
@@ -1,533 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef ZENLIB_USEWX
- #include <wx/file.h>
- #include <wx/filename.h>
- #include <wx/utils.h>
- #include <wx/dir.h>
-#else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- #undef WINDOWS
- #endif
- #ifdef WINDOWS
- #undef __TEXT
- #include <windows.h>
- #else
- #include <sys/stat.h>
- #include <sys/types.h>
- #undef __TEXT //dirent include windows.h on Windows/Borland
- #include <dirent.h>
- #include <glob.h>
- #endif
-#endif //ZENLIB_USEWX
-#include "ZenLib/Dir.h"
-#include "ZenLib/File.h"
-#include "ZenLib/FileName.h"
-#include "ZenLib/OS_Utils.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//---------------------------------------------------------------------------
-// Debug
-#ifdef ZENLIB_DEBUG
- #include <stdio.h>
- #include <windows.h>
- namespace ZenLib_Dir_Debug
- {
- FILE* F;
- std::string Debug;
- SYSTEMTIME st_In;
-
- void Debug_Open(bool Out)
- {
- F=fopen("C:\\Temp\\ZenLib_Debug.txt", "a+t");
- Debug.clear();
- SYSTEMTIME st;
- GetLocalTime( &st );
-
- char Duration[100];
- if (Out)
- {
- FILETIME ft_In;
- if (SystemTimeToFileTime(&st_In, &ft_In))
- {
- FILETIME ft_Out;
- if (SystemTimeToFileTime(&st, &ft_Out))
- {
- ULARGE_INTEGER UI_In;
- UI_In.HighPart=ft_In.dwHighDateTime;
- UI_In.LowPart=ft_In.dwLowDateTime;
-
- ULARGE_INTEGER UI_Out;
- UI_Out.HighPart=ft_Out.dwHighDateTime;
- UI_Out.LowPart=ft_Out.dwLowDateTime;
-
- ULARGE_INTEGER UI_Diff;
- UI_Diff.QuadPart=UI_Out.QuadPart-UI_In.QuadPart;
-
- FILETIME ft_Diff;
- ft_Diff.dwHighDateTime=UI_Diff.HighPart;
- ft_Diff.dwLowDateTime=UI_Diff.LowPart;
-
- SYSTEMTIME st_Diff;
- if (FileTimeToSystemTime(&ft_Diff, &st_Diff))
- {
- sprintf(Duration, "%02hd:%02hd:%02hd.%03hd", st_Diff.wHour, st_Diff.wMinute, st_Diff.wSecond, st_Diff.wMilliseconds);
- }
- else
- strcpy(Duration, " ");
- }
- else
- strcpy(Duration, " ");
-
- }
- else
- strcpy(Duration, " ");
- }
- else
- {
- st_In=st;
- strcpy(Duration, " ");
- }
-
- fprintf(F," %02hd:%02hd:%02hd.%03hd %s", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds, Duration);
- }
-
- void Debug_Close()
- {
- Debug += "\r\n";
- fwrite(Debug.c_str(), Debug.size(), 1, F); \
- fclose(F);
- }
- }
- using namespace ZenLib_Dir_Debug;
-
- #define ZENLIB_DEBUG1(_NAME,_TOAPPEND) \
- Debug_Open(false); \
- Debug+=", ";Debug+=_NAME; \
- _TOAPPEND; \
- Debug_Close();
-
- #define ZENLIB_DEBUG2(_NAME,_TOAPPEND) \
- Debug_Open(true); \
- Debug+=", ";Debug+=_NAME; \
- _TOAPPEND; \
- Debug_Close();
-#else // ZENLIB_DEBUG
- #define ZENLIB_DEBUG1(_NAME,_TOAPPEND)
- #define ZENLIB_DEBUG2(_NAME,_TOAPPEND)
-#endif // ZENLIB_DEBUG
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-
-//***************************************************************************
-// Open/Close
-//***************************************************************************
-
-ZtringList Dir::GetAllFileNames(const Ztring &Dir_Name_, dirlist_t Options)
-{
- ZENLIB_DEBUG1( "Dir GetAllFileNames",
- Debug+=", Dir_Name="; Debug+=Ztring(Dir_Name_).To_UTF8(); Debug+=", Options="; Debug +=Ztring::ToZtring(Options).To_UTF8())
-
- ZtringList ToReturn;
- Ztring Dir_Name=Dir_Name_;
-
- #ifdef ZENLIB_USEWX
- int Flags=wxDIR_FILES | wxDIR_DIRS;
-
- //Search for files
- wxArrayString Liste;
- wxFileName FullPath; FullPath=Dir_Name.c_str();
- //-File
- if (FullPath.FileExists())
- {
- FullPath.Normalize();
- Liste.Add(FullPath.GetFullPath());
- }
- //-Directory
- else if (FullPath.DirExists())
- {
- FullPath.Normalize();
- wxDir::GetAllFiles(FullPath.GetFullPath(), &Liste, Ztring(), Flags);
- }
- //-WildCards
- else
- {
- wxString FileName=FullPath.GetFullName();
- FullPath.SetFullName(Ztring()); //Supress filename
- FullPath.Normalize();
- if (FullPath.DirExists())
- wxDir::GetAllFiles(FullPath.GetPath(), &Liste, FileName, Flags);
- }
-
- //Compatible array
- ToReturn.reserve(Liste.GetCount());
- for (size_t Pos=0; Pos<Liste.GetCount(); Pos++)
- ToReturn.push_back(Liste[Pos].c_str());
- #else //ZENLIB_USEWX
- #ifdef WINDOWS
- //Is a dir?
- if (Exists(Dir_Name))
- Dir_Name+=__T("\\*");
-
- //Path
- Ztring Path=FileName::Path_Get(Dir_Name);
- if (Path.empty())
- {
- DWORD Path_Size=GetFullPathName(Dir_Name.c_str(), 0, NULL, NULL);
- Char* PathTemp=new Char[Path_Size+1];
- if (GetFullPathName(Dir_Name.c_str(), Path_Size+1, PathTemp, NULL))
- Path=FileName::Path_Get(PathTemp);
- delete [] PathTemp;
- }
-
- #ifdef UNICODE
- WIN32_FIND_DATAW FindFileDataW;
- HANDLE hFind=FindFirstFileW(Dir_Name.c_str(), &FindFileDataW);
- #else
- WIN32_FIND_DATA FindFileData;
- HANDLE hFind=FindFirstFile(Dir_Name.c_str(), &FindFileData);
- #endif //UNICODE
-
- if (hFind==INVALID_HANDLE_VALUE)
- {
- ZENLIB_DEBUG2( "Dir GetAllFileNames",
- Debug+=", returns with files count="; Debug +=Ztring::ToZtring(ToReturn.size()).To_UTF8())
-
- return ZtringList();
- }
-
- BOOL ReturnValue;
- do
- {
- #ifdef UNICODE
- Ztring File_Name(FindFileDataW.cFileName);
- #else
- Ztring File_Name(FindFileData.cFileName);
- #endif //UNICODE
- if (File_Name!=__T(".") && File_Name!=__T("..")) //Avoid . an ..
- {
- Ztring File_Name_Complete=Path+__T("\\")+File_Name;
- if (Exists(File_Name_Complete))
- {
- if (Options&Include_Dirs)
- ToReturn.push_back(File_Name_Complete); //A dir
- if (Options&Parse_SubDirs)
- ToReturn+=GetAllFileNames(File_Name_Complete, Options); //A SubDir
- }
- else if ((Options&Include_Files) && ((Options&Include_Hidden) || (!File_Name.empty() && File_Name[0]!=__T('.'))))
- ToReturn.push_back(File_Name_Complete); //A file
- }
- #ifdef UNICODE
- ReturnValue=FindNextFileW(hFind, &FindFileDataW);
- #else
- ReturnValue=FindNextFile(hFind, &FindFileData);
- #endif //UNICODE
- }
- while (ReturnValue);
-
- FindClose(hFind);
- #else //WINDOWS
- //A file?
- if (File::Exists(Dir_Name))
- {
- ToReturn.push_back(Dir_Name); //TODO
- return ToReturn;
- }
-
- //A dir?
- if (!Dir::Exists(Dir_Name))
- return ToReturn; //Does not exist
-
- //open
- #ifdef UNICODE
- DIR* Dir=opendir(Dir_Name.To_Local().c_str());
- #else
- DIR* Dir=opendir(Dir_Name.c_str());
- #endif //UNICODE
- if (Dir)
- {
- //This is a dir
- //Normalizing dir (the / at the end)
- size_t Dir_Pos=Dir_Name.rfind(FileName_PathSeparator);
- if (Dir_Pos==std::string::npos)
- Dir_Name+=FileName_PathSeparator;
- else if (Dir_Pos+Ztring(FileName_PathSeparator).size()!=Dir_Name.size())
- Dir_Name+=FileName_PathSeparator;
-
- struct dirent *DirEnt;
- while((DirEnt=readdir(Dir))!=NULL)
- {
- //A file
- Ztring File_Name(DirEnt->d_name);
- if (File_Name!=__T(".") && File_Name!=__T("..")) //Avoid . an ..
- {
- Ztring File_Name_Complete=Dir_Name+File_Name;
- if (Exists(File_Name_Complete))
- {
- if (Options&Parse_SubDirs)
- ToReturn+=GetAllFileNames(File_Name_Complete, Options); //A SubDir
- }
- else if ((Options&Include_Hidden) || (!File_Name.empty() && File_Name[0]!=__T('.')))
- ToReturn.push_back(File_Name_Complete); //A file
- }
- }
-
- //Close it
- closedir(Dir);
- }
- else
- {
- glob_t globbuf;
- if (glob(Dir_Name.To_Local().c_str(), GLOB_NOSORT, NULL, &globbuf)==0)
- {
- for (int Pos=0; Pos<globbuf.gl_pathc; Pos++)
- ToReturn.push_back(Ztring().From_Local(globbuf.gl_pathv[Pos]));
- }
- }
- #endif
- #endif //ZENLIB_USEWX
-
- ZENLIB_DEBUG2( "Dir GetAllFileNames",
- Debug+=", files count="; Debug +=Ztring::ToZtring(ToReturn.size()).To_UTF8())
-
- return ToReturn;
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool Dir::Exists(const Ztring &File_Name)
-{
- ZENLIB_DEBUG1( "Dir Exists",
- Debug+=", Dir_Name="; Debug+=Ztring(File_Name).To_UTF8();)
-
- #ifdef ZENLIB_USEWX
- wxFileName FN(File_Name.c_str());
- return FN.DirExists();
- #else //ZENLIB_USEWX
- #ifdef WINDOWS
- #ifdef UNICODE
- DWORD FileAttributes=GetFileAttributesW(File_Name.c_str());
- #else
- DWORD FileAttributes=GetFileAttributes(File_Name.c_str());
- #endif //UNICODE
-
- ZENLIB_DEBUG2( "Dir Exists",
- Debug+=", returns "; Debug +=Ztring::ToZtring(((FileAttributes!=INVALID_FILE_ATTRIBUTES) && (FileAttributes&FILE_ATTRIBUTE_DIRECTORY))?1:0).To_UTF8())
-
- return ((FileAttributes!=INVALID_FILE_ATTRIBUTES) && (FileAttributes&FILE_ATTRIBUTE_DIRECTORY));
- #else //WINDOWS
- struct stat buffer;
- int status;
- #ifdef UNICODE
- status=stat(File_Name.To_Local().c_str(), &buffer);
- #else
- status=stat(File_Name.c_str(), &buffer);
- #endif //UNICODE
- return status==0 && S_ISDIR(buffer.st_mode);
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-bool Dir::Create(const Ztring &File_Name)
-{
- #ifdef ZENLIB_USEWX
- return wxFileName::Mkdir(File_Name.c_str());
- #else //ZENLIB_USEWX
- #ifdef WINDOWS
- #ifdef UNICODE
- return CreateDirectoryW(File_Name.c_str(), NULL)!=0;
- #else
- return CreateDirectory(File_Name.c_str(), NULL)!=0;
- #endif //UNICODE
- #else //WINDOWS
- return mkdir(File_Name.To_Local().c_str(), 0700)==0;
- #endif //WINDOWS
- #endif //ZENLIB_USEWX
-}
-
-//***************************************************************************
-// GetAllFileNames
-//***************************************************************************
-
-#ifdef WINDOWS
-class GetAllFileNames_Private
-{
-public:
- Ztring Dir_Name;
- Ztring Path;
- Dir::dirlist_t Options;
- HANDLE hFind;
- #ifdef UNICODE
- WIN32_FIND_DATAW FindFileDataW;
- #else
- WIN32_FIND_DATA FindFileData;
- #endif //UNICODE
-
- GetAllFileNames_Private()
- : hFind(INVALID_HANDLE_VALUE)
- {
- }
-};
-
-//---------------------------------------------------------------------------
-GetAllFileNames::GetAllFileNames()
- : p(NULL)
-{
-}
-
-//---------------------------------------------------------------------------
-GetAllFileNames::~GetAllFileNames()
-{
- Close();
-}
-
-//---------------------------------------------------------------------------
-void GetAllFileNames::Start (const Ztring &Dir_Name_, Dir::dirlist_t Options_)
-{
- ZENLIB_DEBUG1( "GetAllFileNames Start",
- Debug+=", Dir_Name="; Debug+=Ztring(Dir_Name_).To_UTF8(); Debug+=", Options="; Debug +=Ztring::ToZtring(Options_).To_UTF8())
-
- delete p; p=new GetAllFileNames_Private;
- p->Dir_Name=Dir_Name_;
- p->Options=Options_;
-
- #ifdef WINDOWS
- //Is a dir?
- if (Dir::Exists(p->Dir_Name))
- p->Dir_Name+=__T("\\*");
-
- //Path
- p->Path=FileName::Path_Get(p->Dir_Name);
- if (p->Path.empty())
- {
- DWORD Path_Size=GetFullPathName(p->Dir_Name.c_str(), 0, NULL, NULL);
- Char* PathTemp=new Char[Path_Size+1];
- if (GetFullPathName(p->Dir_Name.c_str(), Path_Size+1, PathTemp, NULL))
- p->Path=FileName::Path_Get(PathTemp);
- delete [] PathTemp;
- }
- #else //WINDOWS
- #endif
-
- ZENLIB_DEBUG2( "GetAllFileNames Start",
- )
-}
-
-bool GetAllFileNames::Next (Ztring& Name)
-{
- if (!p)
- return false;
-
- ZENLIB_DEBUG1( "GetAllFileNames Next",
- Debug+=", Dir_Name="; Debug+=Ztring(p->Dir_Name).To_UTF8())
-
- #ifdef WINDOWS
- for (;;)
- {
- if (p->hFind==INVALID_HANDLE_VALUE)
- {
- #ifdef UNICODE
- p->hFind=FindFirstFileW(p->Dir_Name.c_str(), &p->FindFileDataW);
- #else
- p->hFind=FindFirstFile(p->Dir_Name.c_str(), &p->FindFileData);
- #endif //UNICODE
-
- if (p->hFind==INVALID_HANDLE_VALUE)
- break;
- }
- else
- {
- BOOL ReturnValue;
- #ifdef UNICODE
- ReturnValue=FindNextFileW(p->hFind, &p->FindFileDataW);
- #else
- ReturnValue=FindNextFile(p->hFind, &p->FindFileData);
- #endif //UNICODE
- if (!ReturnValue)
- break;
- }
-
- #ifdef UNICODE
- Ztring File_Name(p->FindFileDataW.cFileName);
- #else
- Ztring File_Name(p->FindFileData.cFileName);
- #endif //UNICODE
- if (File_Name!=__T(".") && File_Name!=__T("..")) //Avoid . an ..
- {
- bool IsOk=false;
- #ifdef UNICODE
- if (p->FindFileDataW.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)
- #else
- if (p->FindFileData.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)
- #endif //UNICODE
- {
- if (p->Options&Dir::Include_Dirs)
- IsOk=true; //A dir
- }
- else if ((p->Options&Dir::Include_Files) && ((p->Options&Dir::Include_Hidden) || (!File_Name.empty() && File_Name[0]!=__T('.'))))
- IsOk=true; //A file
- if (IsOk)
- {
- Name=p->Path+__T("\\")+File_Name;
-
- ZENLIB_DEBUG2( "GetAllFileNames Next",
- Debug+=", File_Name="; Debug +=Name.To_UTF8())
-
- return true;
- }
- }
- }
- #else //WINDOWS
- #endif
-
- Close();
- return false;
-}
-
-void GetAllFileNames::Close ()
-{
- if (!p)
- return;
-
- ZENLIB_DEBUG1( "GetAllFileNames Close",
- Debug+=", Dir_Name="; Debug+=Ztring(p->Dir_Name).To_UTF8())
-
- FindClose(p->hFind); p->hFind=INVALID_HANDLE_VALUE;
- delete p; p=NULL;
-
- ZENLIB_DEBUG2( "GetAllFileNames Close",
- )
-}
-#endif //WINDOWS
-
-//***************************************************************************
-//
-//***************************************************************************
-
-} //namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/Dir.h b/src/thirdparty/ZenLib/ZenLib/Dir.h
deleted file mode 100644
index d01d37c3c..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Dir.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Directories functions
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_DirH
-#define ZenLib_DirH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/ZtringList.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-/// @brief Directory manipulation
-//***************************************************************************
-
-class Dir
-{
-public :
- //---------------------------------------------------------------------------
- /// @brief Options for Open method
- enum dirlist_t
- {
- Nothing = 0x00, ///<
- Include_Files = 0x01, ///< Include files
- Include_Dirs = 0x02, ///< Include directories
- Include_Hidden = 0x04, ///< Include hidden files
- Parse_SubDirs = 0x10 ///< Parse subdirectories
- };
-
- //Constructor/Destructor
-
- //Open/close
- static ZtringList GetAllFileNames(const Ztring &Dir_Name, dirlist_t Options=(dirlist_t)(Include_Files|Parse_SubDirs));
-
- //Helpers
- static bool Exists(const Ztring &Dir_Name);
- static bool Create(const Ztring &Dir_Name);
-};
-
-#ifdef WINDOWS
-class GetAllFileNames_Private;
-class GetAllFileNames
-{
-public:
- //Constructor/Destructor
- GetAllFileNames();
- ~GetAllFileNames();
-
- //
- void Start (const Ztring &Dir_Name, Dir::dirlist_t Options=(Dir::dirlist_t)(Dir::Include_Files|Dir::Parse_SubDirs));
- bool Next (Ztring& Name);
- void Close ();
-
-private:
- GetAllFileNames_Private* p;
-};
-#endif //WINDOWS
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/File.cpp b/src/thirdparty/ZenLib/ZenLib/File.cpp
deleted file mode 100644
index eaa67b5cc..000000000
--- a/src/thirdparty/ZenLib/ZenLib/File.cpp
+++ /dev/null
@@ -1,1067 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef ZENLIB_USEWX
- #include <wx/file.h>
- #include <wx/filename.h>
- #include <wx/utils.h>
-#else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- #ifdef WINDOWS
- #else
- #include <cstdio>
- #endif
- #include <sys/stat.h>
- #if !defined(WINDOWS)
- #include <unistd.h>
- #endif //!defined(WINDOWS)
- #include <fstream>
- using namespace std;
- #ifndef S_ISDIR
- #define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
- #endif
- #ifndef S_ISREG
- #define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG)
- #endif
- #elif defined WINDOWS
- #undef __TEXT
- #include <windows.h>
- #endif
-#endif //ZENLIB_USEWX
-#include "ZenLib/File.h"
-#include "ZenLib/OS_Utils.h"
-#include <map>
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//---------------------------------------------------------------------------
-// Debug
-#ifdef ZENLIB_DEBUG
- #include <stdio.h>
- #include <windows.h>
- namespace ZenLib_File_Debug
- {
- FILE* F;
- std::string Debug;
- SYSTEMTIME st_In;
-
- void Debug_Open(bool Out)
- {
- F=fopen("C:\\Temp\\ZenLib_Debug.txt", "a+t");
- Debug.clear();
- SYSTEMTIME st;
- GetLocalTime( &st );
-
- char Duration[100];
- if (Out)
- {
- FILETIME ft_In;
- if (SystemTimeToFileTime(&st_In, &ft_In))
- {
- FILETIME ft_Out;
- if (SystemTimeToFileTime(&st, &ft_Out))
- {
- ULARGE_INTEGER UI_In;
- UI_In.HighPart=ft_In.dwHighDateTime;
- UI_In.LowPart=ft_In.dwLowDateTime;
-
- ULARGE_INTEGER UI_Out;
- UI_Out.HighPart=ft_Out.dwHighDateTime;
- UI_Out.LowPart=ft_Out.dwLowDateTime;
-
- ULARGE_INTEGER UI_Diff;
- UI_Diff.QuadPart=UI_Out.QuadPart-UI_In.QuadPart;
-
- FILETIME ft_Diff;
- ft_Diff.dwHighDateTime=UI_Diff.HighPart;
- ft_Diff.dwLowDateTime=UI_Diff.LowPart;
-
- SYSTEMTIME st_Diff;
- if (FileTimeToSystemTime(&ft_Diff, &st_Diff))
- {
- sprintf(Duration, "%02hd:%02hd:%02hd.%03hd", st_Diff.wHour, st_Diff.wMinute, st_Diff.wSecond, st_Diff.wMilliseconds);
- }
- else
- strcpy(Duration, " ");
- }
- else
- strcpy(Duration, " ");
-
- }
- else
- strcpy(Duration, " ");
- }
- else
- {
- st_In=st;
- strcpy(Duration, " ");
- }
-
- fprintf(F," %02hd:%02hd:%02hd.%03hd %s", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds, Duration);
- }
-
- void Debug_Close()
- {
- Debug += "\r\n";
- fwrite(Debug.c_str(), Debug.size(), 1, F); \
- fclose(F);
- }
- }
- using namespace ZenLib_File_Debug;
-
- #define ZENLIB_DEBUG1(_NAME,_TOAPPEND) \
- Debug_Open(false); \
- Debug+=", ";Debug+=_NAME; \
- _TOAPPEND; \
- Debug_Close();
-
- #define ZENLIB_DEBUG2(_NAME,_TOAPPEND) \
- Debug_Open(true); \
- Debug+=", ";Debug+=_NAME; \
- _TOAPPEND; \
- Debug_Close();
-#else // ZENLIB_DEBUG
- #define ZENLIB_DEBUG1(_NAME,_TOAPPEND)
- #define ZENLIB_DEBUG2(_NAME,_TOAPPEND)
-#endif // ZENLIB_DEBUG
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-File::File()
-{
- #ifdef ZENLIB_USEWX
- File_Handle=NULL;
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- File_Handle=NULL;
- #elif defined WINDOWS
- File_Handle=INVALID_HANDLE_VALUE;
- #endif
- #endif //ZENLIB_USEWX
- Position=(int64u)-1;
- Size=(int64u)-1;
-}
-
-File::File(Ztring File_Name, access_t Access)
-{
- #ifdef ZENLIB_USEWX
- File_Handle=NULL;
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- File_Handle=NULL;
- #elif defined WINDOWS
- File_Handle=INVALID_HANDLE_VALUE;
- #endif
- #endif //ZENLIB_USEWX
- Position=(int64u)-1;
- Size=(int64u)-1;
- Open(File_Name, Access);
-}
-
-//---------------------------------------------------------------------------
-File::~File()
-{
- Close();
-}
-
-//***************************************************************************
-// Open/Close
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File::Open (const tstring &File_Name_, access_t Access)
-{
- Close();
-
- ZENLIB_DEBUG1( "File Open",
- Debug+=", File_Name="; Debug +=Ztring(File_Name_).To_UTF8();)
-
- File_Name=File_Name_;
-
- #ifdef ZENLIB_USEWX
- File_Handle=(void*)new wxFile();
- if (((wxFile*)File_Handle)->Open(File_Name.c_str(), (wxFile::OpenMode)Access)==0)
- {
- //Sometime the file is locked for few milliseconds, we try again later
- wxMilliSleep(1000);
- if (((wxFile*)File_Handle)->Open(File_Name.c_str(), (wxFile::OpenMode)Access)==0)
- //File is not openable
- return false;
- }
- return true;
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- /*
- int access;
- switch (Access)
- {
- case Access_Read : access=O_BINARY|O_RDONLY ; break;
- case Access_Write : access=O_BINARY|O_WRONLY|O_CREAT|O_TRUNC ; break;
- case Access_Read_Write : access=O_BINARY|O_RDWR |O_CREAT ; break;
- case Access_Write_Append : access=O_BINARY|O_WRONLY|O_CREAT|O_APPEND ; break;
- default : access=0 ; break;
- }
- #ifdef UNICODE
- File_Handle=open(File_Name.To_Local().c_str(), access);
- #else
- File_Handle=open(File_Name.c_str(), access);
- #endif //UNICODE
- return File_Handle!=-1;
- */
- ios_base::openmode mode;
- switch (Access)
- {
- case Access_Read : mode=ios_base::binary|ios_base::in; break;
- case Access_Write : mode=ios_base::binary|ios_base::in|ios_base::out; break;
- case Access_Read_Write : mode=ios_base::binary|ios_base::in|ios_base::out; break;
- case Access_Write_Append : if (!Exists(File_Name))
- mode=ios_base::binary|ios_base::out;
- else
- mode=ios_base::binary|ios_base::out|ios_base::app;
- break;
- default : ;
- }
- #ifdef UNICODE
- File_Handle=new fstream(File_Name.To_Local().c_str(), mode);
- #else
- File_Handle=new fstream(File_Name.c_str(), mode);
- #endif //UNICODE
- if (!((fstream*)File_Handle)->is_open())
- {
- delete (fstream*)File_Handle; File_Handle=NULL;
- return false;
- }
- return true;
- #elif defined WINDOWS
- DWORD dwDesiredAccess, dwShareMode, dwCreationDisposition;
- switch (Access)
- {
- case Access_Read : dwDesiredAccess=FILE_READ_DATA; dwShareMode=FILE_SHARE_READ|FILE_SHARE_WRITE; dwCreationDisposition=OPEN_EXISTING; break;
- case Access_Write : dwDesiredAccess=GENERIC_WRITE; dwShareMode=0; dwCreationDisposition=OPEN_ALWAYS; break;
- case Access_Read_Write : dwDesiredAccess=FILE_READ_DATA|GENERIC_WRITE; dwShareMode=0; dwCreationDisposition=OPEN_ALWAYS; break;
- case Access_Write_Append : dwDesiredAccess=GENERIC_WRITE; dwShareMode=FILE_SHARE_READ|FILE_SHARE_WRITE; dwCreationDisposition=OPEN_ALWAYS; break;
- default : dwDesiredAccess=0; dwShareMode=0; dwCreationDisposition=0; break;
- }
-
- #ifdef UNICODE
- File_Handle=CreateFileW(File_Name.c_str(), dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, 0, NULL);
- #else
- File_Handle=CreateFile(File_Name.c_str(), dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, 0, NULL);
- #endif //UNICODE
- #if 0 //Disabled
- if (File_Handle==INVALID_HANDLE_VALUE)
- {
- //Sometimes the file is locked for few milliseconds, we try again later
- DWORD dw = GetLastError();
- if (dw!=ERROR_FILE_NOT_FOUND)
- {
- /*
- char lpMsgBuf[1000];
- FormatMessageA(
- FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- dw,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- lpMsgBuf,
- 1000, NULL );
- */
- Sleep(1000);
- #ifdef UNICODE
- File_Handle=CreateFileW(File_Name.c_str(), dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, 0, NULL);
- #else
- File_Handle=CreateFile(File_Name.c_str(), dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, 0, NULL);
- #endif //UNICODE
- }
- }
- #endif //0
- if (File_Handle==INVALID_HANDLE_VALUE)
- {
- ZENLIB_DEBUG2( "File Open",
- Debug+=", returns 0";)
-
- //File is not openable
- return false;
- }
-
- ZENLIB_DEBUG2( "File Open",
- Debug+=", returns 1";)
-
- //Append
- if (Access==Access_Write_Append)
- GoTo(0, FromEnd);
-
- return true;
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-bool File::Create (const Ztring &File_Name_, bool OverWrite)
-{
- Close();
-
- ZENLIB_DEBUG1( "File Create",
- Debug+=", File_Name="; Debug +=Ztring(File_Name_).To_UTF8();)
-
- File_Name=File_Name_;
-
- #ifdef ZENLIB_USEWX
- File_Handle=(void*)new wxFile();
- if (((wxFile*)File_Handle)->Create(File_Name.c_str(), OverWrite)==0)
- {
- //Sometime the file is locked for few milliseconds, we try again later
- wxMilliSleep(3000);
- if (((wxFile*)File_Handle)->Create(File_Name.c_str(), OverWrite)==0)
- //File is not openable
- return false;
- }
- return true;
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- /*
- int access;
- switch (OverWrite)
- {
- case false : access=O_BINARY|O_CREAT|O_WRONLY|O_EXCL ; break;
- default : access=O_BINARY|O_CREAT|O_WRONLY|O_TRUNC; break;
- }
- #ifdef UNICODE
- File_Handle=open(File_Name.To_Local().c_str(), access);
- #else
- File_Handle=open(File_Name.c_str(), access);
- #endif //UNICODE
- return File_Handle!=-1;
- */
- /*ios_base::openmode mode;
-
- switch (OverWrite)
- {
- //case false : mode= ; break;
- default : mode=0 ; break;
- }*/
- ios_base::openmode access;
- switch (OverWrite)
- {
- case false : if (Exists(File_Name))
- return false;
- default : access=ios_base::binary|ios_base::in|ios_base::out|ios_base::trunc; break;
- }
- #ifdef UNICODE
- File_Handle=new fstream(File_Name.To_Local().c_str(), access);
- #else
- File_Handle=new fstream(File_Name.c_str(), access);
- #endif //UNICODE
- return ((fstream*)File_Handle)->is_open();
- #elif defined WINDOWS
- DWORD dwDesiredAccess, dwShareMode, dwCreationDisposition;
- switch (OverWrite)
- {
- case false : dwDesiredAccess=GENERIC_WRITE; dwShareMode=0; dwCreationDisposition=CREATE_NEW; break;
- default : dwDesiredAccess=GENERIC_WRITE; dwShareMode=0; dwCreationDisposition=CREATE_ALWAYS; break;
- }
-
- #ifdef UNICODE
- File_Handle=CreateFileW(File_Name.c_str(), dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, 0, NULL);
- #else
- File_Handle=CreateFile(File_Name.c_str(), dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, 0, NULL);
- #endif //UNICODE
- #if 0 //Disabled
- if (File_Handle==INVALID_HANDLE_VALUE)
- {
- //Sometime the file is locked for few milliseconds, we try again later
- Sleep(3000);
- #ifdef UNICODE
- File_Handle=CreateFileW(File_Name.c_str(), dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, 0, NULL);
- #else
- File_Handle=CreateFile(File_Name.c_str(), dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, 0, NULL);
- #endif //UNICODE
- }
- #endif //0
- if (File_Handle==INVALID_HANDLE_VALUE)
- {
- ZENLIB_DEBUG2( "File Create",
- Debug+=", returns 0";)
-
- //File is not openable
- return false;
- }
-
- ZENLIB_DEBUG2( "File Create",
- Debug+=", returns 1";)
-
- return true;
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-void File::Close ()
-{
- #ifdef ZENLIB_DEBUG
- bool isOpen=false;
- #ifdef ZENLIB_USEWX
- if (File_Handle!=NULL)
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- if (File_Handle!=NULL)
- #elif defined WINDOWS
- if (File_Handle!=INVALID_HANDLE_VALUE)
- #endif
- #endif //ZENLIB_USEWX
- {
- ZENLIB_DEBUG1( "File Close",
- Debug+=", File_Name="; Debug+=Ztring(File_Name).To_UTF8();)
- isOpen=true;
- }
- #endif
-
- #ifdef ZENLIB_USEWX
- delete (wxFile*)File_Handle; File_Handle=NULL;
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- //close(File_Handle); File_Handle=-1;
- delete (fstream*)File_Handle; File_Handle=NULL;
- #elif defined WINDOWS
- CloseHandle(File_Handle); File_Handle=INVALID_HANDLE_VALUE;
- #endif
- #endif //ZENLIB_USEWX
- Position=(int64u)-1;
- Size=(int64u)-1;
-
- #ifdef ZENLIB_DEBUG
- if (isOpen)
- {
- ZENLIB_DEBUG2( "File Close",
- )
- }
- #endif
-}
-
-//***************************************************************************
-// Read/Write
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t File::Read (int8u* Buffer, size_t Buffer_Size_Max)
-{
- ZENLIB_DEBUG1( "File Read",
- Debug+=", File_Name="; Debug+=Ztring(File_Name).To_UTF8(); Debug+=", MaxSize="; Debug +=Ztring::ToZtring(Buffer_Size_Max).To_UTF8())
-
- #ifdef ZENLIB_USEWX
- if (File_Handle==NULL)
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- if (File_Handle==NULL)
- #elif defined WINDOWS
- if (File_Handle==INVALID_HANDLE_VALUE)
- #endif
- #endif //ZENLIB_USEWX
- return 0;
-
- #ifdef ZENLIB_USEWX
- size_t ByteRead=((wxFile*)File_Handle)->Read(Buffer, Buffer_Size_Max);
- Position+=ByteRead;
- return ByteRead;
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- //return read((int)File_Handle, Buffer, Buffer_Size_Max);
- if (Position==(int64u)-1)
- Position_Get();
- if (Size==(int64u)-1)
- Size_Get();
- if (Position!=(int64u)-1 && Position+Buffer_Size_Max>Size)
- Buffer_Size_Max=(size_t)(Size-Position); //We don't want to enable eofbit (impossible to seek after)
- ((fstream*)File_Handle)->read((char*)Buffer, Buffer_Size_Max);
- size_t ByteRead=((fstream*)File_Handle)->gcount();
- Position+=ByteRead;
- return ByteRead;
- #elif defined WINDOWS
- DWORD Buffer_Size;
- if (ReadFile(File_Handle, Buffer, (DWORD)Buffer_Size_Max, &Buffer_Size, NULL))
- {
- Position+=Buffer_Size;
-
- ZENLIB_DEBUG2( "File Read",
- Debug+=", new position ";Debug+=Ztring::ToZtring(Position).To_UTF8();;Debug+=", returns ";Debug+=Ztring::ToZtring((int64u)Buffer_Size).To_UTF8();)
-
- return Buffer_Size;
- }
- else
- {
- ZENLIB_DEBUG2( "File Read",
- Debug+=", returns 0";)
- return 0;
- }
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-size_t File::Write (const int8u* Buffer, size_t Buffer_Size)
-{
- #ifdef ZENLIB_USEWX
- if (File_Handle==NULL)
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- if (File_Handle==NULL)
- #elif defined WINDOWS
- if (File_Handle==INVALID_HANDLE_VALUE)
- #endif
- #endif //ZENLIB_USEWX
- return 0;
-
- #ifdef ZENLIB_USEWX
- return ((wxFile*)File_Handle)->Write(Buffer, Buffer_Size);
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- //return write(File_Handle, Buffer, Buffer_Size);
- ((fstream*)File_Handle)->write((char*)Buffer, Buffer_Size);
- if (((fstream*)File_Handle)->bad())
- {
- Position=(int64u)-1;
- return 0;
- }
- else
- {
- if (Position!=(int64u)-1)
- Position+=Buffer_Size;
- return Buffer_Size;
- }
- #elif defined WINDOWS
- DWORD Buffer_Size_Written;
- if (WriteFile(File_Handle, Buffer, (DWORD)Buffer_Size, &Buffer_Size_Written, NULL))
- {
- if (Position!=(int64u)-1)
- Position+=Buffer_Size_Written;
- return Buffer_Size_Written;
- }
- else
- {
- Position=(int64u)-1;
- return 0;
- }
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-bool File::Truncate (int64u Offset)
-{
- if (File_Handle==NULL)
- return false;
-
- #ifdef ZENLIB_USEWX
- return false; //Not supported
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- #if defined(WINDOWS)
- return false; //Not supported
- #else //defined(WINDOWS)
- //Need to close the file, use truncate, reopen it
- if (Offset==(int64u)-1)
- Offset=Position_Get();
- Ztring File_Name_Sav=File_Name;
- Close();
- truncate(File_Name_Sav.To_Local().c_str(), Offset);
- if (!Open(File_Name_Sav, Access_Read_Write))
- return false;
- GoTo(0, FromEnd);
- return true;
- #endif //!defined(WINDOWS)
- #elif defined WINDOWS
- if(Offset!=(int64u)-1 && Offset!=Position_Get())
- if (!GoTo(Offset))
- return false;
- SetEndOfFile(File_Handle);
- return true;
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-size_t File::Write (const Ztring &ToWrite)
-{
- std::string AnsiString=ToWrite.To_UTF8();
- return Write((const int8u*)AnsiString.c_str(), AnsiString.size());
-}
-
-//***************************************************************************
-// Moving
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool File::GoTo (int64s Position_ToMove, move_t MoveMethod)
-{
- ZENLIB_DEBUG1( "File GoTo",
- Debug+=", File_Name="; Debug+=Ztring(File_Name).To_UTF8(); Debug+="File GoTo: "; Debug +=Ztring(File_Name).To_UTF8(); Debug+=", MoveMethod="; Debug +=Ztring::ToZtring(MoveMethod).To_UTF8(); Debug+=", MaxSize="; Debug +=Ztring::ToZtring(Position_ToMove).To_UTF8())
-
- #ifdef ZENLIB_USEWX
- if (File_Handle==NULL)
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- if (File_Handle==NULL)
- #elif defined WINDOWS
- if (File_Handle==INVALID_HANDLE_VALUE)
- #endif
- #endif //ZENLIB_USEWX
- return false;
-
- Position=(int64u)-1; //Disabling memory
- #ifdef ZENLIB_USEWX
- return ((wxFile*)File_Handle)->Seek(Position, (wxSeekMode)MoveMethod)!=wxInvalidOffset; //move_t and wxSeekMode are same
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- /*
- int fromwhere;
- switch (MoveMethod)
- {
- case FromBegin : fromwhere=SEEK_SET; break;
- case FromCurrent : fromwhere=SEEK_CUR; break;
- case FromEnd : fromwhere=SEEK_END; break;
- default : fromwhere=SEEK_CUR; break;
- }
- return lseek(File_Handle, Position, fromwhere)!=-1;
- */
- ios_base::seekdir dir;
- switch (MoveMethod)
- {
- case FromBegin : dir=ios_base::beg; break;
- case FromCurrent : dir=ios_base::cur; break;
- case FromEnd : dir=ios_base::end; break;
- default : dir=ios_base::beg;
- }
- ((fstream*)File_Handle)->seekg((streamoff)Position_ToMove, dir);
- return !((fstream*)File_Handle)->fail();
- #elif defined WINDOWS
- LARGE_INTEGER GoTo;
- GoTo.QuadPart=Position_ToMove;
- BOOL i=SetFilePointerEx(File_Handle, GoTo, NULL, MoveMethod);
-
- #ifdef ZENLIB_DEBUG
- LARGE_INTEGER Temp; Temp.QuadPart=0;
- SetFilePointerEx(File_Handle, Temp, &Temp, FILE_CURRENT);
- ZENLIB_DEBUG2( "File GoTo",
- Debug+=", new position ";Debug+=Ztring::ToZtring(Temp.QuadPart).To_UTF8();Debug+=", returns ";Debug+=i?'1':'0';)
- #endif //ZENLIB_DEBUG
-
- return i?true:false;
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-int64u File::Position_Get ()
-{
- if (Position!=(int64u)-1)
- return Position;
-
- ZENLIB_DEBUG1( "File Position_Get",
- Debug+=", File_Name="; Debug+=Ztring(File_Name).To_UTF8())
-
- #ifdef ZENLIB_USEWX
- if (File_Handle==NULL)
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- if (File_Handle==NULL)
- #elif defined WINDOWS
- if (File_Handle==INVALID_HANDLE_VALUE)
- #endif
- #endif //ZENLIB_USEWX
- return (int64u)-1;
-
- #ifdef ZENLIB_USEWX
- return (int64u)-1;
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- Position=((fstream*)File_Handle)->tellg();
- return Position;
- #elif defined WINDOWS
- LARGE_INTEGER GoTo; GoTo.QuadPart=0;
- GoTo.LowPart=SetFilePointer(File_Handle, GoTo.LowPart, &GoTo.HighPart, FILE_CURRENT);
- Position=GoTo.QuadPart;
-
- ZENLIB_DEBUG2( "File GoTo",
- Debug+=", new position ";Debug+=Ztring::ToZtring(GoTo.QuadPart).To_UTF8();Debug+=", returns 1";)
-
- return Position;
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//***************************************************************************
-// Attributes
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-int64u File::Size_Get()
-{
- #ifdef ZENLIB_USEWX
- if (File_Handle==NULL)
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- if (File_Handle==NULL)
- #elif defined WINDOWS
- if (File_Handle==INVALID_HANDLE_VALUE)
- #endif
- #endif //ZENLIB_USEWX
- return 0;
-
- #ifdef ZENLIB_USEWX
- return ((wxFile*)File_Handle)->Length();
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- /*
- int CurrentPos=lseek(File_Handle, 0, SEEK_CUR);
- int64u File_Size;
- File_Size=lseek(File_Handle, 0, SEEK_END);
- lseek(File_Handle, CurrentPos, SEEK_SET);
- */
- fstream::pos_type CurrentPos=((fstream*)File_Handle)->tellg();
- if (CurrentPos!=(fstream::pos_type)-1)
- {
- ((fstream*)File_Handle)->seekg(0, ios_base::end);
- Size=((fstream*)File_Handle)->tellg();
- ((fstream*)File_Handle)->seekg(CurrentPos);
- }
- else
- Size=(int64u)-1;
- #elif defined WINDOWS
- LARGE_INTEGER x = {0};
- BOOL bRet = ::GetFileSizeEx(File_Handle, &x);
- if (bRet == FALSE)
- return (int64u)-1;
- Size=x.QuadPart;
- #endif
- return Size;
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-Ztring File::Created_Get()
-{
- #ifdef ZENLIB_USEWX
- if (File_Handle==NULL)
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- if (File_Handle==NULL)
- #elif defined WINDOWS
- if (File_Handle==INVALID_HANDLE_VALUE)
- #endif
- #endif //ZENLIB_USEWX
- return Ztring();
-
- #ifdef ZENLIB_USEWX
- return __T(""); //Not implemented
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- return __T(""); //Not implemented
- #elif defined WINDOWS
- FILETIME TimeFT;
- if (GetFileTime(File_Handle, &TimeFT, NULL, NULL))
- {
- int64u Time64=0x100000000ULL*TimeFT.dwHighDateTime+TimeFT.dwLowDateTime;
- Ztring Time; Time.Date_From_Milliseconds_1601(Time64/10000);
- return Time;
- }
- else
- return __T(""); //There was a problem
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-Ztring File::Created_Local_Get()
-{
- #ifdef ZENLIB_USEWX
- if (File_Handle==NULL)
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- if (File_Handle==NULL)
- #elif defined WINDOWS
- if (File_Handle==INVALID_HANDLE_VALUE)
- #endif
- #endif //ZENLIB_USEWX
- return Ztring();
-
- #ifdef ZENLIB_USEWX
- return __T(""); //Not implemented
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- return __T(""); //Not implemented
- #elif defined WINDOWS
- FILETIME TimeFT;
- if (GetFileTime(File_Handle, &TimeFT, NULL, NULL))
- {
- int64u Time64=0x100000000ULL*TimeFT.dwHighDateTime+TimeFT.dwLowDateTime;
- TIME_ZONE_INFORMATION Info;
- DWORD Result=GetTimeZoneInformation(&Info);
- if (Result!=TIME_ZONE_ID_INVALID)
- {
- Time64-=((int64s)Info.Bias)*60*1000*1000*10;
- if (Result==TIME_ZONE_ID_DAYLIGHT)
- Time64-=((int64s)Info.DaylightBias)*60*1000*1000*10;
- else
- Time64-=((int64s)Info.StandardBias)*60*1000*1000*10;
- }
- Ztring Time; Time.Date_From_Milliseconds_1601(Time64/10000);
- Time.FindAndReplace(__T("UTC "), __T(""));
- return Time;
- }
- else
- return __T(""); //There was a problem
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-Ztring File::Modified_Get()
-{
- #ifdef ZENLIB_USEWX
- if (File_Handle==NULL)
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- if (File_Handle==NULL)
- #elif defined WINDOWS
- if (File_Handle==INVALID_HANDLE_VALUE)
- #endif
- #endif //ZENLIB_USEWX
- return Ztring();
-
- #ifdef ZENLIB_USEWX
- return __T(""); //Not implemented
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- struct stat Stat;
- int Result=stat(File_Name.To_Local().c_str(), &Stat);
- if (Result<0)
- return __T(""); //Error
- Ztring Time; Time.Date_From_Seconds_1970((int64s)Stat.st_mtime);
- return Time;
- #elif defined WINDOWS
- FILETIME TimeFT;
- if (GetFileTime(File_Handle, NULL, NULL, &TimeFT))
- {
- int64u Time64=0x100000000ULL*TimeFT.dwHighDateTime+TimeFT.dwLowDateTime;
- Ztring Time; Time.Date_From_Milliseconds_1601(Time64/10000);
- return Time;
- }
- else
- return __T(""); //There was a problem
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-Ztring File::Modified_Local_Get()
-{
- #ifdef ZENLIB_USEWX
- if (File_Handle==NULL)
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- if (File_Handle==NULL)
- #elif defined WINDOWS
- if (File_Handle==INVALID_HANDLE_VALUE)
- #endif
- #endif //ZENLIB_USEWX
- return Ztring();
-
- #ifdef ZENLIB_USEWX
- return __T(""); //Not implemented
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- struct stat Stat;
- int Result=stat(File_Name.To_Local().c_str(), &Stat);
- if (Result<0)
- return __T(""); //Error
- Ztring Time; Time.Date_From_Seconds_1970_Local(Stat.st_mtime);
- return Time;
- #elif defined WINDOWS
- FILETIME TimeFT;
- if (GetFileTime(File_Handle, NULL, NULL, &TimeFT))
- {
- int64u Time64=0x100000000ULL*TimeFT.dwHighDateTime+TimeFT.dwLowDateTime; //100-ns
- TIME_ZONE_INFORMATION Info;
- DWORD Result=GetTimeZoneInformation(&Info);
- if (Result!=TIME_ZONE_ID_INVALID)
- {
- Time64-=((int64s)Info.Bias)*60*1000*1000*10;
- if (Result==TIME_ZONE_ID_DAYLIGHT)
- Time64-=((int64s)Info.DaylightBias)*60*1000*1000*10;
- else
- Time64-=((int64s)Info.StandardBias)*60*1000*1000*10;
- }
- Ztring Time; Time.Date_From_Milliseconds_1601(Time64/10000);
- Time.FindAndReplace(__T("UTC "), __T(""));
- return Time;
- }
- else
- return __T(""); //There was a problem
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-bool File::Opened_Get()
-{
- #ifdef ZENLIB_USEWX
- return File_Handle!=NULL;
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- //return File_Handle!=-1;
- return File_Handle!=NULL && ((fstream*)File_Handle)->is_open();
- #elif defined WINDOWS
- return File_Handle!=INVALID_HANDLE_VALUE;
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-int64u File::Size_Get(const Ztring &File_Name)
-{
- File F(File_Name);
- return F.Size_Get();
-}
-
-//---------------------------------------------------------------------------
-Ztring File::Created_Get(const Ztring &File_Name)
-{
- File F(File_Name);
- return F.Created_Get();
-}
-
-//---------------------------------------------------------------------------
-Ztring File::Modified_Get(const Ztring &File_Name)
-{
- File F(File_Name);
- return F.Modified_Get();
-}
-
-//---------------------------------------------------------------------------
-bool File::Exists(const Ztring &File_Name)
-{
- ZENLIB_DEBUG1( "File Exists",
- Debug+=", File_Name="; Debug+=Ztring(File_Name).To_UTF8())
-
- #ifdef ZENLIB_USEWX
- wxFileName FN(File_Name.c_str());
- return FN.FileExists();
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- if (File_Name.find(__T('*'))!=std::string::npos || File_Name.find(__T('?'))!=std::string::npos)
- return false;
- struct stat buffer;
- int status;
- #ifdef UNICODE
- status=stat(File_Name.To_Local().c_str(), &buffer);
- #else
- status=stat(File_Name.c_str(), &buffer);
- #endif //UNICODE
- return status==0 && S_ISREG(buffer.st_mode);
- #elif defined WINDOWS
- if (File_Name.find(__T('*'))!=std::string::npos || (File_Name.find(__T("\\\\?\\"))!=0 && File_Name.find(__T('?'))!=std::string::npos) || (File_Name.find(__T("\\\\?\\"))==0 && File_Name.find(__T('?'), 4)!=std::string::npos))
- return false;
- #ifdef UNICODE
- DWORD FileAttributes=GetFileAttributesW(File_Name.c_str());
- #else
- DWORD FileAttributes=GetFileAttributes(File_Name.c_str());
- #endif //UNICODE
-
- ZENLIB_DEBUG2( "File Exists",
- Debug+=", File_Name="; Debug+=Ztring::ToZtring(((FileAttributes!=INVALID_FILE_ATTRIBUTES) && !(FileAttributes&FILE_ATTRIBUTE_DIRECTORY))?1:0).To_UTF8())
-
- return ((FileAttributes!=INVALID_FILE_ATTRIBUTES) && !(FileAttributes&FILE_ATTRIBUTE_DIRECTORY));
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-bool File::Copy(const Ztring &Source, const Ztring &Destination, bool OverWrite)
-{
- #ifdef ZENLIB_USEWX
- return wxCopyFile(Source.c_str(), Destination.c_str(), OverWrite);
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- return false;
- #elif defined WINDOWS
- #ifdef UNICODE
- return CopyFileW(Source.c_str(), Destination.c_str(), !OverWrite)!=0;
- #else
- return CopyFile(Source.c_str(), Destination.c_str(), !OverWrite)!=0;
- #endif //UNICODE
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-bool File::Move(const Ztring &Source, const Ztring &Destination, bool OverWrite)
-{
- if (OverWrite && Exists(Source))
- Delete(Destination);
- #ifdef ZENLIB_USEWX
- if (OverWrite && Exists(Destination))
- wxRemoveFile(Destination.c_str());
- return wxRenameFile(Source.c_str(), Destination.c_str());
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- return !std::rename(Source.To_Local().c_str(), Destination.To_Local().c_str());
- #elif defined WINDOWS
- #ifdef UNICODE
- return MoveFileW(Source.c_str(), Destination.c_str())!=0;
- #else
- return MoveFile(Source.c_str(), Destination.c_str())!=0;
- #endif //UNICODE
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-bool File::Delete(const Ztring &File_Name)
-{
- #ifdef ZENLIB_USEWX
- return wxRemoveFile(File_Name.c_str());
- #else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- #ifdef UNICODE
- return unlink(File_Name.To_Local().c_str())==0;
- #else
- return unlink(File_Name.c_str())==0;
- #endif //UNICODE
- #elif defined WINDOWS
- #ifdef UNICODE
- return DeleteFileW(File_Name.c_str())!=0;
- #else
- return DeleteFile(File_Name.c_str())!=0;
- #endif //UNICODE
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//***************************************************************************
-//
-//***************************************************************************
-
-} //namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/File.h b/src/thirdparty/ZenLib/ZenLib/File.h
deleted file mode 100644
index 392e4af0e..000000000
--- a/src/thirdparty/ZenLib/ZenLib/File.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// File functions
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_FileH
-#define ZenLib_FileH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Ztring.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-/// @brief File manipulation
-//***************************************************************************
-
-class File
-{
-public :
- //---------------------------------------------------------------------------
- /// @brief Options for Open method
- enum access_t
- {
- Access_Read = 0, ///< Read permission
- Access_Write = 1, ///< Write permission
- Access_Read_Write = 2, ///< Read and Write permissions
- Access_Write_Append = 3, ///< Write permission without deleting old file
- Access_Write_Excluding = 4 ///< Write permission preventing reading
- };
-
- //---------------------------------------------------------------------------
- /// @brief Options for Move method
- enum move_t
- {
- FromBegin = 0, ///< Begin of file
- FromCurrent = 1, ///< Current position
- FromEnd = 2 ///< End of file
- };
-
- //Constructor/Destructor
- File ();
- File (ZenLib::Ztring File_Name, access_t Access=Access_Read);
- ~File ();
-
- //Open/close
- bool Open (const tstring &File_Name, access_t Access=Access_Read);
- bool Create(const ZenLib::Ztring &File_Name, bool OverWrite=true);
- void Close ();
-
- //Read/Write
- size_t Read (int8u* Buffer, size_t Buffer_Size);
- size_t Write (const int8u* Buffer, size_t Buffer_Size);
- size_t Write (const Ztring &ToWrite);
- bool Truncate (int64u Offset=(int64u)-1);
-
- //Moving
- bool GoTo (int64s Position, move_t MoveMethod=FromBegin);
- int64u Position_Get ();
-
- //Attributes
- int64u Size_Get();
- Ztring Created_Get();
- Ztring Created_Local_Get();
- Ztring Modified_Get();
- Ztring Modified_Local_Get();
- bool Opened_Get();
-
- //Helpers
- static int64u Size_Get(const Ztring &File_Name);
- static Ztring Created_Get(const Ztring &File_Name);
- static Ztring Modified_Get(const Ztring &File_Name);
- static bool Exists(const Ztring &File_Name);
- static bool Copy(const Ztring &Source, const Ztring &Destination, bool OverWrite=false);
- static bool Move(const Ztring &Source, const Ztring &Destination, bool OverWrite=false);
- static bool Delete(const Ztring &File_Name);
-
- //Temp
- Ztring File_Name;
- int64u Position; //Position is saved, may be not good because position may change
- int64u Size; //Size is saved, may be not good because size may change
- void* File_Handle;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/FileName.cpp b/src/thirdparty/ZenLib/ZenLib/FileName.cpp
deleted file mode 100644
index d26784cac..000000000
--- a/src/thirdparty/ZenLib/ZenLib/FileName.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/FileName.h"
-#ifdef ZENLIB_USEWX
- #include <wx/filename.h>
-#else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- #undef WINDOWS
- #endif
- #ifdef WINDOWS
- #undef __TEXT
- #include <windows.h>
- #endif
-#endif //ZENLIB_USEWX
-//---------------------------------------------------------------------------
-#undef ZENLIB_USEWX
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// Read/Write
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Ztring FileName::Path_Get() const
-{
- #ifdef ZENLIB_USEWX
- wxFileName FN(c_str());
- return FN.GetPath().c_str();
- #else //ZENLIB_USEWX
- //Path limit
- size_t Pos_Path=rfind(FileName_PathSeparator);
- if (Pos_Path==Ztring::npos)
- return Ztring(); //Not found
- else
- return Ztring(*this, 0, Pos_Path);
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-Ztring& FileName::Path_Set(const Ztring &Path)
-{
- #ifdef ZENLIB_USEWX
- wxFileName FN(c_str());
- FN.SetPath(Path.c_str());
- assign (FN.GetFullPath().c_str());
- #else //ZENLIB_USEWX
- #ifdef WINDOWS
- //Path limit
- size_t Pos_Path=rfind(__T('\\'));
- if (Pos_Path==Ztring::npos)
- {
- insert(0, 1, __T('\\')); //Not found
- Pos_Path=0;
- }
- replace(0, Pos_Path, Path, 0, Ztring::npos);
- #else
- //Not supported
- #endif
- #endif //ZENLIB_USEWX
- return *this;
-}
-
-//---------------------------------------------------------------------------
-Ztring FileName::Name_Get() const
-{
- #ifdef ZENLIB_USEWX
- wxFileName FN(c_str());
- if (FN==FN.GetName()) //Bug of WxWidgets? if C:\\dir\\(no name), name is C:\\dir\\(no name)
- return Ztring();
- return FN.GetName().c_str();
- #else //ZENLIB_USEWX
- size_t Pos_Path=rfind(FileName_PathSeparator); //Path limit
- if (Pos_Path==Ztring::npos)
- Pos_Path=0; //Not found
- else
- Pos_Path+=Ztring(FileName_PathSeparator).size(); //Path separator size
- //Extension limit
- size_t Pos_Ext=rfind(__T('.'));
- if (Pos_Ext==Ztring::npos || Pos_Ext<Pos_Path)
- Pos_Ext=size(); //Not found
- return Ztring(*this, Pos_Path, Pos_Ext-Pos_Path);
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-Ztring& FileName::Name_Set(const Ztring &Name)
-{
- #ifdef ZENLIB_USEWX
- wxFileName FN(c_str());
- if (FN==FN.GetName()) //Bug of WxWidgets? if C:\\dir\\(no name), name is C:\\dir\\(no name)
- FN.SetPath(c_str());
- FN.SetName(Name.c_str());
- assign ((FN.GetFullPath()+FN.GetPathSeparator()/*FileName_PathSeparator*/+FN.GetFullName()).c_str());
- #else //ZENLIB_USEWX
- #ifdef WINDOWS
- //Path limit
- size_t Pos_Path=rfind(__T('\\'));
- if (Pos_Path==Ztring::npos)
- Pos_Path=0; //Not found
- //Extension limit
- size_t Pos_Ext=rfind(__T('.'));
- if (Pos_Ext==Ztring::npos || Pos_Ext<Pos_Path)
- Pos_Ext=size(); //Not found
- replace(Pos_Path+1, Pos_Ext-Pos_Path-1, Name, 0, Ztring::npos);
- #else
- //Not supported
- #endif
- #endif //ZENLIB_USEWX
- return *this;
-}
-
-//---------------------------------------------------------------------------
-Ztring FileName::Extension_Get() const
-{
- #ifdef ZENLIB_USEWX
- wxFileName FN(c_str());
- return FN.GetExt().c_str();
- #else //ZENLIB_USEWX
- //Path limit
- size_t Pos_Path=rfind(FileName_PathSeparator);
- if (Pos_Path==Ztring::npos)
- Pos_Path=0; //Not found
- //Extension limit
- size_t Pos_Ext=rfind(__T('.'));
- if (Pos_Ext==Ztring::npos || Pos_Ext<Pos_Path)
- return Ztring(); //Not found
- else
- return Ztring(*this, Pos_Ext+1, size()-Pos_Ext-1);
- #endif //ZENLIB_USEWX
-}
-
-//---------------------------------------------------------------------------
-Ztring& FileName::Extension_Set(const Ztring &Extension)
-{
- #ifdef ZENLIB_USEWX
- wxFileName FN(c_str());
- FN.SetExt(Extension.c_str());
- assign (FN.GetFullPath().c_str());
- #else //ZENLIB_USEWX
- #ifdef WINDOWS
- //Path limit
- size_t Pos_Path=rfind(__T('\\'));
- if (Pos_Path==Ztring::npos)
- Pos_Path=0; //Not found
- //Extension limit
- size_t Pos_Ext=rfind(__T('.'));
- if (Pos_Ext==Ztring::npos || Pos_Ext<Pos_Path)
- {
- append(1, __T('.')); //Not found
- Pos_Ext=size()-1;
- }
- replace(Pos_Ext+1, size()-Pos_Ext-1, Extension, 0, Ztring::npos);
- #else
- //Not supported
- #endif
- #endif //ZENLIB_USEWX
- return *this;
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Ztring FileName::TempFileName_Create(const Ztring &Prefix)
-{
- #ifdef ZENLIB_USEWX
- return wxFileName::CreateTempFileName(Prefix.c_str()).c_str();
- #else //ZENLIB_USEWX
- #ifdef WINDOWS
- Char Path[MAX_PATH+1];
- if (!GetTempPath(MAX_PATH, Path))
- return Ztring(); //Problem while getting a temp path
-
- Char FileName[MAX_PATH+1];
- if (!GetTempFileName(Path, Prefix.c_str(), 0, FileName))
- return Ztring(); //Problem while getting a file name
-
- return Ztring(FileName);
- #else
- return __T("C:\\xxx.txt");
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//***************************************************************************
-// Platform differences
-//***************************************************************************
-
-//End of line
-#ifdef __WINDOWS__
- const Char* FileName_PathSeparator=__T("\\");
-#endif
-#if defined(UNIX) || defined(MACOS) || defined(MACOSX)
- const Char* FileName_PathSeparator=__T("/");
-#endif
-
-} //namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/FileName.h b/src/thirdparty/ZenLib/ZenLib/FileName.h
deleted file mode 100644
index 4a55626a4..000000000
--- a/src/thirdparty/ZenLib/ZenLib/FileName.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// File name related functions
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_FileNameH
-#define ZenLib_FileNameH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Ztring.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-/// @brief File name manipulation
-//***************************************************************************
-
-class FileName : public ZenLib::Ztring
-{
-public :
- //Constructor/Destructor
- FileName () : Ztring(){};
- FileName (const tstring& str) : Ztring(str){};
- FileName (const tstring& str, size_type pos, size_type n=npos) : Ztring(str, pos, n){};
- FileName (const Char* s, size_type n) : Ztring(s, n){};
- FileName (const Char* s) : Ztring(s){};
- FileName (size_type n, char c) : Ztring(n, c){};
-
- //Read/Write
- ZenLib::Ztring Path_Get () const;
- ZenLib::Ztring Name_Get () const;
- ZenLib::Ztring Extension_Get () const;
- ZenLib::Ztring& Path_Set (const Ztring &Path);
- ZenLib::Ztring& Name_Set (const Ztring &Name);
- ZenLib::Ztring& Extension_Set (const Ztring &Extension);
-
- //Helpers
- static ZenLib::Ztring Path_Get (const Ztring &File_Name) {return ((FileName&)File_Name).Path_Get();};
- static ZenLib::Ztring Name_Get (const Ztring &File_Name) {return ((FileName&)File_Name).Name_Get();};
- static ZenLib::Ztring Extension_Get (const Ztring &File_Name) {return ((FileName&)File_Name).Extension_Get();};
- static ZenLib::Ztring TempFileName_Create (const Ztring &Prefix);
-};
-
-//Platform differences
-extern const Char* FileName_PathSeparator;
-
-} //NameSpace
-
-//---------------------------------------------------------------------------
-#ifdef __BORLANDC__
- #pragma warn .8027
-#endif
-//---------------------------------------------------------------------------
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Handler.cpp b/src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Handler.cpp
deleted file mode 100644
index 4064f4be1..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Handler.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Format/Html/Html_Handler.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-namespace Format
-{
-
-namespace Html
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Handler::Handler()
-{
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-void Handler::CleanUp()
-{
-}
-
-} //Namespace
-
-} //Namespace
-
-} //Namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Handler.h b/src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Handler.h
deleted file mode 100644
index 0bdbb7ae2..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Handler.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// A HTML Handler
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_Server_Html_HandlerH
-#define ZenLib_Server_Html_HandlerH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include <ctime>
-#include <map>
-#include <vector>
-#include "ZenLib/Ztring.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-namespace Format
-{
-
-namespace Html
-{
-
-//***************************************************************************
-/// @brief
-//***************************************************************************
-
-struct header
-{
- //In
- Ztring Title;
- Ztring Language;
-
- //Init
- header()
- {
- }
-};
-
-class Handler
-{
-public:
- //Constructor/Destructor
- Handler();
-
- //Maintenance
- void CleanUp();
-
- //The data
- header Header;
-};
-
-} //Namespace
-
-} //Namespace
-
-} //Namespace
-
-#define ENDL "\r\n"
-#define HTML_ENDL "<br />\r\n"
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Request.cpp b/src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Request.cpp
deleted file mode 100644
index db4d1f24b..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Request.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Format/Html/Html_Request.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-namespace Format
-{
-
-namespace Html
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Request::Request()
-{
- //Config
- Html=new ZenLib::Format::Html::Handler;
- IsCopy=false;
-}
-
-//---------------------------------------------------------------------------
-Request::Request(const Request &Req)
-{
- //Config
- Html=Req.Html;
- IsCopy=true;
-}
-
-//---------------------------------------------------------------------------
-Request::~Request()
-{
- //Config
- if (!IsCopy)
- delete Html; //Html=NULL
-}
-
-} //Namespace
-
-} //Namespace
-
-} //Namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Request.h b/src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Request.h
deleted file mode 100644
index f94b94888..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Format/Html/Html_Request.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// A HTML Request
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_Server_Html_RequestH
-#define ZenLib_Server_Html_RequestH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Format/Html/Html_Handler.h"
-#include <ctime>
-//---------------------------------------------------------------------------
-
-
-namespace ZenLib
-{
-
-namespace Format
-{
-
-namespace Html
-{
-
-//***************************************************************************
-/// @brief
-//***************************************************************************
-
-class Request
-{
-public:
- //Constructor/Destructor
- Request();
- Request(const Request &Req);
- ~Request();
-
- //The data
- ZenLib::Format::Html::Handler *Html;
- bool IsCopy;
-};
-
-} //Namespace
-
-} //Namespace
-
-} //Namespace
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Cookies.cpp b/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Cookies.cpp
deleted file mode 100644
index 1345aa0ab..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Cookies.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Format/Http/Http_Cookies.h"
-#include "ZenLib/Format/Http/Http_Utils.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-namespace Format
-{
-
-namespace Http
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Cookies::Cookies()
-{
-}
-
-//***************************************************************************
-// Helpers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-size_t Cookies::Set(const std::string &Name, const std::string &Value, std::time_t Expires, const std::string &Path, const std::string &Domain, bool Secure)
-{
- //Name must not be empty
- if (Name.empty())
- return 1;
-
- //Default values handling
- if (Value.empty())
- Expires=time(NULL)-365*24*60*60-1; //minus 1 year
-
- //Default value
- if (Expires==(time_t)-1)
- Expires=time(NULL)+1*365*24*60*60; //+1 year
-
- //Expires can be the count of seconds to handle instead of real time
- if (Expires>=0 && Expires<3*365*24*60*60) //Les than year 1973, this is not a date, this is a time
- Expires+=time(NULL);
-
- //Registering
- Cookie Data;
- Data.Value=Value.empty()?std::string("Deleted"):URL_Encoded_Encode(Value); //If no value, we force a default value for having the cookie understable
- Data.Expires=Expires;
- Data.Path=URL_Encoded_Encode(Path.empty()?string("/"):Path);
- Data.Domain=URL_Encoded_Encode(Domain);
- Data.Secure=Secure;
- (*this)[URL_Encoded_Encode(Name)]=Data;
-
- return 0;
-}
-
-//---------------------------------------------------------------------------
-void Cookies::Create_Lines(std::ostream& Out)
-{
- for (Cookies::iterator Cookie=begin(); Cookie!=end(); ++Cookie)
- {
- Out << "Set-Cookie: " << Cookie->first << "=" << Cookie->second.Value;
- if (Cookie->second.Expires!=(time_t)-1)
- {
- char Temp[200];
- if (strftime(Temp, 200, "%a, %d-%b-%Y %H:%M:%S GMT", gmtime(&Cookie->second.Expires)))
- Out << "; expires=" << Temp;
- }
- if (!Cookie->second.Path.empty())
- {
- Out << "; path=" << Cookie->second.Path;
- }
- Out << "\r\n";
- }
-}
-
-} //Namespace
-
-} //Namespace
-
-} //Namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Cookies.h b/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Cookies.h
deleted file mode 100644
index 5c59ae282..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Cookies.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Cookies handling
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_Format_Http_CookiesH
-#define ZenLib_Format_Http_CookiesH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include <string>
-#include <ctime>
-#include <map>
-#include <sstream>
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-namespace Format
-{
-
-namespace Http
-{
-
-//***************************************************************************
-/// @brief
-//***************************************************************************
-
-struct Cookie
-{
- std::string Value;
- std::time_t Expires;
- std::string Path;
- std::string Domain;
- bool Secure;
-
- Cookie()
- {
- Expires=0;
- Secure=false;
- }
-};
-
-extern std::string EmptyString; //Must not change
-
-class Cookies : public std::map<std::string, Cookie>
-{
-public :
- //Constructor/Destructor
- Cookies();
-
- //Helpers
- size_t Set(const std::string &Name, const std::string &Value=EmptyString, std::time_t Expires=(std::time_t)-1, const std::string &Path=EmptyString, const std::string &Domain=EmptyString, bool Secure=false);
- Cookie &Get(const std::string &Name);
- void Create_Lines(std::ostream& Out);
-};
-
-} //Namespace
-
-} //Namespace
-
-} //Namespace
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Handler.cpp b/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Handler.cpp
deleted file mode 100644
index 8e7963aa4..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Handler.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Format/Http/Http_Handler.h"
-#include "ZenLib/Ztring.h"
-#include <sstream>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-namespace Format
-{
-
-namespace Http
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Handler::Handler()
-{
- //In
- Foreign_Port=0;
- Local_Port=0;
- HeadersOnly=false;
-
- //Out
- Response_HTTP_Code=200;
-}
-
-} //Namespace
-
-} //Namespace
-
-} //Namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Handler.h b/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Handler.h
deleted file mode 100644
index 1ea484d27..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Handler.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// A HTTP Request
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_Format_Http_RequestH
-#define ZenLib_Format_Http_RequestH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Format/Http/Http_Cookies.h"
-#include <string>
-#include <ctime>
-#include <map>
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-namespace Format
-{
-
-namespace Http
-{
-
-//***************************************************************************
-/// @brief
-//***************************************************************************
-
-class Handler
-{
-public:
- //Constructor/Destructor
- Handler();
-
- //In
- std::string Path; //The path being requested by this request
- std::map<std::string, std::string> Request_Headers; //All the incoming HTTP headers from the client web browser.
- std::map<std::string, std::string> Request_Cookies; //The set of cookies that came from the client along with this request
- std::map<std::string, std::string> Request_Queries; //All the key/value pairs in the query string of this request
- std::string Foreign_IP; //The foreign ip address for this request
- std::string Local_IP; //The foreign port number for this request
- unsigned short Foreign_Port; //The IP of the local interface this request is coming in on
- unsigned short Local_Port; //The local port number this request is coming in on
- bool HeadersOnly; //The request requests only the header
-
- //Out
- size_t Response_HTTP_Code; //HTTP code to be sent
- std::map<std::string, std::string> Response_Headers; //Additional headers you wish to appear in the HTTP response to this request
- Cookies Response_Cookies; //New cookies to pass back to the client along with the result of this request
- std::string Response_Body; //To be displayed as the response to this request
-};
-
-} //Namespace
-
-} //Namespace
-
-} //Namespace
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Request.cpp b/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Request.cpp
deleted file mode 100644
index 4d7994fb2..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Request.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Format/Http/Http_Request.h"
-#include "ZenLib/Format/Http/Http_Utils.h"
-#include "ZenLib/Ztring.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-namespace Format
-{
-
-namespace Http
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Request::Request()
-{
- //Config
- Http=new ZenLib::Format::Http::Handler;
- IsCopy=false;
-}
-
-//---------------------------------------------------------------------------
-Request::Request(const Request &Req)
-{
- //Config
- Http=Req.Http;
- IsCopy=true;
-}
-
-//---------------------------------------------------------------------------
-Request::~Request()
-{
- //Config
- if (!IsCopy)
- delete Http; //Http=NULL
-}
-
-//***************************************************************************
-//
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool Request::Http_Begin(std::istream &In, std::ostream &Out)
-{
- //First line, "Method Path Norm"
- //-Method
- string Method;
- In>>Method;
- if (Method.size()==3 && Method[0]=='G' && Method[1]=='E' && Method[2]=='T')
- ;
- else if (Method.size()==4 && Method[0]=='P' && Method[1]=='O' && Method[2]=='S' && Method[3]=='T')
- ;
- else if (Method.size()==4 && Method[0]=='H' && Method[1]=='E' && Method[2]=='A' && Method[3]=='D')
- Http->HeadersOnly=true;
- else
- {
- Out << "HTTP/1.0 501\r\n";
- Out << "\r\n";
- return false; //Unknown request
- }
- //-Path
- In>>Http->Path;
- if (Http->Path.empty() || Http->Path[0]!='/')
- {
- Out << "HTTP/1.0 404\r\n";
- Out << "\r\n";
- return false; //Problem
- }
- if (Http->Path.size()>8096) //Browsers/Servers have a 2K-8K limit, we do same
- {
- Out << "HTTP/1.0 414\r\n";
- Out << "\r\n";
- return false; //Problem
- }
- if (Http->Path.find("%")!=string::npos)
- Http->Path=Format::Http::URL_Encoded_Decode(Http->Path);
- //-Norm
- string Line;
- getline(In, Line); //Drop the first line, no more needed
-
- //Headers
- do
- {
- //Getting the line
- getline(In, Line);
- if (!Line.empty() && Line[Line.size()-1]=='\r')
- Line.resize(Line.size()-1); //Remove the \r
-
- //Processing the line, form is "aaa: bbb"
- if (!Line.empty())
- {
- string::size_type Separator_Pos=Line.find(':');
- string::size_type Content_Begin=Line.find_first_not_of(' ', Separator_Pos+1);
- if (Separator_Pos!=string::npos && Content_Begin!=string::npos)
- {
- string Command=Line.substr(0, Separator_Pos);
- if (Command=="Cookie")
- {
- string Cookie=Line.substr(Separator_Pos+1, string::npos);
- while (!Cookie.empty())
- {
- string::size_type Cookie_Pos=Cookie.rfind(';');
- if (Cookie_Pos==string::npos)
- Cookie_Pos=(string::size_type)-1;
- string Line2=Cookie.substr(Cookie_Pos+1, string::npos);
- TrimLeft(Line2, ' ');
- if (Cookie_Pos!=(string::size_type)-1)
- {
- Cookie.resize(Cookie_Pos);
- TrimLeft(Line2, ' ');
- }
- else
- Cookie.clear();
-
- string::size_type Separator_Pos2=Line2.find('=');
- if (Separator_Pos2!=string::npos)
- Http->Request_Cookies[Line2.substr(0, Separator_Pos2)]=Format::Http::URL_Encoded_Decode(Line2.substr(Separator_Pos2+1, string::npos));
- }
- }
- else
- Http->Request_Headers[Command]=Line.substr(Content_Begin, string::npos);
- }
- }
- }
- while (!Line.empty());
-
- //Info
- if ((Method.size()==3 && Method[0]=='G' && Method[1]=='E' && Method[2]=='T')
- || (Method.size()==4 && Method[0]=='P' && Method[1]=='O' && Method[2]=='S' && Method[3]=='T'))
- {
- do
- {
- string Content;
-
- //Getting the line
- string::size_type Interogation_Pos=Http->Path.find('?');
- if (Interogation_Pos!=string::npos)
- {
- Content=Http->Path.substr(Interogation_Pos+1, string::npos);
- Http->Path.resize(Interogation_Pos);
- }
-
- if (Method.size()==4) //Only for POST
- {
- int64u Content_Lengh=0;
- std::map<std::string, std::string>::iterator Header_Content_Lengh_Element=Http->Request_Headers.find("Content-Length");
- if (Header_Content_Lengh_Element==Http->Request_Headers.end())
- Header_Content_Lengh_Element=Http->Request_Headers.find("Content-length");
- if (Header_Content_Lengh_Element!=Http->Request_Headers.end())
- #ifdef UNICODE
- Content_Lengh=Ztring().From_UTF8(Header_Content_Lengh_Element->second).To_int64u();
- #else
- Content_Lengh=Ztring(Header_Content_Lengh_Element->second).To_int64u();
- #endif
- if (Content_Lengh>1024) //Verifying there is no big element
- {
- Out << "HTTP/1.0 501\r\n";
- Out << "\r\n";
- return false; //Malformed request
- }
-
- size_t Content_Size_Current=Content.size();
- if (Content_Size_Current)
- {
- Content+='&';
- Content_Size_Current++;
- }
- Content.resize(Content_Size_Current+(size_t)Content_Lengh+1);
- In.read(&Content[Content_Size_Current], (streamsize)Content_Lengh);
- Content[Content_Size_Current+(size_t)Content_Lengh]='\0';
- }
-
- //Processing the line, form is "aaa=bbb&..."
- while (!Content.empty())
- {
- string::size_type Content_Pos=Content.rfind('&');
- if (Content_Pos==string::npos)
- Content_Pos=(string::size_type)-1;
- std::string Line2=Content.substr(Content_Pos+1, string::npos);
- if (Content_Pos!=(string::size_type)-1)
- Content.resize(Content_Pos);
- else
- Content.clear();
-
- string::size_type Separator_Pos=Line2.find('=');
- if (Separator_Pos!=string::npos)
- Http->Request_Queries[Line2.substr(0, Separator_Pos)]=Format::Http::URL_Encoded_Decode(Line2.substr(Separator_Pos+1, string::npos));
- }
- }
- while (!Line.empty());
- }
-
- return true;
-}
-
-void Request::Http_End(std::ostream &Out)
-{
- Out << "HTTP/1.0 "<< Http->Response_HTTP_Code << "\r\n";
- for (std::map<std::string, std::string>::iterator Temp=Http->Response_Headers.begin(); Temp!=Http->Response_Headers.end(); ++Temp)
- Out << Temp->first << ": " << Temp->second << "\r\n";
- Http->Response_Cookies.Create_Lines(Out);
- std::map<std::string, std::string>::iterator Content_Type_Element=Http->Response_Headers.find("Content-Type");
- if (Content_Type_Element!=Http->Response_Headers.end())
- Out << "Content-Type: "<< Content_Type_Element->second << "\r\n";
- else if (Http->Response_HTTP_Code==200)
- {
- if (!Http->Response_Body.empty() && Http->Response_Body[0]=='<')
- Out << "Content-Type: "<< "text/html; charset=utf-8" << "\r\n";
- }
- if (!Http->Response_Body.empty())
- Out << "Content-Length: " << Http->Response_Body.size() << "\r\n";
- Out << "\r\n";
- if (!Http->HeadersOnly && !Http->Response_Body.empty())
- Out << Http->Response_Body.c_str();
-}
-
-} //Namespace
-
-} //Namespace
-
-} //Namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Request.h b/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Request.h
deleted file mode 100644
index 73d9933b7..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Request.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// A HTTP Request
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_Server_Http_RequestH
-#define ZenLib_Server_Http_RequestH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Format/Http/Http_Handler.h"
-#include <string>
-#include <ctime>
-#include <map>
-#include <vector>
-//---------------------------------------------------------------------------
-
-
-namespace ZenLib
-{
-
-namespace Format
-{
-
-namespace Http
-{
-
-//***************************************************************************
-/// @brief
-//***************************************************************************
-
-class Request
-{
-public:
- //Constructor/Destructor
- Request();
- Request(const Request &Req);
- ~Request();
-
- //The data
- ZenLib::Format::Http::Handler *Http;
- bool IsCopy;
-
- //Helpers
- bool Http_Begin(std::istream &In, std::ostream &Out);
- void Http_End (std::ostream &Out);
-};
-
-} //Namespace
-
-} //Namespace
-
-} //Namespace
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Utils.cpp b/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Utils.cpp
deleted file mode 100644
index 773dc1c63..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Utils.cpp
+++ /dev/null
@@ -1,241 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Format/Http/Http_Utils.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-namespace Format
-{
-
-namespace Http
-{
-
-//***************************************************************************
-// Global variables
-//***************************************************************************
-
-std::string EmptyString;
-
-//***************************************************************************
-// Character manipulation
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-unsigned char Char2Hex (unsigned char Char)
-{
- if (Char<='9' && Char>='0')
- Char-='0';
- else if (Char<='f' && Char>='a')
- Char-='a'-10;
- else if (Char<='F' && Char>='A')
- Char-='A'-10;
- else
- Char =0;
- return Char;
-}
-
-//---------------------------------------------------------------------------
-wchar_t Char2Hex (wchar_t Char)
-{
- if (Char<='9' && Char>='0')
- Char-='0';
- else if (Char<='f' && Char>='a')
- Char-='a'-10;
- else if (Char<='F' && Char>='A')
- Char-='A'-10;
- else
- Char =0;
- return Char;
-}
-
-//---------------------------------------------------------------------------
-string Hex2Char (unsigned char Char)
-{
- string Result;
- Result+=(char)((Char/16>=10?'a'-10:'0')+Char/16);
- Result+=(char)((Char%16>=10?'a'-10:'0')+Char%16);
- return Result;
-}
-
-//---------------------------------------------------------------------------
-#ifndef WSTRING_MISSING
-wstring Hex2Char (wchar_t Char)
-{
- wstring Result;
- Result+=(Char/16>=10?'a'-10:'0')+Char/16;
- Result+=(Char%16>=10?'a'-10:'0')+Char%16;
- return Result;
-}
-#endif //WSTRING_MISSING
-
-//***************************************************************************
-// URL manipulation
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-std::string URL_Encoded_Encode (const std::string& URL)
-{
- string Result;
- string::size_type Pos;
- for (Pos=0; Pos<URL.size(); Pos++)
- {
- if ((URL[Pos]>='\x00' && URL[Pos]<='\x20')
- || URL[Pos]=='\x7F'
- || URL[Pos]==' '
- || URL[Pos]=='<'
- || URL[Pos]=='>'
- || URL[Pos]=='#'
- || URL[Pos]=='%'
- || URL[Pos]=='\"'
- || URL[Pos]=='{'
- || URL[Pos]=='}'
- || URL[Pos]=='|'
- || URL[Pos]=='\\'
- || URL[Pos]=='^'
- || URL[Pos]=='['
- || URL[Pos]==']'
- || URL[Pos]=='`'
- /*|| URL[Pos]==';'
- || URL[Pos]=='/'
- || URL[Pos]=='?'
- || URL[Pos]==':'
- || URL[Pos]=='@'
- || URL[Pos]=='&'
- || URL[Pos]=='='
- || URL[Pos]=='+'
- || URL[Pos]=='$'
- || URL[Pos]==','*/)
- Result+='%'+Hex2Char((unsigned char)URL[Pos]);
- else
- Result+=URL[Pos];
- }
- return Result;
-}
-
-//---------------------------------------------------------------------------
-#ifndef WSTRING_MISSING
-std::wstring URL_Encoded_Encode (const std::wstring& URL)
-{
- wstring Result;
- wstring::size_type Pos;
- for (Pos=0; Pos<URL.size(); Pos++)
- {
- if (URL[Pos]<=L'\x20'
- || URL[Pos]==L'\x7F'
- || URL[Pos]==L' '
- || URL[Pos]==L'<'
- || URL[Pos]==L'>'
- || URL[Pos]==L'#'
- || URL[Pos]==L'%'
- || URL[Pos]==L'\"'
- || URL[Pos]==L'{'
- || URL[Pos]==L'}'
- || URL[Pos]==L'|'
- || URL[Pos]==L'\\'
- || URL[Pos]==L'^'
- || URL[Pos]==L'['
- || URL[Pos]==L']'
- || URL[Pos]==L'`'
- /*|| URL[Pos]==L';'
- || URL[Pos]==L'/'
- || URL[Pos]==L'?'
- || URL[Pos]==L':'
- || URL[Pos]==L'@'
- || URL[Pos]==L'&'
- || URL[Pos]==L'=L'
- || URL[Pos]==L'+'
- || URL[Pos]==L'$'
- || URL[Pos]==L','*/)
- Result+=L'%'+Hex2Char(URL[Pos]);
- else
- Result+=URL[Pos];
- }
- return Result;
-}
-#endif //WSTRING_MISSING
-
-//---------------------------------------------------------------------------
-std::string URL_Encoded_Decode (const std::string& URL)
-{
- string Result;
- string::size_type Pos;
- for (Pos=0; Pos<URL.size(); Pos++)
- {
- if (URL[Pos]=='%' && Pos+2<URL.size()) //At least 3 chars
- {
- const unsigned char Char1 = Char2Hex((unsigned char)URL[Pos+1]);
- const unsigned char Char2 = Char2Hex((unsigned char)URL[Pos+2]);
- const unsigned char Char = (Char1<<4) | Char2;
- Result+=Char;
- Pos+=2; //3 chars are used
- }
- else if (URL[Pos]=='+')
- Result+=' ';
- else
- Result+=URL[Pos];
- }
- return Result;
-}
-
-//---------------------------------------------------------------------------
-#ifndef WSTRING_MISSING
-std::wstring URL_Encoded_Decode (const std::wstring& URL)
-{
- wstring Result;
- wstring::size_type Pos;
- for (Pos=0; Pos<URL.size(); Pos++)
- {
- if (URL[Pos]==L'%' && Pos+2<URL.size()) //At least 3 chars
- {
- const wchar_t Char1 = Char2Hex(URL[Pos+1]);
- const wchar_t Char2 = Char2Hex(URL[Pos+2]);
- const wchar_t Char = (Char1<<4) | Char2;
- Result+=Char;
- Pos+=2; //3 chars are used
- }
- else if (URL[Pos]==L'+')
- Result+=L' ';
- else
- Result+=URL[Pos];
- }
- return Result;
-}
-#endif //WSTRING_MISSING
-
-//***************************************************************************
-// Cleanup
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void TrimLeft (std::string& String, char ToTrim)
-{
- string::size_type First=0;
- while (String.operator[](First)==ToTrim)
- First++;
- String.assign (String.c_str()+First);
-}
-
-} //Namespace
-
-} //Namespace
-
-} //Namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Utils.h b/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Utils.h
deleted file mode 100644
index be0614eed..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Format/Http/Http_Utils.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// HTTP utils
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_Server_Http_UtilsH
-#define ZenLib_Server_Http_UtilsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include <string>
-#include <ctime>
-#include <map>
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-namespace Format
-{
-
-namespace Http
-{
-
-//***************************************************************************
-//
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Character manipulation
-unsigned char Char2Hex (unsigned char Char);
-wchar_t Char2Hex (wchar_t Char);
-std::string Hex2Char (unsigned char Char);
-#ifndef WSTRING_MISSING
-std::wstring Hex2Char (wchar_t Char);
-#endif //WSTRING_MISSING
-
-//---------------------------------------------------------------------------
-// URL manipulation
-std::string URL_Encoded_Encode (const std::string& URL);
-#ifndef WSTRING_MISSING
-std::wstring URL_Encoded_Encode (const std::wstring& URL);
-#endif //WSTRING_MISSING
-std::string URL_Encoded_Decode (const std::string& URL);
-#ifndef WSTRING_MISSING
-std::wstring URL_Encoded_Decode (const std::wstring& URL);
-#endif //WSTRING_MISSING
-
-//---------------------------------------------------------------------------
-// Cleanup
-void TrimLeft (std::string& String, char ToTrim);
-
-} //Namespace
-
-} //Namespace
-
-} //Namespace
-
-#endif //ZENLIB_SERVER_HTTP_UTILS
diff --git a/src/thirdparty/ZenLib/ZenLib/HTTP_Client.cpp b/src/thirdparty/ZenLib/ZenLib/HTTP_Client.cpp
deleted file mode 100644
index 2dabfe8a5..000000000
--- a/src/thirdparty/ZenLib/ZenLib/HTTP_Client.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/HTTP_Client.h"
-#ifdef WINDOWS
- #undef __TEXT
- #include <windows.h>
-#endif //WINDOWS
-#include "ZenLib/HTTP_Client/HTTPClient.h"
-using namespace ZenLib;
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-HTTP_Client::HTTP_Client ()
-{
- #ifdef WINDOWS
- WSADATA WsaData;
- WSAStartup(MAKEWORD(1, 2), &WsaData);
- #endif
- Handle=0;
-}
-
-//---------------------------------------------------------------------------
-HTTP_Client::~HTTP_Client ()
-{
- #ifdef WINDOWS
- WSACleanup();
- #endif
-}
-
-//***************************************************************************
-// Open/Close
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-int HTTP_Client::Open (Ztring Url)
-{
- if (Handle)
- Close();
-
- //init
- Handle=HTTPClientOpenRequest(0);
-
- //Mehtod
- if (HTTPClientSetVerb(Handle, VerbGet)!=0)
- {
- Close();
- return 0;
- }
-
- //Send request
- if (HTTPClientSendRequest(Handle, (char*)(Url.To_Local().c_str()), NULL, 0, FALSE, 0, 0)!=0)
- {
- Close();
- return 0;
- }
-
- //Receive response
- if (HTTPClientRecvResponse(Handle, 3)!=0)
- {
- Close();
- return 0;
- }
-
- return 1;
-}
-
-//---------------------------------------------------------------------------
-void HTTP_Client::Close ()
-{
- HTTPClientCloseRequest(&Handle);
- Handle=0;
-}
-
-//***************************************************************************
-// Read
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Ztring HTTP_Client::Read ()
-{
- if (Handle==0)
- return Ztring();
-
- char* Buffer=new char[16384];
- int32u Size=0;
-
- int32u ReturnValue=HTTPClientReadData(Handle, Buffer, 16384, 0, &Size);
- if (ReturnValue!=0 && ReturnValue!=1000) //End of stream
- {
- Close();
- delete[] Buffer;
- return Ztring();
- }
-
- Ztring ToReturn; ToReturn.From_Local(Buffer, Size);
- delete[] Buffer;
- return ToReturn;
-}
-
-} //namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/HTTP_Client.h b/src/thirdparty/ZenLib/ZenLib/HTTP_Client.h
deleted file mode 100644
index 7a5dc033b..000000000
--- a/src/thirdparty/ZenLib/ZenLib/HTTP_Client.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Basic HTTP client
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_HTTPClientH
-#define ZenLib_HTTPClientH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Ztring.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-/// @brief Basic HTTP client
-//***************************************************************************
-
-class HTTP_Client
-{
-public :
- //Constructor/Destructor
- HTTP_Client ();
- ~HTTP_Client ();
-
- //Open/Close
- int Open (Ztring URL);
- void Close ();
-
- //Read
- Ztring Read();
-
-private :
- int32u Handle;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClient.c b/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClient.c
deleted file mode 100644
index f82bda6ba..000000000
--- a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClient.c
+++ /dev/null
@@ -1,3646 +0,0 @@
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Module Name:
-// HTTPClient.c
-//
-// Abstract: Partially Implements the client side of the HTTP 1.1 Protocol as
-// Defined in RFC 2616,2617
-// Platform: Any that supports standard C calls and Berkeley sockets
-//
-// Author: Eitan Michaelson
-// Version: 1.0
-// Date 7/1/2006
-// Opens: HTTP Proxy authentication support (not fully tested).
-// HTTP Keep Alive not impliamented
-// HTTPS not implemented
-// The HTTP counters are not 100% correct (will be fixed)
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "HTTPClient.h"
-#include "HTTPClientAuth.h" // Crypto support (Digest, MD5)
-#include "HTTPClientString.h" // String utilities
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientSetLocalConnection
-// Purpose : TBD
-// Gets :
-// Returns :
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientSetLocalConnection (HTTP_SESSION_HANDLE pSession, UINT32 nPort)
-{
-
- return 0;
-}
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientOpenRequest
-// Purpose : Allocate memory for a new HTTP Session
-// Gets : FLAGS
-// Returns : HTTP Session handle
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-HTTP_SESSION_HANDLE HTTPClientOpenRequest (HTTP_CLIENT_SESSION_FLAGS Flags)
-{
-
- P_HTTP_SESSION pHTTPSession = NULL; // Handle to the session pointer
- UINT32 nAllocationSize; // Size of the dynamically allocated buffer
-
- // Attempt to allocate the buffer
- pHTTPSession = (P_HTTP_SESSION)malloc(ALIGN(sizeof(HTTP_SESSION)));
-
- // Did we succeed?
- if(!pHTTPSession)
- {
- // Null pointer is returned upon error
- return 0;
- }
- // Reset the allocated space to zeros
- memset(pHTTPSession,0x00,sizeof(HTTP_SESSION));
-
- // Allocate space for the incoming and outgoing headers
- // Check if the headers buffer is resizable
- if(HTTP_CLIENT_MEMORY_RESIZABLE)
- {
- // Memory is resizable, so use the init defined size or the maximum buffer size (which ever is smaller)
- nAllocationSize = MIN(HTTP_CLIENT_MAX_SEND_RECV_HEADERS,HTTP_CLIENT_INIT_SEND_RECV_HEADERS);
-
- }
- else
- {
- // Memory is not resizable so simply use the maximum defined size
- nAllocationSize = HTTP_CLIENT_MAX_SEND_RECV_HEADERS;
- }
- // Allocate the headers buffer
- pHTTPSession->HttpHeaders.HeadersBuffer.pParam = (CHAR*)malloc(ALIGN(nAllocationSize));
- // Check the returned pointer
- if(!pHTTPSession->HttpHeaders.HeadersBuffer.pParam)
- {
- // malloc() error, free the containing structure and exit.
- free(pHTTPSession);
- return 0;
-
- }
-
- // Reset the headers allocated memory
- memset(pHTTPSession->HttpHeaders.HeadersBuffer.pParam ,0x00,nAllocationSize);
- // Set the buffer length
- pHTTPSession->HttpHeaders.HeadersBuffer.nLength = nAllocationSize;
-
- // Set default values in the session structure
- HTTPClientSetVerb((UINT32)pHTTPSession,(HTTP_VERB)HTTP_CLIENT_DEFAULT_VERB); // Default HTTP verb
- pHTTPSession->HttpUrl.nPort = HTTP_CLIENT_DEFAULT_PORT; // Default TCP port
- pHTTPSession->HttpConnection.HttpSocket = HTTP_INVALID_SOCKET; // Invalidate the socket
- // Set the outgoing headers pointers
- pHTTPSession->HttpHeaders.HeadersOut.pParam = pHTTPSession->HttpHeaders.HeadersBuffer.pParam;
- // Set our state
- pHTTPSession->HttpState = pHTTPSession->HttpState | HTTP_CLIENT_STATE_INIT;
-
- // Save the flags
- pHTTPSession->HttpFlags = Flags;
-
- // Reset the status
- pHTTPSession->HttpHeadersInfo.nHTTPStatus = 0;
- // Return an allocated session pointer (cast to UINT32 first)
- return (HTTP_SESSION_HANDLE)pHTTPSession;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientReset
-// Purpose : Reset the HTTP session and make it ready for another call
-// Gets : FLAGS
-// Returns : HTTP Session handle
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientReset (HTTP_SESSION_HANDLE pSession)
-{
-
- P_HTTP_SESSION pHTTPSession = NULL;
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- return HTTPIntrnSessionReset(pHTTPSession,TRUE);
-
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// Function : HTTPClientCloseRequest
-// Purpose : Closes any active connection and free any used memory
-// Gets : a Session handle
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientCloseRequest (HTTP_SESSION_HANDLE *pSession)
-{
- P_HTTP_SESSION pHTTPSession = NULL;
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)*(pSession);
- if(!pHTTPSession)
- {
- // User passed a bad pointer
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- // Check for a valid pointer to the HTTP headers
- if(pHTTPSession->HttpHeaders.HeadersBuffer.pParam)
- {
- // Release the used memory
- free(pHTTPSession->HttpHeaders.HeadersBuffer.pParam);
- }
- // Close any active socket connection
- HTTPIntrnConnectionClose(pHTTPSession);
- // free the session structure
- free(pHTTPSession);
-
- pHTTPSession = 0; // NULL the pointer
- *(pSession) = 0;
-
- return HTTP_CLIENT_SUCCESS;
-}
-
-#ifdef _HTTP_DEBUGGING_
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientSetDebugHook
-// Purpose : Sets the HTTP debug function pointer
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientSetDebugHook (HTTP_SESSION_HANDLE pSession,
- E_HTTPDebug *pDebug) // [IN] Function pointer to the the caller debugging function)
-{
-
- P_HTTP_SESSION pHTTPSession = NULL;
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- pHTTPSession->pDebug = pDebug;
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPClientSetDebugHook",NULL,0,"Debugging hook set, return code is %d",HTTP_CLIENT_SUCCESS);
- }
-#endif
-
-
- return HTTP_CLIENT_SUCCESS;
-}
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientSetVerb
-// Purpose : Sets the HTTP verb for the outgoing request
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientSetVerb (HTTP_SESSION_HANDLE pSession,
- HTTP_VERB HttpVerb) // [IN] Http verb (GET POST HEAD act')
-{
-
- P_HTTP_SESSION pHTTPSession = NULL;
-
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPClientSetVerb",NULL,0,"Selected Verb is %d",(INT32)HttpVerb);
- }
-#endif
-
- // Cache the verb (as integer) for later use
- pHTTPSession->HttpHeaders.HttpVerb = HttpVerb;
-
- // Convert the Verb parameter into its equivalent string representation
- switch (HttpVerb)
- {
- case VerbGet:
- strcpy(pHTTPSession->HttpHeaders.Verb,"GET");
- break;
- case VerbHead:
- if(!HTTP_CLIENT_ALLOW_HEAD_VERB)
- {
- return HTTP_CLIENT_ERROR_BAD_VERB;
- }
- strcpy(pHTTPSession->HttpHeaders.Verb,"HEAD");
- break;
- case VerbPost:
- strcpy(pHTTPSession->HttpHeaders.Verb,"POST");
- break;
- default:
- // Unknown verb
- return HTTP_CLIENT_ERROR_BAD_VERB;
- };
-
- return HTTP_CLIENT_SUCCESS;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientSetVerb
-// Purpose : Sets the HTTP authentication schema
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientSetAuth (HTTP_SESSION_HANDLE pSession,
- HTTP_AUTH_SCHEMA AuthSchema, // The type of the authentication to perform
- void *pReserved)
-{
- P_HTTP_SESSION pHTTPSession = NULL;
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPClientSetAuth",NULL,0,"Selected authentication is %d",(INT32)AuthSchema);
- }
-#endif
-
- switch(AuthSchema)
- {
- case(AuthSchemaBasic):
- strcpy(pHTTPSession->HttpCredentials.AuthSchemaName,"basic");
- break;
- case(AuthSchemaDigest):
- strcpy(pHTTPSession->HttpCredentials.AuthSchemaName,"digest");
- break;
- case(AuthSchemaKerberos):
- strcpy(pHTTPSession->HttpCredentials.AuthSchemaName,"negotiate");
- break;
- };
-
- if(AuthSchema >= AuthNotSupported)
- {
- return HTTP_CLIENT_ERROR_BAD_AUTH;
- }
-
- pHTTPSession->HttpCredentials.CredAuthSchema = AuthSchema;
- return HTTP_CLIENT_SUCCESS;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientSetProxy
-// Purpose : Sets all the proxy related parameters
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientSetProxy (HTTP_SESSION_HANDLE pSession,
- CHAR *pProxyHost, // [IN] Null terminated string containing the host name
- UINT16 nPort, // [IN] The proxy port number
- CHAR *pUserName, // [IN] User name for proxy authentication (can be null)
- CHAR *pPassword) // [IN] User password for proxy authentication (can be null)
-{
- P_HTTP_SESSION pHTTPSession = NULL;
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPClientSetProxy",NULL,0,"Proxy host %s,Port %d, Username %s,Password %s",pProxyHost,nPort,pUserName,pPassword);
- }
-#endif
-
-
- // Cache the user supplied information in the internal session structure
- strncpy(pHTTPSession->HttpProxy.ProxyHost,pProxyHost,HTTP_CLIENT_MAX_PROXY_HOST_LENGTH);
- if(pUserName)
- {
- // Proxy user name (for Proxy server authentication)
- strncpy(pHTTPSession->HttpProxy.ProxtUser,pUserName,HTTP_CLIENT_MAX_USERNAME_LENGTH);
- }
- if(pPassword)
- {
- // Proxy password (for proxy server authentication)
- strncpy(pHTTPSession->HttpProxy.ProxyPassword,pPassword,HTTP_CLIENT_MAX_PASSWORD_LENGTH);
- }
- // Proxy TCP port
- pHTTPSession->HttpProxy.nProxyPort = nPort;
- // Set the Proxy flag in the connection structure
- pHTTPSession->HttpFlags = pHTTPSession->HttpFlags | HTTP_CLIENT_FLAG_USINGPROXY;
- // Set the proxy auyjentication schema
- if(pPassword && pUserName)
- {
- pHTTPSession->HttpProxy.ProxyAuthSchema = HTTP_CLIENT_DEFAULT_PROXY_AUTH;
- }
- return HTTP_CLIENT_SUCCESS;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientSetCredentials
-// Purpose : Sets credentials for the target host
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientSetCredentials (HTTP_SESSION_HANDLE pSession,
- CHAR *pUserName, // [IN] Null terminated string containing the sessions user name
- CHAR *pPassword) // [IN] Null terminated string containing the sessions password
-{
- UINT32 nLength;
- P_HTTP_SESSION pHTTPSession = NULL;
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- // Get the length of the user name string and see if it's not too long
- nLength = strlen(pUserName);
- if(nLength > HTTP_CLIENT_MAX_USERNAME_LENGTH)
- {
- return HTTP_CLIENT_ERROR_LONG_INPUT;
- }
-
- // Get the length of the password string and see if it's not too long
- nLength = strlen(pPassword);
- if(nLength > HTTP_CLIENT_MAX_PASSWORD_LENGTH)
- {
- return HTTP_CLIENT_ERROR_LONG_INPUT;
- }
-
- // Copy them into our internal buffer
- strcpy(pHTTPSession->HttpCredentials.CredUser ,pUserName);
- strcpy(pHTTPSession->HttpCredentials.CredPassword ,pPassword);
-
- // Set the authentication Boolean flag
- pHTTPSession->HttpHeadersInfo.HaveCredentials = TRUE;
-
- return HTTP_CLIENT_SUCCESS;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientAddRequestHeaders
-// Purpose : Add headers to the outgoing request
-// Gets :
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientAddRequestHeaders (HTTP_SESSION_HANDLE pSession,
- CHAR *pHeaderName, // [IN] The Headers name
- CHAR *pHeaderData, // [IN] The headers data
- BOOL nInsert) // [IN] Reserved could be any
-{
-
- UINT32 nRetCode;
- UINT32 nHeaderLength,nDataLength;
- P_HTTP_SESSION pHTTPSession = NULL;
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPClientAddRequestHeaders",NULL,0,"Adding Header %s: %s",pHeaderName,pHeaderData);
- }
-#endif
-
- // Get the elements length
- nHeaderLength = strlen(pHeaderName);
- nDataLength = strlen(pHeaderData);
-
- // Call the internal function to add the headers to our session buffer
- nRetCode = HTTPIntrnHeadersAdd(pHTTPSession,pHeaderName,nHeaderLength,pHeaderData,nDataLength);
-
- return nRetCode;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientSendRequest
-// Purpose : This function builds the request headers, performs a DNS resolution ,
-// opens the connection (if it was not opened yet by a previous request or if it has closed)
-// and sends the request headers.
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientSendRequest (HTTP_SESSION_HANDLE pSession,
- CHAR *pUrl, // [IN] The requested URL
- VOID *pData, // [IN] Data to post to the server
- UINT32 nDataLength, // [IN] Length of posted data
- BOOL TotalLength, // [IN]
- UINT32 nTimeout, // [IN] Operation timeout
- UINT32 nClientPort) // [IN] Client side port 0 for none
-{
-
- UINT32 nRetCode; // Function call return code
- UINT32 nBytes; // Bytes counter (socket operations)
- UINT32 nUrlLength; // Length of the given Url
- P_HTTP_SESSION pHTTPSession = NULL; // Session pointer
- CHAR ContentLength[32];
- //CHAR *pPtr; // Content length (string conversion) //Jerome/cppcheck: Variable 'pPtr' is assigned a value that is never used.
- do
- {
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- nRetCode = HTTP_CLIENT_ERROR_INVALID_HANDLE;
- break;
- }
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPClientSendRequest",NULL,0,"Url: %s",pUrl);
- }
-#endif
-
- // Set the operation timeout counters
- pHTTPSession->HttpCounters.nActionStartTime = HTTPIntrnSessionGetUpTime();
- // 0 makes us use the default defined value
- pHTTPSession->HttpCounters.nActionTimeout = HTTP_TIMEOUT(nTimeout);
- // Store the cliebt port for later usage
- pHTTPSession->HttpConnection.HttpClientPort = nClientPort;
-
- // Parse the URL
- nUrlLength = strlen(pUrl);
- nRetCode = HTTPIntrnSetURL(pHTTPSession,pUrl,nUrlLength);
- if(nRetCode != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
-
- // Create the default headers
- // Add the "Host" header. we should handle a special case of port incorporated within the host name.
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_URLANDPORT) != HTTP_CLIENT_FLAG_URLANDPORT)
- {
- // The case where we don't have the port
- if((nRetCode = HTTPIntrnHeadersAdd(pHTTPSession,
- "Host",4,
- pHTTPSession->HttpUrl.UrlHost.pParam,
- pHTTPSession->HttpUrl.UrlHost.nLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
- else
- {
- // We have the port so use a deferent element
- if((nRetCode = HTTPIntrnHeadersAdd(pHTTPSession,"Host",4,pHTTPSession->HttpUrl.UrlHost.pParam,
- (pHTTPSession->HttpUrl.UrlPort.pParam - pHTTPSession->HttpUrl.UrlHost.pParam) -1 )) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
- // We are in a post request without knowing the total length in advance so return error or use chunking
- if(pHTTPSession->HttpHeaders.HttpVerb == VerbPost && TotalLength == FALSE)
- {
- // If the user specified the chunked flag
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_SEND_CHUNKED) == HTTP_CLIENT_FLAG_SEND_CHUNKED)
- {
- // Add the Transfer-Encoding: header
- if((nRetCode = HTTPIntrnHeadersAdd(pHTTPSession,"Transfer-Encoding",17,"chunked",7))!= HTTP_CLIENT_SUCCESS)
- {
- break;;
- }
- }
- else
- {
- // Not a supported operation - unknown length
- nRetCode = HTTP_CLIENT_ERROR_HEADER_NO_LENGTH;
- break;
- }
- }
-
- // Add the "User-Agent" header
- if((nRetCode = HTTPIntrnHeadersAdd(pHTTPSession,"User-Agent",10,HTTP_CLIENT_DEFAULT_AGENT,strlen(HTTP_CLIENT_DEFAULT_AGENT)))!= HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Add the "Keep-Alive" header (if requested by the caller)
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_KEEP_ALIVE) == HTTP_CLIENT_FLAG_KEEP_ALIVE)
- {
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_USINGPROXY) != HTTP_CLIENT_FLAG_USINGPROXY)
- {
- // No proxy keep alive:
- if((nRetCode = HTTPIntrnHeadersAdd(pHTTPSession,"Connection",10,"Keep-Alive",10))!= HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
- else // proxy keep alive
- {
- if((nRetCode = HTTPIntrnHeadersAdd(pHTTPSession,"Proxy-Connection",15,"Keep-Alive",10))!= HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
- }
-
- // If we know the total length in advance (only when posting)
- if(pHTTPSession->HttpHeaders.HttpVerb == VerbPost && TotalLength == TRUE)
- {
- // set the total content length header
- pHTTPSession->HttpHeadersInfo.nHTTPPostContentLength = nDataLength; // Store for later usage
- memset(ContentLength,0,32);
- //pPtr = IToA(ContentLength,nDataLength); // Convert the buffer length to a string value //Jerome/cppcheck: Variable 'pPtr' is assigned a value that is never used.
- if((nRetCode = HTTPIntrnHeadersAdd(pHTTPSession,"Content-Length",14,ContentLength,strlen(ContentLength)))!= HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
-
- // Add the "Cache control" header (if requested by the caller)
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_NO_CACHE) == HTTP_CLIENT_FLAG_NO_CACHE)
- {
- if((nRetCode = HTTPIntrnHeadersAdd(pHTTPSession,"Cache-Control",13,"no-cache",8))!= HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
-
-
- // Now we can connect to the remote server and send the leading request followed by the HTTP headers
- // Check for timeout
- if(HTTPIntrnSessionEvalTimeout(pHTTPSession) == TRUE)
- {
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_TIME_OUT;
- break;
- }
- // Handle connection close message (reconnect)
- if(pHTTPSession->HttpHeadersInfo.Connection == FALSE)
- {
- // Gracefully close the connection and set the socket as invalid
- if(pHTTPSession->HttpConnection.HttpSocket != HTTP_INVALID_SOCKET)
- {
- HTTPIntrnConnectionClose(pHTTPSession);
- }
- // Connect to the remote server (or proxy)
- nRetCode = HTTPIntrnConnectionOpen(pHTTPSession);
- if(nRetCode != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
-
- // Send the request along with the rest of the headers
- if(pHTTPSession->HttpCredentials.CredAuthSchema != AuthSchemaNone ||
- pHTTPSession->HttpProxy.ProxyAuthSchema != AuthSchemaNone) // If we have to authenticate we should use the HEAD verb
- {
- if(HTTP_CLIENT_ALLOW_HEAD_VERB) // HEAD should not be ussed if not defined
- {
- if((nRetCode = HTTPIntrnHeadersSend(pHTTPSession,VerbHead)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the state flag
- pHTTPSession->HttpState = pHTTPSession->HttpState | HTTP_CLIENT_STATE_HEAD_SENT;
- }
- else
- {
- // Simply use the verb that was set by the caller without changing to HEAD
- if((nRetCode = HTTPIntrnHeadersSend(pHTTPSession,pHTTPSession->HttpHeaders.HttpVerb)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // This the case where the caller know the total length to receive in advance
- // and he wishes to send the data right away
- if(pHTTPSession->HttpHeaders.HttpVerb == VerbPost && TotalLength == TRUE)
- {
-
- // Send the data
- nBytes = nDataLength;
- if((nRetCode = HTTPIntrnSend(pHTTPSession,pData,&nBytes)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the session state
- pHTTPSession->HttpState = pHTTPSession->HttpState | HTTP_CLIENT_STATE_POST_SENT;
- }
-
- }
-
- // Retrive and analyze the Headers
- if((nRetCode = HTTPIntrnHeadersReceive(pHTTPSession,nTimeout)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- if(pHTTPSession->HttpHeadersInfo.nHTTPStatus != 401 && pHTTPSession->HttpHeadersInfo.nHTTPStatus != 407)
- {
-
- nRetCode = HTTP_CLIENT_ERROR_AUTH_MISMATCH;
- break;
- }
- // Authenticate
- if((nRetCode = HTTPIntrnAuthenticate(pHTTPSession)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
-
- }
- else
- {
- // No authentication use the verb that was requested by the caller
- if((nRetCode = HTTPIntrnHeadersSend(pHTTPSession,pHTTPSession->HttpHeaders.HttpVerb)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
- // This the case where the caller know the total length to receive in advance
- // and he wishes to send the data right away
- if(pHTTPSession->HttpHeaders.HttpVerb == VerbPost && TotalLength == TRUE)
- {
-
- // Send the data
- nBytes = nDataLength;
- if((nRetCode = HTTPIntrnSend(pHTTPSession,pData,&nBytes)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the session state
- pHTTPSession->HttpState = pHTTPSession->HttpState | HTTP_CLIENT_STATE_POST_SENT;
- }
-
- }while(0);
-
-
-
- return nRetCode;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientRecvResponse
-// Purpose : Receives the response header on the connection and parses it.
-// Performs any required authentication.
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientRecvResponse (HTTP_SESSION_HANDLE pSession,
- UINT32 nTimeout) // [IN] Timeout for the operation
-{
-
- UINT32 nRetCode; // Function return code
- P_HTTP_SESSION pHTTPSession = NULL; // Session pointer
-
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- do
- {
- if((nRetCode = HTTPIntrnHeadersReceive(pHTTPSession, nTimeout)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- } while(0);
-
- return nRetCode;
-
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientWriteData
-// Purpose : Write data to the remote server
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientWriteData (HTTP_SESSION_HANDLE pSession,
- VOID *pBuffer,
- UINT32 nBufferLength,
- UINT32 nTimeout)
-{
-
- UINT32 nRetCode = HTTP_CLIENT_SUCCESS;
- UINT32 nBytes;
- CHAR Chunk[HTTP_CLIENT_MAX_CHUNK_HEADER];
- //CHAR *pChunkHeaderPtr; //Jerome/cppcheck: Variable 'pChunkHeaderPtr' is assigned a value that is never used.
-
- P_HTTP_SESSION pHTTPSession = NULL;
-
-
- // Cast the handle to our internal structure and check the pointer validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- do
- {
- if(!pHTTPSession)
- {
- nRetCode = HTTP_CLIENT_ERROR_INVALID_HANDLE;
- break;
- }
-
- // Set the operation timeout counters
- pHTTPSession->HttpCounters.nActionStartTime = HTTPIntrnSessionGetUpTime();
- pHTTPSession->HttpCounters.nActionTimeout = HTTP_TIMEOUT(nTimeout);
-
- // Did the caller specified chunked sending?
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_SEND_CHUNKED) == HTTP_CLIENT_FLAG_SEND_CHUNKED)
- {
- // Prep the chunk Header and send it
- memset(Chunk,0x00,HTTP_CLIENT_MAX_CHUNK_HEADER);
- HTTPStrLToH(Chunk,nBufferLength); //pChunkHeaderPtr = //Jerome/cppcheck: Variable 'pChunkHeaderPtr' is assigned a value that is never used.
- strcat(Chunk,HTTP_CLIENT_CRLF);
-
- // Send the leading CrLf (only after the first chunk)
- if(pHTTPSession->HttpCounters.nSentChunks >= 1)
- {
- nBytes = 2;;
- nRetCode = HTTPIntrnSend(pHTTPSession,HTTP_CLIENT_CRLF,&nBytes);
- if(nRetCode != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
-
- // Send the chunk header
- nBytes = strlen(Chunk);
- nRetCode = HTTPIntrnSend(pHTTPSession,Chunk,&nBytes);
- if(nRetCode != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
-
- // Send the data
- nBytes = nBufferLength;
- nRetCode = HTTPIntrnSend(pHTTPSession,pBuffer,&nBytes);
- if(nRetCode != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
-
- // If we are using chunks then..
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_SEND_CHUNKED) == HTTP_CLIENT_FLAG_SEND_CHUNKED)
- {
- // Set the chunks count
- pHTTPSession->HttpCounters.nSentChunks++;
-
- // If it was the last chunk (0) we should re-get the headers from the server reply
- if(nBufferLength == 0)
- {
- // Send the trailing CrLf
- nBytes = 2;;
- nRetCode = HTTPIntrnSend(pHTTPSession,HTTP_CLIENT_CRLF,&nBytes);
- if(nRetCode != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Get the remote headers (since the last chunk was transmitted we can expect the server to start the reply)
- if((nRetCode = HTTPIntrnHeadersReceive(pHTTPSession,nTimeout)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
- }
-
- } while(0);
-
- return nRetCode;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientReadData
-// Purpose : Read data from the server. Parse out the chunks data.
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
- UINT32 HTTPClientReadData (HTTP_SESSION_HANDLE pSession,
- VOID *pBuffer, // [IN OUT] a pointer to a buffer that will be filled with the servers response
- UINT32 nBytesToRead, // [IN] The size of the buffer (numbers of bytes to read)
- UINT32 nTimeout, // [IN] operation timeout in seconds
- UINT32 *nBytesRecived) // [OUT] Count of the bytes that ware received in this operation
- {
-
- UINT32 nBytes = 0;
- UINT32 nRetCode = 0 ;
- INT32 nProjectedBytes = 0; // Should support negative numbers
- CHAR *pNullPtr;
- BOOL EndOfStream = FALSE;
-
- P_HTTP_SESSION pHTTPSession = NULL;
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- // If the last verb that was used was HEAD there is no point to get this data (chanses are that we will endup with timeout)
- if(pHTTPSession->HttpHeaders.HttpVerb == VerbHead)
- {
- return HTTP_CLIENT_EOS;
-
- }
-
- // Set the operation timeout counters
- pHTTPSession->HttpCounters.nActionStartTime = HTTPIntrnSessionGetUpTime();
- pHTTPSession->HttpCounters.nActionTimeout = HTTP_TIMEOUT(nTimeout);
-
-
- nBytes = nBytesToRead - 1; // We will spare 1 byte for the trailing null termination
- *((CHAR*)pBuffer) = 0; // Null terminate the user supplied buffer
- *(nBytesRecived) = 0; // Set the return bytes count to 0
-
- // We can read the data only if we got valid headers (and not authentication requests for example)
- if((pHTTPSession->HttpState & HTTP_CLIENT_STATE_HEADERS_PARSED) != HTTP_CLIENT_STATE_HEADERS_PARSED)
- {
- return HTTP_CLIENT_ERROR_BAD_STATE;
- }
-
- // Is it a chunked mode transfer?
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_CHUNKED) == HTTP_CLIENT_FLAG_CHUNKED)
- {
-
- // How many bytes left until the next chunk?
- if(pHTTPSession->HttpCounters.nBytesToNextChunk == 0)
- {
- // Read the chunk header and get its length
- if(HTTPIntrnGetRemoteChunkLength(pHTTPSession) != HTTP_CLIENT_SUCCESS)
- {
- // Could not parse the chunk parameter
- return HTTP_CLIENT_ERROR_CHUNK;
- }
-
- // 0 Bytes chunk, we should return end of stream
- if(pHTTPSession->HttpCounters.nRecivedChunkLength == 0)
- {
- return HTTP_CLIENT_EOS;
- }
- }
- // If we are about to read pass the next chunk, reduce the read bytes so we will read
- // non HTML data
- nProjectedBytes = pHTTPSession->HttpCounters.nBytesToNextChunk - nBytes;
- if ( nProjectedBytes <= 0)
- {
- // Set the correct bytes count we should read
- nBytes = pHTTPSession->HttpCounters.nBytesToNextChunk;
- }
- }
-
- // Do we have the content length?
- if(pHTTPSession->HttpHeadersInfo.nHTTPContentLength > 0)
- {
- // Length of the projected buffer
- nProjectedBytes = pHTTPSession->HttpCounters.nRecivedBodyLength + nBytes;
- // If we are going to read more then the known content length then..
- if(nProjectedBytes >= (INT32)pHTTPSession->HttpHeadersInfo.nHTTPContentLength)
- {
- // Reduce the received bytes count to the correct size
- nBytes = pHTTPSession->HttpHeadersInfo.nHTTPContentLength - pHTTPSession->HttpCounters.nRecivedBodyLength;
-
- }
- }
- // Receive the data from the socket
- nRetCode = HTTPIntrnRecv(pHTTPSession,(CHAR*)pBuffer,&nBytes,FALSE);
- // Set the return bytes count
- *(nBytesRecived) = nBytes; // + 1; Fixed 11/9/2005
-
- // Pointer to the end of the buffer
- pNullPtr = (CHAR*)pBuffer + nBytes ;
- // And null terminate
- *pNullPtr = 0;
-
- // Socket read went OK
- if(nRetCode == HTTP_CLIENT_SUCCESS)
- {
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPClientReadData",NULL,0,"Reading %d bytes",nBytes);
- }
-#endif
- // Set the HTTP counters
- pHTTPSession->HttpCounters.nRecivedBodyLength += nBytes;
- // If we know the total content length and..
- if(pHTTPSession->HttpHeadersInfo.nHTTPContentLength > 0)
- {
- // If total received body is equal or greater then the known content length then..
- if( pHTTPSession->HttpCounters.nRecivedBodyLength >= pHTTPSession->HttpHeadersInfo.nHTTPContentLength)
- {
- // Raise a flag to signal end of stream
- EndOfStream = TRUE;
- }
- }
- // Is it a chunked mode transfer?
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_CHUNKED) == HTTP_CLIENT_FLAG_CHUNKED)
- {
- // We are a little closer to the next chunk now
- pHTTPSession->HttpCounters.nBytesToNextChunk -= nBytes;
- }
- // Is it End of stream?
- if(EndOfStream == TRUE)
- {
- // So exit
- return HTTP_CLIENT_EOS;
- }
- }
-
- return nRetCode ;
-}
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientGetInfo
-// Purpose : Fill the users structure with the session information
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientGetInfo (HTTP_SESSION_HANDLE pSession, HTTP_CLIENT *HTTPClient)
-{
- P_HTTP_SESSION pHTTPSession = NULL;
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
- // Reset the users info structure
- memset(HTTPClient,0x00,sizeof(HTTP_CLIENT));
-
- HTTPClient->HTTPStatusCode = pHTTPSession->HttpHeadersInfo.nHTTPStatus;
- HTTPClient->RequestBodyLengthSent = pHTTPSession->HttpCounters.nSentBodyBytes;
- HTTPClient->ResponseBodyLengthReceived = pHTTPSession->HttpCounters.nRecivedBodyLength;
- HTTPClient->TotalResponseBodyLength = pHTTPSession->HttpHeadersInfo.nHTTPContentLength;
- HTTPClient->HttpState = pHTTPSession->HttpState;
-
- return HTTP_CLIENT_SUCCESS;
-
-
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientFindFirstHeader
-// Purpose : Initiate the headr searching functions
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientFindFirstHeader (HTTP_SESSION_HANDLE pSession, CHAR *pSearchClue,CHAR *pHeaderBuffer, UINT32 *nLength)
-{
-
- P_HTTP_SESSION pHTTPSession = NULL;
- UINT32 nClueLength;
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- nClueLength = strlen(pSearchClue); // See if we are not to long
- if(nClueLength >= HTTP_CLIENT_MAX_HEADER_SEARCH_CLUE)
- {
- return HTTP_CLIENT_ERROR_HEADER_BIG_CLUE;
- }
- else
- {
- strcpy(pHTTPSession->HttpHeaders.SearchClue,pSearchClue);
- pHTTPSession->HttpHeaders.HeaderSearch.nLength = 0;
- pHTTPSession->HttpHeaders.HeaderSearch.pParam = NULL;
- }
-
- return HTTP_CLIENT_SUCCESS;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientFindCloseHeader
-// Purpose : Terminate a headers search session
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPClientFindCloseHeader (HTTP_SESSION_HANDLE pSession)
-{
-
- P_HTTP_SESSION pHTTPSession = NULL;
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- pHTTPSession->HttpHeaders.SearchClue[0] = 0;
- pHTTPSession->HttpHeaders.HeaderSearch.nLength = 0;
- pHTTPSession->HttpHeaders.HeaderSearch.pParam = NULL;
-
- return HTTP_CLIENT_SUCCESS;
-
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPClientGetNextHeader
-// Purpose : Terminate a headers search session
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-UINT32 HTTPClientGetNextHeader (HTTP_SESSION_HANDLE pSession, CHAR *pHeaderBuffer, UINT32 *nLength)
-{
-
- P_HTTP_SESSION pHTTPSession = NULL;
- UINT32 nOffset = 0;
- UINT32 nRetCode;
- HTTP_PARAM HttpHeader;
- CHAR *pPtr;
-
- // Cast the handle to our internal structure and check the pointers validity
- pHTTPSession = (P_HTTP_SESSION)pSession;
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
- if(pHTTPSession->HttpHeaders.HeaderSearch.nLength > 0) // We must adjust the search offset since it is not the fierst iteration
- {
- nOffset = pHTTPSession->HttpHeaders.HeaderSearch.pParam - pHTTPSession->HttpHeaders.HeadersIn.pParam;
- }
- // Search for the next header
- nRetCode = HTTPIntrnHeadersFind(pHTTPSession,pHTTPSession->HttpHeaders.SearchClue,&HttpHeader,TRUE,nOffset);
-
- if(nRetCode == HTTP_CLIENT_SUCCESS)
- {
- if(HttpHeader.nLength > *(nLength)) // Check for sufficiant length
- {
- *(nLength) = HttpHeader.nLength;
- pHeaderBuffer[0] = 0; // Reset the users buffer
- return HTTP_CLIENT_ERROR_NO_MEMORY;
- }
-
- pPtr = HttpHeader.pParam;
- nOffset = 0;
- if(*pPtr == 0x0d)
- {
- nOffset++;
- pPtr++;
- }
- if(*pPtr == 0x0a)
- {
- nOffset++;
- pPtr++;
- }
-
- strncpy(pHeaderBuffer,pPtr,HttpHeader.nLength - nOffset);
- pHeaderBuffer[HttpHeader.nLength - nOffset] = 0;
- *(nLength) = HttpHeader.nLength - nOffset;
- pHTTPSession->HttpHeaders.HeaderSearch.pParam = HttpHeader.pParam + HttpHeader.nLength;
- pHTTPSession->HttpHeaders.HeaderSearch.nLength++;
-
- return HTTP_CLIENT_SUCCESS;
-
- }
-
- return nRetCode;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnSetURL
-// Purpose : Parse the user's URL
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnSetURL (P_HTTP_SESSION pHTTPSession,
- CHAR *pUrl, // [IN] a null terminated string containing the Url we should retrieve
- UINT32 nUrlLength) // [IN] The length the Url string
-{
-
- UINT32 nUrlOffset; // Offset in bytes within the Url string
- HTTP_URL *pUrlPtr; // a Pointer to the Url structure (within the global session structure)
- CHAR *pPtr; // a Pointer for the Url port (Used in the parsing process)
- CHAR UrlPort[16]; // a temporary byte array for the Url port conversion operation (string to number)
-
- // Check for the session pointer validity
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
-
- // Get the length of the Url
- nUrlLength = strlen(pUrl);
-
- // Check if it is not longer than the permitted length
- if((nUrlLength + 1) > HTTP_CLIENT_MAX_URL_LENGTH)
- {
- return HTTP_CLIENT_ERROR_LONG_INPUT;
- }
-
- // Point the local pointer on the global structure
- pUrlPtr = &pHTTPSession->HttpUrl;
-
- // Copy to the internal buffer
- memcpy(pHTTPSession->HttpUrl.Url,pUrl,nUrlLength);
- nUrlOffset = 0;
-
- // Get the Url base ("http" or "https")
- if(HTTPStrSearch(pUrlPtr->Url,":",nUrlOffset,nUrlLength,&pUrlPtr->UrlBsee) == FALSE)
- {
- return HTTP_CLIENT_ERROR_BAD_URL;
- }
- // Increase the offset parameter
- nUrlOffset += pUrlPtr->UrlBsee.nLength;
- // If we can parse the string "HTTPS" we can assume a secured session
- if(HTTPStrInsensitiveCompare(pUrlPtr->UrlBsee.pParam,"https",pUrlPtr->UrlBsee.nLength) == TRUE)
- {
- // Set the secured flags on the session
- pHTTPSession->HttpFlags = pHTTPSession->HttpFlags | HTTP_CLIENT_FLAG_URLHTTPS;
- pHTTPSession->HttpFlags = pHTTPSession->HttpFlags | HTTP_CLIENT_FLAG_SECURE;
- // ToDo: Init TLS (GetProtocol)
-#ifdef _HTTP_BUILD_AMT
- // OS_GET_CLIENT_SUBSET_PROTOCOL(TRUE,&pHTTPSession->pSecProtocol);
-#endif
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnSetURL",NULL,0,"SSL Protected Url %s",pUrl);
- }
-#endif
- }
- else // it should be "http"
- {
- if(HTTPStrInsensitiveCompare(pUrlPtr->UrlBsee.pParam,"http",pUrlPtr->UrlBsee.nLength) == FALSE)
- {
- return HTTP_CLIENT_ERROR_BAD_URL; // cOULD NOT DETECT http or https prefix
-
- }
- }
- // Look for standard Url elements
- if(HTTPStrSearch(pUrlPtr->Url,"://",nUrlOffset,3,0) == FALSE)
- {
- return HTTP_CLIENT_ERROR_BAD_URL; // Could not detect "://"
- }
- // Increase the offset parameter
- nUrlOffset += 3;
-
- // Get the host name
- if(HTTPStrSearch(pUrlPtr->Url,"/",nUrlOffset,(nUrlLength - nUrlOffset),&pUrlPtr->UrlHost) == FALSE)
- {
- pUrlPtr->Url[nUrlLength] = '/';
- nUrlLength++;
- if(HTTPStrSearch(pUrlPtr->Url,"/",nUrlOffset,(nUrlLength - nUrlOffset),&pUrlPtr->UrlHost) == FALSE)
- {
- return HTTP_CLIENT_ERROR_BAD_URL;
- }
- }
-
- nUrlOffset += pUrlPtr->UrlHost.nLength;
-
- // Do we have the port within the hostname?
- if(HTTPStrSearch(pUrlPtr->Url,":",
- (nUrlOffset - pUrlPtr->UrlHost.nLength),
- pUrlPtr->UrlHost.nLength,
- &pUrlPtr->UrlPort) == TRUE)
- {
- if((pUrlPtr->UrlHost.nLength - pUrlPtr->UrlPort.nLength) < 10)
- {
- // To-Do: check the actual port length before the memcpy
- pUrlPtr->UrlPort.pParam += pUrlPtr->UrlPort.nLength + 1;
- memcpy(UrlPort,pUrlPtr->UrlPort.pParam,15);
- pUrlPtr->UrlPort.nLength = 0;
- pPtr = UrlPort;
- while(*pPtr && pPtr++)
- {
-
- pUrlPtr->UrlPort.nLength++;
- if(*pPtr == '/')
- {
- *pPtr = 0;
- pUrlPtr->nPort = (UINT16)atol(UrlPort);
- pHTTPSession->HttpFlags = pHTTPSession->HttpFlags | HTTP_CLIENT_FLAG_URLANDPORT;
- break;
- }
- }
- }
- else
- {
- // Port too big
- return HTTP_CLIENT_ERROR_BAD_URL;
- }
- }
-
- // Get the request body
- pUrlPtr->UrlRequest.pParam = pUrlPtr->Url + nUrlOffset;
- pUrlPtr->UrlRequest.nLength = nUrlLength - nUrlOffset;
-
- // If we got SSL url with no port we should set the default ssl port
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_URLHTTPS) == HTTP_CLIENT_FLAG_URLHTTPS)
- {
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_URLANDPORT) != HTTP_CLIENT_FLAG_URLANDPORT)
- {
- pHTTPSession->HttpUrl.nPort = HTTP_CLIENT_DEFAULT_SSL_PORT;
-
- }
-
- }
-
- // Set the state flag
- pHTTPSession->HttpState = pHTTPSession->HttpState | HTTP_CLIENT_STATE_URL_PARSED;
-
- return HTTP_CLIENT_SUCCESS;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnResizeBuffer
-// Purpose : Resize the HTTP headers buffer and reset the pointers
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnResizeBuffer (P_HTTP_SESSION pHTTPSession,
- UINT32 nNewBufferSize) // [IN] The new (and larger) buffer size
-{
-
- CHAR *pPtr = NULL;
- UINT32 nCurrentBufferSize;
-
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
- // If the new buffer size is less or equal to the current buffer size then..
- if(pHTTPSession->HttpHeaders.HeadersBuffer.nLength >= nNewBufferSize)
- {
-
- // Return an error (bad buffer)
- return HTTP_CLIENT_ERROR_BUFFER_RSIZE;
- }
-
- // If the new buffer size is bigger then the defined maximum buffer size then..
- if(nNewBufferSize > HTTP_CLIENT_MAX_SEND_RECV_HEADERS)
- {
- // Return an error (bad buffer)
- return HTTP_CLIENT_ERROR_BUFFER_RSIZE;
- }
- // Current buffer size is the sum of the incoming and outgoing headers strings lengths
- nCurrentBufferSize = pHTTPSession->HttpHeaders.HeadersOut.nLength + pHTTPSession->HttpHeaders.HeadersIn.nLength;
- // Allocate a new buffer with the requested buffer size
- pPtr = (CHAR*)malloc(ALIGN(nNewBufferSize));
- if(!pPtr)
- {
- // malloc() error
- return HTTP_CLIENT_ERROR_NO_MEMORY;
- }
-
- // Copy the memory only if there is data to copy
- if(nCurrentBufferSize > 0)
- {
- memcpy(pPtr,pHTTPSession->HttpHeaders.HeadersBuffer.pParam,nCurrentBufferSize);
- // Reset the rest of the buffer
- memset(pPtr + nCurrentBufferSize, 0x00,(nNewBufferSize - nCurrentBufferSize));
- }
- else
- {
- // Reset the entire buffer (no previous buffer was copied)
- memset(pPtr,0x00,nNewBufferSize);
- }
-
- free(pHTTPSession->HttpHeaders.HeadersBuffer.pParam);
-
- pHTTPSession->HttpHeaders.HeadersBuffer.pParam = pPtr;
- pHTTPSession->HttpHeaders.HeadersBuffer.nLength = nNewBufferSize;
-
- // Refresh the pointers
- pHTTPSession->HttpHeaders.HeadersOut.pParam = pHTTPSession->HttpHeaders.HeadersBuffer.pParam;
- if(pHTTPSession->HttpHeaders.HeadersIn.pParam)
- {
- pHTTPSession->HttpHeaders.HeadersIn.pParam =pHTTPSession->HttpHeaders.HeadersBuffer.pParam + pHTTPSession->HttpHeaders.HeadersOut.nLength;
- }
- return HTTP_CLIENT_SUCCESS;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnRemoveHeader
-// Purpose : Removes an HTTP headers by its name
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnHeadersRemove (P_HTTP_SESSION pHTTPSession,
- CHAR *pHeaderName) // [IN] The header's name
-
-{
-
- HTTP_PARAM HttpParam;
- UINT32 nRetCode = HTTP_CLIENT_SUCCESS;
- UINT32 nBytes;
-
- if(!pHTTPSession) // Pointer validation check
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- // First see if we have that header in our outgoing headers buffer
- do
- {
-
- if((nRetCode = HTTPIntrnHeadersFind(pHTTPSession,pHeaderName,&HttpParam,FALSE,0)) != HTTP_CLIENT_SUCCESS)
- {
- // Could not find this header
- break;
- }
- // Calculate the new headers length
- nBytes = (HttpParam.pParam - pHTTPSession->HttpHeaders.HeadersOut.pParam);
- nBytes -= HttpParam.nLength;
-
-
- // Copy the memory
- memcpy(HttpParam.pParam, HttpParam.pParam + HttpParam.nLength,nBytes);
-
- // Set the new length
- pHTTPSession->HttpHeaders.HeadersOut.nLength -= HttpParam.nLength;
-
- // Reset the buffer from it's modified end to it's previous end
- memset(pHTTPSession->HttpHeaders.HeadersOut.pParam + pHTTPSession->HttpHeaders.HeadersOut.nLength,0x00,HttpParam.nLength);
-
- } while(0);
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnHeadersRemove",NULL,0,"Removing Header %",pHeaderName);
- }
-#endif
-
-
- return nRetCode;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnHeadersAdd
-// Purpose : Add HTTP headers to the outgoing headers buffers
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnHeadersAdd (P_HTTP_SESSION pHTTPSession,
- CHAR *pHeaderName, // [IN] The header's name
- UINT32 nNameLength, // [IN] Name length
- CHAR *pHeaderData, // [IN] The Header's data
- UINT32 nDataLength) // [IN] Data length
-{
- CHAR *pPtr;
- UINT32 nProjectedHeaderLength;
- UINT32 nProjectedBufferLength;
- INT32 nCurrentfreeSpace;
- INT32 nProjectedfreeSpace;
- UINT32 nRetCode;
-
- if(!pHTTPSession) // pointer validation check
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- nProjectedHeaderLength = nNameLength + nDataLength + 4;
- nProjectedBufferLength = nProjectedHeaderLength + pHTTPSession->HttpHeaders.HeadersOut.nLength + pHTTPSession->HttpHeaders.HeadersIn.nLength;
- nCurrentfreeSpace = pHTTPSession->HttpHeaders.HeadersBuffer.nLength - (pHTTPSession->HttpHeaders.HeadersOut.nLength + pHTTPSession->HttpHeaders.HeadersIn.nLength);
- nProjectedfreeSpace = nCurrentfreeSpace - nProjectedHeaderLength;
-
- // Check total size limit
- if(nProjectedBufferLength > HTTP_CLIENT_MAX_SEND_RECV_HEADERS)
- {
- return HTTP_CLIENT_ERROR_NO_MEMORY;
- }
-
- if((INT32)nProjectedfreeSpace < 0)
- {
- if(HTTP_CLIENT_MEMORY_RESIZABLE == FALSE)
- {
- // Need more space but we can't grow beyond the current size
- return HTTP_CLIENT_ERROR_NO_MEMORY;
- }
- else
- {
- // We can resizes so..
- nRetCode = HTTPIntrnResizeBuffer(pHTTPSession,nProjectedBufferLength + HTTP_CLIENT_MEMORY_RESIZE_FACTOR);
- if(nRetCode != HTTP_CLIENT_SUCCESS)
- {
- return nRetCode;
- }
- }
- }
-
- // Move the incoming headers data within the buffer so we will have space for the added headers
- if(pHTTPSession->HttpHeaders.HeadersIn.pParam)
- {
- // Move the data and reset the data in the offset.
- memcpy(pHTTPSession->HttpHeaders.HeadersIn.pParam + nProjectedHeaderLength ,
- pHTTPSession->HttpHeaders.HeadersIn.pParam,
- pHTTPSession->HttpHeaders.HeadersIn.nLength);
- // Reset the space created
- memset(pHTTPSession->HttpHeaders.HeadersOut.pParam + pHTTPSession->HttpHeaders.HeadersOut.nLength,
- 0x00,
- nProjectedHeaderLength);
-
- }
-
- pPtr = pHTTPSession->HttpHeaders.HeadersOut.pParam + pHTTPSession->HttpHeaders.HeadersOut.nLength;
- // Create the new header
- memcpy(pPtr,pHeaderName,nNameLength);
- pPtr += nNameLength;
- memcpy(pPtr,": ",2);
- pPtr += 2;
- memcpy(pPtr,pHeaderData,nDataLength);
- pPtr += nDataLength;
- memcpy(pPtr,HTTP_CLIENT_CRLF,2);
- //pPtr += 2; //Jerome/cppcheck: Variable 'pPtr' is assigned a value that is never used.
-
- // Set the new length
- pHTTPSession->HttpHeaders.HeadersOut.nLength += nProjectedHeaderLength;
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnHeadersAdd",NULL,0,"Adding Header %s: %s",pHeaderName,pHeaderData);
- }
-#endif
-
- return HTTP_CLIENT_SUCCESS;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnConnectionClose
-// Purpose : Closes an active socket connection and invalidate the socket handle
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPIntrnConnectionClose (P_HTTP_SESSION pHTTPSession)
-{
-
- INT32 nRetCode = HTTP_CLIENT_SUCCESS;
-
- do
- {
- if(!pHTTPSession) // Validate the session pointer
- {
- nRetCode = HTTP_CLIENT_ERROR_INVALID_HANDLE;
- break;
- }
-
- // If we have a valid socket then..
- if(pHTTPSession->HttpConnection.HttpSocket != HTTP_INVALID_SOCKET)// INVALID_SOCKET
- {
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_SECURE) == HTTP_CLIENT_FLAG_SECURE)
- {
- // TLS Close
- nRetCode = HTTPWrapperSSLClose(pHTTPSession->HttpConnection.HttpSocket);
- }
-
- // Gracefully close it
- shutdown(pHTTPSession->HttpConnection.HttpSocket,0x01);
- closesocket(pHTTPSession->HttpConnection.HttpSocket);
- // And invalidate the socket
- pHTTPSession->HttpConnection.HttpSocket = HTTP_INVALID_SOCKET;
-
- break;;
- }
- else
- {
- // Not a valid socket error
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_INVALID;
- break;
- }
-
- } while(0);
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnConnectionClose",NULL,0,"");
- }
-#endif
- return nRetCode;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnConnectionOpen
-// Purpose : Opens a socket connection to the remote host or proxy server
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnConnectionOpen (P_HTTP_SESSION pHTTPSession)
-{
- INT32 nRetCode = HTTP_CLIENT_SUCCESS; // a function return code value
- UINT32 nNullOffset; // a helper value to null terminate a given string
- int nNonBlocking = 1; // non blocking mode parameter
- CHAR Backup; // a container for a char value (helps in temporary null termination)
- // HTTP_HOSTNET *HostEntry; // Socket host entry pointer
- UINT32 Address = 0;
- HTTP_SOCKADDR_IN ServerAddress; // Socket address structure
- HTTP_SOCKADDR_IN LoaclAddress; // Socket address structure (for client binding)
- do
- {
-
- if(!pHTTPSession)
- {
- nRetCode = HTTP_CLIENT_ERROR_INVALID_HANDLE;
- break;
- }
- // Use an existing connection if valid
- if(pHTTPSession->HttpConnection.HttpSocket != HTTP_INVALID_SOCKET)
- {
- // Set the state flag
- pHTTPSession->HttpState = pHTTPSession->HttpState | HTTP_CLIENT_STATE_HOST_CONNECTED;
- return HTTP_CLIENT_SUCCESS;
- }
- // Zero the socket events
- FD_ZERO(&pHTTPSession->HttpConnection.FDRead);
- FD_ZERO(&pHTTPSession->HttpConnection.FDWrite);
- FD_ZERO(&pHTTPSession->HttpConnection.FDError);
-
- if(pHTTPSession->HttpConnection.HttpSocket == HTTP_INVALID_SOCKET)
- {
-
- // Create a TCP/IP stream socket
- pHTTPSession->HttpConnection.HttpSocket = socket(AF_INET, // Address family
- SOCK_STREAM, // Socket type
- IPPROTO_TCP); // Protocol
- }
-
- // Exit if we don't have a valid socket
- if(pHTTPSession->HttpConnection.HttpSocket == HTTP_INVALID_SOCKET)
- {
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_INVALID;
- break;
- }
- // Set non blocking socket
- nRetCode = ioctlsocket(pHTTPSession->HttpConnection.HttpSocket, FIONBIO, &nNonBlocking);
- if(nRetCode != 0)
- {
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_CANT_SET;
- break;
- }
- // Resolve the target host name
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_USINGPROXY) != HTTP_CLIENT_FLAG_USINGPROXY)
- {
- // No proxy, directly resolving the host name
- // Prep the parameter
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_URLANDPORT) == HTTP_CLIENT_FLAG_URLANDPORT)
- {
- nNullOffset = pHTTPSession->HttpUrl.UrlHost.nLength - pHTTPSession->HttpUrl.UrlPort.nLength - 1;
- }
- else
- {
- nNullOffset = pHTTPSession->HttpUrl.UrlHost.nLength;
- }
-
- Backup = HTTPStrExtract(pHTTPSession->HttpUrl.UrlHost.pParam,nNullOffset,0);
- // Resolve the host name
- nRetCode = HostByName(pHTTPSession->HttpUrl.UrlHost.pParam,&Address);
-
- // Restore from backup (fix the buffer)
- HTTPStrExtract(pHTTPSession->HttpUrl.UrlHost.pParam,nNullOffset,Backup);
-
- }
-
- else
- {
- // Using a Proxy server so resolve the proxy host name
- nRetCode = HostByName(pHTTPSession->HttpProxy.ProxyHost,&Address);
- }
-
- // See if we have a valid response from the net resolve operation
- /*
- if(nRetCode)
- {
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_RESOLVE;
- break;
- }
- */
- // Reset the address structures
- memset(&ServerAddress, 0, sizeof(HTTP_SOCKADDR_IN));
- memset(&LoaclAddress, 0, sizeof(HTTP_SOCKADDR_IN));
-
- // Fill in the address structure
- ServerAddress.sin_family = AF_INET;
-#ifdef _HTTP_BUILD_AMT
- ServerAddress.sin_len = sizeof(HTTP_SOCKADDR_IN);
- ServerAddress.sin_addr.s_addr = htonl(Address); // Server's address
-#endif
-#ifdef _HTTP_BUILD_WIN32
- ServerAddress.sin_addr.s_addr = Address; // Server's address
-#endif
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_USINGPROXY) != HTTP_CLIENT_FLAG_USINGPROXY)
- {
- // Use the remote web server port
- ServerAddress.sin_port = htons(pHTTPSession->HttpUrl.nPort); // Host Port number
- }
- else
- {
- // Use the proxy port
- ServerAddress.sin_port = htons(pHTTPSession->HttpProxy.nProxyPort); // Proxy Port number
- }
-
- // Client-side Binding
- if(pHTTPSession->HttpConnection.HttpClientPort != 0)
- {
- LoaclAddress.sin_family = AF_INET;
-#ifdef _HTTP_BUILD_AMT
- LoaclAddress.sin_len = sizeof(HTTP_SOCKADDR_IN);
-#endif
- LoaclAddress.sin_port = htons((unsigned short)pHTTPSession->HttpConnection.HttpClientPort);
-
- nRetCode = bind(pHTTPSession->HttpConnection.HttpSocket,
- (HTTP_SOCKADDR*)&LoaclAddress,
- sizeof(HTTP_SOCKADDR_IN));
-
- if(nRetCode != 0)
- {
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_BIND;
- }
- }
-
- // Connect using TLS or otherwise clear connection
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_SECURE) == HTTP_CLIENT_FLAG_SECURE)
- { // Is it a TLS connection?
- nRetCode = HTTPWrapperSSLConnect(pHTTPSession->HttpConnection.HttpSocket, // Socket
- (HTTP_SOCKADDR*)&ServerAddress, // Server address
- sizeof(HTTP_SOCKADDR), // Length of server address structure
- "desktop"); // Hostname (ToDo: Fix this)
- }
- else // Non TLS so..
- {
- nRetCode = connect(pHTTPSession->HttpConnection.HttpSocket, // Socket
- (HTTP_SOCKADDR*)&ServerAddress, // Server address
- sizeof(HTTP_SOCKADDR)); // Length of server address structure
- }
-
- // The socket was set to be asyn so we should check the error being returned from connect()
- nRetCode = SocketGetErr(pHTTPSession->HttpConnection.HttpSocket);
- if(nRetCode == 0 || nRetCode == HTTP_EWOULDBLOCK || nRetCode == HTTP_EINPROGRESS)
- {
- // Set TLS Nego flag to flase
- pHTTPSession->HttpConnection.TlsNego = FALSE;
- // Set the Write fd_sets for a socket connection event
- FD_SET(pHTTPSession->HttpConnection.HttpSocket, &pHTTPSession->HttpConnection.FDWrite);
- // Set the state flag
- pHTTPSession->HttpState = pHTTPSession->HttpState | HTTP_CLIENT_STATE_HOST_CONNECTED;
- // We have connected so set the return value to success
- nRetCode = HTTP_CLIENT_SUCCESS;
- break;
- }
- else
- {
- // Socket connection problem
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_CONNECT;
- break;
- }
- }while(0);
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnConnectionOpen",NULL,0,"");
- }
-#endif
-
- return nRetCode;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnSend
-// Purpose : Send data to the remote server (Asynchronous sockets)
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnSend (P_HTTP_SESSION pHTTPSession,
- CHAR *pData, // [IN] a pointer to the data to be sent
- UINT32 *nLength) // [IN OUT] Length of data to send and the transmitted bytes count
-{
-
- INT32 nSocketEvents; // Socket events center
- INT32 nRetCode = HTTP_CLIENT_SUCCESS; // a function return code value
- HTTP_TIMEVAL Timeval = { 1 , 0 }; // Timeout value for the socket() method
- HTTP_CONNECTION *pConnection = NULL; // Pointer for the connection structure
-
-
- do
- {
- // Validate the session pointer
- if(!pHTTPSession)
- {
- nRetCode = HTTP_CLIENT_ERROR_INVALID_HANDLE;
- break;
- }
-
- // Have a pointer on the internal connection structure for simplifying code reading
- pConnection = &pHTTPSession->HttpConnection;
-
- while(1)
- {
-
- // Check for timeout
- if(HTTPIntrnSessionEvalTimeout(pHTTPSession) == TRUE)
- {
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_TIME_OUT;
- break;
- }
-
- // Reset socket events , only Error, since we don't want to get
- // a repeated Write events (socket is connected)
-
- FD_SET(pConnection->HttpSocket, &pConnection->FDError);
-
- // See if we got any events on the socket
- nSocketEvents = select((pConnection->HttpSocket + 1), 0,
- &pConnection->FDWrite,
- &pConnection->FDError,
- &Timeval);
-
- if(nSocketEvents < 0) // No events on the socket
- {
- *(nLength) = 0;
- break; // To-Do: This might be an error
- }
-
- if(nSocketEvents == 0) // No new events so
- {
- continue; // restart this loop
- }
-
- // Socket is writable (we are connected) so send the data
- if(FD_ISSET(pConnection->HttpSocket ,&pConnection->FDWrite))
- {
-
- // Send the data
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_SECURE) == HTTP_CLIENT_FLAG_SECURE)
- {
- // TLS Protected connection
- if(pConnection->TlsNego == FALSE)
- {
- nRetCode = HTTPWrapperSSLNegotiate(pConnection->HttpSocket,0,0,"desktop");
- if(nRetCode != 0)
- {
- // TLS Error
- nRetCode = HTTP_CLIENT_ERROR_TLS_NEGO;
- break;
- }
- pConnection->TlsNego = TRUE;
- }
- nRetCode = HTTPWrapperSSLSend(pConnection->HttpSocket,pData,*(nLength),0);
- }
- else
- {
- nRetCode = send(pConnection->HttpSocket,pData,*(nLength),0);
- }
- if(nRetCode == SOCKET_ERROR)
- {
- //nRetCode = SocketGetErr(pHTTPSession->HttpConnection.HttpSocket); //Jerome: is reassigned in the next line
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_SEND;
- break;
- }
- // The data was sent to the remote server
- *(nLength) = nRetCode;
- nRetCode = HTTP_CLIENT_SUCCESS;
- break;
- }
-
- // We had a socket related error
- if(FD_ISSET(pConnection->HttpSocket ,&pConnection->FDError))
- {
- FD_CLR((UINT32)pConnection->HttpSocket,&pConnection->FDError);
- *(nLength) = 0;
- // To-Do: Handle this case
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_SEND;
- break;
- }
- }
- } while(0);
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnSend",pData,*(nLength),"");
- }
-#endif
-
-
- return nRetCode;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnRecv
-// Purpose : Receive data from the connected socket using asynchronous sockets
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnRecv (P_HTTP_SESSION pHTTPSession,
- CHAR *pData, // [IN] a pointer for a buffer that receives the data
- UINT32 *nLength, // [IN OUT] Length of the buffer and the count of the received bytes
- BOOL PeekOnly) // [IN] State if we should only peek the socket (default is no)
-{
- INT32 nSocketEvents;
- INT32 nRetCode = HTTP_CLIENT_SUCCESS;
- HTTP_TIMEVAL Timeval = { 0, 50000 };
- HTTP_CONNECTION *pConnection = NULL;
-
- do
- {
- if(!pHTTPSession)
- {
- nRetCode = HTTP_CLIENT_ERROR_INVALID_HANDLE;
- break;
- }
-
- // Set a pointer on the session internal connection structure (simplify code reading)
- pConnection = &pHTTPSession->HttpConnection;
- while(1)
- {
- // Check for timeout
- if(HTTPIntrnSessionEvalTimeout(pHTTPSession) == TRUE)
- {
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_TIME_OUT;
- break;
- }
-
-
- // Reset socket events
- FD_SET(pConnection->HttpSocket, &pConnection->FDRead);
- FD_SET(pConnection->HttpSocket, &pConnection->FDError);
-
- // See if we got any events on the socket
- nSocketEvents = select(pConnection->HttpSocket + 1, &pConnection->FDRead,
- 0,
- &pConnection->FDError,
- &Timeval);
-
- if(nSocketEvents < 0) // Error or no new socket events
- {
- *(nLength) = 0;
- break;
- }
- if(nSocketEvents == 0)
- {
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////
- // This is a simple bypass for the TSL session (for some reason the socket read event is not set so
- // The pending bytes on the socket are being checked manualy.
- // TLS hack:
-
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_SECURE) == HTTP_CLIENT_FLAG_SECURE)
- {
- nRetCode = HTTPWrapperSSLRecvPending(pConnection->HttpSocket);
- if(nRetCode > 0)
- {
- // Recive without being notified by the socket event
- if((nRetCode = HTTPWrapperSSLRecv(pConnection->HttpSocket,pData,*(nLength),0)) == SOCKET_ERROR)
- {
- // Socket error
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_RECV;
- break;
- }
- *(nLength) = nRetCode;
- // Break on no data or server connection reset
- if ( nRetCode == 0 || nRetCode == HTTP_ECONNRESET)
- {
- // Connection closed, simply break - this is not an error
- nRetCode = HTTP_CLIENT_EOS; // Signal end of stream
- break;
- }
- // We have successfully got the data from the server
- nRetCode = HTTP_CLIENT_SUCCESS;
- break;
- }
- }
- // End Of the TLS bypass section
- //
- /////////////////////////////////////////////////////////////////////////////////////////////////
-
- continue; // select() timed out - restart this loop
- }
- if(FD_ISSET(pConnection->HttpSocket ,&pConnection->FDRead)) // Are there any read events on the socket ?
- {
- // Clear the event
- FD_CLR((UINT32)pConnection->HttpSocket,&pConnection->FDRead);
-
- // Socket is readable so so read the data
- if(PeekOnly == FALSE)
- {
- // Get the data (secuure)
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_SECURE) == HTTP_CLIENT_FLAG_SECURE)
- {
- if((nRetCode = HTTPWrapperSSLRecv(pConnection->HttpSocket,pData,*(nLength),0)) == SOCKET_ERROR)
- {
- // Socket error
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_RECV;
- break;
- }
- }
- else // Get the data (non secuure)
- {
- if((nRetCode = recv(pConnection->HttpSocket,pData,*(nLength),0)) == SOCKET_ERROR)
- {
- // Socket error
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_RECV;
- break;
- }
- }
-
- }
- else
- {
- // Only peek te socket
- if((nRetCode = recv(pConnection->HttpSocket,pData,*(nLength),MSG_PEEK)) == SOCKET_ERROR)
- {
- // Socket error
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_RECV;
- break;
- }
-
- }
- *(nLength) = nRetCode;
- // Break on no data or server connection reset
- // MSDN: If the connection has been gracefully closed, the return value is zero.
- if ( nRetCode == 0 || nRetCode == HTTP_ECONNRESET)
- {
- // Connection closed, simply break - this is not an error
- nRetCode = HTTP_CLIENT_EOS; // Signal end of stream
- break;
- }
- // We have successfully got the data from the server
- nRetCode = HTTP_CLIENT_SUCCESS;
- break;
- }
-
- // We had a socket related error
- if(FD_ISSET(pConnection->HttpSocket ,&pConnection->FDError))
- {
- FD_CLR((UINT32)pConnection->HttpSocket,&pConnection->FDError);
- *(nLength) = 0;
-
- // To-Do: Handle this case
- nRetCode = HTTP_CLIENT_ERROR_SOCKET_RECV;
- break;
-
- }
- }
- }while(0);
-
- return nRetCode;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnGetRemoteChunkLength
-// Purpose : Receive (byte by byte) the chunk parameter (while in chunk mode receive) and
-// Convert the HEX string into an integer
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnGetRemoteChunkLength (P_HTTP_SESSION pHTTPSession)
-{
-
- UINT32 nBytesRead = 1;
- UINT32 nRetCode = HTTP_CLIENT_SUCCESS;
- UINT32 nBytesCount = 0;
- CHAR ChunkHeader[HTTP_CLIENT_MAX_CHUNK_HEADER];
- CHAR *pPtr;
-
- do
- {
- if(!pHTTPSession)
- {
- nRetCode = HTTP_CLIENT_ERROR_INVALID_HANDLE;
- break;
- }
-
- // Read byte by byte until we get a CrLf
- pPtr = ChunkHeader; // Get a pointer to the received buffer
- *pPtr = 0; // Terminate with null
-
- while(nBytesRead > 0)
- {
- // Receive a single byte
- nRetCode = HTTPIntrnRecv(pHTTPSession,pPtr,&nBytesRead,FALSE);
- // Did we succeed?
- if(nRetCode == HTTP_CLIENT_SUCCESS && nBytesRead > 0)
- {
- // Increment the bytes count
- nBytesCount += nBytesRead;
- if(nBytesRead > HTTP_CLIENT_MAX_CHUNK_HEADER)
- {
- // Error chunk buffer is full
- nRetCode = HTTP_CLIENT_ERROR_CHUNK_TOO_BIG;
- break;
- }
- // Don't Process if the fist 2 bytes are CrLf.
- if(! ((nBytesCount == 1 && *pPtr == 0x0d) || (nBytesCount == 2 && *pPtr == 0x0a)))
- {
- // Advance the pointer by the received data length
- pPtr += nBytesRead;
- // Look for CrLf in the last 2 bytes
- if(memcmp(pPtr - 2,HTTP_CLIENT_CRLF,2) == 0)
- {
- // Chunk Header was received
- *pPtr = 0; // null terminate the chunk parameter
- pHTTPSession->HttpCounters.nRecivedChunkLength = HTTPStrHToL(ChunkHeader); // Convert to a number
- // Set the HTTP counters
- pHTTPSession->HttpCounters.nBytesToNextChunk = pHTTPSession->HttpCounters.nRecivedChunkLength;
- break;
- }
- }
- }
- else // Socket Error
- {
- nRetCode = 0;
- break;
- }
- }
- } while(0);
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnGetRemoteChunkLength",NULL,0,"Next chunk is %d bytes",pHTTPSession->HttpCounters.nRecivedChunkLength);
- }
-#endif
-
- return nRetCode;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnGetRemoteHeaders
-// Purpose : Perform a socket receive (byte by byte) until all the HTTP headers are received
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnGetRemoteHeaders (P_HTTP_SESSION pHTTPSession)
-{
-
- UINT32 nBytesRead = 1;
- UINT32 nRetCode = HTTP_CLIENT_SUCCESS;
- UINT32 nProjectedHeaderLength;
- UINT32 nProjectedBufferLength;
- INT32 nCurrentfreeSpace;
- INT32 nProjectedfreeSpace;
- CHAR *pPtr;
-
- do
- {
- if(!pHTTPSession)
- {
- nRetCode = HTTP_CLIENT_ERROR_INVALID_HANDLE;
- break;
- }
-
- // Read byte by byte until we get CrLf followed by CrLf
- // Set the incoming headers pointer
-
- if(!pHTTPSession->HttpHeaders.HeadersIn.pParam)
- {
- /// The incoming headers starts where the outgoing headers ends
- pHTTPSession->HttpHeaders.HeadersIn.pParam = pHTTPSession->HttpHeaders.HeadersOut.pParam + pHTTPSession->HttpHeaders.HeadersOut.nLength;
- }
-
- // Receive until we get all the headers or any other error event
- while(nBytesRead > 0)
- {
-
- // Size of the projected buffer we are going to receive
- nProjectedHeaderLength = nBytesRead;
- // Size of the projected total incoming buffer
- nProjectedBufferLength = nProjectedHeaderLength + pHTTPSession->HttpHeaders.HeadersOut.nLength + pHTTPSession->HttpHeaders.HeadersIn.nLength;
- // Current free space on the incoming headers buffer
- nCurrentfreeSpace = pHTTPSession->HttpHeaders.HeadersBuffer.nLength - (pHTTPSession->HttpHeaders.HeadersOut.nLength + pHTTPSession->HttpHeaders.HeadersIn.nLength);
- // Projected free space after the completion of the receive
- nProjectedfreeSpace = nCurrentfreeSpace - nProjectedHeaderLength;
-
- // Check total size limit
- if(nProjectedBufferLength > HTTP_CLIENT_MAX_SEND_RECV_HEADERS)
- {
- return HTTP_CLIENT_ERROR_NO_MEMORY;
- }
-
- if((INT32)nProjectedfreeSpace < 0)
- {
- if(HTTP_CLIENT_MEMORY_RESIZABLE == FALSE)
- {
- // Need more space but we can't grow beyond the current size
- nRetCode = HTTP_CLIENT_ERROR_NO_MEMORY;
- break;
- }
- else
- {
- // We can resizes so..
- nRetCode = HTTPIntrnResizeBuffer(pHTTPSession,nProjectedBufferLength + HTTP_CLIENT_MEMORY_RESIZE_FACTOR);
- if(nRetCode != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
- }
- // Jump to the beginning of the incoming headers (just after the end of the outgoing headers)
- pPtr = pHTTPSession->HttpHeaders.HeadersIn.pParam + pHTTPSession->HttpHeaders.HeadersIn.nLength;
- // Read a single byte
- nRetCode = HTTPIntrnRecv(pHTTPSession,pPtr,&nBytesRead,FALSE);
-
- // ToDo: Break if not getting HTTP on the first 4 bytes
-
- if(nRetCode == HTTP_CLIENT_SUCCESS && nBytesRead > 0)
- {
- // Advance the pointer by 1 byte
- pPtr += nBytesRead;
- // Increase the total receive length
- pHTTPSession->HttpHeaders.HeadersIn.nLength++;
-
- // Set the HTTP counters
- pHTTPSession->HttpCounters.nRecivedHeaderLength++;
-
- if(memcmp(pPtr - 4,HTTP_CLIENT_CRLFX2,4) == 0)
- {
- // Headers were received
- break;
- }
- }
- else
- {
- nRetCode = HTTP_CLIENT_ERROR_HEADER_RECV; // This was marked out for some reason
- break;
- }
- }
- }while(0);
-
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnGetRemoteHeaders",NULL,0,"Got %d bytes",pHTTPSession->HttpHeaders.HeadersIn.nLength);
- }
-#endif
-
- return nRetCode;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnHeadersFind
-// Purpose : Look for a header (insensitive search) by its name
-// Gets : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnHeadersFind (P_HTTP_SESSION pHTTPSession,CHAR *pHeaderName,
- HTTP_PARAM *pParam, // [OUT] HTTP parameter structure that holds the search results
- BOOL IncommingHeaders, // [IN] Indicate if we are to search in the incoming or outgoing headers
- UINT32 nOffset) // [IN] Optionaly privide an offset to start looking from
-{
- CHAR *pHeaderEnd;
- CHAR Header[HTTP_CLIENT_MAX_HEADER_SEARCH_CLUE]; // To-Do: Use pointers insted of fixed length
- UINT32 nLength;
- UINT32 nRetCode = HTTP_CLIENT_ERROR_HEADER_NOT_FOUND;
-
- do
- {
- if(!pHTTPSession)
- {
- nRetCode = HTTP_CLIENT_ERROR_INVALID_HANDLE;
- break;
- }
-
- // Reset the input parameter structure
- pParam->pParam = NULL;
- pParam->nLength = 0;
- // Get the requested header length
- nLength = strlen(pHeaderName);
- if(nLength > (HTTP_CLIENT_MAX_HEADER_SEARCH_CLUE - 3))
- {
- // Error : header search clue too big
- nRetCode = HTTP_CLIENT_ERROR_HEADER_BIG_CLUE;
- break;
- }
- // Build the searched header name , add a leading CrLf before the header name and trailing ":"
- memset(Header,0x00,HTTP_CLIENT_MAX_HEADER_SEARCH_CLUE);
- strcpy(Header,HTTP_CLIENT_CRLF);
- strcat(Header,pHeaderName);
- strcat(Header,":");
- // Case insensitive search for the header name (search the incoming headers)
- if(IncommingHeaders == TRUE)
- {
- pParam->pParam = HTTPStrCaseStr(pHTTPSession->HttpHeaders.HeadersIn.pParam + nOffset,
- pHTTPSession->HttpHeaders.HeadersIn.nLength,
- Header);
- }
- else
- {
- // Optionally search the outgoing headers
- pParam->pParam = HTTPStrCaseStr(pHTTPSession->HttpHeaders.HeadersOut.pParam + nOffset,
- pHTTPSession->HttpHeaders.HeadersOut.nLength,
- Header);
- }
-
- if(pParam->pParam) // Did we find it?
- {
- // Search for the token end (trailing CrLf)
- pHeaderEnd = strstr(pParam->pParam + 2,HTTP_CLIENT_CRLF);
- if(pHeaderEnd)
- {
- // Get the length (up to the CrLf)
- pParam->nLength = pHeaderEnd - pParam->pParam;
- nRetCode = HTTP_CLIENT_SUCCESS;
- break;
-
- }
- }
- }while(0);
-
- // Could not find the header
- return nRetCode;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnAuthenticate
-// Purpose :
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnAuthenticate(P_HTTP_SESSION pHTTPSession)
-{
- UINT32 nRetCode = HTTP_CLIENT_SUCCESS; // Function call return code
- UINT32 nBytes = 32;
- UINT32 nTotalBytes = 0;
- CHAR ErrorPage[32];
- BOOL NewConnection = FALSE;
-
-
- do
- {
- // Validate the session pointer
- if(!pHTTPSession)
- {
- nRetCode = HTTP_CLIENT_ERROR_INVALID_HANDLE;
- break;
- }
-
- // Handle connection close message (reconnect)
- if(pHTTPSession->HttpHeadersInfo.Connection == FALSE)
- {
- // Gracefully close the connection and set the socket as invalid
- if(pHTTPSession->HttpConnection.HttpSocket != HTTP_INVALID_SOCKET)
- {
- HTTPIntrnConnectionClose(pHTTPSession);
- }
- // Connect to the remote server (or proxy)
- nRetCode = HTTPIntrnConnectionOpen(pHTTPSession);
- if(nRetCode != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
-
- NewConnection = TRUE;
- }
-
- // Analyze the security headers and optionally build the authentication reply header
- if((nRetCode = HTTPIntrnParseAuthHeader(pHTTPSession))!= HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // We have to recive any HTML data here inorder to "Clear" the socket buffer for later usage
- // Note: We should skip this when the HEAD verb was used
- while(NewConnection == FALSE && pHTTPSession->HttpHeaders.HttpLastVerb != VerbHead && pHTTPSession->HttpHeadersInfo.nHTTPContentLength > 0 && nBytes > 0)
- {
- ErrorPage[0] = 0;
- if((nRetCode = HTTPIntrnRecv(pHTTPSession,ErrorPage,&nBytes,FALSE)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
-
- nTotalBytes += nBytes;
- if(nTotalBytes >= pHTTPSession->HttpHeadersInfo.nHTTPContentLength)
- {
- break;
- }
- }
-
- // Re-Send the headers after having analyzed the authorizaton headers
- if((nRetCode = HTTPIntrnHeadersSend(pHTTPSession,pHTTPSession->HttpHeaders.HttpVerb)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
-
- }while(0);
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnAuthenticate",NULL,0,"");
- }
-#endif
-
- return nRetCode;
-
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnHeadersParse
-// Purpose : Parse the HTTP incoming headers.
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnHeadersParse (P_HTTP_SESSION pHTTPSession)
-{
-
- CHAR *pPtr; // a pointer that points on the incoming headers
- UINT32 nTokenLength = 0; // Length of the parsed token
- UINT32 nRetCode = HTTP_CLIENT_SUCCESS; // a function return code value
- UINT32 nOffset = 0; // Bytes offset (strings comperision)
- CHAR HTTPToken[HTTP_CLIENT_MAX_TOKEN_LENGTH]; // Buffer for the parsed HTTP token
- HTTP_PARAM HTTPParam; // A generic pointer\length parameter for parsing
- BOOL AuthHeaders = FALSE; // While we are searching the authentication methods
-
- do
- {
- // Validate the session pointer
- if(!pHTTPSession)
- {
- nRetCode = HTTP_CLIENT_ERROR_INVALID_HANDLE;
- break;
- }
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnHeadersParse",pHTTPSession->HttpHeaders.HeadersIn.pParam,pHTTPSession->HttpHeaders.HeadersIn.nLength,"[Incomming Headers]");
- }
-#endif
-
-
- // Set a pointer on the incoming headers
- pPtr = pHTTPSession->HttpHeaders.HeadersIn.pParam;
-
- // Detect the leading HTTP string
- if(HTTPStrInsensitiveCompare(pPtr,"http",4) != TRUE)
- {
- nRetCode = HTTP_CLIENT_ERROR_BAD_HEADER;
- break;
- }
-
- // Get the HTTP Version
- while ((*pPtr) && (*pPtr != 0x20))
- {
- nTokenLength++;
- pPtr++; // Move to the first space
- }
- strncpy(pHTTPSession->HttpHeadersInfo.HTTPVersion,
- pPtr - nTokenLength,
- MIN(15,nTokenLength));
- pPtr++;
-
- // Get the HTTP status code
- memset(HTTPToken,0x00,HTTP_CLIENT_MAX_TOKEN_LENGTH);
- nTokenLength = 0;
- while ((*pPtr) && (*pPtr != 0x20))
- {
- nTokenLength++;
- pPtr++; // Move to the next space
- }
- strncpy(HTTPToken,(pPtr - nTokenLength),MIN(HTTP_CLIENT_MAX_TOKEN_LENGTH,nTokenLength));
-
- pHTTPSession->HttpHeadersInfo.nHTTPStatus = atol(HTTPToken);
-
- // Search for content length
- pHTTPSession->HttpHeadersInfo.nHTTPContentLength = 0; // Default no unknown length
- // Look for the token
- if(HTTPIntrnHeadersFind(pHTTPSession,"content-length",&HTTPParam,TRUE,0) == HTTP_CLIENT_SUCCESS)
- {
-
- memset(HTTPToken,0x00,HTTP_CLIENT_MAX_TOKEN_LENGTH); // Reset the token buffer
- nTokenLength = HTTP_CLIENT_MAX_TOKEN_LENGTH; // Set the buffer length
- // Attempt to extract the token
- if(HTTPStrGetToken(HTTPParam.pParam,HTTPParam.nLength,HTTPToken,&nTokenLength))
- {
- // Convert the content-length into an integer.
- pHTTPSession->HttpHeadersInfo.nHTTPContentLength = atol(HTTPToken);
- }
- }
-
- // Search for connection status
- pHTTPSession->HttpHeadersInfo.Connection = TRUE; // Default status where no server connection header was detected
- // Look for token (can be standard connection or a proxy connection)
- if( (HTTPIntrnHeadersFind(pHTTPSession,"connection",&HTTPParam,TRUE,0) == HTTP_CLIENT_SUCCESS) ||
- (HTTPIntrnHeadersFind(pHTTPSession,"proxy-connection",&HTTPParam,TRUE,0) == HTTP_CLIENT_SUCCESS))
- {
-
- memset(HTTPToken,0x00,HTTP_CLIENT_MAX_TOKEN_LENGTH);
- nTokenLength = HTTP_CLIENT_MAX_TOKEN_LENGTH;
- // Attempt to extract the token
- if(HTTPStrGetToken(HTTPParam.pParam,HTTPParam.nLength,HTTPToken,&nTokenLength))
- {
- // Is this a keep alive session?
- pHTTPSession->HttpHeadersInfo.Connection = HTTPStrInsensitiveCompare(HTTPToken,"keep-alive",0);
- // Is it a closed session
- if(HTTPStrInsensitiveCompare(HTTPToken,"close",0) == TRUE)
- {
- pHTTPSession->HttpHeadersInfo.Connection = FALSE;
- }
- }
- }
-
- // Search for chunking mode transfer
- pHTTPSession->HttpFlags = pHTTPSession->HttpFlags &~ HTTP_CLIENT_FLAG_CHUNKED; // Remove the flag
- if(HTTPIntrnHeadersFind(pHTTPSession,"transfer-encoding",&HTTPParam,TRUE,0) == HTTP_CLIENT_SUCCESS)
- {
-
- memset(HTTPToken,0x00,HTTP_CLIENT_MAX_TOKEN_LENGTH);
- nTokenLength = HTTP_CLIENT_MAX_TOKEN_LENGTH;
- if(HTTPStrGetToken(HTTPParam.pParam,HTTPParam.nLength,HTTPToken,&nTokenLength))
- {
- // If the chunks token was find then set the session flag accordingly
- if(HTTPStrInsensitiveCompare(HTTPToken,"chunked",0) == TRUE)
- {
- pHTTPSession->HttpFlags = pHTTPSession->HttpFlags | HTTP_CLIENT_FLAG_CHUNKED;
- }
- }
- }
- // Look for the authentication header
- while(AuthHeaders == FALSE) // address multiple authentication methods presented by the server
- {
- if(pHTTPSession->HttpHeadersInfo.nHTTPStatus == HTTP_STATUS_UNAUTHORIZED)
- {
- // Double check for the "www-authenticate" header token
- if(HTTPIntrnHeadersFind(pHTTPSession,"www-authenticate",&pHTTPSession->HttpAuthHeader.AuthHeader,TRUE,nOffset) != HTTP_CLIENT_SUCCESS)
- {
- if(nOffset > 0) // an authentication header was found but not the right one so adjust the error
- {
- nRetCode = HTTP_CLIENT_ERROR_AUTH_MISMATCH;
- }
- else
- {
- nRetCode = HTTP_CLIENT_ERROR_BAD_HEADER;
- }
-
- break;
- }
-
- // Make sure that we get an authentication header that maches the caller requested schema
- pPtr = HTTPStrCaseStr(pHTTPSession->HttpAuthHeader.AuthHeader.pParam,
- pHTTPSession->HttpAuthHeader.AuthHeader.nLength,
- pHTTPSession->HttpCredentials.AuthSchemaName);
- if(pPtr)
- {
- AuthHeaders = TRUE;
- }
- else
- {
- // Simply pass the point where the last "www" was found
- nOffset = (pHTTPSession->HttpAuthHeader.AuthHeader.pParam - pHTTPSession->HttpHeaders.HeadersIn.pParam) + 3;
- }
- }
- else
- {
- AuthHeaders = TRUE;
- }
- }
-
- // Is this a proxy authentication header?
- if(pHTTPSession->HttpHeadersInfo.nHTTPStatus == HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED)
- {
- // Double check for the "Proxy-Authentication" header token
- if (HTTPIntrnHeadersFind(pHTTPSession,"proxy-authenticate",&pHTTPSession->HttpAuthHeader.AuthHeader,TRUE,0) != HTTP_CLIENT_SUCCESS)
- {
- nRetCode = HTTP_CLIENT_ERROR_BAD_HEADER;
- break;
- }
- }
-
- // Do we have a redirection response?
- if( (pHTTPSession->HttpHeadersInfo.nHTTPStatus == HTTP_STATUS_OBJECT_MOVED) ||
- (pHTTPSession->HttpHeadersInfo.nHTTPStatus == HTTP_STATUS_OBJECT_MOVED_PERMANENTLY))
- {
- // Check for the "Location" header token
- if (HTTPIntrnHeadersFind(pHTTPSession,"location",&pHTTPSession->HttpHeadersInfo.HttpRedirectURL,TRUE,0) != HTTP_CLIENT_SUCCESS)
- {
- // Protocol violation, we got a redirect code without the host name to redirect to
- nRetCode = HTTP_CLIENT_ERROR_BAD_HEADER;
- break;
- }
- // Fix the pointers location (address the "Location: " prefix)
- pHTTPSession->HttpHeadersInfo.HttpRedirectURL.pParam += 12;
- pHTTPSession->HttpHeadersInfo.HttpRedirectURL.nLength -= 12;
-
- }
-
- }while(0);
-
-
- return nRetCode;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnParseAuthHeader
-// Purpose : Parse the HTTP headers for the required authentication method
-// Gets :
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnParseAuthHeader(P_HTTP_SESSION pHTTPSession)
-{
-
- CHAR *pPtrStart, *pPtrEnd;
-
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- if(pHTTPSession->HttpProxy.ProxyAuthSchema != AuthSchemaNone)
- {
- // for proxy authentication simply assume basic and exit
- return HTTP_CLIENT_SUCCESS;
- }
- // Advance the pointer in the string and break on the first space
- pPtrEnd = pHTTPSession->HttpAuthHeader.AuthHeader.pParam + pHTTPSession->HttpAuthHeader.AuthHeader.nLength;
- pPtrStart = pHTTPSession->HttpAuthHeader.AuthHeader.pParam;
- // Jump to the first space
- while ((pPtrEnd - pPtrStart) > 0 && *pPtrStart != 0x20) pPtrStart++;
-
- do
- {
- if(HTTPStrCaseStr(pPtrStart,8,"basic"))
- {
- pHTTPSession->HttpAuthHeader.HTTP_AUTH_SCHEMA = AuthSchemaBasic;
- break;
- }
-
- if(HTTPStrCaseStr(pPtrStart,8,"digest"))
- {
- pHTTPSession->HttpAuthHeader.HTTP_AUTH_SCHEMA = AuthSchemaDigest;
- break;
- }
- if(HTTPStrCaseStr(pPtrStart,8,"negotiate")) // Note that this could be NLM negotiation as well (which is not supported)
- {
- pHTTPSession->HttpAuthHeader.HTTP_AUTH_SCHEMA = AuthSchemaKerberos;
- break;
- }
- // To-Do: Add any other supported authentication method
- }
- while(0);
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnParseAuthHeader",pHTTPSession->HttpAuthHeader.AuthHeader.pParam,
- pHTTPSession->HttpAuthHeader.AuthHeader.nLength,"[Incomming Auth Headers: %d]",pHTTPSession->HttpAuthHeader.HTTP_AUTH_SCHEMA);
- }
-#endif
-
- // If we could not detect the authentication schema return an error
- if(pHTTPSession->HttpAuthHeader.HTTP_AUTH_SCHEMA == AuthSchemaNone)
- {
- return HTTP_CLIENT_ERROR_BAD_AUTH;
- }
-
- //Make sure we are going to authenticate with the method specified by the caller
- if(pHTTPSession->HttpAuthHeader.HTTP_AUTH_SCHEMA != (UINT32)pHTTPSession->HttpCredentials.CredAuthSchema)
- {
- return HTTP_CLIENT_ERROR_AUTH_MISMATCH;
- }
-
-
- return HTTP_CLIENT_SUCCESS;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnHeadersSend
-// Purpose : Build and send the HTTP request. this includes the HTTP headers
-// and any required authentication data
-// Gets :
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnHeadersSend(P_HTTP_SESSION pHTTPSession,
- HTTP_VERB HttpVerb) // [IN] Argument that can bypass the requested verb
- // Can be used for evaluating a HEAD request
-{
-
- UINT32 nBytes;
- UINT32 nRetCode = HTTP_CLIENT_SUCCESS;
- CHAR RequestCmd[16];
- CHAR ContentLength[32];
- BOOL RestoreHeadersFlag = FALSE;
- HTTP_VERB HttpCachedVerb;
- //CHAR *pPtr; // Content length conversion //Jerome/cppcheck: Variable 'pPtr' is assigned a value that is never used.
-
- if(!pHTTPSession)
- {
- // Bad session pointer error
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnHeadersSend",NULL,
- 0,"Using Verb: %d",(INT32)HttpVerb);
- }
-#endif
- // Cache the original VERB
- HttpCachedVerb = pHTTPSession->HttpHeaders.HttpVerb;
-
- do
- {
-
- // Set the verb (temporarily)
- if(pHTTPSession->HttpHeaders.HttpVerb != HttpVerb)
- {
- if((nRetCode = HTTPClientSetVerb((HTTP_SESSION_HANDLE)pHTTPSession,HttpVerb)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
-
- // Remeber this state for later usage
- pHTTPSession->HttpHeaders.HttpLastVerb = pHTTPSession->HttpHeaders.HttpVerb;
-
- // If this is a head request we should temporary remove the chunking header and the content length header
- if(pHTTPSession->HttpHeaders.HttpVerb == VerbHead)
- {
-
- // If send in chunks flag was set
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_SEND_CHUNKED) == HTTP_CLIENT_FLAG_SEND_CHUNKED)
- {
- // Chunking
- if((nRetCode = HTTPIntrnHeadersRemove(pHTTPSession,"Transfer-Encoding")) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
- // Content-Length
- if(pHTTPSession->HttpHeadersInfo.nHTTPPostContentLength > 0) // Attempt to remove only if it was previusly set
- {
- if((nRetCode = HTTPIntrnHeadersRemove(pHTTPSession,"Content-Length")) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
-
- RestoreHeadersFlag = TRUE; // So it would be restored later
- }
- // Request Verb
- nBytes = strlen(pHTTPSession->HttpHeaders.Verb) + 1;
- memset(RequestCmd,0x00,16);
- strcpy(RequestCmd,pHTTPSession->HttpHeaders.Verb);
- strcat(RequestCmd," ");
- if((nRetCode = HTTPIntrnSend(pHTTPSession,RequestCmd,&nBytes)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nBytes;
-
-
- // Request URI
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_USINGPROXY) != HTTP_CLIENT_FLAG_USINGPROXY)
- {
- nBytes = pHTTPSession->HttpUrl.UrlRequest.nLength;
- if((nRetCode = HTTPIntrnSend(pHTTPSession,pHTTPSession->HttpUrl.UrlRequest.pParam,&nBytes)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nBytes;
- }
- else
- {
- nBytes = strlen(pHTTPSession->HttpUrl.Url);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,pHTTPSession->HttpUrl.Url,&nBytes)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nBytes;
- }
- // Request HTTP Version
- //memset(RequestCmd+1,0x00,15); //Jerome: memory is overwritten in the next line
- strcpy(RequestCmd," ");
- strcat(RequestCmd,HTTP_CLIENT_DEFAULT_VER);
- strcat(RequestCmd,HTTP_CLIENT_CRLF);
- nBytes = strlen(RequestCmd);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,RequestCmd,&nBytes)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nBytes;
-
- // Request headers
- nBytes = pHTTPSession->HttpHeaders.HeadersOut.nLength;
- if((nRetCode = HTTPIntrnSend(pHTTPSession,pHTTPSession->HttpHeaders.HeadersOut.pParam,&nBytes)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nBytes;
-
- // Optionally add authentication headers and send them (for host or proxy authentication)
- if(pHTTPSession->HttpHeadersInfo.nHTTPStatus == HTTP_STATUS_UNAUTHORIZED || pHTTPSession->HttpHeadersInfo.nHTTPStatus == HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED )
- {
-
- if((nRetCode = HTTPIntrnAuthHandler(pHTTPSession)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
-
- // Request terminating CrLf
- nBytes = strlen(HTTP_CLIENT_CRLF);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,HTTP_CLIENT_CRLF,&nBytes)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nBytes;
-
- // Restore the verb
- if(pHTTPSession->HttpHeaders.HttpVerb != HttpCachedVerb)
- {
- if((nRetCode = HTTPClientSetVerb((HTTP_SESSION_HANDLE)pHTTPSession,HttpCachedVerb)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
-
- if(RestoreHeadersFlag == TRUE)
- {
- // Restore chunking header (since it was temporarily removed for the head request
- // Add the Transfer-Encoding: header
- if((pHTTPSession->HttpFlags & HTTP_CLIENT_FLAG_SEND_CHUNKED) == HTTP_CLIENT_FLAG_SEND_CHUNKED)
- {
- if((nRetCode = HTTPIntrnHeadersAdd(pHTTPSession,"Transfer-Encoding",17,"chunked",7))!= HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- }
- // Restore the content length
- if(pHTTPSession->HttpHeadersInfo.nHTTPPostContentLength > 0) // Attempt to remove only if it was previusly set
- {
- IToA(ContentLength,pHTTPSession->HttpHeadersInfo.nHTTPPostContentLength); // Convert the buffer length to a string value //pPtr = //Jerome/cppcheck: Variable 'pPtr' is assigned a value that is never used.
- if((nRetCode = HTTPIntrnHeadersAdd(pHTTPSession,"Content-Length",14,ContentLength,strlen(ContentLength)))!= HTTP_CLIENT_SUCCESS)
- {
- return nRetCode;
- }
- }
- }
- // Set the session stage
- pHTTPSession->HttpState = pHTTPSession->HttpState | HTTP_CLIENT_STATE_REQUEST_SENT;
-
- } while(0);
-
-
- return nRetCode; // end of HTTPIntrnSendHeaders()
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnAuthHandler
-// Purpose : Differentiate between the authenticate method that we have to implement and perform
-// the required operation.
-// Gets :
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnAuthHandler (P_HTTP_SESSION pHTTPSession)
-{
-
- UINT32 nRetCode = HTTP_CLIENT_SUCCESS;
-
- if(!pHTTPSession)
- {
- // Bad session pointer error
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- if(pHTTPSession->HttpProxy.ProxyAuthSchema != AuthSchemaNone)
- {
- // For proxy authentication simply assume basic and exit
- // Basic authentication
- nRetCode = HTTPIntrnAuthSendBasic(pHTTPSession);
- return nRetCode;
- }
-
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnAuthHandler",NULL,
- 0,"");
- }
-#endif
-
- // Use the correct authentication method as requested by the server
- switch(pHTTPSession->HttpAuthHeader.HTTP_AUTH_SCHEMA)
- {
-
- case AuthSchemaBasic:
- {
- // Basic authentication
- nRetCode = HTTPIntrnAuthSendBasic(pHTTPSession);
- break;
-
- }
- case AuthSchemaDigest:
- {
- // Digest authentication
- nRetCode = HTTPIntrnAuthSendDigest(pHTTPSession);
- break;
-
- }
- case AuthSchemaKerberos:
- {
- // ToDo: impliament the Kerberos nego authentication here
- nRetCode = HTTP_CLIENT_ERROR_NOT_IMPLEMENTED;
- break;
-
- }
- default:
- {
- // Not supported method
- return HTTP_CLIENT_ERROR_BAD_AUTH; // Not implemented error
- }
-
- };
-
- // This session requested an authentication so..
- pHTTPSession->HttpCredentials.Authentication = TRUE;
- return nRetCode;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnAuthSendBasic
-// Purpose : Handle basic authentication for direst host connection and proxy authentication
-// Gets :
-// Returns :
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-
-static UINT32 HTTPIntrnAuthSendBasic (P_HTTP_SESSION pHTTPSession)
-{
-
- UINT32 nSegmentLength;
- UINT32 nRetCode;
- CHAR Cred[HTTP_CLIENT_MAX_64_ENCODED_CRED /2]; // Credentials (Clear)
- CHAR Cred64[HTTP_CLIENT_MAX_64_ENCODED_CRED]; // Credentials (64 bit encoded)
- UINT32 nSrcLength, nDestLength;
- CHAR* pPtr;
- CHAR* INITIAL_HDR = "Authorization: Basic ";
- CHAR* INITIAL_PROXY_HDR = "Proxy-Authorization: Basic ";
-
-
- do
- {
- if(!pHTTPSession)
- {
- nRetCode = HTTP_CLIENT_ERROR_INVALID_HANDLE;
- break;
- }
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnAuthSendBasic",NULL,
- 0,"");
- }
-#endif
-
- memset(Cred,0x00,HTTP_CLIENT_MAX_64_ENCODED_CRED /2);
- memset(Cred64,0x00,HTTP_CLIENT_MAX_64_ENCODED_CRED);
-
-
- switch (pHTTPSession->HttpHeadersInfo.nHTTPStatus)
- {
- case( HTTP_STATUS_UNAUTHORIZED): // For host authentication
- {
-
- // Copy the clear text credentials to a format of user:password
- strcpy(Cred,pHTTPSession->HttpCredentials.CredUser);
- strcat(Cred,":");
- strcat(Cred,pHTTPSession->HttpCredentials.CredPassword);
- nSrcLength = strlen(Cred);
- nDestLength = HTTP_CLIENT_MAX_64_ENCODED_CRED;
- nSegmentLength = strlen(INITIAL_HDR);
- // Build and send the data first the hard-coded static portion
- if((nRetCode = HTTPIntrnSend(pHTTPSession,INITIAL_HDR, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
- // Convert to base 64
- HTTPBase64Encoder((unsigned char *)Cred64,(CONST unsigned char *)Cred,nSrcLength);
- nDestLength = strlen(Cred64);
-
- };
- break;
- case (HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED): // For Proxy authentication
- {
- // Copy the clear text credentials to a format of user:password
- strcpy(Cred,pHTTPSession->HttpProxy.ProxtUser);
- strcat(Cred,":");
- strcat(Cred,pHTTPSession->HttpProxy.ProxyPassword);
- nSrcLength = strlen(Cred);
- //nDestLength = HTTP_CLIENT_MAX_64_ENCODED_CRED; //Jerome: is reassigned few lines later
-
- // Convert to base 64
- HTTPBase64Encoder((unsigned char *)Cred64,(unsigned char *)Cred,nSrcLength);
- nDestLength = strlen(Cred64);
- nSegmentLength = strlen(INITIAL_PROXY_HDR);
- // Build and send the data first the hard-coded static portion
- if((nRetCode = HTTPIntrnSend(pHTTPSession,INITIAL_PROXY_HDR, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
- };
- break;
- default:
- {
- return HTTP_CLIENT_ERROR_BAD_AUTH; // Wrong status for this function
- };
- };
-
- // Send the base 64 encoded data
- pPtr = Cred64;
- if((nRetCode = HTTPIntrnSend(pHTTPSession,pPtr, &nDestLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nDestLength;
-
- // Terminating CRLF
- nSegmentLength = strlen(HTTP_CLIENT_CRLF);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,HTTP_CLIENT_CRLF, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
-
- } while (0);
-
- return nRetCode;
-
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnAuthSendDigest
-// Purpose : Handle digest authentication for direct host connection and proxy authentication
-// Gets :
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnAuthSendDigest (P_HTTP_SESSION pHTTPSession)
-{
- CHAR Cnonce[33];
- UINT32 nSegmentLength;
- UINT32 nRetCode;
- UINT32 nAlgType = 0; // a flag for the algorithem type (default to MD5)
- HTTP_PARAM HttpParamOpq,HttpParamRealm,HttpParamNonce,HttpParamQop,HttpParamAlg; // Pointers and lengths of the dynamic sections
- // of the Digest response.
-
-
- // Fragments of the Digest client response (The hard coded text portion of the response)
- CHAR* INITIAL_HDR = "Authorization: Digest username=\"";
- CHAR* INITIAL_PROXY_HDR = "Proxy-Authorization: Digest username=\"";
- CHAR* REALEM_HDR = "\", realm=\"";
- CHAR* QOP_HDR = "\", qop=\"";
- CHAR* ALGO_HDR = "\", algorithm=\"";
- CHAR* URI_HDR = "\", uri=\"";
- CHAR* NONCE_HDR = "\", nonce=\"";
- CHAR* NC_HDR = "\", nc=00000001, cnonce=\""; // To-Do: This should be tested!!
- CHAR* RSP_HDR = "\", response=\"";
- CHAR* OPQ_HDR = "\", opaque=\"";
- // Digest Calculation related
- HASHHEX HA1;
- HASHHEX HA2 = "";
- HASHHEX Response;
-
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnAuthSendDigest",NULL,
- 0,"");
- }
-#endif
-
- // Generate random Cnonce number
- HTTPDigestGenerateCNonce(Cnonce);
-
- switch (pHTTPSession->HttpHeadersInfo.nHTTPStatus)
- {
- case( HTTP_STATUS_UNAUTHORIZED): // For host authentication
- {
- // "Authorization: Digest username="
- nSegmentLength = strlen(INITIAL_HDR);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,INITIAL_HDR, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- return nRetCode;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
- };
- break;
- case (HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED): // For Proxy authentication
- {
- // "Proxy-Authorization: Digest username="
- nSegmentLength = strlen(INITIAL_PROXY_HDR);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,INITIAL_PROXY_HDR, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- return nRetCode;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
- };
- break;
- default:
- {
- return HTTP_CLIENT_ERROR_BAD_AUTH; // Wrong status for this function
- };
- };
-
- do
- {
-
- // "Authorization: Digest username="username
- nSegmentLength = strlen(pHTTPSession->HttpCredentials.CredUser);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,pHTTPSession->HttpCredentials.CredUser, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
- // "Authorization: Digest username="username", realm="
- nSegmentLength = strlen(REALEM_HDR);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,REALEM_HDR, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
- // "Authorization: Digest username="username", realm="realm
- if((nRetCode = HTTPStrGetDigestToken(pHTTPSession->HttpAuthHeader.AuthHeader,"realm", &HttpParamRealm)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- if((nRetCode = HTTPIntrnSend(pHTTPSession,HttpParamRealm.pParam, &HttpParamRealm.nLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += HttpParamRealm.nLength;
-
- // "Authorization: Digest username="username", realm="myRealm", qop="auth",
- nSegmentLength = strlen(QOP_HDR);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,QOP_HDR, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
- if((nRetCode = HTTPStrGetDigestToken(pHTTPSession->HttpAuthHeader.AuthHeader,"qop", &HttpParamQop)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- if((nRetCode = HTTPIntrnSend(pHTTPSession,HttpParamQop.pParam, &HttpParamQop.nLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += HttpParamQop.nLength;
-
- // "Authorization: Digest username="username", realm="myRealm", qop="auth",
- // algorithm="MD5",
-
- nSegmentLength = strlen(ALGO_HDR);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,ALGO_HDR, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
- if((nRetCode = HTTPStrGetDigestToken(pHTTPSession->HttpAuthHeader.AuthHeader,"algorithm", &HttpParamAlg)) != HTTP_CLIENT_SUCCESS)
- {
-
- // The server did not state its required algorithm so use the default
- HttpParamAlg.pParam = HTTP_CLIENT_DEFAULT_DIGEST_AUTH;
- HttpParamAlg.nLength = strlen(HTTP_CLIENT_DEFAULT_DIGEST_AUTH);
- }
- // Get the algorithem type
- if(HTTPStrInsensitiveCompare(HttpParamAlg.pParam ,"md5",3 ) == TRUE)
- {
- if(HTTPStrInsensitiveCompare(HttpParamAlg.pParam ,"md5-sess", HttpParamAlg.nLength) == TRUE)
- {
- nAlgType = 1;
- }
-
- }
- else
- {
- // Error algorithem not supported
- nRetCode = HTTP_CLIENT_ERROR_NO_DIGEST_ALG;
- break;
- }
-
- // Send the algorithem
- if((nRetCode = HTTPIntrnSend(pHTTPSession,HttpParamAlg.pParam, &HttpParamAlg.nLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += HttpParamAlg.nLength;
-
-
- // "Authorization: Digest username="username", realm="myRealm", qop="auth",
- // algorithm="MD5", uri="
- nSegmentLength = strlen(URI_HDR);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,URI_HDR, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
-
- // "Authorization: Digest username="username", realm="myRealm", qop="auth",
- // algorithm="MD5", uri="/....Service
- nSegmentLength = strlen(pHTTPSession->HttpUrl.UrlRequest.pParam);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,pHTTPSession->HttpUrl.UrlRequest.pParam, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
-
- // "Authorization: Digest username="username", realm="myRealm", qop="auth",
- // algorithm="MD5", uri="/....Service", nonce="
- nSegmentLength = strlen(NONCE_HDR);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,NONCE_HDR, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
-
- // "Authorization: Digest username="username", realm="myRealm", qop="auth",
- // algorithm="MD5", uri="/....Service", nonce="7a5c...
- if((nRetCode = HTTPStrGetDigestToken(pHTTPSession->HttpAuthHeader.AuthHeader,"nonce", &HttpParamNonce)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- if((nRetCode = HTTPIntrnSend(pHTTPSession,HttpParamNonce.pParam, &HttpParamNonce.nLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += HttpParamNonce.nLength;
-
- // "Authorization: Digest username="username", realm="myRealm", qop="auth",
- // algorithm="MD5", uri="/....Service", nonce="7a5c...", nc=00000001, cnonce="
- nSegmentLength = strlen(NC_HDR);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,NC_HDR, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
- // "Authorization: Digest username="username", realm="myRealm", qop="auth",
- // algorithm="MD5", uri="/....Service", nonce="7a5c...", nc=00000001, cnonce="ab341...
- nSegmentLength = strlen(Cnonce);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,Cnonce, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
- // Send the opaque data if we got it from the server
- if((nRetCode = HTTPStrGetDigestToken(pHTTPSession->HttpAuthHeader.AuthHeader,"opaque", &HttpParamOpq)) == HTTP_CLIENT_SUCCESS)
- {
-
- nSegmentLength = strlen(OPQ_HDR);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,OPQ_HDR, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
- if((nRetCode = HTTPIntrnSend(pHTTPSession,HttpParamOpq.pParam, &HttpParamOpq.nLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += HttpParamOpq.nLength;
-
- }
-
- // "Authorization: Digest username="username", realm="myRealm", qop="auth",
- // algorithm="MD5", uri="/....Service", nonce="7a5c...", nc=00000001, cnonce="ab341...", response="
- nSegmentLength = strlen(RSP_HDR);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,RSP_HDR, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
- // Calculate response
- HTTPDigestCalcHA1(nAlgType, pHTTPSession->HttpCredentials.CredUser,
- HttpParamRealm.pParam,HttpParamRealm.nLength ,
- pHTTPSession->HttpCredentials.CredPassword ,
- HttpParamNonce.pParam, HttpParamNonce.nLength,
- Cnonce, HA1);
-
- HTTPDigestCalcResponse(HA1,
- HttpParamNonce.pParam, HttpParamNonce.nLength,
- "00000001", Cnonce,
- HttpParamQop.pParam,HttpParamQop.nLength, pHTTPSession->HttpHeaders.Verb,
- pHTTPSession->HttpUrl.UrlRequest.pParam,pHTTPSession->HttpUrl.UrlRequest.nLength,
- HA2, Response);
-
- // "Authorization: Digest username="username", realm="myRealm", qop="auth",
- // algorithm="MD5", uri="/....Service", nonce="7a5c...", nc=00000001, cnonce="ab341...", response="8bbf2...
- nSegmentLength = strlen(Response);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,Response, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
-
- // Terminate 0x24 (")
- nSegmentLength = 1;
- if((nRetCode = HTTPIntrnSend(pHTTPSession,"\"", &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
- // Terminating CRLF
- nSegmentLength = strlen(HTTP_CLIENT_CRLF);
- if((nRetCode = HTTPIntrnSend(pHTTPSession,HTTP_CLIENT_CRLF, &nSegmentLength)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
- // Set the counters
- pHTTPSession->HttpCounters.nSentHeaderBytes += nSegmentLength;
-
- } while(0);
-
- return nRetCode; // End of digest respobse sending
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnSessionReset
-// Purpose : Reset the session data for the next operation
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnSessionReset (P_HTTP_SESSION pHTTPSession, BOOL EntireSession)
-{
- UINT32 nActionTimeout; // For restoring a parameter after this reset
- UINT32 nAllocationSize;
-
- // Validate the pointer
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- pHTTPSession->pDebug("HTTPIntrnSessionReset",NULL,
- 0,"");
- }
-#endif
-
-
- memset(pHTTPSession->HttpHeaders.HeadersIn.pParam,0x00,pHTTPSession->HttpHeaders.HeadersIn.nLength);
- pHTTPSession->HttpHeaders.HeadersIn.nLength = 0;
-
-
- // Reset the HTTP counters
- nActionTimeout = pHTTPSession->HttpCounters.nActionTimeout;
- memset(&pHTTPSession->HttpCounters,0x00,sizeof(HTTP_COUNTERS));
- pHTTPSession->HttpCounters.nActionStartTime = HTTPIntrnSessionGetUpTime();
- // Restore the parameter
- pHTTPSession->HttpCounters.nActionTimeout = nActionTimeout;
- // Reset the authentication flag
- pHTTPSession->HttpCredentials.Authentication = FALSE;
-
-
- if(EntireSession == TRUE) // Partial reset, clear only the incoming headers
- {
- memset(&pHTTPSession->HttpUrl,0,sizeof(HTTP_URL));
- nAllocationSize = pHTTPSession->HttpHeaders.HeadersBuffer.nLength;
- // Reset the headers allocated memory
- memset(pHTTPSession->HttpHeaders.HeadersBuffer.pParam ,0x00,nAllocationSize);
-
- // Set default values in the session structure
- HTTPClientSetVerb((UINT32)pHTTPSession,(HTTP_VERB)HTTP_CLIENT_DEFAULT_VERB); // Default HTTP verb
- pHTTPSession->HttpUrl.nPort = HTTP_CLIENT_DEFAULT_PORT; // Default TCP port
- // Set the outgoing headers pointers
- memset(&pHTTPSession->HttpHeaders.HeadersIn,0,sizeof(HTTP_PARAM));
- memset(&pHTTPSession->HttpHeaders.HeadersOut,0,sizeof(HTTP_PARAM));
-
- pHTTPSession->HttpHeaders.HeadersOut.pParam = pHTTPSession->HttpHeaders.HeadersBuffer.pParam;
- // Set our state
- pHTTPSession->HttpState = pHTTPSession->HttpState | HTTP_CLIENT_STATE_INIT;
-
- memset(&pHTTPSession->HttpHeadersInfo,0,sizeof(HTTP_HEADERS_INFO));
- if(pHTTPSession->HttpConnection.HttpSocket != HTTP_INVALID_SOCKET)
- {
- pHTTPSession->HttpHeadersInfo.Connection = TRUE;
- }
- memset(&pHTTPSession->HttpAuthHeader,0,sizeof(HTTP_AUTH_HEADER));
- memset(&pHTTPSession->HttpProxy,0,sizeof(HTTP_PROXY));
-
- }
-
- return HTTP_CLIENT_SUCCESS;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnHeadersReceive
-// Purpose : Receives the response header on the connection and parses it.
-// Performs any required authentication.
-// Returns : HTTP Status
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnHeadersReceive (P_HTTP_SESSION pHTTPSession,
- UINT32 nTimeout) // [IN] Timeout for the operation
-
-{
-
- UINT32 nRetCode; // Function call return code
- UINT32 nCount = 0;
- if(!pHTTPSession)
- {
- // Bad session pointer error
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- do
- {
-
-
- // Set the operation time out if was set by the caller
- if(nTimeout > 0)
- {
- // 0 makes us use the default defined value
- pHTTPSession->HttpCounters.nActionTimeout = HTTP_TIMEOUT(nTimeout);
-
- }
-
- // Reset the incoming headers
- if((nRetCode = HTTPIntrnSessionReset(pHTTPSession,FALSE)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
-
- // Get the server response
- if((nRetCode = HTTPIntrnGetRemoteHeaders(pHTTPSession)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
-
- // Set the session state
- pHTTPSession->HttpState = pHTTPSession->HttpState | HTTP_CLIENT_STATE_HEADERS_RECIVED;
-
- // Parse the response headers
- if((nRetCode = HTTPIntrnHeadersParse(pHTTPSession)) != HTTP_CLIENT_SUCCESS)
- {
- break;
- }
-
- // Set the session state
- pHTTPSession->HttpState = pHTTPSession->HttpState | HTTP_CLIENT_STATE_HEADERS_PARSED;
-
- // Set the session stage upon seccess
- if(pHTTPSession->HttpHeadersInfo.nHTTPStatus == HTTP_STATUS_OK)
- {
- pHTTPSession->HttpState = pHTTPSession->HttpState | HTTP_CLIENT_STATE_HEADERS_OK;
- }
- // Handle 100 continue message
- if(pHTTPSession->HttpHeadersInfo.nHTTPStatus != HTTP_STATUS_CONTINUE)
- {
- nCount++;
- }
-
-#ifdef _HTTP_DEBUGGING_
- if(pHTTPSession->pDebug)
- {
- if(pHTTPSession->HttpHeadersInfo.nHTTPStatus == HTTP_STATUS_CONTINUE)
- {
- pHTTPSession->pDebug("HTTPIntrnHeadersReceive",NULL,0,"100 Continue Header");
- }
- }
-#endif
-
- }while(nCount < 1);
-
- return nRetCode;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnGetTicks
-// Purpose : Like GetTickCount() (implemented with time.h)
-// Gets : void
-// Returns : System ticks
-// Last updated : 01/09/200515/05/2005
-// Author Name : Eitan Michaelson
-// Notes : Assuming 1000 ticks per sec, should be implemented by the OS
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static UINT32 HTTPIntrnSessionGetUpTime(VOID)
-{
-
- return GetUpTime();
-
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPIntrnSessionEvalTimeout
-// Purpose : Check if we have to break the operation and return a time out error
-// Gets : a pointer to the session structure
-// Returns : BOOL, True if we have to break
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-static BOOL HTTPIntrnSessionEvalTimeout(P_HTTP_SESSION pHTTPSession)
-{
-
- UINT32 nElapsedTime; // Integer for calculating the elapsed time
-
- // Validate the session pointer
- if(!pHTTPSession)
- {
- return HTTP_CLIENT_ERROR_INVALID_HANDLE;
- }
-
- // Calculate the elapsed time since the last call
- nElapsedTime = HTTPIntrnSessionGetUpTime() - pHTTPSession->HttpCounters.nActionStartTime;
- // If the elapsed time is greater then the time out value we should return true
- if(nElapsedTime >= pHTTPSession->HttpCounters.nActionTimeout)
- {
- return TRUE;
- }
-
- return FALSE;
-}
diff --git a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClient.h b/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClient.h
deleted file mode 100644
index 9bee3ce7e..000000000
--- a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClient.h
+++ /dev/null
@@ -1,306 +0,0 @@
-
-#ifndef _HTTP_CLIENT
-#define _HTTP_CLIENT
-
-#include "HTTPClientWrapper.h"
-#include "HTTPClientCommon.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- ///////////////////////////////////////////////////////////////////////////////
- //
- // Section : HTTP API global definitions
- // Last updated : 01/09/2005
- //
- ///////////////////////////////////////////////////////////////////////////////
-#ifdef _HTTP_BUILD_AMT
-#define CMSI_HTTPCLIENT_PROTOCOL_GUID {0x471b2c0e, 0x6137, 0x4d55, 0x92, 0x36, 0xdd, 0x0f, 0xdb, 0xc2, 0x52, 0xfb}
-#endif
-
- // Debug hook
- // #define _HTTP_DEBUGGING_ // Simply dumps more debugging data to the console
-
- // API Version
-#define HTTP_CLIENT_VERSION_MINOR 0
-#define HTTP_CLIENT_VERSION_MAJOR 1
-
- // Global default sizes
-#define HTTP_CLIENT_MAX_SEND_RECV_HEADERS 1024 // Maximum Send and receive buffers size
-#define HTTP_CLIENT_INIT_SEND_RECV_HEADERS 2048 // If we can resize the buffers this would be the initial size
-
-#define HTTP_CLIENT_MAX_USERNAME_LENGTH 16 // Maximum length the user name (host and proxy authentication)
-#define HTTP_CLIENT_MAX_PASSWORD_LENGTH 16 // Maximum length for the password
- // Maximum length for the base 64 encoded credentials (twice the size of the user name and password max parameters)
-#define HTTP_CLIENT_MAX_64_ENCODED_CRED ((HTTP_CLIENT_MAX_USERNAME_LENGTH + HTTP_CLIENT_MAX_PASSWORD_LENGTH) * 2) + 4
-#define HTTP_CLIENT_MAX_CHUNK_HEADER 64 // Maximum length for the received chunk header (hex - string) size
-#define HTTP_CLIENT_MAX_PROXY_HOST_LENGTH 64 // Maximum length for the proxy host name
-#define HTTP_CLIENT_MAX_TOKEN_LENGTH 512 // Maximum length for an HTTP token data (authentication header elements)
-#define HTTP_CLIENT_MAX_TOKEN_NAME_LENGTH 32 // Maximum length for an HTTP authorization token name ("qop")
-#define HTTP_CLIENT_MAX_HEADER_SEARCH_CLUE 1024 // Maximum length for a search clue string (Headers searching)
-#define HTTP_CLIENT_ALLOW_HEAD_VERB 0 // Can we use the HTTP HEAD verb in our outgoing requests?
-
-#define HTTP_CLIENT_MEMORY_RESIZABLE FALSE // Permission to dynamically resize the headers buffer
-#define HTTP_CLIENT_MEMORY_RESIZE_FACTOR 16 // Factor for memory resizing operation
-
-#define HTTP_CLIENT_DEFAULT_PORT 80 // Default HTTP port
-#define HTTP_CLIENT_DEFAULT_SSL_PORT 443 // Default HTTPS port
-#define HTTP_CLIENT_DEFAULT_VERB 0 // GET
-#define HTTP_CLIENT_DEFAULT_VER "HTTP/1.1" // We will send this in the outgoing header
-#define HTTP_CLIENT_DEFAULT_PROXY_VER "HTTP/1.0" // We will send this in the outgoing header (proxy)
-#define HTTP_CLIENT_DEFAULT_AGENT "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
-#define HTTP_CLIENT_DEFAULT_TIMEOUT 30 // Default timeout in seconds
-#define HTTP_CLIENT_DEFAULT_KEEP_ALIVE 30 // Default Keep-alive value in seconds
-#define HTTP_CLIENT_DEFAULT_DIGEST_AUTH "MD5" // This is for bypassing a known bug in AMT05..
-#define HTTP_CLIENT_DEFAULT_PROXY_AUTH 1 // Basic
-
-#define HTTP_CLIENT_CRLF "\r\n" // End of line macro
-#define HTTP_CLIENT_CRLFX2 "\r\n\r\n" // Double End of line macro
-
- // HTTP Session internal API flags
- // Note: Not intended to be set the by the API user
-#define HTTP_CLIENT_FLAG_SECURE 0x00000010 // The session is secured using TLS
-#define HTTP_CLIENT_FLAG_URLANDPORT 0x00000020 // Url has a port within
-#define HTTP_CLIENT_FLAG_URLHTTPS 0x00000040 // Url has a https prefix
-#define HTTP_CLIENT_FLAG_USINGPROXY 0x00000080 // Operation will be performed using a proxy server
-#define HTTP_CLIENT_FLAG_CHUNKED 0x00000100 // The incoming data is chunked
-
- // HTTP Status codes
-#define HTTP_STATUS_OK 200 // The request has succeeded
-#define HTTP_STATUS_UNAUTHORIZED 401 // The request requires user authentic
-#define HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED 407 // The client must first authenticate itself with the proxy
-
- // Redirection (Note: there are more 30x codes, those are the most popular)
-#define HTTP_STATUS_OBJECT_MOVED 302 // Page redirection notification
-#define HTTP_STATUS_OBJECT_MOVED_PERMANENTLY 301 // Page redirection notification
-#define HTTP_STATUS_CONTINUE 100 // Page continue message
-
-
- // MIN AMX macro
-#define MIN(a,b) (((a) < (b)) ? (a) : (b))
-#define MAX(a,b) (((a) > (b)) ? (a) : (b))
- // HTTP timeout macro for selecting the default value if the caller passed 0 (no timeout) to the function
-#define HTTP_TIMEOUT(nTimeout) (((nTimeout) > (0)) ? (nTimeout) : (HTTP_CLIENT_DEFAULT_TIMEOUT))
-
- // 32 bit alignment macro
-#define ALIGN(size) ((size & 0xfffffffc) + ((size & 3) ? 4 : 0))
-
-
-#ifdef _HTTP_DEBUGGING_
- typedef VOID _stdcall E_HTTPDebug(const char *,const char*,UINT32,char *,...); // HTTPDebug hook function
-#endif
-
-
- ///////////////////////////////////////////////////////////////////////////////
- //
- // Section : HTTP API internals structures
- // Last updated : 01/09/2005
- //
- ///////////////////////////////////////////////////////////////////////////////
-
- // Generic parameter structure contains a pointer to the buffer and its length
-
- typedef struct _HTTP_PARAM
- {
-
- CHAR *pParam;
- UINT32 nLength;
-
- } HTTP_PARAM;
-
- // HTTP socket events
- typedef struct _HTTP_CONNECTION
- {
-
- fd_set FDRead; // socket read event
- fd_set FDWrite; // socket write event
- fd_set FDError; // socket error event
- INT32 HttpSocket; // The underling socket
- UINT32 HttpStartTime; // Time stamp for the session
- UINT32 HttpClientPort; // For client side binding
- BOOL TlsNego; // TLS negotiation flag
-
- } HTTP_CONNECTION;
-
- // Request URL
- typedef struct _HTTP_URL
- {
-
- HTTP_PARAM UrlBsee; // a pointer and length to the "http" section of the URL
- HTTP_PARAM UrlHost; // a pointer and length to the host section of the URL
- HTTP_PARAM UrlPort; // a pointer and length to the PORT (if was specified section)
- HTTP_PARAM UrlRequest; // a pointer and length of the request section of the URL
- UINT16 nPort; // the PORT that we should use (could be default or the one found within the URL)
- CHAR Url[HTTP_CLIENT_MAX_URL_LENGTH]; // a buffer for the URL
-
- }HTTP_URL;
- // HTTP headers (incoming and outgoing)
- typedef struct _HTTP_HEADERS
- {
-
- HTTP_PARAM HeadersBuffer; // a pointer and length of the complete Headers (in\out) buffer
- HTTP_PARAM HeadersOut; // a pointer and length of the outgoing HTTP headers
- HTTP_PARAM HeadersIn; // a pointer and length of the incoming headers
- HTTP_PARAM HeaderSearch; // Index and pointer for the header search functions
- HTTP_VERB HttpVerb; // the HTTP verb that was used in the session
- HTTP_VERB HttpLastVerb; // the HTTP verb that was last transmited to the server
- CHAR SearchClue[HTTP_CLIENT_MAX_HEADER_SEARCH_CLUE];
- CHAR Verb[16]; // the actual string buffer of the HTTP verb
-
-
- }HTTP_HEADERS;
-
- // HTTP headers (parsed headers information)
- typedef struct _HTTP_HEADERS_INFO
- {
- HTTP_PARAM HttpRedirectURL; // Stores the redirection URL if we got a 301 or 303 return code
- UINT32 nHTTPStatus; // the HTTP status code (200 401 407 act')
- UINT32 nHTTPContentLength; // the Content length if specified of the returned data
- UINT32 nHTTPPostContentLength;// the Content-Length of the POSTed data (if known)
- BOOL Connection; // True = Keep alive or undefined, False = Closed
- BOOL ValidHeaders; // a flag that indicates if the incoming header ware parsed OK and found to be valid
- BOOL HaveCredentials; // a flag that indicates if we have credentials for the session
- CHAR HTTPVersion[16]; // HTTP version string buffer (for example: "HTTP 1.1")
-
- }HTTP_HEADERS_INFO;
-
- // Authentication parameters that ware extracted from the incoming headers
- typedef struct _HTTP_AUTH_HEADER
- {
-
- HTTP_PARAM AuthHeader; // the pointer and length of the authentication header
- UINT32 HTTP_AUTH_SCHEMA; // Its schema (could be any of the supported)
-
- }HTTP_AUTH_HEADER;
- // Proxy related data
- typedef struct _HTTP_PROXY
- {
- CHAR ProxyHost[HTTP_CLIENT_MAX_PROXY_HOST_LENGTH];
- CHAR ProxtUser[HTTP_CLIENT_MAX_USERNAME_LENGTH];
- CHAR ProxyPassword[HTTP_CLIENT_MAX_PASSWORD_LENGTH];
- UINT16 nProxyPort;
- CHAR AuthSchemaName[16]; // The authentication schema name (for string comperission)
- HTTP_AUTH_SCHEMA ProxyAuthSchema;
-
- }HTTP_PROXY;
-
- // HTTP User credentials
- typedef struct _HTTP_CREDENTIALS
- {
-
- CHAR CredUser[HTTP_CLIENT_MAX_USERNAME_LENGTH];
- CHAR CredPassword[HTTP_CLIENT_MAX_PASSWORD_LENGTH];
- CHAR AuthSchemaName[16]; // The authentication schema name (for string comperission)
- HTTP_AUTH_SCHEMA CredAuthSchema; // The schema that calle has selected for the session
- BOOL Authentication; // a flag that indicates that this session has requested a user authentication
-
- }HTTP_CREDENTIALS;
- // HTTP Counters
- typedef struct _HTTP_COUNTERS
- {
-
- UINT32 nRecivedHeaderLength; // Bytes count of the incoming header
- UINT32 nRecivedBodyLength; // Bytes count of the incoming body length
- UINT32 nRecivedChunkLength; // The next chunk length in bytes
- UINT32 nBytesToNextChunk; // How many bytes we have to read until we can expect the next chunk
- UINT32 nActionStartTime; // Operation start time
- UINT32 nActionTimeout; // Timeout for the session
- UINT32 nSentChunks; // Count of sent chunks
- UINT32 nSentBodyBytes; // Count of body bytes that ware sent
- UINT32 nSentHeaderBytes; // Count of header bytes thhat ware sent
-
- }HTTP_COUNTERS;
-
- // HTTP Client Session data
- typedef struct _HTTP_REQUEST
- {
-
- HTTP_URL HttpUrl;
- HTTP_HEADERS HttpHeaders;
- HTTP_HEADERS_INFO HttpHeadersInfo;
- HTTP_AUTH_HEADER HttpAuthHeader;
- HTTP_PROXY HttpProxy;
- HTTP_CREDENTIALS HttpCredentials;
- HTTP_CONNECTION HttpConnection;
- HTTP_COUNTERS HttpCounters;
- UINT32 HttpState;
- UINT32 HttpFlags;
-#ifdef _HTTP_DEBUGGING_
- E_HTTPDebug *pDebug;
-#endif
- } HTTP_SESSION, *P_HTTP_SESSION;
-
-
- // HTTP Type Definitions
- typedef UINT32 HTTP_SESSION_HANDLE;
- typedef UINT32 HTTP_CLIENT_SESSION_FLAGS;
-
-
- ///////////////////////////////////////////////////////////////////////////////
- //
- // Section : HTTP API public interface
- // Last updated : 01/09/2005
- //
- ///////////////////////////////////////////////////////////////////////////////
-
-
- HTTP_SESSION_HANDLE HTTPClientOpenRequest (HTTP_CLIENT_SESSION_FLAGS Flags);
- UINT32 HTTPClientCloseRequest (HTTP_SESSION_HANDLE *pSession);
- UINT32 HTTPClientSetLocalConnection (HTTP_SESSION_HANDLE pSession, UINT32 nPort);
- UINT32 HTTPClientSetAuth (HTTP_SESSION_HANDLE pSession, HTTP_AUTH_SCHEMA AuthSchema, void *pReserved);
- UINT32 HTTPClientSetCredentials (HTTP_SESSION_HANDLE pSession, CHAR *pUserName, CHAR *pPassword);
- UINT32 HTTPClientSetProxy (HTTP_SESSION_HANDLE pSession, CHAR *pProxyName, UINT16 nPort, CHAR *pUserName, CHAR *pPassword);
- UINT32 HTTPClientSetVerb (HTTP_SESSION_HANDLE pSession, HTTP_VERB HttpVerb);
- UINT32 HTTPClientAddRequestHeaders (HTTP_SESSION_HANDLE pSession, CHAR *pHeaderName, CHAR *pHeaderData, BOOL nInsert);
- UINT32 HTTPClientSendRequest (HTTP_SESSION_HANDLE pSession, CHAR *pUrl, VOID *pData, UINT32 nDataLength, BOOL TotalLength, UINT32 nTimeout,UINT32 nClientPort);
- UINT32 HTTPClientWriteData (HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBufferLength, UINT32 nTimeout);
- UINT32 HTTPClientRecvResponse (HTTP_SESSION_HANDLE pSession, UINT32 nTimeout);
- UINT32 HTTPClientReadData (HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBytesToRead, UINT32 nTimeout, UINT32 *nBytesRecived);
- UINT32 HTTPClientGetInfo (HTTP_SESSION_HANDLE pSession, HTTP_CLIENT *HTTPClient);
-
- UINT32 HTTPClientFindFirstHeader (HTTP_SESSION_HANDLE pSession, CHAR *pSearchClue,CHAR *pHeaderBuffer, UINT32 *nLength);
- UINT32 HTTPClientGetNextHeader (HTTP_SESSION_HANDLE pSession, CHAR *pHeaderBuffer, UINT32 *nLength);
- UINT32 HTTPClientFindCloseHeader (HTTP_SESSION_HANDLE pSession);
-
-
-#ifdef _HTTP_DEBUGGING_
- UINT32 HTTPClientSetDebugHook (HTTP_SESSION_HANDLE pSession,E_HTTPDebug *pDebug);
-#endif
-
-
- ///////////////////////////////////////////////////////////////////////////////
- //
- // Section : HTTP API private function
- // Last updated : 01/09/2005
- //
- ///////////////////////////////////////////////////////////////////////////////
-
- UINT32 HTTPIntrnResizeBuffer (P_HTTP_SESSION pHTTPSession, UINT32 nNewSize);
- UINT32 HTTPIntrnSetURL (P_HTTP_SESSION pHTTPSession, CHAR *pUrl,UINT32 nUrlLength);
- UINT32 HTTPIntrnConnectionClose (P_HTTP_SESSION pHTTPSession);
- UINT32 HTTPIntrnConnectionOpen (P_HTTP_SESSION pHTTPSession);
- UINT32 HTTPIntrnGetRemoteHeaders (P_HTTP_SESSION pHTTPSession);
- UINT32 HTTPIntrnGetRemoteChunkLength (P_HTTP_SESSION pHTTPSession);
- UINT32 HTTPIntrnSend (P_HTTP_SESSION pHTTPSession, CHAR *pData,UINT32 *nLength);
- UINT32 HTTPIntrnRecv (P_HTTP_SESSION pHTTPSession, CHAR *pData,UINT32 *nLength,BOOL PeekOnly);
- UINT32 HTTPIntrnParseAuthHeader (P_HTTP_SESSION pHTTPSession);
- UINT32 HTTPIntrnAuthHandler (P_HTTP_SESSION pHTTPSession);
- UINT32 HTTPIntrnAuthSendDigest (P_HTTP_SESSION pHTTPSession);
- UINT32 HTTPIntrnAuthSendBasic (P_HTTP_SESSION pHTTPSession);
- UINT32 HTTPIntrnAuthenticate (P_HTTP_SESSION pHTTPSession);
- UINT32 HTTPIntrnHeadersAdd (P_HTTP_SESSION pHTTPSession, CHAR *pHeaderName, UINT32 nNameLength, CHAR *pHeaderData, UINT32 nDataLength);
- UINT32 HTTPIntrnHeadersRemove (P_HTTP_SESSION pHTTPSession, CHAR *pHeaderName);
- UINT32 HTTPIntrnHeadersReceive (P_HTTP_SESSION pHTTPSession, UINT32 nTimeout);
- UINT32 HTTPIntrnHeadersSend (P_HTTP_SESSION pHTTPSession, HTTP_VERB HttpVerb);
- UINT32 HTTPIntrnHeadersParse (P_HTTP_SESSION pHTTPSession);
- UINT32 HTTPIntrnHeadersFind (P_HTTP_SESSION pHTTPSession, CHAR *pHeaderName, HTTP_PARAM *pParam,BOOL IncommingHeaders,UINT32 nOffset);
- UINT32 HTTPIntrnSessionReset (P_HTTP_SESSION pHTTPSession, BOOL EntireSession);
- UINT32 HTTPIntrnSessionGetUpTime (VOID);
- BOOL HTTPIntrnSessionEvalTimeout (P_HTTP_SESSION pHTTPSession);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //_HTTP_CLIENT
diff --git a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientAuth.c b/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientAuth.c
deleted file mode 100644
index 64531a0a9..000000000
--- a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientAuth.c
+++ /dev/null
@@ -1,664 +0,0 @@
-
-///////////////////////////////////////////////////////////////////////////////
-// Module Name:
-// HTTPClientAuth.c
-//
-// Abstract: Handle Digest, MD5 and 64 Bit Encoding
-//
-// Platform: Any that supports standard C calls
-///////////////////////////////////////////////////////////////////////////////
-
-#include "HTTPClientAuth.h"
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPBase64Encoder
-// Purpose : Converts a given string into a base64 encoded buffer.
-// Last updated : 01/09/200515/05/2005
-// Author Name : Eitan Michaelson
-// Notes :
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-void HTTPBase64Encoder(unsigned char *out, const unsigned char *in, int inlen)
-// [OUT] out A pointer to a char to hold the converted string
-// [IN] in String to convert
-// [IN] inlen Length of the string to be converted
-
-{
- for (; inlen >= 3; inlen -= 3)
- {
- *out++ = base64digits[in[0] >> 2];
- *out++ = base64digits[((in[0] << 4) & 0x30) | (in[1] >> 4)];
- *out++ = base64digits[((in[1] << 2) & 0x3c) | (in[2] >> 6)];
- *out++ = base64digits[in[2] & 0x3f];
- in += 3;
- }
-
- if (inlen > 0)
- {
- unsigned char fragment;
-
- *out++ = base64digits[in[0] >> 2];
- fragment = (in[0] << 4) & 0x30;
-
- if (inlen > 1)
- fragment |= in[1] >> 4;
-
- *out++ = base64digits[fragment];
- *out++ = (inlen < 2) ? '=' : base64digits[(in[1] << 2) & 0x3c];
- *out++ = '=';
- }
-
- *out = '\0';
-}
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPBase64Decoder
-// Purpose : Converts a given base64 string into a bytes buffer.
-// Last updated : 01/09/200515/05/2005
-// Author Name : Eitan Michaelson
-// Notes :
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-int HTTPBase64Decoder(char *out, const char *in)
-{ // [OUT] out Where to save the converted string
- // [IN] in String to convert
-
- int len = 0;
- register unsigned char digit1, digit2, digit3, digit4;
-
- if (in[0] == '+' && in[1] == ' ')
- in += 2;
- if (*in == '\r')
- return(0);
-
- do {
-
- digit1 = in[0];
- if (DECODE64(digit1) == BAD)
- return(-1);
- digit2 = in[1];
- if (DECODE64(digit2) == BAD)
- return(-1);
- digit3 = in[2];
- if (digit3 != '=' && DECODE64(digit3) == BAD)
- return(-1);
- digit4 = in[3];
- if (digit4 != '=' && DECODE64(digit4) == BAD)
- return(-1);
- in += 4;
- *out++ = (DECODE64(digit1) << 2) | (DECODE64(digit2) >> 4);
- ++len;
- if (digit3 != '=')
- {
- *out++ = ((DECODE64(digit2) << 4) & 0xf0) | (DECODE64(digit3) >> 2);
- ++len;
- if (digit4 != '=')
- {
- *out++ = ((DECODE64(digit3) << 6) & 0xc0) | DECODE64(digit4);
- ++len;
- }
- }
- } while (*in && *in != '\r' && digit4 != '=');
-
- return (len);
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Purpose : The following code implements the calculations of H(A1), H(A2),
-// request-digest and response-digest
-// Last updated : 01/09/200515/05/2005
-// Author Name : Public Domain\RFC2617
-// Notes : Digest Access Authentication
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : GenerateCNonce
-// Purpose : Generates a 32 byte random hexadecimal string such as "4f6ba982..."
-// Last updated : 15/05/2005
-// Author Name : Eitan Michaelson
-// Notes :
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-void HTTPDigestGenerateCNonce(char *outbuff)
-{
- int i,num;
- InitRandomeNumber();
- for(i = 0; i < 32; i++) {
- num = GetRandomeNumber();
- switch(num) {
- case 0: case 1: case 2: case 3: case 4: case 5:
- case 6: case 7: case 8: case 9:
- outbuff[i] = '0' + num;
- break;
- case 10: case 11: case 12: case 13: case 14: case 15:
- outbuff[i] = 'a' + (num-10);
- break;
- default:
- outbuff[i] = 'f';
- }
- }
- outbuff[32] = 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : DigestCvtHex
-// Purpose : CConvert to HEX
-// Last updated : 15/05/2005
-// Author Name : Public Domain\RFC2617
-// Notes :
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
-void HTTPDigestCvtHex(IN HASH Bin,OUT HASHHEX Hex)
-{
- unsigned short i;
- unsigned char j;
-
- for (i = 0; i < HASHLEN; i++) {
- j = (Bin[i] >> 4) & 0xf;
- if (j <= 9)
- Hex[i*2] = (j + '0');
- else
- Hex[i*2] = (j + 'a' - 10);
- j = Bin[i] & 0xf;
- if (j <= 9)
- Hex[i*2+1] = (j + '0');
- else
- Hex[i*2+1] = (j + 'a' - 10);
- };
- Hex[HASHHEXLEN] = '\0';
-};
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : DigestCalcHA1
-// Purpose : Calculate H(A1) as per spec
-// Last updated : 15/05/2005
-// Author Name : Public Domain\RFC2617
-// Notes :
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-void HTTPDigestCalcHA1(
- IN int nAlg, /* 0 = MD5, 1 = MD5-Sess */
- IN char * pszUserName,
- IN char * pszRealm,
- IN int nRealmLength,
- IN char * pszPassword,
- IN char * pszNonce,
- IN int nNonceLength,
- IN char * pszCNonce,
- OUT HASHHEX SessionKey
- )
-{
- MD5_CTX Md5Ctx;
- HASH HA1;
- HASHHEX HASess;
- HASH HAll;
-
- HTTPMD5Init(&Md5Ctx);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)pszUserName, strlen(pszUserName)); //Daniel casting
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)":", 1);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)pszRealm, nRealmLength); //Daniel
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)":", 1);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)pszPassword, strlen(pszPassword)); //Daniel
- HTTPMD5Final((unsigned char *)HA1, &Md5Ctx);
-
- if (nAlg == 1) /* MD5-Sess */
- {
- HTTPDigestCvtHex(HA1, HASess);
- HTTPMD5Init(&Md5Ctx);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)HASess, HASHHEXLEN);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)":", 1);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)pszNonce, nNonceLength);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)":", 1);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)pszCNonce, strlen(pszCNonce));
- HTTPMD5Final((unsigned char *)HAll, &Md5Ctx);
- HTTPDigestCvtHex(HAll, SessionKey);
- return;
-
- }
-
- HTTPDigestCvtHex(HA1, SessionKey);
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : DigestCalcResponse
-// Purpose : Calculate request-digest/response-digest as per HTTP Digest spec
-// Last updated : 15/05/2005
-// Author Name : Public Domain\RFC2617
-// Notes :
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-void HTTPDigestCalcResponse(
- IN HASHHEX HA1, // H(A1)
- IN char * pszNonce, // nonce from server
- IN int nNonceLength, // Length of nonce
- IN char * pszNonceCount, // 8 hex digits
- IN char * pszCNonce, // client nonce */
- IN char * pszQop, // qop-value: "", "auth", "auth-int"
- IN int nQopLength, // qop param length
- IN char * pszMethod, // method from the request
- IN char * pszDigestUri, // requested URL
- IN int nDigestUriLebgth, // Uri Length
- IN HASHHEX HEntity, // H(entity body) if qop="auth-int"
- OUT HASHHEX Response // request-digest or response-digest
- )
-{
- MD5_CTX Md5Ctx;
- HASH HA2;
- HASH RespHash;
- HASHHEX HA2Hex;
-
- // Calculate H(A2)
- HTTPMD5Init(&Md5Ctx);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)pszMethod, strlen(pszMethod));
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)":", 1);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)pszDigestUri, nDigestUriLebgth);
- if (stricmp(pszQop, "auth-int") == 0)
- {
-
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)":", 1);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)HEntity, HASHHEXLEN);
- };
- HTTPMD5Final((unsigned char *)HA2, &Md5Ctx);
- HTTPDigestCvtHex(HA2, HA2Hex);
-
- // Calculate response
- HTTPMD5Init(&Md5Ctx);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)HA1, HASHHEXLEN);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)":", 1);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)pszNonce, nNonceLength);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)":", 1);
- if (*pszQop)
- {
-
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)pszNonceCount, strlen(pszNonceCount));
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)":", 1);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)pszCNonce, strlen(pszCNonce));
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)":", 1);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)pszQop, nQopLength);
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)":", 1);
- };
- HTTPMD5Update(&Md5Ctx, (const unsigned char *)HA2Hex, HASHHEXLEN);
- HTTPMD5Final((unsigned char *)RespHash, &Md5Ctx);
- HTTPDigestCvtHex(RespHash, Response);
-};
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Purpose : This code implements the MD5 message-digest algorithm.
-// The algorithm is due to Ron Rivest. This code was
-// written by Colin Plumb in 1993, no copyright is claimed.
-// This code is in the public domain; do with it what you wish.
-// Equivalent code is available from RSA Data Security, Inc.
-// This code has been tested against that, and is equivalent,
-// except that you don't need to include two pages of legalese
-// with every copy.
-// Usage : To compute the message digest of a chunk of bytes, declare an
-// MD5Context structure, pass it to MD5Init, call MD5Update as
-// needed on buffers full of bytes, and then call MD5Final, which
-// will fill a supplied 16-byte array with the digest.
-// Last updated : 15/05/2005
-// Author Name : Public Domain
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
-#ifndef HIGHFIRST
-#define HTTPMD5ByteReverse(buf, len) /* Nothing */
-#else
-void HTTPMD5ByteReverse(unsigned char *buf, unsigned longs);
-#ifndef ASM_MD5
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : ByteReverse
-// Purpose : Little\Big Endian support
-// Gets :
-// Returns :
-// Last updated : 15/05/2005
-// Author Name : Public Domain
-// Notes : this code is harmless on little-endian machines.
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-void HTTPMD5ByteReverse(unsigned char *buf, unsigned longs)
-{
- uint32 t;
- do {
- t = (uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
- ((unsigned) buf[1] << 8 | buf[0]);
- *(uint32 *) buf = t;
- buf += 4;
- } while (--longs);
-}
-#endif
-#endif
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : MD5Init
-// Purpose : Initialize the MD5Context structure
-// Gets : MD5Context structure
-// Returns :
-// Last updated : 15/05/2005
-// Author Name : Public Domain
-// Notes : Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
-// initialization constants.
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
-void HTTPMD5Init(struct MD5Context *ctx)
-{
- ctx->buf[0] = 0x67452301;
- ctx->buf[1] = 0xefcdab89;
- ctx->buf[2] = 0x98badcfe;
- ctx->buf[3] = 0x10325476;
-
- ctx->bits[0] = 0;
- ctx->bits[1] = 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : MD5Update
-// Purpose : Update the MD5Context structure with the target byte array
-// Gets : MD5Context structure, buffer and length
-// Returns :
-// Last updated : 15/05/2005
-// Author Name : Public Domain
-// Notes : Update context to reflect the concatenation of another buffer full of bytes.
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-void HTTPMD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
-{
- uint32 t;
-
- // Update bitcount
-
- t = ctx->bits[0];
- if ((ctx->bits[0] = t + ((uint32) len << 3)) < t)
- ctx->bits[1]++; // Carry from low to high
- ctx->bits[1] += len >> 29;
-
- t = (t >> 3) & 0x3f; // Bytes already in shsInfo->data
-
- // Handle any leading odd-sized chunks
-
- if (t) {
- unsigned char *p = (unsigned char *) ctx->in + t;
-
- t = 64 - t;
- if (len < t) {
- memcpy(p, buf, len);
- return;
- }
- memcpy(p, buf, t);
- HTTPMD5ByteReverse(ctx->in, 16);
- HTTPMD5Transform(ctx->buf, (uint32 *) ctx->in);
- buf += t;
- len -= t;
- }
- // Process data in 64-byte chunks
-
- while (len >= 64) {
- memcpy(ctx->in, buf, 64);
- HTTPMD5ByteReverse(ctx->in, 16);
- HTTPMD5Transform(ctx->buf, (uint32 *) ctx->in);
- buf += 64;
- len -= 64;
- }
-
- // Handle any remaining bytes of data.
-
- memcpy(ctx->in, buf, len);
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : MD5Final
-// Purpose : Finalize.
-// Gets : Output digest structure, MD5Context structure
-// Returns :
-// Last updated : 15/05/2005
-// Author Name : Public Domain
-// Notes : Final wrapup - pad to 64-byte boundary with the bit pattern
-// 1 0* (64-bit count of bits processed, MSB-first).
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
-
-
-void HTTPMD5Final(unsigned char digest[16], struct MD5Context *ctx)
-{
- unsigned count;
- unsigned char *p;
-
- // Compute number of bytes mod 64
- count = (ctx->bits[0] >> 3) & 0x3F;
-
- // Set the first char of padding to 0x80. This is safe since there is
- // always at least one byte free
- p = ctx->in + count;
- *p++ = 0x80;
-
- // Bytes of padding needed to make 64 bytes
- count = 64 - 1 - count;
-
- // Pad out to 56 mod 64 */
- if (count < 8) {
- // Two lots of padding: Pad the first block to 64 bytes
- memset(p, 0, count);
- HTTPMD5ByteReverse(ctx->in, 16);
- HTTPMD5Transform(ctx->buf, (uint32 *) ctx->in);
-
- // Now fill the next block with 56 bytes
- memset(ctx->in, 0, 56);
- } else {
- // Pad block to 56 bytes
- memset(p, 0, count - 8);
- }
- HTTPMD5ByteReverse(ctx->in, 14);
-
- // Append length in bits and transform
- ((uint32 *) ctx->in)[14] = ctx->bits[0];
- ((uint32 *) ctx->in)[15] = ctx->bits[1];
-
- HTTPMD5Transform(ctx->buf, (uint32 *) ctx->in);
- HTTPMD5ByteReverse((unsigned char *) ctx->buf, 4);
- memcpy(digest, ctx->buf, 16);
- memset(ctx, 0, sizeof(*ctx)); // In case it's sensitive
-}
-
-#ifndef ASM_MD5
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function :
-// Purpose : The four core functions - F1 is optimized somewhat
-// Last updated : 15/05/2005
-//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-#define F1(x, y, z) (z ^ (x & (y ^ z)))
-#define F2(x, y, z) F1(z, x, y)
-#define F3(x, y, z) (x ^ y ^ z)
-#define F4(x, y, z) (y ^ (x | ~z))
-
-// This is the central step in the MD5 algorithm.
-#ifdef __PUREC__
-#define MD5STEP(f, w, x, y, z, data, s) \
- ( w += f /*(x, y, z)*/ + data, w = w<<s | w>>(32-s), w += x )
-#else
-#define MD5STEP(f, w, x, y, z, data, s) \
- ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x )
-#endif
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : MD5Transform
-// Purpose : The core of the MD5 algorithm, this alters an existing MD5 hash to
-// reflect the addition of 16 longwords of new data. MD5Update blocks
-// the data and converts bytes into longwords for this routine.
-// Last updated : 15/05/2005
-// Author Name : Public Domain
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
-void HTTPMD5Transform(uint32 buf[4], uint32 const in[16])
-{
- register uint32 a, b, c, d;
-
- a = buf[0];
- b = buf[1];
- c = buf[2];
- d = buf[3];
-
-#ifdef __PUREC__ // PureC Weirdness... (GG)
- MD5STEP(F1(b,c,d), a, b, c, d, in[0] + 0xd76aa478L, 7);
- MD5STEP(F1(a,b,c), d, a, b, c, in[1] + 0xe8c7b756L, 12);
- MD5STEP(F1(d,a,b), c, d, a, b, in[2] + 0x242070dbL, 17);
- MD5STEP(F1(c,d,a), b, c, d, a, in[3] + 0xc1bdceeeL, 22);
- MD5STEP(F1(b,c,d), a, b, c, d, in[4] + 0xf57c0fafL, 7);
- MD5STEP(F1(a,b,c), d, a, b, c, in[5] + 0x4787c62aL, 12);
- MD5STEP(F1(d,a,b), c, d, a, b, in[6] + 0xa8304613L, 17);
- MD5STEP(F1(c,d,a), b, c, d, a, in[7] + 0xfd469501L, 22);
- MD5STEP(F1(b,c,d), a, b, c, d, in[8] + 0x698098d8L, 7);
- MD5STEP(F1(a,b,c), d, a, b, c, in[9] + 0x8b44f7afL, 12);
- MD5STEP(F1(d,a,b), c, d, a, b, in[10] + 0xffff5bb1L, 17);
- MD5STEP(F1(c,d,a), b, c, d, a, in[11] + 0x895cd7beL, 22);
- MD5STEP(F1(b,c,d), a, b, c, d, in[12] + 0x6b901122L, 7);
- MD5STEP(F1(a,b,c), d, a, b, c, in[13] + 0xfd987193L, 12);
- MD5STEP(F1(d,a,b), c, d, a, b, in[14] + 0xa679438eL, 17);
- MD5STEP(F1(c,d,a), b, c, d, a, in[15] + 0x49b40821L, 22);
-
- MD5STEP(F2(b,c,d), a, b, c, d, in[1] + 0xf61e2562L, 5);
- MD5STEP(F2(a,b,c), d, a, b, c, in[6] + 0xc040b340L, 9);
- MD5STEP(F2(d,a,b), c, d, a, b, in[11] + 0x265e5a51L, 14);
- MD5STEP(F2(c,d,a), b, c, d, a, in[0] + 0xe9b6c7aaL, 20);
- MD5STEP(F2(b,c,d), a, b, c, d, in[5] + 0xd62f105dL, 5);
- MD5STEP(F2(a,b,c), d, a, b, c, in[10] + 0x02441453L, 9);
- MD5STEP(F2(d,a,b), c, d, a, b, in[15] + 0xd8a1e681L, 14);
- MD5STEP(F2(c,d,a), b, c, d, a, in[4] + 0xe7d3fbc8L, 20);
- MD5STEP(F2(b,c,d), a, b, c, d, in[9] + 0x21e1cde6L, 5);
- MD5STEP(F2(a,b,c), d, a, b, c, in[14] + 0xc33707d6L, 9);
- MD5STEP(F2(d,a,b), c, d, a, b, in[3] + 0xf4d50d87L, 14);
- MD5STEP(F2(c,d,a), b, c, d, a, in[8] + 0x455a14edL, 20);
- MD5STEP(F2(b,c,d), a, b, c, d, in[13] + 0xa9e3e905L, 5);
- MD5STEP(F2(a,b,c), d, a, b, c, in[2] + 0xfcefa3f8L, 9);
- MD5STEP(F2(d,a,b), c, d, a, b, in[7] + 0x676f02d9L, 14);
- MD5STEP(F2(c,d,a), b, c, d, a, in[12] + 0x8d2a4c8aL, 20);
-
- MD5STEP(F3(b,c,d), a, b, c, d, in[5] + 0xfffa3942L, 4);
- MD5STEP(F3(a,b,c), d, a, b, c, in[8] + 0x8771f681L, 11);
- MD5STEP(F3(d,a,b), c, d, a, b, in[11] + 0x6d9d6122L, 16);
- MD5STEP(F3(c,d,a), b, c, d, a, in[14] + 0xfde5380cL, 23);
- MD5STEP(F3(b,c,d), a, b, c, d, in[1] + 0xa4beea44L, 4);
- MD5STEP(F3(a,b,c), d, a, b, c, in[4] + 0x4bdecfa9L, 11);
- MD5STEP(F3(d,a,b), c, d, a, b, in[7] + 0xf6bb4b60L, 16);
- MD5STEP(F3(c,d,a), b, c, d, a, in[10] + 0xbebfbc70L, 23);
- MD5STEP(F3(b,c,d), a, b, c, d, in[13] + 0x289b7ec6L, 4);
- MD5STEP(F3(a,b,c), d, a, b, c, in[0] + 0xeaa127faL, 11);
- MD5STEP(F3(d,a,b), c, d, a, b, in[3] + 0xd4ef3085L, 16);
- MD5STEP(F3(c,d,a), b, c, d, a, in[6] + 0x04881d05L, 23);
- MD5STEP(F3(b,c,d), a, b, c, d, in[9] + 0xd9d4d039L, 4);
- MD5STEP(F3(a,b,c), d, a, b, c, in[12] + 0xe6db99e5L, 11);
- MD5STEP(F3(d,a,b), c, d, a, b, in[15] + 0x1fa27cf8L, 16);
- MD5STEP(F3(c,d,a), b, c, d, a, in[2] + 0xc4ac5665L, 23);
-
- MD5STEP(F4(b,c,d), a, b, c, d, in[0] + 0xf4292244L, 6);
- MD5STEP(F4(a,b,c), d, a, b, c, in[7] + 0x432aff97L, 10);
- MD5STEP(F4(d,a,b), c, d, a, b, in[14] + 0xab9423a7L, 15);
- MD5STEP(F4(c,d,a), b, c, d, a, in[5] + 0xfc93a039L, 21);
- MD5STEP(F4(b,c,d), a, b, c, d, in[12] + 0x655b59c3L, 6);
- MD5STEP(F4(a,b,c), d, a, b, c, in[3] + 0x8f0ccc92L, 10);
- MD5STEP(F4(d,a,b), c, d, a, b, in[10] + 0xffeff47dL, 15);
- MD5STEP(F4(c,d,a), b, c, d, a, in[1] + 0x85845dd1L, 21);
- MD5STEP(F4(b,c,d), a, b, c, d, in[8] + 0x6fa87e4fL, 6);
- MD5STEP(F4(a,b,c), d, a, b, c, in[15] + 0xfe2ce6e0L, 10);
- MD5STEP(F4(d,a,b), c, d, a, b, in[6] + 0xa3014314L, 15);
- MD5STEP(F4(c,d,a), b, c, d, a, in[13] + 0x4e0811a1L, 21);
- MD5STEP(F4(b,c,d), a, b, c, d, in[4] + 0xf7537e82L, 6);
- MD5STEP(F4(a,b,c), d, a, b, c, in[11] + 0xbd3af235L, 10);
- MD5STEP(F4(d,a,b), c, d, a, b, in[2] + 0x2ad7d2bbL, 15);
- MD5STEP(F4(c,d,a), b, c, d, a, in[9] + 0xeb86d391L, 21);
-#else
- MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
- MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
- MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
- MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
- MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
- MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
- MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17);
- MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22);
- MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7);
- MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
- MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
- MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
- MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
- MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
- MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
- MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
-
- MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
- MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
- MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
- MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
- MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
- MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
- MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
- MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
- MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
- MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
- MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
- MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
- MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
- MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
- MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
- MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
-
- MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
- MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
- MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
- MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
- MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
- MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
- MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
- MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
- MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
- MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
- MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
- MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23);
- MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
- MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
- MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
- MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
-
- MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
- MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
- MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
- MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
- MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
- MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
- MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
- MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
- MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
- MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
- MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15);
- MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
- MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
- MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
- MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
- MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
-#endif
-
- buf[0] += a;
- buf[1] += b;
- buf[2] += c;
- buf[3] += d;
-}
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientAuth.h b/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientAuth.h
deleted file mode 100644
index daa23af92..000000000
--- a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientAuth.h
+++ /dev/null
@@ -1,89 +0,0 @@
-
-#ifndef HTTP_CLIENT_AUTH_H
-#define HTTP_CLIENT_AUTH_H
-
-#include "HTTPClientWrapper.h" // Cross platform support
-
-
-#define HASHLEN 16
-#define HASHHEXLEN 32
-#define IN
-#define OUT
-
-typedef char HASH[HASHLEN];
-typedef char HASHHEX[HASHHEXLEN+1];
-typedef unsigned long uint32;
-
-// Base 64 Related
-#define DECODE64(c) (isascii(c) ? base64val[c] : BAD)
-#define BAD -1
-
-static const char base64digits[] =
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-static const char base64val[] = {
-BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD,
-BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD,
-BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD, BAD,BAD,BAD, 62, BAD,BAD,BAD, 63,
-52, 53, 54, 55, 56, 57, 58, 59, 60, 61,BAD,BAD, BAD,BAD,BAD,BAD,
-BAD, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
-15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,BAD, BAD,BAD,BAD,BAD,
-BAD, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,BAD, BAD,BAD,BAD,BAD
-};
-
-void HTTPBase64Encoder(unsigned char *out, const unsigned char *in, int inlen);
-int HTTPBase64Decoder(char *out, const char *in);
-
-
-// Digest Related
-// Generates a 32 byte random hexadecimal string such as "4f6ba982..."
-void HTTPDigestGenerateCNonce(char *outbuff);
-
-// Calculate H(A1) as per HTTP Digest spec
-void HTTPDigestCalcHA1(
- IN int nAlg, /* 0 = MD5, 1 = MD5-Sess */
- IN char * pszUserName,
- IN char * pszRealm,
- IN int nRealmLength,
- IN char * pszPassword,
- IN char * pszNonce,
- IN int nNonceLength,
- IN char * pszCNonce,
- OUT HASHHEX SessionKey
- );
-
-// Calculate request-digest/response-digest as per HTTP Digest spec
-void HTTPDigestCalcResponse(
- IN HASHHEX HA1, // H(A1)
- IN char * pszNonce, // nonce from server
- IN int nNonceLength, // Length of nonce
- IN char * pszNonceCount, // 8 hex digits
- IN char * pszCNonce, // client nonce
- IN char * pszQop, // qop-value: "", "auth", "auth-int"
- IN int nQopLength, // qop param length
- IN char * pszMethod, // method from the request
- IN char * pszDigestUri, // requested URL
- IN int nDigestUriLebgth, // Uri Length
- IN HASHHEX HEntity, // H(entity body) if qop="auth-int"
- OUT HASHHEX Response // request-digest or response-digest
- );
-
-// MD5 structures and functions
-struct MD5Context
-{
- uint32 buf[4];
- uint32 bits[2];
- unsigned char in[64];
-};
-
-void HTTPMD5Init (struct MD5Context *context);
-void HTTPMD5Update (struct MD5Context *context, unsigned char const *buf,unsigned len);
-void HTTPMD5Final (unsigned char digest[16], struct MD5Context *context);
-void HTTPMD5Transform (uint32 buf[4], uint32 const in[16]);
-
-
-// This is needed to make RSAREF happy on some MS-DOS compilers.
-typedef struct MD5Context MD5_CTX;
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientCommon.h b/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientCommon.h
deleted file mode 100644
index 9c6c36b24..000000000
--- a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientCommon.h
+++ /dev/null
@@ -1,120 +0,0 @@
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Module Name:
-// CmsiHTTPClientCommon.h
-//
-// Abstract: Coomon structs and types for the HTTP protocol API
-// Author: Eitan Michaelso
-// Version: 1.0
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _HTTPCLIENT_PROTOCOL_H_
-#define _HTTPCLIENT_PROTOCOL_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- // Global default sizes
-#define HTTP_CLIENT_MAX_URL_LENGTH 512 // Maximum length for an HTTP Url parameter
-
- // HTTP Session flags (Public flags)
-#define HTTP_CLIENT_FLAG_KEEP_ALIVE 0x00000001 // Set the keep alive header
-#define HTTP_CLIENT_FLAG_SEND_CHUNKED 0x00000002 // The outgoing should chunked
-#define HTTP_CLIENT_FLAG_NO_CACHE 0x00000004 // Set the no cache header
-#define HTTP_CLIENT_FLAG_ASYNC 0x00000008 // Currently not implemented
-
- // HTTP status internal flags
-#define HTTP_CLIENT_STATE_PRE_INIT 0x00000000 // Starting stage
-#define HTTP_CLIENT_STATE_INIT 0x00000001 // API was initialized (memory was allocated)
-#define HTTP_CLIENT_STATE_URL_PARSED 0x00000002 // Url was parsed
-#define HTTP_CLIENT_STATE_HOST_CONNECTED 0x00000004 // HEAD verb was sent
-#define HTTP_CLIENT_STATE_HEAD_SENT 0x00000008 // Post verb was sent
-#define HTTP_CLIENT_STATE_POST_SENT 0x00000010 // HTTP requet was sent
-#define HTTP_CLIENT_STATE_REQUEST_SENT 0x00000020 // HTTP request was sent
-#define HTTP_CLIENT_STATE_HEADERS_RECIVED 0x00000040 // Headers ware recived from the server
-#define HTTP_CLIENT_STATE_HEADERS_PARSED 0x00000080 // HTTP headers ware parsed
-#define HTTP_CLIENT_STATE_HEADERS_OK 0x00000100 // Headers status was OK
-
- // HTTP Return codes
-#define HTTP_CLIENT_SUCCESS 0 // HTTP Success status
-
-#define HTTP_CLIENT_UNKNOWN_ERROR 1 // Unknown error
-#define HTTP_CLIENT_ERROR_INVALID_HANDLE 2 // an Invalid handle or possible bad pointer was passed to a function
-#define HTTP_CLIENT_ERROR_NO_MEMORY 3 // Buffer too small or a failure while in memory allocation
-#define HTTP_CLIENT_ERROR_SOCKET_INVALID 4 // an attempt to use an invalid socket handle was made
-#define HTTP_CLIENT_ERROR_SOCKET_CANT_SET 5 // Can't send socket parameters
-#define HTTP_CLIENT_ERROR_SOCKET_RESOLVE 6 // Error while resolving host name
-#define HTTP_CLIENT_ERROR_SOCKET_CONNECT 7 // Error while connecting to the remote server
-#define HTTP_CLIENT_ERROR_SOCKET_TIME_OUT 8 // socket time out error
-#define HTTP_CLIENT_ERROR_SOCKET_RECV 9 // Error while receiving data
-#define HTTP_CLIENT_ERROR_SOCKET_SEND 10 // Error while sending data
-#define HTTP_CLIENT_ERROR_HEADER_RECV 11 // Error while receiving the remote HTTP headers
-#define HTTP_CLIENT_ERROR_HEADER_NOT_FOUND 12 // Could not find element within header
-#define HTTP_CLIENT_ERROR_HEADER_BIG_CLUE 13 // The headers search clue was too large for the internal API buffer
-#define HTTP_CLIENT_ERROR_HEADER_NO_LENGTH 14 // No content length was specified for the outgoing data. the caller should specify chunking mode in the session creation
-#define HTTP_CLIENT_ERROR_CHUNK_TOO_BIG 15 // The HTTP chunk token that was received from the server was too big and possibly wrong
-#define HTTP_CLIENT_ERROR_AUTH_HOST 16 // Could not authenticate with the remote host
-#define HTTP_CLIENT_ERROR_AUTH_PROXY 17 // Could not authenticate with the remote proxy
-#define HTTP_CLIENT_ERROR_BAD_VERB 18 // Bad or not supported HTTP verb was passed to a function
-#define HTTP_CLIENT_ERROR_LONG_INPUT 19 // a function received a parameter that was too large
-#define HTTP_CLIENT_ERROR_BAD_STATE 20 // The session state prevents the current function from proceeding
-#define HTTP_CLIENT_ERROR_CHUNK 21 // Could not parse the chunk length while in chunked transfer
-#define HTTP_CLIENT_ERROR_BAD_URL 22 // Could not parse curtail elements from the URL (such as the host name, HTTP prefix act')
-#define HTTP_CLIENT_ERROR_BAD_HEADER 23 // Could not detect key elements in the received headers
-#define HTTP_CLIENT_ERROR_BUFFER_RSIZE 24 // Error while attempting to resize a buffer
-#define HTTP_CLIENT_ERROR_BAD_AUTH 25 // Authentication schema is not supported
-#define HTTP_CLIENT_ERROR_AUTH_MISMATCH 26 // The selected authentication schema does not match the server response
-#define HTTP_CLIENT_ERROR_NO_DIGEST_TOKEN 27 // an element was missing while parsing the digest authentication challenge
-#define HTTP_CLIENT_ERROR_NO_DIGEST_ALG 28 // Digest algorithem could be MD5 or MD5-sess other types are not supported
-#define HTTP_CLIENT_ERROR_SOCKET_BIND 29 // Binding error
-#define HTTP_CLIENT_ERROR_TLS_NEGO 30 // Tls negotiation error
-#define HTTP_CLIENT_ERROR_NOT_IMPLEMENTED 64 // Feature is not (yet) implemented
-#define HTTP_CLIENT_EOS 1000 // HTTP end of stream message
-
- ///////////////////////////////////////////////////////////////////////////////
- //
- // Section : HTTP API structures
- // Last updated : 01/09/2005
- //
- ///////////////////////////////////////////////////////////////////////////////
-
- // HTTP Supported authentication methods
- typedef enum _HTTP_AUTH_SCHEMA
- {
- AuthSchemaNone = 0,
- AuthSchemaBasic,
- AuthSchemaDigest,
- AuthSchemaKerberos,
- AuthNotSupported
-
- } HTTP_AUTH_SCHEMA;
-
- // HTTP supported verbs
- typedef enum _HTTP_VERB
- {
- VerbGet = 0,
- VerbHead,
- VerbPost,
- VerbNotSupported
- // Note: others verb such as connect and put are currently not supported
-
- } HTTP_VERB;
-
- // Data structure that the caller can request at any time that will include some information regarding the session
- typedef struct _HTTP_CLIENT
- {
- UINT32 HTTPStatusCode; // HTTP Status code (200 OK)
- UINT32 RequestBodyLengthSent; // Total bytes sent (body only)
- UINT32 ResponseBodyLengthReceived; // Total bytes received (body only)
- UINT32 TotalResponseBodyLength; // as extracted from the “content-length" header
- UINT32 HttpState;
- } HTTP_CLIENT;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // _HTTPCLIENT_PROTOCOL_H_
diff --git a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientString.c b/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientString.c
deleted file mode 100644
index 4d408cdb6..000000000
--- a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientString.c
+++ /dev/null
@@ -1,422 +0,0 @@
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Module Name:
-// HTTPClientString.c
-//
-// Abstract: Helper function (string parsing related) for HTTPClient.c module
-//
-// Platform: Any that supports standard C calls
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "HTTPClient.h"
-#include "HTTPClientWrapper.h" // Cross platform support
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPStrInsensitiveCompare
-// Purpose : Same as strcmp() only case insensitive
-// Returns : BOOL - TRUE if destination string is identical to the source
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-BOOL HTTPStrInsensitiveCompare(CHAR *pSrc, // [IN] a pointer to the source string
- CHAR* pDest, // [IN] a pointer to the string we should search for
- UINT32 nLength) // [IN] The bytes range we should search in
-{
-
- // Lower case comparison
- UINT32 nPosition;
- UINT32 nDestLength;
- CHAR *pSrcIn, *pDestIn;
- CHAR a,b;
- pSrcIn = pSrc;
- pDestIn = pDest;
-
- nPosition = 0;
- nDestLength = strlen(pDest);
-
- if(nLength == 0)
- {
- nLength = strlen(pSrc);
- }
- if(nDestLength != nLength)
- {
- return FALSE;
- }
-
- while(pSrcIn || pDestIn)
- {
-
- if(nLength > 0 && nPosition == nLength)
- {
- return TRUE;
- }
-
- a = *pSrcIn;
- b = *pDestIn;
-
-
- if(*pSrcIn >= 64 && *pSrcIn <= 90)
- {
- // Upper case to lower case
- a = *pSrcIn + 32;
- }
-
- if(*pDestIn >= 64 && *pDestIn <= 90)
- {
- // Upper case to lower case
- b = *pDestIn + 32;
- }
-
- if(a != b)
- {
- return FALSE;
- }
-
- pSrcIn++;
- pDestIn++;
- nPosition++;
- }
- return TRUE;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPStrExtract
-// Purpose : Extract a string by placing null in the offset parameter
-// Returns : a pointer to the new string
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-CHAR HTTPStrExtract(CHAR *pParam, // [IN] a pointer to the input parameter
- UINT32 nOffset, // [IN] the offset position (where we should null terminate the string)
- CHAR Restore) // [IN] if this is not 0 we should restore it (instead of the null)
- // and reverse the effect.
-{
- CHAR Replaced;
-
- if(!pParam)
- {
- return 0;
- }
- // We should restore
- if(Restore != 0)
- {
- pParam[nOffset] = Restore;
- return Restore;
- }
- else
- {
- Replaced = pParam[nOffset];
- pParam[nOffset] = 0;
- return Replaced;
-
- }
-
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPStrSearch
-// Purpose : Search a string within another and return its pointer and a length
-// Returns : BOOL - TRUE on success
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-BOOL HTTPStrSearch(CHAR *pSrc, // [IN] The source string
- CHAR *pSearched, // [IN] Parameter to search for
- UINT32 nOffset, // [IN] Offset from the source string start position
- UINT32 nScope, // [IN] Length in bytes we should search in
- HTTP_PARAM *HttpParam) // [IN OUT] The Pointer\Length value that will be returned on success
-{
-
- CHAR *pSrcStart;
- CHAR *pDstStart;
- CHAR nOrigCharacter;
- UINT32 nPosition = 0;
-
- do
- {
- pSrcStart = pSrc + nOffset;
- nOrigCharacter = pSrcStart[nScope];
-
- // Temporarily null terminate
- pSrcStart[nScope] = 0;
-
- pDstStart = strstr(pSrcStart,pSearched);
- if(!pDstStart)
- {
- break;
- }
-
- nPosition = pDstStart - pSrcStart + 1;
-
- } while(0);
-
- // Remove the null termination
- pSrcStart[nScope] = nOrigCharacter;
-
- if(!nPosition)
- {
- return FALSE;
- }
-
- if(HttpParam)
- {
-
- HttpParam->nLength = nPosition -1;
- HttpParam->pParam = pSrcStart;
- }
-
- return TRUE;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPStrCaseStr
-// Purpose : Same as strstr() only case insensitive
-// Returns : a pointer to the position of the searched string (or 0 on error)
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-CHAR *HTTPStrCaseStr(const char *pSrc,UINT32 nSrcLength,const char *pFind)
-{
- const char *ptr = pSrc;
- const char *ptr2;
- UINT32 iLength = 0;
-
- while(1)
- {
- if(iLength >= nSrcLength)
- {
- break;
- }
- ptr = strchr(pSrc,toupper(*pFind));
- ptr2 = strchr(pSrc,tolower(*pFind));
- if (!ptr)
- {
- ptr = ptr2;
- }
- if (!ptr)
- {
- break;
- }
- if (ptr2 && (ptr2 < ptr)) {
- ptr = ptr2;
- }
- if (!strnicmp(ptr,pFind,strlen(pFind)))
- {
- return (char *) ptr;
- }
- pSrc = ptr+1;
- iLength++;
- }
- return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPStrCaseStr
-// Purpose :
-// Gets :
-// Returns :
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-
-CHAR* HTTPStrGetToken (CHAR *pSrc, UINT32 nSrcLength, CHAR *pDest, UINT32 *nDestLength)
-{
-
- // Get text between the ":" and \r\n or end of string.
- CHAR *pStart; // = pSrc; //Jerome: is reassigned few lines later
- CHAR *pEnd;
- UINT32 nTokenLength = 0;
- UINT32 nPosition = 0;
-
- pStart = strchr(pSrc,':') + 1;
- if(pStart)
- {
- pEnd = pStart ;
- // First pass, count required space
- while ((*pEnd) && (*pEnd != '\r') && (*pEnd != '\n'))
- {
- if(*pEnd != 0x20)
- {
- nTokenLength++;
- }
-
- if(nSrcLength && nPosition > nSrcLength)
- {
- break;
- }
- pEnd++;
- nPosition++;
- }
-
- if(nTokenLength > *(nDestLength))
- {
- *(nDestLength) = nTokenLength;
- pDest = NULL;
- return pDest;
- }
-
- // Second pass copy into the destination buffer
- pEnd = pStart;
- *(nDestLength) = nTokenLength;
- nTokenLength = 0;
- // First pass, count required space
- while ((*pEnd) && (*pEnd != '\r') && (*pEnd != '\n'))
- {
- if(*pEnd != 0x20)
- {
- pDest[nTokenLength++] = *pEnd;
- }
- pEnd++;
- }
-
- pDest[nTokenLength] = 0;
-
- }
-
-
- return pDest;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Function : HTTPStrGetDigestToken
-// Purpose :
-// Gets :
-// Returns :
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-UINT32 HTTPStrGetDigestToken (HTTP_PARAM pParamSrc, CHAR *pSearched, HTTP_PARAM *pParamDest)
-{
-
- CHAR Token[HTTP_CLIENT_MAX_TOKEN_NAME_LENGTH];
- CHAR *pPtrStart, *pPtrEnd, *pPtrEndSrc;
- BOOL Brackets = FALSE;
-
- // Build the searched token
- memset(Token,0x00,HTTP_CLIENT_MAX_TOKEN_NAME_LENGTH);
- strcpy(Token,pSearched);
- strcat(Token,"=");
-
- // Reset destination values
- pParamDest->nLength = 0;
- pParamDest->pParam = 0;
-
- pPtrEndSrc = pParamSrc.pParam + pParamSrc.nLength;
-
- pPtrStart = HTTPStrCaseStr(pParamSrc.pParam,pParamSrc.nLength,Token);
- if(pPtrStart)
- {
- // Found the token so jump to the end of it
- pPtrStart += strlen(Token);
- // jump passed any spaces that may be
- while ((*pPtrStart) && (*pPtrStart == 0x20) && (pPtrStart != pPtrEndSrc)) pPtrStart++;
- // Any Brackets around the string?
- if(*pPtrStart == 0x22) Brackets = TRUE;
-
-
- switch (Brackets)
- {
-
- case TRUE:
- // Find the next brackets
- pPtrStart++;
- pPtrEnd = pPtrStart;
- while ((*pPtrEnd) && (*pPtrEnd != 0x22) && (*pPtrEnd != 0x0d) && (*pPtrEnd != 0x0a) && (pPtrStart != pPtrEndSrc)) pPtrEnd++;
- break;
-
- case FALSE:
- // Find the next space or comma (0x2c)
- pPtrEnd = pPtrStart;
- while ((*pPtrEnd) && (*pPtrEnd != 0x20) && (*pPtrEnd != 0x2c) && (*pPtrEnd != 0x0d) && (*pPtrEnd != 0x0a) && (pPtrStart != pPtrEndSrc)) pPtrEnd++;
- break;
-
- };
-
- pParamDest->nLength = (pPtrEnd - pPtrStart);
- pParamDest->pParam = pPtrStart;
-
- return HTTP_CLIENT_SUCCESS;
- }
- return HTTP_CLIENT_ERROR_NO_DIGEST_TOKEN;
-
-
-}
-
-/////////////////////////////////////////////////////////////////////////////////
-// Function : HTTPStrHToL
-// Purpose : Convert a hex string "0x00" to long 0
-// Gets : a pointer to the Hex string
-// Last updated : 15/05/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-
-UINT32 HTTPStrHToL (CHAR * s)
-{
- UINT32 i , nn, digit;
- UINT32 n ;
-
- n = i = nn = 0;
- do
- {
- if ( isalnum(s[i]) ) {
- s[i] = toupper(s[i]) ;
- if (s[i] == 'X') nn=n=0; else {
- digit = (isalpha(s[i]) ? (s[i] - 'A' + 10) : s[i] - '0') ;
- if ( digit > 15 ) digit = 15;
- n = n * 16 + digit;
- if (n |= 0) nn++;
- if (nn == 8) break;}
- }
- i++;
- }
- while ( s[i] |= 0 );
- return n ;
-}
-
-/////////////////////////////////////////////////////////////////////////////////
-// Function : HTTPStrLToH
-// Purpose : Convert a long to hex string 0 to "00"
-// Gets :
-// Last updated : 15/05/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-CHAR* HTTPStrLToH (CHAR * dest,UINT32 nSrc)
-{
-
- char *hex = "0123456789abcdef";
- INT i;
-
- if (nSrc == 0) {
- dest[0] = '0';
- dest[1] = 0;
- }
- else
- {
- for(i = 28; ((nSrc >> i) && 0xf) == 0; i -= 4);
- for(; i >= 0; i -= 4) {
- *dest++ = hex[(nSrc >> i) & 0xf];
- }
- *dest = 0;
- }
-
- return dest;
-}
diff --git a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientString.h b/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientString.h
deleted file mode 100644
index 23dd45a45..000000000
--- a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientString.h
+++ /dev/null
@@ -1,23 +0,0 @@
-
-#ifndef _HTTP_CLIENT_STRING
-#define _HTTP_CLIENT_STRING
-
-#include "HTTPClientWrapper.h" // Cross platform support
-#include "HTTPClient.h"
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Section : HTTP Api global definitions
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-BOOL HTTPStrInsensitiveCompare (CHAR *pSrc, CHAR* pDest, UINT32 nLength);
-BOOL HTTPStrSearch (CHAR *pSrc, CHAR *pSearched, UINT32 nOffset, UINT32 nScope,HTTP_PARAM *HttpParam);
-CHAR HTTPStrExtract (CHAR *pParam,UINT32 nOffset,CHAR Restore);
-CHAR* HTTPStrCaseStr (CHAR *pSrc, UINT32 nSrcLength, CHAR *pFind);
-CHAR* HTTPStrGetToken (CHAR *pSrc, UINT32 nSrcLength, CHAR *pDest, UINT32 *nDestLength);
-UINT32 HTTPStrGetDigestToken (HTTP_PARAM pParamSrc, CHAR *pSearched, HTTP_PARAM *pParamDest);
-UINT32 HTTPStrHToL (CHAR * s);
-CHAR* HTTPStrLToH (CHAR * dest,UINT32 nSrc);
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientWrapper.c b/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientWrapper.c
deleted file mode 100644
index fe539ab65..000000000
--- a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientWrapper.c
+++ /dev/null
@@ -1,348 +0,0 @@
-
-#include "HTTPClientWrapper.h"
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Section : Stdc: HTTPWrapperIsAscii
-// Last updated : 15/05/2005
-// Author Name : Eitan Michaelson
-// Notes : Same as stdc: isascii
-//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-int HTTPWrapperIsAscii(int c)
-{
- return (!(c & ~0177));
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Section : Stdc: HTTPWrapperToUpper
-// Last updated : 15/05/2005
-// Author Name : Eitan Michaelson
-// Notes : Convert character to uppercase.
-//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-int HTTPWrapperToUpper(int c)
-{
- // -32
- if(HTTPWrapperIsAscii(c) > 0)
- {
- if(c >= 97 && c <= 122)
- {
- return (c - 32);
- }
- }
-
- return c;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Section : Stdc: HTTPWrapperToLower
-// Last updated : 13/06/2006
-// Author Name : Eitan Michaelson
-// Notes : Convert character to lowercase.
-//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-int HTTPWrapperToLower(int c)
-{
- // +32
- if(HTTPWrapperIsAscii(c) > 0)
- {
- if(c >= 65 && c <= 90)
- {
- return (c + 32);
- }
- }
-
- return c;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Section : Stdc: isalpha
-// Last updated : 15/05/2005
-// Author Name : Eitan Michaelson
-// Notes : returns nonzero if c is a particular representation of an alphabetic character
-//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-int HTTPWrapperIsAlpha(int c)
-{
-
- if(HTTPWrapperIsAscii(c) > 0)
- {
- if( (c >= 97 && c <= 122) || (c >= 65 && c <= 90))
- {
- return c;
- }
- }
- return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Section : Stdc: isalnum
-// Last updated : 15/05/2005
-// Author Name : Eitan Michaelson
-// Notes : returns nonzero if c is a particular representation of an alphanumeric character
-//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-int HTTPWrapperIsAlNum(int c)
-{
- if(HTTPWrapperIsAscii(c) > 0)
- {
-
- if(HTTPWrapperIsAlpha(c) > 0)
- {
- return c;
- }
-
- if( c >= 48 && c <= 57)
- {
- return c;
- }
-
- }
- return 0;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Section : HTTPWrapper_itoa
-// Last updated : 15/05/2005
-// Author Name : Eitan Michaelson
-// Notes : same as stdc itoa() // hmm.. allmost the same
-//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-char* HTTPWrapperItoa(char *s,int a)
-{
-
- unsigned int b;
- if(a > 2147483647)
- {
- return 0; // overflow
- }
-
- if (a < 0) b = -a, *s++ = '-';
- else b = a;
- for(;a;a=a/10) s++;
- for(*s='\0';b;b=b/10) *--s=b%10+'0';
- return s;
-
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Section : HTTPWrapper_ShutDown
-// Last updated : 15/05/2005
-// Author Name : Eitan Michaelson
-// Notes : Handles parameter changes in the socket shutdown() function in AMT
-//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
-int HTTPWrapperShutDown (int s,int how)
-{
- return shutdown(s,how);
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Section : HTTPWrapper_GetSocketError
-// Last updated : 15/05/2005
-// Author Name : Eitan Michaelson
-// Notes : WSAGetLastError Wrapper (Win32 Specific)
-//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-int HTTPWrapperGetSocketError (int s)
-{
-
- return WSAGetLastError();
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Section : HTTPWrapper_GetHostByName
-// Last updated : 15/05/2005
-// Author Name : Eitan Michaelson
-// Notes : gethostbyname for Win32 (supports the AMT edition of the function)
-//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-unsigned long HTTPWrapperGetHostByName(char *name,unsigned long *address)
-{
- HTTP_HOSTNET *HostEntry;
- int iPos = 0, iLen = 0,iNumPos = 0,iDots =0;
- long iIPElement;
- char c = 0;
- char Num[4];
- int iHostType = 0; // 0 : numeric IP
-
- // Check if the name is an IP or host
- iLen = strlen(name);
- for(iPos = 0; iPos <= iLen;iPos++)
- {
- c = name[iPos];
- if((c >= 48 && c <= 57) || (c == '.') )
- {
- // c is numeric or dot
- if(c != '.')
- {
- // c is numeric
- if(iNumPos > 3)
- {
- iHostType++;
- break;
- }
- Num[iNumPos] = c;
- Num[iNumPos + 1] = 0;
- iNumPos ++;
- }
- else
- {
- iNumPos = 0;
- iDots++;
- iIPElement = atol(Num);
- if(iIPElement > 256 || iDots > 3)
- {
- return 0; // error invalid IP
- }
- }
- }
- else
- {
- break; // this is an alpha numeric address type
- }
- }
-
- if(c == 0 && iHostType == 0 && iDots == 3)
- {
- iIPElement = atol(Num);
- if(iIPElement > 256)
- {
- return 0; // error invalid IP
- }
- }
- else
- {
- iHostType++;
- }
-
- if(iHostType > 0)
- {
-
- HostEntry = gethostbyname(name);
- if(HostEntry)
- {
- *(address) = *((u_long*)HostEntry->h_addr_list[0]);
-
- //*(address) = (unsigned long)HostEntry->h_addr_list[0];
- return 1; // Error
- }
- else
- {
- return 0; // OK
- }
- }
-
- else // numeric address - no need for DNS resolve
- {
- *(address) = inet_addr(name);
- return 1;
-
- }
- return 0;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Section : HTTPWrapper_GetRandomeNumber
-// Last updated : 15/05/2005
-// Author Name : Eitan Michaelson
-// Notes : GetRandom number for Win32 & AMT
-//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-void HTTPWrapperInitRandomeNumber()
-{
- srand((unsigned int)time(NULL));
-}
-
-int HTTPWrapperGetRandomeNumber()
-{
- int num;
- num = (int)(((double) rand()/ ((double)RAND_MAX+1)) * 16);
- return num;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Section : HTTPWrapper_GetRTC
-// Last updated : 15/05/2005
-// Author Name : Eitan Michaelson
-// Notes : Get uptime under Win32 & AMT
-//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-long HTTPWrapperGetUpTime()
-{
-
- long lTime = 0;
-
- lTime = (GetTickCount() / CLOCKS_PER_SEC);
- return lTime;
-
-}
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Section : TSL Wrapper
-// Last updated : 15/05/2005
-// Author Name : Eitan Michaelson
-// Notes : HTTPWrapper_Sec_Connect
-//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-int HTTPWrapperSSLConnect(int s,const struct sockaddr *name,int namelen,char *hostname)
-{
- return -1;
-}
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-int HTTPWrapperSSLNegotiate(int s,const struct sockaddr *name,int namelen,char *hostname)
-{
- return -1;
-}
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-int HTTPWrapperSSLSend(int s,char *buf, int len,int flags)
-{
- return -1;
-}
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-int HTTPWrapperSSLRecv(int s,char *buf, int len,int flags)
-{
- return -1;
-}
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-int HTTPWrapperSSLRecvPending(int s)
-{
- return -1;
-}
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-int HTTPWrapperSSLClose(int s)
-{
- return -1;
-
-}
diff --git a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientWrapper.h b/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientWrapper.h
deleted file mode 100644
index 8cda0cf4c..000000000
--- a/src/thirdparty/ZenLib/ZenLib/HTTP_Client/HTTPClientWrapper.h
+++ /dev/null
@@ -1,111 +0,0 @@
-
-#ifndef HTTP_CLIENT_WRAPPER
-#define HTTP_CLIENT_WRAPPER
-
-// Compilation mode
-#define _HTTP_BUILD_WIN32 // Set Windows Build flag
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Section : Microsoft Windows Support
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifdef _HTTP_BUILD_WIN32
-
-#if defined(_MSC_VER)
- #pragma warning (disable: 4996) // 'function': was declared deprecated (VS 2005)
-#endif
-#include <stdlib.h>
-#include <string.h>
-#include <memory.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <time.h>
-#if defined(_WIN32) || defined(WIN32)
- #include <winsock.h>
-#endif
-
-// Generic types
-typedef unsigned int UINT32;
-typedef int INT32;
-
-// Sockets (Winsock wrapper)
-#define HTTP_ECONNRESET (WSAECONNRESET)
-#define HTTP_EINPROGRESS (WSAEINPROGRESS)
-#define HTTP_EWOULDBLOCK (WSAEWOULDBLOCK)
-#endif
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Section : Functions that are not supported by the AMT stdc framework
-// So they had to be specificaly added.
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- // STDC Wrapper implimentation
- int HTTPWrapperIsAscii (int c);
- int HTTPWrapperToUpper (int c);
- int HTTPWrapperToLower (int c);
- int HTTPWrapperIsAlpha (int c);
- int HTTPWrapperIsAlNum (int c);
- char* HTTPWrapperItoa (char *buff,int i);
- void HTTPWrapperInitRandomeNumber ();
- long HTTPWrapperGetUpTime ();
- int HTTPWrapperGetRandomeNumber ();
- int HTTPWrapperGetSocketError (int s);
- unsigned long HTTPWrapperGetHostByName (char *name,unsigned long *address);
- int HTTPWrapperShutDown (int s,int in);
- // SSL Wrapper prototypes
- int HTTPWrapperSSLConnect (int s,const struct sockaddr *name,int namelen,char *hostname);
- int HTTPWrapperSSLNegotiate (int s,const struct sockaddr *name,int namelen,char *hostname);
- int HTTPWrapperSSLSend (int s,char *buf, int len,int flags);
- int HTTPWrapperSSLRecv (int s,char *buf, int len,int flags);
- int HTTPWrapperSSLClose (int s);
- int HTTPWrapperSSLRecvPending (int s);
- // Global wrapper Functions
-#define IToA HTTPWrapperItoa
-#define GetUpTime HTTPWrapperGetUpTime
-#define SocketGetErr HTTPWrapperGetSocketError
-#define HostByName HTTPWrapperGetHostByName
-#define InitRandomeNumber HTTPWrapperInitRandomeNumber
-#define GetRandomeNumber HTTPWrapperGetRandomeNumber
-
-#ifdef __cplusplus
-}
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Section : Global type definitions
-// Last updated : 01/09/2005
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#define VOID void
-#ifndef NULL
-#define NULL 0
-#endif
-#define TRUE 1
-#define FALSE 0
-typedef char CHAR;
-typedef unsigned short UINT16;
-typedef int BOOL;
-typedef unsigned long ULONG;
-
-// Global socket structures and definitions
-#define HTTP_INVALID_SOCKET (-1)
-typedef struct sockaddr_in HTTP_SOCKADDR_IN;
-typedef struct timeval HTTP_TIMEVAL;
-typedef struct hostent HTTP_HOSTNET;
-typedef struct sockaddr HTTP_SOCKADDR;
-typedef struct in_addr HTTP_INADDR;
-
-
-#endif // HTTP_CLIENT_WRAPPER
diff --git a/src/thirdparty/ZenLib/ZenLib/InfoMap.cpp b/src/thirdparty/ZenLib/ZenLib/InfoMap.cpp
deleted file mode 100644
index 063ce53b9..000000000
--- a/src/thirdparty/ZenLib/ZenLib/InfoMap.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef ZENLIB_USEWX
- #include <wx/strconv.h>
-#endif //ZENLIB_USEWX
-#include <algorithm>
-#include "ZenLib/InfoMap.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//---------------------------------------------------------------------------
-const Ztring InfoMap_EmptyZtring_Const; //Use it when we can't return a reference to a true Ztring, const version
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Constructors/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Constructors
-InfoMap::InfoMap()
-: std::multimap<ZenLib::Ztring, ZenLib::ZtringList> ()
-{
- Separator[0]=EOL;
- Separator[1]=__T(";");
-}
-
-InfoMap::InfoMap(const Ztring &Source)
-: std::multimap<ZenLib::Ztring, ZenLib::ZtringList> ()
-{
- Separator[0]=EOL;
- Separator[1]=__T(";");
- Write(Source);
-}
-
-InfoMap::InfoMap(const Char *Source)
-: std::multimap<ZenLib::Ztring, ZenLib::ZtringList> ()
-{
- Separator[0]=EOL;
- Separator[1]=__T(";");
- Write(Source);
-}
-
-#ifdef _UNICODE
-InfoMap::InfoMap (const char* S)
-: std::multimap<ZenLib::Ztring, ZenLib::ZtringList> ()
-{
- Separator[0]=EOL;
- Separator[1]=__T(";");
- Write(Ztring(S));
-}
-#endif
-
-//***************************************************************************
-// In/Out
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-const Ztring &InfoMap::Get (const Ztring &Value, size_t Pos) const
-{
- InfoMap::const_iterator List=find(Value);
- if (List==end())
- return InfoMap_EmptyZtring_Const; //Not found
- if (Pos<List->second.size())
- return List->second[Pos];
- else
- return InfoMap_EmptyZtring_Const; //Not found
-}
-
-//---------------------------------------------------------------------------
-const Ztring &InfoMap::Get (const Ztring &Value, size_t Pos, const Ztring &WithValue, size_t WithValue_Pos) const
-{
- InfoMap::const_iterator List=find(Value);
- if (List==end())
- return InfoMap_EmptyZtring_Const; //Not found
- if (Pos<List->second.size())
- {
- if (List->second[WithValue_Pos]==WithValue)
- return List->second[Pos];
- else
- {
- ++List; //The second one, this is a stupid hack for a 2 value, should be changed later...
- if (Pos<List->second.size())
- {
- if (List->second[WithValue_Pos]==WithValue)
- return List->second[Pos];
- else
- return InfoMap_EmptyZtring_Const; //Not found
- }
- else
- return InfoMap_EmptyZtring_Const; //Not found
- }
- }
- else
- return InfoMap_EmptyZtring_Const; //Not found
-}
-
-//---------------------------------------------------------------------------
-// Set
-void InfoMap::Write(const Ztring &NewInfoMap)
-{
- clear();
-
- if (NewInfoMap.empty())
- return;
-
- size_t Pos1=0, Pos2_EOL=0, Pos2_Separator=0;
-
- while (Pos2_EOL!=(size_t)-1)
- {
- Pos2_EOL=NewInfoMap.find(__T('\n'), Pos1);
- Pos2_Separator=NewInfoMap.find(__T(';'), Pos1);
- if (Pos2_Separator<Pos2_EOL)
- {
- ZtringList List; List.Write(NewInfoMap.substr(Pos1, Pos2_EOL-Pos1));
- insert (pair<Ztring, ZtringList>(NewInfoMap.substr(Pos1, Pos2_Separator-Pos1), List));
- }
- Pos1=Pos2_EOL+1;
- }
-}
-
-//***************************************************************************
-// Configuration
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Separator
-void InfoMap::Separator_Set (size_type Level, const Ztring &NewSeparator)
-{
- if (Level>1)
- return;
-
- Separator[Level]=NewSeparator;
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/InfoMap.h b/src/thirdparty/ZenLib/ZenLib/InfoMap.h
deleted file mode 100644
index 0711de285..000000000
--- a/src/thirdparty/ZenLib/ZenLib/InfoMap.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_InfoMapH
-#define ZenLib_InfoMapH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/ZtringList.h"
-#include <map>
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-/// @brief Helper for InfoMap
-//***************************************************************************
-
-class InfoMap : public std::multimap<Ztring, ZtringList>
-{
-public :
- //Constructors/Destructor
- InfoMap ();
- InfoMap (const Ztring &Source);
- InfoMap (const Char *Source);
- #ifdef _UNICODE
- InfoMap (const char *Source); //convert a UTF-8 string into Unicode
- #endif
-
- //In/Out
- const Ztring &Get (const Ztring &Value, size_t Pos) const;
- const Ztring &Get (const Ztring &Value, size_t Pos, const Ztring &WithValue, size_t WithValue_Pos) const;
- void Write (const Ztring &NewLanguage);
-
- //Configuration
- /// @brief Set the Separator character
- void Separator_Set (size_type Level, const Ztring &NewSeparator);
- /// @brief Set the Quote character
- /// During Read() or Write() method, if Separator is in the sequence, we must quote it
- void Quote_Set (const Ztring &NewQuote);
- /// @brief Set the Maximum number of element to read
- /// During Read() or Write() method, if there is more elements, merge them with the last element
- void Max_Set (size_type Level, size_type Max);
-
-protected :
- Ztring Separator[2];
- Ztring Quote;
- size_type Max[2];
-};
-
-} //namespace
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/MemoryDebug.cpp b/src/thirdparty/ZenLib/ZenLib/MemoryDebug.cpp
deleted file mode 100644
index cc281f89f..000000000
--- a/src/thirdparty/ZenLib/ZenLib/MemoryDebug.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(ZENLIB_DEBUG)
-//---------------------------------------------------------------------------
-#include <iomanip>
-#include <sstream>
-#include "ZenLib/MemoryDebug.h"
-#include "ZenLib/Ztring.h"
-#ifdef WINDOWS
- #include <io.h>
-#else
- #include <cstdio>
-#endif
-#include <fcntl.h>
-#include <sys/stat.h>
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// Constructors/destructor
-//***************************************************************************
-
-MemoryDebug::MemoryDebug()
-{
-}
-
-MemoryDebug::~MemoryDebug()
-{
- if (!m_Blocks.empty())
- ReportLeaks();
-}
-
-//***************************************************************************
-// Instance
-//***************************************************************************
-
-MemoryDebug& MemoryDebug::Instance()
-{
- static MemoryDebug Inst;
- return Inst;
-}
-
-//***************************************************************************
-// Reports
-//***************************************************************************
-
-void MemoryDebug::ReportLeaks()
-{
- Ztring m_File;
- //std::ofstream m_File ("Debug_MemoryLeak.txt"); // Fichier de sortie
-
- // Détail des fuites
- std::size_t TotalSize = 0;
- for (TBlockMap::iterator i = m_Blocks.begin(); i != m_Blocks.end(); ++i)
- {
- // Ajout de la taille du bloc au cumul
- TotalSize += i->second.Size;
-
- // Inscription dans le fichier des informations sur le bloc courant
- /*
- m_File << "-> 0x" << std::hex << i->first << std::dec
- << " | " << std::setw(7) << std::setfill(' ') << static_cast<int>(i->second.Size) << " bytes"
- << " | " << i->second.File.c_str() << " (" << i->second.Line << ")" << std::endl;
- */
- m_File.append(__T("-> 0x"));
- m_File.append(Ztring::ToZtring((size_t)i->first, 16));
- m_File.append(__T(" | "));
- Ztring Temp;
- Temp.From_Number(static_cast<int>(i->second.Size));
- while(Temp.size()<7)
- Temp=__T(" ")+Temp;
- m_File.append(Temp);
- m_File.append(__T(" bytes"));
- m_File.append(__T(" | "));
- m_File.append(Ztring().From_Local(i->second.File.c_str()));
- m_File.append(__T(" ("));
- m_File.append(Ztring::ToZtring(i->second.Line));
- m_File.append(__T(")"));
- m_File.append(EOL);
- }
-
- // Affichage du cumul des fuites
- /*
- m_File << std::endl << std::endl << "-- "
- << static_cast<int>(m_Blocks.size()) << " non-released blocs, "
- << static_cast<int>(TotalSize) << " bytes --"
- << std::endl;
- */
- m_File.append(EOL);
- m_File.append(EOL);
- m_File.append(__T("-- "));
- m_File.append(Ztring::ToZtring(static_cast<int>(m_Blocks.size())));
- m_File.append(__T(" non-released blocs, "));
- m_File.append(Ztring::ToZtring(static_cast<int>(TotalSize)));
- m_File.append(__T(" bytes --"));
- m_File.append(EOL);
-
- std::string ToWrite=m_File.To_Local().c_str();
- int m_File_sav=open("Debug_MemoryLeak.txt", O_BINARY|O_RDWR |O_CREAT); // Fichier de sortie
- write(m_File_sav, (int8u*)ToWrite.c_str(), ToWrite.size());
- close(m_File_sav);
-}
-
-//***************************************************************************
-// Memory management
-//***************************************************************************
-
-void* MemoryDebug::Allocate(std::size_t Size, const char* File, int Line, bool Array)
-{
- // Allocation de la mémoire
- void* Ptr = malloc(Size);
-
- // Ajout du bloc à la liste des blocs alloués
- TBlock NewBlock;
- NewBlock.Size = Size;
- NewBlock.File = File;
- NewBlock.Line = Line;
- NewBlock.Array = Array;
- m_Blocks[Ptr] = NewBlock;
- return Ptr;
-}
-
-void MemoryDebug::Free(void* Ptr, bool Array)
-{
- // Recherche de l'adresse dans les blocs alloués
- TBlockMap::iterator It = m_Blocks.find(Ptr);
-
- // Si le bloc n'a pas été alloué, on génère une erreur
- if (It == m_Blocks.end())
- {
- // En fait ça arrive souvent, du fait que le delete surcharge est pris en compte meme la ou on n'inclue pas DebugNew.h,
- // mais pas la macro pour le new
- // Dans ce cas on détruit le bloc et on quitte immédiatement
- free(Ptr);
- return;
- }
-
- // Si le type d'allocation ne correspond pas, on génère une erreur
- if (It->second.Array != Array)
- {
- //throw CBadDelete(Ptr, It->second.File.c_str(), It->second.Line, !Array);
- }
-
- // Finalement, si tout va bien, on supprime le bloc et on loggiz tout ça
- m_Blocks.erase(It);
- m_DeleteStack.pop();
-
- // Libération de la mémoire
- free(Ptr);
-}
-
-void MemoryDebug::NextDelete(const char* File, int Line)
-{
- TBlock Delete;
- Delete.File = File;
- Delete.Line = Line;
-
- m_DeleteStack.push(Delete);
-}
-
-//***************************************************************************
-//
-//***************************************************************************
-
-} //NameSpace
-
-#endif // defined(ZENLIB_DEBUG)
diff --git a/src/thirdparty/ZenLib/ZenLib/MemoryDebug.h b/src/thirdparty/ZenLib/ZenLib/MemoryDebug.h
deleted file mode 100644
index 6111dcd05..000000000
--- a/src/thirdparty/ZenLib/ZenLib/MemoryDebug.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// MemoryDebug
-//
-// Provide "new" and "delete" overloadings to be able to detect memory leaks
-// Based on http://loulou.developpez.com/tutoriels/moteur3d/partie1/ 2.2.1
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenMemoryDebugH
-#define ZenMemoryDebugH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(ZENLIB_DEBUG)
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf.h"
-#include <fstream>
-#include <map>
-#include <stack>
-#include <string>
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// Class
-//***************************************************************************
-
-class MemoryDebug
-{
-public :
- ~MemoryDebug();
- static MemoryDebug& Instance();
-
- void* Allocate(std::size_t Size, const char* File, int Line, bool Array);
- void Free(void* Ptr, bool Array);
- void NextDelete(const char*, int Line); //Sauvegarde les infos sur la désallocation courante
-
- void ReportLeaks();
-
-private :
- MemoryDebug();
- struct TBlock
- {
- std::size_t Size; // Taille allouée
- std::string File; // Fichier contenant l'allocation
- int Line; // Ligne de l'allocation
- bool Array; // Est-ce un objet ou un tableau ?
- };
- typedef std::map<void*, TBlock> TBlockMap;
-
- TBlockMap m_Blocks; // Blocs de mémoire alloués
- std::stack<TBlock> m_DeleteStack; // Pile dont le sommet contient la ligne et le fichier de la prochaine désallocation
-};
-
-} //NameSpace
-
-//***************************************************************************
-// operator overloadings
-//***************************************************************************
-
-inline void* operator new(std::size_t Size, const char* File, int Line)
-{
- return ZenLib::MemoryDebug::Instance().Allocate(Size, File, Line, false);
-}
-inline void* operator new[](std::size_t Size, const char* File, int Line)
-{
- return ZenLib::MemoryDebug::Instance().Allocate(Size, File, Line, true);
-}
-
-inline void operator delete(void* Ptr)
-{
- ZenLib::MemoryDebug::Instance().Free(Ptr, false);
-}
-
-inline void operator delete[](void* Ptr)
-{
- ZenLib::MemoryDebug::Instance().Free(Ptr, true);
-}
-
-#if !defined(__BORLANDC__) // Borland does not support overloaded delete
-inline void operator delete(void* Ptr, const char* File, int Line)
-{
- ZenLib::MemoryDebug::Instance().NextDelete(File, Line);
- ZenLib::MemoryDebug::Instance().Free(Ptr, false);
-}
-
-inline void operator delete[](void* Ptr, const char* File, int Line)
-{
- ZenLib::MemoryDebug::Instance().NextDelete(File, Line);
- ZenLib::MemoryDebug::Instance().Free(Ptr, true);
-}
-#endif
-
-#if !defined(__MINGW32__) //TODO: Does not work on MinGW, don't know why
-#ifndef new
- #define new new(__FILE__, __LINE__)
-#endif
-#ifndef delete
- #define delete ZenLib::MemoryDebug::Instance().NextDelete(__FILE__, __LINE__), delete
-#endif
-#endif // __MINGW32__
-
-#endif // defined(ZENLIB_DEBUG)
-
-#endif // ZenMemoryDebugH
diff --git a/src/thirdparty/ZenLib/ZenLib/MemoryUtils.h b/src/thirdparty/ZenLib/ZenLib/MemoryUtils.h
deleted file mode 100644
index cebad594a..000000000
--- a/src/thirdparty/ZenLib/ZenLib/MemoryUtils.h
+++ /dev/null
@@ -1,262 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_MemoryUtilsH
-#define ZenLib_MemoryUtilsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf.h"
-#include "ZenLib/Conf.h"
-//---------------------------------------------------------------------------
-
-#include <cstring>
-#ifdef ZENLIB_MEMUTILS_SSE2
- #include <emmintrin.h>
-#endif //ZENLIB_MEMUTILS_SSE2
-
-namespace ZenLib
-{
-
-#ifndef ZENLIB_MEMUTILS_SSE2
- //-----------------------------------------------------------------------
- // Memory alloc/free
- #define malloc_Aligned128 (size) \
- malloc (size)
- #define free_Aligned128 (ptr) \
- free (ptr)
-
- //-----------------------------------------------------------------------
- // Arbitrary size - To Unaligned
- #define memcpy_Unaligned_Unaligned memcpy
- #define memcpy_Aligned128_Unaligned memcpy
-
- //-----------------------------------------------------------------------
- // Arbitrary size - To Aligned 128 bits (16 bytes)
- #define memcpy_Unaligned_Aligned128 memcpy
- #define memcpy_Aligned128_Aligned128 memcpy
-
- //-----------------------------------------------------------------------
- // 128 bits - To Unaligned
- #define memcpy_Unaligned_Unaligned_Once128 memcpy
-
- //-----------------------------------------------------------------------
- // 128 bits - To Aligned 128 bits (16 bytes)
- #define memcpy_Aligned128_Aligned128_Once128 memcpy
-
- //-----------------------------------------------------------------------
- // 1024 bits - To Unaligned
- #define memcpy_Unaligned_Unaligned_Once1024 memcpy
-
- //-----------------------------------------------------------------------
- // 1024 bits - To Aligned 128 bits (16 bytes)
- #define memcpy_Aligned128_Aligned128_Once1024 memcpy
-
- //-----------------------------------------------------------------------
- // 128-bit multiple - To Aligned 128 bits (16 bytes)
- #define memcpy_Unaligned_Aligned128_Size128 memcpy
- #define memcpy_Aligned128_Aligned128_Size128 memcpy
-
-#else // ZENLIB_MEMUTILS_SSE2
-
- //-----------------------------------------------------------------------
- // Memory alloc/free
-
- inline void* malloc_Aligned128 (size_t size)
- {
- return _aligned_malloc (size, 16); //aligned_alloc in C11
- }
-
- inline void free_Aligned128 ( void *ptr )
- {
- _aligned_free (ptr); //free in C11
- }
-
- //-----------------------------------------------------------------------
- // Arbitrary size - To Unaligned
-
- inline void memcpy_Unaligned_Unaligned (void* destination, const void* source, size_t num)
- {
- size_t extra=num&0xF;
- __m128i* destination16=(__m128i*)destination;
- const __m128i* source16=(const __m128i*)source;
-
- num>>=4;
- while (num--)
- _mm_storeu_si128 (destination16++, _mm_loadu_si128(source16++));
-
- char* destination1=(char*)destination16;
- char* source1=(char*)source16;
- while (extra--)
- *destination1++=*source1++;
- }
-
- inline void memcpy_Aligned128_Unaligned (void* destination, const void* source, size_t num)
- {
- size_t extra=num&0xF;
- __m128i* destination16=(__m128i*)destination;
- const __m128i* source16=(const __m128i*)source;
-
- num>>=4;
- while (num--)
- _mm_storeu_si128 (destination16++, _mm_load_si128(source16++));
-
- char* destination1=(char*)destination16;
- char* source1=(char*)source16;
- while (extra--)
- *destination1++=*source1++;
- }
-
- //-----------------------------------------------------------------------
- // Arbitrary size - To Aligned 128 bits (16 bytes)
-
- inline void memcpy_Unaligned_Aligned128 (void* destination, const void* source, size_t num)
- {
- size_t extra=num&0xF;
- __m128i* destination16=(__m128i*)destination;
- const __m128i* source16=(const __m128i*)source;
-
- num>>=4;
- while (num--)
- _mm_stream_si128 (destination16++, _mm_loadu_si128(source16++));
-
- char* destination1=(char*)destination16;
- char* source1=(char*)source16;
- while (extra--)
- *destination1++=*source1++;
- }
-
- //-----------------------------------------------------------------------
- // 128 bits - To Unaligned
-
- inline void memcpy_Unaligned_Unaligned_Once128 (void* destination, const void* source)
- {
- _mm_storeu_si128 ((__m128i*)destination, _mm_loadu_si128((const __m128i*)source));
- }
-
- //-----------------------------------------------------------------------
- // 128 bits - To Aligned 128 bits (16 bytes)
-
- inline void memcpy_Aligned128_Aligned128 (void* destination, const void* source, size_t num)
- {
- size_t extra=num&0xF;
- __m128i* destination16=(__m128i*)destination;
- const __m128i* source16=(const __m128i*)source;
-
- num>>=4;
- while (num--)
- _mm_stream_si128 (destination16++, _mm_load_si128(source16++));
-
- char* destination1=(char*)destination16;
- char* source1=(char*)source16;
- while (extra--)
- *destination1++=*source1++;
- }
-
- inline void memcpy_Aligned128_Aligned128_Size128 (void* destination, const void* source, size_t num)
- {
- __m128i* destination16=(__m128i*)destination;
- const __m128i* source16=(__m128i*)source;
-
- num>>=4;
- while (num--)
- _mm_stream_si128 (destination16++, _mm_load_si128(source16++));
- }
-
- //-----------------------------------------------------------------------
- // 1024 bits - To Unaligned
-
- inline void memcpy_Unaligned_Unaligned_Once1024 (void* destination, const void* source, size_t)
- {
- __m128i* destination16=(__m128i*)destination;
- const __m128i* source16=(__m128i*)source;
-
- size_t num=8;
- while (num--)
- _mm_storeu_si128 (destination16++, _mm_loadu_si128(source16++));
- }
-
- //-----------------------------------------------------------------------
- // 1024 bits - To Aligned 128 bits (16 bytes)
-
- inline void memcpy_Aligned128_Aligned128_Once128 (void* destination, const void* source)
- {
- _mm_stream_si128 ((__m128i*)destination, _mm_load_si128((const __m128i*)source));
- }
-
- //-----------------------------------------------------------------------
- // 128-bit multiple - To Unaligned (16 bytes)
-
- inline void memcpy_Unaligned_Unaligned_Size128 (void* destination, const void* source, size_t num)
- {
- __m128i* destination16=(__m128i*)destination;
- const __m128i* source16=(const __m128i*)source;
-
- num>>=4;
- while (num--)
- _mm_storeu_si128 (destination16++, _mm_loadu_si128(source16++));
- }
-
- inline void memcpy_Aligned128_Unaligned_Size128 (void* destination, const void* source, size_t num)
- {
- __m128i* destination16=(__m128i*)destination;
- const __m128i* source16=(__m128i*)source;
-
- num>>=4;
- while (num--)
- _mm_storeu_si128 (destination16++, _mm_load_si128(source16++));
- }
-
- //-----------------------------------------------------------------------
- // 128-bit multiple - To Aligned 128 bits (16 bytes)
-
- inline void memcpy_Unaligned_Aligned128_Size128 (void* destination, const void* source, size_t num)
- {
- __m128i* destination16=(__m128i*)destination;
- const __m128i* source16=(__m128i*)source;
-
- num>>=4;
- while (num--)
- _mm_stream_si128 (destination16++, _mm_loadu_si128(source16++));
- }
-
-
- /* Slower
- inline void memcpy_Aligned128_Aligned128_Once1024 (void* destination, const void* source)
- {
- __m128i* destination16=(__m128i*)destination;
- const __m128i* source16=(__m128i*)source;
-
- size_t num=8;
- while (num--)
- _mm_stream_si128 (destination16++, _mm_load_si128(source16++));
- }
- */
-
- /*
- inline void memcpy_Aligned256_Aligned256 (void* destination, const void* source, size_t num) //with AVX, actually slower
- {
- size_t extra=num&0x1F;
- __m256i* destination16=(__m256i*)destination;
- const __m256i* source16=(const __m256i*)source;
-
- num>>=5;
- while (num--)
- _mm256_storeu_si256 (destination16++, _mm256_loadu_si256(source16++));
-
- char* destination1=(char*)destination16;
- char* source1=(char*)source16;
- while (extra--)
- *destination1++=*source1++;
- }
- */
-
-#endif // ZENLIB_MEMUTILS_SSE2
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/OS_Utils.cpp b/src/thirdparty/ZenLib/ZenLib/OS_Utils.cpp
deleted file mode 100644
index 705987345..000000000
--- a/src/thirdparty/ZenLib/ZenLib/OS_Utils.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef ZENLIB_USEWX
-#else //ZENLIB_USEWX
- #ifdef WINDOWS
- #undef __TEXT
- #include <windows.h>
- #include <shlobj.h>
- #endif
-#endif //ZENLIB_USEWX
-#include "ZenLib/OS_Utils.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// OS info
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool IsWin9X ()
-{
- return false; //Hardcoded value because we don't support Win9x anymore
-}
-
-//***************************************************************************
-// Shell
-//***************************************************************************
-
-void Shell_Execute(const Ztring &ToExecute)
-{
- #ifdef ZENLIB_USEWX
- #else //ZENLIB_USEWX
- #ifdef WINDOWS
- ShellExecute(NULL, __T("open"), ToExecute.c_str(), NULL, NULL, 0);
- #else
- //Not supported
- #endif
- #endif //ZENLIB_USEWX
-}
-
-//***************************************************************************
-// Directories
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Select directory code
-// Extracted from TBffolder by Torsten Johann (t-johann@gmx.de)
-
-Ztring Directory_Select_Caption;
-
-#ifdef WINDOWS
- #ifdef UNICODE
- char InitDirA[MAX_PATH];
- wchar_t InitDir [MAX_PATH];
-
- int __stdcall ShowOpenFolder_CallbackProc (HWND hwnd, UINT uMsg, LPARAM, LPARAM)
- {
- if (uMsg==BFFM_INITIALIZED)
- {
- SetWindowText(hwnd, Directory_Select_Caption.c_str()); // Caption
- SendMessage (hwnd, BFFM_ENABLEOK, 0, TRUE);
- SendMessage (hwnd, BFFM_SETSELECTION, true, (LPARAM)&InitDir);
- }
- return 0;
- }
-
- Ztring OpenFolder_Show(void* Handle, const Ztring &Title, const Ztring &Caption)
- {
- //Caption
- Directory_Select_Caption=Caption;
-
- //Values
- LPMALLOC Malloc;
- LPSHELLFOLDER ShellFolder;
- BROWSEINFO BrowseInfo;
- LPITEMIDLIST ItemIdList;
-
- //Initializing the SHBrowseForFolder function
- if (SHGetMalloc(&Malloc)!=NOERROR)
- return Ztring();
- if (SHGetDesktopFolder(&ShellFolder)!=NOERROR)
- return Ztring();
- ZeroMemory(&BrowseInfo, sizeof(BROWSEINFOW));
- BrowseInfo.ulFlags+=BIF_RETURNONLYFSDIRS;
- BrowseInfo.hwndOwner=(HWND)Handle;
- BrowseInfo.pszDisplayName=InitDir;
- BrowseInfo.lpszTitle=Title.c_str();
- BrowseInfo.lpfn=ShowOpenFolder_CallbackProc;
-
- //Displaying
- ItemIdList=SHBrowseForFolder(&BrowseInfo);
-
- //Releasing
- ShellFolder->Release();
- if (ItemIdList!=NULL)
- {
- SHGetPathFromIDList(ItemIdList, InitDir);
- Malloc->Free(ItemIdList);
- Malloc->Release();
-
- //The value
- return InitDir;
- }
- else
- return Ztring();
- }
-
- #else
- char InitDirA[MAX_PATH];
-
- int __stdcall ShowOpenFolder_CallbackProc (HWND hwnd, UINT uMsg, LPARAM, LPARAM)
- {
- if (uMsg==BFFM_INITIALIZED)
- {
- SetWindowText (hwnd, Directory_Select_Caption.c_str()); // Caption
- SendMessage (hwnd, BFFM_ENABLEOK, 0, TRUE);
- SendMessage (hwnd, BFFM_SETSELECTION, true, (LPARAM)&InitDirA);
- }
- return 0;
- }
-
- Ztring OpenFolder_Show(void* Handle, const Ztring &Title, const Ztring &Caption)
- {
- //Caption
- Directory_Select_Caption=Caption;
-
- //Values
- LPMALLOC Malloc;
- LPSHELLFOLDER ShellFolder;
- BROWSEINFO BrowseInfo;
- LPITEMIDLIST ItemIdList;
-
- //Initializing the SHBrowseForFolder function
- if (SHGetMalloc(&Malloc)!=NOERROR)
- return Ztring();
- if (SHGetDesktopFolder(&ShellFolder)!=NOERROR)
- return Ztring();
- ZeroMemory(&BrowseInfo, sizeof(BROWSEINFO));
- BrowseInfo.ulFlags+=BIF_RETURNONLYFSDIRS;
- BrowseInfo.hwndOwner=(HWND)Handle;
- BrowseInfo.pszDisplayName=InitDirA;
- BrowseInfo.lpszTitle=Title.c_str();
- BrowseInfo.lpfn=ShowOpenFolder_CallbackProc;
-
- //Displaying
- ItemIdList=SHBrowseForFolder(&BrowseInfo);
-
- //Releasing
- ShellFolder->Release();
- if (ItemIdList!=NULL)
- {
- SHGetPathFromIDList(ItemIdList, InitDirA);
- Malloc->Free(ItemIdList);
- Malloc->Release();
-
- //The value
- return InitDirA;
- }
- else
- return Ztring();
- }
- #endif //UNICODE
-#endif //WINDOWS
-
-} //namespace ZenLib
diff --git a/src/thirdparty/ZenLib/ZenLib/OS_Utils.h b/src/thirdparty/ZenLib/ZenLib/OS_Utils.h
deleted file mode 100644
index 3c2614401..000000000
--- a/src/thirdparty/ZenLib/ZenLib/OS_Utils.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef ZenOS_UtilsH
-#define ZenOS_UtilsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Ztring.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// OS Information
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool IsWin9X ();
-// Execute
-//***************************************************************************
-
-void Shell_Execute(const Ztring &ToExecute);
-
-//***************************************************************************
-// Directorues
-//***************************************************************************
-
-Ztring OpenFolder_Show(void* Handle, const Ztring &Title, const Ztring &Caption);
-
-} //namespace ZenLib
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/PreComp.cpp b/src/thirdparty/ZenLib/ZenLib/PreComp.cpp
deleted file mode 100644
index 55e856734..000000000
--- a/src/thirdparty/ZenLib/ZenLib/PreComp.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-//---------------------------------------------------------------------------
diff --git a/src/thirdparty/ZenLib/ZenLib/PreComp.h b/src/thirdparty/ZenLib/ZenLib/PreComp.h
deleted file mode 100644
index 7941c0454..000000000
--- a/src/thirdparty/ZenLib/ZenLib/PreComp.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Helpers for compilers (precompilation)
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_PreCompH
-#define ZenLib_PreCompH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(_MSC_VER) || defined(__BORLANDC__)
- #include <cstring>
- #include <cstdio>
- #include <cstdlib>
- #include <ctime>
- #include <algorithm>
- #include <map>
- #include <sstream>
- #include <iomanip>
- #include <cmath>
- #include "ZenLib/Conf.h"
- #include "ZenLib/Conf_Internal.h"
-#endif //defined(_MSC_VER) || defined(__BORLANDC__)
-//---------------------------------------------------------------------------
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/Thread.cpp b/src/thirdparty/ZenLib/ZenLib/Thread.cpp
deleted file mode 100644
index 302d672a3..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Thread.cpp
+++ /dev/null
@@ -1,637 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Thread.h"
-#include <ZenLib/Ztring.h>
-#include <ZenLib/CriticalSection.h>
-//---------------------------------------------------------------------------
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// ZENLIB_USEWX
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-#ifdef ZENLIB_USEWX
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#include <wx/thread.h>
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-class ThreadEntry : public wxThread
-{
-public :
- ThreadEntry(Thread* Th_) : wxThread(wxTHREAD_JOINABLE)
- {Th=Th_;};
- void* Entry() {Th->Entry(); return NULL;}
-private :
- Thread* Th;
-};
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Thread::Thread()
-{
- ThreadPointer=(void*)new ThreadEntry(this);
- ((ThreadEntry*)ThreadPointer)->Create();
-}
-
-//---------------------------------------------------------------------------
-Thread::~Thread()
-{
- delete (ThreadEntry*)ThreadPointer;
-}
-
-//***************************************************************************
-// Main Entry
-//***************************************************************************
-
-void Thread::Entry()
-{
-}
-
-//***************************************************************************
-// Control
-//***************************************************************************
-
-void Thread::Run()
-{
- ((ThreadEntry*)ThreadPointer)->Resume();
-}
-
-void Thread::Pause()
-{
- ((ThreadEntry*)ThreadPointer)->Pause();
-}
-
-void Thread::Stop()
-{
- ((ThreadEntry*)ThreadPointer)->Delete();
-}
-
-bool Thread::IsRunning()
-{
- return ((ThreadEntry*)ThreadPointer)->IsRunning();
-}
-
-//***************************************************************************
-// Communicating
-//***************************************************************************
-
-void Thread::Sleep(size_t Millisecond)
-{
- ((ThreadEntry*)ThreadPointer)->Sleep((unsigned long)Millisecond);
-}
-
-void Thread::Yield()
-{
- ((ThreadEntry*)ThreadPointer)->Yield();
-}
-
-} //Namespace
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// WINDOWS
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-#else //ZENLIB_USEWX
-#ifdef WINDOWS
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#undef __TEXT
-#include <windows.h>
-#undef Yield
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-//Config
-
-#ifndef _MT
- #define _MT //Must have this symbol defined to get _beginthread/_endthread declarations
-#endif
-
-#ifdef __BORLANDC__
- #if !defined(__MT__)
- #define __MT__ //-tWM in the IDE is not always set
- #endif
-
- #if !defined(__MFC_COMPAT__)
- #define __MFC_COMPAT__ // Needed to know about _beginthreadex etc..
- #endif
-#endif //__BORLANDC__
-
-
-#if defined(_MSC_VER) || \
- (defined(__GNUG__) && defined(__MSVCRT__)) || \
- defined(__WATCOMC__) || \
- defined(__MWERKS__)
- //(defined(__BORLANDC__) && (__BORLANDC__ >= 0x500))
-
- #ifndef __WXWINCE__
- #define USING_BEGINTHREAD //Using _beginthreadex() instead of CreateThread() if possible (better, because of Win32 API has problems with memory leaks in C library)
- #endif
-#endif
-
-#ifdef USING_BEGINTHREAD
- #include <process.h>
- typedef unsigned THREAD_RETVAL; //The return type of the thread function entry point
- #define THREAD_CALLCONV __stdcall //The calling convention of the thread function entry point
-#else
- // the settings for CreateThread()
- typedef DWORD THREAD_RETVAL;
- #define THREAD_CALLCONV WINAPI
-#endif
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//---------------------------------------------------------------------------
-THREAD_RETVAL THREAD_CALLCONV Thread_Start(void *param)
-{
- ((Thread*)param)->Entry();
-
- ((Thread*)param)->Internal_Exit();
-
- return 1;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Thread::Thread()
-{
- C.Enter();
-
- State=State_New;
- ThreadPointer=NULL;
-
- C.Leave();
-}
-
-//---------------------------------------------------------------------------
-Thread::~Thread()
-{
- C.Enter();
-
- if (ThreadPointer!=NULL)
- CloseHandle((HANDLE)ThreadPointer); //ThreadPointer=NULL
-
- C.Leave();
-}
-
-//***************************************************************************
-// Control
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Thread::returnvalue Thread::Run()
-{
- C.Enter();
-
- //Coherency
- if (State!=State_New || ThreadPointer!=NULL)
- {
- C.Leave();
- return Incoherent;
- }
-
- //Creating
- #ifdef USING_BEGINTHREAD
- #ifdef __WATCOMC__
- const unsigned stksize=10240; //Watcom is reported to not like 0 stack size (which means "use default")
- #else
- const unsigned stksize=0; //Default
- #endif //__WATCOMC__
-
- ThreadPointer=(void*)_beginthreadex (NULL, stksize, Thread_Start, this, CREATE_SUSPENDED, NULL);
- #else
- ThreadPointer=(void*)CreateThread (NULL, 0, Thread_Start, this, CREATE_SUSPENDED, NULL);
- #endif //USING_BEGINTHREAD
- if (ThreadPointer==NULL)
- {
- C.Leave();
- return Resource;
- }
-
- //Running
- ResumeThread((HANDLE)ThreadPointer);
-
- //Configuring
- State=State_Running;
-
- C.Leave();
- return Ok;
-}
-
-//---------------------------------------------------------------------------
-Thread::returnvalue Thread::RunAgain()
-{
- //Coherency
- C.Enter();
-
- //Coherency
- if (State!=State_New
- && State!=State_Terminated)
- {
- C.Leave();
- return Incoherent;
- }
-
- //Configuring
- if (State==State_Terminated)
- State=State_New;
-
- C.Leave();
-
- return Run();
-}
-
-//---------------------------------------------------------------------------
-Thread::returnvalue Thread::Pause()
-{
- C.Enter();
-
- //Pausing
- SuspendThread((HANDLE)ThreadPointer);
-
- //Configuring
- State=State_Paused;
-
- C.Leave();
- return Ok;
-}
-
-//---------------------------------------------------------------------------
-Thread::returnvalue Thread::RequestTerminate()
-{
- C.Enter();
-
- //Coherency
- if (State!=State_Running)
- {
- C.Leave();
- return IsNotRunning;
- }
-
- //Configuring
- State=State_Terminating;
-
- C.Leave();
- return Ok;
-}
-
-//---------------------------------------------------------------------------
-Thread::returnvalue Thread::ForceTerminate()
-{
- C.Enter();
-
- //Terminating (not clean)
- TerminateThread((HANDLE)ThreadPointer, 1); ThreadPointer=NULL;
-
- //Configuring
- State=State_Terminated;
-
- C.Leave();
- return Ok;
-}
-
-//***************************************************************************
-// Status
-//***************************************************************************
-
-bool Thread::IsRunning()
-{
- C.Enter();
- bool ToReturn=State==State_Running || State==State_Terminating;
- C.Leave();
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-bool Thread::IsTerminating()
-{
- C.Enter();
- bool ToReturn=State==State_Terminating;
- C.Leave();
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-bool Thread::IsExited()
-{
- C.Enter();
- bool ToReturn=State==State_New || State==State_Terminated;
- C.Leave();
- return ToReturn;
-}
-
-//***************************************************************************
-// Main Entry
-//***************************************************************************
-
-void Thread::Entry()
-{
-}
-
-//***************************************************************************
-// Communicating
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-void Thread::Sleep(size_t Millisecond)
-{
- ::Sleep((DWORD)Millisecond);
-}
-
-//---------------------------------------------------------------------------
-void Thread::Yield()
-{
- ::Sleep(0);
-}
-
-//***************************************************************************
-// Internal
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Thread::returnvalue Thread::Internal_Exit()
-{
- C.Enter();
-
- //Coherency
- if (State!=State_Running
- && State!=State_Terminating)
- {
- C.Leave();
- return IsNotRunning;
- }
-
- //Closing old handle
- CloseHandle((HANDLE)ThreadPointer); ThreadPointer=NULL;
-
- //Configuring
- State=State_Terminated;
-
- C.Leave();
- return Ok;
-}
-
-} //Namespace
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// UNIX
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-#else //WINDOWS
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-//Source: http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include <pthread.h>
-#include <unistd.h>
-#ifdef _POSIX_PRIORITY_SCHEDULING
- #include <sched.h>
-#endif //_POSIX_PRIORITY_SCHEDULING
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//---------------------------------------------------------------------------
-void *Thread_Start(void *param)
-{
- ((Thread*)param)->Entry();
- ((Thread*)param)->Internal_Exit();
-
- return NULL;
-}
-
-//***************************************************************************
-// Constructor/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-Thread::Thread()
-{
- C.Enter();
-
- State=State_New;
- ThreadPointer=NULL;
-
- C.Leave();
-
-}
-
-//---------------------------------------------------------------------------
-Thread::~Thread()
-{
-}
-
-//***************************************************************************
-// Main Entry
-//***************************************************************************
-
-void Thread::Entry()
-{
-}
-
-//***************************************************************************
-// Control
-//***************************************************************************
-
-Thread::returnvalue Thread::Run()
-{
- C.Enter();
-
- //Coherency
- if (State!=State_New || ThreadPointer!=NULL)
- {
- C.Leave();
- return Incoherent;
- }
-
- //Creating
- pthread_attr_t Attr;
- pthread_attr_init(&Attr);
- pthread_attr_setdetachstate(&Attr, PTHREAD_CREATE_DETACHED);
-
- //Running
- pthread_create((pthread_t*)&ThreadPointer, &Attr, Thread_Start, (void*)this);
-
- //Configuring
- State=State_Running;
-
- C.Leave();
- return Ok;
-}
-
-Thread::returnvalue Thread::RunAgain()
-{
- //Coherency
- C.Enter();
-
- //Coherency
- if (State!=State_New
- && State!=State_Terminated)
- {
- C.Leave();
- return Incoherent;
- }
-
- //Configuring
- if (State==State_Terminated)
- State=State_New;
-
- C.Leave();
-
- return Run();
-}
-
-Thread::returnvalue Thread::Pause()
-{
- //pthread_cond_wait
- return Ok;
-}
-
-Thread::returnvalue Thread::RequestTerminate()
-{
- C.Enter();
-
- if (State!=State_Running)
- {
- C.Leave();
- return IsNotRunning;
- }
-
- State=State_Terminating;
-
- C.Leave();
- return Ok;
-}
-
-Thread::returnvalue Thread::ForceTerminate()
-{
- //Terminating (not clean)
-
- //Configuring
- State=State_Terminated;
-
- return Ok;
-}
-
-//***************************************************************************
-// Status
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-bool Thread::IsRunning()
-{
- C.Enter();
- bool ToReturn=State==State_Running;
- C.Leave();
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-bool Thread::IsTerminating()
-{
- C.Enter();
- bool ToReturn=State==State_Terminating;
- C.Leave();
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-bool Thread::IsExited()
-{
- C.Enter();
- bool ToReturn=State==State_New || State==State_Terminating;
- C.Leave();
- return ToReturn;
-}
-
-//***************************************************************************
-// Communicating
-//***************************************************************************
-
-void Thread::Sleep(size_t)
-{
-}
-
-void Thread::Yield()
-{
- #ifdef _POSIX_PRIORITY_SCHEDULING
- sched_yield();
- #endif //_POSIX_PRIORITY_SCHEDULING
-}
-
-//***************************************************************************
-// Internal
-//***************************************************************************
-
-Thread::returnvalue Thread::Internal_Exit()
-{
- C.Enter();
-
- //Coherency
- if (State!=State_Running
- && State!=State_Terminating)
- {
- C.Leave();
- return IsNotRunning;
- }
-
- //Closing old handle
- ; ThreadPointer=NULL;
-
- //Configuring
- State=State_Terminated;
-
- C.Leave();
- return Ok;
-}
-
-} //Namespace
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-#endif //WINDOWS
-#endif //ZENLIB_USEWX
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/src/thirdparty/ZenLib/ZenLib/Thread.h b/src/thirdparty/ZenLib/ZenLib/Thread.h
deleted file mode 100644
index 1c994a724..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Thread.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Thread functions
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_ThreadH
-#define ZenLib_ThreadH
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf.h"
-#include "ZenLib/CriticalSection.h"
-#ifdef _WINDOWS
- #undef Yield
-#endif
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-/// @brief Thread manipulation
-//***************************************************************************
-
-class Thread
-{
-public :
- //Constructor/Destructor
- Thread ();
- virtual ~Thread ();
-
- //Control
- enum returnvalue
- {
- Ok,
- IsNotRunning,
- Incoherent,
- Resource,
- };
- returnvalue Run();
- returnvalue RunAgain();
- returnvalue Pause();
- returnvalue RequestTerminate();
- returnvalue ForceTerminate();
-
- //Status
- bool IsRunning();
- bool IsTerminating();
- bool IsExited();
-
- //Configuration
- void Priority_Set(int8s Priority); //-100 to +100
-
- //Main Entry
- virtual void Entry();
-
- //Internal
- returnvalue Internal_Exit(); //Do not use it
-
-protected :
-
- //Communicating
- void Sleep(std::size_t Millisecond);
- void Yield();
-
-private :
- //Internal
- void* ThreadPointer;
-
- //The possible states of the thread ("-->" shows all possible transitions from this state)
- enum state
- {
- State_New, // didn't start execution yet (--> Running)
- State_Running, // thread is running (--> Paused, Terminating)
- State_Paused, // thread is temporarily suspended (--> Running)
- State_Terminating, // thread should terminate a.s.a.p. (--> Terminated)
- State_Terminated, // thread is terminated
- };
- state State;
- CriticalSection C;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/Trace.h b/src/thirdparty/ZenLib/ZenLib/Trace.h
deleted file mode 100644
index 3b57b3c96..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Trace.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Trace
-//
-// Provide a direct to file trace
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenTraceH
-#define ZenTraceH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include <fstream>
-#include "ZenLib/Ztring.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-
-static std::FILE* Trace_F;
-static ZenLib::Ztring Trace;
-static ZenLib::Ztring Trace2;
-
-#ifdef TRACE
- #undef TRACE
-#endif //TRACE
-
-#if 1
-#define TRACE(_TOAPPEND)
-#else
-#define TRACE(_TOAPPEND) \
-Trace.clear(); \
-Trace2.clear(); \
-_TOAPPEND; \
-if (!Trace2.empty()) \
-{ \
- Trace+=__T(" - "); \
- Trace+=Trace2; \
-} \
-Trace+=__T("\r\n"); \
-Trace_F=std::fopen("Trace.txt", "a+t"); \
-if(Trace_F) \
-{ \
- std::fwrite(Trace.To_Local().c_str(), Trace.size(), 1, Trace_F); \
- std::fclose(Trace_F); \
-}
-#endif
-
-//***************************************************************************
-
-
-} //NameSpace
-
-#endif // ZenTraceH
diff --git a/src/thirdparty/ZenLib/ZenLib/Translation.cpp b/src/thirdparty/ZenLib/ZenLib/Translation.cpp
deleted file mode 100644
index a58a012ab..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Translation.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef ZENLIB_USEWX
- #include <wx/strconv.h>
-#endif //ZENLIB_USEWX
-#include <algorithm>
-#include "ZenLib/Translation.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// Constructors/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Constructors
-Translation::Translation()
-: std::map<ZenLib::Ztring, ZenLib::Ztring> ()
-{
- Separator[0]=EOL;
- Separator[1]=__T(";");
-}
-
-Translation::Translation(const Ztring &Source)
-{
- Separator[0]=EOL;
- Separator[1]=__T(";");
- Write(Source);
-}
-
-Translation::Translation(const Char *Source)
-{
- Separator[0]=EOL;
- Separator[1]=__T(";");
- Write(Source);
-}
-
-#ifdef _UNICODE
-Translation::Translation (const char* S)
-{
- Separator[0]=EOL;
- Separator[1]=__T(";");
- Write(Ztring(S));
-}
-#endif
-
-//***************************************************************************
-// In/Out
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Get
-Ztring Translation::Get () const
-{
- Ztring ToReturn;
- const_iterator Temp=begin();
- while (Temp!=end())
- {
- ToReturn+=Temp->first;
- ToReturn+=Separator[1];
- ToReturn+=Temp->second;
- ToReturn+=Separator[0];
- ++Temp;
- }
- return ToReturn;
-}
-
-const Ztring &Translation::Get (const Ztring &Value)
-{
- iterator Pos=find(Value);
- if (Pos==end())
- operator[](Value)=Value;
- return operator[](Value);
-}
-
-Ztring Translation::Get (const Ztring &Value, const Ztring &Default)
-{
- iterator Pos=find(Value);
- if (Pos==end())
- operator[](Value)=Default;
- return operator[](Value);
-}
-
-//---------------------------------------------------------------------------
-// Set
-void Translation::Write(const Ztring &NewLanguage)
-{
- clear();
-
- if (NewLanguage.empty())
- return;
-
- size_t Pos1=0, Pos2_EOL=0, Pos2_Separator=0;
-
- while (Pos2_EOL!=(size_t)-1)
- {
- Pos2_EOL=NewLanguage.find(__T('\n'), Pos1);
- Pos2_Separator=NewLanguage.find(__T(';'), Pos1);
- if (Pos2_Separator<Pos2_EOL)
- {
- operator[](NewLanguage.substr(Pos1, Pos2_Separator-Pos1))=NewLanguage.substr(Pos2_Separator+1, Pos2_EOL-Pos2_Separator-1);
- }
- Pos1=Pos2_EOL+1;
- }
-}
-
-//---------------------------------------------------------------------------
-// Set
-void Translation::Write(const Ztring &Value, const Ztring &NewLanguage)
-{
- operator[](Value)=NewLanguage;
-}
-
-//***************************************************************************
-// Configuration
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Separator
-void Translation::Separator_Set (size_type Level, const Ztring &NewSeparator)
-{
- if (Level>1)
- return;
-
- Separator[Level]=NewSeparator;
-}
-
-//***************************************************************************
-// C++
-//***************************************************************************
-
-} //namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/Translation.h b/src/thirdparty/ZenLib/ZenLib/Translation.h
deleted file mode 100644
index cedc455fd..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Translation.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_TranslationH
-#define ZenLib_TranslationH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Ztring.h"
-#include <map>
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-/// @brief Helper for translation
-//***************************************************************************
-
-class Translation : public std::map<Ztring, Ztring>
-{
-public :
- //Constructors/Destructor
- Translation ();
- Translation (const Ztring &Source);
- Translation (const Char *Source);
- #ifdef _UNICODE
- Translation (const char *Source); //convert a UTF-8 string into Unicode
- #endif
-
- //In/Out
- Ztring Get () const;
- const Ztring &Get (const Ztring &Value);
- Ztring Get (const Ztring &Count, const Ztring &Value);
- void Write (const Ztring &NewLanguage); //All language in one
- void Write (const Ztring &Value, const Ztring &NewLanguage); //Per item
-
- //Configuration
- /// @brief Set the Separator character
- void Separator_Set (size_type Level, const Ztring &NewSeparator);
- /// @brief Set the Quote character
- /// During Read() or Write() method, if Separator is in the sequence, we must quote it
- void Quote_Set (const Ztring &NewQuote);
- /// @brief Set the Maximum number of element to read
- /// During Read() or Write() method, if there is more elements, merge them with the last element
- void Max_Set (size_type Level, size_type Max);
-
-protected :
- Ztring Separator[2];
- Ztring Quote;
- size_type Max[2];
-};
-
-} //namespace
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/Utils.cpp b/src/thirdparty/ZenLib/ZenLib/Utils.cpp
deleted file mode 100644
index e272ead3a..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Utils.cpp
+++ /dev/null
@@ -1,1024 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Utils.h"
-#include <cmath>
-#include <complex>
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// Transformations - Little Endian to something
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Little Endian - 8 bits
-int8s LittleEndian2int8s (const char* Liste)
-{
- return (int8s)Liste[0];
-}
-
-int8u LittleEndian2int8u (const char* Liste)
-{
- return (int8u)Liste[0];
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 16 bits
-int16s LittleEndian2int16s (const char* Liste)
-{
- int16s Retour= (int8s)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-int16u LittleEndian2int16u (const char* Liste)
-{
- int16u Retour= (int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 24 bits
-int32s LittleEndian2int24s (const char* Liste)
-{
- int32s Retour= (int8s)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-int32u LittleEndian2int24u (const char* Liste)
-{
- int32u Retour= (int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 32 bits
-int32s LittleEndian2int32s (const char* Liste)
-{
- int32s Retour= (int8s)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-int32u LittleEndian2int32u (const char* Liste)
-{
- int32u Retour= (int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 40 bits
-int64s LittleEndian2int40s (const char* Liste)
-{
- int64s Retour= (int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-int64u LittleEndian2int40u (const char* Liste)
-{
- int64u Retour= (int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 48 bits
-int64s LittleEndian2int48s (const char* Liste)
-{
- int64s Retour= (int8u)Liste[5];
- Retour=(Retour<<8)|(int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-int64u LittleEndian2int48u (const char* Liste)
-{
- int64u Retour= (int8u)Liste[5];
- Retour=(Retour<<8)|(int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 56 bits
-int64s LittleEndian2int56s (const char* Liste)
-{
- int64s Retour= (int8u)Liste[6];
- Retour=(Retour<<8)|(int8u)Liste[5];
- Retour=(Retour<<8)|(int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-int64u LittleEndian2int56u (const char* Liste)
-{
- int64u Retour= (int8u)Liste[6];
- Retour=(Retour<<8)|(int8u)Liste[5];
- Retour=(Retour<<8)|(int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 64 bits
-int64s LittleEndian2int64s (const char* Liste)
-{
- int64s Retour= (int8s)Liste[7];
- Retour=(Retour<<8)|(int8u)Liste[6];
- Retour=(Retour<<8)|(int8u)Liste[5];
- Retour=(Retour<<8)|(int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-int64u LittleEndian2int64u (const char* Liste)
-{
- int64u Retour= (int8u)Liste[7];
- Retour=(Retour<<8)|(int8u)Liste[6];
- Retour=(Retour<<8)|(int8u)Liste[5];
- Retour=(Retour<<8)|(int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[0];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 128 bits
-int128u LittleEndian2int128u(const char* Liste)
-{
- int128u Retour;
- Retour.lo=LittleEndian2int64u(Liste);
- Retour.hi=LittleEndian2int64u(Liste+8);
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - float 16 bits
-float32 LittleEndian2float16(const char* Liste)
-{
- //sign 1 bit
- //exponent 5 bit
- //significand 10 bit
-
- //Retrieving data
- int32u Integer=LittleEndian2int32u(Liste);
-
- //Retrieving elements
- bool Sign =(Integer&0x8000)?true:false;
- int32u Exponent=(Integer>>10)&0xFF;
- int32u Mantissa= Integer&0x03FF;
-
- //Some computing
- if (Exponent==0 || Exponent==0xFF)
- return 0; //These are denormalised numbers, NANs, and other horrible things
- Exponent-=0x7F; //Bias
- float64 Answer=(((float64)Mantissa)/8388608+1.0)*std::pow((float64)2, (int)Exponent); //(1+Mantissa) * 2^Exponent
- if (Sign)
- Answer=-Answer;
-
- return (float32)Answer;
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - float 32 bits
-float32 LittleEndian2float32(const char* Liste)
-{
- //sign 1 bit
- //exponent 8 bit
- //significand 23 bit
-
- //Retrieving data
- int32u Integer=LittleEndian2int32u(Liste);
-
- //Retrieving elements
- bool Sign =(Integer&0x80000000)?true:false;
- int32u Exponent=(Integer>>23)&0xFF;
- int32u Mantissa= Integer&0x007FFFFF;
-
- //Some computing
- if (Exponent==0 || Exponent==0xFF)
- return 0; //These are denormalised numbers, NANs, and other horrible things
- Exponent-=0x7F; //Bias
- float64 Answer=(((float64)Mantissa)/8388608+1.0)*std::pow((float64)2, (int)Exponent); //(1+Mantissa) * 2^Exponent
- if (Sign)
- Answer=-Answer;
-
- return (float32)Answer;
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - float 64 bits
-float64 LittleEndian2float64(const char* Liste)
-{
- //sign 1 bit
- //exponent 11 bit
- //significand 52 bit
-
- //Retrieving data
- int64u Integer=LittleEndian2int64u(Liste);
-
- //Retrieving elements
- bool Sign =(Integer&0x8000000000000000LL)?true:false;
- int64u Exponent=(Integer>>52)&0x7FF;
- int64u Mantissa= Integer&0xFFFFFFFFFFFFFLL;
-
- //Some computing
- if (Exponent==0 || Exponent==0x7FF)
- return 0; //These are denormalised numbers, NANs, and other horrible things
- Exponent-=0x3FF; //Bias
- float64 Answer=(((float64)Mantissa)/4503599627370496.0+1.0)*std::pow((float64)2, (int)Exponent); //(1+Mantissa) * 2^Exponent
- if (Sign)
- Answer=-Answer;
-
- return (float64)Answer;
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - float 80 bits
-float80 LittleEndian2float80(const char* Liste)
-{
- //sign 1 bit
- //exponent 15 bit
- //integer? 1 bit
- //significand 63 bit
-
- //Retrieving data
- int16u Integer1=LittleEndian2int16u(Liste);
- int64u Integer2=LittleEndian2int64u(Liste+2);
-
- //Retrieving elements
- bool Sign =(Integer1&0x8000)?true:false;
- int16u Exponent= Integer1&0x7FFF;
- int64u Mantissa= Integer2&0x7FFFFFFFFFFFFFFFLL; //Only 63 bits, 1 most significant bit is explicit
- //Some computing
- if (Exponent==0 || Exponent==0x7FFF)
- return 0; //These are denormalised numbers, NANs, and other horrible things
- Exponent-=0x3FFF; //Bias
- float80 Answer=(((float80)Mantissa)/9223372036854775808.0+1.0)*std::pow((float)2, (int)Exponent); //(1+Mantissa) * 2^Exponent
- if (Sign)
- Answer=-Answer;
-
- return (float80)Answer;
-}
-
-//***************************************************************************
-// Transformations - Something to Little Endian
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Little Endian - 8 bits
-void int8s2LittleEndian (char* List, int8s Value)
-{
- List[0]=(char)Value;
-}
-
-void int8u2LittleEndian (char* List, int8u Value)
-{
- List[0]=(char)Value;
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 16 bits
-void int16s2LittleEndian (char* List, int16s Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
-}
-
-void int16u2LittleEndian (char* List, int16u Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 24 bits
-void int24s2LittleEndian (char* List, int32s Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
- List[2]=(char)(Value>>16);
-}
-
-void int24u2LittleEndian (char* List, int32u Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
- List[2]=(char)(Value>>16);
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 32 bits
-void int32s2LittleEndian (char* List, int32s Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
- List[2]=(char)(Value>>16);
- List[3]=(char)(Value>>24);
-}
-
-void int32u2LittleEndian (char* List, int32u Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
- List[2]=(char)(Value>>16);
- List[3]=(char)(Value>>24);
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 40 bits
-void int40s2LittleEndian (char* List, int64s Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
- List[2]=(char)(Value>>16);
- List[3]=(char)(Value>>24);
- List[4]=(char)(Value>>32);
-}
-
-void int40u2LittleEndian (char* List, int64u Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
- List[2]=(char)(Value>>16);
- List[3]=(char)(Value>>24);
- List[4]=(char)(Value>>32);
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 48 bits
-void int48s2LittleEndian (char* List, int64s Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
- List[2]=(char)(Value>>16);
- List[3]=(char)(Value>>24);
- List[4]=(char)(Value>>32);
- List[5]=(char)(Value>>40);
-}
-
-void int48u2LittleEndian (char* List, int64u Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
- List[2]=(char)(Value>>16);
- List[3]=(char)(Value>>24);
- List[4]=(char)(Value>>32);
- List[5]=(char)(Value>>40);
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 56 bits
-void int56s2LittleEndian (char* List, int64s Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
- List[2]=(char)(Value>>16);
- List[3]=(char)(Value>>24);
- List[4]=(char)(Value>>32);
- List[5]=(char)(Value>>40);
- List[6]=(char)(Value>>48);
-}
-
-void int56u2LittleEndian (char* List, int64u Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
- List[2]=(char)(Value>>16);
- List[3]=(char)(Value>>24);
- List[4]=(char)(Value>>32);
- List[5]=(char)(Value>>40);
- List[6]=(char)(Value>>48);
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 64 bits
-void int64s2LittleEndian (char* List, int64s Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
- List[2]=(char)(Value>>16);
- List[3]=(char)(Value>>24);
- List[4]=(char)(Value>>32);
- List[5]=(char)(Value>>40);
- List[6]=(char)(Value>>48);
- List[7]=(char)(Value>>56);
-}
-
-void int64u2LittleEndian (char* List, int64u Value)
-{
- List[0]=(char) Value;
- List[1]=(char)(Value>> 8);
- List[2]=(char)(Value>>16);
- List[3]=(char)(Value>>24);
- List[4]=(char)(Value>>32);
- List[5]=(char)(Value>>40);
- List[6]=(char)(Value>>48);
- List[7]=(char)(Value>>56);
-}
-
-//---------------------------------------------------------------------------
-// Little Endian - 128 bits
-void int128u2LittleEndian(char* List, int128u Value)
-{
- int64u2LittleEndian(List+8, Value.lo);
- int64u2LittleEndian(List , Value.hi);
-}
-
-//***************************************************************************
-// Transformations - Big Endian to something
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Big Endian - 8 bits
-int8s BigEndian2int8s (const char* Liste)
-{
- return (int8s)Liste[0];
-}
-
-int8u BigEndian2int8u (const char* Liste)
-{
- return (int8u)Liste[0];
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 16 bits
-int16s BigEndian2int16s (const char* Liste)
-{
- int16s Retour= (int8s)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- return Retour;
-}
-
-int16u BigEndian2int16u (const char* Liste)
-{
- int16u Retour= (int8u)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 24 bits
-int32s BigEndian2int24s (const char* Liste)
-{
- int32s Retour= (int8s)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[2];
- return Retour;
-}
-
-int32u BigEndian2int24u (const char* Liste)
-{
- int32u Retour= (int8u)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[2];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 32 bits
-int32s BigEndian2int32s (const char* Liste)
-{
- int32s Retour= (int8s)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[3];
- return Retour;
-}
-
-int32u BigEndian2int32u (const char* Liste)
-{
- int32u Retour= (int8u)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[3];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 40 bits
-int64s BigEndian2int40s (const char* Liste)
-{
- int64s Retour= (int8s)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[4];
- return Retour;
-}
-
-int64u BigEndian2int40u (const char* Liste)
-{
- int64u Retour= (int8u)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[4];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 48 bits
-int64s BigEndian2int48s (const char* Liste)
-{
- int64s Retour= (int8s)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[5];
- return Retour;
-}
-
-int64u BigEndian2int48u (const char* Liste)
-{
- int64u Retour= (int8u)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[5];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 56 bits
-int64s BigEndian2int56s (const char* Liste)
-{
- int64s Retour= (int8s)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[5];
- Retour=(Retour<<8)|(int8u)Liste[6];
- return Retour;
-}
-
-int64u BigEndian2int56u (const char* Liste)
-{
- int64u Retour= (int8u)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[5];
- Retour=(Retour<<8)|(int8u)Liste[6];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 64 bits
-int64s BigEndian2int64s (const char* Liste)
-{
- int64s Retour=(int8s)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[5];
- Retour=(Retour<<8)|(int8u)Liste[6];
- Retour=(Retour<<8)|(int8u)Liste[7];
- return Retour;
-}
-
-int64u BigEndian2int64u (const char* Liste)
-{
- int64u Retour=(int8u)Liste[0];
- Retour=(Retour<<8)|(int8u)Liste[1];
- Retour=(Retour<<8)|(int8u)Liste[2];
- Retour=(Retour<<8)|(int8u)Liste[3];
- Retour=(Retour<<8)|(int8u)Liste[4];
- Retour=(Retour<<8)|(int8u)Liste[5];
- Retour=(Retour<<8)|(int8u)Liste[6];
- Retour=(Retour<<8)|(int8u)Liste[7];
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 128 bits
-int128u BigEndian2int128u(const char* Liste)
-{
- int128u Retour;
- Retour.hi=BigEndian2int64u(Liste);
- Retour.lo=BigEndian2int64u(Liste+8);
- return Retour;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - float 16 bits
-float32 BigEndian2float16(const char* Liste)
-{
- //sign 1 bit
- //exponent 5 bit
- //significand 10 bit
-
- //Retrieving data
- int16u Integer=BigEndian2int16u(Liste);
-
- //Retrieving elements
- bool Sign =(Integer&0x8000)?true:false;
- int32u Exponent=(Integer>>10)&0xFF;
- int32u Mantissa= Integer&0x03FF;
-
- //Some computing
- if (Exponent==0 || Exponent==0xFF)
- return 0; //These are denormalised numbers, NANs, and other horrible things
- Exponent-=0x0F; //Bias
- float64 Answer=(((float64)Mantissa)/8388608+1.0)*std::pow((float64)2, (int)Exponent); //(1+Mantissa) * 2^Exponent
- if (Sign)
- Answer=-Answer;
-
- return (float32)Answer;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - float 32 bits
-float32 BigEndian2float32(const char* Liste)
-{
- //sign 1 bit
- //exponent 8 bit
- //significand 23 bit
-
- //Retrieving data
- int32u Integer=BigEndian2int32u(Liste);
-
- //Retrieving elements
- bool Sign =(Integer&0x80000000)?true:false;
- int32u Exponent=(Integer>>23)&0xFF;
- int32u Mantissa= Integer&0x007FFFFF;
-
- //Some computing
- if (Exponent==0 || Exponent==0xFF)
- return 0; //These are denormalised numbers, NANs, and other horrible things
- Exponent-=0x7F; //Bias
- float64 Answer=(((float64)Mantissa)/8388608+1.0)*std::pow((float64)2, (int)Exponent); //(1+Mantissa) * 2^Exponent
- if (Sign)
- Answer=-Answer;
-
- return (float32)Answer;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - float 64 bits
-float64 BigEndian2float64(const char* Liste)
-{
- //sign 1 bit
- //exponent 11 bit
- //significand 52 bit
-
- //Retrieving data
- int64u Integer=BigEndian2int64u(Liste);
-
- //Retrieving elements
- bool Sign =(Integer&0x8000000000000000LL)?true:false;
- int64u Exponent=(Integer>>52)&0x7FF;
- int64u Mantissa= Integer&0xFFFFFFFFFFFFFLL;
-
- //Some computing
- if (Exponent==0 || Exponent==0x7FF)
- return 0; //These are denormalised numbers, NANs, and other horrible things
- Exponent-=0x3FF; //Bias
- float64 Answer=(((float64)Mantissa)/4503599627370496.0+1.0)*std::pow((float64)2, (int)Exponent); //(1+Mantissa) * 2^Exponent
- if (Sign)
- Answer=-Answer;
-
- return (float64)Answer;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - float 80 bits
-float80 BigEndian2float80(const char* Liste)
-{
- //sign 1 bit
- //exponent 15 bit
- //integer? 1 bit
- //significand 63 bit
-
- //Retrieving data
- int16u Integer1=BigEndian2int16u(Liste);
- int64u Integer2=BigEndian2int64u(Liste+2);
-
- //Retrieving elements
- bool Sign =(Integer1&0x8000)?true:false;
- int16u Exponent= Integer1&0x7FFF;
- int64u Mantissa= Integer2&0x7FFFFFFFFFFFFFFFLL; //Only 63 bits, 1 most significant bit is explicit
- //Some computing
- if (Exponent==0 || Exponent==0x7FFF)
- return 0; //These are denormalised numbers, NANs, and other horrible things
- Exponent-=0x3FFF; //Bias
- float80 Answer=(((float80)Mantissa)/9223372036854775808.0+1.0)*std::pow((float)2, (int)Exponent); //(1+Mantissa) * 2^Exponent
- if (Sign)
- Answer=-Answer;
-
- return (float80)Answer;
-}
-
-//***************************************************************************
-// Transformations - Something to Big Endian
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Big Endian - 8 bits
-void int8s2BigEndian (char* List, int8s Value)
-{
- List[0]=(char)Value;
-}
-
-void int8u2BigEndian (char* List, int8u Value)
-{
- List[0]=(char)Value;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 16 bits
-void int16s2BigEndian (char* List, int16s Value)
-{
- List[0]=(char)(Value>> 8);
- List[1]=(char) Value;
-}
-
-void int16u2BigEndian (char* List, int16u Value)
-{
- List[0]=(char)(Value>> 8);
- List[1]=(char) Value;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 24 bits
-void int24s2BigEndian (char* List, int32s Value)
-{
- List[0]=(char)(Value>>16);
- List[1]=(char)(Value>> 8);
- List[2]=(char) Value;
-}
-
-void int24u2BigEndian (char* List, int32u Value)
-{
- List[0]=(char)(Value>>16);
- List[1]=(char)(Value>> 8);
- List[2]=(char) Value;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 32 bits
-void int32s2BigEndian (char* List, int32s Value)
-{
- List[0]=(char)(Value>>24);
- List[1]=(char)(Value>>16);
- List[2]=(char)(Value>> 8);
- List[3]=(char) Value;
-}
-
-void int32u2BigEndian (char* List, int32u Value)
-{
- List[0]=(char)(Value>>24);
- List[1]=(char)(Value>>16);
- List[2]=(char)(Value>> 8);
- List[3]=(char) Value;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 40 bits
-void int40s2BigEndian (char* List, int64s Value)
-{
- List[0]=(char)(Value>>32);
- List[1]=(char)(Value>>24);
- List[2]=(char)(Value>>16);
- List[3]=(char)(Value>> 8);
- List[4]=(char) Value;
-}
-
-void int40u2BigEndian (char* List, int64u Value)
-{
- List[0]=(char)(Value>>32);
- List[1]=(char)(Value>>24);
- List[2]=(char)(Value>>16);
- List[3]=(char)(Value>> 8);
- List[4]=(char) Value;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 48 bits
-void int48s2BigEndian (char* List, int64s Value)
-{
- List[0]=(char)(Value>>40);
- List[1]=(char)(Value>>32);
- List[2]=(char)(Value>>24);
- List[3]=(char)(Value>>16);
- List[4]=(char)(Value>> 8);
- List[5]=(char) Value;
-}
-
-void int48u2BigEndian (char* List, int64u Value)
-{
- List[0]=(char)(Value>>40);
- List[1]=(char)(Value>>32);
- List[2]=(char)(Value>>24);
- List[3]=(char)(Value>>16);
- List[4]=(char)(Value>> 8);
- List[5]=(char) Value;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 56 bits
-void int56s2BigEndian (char* List, int64s Value)
-{
- List[0]=(char)(Value>>48);
- List[1]=(char)(Value>>40);
- List[2]=(char)(Value>>32);
- List[3]=(char)(Value>>24);
- List[4]=(char)(Value>>16);
- List[5]=(char)(Value>> 8);
- List[6]=(char) Value;
-}
-
-void int56u2BigEndian (char* List, int64u Value)
-{
- List[0]=(char)(Value>>48);
- List[1]=(char)(Value>>40);
- List[2]=(char)(Value>>32);
- List[3]=(char)(Value>>24);
- List[4]=(char)(Value>>16);
- List[5]=(char)(Value>> 8);
- List[6]=(char) Value;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 64 bits
-void int64s2BigEndian (char* List, int64s Value)
-{
- List[0]=(char)(Value>>56);
- List[1]=(char)(Value>>48);
- List[2]=(char)(Value>>40);
- List[3]=(char)(Value>>32);
- List[4]=(char)(Value>>24);
- List[5]=(char)(Value>>16);
- List[6]=(char)(Value>> 8);
- List[7]=(char) Value;
-}
-
-void int64u2BigEndian (char* List, int64u Value)
-{
- List[0]=(char)(Value>>56);
- List[1]=(char)(Value>>48);
- List[2]=(char)(Value>>40);
- List[3]=(char)(Value>>32);
- List[4]=(char)(Value>>24);
- List[5]=(char)(Value>>16);
- List[6]=(char)(Value>> 8);
- List[7]=(char) Value;
-}
-
-//---------------------------------------------------------------------------
-// Big Endian - 128 bits
-void int128u2BigEndian(char* List, int128u Value)
-{
- int64u2BigEndian(List, Value.hi);
- int64u2BigEndian(List+8, Value.lo);
-}
-
-//***************************************************************************
-// Int to Int
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// int32 - int64
-int64s int32s_int64s (int32s High, int32u Low)
-{
- return ((((int64s)High)<<32) | Low);
-}
-
-int64u int32u_int64u (int32u High, int32u Low)
-{
- return ((((int64s)High)<<32) | Low);
-}
-
-void int32s_int64s (int64s &BigInt, int32s High, int32u Low)
-{
- BigInt= ((((int64s)High)<<32) | Low);
-}
-void int32u_int64u (int64s &BigInt, int32u High, int32u Low)
-{
- BigInt= ((((int64s)High)<<32) | Low);
-}
-
-void int64s_int32s (int64s BigInt, int32s &High, int32u &Low)
-{
- High = (int32s) ((BigInt & 0xFFFFFFFF00000000LL)>>32);
- Low = (int32u) ( BigInt & 0x00000000FFFFFFFF);
-}
-
-void int64u_int32u (int64u BigInt, int32u &High, int32u &Low)
-{
- High = (int32u) ((BigInt & 0xFFFFFFFF00000000LL)>>32);
- Low = (int32u) ( BigInt & 0x00000000FFFFFFFF);
-}
-
-//---------------------------------------------------------------------------
-// Floats and ints
-int32s float32_int32s (float32 F, bool Rounded)
-{
- //Not rounded
- if (!Rounded)
- return (int32s)F;
- //Rounded
- int I1=(int)F;
- if (F-I1>=0.5)
- return I1+1;
- else
- return I1;
-}
-
-int64s float32_int64s (float32 F, bool Rounded)
-{
- //Not rounded
- if (!Rounded)
- return (int64s)F;
- //Rounded
- int I1=(int)F;
- if (F-I1>=0.5)
- return I1+1;
- else
- return I1;
-}
-
-int32s float64_int32s (float64 F, bool Rounded)
-{
- //Not rounded
- if (!Rounded)
- return (int32s)F;
- //Rounded
- int32s I1=(int32s)F;
- if (F-I1>=0.5)
- return I1+1;
- else
- return I1;
-}
-
-int64s float64_int64s (float64 F, bool Rounded)
-{
- //Not rounded
- if (!Rounded)
- return (int64s)F;
- //Rounded
- int64s I1=(int64s)F;
- if (F-I1>=0.5)
- return I1+1;
- else
- return I1;
-}
-
-} //namespace ZenLib
diff --git a/src/thirdparty/ZenLib/ZenLib/Utils.h b/src/thirdparty/ZenLib/ZenLib/Utils.h
deleted file mode 100644
index 8845d78dc..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Utils.h
+++ /dev/null
@@ -1,305 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// Integer and float manipulation
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenUtilsH
-#define ZenUtilsH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/int128u.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-// Integer transformations
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//Little Endians
-int8s LittleEndian2int8s (const char* List);
-int8u LittleEndian2int8u (const char* List);
-int16s LittleEndian2int16s (const char* List);
-int16u LittleEndian2int16u (const char* List);
-int32s LittleEndian2int24s (const char* List);
-int32u LittleEndian2int24u (const char* List);
-int32s LittleEndian2int32s (const char* List);
-int32u LittleEndian2int32u (const char* List);
-#if (MAXTYPE_INT >= 64)
-int64s LittleEndian2int40s (const char* List);
-int64u LittleEndian2int40u (const char* List);
-int64s LittleEndian2int48s (const char* List);
-int64u LittleEndian2int48u (const char* List);
-int64s LittleEndian2int56s (const char* List);
-int64u LittleEndian2int56u (const char* List);
-int64s LittleEndian2int64s (const char* List);
-int64u LittleEndian2int64u (const char* List);
-int128u LittleEndian2int128u (const char* List);
-#endif
-float32 LittleEndian2float16 (const char* List);
-float32 LittleEndian2float32 (const char* List);
-float64 LittleEndian2float64 (const char* List);
-float80 LittleEndian2float80 (const char* List);
-
-void int8s2LittleEndian (char* List, int8s Value);
-void int8u2LittleEndian (char* List, int8u Value);
-void int16s2LittleEndian (char* List, int16s Value);
-void int16u2LittleEndian (char* List, int16u Value);
-void int24s2LittleEndian (char* List, int32s Value);
-void int24u2LittleEndian (char* List, int32u Value);
-void int32s2LittleEndian (char* List, int32s Value);
-void int32u2LittleEndian (char* List, int32u Value);
-#if (MAXTYPE_INT >= 64)
-void int40s2LittleEndian (char* List, int64s Value);
-void int40u2LittleEndian (char* List, int64u Value);
-void int48s2LittleEndian (char* List, int64s Value);
-void int48u2LittleEndian (char* List, int64u Value);
-void int56s2LittleEndian (char* List, int64s Value);
-void int56u2LittleEndian (char* List, int64u Value);
-void int64s2LittleEndian (char* List, int64s Value);
-void int64u2LittleEndian (char* List, int64u Value);
-void int128u2LittleEndian (char* List, int128u Value);
-#endif
-void float162LittleEndian (char* List, float32 Value);
-void float322LittleEndian (char* List, float32 Value);
-void float642LittleEndian (char* List, float64 Value);
-void float802LittleEndian (char* List, float80 Value);
-
-#ifndef __BORLANDC__
-inline int8s LittleEndian2int8s (const int8u* List) {return LittleEndian2int8s ((const char*)List);}
-inline int8u LittleEndian2int8u (const int8u* List) {return LittleEndian2int8u ((const char*)List);}
-inline int16s LittleEndian2int16s (const int8u* List) {return LittleEndian2int16s ((const char*)List);}
-inline int16u LittleEndian2int16u (const int8u* List) {return LittleEndian2int16u ((const char*)List);}
-inline int32s LittleEndian2int24s (const int8u* List) {return LittleEndian2int24s ((const char*)List);}
-inline int32u LittleEndian2int24u (const int8u* List) {return LittleEndian2int24u ((const char*)List);}
-inline int32s LittleEndian2int32s (const int8u* List) {return LittleEndian2int32s ((const char*)List);}
-inline int32u LittleEndian2int32u (const int8u* List) {return LittleEndian2int32u ((const char*)List);}
-#if (MAXTYPE_INT >= 64)
-inline int64s LittleEndian2int40s (const int8u* List) {return LittleEndian2int40s ((const char*)List);}
-inline int64u LittleEndian2int40u (const int8u* List) {return LittleEndian2int40u ((const char*)List);}
-inline int64s LittleEndian2int48s (const int8u* List) {return LittleEndian2int48s ((const char*)List);}
-inline int64u LittleEndian2int48u (const int8u* List) {return LittleEndian2int48u ((const char*)List);}
-inline int64s LittleEndian2int56s (const int8u* List) {return LittleEndian2int56s ((const char*)List);}
-inline int64u LittleEndian2int56u (const int8u* List) {return LittleEndian2int56u ((const char*)List);}
-inline int64s LittleEndian2int64s (const int8u* List) {return LittleEndian2int64s ((const char*)List);}
-inline int64u LittleEndian2int64u (const int8u* List) {return LittleEndian2int64u ((const char*)List);}
-inline int128u LittleEndian2int128u (const int8u* List) {return LittleEndian2int64u ((const char*)List);}
-#endif
-inline float32 LittleEndian2float16 (const int8u* List) {return LittleEndian2float16 ((const char*)List);}
-inline float32 LittleEndian2float32 (const int8u* List) {return LittleEndian2float32 ((const char*)List);}
-inline float64 LittleEndian2float64 (const int8u* List) {return LittleEndian2float64 ((const char*)List);}
-inline float80 LittleEndian2float80 (const int8u* List) {return LittleEndian2float80 ((const char*)List);}
-
-inline void int8s2LittleEndian (int8u* List, int8s Value) {return int8s2LittleEndian ((char*)List, Value);}
-inline void int8u2LittleEndian (int8u* List, int8u Value) {return int8u2LittleEndian ((char*)List, Value);}
-inline void int16s2LittleEndian (int8u* List, int16s Value) {return int16s2LittleEndian ((char*)List, Value);}
-inline void int16u2LittleEndian (int8u* List, int16u Value) {return int16u2LittleEndian ((char*)List, Value);}
-inline void int24s2LittleEndian (int8u* List, int32s Value) {return int24s2LittleEndian ((char*)List, Value);}
-inline void int24u2LittleEndian (int8u* List, int32u Value) {return int24u2LittleEndian ((char*)List, Value);}
-inline void int32s2LittleEndian (int8u* List, int32s Value) {return int32s2LittleEndian ((char*)List, Value);}
-inline void int32u2LittleEndian (int8u* List, int32u Value) {return int32u2LittleEndian ((char*)List, Value);}
-#if (MAXTYPE_INT >= 64)
-inline void int40s2LittleEndian (int8u* List, int64s Value) {return int40s2LittleEndian ((char*)List, Value);}
-inline void int40u2LittleEndian (int8u* List, int64u Value) {return int40u2LittleEndian ((char*)List, Value);}
-inline void int48s2LittleEndian (int8u* List, int64s Value) {return int48s2LittleEndian ((char*)List, Value);}
-inline void int48u2LittleEndian (int8u* List, int64u Value) {return int48u2LittleEndian ((char*)List, Value);}
-inline void int56s2LittleEndian (int8u* List, int64s Value) {return int56s2LittleEndian ((char*)List, Value);}
-inline void int56u2LittleEndian (int8u* List, int64u Value) {return int56u2LittleEndian ((char*)List, Value);}
-inline void int64s2LittleEndian (int8u* List, int64s Value) {return int64s2LittleEndian ((char*)List, Value);}
-inline void int64u2LittleEndian (int8u* List, int64u Value) {return int64u2LittleEndian ((char*)List, Value);}
-inline void int128u2LittleEndian (int8u* List, int128u Value) {return int128u2LittleEndian ((char*)List, Value);}
-#endif
-inline void float162LittleEndian (int8u* List, float32 Value) {return float162LittleEndian ((char*)List, Value);}
-inline void float322LittleEndian (int8u* List, float32 Value) {return float322LittleEndian ((char*)List, Value);}
-inline void float642LittleEndian (int8u* List, float64 Value) {return float642LittleEndian ((char*)List, Value);}
-inline void float802LittleEndian (int8u* List, float80 Value) {return float802LittleEndian ((char*)List, Value);}
-#endif //__BORLANDC__
-
-//---------------------------------------------------------------------------
-//Big Endians
-int8s BigEndian2int8s (const char* List);
-int8u BigEndian2int8u (const char* List);
-int16s BigEndian2int16s (const char* List);
-int16u BigEndian2int16u (const char* List);
-int32s BigEndian2int24s (const char* List);
-int32u BigEndian2int24u (const char* List);
-int32s BigEndian2int32s (const char* List);
-int32u BigEndian2int32u (const char* List);
-#if (MAXTYPE_INT >= 64)
-int64s BigEndian2int40s (const char* List);
-int64u BigEndian2int40u (const char* List);
-int64s BigEndian2int48s (const char* List);
-int64u BigEndian2int48u (const char* List);
-int64s BigEndian2int56s (const char* List);
-int64u BigEndian2int56u (const char* List);
-int64s BigEndian2int64s (const char* List);
-int64u BigEndian2int64u (const char* List);
-int128u BigEndian2int128u (const char* List);
-#endif
-float32 BigEndian2float16 (const char* List);
-float32 BigEndian2float32 (const char* List);
-float64 BigEndian2float64 (const char* List);
-float80 BigEndian2float80 (const char* List);
-
-void int8s2BigEndian (char* List, int8s Value);
-void int8u2BigEndian (char* List, int8u Value);
-void int16s2BigEndian (char* List, int16s Value);
-void int16u2BigEndian (char* List, int16u Value);
-void int24s2BigEndian (char* List, int32s Value);
-void int24u2BigEndian (char* List, int32u Value);
-void int32s2BigEndian (char* List, int32s Value);
-void int32u2BigEndian (char* List, int32u Value);
-#if (MAXTYPE_INT >= 64)
-void int40s2BigEndian (char* List, int64s Value);
-void int40u2BigEndian (char* List, int64u Value);
-void int48s2BigEndian (char* List, int64s Value);
-void int48u2BigEndian (char* List, int64u Value);
-void int56s2BigEndian (char* List, int64s Value);
-void int56u2BigEndian (char* List, int64u Value);
-void int64s2BigEndian (char* List, int64s Value);
-void int64u2BigEndian (char* List, int64u Value);
-void int128u2BigEndian (char* List, int128u Value);
-#endif
-void float162BigEndian (char* List, float32 Value);
-void float322BigEndian (char* List, float32 Value);
-void float642BigEndian (char* List, float64 Value);
-void float802BigEndian (char* List, float80 Value);
-
-#ifndef __BORLANDC__
-inline int8s BigEndian2int8s (const int8u* List) {return BigEndian2int8s ((const char*)List);}
-inline int8u BigEndian2int8u (const int8u* List) {return BigEndian2int8u ((const char*)List);}
-inline int16s BigEndian2int16s (const int8u* List) {return BigEndian2int16s ((const char*)List);}
-inline int16u BigEndian2int16u (const int8u* List) {return BigEndian2int16u ((const char*)List);}
-inline int32s BigEndian2int32s (const int8u* List) {return BigEndian2int32s ((const char*)List);}
-inline int32u BigEndian2int24u (const int8u* List) {return BigEndian2int24u ((const char*)List);}
-inline int32s BigEndian2int24s (const int8u* List) {return BigEndian2int24s ((const char*)List);}
-inline int32u BigEndian2int32u (const int8u* List) {return BigEndian2int32u ((const char*)List);}
-#if (MAXTYPE_INT >= 64)
-inline int64s BigEndian2int40s (const int8u* List) {return BigEndian2int40s ((const char*)List);}
-inline int64u BigEndian2int40u (const int8u* List) {return BigEndian2int40u ((const char*)List);}
-inline int64s BigEndian2int48s (const int8u* List) {return BigEndian2int48s ((const char*)List);}
-inline int64u BigEndian2int48u (const int8u* List) {return BigEndian2int48u ((const char*)List);}
-inline int64s BigEndian2int56s (const int8u* List) {return BigEndian2int56s ((const char*)List);}
-inline int64u BigEndian2int56u (const int8u* List) {return BigEndian2int56u ((const char*)List);}
-inline int64s BigEndian2int64s (const int8u* List) {return BigEndian2int64s ((const char*)List);}
-inline int64u BigEndian2int64u (const int8u* List) {return BigEndian2int64u ((const char*)List);}
-inline int128u BigEndian2int128u (const int8u* List) {return BigEndian2int128u ((const char*)List);}
-#endif
-inline float32 BigEndian2float16 (const int8u* List) {return BigEndian2float16 ((const char*)List);}
-inline float32 BigEndian2float32 (const int8u* List) {return BigEndian2float32 ((const char*)List);}
-inline float64 BigEndian2float64 (const int8u* List) {return BigEndian2float64 ((const char*)List);}
-inline float80 BigEndian2float80 (const int8u* List) {return BigEndian2float80 ((const char*)List);}
-
-inline void int8s2BigEndian (int8u* List, int8s Value) {return int8s2BigEndian ((char*)List, Value);}
-inline void int8u2BigEndian (int8u* List, int8u Value) {return int8u2BigEndian ((char*)List, Value);}
-inline void int16s2BigEndian (int8u* List, int16s Value) {return int16s2BigEndian ((char*)List, Value);}
-inline void int16u2BigEndian (int8u* List, int16u Value) {return int16u2BigEndian ((char*)List, Value);}
-inline void int24s2BigEndian (int8u* List, int32s Value) {return int24s2BigEndian ((char*)List, Value);}
-inline void int24u2BigEndian (int8u* List, int32u Value) {return int24u2BigEndian ((char*)List, Value);}
-inline void int32s2BigEndian (int8u* List, int32s Value) {return int32s2BigEndian ((char*)List, Value);}
-inline void int32u2BigEndian (int8u* List, int32u Value) {return int32u2BigEndian ((char*)List, Value);}
-#if (MAXTYPE_INT >= 64)
-inline void int40s2BigEndian (int8u* List, int64s Value) {return int40s2BigEndian ((char*)List, Value);}
-inline void int40u2BigEndian (int8u* List, int64u Value) {return int40u2BigEndian ((char*)List, Value);}
-inline void int48s2BigEndian (int8u* List, int64s Value) {return int48s2BigEndian ((char*)List, Value);}
-inline void int48u2BigEndian (int8u* List, int64u Value) {return int48u2BigEndian ((char*)List, Value);}
-inline void int56s2BigEndian (int8u* List, int64s Value) {return int56s2BigEndian ((char*)List, Value);}
-inline void int56u2BigEndian (int8u* List, int64u Value) {return int56u2BigEndian ((char*)List, Value);}
-inline void int64s2BigEndian (int8u* List, int64s Value) {return int64s2BigEndian ((char*)List, Value);}
-inline void int64u2BigEndian (int8u* List, int64u Value) {return int64u2BigEndian ((char*)List, Value);}
-inline void int128u2BigEndian (int8u* List, int128u Value) {return int128u2BigEndian ((char*)List, Value);}
-#endif
-inline void float162BigEndian (int8u* List, float32 Value) {return float162BigEndian ((char*)List, Value);}
-inline void float322BigEndian (int8u* List, float32 Value) {return float322BigEndian ((char*)List, Value);}
-inline void float642BigEndian (int8u* List, float64 Value) {return float642BigEndian ((char*)List, Value);}
-inline void float802BigEndian (int8u* List, float80 Value) {return float802BigEndian ((char*)List, Value);}
-#endif //__BORLANDC__
-
-//---------------------------------------------------------------------------
-// int32 - int64
-int64s int32s_int64s ( int32s High, int32u Low);
-int64u int32u_int64u ( int32u High, int32u Low);
-void int32s_int64s (int64s &BigInt, int32s High, int32u Low);
-void int32u_int64u (int64s &BigInt, int32u High, int32u Low);
-void int64s_int32s (int64s BigInt, int32s &High, int32u &Low);
-void int64u_int32u (int64u BigInt, int32u &High, int32u &Low);
-
-//---------------------------------------------------------------------------
-// Floats and ints
-int32s float32_int32s (float32 F, bool Rounded=true);
-int64s float32_int64s (float32 F, bool Rounded=true);
-int32s float64_int32s (float64 F, bool Rounded=true);
-int64s float64_int64s (float64 F, bool Rounded=true);
-
-// These functions are used because MSVC6 isn't able to convert an unsigned int64 to a floating-point value, and I couldn't think of a cleaner way to handle it.
-#if defined(_MSC_VER) && _MSC_VER<=1200
- inline float32 int64u_float32 (int64u v) {return static_cast<float32>(static_cast<int64s>(v>>1))*2.0f + static_cast<float32>(static_cast<int64s>(v & 1));}
- inline float64 int64u_float64 (int64u v) {return static_cast<float64>(static_cast<int64s>(v>>1))*2.0f + static_cast<float32>(static_cast<int64s>(v & 1));}
-#else
- inline float32 int64u_float32 (int64u v) {return (float32)v;}
- inline float64 int64u_float64 (int64u v) {return (float64)v;}
-#endif // defined(_MSC_VER) && _MSC_VER<=1200
-
-//---------------------------------------------------------------------------
-// CC (often used in all containers to identify a stream
-inline int64u CC8(const char* C) {return BigEndian2int64u(C);}
-inline int64u CC7(const char* C) {return BigEndian2int56u(C);}
-inline int64u CC6(const char* C) {return BigEndian2int48u(C);}
-inline int64u CC5(const char* C) {return BigEndian2int40u(C);}
-inline int32u CC4(const char* C) {return BigEndian2int32u(C);}
-inline int32u CC3(const char* C) {return BigEndian2int24u(C);}
-inline int16u CC2(const char* C) {return BigEndian2int16u(C);}
-inline int8u CC1(const char* C) {return BigEndian2int8u (C);}
-#ifndef __BORLANDC__
-inline int64u CC8(const int8u* C) {return BigEndian2int64u(C);}
-inline int64u CC7(const int8u* C) {return BigEndian2int56u(C);}
-inline int64u CC6(const int8u* C) {return BigEndian2int48u(C);}
-inline int64u CC5(const int8u* C) {return BigEndian2int40u(C);}
-inline int32u CC4(const int8u* C) {return BigEndian2int32u(C);}
-inline int32u CC3(const int8u* C) {return BigEndian2int24u(C);}
-inline int16u CC2(const int8u* C) {return BigEndian2int16u(C);}
-inline int8u CC1(const int8u* C) {return BigEndian2int8u (C);}
-#endif // __BORLANDC__
-
-//---------------------------------------------------------------------------
-// turn a numeric literal into a hex constant
-// (avoids problems with leading zeroes)
-// 8-bit constants max value 0x11111111, always fits in unsigned long
-#define HEX__(n) 0x##n##LU
-
-// 8-bit conversion function
-#define B8__(x) ((x&0x0000000FLU)?0x01:0) \
- +((x&0x000000F0LU)?0x02:0) \
- +((x&0x00000F00LU)?0x04:0) \
- +((x&0x0000F000LU)?0x08:0) \
- +((x&0x000F0000LU)?0x10:0) \
- +((x&0x00F00000LU)?0x20:0) \
- +((x&0x0F000000LU)?0x40:0) \
- +((x&0xF0000000LU)?0x80:0)
-
-// for upto 8-bit binary constants
-#define B8(d) ((int8u)B8__(HEX__(d)))
-
-// for upto 16-bit binary constants, MSB first
-#define B16(dmsb, dlsb) (((int16u)B8(dmsb)<<8) \
- + ((int16u)B8(dlsb)<<0))
-
-// for upto 32-bit binary constants, MSB first
-#define B32(dmsb, db2, db3, dlsb) (((int32u)B8(dmsb)<<24) \
- + ((int32u)B8( db2)<<16) \
- + ((int32u)B8( db3)<< 8) \
- + ((int32u)B8(dlsb)<< 0))
-
-} //namespace ZenLib
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/Ztring.cpp b/src/thirdparty/ZenLib/ZenLib/Ztring.cpp
deleted file mode 100644
index 5f1f529f5..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Ztring.cpp
+++ /dev/null
@@ -1,2411 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// More methods for std::(w)string
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#ifdef ZENLIB_USEWX
- #include <wx/strconv.h>
- #include <wx/datetime.h>
-#else //ZENLIB_USEWX
- #ifdef ZENLIB_STANDARD
- #undef WINDOWS
- #endif
- #ifdef WINDOWS
- #undef __TEXT
- #include <windows.h>
- #include <tchar.h>
- #endif
-#endif //ZENLIB_USEWX
-#ifdef __MINGW32__
- #include <windows.h>
-#endif //__MINGW32__
-#include <algorithm>
-#include <iomanip>
-#include <cmath>
-#include <ctime>
-#include "ZenLib/OS_Utils.h"
-#include "ZenLib/File.h"
-using namespace std;
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-int16u Ztring_ISO_8859_2[96]=
-{
- 0x00A0,
- 0x0104,
- 0x02D8,
- 0x0141,
- 0x00A4,
- 0x013D,
- 0x015A,
- 0x00A7,
- 0x00A8,
- 0x0160,
- 0x015E,
- 0x0164,
- 0x0179,
- 0x00AD,
- 0x017D,
- 0x017B,
- 0x00B0,
- 0x0105,
- 0x02DB,
- 0x0142,
- 0x00B4,
- 0x013E,
- 0x015B,
- 0x02C7,
- 0x00B8,
- 0x0161,
- 0x015F,
- 0x0165,
- 0x017A,
- 0x02DD,
- 0x017E,
- 0x017C,
- 0x0154,
- 0x00C1,
- 0x00C2,
- 0x0102,
- 0x00C4,
- 0x0139,
- 0x0106,
- 0x00C7,
- 0x010C,
- 0x00C9,
- 0x0118,
- 0x00CB,
- 0x011A,
- 0x00CD,
- 0x00CE,
- 0x010E,
- 0x0110,
- 0x0143,
- 0x0147,
- 0x00D3,
- 0x00D4,
- 0x0150,
- 0x00D6,
- 0x00D7,
- 0x0158,
- 0x016E,
- 0x00DA,
- 0x0170,
- 0x00DC,
- 0x00DD,
- 0x0162,
- 0x00DF,
- 0x0155,
- 0x00E1,
- 0x00E2,
- 0x0103,
- 0x00E4,
- 0x013A,
- 0x0107,
- 0x00E7,
- 0x010D,
- 0x00E9,
- 0x0119,
- 0x00EB,
- 0x011B,
- 0x00ED,
- 0x00EE,
- 0x010F,
- 0x0111,
- 0x0144,
- 0x0148,
- 0x00F3,
- 0x00F4,
- 0x0151,
- 0x00F6,
- 0x00F7,
- 0x0159,
- 0x016F,
- 0x00FA,
- 0x0171,
- 0x00FC,
- 0x00FD,
- 0x0163,
- 0x02D9,
-};
-
-//---------------------------------------------------------------------------
-Ztring EmptyZtring;
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#if defined(STREAM_MISSING)
- #if defined (_UNICODE)
- #define _tnprintf snwprintf
- #else
- #define _tnprintf snprintf
- #endif
-#else
- typedef basic_stringstream<Char> tStringStream;
- typedef basic_istringstream<Char> tiStringStream;
- typedef basic_ostringstream<Char> toStringStream;
-#endif
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Operators
-//***************************************************************************
-
-Char &Ztring::operator() (size_type Pos)
-{
- if (Pos>size())
- resize(Pos);
- return operator[] (Pos);
-}
-
-//***************************************************************************
-// Assign
-//***************************************************************************
-
-bool Ztring::Assign_FromFile (const Ztring &FileName)
-{
- File F;
- if (!F.Open(FileName))
- return false;
- int64u F_Size=F.Size_Get();
- if (F_Size>((size_t)-1)-1)
- return false;
-
- //Creating buffer
- int8u* Buffer=new int8u[(size_t)F_Size+1];
- size_t Buffer_Offset=0;
-
- //Reading the file
- while(Buffer_Offset<F_Size)
- {
- size_t BytesRead=F.Read(Buffer+Buffer_Offset, (size_t)F_Size-Buffer_Offset);
- if (BytesRead==0)
- break; //Read is finished
- Buffer_Offset+=BytesRead;
- }
- if (Buffer_Offset<F_Size)
- {
- delete[] Buffer;
- return false;
- }
- Buffer[Buffer_Offset]='\0';
-
- //Filling
- assign((const Char*)Buffer);
- delete[] Buffer;
-
- return true;
-}
-
-//***************************************************************************
-// Conversions
-//***************************************************************************
-
-Ztring& Ztring::From_Unicode (const wchar_t S)
-{
- #ifdef _UNICODE
- append(1, S);
- #else
- From_Unicode(&S, 1);
- #endif
- return *this;
-}
-
-Ztring& Ztring::From_Unicode (const wchar_t* S)
-{
- if (S==NULL)
- return *this;
-
- #ifdef _UNICODE
- assign(S);
- #else
- #ifdef ZENLIB_USEWX
- size_type OK=wxConvCurrent->WC2MB(NULL, S, 0);
- if (OK!=0 && OK!=Error)
- assign(wxConvCurrent->cWC2MB(S));
- #else //ZENLIB_USEWX
- #ifdef WINDOWS
- int Size=WideCharToMultiByte(CP_UTF8, 0, S, -1, NULL, 0, NULL, NULL);
- if (Size!=0)
- {
- char* AnsiString=new char[Size+1];
- WideCharToMultiByte(CP_UTF8, 0, S, -1, AnsiString, Size, NULL, NULL);
- AnsiString[Size]='\0';
- assign (AnsiString);
- delete[] AnsiString;
- }
- else
- clear();
- #else //WINDOWS
- size_t Size=wcstombs(NULL, S, 0);
- if (Size!=0 && Size!=(size_t)-1)
- {
- char* AnsiString=new char[Size+1];
- Size=wcstombs(AnsiString, S, wcslen(S));
- AnsiString[Size]='\0';
- assign (AnsiString);
- delete[] AnsiString;
- }
- else
- clear();
- #endif
- #endif //ZENLIB_USEWX
- #endif
- return *this;
-}
-
-Ztring& Ztring::From_Unicode (const wchar_t *S, size_type Start, size_type Length)
-{
- if (S==NULL)
- return *this;
-
- if (Length==Error)
- Length=wcslen(S+Start);
- wchar_t* Temp=new wchar_t[Length+1];
- wcsncpy (Temp, S+Start, Length);
- Temp[Length]=__T('\0');
-
- From_Unicode(Temp);
- delete[] Temp; //Temp=NULL;
- return *this;
-}
-
-Ztring& Ztring::From_UTF8 (const char* S)
-{
- if (S==NULL)
- return *this;
-
- #ifdef ZENLIB_USEWX
- size_type OK=wxConvUTF8.MB2WC(NULL, S, 0);
- if (OK!=0 && OK!=Error)
- #ifdef _UNICODE
- assign(wxConvUTF8.cMB2WC(S).data());
- #else
- assign(wxConvCurrent->cWC2MB(wxConvUTF8.cMB2WC(S)));
- #endif
- #else //ZENLIB_USEWX
- #ifdef _UNICODE
- // Don't use MultiByteToWideChar(), some characters are not well decoded
- clear();
- const int8u* Z=(const int8u*)S;
- while (*Z) //0 is end
- {
- //1 byte
- if (*Z<0x80)
- {
- operator += ((wchar_t)(*Z));
- Z++;
- }
- //2 bytes
- else if ((*Z&0xE0)==0xC0)
- {
- if ((*(Z+1)&0xC0)==0x80)
- {
- operator += ((((wchar_t)(*Z&0x1F))<<6)|(*(Z+1)&0x3F));
- Z+=2;
- }
- else
- {
- clear();
- return *this; //Bad character
- }
- }
- //3 bytes
- else if ((*Z&0xF0)==0xE0)
- {
- if ((*(Z+1)&0xC0)==0x80 && (*(Z+2)&0xC0)==0x80)
- {
- operator += ((((wchar_t)(*Z&0x0F))<<12)|((*(Z+1)&0x3F)<<6)|(*(Z+2)&0x3F));
- Z+=3;
- }
- else
- {
- clear();
- return *this; //Bad character
- }
- }
- //4 bytes
- else if ((*Z&0xF8)==0xF0)
- {
- if ((*(Z+1)&0xC0)==0x80 && (*(Z+2)&0xC0)==0x80 && (*(Z+3)&0xC0)==0x80)
- {
- operator += ((((wchar_t)(*Z&0x0F))<<18)|((*(Z+1)&0x3F)<<12)||((*(Z+2)&0x3F)<<6)|(*(Z+3)&0x3F));
- Z+=4;
- }
- else
- {
- clear();
- return *this; //Bad character
- }
- }
- else
- {
- clear();
- return *this; //Bad character
- }
- }
- #else
- assign(S); //Not implemented
- #endif
- #endif //ZENLIB_USEWX
- return *this;
-}
-
-Ztring& Ztring::From_UTF8 (const char* S, size_type Start, size_type Length)
-{
- if (S==NULL)
- return *this;
-
- if (Length==Error)
- Length=strlen(S+Start);
- char* Temp=new char[Length+1];
- strncpy (Temp, S+Start, Length);
- Temp[Length]='\0';
-
- From_UTF8(Temp);
- delete[] Temp; //Temp=NULL;
- return *this;
-}
-
-Ztring& Ztring::From_UTF16 (const char* S)
-{
- if (S==NULL)
- return *this;
-
- if ((unsigned char)S[0]==(unsigned char)0xFF && (unsigned char)S[1]==(unsigned char)0xFE)
- return From_UTF16LE(S+2);
- else if ((unsigned char)S[0]==(unsigned char)0xFE && (unsigned char)S[1]==(unsigned char)0xFF)
- return From_UTF16BE(S+2);
- else if ((unsigned char)S[0]==(unsigned char)0x00 && (unsigned char)S[1]==(unsigned char)0x00)
- {
- clear(); //No begin!
- return *this;
- }
- else
- return From_UTF16LE(S); //Not sure, default
-}
-
-Ztring& Ztring::From_UTF16 (const char* S, size_type Start, size_type Length)
-{
- if (S==NULL)
- return *this;
-
- if (Length<2)
- return *this;
-
- if ((unsigned char)S[0]==(unsigned char)0xFF && (unsigned char)S[1]==(unsigned char)0xFE)
- return From_UTF16LE(S+2, Start, Length-2);
- else if ((unsigned char)S[0]==(unsigned char)0xFE && (unsigned char)S[1]==(unsigned char)0xFF)
- return From_UTF16BE(S+2, Start, Length-2);
- else if ((unsigned char)S[0]==(unsigned char)0x00 && (unsigned char)S[1]==(unsigned char)0x00)
- {
- clear(); //No begin!
- return *this;
- }
- else
- return From_UTF16LE(S, Start, Length); //Not sure, default
-}
-
-Ztring& Ztring::From_UTF16BE (const char* S)
-{
- if (S==NULL)
- return *this;
-
- #ifdef ZENLIB_USEWX
- //clear(); return *this;
- wxMBConvUTF16BE wxConvUTF16BE;
- size_type OK=wxConvUTF16BE.MB2WC(NULL, S, 0);
- if (OK!=0 && OK!=Error)
- #ifdef _UNICODE
- assign(wxConvUTF16BE.cMB2WC(S).data());
- #else
- assign(wxConvCurrent->cWC2MB(wxConvUTF16BE.cMB2WC(S)));
- #endif
- #else //ZENLIB_USEWX
- #ifdef WINDOWS
- clear();
- const wchar_t* SW=(const wchar_t*)S;
- size_t Pos=0;
- while (SW[Pos]!=__T('\0'))
- {
- Char Temp=(Char)(((SW[Pos]&0xFF00)>>8)+((SW[Pos]&0x00FF)<<8));
- append(1, Temp);
- Pos++;
- }
- #else //WINDOWS
- clear();
- while (S[0]!=0 || S[1]!=0)
- {
- append(1, (Char)BigEndian2int16u(S));
- S+=2;
- }
- #endif
- #endif //ZENLIB_USEWX
- return *this;
-}
-
-Ztring& Ztring::From_UTF16BE (const char* S, size_type Start, size_type Length)
-{
- if (S==NULL)
- return *this;
-
- if (Length==Error)
- {
- Length=0;
- while(S[Length]!=0x0000)
- Length++;
- }
- else
- Length&=(size_t)-2; //odd number
-
- char* Temp=new char[Length+2];
- memcpy (Temp, S+Start, Length);
- Temp[Length+0]=0x00;
- Temp[Length+1]=0x00;
- reserve(Length);
- From_UTF16BE(Temp);
- delete[] Temp; //Temp=NULL;
- return *this;
-}
-
-Ztring& Ztring::From_UTF16LE (const char* S)
-{
- if (S==NULL)
- return *this;
-
- #ifdef ZENLIB_USEWX
- //clear(); return *this;
- wxMBConvUTF16LE wxConvUTF16LE;
- size_type OK=wxConvUTF16LE.MB2WC(NULL, S, 0);
- if (OK!=0 && OK!=Error)
- #ifdef _UNICODE
- assign(wxConvUTF16LE.cMB2WC(S).data());
- #else
- assign(wxConvCurrent->cWC2MB(wxConvUTF16LE.cMB2WC(S)));
- #endif
- #else //ZENLIB_USEWX
- #ifdef WINDOWS
- #ifdef UNICODE
- const wchar_t* SW=(const wchar_t*)S;
- assign(SW);
- #else
- clear(); //Not implemented
- #endif
- #else //WINDOWS
- clear();
- while (S[0]!=0 || S[1]!=0)
- {
- append(1, (Char)LittleEndian2int16u(S));
- S+=2;
- }
- #endif
- #endif //ZENLIB_USEWX
- return *this;
-}
-
-Ztring& Ztring::From_UTF16LE (const char* S, size_type Start, size_type Length)
-{
- if (S==NULL)
- return *this;
-
- if (Length==Error)
- {
- Length=0;
- while(S[Length]!=0x0000)
- Length+=2;
- }
- else
- Length&=(size_t)-2; //odd number
-
- char* Temp=new char[Length+2];
- memcpy (Temp, S+Start, Length);
- Temp[Length+0]=0x00;
- Temp[Length+1]=0x00;
- From_UTF16LE(Temp);
- delete[] Temp; //Temp=NULL;
- return *this;
-}
-
-Ztring& Ztring::From_Local (const char* S)
-{
- if (S==NULL)
- return *this;
-
- #ifdef _UNICODE
- #ifdef ZENLIB_USEWX
- size_type OK=wxConvCurrent->MB2WC(NULL, S, 0);
- if (OK!=0 && OK!=Error)
- assign(wxConvCurrent->cMB2WC(S).data());
- #else //ZENLIB_USEWX
- #ifdef WINDOWS
- int Size=MultiByteToWideChar(CP_ACP, 0, S, -1, NULL, 0);
- if (Size!=0)
- {
- wchar_t* WideString=new wchar_t[Size+1];
- MultiByteToWideChar(CP_ACP, 0, S, -1, WideString, Size);
- WideString[Size]=L'\0';
- assign (WideString);
- delete[] WideString; //WideString=NULL;
- }
- else
- clear();
- #else //WINDOWS
- size_t Size=mbstowcs(NULL, S, 0);
- if (Size!=0 && Size!=(size_t)-1)
- {
- wchar_t* WideString=new wchar_t[Size+1];
- Size=mbstowcs(WideString, S, Size);
- WideString[Size]=L'\0';
- assign (WideString);
- delete[] WideString; //WideString=NULL;
- }
- else
- clear();
- #endif
- #endif //ZENLIB_USEWX
- #else
- assign(S);
- #endif
- return *this;
-}
-
-Ztring& Ztring::From_Local (const char* S, size_type Start, size_type Length)
-{
- if (S==NULL)
- return *this;
-
- if (Length==Error)
- Length=strlen(S+Start);
- #ifdef _UNICODE
- char* Temp=new char[Length+1];
- strncpy (Temp, S+Start, Length);
- Temp[Length]='\0';
- From_Local(Temp);
- delete[] Temp; //Temp=NULL;
- #else
- assign(S+Start, Length);
- if (find(__T('\0'))!=std::string::npos)
- resize(find(__T('\0')));
- #endif
- return *this;
-}
-
-Ztring& Ztring::From_ISO_8859_1(const char* S)
-{
- size_t Length = strlen(S);
- wchar_t* Temp = new wchar_t[Length +1];
-
- for (size_t Pos=0; Pos<Length+1; Pos++)
- Temp[Pos]=(wchar_t)((int8u)S[Pos]);
-
- From_Unicode(Temp);
- delete[] Temp;
- return *this;
-}
-
-Ztring& Ztring::From_ISO_8859_1(const char* S, size_type Start, size_type Length)
-{
- if (S==NULL)
- return *this;
-
- if (Length==Error)
- Length=strlen(S+Start);
- #ifdef _UNICODE
- char* Temp = new char[Length+1];
- strncpy(Temp, S +Start, Length);
- Temp[Length] = '\0';
- From_ISO_8859_1(Temp);
- delete[] Temp;
- #else
- assign(S +Start, Length);
- if (find(__T('\0')) != std::string::npos)
- resize(find(__T('\0')));
- #endif
- return *this;
-}
-
-Ztring& Ztring::From_ISO_8859_2(const char* S)
-{
- size_t Length = strlen(S);
- wchar_t* Temp = new wchar_t[Length +1];
-
- for (size_t Pos=0; Pos<Length+1; Pos++)
- {
- if ((int8u)S[Pos]>=0xA0)
- Temp[Pos]=(wchar_t)Ztring_ISO_8859_2[((int8u)S[Pos])-0xA0];
- else
- Temp[Pos]=(wchar_t)((int8u)S[Pos]);
- }
-
- From_Unicode(Temp);
- delete[] Temp;
- return *this;
-}
-
-Ztring& Ztring::From_ISO_8859_2(const char* S, size_type Start, size_type Length)
-{
- if (S==NULL)
- return *this;
-
- if (Length==Error)
- Length=strlen(S+Start);
- #ifdef _UNICODE
- char* Temp = new char[Length+1];
- strncpy(Temp, S +Start, Length);
- Temp[Length] = '\0';
- From_ISO_8859_2(Temp);
- delete[] Temp;
- #else
- assign(S +Start, Length);
- if (find(__T('\0')) != std::string::npos)
- resize(find(__T('\0')));
- #endif
- return *this;
-}
-
-Ztring& Ztring::From_GUID (const int128u S)
-{
- Ztring S1;
- S1.From_CC1((int8u) ((S.hi&0x000000FF00000000LL)>>32)); append(S1);
- S1.From_CC1((int8u) ((S.hi&0x0000FF0000000000LL)>>40)); append(S1);
- S1.From_CC1((int8u) ((S.hi&0x00FF000000000000LL)>>48)); append(S1);
- S1.From_CC1((int8u) ((S.hi&0xFF00000000000000LL)>>56)); append(S1); append(__T("-"));
- S1.From_CC1((int8u) ((S.hi&0x0000000000FF0000LL)>>16)); append(S1);
- S1.From_CC1((int8u) ((S.hi&0x00000000FF000000LL)>>24)); append(S1); append(__T("-"));
- S1.From_CC1((int8u) ( S.hi&0x00000000000000FFLL )); append(S1);
- S1.From_CC1((int8u) ((S.hi&0x000000000000FF00LL)>> 8)); append(S1); append(__T("-"));
- S1.From_CC2((int16u)((S.lo&0xFFFF000000000000LL)>>48)); append(S1); append(__T("-"));
- S1.From_CC2((int16u)((S.lo&0x0000FFFF00000000LL)>>32)); append(S1);
- S1.From_CC2((int16u)((S.lo&0x00000000FFFF0000LL)>>16)); append(S1);
- S1.From_CC2((int16u)( S.lo&0x000000000000FFFFLL )); append(S1);
-
- return *this;
-}
-
-Ztring& Ztring::From_UUID (const int128u S)
-{
- Ztring S1;
- S1.From_CC2((int16u)((S.hi&0xFFFF000000000000LL)>>48)); assign(S1);
- S1.From_CC2((int16u)((S.hi&0x0000FFFF00000000LL)>>32)); append(S1); append(__T("-"));
- S1.From_CC2((int16u)((S.hi&0x00000000FFFF0000LL)>>16)); append(S1); append(__T("-"));
- S1.From_CC2((int16u)( S.hi&0x000000000000FFFFLL )); append(S1); append(__T("-"));
- S1.From_CC2((int16u)((S.lo&0xFFFF000000000000LL)>>48)); append(S1); append(__T("-"));
- S1.From_CC2((int16u)((S.lo&0x0000FFFF00000000LL)>>32)); append(S1);
- S1.From_CC2((int16u)((S.lo&0x00000000FFFF0000LL)>>16)); append(S1);
- S1.From_CC2((int16u)( S.lo&0x000000000000FFFFLL )); append(S1);
-
- return *this;
-}
-
-Ztring& Ztring::From_CC4 (const int32u S)
-{
- std::string S1;
- S1.append(1, (char)((S&0xFF000000)>>24));
- S1.append(1, (char)((S&0x00FF0000)>>16));
- S1.append(1, (char)((S&0x0000FF00)>> 8));
- S1.append(1, (char)((S&0x000000FF) ));
- From_Local(S1.c_str());
-
- // Validity Test
- if ( size()==4
- || (size()==3 && (S&0x000000FF)==0x00000000 && at(0)>=0x20 && at(1)>=0x20 && at(2)>=0x20)
- || (size()==2 && (S&0x0000FFFF)==0x00000000 && at(0)>=0x20 && at(1)>=0x20)
- || (size()==1 && (S&0x00FFFFFF)==0x00000000 && at(0)>=0x20))
- return *this;
-
- // Not valid, using 0x as fallback
- clear();
- append(__T("0x"));
- append(Ztring().From_CC1((int8u)((S&0xFF000000)>>24)));
- append(Ztring().From_CC1((int8u)((S&0x00FF0000)>>16)));
- append(Ztring().From_CC1((int8u)((S&0x0000FF00)>> 8)));
- append(Ztring().From_CC1((int8u)((S&0x000000FF) )));
-
- return *this;
-}
-
-Ztring& Ztring::From_CC3 (const int32u S)
-{
- std::string S1;
- S1.append(1, (char)((S&0x00FF0000)>>16));
- S1.append(1, (char)((S&0x0000FF00)>> 8));
- S1.append(1, (char)((S&0x000000FF)>> 0));
- From_Local(S1.c_str());
-
- //Test
- if (empty())
- assign(__T("(empty)"));
-
- return *this;
-}
-
-Ztring& Ztring::From_CC2 (const int16u S)
-{
- clear();
- Ztring Pos1; Pos1.From_Number(S, 16);
- resize(4-Pos1.size(), __T('0'));
- append(Pos1);
- MakeUpperCase();
-
- return *this;
-}
-
-Ztring& Ztring::From_CC1 (const int8u S)
-{
- clear();
- Ztring Pos1; Pos1.From_Number(S, 16);
- resize(2-Pos1.size(), __T('0'));
- append(Pos1);
- MakeUpperCase();
-
- return *this;
-}
-
-Ztring& Ztring::From_Number (const int8s I, int8u Radix)
-{
- #if defined(STREAM_MISSING)
- if (Radix==0)
- {
- clear();
- return *this;
- }
- Char* C1=new Char[33];
- #ifdef __MINGW32__
- _itot (I, C1, Radix);
- #else
- _tnprintf(C1, 32, Radix==10?__T("%d"):(Radix==16?__T("%x"):(Radix==8?__T("%o"):__T(""))), I);
- #endif
- assign (C1);
- delete[] C1; //C1=NULL;
- #else
- toStringStream Stream;
- #ifdef UNICODE
- Stream << setbase(Radix) << I;
- #else //UNICODE
- Stream << setbase(Radix) << (size_t)I; //On linux (at least), (un)signed char is detected as a char
- #endif //UNICODE
- assign(Stream.str());
- #endif
- MakeUpperCase();
- return *this;
-}
-
-Ztring& Ztring::From_Number (const int8u I, int8u Radix)
-{
- #if defined(STREAM_MISSING)
- if (Radix==0)
- {
- clear();
- return *this;
- }
- Char* C1=new Char[33];
- #ifdef __MINGW32__
- _ultot (I, C1, Radix);
- #else
- _tnprintf(C1, 32, Radix==10?__T("%d"):(Radix==16?__T("%x"):(Radix==8?__T("%o"):__T(""))), I);
- #endif
- assign (C1);
- delete[] C1; //C1=NULL;
- #else
- if (Radix==2)
- {
- clear();
- for (int8u Pos=0; Pos<8; Pos++)
- {
- if (I<(((int8u)1)<<Pos))
- break;
- insert(0, 1, (I&(((int8u)1)<<Pos))?__T('1'):__T('0'));
- }
- }
- else
- {
- toStringStream Stream;
- #ifdef UNICODE
- Stream << setbase(Radix) << I;
- #else //UNICODE
- Stream << setbase(Radix) << (size_t)I; //On linux (at least), (un)signed char is detected as a char
- #endif //UNICODE
- assign(Stream.str());
- }
- #endif
- MakeUpperCase();
- return *this;
-}
-
-Ztring& Ztring::From_Number (const int16s I, int8u Radix)
-{
- #if defined(STREAM_MISSING)
- if (Radix==0)
- {
- clear();
- return *this;
- }
- Char* C1=new Char[33];
- #ifdef __MINGW32__
- _itot (I, C1, Radix);
- #else
- _tnprintf(C1, 32, Radix==10?__T("%d"):(Radix==16?__T("%x"):(Radix==8?__T("%o"):__T(""))), I);
- #endif
- assign (C1);
- delete[] C1; //C1=NULL;
- #else
- toStringStream Stream;
- Stream << setbase(Radix) << I;
- assign(Stream.str());
- #endif
- MakeUpperCase();
- return *this;
-}
-
-Ztring& Ztring::From_Number (const int16u I, int8u Radix)
-{
- #if defined(STREAM_MISSING)
- if (Radix==0)
- {
- clear();
- return *this;
- }
- Char* C1=new Char[33];
- #ifdef __MINGW32__
- _ultot (I, C1, Radix);
- #else
- _tnprintf(C1, 32, Radix==10?__T("%u"):(Radix==16?__T("%x"):(Radix==8?__T("%o"):__T(""))), I);
- #endif
- assign (C1);
- delete[] C1; //C1=NULL;
- #else
- if (Radix==2)
- {
- clear();
- for (int8u Pos=0; Pos<16; Pos++)
- {
- if (I<(((int16u)1)<<Pos))
- break;
- insert(0, 1, (I&(((int16u)1)<<Pos))?__T('1'):__T('0'));
- }
- }
- else
- {
- toStringStream Stream;
- Stream << setbase(Radix) << I;
- assign(Stream.str());
- }
- #endif
- MakeUpperCase();
- return *this;
-}
-
-Ztring& Ztring::From_Number (const int32s I, int8u Radix)
-{
- #if defined(STREAM_MISSING)
- if (Radix==0)
- {
- clear();
- return *this;
- }
- Char* C1=new Char[33];
- #ifdef __MINGW32__
- _itot (I, C1, Radix);
- #else
- _tnprintf(C1, 32, Radix==10?__T("%ld"):(Radix==16?__T("%lx"):(Radix==8?__T("%lo"):__T(""))), I);
- #endif
- assign (C1);
- delete[] C1; //C1=NULL;
- #else
- toStringStream Stream;
- Stream << setbase(Radix) << I;
- assign(Stream.str());
- #endif
- MakeUpperCase();
- return *this;
-}
-
-Ztring& Ztring::From_Number (const int32u I, int8u Radix)
-{
- #if defined(STREAM_MISSING)
- if (Radix==0)
- {
- clear();
- return *this;
- }
- Char* C1=new Char[33];
- #ifdef __MINGW32__
- _ultot (I, C1, Radix);
- #else
- _tnprintf(C1, 32, Radix==10?__T("%lu"):(Radix==16?__T("%lx"):(Radix==8?__T("%lo"):__T(""))), I);
- #endif
- assign (C1);
- delete[] C1; //C1=NULL;
- #else
- if (Radix==2)
- {
- clear();
- for (int8u Pos=0; Pos<32; Pos++)
- {
- if (I<(((int32u)1)<<Pos))
- break;
- insert(0, 1, (I&(((int32u)1)<<Pos))?__T('1'):__T('0'));
- }
- }
- else
- {
- toStringStream Stream;
- Stream << setbase(Radix) << I;
- assign(Stream.str());
- }
- #endif
- MakeUpperCase();
- return *this;
-}
-
-Ztring& Ztring::From_Number (const int64s I, int8u Radix)
-{
- #if defined(STREAM_MISSING)
- if (Radix==0)
- {
- clear();
- return *this;
- }
- Char* C1=new Char[65];
- #ifdef __MINGW32__
- _i64tot (I, C1, Radix);
- #else
- _tnprintf(C1, 64, Radix==10?__T("%lld"):(Radix==16?__T("%llx"):(Radix==8?__T("%llo"):__T(""))), I);
- #endif
- assign (C1);
- delete[] C1; //C1=NULL;
- #else
- toStringStream Stream;
- Stream << setbase(Radix) << I;
- assign(Stream.str());
- #endif
- MakeUpperCase();
- return *this;
-}
-
-Ztring& Ztring::From_Number (const int64u I, int8u Radix)
-{
- #if defined(STREAM_MISSING)
- if (Radix==0)
- {
- clear();
- return *this;
- }
- Char* C1=new Char[65]; C1[0] = 0;
- #ifdef __MINGW32__
- _ui64tot (I, C1, Radix);
- #else
- _tnprintf(C1, 64, Radix==10?__T("%llu"):(Radix==16?__T("%llx"):(Radix==8?__T("%llo"):__T(""))), I);
- #endif
- assign (C1);
- delete[] C1; //C1=NULL;
- #else
- if (Radix==2)
- {
- clear();
- for (int8u Pos=0; Pos<32; Pos++)
- {
- if (I<(((int64u)1)<<Pos))
- break;
- insert(0, 1, (I&(((int64u)1)<<Pos))?__T('1'):__T('0'));
- }
- }
- else
- {
- toStringStream Stream;
- Stream << setbase(Radix) << I;
- assign(Stream.str());
- }
- #endif
- MakeUpperCase();
- return *this;
-}
-
-Ztring& Ztring::From_Number (const int128u I, int8u Radix)
-{
- From_Local(I.toString(Radix));
-
- return *this;
-}
-
-Ztring& Ztring::From_Number (const float32 F, int8u Precision, ztring_t Options)
-{
- #if defined(STREAM_MISSING)
- Char C1[100];
- _tnprintf (C1, 99, (Ztring(__T("%."))+Ztring::ToZtring(Precision)+__T("f")).c_str(), F);
- assign(C1);
- #else
- toStringStream Stream;
- Stream << setprecision(Precision) << fixed << F;
- assign(Stream.str());
- #if defined(__BORLANDC__)
- FindAndReplace(__T(","), __T(".")); //Borland C++ Builder 2010+Windows Seven put a comma for istringstream, but does not support comma for ostringstream
- #endif
- #endif
-
- if ((Options & Ztring_NoZero && size()>0) && find(__T('.'))!=string::npos)
- {
- while (size()>0 && ((*this)[size()-1]==__T('0')))
- resize(size()-1);
- if (size()>0 && (*this)[size()-1]==__T('.'))
- resize(size()-1);
- }
-
- return *this;
-}
-
-Ztring& Ztring::From_Number (const float64 F, int8u Precision, ztring_t Options)
-{
- #if defined(STREAM_MISSING)
- Char C1[100];
- _tnprintf (C1, 99, (Ztring(__T("%."))+Ztring::ToZtring(Precision)+__T("f")).c_str(), F);
- assign(C1);
- #else
- toStringStream Stream;
- Stream << setprecision(Precision) << fixed << F;
- assign(Stream.str());
- #if defined(__BORLANDC__)
- FindAndReplace(__T(","), __T(".")); //Borland C++ Builder 2010+Windows Seven put a comma for istringstream, but does not support comma for ostringstream
- #endif
- #endif
-
- if ((Options & Ztring_NoZero && size()>0) && find(__T('.'))!=string::npos)
- {
- while (size()>0 && ((*this)[size()-1]==__T('0')))
- resize(size()-1);
- if (size()>0 && (*this)[size()-1]==__T('.'))
- resize(size()-1);
- }
-
- return *this;
-}
-
-Ztring& Ztring::From_Number (const float80 F, int8u Precision, ztring_t Options)
-{
- #if defined(STREAM_MISSING)
- Char C1[100];
- _tnprintf (C1, 99, (Ztring(__T("%."))+Ztring::ToZtring(Precision)+__T("f")).c_str(), F);
- assign(C1);
- #else
- toStringStream Stream;
- Stream << setprecision(Precision) << fixed << F;
- assign(Stream.str());
- #if defined(__BORLANDC__)
- FindAndReplace(__T(","), __T(".")); //Borland C++ Builder 2010+Windows Seven put a comma for istringstream, but does not support comma for ostringstream
- #endif
- #endif
-
- if ((Options & Ztring_NoZero && size()>0) && find(__T('.'))!=string::npos)
- {
- while (size()>0 && ((*this)[size()-1]==__T('0')))
- resize(size()-1);
- if (size()>0 && (*this)[size()-1]==__T('.'))
- resize(size()-1);
- }
-
- return *this;
-}
-
-#ifdef SIZE_T_IS_LONG
-Ztring& Ztring::From_Number (const size_t I, int8u Radix)
-{
- #if defined(STREAM_MISSING)
- Char C1[100];
- _tnprintf(C1, 64, Radix==10?__T("%zu"):(Radix==16?__T("%zx"):(Radix==8?__T("%zo"):__T(""))), I);
- assign(C1);
- #else
- toStringStream Stream;
- Stream << setbase(Radix) << I;
- assign(Stream.str());
- #if defined(__BORLANDC__)
- FindAndReplace(__T(","), __T(".")); //Borland C++ Builder 2010+Windows Seven put a comma for istringstream, but does not support comma for ostringstream
- #endif
- #endif
- MakeUpperCase();
- return *this;
-}
-#endif //SIZE_T_IS_LONG
-
-Ztring& Ztring::From_BCD (const int8u I)
-{
- #if defined(STREAM_MISSING)
- clear();
- append(1, __T('0')+I/0x10);
- append(1, __T('0')+I%0x10);
- #else
- toStringStream Stream;
- Stream << I/0x10;
- Stream << I%0x10;
- assign(Stream.str());
- #endif
- return *this;
-}
-
-//---------------------------------------------------------------------------
-Ztring& Ztring::Duration_From_Milliseconds (const int64s Value_)
-{
- int64s Value=Value_;
- bool Negative=false;
- if (Value<0)
- {
- Value=-Value;
- Negative=true;
- }
-
- int64u HH=(int8u)(Value/1000/60/60);
- int64u MM=Value/1000/60 -((HH*60));
- int64u Stream=Value/1000 -((HH*60+MM)*60);
- int64u MS=Value -((HH*60+MM)*60+Stream)*1000;
- Ztring DateT;
- Ztring Date;
- DateT.From_Number(HH); if (DateT.size()<2){DateT=Ztring(__T("0"))+DateT;}
- Date+=DateT;
- Date+=__T(":");
- DateT.From_Number(MM); if (DateT.size()<2){DateT=Ztring(__T("0"))+DateT;}
- Date+=DateT;
- Date+=__T(":");
- DateT.From_Number(Stream); if (DateT.size()<2){DateT=Ztring(__T("0"))+DateT;}
- Date+=DateT;
- Date+=__T(".");
- DateT.From_Number(MS); if (DateT.size()<2){DateT=Ztring(__T("00"))+DateT;} else if (DateT.size()<3){DateT=Ztring(__T("0"))+DateT;}
- Date+=DateT;
- if (Negative)
- {
- assign(__T("-"));
- append(Date);
- }
- else
- assign (Date.c_str());
- return *this;
-}
-
-//---------------------------------------------------------------------------
-Ztring& Ztring::Duration_From_Milliseconds (const int64u Value)
-{
- int64u HH=(int8u)(Value/1000/60/60);
- int64u MM=Value/1000/60 -((HH*60));
- int64u Stream=Value/1000 -((HH*60+MM)*60);
- int64u MS=Value -((HH*60+MM)*60+Stream)*1000;
- Ztring DateT;
- Ztring Date;
- DateT.From_Number(HH); if (DateT.size()<2){DateT=Ztring(__T("0"))+DateT;}
- Date+=DateT;
- Date+=__T(":");
- DateT.From_Number(MM); if (DateT.size()<2){DateT=Ztring(__T("0"))+DateT;}
- Date+=DateT;
- Date+=__T(":");
- DateT.From_Number(Stream); if (DateT.size()<2){DateT=Ztring(__T("0"))+DateT;}
- Date+=DateT;
- Date+=__T(".");
- DateT.From_Number(MS); if (DateT.size()<2){DateT=Ztring(__T("00"))+DateT;} else if (DateT.size()<3){DateT=Ztring(__T("0"))+DateT;}
- Date+=DateT;
- assign (Date.c_str());
- return *this;
-}
-
-Ztring& Ztring::Date_From_Milliseconds_1601 (const int64u Value)
-{
- if (Value>=11644473600000LL) //Values <1970 are not supported
- {
- Date_From_Seconds_1970((int32u)((Value-11644473600000LL)/1000));
- append(__T("."));
- Ztring Milliseconds; Milliseconds.From_Number(Value%1000);
- while (Milliseconds.size()<3)
- Milliseconds+=__T('0');
- append(Milliseconds);
- }
- else
- clear(); //Not supported
-
- return *this;
-}
-
-Ztring& Ztring::Date_From_Seconds_1601 (const int64u Value)
-{
- return Date_From_Seconds_1970(((int64s)Value)-11644473600LL);
-}
-
-Ztring& Ztring::Date_From_Seconds_1900 (const int32u Value)
-{
- if (Value>2208988800)
- return Date_From_Seconds_1970(((int64s)Value)-2208988800);
- else
- return Date_From_Seconds_1970(((int64s)Value)+0x100000000LL-2208988800); //Value is considering to loop e.g. NTP value
-}
-
-Ztring& Ztring::Date_From_Seconds_1900 (const int64s Value)
-{
- return Date_From_Seconds_1970(Value-2208988800);
-}
-
-Ztring& Ztring::Date_From_Seconds_1904 (const int32u Value)
-{
- return Date_From_Seconds_1970(((int64s)Value)-2082844800);
-}
-
-Ztring& Ztring::Date_From_Seconds_1904 (const int64u Value)
-{
- return Date_From_Seconds_1970(((int64s)Value)-2082844800);
-}
-
-Ztring& Ztring::Date_From_Seconds_1904 (const int64s Value)
-{
- return Date_From_Seconds_1970(Value-2082844800);
-}
-
-Ztring& Ztring::Date_From_Seconds_1970 (const int32u Value)
-{
- return Date_From_Seconds_1970((int64s)Value);
-}
-
-Ztring& Ztring::Date_From_Seconds_1970 (const int32s Value)
-{
- return Date_From_Seconds_1970((int64s)Value);
-}
-
-Ztring& Ztring::Date_From_Seconds_1970 (const int64s Value)
-{
- time_t Time=(time_t)Value;
- struct tm *Gmt=gmtime(&Time);
- if (!Gmt)
- {
- clear();
- return *this;
- }
- Ztring DateT;
- Ztring Date=__T("UTC ");
- Date+=Ztring::ToZtring((Gmt->tm_year+1900));
- Date+=__T("-");
- DateT.From_Number(Gmt->tm_mon+1); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Gmt->tm_mon+1);}
- Date+=DateT;
- Date+=__T("-");
- DateT.From_Number(Gmt->tm_mday); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Gmt->tm_mday);}
- Date+=DateT;
- Date+=__T(" ");
- DateT.From_Number(Gmt->tm_hour); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Gmt->tm_hour);}
- Date+=DateT;
- Date+=__T(":");
- DateT=Ztring::ToZtring(Gmt->tm_min); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Gmt->tm_min);}
- Date+=DateT;
- Date+=__T(":");
- DateT.From_Number(Gmt->tm_sec); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Gmt->tm_sec);}
- Date+=DateT;
- assign (Date.c_str());
- return *this;
-}
-
-Ztring& Ztring::Date_From_Seconds_1970_Local (const int32u Value)
-{
- time_t Time=(time_t)Value;
- struct tm *Gmt=localtime(&Time);
- Ztring DateT;
- Ztring Date;
- Date+=Ztring::ToZtring((Gmt->tm_year+1900));
- Date+=__T("-");
- DateT.From_Number(Gmt->tm_mon+1); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Gmt->tm_mon+1);}
- Date+=DateT;
- Date+=__T("-");
- DateT.From_Number(Gmt->tm_mday); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Gmt->tm_mday);}
- Date+=DateT;
- Date+=__T(" ");
- DateT.From_Number(Gmt->tm_hour); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Gmt->tm_hour);}
- Date+=DateT;
- Date+=__T(":");
- DateT=Ztring::ToZtring(Gmt->tm_min); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Gmt->tm_min);}
- Date+=DateT;
- Date+=__T(":");
- DateT.From_Number(Gmt->tm_sec); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Gmt->tm_sec);}
- Date+=DateT;
- assign (Date.c_str());
- return *this;
-}
-
-Ztring& Ztring::Date_From_String (const char* Value, size_t Value_Size)
-{
- //Only the year
- if (Value_Size<10)
- {
- From_Local(Value, 0, Value_Size);
- return *this;
- }
-
- #ifdef ZENLIB_USEWX
- Ztring ToReturn=__T("UTC ");
- wxDateTime Date;
- Ztring DateS;
- DateS.From_Local(Value, Value_Size).c_str();
- if (!DateS.empty() && DateS[DateS.size()-1]==__T('\n'))
- DateS.resize(DateS.size()-1);
-
- //Some strange formating : exactly 24 bytes (or 25 with 0x0A at the end) and Year is at the end
- if (DateS.size()==24 && DateS[23]>=__T('0') && DateS[23]<=__T('9') && DateS[21]>=__T('0') && DateS[21]<=__T('9') && DateS[19]==__T(' '))
- Date.ParseFormat(DateS.c_str(), __T("%a %b %d %H:%M:%S %Y"));
- //ISO date
- else if (DateS.size()==10 && (DateS[4]<__T('0') || DateS[4]>__T('9')) && (DateS[7]<__T('0') || DateS[7]>__T('9')))
- {
- DateS[4]=__T('-');
- DateS[7]=__T('-');
- ToReturn+=DateS;
- }
- //Default
- else
- Date.ParseDateTime(DateS.c_str());
-
- if (ToReturn.size()<5)
- {
- ToReturn+=Date.FormatISODate();
- ToReturn+=__T(" ");
- ToReturn+=Date.FormatISOTime();
- }
- else
- ToReturn+=DateS;
-
- assign (ToReturn.c_str());
- #else //ZENLIB_USEWX
- Ztring DateS; DateS.From_Local(Value, 0, Value_Size);
- //Unix style formating : exactly 24 bytes (or 25 with 0x0A at the end) and Year is at the end
- if ((DateS.size()==24 || (DateS.size()==25 && DateS[24]==__T('\n'))) && DateS[23]>=__T('0') && DateS[23]<=__T('9') && DateS[21]>=__T('0') && DateS[21]<=__T('9') && DateS[19]==__T(' '))
- {
- clear();
- append(1, DateS[20]);
- append(1, DateS[21]);
- append(1, DateS[22]);
- append(1, DateS[23]);
- append(1, __T('-'));
- if (DateS[4]==__T('J') && DateS[5]==__T('a') && DateS[6]==__T('n') && DateS[7]==__T(' '))
- {
- append(1, __T('0'));
- append(1, __T('1'));
- }
- else if (DateS[4]==__T('F') && DateS[5]==__T('e') && DateS[6]==__T('b') && DateS[7]==__T(' '))
- {
- append(1, __T('0'));
- append(1, __T('2'));
- }
- else if (DateS[4]==__T('M') && DateS[5]==__T('a') && DateS[6]==__T('r') && DateS[7]==__T(' '))
- {
- append(1, __T('0'));
- append(1, __T('3'));
- }
- else if (DateS[4]==__T('A') && DateS[5]==__T('p') && DateS[6]==__T('r') && DateS[7]==__T(' '))
- {
- append(1, __T('0'));
- append(1, __T('4'));
- }
- else if (DateS[4]==__T('M') && DateS[5]==__T('a') && DateS[6]==__T('y') && DateS[7]==__T(' '))
- {
- append(1, __T('0'));
- append(1, __T('5'));
- }
- else if (DateS[4]==__T('J') && DateS[5]==__T('u') && DateS[6]==__T('n') && DateS[7]==__T(' '))
- {
- append(1, __T('0'));
- append(1, __T('6'));
- }
- else if (DateS[4]==__T('J') && DateS[5]==__T('u') && DateS[6]==__T('l') && DateS[7]==__T(' '))
- {
- append(1, __T('0'));
- append(1, __T('7'));
- }
- else if (DateS[4]==__T('A') && DateS[5]==__T('u') && DateS[6]==__T('g') && DateS[7]==__T(' '))
- {
- append(1, __T('0'));
- append(1, __T('8'));
- }
- else if (DateS[4]==__T('S') && DateS[5]==__T('e') && DateS[6]==__T('p') && DateS[7]==__T(' '))
- {
- append(1, __T('0'));
- append(1, __T('9'));
- }
- else if (DateS[4]==__T('O') && DateS[5]==__T('c') && DateS[6]==__T('t') && DateS[7]==__T(' '))
- {
- append(1, __T('1'));
- append(1, __T('0'));
- }
- else if (DateS[4]==__T('N') && DateS[5]==__T('o') && DateS[6]==__T('v') && DateS[7]==__T(' '))
- {
- append(1, __T('1'));
- append(1, __T('1'));
- }
- else if (DateS[4]==__T('D') && DateS[5]==__T('e') && DateS[6]==__T('c') && DateS[7]==__T(' '))
- {
- append(1, __T('1'));
- append(1, __T('2'));
- }
- else
- {
- assign(DateS);
- return *this;
- }
- append(1, __T('-'));
- append(1, DateS[8]);
- append(1, DateS[9]);
- append(1, __T(' '));
- append(1, DateS[11]);
- append(1, DateS[12]);
- append(1, __T(':'));
- append(1, DateS[14]);
- append(1, DateS[15]);
- append(1, __T(':'));
- append(1, DateS[17]);
- append(1, DateS[18]);
- }
- else if (DateS.size()==20 && DateS[4]==__T('-') && DateS[7]==__T('-') && DateS[10]==__T('T') && DateS[13]==__T(':') && DateS[16]==__T(':') && DateS[19]==__T('Z'))
- {
- DateS.resize(19);
- DateS[10]=__T(' ');
- assign(__T("UTC "));
- append(DateS);
- }
- else if (DateS.size()==23 && DateS[4]==__T('-') && DateS[7]==__T('-') && DateS[10]==__T(' ') && DateS[14]==__T(' ') && DateS[17]==__T(':') && DateS[20]==__T(':'))
- {
- DateS.erase(10, 4);
- //assign(__T("UTC ")); //Is not UTC
- append(DateS);
- }
- else
- From_Local(Value, 0, Value_Size); //Not implemented
- #endif //ZENLIB_USEWX
- return *this;
-}
-
-Ztring& Ztring::Date_From_Numbers (const int8u Year, const int8u Month, const int8u Day, const int8u Hour, const int8u Minute, const int8u Second)
-{
- Ztring DateT;
- Ztring Date=__T("UTC ");
- DateT.From_Number(Year); if (DateT.size()<2){DateT=Ztring(__T("200"))+Ztring::ToZtring(Year);}; if (DateT.size()<3){DateT=Ztring(__T("20"))+Ztring::ToZtring(Year);}
- Date+=DateT;
- Date+=__T("-");
- DateT.From_Number(Month); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Month);}
- Date+=DateT;
- Date+=__T("-");
- DateT.From_Number(Day); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Day);}
- Date+=DateT;
- Date+=__T(" ");
- DateT.From_Number(Hour); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Hour);}
- Date+=DateT;
- Date+=__T(":");
- DateT=Ztring::ToZtring(Minute); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Minute);}
- Date+=DateT;
- Date+=__T(":");
- DateT.From_Number(Second); if (DateT.size()<2){DateT=Ztring(__T("0"))+Ztring::ToZtring(Second);}
- Date+=DateT;
- assign (Date.c_str());
- return *this;
-}
-
-#ifndef WSTRING_MISSING
-//---------------------------------------------------------------------------
-std::wstring Ztring::To_Unicode () const
-{
- #ifdef _UNICODE
- return c_str();
- #else //_UNICODE
- #ifdef ZENLIB_USEWX
- return wxConvCurrent->cMB2WC(c_str()).data();
- #else //ZENLIB_USEWX
- return std::wstring(); //Not implemented
- #endif //ZENLIB_USEWX
- #endif //_UNICODE
-}
-#endif //WSTRING_MISSING
-
-std::string Ztring::To_UTF8 () const
-{
- #ifdef _UNICODE
- //Correction thanks to Andrew Jang
- // Don't use WideCharToMultiByte(), some characters are not well converted
- std::string ToReturn;
- ToReturn.reserve(size()); // more efficient
-
- const wchar_t* Z=c_str();
-
- while (*Z)
- {
- int32u wc; // must be unsigned.
-
- #if defined(_MSC_VER)
- #pragma warning(push)
- #pragma warning(disable:4127)
- #endif //defined(_MSC_VER)
- if (sizeof(wchar_t) == 2)
- #if defined(_MSC_VER)
- #pragma warning(pop)
- #endif //defined(_MSC_VER)
- wc = (int16u) *Z; // avoid a cast problem if wchar_t is signed.
- else
- wc = *Z;
-
- int count;
-
- // refer to http://en.wikipedia.org/wiki/UTF-8#Description
-
- if (wc < 0x80)
- count = 1;
- else if (wc < 0x800)
- count = 2;
- else if (wc < 0x10000)
- count = 3;
- else if (wc < 0x200000)
- count = 4;
- else if (wc < 0x4000000)
- count = 5;
- else if (wc <= 0x7fffffff)
- count = 6;
- else
- break; // bad character
-
- int64u utfbuf = 0; // 8 bytes
- char* utf8chars = (char*) &utfbuf;
-
- switch (count)
- {
- case 6:
- utf8chars[5] = 0x80 | (wc & 0x3f);
- wc = (wc >> 6) | 0x4000000;
- case 5:
- utf8chars[4] = 0x80 | (wc & 0x3f);
- wc = (wc >> 6) | 0x200000;
- case 4:
- utf8chars[3] = 0x80 | (wc & 0x3f);
- wc = (wc >> 6) | 0x10000;
- case 3:
- utf8chars[2] = 0x80 | (wc & 0x3f);
- wc = (wc >> 6) | 0x800;
- case 2:
- utf8chars[1] = 0x80 | (wc & 0x3f);
- wc = (wc >> 6) | 0xc0;
- case 1:
- utf8chars[0] = (char) wc;
- }
-
- ToReturn += utf8chars;
-
- ++Z;
- }
-
- return ToReturn;
- #else
- #ifdef ZENLIB_USEWX
- return wxConvUTF8.cWC2MB(wxConvCurrent->cMB2WC(c_str())).data();
- #else //ZENLIB_USEWX
- return c_str(); //Not implemented
- #endif //ZENLIB_USEWX
- #endif
-}
-
-std::string Ztring::To_Local () const
-{
- #ifdef _UNICODE
- #ifdef ZENLIB_USEWX
- wxCharBuffer C=wxConvCurrent->cWC2MB(c_str());
- if (C.data())
- return C.data();
- else
- return std::string();
- #else //ZENLIB_USEWX
- #ifdef WINDOWS
- int Size=WideCharToMultiByte(CP_ACP, 0, c_str(), -1, NULL, 0, NULL, NULL);
- if (Size!=0)
- {
- char* AnsiString=new char[Size+1];
- WideCharToMultiByte(CP_ACP, 0, c_str(), -1, AnsiString, Size, NULL, NULL);
- AnsiString[Size]='\0';
- std::string ToReturn(AnsiString);
- delete[] AnsiString; //AnsiString=NULL;
- return ToReturn;
- }
- else
- return std::string();
- #else //WINDOWS
- if (empty())
- return std::string();
-
- size_t Size=wcstombs(NULL, c_str(), 0);
- if (Size!=0 && Size!=(size_t)-1)
- {
- char* AnsiString=new char[Size+1];
- Size=wcstombs(AnsiString, c_str(), Size);
- if (Size!=0 && Size!=(size_t)-1)
- {
- AnsiString[Size]='\0';
- std::string ToReturn(AnsiString);
- delete[] AnsiString; //AnsiString=NULL;
- return ToReturn;
- }
-
- //Failed
- delete[] AnsiString; //AnsiString=NULL;
- }
-
- //Trying with bad chars
- char* Result=new char[MB_CUR_MAX];
- std::string AnsiString;
- for (size_t Pos=0; Pos<size(); Pos++)
- {
- int Result_Size=wctomb(Result, operator[](Pos));
- if (Result_Size>=0)
- AnsiString.append(Result, Result_Size);
- else
- AnsiString+='?';
- }
- delete[] Result; //Result=NULL;
- return AnsiString;
- #endif
- #endif //ZENLIB_USEWX
- #else
- return c_str();
- #endif
-}
-
-//---------------------------------------------------------------------------
-int128u Ztring::To_UUID () const
-{
- if (size()!=36)
- return 0;
-
- Ztring Temp=*this;
-
- for (size_t Pos=0; Pos<36; Pos++)
- {
- if ((Temp[Pos]< __T('0') || Temp[Pos]> __T('9'))
- && (Temp[Pos]< __T('A') || Temp[Pos]> __T('F'))
- && (Temp[Pos]< __T('a') || Temp[Pos]> __T('f')))
- return 0;
- if (Temp[Pos]>=__T('A') && Temp[Pos]<=__T('F'))
- {
- Temp[Pos]-=__T('A');
- Temp[Pos]+=__T('9')+1;
- }
- if (Temp[Pos]>=__T('a') && Temp[Pos]<=__T('f'))
- {
- Temp[Pos]-=__T('a');
- Temp[Pos]+=__T('9')+1;
- }
-
- switch(Pos)
- {
- case 7 :
- case 12 :
- case 17 :
- case 22 :
- if (at(Pos+1)!=__T('-'))
- return 0;
- Pos++; //Skipping dash in the test
- }
- }
-
- int128u I;
- I.hi=((int64u)((int8u)(Temp[ 0]-'0'))<<60)
- | ((int64u)((int8u)(Temp[ 1]-'0'))<<56)
- | ((int64u)((int8u)(Temp[ 2]-'0'))<<52)
- | ((int64u)((int8u)(Temp[ 3]-'0'))<<48)
- | ((int64u)((int8u)(Temp[ 4]-'0'))<<44)
- | ((int64u)((int8u)(Temp[ 5]-'0'))<<40)
- | ((int64u)((int8u)(Temp[ 6]-'0'))<<36)
- | ((int64u)((int8u)(Temp[ 7]-'0'))<<32)
- | ((int64u)((int8u)(Temp[ 9]-'0'))<<28)
- | ((int64u)((int8u)(Temp[10]-'0'))<<24)
- | ((int64u)((int8u)(Temp[11]-'0'))<<20)
- | ((int64u)((int8u)(Temp[12]-'0'))<<16)
- | ((int64u)((int8u)(Temp[14]-'0'))<<12)
- | ((int64u)((int8u)(Temp[15]-'0'))<< 8)
- | ((int64u)((int8u)(Temp[16]-'0'))<< 4)
- | ((int64u)((int8u)(Temp[17]-'0')) );
- I.lo=((int64u)((int8u)(Temp[19]-'0'))<<60)
- | ((int64u)((int8u)(Temp[20]-'0'))<<56)
- | ((int64u)((int8u)(Temp[21]-'0'))<<52)
- | ((int64u)((int8u)(Temp[22]-'0'))<<48)
- | ((int64u)((int8u)(Temp[24]-'0'))<<44)
- | ((int64u)((int8u)(Temp[25]-'0'))<<40)
- | ((int64u)((int8u)(Temp[26]-'0'))<<36)
- | ((int64u)((int8u)(Temp[27]-'0'))<<32)
- | ((int64u)((int8u)(Temp[28]-'0'))<<28)
- | ((int64u)((int8u)(Temp[29]-'0'))<<24)
- | ((int64u)((int8u)(Temp[30]-'0'))<<20)
- | ((int64u)((int8u)(Temp[31]-'0'))<<16)
- | ((int64u)((int8u)(Temp[32]-'0'))<<12)
- | ((int64u)((int8u)(Temp[33]-'0'))<< 8)
- | ((int64u)((int8u)(Temp[34]-'0'))<< 4)
- | ((int64u)((int8u)(Temp[35]-'0')) );
-
- return I;
-}
-
-//---------------------------------------------------------------------------
-int32u Ztring::To_CC4 () const
-{
- int32u I;
- I =((int32u)((int8u)at(0))<<24)
- | ((int32u)((int8u)at(1))<<16)
- | ((int32u)((int8u)at(2))<< 8)
- | ((int32u)((int8u)at(3)) );
-
- return I;
-}
-
-//---------------------------------------------------------------------------
-//Operateur ToInt
-int8s Ztring::To_int8s (int8u Radix, ztring_t Options) const
-{
- //Integrity
- if (empty())
- return 0;
-
- //Conversion
- int I;
- #if defined(STREAM_MISSING)
- #ifdef __MINGW32__
- I=_ttoi(c_str());
- #elif defined(UNICODE)
- std::string S=To_UTF8();
- I=atoi(S.c_str());
- #else //UNICODE
- I=atoi(c_str());
- #endif //UNICODE
- #else
- tStringStream Stream(*this);
- Stream >> setbase(Radix) >> I;
- if (Stream.fail())
- return 0;
- #endif
-
- //Rounded
- if (Options==Ztring_Rounded && find(__T("."))!=Error)
- {
- float80 F=To_float80();
- F-=I;
- if (F>=0.5)
- return (int8s)I+1;
- }
-
- return (int8s)I;
-}
-
-//---------------------------------------------------------------------------
-//Operateur ToInt
-int8u Ztring::To_int8u (int8u Radix, ztring_t Options) const
-{
- //Integrity
- if (empty())
- return 0;
-
- //Conversion
- unsigned int I;
- #if defined(STREAM_MISSING)
- #ifdef __MINGW32__
- I=_ttoi64(c_str()); //TODO : I>0x7FFFFFFF - Replaced by i64 version to support, but not good
- #elif defined(UNICODE)
- std::string S=To_UTF8();
- I=atoi(S.c_str());
- #else //defined(UNICODE)
- I=atoi(c_str());
- #endif //defined(UNICODE)
- #else
- tStringStream Stream(*this);
- Stream >> setbase(Radix) >> I;
- if (Stream.fail())
- return 0;
- #endif
-
- //Rounded
- if (Options==Ztring_Rounded && find(__T("."))!=std::string::npos)
- {
- float32 F=To_float32();
- F-=I;
- if (F>=0.5)
- return (int8u)I+1;
- }
-
- return (int8u)I;
-}
-
-//---------------------------------------------------------------------------
-//Operateur ToInt
-int16s Ztring::To_int16s (int8u Radix, ztring_t Options) const
-{
- //Integrity
- if (empty())
- return 0;
-
- //Conversion
- int I;
- #if defined(STREAM_MISSING)
- #ifdef __MINGW32__
- I=_ttoi(c_str());
- #elif defined(UNICODE)
- std::string S=To_UTF8();
- I=atoi(S.c_str());
- #else //defined(UNICODE)
- I=atoi(c_str());
- #endif //defined(UNICODE)
- #else
- tStringStream Stream(*this);
- Stream >> setbase(Radix) >> I;
- if (Stream.fail())
- return 0;
- #endif
-
- //Rounded
- if (Options==Ztring_Rounded && find(__T("."))!=Error)
- {
- float80 F=To_float80();
- F-=I;
- if (F>=0.5)
- return (int16s)I+1;
- }
-
- return (int16s)I;
-}
-
-//---------------------------------------------------------------------------
-//Operateur ToInt
-int16u Ztring::To_int16u (int8u Radix, ztring_t Options) const
-{
- //Integrity
- if (empty())
- return 0;
-
- //Conversion
- unsigned int I;
- #if defined(STREAM_MISSING)
- #ifdef __MINGW32__
- I=_ttoi64(c_str()); //TODO : I>0x7FFFFFFF - Replaced by i64 version to support, but not good
- #elif defined(UNICODE)
- std::string S=To_UTF8();
- I=atoi(S.c_str());
- #else //defined(UNICODE)
- I=atoi(c_str());
- #endif //defined(UNICODE)
- #else
- tStringStream Stream(*this);
- Stream >> setbase(Radix) >> I;
- if (Stream.fail())
- return 0;
- #endif
-
- //Rounded
- if (Options==Ztring_Rounded && find(__T("."))!=std::string::npos)
- {
- float32 F=To_float32();
- F-=I;
- if (F>=0.5)
- return (int16u)I+1;
- }
-
- return (int16u)I;
-}
-
-//---------------------------------------------------------------------------
-//Operateur ToInt
-int32s Ztring::To_int32s (int8u Radix, ztring_t Options) const
-{
- //Integrity
- if (empty())
- return 0;
-
- //Conversion
- int32s I;
- #if defined(STREAM_MISSING)
- #ifdef __MINGW32__
- I=_ttoi(c_str());
- #elif defined(UNICODE)
- std::string S=To_UTF8();
- I=atol(S.c_str());
- #else //defined(UNICODE)
- I=atol(c_str());
- #endif //defined(UNICODE)
- #else
- tStringStream Stream(*this);
- Stream >> setbase(Radix) >> I;
- if (Stream.fail())
- return 0;
- #endif
-
- //Rounded
- if (Options==Ztring_Rounded && find(__T("."))!=Error)
- {
- float80 F=To_float80();
- F-=I;
- if (F>=0.5)
- return I+1;
- }
-
- return I;
-}
-
-//---------------------------------------------------------------------------
-//Operateur ToInt
-int32u Ztring::To_int32u (int8u Radix, ztring_t Options) const
-{
- //Integrity
- if (empty())
- return 0;
-
- //Conversion
- int32u I;
- #if defined(STREAM_MISSING)
- #ifdef __MINGW32__
- I=_ttoi64(c_str()); //TODO : I>0x7FFFFFFF - Replaced by i64 version to support, but not good
- #elif defined(UNICODE)
- std::string S=To_UTF8();
- I=atol(S.c_str());
- #else //defined(UNICODE)
- I=atol(c_str());
- #endif //defined(UNICODE)
- #else
- tStringStream Stream(*this);
- Stream >> setbase(Radix) >> I;
- if (Stream.fail())
- return 0;
- #endif
-
- //Rounded
- if (Options==Ztring_Rounded && find(__T("."))!=std::string::npos)
- {
- float32 F=To_float32();
- F-=I;
- if (F>=0.5)
- return I+1;
- }
-
- return I;
-}
-
-//---------------------------------------------------------------------------
-//Operateur ToInt
-int64s Ztring::To_int64s (int8u Radix, ztring_t Options) const
-{
- //Integrity
- if (empty())
- return 0;
-
- //Conversion
- int64s I;
- #if defined(STREAM_MISSING)
- #ifdef __MINGW32__
- I=_ttoi64(c_str());
- #elif defined(UNICODE)
- std::string S=To_UTF8();
- I=atoll(S.c_str());
- #else //defined(UNICODE)
- I=atoll(c_str());
- #endif //defined(UNICODE)
- #else
- tStringStream Stream(*this);
- Stream >> setbase(Radix) >> I;
- if (Stream.fail())
- return 0;
- #endif
-
- //Rounded
- if (Options==Ztring_Rounded && find(__T("."))!=std::string::npos)
- {
- float32 F=To_float32();
- F-=I;
- if (F>0.5)
- return I+1;
- }
-
- return I;
-}
-
-//---------------------------------------------------------------------------
-//Operateur ToInt
-int64u Ztring::To_int64u (int8u Radix, ztring_t Options) const
-{
- //Integrity
- if (empty())
- return 0;
-
- //Conversion
- int64u I;
- #if defined(STREAM_MISSING)
- #ifdef __MINGW32__
- I=_ttoi64(c_str()); //TODO : I>0x7FFFFFFFFFFFFFFF
- #elif defined(UNICODE)
- std::string S=To_UTF8();
- I=atoll(S.c_str());
- #else //defined(UNICODE)
- I=atoll(c_str());
- #endif //defined(UNICODE)
- #else
- tStringStream Stream(*this);
- Stream >> setbase(Radix) >> I;
- if (Stream.fail())
- return 0;
- #endif
-
- //Rounded
- if (Options==Ztring_Rounded && find(__T("."))!=std::string::npos)
- {
- float32 F=To_float32();
- F-=I;
- if (F>=0.5)
- return I+1;
- }
-
- return I;
-}
-
-//---------------------------------------------------------------------------
-int128u Ztring::To_int128u (int8u, ztring_t) const
-{
- if (size()!=32)
- return 0;
-
- Ztring Temp=*this;
-
- for (size_t Pos=0; Pos<32; Pos++)
- {
- if ((Temp[Pos]< __T('0') || Temp[Pos]> __T('9'))
- && (Temp[Pos]< __T('A') || Temp[Pos]> __T('F'))
- && (Temp[Pos]< __T('a') || Temp[Pos]> __T('f')))
- return 0;
- if (Temp[Pos]>=__T('A') && Temp[Pos]<=__T('F'))
- {
- Temp[Pos]-=__T('A');
- Temp[Pos]+=__T('9')+1;
- }
- if (Temp[Pos]>=__T('a') && Temp[Pos]<=__T('f'))
- {
- Temp[Pos]-=__T('a');
- Temp[Pos]+=__T('9')+1;
- }
- }
-
- int128u I;
- I.hi=((int64u)((int8u)(Temp[ 0]-'0'))<<60)
- | ((int64u)((int8u)(Temp[ 1]-'0'))<<56)
- | ((int64u)((int8u)(Temp[ 2]-'0'))<<52)
- | ((int64u)((int8u)(Temp[ 3]-'0'))<<48)
- | ((int64u)((int8u)(Temp[ 4]-'0'))<<44)
- | ((int64u)((int8u)(Temp[ 5]-'0'))<<40)
- | ((int64u)((int8u)(Temp[ 6]-'0'))<<36)
- | ((int64u)((int8u)(Temp[ 7]-'0'))<<32)
- | ((int64u)((int8u)(Temp[ 8]-'0'))<<28)
- | ((int64u)((int8u)(Temp[ 9]-'0'))<<24)
- | ((int64u)((int8u)(Temp[10]-'0'))<<20)
- | ((int64u)((int8u)(Temp[11]-'0'))<<16)
- | ((int64u)((int8u)(Temp[12]-'0'))<<12)
- | ((int64u)((int8u)(Temp[13]-'0'))<< 8)
- | ((int64u)((int8u)(Temp[14]-'0'))<< 4)
- | ((int64u)((int8u)(Temp[15]-'0')) );
- I.lo=((int64u)((int8u)(Temp[16]-'0'))<<60)
- | ((int64u)((int8u)(Temp[17]-'0'))<<56)
- | ((int64u)((int8u)(Temp[18]-'0'))<<52)
- | ((int64u)((int8u)(Temp[19]-'0'))<<48)
- | ((int64u)((int8u)(Temp[20]-'0'))<<44)
- | ((int64u)((int8u)(Temp[21]-'0'))<<40)
- | ((int64u)((int8u)(Temp[22]-'0'))<<36)
- | ((int64u)((int8u)(Temp[23]-'0'))<<32)
- | ((int64u)((int8u)(Temp[24]-'0'))<<28)
- | ((int64u)((int8u)(Temp[25]-'0'))<<24)
- | ((int64u)((int8u)(Temp[26]-'0'))<<20)
- | ((int64u)((int8u)(Temp[27]-'0'))<<16)
- | ((int64u)((int8u)(Temp[28]-'0'))<<12)
- | ((int64u)((int8u)(Temp[29]-'0'))<< 8)
- | ((int64u)((int8u)(Temp[30]-'0'))<< 4)
- | ((int64u)((int8u)(Temp[31]-'0')) );
-
- return I;
-}
-
-//---------------------------------------------------------------------------
-//Operateur ToFloat
-float32 Ztring::To_float32(ztring_t) const
-{
- //Integrity
- if (empty())
- return 0;
-
- //Conversion
- #if defined(STREAM_MISSING)
- #ifdef UNICODE
- return (wcstod(c_str(),NULL));
- #else
- return (strtod(c_str(),NULL));
- #endif
- #else
- float32 F;
- tStringStream Stream(*this);
- Stream >> F;
- if (Stream.fail())
- return 0;
-
- return F;
- #endif
-}
-
-//---------------------------------------------------------------------------
-//Operateur ToFloat
-float64 Ztring::To_float64(ztring_t) const
-{
- //Integrity
- if (empty())
- return 0;
-
- //Conversion
- #if defined(STREAM_MISSING)
- #ifdef UNICODE
- return (wcstod(c_str(),NULL)); //TODO verify no wcstold
- #else
- return (strtod(c_str(),NULL)); //TODO verify no strtold
- #endif
- #else
- float64 F;
- tStringStream Stream(*this);
- Stream >> F;
- if (Stream.fail())
- return 0;
-
- return F;
- #endif
-}
-
-//---------------------------------------------------------------------------
-//Operateur ToFloat
-float80 Ztring::To_float80(ztring_t) const
-{
- //Integrity
- if (empty())
- return 0;
-
- //Conversion
- #if defined(STREAM_MISSING)
- #ifdef UNICODE
- return (wcstod(c_str(),NULL)); //TODO verify no wcstold
- #else
- return (strtod(c_str(),NULL)); //TODO verify no strtold
- #endif
- #else
- float80 F;
- tStringStream Stream(*this);
- Stream >> F;
- if (Stream.fail())
- return 0;
-
- return F;
- #endif
-}
-
-//***************************************************************************
-// Edition
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Retourne une partie de la chaine
-Ztring Ztring::SubString (const tstring &Begin, const tstring &End, size_type Pos, ztring_t Options) const
-{
- //Recherche Debut
- size_type I_Debut=find(Begin, Pos);
- if (I_Debut==Error)
- return Ztring();
- I_Debut+=Begin.size();
-
- //gestion fin NULL
- if (End.empty())
- return substr(I_Debut);
-
- //Recherche Fin
- size_type I_Fin=find(End, I_Debut);
- if (I_Fin==Error)
- {
- if (Options & Ztring_AddLastItem)
- return substr(I_Debut);
- else
- return Ztring();
- }
-
- return substr(I_Debut, I_Fin-I_Debut);
-}
-
-//---------------------------------------------------------------------------
-//FindAndReplace
-Ztring::size_type Ztring::FindAndReplace (const ZenLib::tstring &ToFind, const ZenLib::tstring &ReplaceBy, size_type Pos, ZenLib::ztring_t Options)
-{
- if (ToFind.empty())
- return 0;
-
- size_type Count=0;
- size_type Middle=Pos;
- while (!(Count==1 && !(Options&Ztring_Recursive)) && (Middle=find(ToFind, Middle))!=npos)
- {
- replace(Middle, ToFind.length(), ReplaceBy);
- Middle += ReplaceBy.length();
- Count++;
- }
-
- return Count;
-}
-
-//---------------------------------------------------------------------------
-//test if it is a number
-bool Ztring::IsNumber() const
-{
- if (empty())
- return false;
-
- bool OK=true;
- size_t Size=size();
- for (size_t Pos=0; Pos<Size; Pos++)
- if (operator[](Pos)<__T('0') || operator[](Pos)>__T('9'))
- {
- OK=false;
- break;
- }
- return OK;
-}
-
-//---------------------------------------------------------------------------
-//Mise en minuscules
-Ztring &Ztring::MakeLowerCase()
-{
- transform(begin(), end(), begin(), (int(*)(int))tolower); //(int(*)(int)) is a patch for unix
- return *this;
-}
-
-//---------------------------------------------------------------------------
-// Mise en majuscules
-Ztring &Ztring::MakeUpperCase()
-{
- transform(begin(), end(), begin(), (int(*)(int))toupper); //(int(*)(int)) is a patch for unix
- return *this;
-}
-
-//---------------------------------------------------------------------------
-// Remove leading whitespaces from a string
-Ztring &Ztring::TrimLeft(Char ToTrim)
-{
- size_type First=0;
- while (First<size() && operator[](First)==ToTrim)
- First++;
- assign (c_str()+First);
- return *this;
-}
-
-//---------------------------------------------------------------------------
-// Remove trailing whitespaces from a string
-Ztring &Ztring::TrimRight(Char ToTrim)
-{
- if (size()==0)
- return *this;
-
- size_type Last=size()-1;
- while (Last!=(size_type)-1 && operator[](Last)==ToTrim)
- Last--;
- assign (c_str(), Last+1);
- return *this;
-}
-
-//---------------------------------------------------------------------------
-// Remove leading and trailing whitespaces from a string
-Ztring &Ztring::Trim(Char ToTrim)
-{
- TrimLeft(ToTrim);
- TrimRight(ToTrim);
- return *this;
-}
-
-//---------------------------------------------------------------------------
-// Quotes a string
-Ztring &Ztring::Quote(Char ToTrim)
-{
- assign(tstring(1, ToTrim)+c_str()+ToTrim);
- return *this;
-}
-
-//***************************************************************************
-// Information
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//Count
-Ztring::size_type Ztring::Count (const Ztring &ToCount, ztring_t) const
-{
- size_type Count=0;
- for (size_type Pos=0; Pos<=size(); Pos++)
- if (find(ToCount, Pos)!=npos)
- {
- Count++;
- Pos+=ToCount.size()-1; //-1 because the loop will add 1
- }
- return Count;
-}
-
-//---------------------------------------------------------------------------
-//Compare
-bool Ztring::Compare (const Ztring &ToCompare, const Ztring &Comparator, ztring_t Options) const
-{
- //Integers management
- if (IsNumber() && ToCompare.IsNumber())
- {
- int64s Left=To_int64s();
- int64s Right=ToCompare.To_int64s();
- if (Comparator==__T("==")) return (Left==Right);
- if (Comparator==__T("<")) return (Left< Right);
- if (Comparator==__T("<=")) return (Left<=Right);
- if (Comparator==__T(">=")) return (Left>=Right);
- if (Comparator==__T(">")) return (Left> Right);
- if (Comparator==__T("!=")) return (Left!=Right);
- if (Comparator==__T("<>")) return (Left!=Right);
- return false;
- }
-
- //Case sensitive option
- if (!(Options & Ztring_CaseSensitive))
- {
- //Need to copy strings and make it lowercase
- Ztring Left (c_str());
- Ztring Right (ToCompare.c_str());
- Left.MakeLowerCase();
- Right.MakeLowerCase();
-
- //string comparasion
- if (Comparator==__T("==")) return (Left==Right);
- if (Comparator==__T("IN")) {if (Left.find(Right)!=string::npos) return true; else return false;}
- if (Comparator==__T("<")) return (Left< Right);
- if (Comparator==__T("<=")) return (Left<=Right);
- if (Comparator==__T(">=")) return (Left>=Right);
- if (Comparator==__T(">")) return (Left> Right);
- if (Comparator==__T("!=")) return (Left!=Right);
- if (Comparator==__T("<>")) return (Left!=Right);
- return false;
- }
- else
- {
- //string comparasion
- if (Comparator==__T("==")) return (*this==ToCompare);
- if (Comparator==__T("IN")) {if (this->find(ToCompare)!=string::npos) return true; else return false;}
- if (Comparator==__T("<")) return (*this< ToCompare);
- if (Comparator==__T("<=")) return (*this<=ToCompare);
- if (Comparator==__T(">=")) return (*this>=ToCompare);
- if (Comparator==__T(">")) return (*this> ToCompare);
- if (Comparator==__T("!=")) return (*this!=ToCompare);
- if (Comparator==__T("<>")) return (*this!=ToCompare);
- return false;
- }
-}
-
-} //namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/Ztring.h b/src/thirdparty/ZenLib/ZenLib/Ztring.h
deleted file mode 100644
index ea16d9af1..000000000
--- a/src/thirdparty/ZenLib/ZenLib/Ztring.h
+++ /dev/null
@@ -1,369 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// More methods for std::(w)string
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_ZtringH
-#define ZenLib_ZtringH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Utils.h"
-#include <string>
-#include <sstream>
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//---------------------------------------------------------------------------
-typedef std::basic_string<Char, std::char_traits<Char>, std::allocator<Char> > tstring;
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-/// @brief Options for Ztring methods
-enum ztring_t
-{
- Ztring_Nothing,
- Ztring_Rounded = 1, ///< if >.5, upper, else lower
- Ztring_CaseSensitive = 2, ///< Case sensitive ("A" and "a" are different)
- Ztring_AddLastItem = 4, ///< if Begin is found and End is not found, return between Begin and end of string
- Ztring_Recursive = 8, ///< Do all strings
- Ztring_NoZero = 16 ///> Doesn't keep Zero in the float number
-};
-
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-/// @brief String manipulation (based on std::(w)string)
-//***************************************************************************
-
-class Ztring : public tstring //for details about undocumented methods see http://www.sgi.com/tech/stl/basic_string.html
-{
-public :
- //Constructor/destructor
- Ztring () : tstring(){};
- Ztring (const tstring& str) : tstring(str){};
- Ztring (const tstring& str, size_type pos, size_type n=npos) : tstring(str, pos, n){};
- Ztring (const Char* s, size_type n) : tstring(s, n){};
- Ztring (const Char* s) : tstring(s){};
- Ztring (size_type n, Char c) : tstring(n, c){};
- #ifdef UNICODE
- Ztring (const char* S) : tstring(){From_UTF8(S);};
- Ztring (const char* S, size_type n) : tstring(){From_UTF8(S, 0, n);};
- #endif //UNICODE
-
- //Operators
- ///Same as [], but resize the string if Pos doesn't exist yet
- Char &operator () (size_type Pos);
-
- //Assign
- bool Assign_FromFile (const Ztring &FileName);
-
- //Conversions - From
- #ifndef WSTRING_MISSING
- /// @brief convert an Unicode encoded string into Ztring
- Ztring& From_Unicode (const std::wstring &S) {return From_Unicode(S.c_str());};
- #endif //WSTRING_MISSING
- /// @brief convert an Unicode encoded wchar_t into Ztring
- Ztring& From_Unicode (const wchar_t S);
- /// @brief convert an Unicode encoded string into Ztring
- Ztring& From_Unicode (const wchar_t *S);
- /// @brief convert an Unicode encoded string into Ztring
- Ztring& From_Unicode (const wchar_t *S, size_type Start, size_type Length);
- /// @brief convert an Unicode encoded string into Ztring
- Ztring& From_Unicode (const wchar_t *S, size_type Length) {return From_Unicode(S, 0, Length);};
- /// @brief convert an UTF-8 encoded string into Ztring
- Ztring& From_UTF8 (const std::string &S) {return From_UTF8(S.c_str());};
- /// @brief convert an UTF-8 encoded string into Ztring
- Ztring& From_UTF8 (const char *S);
- /// @brief convert an UTF-8 encoded string into Ztring
- Ztring& From_UTF8 (const char *S, size_type Start, size_type Length);
- /// @brief convert an UTF-8 encoded string into Ztring
- Ztring& From_UTF8 (const char *S, size_type Length) {return From_UTF8(S, 0, Length);};
- /// @brief convert an UTF-16 encoded string into Ztring
- Ztring& From_UTF16 (const char *S);
- /// @brief convert an UTF-16 encoded string into Ztring
- Ztring& From_UTF16 (const char *S, size_type Start, size_type Length);
- /// @brief convert an UTF-16 encoded string into Ztring
- Ztring& From_UTF16 (const char *S, size_type Length) {return From_UTF16(S, 0, Length);};
- /// @brief convert an UTF-16BE encoded string into Ztring
- Ztring& From_UTF16BE (const char *S);
- /// @brief convert an UTF-16BE encoded string into Ztring
- Ztring& From_UTF16BE (const char *S, size_type Start, size_type Length);
- /// @brief convert an UTF-16BE encoded string into Ztring
- Ztring& From_UTF16BE (const char *S, size_type Length) {return From_UTF16BE(S, 0, Length);};
- /// @brief convert an UTF-16LE encoded string into Ztring
- Ztring& From_UTF16LE (const char *S);
- /// @brief convert an UTF-16LE encoded string into Ztring
- Ztring& From_UTF16LE (const char *S, size_type Start, size_type Length);
- /// @brief convert an UTF-16LE encoded string into Ztring
- Ztring& From_UTF16LE (const char *S, size_type Length) {return From_UTF16LE(S, 0, Length);};
- /// @brief convert an Locael encoded string into Ztring
- Ztring& From_Local (const std::string &S) {return From_Local(S.c_str());};
- /// @brief convert an Local encoded string into Ztring
- Ztring& From_Local (const char *S);
- /// @brief convert an Local encoded string into Ztring
- Ztring& From_Local (const char *S, size_type Start, size_type Length);
- /// @brief convert an Local encoded string into Ztring
- Ztring& From_Local (const char *S, size_type Length) {return From_Local(S, 0, Length);};
-
- /// @brief convert an ISO-8859-1 encoded string into Ztring
- Ztring& From_ISO_8859_1 (const char *S);
- /// @brief convert an ISO-8859-1 encoded string into Ztring
- Ztring& From_ISO_8859_1 (const char *S, size_type Start, size_type Length);
- /// @brief convert an ISO-8859-1 encoded string into Ztring
- Ztring& From_ISO_8859_1 (const char *S, size_type Length) {return From_ISO_8859_1(S, 0, Length);};
-
- /// @brief convert an ISO-8859-2 encoded string into Ztring
- Ztring& From_ISO_8859_2 (const char *S);
- /// @brief convert an ISO-8859-1 encoded string into Ztring
- Ztring& From_ISO_8859_2 (const char *S, size_type Start, size_type Length);
- /// @brief convert an ISO-8859-1 encoded string into Ztring
- Ztring& From_ISO_8859_2 (const char *S, size_type Length) {return From_ISO_8859_2(S, 0, Length);};
-
- /// @brief convert an 16 byte GUID into Ztring
- Ztring& From_GUID (const int128u S);
- /// @brief convert an 16 byte UUID into Ztring
- Ztring& From_UUID (const int128u S);
- /// @brief convert an 4 Character Code into Ztring
- Ztring& From_CC4 (const char *S) {return From_Local(S, 0, 4);};
- /// @brief convert an 4 Character Code into Ztring
- Ztring& From_CC4 (const int8u *S) {return From_Local((const char*)S, 0, 4);};
- /// @brief convert an 4 Character Code into Ztring
- Ztring& From_CC4 (const int32u S);
- /// @brief convert an 2 Character Code into Ztring
- Ztring& From_CC3 (const char *S) {return From_Local(S, 0, 3);};
- /// @brief convert an 4 Character Code into Ztring
- Ztring& From_CC3 (const int8u *S) {return From_Local((const char*)S, 0, 3);};
- /// @brief convert an 4 Character Code into Ztring
- Ztring& From_CC3 (const int32u S);
- /// @brief convert an 2 Character Code into Ztring
- Ztring& From_CC2 (const char *S) {return From_CC2(ZenLib::CC2(S));};
- /// @brief convert an 2 Character Code into Ztring
- Ztring& From_CC2 (const int8u *S) {return From_CC2(ZenLib::CC2(S));};
- /// @brief convert an 2 Character Code into Ztring
- Ztring& From_CC2 (const int16u S);
- /// @brief convert an 1 Character Code into Ztring
- Ztring& From_CC1 (const char *S) {return From_CC1(ZenLib::CC1(S));};
- /// @brief convert an 1 Character Code into Ztring
- Ztring& From_CC1 (const int8u *S) {return From_CC1(ZenLib::CC1(S));};
- /// @brief convert an 1 Character Code into Ztring
- Ztring& From_CC1 (const int8u S);
- /// @brief convert number into Ztring
- Ztring& From_Number (const int8s, int8u Radix=10);
- /// @brief convert number into Ztring
- Ztring& From_Number (const int8u, int8u Radix=10);
- /// @brief convert number into Ztring
- Ztring& From_Number (const int16s, int8u Radix=10);
- /// @brief convert number into Ztring
- Ztring& From_Number (const int16u, int8u Radix=10);
- /// @brief convert number into Ztring
- Ztring& From_Number (const int32s, int8u Radix=10);
- /// @brief convert number into Ztring
- Ztring& From_Number (const int32u, int8u Radix=10);
- /// @brief convert number into Ztring
- Ztring& From_Number (const int64s, int8u Radix=10);
- /// @brief convert number into Ztring
- Ztring& From_Number (const int64u, int8u Radix=10);
- /// @brief convert number into Ztring
- Ztring& From_Number (const int128u, int8u Radix=10);
- /// @brief convert number into Ztring
- Ztring& From_Number (const float32, int8u AfterComma=3, ztring_t Options=Ztring_Nothing);
- /// @brief convert number into Ztring
- Ztring& From_Number (const float64, int8u AfterComma=3, ztring_t Options=Ztring_Nothing);
- /// @brief convert number into Ztring
- Ztring& From_Number (const float80, int8u AfterComma=3, ztring_t Options=Ztring_Nothing);
- #ifdef SIZE_T_IS_LONG
- /// @brief convert number into Ztring
- Ztring& From_Number (const size_t, int8u Radix=10);
- #endif //SIZE_T_IS_LONG
- /// @brief convert number (BCD coded) into Ztring
- Ztring& From_BCD (const int8u);
- /// @brief convert count of milliseconds into a readable and sortable string
- Ztring& Duration_From_Milliseconds (const int64s Milliseconds);
- /// @deprecated replaced by the int64s version
- Ztring& Duration_From_Milliseconds (const int64u Milliseconds);
- /// @brief convert count of seconds since 1601 into a readable and sortable string
- Ztring& Date_From_Milliseconds_1601 (const int64u Milliseconds);
- /// @brief convert count of seconds since 1601 into a readable and sortable string
- Ztring& Date_From_Seconds_1601 (const int64u Seconds);
- /// @brief convert count of seconds since 1900 into a readable and sortable string
- Ztring& Date_From_Seconds_1900 (const int32u Seconds);
- /// @brief convert count of seconds since 1900 into a readable and sortable string
- Ztring& Date_From_Seconds_1900 (const int64s Seconds);
- /// @brief convert count of seconds since 1904 into a readable and sortable string
- Ztring& Date_From_Seconds_1904 (const int32u Seconds);
- /// @brief convert count of seconds since 1904 into a readable and sortable string
- Ztring& Date_From_Seconds_1904 (const int64u Seconds);
- /// @brief convert count of seconds since 1904 into a readable and sortable string
- Ztring& Date_From_Seconds_1904 (const int64s Seconds);
- /// @brief convert count of seconds since 1970 into a readable and sortable string
- Ztring& Date_From_Seconds_1970 (const int32u Seconds);
- /// @brief convert count of seconds since 1970 into a readable and sortable string
- Ztring& Date_From_Seconds_1970 (const int32s Seconds);
- /// @brief convert count of seconds since 1970 into a readable and sortable string
- Ztring& Date_From_Seconds_1970 (const int64s Seconds);
- /// @brief convert count of seconds since 1970 into a readable and sortable string (in local time)
- Ztring& Date_From_Seconds_1970_Local (const int32u Seconds);
- /// @brief convert a free formated string into a readable and sortable string
- Ztring& Date_From_String (const char* Date, size_type Value_Size=Error);
- /// @brief convert numbers into a readable and sortable string
- Ztring& Date_From_Numbers (const int8u Year, const int8u Month, const int8u Day, const int8u Hour, const int8u Minute, const int8u Second);
-
- //Conversions - To
- #ifndef WSTRING_MISSING
- /// @brief Convert into Unicode chars
- /// @return the string corresponding \n
- std::wstring To_Unicode () const;
- #endif //WSTRING_MISSING
- /// @brief Convert into char* (UTF-8 encoded)
- /// @return the string corresponding \n
- std::string To_UTF8 () const;
- /// @brief Convert into char* (Local encoded)
- /// @return the string corresponding \n
- std::string To_Local () const;
- /// @brief Convert into 16 byte UUID number
- /// @return the value corresponding \n
- /// 0 if there is a problem
- int128u To_UUID () const;
- /// @brief Convert into a 4 Character Code
- /// @return the value corresponding \n
- /// 0 if there is a problem
- int32u To_CC4 () const;
- /// @brief Convert into Int (8 bits)
- /// @return the value corresponding \n
- /// 0 if there is a problem
- int8s To_int8s (int8u Radix=10, ztring_t Options=Ztring_Rounded) const;
- /// @brief Convert into unsigned Int (8 bits)
- /// @return the value corresponding
- /// 0 if there is a problem
- int8u To_int8u (int8u Radix=10, ztring_t Options=Ztring_Rounded) const;
- /// @brief Convert into Int (16 bits)
- /// @return the value corresponding \n
- /// 0 if there is a problem
- int16s To_int16s (int8u Radix=10, ztring_t Options=Ztring_Rounded) const;
- /// @brief Convert into unsigned Int (16 bits)
- /// @return the value corresponding
- /// 0 if there is a problem
- int16u To_int16u (int8u Radix=10, ztring_t Options=Ztring_Rounded) const;
- /// @brief Convert into Int (32 bits)
- /// @return the value corresponding \n
- /// 0 if there is a problem
- int32s To_int32s (int8u Radix=10, ztring_t Options=Ztring_Rounded) const;
- /// @brief Convert into unsigned Int (32 bits)
- /// @return the value corresponding
- /// 0 if there is a problem
- int32u To_int32u (int8u Radix=10, ztring_t Options=Ztring_Rounded) const;
- /// @brief Convert into Int (64 bits)
- /// @return the value corresponding \n
- /// 0 if there is a problem
- int64s To_int64s (int8u Radix=10, ztring_t Options=Ztring_Rounded) const;
- /// @brief Convert into unsigned Int (64 bits)
- /// @return the value corresponding \n
- /// 0 if there is a problem
- int64u To_int64u (int8u Radix=10, ztring_t Options=Ztring_Rounded) const;
- /// @brief Convert into unsigned Int (64 bits)
- /// @warning only hexadecimal and no rounding are currenlty supported \n
- /// @return the value corresponding \n
- /// 0 if there is a problem
- int128u To_int128u (int8u Radix=10, ztring_t Options=Ztring_Rounded) const;
- /// @brief Convert into float
- /// @return the value corresponding \n
- /// 0 if there is a problem
- float32 To_float32 (ztring_t Options=Ztring_Nothing) const;
- float64 To_float64 (ztring_t Options=Ztring_Nothing) const;
- float80 To_float80 (ztring_t Options=Ztring_Nothing) const;
-
- //Static versions
- static Ztring ToZtring_From_Local(const std::string &S) {return Ztring().From_Local(S);};
- static Ztring ToZtring_From_Local(const char *S) {return Ztring().From_Local(S);};
- static Ztring ToZtring_From_Local(const char *S, size_type Start, size_type Length) {return Ztring().From_Local(S, Start, Length);};
- static Ztring ToZtring_From_Local(const char *S, size_type Length) {return Ztring().From_Local(S, Length);};
- static Ztring ToZtring_From_CC4 (const char *S) {return Ztring().From_CC4(S);};
- static Ztring ToZtring_From_CC4 (const int8u *S) {return Ztring().From_CC4(S);};
- static Ztring ToZtring_From_CC4 (const int32u S) {return Ztring().From_CC4(S);};
- static Ztring ToZtring_From_CC3 (const char *S) {return Ztring().From_CC3(S);};
- static Ztring ToZtring_From_CC3 (const int8u *S) {return Ztring().From_CC3(S);};
- static Ztring ToZtring_From_CC3 (const int32u S) {return Ztring().From_CC3(S);};
- static Ztring ToZtring_From_CC2 (const char *S) {return Ztring().From_CC2(S);};
- static Ztring ToZtring_From_CC2 (const int8u *S) {return Ztring().From_CC2(S);};
- static Ztring ToZtring_From_CC2 (const int16u S) {return Ztring().From_CC2(S);};
- static Ztring ToZtring_From_CC1 (const char *S) {return Ztring().From_CC1(S);};
- static Ztring ToZtring_From_CC1 (const int8u *S) {return Ztring().From_CC1(S);};
- static Ztring ToZtring_From_CC1 (const int8u S) {return Ztring().From_CC1(S);};
- static Ztring ToZtring (const int8s I, int8u Radix=10) {return Ztring().From_Number(I, Radix);};
- static Ztring ToZtring (const int8u I, int8u Radix=10) {return Ztring().From_Number(I, Radix);};
- static Ztring ToZtring (const int16s I, int8u Radix=10) {return Ztring().From_Number(I, Radix);};
- static Ztring ToZtring (const int16u I, int8u Radix=10) {return Ztring().From_Number(I, Radix);};
- static Ztring ToZtring (const int32s I, int8u Radix=10) {return Ztring().From_Number(I, Radix);};
- static Ztring ToZtring (const int32u I, int8u Radix=10) {return Ztring().From_Number(I, Radix);};
- static Ztring ToZtring (const int64s I, int8u Radix=10) {return Ztring().From_Number(I, Radix);};
- static Ztring ToZtring (const int64u I, int8u Radix=10) {return Ztring().From_Number(I, Radix);};
- static Ztring ToZtring (const int128u I, int8u Radix=10) {return Ztring().From_Number(I, Radix);};
- static Ztring ToZtring (const float32 F, int8u AfterComma=3) {return Ztring().From_Number(F, AfterComma);};
- static Ztring ToZtring (const float64 F, int8u AfterComma=3) {return Ztring().From_Number(F, AfterComma);};
- static Ztring ToZtring (const float80 F, int8u AfterComma=3) {return Ztring().From_Number(F, AfterComma);};
- #ifdef SIZE_T_IS_LONG
- static Ztring ToZtring (const size_t I, int8u Radix=10) {return Ztring().From_Number(I, Radix);};
- #endif //SIZE_T_IS_LONG
-
- //Edition
- /// @brief test if it is a number
- bool IsNumber() const;
- /// @brief convert into lowercase
- Ztring &MakeLowerCase();
- /// @brief convert into uppercase
- Ztring &MakeUpperCase();
- /// @brief Remove leading whitespaces from a string
- Ztring &TrimLeft(Char ToTrim=__T(' '));
- /// @brief Remove trailing whitespaces from a string
- Ztring &TrimRight(Char ToTrim=__T(' '));
- /// @brief Remove leading and trailing whitespaces from a string
- Ztring &Trim(Char ToTrim=__T(' '));
- /// @brief Quotes a string
- Ztring &Quote(Char ToTrim=__T('\"'));
- /// @brief return a string between two strings
- /// @param Begin First string
- /// @param End Second string
- /// @param Pos Position to begin to scan string
- /// @param Options Options for searching \n
- /// Available : Ztring_CaseSensitive
- /// @return The substring \n
- /// "" if not found
- Ztring SubString (const tstring &Begin, const tstring &End, size_type Pos=0, ztring_t Options=Ztring_Nothing) const;
- /// @brief replace a string by another one
- /// @param ToFind string to find
- /// @param ToReplace string wich replace the string found
- /// @param Pos Position to begin to scan string
- /// @param Options Options for searching \n
- /// Available : Ztring_CaseSensitive, Ztring_Recursive
- /// @return The count of replacements
- size_type FindAndReplace (const tstring &ToFind, const tstring &ReplaceBy, size_type Pos=0, ztring_t Options=Ztring_Nothing); //Remplace une chaine par une autre
- /// @brief Count the number of occurencies of a string in the string
- /// @param ToCount string to count
- /// @param Options Options for count \n
- /// Available : Ztring_CaseSensitive
- /// @return the count
-
- //Information
- size_type Count (const Ztring &ToCount, ztring_t Options=Ztring_Nothing) const;
- /// @brief compare with another string
- /// @param ToCompare string to compare with
- /// @param Options Options for comaparing \n
- /// Available : Ztring_CaseSensitive
- /// @return The result of comparasion
- bool Compare (const Ztring &ToCompare, const Ztring &Comparator=__T("=="), ztring_t Options=Ztring_Nothing) const;
-};
-
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/ZtringList.cpp b/src/thirdparty/ZenLib/ZenLib/ZtringList.cpp
deleted file mode 100644
index 841fa8a55..000000000
--- a/src/thirdparty/ZenLib/ZenLib/ZtringList.cpp
+++ /dev/null
@@ -1,357 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include <algorithm>
-#include <functional>
-#include "ZenLib/ZtringList.h"
-using namespace std;
-#if defined(_MSC_VER) && _MSC_VER <= 1200
- using std::vector; //Visual C++ 6 patch
-#endif
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//---------------------------------------------------------------------------
-extern Ztring EmptyZtring;
-//---------------------------------------------------------------------------
-
-
-//***************************************************************************
-// Constructors/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Constructors
-ZtringList::ZtringList ()
-: std::vector<ZenLib::Ztring, std::allocator<ZenLib::Ztring> > ()
-{
- Separator[0]=__T(";");
- Quote=__T("\"");
- Max[0]=Error;
-}
-
-ZtringList::ZtringList(const ZtringList &Source)
-: std::vector<ZenLib::Ztring, std::allocator<ZenLib::Ztring> > ()
-{
- Separator[0]=Source.Separator[0];
- Quote=Source.Quote;
-
- reserve(Source.size());
- for (intu Pos=0; Pos<Source.size(); Pos++)
- push_back(Source[Pos]);
-}
-
-ZtringList::ZtringList (const Ztring &Source)
-{
- Separator[0]=__T(";");
- Quote=__T("\"");
- Max[0]=Error;
- Write(Source.c_str());
-}
-
-ZtringList::ZtringList (const Char *Source)
-{
- Separator[0]=__T(";");
- Quote=__T("\"");
- Max[0]=Error;
- Write(Source);
-}
-
-#ifdef _UNICODE
-ZtringList::ZtringList (const char* S)
-{
- Write(Ztring(S));
-}
-#endif
-
-//***************************************************************************
-// Operator
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Operator ==
-bool ZtringList::operator== (const ZtringList &Source) const
-{
- return (Read()==Source.Read());
-}
-
-//---------------------------------------------------------------------------
-// Operator !=
-bool ZtringList::operator!= (const ZtringList &Source) const
-{
- return (!(Read()==Source.Read()));
-}
-
-//---------------------------------------------------------------------------
-// Operator +=
-ZtringList &ZtringList::operator+= (const ZtringList &Source)
-{
- reserve(size()+Source.size());
- for (size_type Pos=0; Pos<Source.size(); Pos++)
- push_back(Source[Pos]);
-
- return *this;
-}
-
-//---------------------------------------------------------------------------
-// Operator =
-ZtringList &ZtringList::operator= (const ZtringList &Source)
-{
- clear();
- Ztring C=Separator[0];
- Ztring Q=Quote;
-
- Separator[0]=Source.Separator[0];
- Quote=Source.Quote;
- reserve(Source.size());
- for (size_type Pos=0; Pos<Source.size(); Pos++)
- push_back(Source[Pos]);
-
- Separator[0]=C;
- Quote=Q;
-
- return *this;
-}
-
-//---------------------------------------------------------------------------
-// Operator ()
-Ztring &ZtringList::operator() (size_type Pos)
-{
- if (Pos>=size())
- Write(Ztring(), Pos);
-
- return operator[](Pos);
-}
-
-//***************************************************************************
-// In/Out
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Read
-Ztring ZtringList::Read () const
-{
- //Integrity
- if (size()==0)
- return Ztring();
-
- Ztring Retour;
- Ztring ToFind=Separator[0]+Quote[0]+__T("\r\n");
- for (size_type Pos=0; Pos<size(); Pos++)
- {
- if (operator[](Pos).find_first_of(ToFind)==std::string::npos)
- Retour+=operator[](Pos)+Separator[0];
- else if (operator[](Pos).find(Separator[0])==std::string::npos
- && operator[](Pos).find(Quote)==std::string::npos
- && operator[](Pos).find('\r')==std::string::npos
- && operator[](Pos).find('\n')==std::string::npos)
- Retour+=operator[](Pos)+Separator[0];
- else
- {
- if (operator[](Pos).find(Quote)==std::string::npos)
- Retour+=Quote+operator[](Pos)+Quote+Separator[0];
- else
- {
- Ztring Value=operator[](Pos);
- Value.FindAndReplace(Quote, Quote+Quote, 0, Ztring_Recursive);
- Retour+=Quote+Value+Quote+Separator[0];
- }
- }
- }
-
- //delete all useless separators at the end
- //while (Retour.find(Separator[0].c_str(), Retour.size()-Separator[0].size())!=std::string::npos)
- if (Retour.find(Separator[0].c_str(), Retour.size()-Separator[0].size())!=std::string::npos)
- Retour.resize(Retour.size()-Separator[0].size());
-
- return Retour;
-}
-
-const Ztring &ZtringList::Read (size_type Pos) const
-{
- //Integrity
- if (Pos>=size())
- return EmptyZtring;
-
- return operator[](Pos);
-}
-
-//---------------------------------------------------------------------------
-// Write
-void ZtringList::Write(const Ztring &ToWrite)
-{
- clear();
-
- if (ToWrite.empty())
- return;
-
- size_type PosC=0;
- bool Fini=false;
- Ztring C1;
-
- Ztring DelimiterL;
- Ztring DelimiterR;
- do
- {
- //Searching quotes
- if (ToWrite[PosC]==Quote[0])
- {
- size_t Pos_End=PosC+1;
- while (Pos_End<ToWrite.size())
- {
- if (ToWrite[Pos_End]==Quote[0] && Pos_End+1<ToWrite.size() && ToWrite[Pos_End+1]==Quote[0])
- Pos_End+=2; //Double quote, skipping
- else
- {
- if (ToWrite[Pos_End]==Quote[0])
- break;
- Pos_End++;
- }
- }
- C1=ToWrite.substr(PosC+Quote.size(), Pos_End-PosC);
- PosC+=C1.size()+Quote.size();
- if (C1.size()>0 && C1[C1.size()-1]==Quote[0])
- {
- C1.resize(C1.size()-1);
- PosC+=Quote.size();
- }
- }
- else //Normal
- {
- C1=ToWrite.SubString(tstring(), Separator[0], PosC, Ztring_AddLastItem);
- PosC+=C1.size()+Separator[0].size();
- }
- C1.FindAndReplace(Quote+Quote, Quote, 0, Ztring_Recursive);
- if (size()<Max[0])
- push_back(C1);
- if (PosC>=ToWrite.size())
- Fini=true;
- }
- while (!Fini);
-
- return;
-}
-
-void ZtringList::Write(const Ztring &ToWrite, size_type Pos)
-{
- if (Pos==Error)
- return;
- if (Pos>=size())
- {
- //Resource reservation
- size_t ToReserve=1;
- while (ToReserve<Pos)
- ToReserve*=2;
- reserve(ToReserve);
-
- while (Pos>size())
- push_back(Ztring());
- push_back(ToWrite);
- }
- else
- operator[](Pos)=ToWrite;
-
- return;
-}
-
-//***************************************************************************
-// Edition
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Swap
-void ZtringList::Swap (size_type Pos0_A, size_type Pos0_B)
-{
- //Integrity
- size_type Pos_Max;
- if (Pos0_A<Pos0_B)
- Pos_Max=Pos0_B;
- else
- Pos_Max=Pos0_A;
- if (Pos_Max>=size())
- Write(Ztring(), Pos_Max);
-
- operator [] (Pos0_A).swap(operator [] (Pos0_B));
-}
-
-//---------------------------------------------------------------------------
-// Sort
-void ZtringList::Sort(ztring_t)
-{
- std::stable_sort(begin(), end());
- return;
-}
-
-//***************************************************************************
-// Information
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Find
-Ztring::size_type ZtringList::Find (const Ztring &ToFind, size_type Pos, const Ztring &Comparator, ztring_t Options) const
-{
- while (Pos<size() && !(operator[](Pos).Compare(ToFind, Comparator, Options)))
- Pos++;
- if (Pos>=size())
- return Error;
- return Pos;
-}
-
-//---------------------------------------------------------------------------
-// Return the length of the longest string in the list.
-Ztring::size_type ZtringList::MaxStringLength_Get ()
-{
- size_type Max = 0;
- for (ZtringList::const_iterator it=begin(); it!=end(); ++it)
- if (it->size()>Max)
- Max=it->size();
- return Max;
-}
-
-//***************************************************************************
-// Configuration
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Separator
-void ZtringList::Separator_Set (size_type Level, const Ztring &NewSeparator)
-{
- if (Level>0)
- return;
- Separator[Level]=NewSeparator;
-}
-
-//---------------------------------------------------------------------------
-// Quote
-void ZtringList::Quote_Set (const Ztring &NewQuote)
-{
- Quote=NewQuote;
-}
-
-//---------------------------------------------------------------------------
-// Separator
-void ZtringList::Max_Set (size_type Level, size_type Max_New)
-{
- if (Level>0 || Max_New==0)
- return;
- Max[Level]=Max_New;
-}
-
-} //namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/ZtringList.h b/src/thirdparty/ZenLib/ZenLib/ZtringList.h
deleted file mode 100644
index f57eee429..000000000
--- a/src/thirdparty/ZenLib/ZenLib/ZtringList.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// More methods for std::vector<std::(w)string>
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_ZtringListH
-#define ZenLib_ZtringListH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Ztring.h"
-#include <vector>
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-/// @brief Vector of strings manipulation (based on std::vector<std::(w)string>)
-//***************************************************************************
-
-class ZtringList : public std::vector<Ztring>
-{
-public :
- //Constructors/destructor
- ZtringList ();
- ZtringList (const ZtringList &Source);
- ZtringList (const Ztring &Source);
- ZtringList (const Char *Source);
- #ifdef _UNICODE
- ZtringList (const char *Source); //convert a UTF-8 string into Unicode
- #endif
-
- //Operators
- bool operator == (const ZtringList &Source) const;
- bool operator != (const ZtringList &Source) const;
- ZtringList &operator += (const ZtringList &Source);
- ZtringList &operator = (const ZtringList &Source);
-
- Ztring &operator () (size_type Pos); ///< Same as [], but write a empty string if Pos doesn't exist yet
-
- //In/out
- Ztring Read () const; /// Read all
- const Ztring &Read (size_type Pos) const; /// Read a string
- void Write (const Ztring &ToWrite); /// Write all
- void Write (const Ztring &ToWrite, size_type Pos); /// Write a string
- /// @brief Insert a string at position Pos0
- void Insert (const Ztring &ToInsert, size_type Pos0) {insert(begin()+Pos0, ToInsert);};
- /// @brief Delete a string at position Pos0
- void Delete (size_type Pos0) {erase(begin()+Pos0);};
-
- //Edition
- /// @brief Swap 2 positions
- void Swap (size_type Pos0_A, size_type Pos0_B);
- /// @brief Sort
- void Sort (ztring_t Options=Ztring_Nothing);
-
- //Information
- /// @brief Find the position of the string in the vector
- size_type Find (const Ztring &ToFind, size_type PosBegin=0, const Ztring &Comparator=__T("=="), ztring_t Options=Ztring_Nothing) const;
- /// @brief Return the length of the longest string in the list.
- size_type MaxStringLength_Get ();
-
- //Configuration
- /// @brief Set the Separator character
- void Separator_Set (size_type Level, const Ztring &NewSeparator);
- /// @brief Set the Quote character
- /// During Read() or Write() method, if Separator is in the sequence, we must quote it
- void Quote_Set (const Ztring &NewQuote);
- /// @brief Set the Maximum number of element to read
- /// During Read() or Write() method, if there is more elements, merge them with the last element
- void Max_Set (size_type Level, size_type Max_New);
-
-protected :
- Ztring Separator[1];
- Ztring Quote;
- size_type Max[1];
-};
-
-} //namespace
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/ZtringListList.cpp b/src/thirdparty/ZenLib/ZenLib/ZtringListList.cpp
deleted file mode 100644
index 49518fa70..000000000
--- a/src/thirdparty/ZenLib/ZenLib/ZtringListList.cpp
+++ /dev/null
@@ -1,582 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include <algorithm>
-#include "ZenLib/ZtringListList.h"
-using namespace std;
-#if defined(_MSC_VER) && _MSC_VER <= 1200
- using std::vector; //Visual C++ 6 patch
-#endif
-//---------------------------------------------------------------------------
-
-
-namespace ZenLib
-{
-
-//---------------------------------------------------------------------------
-extern Ztring EmptyZtring;
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Constructors/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Constructors
-ZtringListList::ZtringListList()
-: std::vector<ZenLib::ZtringList, std::allocator<ZenLib::ZtringList> > ()
-{
- Separator[0]=EOL;
- Separator[1]=__T(";");
- Quote=__T("\"");
- Max[0]=Error;
- Max[1]=Error;
-}
-
-ZtringListList::ZtringListList(const ZtringListList &Source)
-: std::vector<ZenLib::ZtringList, std::allocator<ZenLib::ZtringList> > ()
-{
- Separator[0]=Source.Separator[0];
- Separator[1]=Source.Separator[1];
- Quote=Source.Quote;
- Max[0]=Source.Max[0];
- Max[1]=Source.Max[1];
- reserve(Source.size());
- for (intu Pos=0; Pos<Source.size(); Pos++)
- push_back(Source[Pos]);
-}
-
-ZtringListList::ZtringListList(const Ztring &Source)
-{
- Separator[0]=EOL;
- Separator[1]=__T(";");
- Quote=__T("\"");
- Max[0]=Error;
- Max[1]=Error;
- Write(Source.c_str());
-}
-
-ZtringListList::ZtringListList(const Char *Source)
-{
- Separator[0]=EOL;
- Separator[1]=__T(";");
- Quote=__T("\"");
- Max[0]=Error;
- Max[1]=Error;
- Write(Source);
-}
-
-#ifdef _UNICODE
-ZtringListList::ZtringListList (const char* S)
-{
- Separator[0]=EOL;
- Separator[1]=__T(";");
- Quote=__T("\"");
- Max[0]=Error;
- Max[1]=Error;
- Write(Ztring(S));
-}
-#endif
-
-//***************************************************************************
-// Operators
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-//Operator ==
-bool ZtringListList::operator== (const ZtringListList &Source) const
-{
- return (Read()==Source.Read());
-}
-
-//---------------------------------------------------------------------------
-//Operator !=
-bool ZtringListList::operator!= (const ZtringListList &Source) const
-{
- return (!(Read()==Source.Read()));
-}
-
-//---------------------------------------------------------------------------
-// Operator +=
-ZtringListList &ZtringListList::operator+= (const ZtringListList &Source)
-{
- reserve(size()+Source.size());
- for (size_type Pos=0; Pos<Source.size(); Pos++)
- {
- push_back(Source[Pos]);
- operator[](size()-1).Separator_Set(0, Separator[1]);
- operator[](size()-1).Quote_Set(Quote);
- operator[](size()-1).Max_Set(0, Max[1]);
- }
-
- return *this;
-}
-
-//---------------------------------------------------------------------------
-// Operator =
-ZtringListList &ZtringListList::operator= (const ZtringListList &Source)
-{
- clear();
-
- reserve(Source.size());
- for (size_type Pos=0; Pos<Source.size(); Pos++)
- {
- push_back(Source[Pos]);
- operator[](size()-1).Separator_Set(0, Separator[1]);
- operator[](size()-1).Quote_Set(Quote);
- operator[](size()-1).Max_Set(0, Max[1]);
- }
-
- return *this;
-}
-
-//---------------------------------------------------------------------------
-// Operatorr ()
-ZtringList &ZtringListList::operator() (size_type Pos0)
-{
- //Integrity
- if (Pos0>=size())
- Write(Ztring(), Pos0);
-
- return operator[](Pos0);
-}
-
-Ztring &ZtringListList::operator() (size_type Pos0, size_type Pos1)
-{
- //Integrity
- if (Pos0>=size())
- Write(Ztring(), Pos0);
-
- return operator[](Pos0).operator()(Pos1);
-}
-
-Ztring &ZtringListList::operator() (const Ztring &Pos0, size_type Pos0_1, size_type Pos1)
-{
- size_type Pos=0;
- size_t Size=size();
- for (; Pos<Size; Pos++)
- if (operator[](Pos).size()>Pos0_1)
- if (operator[](Pos)[Pos0_1]==Pos0)
- break;
-
- if (Pos>=Size)
- {
- Write(Pos0, Size, Pos0_1);
- Pos=size()-1;
- }
-
- return operator[](Pos).operator()(Pos1);
-}
-
-//***************************************************************************
-// In/Out
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Read
-Ztring ZtringListList::Read () const
-{
- //Integrity
- if (size()==0)
- return Ztring();
-
- Ztring ToReturn;
- size_type Size=size()-1;
- for (size_type Pos0=0; Pos0<Size; Pos0++)
- ToReturn+=Read(Pos0)+Separator[0];
- ToReturn+=Read(Size);
-
- //Delete all useless separators at the end
- //if(ToReturn.size()>0 && Separator[0].size() && ToReturn(ToReturn.size()-1)==Separator[0][Separator[0].size()-1]) //Optimize speed
- // while (ToReturn.find(Separator[0].c_str(), ToReturn.size()-Separator[0].size())!=std::string::npos)
- // ToReturn.resize(ToReturn.size()-Separator[0].size());
-
- return ToReturn;
-}
-
-Ztring ZtringListList::Read (size_type Pos0) const
-{
- //Integrity
- if (Pos0>=size())
- return Ztring();
-
- return operator[](Pos0).Read();
-}
-
-const Ztring &ZtringListList::Read (size_type Pos0, size_type Pos1) const
-{
- //Integrity
- if (Pos0>=size())
- return EmptyZtring;
-
- return operator[](Pos0).Read(Pos1);
-}
-
-const Ztring &ZtringListList::Read (const Ztring &Pos0, size_type Pos1) const
-{
- size_type Pos=Find(Pos0);
- if (Pos==Error)
- return EmptyZtring;
-
- return operator[](Pos).Read(Pos1);
-}
-
-const Ztring &ZtringListList::Read (const Ztring &Pos0, size_type Pos0_1, size_type Pos1) const
-{
- size_type Pos=Find(Pos0, Pos0_1);
- if (Pos==Error)
- return EmptyZtring;
-
- return operator[](Pos).Read(Pos1);
-}
-
-const Ztring &ZtringListList::Read (const Ztring &Pos0, const Ztring &Default, size_type Pos1) const
-{
- size_type Pos=Find(Pos0);
- if (Pos==Error)
- return Default;
-
- return operator[](Pos).Read(Pos1);
-}
-
-const Ztring &ZtringListList::Read (const Ztring &Pos0, const Ztring &Default, size_type Pos0_1, size_type Pos1) const //Lecture d'un champs en position 0 avec une option par defaut
-{
- size_type Pos=Find(Pos0, Pos0_1);
- if (Pos==Error)
- return Default;
-
- return operator[](Pos).Read(Pos1);
-}
-
-Ztring ZtringListList::Read1 (size_type Pos1) const
-{
- Ztring ToReturn;
- size_type Size=size()-1;
- for (size_type Pos=0; Pos<Size; Pos++)
- ToReturn+=operator[](Pos).Read(Pos1)+Separator[0];
- ToReturn+=operator[](Size).Read(Pos1);
-
- //Delete all useless separators at the end
- if(ToReturn(ToReturn.size()-1)==Separator[0][Separator[0].size()-1]) //Optimize speed
- while (ToReturn.find(Separator[0].c_str(), ToReturn.size()-Separator[0].size())!=std::string::npos)
- ToReturn.resize(ToReturn.size()-Separator[0].size());
-
- return ToReturn;
-}
-
-//---------------------------------------------------------------------------
-// Write
-void ZtringListList::Write(const Ztring &ToWrite)
-{
- clear();
-
- if (ToWrite.empty())
- return;
-
- size_type PosC=0;
- bool Fini=false;
- Ztring C1;
- ZtringList ZL1;
- ZL1.Separator_Set(0, Separator[1]);
- ZL1.Quote_Set(Quote);
- ZL1.Max_Set(0, Max[1]);
-
- //Detecting carriage return format
- Ztring WriteSeparator;
- if (Separator[0]==EOL)
- {
- size_t CarriageReturn_Pos=ToWrite.find_first_of(__T("\r\n"));
- if (CarriageReturn_Pos!=string::npos)
- {
- if (ToWrite[CarriageReturn_Pos]==__T('\r'))
- {
- if (CarriageReturn_Pos+1<ToWrite.size() && ToWrite[CarriageReturn_Pos+1]==__T('\n'))
- WriteSeparator=__T("\r\n");
- else
- WriteSeparator=__T("\r");
- }
- else
- WriteSeparator=__T("\n");
- }
- else
- WriteSeparator=Separator[0];
- }
- else
- WriteSeparator=Separator[0];
-
- do
- {
- //Searching end of line, but it must not be in quotes
- bool InQuotes=false;
- Ztring CharsToFind=WriteSeparator+Quote;
- size_t Pos_End=PosC;
- while (Pos_End<ToWrite.size())
- {
- Pos_End=ToWrite.find(WriteSeparator, Pos_End);
- if (Pos_End!=string::npos)
- {
- if (Pos_End+Quote.size()<ToWrite.size() && ToWrite[Pos_End]==Quote[0] && ToWrite[Pos_End+1]!=Quote[0])
- {
- InQuotes=!InQuotes; //This is not double quotes, so this is a normal quote
- /*if (!InQuotes)
- {
- C1=ToWrite.substr(PosC, Pos_End-PosC);
- break;
- }*/
- }
-
- if (!InQuotes && Pos_End+WriteSeparator.size()<=ToWrite.size() && ToWrite[Pos_End]==WriteSeparator[0])
- {
- C1=ToWrite.substr(PosC, Pos_End-PosC);
- break;
- }
-
- if (InQuotes && Pos_End+Quote.size()*2<ToWrite.size() && ToWrite[Pos_End]==Quote[0] && ToWrite[Pos_End+1]==Quote[0])
- Pos_End+=2;
- else
- Pos_End++;
- }
- }
- if (Pos_End>=ToWrite.size())
- C1=ToWrite.substr(PosC, string::npos);
-
- ZL1.Write(C1);
- push_back(ZL1);
- PosC+=C1.size()+WriteSeparator.size();
- if (PosC>=ToWrite.size())
- Fini=true;
- }
- while (!Fini);
-}
-
-void ZtringListList::Write(const ZtringList &ToWrite, size_type Pos)
-{
- //Integrity
- if (Pos==Error)
- return;
-
- //Writing
- if (Pos>=size())
- {
- //Reservation de ressources
- if (!capacity())
- reserve(1);
- while (Pos>=capacity())
- reserve(capacity()*2);
-
- while (Pos>size())
- push_back (Ztring());
- push_back(ToWrite);
- }
- else
- operator[](Pos)=ToWrite;
-}
-
-void ZtringListList::Write(const Ztring &ToWrite, size_type Pos0, size_type Pos1)
-{
- if (Pos0>=size())
- Write(Ztring(), Pos0);
-
- operator[](Pos0).Write(ToWrite, Pos1);
-}
-
-void ZtringListList::push_back (const ZtringList &ToAdd)
-{
- vector<ZtringList>::push_back(ToAdd); //Visual C++ 6 patch, should be std::vector
- operator[](size()-1).Separator_Set(0, Separator[1]);
- operator[](size()-1).Quote_Set(Quote);
- operator[](size()-1).Max_Set(0, Max[1]);
-}
-
-void ZtringListList::push_back (const Ztring &ToAdd)
-{
- ZtringList ZL1;
- ZL1.Separator_Set(0, Separator[1]);
- ZL1.Quote_Set(Quote);
- ZL1.Max_Set(0, Max[1]);
- ZL1.Write(ToAdd);
- push_back(ZL1);
-}
-
-//---------------------------------------------------------------------------
-// Insert
-void ZtringListList::Insert1 (const Ztring &ToInsert, size_type Pos1)
-{
- for (size_type Pos0=0; Pos0<size(); Pos0++)
- operator[](Pos0).Insert(ToInsert, Pos1);
-}
-
-//---------------------------------------------------------------------------
-// Delete
-void ZtringListList::Delete (const Ztring &ToFind, size_type Pos1, const Ztring &Comparator, ztring_t Options)
-{
- size_type Pos0=0;
- while ((Pos0=Find(ToFind, Pos1, Pos0, Comparator, Options))!=Error)
- operator [] (Pos0).Delete(Pos1);
-}
-
-void ZtringListList::Delete1 (size_type Pos1)
-{
- for (size_type Pos0=0; Pos0<size(); Pos0++)
- operator [] (Pos0).Delete(Pos1);
-}
-
-//***************************************************************************
-// Edition
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Swap
-void ZtringListList::Swap (size_type Pos0_A, size_type Pos0_B)
-{
- //Integrity
- size_type Pos_Max;
- if (Pos0_A<Pos0_B)
- Pos_Max=Pos0_B;
- else
- Pos_Max=Pos0_A;
- if (Pos_Max>=size())
- Write(Ztring(), Pos_Max);
-
- operator [] (Pos0_A).swap(operator [] (Pos0_B));
-}
-
-void ZtringListList::Swap1 (size_type Pos1_A, size_type Pos1_B)
-{
- for (size_type Pos0=0; Pos0<size(); Pos0++)
- operator () (Pos0, Pos1_A).swap(operator () (Pos0, Pos1_B));
-}
-
-//---------------------------------------------------------------------------
-// Sort
-void ZtringListList::Sort(size_type, ztring_t)
-{
- std::stable_sort(begin(), end());
- return;
-}
-
-//---------------------------------------------------------------------------
-// Find
-Ztring::size_type ZtringListList::Find (const Ztring &ToFind, size_type Pos1, size_type Pos0) const
-{
- size_t Size=size();
- for (; Pos0<Size; Pos0++)
- if (operator[](Pos0).size()>Pos1)
- if (operator[](Pos0)[Pos1]==ToFind)
- break;
-
- if (Pos0>=Size)
- return Error;
- return Pos0;
-}
-
-Ztring::size_type ZtringListList::Find_Filled (size_type Pos1, size_type Pos0) const
-{
- size_t Size=size();
- for (; Pos0<Size; Pos0++)
- if (operator[](Pos0).size()>Pos1)
- if (!operator[](Pos0)[Pos1].empty())
- break;
-
- if (Pos0>=Size)
- return Error;
- return Pos0;
-}
-
-Ztring::size_type ZtringListList::Find (const Ztring &ToFind, size_type Pos1, size_type Pos0, const Ztring &Comparator, ztring_t Options) const
-{
- while ( Pos0<size()
- && ( Pos1>=at(Pos0).size()
- || !at(Pos0).at(Pos1).Compare(ToFind, Comparator, Options)))
- Pos0++;
- if (Pos0>=size())
- return Error;
- return Pos0;
-}
-
-Ztring ZtringListList::FindValue (const Ztring &ToFind, size_type Pos1Value, size_type Pos1, size_type Pos0Begin, const Ztring &Comparator, ztring_t) const
-{
- size_type Pos0=Find(ToFind, Pos1, Pos0Begin, Comparator);
- if (Pos0==Error)
- return Ztring();
-
- return Read(Pos0, Pos1Value);
-}
-
-ZtringListList ZtringListList::SubSheet (const Ztring &ToFind, size_type Pos1, size_type Pos0, const Ztring &Comparator, ztring_t) const
-{
- ZtringListList ToReturn;
- ToReturn.Separator[0]=Separator[0];
- ToReturn.Separator[1]=Separator[1];
- ToReturn.Quote=Quote;
-
- Pos0--;
- do
- {
- Pos0=Find(ToFind, Pos1, Pos0+1, Comparator);
- ToReturn.push_back(Read(Pos0));
- }
- while (Pos0!=Error);
-
- return ToReturn;
-}
-
-//***************************************************************************
-// Configuration
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Separator
-void ZtringListList::Separator_Set (size_type Level, const Ztring &NewSeparator)
-{
- if (Level>1)
- return;
-
- Separator[Level]=NewSeparator;
- if (Level==1)
- for (size_type Pos0=0; Pos0<size(); Pos0++)
- operator () (Pos0).Separator_Set(0, Separator[1]);
-}
-
-//---------------------------------------------------------------------------
-// Quote
-void ZtringListList::Quote_Set (const Ztring &NewQuote)
-{
- Quote=NewQuote;
- for (size_type Pos0=0; Pos0<size(); Pos0++)
- operator () (Pos0).Quote_Set(Quote);
-}
-
-//---------------------------------------------------------------------------
-// Max
-void ZtringListList::Max_Set (size_type Level, size_type NewMax)
-{
- if (Level>1 || NewMax==0)
- return;
-
- Max[Level]=NewMax;
- if (Level==1)
- for (size_type Pos0=0; Pos0<size(); Pos0++)
- operator () (Pos0).Max_Set(0, Max[1]);
-}
-
-//***************************************************************************
-//
-//***************************************************************************
-
-} //namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/ZtringListList.h b/src/thirdparty/ZenLib/ZenLib/ZtringListList.h
deleted file mode 100644
index f7102458d..000000000
--- a/src/thirdparty/ZenLib/ZenLib/ZtringListList.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// More methods for std::vector<std::vector<std::(w)string>>
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZenLib_ZtringListListH
-#define ZenLib_ZtringListListH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/ZtringList.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-/// @brief Vector of vectors of strings manipulation (based on std::vector<std::vector<std::(w)string>>)
-//***************************************************************************
-
-class ZtringListList : public std::vector<ZtringList>
-{
-public :
- //Constructors/Destructor
- ZtringListList ();
- ZtringListList (const ZtringListList &Source);
- ZtringListList (const Ztring &Source);
- ZtringListList (const Char *Source);
- #ifdef _UNICODE
- ZtringListList (const char *Source); //convert a UTF-8 string into Unicode
- #endif
-
- //Operateurs
- bool operator == (const ZtringListList &Source) const;
- bool operator != (const ZtringListList &Source) const;
- ZtringListList &operator += (const ZtringListList &Source);
- ZtringListList &operator = (const ZtringListList &Source);
-
- ZtringList &operator () (size_type Pos0); ///< Same as [], but write a empty string if Pos doesn't exist yet
- Ztring &operator () (size_type Pos0, size_type Pos1);
- /// @brief Return [Pos][Pos1], Pos=First occurency of Pos0 in [xxx][0]
- Ztring &operator () (const Ztring &Pos0, size_type Pos1=1) {return operator() (Pos0, 0 , Pos1);};
- /// @brief Return [Pos][Pos1], Pos=First occurency of Pos0 in [xxx][Pos0_1]
- Ztring &operator () (const Ztring &Pos0, size_type Pos0_1, size_type Pos1);
-
- //In/Out
- /// @brief Read all
- Ztring Read () const;
- /// @brief Read a vector of string
- Ztring Read (size_type Pos0) const;
- /// @brief Read a string
- const Ztring &Read (size_type Pos0, size_type Pos1) const;
- /// @brief Return [Pos][Pos1], Pos=First occurency of Pos0 in [xxx][0]
- const Ztring &Read (const Ztring &Pos0, size_type Pos1=1) const;
- /// @brief Return [Pos][Pos1], Pos=First occurency of Pos0 in [xxx][Pos0_1]
- const Ztring &Read (const Ztring &Pos0, size_type Pos0_1, size_type Pos1) const;
- /// @brief Return [Pos][Pos1], Pos=First occurency of Pos0 in [xxx][0], with default value
- const Ztring &Read (const Ztring &Pos0, const Ztring &Default, size_type Pos1=1) const;
- /// @brief Return [Pos][Pos1], Pos=First occurency of Pos0 in [xxx][Pos0_1], with default value
- const Ztring &Read (const Ztring &Pos0, const Ztring &Default, size_type Pos0_1, size_type Pos1) const;
- /// @brief Read all strings at position Pos1
- Ztring Read1 (size_type Pos1) const;
-
- /// @brief Write all
- void Write (const Ztring &ToWrite);
- /// @brief Write a vector of string
- void Write (const ZtringList &ToWrite, size_type Pos0);
- /// @brief Write a vector of string
- void Write (const Ztring &ToWrite, size_type Pos0, size_type Pos1);
- /// @brief Add a vector of string
- void push_back (const ZtringList &ToAdd);
- /// @brief Add a vector of string (with separator is ZtringListList Separator)
- void push_back (const Ztring &ToAdd);
- /// @brief Add a vector of string (Char version)
- void push_back (const Char* ToAdd) {push_back(Ztring(ToAdd));};
- /// @brief Insert a vector of string at position Pos0
- void Insert (const ZtringList &ToInsert, size_type Pos0) {insert(begin()+Pos0, ToInsert);};
- /// @brief Insert a string at all positions Pos1
- void Insert1 (const Ztring &ToInsert, size_type Pos1);
- /// @brief Delete a vector of string at position Pos0
- void Delete (size_type Pos0) {erase(begin()+Pos0);};
- /// @brief Delete all vectors of string, with [xxx][Pos1] == ToFind
- void Delete (const Ztring &ToFind, size_type Pos1=0, const Ztring &Comparator=__T("=="), ztring_t Options=Ztring_Nothing);
- /// @brief Delete a string at all positions Pos1
- void Delete1 (size_type Pos1);
-
- //Edition
- /// @brief Swap 2 positions
- void Swap (size_type Pos0_A, size_type Pos0_B);
- /// @brief Swap 2 columns for each line
- void Swap1 (size_type Pos1_A, size_type Pos1_B);
- /// @brief Sort
- void Sort (size_type Pos1, ztring_t Options=Ztring_Nothing);
-
- //Information
- /// @brief Find the first position of the string in the vector of vector, in a specific column
- size_type Find (const Ztring &ToFind, size_type Pos1=0, size_type Pos0Begin=0) const;
- /// @brief Find the first position of the string in the vector of vector, in a specific column, which is not empty
- size_type Find_Filled (size_type Pos1=0, size_type Pos0Begin=0) const;
- /// @brief Find the first position of the string in the vector of vector, in a specific column
- size_type Find (const Ztring &ToFind, size_type Pos1, size_type Pos0Begin, const Ztring &Comparator, ztring_t Options=Ztring_Nothing) const;
- /// @brief Return [xxx][Pos1Value] when founded the first position of the string in the vector of vector, in a specific column
- Ztring FindValue (const Ztring &ToFind, size_type Pos1Value=1, size_type Pos1=0, size_type Pos0Begin=0, const Ztring &Comparator=__T("=="), ztring_t Options=Ztring_Nothing) const;
- /// @brief Return a subsheet, with all lines with position of the string in the vector of vector, in a specific column
- ZtringListList SubSheet (const Ztring &ToFind, size_type Pos1=0, size_type Pos0Begin=0, const Ztring &Comparator=__T("=="), ztring_t Options=Ztring_Nothing) const;
-
- //Configuration
- /// @brief Set the Separator character
- void Separator_Set (size_type Level, const Ztring &NewSeparator);
- /// @brief Set the Quote character
- /// During Read() or Write() method, if Separator is in the sequence, we must quote it
- void Quote_Set (const Ztring &NewQuote);
- /// @brief Set the Maximum number of element to read
- /// During Read() or Write() method, if there is more elements, merge them with the last element
- void Max_Set (size_type Level, size_type Max);
-
-protected :
- Ztring Separator[2];
- Ztring Quote;
- size_type Max[2];
-};
-
-} //namespace
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/ZtringListListF.cpp b/src/thirdparty/ZenLib/ZenLib/ZtringListListF.cpp
deleted file mode 100644
index a89693d44..000000000
--- a/src/thirdparty/ZenLib/ZenLib/ZtringListListF.cpp
+++ /dev/null
@@ -1,370 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// ZtringListList with file load/save
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/ZtringListListF.h"
-#include "ZenLib/File.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//---------------------------------------------------------------------------
-#define READ_SIZE 512*1024
-//---------------------------------------------------------------------------
-
-//***************************************************************************
-// Constructors/Destructor
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Constructors
-void ZtringListListF::ZtringListListF_Common ()
-{
- Backup_Nb_Max=0;
- Backup_Nb=0;
- Sauvegarde=true;
- #ifdef _UNICODE
- Local=false;
- #else
- Local=true;
- #endif
-}
-
-ZtringListListF::ZtringListListF ()
-:ZtringListList ()
-{
- ZtringListListF_Common();
-}
-
-ZtringListListF::ZtringListListF (const ZtringListList &Source)
-:ZtringListList (Source)
-{
- ZtringListListF_Common();
-}
-
-ZtringListListF::ZtringListListF (const Ztring &Source)
-:ZtringListList (Source)
-{
- ZtringListListF_Common();
-}
-
-ZtringListListF::ZtringListListF (const Char *Source)
-:ZtringListList (Source)
-{
- ZtringListListF_Common();
-}
-
-#ifdef _UNICODE
-ZtringListListF::ZtringListListF (const char* Source)
-:ZtringListList (Source)
-{
- ZtringListListF_Common();
-}
-#endif
-
-//***************************************************************************
-// File management
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Load
-bool ZtringListListF::Load (const Ztring &NewFileName)
-{
- clear();
- if (!NewFileName.empty())
- Name=NewFileName;
-
- size_t I1=Error;
-
- if (Name.find(__T(".csv"))!=Error)
- I1=CSV_Charger();
- if (Name.find(__T(".cfg"))!=Error)
- I1=CFG_Charger();
- if (I1!=Error)
- {
- Backup_Nb=0; //mettre ici le code pour trouver le nb de backup
- return true;
- }
- else
- return false;
-}
-
-//---------------------------------------------------------------------------
-// Load CSV
-bool ZtringListListF::CSV_Charger ()
-{
- //Read file
- File F;
- if (!F.Open(Name))
- return false;
-
- int8u* Buffer=new int8u[(size_t)F.Size_Get()+1];
- size_t BytesCount=F.Read(Buffer, (size_t)F.Size_Get());
- F.Close();
- if (BytesCount==Error)
- {
- delete[] Buffer; //Buffer=NULL;
- return false;
- }
- Buffer[(int32u)BytesCount]=(int8u)'\0';
-
- //Convert file in UTF-8 or Local
- Ztring File;
- if (!Local)
- {
- //UTF-8
- File.From_UTF8((char*)Buffer, 0, BytesCount);
- #ifdef _DEBUG
- if (File.size()==0)
- File.From_Local((char*)Buffer, 0, BytesCount);
- #endif //_DEBUG
- }
- if (File.size()==0)
- //Local of UTF-8 failed
- File.From_Local((char*)Buffer, 0, BytesCount);
-
- //Separators
- if (Separator[0]==__T("(Default)"))
- Separator[0]=EOL;
- Ztring SeparatorT=Separator[1];
- Separator[1]=__T(";");
-
- //Writing
- Write(File);
-
- //Separators
- Separator[1]=SeparatorT;
-
- delete[] Buffer; //Buffer=NULL;
- return true;
-}
-
-//---------------------------------------------------------------------------
-// Chargement CFG
-bool ZtringListListF::CFG_Charger ()
-{
- //Read file
- File F(Name);
- int8u* Buffer=new int8u[(size_t)F.Size_Get()+1];
- size_t BytesCount=F.Read(Buffer, (size_t)F.Size_Get());
- F.Close();
- if (BytesCount==Error)
- {
- delete[] Buffer; //Buffer=NULL;
- return false;
- }
- Buffer[(int32u)BytesCount]=(int8u)'\0';
-
- //Convert File --> ZtringList
- ZtringList List;
- List.Separator_Set(0, EOL);
- Ztring Z1;
- Z1.From_UTF8((char*)Buffer, 0, BytesCount);
- List.Write(Z1);
-
- Ztring SeparatorT=Separator[1];
- Separator[1]=__T(";");
-
- Ztring Propriete, Valeur, Commentaire;
-
- for (size_t Pos=0; Pos<List.size(); Pos++)
- {
- Ztring &Lu=List(Pos);
- if (Lu.find(__T("="))>0)
- {
- //Obtention du Name
- Propriete=Lu.SubString(Ztring(), __T("="));
- NettoyerEspaces(Propriete);
- //Obtention de la valeur
- Valeur=Lu.SubString(__T("="), __T(";"), 0, Ztring_AddLastItem);
- NettoyerEspaces(Valeur);
- }
- //Obtention du commentaire
- Commentaire=Lu.SubString(__T(";"), Ztring(), 0, Ztring_AddLastItem);
- NettoyerEspaces(Commentaire);
- //Ecriture
- push_back((Propriete+__T(";")+Valeur+__T(";")+Commentaire).c_str()); //Visual C++ 6 is old...
- }
- Separator[1]=SeparatorT;
-
- delete[] Buffer; //Buffer=NULL;
- return true;
-}
-
-//---------------------------------------------------------------------------
-// Sauvegarde globale
-bool ZtringListListF::Save (const Ztring &FileName)
-{
- //Gestion de l'annulation de la sauvegarde
- if (!Sauvegarde)
- return true;
-
- if (FileName!=Ztring())
- Name=FileName;
-
- //Gestion des backups
- Backup_Nb=0;
- int8u I2;
- Separator[0]=EOL;
- if (Backup_Nb_Max>0)
- {
- //TODO : not tested
- for (int8u I1=Backup_Nb_Max-1; I1>0; I1--)
- {
- Ztring Z1=Name+__T(".sav"); Z1+=Ztring::ToZtring(I1);
- Ztring Z2=Name+__T(".sav"); Z2+=Ztring::ToZtring(I1+1);
- File::Delete(Z2.c_str());
- I2=File::Move(Z1.c_str(), Z2.c_str());
- if (I2 && !Backup_Nb)
- Backup_Nb=I2;
- }
- Ztring Z1=Name+__T(".sav0");
- File::Delete(Z1.c_str());
- File::Move(Name.c_str(), Z1.c_str());
- Backup_Nb++;
- }
-
- I2=0;
- if (Name.find(__T(".csv"))!=Error)
- I2=CSV_Sauvegarder();
- if (Name.find(__T(".cfg"))!=Error)
- I2=CFG_Sauvegarder();
-
- if (I2>0)
- {
- return true;
- }
- else
- return false;
-}
-
-//---------------------------------------------------------------------------
-// Sauvegarde CSV
-bool ZtringListListF::CSV_Sauvegarder ()
-{
- //Sauvegarde
- File F;
- if (!F.Create(Name, true))
- return Error;
-
- if (Separator[0]==__T("(Default)"))
- Separator[0]=EOL;
-
- F.Write(Read());
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-// Sauvegarde CFG
-bool ZtringListListF::CFG_Sauvegarder ()
-{
- File F;
- if (!F.Create(Name, true))
- return Error;
-
- Ztring ToWrite;
- Ztring Propriete, Valeur, Commentaire;
-
- ;
- for (size_t Pos=0; Pos<size(); Pos++)
- {
- Propriete=Read(Pos, 0);
- Valeur=Read(Pos, 1);
- Commentaire=Read(Pos, 2);
- if (Propriete!=Ztring())
- {
- ToWrite+=Propriete+__T(" = ");
- if (Valeur!=Ztring())
- ToWrite+=Valeur+__T(" ");
- }
- if (Commentaire!=Ztring())
- ToWrite+=__T("; ")+Commentaire;
- ToWrite+=EOL;
- }
- F.Write(ToWrite);
-
- return true;
-}
-
-//---------------------------------------------------------------------------
-// Annulation
-bool ZtringListListF::Cancel ()
-{
- Ztring Z1=Name+__T(".sav0"); //Visual C++ 6 patch
- File::Delete(Name.c_str());
- File::Move(Z1.c_str(), Name.c_str());
- for (int8u I1=1; I1<=Backup_Nb; I1++)
- {
- Ztring Z2=Name+__T(".sav"); Z2+=Ztring::ToZtring(I1); //Visual C++ 6 patch
- Ztring Z3=Name+__T(".sav"); Z3+=Ztring::ToZtring(I1-1); //Visual C++ 6 patch
- File::Delete(Z3.c_str());
- File::Move(Z2.c_str(), Z3.c_str());
- }
- Write(Ztring());
- return CSV_Charger();
-}
-
-//***************************************************************************
-// Divers
-//***************************************************************************
-
-//---------------------------------------------------------------------------
-// Nettoyage
-bool ZtringListListF::NettoyerEspaces (Ztring &ANettoyer)
-{
- size_t Debut=0;
- while (Debut<ANettoyer.size() && ANettoyer[Debut]==__T(' '))
- Debut++;
- size_t Fin=ANettoyer.size()-1;
- while (Fin!=(size_t)-2 && ANettoyer[Fin]==__T(' '))
- Fin--;
- if (Fin>=Debut)
- ANettoyer=ANettoyer.substr(Debut, Fin-Debut+1);
- else
- ANettoyer=Ztring();
- return true;
-}
-
-//---------------------------------------------------------------------------
-// Backup
-void ZtringListListF::Backup_Set (bool NewSave)
-{
- Sauvegarde=NewSave;
- Save();
-}
-
-void ZtringListListF::Backup_Count_Set (int8u NewCount)
-{
- Backup_Nb_Max=NewCount;
-}
-
-//---------------------------------------------------------------------------
-// Local
-void ZtringListListF::Local_Set (bool NewLocal)
-{
- Local=NewLocal;
-}
-
-} //Namespace
diff --git a/src/thirdparty/ZenLib/ZenLib/ZtringListListF.h b/src/thirdparty/ZenLib/ZenLib/ZtringListListF.h
deleted file mode 100644
index 0410fd260..000000000
--- a/src/thirdparty/ZenLib/ZenLib/ZtringListListF.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// ZtringListList with file load/save
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#ifndef ZtringListListFH
-#define ZtringListListFH
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/ZtringListList.h"
-//---------------------------------------------------------------------------
-
-namespace ZenLib
-{
-
-//***************************************************************************
-/// @brief ZtringListList with file management
-//***************************************************************************
-
-class ZtringListListF : public ZtringListList
-{
-public :
- //Constructors/Destructor
- ZtringListListF ();
- ZtringListListF (const ZtringListList &Source);
- ZtringListListF (const Ztring &Source);
- ZtringListListF (const Char *Source);
- #ifdef _UNICODE
- ZtringListListF (const char *Source); //convert a UTF-8 string into Unicode
- #endif
-
- //File management
- bool Load (const Ztring &FileName=Ztring());
- bool Save (const Ztring &FileName=Ztring());
- bool Cancel ();
-
- //Configuration
- // @brief enable or disable backup creation
- void Backup_Set (bool Save);
- // @brief Set the count of versions to save
- void Backup_Count_Set (int8u Count);
- // @brief Set if the content of file is a localized (=not UTF8) file
- void Local_Set (bool Local);
-
-protected :
- Ztring Name; //Nom du fichier
- bool Sauvegarde; //Indicateur si on a le droit de sauvegarder (par defaut)
- int8u Backup_Nb_Max; //Nombre maxi de sauvegardes
- int8u Backup_Nb; //Nombre actuel de backups pour cette session
- bool Local; //if true, this is a local charset, else this is a UTF8 charset
-
- //File management
- bool CSV_Charger ();
- bool CFG_Charger ();
- bool CSV_Sauvegarder ();
- bool CFG_Sauvegarder ();
- bool File_Load ();
-
- //Divers
- bool NettoyerEspaces (Ztring &ANettoyer); //Enlever les espaces avant et apres
-
-private:
- void ZtringListListF_Common();
-};
-
-} //Namespace
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/int128s.cpp b/src/thirdparty/ZenLib/ZenLib/int128s.cpp
deleted file mode 100644
index 5d597e1e6..000000000
--- a/src/thirdparty/ZenLib/ZenLib/int128s.cpp
+++ /dev/null
@@ -1,408 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// based on http://Tringi.Mx-3.cz
-// Only adapted for ZenLib:
-// - uint128.hpp --> int128u.h
-// - Namespace
-// - int128u alias
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-#include "int128s.h"
-
-/*
- Name: int128.cpp
- Copyright: Copyright (C) 2005, Jan Ringos
- Author: Jan Ringos, http://Tringi.Mx-3.cz
-
- Version: 1.1
-*/
-
-#include <memory>
-#include <cmath>
-#include <cstring>
-#if defined (__BORLANDC__) || defined (__SUNPRO_CC)
- #define fmodf fmod
-#endif
-#if defined (__NO_LONG_DOUBLE_MATH) || \
- defined (__MONTAVISTA__) || defined (__ARMEL__) || \
- defined (__FreeBSD__) || defined (__OpenBSD__) || \
- defined (__NetBSD__) || defined (__DragonFly__) || \
- defined (__sparc__) || defined (__sparc64__) || \
- defined (__CYGWIN__) || \
- defined (__SUNPRO_CC)
- #define fmodl fmod
-#endif
-using namespace std;
-
-namespace ZenLib
-{
-
-// IMPLEMENTATION
-
-const char * int128::toString (unsigned int radix) const throw () {
- if (!*this) return "0";
- if (radix < 2 || radix > 37) return "(invalid radix)";
-
- static char sz [256];
- memset (sz, 0, 256);
-
- int128 r;
- int128 ii = (*this < 0) ? -*this : *this;
- int i = 255;
-
- while (!!ii && i) {
- ii = ii.div (radix, r);
- sz [--i] = (char) (r.toInt () + ((r.toInt () > 9) ? 'A' - 10 : '0'));
- };
-
- if (*this < 0)
- sz [--i] = '-';
-
- return &sz [i];
-};
-
-int128::int128 (const char * sz) throw ()
- : lo (0u), hi (0) {
-
- if (!sz) return;
- if (!sz [0]) return;
-
- unsigned int radix = 10;
- unsigned int i = 0;
- bool minus = false;
-
- if (sz [i] == '-') {
- ++i;
- minus = true;
- };
-
- if (sz [i] == '0') {
- radix = 8;
- ++i;
- if (sz [i] == 'x') {
- radix = 16;
- ++i;
- };
- };
-
- for (; i < strlen (sz); ++i) {
- unsigned int n = 0;
- if (sz [i] >= '0' && sz [i] <= (('0' + (int) radix) < '9'?('0' + (int) radix):'9')) //if (sz [i] >= '0' && sz [i] <= (('0' + (int) radix) <? '9'))
- n = sz [i] - '0';
- else if (sz [i] >= 'a' && sz [i] <= 'a' + (int) radix - 10)
- n = sz [i] - 'a' + 10;
- else if (sz [i] >= 'A' && sz [i] <= 'A' + (int) radix - 10)
- n = sz [i] - 'A' + 10;
- else
- break;
-
- (*this) *= radix;
- (*this) += n;
- };
-
- if (minus)
- *this = 0 - *this;
-
- return;
-};
-
-int128::int128 (const float a) throw ()
- #if defined (__mips__) || defined (__mipsel__)
- : lo ((int64u) fmodf ((const double)a, 18446744073709551616.0)),
- #else
- : lo ((int64u) fmodf (a, 18446744073709551616.0f)),
- #endif
- hi ((int64s) (a / 18446744073709551616.0f)) {};
-
-int128::int128 (const double & a) throw ()
- : lo ((int64u) fmod (a, 18446744073709551616.0)),
- hi ((int64s) (a / 18446744073709551616.0)) {};
-
-int128::int128 (const long double & a) throw ()
- #if defined (__mips__) || defined (__mipsel__)
- : lo ((int64u) fmod ((const double)a, 18446744073709551616.0)),
- #else
- : lo ((int64u) fmodl (a, 18446744073709551616.0l)),
- #endif
- hi ((int64s) (a / 18446744073709551616.0l)) {};
-
-float int128::toFloat () const throw () {
- return (float) this->hi * 18446744073709551616.0f
- + (float) this->lo;
-};
-
-double int128::toDouble () const throw () {
- return (double) this->hi * 18446744073709551616.0
- + (double) this->lo;
-};
-
-long double int128::toLongDouble () const throw () {
- return (long double) this->hi * 18446744073709551616.0l
- + (long double) this->lo;
-};
-
-int128 int128::operator - () const throw () {
- if (!this->hi && !this->lo)
- // number is 0, just return 0
- return *this;
- else
- // non 0 number
- return int128 (0-this->lo, ~this->hi);
-};
-
-int128 int128::operator ~ () const throw () {
- return int128 (~this->lo, ~this->hi);
-};
-
-int128 & int128::operator ++ () {
- ++this->lo;
- if (!this->lo)
- ++this->hi;
-
- return *this;
-};
-
-int128 & int128::operator -- () {
- if (!this->lo)
- --this->hi;
- --this->lo;
-
- return *this;
-};
-
-int128 int128::operator ++ (int) {
- int128 b = *this;
- ++ *this;
-
- return b;
-};
-
-int128 int128::operator -- (int) {
- int128 b = *this;
- -- *this;
-
- return b;
-};
-
-int128 & int128::operator += (const int128 & b) throw () {
- int64u old_lo = this->lo;
-
- this->lo += b.lo;
- this->hi += b.hi + (this->lo < old_lo);
-
- return *this;
-};
-
-int128 & int128::operator *= (const int128 & b) throw () {
- if (!b)
- return *this = 0u;
- if (b == 1u)
- return *this;
-
- int128 a = *this;
- int128 t = b;
-
- this->lo = 0ull;
- this->hi = 0ll;
-
- for (unsigned int i = 0; i < 128; ++i) {
- if (t.lo & 1)
- *this += a << i;
-
- t >>= 1;
- };
-
- return *this;
-};
-
-
-int128 int128::div (const int128 & divisor, int128 & remainder) const throw () {
- if (!divisor)
- return 1u / (unsigned int) divisor.lo;
- // or RaiseException (EXCEPTION_INT_DIVIDE_BY_ZERO,
- // EXCEPTION_NONCONTINUABLE, 0, NULL);
-
- int128 ds = (divisor < 0) ? -divisor : divisor;
- int128 dd = (*this < 0) ? -*this : *this;
-
- // only remainder
- if (ds > dd) {
- remainder = *this;
- return 0ull;
- };
-
- int128 r = 0ull;
- int128 q = 0ull;
-// while (dd >= ds) { dd -= ds; q += 1; }; // extreme slow version
-
- unsigned int b = 127;
- while (r < ds) {
- r <<= 1;
- if (dd.bit (b--))
- r.lo |= 1;
- };
- ++b;
-
- for (;;)
- if (r < ds) {
- if (!(b--)) break;
-
- r <<= 1;
- if (dd.bit (b))
- r.lo |= 1;
-
- } else {
- r -= ds;
- q.bit (b, true);
- };
-
- // correct
- if ((divisor < 0) ^ (*this < 0)) q =- q;
- if (*this < 0) r =- r;
-
- remainder = r;
- return q;
-};
-
-bool int128::bit (unsigned int n) const throw () {
- n &= 0x7F;
-
- if (n < 64)
- return (this->lo & (1ull << n))?true:false;
- else
- return (this->hi & (1ull << (n - 64)))?true:false;
-};
-
-void int128::bit (unsigned int n, bool val) throw () {
- n &= 0x7F;
-
- if (val) {
- if (n < 64) this->lo |= (1ull << n);
- else this->hi |= (1ull << (n - 64));
- } else {
- if (n < 64) this->lo &= ~(1ull << n);
- else this->hi &= ~(1ull << (n - 64));
- };
-};
-
-
-int128 & int128::operator >>= (unsigned int n) throw () {
- n &= 0x7F;
-
- if (n > 63) {
- n -= 64;
- this->lo = this->hi;
-
- if (this->hi < 0) this->hi = -1ll;
- else this->hi = 0ll;
- };
-
- if (n) {
- // shift low qword
- this->lo >>= n;
-
- // get lower N bits of high qword
- int64u mask = 0ull;
- for (unsigned int i = 0; i < n; ++i) mask |= (1ull << i);
-
- // and add them to low qword
- this->lo |= (this->hi & mask) << (64 - n);
-
- // and finally shift also high qword
- this->hi >>= n;
- };
-
- return *this;
-};
-
-int128 & int128::operator <<= (unsigned int n) throw () {
- n &= 0x7F;
-
- if (n > 63) {
- n -= 64;
- this->hi = this->lo;
- this->lo = 0ull;
- };
-
- if (n) {
- // shift high qword
- this->hi <<= n;
-
- // get higher N bits of low qword
- int64u mask = 0ull;
- for (unsigned int i = 0; i < n; ++i) mask |= (1ull << (63 - i));
-
- // and add them to high qword
- this->hi |= (this->lo & mask) >> (64 - n);
-
- // and finally shift also low qword
- this->lo <<= n;
- };
-
- return *this;
-};
-
-bool int128::operator ! () const throw () {
- return !(this->hi || this->lo);
-};
-
-int128 & int128::operator |= (const int128 & b) throw () {
- this->hi |= b.hi;
- this->lo |= b.lo;
-
- return *this;
-};
-
-int128 & int128::operator &= (const int128 & b) throw () {
- this->hi &= b.hi;
- this->lo &= b.lo;
-
- return *this;
-};
-
-int128 & int128::operator ^= (const int128 & b) throw () {
- this->hi ^= b.hi;
- this->lo ^= b.lo;
-
- return *this;
-};
-
-bool operator < (const int128 & a, const int128 & b) throw () {
- if (a.hi == b.hi) {
- if (a.hi < 0)
- return (int64s) a.lo < (int64s) b.lo;
- else
- return a.lo < b.lo;
- } else
- return a.hi < b.hi;
-};
-
-bool operator == (const int128 & a, const int128 & b) throw () {
- return a.hi == b.hi && a.lo == b.lo;
-};
-bool operator && (const int128 & a, const int128 & b) throw () {
- return (a.hi || a.lo) && (b.hi || b.lo);
-};
-bool operator || (const int128 & a, const int128 & b) throw () {
- return (a.hi || a.lo) || (b.hi || b.lo);
-};
-
-} //NameSpace
diff --git a/src/thirdparty/ZenLib/ZenLib/int128s.h b/src/thirdparty/ZenLib/ZenLib/int128s.h
deleted file mode 100644
index c179838d4..000000000
--- a/src/thirdparty/ZenLib/ZenLib/int128s.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// based on http://Tringi.Mx-3.cz
-// Only adapted for ZenLib:
-// - .hpp --> .h
-// - Namespace
-// - int128s alias
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-#ifndef INT128_HPP
-#define INT128_HPP
-
-/*
- Name: int128.hpp
- Copyright: Copyright (C) 2005, Jan Ringos
- Author: Jan Ringos, http://Tringi.Mx-3.cz
-
- Version: 1.1
-*/
-
-#include <exception>
-#include <cstdlib>
-#include <cstdio>
-#ifdef __cplusplus
- #include <new> //for size_t
-#else /* __cplusplus */
- #include <stddef.h> //for size_t
-#endif /* __cplusplus */
-#include "ZenLib/Conf.h"
-
-namespace ZenLib
-{
-
-// CLASS
-
-class int128 {
- private:
- // Binary correct representation of signed 128bit integer
- int64u lo;
- int64s hi;
-
- protected:
- // Some global operator functions must be friends
- friend bool operator < (const int128 &, const int128 &) throw ();
- friend bool operator == (const int128 &, const int128 &) throw ();
- friend bool operator || (const int128 &, const int128 &) throw ();
- friend bool operator && (const int128 &, const int128 &) throw ();
-
- public:
- // Constructors
- inline int128 () throw () : lo(0), hi(0) {};
- inline int128 (const int128 & a) throw () : lo (a.lo), hi (a.hi) {};
-
- inline int128 (const unsigned int & a) throw () : lo (a), hi (0ll) {};
- inline int128 (const signed int & a) throw () : lo (a), hi (0ll) {
- if (a < 0) this->hi = -1ll;
- };
-
- inline int128 (const int64u & a) throw () : lo (a), hi (0ll) {};
- inline int128 (const int64s & a) throw () : lo (a), hi (0ll) {
- if (a < 0) this->hi = -1ll;
- };
-
- int128 (const float a) throw ();
- int128 (const double & a) throw ();
- int128 (const long double & a) throw ();
-
- int128 (const char * sz) throw ();
-
- // TODO: Consider creation of operator= to eliminate
- // the need of intermediate objects during assignments.
-
- private:
- // Special internal constructors
- int128 (const int64u & a, const int64s & b) throw ()
- : lo (a), hi (b) {};
-
- public:
- // Operators
- bool operator ! () const throw ();
-
- int128 operator - () const throw ();
- int128 operator ~ () const throw ();
-
- int128 & operator ++ ();
- int128 & operator -- ();
- int128 operator ++ (int);
- int128 operator -- (int);
-
- int128 & operator += (const int128 & b) throw ();
- int128 & operator *= (const int128 & b) throw ();
-
- int128 & operator >>= (unsigned int n) throw ();
- int128 & operator <<= (unsigned int n) throw ();
-
- int128 & operator |= (const int128 & b) throw ();
- int128 & operator &= (const int128 & b) throw ();
- int128 & operator ^= (const int128 & b) throw ();
-
- // Inline simple operators
- inline const int128 & operator + () const throw () { return *this; };
-
- // Rest of inline operators
- inline int128 & operator -= (const int128 & b) throw () {
- return *this += (-b);
- };
- inline int128 & operator /= (const int128 & b) throw () {
- int128 dummy;
- *this = this->div (b, dummy);
- return *this;
- };
- inline int128 & operator %= (const int128 & b) throw () {
- this->div (b, *this);
- return *this;
- };
-
- // Common methods
- int toInt () const throw () { return (int) this->lo; };
- int64s toInt64 () const throw () { return (int64s) this->lo; };
-
- const char * toString (unsigned int radix = 10) const throw ();
- float toFloat () const throw ();
- double toDouble () const throw ();
- long double toLongDouble () const throw ();
-
- // Arithmetic methods
- int128 div (const int128 &, int128 &) const throw ();
-
- // Bit operations
- bool bit (unsigned int n) const throw ();
- void bit (unsigned int n, bool val) throw ();
-}
-#ifdef __GNUC__
- __attribute__ ((__aligned__ (16), __packed__))
-#endif
-;
-
-
-// GLOBAL OPERATORS
-
-bool operator < (const int128 & a, const int128 & b) throw ();
-bool operator == (const int128 & a, const int128 & b) throw ();
-bool operator || (const int128 & a, const int128 & b) throw ();
-bool operator && (const int128 & a, const int128 & b) throw ();
-
-// GLOBAL OPERATOR INLINES
-
-inline int128 operator + (const int128 & a, const int128 & b) throw () {
- return int128 (a) += b; };
-inline int128 operator - (const int128 & a, const int128 & b) throw () {
- return int128 (a) -= b; };
-inline int128 operator * (const int128 & a, const int128 & b) throw () {
- return int128 (a) *= b; };
-inline int128 operator / (const int128 & a, const int128 & b) throw () {
- return int128 (a) /= b; };
-inline int128 operator % (const int128 & a, const int128 & b) throw () {
- return int128 (a) %= b; };
-
-inline int128 operator >> (const int128 & a, unsigned int n) throw () {
- return int128 (a) >>= n; };
-inline int128 operator << (const int128 & a, unsigned int n) throw () {
- return int128 (a) <<= n; };
-
-inline int128 operator & (const int128 & a, const int128 & b) throw () {
- return int128 (a) &= b; };
-inline int128 operator | (const int128 & a, const int128 & b) throw () {
- return int128 (a) |= b; };
-inline int128 operator ^ (const int128 & a, const int128 & b) throw () {
- return int128 (a) ^= b; };
-
-inline bool operator > (const int128 & a, const int128 & b) throw () {
- return b < a; };
-inline bool operator <= (const int128 & a, const int128 & b) throw () {
- return !(b < a); };
-inline bool operator >= (const int128 & a, const int128 & b) throw () {
- return !(a < b); };
-inline bool operator != (const int128 & a, const int128 & b) throw () {
- return !(a == b); };
-
-
-// MISC
-
-//typedef int128 __int128;
-
-typedef int128 int128s;
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/ZenLib/ZenLib/int128u.cpp b/src/thirdparty/ZenLib/ZenLib/int128u.cpp
deleted file mode 100644
index e0603a30f..000000000
--- a/src/thirdparty/ZenLib/ZenLib/int128u.cpp
+++ /dev/null
@@ -1,390 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// based on http://Tringi.Mx-3.cz
-// Only adapted for ZenLib:
-// - uint128.hpp --> int128u.h
-// - Namespace
-// - int128u alias
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------------------------------------------------------------
-#include "ZenLib/PreComp.h"
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-#include "ZenLib/Conf_Internal.h"
-//---------------------------------------------------------------------------
-
-#include "int128u.h"
-
-/*
- Name: uint128.cpp
- Copyright: Copyright (C) 2005, Jan Ringos
- Author: Jan Ringos, http://Tringi.Mx-3.cz
-
- Version: 1.1
-*/
-
-#include <memory>
-#include <cmath>
-#include <cstring>
-#if defined (__BORLANDC__) || defined (__SUNPRO_CC)
- #define fmodf fmod
-#endif
-#if defined (__NO_LONG_DOUBLE_MATH) || \
- defined (__MONTAVISTA__) || defined (__ARMEL__) || \
- defined (__FreeBSD__) || defined (__OpenBSD__) || \
- defined (__NetBSD__) || defined (__DragonFly__) || \
- defined (__sparc__) || defined (__sparc64__) || \
- defined (__CYGWIN__) || \
- defined (__SUNPRO_CC)
- #define fmodl fmod
-#endif
-using namespace std;
-
-namespace ZenLib
-{
-
-// IMPLEMENTATION
-
-const char * uint128::toString (unsigned int radix) const throw () {
- if (!*this) return "0";
- if (radix < 2 || radix > 37) return "(invalid radix)";
-
- static char sz [256];
- memset (sz, 0, 256);
-
- uint128 r;
- uint128 ii = *this;
- int i = 255;
-
- while (!!ii && i) {
- ii = ii.div (radix, r);
- sz [--i] = (char) (r.toUint () + ((r.toUint () > 9) ? 'A' - 10 : '0'));
- };
-
- return &sz [i];
-};
-
-uint128::uint128 (const char * sz) throw ()
- : lo (0u), hi (0u) {
-
- if (!sz) return;
- if (!sz [0]) return;
-
- unsigned int radix = 10;
- unsigned int i = 0;
- bool minus = false;
-
- if (sz [i] == '-') {
- ++i;
- minus = true;
- };
-
- if (sz [i] == '0') {
- radix = 8;
- ++i;
- if (sz [i] == 'x') {
- radix = 16;
- ++i;
- };
- };
-
- for (; i < strlen (sz); ++i) {
- unsigned int n = 0;
- if (sz [i] >= '0' && sz [i] <= (('0' + (int) radix) < '9'?('0' + (int) radix):'9')) //if (sz [i] >= '0' && sz [i] <= (('0' + (int) radix) <? '9'))
- n = sz [i] - '0';
- else if (sz [i] >= 'a' && sz [i] <= 'a' + (int) radix - 10)
- n = sz [i] - 'a' + 10;
- else if (sz [i] >= 'A' && sz [i] <= 'A' + (int) radix - 10)
- n = sz [i] - 'A' + 10;
- else
- break;
-
- (*this) *= radix;
- (*this) += n;
- };
-
- if (minus)
- *this = 0u - *this;
-
- return;
-};
-
-uint128::uint128 (const float a) throw ()
- #if defined (__mips__) || defined (__mipsel__)
- : lo ((int64u) fmod ((const double)a, 18446744073709551616.0)),
- #else
- : lo ((int64u) fmodf (a, 18446744073709551616.0f)),
- #endif
- hi ((int64u) (a / 18446744073709551616.0f)) {};
-
-uint128::uint128 (const double & a) throw ()
- : lo ((int64u) fmod (a, 18446744073709551616.0)),
- hi ((int64u) (a / 18446744073709551616.0)) {};
-
-uint128::uint128 (const long double & a) throw ()
- #if defined (__mips__) || defined (__mipsel__)
- : lo ((int64u) fmod ((const double)a, 18446744073709551616.0)),
- #else
- : lo ((int64u) fmodl (a, 18446744073709551616.0l)),
- #endif
- hi ((int64u) (a / 18446744073709551616.0l)) {};
-
-float uint128::toFloat () const throw () {
- return (float) this->hi * 18446744073709551616.0f
- + (float) this->lo;
-};
-
-double uint128::toDouble () const throw () {
- return (double) this->hi * 18446744073709551616.0
- + (double) this->lo;
-};
-
-long double uint128::toLongDouble () const throw () {
- return (long double) this->hi * 18446744073709551616.0l
- + (long double) this->lo;
-};
-
-uint128 uint128::operator - () const throw () {
- if (!this->hi && !this->lo)
- // number is 0, just return 0
- return *this;
- else
- // non 0 number
- return uint128 (0-this->lo, ~this->hi);
-};
-
-uint128 uint128::operator ~ () const throw () {
- return uint128 (~this->lo, ~this->hi);
-};
-
-uint128 & uint128::operator ++ () {
- ++this->lo;
- if (!this->lo)
- ++this->hi;
-
- return *this;
-};
-
-uint128 & uint128::operator -- () {
- if (!this->lo)
- --this->hi;
- --this->lo;
-
- return *this;
-};
-
-uint128 uint128::operator ++ (int) {
- uint128 b = *this;
- ++ *this;
-
- return b;
-};
-
-uint128 uint128::operator -- (int) {
- uint128 b = *this;
- -- *this;
-
- return b;
-};
-
-uint128 & uint128::operator += (const uint128 & b) throw () {
- int64u old_lo = this->lo;
-
- this->lo += b.lo;
- this->hi += b.hi + (this->lo < old_lo);
-
- return *this;
-};
-
-uint128 & uint128::operator *= (const uint128 & b) throw () {
- if (!b)
- return *this = 0u;
- if (b == 1u)
- return *this;
-
- uint128 a = *this;
- uint128 t = b;
-
- this->lo = 0ull;
- this->hi = 0ull;
-
- for (unsigned int i = 0; i < 128; ++i) {
- if (t.lo & 1)
- *this += a << i;
-
- t >>= 1;
- };
-
- return *this;
-};
-
-
-uint128 uint128::div (const uint128 & ds, uint128 & remainder) const throw () {
- if (!ds)
- return 1u / (unsigned int) ds.lo;
-
- uint128 dd = *this;
-
- // only remainder
- if (ds > dd) {
- remainder = *this;
- return 0ull;
- };
-
- uint128 r = 0ull;
- uint128 q = 0ull;
-// while (dd >= ds) { dd -= ds; q += 1; }; // extreme slow version
-
- unsigned int b = 127;
- while (r < ds) {
- r <<= 1;
- if (dd.bit (b--))
- r.lo |= 1;
- };
- ++b;
-
- for (;;)
- if (r < ds) {
- if (!(b--)) break;
-
- r <<= 1;
- if (dd.bit (b))
- r.lo |= 1;
-
- } else {
- r -= ds;
- q.bit (b, true);
- };
-
- remainder = r;
- return q;
-};
-
-bool uint128::bit (unsigned int n) const throw () {
- n &= 0x7F;
-
- if (n < 64)
- return (this->lo & (1ull << n))?true:false;
- else
- return (this->hi & (1ull << (n - 64)))?true:false;
-};
-
-void uint128::bit (unsigned int n, bool val) throw () {
- n &= 0x7F;
-
- if (val) {
- if (n < 64) this->lo |= (1ull << n);
- else this->hi |= (1ull << (n - 64));
- } else {
- if (n < 64) this->lo &= ~(1ull << n);
- else this->hi &= ~(1ull << (n - 64));
- };
-};
-
-
-uint128 & uint128::operator >>= (unsigned int n) throw () {
- n &= 0x7F;
-
- if (n > 63) {
- n -= 64;
- this->lo = this->hi;
- this->hi = 0ull;
- };
-
- if (n) {
- // shift low qword
- this->lo >>= n;
-
- // get lower N bits of high qword
- int64u mask = 0ull;
- for (unsigned int i = 0; i < n; ++i) mask |= (1ull << i);
-
- // and add them to low qword
- this->lo |= (this->hi & mask) << (64 - n);
-
- // and finally shift also high qword
- this->hi >>= n;
- };
-
- return *this;
-};
-
-uint128 & uint128::operator <<= (unsigned int n) throw () {
- n &= 0x7F;
-
- if (n > 63) {
- n -= 64;
- this->hi = this->lo;
- this->lo = 0ull;
- };
-
- if (n) {
- // shift high qword
- this->hi <<= n;
-
- // get higher N bits of low qword
- int64u mask = 0ull;
- for (unsigned int i = 0; i < n; ++i) mask |= (1ull << (63 - i));
-
- // and add them to high qword
- this->hi |= (this->lo & mask) >> (64 - n);
-
- // and finally shift also low qword
- this->lo <<= n;
- };
-
- return *this;
-};
-
-bool uint128::operator ! () const throw () {
- return !(this->hi || this->lo);
-};
-
-uint128 & uint128::operator |= (const uint128 & b) throw () {
- this->hi |= b.hi;
- this->lo |= b.lo;
-
- return *this;
-};
-
-uint128 & uint128::operator &= (const uint128 & b) throw () {
- this->hi &= b.hi;
- this->lo &= b.lo;
-
- return *this;
-};
-
-uint128 & uint128::operator ^= (const uint128 & b) throw () {
- this->hi ^= b.hi;
- this->lo ^= b.lo;
-
- return *this;
-};
-
-bool operator < (const uint128 & a, const uint128 & b) throw () {
- return (a.hi == b.hi) ? (a.lo < b.lo) : (a.hi < b.hi);
-};
-
-bool operator == (const uint128 & a, const uint128 & b) throw () {
- return a.hi == b.hi && a.lo == b.lo;
-};
-bool operator && (const uint128 & a, const uint128 & b) throw () {
- return (a.hi || a.lo) && (b.hi || b.lo);
-};
-bool operator || (const uint128 & a, const uint128 & b) throw () {
- return (a.hi || a.lo) || (b.hi || b.lo);
-};
-
-} //NameSpace
diff --git a/src/thirdparty/ZenLib/ZenLib/int128u.h b/src/thirdparty/ZenLib/ZenLib/int128u.h
deleted file mode 100644
index e2a422df7..000000000
--- a/src/thirdparty/ZenLib/ZenLib/int128u.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
- *
- * Use of this source code is governed by a zlib-style license that can
- * be found in the License.txt file in the root of the source tree.
- */
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//
-// based on http://Tringi.Mx-3.cz
-// Only adapted for ZenLib:
-// - .hpp --> .h
-// - Namespace
-// - int128u alias
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-#ifndef UINT128_HPP
-#define UINT128_HPP
-
-/*
- Name: uint128.hpp
- Copyright: Copyright (C) 2005, Jan Ringos
- Author: Jan Ringos, http://Tringi.Mx-3.cz
-
- Version: 1.1
-*/
-
-
-#include <exception>
-#include <cstdlib>
-#include <cstdio>
-#include "ZenLib/Conf.h"
-
-// CLASS
-
-namespace ZenLib
-{
-
-class uint128 {
- public://private:
- // Binary correct representation of signed 128bit integer
- int64u lo;
- int64u hi;
-
- protected:
- // Some global operator functions must be friends
- friend bool operator < (const uint128 &, const uint128 &) throw ();
- friend bool operator == (const uint128 &, const uint128 &) throw ();
- friend bool operator || (const uint128 &, const uint128 &) throw ();
- friend bool operator && (const uint128 &, const uint128 &) throw ();
-
- public:
- // Constructors
- inline uint128 () throw () : lo(0), hi(0) {};
- inline uint128 (const uint128 & a) throw () : lo (a.lo), hi (a.hi) {};
-
- inline uint128 (const int & a) throw () : lo (a), hi (0ull) {};
- inline uint128 (const unsigned int & a) throw () : lo (a), hi (0ull) {};
- inline uint128 (const int64u & a) throw () : lo (a), hi (0ull) {};
-
- uint128 (const float a) throw ();
- uint128 (const double & a) throw ();
- uint128 (const long double & a) throw ();
-
- uint128 (const char * sz) throw ();
-
- // TODO: Consider creation of operator= to eliminate
- // the need of intermediate objects during assignments.
-
- private:
- // Special internal constructors
- uint128 (const int64u & a, const int64u & b) throw ()
- : lo (a), hi (b) {};
-
- public:
- // Operators
- bool operator ! () const throw ();
-
- uint128 operator - () const throw ();
- uint128 operator ~ () const throw ();
-
- uint128 & operator ++ ();
- uint128 & operator -- ();
- uint128 operator ++ (int);
- uint128 operator -- (int);
-
- uint128 & operator += (const uint128 & b) throw ();
- uint128 & operator *= (const uint128 & b) throw ();
-
- uint128 & operator >>= (unsigned int n) throw ();
- uint128 & operator <<= (unsigned int n) throw ();
-
- uint128 & operator |= (const uint128 & b) throw ();
- uint128 & operator &= (const uint128 & b) throw ();
- uint128 & operator ^= (const uint128 & b) throw ();
-
- // Inline simple operators
- inline const uint128 & operator + () const throw () { return *this; };
-
- // Rest of inline operators
- inline uint128 & operator -= (const uint128 & b) throw () {
- return *this += (-b);
- };
- inline uint128 & operator /= (const uint128 & b) throw () {
- uint128 dummy;
- *this = this->div (b, dummy);
- return *this;
- };
- inline uint128 & operator %= (const uint128 & b) throw () {
- this->div (b, *this);
- return *this;
- };
-
- // Common methods
- unsigned int toUint () const throw () {
- return (unsigned int) this->lo; };
- int64u toUint64 () const throw () {
- return (int64u) this->lo; };
- const char * toString (unsigned int radix = 10) const throw ();
- float toFloat () const throw ();
- double toDouble () const throw ();
- long double toLongDouble () const throw ();
-
- // Arithmetic methods
- uint128 div (const uint128 &, uint128 &) const throw ();
-
- // Bit operations
- bool bit (unsigned int n) const throw ();
- void bit (unsigned int n, bool val) throw ();
-}
-#ifdef __GNUC__
- __attribute__ ((__aligned__ (16), __packed__))
-#endif
-;
-
-
-// GLOBAL OPERATORS
-
-bool operator < (const uint128 & a, const uint128 & b) throw ();
-bool operator == (const uint128 & a, const uint128 & b) throw ();
-bool operator || (const uint128 & a, const uint128 & b) throw ();
-bool operator && (const uint128 & a, const uint128 & b) throw ();
-
-// GLOBAL OPERATOR INLINES
-
-inline uint128 operator + (const uint128 & a, const uint128 & b) throw () {
- return uint128 (a) += b; };
-inline uint128 operator - (const uint128 & a, const uint128 & b) throw () {
- return uint128 (a) -= b; };
-inline uint128 operator * (const uint128 & a, const uint128 & b) throw () {
- return uint128 (a) *= b; };
-inline uint128 operator / (const uint128 & a, const uint128 & b) throw () {
- return uint128 (a) /= b; };
-inline uint128 operator % (const uint128 & a, const uint128 & b) throw () {
- return uint128 (a) %= b; };
-
-inline uint128 operator >> (const uint128 & a, unsigned int n) throw () {
- return uint128 (a) >>= n; };
-inline uint128 operator << (const uint128 & a, unsigned int n) throw () {
- return uint128 (a) <<= n; };
-
-inline uint128 operator & (const uint128 & a, const uint128 & b) throw () {
- return uint128 (a) &= b; };
-inline uint128 operator | (const uint128 & a, const uint128 & b) throw () {
- return uint128 (a) |= b; };
-inline uint128 operator ^ (const uint128 & a, const uint128 & b) throw () {
- return uint128 (a) ^= b; };
-
-inline bool operator > (const uint128 & a, const uint128 & b) throw () {
- return b < a; };
-inline bool operator <= (const uint128 & a, const uint128 & b) throw () {
- return !(b < a); };
-inline bool operator >= (const uint128 & a, const uint128 & b) throw () {
- return !(a < b); };
-inline bool operator != (const uint128 & a, const uint128 & b) throw () {
- return !(a == b); };
-
-
-// MISC
-
-typedef uint128 __uint128;
-
-typedef uint128 int128u;
-} //NameSpace
-
-#endif
diff --git a/src/thirdparty/ZenLib/library b/src/thirdparty/ZenLib/library
new file mode 160000
+Subproject a0fe5c16604f526462aba2a6cfd53b6ce41fbc2
diff --git a/src/thirdparty/bs2b/bs2b.vcxproj b/src/thirdparty/bs2b/bs2b.vcxproj
new file mode 100644
index 000000000..3fcf1532a
--- /dev/null
+++ b/src/thirdparty/bs2b/bs2b.vcxproj
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{0FD9BF8F-2397-4E23-B41E-E4624F35D646}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <Import Project="..\..\platform.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\common.props" />
+ <Import Project="..\..\common-3rd-party.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="libbs2b\src\bs2b.c" />
+ <ClCompile Include="libbs2b\src\bs2bclass.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="libbs2b\src\bs2b.h" />
+ <ClInclude Include="libbs2b\src\bs2bclass.h" />
+ <ClInclude Include="libbs2b\src\bs2btypes.h" />
+ <ClInclude Include="libbs2b\src\bs2bversion.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/thirdparty/bs2b/libbs2b b/src/thirdparty/bs2b/libbs2b
new file mode 160000
+Subproject 5ca2d59888df047f1e4b028e3a2fd5be8b5a727
diff --git a/src/thirdparty/lcms2/lcms2.vcxproj b/src/thirdparty/lcms2/lcms2.vcxproj
index a80f880f7..86bb9ddc8 100644
--- a/src/thirdparty/lcms2/lcms2.vcxproj
+++ b/src/thirdparty/lcms2/lcms2.vcxproj
@@ -100,6 +100,7 @@
<ClInclude Include="library\src\lcms2_internal.h" />
</ItemGroup>
<ItemGroup>
+ <ClCompile Include="library\src\cmsalpha.c" />
<ClCompile Include="library\src\cmscam02.c" />
<ClCompile Include="library\src\cmscgats.c" />
<ClCompile Include="library\src\cmscnvrt.c" />
diff --git a/src/thirdparty/lcms2/lcms2.vcxproj.filters b/src/thirdparty/lcms2/lcms2.vcxproj.filters
index 0819123c8..dcb2a8a15 100644
--- a/src/thirdparty/lcms2/lcms2.vcxproj.filters
+++ b/src/thirdparty/lcms2/lcms2.vcxproj.filters
@@ -22,6 +22,9 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
+ <ClCompile Include="library\src\cmsalpha.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
<ClCompile Include="library\src\cmscam02.c">
<Filter>Source Files</Filter>
</ClCompile>
diff --git a/src/thirdparty/lcms2/library b/src/thirdparty/lcms2/library
-Subproject 6e33faabae068b21a1c1d18a1297917b6bb1a11
+Subproject 07da965b104b9e0b4eae34dcaa30445a835411e
diff --git a/src/thirdparty/sanear/sanear b/src/thirdparty/sanear/sanear
new file mode 160000
+Subproject 27f58cdf431a4dbd905c4cb22391a2f800ce8a4
diff --git a/src/thirdparty/sanear/sanear-platform.props b/src/thirdparty/sanear/sanear-platform.props
new file mode 100644
index 000000000..5f87a8a5d
--- /dev/null
+++ b/src/thirdparty/sanear/sanear-platform.props
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)src\platform.props" />
+</Project>
diff --git a/src/thirdparty/sanear/sanear.props b/src/thirdparty/sanear/sanear.props
new file mode 100644
index 000000000..b9e6ec90b
--- /dev/null
+++ b/src/thirdparty/sanear/sanear.props
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)src\common.props" />
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(SolutionDir)src\thirdparty\BaseClasses;$(SolutionDir)src\thirdparty\soxr\libsoxr\src;$(SolutionDir)src\thirdparty\bs2b\libbs2b\src;$(SolutionDir)src\thirdparty\SoundTouch\soundtouch\include;$(SolutionDir)src\thirdparty\zita-resampler\zita-resampler\libs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+</Project>
diff --git a/src/thirdparty/soxr/libsoxr b/src/thirdparty/soxr/libsoxr
new file mode 160000
+Subproject e064aba6ac16fb8f1fa64bc692e54230cec1b3a
diff --git a/src/thirdparty/soxr/soxr-config.h b/src/thirdparty/soxr/soxr-config.h
new file mode 100644
index 000000000..55dedf78b
--- /dev/null
+++ b/src/thirdparty/soxr/soxr-config.h
@@ -0,0 +1,13 @@
+#pragma once
+
+#define HAVE_SINGLE_PRECISION 1
+#define HAVE_DOUBLE_PRECISION 1
+#define HAVE_SIMD 1
+#define HAVE_FENV_H 1
+#define HAVE_LRINT 1
+
+#define HAVE_AVFFT 0
+#define WORDS_BIGENDIAN 0
+
+#include <inttypes.h>
+#include <stdbool.h>
diff --git a/src/thirdparty/soxr/soxr.vcxproj b/src/thirdparty/soxr/soxr.vcxproj
new file mode 100644
index 000000000..e3ad7990d
--- /dev/null
+++ b/src/thirdparty/soxr/soxr.vcxproj
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{7CBDE5A1-9CBB-4139-93F5-09D8DBA4427F}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <Import Project="..\..\platform.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\common.props" />
+ <Import Project="..\..\common-3rd-party.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_USE_MATH_DEFINES;_CRT_SECURE_NO_WARNINGS;SOXR_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="libsoxr\src\data-io.c" />
+ <ClCompile Include="libsoxr\src\dbesi0.c" />
+ <ClCompile Include="libsoxr\src\fft4g32.c" />
+ <ClCompile Include="libsoxr\src\fft4g64.c" />
+ <ClCompile Include="libsoxr\src\filter.c" />
+ <ClCompile Include="libsoxr\src\lsr.c" />
+ <ClCompile Include="libsoxr\src\pffft32s.c" />
+ <ClCompile Include="libsoxr\src\rate32.c" />
+ <ClCompile Include="libsoxr\src\rate32s.c" />
+ <ClCompile Include="libsoxr\src\rate64.c" />
+ <ClCompile Include="libsoxr\src\simd.c" />
+ <ClCompile Include="libsoxr\src\soxr.c" />
+ <ClCompile Include="libsoxr\src\vr32.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="libsoxr\src\soxr.h" />
+ <ClInclude Include="soxr-config.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/thirdparty/soxr/soxr.vcxproj.filters b/src/thirdparty/soxr/soxr.vcxproj.filters
new file mode 100644
index 000000000..9fbb00b9b
--- /dev/null
+++ b/src/thirdparty/soxr/soxr.vcxproj.filters
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="libsoxr">
+ <UniqueIdentifier>{e76300b5-2f4a-48a9-b672-aeefb9e98c4d}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="libsoxr\src\data-io.c">
+ <Filter>libsoxr</Filter>
+ </ClCompile>
+ <ClCompile Include="libsoxr\src\dbesi0.c">
+ <Filter>libsoxr</Filter>
+ </ClCompile>
+ <ClCompile Include="libsoxr\src\fft4g32.c">
+ <Filter>libsoxr</Filter>
+ </ClCompile>
+ <ClCompile Include="libsoxr\src\fft4g64.c">
+ <Filter>libsoxr</Filter>
+ </ClCompile>
+ <ClCompile Include="libsoxr\src\filter.c">
+ <Filter>libsoxr</Filter>
+ </ClCompile>
+ <ClCompile Include="libsoxr\src\lsr.c">
+ <Filter>libsoxr</Filter>
+ </ClCompile>
+ <ClCompile Include="libsoxr\src\pffft32s.c">
+ <Filter>libsoxr</Filter>
+ </ClCompile>
+ <ClCompile Include="libsoxr\src\rate32.c">
+ <Filter>libsoxr</Filter>
+ </ClCompile>
+ <ClCompile Include="libsoxr\src\rate32s.c">
+ <Filter>libsoxr</Filter>
+ </ClCompile>
+ <ClCompile Include="libsoxr\src\rate64.c">
+ <Filter>libsoxr</Filter>
+ </ClCompile>
+ <ClCompile Include="libsoxr\src\simd.c">
+ <Filter>libsoxr</Filter>
+ </ClCompile>
+ <ClCompile Include="libsoxr\src\soxr.c">
+ <Filter>libsoxr</Filter>
+ </ClCompile>
+ <ClCompile Include="libsoxr\src\vr32.c">
+ <Filter>libsoxr</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="soxr-config.h" />
+ <ClInclude Include="libsoxr\src\soxr.h" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/thirdparty/versions.txt b/src/thirdparty/versions.txt
index b2ced440e..c924e2c5c 100644
--- a/src/thirdparty/versions.txt
+++ b/src/thirdparty/versions.txt
@@ -1,19 +1,23 @@
Project Version
----------------------------------------
+bs2b 3.1.0 (modified)
CSizingControlBar 2.45 (modified)
-LAV Filters 0.65-13-79ba86d (custom build based on 0.65-9-5c5ff95)
-Little CMS 2.7 (git 6e33faa)
+LAV Filters 0.66-4-0745609 (custom build based on 0.66.0)
+Little CMS 2.7 (git 07da965)
Logitech SDK 3.01 (driver 8.00.100)
-MediaInfoLib 0.7.73
+MediaInfoLib 0.7.75
Mhook 2.3 (modified)
MultiMon 28 Aug '03 (modified)
QuickTime SDK 7.3
RARFileSource 0.9.3 (modified)
RealMedia SDK -
ResizableLib 1.3
+sanear 0.2
SoundTouch 1.9.0
+soxr 0.1.2
TreePropSheet 7 Mar '03 (modified)
UnRAR 5.2.7
VirtualDub 1.10.4
ZenLib 0.4.31
+zita-resampler 1.3.0
zlib 1.2.8
diff --git a/src/thirdparty/zita-resampler/zita-resampler.vcxproj b/src/thirdparty/zita-resampler/zita-resampler.vcxproj
new file mode 100644
index 000000000..47601a38d
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler.vcxproj
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{F3D02050-F39A-4103-8343-09285359A495}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <Import Project="..\..\platform.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\common.props" />
+ <Import Project="..\..\common-3rd-party.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>zita-resampler\libs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="zita-resampler\libs\zita-resampler\resampler-table.h" />
+ <ClInclude Include="zita-resampler\libs\zita-resampler\resampler.h" />
+ <ClInclude Include="zita-resampler\libs\zita-resampler\vresampler.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="zita-resampler\libs\resampler-table.cc" />
+ <ClCompile Include="zita-resampler\libs\resampler.cc" />
+ <ClCompile Include="zita-resampler\libs\vresampler.cc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/thirdparty/zita-resampler/zita-resampler/AUTHORS b/src/thirdparty/zita-resampler/zita-resampler/AUTHORS
new file mode 100644
index 000000000..7ae619025
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/AUTHORS
@@ -0,0 +1 @@
+Fons Adriaensen <fons@linuxaudio.org>
diff --git a/src/thirdparty/zita-resampler/zita-resampler/COPYING b/src/thirdparty/zita-resampler/zita-resampler/COPYING
new file mode 100644
index 000000000..94a9ed024
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/src/thirdparty/zita-resampler/zita-resampler/INSTALL b/src/thirdparty/zita-resampler/zita-resampler/INSTALL
new file mode 100644
index 000000000..b71e6fab2
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/INSTALL
@@ -0,0 +1,31 @@
+Dependencies
+------------
+
+The zita-resampler library does not depend on any
+non-standard libraries.
+
+The 'zresample' and 'zretune' application depend on libsndfile
+and the corresponding headers.
+
+Installing the library
+----------------------
+
+To make and install the library, cd to the libs directory,
+make, sudo make install. This will install the lib and
+header file in /usr/lib and /usr/include. To install in
+any other directory, modify the definition of 'PREFIX' in
+the Makefile.
+After the install you can do a 'make clean' to return the
+libs directory to its original state.
+
+
+Installing the application(s)
+----------------------------
+
+To make and install the application(s), you first need to
+make and install the library. Then cd to the apps directory,
+make, sudo make install. This will install the apps in
+/usr/local/bin. To install in other any directory, modify
+the definition of 'PREFIX' in the Makefile.
+After the install you can do a 'make clean' to return the
+apps directory to its original state.
diff --git a/src/thirdparty/zita-resampler/zita-resampler/README b/src/thirdparty/zita-resampler/zita-resampler/README
new file mode 100644
index 000000000..1ebd8a6ba
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/README
@@ -0,0 +1,45 @@
+Zita-resampler is a C++ library for sample rate conversion of
+audio signals. Full documentation is available in HTML format,
+see the 'docs' directory.
+
+
+Release 1.3.0 (26/10/2012)
+---------------------------
+
+* Bugfix for 64-bit systems.
+
+
+Release 1.2.0 (25/09/2012)
+---------------------------
+
+* Added the zretune application and its manpage.
+
+
+Release 1.1.0 (26/01/2012)
+---------------------------
+
+* VResampler class added - provides arbitrary and variable
+ resampling ratio, see docs.
+
+* This release is NOT binary compatible with previous ones
+ (0.x.x) and requires recompilation of applications using it.
+
+* This release is API compatible with the previous one. But if
+ you are using the now deprecated filtlen() function please
+ replace this by inpsize() which provides the same information.
+
+* The inpdist() function has been added, see docs.
+
+* The ratio_a() and ratio_b() calls have been removed, if this
+ is a problem (I'd be surprised) they can be added again.
+
+* The include files are now in $PREFIX/include/zita-resampler/.
+ Please DO remove any old ones manually after installing this
+ version. Compiling using the old includes and linking with
+ the new library will create havoc.
+
+* #defines and static functions are added for compile time and
+ run time version checking, see resampler-table.h.
+
+--
+FA
diff --git a/src/thirdparty/zita-resampler/zita-resampler/apps/Makefile b/src/thirdparty/zita-resampler/zita-resampler/apps/Makefile
new file mode 100644
index 000000000..a0f56ae32
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/apps/Makefile
@@ -0,0 +1,73 @@
+# ----------------------------------------------------------------------------
+#
+# Copyright (C) 2006-2011 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http:#www.gnu.org/licenses/>.
+#
+# ----------------------------------------------------------------------------
+
+
+PREFIX = /usr/local
+SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
+LIBDIR = lib$(SUFFIX)
+DISTDIR = zresample-$(VERSION)
+VERSION = 0.4.0
+MANDIR = /usr/share/man/man1
+LDFLAGS += -L$(PREFIX)/$(LIBDIR)
+CPPFLAGS += -MMD -MP -DVERSION=\"$(VERSION)\"
+CXXFLAGS += -O3 -ffast-math -Wall
+CXXFLAGS += -march=native
+
+
+all: zresample zretune zresample.1.gz zretune.1.gz
+
+
+ZRESAMPLE_O = zresample.o audiofile.o dither.o
+zresample: LDLIBS += -lzita-resampler -lsndfile -lrt
+zresample: $(ZRESAMPLE_O)
+ g++ $(LDFLAGS) -o $@ $(ZRESAMPLE_O) $(LDLIBS)
+$(ZRESAMPLE_O):
+-include $(ZRESAMPLE_O:%.o=%.d)
+
+
+ZRETUNE_O = zretune.o audiofile.o dither.o
+zretune: LDLIBS += -lzita-resampler -lsndfile -lrt
+zretune: $(ZRETUNE_O)
+ g++ $(LDFLAGS) -o $@ $(ZRETUNE_O) $(LDLIBS)
+$(ZRETUNE_O):
+-include $(ZRETUNE_O:%.o=%.d)
+
+
+zresample.1.gz: zresample.1
+ gzip -c zresample.1 > zresample.1.gz
+
+zretune.1.gz: zretune.1
+ gzip -c zretune.1 > zretune.1.gz
+
+
+install: all
+ install -Dm 755 zresample $(DESTDIR)$(PREFIX)/bin/zresample
+ install -Dm 755 zretune $(DESTDIR)$(PREFIX)/bin/zretune
+ install -Dm 644 zresample.1.gz $(DESTDIR)$(MANDIR)/zresample.1.gz
+ install -Dm 644 zretune.1.gz $(DESTDIR)$(MANDIR)/zretune.1.gz
+
+uninstall:
+ /bin/rm -f $(DESTDIR)$(PREFIX)/bin/zresample
+ /bin/rm -f $(DESTDIR)$(PREFIX)/bin/zretune
+ /bin/rm -f $(MANDIR)/zresample.1.gz
+ /bin/rm -f $(MANDIR)/zretune.1.gz
+
+clean:
+ /bin/rm -f *~ *.o *.a *.d *.so *.gz zresample zretune
+
diff --git a/src/thirdparty/zita-resampler/zita-resampler/apps/audiofile.cc b/src/thirdparty/zita-resampler/zita-resampler/apps/audiofile.cc
new file mode 100644
index 000000000..f6c3c7db1
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/apps/audiofile.cc
@@ -0,0 +1,270 @@
+// ----------------------------------------------------------------------------
+//
+// Copyright (C) 2006-2011 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+//
+// ----------------------------------------------------------------------------
+
+
+#include <stdlib.h>
+#include <string.h>
+#include "audiofile.h"
+
+
+Audiofile::Audiofile (void)
+{
+ reset ();
+}
+
+
+Audiofile::~Audiofile (void)
+{
+ close ();
+}
+
+
+void Audiofile::reset (void)
+{
+ _sndfile = 0;
+ _mode = MODE_NONE;
+ _type = TYPE_OTHER;
+ _form = FORM_OTHER;
+ _rate = 0;
+ _chan = 0;
+ _size = 0;
+ _dith_type = 0;
+ _dith_proc = 0;
+ _dith_buff = 0;
+}
+
+
+int Audiofile::open_read (const char *name)
+{
+ SF_INFO I;
+
+ if (_mode) return ERR_MODE;
+ reset ();
+
+ if ((_sndfile = sf_open (name, SFM_READ, &I)) == 0) return ERR_OPEN;
+
+ _mode = MODE_READ;
+
+ switch (I.format & SF_FORMAT_TYPEMASK)
+ {
+ case SF_FORMAT_CAF:
+ _type = TYPE_CAF;
+ break;
+ case SF_FORMAT_WAV:
+ _type = TYPE_WAV;
+ break;
+ case SF_FORMAT_WAVEX:
+ if (sf_command (_sndfile, SFC_WAVEX_GET_AMBISONIC, 0, 0) == SF_AMBISONIC_B_FORMAT)
+ _type = TYPE_AMB;
+ else
+ _type = TYPE_WAV;
+ }
+
+ switch (I.format & SF_FORMAT_SUBMASK)
+ {
+ case SF_FORMAT_PCM_16:
+ _form = FORM_16BIT;
+ break;
+ case SF_FORMAT_PCM_24:
+ _form = FORM_24BIT;
+ break;
+ case SF_FORMAT_PCM_32:
+ _form = FORM_32BIT;
+ break;
+ case SF_FORMAT_FLOAT:
+ _form = FORM_FLOAT;
+ break;
+ }
+
+ _rate = I.samplerate;
+ _chan = I.channels;
+ _size = I.frames;
+
+ return 0;
+}
+
+
+int Audiofile::open_write (const char *name, int type, int form, int rate, int chan)
+{
+ SF_INFO I;
+
+ if (_mode) return ERR_MODE;
+ if (!rate || !chan) return ERR_OPEN;
+ reset ();
+
+ switch (type)
+ {
+ case TYPE_CAF:
+ I.format = SF_FORMAT_CAF;
+ break;
+ case TYPE_WAV:
+ case TYPE_AMB:
+ I.format = (chan > 2) ? SF_FORMAT_WAVEX : SF_FORMAT_WAV;
+ break;
+ default:
+ return ERR_TYPE;
+ }
+
+ switch (form)
+ {
+ case FORM_16BIT:
+ I.format |= SF_FORMAT_PCM_16;
+ break;
+ case FORM_24BIT:
+ I.format |= SF_FORMAT_PCM_24;
+ break;
+ case FORM_32BIT:
+ I.format |= SF_FORMAT_PCM_32;
+ break;
+ case FORM_FLOAT:
+ I.format |= SF_FORMAT_FLOAT;
+ break;
+ default:
+ return ERR_FORM;
+ }
+
+ I.samplerate = rate;
+ I.channels = chan;
+ I.sections = 1;
+
+ if ((_sndfile = sf_open (name, SFM_WRITE, &I)) == 0) return ERR_OPEN;
+
+ if (type == TYPE_AMB)
+ {
+ sf_command (_sndfile, SFC_WAVEX_SET_AMBISONIC, 0, SF_AMBISONIC_B_FORMAT);
+ }
+
+ _mode = MODE_WRITE;
+ _type = type;
+ _form = form;
+ _rate = rate;
+ _chan = chan;
+
+ return 0;
+}
+
+
+int Audiofile::set_dither (int type)
+{
+ if (_mode != MODE_WRITE) return ERR_MODE;
+ if (_form != FORM_16BIT) return ERR_FORM;
+ if (type != DITHER_NONE)
+ {
+ if (_dith_type == DITHER_NONE)
+ {
+ _dith_proc = new Dither [_chan];
+ _dith_buff = new int16_t [_chan * BUFFSIZE];
+ }
+ }
+ _dith_type = type;
+ return 0;
+}
+
+
+int Audiofile::close (void)
+{
+ if (_sndfile) sf_close (_sndfile);
+ delete[] _dith_proc;
+ delete[] _dith_buff;
+ reset ();
+ return 0;
+}
+
+
+int Audiofile::seek (uint32_t posit)
+{
+ if (!_sndfile) return ERR_MODE;
+ if (sf_seek (_sndfile, posit, SEEK_SET) != posit) return ERR_SEEK;
+ return 0;
+}
+
+
+int Audiofile::read (float *data, uint32_t frames)
+{
+ if (_mode != MODE_READ) return ERR_MODE;
+ return sf_readf_float (_sndfile, data, frames);
+}
+
+
+int Audiofile::write (float *data, uint32_t frames)
+{
+ int i;
+ uint32_t k, n, r;
+ float *p, v;
+ int16_t *q;
+ Dither *D;
+
+ if (_mode != MODE_WRITE) return ERR_MODE;
+ if (_dith_type == DITHER_NONE)
+ {
+ if (_form != FORM_FLOAT)
+ {
+ for (i = 0; i < _chan; i++)
+ {
+ p = data + i;
+ for (k = 0; k < frames; k++)
+ {
+ v = *p;
+ if (v > 1.0f) v = 1.0f;
+ else if (v < -1.0f) v = -1.0f;
+ *p = v;
+ p += _chan;
+ }
+ }
+ }
+ return sf_writef_float (_sndfile, data, frames);
+ }
+ else
+ {
+ n = 0;
+ while (frames)
+ {
+ k = (frames > BUFFSIZE) ? BUFFSIZE : frames;
+ p = data;
+ q = _dith_buff;
+ D = _dith_proc;
+ for (i = 0; i < _chan; i++)
+ {
+ switch (_dith_type)
+ {
+ case DITHER_RECT:
+ D->proc_rectangular (p, q, _chan, k);
+ break;
+ case DITHER_TRIA:
+ D->proc_triangular (p, q, _chan, k);
+ break;
+ case DITHER_LIPS:
+ D->proc_lipschitz (p, q, _chan, k);
+ break;
+ }
+ p++;
+ q++;
+ D++;
+ }
+ r = sf_writef_short (_sndfile, _dith_buff, k);
+ n += r;
+ if (r != k) return n;
+ data += k * _chan;
+ frames -= k;
+ }
+ }
+ return 0;
+}
+
+
diff --git a/src/thirdparty/zita-resampler/zita-resampler/apps/audiofile.h b/src/thirdparty/zita-resampler/zita-resampler/apps/audiofile.h
new file mode 100644
index 000000000..2a9be2b41
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/apps/audiofile.h
@@ -0,0 +1,119 @@
+// ----------------------------------------------------------------------------
+//
+// Copyright (C) 2006-2011 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+//
+// ----------------------------------------------------------------------------
+
+
+#ifndef __AUDIOFILE_H
+#define __AUDIOFILE_H
+
+
+#include <stdio.h>
+#include <stdint.h>
+#include <sndfile.h>
+#include "dither.h"
+
+
+class Audiofile
+{
+public:
+
+ enum
+ {
+ MODE_NONE,
+ MODE_READ,
+ MODE_WRITE
+ };
+
+ enum
+ {
+ TYPE_OTHER,
+ TYPE_CAF,
+ TYPE_WAV,
+ TYPE_AMB
+ };
+
+ enum
+ {
+ FORM_OTHER,
+ FORM_16BIT,
+ FORM_24BIT,
+ FORM_32BIT,
+ FORM_FLOAT,
+ };
+
+ enum
+ {
+ DITHER_NONE,
+ DITHER_RECT,
+ DITHER_TRIA,
+ DITHER_LIPS,
+ };
+
+ enum
+ {
+ ERR_NONE = 0,
+ ERR_MODE = -1,
+ ERR_TYPE = -2,
+ ERR_FORM = -3,
+ ERR_OPEN = -4,
+ ERR_SEEK = -5,
+ ERR_DATA = -6,
+ ERR_READ = -7,
+ ERR_WRITE = -8
+ };
+
+ Audiofile (void);
+ ~Audiofile (void);
+
+ int mode (void) const { return _mode; }
+ int type (void) const { return _type; }
+ int form (void) const { return _form; }
+ int rate (void) const { return _rate; }
+ int chan (void) const { return _chan; }
+ uint32_t size (void) const { return _size; }
+
+ int open_read (const char *name);
+ int open_write (const char *name, int type, int form, int rate, int chan);
+ int set_dither (int type);
+ int close (void);
+
+ int seek (uint32_t posit);
+ int read (float *data, uint32_t frames);
+ int write (float *data, uint32_t frames);
+
+private:
+
+ enum { BUFFSIZE = 1024 };
+
+ void reset (void);
+
+ SNDFILE *_sndfile;
+ int _mode;
+ int _type;
+ int _form;
+ int _rate;
+ int _chan;
+ uint32_t _size;
+ int _dith_type;
+ Dither *_dith_proc;
+ int16_t *_dith_buff;
+};
+
+
+#endif
+
diff --git a/src/thirdparty/zita-resampler/zita-resampler/apps/dither.cc b/src/thirdparty/zita-resampler/zita-resampler/apps/dither.cc
new file mode 100644
index 000000000..08497fefb
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/apps/dither.cc
@@ -0,0 +1,126 @@
+// ----------------------------------------------------------------------------
+//
+// Copyright (C) 2006-2011 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+//
+// ----------------------------------------------------------------------------
+
+
+#include <string.h>
+#include <math.h>
+#include "dither.h"
+
+
+float Dither::_div = 0;
+
+#define SCALE 32768.0f
+#define LIMIT 32767
+
+
+
+Dither::Dither (void)
+{
+ reset ();
+ _div = ldexpf (1.0f, 32);
+}
+
+
+void Dither::reset (void)
+{
+ memset (_err, 0, (SIZE + 4) * sizeof(float));
+ _ind = SIZE - 1;
+ _ran = 1234567;
+}
+
+
+void Dither::proc_rectangular (const float *srce, int16_t *dest, int step, int nsam)
+{
+ float v, r;
+ int32_t k;
+
+ while (nsam--)
+ {
+ r = genrand () - 0.5f;
+ v = *srce * SCALE + r;
+ k = lrintf (v);
+ if (k < -LIMIT) k = -LIMIT;
+ else if (k > LIMIT) k = LIMIT;
+ *dest = k;
+ srce += step;
+ dest += step;
+ }
+}
+
+
+void Dither::proc_triangular (const float *srce, int16_t *dest, int step, int nsam)
+{
+ float v, r0, r1;
+ int32_t k;
+
+ r1 = *_err;
+ while (nsam--)
+ {
+ r0 = genrand ();
+ v = *srce * SCALE + r0 - r1;
+ r1 = r0;
+ k = lrintf (v);
+ if (k < -LIMIT) k = -LIMIT;
+ else if (k > LIMIT) k = LIMIT;
+ *dest = k;
+ srce += step;
+ dest += step;
+ }
+ *_err = r1;
+}
+
+
+void Dither::proc_lipschitz (const float *srce, int16_t *dest, int step, int nsam)
+{
+ float e, u, v, *p;
+ int i;
+ int32_t k;
+
+ i = _ind;
+ while (nsam--)
+ {
+ p = _err + i;
+ u = *srce * SCALE
+ - 2.033f * p [0]
+ + 2.165f * p [1]
+ - 1.959f * p [2]
+ + 1.590f * p [3]
+ - 0.615f * p [4];
+ v = u + genrand () - genrand ();
+ k = lrintf (v);
+ e = k - u;
+ if (k < -LIMIT) k = -LIMIT;
+ else if (k > LIMIT) k = LIMIT;
+ *dest = k;
+ if (--i < 0)
+ {
+ _err [SIZE + 0] = _err [0];
+ _err [SIZE + 1] = _err [1];
+ _err [SIZE + 2] = _err [2];
+ _err [SIZE + 3] = _err [3];
+ i += SIZE;
+ }
+ _err [i] = e;
+ srce += step;
+ dest += step;
+ }
+ _ind = i;
+}
+
+
diff --git a/src/thirdparty/zita-resampler/zita-resampler/apps/dither.h b/src/thirdparty/zita-resampler/zita-resampler/apps/dither.h
new file mode 100644
index 000000000..87c2d0529
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/apps/dither.h
@@ -0,0 +1,58 @@
+// ----------------------------------------------------------------------------
+//
+// Copyright (C) 2006-2011 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+//
+// ----------------------------------------------------------------------------
+
+
+#ifndef __DITHER_H
+#define __DITHER_H
+
+
+#include <stdint.h>
+
+
+class Dither
+{
+public:
+
+ Dither (void);
+ void reset (void);
+ void proc_rectangular (const float *srce, int16_t *dest, int step, int nsam);
+ void proc_triangular (const float *srce, int16_t *dest, int step, int nsam);
+ void proc_lipschitz (const float *srce, int16_t *dest, int step, int nsam);
+
+private:
+
+ enum { SIZE = 64 };
+
+ float genrand (void)
+ {
+ _ran *= 1103515245;
+ _ran += 12345;
+ return _ran / _div;
+ }
+
+ float _err [SIZE + 4];
+ int _ind;
+ uint32_t _ran;
+
+ static float _div;
+};
+
+
+#endif
+
diff --git a/src/thirdparty/zita-resampler/zita-resampler/apps/zresample.1 b/src/thirdparty/zita-resampler/zita-resampler/apps/zresample.1
new file mode 100644
index 000000000..3911511a9
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/apps/zresample.1
@@ -0,0 +1,80 @@
+.TH zresample 1 "May 2010" "version 0.0.1" "USER COMMANDS"
+.SH NAME
+zresample \- resample and change sample format of audio files
+.SH SYNOPSIS
+.B zresample
+[options] input-file output-file
+.SH DESCRIPTION
+.B zresample
+copies an audio file, changing the sample rate and/or the
+sample format. For 16-bit output it can also dither the
+audio signal. Input can be any audio file readable by the
+libsndfile library. The output file type is either WAV or CAF.
+.SH OPTIONS
+.TP
+.B --help
+Display a short help text.
+.TP
+.B --rate sample-rate
+Set the output sample rate.
+.B Zresample
+uses the zita-resampler library which means that not all
+combinations of input/output sample rate will be accepted.
+The resample ratio must be a reducable to a fraction
+.B a/b
+with both
+.B a
+and
+.B b
+less than or equal to 1000.
+.SS Output file type
+.TP
+.B --wav
+Produce a WAV file, or for more than 2 channels, a WAVEX file.
+This is the default.
+.TP
+.B --amb
+Produce a WAVEX file with the Ambisonic GUID. Such files should
+have the
+.B .amb
+filename extension.
+.TP
+.B --caf
+Produce a Core Audio file.
+.SS Output sample format
+.TP
+.B --16bit
+Output sample format is signed 16-bit. This option also
+enables the use of dithering, described below.
+.TP
+.B --24bit
+Output sample format is 24-bit. This is the default.
+.TP
+.B --float
+Output sample format is 32-bit floating point.
+.SS Dithering
+.TP
+.B --rec
+Add white dithering noise with a rectangular distribution. This
+is the best option if the output data is going to processed again,
+but in that case it would be advisable to use 24-bit or float.
+.TP
+.B --tri
+Add filtered noise with a triangular distribution. Compared to the
+rectangular dither this reduces the noise density in the lower
+frequency range.
+.TP
+.B --lips
+This uses the optimal error feedback filter described by
+Stanley Lipschitz. This is recommended is the output is the
+final distribution format, e.g. for a CD.
+.SS Timing
+.TP
+.B --pad
+Insert zero valued input samples at the start and end so that the output
+includes the full symmetric filter response even for the first and last
+samples.
+.SH EXIT STATUS
+Zero in case there are no errors, non-zero otherwise.
+.SH AUTHOR
+Fons Adriaensen (fons (at) linuxaudio.org)
diff --git a/src/thirdparty/zita-resampler/zita-resampler/apps/zresample.cc b/src/thirdparty/zita-resampler/zita-resampler/apps/zresample.cc
new file mode 100644
index 000000000..4cc8d8ec7
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/apps/zresample.cc
@@ -0,0 +1,272 @@
+// ----------------------------------------------------------------------------
+//
+// Copyright (C) 2006-2011 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+//
+// ----------------------------------------------------------------------------
+
+
+#include <stdlib.h>
+#include <string.h>
+#include <getopt.h>
+#include <stdio.h>
+#include <math.h>
+#include <zita-resampler/resampler.h>
+#include "audiofile.h"
+
+
+enum { HELP, CAF, WAV, AMB, BIT16, BIT24, FLOAT, RATE, REC, TRI, LIPS, PAD };
+enum { BUFFSIZE = 0x4000, FILTSIZE = 96 };
+
+
+static unsigned int type = Audiofile::TYPE_WAV;
+static unsigned int form = Audiofile::FORM_24BIT;
+static unsigned int rout = 0;
+static unsigned int dith = Audiofile::DITHER_NONE;
+static bool zpad = false;
+
+
+static void help (void)
+{
+ fprintf (stderr, "\nzresample %s\n", VERSION);
+ fprintf (stderr, "(C) 2007-2012 Fons Adriaensen <fons@linuxaudio.org>\n");
+ fprintf (stderr, "Usage: zresample <options> <input file> <output file>.\n");
+ fprintf (stderr, "Options:\n");
+ fprintf (stderr, " Display this text: --help\n");
+ fprintf (stderr, " Output file type: --caf, --wav, --amb\n");
+ fprintf (stderr, " Output sample rate: --rate <sample rate>\n");
+ fprintf (stderr, " Output sample format: --16bit, --24bit, --float\n");
+ fprintf (stderr, " Dither type (16 bit): --rec, --tri, --lips\n");
+ fprintf (stderr, " Add zero padding : --pad\n");
+ fprintf (stderr, "The default output file format is wav, 24-bit, no dithering.\n");
+ fprintf (stderr, "Integer output formats are clipped, float output is not.\n\n");
+ exit (1);
+}
+
+
+static struct option options [] =
+{
+ { "help", 0, 0, HELP },
+ { "caf", 0, 0, CAF },
+ { "wav", 0, 0, WAV },
+ { "amb", 0, 0, AMB },
+ { "16bit", 0, 0, BIT16 },
+ { "24bit", 0, 0, BIT24 },
+ { "float", 0, 0, FLOAT },
+ { "rate", 1, 0, RATE },
+ { "rec", 0, 0, REC },
+ { "tri", 0, 0, TRI },
+ { "lips", 0, 0, LIPS },
+ { "pad", 0, 0, PAD },
+ { 0, 0, 0, 0 }
+};
+
+
+static void procoptions (int ac, char *av [])
+{
+ int k;
+
+ while ((k = getopt_long (ac, av, "", options, 0)) != -1)
+ {
+ switch (k)
+ {
+ case '?':
+ case HELP:
+ help ();
+ break;
+ case CAF:
+ type = Audiofile::TYPE_CAF;
+ break;
+ case WAV:
+ type = Audiofile::TYPE_WAV;
+ break;
+ case AMB:
+ type = Audiofile::TYPE_AMB;
+ break;
+ case BIT16:
+ form = Audiofile::FORM_16BIT;
+ break;
+ case BIT24:
+ form = Audiofile::FORM_24BIT;
+ break;
+ case FLOAT:
+ form = Audiofile::FORM_FLOAT;
+ break;
+ case RATE:
+ if (sscanf (optarg, "%d", &rout) != 1)
+ {
+ fprintf (stderr, "Illegal value for --rate option: '%s'.\n", optarg);
+ exit (1);
+ }
+ break;
+ case REC:
+ dith = Audiofile::DITHER_RECT;
+ break;
+ case TRI:
+ dith = Audiofile::DITHER_TRIA;
+ break;
+ case LIPS:
+ dith = Audiofile::DITHER_LIPS;
+ break;
+ case PAD:
+ zpad = true;
+ break;
+ }
+ }
+}
+
+
+int main (int ac, char *av [])
+{
+ Audiofile Ainp;
+ Audiofile Aout;
+ Resampler R;
+ unsigned int k, chan, rinp, z1, z2;
+ float *inpb, *outb;
+ bool done;
+
+ procoptions (ac, av);
+ if (ac - optind < 2)
+ {
+ fprintf (stderr, "Missing arguments, try --help.\n");
+ return 1;
+ }
+ if (ac - optind > 2 )
+ {
+ fprintf (stderr, "Too many arguments, try --help.\n");
+ return 1;
+ }
+
+ if (Ainp.open_read (av [optind]))
+ {
+ fprintf (stderr, "Can't open input file '%s'.\n", av [optind]);
+ return 1;
+ }
+
+ chan = Ainp.chan ();
+ rinp = Ainp.rate ();
+ if (rout == 0) rout = rinp;
+
+ if (rout != rinp)
+ {
+ if ((rinp < 8000) || (rinp > 192000))
+ {
+ fprintf (stderr, "Input sample %d rate is out of range.\n", rinp);
+ Ainp.close ();
+ return 1;
+ }
+ if ((rout < 8000) || (rout > 192000))
+ {
+ fprintf (stderr, "Output sample rate %d is out of range.\n", rout);
+ Ainp.close ();
+ return 1;
+ }
+ if (R.setup (rinp, rout, chan, FILTSIZE))
+ {
+ fprintf (stderr, "Sample rate ratio %d/%d is not supported.\n", rout, rinp);
+ Ainp.close ();
+ return 1;
+ }
+ }
+
+ optind++;
+ if (Aout.open_write (av [optind], type, form, rout, chan))
+ {
+ fprintf (stderr, "Can't open output file '%s'.\n", av [optind]);
+ Ainp.close ();
+ return 1;
+ }
+ if (dith != Audiofile::DITHER_NONE)
+ {
+ Aout.set_dither (dith);
+ }
+
+ if (zpad)
+ {
+ z1 = R.inpsize () - 1;
+ z2 = R.inpsize () - 1;
+ }
+ else
+ {
+ z1 = R.inpsize () / 2 - 1;
+ z2 = R.inpsize () / 2;
+ }
+
+ inpb = new float [chan * BUFFSIZE];
+ if (rout != rinp)
+ {
+ outb = new float [chan * BUFFSIZE];
+ // Insert zero samples at start.
+ R.inp_count = z1;
+ R.inp_data = 0;
+ R.out_count = BUFFSIZE;
+ R.out_data = outb;
+ done = false;
+ while (true)
+ {
+ R.process ();
+ if (R.inp_count == 0)
+ {
+ // Input buffer empty, read more samples, insert
+ // zeros at the end, or terminate.
+ if (done)
+ {
+ // We already inserted final zero samples.
+ // Write out any remaining output samples and terminate.
+ Aout.write (outb, BUFFSIZE - R.out_count);
+ break;
+ }
+ k = Ainp.read (inpb, BUFFSIZE);
+ if (k)
+ {
+ // Process next 'k' input samples.
+ R.inp_count = k;
+ R.inp_data = inpb;
+ }
+ else
+ {
+ // At end of input, insert zero samples.
+ R.inp_count = z2;
+ R.inp_data = 0;
+ done = true;
+ }
+ }
+ if (R.out_count == 0)
+ {
+ // Output buffer full, write to file.
+ Aout.write (outb, BUFFSIZE);
+ R.out_count = BUFFSIZE;
+ R.out_data = outb;
+ }
+ }
+ delete[] outb;
+ }
+ else
+ {
+ // No resampling, just copy.
+ while (1)
+ {
+ k = Ainp.read (inpb, BUFFSIZE);
+ if (k) Aout.write (inpb, k);
+ else break;
+ }
+ }
+
+ Ainp.close ();
+ Aout.close ();
+ delete[] inpb;
+
+ return 0;
+}
diff --git a/src/thirdparty/zita-resampler/zita-resampler/apps/zretune.1 b/src/thirdparty/zita-resampler/zita-resampler/apps/zretune.1
new file mode 100644
index 000000000..b14d5c963
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/apps/zretune.1
@@ -0,0 +1,73 @@
+.TH zretune 1 "Sect 2012" "version 0.0.1" "USER COMMANDS"
+.SH NAME
+zretune \- resample an audio file in order to change its pitch
+.SH SYNOPSIS
+.B zretune
+[options] input-file output-file
+.SH DESCRIPTION
+.B zretune
+resamples an audio file by a the inverse of a ratio expressed in cents,
+without changing the nominal sample rate. The result is to change the
+musical pitch and lenght of the file. Input can be any audio file
+readable by the libsndfile library. The output file type is either
+WAV or CAF.
+.SH OPTIONS
+.TP
+.B --help
+Display a short help text.
+.TP
+.B --cent pitch change in cents
+The number of cents by which the pitch is changed. The accepted
+range is +/- 1200 cents, the useful range in practice will be
+something like +/- 100 cents.
+.SS Output file type
+.TP
+.B --wav
+Produce a WAV file, or for more than 2 channels, a WAVEX file.
+This is the default.
+.TP
+.B --amb
+Produce a WAVEX file with the Ambisonic GUID. Such files should
+have the
+.B .amb
+filename extension.
+.TP
+.B --caf
+Produce a Core Audio file.
+.SS Output sample format
+.TP
+.B --16bit
+Output sample format is signed 16-bit. This option also
+enables the use of dithering, described below.
+.TP
+.B --24bit
+Output sample format is 24-bit. This is the default.
+.TP
+.B --float
+Output sample format is 32-bit floating point.
+.SS Dithering
+.TP
+.B --rec
+Add white dithering noise with a rectangular distribution. This
+is the best option if the output data is going to processed again,
+but in that case it would be advisable to use 24-bit or float.
+.TP
+.B --tri
+Add filtered noise with a triangular distribution. Compared to the
+rectangular dither this reduces the noise density in the lower
+frequency range.
+.TP
+.B --lips
+This uses the optimal error feedback filter described by
+Stanley Lipschitz. This is recommended is the output is the
+final distribution format, e.g. for a CD.
+.SS Timing
+.TP
+.B --pad
+Insert zero valued input samples at the start and end so that the output
+includes the full symmetric filter response even for the first and last
+samples.
+.SH EXIT STATUS
+Zero in case there are no errors, non-zero otherwise.
+.SH AUTHOR
+Fons Adriaensen (fons (at) linuxaudio.org)
diff --git a/src/thirdparty/zita-resampler/zita-resampler/apps/zretune.cc b/src/thirdparty/zita-resampler/zita-resampler/apps/zretune.cc
new file mode 100644
index 000000000..48168023b
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/apps/zretune.cc
@@ -0,0 +1,257 @@
+// ----------------------------------------------------------------------------
+//
+// Copyright (C) 2006-2011 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+//
+// ----------------------------------------------------------------------------
+
+
+#include <stdlib.h>
+#include <string.h>
+#include <getopt.h>
+#include <stdio.h>
+#include <math.h>
+#include <zita-resampler/vresampler.h>
+#include "audiofile.h"
+
+
+enum { HELP, CAF, WAV, AMB, BIT16, BIT24, FLOAT, CENT, REC, TRI, LIPS, PAD };
+enum { BUFFSIZE = 0x4000, FILTSIZE = 96 };
+
+
+static unsigned int type = Audiofile::TYPE_WAV;
+static unsigned int form = Audiofile::FORM_24BIT;
+static double cent = 0;
+static unsigned int dith = Audiofile::DITHER_NONE;
+static bool zpad = false;
+
+
+static void help (void)
+{
+ fprintf (stderr, "\nzretune %s\n", VERSION);
+ fprintf (stderr, "(C) 2007-2012 Fons Adriaensen <fons@linuxaudio.org>\n");
+ fprintf (stderr, "Usage: zretune <options> <input file> <output file>.\n");
+ fprintf (stderr, "Options:\n");
+ fprintf (stderr, " Display this text: --help\n");
+ fprintf (stderr, " Output file type: --caf, --wav, --amb\n");
+ fprintf (stderr, " Resampling ratio: --cent <pitch change>\n");
+ fprintf (stderr, " Output sample format: --16bit, --24bit, --float\n");
+ fprintf (stderr, " Dither type (16 bit): --rec, --tri, --lips\n");
+ fprintf (stderr, " Add zero padding : --pad\n");
+ fprintf (stderr, "The default output file format is wav, 24-bit, no dithering.\n");
+ fprintf (stderr, "Integer output formats are clipped, float output is not.\n\n");
+ exit (1);
+}
+
+
+static struct option options [] =
+{
+ { "help", 0, 0, HELP },
+ { "caf", 0, 0, CAF },
+ { "wav", 0, 0, WAV },
+ { "amb", 0, 0, AMB },
+ { "16bit", 0, 0, BIT16 },
+ { "24bit", 0, 0, BIT24 },
+ { "float", 0, 0, FLOAT },
+ { "cent", 1, 0, CENT },
+ { "rec", 0, 0, REC },
+ { "tri", 0, 0, TRI },
+ { "lips", 0, 0, LIPS },
+ { "pad", 0, 0, PAD },
+ { 0, 0, 0, 0 }
+};
+
+
+static void procoptions (int ac, char *av [])
+{
+ int k;
+
+ while ((k = getopt_long (ac, av, "", options, 0)) != -1)
+ {
+ switch (k)
+ {
+ case '?':
+ case HELP:
+ help ();
+ break;
+ case CAF:
+ type = Audiofile::TYPE_CAF;
+ break;
+ case WAV:
+ type = Audiofile::TYPE_WAV;
+ break;
+ case AMB:
+ type = Audiofile::TYPE_AMB;
+ break;
+ case BIT16:
+ form = Audiofile::FORM_16BIT;
+ break;
+ case BIT24:
+ form = Audiofile::FORM_24BIT;
+ break;
+ case FLOAT:
+ form = Audiofile::FORM_FLOAT;
+ break;
+ case CENT:
+ if (sscanf (optarg, "%lf", &cent) != 1)
+ {
+ fprintf (stderr, "Illegal value for --rate option: '%s'.\n", optarg);
+ exit (1);
+ }
+ break;
+ case REC:
+ dith = Audiofile::DITHER_RECT;
+ break;
+ case TRI:
+ dith = Audiofile::DITHER_TRIA;
+ break;
+ case LIPS:
+ dith = Audiofile::DITHER_LIPS;
+ break;
+ case PAD:
+ zpad = true;
+ break;
+ }
+ }
+}
+
+
+int main (int ac, char *av [])
+{
+ Audiofile Ainp;
+ Audiofile Aout;
+ VResampler R;
+ unsigned int k, chan, z1, z2;
+ float *inpb, *outb;
+ bool done;
+ double ratio;
+
+ procoptions (ac, av);
+ if (ac - optind < 2)
+ {
+ fprintf (stderr, "Missing arguments, try --help.\n");
+ return 1;
+ }
+ if (ac - optind > 2 )
+ {
+ fprintf (stderr, "Too many arguments, try --help.\n");
+ return 1;
+ }
+
+ if (Ainp.open_read (av [optind]))
+ {
+ fprintf (stderr, "Can't open input file '%s'.\n", av [optind]);
+ return 1;
+ }
+
+ if ((cent < -1200) || (cent > 1200))
+ {
+ fprintf (stderr, "Pitch change %3.1lf is out of range.\n", cent);
+ Ainp.close ();
+ return 1;
+ }
+ ratio = pow (2.0, -cent / 1200.0);
+ R.setup (ratio, Ainp.chan (), FILTSIZE);
+
+ optind++;
+ if (Aout.open_write (av [optind], type, form, Ainp.rate(), Ainp.chan ()))
+ {
+ fprintf (stderr, "Can't open output file '%s'.\n", av [optind]);
+ Ainp.close ();
+ return 1;
+ }
+ if (dith != Audiofile::DITHER_NONE)
+ {
+ Aout.set_dither (dith);
+ }
+
+ if (zpad)
+ {
+ z1 = R.inpsize () - 1;
+ z2 = R.inpsize () - 1;
+ }
+ else
+ {
+ z1 = R.inpsize () / 2 - 1;
+ z2 = R.inpsize () / 2;
+ }
+
+ chan = Ainp.chan ();
+ inpb = new float [chan * BUFFSIZE];
+ if (cent != 0.0)
+ {
+ outb = new float [chan * BUFFSIZE];
+ // Insert zero samples at start.
+ R.inp_count = z1;
+ R.inp_data = 0;
+ R.out_count = BUFFSIZE;
+ R.out_data = outb;
+ done = false;
+ while (true)
+ {
+ R.process ();
+ if (R.inp_count == 0)
+ {
+ // Input buffer empty, read more samples, insert
+ // zeros at the end, or terminate.
+ if (done)
+ {
+ // We already inserted final zero samples.
+ // Write out any remaining output samples and terminate.
+ Aout.write (outb, BUFFSIZE - R.out_count);
+ break;
+ }
+ k = Ainp.read (inpb, BUFFSIZE);
+ if (k)
+ {
+ // Process next 'k' input samples.
+ R.inp_count = k;
+ R.inp_data = inpb;
+ }
+ else
+ {
+ // At end of input, insert zero samples.
+ R.inp_count = z2;
+ R.inp_data = 0;
+ done = true;
+ }
+ }
+ if (R.out_count == 0)
+ {
+ // Output buffer full, write to file.
+ Aout.write (outb, BUFFSIZE);
+ R.out_count = BUFFSIZE;
+ R.out_data = outb;
+ }
+ }
+ delete[] outb;
+ }
+ else
+ {
+ // No resampling, just copy.
+ while (1)
+ {
+ k = Ainp.read (inpb, BUFFSIZE);
+ if (k) Aout.write (inpb, k);
+ else break;
+ }
+ }
+
+ Ainp.close ();
+ Aout.close ();
+ delete[] inpb;
+
+ return 0;
+}
diff --git a/src/thirdparty/zita-resampler/zita-resampler/docs/filt1.png b/src/thirdparty/zita-resampler/zita-resampler/docs/filt1.png
new file mode 100644
index 000000000..0fdd30c8e
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/docs/filt1.png
Binary files differ
diff --git a/src/thirdparty/zita-resampler/zita-resampler/docs/filt2.png b/src/thirdparty/zita-resampler/zita-resampler/docs/filt2.png
new file mode 100644
index 000000000..4a5bf5b60
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/docs/filt2.png
Binary files differ
diff --git a/src/thirdparty/zita-resampler/zita-resampler/docs/inpdist.png b/src/thirdparty/zita-resampler/zita-resampler/docs/inpdist.png
new file mode 100644
index 000000000..5a8901851
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/docs/inpdist.png
Binary files differ
diff --git a/src/thirdparty/zita-resampler/zita-resampler/docs/resampler.html b/src/thirdparty/zita-resampler/zita-resampler/docs/resampler.html
new file mode 100644
index 000000000..eb608e0de
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/docs/resampler.html
@@ -0,0 +1,574 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <title>Zita-resampler.</title>
+ <meta name="Author" content="Fons Adriaensen (fons@linuxaudio.org)">
+ <meta name="Description" content="The zita-resampler library.">
+ <meta name="Keywords" content="resampling sound audio dsp linux">
+ <link rel=StyleSheet href="zitadocs.css" type="text/css" media="all">
+</head>
+
+<body>
+
+
+<h1>Libzita-resampler</h1>
+<ul>
+<li><a href = "#introduction">Introduction</a>
+<li><a href = "#algorithm">The algorithm</a>
+<li><a href = "#description">API description</a>
+<li><a href = "#reference">API reference</a>
+</ul>
+
+<br>
+<a name = "introduction"></a>
+<h2>Introduction</h2>
+<p>
+Libzita-resampler is a C++ library for resampling audio signals. It is designed
+to be used within a real-time processing context, to be fast, and to provide
+high-quality sample rate conversion.
+</p>
+<p>
+The library operates on signals represented in single-precision floating point
+format. For multichannel operation both the input and output signals are
+assumed to be stored as interleaved samples.
+</p>
+<p>
+The API allows a trade-off between quality and CPU load. For the latter
+a range of approximately 1:6 is available. Even at the highest quality
+setting libzita-resampler will be faster than most similar libraries
+providing the same quality, e.g. libsamplerate.
+</p>
+<p>
+In many real-time resampling applications (e.g. an audio player), processing
+is driven by the ouput sample rate: each processing period requires a fixed
+number of output samples, and the input side has to adapt, providing whatever
+number of samples required. The inverse situation (less common, but possible)
+would be e.g. a recording application that writes an audio file at a rate that
+is different from the hardware sample rate. In that case the number of input
+samples is fixed for each processing period. The API provided by libzita-resampler
+is fully symmetric in this respect - it handles both situations in the exactly the
+same way, using the same application code.
+</p>
+<p>
+Libzita-resampler provides two classes:
+</p>
+<p>
+The <b>Resampler</b> class performs resampling at a fixed ratio <b>F_out / F_in</b>
+which is required to be <b>&ge; 1/16</b> and be reducible to the form <b> b / a</b>
+with <b>a, b</b> integer and <b>b &le; 1000</b>. This includes all the 'standard'
+ratios, e.g. 96000 / 44100 = 320 / 147. These restrictions allow for a more efficient
+implementation.
+</p>
+<p>
+The <b>VResampler</b> class provides an arbitrary ratio <b>r</b> in the range
+<b>1/16 &le; r &le; 64</b> and which can variable within a range of <b>0.95 to
+16.0</b> w.r.t. the originally configured one. The lower limit here is necessary
+because this class still uses a fixed multiphase filter, with only the phase step
+being variable. This class was developed for converting between two nominally fixed
+sample rates with a ratio which is not known exactly and may even drift slowly, e.g.
+when combining sound cards wich do not have a common word clock. This resampler is
+somewhat less efficient than the fixed ratio one since it has to interpolate filter
+coefficients, but the difference is marginal when used on multichannel signals.
+</p>
+<p>
+Both classes provide essentially the same API, with only small differences
+where necessary.
+
+<br>
+<a name = "algorithm"></a>
+<h2>The algorithm</h2>
+<p>
+Libzita-resampler implements <b>constant bandwidth resampling</b>. In contrast
+to e.g. cubic interpolation it does not consider the actual shape of the
+waveform represented by the input samples, but rather operates in the spectral
+domain.
+</p>
+<p>
+Let
+<ul>
+<li><b>F_in, F_out</b>&nbsp &nbsp be the input and output sample rates,</li>
+<li><b>F_min</b>&nbsp &nbsp the lower of the two,</li>
+<li><b>F_lcm</b>&nbsp &nbsp their lowest common multiple,</li>
+<li><b>b = F_lcm / F_in</b>,</li>
+<li><b>a = F_lcm / F_out</b></li>.
+</ul>
+<p>
+Then the calculation performed by zita-resampler is equivalent to:
+</p>
+<ul>
+<li>upsampling to a rate of <b>F_lcm</b> by inserting <b>b - 1</b>
+zero-valued samples after each input sample,</li>
+<li>low-pass filtering of the upsampled signal to remove everything
+above <b>F_min / 2</b>,</li>
+<li>retaining only the first of each series of <b>a</b> filtered
+samples.</li>
+</ul>
+<p>
+This is of course not how things are implemented in the resampler code.
+Only those samples that are actually output are computed, and the inserted
+zeros are never used. In practice this means there is a set of <b>b</b>
+different FIR filters that each output one sample in turn, in round-robin
+fashion. All these filters have the same frequency response, but different
+delays that correspond to the relative position in time of the input and
+output samples.
+</p>
+<p>
+A real-world filter can't be perfect, it is always a compromise between
+complexity (CPU load) and performance. In the context of resampling this
+compromise manifests itself as deviations from the ideally flat frequency
+response, and as aliasing - the same phenomenon that occurs with AD and
+DA conversion. For aliasing, two cases need to be considered:
+</p>
+<p>
+<b>Upsampling.</b> In this case <b>F_min = F_in</b>, and input signals
+below but near to <b>F_in / 2</b> will also appear in the output
+just above this frequency. This is similar to DA conversion.
+</p>
+<p>
+<b>Downsampling.</b> In this case <b>F_min = F_out</b>, and input signals
+above but near to <b>F_out / 2</b> will also appear in the output
+just below this frequency. This is similar to AD conversion.
+</p>
+<p>
+In the design of zita-resampler it was assumed that in most cases
+conversion will be between the 'standard' audio sample rates (44.1,
+48, 88.2, 96, 192 kHz), and that consequently frequency response
+errors and aliasing will occur only above the upper limit of the
+audible frequency range. Given this assumption, some pragmatic
+trade-offs can be made.
+</p>
+<p>
+The filter used by libzita-resampler is dimensioned to reach an
+attenuation of 60dB at the Nyquist frequency. The initialisation
+function takes a parameter named <b>hlen</b> that is in fact half
+the length of the symmetrical FIR filter expressend in samples at
+the rate <b>F_min</b>. The valid range for <b>hlen</b> is 16 to 96.
+The figure below shows the filter responses for <b>hlen</b> = 32,
+48, and 96. The <b>x</b> axis is <b>F / F_min</b>, the <b>y</b> axis
+is in dB. The lower part of the traces is the mirrored continuation
+of the response above the Nyquist frequency, i.e. the aliasing.
+Note that 20 kHz corresponds to x = 0.416 for a sample rate of 48 kHz,
+and to x = 0.454 for a sample rate of 44.1 kHz.
+</p>
+<p>
+<img src="filt1.png">
+</p>
+<p>
+<br>
+The same traces with a reduced vertical range, showing the passband
+response.
+</p>
+<p>
+<img src="filt2.png">
+</p>
+<p>
+From these figures it should be clear that <b>hlen = 32</b> should
+provide very high quality for <b>F_min</b> equal to 48 kHz or higher,
+while <b>hlen = 48</b> should be sufficient for an <b>F_min</b> of
+44.1 kHz. The validity of these assumptions was confirmed by a series
+of listening tests. If fact the conclusion of these test was that even
+at 44.1 kHz the subjects (all audio specialists or musicians) could not
+detect any significant difference between <b>hlen</b> values of 32 and 96.
+</p>
+
+<br>
+<a name = "description"></a>
+<h2>API description</h2>
+<p>
+The constructors of both classes do not initialise the object for a particular
+resampling rate, quality or number of channels - this is done by a separate
+function member which can be used as many times as necessary. This means you
+can allocate <b>(V)Resampler</b> objects before the actual resampling parameters
+are known.
+</p>
+<p>
+The <b>setup ()</b> member initialises a resampler for a combination of input
+sample rate, output sample rate, number of channels, and filter length. This
+function allocates and computes the filter coefficient tables and is definitely
+not RT-safe. The actual tables will be shared with other resampler instances if
+possible - the library maintains a reference-counted collection of them. After
+the initialisation by <b>setup ()</b>, the <b>process ()</b> member can be called
+repeatedly to actually resample audio signals. This function is RT-safe and
+can be used within e.g. a JACK callback. The <b>clear ()</b> member restores
+the object to the initial state it has after construction, and is also called
+from the destructor. You can safely call <b>setup ()</b> again without first
+calling <b>clear ()</b> - doing this avoids recomputation of the filter
+coefficients in some cases.
+</p>
+<p>
+Both classes have four public data members which are used as input and output
+parameters of <b>process ()</b>, in the same way as you would use a C struct
+to pass parameters. These are:
+</p>
+<pre>
+ unsigned int inp_count; // number of frames in the input buffer
+ unsigned int out_count; // number of frames in the output buffer
+ float *inp_data; // pointer to first input frame
+ float *out_data; // pointer to first output frame
+</pre>
+<p>
+As <b>process ()</b> does its work, it increments the pointers and decrements the
+counts. The call returns when either of the counts is zero, i.e. when the input
+buffer is empty or the output buffer is full. You should then take appropriate
+action and if necessary call <b>process ()</b> again.
+</p>
+<p>
+When <b>process ()</b> returns, the four parameter values exactly reflect
+those parts of both buffers <b>that have not yet been used</b>.
+One of them will be fully used, with the corresponding count being zero.
+The remaining part of the other, pointed to by the returned pointer, can
+always be replaced before the next call to <b>process ()</b>, but this is
+entirely optional.
+</p>
+<p>
+When for example <b>inp_count</b> is zero, you have to fill the input buffer
+again, or provide a new one, and re-initialise the input count and pointer.
+If at that time <b>out_count</b> is not zero, you can either leave the output
+parameters as they are for the next call to <b>process ()</b>, or you could
+empty the part of the output buffer that has been filled and re-use it from
+the start, or provide a completely different one.
+</p>
+<p>
+The same applies to the input buffer when it is not empty on return of
+<b>process ()</b>: it can be left alone or be replaced. A number of input
+samples is stored internally between <b>process ()</b> calls as part of the
+resampler state, but this never includes samples that have not yet been used.
+So you can 'revise' the input data, starting from the frame pointed to by the
+returned <b>inp_data</b>, up to the last moment.
+</p>
+<p>
+All this means that both classes will interface easily with fixed input and
+output buffers, with dynamically generated input signals, and also with
+lock-free circular buffers.
+</p>
+<p>
+Either of the two pointers can be NULL. When <b>inp_data</b> is zero, the effect
+is to insert zero-valued input samples, as if you had supplied a zero-filled
+buffer of length <b>inp_count</b>. When <b>out_data</b> is zero, input samples
+will be consumed, the internal state of the resampler will advance normally
+and <b>out_count</b> will decrement, but no output samples are written (in
+fact they are not even computed).
+</p>
+<a name = "padding"></a>
+<p>
+Note that libzita-resampler does <b>not</b> automatically insert zero-valued
+input samples at the start and end of the resampling process. The API makes it
+easy to add such padding, and doing this is left entirely up to the user.
+</p>
+<p>
+The <b>inpsize ()</b> member returns the lenght of the FIR filter expressed in
+input samples. At least this number of samples is required to produce an output
+sample. If <b>k</b> is the value returned by this function, then
+</p>
+<ul>
+<li>inserting <b>k / 2 - 1</b> zero-valued samples at the start will align the
+first input and output samples,</li>
+<li>inserting <b>k - 1</b> zero valued samples will ensure that the output
+includes the full filter response for the first input sample.</li>
+</ul>
+<p>
+Similar considerations apply at the end of the input data:
+</p>
+<ul>
+<li>inserting <b>k / 2</b> zero-valued samples at the end will ensure
+that the last output sample produced will correspond to a position as close
+as possible but not past the last real input sample,</li>
+<li>inserting <b>k - 1</b> zero valued samples will ensure that the output
+includes the full filter response for the last real input sample.</li>
+</ul>
+<p>
+<a name = "inpdist"></a>
+The <b>inpdist ()</b> member returns the distance or delay expressed in sample
+periods at the input rate, between the first output sample that will be ouput
+by the next call to <b>process ()</b> and the first input sample that will be
+read (i.e. that is not yet part of the internal state).
+<br><br>
+In the picture below, the red dots represent input samples and the blue ones
+are the output. Solid dots are samples already used or output. After a call
+to process () the resampler object remains in a state ready to produce the next
+output sample, except that it may have to input one or more new samples first.
+The filter is aligned with the next output sample. In this case one more input
+sample is required to compute it, and the input distance is 2.7.
+</p>
+<p>
+<img src="inpdist.png">
+</p>
+<p>
+After a resampler is prefilled with <b>inpsize () / 2 - 1</b> samples as described
+above, <b>inpdist ()</b> will be zero - the first output sample corresponds exactly
+to the first input. Note that without prefilling the distance is negative, which
+means that the first output sample corresponds to some point past the start of the
+input data.
+</p>
+<p>
+The 'resample' application supplied with the library sources provides
+an example of how to use the <b>Resampler</b> class. For an example
+using <b>VResampler</b> you can have a look at zita_a2j and zita_ja2.
+</p>
+
+<br>
+<a name = "reference"></a>
+<h2>API reference</h2>
+<p>
+Public function members of the <b>Resampler</b> and <b>VResampler</b> classes.
+Functions listed without a class prefix are available for both classes.
+</p>
+<ul>
+<li><a href = "#resampler">Resampler ()</a>
+<li><a href = "#resampler">~Resampler ()</a>
+<li><a href = "#vresampler">VResampler ()</a>
+<li><a href = "#vresampler">~VResampler ()</a>
+<li><a href = "#res_setup">Reampler::setup ()</a>
+<li><a href = "#vres_setup">VResampler::setup ()</a>
+<li><a href = "#clear">clear ()</a>
+<li><a href = "#reset">reset ()</a>
+<li><a href = "#process">process ()</a>
+<li><a href = "#nchan">nchan ()</a>
+<li><a href = "#inpsize">inpsize ()</a>
+<li><a href = "#inpdist">inpdist ()</a>
+<li><a href = "#vres_set_rratio">VResampler::set_rratio ()</a>
+<li><a href = "#vres_set_rrfilt">VResampler::set_rrfilt ()</a>
+</ul>
+<p>
+Public data members of the <b>Resampler</b> and <b>VResampler</b> classes.
+</p>
+<ul>
+<li><a href = "#inp_count">inp_count</a>
+<li><a href = "#out_count">out_count</a>
+<li><a href = "#inp_data">inp_data</a>
+<li><a href = "#out_data">out_data</a>
+</ul>
+
+<a name="resampler"></a>
+<br><p class="apihdr">Resampler (void);<br>~Resampler (void);</p>
+<p>
+<b>Description:</b> Constructor and destructor. The constructor just creates an object that takes
+almost no memory but needs to be configured by <a href="#setup"><b>setup ()</b></a> before it
+can be used. The destructor calls <a href="#clear"><b>clear ()</b></a>.
+<br><br>
+<b>RT-safe:</b> No
+</p>
+
+<a name="vresampler"></a>
+<br><p class="apihdr">VResampler (void);<br>~VResampler (void);</p>
+<p>
+<b>Description:</b> Constructor and destructor. The constructor just creates an object that takes
+almost no memory but needs to be configured by <a href="#setup"><b>setup ()</b></a> before it
+can be used. The destructor calls <a href="#clear"><b>clear ()</b></a>.
+<br><br>
+<b>RT-safe:</b> No
+</p>
+
+<a name="res_setup"></a>
+<br><p class="apihdr">int &nbsp Resampler::setup (unsigned int &nbsp fs_inp, unsigned int fs_out, unsigned int nchan, unsigned int hlen);</p>
+<p>
+<b>Description:</b> Configures the object for a combination of input / output sample rates, number
+of channels, and filter lenght.<br>If the parameters are OK, creates the filter coefficient tables
+or re-uses existing ones, allocates some internal resources, and returns via <a href="#reset">
+<b>reset ()</b></a>.
+<br><br>
+<b>Parameters:</b>
+</p>
+<p class="indent">
+<b>fs_inp, fs_out:</b> The input and output sample rates. The ratio <b>fs_out
+/ fs_inp</b> must be <b> &ge; 1/16</b> and reducible to the form <b>b / a</b>
+with <b>a, b</b> integer and <b>b &le; 1000</b>.
+<br><br>
+<b>nchan:</b> Number of channels, must not be zero.
+<br><br>
+<b>hlen:</b> Half the lenght of the filter expressed in samples at the lower of
+input and output rates. This parameter determines the 'quality' as explained
+<a href="#algorithm">here</a>. For any fixed combination of the other parameters,
+cpu load will be roughly proportional to <b>hlen</b>. The valid range is
+<b>16 &le; hlen &le; 96</b>.
+</p>
+<p>
+<b>Returns:</b> Zero on success, non-zero otherwise.
+<br><br>
+<b>Remark:</b> It is perfectly safe to call this function again without
+having called <a href="#clear"><b>clear ()</b></a> first. If only the number
+of channels is changed, doing this will avoid recalculation of the filter tables
+even if they are not shared.
+<br><br>
+<b>RT-safe:</b> No
+</p>
+
+<a name="vres_setup"></a>
+<br><p class="apihdr">int &nbsp VResampler::setup (double ratio, unsigned int nchan, unsigned int hlen);</p>
+<p>
+<b>Description:</b> Configures the object for a combination of resampling ratio, number of channels,
+and filter lenght.<br>If the parameters are OK, creates the filter coefficient tables or re-uses
+existing ones, allocates some internal resources, and returns via <a href="#reset">
+<b>reset ()</b></a>.
+<br><br>
+<b>Parameters:</b>
+</p>
+<p class="indent">
+<b>ratio:</b> The resampling ratio wich must be between <b>1/16</b> and <b>64</b>.
+<br><br>
+<b>nchan:</b> Number of channels, must not be zero.
+<br><br>
+<b>hlen:</b> Half the lenght of the filter expressed in samples at the lower of
+the input and output rates. This parameter determines the 'quality' as explained
+<a href="#algorithm">here</a>. For any fixed combination of the other parameters,
+cpu load will be roughly proportional to <b>hlen</b>. The valid range is
+<b>16 &le; hlen &le; 96</b>.
+</p>
+<p>
+<b>Returns:</b> Zero on success, non-zero otherwise.
+<br><br>
+<b>Remark:</b> It is perfectly safe to call this function again without
+having called <a href="#clear"><b>clear ()</b></a> first. If only the number
+of channels is changed, doing this will avoid recalculation of the filter tables
+even if they are not shared.
+<br><br>
+<b>RT-safe:</b> No
+</p>
+
+<a name="clear"></a>
+<br><p class="apihdr">void &nbsp clear (void);</p>
+<p>
+<b>Description:</b> Deallocates resources (if not shared) and returns the object to
+the unconfigured state as after construction. Also called by the destructor.
+<br><br>
+<b>RT-safe:</b> No
+</p>
+
+<a name="reset"></a>
+<br><p class="apihdr">int &nbsp reset (void);</p>
+<p>
+<b>Description:</b> Resets the internal state of the resampler. Any stored
+input samples are cleared, the filter phase and the four <a href="#inp_count">
+public data members</a> are set to zero. This should be called before starting
+resampling a new stream with the same configuration as the previous one.
+<br><br>
+<b>Returns:</b> Zero if the resampler is configured , non-zero otherwise.
+<br><br>
+<b>RT-safe:</b> Yes.
+</p>
+
+<a name="process"></a>
+<br><p class="apihdr">int &nbsp process (void);</p>
+<p>
+<b>Description:</b> Resamles the input signal until either the input buffer
+is empty or the output buffer is full. Information on the input and output
+buffers is passed to this function using the four <a href="#inp_count"> public
+data members</a> described below. The same four values are updated on return.
+<br><br>
+<b>Returns:</b> Zero if the resampler is configured, non-zero otherwise.
+<br><br>
+<b>RT-safe:</b> Yes.
+</p>
+
+<a name="nchan"></a>
+<br><p class="apihdr">int &nbsp nchan (void);</p>
+<p>
+<b>Description:</b> Accessor.
+<br><br>
+<b>Returns:</b> The number of channels the resampler is configured for,
+or zero if it is unconfigured. Input and output buffers are assumed to contain
+this number of channels in interleaved format.
+<br><br>
+<b>RT-safe:</b> Yes
+</p>
+
+<a name="inpsize"></a>
+<br><p class="apihdr">int &nbsp inpisze (void);</p>
+<p>
+<b>Description:</b> Accessor.
+<br><br>
+<b>Returns:</b> If the resampler is configured, the lenght of the
+finite impulse filter expressed in samples at the input sample rate,
+or zero otherwise. This value may be used to determine the number of
+silence samples to insert at the start and end when resampling e.g.
+an impulse response. See <a href="#padding">here</a> for more about this.
+This function was called 'filtlen ()' in previous releases.
+<br><br>
+<b>RT-safe:</b> Yes
+</p>
+
+<a name="inpdist"></a>
+<br><p class="apihdr">double &nbsp inpdist (void);</p>
+<p>
+<b>Description:</b> Accessor.
+<br><br>
+<b>Returns:</b> If the resampler is configured, the distance between
+the next output sample and the next input sample, expressed in sample
+periods at the input rate, zero otherwise. See <a href="#inpdist">
+here</a> for more about this.
+<br><br>
+<b>RT-safe:</b> Yes
+</p>
+
+<a name="vres_set_rratio"></a>
+<br><p class="apihdr">void &nbsp VResampler::set_rratio (double ratio);</p>
+<p>
+<b>Description:</b> Sets the resampling ratio relative to the one configured
+by <a href="#vres_setup"> setup ()</a>. The valid range is <b>0.95 &le;
+ratio &le; 16</b>.
+<br><br>
+<b>Parameters:</b>
+</p>
+<p class="indent">
+<b>ratio:</b> The relative resampling ratio.
+</p>
+<p>
+<b>RT-safe:</b> Yes
+</p>
+
+<a name="vres_set_rrfilt"></a>
+<br><p class="apihdr">void &nbsp VResampler::set_rrfilt (double time);</p>
+<p>
+<b>Description:</b> Sets the time constant of the first order filter applied
+on values set by <a href="#vres_set_rratio"> set_rratio ()</a>. The time is
+expressed as sample periods at the output rate. The default is zero, which
+means changes are applied instantly.
+<br><br>
+<b>Parameters:</b>
+</p>
+<p class="indent">
+<b>time:</b> The filter time constant.
+</p>
+<p>
+<b>RT-safe:</b> Yes
+</p>
+
+<a name="inp_count"></a>
+<br><p class="apihdr">unsigned int &nbsp inp_count;</p>
+<p>
+<b>Description:</b> Data member, input / output parameter of the <a href="#process">
+process ()</a> function. This value is always equal to the number of frames in the
+input buffer that have not yet been read by the process () function. It should be set
+to the number of available frames before calling process ().
+</p>
+
+<a name="out_count"></a>
+<br><p class="apihdr">unsigned int &nbsp out_count;</p>
+<p>
+<b>Description:</b> Data member, input / output parameter of the <a href="#process">
+process ()</a> function. This value is always equal to the number of frames in the
+output buffer that have not yet been written by the process () function. It should be
+set to the size of the output buffer before calling process ().
+</p>
+
+<a name="inp_data"></a>
+<br><p class="apihdr">float &nbsp *inp_data;</p>
+<p>
+<b>Description:</b> Data member, input / output parameter of the <a href="#process">
+process ()</a> function. If not zero (NULL), this points to the next frame in the
+input buffer that will be read by process (). If set to zero (NULL), the resampler
+will proceed normally but use zero-valued samples as input (still counted by
+<b>inp_count</b>).
+</p>
+
+<a name="out_data"></a>
+<br><p class="apihdr">float &nbsp *out_data;</p>
+<p>
+<b>Description:</b> Data member, input / output parameter of the <a href="#process">
+process ()</a> function. If not zero (NULL), this points to the next frame in the
+output buffer that will be written by process (). If set to zero (NULL), the resampler
+will proceed normally but the output is discarded (but still counted by <b>out_count</b>).
+</p>
+
+</body>
+</html>
diff --git a/src/thirdparty/zita-resampler/zita-resampler/docs/src-1kHz.png b/src/thirdparty/zita-resampler/zita-resampler/docs/src-1kHz.png
new file mode 100644
index 000000000..18b450aac
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/docs/src-1kHz.png
Binary files differ
diff --git a/src/thirdparty/zita-resampler/zita-resampler/docs/zita-1kHz.png b/src/thirdparty/zita-resampler/zita-resampler/docs/zita-1kHz.png
new file mode 100644
index 000000000..4028fa4d6
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/docs/zita-1kHz.png
Binary files differ
diff --git a/src/thirdparty/zita-resampler/zita-resampler/docs/zitadocs.css b/src/thirdparty/zita-resampler/zita-resampler/docs/zitadocs.css
new file mode 100644
index 000000000..8afb88dbe
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/docs/zitadocs.css
@@ -0,0 +1,18 @@
+body { background: white; color: black; font-family: arial, helvetica, sans-serif; }
+center { font-family: arial, helvetica, sans-serif; }
+p { font-family: arial, helvetica, sans-serif; text-align: left; margin-left: 3%; margin-right: 3%; }
+td { font-family: arial, helvetica, sans-serif; background: white; color: black; }
+ul { font-family: arial, helvetica, sans-serif; text-align: left; margin-left: 3%; margin-right: 6%; }
+ol { font-family: arial, helvetica, sans-serif; text-align: left; margin-left: 3%; margin-right: 6%; }
+dl { font-family: arial, helvetica, sans-serif; text-align: left; margin-left: 3%; margin-right: 3%; }
+h1 { font-size: xx-large; background: #8080FF; color: white; text-align: left; padding-left: 20; }
+h2 { font-size: x-large; background: #8080FF; color: white; text-align: left; padding-left: 20; }
+h3 { font-size: large; background: #8080FF; color: white; text-align: left; padding-left: 20; }
+pre { font-family: courier, monospace; font-size: medium; }
+a:link { color: #008000; }
+a:visited { color: #008000; }
+a:active { color: #FF00FF; }
+a:hover { background-color: #80FF80; color: black; }
+.apihdr { background: #E0E0FF; color: black; text-align: left; padding: 5; }
+.indent { font-family: arial, helvetica, sans-serif; text-align: left; margin-left: 50; margin-right: 50; }
+
diff --git a/src/thirdparty/zita-resampler/zita-resampler/libs/Makefile b/src/thirdparty/zita-resampler/zita-resampler/libs/Makefile
new file mode 100644
index 000000000..6877e528d
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/libs/Makefile
@@ -0,0 +1,68 @@
+# ----------------------------------------------------------------------------
+#
+# Copyright (C) 2006-2012 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# ----------------------------------------------------------------------------
+
+
+# Modify as required.
+#
+PREFIX = /usr/local
+SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
+LIBDIR = lib$(SUFFIX)
+
+MAJVERS = 1
+MINVERS = 3.0
+VERSION = $(MAJVERS).$(MINVERS)
+DISTDIR = zita-resampler-$(VERSION)
+
+
+CPPFLAGS += -I. -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
+CXXFLAGS += -Wall -fPIC -O2 -ffast-math
+CXXFLAGS += -march=native
+LDFLAGS +=
+LDLIBS +=
+
+
+ZITA-RESAMPLER_SO = libzita-resampler.so
+ZITA-RESAMPLER_MAJ = $(ZITA-RESAMPLER_SO).$(MAJVERS)
+ZITA-RESAMPLER_MIN = $(ZITA-RESAMPLER_MAJ).$(MINVERS)
+ZITA-RESAMPLER_DEP =
+ZITA-RESAMPLER_O = resampler.o vresampler.o resampler-table.o
+ZITA-RESAMPLER_H = zita-resampler/resampler.h zita-resampler/resampler-table.h zita-resampler/vresampler.h
+
+
+$(ZITA-RESAMPLER_MIN): $(ZITA-RESAMPLER_O)
+ g++ -shared $(LDFLAGS) -Wl,-soname,$(ZITA-RESAMPLER_MAJ) -o $(ZITA-RESAMPLER_MIN) $(ZITA-RESAMPLER_O) $(ZITA-RESAMPLER_DEP)
+
+$(ZITA-RESAMPLER_O): $(ZITA-RESAMPLER_H)
+
+
+install: $(ZITA-RESAMPLER_MIN)
+ install -d $(DESTDIR)$(PREFIX)/include/zita-resampler
+ install -d $(DESTDIR)$(PREFIX)/$(LIBDIR)
+ install -m 644 $(ZITA-RESAMPLER_H) $(DESTDIR)$(PREFIX)/include/zita-resampler
+ install -m 644 $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)
+ ln -sf $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(ZITA-RESAMPLER_SO)
+ ldconfig
+
+uninstall:
+ /bin/rm -rf $(DESTDIR)$(PREFIX)/include/zita-resampler
+ /bin/rm -rf $(DESTDIR)$(PREFIX)/$(LIBDIR)/libzita-resampler*
+
+clean:
+ /bin/rm -rf *~ *.o *.a *.d *.so.* zita-resampler/*~
+
diff --git a/src/thirdparty/zita-resampler/zita-resampler/libs/resampler-table.cc b/src/thirdparty/zita-resampler/zita-resampler/libs/resampler-table.cc
new file mode 100644
index 000000000..daaf9f39a
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/libs/resampler-table.cc
@@ -0,0 +1,161 @@
+// ----------------------------------------------------------------------------
+//
+// Copyright (C) 2006-2012 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+//
+// ----------------------------------------------------------------------------
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <zita-resampler/resampler-table.h>
+
+
+int zita_resampler_major_version (void)
+{
+ return ZITA_RESAMPLER_MAJOR_VERSION;
+}
+
+
+int zita_resampler_minor_version (void)
+{
+ return ZITA_RESAMPLER_MINOR_VERSION;
+}
+
+
+static double sinc (double x)
+{
+ x = fabs (x);
+ if (x < 1e-6) return 1.0;
+ x *= M_PI;
+ return sin (x) / x;
+}
+
+
+static double wind (double x)
+{
+ x = fabs (x);
+ if (x >= 1.0) return 0.0f;
+ x *= M_PI;
+ return 0.384 + 0.500 * cos (x) + 0.116 * cos (2 * x);
+}
+
+
+
+Resampler_table *Resampler_table::_list = 0;
+Resampler_mutex Resampler_table::_mutex;
+
+
+Resampler_table::Resampler_table (double fr, unsigned int hl, unsigned int np) :
+ _next (0),
+ _refc (0),
+ _fr (fr),
+ _hl (hl),
+ _np (np)
+{
+ unsigned int i, j;
+ double t;
+ float *p;
+
+ _ctab = new float [hl * (np + 1)];
+ p = _ctab;
+ for (j = 0; j <= np; j++)
+ {
+ t = (double) j / (double) np;
+ for (i = 0; i < hl; i++)
+ {
+ p [hl - i - 1] = (float)(fr * sinc (t * fr) * wind (t / hl));
+ t += 1;
+ }
+ p += hl;
+ }
+}
+
+
+Resampler_table::~Resampler_table (void)
+{
+ delete[] _ctab;
+}
+
+
+Resampler_table *Resampler_table::create (double fr, unsigned int hl, unsigned int np)
+{
+ Resampler_table *P;
+
+ _mutex.lock ();
+ P = _list;
+ while (P)
+ {
+ if ((fr >= P->_fr * 0.999) && (fr <= P->_fr * 1.001) && (hl == P->_hl) && (np == P->_np))
+ {
+ P->_refc++;
+ _mutex.unlock ();
+ return P;
+ }
+ P = P->_next;
+ }
+ P = new Resampler_table (fr, hl, np);
+ P->_refc = 1;
+ P->_next = _list;
+ _list = P;
+ _mutex.unlock ();
+ return P;
+}
+
+
+void Resampler_table::destroy (Resampler_table *T)
+{
+ Resampler_table *P, *Q;
+
+ _mutex.lock ();
+ if (T)
+ {
+ T->_refc--;
+ if (T->_refc == 0)
+ {
+ P = _list;
+ Q = 0;
+ while (P)
+ {
+ if (P == T)
+ {
+ if (Q) Q->_next = T->_next;
+ else _list = T->_next;
+ break;
+ }
+ Q = P;
+ P = P->_next;
+ }
+ delete T;
+ }
+ }
+ _mutex.unlock ();
+}
+
+
+void Resampler_table::print_list (void)
+{
+ Resampler_table *P;
+
+ printf ("Resampler table\n----\n");
+ for (P = _list; P; P = P->_next)
+ {
+ printf ("refc = %3d fr = %10.6lf hl = %4d np = %4d\n", P->_refc, P->_fr, P->_hl, P->_np);
+ }
+ printf ("----\n\n");
+}
+
diff --git a/src/thirdparty/zita-resampler/zita-resampler/libs/resampler.cc b/src/thirdparty/zita-resampler/zita-resampler/libs/resampler.cc
new file mode 100644
index 000000000..097acfd1b
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/libs/resampler.cc
@@ -0,0 +1,263 @@
+// ----------------------------------------------------------------------------
+//
+// Copyright (C) 2006-2012 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+//
+// ----------------------------------------------------------------------------
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <zita-resampler/resampler.h>
+
+
+static unsigned int gcd (unsigned int a, unsigned int b)
+{
+ if (a == 0) return b;
+ if (b == 0) return a;
+ while (1)
+ {
+ if (a > b)
+ {
+ a = a % b;
+ if (a == 0) return b;
+ if (a == 1) return 1;
+ }
+ else
+ {
+ b = b % a;
+ if (b == 0) return a;
+ if (b == 1) return 1;
+ }
+ }
+ return 1;
+}
+
+
+Resampler::Resampler (void) :
+ _table (0),
+ _nchan (0),
+ _buff (0)
+{
+ reset ();
+}
+
+
+Resampler::~Resampler (void)
+{
+ clear ();
+}
+
+
+int Resampler::setup (unsigned int fs_inp,
+ unsigned int fs_out,
+ unsigned int nchan,
+ unsigned int hlen)
+{
+ if ((hlen < 8) || (hlen > 96)) return 1;
+ return setup (fs_inp, fs_out, nchan, hlen, 1.0 - 2.6 / hlen);
+}
+
+
+int Resampler::setup (unsigned int fs_inp,
+ unsigned int fs_out,
+ unsigned int nchan,
+ unsigned int hlen,
+ double frel)
+{
+ unsigned int g, h, k, n, s;
+ double r;
+ float *B = 0;
+ Resampler_table *T = 0;
+
+ k = s = 0;
+ if (fs_inp && fs_out && nchan)
+ {
+ r = (double) fs_out / (double) fs_inp;
+ g = gcd (fs_out, fs_inp);
+ n = fs_out / g;
+ s = fs_inp / g;
+ if ((16 * r >= 1) && (n <= 1000))
+ {
+ h = hlen;
+ k = 250;
+ if (r < 1)
+ {
+ frel *= r;
+ h = (unsigned int)(ceil (h / r));
+ k = (unsigned int)(ceil (k / r));
+ }
+ T = Resampler_table::create (frel, h, n);
+ B = new float [nchan * (2 * h - 1 + k)];
+ }
+ }
+ clear ();
+ if (T)
+ {
+ _table = T;
+ _buff = B;
+ _nchan = nchan;
+ _inmax = k;
+ _pstep = s;
+ return reset ();
+ }
+ else return 1;
+}
+
+
+void Resampler::clear (void)
+{
+ Resampler_table::destroy (_table);
+ delete[] _buff;
+ _buff = 0;
+ _table = 0;
+ _nchan = 0;
+ _inmax = 0;
+ _pstep = 0;
+ reset ();
+}
+
+
+double Resampler::inpdist (void) const
+{
+ if (!_table) return 0;
+ return (int)(_table->_hl + 1 - _nread) - (double)_phase / _table->_np;
+}
+
+
+int Resampler::inpsize (void) const
+{
+ if (!_table) return 0;
+ return 2 * _table->_hl;
+}
+
+
+int Resampler::reset (void)
+{
+ if (!_table) return 1;
+
+ inp_count = 0;
+ out_count = 0;
+ inp_data = 0;
+ out_data = 0;
+ _index = 0;
+ _nread = 0;
+ _nzero = 0;
+ _phase = 0;
+ if (_table)
+ {
+ _nread = 2 * _table->_hl;
+ return 0;
+ }
+ return 1;
+}
+
+
+int Resampler::process (void)
+{
+ unsigned int hl, ph, np, dp, in, nr, nz, i, n, c;
+ float *p1, *p2;
+
+ if (!_table) return 1;
+
+ hl = _table->_hl;
+ np = _table->_np;
+ dp = _pstep;
+ in = _index;
+ nr = _nread;
+ ph = _phase;
+ nz = _nzero;
+ n = (2 * hl - nr) * _nchan;
+ p1 = _buff + in * _nchan;
+ p2 = p1 + n;
+
+ while (out_count)
+ {
+ if (nr)
+ {
+ if (inp_count == 0) break;
+ if (inp_data)
+ {
+ for (c = 0; c < _nchan; c++) p2 [c] = inp_data [c];
+ inp_data += _nchan;
+ nz = 0;
+ }
+ else
+ {
+ for (c = 0; c < _nchan; c++) p2 [c] = 0;
+ if (nz < 2 * hl) nz++;
+ }
+ nr--;
+ p2 += _nchan;
+ inp_count--;
+ }
+ else
+ {
+ if (out_data)
+ {
+ if (nz < 2 * hl)
+ {
+ float *c1 = _table->_ctab + hl * ph;
+ float *c2 = _table->_ctab + hl * (np - ph);
+ for (c = 0; c < _nchan; c++)
+ {
+ float *q1 = p1 + c;
+ float *q2 = p2 + c;
+ float s = 1e-20f;
+ for (i = 0; i < hl; i++)
+ {
+ q2 -= _nchan;
+ s += *q1 * c1 [i] + *q2 * c2 [i];
+ q1 += _nchan;
+ }
+ *out_data++ = s - 1e-20f;
+ }
+ }
+ else
+ {
+ for (c = 0; c < _nchan; c++) *out_data++ = 0;
+ }
+ }
+ out_count--;
+
+ ph += dp;
+ if (ph >= np)
+ {
+ nr = ph / np;
+ ph -= nr * np;
+ in += nr;
+ p1 += nr * _nchan;;
+ if (in >= _inmax)
+ {
+ n = (2 * hl - nr) * _nchan;
+ memcpy (_buff, p1, n * sizeof (float));
+ in = 0;
+ p1 = _buff;
+ p2 = p1 + n;
+ }
+ }
+ }
+ }
+ _index = in;
+ _nread = nr;
+ _phase = ph;
+ _nzero = nz;
+
+ return 0;
+}
+
+
diff --git a/src/thirdparty/zita-resampler/zita-resampler/libs/vresampler.cc b/src/thirdparty/zita-resampler/zita-resampler/libs/vresampler.cc
new file mode 100644
index 000000000..451740d22
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/libs/vresampler.cc
@@ -0,0 +1,269 @@
+// ----------------------------------------------------------------------------
+//
+// Copyright (C) 2006-2012 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+//
+// ----------------------------------------------------------------------------
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <zita-resampler/vresampler.h>
+
+
+VResampler::VResampler (void) :
+ _table (0),
+ _nchan (0),
+ _buff (0),
+ _c1 (0),
+ _c2 (0)
+{
+ reset ();
+}
+
+
+VResampler::~VResampler (void)
+{
+ clear ();
+}
+
+
+int VResampler::setup (double ratio,
+ unsigned int nchan,
+ unsigned int hlen)
+{
+ if ((hlen < 8) || (hlen > 96) || (16 * ratio < 1) || (ratio > 64)) return 1;
+ return setup (ratio, nchan, hlen, 1.0 - 2.6 / hlen);
+}
+
+
+int VResampler::setup (double ratio,
+ unsigned int nchan,
+ unsigned int hlen,
+ double frel)
+{
+ unsigned int h, k, n;
+ double s;
+ Resampler_table *T = 0;
+
+ if (! nchan) return 1;
+ n = NPHASE;
+ s = n / ratio;
+ h = hlen;
+ k = 250;
+ if (ratio < 1)
+ {
+ frel *= ratio;
+ h = (unsigned int)(ceil (h / ratio));
+ k = (unsigned int)(ceil (k / ratio));
+ }
+ T = Resampler_table::create (frel, h, n);
+ clear ();
+ if (T)
+ {
+ _table = T;
+ _buff = new float [nchan * (2 * h - 1 + k)];
+ _c1 = new float [2 * h];
+ _c2 = new float [2 * h];
+ _nchan = nchan;
+ _inmax = k;
+ _ratio = ratio;
+ _pstep = s;
+ _qstep = s;
+ _wstep = 1;
+ return reset ();
+ }
+ else return 1;
+}
+
+
+void VResampler::clear (void)
+{
+ Resampler_table::destroy (_table);
+ delete[] _buff;
+ delete[] _c1;
+ delete[] _c2;
+ _buff = 0;
+ _c1 = 0;
+ _c2 = 0;
+ _table = 0;
+ _nchan = 0;
+ _inmax = 0;
+ _pstep = 0;
+ _qstep = 0;
+ _wstep = 1;
+ reset ();
+}
+
+
+void VResampler::set_rrfilt (double t)
+{
+ if (!_table) return;
+ _wstep = (t < 1) ? 1 : 1 - exp (-1 / t);
+}
+
+
+void VResampler::set_rratio (double r)
+{
+ if (!_table) return;
+ if (r > 16.0) r = 16.0;
+ if (r < 0.95) r = 0.95;
+ _qstep = _table->_np / (_ratio * r);
+}
+
+
+double VResampler::inpdist (void) const
+{
+ if (!_table) return 0;
+ return (int)(_table->_hl + 1 - _nread) - _phase / _table->_np;
+}
+
+
+int VResampler::inpsize (void) const
+{
+ if (!_table) return 0;
+ return 2 * _table->_hl;
+}
+
+
+int VResampler::reset (void)
+{
+ if (!_table) return 1;
+
+ inp_count = 0;
+ out_count = 0;
+ inp_data = 0;
+ out_data = 0;
+ _index = 0;
+ _phase = 0;
+ _nread = 0;
+ _nzero = 0;
+ if (_table)
+ {
+ _nread = 2 * _table->_hl;
+ return 0;
+ }
+ return 1;
+}
+
+
+int VResampler::process (void)
+{
+ unsigned int k, np, in, nr, n, c;
+ int i, hl, nz;
+ double ph, dp, dd;
+ float a, b, *p1, *p2, *q1, *q2;
+
+ if (!_table) return 1;
+
+ hl = _table->_hl;
+ np = _table->_np;
+ in = _index;
+ nr = _nread;
+ nz = _nzero;
+ ph = _phase;
+ dp = _pstep;
+ n = (2 * hl - nr) * _nchan;
+ p1 = _buff + in * _nchan;
+ p2 = p1 + n;
+
+ while (out_count)
+ {
+ if (nr)
+ {
+ if (inp_count == 0) break;
+ if (inp_data)
+ {
+ for (c = 0; c < _nchan; c++) p2 [c] = inp_data [c];
+ inp_data += _nchan;
+ nz = 0;
+ }
+ else
+ {
+ for (c = 0; c < _nchan; c++) p2 [c] = 0;
+ if (nz < 2 * hl) nz++;
+ }
+ nr--;
+ p2 += _nchan;
+ inp_count--;
+ }
+ else
+ {
+ if (out_data)
+ {
+ if (nz < 2 * hl)
+ {
+ k = (unsigned int) ph;
+ b = (float)(ph - k);
+ a = 1.0f - b;
+ q1 = _table->_ctab + hl * k;
+ q2 = _table->_ctab + hl * (np - k);
+ for (i = 0; i < hl; i++)
+ {
+ _c1 [i] = a * q1 [i] + b * q1 [i + hl];
+ _c2 [i] = a * q2 [i] + b * q2 [i - hl];
+ }
+ for (c = 0; c < _nchan; c++)
+ {
+ q1 = p1 + c;
+ q2 = p2 + c;
+ a = 1e-25f;
+ for (i = 0; i < hl; i++)
+ {
+ q2 -= _nchan;
+ a += *q1 * _c1 [i] + *q2 * _c2 [i];
+ q1 += _nchan;
+ }
+ *out_data++ = a - 1e-25f;
+ }
+ }
+ else
+ {
+ for (c = 0; c < _nchan; c++) *out_data++ = 0;
+ }
+ }
+ out_count--;
+
+ dd = _qstep - dp;
+ if (fabs (dd) < 1e-30) dp = _qstep;
+ else dp += _wstep * dd;
+ ph += dp;
+ if (ph >= np)
+ {
+ nr = (unsigned int) floor( ph / np);
+ ph -= nr * np;;
+ in += nr;
+ p1 += nr * _nchan;;
+ if (in >= _inmax)
+ {
+ n = (2 * hl - nr) * _nchan;
+ memcpy (_buff, p1, n * sizeof (float));
+ in = 0;
+ p1 = _buff;
+ p2 = p1 + n;
+ }
+ }
+ }
+ }
+ _index = in;
+ _nread = nr;
+ _phase = ph;
+ _pstep = dp;
+ _nzero = nz;
+
+ return 0;
+}
diff --git a/src/thirdparty/zita-resampler/zita-resampler/libs/zita-resampler/resampler-table.h b/src/thirdparty/zita-resampler/zita-resampler/libs/zita-resampler/resampler-table.h
new file mode 100644
index 000000000..96bd756ff
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/libs/zita-resampler/resampler-table.h
@@ -0,0 +1,86 @@
+// ----------------------------------------------------------------------------
+//
+// Copyright (C) 2006-2012 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+//
+// ----------------------------------------------------------------------------
+
+
+#ifndef __RESAMPLER_TABLE_H
+#define __RESAMPLER_TABLE_H
+
+
+//#include <pthread.h>
+#include <mutex>
+
+
+#define ZITA_RESAMPLER_MAJOR_VERSION 1
+#define ZITA_RESAMPLER_MINOR_VERSION 3
+
+
+extern int zita_resampler_major_version (void);
+extern int zita_resampler_minor_version (void);
+
+
+class Resampler_mutex
+{
+private:
+
+ friend class Resampler_table;
+
+ //Resampler_mutex (void) { pthread_mutex_init (&_mutex, 0); }
+ //~Resampler_mutex (void) { pthread_mutex_destroy (&_mutex); }
+ //void lock (void) { pthread_mutex_lock (&_mutex); }
+ //void unlock (void) { pthread_mutex_unlock (&_mutex); }
+ Resampler_mutex (void) { }
+ ~Resampler_mutex (void) { }
+ void lock (void) { _mutex.lock(); }
+ void unlock (void) { _mutex.unlock(); }
+
+ //pthread_mutex_t _mutex;
+ std::mutex _mutex;
+};
+
+
+class Resampler_table
+{
+public:
+
+ static void print_list (void);
+
+private:
+
+ Resampler_table (double fr, unsigned int hl, unsigned int np);
+ ~Resampler_table (void);
+
+ friend class Resampler;
+ friend class VResampler;
+
+ Resampler_table *_next;
+ unsigned int _refc;
+ float *_ctab;
+ double _fr;
+ unsigned int _hl;
+ unsigned int _np;
+
+ static Resampler_table *create (double fr, unsigned int hl, unsigned int np);
+ static void destroy (Resampler_table *T);
+
+ static Resampler_table *_list;
+ static Resampler_mutex _mutex;
+};
+
+
+#endif
diff --git a/src/thirdparty/zita-resampler/zita-resampler/libs/zita-resampler/resampler.h b/src/thirdparty/zita-resampler/zita-resampler/libs/zita-resampler/resampler.h
new file mode 100644
index 000000000..5dbff4f4a
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/libs/zita-resampler/resampler.h
@@ -0,0 +1,76 @@
+// ----------------------------------------------------------------------------
+//
+// Copyright (C) 2006-2012 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+//
+// ----------------------------------------------------------------------------
+
+
+#ifndef __RESAMPLER_H
+#define __RESAMPLER_H
+
+
+#include <zita-resampler/resampler-table.h>
+
+
+class Resampler
+{
+public:
+
+ Resampler (void);
+ ~Resampler (void);
+
+ int setup (unsigned int fs_inp,
+ unsigned int fs_out,
+ unsigned int nchan,
+ unsigned int hlen);
+
+ int setup (unsigned int fs_inp,
+ unsigned int fs_out,
+ unsigned int nchan,
+ unsigned int hlen,
+ double frel);
+
+ void clear (void);
+ int reset (void);
+ int nchan (void) const { return _nchan; }
+ int filtlen (void) const { return inpsize (); } // Deprecated
+ int inpsize (void) const;
+ double inpdist (void) const;
+ int process (void);
+
+ unsigned int inp_count;
+ unsigned int out_count;
+ float *inp_data;
+ float *out_data;
+ void *inp_list;
+ void *out_list;
+
+private:
+
+ Resampler_table *_table;
+ unsigned int _nchan;
+ unsigned int _inmax;
+ unsigned int _index;
+ unsigned int _nread;
+ unsigned int _nzero;
+ unsigned int _phase;
+ unsigned int _pstep;
+ float *_buff;
+ void *_dummy [8];
+};
+
+
+#endif
diff --git a/src/thirdparty/zita-resampler/zita-resampler/libs/zita-resampler/vresampler.h b/src/thirdparty/zita-resampler/zita-resampler/libs/zita-resampler/vresampler.h
new file mode 100644
index 000000000..22dbe72a0
--- /dev/null
+++ b/src/thirdparty/zita-resampler/zita-resampler/libs/zita-resampler/vresampler.h
@@ -0,0 +1,83 @@
+// ----------------------------------------------------------------------------
+//
+// Copyright (C) 2006-2012 Fons Adriaensen <fons@linuxaudio.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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+//
+// ----------------------------------------------------------------------------
+
+
+#ifndef __VRESAMPLER_H
+#define __VRESAMPLER_H
+
+
+#include <zita-resampler/resampler-table.h>
+
+
+class VResampler
+{
+public:
+
+ VResampler (void);
+ ~VResampler (void);
+
+ int setup (double ratio,
+ unsigned int nchan,
+ unsigned int hlen);
+
+ int setup (double ratio,
+ unsigned int nchan,
+ unsigned int hlen,
+ double frel);
+
+ void clear (void);
+ int reset (void);
+ int nchan (void) const { return _nchan; }
+ int inpsize (void) const;
+ double inpdist (void) const;
+ int process (void);
+
+ void set_rrfilt (double t);
+ void set_rratio (double r);
+
+ unsigned int inp_count;
+ unsigned int out_count;
+ float *inp_data;
+ float *out_data;
+ void *inp_list;
+ void *out_list;
+
+private:
+
+ enum { NPHASE = 256 };
+
+ Resampler_table *_table;
+ unsigned int _nchan;
+ unsigned int _inmax;
+ unsigned int _index;
+ unsigned int _nread;
+ unsigned int _nzero;
+ double _ratio;
+ double _phase;
+ double _pstep;
+ double _qstep;
+ double _wstep;
+ float *_buff;
+ float *_c1;
+ float *_c2;
+ void *_dummy [8];
+};
+
+
+#endif